A propos de ce document

Ce document a été construit automatiquement à partir de la documentation HTML disponible sur java.sun.com. Il est périodiquement remis à jour, lorsque de nouvelles versions des documentations originales deviennent disponibles. Pour télécharger librement et gratuitement ces mises à jour, mais aussi d''autres documents Java au format HTMLHelp ou WinHelp, visitez le site de Franck Allimant :

http://www.confluent.fr/javadoc (en Français)

http://www.confluent.fr/javadoc/indexe.html (en Anglais)

Bonne utilisation !

Contact

Les remarques et les suggestions sont les bienvenues. Merci de les faire parvenir à Franck Allimant.

Notes

La documentation HTML originale est disponible sur java.sun.com. Merci de la consulter si vous avez des incertitudes à propos les informations présentées dans ce document.

La version HTMLHelp de cette documentation diffère par quelques points de la version HTML, à cause de certaines limitations de HTMLHelp.

1. Applets Java

Les applets Java 1 fonctionnent correctement dans HTMLHelp, pourvu que les classes Java ne soient pas embarquées dans le fichier d'aide (chm) lui-même. Elles sont stockées dans le répertoire applets, qui se trouve au même endroit que le fichier d'aide. Ce répertoire n'est pas nécessaire au fonctionnement de l'aide : s'il est absent, les applets ne seront pas affichées.

Le plugin Java n'est pas supporté par HTMLHelp. Les applets nécessitant une machine virtuelle Java 2 ne peuvent pas être exécutées.

2. Fichiers nécessitant un plugin

Le support des plugins n'est pas complet dans HTMLHelp. En fonction de la configuration de votre machine, certains problèmes peuvent survenir lors de la visualisation de ces fichiers, en particulier les documents PDF.

3. Occurrences multiples d'un mot-clef de l'index

Si un mot clef de l'index pointe vers plusieurs documents, une page listant toutes les occurrences trouvées est affichée. Cette page fournit le titre des documents dans lequel le mot clef apparaît, et s'il s'agit d'une méthode, les paramètres de cette méthode. Ce mode d'affichage très détaillé a été préféré à la boîte de dialogue "Rubriques Trouvées" proposées en standard par HTMLHelp, pour permettre une navigation plus efficace et plus rapide dans un grand nombre de documents.

Merci à...

a.do Consulting, pour offrir gratuitement un parser HTML écrit en Java aussi compact et efficace.

Doug Kramer, de Sun, qui a autorisé la distribution des documentations Java pour WinHelp et HTMLHelp.

Distribution

Ce logiciel est gratuit. Il ne peut être diffusé sur Internet ou dupliqué que dans des buts non commerciaux, pour usage privé exclusivement. Toute distribution par CD-ROM est soumise à une autorisation préalable [contact].

Toutes les restrictions de distribution imposées par Sun à la documentation originale sont applicables au présent document. Consultez cette page (en anglais) pour en prendre connaissance.

Copyright © 1997-2002, Franck Allimant


About this document

This document is built from the HTML documentations available at java.sun.com. It is regularly updated, when new versions of original documentations become available. To download updates and many other WinHelp and HTMLHelp Java documentations for free, visit Franck Allimant's web site :

http://www.confluent.fr/javadoc/indexe.html (in English)

http://www.confluent.fr/javadoc (in French)

Contact

Comments and suggestions are welcome. Feel free to send them to Franck Allimant.

Notes

The original HTML documentation is available at java.sun.com. Please refer to this original documentation if you're not confident with the present document.

Due to some HTMLHelp limitations, there are some differences between this help file and the original HTML version of the documentation.

1. Java Applets

In most cases, Java 1 applets are running inside the HTMLHelp viewer, provided they're not embedded in the help (chm) file. They are stored in the applets directory, located at the same level as the help file. This folder is not required for browsing help, but if it is missing, applets will not be displayed.

Java 2 applets require the Java Plugin, which is not supported by the HTMLHelp viewer. These applets will not be displayed.

2. Documents that require a plugin

Plugins are not fully supported by the HTMLHelp viewer. Depending on the configuration of your machine, some problems may occur when viewing these files, for example PDF documents.

3. Multiple occurrences of an index keyword

If an index keyword points to more than one document, a page that lists all found occurrences is displayed. This page shows the title of every document in which the keyword appears, and if this keyword is a method, the parameters of this method. This detailed display has been preferred to the standard HTMLHelp "Topics Found" dialog box, to provide a faster and more efficient browsing of a large number of documents.

Thanks to...

a.do Consulting, for HtmlStreamTokenizer™, a compact, efficient and free HTML parser written in Java.

Doug Kramer at Sun, who authorized the distribution of this document.

Distribution

This software is free. Permission to use, copy, and distribute this software for non-commercial purposes via the Internet without fee is hereby granted. Permission is not granted for any distribution in the form of CD-ROM [contact].

Sun's documentation redistribution policy is applicable to this document. Please see this page for details.

Copyright © 1997-2002, Franck Allimant


A-Index

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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

a - Variable in class java.awt.AWTEventMulticaster
A - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Engineering A, 8 1/2 x 11 in.
A - Static variable in class javax.swing.text.html.HTML.Tag
A0 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A0.
A1 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A1.
A10 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A10.
A2 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A2.
A3 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A3.
A4 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A4.
A5 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A5.
A6 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A6.
A7 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A7.
A8 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A8.
A9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_A9.
ABORT - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
ABORTED - Static variable in class java.awt.MediaTracker
Flag indicating that the downloading of some media was aborted.
abortGrabbing() - Method in class java.awt.image.PixelGrabber
Request the PixelGrabber to abort the image fetch.
ABOVE_BOTTOM - Static variable in class javax.swing.border.TitledBorder
Position the title above the border's bottom line.
ABOVE_TOP - Static variable in class javax.swing.border.TitledBorder
Position the title above the border's top line.
abs() - Method in class java.math.BigInteger
Returns a BigInteger whose value is the absolute value of this BigInteger.
abs() - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is the absolute value of this BigDecimal, and whose scale is this.scale().
abs(double) - Static method in class java.lang.StrictMath
Returns the absolute value of a double value.
abs(double) - Static method in class java.lang.Math
Returns the absolute value of a double value.
abs(float) - Static method in class java.lang.StrictMath
Returns the absolute value of a float value.
abs(float) - Static method in class java.lang.Math
Returns the absolute value of a float value.
abs(int) - Static method in class java.lang.StrictMath
Returns the absolute value of an int value..
abs(int) - Static method in class java.lang.Math
Returns the absolute value of an int value.
abs(long) - Static method in class java.lang.StrictMath
Returns the absolute value of a long value.
abs(long) - Static method in class java.lang.Math
Returns the absolute value of a long value.
absolute(int) - Method in interface java.sql.ResultSet
Moves the cursor to the given row number in this ResultSet object.
ABSTRACT - Static variable in class java.lang.reflect.Modifier
The int value representing the abstract modifier.
AbstractAction - class javax.swing.AbstractAction.
This class provides default implementations for the JFC Action interface.
AbstractAction() - Constructor for class javax.swing.AbstractAction
Defines an Action object with a default description string and default icon.
AbstractAction(String) - Constructor for class javax.swing.AbstractAction
Defines an Action object with the specified description string and a default icon.
AbstractAction(String, Icon) - Constructor for class javax.swing.AbstractAction
Defines an Action object with the specified description string and a the specified icon.
AbstractBorder - class javax.swing.border.AbstractBorder.
A class that implements an empty border with no size.
AbstractBorder() - Constructor for class javax.swing.border.AbstractBorder
AbstractButton - class javax.swing.AbstractButton.
Defines common behaviors for buttons and menu items.
AbstractButton.AccessibleAbstractButton - class javax.swing.AbstractButton.AccessibleAbstractButton.
This class implements accessibility support for the AbstractButton class.
AbstractButton.AccessibleAbstractButton(AbstractButton) - Constructor for class javax.swing.AbstractButton.AccessibleAbstractButton
AbstractButton.ButtonChangeListener - class javax.swing.AbstractButton.ButtonChangeListener.
Extends ChangeListener to be serializable.
AbstractButton() - Constructor for class javax.swing.AbstractButton
AbstractCellEditor - class javax.swing.AbstractCellEditor.
AbstractCellEditor() - Constructor for class javax.swing.AbstractCellEditor
AbstractCollection - class java.util.AbstractCollection.
This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
AbstractCollection() - Constructor for class java.util.AbstractCollection
Sole constructor.
AbstractColorChooserPanel - class javax.swing.colorchooser.AbstractColorChooserPanel.
This is the abstract superclass for color choosers.
AbstractColorChooserPanel() - Constructor for class javax.swing.colorchooser.AbstractColorChooserPanel
AbstractDocument - class javax.swing.text.AbstractDocument.
An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.AbstractElement - class javax.swing.text.AbstractDocument.AbstractElement.
Implements the abstract part of an element.
AbstractDocument.AbstractElement(AbstractDocument, Element, AttributeSet) - Constructor for class javax.swing.text.AbstractDocument.AbstractElement
Creates a new AbstractElement.
AbstractDocument.AttributeContext - interface javax.swing.text.AbstractDocument.AttributeContext.
An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
AbstractDocument.BranchElement - class javax.swing.text.AbstractDocument.BranchElement.
Implements a composite element that contains other elements.
AbstractDocument.BranchElement(AbstractDocument, Element, AttributeSet) - Constructor for class javax.swing.text.AbstractDocument.BranchElement
Constructs a composite element that initially contains no children.
AbstractDocument.Content - interface javax.swing.text.AbstractDocument.Content.
Interface to describe a sequence of character content that can be edited.
AbstractDocument.DefaultDocumentEvent - class javax.swing.text.AbstractDocument.DefaultDocumentEvent.
Stores document changes as the document is being modified.
AbstractDocument.DefaultDocumentEvent(AbstractDocument, int, int, DocumentEvent.EventType) - Constructor for class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Constructs a change record.
AbstractDocument.ElementEdit - class javax.swing.text.AbstractDocument.ElementEdit.
An implementation of ElementChange that can be added to the document event.
AbstractDocument.ElementEdit(Element, int, Element[], Element[]) - Constructor for class javax.swing.text.AbstractDocument.ElementEdit
Constructs an edit record.
AbstractDocument.LeafElement - class javax.swing.text.AbstractDocument.LeafElement.
Implements an element that directly represents content of some kind.
AbstractDocument.LeafElement(AbstractDocument, Element, AttributeSet, int, int) - Constructor for class javax.swing.text.AbstractDocument.LeafElement
Constructs an element that represents content within the document (has no children).
AbstractDocument(AbstractDocument.Content) - Constructor for class javax.swing.text.AbstractDocument
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
AbstractDocument(AbstractDocument.Content, AbstractDocument.AttributeContext) - Constructor for class javax.swing.text.AbstractDocument
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
AbstractLayoutCache - class javax.swing.tree.AbstractLayoutCache.
Warning: Serialized objects of this class will not be compatible with future Swing releases.
AbstractLayoutCache.NodeDimensions - class javax.swing.tree.AbstractLayoutCache.NodeDimensions.
Used by AbstractLayoutCache to determing the size and x origin of a particular node.
AbstractLayoutCache.NodeDimensions() - Constructor for class javax.swing.tree.AbstractLayoutCache.NodeDimensions
AbstractLayoutCache() - Constructor for class javax.swing.tree.AbstractLayoutCache
AbstractList - class java.util.AbstractList.
This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
AbstractList() - Constructor for class java.util.AbstractList
Sole constructor.
AbstractListModel - class javax.swing.AbstractListModel.
The Abstract definition for the data model the provides a List with its contents.
AbstractListModel() - Constructor for class javax.swing.AbstractListModel
AbstractMap - class java.util.AbstractMap.
This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
AbstractMap() - Constructor for class java.util.AbstractMap
Sole constructor.
AbstractMethodError - error java.lang.AbstractMethodError.
Thrown when an application tries to call an abstract method.
AbstractMethodError() - Constructor for class java.lang.AbstractMethodError
Constructs an AbstractMethodError with no detail message.
AbstractMethodError(String) - Constructor for class java.lang.AbstractMethodError
Constructs an AbstractMethodError with the specified detail message.
AbstractSequentialList - class java.util.AbstractSequentialList.
This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
AbstractSequentialList() - Constructor for class java.util.AbstractSequentialList
Sole constructor.
AbstractSet - class java.util.AbstractSet.
This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
AbstractSet() - Constructor for class java.util.AbstractSet
Sole constructor.
AbstractTableModel - class javax.swing.table.AbstractTableModel.
This abstract class provides default implementations for most of the methods in the TableModel interface.
AbstractTableModel() - Constructor for class javax.swing.table.AbstractTableModel
AbstractUndoableEdit - class javax.swing.undo.AbstractUndoableEdit.
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
AbstractUndoableEdit() - Constructor for class javax.swing.undo.AbstractUndoableEdit
AbstractWriter - class javax.swing.text.AbstractWriter.
AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
AbstractWriter(Writer, Document) - Constructor for class javax.swing.text.AbstractWriter
Creates a new AbstractWriter.
AbstractWriter(Writer, Document, int, int) - Constructor for class javax.swing.text.AbstractWriter
Creates a new AbstractWriter.
AbstractWriter(Writer, Element) - Constructor for class javax.swing.text.AbstractWriter
Creates a new AbstractWriter.
AbstractWriter(Writer, Element, int, int) - Constructor for class javax.swing.text.AbstractWriter
Creates a new AbstractWriter.
ACCELERATOR_KEY - Static variable in interface javax.swing.Action
The key used for storing a KeyStroke to be used as the accelerator for the action.
acceleratorFont - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorForeground - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorSelectionForeground - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies whether a the AcceptAllFileFilter is used or not.
accept() - Method in class java.net.ServerSocket
Listens for a connection to be made to this socket and accepts it.
accept(File) - Method in interface java.io.FileFilter
Tests whether or not the specified abstract pathname should be included in a pathname list.
accept(File) - Method in class javax.swing.JFileChooser
Returns true if the file should be displayed.
accept(File) - Method in class javax.swing.filechooser.FileFilter
Whether the given file is accepted by this filter.
accept(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter
accept(File, String) - Method in interface java.io.FilenameFilter
Tests if a specified file should be included in a file list.
accept(SocketImpl) - Method in class java.net.SocketImpl
Accepts a connection.
acceptDrag(int) - Method in class java.awt.dnd.DropTargetContext
accept the Drag.
acceptDrag(int) - Method in class java.awt.dnd.DropTargetDragEvent
Accept the drag This method should be called from a DropTargetListeners dragEnter(), dragOver() and dragActionChanged() methods if the implementation wishes to accept an operation from the srcActions other than the one selected by the user as represented by the dropAction.
acceptDrop(int) - Method in class java.awt.dnd.DropTargetContext
called to signal that the drop is acceptable using the specified operation.
acceptDrop(int) - Method in class java.awt.dnd.DropTargetDropEvent
accept the drop, using the specified action.
acceptsURL(String) - Method in interface java.sql.Driver
Returns true if the driver thinks that it can open a connection to the given URL.
access - Variable in class org.omg.CORBA.ValueMember
The type of access (public, private) for the value member described by this ValueMember object.
AccessControlContext - class java.security.AccessControlContext.
An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
AccessControlContext(AccessControlContext, DomainCombiner) - Constructor for class java.security.AccessControlContext
Create a new AccessControlContext with the given AccessControlContext and DomainCombiner.
AccessControlContext(ProtectionDomain[]) - Constructor for class java.security.AccessControlContext
Create an AccessControlContext with the given set of ProtectionDomains.
AccessControlException - exception java.security.AccessControlException.
This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
AccessControlException(String) - Constructor for class java.security.AccessControlException
Constructs an AccessControlException with the specified, detailed message.
AccessControlException(String, Permission) - Constructor for class java.security.AccessControlException
Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.
AccessController - class java.security.AccessController.
The AccessController class is used for three purposes: to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,
AccessException - exception java.rmi.AccessException.
An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
AccessException(String) - Constructor for class java.rmi.AccessException
Constructs an AccessException with the specified detail message.
AccessException(String, Exception) - Constructor for class java.rmi.AccessException
Constructs an AccessException with the specified detail message and nested exception.
Accessible - interface javax.accessibility.Accessible.
Interface Accessible is the main interface for the accessibility package.
ACCESSIBLE_ACTION_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the supported set of actions has changed.
ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the active descendant of a component has changed.
ACCESSIBLE_CARET_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleText caret has changed.
ACCESSIBLE_CHILD_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when Accessible children are added/removed from the object.
ACCESSIBLE_DESCRIPTION_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleDescription property has changed.
ACCESSIBLE_NAME_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleName property has changed.
ACCESSIBLE_SELECTION_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleSelection has changed.
ACCESSIBLE_STATE_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleStateSet property has changed.
ACCESSIBLE_TABLE_CAPTION_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the table caption has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table caption and the new value will be an Accessible representing the new table caption.
ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the column description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the column index.
ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the column header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
ACCESSIBLE_TABLE_MODEL_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that table data has changed.
ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the row description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the row index.
ACCESSIBLE_TABLE_ROW_HEADER_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the row header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
ACCESSIBLE_TABLE_SUMMARY_CHANGED - Static variable in class javax.accessibility.AccessibleContext
Constant used to indicate that the table summary has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table summary and the new value will be an Accessible representing the new table summary.
ACCESSIBLE_TEXT_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleText has changed.
ACCESSIBLE_VALUE_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the accessibleValue property has changed.
ACCESSIBLE_VISIBLE_DATA_PROPERTY - Static variable in class javax.accessibility.AccessibleContext
Constant used to determine when the visual appearance of the object has changed.
AccessibleAction - interface javax.accessibility.AccessibleAction.
The AccessibleAction interface should be supported by any object that can perform one or more actions.
accessibleAWTComponentHandler - Variable in class java.awt.Component.AccessibleAWTComponent
accessibleAWTFocusHandler - Variable in class java.awt.Component.AccessibleAWTComponent
AccessibleBundle - class javax.accessibility.AccessibleBundle.
Base class used to maintain a strongly typed enumeration.
AccessibleBundle() - Constructor for class javax.accessibility.AccessibleBundle
AccessibleComponent - interface javax.accessibility.AccessibleComponent.
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
accessibleContainerHandler - Variable in class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler - Variable in class javax.swing.JComponent.AccessibleJComponent
accessibleContext - Variable in class javax.swing.JComponent
The AccessibleContext associated with this JComponent.
accessibleContext - Variable in class javax.swing.JColorChooser
accessibleContext - Variable in class javax.swing.JWindow
The accessible context property.
accessibleContext - Variable in class javax.swing.JApplet
accessibleContext - Variable in class javax.swing.CellRendererPane
accessibleContext - Variable in class javax.swing.JFrame
The accessible context property.
accessibleContext - Variable in class javax.swing.JFileChooser
accessibleContext - Variable in class javax.swing.Box
The currently set AccessibleContext object.
accessibleContext - Variable in class javax.swing.Box.Filler
The currently set AccessibleContext object.
accessibleContext - Variable in class javax.swing.JDialog
AccessibleContext - class javax.accessibility.AccessibleContext.
AccessibleContext represents the minimum information all accessible objects return.
AccessibleContext() - Constructor for class javax.accessibility.AccessibleContext
accessibleDescription - Variable in class javax.accessibility.AccessibleContext
A localized String containing the description of the object.
accessibleFocusHandler - Variable in class javax.swing.JComponent.AccessibleJComponent
AccessibleHyperlink - class javax.accessibility.AccessibleHyperlink.
Encapsulation of a link, or set of links (e.g.
AccessibleHyperlink() - Constructor for class javax.accessibility.AccessibleHyperlink
AccessibleHypertext - interface javax.accessibility.AccessibleHypertext.
The AccessibleHypertext class is the base class for all classes that present hypertext information on the display.
AccessibleIcon - interface javax.accessibility.AccessibleIcon.
The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons).
accessibleName - Variable in class javax.accessibility.AccessibleContext
A localized String containing the name of the object.
AccessibleObject - class java.lang.reflect.AccessibleObject.
The AccessibleObject class is the base class for Field, Method and Constructor objects.
AccessibleObject() - Constructor for class java.lang.reflect.AccessibleObject
Constructor: only used by the Java Virtual Machine.
accessibleParent - Variable in class javax.accessibility.AccessibleContext
The accessible parent of this object.
AccessibleRelation - class javax.accessibility.AccessibleRelation.
Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
AccessibleRelation(String) - Constructor for class javax.accessibility.AccessibleRelation
Create a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String, Object) - Constructor for class javax.accessibility.AccessibleRelation
Creates a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String, Object[]) - Constructor for class javax.accessibility.AccessibleRelation
Creates a new AccessibleRelation using the given locale independent key.
AccessibleRelationSet - class javax.accessibility.AccessibleRelationSet.
Class AccessibleRelationSet determines a component's relation set.
AccessibleRelationSet() - Constructor for class javax.accessibility.AccessibleRelationSet
Creates a new empty relation set.
AccessibleRelationSet(AccessibleRelation[]) - Constructor for class javax.accessibility.AccessibleRelationSet
Creates a new relation with the initial set of relations contained in the array of relations passed in.
AccessibleResourceBundle - class javax.accessibility.AccessibleResourceBundle.
Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.
AccessibleResourceBundle() - Constructor for class javax.accessibility.AccessibleResourceBundle
Deprecated.
AccessibleRole - class javax.accessibility.AccessibleRole.
Class AccessibleRole determines the role of a component.
AccessibleRole(String) - Constructor for class javax.accessibility.AccessibleRole
Creates a new AccessibleRole using the given locale independent key.
AccessibleSelection - interface javax.accessibility.AccessibleSelection.
This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleState - class javax.accessibility.AccessibleState.
Class AccessibleState describes a component's particular state.
AccessibleState(String) - Constructor for class javax.accessibility.AccessibleState
Creates a new AccessibleState using the given locale independent key.
AccessibleStateSet - class javax.accessibility.AccessibleStateSet.
Class AccessibleStateSet determines a component's state set.
AccessibleStateSet() - Constructor for class javax.accessibility.AccessibleStateSet
Creates a new empty state set.
AccessibleStateSet(AccessibleState[]) - Constructor for class javax.accessibility.AccessibleStateSet
Creates a new state with the initial set of states contained in the array of states passed in.
AccessibleTable - interface javax.accessibility.AccessibleTable.
Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.
AccessibleTableModelChange - interface javax.accessibility.AccessibleTableModelChange.
The AccessibleTableModelChange interface describes a change to the table model.
AccessibleText - interface javax.accessibility.AccessibleText.
The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue - interface javax.accessibility.AccessibleValue.
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).
ACCESSORY_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Says that a different accessory component is in use (for example, to preview files).
Acl - interface java.security.acl.Acl.
Interface representing an Access Control List (ACL).
AclEntry - interface java.security.acl.AclEntry.
This is the interface used for representing one entry in an Access Control List (ACL).
AclNotFoundException - exception java.security.acl.AclNotFoundException.
This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
AclNotFoundException() - Constructor for class java.security.acl.AclNotFoundException
Constructs an AclNotFoundException.
acos(double) - Static method in class java.lang.StrictMath
Returns the arc cosine of an angle, in the range of 0.0 through pi.
acos(double) - Static method in class java.lang.Math
Returns the arc cosine of an angle, in the range of 0.0 through pi.
Action - interface javax.swing.Action.
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
ACTION - Static variable in class javax.swing.text.html.HTML.Attribute
ACTION_COMMAND_KEY - Static variable in interface javax.swing.Action
The key used to determine the command string for the ActionEvent that will be created when an Action is going to be notified as the result of residing in a Keymap associated with a JComponent.
ACTION_COPY - Static variable in class java.awt.dnd.DnDConstants
An int representing a "copy" action.
ACTION_COPY_OR_MOVE - Static variable in class java.awt.dnd.DnDConstants
An int representing a "copy" or "move" action.
ACTION_EVENT - Static variable in class java.awt.Event
This event indicates that the user wants some action to occur.
ACTION_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting action events.
ACTION_FIRST - Static variable in class java.awt.event.ActionEvent
The first number in the range of ids used for action events.
ACTION_LAST - Static variable in class java.awt.event.ActionEvent
The last number in the range of ids used for action events.
ACTION_LINK - Static variable in class java.awt.dnd.DnDConstants
An int representing a "link" action.
ACTION_MOVE - Static variable in class java.awt.dnd.DnDConstants
An int representing a "move" action.
ACTION_NONE - Static variable in class java.awt.dnd.DnDConstants
An int representing no action.
ACTION_PERFORMED - Static variable in class java.awt.event.ActionEvent
This event id indicates that a meaningful action occured.
ACTION_REFERENCE - Static variable in class java.awt.dnd.DnDConstants
An int representing a "reference" action (synonym for ACTION_LINK).
action(Event, Object) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
actionCommand - Variable in class javax.swing.JComboBox
actionCommand - Variable in class javax.swing.DefaultButtonModel
ActionEvent - class java.awt.event.ActionEvent.
A semantic event which indicates that a component-defined action occured.
ActionEvent(Object, int, String) - Constructor for class java.awt.event.ActionEvent
Constructs an ActionEvent object.
ActionEvent(Object, int, String, int) - Constructor for class java.awt.event.ActionEvent
Constructs an ActionEvent object with modifier keys.
actionListener - Variable in class javax.swing.AbstractButton
The button model's ActionListener.
ActionListener - interface java.awt.event.ActionListener.
The listener interface for receiving action events.
ActionMap - class javax.swing.ActionMap.
ActionMap provides mappings from Objects (called keys or Action names) to Actions.
ActionMap() - Constructor for class javax.swing.ActionMap
Creates an ActionMap with no parent and no mappings.
ActionMapUIResource - class javax.swing.plaf.ActionMapUIResource.
A subclass of javax.swing.ActionMap that implements UIResource.
ActionMapUIResource() - Constructor for class javax.swing.plaf.ActionMapUIResource
actionName - Variable in class javax.swing.text.JTextComponent.KeyBinding
The name of the action for the key.
actionPerformed(ActionEvent) - Method in class java.awt.AWTEventMulticaster
Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
actionPerformed(ActionEvent) - Method in class java.awt.List.AccessibleAWTList
actionPerformed(ActionEvent) - Method in class java.awt.dnd.DropTarget.DropTargetAutoScroller
cause autoscroll to occur
actionPerformed(ActionEvent) - Method in interface java.awt.event.ActionListener
Invoked when an action occurs.
actionPerformed(ActionEvent) - Method in class javax.swing.ToolTipManager.insideTimerAction
actionPerformed(ActionEvent) - Method in class javax.swing.ToolTipManager.outsideTimerAction
actionPerformed(ActionEvent) - Method in class javax.swing.ToolTipManager.stillInsideTimerAction
actionPerformed(ActionEvent) - Method in class javax.swing.DefaultCellEditor.EditorDelegate
actionPerformed(ActionEvent) - Method in class javax.swing.JComboBox
This method is public as an implementation side effect.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.InsertContentAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.InsertBreakAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.InsertTabAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.CutAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.CopyAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.PasteAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.DefaultEditorKit.BeepAction
The operation to perform when this action is triggered.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.FontFamilyAction
Sets the font family.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.FontSizeAction
Sets the font size.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.ForegroundAction
Sets the foreground color.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.AlignmentAction
Sets the alignment.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.BoldAction
Toggles the bold attribute.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.ItalicAction
Toggles the italic attribute.
actionPerformed(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.UnderlineAction
Toggles the Underline attribute.
actionPerformed(ActionEvent) - Method in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Inserts the HTML into the document.
actionPerformed(ActionEvent) - Method in class javax.swing.text.html.FormView
Responsible for processeing the ActionEvent.
actionPerformed(ActionEvent) - Method in class javax.swing.tree.DefaultTreeCellEditor
Messaged when the timer fires, this will start the editing session.
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
Public as a result of Timer.
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.ScrollListener
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.ActionScroller
actionPerformed(ActionEvent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction
Activatable - class java.rmi.activation.Activatable.
The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
Activatable(ActivationID, int) - Constructor for class java.rmi.activation.Activatable
Constructor used to activate/export the object on a specified port.
Activatable(ActivationID, int, RMIClientSocketFactory, RMIServerSocketFactory) - Constructor for class java.rmi.activation.Activatable
Constructor used to activate/export the object on a specified port.
Activatable(String, MarshalledObject, boolean, int) - Constructor for class java.rmi.activation.Activatable
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(String, MarshalledObject, boolean, int, RMIClientSocketFactory, RMIServerSocketFactory) - Constructor for class java.rmi.activation.Activatable
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
activate() - Method in interface java.awt.im.spi.InputMethod
Activates the input method for immediate input processing.
activate(ActivationID, boolean) - Method in interface java.rmi.activation.Activator
Activate the object associated with the activation identifier, id.
activate(Applet) - Method in interface java.beans.AppletInitializer
Activate, and/or mark Applet active.
activate(boolean) - Method in class java.rmi.activation.ActivationID
Activate the object for this id.
ACTIVATED - Static variable in class javax.swing.event.HyperlinkEvent.EventType
Activated type.
ActivateFailedException - exception java.rmi.activation.ActivateFailedException.
This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
ActivateFailedException(String) - Constructor for class java.rmi.activation.ActivateFailedException
Constructs an ActivateFailedException with the specified detail message.
ActivateFailedException(String, Exception) - Constructor for class java.rmi.activation.ActivateFailedException
Constructs an ActivateFailedException with the specified detail message and nested exception.
activateFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, indicate that this frame has focus.
activateFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
This will activate f moving it to the front.
activateFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the frame becomes selected.
activateLink(int, JEditorPane) - Method in class javax.swing.text.html.HTMLEditorKit.LinkController
Calls linkActivated on the associated JEditorPane if the given position represents a link.
ActivationDesc - class java.rmi.activation.ActivationDesc.
An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
ActivationDesc(ActivationGroupID, String, String, MarshalledObject) - Constructor for class java.rmi.activation.ActivationDesc
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID, String, String, MarshalledObject, boolean) - Constructor for class java.rmi.activation.ActivationDesc
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String, String, MarshalledObject) - Constructor for class java.rmi.activation.ActivationDesc
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String, String, MarshalledObject, boolean) - Constructor for class java.rmi.activation.ActivationDesc
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationException - exception java.rmi.activation.ActivationException.
General exception used by the activation interfaces.
ActivationException() - Constructor for class java.rmi.activation.ActivationException
Constructs an ActivationException with no specified detail message.
ActivationException(String) - Constructor for class java.rmi.activation.ActivationException
Constructs an ActivationException with detail message, s.
ActivationException(String, Throwable) - Constructor for class java.rmi.activation.ActivationException
Constructs an ActivationException with detail message, s, and detail exception ex.
ActivationGroup - class java.rmi.activation.ActivationGroup.
An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
ActivationGroup(ActivationGroupID) - Constructor for class java.rmi.activation.ActivationGroup
Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.
ActivationGroupDesc - class java.rmi.activation.ActivationGroupDesc.
An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
ActivationGroupDesc.CommandEnvironment - class java.rmi.activation.ActivationGroupDesc.CommandEnvironment.
Startup options for ActivationGroup implementations.
ActivationGroupDesc.CommandEnvironment(String, String[]) - Constructor for class java.rmi.activation.ActivationGroupDesc.CommandEnvironment
Create a CommandEnvironment with all the necessary information.
ActivationGroupDesc(Properties, ActivationGroupDesc.CommandEnvironment) - Constructor for class java.rmi.activation.ActivationGroupDesc
Constructs a group descriptor that uses the system defaults for group implementation and code location.
ActivationGroupDesc(String, String, MarshalledObject, Properties, ActivationGroupDesc.CommandEnvironment) - Constructor for class java.rmi.activation.ActivationGroupDesc
Specifies an alternate group implementation and execution environment to be used for the group.
ActivationGroupID - class java.rmi.activation.ActivationGroupID.
The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
ActivationGroupID(ActivationSystem) - Constructor for class java.rmi.activation.ActivationGroupID
Constructs a unique group id.
ActivationID - class java.rmi.activation.ActivationID.
Activation makes use of special identifiers to denote remote objects that can be activated over time.
ActivationID(Activator) - Constructor for class java.rmi.activation.ActivationID
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier.
ActivationInstantiator - interface java.rmi.activation.ActivationInstantiator.
An ActivationInstantiator is responsible for creating instances of "activatable" objects.
ActivationMonitor - interface java.rmi.activation.ActivationMonitor.
An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
ActivationSystem - interface java.rmi.activation.ActivationSystem.
The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
Activator - interface java.rmi.activation.Activator.
The Activator facilitates remote object activation.
ACTIVATOR_ID - Static variable in class java.rmi.server.ObjID
well-known id for the activator.
active - Variable in class javax.sound.midi.VoiceStatus
Indicates whether the voice is currently processing a MIDI note.
ACTIVE - Static variable in class javax.accessibility.AccessibleState
Indicates a window is currently the active window.
ACTIVE_CAPTION - Static variable in class java.awt.SystemColor
The array index for the active caption background color.
ACTIVE_CAPTION_BORDER - Static variable in class java.awt.SystemColor
The array index for the active caption border color.
ACTIVE_CAPTION_TEXT - Static variable in class java.awt.SystemColor
The array index for the action caption text color.
ACTIVE_SENSING - Static variable in class javax.sound.midi.ShortMessage
Status byte for Active Sensing message (0xFE, or 254).
activeCaption - Static variable in class java.awt.SystemColor
The background color for captions in window borders.
activeCaptionBorder - Static variable in class java.awt.SystemColor
The border color for captions in window borders.
activeCaptionText - Static variable in class java.awt.SystemColor
The text color for captions in window borders.
activeCount() - Method in class java.lang.ThreadGroup
Returns an estimate of the number of active threads in this thread group.
activeCount() - Static method in class java.lang.Thread
Returns the current number of active threads in this thread's thread group.
ActiveEvent - interface java.awt.ActiveEvent.
An interface for events that know how dispatch themselves.
activeGroup(ActivationGroupID, ActivationInstantiator, long) - Method in interface java.rmi.activation.ActivationSystem
Callback to inform activation system that group is now active.
activeGroupCount() - Method in class java.lang.ThreadGroup
Returns an estimate of the number of active groups in this thread group.
activeObject(ActivationID, MarshalledObject) - Method in class java.rmi.activation.ActivationGroup
This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
activeObject(ActivationID, MarshalledObject) - Method in interface java.rmi.activation.ActivationMonitor
Informs that an object is now active.
activeObject(ActivationID, Remote) - Method in class java.rmi.activation.ActivationGroup
The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
AD - Static variable in class java.util.GregorianCalendar
Value of the ERA field indicating the common era (Anno Domini), also known as CE.
ADD_ATTRIBUTE - Static variable in interface javax.naming.directory.DirContext
This constant specifies to add an attribute with the specified values.
add_in_arg() - Method in class org.omg.CORBA.Request
Creates an input argument and adds it to this Request object.
add_inout_arg() - Method in class org.omg.CORBA.Request
Adds an input/output argument to this Request object.
add_item(String, int) - Method in class org.omg.CORBA.NVList
Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
add_named_in_arg(String) - Method in class org.omg.CORBA.Request
Creates an input argument with the given name and adds it to this Request object.
add_named_inout_arg(String) - Method in class org.omg.CORBA.Request
Adds an input/output argument with the given name to this Request object.
add_named_out_arg(String) - Method in class org.omg.CORBA.Request
Adds an output argument with the given name to this Request object.
add_out_arg() - Method in class org.omg.CORBA.Request
Adds an output argument to this Request object.
ADD_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The SetOverrideType constant for the enum value ADD_OVERRIDE.
add_value(String, Any, int) - Method in class org.omg.CORBA.NVList
Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
add(AbstractButton) - Method in class javax.swing.ButtonGroup
Adds the button to the group.
add(AccessibleRelation) - Method in class javax.accessibility.AccessibleRelationSet
Adds a new relation to the current relation set if it is not already present.
add(AccessibleState) - Method in class javax.accessibility.AccessibleStateSet
Adds a new state to the current state set if it is not already present.
add(Action) - Method in class javax.swing.JMenu
Creates a new menu item attached to the specified Action object and appends it to the end of this menu.
add(Action) - Method in class javax.swing.JPopupMenu
Appends a new menu item to the end of the menu which dispatches the specified Action object.
add(Action) - Method in class javax.swing.JToolBar
Adds a new JButton which dispatches the action.
add(ActionListener, ActionListener) - Static method in class java.awt.AWTEventMulticaster
Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
add(AdjustmentListener, AdjustmentListener) - Static method in class java.awt.AWTEventMulticaster
Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
add(Area) - Method in class java.awt.geom.Area
Adds the shape of the specified Area to the shape of this Area.
add(BigDecimal) - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (this + val), and whose scale is max(this.scale(), val.scale()).
add(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this + val).
add(byte) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Byte to the list of parameters.
add(char) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Character to the list of parameters.
add(Class, EventListener) - Method in class javax.swing.event.EventListenerList
Adds the listener as a listener of the specified type.
add(Component) - Method in class java.awt.Container
Adds the specified component to the end of this container.
add(Component) - Method in class javax.swing.JTabbedPane
Adds a component with a tab title defaulting to the name of the component.
add(Component) - Method in class javax.swing.JMenu
Appends a component to the end of this menu.
add(Component, int) - Method in class java.awt.Container
Adds the specified component to this container at the given position.
add(Component, int) - Method in class javax.swing.JTabbedPane
Adds a component at the specified tab index with a tab title defaulting to the name of the component.
add(Component, int) - Method in class javax.swing.JMenu
Adds the specified component to this container at the given position.
add(ComponentListener, ComponentListener) - Static method in class java.awt.AWTEventMulticaster
Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
add(Component, Object) - Method in class java.awt.Container
Adds the specified component to the end of this container.
add(Component, Object) - Method in class javax.swing.JTabbedPane
Adds a component to the tabbed pane.
add(Component, Object, int) - Method in class java.awt.Container
Adds the specified component to this container with the specified constraints at the specified index.
add(Component, Object, int) - Method in class javax.swing.JTabbedPane
Adds a component at the specified tab index.
add(ContainerListener, ContainerListener) - Static method in class java.awt.AWTEventMulticaster
Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
add(double) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Double to the list of parameters.
add(double, double) - Method in class java.awt.geom.Rectangle2D
Adds a point, specified by the double precision arguments newx and newy, to this Rectangle2D.
add(float) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Float to the list of parameters.
add(FocusListener, FocusListener) - Static method in class java.awt.AWTEventMulticaster
Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
add(HierarchyBoundsListener, HierarchyBoundsListener) - Static method in class java.awt.AWTEventMulticaster
Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
add(HierarchyListener, HierarchyListener) - Static method in class java.awt.AWTEventMulticaster
Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
add(InputMethodListener, InputMethodListener) - Static method in class java.awt.AWTEventMulticaster
Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
add(int) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Integer to the list of parameters.
add(int) - Method in class org.omg.CORBA.NVList
Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
add(int, int) - Method in class java.awt.Rectangle
Adds a point, specified by the integer arguments newx and newy, to this Rectangle.
add(int, int) - Method in class java.util.Calendar
Date Arithmetic function.
add(int, int) - Method in class java.util.GregorianCalendar
Overrides Calendar Date Arithmetic function.
add(int, Object) - Method in class java.util.AbstractList
Inserts the specified element at the specified position in this list (optional operation).
add(int, Object) - Method in class java.util.Vector
Inserts the specified element at the specified position in this Vector.
add(int, Object) - Method in class java.util.AbstractSequentialList
Inserts the specified element at the specified position in this list.
add(int, Object) - Method in class java.util.LinkedList
Inserts the specified element at the specified position in this list.
add(int, Object) - Method in interface java.util.List
Inserts the specified element at the specified position in this list (optional operation).
add(int, Object) - Method in class java.util.ArrayList
Inserts the specified element at the specified position in this list.
add(int, Object) - Method in class javax.naming.directory.BasicAttribute
add(int, Object) - Method in interface javax.naming.directory.Attribute
Adds an attribute value to the ordered list of attribute values.
add(int, Object) - Method in class javax.swing.DefaultListModel
Inserts the specified element at the specified position in this list.
add(int, RefAddr) - Method in class javax.naming.Reference
Adds an address to the list of addresses at index posn.
add(int, String) - Method in interface javax.naming.Name
Adds a single component at a specified position within this name.
add(int, String) - Method in class javax.naming.CompoundName
Adds a single component at a specified position within this compound name.
add(int, String) - Method in class javax.naming.CompositeName
Adds a single component at a specified position within this composite name.
add(ItemListener, ItemListener) - Static method in class java.awt.AWTEventMulticaster
Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
add(JMenu) - Method in class javax.swing.JMenuBar
Appends the specified menu to the end of the menu bar.
add(JMenuItem) - Method in class javax.swing.JMenu
Appends a menu item to the end of this menu.
add(JMenuItem) - Method in class javax.swing.JPopupMenu
Appends the specified menu item to the end of this menu.
add(KeyListener, KeyListener) - Static method in class java.awt.AWTEventMulticaster
Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
add(long) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Long to the list of parameters.
add(Menu) - Method in class java.awt.MenuBar
Adds the specified menu to the menu bar.
add(MenuItem) - Method in class java.awt.Menu
Adds the specified menu item to this menu.
add(MidiEvent) - Method in class javax.sound.midi.Track
Adds a new event to the track.
add(MouseListener, MouseListener) - Static method in class java.awt.AWTEventMulticaster
Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
add(MouseMotionListener, MouseMotionListener) - Static method in class java.awt.AWTEventMulticaster
Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
add(MutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
add(Object) - Method in class java.awt.image.renderable.ParameterBlock
Adds an object to the list of parameters.
add(Object) - Method in class java.beans.beancontext.BeanContextSupport
Adds/nests a child within this BeanContext.
add(Object) - Method in class java.util.AbstractCollection
Ensures that this collection contains the specified element (optional operation).
add(Object) - Method in class java.util.TreeSet
Adds the specified element to this set if it is not already present.
add(Object) - Method in class java.util.AbstractList
Appends the specified element to the end of this List (optional operation).
add(Object) - Method in class java.util.Vector
Appends the specified element to the end of this Vector.
add(Object) - Method in interface java.util.Collection
Ensures that this collection contains the specified element (optional operation).
add(Object) - Method in interface java.util.ListIterator
Inserts the specified element into the list (optional operation).
add(Object) - Method in class java.util.HashSet
Adds the specified element to this set if it is not already present.
add(Object) - Method in interface java.util.Set
Adds the specified element to this set if it is not already present (optional operation).
add(Object) - Method in class java.util.LinkedList
Appends the specified element to the end of this list.
add(Object) - Method in interface java.util.List
Appends the specified element to the end of this list (optional operation).
add(Object) - Method in class java.util.ArrayList
Appends the specified element to the end of this list.
add(Object) - Method in class javax.naming.directory.BasicAttribute
Adds a new value to this attribute.
add(Object) - Method in interface javax.naming.directory.Attribute
Adds a new value to the attribute.
add(Permission) - Method in class java.security.PermissionCollection
Adds a permission object to the current collection of permission objects.
add(Permission) - Method in class java.security.Permissions
Adds a permission object to the PermissionCollection for the class the permission belongs to.
add(Point) - Method in class java.awt.Rectangle
Adds the specified Point to this Rectangle.
add(Point2D) - Method in class java.awt.geom.Rectangle2D
Adds the Point2D object pt to this Rectangle2D.
add(PopupMenu) - Method in class java.awt.Component
Adds the specified popup menu to the component.
add(Rectangle) - Method in class java.awt.Rectangle
Adds a Rectangle to this Rectangle.
add(Rectangle2D) - Method in class java.awt.geom.Rectangle2D
Adds a Rectangle2D object to this Rectangle2D.
add(RefAddr) - Method in class javax.naming.Reference
Adds an address to the end of the list of addresses.
add(RenderingHints) - Method in class java.awt.RenderingHints
Adds all of the keys and corresponding values from the specified RenderingHints object to this RenderingHints object.
add(short) - Method in class java.awt.image.renderable.ParameterBlock
Adds a Short to the list of parameters.
add(String) - Method in class java.awt.Menu
Adds an item with the specified label to this menu.
add(String) - Method in class java.awt.List
Adds the specified item to the end of scrolling list.
add(String) - Method in class java.awt.Choice
Adds an item to this Choice menu.
add(String) - Method in interface javax.naming.Name
Adds a single component to the end of this name.
add(String) - Method in class javax.naming.CompoundName
Adds a single component to the end of this compound name.
add(String) - Method in class javax.naming.CompositeName
Adds a single component to the end of this composite name.
add(String) - Method in class javax.swing.JMenu
Creates a new menu item with the specified text and appends it to the end of this menu.
add(String) - Method in class javax.swing.JPopupMenu
Creates a new menu item with the specified text and appends it to the end of this menu.
add(String) - Method in class org.omg.CORBA.ContextList
Adds a String object to this ContextList object.
add(String, Component) - Method in class java.awt.Container
Adds the specified component to this container.
add(String, Component) - Method in class javax.swing.JTabbedPane
Adds a component with the specified tab title.
add(String, int) - Method in class java.awt.List
Adds the specified item to the the scrolling list at the position indicated by the index.
add(TextListener, TextListener) - Static method in class java.awt.AWTEventMulticaster
add(TypeCode) - Method in class org.omg.CORBA.ExceptionList
Adds a TypeCode object describing an exception to this ExceptionList object.
add(WindowListener, WindowListener) - Static method in class java.awt.AWTEventMulticaster
Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
addAccessibleSelection(int) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Adds the specified Accessible child of the object to the object's selection.
addAccessibleSelection(int) - Method in class java.awt.List.AccessibleAWTList
Adds the specified selected item in the object to the object's selection.
addAccessibleSelection(int) - Method in interface javax.accessibility.AccessibleSelection
Adds the specified Accessible child of the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
addAccessibleSelection(int) - Method in class javax.swing.JMenu.AccessibleJMenu
Selects the ith menu in the menu.
addAccessibleSelection(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Adds the specified Accessible child of the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JList.AccessibleJList
Adds the specified selected item in the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree
Adds the specified selected item in the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Adds the specified selected item in the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JTable.AccessibleJTable
Adds the specified Accessible child of the object to the object's selection.
addAccessibleSelection(int) - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Selects the nth menu in the menu bar, forcing it to pop up.
addActionForKeyStroke(KeyStroke, Action) - Method in interface javax.swing.text.Keymap
Adds a binding to the keymap.
addActionListener(ActionListener) - Method in class java.awt.MenuItem
Adds the specified action listener to receive action events from this menu item.
addActionListener(ActionListener) - Method in class java.awt.List
Adds the specified action listener to receive action events from this list.
addActionListener(ActionListener) - Method in class java.awt.TextField
Adds the specified action listener to receive action events from this text field.
addActionListener(ActionListener) - Method in class java.awt.Button
Adds the specified action listener to receive action events from this button.
addActionListener(ActionListener) - Method in class javax.swing.AbstractButton
Adds an ActionListener to the button.
addActionListener(ActionListener) - Method in class javax.swing.JTextField
Adds the specified action listener to receive action events from this textfield.
addActionListener(ActionListener) - Method in interface javax.swing.ButtonModel
Adds an ActionListener to the button.
addActionListener(ActionListener) - Method in class javax.swing.JComboBox
Adds an ActionListener.
addActionListener(ActionListener) - Method in class javax.swing.Timer
Adds an actionListener to the Timer
addActionListener(ActionListener) - Method in class javax.swing.DefaultButtonModel
Adds an ActionListener to the button.
addActionListener(ActionListener) - Method in interface javax.swing.ComboBoxEditor
Add an ActionListener.
addActionListener(ActionListener) - Method in class javax.swing.JFileChooser
Adds an ActionListener to the button.
addActionListener(ActionListener) - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
addAdjustmentListener(AdjustmentListener) - Method in class java.awt.Scrollbar
Adds the specified adjustment listener to receive instances of AdjustmentEvent from this scroll bar.
addAdjustmentListener(AdjustmentListener) - Method in interface java.awt.Adjustable
Add a listener to recieve adjustment events when the value of the adjustable object changes.
addAdjustmentListener(AdjustmentListener) - Method in class javax.swing.JScrollBar
Adds an AdjustmentListener.
addAll(AccessibleRelation[]) - Method in class javax.accessibility.AccessibleRelationSet
Adds all of the relations to the existing relation set.
addAll(AccessibleState[]) - Method in class javax.accessibility.AccessibleStateSet
Adds all of the states to the existing state set.
addAll(Collection) - Method in class java.beans.beancontext.BeanContextSupport
add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
addAll(Collection) - Method in class java.util.AbstractCollection
Adds all of the elements in the specified collection to this collection (optional operation).
addAll(Collection) - Method in class java.util.TreeSet
Adds all of the elements in the specified collection to this set.
addAll(Collection) - Method in class java.util.Vector
Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator.
addAll(Collection) - Method in interface java.util.Collection
Adds all of the elements in the specified collection to this collection (optional operation).
addAll(Collection) - Method in interface java.util.Set
Adds all of the elements in the specified collection to this set if they're not already present (optional operation).
addAll(Collection) - Method in class java.util.LinkedList
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
addAll(Collection) - Method in interface java.util.List
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).
addAll(Collection) - Method in class java.util.ArrayList
Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator.
addAll(int, Collection) - Method in class java.util.AbstractList
Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
addAll(int, Collection) - Method in class java.util.Vector
Inserts all of the elements in in the specified Collection into this Vector at the specified position.
addAll(int, Collection) - Method in class java.util.AbstractSequentialList
Inserts all of the elements in in the specified collection into this list at the specified position.
addAll(int, Collection) - Method in class java.util.LinkedList
Inserts all of the elements in the specified collection into this list, starting at the specified position.
addAll(int, Collection) - Method in interface java.util.List
Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
addAll(int, Collection) - Method in class java.util.ArrayList
Inserts all of the elements in the specified Collection into this list, starting at the specified position.
addAll(int, Name) - Method in interface javax.naming.Name
Adds the components of a name -- in order -- at a specified position within this name.
addAll(int, Name) - Method in class javax.naming.CompoundName
Adds the components of a compound name -- in order -- at a specified position within this compound name.
addAll(int, Name) - Method in class javax.naming.CompositeName
Adds the components of a composite name -- in order -- at a specified position within this composite name.
addAll(Name) - Method in interface javax.naming.Name
Adds the components of a name -- in order -- to the end of this name.
addAll(Name) - Method in class javax.naming.CompoundName
Adds the components of a compound name -- in order -- to the end of this compound name.
addAll(Name) - Method in class javax.naming.CompositeName
Adds the components of a composite name -- in order -- to the end of this composite name.
addAncestorListener(AncestorListener) - Method in class javax.swing.JComponent
Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible / invisible.
addAttribute(AttributedCharacterIterator.Attribute, Object) - Method in class java.text.AttributedString
Adds an attribute to the entire string.
addAttribute(AttributedCharacterIterator.Attribute, Object, int, int) - Method in class java.text.AttributedString
Adds an attribute to a subrange of the string.
addAttribute(AttributeSet, Object, Object) - Method in class javax.swing.text.StyleContext
Adds an attribute to the given set, and returns the new representative set.
addAttribute(AttributeSet, Object, Object) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Adds an attribute to the given set, and returns the new representative set.
addAttribute(AttributeSet, Object, Object) - Method in class javax.swing.text.html.StyleSheet
Adds an attribute to the given set, and returns the new representative set.
addAttribute(Object, Object) - Method in class javax.swing.text.SimpleAttributeSet
Adds an attribute to the list.
addAttribute(Object, Object) - Method in class javax.swing.text.StyleContext.NamedStyle
Adds an attribute.
addAttribute(Object, Object) - Method in interface javax.swing.text.MutableAttributeSet
Creates a new attribute set similar to this one except that it contains an attribute with the given name and value.
addAttribute(Object, Object) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Adds an attribute to the element.
addAttributes(AttributeSet) - Method in class javax.swing.text.SimpleAttributeSet
Adds a set of attributes to the list.
addAttributes(AttributeSet) - Method in class javax.swing.text.StyleContext.NamedStyle
Adds a set of attributes to the element.
addAttributes(AttributeSet) - Method in interface javax.swing.text.MutableAttributeSet
Creates a new attribute set similar to this one except that it contains the given attributes and values.
addAttributes(AttributeSet) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Adds a set of attributes to the element.
addAttributes(AttributeSet, AttributeSet) - Method in class javax.swing.text.StyleContext
Adds a set of attributes to the element.
addAttributes(AttributeSet, AttributeSet) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Adds a set of attributes to the element.
addAttributes(AttributeSet, AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Adds a set of attributes to the element.
addAttributes(Map, int, int) - Method in class java.text.AttributedString
Adds a set of attributes to a subrange of the string.
addAuxiliaryLookAndFeel(LookAndFeel) - Static method in class javax.swing.UIManager
Add a LookAndFeel to the list of auxiliary look and feels.
addAWTEventListener(AWTEventListener, long) - Method in class java.awt.Toolkit
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.
addBatch() - Method in interface java.sql.PreparedStatement
Adds a set of parameters to this PreparedStatement object's batch of commands.
addBatch(String) - Method in interface java.sql.Statement
Adds an SQL command to the current batch of commmands for this Statement object.
addBeanContextMembershipListener(BeanContextMembershipListener) - Method in class java.beans.beancontext.BeanContextSupport
Adds a BeanContextMembershipListener
addBeanContextMembershipListener(BeanContextMembershipListener) - Method in interface java.beans.beancontext.BeanContext
Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).
addBeanContextServicesListener(BeanContextServicesListener) - Method in class java.beans.beancontext.BeanContextServicesSupport
add a BeanContextServicesListener
addBeanContextServicesListener(BeanContextServicesListener) - Method in interface java.beans.beancontext.BeanContextServices
Adds a BeanContextServicesListener to this BeanContext
addButtonComponents(Container, Object[], int) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Creates the appropriate object to represent each of the objects in buttons and adds it to container.
addCaretListener(CaretListener) - Method in class javax.swing.text.JTextComponent
Adds a caret listener for notification of any changes to the caret.
addCellEditorListener(CellEditorListener) - Method in interface javax.swing.CellEditor
Add a listener to the list that's notified when the editor starts, stops, or cancels editing.
addCellEditorListener(CellEditorListener) - Method in class javax.swing.AbstractCellEditor
Adds a CellEditorListener to the listener list.
addCellEditorListener(CellEditorListener) - Method in class javax.swing.tree.DefaultTreeCellEditor
Adds the CellEditorListener.
addCertificate(Certificate) - Method in class java.security.Identity
Deprecated. Adds a certificate for this identity.
addChangeListener(ChangeListener) - Method in class javax.swing.DefaultSingleSelectionModel
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in class javax.swing.JViewport
Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.
addChangeListener(ChangeListener) - Method in class javax.swing.JTabbedPane
Adds a ChangeListener to this tabbedpane.
addChangeListener(ChangeListener) - Method in interface javax.swing.SingleSelectionModel
Adds listener as a listener to changes in the model.
addChangeListener(ChangeListener) - Method in class javax.swing.AbstractButton
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in class javax.swing.DefaultBoundedRangeModel
Adds a ChangeListener.
addChangeListener(ChangeListener) - Method in class javax.swing.MenuSelectionManager
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in interface javax.swing.ButtonModel
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in class javax.swing.DefaultButtonModel
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in interface javax.swing.BoundedRangeModel
Adds a ChangeListener to the model's listener list.
addChangeListener(ChangeListener) - Method in class javax.swing.JProgressBar
Adds a ChangeListener to the button.
addChangeListener(ChangeListener) - Method in class javax.swing.JSlider
Adds a ChangeListener to the slider.
addChangeListener(ChangeListener) - Method in class javax.swing.colorchooser.DefaultColorSelectionModel
Adds a ChangeListener to the model.
addChangeListener(ChangeListener) - Method in interface javax.swing.colorchooser.ColorSelectionModel
Adds listener as a listener to changes in the model.
addChangeListener(ChangeListener) - Method in interface javax.swing.text.Style
Adds a listener to track whenever an attribute has been changed.
addChangeListener(ChangeListener) - Method in class javax.swing.text.StyleContext
Adds a listener to track when styles are added or removed.
addChangeListener(ChangeListener) - Method in class javax.swing.text.StyleContext.NamedStyle
Adds a change listener.
addChangeListener(ChangeListener) - Method in class javax.swing.text.DefaultCaret
Adds a listener to track whenever the caret position has been changed.
addChangeListener(ChangeListener) - Method in interface javax.swing.text.Caret
Adds a listener to track whenever the caret position has been changed.
addChoosableFileFilter(FileFilter) - Method in class javax.swing.JFileChooser
Adds a filter to the list of user choosable file filters.
addChooserPanel(AbstractColorChooserPanel) - Method in class javax.swing.JColorChooser
Adds a color chooser panel to the color chooser.
addColumn(Object) - Method in class javax.swing.table.DefaultTableModel
Adds a column to the model.
addColumn(Object, Object[]) - Method in class javax.swing.table.DefaultTableModel
Adds a column to the model.
addColumn(Object, Vector) - Method in class javax.swing.table.DefaultTableModel
Adds a column to the model.
addColumn(TableColumn) - Method in class javax.swing.JTable
Appends aColumn to the end of the array of columns held by this JTable's column model.
addColumn(TableColumn) - Method in class javax.swing.table.DefaultTableColumnModel
Appends aColumn to the end of the tableColumns array.
addColumn(TableColumn) - Method in interface javax.swing.table.TableColumnModel
Appends aColumn to the end of the tableColumns array.
addColumnModelListener(TableColumnModelListener) - Method in class javax.swing.table.DefaultTableColumnModel
Adds a listener for table column model events.
addColumnModelListener(TableColumnModelListener) - Method in interface javax.swing.table.TableColumnModel
Adds a listener for table column model events.
addColumnSelectionInterval(int, int) - Method in class javax.swing.JTable
Adds the columns from index0 to index1, inclusive, to the current selection.
addComponentListener(ComponentListener) - Method in class java.awt.Component
Adds the specified component listener to receive component events from this component.
addConsumer(ImageConsumer) - Method in class java.awt.image.FilteredImageSource
Adds an ImageConsumer to the list of consumers interested in data for this image.
addConsumer(ImageConsumer) - Method in interface java.awt.image.ImageProducer
This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.
addConsumer(ImageConsumer) - Method in class java.awt.image.MemoryImageSource
Adds an ImageConsumer to the list of consumers interested in data for this image.
addConsumer(ImageConsumer) - Method in class java.awt.image.renderable.RenderableImageProducer
Adds an ImageConsumer to the list of consumers interested in data for this image.
addContainerListener(ContainerListener) - Method in class java.awt.Container
Adds the specified container listener to receive container events from this container.
addContent(char[], int, int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds some text with the current character attributes.
addContent(char[], int, int, boolean) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds some text with the current character attributes.
addControlButtons() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
addControllerEventListener(ControllerEventListener, int[]) - Method in interface javax.sound.midi.Sequencer
Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types.
addCSSAttribute(MutableAttributeSet, CSS.Attribute, String) - Method in class javax.swing.text.html.StyleSheet
Adds a CSS attribute to the given set.
addCSSAttributeFromHTML(MutableAttributeSet, CSS.Attribute, String) - Method in class javax.swing.text.html.StyleSheet
Adds a CSS attribute to the given set.
addCustomEntriesToTable(UIDefaults) - Method in class javax.swing.plaf.metal.MetalTheme
addDirtyRegion(JComponent, int, int, int, int) - Method in class javax.swing.RepaintManager
Add a component in the list of components that should be refreshed.
addDocumentListener(DocumentListener) - Method in interface javax.swing.text.Document
Registers the given observer to begin receiving notifications when changes are made to the document.
addDocumentListener(DocumentListener) - Method in class javax.swing.text.AbstractDocument
Adds a document listener for notification of any changes.
addDocumentListener(DocumentListener) - Method in class javax.swing.text.DefaultStyledDocument
Adds a document listener for notification of any changes.
addDragGestureListener(DragGestureListener) - Method in class java.awt.dnd.DragGestureRecognizer
Register a new DragGestureListener.
addDragSourceListener(DragSourceListener) - Method in class java.awt.dnd.DragSourceContext
Add a DragSourceListener to this DragSourceContext if one has not already been added.
addDropTargetListener(DropTargetListener) - Method in class java.awt.dnd.DropTarget
Add a new DropTargetListener (UNICAST SOURCE)
addEdit(UndoableEdit) - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Adds a document edit.
addEdit(UndoableEdit) - Method in class javax.swing.undo.AbstractUndoableEdit
This default implementation returns false.
addEdit(UndoableEdit) - Method in class javax.swing.undo.CompoundEdit
If this edit is inProgress, accepts anEdit and returns true.
addEdit(UndoableEdit) - Method in class javax.swing.undo.UndoManager
If inProgress, inserts anEdit at indexOfNextAdd, and removes any old edits that were at indexOfNextAdd or later.
addEdit(UndoableEdit) - Method in interface javax.swing.undo.UndoableEdit
This UndoableEdit should absorb anEdit if it can.
addEditor() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Adds the editor to the JComboBox.
addElement(Object) - Method in class java.util.Vector
Adds the specified component to the end of this vector, increasing its size by one.
addElement(Object) - Method in class javax.swing.DefaultComboBoxModel
addElement(Object) - Method in class javax.swing.DefaultListModel
Adds the specified component to the end of this list.
addElement(Object) - Method in interface javax.swing.MutableComboBoxModel
Adds an item to the end of the model.
addEntry(Principal, AclEntry) - Method in interface java.security.acl.Acl
Adds an ACL entry to this ACL.
addFirst(Object) - Method in class java.util.LinkedList
Inserts the given element at the beginning of this list.
addFocusListener(FocusListener) - Method in class java.awt.Component
Adds the specified focus listener to receive focus events from this component when this component gains input focus.
addFocusListener(FocusListener) - Method in class java.awt.Component.AccessibleAWTComponent
Adds the specified focus listener to receive focus events from this component.
addFocusListener(FocusListener) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Adds the specified focus listener to receive focus events from this component.
addFocusListener(FocusListener) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Adds the specified focus listener to receive focus events from this component.
addFocusListener(FocusListener) - Method in interface javax.accessibility.AccessibleComponent
Adds the specified focus listener to receive focus events from this component.
addFocusListener(FocusListener) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
addFocusListener(FocusListener) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
addFocusListener(FocusListener) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
addFocusListener(FocusListener) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
addHierarchyBoundsListener(HierarchyBoundsListener) - Method in class java.awt.Component
Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
addHierarchyListener(HierarchyListener) - Method in class java.awt.Component
Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
addHighlight(int, int, Highlighter.HighlightPainter) - Method in interface javax.swing.text.Highlighter
Adds a highlight to the view.
addHighlight(int, int, Highlighter.HighlightPainter) - Method in class javax.swing.text.DefaultHighlighter
Adds a highlight to the view.
addHyperlinkListener(HyperlinkListener) - Method in class javax.swing.JEditorPane
Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.
addIcon(Container) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Creates and adds a JLabel representing the icon returned from getIcon to top.
addIdentity(Identity) - Method in class java.security.IdentityScope
Deprecated. Adds an identity to this identity scope.
addImage(Image, int) - Method in class java.awt.MediaTracker
Adds an image to the list of images being tracked by this media tracker.
addImage(Image, int, int, int) - Method in class java.awt.MediaTracker
Adds a scaled image to the list of images being tracked by this media tracker.
addImpl(Component, Object, int) - Method in class java.awt.Container
Adds the specified component to this container at the specified index.
addImpl(Component, Object, int) - Method in class java.awt.ScrollPane
Adds the specified component to this scroll pane container.
addImpl(Component, Object, int) - Method in class javax.swing.JViewport
Sets the JViewports one lightweight child, which can be null.
addImpl(Component, Object, int) - Method in class javax.swing.JLayeredPane
addImpl(Component, Object, int) - Method in class javax.swing.JWindow
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
addImpl(Component, Object, int) - Method in class javax.swing.JApplet
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
addImpl(Component, Object, int) - Method in class javax.swing.CellRendererPane
If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).<
addImpl(Component, Object, int) - Method in class javax.swing.JInternalFrame
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
addImpl(Component, Object, int) - Method in class javax.swing.JFrame
By default, children may not be added directly to this component, they must be added to its contentPane instead.
addImpl(Component, Object, int) - Method in class javax.swing.JSplitPane
Adds the specified component to this split pane.
addImpl(Component, Object, int) - Method in class javax.swing.JToolBar
If a JButton is being added, it is initially set to be disabled.
addImpl(Component, Object, int) - Method in class javax.swing.JRootPane
Overridden to enforce the position of the glass component as the zero child.
addImpl(Component, Object, int) - Method in class javax.swing.JDialog
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
addInputMethodListener(InputMethodListener) - Method in class java.awt.Component
Adds the specified input method listener to receive input method events from this component.
addInputMethodListener(InputMethodListener) - Method in class javax.swing.text.JTextComponent
addInternal(EventListener, EventListener) - Static method in class java.awt.AWTEventMulticaster
Returns the resulting multicast listener from adding listener-a and listener-b together.
addInternalFrameListener(InternalFrameListener) - Method in class javax.swing.JInternalFrame
Adds the specified internal frame listener to receive internal frame events from this internal frame.
addInvalidComponent(JComponent) - Method in class javax.swing.RepaintManager
Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
addItem(Object) - Method in class javax.swing.JComboBox
Adds an item to the item list.
addItem(String) - Method in class java.awt.List
Deprecated. replaced by add(String).
addItem(String) - Method in class java.awt.Choice
Adds an item to this Choice.
addItem(String, int) - Method in class java.awt.List
Deprecated. replaced by add(String, int).
addItemListener(ItemListener) - Method in class java.awt.Checkbox
Adds the specified item listener to receive item events from this check box.
addItemListener(ItemListener) - Method in class java.awt.List
Adds the specified item listener to receive item events from this list.
addItemListener(ItemListener) - Method in class java.awt.Choice
Adds the specified item listener to receive item events from this Choice menu.
addItemListener(ItemListener) - Method in interface java.awt.ItemSelectable
Add a listener to recieve item events when the state of an item changes.
addItemListener(ItemListener) - Method in class java.awt.CheckboxMenuItem
Adds the specified item listener to receive item events from this check box menu item.
addItemListener(ItemListener) - Method in class javax.swing.AbstractButton
Adds an ItemListener to the checkbox.
addItemListener(ItemListener) - Method in interface javax.swing.ButtonModel
Adds an ItemListener to the button.
addItemListener(ItemListener) - Method in class javax.swing.JComboBox
Adds an ItemListener.
addItemListener(ItemListener) - Method in class javax.swing.DefaultButtonModel
Adds an ItemListener to the button.
AdditionalComments - Static variable in class javax.swing.text.html.HTMLDocument
Document property key value.
addKeyListener(KeyListener) - Method in class java.awt.Component
Adds the specified key listener to receive key events from this component.
addKeymap(String, Keymap) - Static method in class javax.swing.text.JTextComponent
Adds a new keymap into the keymap hierarchy.
addLast(Object) - Method in class java.util.LinkedList
Appends the given element to the end of this list.
addLayoutComponent(Component, Object) - Method in interface java.awt.LayoutManager2
Adds the specified component to the layout, using the specified constraint object.
addLayoutComponent(Component, Object) - Method in class java.awt.CardLayout
Adds the specified component to this card layout's internal table of names.
addLayoutComponent(Component, Object) - Method in class java.awt.BorderLayout
Adds the specified component to the layout, using the specified constraint object.
addLayoutComponent(Component, Object) - Method in class java.awt.GridBagLayout
Adds the specified component to the layout, using the specified constraint object.
addLayoutComponent(Component, Object) - Method in class javax.swing.BoxLayout
Not used by this class.
addLayoutComponent(Component, Object) - Method in class javax.swing.OverlayLayout
Adds the specified component to the layout, using the specified constraint object.
addLayoutComponent(Component, Object) - Method in class javax.swing.JRootPane.RootLayout
addLayoutComponent(Component, Object) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Adds the specified component to the layout, using the specified constraint object.
addLayoutComponent(String, Component) - Method in class java.awt.CardLayout
Deprecated. replaced by addLayoutComponent(Component, Object).
addLayoutComponent(String, Component) - Method in class java.awt.GridLayout
Adds the specified component with the specified name to the layout.
addLayoutComponent(String, Component) - Method in class java.awt.BorderLayout
Deprecated. replaced by addLayoutComponent(Component, Object).
addLayoutComponent(String, Component) - Method in interface java.awt.LayoutManager
Adds the specified component with the specified name to the layout.
addLayoutComponent(String, Component) - Method in class java.awt.GridBagLayout
Adds the specified component with the specified name to the layout.
addLayoutComponent(String, Component) - Method in class java.awt.FlowLayout
Adds the specified component to the layout.
addLayoutComponent(String, Component) - Method in class javax.swing.ViewportLayout
Adds the specified component to the layout.
addLayoutComponent(String, Component) - Method in class javax.swing.ScrollPaneLayout
Adds the specified component to the layout.
addLayoutComponent(String, Component) - Method in class javax.swing.BoxLayout
Not used by this class.
addLayoutComponent(String, Component) - Method in class javax.swing.OverlayLayout
Adds the specified component to the layout.
addLayoutComponent(String, Component) - Method in class javax.swing.JRootPane.RootLayout
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Adds the component at place.
addLayoutComponent(String, Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
addLineListener(LineListener) - Method in interface javax.sound.sampled.Line
Adds a listener to this line.
addListDataListener(ListDataListener) - Method in interface javax.swing.ListModel
Add a listener to the list that's notified each time a change to the data model occurs.
addListDataListener(ListDataListener) - Method in class javax.swing.AbstractListModel
Add a listener to the list that's notified each time a change to the data model occurs.
addListSelectionListener(ListSelectionListener) - Method in class javax.swing.DefaultListSelectionModel
addListSelectionListener(ListSelectionListener) - Method in class javax.swing.JList
Adds a listener to the list that's notified each time a change to the selection occurs.
addListSelectionListener(ListSelectionListener) - Method in interface javax.swing.ListSelectionModel
Add a listener to the list that's notified each time a change to the selection occurs.
addMember(Principal) - Method in interface java.security.acl.Group
Adds the specified member to the group.
addMenuDragMouseListener(MenuDragMouseListener) - Method in class javax.swing.JMenuItem
Adds a MenuDragMouseListener to the menu item
addMenuKeyListener(MenuKeyListener) - Method in class javax.swing.JMenuItem
Adds a MenuKeyListener to the menu item
addMenuListener(MenuListener) - Method in class javax.swing.JMenu
Adds a listener for menu events.
addMessageComponents(Container, GridBagConstraints, Object, int, boolean) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Creates the appropriate object to represent msg and places it into container.
addMetaEventListener(MetaEventListener) - Method in interface javax.sound.midi.Sequencer
Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer.
addMouseListener(MouseListener) - Method in class java.awt.Component
Adds the specified mouse listener to receive mouse events from this component.
addMouseMotionListener(MouseMotionListener) - Method in class java.awt.Component
Adds the specified mouse motion listener to receive mouse motion events from this component.
addNamingListener(Name, int, NamingListener) - Method in interface javax.naming.event.EventContext
Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.
addNamingListener(Name, String, Object[], SearchControls, NamingListener) - Method in interface javax.naming.event.EventDirContext
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
addNamingListener(Name, String, SearchControls, NamingListener) - Method in interface javax.naming.event.EventDirContext
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
addNamingListener(String, int, NamingListener) - Method in interface javax.naming.event.EventContext
Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.
addNamingListener(String, String, Object[], SearchControls, NamingListener) - Method in interface javax.naming.event.EventDirContext
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.
addNamingListener(String, String, SearchControls, NamingListener) - Method in interface javax.naming.event.EventDirContext
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
addNotify() - Method in class java.awt.Component
Makes this Component displayable by connecting it to a native screen resource.
addNotify() - Method in class java.awt.Container
Makes this Container displayable by connecting it to a native screen resource.
addNotify() - Method in class java.awt.Panel
Creates the Panel's peer.
addNotify() - Method in class java.awt.ScrollPane
Creates the scroll pane's peer.
addNotify() - Method in class java.awt.Scrollbar
Creates the Scrollbar's peer.
addNotify() - Method in class java.awt.Canvas
Creates the peer of the canvas.
addNotify() - Method in class java.awt.MenuItem
Creates the menu item's peer.
addNotify() - Method in class java.awt.Menu
Creates the menu's peer.
addNotify() - Method in class java.awt.Checkbox
Creates the peer of the Checkbox.
addNotify() - Method in class java.awt.Window
Makes this Window displayable by creating the connection to its native screen resource.
addNotify() - Method in class java.awt.Dialog
Makes this Dialog displayable by connecting it to a native screen resource.
addNotify() - Method in class java.awt.FileDialog
Creates the file dialog's peer.
addNotify() - Method in class java.awt.MenuBar
Creates the menu bar's peer.
addNotify() - Method in class java.awt.List
Creates the peer for the list.
addNotify() - Method in class java.awt.TextComponent
Makes this Component displayable by connecting it to a native screen resource.
addNotify() - Method in class java.awt.PopupMenu
Creates the popup menu's peer.
addNotify() - Method in class java.awt.Choice
Creates the Choice's peer.
addNotify() - Method in class java.awt.Frame
Makes this Frame displayable by connecting it to a native screen resource.
addNotify() - Method in class java.awt.Label
Creates the peer for this label.
addNotify() - Method in class java.awt.TextField
Creates the TextField's peer.
addNotify() - Method in class java.awt.Button
Creates the peer of the button.
addNotify() - Method in class java.awt.CheckboxMenuItem
Creates the peer of the checkbox item.
addNotify() - Method in class java.awt.TextArea
Creates the TextArea's peer.
addNotify() - Method in class javax.swing.JComponent
Notifies this component that it now has a parent component.
addNotify() - Method in class javax.swing.JTable
Calls the configureEnclosingScrollPane method.
addNotify() - Method in class javax.swing.JMenuBar
Overrides JComponent.addNotify to register this menu bar with the current keyboard manager.
addNotify() - Method in class javax.swing.JRootPane
Register ourselves with the SystemEventQueueUtils as a new root pane.
addNotify() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
addNotify(ComponentPeer) - Method in class java.awt.dnd.DropTarget
Notify the DropTarget that it has been associated with a Component This method is usually called from java.awt.Component.addNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been associated with that Component.
addNotify(DropTargetContextPeer) - Method in class java.awt.dnd.DropTargetContext
Called when associated with the DropTargetContextPeer.
addObserver(Observer) - Method in class java.util.Observable
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
addOwner(Principal, Principal) - Method in interface java.security.acl.Owner
Adds an owner.
addPermission(Permission) - Method in interface java.security.acl.AclEntry
Adds the specified permission to this ACL entry.
addPoint(int, int) - Method in class java.awt.Polygon
Appends the specified coordinates to this Polygon.
addPopupMenuListener(PopupMenuListener) - Method in class javax.swing.JPopupMenu
Adds a PopupMenu listener.
addPropertyChangeListener(PropertyChangeListener) - Method in class java.awt.Component
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class java.awt.Component.AccessibleAWTComponent
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in interface java.beans.PropertyEditor
Register a listener for the PropertyChange event.
addPropertyChangeListener(PropertyChangeListener) - Method in class java.beans.PropertyChangeSupport
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in interface java.beans.Customizer
Register a listener for the PropertyChange event.
addPropertyChangeListener(PropertyChangeListener) - Method in class java.beans.PropertyEditorSupport
Register a listener for the PropertyChange event.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.accessibility.AccessibleContext
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JComponent
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JComponent.AccessibleJComponent
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in interface javax.swing.Action
Adds a PropertyChange listener.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.UIDefaults
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.AbstractAction
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Static method in class javax.swing.UIManager
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.event.SwingPropertyChangeSupport
Add a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.table.TableColumn
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
addPropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(PropertyChangeListener) - Method in interface javax.swing.tree.TreeSelectionModel
Adds a PropertyChangeListener to the listener list.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class java.awt.Component
Add a PropertyChangeListener for a specific property.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class java.awt.Toolkit
add the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class java.beans.PropertyChangeSupport
Add a PropertyChangeListener for a specific property.
addPropertyChangeListener(String, PropertyChangeListener) - Method in interface java.beans.beancontext.BeanContextChild
Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class java.beans.beancontext.BeanContextChildSupport
Adds a property change listener.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class javax.swing.JComponent
Adds a PropertyChangeListener for a specific property.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class javax.swing.event.SwingPropertyChangeSupport
Add a PropertyChangeListener for a specific property.
addProvider(Provider) - Static method in class java.security.Security
Adds a provider to the next position available.
addRenderingHints(Map) - Method in class java.awt.Graphics2D
Sets the values of an arbitrary number of preferences for the rendering algorithms.
address - Variable in class java.net.SocketImpl
The IP address of the remote end of this socket.
ADDRESS - Static variable in class javax.swing.text.html.HTML.Tag
addRow(Object[]) - Method in class javax.swing.table.DefaultTableModel
Adds a row to the end of the model.
addRow(Vector) - Method in class javax.swing.table.DefaultTableModel
Adds a row to the end of the model.
addRowSelectionInterval(int, int) - Method in class javax.swing.JTable
Adds the rows from index0 to index1, inclusive, to the current selection.
addrs - Variable in class javax.naming.Reference
Contains the addresses contained in this Reference.
addrType - Variable in class javax.naming.RefAddr
Contains the type of this address.
addRule(String) - Method in class javax.swing.text.html.StyleSheet
Adds a set of rules to the sheet.
addSelectionInterval(int, int) - Method in class javax.swing.DefaultListSelectionModel
addSelectionInterval(int, int) - Method in class javax.swing.JList
Sets the selection to be the union of the specified interval with current selection.
addSelectionInterval(int, int) - Method in class javax.swing.JTree
Adds the paths between index0 and index1, inclusive, to the selection.
addSelectionInterval(int, int) - Method in interface javax.swing.ListSelectionModel
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive.
addSelectionPath(TreePath) - Method in class javax.swing.JTree
Adds the node identified by the specified TreePath to the current selection.
addSelectionPath(TreePath) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Adds path to the current selection.
addSelectionPath(TreePath) - Method in interface javax.swing.tree.TreeSelectionModel
Adds path to the current selection.
addSelectionPaths(TreePath[]) - Method in class javax.swing.JTree
Adds each path in the array of paths to the current selection.
addSelectionPaths(TreePath[]) - Method in class javax.swing.JTree.EmptySelectionModel
A null implementation that adds nothing.
addSelectionPaths(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Adds paths to the current selection.
addSelectionPaths(TreePath[]) - Method in interface javax.swing.tree.TreeSelectionModel
Adds paths to the current selection.
addSelectionRow(int) - Method in class javax.swing.JTree
Adds the path at the specified row to the current selection.
addSelectionRows(int[]) - Method in class javax.swing.JTree
Adds the paths at each of the specified rows to the current selection.
addSeparator() - Method in class java.awt.Menu
Adds a separator line, or a hypen, to the menu at the current position.
addSeparator() - Method in class javax.swing.JMenu
Appends a new separator to the end of the menu.
addSeparator() - Method in class javax.swing.JPopupMenu
Appends a new separator at the end of the menu.
addSeparator() - Method in class javax.swing.JToolBar
Appends a toolbar separator of default size to the end of the toolbar.
addSeparator(Dimension) - Method in class javax.swing.JToolBar
Appends a toolbar separator of a specified size to the end of the toolbar.
addService(Class, BeanContextServiceProvider) - Method in class java.beans.beancontext.BeanContextServicesSupport
add a service
addService(Class, BeanContextServiceProvider) - Method in interface java.beans.beancontext.BeanContextServices
Adds a service to this BeanContext.
addService(Class, BeanContextServiceProvider, boolean) - Method in class java.beans.beancontext.BeanContextServicesSupport
add a service
addShutdownHook(Thread) - Method in class java.lang.Runtime
Registers a new virtual-machine shutdown hook.
addSingletonComponent(Component, Component) - Method in class javax.swing.ScrollPaneLayout
The method used to remove an existing component.
addSource(Object) - Method in class java.awt.image.renderable.ParameterBlock
Adds an image to end of the list of sources.
addSpecialElement(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds content that is basically specified entirely in the attribute set.
addStyle(String, Style) - Method in class javax.swing.JTextPane
Adds a new style into the logical style hierarchy.
addStyle(String, Style) - Method in class javax.swing.text.StyleContext
Adds a new style into the style hierarchy.
addStyle(String, Style) - Method in interface javax.swing.text.StyledDocument
Adds a new style into the logical style hierarchy.
addStyle(String, Style) - Method in class javax.swing.text.DefaultStyledDocument
Adds a new style into the logical style hierarchy.
addStyleSheet(StyleSheet) - Method in class javax.swing.text.html.StyleSheet
Adds the rules from the StyleSheet ss to those of the receiver.
addSubComponents() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
addSubComponents() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
Override the parent's method avoid creating a menu bar.
addSystemMenuItems(JMenu) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
addSystemMenuItems(JMenu) - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
Override the parent's method to do nothing.
addTab(String, Component) - Method in class javax.swing.JTabbedPane
Adds a component represented by a title and no icon.
addTab(String, Icon, Component) - Method in class javax.swing.JTabbedPane
Adds a component represented by a title and/or icon, either of which can be null.
addTab(String, Icon, Component, String) - Method in class javax.swing.JTabbedPane
Adds a component and tip represented by a title and/or icon, either of which can be null.
addTableModelListener(TableModelListener) - Method in class javax.swing.table.AbstractTableModel
Adds a listener to the list that's notified each time a change to the data model occurs.
addTableModelListener(TableModelListener) - Method in interface javax.swing.table.TableModel
Adds a listener to the list that is notified each time a change to the data model occurs.
addTag - Variable in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Tag in HTML to start adding tags from.
addTask(Runnable) - Method in class javax.swing.text.LayoutQueue
Add a task that is not needed immediately because the results are not believed to be visible.
addTextListener(TextListener) - Method in class java.awt.TextComponent
Adds the specified text event listener to receive text events from this text component.
addTileObserver(TileObserver) - Method in class java.awt.image.BufferedImage
Adds a tile observer.
addTileObserver(TileObserver) - Method in interface java.awt.image.WritableRenderedImage
Adds an observer.
addToEnvironment(String, Object) - Method in class javax.naming.InitialContext
addToEnvironment(String, Object) - Method in interface javax.naming.Context
Adds a new environment property to the environment of this context.
addTreeExpansionListener(TreeExpansionListener) - Method in class javax.swing.JTree
Adds a listener for TreeExpansion events.
addTreeModelListener(TreeModelListener) - Method in interface javax.swing.tree.TreeModel
Adds a listener for the TreeModelEvent posted after the tree changes.
addTreeModelListener(TreeModelListener) - Method in class javax.swing.tree.DefaultTreeModel
Adds a listener for the TreeModelEvent posted after the tree changes.
addTreeSelectionListener(TreeSelectionListener) - Method in class javax.swing.JTree
Adds a listener for TreeSelection events.
addTreeSelectionListener(TreeSelectionListener) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
addTreeSelectionListener(TreeSelectionListener) - Method in interface javax.swing.tree.TreeSelectionModel
Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
addTreeWillExpandListener(TreeWillExpandListener) - Method in class javax.swing.JTree
Adds a listener for TreeWillExpand events.
addUndoableEditListener(UndoableEditListener) - Method in interface javax.swing.text.Document
Registers the given observer to begin receiving notifications when undoable edits are made to the document.
addUndoableEditListener(UndoableEditListener) - Method in class javax.swing.text.AbstractDocument
Adds an undo listener for notification of any changes.
addUndoableEditListener(UndoableEditListener) - Method in class javax.swing.undo.UndoableEditSupport
Registers an UndoableEditListener.
addURL(URL) - Method in class java.net.URLClassLoader
Appends the specified URL to the list of URLs to search for classes and resources.
addVetoableChangeListener(String, VetoableChangeListener) - Method in class java.beans.VetoableChangeSupport
Add a VetoableChangeListener for a specific property.
addVetoableChangeListener(String, VetoableChangeListener) - Method in interface java.beans.beancontext.BeanContextChild
Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
addVetoableChangeListener(String, VetoableChangeListener) - Method in class java.beans.beancontext.BeanContextChildSupport
Adds a VetoableChangeListener.
addVetoableChangeListener(VetoableChangeListener) - Method in class java.beans.VetoableChangeSupport
Add a VetoableListener to the listener list.
addVetoableChangeListener(VetoableChangeListener) - Method in class javax.swing.JComponent
Adds a VetoableChangeListener to the listener list.
addWindowListener(WindowListener) - Method in class java.awt.Window
Adds the specified window listener to receive window events from this window.
Adjustable - interface java.awt.Adjustable.
The interface for objects which have an adjustable numeric value contained within a bounded range of values.
adjustAllocation(Shape) - Method in class javax.swing.text.FieldView
Adjusts the allocation given to the view to be a suitable allocation for a text field.
AdjustForGravity(GridBagConstraints, Rectangle) - Method in class java.awt.GridBagLayout
ADJUSTMENT_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting adjustment events.
ADJUSTMENT_FIRST - Static variable in class java.awt.event.AdjustmentEvent
Marks the first integer id for the range of adjustment event ids.
ADJUSTMENT_LAST - Static variable in class java.awt.event.AdjustmentEvent
Marks the last integer id for the range of adjustment event ids.
ADJUSTMENT_VALUE_CHANGED - Static variable in class java.awt.event.AdjustmentEvent
The adjustment value changed event.
AdjustmentEvent - class java.awt.event.AdjustmentEvent.
The adjustment event emitted by Adjustable objects.
AdjustmentEvent(Adjustable, int, int, int) - Constructor for class java.awt.event.AdjustmentEvent
Constructs a AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
AdjustmentListener - interface java.awt.event.AdjustmentListener.
The listener interface for receiving adjustment events.
adjustmentValueChanged(AdjustmentEvent) - Method in class java.awt.AWTEventMulticaster
Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.
adjustmentValueChanged(AdjustmentEvent) - Method in interface java.awt.event.AdjustmentListener
Invoked when the value of the adjustable has changed.
adjustRow(FlowView, int, int, int) - Method in class javax.swing.text.FlowView.FlowStrategy
Adjusts the given row if possible to fit within the layout span.
adjustRow(ParagraphView.Row, int, int) - Method in class javax.swing.text.ParagraphView
Adjusts the given row if possible to fit within the layout span.
adjustSizes(int, SizeRequirements[]) - Static method in class javax.swing.SizeRequirements
Adjust a specified array of sizes by a given amount.
adjustVisibility(Rectangle) - Method in class javax.swing.text.DefaultCaret
Scrolls the associated view (if necessary) to make the caret visible.
Adler32 - class java.util.zip.Adler32.
A class that can be used to compute the Adler-32 checksum of a data stream.
Adler32() - Constructor for class java.util.zip.Adler32
Creates a new Adler32 class.
AffineTransform - class java.awt.geom.AffineTransform.
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
AffineTransform() - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform representing the Identity transformation.
AffineTransform(AffineTransform) - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
AffineTransform(double[]) - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(double, double, double, double, double, double) - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(float[]) - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(float, float, float, float, float, float) - Constructor for class java.awt.geom.AffineTransform
Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransformOp - class java.awt.image.AffineTransformOp.
This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster.
AffineTransformOp(AffineTransform, int) - Constructor for class java.awt.image.AffineTransformOp
Constructs an AffineTransformOp given an affine transform and the interpolation type.
AffineTransformOp(AffineTransform, RenderingHints) - Constructor for class java.awt.image.AffineTransformOp
Constructs an AffineTransformOp given an affine transform.
AFTER_LAST_LINE - Static variable in class java.awt.BorderLayout
The component comes after the last line of the layout's content.
AFTER_LINE_ENDS - Static variable in class java.awt.BorderLayout
The component goes at the end of the line direction for the layout.
after(Date) - Method in class java.util.Date
Tests if this date is after the specified date.
after(Object) - Method in class java.util.Calendar
Compares the time field records.
after(Timestamp) - Method in class java.sql.Timestamp
Indicates whether this Timestamp object is later than the given Timestamp object.
afterLast() - Method in interface java.sql.ResultSet
Moves the cursor to the end of this ResultSet object, just after the last row.
afterOffset(int) - Static method in class java.awt.font.TextHitInfo
Creates a TextHitInfo at the specified offset, associated with the character after the offset.
AIFC - Static variable in class javax.sound.sampled.AudioFileFormat.Type
Specifies an AIFF-C file.
AIFF - Static variable in class javax.sound.sampled.AudioFileFormat.Type
Specifies an AIFF file.
ALAW - Static variable in class javax.sound.sampled.AudioFormat.Encoding
Specifies a-law encoded data.
ALERT - Static variable in class javax.accessibility.AccessibleRole
Object is used to alert the user about something.
AlgorithmParameterGenerator - class java.security.AlgorithmParameterGenerator.
The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi, Provider, String) - Constructor for class java.security.AlgorithmParameterGenerator
Creates an AlgorithmParameterGenerator object.
AlgorithmParameterGeneratorSpi - class java.security.AlgorithmParameterGeneratorSpi.
This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi() - Constructor for class java.security.AlgorithmParameterGeneratorSpi
AlgorithmParameters - class java.security.AlgorithmParameters.
This class is used as an opaque representation of cryptographic parameters.
AlgorithmParameters(AlgorithmParametersSpi, Provider, String) - Constructor for class java.security.AlgorithmParameters
Creates an AlgorithmParameters object.
AlgorithmParameterSpec - interface java.security.spec.AlgorithmParameterSpec.
A (transparent) specification of cryptographic parameters.
AlgorithmParametersSpi - class java.security.AlgorithmParametersSpi.
This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
AlgorithmParametersSpi() - Constructor for class java.security.AlgorithmParametersSpi
aliases() - Method in class java.security.KeyStore
Lists all the alias names of this keystore.
ALIGN - Static variable in class javax.swing.text.html.HTML.Attribute
ALIGN_BAR - Static variable in class javax.swing.text.TabStop
ALIGN_CENTER - Static variable in class javax.swing.text.StyleConstants
A possible value for paragraph alignment.
ALIGN_CENTER - Static variable in class javax.swing.text.TabStop
Characters following tab are positioned such that all following characters up to next tab/newline are centered around the tabs location.
ALIGN_DECIMAL - Static variable in class javax.swing.text.TabStop
Characters following tab are aligned such that next decimal/tab/newline is at the tab location, very similiar to RIGHT_TAB, just includes decimal as additional character to look for.
ALIGN_JUSTIFIED - Static variable in class javax.swing.text.StyleConstants
A possible value for paragraph alignment.
ALIGN_LEFT - Static variable in class javax.swing.text.StyleConstants
A possible value for paragraph alignment.
ALIGN_LEFT - Static variable in class javax.swing.text.TabStop
Character following tab is positioned at location.
ALIGN_RIGHT - Static variable in class javax.swing.text.StyleConstants
A possible value for paragraph alignment.
ALIGN_RIGHT - Static variable in class javax.swing.text.TabStop
Characters following tab are positioned such that all following characters up to next tab/newline end at location.
alignment - Variable in class javax.swing.SizeRequirements
The alignment, specified as a value between 0.0 and 1.0, inclusive.
Alignment - Static variable in class javax.swing.text.StyleConstants
Alignment for the paragraph.
Alignment - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
Alignment for the paragraph.
ALINK - Static variable in class javax.swing.text.html.HTML.Attribute
ALL - Static variable in class java.awt.JobAttributes.DefaultSelectionType
The DefaultSelectionType instance to use for specifying that all pages of the job should be printed.
ALL_COLUMNS - Static variable in class javax.swing.event.TableModelEvent
Specifies all columns in a row or rows.
ALLBITS - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form.
allKeys() - Method in class javax.swing.InputMap
Returns an array of the KeyStrokes defined in this InputMap and its parent.
allKeys() - Method in class javax.swing.ActionMap
Returns an array of the keys defined in this ActionMap and its parent.
allNotesOff() - Method in interface javax.sound.midi.MidiChannel
Turns off all notes that are currently sounding on this channel.
allocateArray(int) - Method in class javax.swing.text.GapContent
Allocate an array to store items of the type appropriate (which is determined by the subclass).
allowsChildren - Variable in class javax.swing.tree.DefaultMutableTreeNode
true if the node is able to have children
allowsMultipleSelections() - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by isMultipleMode().
allowThreadSuspension(boolean) - Method in class java.lang.ThreadGroup
Deprecated. The definition of this call depends on ThreadGroup.suspend(), which is deprecated. Further, the behavior of this call was never specified.
allowUserInteraction - Variable in class java.net.URLConnection
If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.
AllPermission - class java.security.AllPermission.
The AllPermission is a permission that implies all other permissions.
AllPermission() - Constructor for class java.security.AllPermission
Creates a new AllPermission object.
AllPermission(String, String) - Constructor for class java.security.AllPermission
Creates a new AllPermission object.
allProceduresAreCallable() - Method in interface java.sql.DatabaseMetaData
Can all the procedures returned by getProcedures be called by the current user?
allSoundOff() - Method in interface javax.sound.midi.MidiChannel
Immediately turns off all sounding notes on this channel, ignoring the state of the Hold Pedal and the internal decay rate of the current Instrument.
allTablesAreSelectable() - Method in interface java.sql.DatabaseMetaData
Can all the tables returned by getTable be SELECTed by the current user?
ALPHABETIC_PRESENTATION_FORMS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
AlphaComposite - class java.awt.AlphaComposite.
This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images.
AlreadyBound - exception org.omg.CosNaming.NamingContextPackage.AlreadyBound.
AlreadyBound() - Constructor for class org.omg.CosNaming.NamingContextPackage.AlreadyBound
AlreadyBoundException - exception java.rmi.AlreadyBoundException.
An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
AlreadyBoundException() - Constructor for class java.rmi.AlreadyBoundException
Constructs an AlreadyBoundException with no specified detail message.
AlreadyBoundException(String) - Constructor for class java.rmi.AlreadyBoundException
Constructs an AlreadyBoundException with the specified detail message.
AlreadyBoundHelper - class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.
AlreadyBoundHolder - class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder.
AlreadyBoundHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
AlreadyBoundHolder(AlreadyBound) - Constructor for class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
ALT - Static variable in class javax.swing.text.html.HTML.Attribute
ALT_GRAPH_MASK - Static variable in class java.awt.event.InputEvent
The alt-graph key modifier constant.
ALT_MASK - Static variable in class java.awt.Event
This flag indicates that the Alt key was down when the event occurred.
ALT_MASK - Static variable in class java.awt.event.ActionEvent
The alt modifier.
ALT_MASK - Static variable in class java.awt.event.InputEvent
The alt key modifier constant.
alternateAddTag - Variable in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.
alternateParentTag - Variable in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Alternate Tag to check for in the document if parentTag is not found.
altName - Variable in class javax.naming.CannotProceedException
Contains the name of the resolved object, relative to the context altNameCtx.
altNameCtx - Variable in class javax.naming.CannotProceedException
Contains the context relative to which altName is specified.
AM - Static variable in class java.util.Calendar
Value of the AM_PM field indicating the period of the day from midnight to just before noon.
AM_PM - Static variable in class java.util.Calendar
Field number for get and set indicating whether the HOUR is before or after noon.
AM_PM_FIELD - Static variable in class java.text.DateFormat
Useful constant for AM_PM field alignment.
ANCESTOR_ADDED - Static variable in class javax.swing.event.AncestorEvent
An ancestor-component was added to the hierarchy of visible objects (made visible), and is currently being displayed.
ANCESTOR_MOVED - Static variable in class java.awt.event.HierarchyEvent
An ancestor-Container was moved.
ANCESTOR_MOVED - Static variable in class javax.swing.event.AncestorEvent
An ancestor-component changed its position on the screen.
ANCESTOR_REMOVED - Static variable in class javax.swing.event.AncestorEvent
An ancestor-component was removed from the hierarchy of visible objects (hidden) and is no longer being displayed.
ANCESTOR_RESIZED - Static variable in class java.awt.event.HierarchyEvent
An ancestor-Container was resized.
ancestorAdded(AncestorEvent) - Method in interface javax.swing.event.AncestorListener
Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.
AncestorEvent - class javax.swing.event.AncestorEvent.
An event reported to a child component that originated from an ancestor in the component hierarchy.
AncestorEvent(JComponent, int, Container, Container) - Constructor for class javax.swing.event.AncestorEvent
Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status.
AncestorListener - interface javax.swing.event.AncestorListener.
AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors.
ancestorMoved(AncestorEvent) - Method in interface javax.swing.event.AncestorListener
Called when either the source or one of its ancestors is moved.
ancestorMoved(HierarchyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.
ancestorMoved(HierarchyEvent) - Method in interface java.awt.event.HierarchyBoundsListener
Called when an ancestor of the source is moved.
ancestorMoved(HierarchyEvent) - Method in class java.awt.event.HierarchyBoundsAdapter
Called when an ancestor of the source is moved.
ancestorRemoved(AncestorEvent) - Method in interface javax.swing.event.AncestorListener
Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy.
ancestorResized(HierarchyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.
ancestorResized(HierarchyEvent) - Method in interface java.awt.event.HierarchyBoundsListener
Called when an ancestor of the source is resized.
ancestorResized(HierarchyEvent) - Method in class java.awt.event.HierarchyBoundsAdapter
Called when an ancestor of the source is resized.
anchor - Variable in class java.awt.GridBagConstraints
This field is used when the component is smaller than its display area.
ANCHOR_SELECTION_PATH_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for anchor selection path.
and(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this & val).
and(BitSet) - Method in class java.util.BitSet
Performs a logical AND of this target bit set with the argument bit set.
andNot(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this & ~val).
andNot(BitSet) - Method in class java.util.BitSet
Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
annotateClass(Class) - Method in class java.io.ObjectOutputStream
Subclasses may implement this method to allow class data to be stored in the stream.
annotateProxyClass(Class) - Method in class java.io.ObjectOutputStream
Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.
Annotation - class java.text.Annotation.
An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
Annotation(Object) - Constructor for class java.text.Annotation
Constructs an annotation record with the given value, which may be null.
Any - class org.omg.CORBA.Any.
Serves as a container for any data that can be described in IDL or for any IDL primitive type.
ANY - Static variable in interface javax.swing.text.html.parser.DTDConstants
Any() - Constructor for class org.omg.CORBA.Any
AnyHolder - class org.omg.CORBA.AnyHolder.
A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods.
AnyHolder() - Constructor for class org.omg.CORBA.AnyHolder
Constructs a new AnyHolder object with its value field initialized to null.
AnyHolder(Any) - Constructor for class org.omg.CORBA.AnyHolder
Constructs a new AnyHolder object for the given Any object.
AnySeqHelper - class org.omg.CORBA.AnySeqHelper.
org/omg/CORBA/AnySeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
AnySeqHelper() - Constructor for class org.omg.CORBA.AnySeqHelper
AnySeqHolder - class org.omg.CORBA.AnySeqHolder.
org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
AnySeqHolder() - Constructor for class org.omg.CORBA.AnySeqHolder
AnySeqHolder(Any[]) - Constructor for class org.omg.CORBA.AnySeqHolder
append(boolean) - Method in class java.lang.StringBuffer
Appends the string representation of the boolean argument to the string buffer.
append(char) - Method in class java.lang.StringBuffer
Appends the string representation of the char argument to this string buffer.
append(char[]) - Method in class java.lang.StringBuffer
Appends the string representation of the char array argument to this string buffer.
append(char[], int, int) - Method in class java.lang.StringBuffer
Appends the string representation of a subarray of the char array argument to this string buffer.
append(double) - Method in class java.lang.StringBuffer
Appends the string representation of the double argument to this string buffer.
append(float) - Method in class java.lang.StringBuffer
Appends the string representation of the float argument to this string buffer.
append(int) - Method in class java.lang.StringBuffer
Appends the string representation of the int argument to this string buffer.
append(long) - Method in class java.lang.StringBuffer
Appends the string representation of the long argument to this string buffer.
append(Object) - Method in class java.lang.StringBuffer
Appends the string representation of the Object argument to this string buffer.
append(PathIterator, boolean) - Method in class java.awt.geom.GeneralPath
Appends the geometry of the specified PathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
append(Printable, PageFormat) - Method in class java.awt.print.Book
Appends a single page to the end of this Book.
append(Printable, PageFormat, int) - Method in class java.awt.print.Book
Appends numPages pages to the end of this Book.
append(Shape, boolean) - Method in class java.awt.geom.GeneralPath
Appends the geometry of the specified Shape object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
append(String) - Method in class java.awt.TextArea
Appends the given text to the text area's current text.
append(String) - Method in class java.lang.StringBuffer
Appends the string to this string buffer.
append(String) - Method in class javax.swing.JTextArea
Appends the given text to the end of the document.
append(View) - Method in class javax.swing.text.View
Appends a single child view.
appendEvent(InputEvent) - Method in class java.awt.dnd.DragGestureRecognizer
Listeners registered on the Component by this Recognizer shall record all Events that are recognized as part of the series of Events that go to comprise a Drag and Drop initiating gesture via this API.
appendRemainingComponent(String) - Method in class javax.naming.NamingException
Add name as the last component in remaining name.
appendRemainingComponent(String) - Method in class javax.naming.spi.ResolveResult
Adds a single component to the end of remaining name.
appendRemainingName(Name) - Method in class javax.naming.NamingException
Add components from 'name' as the last components in remaining name.
appendRemainingName(Name) - Method in class javax.naming.spi.ResolveResult
Adds components to the end of remaining name.
appendText(String) - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by append(String).
applet - Variable in class javax.swing.text.html.parser.DTD
Applet - class java.applet.Applet.
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
APPLET - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties.
APPLET - Static variable in class javax.swing.text.html.HTML.Tag
Applet.AccessibleApplet - class java.applet.Applet.AccessibleApplet.
This class implements accessibility support for the Applet class.
Applet.AccessibleApplet(Applet) - Constructor for class java.applet.Applet.AccessibleApplet
Applet() - Constructor for class java.applet.Applet
AppletContext - interface java.applet.AppletContext.
This interface corresponds to an applet's environment: the document containing the applet and the other applets in the same document.
AppletInitializer - interface java.beans.AppletInitializer.
This interface is designed to work in collusion with java.beans.Beans.instantiate.
appletResize(int, int) - Method in interface java.applet.AppletStub
Called when the applet wants to be resized.
AppletStub - interface java.applet.AppletStub.
When an applet is first created, an applet stub is attached to it using the applet's setStub method.
ApplicationException - exception org.omg.CORBA.portable.ApplicationException.
This class is used for reporting application level exceptions between ORBs and stubs.
ApplicationException(String, InputStream) - Constructor for class org.omg.CORBA.portable.ApplicationException
Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.
APPLY_REVERB - Static variable in class javax.sound.sampled.BooleanControl.Type
Represents a control for whether reverberation is applied to a line.
applyLocalizedPattern(String) - Method in class java.text.SimpleDateFormat
Apply the given localized pattern string to this date format.
applyLocalizedPattern(String) - Method in class java.text.DecimalFormat
Apply the given pattern to this Format object.
applyPattern(String) - Method in class java.text.ChoiceFormat
Sets the pattern.
applyPattern(String) - Method in class java.text.SimpleDateFormat
Apply the given unlocalized pattern string to this date format.
applyPattern(String) - Method in class java.text.DecimalFormat
Apply the given pattern to this Format object.
applyPattern(String) - Method in class java.text.MessageFormat
Sets the pattern.
applyResourceBundle(ResourceBundle) - Method in class java.awt.Window
Apply the settings in the given ResourceBundle to this Window.
applyResourceBundle(String) - Method in class java.awt.Window
Load the ResourceBundle with the given name using the default locale and apply its settings to this window.
appRandom - Variable in class java.security.SignatureSpi
Application-specified source of randomness.
APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies change in the mnemonic for the approve (yes, ok) button.
APPROVE_BUTTON_TEXT_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies change in the text on the approve (yes, ok) button.
APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies change in the tooltip text for the approve (yes, ok) button.
APPROVE_OPTION - Static variable in class javax.swing.JFileChooser
Return value if approve (yes, ok) is chosen.
APPROVE_SELECTION - Static variable in class javax.swing.JFileChooser
Instruction to approve the current selection (same as pressing yes or ok).
approveSelection() - Method in class javax.swing.JFileChooser
Called by the UI when the user hits the Approve button (labeled "Open" or "Save", by default).
APRIL - Static variable in class java.util.Calendar
Value of the MONTH field indicating the fourth month of the year.
ARABIC - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ARABIC_PRESENTATION_FORMS_A - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ARABIC_PRESENTATION_FORMS_B - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Arc2D - class java.awt.geom.Arc2D.
Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
Arc2D.Double - class java.awt.geom.Arc2D.Double.
An arc specified in double precision,
Arc2D.Double() - Constructor for class java.awt.geom.Arc2D.Double
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).
Arc2D.Double(double, double, double, double, double, double, int) - Constructor for class java.awt.geom.Arc2D.Double
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Double(int) - Constructor for class java.awt.geom.Arc2D.Double
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Arc2D.Double(Rectangle2D, double, double, int) - Constructor for class java.awt.geom.Arc2D.Double
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Float - class java.awt.geom.Arc2D.Float.
An arc specified in float precision,
Arc2D.Float() - Constructor for class java.awt.geom.Arc2D.Float
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).
Arc2D.Float(float, float, float, float, float, float, int) - Constructor for class java.awt.geom.Arc2D.Float
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Float(int) - Constructor for class java.awt.geom.Arc2D.Float
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Arc2D.Float(Rectangle2D, float, float, int) - Constructor for class java.awt.geom.Arc2D.Float
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D(int) - Constructor for class java.awt.geom.Arc2D
This is an abstract class that cannot be instantiated directly.
archeight - Variable in class java.awt.geom.RoundRectangle2D.Float
The height of the arc that rounds off the corners.
archeight - Variable in class java.awt.geom.RoundRectangle2D.Double
The height of the arc that rounds off the corners.
ARCHIVE - Static variable in class javax.swing.text.html.HTML.Attribute
arcwidth - Variable in class java.awt.geom.RoundRectangle2D.Float
The width of the arc that rounds off the corners.
arcwidth - Variable in class java.awt.geom.RoundRectangle2D.Double
The width of the arc that rounds off the corners.
Area - class java.awt.geom.Area.
The Area class is a device-independent specification of an arbitrarily-shaped area.
AREA - Static variable in class javax.swing.text.html.HTML.Tag
Area() - Constructor for class java.awt.geom.Area
Default constructor which creates an empty area.
Area(Shape) - Constructor for class java.awt.geom.Area
The Area class creates an area geometry from the specified Shape object.
AreaAveragingScaleFilter - class java.awt.image.AreaAveragingScaleFilter.
An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
AreaAveragingScaleFilter(int, int) - Constructor for class java.awt.image.AreaAveragingScaleFilter
Constructs an AreaAveragingScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
areFieldsSet - Variable in class java.util.Calendar
True if fields[] are in sync with the currently set time.
areNew - Variable in class javax.swing.event.TreeSelectionEvent
For each path identifies if that is path is in fact new.
arePathsContiguous(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns true if the paths are contiguous, or this object has no RowMapper.
arg - Variable in class java.awt.Event
An arbitrary argument of the event.
ARG_IN - interface org.omg.CORBA.ARG_IN.
Signifies an "input" argument to an invocation, meaning that the argument is being passed from the client to the server.
ARG_INOUT - interface org.omg.CORBA.ARG_INOUT.
Signifies an argument used for both input and output in an invocation, meaning that the argument is being passed from the client to the server and then back from the server to the client.
ARG_OUT - interface org.omg.CORBA.ARG_OUT.
A constant that signifies an "output" argument to an invocation, meaning that the argument is being passed from the server to the client.
arguments() - Method in class org.omg.CORBA.Request
Retrieves the NVList object containing the arguments to the method being invoked.
arguments(NVList) - Method in class org.omg.CORBA.ServerRequest
Specifies method parameter types and retrieves "in" and "inout" argument values.
ArithmeticException - exception java.lang.ArithmeticException.
Thrown when an exceptional arithmetic condition has occurred.
ArithmeticException() - Constructor for class java.lang.ArithmeticException
Constructs an ArithmeticException with no detail message.
ArithmeticException(String) - Constructor for class java.lang.ArithmeticException
Constructs an ArithmeticException with the specified detail message.
ARMED - Static variable in class javax.accessibility.AccessibleState
Indicates that the object is armed.
ARMED - Static variable in class javax.swing.DefaultButtonModel
Indicates partial commitment towards choosing the button.
ARMENIAN - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ArrangeGrid(Container) - Method in class java.awt.GridBagLayout
array - Variable in class javax.swing.text.Segment
This is the array containing the text of interest.
Array - class java.lang.reflect.Array.
The Array class provides static methods to dynamically create and access Java arrays.
Array - interface java.sql.Array.
The mapping in the Java programming language for the SQL type ARRAY.
ARRAY - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
arraycopy(Object, int, Object, int, int) - Static method in class java.lang.System
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
ArrayIndexOutOfBoundsException - exception java.lang.ArrayIndexOutOfBoundsException.
Thrown to indicate that an array has been accessed with an illegal index.
ArrayIndexOutOfBoundsException() - Constructor for class java.lang.ArrayIndexOutOfBoundsException
Constructs an ArrayIndexOutOfBoundsException with no detail message.
ArrayIndexOutOfBoundsException(int) - Constructor for class java.lang.ArrayIndexOutOfBoundsException
Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
ArrayIndexOutOfBoundsException(String) - Constructor for class java.lang.ArrayIndexOutOfBoundsException
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
ArrayList - class java.util.ArrayList.
Resizable-array implementation of the List interface.
ArrayList() - Constructor for class java.util.ArrayList
Constructs an empty list.
ArrayList(Collection) - Constructor for class java.util.ArrayList
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
ArrayList(int) - Constructor for class java.util.ArrayList
Constructs an empty list with the specified initial capacity.
Arrays - class java.util.Arrays.
This class contains various methods for manipulating arrays (such as sorting and searching).
ArrayStoreException - exception java.lang.ArrayStoreException.
Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
ArrayStoreException() - Constructor for class java.lang.ArrayStoreException
Constructs an ArrayStoreException with no detail message.
ArrayStoreException(String) - Constructor for class java.lang.ArrayStoreException
Constructs an ArrayStoreException with the specified detail message.
arrowButton - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
arrowIcon - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
ARROWS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
asin(double) - Static method in class java.lang.StrictMath
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
asin(double) - Static method in class java.lang.Math
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
asksAllowsChildren - Variable in class javax.swing.tree.DefaultTreeModel
Determines how the isLeaf method figures out if a node is a leaf node.
asksAllowsChildren() - Method in class javax.swing.tree.DefaultTreeModel
Tells how leaf nodes are determined.
asList(Object[]) - Static method in class java.util.Arrays
Returns a fixed-size list backed by the specified array.
assembleSystemMenu() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
assembleSystemMenu() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
Override the parent's method to do nothing.
assign(DynAny) - Method in interface org.omg.CORBA.DynAny
Copy the contents from one Dynamic Any into another.
assureRectsCreated(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
AsyncBoxView - class javax.swing.text.AsyncBoxView.
A box that does layout asynchronously.
AsyncBoxView.ChildLocator - class javax.swing.text.AsyncBoxView.ChildLocator.
A class to manage the effective position of the child views in a localized area while changes are being made around the localized area.
AsyncBoxView.ChildLocator(AsyncBoxView) - Constructor for class javax.swing.text.AsyncBoxView.ChildLocator
construct a child locator.
AsyncBoxView.ChildState - class javax.swing.text.AsyncBoxView.ChildState.
A record representing the layout state of a child view.
AsyncBoxView.ChildState(AsyncBoxView, View) - Constructor for class javax.swing.text.AsyncBoxView.ChildState
Construct a child status.
AsyncBoxView(Element, int) - Constructor for class javax.swing.text.AsyncBoxView
Construct a box view that does asynchronous layout.
atan(double) - Static method in class java.lang.StrictMath
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
atan(double) - Static method in class java.lang.Math
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
atan2(double, double) - Static method in class java.lang.StrictMath
Converts rectangular coordinates (b, a) to polar (r, theta).
atan2(double, double) - Static method in class java.lang.Math
Converts rectangular coordinates (b, a) to polar (r, theta).
Attribute - interface javax.naming.directory.Attribute.
This interface represents an attribute associated with a named object.
AttributedCharacterIterator - interface java.text.AttributedCharacterIterator.
An AttributedCharacterIterator allows iteration through both text and related attribute information.
AttributedCharacterIterator.Attribute - class java.text.AttributedCharacterIterator.Attribute.
Defines attribute keys that are used to identify text attributes.
AttributedCharacterIterator.Attribute(String) - Constructor for class java.text.AttributedCharacterIterator.Attribute
Constructs an Attribute with the given name.
AttributedString - class java.text.AttributedString.
An AttributedString holds text and related attribute information.
AttributedString(AttributedCharacterIterator) - Constructor for class java.text.AttributedString
Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator, int, int) - Constructor for class java.text.AttributedString
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator, int, int, AttributedCharacterIterator.Attribute[]) - Constructor for class java.text.AttributedString
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
AttributedString(String) - Constructor for class java.text.AttributedString
Constructs an AttributedString instance with the given text.
AttributedString(String, Map) - Constructor for class java.text.AttributedString
Constructs an AttributedString instance with the given text and attributes.
AttributeInUseException - exception javax.naming.directory.AttributeInUseException.
This exception is thrown when an operation attempts to add an attribute that already exists.
AttributeInUseException() - Constructor for class javax.naming.directory.AttributeInUseException
Constructs a new instance of AttributeInUseException.
AttributeInUseException(String) - Constructor for class javax.naming.directory.AttributeInUseException
Constructs a new instance of AttributeInUseException with an explanation.
AttributeList - class javax.swing.text.html.parser.AttributeList.
This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
AttributeList(String) - Constructor for class javax.swing.text.html.parser.AttributeList
Create an attribute list element.
AttributeList(String, int, int, String, Vector, AttributeList) - Constructor for class javax.swing.text.html.parser.AttributeList
Create an attribute list element.
AttributeModificationException - exception javax.naming.directory.AttributeModificationException.
This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
AttributeModificationException() - Constructor for class javax.naming.directory.AttributeModificationException
Constructs a new instance of AttributeModificationException.
AttributeModificationException(String) - Constructor for class javax.naming.directory.AttributeModificationException
Constructs a new instance of AttributeModificationException using an explanation.
attributeNames() - Method in class java.beans.FeatureDescriptor
Gets an enumeration of the locale-independent names of this feature.
Attributes - class java.util.jar.Attributes.
The Attributes class maps Manifest attribute names to associated string values.
Attributes - interface javax.naming.directory.Attributes.
This interface represents a collection of attributes.
Attributes.Name - class java.util.jar.Attributes.Name.
The Attributes.Name class represents an attribute name stored in this Map.
Attributes.Name(String) - Constructor for class java.util.jar.Attributes.Name
Constructs a new attribute name using the given string name.
Attributes() - Constructor for class java.util.jar.Attributes
Constructs a new, empty Attributes object with default size.
Attributes(Attributes) - Constructor for class java.util.jar.Attributes
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.
Attributes(int) - Constructor for class java.util.jar.Attributes
Constructs a new, empty Attributes object with the specified initial size.
AttributeSet - interface javax.swing.text.AttributeSet.
A collection of unique attributes.
AttributeSet.CharacterAttribute - interface javax.swing.text.AttributeSet.CharacterAttribute.
This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
AttributeSet.ColorAttribute - interface javax.swing.text.AttributeSet.ColorAttribute.
This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
AttributeSet.FontAttribute - interface javax.swing.text.AttributeSet.FontAttribute.
This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text.
AttributeSet.ParagraphAttribute - interface javax.swing.text.AttributeSet.ParagraphAttribute.
This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
attrID - Variable in class javax.naming.directory.BasicAttribute
Holds the attribute's id.
atts - Variable in class javax.swing.text.html.parser.Element
AU - Static variable in class javax.sound.sampled.AudioFileFormat.Type
Specifies an AU file.
AudioClip - interface java.applet.AudioClip.
The AudioClip interface is a simple abstraction for playing a sound clip.
AudioFileFormat - class javax.sound.sampled.AudioFileFormat.
An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.
AudioFileFormat.Type - class javax.sound.sampled.AudioFileFormat.Type.
An instance of the Type class represents one of the standard types of audio file.
AudioFileFormat.Type(String, String) - Constructor for class javax.sound.sampled.AudioFileFormat.Type
Constructs a file type.
AudioFileFormat(AudioFileFormat.Type, AudioFormat, int) - Constructor for class javax.sound.sampled.AudioFileFormat
Constructs an audio file format object.
AudioFileFormat(AudioFileFormat.Type, int, AudioFormat, int) - Constructor for class javax.sound.sampled.AudioFileFormat
Constructs an audio file format object.
AudioFileReader - class javax.sound.sampled.spi.AudioFileReader.
Provider for audio file reading services.
AudioFileReader() - Constructor for class javax.sound.sampled.spi.AudioFileReader
AudioFileWriter - class javax.sound.sampled.spi.AudioFileWriter.
Provider for audio file writing services.
AudioFileWriter() - Constructor for class javax.sound.sampled.spi.AudioFileWriter
AudioFormat - class javax.sound.sampled.AudioFormat.
AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
AudioFormat.Encoding - class javax.sound.sampled.AudioFormat.Encoding.
The Encoding class names the specific type of data representation used for an audio stream.
AudioFormat.Encoding(String) - Constructor for class javax.sound.sampled.AudioFormat.Encoding
Constructs a new encoding.
AudioFormat(AudioFormat.Encoding, float, int, int, int, float, boolean) - Constructor for class javax.sound.sampled.AudioFormat
Constructs an AudioFormat with the given parameters.
AudioFormat(float, int, int, boolean, boolean) - Constructor for class javax.sound.sampled.AudioFormat
Constructs an AudioFormat with a linear PCM encoding and the given parameters.
AudioInputStream - class javax.sound.sampled.AudioInputStream.
An audio input stream is an input stream with a specified audio format and length.
AudioInputStream(InputStream, AudioFormat, long) - Constructor for class javax.sound.sampled.AudioInputStream
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.
AudioInputStream(TargetDataLine) - Constructor for class javax.sound.sampled.AudioInputStream
Constructs an audio input stream that reads its data from the target data line indicated.
AudioPermission - class javax.sound.sampled.AudioPermission.
The AudioPermission class represents access rights to the audio system resources.
AudioPermission(String) - Constructor for class javax.sound.sampled.AudioPermission
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
AudioPermission(String, String) - Constructor for class javax.sound.sampled.AudioPermission
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
AudioSystem - class javax.sound.sampled.AudioSystem.
The AudioSystem class acts as the entry point to the sampled-audio system resources.
augmentList(Action[], Action[]) - Static method in class javax.swing.text.TextAction
Takes one list of commands and augments it with another list of commands.
AUGUST - Static variable in class java.util.Calendar
Value of the MONTH field indicating the eighth month of the year.
AuthenticationException - exception javax.naming.AuthenticationException.
This exception is thrown when an authentication error occurs while accessing the naming or directory service.
AuthenticationException() - Constructor for class javax.naming.AuthenticationException
Constructs a new instance of AuthenticationException.
AuthenticationException(String) - Constructor for class javax.naming.AuthenticationException
Constructs a new instance of AuthenticationException using the explanation supplied.
AuthenticationNotSupportedException - exception javax.naming.AuthenticationNotSupportedException.
This exception is thrown when the particular flavor of authentication requested is not supported.
AuthenticationNotSupportedException() - Constructor for class javax.naming.AuthenticationNotSupportedException
Constructs a new instance of AuthenticationNotSupportedException all name resolution fields and explanation initialized to null.
AuthenticationNotSupportedException(String) - Constructor for class javax.naming.AuthenticationNotSupportedException
Constructs a new instance of AuthenticationNotSupportedException using an explanation.
Authenticator - class java.net.Authenticator.
The class Authenticator represents an object that knows how to obtain authentication for a network connection.
Authenticator() - Constructor for class java.net.Authenticator
AUTHORITATIVE - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the authoritativeness of the service requested.
AUTO_RESIZE_ALL_COLUMNS - Static variable in class javax.swing.JTable
During all resize operations, proportionately resize all columns.
AUTO_RESIZE_LAST_COLUMN - Static variable in class javax.swing.JTable
During all resize operations, apply adjustments to the last column only.
AUTO_RESIZE_NEXT_COLUMN - Static variable in class javax.swing.JTable
When a column is adjusted in the UI, adjust the next column the opposite way.
AUTO_RESIZE_OFF - Static variable in class javax.swing.JTable
Do not adjust column widths automatically; use a scrollbar.
AUTO_RESIZE_SUBSEQUENT_COLUMNS - Static variable in class javax.swing.JTable
During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.
autoCreateColumnsFromModel - Variable in class javax.swing.JTable
The table will query the TableModel to build the default set of columns if this is true.
autoResizeMode - Variable in class javax.swing.JTable
Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.
Autoscroll - interface java.awt.dnd.Autoscroll.
During DnD operations it is possible that a user may wish to drop the subject of the operation on a region of a scrollable GUI control that is not currently visible to the user.
autoscroll(Point) - Method in interface java.awt.dnd.Autoscroll
notify the Component to autoscroll
autoScrollDown() - Method in class javax.swing.plaf.basic.BasicComboPopup
autoscrollTimer - Variable in class javax.swing.plaf.basic.BasicComboPopup
autoScrollUp() - Method in class javax.swing.plaf.basic.BasicComboPopup
AUX_RETURN - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the auxiliary return gain on a line.
AUX_SEND - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the auxiliary send gain on a line.
available() - Method in class java.io.InputStream
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
available() - Method in class java.io.FilterInputStream
Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in interface java.io.ObjectInput
Returns the number of bytes that can be read without blocking.
available() - Method in class java.io.ObjectInputStream
Returns the number of bytes that can be read without blocking.
available() - Method in class java.io.PipedInputStream
Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in class java.io.PushbackInputStream
Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in class java.io.StringBufferInputStream
Deprecated. Returns the number of bytes that can be read from the input stream without blocking.
available() - Method in class java.io.BufferedInputStream
Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in class java.io.ByteArrayInputStream
Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in class java.io.SequenceInputStream
Returns the number of bytes available on the current stream.
available() - Method in class java.io.LineNumberInputStream
Deprecated. Returns the number of bytes that can be read from this input stream without blocking.
available() - Method in class java.io.FileInputStream
Returns the number of bytes that can be read from this file input stream without blocking.
available() - Method in class java.net.SocketImpl
Returns the number of bytes that can be read from this socket without blocking.
available() - Method in class java.util.zip.InflaterInputStream
Returns 0 after EOF has reached, otherwise always return 1.
available() - Method in class java.util.zip.ZipInputStream
Returns 0 after EOF has reached for the current entry data, otherwise always return 1.
available() - Method in class javax.sound.sampled.AudioInputStream
Returns the maximum number of bytes that can be read (or skipped over) from this audio input stream without blocking.
available() - Method in interface javax.sound.sampled.DataLine
Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer.
avoidingGui() - Method in interface java.beans.Visibility
Determines whether this bean is avoiding using a GUI.
avoidingGui() - Method in class java.beans.beancontext.BeanContextSupport
Used to determine if the BeanContext child is avoiding using its GUI.
AWT_COMPONENT - Static variable in class javax.accessibility.AccessibleRole
An AWT component, but nothing else is known about it.
AWTError - error java.awt.AWTError.
Thrown when a serious Abstract Window Toolkit error has occurred.
AWTError(String) - Constructor for class java.awt.AWTError
Constructs an instance of AWTError with the specified detail message.
AWTEvent - class java.awt.AWTEvent.
The root event class for all AWT events.
AWTEvent(Event) - Constructor for class java.awt.AWTEvent
Constructs an AWTEvent object from the parameters of a 1.0-style event.
AWTEvent(Object, int) - Constructor for class java.awt.AWTEvent
Constructs an AWTEvent object with the specified source object and type.
AWTEventListener - interface java.awt.event.AWTEventListener.
The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.
AWTEventMulticaster - class java.awt.AWTEventMulticaster.
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
AWTEventMulticaster(EventListener, EventListener) - Constructor for class java.awt.AWTEventMulticaster
Creates an event multicaster instance which chains listener-a with listener-b.
AWTException - exception java.awt.AWTException.
Signals that an Absract Window Toolkit exception has occurred.
AWTException(String) - Constructor for class java.awt.AWTException
Constructs an instance of AWTException with the specified detail message.
AWTPermission - class java.awt.AWTPermission.
This class is for AWT permissions.
AWTPermission(String) - Constructor for class java.awt.AWTPermission
Creates a new AWTPermission with the specified name.
AWTPermission(String, String) - Constructor for class java.awt.AWTPermission
Creates a new AWTPermission object with the specified name.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.


API Help

PREV NEXT FRAMES NO FRAMES

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Inner Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature


B-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

B

b - Variable in class java.awt.AWTEventMulticaster
B - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Engineering B, 11 x 17 in.
B - Static variable in class javax.swing.text.html.HTML.Tag
B0 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B0.
B1 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B1.
B10 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B10.
B2 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B2.
B3 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B3.
B4 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B4.
B5 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B5.
B6 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B6.
B7 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B7.
B8 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B8.
B9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B9.
BACK_SPACE - Static variable in class java.awt.Event
The BackSpace key.
Background - Static variable in class javax.swing.text.StyleConstants
Name of the background color attribute.
Background - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the background color attribute.
Background - Static variable in class javax.swing.text.StyleConstants.ColorConstants
Name of the background color attribute.
BACKGROUND - Static variable in class java.awt.font.TextAttribute
Attribute key for the background Paint adornment.
BACKGROUND - Static variable in class javax.swing.text.html.HTML.Attribute
BACKGROUND - Static variable in class javax.swing.text.html.CSS.Attribute
BACKGROUND_ATTACHMENT - Static variable in class javax.swing.text.html.CSS.Attribute
BACKGROUND_COLOR - Static variable in class javax.swing.text.html.CSS.Attribute
BACKGROUND_IMAGE - Static variable in class javax.swing.text.html.CSS.Attribute
BACKGROUND_POSITION - Static variable in class javax.swing.text.html.CSS.Attribute
BACKGROUND_REPEAT - Static variable in class javax.swing.text.html.CSS.Attribute
backgroundNonSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Color to use for the background when the node isn't selected.
backgroundSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Color to use for the background when a node is selected.
backingStore - Variable in class javax.swing.JViewport
Deprecated. As of Java 2 platform v1.3
BACKINGSTORE_SCROLL_MODE - Static variable in class javax.swing.JViewport
Draws viewport contents into an offscreen image.
backingStoreImage - Variable in class javax.swing.JViewport
The view image used for a backing store.
Backward - Static variable in class javax.swing.text.Position.Bias
Indicates a bias toward the previous character in the model.
backwardAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically backward one position.
BAD_CONTEXT - exception org.omg.CORBA.BAD_CONTEXT.
The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
BAD_CONTEXT() - Constructor for class org.omg.CORBA.BAD_CONTEXT
Constructs a BAD_CONTEXT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_CONTEXT(int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_CONTEXT
Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
BAD_CONTEXT(String) - Constructor for class org.omg.CORBA.BAD_CONTEXT
Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
BAD_CONTEXT(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_CONTEXT
Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.
BAD_INV_ORDER - exception org.omg.CORBA.BAD_INV_ORDER.
The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
BAD_INV_ORDER() - Constructor for class org.omg.CORBA.BAD_INV_ORDER
Constructs a BAD_INV_ORDER exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_INV_ORDER(int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_INV_ORDER
Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
BAD_INV_ORDER(String) - Constructor for class org.omg.CORBA.BAD_INV_ORDER
Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_INV_ORDER(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_INV_ORDER
Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.
BAD_LOCATION - Static variable in class javax.swing.text.AbstractDocument
Error message to indicate a bad location.
BAD_OPERATION - exception org.omg.CORBA.BAD_OPERATION.
The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
BAD_OPERATION() - Constructor for class org.omg.CORBA.BAD_OPERATION
Constructs a BAD_OPERATION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_OPERATION(int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_OPERATION
Constructs a BAD_OPERATION exception with the specified minor code and completion status.
BAD_OPERATION(String) - Constructor for class org.omg.CORBA.BAD_OPERATION
Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_OPERATION(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_OPERATION
Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.
BAD_PARAM - exception org.omg.CORBA.BAD_PARAM.
The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
BAD_PARAM() - Constructor for class org.omg.CORBA.BAD_PARAM
Constructs a BAD_PARAM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_PARAM(int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_PARAM
Constructs a BAD_PARAM exception with the specified minor code and completion status.
BAD_PARAM(String) - Constructor for class org.omg.CORBA.BAD_PARAM
Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_PARAM(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_PARAM
Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.
BAD_POLICY - interface org.omg.CORBA.BAD_POLICY.
BAD_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
BAD_POLICY_TYPE - interface org.omg.CORBA.BAD_POLICY_TYPE.
BAD_POLICY_TYPE is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
BAD_POLICY_VALUE - interface org.omg.CORBA.BAD_POLICY_VALUE.
Contains the value used to indicate a policy value that is incorrect for a valid policy type in a call to the create_policy method defined in the ORB class.
BAD_TYPECODE - exception org.omg.CORBA.BAD_TYPECODE.
The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
BAD_TYPECODE() - Constructor for class org.omg.CORBA.BAD_TYPECODE
Constructs a BAD_TYPECODE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_TYPECODE(int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_TYPECODE
Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
BAD_TYPECODE(String) - Constructor for class org.omg.CORBA.BAD_TYPECODE
Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_TYPECODE(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.BAD_TYPECODE
Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.
BadBreakWeight - Static variable in class javax.swing.text.View
The weight to indicate a view is a bad break opportunity for the purpose of formatting.
BadKind - exception org.omg.CORBA.TypeCodePackage.BadKind.
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.
BadKind() - Constructor for class org.omg.CORBA.TypeCodePackage.BadKind
Constructs a BadKind exception with no reason message.
BadKind(String) - Constructor for class org.omg.CORBA.TypeCodePackage.BadKind
Constructs a BadKind exception with the specified reason message.
BadLocationException - exception javax.swing.text.BadLocationException.
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
BadLocationException(String, int) - Constructor for class javax.swing.text.BadLocationException
Creates a new BadLocationException object.
BALANCE - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the relative balance of a stereo signal between two stereo speakers.
BandCombineOp - class java.awt.image.BandCombineOp.
This class performs an arbitrary linear combination of the bands in a Raster, using a specified matrix.
BandCombineOp(float[][], RenderingHints) - Constructor for class java.awt.image.BandCombineOp
Constructs a BandCombineOp with the specified matrix.
BandedSampleModel - class java.awt.image.BandedSampleModel.
This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
BandedSampleModel(int, int, int, int) - Constructor for class java.awt.image.BandedSampleModel
Constructs a BandedSampleModel with the specified parameters.
BandedSampleModel(int, int, int, int, int[], int[]) - Constructor for class java.awt.image.BandedSampleModel
Constructs a BandedSampleModel with the specified parameters.
bandOffsets - Variable in class java.awt.image.ComponentSampleModel
Offsets for all bands in data array elements.
bank - Variable in class javax.sound.midi.VoiceStatus
The bank number of the instrument that this voice is currently using.
bankIndices - Variable in class java.awt.image.ComponentSampleModel
Index for each bank storing a band of image data.
banks - Variable in class java.awt.image.DataBuffer
The number of banks in this DataBuffer.
base - Variable in class javax.swing.text.html.parser.DTD
BASE - Static variable in class javax.swing.text.html.HTML.Tag
BASEFONT - Static variable in class javax.swing.text.html.HTML.Tag
baselineLayout(int, int, int[], int[]) - Method in class javax.swing.text.BoxView
baselineRequirements(int, SizeRequirements) - Method in class javax.swing.text.BoxView
baseWireHandle - Static variable in interface java.io.ObjectStreamConstants
First wire handle to be assigned.
BASIC_LATIN - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
BasicArrowButton - class javax.swing.plaf.basic.BasicArrowButton.
JButton object that draws a scaled Arrow in one of the cardinal directions.
BasicArrowButton(int) - Constructor for class javax.swing.plaf.basic.BasicArrowButton
BasicAttribute - class javax.naming.directory.BasicAttribute.
This class provides a basic implementation of the Attribute interface.
BasicAttribute(String) - Constructor for class javax.naming.directory.BasicAttribute
Constructs a new instance of an unordered attribute with no value.
BasicAttribute(String, boolean) - Constructor for class javax.naming.directory.BasicAttribute
Constructs a new instance of a possibly ordered attribute with no value.
BasicAttribute(String, Object) - Constructor for class javax.naming.directory.BasicAttribute
Constructs a new instance of an unordered attribute with a single value.
BasicAttribute(String, Object, boolean) - Constructor for class javax.naming.directory.BasicAttribute
Constructs a new instance of a possibly ordered attribute with a single value.
BasicAttributes - class javax.naming.directory.BasicAttributes.
This class provides a basic implementation of the Attributes interface.
BasicAttributes() - Constructor for class javax.naming.directory.BasicAttributes
Constructs a new instance of Attributes.
BasicAttributes(boolean) - Constructor for class javax.naming.directory.BasicAttributes
Constructs a new instance of Attributes.
BasicAttributes(String, Object) - Constructor for class javax.naming.directory.BasicAttributes
Constructs a new instance of Attributes with one attribute.
BasicAttributes(String, Object, boolean) - Constructor for class javax.naming.directory.BasicAttributes
Constructs a new instance of Attributes with one attribute.
BasicBorders - class javax.swing.plaf.basic.BasicBorders.
Factory object that can vend Borders appropriate for the basic L & F.
BasicBorders.ButtonBorder - class javax.swing.plaf.basic.BasicBorders.ButtonBorder.
BasicBorders.ButtonBorder(Color, Color, Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.ButtonBorder
BasicBorders.FieldBorder - class javax.swing.plaf.basic.BasicBorders.FieldBorder.
BasicBorders.FieldBorder(Color, Color, Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.FieldBorder
BasicBorders.MarginBorder - class javax.swing.plaf.basic.BasicBorders.MarginBorder.
BasicBorders.MarginBorder() - Constructor for class javax.swing.plaf.basic.BasicBorders.MarginBorder
BasicBorders.MenuBarBorder - class javax.swing.plaf.basic.BasicBorders.MenuBarBorder.
BasicBorders.MenuBarBorder(Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.MenuBarBorder
BasicBorders.RadioButtonBorder - class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder.
BasicBorders.RadioButtonBorder(Color, Color, Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
BasicBorders.SplitPaneBorder - class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder.
Draws the border around the splitpane.
BasicBorders.SplitPaneBorder(Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
BasicBorders.ToggleButtonBorder - class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder.
BasicBorders.ToggleButtonBorder(Color, Color, Color, Color) - Constructor for class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
BasicBorders() - Constructor for class javax.swing.plaf.basic.BasicBorders
BasicButtonListener - class javax.swing.plaf.basic.BasicButtonListener.
Button Listener
BasicButtonListener(AbstractButton) - Constructor for class javax.swing.plaf.basic.BasicButtonListener
BasicButtonUI - class javax.swing.plaf.basic.BasicButtonUI.
BasicButton implementation
BasicButtonUI() - Constructor for class javax.swing.plaf.basic.BasicButtonUI
BasicCheckBoxMenuItemUI - class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.
BasicCheckboxMenuItem implementation
BasicCheckBoxMenuItemUI() - Constructor for class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
BasicCheckBoxUI - class javax.swing.plaf.basic.BasicCheckBoxUI.
CheckboxUI implementation for BasicCheckboxUI
BasicCheckBoxUI() - Constructor for class javax.swing.plaf.basic.BasicCheckBoxUI
BasicColorChooserUI - class javax.swing.plaf.basic.BasicColorChooserUI.
Provides the basic look and feel for a JColorChooser.
BasicColorChooserUI.PropertyHandler - class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler.
This inner class is marked "public" due to a compiler bug.
BasicColorChooserUI.PropertyHandler(BasicColorChooserUI) - Constructor for class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler
BasicColorChooserUI() - Constructor for class javax.swing.plaf.basic.BasicColorChooserUI
BasicComboBoxEditor - class javax.swing.plaf.basic.BasicComboBoxEditor.
The default editor for editable combo boxes
BasicComboBoxEditor.UIResource - class javax.swing.plaf.basic.BasicComboBoxEditor.UIResource.
A subclass of BasicComboBoxEditor that implements UIResource.
BasicComboBoxEditor.UIResource() - Constructor for class javax.swing.plaf.basic.BasicComboBoxEditor.UIResource
BasicComboBoxEditor() - Constructor for class javax.swing.plaf.basic.BasicComboBoxEditor
BasicComboBoxRenderer - class javax.swing.plaf.basic.BasicComboBoxRenderer.
ComboBox renderer
BasicComboBoxRenderer.UIResource - class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource.
A subclass of BasicComboBoxRenderer that implements UIResource.
BasicComboBoxRenderer.UIResource() - Constructor for class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource
BasicComboBoxRenderer() - Constructor for class javax.swing.plaf.basic.BasicComboBoxRenderer
BasicComboBoxUI - class javax.swing.plaf.basic.BasicComboBoxUI.
Basic UI for JComboBox.
BasicComboBoxUI.ComboBoxLayoutManager - class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.
This layout manager handles the 'standard' layout of combo boxes.
BasicComboBoxUI.ComboBoxLayoutManager(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
BasicComboBoxUI.FocusHandler - class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler.
This listener hides the popup when the focus is lost.
BasicComboBoxUI.FocusHandler(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler
BasicComboBoxUI.ItemHandler - class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler.
This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.
BasicComboBoxUI.ItemHandler(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler
BasicComboBoxUI.KeyHandler - class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler.
This listener checks to see if the key event isn't a navigation key.
BasicComboBoxUI.KeyHandler(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
BasicComboBoxUI.ListDataHandler - class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler.
This listener watches for changes in the data and revalidates.
BasicComboBoxUI.ListDataHandler(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
BasicComboBoxUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler.
This listener watches for bound properties that have changed in the JComboBox.
BasicComboBoxUI.PropertyChangeHandler(BasicComboBoxUI) - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
BasicComboBoxUI() - Constructor for class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboPopup - class javax.swing.plaf.basic.BasicComboPopup.
This is an implementation of the ComboPopup interface.
BasicComboPopup.InvocationKeyHandler - class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler.
This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
BasicComboPopup.InvocationKeyHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler
BasicComboPopup.InvocationMouseHandler - class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler.
This listener knows how and when to invoke this popup menu.
BasicComboPopup.InvocationMouseHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler
BasicComboPopup.InvocationMouseMotionHandler - class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler.
This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
BasicComboPopup.InvocationMouseMotionHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler
BasicComboPopup.ItemHandler - class javax.swing.plaf.basic.BasicComboPopup.ItemHandler.
This listener watches for changes in the JComboBox's selection.
BasicComboPopup.ItemHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.ItemHandler
BasicComboPopup.ListDataHandler - class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler.
Keeps the selected index in the list in-sync with the combo box's selection.
BasicComboPopup.ListDataHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler
BasicComboPopup.ListMouseHandler - class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler.
This listener hides the popup when the mouse is released in the list.
BasicComboPopup.ListMouseHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler
BasicComboPopup.ListMouseMotionHandler - class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler.
This listener changes the selected item as you move the mouse over the list.
BasicComboPopup.ListMouseMotionHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler
BasicComboPopup.ListSelectionHandler - class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler.
This listener watches for changes in the list's selection and reports them to the combo box.
BasicComboPopup.ListSelectionHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler
BasicComboPopup.PropertyChangeHandler - class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler.
This listener watches for bound property changes in JComboBox.
BasicComboPopup.PropertyChangeHandler(BasicComboPopup) - Constructor for class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler
BasicComboPopup(JComboBox) - Constructor for class javax.swing.plaf.basic.BasicComboPopup
BasicDesktopIconUI - class javax.swing.plaf.basic.BasicDesktopIconUI.
Basic L&F for a minimized window on a desktop.
BasicDesktopIconUI.MouseInputHandler - class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler.
Listens for mouse movements and acts on them.
BasicDesktopIconUI.MouseInputHandler(BasicDesktopIconUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler
BasicDesktopIconUI() - Constructor for class javax.swing.plaf.basic.BasicDesktopIconUI
BasicDesktopPaneUI - class javax.swing.plaf.basic.BasicDesktopPaneUI.
Basic L&F for a desktop.
BasicDesktopPaneUI.CloseAction - class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction.
BasicDesktopPaneUI.CloseAction(BasicDesktopPaneUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
BasicDesktopPaneUI.MaximizeAction - class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction.
BasicDesktopPaneUI.MaximizeAction(BasicDesktopPaneUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
BasicDesktopPaneUI.MinimizeAction - class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction.
BasicDesktopPaneUI.MinimizeAction(BasicDesktopPaneUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
BasicDesktopPaneUI.NavigateAction - class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction.
BasicDesktopPaneUI.NavigateAction(BasicDesktopPaneUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
BasicDesktopPaneUI.OpenAction - class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction.
BasicDesktopPaneUI.OpenAction(BasicDesktopPaneUI) - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
BasicDesktopPaneUI() - Constructor for class javax.swing.plaf.basic.BasicDesktopPaneUI
BasicDirectoryModel - class javax.swing.plaf.basic.BasicDirectoryModel.
Basic implementation of a file list.
BasicDirectoryModel(JFileChooser) - Constructor for class javax.swing.plaf.basic.BasicDirectoryModel
BasicEditorPaneUI - class javax.swing.plaf.basic.BasicEditorPaneUI.
Provides the look and feel for a JEditorPane.
BasicEditorPaneUI() - Constructor for class javax.swing.plaf.basic.BasicEditorPaneUI
Creates a new BasicEditorPaneUI.
BasicFileChooserUI - class javax.swing.plaf.basic.BasicFileChooserUI.
Basic L&F implementation of a FileChooser.
BasicFileChooserUI.AcceptAllFileFilter - class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter.
BasicFileChooserUI.AcceptAllFileFilter(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter
BasicFileChooserUI.ApproveSelectionAction - class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction.
Responds to an Open or Save request
BasicFileChooserUI.ApproveSelectionAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction
BasicFileChooserUI.BasicFileView - class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView.
BasicFileChooserUI.BasicFileView(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
BasicFileChooserUI.CancelSelectionAction - class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction.
Responds to a cancel request.
BasicFileChooserUI.CancelSelectionAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction
BasicFileChooserUI.ChangeToParentDirectoryAction - class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction.
BasicFileChooserUI.ChangeToParentDirectoryAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction
BasicFileChooserUI.DoubleClickListener - class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener.
BasicFileChooserUI.DoubleClickListener(BasicFileChooserUI, JList) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener
BasicFileChooserUI.GoHomeAction - class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction.
Acts on the "home" key event or equivalent event.
BasicFileChooserUI.GoHomeAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction
BasicFileChooserUI.NewFolderAction - class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction.
Creates a new folder.
BasicFileChooserUI.NewFolderAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction
BasicFileChooserUI.SelectionListener - class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener.
BasicFileChooserUI.SelectionListener(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener
BasicFileChooserUI.UpdateAction - class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction.
Rescans the files in the current directory
BasicFileChooserUI.UpdateAction(BasicFileChooserUI) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
BasicFileChooserUI(JFileChooser) - Constructor for class javax.swing.plaf.basic.BasicFileChooserUI
BasicGraphicsUtils - class javax.swing.plaf.basic.BasicGraphicsUtils.
BasicGraphicsUtils() - Constructor for class javax.swing.plaf.basic.BasicGraphicsUtils
BasicHTML - class javax.swing.plaf.basic.BasicHTML.
Support for providing html views for the swing components.
BasicHTML() - Constructor for class javax.swing.plaf.basic.BasicHTML
BasicIconFactory - class javax.swing.plaf.basic.BasicIconFactory.
Factory object that can vend Icons appropriate for the basic L & F.
BasicIconFactory() - Constructor for class javax.swing.plaf.basic.BasicIconFactory
BasicInternalFrameTitlePane - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.
The class that manages a basic title bar
BasicInternalFrameTitlePane.CloseAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.CloseAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction
BasicInternalFrameTitlePane.IconifyAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.IconifyAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction
BasicInternalFrameTitlePane.MaximizeAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.MaximizeAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction
BasicInternalFrameTitlePane.MoveAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.MoveAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction
BasicInternalFrameTitlePane.PropertyChangeHandler - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.PropertyChangeHandler(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler
BasicInternalFrameTitlePane.RestoreAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.RestoreAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction
BasicInternalFrameTitlePane.SizeAction - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.SizeAction(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction
BasicInternalFrameTitlePane.SystemMenuBar - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.SystemMenuBar(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
BasicInternalFrameTitlePane.TitlePaneLayout - class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.
This inner class is marked "public" due to a compiler bug.
BasicInternalFrameTitlePane.TitlePaneLayout(BasicInternalFrameTitlePane) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
BasicInternalFrameTitlePane(JInternalFrame) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameTitlePane
BasicInternalFrameUI - class javax.swing.plaf.basic.BasicInternalFrameUI.
A basic L&F implementation of JInternalFrame.
BasicInternalFrameUI.BasicInternalFrameListener - class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener.
BasicInternalFrameUI.BasicInternalFrameListener(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
BasicInternalFrameUI.BorderListener - class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.
Listens for border adjustments.
BasicInternalFrameUI.BorderListener(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener
BasicInternalFrameUI.ComponentHandler - class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler.
BasicInternalFrameUI.ComponentHandler(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
BasicInternalFrameUI.GlassPaneDispatcher - class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher.
BasicInternalFrameUI.GlassPaneDispatcher(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
BasicInternalFrameUI.InternalFrameLayout - class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout.
BasicInternalFrameUI.InternalFrameLayout(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
BasicInternalFrameUI.InternalFramePropertyChangeListener - class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener.
BasicInternalFrameUI.InternalFramePropertyChangeListener(BasicInternalFrameUI) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener
BasicInternalFrameUI(JInternalFrame) - Constructor for class javax.swing.plaf.basic.BasicInternalFrameUI
BasicLabelUI - class javax.swing.plaf.basic.BasicLabelUI.
A Windows L&F implementation of LabelUI.
BasicLabelUI() - Constructor for class javax.swing.plaf.basic.BasicLabelUI
BasicListUI - class javax.swing.plaf.basic.BasicListUI.
A Windows L&F implementation of ListUI.
BasicListUI.FocusHandler - class javax.swing.plaf.basic.BasicListUI.FocusHandler.
This inner class is marked "public" due to a compiler bug.
BasicListUI.FocusHandler(BasicListUI) - Constructor for class javax.swing.plaf.basic.BasicListUI.FocusHandler
BasicListUI.ListDataHandler - class javax.swing.plaf.basic.BasicListUI.ListDataHandler.
The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
BasicListUI.ListDataHandler(BasicListUI) - Constructor for class javax.swing.plaf.basic.BasicListUI.ListDataHandler
BasicListUI.ListSelectionHandler - class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler.
The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
BasicListUI.ListSelectionHandler(BasicListUI) - Constructor for class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler
BasicListUI.MouseInputHandler - class javax.swing.plaf.basic.BasicListUI.MouseInputHandler.
Mouse input, and focus handling for JList.
BasicListUI.MouseInputHandler(BasicListUI) - Constructor for class javax.swing.plaf.basic.BasicListUI.MouseInputHandler
BasicListUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler.
The PropertyChangeListener that's added to the JList at installUI time.
BasicListUI.PropertyChangeHandler(BasicListUI) - Constructor for class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler
BasicListUI() - Constructor for class javax.swing.plaf.basic.BasicListUI
BasicLookAndFeel - class javax.swing.plaf.basic.BasicLookAndFeel.
Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.
BasicLookAndFeel() - Constructor for class javax.swing.plaf.basic.BasicLookAndFeel
BasicMenuBarUI - class javax.swing.plaf.basic.BasicMenuBarUI.
A default L&F implementation of MenuBarUI.
BasicMenuBarUI() - Constructor for class javax.swing.plaf.basic.BasicMenuBarUI
BasicMenuItemUI - class javax.swing.plaf.basic.BasicMenuItemUI.
BasicMenuItem implementation
BasicMenuItemUI.MouseInputHandler - class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler.
BasicMenuItemUI.MouseInputHandler(BasicMenuItemUI) - Constructor for class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler
BasicMenuItemUI() - Constructor for class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuUI - class javax.swing.plaf.basic.BasicMenuUI.
A default L&F implementation of MenuUI.
BasicMenuUI.ChangeHandler - class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler.
BasicMenuUI.ChangeHandler(BasicMenuUI, JMenu, BasicMenuUI) - Constructor for class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
BasicMenuUI() - Constructor for class javax.swing.plaf.basic.BasicMenuUI
BasicOptionPaneUI - class javax.swing.plaf.basic.BasicOptionPaneUI.
Provides the basic look and feel for a JOptionPane.
BasicOptionPaneUI.ButtonActionListener - class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener.
This inner class is marked "public" due to a compiler bug.
BasicOptionPaneUI.ButtonActionListener(BasicOptionPaneUI, int) - Constructor for class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener
BasicOptionPaneUI.ButtonAreaLayout - class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout.
ButtonAreaLayout acts similiar to FlowLayout.
BasicOptionPaneUI.ButtonAreaLayout(boolean, int) - Constructor for class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
BasicOptionPaneUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler.
This inner class is marked "public" due to a compiler bug.
BasicOptionPaneUI.PropertyChangeHandler(BasicOptionPaneUI) - Constructor for class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler
BasicOptionPaneUI() - Constructor for class javax.swing.plaf.basic.BasicOptionPaneUI
BasicPanelUI - class javax.swing.plaf.basic.BasicPanelUI.
BasicPanel implementation
BasicPanelUI() - Constructor for class javax.swing.plaf.basic.BasicPanelUI
BasicPasswordFieldUI - class javax.swing.plaf.basic.BasicPasswordFieldUI.
Provides the Windows look and feel for a password field.
BasicPasswordFieldUI() - Constructor for class javax.swing.plaf.basic.BasicPasswordFieldUI
BasicPermission - class java.security.BasicPermission.
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
BasicPermission(String) - Constructor for class java.security.BasicPermission
Creates a new BasicPermission with the specified name.
BasicPermission(String, String) - Constructor for class java.security.BasicPermission
Creates a new BasicPermission object with the specified name.
BasicPopupMenuSeparatorUI - class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI.
A Basic L&F implementation of PopupMenuSeparatorUI.
BasicPopupMenuSeparatorUI() - Constructor for class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
BasicPopupMenuUI - class javax.swing.plaf.basic.BasicPopupMenuUI.
A Windows L&F implementation of PopupMenuUI.
BasicPopupMenuUI() - Constructor for class javax.swing.plaf.basic.BasicPopupMenuUI
BasicProgressBarUI - class javax.swing.plaf.basic.BasicProgressBarUI.
A Basic L&F implementation of ProgressBarUI.
BasicProgressBarUI.ChangeHandler - class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler.
This inner class is marked "public" due to a compiler bug.
BasicProgressBarUI.ChangeHandler(BasicProgressBarUI) - Constructor for class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler
BasicProgressBarUI() - Constructor for class javax.swing.plaf.basic.BasicProgressBarUI
BasicRadioButtonMenuItemUI - class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI.
BasicRadioButtonMenuItem implementation
BasicRadioButtonMenuItemUI() - Constructor for class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
BasicRadioButtonUI - class javax.swing.plaf.basic.BasicRadioButtonUI.
RadioButtonUI implementation for BasicRadioButtonUI
BasicRadioButtonUI() - Constructor for class javax.swing.plaf.basic.BasicRadioButtonUI
BasicRootPaneUI - class javax.swing.plaf.basic.BasicRootPaneUI.
Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
BasicRootPaneUI() - Constructor for class javax.swing.plaf.basic.BasicRootPaneUI
BasicScrollBarUI - class javax.swing.plaf.basic.BasicScrollBarUI.
Implementation of ScrollBarUI for the Basic Look and Feel
BasicScrollBarUI.ArrowButtonListener - class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener.
Listener for cursor keys.
BasicScrollBarUI.ArrowButtonListener(BasicScrollBarUI) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener
BasicScrollBarUI.ModelListener - class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener.
A listener to listen for model changes.
BasicScrollBarUI.ModelListener(BasicScrollBarUI) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener
BasicScrollBarUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler.
BasicScrollBarUI.PropertyChangeHandler(BasicScrollBarUI) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler
BasicScrollBarUI.ScrollListener - class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener.
Listener for scrolling events intiated in the ScrollPane.
BasicScrollBarUI.ScrollListener(BasicScrollBarUI) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
BasicScrollBarUI.ScrollListener(BasicScrollBarUI, int, boolean) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
BasicScrollBarUI.TrackListener - class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.
Track mouse drags.
BasicScrollBarUI.TrackListener(BasicScrollBarUI) - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
BasicScrollBarUI() - Constructor for class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollPaneUI - class javax.swing.plaf.basic.BasicScrollPaneUI.
A default L&F implementation of ScrollPaneUI.
BasicScrollPaneUI.HSBChangeListener - class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener.
Horizontal scrollbar listener.
BasicScrollPaneUI.HSBChangeListener(BasicScrollPaneUI) - Constructor for class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener
BasicScrollPaneUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler.
BasicScrollPaneUI.PropertyChangeHandler(BasicScrollPaneUI) - Constructor for class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler
BasicScrollPaneUI.ViewportChangeHandler - class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler.
Listener for viewport events.
BasicScrollPaneUI.ViewportChangeHandler(BasicScrollPaneUI) - Constructor for class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler
BasicScrollPaneUI.VSBChangeListener - class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener.
Vertical scrollbar listener.
BasicScrollPaneUI.VSBChangeListener(BasicScrollPaneUI) - Constructor for class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener
BasicScrollPaneUI() - Constructor for class javax.swing.plaf.basic.BasicScrollPaneUI
BasicSeparatorUI - class javax.swing.plaf.basic.BasicSeparatorUI.
A Basic L&F implementation of SeparatorUI.
BasicSeparatorUI() - Constructor for class javax.swing.plaf.basic.BasicSeparatorUI
BasicSliderUI - class javax.swing.plaf.basic.BasicSliderUI.
A Basic L&F implementation of SliderUI.
BasicSliderUI.ActionScroller - class javax.swing.plaf.basic.BasicSliderUI.ActionScroller.
As of Java 2 platform v1.3 this undocumented class is no longer used.
BasicSliderUI.ActionScroller(BasicSliderUI, JSlider, int, boolean) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.ActionScroller
BasicSliderUI.ChangeHandler - class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler.
Data model listener.
BasicSliderUI.ChangeHandler(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler
BasicSliderUI.ComponentHandler - class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler.
Listener for resizing events.
BasicSliderUI.ComponentHandler(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler
BasicSliderUI.FocusHandler - class javax.swing.plaf.basic.BasicSliderUI.FocusHandler.
Focus-change listener.
BasicSliderUI.FocusHandler(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.FocusHandler
BasicSliderUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler.
BasicSliderUI.PropertyChangeHandler(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler
BasicSliderUI.ScrollListener - class javax.swing.plaf.basic.BasicSliderUI.ScrollListener.
Scroll-event listener.
BasicSliderUI.ScrollListener(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.ScrollListener
BasicSliderUI.ScrollListener(BasicSliderUI, int, boolean) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.ScrollListener
BasicSliderUI.TrackListener - class javax.swing.plaf.basic.BasicSliderUI.TrackListener.
Track mouse movements.
BasicSliderUI.TrackListener(BasicSliderUI) - Constructor for class javax.swing.plaf.basic.BasicSliderUI.TrackListener
BasicSliderUI(JSlider) - Constructor for class javax.swing.plaf.basic.BasicSliderUI
BasicSplitPaneDivider - class javax.swing.plaf.basic.BasicSplitPaneDivider.
Divider used by BasicSplitPaneUI.
BasicSplitPaneDivider.DividerLayout - class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout.
Used to layout a BasicSplitPaneDivider.
BasicSplitPaneDivider.DividerLayout(BasicSplitPaneDivider) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
BasicSplitPaneDivider.DragController - class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController.
Handles the events during a dragging session for a HORIZONTAL_SPLIT orientated split pane.
BasicSplitPaneDivider.DragController(BasicSplitPaneDivider, MouseEvent) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
BasicSplitPaneDivider.MouseHandler - class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler.
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
BasicSplitPaneDivider.MouseHandler(BasicSplitPaneDivider) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
BasicSplitPaneDivider.VerticalDragController - class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController.
Handles the events during a dragging session for a VERTICAL_SPLIT orientated split pane.
BasicSplitPaneDivider.VerticalDragController(BasicSplitPaneDivider, MouseEvent) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
BasicSplitPaneDivider(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneDivider
Creates an instance of BasicSplitPaneDivider.
BasicSplitPaneUI - class javax.swing.plaf.basic.BasicSplitPaneUI.
A Basic L&F implementation of the SplitPaneUI.
BasicSplitPaneUI.BasicHorizontalLayoutManager - class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.
LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
BasicSplitPaneUI.BasicVerticalLayoutManager - class javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager.
LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
BasicSplitPaneUI.BasicVerticalLayoutManager(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager
BasicSplitPaneUI.FocusHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler.
Implementation of the FocusListener that the JSplitPane UI uses.
BasicSplitPaneUI.FocusHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler
BasicSplitPaneUI.KeyboardDownRightHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler.
Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
BasicSplitPaneUI.KeyboardDownRightHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler
BasicSplitPaneUI.KeyboardEndHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler.
Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
BasicSplitPaneUI.KeyboardEndHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler
BasicSplitPaneUI.KeyboardHomeHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler.
Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
BasicSplitPaneUI.KeyboardHomeHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler
BasicSplitPaneUI.KeyboardResizeToggleHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler.
Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
BasicSplitPaneUI.KeyboardResizeToggleHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler
BasicSplitPaneUI.KeyboardUpLeftHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler.
Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
BasicSplitPaneUI.KeyboardUpLeftHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler
BasicSplitPaneUI.PropertyHandler - class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler.
Implementation of the PropertyChangeListener that the JSplitPane UI uses.
BasicSplitPaneUI.PropertyHandler(BasicSplitPaneUI) - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler
BasicSplitPaneUI() - Constructor for class javax.swing.plaf.basic.BasicSplitPaneUI
BasicStroke - class java.awt.BasicStroke.
The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke.
BasicStroke() - Constructor for class java.awt.BasicStroke
Constructs a new BasicStroke with defaults for all attributes.
BasicStroke(float) - Constructor for class java.awt.BasicStroke
Constructs a solid BasicStroke with the specified line width and with default values for the cap and join styles.
BasicStroke(float, int, int) - Constructor for class java.awt.BasicStroke
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float, int, int, float) - Constructor for class java.awt.BasicStroke
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float, int, int, float, float[], float) - Constructor for class java.awt.BasicStroke
Constructs a new BasicStroke with the specified attributes.
BasicTabbedPaneUI - class javax.swing.plaf.basic.BasicTabbedPaneUI.
A Basic L&F implementation of TabbedPaneUI.
BasicTabbedPaneUI.FocusHandler - class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler.
This inner class is marked "public" due to a compiler bug.
BasicTabbedPaneUI.FocusHandler(BasicTabbedPaneUI) - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
BasicTabbedPaneUI.MouseHandler - class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler.
This inner class is marked "public" due to a compiler bug.
BasicTabbedPaneUI.MouseHandler(BasicTabbedPaneUI) - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler
BasicTabbedPaneUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler.
This inner class is marked "public" due to a compiler bug.
BasicTabbedPaneUI.PropertyChangeHandler(BasicTabbedPaneUI) - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler
BasicTabbedPaneUI.TabbedPaneLayout - class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout.
This inner class is marked "public" due to a compiler bug.
BasicTabbedPaneUI.TabbedPaneLayout(BasicTabbedPaneUI) - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
BasicTabbedPaneUI.TabSelectionHandler - class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler.
This inner class is marked "public" due to a compiler bug.
BasicTabbedPaneUI.TabSelectionHandler(BasicTabbedPaneUI) - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
BasicTabbedPaneUI() - Constructor for class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTableHeaderUI - class javax.swing.plaf.basic.BasicTableHeaderUI.
BasicTableHeaderUI implementation
BasicTableHeaderUI.MouseInputHandler - class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.
This inner class is marked "public" due to a compiler bug.
BasicTableHeaderUI.MouseInputHandler(BasicTableHeaderUI) - Constructor for class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler
BasicTableHeaderUI() - Constructor for class javax.swing.plaf.basic.BasicTableHeaderUI
BasicTableUI - class javax.swing.plaf.basic.BasicTableUI.
BasicTableUI implementation
BasicTableUI.FocusHandler - class javax.swing.plaf.basic.BasicTableUI.FocusHandler.
This inner class is marked "public" due to a compiler bug.
BasicTableUI.FocusHandler(BasicTableUI) - Constructor for class javax.swing.plaf.basic.BasicTableUI.FocusHandler
BasicTableUI.KeyHandler - class javax.swing.plaf.basic.BasicTableUI.KeyHandler.
This inner class is marked "public" due to a compiler bug.
BasicTableUI.KeyHandler(BasicTableUI) - Constructor for class javax.swing.plaf.basic.BasicTableUI.KeyHandler
BasicTableUI.MouseInputHandler - class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler.
This inner class is marked "public" due to a compiler bug.
BasicTableUI.MouseInputHandler(BasicTableUI) - Constructor for class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
BasicTableUI() - Constructor for class javax.swing.plaf.basic.BasicTableUI
BasicTextAreaUI - class javax.swing.plaf.basic.BasicTextAreaUI.
Provides the look and feel for a plain text editor.
BasicTextAreaUI() - Constructor for class javax.swing.plaf.basic.BasicTextAreaUI
Constructs a new BasicTextAreaUI object.
BasicTextFieldUI - class javax.swing.plaf.basic.BasicTextFieldUI.
Basis of a look and feel for a JTextField.
BasicTextFieldUI() - Constructor for class javax.swing.plaf.basic.BasicTextFieldUI
Creates a new BasicTextFieldUI.
BasicTextPaneUI - class javax.swing.plaf.basic.BasicTextPaneUI.
Provides the look and feel for a styled text editor.
BasicTextPaneUI() - Constructor for class javax.swing.plaf.basic.BasicTextPaneUI
Creates a new BasicTextPaneUI.
BasicTextUI - class javax.swing.plaf.basic.BasicTextUI.
Basis of a text components look-and-feel.
BasicTextUI.BasicCaret - class javax.swing.plaf.basic.BasicTextUI.BasicCaret.
BasicTextUI.BasicCaret() - Constructor for class javax.swing.plaf.basic.BasicTextUI.BasicCaret
BasicTextUI.BasicHighlighter - class javax.swing.plaf.basic.BasicTextUI.BasicHighlighter.
BasicTextUI.BasicHighlighter() - Constructor for class javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
BasicTextUI() - Constructor for class javax.swing.plaf.basic.BasicTextUI
Creates a new UI.
BasicToggleButtonUI - class javax.swing.plaf.basic.BasicToggleButtonUI.
BasicToggleButton implementation
BasicToggleButtonUI() - Constructor for class javax.swing.plaf.basic.BasicToggleButtonUI
BasicToolBarSeparatorUI - class javax.swing.plaf.basic.BasicToolBarSeparatorUI.
A Basic L&F implementation of ToolBarSeparatorUI.
BasicToolBarSeparatorUI() - Constructor for class javax.swing.plaf.basic.BasicToolBarSeparatorUI
BasicToolBarUI - class javax.swing.plaf.basic.BasicToolBarUI.
A Basic L&F implementation of ToolBarUI.
BasicToolBarUI.DockingListener - class javax.swing.plaf.basic.BasicToolBarUI.DockingListener.
This inner class is marked "public" due to a compiler bug.
BasicToolBarUI.DockingListener(BasicToolBarUI, JToolBar) - Constructor for class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
BasicToolBarUI.DragWindow - class javax.swing.plaf.basic.BasicToolBarUI.DragWindow.
BasicToolBarUI.FrameListener - class javax.swing.plaf.basic.BasicToolBarUI.FrameListener.
BasicToolBarUI.FrameListener(BasicToolBarUI) - Constructor for class javax.swing.plaf.basic.BasicToolBarUI.FrameListener
BasicToolBarUI.PropertyListener - class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener.
BasicToolBarUI.PropertyListener(BasicToolBarUI) - Constructor for class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener
BasicToolBarUI.ToolBarContListener - class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener.
BasicToolBarUI.ToolBarContListener(BasicToolBarUI) - Constructor for class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener
BasicToolBarUI.ToolBarFocusListener - class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener.
BasicToolBarUI.ToolBarFocusListener(BasicToolBarUI) - Constructor for class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener
BasicToolBarUI() - Constructor for class javax.swing.plaf.basic.BasicToolBarUI
BasicToolTipUI - class javax.swing.plaf.basic.BasicToolTipUI.
Standard tool tip L&F.
BasicToolTipUI() - Constructor for class javax.swing.plaf.basic.BasicToolTipUI
BasicTreeUI - class javax.swing.plaf.basic.BasicTreeUI.
The basic L&F for a hierarchical data structure.
BasicTreeUI.CellEditorHandler - class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler.
Listener responsible for getting cell editing events and updating the tree accordingly.
BasicTreeUI.CellEditorHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler
BasicTreeUI.ComponentHandler - class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler.
Updates the preferred size when scrolling (if necessary).
BasicTreeUI.ComponentHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
BasicTreeUI.FocusHandler - class javax.swing.plaf.basic.BasicTreeUI.FocusHandler.
Repaints the lead selection row when focus is lost/gained.
BasicTreeUI.FocusHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.FocusHandler
BasicTreeUI.KeyHandler - class javax.swing.plaf.basic.BasicTreeUI.KeyHandler.
This is used to get mutliple key down events to appropriately generate events.
BasicTreeUI.KeyHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
BasicTreeUI.MouseHandler - class javax.swing.plaf.basic.BasicTreeUI.MouseHandler.
TreeMouseListener is responsible for updating the selection based on mouse events.
BasicTreeUI.MouseHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.MouseHandler
BasicTreeUI.MouseInputHandler - class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler.
MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.
BasicTreeUI.MouseInputHandler(BasicTreeUI, Component, Component, MouseEvent) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler
BasicTreeUI.NodeDimensionsHandler - class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler.
Class responsible for getting size of node, method is forwarded to BasicTreeUI method.
BasicTreeUI.NodeDimensionsHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
BasicTreeUI.PropertyChangeHandler - class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler.
PropertyChangeListener for the tree.
BasicTreeUI.PropertyChangeHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler
BasicTreeUI.SelectionModelPropertyChangeHandler - class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler.
Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.
BasicTreeUI.SelectionModelPropertyChangeHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler
BasicTreeUI.TreeCancelEditingAction - class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction.
ActionListener that invokes cancelEditing when action performed.
BasicTreeUI.TreeCancelEditingAction(BasicTreeUI, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
BasicTreeUI.TreeExpansionHandler - class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler.
Updates the TreeState in response to nodes expanding/collapsing.
BasicTreeUI.TreeExpansionHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler
BasicTreeUI.TreeHomeAction - class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.
TreeHomeAction is used to handle end/home actions.
BasicTreeUI.TreeHomeAction(BasicTreeUI, int, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
BasicTreeUI.TreeIncrementAction - class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction.
TreeIncrementAction is used to handle up/down actions.
BasicTreeUI.TreeIncrementAction(BasicTreeUI, int, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
BasicTreeUI.TreeModelHandler - class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler.
Forwards all TreeModel events to the TreeState.
BasicTreeUI.TreeModelHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
BasicTreeUI.TreePageAction - class javax.swing.plaf.basic.BasicTreeUI.TreePageAction.
TreePageAction handles page up and page down events.
BasicTreeUI.TreePageAction(BasicTreeUI, int, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
BasicTreeUI.TreeSelectionHandler - class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler.
Listens for changes in the selection model and updates the display accordingly.
BasicTreeUI.TreeSelectionHandler(BasicTreeUI) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler
BasicTreeUI.TreeToggleAction - class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.
For the first selected row expandedness will be toggled.
BasicTreeUI.TreeToggleAction(BasicTreeUI, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
BasicTreeUI.TreeTraverseAction - class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction.
TreeTraverseAction is the action used for left/right keys.
BasicTreeUI.TreeTraverseAction(BasicTreeUI, int, String) - Constructor for class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
BasicTreeUI() - Constructor for class javax.swing.plaf.basic.BasicTreeUI
BasicViewportUI - class javax.swing.plaf.basic.BasicViewportUI.
BasicViewport implementation
BasicViewportUI() - Constructor for class javax.swing.plaf.basic.BasicViewportUI
BATCHSIZE - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol.
BatchUpdateException - exception java.sql.BatchUpdateException.
An exception thrown when an error occurs during a batch update operation.
BatchUpdateException() - Constructor for class java.sql.BatchUpdateException
Constructs a BatchUpdateException object with the reason, SQLState, and update count initialized to null and the vendor code initialized to 0.
BatchUpdateException(int[]) - Constructor for class java.sql.BatchUpdateException
Constructs a BatchUpdateException initialized to null for the reason and SQLState and 0 for the vendor code.
BatchUpdateException(String, int[]) - Constructor for class java.sql.BatchUpdateException
Constructs a BatchUpdateException initialized with reason, updateCounts and null for the SQLState and 0 for the vendorCode.
BatchUpdateException(String, String, int[]) - Constructor for class java.sql.BatchUpdateException
Constructs a BatchUpdateException initialized with the given arguments (reason, SQLState, and updateCounts) and 0 for the vendor code.
BatchUpdateException(String, String, int, int[]) - Constructor for class java.sql.BatchUpdateException
Constructs a fully-specified BatchUpdateException object, initializing it with the given values.
BC - Static variable in class java.util.GregorianCalendar
Value of the ERA field indicating the period before the common era (before Christ), also known as BCE.
bcmListeners - Variable in class java.beans.beancontext.BeanContextSupport
all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
bcsChildren() - Method in class java.beans.beancontext.BeanContextSupport
Returns an iterator of all children of this BeanContext.
bcsListeners - Variable in class java.beans.beancontext.BeanContextServicesSupport
List of BeanContextServicesListener objects.
bcsPreDeserializationHook(ObjectInputStream) - Method in class java.beans.beancontext.BeanContextSupport
called by readObject after defaultReadObject() but prior to deserialization of any children.
bcsPreDeserializationHook(ObjectInputStream) - Method in class java.beans.beancontext.BeanContextServicesSupport
called from BeanContextSupport readObject before it deserializes the children ...
bcsPreSerializationHook(ObjectOutputStream) - Method in class java.beans.beancontext.BeanContextSupport
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
bcsPreSerializationHook(ObjectOutputStream) - Method in class java.beans.beancontext.BeanContextServicesSupport
called from BeanContextSupport writeObject before it serializes the children ...
beanContext - Variable in class java.beans.beancontext.BeanContextChildSupport
BeanContext - interface java.beans.beancontext.BeanContext.
The BeanContext acts a logical hierarchical container for JavaBeans.
BeanContextChild - interface java.beans.beancontext.BeanContextChild.
JavaBeans wishing to be nested within, and obtain a reference to their execution environment, or context, as defined by the BeanContext sub-interface shall implement this interface.
BeanContextChildComponentProxy - interface java.beans.beancontext.BeanContextChildComponentProxy.
This interface is implemented by BeanContextChildren that have an AWT Component associated with them.
beanContextChildPeer - Variable in class java.beans.beancontext.BeanContextChildSupport
The BeanContext in which this BeanContextChild is nested.
BeanContextChildSupport - class java.beans.beancontext.BeanContextChildSupport.
This is a general support class to provide support for implementing the BeanContextChild protocol.
BeanContextChildSupport() - Constructor for class java.beans.beancontext.BeanContextChildSupport
construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself.
BeanContextChildSupport(BeanContextChild) - Constructor for class java.beans.beancontext.BeanContextChildSupport
construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation
BeanContextContainerProxy - interface java.beans.beancontext.BeanContextContainerProxy.
This interface is implemented by BeanContexts' that have an AWT Container associated with them.
BeanContextEvent - class java.beans.beancontext.BeanContextEvent.
BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
BeanContextEvent(BeanContext) - Constructor for class java.beans.beancontext.BeanContextEvent
Contruct a BeanContextEvent
BeanContextMembershipEvent - class java.beans.beancontext.BeanContextMembershipEvent.
A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
BeanContextMembershipEvent(BeanContext, Collection) - Constructor for class java.beans.beancontext.BeanContextMembershipEvent
Contruct a BeanContextMembershipEvent
BeanContextMembershipEvent(BeanContext, Object[]) - Constructor for class java.beans.beancontext.BeanContextMembershipEvent
Contruct a BeanContextMembershipEvent
BeanContextMembershipListener - interface java.beans.beancontext.BeanContextMembershipListener.
Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.
BeanContextProxy - interface java.beans.beancontext.BeanContextProxy.
This interface is implemented by a JavaBean that does not directly have a BeanContext(Child) associated with it (via implementing that interface or a subinterface thereof), but has a public BeanContext(Child) delegated from it.
BeanContextServiceAvailableEvent - class java.beans.beancontext.BeanContextServiceAvailableEvent.
This event type is used by the BeanContextServicesListener in order to identify the service being registered.
BeanContextServiceAvailableEvent(BeanContextServices, Class) - Constructor for class java.beans.beancontext.BeanContextServiceAvailableEvent
Construct a BeanContextAvailableServiceEvent.
BeanContextServiceProvider - interface java.beans.beancontext.BeanContextServiceProvider.
One of the primary functions of a BeanContext is to act a as rendezvous between JavaBeans, and BeanContextServiceProviders.
BeanContextServiceProviderBeanInfo - interface java.beans.beancontext.BeanContextServiceProviderBeanInfo.
A BeanContextServiceProvider implementor who wishes to provide explicit information about the services their bean may provide shall implement a BeanInfo class that implements this BeanInfo subinterface and provides explicit information about the methods, properties, events, etc, of their services.
BeanContextServiceRevokedEvent - class java.beans.beancontext.BeanContextServiceRevokedEvent.
This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.
BeanContextServiceRevokedEvent(BeanContextServices, Class, boolean) - Constructor for class java.beans.beancontext.BeanContextServiceRevokedEvent
Construct a BeanContextServiceEvent.
BeanContextServiceRevokedListener - interface java.beans.beancontext.BeanContextServiceRevokedListener.
The listener interface for receiving BeanContextServiceRevokedEvent objects.
BeanContextServices - interface java.beans.beancontext.BeanContextServices.
The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.
BeanContextServicesListener - interface java.beans.beancontext.BeanContextServicesListener.
The listener interface for receiving BeanContextServiceAvailableEvent objects.
BeanContextServicesSupport - class java.beans.beancontext.BeanContextServicesSupport.
This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
BeanContextServicesSupport.BCSSChild - class java.beans.beancontext.BeanContextServicesSupport.BCSSChild.
BeanContextServicesSupport.BCSSProxyServiceProvider - class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider.
BeanContextServicesSupport.BCSSServiceProvider - class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider.
subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
BeanContextServicesSupport() - Constructor for class java.beans.beancontext.BeanContextServicesSupport
Create an instance that is not a delegate of another object
BeanContextServicesSupport(BeanContextServices) - Constructor for class java.beans.beancontext.BeanContextServicesSupport
Create an instance with a peer
BeanContextServicesSupport(BeanContextServices, Locale) - Constructor for class java.beans.beancontext.BeanContextServicesSupport
Create an instance using the specified locale
BeanContextServicesSupport(BeanContextServices, Locale, boolean) - Constructor for class java.beans.beancontext.BeanContextServicesSupport
Create an instance using the specified Locale and design mode.
BeanContextServicesSupport(BeanContextServices, Locale, boolean, boolean) - Constructor for class java.beans.beancontext.BeanContextServicesSupport
Construct a BeanContextServicesSupport instance
BeanContextSupport - class java.beans.beancontext.BeanContextSupport.
This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
BeanContextSupport.BCSChild - class java.beans.beancontext.BeanContextSupport.BCSChild.
BeanContextSupport.BCSIterator - class java.beans.beancontext.BeanContextSupport.BCSIterator.
protected final subclass that encapsulates an iterator but implements a noop remove() method.
BeanContextSupport() - Constructor for class java.beans.beancontext.BeanContextSupport
Create an instance that is not a delegate of another object
BeanContextSupport(BeanContext) - Constructor for class java.beans.beancontext.BeanContextSupport
Create an instance using with a default locale
BeanContextSupport(BeanContext, Locale) - Constructor for class java.beans.beancontext.BeanContextSupport
Create an instance using the specified locale
BeanContextSupport(BeanContext, Locale, boolean) - Constructor for class java.beans.beancontext.BeanContextSupport
Create an instance using the specified Locale and design mode.
BeanContextSupport(BeanContext, Locale, boolean, boolean) - Constructor for class java.beans.beancontext.BeanContextSupport
Construct a BeanContextSupport instance
BeanDescriptor - class java.beans.BeanDescriptor.
A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.
BeanDescriptor(Class) - Constructor for class java.beans.BeanDescriptor
Create a BeanDescriptor for a bean that doesn't have a customizer.
BeanDescriptor(Class, Class) - Constructor for class java.beans.BeanDescriptor
Create a BeanDescriptor for a bean that has a customizer.
BeanInfo - interface java.beans.BeanInfo.
A bean implementor who wishes to provide explicit information about their bean may provide a BeanInfo class that implements this BeanInfo interface and provides explicit information about the methods, properties, events, etc, of their bean.
Beans - class java.beans.Beans.
This class provides some general purpose beans control methods.
Beans() - Constructor for class java.beans.Beans
beep() - Method in class java.awt.Toolkit
Emits an audio beep.
beepAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to create a beep.
BEFORE_FIRST_LINE - Static variable in class java.awt.BorderLayout
The component comes before the first line of the layout's content.
BEFORE_LINE_BEGINS - Static variable in class java.awt.BorderLayout
The component goes at the beginning of the line direction for the layout.
before(Date) - Method in class java.util.Date
Tests if this date is before the specified date.
before(Object) - Method in class java.util.Calendar
Compares the time field records.
before(Timestamp) - Method in class java.sql.Timestamp
Indicates whether this Timestamp object is earlier than the given Timestamp object.
beforeFirst() - Method in interface java.sql.ResultSet
Moves the cursor to the front of this ResultSet object, just before the first row.
beforeOffset(int) - Static method in class java.awt.font.TextHitInfo
Creates a TextHitInfo at the specified offset, associated with the character before the offset.
beginAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of the document.
beginDragDividerLocation - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Location of the divider when the dragging session began.
beginDraggingFrame(JComponent) - Method in interface javax.swing.DesktopManager
This method is normally called when the user has indicated that they will begin dragging a component around.
beginDraggingFrame(JComponent) - Method in class javax.swing.DefaultDesktopManager
beginLineAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a line.
beginParagraphAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a paragraph.
beginResizingFrame(JComponent, int) - Method in interface javax.swing.DesktopManager
This methods is normally called when the user has indicated that they will begin resizing the frame.
beginResizingFrame(JComponent, int) - Method in class javax.swing.DefaultDesktopManager
beginUpdate() - Method in class javax.swing.undo.UndoableEditSupport
beginWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a word.
BELOW_BOTTOM - Static variable in class javax.swing.border.TitledBorder
Position the title below the border's bottom line.
BELOW_TOP - Static variable in class javax.swing.border.TitledBorder
Position the title below the border's top line.
BENGALI - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
BEST_COMPRESSION - Static variable in class java.util.zip.Deflater
Compression level for best compression.
BEST_SPEED - Static variable in class java.util.zip.Deflater
Compression level for fastest compression.
bestRowNotPseudo - Static variable in interface java.sql.DatabaseMetaData
Indicates that the best row identifier is NOT a pseudo column.
bestRowPseudo - Static variable in interface java.sql.DatabaseMetaData
Indicates that the best row identifier is a pseudo column.
bestRowSession - Static variable in interface java.sql.DatabaseMetaData
Indicates that the scope of the best row identifier is the remainder of the current session.
bestRowTemporary - Static variable in interface java.sql.DatabaseMetaData
Indicates that the scope of the best row identifier is very temporary, lasting only while the row is being used.
bestRowTransaction - Static variable in interface java.sql.DatabaseMetaData
Indicates that the scope of the best row identifier is the remainder of the current transaction.
bestRowUnknown - Static variable in interface java.sql.DatabaseMetaData
Indicates that the best row identifier may or may not be a pseudo column.
BevelBorder - class javax.swing.border.BevelBorder.
A class which implements a simple 2 line bevel border.
BevelBorder(int) - Constructor for class javax.swing.border.BevelBorder
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
BevelBorder(int, Color, Color) - Constructor for class javax.swing.border.BevelBorder
Creates a bevel border with the specified type, highlight and shadow colors.
BevelBorder(int, Color, Color, Color, Color) - Constructor for class javax.swing.border.BevelBorder
Creates a bevel border with the specified type, highlight shadow colors.
bevelType - Variable in class javax.swing.border.BevelBorder
BGCOLOR - Static variable in class javax.swing.text.html.HTML.Attribute
BIDI_EMBEDDING - Static variable in class java.awt.font.TextAttribute
Attribute key for the embedding level for nested bidirectional runs.
BidiElementName - Static variable in class javax.swing.text.AbstractDocument
Name of elements used to hold a unidirectional run
BidiLevel - Static variable in class javax.swing.text.StyleConstants
Bidirectional level of a character as assigned by the Unicode bidi algorithm.
BidiLevel - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Bidirectional level of a character as assigned by the Unicode bidi algorithm.
BIG - Static variable in class javax.swing.text.html.HTML.Tag
BigDecimal - class java.math.BigDecimal.
Immutable, arbitrary-precision signed decimal numbers.
BigDecimal(BigInteger) - Constructor for class java.math.BigDecimal
Translates a BigInteger into a BigDecimal.
BigDecimal(BigInteger, int) - Constructor for class java.math.BigDecimal
Translates a BigInteger unscaled value and an int scale into a BigDecimal.
BigDecimal(double) - Constructor for class java.math.BigDecimal
Translates a double into a BigDecimal.
BigDecimal(String) - Constructor for class java.math.BigDecimal
Translates the String representation of a BigDecmal into a BigDecimal.
bigEndian - Variable in class javax.sound.sampled.AudioFormat
Indicates whether the audio data is stored in big-endian or little-endian order.
BIGINT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.
BigInteger - class java.math.BigInteger.
Immutable arbitrary-precision integers.
BigInteger(byte[]) - Constructor for class java.math.BigInteger
Translates a byte array containing the two's-complement binary representation of a BigInteger into a BigInteger.
BigInteger(int, byte[]) - Constructor for class java.math.BigInteger
Translates the sign-magnitude representation of a BigInteger into a BigInteger.
BigInteger(int, int, Random) - Constructor for class java.math.BigInteger
Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.
BigInteger(int, Random) - Constructor for class java.math.BigInteger
Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits - 1), inclusive.
BigInteger(String) - Constructor for class java.math.BigInteger
Translates the decimal String representation of a BigInteger into a BigInteger.
BigInteger(String, int) - Constructor for class java.math.BigInteger
Translates the String representation of a BigInteger in the specified radix into a BigInteger.
BINARY - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.
BinaryRefAddr - class javax.naming.BinaryRefAddr.
This class represents the binary form of the address of a communications end-point.
BinaryRefAddr(String, byte[]) - Constructor for class javax.naming.BinaryRefAddr
Constructs a new instance of BinaryRefAddr using its address type and a byte array for contents.
BinaryRefAddr(String, byte[], int, int) - Constructor for class javax.naming.BinaryRefAddr
Constructs a new instance of BinaryRefAddr using its address type and a region of a byte array for contents.
binarySearch(byte[], byte) - Static method in class java.util.Arrays
Searches the specified array of bytes for the specified value using the binary search algorithm.
binarySearch(char[], char) - Static method in class java.util.Arrays
Searches the specified array of chars for the specified value using the binary search algorithm.
binarySearch(double[], double) - Static method in class java.util.Arrays
Searches the specified array of doubles for the specified value using the binary search algorithm.
binarySearch(float[], float) - Static method in class java.util.Arrays
Searches the specified array of floats for the specified value using the binary search algorithm.
binarySearch(int[], int) - Static method in class java.util.Arrays
Searches the specified array of ints for the specified value using the binary search algorithm.
binarySearch(List, Object) - Static method in class java.util.Collections
Searches the specified list for the specified object using the binary search algorithm.
binarySearch(List, Object, Comparator) - Static method in class java.util.Collections
Searches the specified list for the specified object using the binary search algorithm.
binarySearch(long[], long) - Static method in class java.util.Arrays
Searches the specified array of longs for the specified value using the binary search algorithm.
binarySearch(Object[], Object) - Static method in class java.util.Arrays
Searches the specified array for the specified object using the binary search algorithm.
binarySearch(Object[], Object, Comparator) - Static method in class java.util.Arrays
Searches the specified array for the specified object using the binary search algorithm.
binarySearch(short[], short) - Static method in class java.util.Arrays
Searches the specified array of shorts for the specified value using the binary search algorithm.
bind_context(NameComponent[], NamingContext) - Method in class org.omg.CosNaming._NamingContextStub
bind_context(NameComponent[], NamingContext) - Method in interface org.omg.CosNaming.NamingContextOperations
Names an object that is a naming context.
bind_new_context(NameComponent[]) - Method in class org.omg.CosNaming._NamingContextStub
bind_new_context(NameComponent[]) - Method in interface org.omg.CosNaming.NamingContextOperations
This operation creates a new context and binds it to the name supplied as an argument.
bind(InetAddress, int) - Method in class java.net.SocketImpl
Binds this socket to the specified port number on the specified host.
bind(int, InetAddress) - Method in class java.net.DatagramSocketImpl
Binds a datagram socket to a local port and address.
bind(NameComponent[], Object) - Method in class org.omg.CosNaming._NamingContextStub
bind(NameComponent[], Object) - Method in interface org.omg.CosNaming.NamingContextOperations
Creates a binding of a name and an object in the naming context.
bind(Name, Object) - Method in class javax.naming.InitialContext
bind(Name, Object) - Method in interface javax.naming.Context
Binds a name to an object.
bind(Name, Object, Attributes) - Method in interface javax.naming.directory.DirContext
Binds a name to an object, along with associated attributes.
bind(Name, Object, Attributes) - Method in class javax.naming.directory.InitialDirContext
bind(String, Object) - Method in class javax.naming.InitialContext
bind(String, Object) - Method in interface javax.naming.Context
Binds a name to an object.
bind(String, Object, Attributes) - Method in interface javax.naming.directory.DirContext
Binds a name to an object, along with associated attributes.
bind(String, Object, Attributes) - Method in class javax.naming.directory.InitialDirContext
bind(String, Remote) - Static method in class java.rmi.Naming
Binds the specified name to a remote object.
bind(String, Remote) - Method in interface java.rmi.registry.Registry
Binds the specified name to a remote object.
BindException - exception java.net.BindException.
Signals that an error occurred while attempting to bind a socket to a local address and port.
BindException() - Constructor for class java.net.BindException
Construct a new BindException with no detailed message.
BindException(String) - Constructor for class java.net.BindException
Constructs a new BindException with the specified detail message as to why the bind error occurred.
Binding - class javax.naming.Binding.
This class represents a name-to-object binding found in a context.
Binding - class org.omg.CosNaming.Binding.
binding_name - Variable in class org.omg.CosNaming.Binding
binding_type - Variable in class org.omg.CosNaming.Binding
Binding() - Constructor for class org.omg.CosNaming.Binding
Binding(NameComponent[], BindingType) - Constructor for class org.omg.CosNaming.Binding
Binding(String, Object) - Constructor for class javax.naming.Binding
Constructs an instance of a Binding given its name and object.
Binding(String, Object, boolean) - Constructor for class javax.naming.Binding
Constructs an instance of a Binding given its name, object, and whether the name is relative.
Binding(String, String, Object) - Constructor for class javax.naming.Binding
Constructs an instance of a Binding given its name, class name, and object.
Binding(String, String, Object, boolean) - Constructor for class javax.naming.Binding
Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.
BindingHelper - class org.omg.CosNaming.BindingHelper.
BindingHolder - class org.omg.CosNaming.BindingHolder.
BindingHolder() - Constructor for class org.omg.CosNaming.BindingHolder
BindingHolder(Binding) - Constructor for class org.omg.CosNaming.BindingHolder
BindingIterator - interface org.omg.CosNaming.BindingIterator.
The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
BindingIteratorHelper - class org.omg.CosNaming.BindingIteratorHelper.
BindingIteratorHolder - class org.omg.CosNaming.BindingIteratorHolder.
BindingIteratorHolder() - Constructor for class org.omg.CosNaming.BindingIteratorHolder
BindingIteratorHolder(BindingIterator) - Constructor for class org.omg.CosNaming.BindingIteratorHolder
BindingIteratorOperations - interface org.omg.CosNaming.BindingIteratorOperations.
org/omg/CosNaming/BindingIteratorOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:52 PM PST
BindingListHelper - class org.omg.CosNaming.BindingListHelper.
BindingListHolder - class org.omg.CosNaming.BindingListHolder.
BindingListHolder() - Constructor for class org.omg.CosNaming.BindingListHolder
BindingListHolder(Binding[]) - Constructor for class org.omg.CosNaming.BindingListHolder
BindingType - class org.omg.CosNaming.BindingType.
BindingTypeHelper - class org.omg.CosNaming.BindingTypeHelper.
BindingTypeHolder - class org.omg.CosNaming.BindingTypeHolder.
BindingTypeHolder() - Constructor for class org.omg.CosNaming.BindingTypeHolder
BindingTypeHolder(BindingType) - Constructor for class org.omg.CosNaming.BindingTypeHolder
BIT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.
bitCount() - Method in class java.math.BigInteger
Returns the number of bits in the two's complement representation of this BigInteger that differ from its sign bit.
bitLength() - Method in class java.math.BigInteger
Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit.
BITMASK - Static variable in interface java.awt.Transparency
Represents image data that is guaranteed to be either completely opaque, with an alpha value of 1.0, or completely transparent, with an alpha value of 0.0.
BitSet - class java.util.BitSet.
This class implements a vector of bits that grows as needed.
BitSet() - Constructor for class java.util.BitSet
Creates a new bit set.
BitSet(int) - Constructor for class java.util.BitSet
Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through nbits-1.
black - Static variable in class java.awt.Color
The color black.
BLIT_SCROLL_MODE - Static variable in class javax.swing.JViewport
Use graphics.copyArea() to implement scrolling.
Blob - interface java.sql.Blob.
The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
BLOB - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
BLOCK_DECREMENT - Static variable in class java.awt.event.AdjustmentEvent
The block decrement adjustment type.
BLOCK_ELEMENTS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
BLOCK_INCREMENT - Static variable in class java.awt.event.AdjustmentEvent
The block increment adjustment type.
blockClose(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds an instruction to the parse buffer to close out a block element of the given type.
blockIncrement - Variable in class javax.swing.JScrollBar
blockOpen(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds an instruction to the parse buffer to create a block element with the given attributes.
BLOCKQUOTE - Static variable in class javax.swing.text.html.HTML.Tag
BlockView - class javax.swing.text.html.BlockView.
A view implementation to display a block (as a box) with CSS specifications.
BlockView(Element, int) - Constructor for class javax.swing.text.html.BlockView
Creates a new view that represents an html box.
blue - Static variable in class java.awt.Color
The color blue.
BLUECOMPONENT - Static variable in class java.awt.color.ICC_ProfileRGB
To request a gamma value or TRC for the blue component.
body - Variable in class javax.swing.text.html.parser.DTD
BODY - Static variable in class javax.swing.text.html.HTML.Tag
Bold - Static variable in class javax.swing.text.StyleConstants
Name of the bold attribute.
Bold - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the bold attribute.
Bold - Static variable in class javax.swing.text.StyleConstants.FontConstants
Name of the bold attribute.
BOLD - Static variable in class java.awt.Font
The bold style constant.
BOLD_ACTION - Static variable in class javax.swing.text.html.HTMLEditorKit
The bold action identifier
Book - class java.awt.print.Book.
The Book class provides a representation of a document in which pages may have different page formats and page painters.
Book() - Constructor for class java.awt.print.Book
Creates a new, empty Book.
Boolean - class java.lang.Boolean.
The Boolean class wraps a value of the primitive type boolean in an object.
Boolean(boolean) - Constructor for class java.lang.Boolean
Allocates a Boolean object representing the value argument.
Boolean(String) - Constructor for class java.lang.Boolean
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".
BooleanControl - class javax.sound.sampled.BooleanControl.
A BooleanControl provides the ability to switch between two possible settings that affect a line's audio.
BooleanControl.Type - class javax.sound.sampled.BooleanControl.Type.
An instance of the BooleanControl.Type class identifies one kind of boolean control.
BooleanControl.Type(String) - Constructor for class javax.sound.sampled.BooleanControl.Type
Constructs a new boolean control type.
BooleanControl(BooleanControl.Type, boolean) - Constructor for class javax.sound.sampled.BooleanControl
Constructs a new boolean control object with the given parameters.
BooleanControl(BooleanControl.Type, boolean, String, String) - Constructor for class javax.sound.sampled.BooleanControl
Constructs a new boolean control object with the given parameters.
BooleanHolder - class org.omg.CORBA.BooleanHolder.
A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods.
BooleanHolder() - Constructor for class org.omg.CORBA.BooleanHolder
Constructs a new BooleanHolder object with its value field initialized to false.
BooleanHolder(boolean) - Constructor for class org.omg.CORBA.BooleanHolder
Constructs a new BooleanHolder object with its value field initialized with the given boolean.
BooleanSeqHelper - class org.omg.CORBA.BooleanSeqHelper.
org/omg/CORBA/BooleanSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
BooleanSeqHelper() - Constructor for class org.omg.CORBA.BooleanSeqHelper
BooleanSeqHolder - class org.omg.CORBA.BooleanSeqHolder.
org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
BooleanSeqHolder() - Constructor for class org.omg.CORBA.BooleanSeqHolder
BooleanSeqHolder(boolean[]) - Constructor for class org.omg.CORBA.BooleanSeqHolder
booleanValue() - Method in class java.lang.Boolean
Returns the value of this Boolean object as a boolean primitive.
BOPOMOFO - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
border - Variable in class javax.swing.border.TitledBorder
border - Variable in class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
Border to use.
Border - interface javax.swing.border.Border.
Interface describing an object capable of rendering a border around the edges of a swing component.
BORDER - Static variable in class javax.swing.text.html.HTML.Attribute
BORDER - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_BOTTOM - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_BOTTOM_WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_COLOR - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_LEFT - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_LEFT_WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_PAINTED_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to having the border drawn, or having it not drawn.
BORDER_PAINTED_FLAT_CHANGED_PROPERTY - Static variable in class javax.swing.JCheckBox
Identifies a change to the flat property.
BORDER_RIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_RIGHT_WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_STYLE - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_TOP - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_TOP_WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
BORDER_WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
BorderFactory - class javax.swing.BorderFactory.
Factory class for vending standard Border objects.
borderInsets - Static variable in class javax.swing.plaf.metal.MetalBorders.ButtonBorder
borderInsets - Static variable in class javax.swing.plaf.metal.MetalBorders.MenuBarBorder
borderInsets - Static variable in class javax.swing.plaf.metal.MetalBorders.MenuItemBorder
borderInsets - Static variable in class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder
BorderLayout - class java.awt.BorderLayout.
A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
BorderLayout() - Constructor for class java.awt.BorderLayout
Constructs a new border layout with no gaps between components.
BorderLayout(int, int) - Constructor for class java.awt.BorderLayout
Constructs a border layout with the specified gaps between components.
borderListener - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
borderSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Color to use for the background when the node isn't selected.
borderSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellEditor
True if the border selection color should be drawn.
BorderUIResource - class javax.swing.plaf.BorderUIResource.
BorderUIResource.BevelBorderUIResource - class javax.swing.plaf.BorderUIResource.BevelBorderUIResource.
BorderUIResource.BevelBorderUIResource(int) - Constructor for class javax.swing.plaf.BorderUIResource.BevelBorderUIResource
BorderUIResource.BevelBorderUIResource(int, Color, Color) - Constructor for class javax.swing.plaf.BorderUIResource.BevelBorderUIResource
BorderUIResource.BevelBorderUIResource(int, Color, Color, Color, Color) - Constructor for class javax.swing.plaf.BorderUIResource.BevelBorderUIResource
BorderUIResource.CompoundBorderUIResource - class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource.
BorderUIResource.CompoundBorderUIResource(Border, Border) - Constructor for class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource
BorderUIResource.EmptyBorderUIResource - class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource.
BorderUIResource.EmptyBorderUIResource(Insets) - Constructor for class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource
BorderUIResource.EmptyBorderUIResource(int, int, int, int) - Constructor for class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource
BorderUIResource.EtchedBorderUIResource - class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource.
BorderUIResource.EtchedBorderUIResource() - Constructor for class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
BorderUIResource.EtchedBorderUIResource(Color, Color) - Constructor for class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
BorderUIResource.EtchedBorderUIResource(int) - Constructor for class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
BorderUIResource.EtchedBorderUIResource(int, Color, Color) - Constructor for class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
BorderUIResource.LineBorderUIResource - class javax.swing.plaf.BorderUIResource.LineBorderUIResource.
BorderUIResource.LineBorderUIResource(Color) - Constructor for class javax.swing.plaf.BorderUIResource.LineBorderUIResource
BorderUIResource.LineBorderUIResource(Color, int) - Constructor for class javax.swing.plaf.BorderUIResource.LineBorderUIResource
BorderUIResource.MatteBorderUIResource - class javax.swing.plaf.BorderUIResource.MatteBorderUIResource.
BorderUIResource.MatteBorderUIResource(Icon) - Constructor for class javax.swing.plaf.BorderUIResource.MatteBorderUIResource
BorderUIResource.MatteBorderUIResource(int, int, int, int, Color) - Constructor for class javax.swing.plaf.BorderUIResource.MatteBorderUIResource
BorderUIResource.MatteBorderUIResource(int, int, int, int, Icon) - Constructor for class javax.swing.plaf.BorderUIResource.MatteBorderUIResource
BorderUIResource.TitledBorderUIResource - class javax.swing.plaf.BorderUIResource.TitledBorderUIResource.
BorderUIResource.TitledBorderUIResource(Border) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource.TitledBorderUIResource(Border, String) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource.TitledBorderUIResource(Border, String, int, int) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource.TitledBorderUIResource(Border, String, int, int, Font) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource.TitledBorderUIResource(Border, String, int, int, Font, Color) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource.TitledBorderUIResource(String) - Constructor for class javax.swing.plaf.BorderUIResource.TitledBorderUIResource
BorderUIResource(Border) - Constructor for class javax.swing.plaf.BorderUIResource
Creates a UIResource border object which wraps an existing Border instance.
BOTH - Static variable in class java.awt.GridBagConstraints
Resize the component both horizontally and vertically.
bottom - Variable in class java.awt.Insets
The inset from the bottom.
bottom - Variable in class javax.swing.border.EmptyBorder
BOTTOM - Static variable in interface javax.swing.SwingConstants
Box-orientation constant used to specify the bottom of a box.
BOTTOM - Static variable in class javax.swing.JSplitPane
Used to add a Component below the other Component.
BOTTOM - Static variable in class javax.swing.border.TitledBorder
Position the title in the middle of the border's bottom line.
BOTTOM_ALIGNMENT - Static variable in class java.awt.Component
Ease-of-use constant for getAlignmentY.
BOTTOM_ALIGNMENT - Static variable in class java.awt.font.GraphicAttribute
Aligns bottom of graphic to bottom of line.
BoundedRangeModel - interface javax.swing.BoundedRangeModel.
Defines the data model used by components like Sliders and ProgressBars.
bounds - Variable in class java.awt.Polygon
Bounds of the polygon.
Bounds - exception org.omg.CORBA.Bounds.
A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
Bounds - exception org.omg.CORBA.TypeCodePackage.Bounds.
Provides the TypeCode operations member_name(), member_type(), and member_label.
bounds() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getBounds().
Bounds() - Constructor for class org.omg.CORBA.Bounds
Constructs an Bounds with no specified detail message.
Bounds() - Constructor for class org.omg.CORBA.TypeCodePackage.Bounds
Constructs a Bounds exception with no reason message.
Bounds(String) - Constructor for class org.omg.CORBA.Bounds
Constructs an Bounds with the specified detail message.
Bounds(String) - Constructor for class org.omg.CORBA.TypeCodePackage.Bounds
Constructs a Bounds exception with the specified reason message.
Box - class javax.swing.Box.
A lightweight container that uses a BoxLayout object as its layout manager.
BOX_DRAWING - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Box.AccessibleBox - class javax.swing.Box.AccessibleBox.
This class implements accessibility support for the Box class.
Box.AccessibleBox(Box) - Constructor for class javax.swing.Box.AccessibleBox
Box.Filler - class javax.swing.Box.Filler.
An implementation of a lightweight component that participates in layout but has no view.
Box.Filler.AccessibleBoxFiller - class javax.swing.Box.Filler.AccessibleBoxFiller.
This class implements accessibility support for the Box.Filler class.
Box.Filler.AccessibleBoxFiller(Box.Filler) - Constructor for class javax.swing.Box.Filler.AccessibleBoxFiller
Box.Filler(Dimension, Dimension, Dimension) - Constructor for class javax.swing.Box.Filler
Constructor to create shape with the given size ranges.
Box(int) - Constructor for class javax.swing.Box
Creates a Box that displays its components along the the specified axis.
BoxedValueHelper - interface org.omg.CORBA.portable.BoxedValueHelper.
BoxLayout - class javax.swing.BoxLayout.
A layout manager that allows multiple components to be layed out either vertically or horizontally.
BoxLayout(Container, int) - Constructor for class javax.swing.BoxLayout
Creates a layout manager that will lay out components either left to right or top to bottom, as specified in the axis parameter.
BoxView - class javax.swing.text.BoxView.
A view that arranges its children into a box shape by tiling it's children along an axis.
BoxView(Element, int) - Constructor for class javax.swing.text.BoxView
Constructs a BoxView.
BR - Static variable in class javax.swing.text.html.HTML.Tag
breadthFirstEnumeration() - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.
BreakIterator - class java.text.BreakIterator.
The BreakIterator class implements methods for finding the location of boundaries in text.
BreakIterator() - Constructor for class java.text.BreakIterator
Constructor.
breaksFlow() - Method in class javax.swing.text.html.HTML.Tag
If the tag causes a line break, to the flow of data, then this method will return true.
breaksFlow() - Method in class javax.swing.text.html.parser.TagElement
breakView(int, float, Shape) - Method in class javax.swing.text.ParagraphView
Breaks this view on the given axis at the given length.
breakView(int, int, float, float) - Method in class javax.swing.text.View
Tries to break this view on the given axis.
breakView(int, int, float, float) - Method in class javax.swing.text.GlyphView
Breaks this view on the given axis at the given length.
BRIEF - Static variable in class java.rmi.server.LogStream
Deprecated. log level constant (brief logging).
brighter() - Method in class java.awt.Color
Creates a new Color that is a brighter version of this Color.
buf - Variable in class java.io.PushbackInputStream
The pushback buffer.
buf - Variable in class java.io.BufferedInputStream
The internal buffer array where the data is stored.
buf - Variable in class java.io.BufferedOutputStream
The internal buffer where data is stored.
buf - Variable in class java.io.ByteArrayInputStream
An array of bytes that was provided by the creator of the stream.
buf - Variable in class java.io.CharArrayReader
The character buffer.
buf - Variable in class java.io.CharArrayWriter
The buffer where data is stored.
buf - Variable in class java.io.ByteArrayOutputStream
The buffer where data is stored.
buf - Variable in class java.util.zip.InflaterInputStream
Input buffer for decompression.
buf - Variable in class java.util.zip.DeflaterOutputStream
Output buffer for writing compressed data.
buffer - Variable in class java.io.PipedInputStream
The circular buffer into which incoming data is placed.
buffer - Variable in class java.io.StringBufferInputStream
Deprecated. The string from which bytes are read.
buffer - Variable in class javax.swing.text.DefaultStyledDocument
BUFFER_SIZE_DEFAULT - Static variable in class javax.swing.text.DefaultStyledDocument
The default size of the initial content buffer.
BUFFERED_OPTION - Static variable in class javax.swing.DebugGraphics
Show buffered operations in a seperate Frame.
BufferedImage - class java.awt.image.BufferedImage.
The BufferedImage subclass describes an Image with an accessible buffer of image data.
BufferedImage(ColorModel, WritableRaster, boolean, Hashtable) - Constructor for class java.awt.image.BufferedImage
Constructs a new BufferedImage with a specified ColorModel and Raster.
BufferedImage(int, int, int) - Constructor for class java.awt.image.BufferedImage
Constructs a BufferedImage of one of the predefined image types.
BufferedImage(int, int, int, IndexColorModel) - Constructor for class java.awt.image.BufferedImage
Constructs a BufferedImage of one of the predefined image types: TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED
BufferedImageFilter - class java.awt.image.BufferedImageFilter.
The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
BufferedImageFilter(BufferedImageOp) - Constructor for class java.awt.image.BufferedImageFilter
Constructs a BufferedImageFilter with the specified single-source/single-destination operator.
BufferedImageOp - interface java.awt.image.BufferedImageOp.
This interface describes single-input/single-output operations performed on BufferedImage objects.
BufferedInputStream - class java.io.BufferedInputStream.
A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
BufferedInputStream(InputStream) - Constructor for class java.io.BufferedInputStream
Creates a BufferedInputStream and saves its argument, the input stream in, for later use.
BufferedInputStream(InputStream, int) - Constructor for class java.io.BufferedInputStream
Creates a BufferedInputStream with the specified buffer size, and saves its argument, the input stream in, for later use.
BufferedOutputStream - class java.io.BufferedOutputStream.
The class implements a buffered output stream.
BufferedOutputStream(OutputStream) - Constructor for class java.io.BufferedOutputStream
Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
BufferedOutputStream(OutputStream, int) - Constructor for class java.io.BufferedOutputStream
Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
BufferedReader - class java.io.BufferedReader.
Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
BufferedReader(Reader) - Constructor for class java.io.BufferedReader
Create a buffering character-input stream that uses a default-sized input buffer.
BufferedReader(Reader, int) - Constructor for class java.io.BufferedReader
Create a buffering character-input stream that uses an input buffer of the specified size.
BufferedWriter - class java.io.BufferedWriter.
Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
BufferedWriter(Writer) - Constructor for class java.io.BufferedWriter
Create a buffered character-output stream that uses a default-sized output buffer.
BufferedWriter(Writer, int) - Constructor for class java.io.BufferedWriter
Create a new buffered character-output stream that uses an output buffer of the given size.
buildChooser() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Builds a new chooser panel.
bumps - Variable in class javax.swing.plaf.metal.MetalScrollBarUI
bumps - Variable in class javax.swing.plaf.metal.MetalBorders.ToolBarBorder
burstStringInto(Container, String, int) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Recursively creates new JLabel instances to represent d.
BUSY - Static variable in class javax.accessibility.AccessibleState
Indicates the current object is busy.
Button - class java.awt.Button.
This class creates a labeled button.
Button.AccessibleAWTButton - class java.awt.Button.AccessibleAWTButton.
This class implements accessibility support for the Button class.
Button.AccessibleAWTButton(Button) - Constructor for class java.awt.Button.AccessibleAWTButton
Button() - Constructor for class java.awt.Button
Constructs a Button with no label.
Button(String) - Constructor for class java.awt.Button
Constructs a Button with the specified label.
BUTTON1_MASK - Static variable in class java.awt.event.InputEvent
The mouse button1 modifier constant.
BUTTON2_MASK - Static variable in class java.awt.event.InputEvent
The mouse button2 modifier constant.
BUTTON3_MASK - Static variable in class java.awt.event.InputEvent
The mouse button3 modifier constant.
ButtonGroup - class javax.swing.ButtonGroup.
This class is used to create a multiple-exclusion scope for a set of buttons.
ButtonGroup() - Constructor for class javax.swing.ButtonGroup
Creates a new ButtonGroup.
buttonIndex - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener
buttonListener - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
ButtonModel - interface javax.swing.ButtonModel.
State Model for buttons.
buttons - Variable in class javax.swing.ButtonGroup
ButtonUI - class javax.swing.plaf.ButtonUI.
Pluggable look and feel interface for JButton.
ButtonUI() - Constructor for class javax.swing.plaf.ButtonUI
Byte - class java.lang.Byte.
The Byte class is the standard wrapper for byte values.
Byte(byte) - Constructor for class java.lang.Byte
Constructs a Byte object initialized to the specified byte value.
Byte(String) - Constructor for class java.lang.Byte
Constructs a Byte object initialized to the value specified by the String parameter.
ByteArrayInputStream - class java.io.ByteArrayInputStream.
A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
ByteArrayInputStream(byte[]) - Constructor for class java.io.ByteArrayInputStream
Creates a ByteArrayInputStream so that it uses buf as its buffer array.
ByteArrayInputStream(byte[], int, int) - Constructor for class java.io.ByteArrayInputStream
Creates ByteArrayInputStream that uses buf as its buffer array.
ByteArrayOutputStream - class java.io.ByteArrayOutputStream.
This class implements an output stream in which the data is written into a byte array.
ByteArrayOutputStream() - Constructor for class java.io.ByteArrayOutputStream
Creates a new byte array output stream.
ByteArrayOutputStream(int) - Constructor for class java.io.ByteArrayOutputStream
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
ByteHolder - class org.omg.CORBA.ByteHolder.
A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods.
ByteHolder() - Constructor for class org.omg.CORBA.ByteHolder
Constructs a new ByteHolder object with its value field initialized to 0.
ByteHolder(byte) - Constructor for class org.omg.CORBA.ByteHolder
Constructs a new ByteHolder object for the given byte.
byteLength - Variable in class javax.sound.midi.MidiFileFormat
The length of the MIDI file in bytes.
ByteLookupTable - class java.awt.image.ByteLookupTable.
This class defines a lookup table object.
ByteLookupTable(int, byte[]) - Constructor for class java.awt.image.ByteLookupTable
Constructs a ByteLookupTable object from an array of bytes representing a lookup table to be applied to all bands.
ByteLookupTable(int, byte[][]) - Constructor for class java.awt.image.ByteLookupTable
Constructs a ByteLookupTable object from an array of byte arrays representing a lookup table for each band.
bytesTransferred - Variable in class java.io.InterruptedIOException
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
bytesWidth(byte[], int, int) - Method in class java.awt.FontMetrics
Returns the total advance width for showing the specified array of bytes in this Font.
byteValue() - Method in class java.lang.Number
Returns the value of the specified number as a byte.
byteValue() - Method in class java.lang.Long
Returns the value of this Long as a byte.
byteValue() - Method in class java.lang.Short
Returns the value of this Short as a byte.
byteValue() - Method in class java.lang.Float
Returns the value of this Float as a byte (by casting to a byte).
byteValue() - Method in class java.lang.Integer
Returns the value of this Integer as a byte.
byteValue() - Method in class java.lang.Byte
Returns the value of this Byte as a byte.
byteValue() - Method in class java.lang.Double
Returns the value of this Double as a byte (by casting to a byte).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


C-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

C

C - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Engineering C, 17 x 22 in.
C0 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C0.
C1 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C1.
C10 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C10.
C2 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C2.
C3 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C3.
C4 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C4.
C5 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C5.
C6 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C6.
C7 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C7.
C8 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C8.
C9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C9.
cachedMinimumSize - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
cacheIcon(File, Icon) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
calculateAlignedPositions(int, SizeRequirements, SizeRequirements[], int[], int[]) - Static method in class javax.swing.SizeRequirements
Creates a bunch of offset/span pairs specifying how to lay out a set of components with the specified alignments.
calculateBreakPosition(int, int) - Method in class javax.swing.text.WrappedPlainView
This is called by the nested wrapped line views to determine the break location.
calculateContentRect() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateFocusRect() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateGeometry() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateLabelRect() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateLayoutInfo() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
calculateMajorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.BoxView
calculateMajorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.html.BlockView
Calculate the requirements of the block along the major axis (i.e.
calculateMaxTabHeight(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateMaxTabHeight(int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
calculateMaxTabWidth(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateMinorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.BoxView
calculateMinorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.FlowView
Calculate equirements along the minor axis.
calculateMinorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.TableView
Calculate the requirements for the minor axis.
calculateMinorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.html.ParagraphView
Calculate the needs for the paragraph along the minor axis.
calculateMinorAxisRequirements(int, SizeRequirements) - Method in class javax.swing.text.html.BlockView
Calculate the requirements of the block along the minor axis (i.e.
calculateSize(boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
calculateTabAreaHeight(int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateTabAreaWidth(int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateTabHeight(int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateTabRects(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
calculateTabWidth(int, int, FontMetrics) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
calculateThumbLocation() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateThumbSize() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateTickRect() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateTiledPositions(int, SizeRequirements, SizeRequirements[], int[], int[]) - Static method in class javax.swing.SizeRequirements
Creates a bunch of offset/span pairs representing how to lay out a set of components end-to-end.
calculateTrackBuffer() - Method in class javax.swing.plaf.basic.BasicSliderUI
calculateTrackRect() - Method in class javax.swing.plaf.basic.BasicSliderUI
calendar - Variable in class java.text.DateFormat
The calendar that DateFormat uses to produce the time field values needed to implement date and time formatting.
Calendar - class java.util.Calendar.
Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Calendar() - Constructor for class java.util.Calendar
Constructs a Calendar with the default time zone and locale.
Calendar(TimeZone, Locale) - Constructor for class java.util.Calendar
Constructs a calendar with the specified time zone and locale.
CallableStatement - interface java.sql.CallableStatement.
The interface used to execute SQL stored procedures.
CANADA - Static variable in class java.util.Locale
Useful constant for country.
CANADA_FRENCH - Static variable in class java.util.Locale
Useful constant for country.
CANCEL_OPTION - Static variable in class javax.swing.JOptionPane
Return value from class method if CANCEL is chosen.
CANCEL_OPTION - Static variable in class javax.swing.JFileChooser
Return value if cancel is chosen.
CANCEL_SELECTION - Static variable in class javax.swing.JFileChooser
Instruction to cancel the current selection.
cancel() - Method in class java.awt.print.PrinterJob
Cancels a print job that is in progress.
cancel() - Method in interface java.sql.Statement
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
cancel() - Method in class java.util.TimerTask
Cancels this timer task.
cancel() - Method in class java.util.Timer
Terminates this timer, discarding any currently scheduled tasks.
cancelButtonMnemonic - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
cancelButtonText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
cancelButtonToolTipText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
cancelCellEditing() - Method in interface javax.swing.CellEditor
Tell the editor to cancel editing and not accept any partially edited value.
cancelCellEditing() - Method in class javax.swing.AbstractCellEditor
Calls fireEditingCanceled.
cancelCellEditing() - Method in class javax.swing.DefaultCellEditor
cancelCellEditing() - Method in class javax.swing.DefaultCellEditor.EditorDelegate
cancelCellEditing() - Method in class javax.swing.tree.DefaultTreeCellEditor
Messages cancelCellEditing to the realEditor and removes it from this instance.
cancelEditing() - Method in class javax.swing.JTree
Cancels the current editing session.
cancelEditing(JTree) - Method in class javax.swing.plaf.TreeUI
Cancels the current editing session.
cancelEditing(JTree) - Method in class javax.swing.plaf.basic.BasicTreeUI
Cancels the current editing session.
cancelEditing(JTree) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call cancelEditing on each UI handled by this MultiUI.
cancelLatestCommittedText(AttributedCharacterIterator.Attribute[]) - Method in interface java.awt.im.InputMethodRequests
Gets the latest committed text from the text editing component and removes it from the component's text body.
cancelRowUpdates() - Method in interface java.sql.ResultSet
Cancels the updates made to the current row in this ResultSet object.
cancelSelection() - Method in class javax.swing.JFileChooser
Called by the UI when the user chooses the Cancel button.
canDisplay(char) - Method in class java.awt.Font
Checks if this Font has a glyph for the specified character.
canDisplayUpTo(char[], int, int) - Method in class java.awt.Font
Indicates whether or not this Font can display the characters in the specified text starting at start and ending at limit.
canDisplayUpTo(CharacterIterator, int, int) - Method in class java.awt.Font
Indicates whether or not this Font can display the specified String.
canDisplayUpTo(String) - Method in class java.awt.Font
Indicates whether or not this Font can display a specified String.
canDock(Component, Point) - Method in class javax.swing.plaf.basic.BasicToolBarUI
canEdit - Variable in class javax.swing.tree.DefaultTreeCellEditor
Should isCellEditable return true? This is set in configure...
canEditImmediately(EventObject) - Method in class javax.swing.tree.DefaultTreeCellEditor
Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.
canFilterIndexColorModel - Variable in class java.awt.image.RGBImageFilter
This boolean indicates whether or not it is acceptable to apply the color filtering of the filterRGB method to the color table entries of an IndexColorModel object in lieu of pixel by pixel filtering.
CannotProceed - exception org.omg.CosNaming.NamingContextPackage.CannotProceed.
CannotProceed() - Constructor for class org.omg.CosNaming.NamingContextPackage.CannotProceed
CannotProceed(NamingContext, NameComponent[]) - Constructor for class org.omg.CosNaming.NamingContextPackage.CannotProceed
CannotProceedException - exception javax.naming.CannotProceedException.
This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
CannotProceedException() - Constructor for class javax.naming.CannotProceedException
Constructs a new instance of CannotProceedException.
CannotProceedException(String) - Constructor for class javax.naming.CannotProceedException
Constructs a new instance of CannotProceedException using an explanation.
CannotProceedHelper - class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.
CannotProceedHolder - class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder.
CannotProceedHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
CannotProceedHolder(CannotProceed) - Constructor for class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
CannotRedoException - exception javax.swing.undo.CannotRedoException.
Thrown when an UndoableEdit is told to redo() and can't.
CannotRedoException() - Constructor for class javax.swing.undo.CannotRedoException
CannotUndoException - exception javax.swing.undo.CannotUndoException.
Thrown when an UndoableEdit is told to undo() and can't.
CannotUndoException() - Constructor for class javax.swing.undo.CannotUndoException
CANONICAL_DECOMPOSITION - Static variable in class java.text.Collator
Decomposition mode value.
canPathsBeAdded(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Used to test if a particular set of TreePaths can be added.
canPathsBeRemoved(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns true if the paths can be removed without breaking the continuity of the model.
canRead() - Method in class java.io.File
Tests whether the application can read the file denoted by this abstract pathname.
canRedo() - Method in class javax.swing.undo.AbstractUndoableEdit
Returns true if this edit is alive and hasBeenDone is false.
canRedo() - Method in class javax.swing.undo.CompoundEdit
Returns false if isInProgress or if super does.
canRedo() - Method in class javax.swing.undo.UndoManager
Overridden to preserve usual semantics: returns true if a redo operation would be successful now, false otherwise
canRedo() - Method in interface javax.swing.undo.UndoableEdit
True if it is still possible to redo this operation
canUndo() - Method in class javax.swing.undo.AbstractUndoableEdit
Returns true if this edit is alive and hasBeenDone is true.
canUndo() - Method in class javax.swing.undo.CompoundEdit
Returns false if isInProgress or if super does.
canUndo() - Method in class javax.swing.undo.UndoManager
Overridden to preserve usual semantics: returns true if an undo operation would be successful now, false otherwise
canUndo() - Method in interface javax.swing.undo.UndoableEdit
True if it is still possible to undo this operation
canUndoOrRedo() - Method in class javax.swing.undo.UndoManager
Return true if calling undoOrRedo will undo or redo.
Canvas - class java.awt.Canvas.
A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
CANVAS - Static variable in class javax.accessibility.AccessibleRole
Object that can be drawn into and is used to trap events.
Canvas.AccessibleAWTCanvas - class java.awt.Canvas.AccessibleAWTCanvas.
This class implements accessibility support for the Canvas class.
Canvas.AccessibleAWTCanvas(Canvas) - Constructor for class java.awt.Canvas.AccessibleAWTCanvas
Canvas() - Constructor for class java.awt.Canvas
Constructs a new Canvas.
Canvas(GraphicsConfiguration) - Constructor for class java.awt.Canvas
Constructs a new Canvas given a GraphicsConfiguration object.
canWrite() - Method in class java.io.File
Tests whether the application can modify to the file denoted by this abstract pathname.
CAP_BUTT - Static variable in class java.awt.BasicStroke
Ends unclosed subpaths and dash segments with no added decoration.
CAP_ROUND - Static variable in class java.awt.BasicStroke
Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.
CAP_SQUARE - Static variable in class java.awt.BasicStroke
Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width.
capacity() - Method in class java.lang.StringBuffer
Returns the current capacity of the String buffer.
capacity() - Method in class java.util.Vector
Returns the current capacity of this vector.
capacity() - Method in class javax.swing.DefaultListModel
Returns the current capacity of this list.
capacityIncrement - Variable in class java.util.Vector
The amount by which the capacity of the vector is automatically incremented when its size becomes greater than its capacity.
CAPS_LOCK - Static variable in class java.awt.Event
The Caps Lock key, a non-ASCII action key.
CAPTION - Static variable in class javax.swing.text.html.HTML.Tag
CardLayout - class java.awt.CardLayout.
A CardLayout object is a layout manager for a container.
CardLayout() - Constructor for class java.awt.CardLayout
Creates a new card layout with gaps of size zero.
CardLayout(int, int) - Constructor for class java.awt.CardLayout
Creates a new card layout with the specified horizontal and vertical gaps.
Caret - interface javax.swing.text.Caret.
A place within a document view that represents where things can be inserted into the document model.
CARET_POSITION_CHANGED - Static variable in class java.awt.event.InputMethodEvent
The event type indicating a changed insertion point in input method text.
CaretEvent - class javax.swing.event.CaretEvent.
CaretEvent is used to notify interested parties that the text caret has changed in the event source.
CaretEvent(Object) - Constructor for class javax.swing.event.CaretEvent
Creates a new CaretEvent object.
CaretListener - interface javax.swing.event.CaretListener.
Listener for changes in the caret position of a text component.
caretPositionChanged(InputMethodEvent) - Method in class java.awt.AWTEventMulticaster
Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.
caretPositionChanged(InputMethodEvent) - Method in interface java.awt.event.InputMethodListener
Invoked when the caret within composed text has changed.
caretUpdate(CaretEvent) - Method in interface javax.swing.event.CaretListener
Called when the caret position is updated.
caretUpdate(CaretEvent) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Handles caret updates (fire appropriate property change event, which are AccessibleContext.ACCESSIBLE_CARET_PROPERTY and AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY).
CASE_INSENSITIVE_ORDER - Static variable in class java.lang.String
Returns a Comparator that orders String objects as by compareToIgnoreCase.
catchExceptions - Variable in class java.awt.event.InvocationEvent
Set to true if dispatch() catches Exception and stores it in the exception instance variable.
CDATA - Static variable in interface javax.swing.text.html.parser.DTDConstants
ceil(double) - Static method in class java.lang.StrictMath
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.
ceil(double) - Static method in class java.lang.Math
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.
CELL_EDITOR_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for cellEditor.
CELL_RENDERER_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for cellRenderer.
CELL_RENDERER_PROPERTY - Static variable in class javax.swing.table.TableColumn
Obsolete as of Java 2 platform v1.3.
cellEditor - Variable in class javax.swing.JTree
Editor for the entries.
cellEditor - Variable in class javax.swing.JTable
The object that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.
cellEditor - Variable in class javax.swing.table.TableColumn
The editor used to edit the data cells of the column.
cellEditor - Variable in class javax.swing.plaf.basic.BasicTreeUI
Editor for the tree.
CellEditor - interface javax.swing.CellEditor.
This interface defines the methods any general editor should be able to implement.
CellEditorListener - interface javax.swing.event.CellEditorListener.
CellEditorListener defines the interface for an object that listens to changes in a CellEditor
cellHeight - Variable in class javax.swing.plaf.basic.BasicListUI
cellHeights - Variable in class javax.swing.plaf.basic.BasicListUI
CELLPADDING - Static variable in class javax.swing.text.html.HTML.Attribute
cellRenderer - Variable in class javax.swing.JTree
The cell used to draw nodes.
cellRenderer - Variable in class javax.swing.table.TableColumn
The renderer used to draw the data cells of the column.
cellRendererChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
CellRendererPane - class javax.swing.CellRendererPane.
This class is inserted in between cell renderers and the components that use them.
CellRendererPane.AccessibleCellRendererPane - class javax.swing.CellRendererPane.AccessibleCellRendererPane.
This class implements accessibility support for the CellRendererPane class.
CellRendererPane.AccessibleCellRendererPane(CellRendererPane) - Constructor for class javax.swing.CellRendererPane.AccessibleCellRendererPane
CellRendererPane() - Constructor for class javax.swing.CellRendererPane
Construct a CellRendererPane object.
cellSelectionEnabled - Variable in class javax.swing.JTable
Obsolete as of Java 2 platform v1.3.
CELLSPACING - Static variable in class javax.swing.text.html.HTML.Attribute
cellWidth - Variable in class javax.swing.plaf.basic.BasicListUI
CENTER - Static variable in class java.awt.BorderLayout
The center layout constraint (middle of container).
CENTER - Static variable in class java.awt.GridBagConstraints
Put the component in the center of its display area.
CENTER - Static variable in class java.awt.Label
Indicates that the label should be centered.
CENTER - Static variable in class java.awt.FlowLayout
This value indicates that each row of components should be centered.
CENTER - Static variable in interface javax.swing.SwingConstants
The central position in an area.
CENTER - Static variable in class javax.swing.border.TitledBorder
Position title text in the center of the border line.
CENTER - Static variable in class javax.swing.text.html.HTML.Tag
CENTER_ALIGNMENT - Static variable in class java.awt.Component
Ease-of-use constant for getAlignmentY and getAlignmentX.
CENTER_BASELINE - Static variable in class java.awt.Font
The baseline used in ideographic scripts like Chinese, Japanese, and Korean when laying out text
CENTER_BASELINE - Static variable in class java.awt.font.GraphicAttribute
Aligns origin of graphic to center baseline of line.
centersChildren - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
If true, children are lumped together in parent.
Certificate - interface java.security.Certificate.
Deprecated. A new certificate handling package is created in the Java 2 platform. This Certificate interface is entirely deprecated and is here to allow for a smooth transition to the new package.
Certificate - class java.security.cert.Certificate.
Abstract class for managing a variety of identity certificates.
Certificate.CertificateRep - class java.security.cert.Certificate.CertificateRep.
Alternate Certificate class for serialization.
Certificate.CertificateRep(String, byte[]) - Constructor for class java.security.cert.Certificate.CertificateRep
Construct the alternate Certificate class with the Certificate type and Certificate encoding bytes.
Certificate(String) - Constructor for class java.security.cert.Certificate
Creates a certificate of the specified type.
CertificateEncodingException - exception java.security.cert.CertificateEncodingException.
Certificate Encoding Exception.
CertificateEncodingException() - Constructor for class java.security.cert.CertificateEncodingException
Constructs a CertificateEncodingException with no detail message.
CertificateEncodingException(String) - Constructor for class java.security.cert.CertificateEncodingException
Constructs a CertificateEncodingException with the specified detail message.
CertificateException - exception java.security.cert.CertificateException.
This exception indicates one of a variety of certificate problems.
CertificateException() - Constructor for class java.security.cert.CertificateException
CertificateException(String) - Constructor for class java.security.cert.CertificateException
Constructs a certificate exception with the given detail message.
CertificateExpiredException - exception java.security.cert.CertificateExpiredException.
Certificate Expired Exception.
CertificateExpiredException() - Constructor for class java.security.cert.CertificateExpiredException
Constructs a CertificateExpiredException with no detail message.
CertificateExpiredException(String) - Constructor for class java.security.cert.CertificateExpiredException
Constructs a CertificateExpiredException with the specified detail message.
CertificateFactory - class java.security.cert.CertificateFactory.
This class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.
CertificateFactory(CertificateFactorySpi, Provider, String) - Constructor for class java.security.cert.CertificateFactory
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.
CertificateFactorySpi - class java.security.cert.CertificateFactorySpi.
This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
CertificateFactorySpi() - Constructor for class java.security.cert.CertificateFactorySpi
CertificateNotYetValidException - exception java.security.cert.CertificateNotYetValidException.
Certificate is not yet valid exception.
CertificateNotYetValidException() - Constructor for class java.security.cert.CertificateNotYetValidException
Constructs a CertificateNotYetValidException with no detail message.
CertificateNotYetValidException(String) - Constructor for class java.security.cert.CertificateNotYetValidException
Constructs a CertificateNotYetValidException with the specified detail message.
CertificateParsingException - exception java.security.cert.CertificateParsingException.
Certificate Parsing Exception.
CertificateParsingException() - Constructor for class java.security.cert.CertificateParsingException
Constructs a CertificateParsingException with no detail message.
CertificateParsingException(String) - Constructor for class java.security.cert.CertificateParsingException
Constructs a CertificateParsingException with the specified detail message.
certificates() - Method in class java.security.Identity
Deprecated. Returns a copy of all the certificates for this identity.
CHANGE - Static variable in class javax.swing.event.DocumentEvent.EventType
Change type.
change(int, int, AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Changes content.
CHANGED - Static variable in class java.awt.dnd.DragSourceContext
An int used by updateCurrentCursor() indicating that the user operation has changed.
ChangedCharSetException - exception javax.swing.text.ChangedCharSetException.
ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.
ChangedCharSetException(String, boolean) - Constructor for class javax.swing.text.ChangedCharSetException
changedUpdate(DocumentEvent) - Method in interface javax.swing.event.DocumentListener
Gives notification that an attribute or set of attributes changed.
changedUpdate(DocumentEvent) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.View
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.GlyphView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.LabelView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.FlowView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.ParagraphView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.PlainView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.WrappedPlainView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.html.BlockView
changedUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.html.InlineView
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changedUpdate(FlowView, DocumentEvent, Rectangle) - Method in class javax.swing.text.FlowView.FlowStrategy
Gives notification from the document that attributes were changed in a location that this view is responsible for.
changeEvent - Variable in class javax.swing.DefaultSingleSelectionModel
changeEvent - Variable in class javax.swing.JTabbedPane
Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property.
changeEvent - Variable in class javax.swing.AbstractButton
Only one ChangeEvent is needed per button instance since the event's only state is the source property.
changeEvent - Variable in class javax.swing.DefaultBoundedRangeModel
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
changeEvent - Variable in class javax.swing.MenuSelectionManager
Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
changeEvent - Variable in class javax.swing.AbstractCellEditor
changeEvent - Variable in class javax.swing.DefaultButtonModel
Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
changeEvent - Variable in class javax.swing.JProgressBar
Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.
changeEvent - Variable in class javax.swing.JSlider
Only one ChangeEvent is needed per slider instance since the event's only (read-only) state is the source property.
changeEvent - Variable in class javax.swing.colorchooser.DefaultColorSelectionModel
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
changeEvent - Variable in class javax.swing.table.DefaultTableColumnModel
Change event (only one needed)
changeEvent - Variable in class javax.swing.text.StyleContext.NamedStyle
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
changeEvent - Variable in class javax.swing.text.DefaultCaret
The change event for the model.
ChangeEvent - class javax.swing.event.ChangeEvent.
ChangeEvent is used to notify interested parties that state has changed in the event source.
ChangeEvent(Object) - Constructor for class javax.swing.event.ChangeEvent
Constructs a ChangeEvent object.
changeHighlight(Object, int, int) - Method in interface javax.swing.text.Highlighter
Changes the given highlight to span a different portion of the document.
changeHighlight(Object, int, int) - Method in class javax.swing.text.DefaultHighlighter
Changes a highlight.
changeInfo - Variable in class javax.naming.event.NamingEvent
Contains information about the change that generated this event.
changeListener - Variable in class javax.swing.JTabbedPane
The changeListener is the listener we add to the model.
changeListener - Variable in class javax.swing.AbstractButton
The button model's changeListener.
changeListener - Variable in class javax.swing.JProgressBar
changeListener - Variable in class javax.swing.JSlider
The changeListener (no suffix) is the listener we add to the Sliders model.
changeListener - Variable in class javax.swing.plaf.basic.BasicMenuUI
changeListener - Variable in class javax.swing.plaf.basic.BasicProgressBarUI
changeListener - Variable in class javax.swing.plaf.basic.BasicMenuBarUI
changeListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
ChangeListener - interface javax.swing.event.ChangeListener.
Defines an object which listens for ChangeEvents.
changeSelection(int, int, boolean, boolean) - Method in class javax.swing.JTable
Updates the selection models of the table, depending on the state of the two flags: toggle and extend.
changeShape(Dimension, Dimension, Dimension) - Method in class javax.swing.Box.Filler
Change the size requests for this shape.
changeSupport - Variable in class javax.swing.AbstractAction
If any PropertyChangeListeners have been registered, the changeSupport field describes them.
changeSupport - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Used to messaged registered listeners.
changeToParentDirectory() - Method in class javax.swing.JFileChooser
Changes the directory to be set to the parent of the current directory.
changeUpdate() - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Updates the element structure in response to a change in the document.
channel - Variable in class javax.sound.midi.VoiceStatus
The MIDI channel on which this voice is playing.
CHANNEL_PRESSURE - Static variable in class javax.sound.midi.ShortMessage
Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)
channels - Variable in class javax.sound.sampled.AudioFormat
The number of audio channels in this format (1 for mono, 2 for stereo).
CHAR - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.
CHAR_REPLACEMENT - Static variable in class java.awt.font.TextAttribute
Attribute key for a user_defined glyph to display in the text in lieu of a character.
CHAR_UNDEFINED - Static variable in class java.awt.event.KeyEvent
KEY_PRESSED and KEY_RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
Character - class java.lang.Character.
The Character class wraps a value of the primitive type char in an object.
CHARACTER - Static variable in interface javax.accessibility.AccessibleText
Constant used to indicate that the part of the text that should be retrieved is a character.
Character.Subset - class java.lang.Character.Subset.
Instances of this class represent particular subsets of the Unicode character set.
Character.Subset(String) - Constructor for class java.lang.Character.Subset
Constructs a new Subset instance.
Character.UnicodeBlock - class java.lang.Character.UnicodeBlock.
A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.
Character(char) - Constructor for class java.lang.Character
Constructs a Character object and initializes it so that it represents the primitive value argument.
CharacterIterator - interface java.text.CharacterIterator.
This interface defines a protocol for bidirectional iteration over text.
CharArrayReader - class java.io.CharArrayReader.
This class implements a character buffer that can be used as a character-input stream.
CharArrayReader(char[]) - Constructor for class java.io.CharArrayReader
Create an CharArrayReader from the specified array of chars.
CharArrayReader(char[], int, int) - Constructor for class java.io.CharArrayReader
Create an CharArrayReader from the specified array of chars.
CharArrayWriter - class java.io.CharArrayWriter.
This class implements a character buffer that can be used as an Writer.
CharArrayWriter() - Constructor for class java.io.CharArrayWriter
Creates a new CharArrayWriter.
CharArrayWriter(int) - Constructor for class java.io.CharArrayWriter
Creates a new CharArrayWriter with the specified initial size.
charAt(int) - Method in class java.lang.String
Returns the character at the specified index.
charAt(int) - Method in class java.lang.StringBuffer
The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned.
charAttr - Variable in class javax.swing.text.html.HTMLDocument.HTMLReader
CharConversionException - exception java.io.CharConversionException.
Base class for character conversion exceptions.
CharConversionException() - Constructor for class java.io.CharConversionException
This provides no detailed message.
CharConversionException(String) - Constructor for class java.io.CharConversionException
This provides a detailed message.
CharHolder - class org.omg.CORBA.CharHolder.
A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods.
CharHolder() - Constructor for class org.omg.CORBA.CharHolder
Constructs a new CharHolder object with its value field initialized to 0.
CharHolder(char) - Constructor for class org.omg.CORBA.CharHolder
Constructs a new CharHolder object for the given char.
CharSeqHelper - class org.omg.CORBA.CharSeqHelper.
org/omg/CORBA/CharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
CharSeqHelper() - Constructor for class org.omg.CORBA.CharSeqHelper
CharSeqHolder - class org.omg.CORBA.CharSeqHolder.
org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
CharSeqHolder() - Constructor for class org.omg.CORBA.CharSeqHolder
CharSeqHolder(char[]) - Constructor for class org.omg.CORBA.CharSeqHolder
charsWidth(char[], int, int) - Method in class java.awt.FontMetrics
Returns the total advance width for showing the specified array of characters in this Font.
charValue() - Method in class java.lang.Character
Returns the value of this Character object.
charWidth(char) - Method in class java.awt.FontMetrics
Returns the advance width of the specified character in this Font.
charWidth(int) - Method in class java.awt.FontMetrics
Returns the advance width of the specified character in this Font.
CHECK_BOX - Static variable in class javax.accessibility.AccessibleRole
A choice that can be checked or unchecked and provides a separate indicator for the current state.
checkAccept(String, int) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.
checkAccess() - Method in class java.lang.ThreadGroup
Determines if the currently running thread has permission to modify this thread group.
checkAccess() - Method in class java.lang.Thread
Determines if the currently running thread has permission to modify this thread.
checkAccess(Thread) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
checkAccess(ThreadGroup) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.
checkAll() - Method in class java.awt.MediaTracker
Checks to see if all images being tracked by this media tracker have finished loading.
checkAll(boolean) - Method in class java.awt.MediaTracker
Checks to see if all images being tracked by this media tracker have finished loading.
checkAwtEventQueueAccess() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access the AWT event queue.
Checkbox - class java.awt.Checkbox.
A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
Checkbox.AccessibleAWTCheckbox - class java.awt.Checkbox.AccessibleAWTCheckbox.
This class implements accessibility support for the Checkbox class.
Checkbox.AccessibleAWTCheckbox(Checkbox) - Constructor for class java.awt.Checkbox.AccessibleAWTCheckbox
Checkbox() - Constructor for class java.awt.Checkbox
Creates a check box with no label.
Checkbox(String) - Constructor for class java.awt.Checkbox
Creates a check box with the specified label.
Checkbox(String, boolean) - Constructor for class java.awt.Checkbox
Creates a check box with the specified label and sets the specified state.
Checkbox(String, boolean, CheckboxGroup) - Constructor for class java.awt.Checkbox
Creates a check box with the specified label, in the specified check box group, and set to the specified state.
Checkbox(String, CheckboxGroup, boolean) - Constructor for class java.awt.Checkbox
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.
CheckboxGroup - class java.awt.CheckboxGroup.
The CheckboxGroup class is used to group together a set of Checkbox buttons.
CheckboxGroup() - Constructor for class java.awt.CheckboxGroup
Creates a new instance of CheckboxGroup.
CheckboxMenuItem - class java.awt.CheckboxMenuItem.
This class represents a check box that can be included in a menu.
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem - class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.
Inner class of CheckboxMenuItem used to provide default support for accessibility.
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem(CheckboxMenuItem) - Constructor for class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
CheckboxMenuItem() - Constructor for class java.awt.CheckboxMenuItem
Create a check box menu item with an empty label.
CheckboxMenuItem(String) - Constructor for class java.awt.CheckboxMenuItem
Create a check box menu item with the specified label.
CheckboxMenuItem(String, boolean) - Constructor for class java.awt.CheckboxMenuItem
Create a check box menu item with the specified label and state.
checkConnect(String, int) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.
checkConnect(String, int, Object) - Method in class java.lang.SecurityManager
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
checkCreateClassLoader() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to create a new class loader.
checkDelete(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to delete the specified file.
CHECKED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is currently checked.
CHECKED - Static variable in class javax.swing.text.html.HTML.Attribute
CheckedInputStream - class java.util.zip.CheckedInputStream.
An input stream that also maintains a checksum of the data being read.
CheckedInputStream(InputStream, Checksum) - Constructor for class java.util.zip.CheckedInputStream
Creates an input stream using the specified Checksum.
CheckedOutputStream - class java.util.zip.CheckedOutputStream.
An output stream that also maintains a checksum of the data being written.
CheckedOutputStream(OutputStream, Checksum) - Constructor for class java.util.zip.CheckedOutputStream
Creates an output stream with the specified Checksum.
checkError() - Method in class java.io.PrintStream
Flush the stream and check its error state.
checkError() - Method in class java.io.PrintWriter
Flush the stream and check its error state.
checkExec(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to create a subprocess.
checkExit(int) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.
checkForClickInExpandControl(TreePath, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
If the mouseX and mouseY are in the expand/collapse region of the row, this will toggle the row.
checkGuard(Object) - Method in class java.security.Permission
Implements the guard interface for a permission.
checkGuard(Object) - Method in interface java.security.Guard
Determines whether or not to allow access to the guarded object object.
checkHorizontalKey(int, String) - Method in class javax.swing.AbstractButton
Verify that key is a legal value for the horizontalAlignment properties.
checkHorizontalKey(int, String) - Method in class javax.swing.JLabel
Verify that key is a legal value for the horizontalAlignment properties.
checkIcon - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
checkID(int) - Method in class java.awt.MediaTracker
Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
checkID(int, boolean) - Method in class java.awt.MediaTracker
Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
checkImage(Image, ImageObserver) - Method in class java.awt.Component
Returns the status of the construction of a screen representation of the specified image.
checkImage(Image, int, int, ImageObserver) - Method in class java.awt.Component
Returns the status of the construction of a screen representation of the specified image.
checkImage(Image, int, int, ImageObserver) - Method in class java.awt.Toolkit
Indicates the construction status of a specified image that is being prepared for display.
checkLink(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.
checkListen(int) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.
checkMemberAccess(Class, int) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access members.
checkMulticast(InetAddress) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
checkMulticast(InetAddress, byte) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
checkOpacity(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonListener
checkPackageAccess(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.
checkPackageDefinition(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.
checkPainter() - Method in class javax.swing.text.GlyphView
Check to see that a glyph painter exists.
checkPermission(Permission) - Method in class java.lang.SecurityManager
Throws a SecurityException if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.
checkPermission(Permission) - Static method in class java.security.AccessController
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.
checkPermission(Permission) - Method in class java.security.AccessControlContext
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.
checkPermission(Permission) - Method in interface java.security.acl.AclEntry
Checks if the specified permission is part of the permission set in this entry.
checkPermission(Permission, Object) - Method in class java.lang.SecurityManager
Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission.
checkPermission(Principal, Permission) - Method in interface java.security.acl.Acl
Checks whether or not the specified principal has the specified permission.
checkPrintJobAccess() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to initiate a print job request.
checkPropertiesAccess() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.
checkPropertyAccess(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.
checkRead(FileDescriptor) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.
checkRead(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.
checkRead(String, Object) - Method in class java.lang.SecurityManager
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
checkSecurityAccess(String) - Method in class java.lang.SecurityManager
Determines whether the permission with the specified permission target name should be granted or denied.
checkSetFactory() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.
Checksum - interface java.util.zip.Checksum.
An interface representing a data checksum.
checkSystemClipboardAccess() - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to access the system clipboard.
checkTopLevelWindow(Object) - Method in class java.lang.SecurityManager
Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.
checkValidity() - Method in class java.security.cert.X509Certificate
Checks that the certificate is currently valid.
checkValidity(Date) - Method in class java.security.cert.X509Certificate
Checks that the given date is within the certificate's validity period.
checkVerticalKey(int, String) - Method in class javax.swing.AbstractButton
Ensures that the key is a valid.
checkVerticalKey(int, String) - Method in class javax.swing.JLabel
Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.
checkWrite(FileDescriptor) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.
checkWrite(String) - Method in class java.lang.SecurityManager
Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.
childAlloc - Variable in class javax.swing.text.AsyncBoxView.ChildLocator
A shape to use for the child allocation to avoid creating a lot of garbage.
childAllocation(int, Rectangle) - Method in class javax.swing.text.CompositeView
Returns the allocation for a given child.
childAllocation(int, Rectangle) - Method in class javax.swing.text.BoxView
Allocates a region for a child view.
childChanged(AsyncBoxView.ChildState) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Notification that a child changed.
childDeserializedHook(Object, BeanContextSupport.BCSChild) - Method in class java.beans.beancontext.BeanContextSupport
Called by readObject with the newly deserialized child and BCSChild.
childIndices - Variable in class javax.swing.event.TreeModelEvent
Indices identifying the position of where the children were.
childJustAddedHook(Object, BeanContextSupport.BCSChild) - Method in class java.beans.beancontext.BeanContextSupport
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
childJustRemovedHook(Object, BeanContextSupport.BCSChild) - Method in class java.beans.beancontext.BeanContextSupport
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
childJustRemovedHook(Object, BeanContextSupport.BCSChild) - Method in class java.beans.beancontext.BeanContextServicesSupport
called from superclass child removal operations after a child has been successfully removed.
children - Variable in class java.beans.beancontext.BeanContextMembershipEvent
The list of children affected by this event notification.
children - Variable in class java.beans.beancontext.BeanContextSupport
all accesses to the protected HashMap children field shall be synchronized on that object.
children - Variable in class javax.swing.event.TreeModelEvent
Children that have been removed.
children - Variable in class javax.swing.tree.DefaultMutableTreeNode
array of children, may be null if this node has no children
children() - Method in class javax.swing.JTree.DynamicUtilTreeNode
Subclassed to load the children, if necessary.
children() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns the children of the reciever as an Enumeration.
children() - Method in class javax.swing.text.AbstractDocument.BranchElement
Returns the children of the reciever as an Enumeration.
children() - Method in class javax.swing.text.AbstractDocument.LeafElement
Returns the children of the reciever as an Enumeration.
children() - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns a forward-order enumeration of this node's children.
children() - Method in interface javax.swing.tree.TreeNode
Returns the children of the reciever as an Enumeration.
childrenAdded(BeanContextMembershipEvent) - Method in interface java.beans.beancontext.BeanContextMembershipListener
Called when a child or list of children is added to a BeanContext that this listener is registered with.
childrenRemoved(BeanContextMembershipEvent) - Method in interface java.beans.beancontext.BeanContextMembershipListener
Called when a child or list of children is removed from a BeanContext that this listener is registered with.
childValue - Variable in class javax.swing.JTree.DynamicUtilTreeNode
Value to create children with.
childValue(Object) - Method in class java.lang.InheritableThreadLocal
Computes the child's initial value for this InheritableThreadLocal as a function of the parent's value at the time the child Thread is created.
CHINA - Static variable in class java.util.Locale
Useful constant for country.
CHINESE - Static variable in class java.util.Locale
Useful constant for language.
Choice - class java.awt.Choice.
The Choice class presents a pop-up menu of choices.
Choice.AccessibleAWTChoice - class java.awt.Choice.AccessibleAWTChoice.
This class implements accessibility support for the Choice class.
Choice.AccessibleAWTChoice(Choice) - Constructor for class java.awt.Choice.AccessibleAWTChoice
Choice() - Constructor for class java.awt.Choice
Creates a new choice menu.
ChoiceFormat - class java.text.ChoiceFormat.
A ChoiceFormat allows you to attach a format to a range of numbers.
ChoiceFormat(double[], String[]) - Constructor for class java.text.ChoiceFormat
Constructs with the limits and the corresponding formats.
ChoiceFormat(String) - Constructor for class java.text.ChoiceFormat
Constructs with limits and corresponding formats based on the pattern.
choices - Variable in class java.sql.DriverPropertyInfo
An array of possible values if the value for the field DriverPropertyInfo.value may be selected from a particular set of values; otherwise null.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies a change in the list of predefined file filters the user can choose from.
CHOOSER_PANELS_PROPERTY - Static variable in class javax.swing.JColorChooser
The chooserPanel array property name.
CHORD - Static variable in class java.awt.geom.Arc2D
The closure type for an arc closed by drawing a straight line segment from the start of the arc segment to the end of the arc segment.
CITE - Static variable in class javax.swing.text.html.HTML.Tag
CJK_COMPATIBILITY - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
CJK_COMPATIBILITY_FORMS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
CJK_COMPATIBILITY_IDEOGRAPHS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
CJK_SYMBOLS_AND_PUNCTUATION - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
CJK_UNIFIED_IDEOGRAPHS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Class - class java.lang.Class.
Instances of the class Class represent classes and interfaces in a running Java application.
CLASS - Static variable in class javax.swing.text.html.HTML.Attribute
CLASS_ABSTRACT - Static variable in class java.awt.color.ICC_Profile
Profile class is abstract.
CLASS_COLORSPACECONVERSION - Static variable in class java.awt.color.ICC_Profile
Profile class is color space conversion.
CLASS_DEVICELINK - Static variable in class java.awt.color.ICC_Profile
Profile class is device link.
CLASS_DISPLAY - Static variable in class java.awt.color.ICC_Profile
Profile class is display.
CLASS_INPUT - Static variable in class java.awt.color.ICC_Profile
Profile class is input.
CLASS_NAMEDCOLOR - Static variable in class java.awt.color.ICC_Profile
Profile class is named color.
CLASS_OUTPUT - Static variable in class java.awt.color.ICC_Profile
Profile class is output.
CLASS_PATH - Static variable in class java.util.jar.Attributes.Name
Name object for Class-Path manifest attribute.
ClassCastException - exception java.lang.ClassCastException.
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
ClassCastException() - Constructor for class java.lang.ClassCastException
Constructs a ClassCastException with no detail message.
ClassCastException(String) - Constructor for class java.lang.ClassCastException
Constructs a ClassCastException with the specified detail message.
ClassCircularityError - error java.lang.ClassCircularityError.
Thrown when a circularity has been detected while initializing a class.
ClassCircularityError() - Constructor for class java.lang.ClassCircularityError
Constructs a ClassCircularityError with no detail message.
ClassCircularityError(String) - Constructor for class java.lang.ClassCircularityError
Constructs a ClassCircularityError with the specified detail message.
classDepth(String) - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
ClassDesc - class javax.rmi.CORBA.ClassDesc.
This class is used to marshal java.lang.Class objects over IIOP.
ClassDesc() - Constructor for class javax.rmi.CORBA.ClassDesc
Creates an uninitialized class descriptor object.
classEquals(Class, Class) - Static method in class java.beans.beancontext.BeanContextSupport
Tests to see if two class objects, or their names are equal.
classFactory - Variable in class javax.naming.Reference
Contains the name of the factory class for creating an instance of the object to which this Reference refers.
classFactoryLocation - Variable in class javax.naming.Reference
Contains the location of the factory class.
ClassFormatError - error java.lang.ClassFormatError.
Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
ClassFormatError() - Constructor for class java.lang.ClassFormatError
Constructs a ClassFormatError with no detail message.
ClassFormatError(String) - Constructor for class java.lang.ClassFormatError
Constructs a ClassFormatError with the specified detail message.
CLASSID - Static variable in class javax.swing.text.html.HTML.Attribute
ClassLoader - class java.lang.ClassLoader.
The class ClassLoader is an abstract class.
ClassLoader() - Constructor for class java.lang.ClassLoader
Creates a new class loader using the ClassLoader returned by the method getSystemClassLoader() as the parent class loader.
ClassLoader(ClassLoader) - Constructor for class java.lang.ClassLoader
Creates a new class loader using the specified parent class loader for delegation.
classLoaderDepth() - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
classname - Variable in class java.io.InvalidClassException
Name of the invalid class.
className - Variable in class javax.naming.Reference
Contains the fully-qualified name of the class of the object to which this Reference refers.
ClassNotFoundException - exception java.lang.ClassNotFoundException.
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
ClassNotFoundException() - Constructor for class java.lang.ClassNotFoundException
Constructs a ClassNotFoundException with no detail message.
ClassNotFoundException(String) - Constructor for class java.lang.ClassNotFoundException
Constructs a ClassNotFoundException with the specified detail message.
ClassNotFoundException(String, Throwable) - Constructor for class java.lang.ClassNotFoundException
Constructs a ClassNotFoundException with the specified detail message and optional exception that was raised while loading the class.
clean(ObjID[], long, VMID, boolean) - Method in interface java.rmi.dgc.DGC
The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.
Clear - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque CLEAR rule with an alpha of 1.0f.
CLEAR - Static variable in class java.awt.AlphaComposite
Porter-Duff Clear rule.
CLEAR - Static variable in class javax.swing.text.html.HTML.Attribute
CLEAR - Static variable in class javax.swing.text.html.CSS.Attribute
clear() - Method in class java.awt.RenderingHints
Clears this RenderingHints object of all key/value pairs.
clear() - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by removeAll().
clear() - Method in class java.beans.beancontext.BeanContextSupport
clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
clear() - Method in class java.lang.ref.Reference
Clears this reference object.
clear() - Method in class java.security.Provider
Clears this provider so that it no longer contains the properties used to look up facilities implemented by the provider.
clear() - Method in class java.util.Hashtable
Clears this hashtable so that it contains no keys.
clear() - Method in class java.util.AbstractCollection
Removes all of the elements from this collection (optional operation).
clear() - Method in class java.util.TreeSet
Removes all of the elements from this set.
clear() - Method in class java.util.AbstractMap
Removes all mappings from this map (optional operation).
clear() - Method in class java.util.AbstractList
Removes all of the elements from this collection (optional operation).
clear() - Method in class java.util.Vector
Removes all of the elements from this Vector.
clear() - Method in interface java.util.Collection
Removes all of the elements from this collection (optional operation).
clear() - Method in class java.util.WeakHashMap
Removes all mappings from this map.
clear() - Method in class java.util.Calendar
Clears the values of all the time fields.
clear() - Method in class java.util.HashSet
Removes all of the elements from this set.
clear() - Method in interface java.util.Set
Removes all of the elements from this set (optional operation).
clear() - Method in class java.util.LinkedList
Removes all of the elements from this list.
clear() - Method in class java.util.TreeMap
Removes all mappings from this TreeMap.
clear() - Method in interface java.util.List
Removes all of the elements from this list (optional operation).
clear() - Method in class java.util.ArrayList
Removes all of the elements from this list.
clear() - Method in class java.util.HashMap
Removes all mappings from this map.
clear() - Method in interface java.util.Map
Removes all mappings from this map (optional operation).
clear() - Method in class java.util.jar.Attributes
Removes all attributes from this Map.
clear() - Method in class java.util.jar.Manifest
Clears the main Attributes as well as the entries in this Manifest.
clear() - Method in class javax.accessibility.AccessibleStateSet
Removes all the states from the current state set.
clear() - Method in class javax.accessibility.AccessibleRelationSet
Removes all the relations from the current relation set.
clear() - Method in class javax.naming.Reference
Deletes all addresses from this reference.
clear() - Method in class javax.naming.directory.BasicAttribute
clear() - Method in interface javax.naming.directory.Attribute
Removes all values from this attribute.
clear() - Method in class javax.swing.InputMap
Removes all the mappings from this InputMap.
clear() - Method in class javax.swing.ComponentInputMap
Removes all the mappings from this object.
clear() - Method in class javax.swing.ActionMap
Removes all the mappings from this ActionMap.
clear() - Method in class javax.swing.DefaultListModel
Removes all of the elements from this list.
clear() - Method in class org.omg.CORBA.Environment
Clears this Environment object of its exception.
clear(int) - Method in class java.util.BitSet
Sets the bit specified by the index to false.
clear(int) - Method in class java.util.Calendar
Clears the value in the given time field.
clearAccessibleSelection() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Clears the selection in the object, so that no children in the object are selected.
clearAccessibleSelection() - Method in class java.awt.List.AccessibleAWTList
Clears the selection in the object, so that nothing in the object is selected.
clearAccessibleSelection() - Method in interface javax.accessibility.AccessibleSelection
Clears the selection in the object, so that no children in the object are selected.
clearAccessibleSelection() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
clearAccessibleSelection() - Method in class javax.swing.JMenu.AccessibleJMenu
Clears the selection in the object, so that nothing in the object is selected.
clearAccessibleSelection() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Clears the selection in the object, so that no children in the object are selected.
clearAccessibleSelection() - Method in class javax.swing.JList.AccessibleJList
Clears the selection in the object, so that nothing in the object is selected.
clearAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree
Clears the selection in the object, so that nothing in the object is selected.
clearAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Clears the selection in the object, so that nothing in the object is selected.
clearAccessibleSelection() - Method in class javax.swing.JTable.AccessibleJTable
Clears the selection in the object, so that no children in the object are selected.
clearAccessibleSelection() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Clears the selection in the object, so that nothing in the object is selected.
clearAutoscroll() - Method in class java.awt.dnd.DropTarget
clear autoscrolling
clearBatch() - Method in interface java.sql.Statement
Makes the set of commands in the current batch empty.
clearBit(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit cleared.
clearChanged() - Method in class java.util.Observable
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
clearIconCache() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
clearIconCache() - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
clearParameters() - Method in interface java.sql.PreparedStatement
Clears the current parameter values immediately.
clearRect(int, int, int, int) - Method in class java.awt.Graphics
Clears the specified rectangle by filling it with the background color of the current drawing surface.
clearRect(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.clearRect.
clearSelectedPath() - Method in class javax.swing.MenuSelectionManager
Tell the menu selection to close and unselect all the menu components.
clearSelection() - Method in class javax.swing.DefaultSingleSelectionModel
clearSelection() - Method in interface javax.swing.SingleSelectionModel
Clears the selection (to -1).
clearSelection() - Method in class javax.swing.DefaultListSelectionModel
clearSelection() - Method in class javax.swing.JList
Clears the selection - after calling this method isSelectionEmpty will return true.
clearSelection() - Method in class javax.swing.JTree
Clears the selection.
clearSelection() - Method in interface javax.swing.ListSelectionModel
Change the selection to the empty set.
clearSelection() - Method in class javax.swing.JTable
Deselects all selected columns and rows.
clearSelection() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Empties the current selection.
clearSelection() - Method in interface javax.swing.tree.TreeSelectionModel
Empties the current selection.
clearTextShiftOffset() - Method in class javax.swing.plaf.basic.BasicButtonUI
clearToggledPaths() - Method in class javax.swing.JTree
Clears the cache of toggled tree paths.
clearWarnings() - Method in interface java.sql.Statement
Clears all the warnings reported on this Statement object.
clearWarnings() - Method in interface java.sql.Connection
Clears all warnings reported for this Connection object.
clearWarnings() - Method in interface java.sql.ResultSet
Clears all warnings reported on this ResultSet object.
clickCount - Variable in class java.awt.Event
For MOUSE_DOWN events, this field indicates the number of consecutive clicks.
clickCountToStart - Variable in class javax.swing.DefaultCellEditor
Clip - interface javax.sound.sampled.Clip.
The Clip interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.
clip(Shape) - Method in class java.awt.Graphics2D
Intersects the current Clip with the interior of the specified Shape and sets the Clip to the resulting intersection.
Clipboard - class java.awt.datatransfer.Clipboard.
A class which implements a mechanism to transfer data using cut/copy/paste operations.
Clipboard(String) - Constructor for class java.awt.datatransfer.Clipboard
Creates a clipboard object.
ClipboardOwner - interface java.awt.datatransfer.ClipboardOwner.
Defines the interface for classes that will provide data to a clipboard.
clipRect(int, int, int, int) - Method in class java.awt.Graphics
Intersects the current clip with the specified rectangle.
clipRect(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.clipRect.
Clob - interface java.sql.Clob.
The mapping in the JavaTM programming language for the SQL CLOB type.
CLOB - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
clone() - Method in class java.awt.Insets
Create a copy of this object.
clone() - Method in class java.awt.RenderingHints
Creates a clone of this RenderingHints object that has the same contents as this RenderingHints object.
clone() - Method in class java.awt.PageAttributes
Creates and returns a copy of this PageAttributes.
clone() - Method in class java.awt.JobAttributes
Creates and returns a copy of this JobAttributes.
clone() - Method in class java.awt.GridBagConstraints
Creates a copy of this grid bag constraint.
clone() - Method in class java.awt.datatransfer.DataFlavor
clone() - Method in class java.awt.font.TextLayout
Creates a copy of this TextLayout.
clone() - Method in class java.awt.geom.Point2D
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class java.awt.geom.Dimension2D
Creates a new object of the same class as this object.
clone() - Method in class java.awt.geom.RectangularShape
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class java.awt.geom.Area
Returns an exact copy of this Area object.
clone() - Method in class java.awt.geom.Line2D
Creates a new object of the same class as this object.
clone() - Method in class java.awt.geom.GeneralPath
Creates a new object of the same class as this object.
clone() - Method in class java.awt.geom.QuadCurve2D
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class java.awt.geom.AffineTransform
Returns a copy of this AffineTransform object.
clone() - Method in class java.awt.geom.CubicCurve2D
Creates a new object of the same class as this object.
clone() - Method in class java.awt.image.ImageFilter
Clones this object.
clone() - Method in class java.awt.image.Kernel
Clones this object.
clone() - Method in class java.awt.image.renderable.RenderContext
Makes a copy of a RenderContext.
clone() - Method in class java.awt.image.renderable.ParameterBlock
Creates a copy of a ParameterBlock.
clone() - Method in class java.awt.print.Paper
Creates a copy of this Paper with the same contents as this Paper.
clone() - Method in class java.awt.print.PageFormat
Makes a copy of this PageFormat with the same contents as this PageFormat.
clone() - Method in class java.lang.Object
Creates and returns a copy of this object.
clone() - Method in class java.rmi.server.UnicastRemoteObject
Returns a clone of the remote object that is distinct from the original.
clone() - Method in class java.security.MessageDigestSpi
Returns a clone if the implementation is cloneable.
clone() - Method in class java.security.SignatureSpi
Returns a clone if the implementation is cloneable.
clone() - Method in class java.security.MessageDigest
Returns a clone if the implementation is cloneable.
clone() - Method in class java.security.Signature
Returns a clone if the implementation is cloneable.
clone() - Method in interface java.security.acl.AclEntry
Clones this ACL entry.
clone() - Method in class java.text.Format
Overrides Cloneable
clone() - Method in class java.text.NumberFormat
Overrides Cloneable
clone() - Method in class java.text.ChoiceFormat
Overrides Cloneable
clone() - Method in class java.text.Collator
Overrides Cloneable
clone() - Method in class java.text.RuleBasedCollator
Standard override; no change in semantics.
clone() - Method in interface java.text.CharacterIterator
Create a copy of this iterator
clone() - Method in class java.text.DateFormat
Overrides Cloneable
clone() - Method in class java.text.StringCharacterIterator
Creates a copy of this iterator.
clone() - Method in class java.text.SimpleDateFormat
Overrides Cloneable
clone() - Method in class java.text.DateFormatSymbols
Overrides Cloneable
clone() - Method in class java.text.BreakIterator
Create a copy of this iterator
clone() - Method in class java.text.DecimalFormat
Standard override; no change in semantics.
clone() - Method in class java.text.DecimalFormatSymbols
Standard override.
clone() - Method in class java.text.MessageFormat
Overrides Cloneable
clone() - Method in class java.util.Hashtable
Creates a shallow copy of this hashtable.
clone() - Method in class java.util.Date
Return a copy of this object.
clone() - Method in class java.util.BitSet
Cloning this BitSet produces a new BitSet that is equal to it.
clone() - Method in class java.util.TreeSet
Returns a shallow copy of this TreeSet instance.
clone() - Method in class java.util.Vector
Returns a clone of this vector.
clone() - Method in class java.util.TimeZone
Overrides Cloneable
clone() - Method in class java.util.SimpleTimeZone
Overrides Cloneable
clone() - Method in class java.util.Calendar
Overrides Cloneable
clone() - Method in class java.util.HashSet
Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
clone() - Method in class java.util.LinkedList
Returns a shallow copy of this LinkedList.
clone() - Method in class java.util.TreeMap
Returns a shallow copy of this TreeMap instance.
clone() - Method in class java.util.Locale
Overrides Cloneable
clone() - Method in class java.util.ArrayList
Returns a shallow copy of this ArrayList instance.
clone() - Method in class java.util.HashMap
Returns a shallow copy of this HashMap instance: the keys and values themselves are not cloned.
clone() - Method in class java.util.jar.Attributes
Returns a copy of the Attributes, implemented as follows:
clone() - Method in class java.util.jar.Manifest
Returns a shallow copy of this Manifest, implemented as follows:
clone() - Method in class java.util.zip.ZipEntry
Returns a copy of this entry.
clone() - Method in class javax.sound.midi.MidiMessage
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class javax.sound.midi.SysexMessage
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class javax.sound.midi.MetaMessage
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class javax.sound.midi.ShortMessage
Creates a new object of the same class and with the same contents as this object.
clone() - Method in class javax.naming.Reference
Makes a copy of this reference using its class name list of addresses, class factory name and class factory location.
clone() - Method in interface javax.naming.Name
Generates a new copy of this name.
clone() - Method in class javax.naming.CompoundName
Creates a copy of this compound name.
clone() - Method in class javax.naming.CompositeName
Generates a copy of this composite name.
clone() - Method in class javax.naming.directory.BasicAttribute
clone() - Method in interface javax.naming.directory.Attributes
Makes a copy of the attribute set.
clone() - Method in interface javax.naming.directory.Attribute
Makes a copy of the attribute.
clone() - Method in class javax.naming.directory.BasicAttributes
clone() - Method in class javax.swing.DefaultListSelectionModel
Returns a clone of this selection model with the same selection.
clone() - Method in class javax.swing.AbstractAction
Clones the abstract action.
clone() - Method in class javax.swing.text.ElementIterator
Clones the ElementIterator.
clone() - Method in class javax.swing.text.SimpleAttributeSet
Clones a set of attributes.
clone() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Clones a set of attributes.
clone() - Method in class javax.swing.text.GlyphView
Creates a shallow copy.
clone() - Method in class javax.swing.text.EditorKit
Creates a copy of the editor kit.
clone() - Method in class javax.swing.text.StyledEditorKit
Create a copy of the editor kit.
clone() - Method in class javax.swing.text.Segment
Creates a shallow copy.
clone() - Method in class javax.swing.text.html.HTMLEditorKit
Create a copy of the editor kit.
clone() - Method in class javax.swing.text.rtf.RTFEditorKit
Create a copy of the editor kit.
clone() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns a clone of this object with the same selection.
clone() - Method in class javax.swing.tree.DefaultMutableTreeNode
Overridden to make clone public.
clone(Element, Element) - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Creates a copy of this element, with a different parent.
Cloneable - interface java.lang.Cloneable.
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
CloneNotSupportedException - exception java.lang.CloneNotSupportedException.
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
CloneNotSupportedException() - Constructor for class java.lang.CloneNotSupportedException
Constructs a CloneNotSupportedException with no detail message.
CloneNotSupportedException(String) - Constructor for class java.lang.CloneNotSupportedException
Constructs a CloneNotSupportedException with the specified detail message.
cloneWithSource(Object) - Method in class javax.swing.event.TreeSelectionEvent
Returns a copy of the receiver, but with the source being newSource.
closable - Variable in class javax.swing.JInternalFrame
The frame can be closed.
CLOSE - Static variable in class javax.sound.sampled.LineEvent.Type
A type of event that is sent when a line closes, freeing the system resources it had obtained when it was opened.
CLOSE_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
close() - Method in class java.io.Reader
Close the stream.
close() - Method in class java.io.FilterReader
Close the stream.
close() - Method in class java.io.Writer
Close the stream, flushing it first.
close() - Method in class java.io.FilterWriter
Close the stream.
close() - Method in class java.io.InputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in class java.io.FilterInputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in class java.io.OutputStream
Closes this output stream and releases any system resources associated with this stream.
close() - Method in class java.io.FilterOutputStream
Closes this output stream and releases any system resources associated with the stream.
close() - Method in class java.io.PrintStream
Close the stream.
close() - Method in class java.io.PipedReader
Closes this piped stream and releases any system resources associated with the stream.
close() - Method in class java.io.PipedWriter
Closes this piped output stream and releases any system resources associated with this stream.
close() - Method in class java.io.PushbackReader
Close the stream.
close() - Method in class java.io.BufferedReader
Close the stream.
close() - Method in class java.io.FileOutputStream
Closes this file output stream and releases any system resources associated with this stream.
close() - Method in interface java.io.ObjectInput
Closes the input stream.
close() - Method in class java.io.StringReader
Close the stream.
close() - Method in class java.io.ObjectInputStream
Closes the input stream.
close() - Method in class java.io.PipedInputStream
Closes this piped input stream and releases any system resources associated with the stream.
close() - Method in class java.io.InputStreamReader
Close the stream.
close() - Method in class java.io.PushbackInputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in interface java.io.ObjectOutput
Closes the stream.
close() - Method in class java.io.StringWriter
Close the stream.
close() - Method in class java.io.OutputStreamWriter
Close the stream.
close() - Method in class java.io.PrintWriter
Close the stream.
close() - Method in class java.io.ObjectOutputStream
Closes the stream.
close() - Method in class java.io.BufferedInputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in class java.io.ByteArrayInputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in class java.io.CharArrayReader
Close the stream.
close() - Method in class java.io.CharArrayWriter
Close the stream.
close() - Method in class java.io.RandomAccessFile
Closes this random access file stream and releases any system resources associated with the stream.
close() - Method in class java.io.PipedOutputStream
Closes this piped output stream and releases any system resources associated with this stream.
close() - Method in class java.io.ByteArrayOutputStream
Closes this output stream and releases any system resources associated with this stream.
close() - Method in class java.io.SequenceInputStream
Closes this input stream and releases any system resources associated with the stream.
close() - Method in class java.io.BufferedWriter
Close the stream.
close() - Method in class java.io.FileInputStream
Closes this file input stream and releases any system resources associated with the stream.
close() - Method in class java.net.DatagramSocket
Closes this datagram socket.
close() - Method in class java.net.SocketImpl
Closes this socket.
close() - Method in class java.net.Socket
Closes this socket.
close() - Method in class java.net.ServerSocket
Closes this socket.
close() - Method in class java.net.DatagramSocketImpl
Close the socket.
close() - Method in interface java.sql.Statement
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
close() - Method in interface java.sql.Connection
Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.
close() - Method in interface java.sql.ResultSet
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
close() - Method in class java.util.zip.InflaterInputStream
Closes the input stream.
close() - Method in class java.util.zip.ZipInputStream
Closes the ZIP input stream.
close() - Method in class java.util.zip.ZipFile
Closes the ZIP file.
close() - Method in class java.util.zip.DeflaterOutputStream
Writes remaining compressed data to the output stream and closes the underlying stream.
close() - Method in class java.util.zip.ZipOutputStream
Closes the ZIP output stream as well as the stream being filtered.
close() - Method in class java.util.zip.GZIPOutputStream
Writes remaining compressed data to the output stream and closes the underlying stream.
close() - Method in class java.util.zip.GZIPInputStream
Closes the input stream.
close() - Method in class javax.sound.sampled.AudioInputStream
Closes this audio input stream and releases any system resources associated with the stream.
close() - Method in interface javax.sound.sampled.Line
Closes the line, indicating that any system resources in use by the line can be released.
close() - Method in interface javax.sound.midi.Transmitter
Indicates that the application has finished using the transmitter, and that limited resources it requires may be released or made available.
close() - Method in interface javax.sound.midi.MidiDevice
Closes the device, indicating that the device should now release any system resources it is using.
close() - Method in interface javax.sound.midi.Receiver
Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.
close() - Method in class javax.naming.InitialContext
close() - Method in interface javax.naming.NamingEnumeration
Closes this enumeration.
close() - Method in interface javax.naming.Context
Closes this context.
close() - Method in class javax.swing.ProgressMonitor
Indicate that the operation is complete.
close() - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.close to close the progress monitor as well as the stream.
closeAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
closeButton - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
CLOSED_OPTION - Static variable in class javax.swing.JOptionPane
Return value from class method if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.
closedIcon - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Icon used to show non-leaf nodes that aren't expanded.
closeEntry() - Method in class java.util.zip.ZipInputStream
Closes the current ZIP entry and positions the stream for reading the next entry.
closeEntry() - Method in class java.util.zip.ZipOutputStream
Closes the current ZIP entry and positions the stream for writing the next entry.
closeFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, this call should remove the frame from it's parent.
closeFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Removes the frame, and if necessary the desktopIcon, from its parent.
closeFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the user wants to close the frame.
closeIcon - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
closeKey - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
Deprecated. As of JDK version 1.3.
closeOutUnwantedEmbeddedTags(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Searches the attribute set and for each tag that is stored in the tag vector.
closePath() - Method in class java.awt.geom.GeneralPath
Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo.
CMMException - exception java.awt.color.CMMException.
This exception is thrown if the native CMM returns an error.
CMMException(String) - Constructor for class java.awt.color.CMMException
Constructs a CMMException with the specified detail message.
coalesceEvents(AWTEvent, AWTEvent) - Method in class java.awt.Component
Potentially coalesce an event being posted with an existing event.
CODE - Static variable in class javax.swing.text.html.HTML.Tag
CODE - Static variable in class javax.swing.text.html.HTML.Attribute
CODEBASE - Static variable in class javax.swing.text.html.HTML.Attribute
CodeSource - class java.security.CodeSource.
This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
CodeSource(URL, Certificate[]) - Constructor for class java.security.CodeSource
Constructs a CodeSource and associates it with the specified location and set of certificates.
CODETYPE - Static variable in class javax.swing.text.html.HTML.Attribute
coerceData(boolean) - Method in class java.awt.image.BufferedImage
Forces the data to match the state specified in the isAlphaPremultiplied variable.
coerceData(WritableRaster, boolean) - Method in class java.awt.image.ColorModel
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
coerceData(WritableRaster, boolean) - Method in class java.awt.image.ComponentColorModel
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
coerceData(WritableRaster, boolean) - Method in class java.awt.image.DirectColorModel
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
colHead - Variable in class javax.swing.ScrollPaneLayout
The column header child.
COLLAPSED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is collapsed.
collapsedIcon - Variable in class javax.swing.plaf.basic.BasicTreeUI
collapsePath(TreePath) - Method in class javax.swing.JTree
Ensures that the node identified by the specified path is collapsed and viewable.
collapseRow(int) - Method in class javax.swing.JTree
Ensures that the node in the specified row is collapsed.
CollationElementIterator - class java.text.CollationElementIterator.
The CollationElementIterator class is used as an iterator to walk through each character of an international string.
CollationKey - class java.text.CollationKey.
A CollationKey represents a String under the rules of a specific Collator object.
Collator - class java.text.Collator.
The Collator class performs locale-sensitive String comparison.
Collator() - Constructor for class java.text.Collator
Default constructor.
Collection - interface java.util.Collection.
The root interface in the collection hierarchy.
Collections - class java.util.Collections.
This class consists exclusively of static methods that operate on or return collections.
color - Variable in class javax.swing.border.MatteBorder
Color - class java.awt.Color.
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
COLOR - Static variable in class java.awt.PageAttributes.ColorType
The ColorType instance to use for specifying color printing.
COLOR - Static variable in class javax.swing.text.html.HTML.Attribute
COLOR - Static variable in class javax.swing.text.html.CSS.Attribute
COLOR_ACTION - Static variable in class javax.swing.text.html.HTMLEditorKit
The Color choice action identifier The color is passed as an argument
COLOR_CHOOSER - Static variable in class javax.accessibility.AccessibleRole
A specialized dialog that lets the user choose a color.
Color(ColorSpace, float[], float) - Constructor for class java.awt.Color
Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha.
Color(float, float, float) - Constructor for class java.awt.Color
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0).
Color(float, float, float, float) - Constructor for class java.awt.Color
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
Color(int) - Constructor for class java.awt.Color
Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
Color(int, boolean) - Constructor for class java.awt.Color
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
Color(int, int, int) - Constructor for class java.awt.Color
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255).
Color(int, int, int, int) - Constructor for class java.awt.Color
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
ColorChooserComponentFactory - class javax.swing.colorchooser.ColorChooserComponentFactory.
A class designed to produce preconfigured "accessory" objects to insert into color choosers.
ColorChooserUI - class javax.swing.plaf.ColorChooserUI.
Pluggable look and feel interface for JColorChooser.
ColorChooserUI() - Constructor for class javax.swing.plaf.ColorChooserUI
ColorConvertOp - class java.awt.image.ColorConvertOp.
This class performs a pixel-by-pixel color conversion of the data in the source image.
ColorConvertOp(ColorSpace, ColorSpace, RenderingHints) - Constructor for class java.awt.image.ColorConvertOp
Constructs a new ColorConvertOp from two ColorSpace objects.
ColorConvertOp(ColorSpace, RenderingHints) - Constructor for class java.awt.image.ColorConvertOp
Constructs a new ColorConvertOp from a ColorSpace object.
ColorConvertOp(ICC_Profile[], RenderingHints) - Constructor for class java.awt.image.ColorConvertOp
Constructs a new ColorConvertOp from an array of ICC_Profiles.
ColorConvertOp(RenderingHints) - Constructor for class java.awt.image.ColorConvertOp
Constructs a new ColorConvertOp which will convert from a source color space to a destination color space.
ColorModel - class java.awt.image.ColorModel.
The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
ColorModel(int) - Constructor for class java.awt.image.ColorModel
Constructs a ColorModel that translates pixels of the specified number of bits to color/alpha components.
ColorModel(int, int[], ColorSpace, boolean, boolean, int, int) - Constructor for class java.awt.image.ColorModel
Constructs a ColorModel that translates pixel values to color/alpha components.
ColorSelectionModel - interface javax.swing.colorchooser.ColorSelectionModel.
A model that supports selecting a Color.
ColorSpace - class java.awt.color.ColorSpace.
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
ColorSpace(int, int) - Constructor for class java.awt.color.ColorSpace
Constructs a ColorSpace object given a color space type and the number of components.
ColorUIResource - class javax.swing.plaf.ColorUIResource.
ColorUIResource(Color) - Constructor for class javax.swing.plaf.ColorUIResource
ColorUIResource(float, float, float) - Constructor for class javax.swing.plaf.ColorUIResource
ColorUIResource(int) - Constructor for class javax.swing.plaf.ColorUIResource
ColorUIResource(int, int, int) - Constructor for class javax.swing.plaf.ColorUIResource
COLS - Static variable in class javax.swing.text.html.HTML.Attribute
COLSPAN - Static variable in class javax.swing.text.html.HTML.Attribute
column - Variable in class javax.swing.event.TableModelEvent
COLUMN_HEADER - Static variable in class javax.accessibility.AccessibleRole
The header for a column of data.
COLUMN_HEADER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the area at the top the viewport between the upper left corner and the upper right corner.
COLUMN_WIDTH_PROPERTY - Static variable in class javax.swing.table.TableColumn
Obsolete as of Java 2 platform v1.3.
columnAdded(TableColumnModelEvent) - Method in class javax.swing.JTable
Invoked when a column is added to the table column model.
columnAdded(TableColumnModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to the table contents (column insertions)
columnAdded(TableColumnModelEvent) - Method in interface javax.swing.event.TableColumnModelListener
Tells listeners that a column was added to the model.
columnAdded(TableColumnModelEvent) - Method in class javax.swing.table.JTableHeader
Invoked when a column is added to the table column model.
columnAtPoint(Point) - Method in class javax.swing.JTable
Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
columnAtPoint(Point) - Method in class javax.swing.table.JTableHeader
Returns the index of the column that point lies in, or -1 if it lies out of bounds.
columnHeader - Variable in class javax.swing.JScrollPane
The column header child.
columnIdentifiers - Variable in class javax.swing.table.DefaultTableModel
The Vector of column identifiers.
columnMargin - Variable in class javax.swing.table.DefaultTableColumnModel
Width margin between each column
columnMarginChanged(ChangeEvent) - Method in class javax.swing.JTable
Invoked when a column is moved due to a margin change.
columnMarginChanged(ChangeEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes of a column moving due to margin changes.
columnMarginChanged(ChangeEvent) - Method in interface javax.swing.event.TableColumnModelListener
Tells listeners that a column was moved due to a margin change.
columnMarginChanged(ChangeEvent) - Method in class javax.swing.table.JTableHeader
Invoked when a column is moved due to a margin change.
columnModel - Variable in class javax.swing.JTable
The TableColumnModel of the table.
columnModel - Variable in class javax.swing.table.JTableHeader
The TableColumnModel of the table header.
columnMoved(TableColumnModelEvent) - Method in class javax.swing.JTable
Invoked when a column is repositioned.
columnMoved(TableColumnModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes of a column repositioning.
columnMoved(TableColumnModelEvent) - Method in interface javax.swing.event.TableColumnModelListener
Tells listeners that a column was repositioned.
columnMoved(TableColumnModelEvent) - Method in class javax.swing.table.JTableHeader
Invoked when a column is repositioned.
columnNoNulls - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column might not allow NULL values.
columnNoNulls - Static variable in interface java.sql.ResultSetMetaData
The constant indicating that a column does not allow NULL values.
columnNullable - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column definitely allows NULL values.
columnNullable - Static variable in interface java.sql.ResultSetMetaData
The constant indicating that a column allows NULL values.
columnNullableUnknown - Static variable in interface java.sql.DatabaseMetaData
Indicates that the nullability of columns is unknown.
columnNullableUnknown - Static variable in interface java.sql.ResultSetMetaData
The constant indicating that the nullability of a column's values is unknown.
columnRemoved(TableColumnModelEvent) - Method in class javax.swing.JTable
Invoked when a column is removed from the table column model.
columnRemoved(TableColumnModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to the table contents (column deletions)
columnRemoved(TableColumnModelEvent) - Method in interface javax.swing.event.TableColumnModelListener
Tells listeners that a column was removed from the model.
columnRemoved(TableColumnModelEvent) - Method in class javax.swing.table.JTableHeader
Invoked when a column is removed from the table column model.
columnSelectionAllowed - Variable in class javax.swing.table.DefaultTableColumnModel
Column selection allowed in this column model
columnSelectionChanged(ListSelectionEvent) - Method in class javax.swing.JTable
Invoked when the selection model of the TableColumnModel is changed.
columnSelectionChanged(ListSelectionEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track that the selection model of the TableColumnModel changed.
columnSelectionChanged(ListSelectionEvent) - Method in interface javax.swing.event.TableColumnModelListener
Tells listeners that the selection model of the TableColumnModel changed.
columnSelectionChanged(ListSelectionEvent) - Method in class javax.swing.table.JTableHeader
Invoked when the selection model of the TableColumnModel is changed.
columnWeights - Variable in class java.awt.GridBagLayout
This field holds the overrides to the column weights.
columnWidths - Variable in class java.awt.GridBagLayout
This field holds the overrides to the column minimum width.
combine(ProtectionDomain[], ProtectionDomain[]) - Method in interface java.security.DomainCombiner
Modify or update the provided ProtectionDomains.
COMBINING - Static variable in class java.awt.font.GlyphMetrics
Indicates a glyph that represents a combining character, such as an umlaut.
COMBINING_DIACRITICAL_MARKS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
COMBINING_HALF_MARKS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
COMBINING_MARKS_FOR_SYMBOLS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
COMBINING_SPACING_MARK - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
COMBO_BOX - Static variable in class javax.accessibility.AccessibleRole
A list of choices the user can select from.
comboBox - Variable in class javax.swing.plaf.basic.BasicComboPopup
comboBox - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
comboBox - Variable in class javax.swing.plaf.metal.MetalComboBoxButton
ComboBoxEditor - interface javax.swing.ComboBoxEditor.
The editor component used for JComboBox components.
ComboBoxModel - interface javax.swing.ComboBoxModel.
ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
ComboBoxUI - class javax.swing.plaf.ComboBoxUI.
Pluggable look and feel interface for JComboBox.
ComboBoxUI() - Constructor for class javax.swing.plaf.ComboBoxUI
comboIcon - Variable in class javax.swing.plaf.metal.MetalComboBoxButton
ComboPopup - interface javax.swing.plaf.basic.ComboPopup.
The interface which defines the kind of popup menu that BasicComboBoxUI requires.
COMM_FAILURE - exception org.omg.CORBA.COMM_FAILURE.
The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
COMM_FAILURE() - Constructor for class org.omg.CORBA.COMM_FAILURE
Constructs a COMM_FAILURE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
COMM_FAILURE(int, CompletionStatus) - Constructor for class org.omg.CORBA.COMM_FAILURE
Constructs a COMM_FAILURE exception with the specified minor code and completion status.
COMM_FAILURE(String) - Constructor for class org.omg.CORBA.COMM_FAILURE
Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
COMM_FAILURE(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.COMM_FAILURE
Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.
command(Object) - Static method in class java.lang.Compiler
Examines the argument type and its fields and perform some documented operation.
COMMENT - Static variable in class javax.swing.text.html.HTML.Tag
All comments are labeled with this tag.
COMMENT - Static variable in class javax.swing.text.html.HTML.Attribute
comment(Element) - Method in class javax.swing.text.html.HTMLWriter
Writes out comments.
commentChar(int) - Method in class java.io.StreamTokenizer
Specified that the character argument starts a single-line comment.
commit() - Method in interface java.sql.Connection
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
COMMON - Static variable in class java.awt.JobAttributes.DialogType
The DialogType instance to use for specifying the cross-platform, pure Java print dialog.
CommunicationException - exception javax.naming.CommunicationException.
This exception is thrown when the client is unable to communicate with the directory or naming service.
CommunicationException() - Constructor for class javax.naming.CommunicationException
Constructs a new instance of CommunicationException.
CommunicationException(String) - Constructor for class javax.naming.CommunicationException
Constructs a new instance of CommunicationException using the arguments supplied.
COMPACT - Static variable in class javax.swing.text.html.HTML.Attribute
COMPACT_DISC - Static variable in class javax.sound.sampled.Port.Info
A type of port that gets audio from a CD-ROM drive.
Comparable - interface java.lang.Comparable.
This interface imposes a total ordering on the objects of each class that implements it.
Comparator - interface java.util.Comparator.
A comparison function, which imposes a total ordering on some collection of objects.
comparator() - Method in class java.util.TreeSet
Returns the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.
comparator() - Method in interface java.util.SortedSet
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
comparator() - Method in class java.util.TreeMap
Returns the comparator used to order this map, or null if this map uses its keys' natural order.
comparator() - Method in interface java.util.SortedMap
Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.
compare(Object, Object) - Method in class java.text.Collator
Compares its two arguments for order.
compare(Object, Object) - Method in interface java.util.Comparator
Compares its two arguments for order.
compare(String, String) - Method in class java.text.Collator
Compares the source string to the target string according to the collation rules for this Collator.
compare(String, String) - Method in class java.text.RuleBasedCollator
Compares the character data stored in two different strings based on the collation rules.
compareTabOrder(Component, Component) - Method in class javax.swing.DefaultFocusManager
Return true if a should be before b in the "tab" order.
compareTo(BigDecimal) - Method in class java.math.BigDecimal
Compares this BigDecimal with the specified BigDecimal.
compareTo(BigInteger) - Method in class java.math.BigInteger
Compares this BigInteger with the specified BigInteger.
compareTo(Byte) - Method in class java.lang.Byte
Compares two Bytes numerically.
compareTo(Character) - Method in class java.lang.Character
Compares two Characters numerically.
compareTo(CollationKey) - Method in class java.text.CollationKey
Compare this CollationKey to the target CollationKey.
compareTo(Date) - Method in class java.util.Date
Compares two Dates for ordering.
compareTo(Double) - Method in class java.lang.Double
Compares two Doubles numerically.
compareTo(File) - Method in class java.io.File
Compares two abstract pathnames lexicographically.
compareTo(Float) - Method in class java.lang.Float
Compares two Floats numerically.
compareTo(Integer) - Method in class java.lang.Integer
Compares two Integers numerically.
compareTo(Long) - Method in class java.lang.Long
Compares two Longs numerically.
compareTo(Object) - Method in class java.io.File
Compares this abstract pathname to another object.
compareTo(Object) - Method in class java.io.ObjectStreamField
Compare this field with another ObjectStreamField.
compareTo(Object) - Method in class java.lang.Character
Compares this Character to another Object.
compareTo(Object) - Method in class java.lang.Long
Compares this Long to another Object.
compareTo(Object) - Method in interface java.lang.Comparable
Compares this object with the specified object for order.
compareTo(Object) - Method in class java.lang.Short
Compares this Short to another Object.
compareTo(Object) - Method in class java.lang.String
Compares this String to another Object.
compareTo(Object) - Method in class java.lang.Float
Compares this Float to another Object.
compareTo(Object) - Method in class java.lang.Integer
Compares this Integer to another Object.
compareTo(Object) - Method in class java.lang.Byte
Compares this Byte to another Object.
compareTo(Object) - Method in class java.lang.Double
Compares this Double to another Object.
compareTo(Object) - Method in class java.math.BigInteger
Compares this BigInteger with the specified Object.
compareTo(Object) - Method in class java.math.BigDecimal
Compares this BigDecimal with the specified Object.
compareTo(Object) - Method in class java.text.CollationKey
Compares this CollationKey with the specified Object for order.
compareTo(Object) - Method in class java.util.Date
Compares this Date to another Object.
compareTo(Object) - Method in interface javax.naming.Name
Compares this name with another name for order.
compareTo(Object) - Method in class javax.naming.CompoundName
Compares this CompoundName with the specified Object for order.
compareTo(Object) - Method in class javax.naming.CompositeName
Compares this CompositeName with the specified Object for order.
compareTo(Short) - Method in class java.lang.Short
Compares two Shorts numerically.
compareTo(String) - Method in class java.lang.String
Compares two strings lexicographically.
compareToIgnoreCase(String) - Method in class java.lang.String
Compares two strings lexicographically, ignoring case considerations.
compileClass(Class) - Static method in class java.lang.Compiler
Compiles the specified class.
compileClasses(String) - Static method in class java.lang.Compiler
Compiles all classes whose name matches the specified string.
Compiler - class java.lang.Compiler.
The Compiler class is provided to support Java-to-native-code compilers and related services.
COMPLETE - Static variable in class java.awt.MediaTracker
Flag indicating that the downloading of media was completed successfully.
complete() - Method in class java.util.Calendar
Fills in any unset fields in the time field list.
completed - Variable in class org.omg.CORBA.SystemException
The status of the operation that threw this exception.
COMPLETED_MAYBE - Static variable in class org.omg.CORBA.CompletionStatus
An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.
COMPLETED_NO - Static variable in class org.omg.CORBA.CompletionStatus
An instance of CompletionStatus initialized with the constant _COMPLETED_NO.
COMPLETED_YES - Static variable in class org.omg.CORBA.CompletionStatus
An instance of CompletionStatus initialized with the constant _COMPLETED_YES.
completeDrag(int, int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
completeDrag(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Messages finishDraggingTo with the new location for the mouse event.
completeEditing() - Method in class javax.swing.plaf.basic.BasicTreeUI
Messages to stop the editing session.
completeEditing(boolean, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Stops the editing session.
COMPLETESCANLINES - Static variable in interface java.awt.image.ImageConsumer
The pixels will be delivered in (multiples of) complete scanlines at a time.
completeUIInstall() - Method in class javax.swing.plaf.basic.BasicTreeUI
Invoked from installUI after all the defaults/listeners have been installed.
completeUIUninstall() - Method in class javax.swing.plaf.basic.BasicTreeUI
CompletionStatus - class org.omg.CORBA.CompletionStatus.
An object that indicates whether a method had completed running when a SystemException was thrown.
CompletionStatus(int) - Constructor for class org.omg.CORBA.CompletionStatus
Creates a CompletionStatus object from the given int.
CompletionStatusHelper - class org.omg.CORBA.CompletionStatusHelper.
org/omg/CORBA/CompletionStatusHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
CompletionStatusHelper() - Constructor for class org.omg.CORBA.CompletionStatusHelper
component - Variable in class java.awt.dnd.DragGestureRecognizer
The Component associated with this DragGestureRecognizer.
component - Static variable in class javax.swing.ImageIcon
Component - class java.awt.Component.
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
COMPONENT - Static variable in class java.awt.font.GlyphMetrics
Indicates a glyph with no corresponding character in the backing store.
COMPONENT_ADDED - Static variable in class java.awt.event.ContainerEvent
This event indicates that a component was added to the container.
COMPONENT_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting component events.
COMPONENT_FIRST - Static variable in class java.awt.event.ComponentEvent
The first number in the range of ids used for component events.
COMPONENT_HIDDEN - Static variable in class java.awt.event.ComponentEvent
This event indicates that the component was rendered invisible.
COMPONENT_LAST - Static variable in class java.awt.event.ComponentEvent
The last number in the range of ids used for component events.
COMPONENT_MOVED - Static variable in class java.awt.event.ComponentEvent
This event indicates that the component's position changed.
COMPONENT_REMOVED - Static variable in class java.awt.event.ContainerEvent
This event indicates that a component was removed from the container.
COMPONENT_RESIZED - Static variable in class java.awt.event.ComponentEvent
This event indicates that the component's size changed.
COMPONENT_SHOWN - Static variable in class java.awt.event.ComponentEvent
This event indicates that the component was made visible.
Component.AccessibleAWTComponent - class java.awt.Component.AccessibleAWTComponent.
Inner class of Component used to provide default support for accessibility.
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler - class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.
Fire PropertyChange listener, if one is registered, when shown/hidden..
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler(Component.AccessibleAWTComponent) - Constructor for class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
Component.AccessibleAWTComponent.AccessibleAWTFocusHandler - class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.
Fire PropertyChange listener, if one is registered, when focus events happen
Component.AccessibleAWTComponent.AccessibleAWTFocusHandler(Component.AccessibleAWTComponent) - Constructor for class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Component.AccessibleAWTComponent(Component) - Constructor for class java.awt.Component.AccessibleAWTComponent
Though the class is abstract, this should be called by all sub-classes.
Component() - Constructor for class java.awt.Component
Constructs a new component.
ComponentAdapter - class java.awt.event.ComponentAdapter.
An abstract adapter class for receiving component events.
ComponentAdapter() - Constructor for class java.awt.event.ComponentAdapter
componentAdded(ContainerEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
componentAdded(ContainerEvent) - Method in class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler
componentAdded(ContainerEvent) - Method in class java.awt.event.ContainerAdapter
Invoked when a component has been added to the container.
componentAdded(ContainerEvent) - Method in interface java.awt.event.ContainerListener
Invoked when a component has been added to the container.
componentAdded(ContainerEvent) - Method in class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler
componentAdded(ContainerEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener
componentAdded(ContainerEvent) - Method in class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener
ComponentAttribute - Static variable in class javax.swing.text.StyleConstants
Name of the component attribute.
ComponentAttribute - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the component attribute.
ComponentColorModel - class java.awt.image.ComponentColorModel.
A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element.
ComponentColorModel(ColorSpace, int[], boolean, boolean, int, int) - Constructor for class java.awt.image.ComponentColorModel
Constructs a ComponentColorModel from the specified parameters.
ComponentElementName - Static variable in class javax.swing.text.StyleConstants
Name of elements used to represent components.
ComponentEvent - class java.awt.event.ComponentEvent.
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ComponentEvent(Component, int) - Constructor for class java.awt.event.ComponentEvent
Constructs a ComponentEvent object.
componentForPoint(Component, Point) - Method in class javax.swing.MenuSelectionManager
Returns the component in the currently selected path which contains sourcePoint.
componentHidden(ComponentEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
componentHidden(ComponentEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
componentHidden(ComponentEvent) - Method in class java.awt.event.ComponentAdapter
Invoked when the component has been made invisible.
componentHidden(ComponentEvent) - Method in interface java.awt.event.ComponentListener
Invoked when the component has been made invisible.
componentHidden(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
ComponentInputMap - class javax.swing.ComponentInputMap.
A ComponentInputMap is an InputMap associated with a particular JComponent.
ComponentInputMap(JComponent) - Constructor for class javax.swing.ComponentInputMap
Creates a ComponentInputMap associated with the specified component.
ComponentInputMapUIResource - class javax.swing.plaf.ComponentInputMapUIResource.
A subclass of javax.swing.ComponentInputMap that implements UIResource.
ComponentInputMapUIResource(JComponent) - Constructor for class javax.swing.plaf.ComponentInputMapUIResource
componentListener - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
componentListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
ComponentListener - interface java.awt.event.ComponentListener.
The listener interface for receiving component events.
componentMoved(ComponentEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
componentMoved(ComponentEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
componentMoved(ComponentEvent) - Method in class java.awt.event.ComponentAdapter
Invoked when the component's position changes.
componentMoved(ComponentEvent) - Method in interface java.awt.event.ComponentListener
Invoked when the component's position changes.
componentMoved(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
componentMoved(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
ComponentOrientation - class java.awt.ComponentOrientation.
The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
componentRemoved(ContainerEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
componentRemoved(ContainerEvent) - Method in class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler
componentRemoved(ContainerEvent) - Method in class java.awt.event.ContainerAdapter
Invoked when a component has been removed from the container.
componentRemoved(ContainerEvent) - Method in interface java.awt.event.ContainerListener
Invoked when a component has been removed from the container.
componentRemoved(ContainerEvent) - Method in class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler
componentRemoved(ContainerEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener
componentRemoved(ContainerEvent) - Method in class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener
componentResized(ComponentEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
componentResized(ComponentEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
componentResized(ComponentEvent) - Method in class java.awt.event.ComponentAdapter
Invoked when the component's size changes.
componentResized(ComponentEvent) - Method in interface java.awt.event.ComponentListener
Invoked when the component's size changes.
componentResized(ComponentEvent) - Method in class javax.swing.JViewport.ViewListener
componentResized(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
Invoked when a JInternalFrame's parent's size changes.
componentResized(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler
components - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
ComponentSampleModel - class java.awt.image.ComponentSampleModel.
This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer.
ComponentSampleModel(int, int, int, int, int, int[]) - Constructor for class java.awt.image.ComponentSampleModel
Constructs a ComponentSampleModel with the specified parameters.
ComponentSampleModel(int, int, int, int, int, int[], int[]) - Constructor for class java.awt.image.ComponentSampleModel
Constructs a ComponentSampleModel with the specified parameters.
componentShown(ComponentEvent) - Method in class java.awt.AWTEventMulticaster
Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
componentShown(ComponentEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
componentShown(ComponentEvent) - Method in class java.awt.event.ComponentAdapter
Invoked when the component has been made visible.
componentShown(ComponentEvent) - Method in interface java.awt.event.ComponentListener
Invoked when the component has been made visible.
componentShown(ComponentEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
ComponentUI - class javax.swing.plaf.ComponentUI.
ComponentUI() - Constructor for class javax.swing.plaf.ComponentUI
ComponentView - class javax.swing.text.ComponentView.
Component decorator that implements the view interface.
ComponentView(Element) - Constructor for class javax.swing.text.ComponentView
Creates a new ComponentView object.
compose(Raster, Raster, WritableRaster) - Method in interface java.awt.CompositeContext
Composes the two source Raster objects and places the result in the destination WritableRaster.
ComposedTextAttribute - Static variable in class javax.swing.text.StyleConstants
Name of the input method composed text attribute.
composeName(Name, Name) - Method in class javax.naming.InitialContext
Composes the name of this context with a name relative to this context.
composeName(Name, Name) - Method in interface javax.naming.Context
Composes the name of this context with a name relative to this context.
composeName(String, String) - Method in class javax.naming.InitialContext
Composes the name of this context with a name relative to this context.
composeName(String, String) - Method in interface javax.naming.Context
Composes the name of this context with a name relative to this context.
Composite - interface java.awt.Composite.
The Composite interface, along with CompositeContext, defines the methods to compose a draw primitive with the underlying graphics area.
CompositeContext - interface java.awt.CompositeContext.
The CompositeContext interface defines the encapsulated and optimized environment for a compositing operation.
CompositeName - class javax.naming.CompositeName.
This class represents a composite name -- a sequence of component names spanning multiple namespaces.
CompositeName() - Constructor for class javax.naming.CompositeName
Constructs a new empty composite name.
CompositeName(Enumeration) - Constructor for class javax.naming.CompositeName
Constructs a new composite name instance using the components specified by 'comps'.
CompositeName(String) - Constructor for class javax.naming.CompositeName
Constructs a new composite name instance by parsing the string n using the composite name syntax (left-to-right, slash separated).
CompositeView - class javax.swing.text.CompositeView.
A view that is composed of other views (has children).
CompositeView(Element) - Constructor for class javax.swing.text.CompositeView
Constructs a CompositeView for the given element.
CompoundBorder - class javax.swing.border.CompoundBorder.
A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
CompoundBorder() - Constructor for class javax.swing.border.CompoundBorder
Creates a compound border with null outside and inside borders.
CompoundBorder(Border, Border) - Constructor for class javax.swing.border.CompoundBorder
Creates a compound border with the specified outside and inside borders.
CompoundControl - class javax.sound.sampled.CompoundControl.
A CompoundControl, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as a Control.
CompoundControl.Type - class javax.sound.sampled.CompoundControl.Type.
An instance of the CompoundControl.Type inner class identifies one kind of compound control.
CompoundControl.Type(String) - Constructor for class javax.sound.sampled.CompoundControl.Type
Constructs a new compound control type.
CompoundControl(CompoundControl.Type, Control[]) - Constructor for class javax.sound.sampled.CompoundControl
Constructs a new compound control object with the given parameters.
compoundEdit - Variable in class javax.swing.undo.UndoableEditSupport
CompoundEdit - class javax.swing.undo.CompoundEdit.
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
CompoundEdit() - Constructor for class javax.swing.undo.CompoundEdit
CompoundName - class javax.naming.CompoundName.
This class represents a compound name -- a name from a hierarchical name space.
CompoundName(Enumeration, Properties) - Constructor for class javax.naming.CompoundName
Constructs a new compound name instance using the components specified in comps and syntax.
CompoundName(String, Properties) - Constructor for class javax.naming.CompoundName
Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.
comptable - Variable in class java.awt.GridBagLayout
This hashtable maintains the association between a component and its gridbag constraints.
computeBlit(int, int, Point, Point, Dimension, Rectangle) - Method in class javax.swing.JViewport
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
computeDifference(Rectangle, Rectangle) - Static method in class javax.swing.SwingUtilities
Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB.
computeFields() - Method in class java.util.Calendar
Converts the current millisecond time value time to field values in fields[].
computeFields() - Method in class java.util.GregorianCalendar
Overrides Calendar Converts UTC as milliseconds to time field values.
computeIntersection(int, int, int, int, Rectangle) - Static method in class javax.swing.SwingUtilities
Convenience to calculate the intersection of two rectangles without allocating a new rectangle.
computePopupBounds(int, int, int, int) - Method in class javax.swing.plaf.basic.BasicComboPopup
computerIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
computeStringWidth(FontMetrics, String) - Static method in class javax.swing.SwingUtilities
Compute the width of the string using a font with the specified "metrics" (sizes).
computeTime() - Method in class java.util.Calendar
Converts the current field values in fields[] to the millisecond time value time.
computeTime() - Method in class java.util.GregorianCalendar
Overrides Calendar Converts time field values to UTC as milliseconds.
computeUnion(int, int, int, int, Rectangle) - Static method in class javax.swing.SwingUtilities
Convenience to calculate the union of two rectangles without allocating a new rectangle Return dest
computeVisibleRect(Rectangle) - Method in class javax.swing.JComponent
Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for this component and all of its ancestors.
concat(String) - Method in class java.lang.String
Concatenates the specified string to the end of this string.
concatenate(AffineTransform) - Method in class java.awt.geom.AffineTransform
Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx.
concatenateTransform(AffineTransform) - Method in class java.awt.image.renderable.RenderContext
Modifies the current user-to-device transform by appending another transform.
concetenateTransform(AffineTransform) - Method in class java.awt.image.renderable.RenderContext
Deprecated. replaced by concatenateTransform(AffineTransform).
concrete_base_type() - Method in class org.omg.CORBA.TypeCode
Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
CONCUR_READ_ONLY - Static variable in interface java.sql.ResultSet
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
CONCUR_UPDATABLE - Static variable in interface java.sql.ResultSet
The constant indicating the concurrency mode for a ResultSet object that may be updated.
ConcurrentModificationException - exception java.util.ConcurrentModificationException.
This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
ConcurrentModificationException() - Constructor for class java.util.ConcurrentModificationException
Constructs a ConcurrentModificationException with no detail message.
ConcurrentModificationException(String) - Constructor for class java.util.ConcurrentModificationException
Constructs a ConcurrentModificationException with the specified detail message.
ConfigurationException - exception javax.naming.ConfigurationException.
This exception is thrown when there is a configuration problem.
ConfigurationException() - Constructor for class javax.naming.ConfigurationException
Constructs a new instance of ConfigurationException with all name resolution fields and explanation initialized to null.
ConfigurationException(String) - Constructor for class javax.naming.ConfigurationException
Constructs a new instance of ConfigurationException using an explanation.
configureArrowButton() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Configures the arrow button by adding listeners.
configureArrowButton() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
configureEditor() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Configures the editor by setting its font and adding listeners.
configureEditor() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
configureEditor(ComboBoxEditor, Object) - Method in class javax.swing.JComboBox
Initializes the editor with the specified item.
configureEnclosingScrollPane() - Method in class javax.swing.JTable
If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane.
configureLayoutCache() - Method in class javax.swing.plaf.basic.BasicTreeUI
Resets the TreeState instance based on the tree we're providing the look and feel for.
configureList() - Method in class javax.swing.plaf.basic.BasicComboPopup
Called to configure the list created by createList().
configurePopup() - Method in class javax.swing.plaf.basic.BasicComboPopup
Called to configure this JPopupMenu (BasicComboPopup is a JPopupMenu).
configurePropertiesFromAction(Action) - Method in class javax.swing.AbstractButton
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JMenuItem
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JCheckBox
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JTextField
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JButton
Factory method which sets the AbstractButton's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JComboBox
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configurePropertiesFromAction(Action) - Method in class javax.swing.JRadioButton
Factory method which sets the ActionEvent source's properties according to values from the Action instance.
configureScrollBarColors() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
configureScrollBarColors() - Method in class javax.swing.plaf.metal.MetalScrollBarUI
configureScroller() - Method in class javax.swing.plaf.basic.BasicComboPopup
Called to configure the JScrollPane created by createScroller().
connect() - Method in class java.net.URLConnection
Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
connect(InetAddress, int) - Method in class java.net.DatagramSocket
Connects the socket to a remote address for this socket.
connect(InetAddress, int) - Method in class java.net.SocketImpl
Connects this socket to the specified port number on the specified host.
connect(Object) - Method in class org.omg.CORBA.ORB
Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.
connect(ORB) - Method in class javax.rmi.CORBA.Stub
Connects this stub to an ORB.
connect(PipedInputStream) - Method in class java.io.PipedOutputStream
Connects this piped output stream to a receiver.
connect(PipedOutputStream) - Method in class java.io.PipedInputStream
Causes this piped input stream to be connected to the piped output stream src.
connect(PipedReader) - Method in class java.io.PipedWriter
Connects this piped writer to a receiver.
connect(PipedWriter) - Method in class java.io.PipedReader
Causes this piped reader to be connected to the piped writer src.
connect(Remote, Remote) - Static method in class javax.rmi.PortableRemoteObject
Makes a Remote object ready for remote communication.
connect(Remote, Remote) - Method in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Delegation call for PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
connect(String, int) - Method in class java.net.SocketImpl
Connects this socket to the specified port on the named host.
connect(String, Properties) - Method in interface java.sql.Driver
Attempts to make a database connection to the given URL.
connect(Stub, ORB) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.connect(org.omg.CORBA.ORB).
connected - Variable in class java.net.URLConnection
If false, this connection object has not created a communications link to the specified URL.
ConnectException - exception java.net.ConnectException.
Signals that an error occurred while attempting to connect a socket to a remote address and port.
ConnectException - exception java.rmi.ConnectException.
A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
ConnectException() - Constructor for class java.net.ConnectException
Construct a new ConnectException with no detailed message.
ConnectException(String) - Constructor for class java.net.ConnectException
Constructs a new ConnectException with the specified detail message as to why the connect error occurred.
ConnectException(String) - Constructor for class java.rmi.ConnectException
Constructs a ConnectException with the specified detail message.
ConnectException(String, Exception) - Constructor for class java.rmi.ConnectException
Constructs a ConnectException with the specified detail message and nested exception.
ConnectIOException - exception java.rmi.ConnectIOException.
A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
ConnectIOException(String) - Constructor for class java.rmi.ConnectIOException
Constructs a ConnectIOException with the specified detail message.
ConnectIOException(String, Exception) - Constructor for class java.rmi.ConnectIOException
Constructs a ConnectIOException with the specified detail message and nested exception.
Connection - interface java.sql.Connection.
A connection (session) with a specific database.
CONNECTOR_PUNCTUATION - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
CONREF - Static variable in interface javax.swing.text.html.parser.DTDConstants
Constructor - class java.lang.reflect.Constructor.
Constructor provides information about, and access to, a single constructor for a class.
consume() - Method in class java.awt.AWTEvent
consume() - Method in class java.awt.event.InputMethodEvent
Consumes this event so that it will not be processed in the default manner by the source which originated it.
consume() - Method in class java.awt.event.InputEvent
Consumes this event so that it will not be processed in the default manner by the source which originated it.
consumed - Variable in class java.awt.AWTEvent
consumer - Variable in class java.awt.image.ImageFilter
The consumer of the particular image data stream for which this instance of the ImageFilter is filtering data.
Container - class java.awt.Container.
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
CONTAINER_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting container events.
CONTAINER_FIRST - Static variable in class java.awt.event.ContainerEvent
The first number in the range of ids used for container events.
CONTAINER_LAST - Static variable in class java.awt.event.ContainerEvent
The last number in the range of ids used for container events.
Container.AccessibleAWTContainer - class java.awt.Container.AccessibleAWTContainer.
Inner class of Container used to provide default support for accessibility.
Container.AccessibleAWTContainer.AccessibleContainerHandler - class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler.
Fire PropertyChange listener, if one is registered, when children added/removed.
Container.AccessibleAWTContainer.AccessibleContainerHandler(Container.AccessibleAWTContainer) - Constructor for class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler
Container.AccessibleAWTContainer(Container) - Constructor for class java.awt.Container.AccessibleAWTContainer
Container() - Constructor for class java.awt.Container
Constructs a new Container.
ContainerAdapter - class java.awt.event.ContainerAdapter.
An abstract adapter class for receiving container events.
ContainerAdapter() - Constructor for class java.awt.event.ContainerAdapter
ContainerEvent - class java.awt.event.ContainerEvent.
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerEvent(Component, int, Component) - Constructor for class java.awt.event.ContainerEvent
Constructs a ContainerEvent object.
containerListener - Variable in class javax.swing.plaf.basic.BasicMenuBarUI
ContainerListener - interface java.awt.event.ContainerListener.
The listener interface for receiving container events.
contains(AccessibleState) - Method in class javax.accessibility.AccessibleStateSet
Checks if the current state is in the state set.
contains(double, double) - Method in class java.awt.Polygon
Determines whether the specified coordinates are inside this Polygon.
contains(double, double) - Method in interface java.awt.Shape
Tests if the specified coordinates are inside the boundary of the Shape.
contains(double, double) - Method in class java.awt.geom.Rectangle2D
Tests if a specified coordinate is inside the boundary of this Rectangle2D.
contains(double, double) - Method in class java.awt.geom.RoundRectangle2D
Tests if the specified coordinates are inside the boundary of this RoundRectangle2D.
contains(double, double) - Method in class java.awt.geom.Area
Tests if a specifed point lies inside the boundary of this Area object.
contains(double, double) - Method in class java.awt.geom.Line2D
Tests if a specified coordinate is inside the boundary of this Line2D.
contains(double, double) - Method in class java.awt.geom.Arc2D
Determines whether or not the specified point is inside the boundary of the arc.
contains(double, double) - Method in class java.awt.geom.Ellipse2D
Tests if a specified point is inside the boundary of this Ellipse2D.
contains(double, double) - Method in class java.awt.geom.GeneralPath
Tests if the specified coordinates are inside the boundary of this Shape.
contains(double, double) - Method in class java.awt.geom.QuadCurve2D
Tests if a specified coordinate is inside the boundary of the shape of this QuadCurve2D.
contains(double, double) - Method in class java.awt.geom.CubicCurve2D
Tests if a specified coordinate is inside the boundary of the shape.
contains(double, double, double, double) - Method in class java.awt.Polygon
Tests if the interior of this Polygon entirely contains the specified set of rectangular coordinates.
contains(double, double, double, double) - Method in interface java.awt.Shape
Tests if the interior of the Shape entirely contains the specified rectangular area.
contains(double, double, double, double) - Method in class java.awt.geom.Rectangle2D
Tests if the interior of this Rectangle2D entirely contains the specified set of rectangular coordinates.
contains(double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D
Tests if the interior of this RoundRectangle2D entirely contains the specified set of rectangular coordinates.
contains(double, double, double, double) - Method in class java.awt.geom.Area
Tests whether or not the interior of this Area object completely contains the specified rectangular area.
contains(double, double, double, double) - Method in class java.awt.geom.Line2D
Tests if the interior of this Line2D entirely contains the specified set of rectangular coordinates.
contains(double, double, double, double) - Method in class java.awt.geom.Arc2D
Determine whether or not the interior of the arc entirely contains the specified rectangle.
contains(double, double, double, double) - Method in class java.awt.geom.Ellipse2D
Tests if the interior of this Ellipse2D entirely contains the specified rectangular area.
contains(double, double, double, double) - Method in class java.awt.geom.GeneralPath
Tests if the specified rectangular area is inside the boundary of this Shape.
contains(double, double, double, double) - Method in class java.awt.geom.QuadCurve2D
Tests if the interior of the shape of this QuadCurve2D entirely contains the specified set of rectangular coordinates.
contains(double, double, double, double) - Method in class java.awt.geom.CubicCurve2D
Tests if the interior of the shape entirely contains the specified set of rectangular coordinates.
contains(int, int) - Method in class java.awt.Component
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
contains(int, int) - Method in class java.awt.Polygon
Determines whether the specified coordinates are inside this Polygon.
contains(int, int) - Method in class java.awt.Rectangle
Checks whether or not this Rectangle contains the point at the specified location (x, y).
contains(int, int) - Method in class javax.swing.JComponent
Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing.
contains(int, int, int, int) - Method in class java.awt.Rectangle
Checks whether this Rectangle entirely contains the Rectangle at the specified location (X, Y) with the specified dimensions (W, H).
contains(JComponent, int, int) - Method in class javax.swing.plaf.ComponentUI
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiListUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTextUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTableUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call contains on each UI handled by this MultiUI.
contains(JComponent, int, int) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call contains on each UI handled by this MultiUI.
contains(Object) - Method in class java.beans.beancontext.BeanContextMembershipEvent
Is the child specified affected by the event?
contains(Object) - Method in class java.beans.beancontext.BeanContextSupport
Determines whether or not the specified object is currently a child of this BeanContext.
contains(Object) - Method in class java.util.Hashtable
Tests if some key maps into the specified value in this hashtable.
contains(Object) - Method in class java.util.AbstractCollection
Returns true if this collection contains the specified element.
contains(Object) - Method in class java.util.TreeSet
Returns true if this set contains the specified element.
contains(Object) - Method in class java.util.Vector
Tests if the specified object is a component in this vector.
contains(Object) - Method in interface java.util.Collection
Returns true if this collection contains the specified element.
contains(Object) - Method in class java.util.HashSet
Returns true if this set contains the specified element.
contains(Object) - Method in interface java.util.Set
Returns true if this set contains the specified element.
contains(Object) - Method in class java.util.LinkedList
Returns true if this list contains the specified element.
contains(Object) - Method in interface java.util.List
Returns true if this list contains the specified element.
contains(Object) - Method in class java.util.ArrayList
Returns true if this list contains the specified element.
contains(Object) - Method in class javax.naming.directory.BasicAttribute
Determines whether a value is in this attribute.
contains(Object) - Method in interface javax.naming.directory.Attribute
Determines whether a value is in the attribute.
contains(Object) - Method in class javax.swing.DefaultListModel
Tests if the specified object is a component in this list.
contains(Object) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
contains(Point) - Method in class java.awt.Component
Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
contains(Point) - Method in class java.awt.Component.AccessibleAWTComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
contains(Point) - Method in class java.awt.Polygon
Determines whether the specified Point is inside this Polygon.
contains(Point) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
contains(Point) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
contains(Point) - Method in class java.awt.Rectangle
Checks whether or not this Rectangle contains the specified Point.
contains(Point) - Method in interface javax.accessibility.AccessibleComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
contains(Point) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
contains(Point) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
contains(Point) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
contains(Point) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
contains(Point2D) - Method in class java.awt.Polygon
Tests if a specified Point2D is inside the boundary of this Polygon.
contains(Point2D) - Method in interface java.awt.Shape
Tests if a specified Point2D is inside the boundary of the Shape.
contains(Point2D) - Method in class java.awt.geom.RectangularShape
Tests if a specified Point2D is inside the boundary of the Shape.
contains(Point2D) - Method in class java.awt.geom.Area
Tests if a specified Point2D lies inside the boundary of the this Area object.
contains(Point2D) - Method in class java.awt.geom.Line2D
Tests if a given Point2D is inside the boundary of this Line2D.
contains(Point2D) - Method in class java.awt.geom.GeneralPath
Tests if the specified Point2D is inside the boundary of this Shape.
contains(Point2D) - Method in class java.awt.geom.QuadCurve2D
Tests if a specified Point2D is inside the boundary of the shape of this QuadCurve2D.
contains(Point2D) - Method in class java.awt.geom.CubicCurve2D
Tests if a specified Point2D is inside the boundary of the shape.
contains(Rectangle) - Method in class java.awt.Rectangle
Checks whether or not this Rectangle entirely contains the specified Rectangle.
contains(Rectangle2D) - Method in class java.awt.Polygon
Tests if the interior of this Polygon entirely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in interface java.awt.Shape
Tests if the interior of the Shape entirely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in class java.awt.geom.RectangularShape
Tests if the interior of the Shape entirely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in class java.awt.geom.Area
Tests whether or not the interior of this Area object completely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in class java.awt.geom.Line2D
Tests if the interior of this Line2D entirely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in class java.awt.geom.Arc2D
Determine whether or not the interior of the arc entirely contains the specified rectangle.
contains(Rectangle2D) - Method in class java.awt.geom.GeneralPath
Tests if the specified Rectangle2D is inside the boundary of this Shape.
contains(Rectangle2D) - Method in class java.awt.geom.QuadCurve2D
Tests if the interior of the shape of this QuadCurve2D entirely contains the specified Rectangle2D.
contains(Rectangle2D) - Method in class java.awt.geom.CubicCurve2D
Tests if the interior of the shape entirely contains the specified Rectangle2D.
contains(String) - Method in class javax.accessibility.AccessibleRelationSet
Returns whether the relation set contains a relation that matches the specified key.
containsAlias(String) - Method in class java.security.KeyStore
Checks if the given alias exists in this keystore.
containsAll(Collection) - Method in class java.beans.beancontext.BeanContextSupport
Tests to see if all objects in the specified Collection are children of this BeanContext.
containsAll(Collection) - Method in class java.util.AbstractCollection
Returns true if this collection contains all of the elements in the specified collection.
containsAll(Collection) - Method in class java.util.Vector
Returns true if this Vector contains all of the elements in the specified Collection.
containsAll(Collection) - Method in interface java.util.Collection
Returns true if this collection contains all of the elements in the specified collection.
containsAll(Collection) - Method in interface java.util.Set
Returns true if this set contains all of the elements of the specified collection.
containsAll(Collection) - Method in interface java.util.List
Returns true if this list contains all of the elements of the specified collection.
containsAngle(double) - Method in class java.awt.geom.Arc2D
Determines whether or not the specified angle is within the angular extents of the arc.
containsAttribute(Object, Object) - Method in class javax.swing.text.SimpleAttributeSet
Checks whether the attribute list contains a specified attribute name/value pair.
containsAttribute(Object, Object) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Checks whether a given attribute name/value is defined.
containsAttribute(Object, Object) - Method in class javax.swing.text.StyleContext.NamedStyle
Checks whether a given attribute name/value is defined.
containsAttribute(Object, Object) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Checks whether a given attribute name/value is defined.
containsAttribute(Object, Object) - Method in interface javax.swing.text.AttributeSet
Returns true if this set contains this attribute with an equal value.
containsAttributes(AttributeSet) - Method in class javax.swing.text.SimpleAttributeSet
Checks whether the attribute list contains all the specified name/value pairs.
containsAttributes(AttributeSet) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Checks whether the attribute set contains all of the given attributes.
containsAttributes(AttributeSet) - Method in class javax.swing.text.StyleContext.NamedStyle
Checks whether the element contains all the attributes.
containsAttributes(AttributeSet) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Checks whether the element contains all the attributes.
containsAttributes(AttributeSet) - Method in interface javax.swing.text.AttributeSet
Returns true if this set contains all the attributes with equal values.
containsCustomComponents(JOptionPane) - Method in class javax.swing.plaf.OptionPaneUI
Returns true if the user has supplied instances of Component for either the options or message.
containsCustomComponents(JOptionPane) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.
containsCustomComponents(JOptionPane) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call containsCustomComponents on each UI handled by this MultiUI.
containsKey(Object) - Method in class java.awt.RenderingHints
Returns true if this RenderingHints contains a mapping for the specified key.
containsKey(Object) - Method in class java.beans.beancontext.BeanContextSupport
Determines whether or not the specified object is currently a child of this BeanContext.
containsKey(Object) - Method in class java.util.Hashtable
Tests if the specified object is a key in this hashtable.
containsKey(Object) - Method in class java.util.AbstractMap
Returns true if this map contains a mapping for the specified key.
containsKey(Object) - Method in class java.util.WeakHashMap
Returns true if this map contains a mapping for the specified key.
containsKey(Object) - Method in class java.util.TreeMap
Returns true if this map contains a mapping for the specified key.
containsKey(Object) - Method in class java.util.HashMap
Returns true if this map contains a mapping for the specified key.
containsKey(Object) - Method in interface java.util.Map
Returns true if this map contains a mapping for the specified key.
containsKey(Object) - Method in class java.util.jar.Attributes
Returns true if this Map contains the specified attribute name (key).
containsValue(Object) - Method in class java.awt.RenderingHints
Returns true if this RenderingHints maps one or more keys to the specified value.
containsValue(Object) - Method in class java.util.Hashtable
Returns true if this Hashtable maps one or more keys to this value.
containsValue(Object) - Method in class java.util.AbstractMap
Returns true if this map maps one or more keys to this value.
containsValue(Object) - Method in class java.util.TreeMap
Returns true if this map maps one or more keys to the specified value.
containsValue(Object) - Method in class java.util.HashMap
Returns true if this map maps one or more keys to the specified value.
containsValue(Object) - Method in interface java.util.Map
Returns true if this map maps one or more keys to the specified value.
containsValue(Object) - Method in class java.util.jar.Attributes
Returns true if this Map maps one or more attribute names (keys) to the specified value.
content - Variable in class javax.swing.text.html.parser.ContentModel
The content.
content - Variable in class javax.swing.text.html.parser.Element
CONTENT - Static variable in class javax.swing.text.html.HTML.Tag
All text content is labeled with this tag.
CONTENT - Static variable in class javax.swing.text.html.HTML.Attribute
CONTENT_AREA_FILLED_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change from rollover enabled to disabled or back to enabled.
CONTENT_PANE_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
CONTENT_TYPE - Static variable in class java.util.jar.Attributes.Name
Name object for Content-Type manifest attribute.
content_type() - Method in class org.omg.CORBA.TypeCode
Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
contentBorderInsets - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
ContentElementName - Static variable in class javax.swing.text.AbstractDocument
Name of elements used to represent content
ContentHandler - class java.net.ContentHandler.
The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
ContentHandler() - Constructor for class java.net.ContentHandler
ContentHandlerFactory - interface java.net.ContentHandlerFactory.
This interface defines a factory for content handlers.
ContentModel - class javax.swing.text.html.parser.ContentModel.
A representation of a content model.
ContentModel() - Constructor for class javax.swing.text.html.parser.ContentModel
ContentModel(Element) - Constructor for class javax.swing.text.html.parser.ContentModel
Create a content model for an element.
ContentModel(int, ContentModel) - Constructor for class javax.swing.text.html.parser.ContentModel
Create a content model of a particular type.
ContentModel(int, Object, ContentModel) - Constructor for class javax.swing.text.html.parser.ContentModel
Create a content model of a particular type.
contentPane - Variable in class javax.swing.JRootPane
The content pane.
contentRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
contents - Variable in class java.awt.datatransfer.Clipboard
CONTENTS_CHANGED - Static variable in class javax.swing.event.ListDataEvent
Identifies one or more changes in the lists contents.
contentsChanged(ListDataEvent) - Method in class javax.swing.JComboBox
This method is public as an implementation side effect.
contentsChanged(ListDataEvent) - Method in class javax.swing.JList.AccessibleJList
List Data Listener contents changed method.
contentsChanged(ListDataEvent) - Method in interface javax.swing.event.ListDataListener
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
contentsChanged(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler
contentsChanged(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicListUI.ListDataHandler
contentsChanged(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
ContentType - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getType.
context - Variable in class java.awt.dnd.DropTargetEvent
The DropTargetConext associated with this DropTargetEvent.
Context - interface javax.naming.Context.
This interface represents a naming context, which consists of a set of name-to-object bindings.
Context - class org.omg.CORBA.Context.
An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
context_name() - Method in class org.omg.CORBA.Context
Retrieves the name of this Context object.
Context() - Constructor for class org.omg.CORBA.Context
ContextList - class org.omg.CORBA.ContextList.
An object containing a modifiable list of String objects that represent property names.
ContextList() - Constructor for class org.omg.CORBA.ContextList
ContextNotEmptyException - exception javax.naming.ContextNotEmptyException.
This exception is thrown when attempting to destroy a context that is not empty.
ContextNotEmptyException() - Constructor for class javax.naming.ContextNotEmptyException
Constructs a new instance of ContextNotEmptyException with all name resolution fields and explanation initialized to null.
ContextNotEmptyException(String) - Constructor for class javax.naming.ContextNotEmptyException
Constructs a new instance of ContextNotEmptyException using an explanation.
contexts() - Method in class org.omg.CORBA.Request
Retrieves the ContextList object for this request.
ContextualRenderedImageFactory - interface java.awt.image.renderable.ContextualRenderedImageFactory.
ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp.
CONTIGUOUS_TREE_SELECTION - Static variable in interface javax.swing.tree.TreeSelectionModel
Selection can only be contiguous.
CONTINUE - Static variable in class javax.sound.midi.ShortMessage
Status byte for Continue message (0xFB, or 251).
continueDrag(int, int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
continueDrag(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Messages dragDividerTo with the new location for the mouse event.
CONTINUOUS_LAYOUT_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property name for continuousLayout.
continuousLayout - Variable in class javax.swing.JSplitPane
Whether or not the views are continuously redisplayed while resizing.
contListener - Variable in class javax.swing.plaf.metal.MetalToolBarUI
control - Static variable in class java.awt.SystemColor
The background color for control objects.
Control - class javax.sound.sampled.Control.
Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line.
Control - interface javax.naming.ldap.Control.
This interface represents an LDAPv3 control as defined in RFC 2251.
CONTROL - Static variable in class java.awt.SystemColor
The array index for the control background color.
CONTROL - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Instruction to display the control buttons.
CONTROL_CHANGE - Static variable in class javax.sound.midi.ShortMessage
Command value for Control Change message (0xB0, or 176)
CONTROL_DK_SHADOW - Static variable in class java.awt.SystemColor
The array index for the control dark shadow color.
CONTROL_FACTORIES - Static variable in interface javax.naming.ldap.LdapContext
Constant that holds the name of the environment property for specifying the list of control factories to use.
CONTROL_HIGHLIGHT - Static variable in class java.awt.SystemColor
The array index for the control highlight color.
CONTROL_LT_HIGHLIGHT - Static variable in class java.awt.SystemColor
The array index for the control light highlight color.
CONTROL_PICTURES - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
CONTROL_SHADOW - Static variable in class java.awt.SystemColor
The array index for the control shadow color.
CONTROL_TEXT - Static variable in class java.awt.SystemColor
The array index for the control text color.
Control.Type - class javax.sound.sampled.Control.Type.
An instance of the Type class represents the type of the control.
Control.Type(String) - Constructor for class javax.sound.sampled.Control.Type
Constructs a new control type with the name specified.
Control(Control.Type) - Constructor for class javax.sound.sampled.Control
Constructs a Control with the specified type.
controlChange(int, int) - Method in interface javax.sound.midi.MidiChannel
Reacts to a change in the specified controller's value.
controlChange(ShortMessage) - Method in interface javax.sound.midi.ControllerEventListener
Invoked when a Sequencer has encountered and processed a control-change event of interest to this listener.
controlDkShadow - Static variable in class java.awt.SystemColor
The dark shadow color for control objects.
controlDown() - Method in class java.awt.Event
Checks if the Control key is down.
ControlFactory - class javax.naming.ldap.ControlFactory.
This abstract class represents a factory for creating LDAPv3 controls.
ControlFactory() - Constructor for class javax.naming.ldap.ControlFactory
controlHighlight - Static variable in class java.awt.SystemColor
The regular highlight color for control objects.
CONTROLLED_BY - Static variable in class javax.accessibility.AccessibleRelation
Indicates an object is controlled by one or more target objects.
CONTROLLED_BY_PROPERTY - Static variable in class javax.accessibility.AccessibleRelation
Identifies that the target object that is doing the controlling has changed
CONTROLLER_FOR - Static variable in class javax.accessibility.AccessibleRelation
Indicates an object is a controller for one or more target objects.
CONTROLLER_FOR_PROPERTY - Static variable in class javax.accessibility.AccessibleRelation
Identifies that the controller for the target object has changed
ControllerEventListener - interface javax.sound.midi.ControllerEventListener.
The ControllerEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a requested type of MIDI control-change event.
controlLtHighlight - Static variable in class java.awt.SystemColor
The light highlight color for control objects.
controlShadow - Static variable in class java.awt.SystemColor
The regular shadow color for control objects.
controlText - Static variable in class java.awt.SystemColor
The text color for control objects.
convertColumnIndexToModel(int) - Method in class javax.swing.JTable
Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model.
convertColumnIndexToView(int) - Method in class javax.swing.JTable
Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view.
CONVERTED_TEXT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the converted text state.
convertMouseEvent(Component, MouseEvent, Component) - Static method in class javax.swing.SwingUtilities
Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system.
convertMouseEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup
convertPoint(Component, int, int, Component) - Static method in class javax.swing.SwingUtilities
Convert the point (x,y) in source coordinate system to destination coordinate system.
convertPoint(Component, Point, Component) - Static method in class javax.swing.SwingUtilities
Convert a aPoint in source coordinate system to destination coordinate system.
convertPointFromScreen(Point, Component) - Static method in class javax.swing.SwingUtilities
Convert a point from a screen coordinates to a component's coordinate system
convertPointToScreen(Point, Component) - Static method in class javax.swing.SwingUtilities
Convert a point from a component's coordinate system to screen coordinates.
convertRectangle(Component, Rectangle, Component) - Static method in class javax.swing.SwingUtilities
Convert the rectangle aRectangle in source coordinate system to destination coordinate system.
convertRowToY(int) - Method in class javax.swing.plaf.basic.BasicListUI
Return the JList relative Y coordinate of the origin of the specified row or -1 if row isn't valid.
convertToIntDiscrete(Raster, boolean) - Method in class java.awt.image.IndexColorModel
Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel.
convertToVector(Object[]) - Static method in class javax.swing.table.DefaultTableModel
Returns a vector that contains the same objects as the array.
convertToVector(Object[][]) - Static method in class javax.swing.table.DefaultTableModel
Returns a vector of vectors that contains the same objects as the array.
convertValueToText(Object, boolean, boolean, boolean, int, boolean) - Method in class javax.swing.JTree
Called by the renderers to convert the specified value to text.
convertYToRow(int) - Method in class javax.swing.plaf.basic.BasicListUI
Convert the JList relative coordinate to the row that contains it, based on the current layout.
ConvolveOp - class java.awt.image.ConvolveOp.
This class implements a convolution from the source to the destination.
ConvolveOp(Kernel) - Constructor for class java.awt.image.ConvolveOp
Constructs a ConvolveOp given a Kernel.
ConvolveOp(Kernel, int, RenderingHints) - Constructor for class java.awt.image.ConvolveOp
Constructs a ConvolveOp given a Kernel, an edge condition, and a RenderingHints object (which may be null).
COORDS - Static variable in class javax.swing.text.html.HTML.Attribute
copy - Variable in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
copy() - Method in class javax.swing.JPasswordField
Normally transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model.
copy() - Method in class javax.swing.text.JTextComponent
Transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model.
copy() - Method in interface org.omg.CORBA.DynAny
Clones this DynAny object.
copy() - Method in interface org.omg.CORBA.PolicyOperations
Copies the policy object.
copy() - Method in class org.omg.CORBA._PolicyStub
Copies the policy object.
copy(List, List) - Static method in class java.util.Collections
Copies all of the elements from one list into another.
copyAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to copy the selected region and place the contents into the system clipboard.
copyArea(int, int, int, int, int, int) - Method in class java.awt.Graphics
Copies an area of the component by a distance specified by dx and dy.
copyArea(int, int, int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.copyArea.
copyAttributes() - Method in class javax.swing.text.SimpleAttributeSet
Makes a copy of the attributes.
copyAttributes() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Copies a set of attributes.
copyAttributes() - Method in class javax.swing.text.StyleContext.NamedStyle
Copies a set of attributes.
copyAttributes() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Copies a set of attributes.
copyAttributes() - Method in interface javax.swing.text.AttributeSet
Returns an attribute set that is guaranteed not to change over time.
copyChildren() - Method in class java.beans.beancontext.BeanContextSupport
Gets a copy of the this BeanContext's children.
copyData(WritableRaster) - Method in interface java.awt.image.RenderedImage
Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.
copyData(WritableRaster) - Method in class java.awt.image.BufferedImage
Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster.
copyInto(Object[]) - Method in class java.util.Vector
Copies the components of this vector into the specified array.
copyInto(Object[]) - Method in class javax.swing.DefaultListModel
Copies the components of this list into the specified array.
copyObject(Object, ORB) - Static method in class javax.rmi.CORBA.Util
Copies or connects an object.
copyObject(Object, ORB) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
copyObjects(Object[], ORB) - Static method in class javax.rmi.CORBA.Util
Copies or connects an array of objects.
copyObjects(Object[], ORB) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).
copyValueOf(char[]) - Static method in class java.lang.String
Returns a String that is equivalent to the specified character array.
copyValueOf(char[], int, int) - Static method in class java.lang.String
Returns a String that is equivalent to the specified character array.
cos(double) - Static method in class java.lang.StrictMath
Returns the trigonometric cosine of an angle.
cos(double) - Static method in class java.lang.Math
Returns the trigonometric cosine of an angle.
count - Variable in class java.io.StringBufferInputStream
Deprecated. The number of valid characters in the input stream buffer.
count - Variable in class java.io.BufferedInputStream
The index one greater than the index of the last valid byte in the buffer.
count - Variable in class java.io.BufferedOutputStream
The number of valid bytes in the buffer.
count - Variable in class java.io.ByteArrayInputStream
The index one greater than the last valid character in the input stream buffer.
count - Variable in class java.io.CharArrayReader
The number of valid characters in the buffer.
count - Variable in class java.io.CharArrayWriter
The number of chars in the buffer.
count - Variable in class java.io.ByteArrayOutputStream
The number of valid bytes in the buffer.
count - Variable in class javax.swing.text.Segment
This is the number of array elements that make up the text of interest.
count() - Method in class org.omg.CORBA.ContextList
Returns the number of String objects in this ContextList object.
count() - Method in class org.omg.CORBA.ExceptionList
Retrieves the number of TypeCode objects in this ExceptionList object.
count() - Method in class org.omg.CORBA.NVList
Returns the number of NamedValue objects that have been added to this NVList object.
countComponents() - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by getComponentCount().
countItems() - Method in class java.awt.Menu
Deprecated. As of JDK version 1.1, replaced by getItemCount().
countItems() - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by getItemCount().
countItems() - Method in class java.awt.Choice
Deprecated. As of JDK version 1.1, replaced by getItemCount().
countMenus() - Method in class java.awt.MenuBar
Deprecated. As of JDK version 1.1, replaced by getMenuCount().
countObservers() - Method in class java.util.Observable
Returns the number of observers of this Observable object.
countStackFrames() - Method in class java.lang.Thread
Deprecated. The definition of this call depends on Thread.suspend(), which is deprecated. Further, the results of this call were never well-defined.
countTokens() - Method in class java.util.StringTokenizer
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
CPE - Static variable in class javax.naming.spi.NamingManager
Constant that holds the name of the environment property into which getContinuationContext() stores the value of its CannotProceedException parameter.
crc - Variable in class java.util.zip.GZIPOutputStream
CRC-32 of uncompressed data.
crc - Variable in class java.util.zip.GZIPInputStream
CRC-32 for uncompressed data.
CRC32 - class java.util.zip.CRC32.
A class that can be used to compute the CRC-32 of a data stream.
CRC32() - Constructor for class java.util.zip.CRC32
Creates a new CRC32 class.
create_abstract_interface_tc(String, String) - Method in class org.omg.CORBA.ORB
Create a TypeCode object for an IDL abstract interface.
create_alias_tc(String, String, TypeCode) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL alias (typedef).
create_any() - Method in class org.omg.CORBA.ORB
Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
create_array_tc(int, TypeCode) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL array.
create_basic_dyn_any(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_child(String) - Method in class org.omg.CORBA.Context
Creates a Context object with the given string as its name and with this Context object set as its parent.
create_context_list() - Method in class org.omg.CORBA.ORB
Creates an empty ContextList object.
create_dyn_any(Any) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_dyn_array(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_dyn_enum(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_dyn_sequence(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_dyn_struct(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_dyn_union(TypeCode) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_enum_tc(String, String, String[]) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL enum.
create_environment() - Method in class org.omg.CORBA.ORB
Creates an Environment object.
create_exception_list() - Method in class org.omg.CORBA.ORB
Creates an empty ExceptionList object.
create_exception_tc(String, String, StructMember[]) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL exception.
create_fixed_tc(short, short) - Method in class org.omg.CORBA.ORB
Create a TypeCode object for an IDL fixed type.
create_input_stream() - Method in class org.omg.CORBA.Any
Creates an input stream from which this Any object's value can be unmarshalled.
create_input_stream() - Method in class org.omg.CORBA.portable.OutputStream
Returns an input stream with the same buffer.
create_interface_tc(String, String) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL interface.
create_list(int) - Method in class org.omg.CORBA.ORB
Allocates an NVList with (probably) enough space for the specified number of NamedValue objects.
create_named_value(String, Any, int) - Method in class org.omg.CORBA.ORB
Creates a NamedValue object using the given name, value, and argument mode flags.
create_native_tc(String, String) - Method in class org.omg.CORBA.ORB
Create a TypeCode object for an IDL native type.
create_operation_list(Object) - Method in class org.omg.CORBA.ORB
Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
create_output_stream() - Method in class org.omg.CORBA.Any
Creates an output stream into which this Any object's value can be marshalled.
create_output_stream() - Method in class org.omg.CORBA.ORB
Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
create_policy(int, Any) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
create_recursive_sequence_tc(int, int) - Method in class org.omg.CORBA.ORB
Deprecated.
create_recursive_tc(String) - Method in class org.omg.CORBA.ORB
Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
create_request(Object, Context, String, NVList, NamedValue) - Method in class org.omg.CORBA.portable.Delegate
Creates a Request instance for use in the Dynamic Invocation Interface.
create_request(Object, Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in class org.omg.CORBA.portable.Delegate
Creates a Request instance for use in the Dynamic Invocation Interface.
create_sequence_tc(int, TypeCode) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL sequence.
create_string_tc(int) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing a bounded IDL string.
create_struct_tc(String, String, StructMember[]) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL struct.
create_union_tc(String, String, TypeCode, UnionMember[]) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing an IDL union.
create_value_box_tc(String, String, TypeCode) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object for an IDL value box.
create_value_tc(String, String, short, TypeCode, ValueMember[]) - Method in class org.omg.CORBA.ORB
Create a TypeCode object for an IDL value type.
create_wstring_tc(int) - Method in class org.omg.CORBA.ORB
Creates a TypeCode object representing a bounded IDL wstring (wide string).
create() - Method in class java.awt.Graphics
Creates a new Graphics object that is a copy of this Graphics object.
create() - Method in class java.net.DatagramSocketImpl
Creates a datagram socket.
create() - Method in class javax.swing.DebugGraphics
Overrides Graphics.create to return a DebugGraphics object.
create(boolean) - Method in class java.net.SocketImpl
Creates either a stream or a datagram socket.
create(DefaultStyledDocument.ElementSpec[]) - Method in class javax.swing.text.DefaultStyledDocument
Initialize the document to reflect the given element structure (i.e.
create(DefaultStyledDocument.ElementSpec[]) - Method in class javax.swing.text.html.HTMLDocument
Replaces the contents of the document with the given element specifications.
create(Element) - Method in interface javax.swing.text.ViewFactory
Creates a view from the given structural element of a document.
create(Element) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLFactory
Creates a view from an element.
create(Element) - Method in class javax.swing.plaf.basic.BasicTextUI
Creates a view for an element.
create(Element) - Method in class javax.swing.plaf.basic.BasicTextFieldUI
Creates a view (FieldView) based on an element.
create(Element) - Method in class javax.swing.plaf.basic.BasicPasswordFieldUI
Creates a view (PasswordView) for an element.
create(Element) - Method in class javax.swing.plaf.basic.BasicTextAreaUI
Creates the view for an element.
create(Element, int, int) - Method in class javax.swing.plaf.basic.BasicTextUI
Creates a view for an element.
create(int, int, int, int) - Method in class java.awt.Graphics
Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
create(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.create to return a DebugGraphics object.
create(ParameterBlock, RenderingHints) - Method in interface java.awt.image.renderable.RenderedImageFactory
Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints.
create(RenderContext, ParameterBlock) - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
createActionChangeListener(JButton) - Method in class javax.swing.JToolBar
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.
createActionChangeListener(JMenuItem) - Method in class javax.swing.JMenu
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
createActionChangeListener(JMenuItem) - Method in class javax.swing.JPopupMenu
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
createActionComponent(Action) - Method in class javax.swing.JMenu
Factory method which creates the JMenuItem for Actions added to the JMenu.
createActionComponent(Action) - Method in class javax.swing.JPopupMenu
Factory method which creates the JMenuItem for Actions added to the JPopupMenu.
createActionComponent(Action) - Method in class javax.swing.JToolBar
Factory method which creates the JButton for Actions added to the JToolBar.
createActionListener() - Method in class javax.swing.AbstractButton
createActionMap() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createActionPropertyChangeListener(Action) - Method in class javax.swing.AbstractButton
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActionPropertyChangeListener(Action) - Method in class javax.swing.JMenuItem
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActionPropertyChangeListener(Action) - Method in class javax.swing.JCheckBox
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActionPropertyChangeListener(Action) - Method in class javax.swing.JTextField
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActionPropertyChangeListener(Action) - Method in class javax.swing.JComboBox
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActionPropertyChangeListener(Action) - Method in class javax.swing.JRadioButton
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
createActions() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createArrowButton() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the arrow button.
createArrowButton() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
createArrowButtonListener() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createBandedRaster(DataBuffer, int, int, int, int[], int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
createBandedRaster(int, int, int, int, int[], int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.
createBandedRaster(int, int, int, int, Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.
createBCSChild(Object, Object) - Method in class java.beans.beancontext.BeanContextSupport
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
createBCSChild(Object, Object) - Method in class java.beans.beancontext.BeanContextServicesSupport
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
createBCSSServiceProvider(Class, BeanContextServiceProvider) - Method in class java.beans.beancontext.BeanContextServicesSupport
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.
createBevelBorder(int) - Static method in class javax.swing.BorderFactory
Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
createBevelBorder(int, Color, Color) - Static method in class javax.swing.BorderFactory
Creates a beveled border of the specified type, using the specified highlighting and shadowing.
createBevelBorder(int, Color, Color, Color, Color) - Static method in class javax.swing.BorderFactory
Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
createBlackLineBorder() - Static method in class javax.swing.border.LineBorder
Convenience method for getting the Color.black LineBorder of thickness 1.
createBorderListener(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createBranchElement(Element, AttributeSet) - Method in class javax.swing.text.AbstractDocument
Creates a document branch element, that can contain other elements.
createBranchElement(Element, AttributeSet) - Method in class javax.swing.text.html.HTMLDocument
Creates a document branch element, that can contain other elements.
createButton(Button) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Button using the specified peer interface.
createButtonActionListener(int) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
createButtonArea() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Creates and returns a Container containin the buttons.
createButtonListener(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
createButtonListener(AbstractButton) - Method in class javax.swing.plaf.metal.MetalButtonUI
createButtons() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createButtons() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
createCanvas(Canvas) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Canvas using the specified peer interface.
createCaret() - Method in class javax.swing.text.EditorKit
Fetches a caret that can navigate through views produced by the associated ViewFactory.
createCaret() - Method in class javax.swing.text.DefaultEditorKit
Fetches a caret that can navigate through views produced by the associated ViewFactory.
createCaret() - Method in class javax.swing.plaf.basic.BasicTextUI
Creates the object to use for a caret.
createCaret() - Method in class javax.swing.plaf.basic.BasicTextFieldUI
Creates the caret for a field.
createCellEditorListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates a listener to handle events from the current editor.
createCellRendererPane() - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the renderer pane that renderer components are placed in.
createChangeListener() - Method in class javax.swing.JTabbedPane
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
createChangeListener() - Method in class javax.swing.AbstractButton
Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation.
createChangeListener() - Method in class javax.swing.JProgressBar
createChangeListener() - Method in class javax.swing.JSlider
Subclasses that want to handle model ChangeEvents differently can override this method to return their own ChangeListener implementation.
createChangeListener() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createChangeListener() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createChangeListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createCheckbox(Checkbox) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Checkbox using the specified peer interface.
createCheckboxMenuItem(CheckboxMenuItem) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.
createChild(int, int, int, int, int, int, int[]) - Method in class java.awt.image.Raster
Returns a new Raster which shares all or part of this Raster's DataBuffer.
createChildren(DefaultMutableTreeNode, Object) - Static method in class javax.swing.JTree.DynamicUtilTreeNode
Adds to parent all the children in children.
createChildState(View) - Method in class javax.swing.text.AsyncBoxView
New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more
createChoice(Choice) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Choice using the specified peer interface.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in class java.awt.image.LookupOp
Creates a zeroed destination image with the correct size and number of bands.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in interface java.awt.image.BufferedImageOp
Creates a zeroed destination image with the correct size and number of bands.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in class java.awt.image.ConvolveOp
Creates a zeroed destination image with the correct size and number of bands.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in class java.awt.image.AffineTransformOp
Creates a zeroed destination image with the correct size and number of bands.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in class java.awt.image.ColorConvertOp
Creates a zeroed destination image with the correct size and number of bands, given this source.
createCompatibleDestImage(BufferedImage, ColorModel) - Method in class java.awt.image.RescaleOp
Creates a zeroed destination image with the correct size and number of bands.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.LookupOp
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.ConvolveOp
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.BandCombineOp
Creates a zeroed destination Raster with the correct size and number of bands.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.AffineTransformOp
Creates a zeroed destination Raster with the correct size and number of bands.
createCompatibleDestRaster(Raster) - Method in interface java.awt.image.RasterOp
Creates a zeroed destination Raster with the correct size and number of bands.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.ColorConvertOp
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
createCompatibleDestRaster(Raster) - Method in class java.awt.image.RescaleOp
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
createCompatibleImage(int, int) - Method in class java.awt.GraphicsConfiguration
Returns a BufferedImage with a data layout and color model compatible with this GraphicsConfiguration.
createCompatibleImage(int, int, int) - Method in class java.awt.GraphicsConfiguration
Returns a BufferedImage that supports the specified transparency and has a data layout and color model compatible with this GraphicsConfiguration.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.SampleModel
Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.ComponentSampleModel
Creates a new ComponentSampleModel with the specified width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.PixelInterleavedSampleModel
Creates a new PixelInterleavedSampleModel with the specified width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.BandedSampleModel
Creates a new BandedSampleModel with the specified width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.ColorModel
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.PackedColorModel
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.ComponentColorModel
Creates a SampleModel with the specified width and height, that has a data layout compatible with this ColorModel.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.MultiPixelPackedSampleModel
Creates a new MultiPixelPackedSampleModel with the specified width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.SinglePixelPackedSampleModel
This creates a new SinglePixelPackedSampleModel with the specified width and height.
createCompatibleSampleModel(int, int) - Method in class java.awt.image.IndexColorModel
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
createCompatibleWritableRaster() - Method in class java.awt.image.Raster
Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.
createCompatibleWritableRaster(int, int) - Method in class java.awt.image.Raster
Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.
createCompatibleWritableRaster(int, int) - Method in class java.awt.image.ColorModel
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
createCompatibleWritableRaster(int, int) - Method in class java.awt.image.ComponentColorModel
Creates a WritableRaster with the specified width and height, that has a data layout (SampleModel) compatible with this ColorModel.
createCompatibleWritableRaster(int, int) - Method in class java.awt.image.DirectColorModel
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
createCompatibleWritableRaster(int, int) - Method in class java.awt.image.IndexColorModel
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
createCompatibleWritableRaster(int, int, int, int) - Method in class java.awt.image.Raster
Create a compatible WritableRaster with the specified location (minX, minY) and size (width, height), a new SampleModel, and a new initialized DataBuffer.
createCompatibleWritableRaster(Rectangle) - Method in class java.awt.image.Raster
Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.
createComponent() - Method in class javax.swing.text.ComponentView
Create the component that is associated with this view.
createComponent() - Method in class javax.swing.text.html.FormView
Create the component.
createComponent() - Method in class javax.swing.text.html.ObjectView
Create the component.
createComponent(Component) - Method in class java.awt.Toolkit
Creates a peer for a component or container.
createComponentListener() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createComponentListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates and returns a new ComponentHandler.
createComponentListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createCompoundBorder() - Static method in class javax.swing.BorderFactory
Creates a compound border with a null inside edge and a null outside edge.
createCompoundBorder(Border, Border) - Static method in class javax.swing.BorderFactory
Creates a compound border specifying the border objects to use for the outside and inside edges.
createCompoundEdit() - Method in class javax.swing.undo.UndoableEditSupport
Called only from beginUpdate.
createContainer() - Method in class javax.swing.tree.DefaultTreeCellEditor
Creates the container to manage placement of editingComponent.
createContainerListener() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
createContainerListener() - Method in class javax.swing.plaf.metal.MetalToolBarUI
createContentHandler(String) - Method in interface java.net.ContentHandlerFactory
Creates a new ContentHandler to read an object from a URLStreamHandler.
createContentPane() - Method in class javax.swing.JRootPane
Called by the constructor methods to create the default contentPane.
createContext(ColorModel, ColorModel, RenderingHints) - Method in class java.awt.AlphaComposite
Creates a context for the compositing operation.
createContext(ColorModel, ColorModel, RenderingHints) - Method in interface java.awt.Composite
Creates a context containing state that is used to perform the compositing operation.
createContext(ColorModel, Rectangle, Rectangle2D, AffineTransform, RenderingHints) - Method in class java.awt.TexturePaint
Creates and returns a context used to generate the color pattern.
createContext(ColorModel, Rectangle, Rectangle2D, AffineTransform, RenderingHints) - Method in class java.awt.GradientPaint
Creates and returns a context used to generate the color pattern.
createContext(ColorModel, Rectangle, Rectangle2D, AffineTransform, RenderingHints) - Method in class java.awt.Color
Creates and returns a PaintContext used to generate a solid color pattern.
createContext(ColorModel, Rectangle, Rectangle2D, AffineTransform, RenderingHints) - Method in interface java.awt.Paint
Creates and returns a PaintContext used to generate the color pattern.
createContext(ColorModel, Rectangle, Rectangle2D, AffineTransform, RenderingHints) - Method in class java.awt.SystemColor
Create and return a PaintContext used to generate a solid color pattern.
createCustomCursor(Image, Point, String) - Method in class java.awt.Toolkit
Creates a new custom cursor object.
createDataBuffer() - Method in class java.awt.image.SampleModel
Creates a DataBuffer that corresponds to this SampleModel.
createDataBuffer() - Method in class java.awt.image.ComponentSampleModel
Creates a DataBuffer that corresponds to this ComponentSampleModel.
createDataBuffer() - Method in class java.awt.image.BandedSampleModel
Creates a DataBuffer that corresponds to this BandedSampleModel, The DataBuffer's data type, number of banks, and size will be consistent with this BandedSampleModel.
createDataBuffer() - Method in class java.awt.image.MultiPixelPackedSampleModel
Creates a DataBuffer that corresponds to this MultiPixelPackedSampleModel.
createDataBuffer() - Method in class java.awt.image.SinglePixelPackedSampleModel
Creates a DataBuffer that corresponds to this SinglePixelPackedSampleModel.
createDatagramSocketImpl() - Method in interface java.net.DatagramSocketImplFactory
Creates a new DatagramSocketImpl instance.
createdCellEditor - Variable in class javax.swing.plaf.basic.BasicTreeUI
Set to true if editor that is currently in the tree was created by this instance.
createDecreaseButton(int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createDecreaseButton(int) - Method in class javax.swing.plaf.metal.MetalScrollBarUI
Returns the view that represents the decrease view.
createDefaultCellEditor() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates a default cell editor.
createDefaultCellRenderer() - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the default cell renderer that is used to do the stamping of each node.
createDefaultChoosers() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
createDefaultColumnModel() - Method in class javax.swing.JTable
Returns the default column model object, which is a DefaultTableColumnModel.
createDefaultColumnModel() - Method in class javax.swing.table.JTableHeader
Returns the default column model object which is a DefaultTableColumnModel.
createDefaultColumnsFromModel() - Method in class javax.swing.JTable
Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
createDefaultDataModel() - Method in class javax.swing.JTable
Returns the default table model object, which is a DefaultTableModel.
createDefaultDivider() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Creates the default divider.
createDefaultDivider() - Method in class javax.swing.plaf.metal.MetalSplitPaneUI
Creates the default divider.
createDefaultDocument() - Method in class javax.swing.text.EditorKit
Creates an uninitialized text storage model that is appropriate for this type of editor.
createDefaultDocument() - Method in class javax.swing.text.DefaultEditorKit
Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.
createDefaultDocument() - Method in class javax.swing.text.StyledEditorKit
Creates an uninitialized text storage model that is appropriate for this type of editor.
createDefaultDocument() - Method in class javax.swing.text.html.HTMLEditorKit
Create an uninitialized text storage model that is appropriate for this type of editor.
createDefaultDragGestureRecognizer(Component, int, DragGestureListener) - Method in class java.awt.dnd.DragSource
Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.
createDefaultEditorKit() - Method in class javax.swing.JEditorPane
Creates the default editor kit (PlainEditorKit) for when the component is first created.
createDefaultEditorKit() - Method in class javax.swing.JTextPane
Creates the EditorKit to use by default.
createDefaultEditors() - Method in class javax.swing.JTable
Creates default cell editors for objects, numbers, and boolean values.
createDefaultHeaderRenderer() - Method in class javax.swing.table.TableColumn
As of Java 2 platform v1.3, this method is not called by the TableColumn constructor.
createDefaultKeySelectionManager() - Method in class javax.swing.JComboBox
Returns an instance of the default key-selection manager.
createDefaultModel() - Method in class javax.swing.JTextField
Creates the default implementation of the model to be used at construction if one isn't explicitly given.
createDefaultModel() - Method in class javax.swing.JTextArea
Creates the default implementation of the model to be used at construction if one isn't explicitly given.
createDefaultNonContinuousLayoutDivider() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.
createDefaultRenderer() - Method in class javax.swing.table.JTableHeader
Returns a default renderer to be used when no header renderer is defined by a TableColumn.
createDefaultRenderers() - Method in class javax.swing.JTable
Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.
createDefaultRendering() - Method in class java.awt.image.renderable.RenderableImageOp
Gets a RenderedImage instance of this image with a default width and height in pixels.
createDefaultRendering() - Method in interface java.awt.image.renderable.RenderableImage
Returnd a RenderedImage instance of this image with a default width and height in pixels.
createDefaultRoot() - Method in class javax.swing.text.PlainDocument
Creates the root element to be used to represent the default document structure.
createDefaultRoot() - Method in class javax.swing.text.DefaultStyledDocument
Creates the root element to be used to represent the default document structure.
createDefaultRoot() - Method in class javax.swing.text.html.HTMLDocument
Creates the root element to be used to represent the default document structure.
createDefaultSelectionModel() - Method in class javax.swing.JTable
Returns the default selection model object, which is a DefaultListSelectionModel.
createDefaultTableHeader() - Method in class javax.swing.JTable
Returns the default table header object, which is a JTableHeader.
createDefaultTheme() - Method in class javax.swing.plaf.metal.MetalLookAndFeel
createDesktopManager() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createDialog(Component, String) - Method in class javax.swing.JOptionPane
Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
createDialog(Component, String, boolean, JColorChooser, ActionListener, ActionListener) - Static method in class javax.swing.JColorChooser
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.
createDialog(Dialog) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Dialog using the specified peer interface.
createDirectoryComboBoxModel(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createDirectoryComboBoxRenderer(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createDisabledImage(Image) - Static method in class javax.swing.GrayFilter
Creates a disabled image
createDockingListener() - Method in class javax.swing.plaf.basic.BasicToolBarUI
createDockingListener() - Method in class javax.swing.plaf.metal.MetalToolBarUI
createDoubleClickListener(JFileChooser, JList) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
createDragGestureRecognizer(Class, Component, int, DragGestureListener) - Method in class java.awt.dnd.DragSource
Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
createDragGestureRecognizer(Class, DragSource, Component, int, DragGestureListener) - Method in class java.awt.Toolkit
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation
createDragSourceContext(DragSourceContextPeer, DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener) - Method in class java.awt.dnd.DragSource
Create the DragSourceContext to handle this drag.
createDragSourceContextPeer(DragGestureEvent) - Method in class java.awt.Toolkit
create the peer for a DragSourceContext
createDragWindow(JToolBar) - Method in class javax.swing.plaf.basic.BasicToolBarUI
createdRenderer - Variable in class javax.swing.plaf.basic.BasicTreeUI
Set to true if the renderer that is currently in the tree was created by this instance.
createDropTargetAutoScroller(Component, Point) - Method in class java.awt.dnd.DropTarget
create an embedded autoscroller
createDropTargetContext() - Method in class java.awt.dnd.DropTarget
Create the DropTargetContext associated with this DropTarget.
createDTD(DTD, String) - Static method in class javax.swing.text.html.parser.ParserDelegator
createEastPane(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createEditor() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the editor that is to be used in editable combo boxes.
createEditor() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
createEditorKitForContentType(String) - Static method in class javax.swing.JEditorPane
Creates a handler for the given type from the default registry of editor kits.
createEmptyBorder() - Static method in class javax.swing.BorderFactory
Creates an empty border that takes up no space.
createEmptyBorder(int, int, int, int) - Static method in class javax.swing.BorderFactory
Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
createEmptyFrameIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory
createEtchedBorder() - Static method in class javax.swing.BorderFactory
Creates a border with an "etched" look using the component's current background color for highlighting and shading.
createEtchedBorder(Color, Color) - Static method in class javax.swing.BorderFactory
Creates a border with an "etched" look using the specified highlighting and shading colors.
createEtchedBorder(int) - Static method in class javax.swing.BorderFactory
Creates a border with an "etched" look using the component's current background color for highlighting and shading.
createEtchedBorder(int, Color, Color) - Static method in class javax.swing.BorderFactory
Creates a border with an "etched" look using the specified highlighting and shading colors.
createExceptionReply() - Method in interface org.omg.CORBA.portable.ResponseHandler
Called by the servant during a method invocation.
createExtendedResponse(String, byte[], int, int) - Method in interface javax.naming.ldap.ExtendedRequest
Creates the response object that corresponds to this request.
createFileDialog(FileDialog) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of FileDialog using the specified peer interface.
createFileObject(File, String) - Method in class javax.swing.filechooser.FileSystemView
Returns a File object constructed in dir from the given filename.
createFileObject(String) - Method in class javax.swing.filechooser.FileSystemView
Returns a File object constructed from the given path string.
createFilterComboBoxModel() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createFilterComboBoxRenderer() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createFloatingFrame(JToolBar) - Method in class javax.swing.plaf.basic.BasicToolBarUI
createFocusListener() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createFocusListener() - Method in class javax.swing.plaf.basic.BasicTableUI
Creates the focus listener for handling keyboard navigation in the JTable.
createFocusListener() - Method in class javax.swing.plaf.basic.BasicListUI
createFocusListener() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the focus listener that hides the popup when the focus is lost.
createFocusListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates a listener that is responsible for updating the display when focus is lost/gained.
createFocusListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Creates a FocusListener for the JSplitPane UI.
createFocusListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createFont(int, InputStream) - Static method in class java.awt.Font
Returns a new Font with the specified font type and input data.
createFragment(int, int) - Method in class javax.swing.text.View
Create a view that represents a portion of the element.
createFragment(int, int) - Method in class javax.swing.text.GlyphView
Creates a view that represents a portion of the element.
createFrame(Frame) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Frame using the specified peer interface.
createFrameListener() - Method in class javax.swing.plaf.basic.BasicToolBarUI
createGlassPane() - Method in class javax.swing.JRootPane
Called by the constructor methods to create the default glassPane.
createGlassPaneDispatcher() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createGlue() - Static method in class javax.swing.Box
Creates an invisible "glue" component that can be useful in a Box whose visible components have a maximum width (for a horizontal box) or height (for a vertical box).
createGlyphVector(FontRenderContext, char[]) - Method in class java.awt.Font
Returns a new GlyphVector object created with the specified array of characters and the specified FontRenderContext.
createGlyphVector(FontRenderContext, CharacterIterator) - Method in class java.awt.Font
Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.
createGlyphVector(FontRenderContext, int[]) - Method in class java.awt.Font
Returns a new GlyphVector object created with the specified integer array and the specified FontRenderContext.
createGlyphVector(FontRenderContext, String) - Method in class java.awt.Font
Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
createGraphics() - Method in class java.awt.image.BufferedImage
Creates a Graphics2D, which can be used to draw into this BufferedImage.
createGraphics(BufferedImage) - Method in class java.awt.GraphicsEnvironment
Returns a Graphics2D object for rendering into the specified BufferedImage.
createGrayLineBorder() - Static method in class javax.swing.border.LineBorder
Convenience method for getting the Color.gray LineBorder of thickness 1.
createGroup(ActivationGroupID, ActivationGroupDesc, long) - Static method in class java.rmi.activation.ActivationGroup
Create and set the activation group for the current VM.
createHighlighter() - Method in class javax.swing.plaf.basic.BasicTextUI
Creates the object to use for adding highlights.
createHorizontalBox() - Static method in class javax.swing.Box
Creates a Box that displays its components from left to right.
createHorizontalGlue() - Static method in class javax.swing.Box
Creates a horizontal glue component.
createHorizontalScrollBar() - Method in class javax.swing.JScrollPane
Returns a JScrollPane.ScrollBar by default.
createHorizontalStrut(int) - Static method in class javax.swing.Box
Creates an invisible, fixed-width component.
createHSBChangeListener() - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
createHTMLView(JComponent, String) - Static method in class javax.swing.plaf.basic.BasicHTML
Create an html renderer for the given component and string of html.
createImage(byte[]) - Method in class java.awt.Toolkit
Creates an image which decodes the image stored in the specified byte array.
createImage(byte[], int, int) - Method in class java.awt.Toolkit
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
createImage(ImageProducer) - Method in class java.awt.Component
Creates an image from the specified image producer.
createImage(ImageProducer) - Method in class java.awt.Toolkit
Creates an image with the specified image producer.
createImage(int, int) - Method in class java.awt.Component
Creates an off-screen drawable image to be used for double buffering.
createImage(String) - Method in class java.awt.Toolkit
Returns an image which gets pixel data from the specified file.
createImage(URL) - Method in class java.awt.Toolkit
Returns an image which gets pixel data from the specified URL.
createIncreaseButton(int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createIncreaseButton(int) - Method in class javax.swing.plaf.metal.MetalScrollBarUI
Returns the view that represents the increase view.
createInitialContextFactory(Hashtable) - Method in interface javax.naming.spi.InitialContextFactoryBuilder
Creates an initial context factory using the specified environment.
createInputAttributes(Element, MutableAttributeSet) - Method in class javax.swing.text.StyledEditorKit
Copies the key/values in elements AttributeSet into set.
createInputAttributes(Element, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLEditorKit
Copies the key/values in elements AttributeSet into set.
createInputMethod() - Method in interface java.awt.im.spi.InputMethodDescriptor
Creates a new instance of the corresponding input method.
createInputMethodWindow(String, boolean) - Method in interface java.awt.im.spi.InputMethodContext
Creates a top-level window for use by the input method.
createInterleavedRaster(DataBuffer, int, int, int, int, int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
createInterleavedRaster(int, int, int, int, int, int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.
createInterleavedRaster(int, int, int, int, Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.
createInternalFrame(Component, String) - Method in class javax.swing.JOptionPane
Creates and returns an instance of JInternalFrame.
createInternalFrameListener() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createIntersection(Rectangle2D) - Method in class java.awt.Rectangle
Returns a new Rectangle2D object representing the intersection of this Rectangle with the specified Rectangle2D.
createIntersection(Rectangle2D) - Method in class java.awt.geom.Rectangle2D
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
createIntersection(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Float
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
createIntersection(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Double
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
createInverse() - Method in class java.awt.geom.AffineTransform
Returns an AffineTransform object representing the inverse transformation.
createItemListener() - Method in class javax.swing.AbstractButton
createItemListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates an item listener that watches for changes in the selected item in the JComboBox.
createItemListener() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the item listener that watches for updates in the current selection so that it can update the display.
createKeyboardDownRightListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
createKeyboardEndListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
createKeyboardHomeListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
createKeyboardResizeToggleListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
createKeyboardUpLeftListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
createKeyListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates the key listener that is returned by ComboPopup.getKeyListener().
createKeyListener() - Method in class javax.swing.plaf.basic.BasicTableUI
Creates the key listener for handling keyboard navigation in the JTable.
createKeyListener() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the key listener for handling type-ahead.
createKeyListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates the listener reponsible for getting key events from the tree.
createKeymap() - Method in class javax.swing.plaf.basic.BasicTextUI
Creates the keymap to use for the text component, and installs any necessary bindings into it.
createLabel(Label) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Label using the specified peer interface.
createLargeAttributeSet(AttributeSet) - Method in class javax.swing.text.StyleContext
Create a large set of attributes that should trade off space for time.
createLargeAttributeSet(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Creates a large set of attributes that should trade off space for time.
createLayeredPane() - Method in class javax.swing.JRootPane
Called by the constructor methods to create the default layeredPane.
createLayout() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createLayout() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
createLayoutCache() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates the object responsible for managing what is expanded, as well as the size of nodes.
createLayoutManager() - Method in class javax.swing.JViewport
Subclassers can override this to install a different layout manager (or null) in the constructor.
createLayoutManager() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
createLayoutManager() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createLayoutManager() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createLayoutManager() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left.
createLayoutManager() - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
createLayoutManager() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
createLeafElement(Element, AttributeSet, int, int) - Method in class javax.swing.text.AbstractDocument
Creates a document leaf element.
createLeafElement(Element, AttributeSet, int, int) - Method in class javax.swing.text.html.HTMLDocument
Creates a document leaf element that directly represents text (doesn't have any children).
createLeftOneTouchButton() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Creates and return an instance of JButton that can be used to collapse the left component in the split pane.
createLineBorder(Color) - Static method in class javax.swing.BorderFactory
Creates a line border withe the specified color.
createLineBorder(Color, int) - Static method in class javax.swing.BorderFactory
Creates a line border with the specified color and width.
createList() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates the JList that is used in the popup to display the items in the model.
createList(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createList(List) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of List using the specified peer interface.
createListDataListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates a list data listener that watches for inserted and removed items from the combo box model.
createListDataListener() - Method in class javax.swing.plaf.basic.BasicListUI
Creates an instance of ListDataListener that's added to the JLists by model as needed.
createListDataListener() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the list data listener that is used for caching the preferred sizes.
createListMouseListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates a mouse listener that watches for mouse events in the popup's list.
createListMouseMotionListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates a mouse motion listener that watches for mouse events in the popup's list.
createListSelectionListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates a list selection listener that watches for selection changes in the popup's list.
createListSelectionListener() - Method in class javax.swing.plaf.basic.BasicListUI
Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed.
createListSelectionListener(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
createLoweredBevelBorder() - Static method in class javax.swing.BorderFactory
Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
createMatteBorder(int, int, int, int, Color) - Static method in class javax.swing.BorderFactory
Creates a matte-look border using a solid color.
createMatteBorder(int, int, int, int, Icon) - Static method in class javax.swing.BorderFactory
Creates a matte-look border that consists of multiple tiles of a specified icon.
createMenu(Menu) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Menu using the specified peer interface.
createMenuBar(MenuBar) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of MenuBar using the specified peer interface.
createMenuDragMouseListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createMenuItem(MenuItem) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of MenuItem using the specified peer interface.
createMenuKeyListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
createMenuKeyListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createMenuListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createMessageArea() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Messaged from installComponents to create a Container containing the body of the message.
createModel() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
createModelListener() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createMouseInputListener() - Method in class javax.swing.plaf.basic.BasicTableUI
Creates the mouse listener for the JTable.
createMouseInputListener() - Method in class javax.swing.plaf.basic.BasicListUI
Creates a delegate that implements MouseInputListener.
createMouseInputListener() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Creates the mouse listener for the JTable.
createMouseInputListener() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
createMouseInputListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
createMouseInputListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createMouseListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates the mouse listener that is returned by ComboPopup.getMouseListener().
createMouseListener() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createMouseListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates the listener responsible for updating the selection based on mouse events.
createMouseMotionListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates the mouse motion listener that is returned by ComboPopup.getMouseMotionListener().
createNewFile() - Method in class java.io.File
Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist.
createNewFolder(File) - Method in class javax.swing.filechooser.FileSystemView
creates a new folder with a default folder name.
createNodeDimensions() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates an instance of NodeDimensions that is able to determine the size of a given node in the tree.
createNorthPane(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createNorthPane(JInternalFrame) - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
createObjectFactory(Object, Hashtable) - Method in interface javax.naming.spi.ObjectFactoryBuilder
Creates a new object factory using the environment supplied.
createPackedRaster(DataBuffer, int, int, int, int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
createPackedRaster(DataBuffer, int, int, int, Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.
createPackedRaster(int, int, int, int[], Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.
createPackedRaster(int, int, int, int, int, Point) - Static method in class java.awt.image.Raster
Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.
createPanel(Panel) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Panel using the specified peer interface.
createPopup() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates an implementation of the ComboPopup interface.
createPopup() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
createPopupMenu(PopupMenu) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of PopupMenu using the specified peer interface.
createPosition(int) - Method in interface javax.swing.text.Document
This method allows an application to mark a place in a sequence of character content.
createPosition(int) - Method in class javax.swing.text.AbstractDocument
Returns a position that will track change as the document is altered.
createPosition(int) - Method in interface javax.swing.text.AbstractDocument.Content
Creates a position within the content that will track change as the content is mutated.
createPosition(int) - Method in class javax.swing.text.StringContent
Creates a position within the content that will track change as the content is mutated.
createPosition(int) - Method in class javax.swing.text.GapContent
Creates a position within the content that will track change as the content is mutated.
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates a property change listener that watches for changes in the bound properties in the JComboBox.
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicListUI
Creates an instance of PropertyChangeHandler that's added to the JList by installUI().
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the list data listener that is used for caching the preferred sizes.
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates a listener that is responsible that updates the UI based on how the tree changes.
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Creates a PropertyChangeListener for the JSplitPane UI.
createPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
Creates an instance of PropertyChangeListener that's added to the JScrollPane by installUI().
createPropertyChangeListener() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
createPropertyChangeListener() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
createPropertyChangeListener() - Method in class javax.swing.plaf.metal.MetalScrollBarUI
createPropertyChangeListener(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI
createPropertyChangeListener(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
createPropertyChangeListener(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
createPropertyChangeListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createPropertyChangeListener(JSlider) - Method in class javax.swing.plaf.metal.MetalSliderUI
createPropertyListener() - Method in class javax.swing.plaf.basic.BasicToolBarUI
createRaisedBevelBorder() - Static method in class javax.swing.BorderFactory
Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
createRaster(SampleModel, DataBuffer, Point) - Static method in class java.awt.image.Raster
Creates a Raster with the specified SampleModel and DataBuffer.
createRegistry(int) - Static method in class java.rmi.registry.LocateRegistry
Creates and exports a Registry on the local host that accepts requests on the specified port.
createRegistry(int, RMIClientSocketFactory, RMIServerSocketFactory) - Static method in class java.rmi.registry.LocateRegistry
Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.
createRenderer() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Creates the renderer that is to be used in the combo box.
createRendering(RenderContext) - Method in class java.awt.image.renderable.RenderableImageOp
Creates a RenderedImage which represents this RenderableImageOp (including its Renderable sources) rendered according to the given RenderContext.
createRendering(RenderContext) - Method in interface java.awt.image.renderable.RenderableImage
Creates a RenderedImage that represented a rendering of this image using a given RenderContext.
createReply() - Method in interface org.omg.CORBA.portable.ResponseHandler
Called by the servant during a method invocation.
createRightOneTouchButton() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Creates and return an instance of JButton that can be used to collapse the right component in the split pane.
createRigidArea(Dimension) - Static method in class javax.swing.Box
Creates an invisible component that's always the specified size.
createRolloverListener() - Method in class javax.swing.plaf.metal.MetalToolBarUI
createRootLayout() - Method in class javax.swing.JRootPane
Called by the constructor methods to create the default layoutManager.
createRootPane() - Method in class javax.swing.JWindow
Called by the constructor methods to create the default rootPane.
createRootPane() - Method in class javax.swing.JApplet
Called by the constructor methods to create the default rootPane.
createRootPane() - Method in class javax.swing.JInternalFrame
Called by the constructor to set up the JRootPane.
createRootPane() - Method in class javax.swing.JFrame
Called by the constructor methods to create the default rootPane.
createRootPane() - Method in class javax.swing.JDialog
Called by the constructor methods to create the default rootPane.
createRow() - Method in class javax.swing.text.FlowView
Create a View that should be used to hold a a rows worth of children in a flow.
createRow() - Method in class javax.swing.text.ParagraphView
Create a View that should be used to hold a a rows worth of children in a flow.
createScaledRendering(int, int, RenderingHints) - Method in class java.awt.image.renderable.RenderableImageOp
Creates a RenderedImage instance of this image with width w, and height h in pixels.
createScaledRendering(int, int, RenderingHints) - Method in interface java.awt.image.renderable.RenderableImage
Creates a RenderedImage instance of this image with width w, and height h in pixels.
createScreenCapture(Rectangle) - Method in class java.awt.Robot
Creates an image containing pixels read from the screen.
createScrollbar(Scrollbar) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Scrollbar using the specified peer interface.
createScrollBarSwapListener() - Method in class javax.swing.plaf.metal.MetalScrollPaneUI
createScroller() - Method in class javax.swing.plaf.basic.BasicComboPopup
Creates the JScrollPane that is used in the popup to hold the list.
createScrollListener() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createScrollListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createScrollPane(ScrollPane) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of ScrollPane using the specified peer interface.
createScrollPaneForTable(JTable) - Static method in class javax.swing.JTable
Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).
createSelectionModel() - Method in class javax.swing.JList
Returns an instance of DefaultListSelectionModel.
createSelectionModel() - Method in class javax.swing.table.DefaultTableColumnModel
Creates a new default list selection model.
createSelectionModelPropertyChangeListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates the listener responsible for getting property change events from the selection model.
createSeparator() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
createServerSocket(int) - Method in interface java.rmi.server.RMIServerSocketFactory
Create a server socket on the specified port (port 0 indicates an anonymous port).
createServerSocket(int) - Method in class java.rmi.server.RMISocketFactory
Create a server socket on the specified port (port 0 indicates an anonymous port).
createSmallAttributeSet(AttributeSet) - Method in class javax.swing.text.StyleContext
Create a compact set of attributes that might be shared.
createSmallAttributeSet(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Creates a compact set of attributes that might be shared.
createSocket(String, int) - Method in interface java.rmi.server.RMIClientSocketFactory
Create a client socket connected to the specified host and port.
createSocket(String, int) - Method in class java.rmi.server.RMISocketFactory
Creates a client socket connected to the specified host and port.
createSocketImpl() - Method in interface java.net.SocketImplFactory
Creates a new SocketImpl instance.
createSouthPane(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createStandardLabels(int) - Method in class javax.swing.JSlider
Creates a hashtable that will draw text labels starting at the slider minimum using the increment specified.
createStandardLabels(int, int) - Method in class javax.swing.JSlider
Creates a hashtable that will draw text labels starting at the start point specified using the increment specified.
createStatement() - Method in interface java.sql.Connection
Creates a Statement object for sending SQL statements to the database.
createStatement(int, int) - Method in interface java.sql.Connection
Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
createStrokedShape(Shape) - Method in interface java.awt.Stroke
Returns an outline Shape which encloses the area that should be painted when the Shape is stroked according to the rules defined by the object implementing the Stroke interface.
createStrokedShape(Shape) - Method in class java.awt.BasicStroke
Returns a Shape whose interior defines the stroked outline of a specified Shape.
createSubcontext(Name) - Method in class javax.naming.InitialContext
createSubcontext(Name) - Method in interface javax.naming.Context
Creates and binds a new context.
createSubcontext(Name, Attributes) - Method in interface javax.naming.directory.DirContext
Creates and binds a new context, along with associated attributes.
createSubcontext(Name, Attributes) - Method in class javax.naming.directory.InitialDirContext
createSubcontext(String) - Method in class javax.naming.InitialContext
createSubcontext(String) - Method in interface javax.naming.Context
Creates and binds a new context.
createSubcontext(String, Attributes) - Method in interface javax.naming.directory.DirContext
Creates and binds a new context, along with associated attributes.
createSubcontext(String, Attributes) - Method in class javax.naming.directory.InitialDirContext
createSubsetSampleModel(int[]) - Method in class java.awt.image.SampleModel
Creates a new SampleModel with a subset of the bands of this SampleModel.
createSubsetSampleModel(int[]) - Method in class java.awt.image.ComponentSampleModel
This creates a new ComponentSampleModel with a subset of the bands of this ComponentSampleModel.
createSubsetSampleModel(int[]) - Method in class java.awt.image.PixelInterleavedSampleModel
Creates a new PixelInterleavedSampleModel with a subset of the bands of this PixelInterleavedSampleModel.
createSubsetSampleModel(int[]) - Method in class java.awt.image.BandedSampleModel
Creates a new BandedSampleModel with a subset of the bands of this BandedSampleModel.
createSubsetSampleModel(int[]) - Method in class java.awt.image.MultiPixelPackedSampleModel
Creates a new MultiPixelPackedSampleModel with a subset of the bands of this MultiPixelPackedSampleModel.
createSubsetSampleModel(int[]) - Method in class java.awt.image.SinglePixelPackedSampleModel
This creates a new SinglePixelPackedSampleModel with a subset of the bands of this SinglePixelPackedSampleModel.
createSystemMenu() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createSystemMenuBar() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createTableCell(Element) - Method in class javax.swing.text.TableView
Deprecated. Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.
createTableRow(Element) - Method in class javax.swing.text.TableView
Creates a new table row.
createTempFile(String, String) - Static method in class java.io.File
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
createTempFile(String, String, File) - Static method in class java.io.File
Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
createTextArea(TextArea) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of TextArea using the specified peer interface.
createTextField(TextField) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of TextField using the specified peer interface.
createTitledBorder(Border) - Static method in class javax.swing.BorderFactory
Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel.
createTitledBorder(Border, String) - Static method in class javax.swing.BorderFactory
Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
createTitledBorder(Border, String, int, int) - Static method in class javax.swing.BorderFactory
Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
createTitledBorder(Border, String, int, int, Font) - Static method in class javax.swing.BorderFactory
Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
createTitledBorder(Border, String, int, int, Font, Color) - Static method in class javax.swing.BorderFactory
Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
createTitledBorder(String) - Static method in class javax.swing.BorderFactory
Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
createToolBarContListener() - Method in class javax.swing.plaf.basic.BasicToolBarUI
createToolBarFocusListener() - Method in class javax.swing.plaf.basic.BasicToolBarUI
createToolTip() - Method in class javax.swing.JComponent
Returns the instance of JToolTip that should be used to display the tooltip.
createTrack() - Method in class javax.sound.midi.Sequence
Creates a new, initially empty track as part of this sequence.
createTrackListener() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
createTrackListener(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
createTransferableProxy(Transferable, boolean) - Method in class java.awt.dnd.DropTargetContext
subclasses may override this to supply their own Proxy Transferable
createTransformedArea(AffineTransform) - Method in class java.awt.geom.Area
Creates a new Area object that contains the same geometry as this Area transformed by the specified AffineTransform.
createTransformedShape(AffineTransform) - Method in class java.awt.geom.GeneralPath
Returns a new transformed Shape.
createTransformedShape(Shape) - Method in class java.awt.geom.AffineTransform
Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.
createTranslatedChild(int, int) - Method in class java.awt.image.Raster
Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location.
createTreeCellEditor() - Method in class javax.swing.tree.DefaultTreeCellEditor
This is invoked if a TreeCellEditor is not supplied in the constructor.
createTreeExpansionListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates and returns the object responsible for updating the treestate when nodes expanded state changes.
createTreeModel(Object) - Static method in class javax.swing.JTree
Returns a TreeModel wrapping the specified object.
createTreeModelListener() - Method in class javax.swing.JTree
Creates and returns an instance of TreeModelHandler.
createTreeModelListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns a listener that can update the tree when the model changes.
createTreeSelectionListener() - Method in class javax.swing.plaf.basic.BasicTreeUI
Creates the listener that updates the display based on selection change methods.
createUI(JComponent) - Static method in class javax.swing.plaf.ComponentUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicEditorPaneUI
Creates a UI for the JTextPane.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTextPaneUI
Creates a UI for the JTextPane.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicSeparatorUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicMenuItemUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicToggleButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicRadioButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicMenuUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicProgressBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicOptionPaneUI
Creates a new BasicOptionPaneUI instance.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTabbedPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicPanelUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicPopupMenuUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTableUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicViewportUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTextFieldUI
Creates a UI for a JTextField.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicPasswordFieldUI
Creates a UI for a JPasswordField.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicToolTipUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicScrollBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicToolBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicInternalFrameUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicDesktopPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicListUI
Returns a new instance of BasicListUI.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicLabelUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicComboBoxUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTableHeaderUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicMenuBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicCheckBoxUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicColorChooserUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTreeUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicSplitPaneUI
Creates a new BasicSplitPaneUI instance
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicScrollPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicRootPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicTextAreaUI
Creates a UI for a JTextArea.
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicDesktopIconUI
createUI(JComponent) - Static method in class javax.swing.plaf.basic.BasicSliderUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalTreeUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalSeparatorUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalTextFieldUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalFileChooserUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalLabelUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalToggleButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalTabbedPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalRadioButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalInternalFrameUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalComboBoxUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalProgressBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalSliderUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalScrollBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalToolBarUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalDesktopIconUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalScrollPaneUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalButtonUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalToolTipUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalCheckBoxUI
createUI(JComponent) - Static method in class javax.swing.plaf.metal.MetalSplitPaneUI
Creates a new MetalSplitPaneUI instance
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiListUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiSeparatorUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiLabelUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiPopupMenuUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiPanelUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiScrollBarUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiTextUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiComboBoxUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiTableHeaderUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiFileChooserUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiColorChooserUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiTreeUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiViewportUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiProgressBarUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiScrollPaneUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiOptionPaneUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiSplitPaneUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiButtonUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiToolBarUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiSliderUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiTableUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiDesktopIconUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiMenuItemUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiInternalFrameUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiToolTipUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUI(JComponent) - Static method in class javax.swing.plaf.multi.MultiMenuBarUI
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
createUIs(ComponentUI, Vector, JComponent) - Static method in class javax.swing.plaf.multi.MultiLookAndFeel
Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
createUnion(Rectangle2D) - Method in class java.awt.Rectangle
Returns a new Rectangle2D object representing the union of this Rectangle with the specified Rectangle2D.
createUnion(Rectangle2D) - Method in class java.awt.geom.Rectangle2D
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
createUnion(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Float
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
createUnion(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Double
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
createURLStreamHandler(String) - Method in interface java.net.URLStreamHandlerFactory
Creates a new URLStreamHandler instance with the specified protocol.
createValue(UIDefaults) - Method in interface javax.swing.UIDefaults.LazyValue
Creates the actual value retrieved from the UIDefaults table.
createValue(UIDefaults) - Method in interface javax.swing.UIDefaults.ActiveValue
Creates the value retrieved from the UIDefaults table.
createValue(UIDefaults) - Method in class javax.swing.UIDefaults.ProxyLazyValue
Creates the value retrieved from the UIDefaults table.
createValue(UIDefaults) - Method in class javax.swing.UIDefaults.LazyInputMap
Creates an InputMap with the bindings that are passed in.
createValueHandler() - Static method in class javax.rmi.CORBA.Util
Returns a singleton instance of a class that implements the ValueHandler interface.
createValueHandler() - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.createValueHandler().
createVerticalBox() - Static method in class javax.swing.Box
Creates a Box that displays its components from top to bottom.
createVerticalGlue() - Static method in class javax.swing.Box
Creates a vertical glue component.
createVerticalScrollBar() - Method in class javax.swing.JScrollPane
Returns a JScrollPane.ScrollBar by default.
createVerticalStrut(int) - Static method in class javax.swing.Box
Creates an invisible, fixed-height component.
createView(FlowView, int, int, int) - Method in class javax.swing.text.FlowView.FlowStrategy
Creates a view that can be used to represent the current piece of the flow.
createViewListener() - Method in class javax.swing.JViewport
Creates a listener for the view.
createViewport() - Method in class javax.swing.JScrollPane
Returns a new JViewport by default.
createViewportChangeListener() - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
createVSBChangeListener() - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
createWestPane(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
createWindow(Window) - Method in class java.awt.Toolkit
Creates this toolkit's implementation of Window using the specified peer interface.
createWinListener(JPopupMenu) - Method in class javax.swing.JMenu
Creates a window-closing listener for the popup.
createWritableChild(int, int, int, int, int, int, int[]) - Method in class java.awt.image.WritableRaster
Returns a new WritableRaster which shares all or part of this WritableRaster's DataBuffer.
createWritableRaster(SampleModel, DataBuffer, Point) - Static method in class java.awt.image.Raster
Creates a WritableRaster with the specified SampleModel and DataBuffer.
createWritableRaster(SampleModel, Point) - Static method in class java.awt.image.Raster
Creates a WritableRaster with the specified SampleModel.
createWritableTranslatedChild(int, int) - Method in class java.awt.image.WritableRaster
Create a WritableRaster with the same size, SampleModel and DataBuffer as this one, but with a different location.
createZipEntry(String) - Method in class java.util.jar.JarInputStream
Creates a new JarEntry (ZipEntry) for the specified JAR file entry name.
createZipEntry(String) - Method in class java.util.zip.ZipInputStream
Creates a new ZipEntry object for the specified entry name.
createZone(int, int) - Method in class javax.swing.text.ZoneView
Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility).
CRITICAL - Static variable in interface javax.naming.ldap.Control
Indicates a critical control.
CRL - class java.security.cert.CRL.
This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
CRL(String) - Constructor for class java.security.cert.CRL
Creates a CRL of the specified type.
CRLException - exception java.security.cert.CRLException.
CRL (Certificate Revocation List) Exception
CRLException() - Constructor for class java.security.cert.CRLException
Constructs a CRLException with no detail message.
CRLException(String) - Constructor for class java.security.cert.CRLException
Constructs a CRLException with the specified detail message.
CropImageFilter - class java.awt.image.CropImageFilter.
An ImageFilter class for cropping images.
CropImageFilter(int, int, int, int) - Constructor for class java.awt.image.CropImageFilter
Constructs a CropImageFilter that extracts the absolute rectangular region of pixels from its source Image as specified by the x, y, w, and h parameters.
CROSSHAIR_CURSOR - Static variable in class java.awt.Cursor
The crosshair cursor type.
CROSSHAIR_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.CROSSHAIR_CURSOR.
CS_CIEXYZ - Static variable in class java.awt.color.ColorSpace
The CIEXYZ conversion color space defined above.
CS_GRAY - Static variable in class java.awt.color.ColorSpace
The built-in linear gray scale color space.
CS_LINEAR_RGB - Static variable in class java.awt.color.ColorSpace
A built-in linear RGB color space.
CS_PYCC - Static variable in class java.awt.color.ColorSpace
The Photo YCC conversion color space.
CS_sRGB - Static variable in class java.awt.color.ColorSpace
The sRGB color space defined at http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .
CSS - class javax.swing.text.html.CSS.
Defines a set of CSS attributes as a typesafe enumeration.
CSS.Attribute - class javax.swing.text.html.CSS.Attribute.
Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
CSS() - Constructor for class javax.swing.text.html.CSS
CTRL_MASK - Static variable in class java.awt.Event
This flag indicates that the Control key was down when the event occurred.
CTRL_MASK - Static variable in class java.awt.event.ActionEvent
The control modifier.
CTRL_MASK - Static variable in class java.awt.event.InputEvent
The control key modifier constant.
ctrlx - Variable in class java.awt.geom.QuadCurve2D.Float
The x coordinate of the control point of the quadratic curve segment.
ctrlx - Variable in class java.awt.geom.QuadCurve2D.Double
The x coordinate of the control point of the quadratic curve segment.
ctrlx1 - Variable in class java.awt.geom.CubicCurve2D.Float
The X coordinate of the first control point of the cubic curve segment.
ctrlx1 - Variable in class java.awt.geom.CubicCurve2D.Double
The X coordinate of the first control point of the cubic curve segment.
ctrlx2 - Variable in class java.awt.geom.CubicCurve2D.Float
The X coordinate of the second control point of the cubic curve segment.
ctrlx2 - Variable in class java.awt.geom.CubicCurve2D.Double
The X coordinate of the second control point of the cubic curve segment.
ctrly - Variable in class java.awt.geom.QuadCurve2D.Float
The y coordinate of the control point of the quadratic curve segment.
ctrly - Variable in class java.awt.geom.QuadCurve2D.Double
The y coordinate of the control point of the quadratic curve segment.
ctrly1 - Variable in class java.awt.geom.CubicCurve2D.Float
The Y coordinate of the first control point of the cubic curve segment.
ctrly1 - Variable in class java.awt.geom.CubicCurve2D.Double
The Y coordinate of the first control point of the cubic curve segment.
ctrly2 - Variable in class java.awt.geom.CubicCurve2D.Float
The Y coordinate of the second control point of the cubic curve segment.
ctrly2 - Variable in class java.awt.geom.CubicCurve2D.Double
The Y coordinate of the second control point of the cubic curve segment.
CTX_RESTRICT_SCOPE - interface org.omg.CORBA.CTX_RESTRICT_SCOPE.
A flag that can be used as the second parameter to the method Context.get_values to restrict the search scope.
ctx() - Method in class org.omg.CORBA.ServerRequest
Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference.
ctx() - Method in class org.omg.CORBA.Request
Retrieves the Context object for this request.
ctx(Context) - Method in class org.omg.CORBA.Request
Sets this request's Context object to the one given.
CubicCurve2D - class java.awt.geom.CubicCurve2D.
The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
CubicCurve2D.Double - class java.awt.geom.CubicCurve2D.Double.
A cubic parametric curve segment specified with double coordinates.
CubicCurve2D.Double() - Constructor for class java.awt.geom.CubicCurve2D.Double
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).
CubicCurve2D.Double(double, double, double, double, double, double, double, double) - Constructor for class java.awt.geom.CubicCurve2D.Double
Constructs and initializes a CubicCurve2D from the specified coordinates.
CubicCurve2D.Float - class java.awt.geom.CubicCurve2D.Float.
A cubic parametric curve segment specified with float coordinates.
CubicCurve2D.Float() - Constructor for class java.awt.geom.CubicCurve2D.Float
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).
CubicCurve2D.Float(float, float, float, float, float, float, float, float) - Constructor for class java.awt.geom.CubicCurve2D.Float
Constructs and initializes a CubicCurve2D from the specified coordinates.
CubicCurve2D() - Constructor for class java.awt.geom.CubicCurve2D
This is an abstract class that cannot be instantiated directly.
CURRENCY_SYMBOL - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
CURRENCY_SYMBOLS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Current - interface org.omg.CORBA.Current.
org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
CURRENT - Static variable in interface javax.swing.text.html.parser.DTDConstants
current_component() - Method in interface org.omg.CORBA.DynAny
Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
current_member_kind() - Method in interface org.omg.CORBA.DynStruct
Returns the TCKind object that describes the kind of the current member.
current_member_kind() - Method in interface org.omg.CORBA.DynValue
Returns the TCKind object that describes the current member.
current_member_name() - Method in interface org.omg.CORBA.DynStruct
During a traversal, returns the name of the current member.
current_member_name() - Method in interface org.omg.CORBA.DynValue
Returns the name of the current member while traversing a DynAny object that represents a Value object.
current() - Method in interface java.text.CharacterIterator
Gets the character at the current position (as returned by getIndex()).
current() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.current() for String.
current() - Method in class java.text.BreakIterator
Return character index of the text boundary that was most recently returned by next(), previous(), first(), or last()
current() - Method in class javax.swing.text.ElementIterator
Fetches the current Element.
current() - Method in class javax.swing.text.Segment
Gets the character at the current position (as returned by getIndex()).
currentCellRenderer - Variable in class javax.swing.plaf.basic.BasicTreeUI
Renderer that is being used to do the actual cell drawing.
currentClassLoader() - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
currentGroupID() - Static method in class java.rmi.activation.ActivationGroup
Returns the current activation group's identifier.
CurrentHelper - class org.omg.CORBA.CurrentHelper.
org/omg/CORBA/CurrentHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
CurrentHelper() - Constructor for class org.omg.CORBA.CurrentHelper
CurrentHolder - class org.omg.CORBA.CurrentHolder.
org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
CurrentHolder() - Constructor for class org.omg.CORBA.CurrentHolder
CurrentHolder(Current) - Constructor for class org.omg.CORBA.CurrentHolder
currentLoadedClass() - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
currentManager(Component) - Static method in class javax.swing.RepaintManager
Return the RepaintManager for the calling thread given a Component.
currentManager(JComponent) - Static method in class javax.swing.RepaintManager
Return the RepaintManager for the calling thread given a JComponent.
currentMouseX - Variable in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
currentMouseX - Variable in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
currentMouseY - Variable in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
currentMouseY - Variable in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
CurrentOperations - interface org.omg.CORBA.CurrentOperations.
org/omg/CORBA/CurrentOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
currentSegment(double[]) - Method in interface java.awt.geom.PathIterator
Returns the coordinates and type of the current path segment in the iteration.
currentSegment(double[]) - Method in class java.awt.geom.FlatteningPathIterator
Returns the coordinates and type of the current path segment in the iteration.
currentSegment(float[]) - Method in interface java.awt.geom.PathIterator
Returns the coordinates and type of the current path segment in the iteration.
currentSegment(float[]) - Method in class java.awt.geom.FlatteningPathIterator
Returns the coordinates and type of the current path segment in the iteration.
currentThread() - Static method in class java.lang.Thread
Returns a reference to the currently executing thread object.
currentTimeMillis() - Static method in class java.lang.System
Returns the current time in milliseconds.
currentValuePane - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
Cursor - class java.awt.Cursor.
A class to encapsulate the bitmap representation of the mouse cursor.
Cursor(int) - Constructor for class java.awt.Cursor
Creates a new cursor object with the specified type.
Cursor(String) - Constructor for class java.awt.Cursor
Creates a new custom cursor object with the specified name.
curveTo(float, float, float, float, float, float) - Method in class java.awt.geom.GeneralPath
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the coordinates (x3, y3), using the specified points (x1, y1) and (x2, y2) as Bézier control points.
CUSTOM_CURSOR - Static variable in class java.awt.Cursor
The type associated with all custom cursors.
CUSTOM_DIALOG - Static variable in class javax.swing.JFileChooser
Type value indicating that the JFileChooser supports a developer-specified file operation.
Customizer - interface java.beans.Customizer.
A customizer class provides a complete custom GUI for customizing a target Java Bean.
CustomMarshal - interface org.omg.CORBA.CustomMarshal.
The CustomMarshal is an abstract value type that is meant to be used by the ORB, not the user.
CustomValue - interface org.omg.CORBA.portable.CustomValue.
cut() - Method in class javax.swing.JPasswordField
Normally transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model.
cut() - Method in class javax.swing.text.JTextComponent
Transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model.
cutAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to cut the selected region and place the contents into the system clipboard.
cxt - Variable in class org.omg.CosNaming.NamingContextPackage.CannotProceed
cyan - Static variable in class java.awt.Color
The color cyan.
CYRILLIC - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


D-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

D

D - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Engineering D, 22 x 34 in.
damage(Rectangle) - Method in class javax.swing.text.DefaultCaret
Damages the area surrounding the caret to cause it to be repainted in a new location.
damageRange(JTextComponent, int, int) - Method in class javax.swing.plaf.TextUI
Causes the portion of the view responsible for the given part of the model to be repainted.
damageRange(JTextComponent, int, int) - Method in class javax.swing.plaf.basic.BasicTextUI
Causes the portion of the view responsible for the given part of the model to be repainted.
damageRange(JTextComponent, int, int) - Method in class javax.swing.plaf.multi.MultiTextUI
Call damageRange on each UI handled by this MultiUI.
damageRange(JTextComponent, int, int, Position.Bias, Position.Bias) - Method in class javax.swing.plaf.TextUI
Causes the portion of the view responsible for the given part of the model to be repainted.
damageRange(JTextComponent, int, int, Position.Bias, Position.Bias) - Method in class javax.swing.plaf.basic.BasicTextUI
Causes the portion of the view responsible for the given part of the model to be repainted.
damageRange(JTextComponent, int, int, Position.Bias, Position.Bias) - Method in class javax.swing.plaf.multi.MultiTextUI
Causes the portion of the view responsible for the given part of the model to be repainted.
DARK - Static variable in class javax.swing.plaf.metal.MetalIconFactory
darker() - Method in class java.awt.Color
Creates a new Color that is a darker version of this Color.
darkGray - Static variable in class java.awt.Color
The color dark gray.
darkShadow - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
darkShadow - Variable in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
darkShadow - Variable in class javax.swing.plaf.basic.BasicBorders.FieldBorder
darkShadowColor - Static variable in class javax.swing.plaf.metal.MetalSliderUI
DASH_PUNCTUATION - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
data - Variable in class javax.sound.midi.MidiMessage
The MIDI message data.
data - Variable in class javax.swing.text.html.parser.Element
A field to store user data.
data - Variable in class javax.swing.text.html.parser.Entity
DATA - Static variable in class javax.swing.text.html.HTML.Attribute
DATA_CONVERSION - exception org.omg.CORBA.DATA_CONVERSION.
The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
DATA_CONVERSION() - Constructor for class org.omg.CORBA.DATA_CONVERSION
Constructs a DATA_CONVERSION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
DATA_CONVERSION(int, CompletionStatus) - Constructor for class org.omg.CORBA.DATA_CONVERSION
Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
DATA_CONVERSION(String) - Constructor for class org.omg.CORBA.DATA_CONVERSION
Constructs a DATA_CONVERSION exception with the specified detail.
DATA_CONVERSION(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.DATA_CONVERSION
Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.
DatabaseMetaData - interface java.sql.DatabaseMetaData.
Comprehensive information about the database as a whole.
dataBuffer - Variable in class java.awt.image.Raster
The DataBuffer that stores the image data.
DataBuffer - class java.awt.image.DataBuffer.
This class exists to wrap one or more data arrays.
DataBuffer(int, int) - Constructor for class java.awt.image.DataBuffer
Constructs a DataBuffer containing one bank of the specified data type and size.
DataBuffer(int, int, int) - Constructor for class java.awt.image.DataBuffer
Constructs a DataBuffer containing the specified number of banks.
DataBuffer(int, int, int, int) - Constructor for class java.awt.image.DataBuffer
Constructs a DataBuffer that contains the specified number of banks.
DataBuffer(int, int, int, int[]) - Constructor for class java.awt.image.DataBuffer
Constructs a DataBuffer which contains the specified number of banks.
DataBufferByte - class java.awt.image.DataBufferByte.
This class extends DataBuffer and stores data internally as bytes.
DataBufferByte(byte[][], int) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte-based DataBuffer with the specified arrays.
DataBufferByte(byte[][], int, int[]) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte-based DataBuffer with the specified arrays, size, and offsets.
DataBufferByte(byte[], int) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte-based DataBuffer with a single bank using the specified array.
DataBufferByte(byte[], int, int) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte-based DataBuffer with a single bank using the specified array, size, and offset.
DataBufferByte(int) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte-based DataBuffer with a single bank and the specified size.
DataBufferByte(int, int) - Constructor for class java.awt.image.DataBufferByte
Constructs a byte based DataBuffer with the specified number of banks all of which are the specified size.
DataBufferInt - class java.awt.image.DataBufferInt.
This class extends DataBuffer and stores data internally as integers.
DataBufferInt(int) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with a single bank and the specified size.
DataBufferInt(int[][], int) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with the specified arrays.
DataBufferInt(int[][], int, int[]) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with the specified arrays, size, and offsets.
DataBufferInt(int[], int) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with a single bank using the specified array.
DataBufferInt(int[], int, int) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with a single bank using the specified array, size, and offset.
DataBufferInt(int, int) - Constructor for class java.awt.image.DataBufferInt
Constructs an integer-based DataBuffer with the specified number of banks, all of which are the specified size.
DataBufferShort - class java.awt.image.DataBufferShort.
This class extends DataBuffer and stores data internally as shorts.
DataBufferShort(int) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with a single bank and the specified size.
DataBufferShort(int, int) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with the specified number of banks all of which are the specified size.
DataBufferShort(short[][], int) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with the specified arrays.
DataBufferShort(short[][], int, int[]) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with the specified arrays, size, and offsets.
DataBufferShort(short[], int) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with a single bank using the specified array.
DataBufferShort(short[], int, int) - Constructor for class java.awt.image.DataBufferShort
Constructs a short-based DataBuffer with a single bank using the specified array, size, and offset.
DataBufferUShort - class java.awt.image.DataBufferUShort.
This class extends DataBuffer and stores data internally as shorts.
DataBufferUShort(int) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with a single bank and the specified size.
DataBufferUShort(int, int) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with the specified number of banks, all of which are the specified size.
DataBufferUShort(short[][], int) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with the specified arrays.
DataBufferUShort(short[][], int, int[]) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with specified arrays, size, and offsets.
DataBufferUShort(short[], int) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with a single bank using the specified array.
DataBufferUShort(short[], int, int) - Constructor for class java.awt.image.DataBufferUShort
Constructs an unsigned-short based DataBuffer with a single bank using the specified array, size, and offset.
dataDefinitionCausesTransactionCommit() - Method in interface java.sql.DatabaseMetaData
Does a data definition statement within a transaction force the transaction to commit?
dataDefinitionIgnoredInTransactions() - Method in interface java.sql.DatabaseMetaData
Is a data definition statement within a transaction ignored?
DataFlavor - class java.awt.datatransfer.DataFlavor.
Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
DataFlavor() - Constructor for class java.awt.datatransfer.DataFlavor
Constructs a new DataFlavor.
DataFlavor(Class, String) - Constructor for class java.awt.datatransfer.DataFlavor
Construct a DataFlavor that represents a Java class
DataFlavor(String) - Constructor for class java.awt.datatransfer.DataFlavor
Construct a DataFlavor from a Mime Type string.
DataFlavor(String, String) - Constructor for class java.awt.datatransfer.DataFlavor
Construct a DataFlavor that represents a MimeType
DataFlavor(String, String, ClassLoader) - Constructor for class java.awt.datatransfer.DataFlavor
Construct a DataFlavor that represents a MimeType
DataFormatException - exception java.util.zip.DataFormatException.
Signals that a data format error has occurred.
DataFormatException() - Constructor for class java.util.zip.DataFormatException
Constructs a DataFormatException with no detail message.
DataFormatException(String) - Constructor for class java.util.zip.DataFormatException
Constructs a DataFormatException with the specified detail message.
DatagramPacket - class java.net.DatagramPacket.
This class represents a datagram packet.
DatagramPacket(byte[], int) - Constructor for class java.net.DatagramPacket
Constructs a DatagramPacket for receiving packets of length length.
DatagramPacket(byte[], int, InetAddress, int) - Constructor for class java.net.DatagramPacket
Constructs a datagram packet for sending packets of length length to the specified port number on the specified host.
DatagramPacket(byte[], int, int) - Constructor for class java.net.DatagramPacket
Constructs a DatagramPacket for receiving packets of length length, specifying an offset into the buffer.
DatagramPacket(byte[], int, int, InetAddress, int) - Constructor for class java.net.DatagramPacket
Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host.
DatagramSocket - class java.net.DatagramSocket.
This class represents a socket for sending and receiving datagram packets.
DatagramSocket() - Constructor for class java.net.DatagramSocket
Constructs a datagram socket and binds it to any available port on the local host machine.
DatagramSocket(int) - Constructor for class java.net.DatagramSocket
Constructs a datagram socket and binds it to the specified port on the local host machine.
DatagramSocket(int, InetAddress) - Constructor for class java.net.DatagramSocket
Creates a datagram socket, bound to the specified local address.
DatagramSocketImpl - class java.net.DatagramSocketImpl.
Abstract datagram and multicast socket implementation base class.
DatagramSocketImpl() - Constructor for class java.net.DatagramSocketImpl
DatagramSocketImplFactory - interface java.net.DatagramSocketImplFactory.
This interface defines a factory for datagram socket implementations.
DataInput - interface java.io.DataInput.
The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
DataInputStream - class java.io.DataInputStream.
A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
DataInputStream - interface org.omg.CORBA.DataInputStream.
Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
DataInputStream(InputStream) - Constructor for class java.io.DataInputStream
Creates a FilterInputStream and saves its argument, the input stream in, for later use.
DataLine - interface javax.sound.sampled.DataLine.
DataLine adds media-related functionality to its superinterface, Line.
DataLine.Info - class javax.sound.sampled.DataLine.Info.
Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines.
DataLine.Info(Class, AudioFormat) - Constructor for class javax.sound.sampled.DataLine.Info
Constructs a data line's info object from the specified information, which includes a single audio format.
DataLine.Info(Class, AudioFormat[], int, int) - Constructor for class javax.sound.sampled.DataLine.Info
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.
DataLine.Info(Class, AudioFormat, int) - Constructor for class javax.sound.sampled.DataLine.Info
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.
dataModel - Variable in class javax.swing.JComboBox
dataModel - Variable in class javax.swing.JTable
The TableModel of the table.
DataOutput - interface java.io.DataOutput.
The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
DataOutputStream - class java.io.DataOutputStream.
A data input stream lets an application write primitive Java data types to an output stream in a portable way.
DataOutputStream - interface org.omg.CORBA.DataOutputStream.
Defines the methods used to write primitive data types to output streams for marshalling custom value types.
DataOutputStream(OutputStream) - Constructor for class java.io.DataOutputStream
Creates a new data output stream to write data to the specified underlying output stream.
DataTruncation - exception java.sql.DataTruncation.
An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
DataTruncation(int, boolean, boolean, int, int) - Constructor for class java.sql.DataTruncation
Creates a DataTruncation object with the SQLState initialized to 01004, the reason set to "Data truncation", the vendorCode set to the SQLException default, and the other fields set to the given values.
dataType - Variable in class java.awt.image.SampleModel
Data type of the DataBuffer storing the pixel data.
dataType - Variable in class java.awt.image.DataBuffer
The data type of this DataBuffer.
dataVector - Variable in class javax.swing.table.DefaultTableModel
The Vector of Vectors of Object values.
Date - class java.sql.Date.
A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE.
Date - class java.util.Date.
The class Date represents a specific instant in time, with millisecond precision.
DATE - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.
DATE - Static variable in class java.util.Calendar
Field number for get and set indicating the day of the month.
DATE_FIELD - Static variable in class java.text.DateFormat
Useful constant for DATE field alignment.
Date() - Constructor for class java.util.Date
Allocates a Date object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond.
Date(int, int, int) - Constructor for class java.sql.Date
Deprecated. instead use the constructor Date(long date)
Date(int, int, int) - Constructor for class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date).
Date(int, int, int, int, int) - Constructor for class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min) or GregorianCalendar(year + 1900, month, date, hrs, min).
Date(int, int, int, int, int, int) - Constructor for class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec).
Date(long) - Constructor for class java.sql.Date
Constructs a Date object using a milliseconds time value.
Date(long) - Constructor for class java.util.Date
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
Date(String) - Constructor for class java.util.Date
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
DateFormat - class java.text.DateFormat.
DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
DateFormat() - Constructor for class java.text.DateFormat
Create a new date format.
DateFormatSymbols - class java.text.DateFormatSymbols.
DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
DateFormatSymbols() - Constructor for class java.text.DateFormatSymbols
Construct a DateFormatSymbols object by loading format data from resources for the default locale.
DateFormatSymbols(Locale) - Constructor for class java.text.DateFormatSymbols
Construct a DateFormatSymbols object by loading format data from resources for the given locale.
DAY_OF_MONTH - Static variable in class java.util.Calendar
Field number for get and set indicating the day of the month.
DAY_OF_WEEK - Static variable in class java.util.Calendar
Field number for get and set indicating the day of the week.
DAY_OF_WEEK_FIELD - Static variable in class java.text.DateFormat
Useful constant for DAY_OF_WEEK field alignment.
DAY_OF_WEEK_IN_MONTH - Static variable in class java.util.Calendar
Field number for get and set indicating the ordinal number of the day of the week within the current month.
DAY_OF_WEEK_IN_MONTH_FIELD - Static variable in class java.text.DateFormat
Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
DAY_OF_YEAR - Static variable in class java.util.Calendar
Field number for get and set indicating the day number within the current year.
DAY_OF_YEAR_FIELD - Static variable in class java.text.DateFormat
Useful constant for DAY_OF_YEAR field alignment.
DD - Static variable in class javax.swing.text.html.HTML.Tag
deactivate() - Method in interface javax.rmi.CORBA.Tie
Deactivates the target object represented by this tie.
deactivate(boolean) - Method in interface java.awt.im.spi.InputMethod
Deactivates the input method.
deactivateFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, indicate that this frame has lost focus.
deactivateFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
deactivateFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the frame is no longer selected.
DebugGraphics - class javax.swing.DebugGraphics.
Graphics subclass supporting graphics debugging.
DebugGraphics() - Constructor for class javax.swing.DebugGraphics
Constructs a new debug graphics context that supports slowed down drawing.
DebugGraphics(Graphics) - Constructor for class javax.swing.DebugGraphics
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.
DebugGraphics(Graphics, JComponent) - Constructor for class javax.swing.DebugGraphics
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
decapitalize(String) - Static method in class java.beans.Introspector
Utility method to take a string and convert it to normal Java variable name capitalization.
DECEMBER - Static variable in class java.util.Calendar
Value of the MONTH field indicating the twelfth month of the year.
DECIMAL - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.
DECIMAL_DIGIT_NUMBER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
DecimalFormat - class java.text.DecimalFormat.
DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
DecimalFormat() - Constructor for class java.text.DecimalFormat
Create a DecimalFormat using the default pattern and symbols for the default locale.
DecimalFormat(String) - Constructor for class java.text.DecimalFormat
Create a DecimalFormat from the given pattern and the symbols for the default locale.
DecimalFormat(String, DecimalFormatSymbols) - Constructor for class java.text.DecimalFormat
Create a DecimalFormat from the given pattern and symbols.
DecimalFormatSymbols - class java.text.DecimalFormatSymbols.
This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
DecimalFormatSymbols() - Constructor for class java.text.DecimalFormatSymbols
Create a DecimalFormatSymbols object for the default locale.
DecimalFormatSymbols(Locale) - Constructor for class java.text.DecimalFormatSymbols
Create a DecimalFormatSymbols object for the given locale.
DECLARE - Static variable in class javax.swing.text.html.HTML.Attribute
DECLARED - Static variable in interface java.lang.reflect.Member
Identifies the set of declared members of a class or interface.
decode(InputStream) - Method in interface java.security.Certificate
Deprecated. Decodes a certificate from an input stream.
decode(String) - Static method in class java.awt.Font
Returns the Font that the str argument describes.
decode(String) - Static method in class java.awt.Color
Converts a String to an integer and returns the specified opaque Color.
decode(String) - Static method in class java.lang.Long
Decodes a String into a Long.
decode(String) - Static method in class java.lang.Short
Decodes a String into a Short.
decode(String) - Static method in class java.lang.Integer
Decodes a String into an Integer.
decode(String) - Static method in class java.lang.Byte
Decodes a String into a Byte.
decode(String) - Static method in class java.net.URLDecoder
Decodes a "x-www-form-urlencoded" to a String.
decodeDataFlavor(String) - Static method in class java.awt.datatransfer.SystemFlavorMap
decodeJavaMIMEType(String) - Static method in class java.awt.datatransfer.SystemFlavorMap
decodeLineStyle(Object) - Method in class javax.swing.plaf.metal.MetalTreeUI
this function converts between the string passed into the client property and the internal representation (currently and int)
decrButton - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
DECREASE_HIGHLIGHT - Static variable in class javax.swing.plaf.basic.BasicScrollBarUI
decreaseButton - Variable in class javax.swing.plaf.metal.MetalScrollBarUI
decrIndent() - Method in class javax.swing.text.AbstractWriter
Decrements the indent level.
def - Variable in class java.util.zip.DeflaterOutputStream
Compressor for this stream.
def_kind() - Method in interface org.omg.CORBA.IRObjectOperations
Returns the DefinitionKind corresponding to this Interface Repository object.
def_kind() - Method in class org.omg.CORBA._IDLTypeStub
defAttributeList(String, int, int, String, String, AttributeList) - Method in class javax.swing.text.html.parser.DTD
Define an attribute list
DEFAULT - Static variable in class java.awt.dnd.DragSourceContext
An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.
DEFAULT - Static variable in class java.text.DateFormat
Constant for default style pattern.
DEFAULT - Static variable in interface javax.swing.Action
Useful constants that can be used as the storage-retrieval key when setting or getting one of this object's properties (text or icon).
DEFAULT - Static variable in interface javax.swing.text.html.parser.DTDConstants
DEFAULT_CARET_POLICY - Static variable in class java.awt.font.TextLayout
This CaretPolicy is used when a policy is not specified by the client.
DEFAULT_COMPRESSION - Static variable in class java.util.zip.Deflater
Default compression level.
DEFAULT_CSS - Static variable in class javax.swing.text.html.HTMLEditorKit
Default Cascading Style Sheet file that sets up the tag views.
DEFAULT_CURSOR - Static variable in class java.awt.Cursor
The default cursor type (gets set if no cursor is defined).
DEFAULT_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.DEFAULT_CURSOR.
default_index() - Method in class org.omg.CORBA.TypeCode
Returns the index of the default member, or -1 if there is no default member.
DEFAULT_JUSTIFICATION - Static variable in class javax.swing.border.TitledBorder
Use the default justification for the title text.
DEFAULT_KEYMAP - Static variable in class javax.swing.text.JTextComponent
This is the name of the default keymap that will be shared by all JTextComponent instances unless they have had a different keymap set.
DEFAULT_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Default layer.
DEFAULT_OPTION - Static variable in class javax.swing.JOptionPane
Type meaning Look and Feel should not supply any options -- only use the options from the JOptionPane.
DEFAULT_POSITION - Static variable in class javax.swing.border.TitledBorder
Use the default vertical orientation for the title text.
DEFAULT_STRATEGY - Static variable in class java.util.zip.Deflater
Default compression strategy.
DEFAULT_STYLE - Static variable in class javax.swing.text.StyleContext
The name given to the default logical style attached to paragraphs.
DefaultBoundedRangeModel - class javax.swing.DefaultBoundedRangeModel.
A generic implementation of BoundedRangeModel.
DefaultBoundedRangeModel() - Constructor for class javax.swing.DefaultBoundedRangeModel
Initializes all of the properties with default values.
DefaultBoundedRangeModel(int, int, int, int) - Constructor for class javax.swing.DefaultBoundedRangeModel
Initializes value, extent, minimum and maximum.
defaultButton - Variable in class javax.swing.JRootPane
The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs.
DefaultButtonModel - class javax.swing.DefaultButtonModel.
The default implementation of a Button component's data model.
DefaultButtonModel() - Constructor for class javax.swing.DefaultButtonModel
Constructs a JButtonModel
DefaultCaret - class javax.swing.text.DefaultCaret.
A default implementation of Caret.
DefaultCaret() - Constructor for class javax.swing.text.DefaultCaret
Constructs a default caret.
DefaultCellEditor - class javax.swing.DefaultCellEditor.
The default editor for table and tree cells.
DefaultCellEditor.EditorDelegate - class javax.swing.DefaultCellEditor.EditorDelegate.
DefaultCellEditor.EditorDelegate(DefaultCellEditor) - Constructor for class javax.swing.DefaultCellEditor.EditorDelegate
DefaultCellEditor(JCheckBox) - Constructor for class javax.swing.DefaultCellEditor
Constructs a DefaultCellEditor object that uses a check box.
DefaultCellEditor(JComboBox) - Constructor for class javax.swing.DefaultCellEditor
Constructs a DefaultCellEditor object that uses a combo box.
DefaultCellEditor(JTextField) - Constructor for class javax.swing.DefaultCellEditor
Constructs a DefaultCellEditor that uses a text field.
defaultChoosers - Variable in class javax.swing.plaf.basic.BasicColorChooserUI
DefaultColorSelectionModel - class javax.swing.colorchooser.DefaultColorSelectionModel.
A generic implementation of ColorSelectionModel.
DefaultColorSelectionModel() - Constructor for class javax.swing.colorchooser.DefaultColorSelectionModel
Default constructor.
DefaultColorSelectionModel(Color) - Constructor for class javax.swing.colorchooser.DefaultColorSelectionModel
Initializes selectedColor to color
DefaultComboBoxModel - class javax.swing.DefaultComboBoxModel.
The default model for combo boxes.
DefaultComboBoxModel() - Constructor for class javax.swing.DefaultComboBoxModel
Constructs an empty DefaultComboBoxModel object.
DefaultComboBoxModel(Object[]) - Constructor for class javax.swing.DefaultComboBoxModel
Constructs a DefaultComboBoxModel object initialized with an array of objects.
DefaultComboBoxModel(Vector) - Constructor for class javax.swing.DefaultComboBoxModel
Constructs a DefaultComboBoxModel object initialized with a vector.
defaultConstraints - Variable in class java.awt.GridBagLayout
This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the defaultConstraints.
DefaultCopyDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a copy operation indicating that a drop is currently allowed.
DefaultCopyNoDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a copy operation indicating that a drop is currently not allowed.
DefaultDesktopManager - class javax.swing.DefaultDesktopManager.
This is an implementaion of the DesktopManager.
DefaultDesktopManager() - Constructor for class javax.swing.DefaultDesktopManager
defaulted(String) - Method in class java.io.ObjectInputStream.GetField
Return true if the named field is defaulted and has no value in this stream.
DefaultEditorKit - class javax.swing.text.DefaultEditorKit.
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
DefaultEditorKit.BeepAction - class javax.swing.text.DefaultEditorKit.BeepAction.
Creates a beep.
DefaultEditorKit.BeepAction() - Constructor for class javax.swing.text.DefaultEditorKit.BeepAction
Create this object with the appropriate identifier.
DefaultEditorKit.CopyAction - class javax.swing.text.DefaultEditorKit.CopyAction.
Coies the selected region and place its contents into the system clipboard.
DefaultEditorKit.CopyAction() - Constructor for class javax.swing.text.DefaultEditorKit.CopyAction
Create this object with the appropriate identifier.
DefaultEditorKit.CutAction - class javax.swing.text.DefaultEditorKit.CutAction.
Cuts the selected region and place its contents into the system clipboard.
DefaultEditorKit.CutAction() - Constructor for class javax.swing.text.DefaultEditorKit.CutAction
Create this object with the appropriate identifier.
DefaultEditorKit.DefaultKeyTypedAction - class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction.
The action that is executed by default if a key typed event is received and there is no keymap entry.
DefaultEditorKit.DefaultKeyTypedAction() - Constructor for class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
Creates this object with the appropriate identifier.
DefaultEditorKit.InsertBreakAction - class javax.swing.text.DefaultEditorKit.InsertBreakAction.
Places a line/paragraph break into the document.
DefaultEditorKit.InsertBreakAction() - Constructor for class javax.swing.text.DefaultEditorKit.InsertBreakAction
Creates this object with the appropriate identifier.
DefaultEditorKit.InsertContentAction - class javax.swing.text.DefaultEditorKit.InsertContentAction.
Places content into the associated document.
DefaultEditorKit.InsertContentAction() - Constructor for class javax.swing.text.DefaultEditorKit.InsertContentAction
Creates this object with the appropriate identifier.
DefaultEditorKit.InsertTabAction - class javax.swing.text.DefaultEditorKit.InsertTabAction.
Places a tab character into the document.
DefaultEditorKit.InsertTabAction() - Constructor for class javax.swing.text.DefaultEditorKit.InsertTabAction
Creates this object with the appropriate identifier.
DefaultEditorKit.PasteAction - class javax.swing.text.DefaultEditorKit.PasteAction.
Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
DefaultEditorKit.PasteAction() - Constructor for class javax.swing.text.DefaultEditorKit.PasteAction
Create this object with the appropriate identifier.
DefaultEditorKit() - Constructor for class javax.swing.text.DefaultEditorKit
default constructor for DefaultEditorKit
defaultEditorsByColumnClass - Variable in class javax.swing.JTable
A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
DefaultFocusManager - class javax.swing.DefaultFocusManager.
Default swing focus manager implementation.
DefaultFocusManager() - Constructor for class javax.swing.DefaultFocusManager
DefaultHighlighter - class javax.swing.text.DefaultHighlighter.
Implements the Highlighter interfaces.
DefaultHighlighter.DefaultHighlightPainter - class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter.
Simple highlight painter that fills a highlighted area with a solid color.
DefaultHighlighter.DefaultHighlightPainter(Color) - Constructor for class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
Constructs a new highlight painter.
DefaultHighlighter() - Constructor for class javax.swing.text.DefaultHighlighter
Creates a new DefaultHighlighther object.
defaultInitCtx - Variable in class javax.naming.InitialContext
Field holding the result of calling NamingManager.getInitialContext().
defaultKeyTypedAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
DefaultLinkDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a link operation indicating that a drop is currently allowed.
DefaultLinkNoDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a link operation indicating that a drop is currently not allowed.
DefaultListCellRenderer - class javax.swing.DefaultListCellRenderer.
Renders an item in a list.
DefaultListCellRenderer.UIResource - class javax.swing.DefaultListCellRenderer.UIResource.
A subclass of DefaultListCellRenderer that implements UIResource.
DefaultListCellRenderer.UIResource() - Constructor for class javax.swing.DefaultListCellRenderer.UIResource
DefaultListCellRenderer() - Constructor for class javax.swing.DefaultListCellRenderer
Constructs a default renderer object for an item in a list.
DefaultListModel - class javax.swing.DefaultListModel.
This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.
DefaultListModel() - Constructor for class javax.swing.DefaultListModel
DefaultListSelectionModel - class javax.swing.DefaultListSelectionModel.
Default data model for list selections.
DefaultListSelectionModel() - Constructor for class javax.swing.DefaultListSelectionModel
defaultManager() - Static method in class javax.swing.MenuSelectionManager
Returns the default menu selection manager.
DefaultMenuLayout - class javax.swing.plaf.basic.DefaultMenuLayout.
The default layout manager for Popup menus and menubars.
DefaultMenuLayout(Container, int) - Constructor for class javax.swing.plaf.basic.DefaultMenuLayout
DefaultMetalTheme - class javax.swing.plaf.metal.DefaultMetalTheme.
This class describes the default Metal Theme.
DefaultMetalTheme() - Constructor for class javax.swing.plaf.metal.DefaultMetalTheme
DefaultMoveDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a move operation indicating that a drop is currently allowed.
DefaultMoveNoDrop - Static variable in class java.awt.dnd.DragSource
The default Cursor to use with a move operation indicating that a drop is currently not allowed.
DefaultMutableTreeNode - class javax.swing.tree.DefaultMutableTreeNode.
A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
DefaultMutableTreeNode() - Constructor for class javax.swing.tree.DefaultMutableTreeNode
Creates a tree node that has no parent and no children, but which allows children.
DefaultMutableTreeNode(Object) - Constructor for class javax.swing.tree.DefaultMutableTreeNode
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
DefaultMutableTreeNode(Object, boolean) - Constructor for class javax.swing.tree.DefaultMutableTreeNode
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
defaultPage() - Method in class java.awt.print.PrinterJob
Creates a new PageFormat instance and sets it to a default size and orientation.
defaultPage(PageFormat) - Method in class java.awt.print.PrinterJob
Clones the PageFormat argument and alters the clone to describe a default page size and orientation.
DefaultPainter - Static variable in class javax.swing.text.DefaultHighlighter
defaultPressAction - Variable in class javax.swing.JRootPane
Deprecated. As of Java 2 platform v1.3.
defaultReadObject() - Method in class java.io.ObjectInputStream
Read the non-static and non-transient fields of the current class from this stream.
defaultReleaseAction - Variable in class javax.swing.JRootPane
Deprecated. As of Java 2 platform v1.3.
defaultRenderersByColumnClass - Variable in class javax.swing.JTable
A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
defaults - Variable in class java.util.Properties
A property list that contains default values for any keys not found in this property list.
DefaultSingleSelectionModel - class javax.swing.DefaultSingleSelectionModel.
A generic implementation of SingleSelectionModel.
DefaultSingleSelectionModel() - Constructor for class javax.swing.DefaultSingleSelectionModel
DefaultStyledDocument - class javax.swing.text.DefaultStyledDocument.
A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
DefaultStyledDocument.AttributeUndoableEdit - class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit.
An UndoableEdit used to remember AttributeSet changes to an Element.
DefaultStyledDocument.AttributeUndoableEdit(Element, AttributeSet, boolean) - Constructor for class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
DefaultStyledDocument.ElementBuffer - class javax.swing.text.DefaultStyledDocument.ElementBuffer.
Class to manage changes to the element hierarchy.
DefaultStyledDocument.ElementBuffer(DefaultStyledDocument, Element) - Constructor for class javax.swing.text.DefaultStyledDocument.ElementBuffer
Creates a new ElementBuffer.
DefaultStyledDocument.ElementSpec - class javax.swing.text.DefaultStyledDocument.ElementSpec.
Specification for building elements.
DefaultStyledDocument.ElementSpec(AttributeSet, short) - Constructor for class javax.swing.text.DefaultStyledDocument.ElementSpec
Constructor useful for markup when the markup will not be stored in the document.
DefaultStyledDocument.ElementSpec(AttributeSet, short, char[], int, int) - Constructor for class javax.swing.text.DefaultStyledDocument.ElementSpec
Constructor for creating a spec externally for batch input of content and markup into the document.
DefaultStyledDocument.ElementSpec(AttributeSet, short, int) - Constructor for class javax.swing.text.DefaultStyledDocument.ElementSpec
Constructor for parsing inside the document when the data has already been added, but len information is needed.
DefaultStyledDocument.SectionElement - class javax.swing.text.DefaultStyledDocument.SectionElement.
Default root element for a document...
DefaultStyledDocument.SectionElement(DefaultStyledDocument) - Constructor for class javax.swing.text.DefaultStyledDocument.SectionElement
Creates a new SectionElement.
DefaultStyledDocument() - Constructor for class javax.swing.text.DefaultStyledDocument
Constructs a default styled document.
DefaultStyledDocument(AbstractDocument.Content, StyleContext) - Constructor for class javax.swing.text.DefaultStyledDocument
Constructs a styled document.
DefaultStyledDocument(StyleContext) - Constructor for class javax.swing.text.DefaultStyledDocument
Constructs a styled document with the default content storage implementation and a shared set of styles.
DefaultTableCellRenderer - class javax.swing.table.DefaultTableCellRenderer.
The standard class for rendering (displaying) individual cells in a JTable.
DefaultTableCellRenderer.UIResource - class javax.swing.table.DefaultTableCellRenderer.UIResource.
A subclass of DefaultTableCellRenderer that implements UIResource.
DefaultTableCellRenderer.UIResource() - Constructor for class javax.swing.table.DefaultTableCellRenderer.UIResource
DefaultTableCellRenderer() - Constructor for class javax.swing.table.DefaultTableCellRenderer
Creates a default table cell renderer.
DefaultTableColumnModel - class javax.swing.table.DefaultTableColumnModel.
The standard column-handler for a JTable.
DefaultTableColumnModel() - Constructor for class javax.swing.table.DefaultTableColumnModel
Creates a default table column model.
DefaultTableModel - class javax.swing.table.DefaultTableModel.
This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.
DefaultTableModel() - Constructor for class javax.swing.table.DefaultTableModel
Constructs a default DefaultTableModel which is a table of zero columns and zero rows.
DefaultTableModel(int, int) - Constructor for class javax.swing.table.DefaultTableModel
Constructs a DefaultTableModel with numRows and numColumns of null object values.
DefaultTableModel(Object[][], Object[]) - Constructor for class javax.swing.table.DefaultTableModel
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
DefaultTableModel(Object[], int) - Constructor for class javax.swing.table.DefaultTableModel
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Vector, int) - Constructor for class javax.swing.table.DefaultTableModel
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Vector, Vector) - Constructor for class javax.swing.table.DefaultTableModel
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
defaultTextIconGap - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
defaultTextIconGap - Variable in class javax.swing.plaf.basic.BasicButtonUI
defaultTextShiftOffset - Variable in class javax.swing.plaf.basic.BasicButtonUI
DefaultTextUI - class javax.swing.text.DefaultTextUI.
Deprecated.
DefaultTextUI() - Constructor for class javax.swing.text.DefaultTextUI
Deprecated.
DefaultTreeCellEditor - class javax.swing.tree.DefaultTreeCellEditor.
A TreeCellEditor.
DefaultTreeCellEditor.DefaultTextField - class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField.
TextField used when no editor is supplied.
DefaultTreeCellEditor.DefaultTextField(DefaultTreeCellEditor, Border) - Constructor for class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
Constructs a DefaultTreeCellEditor$DefaultTextField object.
DefaultTreeCellEditor.EditorContainer - class javax.swing.tree.DefaultTreeCellEditor.EditorContainer.
Container responsible for placing the editingComponent.
DefaultTreeCellEditor.EditorContainer(DefaultTreeCellEditor) - Constructor for class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
Constructs an EditorContainer object.
DefaultTreeCellEditor(JTree, DefaultTreeCellRenderer) - Constructor for class javax.swing.tree.DefaultTreeCellEditor
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
DefaultTreeCellEditor(JTree, DefaultTreeCellRenderer, TreeCellEditor) - Constructor for class javax.swing.tree.DefaultTreeCellEditor
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.
DefaultTreeCellRenderer - class javax.swing.tree.DefaultTreeCellRenderer.
Displays an entry in a tree.
DefaultTreeCellRenderer() - Constructor for class javax.swing.tree.DefaultTreeCellRenderer
Returns a new instance of DefaultTreeCellRenderer.
DefaultTreeModel - class javax.swing.tree.DefaultTreeModel.
A simple tree data model that uses TreeNodes.
DefaultTreeModel(TreeNode) - Constructor for class javax.swing.tree.DefaultTreeModel
Creates a tree in which any node can have children.
DefaultTreeModel(TreeNode, boolean) - Constructor for class javax.swing.tree.DefaultTreeModel
Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.
DefaultTreeSelectionModel - class javax.swing.tree.DefaultTreeSelectionModel.
Default implementation of TreeSelectionModel.
DefaultTreeSelectionModel() - Constructor for class javax.swing.tree.DefaultTreeSelectionModel
Creates a new instance of DefaultTreeSelectionModel that is empty, with a selection mode of DISCONTIGUOUS_TREE_SELECTION.
defaultWriteObject() - Method in class java.io.ObjectOutputStream
Write the non-static and non-transient fields of the current class to this stream.
defContentModel(int, Object, ContentModel) - Method in class javax.swing.text.html.parser.DTD
Define a content model
defElement(String, int, boolean, boolean, ContentModel, String[], String[], AttributeList) - Method in class javax.swing.text.html.parser.DTD
Define an element.
defEntity(String, int, int) - Method in class javax.swing.text.html.parser.DTD
Define a character entity.
defEntity(String, int, String) - Method in class javax.swing.text.html.parser.DTD
Define an entity.
defineAttributes(String, AttributeList) - Method in class javax.swing.text.html.parser.DTD
Define the attributes of an element.
defineClass(byte[], int, int) - Method in class java.lang.ClassLoader
Deprecated. Replaced by defineClass(java.lang.String, byte[], int, int)
defineClass(String, byte[], int, int) - Method in class java.lang.ClassLoader
Converts an array of bytes into an instance of class Class.
defineClass(String, byte[], int, int, CodeSource) - Method in class java.security.SecureClassLoader
Converts an array of bytes into an instance of class Class, with an optional CodeSource.
defineClass(String, byte[], int, int, ProtectionDomain) - Method in class java.lang.ClassLoader
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
defined_in - Variable in class org.omg.CORBA.ValueMember
The name of the value member described by this ValueMember object.
defineElement(String, int, boolean, boolean, ContentModel, BitSet, BitSet, AttributeList) - Method in class javax.swing.text.html.parser.DTD
Define an element.
defineEntity(String, int, char[]) - Method in class javax.swing.text.html.parser.DTD
Define an entity.
definePackage(String, Manifest, URL) - Method in class java.net.URLClassLoader
Defines a new package by name in this ClassLoader.
definePackage(String, String, String, String, String, String, String, URL) - Method in class java.lang.ClassLoader
Defines a package by name in this ClassLoader.
DefinitionKind - class org.omg.CORBA.DefinitionKind.
The class that provides the constants used to identify the type of an Interface Repository object.
DefinitionKind(int) - Constructor for class org.omg.CORBA.DefinitionKind
Constructs a DefinitionKind object with its _value field initialized with the given value.
DefinitionKindHelper - class org.omg.CORBA.DefinitionKindHelper.
org/omg/CORBA/DefinitionKindHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
DefinitionKindHelper() - Constructor for class org.omg.CORBA.DefinitionKindHelper
deflate() - Method in class java.util.zip.DeflaterOutputStream
Writes next block of compressed data to the output stream.
deflate(byte[]) - Method in class java.util.zip.Deflater
Fills specified buffer with compressed data.
deflate(byte[], int, int) - Method in class java.util.zip.Deflater
Fills specified buffer with compressed data.
DEFLATED - Static variable in class java.util.zip.ZipEntry
Compression method for compressed (deflated) entries.
DEFLATED - Static variable in class java.util.zip.ZipOutputStream
Compression method for compressed (DEFLATED) entries.
DEFLATED - Static variable in class java.util.zip.Deflater
Compression method for the deflate algorithm (the only one currently supported).
Deflater - class java.util.zip.Deflater.
This class provides support for general purpose compression using the popular ZLIB compression library.
Deflater() - Constructor for class java.util.zip.Deflater
Creates a new compressor with the default compression level.
Deflater(int) - Constructor for class java.util.zip.Deflater
Creates a new compressor using the specified compression level.
Deflater(int, boolean) - Constructor for class java.util.zip.Deflater
Creates a new compressor using the specified compression level.
DeflaterOutputStream - class java.util.zip.DeflaterOutputStream.
This class implements an output stream filter for compressing data in the "deflate" compression format.
DeflaterOutputStream(OutputStream) - Constructor for class java.util.zip.DeflaterOutputStream
Creates a new output stream with a defaul compressor and buffer size.
DeflaterOutputStream(OutputStream, Deflater) - Constructor for class java.util.zip.DeflaterOutputStream
Creates a new output stream with the specified compressor and a default buffer size.
DeflaterOutputStream(OutputStream, Deflater, int) - Constructor for class java.util.zip.DeflaterOutputStream
Creates a new output stream with the specified compressor and buffer size.
deiconifyFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, remove any iconic representation that is present and restore the frame to it's original size and location.
deiconifyFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Removes the desktopIcon from its parent and adds its frame to the parent.
deiconifyFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the user wants to deiconify the frame.
deiconize() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
deinstall(JEditorPane) - Method in class javax.swing.text.EditorKit
Called when the kit is being removed from the JEditorPane.
deinstall(JEditorPane) - Method in class javax.swing.text.StyledEditorKit
Called when the kit is being removed from the JEditorPane.
deinstall(JEditorPane) - Method in class javax.swing.text.html.HTMLEditorKit
Called when the kit is being removed from the JEditorPane.
deinstall(JTextComponent) - Method in interface javax.swing.text.Highlighter
Called when the UI is being removed from the interface of a JTextComponent.
deinstall(JTextComponent) - Method in class javax.swing.text.DefaultHighlighter
Called when the UI is being removed from the interface of a JTextComponent.
deinstall(JTextComponent) - Method in class javax.swing.text.DefaultCaret
Called when the UI is being removed from the interface of a JTextComponent.
deinstall(JTextComponent) - Method in interface javax.swing.text.Caret
Called when the UI is being removed from the interface of a JTextComponent.
deinstallMouseHandlers(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
delay(int) - Method in class java.awt.Robot
Sleeps for the specified time.
delegate - Variable in class javax.swing.DefaultCellEditor
Delegate - class org.omg.CORBA.portable.Delegate.
Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
Delegate - class org.omg.CORBA_2_3.portable.Delegate.
Delegate class provides the ORB vendor specific implementation of CORBA object.
Delegate() - Constructor for class org.omg.CORBA.portable.Delegate
Delegate() - Constructor for class org.omg.CORBA_2_3.portable.Delegate
delegateFocus(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up.
delegateFocus(MouseEvent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup
DELETE - Static variable in class java.awt.Event
The Delete key.
DELETE - Static variable in interface javax.accessibility.AccessibleTableModelChange
Identifies the deletion of rows and/or columns.
DELETE - Static variable in class javax.swing.event.TableModelEvent
Identifies the removal of rows or columns.
delete_values(String) - Method in class org.omg.CORBA.Context
Deletes from this Context object the NamedValue object(s) whose name field matches the given property name.
delete() - Method in class java.io.File
Deletes the file or directory denoted by this abstract pathname.
delete(int, int) - Method in class java.lang.StringBuffer
Removes the characters in a substring of this StringBuffer.
deleteChar(AttributedCharacterIterator, int) - Method in class java.awt.font.LineBreakMeasurer
Updates this LineBreakMeasurer after a single character is deleted from the text, and sets the current position to the beginning of the paragraph.
deleteChar(AttributedCharacterIterator, int) - Method in class java.awt.font.TextMeasurer
Updates the TextMeasurer after a single character has been deleted from the paragraph currently represented by this TextMeasurer.
deleteCharAt(int) - Method in class java.lang.StringBuffer
Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
deleteEntry(String) - Method in class java.security.KeyStore
Deletes the entry identified by the given alias from this keystore.
deleteNextCharAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to delete the character of content that follows the current caret position.
deleteObserver(Observer) - Method in class java.util.Observable
Deletes an observer from the set of observers of this object.
deleteObservers() - Method in class java.util.Observable
Clears the observer list so that this object no longer has any observers.
deleteOnExit() - Method in class java.io.File
Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates.
deleteOwner(Principal, Principal) - Method in interface java.security.acl.Owner
Deletes an owner.
deletePrevCharAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to delete the character of content that precedes the current caret position.
deleteRow() - Method in interface java.sql.ResultSet
Deletes the current row from this ResultSet object and from the underlying database.
deletesAreDetected(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted().
deleteShortcut() - Method in class java.awt.MenuItem
Delete any MenuShortcut object associated with this menu item.
deleteShortcut(MenuShortcut) - Method in class java.awt.MenuBar
Deletes the specified menu shortcut.
deleteTrack(Track) - Method in class javax.sound.midi.Sequence
Removes the specified track from the sequence.
delItem(int) - Method in class java.awt.List
Deprecated. replaced by remove(String) and remove(int).
delItems(int, int) - Method in class java.awt.List
Deprecated. As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.
deliverEvent(Event) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).
deliverEvent(Event) - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
deltaTransform(double[], int, double[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of relative distance vectors by this transform.
deltaTransform(Point2D, Point2D) - Method in class java.awt.geom.AffineTransform
Transforms the relative distance vector specified by ptSrc and stores the result in ptDst.
depth() - Method in class javax.swing.text.ElementIterator
Fetches the current depth of element tree.
depthFirstEnumeration() - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.
depthOffset - Variable in class javax.swing.plaf.basic.BasicTreeUI
How much the depth should be offset to properly calculate x locations.
deregisterDriver(Driver) - Static method in class java.sql.DriverManager
Drops a Driver from the DriverManager's list.
deriveFont(AffineTransform) - Method in class java.awt.Font
Creates a new Font object by replicating the current Font object and applying a new transform to it.
deriveFont(float) - Method in class java.awt.Font
Creates a new Font object by replicating the current Font object and applying a new size to it.
deriveFont(int) - Method in class java.awt.Font
Creates a new Font object by replicating the current Font object and applying a new style to it.
deriveFont(int, AffineTransform) - Method in class java.awt.Font
Creates a new Font object by replicating this Font object and applying a new style and transform.
deriveFont(int, float) - Method in class java.awt.Font
Creates a new Font object by replicating this Font object and applying a new style and size.
deriveFont(Map) - Method in class java.awt.Font
Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
deriveMMFont(float[]) - Method in interface java.awt.font.MultipleMaster
Creates a new instance of a multiple master font based on the design axis values contained in the specified array.
deriveMMFont(float[], float, float, float, float) - Method in interface java.awt.font.MultipleMaster
Creates a new instance of a multiple master font based on detailed metric information.
description - Variable in class java.sql.DriverPropertyInfo
A brief description of the property, which may be null.
deselect(int) - Method in class java.awt.List
Deselects the item at the specified index.
DESELECTED - Static variable in class java.awt.event.ItemEvent
This state-change-value indicates that a selected item was un-selected.
deserialize(ObjectInputStream, Collection) - Method in class java.beans.beancontext.BeanContextSupport
used by readObject to deserialize a collection.
DesignMode - interface java.beans.DesignMode.
This interface is intended to be implemented by, or delegated from, instances of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.
designTime - Variable in class java.beans.beancontext.BeanContextSupport
A boolean indicating whether or not this object is currently in design time mode.
desktop - Static variable in class java.awt.SystemColor
The color of the desktop background.
desktop - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
DESKTOP - Static variable in class java.awt.SystemColor
The array index for the desktop background color.
DESKTOP_ICON - Static variable in class javax.accessibility.AccessibleRole
An iconified internal frame in a DESKTOP_PANE.
DESKTOP_PANE - Static variable in class javax.accessibility.AccessibleRole
A pane that supports internal frames and iconified versions of those internal frames.
desktopIcon - Variable in class javax.swing.JInternalFrame
The icon that is displayed when the frame is iconized.
desktopIcon - Variable in class javax.swing.plaf.basic.BasicDesktopIconUI
DesktopIconUI - class javax.swing.plaf.DesktopIconUI.
Pluggable look and feel interface for JDesktopIcon.
DesktopIconUI() - Constructor for class javax.swing.plaf.DesktopIconUI
desktopManager - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
DesktopManager - interface javax.swing.DesktopManager.
DesktopManager objects are owned by a JDesktopPane object.
DesktopPaneUI - class javax.swing.plaf.DesktopPaneUI.
Pluggable look and feel interface for JDesktopPane.
DesktopPaneUI() - Constructor for class javax.swing.plaf.DesktopPaneUI
desktopProperties - Variable in class java.awt.Toolkit
desktopPropsSupport - Variable in class java.awt.Toolkit
destHeight - Variable in class java.awt.image.ReplicateScaleFilter
The target height to scale the image.
destination - Variable in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler
Destination that recieves all events.
destroy() - Method in class java.applet.Applet
Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated.
destroy() - Method in class java.lang.ThreadGroup
Destroys this thread group and all of its subgroups.
destroy() - Method in class java.lang.Thread
Destroys this thread, without any cleanup.
destroy() - Method in class java.lang.Process
Kills the subprocess.
destroy() - Method in interface org.omg.CORBA.DynAny
Destroys this DynAny object and frees any resources used to represent the data value associated with it.
destroy() - Method in interface org.omg.CORBA.PolicyOperations
Destroys the policy object.
destroy() - Method in class org.omg.CORBA._PolicyStub
Destroys the policy object.
destroy() - Method in interface org.omg.CORBA.IRObjectOperations
Destroys this object.
destroy() - Method in class org.omg.CORBA.ORB
Destroys the ORB instance and frees all the resources under an ORB instance.
destroy() - Method in class org.omg.CORBA._IDLTypeStub
destroy() - Method in class org.omg.CosNaming._NamingContextStub
destroy() - Method in interface org.omg.CosNaming.NamingContextOperations
The destroy operation deletes a naming context.
destroy() - Method in interface org.omg.CosNaming.BindingIteratorOperations
This operation destroys the iterator.
destroy() - Method in class org.omg.CosNaming._BindingIteratorStub
destroySubcontext(Name) - Method in class javax.naming.InitialContext
destroySubcontext(Name) - Method in interface javax.naming.Context
Destroys the named context and removes it from the namespace.
destroySubcontext(String) - Method in class javax.naming.InitialContext
destroySubcontext(String) - Method in interface javax.naming.Context
Destroys the named context and removes it from the namespace.
destWidth - Variable in class java.awt.image.ReplicateScaleFilter
The target width to scale the image.
detail - Variable in class java.io.WriteAbortedException
Exception that was caught while writing the ObjectStream.
detail - Variable in class java.rmi.RemoteException
Nested Exception to hold wrapped remote exception.
detail - Variable in class java.rmi.activation.ActivationException
Nested Exception to hold wrapped remote exceptions.
detail - Variable in class java.rmi.server.ServerCloneException
Nested exception for ServerCloneException.
detailsViewIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
determineOffset(JTree, Object, boolean, boolean, boolean, int) - Method in class javax.swing.tree.DefaultTreeCellEditor
DEVANAGARI - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
DFN - Static variable in class javax.swing.text.html.HTML.Tag
DGC - interface java.rmi.dgc.DGC.
The DGC abstraction is used for the server side of the distributed garbage collection algorithm.
DGC_ID - Static variable in class java.rmi.server.ObjID
well-known id for the distributed garbage collector.
Dialog - class java.awt.Dialog.
A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
DIALOG - Static variable in class javax.accessibility.AccessibleRole
A top level window with title bar and a border.
DIALOG_TITLE_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies a change in the dialog title.
DIALOG_TYPE_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies a change in the type of files displayed (files only, directories only, or both files and directories).
Dialog.AccessibleAWTDialog - class java.awt.Dialog.AccessibleAWTDialog.
This class implements accessibility support for the Dialog class.
Dialog.AccessibleAWTDialog(Dialog) - Constructor for class java.awt.Dialog.AccessibleAWTDialog
Dialog(Dialog) - Constructor for class java.awt.Dialog
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner dialog.
Dialog(Dialog, String) - Constructor for class java.awt.Dialog
Constructs an initially invisible, non-modal Dialog with the specified owner dialog and title.
Dialog(Dialog, String, boolean) - Constructor for class java.awt.Dialog
Constructs an initially invisible Dialog with the specified owner dialog, title, and modality.
Dialog(Frame) - Constructor for class java.awt.Dialog
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner frame.
Dialog(Frame, boolean) - Constructor for class java.awt.Dialog
Constructs an initially invisible Dialog with an empty title, the specified owner frame and modality.
Dialog(Frame, String) - Constructor for class java.awt.Dialog
Constructs an initially invisible, non-modal Dialog with the specified owner frame and title.
Dialog(Frame, String, boolean) - Constructor for class java.awt.Dialog
Constructs an initially invisible Dialog with the specified owner frame, title, and modality.
dialogInit() - Method in class javax.swing.JDialog
Called by the constructors to init the JDialog properly.
Dictionary - class java.util.Dictionary.
The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
Dictionary() - Constructor for class java.util.Dictionary
Sole constructor.
die() - Method in class javax.swing.undo.AbstractUndoableEdit
Sets alive to false.
die() - Method in class javax.swing.undo.CompoundEdit
Send die to each subedit, in the reverse of the order that they were added
die() - Method in interface javax.swing.undo.UndoableEdit
May be sent to inform an edit that it should no longer be used.
digest - Variable in class java.security.DigestOutputStream
The message digest associated with this stream.
digest - Variable in class java.security.DigestInputStream
The message digest associated with this stream.
digest() - Method in class java.security.MessageDigest
Completes the hash computation by performing final operations such as padding.
digest(byte[]) - Method in class java.security.MessageDigest
Performs a final update on the digest using the specified array of bytes, then completes the digest computation.
digest(byte[], int, int) - Method in class java.security.MessageDigest
Completes the hash computation by performing final operations such as padding.
DigestException - exception java.security.DigestException.
This is the generic Message Digest exception.
DigestException() - Constructor for class java.security.DigestException
Constructs a DigestException with no detail message.
DigestException(String) - Constructor for class java.security.DigestException
Constructs a DigestException with the specified detail message.
DigestInputStream - class java.security.DigestInputStream.
A transparent stream that updates the associated message digest using the bits going through the stream.
DigestInputStream(InputStream, MessageDigest) - Constructor for class java.security.DigestInputStream
Creates a digest input stream, using the specified input stream and message digest.
DigestOutputStream - class java.security.DigestOutputStream.
A transparent stream that updates the associated message digest using the bits going through the stream.
DigestOutputStream(OutputStream, MessageDigest) - Constructor for class java.security.DigestOutputStream
Creates a digest output stream, using the specified output stream and message digest.
digit(char, int) - Static method in class java.lang.Character
Returns the numeric value of the character ch in the specified radix.
Dimension - class java.awt.Dimension.
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Dimension() - Constructor for class java.awt.Dimension
Creates an instance of Dimension with a width of zero and a height of zero.
Dimension(Dimension) - Constructor for class java.awt.Dimension
Creates an instance of Dimension whose width and height are the same as for the specified dimension.
Dimension(int, int) - Constructor for class java.awt.Dimension
Constructs a Dimension and initializes it to the specified width and specified height.
Dimension2D - class java.awt.geom.Dimension2D.
The Dimension2D class is to encapsulate a width and a height dimension.
Dimension2D() - Constructor for class java.awt.geom.Dimension2D
This is an abstract class that cannot be instantiated directly.
DimensionUIResource - class javax.swing.plaf.DimensionUIResource.
DimensionUIResource(int, int) - Constructor for class javax.swing.plaf.DimensionUIResource
DINGBATS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
DIR - Static variable in class javax.swing.text.html.HTML.Tag
DIR - Static variable in class javax.swing.text.html.HTML.Attribute
DirContext - interface javax.naming.directory.DirContext.
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
DirectColorModel - class java.awt.image.DirectColorModel.
The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
DirectColorModel(ColorSpace, int, int, int, int, int, boolean, int) - Constructor for class java.awt.image.DirectColorModel
Constructs a DirectColorModel from the specified parameters.
DirectColorModel(int, int, int, int) - Constructor for class java.awt.image.DirectColorModel
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples.
DirectColorModel(int, int, int, int, int) - Constructor for class java.awt.image.DirectColorModel
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present.
direction - Variable in class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
Determines direction to traverse, 1 means expand, -1 means collapse.
direction - Variable in class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
Specifies the direction to adjust the selection by.
direction - Variable in class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
Specifies the direction to adjust the selection by.
direction - Variable in class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
direction - Variable in class javax.swing.plaf.basic.BasicArrowButton
DIRECTORIES_ONLY - Static variable in class javax.swing.JFileChooser
Instruction to display only directories.
DIRECTORY_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies user's directory change.
DIRECTORY_PANE - Static variable in class javax.accessibility.AccessibleRole
A pane that allows the user to navigate through and select the contents of a directory.
directoryIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
DirectoryManager - class javax.naming.spi.DirectoryManager.
This class contains methods for supporting DirContext implementations.
DirObjectFactory - interface javax.naming.spi.DirObjectFactory.
This interface represents a factory for creating an object given an object and attributes about the object.
DirStateFactory - interface javax.naming.spi.DirStateFactory.
This interface represents a factory for obtaining the state of an object and corresponding attributes for binding.
DirStateFactory.Result - class javax.naming.spi.DirStateFactory.Result.
An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
DirStateFactory.Result(Object, Attributes) - Constructor for class javax.naming.spi.DirStateFactory.Result
Constructs an instance of Result.
dirty(ObjID[], long, Lease) - Method in interface java.rmi.dgc.DGC
The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.
disable() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
disable() - Method in class java.awt.MenuItem
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
disable() - Static method in class java.lang.Compiler
Cause the Compiler to cease operation.
disable() - Method in class javax.swing.JComponent
overridden to ensure Accessibility support
DISABLED_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the button has been disabled.
DISABLED_SELECTED_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the button has been disabled and selected.
disabledForeground - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
disabledTextColor - Variable in class javax.swing.plaf.metal.MetalToggleButtonUI
disabledTextColor - Variable in class javax.swing.plaf.metal.MetalRadioButtonUI
disabledTextColor - Variable in class javax.swing.plaf.metal.MetalButtonUI
disableEvents(long) - Method in class java.awt.Component
Disables the events defined by the specified event mask parameter from being delivered to this component.
disableEvents(long) - Method in class java.awt.MenuItem
Disables event delivery to this menu item for events defined by the specified event mask parameter.
disableResizedPosting() - Method in class javax.swing.table.TableColumn
Deprecated. as of Java 2 platform v1.3
disableSwingFocusManager() - Static method in class javax.swing.FocusManager
Disable Swing's focus manager for the calling thread's thread group.
discardAllEdits() - Method in class javax.swing.undo.UndoManager
Empty the undo manager, sending each edit a die message in the process.
disconnect() - Method in class java.net.DatagramSocket
Disconnects the socket.
disconnect() - Method in class java.net.HttpURLConnection
Indicates that other requests to the server are unlikely in the near future.
disconnect(Object) - Method in class org.omg.CORBA.ORB
Disconnects the given servant object from the ORB.
DISCONTIGUOUS_TREE_SELECTION - Static variable in interface javax.swing.tree.TreeSelectionModel
Selection can contain any number of items that are not necessarily contiguous.
discriminator_kind() - Method in interface org.omg.CORBA.DynUnion
Returns the TCKind object associated with the discriminator of this union.
discriminator_type() - Method in class org.omg.CORBA.TypeCode
Returns a TypeCode object describing all non-default member labels.
discriminator() - Method in interface org.omg.CORBA.DynUnion
Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
dispatch() - Method in interface java.awt.ActiveEvent
Dispatch the event to it's target, listeners of the events source, or do whatever it is this event is supposed to do.
dispatch() - Method in class java.awt.event.InvocationEvent
Executes the Runnable's run() method and notifies the notifier (if any) when run() returns.
dispatch(NamingListener) - Method in class javax.naming.event.NamingEvent
Invokes the appropriate listener method on this event.
dispatch(NamingListener) - Method in class javax.naming.event.NamingExceptionEvent
Invokes the namingExceptionThrown() method on a listener using this event.
dispatch(Remote, RemoteCall, int, long) - Method in interface java.rmi.server.Skeleton
Deprecated. no replacement
dispatch(UnsolicitedNotificationListener) - Method in class javax.naming.ldap.UnsolicitedNotificationEvent
Invokes the notificationReceived() method on a listener using this event.
dispatchEvent(AWTEvent) - Method in class java.awt.Component
Dispatches an event to this component or one of its sub components.
dispatchEvent(AWTEvent) - Method in class java.awt.MenuComponent
dispatchEvent(AWTEvent) - Method in class java.awt.EventQueue
Dispatch an event.
dispatchEvent(AWTEvent) - Method in class java.awt.im.InputContext
Dispatches an event to the active input method.
dispatchEvent(AWTEvent) - Method in interface java.awt.im.spi.InputMethod
Dispatches the event to the input method.
dispatchInputMethodEvent(int, AttributedCharacterIterator, int, TextHitInfo, TextHitInfo) - Method in interface java.awt.im.spi.InputMethodContext
Creates an input method event from the arguments given and dispatches it to the client component.
DISPLAY - Static variable in class javax.swing.text.html.CSS.Attribute
DISPLAYABILITY_CHANGED - Static variable in class java.awt.event.HierarchyEvent
The displayability of the hierarchy changed.
DISPOSE_ON_CLOSE - Static variable in interface javax.swing.WindowConstants
The dispose-window default window close operation
dispose() - Method in class java.awt.Graphics
Disposes of this graphics context and releases any system resources that it is using.
dispose() - Method in interface java.awt.PaintContext
Releases the resources allocated for the operation.
dispose() - Method in interface java.awt.CompositeContext
Releases resources allocated for a context.
dispose() - Method in class java.awt.Window
Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children.
dispose() - Method in class java.awt.Dialog
Disposes the Dialog and then causes show() to return if it is currently blocked.
dispose() - Method in class java.awt.im.InputContext
Disposes of the input context and release the resources used by it.
dispose() - Method in interface java.awt.im.spi.InputMethod
Disposes of the input method and releases the resources used by it.
dispose() - Method in class javax.swing.JInternalFrame
Disposes of this internal frame.
dispose() - Method in class javax.swing.DebugGraphics
Overrides Graphics.dispose.
distance(double, double) - Method in class java.awt.geom.Point2D
Returns the distance from this Point2D to a specified point.
distance(double, double, double, double) - Static method in class java.awt.geom.Point2D
Returns the distance between two points.
distance(Point2D) - Method in class java.awt.geom.Point2D
Returns the distance from this Point2D to a specified Point2D.
distanceSq(double, double) - Method in class java.awt.geom.Point2D
Returns the square of the distance from this Point2D to a specified point.
distanceSq(double, double, double, double) - Static method in class java.awt.geom.Point2D
Returns the square of the distance between two points.
distanceSq(Point2D) - Method in class java.awt.geom.Point2D
Returns the square of the distance from this Point2D to a specified Point2D.
DISTINCT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
DIV - Static variable in class javax.swing.text.html.HTML.Tag
divide(BigDecimal, int) - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (this / val), and whose scale is this.scale().
divide(BigDecimal, int, int) - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (this / val), and whose scale is as specified.
divide(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this / val).
divideAndRemainder(BigInteger) - Method in class java.math.BigInteger
Returns an array of two BigIntegers containing (this / val) followed by (this % val).
divider - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Instance of the divider for this JSplitPane.
DIVIDER - Static variable in class javax.swing.JSplitPane
Used to add a Component that will represent the divider.
DIVIDER_LOCATION_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property for the dividerLocation.
DIVIDER_SIZE_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property name for border.
dividerResizeToggleKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
dividerSize - Variable in class javax.swing.JSplitPane
Size of the divider.
dividerSize - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
The size of the divider while the dragging session is valid.
dividerSize - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Size of the divider.
divisionType - Variable in class javax.sound.midi.Sequence
The timing division type of the sequence.
divisionType - Variable in class javax.sound.midi.MidiFileFormat
The division type of the MIDI file.
dk_Alias - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.
dk_all - Static variable in class org.omg.CORBA.DefinitionKind
The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate.
dk_Array - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Array.
dk_Attribute - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.
dk_Constant - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a constant.
dk_Enum - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.
dk_Exception - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.
dk_Fixed - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.
dk_Interface - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.
dk_Module - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Module.
dk_Native - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.
dk_none - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.
dk_Operation - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.
dk_Primitive - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.
dk_Repository - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.
dk_Sequence - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.
dk_String - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a String.
dk_Struct - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.
dk_Typedef - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.
dk_Union - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Union.
dk_Value - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Value.
dk_ValueBox - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.
dk_ValueMember - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.
dk_Wstring - Static variable in class org.omg.CORBA.DefinitionKind
The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.
DL - Static variable in class javax.swing.text.html.HTML.Tag
DnDConstants - class java.awt.dnd.DnDConstants.
This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation.
DNS_URL - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com").
DO_NOTHING_ON_CLOSE - Static variable in interface javax.swing.WindowConstants
The do-nothing default window close operation
doAccessibleAction(int) - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Perform the specified Action on the object
doAccessibleAction(int) - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Perform the specified Action on the object
doAccessibleAction(int) - Method in class java.awt.Choice.AccessibleAWTChoice
Perform the specified Action on the object
doAccessibleAction(int) - Method in class java.awt.Button.AccessibleAWTButton
Perform the specified Action on the object
doAccessibleAction(int) - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Perform the specified Action on the object
doAccessibleAction(int) - Method in class javax.accessibility.AccessibleHyperlink
Performs the specified Action on the object
doAccessibleAction(int) - Method in interface javax.accessibility.AccessibleAction
Performs the specified Action on the object
doAccessibleAction(int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Perform the specified Action on the object
doAccessibleAction(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Perform the specified Action on the object
doAccessibleAction(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Perform the specified Action on the object
doAccessibleAction(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Perform the specified Action on the tree node.
dockingBorderColor - Variable in class javax.swing.plaf.basic.BasicToolBarUI
dockingColor - Variable in class javax.swing.plaf.basic.BasicToolBarUI
dockingListener - Variable in class javax.swing.plaf.basic.BasicToolBarUI
doClick() - Method in class javax.swing.AbstractButton
Programmatically perform a "click".
doClick(int) - Method in class javax.swing.AbstractButton
Programmatically perform a "click".
doClick(int) - Method in class javax.swing.JMenu
Programatically performs a "click".
Document - interface javax.swing.text.Document.
The Document is a container for text that serves as the model for swing text components.
documentBaseKey - Static variable in class javax.swing.plaf.basic.BasicHTML
Key stored as a client property to indicate the base that relative references are resolved against.
DocumentEvent - interface javax.swing.event.DocumentEvent.
Interface for document change notifications.
DocumentEvent.ElementChange - interface javax.swing.event.DocumentEvent.ElementChange.
Describes changes made to a specific element.
DocumentEvent.EventType - class javax.swing.event.DocumentEvent.EventType.
Enumeration for document event types
DocumentListener - interface javax.swing.event.DocumentListener.
Interface for an observer to register to receive notifications of changes to a text document.
DocumentParser - class javax.swing.text.html.parser.DocumentParser.
A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing).
DocumentParser(DTD) - Constructor for class javax.swing.text.html.parser.DocumentParser
doDefaultCloseAction() - Method in class javax.swing.JInternalFrame
doesMaxRowSizeIncludeBlobs() - Method in interface java.sql.DatabaseMetaData
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
doInput - Variable in class java.net.URLConnection
This variable is set by the setDoInput method.
doLayout() - Method in class java.awt.Component
Prompts the layout manager to lay out this component.
doLayout() - Method in class java.awt.Container
Causes this container to lay out its components.
doLayout() - Method in class java.awt.ScrollPane
Lays out this container by resizing its child to its preferred size.
doLayout() - Method in class javax.swing.JTable
Causes this table to lay out its rows and columns.
doLayout() - Method in class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
Lays out this Container.
DomainCombiner - interface java.security.DomainCombiner.
A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
DomainManager - interface org.omg.CORBA.DomainManager.
The DomainManager has associated with it the policy objects for a particular domain.
DomainManagerOperations - interface org.omg.CORBA.DomainManagerOperations.
The DomainManager has associated with it the policy objects for a particular domain.
DONE - Static variable in interface java.text.CharacterIterator
Constant that is returned when the iterator has reached either the end or the beginning of the text.
DONE - Static variable in class java.text.BreakIterator
DONE is returned by previous() and next() after all valid boundaries have been returned.
done() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
done(RemoteCall) - Method in interface java.rmi.server.RemoteRef
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

dontUseGui() - Method in interface java.beans.Visibility
This method instructs the bean that it should not use the Gui.
dontUseGui() - Method in class java.beans.beancontext.BeanContextSupport
notify this instance that it may no longer render a GUI.
doOutput - Variable in class java.net.URLConnection
This variable is set by the setDoOutput method.
doPrivileged(PrivilegedAction) - Static method in class java.security.AccessController
Performs the specified PrivilegedAction with privileges enabled.
doPrivileged(PrivilegedAction, AccessControlContext) - Static method in class java.security.AccessController
Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext.
doPrivileged(PrivilegedExceptionAction) - Static method in class java.security.AccessController
Performs the specified PrivilegedExceptionAction with privileges enabled.
doPrivileged(PrivilegedExceptionAction, AccessControlContext) - Static method in class java.security.AccessController
Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.
Double - class java.lang.Double.
The Double class wraps a value of the primitive type double in an object.
DOUBLE - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.
Double(double) - Constructor for class java.lang.Double
Constructs a newly allocated Double object that represents the primitive double argument.
Double(String) - Constructor for class java.lang.Double
Constructs a newly allocated Double object that represents the floating- point value of type double represented by the string.
DoubleHolder - class org.omg.CORBA.DoubleHolder.
A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods.
DoubleHolder() - Constructor for class org.omg.CORBA.DoubleHolder
Constructs a new DoubleHolder object with its value field initialized to 0.0.
DoubleHolder(double) - Constructor for class org.omg.CORBA.DoubleHolder
Constructs a new DoubleHolder object for the given double.
DoubleSeqHelper - class org.omg.CORBA.DoubleSeqHelper.
org/omg/CORBA/DoubleSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
DoubleSeqHelper() - Constructor for class org.omg.CORBA.DoubleSeqHelper
DoubleSeqHolder - class org.omg.CORBA.DoubleSeqHolder.
org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
DoubleSeqHolder() - Constructor for class org.omg.CORBA.DoubleSeqHolder
DoubleSeqHolder(double[]) - Constructor for class org.omg.CORBA.DoubleSeqHolder
doubleToLongBits(double) - Static method in class java.lang.Double
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
doubleToRawLongBits(double) - Static method in class java.lang.Double
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
doubleValue() - Method in class java.lang.Number
Returns the value of the specified number as a double.
doubleValue() - Method in class java.lang.Long
Returns the value of this Long as a double.
doubleValue() - Method in class java.lang.Short
Returns the value of this Short as a double.
doubleValue() - Method in class java.lang.Float
Returns the double value of this Float object.
doubleValue() - Method in class java.lang.Integer
Returns the value of this Integer as a double.
doubleValue() - Method in class java.lang.Byte
Returns the value of this Byte as a double.
doubleValue() - Method in class java.lang.Double
Returns the double value of this Double.
doubleValue() - Method in class java.math.BigInteger
Converts this BigInteger to a double.
doubleValue() - Method in class java.math.BigDecimal
Converts this BigDecimal to a double.
DOWN - Static variable in class java.awt.Event
The Down Arrow key, a non-ASCII action key.
downAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically downward one position.
downKey - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
Deprecated. As of Java 2 platform v1.3.
downKey - Variable in class javax.swing.plaf.basic.BasicToolBarUI
Deprecated. As of Java 2 platform v1.3.
downKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
DRAFT - Static variable in class java.awt.PageAttributes.PrintQualityType
The PrintQualityType instance to use for specifying a draft print quality.
DRAG_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Drag layer.
dragDividerTo(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Messaged during a dragging session to move the divider to the passed in location.
dragDividerTo(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.
dragDropEnd(DragSourceDropEvent) - Method in class java.awt.dnd.DragSourceContext
This method intercepts the DragSourceDropEvent associated with dragDropEnd() from the peer.
dragDropEnd(DragSourceDropEvent) - Method in interface java.awt.dnd.DragSourceListener
This method is invoked to signify that the Drag and Drop operation is complete.
dragEnter(DragSourceDragEvent) - Method in class java.awt.dnd.DragSourceContext
This method intercepts the DragSourceDragEvent associated with dragEnter() from the peer.
dragEnter(DragSourceDragEvent) - Method in interface java.awt.dnd.DragSourceListener
Called as the hotspot enters a platform dependent drop site.
dragEnter(DropTargetDragEvent) - Method in class java.awt.dnd.DropTarget
The DropTarget intercepts dragEnter() notifications before the registered DropTargetListener gets them.
dragEnter(DropTargetDragEvent) - Method in interface java.awt.dnd.DropTargetListener
Called when a drag operation has encountered the DropTarget.
dragExit(DragSourceEvent) - Method in class java.awt.dnd.DragSourceContext
This method intercepts the DragSourceEvent associated with dragExit() from the peer.
dragExit(DragSourceEvent) - Method in interface java.awt.dnd.DragSourceListener
Called as the hotspot exits a platform dependent drop site.
dragExit(DropTargetEvent) - Method in class java.awt.dnd.DropTarget
The DropTarget intercepts dragExit() notifications before the registered DropTargetListener gets them.
dragExit(DropTargetEvent) - Method in interface java.awt.dnd.DropTargetListener
The drag operation has departed the DropTarget without dropping.
dragFrame(JComponent, int, int) - Method in interface javax.swing.DesktopManager
The user has moved the frame.
dragFrame(JComponent, int, int) - Method in class javax.swing.DefaultDesktopManager
Moves the visible location of the frame being dragged to the location specified.
draggedColumn - Variable in class javax.swing.table.JTableHeader
The index of the column being dragged.
draggedDistance - Variable in class javax.swing.table.JTableHeader
The distance from its original position the column has been dragged.
dragger - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Handles mouse dragging message to do the actual dragging.
DragGestureEvent - class java.awt.dnd.DragGestureEvent.
A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
DragGestureEvent(DragGestureRecognizer, int, Point, List) - Constructor for class java.awt.dnd.DragGestureEvent
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.
dragGestureListener - Variable in class java.awt.dnd.DragGestureRecognizer
The DragGestureListener associated with this DragGestureRecognizer.
DragGestureListener - interface java.awt.dnd.DragGestureListener.
This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.
dragGestureRecognized(DragGestureEvent) - Method in interface java.awt.dnd.DragGestureListener
A DragGestureRecognizer has detected a platform-dependent drag initiating gesture and is notifying this listener in order for it to initiate the action for the user.
DragGestureRecognizer - class java.awt.dnd.DragGestureRecognizer.
The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.
DragGestureRecognizer(DragSource) - Constructor for class java.awt.dnd.DragGestureRecognizer
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation.
DragGestureRecognizer(DragSource, Component) - Constructor for class java.awt.dnd.DragGestureRecognizer
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, and the Component this DragGestureRecognizer should "observe" for drag initiating gestures.
DragGestureRecognizer(DragSource, Component, int) - Constructor for class java.awt.dnd.DragGestureRecognizer
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.
DragGestureRecognizer(DragSource, Component, int, DragGestureListener) - Constructor for class java.awt.dnd.DragGestureRecognizer
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.
draggingHW - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.
dragOver(DragSourceDragEvent) - Method in class java.awt.dnd.DragSourceContext
This method intercepts the DragSourceDragEvent associated with dragOver() from the peer.
dragOver(DragSourceDragEvent) - Method in interface java.awt.dnd.DragSourceListener
Called as the hotspot moves over a platform dependent drop site.
dragOver(DropTargetDragEvent) - Method in class java.awt.dnd.DropTarget
The DropTarget intercepts dragOver() notifications before the registered DropTargetListener gets them.
dragOver(DropTargetDragEvent) - Method in interface java.awt.dnd.DropTargetListener
Called when a drag operation is ongoing on the DropTarget.
dragSource - Variable in class java.awt.dnd.DragGestureRecognizer
The DragSource associated with this DragGestureRecognizer.
DragSource - class java.awt.dnd.DragSource.
The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
DragSource() - Constructor for class java.awt.dnd.DragSource
Construct a new DragSource.
DragSourceContext - class java.awt.dnd.DragSourceContext.
The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
DragSourceContext(DragSourceContextPeer, DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener) - Constructor for class java.awt.dnd.DragSourceContext
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.
DragSourceDragEvent - class java.awt.dnd.DragSourceDragEvent.
The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
DragSourceDragEvent(DragSourceContext, int, int, int) - Constructor for class java.awt.dnd.DragSourceDragEvent
Constructs a DragSourceDragEvent.
DragSourceDropEvent - class java.awt.dnd.DragSourceDropEvent.
The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
DragSourceDropEvent(DragSourceContext) - Constructor for class java.awt.dnd.DragSourceDropEvent
Construct a DragSourceDropEvent for a drag that does not result in a drop.
DragSourceDropEvent(DragSourceContext, int, boolean) - Constructor for class java.awt.dnd.DragSourceDropEvent
Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, and a boolean indicating if the drop was successful.
DragSourceEvent - class java.awt.dnd.DragSourceEvent.
This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
DragSourceEvent(DragSourceContext) - Constructor for class java.awt.dnd.DragSourceEvent
Construct a DragSourceEvent given a specified DragSourceContext.
DragSourceListener - interface java.awt.dnd.DragSourceListener.
The DragSourceListener defines the event interface for originators of Drag and Drop operations to track the state of the user's gesture, and to provide appropriate "drag over" feedback to the user throughout the Drag and Drop operation.
dragTo(Point, Point) - Method in class javax.swing.plaf.basic.BasicToolBarUI
dragWindow - Variable in class javax.swing.plaf.basic.BasicToolBarUI
drain() - Method in class java.io.ObjectOutputStream
Drain any buffered data in ObjectOutputStream.
drain() - Method in interface javax.sound.sampled.DataLine
Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied.
draw(Graphics2D, float, float) - Method in class java.awt.font.TextLayout
Renders this TextLayout at the specified location in the specified Graphics2D context.
draw(Graphics2D, float, float) - Method in class java.awt.font.GraphicAttribute
Renders this GraphicAttribute at the specified location.
draw(Graphics2D, float, float) - Method in class java.awt.font.ImageGraphicAttribute
Renders the graphic at the specified location.
draw(Graphics2D, float, float) - Method in class java.awt.font.ShapeGraphicAttribute
Draws the graphic at the given location.
draw(Shape) - Method in class java.awt.Graphics2D
Strokes the outline of a Shape using the settings of the current Graphics2D context.
draw3DRect(int, int, int, int, boolean) - Method in class java.awt.Graphics
Draws a 3-D highlighted outline of the specified rectangle.
draw3DRect(int, int, int, int, boolean) - Method in class java.awt.Graphics2D
Draws a 3-D highlighted outline of the specified rectangle.
draw3DRect(int, int, int, int, boolean) - Method in class javax.swing.DebugGraphics
Overrides Graphics.draw3DRect.
drawArc(int, int, int, int, int, int) - Method in class java.awt.Graphics
Draws the outline of a circular or elliptical arc covering the specified rectangle.
drawArc(int, int, int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawArc.
drawBezel(Graphics, int, int, int, int, boolean, boolean, Color, Color, Color, Color) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
drawBytes(byte[], int, int, int, int) - Method in class java.awt.Graphics
Draws the text given by the specified byte array, using this graphics context's current font and color.
drawBytes(byte[], int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawBytes.
drawCentered(Component, Graphics, Icon, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
drawChars(char[], int, int, int, int) - Method in class java.awt.Graphics
Draws the text given by the specified character array, using this graphics context's current font and color.
drawChars(char[], int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawChars.
drawCheck(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalCheckBoxIcon
drawDashedHorizontalLine(Graphics, int, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
drawDashedRect(Graphics, int, int, int, int) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
drawDashedVerticalLine(Graphics, int, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
drawEchoCharacter(Graphics, int, int, char) - Method in class javax.swing.text.PasswordView
Renders the echo character, or whatever graphic should be used to display the password characters.
drawEtchedRect(Graphics, int, int, int, int, Color, Color, Color, Color) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
drawGlyphVector(GlyphVector, float, float) - Method in class java.awt.Graphics2D
Renders the text of the specified GlyphVector using the Graphics2D context's rendering attributes.
drawGroove(Graphics, int, int, int, int, Color, Color) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
drawImage(BufferedImage, BufferedImageOp, int, int) - Method in class java.awt.Graphics2D
Renders a BufferedImage that is filtered with a BufferedImageOp.
drawImage(Image, AffineTransform, ImageObserver) - Method in class java.awt.Graphics2D
Renders an image, applying a transform from image space into user space before drawing.
drawImage(Image, int, int, Color, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified image as is currently available.
drawImage(Image, int, int, Color, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawImage(Image, int, int, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified image as is currently available.
drawImage(Image, int, int, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawImage(Image, int, int, int, int, Color, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
drawImage(Image, int, int, int, int, Color, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawImage(Image, int, int, int, int, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
drawImage(Image, int, int, int, int, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver) - Method in class java.awt.Graphics
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawImage.
drawingCache - Variable in class javax.swing.plaf.basic.BasicTreeUI
Used for minimizing the drawing of vertical lines.
drawInverted() - Method in class javax.swing.plaf.basic.BasicSliderUI
drawLine(int, Graphics, int, int) - Method in class javax.swing.text.PlainView
Renders a line of text, suppressing whitespace at the end and exanding any tabs.
drawLine(int, int, Graphics, int, int) - Method in class javax.swing.text.WrappedPlainView
Renders a line of text, suppressing whitespace at the end and expanding any tabs.
drawLine(int, int, int, int) - Method in class java.awt.Graphics
Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
drawLine(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawLine.
drawLoweredBezel(Graphics, int, int, int, int, Color, Color, Color, Color) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
drawOval(int, int, int, int) - Method in class java.awt.Graphics
Draws the outline of an oval.
drawOval(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawOval.
drawPolygon(int[], int[], int) - Method in class java.awt.Graphics
Draws a closed polygon defined by arrays of x and y coordinates.
drawPolygon(int[], int[], int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawPolygon.
drawPolygon(Polygon) - Method in class java.awt.Graphics
Draws the outline of a polygon defined by the specified Polygon object.
drawPolyline(int[], int[], int) - Method in class java.awt.Graphics
Draws a sequence of connected lines defined by arrays of x and y coordinates.
drawPolyline(int[], int[], int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawPolyline.
drawRect(int, int, int, int) - Method in class java.awt.Graphics
Draws the outline of the specified rectangle.
drawRect(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawRect.
drawRenderableImage(RenderableImage, AffineTransform) - Method in class java.awt.Graphics2D
Renders a RenderableImage, applying a transform from image space into user space before drawing.
drawRenderedImage(RenderedImage, AffineTransform) - Method in class java.awt.Graphics2D
Renders a RenderedImage, applying a transform from image space into user space before drawing.
drawRoundRect(int, int, int, int, int, int) - Method in class java.awt.Graphics
Draws an outlined round-cornered rectangle using this graphics context's current color.
drawRoundRect(int, int, int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawRoundRect.
drawSelectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.PlainView
Renders the given range in the model as selected text.
drawSelectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.PasswordView
Renders the given range in the model as selected text.
drawSelectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.WrappedPlainView
Renders the given range in the model as selected text.
drawString(AttributedCharacterIterator, float, float) - Method in class java.awt.Graphics2D
Renders the text of the specified iterator, using the Graphics2D context's current Paint.
drawString(AttributedCharacterIterator, int, int) - Method in class java.awt.Graphics
Draws the text given by the specified iterator, using this graphics context's current color.
drawString(AttributedCharacterIterator, int, int) - Method in class java.awt.Graphics2D
Renders the text of the specified iterator, using the Graphics2D context's current Paint.
drawString(AttributedCharacterIterator, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawString.
drawString(Graphics, String, int, int, int) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
Draw a string with the graphics g at location (x,y) just like g.drawString() would.
drawString(String, float, float) - Method in class java.awt.Graphics2D
Renders the text specified by the specified String, using the current Font and Paint attributes in the Graphics2D context.
drawString(String, int, int) - Method in class java.awt.Graphics
Draws the text given by the specified string, using this graphics context's current font and color.
drawString(String, int, int) - Method in class java.awt.Graphics2D
Renders the text of the specified String, using the current Font and Paint attributes in the Graphics2D context.
drawString(String, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.drawString.
drawTabbedText(Segment, int, int, Graphics, TabExpander, int) - Static method in class javax.swing.text.Utilities
Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
drawUnselectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.PlainView
Renders the given range in the model as normal unselected text.
drawUnselectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.PasswordView
Renders the given range in the model as normal unselected text.
drawUnselectedText(Graphics, int, int, int, int) - Method in class javax.swing.text.WrappedPlainView
Renders the given range in the model as normal unselected text.
Driver - interface java.sql.Driver.
The interface that every driver class must implement.
DriverManager - class java.sql.DriverManager.
The basic service for managing a set of JDBC drivers.
NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
DriverPropertyInfo - class java.sql.DriverPropertyInfo.
Driver properties for making a connection.
DriverPropertyInfo(String, String) - Constructor for class java.sql.DriverPropertyInfo
Constructs a DriverPropertyInfo object with a name and value; other members default to their initial values.
drop(DropTargetDropEvent) - Method in class java.awt.dnd.DropTarget
The DropTarget intercepts drop() notifications before the registered DropTargetListener gets them.
drop(DropTargetDropEvent) - Method in interface java.awt.dnd.DropTargetListener
The drag operation has terminated with a drop on this DropTarget.
dropActionChanged(DragSourceDragEvent) - Method in class java.awt.dnd.DragSourceContext
This method intercepts the DragSourceDragEvent associated with dropActionChanged() from the peer.
dropActionChanged(DragSourceDragEvent) - Method in interface java.awt.dnd.DragSourceListener
Called when the user has modified the drop gesture.
dropActionChanged(DropTargetDragEvent) - Method in class java.awt.dnd.DropTarget
The DropTarget intercepts dropActionChanged() notifications before the registered DropTargetListener gets them.
dropActionChanged(DropTargetDragEvent) - Method in interface java.awt.dnd.DropTargetListener
Called if the user has modified the current drop gesture.
dropComplete(boolean) - Method in class java.awt.dnd.DropTargetContext
This method signals that the drop is completed and if it was successful or not.
dropComplete(boolean) - Method in class java.awt.dnd.DropTargetDropEvent
This method notifies the DragSource that the drop transfer(s) are completed.
DropTarget - class java.awt.dnd.DropTarget.
The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
DropTarget.DropTargetAutoScroller - class java.awt.dnd.DropTarget.DropTargetAutoScroller.
this protected nested class implements autoscrolling
DropTarget.DropTargetAutoScroller(Component, Point) - Constructor for class java.awt.dnd.DropTarget.DropTargetAutoScroller
construct a DropTargetAutoScroller
DropTarget() - Constructor for class java.awt.dnd.DropTarget
Construct a DropTarget.
DropTarget(Component, DropTargetListener) - Constructor for class java.awt.dnd.DropTarget
Construct a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.
DropTarget(Component, int, DropTargetListener) - Constructor for class java.awt.dnd.DropTarget
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.
DropTarget(Component, int, DropTargetListener, boolean) - Constructor for class java.awt.dnd.DropTarget
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.
DropTarget(Component, int, DropTargetListener, boolean, FlavorMap) - Constructor for class java.awt.dnd.DropTarget
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).
DropTargetContext - class java.awt.dnd.DropTargetContext.
A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget.
DropTargetContext.TransferableProxy - class java.awt.dnd.DropTargetContext.TransferableProxy.
The TransferableProxy is a nested helper class that supports the DropTargetContext in managing the transfer of data.
DropTargetDragEvent - class java.awt.dnd.DropTargetDragEvent.
The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
DropTargetDragEvent(DropTargetContext, Point, int, int) - Constructor for class java.awt.dnd.DropTargetDragEvent
Construct a DropTargetDragEvent given the DropTargetContext for this operation, the location of the "Drag" Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and current set of actions supported by the source.
DropTargetDropEvent - class java.awt.dnd.DropTargetDropEvent.
The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
DropTargetDropEvent(DropTargetContext, Point, int, int) - Constructor for class java.awt.dnd.DropTargetDropEvent
Construct a DropTargetDropEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and the current set of actions supported by the source.
DropTargetDropEvent(DropTargetContext, Point, int, int, boolean) - Constructor for class java.awt.dnd.DropTargetDropEvent
Construct a DropTargetEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, the current set of actions supported by the source, and a boolean indicating if the source is in the same JVM as the target.
DropTargetEvent - class java.awt.dnd.DropTargetEvent.
The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.
DropTargetEvent(DropTargetContext) - Constructor for class java.awt.dnd.DropTargetEvent
Construct a DropTargetEvent with a specified DropTargetContext.
DropTargetListener - interface java.awt.dnd.DropTargetListener.
The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget.
DSAKey - interface java.security.interfaces.DSAKey.
The interface to a DSA public or private key.
DSAKeyPairGenerator - interface java.security.interfaces.DSAKeyPairGenerator.
An interface to an object capable of generating DSA key pairs.
DSAParameterSpec - class java.security.spec.DSAParameterSpec.
This class specifies the set of parameters used with the DSA algorithm.
DSAParameterSpec(BigInteger, BigInteger, BigInteger) - Constructor for class java.security.spec.DSAParameterSpec
Creates a new DSAParameterSpec with the specified parameter values.
DSAParams - interface java.security.interfaces.DSAParams.
Interface to a DSA-specific set of key parameters, which defines a DSA key family.
DSAPrivateKey - interface java.security.interfaces.DSAPrivateKey.
The standard interface to a DSA private key.
DSAPrivateKeySpec - class java.security.spec.DSAPrivateKeySpec.
This class specifies a DSA private key with its associated parameters.
DSAPrivateKeySpec(BigInteger, BigInteger, BigInteger, BigInteger) - Constructor for class java.security.spec.DSAPrivateKeySpec
Creates a new DSAPrivateKeySpec with the specified parameter values.
DSAPublicKey - interface java.security.interfaces.DSAPublicKey.
The interface to a DSA public key.
DSAPublicKeySpec - class java.security.spec.DSAPublicKeySpec.
This class specifies a DSA public key with its associated parameters.
DSAPublicKeySpec(BigInteger, BigInteger, BigInteger, BigInteger) - Constructor for class java.security.spec.DSAPublicKeySpec
Creates a new DSAPublicKeySpec with the specified parameter values.
DST_IN - Static variable in class java.awt.AlphaComposite
Porter-Duff Destination In Source rule.
DST_OFFSET - Static variable in class java.util.Calendar
Field number for get and set indicating the daylight savings offset in milliseconds.
DST_OUT - Static variable in class java.awt.AlphaComposite
Porter-Duff Destination Held Out By Source rule.
DST_OVER - Static variable in class java.awt.AlphaComposite
Porter-Duff Destination Over Source rule.
DstIn - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque DST_IN rule with an alpha of 1.0f.
DstOut - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque DST_OUT rule with an alpha of 1.0f.
DstOver - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque DST_OVER rule with an alpha of 1.0f.
DT - Static variable in class javax.swing.text.html.HTML.Tag
dtd - Variable in class javax.swing.text.html.parser.Parser
DTD - class javax.swing.text.html.parser.DTD.
The representation of an SGML DTD.
DTD(String) - Constructor for class javax.swing.text.html.parser.DTD
Create a new DTD.
DTDConstants - interface javax.swing.text.html.parser.DTDConstants.
SGML constants used in a DTD.
DUMMY - Static variable in class javax.swing.text.html.HTML.Attribute
dump(PrintStream) - Method in class javax.swing.text.AbstractDocument
Gives a diagnostic dump.
dump(PrintStream, int) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Dumps a debugging representation of the element hierarchy.
dumpStack() - Static method in class java.lang.Thread
Prints a stack trace of the current thread.
duplicate(Object) - Method in class org.omg.CORBA.portable.Delegate
Returns a duplicate of the object reference provided.
DynamicImplementation - class org.omg.CORBA.DynamicImplementation.
The base class for all object implementations using the DSI.
DynamicImplementation() - Constructor for class org.omg.CORBA.DynamicImplementation
DynAny - interface org.omg.CORBA.DynAny.
org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynArray - interface org.omg.CORBA.DynArray.
The DynArray interface represents a DynAny object which is associated with an array.
DynEnum - interface org.omg.CORBA.DynEnum.
The DynEnum interface represents a DynAny object which is associated with an IDL enum.
DynFixed - interface org.omg.CORBA.DynFixed.
Represents a DynAny object that is associated with an IDL fixed type.
DynSequence - interface org.omg.CORBA.DynSequence.
The representation of a DynAny object that is associated with an IDL sequence.
DynStruct - interface org.omg.CORBA.DynStruct.
The representation of a DynAny object that is associated with an IDL struct.
DynUnion - interface org.omg.CORBA.DynUnion.
The DynUnion interface represents a DynAny object that is associated with an IDL union.
DynValue - interface org.omg.CORBA.DynValue.
The representation of a DynAny object that is associated with an IDL value type.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Deprecated List

PREV NEXT FRAMES NO FRAMES

Deprecated API

Deprecated Classes
javax.accessibility.AccessibleResourceBundle
This class is deprecated as of version 1.3 of the Java 2 Platform.
javax.swing.text.DefaultTextUI
java.security.Identity
This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
java.security.IdentityScope
This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
java.io.LineNumberInputStream
This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.
java.rmi.server.LogStream
no replacement
java.rmi.server.Operation
no replacement
org.omg.CORBA.Principal
Deprecated by CORBA 2.2.
org.omg.CORBA.PrincipalHolder
Deprecated by CORBA 2.2.
java.security.Signer
This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
java.io.StringBufferInputStream
This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
javax.swing.text.TableView.TableCell
A table cell can now be any View implementation.

Deprecated Interfaces
java.security.Certificate
A new certificate handling package is created in the Java 2 platform. This Certificate interface is entirely deprecated and is here to allow for a smooth transition to the new package.
java.rmi.server.LoaderHandler
no replacement
java.rmi.registry.RegistryHandler
no replacement
java.rmi.server.RemoteCall
no replacement.
java.rmi.server.Skeleton
no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.

Deprecated Exceptions
java.rmi.RMISecurityException
no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
java.rmi.ServerRuntimeException
no replacement
java.rmi.server.SkeletonMismatchException
no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
java.rmi.server.SkeletonNotFoundException
no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.

Deprecated Fields
javax.swing.JViewport.backingStore
As of Java 2 platform v1.3
javax.swing.plaf.basic.BasicDesktopPaneUI.closeKey
As of JDK version 1.3.
java.awt.Frame.CROSSHAIR_CURSOR
replaced by Cursor.CROSSHAIR_CURSOR.
java.awt.Frame.DEFAULT_CURSOR
replaced by Cursor.DEFAULT_CURSOR.
javax.swing.JRootPane.defaultPressAction
As of Java 2 platform v1.3.
javax.swing.JRootPane.defaultReleaseAction
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.dividerResizeToggleKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicTabbedPaneUI.downKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicToolBarUI.downKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.downKey
As of Java 2 platform v1.3.
java.awt.Frame.E_RESIZE_CURSOR
replaced by Cursor.E_RESIZE_CURSOR.
javax.swing.plaf.basic.BasicSplitPaneUI.endKey
As of Java 2 platform v1.3.
java.awt.Frame.HAND_CURSOR
replaced by Cursor.HAND_CURSOR.
javax.swing.plaf.basic.BasicSplitPaneUI.homeKey
As of Java 2 platform v1.3.
java.net.HttpURLConnection.HTTP_SERVER_ERROR
it is misplaced and shouldn't have existed.
java.lang.SecurityManager.inCheck
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
javax.swing.plaf.basic.BasicSplitPaneUI.keyboardDownRightListener
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.keyboardEndListener
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.keyboardHomeListener
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.keyboardResizeToggleListener
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.keyboardUpLeftListener
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicTabbedPaneUI.leftKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicToolBarUI.leftKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.leftKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicDesktopPaneUI.maximizeKey
As of JDK version 1.3.
javax.swing.plaf.basic.BasicDesktopPaneUI.minimizeKey
As of JDK version 1.3.
java.awt.Frame.MOVE_CURSOR
replaced by Cursor.MOVE_CURSOR.
java.awt.Frame.N_RESIZE_CURSOR
replaced by Cursor.N_RESIZE_CURSOR.
javax.swing.plaf.basic.BasicDesktopPaneUI.navigateKey
As of JDK version 1.3.
javax.swing.plaf.basic.BasicDesktopPaneUI.navigateKey2
As of JDK version 1.3.
java.awt.Frame.NE_RESIZE_CURSOR
replaced by Cursor.NE_RESIZE_CURSOR.
java.awt.Frame.NW_RESIZE_CURSOR
replaced by Cursor.NW_RESIZE_CURSOR.
javax.swing.plaf.basic.BasicInternalFrameUI.openMenuKey
As of Java 2 platform v1.3.
java.awt.datatransfer.DataFlavor.plainTextFlavor
as of 1.3. Use DataFlavor.getReaderForText( Transferable) instead of Transferable. getTransferData(DataFlavor.plainTextFlavor).
javax.swing.text.html.FormView.RESET
As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText
javax.swing.table.TableColumn.resizedPostingDisableCount
as of Java 2 platform v1.3
javax.swing.plaf.basic.BasicTabbedPaneUI.rightKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicToolBarUI.rightKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.rightKey
As of Java 2 platform v1.3.
java.awt.Frame.S_RESIZE_CURSOR
replaced by Cursor.S_RESIZE_CURSOR.
java.awt.Frame.SE_RESIZE_CURSOR
replaced by Cursor.SE_RESIZE_CURSOR.
javax.swing.text.html.FormView.SUBMIT
As of 1.3, value now comes from UIManager property FormView.submitButtonText
java.awt.Frame.SW_RESIZE_CURSOR
replaced by Cursor.SW_RESIZE_CURSOR.
java.awt.Frame.TEXT_CURSOR
replaced by Cursor.TEXT_CURSOR.
javax.swing.plaf.basic.BasicTabbedPaneUI.upKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicToolBarUI.upKey
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.upKey
As of Java 2 platform v1.3.
java.awt.Frame.W_RESIZE_CURSOR
replaced by Cursor.W_RESIZE_CURSOR.
java.awt.Frame.WAIT_CURSOR
replaced by Cursor.WAIT_CURSOR.

Deprecated Methods
java.awt.Component.action(Event, Object)
As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
java.awt.List.addItem(String)
replaced by add(String).
java.awt.List.addItem(String, int)
replaced by add(String, int).
java.awt.CardLayout.addLayoutComponent(String, Component)
replaced by addLayoutComponent(Component, Object).
java.awt.BorderLayout.addLayoutComponent(String, Component)
replaced by addLayoutComponent(Component, Object).
java.awt.List.allowsMultipleSelections()
As of JDK version 1.1, replaced by isMultipleMode().
java.lang.ThreadGroup.allowThreadSuspension(boolean)
The definition of this call depends on ThreadGroup.suspend(), which is deprecated. Further, the behavior of this call was never specified.
java.awt.TextArea.appendText(String)
As of JDK version 1.1, replaced by append(String).
java.awt.Component.bounds()
As of JDK version 1.1, replaced by getBounds().
java.lang.SecurityManager.classDepth(String)
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.lang.SecurityManager.classLoaderDepth()
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.awt.List.clear()
As of JDK version 1.1, replaced by removeAll().
java.awt.image.renderable.RenderContext.concetenateTransform(AffineTransform)
replaced by concatenateTransform(AffineTransform).
java.awt.Container.countComponents()
As of JDK version 1.1, replaced by getComponentCount().
java.awt.Menu.countItems()
As of JDK version 1.1, replaced by getItemCount().
java.awt.List.countItems()
As of JDK version 1.1, replaced by getItemCount().
java.awt.Choice.countItems()
As of JDK version 1.1, replaced by getItemCount().
java.awt.MenuBar.countMenus()
As of JDK version 1.1, replaced by getMenuCount().
java.lang.Thread.countStackFrames()
The definition of this call depends on Thread.suspend(), which is deprecated. Further, the results of this call were never well-defined.
org.omg.CORBA.ORB.create_recursive_sequence_tc(int, int)
javax.swing.plaf.basic.BasicSplitPaneUI.createKeyboardDownRightListener()
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.createKeyboardEndListener()
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.createKeyboardHomeListener()
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.createKeyboardResizeToggleListener()
As of Java 2 platform v1.3.
javax.swing.plaf.basic.BasicSplitPaneUI.createKeyboardUpLeftListener()
As of Java 2 platform v1.3.
javax.swing.JTable.createScrollPaneForTable(JTable)
As of Swing version 1.0.2, replaced by new JScrollPane(aTable).
javax.swing.text.TableView.createTableCell(Element)
Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.
java.lang.SecurityManager.currentClassLoader()
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.lang.SecurityManager.currentLoadedClass()
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.lang.ClassLoader.defineClass(byte[], int, int)
Replaced by defineClass(java.lang.String, byte[], int, int)
java.awt.List.delItem(int)
replaced by remove(String) and remove(int).
java.awt.List.delItems(int, int)
As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.
java.awt.Component.deliverEvent(Event)
As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).
java.awt.Container.deliverEvent(Event)
As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
java.awt.Component.disable()
As of JDK version 1.1, replaced by setEnabled(boolean).
java.awt.MenuItem.disable()
As of JDK version 1.1, replaced by setEnabled(boolean).
javax.swing.table.TableColumn.disableResizedPosting()
as of Java 2 platform v1.3
java.rmi.server.Skeleton.dispatch(Remote, RemoteCall, int, long)
no replacement
java.rmi.server.RemoteCall.done()
no replacement
java.rmi.server.RemoteRef.done(RemoteCall)
1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

java.awt.Component.enable()
As of JDK version 1.1, replaced by setEnabled(boolean).
java.awt.MenuItem.enable()
As of JDK version 1.1, replaced by setEnabled(boolean).
java.awt.Component.enable(boolean)
As of JDK version 1.1, replaced by setEnabled(boolean).
java.awt.MenuItem.enable(boolean)
As of JDK version 1.1, replaced by setEnabled(boolean).
javax.swing.table.TableColumn.enableResizedPosting()
as of Java 2 platform v1.3
java.security.SignatureSpi.engineGetParameter(String)
java.security.SignatureSpi.engineSetParameter(String, Object)
Replaced by engineSetParameter.
java.awt.datatransfer.DataFlavor.equals(String)
As inconsistent with hashCode() contract, use isMimeTypeEqual(String) instead.
org.omg.CORBA.ServerRequest.except(Any)
use set_exception()
java.rmi.server.RemoteCall.executeCall()
no replacement
org.omg.CORBA.Any.extract_Principal()
Deprecated by CORBA 2.2.
org.omg.CORBA.ORB.get_current()
use resolve_initial_references.
java.security.Security.getAlgorithmProperty(String, String)
This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.
java.sql.CallableStatement.getBigDecimal(int, int)
java.sql.ResultSet.getBigDecimal(int, int)
java.sql.ResultSet.getBigDecimal(String, int)
java.awt.Polygon.getBoundingBox()
As of JDK version 1.1, replaced by getBounds().
java.lang.String.getBytes(int, int, byte[], int)
This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding.
java.awt.Graphics.getClipRect()
As of JDK version 1.1, replaced by getClipBounds().
javax.swing.JPopupMenu.getComponentAtIndex(int)
replaced by getComponent(int i)
javax.swing.JMenuBar.getComponentAtIndex(int)
replaced by getComponent(int i)
java.awt.CheckboxGroup.getCurrent()
As of JDK version 1.1, replaced by getSelectedCheckbox().
java.awt.Frame.getCursorType()
As of JDK version 1.1, replaced by Component.getCursor().
java.sql.Time.getDate()
java.util.Date.getDate()
As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_MONTH).
java.sql.Time.getDay()
java.util.Date.getDay()
As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK).
java.net.URLConnection.getDefaultRequestProperty(String)
The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
java.rmi.server.LogStream.getDefaultStream()
no replacement
javax.swing.plaf.basic.BasicSplitPaneUI.getDividerBorderSize()
As of Java 2 platform v1.3, instead set the border on the divider.
java.lang.System.getenv(String)
The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding get TypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();
java.awt.Toolkit.getFontList()
see GraphicsEnvironment.getAvailableFontFamilyNames()
javax.swing.text.LabelView.getFontMetrics()
FontMetrics are not used for glyph rendering when running in the Java2 SDK.
java.awt.Toolkit.getFontMetrics(Font)
This returns integer metrics for the default screen.
java.awt.Toolkit.getFontPeer(String, int)
see java.awt.GraphicsEnvironment#getAllFonts
java.sql.Date.getHours()
java.util.Date.getHours()
As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY).
java.lang.SecurityManager.getInCheck()
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.rmi.server.RemoteCall.getInputStream()
no replacement
javax.swing.KeyStroke.getKeyStroke(char, boolean)
use getKeyStroke(char)
javax.swing.AbstractButton.getLabel()
- Replaced by getText
java.awt.Scrollbar.getLineIncrement()
As of JDK version 1.1, replaced by getUnitIncrement().
java.lang.Runtime.getLocalizedInputStream(InputStream)
As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.
java.lang.Runtime.getLocalizedOutputStream(OutputStream)
As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.
java.sql.DriverManager.getLogStream()
java.awt.FontMetrics.getMaxDecent()
As of JDK version 1.1.1, replaced by getMaxDescent().
javax.swing.JInternalFrame.getMenuBar()
As of Swing version 1.0.3, replaced by getJMenuBar().
javax.swing.JRootPane.getMenuBar()
As of Swing version 1.0.3 replaced by getJMenubar().
java.sql.Date.getMinutes()
java.util.Date.getMinutes()
As of JDK version 1.1, replaced by Calendar.get(Calendar.MINUTE).
java.sql.Time.getMonth()
java.util.Date.getMonth()
As of JDK version 1.1, replaced by Calendar.get(Calendar.MONTH).
java.rmi.server.Operation.getOperation()
no replacement
java.rmi.server.Skeleton.getOperations()
no replacement
java.rmi.server.RemoteCall.getOutputStream()
no replacement
java.rmi.server.LogStream.getOutputStream()
no replacement
java.awt.Scrollbar.getPageIncrement()
As of JDK version 1.1, replaced by getBlockIncrement().
java.security.Signature.getParameter(String)
java.awt.Component.getPeer()
As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable().
java.awt.MenuComponent.getPeer()
As of JDK version 1.1, programs should not directly manipulate peers.
java.awt.Font.getPeer()
Font rendering is now platform independent.
java.rmi.server.RemoteCall.getResultStream(boolean)
no replacement
java.sql.Date.getSeconds()
java.util.Date.getSeconds()
As of JDK version 1.1, replaced by Calendar.get(Calendar.SECOND).
java.rmi.server.RMIClassLoader.getSecurityContext(ClassLoader)
no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.
java.rmi.server.LoaderHandler.getSecurityContext(ClassLoader)
no replacement
javax.swing.JPasswordField.getText()
As of Java 2 platform v1.2, replaced by getPassword().
javax.swing.JPasswordField.getText(int, int)
As of Java 2 platform v1.2, replaced by getPassword().
java.util.Date.getTimezoneOffset()
As of JDK version 1.1, replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET).
java.net.MulticastSocket.getTTL()
use the getTimeToLive method instead, which returns an int instead of a byte.
java.net.DatagramSocketImpl.getTTL()
use getTimeToLive instead.
java.sql.ResultSet.getUnicodeStream(int)
use getCharacterStream in place of getUnicodeStream
java.sql.ResultSet.getUnicodeStream(String)
javax.swing.ScrollPaneLayout.getViewportBorderBounds(JScrollPane)
As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().
java.awt.Scrollbar.getVisible()
As of JDK version 1.1, replaced by getVisibleAmount().
java.sql.Time.getYear()
java.util.Date.getYear()
As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900.
java.awt.Component.gotFocus(Event, Object)
As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
java.awt.Component.handleEvent(Event)
As of JDK version 1.1 replaced by processEvent(AWTEvent).
java.awt.Component.hide()
As of JDK version 1.1, replaced by setVisible(boolean).
javax.swing.JComponent.hide()
As of JDK version 1.1, replaced by setVisible(boolean).
java.lang.SecurityManager.inClass(String)
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
java.lang.SecurityManager.inClassLoader()
This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
org.omg.CORBA.Any.insert_Principal(Principal)
Deprecated by CORBA 2.2.
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane, HTMLDocument, int, Element, String, HTML.Tag, HTML.Tag)
As of Java 2 platform v1.3, use insertAtBoundary
java.awt.TextArea.insertText(String, int)
As of JDK version 1.1, replaced by insert(String, int).
java.awt.Container.insets()
As of JDK version 1.1, replaced by getInsets().
java.awt.Component.inside(int, int)
As of JDK version 1.1, replaced by contains(int, int).
java.awt.Polygon.inside(int, int)
As of JDK version 1.1, replaced by contains(int, int).
java.awt.Rectangle.inside(int, int)
As of JDK version 1.1, replaced by contains(int, int).
java.rmi.server.RemoteRef.invoke(RemoteCall)
1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

javax.swing.JViewport.isBackingStoreEnabled()
As of Java 2 platform v1.3, replaced by getScrollMode().
java.lang.Character.isJavaLetter(char)
Replaced by isJavaIdentifierStart(char).
java.lang.Character.isJavaLetterOrDigit(char)
Replaced by isJavaIdentifierPart(char).
java.awt.List.isSelected(int)
As of JDK version 1.1, replaced by isIndexSelected(int).
java.lang.Character.isSpace(char)
Replaced by isWhitespace(char).
java.rmi.dgc.VMID.isUnique()
java.awt.Component.keyDown(Event, int)
As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
java.awt.Component.keyUp(Event, int)
As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
java.awt.Component.layout()
As of JDK version 1.1, replaced by doLayout().
java.awt.Container.layout()
As of JDK version 1.1, replaced by doLayout().
java.awt.ScrollPane.layout()
As of JDK version 1.1, replaced by doLayout().
java.rmi.server.RMIClassLoader.loadClass(String)
replaced by loadClass(String,String) method
java.rmi.server.LoaderHandler.loadClass(String)
no replacement
java.rmi.server.LoaderHandler.loadClass(URL, String)
no replacement
java.awt.Component.locate(int, int)
As of JDK version 1.1, replaced by getComponentAt(int, int).
java.awt.Container.locate(int, int)
As of JDK version 1.1, replaced by getComponentAt(int, int).
java.awt.Component.location()
As of JDK version 1.1, replaced by getLocation().
java.rmi.server.LogStream.log(String)
no replacement
java.awt.Component.lostFocus(Event, Object)
As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
java.awt.Component.minimumSize()
As of JDK version 1.1, replaced by getMinimumSize().
java.awt.Container.minimumSize()
As of JDK version 1.1, replaced by getMinimumSize().
java.awt.List.minimumSize()
As of JDK version 1.1, replaced by getMinimumSize().
java.awt.TextField.minimumSize()
As of JDK version 1.1, replaced by getMinimumSize().
java.awt.TextArea.minimumSize()
As of JDK version 1.1, replaced by getMinimumSize().
java.awt.List.minimumSize(int)
As of JDK version 1.1, replaced by getMinimumSize(int).
java.awt.TextField.minimumSize(int)
As of JDK version 1.1, replaced by getMinimumSize(int).
java.awt.TextArea.minimumSize(int, int)
As of JDK version 1.1, replaced by getMinimumSize(int, int).
javax.swing.text.View.modelToView(int, Shape)
java.awt.Component.mouseDown(Event, int, int)
As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
java.awt.Component.mouseDrag(Event, int, int)
As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
java.awt.Component.mouseEnter(Event, int, int)
As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
java.awt.Component.mouseExit(Event, int, int)
As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
java.awt.Component.mouseMove(Event, int, int)
As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
java.awt.Component.mouseUp(Event, int, int)
As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
java.awt.Component.move(int, int)
As of JDK version 1.1, replaced by setLocation(int, int).
java.awt.Rectangle.move(int, int)
As of JDK version 1.1, replaced by setLocation(int, int).
org.omg.CORBA.Principal.name()
Deprecated by CORBA 2.2.
org.omg.CORBA.Principal.name(byte[])
Deprecated by CORBA 2.2.
java.rmi.server.RemoteRef.newCall(RemoteObject, Operation[], int, long)
1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

java.awt.Component.nextFocus()
As of JDK version 1.1, replaced by transferFocus().
java.awt.datatransfer.DataFlavor.normalizeMimeType(String)
java.awt.datatransfer.DataFlavor.normalizeMimeTypeParameter(String, String)
org.omg.CORBA.ServerRequest.op_name()
use operation()
org.omg.CORBA.ServerRequest.params(NVList)
use the method arguments
java.util.Date.parse(String)
As of JDK version 1.1, replaced by DateFormat.parse(String s).
java.rmi.server.LogStream.parseLevel(String)
no replacement
java.awt.Component.postEvent(Event)
As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
java.awt.MenuComponent.postEvent(Event)
As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
java.awt.MenuContainer.postEvent(Event)
As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
java.awt.Window.postEvent(Event)
As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
java.awt.image.renderable.RenderContext.preConcetenateTransform(AffineTransform)
replaced by preConcatenateTransform(AffineTransform).
java.awt.Component.preferredSize()
As of JDK version 1.1, replaced by getPreferredSize().
java.awt.Container.preferredSize()
As of JDK version 1.1, replaced by getPreferredSize().
java.awt.List.preferredSize()
As of JDK version 1.1, replaced by getPreferredSize().
java.awt.TextField.preferredSize()
As of JDK version 1.1, replaced by getPreferredSize().
java.awt.TextArea.preferredSize()
As of JDK version 1.1, replaced by getPreferredSize().
java.awt.List.preferredSize(int)
As of JDK version 1.1, replaced by getPreferredSize(int).
java.awt.TextField.preferredSize(int)
As of JDK version 1.1, replaced by getPreferredSize(int).
java.awt.TextArea.preferredSize(int, int)
As of JDK version 1.1, replaced by getPreferredSize(int, int).
org.omg.CORBA.portable.InputStream.read_Principal()
Deprecated by CORBA 2.2.
java.io.ObjectInputStream.readLine()
This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.
java.io.DataInputStream.readLine()
This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
java.rmi.registry.RegistryHandler.registryImpl(int)
no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.
java.rmi.registry.RegistryHandler.registryStub(String, int)
no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.
java.rmi.server.RemoteCall.releaseInputStream()
no replacement
java.rmi.server.RemoteCall.releaseOutputStream()
no replacement
java.awt.TextArea.replaceText(String, int, int)
As of JDK version 1.1, replaced by replaceRange(String, int, int).
java.awt.Component.reshape(int, int, int, int)
As of JDK version 1.1, replaced by setBounds(int, int, int, int).
java.awt.Rectangle.reshape(int, int, int, int)
As of JDK version 1.1, replaced by setBounds(int, int, int, int).
java.awt.Component.resize(Dimension)
As of JDK version 1.1, replaced by setSize(Dimension).
java.awt.Component.resize(int, int)
As of JDK version 1.1, replaced by setSize(int, int).
java.awt.Rectangle.resize(int, int)
As of JDK version 1.1, replaced by setSize(int, int).
org.omg.CORBA.ServerRequest.result(Any)
use the method set_result
java.lang.ThreadGroup.resume()
This method is used solely in conjunction with Thread.suspend and ThreadGroup.suspend, both of which have been deprecated, as they are inherently deadlock-prone. See Thread.suspend() for details.
java.lang.Thread.resume()
This method exists solely for use with Thread.suspend(), which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
java.lang.System.runFinalizersOnExit(boolean)
This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
java.lang.Runtime.runFinalizersOnExit(boolean)
This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
java.util.Properties.save(OutputStream, String)
This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.
javax.swing.JViewport.setBackingStoreEnabled(boolean)
As of Java 2 platform v1.3, replaced by setScrollMode().
java.awt.CheckboxGroup.setCurrent(Checkbox)
As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).
java.awt.Frame.setCursor(int)
As of JDK version 1.1, replaced by Component.setCursor(Cursor).
java.sql.Time.setDate(int)
java.util.Date.setDate(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).
java.net.URLConnection.setDefaultRequestProperty(String, String)
The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
java.rmi.server.LogStream.setDefaultStream(PrintStream)
no replacement
java.awt.TextField.setEchoCharacter(char)
As of JDK version 1.1, replaced by setEchoChar(char).
java.sql.Date.setHours(int)
java.util.Date.setHours(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours).
javax.swing.AbstractButton.setLabel(String)
- Replaced by setText(text)
java.awt.Scrollbar.setLineIncrement(int)
As of JDK version 1.1, replaced by setUnitIncrement(int).
java.sql.DriverManager.setLogStream(PrintStream)
javax.swing.JInternalFrame.setMenuBar(JMenuBar)
As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar m).
javax.swing.JRootPane.setMenuBar(JMenuBar)
As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu).
java.sql.Date.setMinutes(int)
java.util.Date.setMinutes(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes).
java.sql.Time.setMonth(int)
java.util.Date.setMonth(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month).
java.awt.List.setMultipleSelections(boolean)
As of JDK version 1.1, replaced by setMultipleMode(boolean).
java.rmi.server.LogStream.setOutputStream(OutputStream)
no replacement
java.awt.Scrollbar.setPageIncrement(int)
As of JDK version 1.1, replaced by setBlockIncrement().
java.security.Signature.setParameter(String, Object)
Use setParameter.
java.rmi.server.RemoteStub.setRef(RemoteStub, RemoteRef)
no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.
java.sql.Date.setSeconds(int)
java.util.Date.setSeconds(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds).
java.net.MulticastSocket.setTTL(byte)
use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.
java.net.DatagramSocketImpl.setTTL(byte)
use setTimeToLive instead.
java.sql.PreparedStatement.setUnicodeStream(int, InputStream, int)
java.net.URLStreamHandler.setURL(URL, String, String, int, String, String)
Use setURL(URL, String, String, int, String, String, String, String);
java.sql.Time.setYear(int)
java.util.Date.setYear(int)
As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900).
java.awt.Component.show()
As of JDK version 1.1, replaced by setVisible(boolean).
java.awt.Component.show(boolean)
As of JDK version 1.1, replaced by setVisible(boolean).
java.awt.Component.size()
As of JDK version 1.1, replaced by getSize().
javax.swing.JTable.sizeColumnsToFit(boolean)
As of Swing version 1.0.3, replaced by sizeColumnsToFit(int).
java.lang.ThreadGroup.stop()
This method is inherently unsafe. See Thread.stop() for details.
java.lang.Thread.stop()
This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
java.lang.Thread.stop(Throwable)
This method is inherently unsafe. See Thread.stop() (with no arguments) for details. An additional danger of this method is that it may be used to generate exceptions that the target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
java.lang.ThreadGroup.suspend()
This method is inherently deadlock-prone. See Thread.suspend() for details.
java.lang.Thread.suspend()
This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
java.util.Date.toGMTString()
As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.
java.util.Date.toLocaleString()
As of JDK version 1.1, replaced by DateFormat.format(Date date).
java.rmi.server.Operation.toString()
no replacement
java.rmi.server.LogStream.toString()
no replacement
java.io.ByteArrayOutputStream.toString(int)
This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding.
java.util.Date.UTC(int, int, int, int, int, int)
As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime().
javax.swing.text.View.viewToModel(float, float, Shape)
org.omg.CORBA.portable.OutputStream.write_Principal(Principal)
Deprecated by CORBA 2.2.
java.rmi.server.LogStream.write(byte[], int, int)
no replacement
java.rmi.server.LogStream.write(int)
no replacement

Deprecated Constructors
java.sql.Date(int, int, int)
instead use the constructor Date(long date)
java.util.Date(int, int, int)
As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date).
java.util.Date(int, int, int, int, int)
As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min) or GregorianCalendar(year + 1900, month, date, hrs, min).
java.util.Date(int, int, int, int, int, int)
As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec).
java.util.Date(String)
As of JDK version 1.1, replaced by DateFormat.parse(String s).
java.rmi.server.Operation(String)
no replacement
java.rmi.RMISecurityException(String)
no replacement
java.rmi.RMISecurityException(String, String)
no replacement
java.rmi.ServerRuntimeException(String, Exception)
no replacement
java.rmi.server.SkeletonMismatchException(String)
no replacement
java.net.Socket(InetAddress, int, boolean)
Use DatagramSocket instead for UDP transport.
java.net.Socket(String, int, boolean)
Use DatagramSocket instead for UDP transport.
java.io.StreamTokenizer(InputStream)
As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
java.lang.String(byte[], int)
This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
java.lang.String(byte[], int, int, int)
This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
org.omg.CORBA.TCKind(int)
Do not use this constructor as this method should be private according to the OMG specification. Use TCKind.from_int(int) instead.
java.sql.Time(int, int, int)
Use the constructor that takes a milliseconds value in place of this constructor
java.sql.Timestamp(int, int, int, int, int, int, int)
instead use the constructor Timestamp(long millis)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


E-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

E

E - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Engineering E, 34 x 44 in.
E - Static variable in class java.lang.StrictMath
The double value that is closer than any other to e, the base of the natural logarithms.
E - Static variable in class java.lang.Math
The double value that is closer than any other to e, the base of the natural logarithms.
E_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The east-resize cursor type.
E_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.E_RESIZE_CURSOR.
EAST - Static variable in class java.awt.BorderLayout
The east layout constraint (right side of container).
EAST - Static variable in class java.awt.GridBagConstraints
Put the component on the right side of its display area, centered vertically.
EAST - Static variable in interface javax.swing.SwingConstants
Compass-direction east (right).
eastPane - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
echoCharIsSet() - Method in class java.awt.TextField
Indicates whether or not this text field has a character set for echoing.
echoCharIsSet() - Method in class javax.swing.JPasswordField
Returns true if this JPasswordField has a character set for echoing.
EDGE_NO_OP - Static variable in class java.awt.image.ConvolveOp
Pixels at the edge of the source image are copied to the corresponding pixels in the destination without modification.
EDGE_SPACING - Static variable in class javax.swing.border.TitledBorder
EDGE_ZERO_FILL - Static variable in class java.awt.image.ConvolveOp
Pixels at the edge of the destination image are set to zero.
editable - Variable in class javax.swing.JTree
Is the tree editable? Default is false.
EDITABLE - Static variable in class javax.accessibility.AccessibleState
Indicates the user can change the contents of this object.
EDITABLE_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for editable.
editablePropertyChanged(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
editCellAt(int, int) - Method in class javax.swing.JTable
Programmatically starts editing the cell at row and column, if the cell is editable.
editCellAt(int, int, EventObject) - Method in class javax.swing.JTable
Programmatically starts editing the cell at row and column, if the cell is editable.
editingCanceled(ChangeEvent) - Method in class javax.swing.JTable
Invoked when editing is canceled.
editingCanceled(ChangeEvent) - Method in class javax.swing.JTable.AccessibleJTable
Invoked when editing is canceled.
editingCanceled(ChangeEvent) - Method in interface javax.swing.event.CellEditorListener
This tells the listeners the editor has canceled editing
editingCanceled(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler
Messaged when editing has been canceled in the tree.
editingColumn - Variable in class javax.swing.JTable
Identifies the column of the cell being edited.
editingComponent - Variable in class javax.swing.tree.DefaultTreeCellEditor
Component used in editing, obtained from the editingContainer.
editingComponent - Variable in class javax.swing.plaf.basic.BasicTreeUI
When editing, this will be the Component that is doing the actual editing.
editingContainer - Variable in class javax.swing.tree.DefaultTreeCellEditor
Editing container, will contain the editorComponent.
editingIcon - Variable in class javax.swing.tree.DefaultTreeCellEditor
Icon to use when editing.
editingPath - Variable in class javax.swing.plaf.basic.BasicTreeUI
Path that is being edited.
editingRow - Variable in class javax.swing.JTable
Identifies the row of the cell being edited.
editingRow - Variable in class javax.swing.plaf.basic.BasicTreeUI
Row that is being edited.
editingStopped(ChangeEvent) - Method in class javax.swing.JTable
Invoked when editing is finished.
editingStopped(ChangeEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to a cell's contents.
editingStopped(ChangeEvent) - Method in interface javax.swing.event.CellEditorListener
This tells the listeners the editor has ended editing
editingStopped(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler
Messaged when editing has stopped in the tree.
editor - Variable in class javax.swing.JComboBox
editor - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
editor - Variable in class javax.swing.plaf.basic.BasicComboBoxEditor
editorBorderInsets - Static variable in class javax.swing.plaf.metal.MetalComboBoxEditor
editorBorderInsets - Variable in class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
editorComp - Variable in class javax.swing.JTable
If editing, the Component that is handling the editing.
editorComponent - Variable in class javax.swing.DefaultCellEditor
EditorContainer() - Method in class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
editorHasDifferentSize - Variable in class javax.swing.plaf.basic.BasicTreeUI
Set to true if the editor has a different size than the renderer.
EditorKit - class javax.swing.text.EditorKit.
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
EditorKit() - Constructor for class javax.swing.text.EditorKit
Construct an EditorKit.
edits - Variable in class javax.swing.undo.CompoundEdit
The collection of UndoableEdits undone/redone en masse by this CompoundEdit
editToBeRedone() - Method in class javax.swing.undo.UndoManager
Returns the the next significant edit to be redone if redo is called.
editToBeUndone() - Method in class javax.swing.undo.UndoManager
Returns the the next significant edit to be undone if undo is called.
element - Variable in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
Element - interface javax.swing.text.Element.
Interface to describe a structural piece of a document.
Element - class javax.swing.text.html.parser.Element.
An element as described in a DTD using the ELEMENT construct.
elementAt(int) - Method in class java.util.Vector
Returns the component at the specified index.
elementAt(int) - Method in class javax.swing.DefaultListModel
Returns the component at the specified index.
elementCount - Variable in class java.util.Vector
The number of valid components in this Vector object.
elementCountToTag(HTMLDocument, int, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
elementData - Variable in class java.util.Vector
The array buffer into which the components of the vector are stored.
elementHash - Variable in class javax.swing.text.html.parser.DTD
ElementIterator - class javax.swing.text.ElementIterator.
ElementIterator, as the name suggests, iteratates over the Element tree.
ElementIterator(Document) - Constructor for class javax.swing.text.ElementIterator
Creates a new ElementIterator.
ElementIterator(Element) - Constructor for class javax.swing.text.ElementIterator
Creates a new ElementIterator.
ElementNameAttribute - Static variable in class javax.swing.text.AbstractDocument
Name of the attribute used to specify element names.
elements - Variable in class javax.swing.text.html.parser.DTD
elements() - Method in class java.security.PermissionCollection
Returns an enumeration of all the Permission objects in the collection.
elements() - Method in class java.security.Permissions
Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.
elements() - Method in class java.util.Dictionary
Returns an enumeration of the values in this dictionary.
elements() - Method in class java.util.Hashtable
Returns an enumeration of the values in this hashtable.
elements() - Method in class java.util.Vector
Returns an enumeration of the components of this vector.
elements() - Method in class javax.swing.DefaultListModel
Returns an enumeration of the components of this list.
Ellipse2D - class java.awt.geom.Ellipse2D.
The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
Ellipse2D.Double - class java.awt.geom.Ellipse2D.Double.
The Double class defines an ellipse specified in double precision.
Ellipse2D.Double() - Constructor for class java.awt.geom.Ellipse2D.Double
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Ellipse2D.Double(double, double, double, double) - Constructor for class java.awt.geom.Ellipse2D.Double
Constructs and initializes an Ellipse2D from the specified coordinates.
Ellipse2D.Float - class java.awt.geom.Ellipse2D.Float.
The Float class defines an ellipse specified in float precision.
Ellipse2D.Float() - Constructor for class java.awt.geom.Ellipse2D.Float
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Ellipse2D.Float(float, float, float, float) - Constructor for class java.awt.geom.Ellipse2D.Float
Constructs and initializes an Ellipse2D from the specified coordinates.
Ellipse2D() - Constructor for class java.awt.geom.Ellipse2D
This is an abstract class that cannot be instantiated directly.
EM - Static variable in class javax.swing.text.html.HTML.Tag
EMPTY - Static variable in class javax.swing.text.SimpleAttributeSet
An empty attribute set.
EMPTY - Static variable in interface javax.swing.text.html.parser.DTDConstants
EMPTY_ENUMERATION - Static variable in class javax.swing.tree.DefaultMutableTreeNode
An enumeration that is always empty.
EMPTY_LIST - Static variable in class java.util.Collections
The empty list (immutable).
EMPTY_MAP - Static variable in class java.util.Collections
The empty map (immutable).
EMPTY_SET - Static variable in class java.util.Collections
The empty set (immutable).
empty() - Method in class java.util.Stack
Tests if this stack is empty.
empty() - Method in class javax.swing.text.html.parser.ContentModel
Return true if the content model could match an empty input stream.
EmptyBorder - class javax.swing.border.EmptyBorder.
A class which provides an empty, transparent border which takes up space but does no drawing.
EmptyBorder(Insets) - Constructor for class javax.swing.border.EmptyBorder
Creates an empty border with the specified insets.
EmptyBorder(int, int, int, int) - Constructor for class javax.swing.border.EmptyBorder
Creates an empty border with the specified insets.
EmptyStackException - exception java.util.EmptyStackException.
Thrown by methods in the Stack class to indicate that the stack is empty.
EmptyStackException() - Constructor for class java.util.EmptyStackException
Constructs a new EmptyStackException with null as its error message string.
emptyTag(Element) - Method in class javax.swing.text.html.HTMLWriter
Writes out all empty elements (all tags that have no corresponding end tag).
enable() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
enable() - Method in class java.awt.MenuItem
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
enable() - Static method in class java.lang.Compiler
Cause the Compiler to resume operation.
enable() - Method in class javax.swing.JComponent
overridden to ensure Accessibility support
enable(boolean) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
enable(boolean) - Method in class java.awt.MenuItem
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
enableActions() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
enableClientWindowNotification(InputMethod, boolean) - Method in interface java.awt.im.spi.InputMethodContext
Enables or disables notification of the current client window's location and state for the specified input method.
enabled - Variable in class javax.swing.AbstractAction
Specifies whether action is enabled; the default is true.
ENABLED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is enabled.
ENABLED - Static variable in class javax.swing.DefaultButtonModel
Indicates that the button can be selected by an input device (such as a mouse pointer).
enableEvents(long) - Method in class java.awt.Component
Enables the events defined by the specified event mask parameter to be delivered to this component.
enableEvents(long) - Method in class java.awt.MenuItem
Enables event delivery to this menu item for events to be defined by the specified event mask parameter
enableInputMethods(boolean) - Method in class java.awt.Component
Enables or disables input method support for this component.
enableInputMethods(boolean) - Method in class java.awt.TextComponent
enableReplaceObject(boolean) - Method in class java.io.ObjectOutputStream
Enable the stream to do replacement of objects in the stream.
enableResizedPosting() - Method in class javax.swing.table.TableColumn
Deprecated. as of Java 2 platform v1.3
enableResolveObject(boolean) - Method in class java.io.ObjectInputStream
Enable the stream to allow objects read from the stream to be replaced.
ENCLOSED_ALPHANUMERICS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ENCLOSED_CJK_LETTERS_AND_MONTHS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ENCLOSING_MARK - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
encode(OutputStream) - Method in interface java.security.Certificate
Deprecated. Encodes the certificate to an output stream in a format that can be decoded by the decode method.
encode(String) - Static method in class java.net.URLEncoder
Translates a string into x-www-form-urlencoded format.
encodeDataFlavor(DataFlavor) - Static method in class java.awt.datatransfer.SystemFlavorMap
EncodedKeySpec - class java.security.spec.EncodedKeySpec.
This class represents a public or private key in encoded format.
EncodedKeySpec(byte[]) - Constructor for class java.security.spec.EncodedKeySpec
Creates a new EncodedKeySpec with the given encoded key.
encodeJavaMIMEType(String) - Static method in class java.awt.datatransfer.SystemFlavorMap
encoding - Variable in class javax.sound.sampled.AudioFormat
The audio encoding technique used by this format.
ENCTYPE - Static variable in class javax.swing.text.html.HTML.Attribute
END - Static variable in class java.awt.Event
The End key, a non-ASCII action key.
END_OF_EXCLUSIVE - Static variable in class javax.sound.midi.ShortMessage
Status byte for End of System Exclusive message (0xF7, or 247).
END_PUNCTUATION - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
end() - Method in class java.awt.PrintJob
Ends the print job and does any necessary cleanup.
end() - Method in class java.util.zip.Deflater
Closes the compressor and discards any unprocessed input.
end() - Method in class java.util.zip.Inflater
Closes the decompressor and discards any unprocessed input.
end() - Method in class javax.swing.undo.CompoundEdit
Sets inProgress to false.
end() - Method in class javax.swing.undo.UndoManager
Sending end() to an UndoManager turns it into a plain old (ended) CompoundEdit.
end() - Method in class javax.swing.undo.StateEdit
Gets the post-edit state of the StateEditable object and ends the edit.
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to.
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction
end(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction
endAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of the document.
endComposition() - Method in class java.awt.im.InputContext
Ends any input composition that may currently be going on in this context.
endComposition() - Method in interface java.awt.im.spi.InputMethod
Ends any input composition that may currently be going on in this context.
endDraggingFrame(JComponent) - Method in interface javax.swing.DesktopManager
This method signals the end of the dragging session.
endDraggingFrame(JComponent) - Method in class javax.swing.DefaultDesktopManager
endFontTag() - Method in class javax.swing.text.html.MinimalHTMLWriter
This is no longer used, instead <span> will be written out.
endKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
endLineAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a line.
EndOfLineStringProperty - Static variable in class javax.swing.text.DefaultEditorKit
When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".
endParagraphAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a paragraph.
endResizingFrame(JComponent) - Method in interface javax.swing.DesktopManager
This method signals the end of the resize session.
endResizingFrame(JComponent) - Method in class javax.swing.DefaultDesktopManager
endsWith(Name) - Method in interface javax.naming.Name
Determines whether this name ends with a specified suffix.
endsWith(Name) - Method in class javax.naming.CompoundName
Determines whether a compound name is a suffix of this compound name.
endsWith(Name) - Method in class javax.naming.CompositeName
Determines whether a composite name is a suffix of this composite name.
endsWith(String) - Method in class java.lang.String
Tests if this string ends with the specified suffix.
ENDTAG - Static variable in class javax.swing.text.html.HTML.Attribute
ENDTAG - Static variable in interface javax.swing.text.html.parser.DTDConstants
endTag(boolean) - Method in class javax.swing.text.html.parser.Parser
Handle an end tag.
endTag(Element) - Method in class javax.swing.text.html.HTMLWriter
Writes out an end tag for the element.
EndTagType - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getType.
endUpdate() - Method in class javax.swing.undo.UndoableEditSupport
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
endWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a word.
engineAliases() - Method in class java.security.KeyStoreSpi
Lists all the alias names of this keystore.
engineContainsAlias(String) - Method in class java.security.KeyStoreSpi
Checks if the given alias exists in this keystore.
engineDeleteEntry(String) - Method in class java.security.KeyStoreSpi
Deletes the entry identified by the given alias from this keystore.
engineDigest() - Method in class java.security.MessageDigestSpi
Completes the hash computation by performing final operations such as padding.
engineDigest(byte[], int, int) - Method in class java.security.MessageDigestSpi
Completes the hash computation by performing final operations such as padding.
engineGenerateCertificate(InputStream) - Method in class java.security.cert.CertificateFactorySpi
Generates a certificate object and initializes it with the data read from the input stream inStream.
engineGenerateCertificates(InputStream) - Method in class java.security.cert.CertificateFactorySpi
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
engineGenerateCRL(InputStream) - Method in class java.security.cert.CertificateFactorySpi
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
engineGenerateCRLs(InputStream) - Method in class java.security.cert.CertificateFactorySpi
Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
engineGenerateParameters() - Method in class java.security.AlgorithmParameterGeneratorSpi
Generates the parameters.
engineGeneratePrivate(KeySpec) - Method in class java.security.KeyFactorySpi
Generates a private key object from the provided key specification (key material).
engineGeneratePublic(KeySpec) - Method in class java.security.KeyFactorySpi
Generates a public key object from the provided key specification (key material).
engineGenerateSeed(int) - Method in class java.security.SecureRandomSpi
Returns the given number of seed bytes.
engineGetCertificate(String) - Method in class java.security.KeyStoreSpi
Returns the certificate associated with the given alias.
engineGetCertificateAlias(Certificate) - Method in class java.security.KeyStoreSpi
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
engineGetCertificateChain(String) - Method in class java.security.KeyStoreSpi
Returns the certificate chain associated with the given alias.
engineGetCreationDate(String) - Method in class java.security.KeyStoreSpi
Returns the creation date of the entry identified by the given alias.
engineGetDigestLength() - Method in class java.security.MessageDigestSpi
Returns the digest length in bytes.
engineGetEncoded() - Method in class java.security.AlgorithmParametersSpi
Returns the parameters in their primary encoding format.
engineGetEncoded(String) - Method in class java.security.AlgorithmParametersSpi
Returns the parameters encoded in the specified format.
engineGetKey(String, char[]) - Method in class java.security.KeyStoreSpi
Returns the key associated with the given alias, using the given password to recover it.
engineGetKeySpec(Key, Class) - Method in class java.security.KeyFactorySpi
Returns a specification (key material) of the given key object.
engineGetParameter(String) - Method in class java.security.SignatureSpi
Deprecated.
engineGetParameterSpec(Class) - Method in class java.security.AlgorithmParametersSpi
Returns a (transparent) specification of this parameters object.
engineInit(AlgorithmParameterSpec) - Method in class java.security.AlgorithmParametersSpi
Initializes this parameters object using the parameters specified in paramSpec.
engineInit(AlgorithmParameterSpec, SecureRandom) - Method in class java.security.AlgorithmParameterGeneratorSpi
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
engineInit(byte[]) - Method in class java.security.AlgorithmParametersSpi
Imports the specified parameters and decodes them according to the primary decoding format for parameters.
engineInit(byte[], String) - Method in class java.security.AlgorithmParametersSpi
Imports the parameters from params and decodes them according to the specified decoding format.
engineInit(int, SecureRandom) - Method in class java.security.AlgorithmParameterGeneratorSpi
Initializes this parameter generator for a certain size and source of randomness.
engineInitSign(PrivateKey) - Method in class java.security.SignatureSpi
Initializes this signature object with the specified private key for signing operations.
engineInitSign(PrivateKey, SecureRandom) - Method in class java.security.SignatureSpi
Initializes this signature object with the specified private key and source of randomness for signing operations.
engineInitVerify(PublicKey) - Method in class java.security.SignatureSpi
Initializes this signature object with the specified public key for verification operations.
engineIsCertificateEntry(String) - Method in class java.security.KeyStoreSpi
Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
engineIsKeyEntry(String) - Method in class java.security.KeyStoreSpi
Returns true if the entry identified by the given alias is a key entry, and false otherwise.
engineLoad(InputStream, char[]) - Method in class java.security.KeyStoreSpi
Loads the keystore from the given input stream.
engineNextBytes(byte[]) - Method in class java.security.SecureRandomSpi
Generates a user-specified number of random bytes.
engineReset() - Method in class java.security.MessageDigestSpi
Resets the digest for further use.
engineSetCertificateEntry(String, Certificate) - Method in class java.security.KeyStoreSpi
Assigns the given certificate to the given alias.
engineSetKeyEntry(String, byte[], Certificate[]) - Method in class java.security.KeyStoreSpi
Assigns the given key (that has already been protected) to the given alias.
engineSetKeyEntry(String, Key, char[], Certificate[]) - Method in class java.security.KeyStoreSpi
Assigns the given key to the given alias, protecting it with the given password.
engineSetParameter(AlgorithmParameterSpec) - Method in class java.security.SignatureSpi
Initializes this signature engine with the specified parameter set.
engineSetParameter(String, Object) - Method in class java.security.SignatureSpi
Deprecated. Replaced by engineSetParameter.
engineSetSeed(byte[]) - Method in class java.security.SecureRandomSpi
Reseeds this random object.
engineSign() - Method in class java.security.SignatureSpi
Returns the signature bytes of all the data updated so far.
engineSign(byte[], int, int) - Method in class java.security.SignatureSpi
Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
engineSize() - Method in class java.security.KeyStoreSpi
Retrieves the number of entries in this keystore.
engineStore(OutputStream, char[]) - Method in class java.security.KeyStoreSpi
Stores this keystore to the given output stream, and protects its integrity with the given password.
engineToString() - Method in class java.security.AlgorithmParametersSpi
Returns a formatted string describing the parameters.
engineTranslateKey(Key) - Method in class java.security.KeyFactorySpi
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
engineUpdate(byte) - Method in class java.security.MessageDigestSpi
Updates the digest using the specified byte.
engineUpdate(byte) - Method in class java.security.SignatureSpi
Updates the data to be signed or verified using the specified byte.
engineUpdate(byte[], int, int) - Method in class java.security.MessageDigestSpi
Updates the digest using the specified array of bytes, starting at the specified offset.
engineUpdate(byte[], int, int) - Method in class java.security.SignatureSpi
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
engineVerify(byte[]) - Method in class java.security.SignatureSpi
Verifies the passed-in signature.
ENGLISH - Static variable in class java.util.Locale
Useful constant for language.
enqueue() - Method in class java.lang.ref.Reference
Adds this reference object to the queue with which it is registered, if any.
ensureCapacity(int) - Method in class java.lang.StringBuffer
Ensures that the capacity of the buffer is at least equal to the specified minimum.
ensureCapacity(int) - Method in class java.util.Vector
Increases the capacity of this vector, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
ensureCapacity(int) - Method in class java.util.ArrayList
Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
ensureCapacity(int) - Method in class javax.swing.DefaultListModel
Increases the capacity of this list, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
ensureFileIsVisible(File) - Method in class javax.swing.JFileChooser
Makes sure that the specified file is viewable, and not hidden.
ensureFileIsVisible(JFileChooser, File) - Method in class javax.swing.plaf.FileChooserUI
ensureFileIsVisible(JFileChooser, File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
ensureFileIsVisible(JFileChooser, File) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
ensureFileIsVisible(JFileChooser, File) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call ensureFileIsVisible on each UI handled by this MultiUI.
ensureIndexIsVisible(int) - Method in class javax.swing.JList
Scrolls the viewport to make the specified cell completely visible.
ensureRowsAreVisible(int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Ensures that the rows identified by beginRow through endRow are visible.
ENTER - Static variable in class java.awt.Event
The Enter key.
ENTER - Static variable in class java.awt.dnd.DragSourceContext
An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.
ENTERED - Static variable in class javax.swing.event.HyperlinkEvent.EventType
Entered type.
ENTITIES - Static variable in interface javax.swing.text.html.parser.DTDConstants
Entity - class javax.swing.text.html.parser.Entity.
An entity in as described in a DTD using the ENTITY construct.
ENTITY - Static variable in interface javax.swing.text.html.parser.DTDConstants
Entity(String, int, char[]) - Constructor for class javax.swing.text.html.parser.Entity
Create an entity.
entityHash - Variable in class javax.swing.text.html.parser.DTD
entries() - Method in interface java.security.acl.Acl
Returns an enumeration of the entries in this ACL.
entries() - Method in class java.util.jar.JarFile
Returns an enumeration of the ZIP file entries.
entries() - Method in class java.util.zip.ZipFile
Returns an enumeration of the ZIP file entries.
entrySet() - Method in class java.awt.RenderingHints
Returns a Set view of the mappings contained in this RenderingHints.
entrySet() - Method in class java.security.Provider
Returns an unmodifiable Set view of the property entries contained in this Provider.
entrySet() - Method in class java.util.Hashtable
Returns a Set view of the entries contained in this Hashtable.
entrySet() - Method in class java.util.AbstractMap
Returns a set view of the mappings contained in this map.
entrySet() - Method in class java.util.WeakHashMap
Returns a Set view of the mappings in this map.
entrySet() - Method in class java.util.TreeMap
Returns a set view of the mappings contained in this map.
entrySet() - Method in class java.util.HashMap
Returns a collection view of the mappings contained in this map.
entrySet() - Method in interface java.util.Map
Returns a set view of the mappings contained in this map.
entrySet() - Method in class java.util.jar.Attributes
Returns a Collection view of the attribute name-value mappings contained in this Map.
EnumControl - class javax.sound.sampled.EnumControl.
A EnumControl provides control over a set of discrete possible values, each represented by an object.
EnumControl.Type - class javax.sound.sampled.EnumControl.Type.
An instance of the EnumControl.Type inner class identifies one kind of enumerated control.
EnumControl.Type(String) - Constructor for class javax.sound.sampled.EnumControl.Type
Constructs a new enumerated control type.
EnumControl(EnumControl.Type, Object[], Object) - Constructor for class javax.sound.sampled.EnumControl
Constructs a new enumerated control object with the given parameters.
enumerate(Thread[]) - Method in class java.lang.ThreadGroup
Copies into the specified array every active thread in this thread group and its subgroups.
enumerate(Thread[]) - Static method in class java.lang.Thread
Copies into the specified array every active thread in this thread's thread group and its subgroups.
enumerate(Thread[], boolean) - Method in class java.lang.ThreadGroup
Copies into the specified array every active thread in this thread group.
enumerate(ThreadGroup[]) - Method in class java.lang.ThreadGroup
Copies into the specified array references to every active subgroup in this thread group.
enumerate(ThreadGroup[], boolean) - Method in class java.lang.ThreadGroup
Copies into the specified array references to every active subgroup in this thread group.
Enumeration - interface java.util.Enumeration.
An object that implements the Enumeration interface generates a series of elements, one at a time.
enumeration(Collection) - Static method in class java.util.Collections
Returns an enumeration over the specified collection.
ENV_10 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_NUMBER_10_ENVELOPE.
ENV_10X13 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_10X13_ENVELOPE.
ENV_10X14 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_10X14_ENVELOPE.
ENV_10X15 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_10X15_ENVELOPE.
ENV_11 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_NUMBER_11_ENVELOPE.
ENV_12 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_NUMBER_12_ENVELOPE.
ENV_14 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_NUMBER_14_ENVELOPE.
ENV_6X9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_6X9_ENVELOPE.
ENV_7X9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_7X9_ENVELOPE.
ENV_9 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_NUMBER_9_ENVELOPE.
ENV_9X11 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_9X11_ENVELOPE.
ENV_9X12 - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_9X12_ENVELOPE.
ENV_INVITE - Static variable in class java.awt.PageAttributes.MediaType
An alias for INVITE_ENVELOPE.
ENV_ITALY - Static variable in class java.awt.PageAttributes.MediaType
An alias for ITALY_ENVELOPE.
ENV_MONARCH - Static variable in class java.awt.PageAttributes.MediaType
An alias for MONARCH_ENVELOPE.
ENV_PERSONAL - Static variable in class java.awt.PageAttributes.MediaType
An alias for PERSONAL_ENVELOPE.
env() - Method in class org.omg.CORBA.Request
Retrieves the Environment object for this request.
environment - Variable in class javax.naming.CannotProceedException
Contains the environment relevant for the Context or DirContext method that cannot proceed.
Environment - class org.omg.CORBA.Environment.
A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
Environment() - Constructor for class org.omg.CORBA.Environment
eof - Variable in class java.io.OptionalDataException
True if there is no more data in the buffered part of the stream.
EOFException - exception java.io.EOFException.
Signals that an end of file or end of stream has been reached unexpectedly during input.
EOFException() - Constructor for class java.io.EOFException
Constructs an EOFException with null as its error detail message.
EOFException(String) - Constructor for class java.io.EOFException
Constructs an EOFException with the specified detail message.
eolIsSignificant(boolean) - Method in class java.io.StreamTokenizer
Determines whether or not ends of line are treated as tokens.
eos - Variable in class java.util.zip.GZIPInputStream
Indicates end of input stream.
equal(Any) - Method in class org.omg.CORBA.Any
Checks for equality between this Any object and the given Any object.
equal(TypeCode) - Method in class org.omg.CORBA.TypeCode
Compares this TypeCode object with the given one, testing for equality.
equals(Area) - Method in class java.awt.geom.Area
Tests whether the geometries of the two Area objects are equal.
equals(boolean[], boolean[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of equals are equal to one another.
equals(byte[], byte[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of bytes are equal to one another.
equals(char[], char[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of chars are equal to one another.
equals(DataFlavor) - Method in class java.awt.datatransfer.DataFlavor
Two DataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal.
equals(double[], double[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of doubles are equal to one another.
equals(float[], float[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of floats are equal to one another.
equals(GlyphVector) - Method in class java.awt.font.GlyphVector
Tests if the specified GlyphVector exactly equals this GlyphVector.
equals(ImageGraphicAttribute) - Method in class java.awt.font.ImageGraphicAttribute
Compares this ImageGraphicAttribute to the specified ImageGraphicAttribute.
equals(int[], int[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of ints are equal to one another.
equals(long[], long[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of longs are equal to one another.
equals(MenuShortcut) - Method in class java.awt.MenuShortcut
Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
equals(Object) - Method in class java.awt.MenuShortcut
Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
equals(Object) - Method in class java.awt.Insets
Checks whether two insets objects are equal.
equals(Object) - Method in class java.awt.Font
Compares this Font object to the specified Object.
equals(Object) - Method in class java.awt.RenderingHints
Compares the specified Object with this RenderingHints for equality.
equals(Object) - Method in class java.awt.RenderingHints.Key
The equals method for all Key objects will return the same result as the equality operator '=='.
equals(Object) - Method in class java.awt.Point
Determines whether an instance of Point2D is equal to this point.
equals(Object) - Method in class java.awt.Color
Determines whether another object is equal to this Color.
equals(Object) - Method in class java.awt.Dimension
Checks whether two dimension objects have equal values.
equals(Object) - Method in class java.awt.BasicStroke
Tests if a specified object is equal to this BasicStroke by first testing if it is a BasicStroke and then comparing its width, join, cap, miter limit, dash, and dash phase attributes with those of this BasicStroke.
equals(Object) - Method in class java.awt.PageAttributes
Determines whether two PageAttributes are equal to each other.
equals(Object) - Method in class java.awt.JobAttributes
Determines whether two JobAttributes are equal to each other.
equals(Object) - Method in class java.awt.AlphaComposite
Tests if the specified Object is equal to this AlphaComposite object.
equals(Object) - Method in class java.awt.Rectangle
Checks whether two rectangles are equal.
equals(Object) - Method in class java.awt.datatransfer.DataFlavor
If the object is an instance of DataFlavor, representationClass and MIME type will be compared.
equals(Object) - Method in class java.awt.font.TextLayout
Returns true if the specified Object is a TextLayout object and if the specified Object equals this TextLayout.
equals(Object) - Method in class java.awt.font.ImageGraphicAttribute
Compares this ImageGraphicAttribute to the specified Object.
equals(Object) - Method in class java.awt.font.TextHitInfo
Returns true if the specified Object is a TextHitInfo and equals this TextHitInfo.
equals(Object) - Method in class java.awt.font.ShapeGraphicAttribute
Compares this ShapeGraphicAttribute to the specified Object.
equals(Object) - Method in class java.awt.geom.Point2D
Determines whether or not two points are equal.
equals(Object) - Method in class java.awt.geom.Rectangle2D
Determines whether or not the specified Object is equal to this Rectangle2D.
equals(Object) - Method in class java.awt.geom.AffineTransform
Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
equals(Object) - Method in class java.awt.image.ColorModel
Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.
equals(Object) - Method in class java.awt.image.PackedColorModel
Tests if the specified Object is an instance of PackedColorModel and equals this PackedColorModel.
equals(Object) - Method in class java.awt.image.ComponentColorModel
Compares this color model with another for equality.
equals(Object) - Method in class java.io.FilePermission
Checks two FilePermission objects for equality.
equals(Object) - Method in class java.io.File
Tests this abstract pathname for equality with the given object.
equals(Object) - Method in class java.lang.Object
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in class java.lang.Character
Compares this object against the specified object.
equals(Object) - Method in class java.lang.Character.Subset
Compares two Subset objects for equality.
equals(Object) - Method in class java.lang.Long
Compares this object against the specified object.
equals(Object) - Method in class java.lang.Short
Compares this object to the specified object.
equals(Object) - Method in class java.lang.String
Compares this string to the specified object.
equals(Object) - Method in class java.lang.Float
Compares this object against some other object.
equals(Object) - Method in class java.lang.Integer
Compares this object to the specified object.
equals(Object) - Method in class java.lang.Byte
Compares this object to the specified object.
equals(Object) - Method in class java.lang.Double
Compares this object against the specified object.
equals(Object) - Method in class java.lang.Boolean
Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
equals(Object) - Method in class java.lang.reflect.Method
Compares this Method against the specified object.
equals(Object) - Method in class java.lang.reflect.Field
Compares this Field against the specified object.
equals(Object) - Method in class java.lang.reflect.Constructor
Compares this Constructor against the specified object.
equals(Object) - Method in class java.math.BigInteger
Compares this BigInteger with the specified Object for equality.
equals(Object) - Method in class java.math.BigDecimal
Compares this BigDecimal with the specified Object for equality.
equals(Object) - Method in class java.net.URL
Compares two URLs.
equals(Object) - Method in class java.net.SocketPermission
Checks two SocketPermission objects for equality.
equals(Object) - Method in class java.net.InetAddress
Compares this object against the specified object.
equals(Object) - Method in class java.rmi.MarshalledObject
Compares this MarshalledObject to another object.
equals(Object) - Method in class java.rmi.activation.ActivationGroupDesc
Compares two activation group descriptors for content equality.
equals(Object) - Method in class java.rmi.activation.ActivationGroupDesc.CommandEnvironment
Compares two command environments for content equality.
equals(Object) - Method in class java.rmi.activation.ActivationDesc
Compares two activation descriptors for content equality.
equals(Object) - Method in class java.rmi.activation.ActivationGroupID
Compares two group identifiers for content equality.
equals(Object) - Method in class java.rmi.activation.ActivationID
Compares two activation ids for content equality.
equals(Object) - Method in class java.rmi.dgc.VMID
Compare this VMID to another, and return true if they are the same identifier.
equals(Object) - Method in class java.rmi.server.RemoteObject
Compares two remote objects for equality.
equals(Object) - Method in class java.rmi.server.UID
Compares two UIDs for content equality.
equals(Object) - Method in class java.rmi.server.ObjID
Two object identifiers are considered equal if they have the same contents.
equals(Object) - Method in class java.security.Permission
Checks two Permission objects for equality.
equals(Object) - Method in class java.security.BasicPermission
Checks two BasicPermission objects for equality.
equals(Object) - Method in class java.security.CodeSource
Tests for equality between the specified object and this object.
equals(Object) - Method in class java.security.UnresolvedPermission
Checks two UnresolvedPermission objects for equality.
equals(Object) - Method in class java.security.Identity
Deprecated. Tests for equality between the specified object and this identity.
equals(Object) - Method in class java.security.AccessControlContext
Checks two AccessControlContext objects for equality.
equals(Object) - Method in class java.security.AllPermission
Checks two AllPermission objects for equality.
equals(Object) - Method in interface java.security.Principal
Compares this principal to the specified object.
equals(Object) - Method in interface java.security.acl.Permission
Returns true if the object passed matches the permission represented in this interface.
equals(Object) - Method in class java.security.cert.Certificate
Compares this certificate for equality with the specified object.
equals(Object) - Method in class java.security.cert.X509CRLEntry
Compares this CRL entry for equality with the given object.
equals(Object) - Method in class java.security.cert.X509CRL
Compares this CRL for equality with the given object.
equals(Object) - Method in class java.sql.Timestamp
Tests to see if this Timestamp object is equal to the given object.
equals(Object) - Method in class java.text.AttributedCharacterIterator.Attribute
Compares two objects for equality.
equals(Object) - Method in class java.text.NumberFormat
Overrides equals
equals(Object) - Method in class java.text.ChoiceFormat
Equality comparision between two
equals(Object) - Method in class java.text.ParsePosition
Overrides equals
equals(Object) - Method in class java.text.Collator
Compares the equality of two Collators.
equals(Object) - Method in class java.text.RuleBasedCollator
Compares the equality of two collation objects.
equals(Object) - Method in class java.text.DateFormat
Overrides equals
equals(Object) - Method in class java.text.CollationKey
Compare this CollationKey and the target CollationKey for equality.
equals(Object) - Method in class java.text.StringCharacterIterator
Compares the equality of two StringCharacterIterator objects.
equals(Object) - Method in class java.text.SimpleDateFormat
Override equals.
equals(Object) - Method in class java.text.FieldPosition
Overrides equals
equals(Object) - Method in class java.text.DateFormatSymbols
Override equals
equals(Object) - Method in class java.text.DecimalFormat
Overrides equals
equals(Object) - Method in class java.text.DecimalFormatSymbols
Override equals.
equals(Object) - Method in class java.text.MessageFormat
Equality comparision between two message format objects
equals(Object) - Method in class java.util.Hashtable
Compares the specified Object with this Map for equality, as per the definition in the Map interface.
equals(Object) - Method in class java.util.Date
Compares two dates for equality.
equals(Object) - Method in class java.util.BitSet
Compares this object against the specified object.
equals(Object) - Method in class java.util.AbstractSet
Compares the specified object with this set for equality.
equals(Object) - Method in class java.util.AbstractMap
Compares the specified object with this map for equality.
equals(Object) - Method in class java.util.AbstractList
Compares the specified object with this list for equality.
equals(Object) - Method in class java.util.Vector
Compares the specified Object with this Vector for equality.
equals(Object) - Method in class java.util.PropertyPermission
Checks two PropertyPermission objects for equality.
equals(Object) - Method in interface java.util.Collection
Compares the specified object with this collection for equality.
equals(Object) - Method in class java.util.SimpleTimeZone
Compares the equality of two SimpleTimeZone objects.
equals(Object) - Method in interface java.util.Comparator
Indicates whether some other object is "equal to" this Comparator.
equals(Object) - Method in class java.util.Calendar
Compares this calendar to the specified object.
equals(Object) - Method in class java.util.GregorianCalendar
Compares this GregorianCalendar to an object reference.
equals(Object) - Method in interface java.util.Set
Compares the specified object with this set for equality.
equals(Object) - Method in interface java.util.List
Compares the specified object with this list for equality.
equals(Object) - Method in class java.util.Locale
Returns true if this Locale is equal to another object.
equals(Object) - Method in interface java.util.Map
Compares the specified object with this map for equality.
equals(Object) - Method in interface java.util.Map.Entry
Compares the specified object with this entry for equality.
equals(Object) - Method in class java.util.jar.Attributes
Compares the specified Attributes object with this Map for equality.
equals(Object) - Method in class java.util.jar.Attributes.Name
Compares this attribute name to another for equality.
equals(Object) - Method in class java.util.jar.Manifest
Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
equals(Object) - Method in class javax.sound.sampled.Control.Type
Finalizes the equals method
equals(Object) - Method in class javax.sound.sampled.Mixer.Info
Indicates whether two info objects are equal, returning true if they are identical.
equals(Object) - Method in class javax.sound.sampled.AudioFileFormat.Type
Finalizes the equals method
equals(Object) - Method in class javax.sound.sampled.LineEvent.Type
Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
equals(Object) - Method in class javax.sound.sampled.AudioFormat.Encoding
Finalizes the equals method
equals(Object) - Method in class javax.sound.sampled.ReverbType
Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
equals(Object) - Method in class javax.sound.sampled.Port.Info
Finalizes the equals method
equals(Object) - Method in class javax.sound.midi.MidiDevice.Info
Reports whether two objects are equal.
equals(Object) - Method in class javax.sound.midi.Sequencer.SyncMode
Determines whether two objects are equal.
equals(Object) - Method in class javax.naming.Reference
Determines whether obj is a reference with the same addresses (in same order) as this reference.
equals(Object) - Method in class javax.naming.RefAddr
Determines whether obj is equal to this RefAddr.
equals(Object) - Method in class javax.naming.BinaryRefAddr
Determines whether obj is equal to this address.
equals(Object) - Method in class javax.naming.CompoundName
Determines whether obj is syntactically equal to this compound name.
equals(Object) - Method in class javax.naming.CompositeName
Determines whether two composite names are equal.
equals(Object) - Method in class javax.naming.directory.BasicAttribute
Determines whether obj is equal to this attribute.
equals(Object) - Method in class javax.naming.directory.BasicAttributes
Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes.
equals(Object) - Method in class javax.rmi.CORBA.Stub
Compares two stubs for equality.
equals(Object) - Method in class javax.swing.KeyStroke
Returns true if this object is identical to the specified object.
equals(Object) - Method in class javax.swing.text.SimpleAttributeSet
Compares this object to the specifed object.
equals(Object) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Compares this object to the specifed object.
equals(Object) - Method in class javax.swing.text.DefaultCaret
Compares this object to the specifed object.
equals(Object) - Method in class javax.swing.text.TabStop
Returns true if other equals the receiver.
equals(Object) - Method in class javax.swing.text.html.HTML.UnknownTag
Compares this object to the specifed object.
equals(Object) - Method in class javax.swing.tree.TreePath
Tests two TreePaths for equality by checking each element of the paths for equality.
equals(Object) - Method in class org.omg.CORBA.portable.ObjectImpl
Compares this ObjectImpl object with the given one for equality.
equals(Object[], Object[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of Objects are equal to one another.
equals(Object, Object) - Method in class org.omg.CORBA.portable.Delegate
Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
equals(ShapeGraphicAttribute) - Method in class java.awt.font.ShapeGraphicAttribute
Compares this ShapeGraphicAttribute to the specified ShapeGraphicAttribute.
equals(short[], short[]) - Static method in class java.util.Arrays
Returns true if the two specified arrays of shorts are equal to one another.
equals(String) - Method in class java.awt.datatransfer.DataFlavor
Deprecated. As inconsistent with hashCode() contract, use isMimeTypeEqual(String) instead.
equals(String, String) - Method in class java.text.Collator
Convenience method for comparing the equality of two strings based on this Collator's collation rules.
equals(Stub, Object) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.equals(java.lang.Object).
equals(TextHitInfo) - Method in class java.awt.font.TextHitInfo
Returns true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo.
equals(TextLayout) - Method in class java.awt.font.TextLayout
Returns true if the two layouts are equal.
equals(Timestamp) - Method in class java.sql.Timestamp
Tests to see if this Timestamp object is equal to the given Timestamp object.
equals(URL, URL) - Method in class java.net.URLStreamHandler
Provides the default equals calculation.
equalsIgnoreCase(String) - Method in class java.lang.String
Compares this String to another String, ignoring case considerations.
equivalent(TypeCode) - Method in class org.omg.CORBA.TypeCode
Tests to see if the given TypeCode object is equivalent to this TypeCode object.
ERA - Static variable in class java.util.Calendar
Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar.
ERA_FIELD - Static variable in class java.text.DateFormat
Useful constant for ERA field alignment.
err - Static variable in class java.io.FileDescriptor
A handle to the standard error stream.
err - Static variable in class java.lang.System
The "standard" error output stream.
Error - error java.lang.Error.
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
ERROR - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
ERROR_MESSAGE - Static variable in class javax.swing.JOptionPane
Used for error messages.
ERROR_OPTION - Static variable in class javax.swing.JFileChooser
Return value if an error occured.
Error() - Constructor for class java.lang.Error
Constructs an Error with no specified detail message.
error(String) - Method in class javax.swing.text.html.parser.Parser
Error(String) - Constructor for class java.lang.Error
Constructs an Error with the specified detail message.
error(String, String) - Method in class javax.swing.text.html.parser.Parser
error(String, String, String) - Method in class javax.swing.text.html.parser.Parser
error(String, String, String, String) - Method in class javax.swing.text.html.parser.Parser
Invoke the error handler.
ERRORED - Static variable in class java.awt.MediaTracker
Flag indicating that the downloading of some media encountered an error.
ESCAPE - Static variable in class java.awt.Event
The Escape key.
EtchedBorder - class javax.swing.border.EtchedBorder.
A class which implements a simple etched border which can either be etched-in or etched-out.
EtchedBorder() - Constructor for class javax.swing.border.EtchedBorder
Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedBorder(Color, Color) - Constructor for class javax.swing.border.EtchedBorder
Creates a lowered etched border with the specified highlight and shadow colors.
EtchedBorder(int) - Constructor for class javax.swing.border.EtchedBorder
Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedBorder(int, Color, Color) - Constructor for class javax.swing.border.EtchedBorder
Creates an etched border with the specified etch-type, highlight and shadow colors.
etchType - Variable in class javax.swing.border.EtchedBorder
event - Variable in class javax.swing.tree.ExpandVetoException
The event that the exception was created for.
Event - class java.awt.Event.
Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model.
Event(Object, int, Object) - Constructor for class java.awt.Event
Creates an instance of Event with the specified target component, event type, and argument.
Event(Object, long, int, int, int, int, int) - Constructor for class java.awt.Event
Creates an instance of Event, with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and an argument set to null.
Event(Object, long, int, int, int, int, int, Object) - Constructor for class java.awt.Event
Creates an instance of Event with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and argument.
EventContext - interface javax.naming.event.EventContext.
Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.
EventDirContext - interface javax.naming.event.EventDirContext.
Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.
eventDispatched(AWTEvent) - Method in interface java.awt.event.AWTEventListener
Invoked when an event is dispatched in the AWT.
EventListener - interface java.util.EventListener.
A tagging interface that all event listener interfaces must extend.
EventListenerList - class javax.swing.event.EventListenerList.
A class that holds a list of EventListeners.
EventListenerList() - Constructor for class javax.swing.event.EventListenerList
EventObject - class java.util.EventObject.
The root class from which all event state objects shall be derived.
EventObject(Object) - Constructor for class java.util.EventObject
Constructs a prototypical Event.
EventQueue - class java.awt.EventQueue.
EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.
EventQueue() - Constructor for class java.awt.EventQueue
events - Variable in class java.awt.dnd.DragGestureRecognizer
The list of events (in order) that the DragGestureRecognizer "recognized" as a "gesture" that triggers a drag.
events - Variable in class javax.sound.midi.Track
The list of MidiEvents contained in this track.
EventSetDescriptor - class java.beans.EventSetDescriptor.
An EventSetDescriptor describes a group of events that a given Java bean fires.
EventSetDescriptor(Class, String, Class, String) - Constructor for class java.beans.EventSetDescriptor
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
EventSetDescriptor(Class, String, Class, String[], String, String) - Constructor for class java.beans.EventSetDescriptor
This constructor creates an EventSetDescriptor from scratch using string names.
EventSetDescriptor(String, Class, Method[], Method, Method) - Constructor for class java.beans.EventSetDescriptor
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String, Class, MethodDescriptor[], Method, Method) - Constructor for class java.beans.EventSetDescriptor
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
evt - Variable in class java.awt.Event
The next event.
ExcellentBreakWeight - Static variable in class javax.swing.text.View
The weight to indicate a view supports breaking, and this represents a very attractive place to break.
except - Variable in class org.omg.CORBA.UnknownUserException
The Any instance that contains the actual user exception thrown by the server.
except(Any) - Method in class org.omg.CORBA.ServerRequest
Deprecated. use set_exception()
Exception - exception java.lang.Exception.
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
exception() - Method in class org.omg.CORBA.Environment
Retrieves the exception in this Environment object.
Exception() - Constructor for class java.lang.Exception
Constructs an Exception with no specified detail message.
exception(Exception) - Method in class org.omg.CORBA.Environment
Inserts the given exception into this Environment object.
Exception(String) - Constructor for class java.lang.Exception
Constructs an Exception with the specified detail message.
ExceptionInInitializerError - error java.lang.ExceptionInInitializerError.
Signals that an unexpected exception has occurred in a static initializer.
ExceptionInInitializerError() - Constructor for class java.lang.ExceptionInInitializerError
Constructs an ExceptionInInitializerError with null as its detail message string and with no saved thowable object.
ExceptionInInitializerError(String) - Constructor for class java.lang.ExceptionInInitializerError
Constructs an ExceptionInInitializerError with the specified detail message string.
ExceptionInInitializerError(Throwable) - Constructor for class java.lang.ExceptionInInitializerError
Constructs a new ExceptionInInitializerError class by saving a reference to the Throwable object thrown for later retrieval by the ExceptionInInitializerError.getException() method.
ExceptionList - class org.omg.CORBA.ExceptionList.
An object used in Request operations to describe the exceptions that can be thrown by a method.
ExceptionList() - Constructor for class org.omg.CORBA.ExceptionList
exceptions() - Method in class org.omg.CORBA.Request
Retrieves the ExceptionList object for this request.
exclusions - Variable in class javax.swing.text.html.parser.Element
exclusiveOr(Area) - Method in class java.awt.geom.Area
Sets the shape of this Area to be the combined area of its current shape and the shape of the specified Area, minus their intersection.
exec(String) - Method in class java.lang.Runtime
Executes the specified string command in a separate process.
exec(String[]) - Method in class java.lang.Runtime
Executes the specified command and arguments in a separate process.
exec(String[], String[]) - Method in class java.lang.Runtime
Executes the specified command and arguments in a separate process with the specified environment.
exec(String[], String[], File) - Method in class java.lang.Runtime
Executes the specified command and arguments in a separate process with the specified environment and working directory.
exec(String, String[]) - Method in class java.lang.Runtime
Executes the specified string command in a separate process with the specified environment.
exec(String, String[], File) - Method in class java.lang.Runtime
Executes the specified string command in a separate process with the specified environment and working directory.
execute() - Method in interface java.sql.PreparedStatement
Executes any kind of SQL statement.
execute(String) - Method in interface java.sql.Statement
Executes an SQL statement that may return multiple results.
executeBatch() - Method in interface java.sql.Statement
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
executeCall() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
executeQuery() - Method in interface java.sql.PreparedStatement
Executes the SQL query in this PreparedStatement object and returns the result set generated by the query.
executeQuery(String) - Method in interface java.sql.Statement
Executes an SQL statement that returns a single ResultSet object.
executeUpdate() - Method in interface java.sql.PreparedStatement
Executes the SQL INSERT, UPDATE or DELETE statement in this PreparedStatement object.
executeUpdate(String) - Method in interface java.sql.Statement
Executes an SQL INSERT, UPDATE or DELETE statement.
EXECUTIVE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Executive, 7 1/4 x 10 1/2 in.
exists() - Method in class java.io.File
Tests whether the file denoted by this abstract pathname exists.
EXIT_ON_CLOSE - Static variable in class javax.swing.JFrame
The exit application default window close operation.
exit(int) - Static method in class java.lang.System
Terminates the currently running Java Virtual Machine.
exit(int) - Method in class java.lang.Runtime
Terminates the currently running Java virtual machine by initiating its shutdown sequence.
EXITED - Static variable in class javax.swing.event.HyperlinkEvent.EventType
Exited type.
exitValue() - Method in class java.lang.Process
Returns the exit value for the subprocess.
exp(double) - Static method in class java.lang.StrictMath
Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.
exp(double) - Static method in class java.lang.Math
Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.
EXPANDABLE - Static variable in class javax.accessibility.AccessibleState
Indicates this object allows progressive disclosure of its children.
EXPANDED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is expanded.
expandedIcon - Variable in class javax.swing.plaf.basic.BasicTreeUI
expandPath(TreePath) - Method in class javax.swing.JTree
Ensures that the node identified by the specified path is expanded and viewable.
expandRow(int) - Method in class javax.swing.JTree
Ensures that the node in the specified row is expanded and viewable.
EXPANDS_SELECTED_PATHS_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for expands selected paths property
expandTabRunsArray() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
ExpandVetoException - exception javax.swing.tree.ExpandVetoException.
Exception used to stop and expand/collapse from happening.
ExpandVetoException(TreeExpansionEvent) - Constructor for class javax.swing.tree.ExpandVetoException
Constructs an ExpandVetoException object with no message.
ExpandVetoException(TreeExpansionEvent, String) - Constructor for class javax.swing.tree.ExpandVetoException
Constructs an ExpandVetoException object with the specified message.
ExportException - exception java.rmi.server.ExportException.
An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
ExportException(String) - Constructor for class java.rmi.server.ExportException
Constructs an ExportException with the specified detail message.
ExportException(String, Exception) - Constructor for class java.rmi.server.ExportException
Constructs an ExportException with the specified detail message and nested exception.
exportObject(Remote) - Static method in class java.rmi.server.UnicastRemoteObject
Export the remote object to make it available to receive incoming calls, using an anonymous port.
exportObject(Remote) - Static method in class javax.rmi.PortableRemoteObject
Makes a server object ready to receive remote calls.
exportObject(Remote) - Method in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Delegation call for PortableRemoteObject.exportObject(java.rmi.Remote).
exportObject(Remote, ActivationID, int) - Static method in class java.rmi.activation.Activatable
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
exportObject(Remote, ActivationID, int, RMIClientSocketFactory, RMIServerSocketFactory) - Static method in class java.rmi.activation.Activatable
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
exportObject(Remote, int) - Static method in class java.rmi.server.UnicastRemoteObject
Export the remote object to make it available to receive incoming calls, using the particular supplied port.
exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory) - Static method in class java.rmi.server.UnicastRemoteObject
Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
exportObject(Remote, Object) - Method in interface java.rmi.server.ServerRef
Creates a client stub object for the supplied Remote object.
exportObject(Remote, String, MarshalledObject, boolean, int) - Static method in class java.rmi.activation.Activatable
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
exportObject(Remote, String, MarshalledObject, boolean, int, RMIClientSocketFactory, RMIServerSocketFactory) - Static method in class java.rmi.activation.Activatable
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
extendedOperation(ExtendedRequest) - Method in class javax.naming.ldap.InitialLdapContext
extendedOperation(ExtendedRequest) - Method in interface javax.naming.ldap.LdapContext
Performs an extended operation.
ExtendedRequest - interface javax.naming.ldap.ExtendedRequest.
This interface represents an LDAPv3 extended operation request as defined in RFC 2251.
ExtendedResponse - interface javax.naming.ldap.ExtendedResponse.
This interface represents an LDAP extended operation response as defined in RFC 2251.
EXTENSION_INSTALLATION - Static variable in class java.util.jar.Attributes.Name
Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
EXTENSION_LIST - Static variable in class java.util.jar.Attributes.Name
Name object for Extension-List manifest attribute used for declaring dependencies on installed extensions.
EXTENSION_NAME - Static variable in class java.util.jar.Attributes.Name
Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
extent - Variable in class java.awt.geom.Arc2D.Float
The angular extent of the arc in degrees.
extent - Variable in class java.awt.geom.Arc2D.Double
The angular extent of the arc in degrees.
Externalizable - interface java.io.Externalizable.
Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
extract_any() - Method in class org.omg.CORBA.Any
Extracts the Any object in this Any object's value field.
extract_boolean() - Method in class org.omg.CORBA.Any
Extracts the boolean in this Any object's value field.
extract_char() - Method in class org.omg.CORBA.Any
Extracts the char in this Any object's value field.
extract_double() - Method in class org.omg.CORBA.Any
Extracts the double in this Any object's value field.
extract_fixed() - Method in class org.omg.CORBA.Any
Extracts the java.math.BigDecimal object in this Any object's value field.
extract_float() - Method in class org.omg.CORBA.Any
Extracts the float in this Any object's value field.
extract_long() - Method in class org.omg.CORBA.Any
Extracts the int in this Any object's value field.
extract_longlong() - Method in class org.omg.CORBA.Any
Extracts the long in this Any object's value field.
extract_Object() - Method in class org.omg.CORBA.Any
Extracts the org.omg.CORBA.Object in this Any object's value field.
extract_octet() - Method in class org.omg.CORBA.Any
Extracts the byte in this Any object's value field.
extract_Principal() - Method in class org.omg.CORBA.Any
Deprecated. Deprecated by CORBA 2.2.
extract_short() - Method in class org.omg.CORBA.Any
Extracts the short in this Any object's value field.
extract_string() - Method in class org.omg.CORBA.Any
Extracts the String object in this Any object's value field.
extract_TypeCode() - Method in class org.omg.CORBA.Any
Extracts the TypeCode object in this Any object's value field.
extract_ulong() - Method in class org.omg.CORBA.Any
Extracts the int in this Any object's value field.
extract_ulonglong() - Method in class org.omg.CORBA.Any
Extracts the long in this Any object's value field.
extract_ushort() - Method in class org.omg.CORBA.Any
Extracts the short in this Any object's value field.
extract_Value() - Method in class org.omg.CORBA.Any
Extracts the java.io.Serializable object in this Any object's value field.
extract_wchar() - Method in class org.omg.CORBA.Any
Extracts the char in this Any object's value field.
extract_wstring() - Method in class org.omg.CORBA.Any
Extracts the String object in this Any object's value field.
extract(Any) - Static method in class org.omg.CORBA.UnionMemberHelper
extract(Any) - Static method in class org.omg.CORBA.ServiceInformationHelper
extract(Any) - Static method in class org.omg.CORBA.PolicyListHelper
extract(Any) - Static method in class org.omg.CORBA.NameValuePairHelper
extract(Any) - Static method in class org.omg.CORBA.LongSeqHelper
extract(Any) - Static method in class org.omg.CORBA.OctetSeqHelper
extract(Any) - Static method in class org.omg.CORBA.IdentifierHelper
extract(Any) - Static method in class org.omg.CORBA.FloatSeqHelper
extract(Any) - Static method in class org.omg.CORBA.ServiceDetailHelper
extract(Any) - Static method in class org.omg.CORBA.BooleanSeqHelper
extract(Any) - Static method in class org.omg.CORBA.VisibilityHelper
extract(Any) - Static method in class org.omg.CORBA.ULongSeqHelper
extract(Any) - Static method in class org.omg.CORBA.StringValueHelper
extract(Any) - Static method in class org.omg.CORBA.CharSeqHelper
extract(Any) - Static method in class org.omg.CORBA.SetOverrideTypeHelper
extract(Any) - Static method in class org.omg.CORBA.VersionSpecHelper
extract(Any) - Static method in class org.omg.CORBA.DefinitionKindHelper
extract(Any) - Static method in class org.omg.CORBA.StructMemberHelper
extract(Any) - Static method in class org.omg.CORBA.IDLTypeHelper
extract(Any) - Static method in class org.omg.CORBA.UShortSeqHelper
extract(Any) - Static method in class org.omg.CORBA.WCharSeqHelper
extract(Any) - Static method in class org.omg.CORBA.DoubleSeqHelper
extract(Any) - Static method in class org.omg.CORBA.WStringValueHelper
extract(Any) - Static method in class org.omg.CORBA.PolicyTypeHelper
extract(Any) - Static method in class org.omg.CORBA.ULongLongSeqHelper
extract(Any) - Static method in class org.omg.CORBA.RepositoryIdHelper
extract(Any) - Static method in class org.omg.CORBA.ShortSeqHelper
extract(Any) - Static method in class org.omg.CORBA.ObjectHelper
extract(Any) - Static method in class org.omg.CORBA.CurrentHelper
extract(Any) - Static method in class org.omg.CORBA.LongLongSeqHelper
extract(Any) - Static method in class org.omg.CORBA.CompletionStatusHelper
extract(Any) - Static method in class org.omg.CORBA.FieldNameHelper
extract(Any) - Static method in class org.omg.CORBA.ValueBaseHelper
extract(Any) - Static method in class org.omg.CORBA.PolicyHelper
extract(Any) - Static method in class org.omg.CORBA.AnySeqHelper
extract(Any) - Static method in class org.omg.CORBA.ValueMemberHelper
extract(Any) - Static method in class org.omg.CosNaming.NameHelper
extract(Any) - Static method in class org.omg.CosNaming.IstringHelper
extract(Any) - Static method in class org.omg.CosNaming.BindingListHelper
extract(Any) - Static method in class org.omg.CosNaming.BindingIteratorHelper
extract(Any) - Static method in class org.omg.CosNaming.NameComponentHelper
extract(Any) - Static method in class org.omg.CosNaming.BindingTypeHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextHelper
extract(Any) - Static method in class org.omg.CosNaming.BindingHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
extract(Any) - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


F-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

F

F0 - Static variable in class java.security.spec.RSAKeyGenParameterSpec
The public-exponent value F0 = 3.
F1 - Static variable in class java.awt.Event
The F1 function key, a non-ASCII action key.
F10 - Static variable in class java.awt.Event
The F10 function key, a non-ASCII action key.
F11 - Static variable in class java.awt.Event
The F11 function key, a non-ASCII action key.
F12 - Static variable in class java.awt.Event
The F12 function key, a non-ASCII action key.
F2 - Static variable in class java.awt.Event
The F2 function key, a non-ASCII action key.
F3 - Static variable in class java.awt.Event
The F3 function key, a non-ASCII action key.
F4 - Static variable in class java.awt.Event
The F4 function key, a non-ASCII action key.
F4 - Static variable in class java.security.spec.RSAKeyGenParameterSpec
The public exponent-value F4 = 65537.
F5 - Static variable in class java.awt.Event
The F5 function key, a non-ASCII action key.
F6 - Static variable in class java.awt.Event
The F6 function key, a non-ASCII action key.
F7 - Static variable in class java.awt.Event
The F7 function key, a non-ASCII action key.
F8 - Static variable in class java.awt.Event
The F8 function key, a non-ASCII action key.
F9 - Static variable in class java.awt.Event
The F9 function key, a non-ASCII action key.
FACE - Static variable in class javax.swing.text.html.HTML.Attribute
failure(Exception) - Method in interface java.rmi.server.RMIFailureHandler
The failure callback is invoked when the RMI runtime is unable to create a ServerSocket via the RMISocketFactory.
FALSE - Static variable in class java.lang.Boolean
The Boolean object corresponding to the primitive value false.
Family - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the font family.
Family - Static variable in class javax.swing.text.StyleConstants.FontConstants
Name of the font family.
FAMILY - Static variable in class java.awt.font.TextAttribute
Attribute key for the unlocalized font family name.
fd - Variable in class java.net.SocketImpl
The file descriptor object for this socket.
fd - Variable in class java.net.DatagramSocketImpl
The file descriptor object.
FeatureDescriptor - class java.beans.FeatureDescriptor.
The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.
FeatureDescriptor() - Constructor for class java.beans.FeatureDescriptor
Constructs a FeatureDescriptor.
FEBRUARY - Static variable in class java.util.Calendar
Value of the MONTH field indicating the second month of the year.
FETCH_FORWARD - Static variable in interface java.sql.ResultSet
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.
FETCH_REVERSE - Static variable in interface java.sql.ResultSet
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.
FETCH_UNKNOWN - Static variable in interface java.sql.ResultSet
The constant indicating that the order in which rows in a result set will be processed is unknown.
fictional() - Method in class javax.swing.text.html.parser.TagElement
Field - class java.lang.reflect.Field.
A Field provides information about, and dynamic access to, a single field of a class or an interface.
FIELD_COUNT - Static variable in class java.util.Calendar
The number of distict fields recognized by get and set.
FieldNameHelper - class org.omg.CORBA.FieldNameHelper.
org/omg/CORBA/FieldNameHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
FieldNameHelper() - Constructor for class org.omg.CORBA.FieldNameHelper
FieldPosition - class java.text.FieldPosition.
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
FieldPosition(int) - Constructor for class java.text.FieldPosition
Creates a FieldPosition object for the given field.
fields - Variable in class java.util.Calendar
The field values for the currently set time for this calendar.
FieldView - class javax.swing.text.FieldView.
Extends the multi-line plain text view to be suitable for a single-line editor view.
FieldView(Element) - Constructor for class javax.swing.text.FieldView
Constructs a new FieldView wrapped on an element.
File - class java.io.File.
An abstract representation of file and directory pathnames.
FILE - Static variable in class java.awt.JobAttributes.DestinationType
The DestinationType instance to use for specifying print to file.
FILE_CHOOSER - Static variable in class javax.accessibility.AccessibleRole
A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename.
FILE_FILTER_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
User changed the kind of files to display.
FILE_HIDING_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies a change in the display-hidden-files property.
FILE_SELECTION_MODE_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies a change in the kind of selection (single, multiple, etc.).
FILE_SYSTEM_VIEW_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Says that a different object is being used to find available drives on the system.
FILE_VERSION - Static variable in class javax.swing.text.html.parser.DTD
FILE_VIEW_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Says that a different object is being used to retrieve file information.
File(File, String) - Constructor for class java.io.File
Creates a new File instance from a parent abstract pathname and a child pathname string.
File(String) - Constructor for class java.io.File
Creates a new File instance by converting the given pathname string into an abstract pathname.
File(String, String) - Constructor for class java.io.File
Creates a new File instance from a parent pathname string and a child pathname string.
FileChooserUI - class javax.swing.plaf.FileChooserUI.
Pluggable look and feel interface for JFileChooser
FileChooserUI() - Constructor for class javax.swing.plaf.FileChooserUI
FileDescriptor - class java.io.FileDescriptor.
Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
FileDescriptor() - Constructor for class java.io.FileDescriptor
Constructs an (invalid) FileDescriptor object.
FileDialog - class java.awt.FileDialog.
The FileDialog class displays a dialog window from which the user can select a file.
FileDialog(Frame) - Constructor for class java.awt.FileDialog
Creates a file dialog for loading a file.
FileDialog(Frame, String) - Constructor for class java.awt.FileDialog
Creates a file dialog window with the specified title for loading a file.
FileDialog(Frame, String, int) - Constructor for class java.awt.FileDialog
Creates a file dialog window with the specified title for loading or saving a file.
FileFilter - interface java.io.FileFilter.
A filter for abstract pathnames.
FileFilter - class javax.swing.filechooser.FileFilter.
FileFilter is an abstract class that has no default implemention.
FileFilter() - Constructor for class javax.swing.filechooser.FileFilter
fileIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
FileInputStream - class java.io.FileInputStream.
A FileInputStream obtains input bytes from a file in a file system.
FileInputStream(File) - Constructor for class java.io.FileInputStream
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.
FileInputStream(FileDescriptor) - Constructor for class java.io.FileInputStream
Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.
FileInputStream(String) - Constructor for class java.io.FileInputStream
Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.
FilenameFilter - interface java.io.FilenameFilter.
Instances of classes that implement this interface are used to filter filenames.
FileNameMap - interface java.net.FileNameMap.
A simple interface which provides a mechanism to map between a file name and a MIME type string.
FileNotFoundException - exception java.io.FileNotFoundException.
Signals that an attempt to open the file denoted by a specified pathname has failed.
FileNotFoundException() - Constructor for class java.io.FileNotFoundException
Constructs a FileNotFoundException with null as its error detail message.
FileNotFoundException(String) - Constructor for class java.io.FileNotFoundException
Constructs a FileNotFoundException with the specified detail message.
FileOutputStream - class java.io.FileOutputStream.
A file output stream is an output stream for writing data to a File or to a FileDescriptor.
FileOutputStream(File) - Constructor for class java.io.FileOutputStream
Creates a file output stream to write to the file represented by the specified File object.
FileOutputStream(FileDescriptor) - Constructor for class java.io.FileOutputStream
Creates an output file stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.
FileOutputStream(String) - Constructor for class java.io.FileOutputStream
Creates an output file stream to write to the file with the specified name.
FileOutputStream(String, boolean) - Constructor for class java.io.FileOutputStream
Creates an output file stream to write to the file with the specified name.
FilePermission - class java.io.FilePermission.
This class represents access to a file or directory.
FilePermission(String, String) - Constructor for class java.io.FilePermission
Creates a new FilePermission object with the specified actions.
FileReader - class java.io.FileReader.
Convenience class for reading character files.
FileReader(File) - Constructor for class java.io.FileReader
Creates a new FileReader, given the File to read from.
FileReader(FileDescriptor) - Constructor for class java.io.FileReader
Creates a new FileReader, given the FileDescriptor to read from.
FileReader(String) - Constructor for class java.io.FileReader
Creates a new FileReader, given the name of the file to read from.
FILES_AND_DIRECTORIES - Static variable in class javax.swing.JFileChooser
Instruction to display both files and directories.
FILES_ONLY - Static variable in class javax.swing.JFileChooser
Instruction to display only files.
FileSystemView - class javax.swing.filechooser.FileSystemView.
FileSystemView is JFileChooser's gateway to the file system.
FileSystemView() - Constructor for class javax.swing.filechooser.FileSystemView
FileView - class javax.swing.filechooser.FileView.
FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.
FileView() - Constructor for class javax.swing.filechooser.FileView
FileWriter - class java.io.FileWriter.
Convenience class for writing character files.
FileWriter(File) - Constructor for class java.io.FileWriter
Constructs a FileWriter object given a File object.
FileWriter(FileDescriptor) - Constructor for class java.io.FileWriter
Constructs a FileWriter object associated with a file descriptor.
FileWriter(String) - Constructor for class java.io.FileWriter
Constructs a FileWriter object given a file name.
FileWriter(String, boolean) - Constructor for class java.io.FileWriter
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
fill - Variable in class java.awt.GridBagConstraints
This field is used when the component's display area is larger than the component's requested size.
FILL - Static variable in class java.awt.font.ShapeGraphicAttribute
A key indicating the shape should be filled.
fill() - Method in class java.util.zip.InflaterInputStream
Fills input buffer with more data to decompress.
fill(boolean[], boolean) - Static method in class java.util.Arrays
Assigns the specified boolean value to each element of the specified array of booleans.
fill(boolean[], int, int, boolean) - Static method in class java.util.Arrays
Assigns the specified boolean value to each element of the specified range of the specified array of booleans.
fill(byte[], byte) - Static method in class java.util.Arrays
Assigns the specified byte value to each element of the specified array of bytes.
fill(byte[], int, int, byte) - Static method in class java.util.Arrays
Assigns the specified byte value to each element of the specified range of the specified array of bytes.
fill(char[], char) - Static method in class java.util.Arrays
Assigns the specified char value to each element of the specified array of chars.
fill(char[], int, int, char) - Static method in class java.util.Arrays
Assigns the specified char value to each element of the specified range of the specified array of chars.
fill(double[], double) - Static method in class java.util.Arrays
Assigns the specified double value to each element of the specified array of doubles.
fill(double[], int, int, double) - Static method in class java.util.Arrays
Assigns the specified double value to each element of the specified range of the specified array of doubles.
fill(float[], float) - Static method in class java.util.Arrays
Assigns the specified float value to each element of the specified array of floats.
fill(float[], int, int, float) - Static method in class java.util.Arrays
Assigns the specified float value to each element of the specified range of the specified array of floats.
fill(int[], int) - Static method in class java.util.Arrays
Assigns the specified int value to each element of the specified array of ints.
fill(int[], int, int, int) - Static method in class java.util.Arrays
Assigns the specified int value to each element of the specified range of the specified array of ints.
fill(List, Object) - Static method in class java.util.Collections
Replaces all of the elements of the specified list with the specified element.
fill(long[], int, int, long) - Static method in class java.util.Arrays
Assigns the specified long value to each element of the specified range of the specified array of longs.
fill(long[], long) - Static method in class java.util.Arrays
Assigns the specified long value to each element of the specified array of longs.
fill(Object[], int, int, Object) - Static method in class java.util.Arrays
Assigns the specified Object reference to each element of the specified range of the specified array of Objects.
fill(Object[], Object) - Static method in class java.util.Arrays
Assigns the specified Object reference to each element of the specified array of Objects.
fill(Shape) - Method in class java.awt.Graphics2D
Fills the interior of a Shape using the settings of the Graphics2D context.
fill(short[], int, int, short) - Static method in class java.util.Arrays
Assigns the specified short value to each element of the specified range of the specified array of shorts.
fill(short[], short) - Static method in class java.util.Arrays
Assigns the specified short value to each element of the specified array of shorts.
fill3DRect(int, int, int, int, boolean) - Method in class java.awt.Graphics
Paints a 3-D highlighted rectangle filled with the current color.
fill3DRect(int, int, int, int, boolean) - Method in class java.awt.Graphics2D
Paints a 3-D highlighted rectangle filled with the current color.
fill3DRect(int, int, int, int, boolean) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fill3DRect.
fillArc(int, int, int, int, int, int) - Method in class java.awt.Graphics
Fills a circular or elliptical arc covering the specified rectangle.
fillArc(int, int, int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fillArc.
filledSlider - Variable in class javax.swing.plaf.metal.MetalSliderUI
FILLER - Static variable in class javax.accessibility.AccessibleRole
An object that fills up space in a user interface.
fillInStackTrace() - Method in class java.lang.Throwable
Fills in the execution stack trace.
fillOval(int, int, int, int) - Method in class java.awt.Graphics
Fills an oval bounded by the specified rectangle with the current color.
fillOval(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fillOval.
fillPolygon(int[], int[], int) - Method in class java.awt.Graphics
Fills a closed polygon defined by arrays of x and y coordinates.
fillPolygon(int[], int[], int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fillPolygon.
fillPolygon(Polygon) - Method in class java.awt.Graphics
Fills the polygon defined by the specified Polygon object with the graphics context's current color.
fillRect(int, int, int, int) - Method in class java.awt.Graphics
Fills the specified rectangle.
fillRect(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fillRect.
fillRoundRect(int, int, int, int, int, int) - Method in class java.awt.Graphics
Fills the specified rounded corner rectangle with the current color.
fillRoundRect(int, int, int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.fillRoundRect.
filter(BufferedImage, BufferedImage) - Method in class java.awt.image.LookupOp
Performs a lookup operation on a BufferedImage.
filter(BufferedImage, BufferedImage) - Method in interface java.awt.image.BufferedImageOp
Performs a single-input/single-output operation on a BufferedImage.
filter(BufferedImage, BufferedImage) - Method in class java.awt.image.ConvolveOp
Performs a convolution on BufferedImages.
filter(BufferedImage, BufferedImage) - Method in class java.awt.image.AffineTransformOp
Transforms the source BufferedImage and stores the results in the destination BufferedImage.
filter(BufferedImage, BufferedImage) - Method in class java.awt.image.ColorConvertOp
ColorConverts the source BufferedImage.
filter(BufferedImage, BufferedImage) - Method in class java.awt.image.RescaleOp
Rescales the source BufferedImage.
filter(Raster, WritableRaster) - Method in class java.awt.image.LookupOp
Performs a lookup operation on a Raster.
filter(Raster, WritableRaster) - Method in class java.awt.image.ConvolveOp
Performs a convolution on Rasters.
filter(Raster, WritableRaster) - Method in class java.awt.image.BandCombineOp
Transforms the Raster using the matrix specified in the constructor.
filter(Raster, WritableRaster) - Method in class java.awt.image.AffineTransformOp
Transforms the source Raster and stores the results in the destination Raster.
filter(Raster, WritableRaster) - Method in interface java.awt.image.RasterOp
Performs a single-input/single-output operation from a source Raster to a destination Raster.
filter(Raster, WritableRaster) - Method in class java.awt.image.ColorConvertOp
ColorConverts the image data in the source Raster.
filter(Raster, WritableRaster) - Method in class java.awt.image.RescaleOp
Rescales the pixel data in the source Raster.
FILTERED - Static variable in class java.util.zip.Deflater
Compression strategy best used for data consisting mostly of small values with a somewhat random distribution.
FilteredImageSource - class java.awt.image.FilteredImageSource.
This class is an implementation of the ImageProducer interface which takes an existing image and a filter object and uses them to produce image data for a new filtered version of the original image.
FilteredImageSource(ImageProducer, ImageFilter) - Constructor for class java.awt.image.FilteredImageSource
Constructs an ImageProducer object from an existing ImageProducer and a filter object.
filterIndexColorModel(IndexColorModel) - Method in class java.awt.image.RGBImageFilter
Filters an IndexColorModel object by running each entry in its color tables through the filterRGB function that RGBImageFilter subclasses must provide.
FilterInputStream - class java.io.FilterInputStream.
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterInputStream(InputStream) - Constructor for class java.io.FilterInputStream
Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
FilterOutputStream - class java.io.FilterOutputStream.
This class is the superclass of all classes that filter output streams.
FilterOutputStream(OutputStream) - Constructor for class java.io.FilterOutputStream
Creates an output stream filter built on top of the specified underlying output stream.
FilterReader - class java.io.FilterReader.
Abstract class for reading filtered character streams.
FilterReader(Reader) - Constructor for class java.io.FilterReader
Create a new filtered reader.
filterRGB(int, int, int) - Method in class java.awt.image.RGBImageFilter
Subclasses must specify a method to convert a single input pixel in the default RGB ColorModel to a single output pixel.
filterRGB(int, int, int) - Method in class javax.swing.GrayFilter
Overrides RGBImageFilter.filterRGB.
filterRGBPixels(int, int, int, int, int[], int, int) - Method in class java.awt.image.RGBImageFilter
Filters a buffer of pixels in the default RGB ColorModel by passing them one by one through the filterRGB method.
filters - Variable in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel
FilterWriter - class java.io.FilterWriter.
Abstract class for writing filtered character streams.
FilterWriter(Writer) - Constructor for class java.io.FilterWriter
Create a new filtered writer.
FINAL - Static variable in class java.lang.reflect.Modifier
The int value representing the final modifier.
finalize() - Method in class java.awt.Graphics
Disposes of this graphics context once it is no longer referenced.
finalize() - Method in class java.awt.Font
Disposes the native Font object.
finalize() - Method in class java.awt.Window
Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.
finalize() - Method in class java.awt.Cursor
finalize() - Method in class java.awt.Frame
We have to remove the (hard) reference to weakThis in the Vector, otherwise the WeakReference instance will never get garbage collected.
finalize() - Method in class java.awt.AWTEvent
finalize() - Method in class java.awt.PrintJob
Ends this print job once it is no longer referenced.
finalize() - Method in class java.awt.color.ICC_Profile
Frees the resources associated with an ICC_Profile object.
finalize() - Method in class java.awt.image.ColorModel
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
finalize() - Method in class java.awt.image.IndexColorModel
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
finalize() - Method in class java.io.FileOutputStream
Cleans up the connection to the file, and ensures that the close method of this file output stream is called when there are no more references to this stream.
finalize() - Method in class java.io.FileInputStream
Ensures that the close method of this file input stream is called when there are no more references to it.
finalize() - Method in class java.lang.Object
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
finalize() - Method in class java.util.zip.ZipFile
Ensures that the close method of this ZIP file is called when there are no more references to it.
finalize() - Method in class java.util.zip.Deflater
Closes the compressor when garbage is collected.
finalize() - Method in class java.util.zip.Inflater
Closes the decompressor when garbage is collected.
finalize() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Finalizes an AbstractElement.
findClass(String) - Method in class java.lang.ClassLoader
Finds the specified class.
findClass(String) - Method in class java.net.URLClassLoader
Finds and loads the class with the specified name from the URL search path.
findColumn(String) - Method in interface java.sql.ResultSet
Maps the given ResultSet column name to its ResultSet column index.
findColumn(String) - Method in class javax.swing.table.AbstractTableModel
Returns a column given its name.
findComponentAt(int, int) - Method in class java.awt.Container
Locates the visible child component that contains the specified position.
findComponentAt(Point) - Method in class java.awt.Container
Locates the visible child component that contains the specified point.
findEditor(Class) - Static method in class java.beans.PropertyEditorManager
Locate a value editor for a given target type.
findElementMatchingTag(HTMLDocument, int, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
Returns the deepest element at offset matching tag.
findFocusOwner(Component) - Static method in class javax.swing.SwingUtilities
Return the child component which has focus, if any.
findLibrary(String) - Method in class java.lang.ClassLoader
Returns the absolute path name of a native library.
findLoadedClass(String) - Method in class java.lang.ClassLoader
Finds the class with the given name if it had been previously loaded through this class loader.
findOffsetToCharactersInString(char[], int) - Method in class javax.swing.text.ParagraphView
Finds the next character in the document with a character in string, starting at offset start.
findResource(String) - Method in class java.lang.ClassLoader
Finds the resource with the given name.
findResource(String) - Method in class java.net.URLClassLoader
Finds the resource with the specified name on the URL search path.
findResources(String) - Method in class java.lang.ClassLoader
Returns an Enumeration of URLs representing all the resources with the given name.
findResources(String) - Method in class java.net.URLClassLoader
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
findSystemClass(String) - Method in class java.lang.ClassLoader
Finds a class with the specified name, loading it if necessary.
finish() - Method in class java.util.zip.DeflaterOutputStream
Finishes writing compressed data to the output stream without closing the underlying stream.
finish() - Method in class java.util.zip.ZipOutputStream
Finishes writing the contents of the ZIP output stream without closing the underlying stream.
finish() - Method in class java.util.zip.GZIPOutputStream
Finishes writing compressed data to the output stream without closing the underlying stream.
finish() - Method in class java.util.zip.Deflater
When called, indicates that compression should end with the current contents of the input buffer.
finishDraggingTo(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Messaged to finish the dragging session.
finishDraggingTo(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.
finished() - Method in class java.util.zip.Deflater
Returns true if the end of the compressed data output stream has been reached.
finished() - Method in class java.util.zip.Inflater
Return true if the end of the compressed data stream has been reached.
finishedPaintingChildren(JSplitPane, Graphics) - Method in class javax.swing.plaf.SplitPaneUI
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
finishedPaintingChildren(JSplitPane, Graphics) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
finishedPaintingChildren(JSplitPane, Graphics) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call finishedPaintingChildren on each UI handled by this MultiUI.
fireActionEvent() - Method in class javax.swing.JComboBox
Notifies all listeners that have registered interest for notification on this event type.
fireActionPerformed() - Method in class javax.swing.JTextField
Notifies all listeners that have registered interest for notification on this event type.
fireActionPerformed(ActionEvent) - Method in class javax.swing.AbstractButton
Notifies all listeners that have registered interest for notification on this event type.
fireActionPerformed(ActionEvent) - Method in class javax.swing.Timer
Notify all listeners that have registered interest for notification on this event type.
fireActionPerformed(ActionEvent) - Method in class javax.swing.DefaultButtonModel
fireActionPerformed(String) - Method in class javax.swing.JFileChooser
Notifies all listeners that have registered interest for notification on this event type.
fireAdjustmentValueChanged(int, int, int) - Method in class javax.swing.JScrollBar
fireCaretUpdate(CaretEvent) - Method in class javax.swing.text.JTextComponent
Notifies all listeners that have registered interest for notification on this event type.
fireChangedUpdate(DocumentEvent) - Method in class javax.swing.text.AbstractDocument
Notifies all listeners that have registered interest for notification on this event type.
fireChangedUpdate(DocumentEvent) - Method in class javax.swing.text.html.HTMLDocument
Notifies all listeners that have registered interest for notification on this event type.
fireChildrenAdded(BeanContextMembershipEvent) - Method in class java.beans.beancontext.BeanContextSupport
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
fireChildrenRemoved(BeanContextMembershipEvent) - Method in class java.beans.beancontext.BeanContextSupport
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
fireColumnAdded(TableColumnModelEvent) - Method in class javax.swing.table.DefaultTableColumnModel
Notifies all listeners that have registered interest for notification on this event type.
fireColumnMarginChanged() - Method in class javax.swing.table.DefaultTableColumnModel
Notifies all listeners that have registered interest for notification on this event type.
fireColumnMoved(TableColumnModelEvent) - Method in class javax.swing.table.DefaultTableColumnModel
Notifies all listeners that have registered interest for notification on this event type.
fireColumnRemoved(TableColumnModelEvent) - Method in class javax.swing.table.DefaultTableColumnModel
Notifies all listeners that have registered interest for notification on this event type.
fireColumnSelectionChanged(ListSelectionEvent) - Method in class javax.swing.table.DefaultTableColumnModel
Notifies all listeners that have registered interest for notification on this event type.
fireContentsChanged() - Method in class javax.swing.plaf.basic.BasicDirectoryModel
fireContentsChanged(Object, int, int) - Method in class javax.swing.AbstractListModel
AbstractListModel subclasses must call this method after one or more elements of the list change.
fireDragGestureRecognized(int, Point) - Method in class java.awt.dnd.DragGestureRecognizer
Notify the DragGestureListener that a Drag and Drop initiating gesture has occurred.
fireEditingCanceled() - Method in class javax.swing.AbstractCellEditor
fireEditingStopped() - Method in class javax.swing.AbstractCellEditor
fireHyperlinkUpdate(HyperlinkEvent) - Method in class javax.swing.JEditorPane
Notifies all listeners that have registered interest for notification on this event type.
fireInsertUpdate(DocumentEvent) - Method in class javax.swing.text.AbstractDocument
Notifies all listeners that have registered interest for notification on this event type.
fireInternalFrameEvent(int) - Method in class javax.swing.JInternalFrame
fireIntervalAdded(Object, int, int) - Method in class javax.swing.AbstractListModel
AbstractListModel subclasses must call this method after one or more elements are added to the model.
fireIntervalRemoved(Object, int, int) - Method in class javax.swing.AbstractListModel
AbstractListModel subclasses must call this method after one or more elements are removed from the model.
fireItemStateChanged(ItemEvent) - Method in class javax.swing.AbstractButton
Notifies all listeners that have registered interest for notification on this event type.
fireItemStateChanged(ItemEvent) - Method in class javax.swing.JComboBox
Notifies all listeners that have registered interest for notification on this event type.
fireItemStateChanged(ItemEvent) - Method in class javax.swing.DefaultButtonModel
fireMenuCanceled() - Method in class javax.swing.JMenu
Notifies all listeners that have registered interest for notification on this event type.
fireMenuDeselected() - Method in class javax.swing.JMenu
Notifies all listeners that have registered interest for notification on this event type.
fireMenuDragMouseDragged(MenuDragMouseEvent) - Method in class javax.swing.JMenuItem
fireMenuDragMouseEntered(MenuDragMouseEvent) - Method in class javax.swing.JMenuItem
fireMenuDragMouseExited(MenuDragMouseEvent) - Method in class javax.swing.JMenuItem
fireMenuDragMouseReleased(MenuDragMouseEvent) - Method in class javax.swing.JMenuItem
fireMenuKeyPressed(MenuKeyEvent) - Method in class javax.swing.JMenuItem
fireMenuKeyReleased(MenuKeyEvent) - Method in class javax.swing.JMenuItem
fireMenuKeyTyped(MenuKeyEvent) - Method in class javax.swing.JMenuItem
fireMenuSelected() - Method in class javax.swing.JMenu
Notifies all listeners that have registered interest for notification on this event type.
firePopupMenuCanceled() - Method in class javax.swing.JPopupMenu
Notifies PopupMenuListeners that this popup menu is cancelled.
firePopupMenuWillBecomeInvisible() - Method in class javax.swing.JPopupMenu
Notifies PopupMenuListeners that this popup menu will become invisible.
firePopupMenuWillBecomeVisible() - Method in class javax.swing.JPopupMenu
Notifies PopupMenuListeners that this popup menu will become visible.
firePropertyChange() - Method in class java.beans.PropertyEditorSupport
Report that we have been modified to any interested listeners.
firePropertyChange(PropertyChangeEvent) - Method in class java.beans.PropertyChangeSupport
Fire an existing PropertyChangeEvent to any registered listeners.
firePropertyChange(PropertyChangeEvent) - Method in class javax.swing.event.SwingPropertyChangeSupport
Fire an existing PropertyChangeEvent to any registered listeners.
firePropertyChange(String, boolean, boolean) - Method in class java.beans.PropertyChangeSupport
Report a boolean bound property update to any registered listeners.
firePropertyChange(String, boolean, boolean) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, boolean, boolean) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, boolean, boolean) - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
firePropertyChange(String, boolean, boolean) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, byte, byte) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, byte, byte) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, byte, byte) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, char, char) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, char, char) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, char, char) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, double, double) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, double, double) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, double, double) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, float, float) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, float, float) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, float, float) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, int, int) - Method in class java.beans.PropertyChangeSupport
Report an int bound property update to any registered listeners.
firePropertyChange(String, int, int) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, int, int) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, int, int) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, long, long) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, long, long) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, long, long) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, Object, Object) - Method in class java.awt.Component
Support for reporting bound property changes.
firePropertyChange(String, Object, Object) - Method in class java.beans.PropertyChangeSupport
Report a bound property update to any registered listeners.
firePropertyChange(String, Object, Object) - Method in class java.beans.beancontext.BeanContextChildSupport
Report a bound property update to any registered listeners.
firePropertyChange(String, Object, Object) - Method in class javax.accessibility.AccessibleContext
Support for reporting bound property changes.
firePropertyChange(String, Object, Object) - Method in class javax.swing.JComponent
Supports reporting bound property changes.
firePropertyChange(String, Object, Object) - Method in class javax.swing.JViewport
Notifies listeners of a property change.
firePropertyChange(String, Object, Object) - Method in class javax.swing.UIDefaults
Support for reporting bound property changes.
firePropertyChange(String, Object, Object) - Method in class javax.swing.AbstractAction
Supports reporting bound property changes.
firePropertyChange(String, Object, Object) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, Object, Object) - Method in class javax.swing.event.SwingPropertyChangeSupport
Report a bound property update to any registered listeners.
firePropertyChange(String, Object, Object) - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
firePropertyChange(String, Object, Object) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
firePropertyChange(String, short, short) - Method in class javax.swing.JComponent
Reports a bound property change.
firePropertyChange(String, short, short) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
firePropertyChange(String, short, short) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
fireRemoveUpdate(DocumentEvent) - Method in class javax.swing.text.AbstractDocument
Notifies all listeners that have registered interest for notification on this event type.
fireSelectionValueChanged(int, int, boolean) - Method in class javax.swing.JList
Notifies JList ListSelectionListeners that the selection model has changed.
fireServiceAdded(BeanContextServiceAvailableEvent) - Method in class java.beans.beancontext.BeanContextServicesSupport
Fires a BeanContextServiceAvailableEvent indicating that a new service has become available.
fireServiceAdded(Class) - Method in class java.beans.beancontext.BeanContextServicesSupport
Fires a BeanContextServiceEvent notifying of a new service.
fireServiceRevoked(BeanContextServiceRevokedEvent) - Method in class java.beans.beancontext.BeanContextServicesSupport
Fires a BeanContextServiceEvent notifying of a service being revoked.
fireServiceRevoked(Class, boolean) - Method in class java.beans.beancontext.BeanContextServicesSupport
Fires a BeanContextServiceRevokedEvent indicating that a particular service is no longer available.
fireStateChanged() - Method in class javax.swing.DefaultSingleSelectionModel
fireStateChanged() - Method in class javax.swing.JViewport
Notifies all ChangeListeners when the views size, position, or the viewports extent size has changed.
fireStateChanged() - Method in class javax.swing.JTabbedPane
Send a ChangeEvent, whose source is this tabbedpane, to each listener.
fireStateChanged() - Method in class javax.swing.AbstractButton
Notifies all listeners that have registered interest for notification on this event type.
fireStateChanged() - Method in class javax.swing.DefaultBoundedRangeModel
Run each ChangeListeners stateChanged() method.
fireStateChanged() - Method in class javax.swing.MenuSelectionManager
fireStateChanged() - Method in class javax.swing.DefaultButtonModel
fireStateChanged() - Method in class javax.swing.JProgressBar
Notify all listeners that have registered interest for notification on this event type.
fireStateChanged() - Method in class javax.swing.JSlider
Send a ChangeEvent, whose source is this Slider, to each listener.
fireStateChanged() - Method in class javax.swing.colorchooser.DefaultColorSelectionModel
Run each ChangeListeners stateChanged() method.
fireStateChanged() - Method in class javax.swing.text.StyleContext.NamedStyle
Notifies all listeners that have registered interest for notification on this event type.
fireStateChanged() - Method in class javax.swing.text.DefaultCaret
Notifies all listeners that have registered interest for notification on this event type.
fireTableCellUpdated(int, int) - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that the value of the cell at [row, column] has been updated.
fireTableChanged(TableModelEvent) - Method in class javax.swing.table.AbstractTableModel
Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model.
fireTableDataChanged() - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that all cell values in the table's rows may have changed.
fireTableRowsDeleted(int, int) - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted.
fireTableRowsInserted(int, int) - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted.
fireTableRowsUpdated(int, int) - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been updated.
fireTableStructureChanged() - Method in class javax.swing.table.AbstractTableModel
Notifies all listeners that the table's structure has changed.
fireTreeCollapsed(TreePath) - Method in class javax.swing.JTree
Notify all listeners that have registered interest for notification on this event type.
fireTreeExpanded(TreePath) - Method in class javax.swing.JTree
Notify all listeners that have registered interest for notification on this event type.
fireTreeNodesChanged(Object, Object[], int[], Object[]) - Method in class javax.swing.tree.DefaultTreeModel
fireTreeNodesInserted(Object, Object[], int[], Object[]) - Method in class javax.swing.tree.DefaultTreeModel
fireTreeNodesRemoved(Object, Object[], int[], Object[]) - Method in class javax.swing.tree.DefaultTreeModel
fireTreeStructureChanged(Object, Object[], int[], Object[]) - Method in class javax.swing.tree.DefaultTreeModel
fireTreeWillCollapse(TreePath) - Method in class javax.swing.JTree
Notify all listeners that have registered interest for notification on this event type.
fireTreeWillExpand(TreePath) - Method in class javax.swing.JTree
Notify all listeners that have registered interest for notification on this event type.
fireUndoableEditUpdate(UndoableEditEvent) - Method in class javax.swing.text.AbstractDocument
Notifies all listeners that have registered interest for notification on this event type.
fireUndoableEditUpdate(UndoableEditEvent) - Method in class javax.swing.text.html.HTMLDocument
Notifies all listeners that have registered interest for notification on this event type.
fireValueChanged(boolean) - Method in class javax.swing.DefaultListSelectionModel
Notifies listeners that we have ended a series of adjustments.
fireValueChanged(int, int) - Method in class javax.swing.DefaultListSelectionModel
Notifies ListSelectionListeners that the value of the selection, in the closed interval firstIndex, lastIndex, has changed.
fireValueChanged(int, int, boolean) - Method in class javax.swing.DefaultListSelectionModel
fireValueChanged(TreeSelectionEvent) - Method in class javax.swing.JTree
Notifies all listeners that have registered interest for notification on this event type.
fireValueChanged(TreeSelectionEvent) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Notifies all listeners that are registered for tree selection events on this object.
fireVetoableChange(PropertyChangeEvent) - Method in class java.beans.VetoableChangeSupport
Fire a vetoable property update to any registered listeners.
fireVetoableChange(String, boolean, boolean) - Method in class java.beans.VetoableChangeSupport
Report a boolean vetoable property update to any registered listeners.
fireVetoableChange(String, int, int) - Method in class java.beans.VetoableChangeSupport
Report a int vetoable property update to any registered listeners.
fireVetoableChange(String, Object, Object) - Method in class java.beans.VetoableChangeSupport
Report a vetoable property update to any registered listeners.
fireVetoableChange(String, Object, Object) - Method in class java.beans.beancontext.BeanContextChildSupport
Report a vetoable property update to any registered listeners.
fireVetoableChange(String, Object, Object) - Method in class javax.swing.JComponent
Supports reporting constrained property changes.
fireVisibleDataPropertyChange() - Method in class javax.swing.JTree.AccessibleJTree
Fire a visible data property change notification.
first() - Method in interface java.sql.ResultSet
Moves the cursor to the first row in this ResultSet object.
first() - Method in interface java.text.CharacterIterator
Sets the position to getBeginIndex() and returns the character at that position.
first() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.first() for String.
first() - Method in class java.text.BreakIterator
Return the first boundary.
first() - Method in class java.util.TreeSet
Returns the first (lowest) element currently in this sorted set.
first() - Method in interface java.util.SortedSet
Returns the first (lowest) element currently in this sorted set.
first() - Method in class javax.swing.text.ElementIterator
Fetches the first element.
first() - Method in class javax.swing.text.Segment
Sets the position to getBeginIndex() and returns the character at that position.
first() - Method in class javax.swing.text.html.parser.ContentModel
Return the element that must be next.
first(Container) - Method in class java.awt.CardLayout
Flips to the first card of the container.
first(Object) - Method in class javax.swing.text.html.parser.ContentModel
Return true if the token could potentially be the first token in the input stream.
firstColumn - Variable in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
firstElement() - Method in class java.util.Vector
Returns the first component (the item at index 0) of this vector.
firstElement() - Method in class javax.swing.DefaultListModel
Returns the first component of this list.
firstKey() - Method in class java.util.TreeMap
Returns the first (lowest) key currently in this sorted map.
firstKey() - Method in interface java.util.SortedMap
Returns the first (lowest) key currently in this sorted map.
firstLineIndent - Variable in class javax.swing.text.ParagraphView
Indentation for the first line, from the left inset.
FirstLineIndent - Static variable in class javax.swing.text.StyleConstants
The amount of space to indent the first line of the paragraph.
FirstLineIndent - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount of space to indent the first line of the paragraph.
firstRow - Variable in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
firstRow - Variable in class javax.swing.event.TableModelEvent
FIXED - Static variable in interface javax.swing.text.html.parser.DTDConstants
fixed_digits() - Method in class org.omg.CORBA.TypeCode
Returns the number of digits in the fixed type described by this TypeCode object.
fixed_scale() - Method in class org.omg.CORBA.TypeCode
Returns the scale of the fixed type described by this TypeCode object.
fixedCellHeightChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
fixedCellWidthChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
FixedHeightLayoutCache - class javax.swing.tree.FixedHeightLayoutCache.
NOTE: This will become more open in a future release.
FixedHeightLayoutCache() - Constructor for class javax.swing.tree.FixedHeightLayoutCache
FixedHolder - class org.omg.CORBA.FixedHolder.
FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal.
FixedHolder() - Constructor for class org.omg.CORBA.FixedHolder
Construct the FixedHolder without initializing the contained value.
FixedHolder(BigDecimal) - Constructor for class org.omg.CORBA.FixedHolder
Construct the FixedHolder and initialize it with the given value.
flags() - Method in class org.omg.CORBA.NamedValue
Retrieves the argument mode flag for this NamedValue object.
FLASH_OPTION - Static variable in class javax.swing.DebugGraphics
Flash graphics operations.
flashColor() - Static method in class javax.swing.DebugGraphics
Returns the Color used to flash drawing operations.
flashCount() - Static method in class javax.swing.DebugGraphics
Returns the number of times that drawing operations will flash.
flashTime() - Static method in class javax.swing.DebugGraphics
Returns the time delay of drawing operation flashing.
FlatteningPathIterator - class java.awt.geom.FlatteningPathIterator.
The FlatteningPathIterator class returns a flattened view of another PathIterator object.
FlatteningPathIterator(PathIterator, double) - Constructor for class java.awt.geom.FlatteningPathIterator
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
FlatteningPathIterator(PathIterator, double, int) - Constructor for class java.awt.geom.FlatteningPathIterator
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
FlavorMap - interface java.awt.datatransfer.FlavorMap.
The FlavorMap is an interface to a map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
flipBit(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit flipped.
flipEastAndWestAtEnds(int, Position.Bias) - Method in class javax.swing.text.CompositeView
Subclasses may wish to subclass this and conditionally return true based on the position.
flipEastAndWestAtEnds(int, Position.Bias) - Method in class javax.swing.text.BoxView
flipEastAndWestAtEnds(int, Position.Bias) - Method in class javax.swing.text.ParagraphView
Float - class java.lang.Float.
The Float class wraps a value of primitive type float in an object.
FLOAT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.
FLOAT - Static variable in class javax.swing.text.html.CSS.Attribute
Float(double) - Constructor for class java.lang.Float
Constructs a newly allocated Floatobject that represents the argument converted to type float.
Float(float) - Constructor for class java.lang.Float
Constructs a newly allocated Float object that represents the primitive float argument.
Float(String) - Constructor for class java.lang.Float
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.
floatAt(Point, Point) - Method in class javax.swing.plaf.basic.BasicToolBarUI
FloatControl - class javax.sound.sampled.FloatControl.
A FloatControl object provides control over a range of floating-point values.
FloatControl.Type - class javax.sound.sampled.FloatControl.Type.
An instance of the FloatControl.Type inner class identifies one kind of float control.
FloatControl.Type(String) - Constructor for class javax.sound.sampled.FloatControl.Type
Constructs a new float control type.
FloatControl(FloatControl.Type, float, float, float, int, float, String) - Constructor for class javax.sound.sampled.FloatControl
Constructs a new float control object with the given parameters.
FloatControl(FloatControl.Type, float, float, float, int, float, String, String, String, String) - Constructor for class javax.sound.sampled.FloatControl
Constructs a new float control object with the given parameters
FloatHolder - class org.omg.CORBA.FloatHolder.
A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods.
FloatHolder() - Constructor for class org.omg.CORBA.FloatHolder
Constructs a new FloatHolder object with its value field initialized to 0.0.
FloatHolder(float) - Constructor for class org.omg.CORBA.FloatHolder
Constructs a new FloatHolder object for the given float.
floatingBorderColor - Variable in class javax.swing.plaf.basic.BasicToolBarUI
floatingColor - Variable in class javax.swing.plaf.basic.BasicToolBarUI
FloatSeqHelper - class org.omg.CORBA.FloatSeqHelper.
org/omg/CORBA/FloatSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
FloatSeqHelper() - Constructor for class org.omg.CORBA.FloatSeqHelper
FloatSeqHolder - class org.omg.CORBA.FloatSeqHolder.
org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
FloatSeqHolder() - Constructor for class org.omg.CORBA.FloatSeqHolder
FloatSeqHolder(float[]) - Constructor for class org.omg.CORBA.FloatSeqHolder
floatToIntBits(float) - Static method in class java.lang.Float
Returns the bit represention of a single-float value.
floatToRawIntBits(float) - Static method in class java.lang.Float
Returns the bit represention of a single-float value.
floatValue() - Method in class java.lang.Number
Returns the value of the specified number as a float.
floatValue() - Method in class java.lang.Long
Returns the value of this Long as a float.
floatValue() - Method in class java.lang.Short
Returns the value of this Short as a float.
floatValue() - Method in class java.lang.Float
Returns the float value of this Float object.
floatValue() - Method in class java.lang.Integer
Returns the value of this Integer as a float.
floatValue() - Method in class java.lang.Byte
Returns the value of this Byte as a float.
floatValue() - Method in class java.lang.Double
Returns the float value of this Double.
floatValue() - Method in class java.math.BigInteger
Converts this BigInteger to a float.
floatValue() - Method in class java.math.BigDecimal
Converts this BigDecimal to a float.
floor(double) - Static method in class java.lang.StrictMath
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.
floor(double) - Static method in class java.lang.Math
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.
floppyDriveIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
FlowLayout - class java.awt.FlowLayout.
A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph.
FlowLayout() - Constructor for class java.awt.FlowLayout
Constructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int) - Constructor for class java.awt.FlowLayout
Constructs a new Flow Layout with the specified alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int, int, int) - Constructor for class java.awt.FlowLayout
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.
FlowView - class javax.swing.text.FlowView.
A View that tries to flow it's children into some partially constrained space.
FlowView.FlowStrategy - class javax.swing.text.FlowView.FlowStrategy.
Strategy for maintaining the physical form of the flow.
FlowView.FlowStrategy() - Constructor for class javax.swing.text.FlowView.FlowStrategy
FlowView(Element, int) - Constructor for class javax.swing.text.FlowView
Constructs a FlowView for the given element.
flush() - Method in class java.awt.Image
Flushes all resources being used by this Image object.
flush() - Method in class java.awt.image.BufferedImage
Flushes all resources being used to cache optimization information.
flush() - Method in class java.io.Writer
Flush the stream.
flush() - Method in class java.io.FilterWriter
Flush the stream.
flush() - Method in class java.io.OutputStream
Flushes this output stream and forces any buffered output bytes to be written out.
flush() - Method in class java.io.FilterOutputStream
Flushes this output stream and forces any buffered output bytes to be written out to the stream.
flush() - Method in class java.io.PrintStream
Flush the stream.
flush() - Method in class java.io.PipedWriter
Flushes this output stream and forces any buffered output characters to be written out.
flush() - Method in class java.io.DataOutputStream
Flushes this data output stream.
flush() - Method in interface java.io.ObjectOutput
Flushes the stream.
flush() - Method in class java.io.StringWriter
Flush the stream.
flush() - Method in class java.io.OutputStreamWriter
Flush the stream.
flush() - Method in class java.io.PrintWriter
Flush the stream.
flush() - Method in class java.io.ObjectOutputStream
Flushes the stream.
flush() - Method in class java.io.BufferedOutputStream
Flushes this buffered output stream.
flush() - Method in class java.io.CharArrayWriter
Flush the stream.
flush() - Method in class java.io.PipedOutputStream
Flushes this output stream and forces any buffered output bytes to be written out.
flush() - Method in class java.io.BufferedWriter
Flush the stream.
flush() - Method in interface javax.sound.sampled.DataLine
Flushes queued data from the line.
flush() - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
flush() - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
The last method called on the reader.
flushAttributes() - Method in class javax.swing.text.html.parser.Parser
flushCaches() - Static method in class java.beans.Introspector
Flush all of the Introspector's internal caches.
flushFromCaches(Class) - Static method in class java.beans.Introspector
Flush the Introspector's internal cached information for a given class.
flushRequirementChanges() - Method in class javax.swing.text.AsyncBoxView
Publish the changes in preferences upward to the parent view.
focus - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
FOCUS_ACCELERATOR_KEY - Static variable in class javax.swing.text.JTextComponent
The bound property name for the focus accelerator.
FOCUS_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting focus events.
FOCUS_FIRST - Static variable in class java.awt.event.FocusEvent
The first number in the range of ids used for focus events.
FOCUS_GAINED - Static variable in class java.awt.event.FocusEvent
This event indicates that the component gained the keyboard focus.
FOCUS_LAST - Static variable in class java.awt.event.FocusEvent
The last number in the range of ids used for focus events.
FOCUS_LOST - Static variable in class java.awt.event.FocusEvent
This event indicates that the component lost the keyboard focus.
FOCUS_MANAGER_CLASS_PROPERTY - Static variable in class javax.swing.FocusManager
This property name is used to get the FocusManager implementation that should be used for a given UI
FOCUS_PAINTED_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to having the border highlighted when focused, or not.
FOCUSABLE - Static variable in class javax.accessibility.AccessibleState
Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus.
FocusAdapter - class java.awt.event.FocusAdapter.
An abstract adapter class for receiving keyboard focus events.
FocusAdapter() - Constructor for class java.awt.event.FocusAdapter
focusColor - Variable in class javax.swing.plaf.metal.MetalToggleButtonUI
focusColor - Variable in class javax.swing.plaf.metal.MetalRadioButtonUI
focusColor - Variable in class javax.swing.plaf.metal.MetalButtonUI
FOCUSED - Static variable in class javax.accessibility.AccessibleState
Indicates this object currently has the keyboard focus.
focusedCompIndex - Variable in class javax.swing.plaf.basic.BasicToolBarUI
FocusEvent - class java.awt.event.FocusEvent.
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusEvent(Component, int) - Constructor for class java.awt.event.FocusEvent
Constructs a FocusEvent object and identifies it as a permanent change in focus.
FocusEvent(Component, int, boolean) - Constructor for class java.awt.event.FocusEvent
Constructs a FocusEvent object and identifies whether or not the change is temporary.
focusGained(FocusEvent) - Method in class java.awt.AWTEventMulticaster
Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
focusGained(FocusEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
focusGained(FocusEvent) - Method in class java.awt.event.FocusAdapter
Invoked when a component gains the keyboard focus.
focusGained(FocusEvent) - Method in interface java.awt.event.FocusListener
Invoked when a component gains the keyboard focus.
focusGained(FocusEvent) - Method in class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler
focusGained(FocusEvent) - Method in class javax.swing.text.DefaultCaret
Called when the component containing the caret gains focus.
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.FocusHandler
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicListUI.FocusHandler
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.FocusHandler
Invoked when focus is activated on the tree we're in, redraws the lead row.
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
focusGained(FocusEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.FocusHandler
focusInsets - Variable in class javax.swing.plaf.basic.BasicSliderUI
focusListener - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
focusListener - Variable in class javax.swing.plaf.basic.BasicTableUI
focusListener - Variable in class javax.swing.plaf.basic.BasicListUI
focusListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
focusListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Instance of the FocusListener for this JSplitPane.
focusListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
FocusListener - interface java.awt.event.FocusListener.
The listener interface for receiving keyboard focus events on a component.
focusLost(FocusEvent) - Method in class java.awt.AWTEventMulticaster
Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
focusLost(FocusEvent) - Method in class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
focusLost(FocusEvent) - Method in class java.awt.event.FocusAdapter
Invoked when a component loses the keyboard focus.
focusLost(FocusEvent) - Method in interface java.awt.event.FocusListener
Invoked when a component loses the keyboard focus.
focusLost(FocusEvent) - Method in class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler
focusLost(FocusEvent) - Method in class javax.swing.text.DefaultCaret
Called when the component containing the caret loses focus.
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.FocusHandler
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicListUI.FocusHandler
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.FocusHandler
Invoked when focus is activated on the tree we're in, redraws the lead row.
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
focusLost(FocusEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.FocusHandler
FocusManager - class javax.swing.FocusManager.
Swing Focus Manager
FocusManager() - Constructor for class javax.swing.FocusManager
focusNextComponent(Component) - Method in class javax.swing.FocusManager
Cause the focus manager to set the focus on the next focusable component You can call this method to cause the focus manager to focus the next component
focusNextComponent(Component) - Method in class javax.swing.DefaultFocusManager
Cause the focus manager to set the focus on the next focusable component
focusPreviousComponent(Component) - Method in class javax.swing.FocusManager
Cause the focus manager to set the focus on the previous focusable component You can call this methid to cause the focus manager to focus the previous component
focusPreviousComponent(Component) - Method in class javax.swing.DefaultFocusManager
Cause the focus manager to set the focus on the previous focusable component
focusRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
FOLIO - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Folio, 8 1/2 x 13 in.
following(int) - Method in class java.text.BreakIterator
Return the first boundary following the specified offset.
font - Variable in class java.awt.FontMetrics
The actual Font from which the font metrics are created.
font - Variable in class javax.swing.tree.DefaultTreeCellEditor
Font to paint with, null indicates font of renderer is to be used.
Font - class java.awt.Font.
The Font class represents fonts.
FONT - Static variable in class java.awt.font.TextAttribute
Attribute key for the font to use to render text.
FONT - Static variable in class javax.swing.text.html.HTML.Tag
FONT - Static variable in class javax.swing.text.html.CSS.Attribute
FONT_CHANGE_BIGGER - Static variable in class javax.swing.text.html.HTMLEditorKit
The font size increase to next value action identifier
FONT_CHANGE_SMALLER - Static variable in class javax.swing.text.html.HTMLEditorKit
The font size decrease to next value action identifier
FONT_FAMILY - Static variable in class javax.swing.text.html.CSS.Attribute
FONT_SIZE - Static variable in class javax.swing.text.html.CSS.Attribute
FONT_STYLE - Static variable in class javax.swing.text.html.CSS.Attribute
FONT_VARIANT - Static variable in class javax.swing.text.html.CSS.Attribute
FONT_WEIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
Font(Map) - Constructor for class java.awt.Font
Creates a new Font with the specified attributes.
Font(String, int, int) - Constructor for class java.awt.Font
Creates a new Font from the specified name, style and point size.
fontChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
FontFamily - Static variable in class javax.swing.text.StyleConstants
Name of the font family.
FontFormatException - exception java.awt.FontFormatException.
Thrown by method createFont in the Font class to indicate that the specified font is bad.
FontFormatException(String) - Constructor for class java.awt.FontFormatException
Report a FontFormatException for the reason specified.
FontMetrics - class java.awt.FontMetrics.
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
FontMetrics(Font) - Constructor for class java.awt.FontMetrics
Creates a new FontMetrics object for finding out height and width information about the specified Font and specific character glyphs in that Font.
FontRenderContext - class java.awt.font.FontRenderContext.
The FontRenderContext class is a container for the information needed to correctly measure text.
FontRenderContext() - Constructor for class java.awt.font.FontRenderContext
Constructs a new FontRenderContext object.
FontRenderContext(AffineTransform, boolean, boolean) - Constructor for class java.awt.font.FontRenderContext
Constructs a FontRenderContext object from an optional AffineTransform and two boolean values that determine if the newly constructed object has anti-aliasing or fractional metrics.
FontSize - Static variable in class javax.swing.text.StyleConstants
Name of the font size.
FontUIResource - class javax.swing.plaf.FontUIResource.
A subclass of java.awt.Font that implements UIResource.
FontUIResource(Font) - Constructor for class javax.swing.plaf.FontUIResource
FontUIResource(String, int, int) - Constructor for class javax.swing.plaf.FontUIResource
ForcedBreakWeight - Static variable in class javax.swing.text.View
The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats it's children by breaking them.
forClass() - Method in class java.io.ObjectStreamClass
Return the class in the local VM that this version is mapped to.
forDigit(int, int) - Static method in class java.lang.Character
Determines the character representation for a specific digit in the specified radix.
Foreground - Static variable in class javax.swing.text.StyleConstants
Name of the foreground color attribute.
Foreground - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the foreground color attribute.
Foreground - Static variable in class javax.swing.text.StyleConstants.ColorConstants
Name of the foreground color attribute.
FOREGROUND - Static variable in class java.awt.font.TextAttribute
Attribute key for the foreground paint adornment.
FORM - Static variable in class javax.swing.text.html.HTML.Tag
format - Variable in class javax.sound.sampled.AudioInputStream
The format of the audio data contained in the stream.
Format - class java.text.Format.
Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
FORMAT - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
Format() - Constructor for class java.text.Format
format(Date) - Method in class java.text.DateFormat
Formats a Date into a date/time string.
format(Date, StringBuffer, FieldPosition) - Method in class java.text.DateFormat
Formats a Date into a date/time string.
format(Date, StringBuffer, FieldPosition) - Method in class java.text.SimpleDateFormat
Overrides DateFormat
format(double) - Method in class java.text.NumberFormat
Specialization of format.
format(double, StringBuffer, FieldPosition) - Method in class java.text.NumberFormat
Specialization of format.
format(double, StringBuffer, FieldPosition) - Method in class java.text.ChoiceFormat
Returns pattern with formatted double.
format(double, StringBuffer, FieldPosition) - Method in class java.text.DecimalFormat
Formats a double to produce a string.
format(long) - Method in class java.text.NumberFormat
Specialization of format.
format(long, StringBuffer, FieldPosition) - Method in class java.text.NumberFormat
Specialization of format.
format(long, StringBuffer, FieldPosition) - Method in class java.text.ChoiceFormat
Specialization of format.
format(long, StringBuffer, FieldPosition) - Method in class java.text.DecimalFormat
Format a long to produce a string.
format(Object) - Method in class java.text.Format
Formats an object to produce a string.
format(Object[], StringBuffer, FieldPosition) - Method in class java.text.MessageFormat
Returns pattern with formatted objects.
format(Object, StringBuffer, FieldPosition) - Method in class java.text.Format
Formats an object to produce a string.
format(Object, StringBuffer, FieldPosition) - Method in class java.text.NumberFormat
Formats an object to produce a string.
format(Object, StringBuffer, FieldPosition) - Method in class java.text.DateFormat
Overrides Format.
format(Object, StringBuffer, FieldPosition) - Method in class java.text.MessageFormat
Returns pattern with formatted objects.
format(String, Object[]) - Static method in class java.text.MessageFormat
Convenience routine.
FormatConversionProvider - class javax.sound.sampled.spi.FormatConversionProvider.
A format conversion provider provides format conversion services from one or more input formats to one or more output formats.
FormatConversionProvider() - Constructor for class javax.sound.sampled.spi.FormatConversionProvider
FormView - class javax.swing.text.html.FormView.
Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
FormView.MouseEventListener - class javax.swing.text.html.FormView.MouseEventListener.
MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
FormView.MouseEventListener(FormView) - Constructor for class javax.swing.text.html.FormView.MouseEventListener
FormView(Element) - Constructor for class javax.swing.text.html.FormView
Creates a new FormView object.
forName(String) - Static method in class java.lang.Class
Returns the Class object associated with the class or interface with the given string name.
forName(String, boolean, ClassLoader) - Static method in class java.lang.Class
Returns the Class object associated with the class or interface with the given string name, using the given class loader.
Forward - Static variable in class javax.swing.text.Position.Bias
Indicates to bias toward the next character in the model.
forwardAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically forward one position.
forwardUpdate(DocumentEvent.ElementChange, DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.View
Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
forwardUpdate(DocumentEvent.ElementChange, DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.BoxView
Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
forwardUpdate(DocumentEvent.ElementChange, DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.TableView
forwardUpdateToView(View, DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.View
Forward the DocumentEvent to the give child view.
FRACTION_FIELD - Static variable in class java.text.NumberFormat
Field constant used to construct a FieldPosition object.
frame - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
frame - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
frame - Variable in class javax.swing.plaf.basic.BasicDesktopIconUI
Frame - class java.awt.Frame.
A Frame is a top-level window with a title and a border.
FRAME - Static variable in class javax.accessibility.AccessibleRole
A top level window with a title bar, border, menu bar, etc.
FRAME - Static variable in class javax.swing.text.html.HTML.Tag
FRAME_CONTENT_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Frame Content layer.
FRAME_ICON_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
Frame.AccessibleAWTFrame - class java.awt.Frame.AccessibleAWTFrame.
This class implements accessibility support for the Frame class.
Frame.AccessibleAWTFrame(Frame) - Constructor for class java.awt.Frame.AccessibleAWTFrame
Frame() - Constructor for class java.awt.Frame
Constructs a new instance of Frame that is initially invisible.
Frame(GraphicsConfiguration) - Constructor for class java.awt.Frame
Create a Frame with the specified GraphicsConfiguration of a screen device.
Frame(String) - Constructor for class java.awt.Frame
Constructs a new, initially invisible Frame object with the specified title.
Frame(String, GraphicsConfiguration) - Constructor for class java.awt.Frame
Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.
FRAMEBITS - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again.
FRAMEBORDER - Static variable in class javax.swing.text.html.HTML.Attribute
frameIcon - Variable in class javax.swing.JInternalFrame
The icon shown in the top-left corner of the frame.
frameInit() - Method in class javax.swing.JFrame
Called by the constructors to init the JFrame properly.
frameLength - Variable in class javax.sound.sampled.AudioInputStream
This stream's length, in sample frames.
framePos - Variable in class javax.sound.sampled.AudioInputStream
The current position in this stream, in sample frames (zero-based).
frameRate - Variable in class javax.sound.sampled.AudioFormat
The number of frames played or recorded per second, for sounds that have this format.
FRAMESET - Static variable in class javax.swing.text.html.HTML.Tag
frameSize - Variable in class javax.sound.sampled.AudioInputStream
The size of each frame, in bytes.
frameSize - Variable in class javax.sound.sampled.AudioFormat
The number of bytes in each frame of a sound that has this format.
FRANCE - Static variable in class java.util.Locale
Useful constant for country.
FREE_MEM - exception org.omg.CORBA.FREE_MEM.
The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
FREE_MEM() - Constructor for class org.omg.CORBA.FREE_MEM
Constructs a FREE_MEM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
FREE_MEM(int, CompletionStatus) - Constructor for class org.omg.CORBA.FREE_MEM
Constructs a FREE_MEM exception with the specified minor code and completion status.
FREE_MEM(String) - Constructor for class org.omg.CORBA.FREE_MEM
Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
FREE_MEM(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.FREE_MEM
Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.
FREE_STANDING_PROP - Static variable in class javax.swing.plaf.metal.MetalScrollBarUI
freeMemory() - Method in class java.lang.Runtime
Returns the amount of free memory in the system.
FRENCH - Static variable in class java.util.Locale
Useful constant for language.
FRIDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Friday.
from_any(Any) - Method in interface org.omg.CORBA.DynAny
Make a DynAny object from an Any object.
from_int(int) - Static method in class org.omg.CORBA.SetOverrideType
Converts the given int to the corresponding SetOverrideType instance.
from_int(int) - Static method in class org.omg.CORBA.TCKind
Converts the given int to the corresponding TCKind instance.
from_int(int) - Static method in class org.omg.CORBA.CompletionStatus
Creates a CompletionStatus object from the given int.
from_int(int) - Static method in class org.omg.CORBA.DefinitionKind
Creates a DefinitionKind instance corresponding to the given code .
from_int(int) - Static method in class org.omg.CosNaming.BindingType
from_int(int) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
fromCIEXYZ(float[]) - Method in class java.awt.color.ColorSpace
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
fromCIEXYZ(float[]) - Method in class java.awt.color.ICC_ColorSpace
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
fromIndex - Variable in class javax.swing.event.TableColumnModelEvent
The index of the column from where it was moved or removed
fromRGB(float[]) - Method in class java.awt.color.ColorSpace
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
fromRGB(float[]) - Method in class java.awt.color.ICC_ColorSpace
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
FULL - Static variable in class java.text.DateFormat
Constant for full style pattern.
FULL_DECOMPOSITION - Static variable in class java.text.Collator
Decomposition mode value.
FULLWIDTH_DIGITS - Static variable in class java.awt.im.InputSubset
Constant for the fullwidth digits included in the Unicode halfwidth and fullwidth forms character block.
FULLWIDTH_LATIN - Static variable in class java.awt.im.InputSubset
Constant for the fullwidth ASCII variants subset of the Unicode halfwidth and fullwidth forms character block.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


G-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

G

GapContent - class javax.swing.text.GapContent.
An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
GapContent() - Constructor for class javax.swing.text.GapContent
Creates a new GapContent object.
GapContent(int) - Constructor for class javax.swing.text.GapContent
Creates a new GapContent object, with the initial size specified.
gc() - Static method in class java.lang.System
Runs the garbage collector.
gc() - Method in class java.lang.Runtime
Runs the garbage collector.
gcd(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is the greatest common divisor of abs(this) and abs(val).
GENERAL - Static variable in interface javax.swing.text.html.parser.DTDConstants
GENERAL_PUNCTUATION - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GeneralPath - class java.awt.geom.GeneralPath.
The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves.
GeneralPath() - Constructor for class java.awt.geom.GeneralPath
Constructs a new GeneralPath object.
GeneralPath(int) - Constructor for class java.awt.geom.GeneralPath
Constructs a new GeneralPath object with the specified winding rule to control operations that require the interior of the path to be defined.
GeneralPath(int, int) - Constructor for class java.awt.geom.GeneralPath
Constructs a new GeneralPath object with the specified winding rule and the specified initial capacity to store path coordinates.
GeneralPath(Shape) - Constructor for class java.awt.geom.GeneralPath
Constructs a new GeneralPath object from an arbitrary Shape object.
GeneralSecurityException - exception java.security.GeneralSecurityException.
This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
GeneralSecurityException() - Constructor for class java.security.GeneralSecurityException
Constructs a GeneralSecurityException with no detail message.
GeneralSecurityException(String) - Constructor for class java.security.GeneralSecurityException
Constructs a GeneralSecurityException with the specified detail message.
generateCertificate(InputStream) - Method in class java.security.cert.CertificateFactory
Generates a certificate object and initializes it with the data read from the input stream inStream.
generateCertificates(InputStream) - Method in class java.security.cert.CertificateFactory
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
generateCRL(InputStream) - Method in class java.security.cert.CertificateFactory
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
generateCRLs(InputStream) - Method in class java.security.cert.CertificateFactory
Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
generateKeyPair() - Method in class java.security.KeyPairGeneratorSpi
Generates a key pair.
generateKeyPair() - Method in class java.security.KeyPairGenerator
Generates a key pair.
generateParameters() - Method in class java.security.AlgorithmParameterGenerator
Generates the parameters.
generatePrivate(KeySpec) - Method in class java.security.KeyFactory
Generates a private key object from the provided key specification (key material).
generatePublic(KeySpec) - Method in class java.security.KeyFactory
Generates a public key object from the provided key specification (key material).
generateSeed(int) - Method in class java.security.SecureRandom
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
genKeyPair() - Method in class java.security.KeyPairGenerator
Generates a key pair.
GEOMETRIC_SHAPES - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GEORGIAN - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GERMAN - Static variable in class java.util.Locale
Useful constant for language.
GERMANY - Static variable in class java.util.Locale
Useful constant for country.
get_any() - Method in interface org.omg.CORBA.DynAny
Retrieves the org.omg.CORBA.Any contained in this DynAny object.
get_boolean() - Method in interface org.omg.CORBA.DynAny
Retrieves the boolean contained in this DynAny object.
get_char() - Method in interface org.omg.CORBA.DynAny
Retrieves the char contained in this DynAny object.
get_codebase(Object) - Method in class org.omg.CORBA_2_3.portable.Delegate
Returns the codebase for object reference provided.
get_compact_typecode() - Method in class org.omg.CORBA.TypeCode
Strips out all optional name and member name fields, but leaves all alias typecodes intact.
get_current() - Method in class org.omg.CORBA.ORB
Deprecated. use resolve_initial_references.
get_default_context() - Method in class org.omg.CORBA.ORB
Gets the default Context object.
get_domain_managers(Object) - Method in class org.omg.CORBA.portable.Delegate
Retrieves the DomainManagers of this object.
get_domain_policy(int) - Method in interface org.omg.CORBA.DomainManagerOperations
This returns the policy of the specified type for objects in this domain.
get_double() - Method in interface org.omg.CORBA.DynAny
Retrieves the double contained in this DynAny object.
get_elements() - Method in interface org.omg.CORBA.DynArray
Returns the value of all the elements of this array.
get_elements() - Method in interface org.omg.CORBA.DynSequence
Returns the value of every element in this sequence.
get_float() - Method in interface org.omg.CORBA.DynAny
Retrieves the float contained in this DynAny object.
get_id() - Method in class org.omg.CORBA.StringValueHelper
get_id() - Method in class org.omg.CORBA.WStringValueHelper
get_id() - Method in interface org.omg.CORBA.portable.BoxedValueHelper
get_interface_def(Object) - Method in class org.omg.CORBA.portable.Delegate
Return an InterfaceDef for the object reference provided.
get_long() - Method in interface org.omg.CORBA.DynAny
Retrieves the int contained in this DynAny object.
get_longlong() - Method in interface org.omg.CORBA.DynAny
Retrieves the long contained in this DynAny object.
get_members() - Method in interface org.omg.CORBA.DynStruct
Returns an array containing all the members of the stored struct.
get_members() - Method in interface org.omg.CORBA.DynValue
Returns an array containing all the members of the value object stored in this DynValue.
get_next_response() - Method in class org.omg.CORBA.ORB
Gets the next Request instance for which a response has been received.
get_octet() - Method in interface org.omg.CORBA.DynAny
Retrieves the byte contained in this DynAny object.
get_policy(Object, int) - Method in class org.omg.CORBA.portable.Delegate
Returns the Policy object of the specified type which applies to this object.
get_primitive_tc(TCKind) - Method in class org.omg.CORBA.ORB
Retrieves the TypeCode object that represents the given primitive IDL type.
get_reference() - Method in interface org.omg.CORBA.DynAny
Retrieves the org.omg.CORBA.Other contained in this DynAny object.
get_response() - Method in class org.omg.CORBA.Request
Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
get_service_information(short, ServiceInformationHolder) - Method in class org.omg.CORBA.ORB
See package comments regarding unimplemented features.
get_short() - Method in interface org.omg.CORBA.DynAny
Retrieves the short contained in this DynAny object.
get_string() - Method in interface org.omg.CORBA.DynAny
Retrieves the String contained in this DynAny object.
get_typecode() - Method in interface org.omg.CORBA.DynAny
Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
get_ulong() - Method in interface org.omg.CORBA.DynAny
Retrieves the int contained in this DynAny object.
get_ulonglong() - Method in interface org.omg.CORBA.DynAny
Retrieves the long contained in this DynAny object.
get_ushort() - Method in interface org.omg.CORBA.DynAny
Retrieves the short contained in this DynAny object.
get_val() - Method in interface org.omg.CORBA.DynAny
Retrieves the java.io.Serializable object contained in this DynAny object.
get_value_def(String) - Method in class org.omg.CORBA_2_3.ORB
get_value() - Method in interface org.omg.CORBA.DynFixed
Returns the value of the fixed type represented in this DynFixed object.
get_values(String, int, String) - Method in class org.omg.CORBA.Context
Retrieves the NamedValue objects whose name field matches the given name or name pattern.
get_wchar() - Method in interface org.omg.CORBA.DynAny
Retrieves the char contained in this DynAny object.
get_wstring() - Method in interface org.omg.CORBA.DynAny
Retrieves the String contained in this DynAny object.
get() - Method in class java.lang.ThreadLocal
Returns the value in the calling thread's copy of this ThreadLocal variable.
get() - Method in class java.lang.InheritableThreadLocal
Returns the value in the calling thread's copy of this ThreadLocal variable.
get() - Method in class java.lang.ref.Reference
Returns this reference object's referent.
get() - Method in class java.lang.ref.PhantomReference
Returns this reference object's referent.
get() - Method in class java.lang.ref.SoftReference
Returns this reference object's referent.
get() - Method in class java.rmi.MarshalledObject
Returns a new copy of the contained marshalledobject.
get() - Method in class javax.naming.directory.BasicAttribute
Retrieves one of this attribute's values.
get() - Method in interface javax.naming.directory.Attribute
Retrieves one of this attribute's values.
get(int) - Method in class java.util.BitSet
Returns the value of the bit with the specified index.
get(int) - Method in class java.util.AbstractList
Returns the element at the specified position in this list.
get(int) - Method in class java.util.Vector
Returns the element at the specified position in this Vector.
get(int) - Method in class java.util.AbstractSequentialList
Returns the element at the specified position in this list.
get(int) - Method in class java.util.Calendar
Gets the value for a given time field.
get(int) - Method in class java.util.LinkedList
Returns the element at the specified position in this list.
get(int) - Method in interface java.util.List
Returns the element at the specified position in this list.
get(int) - Method in class java.util.ArrayList
Returns the element at the specified position in this list.
get(int) - Method in class javax.sound.midi.Track
Obtains the event at the specified index.
get(int) - Method in class javax.naming.Reference
Retrieves the address at index posn.
get(int) - Method in interface javax.naming.Name
Retrieves a component of this name.
get(int) - Method in class javax.naming.CompoundName
Retrieves a component of this compound name.
get(int) - Method in class javax.naming.CompositeName
Retrieves a component of this composite name.
get(int) - Method in class javax.naming.directory.BasicAttribute
get(int) - Method in interface javax.naming.directory.Attribute
Retrieves the attribute value from the ordered list of attribute values.
get(int) - Method in class javax.swing.DefaultListModel
Returns the element at the specified position in this list.
get(KeyStroke) - Method in class javax.swing.InputMap
Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.
get(Object) - Method in class java.awt.RenderingHints
Returns the value to which the specified key is mapped.
get(Object) - Method in class java.lang.reflect.Field
Returns the value of the field represented by this Field, on the specified object.
get(Object) - Method in class java.util.Dictionary
Returns the value to which the key is mapped in this dictionary.
get(Object) - Method in class java.util.Hashtable
Returns the value to which the specified key is mapped in this hashtable.
get(Object) - Method in class java.util.AbstractMap
Returns the value to which this map maps the specified key.
get(Object) - Method in class java.util.WeakHashMap
Returns the value to which this map maps the specified key.
get(Object) - Method in class java.util.TreeMap
Returns the value to which this map maps the specified key.
get(Object) - Method in class java.util.HashMap
Returns the value to which this map maps the specified key.
get(Object) - Method in interface java.util.Map
Returns the value to which this map maps the specified key.
get(Object) - Method in class java.util.jar.Attributes
Returns the value of the specified attribute name, or null if the attribute name was not found.
get(Object) - Method in class javax.swing.ActionMap
Returns the binding for key, messaging the parent ActionMap if the binding is not locally defined.
get(Object) - Method in class javax.swing.UIDefaults
Returns the value for key.
get(Object) - Static method in class javax.swing.UIManager
Returns an object from the defaults table.
get(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object.
get(String) - Method in class javax.accessibility.AccessibleRelationSet
Returns the relation that matches the specified key.
get(String) - Method in class javax.naming.Reference
Retrieves the first address that has the address type 'addrType'.
get(String) - Method in interface javax.naming.directory.Attributes
Retrieves the attribute with the given attribute id from the attribute set.
get(String) - Method in class javax.naming.directory.BasicAttributes
get(String, boolean) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named boolean field from the persistent field.
get(String, byte) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named byte field from the persistent fields.
get(String, char) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named char field from the persistent fields.
get(String, double) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named double field from the persistent field.
get(String, float) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named float field from the persistent fields.
get(String, int) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named int field from the persistent fields.
get(String, long) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named long field from the persistent fields.
get(String, Object) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named Object field from the persistent field.
get(String, short) - Method in class java.io.ObjectInputStream.GetField
Get the value of the named short field from the persistent fields.
get2DigitYearStart() - Method in class java.text.SimpleDateFormat
Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.
getAbsoluteFile() - Method in class java.io.File
Returns the absolute form of this abstract pathname.
getAbsolutePath() - Method in class java.io.File
Returns the absolute pathname string of this abstract pathname.
getAccelerator() - Method in class javax.swing.JMenuItem
Returns the KeyStroke which serves as an accelerator for the menu item.
getAcceleratorForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getAcceleratorForeground() - Method in class javax.swing.plaf.metal.MetalTheme
getAcceleratorSelectedForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getAcceleratorSelectedForeground() - Method in class javax.swing.plaf.metal.MetalTheme
getAcceleratorString() - Method in class javax.swing.plaf.metal.MetalToolTipUI
getAcceptAllFileFilter() - Method in class javax.swing.JFileChooser
Returns the AcceptAll file filter.
getAcceptAllFileFilter(JFileChooser) - Method in class javax.swing.plaf.FileChooserUI
getAcceptAllFileFilter(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
Returns the default accept all file filter
getAcceptAllFileFilter(JFileChooser) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getAcceptAllFileFilter on each UI handled by this MultiUI.
getAccessibleAction() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class java.awt.Choice.AccessibleAWTChoice
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class java.awt.Button.AccessibleAWTButton
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleAction associated with this object that supports one or more actions.
getAccessibleAction() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleAction() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleAction associated with this object.
getAccessibleAction() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleAction associated with this object if one exists.
getAccessibleAction() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleActionAnchor(int) - Method in class javax.accessibility.AccessibleHyperlink
Returns an object that represents the link anchor, as appropriate for that link.
getAccessibleActionAnchor(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Return an object that represents the link anchor, as appropriate for that link.
getAccessibleActionCount() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class java.awt.Choice.AccessibleAWTChoice
Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
getAccessibleActionCount() - Method in class java.awt.Button.AccessibleAWTButton
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class javax.accessibility.AccessibleHyperlink
Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g.
getAccessibleActionCount() - Method in interface javax.accessibility.AccessibleAction
Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
getAccessibleActionCount() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g.
getAccessibleActionCount() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Returns the number of Actions available in this object.
getAccessibleActionCount() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Returns the number of accessible actions available in this tree node.
getAccessibleActionDescription(int) - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class java.awt.Choice.AccessibleAWTChoice
Returns a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class java.awt.Button.AccessibleAWTButton
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class javax.accessibility.AccessibleHyperlink
Returns a String description of this particular link action.
getAccessibleActionDescription(int) - Method in interface javax.accessibility.AccessibleAction
Returns a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Return a String description of this particular link action.
getAccessibleActionDescription(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Return a description of the specified action of the object.
getAccessibleActionDescription(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Return a description of the specified action of the tree node.
getAccessibleActionObject(int) - Method in class javax.accessibility.AccessibleHyperlink
Returns an object that represents the link action, as appropriate for that link.
getAccessibleActionObject(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Returns a URL object that represents the link.
getAccessibleAt(Component, Point) - Static method in class javax.swing.SwingUtilities
Returns the Accessible child contained at the local coordinate Point, if one exists.
getAccessibleAt(int, int) - Method in interface javax.accessibility.AccessibleTable
Returns the Accessible at a specified row and column in the table.
getAccessibleAt(int, int) - Method in class javax.swing.JTable.AccessibleJTable
getAccessibleAt(Point) - Method in class java.awt.Component.AccessibleAWTComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class java.awt.Container.AccessibleAWTContainer
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class java.awt.List.AccessibleAWTList
Returns the Accessible child contained at the local coordinate Point, if one exists.
getAccessibleAt(Point) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in interface javax.accessibility.AccessibleComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
getAccessibleAt(Point) - Method in class javax.swing.JList.AccessibleJList
Returns the Accessible child contained at the local coordinate Point, if one exists.
getAccessibleAt(Point) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleAt(Point) - Method in class javax.swing.JTree.AccessibleJTree
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
getAccessibleAt(Point) - Method in class javax.swing.JTable.AccessibleJTable
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
getAccessibleAt(Point) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader
Returns the Accessible child, if one exists, contained at the local coordinate Point.
getAccessibleAt(Point) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleCaption() - Method in interface javax.accessibility.AccessibleTable
Returns the caption for the table.
getAccessibleCaption() - Method in class javax.swing.JTable.AccessibleJTable
Returns the caption for the table.
getAccessibleChild(Component, int) - Static method in class javax.swing.SwingUtilities
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class java.awt.Component.AccessibleAWTComponent
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class java.awt.Container.AccessibleAWTContainer
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class java.awt.List.AccessibleAWTList
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Return the specified Accessible child of the object.
getAccessibleChild(int) - Method in class javax.accessibility.AccessibleContext
Returns the specified Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JComponent.AccessibleJComponent
Returns the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
Return the specified Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JMenu.AccessibleJMenu
Returns the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Returns the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JList.AccessibleJList
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleChild(int) - Method in class javax.swing.JTree.AccessibleJTree
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Return the specified Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JTable.AccessibleJTable
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Return the specified Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Returns the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader
Return the nth Accessible child of the object.
getAccessibleChild(int) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.ComponentUI
Return the nth Accessible child of the object.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiListUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiTableUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChild(JComponent, int) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call getAccessibleChild on each UI handled by this MultiUI.
getAccessibleChildrenCount() - Method in class java.awt.Component.AccessibleAWTComponent
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class java.awt.Container.AccessibleAWTContainer
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class java.awt.List.AccessibleAWTList
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Returns the number of accessible children of the object.
getAccessibleChildrenCount() - Method in class javax.accessibility.AccessibleContext
Returns the number of accessible children of the object.
getAccessibleChildrenCount() - Method in class javax.swing.JComponent.AccessibleJComponent
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JMenu.AccessibleJMenu
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JList.AccessibleJList
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleChildrenCount() - Method in class javax.swing.JTree.AccessibleJTree
Returns the number of top-level children nodes of this JTree.
getAccessibleChildrenCount() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JTable.AccessibleJTable
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader
Returns the number of accessible children in the object.
getAccessibleChildrenCount() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleChildrenCount(Component) - Static method in class javax.swing.SwingUtilities
Returns the number of accessible children in the object.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.ComponentUI
Returns the number of accessible children in the object.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleChildrenCount(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call getAccessibleChildrenCount on each UI handled by this MultiUI.
getAccessibleColumnAtIndex(int) - Method in class javax.swing.JTable.AccessibleJTable
getAccessibleColumnCount() - Method in interface javax.accessibility.AccessibleTable
Returns the number of columns in the table.
getAccessibleColumnCount() - Method in class javax.swing.JTable.AccessibleJTable
getAccessibleColumnDescription(int) - Method in interface javax.accessibility.AccessibleTable
Returns the description text of the specified column in the table.
getAccessibleColumnDescription(int) - Method in class javax.swing.JTable.AccessibleJTable
Return the description of the specified column in the table.
getAccessibleColumnExtentAt(int, int) - Method in interface javax.accessibility.AccessibleTable
Returns the number of columns occupied by the Accessible at a specified row and column in the table.
getAccessibleColumnExtentAt(int, int) - Method in class javax.swing.JTable.AccessibleJTable
Returns the number of columns occupied by the Accessible at a given (row, column)
getAccessibleColumnHeader() - Method in interface javax.accessibility.AccessibleTable
Returns the column headers as an AccessibleTable.
getAccessibleColumnHeader() - Method in class javax.swing.JTable.AccessibleJTable
Return the column headers as an AccessibleTable.
getAccessibleComponent() - Method in class java.awt.Component.AccessibleAWTComponent
Get the AccessibleComponent associated with this object if one exists.
getAccessibleComponent() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the AccessibleComponent associated with this object if one exists.
getAccessibleComponent() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleComponent associated with this object that has a graphical representation.
getAccessibleComponent() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
Get the AccessibleComponent associated with this object.
getAccessibleComponent() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleComponent associated with this object.
getAccessibleComponent() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleComponent associated with this object if one exists.
getAccessibleComponent() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
Get the AccessibleComponent associated with this object.
getAccessibleContext() - Method in class java.applet.Applet
Gets the AccessibleContext associated with this Applet.
getAccessibleContext() - Method in class java.awt.Component
Get the AccessibleContext associated with this Component
getAccessibleContext() - Method in class java.awt.Panel
Gets the AccessibleContext associated with this Panel.
getAccessibleContext() - Method in class java.awt.ScrollPane
Gets the AccessibleContext associated with this ScrollPane.
getAccessibleContext() - Method in class java.awt.Scrollbar
Gets the AccessibleContext associated with this Scrollbar.
getAccessibleContext() - Method in class java.awt.Canvas
Gets the AccessibleContext associated with this Canvas.
getAccessibleContext() - Method in class java.awt.MenuComponent
Get the AccessibleContext associated with this MenuComponent
getAccessibleContext() - Method in class java.awt.MenuItem
Gets the AccessibleContext associated with this MenuItem.
getAccessibleContext() - Method in class java.awt.Menu
Gets the AccessibleContext associated with this Menu.
getAccessibleContext() - Method in class java.awt.Checkbox
Gets the AccessibleContext associated with this Checkbox.
getAccessibleContext() - Method in class java.awt.Window
Gets the AccessibleContext associated with this Window.
getAccessibleContext() - Method in class java.awt.Dialog
Gets the AccessibleContext associated with this Dialog.
getAccessibleContext() - Method in class java.awt.MenuBar
Gets the AccessibleContext associated with this MenuBar.
getAccessibleContext() - Method in class java.awt.List
Gets the AccessibleContext associated with this List.
getAccessibleContext() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Gets the AccessibleContext for this object.
getAccessibleContext() - Method in class java.awt.TextComponent
Gets the AccessibleContext associated with this TextComponent.
getAccessibleContext() - Method in class java.awt.PopupMenu
Gets the AccessibleContext associated with this PopupMenu.
getAccessibleContext() - Method in class java.awt.Choice
Gets the AccessibleContext associated with this Choice.
getAccessibleContext() - Method in class java.awt.Frame
Gets the AccessibleContext associated with this Frame.
getAccessibleContext() - Method in class java.awt.Label
Gets the AccessibleContext associated with this Label.
getAccessibleContext() - Method in class java.awt.TextField
Gets the AccessibleContext associated with this TextField.
getAccessibleContext() - Method in class java.awt.Button
Gets the AccessibleContext associated with this Button.
getAccessibleContext() - Method in class java.awt.CheckboxMenuItem
Gets the AccessibleContext associated with this CheckboxMenuItem.
getAccessibleContext() - Method in class java.awt.TextArea
Gets the AccessibleContext associated with this TextArea.
getAccessibleContext() - Method in interface javax.accessibility.Accessible
Returns the AccessibleContext associated with this object.
getAccessibleContext() - Method in class javax.swing.JComponent
Gets the AccessibleContext associated with this JComponent.
getAccessibleContext() - Method in class javax.swing.JEditorPane
Gets the AccessibleContext associated with this JEditorPane.
getAccessibleContext() - Method in class javax.swing.JViewport
Gets the AccessibleContext associated with this JViewport.
getAccessibleContext() - Method in class javax.swing.JTabbedPane
Gets the AccessibleContext associated with this JTabbedPane.
getAccessibleContext() - Method in class javax.swing.JMenuItem
Gets the AccessibleContext associated with this JMenuItem.
getAccessibleContext() - Method in class javax.swing.JCheckBoxMenuItem
Gets the AccessibleContext associated with this JCheckBoxMenuItem.
getAccessibleContext() - Method in class javax.swing.JLayeredPane
Gets the AccessibleContext associated with this JLayeredPane.
getAccessibleContext() - Method in class javax.swing.JToggleButton
Gets the AccessibleContext associated with this JToggleButton.
getAccessibleContext() - Method in class javax.swing.JCheckBox
Gets the AccessibleContext associated with this JCheckBox.
getAccessibleContext() - Method in class javax.swing.JTextField
Gets the AccessibleContext associated with this JTextField.
getAccessibleContext() - Method in class javax.swing.JPasswordField
Gets the AccessibleContext associated with this JPasswordField.
getAccessibleContext() - Method in class javax.swing.JOptionPane
Gets the AccessibleContext associated with this JOptionPane.
getAccessibleContext() - Method in class javax.swing.JMenu
Gets the AccessibleContext associated with this JMenu.
getAccessibleContext() - Method in class javax.swing.JColorChooser
Gets the AccessibleContext associated with this JColorChooser.
getAccessibleContext() - Method in class javax.swing.JButton
Gets the AccessibleContext associated with this JButton.
getAccessibleContext() - Method in class javax.swing.JPopupMenu
Gets the AccessibleContext associated with this JPopupMenu.
getAccessibleContext() - Method in class javax.swing.JSeparator
Gets the AccessibleContext associated with this JSeparator.
getAccessibleContext() - Method in class javax.swing.JWindow
Gets the AccessibleContext associated with this JWindow.
getAccessibleContext() - Method in class javax.swing.JApplet
Gets the AccessibleContext associated with this JApplet.
getAccessibleContext() - Method in class javax.swing.JComboBox
Gets the AccessibleContext associated with this JComboBox.
getAccessibleContext() - Method in class javax.swing.JList
Gets the AccessibleContext associated with this JList.
getAccessibleContext() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
Get the AccessibleContext for this object.
getAccessibleContext() - Method in class javax.swing.JToolTip
Gets the AccessibleContext associated with this JToolTip.
getAccessibleContext() - Method in class javax.swing.CellRendererPane
Gets the AccessibleContext associated with this CellRendererPane.
getAccessibleContext() - Method in class javax.swing.JInternalFrame
Gets the AccessibleContext associated with this JInternalFrame.
getAccessibleContext() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Gets the AccessibleContext associated with this JDesktopIcon.
getAccessibleContext() - Method in class javax.swing.JPanel
Gets the AccessibleContext associated with this JPanel.
getAccessibleContext() - Method in class javax.swing.JFrame
Gets the AccessibleContext associated with this JFrame.
getAccessibleContext() - Method in class javax.swing.JSplitPane
Gets the AccessibleContext associated with this JSplitPane.
getAccessibleContext() - Method in class javax.swing.JTree
Gets the AccessibleContext associated with this JTree.
getAccessibleContext() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleContext associated with this tree node.
getAccessibleContext() - Method in class javax.swing.JTable
Gets the AccessibleContext associated with this JTable.
getAccessibleContext() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleContext associated with this component.
getAccessibleContext() - Method in class javax.swing.JLabel
Get the AccessibleContext of this object
getAccessibleContext() - Method in class javax.swing.JFileChooser
Gets the AccessibleContext associated with this JFileChooser.
getAccessibleContext() - Method in class javax.swing.JDesktopPane
Gets the AccessibleContext associated with this JDesktopPane.
getAccessibleContext() - Method in class javax.swing.JRadioButton
Gets the AccessibleContext associated with this JRadioButton.
getAccessibleContext() - Method in class javax.swing.JToolBar
Gets the AccessibleContext associated with this JToolBar.
getAccessibleContext() - Method in class javax.swing.JMenuBar
Gets the AccessibleContext associated with this JMenuBar.
getAccessibleContext() - Method in class javax.swing.ImageIcon
Gets the AccessibleContext associated with this ImageIcon.
getAccessibleContext() - Method in class javax.swing.JRadioButtonMenuItem
Gets the AccessibleContext associated with this JRadioButtonMenuItem.
getAccessibleContext() - Method in class javax.swing.JTextArea
Gets the AccessibleContext associated with this JTextArea.
getAccessibleContext() - Method in class javax.swing.Box
Gets the AccessibleContext associated with this Box.
getAccessibleContext() - Method in class javax.swing.Box.Filler
Gets the AccessibleContext associated with this Box.Filler.
getAccessibleContext() - Method in class javax.swing.JScrollPane
Gets the AccessibleContext associated with this JScrollPane.
getAccessibleContext() - Method in class javax.swing.JScrollBar
Gets the AccessibleContext associated with this JScrollBar.
getAccessibleContext() - Method in class javax.swing.JProgressBar
Gets the AccessibleContext associated with this JProgressBar.
getAccessibleContext() - Method in class javax.swing.JRootPane
Gets the AccessibleContext associated with this JRootPane.
getAccessibleContext() - Method in class javax.swing.JDialog
Gets the AccessibleContext associated with this JDialog.
getAccessibleContext() - Method in class javax.swing.JSlider
Gets the AccessibleContext associated with this JSlider.
getAccessibleContext() - Method in class javax.swing.table.JTableHeader
Gets the AccessibleContext associated with this JTableHeader.
getAccessibleContext() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
Get the AccessibleContext associated with this object.
getAccessibleContext() - Method in class javax.swing.text.JTextComponent
Gets the AccessibleContext associated with this JTextComponent.
getAccessibleDescription() - Method in class java.awt.Component.AccessibleAWTComponent
Get the accessible description of this object.
getAccessibleDescription() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the accessible description of this object.
getAccessibleDescription() - Method in class javax.accessibility.AccessibleContext
Gets the accessibleDescription property of this object.
getAccessibleDescription() - Method in class javax.swing.JComponent.AccessibleJComponent
Gets the accessible description of this object.
getAccessibleDescription() - Method in class javax.swing.JEditorPane.AccessibleJEditorPane
Gets the accessibleDescription property of this object.
getAccessibleDescription() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleDescription() - Method in class javax.swing.JToolTip.AccessibleJToolTip
Get the accessible description of this object.
getAccessibleDescription() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the accessible description of this object.
getAccessibleDescription() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the accessible description of this object.
getAccessibleDescription() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleIcon() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleIcons associated with an object that has one or more associated icons
getAccessibleIcon() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the AccessibleIcons associated with this object if one or more exist.
getAccessibleIcon() - Method in class javax.swing.JLabel.AccessibleJLabel
Get the AccessibleIcons associated with this object if one or more exist.
getAccessibleIconDescription() - Method in interface javax.accessibility.AccessibleIcon
Gets the description of the icon.
getAccessibleIconDescription() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the description of the icon.
getAccessibleIconHeight() - Method in interface javax.accessibility.AccessibleIcon
Gets the height of the icon
getAccessibleIconHeight() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the height of the icon.
getAccessibleIconWidth() - Method in interface javax.accessibility.AccessibleIcon
Gets the width of the icon
getAccessibleIconWidth() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the width of the icon.
getAccessibleIndexAt(int, int) - Method in class javax.swing.JTable.AccessibleJTable
Returns the index at a given (row, column) in the table
getAccessibleIndexInParent() - Method in class java.awt.Component.AccessibleAWTComponent
Get the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the 0-based index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.accessibility.AccessibleContext
Gets the 0-based index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleIndexInParent() - Method in class javax.swing.JTree.AccessibleJTree
Get the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the index of this object in its accessible parent.
getAccessibleIndexInParent() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleIndexInParent(Component) - Static method in class javax.swing.SwingUtilities
Get the index of this object in its accessible parent.
getAccessibleName() - Method in class java.awt.Component.AccessibleAWTComponent
Get the accessible name of this object.
getAccessibleName() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the accessible name of this object.
getAccessibleName() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the accessible name of this object.
getAccessibleName() - Method in class java.awt.Label.AccessibleAWTLabel
Get the accessible name of this object.
getAccessibleName() - Method in class java.awt.Button.AccessibleAWTButton
Get the accessible name of this object.
getAccessibleName() - Method in class javax.accessibility.AccessibleContext
Gets the accessibleName property of this object.
getAccessibleName() - Method in class javax.swing.JComponent.AccessibleJComponent
Gets the accessible name of this object.
getAccessibleName() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleName() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JFrame.AccessibleJFrame
Get the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JLabel.AccessibleJLabel
Get the accessible name of this object.
getAccessibleName() - Method in class javax.swing.JDialog.AccessibleJDialog
Get the accessible name of this object.
getAccessibleName() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleParent() - Method in class java.awt.Component.AccessibleAWTComponent
Get the Accessible parent of this object.
getAccessibleParent() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the Accessible parent of this object.
getAccessibleParent() - Method in class javax.accessibility.AccessibleContext
Gets the Accessible parent of this object.
getAccessibleParent() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the Accessible parent of this object.
getAccessibleParent() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the Accessible parent of this object.
getAccessibleParent() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the Accessible parent of this object.
getAccessibleRelationSet() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleRelationSet associated with an object
getAccessibleRelationSet() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the AccessibleRelationSet associated with this object if one exists.
getAccessibleRelationSet() - Method in class javax.swing.JLabel.AccessibleJLabel
Get the AccessibleRelationSet associated with this object if one exists.
getAccessibleRole() - Method in class java.applet.Applet.AccessibleApplet
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Component.AccessibleAWTComponent
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Panel.AccessibleAWTPanel
Get the role of this object.
getAccessibleRole() - Method in class java.awt.ScrollPane.AccessibleAWTScrollPane
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Canvas.AccessibleAWTCanvas
Get the role of this object.
getAccessibleRole() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the role of this object.
getAccessibleRole() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Menu.AccessibleAWTMenu
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the role of this object.
getAccessibleRole() - Method in class java.awt.MenuBar.AccessibleAWTMenuBar
Get the role of this object.
getAccessibleRole() - Method in class java.awt.List.AccessibleAWTList
Get the role of this object.
getAccessibleRole() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the role of this object.
getAccessibleRole() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Gets the role of this object.
getAccessibleRole() - Method in class java.awt.PopupMenu.AccessibleAWTPopupMenu
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Window.AccessibleAWTWindow
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Dialog.AccessibleAWTDialog
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Choice.AccessibleAWTChoice
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Frame.AccessibleAWTFrame
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Label.AccessibleAWTLabel
Get the role of this object.
getAccessibleRole() - Method in class java.awt.Button.AccessibleAWTButton
Get the role of this object.
getAccessibleRole() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the role of this object.
getAccessibleRole() - Method in class javax.accessibility.AccessibleContext
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JComponent.AccessibleJComponent
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JViewport.AccessibleJViewport
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JMenuItem.AccessibleJMenuItem
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JLayeredPane.AccessibleJLayeredPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JToggleButton.AccessibleJToggleButton
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JCheckBox.AccessibleJCheckBox
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JPasswordField.AccessibleJPasswordField
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JOptionPane.AccessibleJOptionPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JMenu.AccessibleJMenu
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JColorChooser.AccessibleJColorChooser
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JButton.AccessibleJButton
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JPopupMenu.AccessibleJPopupMenu
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JList.AccessibleJList
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleRole() - Method in class javax.swing.JToolTip.AccessibleJToolTip
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JSeparator.AccessibleJSeparator
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.CellRendererPane.AccessibleCellRendererPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JPanel.AccessibleJPanel
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JTree.AccessibleJTree
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JTable.AccessibleJTable
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JFileChooser.AccessibleJFileChooser
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JDesktopPane.AccessibleJDesktopPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JRadioButton.AccessibleJRadioButton
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JLabel.AccessibleJLabel
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JToolBar.AccessibleJToolBar
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.Box.Filler.AccessibleBoxFiller
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.Box.AccessibleBox
Gets the role of this object.
getAccessibleRole() - Method in class javax.swing.JScrollPane.AccessibleJScrollPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JRootPane.AccessibleJRootPane
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader
Get the role of this object.
getAccessibleRole() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleRole() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Gets the role of this object.
getAccessibleRowAtIndex(int) - Method in class javax.swing.JTable.AccessibleJTable
getAccessibleRowCount() - Method in interface javax.accessibility.AccessibleTable
Returns the number of rows in the table.
getAccessibleRowCount() - Method in class javax.swing.JTable.AccessibleJTable
getAccessibleRowDescription(int) - Method in interface javax.accessibility.AccessibleTable
Returns the description of the specified row in the table.
getAccessibleRowDescription(int) - Method in class javax.swing.JTable.AccessibleJTable
Return the description of the specified row in the table.
getAccessibleRowExtentAt(int, int) - Method in interface javax.accessibility.AccessibleTable
Returns the number of rows occupied by the Accessible at a specified row and column in the table.
getAccessibleRowExtentAt(int, int) - Method in class javax.swing.JTable.AccessibleJTable
Returns the number of rows occupied by the Accessible at a specified row and column in the table.
getAccessibleRowHeader() - Method in interface javax.accessibility.AccessibleTable
Returns the row headers as an AccessibleTable.
getAccessibleRowHeader() - Method in class javax.swing.JTable.AccessibleJTable
Return the row headers as an AccessibleTable.
getAccessibleSelection() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the AccessibleSelection associated with this object which allows its Accessible children to be selected.
getAccessibleSelection() - Method in class java.awt.List.AccessibleAWTList
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
getAccessibleSelection() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JMenu.AccessibleJMenu
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JList.AccessibleJList
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleSelection associated with this object if one exists.
getAccessibleSelection() - Method in class javax.swing.JTable.AccessibleJTable
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleSelection associated with this object if one exists.
getAccessibleSelection() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Get the AccessibleSelection associated with this object.
getAccessibleSelection() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleSelection(int) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns an Accessible representing the specified selected child in the object.
getAccessibleSelection(int) - Method in class java.awt.List.AccessibleAWTList
Returns an Accessible representing the specified selected item in the object.
getAccessibleSelection(int) - Method in interface javax.accessibility.AccessibleSelection
Returns an Accessible representing the specified selected child of the object.
getAccessibleSelection(int) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
getAccessibleSelection(int) - Method in class javax.swing.JMenu.AccessibleJMenu
Returns the currently selected sub-menu if one is selected, otherwise null (there can only be one selection, and it can only be a sub-menu, as otherwise menu items don't remain selected).
getAccessibleSelection(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Returns an Accessible representing the specified selected child in the popup.
getAccessibleSelection(int) - Method in class javax.swing.JList.AccessibleJList
Returns an Accessible representing the specified selected item in the object.
getAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree
Returns an Accessible representing the specified selected item in the object.
getAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Returns an Accessible representing the specified selected item in the object.
getAccessibleSelection(int) - Method in class javax.swing.JTable.AccessibleJTable
Returns an Accessible representing the specified selected child in the object.
getAccessibleSelection(int) - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Returns the currently selected menu if one is selected, otherwise null.
getAccessibleSelectionCount() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns the number of Accessible children currently selected.
getAccessibleSelectionCount() - Method in class java.awt.List.AccessibleAWTList
Returns the number of items currently selected.
getAccessibleSelectionCount() - Method in interface javax.accessibility.AccessibleSelection
Returns the number of Accessible children currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
getAccessibleSelectionCount() - Method in class javax.swing.JMenu.AccessibleJMenu
Returns 1 if a sub-menu is currently selected in this menu.
getAccessibleSelectionCount() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Returns the number of Accessible children currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JList.AccessibleJList
Returns the number of items currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JTree.AccessibleJTree
Returns the number of items currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Returns the number of items currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JTable.AccessibleJTable
Returns the number of Accessible children currently selected.
getAccessibleSelectionCount() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Returns 1 if a menu is currently selected in this menu bar.
getAccessibleStateSet() - Method in class java.applet.Applet.AccessibleApplet
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.Component.AccessibleAWTComponent
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the state set of this object.
getAccessibleStateSet() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the state set of this object.
getAccessibleStateSet() - Method in class java.awt.List.AccessibleAWTList
Get the state set of this object.
getAccessibleStateSet() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the state set of this object.
getAccessibleStateSet() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Gets the state set of the TextComponent.
getAccessibleStateSet() - Method in class java.awt.Window.AccessibleAWTWindow
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.Dialog.AccessibleAWTDialog
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.Frame.AccessibleAWTFrame
Get the state of this object.
getAccessibleStateSet() - Method in class java.awt.TextField.AccessibleAWTTextField
Gets the state set of this object.
getAccessibleStateSet() - Method in class java.awt.TextArea.AccessibleAWTTextArea
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.accessibility.AccessibleContext
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JComponent.AccessibleJComponent
Gets the state of this object.
getAccessibleStateSet() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JTextField.AccessibleJTextField
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JEditorPane.AccessibleJEditorPane
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JList.AccessibleJList
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleStateSet() - Method in class javax.swing.JFrame.AccessibleJFrame
Get the state of this object.
getAccessibleStateSet() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JToolBar.AccessibleJToolBar
Get the state of this object.
getAccessibleStateSet() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Get the accessible state set of this object.
getAccessibleStateSet() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Gets the state of this object.
getAccessibleStateSet() - Method in class javax.swing.JTextArea.AccessibleJTextArea
Gets the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.JDialog.AccessibleJDialog
Get the state of this object.
getAccessibleStateSet() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the state set of this object.
getAccessibleStateSet() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleStateSet() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Gets the state set of the JTextComponent.
getAccessibleStateSet(Component) - Static method in class javax.swing.SwingUtilities
Get the state of this object.
getAccessibleSummary() - Method in interface javax.accessibility.AccessibleTable
Returns the summary description of the table.
getAccessibleSummary() - Method in class javax.swing.JTable.AccessibleJTable
Returns the summary description of the table.
getAccessibleTable() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleTable associated with an object
getAccessibleTable() - Method in class javax.swing.JTable.AccessibleJTable
Get the AccessibleTable associated with this object.
getAccessibleText() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Get the AccessibleText associated with this object.
getAccessibleText() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleText associated with this object presently editable text on the display.
getAccessibleText() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
getAccessibleText() - Method in class javax.swing.JEditorPane.AccessibleJEditorPaneHTML
getAccessibleText() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleText() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleText associated with this object if one exists.
getAccessibleText() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleText associated with this object if one exists.
getAccessibleText() - Method in class javax.swing.JLabel.AccessibleJLabel
getAccessibleText() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessibleText() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Get the AccessibleText associated with this object.
getAccessibleValue() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class java.awt.Button.AccessibleAWTButton
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.accessibility.AccessibleContext
Gets the AccessibleValue associated with this object that supports a Numerical value.
getAccessibleValue() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getAccessibleValue() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the AccessibleValue associated with this object if one exists.
getAccessibleValue() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the AccessibleValue associated with this object if one exists.
getAccessibleValue() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the AccessibleValue associated with this object.
getAccessibleValue() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getAccessory() - Method in class javax.swing.JFileChooser
Returns the accessory component.
getAccessoryPanel() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getAction() - Method in class javax.swing.AbstractButton
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
getAction() - Method in class javax.swing.JTextField
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
getAction() - Method in class javax.swing.JComboBox
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
getAction(KeyStroke) - Method in interface javax.swing.text.Keymap
Fetches the action appropriate for the given symbolic event sequence.
getActionCommand() - Method in class java.awt.MenuItem
Gets the command name of the action event that is fired by this menu item.
getActionCommand() - Method in class java.awt.Button
Returns the command name of the action event fired by this button.
getActionCommand() - Method in class java.awt.event.ActionEvent
Returns the command string associated with this action.
getActionCommand() - Method in class javax.swing.AbstractButton
Returns the action command for this button.
getActionCommand() - Method in interface javax.swing.ButtonModel
Returns the action command for this button.
getActionCommand() - Method in class javax.swing.JComboBox
Returns the action command that is included in the event sent to action listeners.
getActionCommand() - Method in class javax.swing.DefaultButtonModel
Returns the action command for this button.
getActionForKeyStroke(KeyStroke) - Method in class javax.swing.JComponent
Returns the object that will perform the action registered for a given keystroke.
getActionMap() - Method in class javax.swing.JComponent
Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.
getActionMap() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
getActions() - Method in class java.io.FilePermission
Returns the "canonical string representation" of the actions.
getActions() - Method in class java.net.SocketPermission
Returns the canonical string representation of the actions.
getActions() - Method in class java.security.Permission
Returns the actions as a String.
getActions() - Method in class java.security.BasicPermission
Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a BasicPermission.
getActions() - Method in class java.security.UnresolvedPermission
Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for an UnresolvedPermission.
getActions() - Method in class java.security.AllPermission
Returns the canonical string representation of the actions.
getActions() - Method in class java.util.PropertyPermission
Returns the "canonical string representation" of the actions.
getActions() - Method in class javax.swing.JTextField
Fetches the command list for the editor.
getActions() - Method in class javax.swing.text.JTextComponent
Fetches the command list for the editor.
getActions() - Method in class javax.swing.text.EditorKit
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
getActions() - Method in class javax.swing.text.DefaultEditorKit
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
getActions() - Method in class javax.swing.text.StyledEditorKit
Fetches the command list for the editor.
getActions() - Method in class javax.swing.text.html.HTMLEditorKit
Fetches the command list for the editor.
getActivationDesc(ActivationID) - Method in interface java.rmi.activation.ActivationSystem
Returns the activation descriptor, for the object with the activation identifier, id.
getActivationGroupDesc(ActivationGroupID) - Method in interface java.rmi.activation.ActivationSystem
Returns the activation group descriptor, for the group with the activation group identifier, id.
getActualMaximum(int) - Method in class java.util.Calendar
Return the maximum value that this field could have, given the current date.
getActualMaximum(int) - Method in class java.util.GregorianCalendar
Return the maximum value that this field could have, given the current date.
getActualMinimum(int) - Method in class java.util.Calendar
Return the minimum value that this field could have, given the current date.
getActualMinimum(int) - Method in class java.util.GregorianCalendar
Return the minimum value that this field could have, given the current date.
getAdditionalBeanInfo() - Method in interface java.beans.BeanInfo
This method allows a BeanInfo object to return an arbitrary collection of other BeanInfo objects that provide additional information on the current bean.
getAdditionalBeanInfo() - Method in class java.beans.SimpleBeanInfo
Claim there are no other relevant BeanInfo objects.
getAdditionalHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16
getAdditionalHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon
getAdditionalHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.FileIcon16
getAdditionalHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon
getAddListenerMethod() - Method in class java.beans.EventSetDescriptor
Gets the method used to add event listeners.
getAddress() - Method in class java.net.InetAddress
Returns the raw IP address of this InetAddress object.
getAddress() - Method in class java.net.DatagramPacket
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
getAdjustable() - Method in class java.awt.event.AdjustmentEvent
Returns the Adjustable object where this event originated.
getAdjustmentType() - Method in class java.awt.event.AdjustmentEvent
Returns the type of adjustment which caused the value changed event.
getAdler() - Method in class java.util.zip.Deflater
Returns the ADLER-32 value of the uncompressed data.
getAdler() - Method in class java.util.zip.Inflater
Returns the ADLER-32 value of the uncompressed data.
getAdvance() - Method in class java.awt.font.GlyphMetrics
Returns the advance width or height of the glyph.
getAdvance() - Method in class java.awt.font.TextLayout
Returns the advance of this TextLayout.
getAdvance() - Method in class java.awt.font.GraphicAttribute
Returns the advance of this GraphicAttribute.
getAdvance() - Method in class java.awt.font.ImageGraphicAttribute
Returns the advance of this ImageGraphicAttribute.
getAdvance() - Method in class java.awt.font.ShapeGraphicAttribute
Returns the advance of this ShapeGraphicAttribute.
getAdvanceBetween(int, int) - Method in class java.awt.font.TextMeasurer
Returns the graphical width of a line beginning at start and including characters up to limit.
getAfterIndex(int, int) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the String after a given index.
getAfterIndex(int, int) - Method in interface javax.accessibility.AccessibleText
Returns the String after a given index.
getAfterIndex(int, int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the String after a given index.
getAfterIndex(int, int) - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the String after a given index.
getAfterIndex(int, int) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the String after a given index.
getAlgorithm() - Method in class java.security.KeyFactory
Gets the name of the algorithm associated with this KeyFactory.
getAlgorithm() - Method in class java.security.KeyPairGenerator
Returns the standard name of the algorithm for this key pair generator.
getAlgorithm() - Method in interface java.security.Key
Returns the standard algorithm name for this key.
getAlgorithm() - Method in class java.security.AlgorithmParameters
Returns the name of the algorithm associated with this parameter object.
getAlgorithm() - Method in class java.security.AlgorithmParameterGenerator
Returns the standard name of the algorithm this parameter generator is associated with.
getAlgorithm() - Method in class java.security.SignedObject
Retrieves the name of the signature algorithm.
getAlgorithm() - Method in class java.security.MessageDigest
Returns a string that identifies the algorithm, independent of implementation details.
getAlgorithm() - Method in class java.security.Signature
Returns the name of the algorithm for this signature object.
getAlgorithmProperty(String, String) - Static method in class java.security.Security
Deprecated. This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.
getAlignedSizeRequirements(SizeRequirements[]) - Static method in class javax.swing.SizeRequirements
Determines the total space necessary to align a set of components.
getAlignment() - Method in class java.awt.Label
Gets the current alignment of this label.
getAlignment() - Method in class java.awt.FlowLayout
Gets the alignment for this layout.
getAlignment() - Method in class java.awt.font.GraphicAttribute
Returns the alignment of this GraphicAttribute.
getAlignment() - Method in class javax.swing.text.TabStop
getAlignment(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the alignment setting.
getAlignment(int) - Method in class javax.swing.text.View
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.GlyphView
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.BoxView
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.ParagraphView
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.ComponentView
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.IconView
Determines the desired alignment for this view along an axis.
getAlignment(int) - Method in class javax.swing.text.html.BlockView
Gets the alignment.
getAlignment(int) - Method in class javax.swing.text.html.ListView
Calculates the desired shape of the list.
getAlignmentX() - Method in class java.awt.Component
Returns the alignment along the x axis.
getAlignmentX() - Method in class java.awt.Container
Returns the alignment along the x axis.
getAlignmentX() - Method in class javax.swing.JComponent
Overrides Container.getAlignmentX to return the vertical alignment.
getAlignmentY() - Method in class java.awt.Component
Returns the alignment along the y axis.
getAlignmentY() - Method in class java.awt.Container
Returns the alignment along the y axis.
getAlignmentY() - Method in class javax.swing.JComponent
Overrides Container.getAlignmentY to return the horizontal alignment.
getAll() - Method in class javax.naming.Reference
Retrieves an enumeration of the addresses in this reference.
getAll() - Method in interface javax.naming.Name
Retrieves the components of this name as an enumeration of strings.
getAll() - Method in class javax.naming.CompoundName
Retrieves the components of this compound name as an enumeration of strings.
getAll() - Method in class javax.naming.CompositeName
Retrieves the components of this composite name as an enumeration of strings.
getAll() - Method in class javax.naming.directory.BasicAttribute
Retrieves an enumeration of this attribute's values.
getAll() - Method in interface javax.naming.directory.Attributes
Retrieves an enumeration of the attributes in the attribute set.
getAll() - Method in interface javax.naming.directory.Attribute
Retrieves an enumeration of the attribute's values.
getAll() - Method in class javax.naming.directory.BasicAttributes
getAllAttributeKeys() - Method in interface java.text.AttributedCharacterIterator
Returns the keys of all attributes defined on the iterator's text range.
getAllAttributeKeys() - Static method in class javax.swing.text.html.HTML
This is the set of html attributes recognized.
getAllAttributeKeys() - Static method in class javax.swing.text.html.CSS
Return the set of all possible CSS attribute keys.
getAllByName(String) - Static method in class java.net.InetAddress
Determines all the IP addresses of a host, given the host's name.
getAllFonts() - Method in class java.awt.GraphicsEnvironment
Returns an array containing a one-point size instance of all fonts available in this GraphicsEnvironment.
getAllFrames() - Method in class javax.swing.JDesktopPane
Returns all JInternalFrames currently displayed in the desktop.
getAllFramesInLayer(int) - Method in class javax.swing.JDesktopPane
Returns all JInternalFrames currently displayed in the specified layer of the desktop.
getAllowsChildren() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns true if the receiver allows children.
getAllowsChildren() - Method in class javax.swing.text.AbstractDocument.BranchElement
Returns true if the receiver allows children.
getAllowsChildren() - Method in class javax.swing.text.AbstractDocument.LeafElement
Returns true if the receiver allows children.
getAllowsChildren() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if this node is allowed to have children.
getAllowsChildren() - Method in interface javax.swing.tree.TreeNode
Returns true if the receiver allows children.
getAllowUserInteraction() - Method in class java.net.URLConnection
Returns the value of the allowUserInteraction field for this object.
getAllTags() - Static method in class javax.swing.text.html.HTML
This is the set of actual html tags that are known about the the default html reader.
getAlpha() - Method in class java.awt.Color
Returns the alpha component in the range 0-255.
getAlpha() - Method in class java.awt.AlphaComposite
Returns the alpha value of thisAlphaComposite.
getAlpha(int) - Method in class java.awt.image.ColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(int) - Method in class java.awt.image.ComponentColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(int) - Method in class java.awt.image.DirectColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(int) - Method in class java.awt.image.IndexColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(Object) - Method in class java.awt.image.ColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(Object) - Method in class java.awt.image.ComponentColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlpha(Object) - Method in class java.awt.image.DirectColorModel
Returns the alpha component for the specified pixel, scaled from 0 to 255.
getAlphaMask() - Method in class java.awt.image.DirectColorModel
Returns the mask indicating which bits in an int pixel representation contain the alpha component.
getAlphaRaster() - Method in class java.awt.image.BufferedImage
Returns a WritableRaster representing the alpha channel for BufferedImage objects with ColorModel objects that support a separate spatial alpha channel, such as ComponentColorModel and DirectColorModel.
getAlphaRaster(WritableRaster) - Method in class java.awt.image.ColorModel
Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g.
getAlphaRaster(WritableRaster) - Method in class java.awt.image.PackedColorModel
Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster.
getAlphaRaster(WritableRaster) - Method in class java.awt.image.ComponentColorModel
Returns a Raster representing the alpha channel of an image, extracted from the input Raster.
getAlphas(byte[]) - Method in class java.awt.image.IndexColorModel
Copies the array of alpha transparency components into the specified array.
getAltName() - Method in class javax.naming.CannotProceedException
Retrieves the altName field of this exception.
getAltNameCtx() - Method in class javax.naming.CannotProceedException
Retrieves the altNameCtx field of this exception.
getAmountFull(Insets, int, int) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
This determines the amount of the progress bar that should be filled based on the percent done gathered from the model.
getAmPmStrings() - Method in class java.text.DateFormatSymbols
Gets ampm strings.
getAncestor() - Method in class javax.swing.event.AncestorEvent
Returns the ancestor that the event actually occured on.
getAncestorNamed(String, Component) - Static method in class javax.swing.SwingUtilities
Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds.
getAncestorOfClass(Class, Component) - Static method in class javax.swing.SwingUtilities
Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds.
getAncestorParent() - Method in class javax.swing.event.AncestorEvent
Returns the parent of the ancestor the event actually occured on.
getAnchorRect() - Method in class java.awt.TexturePaint
Returns a copy of the anchor rectangle which positions and sizes the textured image.
getAnchorSelectionIndex() - Method in class javax.swing.DefaultListSelectionModel
getAnchorSelectionIndex() - Method in class javax.swing.JList
Returns the first index argument from the most recent addSelectionModel or setSelectionInterval call.
getAnchorSelectionIndex() - Method in interface javax.swing.ListSelectionModel
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
getAnchorSelectionPath() - Method in class javax.swing.JTree
Returns the path identified as the anchor.
getAngleExtent() - Method in class java.awt.geom.Arc2D
Returns the angular extent of the arc.
getAngleExtent() - Method in class java.awt.geom.Arc2D.Float
Returns the angular extent of the arc.
getAngleExtent() - Method in class java.awt.geom.Arc2D.Double
Returns the angular extent of the arc.
getAngleStart() - Method in class java.awt.geom.Arc2D
Returns the starting angle of the arc.
getAngleStart() - Method in class java.awt.geom.Arc2D.Float
Returns the starting angle of the arc.
getAngleStart() - Method in class java.awt.geom.Arc2D.Double
Returns the starting angle of the arc.
getApplet(String) - Method in interface java.applet.AppletContext
Finds and returns the applet in the document represented by this applet context with the given name.
getAppletContext() - Method in class java.applet.Applet
Determines this applet's context, which allows the applet to query and affect the environment in which it runs.
getAppletContext() - Method in interface java.applet.AppletStub
Gets a handler to the applet's context.
getAppletInfo() - Method in class java.applet.Applet
Returns information about this applet.
getApplets() - Method in interface java.applet.AppletContext
Finds all the applets in the document represented by this applet context.
getApproveButton(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getApproveButton(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
getApproveButtonMnemonic() - Method in class javax.swing.JFileChooser
Returns the approve button's mnemonic.
getApproveButtonMnemonic(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getApproveButtonText() - Method in class javax.swing.JFileChooser
Returns the text used in the ApproveButton in the FileChooserUI.
getApproveButtonText(JFileChooser) - Method in class javax.swing.plaf.FileChooserUI
getApproveButtonText(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getApproveButtonText(JFileChooser) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getApproveButtonText on each UI handled by this MultiUI.
getApproveButtonToolTipText() - Method in class javax.swing.JFileChooser
Returns the tooltip text used in the ApproveButton.
getApproveButtonToolTipText(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getApproveSelectionAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getArcHeight() - Method in class java.awt.geom.RoundRectangle2D
Gets the height of the arc that rounds off the corners.
getArcHeight() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the height of the arc that rounds off the corners.
getArcHeight() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the height of the arc that rounds off the corners.
getArcType() - Method in class java.awt.geom.Arc2D
Returns the arc closure type of the arc: OPEN, CHORD, or PIE.
getArcWidth() - Method in class java.awt.geom.RoundRectangle2D
Gets the width of the arc that rounds off the corners.
getArcWidth() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the width of the arc that rounds off the corners.
getArcWidth() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the width of the arc that rounds off the corners.
getAreaOfInterest() - Method in class java.awt.image.renderable.RenderContext
Gets the ares of interest currently contained in the RenderContext.
getArray() - Method in interface java.sql.Array
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
getArray() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the array of characters.
getArray(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
getArray(int) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
getArray(long, int) - Method in interface java.sql.Array
Returns an array containing a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
getArray(long, int, Map) - Method in interface java.sql.Array
Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
getArray(Map) - Method in interface java.sql.Array
Retrieves the contents of the SQL array designated by this Array object.
getArray(String) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
getArrayLength() - Method in class javax.swing.text.GapContent
Get the length of the allocated array.
getAscent() - Method in class java.awt.FontMetrics
Determines the font ascent of the Font described by this FontMetrics object.
getAscent() - Method in class java.awt.font.TextLayout
Returns the ascent of this TextLayout.
getAscent() - Method in class java.awt.font.GraphicAttribute
Returns the ascent of this GraphicAttribute.
getAscent() - Method in class java.awt.font.ImageGraphicAttribute
Returns the ascent of this ImageGraphicAttribute.
getAscent() - Method in class java.awt.font.LineMetrics
Returns the ascent of the text.
getAscent() - Method in class java.awt.font.ShapeGraphicAttribute
Returns the ascent of this ShapeGraphicAttribute.
getAscent(GlyphView) - Method in class javax.swing.text.GlyphView.GlyphPainter
getAsciiStream() - Method in interface java.sql.Clob
Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
getAsciiStream(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
getAsciiStream(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
getAsText() - Method in interface java.beans.PropertyEditor
Gets the property value as text.
getAsText() - Method in class java.beans.PropertyEditorSupport
Gets the property value as a string suitable for presentation to a human to edit.
getAsynchronousLoadPriority() - Method in class javax.swing.text.AbstractDocument
Get the asynchronous loading priority.
getAtIndex(int, int) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the String at a given index.
getAtIndex(int, int) - Method in interface javax.accessibility.AccessibleText
Returns the String at a given index.
getAtIndex(int, int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the String at a given index.
getAtIndex(int, int) - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the String at a given index.
getAtIndex(int, int) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the String at a given index.
getAttribute() - Method in class javax.naming.directory.ModificationItem
Retrieves the attribute associated with this modification item.
getAttribute(AttributedCharacterIterator.Attribute) - Method in interface java.text.AttributedCharacterIterator
Returns the value of the named attribute for the current character.
getAttribute(Object) - Method in class javax.swing.text.SimpleAttributeSet
Gets the value of an attribute.
getAttribute(Object) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Gets the value of an attribute.
getAttribute(Object) - Method in class javax.swing.text.StyleContext.NamedStyle
Gets the value of an attribute.
getAttribute(Object) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the value of an attribute.
getAttribute(Object) - Method in interface javax.swing.text.AttributeSet
Fetches the value of the given attribute.
getAttribute(String) - Static method in class javax.swing.text.html.CSS
Translate a string to a CSS.Attribute object.
getAttribute(String) - Method in class javax.swing.text.html.parser.Element
Get an attribute by name.
getAttributeByValue(String) - Method in class javax.swing.text.html.parser.Element
Get an attribute by value.
getAttributeContext() - Method in class javax.swing.text.AbstractDocument
Fetches the context for managing attributes.
getAttributeCount() - Method in class javax.swing.text.SimpleAttributeSet
Gets a count of the number of attributes.
getAttributeCount() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Gets the number of attributes that are defined.
getAttributeCount() - Method in class javax.swing.text.StyleContext.NamedStyle
Gets the number of attributes that are defined.
getAttributeCount() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the number of attributes that are defined.
getAttributeCount() - Method in interface javax.swing.text.AttributeSet
Returns the number of attributes contained in this set.
getAttributeDefinition() - Method in class javax.naming.directory.BasicAttribute
Retrieves this attribute's schema definition.
getAttributeDefinition() - Method in interface javax.naming.directory.Attribute
Retrieves the attribute's schema definition.
getAttributeKey(String) - Static method in class javax.swing.text.html.HTML
Fetch an attribute constant for a well-known attribute name (i.e.
getAttributeNames() - Method in class javax.swing.text.SimpleAttributeSet
Gets the names of the attributes in the set.
getAttributeNames() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Gets the names of all attributes.
getAttributeNames() - Method in class javax.swing.text.StyleContext.NamedStyle
Gets the names of all attributes.
getAttributeNames() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the names of all attributes.
getAttributeNames() - Method in interface javax.swing.text.AttributeSet
Returns an enumeration over the names of the attributes in the set.
getAttributes() - Method in class java.awt.Font
Returns a map of font attributes available in this Font.
getAttributes() - Method in class java.net.JarURLConnection
Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
getAttributes() - Method in interface java.sql.Struct
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
getAttributes() - Method in interface java.text.AttributedCharacterIterator
Returns a map with the attributes defined on the current character.
getAttributes() - Method in class java.util.jar.JarEntry
Returns the Manifest Attributes for this entry, or null if none.
getAttributes() - Method in class javax.naming.directory.SearchResult
Retrieves the attributes in this search result.
getAttributes() - Method in class javax.naming.spi.DirStateFactory.Result
Retrieves the attributes to be bound.
getAttributes() - Method in class javax.swing.text.View
Fetches the attributes to use when rendering.
getAttributes() - Method in interface javax.swing.text.Element
Fetches the collection of attributes this element contains.
getAttributes() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the attributes for the element.
getAttributes() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the element attributes.
getAttributes() - Method in class javax.swing.text.html.Option
Fetch the attributes associated with this option.
getAttributes() - Method in class javax.swing.text.html.ParagraphView
Fetches the attributes to use when rendering.
getAttributes() - Method in class javax.swing.text.html.BlockView
Fetches the attributes to use when rendering.
getAttributes() - Method in class javax.swing.text.html.InlineView
Fetches the attributes to use when rendering.
getAttributes() - Method in class javax.swing.text.html.HTMLDocument.Iterator
Fetch the attributes for this tag.
getAttributes() - Method in class javax.swing.text.html.parser.Parser
getAttributes() - Method in class javax.swing.text.html.parser.Element
Get the attributes.
getAttributes(Map) - Method in interface java.sql.Struct
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
getAttributes(Name) - Method in interface javax.naming.directory.DirContext
Retrieves all of the attributes associated with a named object.
getAttributes(Name) - Method in class javax.naming.directory.InitialDirContext
getAttributes(Name, String[]) - Method in interface javax.naming.directory.DirContext
Retrieves selected attributes associated with a named object.
getAttributes(Name, String[]) - Method in class javax.naming.directory.InitialDirContext
getAttributes(String) - Method in class java.util.jar.Manifest
Returns the Attributes for the specified entry name.
getAttributes(String) - Method in interface javax.naming.directory.DirContext
Retrieves all of the attributes associated with a named object.
getAttributes(String) - Method in class javax.naming.directory.InitialDirContext
getAttributes(String, String[]) - Method in interface javax.naming.directory.DirContext
Retrieves selected attributes associated with a named object.
getAttributes(String, String[]) - Method in class javax.naming.directory.InitialDirContext
getAttributeSyntaxDefinition() - Method in class javax.naming.directory.BasicAttribute
Retrieves the syntax definition associated with this attribute.
getAttributeSyntaxDefinition() - Method in interface javax.naming.directory.Attribute
Retrieves the syntax definition associated with the attribute.
getAudioClip(URL) - Method in interface java.applet.AppletContext
Creates an audio clip.
getAudioClip(URL) - Method in class java.applet.Applet
Returns the AudioClip object specified by the URL argument.
getAudioClip(URL, String) - Method in class java.applet.Applet
Returns the AudioClip object specified by the URL and name arguments.
getAudioFileFormat(File) - Static method in class javax.sound.sampled.AudioSystem
Obtains the audio file format of the specified File.
getAudioFileFormat(File) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains the audio file format of the File provided.
getAudioFileFormat(InputStream) - Static method in class javax.sound.sampled.AudioSystem
Obtains the audio file format of the provided input stream.
getAudioFileFormat(InputStream) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains the audio file format of the input stream provided.
getAudioFileFormat(URL) - Static method in class javax.sound.sampled.AudioSystem
Obtains the audio file format of the specified URL.
getAudioFileFormat(URL) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains the audio file format of the URL provided.
getAudioFileTypes() - Static method in class javax.sound.sampled.AudioSystem
Obtains the file types for which file writing support is provided by the system.
getAudioFileTypes() - Method in class javax.sound.sampled.spi.AudioFileWriter
Obtains the file types for which file writing support is provided by this audio file writer.
getAudioFileTypes(AudioInputStream) - Static method in class javax.sound.sampled.AudioSystem
Obtains the file types that the system can write from the audio input stream specified.
getAudioFileTypes(AudioInputStream) - Method in class javax.sound.sampled.spi.AudioFileWriter
Obtains the file types that this audio file writer can write from the audio input stream specified.
getAudioInputStream(AudioFormat.Encoding, AudioInputStream) - Static method in class javax.sound.sampled.AudioSystem
Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
getAudioInputStream(AudioFormat.Encoding, AudioInputStream) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains an audio input stream with the specified encoding from the given audio input stream.
getAudioInputStream(AudioFormat, AudioInputStream) - Static method in class javax.sound.sampled.AudioSystem
Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
getAudioInputStream(AudioFormat, AudioInputStream) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains an audio input stream with the specified format from the given audio input stream.
getAudioInputStream(File) - Static method in class javax.sound.sampled.AudioSystem
Obtains an audio input stream from the provided File.
getAudioInputStream(File) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains an audio input stream from the File provided.
getAudioInputStream(InputStream) - Static method in class javax.sound.sampled.AudioSystem
Obtains an audio input stream from the provided input stream.
getAudioInputStream(InputStream) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains an audio input stream from the input stream provided.
getAudioInputStream(URL) - Static method in class javax.sound.sampled.AudioSystem
Obtains an audio input stream from the URL provided.
getAudioInputStream(URL) - Method in class javax.sound.sampled.spi.AudioFileReader
Obtains an audio input stream from the URL provided.
getAuthority() - Method in class java.net.URL
Returns the authority part of this URL.
getAutoCommit() - Method in interface java.sql.Connection
Gets the current auto-commit state.
getAutoCreateColumnsFromModel() - Method in class javax.swing.JTable
Determines whether the table will create default columns from the model.
getAutoDelay() - Method in class java.awt.Robot
Returns the number of milliseconds this Robot sleeps after generating an event.
getAutoResizeMode() - Method in class javax.swing.JTable
Returns the auto resize mode of the table.
getAutoscrollInsets() - Method in interface java.awt.dnd.Autoscroll
This method returns the Insets describing the autoscrolling region or border relative to the geometry of the implementing Component.
getAutoscrolls() - Method in class javax.swing.JComponent
Returns true if this component automatically scrolls its contents when dragged (when contained in a component that supports scrolling, like JViewport).
getAuxiliaryLookAndFeels() - Static method in class javax.swing.UIManager
Return the list of auxiliary look and feels (can be null).
getAvailableAttributes() - Method in class java.awt.Font
Returns the keys of all the attributes supported by this Font.
getAvailableFontFamilyNames() - Method in class java.awt.GraphicsEnvironment
Returns an array containing the names of all font families available in this GraphicsEnvironment.
getAvailableFontFamilyNames(Locale) - Method in class java.awt.GraphicsEnvironment
Returns an array containing the localized names of all font families available in this GraphicsEnvironment.
getAvailableIDs() - Static method in class java.util.TimeZone
Gets all the available IDs supported.
getAvailableIDs(int) - Static method in class java.util.TimeZone
Gets the available IDs according to the given time zone offset.
getAvailableInstruments() - Method in interface javax.sound.midi.Synthesizer
Obtains a list of instruments that come with the synthesizer.
getAvailableLocales() - Method in interface java.awt.im.spi.InputMethodDescriptor
Returns the locales supported by the corresponding input method.
getAvailableLocales() - Static method in class java.text.NumberFormat
Get the set of Locales for which NumberFormats are installed
getAvailableLocales() - Static method in class java.text.Collator
Get the set of Locales for which Collators are installed.
getAvailableLocales() - Static method in class java.text.DateFormat
Gets the set of locales for which DateFormats are installed.
getAvailableLocales() - Static method in class java.text.BreakIterator
Get the set of Locales for which BreakIterators are installed
getAvailableLocales() - Static method in class java.util.Calendar
Gets the list of locales for which Calendars are installed.
getAvailableLocales() - Static method in class java.util.Locale
Returns a list of all installed locales.
getAvailableSize(Dimension, Insets) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the available width based on the container size and Insets.
getAxis() - Method in class javax.swing.text.BoxView
Fetch the axis property.
getBackground() - Method in class java.awt.Component
Gets the background color of this component.
getBackground() - Method in class java.awt.Component.AccessibleAWTComponent
Get the background color of this object.
getBackground() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the background color of this object.
getBackground() - Method in class java.awt.Graphics2D
Returns the background color used for clearing a region.
getBackground() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the background color of this object.
getBackground() - Method in class java.awt.TextComponent
Gets the background color of this text component.
getBackground() - Method in interface javax.accessibility.AccessibleComponent
Gets the background color of this object.
getBackground() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getBackground() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the background color of this object.
getBackground() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the background color of this object.
getBackground() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getBackground() - Method in class javax.swing.text.GlyphView
Fetch the background color to use to render the glyphs.
getBackground() - Method in class javax.swing.text.LabelView
Fetch the background color to use to render the glyphs.
getBackground(AttributeSet) - Method in class javax.swing.text.StyleContext
Takes a set of attributes and turn it into a background color specification.
getBackground(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the background color setting from the attribute list.
getBackground(AttributeSet) - Method in interface javax.swing.text.StyledDocument
Takes a set of attributes and turn it into a background color specification.
getBackground(AttributeSet) - Method in class javax.swing.text.DefaultStyledDocument
Gets the background color from an attribute set.
getBackground(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Takes a set of attributes and turn it into a background color specification.
getBackgroundAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab background color at index.
getBackgroundNonSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the background color to be used for non selected nodes.
getBackgroundSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the color to use for the background if node is selected.
getBandOffsets() - Method in class java.awt.image.ComponentSampleModel
Returns the band offset for all bands.
getBank() - Method in class javax.sound.midi.Patch
Returns the number of the bank that contains the instrument whose location this Patch specifies.
getBankData() - Method in class java.awt.image.DataBufferUShort
Returns the data arrays for all banks.
getBankData() - Method in class java.awt.image.DataBufferByte
Returns the data arrays for all banks.
getBankData() - Method in class java.awt.image.DataBufferInt
Returns the data arrays for all banks.
getBankData() - Method in class java.awt.image.DataBufferShort
Returns the data arrays for all banks.
getBankIndices() - Method in class java.awt.image.ComponentSampleModel
Returns the bank indices for all bands.
getBase() - Method in class javax.swing.text.html.StyleSheet
Returns the base.
getBase() - Method in class javax.swing.text.html.HTMLDocument
Gets the location to resolve relative URLs against.
getBaseline() - Method in class java.awt.font.TextLayout
Returns the baseline for this TextLayout.
getBaselineFor(char) - Method in class java.awt.Font
Returns the baseline appropriate for displaying this character.
getBaselineIndex() - Method in class java.awt.font.LineMetrics
Returns the baseline index of the text.
getBaselineOffsets() - Method in class java.awt.font.TextLayout
Returns the offsets array for the baselines used for this TextLayout.
getBaselineOffsets() - Method in class java.awt.font.LineMetrics
Returns the baseline offsets of the text, relative to the baseline of the text.
getBaseType() - Method in interface java.sql.Array
Returns the JDBC type of the elements in the array designated by this Array object.
getBaseTypeName() - Method in interface java.sql.Array
Returns the SQL type name of the elements in the array designated by this Array object.
getBaseTypeName() - Method in interface java.sql.Ref
Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references.
getBasicConstraints() - Method in class java.security.cert.X509Certificate
Gets the certificate constraints path length from the critical BasicConstraints extension, (OID = 2.5.29.19).
getBasicSplitPaneUI() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Returns the SplitPaneUI the receiver is currently in.
getBeanClass() - Method in class java.beans.BeanDescriptor
Gets the bean's Class object.
getBeanContext() - Method in class java.beans.beancontext.BeanContextEvent
Gets the BeanContext associated with this event.
getBeanContext() - Method in interface java.beans.beancontext.BeanContextChild
Gets the BeanContext associated with this BeanContextChild.
getBeanContext() - Method in class java.beans.beancontext.BeanContextChildSupport
Gets the nesting BeanContext for this BeanContextChildSupport.
getBeanContextChildPeer() - Method in class java.beans.beancontext.BeanContextChildSupport
Gets the BeanContextChild associated with this BeanContextChildSupport.
getBeanContextPeer() - Method in class java.beans.beancontext.BeanContextSupport
Gets the instance of BeanContext that this object is providing the implementation for.
getBeanContextProxy() - Method in interface java.beans.beancontext.BeanContextProxy
Gets the BeanContextChild (or subinterface) associated with this object.
getBeanContextServicesPeer() - Method in class java.beans.beancontext.BeanContextServicesSupport
Gets the BeanContextServices associated with this BeanContextServicesSupport.
getBeanDescriptor() - Method in interface java.beans.BeanInfo
Gets the beans BeanDescriptor.
getBeanDescriptor() - Method in class java.beans.SimpleBeanInfo
Deny knowledge about the class and customizer of the bean.
getBeanInfo(Class) - Static method in class java.beans.Introspector
Introspect on a Java bean and learn about all its properties, exposed methods, and events.
getBeanInfo(Class, Class) - Static method in class java.beans.Introspector
Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.
getBeanInfo(Class, int) - Static method in class java.beans.Introspector
Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
getBeanInfoSearchPath() - Static method in class java.beans.Introspector
Gets the list of package names that will be used for finding BeanInfo classes.
getBeforeIndex(int, int) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the String before a given index.
getBeforeIndex(int, int) - Method in interface javax.accessibility.AccessibleText
Returns the String before a given index.
getBeforeIndex(int, int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the String before a given index.
getBeforeIndex(int, int) - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the String before a given index.
getBeforeIndex(int, int) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the String before a given index.
getBeginIndex() - Method in interface java.text.CharacterIterator
Returns the start index of the text.
getBeginIndex() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.getBeginIndex() for String.
getBeginIndex() - Method in class java.text.FieldPosition
Retrieves the index of the first character in the requested field.
getBeginIndex() - Method in class javax.swing.text.Segment
Returns the start index of the text.
getBestConfiguration(GraphicsConfigTemplate) - Method in class java.awt.GraphicsDevice
Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
getBestConfiguration(GraphicsConfiguration[]) - Method in class java.awt.GraphicsConfigTemplate
Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
getBestCursorSize(int, int) - Method in class java.awt.Toolkit
Returns the supported cursor dimension which is closest to the desired sizes.
getBestRowIdentifier(String, String, String, int, boolean) - Method in interface java.sql.DatabaseMetaData
Gets a description of a table's optimal set of columns that uniquely identifies a row.
getBevelType() - Method in class javax.swing.border.BevelBorder
Returns the type of the bevel border.
getBidiLevel(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the BidiLevel setting.
getBidiRootElement() - Method in class javax.swing.text.AbstractDocument
Returns the root element of the bidirectional structure for this document.
getBigDecimal(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
getBigDecimal(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
getBigDecimal(int, int) - Method in interface java.sql.CallableStatement
Deprecated.
getBigDecimal(int, int) - Method in interface java.sql.ResultSet
Deprecated.
getBigDecimal(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
getBigDecimal(String, int) - Method in interface java.sql.ResultSet
Deprecated.
getBinaryStream() - Method in interface java.sql.Blob
Retrieves the BLOB designated by this Blob instance as a stream.
getBinaryStream(int) - Method in interface java.sql.ResultSet
Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
getBinaryStream(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
getBitMasks() - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the bit masks for all bands.
getBitOffset(int) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the offset, in bits, into the data element in which it is stored for the xth pixel of a scanline.
getBitOffsets() - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the bit offsets into the data array element representing a pixel for all bands.
getBlack() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getBlack() - Method in class javax.swing.plaf.metal.MetalTheme
getBlackBoxBounds(int, int) - Method in class java.awt.font.TextLayout
Returns the black box bounds of the characters in the specified range.
getBlackLineBorderUIResource() - Static method in class javax.swing.plaf.BorderUIResource
getBlinkRate() - Method in class javax.swing.text.DefaultCaret
Gets the caret blink rate.
getBlinkRate() - Method in interface javax.swing.text.Caret
Gets the blink rate of the caret.
getBlob(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
getBlob(int) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
getBlob(String) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
getBlockIncrement() - Method in class java.awt.Scrollbar
Gets the block increment of this scroll bar.
getBlockIncrement() - Method in interface java.awt.Adjustable
Gets the block value increment for the adjustable object.
getBlockIncrement() - Method in class javax.swing.JScrollBar
For backwards compatibility with java.awt.Scrollbar.
getBlockIncrement(int) - Method in class javax.swing.JScrollBar
Returns the amount to change the scrollbar's value by, given a block (usually "page") up/down request.
getBlockIncrement(int) - Method in class javax.swing.JScrollPane.ScrollBar
Computes the block increment for scrolling if the viewport's view is a Scrollable object.
getBlue() - Method in class java.awt.Color
Returns the blue component in the range 0-255 in the default sRGB space.
getBlue(int) - Method in class java.awt.image.ColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(int) - Method in class java.awt.image.ComponentColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(int) - Method in class java.awt.image.DirectColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(int) - Method in class java.awt.image.IndexColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(Object) - Method in class java.awt.image.ColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(Object) - Method in class java.awt.image.ComponentColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlue(Object) - Method in class java.awt.image.DirectColorModel
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getBlueMask() - Method in class java.awt.image.DirectColorModel
Returns the mask indicating which bits in an int pixel representation contain the blue color component.
getBlues(byte[]) - Method in class java.awt.image.IndexColorModel
Copies the array of blue color components into the specified array.
getBoolean(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC BIT parameter as a boolean in the Java programming language.
getBoolean(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
getBoolean(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a boolean on the specified object.
getBoolean(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a boolean.
getBoolean(String) - Static method in class java.lang.Boolean
Returns true if and only if the system property named by the argument exists and is equal to the string "true".
getBoolean(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
getBorder() - Method in class javax.swing.JComponent
Returns the border of this component or null if no border is currently set.
getBorder() - Method in class javax.swing.border.TitledBorder
Returns the border of the titled border.
getBorder() - Method in class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
Overrides JComponent.getBorder to returns the current border.
getBorder() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Returns the border of this component or null if no border is currently set.
getBorder(Object) - Method in class javax.swing.UIDefaults
If the value of key is a Border return it, otherwise return null.
getBorder(Object) - Static method in class javax.swing.UIManager
Returns a border from the defaults table.
getBorderColor() - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
getBorderInsets() - Method in class javax.swing.border.EmptyBorder
Returns the insets of the border.
getBorderInsets() - Method in class javax.swing.border.MatteBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.AbstractBorder
This default implementation returns the value of getBorderMargins.
getBorderInsets(Component) - Method in class javax.swing.border.BevelBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.SoftBevelBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.EmptyBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.MatteBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.CompoundBorder
Returns the insets of the composite border by adding the insets of the outside border to the insets of the inside border.
getBorderInsets(Component) - Method in class javax.swing.border.LineBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.TitledBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.border.EtchedBorder
Returns the insets of the border.
getBorderInsets(Component) - Method in interface javax.swing.border.Border
Returns the insets of the border.
getBorderInsets(Component) - Method in class javax.swing.plaf.BorderUIResource
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.MenuBarBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.MarginBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.FieldBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.Flush3DBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.ButtonBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.PaletteBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.MenuBarBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.MenuItemBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.ToolBarBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder
getBorderInsets(Component) - Method in class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
getBorderInsets(Component, Insets) - Method in class javax.swing.border.AbstractBorder
Reinitializes the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.BevelBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.EmptyBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.MatteBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.CompoundBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.LineBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.TitledBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderInsets(Component, Insets) - Method in class javax.swing.border.EtchedBorder
Reinitialize the insets parameter with this Border's current Insets.
getBorderSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the color the border is drawn.
getBorderSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellEditor
Returns the color the border is drawn.
getBorderTitle(Border) - Method in class javax.swing.JComponent.AccessibleJComponent
Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title.
getBottomComponent() - Method in class javax.swing.JSplitPane
Returns the component below, or to the right of the divider.
getBottomInset() - Method in class javax.swing.text.CompositeView
Gets the bottom inset.
getBottomInset() - Method in class javax.swing.text.AsyncBoxView
Get the bottom part of the margin around the view.
getBottomPanel() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
getBoundActions() - Method in interface javax.swing.text.Keymap
Fetches all of the actions defined in this keymap.
getBoundedPosition(GlyphView, int, float, float) - Method in class javax.swing.text.GlyphView.GlyphPainter
Determines the model location that represents the maximum advance that fits within the given span.
getBoundingBox() - Method in class java.awt.Polygon
Deprecated. As of JDK version 1.1, replaced by getBounds().
getBoundKeyStrokes() - Method in interface javax.swing.text.Keymap
Fetches all of the keystrokes in this map that are bound to some action.
getBounds() - Method in class java.awt.Component
Gets the bounds of this component in the form of a Rectangle object.
getBounds() - Method in class java.awt.Component.AccessibleAWTComponent
Gets the bounds of this object in the form of a Rectangle object.
getBounds() - Method in class java.awt.Polygon
Gets the bounding box of this Polygon.
getBounds() - Method in class java.awt.GraphicsConfiguration
Returns the bounds of the GraphicsConfiguration in the device coordinates.
getBounds() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Gets the bounds of this object in the form of a Rectangle object.
getBounds() - Method in interface java.awt.Shape
Returns an integer Rectangle that completely encloses the Shape.
getBounds() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Gets the bounds of this object in the form of a Rectangle object.
getBounds() - Method in class java.awt.Rectangle
Gets the bounding Rectangle of this Rectangle.
getBounds() - Method in class java.awt.font.TextLayout
Returns the bounds of this TextLayout.
getBounds() - Method in class java.awt.font.GraphicAttribute
Returns a Rectangle2D that encloses all of the bits drawn by this GraphicAttribute relative to the rendering position.
getBounds() - Method in class java.awt.font.ImageGraphicAttribute
Returns a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute, relative to the rendering position.
getBounds() - Method in class java.awt.font.ShapeGraphicAttribute
Returns a Rectangle2D that encloses all of the bits drawn by this ShapeGraphicAttribute relative to the rendering position.
getBounds() - Method in class java.awt.geom.RectangularShape
Returns the bounding box of the Shape.
getBounds() - Method in class java.awt.geom.Area
Returns a bounding Rectangle that completely encloses this Area.
getBounds() - Method in class java.awt.geom.Line2D
Returns the bounding box of this Line2D.
getBounds() - Method in class java.awt.geom.GeneralPath
Return the bounding box of the path.
getBounds() - Method in class java.awt.geom.QuadCurve2D
Returns the bounding box of this QuadCurve2D.
getBounds() - Method in class java.awt.geom.CubicCurve2D
Returns the bounding box of the shape.
getBounds() - Method in class java.awt.image.Raster
Returns the bounding Rectangle of this Raster.
getBounds() - Method in interface javax.accessibility.AccessibleComponent
Gets the bounds of this object in the form of a Rectangle object.
getBounds() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getBounds() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
getBounds() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
getBounds() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getBounds(Rectangle) - Method in class java.awt.Component
Store the bounds of this component into "return value" rv and return rv.
getBounds(Rectangle) - Method in class javax.swing.JComponent
Stores the bounds of this component into "return value" rv and returns rv.
getBounds(TreePath, Rectangle) - Method in class javax.swing.tree.AbstractLayoutCache
Returns a rectangle giving the bounds needed to draw path.
getBounds(TreePath, Rectangle) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
getBounds(TreePath, Rectangle) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns a rectangle giving the bounds needed to draw path.
getBounds2D() - Method in class java.awt.Polygon
Returns the high precision bounding box of the Shape.
getBounds2D() - Method in interface java.awt.Shape
Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
getBounds2D() - Method in class java.awt.Rectangle
Return the high precision bounding box of this rectangle.
getBounds2D() - Method in class java.awt.font.GlyphMetrics
Returns the black box bounds of the glyph.
getBounds2D() - Method in class java.awt.geom.Rectangle2D
Returns the high precision bounding box of this Rectangle2D.
getBounds2D() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the high precision bounding box of this RoundRectangle2D.
getBounds2D() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the high precision bounding box of this RoundRectangle2D.
getBounds2D() - Method in class java.awt.geom.Area
Returns a high precision bounding Rectangle2D that completely encloses this Area.
getBounds2D() - Method in class java.awt.geom.Rectangle2D.Float
Returns the high precision bounding box of this Rectangle2D.
getBounds2D() - Method in class java.awt.geom.Rectangle2D.Double
Returns the high precision bounding box of this Rectangle2D.
getBounds2D() - Method in class java.awt.geom.Line2D.Float
Returns the high-precision bounding box of this Line2D.
getBounds2D() - Method in class java.awt.geom.Line2D.Double
Returns the high-precision bounding box of this Line2D.
getBounds2D() - Method in class java.awt.geom.Arc2D
Returns the high-precision bounding box of the arc.
getBounds2D() - Method in class java.awt.geom.Ellipse2D.Float
Returns the high precision bounding box of this Ellipse2D.
getBounds2D() - Method in class java.awt.geom.Ellipse2D.Double
Returns the high precision bounding box of this Ellipse2D.
getBounds2D() - Method in class java.awt.geom.GeneralPath
Returns the bounding box of the path.
getBounds2D() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the bounding box of this QuadCurve2D.
getBounds2D() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the bounding box of this QuadCurve2D.
getBounds2D() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the bounding box of the shape.
getBounds2D() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the bounding box of the shape.
getBounds2D(BufferedImage) - Method in class java.awt.image.LookupOp
Returns the bounding box of the filtered destination image.
getBounds2D(BufferedImage) - Method in interface java.awt.image.BufferedImageOp
Returns the bounding box of the filtered destination image.
getBounds2D(BufferedImage) - Method in class java.awt.image.ConvolveOp
Returns the bounding box of the filtered destination image.
getBounds2D(BufferedImage) - Method in class java.awt.image.AffineTransformOp
Returns the bounding box of the transformed destination.
getBounds2D(BufferedImage) - Method in class java.awt.image.ColorConvertOp
Returns the bounding box of the destination, given this source.
getBounds2D(BufferedImage) - Method in class java.awt.image.RescaleOp
Returns the bounding box of the rescaled destination image.
getBounds2D(ParameterBlock) - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space.
getBounds2D(Raster) - Method in class java.awt.image.LookupOp
Returns the bounding box of the filtered destination Raster.
getBounds2D(Raster) - Method in class java.awt.image.ConvolveOp
Returns the bounding box of the filtered destination Raster.
getBounds2D(Raster) - Method in class java.awt.image.BandCombineOp
Returns the bounding box of the transformed destination.
getBounds2D(Raster) - Method in class java.awt.image.AffineTransformOp
Returns the bounding box of the transformed destination.
getBounds2D(Raster) - Method in interface java.awt.image.RasterOp
Returns the bounding box of the filtered destination Raster.
getBounds2D(Raster) - Method in class java.awt.image.ColorConvertOp
Returns the bounding box of the destination, given this source.
getBounds2D(Raster) - Method in class java.awt.image.RescaleOp
Returns the bounding box of the rescaled destination Raster.
getBoundsAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab bounds at index.
getBoundsForIconOf(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
getBoxPainter(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Fetches the box formatter to use for the given set of CSS attributes.
getBreakLocation(Segment, FontMetrics, int, int, TabExpander, int) - Static method in class javax.swing.text.Utilities
Determine where to break the given text to fit within the the given span.
getBreakWeight(int, float) - Method in class javax.swing.text.ParagraphView
Gets the break weight for a given location.
getBreakWeight(int, float, float) - Method in class javax.swing.text.View
Determines how attractive a break opportunity in this view is.
getBreakWeight(int, float, float) - Method in class javax.swing.text.GlyphView
Determines how attractive a break opportunity in this view is.
getBreakWeight(int, float, float) - Method in class javax.swing.text.html.InlineView
Determines how attractive a break opportunity in this view is.
getBuffer() - Method in class java.io.StringWriter
Return the string buffer itself.
getBufferedImageOp() - Method in class java.awt.image.BufferedImageFilter
Returns the BufferedImageOp.
getBufferSize() - Method in interface javax.sound.sampled.DataLine
Obtains the maximum number of bytes of data that will fit in the data line's internal buffer.
getBundle(String) - Static method in class java.util.ResourceBundle
Get the appropriate ResourceBundle subclass.
getBundle(String, Locale) - Static method in class java.util.ResourceBundle
Get the appropriate ResourceBundle subclass.
getBundle(String, Locale, ClassLoader) - Static method in class java.util.ResourceBundle
Get the appropriate ResourceBundle subclass.
getButtonBorder() - Static method in class javax.swing.plaf.basic.BasicBorders
getButtonBorder() - Static method in class javax.swing.plaf.metal.MetalBorders
Returns a border instance for a JButton
getButtonCount() - Method in class javax.swing.ButtonGroup
Returns the number of buttons in the group.
getButtonPanel() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
getButtons() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for.
getButtonWidth() - Method in class javax.swing.plaf.metal.MetalScrollButton
getByName(String) - Static method in class java.net.InetAddress
Determines the IP address of a host, given the host's name.
getByte(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language.
getByte(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
getByte(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a byte on the specified object.
getByte(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a byte.
getByte(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
getByteLength() - Method in class javax.sound.sampled.AudioFileFormat
Obtains the size in bytes of the entire audio file (not just its audio data).
getByteLength() - Method in class javax.sound.midi.MidiFileFormat
Obtains the length of the MIDI file, expressed in 8-bit bytes.
getByteParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a byte.
getBytes() - Method in class java.lang.String
Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
getBytes(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
getBytes(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
getBytes(int, int, byte[], int) - Method in class java.lang.String
Deprecated. This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding.
getBytes(long, int) - Method in interface java.sql.Blob
Returns as an array of bytes, part or all of the BLOB value that this Blob object designates.
getBytes(String) - Method in class java.lang.String
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
getBytes(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
getCachedIcon(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
getCalendar() - Method in class java.text.DateFormat
Gets the calendar associated with this date/time formatter.
getCancelSelectionAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getCanonicalFile() - Method in class java.io.File
Returns the canonical form of this abstract pathname.
getCanonicalPath() - Method in class java.io.File
Returns the canonical pathname string of this abstract pathname.
getCanWrapLines() - Method in class javax.swing.text.AbstractWriter
Returns whether or not the lines can be wrapped.
getCaret() - Method in class java.awt.event.InputMethodEvent
Gets the caret.
getCaret() - Method in class javax.swing.text.JTextComponent
Fetches the caret that allows text-oriented navigation over the view.
getCaretColor() - Method in class javax.swing.text.JTextComponent
Fetches the current color used to render the caret.
getCaretInfo(TextHitInfo) - Method in class java.awt.font.TextLayout
Returns information about the caret corresponding to hit.
getCaretInfo(TextHitInfo, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns information about the caret corresponding to hit.
getCaretPosition() - Method in class java.awt.TextComponent
Gets the position of the text insertion caret for this text component.
getCaretPosition() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the zero-based offset of the caret.
getCaretPosition() - Method in interface javax.accessibility.AccessibleText
Returns the zero-based offset of the caret.
getCaretPosition() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Return the zero-based offset of the caret.
getCaretPosition() - Method in class javax.swing.JLabel.AccessibleJLabel
Return the zero-based offset of the caret.
getCaretPosition() - Method in class javax.swing.text.JTextComponent
Returns the position of the text insertion caret for the text component.
getCaretPosition() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the zero-based offset of the caret.
getCaretShape(TextHitInfo) - Method in class java.awt.font.TextLayout
Returns a Shape representing the caret at the specified hit inside the natural bounds of this TextLayout.
getCaretShape(TextHitInfo, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns a Shape representing the caret at the specified hit inside the specified bounds.
getCaretShapes(int) - Method in class java.awt.font.TextLayout
Returns two paths corresponding to the strong and weak caret.
getCaretShapes(int, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns two paths corresponding to the strong and weak caret.
getCaretShapes(int, Rectangle2D, TextLayout.CaretPolicy) - Method in class java.awt.font.TextLayout
Returns two paths corresponding to the strong and weak caret.
getCatalog() - Method in interface java.sql.Connection
Returns the Connection's current catalog name.
getCatalogName(int) - Method in interface java.sql.ResultSetMetaData
Gets the designated column's table's catalog name.
getCatalogs() - Method in interface java.sql.DatabaseMetaData
Gets the catalog names available in this database.
getCatalogSeparator() - Method in interface java.sql.DatabaseMetaData
What's the separator between catalog and table name?
getCatalogTerm() - Method in interface java.sql.DatabaseMetaData
What's the database vendor's preferred term for "catalog"?
getCellBounds(int, int) - Method in class javax.swing.JList
Returns the bounds of the specified range of items in JList coordinates.
getCellBounds(JList, int, int) - Method in class javax.swing.plaf.ListUI
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
getCellBounds(JList, int, int) - Method in class javax.swing.plaf.basic.BasicListUI
getCellBounds(JList, int, int) - Method in class javax.swing.plaf.multi.MultiListUI
Call getCellBounds on each UI handled by this MultiUI.
getCellEditor() - Method in class javax.swing.JTree
Returns the editor used to edit entries in the tree.
getCellEditor() - Method in class javax.swing.JTable
Returns the cell editor.
getCellEditor() - Method in class javax.swing.table.TableColumn
Returns the TableCellEditor used by the JTable to edit values for this column.
getCellEditor() - Method in class javax.swing.plaf.basic.BasicTreeUI
getCellEditor(int, int) - Method in class javax.swing.JTable
Returns an appropriate editor for the cell specified by row and column.
getCellEditorValue() - Method in interface javax.swing.CellEditor
Returns the value contained in the editor
getCellEditorValue() - Method in class javax.swing.DefaultCellEditor
getCellEditorValue() - Method in class javax.swing.DefaultCellEditor.EditorDelegate
getCellEditorValue() - Method in class javax.swing.tree.DefaultTreeCellEditor
Returns the value currently being edited.
getCellLength() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar.
getCellRect(int, int, boolean) - Method in class javax.swing.JTable
Returns a rectangle for the cell that lies at the intersection of row and column.
getCellRenderer() - Method in class javax.swing.JList
Returns the object that renders the list items.
getCellRenderer() - Method in class javax.swing.JTree
Returns the current TreeCellRenderer that is rendering each cell.
getCellRenderer() - Method in class javax.swing.table.TableColumn
Returns the TableCellRenderer used by the JTable to draw values for this column.
getCellRenderer() - Method in class javax.swing.plaf.basic.BasicTreeUI
Return currentCellRenderer, which will either be the trees renderer, or defaultCellRenderer, which ever wasn't null.
getCellRenderer(int, int) - Method in class javax.swing.JTable
Returns an appropriate renderer for the cell specified by this row and column.
getCellSelectionEnabled() - Method in class javax.swing.JTable
Returns true if both row and column selection models are enabled.
getCellSpacing() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
Returns the spacing between each of the cells/units in the progress bar.
getCentersChildren() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
getCenterX() - Method in class java.awt.geom.RectangularShape
Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
getCenterY() - Method in class java.awt.geom.RectangularShape
Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
getCertificate(String) - Method in class java.security.KeyStore
Returns the certificate associated with the given alias.
getCertificateAlias(Certificate) - Method in class java.security.KeyStore
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
getCertificateChain(String) - Method in class java.security.KeyStore
Returns the certificate chain associated with the given alias.
getCertificates() - Method in class java.net.JarURLConnection
Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.
getCertificates() - Method in class java.security.CodeSource
Returns the certificates associated with this CodeSource.
getCertificates() - Method in class java.util.jar.JarEntry
Returns the Certificate objects for this entry, or null if none.
getChange(Element) - Method in interface javax.swing.event.DocumentEvent
Gets the change information for the given element.
getChange(Element) - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Gets the changes for an element.
getChanged() - Method in class java.awt.event.HierarchyEvent
Returns the Component at the top of the hierarchy which was changed.
getChangedParent() - Method in class java.awt.event.HierarchyEvent
Returns the parent of the Component returned by getChanged().
getChangeFlags() - Method in class java.awt.event.HierarchyEvent
Returns a bitmask which indicates the type(s) of HIERARCHY_CHANGED events represented in this event object.
getChangeInfo() - Method in class javax.naming.event.NamingEvent
Retrieves the change information for this event.
getChangeToParentDirectoryAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI
getChannel() - Method in class javax.sound.midi.ShortMessage
Obtains the MIDI channel associated with this event.
getChannelPressure() - Method in interface javax.sound.midi.MidiChannel
Obtains the channel's keyboard pressure.
getChannels() - Method in class javax.sound.sampled.AudioFormat
Obtains the number of channels.
getChannels() - Method in interface javax.sound.midi.Synthesizer
Obtains the set of MIDI channels controlled by this synthesizer.
getChar(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a char on the specified object.
getChar(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a char.
getCharacterAttribute(int) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the AttributeSet for a given character (at a given index).
getCharacterAttribute(int) - Method in interface javax.accessibility.AccessibleText
Returns the AttributeSet for a given character at a given index
getCharacterAttribute(int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Return the AttributeSet for a given character at a given index
getCharacterAttribute(int) - Method in class javax.swing.JLabel.AccessibleJLabel
Return the AttributeSet for a given character at a given index
getCharacterAttribute(int) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the AttributeSet for a given character (at a given index).
getCharacterAttributeRun() - Method in class javax.swing.text.StyledEditorKit
Fetches the element representing the current run of character attributes for the caret.
getCharacterAttributes() - Method in class javax.swing.JTextPane
Fetches the character attributes in effect at the current location of the caret, or null.
getCharacterBounds(int) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Determines the bounding box of the character at the given index into the string.
getCharacterBounds(int) - Method in interface javax.accessibility.AccessibleText
Determines the bounding box of the character at the given index into the string.
getCharacterBounds(int) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Determine the bounding box of the character at the given index into the string.
getCharacterBounds(int) - Method in class javax.swing.JLabel.AccessibleJLabel
Determine the bounding box of the character at the given index into the string.
getCharacterBounds(int) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Determines the bounding box of the character at the given index into the string.
getCharacterCount() - Method in class java.awt.font.TextLayout
Returns the number of characters represented by this TextLayout.
getCharacterElement(int) - Method in interface javax.swing.text.StyledDocument
Gets the element that represents the character that is at the given offset within the document.
getCharacterElement(int) - Method in class javax.swing.text.DefaultStyledDocument
Gets a character element based on a position.
getCharacterInstance() - Static method in class java.text.BreakIterator
Create BreakIterator for character-breaks using default locale Returns an instance of a BreakIterator implementing character breaks.
getCharacterInstance(Locale) - Static method in class java.text.BreakIterator
Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterator implementing character breaks.
getCharacterLevel(int) - Method in class java.awt.font.TextLayout
Returns the level of the character at index.
getCharacterStream() - Method in interface java.sql.Clob
Gets the CLOB value designated by this Clob object as a Unicode stream.
getCharacterStream(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
getCharacterStream(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
getCharCount() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the number of characters (valid indicies)
getCharCount() - Method in interface javax.accessibility.AccessibleText
Returns the number of characters (valid indicies)
getCharCount() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Return the number of characters (valid indicies)
getCharCount() - Method in class javax.swing.JLabel.AccessibleJLabel
Return the number of characters (valid indicies)
getCharCount() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the number of characters (valid indicies)
getCharIndex() - Method in class java.awt.font.TextHitInfo
Returns the index of the character hit.
getCharParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a char.
getChars(int, int, char[], int) - Method in class java.lang.String
Copies characters from this string into the destination character array.
getChars(int, int, char[], int) - Method in class java.lang.StringBuffer
Characters are copied from this string buffer into the destination character array dst.
getChars(int, int, Segment) - Method in interface javax.swing.text.AbstractDocument.Content
Gets a sequence of characters and copies them into a Segment.
getChars(int, int, Segment) - Method in class javax.swing.text.StringContent
Retrieves a portion of the content.
getChars(int, int, Segment) - Method in class javax.swing.text.GapContent
Retrieves a portion of the content.
getCharSetSpec() - Method in class javax.swing.text.ChangedCharSetException
getCheckboxGroup() - Method in class java.awt.Checkbox
Determines this check box's group.
getCheckBoxIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory
getCheckBoxIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory
Returns a checkbox icon
getCheckBoxMenuItemIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory
getCheckBoxMenuItemIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory
getChecksum() - Method in class java.util.zip.CheckedInputStream
Returns the Checksum for this input stream.
getChecksum() - Method in class java.util.zip.CheckedOutputStream
Returns the Checksum for this output stream.
getChild() - Method in class java.awt.event.ContainerEvent
Returns the component that was affected by the event.
getChild(Object, int) - Method in interface javax.swing.tree.TreeModel
Returns the child of parent at index index in the parent's child array.
getChild(Object, int) - Method in class javax.swing.tree.DefaultTreeModel
Returns the child of parent at index index in the parent's child array.
getChildAfter(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
getChildAllocation(int) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Fetch the allocation to use for a child view.
getChildAllocation(int, Shape) - Method in class javax.swing.text.View
Fetches the allocation for the given child view.
getChildAllocation(int, Shape) - Method in class javax.swing.text.CompositeView
Fetches the allocation for the given child view.
getChildAllocation(int, Shape) - Method in class javax.swing.text.BoxView
Fetches the allocation for the given child view.
getChildAllocation(int, Shape) - Method in class javax.swing.text.AsyncBoxView
Fetches the allocation for the given child view.
getChildAllocation(int, Shape) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Fetch the allocation to use for a child view.
getChildAt(int) - Method in class javax.swing.JTree.DynamicUtilTreeNode
Subclassed to load the children, if necessary.
getChildAt(int) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns the child TreeNode at index childIndex.
getChildAt(int) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the child at the specified index in this node's child array.
getChildAt(int) - Method in interface javax.swing.tree.TreeNode
Returns the child TreeNode at index childIndex.
getChildBeanContextChild(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the BeanContextChild (if any) of the specified child
getChildBeanContextMembershipListener(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the BeanContextMembershipListener (if any) of the specified child
getChildBeanContextServicesListener(Object) - Static method in class java.beans.beancontext.BeanContextServicesSupport
Gets the BeanContextServicesListener (if any) of the specified child.
getChildBefore(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
getChildCount() - Method in class javax.swing.JTree.DynamicUtilTreeNode
Returns the number of child nodes.
getChildCount() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns the number of children TreeNodes the receiver contains.
getChildCount() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the number of children of this node.
getChildCount() - Method in interface javax.swing.tree.TreeNode
Returns the number of children TreeNodes the receiver contains.
getChildCount(Object) - Method in interface javax.swing.tree.TreeModel
Returns the number of children of parent.
getChildCount(Object) - Method in class javax.swing.tree.DefaultTreeModel
Returns the number of children of parent.
getChildIndices() - Method in class javax.swing.event.TreeModelEvent
Returns the values of the child indexes.
getChildPropertyChangeListener(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the PropertyChangeListener (if any) of the specified child
getChildren() - Method in class javax.swing.event.TreeModelEvent
Returns the objects that are children of the node identified by getPath at the locations specified by getChildIndices.
getChildrenAdded() - Method in interface javax.swing.event.DocumentEvent.ElementChange
Gets the child elements that were added to the given parent element.
getChildrenAdded() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Gets a list of children that were added.
getChildrenRemoved() - Method in interface javax.swing.event.DocumentEvent.ElementChange
Gets the child elements that were removed from the given parent element.
getChildrenRemoved() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Gets a list of children that were removed.
getChildSerializable(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the Serializable (if any) associated with the specified Child
getChildState(int) - Method in class javax.swing.text.AsyncBoxView
Fetch the object representing the layout state of of the child at the given index.
getChildVetoableChangeListener(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the VetoableChangeListener (if any) of the specified child
getChildView() - Method in class javax.swing.text.AsyncBoxView.ChildState
Fetch the child view this record represents
getChildVisibility(Object) - Static method in class java.beans.beancontext.BeanContextSupport
Gets the Component (if any) associated with the specified child.
getChoosableFileFilters() - Method in class javax.swing.JFileChooser
Gets the list of user choosable file filters.
getChooserPanels() - Method in class javax.swing.JColorChooser
Returns the specified color panels.
getClass() - Method in class java.lang.Object
Returns the runtime class of an object.
getClassAnnotation(Class) - Static method in class java.rmi.server.RMIClassLoader
Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.
getClassContext() - Method in class java.lang.SecurityManager
Returns the current execution stack as an array of classes.
getClasses() - Method in class java.lang.Class
Returns an array containing Class objects representing all the public classes and interfaces that are members of the class represented by this Class object.
getClassLoader() - Method in class java.lang.Class
Returns the class loader for the class.
getClassLoader(String) - Static method in class java.rmi.server.RMIClassLoader
Returns a class loader that loads classes from the given codebase URL path.
getClassName() - Method in class java.rmi.activation.ActivationGroupDesc
Returns the group's class name (possibly null).
getClassName() - Method in class java.rmi.activation.ActivationDesc
Returns the class name for the object specified by this descriptor.
getClassName() - Method in class java.util.MissingResourceException
Gets parameter passed by constructor.
getClassName() - Method in class javax.naming.Reference
Retrieves the class name of the object to which this reference refers.
getClassName() - Method in class javax.naming.NameClassPair
Retrieves the class name of the object bound to the name of this binding.
getClassName() - Method in class javax.naming.Binding
Retrieves the class name of the object bound to the name of this binding.
getClassName() - Method in class javax.swing.UIManager.LookAndFeelInfo
Returns the name of the class that implements this look and feel.
getClickCount() - Method in class java.awt.event.MouseEvent
Return the number of mouse clicks associated with this event.
getClickCountToStart() - Method in class javax.swing.DefaultCellEditor
ClickCountToStart controls the number of clicks required to start editing.
getClientHost() - Static method in class java.rmi.server.RemoteServer
Return the hostname of the current client.
getClientHost() - Method in interface java.rmi.server.ServerRef
Returns the hostname of the current client.
getClientProperty(Object) - Method in class javax.swing.JComponent
Returns the value of the property with the specified key.
getClip() - Method in class java.awt.Graphics
Gets the current clipping area.
getClip() - Method in class javax.swing.DebugGraphics
Overrides Graphics.getClip.
getClipBounds() - Method in class java.awt.Graphics
Returns the bounding rectangle of the current clipping area.
getClipBounds() - Method in class javax.swing.DebugGraphics
Overrides Graphics.getClipBounds.
getClipBounds(Rectangle) - Method in class java.awt.Graphics
Returns the bounding rectangle of the current clipping area.
getClipRect() - Method in class java.awt.Graphics
Deprecated. As of JDK version 1.1, replaced by getClipBounds().
getClob(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
getClob(int) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
getClob(String) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
getClosedIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the icon used to represent non-leaf nodes that are not expanded.
getClosestPathForLocation(int, int) - Method in class javax.swing.JTree
Returns the path to the node that is closest to x,y.
getClosestPathForLocation(JTree, int, int) - Method in class javax.swing.plaf.TreeUI
Returns the path to the node that is closest to x,y.
getClosestPathForLocation(JTree, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the path to the node that is closest to x,y.
getClosestPathForLocation(JTree, int, int) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getClosestPathForLocation on each UI handled by this MultiUI.
getClosestPositionTo(int, Position.Bias, Shape, int, Position.Bias[], int, int) - Method in class javax.swing.text.ParagraphView
Returns the closest model position to x.
getClosestRowForLocation(int, int) - Method in class javax.swing.JTree
Returns the row to the node that is closest to x,y.
getCodeBase() - Method in class java.applet.Applet
Gets the base URL.
getCodeBase() - Method in interface java.applet.AppletStub
Gets the base URL.
getCodebase(Class) - Static method in class javax.rmi.CORBA.Util
Returns the codebase, if any, for the given class.
getCodebase(Class) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.getCodebase(java.lang.Class).
getCodeSource() - Method in class java.security.ProtectionDomain
Returns the CodeSource of this domain.
getCollapsedIcon() - Method in class javax.swing.plaf.basic.BasicTreeUI
getCollationElementIterator(CharacterIterator) - Method in class java.text.RuleBasedCollator
Return a CollationElementIterator for the given String.
getCollationElementIterator(String) - Method in class java.text.RuleBasedCollator
Return a CollationElementIterator for the given String.
getCollationKey(String) - Method in class java.text.Collator
Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.
getCollationKey(String) - Method in class java.text.RuleBasedCollator
Transforms the string into a series of characters that can be compared with CollationKey.compareTo.
getColor() - Method in class java.awt.Graphics
Gets this graphics context's current color.
getColor() - Method in class java.awt.PageAttributes
Returns whether pages using these attributes will be rendered in color or monochrome.
getColor() - Method in class javax.swing.JColorChooser
Gets the current color value from the color chooser.
getColor() - Method in class javax.swing.DebugGraphics
Returns the Color used for text drawing operations.
getColor() - Method in class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
Returns the color of the highlight.
getColor(Object) - Method in class javax.swing.UIDefaults
If the value of key is a Color return it, otherwise return null.
getColor(Object) - Static method in class javax.swing.UIManager
Returns a drawing color from the defaults table.
getColor(String) - Static method in class java.awt.Color
Finds a color in the system properties.
getColor(String, Color) - Static method in class java.awt.Color
Finds a color in the system properties.
getColor(String, int) - Static method in class java.awt.Color
Finds a color in the system properties.
getColor1() - Method in class java.awt.GradientPaint
Returns the color C1 anchored by the point P1.
getColor2() - Method in class java.awt.GradientPaint
Returns the color C2 anchored by the point P2.
getColorComponents(ColorSpace, float[]) - Method in class java.awt.Color
Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter.
getColorComponents(float[]) - Method in class java.awt.Color
Returns a float array containing only the color components of the Color, in the ColorSpace of the Color.
getColorForGap(int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
getColorFromModel() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Returns the color that is currently selected.
getColorModel() - Method in class java.awt.Component
Gets the instance of ColorModel used to display the component on the output device.
getColorModel() - Method in class java.awt.GraphicsConfiguration
Returns the ColorModel associated with this GraphicsConfiguration.
getColorModel() - Method in interface java.awt.PaintContext
Returns the ColorModel of the output.
getColorModel() - Method in class java.awt.Toolkit
Determines the color model of this toolkit's screen.
getColorModel() - Method in class java.awt.image.PixelGrabber
Get the ColorModel for the pixels stored in the array.
getColorModel() - Method in interface java.awt.image.RenderedImage
Returns the ColorModel associated with this image.
getColorModel() - Method in class java.awt.image.BufferedImage
Returns the ColorModel.
getColorModel(int) - Method in class java.awt.GraphicsConfiguration
Returns the ColorModel associated with this GraphicsConfiguration that supports the specified transparency.
getColorSelectionModel() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Returns the model that the chooser panel is editing.
getColorSpace() - Method in class java.awt.Color
Returns the ColorSpace of this Color.
getColorSpace() - Method in class java.awt.image.ColorModel
Returns the ColorSpace associated with this ColorModel.
getColorSpaceType() - Method in class java.awt.color.ICC_Profile
Returns the color space type.
getColumn() - Method in class javax.swing.event.TableModelEvent
Returns the column for the event.
getColumn(int) - Method in class javax.swing.table.DefaultTableColumnModel
Returns the TableColumn object for the column at columnIndex.
getColumn(int) - Method in interface javax.swing.table.TableColumnModel
Returns the TableColumn object for the column at columnIndex.
getColumn(Object) - Method in class javax.swing.JTable
Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
getColumnClass(int) - Method in class javax.swing.JTable
Returns the type of the column appearing in the view at column position column.
getColumnClass(int) - Method in class javax.swing.table.AbstractTableModel
Returns Object.class regardless of columnIndex.
getColumnClass(int) - Method in interface javax.swing.table.TableModel
Returns the most specific superclass for all the cell values in the column.
getColumnClassName(int) - Method in interface java.sql.ResultSetMetaData
Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
getColumnCount() - Method in interface java.sql.ResultSetMetaData
Returns the number of columns in this ResultSet object.
getColumnCount() - Method in class javax.swing.JTable
Returns the number of columns in the column model.
getColumnCount() - Method in class javax.swing.table.DefaultTableModel
Returns the number of columns in this data table.
getColumnCount() - Method in class javax.swing.table.DefaultTableColumnModel
Returns the number of columns in the tableColumns array.
getColumnCount() - Method in interface javax.swing.table.TableModel
Returns the number of columns in the model.
getColumnCount() - Method in interface javax.swing.table.TableColumnModel
Returns the number of columns in the model.
getColumnCount() - Method in class javax.swing.text.TableView.TableCell
Deprecated. Gets the number of columns this cell spans (e.g.
getColumnDisplaySize(int) - Method in interface java.sql.ResultSetMetaData
Indicates the designated column's normal maximum width in characters.
getColumnHeader() - Method in class javax.swing.ScrollPaneLayout
Returns the JViewport object that is the column header.
getColumnHeader() - Method in class javax.swing.JScrollPane
Returns the column header.
getColumnIndex(Object) - Method in class javax.swing.table.DefaultTableColumnModel
Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.
getColumnIndex(Object) - Method in interface javax.swing.table.TableColumnModel
Returns the index of the first column in the table whose identifier is equal to identifier, when compared using equals.
getColumnIndexAtX(int) - Method in class javax.swing.table.DefaultTableColumnModel
Returns the index of the column that lies at position x, or -1 if no column covers this point.
getColumnIndexAtX(int) - Method in interface javax.swing.table.TableColumnModel
Returns the index of the column that lies on the horizontal point, xPosition; or -1 if it lies outside the any of the column's bounds.
getColumnLabel(int) - Method in interface java.sql.ResultSetMetaData
Gets the designated column's suggested title for use in printouts and displays.
getColumnMargin() - Method in class javax.swing.table.DefaultTableColumnModel
Returns the width margin for TableColumn.
getColumnMargin() - Method in interface javax.swing.table.TableColumnModel
Returns the width between the cells in each column.
getColumnModel() - Method in class javax.swing.JTable
Returns the TableColumnModel that contains all column information of this table.
getColumnModel() - Method in class javax.swing.table.JTableHeader
Returns the TableColumnModel that contains all column information of this table header.
getColumnName(int) - Method in interface java.sql.ResultSetMetaData
Get the designated column's name.
getColumnName(int) - Method in class javax.swing.JTable
Returns the name of the column appearing in the view at column position column.
getColumnName(int) - Method in class javax.swing.table.AbstractTableModel
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
getColumnName(int) - Method in class javax.swing.table.DefaultTableModel
Returns the column name.
getColumnName(int) - Method in interface javax.swing.table.TableModel
Returns the name of the column at columnIndex.
getColumnPrivileges(String, String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the access rights for a table's columns.
getColumns() - Method in class java.awt.GridLayout
Gets the number of columns in this layout.
getColumns() - Method in class java.awt.TextField
Gets the number of columns in this text field.
getColumns() - Method in class java.awt.TextArea
Gets the number of columns in this text area.
getColumns() - Method in class javax.swing.JTextField
Returns the number of columns in this TextField.
getColumns() - Method in class javax.swing.JTextArea
Returns the number of columns in the TextArea.
getColumns() - Method in class javax.swing.table.DefaultTableColumnModel
Returns an Enumeration of all the columns in the model.
getColumns() - Method in interface javax.swing.table.TableColumnModel
Returns an Enumeration of all the columns in the model.
getColumns(String, String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of table columns available in the specified catalog.
getColumnSelectionAllowed() - Method in class javax.swing.JTable
Returns true if columns can be selected.
getColumnSelectionAllowed() - Method in class javax.swing.table.DefaultTableColumnModel
Returns true if column selection is allowed, otherwise false.
getColumnSelectionAllowed() - Method in interface javax.swing.table.TableColumnModel
Returns true if columns may be selected.
getColumnType(int) - Method in interface java.sql.ResultSetMetaData
Retrieves the designated column's SQL type.
getColumnTypeName(int) - Method in interface java.sql.ResultSetMetaData
Retrieves the designated column's database-specific type name.
getColumnWidth() - Method in class javax.swing.JTextField
Gets the column width.
getColumnWidth() - Method in class javax.swing.JTextArea
Gets column width.
getComboBox() - Method in class javax.swing.plaf.metal.MetalComboBoxButton
getComboIcon() - Method in class javax.swing.plaf.metal.MetalComboBoxButton
getCommand() - Method in class javax.sound.midi.ShortMessage
Obtains the MIDI command associated with this event.
getCommandEnvironment() - Method in class java.rmi.activation.ActivationGroupDesc
Returns the group's command-environment control object.
getCommandOptions() - Method in class java.rmi.activation.ActivationGroupDesc.CommandEnvironment
Fetch the configured java command options.
getCommandPath() - Method in class java.rmi.activation.ActivationGroupDesc.CommandEnvironment
Fetch the configured path-qualified java command name.
getComment() - Method in class java.util.zip.ZipEntry
Returns the comment string for the entry, or null if none.
getCommittedCharacterCount() - Method in class java.awt.event.InputMethodEvent
Gets the number of committed characters in the text.
getCommittedText(int, int, AttributedCharacterIterator.Attribute[]) - Method in interface java.awt.im.InputMethodRequests
Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
getCommittedTextLength() - Method in interface java.awt.im.InputMethodRequests
Gets the length of the entire text contained in the text editing component except for uncommitted (composed) text.
getComponent() - Method in class java.awt.dnd.DropTargetContext
This method returns the Component associated with this DropTargetContext.
getComponent() - Method in class java.awt.dnd.DragGestureRecognizer
This method returns the Component that is to be "observed" by the DragGestureRecognizer for drag initiating gestures.
getComponent() - Method in class java.awt.dnd.DragSourceContext
This method returns the Component associated with this DragSourceContext.
getComponent() - Method in class java.awt.dnd.DragGestureEvent
This method returns the Component associated with this DragGestureEvent.
getComponent() - Method in class java.awt.dnd.DropTarget
This method returns the Component associated with this DropTarget.
getComponent() - Method in class java.awt.event.HierarchyEvent
Returns the originator of the event.
getComponent() - Method in class java.awt.event.ComponentEvent
Returns the originator of the event.
getComponent() - Method in interface java.beans.beancontext.BeanContextChildComponentProxy
Gets the java.awt.Component associated with this BeanContextChild.
getComponent() - Method in class javax.swing.JMenuItem
This method returns the java.awt.Component used to paint this object.
getComponent() - Method in class javax.swing.JMenu
Returns the java.awt.Component used to paint this MenuElement.
getComponent() - Method in class javax.swing.ComponentInputMap
Returns the component the InputMap was created for.
getComponent() - Method in class javax.swing.DefaultCellEditor
Returns the a reference to the editor component.
getComponent() - Method in class javax.swing.JPopupMenu
Returns this JPopupMenu component.
getComponent() - Method in interface javax.swing.Renderer
Returns the component used to render the value.
getComponent() - Method in class javax.swing.JToolTip
Returns the component the tooltip applies to.
getComponent() - Method in class javax.swing.JMenuBar
Implemented to be a MenuElement.
getComponent() - Method in interface javax.swing.MenuElement
This method should return the java.awt.Component used to paint the receiving element.
getComponent() - Method in class javax.swing.event.AncestorEvent
Returns the component that the listener was added to.
getComponent() - Method in class javax.swing.text.DefaultCaret
Gets the text editor component that this caret is is bound to.
getComponent() - Method in class javax.swing.text.ComponentView
Fetch the component associated with the view.
getComponent() - Method in class javax.swing.plaf.basic.BasicTextUI
Fetches the text component associated with this UI implementation.
getComponent(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the component setting from the attribute list.
getComponent(int) - Method in class java.awt.Container
Gets the nth component in this container.
getComponentAfter(Container, Component) - Method in class javax.swing.DefaultFocusManager
Return the component the should receive the focus after aComponent
getComponentAt(int) - Method in class javax.swing.JTabbedPane
Returns the component at index.
getComponentAt(int, int) - Method in class java.awt.Component
Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component.
getComponentAt(int, int) - Method in class java.awt.Container
Locates the component that contains the x,y position.
getComponentAt(Point) - Method in class java.awt.Component
Returns the component or subcomponent that contains the specified point.
getComponentAt(Point) - Method in class java.awt.Container
Gets the component that contains the specified point.
getComponentAtIndex(int) - Method in class javax.swing.JPopupMenu
Deprecated. replaced by getComponent(int i)
getComponentAtIndex(int) - Method in class javax.swing.JToolBar
Returns the component at the specified index.
getComponentAtIndex(int) - Method in class javax.swing.JMenuBar
Deprecated. replaced by getComponent(int i)
getComponentBefore(Container, Component) - Method in class javax.swing.DefaultFocusManager
Return the component that should receive the focus before aComponent
getComponentCount() - Method in class java.awt.Container
Gets the number of components in this panel.
getComponentCountInLayer(int) - Method in class javax.swing.JLayeredPane
Returns the number of children currently in the specified layer.
getComponentGraphics(Graphics) - Method in class javax.swing.JComponent
Returns the graphics object used to paint this component.
getComponentIndex(Component) - Method in class javax.swing.JPopupMenu
Returns the index of the specified component.
getComponentIndex(Component) - Method in class javax.swing.JToolBar
Returns the index of the specified component.
getComponentIndex(Component) - Method in class javax.swing.JMenuBar
Returns the index of the specified component.
getComponentOrientation() - Method in class java.awt.Component
Retrieve the language-sensitive orientation that is to be used to order the elements or text within this component.
getComponents() - Method in class java.awt.Container
Gets all the components in this container.
getComponents(ColorSpace, float[]) - Method in class java.awt.Color
Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter.
getComponents(float[]) - Method in class java.awt.Color
Returns a float array containing the color and alpha components of the Color, in the ColorSpace of the Color.
getComponents(int, int[], int) - Method in class java.awt.image.ColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(int, int[], int) - Method in class java.awt.image.ComponentColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(int, int[], int) - Method in class java.awt.image.DirectColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(int, int[], int) - Method in class java.awt.image.IndexColorModel
Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
getComponents(Object, int[], int) - Method in class java.awt.image.ColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(Object, int[], int) - Method in class java.awt.image.ComponentColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(Object, int[], int) - Method in class java.awt.image.DirectColorModel
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
getComponents(Object, int[], int) - Method in class java.awt.image.IndexColorModel
Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
getComponentsInLayer(int) - Method in class javax.swing.JLayeredPane
Returns an array of the components in the specified layer.
getComponentSize() - Method in class java.awt.image.ColorModel
Returns an array of the number of bits per color/alpha component.
getComponentSize() - Method in class java.awt.image.IndexColorModel
Returns an array of the number of bits for each color/alpha component.
getComponentSize(int) - Method in class java.awt.image.ColorModel
Returns the number of bits for the specified color/alpha component.
getComponentToLayer() - Method in class javax.swing.JLayeredPane
Returns the hashtable that maps components to layers.
getComponentType() - Method in class java.lang.Class
Returns the Class representing the component type of an array.
getComposite() - Method in class java.awt.Graphics2D
Returns the current Composite in the Graphics2D context.
getCompressedSize() - Method in class java.util.zip.ZipEntry
Returns the size of the compressed entry data, or -1 if not known.
getCompressionThreshold() - Method in class javax.swing.text.StyleContext
Returns the maximum number of key/value pairs to try and compress into unique/immutable sets.
getConcurrency() - Method in interface java.sql.ResultSet
Returns the concurrency mode of this ResultSet object.
getConditionForKeyStroke(KeyStroke) - Method in class javax.swing.JComponent
Returns the condition that determines whether a registered action occurs in response to the specified keystroke.
getConfigurations() - Method in class java.awt.GraphicsDevice
Returns all of the GraphicsConfiguration objects associated with this GraphicsDevice.
getConnectControls() - Method in class javax.naming.ldap.InitialLdapContext
getConnectControls() - Method in interface javax.naming.ldap.LdapContext
Retrieves the connection request controls in effect for this context.
getConnection() - Method in interface java.sql.Statement
Returns the Connection object that produced this Statement object.
getConnection() - Method in interface java.sql.DatabaseMetaData
Retrieves the connection that produced this metadata object.
getConnection(String) - Static method in class java.sql.DriverManager
Attempts to establish a connection to the given database URL.
getConnection(String, Properties) - Static method in class java.sql.DriverManager
Attempts to establish a connection to the given database URL.
getConnection(String, String, String) - Static method in class java.sql.DriverManager
Attempts to establish a connection to the given database URL.
getConstraints(Component) - Method in class java.awt.GridBagLayout
Gets the constraints for the specified component.
getConstructor(Class[]) - Method in class java.lang.Class
Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
getConstructors() - Method in class java.lang.Class
Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object.
getContainer() - Method in class java.awt.event.ContainerEvent
Returns the originator of the event.
getContainer() - Method in interface java.beans.beancontext.BeanContextContainerProxy
Gets the java.awt.Container associated with this BeanContext.
getContainer() - Method in class javax.swing.text.View
Fetches the container hosting the view.
getContent() - Method in class java.net.URLConnection
Retrieves the contents of this URL connection.
getContent() - Method in class java.net.URL
Returns the contents of this URL.
getContent() - Method in class javax.naming.RefAddr
Retrieves the contents of this address.
getContent() - Method in class javax.naming.BinaryRefAddr
Retrieves the contents of this address as an Object.
getContent() - Method in class javax.naming.StringRefAddr
Retrieves the contents of this address.
getContent() - Method in class javax.swing.text.AbstractDocument
Gets the content for the document.
getContent() - Method in class javax.swing.text.html.parser.Element
Get content model
getContent(Class[]) - Method in class java.net.URLConnection
Retrieves the contents of this URL connection.
getContent(Class[]) - Method in class java.net.URL
Returns the contents of this URL.
getContent(URLConnection) - Method in class java.net.ContentHandler
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
getContent(URLConnection, Class[]) - Method in class java.net.ContentHandler
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.
getContentBorderInsets(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
getContentEncoding() - Method in class java.net.URLConnection
Returns the value of the content-encoding header field.
getContentLength() - Method in class java.net.URLConnection
Returns the value of the content-length header field.
getContentPane() - Method in class javax.swing.JWindow
Returns the Container which is the contentPane for this window.
getContentPane() - Method in class javax.swing.JApplet
Returns the contentPane object for this applet.
getContentPane() - Method in class javax.swing.JInternalFrame
getContentPane() - Method in class javax.swing.JFrame
Returns the contentPane object for this frame.
getContentPane() - Method in interface javax.swing.RootPaneContainer
Returns the contentPane.
getContentPane() - Method in class javax.swing.JRootPane
Returns the content pane -- the container that holds the components parented by the root pane.
getContentPane() - Method in class javax.swing.JDialog
Returns the contentPane object for this dialog.
getContents() - Method in class java.util.ListResourceBundle
See class description.
getContents() - Method in class javax.accessibility.AccessibleResourceBundle
Deprecated. Returns the mapping between the programmatic keys and the localized display strings.
getContents(Object) - Method in class java.awt.datatransfer.Clipboard
Returns a transferable object representing the current contents of the clipboard.
getContentType() - Method in class java.net.URLConnection
Returns the value of the content-type header field.
getContentType() - Method in class javax.swing.JEditorPane
Gets the type of content that this editor is currently set to deal with.
getContentType() - Method in class javax.swing.text.EditorKit
Gets the MIME type of the data that this kit represents support for.
getContentType() - Method in class javax.swing.text.DefaultEditorKit
Gets the MIME type of the data that this kit represents support for.
getContentType() - Method in class javax.swing.text.html.HTMLEditorKit
Get the MIME type of the data that this kit represents support for.
getContentType() - Method in class javax.swing.text.rtf.RTFEditorKit
Get the MIME type of the data that this kit represents support for.
getContentTypeFor(String) - Method in interface java.net.FileNameMap
Gets the MIME type for the specified file name.
getContext() - Static method in class java.security.AccessController
This method takes a "snapshot" of the current calling context, which includes the current Thread's inherited AccessControlContext, and places it in an AccessControlContext object.
getContextClassLoader() - Method in class java.lang.Thread
Returns the context ClassLoader for this Thread.
getContinuationContext(CannotProceedException) - Static method in class javax.naming.spi.NamingManager
Creates a context in which to continue a context operation.
getContinuationDirContext(CannotProceedException) - Static method in class javax.naming.spi.DirectoryManager
Creates a context in which to continue a DirContext operation.
getControl() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControl() - Method in class javax.swing.plaf.metal.MetalTheme
getControl(Control.Type) - Method in interface javax.sound.sampled.Line
Obtains a control of the specified type, if there is any.
getControlButtonsAreShown() - Method in class javax.swing.JFileChooser
Returns a boolean indicating whether the accept and cancel buttons are shown in the file chooser.
getControlDarkShadow() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlDarkShadow() - Method in class javax.swing.plaf.metal.MetalTheme
getControlDisabled() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlDisabled() - Method in class javax.swing.plaf.metal.MetalTheme
getControlHighlight() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlHighlight() - Method in class javax.swing.plaf.metal.MetalTheme
getControlInfo() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlInfo() - Method in class javax.swing.plaf.metal.MetalTheme
getControlInstance(Control) - Method in class javax.naming.ldap.ControlFactory
Creates a control using this control factory.
getControlInstance(Control, Context, Hashtable) - Static method in class javax.naming.ldap.ControlFactory
Creates a control using known control factories.
getController(int) - Method in interface javax.sound.midi.MidiChannel
Obtains the current value of the specified controller.
getControlObject() - Method in interface java.awt.im.spi.InputMethod
Returns a control object from this input method, or null.
getControls() - Method in interface javax.sound.sampled.Line
Obtains the set of controls associated with this line.
getControls() - Method in interface javax.naming.ldap.HasControls
Retrieves an array of Controls from the object that implements this interface.
getControlShadow() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlShadow() - Method in class javax.swing.plaf.metal.MetalTheme
getControlSize() - Method in class javax.swing.plaf.metal.MetalCheckBoxIcon
getControlTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlTextColor() - Method in class javax.swing.plaf.metal.MetalTheme
getControlTextFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
getControlTextFont() - Method in class javax.swing.plaf.metal.MetalTheme
getControlTextFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme
getCopies() - Method in class java.awt.JobAttributes
Returns the number of copies the application should render for jobs using these attributes.
getCopies() - Method in class java.awt.print.PrinterJob
Gets the number of copies to be printed.
getCorner(String) - Method in class javax.swing.ScrollPaneLayout
Returns the Component at the specified corner.
getCorner(String) - Method in class javax.swing.JScrollPane
Returns the component at the specified corner.
getCountLimit() - Method in class javax.naming.directory.SearchControls
Retrieves the maximum number of entries that will be returned as a result of the search.
getCountry() - Method in class java.util.Locale
Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
getCrc() - Method in class java.util.zip.ZipEntry
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known.
getCreationDate(String) - Method in class java.security.KeyStore
Returns the creation date of the entry identified by the given alias.
getCriticalExtensionOIDs() - Method in interface java.security.cert.X509Extension
Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface.
getCrossPlatformLookAndFeelClassName() - Static method in class javax.swing.UIManager
Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF).
getCrossReference(String, String, String, String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
getCrtCoefficient() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the crtCoefficient.
getCrtCoefficient() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the crtCoefficient.
getCtrlP1() - Method in class java.awt.geom.CubicCurve2D
Returns the first control point.
getCtrlP1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the first control point.
getCtrlP1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the first control point.
getCtrlP2() - Method in class java.awt.geom.CubicCurve2D
Returns the second control point.
getCtrlP2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the second control point.
getCtrlP2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the second control point.
getCtrlPt() - Method in class java.awt.geom.QuadCurve2D
Returns the control point.
getCtrlPt() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the control point.
getCtrlPt() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the control point.
getCtrlX() - Method in class java.awt.geom.QuadCurve2D
Returns the x coordinate of the control point in double precision.
getCtrlX() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the x coordinate of the control point in double precision.
getCtrlX() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the x coordinate of the control point in double precision.
getCtrlX1() - Method in class java.awt.geom.CubicCurve2D
Returns the X coordinate of the first control point in double precision.
getCtrlX1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the X coordinate of the first control point in double precision.
getCtrlX1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the X coordinate of the first control point in double precision.
getCtrlX2() - Method in class java.awt.geom.CubicCurve2D
Returns the X coordinate of the second control point in double precision.
getCtrlX2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the X coordinate of the second control point in double precision.
getCtrlX2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the X coordinate of the second control point in double precision.
getCtrlY() - Method in class java.awt.geom.QuadCurve2D
Returns the y coordinate of the control point in double precision.
getCtrlY() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the y coordinate of the control point in double precision.
getCtrlY() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the y coordinate of the control point in double precision.
getCtrlY1() - Method in class java.awt.geom.CubicCurve2D
Returns the Y coordinate of the first control point in double precision.
getCtrlY1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the Y coordinate of the first control point in double precision.
getCtrlY1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the Y coordinate of the first control point in double precision.
getCtrlY2() - Method in class java.awt.geom.CubicCurve2D
Returns the Y coordinate of the second control point in double precision.
getCtrlY2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the Y coordinate of the second control point in double precision.
getCtrlY2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the Y coordinate of the second control point in double precision.
getCurrencyInstance() - Static method in class java.text.NumberFormat
Returns a currency format for the current default locale.
getCurrencyInstance(Locale) - Static method in class java.text.NumberFormat
Returns a currency format for the specified locale.
getCurrencySymbol() - Method in class java.text.DecimalFormatSymbols
Return the string denoting the local currency.
getCurrent() - Method in class java.awt.CheckboxGroup
Deprecated. As of JDK version 1.1, replaced by getSelectedCheckbox().
getCurrentAccessibleValue() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the accessible value of this object.
getCurrentAccessibleValue() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class java.awt.Button.AccessibleAWTButton
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in interface javax.accessibility.AccessibleValue
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Get the value of this object as a Number.
getCurrentAccessibleValue() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Gets the accessible value of this object.
getCurrentAccessibleValue() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the accessible value of this object.
getCurrentAccessibleValue() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the accessible value of this object.
getCurrentAccessibleValue() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the accessible value of this object.
getCurrentDataFlavors() - Method in class java.awt.dnd.DropTargetContext
get the available DataFlavors of the Transferable operand of this operation.
getCurrentDataFlavors() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns the current DataFlavors.
getCurrentDataFlavors() - Method in class java.awt.dnd.DropTargetDragEvent
This method returns the current DataFlavors from the DropTargetContext.
getCurrentDataFlavorsAsList() - Method in class java.awt.dnd.DropTargetContext
This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.
getCurrentDataFlavorsAsList() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns the currently available DataFlavors as a java.util.List.
getCurrentDataFlavorsAsList() - Method in class java.awt.dnd.DropTargetDragEvent
This method returns the current DataFlavors as a java.util.List
getCurrentDirectory() - Method in class javax.swing.JFileChooser
Returns the current directory.
getCurrentLine() - Method in class javax.swing.text.html.parser.Parser
getCurrentLineLength() - Method in class javax.swing.text.AbstractWriter
Returns the current line length.
getCurrentManager() - Static method in class javax.swing.FocusManager
Return the FocusManager for the calling thread There is one FocusManager per thread group
getCurrentPoint() - Method in class java.awt.geom.GeneralPath
Returns the coordinates most recently added to the end of the path as a Point2D object.
getCurrentPos() - Method in class javax.swing.text.html.parser.Parser
getCurrentServiceClasses() - Method in class java.beans.beancontext.BeanContextServicesSupport
getCurrentServiceClasses() - Method in interface java.beans.beancontext.BeanContextServices
Gets the currently available services for this context.
getCurrentServiceSelectors() - Method in class java.beans.beancontext.BeanContextServiceAvailableEvent
Gets the list of service dependent selectors.
getCurrentServiceSelectors(BeanContextServices, Class) - Method in class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
getCurrentServiceSelectors(BeanContextServices, Class) - Method in interface java.beans.beancontext.BeanContextServiceProvider
Invoked by BeanContextServices, this method gets the current service selectors for the specified service.
getCurrentServiceSelectors(Class) - Method in class java.beans.beancontext.BeanContextServicesSupport
getCurrentServiceSelectors(Class) - Method in interface java.beans.beancontext.BeanContextServices
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.
getCurrentWriter() - Method in class javax.swing.text.AbstractDocument
Fetches the current writing thread if there is one.
getCursor() - Method in class java.awt.Component
Gets the cursor set in the component.
getCursor() - Method in class java.awt.Component.AccessibleAWTComponent
Get the Cursor of this object.
getCursor() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the Cursor of this object.
getCursor() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the Cursor of this object.
getCursor() - Method in class java.awt.dnd.DragSourceContext
This method returns the current drag Cursor.
getCursor() - Method in interface javax.accessibility.AccessibleComponent
Gets the Cursor of this object.
getCursor() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
getCursor() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
getCursor() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the Cursor of this object.
getCursor() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
getCursorName() - Method in interface java.sql.ResultSet
Gets the name of the SQL cursor used by this ResultSet object.
getCursorType() - Method in class java.awt.Frame
Deprecated. As of JDK version 1.1, replaced by Component.getCursor().
getCustomEditor() - Method in interface java.beans.PropertyEditor
A PropertyEditor may choose to make available a full custom Component that edits its property value.
getCustomEditor() - Method in class java.beans.PropertyEditorSupport
A PropertyEditor may chose to make available a full custom Component that edits its property value.
getCustomizerClass() - Method in class java.beans.BeanDescriptor
Gets the Class object for the bean's customizer.
getDashArray() - Method in class java.awt.BasicStroke
Returns the array representing the lengths of the dash segments.
getDashPhase() - Method in class java.awt.BasicStroke
Returns the current dash phase.
getData() - Method in class java.awt.color.ICC_Profile
Returns a byte array corresponding to the data of this ICC_Profile.
getData() - Method in class java.awt.image.DataBufferUShort
Returns the default (first) unsigned-short data array.
getData() - Method in interface java.awt.image.RenderedImage
Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).
getData() - Method in class java.awt.image.BufferedImage
Returns the image as one large tile.
getData() - Method in class java.awt.image.DataBufferByte
Returns the default (first) byte data array.
getData() - Method in class java.awt.image.DataBufferInt
Returns the default (first) int data array in DataBuffer.
getData() - Method in class java.awt.image.DataBufferShort
Returns the default (first) byte data array.
getData() - Method in class java.net.DatagramPacket
Returns the data received or the data to be sent.
getData() - Method in class java.rmi.activation.ActivationGroupDesc
Returns the group's initialization data.
getData() - Method in class java.rmi.activation.ActivationDesc
Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.
getData() - Method in class javax.sound.midi.SysexMessage
Obtains a copy of the data for the system exclusive message.
getData() - Method in class javax.sound.midi.MetaMessage
Obtains a copy of the data for the meta message.
getData() - Method in class javax.sound.midi.SoundbankResource
Obtains the sampled audio that is stored in this SoundbankResource.
getData() - Method in class javax.swing.text.html.parser.Entity
Return the data.
getData(int) - Method in class java.awt.color.ICC_Profile
Returns a particular tagged data element from the profile as a byte array.
getData(int) - Method in class java.awt.image.DataBufferUShort
Returns the data array for the specified bank.
getData(int) - Method in class java.awt.image.DataBufferByte
Returns the data array for the specified bank.
getData(int) - Method in class java.awt.image.DataBufferInt
Returns the data array for the specified bank.
getData(int) - Method in class java.awt.image.DataBufferShort
Returns the data array for the specified bank.
getData(Rectangle) - Method in interface java.awt.image.RenderedImage
Computes and returns an arbitrary region of the RenderedImage.
getData(Rectangle) - Method in class java.awt.image.BufferedImage
Computes and returns an arbitrary region of the BufferedImage.
getData1() - Method in class javax.sound.midi.ShortMessage
Obtains the first data byte in the message.
getData2() - Method in class javax.sound.midi.ShortMessage
Obtains the second data byte in the message.
getDatabaseProductName() - Method in interface java.sql.DatabaseMetaData
What's the name of this database product?
getDatabaseProductVersion() - Method in interface java.sql.DatabaseMetaData
What's the version of this database product?
getDataBitOffset() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the data bit offset in bits.
getDataBuffer() - Method in class java.awt.image.Raster
Returns the DataBuffer associated with this Raster.
getDataClass() - Method in class javax.sound.midi.SoundbankResource
Obtains the class used by this sample to represent its data.
getDataElement(int[], int) - Method in class java.awt.image.ColorModel
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
getDataElement(int[], int) - Method in class java.awt.image.ComponentColorModel
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
getDataElement(int[], int) - Method in class java.awt.image.DirectColorModel
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
getDataElement(int[], int) - Method in class java.awt.image.IndexColorModel
Returns a pixel value represented as an int in this ColorModel given an array of unnormalized color/alpha components.
getDataElements(int[], int, Object) - Method in class java.awt.image.ColorModel
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
getDataElements(int[], int, Object) - Method in class java.awt.image.ComponentColorModel
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
getDataElements(int[], int, Object) - Method in class java.awt.image.DirectColorModel
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
getDataElements(int[], int, Object) - Method in class java.awt.image.IndexColorModel
Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components.
getDataElements(int, int, int, int, Object) - Method in class java.awt.image.Raster
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
getDataElements(int, int, int, int, Object, DataBuffer) - Method in class java.awt.image.SampleModel
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
getDataElements(int, int, Object) - Method in class java.awt.image.Raster
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.SampleModel
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns data for a single pixel in a primitive array of type TransferType.
getDataElements(int, Object) - Method in class java.awt.image.ColorModel
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
getDataElements(int, Object) - Method in class java.awt.image.ComponentColorModel
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
getDataElements(int, Object) - Method in class java.awt.image.DirectColorModel
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
getDataElements(int, Object) - Method in class java.awt.image.IndexColorModel
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
getDataLength(int) - Method in class javax.sound.midi.ShortMessage
Retrieves the number of data bytes associated with a particular status byte value.
getDataSize() - Method in class java.sql.DataTruncation
Gets the number of bytes of data that should have been transferred.
getDataType() - Method in class java.awt.image.SampleModel
Returns the data type of the DataBuffer storing the pixel data.
getDataType() - Method in class java.awt.image.DataBuffer
Returns the data type of this DataBuffer.
getDataTypeSize(int) - Static method in class java.awt.image.DataBuffer
Returns the size (in bits) of the data type, given a datatype tag.
getDataVector() - Method in class javax.swing.table.DefaultTableModel
Returns the Vector of Vectors that contains the table's data values.
getDate() - Method in class java.net.URLConnection
Returns the value of the date header field.
getDate() - Method in class java.sql.Time
Deprecated.
getDate() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_MONTH).
getDate(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC DATE parameter as a java.sql.Date object.
getDate(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
getDate(int, Calendar) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
getDate(int, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
getDate(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
getDate(String, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
getDateFormatSymbols() - Method in class java.text.SimpleDateFormat
Gets the date/time formatting data.
getDateInstance() - Static method in class java.text.DateFormat
Gets the date formatter with the default formatting style for the default locale.
getDateInstance(int) - Static method in class java.text.DateFormat
Gets the date formatter with the given formatting style for the default locale.
getDateInstance(int, Locale) - Static method in class java.text.DateFormat
Gets the date formatter with the given formatting style for the given locale.
getDateTimeInstance() - Static method in class java.text.DateFormat
Gets the date/time formatter with the default formatting style for the default locale.
getDateTimeInstance(int, int) - Static method in class java.text.DateFormat
Gets the date/time formatter with the given date and time formatting styles for the default locale.
getDateTimeInstance(int, int, Locale) - Static method in class java.text.DateFormat
Gets the date/time formatter with the given formatting styles for the given locale.
getDay() - Method in class java.sql.Time
Deprecated.
getDay() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK).
getDebugGraphicsOptions() - Method in class javax.swing.JComponent
Returns the state of graphics debugging.
getDebugOptions() - Method in class javax.swing.DebugGraphics
Returns the current debugging options for this DebugGraphics.
getDecayTime() - Method in class javax.sound.sampled.ReverbType
Obtains the decay time, which is the amount of time over which the late reflections attenuate to effective zero.
getDecimalFormatSymbols() - Method in class java.text.DecimalFormat
Returns the decimal format symbols, which is generally not changed by the programmer or user.
getDecimalSeparator() - Method in class java.text.DecimalFormatSymbols
Gets the character used for decimal sign.
getDeclaration(String) - Method in class javax.swing.text.html.StyleSheet
Translates a CSS declaration to an AttributeSet that represents the CSS declaration.
getDeclaredClasses() - Method in class java.lang.Class
Returns an array of Class objects reflecting all the classes and interfaces declared as members of the class represented by this Class object.
getDeclaredConstructor(Class[]) - Method in class java.lang.Class
Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.
getDeclaredConstructors() - Method in class java.lang.Class
Returns an array of Constructor objects reflecting all the constructors declared by the class represented by this Class object.
getDeclaredField(String) - Method in class java.lang.Class
Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.
getDeclaredFields() - Method in class java.lang.Class
Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object.
getDeclaredMethod(String, Class[]) - Method in class java.lang.Class
Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
getDeclaredMethods() - Method in class java.lang.Class
Returns an array of Method objects reflecting all the methods declared by the class or interface represented by this Class object.
getDeclaringClass() - Method in class java.lang.Class
If the class or interface represented by this Class object is a member of another class, returns the Class object representing the class in which it was declared.
getDeclaringClass() - Method in interface java.lang.reflect.Member
Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.
getDeclaringClass() - Method in class java.lang.reflect.Method
Returns the Class object representing the class or interface that declares the method represented by this Method object.
getDeclaringClass() - Method in class java.lang.reflect.Field
Returns the Class object representing the class or interface that declares the field represented by this Field object.
getDeclaringClass() - Method in class java.lang.reflect.Constructor
Returns the Class object representing the class that declares the constructor represented by this Constructor object.
getDecomposition() - Method in class java.text.Collator
Get the decomposition mode of this Collator.
getDeepestComponentAt(Component, int, int) - Static method in class javax.swing.SwingUtilities
Returns the deepest visible descendent Component of parent that contains the location x, y.
getDefault() - Static method in class java.util.TimeZone
Gets the default TimeZone for this host.
getDefault() - Static method in class java.util.Locale
Gets the current value of the default locale for this instance of the Java Virtual Machine.
getDefaultAction() - Method in interface javax.swing.text.Keymap
Fetches the default action to fire if a key is typed (i.e.
getDefaultActions() - Method in class java.awt.dnd.DropTarget
This method returns an int representing the current action(s) supported by this DropTarget.
getDefaultAllowUserInteraction() - Static method in class java.net.URLConnection
Returns the default value of the allowUserInteraction field.
getDefaultButton() - Method in class javax.swing.JRootPane
Returns the current default button for this JRootPane.
getDefaultChooserPanels() - Static method in class javax.swing.colorchooser.ColorChooserComponentFactory
getDefaultClosedIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.
getDefaultCloseOperation() - Method in class javax.swing.JInternalFrame
Returns the default operation which occurs when the user initiates a "close" on this window.
getDefaultCloseOperation() - Method in class javax.swing.JFrame
Returns the operation that occurs when the user initiates a "close" on this frame.
getDefaultCloseOperation() - Method in class javax.swing.JDialog
Returns the operation which occurs when the user initiates a "close" on this dialog.
getDefaultConfiguration() - Method in class java.awt.GraphicsDevice
Returns the default GraphicsConfiguration associated with this GraphicsDevice.
getDefaultCursor() - Static method in class java.awt.Cursor
Return the system default cursor.
getDefaultCursor() - Method in class javax.swing.text.html.HTMLEditorKit
Returns the default cursor.
getDefaultDragSource() - Static method in class java.awt.dnd.DragSource
This method returns the DragSource object associated with the underlying platform.
getDefaultEditor(Class) - Method in class javax.swing.JTable
Returns the editor to be used when no editor has been set in a TableColumn.
getDefaultEventIndex() - Method in interface java.beans.BeanInfo
A bean may have a "default" event that is the event that will mostly commonly be used by humans when using the bean.
getDefaultEventIndex() - Method in class java.beans.SimpleBeanInfo
Deny knowledge of a default event.
getDefaultFlavorMap() - Static method in class java.awt.datatransfer.SystemFlavorMap
get the default system implementation
getDefaultIcon() - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultInitCtx() - Method in class javax.naming.InitialContext
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx.
getDefaultLeafIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the default icon, for the current laf, that is used to represent leaf nodes.
getDefaultLightWeightPopupEnabled() - Static method in class javax.swing.JPopupMenu
Returns true if this is a light weight popup component, false otherwise.
getDefaultOpenIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.
getDefaultPort() - Method in class java.net.URLStreamHandler
Returns the default port for a URL parsed by this handler.
getDefaultPropertyIndex() - Method in interface java.beans.BeanInfo
A bean may have a "default" property that is the property that will mostly commonly be initially chosen for update by human's who are customizing the bean.
getDefaultPropertyIndex() - Method in class java.beans.SimpleBeanInfo
Deny knowledge of a default property.
getDefaultQueue() - Static method in class javax.swing.text.LayoutQueue
Fetch the default layout queue.
getDefaultRenderer() - Method in class javax.swing.table.JTableHeader
Returns the default renderer used when no headerRenderer is defined by a TableColumn.
getDefaultRenderer(Class) - Method in class javax.swing.JTable
Returns the cell renderer to be used when no renderer has been set in a TableColumn.
getDefaultRepresentationClass() - Method in class java.awt.datatransfer.DataFlavor
getDefaultRepresentationClassAsString() - Method in class java.awt.datatransfer.DataFlavor
getDefaultRequestProperty(String) - Static method in class java.net.URLConnection
Deprecated. The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
getDefaultRootElement() - Method in interface javax.swing.text.Document
Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided.
getDefaultRootElement() - Method in class javax.swing.text.AbstractDocument
Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided.
getDefaultRootElement() - Method in class javax.swing.text.PlainDocument
Gets the default root element for the document model.
getDefaultRootElement() - Method in class javax.swing.text.DefaultStyledDocument
Gets the default root element.
getDefaults() - Method in class javax.swing.LookAndFeel
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
getDefaults() - Static method in class javax.swing.UIManager
Returns the default values for this look and feel.
getDefaults() - Method in class javax.swing.plaf.basic.BasicLookAndFeel
getDefaults() - Method in class javax.swing.plaf.metal.MetalLookAndFeel
getDefaults() - Method in class javax.swing.plaf.multi.MultiLookAndFeel
getDefaultScreenDevice() - Method in class java.awt.GraphicsEnvironment
Returns the default screen GraphicsDevice.
getDefaultSelection() - Method in class java.awt.JobAttributes
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.
getDefaultSize() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Return the default size of an empty combo box.
getDefaultSocketFactory() - Static method in class java.rmi.server.RMISocketFactory
Returns a reference to the default socket factory used by this RMI implementation.
getDefaultSoundbank() - Method in interface javax.sound.midi.Synthesizer
Obtains the default soundbank for the synthesizer, if one exists.
getDefaultStream() - Static method in class java.rmi.server.LogStream
Deprecated. no replacement
getDefaultStyleContext() - Static method in class javax.swing.text.StyleContext
Returns default AttributeContext shared by all documents that don't bother to define/supply their own context.
getDefaultTextIconGap(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
getDefaultToolkit() - Static method in class java.awt.Toolkit
Gets the default toolkit.
getDefaultTransactionIsolation() - Method in interface java.sql.DatabaseMetaData
What's the database's default transaction isolation level? The values are defined in java.sql.Connection.
getDefaultTransform() - Method in class java.awt.GraphicsConfiguration
Returns the default AffineTransform for this GraphicsConfiguration.
getDefaultTreeModel() - Static method in class javax.swing.JTree
Creates and returns a sample TreeModel.
getDefaultType() - Static method in class java.security.KeyStore
Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists.
getDefaultUseCaches() - Method in class java.net.URLConnection
Returns the default value of a URLConnection's useCaches flag.
getDefaultValue() - Method in class javax.swing.text.html.CSS.Attribute
Fetch the default value for the attribute.
getDelay() - Method in class javax.swing.JMenu
Returns the suggested delay, in milliseconds, before submenus are popped up or down.
getDelay() - Method in class javax.swing.Timer
Returns the Timer's delay.
getDepth() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the depth of the tree rooted at this node -- the longest distance from this node to a leaf.
getDerefLinkFlag() - Method in class javax.naming.directory.SearchControls
Determines whether links will be dereferenced during the search.
getDescendantToggledPaths(TreePath) - Method in class javax.swing.JTree
Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
getDescent() - Method in class java.awt.FontMetrics
Determines the font descent of the Font described by this FontMetrics object.
getDescent() - Method in class java.awt.font.TextLayout
Returns the descent of this TextLayout.
getDescent() - Method in class java.awt.font.GraphicAttribute
Returns the descent of this GraphicAttribute.
getDescent() - Method in class java.awt.font.ImageGraphicAttribute
Returns the descent of this ImageGraphicAttributegetDescent() - Method in class java.awt.font.LineMetrics
Returns the descent of the text.
getDescent() - Method in class java.awt.font.ShapeGraphicAttribute
Returns the descent of this ShapeGraphicAttribute.
getDescent(GlyphView) - Method in class javax.swing.text.GlyphView.GlyphPainter

getDescription() - Method in class javax.sound.sampled.Mixer.Info
Obtains the description of the mixer.
getDescription() - Method in interface javax.sound.midi.Soundbank
Obtains a textual description of the sound bank, suitable for display.
getDescription() - Method in class javax.sound.midi.MidiDevice.Info
Obtains the description of the device.
getDescription() - Method in class javax.swing.LookAndFeel
Return a one line description of this look and feel implementation, e.g.
getDescription() - Method in class javax.swing.ImageIcon
Gets the description of the image.
getDescription() - Method in class javax.swing.filechooser.FileFilter
The description of this filter.
getDescription() - Method in class javax.swing.event.HyperlinkEvent
Get the description of the link as a string.
getDescription() - Method in class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter

getDescription() - Method in class javax.swing.plaf.metal.MetalLookAndFeel

getDescription() - Method in class javax.swing.plaf.multi.MultiLookAndFeel

getDescription(File) - Method in class javax.swing.JFileChooser
Returns the file description.
getDescription(File) - Method in class javax.swing.filechooser.FileView
A human readable description of the file.
getDescription(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

getDesignAxisDefaults() - Method in interface java.awt.font.MultipleMaster
Returns an array of default design values for each axis.
getDesignAxisNames() - Method in interface java.awt.font.MultipleMaster
Returns the name for each design axis.
getDesignAxisRanges() - Method in interface java.awt.font.MultipleMaster
Returns an array of design limits interleaved in the form [from->to] for each axis.
getDesktopColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getDesktopColor() - Method in class javax.swing.plaf.metal.MetalTheme

getDesktopIcon() - Method in class javax.swing.JInternalFrame
Returns the JDesktopIcon used when this JInternalFrame is iconified.
getDesktopIconBorder() - Static method in class javax.swing.plaf.metal.MetalBorders
Returns a border instance for a Desktop Icon
getDesktopManager() - Method in class javax.swing.JDesktopPane
Returns the DesktopManger that handles desktop-specific UI actions.
getDesktopManager() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
Returns the proper DesktopManager.
getDesktopPane() - Method in class javax.swing.JInternalFrame
Convenience method that searchs the anscestor heirarchy for a JDesktop instance.
getDesktopPane() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Convience method to ask the icon for the Desktop object it belongs to.
getDesktopPaneForComponent(Component) - Static method in class javax.swing.JOptionPane
Returns the specified component's desktop pane.
getDesktopProperty(String) - Method in class java.awt.Toolkit
obtain a value for the specified desktop property.
getDestination() - Method in class java.awt.JobAttributes
Specifies whether output will be to a printer or a file for jobs using these attributes.
getDeterminant() - Method in class java.awt.geom.AffineTransform
Returns the determinant of the matrix representation of the transform.
getDevice() - Method in class java.awt.GraphicsConfiguration
Returns the GraphicsDevice associated with this GraphicsConfiguration.
getDevice(MidiDevice.Info) - Method in class javax.sound.midi.spi.MidiDeviceProvider
Obtains an instance of the device represented by the info object.
getDeviceConfiguration() - Method in class java.awt.Graphics2D
Returns the device configuration associated with this Graphics2D.
getDeviceInfo() - Method in interface javax.sound.midi.MidiDevice
Obtains information about the device, including its Java class and Strings containing its name, vendor, and description.
getDeviceInfo() - Method in class javax.sound.midi.spi.MidiDeviceProvider
Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.
getDialog() - Method in class java.awt.JobAttributes
Returns whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.
getDialogTitle() - Method in class javax.swing.JFileChooser
Gets the string that goes in the JFileChooser's titlebar.
getDialogTitle(JFileChooser) - Method in class javax.swing.plaf.FileChooserUI

getDialogTitle(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
Returns the title of this dialog
getDialogTitle(JFileChooser) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getDialogTitle on each UI handled by this MultiUI.
getDialogType() - Method in class javax.swing.JFileChooser
Returns the type of this dialog.
getDigestLength() - Method in class java.security.MessageDigest
Returns the length of the digest in bytes, or 0 if this operation is not supported by the provider and the implementation is not cloneable.
getDigit() - Method in class java.text.DecimalFormatSymbols
Gets the character used for a digit in a pattern.
getDimension(Object) - Method in class javax.swing.UIDefaults
If the value of key is a Dimension return it, otherwise return null.
getDimension(Object) - Static method in class javax.swing.UIManager
Returns a dimension from the defaults table.
getDirection() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the direction.
getDirection() - Method in class javax.swing.plaf.basic.BasicArrowButton

getDirectories() - Method in class javax.swing.plaf.basic.BasicDirectoryModel

getDirectory() - Method in class java.awt.FileDialog
Gets the directory of this file dialog.
getDirectoryName() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getDirectoryName() - Method in class javax.swing.plaf.metal.MetalFileChooserUI

getDirtyRegion(JComponent) - Method in class javax.swing.RepaintManager
Return the current dirty region for a component.
getDisabledIcon() - Method in class javax.swing.AbstractButton
Returns the icon used by the button when it's disabled.
getDisabledIcon() - Method in class javax.swing.JLabel
Returns the value of the disabledIcon property if it's been set, If it hasn't been set and the value of the icon property is an ImageIcon, we compute a "grayed out" version of the icon and update the disabledIcon property with that.
getDisabledIconAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab disabled icon at index.
getDisabledSelectedIcon() - Method in class javax.swing.AbstractButton
Returns the icon used by the button when it's disabled and selected.
getDisabledTextColor() - Method in class javax.swing.text.JTextComponent
Fetches the current color used to render the selected text.
getDisabledTextColor() - Method in class javax.swing.plaf.metal.MetalToggleButtonUI

getDisabledTextColor() - Method in class javax.swing.plaf.metal.MetalRadioButtonUI

getDisabledTextColor() - Method in class javax.swing.plaf.metal.MetalButtonUI

getDismissDelay() - Method in class javax.swing.ToolTipManager
Returns the dismisal delay value.
getDisplayCountry() - Method in class java.util.Locale
Returns a name for the locale's country that is appropriate for display to the user.
getDisplayCountry(Locale) - Method in class java.util.Locale
Returns a name for the locale's country that is appropriate for display to the user.
getDisplayedMnemonic() - Method in class javax.swing.JLabel
Return the keycode that indicates a mnemonic key.
getDisplayLanguage() - Method in class java.util.Locale
Returns a name for the locale's language that is appropriate for display to the user.
getDisplayLanguage(Locale) - Method in class java.util.Locale
Returns a name for the locale's language that is appropriate for display to the user.
getDisplayName() - Method in class java.beans.FeatureDescriptor
Gets the localized display name of this feature.
getDisplayName() - Method in class java.util.TimeZone
Returns a name of this time zone suitable for presentation to the user in the default locale.
getDisplayName() - Method in class java.util.Locale
Returns a name for the locale that is appropriate for display to the user.
getDisplayName() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Returns a string containing the display name of the panel.
getDisplayName(boolean, int) - Method in class java.util.TimeZone
Returns a name of this time zone suitable for presentation to the user in the default locale.
getDisplayName(boolean, int, Locale) - Method in class java.util.TimeZone
Returns a name of this time zone suitable for presentation to the user in the specified locale.
getDisplayName(Locale) - Method in class java.util.TimeZone
Returns a name of this time zone suitable for presentation to the user in the specified locale.
getDisplayName(Locale) - Method in class java.util.Locale
Returns a name for the locale that is appropriate for display to the user.
getDisplaySize() - Method in class javax.swing.plaf.basic.BasicComboBoxUI

getDisplayVariant() - Method in class java.util.Locale
Returns a name for the locale's variant code that is appropriate for display to the user.
getDisplayVariant(Locale) - Method in class java.util.Locale
Returns a name for the locale's variant code that is appropriate for display to the user.
getDivider() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the divider between the top Components.
getDividerBorderSize() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3, instead set the border on the divider.
getDividerLocation() - Method in class javax.swing.JSplitPane
Returns the last value passed to setDividerLocation.
getDividerLocation(JSplitPane) - Method in class javax.swing.plaf.SplitPaneUI
Returns the location of the divider.
getDividerLocation(JSplitPane) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
getDividerLocation(JSplitPane) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getDividerLocation on each UI handled by this MultiUI.
getDividerSize() - Method in class javax.swing.JSplitPane
Returns the size of the divider.
getDividerSize() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
getDivisionType() - Method in class javax.sound.midi.Sequence
Obtains the timing division type for this sequence.
getDivisionType() - Method in class javax.sound.midi.MidiFileFormat
Obtains the timing division type for the MIDI file.
getDockingColor() - Method in class javax.swing.plaf.basic.BasicToolBarUI
Gets the color displayed when over a docking area
getDocument() - Method in interface javax.swing.event.DocumentEvent
Gets the document that sourced the change event.
getDocument() - Method in class javax.swing.text.JTextComponent
Fetches the model associated with the editor.
getDocument() - Method in class javax.swing.text.View
Fetches the model associated with the view.
getDocument() - Method in interface javax.swing.text.Element
Fetches the document associated with this element.
getDocument() - Method in class javax.swing.text.AbstractWriter
Fetches the document.
getDocument() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Retrieves the underlying model.
getDocument() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Gets the document that sourced the change event.
getDocumentBase() - Method in class java.applet.Applet
Returns an absolute URL naming the directory of the document in which the applet is embedded.
getDocumentBase() - Method in interface java.applet.AppletStub
Returns an absolute URL naming the directory of the document in which the applet is embedded.
getDocumentProperties() - Method in class javax.swing.text.AbstractDocument
Support for managing a set of properties.
getDoInput() - Method in class java.net.URLConnection
Returns the value of this URLConnection's doInput flag.
getDomainCombiner() - Method in class java.security.AccessControlContext
Get the DomainCombiner associated with this AccessControlContext.
getDoOutput() - Method in class java.net.URLConnection
Returns the value of this URLConnection's doOutput flag.
getDot() - Method in class javax.swing.event.CaretEvent
Fetches the location of the caret.
getDot() - Method in class javax.swing.text.DefaultCaret
Fetches the current position of the caret.
getDot() - Method in interface javax.swing.text.Caret
Fetches the current position of the caret.
getDouble(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language.
getDouble(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
getDouble(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a double on the specified object.
getDouble(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a double.
getDouble(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
getDoubleBufferMaximumSize() - Method in class javax.swing.RepaintManager
Returns the maximum double buffer size.
getDoubleParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a double.
getDragAction() - Method in class java.awt.dnd.DragGestureEvent
This method returns an int representing the action selected by the user.
getDraggedColumn() - Method in class javax.swing.table.JTableHeader
Returns the the dragged column, if and only if, a drag is in process, otherwise returns null.
getDraggedDistance() - Method in class javax.swing.table.JTableHeader
Returns the column's horizontal distance from its original position, if and only if, a drag is in process.
getDragMode() - Method in class javax.swing.JDesktopPane
Get the current "dragging style" used by the desktop pane.
getDragOrigin() - Method in class java.awt.dnd.DragGestureEvent
This method returns a Point in the coordinates of the Component over which the drag originated.
getDragSource() - Method in class java.awt.dnd.DragGestureRecognizer
This method returns the DragSource this DragGestureRecognizer will use in order to process the Drag and Drop operation.
getDragSource() - Method in class java.awt.dnd.DragSourceContext
This method returns the DragSource that instantiated this DragSourceContext.
getDragSource() - Method in class java.awt.dnd.DragGestureEvent
This method returns the DragSource.
getDragSourceContext() - Method in class java.awt.dnd.DragSourceEvent
This method returns the DragSourceContext that originated the event.
getDrawsLayeredHighlights() - Method in class javax.swing.text.DefaultHighlighter

getDriver(String) - Static method in class java.sql.DriverManager
Attempts to locate a driver that understands the given URL.
getDriverMajorVersion() - Method in interface java.sql.DatabaseMetaData
What's this JDBC driver's major version number?
getDriverMinorVersion() - Method in interface java.sql.DatabaseMetaData
What's this JDBC driver's minor version number?
getDriverName() - Method in interface java.sql.DatabaseMetaData
What's the name of this JDBC driver?
getDrivers() - Static method in class java.sql.DriverManager
Retrieves an Enumeration with all of the currently loaded JDBC drivers to which the current caller has access.
getDriverVersion() - Method in interface java.sql.DatabaseMetaData
What's the version of this JDBC driver?
getDropAction() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns an int representing the action(s) supported by the source at the time of the drop.
getDropAction() - Method in class java.awt.dnd.DragSourceDragEvent
This method returns an int representing the effective drop action which is the intersection of the user's selected action, and the source and target actions.
getDropAction() - Method in class java.awt.dnd.DragSourceDropEvent
This method returns an int representing the action performed by the target on the subject of the drop.
getDropAction() - Method in class java.awt.dnd.DropTargetDragEvent
This method returns an int representing the currently selected drop action.
getDropSuccess() - Method in class java.awt.dnd.DragSourceDropEvent
This method returns a boolean indicating if the drop was a success.
getDropTarget() - Method in class java.awt.Component
Get the DropTarget associated with this Component
getDropTarget() - Method in class java.awt.dnd.DropTargetContext
This method returns the DropTarget associated with this DropTargetContext.
getDropTargetContext() - Method in class java.awt.dnd.DropTargetEvent
This method returns the DropTargetContext associated with this DropTargetEvent.
getDropTargetContext() - Method in class java.awt.dnd.DropTarget
This method returns the DropTargetContext associated with this DropTarget.
getDSTSavings() - Method in class java.util.SimpleTimeZone
Returns the amount of time in ms that the clock is advanced during DST.
getDTD(String) - Static method in class javax.swing.text.html.parser.DTD
Get a DTD.
getEarlyReflectionDelay() - Method in class javax.sound.sampled.ReverbType
Returns the early reflection delay time in microseconds.
getEarlyReflectionIntensity() - Method in class javax.sound.sampled.ReverbType
Returns the early reflection intensity in microseconds.
getEastPane() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getEchoChar() - Method in class java.awt.TextField
Gets the character that is to be used for echoing.
getEchoChar() - Method in class javax.swing.JPasswordField
Returns the character to be used for echoing.
getEdgeCondition() - Method in class java.awt.image.ConvolveOp
Returns the edge condition.
getEdit() - Method in class javax.swing.event.UndoableEditEvent
Returns the edit value.
getEditingColumn() - Method in class javax.swing.JTable
Returns the index of the column that contains the cell currently being edited.
getEditingPath() - Method in class javax.swing.JTree
Returns the path to the element that is currently being edited.
getEditingPath(JTree) - Method in class javax.swing.plaf.TreeUI
Returns the path to the element that is being edited.
getEditingPath(JTree) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the path to the element that is being edited.
getEditingPath(JTree) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getEditingPath on each UI handled by this MultiUI.
getEditingRow() - Method in class javax.swing.JTable
Returns the index of the row that contains the cell currently being edited.
getEditor() - Method in class javax.swing.JComboBox
Returns the editor used to paint and edit the selected item in the JComboBox field.
getEditor(ActionEvent) - Method in class javax.swing.text.StyledEditorKit.StyledTextAction
Gets the target editor for an action.
getEditorComponent() - Method in interface javax.swing.ComboBoxEditor
Return the component that should be added to the tree hierarchy for this editor
getEditorComponent() - Method in class javax.swing.JTable
Returns the component that is handling the editing session.
getEditorComponent() - Method in class javax.swing.plaf.basic.BasicComboBoxEditor

getEditorKit() - Method in class javax.swing.JEditorPane
Fetches the currently installed kit for handling content.
getEditorKit(JTextComponent) - Method in class javax.swing.plaf.TextUI
Fetches the binding of services that set a policy for the type of document being edited.
getEditorKit(JTextComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Fetches the EditorKit for the UI.
getEditorKit(JTextComponent) - Method in class javax.swing.plaf.basic.BasicEditorPaneUI
Fetches the EditorKit for the UI.
getEditorKit(JTextComponent) - Method in class javax.swing.plaf.basic.BasicTextPaneUI
Fetches the EditorKit for the UI.
getEditorKit(JTextComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getEditorKit on each UI handled by this MultiUI.
getEditorKitClassNameForContentType(String) - Static method in class javax.swing.JEditorPane
Returns the currently registered EditorKit class name for the type type.
getEditorKitForContentType(String) - Method in class javax.swing.JEditorPane
Fetches the editor kit to use for the given type of content.
getEditorSearchPath() - Static method in class java.beans.PropertyEditorManager
Gets the package names that will be searched for property editors.
getElem(int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the first (default) bank as an integer.
getElem(int) - Method in class java.awt.image.DataBufferUShort
Returns the requested data array element from the first (default) bank.
getElem(int) - Method in class java.awt.image.DataBufferByte
Returns the requested data array element from the first (default) bank.
getElem(int) - Method in class java.awt.image.DataBufferInt
Returns the requested data array element from the first (default) bank.
getElem(int) - Method in class java.awt.image.DataBufferShort
Returns the requested data array element from the first (default) bank.
getElem(int, int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the specified bank as an integer.
getElem(int, int) - Method in class java.awt.image.DataBufferUShort
Returns the requested data array element from the specified bank
getElem(int, int) - Method in class java.awt.image.DataBufferByte
Returns the requested data array element from the specified bank
getElem(int, int) - Method in class java.awt.image.DataBufferInt
Returns the requested data array element from the specified bank
getElem(int, int) - Method in class java.awt.image.DataBufferShort
Returns the requested data array element from the specified bank
getElemDouble(int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the first (default) bank as a double.
getElemDouble(int, int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the specified bank as a double.
getElement() - Method in interface javax.swing.event.DocumentEvent.ElementChange
Returns the element represented.
getElement() - Method in class javax.swing.text.View
Fetches the structural portion of the subject that this view is mapped to.
getElement() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Returns the underlying element.
getElement() - Method in class javax.swing.text.html.parser.TagElement

getElement(Element, Object, Object) - Method in class javax.swing.text.html.HTMLDocument
Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found.
getElement(int) - Method in interface javax.swing.text.Element
Fetches the child element at the given index.
getElement(int) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets a child element.
getElement(int) - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets a child element.
getElement(int) - Method in class javax.swing.text.AbstractDocument.LeafElement
Gets a child element.
getElement(int) - Method in class javax.swing.text.html.parser.DTD
Get an element by index.
getElement(String) - Method in class javax.swing.text.html.HTMLDocument
Fetches the element that has the given id attribute.
getElement(String) - Method in class javax.swing.text.html.parser.DTD
Get an element by name.
getElementAt(int) - Method in interface javax.swing.ListModel
Returns the value at the specified index.
getElementAt(int) - Method in class javax.swing.DefaultComboBoxModel

getElementAt(int) - Method in class javax.swing.DefaultListModel
Returns the component at the specified index.
getElementAt(int) - Method in class javax.swing.plaf.basic.BasicDirectoryModel

getElementAt(int) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

getElementAt(int) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

getElementCount() - Method in interface javax.swing.text.Element
Gets the number of child elements contained by this element.
getElementCount() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the number of children for the element.
getElementCount() - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the number of children for the element.
getElementCount() - Method in class javax.swing.text.AbstractDocument.LeafElement
Returns the number of child elements.
getElementIndex(int) - Method in interface javax.swing.text.Element
Gets the child element index closest to the given offset.
getElementIndex(int) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the child element index closest to the given model offset.
getElementIndex(int) - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the child element index closest to the given model offset.
getElementIndex(int) - Method in class javax.swing.text.AbstractDocument.LeafElement
Gets the child element index closest to the given model offset.
getElementIterator() - Method in class javax.swing.text.AbstractWriter
Fetches the ElementIterator.
getElements() - Method in class javax.swing.ButtonGroup
Return all the buttons that are participating in this group.
getElements(Vector) - Method in class javax.swing.text.html.parser.ContentModel
Update elemVec with the list of elements that are part of the this contentModel.
getElementsAt(HTMLDocument, int) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
Returns an array of the Elements that contain offset.
getElemFloat(int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the first (default) bank as a float.
getElemFloat(int, int) - Method in class java.awt.image.DataBuffer
Returns the requested data array element from the specified bank as a float.
getEmptySet() - Method in class javax.swing.text.StyleContext
Fetches an empty AttributeSet.
getEmptySet() - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Fetches an empty AttributeSet.
getEncoded() - Method in interface java.security.Key
Returns the key in its primary encoding format, or null if this key does not support encoding.
getEncoded() - Method in class java.security.AlgorithmParameters
Returns the parameters in their primary encoding format.
getEncoded() - Method in class java.security.cert.Certificate
Returns the encoded form of this certificate.
getEncoded() - Method in class java.security.cert.X509CRLEntry
Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE.
getEncoded() - Method in class java.security.cert.X509CRL
Returns the ASN.1 DER-encoded form of this CRL.
getEncoded() - Method in class java.security.spec.EncodedKeySpec
Returns the encoded key.
getEncoded() - Method in class java.security.spec.PKCS8EncodedKeySpec
Returns the key bytes, encoded according to the PKCS #8 standard.
getEncoded() - Method in class java.security.spec.X509EncodedKeySpec
Returns the key bytes, encoded according to the X.509 standard.
getEncoded(String) - Method in class java.security.AlgorithmParameters
Returns the parameters encoded in the specified scheme.
getEncodedValue() - Method in interface javax.naming.ldap.Control
Retrieves the ASN.1 BER encoded value of the LDAP control.
getEncodedValue() - Method in interface javax.naming.ldap.ExtendedRequest
Retrieves the ASN.1 BER encoded value of the LDAP extended operation request.
getEncodedValue() - Method in interface javax.naming.ldap.ExtendedResponse
Retrieves the ASN.1 BER encoded value of the LDAP extended operation response.
getEncoding() - Method in class java.io.InputStreamReader
Returns the canonical name of the character encoding being used by this stream.
getEncoding() - Method in class java.io.OutputStreamWriter
Returns the canonical name of the character encoding being used by this stream.
getEncoding() - Method in class javax.sound.sampled.AudioFormat
Obtains the type of encoding for sounds in this format.
getEndCap() - Method in class java.awt.BasicStroke
Returns the end cap style.
getEndIndex() - Method in interface java.text.CharacterIterator
Returns the end index of the text.
getEndIndex() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.getEndIndex() for String.
getEndIndex() - Method in class java.text.FieldPosition
Retrieves the index of the character following the last character in the requested field.
getEndIndex() - Method in class javax.accessibility.AccessibleHyperlink
Gets the index with the hypertext document at which this link ends
getEndIndex() - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Get the index with the hypertext document at which this link ends
getEndIndex() - Method in class javax.swing.text.Segment
Returns the end index of the text.
getEndOffset() - Method in class javax.swing.text.View
Fetches the portion of the model that this view is responsible for.
getEndOffset() - Method in interface javax.swing.text.Element
Fetches the offset from the beginning of the document that this element ends at.
getEndOffset() - Method in class javax.swing.text.GlyphView
Fetches the portion of the model that this view is responsible for.
getEndOffset() - Method in interface javax.swing.text.Highlighter.Highlight
Gets the ending model offset for the highlight.
getEndOffset() - Method in class javax.swing.text.AbstractWriter
Returns the last offset to be output.
getEndOffset() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the ending offset in the model for the element.
getEndOffset() - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the ending offset in the model for the element.
getEndOffset() - Method in class javax.swing.text.AbstractDocument.LeafElement
Gets the ending offset in the model for the element.
getEndOffset() - Method in class javax.swing.text.html.HTMLDocument.Iterator
End of the range for which the current occurence of the tag is defined and has the same attributes.
getEndPoint() - Method in class java.awt.geom.Arc2D
Returns the ending point of the arc.
getEndPosition() - Method in interface javax.swing.text.Document
Returns a position that represents the end of the document.
getEndPosition() - Method in class javax.swing.text.AbstractDocument
Returns a position that represents the end of the document.
getEntity(int) - Method in class javax.swing.text.html.parser.DTD
Get a character entity.
getEntity(String) - Method in class javax.swing.text.html.parser.DTD
Get an entity by name.
getEntries() - Method in class java.util.jar.Manifest
Returns a Map of the entries contained in this Manifest.
getEntry(String) - Method in class java.util.jar.JarFile
Returns the ZipEntry for the given entry name or null if not found.
getEntry(String) - Method in class java.util.zip.ZipFile
Returns the zip file entry for the specified name, or null if not found.
getEntryName() - Method in class java.net.JarURLConnection
Return the entry name for this connection.
getenv(String) - Static method in class java.lang.System
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding getTypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();
getEnvironment() - Method in class javax.naming.InitialContext

getEnvironment() - Method in class javax.naming.CannotProceedException
Retrieves the environment that was in effect when this exception was created.
getEnvironment() - Method in interface javax.naming.Context
Retrieves the environment in effect for this context.
getEras() - Method in class java.text.DateFormatSymbols
Gets era strings.
getErrorCode() - Method in class java.sql.SQLException
Retrieves the vendor-specific exception code for this SQLException object.
getErrorIndex() - Method in class java.text.ParsePosition
Retrieve the index at which an error occurred, or -1 if the error index has not been set.
getErrorOffset() - Method in class java.text.ParseException
Returns the position where the error was found.
getErrorsAny() - Method in class java.awt.MediaTracker
Returns a list of all media that have encountered an error.
getErrorsID(int) - Method in class java.awt.MediaTracker
Returns a list of media with the specified ID that have encountered an error.
getErrorStream() - Method in class java.lang.Process
Gets the error stream of the subprocess.
getErrorStream() - Method in class java.net.HttpURLConnection
Returns the error stream if the connection failed but the server sent useful data nonetheless.
getEtchedBorderUIResource() - Static method in class javax.swing.plaf.BorderUIResource

getEtchedInsets() - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
Returns the amount of space taken up by a border drawn by drawEtchedRect()
getEtchType() - Method in class javax.swing.border.EtchedBorder
Returns which etch-type is set on the etched border.
getEventContext() - Method in class javax.naming.event.NamingEvent
Retrieves the event source that fired this event.
getEventContext() - Method in class javax.naming.event.NamingExceptionEvent
Retrieves the EventContext that fired this event.
getEventSetDescriptors() - Method in interface java.beans.BeanInfo
Gets the beans EventSetDescriptors.
getEventSetDescriptors() - Method in class java.beans.SimpleBeanInfo
Deny knowledge of event sets.
getEventType() - Method in class javax.swing.event.HyperlinkEvent
Gets the type of event.
getException() - Method in class java.awt.event.InvocationEvent
Returns any Exception caught while executing the Runnable's run() method.
getException() - Method in class java.lang.ExceptionInInitializerError
Returns the exception that occurred during a static initialization that caused this Error to be created.
getException() - Method in class java.lang.ClassNotFoundException
Returns the exception that was raised if an error occurred while attempting to load the class.
getException() - Method in class java.security.PrivilegedActionException
Returns the exception thrown by the privileged computation that resulted in this PrivilegedActionException.
getException() - Method in class javax.naming.event.NamingExceptionEvent
Retrieves the exception that was thrown.
getException() - Method in interface javax.naming.ldap.UnsolicitedNotification
Retrieves the exception as constructed using information sent by the server.
getExceptionTypes() - Method in class java.lang.reflect.Method
Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this Method object.
getExceptionTypes() - Method in class java.lang.reflect.Constructor
Returns an array of Class objects that represent the types of of exceptions declared to be thrown by the underlying constructor represented by this Constructor object.
getExpandedDescendants(TreePath) - Method in class javax.swing.JTree
Returns an Enumeration of the descendants of the path parent that are currently expanded.
getExpandedIcon() - Method in class javax.swing.plaf.basic.BasicTreeUI

getExpandedState(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Returns true if the path is expanded, and visible.
getExpandedState(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns true if the path is expanded, and visible.
getExpandedState(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns true if the path is expanded, and visible.
getExpandsSelectedPaths() - Method in class javax.swing.JTree
Returns the expandsSelectedPaths property.
getExpiration() - Method in class java.net.URLConnection
Returns the value of the expires header field.
getExplanation() - Method in class javax.naming.NamingException
Retrieves the explanation associated with this exception.
getExportedKeys(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).
getExtension() - Method in class javax.sound.sampled.AudioFileFormat.Type
Obtains the common file name extension for this file type.
getExtensionValue(String) - Method in interface java.security.cert.X509Extension
Gets the DER-encoded OCTET string for the extension value (extnValue) identified by the passed-in oid String.
getExtent() - Method in class javax.swing.DefaultBoundedRangeModel
Return the model's extent.
getExtent() - Method in interface javax.swing.BoundedRangeModel
Returns the model's extent, the length of the inner range that begins at the model's value.
getExtent() - Method in class javax.swing.JSlider
Returns the "extent" -- the range of values "covered" by the knob.
getExtentSize() - Method in class javax.swing.JViewport
Returns the size of the visible part of the view in view coordinates.
getExtra() - Method in class java.util.zip.ZipEntry
Returns the extra field data for the entry, or null if none.
getExtraNameCharacters() - Method in interface java.sql.DatabaseMetaData
Gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
getFactoryClassLocation() - Method in class javax.naming.Reference
Retrieves the location of the factory of the object to which this reference refers.
getFactoryClassName() - Method in class javax.naming.Reference
Retrieves the class name of the factory of the object to which this reference refers.
getFailureHandler() - Static method in class java.rmi.server.RMISocketFactory
Returns the handler for socket creation failure set by the setFailureHandler method.
getFamily() - Method in class java.awt.Font
Returns the family name of this Font.
getFamily(Locale) - Method in class java.awt.Font
Returns the family name of this Font, localized for the specified locale.
getFD() - Method in class java.io.FileOutputStream
Returns the file descriptor associated with this stream.
getFD() - Method in class java.io.RandomAccessFile
Returns the opaque file descriptor object associated with this stream.
getFD() - Method in class java.io.FileInputStream
Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.
getFetchDirection() - Method in interface java.sql.Statement
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
getFetchDirection() - Method in interface java.sql.ResultSet
Returns the fetch direction for this ResultSet object.
getFetchSize() - Method in interface java.sql.Statement
Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object.
getFetchSize() - Method in interface java.sql.ResultSet
Returns the fetch size for this ResultSet object.
getField() - Method in class java.text.FieldPosition
Retrieves the field identifier.
getField(String) - Method in class java.io.ObjectStreamClass
Get the field of this class by name.
getField(String) - Method in class java.lang.Class
Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
getFields() - Method in class java.io.ObjectStreamClass
Return an array of the fields of this serializable class.
getFields() - Method in class java.lang.Class
Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.
getFile() - Method in class java.awt.FileDialog
Gets the selected file of this file dialog.
getFile() - Method in class java.net.URL
Returns the file name of this URL.
getFileChooser() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getFileChooserDetailViewIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getFileChooserHomeFolderIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getFileChooserListViewIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getFileChooserNewFolderIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getFileChooserUpFolderIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getFileDescriptor() - Method in class java.net.SocketImpl
Returns the value of this socket's fd field.
getFileDescriptor() - Method in class java.net.DatagramSocketImpl
Gets the datagram socket file descriptor.
getFileFilter() - Method in class javax.swing.JFileChooser
Returns the currently selected file filter.
getFileName() - Method in class java.awt.JobAttributes
Specifies the file name for the output file for jobs using these attributes.
getFileName() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getFileName() - Method in class javax.swing.plaf.metal.MetalFileChooserUI

getFilenameFilter() - Method in class java.awt.FileDialog
Determines this file dialog's filename filter.
getFileNameMap() - Static method in class java.net.URLConnection
Loads filename map (a mimetable) from a data file.
getFilePointer() - Method in class java.io.RandomAccessFile
Returns the current offset in this file.
getFiles() - Method in class javax.swing.plaf.basic.BasicDirectoryModel

getFiles(File, boolean) - Method in class javax.swing.filechooser.FileSystemView
gets the list of shown (i.e.
getFileSelectionMode() - Method in class javax.swing.JFileChooser
Returns the current file-selection mode.
getFileSystemView() - Method in class javax.swing.JFileChooser
Returns the file system view.
getFileSystemView() - Static method in class javax.swing.filechooser.FileSystemView

getFileView() - Method in class javax.swing.JFileChooser
Returns the current file view.
getFileView(JFileChooser) - Method in class javax.swing.plaf.FileChooserUI

getFileView(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getFileView(JFileChooser) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getFileView on each UI handled by this MultiUI.
getFilterInstance(ImageConsumer) - Method in class java.awt.image.ImageFilter
Returns a unique instance of an ImageFilter object which will actually perform the filtering for the specified ImageConsumer.
getFirst() - Method in class java.util.LinkedList
Returns the first element in this list.
getFirstChild() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns this node's first child.
getFirstColumn() - Method in interface javax.accessibility.AccessibleTableModelChange
Returns the first column that changed.
getFirstColumn() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

getFirstComponent(Container) - Method in class javax.swing.DefaultFocusManager
Return the first component that should receive the focus
getFirstDayOfWeek() - Method in class java.util.Calendar
Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
getFirstIndex() - Method in class javax.swing.event.ListSelectionEvent
Returns the index of the first row whose selection may have changed.
getFirstLeaf() - Method in class javax.swing.tree.DefaultMutableTreeNode
Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf.
getFirstLineIndent(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the first line indent setting.
getFirstRow() - Method in interface javax.accessibility.AccessibleTableModelChange
Returns the first row that changed.
getFirstRow() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

getFirstRow() - Method in class javax.swing.event.TableModelEvent
Returns the first row that changed.
getFirstVisibleIndex() - Method in class javax.swing.JList
Returns the index of the cell in the upper left corner of the JList or -1 if nothing is visible or the list is empty.
getFixedCellHeight() - Method in class javax.swing.JList
Returns the fixed cell height value -- the value specified by setting the fixedCellHeight property, rather than that calculated from the list elements.
getFixedCellWidth() - Method in class javax.swing.JList
Returns the fixed cell width value -- the value specified by setting the fixedCellWidth property, rather than that calculated from the list elements.
getFlatness() - Method in class java.awt.geom.QuadCurve2D
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
getFlatness() - Method in class java.awt.geom.CubicCurve2D
Returns the flatness of this curve.
getFlatness() - Method in class java.awt.geom.FlatteningPathIterator
Returns the flatness of this iterator.
getFlatness(double[], int) - Static method in class java.awt.geom.QuadCurve2D
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
getFlatness(double[], int) - Static method in class java.awt.geom.CubicCurve2D
Returns the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index.
getFlatness(double, double, double, double, double, double) - Static method in class java.awt.geom.QuadCurve2D
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
getFlatness(double, double, double, double, double, double, double, double) - Static method in class java.awt.geom.CubicCurve2D
Returns the flatness of the cubic curve specified by the indicated controlpoints.
getFlatnessSq() - Method in class java.awt.geom.QuadCurve2D
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
getFlatnessSq() - Method in class java.awt.geom.CubicCurve2D
Returns the square of the flatness of this curve.
getFlatnessSq(double[], int) - Static method in class java.awt.geom.QuadCurve2D
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
getFlatnessSq(double[], int) - Static method in class java.awt.geom.CubicCurve2D
Returns the square of the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index.
getFlatnessSq(double, double, double, double, double, double) - Static method in class java.awt.geom.QuadCurve2D
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
getFlatnessSq(double, double, double, double, double, double, double, double) - Static method in class java.awt.geom.CubicCurve2D
Returns the square of the flatness of the cubic curve specified by the indicated controlpoints.
getFlavorMap() - Method in class java.awt.dnd.DragSource
This method returns the FlavorMap for this DragSource.
getFlavorMap() - Method in class java.awt.dnd.DropTarget
This method returns the FlavorMap associated with this DropTarget
getFlavorsForNatives(String[]) - Method in class java.awt.datatransfer.SystemFlavorMap
map natives to corresponding flavors
getFlavorsForNatives(String[]) - Method in interface java.awt.datatransfer.FlavorMap
map natives to corresponding flavors
getFloat(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC FLOAT parameter as a float in the Java programming language.
getFloat(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
getFloat(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a float on the specified object.
getFloat(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a float.
getFloat(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
getFloatingColor() - Method in class javax.swing.plaf.basic.BasicToolBarUI
Gets the color displayed when over a floating area
getFloatParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a float.
getFlowAxis() - Method in class javax.swing.text.FlowView
Fetch the axis along which views should be flowed.
getFlowSpan(int) - Method in class javax.swing.text.FlowView
Fetch the constraining span to flow against for the given child index.
getFlowSpan(int) - Method in class javax.swing.text.ParagraphView
Fetch the constraining span to flow against for the given child index.
getFlowStart(int) - Method in class javax.swing.text.FlowView
Fetch the location along the flow axis that the flow span will start at.
getFlowStart(int) - Method in class javax.swing.text.ParagraphView
Fetch the location along the flow axis that the flow span will start at.
getFocusAccelerator() - Method in class javax.swing.text.JTextComponent
Returns the key accelerator that will cause the receiving text component to get the focus.
getFocusColor() - Method in class javax.swing.plaf.basic.BasicSliderUI

getFocusColor() - Method in class javax.swing.plaf.metal.MetalToggleButtonUI

getFocusColor() - Method in class javax.swing.plaf.metal.MetalRadioButtonUI

getFocusColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getFocusColor() - Method in class javax.swing.plaf.metal.MetalButtonUI

getFocusColor() - Method in class javax.swing.plaf.metal.MetalTheme

getFocusedComponent() - Method in class javax.swing.text.TextAction
Fetches the text component that currently has focus.
getFocusOwner() - Method in class java.awt.Window
Returns the child component of this Window which has focus if and only if this Window is active.
getFocusOwner() - Method in class javax.swing.JInternalFrame
If this JInternalFrame is active, return the child which has focus.
getFollowRedirects() - Static method in class java.net.HttpURLConnection
Returns a boolean indicating whether or not HTTP redirects (3xx) should be automatically followed.
getFont() - Method in class java.awt.Component
Gets the font of this component.
getFont() - Method in class java.awt.Component.AccessibleAWTComponent
Get the Font of this object.
getFont() - Method in class java.awt.MenuComponent
Gets the font used for this menu component.
getFont() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the Font of this object.
getFont() - Method in interface java.awt.MenuContainer

getFont() - Method in class java.awt.FontMetrics
Gets the Font described by this FontMetrics object.
getFont() - Method in class java.awt.Graphics
Gets the current font.
getFont() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the Font of this object.
getFont() - Method in class java.awt.font.GlyphVector
Returns the Font associated with this GlyphVector.
getFont() - Method in interface javax.accessibility.AccessibleComponent
Gets the Font of this object.
getFont() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getFont() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getFont() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the Font of this object.
getFont() - Method in class javax.swing.DebugGraphics
Returns the Font used for text drawing operations.
getFont() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getFont() - Method in class javax.swing.text.GlyphView
Fetch the font that the glyphs should be based upon.
getFont() - Method in class javax.swing.text.LabelView
Fetch the font that the glyphs should be based upon.
getFont() - Method in class javax.swing.tree.DefaultTreeCellEditor
Gets the font used for editing.
getFont() - Method in class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

getFont(AttributeSet) - Method in class javax.swing.text.StyleContext
Gets the font from an attribute set.
getFont(AttributeSet) - Method in interface javax.swing.text.StyledDocument
Takes a set of attributes and turn it into a font specification.
getFont(AttributeSet) - Method in class javax.swing.text.DefaultStyledDocument
Gets the font from an attribute set.
getFont(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Fetches the font to use for the given set of attributes.
getFont(Component) - Method in class javax.swing.border.TitledBorder

getFont(Map) - Static method in class java.awt.Font
Returns a Font appropriate to this attribute set.
getFont(Object) - Method in class javax.swing.UIDefaults
If the value of key is a Font return it, otherwise return null.
getFont(Object) - Static method in class javax.swing.UIManager
Returns a drawing font from the defaults table.
getFont(String) - Static method in class java.awt.Font
Returns a Font object from the system properties list.
getFont(String, Font) - Static method in class java.awt.Font
Gets the specified Font from the system properties list.
getFont(String, int, int) - Method in class javax.swing.text.StyleContext
Gets a new font.
getFontFamily(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the font family setting from the attribute list.
getFontList() - Method in class java.awt.Toolkit
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames()
getFontMetrics() - Method in class java.awt.Graphics
Gets the font metrics of the current font.
getFontMetrics() - Method in class javax.swing.DebugGraphics
Overrides Graphics.getFontMetrics.
getFontMetrics() - Method in class javax.swing.text.LabelView
Deprecated. FontMetrics are not used for glyph rendering when running in the Java2 SDK.
getFontMetrics() - Method in class javax.swing.text.FieldView
Fetches the font metrics associated with the component hosting this view.
getFontMetrics() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getFontMetrics(Font) - Method in class java.awt.Component
Gets the font metrics for the specified font.
getFontMetrics(Font) - Method in class java.awt.Component.AccessibleAWTComponent
Get the FontMetrics of this object.
getFontMetrics(Font) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the FontMetrics of this object.
getFontMetrics(Font) - Method in class java.awt.Graphics
Gets the font metrics for the specified font.
getFontMetrics(Font) - Method in class java.awt.Toolkit
Deprecated. This returns integer metrics for the default screen.
getFontMetrics(Font) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the FontMetrics of this object.
getFontMetrics(Font) - Method in interface javax.accessibility.AccessibleComponent
Gets the FontMetrics of this object.
getFontMetrics(Font) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getFontMetrics(Font) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getFontMetrics(Font) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the FontMetrics of this object.
getFontMetrics(Font) - Method in class javax.swing.DebugGraphics
Overrides Graphics.getFontMetrics.
getFontMetrics(Font) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getFontMetrics(Font) - Method in class javax.swing.text.StyleContext
Returns font metrics for a font.
getFontName() - Method in class java.awt.Font
Returns the font face name of this Font.
getFontName(Locale) - Method in class java.awt.Font
Returns the font face name of the Font, localized for the specified locale.
getFontPeer(String, int) - Method in class java.awt.Toolkit
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts
getFontRenderContext() - Method in class java.awt.Graphics2D
Get the rendering context of the Font within this Graphics2D context.
getFontRenderContext() - Method in class java.awt.font.GlyphVector
Returns the FontRenderContext associated with this GlyphVector.
getFontSize(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the font size setting from the attribute list.
getFontTable(int) - Method in interface java.awt.font.OpenType
Returns the table as an array of bytes for a specified tag.
getFontTable(int, int, int) - Method in interface java.awt.font.OpenType
Returns a subset of the table as an array of bytes for a specified tag.
getFontTable(String) - Method in interface java.awt.font.OpenType
Returns the table as an array of bytes for a specified tag.
getFontTable(String, int, int) - Method in interface java.awt.font.OpenType
Returns a subset of the table as an array of bytes for a specified tag.
getFontTableSize(int) - Method in interface java.awt.font.OpenType
Returns the size of the table for a specified tag.
getFontTableSize(String) - Method in interface java.awt.font.OpenType
Returns the size of the table for a specified tag.
getForeground() - Method in class java.awt.Component
Gets the foreground color of this component.
getForeground() - Method in class java.awt.Component.AccessibleAWTComponent
Get the foreground color of this object.
getForeground() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Get the foreground color of this object.
getForeground() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Get the foreground color of this object.
getForeground() - Method in interface javax.accessibility.AccessibleComponent
Gets the foreground color of this object.
getForeground() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getForeground() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Get the foreground color of this object.
getForeground() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the foreground color of this object.
getForeground() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getForeground() - Method in class javax.swing.text.GlyphView
Fetch the foreground color to use to render the glyphs.
getForeground() - Method in class javax.swing.text.LabelView
Fetch the foreground color to use to render the glyphs.
getForeground(AttributeSet) - Method in class javax.swing.text.StyleContext
Takes a set of attributes and turn it into a foreground color specification.
getForeground(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the foreground color setting from the attribute list.
getForeground(AttributeSet) - Method in interface javax.swing.text.StyledDocument
Takes a set of attributes and turn it into a foreground color specification.
getForeground(AttributeSet) - Method in class javax.swing.text.DefaultStyledDocument
Gets the foreground color from an attribute set.
getForeground(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Takes a set of attributes and turn it into a foreground color specification.
getForegroundAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab foreground color at index.
getFormat() - Method in interface java.security.Key
Returns the name of the primary encoding format of this key, or null if this key does not support encoding.
getFormat() - Method in interface java.security.Certificate
Deprecated. Returns the name of the coding format.
getFormat() - Method in class java.security.spec.EncodedKeySpec
Returns the name of the encoding format associated with this key specification.
getFormat() - Method in class java.security.spec.PKCS8EncodedKeySpec
Returns the name of the encoding format associated with this key specification.
getFormat() - Method in class java.security.spec.X509EncodedKeySpec
Returns the name of the encoding format associated with this key specification.
getFormat() - Method in class javax.sound.sampled.AudioInputStream
Obtains the audio format of the sound data in this audio input stream.
getFormat() - Method in interface javax.sound.sampled.DataLine
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
getFormat() - Method in class javax.sound.sampled.AudioFileFormat
Obtains the format of the audio data contained in the audio file.
getFormats() - Method in class java.text.ChoiceFormat
Get the formats passed in the constructor.
getFormats() - Method in class java.text.MessageFormat
Gets formats that were set with setFormats.
getFormats() - Method in class javax.sound.sampled.DataLine.Info
Obtains a set of audio formats supported by the data line.
getFrame() - Method in class java.awt.geom.RectangularShape
Returns the framing Rectangle2D that defines the overall shape of this object.
getFrameForComponent(Component) - Static method in class javax.swing.JOptionPane
Returns the specified component's Frame.
getFrameIcon() - Method in class javax.swing.JInternalFrame
Returns the image displayed in the title bar of the frame (usually in the top-left corner).
getFrameLength() - Method in class javax.sound.sampled.AudioInputStream
Obtains the length of the stream, expressed in sample frames rather than bytes.
getFrameLength() - Method in class javax.sound.sampled.AudioFileFormat
Obtains the length of the audio data contained in the file, expressed in sample frames.
getFrameLength() - Method in interface javax.sound.sampled.Clip
Obtains the media length in sample frames.
getFramePosition() - Method in interface javax.sound.sampled.DataLine
Obtains the current position in the audio data, in sample frames.
getFramePosition() - Method in class javax.sound.sampled.LineEvent
Obtains the position in the line's audio data when the event occurred, expressed in sample frames.
getFrameRate() - Method in class javax.sound.sampled.AudioFormat
Obtains the frame rate in frames per second.
getFrames() - Static method in class java.awt.Frame
Returns an array containing all Frames created by the application.
getFrameSize() - Method in class javax.sound.sampled.AudioFormat
Obtains the frame size in bytes.
getFromIndex() - Method in class javax.swing.event.TableColumnModelEvent
Returns the fromIndex.
getFromPage() - Method in class java.awt.JobAttributes
Returns, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed.
getG() - Method in interface java.security.interfaces.DSAParams
Returns the base, g.
getG() - Method in class java.security.spec.DSAPrivateKeySpec
Returns the base g.
getG() - Method in class java.security.spec.DSAPublicKeySpec
Returns the base g.
getG() - Method in class java.security.spec.DSAParameterSpec
Returns the base g.
getGamma() - Method in class java.awt.color.ICC_ProfileGray
Returns a gamma value representing the tone reproduction curve (TRC).
getGamma(int) - Method in class java.awt.color.ICC_ProfileRGB
Returns a gamma value representing the tone reproduction curve (TRC) for a particular component.
getGestureModifiers() - Method in class java.awt.dnd.DragSourceDragEvent
This method returns an int representing the current state of the input device modifiers associated with the user's gesture.
getGlassPane() - Method in class javax.swing.JWindow
Returns the glassPane Component for this window.
getGlassPane() - Method in class javax.swing.JApplet
Returns the glassPane object for this applet.
getGlassPane() - Method in class javax.swing.JInternalFrame
Returns the glassPane object for this frame.
getGlassPane() - Method in class javax.swing.JFrame
Returns the glassPane object for this frame.
getGlassPane() - Method in interface javax.swing.RootPaneContainer
Returns the glassPane.
getGlassPane() - Method in class javax.swing.JRootPane
Returns the current glass pane for this JRootPane.
getGlassPane() - Method in class javax.swing.JDialog
Returns the glassPane object for this dialog.
getGlyphCode(int) - Method in class java.awt.font.GlyphVector
Returns the glyphcode of the specified glyph.
getGlyphCodes(int, int, int[]) - Method in class java.awt.font.GlyphVector
Returns an array of glyphcodes for the specified glyphs.
getGlyphJustificationInfo(int) - Method in class java.awt.font.GlyphVector
Returns the justification information for the glyph at the specified index into this GlyphVector.
getGlyphLogicalBounds(int) - Method in class java.awt.font.GlyphVector
Returns the logical bounds of the specified glyph within this GlyphVector.
getGlyphMetrics(int) - Method in class java.awt.font.GlyphVector
Returns the metrics of the glyph at the specified index into this GlyphVector.
getGlyphOutline(int) - Method in class java.awt.font.GlyphVector
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
getGlyphPainter() - Method in class javax.swing.text.GlyphView
Fetch the currently installed glyph painter.
getGlyphPosition(int) - Method in class java.awt.font.GlyphVector
Returns the position of the specified glyph within this GlyphVector.
getGlyphPositions(int, int, float[]) - Method in class java.awt.font.GlyphVector
Returns an array of glyph positions for the specified glyphs.
getGlyphTransform(int) - Method in class java.awt.font.GlyphVector
Gets the transform of the specified glyph within this GlyphVector.
getGlyphVisualBounds(int) - Method in class java.awt.font.GlyphVector
Returns the visual bounds of the specified glyph within the GlyphVector.
getGoHomeAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getGraphics() - Method in class java.awt.Component
Creates a graphics context for this component.
getGraphics() - Method in class java.awt.PrintJob
Gets a Graphics object that will draw to the next page.
getGraphics() - Method in class java.awt.Image
Creates a graphics context for drawing to an off-screen image.
getGraphics() - Method in class java.awt.image.BufferedImage
This method returns a Graphics2D, but is here for backwards compatibility.
getGraphics() - Method in class javax.swing.JComponent
Returns this component's graphics context, which lets you draw on a component.
getGraphics() - Method in class javax.swing.text.View
Fetch a Graphics for rendering.
getGraphicsConfiguration() - Method in class java.awt.Component
Get the GraphicsConfiguration associated with this Component.
getGraphicsConfiguration() - Method in class java.awt.Window
This method returns the GraphicsConfiguration used by this Window.
getGreatestMinimum(int) - Method in class java.util.Calendar
Gets the highest minimum value for the given field if varies.
getGreatestMinimum(int) - Method in class java.util.GregorianCalendar
Returns highest minimum value for the given field if varies.
getGreen() - Method in class java.awt.Color
Returns the green component in the range 0-255 in the default sRGB space.
getGreen(int) - Method in class java.awt.image.ColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(int) - Method in class java.awt.image.ComponentColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(int) - Method in class java.awt.image.DirectColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(int) - Method in class java.awt.image.IndexColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(Object) - Method in class java.awt.image.ColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(Object) - Method in class java.awt.image.ComponentColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreen(Object) - Method in class java.awt.image.DirectColorModel
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getGreenMask() - Method in class java.awt.image.DirectColorModel
Returns the mask indicating which bits in an int pixel representation contain the green color component.
getGreens(byte[]) - Method in class java.awt.image.IndexColorModel
Copies the array of green color components into the specified array.
getGregorianChange() - Method in class java.util.GregorianCalendar
Gets the Gregorian Calendar change date.
getGridColor() - Method in class javax.swing.JTable
Returns the color used to draw grid lines.
getGridColumn() - Method in class javax.swing.text.TableView.TableCell
Deprecated. Gets the column of the grid location
getGridRow() - Method in class javax.swing.text.TableView.TableCell
Deprecated. Gets the row of the grid location
getGrooveInsets() - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils
Returns the amount of space taken up by a border drawn by drawGroove()
getGroup() - Method in class javax.swing.DefaultButtonModel
Returns the group that this button belongs to.
getGroupID() - Method in class java.rmi.activation.ActivationDesc
Returns the group identifier for the object specified by this descriptor.
getGroupingSeparator() - Method in class java.text.DecimalFormatSymbols
Gets the character used for thousands separator.
getGroupingSize() - Method in class java.text.DecimalFormat
Return the grouping size.
getGuarantor() - Method in interface java.security.Certificate
Deprecated. Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate.
getHAdjustable() - Method in class java.awt.ScrollPane
Returns the Adjustable object which represents the state of the horizontal scrollbar.
getHashColor() - Method in class javax.swing.plaf.basic.BasicTreeUI

getHeaderField(int) - Method in class java.net.URLConnection
Returns the value for the nth header field.
getHeaderField(String) - Method in class java.net.URLConnection
Returns the name of the specified header field.
getHeaderFieldDate(String, long) - Method in class java.net.URLConnection
Returns the value of the named field parsed as date.
getHeaderFieldDate(String, long) - Method in class java.net.HttpURLConnection

getHeaderFieldInt(String, int) - Method in class java.net.URLConnection
Returns the value of the named field parsed as a number.
getHeaderFieldKey(int) - Method in class java.net.URLConnection
Returns the key for the nth header field.
getHeaderRect(int) - Method in class javax.swing.table.JTableHeader
Returns the rectangle containing the header tile at column.
getHeaderRenderer() - Method in class javax.swing.table.TableColumn
Returns the TableCellRenderer used to draw the header of the TableColumn.
getHeaderValue() - Method in class javax.swing.table.TableColumn
Returns the Object used as the value for the header renderer.
getHeight() - Method in class java.awt.Component
Return the current height of this component.
getHeight() - Method in class java.awt.FontMetrics
Gets the standard height of a line of text in this font.
getHeight() - Method in class java.awt.Dimension
Returns the height of this dimension in double precision.
getHeight() - Method in class java.awt.Rectangle
Returns the height of the bounding Rectangle in double precision.
getHeight() - Method in class java.awt.font.LineMetrics
Returns the height of the text.
getHeight() - Method in class java.awt.geom.Dimension2D
Returns the height of this Dimension in double precision.
getHeight() - Method in class java.awt.geom.RectangularShape
Returns the height of the framing rectangle in double precision.
getHeight() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the height of this RoundRectangle2D in double precision.
getHeight() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the height of this RoundRectangle2D in double precision.
getHeight() - Method in class java.awt.geom.Rectangle2D.Float
Returns the height of this Rectangle2D in double precision.
getHeight() - Method in class java.awt.geom.Rectangle2D.Double
Returns the height of this Rectangle2D in double precision.
getHeight() - Method in class java.awt.geom.Arc2D.Float
Returns the height of the ellipse of which this arc is a partial section
getHeight() - Method in class java.awt.geom.Arc2D.Double
Returns the height of the ellipse of which this arc is a partial section
getHeight() - Method in class java.awt.geom.Ellipse2D.Float
Returns the overall height of this Ellipse2D in double precision.
getHeight() - Method in class java.awt.geom.Ellipse2D.Double
Returns the overall height of this Ellipse2D in double precision.
getHeight() - Method in class java.awt.image.SampleModel
Returns the height in pixels.
getHeight() - Method in class java.awt.image.Kernel
Returns the height of this Kernel.
getHeight() - Method in class java.awt.image.PixelGrabber
Get the height of the pixel buffer (after adjusting for image height).
getHeight() - Method in interface java.awt.image.RenderedImage
Returns the height of the RenderedImage.
getHeight() - Method in class java.awt.image.BufferedImage
Returns the height of the BufferedImage.
getHeight() - Method in class java.awt.image.Raster
Returns the height in pixels of the Raster.
getHeight() - Method in class java.awt.image.renderable.RenderableImageOp
Gets the height in user coordinate space.
getHeight() - Method in interface java.awt.image.renderable.RenderableImage
Gets the height in user coordinate space.
getHeight() - Method in class java.awt.print.Paper
Returns the height of the page in 1/72nds of an inch.
getHeight() - Method in class java.awt.print.PageFormat
Returns the height, in 1/72nds of an inch, of the page.
getHeight() - Method in class javax.swing.JComponent
Returns the current height of this component.
getHeight() - Method in class javax.swing.text.BoxView
The current height of the box.
getHeight(GlyphView) - Method in class javax.swing.text.GlyphView.GlyphPainter

getHeight(ImageObserver) - Method in class java.awt.Image
Determines the height of the image.
getHeight(ImageObserver) - Method in class java.awt.image.BufferedImage
Returns the actual height of the image.
getHeightOfHighValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getHeightOfLowValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getHeightOfTallestLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getHelpMenu() - Method in class java.awt.MenuBar
Gets the help menu on the menu bar.
getHelpMenu() - Method in class javax.swing.JMenuBar
Gets the help menu for the menu bar.
getHgap() - Method in class java.awt.CardLayout
Gets the horizontal gap between components.
getHgap() - Method in class java.awt.GridLayout
Gets the horizontal gap between components.
getHgap() - Method in class java.awt.BorderLayout
Returns the horizontal gap between components.
getHgap() - Method in class java.awt.FlowLayout
Gets the horizontal gap between components.
getHighestValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI
Returns the label that corresponds to the lowest slider value in the label table.
getHighlightColor() - Method in class javax.swing.border.EtchedBorder
Returns the highlight color of the etched border.
getHighlightColor() - Method in class javax.swing.plaf.basic.BasicSliderUI

getHighlightColor(Component) - Method in class javax.swing.border.EtchedBorder
Returns the highlight color of the etched border when rendered on the specified component.
getHighlightedTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getHighlightedTextColor() - Method in class javax.swing.plaf.metal.MetalTheme

getHighlighter() - Method in class javax.swing.text.JTextComponent
Fetches the object responsible for making highlights.
getHighlightInnerColor() - Method in class javax.swing.border.BevelBorder
Returns the inner highlight color of the bevel border.
getHighlightInnerColor(Component) - Method in class javax.swing.border.BevelBorder
Returns the inner highlight color of the bevel border when rendered on the specified component.
getHighlightOuterColor() - Method in class javax.swing.border.BevelBorder
Returns the outer highlight color of the bevel border.
getHighlightOuterColor(Component) - Method in class javax.swing.border.BevelBorder
Returns the outer highlight color of the bevel border when rendered on the specified component.
getHighlights() - Method in interface javax.swing.text.Highlighter
Fetches the current list of highlights.
getHighlights() - Method in class javax.swing.text.DefaultHighlighter
Makes a copy of the highlights.
getHomeDirectory() - Method in class javax.swing.filechooser.FileSystemView

getHorizontalAlignment() - Method in class javax.swing.AbstractButton
Returns the horizontal alignment of the icon and text.
getHorizontalAlignment() - Method in class javax.swing.JTextField
Returns the horizontal alignment of the text.
getHorizontalAlignment() - Method in class javax.swing.JLabel
Returns the alignment of the label's contents along the X axis.
getHorizontalLegBuffer() - Method in class javax.swing.plaf.basic.BasicTreeUI
The horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default.
getHorizontalLegBuffer() - Method in class javax.swing.plaf.metal.MetalTreeUI

getHorizontalScrollBar() - Method in class javax.swing.ScrollPaneLayout
Returns the JScrollBar object that handles horizontal scrolling.
getHorizontalScrollBar() - Method in class javax.swing.JScrollPane
Returns the horizontal scroll bar that controls the viewport's horizontal view position.
getHorizontalScrollBarPolicy() - Method in class javax.swing.ScrollPaneLayout
Returns the horizontal scrollbar-display policy.
getHorizontalScrollBarPolicy() - Method in class javax.swing.JScrollPane
Returns the horizontal scroll bar policy value.
getHorizontalSliderThumbIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getHorizontalTextPosition() - Method in class javax.swing.AbstractButton
Returns the horizontal position of the text relative to the icon.
getHorizontalTextPosition() - Method in class javax.swing.JLabel
Returns the horizontal position of the label's text, relative to its image.
getHorizontalVisibility() - Method in class javax.swing.JTextField
Gets the visibility of the text field.
getHost() - Method in class java.net.URL
Returns the host name of this URL, if applicable.
getHostAddress() - Method in class java.net.InetAddress
Returns the IP address string "%d.%d.%d.%d".
getHostAddress(URL) - Method in class java.net.URLStreamHandler
Get the IP address of our host.
getHostName() - Method in class java.net.InetAddress
Gets the host name for this IP address.
getHours() - Method in class java.sql.Date
Deprecated.
getHours() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY).
getHSBColor(float, float, float) - Static method in class java.awt.Color
Creates a Color object based on the specified values for the HSB color model.
getHScrollbarHeight() - Method in class java.awt.ScrollPane
Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
getHTMLDocument(JEditorPane) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLTextAction

getHTMLEditorKit(JEditorPane) - Method in class javax.swing.text.html.HTMLEditorKit.HTMLTextAction

getHTMLTag() - Method in class javax.swing.text.html.parser.TagElement

getHumanPresentableName() - Method in class java.awt.datatransfer.DataFlavor
Returns the human presentable name for the data foramt that this DataFlavor represents.
getICC_Profiles() - Method in class java.awt.image.ColorConvertOp
Returns the array of ICC_Profiles used to construct this ColorConvertOp.
getIcon() - Method in class javax.swing.AbstractButton
Returns the default icon.
getIcon() - Method in class javax.swing.JOptionPane
Returns the icon this pane displays.
getIcon() - Method in class javax.swing.JLabel
Returns the graphic image (glyph, icon) that the label displays.
getIcon() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the icon from the JOptionPane the reciever is providing the look and feel for, or the default icon as returned from getDefaultIcon.
getIcon(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the icon setting from the attribute list.
getIcon(File) - Method in class javax.swing.JFileChooser
Returns the icon for this file or type of file, depending on the system.
getIcon(File) - Method in class javax.swing.filechooser.FileView
The icon that represents this file in the JFileChooser.
getIcon(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

getIcon(int) - Method in interface java.beans.BeanInfo
This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc.
getIcon(int) - Method in class java.beans.SimpleBeanInfo
Claim there are no icons available.
getIcon(Object) - Method in class javax.swing.UIDefaults
If the value of key is an Icon return it, otherwise return null.
getIcon(Object) - Static method in class javax.swing.UIManager
Returns an Icon from the defaults table.
getIconAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab icon at index.
getIconForTab(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getIconForType(int) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the icon to use for the passed in type.
getIconHeight() - Method in interface javax.swing.Icon
Returns the icon's height.
getIconHeight() - Method in class javax.swing.ImageIcon
Gets the height of the icon.
getIconHeight() - Method in class javax.swing.plaf.IconUIResource

getIconHeight() - Method in class javax.swing.plaf.metal.MetalCheckBoxIcon

getIconHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

getIconHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

getIconHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.FileIcon16

getIconHeight() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

getIconHeight() - Method in class javax.swing.plaf.metal.MetalComboBoxIcon
stubbed to statify the interface.
getIconImage() - Method in class java.awt.Frame
Gets the image to be displayed in the minimized icon for this frame.
getIconTextGap() - Method in class javax.swing.JLabel
Returns the amount of space between the text and the icon displayed in this label.
getIconWidth() - Method in interface javax.swing.Icon
Returns the icon's width.
getIconWidth() - Method in class javax.swing.ImageIcon
Gets the width of the icon.
getIconWidth() - Method in class javax.swing.plaf.IconUIResource

getIconWidth() - Method in class javax.swing.plaf.metal.MetalCheckBoxIcon

getIconWidth() - Method in class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

getIconWidth() - Method in class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

getIconWidth() - Method in class javax.swing.plaf.metal.MetalIconFactory.FileIcon16

getIconWidth() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

getIconWidth() - Method in class javax.swing.plaf.metal.MetalComboBoxIcon
stubbed to statify the interface.
getId() - Method in class org.omg.CORBA.portable.ApplicationException
Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.
getID() - Method in class java.awt.AWTEvent
Returns the event type.
getID() - Method in class java.rmi.activation.Activatable
Returns the object's activation identifier.
getID() - Method in class java.util.TimeZone
Gets the ID of this time zone.
getID() - Method in class javax.naming.directory.BasicAttribute

getID() - Method in interface javax.naming.directory.Attribute
Retrieves the id of this attribute.
getID() - Method in interface javax.naming.ldap.Control
Retrieves the object identifier assigned for the LDAP control.
getID() - Method in interface javax.naming.ldap.ExtendedRequest
Retrieves the object identifier of the request.
getID() - Method in interface javax.naming.ldap.ExtendedResponse
Retrieves the object identifier of the response.
getID() - Method in class javax.swing.LookAndFeel
Return a string that identifies this look and feel.
getID() - Method in class javax.swing.plaf.metal.MetalLookAndFeel

getID() - Method in class javax.swing.plaf.multi.MultiLookAndFeel

getIdentifier() - Method in class javax.swing.table.TableColumn
Returns the identifier object for this column.
getIdentifierQuoteString() - Method in interface java.sql.DatabaseMetaData
What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported.
getIdentity(Principal) - Method in class java.security.IdentityScope
Deprecated. Retrieves the identity whose name is the same as that of the specified principal.
getIdentity(PublicKey) - Method in class java.security.IdentityScope
Deprecated. Retrieves the identity with the specified public key.
getIdentity(String) - Method in class java.security.IdentityScope
Deprecated. Returns the identity in this scope with the specified name (if any).
getIDs() - Method in interface javax.naming.directory.Attributes
Retrieves an enumeration of the ids of the attributes in the attribute set.
getIDs() - Method in class javax.naming.directory.BasicAttributes

getIDstring() - Method in class java.awt.GraphicsDevice
Returns the identification string associated with this GraphicsDevice.
getIfModifiedSince() - Method in class java.net.URLConnection
Returns the value of this object's ifModifiedSince field.
getImage() - Method in class java.awt.TexturePaint
Returns the BufferedImage texture used to fill the shapes.
getImage() - Method in class javax.swing.ImageIcon
Returns this icon's Image.
getImage(String) - Method in class java.awt.Toolkit
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
getImage(URL) - Method in interface java.applet.AppletContext
Returns an Image object that can then be painted on the screen.
getImage(URL) - Method in class java.applet.Applet
Returns an Image object that can then be painted on the screen.
getImage(URL) - Method in class java.awt.Toolkit
Returns an image which gets pixel data from the specified URL.
getImage(URL, String) - Method in class java.applet.Applet
Returns an Image object that can then be painted on the screen.
getImageableHeight() - Method in class java.awt.print.Paper
Returns the height of this Paper object's imageable area.
getImageableHeight() - Method in class java.awt.print.PageFormat
Return the height, in 1/72nds of an inch, of the imageable area of the page.
getImageableWidth() - Method in class java.awt.print.Paper
Returns the width of this Paper object's imageable area.
getImageableWidth() - Method in class java.awt.print.PageFormat
Returns the width, in 1/72nds of an inch, of the imageable area of the page.
getImageableX() - Method in class java.awt.print.Paper
Returns the x coordinate of the upper-left corner of this Paper object's imageable area.
getImageableX() - Method in class java.awt.print.PageFormat
Returns the x coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.
getImageableY() - Method in class java.awt.print.Paper
Returns the y coordinate of the upper-left corner of this Paper object's imageable area.
getImageableY() - Method in class java.awt.print.PageFormat
Returns the y coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.
getImageLoadStatus() - Method in class javax.swing.ImageIcon
Returns the status of the image loading operation.
getImageObserver() - Method in class javax.swing.ImageIcon
Returns the image observer for the image.
getImplementationTitle() - Method in class java.lang.Package
Return the title of this package.
getImplementationVendor() - Method in class java.lang.Package
Returns the name of the organization, vendor or company that provided this implementation.
getImplementationVersion() - Method in class java.lang.Package
Return the version of this implementation.
getImportedKeys(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
getInactiveControlTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getInactiveControlTextColor() - Method in class javax.swing.plaf.metal.MetalTheme

getInactiveSystemTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getInactiveSystemTextColor() - Method in class javax.swing.plaf.metal.MetalTheme

getInCheck() - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
getIndentLevel() - Method in class javax.swing.text.AbstractWriter
Returns the current indentation level.
getIndentSpace() - Method in class javax.swing.text.AbstractWriter
Returns the amount of space to indent.
getIndex() - Method in class java.sql.DataTruncation
Retrieves the index of the column or parameter that was truncated.
getIndex() - Method in class java.text.ParsePosition
Retrieve the current parse position.
getIndex() - Method in interface java.text.CharacterIterator
Returns the current index.
getIndex() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.getIndex() for String.
getIndex() - Method in interface javax.swing.event.DocumentEvent.ElementChange
Fetches the index within the element represented.
getIndex() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Returns the index into the list of elements.
getIndex() - Method in class javax.swing.text.Segment
Returns the current index.
getIndex() - Method in class javax.swing.text.html.parser.Element
Get index.
getIndex(int) - Method in class javax.swing.SizeSequence
Returns the index of the entry that corresponds to the specified position.
getIndex(TreeNode) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns the index of node in the receivers children.
getIndex(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the index of the specified child in this node's child array.
getIndex(TreeNode) - Method in interface javax.swing.tree.TreeNode
Returns the index of node in the receivers children.
getIndex0() - Method in class javax.swing.event.ListDataEvent
Returns the lower index of the range.
getIndex1() - Method in class javax.swing.event.ListDataEvent
Returns the upper index of the range.
getIndexAtPoint(Point) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Given a point in local coordinates, return the zero-based index of the character under that Point.
getIndexAtPoint(Point) - Method in interface javax.accessibility.AccessibleText
Given a point in local coordinates, return the zero-based index of the character under that Point.
getIndexAtPoint(Point) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Given a point in local coordinates, return the zero-based index of the character under that Point.
getIndexAtPoint(Point) - Method in class javax.swing.JLabel.AccessibleJLabel
Given a point in local coordinates, return the zero-based index of the character under that Point.
getIndexAtPoint(Point) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Given a point in local coordinates, return the zero-based index of the character under that Point.
getIndexedPropertyType() - Method in class java.beans.IndexedPropertyDescriptor
Gets the Class object of the indexed properties' type.
getIndexedReadMethod() - Method in class java.beans.IndexedPropertyDescriptor
Gets the method that should be used to read an indexed property value.
getIndexedWriteMethod() - Method in class java.beans.IndexedPropertyDescriptor
Gets the method that should be used to write an indexed property value.
getIndexInfo(String, String, String, boolean, boolean) - Method in interface java.sql.DatabaseMetaData
Gets a description of a table's indices and statistics.
getIndexOf(Component) - Method in class javax.swing.JLayeredPane
Returns the index of the specified Component.
getIndexOf(Object) - Method in class javax.swing.DefaultComboBoxModel
Returns the index-position of the specified object in the list.
getIndexOfChild(Object, Object) - Method in interface javax.swing.tree.TreeModel
Returns the index of child in parent.
getIndexOfChild(Object, Object) - Method in class javax.swing.tree.DefaultTreeModel
Returns the index of child in parent.
getIndexOfSize(float) - Static method in class javax.swing.text.html.StyleSheet

getInetAddress() - Method in class java.net.DatagramSocket
Returns the address to which this socket is connected.
getInetAddress() - Method in class java.net.SocketImpl
Returns the value of this socket's address field.
getInetAddress() - Method in class java.net.Socket
Returns the address to which the socket is connected.
getInetAddress() - Method in class java.net.ServerSocket
Returns the local address of this server socket.
getInfinity() - Method in class java.text.DecimalFormatSymbols
Gets the character used to represent infinity.
getInfo() - Method in class java.security.Provider
Returns a human-readable description of the provider and its services.
getInfo() - Method in class java.security.Identity
Deprecated. Returns general information previously specified for this identity.
getInitialContext(Hashtable) - Static method in class javax.naming.spi.NamingManager
Creates an initial context using the specified environment properties.
getInitialContext(Hashtable) - Method in interface javax.naming.spi.InitialContextFactory
Creates an Initial Context for beginning name resolution.
getInitialDelay() - Method in class javax.swing.ToolTipManager
Returns the initial delay value.
getInitialDelay() - Method in class javax.swing.Timer
Returns the Timer's initial delay.
getInitialLocation(Insets) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the left inset, unless the Insets are null in which case 0 is returned.
getInitialSelectionValue() - Method in class javax.swing.JOptionPane
Returns the initial-selection value.
getInitialValue() - Method in class javax.swing.JOptionPane
Returns the initial value.
getInitialValueIndex() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the initial index into the buttons to select.
getInputAttributes() - Method in class javax.swing.JTextPane
Gets the input attributes for the pane.
getInputAttributes() - Method in class javax.swing.text.StyledEditorKit
Gets the input attributes for the pane.
getInputAttributes() - Method in class javax.swing.text.html.HTMLEditorKit
Gets the input attributes used for the styled editing actions.
getInputContext() - Method in class java.awt.Component
Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
getInputContext() - Method in class java.awt.Window
Gets the input context for this window.
getInputMap() - Method in class javax.swing.JComponent
Returns the InputMap that is used when the receiver has focus.
getInputMap(int) - Method in class javax.swing.JComponent
Returns the InputMap that is used during condition.
getInputMethodControlObject() - Method in class java.awt.im.InputContext
Returns a control object from the current input method, or null.
getInputMethodDisplayName(Locale, Locale) - Method in interface java.awt.im.spi.InputMethodDescriptor
Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.
getInputMethodIcon(Locale) - Method in interface java.awt.im.spi.InputMethodDescriptor
Returns an icon for the corresponding input method.
getInputMethodRequests() - Method in class java.awt.Component
Gets the input method request handler which supports requests from input methods for this component.
getInputMethodRequests() - Method in class javax.swing.text.JTextComponent

getInputStream() - Method in class java.lang.Process
Gets the input stream of the subprocess.
getInputStream() - Method in class java.net.URLConnection
Returns an input stream that reads from this open connection.
getInputStream() - Method in class java.net.SocketImpl
Returns an input stream for this socket.
getInputStream() - Method in class java.net.Socket
Returns an input stream for this socket.
getInputStream() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
getInputStream() - Method in class org.omg.CORBA.portable.ApplicationException
Returns the input stream from which the exception data can be read as its parameters.
getInputStream(ZipEntry) - Method in class java.util.jar.JarFile
Returns an input stream for reading the contents of the specified ZIP file entry.
getInputStream(ZipEntry) - Method in class java.util.zip.ZipFile
Returns an input stream for reading the contents of the specified zip file entry.
getInputValue() - Method in class javax.swing.JOptionPane
Returns the value the user has input, if wantsInput is true.
getInputVerifier() - Method in class javax.swing.JComponent
Returns the input verifier for this component.
getInsertionIndex() - Method in class java.awt.font.TextHitInfo
Returns the insertion index.
getInsertPositionOffset() - Method in interface java.awt.im.InputMethodRequests
Gets the offset of the insert position in the committed text contained in the text editing component.
getInset(int, View) - Method in class javax.swing.text.html.StyleSheet.BoxPainter
Fetches the inset needed on a given side to account for the margin, border, and padding.
getInsets() - Method in class java.awt.Container
Determines the insets of this container, which indicate the size of the container's border.
getInsets() - Method in class javax.swing.JComponent
If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.
getInsets() - Method in class javax.swing.JViewport
Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.
getInsets() - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow

getInsets() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Gets the insets from the JComboBox.
getInsets() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
If a border has been set on this component, returns the border's insets, else calls super.getInsets.
getInsets(Insets) - Method in class javax.swing.JComponent
Returns an Insets object containing this component's inset values.
getInsets(Insets) - Method in class javax.swing.JViewport
Returns an Insets object containing this JViewports inset values.
getInsets(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the insets.
getInsets(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI

getInsets(Object) - Method in class javax.swing.UIDefaults
If the value of key is an Insets return it, otherwise return null.
getInsets(Object) - Static method in class javax.swing.UIManager
Returns an Insets object from the defaults table.
getInsideAllocation(Shape) - Method in class javax.swing.text.CompositeView
Translates the immutable allocation given to the view to a mutable allocation that represents the interior allocation (i.e.
getInsideBorder() - Method in class javax.swing.border.CompoundBorder
Returns the inside border object.
getInstalledLookAndFeels() - Static method in class javax.swing.UIManager
Return an array of objects that provide some information about the LookAndFeel implementations that have been installed with this software development kit.
getInstance() - Static method in class java.awt.im.InputContext
Returns a new InputContext instance.
getInstance() - Static method in class java.text.NumberFormat
Returns the default number format for the current default locale.
getInstance() - Static method in class java.text.Collator
Gets the Collator for the current default locale.
getInstance() - Static method in class java.text.DateFormat
Get a default date/time formatter that uses the SHORT style for both the date and the time.
getInstance() - Static method in class java.util.Calendar
Gets a calendar using the default time zone and locale.
getInstance(byte[]) - Static method in class java.awt.color.ICC_Profile
Constructs an ICC_Profile object corresponding to the data in a byte array.
getInstance(InputStream) - Static method in class java.awt.color.ICC_Profile
Constructs an ICC_Profile corresponding to the data in an InputStream.
getInstance(int) - Static method in class java.awt.AlphaComposite
Creates an AlphaComposite object with the specified rule.
getInstance(int) - Static method in class java.awt.color.ICC_Profile
Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB).
getInstance(int) - Static method in class java.awt.color.ColorSpace
Returns a ColorSpace representing one of the specific predefined color spaces.
getInstance(int, float) - Static method in class java.awt.AlphaComposite
Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source.
getInstance(Locale) - Static method in class java.text.NumberFormat
Returns the default number format for the specified locale.
getInstance(Locale) - Static method in class java.text.Collator
Gets the Collator for the desired locale.
getInstance(Locale) - Static method in class java.util.Calendar
Gets a calendar using the default time zone and specified locale.
getInstance(String) - Static method in class java.awt.color.ICC_Profile
Constructs an ICC_Profile corresponding to the data in a file.
getInstance(String) - Static method in class java.security.KeyFactory
Generates a KeyFactory object that implements the specified digest algorithm.
getInstance(String) - Static method in class java.security.KeyPairGenerator
Generates a KeyPairGenerator object that implements the specified digest algorithm.
getInstance(String) - Static method in class java.security.SecureRandom
Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm.
getInstance(String) - Static method in class java.security.AlgorithmParameters
Generates a parameter object for the specified algorithm.
getInstance(String) - Static method in class java.security.AlgorithmParameterGenerator
Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm.
getInstance(String) - Static method in class java.security.KeyStore
Generates a keystore object of the given type.
getInstance(String) - Static method in class java.security.MessageDigest
Generates a MessageDigest object that implements the specified digest algorithm.
getInstance(String) - Static method in class java.security.Signature
Generates a Signature object that implements the specified digest algorithm.
getInstance(String) - Static method in class java.security.cert.CertificateFactory
Generates a certificate factory object that implements the specified certificate type.
getInstance(String, String) - Static method in class java.security.KeyFactory
Generates a KeyFactory object for the specified algorithm from the specified provider.
getInstance(String, String) - Static method in class java.security.KeyPairGenerator
Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
getInstance(String, String) - Static method in class java.security.SecureRandom
Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.
getInstance(String, String) - Static method in class java.security.AlgorithmParameters
Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
getInstance(String, String) - Static method in class java.security.AlgorithmParameterGenerator
Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
getInstance(String, String) - Static method in class java.security.KeyStore
Generates a keystore object for the specified keystore type from the specified provider.
getInstance(String, String) - Static method in class java.security.MessageDigest
Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
getInstance(String, String) - Static method in class java.security.Signature
Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
getInstance(String, String) - Static method in class java.security.cert.CertificateFactory
Generates a certificate factory object for the specified certificate type from the specified provider.
getInstance(TimeZone) - Static method in class java.util.Calendar
Gets a calendar using the specified time zone and default locale.
getInstance(TimeZone, Locale) - Static method in class java.util.Calendar
Gets a calendar with the specified time zone and locale.
getInstanceFollowRedirects() - Method in class java.net.HttpURLConnection
Returns the value of this HttpURLConnection's instanceFollowRedirects field.
getInstanceOf(Object, Class) - Static method in class java.beans.Beans
From a given bean, obtain an object representing a specified type view of that source object.
getInstrument(Patch) - Method in interface javax.sound.midi.Soundbank
Obtains an Instrument from the given Patch.
getInstruments() - Method in interface javax.sound.midi.Soundbank
Obtains a list of instruments contained in this sound bank.
getInt(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
getInt(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
getInt(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as an int on the specified object.
getInt(Object) - Method in class javax.swing.UIDefaults
If the value of key is an Integer return its integer value, otherwise return 0.
getInt(Object) - Static method in class javax.swing.UIManager
Returns an int from the defaults table.
getInt(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as an int.
getInt(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
getInteger(String) - Static method in class java.lang.Integer
Determines the integer value of the system property with the specified name.
getInteger(String, int) - Static method in class java.lang.Integer
Determines the integer value of the system property with the specified name.
getInteger(String, Integer) - Static method in class java.lang.Integer
Returns the integer value of the system property with the specified name.
getIntegerAttributeValue(AttributeSet, HTML.Attribute, int) - Static method in class javax.swing.text.html.HTML
Fetch an integer attribute value.
getIntercellSpacing() - Method in class javax.swing.JTable
Returns the horizontal and vertical space between cells.
getInterface() - Method in class java.net.MulticastSocket
Retrieve the address of the network interface used for multicast packets.
getInterfaces() - Method in class java.lang.Class
Determines the interfaces implemented by the class or interface represented by this object.
getInteriorRectangle(Component, Border, int, int, int, int) - Static method in class javax.swing.border.AbstractBorder
Returns a rectangle using the arguments minus the insets of the border.
getInteriorRectangle(Component, int, int, int, int) - Method in class javax.swing.border.AbstractBorder
This convenience method calls the static method.
getInternalFrame() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Returns the JInternalFrame that this DesktopIcon is associated with.
getInternalFrame() - Method in class javax.swing.event.InternalFrameEvent
Returns the originator of the event.
getInternalFrameAltMaximizeIcon(int) - Static method in class javax.swing.plaf.metal.MetalIconFactory

getInternalFrameBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getInternalFrameCloseIcon(int) - Static method in class javax.swing.plaf.metal.MetalIconFactory

getInternalFrameDefaultMenuIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getInternalFrameMaximizeIcon(int) - Static method in class javax.swing.plaf.metal.MetalIconFactory

getInternalFrameMinimizeIcon(int) - Static method in class javax.swing.plaf.metal.MetalIconFactory

getInternationalCurrencySymbol() - Method in class java.text.DecimalFormatSymbols
Return the international string denoting the local currency.
getInterpolationType() - Method in class java.awt.image.AffineTransformOp
Returns the interpolation type used by this op.
getIntParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as an int.
getInverted() - Method in class javax.swing.JSlider
Returns true if the value-range shown for the slider is reversed,
getInvocationHandler(Object) - Static method in class java.lang.reflect.Proxy
Returns the invocation handler for the specified proxy instance.
getInvoker() - Method in class javax.swing.JPopupMenu
Returns the component which is the 'invoker' of this popup menu.
getInvokesStopCellEditing() - Method in class javax.swing.JTree
Returns the indicator that tells what happens when editing is interrupted.
getIOException() - Method in class java.awt.print.PrinterIOException
Returns the IOException that terminated the print job.
getISO3Country() - Method in class java.util.Locale
Returns a three-letter abbreviation for this locale's country.
getISO3Language() - Method in class java.util.Locale
Returns a three-letter abbreviation for this locale's language.
getISOCountries() - Static method in class java.util.Locale
Returns a list of all 2-letter country codes defined in ISO 3166.
getISOLanguages() - Static method in class java.util.Locale
Returns a list of all 2-letter language codes defined in ISO 639.
getIssuerDN() - Method in class java.security.cert.X509Certificate
Gets the issuer (issuer distinguished name) value from the certificate.
getIssuerDN() - Method in class java.security.cert.X509CRL
Gets the issuer (issuer distinguished name) value from the CRL.
getIssuerUniqueID() - Method in class java.security.cert.X509Certificate
Gets the issuerUniqueID value from the certificate.
getItalicAngle() - Method in class java.awt.Font
Returns the italic angle of this Font.
getItem() - Method in class java.awt.event.ItemEvent
Returns the item affected by the event.
getItem() - Method in interface javax.swing.ComboBoxEditor
Return the edited item
getItem() - Method in class javax.swing.plaf.basic.BasicComboBoxEditor

getItem(int) - Method in class java.awt.Menu
Gets the item located at the specified index of this menu.
getItem(int) - Method in class java.awt.List
Gets the item associated with the specified index.
getItem(int) - Method in class java.awt.Choice
Gets the string at the specified index in this Choice menu.
getItem(int) - Method in class javax.swing.JMenu
Returns the JMenuItem at the specified position.
getItemAt(int) - Method in class javax.swing.JComboBox
Returns the list item at the specified index.
getItemCount() - Method in class java.awt.Menu
Get the number of items in this menu.
getItemCount() - Method in class java.awt.List
Gets the number of items in the list.
getItemCount() - Method in class java.awt.Choice
Returns the number of items in this Choice menu.
getItemCount() - Method in class javax.swing.JMenu
Returns the number of items on the menu, including separators.
getItemCount() - Method in class javax.swing.JComboBox
Returns the number of items in the list.
getItems() - Method in class java.awt.List
Gets the items in the list.
getItemSelectable() - Method in class java.awt.event.ItemEvent
Returns the originator of the event.
getIterator() - Method in class java.text.AttributedString
Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string.
getIterator(AttributedCharacterIterator.Attribute[]) - Method in class java.text.AttributedString
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
getIterator(AttributedCharacterIterator.Attribute[], int, int) - Method in class java.text.AttributedString
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
getIterator(HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument
Fetches an iterator for the following kind of HTML tag.
getJarEntry() - Method in class java.net.JarURLConnection
Return the JAR entry object for this connection, if any.
getJarEntry(String) - Method in class java.util.jar.JarFile
Returns the JarEntry for the given entry name or null if not found.
getJarFile() - Method in class java.net.JarURLConnection
Return the JAR file for this connection.
getJarFileURL() - Method in class java.net.JarURLConnection
Returns the URL for the Jar file for this connection.
getJavaInitializationString() - Method in interface java.beans.PropertyEditor
This method is intended for use when generating Java code to set the value of the property.
getJavaInitializationString() - Method in class java.beans.PropertyEditorSupport
This method is intended for use when generating Java code to set the value of the property.
getJMenuBar() - Method in class javax.swing.JApplet
Returns the menubar set on this applet.
getJMenuBar() - Method in class javax.swing.JInternalFrame
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
getJMenuBar() - Method in class javax.swing.JFrame
Returns the menubar set on this frame.
getJMenuBar() - Method in class javax.swing.JRootPane
Returns the menu bar from the layered pane.
getJMenuBar() - Method in class javax.swing.JDialog
Returns the menubar set on this dialog.
getJobName() - Method in class java.awt.print.PrinterJob
Gets the name of the document to be printed.
getJustificationInfo() - Method in class java.awt.font.GraphicAttribute
Returns the justification information for this GraphicAttribute.
getJustifiedLayout(float) - Method in class java.awt.font.TextLayout
Creates a copy of this TextLayout justified to the specified width.
getKeepAlive() - Method in class java.net.Socket
Tests if SO_KEEPALIVE is enabled.
getKernel() - Method in class java.awt.image.ConvolveOp
Returns the Kernel.
getKernelData(float[]) - Method in class java.awt.image.Kernel
Returns the kernel data in row major order.
getKey() - Method in class java.awt.MenuShortcut
Return the raw keycode of this MenuShortcut.
getKey() - Method in class java.util.MissingResourceException
Gets parameter passed by constructor.
getKey() - Method in interface java.util.Map.Entry
Returns the key corresponding to this entry.
getKey() - Method in class javax.accessibility.AccessibleRelation
Returns the key for this relation
getKey(String, char[]) - Method in class java.security.KeyStore
Returns the key associated with the given alias, using the given password to recover it.
getKeyChar() - Method in class java.awt.event.KeyEvent
Returns the character associated with the key in this event.
getKeyChar() - Method in class javax.swing.KeyStroke
Returns the character defined by this KeyStroke object.
getKeyCode() - Method in class java.awt.event.KeyEvent
Returns the integer key-code associated with the key in this event.
getKeyCode() - Method in class javax.swing.KeyStroke
Returns the numeric keycode defined by this KeyStroke object.
getKeyListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.getKeyListener().
getKeyListener() - Method in interface javax.swing.plaf.basic.ComboPopup
Returns a key listener that shows and hides the popup.
getKeymap() - Method in class javax.swing.text.JTextComponent
Fetches the keymap currently active in this text component.
getKeymap(String) - Static method in class javax.swing.text.JTextComponent
Fetches a named keymap previously added to the document.
getKeymapName() - Method in class javax.swing.plaf.basic.BasicTextUI
Fetches the name of the keymap that will be installed/used by default for this UI.
getKeyModifiersText(int) - Static method in class java.awt.event.KeyEvent
Returns a String describing the modifier key(s), such as "Shift", or "Ctrl+Shift".
getKeys() - Method in class java.util.ResourceBundle
Return an enumeration of the keys.
getKeys() - Method in class java.util.PropertyResourceBundle
Implementation of ResourceBundle.getKeys.
getKeys() - Method in class java.util.ListResourceBundle
Implementation of ResourceBundle.getKeys.
getKeys() - Method in class javax.swing.AbstractAction
Returns an array of Objects which are keys for which values have been set for this AbstractAction, or null if no keys have values set.
getKeySelectionManager() - Method in class javax.swing.JComboBox
Returns the list's key-selection manager.
getKeysize() - Method in class java.security.spec.RSAKeyGenParameterSpec
Returns the keysize.
getKeySpec(Key, Class) - Method in class java.security.KeyFactory
Returns a specification (key material) of the given key object.
getKeyStroke(char) - Static method in class javax.swing.KeyStroke
Return a shared instance of a key stroke that is activated when the key is pressed (that is, a KeyStroke for the KEY_TYPED event).
getKeyStroke(Character, int) - Static method in class javax.swing.KeyStroke
Return a shared instance of a key stroke, given a character object and a set of modifiers.
getKeyStroke(char, boolean) - Static method in class javax.swing.KeyStroke
Deprecated. use getKeyStroke(char)
getKeyStroke(int, int) - Static method in class javax.swing.KeyStroke
Return a shared instance of a key stroke given a char code and a set of modifiers -- the key is activated when it is pressed.
getKeyStroke(int, int, boolean) - Static method in class javax.swing.KeyStroke
Return a shared instance of a key stroke given a numeric keycode and a set of modifiers, specifying whether the key is activated when it is pressed or released.
getKeyStroke(String) - Static method in class javax.swing.KeyStroke
Parse a string and return a KeyStroke.
getKeyStrokeForEvent(KeyEvent) - Static method in class javax.swing.KeyStroke
Return a keystroke from an event.
getKeyStrokesForAction(Action) - Method in interface javax.swing.text.Keymap
Fetches the keystrokes that will result in the given action.
getKeyText(int) - Static method in class java.awt.event.KeyEvent
Returns a String describing the keyCode, such as "HOME", "F1" or "A".
getKeyUsage() - Method in class java.security.cert.X509Certificate
Gets a boolean array representing bits of the KeyUsage extension, (OID = 2.5.29.15).
getLabel() - Method in class java.awt.MenuItem
Gets the label for this menu item.
getLabel() - Method in class java.awt.Checkbox
Gets the label of this check box.
getLabel() - Method in class java.awt.Button
Gets the label of this button.
getLabel() - Method in class javax.swing.AbstractButton
Deprecated. - Replaced by getText
getLabel() - Method in class javax.swing.JPopupMenu
Returns the popup menu's label
getLabel() - Method in class javax.swing.text.html.Option
Fetch the label associated with the option.
getLabelFor() - Method in class javax.swing.JLabel
Get the component this is labelling.
getLabelTable() - Method in class javax.swing.JSlider
Returns the dictionary of what labels to draw at which values.
getLanguage() - Method in class java.util.Locale
Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.
getLargeDisplayIcon() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Returns the small display icon for the panel.
getLast() - Method in class java.util.LinkedList
Returns the last element in this list.
getLastChild() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns this node's last child.
getLastChildPath(TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns a path to the last child of parent.
getLastColumn() - Method in interface javax.accessibility.AccessibleTableModelChange
Returns the last column that changed.
getLastColumn() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

getLastComponent(Container) - Method in class javax.swing.DefaultFocusManager
Return the last component that should receive the focus
getLastDividerLocation() - Method in class javax.swing.JSplitPane
Returns the last location the divider was at.
getLastDragLocation() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the last drag location of the JSplitPane.
getLastIndex() - Method in class javax.swing.event.ListSelectionEvent
Returns the index of the last row whose selection may have changed.
getLastLeaf() - Method in class javax.swing.tree.DefaultMutableTreeNode
Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf.
getLastModified() - Method in class java.net.URLConnection
Returns the value of the last-modified header field.
getLastPathComponent() - Method in class javax.swing.tree.TreePath
Returns the last component of this path.
getLastRow() - Method in interface javax.accessibility.AccessibleTableModelChange
Returns the last row that changed.
getLastRow() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

getLastRow() - Method in class javax.swing.event.TableModelEvent
Returns the last row that changed.
getLastSelectedPathComponent() - Method in class javax.swing.JTree
Returns the last path component in the first node of the current selection.
getLastVisibleIndex() - Method in class javax.swing.JList
Returns the index of the cell in the lower right corner of the JList or -1 if nothing is visible or the list is empty.
getLatency() - Method in interface javax.sound.midi.Synthesizer
Obtains the processing latency incurred by this synthesizer, expressed in microseconds.
getLateReflectionDelay() - Method in class javax.sound.sampled.ReverbType
Returns the late reflection delay time in microseconds.
getLateReflectionIntensity() - Method in class javax.sound.sampled.ReverbType
Returns the late reflection intensity in microseconds.
getLayer() - Method in class javax.swing.JInternalFrame
Convenience method for getting the layer attribute of this component.
getLayer(Component) - Method in class javax.swing.JLayeredPane
Returns the layer attribute for the specified Component.
getLayer(JComponent) - Static method in class javax.swing.JLayeredPane
Gets the layer property for a JComponent, it does not cause any side effects like setLayer().
getLayeredPane() - Method in class javax.swing.JWindow
Returns the layeredPane object for this window.
getLayeredPane() - Method in class javax.swing.JApplet
Returns the layeredPane object for this applet.
getLayeredPane() - Method in class javax.swing.JInternalFrame
Returns the layeredPane object for this frame.
getLayeredPane() - Method in class javax.swing.JFrame
Returns the layeredPane object for this frame.
getLayeredPane() - Method in interface javax.swing.RootPaneContainer
Returns the layeredPane.
getLayeredPane() - Method in class javax.swing.JRootPane
Get the layered pane used by the root pane.
getLayeredPane() - Method in class javax.swing.JDialog
Returns the layeredPane object for this dialog.
getLayeredPaneAbove(Component) - Static method in class javax.swing.JLayeredPane
Convenience method that returns the first JLayeredPane which contains the specified component.
getLayout() - Method in class java.awt.Container
Gets the layout manager for this container.
getLayout(int, int) - Method in class java.awt.font.TextMeasurer
Returns a TextLayout on the given character range.
getLayoutAlignmentX(Container) - Method in interface java.awt.LayoutManager2
Returns the alignment along the x axis.
getLayoutAlignmentX(Container) - Method in class java.awt.CardLayout
Returns the alignment along the x axis.
getLayoutAlignmentX(Container) - Method in class java.awt.BorderLayout
Returns the alignment along the x axis.
getLayoutAlignmentX(Container) - Method in class java.awt.GridBagLayout
Returns the alignment along the x axis.
getLayoutAlignmentX(Container) - Method in class javax.swing.BoxLayout
Returns the alignment along the X axis for the container.
getLayoutAlignmentX(Container) - Method in class javax.swing.OverlayLayout
Returns the alignment along the x axis for the container.
getLayoutAlignmentX(Container) - Method in class javax.swing.JRootPane.RootLayout

getLayoutAlignmentX(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the alignment along the x axis.
getLayoutAlignmentY(Container) - Method in interface java.awt.LayoutManager2
Returns the alignment along the y axis.
getLayoutAlignmentY(Container) - Method in class java.awt.CardLayout
Returns the alignment along the y axis.
getLayoutAlignmentY(Container) - Method in class java.awt.BorderLayout
Returns the alignment along the y axis.
getLayoutAlignmentY(Container) - Method in class java.awt.GridBagLayout
Returns the alignment along the y axis.
getLayoutAlignmentY(Container) - Method in class javax.swing.BoxLayout
Returns the alignment along the Y axis for the container.
getLayoutAlignmentY(Container) - Method in class javax.swing.OverlayLayout
Returns the alignment along the y axis for the container.
getLayoutAlignmentY(Container) - Method in class javax.swing.JRootPane.RootLayout

getLayoutAlignmentY(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the alignment along the y axis.
getLayoutDimensions() - Method in class java.awt.GridBagLayout
Determines column widths and row heights for the layout grid.
GetLayoutInfo(Container, int) - Method in class java.awt.GridBagLayout
Print the layout constraints.
getLayoutOrigin() - Method in class java.awt.GridBagLayout
Determines the origin of the layout grid.
getLayoutQueue() - Method in class javax.swing.text.AsyncBoxView
Fetch the queue to use for layout.
getLayoutView(int) - Method in class javax.swing.text.ParagraphView
The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements.
getLayoutViewCount() - Method in class javax.swing.text.ParagraphView
The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements.
getLayoutWeights() - Method in class java.awt.GridBagLayout
Determines the weights of the layout grid's columns and rows.
getLeader() - Method in class javax.swing.text.TabStop

getLeading() - Method in class java.awt.FontMetrics
Determines the standard leading of the Font described by this FontMetrics object.
getLeading() - Method in class java.awt.font.TextLayout
Returns the leading of the TextLayout.
getLeading() - Method in class java.awt.font.LineMetrics
Returns the leading of the text.
getLeadSelectionIndex() - Method in class javax.swing.DefaultListSelectionModel

getLeadSelectionIndex() - Method in class javax.swing.JList
Returns the second index argument from the most recent addSelectionInterval or setSelectionInterval call.
getLeadSelectionIndex() - Method in interface javax.swing.ListSelectionModel
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
getLeadSelectionPath() - Method in class javax.swing.JTree
Returns the path identified as the lead.
getLeadSelectionPath() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the last path that was added.
getLeadSelectionPath() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the last path that was added.
getLeadSelectionRow() - Method in class javax.swing.JTree
Returns the row index corresponding to the lead path.
getLeadSelectionRow() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the lead selection index.
getLeadSelectionRow() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the lead selection index.
getLeafCount() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the total number of leaves that are descendants of this node.
getLeafIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the icon used to represent leaf nodes.
getLeastMaximum(int) - Method in class java.util.Calendar
Gets the lowest maximum value for the given field if varies.
getLeastMaximum(int) - Method in class java.util.GregorianCalendar
Returns lowest maximum value for the given field if varies.
getLeftChildIndent() - Method in class javax.swing.plaf.basic.BasicTreeUI

getLeftComponent() - Method in class javax.swing.JSplitPane
Returns the component to the left (or above) the divider.
getLeftIndent(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the left indent setting.
getLeftInset() - Method in class javax.swing.text.CompositeView
Gets the left inset.
getLeftInset() - Method in class javax.swing.text.AsyncBoxView
Get the left part of the margin around the view.
getLength() - Method in class java.net.DatagramPacket
Returns the length of the data to be sent or the length of the data received.
getLength() - Method in class javax.sound.midi.MidiMessage
Obtains the total length of the MIDI message in bytes.
getLength() - Method in interface javax.swing.event.DocumentEvent
Returns the length of the change.
getLength() - Method in interface javax.swing.text.Document
Returns number of characters of content currently in the document.
getLength() - Method in class javax.swing.text.AbstractDocument
Returns the length of the data.
getLength() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Returns the length of the change.
getLength() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the length.
getLength(Object) - Static method in class java.lang.reflect.Array
Returns the length of the specified array object, as an int.
getLevel() - Method in interface javax.sound.sampled.DataLine
Obtains the current volume level for the line.
getLevel() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the number of levels above this node -- the distance from the root to this node.
getLimit() - Method in class javax.swing.undo.UndoManager
Returns the maximum number of edits this UndoManager will hold.
getLimits() - Method in class java.text.ChoiceFormat
Get the limits passed in the constructor.
getLine() - Method in class javax.sound.sampled.LineEvent
Obtains the audio line that is the source of this event.
getLine(Line.Info) - Method in interface javax.sound.sampled.Mixer
Obtains a line that is available for use and that matches the description in the specified Line.Info object.
getLine(Line.Info) - Static method in class javax.sound.sampled.AudioSystem
Obtains a line that matches the description in the specified Line.Info object.
getLineBreakIndex(int, float) - Method in class java.awt.font.TextMeasurer
Returns the index of the first character which will not fit on on a line which begins at start and may be up to maxAdvance in graphical width.
getLineBuffer() - Method in class javax.swing.text.PlainView
Gives access to a buffer that can be used to fetch text from the associated document.
getLineBuffer() - Method in class javax.swing.text.WrappedPlainView
Gives access to a buffer that can be used to fetch text from the associated document.
getLineClass() - Method in class javax.sound.sampled.Line.Info
Obtains the class of the line that this Line.Info object describes.
getLineColor() - Method in class javax.swing.border.LineBorder
Returns the color of the border.
getLineCount() - Method in class javax.swing.JTextArea
Determines the number of lines contained in the area.
getLineEndOffset(int) - Method in class javax.swing.JTextArea
Determines the offset of the end of the given line.
getLineIncrement() - Method in class java.awt.Scrollbar
Deprecated. As of JDK version 1.1, replaced by getUnitIncrement().
getLineInfo() - Method in interface javax.sound.sampled.Line
Obtains the Line.Info object describing this line.
getLineInstance() - Static method in class java.text.BreakIterator
Create BreakIterator for line-breaks using default locale.
getLineInstance(Locale) - Static method in class java.text.BreakIterator
Create BreakIterator for line-breaks using specified locale.
getLineJoin() - Method in class java.awt.BasicStroke
Returns the line join style.
getLineLength() - Method in class javax.swing.text.AbstractWriter
Returns the maximum line length.
getLineMetrics(char[], int, int, FontRenderContext) - Method in class java.awt.Font
Returns a LineMetrics object created with the specified arguments.
getLineMetrics(char[], int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the LineMetrics object for the specified character array in the specified Graphics context.
getLineMetrics(CharacterIterator, int, int, FontRenderContext) - Method in class java.awt.Font
Returns a LineMetrics object created with the specified arguments.
getLineMetrics(CharacterIterator, int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
getLineMetrics(String, FontRenderContext) - Method in class java.awt.Font
Returns a LineMetrics object created with the specified String and FontRenderContext.
getLineMetrics(String, Graphics) - Method in class java.awt.FontMetrics
Returns the LineMetrics object for the specified String in the specified Graphics context.
getLineMetrics(String, int, int, FontRenderContext) - Method in class java.awt.Font
Returns a LineMetrics object created with the specified arguments.
getLineMetrics(String, int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the LineMetrics object for the specified String in the specified Graphics context.
getLineNumber() - Method in class java.io.LineNumberReader
Get the current line number.
getLineNumber() - Method in class java.io.LineNumberInputStream
Deprecated. Returns the current line number.
getLineOfOffset(int) - Method in class javax.swing.JTextArea
Translates an offset into the components text to a line number.
getLineSeparator() - Method in class javax.swing.text.AbstractWriter
Returns the string used to represent newlines.
getLineSpacing(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the line spacing setting.
getLineStartOffset(int) - Method in class javax.swing.JTextArea
Determines the offset of the start of the given line.
getLineWidth() - Method in class java.awt.BasicStroke
Returns the line width.
getLineWrap() - Method in class javax.swing.JTextArea
Gets the line-wrapping policy of the text area.
getLink(int) - Method in interface javax.accessibility.AccessibleHypertext
Returns the nth Link of this Hypertext document.
getLink(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
Returns the index into an array of hyperlinks that index.
getLinkCount() - Method in interface javax.accessibility.AccessibleHypertext
Returns the number of links within this hypertext document.
getLinkCount() - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
Returns the number of links within this hypertext doc.
getLinkCursor() - Method in class javax.swing.text.html.HTMLEditorKit
Returns the cursor to use over hyper links.
getLinkExplanation() - Method in class javax.naming.LinkException
Retrieves the explanation associated with the problem encounter when resolving a link.
getLinkIndex(int) - Method in interface javax.accessibility.AccessibleHypertext
Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
getLinkIndex(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
getLinkName() - Method in class javax.naming.LinkRef
Retrieves the name of this link.
getLinkRemainingName() - Method in class javax.naming.LinkException
Retrieves the remaining unresolved portion of the link name.
getLinkResolvedName() - Method in class javax.naming.LinkException
Retrieves the leading portion of the link name that was resolved successfully.
getLinkResolvedObj() - Method in class javax.naming.LinkException
Retrieves the object to which resolution was successful.
getLinkText(int) - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
Returns the contiguous text within the document that is associated with this hyperlink.
getList() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.getList().
getList() - Method in interface javax.swing.plaf.basic.ComboPopup
Returns the list that is being used to draw the items in the JComboBox.
getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in class javax.swing.DefaultListCellRenderer

getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in interface javax.swing.ListCellRenderer
Return a component that has been configured to display the specified value.
getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicComboBoxRenderer

getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer

getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer

getListenerCount() - Method in class javax.swing.event.EventListenerList
Returns the total number of listeners for this listener list.
getListenerCount(Class) - Method in class javax.swing.event.EventListenerList
Returns the total number of listeners of the supplied type for this listener list.
getListenerList() - Method in class javax.swing.event.EventListenerList
Passes back the event listener list as an array of ListenerType-listener pairs.
getListenerMethodDescriptors() - Method in class java.beans.EventSetDescriptor
Gets the MethodDescriptors of the target listener interface.
getListenerMethods() - Method in class java.beans.EventSetDescriptor
Gets the methods of the target listener interface.
getListeners(Class) - Method in class java.awt.Component
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Container
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Scrollbar
Return an array of all the listeners that were added to the Scrollbar with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.MenuItem
Return an array of all the listeners that were added to the MenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Checkbox
Return an array of all the listeners that were added to the Checkbox with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Window
Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.List
Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.TextComponent
Return an array of all the listeners that were added to the TextComponent with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Choice
Return an array of all the listeners that were added to the Choice with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.TextField
Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.Button
Return an array of all the listeners that were added to the Button with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class java.awt.CheckboxMenuItem
Return an array of all the listeners that were added to the CheckboxMenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class javax.swing.DefaultSingleSelectionModel
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.JComponent
Return an array of all the listeners that were added to this JComponent with addXXXListener(), where XXX is the name of the listenerType argument.
getListeners(Class) - Method in class javax.swing.DefaultBoundedRangeModel
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.AbstractListModel
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.DefaultListSelectionModel
Returns an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.Timer
Return an array of all the listeners of the given type that were added to this timer.
getListeners(Class) - Method in class javax.swing.DefaultButtonModel
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.event.EventListenerList
Return an array of all the listeners of the given type.
getListeners(Class) - Method in class javax.swing.table.AbstractTableModel
Returns an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.table.DefaultTableColumnModel
Returns an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.text.StyleContext.NamedStyle
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.text.AbstractDocument
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.text.DefaultCaret
Return an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns an array of all the listeners of the given type that were added to this model.
getListeners(Class) - Method in class javax.swing.tree.DefaultTreeModel
Return an array of all the listeners of the given type that were added to this model.
getListenerType() - Method in class java.beans.EventSetDescriptor
Gets the Class object for the target interface.
getListPainter(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Fetches the list formatter to use for the given set of CSS attributes.
getLoadedInstruments() - Method in interface javax.sound.midi.Synthesizer
Obtains a list of the instruments that are currently loaded onto this Synthesizer.
getLocalAddress() - Method in class java.net.DatagramSocket
Gets the local address to which the socket is bound.
getLocalAddress() - Method in class java.net.Socket
Gets the local address to which the socket is bound.
getLocalBounds(Component) - Static method in class javax.swing.SwingUtilities
Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent
getLocale() - Method in class java.applet.Applet
Gets the Locale for the applet, if it has been set.
getLocale() - Method in class java.awt.Component
Gets the locale of this component.
getLocale() - Method in class java.awt.Component.AccessibleAWTComponent
Return the locale of this object.
getLocale() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Return the locale of this object.
getLocale() - Method in class java.awt.Window
Gets the Locale object that is associated with this window, if the locale has been set.
getLocale() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Gets the locale of the component.
getLocale() - Method in class java.awt.im.InputContext
Returns the current locale of the current input method.
getLocale() - Method in interface java.awt.im.spi.InputMethod
Returns the current input locale.
getLocale() - Method in class java.beans.beancontext.BeanContextSupport
Gets the locale for this BeanContext.
getLocale() - Method in class java.text.MessageFormat
Gets the locale.
getLocale() - Method in class java.util.ResourceBundle
Return the Locale for this ResourceBundle.
getLocale() - Method in class javax.accessibility.AccessibleContext
Gets the locale of the component.
getLocale() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getLocale() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Gets the locale of the component.
getLocale() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the locale of the component.
getLocale() - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Returns the locale of this object.
getLocale() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getLocalGraphicsEnvironment() - Static method in class java.awt.GraphicsEnvironment
Returns the local GraphicsEnvironment.
getLocalHost() - Static method in class java.net.InetAddress
Returns the local host.
getLocalizedInputStream(InputStream) - Method in class java.lang.Runtime
Deprecated. As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.
getLocalizedMessage() - Method in class java.lang.Throwable
Creates a localized description of this Throwable.
getLocalizedOutputStream(OutputStream) - Method in class java.lang.Runtime
Deprecated. As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.
getLocalPatternChars() - Method in class java.text.DateFormatSymbols
Gets localized date-time pattern characters.
getLocalPort() - Method in class java.net.DatagramSocket
Returns the port number on the local host to which this socket is bound.
getLocalPort() - Method in class java.net.SocketImpl
Returns the value of this socket's localport field.
getLocalPort() - Method in class java.net.Socket
Returns the local port to which this socket is bound.
getLocalPort() - Method in class java.net.ServerSocket
Returns the port on which this socket is listening.
getLocalPort() - Method in class java.net.DatagramSocketImpl
Gets the local port.
getLocation() - Method in class java.awt.Component
Gets the location of this component in the form of a point specifying the component's top-left corner.
getLocation() - Method in class java.awt.Component.AccessibleAWTComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
getLocation() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
getLocation() - Method in class java.awt.Point
Returns the location of this point.
getLocation() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
getLocation() - Method in class java.awt.Rectangle
Returns the location of this Rectangle.
getLocation() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns a Point indicating the Cursor's current location in the Component's coordinates.
getLocation() - Method in class java.awt.dnd.DropTargetDragEvent
This method returns a Point indicating the Cursor's current location within the Component's coordinates.
getLocation() - Method in class java.rmi.activation.ActivationGroupDesc
Returns the group's code location.
getLocation() - Method in class java.rmi.activation.ActivationDesc
Returns the code location for the object specified by this descriptor.
getLocation() - Method in class java.security.CodeSource
Returns the location associated with this CodeSource.
getLocation() - Method in interface javax.accessibility.AccessibleComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
getLocation() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getLocation() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getLocation() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
getLocation() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getLocation(Point) - Method in class java.awt.Component
Store the x,y origin of this component into "return value" rv and return rv.
getLocation(Point) - Method in class javax.swing.JComponent
Stores the x,y origin of this component into "return value" rv and returns rv.
getLocationInJTree() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getLocationOffset(int, int) - Method in interface java.awt.im.InputMethodRequests
Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.
getLocationOnScreen() - Method in class java.awt.Component
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
getLocationOnScreen() - Method in class java.awt.Component.AccessibleAWTComponent
Returns the location of the object on the screen.
getLocationOnScreen() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns the location of the object on the screen.
getLocationOnScreen() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Returns the location of the object on the screen.
getLocationOnScreen() - Method in interface javax.accessibility.AccessibleComponent
Returns the location of the object on the screen.
getLocationOnScreen() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getLocationOnScreen() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getLocationOnScreen() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Returns the location of the object on the screen.
getLocationOnScreen() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getLockingKeyState(int) - Method in class java.awt.Toolkit
Returns whether the given locking key on the keyboard is currently in its "on" state.
getLog() - Static method in class java.rmi.server.RemoteServer
Returns stream for the RMI call log.
getLogicalBounds() - Method in class java.awt.font.GlyphVector
Returns the logical bounds of this GlyphVector.
getLogicalHighlightShape(int, int) - Method in class java.awt.font.TextLayout
Returns a Shape enclosing the logical selection in the specified range, extended to the natural bounds of this TextLayout.
getLogicalHighlightShape(int, int, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns a Shape enclosing the logical selection in the specified range, extended to the specified bounds.
getLogicalRangesForVisualSelection(TextHitInfo, TextHitInfo) - Method in class java.awt.font.TextLayout
Returns the logical ranges of text corresponding to a visual selection.
getLogicalStyle() - Method in class javax.swing.JTextPane
Fetches the logical style assigned to the paragraph represented by the current position of the caret, or null.
getLogicalStyle(int) - Method in interface javax.swing.text.StyledDocument
Gets a logical style for a given position in a paragraph.
getLogicalStyle(int) - Method in class javax.swing.text.DefaultStyledDocument
Fetches the logical style assigned to the paragraph represented by the given position.
getLogicalView(FlowView) - Method in class javax.swing.text.FlowView.FlowStrategy
This method gives flow strategies access to the logical view of the FlowView.
getLoginTimeout() - Static method in class java.sql.DriverManager
Gets the maximum time in seconds that a driver can wait when attempting to log in to a database.
getLogStream() - Static method in class java.sql.DriverManager
Deprecated.
getLogTimers() - Static method in class javax.swing.Timer
Returns true if logging is enabled.
getLogWriter() - Static method in class java.sql.DriverManager
Gets the log writer.
getLong(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC BIGINT parameter as a long in the Java programming language.
getLong(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
getLong(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a long on the specified object.
getLong(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a long.
getLong(String) - Static method in class java.lang.Long
Determines the long value of the system property with the specified name.
getLong(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
getLong(String, long) - Static method in class java.lang.Long
Determines the long value of the system property with the specified name.
getLong(String, Long) - Static method in class java.lang.Long
Returns the long value of the system property with the specified name.
getLongParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a long.
getLookAndFeel() - Static method in class javax.swing.UIManager
Returns The current default look and feel, or null.
getLookAndFeelDefaults() - Static method in class javax.swing.UIManager
Returns the default values for this look and feel.
getLoweredBevelBorderUIResource() - Static method in class javax.swing.plaf.BorderUIResource

getLowestSetBit() - Method in class java.math.BigInteger
Returns the index of the rightmost (lowest-order) one bit in this BigInteger (the number of zero bits to the right of the rightmost one bit).
getLowestValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI
Returns the label that corresponds to the highest slider value in the label table.
getLSB() - Method in class java.awt.font.GlyphMetrics
Returns the left (top) side bearing of the glyph.
getMagicCaretPosition() - Method in class javax.swing.text.DefaultCaret
Gets the saved caret position.
getMagicCaretPosition() - Method in interface javax.swing.text.Caret
Gets the current caret visual location.
getMainAttributes() - Method in class java.net.JarURLConnection
Returns the main Attributes for the JAR file for this connection.
getMainAttributes() - Method in class java.util.jar.Manifest
Returns the main Attributes for the Manifest.
getMajorAxis() - Method in class javax.swing.text.AsyncBoxView
Fetch the major axis (the axis the children are tiled along).
getMajorOffset() - Method in class javax.swing.text.AsyncBoxView.ChildState
Get the offset along the major axis
getMajorSpan() - Method in class javax.swing.text.AsyncBoxView.ChildState
What is the span along the major axis.
getMajorTickSpacing() - Method in class javax.swing.JSlider
This method returns the major tick spacing.
getMajorVersion() - Method in class java.awt.color.ICC_Profile
Returns profile major version.
getMajorVersion() - Method in interface java.sql.Driver
Gets the driver's major version number.
getManifest() - Method in class java.net.JarURLConnection
Returns the Manifest for this connection, or null if none.
getManifest() - Method in class java.util.jar.JarInputStream
Returns the Manifest for this JAR file, or null if none.
getManifest() - Method in class java.util.jar.JarFile
Returns the JAR file manifest, or null if none.
getMapSize() - Method in class java.awt.image.IndexColorModel
Returns the size of the color/alpha component arrays in this IndexColorModel.
getMargin() - Method in class javax.swing.AbstractButton
Returns the margin between the button's border and the label.
getMargin() - Method in class javax.swing.JPopupMenu
Returns the margin, in pixels, between the popup menu's border and its containees.
getMargin() - Method in class javax.swing.JToolBar
Returns the margin between the toolbar's border and its buttons.
getMargin() - Method in class javax.swing.JMenuBar
Returns the margin between the menubar's border and its menus.
getMargin() - Method in class javax.swing.text.JTextComponent
Returns the margin between the text component's border and its text.
getMark() - Method in class javax.swing.event.CaretEvent
Fetches the location of other end of a logical selection.
getMark() - Method in class javax.swing.text.DefaultCaret
Fetches the current position of the mark.
getMark() - Method in interface javax.swing.text.Caret
Fetches the current position of the mark.
getMask(int) - Method in class java.awt.image.PackedColorModel
Returns the mask indicating which bits in a pixel contain the specified color/alpha sample.
getMasks() - Method in class java.awt.image.PackedColorModel
Returns a mask array indicating which bits in a pixel contain the color and alpha samples.
getMasterSyncMode() - Method in interface javax.sound.midi.Sequencer
Obtains the current master synchronization mode for this sequencer.
getMasterSyncModes() - Method in interface javax.sound.midi.Sequencer
Obtains the set of master synchronization modes supported by this sequencer.
getMatrix() - Method in class java.awt.color.ICC_ProfileRGB
Returns a 3x3 float matrix constructed from the X, Y, and Z components of the redColorantTag, greenColorantTag, and blueColorantTag in the ICC profile, as described above.
getMatrix() - Method in class java.awt.image.BandCombineOp
Returns the matrix.
getMatrix() - Method in class java.awt.print.PageFormat
Returns a transformation matrix that translates user space rendering to the requested orientation of the page.
getMatrix(double[]) - Method in class java.awt.geom.AffineTransform
Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values.
getMatteColor() - Method in class javax.swing.border.MatteBorder
Returns the color used for tiling the border or null if a tile icon is being used.
getMaxAdvance() - Method in class java.awt.FontMetrics
Gets the maximum advance width of any character in this Font.
getMaxAscent() - Method in class java.awt.FontMetrics
Determines the maximum ascent of the Font described by this FontMetrics object.
getMaxBinaryLiteralLength() - Method in interface java.sql.DatabaseMetaData
How many hex characters can you have in an inline binary literal?
getMaxBufferSize() - Method in class javax.sound.sampled.DataLine.Info
Obtains the maximum buffer size supported by the data line.
getMaxCatalogNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of a catalog name?
getMaxCharactersPerLineCount() - Method in class javax.swing.JOptionPane
Returns the maximum number of characters to place on a line in a message.
getMaxCharactersPerLineCount() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the maximum number of characters to place on a line.
getMaxCharBounds(FontRenderContext) - Method in class java.awt.Font
Returns the bounds for the character with the maximum bounds as defined in the specified FontRenderContext.
getMaxCharBounds(Graphics) - Method in class java.awt.FontMetrics
Returns the bounds for the character with the maximum bounds in the specified Graphics context.
getMaxCharLiteralLength() - Method in interface java.sql.DatabaseMetaData
What's the max length for a character literal?
getMaxColumnNameLength() - Method in interface java.sql.DatabaseMetaData
What's the limit on column name length?
getMaxColumnsInGroupBy() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of columns in a "GROUP BY" clause?
getMaxColumnsInIndex() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of columns allowed in an index?
getMaxColumnsInOrderBy() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of columns in an "ORDER BY" clause?
getMaxColumnsInSelect() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of columns in a "SELECT" list?
getMaxColumnsInTable() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of columns in a table?
getMaxConnections() - Method in interface java.sql.DatabaseMetaData
How many active connections can we have at a time to this database?
getMaxCursorNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum cursor name length?
getMaxDecent() - Method in class java.awt.FontMetrics
Deprecated. As of JDK version 1.1.1, replaced by getMaxDescent().
getMaxDescent() - Method in class java.awt.FontMetrics
Determines the maximum descent of the Font described by this FontMetrics object.
getMaxExpansion(int) - Method in class java.text.CollationElementIterator
Return the maximum length of any expansion sequences that end with the specified comparison order.
getMaxFieldSize() - Method in interface java.sql.Statement
Returns the maximum number of bytes allowed for any column value.
getMaximum() - Method in class java.awt.Scrollbar
Gets the maximum value of this scroll bar.
getMaximum() - Method in interface java.awt.Adjustable
Gets the maximum value of the adjustable object.
getMaximum() - Method in class javax.sound.sampled.FloatControl
Obtains the maximum value permitted.
getMaximum() - Method in class javax.swing.DefaultBoundedRangeModel
Return the model's maximum.
getMaximum() - Method in class javax.swing.ProgressMonitor
Returns the maximum value -- the higher end of the progress value.
getMaximum() - Method in interface javax.swing.BoundedRangeModel
Returns the model's maximum.
getMaximum() - Method in class javax.swing.JScrollBar
The maximum value of the scrollbar is maximum - extent.
getMaximum() - Method in class javax.swing.JProgressBar
Returns the model's maximum value.
getMaximum() - Method in class javax.swing.JSlider
Returns the maximum value supported by the slider.
getMaximum(int) - Method in class java.util.Calendar
Gets the maximum value for the given time field.
getMaximum(int) - Method in class java.util.GregorianCalendar
Returns maximum value for the given field.
getMaximumAccessibleValue() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the maximum accessible value of this object.
getMaximumAccessibleValue() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class java.awt.Button.AccessibleAWTButton
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in interface javax.accessibility.AccessibleValue
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Get the maximum value of this object as a Number.
getMaximumAccessibleValue() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Gets the maximum accessible value of this object.
getMaximumAccessibleValue() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the maximum accessible value of this object.
getMaximumAccessibleValue() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the maximum accessible value of this object.
getMaximumAccessibleValue() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the maximum accessible value of this object.
getMaximumCursorColors() - Method in class java.awt.Toolkit
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
getMaximumDividerLocation() - Method in class javax.swing.JSplitPane
Returns the maximum location of the divider from the look and feel implementation.
getMaximumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.SplitPaneUI
Returns the maximum possible location of the divider.
getMaximumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Gets the maximum location of the divider.
getMaximumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getMaximumDividerLocation on each UI handled by this MultiUI.
getMaximumFractionDigits() - Method in class java.text.NumberFormat
Returns the maximum number of digits allowed in the fraction portion of a number.
getMaximumIntegerDigits() - Method in class java.text.NumberFormat
Returns the maximum number of digits allowed in the integer portion of a number.
getMaximumRowCount() - Method in class javax.swing.JComboBox
Returns the maximum number of items the combo box can display without a scrollbar
getMaximumSize() - Method in class java.awt.Component
Gets the maximum size of this component.
getMaximumSize() - Method in class java.awt.Container
Returns the maximum size of this container.
getMaximumSize() - Method in class javax.swing.JComponent
If the maximum size has been set to a non-null value just returns it.
getMaximumSize() - Method in class javax.swing.JToolBar.Separator
Returns the maximum size for the separator.
getMaximumSize() - Method in class javax.swing.Box.Filler
Returns the maximum size of the component.
getMaximumSize() - Method in class javax.swing.JScrollBar
The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
getMaximumSize() - Method in class javax.swing.plaf.basic.BasicArrowButton

getMaximumSize() - Method in class javax.swing.plaf.metal.MetalScrollButton

getMaximumSize(JComponent) - Method in class javax.swing.plaf.ComponentUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Gets the maximum size for the editor component.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Messages getPreferredSize.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
Return the maximum size of the table.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicListUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Return the maximum size of the header.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuBarUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI

getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call getMaximumSize on each UI handled by this MultiUI.
getMaximumSpan(int) - Method in class javax.swing.text.View
Determines the maximum span for this view along an axis.
getMaximumSpan(int) - Method in class javax.swing.text.BoxView
Determines the maximum span for this view along an axis.
getMaximumSpan(int) - Method in class javax.swing.text.AsyncBoxView
Determines the maximum span for this view along an axis.
getMaximumSpan(int) - Method in class javax.swing.text.ComponentView
Determines the maximum span for this view along an axis.
getMaximumSpan(int) - Method in class javax.swing.text.WrappedPlainView
Determines the maximum span for this view along an axis.
getMaximumSpan(int) - Method in class javax.swing.text.html.ParagraphView
Determines the maximum span for this view along an axis.
getMaximumThumbSize() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
Return the largest acceptable size for the thumb.
getMaximumZoneSize() - Method in class javax.swing.text.ZoneView
Get the current maximum zone size.
getMaxIndexLength() - Method in interface java.sql.DatabaseMetaData
Retrieves the maximum number of bytes for an index, including all of the parts of the index.
getMaxLabel() - Method in class javax.sound.sampled.FloatControl
Obtains the label for the maximum value, such as "Right" or "Full."
getMaxLines(Line.Info) - Method in interface javax.sound.sampled.Mixer
Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer.
getMaxPage() - Method in class java.awt.JobAttributes
Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes.
getMaxPolyphony() - Method in interface javax.sound.midi.Synthesizer
Obtains the maximum number of notes that this synthesizer can sound simultaneously.
getMaxPriority() - Method in class java.lang.ThreadGroup
Returns the maximum priority of this thread group.
getMaxProcedureNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of a procedure name?
getMaxReceivers() - Method in interface javax.sound.midi.MidiDevice
Obtains the maximum number of MIDI IN connections available on this MIDI device for receiving MIDI data.
getMaxRows() - Method in interface java.sql.Statement
Retrieves the maximum number of rows that a ResultSet object can contain.
getMaxRowSize() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of a single row?
getMaxSchemaNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length allowed for a schema name?
getMaxSelectionIndex() - Method in class javax.swing.DefaultListSelectionModel

getMaxSelectionIndex() - Method in class javax.swing.JList
Returns the largest selected cell index.
getMaxSelectionIndex() - Method in interface javax.swing.ListSelectionModel
Returns the last selected index or -1 if the selection is empty.
getMaxSelectionRow() - Method in class javax.swing.JTree
Returns the last selected row.
getMaxSelectionRow() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
getMaxSelectionRow() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
getMaxStatementLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of an SQL statement?
getMaxStatements() - Method in interface java.sql.DatabaseMetaData
How many active statements can we have open at one time to this database?
getMaxTableNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of a table name?
getMaxTablesInSelect() - Method in interface java.sql.DatabaseMetaData
What's the maximum number of tables in a SELECT statement?
getMaxTransmitters() - Method in interface javax.sound.midi.MidiDevice
Obtains the maximum number of MIDI OUT connections available on this MIDI device for transmitting MIDI data.
getMaxUserNameLength() - Method in interface java.sql.DatabaseMetaData
What's the maximum length of a user name?
getMaxWidth() - Method in class javax.swing.table.TableColumn
Returns the maximum width for the TableColumn.
getMaxX() - Method in class java.awt.geom.RectangularShape
Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
getMaxY() - Method in class java.awt.geom.RectangularShape
Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
getMaxZonesLoaded() - Method in class javax.swing.text.ZoneView
Get the current setting of the number of zones allowed to be loaded at the same time.
getMedia() - Method in class java.awt.PageAttributes
Returns the paper size for pages using these attributes.
getMediaWhitePoint() - Method in class java.awt.color.ICC_ProfileGray
Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.
getMediaWhitePoint() - Method in class java.awt.color.ICC_ProfileRGB
Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.
getMemberControls() - Method in class javax.sound.sampled.CompoundControl
Returns the set of member controls that comprise the compound control.
getMenu(int) - Method in class java.awt.MenuBar
Gets the specified menu.
getMenu(int) - Method in class javax.swing.JMenuBar
Returns the menu at the specified position in the menu bar.
getMenuArrowIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory

getMenuArrowIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getMenuBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuBar() - Method in class java.awt.Frame
Gets the menu bar for this frame.
getMenuBar() - Method in class javax.swing.JInternalFrame
Deprecated. As of Swing version 1.0.3, replaced by getJMenuBar().
getMenuBar() - Method in class javax.swing.JRootPane
Deprecated. As of Swing version 1.0.3 replaced by getJMenubar().
getMenuBarBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getMenuComponent(int) - Method in class javax.swing.JMenu
Returns the component at position n.
getMenuComponentCount() - Method in class javax.swing.JMenu
Returns the number of components on the menu.
getMenuComponents() - Method in class javax.swing.JMenu
Returns an array of Components of the menu's subcomponents.
getMenuCount() - Method in class java.awt.MenuBar
Gets the number of menus on the menu bar.
getMenuCount() - Method in class javax.swing.JMenuBar
Returns the number of items in the menu bar.
getMenuDisabledForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuDisabledForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuItemArrowIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory

getMenuItemArrowIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getMenuItemCheckIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory

getMenuItemCheckIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getMenuSelectedBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuSelectedBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuSelectedForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuSelectedForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuSelectionManager() - Method in class javax.swing.event.MenuKeyEvent
Returns the current menu selection manager.
getMenuSelectionManager() - Method in class javax.swing.event.MenuDragMouseEvent
Returns the current menu selection manager.
getMenuShortcutKeyMask() - Method in class java.awt.Toolkit
Determines which modifier key is the appropriate accelerator key for menu shortcuts.
getMenuTextFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getMenuTextFont() - Method in class javax.swing.plaf.metal.MetalTheme

getMenuTextFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getMessage() - Method in class java.io.InvalidClassException
Produce the message and include the classname, if present.
getMessage() - Method in class java.io.WriteAbortedException
Produce the message and include the message from the nested exception, if there is one.
getMessage() - Method in class java.lang.Throwable
Returns the error message string of this throwable object.
getMessage() - Method in class java.rmi.RemoteException
Returns the detail message, including the message from the nested exception if there is one.
getMessage() - Method in class java.rmi.activation.ActivationException
Produces the message, include the message from the nested exception if there is one.
getMessage() - Method in class java.rmi.server.ServerCloneException
Obtains the message, include the message from the nested exception if there is one.
getMessage() - Method in class javax.sound.midi.MidiMessage
Obtains the MIDI message data.
getMessage() - Method in class javax.sound.midi.MidiEvent
Obtains the MIDI message contained in the event.
getMessage() - Method in class javax.swing.JOptionPane
Returns the message-object this pane displays.
getMessage() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the message to display from the JOptionPane the receiver is providing the look and feel for.
getMessageDigest() - Method in class java.security.DigestOutputStream
Returns the message digest associated with this stream.
getMessageDigest() - Method in class java.security.DigestInputStream
Returns the message digest associated with this stream.
getMessageType() - Method in class javax.swing.JOptionPane
Returns the message type.
getMetaData() - Method in interface java.sql.PreparedStatement
Gets the number, types and properties of a ResultSet object's columns.
getMetaData() - Method in interface java.sql.Connection
Gets the metadata regarding this connection's database.
getMetaData() - Method in interface java.sql.ResultSet
Retrieves the number, types and properties of this ResultSet object's columns.
getMethod() - Method in class java.beans.MethodDescriptor
Gets the method that this MethodDescriptor encapsualtes.
getMethod() - Method in class java.util.zip.ZipEntry
Returns the compression method of the entry, or -1 if not specified.
getMethod(String, Class[]) - Method in class java.lang.Class
Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
getMethodDescriptors() - Method in interface java.beans.BeanInfo
Gets the beans MethodDescriptors.
getMethodDescriptors() - Method in class java.beans.SimpleBeanInfo
Deny knowledge of methods.
getMethods() - Method in class java.lang.Class
Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces.
getMicrosecondLength() - Method in interface javax.sound.sampled.Clip
Obtains the media duration in microseconds
getMicrosecondLength() - Method in class javax.sound.midi.Sequence
Obtains the duration of this sequence, expressed in microseconds.
getMicrosecondLength() - Method in class javax.sound.midi.MidiFileFormat
Obtains the length of the MIDI file, expressed in microseconds.
getMicrosecondLength() - Method in interface javax.sound.midi.Sequencer
Obtains the length of the current sequence, expressed in microseconds.
getMicrosecondPosition() - Method in interface javax.sound.sampled.DataLine
Obtains the current position in the audio data, in microseconds.
getMicrosecondPosition() - Method in interface javax.sound.midi.MidiDevice
Obtains the current time-stamp of the device, in microseconds.
getMicrosecondPosition() - Method in interface javax.sound.midi.Sequencer
Obtains the current position in the sequence, expressed in microseconds.
getMidiDevice(MidiDevice.Info) - Static method in class javax.sound.midi.MidiSystem
Obtains the requested MIDI device.
getMidiDeviceInfo() - Static method in class javax.sound.midi.MidiSystem
Obtains an array of information objects representing the set of all MIDI devices available on the system.
getMidiFileFormat(File) - Static method in class javax.sound.midi.MidiSystem
Obtains the MIDI file format of the specified File.
getMidiFileFormat(File) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains the MIDI file format of the File provided.
getMidiFileFormat(InputStream) - Static method in class javax.sound.midi.MidiSystem
Obtains the MIDI file format of the data in the specified input stream.
getMidiFileFormat(InputStream) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains the MIDI file format of the input stream provided.
getMidiFileFormat(URL) - Static method in class javax.sound.midi.MidiSystem
Obtains the MIDI file format of the data in the specified URL.
getMidiFileFormat(URL) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains the MIDI file format of the URL provided.
getMidiFileTypes() - Static method in class javax.sound.midi.MidiSystem
Obtains the set of MIDI file types for which file writing support is provided by the system.
getMidiFileTypes() - Method in class javax.sound.midi.spi.MidiFileWriter
Obtains the set of MIDI file types for which file writing support is provided by this file writer.
getMidiFileTypes(Sequence) - Static method in class javax.sound.midi.MidiSystem
Obtains the set of MIDI file types that the system can write from the sequence specified.
getMidiFileTypes(Sequence) - Method in class javax.sound.midi.spi.MidiFileWriter
Obtains the file types that this file writer can write from the sequence specified.
getMidLabel() - Method in class javax.sound.sampled.FloatControl
Obtains the label for the mid-point value, such as "Center" or "Default."
getMillisToDecideToPopup() - Method in class javax.swing.ProgressMonitor
Returns the amount of time this object waits before deciding whether or not to popup a progress monitor.
getMillisToPopup() - Method in class javax.swing.ProgressMonitor
Returns the amount of time it will take for the popup to appear.
getMimeType() - Method in class java.awt.datatransfer.DataFlavor
Returns the MIME type string for this DataFlavor
getMinBufferSize() - Method in class javax.sound.sampled.DataLine.Info
Obtains the minimum buffer size supported by the data line.
getMinimalDaysInFirstWeek() - Method in class java.util.Calendar
Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, getMinimalDaysInFirstWeek returns 1.
getMinimum() - Method in class java.awt.Scrollbar
Gets the minimum value of this scroll bar.
getMinimum() - Method in interface java.awt.Adjustable
Gets the minimum value of the adjustable object.
getMinimum() - Method in class javax.sound.sampled.FloatControl
Obtains the minimum value permitted.
getMinimum() - Method in class javax.swing.DefaultBoundedRangeModel
Return the model's minimum.
getMinimum() - Method in class javax.swing.ProgressMonitor
Returns the minimum value -- the lower end of the progress value.
getMinimum() - Method in interface javax.swing.BoundedRangeModel
Returns the minimum acceptable value.
getMinimum() - Method in class javax.swing.JScrollBar
Returns the minimum value supported by the scrollbar (usually zero).
getMinimum() - Method in class javax.swing.JProgressBar
Returns the model's minimum value.
getMinimum() - Method in class javax.swing.JSlider
Returns the minimum value supported by the slider.
getMinimum(int) - Method in class java.util.Calendar
Gets the minimum value for the given time field.
getMinimum(int) - Method in class java.util.GregorianCalendar
Returns minimum value for the given field.
getMinimumAccessibleValue() - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Get the minimum accessible value of this object.
getMinimumAccessibleValue() - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class java.awt.Button.AccessibleAWTButton
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in interface javax.accessibility.AccessibleValue
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Get the minimum value of this object as a Number.
getMinimumAccessibleValue() - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Gets the minimum accessible value of this object.
getMinimumAccessibleValue() - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Get the minimum accessible value of this object.
getMinimumAccessibleValue() - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Get the minimum accessible value of this object.
getMinimumAccessibleValue() - Method in class javax.swing.JSlider.AccessibleJSlider
Get the minimum accessible value of this object.
getMinimumDividerLocation() - Method in class javax.swing.JSplitPane
Returns the minimum location of the divider from the look and feel implementation.
getMinimumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.SplitPaneUI
Returns the minimum possible location of the divider.
getMinimumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Gets the minimum location of the divider.
getMinimumDividerLocation(JSplitPane) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getMinimumDividerLocation on each UI handled by this MultiUI.
getMinimumFractionDigits() - Method in class java.text.NumberFormat
Returns the minimum number of digits allowed in the fraction portion of a number.
getMinimumHorizontalSize() - Method in class javax.swing.plaf.basic.BasicSliderUI

getMinimumIntegerDigits() - Method in class java.text.NumberFormat
Returns the minimum number of digits allowed in the integer portion of a number.
getMinimumOptionPaneSize() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns the minimum size the option pane should be.
getMinimumSize() - Method in class java.awt.Component
Gets the mininimum size of this component.
getMinimumSize() - Method in class java.awt.Container
Returns the minimum size of this container.
getMinimumSize() - Method in class java.awt.List
Determines the minimum size of this scrolling list.
getMinimumSize() - Method in class java.awt.TextField
Gets the minumum dimensions for this text field.
getMinimumSize() - Method in class java.awt.TextArea
Determines the minimum size of this text area.
getMinimumSize() - Method in class javax.swing.JComponent
If the minimum size has been set to a non-null value just returns it.
getMinimumSize() - Method in class javax.swing.JToolBar.Separator
Returns the minimum size for the separator.
getMinimumSize() - Method in class javax.swing.Box.Filler
Returns the minimum size of the component.
getMinimumSize() - Method in class javax.swing.JScrollBar
The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
getMinimumSize() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Returns dividerSize x dividerSize
getMinimumSize() - Method in class javax.swing.plaf.basic.BasicArrowButton

getMinimumSize() - Method in class javax.swing.plaf.metal.MetalScrollButton

getMinimumSize(Component) - Method in class javax.swing.border.TitledBorder
Returns the minimum dimensions this border requires in order to fully display the border and title.
getMinimumSize(int) - Method in class java.awt.List
Gets the minumum dimensions for a list with the specified number of rows.
getMinimumSize(int) - Method in class java.awt.TextField
Gets the minumum dimensions for a text field with the specified number of columns.
getMinimumSize(int, int) - Method in class java.awt.TextArea
Determines the minimum size of a text area with the specified number of rows and columns.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.ComponentUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Gets the minimum size for the editor component.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
The Minimum size for this component is 10.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Messages getPreferredSize.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
Return the minimum size of the table.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
A vertical scrollbars minimum width is the largest minimum width of the (non null) increment/decrement buttons, and the minimum width of the thumb.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicListUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Return the minimum size of the header.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuBarUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the minimum size for this component.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI

getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call getMinimumSize on each UI handled by this MultiUI.
getMinimumSpan(int) - Method in class javax.swing.text.View
Determines the minimum span for this view along an axis.
getMinimumSpan(int) - Method in class javax.swing.text.BoxView
Determines the minimum span for this view along an axis.
getMinimumSpan(int) - Method in class javax.swing.text.AsyncBoxView
Determines the minimum span for this view along an axis.
getMinimumSpan(int) - Method in class javax.swing.text.ComponentView
Determines the minimum span for this view along an axis.
getMinimumSpan(int) - Method in class javax.swing.text.WrappedPlainView
Determines the minimum span for this view along an axis.
getMinimumSpan(int) - Method in class javax.swing.text.html.ParagraphView
Determines the minimum span for this view along an axis.
getMinimumThumbSize() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
Return the smallest acceptable size for the thumb.
getMinimumThumbSize() - Method in class javax.swing.plaf.metal.MetalScrollBarUI

getMinimumVerticalSize() - Method in class javax.swing.plaf.basic.BasicSliderUI

getMinLabel() - Method in class javax.sound.sampled.FloatControl
Obtains the label for the minimum value, such as "Left" or "Off."
getMinorAxis() - Method in class javax.swing.text.AsyncBoxView
Fetch the minor axis (the axis orthoginal to the tiled axis).
getMinorOffset() - Method in class javax.swing.text.AsyncBoxView.ChildState
What is the offset along the minor axis
getMinorSpan() - Method in class javax.swing.text.AsyncBoxView.ChildState
What is the span along the minor axis.
getMinorTickSpacing() - Method in class javax.swing.JSlider
This method returns the minor tick spacing.
getMinorVersion() - Method in class java.awt.color.ICC_Profile
Returns profile minor version.
getMinorVersion() - Method in interface java.sql.Driver
Gets the driver's minor version number.
getMinPage() - Method in class java.awt.JobAttributes
Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes.
getMinSelectionIndex() - Method in class javax.swing.DefaultListSelectionModel

getMinSelectionIndex() - Method in class javax.swing.JList
Returns the smallest selected cell index.
getMinSelectionIndex() - Method in interface javax.swing.ListSelectionModel
Returns the first selected index or -1 if the selection is empty.
getMinSelectionRow() - Method in class javax.swing.JTree
Gets the first selected row.
getMinSelectionRow() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
getMinSelectionRow() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
GetMinSize(Container, GridBagLayoutInfo) - Method in class java.awt.GridBagLayout

getMinTileX() - Method in interface java.awt.image.RenderedImage
Returns the minimum tile index in the X direction.
getMinTileX() - Method in class java.awt.image.BufferedImage
Returns the minimum tile index in the x direction.
getMinTileY() - Method in interface java.awt.image.RenderedImage
Returns the minimum tile index in the Y direction.
getMinTileY() - Method in class java.awt.image.BufferedImage
Returns the minimum tile index in the y direction.
getMinusSign() - Method in class java.text.DecimalFormatSymbols
Gets the character used to represent minus sign.
getMinutes() - Method in class java.sql.Date
Deprecated.
getMinutes() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MINUTE).
getMinWidth() - Method in class javax.swing.table.TableColumn
Returns the minimum width for the TableColumn.
getMinX() - Method in class java.awt.geom.RectangularShape
Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
getMinX() - Method in interface java.awt.image.RenderedImage
Returns the minimum X coordinate (inclusive) of the RenderedImage.
getMinX() - Method in class java.awt.image.BufferedImage
Returns the minimum x coordinate of this BufferedImage.
getMinX() - Method in class java.awt.image.Raster
Returns the minimum valid X coordinate of the Raster.
getMinX() - Method in class java.awt.image.renderable.RenderableImageOp
Gets the minimum X coordinate of the rendering-independent image data.
getMinX() - Method in interface java.awt.image.renderable.RenderableImage
Gets the minimum X coordinate of the rendering-independent image data.
getMinY() - Method in class java.awt.geom.RectangularShape
Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
getMinY() - Method in interface java.awt.image.RenderedImage
Returns the minimum Y coordinate (inclusive) of the RenderedImage.
getMinY() - Method in class java.awt.image.BufferedImage
Returns the minimum y coordinate of this BufferedImage.
getMinY() - Method in class java.awt.image.Raster
Returns the minimum valid Y coordinate of the Raster.
getMinY() - Method in class java.awt.image.renderable.RenderableImageOp
Gets the minimum Y coordinate of the rendering-independent image data.
getMinY() - Method in interface java.awt.image.renderable.RenderableImage
Gets the minimum Y coordinate of the rendering-independent image data.
getMissingGlyphCode() - Method in class java.awt.Font
Returns the glyphCode which is used when this Font does not have a glyph for a specified unicode.
getMiterLimit() - Method in class java.awt.BasicStroke
Returns the limit of miter joins.
getMixer(Mixer.Info) - Static method in class javax.sound.sampled.AudioSystem
Obtains the requested audio mixer.
getMixer(Mixer.Info) - Method in class javax.sound.sampled.spi.MixerProvider
Obtains an instance of the mixer represented by the info object.
getMixerInfo() - Method in interface javax.sound.sampled.Mixer
Obtains information about this mixer, including the product's name, version, vendor, etc.
getMixerInfo() - Static method in class javax.sound.sampled.AudioSystem
Obtains an array of mixer info objects that represents the set of audio mixers that are currently installed on the system.
getMixerInfo() - Method in class javax.sound.sampled.spi.MixerProvider
Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.
getMnemonic() - Method in class javax.swing.AbstractButton
Returns the keyboard mnemonic from the the current model.
getMnemonic() - Method in interface javax.swing.ButtonModel
Gets the keyboard mnemonic for this model
getMnemonic() - Method in class javax.swing.DefaultButtonModel
Gets the keyboard mnemonic for this model
getMode() - Method in class java.awt.FileDialog
Indicates whether this file dialog box is for loading from a file or for saving to a file.
getModel() - Method in class javax.swing.JTabbedPane
Returns the model associated with this tabbedpane.
getModel() - Method in class javax.swing.AbstractButton
Returns the model that this button represents.
getModel() - Method in class javax.swing.JComboBox
Returns the data model currently used by the JComboBox.
getModel() - Method in class javax.swing.JList
Returns the data model that holds the list of items displayed by the JList component.
getModel() - Method in class javax.swing.JTree
Returns the TreeModel that is providing the data.
getModel() - Method in class javax.swing.JTable
Returns the TableModel that provides the data displayed by this JTable.
getModel() - Method in class javax.swing.JScrollBar
Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
getModel() - Method in class javax.swing.JProgressBar
Returns the data model used by the JProgressBar.
getModel() - Method in class javax.swing.JSlider
Returns data model that handles the sliders three fundamental properties: minimum, maximum, value.
getModel() - Method in class javax.swing.tree.AbstractLayoutCache
Returns the TreeModel that is providing the data.
getModel() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getModel() - Method in class javax.swing.plaf.basic.BasicTreeUI

getModelIndex() - Method in class javax.swing.table.TableColumn
Returns the model index for this column.
getModificationOp() - Method in class javax.naming.directory.ModificationItem
Retrieves the modification code of this modification item.
getModifier() - Method in class javax.swing.text.html.parser.AttributeList

getModifiers() - Method in class java.awt.event.ActionEvent
Returns the modifier keys held down during this action event.
getModifiers() - Method in class java.awt.event.InputEvent
Returns the modifiers flag for this event.
getModifiers() - Method in class java.lang.Class
Returns the Java language modifiers for this class or interface, encoded in an integer.
getModifiers() - Method in interface java.lang.reflect.Member
Returns the Java language modifiers for the member or constructor represented by this Member, as an integer.
getModifiers() - Method in class java.lang.reflect.Method
Returns the Java language modifiers for the method represented by this Method object, as an integer.
getModifiers() - Method in class java.lang.reflect.Field
Returns the Java language modifiers for the field represented by this Field object, as an integer.
getModifiers() - Method in class java.lang.reflect.Constructor
Returns the Java language modifiers for the constructor represented by this Constructor object, as an integer.
getModifiers() - Method in class javax.swing.KeyStroke
Returns the modifier keys defined by this KeyStroke object.
getModulus() - Method in interface java.security.interfaces.RSAKey
Returns the modulus.
getModulus() - Method in class java.security.spec.RSAPrivateKeySpec
Returns the modulus.
getModulus() - Method in class java.security.spec.RSAPublicKeySpec
Returns the modulus.
getMonetaryDecimalSeparator() - Method in class java.text.DecimalFormatSymbols
Return the monetary decimal separator.
getMono() - Method in interface javax.sound.midi.MidiChannel
Obtains the current mono/poly mode.
getMonth() - Method in class java.sql.Time
Deprecated.
getMonth() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MONTH).
getMonths() - Method in class java.text.DateFormatSymbols
Gets month strings.
getMoreResults() - Method in interface java.sql.Statement
Moves to a Statement object's next result.
getMouseListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.getMouseListener().
getMouseListener() - Method in interface javax.swing.plaf.basic.ComboPopup
Returns a mouse listener that shows and hides the popup.
getMouseMotionListener() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.getMouseMotionListener().
getMouseMotionListener() - Method in interface javax.swing.plaf.basic.ComboPopup
Returns a mouse motion listener that makes the popup act like a menu.
getMultipleDocumentHandling() - Method in class java.awt.JobAttributes
Specifies the handling of multiple documents, including collation, for jobs using these attributes.
getMultiplier() - Method in class java.text.DecimalFormat
Get the multiplier for use in percent, permill, etc.
getMute() - Method in interface javax.sound.midi.MidiChannel
Obtains the current mute state for this channel.
getName() - Method in class java.awt.Component
Gets the name of the component.
getName() - Method in class java.awt.MenuComponent
Gets the name of the menu component.
getName() - Method in class java.awt.Font
Returns the logical name of this Font.
getName() - Method in class java.awt.Cursor
Returns the name of this cursor.
getName() - Method in class java.awt.datatransfer.Clipboard
Returns the name of this clipboard object.
getName() - Method in class java.beans.FeatureDescriptor
Gets the programmatic name of this feature.
getName() - Method in class java.io.File
Returns the name of the file or directory denoted by this abstract pathname.
getName() - Method in class java.io.ObjectStreamClass
The name of the class described by this descriptor.
getName() - Method in class java.io.ObjectStreamField
Get the name of this field.
getName() - Method in class java.lang.ThreadGroup
Returns the name of this thread group.
getName() - Method in class java.lang.Thread
Returns this thread's name.
getName() - Method in class java.lang.Package
Return the name of this package.
getName() - Method in class java.lang.Class
Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.
getName() - Method in interface java.lang.reflect.Member
Returns the simple name of the underlying member or constructor represented by this Member.
getName() - Method in class java.lang.reflect.Method
Returns the name of the method represented by this Method object, as a String.
getName() - Method in class java.lang.reflect.Field
Returns the name of the field represented by this Field object.
getName() - Method in class java.lang.reflect.Constructor
Returns the name of this constructor, as a string.
getName() - Method in class java.security.Permission
Returns the name of this Permission.
getName() - Method in class java.security.Provider
Returns the name of this provider.
getName() - Method in class java.security.Identity
Deprecated. Returns this identity's name.
getName() - Method in interface java.security.Principal
Returns the name of this principal.
getName() - Method in interface java.security.acl.Acl
Returns the name of this ACL.
getName() - Method in class java.text.AttributedCharacterIterator.Attribute
Returns the name of the attribute.
getName() - Method in class java.util.zip.ZipFile
Returns the path name of the ZIP file.
getName() - Method in class java.util.zip.ZipEntry
Returns the name of the entry.
getName() - Method in class javax.sound.sampled.Mixer.Info
Obtains the name of the mixer.
getName() - Method in class javax.sound.sampled.Port.Info
Obtains the name of the port.
getName() - Method in class javax.sound.midi.SoundbankResource
Obtains the name of the resource.
getName() - Method in interface javax.sound.midi.Soundbank
Obtains the name of the sound bank.
getName() - Method in class javax.sound.midi.MidiDevice.Info
Obtains the name of the device.
getName() - Method in class javax.naming.NameClassPair
Retrieves the name of this binding.
getName() - Method in class javax.swing.LookAndFeel
Return a short string that identifies this look and feel, e.g.
getName() - Method in class javax.swing.UIManager.LookAndFeelInfo
Returns the name of the look and feel in a form suitable for a menu or other presentation
getName() - Method in interface javax.swing.text.Keymap
Fetches the name of the set of key-bindings.
getName() - Method in interface javax.swing.text.Element
Fetches the name of the element.
getName() - Method in interface javax.swing.text.Style
Fetches the name of the style.
getName() - Method in class javax.swing.text.StyleContext.NamedStyle
Fetches the name of the style.
getName() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the name of the element.
getName() - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the element name.
getName() - Method in class javax.swing.text.AbstractDocument.LeafElement
Gets the element name.
getName() - Method in class javax.swing.text.DefaultStyledDocument.SectionElement
Gets the name of the element.
getName() - Method in class javax.swing.text.html.HTMLDocument.RunElement
Gets the name of the element.
getName() - Method in class javax.swing.text.html.HTMLDocument.BlockElement
Gets the name of the element.
getName() - Method in class javax.swing.text.html.parser.AttributeList

getName() - Method in class javax.swing.text.html.parser.DTD
Get the name of the DTD.
getName() - Method in class javax.swing.text.html.parser.Element
Get the name of the element.
getName() - Method in class javax.swing.text.html.parser.Entity
Get the name of the entity.
getName() - Method in class javax.swing.plaf.metal.MetalLookAndFeel

getName() - Method in class javax.swing.plaf.metal.MetalTheme

getName() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getName() - Method in class javax.swing.plaf.multi.MultiLookAndFeel

getName(File) - Method in class javax.swing.JFileChooser
Returns the filename.
getName(File) - Method in class javax.swing.filechooser.FileView
The name of the file.
getName(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

getName(int) - Method in class java.awt.color.ColorSpace
Returns the name of the component given the component index
getNameInNamespace() - Method in class javax.naming.InitialContext

getNameInNamespace() - Method in interface javax.naming.Context
Retrieves the full name of this context within its own namespace.
getNameParser(Name) - Method in class javax.naming.InitialContext

getNameParser(Name) - Method in interface javax.naming.Context
Retrieves the parser associated with the named context.
getNameParser(String) - Method in class javax.naming.InitialContext

getNameParser(String) - Method in interface javax.naming.Context
Retrieves the parser associated with the named context.
getNaN() - Method in class java.text.DecimalFormatSymbols
Gets the character used to represent NaN.
getNanos() - Method in class java.sql.Timestamp
Gets this Timestamp object's nanos value.
getNativeContainer(Component) - Static method in class java.awt.Toolkit
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
getNativesForFlavors(DataFlavor[]) - Method in class java.awt.datatransfer.SystemFlavorMap
map flavors to native data types names
getNativesForFlavors(DataFlavor[]) - Method in interface java.awt.datatransfer.FlavorMap
map flavors to native data types names
getNeededLocation(int, int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Returns the x argument, since this is used for horizontal splits.
getNeededLocation(int, int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
Returns the y argument, since this is used for vertical splits.
getNegativePrefix() - Method in class java.text.DecimalFormat
Get the negative prefix.
getNegativeSuffix() - Method in class java.text.DecimalFormat
Get the negative suffix.
getNewBinding() - Method in class javax.naming.event.NamingEvent
Retrieves the binding of the object after the change.
getNewFolderAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getNewLeadSelectionPath() - Method in class javax.swing.event.TreeSelectionEvent
Returns the current lead path.
getNewValue() - Method in class java.beans.PropertyChangeEvent
Sets the new value for the property, expressed as an Object.
getNext() - Method in class javax.swing.text.html.parser.AttributeList

getNextEastWestVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.CompositeView
Returns the next visual position for the cursor, in either the east or west direction.
getNextEntry() - Method in class java.util.jar.JarInputStream
Reads the next ZIP file entry and positions stream at the beginning of the entry data.
getNextEntry() - Method in class java.util.zip.ZipInputStream
Reads the next ZIP file entry and positions stream at the beginning of the entry data.
getNextEvent() - Method in class java.awt.EventQueue
Remove an event from the EventQueue and return it.
getNextException() - Method in class java.sql.SQLException
Retrieves the exception chained to this SQLException object.
getNextFocusableComponent() - Method in class javax.swing.JComponent
Returns the next focusable component or null if the focus manager should choose the next focusable component automatically.
getNextJarEntry() - Method in class java.util.jar.JarInputStream
Reads the next JAR file entry and positions the stream at the beginning of the entry data.
getNextLeaf() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the leaf after this node or null if this node is the last leaf in the tree.
getNextLeftHit(int) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the left (top); if no such hit, returns null.
getNextLeftHit(int, TextLayout.CaretPolicy) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the left (top); if no such hit, returns null.
getNextLeftHit(TextHitInfo) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the left (top); if no such hit, returns null.
getNextNode() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the node that follows this node in a preorder traversal of this node's tree.
getNextNorthSouthVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.CompositeView
Returns the next visual position for the cursor, in either the east or west direction.
getNextNorthSouthVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.ParagraphView
Overriden from CompositeView.
getNextRightHit(int) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
getNextRightHit(int, TextLayout.CaretPolicy) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
getNextRightHit(TextHitInfo) - Method in class java.awt.font.TextLayout
Returns the hit for the next caret to the right (bottom); if there is no such hit, returns null.
getNextSibling() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the next sibling of this node in the parent's children array.
getNextTabIndex(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getNextUpdate() - Method in class java.security.cert.X509CRL
Gets the nextUpdate date from the CRL.
getNextVisualPositionFrom(GlyphView, int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.GlyphView.GlyphPainter
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.View
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.CompositeView
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(int, Position.Bias, Shape, int, Position.Bias[]) - Method in class javax.swing.text.GlyphView
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(JTextComponent, int, Position.Bias, int, Position.Bias[]) - Method in class javax.swing.plaf.TextUI
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(JTextComponent, int, Position.Bias, int, Position.Bias[]) - Method in class javax.swing.plaf.basic.BasicTextUI
Provides a way to determine the next visually represented model location that one might place a caret.
getNextVisualPositionFrom(JTextComponent, int, Position.Bias, int, Position.Bias[]) - Method in class javax.swing.plaf.multi.MultiTextUI
Provides a way to determine the next visually represented model location that one might place a caret.
getNextWarning() - Method in class java.sql.SQLWarning
Retrieves the warning chained to this SQLWarning object.
getNextWord(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the start of the next word for the given location.
getNodeDimensions() - Method in class javax.swing.tree.AbstractLayoutCache
Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
getNodeDimensions(Object, int, int, boolean, Rectangle) - Method in class javax.swing.tree.AbstractLayoutCache
Returns, by reference in size, the size needed to reprensent value.
getNodeDimensions(Object, int, int, boolean, Rectangle) - Method in class javax.swing.tree.AbstractLayoutCache.NodeDimensions
Returns, by reference in bounds, the size and x origin to place value at.
getNodeDimensions(Object, int, int, boolean, Rectangle) - Method in class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
Responsible for getting the size of a particular node.
getNonContinuousLayoutDivider() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the divider to use when the splitPane is configured to not continuously layout.
getNonCriticalExtensionOIDs() - Method in interface java.security.cert.X509Extension
Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.
getNormalBounds() - Method in class javax.swing.JInternalFrame
If the JInternalFrame is not in maximized state, return getBounds(); otherwise, return the bounds that the JInternalFrame would be restored to.
getNormalizedComponents(int[], int, float[], int) - Method in class java.awt.image.ColorModel
Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array.
getNormalizingTransform() - Method in class java.awt.GraphicsConfiguration
Returns a AffineTransform that can be concatenated with the default AffineTransform of a GraphicsConfiguration so that 72 units in user space equals 1 inch in device space.
getNorthPane() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getNotAfter() - Method in class java.security.cert.X509Certificate
Gets the notAfter date from the validity period of the certificate.
getNotBefore() - Method in class java.security.cert.X509Certificate
Gets the notBefore date from the validity period of the certificate.
getNote() - Method in class javax.swing.ProgressMonitor
Specifies the additional note that is displayed along with the progress message.
getNotification() - Method in class javax.naming.ldap.UnsolicitedNotificationEvent
Returns the unsolicited notification.
getNumBands() - Method in class java.awt.image.SampleModel
Returns the total number of bands of image data.
getNumBands() - Method in class java.awt.image.Raster
Returns the number of bands (samples per pixel) in this Raster.
getNumBanks() - Method in class java.awt.image.DataBuffer
Returns the number of banks in this DataBuffer.
getNumberFormat() - Method in class java.text.DateFormat
Gets the number formatter which this date/time formatter uses to format and parse a time.
getNumberInstance() - Static method in class java.text.NumberFormat
Returns a general-purpose number format for the current default locale.
getNumberInstance(Locale) - Static method in class java.text.NumberFormat
Returns a general-purpose number format for the specified locale.
getNumberOfPages() - Method in class java.awt.print.Book
Returns the number of pages in this Book.
getNumberOfPages() - Method in interface java.awt.print.Pageable
Returns the number of pages in the set.
getNumChars() - Method in class java.awt.font.LineMetrics
Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics object.
getNumColorComponents() - Method in class java.awt.image.ColorModel
Returns the number of color components in this ColorModel.
getNumComponents() - Method in class java.awt.color.ICC_Profile
Returns the number of color components in the "input" color space of this profile.
getNumComponents() - Method in class java.awt.color.ColorSpace
Returns the number of components of this ColorSpace.
getNumComponents() - Method in class java.awt.image.LookupTable
Returns the number of components in the lookup table.
getNumComponents() - Method in class java.awt.image.ColorModel
Returns the number of components, including alpha, in this ColorModel.
getNumDataElements() - Method in class java.awt.image.SampleModel
Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods.
getNumDataElements() - Method in class java.awt.image.ComponentSampleModel
Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods.
getNumDataElements() - Method in class java.awt.image.Raster
Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.
getNumDataElements() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the number of data elements needed to transfer one pixel via the MultiPixelPackedSampleModel.getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) and MultiPixelPackedSampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) methods.
getNumDataElements() - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.
getNumDesignAxes() - Method in interface java.awt.font.MultipleMaster
Returns the number of multiple master design controls.
getNumericFunctions() - Method in interface java.sql.DatabaseMetaData
Gets a comma-separated list of math functions.
getNumericValue(char) - Static method in class java.lang.Character
Returns the Unicode numeric value of the character as a nonnegative integer.
getNumFactors() - Method in class java.awt.image.RescaleOp
Returns the number of scaling factors and offsets used in this RescaleOp.
getNumGlyphs() - Method in class java.awt.Font
Returns the number of glyphs in this Font.
getNumGlyphs() - Method in class java.awt.font.GlyphVector
Returns the number of glyphs in this GlyphVector.
getNumParameters() - Method in class java.awt.image.renderable.ParameterBlock
Returns the number of parameters (not including source images).
getNumSources() - Method in class java.awt.image.renderable.ParameterBlock
Returns the number of source images.
getNumXTiles() - Method in interface java.awt.image.RenderedImage
Returns the number of tiles in the X direction.
getNumXTiles() - Method in class java.awt.image.BufferedImage
Returns the number of tiles in the x direction.
getNumYTiles() - Method in interface java.awt.image.RenderedImage
Returns the number of tiles in the Y direction.
getNumYTiles() - Method in class java.awt.image.BufferedImage
Returns the number of tiles in the y direction.
getObject() - Method in class java.security.GuardedObject
Retrieves the guarded object, or throws an exception if access to the guarded object is denied by the guard.
getObject() - Method in class java.security.SignedObject
Retrieves the encapsulated object.
getObject() - Method in class javax.naming.Binding
Retrieves the object bound to the name of this binding.
getObject() - Method in class javax.naming.spi.DirStateFactory.Result
Retrieves the object to be bound.
getObject(int) - Method in interface java.sql.CallableStatement
Gets the value of a parameter as an Object in the Java programming language.
getObject(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
getObject(int, Map) - Method in interface java.sql.CallableStatement
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
getObject(int, Map) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
getObject(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
getObject(String) - Method in class java.util.ResourceBundle
Get an object from a ResourceBundle.
getObject(String, Map) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
getObjectForLayer(int) - Method in class javax.swing.JLayeredPane
Returns the Integer object associated with a specified layer.
getObjectInstance(Object, Name, Context, Hashtable) - Method in interface javax.naming.spi.ObjectFactory
Creates an object using the location or reference information specified.
getObjectInstance(Object, Name, Context, Hashtable) - Static method in class javax.naming.spi.NamingManager
Creates an instance of an object for the specified object and environment.
getObjectInstance(Object, Name, Context, Hashtable, Attributes) - Static method in class javax.naming.spi.DirectoryManager
Creates an instance of an object for the specified object, attributes, and environment.
getObjectInstance(Object, Name, Context, Hashtable, Attributes) - Method in interface javax.naming.spi.DirObjectFactory
Creates an object using the location or reference information, and attributes specified.
getObjectParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
Gets a parameter as an object.
getObjectStreamClass() - Method in class java.io.ObjectInputStream.GetField
Get the ObjectStreamClass that describes the fields in the stream.
getOffscreenBuffer(Component, int, int) - Method in class javax.swing.RepaintManager
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
getOffset() - Method in class java.awt.image.DataBuffer
Returns the offset of the default bank in array elements.
getOffset() - Method in class java.awt.image.LookupTable
Returns the offset.
getOffset() - Method in class java.io.ObjectStreamField
Offset of field within instance data.
getOffset() - Method in class java.net.DatagramPacket
Returns the offset of the data to be sent or the offset of the data received.
getOffset() - Method in class java.text.CollationElementIterator
Returns the character offset in the original text corresponding to the next collation element.
getOffset() - Method in interface javax.swing.event.DocumentEvent
Returns the offset within the document of the start of the change.
getOffset() - Method in interface javax.swing.text.Position
Fetches the current offset within the document.
getOffset() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Returns the offset within the document of the start of the change.
getOffset() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the starting offset.
getOffset() - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow

getOffset(int, int) - Method in class java.awt.image.ComponentSampleModel
Gets the offset for the first band of pixel (x,y).
getOffset(int, int) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the offset of pixel (x, y) in data array elements.
getOffset(int, int) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the offset (in data array elements) of pixel (x,y).
getOffset(int, int) - Method in class javax.swing.text.BoxView
Fetch the offset of a particular childs current layout
getOffset(int, int, int) - Method in class java.awt.image.ComponentSampleModel
Gets the offset for band b of pixel (x,y).
getOffset(int, int, int, int, int, int) - Method in class java.util.TimeZone
Gets the time zone offset, for current date, modified in case of daylight savings.
getOffset(int, int, int, int, int, int) - Method in class java.util.SimpleTimeZone
Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight savings, for the specified date and time.
getOffsetHit(int) - Method in class java.awt.font.TextHitInfo
Creates a TextHitInfo whose character index is offset by delta from the charIndex of this TextHitInfo.
getOffsets() - Method in class java.awt.image.DataBuffer
Returns the offsets (in array elements) of all the banks.
getOffsets(float[]) - Method in class java.awt.image.RescaleOp
Returns the offsets in the given array.
getOldBinding() - Method in class javax.naming.event.NamingEvent
Retrieves the binding of the object before the change.
getOldLeadSelectionPath() - Method in class javax.swing.event.TreeSelectionEvent
Returns the path that was previously the lead path.
getOldValue() - Method in class java.beans.PropertyChangeEvent
Gets the old value for the property, expressed as an Object.
getOmni() - Method in interface javax.sound.midi.MidiChannel
Obtains the current omni mode status.
getOpenIcon() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the icon used to represent non-leaf nodes that are expanded.
getOperation() - Method in class java.rmi.server.Operation
Deprecated. no replacement
getOperations() - Method in interface java.rmi.server.Skeleton
Deprecated. no replacement
getOption(int) - Method in interface java.net.SocketOptions
Fetch the value of an option.
getOptions() - Method in class javax.swing.JOptionPane
Returns the choices the user can make.
getOptionType() - Method in class javax.swing.JOptionPane
Returns the type of options that are displayed.
getOrientation() - Method in class java.awt.Scrollbar
Determines the orientation of this scroll bar.
getOrientation() - Method in interface java.awt.Adjustable
Gets the orientation of the adjustable object.
getOrientation() - Method in class java.awt.print.PageFormat
Returns the orientation of this PageFormat.
getOrientation() - Method in class javax.swing.JSeparator
Returns the orientation of this separator.
getOrientation() - Method in class javax.swing.JSplitPane
Returns the orientation.
getOrientation() - Method in class javax.swing.JToolBar
Returns the current orientation of the toolbar.
getOrientation() - Method in class javax.swing.JScrollBar
Returns the component's orientation (horizontal or vertical).
getOrientation() - Method in class javax.swing.JProgressBar
Returns JProgressBar.VERTICAL or JProgressBar.HORIZONTAL, depending on the orientation of the progress bar.
getOrientation() - Method in class javax.swing.JSlider
Return this slider's vertical or horizontal orientation.
getOrientation() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the orientation for the JSplitPane.
getOrientation(Locale) - Static method in class java.awt.ComponentOrientation
Return the orientation that is appropriate for the given locale
getOrientation(ResourceBundle) - Static method in class java.awt.ComponentOrientation
Return the orientation appropriate for the given ResourceBundle's localization.
getOrientationRequested() - Method in class java.awt.PageAttributes
Returns the print orientation for pages using these attributes.
getOrigin() - Method in class java.awt.PageAttributes
Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.
getOtherHit() - Method in class java.awt.font.TextHitInfo
Creates a TextHitInfo on the other side of the insertion point.
getOutline() - Method in class java.awt.font.GlyphVector
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
getOutline(AffineTransform) - Method in class java.awt.font.TextLayout
Returns a Shape representing the outline of this TextLayout.
getOutline(float, float) - Method in class java.awt.font.GlyphVector
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.
getOutputStream() - Method in class java.lang.Process
Gets the output stream of the subprocess.
getOutputStream() - Method in class java.net.URLConnection
Returns an output stream that writes to this connection.
getOutputStream() - Method in class java.net.SocketImpl
Returns an output stream for this socket.
getOutputStream() - Method in class java.net.Socket
Returns an output stream for this socket.
getOutputStream() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
getOutputStream() - Method in class java.rmi.server.LogStream
Deprecated. no replacement
getOutsideBorder() - Method in class javax.swing.border.CompoundBorder
Returns the outside border object.
getOwnedWindows() - Method in class java.awt.Window
Return an array containing all the windows this window currently owns.
getOwner() - Method in class java.awt.Window
Returns the owner of this window.
getP() - Method in interface java.security.interfaces.DSAParams
Returns the prime, p.
getP() - Method in class java.security.spec.DSAPrivateKeySpec
Returns the prime p.
getP() - Method in class java.security.spec.DSAPublicKeySpec
Returns the prime p.
getP() - Method in class java.security.spec.DSAParameterSpec
Returns the prime p.
getP1() - Method in class java.awt.geom.Line2D
Returns the starting Point2D of this Line2D.
getP1() - Method in class java.awt.geom.Line2D.Float
Returns the start point.
getP1() - Method in class java.awt.geom.Line2D.Double
Returns the starting Point2D of this Line2D.
getP1() - Method in class java.awt.geom.QuadCurve2D
Returns the start point.
getP1() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the start point.
getP1() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the start point.
getP1() - Method in class java.awt.geom.CubicCurve2D
Returns the start point.
getP1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the start point.
getP1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the start point.
getP2() - Method in class java.awt.geom.Line2D
Returns the end Point2D of this Line2D.
getP2() - Method in class java.awt.geom.Line2D.Float
Returns the end point.
getP2() - Method in class java.awt.geom.Line2D.Double
Returns the end Point2D of this Line2D.
getP2() - Method in class java.awt.geom.QuadCurve2D
Returns the end point.
getP2() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the end point.
getP2() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the end point.
getP2() - Method in class java.awt.geom.CubicCurve2D
Returns the end point.
getP2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the end point.
getP2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the end point.
getPackage() - Method in class java.lang.Class
Gets the package for this class.
getPackage(String) - Static method in class java.lang.Package
Find a package by name in the callers classloader.
getPackage(String) - Method in class java.lang.ClassLoader
Returns a Package that has been defined by this class loader or any of its ancestors.
getPackages() - Static method in class java.lang.Package
Get all the packages currently known for the caller's class loader.
getPackages() - Method in class java.lang.ClassLoader
Returns all of the Packages defined by this class loader and its ancestors.
getPadding() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

getPage() - Method in class javax.swing.JEditorPane
Gets the current URL being displayed.
getPageDimension() - Method in class java.awt.PrintJob
Returns the dimensions of the page in pixels.
getPageFormat(int) - Method in class java.awt.print.Book
Returns the PageFormat of the page specified by pageIndex.
getPageFormat(int) - Method in interface java.awt.print.Pageable
Returns the PageFormat of the page specified by pageIndex.
getPageIncrement() - Method in class java.awt.Scrollbar
Deprecated. As of JDK version 1.1, replaced by getBlockIncrement().
getPageRanges() - Method in class java.awt.JobAttributes
Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed.
getPageResolution() - Method in class java.awt.PrintJob
Returns the resolution of the page in pixels per inch.
getPaint() - Method in class java.awt.Graphics2D
Returns the current Paint of the Graphics2D context.
getPainter() - Method in interface javax.swing.text.Highlighter.Highlight
Gets the painter for the highlighter.
getPainter(GlyphView, int, int) - Method in class javax.swing.text.GlyphView.GlyphPainter
Create a painter to use for the given GlyphView.
getPaintLabels() - Method in class javax.swing.JSlider
Tells if labels are to be painted.
getPaintTicks() - Method in class javax.swing.JSlider
Tells if tick marks are to be painted.
getPaintTrack() - Method in class javax.swing.JSlider
Tells if the track (area the slider slides in) is to be painted.
getPaper() - Method in class java.awt.print.PageFormat
Returns a copy of the Paper object associated with this PageFormat.
getParagraphAttributes() - Method in class javax.swing.JTextPane
Fetches the current paragraph attributes in effect at the location of the caret, or null if none.
getParagraphElement(int) - Method in class javax.swing.text.AbstractDocument
Get the paragraph element containing the given position.
getParagraphElement(int) - Method in interface javax.swing.text.StyledDocument
Gets the element that represents the paragraph that encloses the given offset within the document.
getParagraphElement(int) - Method in class javax.swing.text.PlainDocument
Get the paragraph element containing the given position.
getParagraphElement(int) - Method in class javax.swing.text.DefaultStyledDocument
Gets the paragraph element at the offset pos.
getParagraphElement(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the element to use for a paragraph/line.
getParamClasses() - Method in class java.awt.image.renderable.ParameterBlock
Returns an array of Class objects describing the types of the parameters.
getParameter() - Method in class java.sql.DataTruncation
Indicates whether the value truncated was a parameter value or a column value.
getParameter(String) - Method in class java.applet.Applet
Returns the value of the named parameter in the HTML tag.
getParameter(String) - Method in interface java.applet.AppletStub
Returns the value of the named parameter in the HTML tag.
getParameter(String) - Method in class java.awt.datatransfer.DataFlavor

getParameter(String) - Method in class java.security.Signature
Deprecated.
getParameterBlock() - Method in class java.awt.image.renderable.RenderableImageOp
Returns a reference to the current parameter block.
getParameterDescriptors() - Method in class java.beans.MethodDescriptor
Gets the ParameterDescriptor for each of this MethodDescriptor's method's parameters.
getParameterInfo() - Method in class java.applet.Applet
Returns information about the parameters than are understood by this applet.
getParameters() - Method in class java.awt.image.renderable.ParameterBlock
Returns the entire Vector of parameters.
getParameterSpec(Class) - Method in class java.security.AlgorithmParameters
Returns a (transparent) specification of this parameter object.
getParameterTypes() - Method in class java.lang.reflect.Method
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.
getParameterTypes() - Method in class java.lang.reflect.Constructor
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor represented by this Constructor object.
getParams() - Method in interface java.security.interfaces.DSAKey
Returns the DSA-specific key parameters.
getParent() - Method in class java.awt.Component
Gets the parent of this component.
getParent() - Method in class java.awt.MenuComponent
Returns the parent container for this menu component.
getParent() - Method in class java.awt.image.Raster
Returns the parent Raster (if any) of this Raster, or else null.
getParent() - Method in class java.io.File
Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.
getParent() - Method in class java.lang.ThreadGroup
Returns the parent of this thread group.
getParent() - Method in class java.lang.ClassLoader
Returns the parent class loader for delegation.
getParent() - Method in class javax.swing.InputMap
Gets this InputMap's parent.
getParent() - Method in class javax.swing.ActionMap
Returns this ActionMap's parent.
getParent() - Method in class javax.swing.text.View
Returns the parent of the view.
getParent() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Returns the parent TreeNode of the receiver.
getParent() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns this node's parent or null if this node has no parent.
getParent() - Method in interface javax.swing.tree.TreeNode
Returns the parent TreeNode of the receiver.
getParentDirectory(File) - Method in class javax.swing.filechooser.FileSystemView
Returns the parent directory of dir.
getParentElement() - Method in interface javax.swing.text.Element
Fetches the parent element.
getParentElement() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the parent of the element.
getParentFile() - Method in class java.io.File
Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.
getParentPath() - Method in class javax.swing.tree.TreePath
Returns a path containing all the elements of this object, except the last path component.
getParser() - Method in class javax.swing.text.html.HTMLDocument
Returns the parser that is used when inserting HTML into the existing document.
getParser() - Method in class javax.swing.text.html.HTMLEditorKit
Fetch the parser to use for reading HTML streams.
getPartialSize(int, int) - Method in class javax.swing.text.ParagraphView
Returns the size used by the views between startOffset and endOffset.
getPartialSpan(int, int) - Method in class javax.swing.text.GlyphView
Determines the span along the same axis as tab expansion for a portion of the view.
getPartialSpan(int, int) - Method in interface javax.swing.text.TabableView
Determines the span along the same axis as tab expansion for a portion of the view.
getPassword() - Method in class java.net.PasswordAuthentication
Returns the user password.
getPassword() - Method in class javax.swing.JPasswordField
Returns the text contained in this TextComponent.
getPasswordAuthentication() - Method in class java.net.Authenticator
Called when password authorization is needed.
getPatch() - Method in class javax.sound.midi.Instrument
Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.
getPatchList() - Method in class javax.sound.midi.Sequence
Obtains a list of patches referenced in this sequence.
getPath() - Method in class java.io.File
Converts this abstract pathname into a pathname string.
getPath() - Method in class java.net.URL
Returns the path part of this URL.
getPath() - Method in class javax.swing.event.MenuKeyEvent
Returns the path to the menu item referenced by this event.
getPath() - Method in class javax.swing.event.TreeSelectionEvent
Returns the first path element.
getPath() - Method in class javax.swing.event.MenuDragMouseEvent
Returns the path to the selected menu item.
getPath() - Method in class javax.swing.event.TreeExpansionEvent
Returns the path to the value that has been expanded/collapsed.
getPath() - Method in class javax.swing.event.TreeModelEvent
Convenience method to get the array of objects from the TreePath instance that this event wraps.
getPath() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the path from the root, to get to this node.
getPath() - Method in class javax.swing.tree.TreePath
Returns an ordered array of Objects containing the components of this TreePath.
getPath() - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getPathBetweenRows(int, int) - Method in class javax.swing.JTree
Returns JTreePath instances representing the path between index0 and index1 (including index1).
getPathBounds(JTree, TreePath) - Method in class javax.swing.plaf.TreeUI
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
getPathBounds(JTree, TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
getPathBounds(JTree, TreePath) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getPathBounds on each UI handled by this MultiUI.
getPathBounds(TreePath) - Method in class javax.swing.JTree
Returns the Rectangle that the specified node will be drawn into.
getPathClosestTo(int, int) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the path to the node that is closest to x,y.
getPathClosestTo(int, int) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the path to the node that is closest to x,y.
getPathClosestTo(int, int) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns the path to the node that is closest to x,y.
getPathComponent(int) - Method in class javax.swing.tree.TreePath
Returns the path component at the specified index.
getPathCount() - Method in class javax.swing.tree.TreePath
Returns the number of elements in the path.
getPathForLocation(int, int) - Method in class javax.swing.JTree
Returns the path for the node at the specified location.
getPathForRow(int) - Method in class javax.swing.JTree
Returns the path for the specified row.
getPathForRow(int) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the path for passed in row.
getPathForRow(int) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the path for passed in row.
getPathForRow(int) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns the path for passed in row.
getPathForRow(JTree, int) - Method in class javax.swing.plaf.TreeUI
Returns the path for passed in row.
getPathForRow(JTree, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the path for passed in row.
getPathForRow(JTree, int) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getPathForRow on each UI handled by this MultiUI.
getPathIterator(AffineTransform) - Method in class java.awt.Polygon
Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon.
getPathIterator(AffineTransform) - Method in interface java.awt.Shape
Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
getPathIterator(AffineTransform) - Method in class java.awt.geom.Rectangle2D
Returns an iteration object that defines the boundary of this Rectangle2D.
getPathIterator(AffineTransform) - Method in class java.awt.geom.RoundRectangle2D
Returns an iteration object that defines the boundary of this RoundRectangle2D.
getPathIterator(AffineTransform) - Method in class java.awt.geom.Area
Creates a PathIterator for the outline of this Area object.
getPathIterator(AffineTransform) - Method in class java.awt.geom.Line2D
Returns an iteration object that defines the boundary of this Line2D.
getPathIterator(AffineTransform) - Method in class java.awt.geom.Arc2D
Returns an iteration object that defines the boundary of the arc.
getPathIterator(AffineTransform) - Method in class java.awt.geom.Ellipse2D
Returns an iteration object that defines the boundary of this Ellipse2D.
getPathIterator(AffineTransform) - Method in class java.awt.geom.GeneralPath
Returns a PathIterator object that iterates along the boundary of this Shape and provides access to the geometry of the outline of this Shape.
getPathIterator(AffineTransform) - Method in class java.awt.geom.QuadCurve2D
Returns an iteration object that defines the boundary of the shape of this QuadCurve2D.
getPathIterator(AffineTransform) - Method in class java.awt.geom.CubicCurve2D
Returns an iteration object that defines the boundary of the shape.
getPathIterator(AffineTransform, double) - Method in class java.awt.Polygon
Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape.
getPathIterator(AffineTransform, double) - Method in interface java.awt.Shape
Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.RectangularShape
Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.Rectangle2D
Returns an iteration object that defines the boundary of the flattened Rectangle2D.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.Area
Creates a PathIterator for the flattened outline of this Area object.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.Line2D
Returns an iteration object that defines the boundary of this flattened Line2D.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.GeneralPath
Returns a PathIterator object that iterates along the boundary of the flattened Shape and provides access to the geometry of the outline of the Shape.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.QuadCurve2D
Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D.
getPathIterator(AffineTransform, double) - Method in class java.awt.geom.CubicCurve2D
Return an iteration object that defines the boundary of the flattened shape.
getPaths() - Method in class javax.swing.event.TreeSelectionEvent
Returns the paths that have been added or removed from the selection.
getPathToRoot(TreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
getPathToRoot(TreeNode, int) - Method in class javax.swing.tree.DefaultMutableTreeNode
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
getPathToRoot(TreeNode, int) - Method in class javax.swing.tree.DefaultTreeModel
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
getPatternSeparator() - Method in class java.text.DecimalFormatSymbols
Gets the character used to separate positive and negative subpatterns in a pattern.
getPCSType() - Method in class java.awt.color.ICC_Profile
Returns the color space type of the Profile Connection Space (PCS).
getPeer() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable().
getPeer() - Method in class java.awt.MenuComponent
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers.
getPeer() - Method in class java.awt.Font
Deprecated. Font rendering is now platform independent.
getPercent() - Method in class java.text.DecimalFormatSymbols
Gets the character used for percent sign.
getPercentComplete() - Method in class javax.swing.JProgressBar
Returns the percentage/percent complete for the progress bar.
getPercentInstance() - Static method in class java.text.NumberFormat
Returns a percentage format for the current default locale.
getPercentInstance(Locale) - Static method in class java.text.NumberFormat
Returns a percentage format for the specified locale.
getPerMill() - Method in class java.text.DecimalFormatSymbols
Gets the character used for mille percent sign.
getPermission() - Method in class java.net.URLConnection
Returns a permission object representing the permission necessary to make the connection represented by this object.
getPermission() - Method in class java.net.HttpURLConnection

getPermission() - Method in class java.security.AccessControlException
Gets the Permission object associated with this exeception, or null if there was no corresponding Permission object.
getPermissions() - Method in class java.security.ProtectionDomain
Returns the permissions of this domain.
getPermissions(CodeSource) - Method in class java.net.URLClassLoader
Returns the permissions for the given codesource object.
getPermissions(CodeSource) - Method in class java.security.SecureClassLoader
Returns the permissions for the given CodeSource object.
getPermissions(CodeSource) - Method in class java.security.Policy
Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.
getPermissions(Principal) - Method in interface java.security.acl.Acl
Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group).
getPitchBend() - Method in interface javax.sound.midi.MidiChannel
Obtains the upward of downward pitch offset for this channel.
getPixel(int, int, double[]) - Method in class java.awt.image.Raster
Returns the samples in an array of double for the specified pixel.
getPixel(int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for the specified pixel in an array of double.
getPixel(int, int, float[]) - Method in class java.awt.image.Raster
Returns the samples in an array of float for the specified pixel.
getPixel(int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for the specified pixel in an array of float.
getPixel(int, int, int[]) - Method in class java.awt.image.Raster
Returns the samples in an array of int for the specified pixel.
getPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for a specified pixel in an int array, one sample per array element.
getPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns all samples for the specified pixel in an int array, one sample per array element.
getPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns all samples for the specified pixel in an int array.
getPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the specified single band pixel in the first element of an int array.
getPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns all samples in for the specified pixel in an int array.
getPixelBitStride() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the pixel bit stride in bits.
getPixelColor(int, int) - Method in class java.awt.Robot
Returns the color of a pixel at the given screen coordinates.
getPixels() - Method in class java.awt.image.PixelGrabber
Get the pixel buffer.
getPixels(int, int, int, int, double[]) - Method in class java.awt.image.Raster
Returns a double array containing all samples for a rectangle of pixels, one sample per array element.
getPixels(int, int, int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns all samples for a rectangle of pixels in a double array, one sample per array element.
getPixels(int, int, int, int, float[]) - Method in class java.awt.image.Raster
Returns a float array containing all samples for a rectangle of pixels, one sample per array element.
getPixels(int, int, int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns all samples for a rectangle of pixels in a float array, one sample per array element.
getPixels(int, int, int, int, int[]) - Method in class java.awt.image.Raster
Returns an int array containing all samples for a rectangle of pixels, one sample per array element.
getPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns all samples for a rectangle of pixels in an int array, one sample per array element.
getPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
getPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns all samples for the specified rectangle of pixels in an int array, one sample per data array element.
getPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
getPixelSize() - Method in class java.awt.image.ColorModel
Returns the number of bits per pixel described by this ColorModel.
getPixelStride() - Method in class java.awt.image.ComponentSampleModel
Returns the pixel stride of this ComponentSampleModel.
getPoint() - Method in class java.awt.event.MouseEvent
Returns the x,y position of the event relative to the source component.
getPoint1() - Method in class java.awt.GradientPaint
Returns a copy of the point P1 that anchors the first color.
getPoint2() - Method in class java.awt.GradientPaint
Returns a copy of the point P2 which anchors the second color.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.LookupOp
Returns the location of the destination point given a point in the source.
getPoint2D(Point2D, Point2D) - Method in interface java.awt.image.BufferedImageOp
Returns the location of the destination point given a point in the source image.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.ConvolveOp
Returns the location of the destination point given a point in the source.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.BandCombineOp
Returns the location of the corresponding destination point given a point in the source Raster.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.AffineTransformOp
Returns the location of the corresponding destination point given a point in the source.
getPoint2D(Point2D, Point2D) - Method in interface java.awt.image.RasterOp
Returns the location of the destination point given a point in the source Raster.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.ColorConvertOp
Returns the location of the destination point given a point in the source.
getPoint2D(Point2D, Point2D) - Method in class java.awt.image.RescaleOp
Returns the location of the destination point given a point in the source.
getPointSize(int) - Method in class javax.swing.text.html.StyleSheet
Returns the point size, given a size index.
getPointSize(String) - Method in class javax.swing.text.html.StyleSheet
Given a string such as "+2", "-2", or "2", returns a point size value.
getPolicy() - Static method in class java.security.Policy
Returns the installed Policy object.
getPolyPressure(int) - Method in interface javax.sound.midi.MidiChannel
Obtains the pressure with which the specified key is being depressed.
getPopupHeightForRowCount(int) - Method in class javax.swing.plaf.basic.BasicComboPopup

getPopupMenu() - Method in class javax.swing.JMenu
Returns the popupmenu associated with this menu.
getPopupMenuOrigin() - Method in class javax.swing.JMenu
Computes the origin for the JMenu's popup menu.
getPort() - Method in class java.net.DatagramSocket
Returns the port for this socket.
getPort() - Method in class java.net.SocketImpl
Returns the value of this socket's port field.
getPort() - Method in class java.net.Socket
Returns the remote port to which this socket is connected.
getPort() - Method in class java.net.URL
Returns the port number of this URL.
getPort() - Method in class java.net.DatagramPacket
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
getPosition() - Method in class java.awt.font.LineBreakMeasurer
Returns the current position of this LineBreakMeasurer.
getPosition() - Method in class javax.swing.text.TabStop

getPosition(Component) - Method in class javax.swing.JLayeredPane
Get the relative position of the component within its layer.
getPosition(int) - Method in class javax.swing.SizeSequence
Returns the start position for the specified entry.
getPositionAbove(JTextComponent, int, int) - Static method in class javax.swing.text.Utilities
Determines the position in the model that is closest to the given view location in the row above.
getPositionBelow(JTextComponent, int, int) - Static method in class javax.swing.text.Utilities
Determines the position in the model that is closest to the given view location in the row below.
getPositionsInRange(Vector, int, int) - Method in class javax.swing.text.StringContent
Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
getPositionsInRange(Vector, int, int) - Method in class javax.swing.text.GapContent
Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
getPositivePrefix() - Method in class java.text.DecimalFormat
Get the positive prefix.
getPositiveSuffix() - Method in class java.text.DecimalFormat
Get the positive suffix.
getPrecision() - Method in class javax.sound.sampled.FloatControl
Obtains the resolution or granularity of the control, in the units that the control measures.
getPrecision(int) - Method in interface java.sql.ResultSetMetaData
Get the designated column's number of decimal digits.
getPredefinedCursor(int) - Static method in class java.awt.Cursor
Returns a cursor object with the specified predefined type.
getPreferredButtonSize(AbstractButton, int) - Static method in class javax.swing.plaf.basic.BasicGraphicsUtils

getPreferredHeight() - Method in class javax.swing.tree.AbstractLayoutCache
Returns the preferred height.
getPreferredHeight() - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the preferred height.
getPreferredHorizontalSize() - Method in class javax.swing.plaf.basic.BasicSliderUI

getPreferredInnerHorizontal() - Method in class javax.swing.plaf.basic.BasicProgressBarUI

getPreferredInnerVertical() - Method in class javax.swing.plaf.basic.BasicProgressBarUI

getPreferredMenuItemSize(JComponent, Icon, Icon, int) - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getPreferredMinSize() - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the minimum preferred size.
getPreferredScrollableViewportSize() - Method in class javax.swing.JList
Computes the size of the viewport needed to display visibleRowCount rows.
getPreferredScrollableViewportSize() - Method in class javax.swing.JTree
Returns the preferred display size of a JTree.
getPreferredScrollableViewportSize() - Method in interface javax.swing.Scrollable
Returns the preferred size of the viewport for a view component.
getPreferredScrollableViewportSize() - Method in class javax.swing.JTable
Returns the preferred size of the viewport for this table.
getPreferredScrollableViewportSize() - Method in class javax.swing.JTextArea
Returns the preferred size of the viewport if this component is embedded in a JScrollPane.
getPreferredScrollableViewportSize() - Method in class javax.swing.text.JTextComponent
Returns the preferred size of the viewport for a view component.
getPreferredSize() - Method in class java.awt.Component
Gets the preferred size of this component.
getPreferredSize() - Method in class java.awt.Container
Returns the preferred size of this container.
getPreferredSize() - Method in class java.awt.List
Gets the preferred size of this scrolling list.
getPreferredSize() - Method in class java.awt.TextField
Gets the preferred size of this text field.
getPreferredSize() - Method in class java.awt.TextArea
Determines the preferred size of this text area.
getPreferredSize() - Method in class javax.swing.JComponent
If the preferredSize has been set to a non-null value just returns it.
getPreferredSize() - Method in class javax.swing.JEditorPane
Returns the preferred size for the JEditorPane.
getPreferredSize() - Method in class javax.swing.JTextField
Returns the preferred size Dimensions needed for this TextField.
getPreferredSize() - Method in class javax.swing.JToolBar.Separator
Returns the preferred size for the separator.
getPreferredSize() - Method in class javax.swing.JTextArea
Returns the preferred size of the TextArea.
getPreferredSize() - Method in class javax.swing.Box.Filler
Returns the preferred size of the component.
getPreferredSize() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
getPreferredSize() - Method in class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
getPreferredSize() - Method in class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
Returns the preferred size for the Container.
getPreferredSize() - Method in class javax.swing.plaf.basic.BasicComboBoxRenderer

getPreferredSize() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Returns dividerSize x dividerSize
getPreferredSize() - Method in class javax.swing.plaf.basic.BasicArrowButton

getPreferredSize() - Method in class javax.swing.plaf.metal.MetalScrollButton

getPreferredSize(int) - Method in class java.awt.List
Gets the preferred dimensions for a list with the specified number of rows.
getPreferredSize(int) - Method in class java.awt.TextField
Gets the preferred size of this text field with the specified number of columns.
getPreferredSize(int, int) - Method in class java.awt.TextArea
Determines the preferred size of a text area with the specified number of rows and columns.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.ComponentUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Gets the preferred size for the editor component.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
The preferred size of the radio button
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
If c is the JOptionPane the reciever is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
Return the preferred size of the table.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicListUI
The preferredSize of a list is total height of the rows and the maximum width of the cells.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Return the preferred size of the header.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuBarUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the preferred size to properly display the tree, this is a cover method for getPreferredSize(c, false).
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalSeparatorUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalScrollBarUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalDesktopIconUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.metal.MetalToolTipUI

getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call getPreferredSize on each UI handled by this MultiUI.
getPreferredSize(JComponent, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the preferred size to represent the tree in c.
getPreferredSizeOfComponent(Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the width of the passed in Components preferred size.
getPreferredSpan(int) - Method in class javax.swing.text.View
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.GlyphView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.BoxView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.PlainView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.FieldView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.AsyncBoxView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.ComponentView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.IconView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.WrappedPlainView
Determines the preferred span for this view along an axis.
getPreferredSpan(int) - Method in class javax.swing.text.html.ParagraphView
Determines the preferred span for this view.
getPreferredVerticalSize() - Method in class javax.swing.plaf.basic.BasicSliderUI

getPreferredWidth() - Method in class javax.swing.table.TableColumn
Returns the preferred width of the TableColumn.
getPreferredWidth(Rectangle) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the preferred width for the passed in region.
getPreferredWidth(Rectangle) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the preferred width and height for the region in visibleRegion.
getPrefix(int) - Method in interface javax.naming.Name
Creates a name whose components consist of a prefix of the components of this name.
getPrefix(int) - Method in class javax.naming.CompoundName
Creates a compound name whose components consist of a prefix of the components in this compound name.
getPrefix(int) - Method in class javax.naming.CompositeName
Creates a composite name whose components consist of a prefix of the components in this composite name.
getPresentationName() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Provides a localized, human readable description of this edit suitable for use in, say, a change log.
getPresentationName() - Method in class javax.swing.undo.AbstractUndoableEdit
This default implementation returns "".
getPresentationName() - Method in class javax.swing.undo.CompoundEdit
Returns getPresentationName from the last UndoableEdit added to edits.
getPresentationName() - Method in class javax.swing.undo.StateEdit
Gets the presentation name for this edit
getPresentationName() - Method in interface javax.swing.undo.UndoableEdit
Provide a localized, human readable description of this edit suitable for use in, say, a change log.
getPreservesUnknownTags() - Method in class javax.swing.text.html.HTMLDocument

getPressedIcon() - Method in class javax.swing.AbstractButton
Returns the pressed icon for the button.
getPreviewPanel() - Method in class javax.swing.JColorChooser
Returns the preview panel that shows a chosen color.
getPreviewPanel() - Static method in class javax.swing.colorchooser.ColorChooserComponentFactory

getPreviousBounds(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager

getPreviousLeaf() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the leaf before this node or null if this node is the first leaf in the tree.
getPreviousNode() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the node that precedes this node in a preorder traversal of this node's tree.
getPreviousSibling() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the previous sibling of this node in the parent's children array.
getPreviousTabIndex(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getPreviousWord(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determine the start of the prev word for the given location.
getPrimary1() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimary1() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getPrimary2() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimary2() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getPrimary3() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimary3() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getPrimaryControl() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getPrimaryControl() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimaryControlDarkShadow() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getPrimaryControlDarkShadow() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimaryControlHighlight() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getPrimaryControlHighlight() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimaryControlInfo() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getPrimaryControlInfo() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimaryControlShadow() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getPrimaryControlShadow() - Method in class javax.swing.plaf.metal.MetalTheme

getPrimaryKeys(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of a table's primary key columns.
getPrimaryType() - Method in class java.awt.datatransfer.DataFlavor

getPrimeExponentP() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the primeExponentP.
getPrimeExponentP() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the primeExponentP.
getPrimeExponentQ() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the primeExponentQ.
getPrimeExponentQ() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the primeExponentQ.
getPrimeP() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the primeP.
getPrimeP() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the primeP.
getPrimeQ() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the primeQ.
getPrimeQ() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the primeQ.
getPrincipal() - Method in interface java.security.Certificate
Deprecated. Returns the principal of the principal-key pair being guaranteed by the guarantor.
getPrincipal() - Method in interface java.security.acl.AclEntry
Returns the principal for which permissions are granted or denied by this ACL entry.
getPrintable(int) - Method in class java.awt.print.Book
Returns the Printable instance responsible for rendering the page specified by pageIndex.
getPrintable(int) - Method in interface java.awt.print.Pageable
Returns the Printable instance responsible for rendering the page specified by pageIndex.
getPrinter() - Method in class java.awt.JobAttributes
Returns the destination printer for jobs using these attributes.
getPrinterJob() - Method in interface java.awt.print.PrinterGraphics
Returns the PrinterJob that is controlling the current rendering request.
getPrinterJob() - Static method in class java.awt.print.PrinterJob
Creates and returns a PrinterJob.
getPrinterResolution() - Method in class java.awt.PageAttributes
Returns the print resolution for pages using these attributes.
getPrintJob() - Method in interface java.awt.PrintGraphics
Returns the PrintJob object from which this PrintGraphics object originated.
getPrintJob(Frame, String, JobAttributes, PageAttributes) - Method in class java.awt.Toolkit
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
getPrintJob(Frame, String, Properties) - Method in class java.awt.Toolkit
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
getPrintQuality() - Method in class java.awt.PageAttributes
Returns the print quality for pages using these attributes.
getPriority() - Method in class java.lang.Thread
Returns this thread's priority.
getPrivate() - Method in class java.security.KeyPair
Returns a reference to the private key component of this key pair.
getPrivateExponent() - Method in interface java.security.interfaces.RSAPrivateKey
Returns the private exponent.
getPrivateExponent() - Method in class java.security.spec.RSAPrivateKeySpec
Returns the private exponent.
getPrivateKey() - Method in class java.security.Signer
Deprecated. Returns this signer's private key.
getProcedureColumns(String, String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of a catalog's stored procedure parameters and result columns.
getProcedures(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the stored procedures available in a catalog.
getProcedureTerm() - Method in interface java.sql.DatabaseMetaData
What's the database vendor's preferred term for "procedure"?
getProfile() - Method in class java.awt.color.ICC_ColorSpace
Returns the ICC_Profile for this ICC_ColorSpace.
getProfileClass() - Method in class java.awt.color.ICC_Profile
Returns the profile class.
getProgram() - Method in class javax.sound.midi.Patch
Returns the index, within a bank, of the instrument whose location this Patch specifies.
getProgram() - Method in interface javax.sound.midi.MidiChannel
Obtains the current program number for this channel.
getProgressBarBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getProgressMonitor() - Method in class javax.swing.ProgressMonitorInputStream
Get the ProgressMonitor object being used by this stream.
getPropagatedFrom() - Method in class java.beans.beancontext.BeanContextEvent
Gets the BeanContext from which this event was propagated.
getPropagationId() - Method in class java.beans.PropertyChangeEvent
The "propagationId" field is reserved for future use.
getProperties() - Static method in class java.lang.System
Determines the current system properties.
getProperty(Object) - Method in interface javax.swing.text.Document
Gets properties associated with the document.
getProperty(Object) - Method in class javax.swing.text.AbstractDocument
A convenience method for looking up a property value.
getProperty(ParameterBlock, String) - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Gets the appropriate instance of the property specified by the name parameter.
getProperty(String) - Method in interface java.awt.image.RenderedImage
Gets a property from the property set of this image.
getProperty(String) - Method in class java.awt.image.BufferedImage
Returns a property of the image by name.
getProperty(String) - Method in class java.awt.image.renderable.RenderableImageOp
Gets a property from the property set of this image.
getProperty(String) - Method in interface java.awt.image.renderable.RenderableImage
Gets a property from the property set of this image.
getProperty(String) - Static method in class java.lang.System
Gets the system property indicated by the specified key.
getProperty(String) - Static method in class java.security.Security
Gets a security property value.
getProperty(String) - Method in class java.util.Properties
Searches for the property with the specified key in this property list.
getProperty(String, ImageObserver) - Method in class java.awt.Image
Gets a property of this image by name.
getProperty(String, ImageObserver) - Method in class java.awt.image.BufferedImage
Returns a property of the image by name.
getProperty(String, String) - Static method in class java.awt.Toolkit
Gets a property with the specified key and default.
getProperty(String, String) - Static method in class java.lang.System
Gets the system property indicated by the specified key.
getProperty(String, String) - Method in class java.util.Properties
Searches for the property with the specified key in this property list.
getPropertyChangeEvent() - Method in class java.beans.PropertyVetoException
Gets the vetoed PropertyChangeEvent.
getPropertyDescriptors() - Method in interface java.beans.BeanInfo
Gets the beans PropertyDescriptors.
getPropertyDescriptors() - Method in class java.beans.SimpleBeanInfo
Deny knowledge of properties.
getPropertyEditorClass() - Method in class java.beans.PropertyDescriptor
Gets any explicit PropertyEditor Class that has been registered for this property.
getPropertyInfo(String, Properties) - Method in interface java.sql.Driver
Gets information about the possible properties for this driver.
getPropertyName() - Method in class java.beans.PropertyChangeEvent
Gets the programmatic name of the property that was changed.
getPropertyNames() - Method in interface java.awt.image.RenderedImage
Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
getPropertyNames() - Method in class java.awt.image.BufferedImage
Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
getPropertyNames() - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Returns a list of names recognized by getProperty.
getPropertyNames() - Method in class java.awt.image.renderable.RenderableImageOp
Return a list of names recognized by getProperty.
getPropertyNames() - Method in interface java.awt.image.renderable.RenderableImage
Returns a list of names recognized by getProperty.
getPropertyOverrides() - Method in class java.rmi.activation.ActivationGroupDesc
Returns the group's property-override list.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicTextUI
Gets the name used as a key to look up properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicEditorPaneUI
Fetches the name used as a key to lookup properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicTextPaneUI
Fetches the name used as a key to lookup properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicMenuItemUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicButtonUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicToggleButtonUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicRadioButtonUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicMenuUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicTextFieldUI
Fetches the name used as a key to lookup properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicPasswordFieldUI
Fetches the name used as a key to look up properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicCheckBoxUI

getPropertyPrefix() - Method in class javax.swing.plaf.basic.BasicTextAreaUI
Fetches the name used as a key to look up properties through the UIManager.
getPropertyPrefix() - Method in class javax.swing.plaf.metal.MetalCheckBoxUI

getPropertyType() - Method in class java.beans.PropertyDescriptor
Gets the Class object for the property.
getProtectionDomain() - Method in class java.lang.Class
Returns the ProtectionDomain of this class.
getProtocol() - Method in class java.net.URL
Returns the protocol name of this URL.
getPrototypeCellValue() - Method in class javax.swing.JList
Returns the cell width of the "prototypical cell" -- a cell used for the calculation of cell widths, because it has the same value as all other list items.
getProvider() - Method in class java.security.KeyFactory
Returns the provider of this key factory object.
getProvider() - Method in class java.security.KeyPairGenerator
Returns the provider of this key pair generator object.
getProvider() - Method in class java.security.SecureRandom
Returns the provider of this SecureRandom object.
getProvider() - Method in class java.security.AlgorithmParameters
Returns the provider of this parameter object.
getProvider() - Method in class java.security.AlgorithmParameterGenerator
Returns the provider of this algorithm parameter generator object.
getProvider() - Method in class java.security.KeyStore
Returns the provider of this keystore.
getProvider() - Method in class java.security.MessageDigest
Returns the provider of this message digest object.
getProvider() - Method in class java.security.Signature
Returns the provider of this signature object.
getProvider() - Method in class java.security.cert.CertificateFactory
Returns the provider of this certificate factory.
getProvider(String) - Static method in class java.security.Security
Returns the provider installed with the specified name, if any.
getProviders() - Static method in class java.security.Security
Returns an array containing all the installed providers.
getProviders(Map) - Static method in class java.security.Security
Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.
getProviders(String) - Static method in class java.security.Security
Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed.
getProxyClass(ClassLoader, Class[]) - Static method in class java.lang.reflect.Proxy
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
getPSName() - Method in class java.awt.Font
Returns the postscript name of this Font.
getPublic() - Method in class java.security.KeyPair
Returns a reference to the public key component of this key pair.
getPublicExponent() - Method in interface java.security.interfaces.RSAPublicKey
Returns the public exponent.
getPublicExponent() - Method in interface java.security.interfaces.RSAPrivateCrtKey
Returns the public exponent.
getPublicExponent() - Method in class java.security.spec.RSAPrivateCrtKeySpec
Returns the public exponent.
getPublicExponent() - Method in class java.security.spec.RSAKeyGenParameterSpec
Returns the public-exponent value.
getPublicExponent() - Method in class java.security.spec.RSAPublicKeySpec
Returns the public exponent.
getPublicKey() - Method in class java.security.Identity
Deprecated. Returns this identity's public key.
getPublicKey() - Method in interface java.security.Certificate
Deprecated. Returns the key of the principal-key pair being guaranteed by the guarantor.
getPublicKey() - Method in class java.security.cert.Certificate
Gets the public key from this certificate.
getQ() - Method in interface java.security.interfaces.DSAParams
Returns the subprime, q.
getQ() - Method in class java.security.spec.DSAPrivateKeySpec
Returns the sub-prime q.
getQ() - Method in class java.security.spec.DSAPublicKeySpec
Returns the sub-prime q.
getQ() - Method in class java.security.spec.DSAParameterSpec
Returns the sub-prime q.
getQuery() - Method in class java.net.URL
Returns the query part of this URL.
getQueryTimeout() - Method in interface java.sql.Statement
Retrieves the number of seconds the driver will wait for a Statement object to execute.
getRadioButtonBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getRadioButtonIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory

getRadioButtonIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getRadioButtonMenuItemIcon() - Static method in class javax.swing.plaf.basic.BasicIconFactory

getRadioButtonMenuItemIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getRaisedBevelBorderUIResource() - Static method in class javax.swing.plaf.BorderUIResource

getRaster() - Method in class java.awt.image.BufferedImage
Returns the WritableRaster.
getRaster(int, int, int, int) - Method in interface java.awt.PaintContext
Returns a Raster containing the colors generated for the graphics operation.
getRawOffset() - Method in class java.util.TimeZone
Gets unmodified offset, NOT modified in case of daylight savings.
getRawOffset() - Method in class java.util.SimpleTimeZone
Overrides TimeZone Gets the GMT offset for this time zone.
getRead() - Method in class java.sql.DataTruncation
Indicates whether or not the value was truncated on a read.
getReader(int) - Method in class javax.swing.text.html.HTMLDocument
Fetches the reader for the parser to use to load the document with HTML.
getReader(int, int, int, HTML.Tag) - Method in class javax.swing.text.html.HTMLDocument
Fetches the reader for the parser to use to load the document with HTML.
getReaderForText(Transferable) - Method in class java.awt.datatransfer.DataFlavor
Gets a reader for an input stream, decoded for the expected charset (encoding).
getReadMethod() - Method in class java.beans.PropertyDescriptor
Gets the method that should be used to read the property value.
getReceiveBufferSize() - Method in class java.net.DatagramSocket
Get value of the SO_RCVBUF option for this DatagramSocket, that is the buffer size used by the platform for input on this DatagramSocket.
getReceiveBufferSize() - Method in class java.net.Socket
Gets the value of the SO_RCVBUF option for this Socket, that is the buffer size used by the platform for input on this Socket.
getReceiver() - Static method in class javax.sound.midi.MidiSystem
Obtains a MIDI receiver from an external MIDI port or other default source.
getReceiver() - Method in interface javax.sound.midi.Transmitter
Obtains the current receiver to which this transmitter will deliver MIDI messages.
getReceiver() - Method in interface javax.sound.midi.MidiDevice
Obtains a MIDI IN receiver through which the MIDI device may receive MIDI data.
getRecursionLimit() - Method in class java.awt.geom.FlatteningPathIterator
Returns the recursion limit of this iterator.
getRed() - Method in class java.awt.Color
Returns the red component in the range 0-255 in the default sRGB space.
getRed(int) - Method in class java.awt.image.ColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(int) - Method in class java.awt.image.ComponentColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(int) - Method in class java.awt.image.DirectColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(int) - Method in class java.awt.image.IndexColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(Object) - Method in class java.awt.image.ColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(Object) - Method in class java.awt.image.ComponentColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRed(Object) - Method in class java.awt.image.DirectColorModel
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
getRedMask() - Method in class java.awt.image.DirectColorModel
Returns the mask indicating which bits in an int pixel representation contain the red color component.
getRedoPresentationName() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Provides a localized, human readable description of the redoable form of this edit, e.g.
getRedoPresentationName() - Method in class javax.swing.undo.AbstractUndoableEdit
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName.
getRedoPresentationName() - Method in class javax.swing.undo.CompoundEdit
Returns getRedoPresentationName from the last UndoableEdit added to edits.
getRedoPresentationName() - Method in class javax.swing.undo.UndoManager
If inProgress, returns getRedoPresentationName of the significant edit that will be redone when redo() is invoked.
getRedoPresentationName() - Method in interface javax.swing.undo.UndoableEdit
Provide a localized, human readable description of the redoable form of this edit, e.g.
getReds(byte[]) - Method in class java.awt.image.IndexColorModel
Copies the array of red color components into the specified array.
getRef() - Method in class java.net.URL
Returns the anchor (also known as the "reference") of this URL.
getRef() - Method in class java.rmi.server.RemoteObject
Returns the remote reference for the remote object.
getRef(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
getRef(int) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
getRef(String) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
getRefClass(ObjectOutput) - Method in interface java.rmi.server.RemoteRef
Returns the class name of the ref type to be serialized onto the stream 'out'.
getReference() - Method in interface javax.naming.Referenceable
Retrieves the Reference of this object.
getReferralContext() - Method in class javax.naming.ReferralException
Retrieves the context at which to continue the method.
getReferralContext() - Method in class javax.naming.ldap.LdapReferralException
Retrieves the context at which to continue the method using the context's environment and no controls.
getReferralContext(Hashtable) - Method in class javax.naming.ReferralException
Retrieves the context at which to continue the method using environment properties.
getReferralContext(Hashtable) - Method in class javax.naming.ldap.LdapReferralException
Retrieves the context at which to continue the method using environment properties and no controls.
getReferralContext(Hashtable, Control[]) - Method in class javax.naming.ldap.LdapReferralException
Retrieves the context at which to continue the method using request controls and environment properties.
getReferralInfo() - Method in class javax.naming.ReferralException
Retrieves information (such as URLs) related to this referral.
getReferrals() - Method in interface javax.naming.ldap.UnsolicitedNotification
Retrieves the referral(s) sent by the server.
getRegisteredKeyStrokes() - Method in class javax.swing.JComponent
Returns the KeyStrokes that will initiate registered actions.
getRegistry() - Static method in class java.rmi.registry.LocateRegistry
Returns a reference to the the remote object Registry for the local host on the default registry port of 1099.
getRegistry(int) - Static method in class java.rmi.registry.LocateRegistry
Returns a reference to the the remote object Registry for the local host on the specified port.
getRegistry(String) - Static method in class java.rmi.registry.LocateRegistry
Returns a reference to the remote object Registry on the specified host on the default registry port of 1099.
getRegistry(String, int) - Static method in class java.rmi.registry.LocateRegistry
Returns a reference to the remote object Registry on the specified host and port.
getRegistry(String, int, RMIClientSocketFactory) - Static method in class java.rmi.registry.LocateRegistry
Returns a locally created remote reference to the remote object Registry on the specified host and port.
getRemaining() - Method in class java.util.zip.Inflater
Returns the total number of bytes remaining in the input buffer.
getRemainingName() - Method in class javax.naming.NamingException
Retrieves the remaining unresolved portion of the name.
getRemainingName() - Method in class javax.naming.spi.ResolveResult
Retrieves the remaining unresolved portion of the name.
getRemainingNewName() - Method in class javax.naming.CannotProceedException
Retrieves the "remaining new name" field of this exception, which is used when this exception is thrown during a rename() operation.
getRemoveListenerMethod() - Method in class java.beans.EventSetDescriptor
Gets the method used to remove event listeners.
getRenderableSource(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a source as a RenderableImage.
getRenderedSource(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a source as a RenderedImage.
getRenderer() - Method in class javax.swing.JComboBox
Returns the renderer used to display the selected item in the JComboBox field.
getRenderingHint(RenderingHints.Key) - Method in class java.awt.Graphics2D
Returns the value of a single preference for the rendering algorithms.
getRenderingHints() - Method in class java.awt.Graphics2D
Gets the preferences for the rendering algorithms.
getRenderingHints() - Method in class java.awt.image.LookupOp
Returns the rendering hints for this op.
getRenderingHints() - Method in interface java.awt.image.BufferedImageOp
Returns the rendering hints for this BufferedImageOp.
getRenderingHints() - Method in class java.awt.image.ConvolveOp
Returns the rendering hints for this op.
getRenderingHints() - Method in class java.awt.image.BandCombineOp
Returns the rendering hints for this operation.
getRenderingHints() - Method in class java.awt.image.AffineTransformOp
Returns the rendering hints used by this transform operation.
getRenderingHints() - Method in interface java.awt.image.RasterOp
Returns the rendering hints for this RasterOp.
getRenderingHints() - Method in class java.awt.image.ColorConvertOp
Returns the rendering hints used by this op.
getRenderingHints() - Method in class java.awt.image.RescaleOp
Returns the rendering hints for this op.
getRenderingHints() - Method in class java.awt.image.renderable.RenderContext
Gets the rendering hints of this RenderContext.
getReorderingAllowed() - Method in class javax.swing.table.JTableHeader
Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise.
getRepresentationClass() - Method in class java.awt.datatransfer.DataFlavor
Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.
getRequestControls() - Method in class javax.naming.ldap.InitialLdapContext

getRequestControls() - Method in interface javax.naming.ldap.LdapContext
Retrieves the request controls in effect for this context.
getRequestingPort() - Method in class java.net.Authenticator
Gets the port number for the requested connection.
getRequestingPrompt() - Method in class java.net.Authenticator
Gets the prompt string given by the requestor.
getRequestingProtocol() - Method in class java.net.Authenticator
Give the protocol that's requesting the connection.
getRequestingScheme() - Method in class java.net.Authenticator
Gets the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).
getRequestingSite() - Method in class java.net.Authenticator
Gets the InetAddress of the site requesting authorization, or null if not available.
getRequestMethod() - Method in class java.net.HttpURLConnection
Get the request method.
getRequestProperty(String) - Method in class java.net.URLConnection
Returns the value of the named general request property for this connection.
getReshowDelay() - Method in class javax.swing.ToolTipManager
Returns the reshow delay value.
getResizable() - Method in class javax.swing.table.TableColumn
Returns true if the user is allowed to resize the TableColumn's width, false otherwise.
getResizeWeight() - Method in class javax.swing.JSplitPane
Returns the number that determines how extra space is distributed.
getResizeWeight(int) - Method in class javax.swing.text.View
Determines the resizability of the view along the given axis.
getResizeWeight(int) - Method in class javax.swing.text.BoxView
Gets the resize weight.
getResizeWeight(int) - Method in class javax.swing.text.FieldView
Determines the resizability of the view along the given axis.
getResizeWeight(int) - Method in class javax.swing.text.TableView.TableRow
Determines the resizability of the view along the given axis.
getResizeWeight(int) - Method in class javax.swing.text.html.BlockView
Gets the resize weight.
getResizingAllowed() - Method in class javax.swing.table.JTableHeader
Returns true if the user is allowed to resize columns by dragging between their headers, false otherwise.
getResizingColumn() - Method in class javax.swing.table.JTableHeader
Returns the resizing column.
getResolution() - Method in class javax.sound.midi.Sequence
Obtains the timing resolution for this sequence.
getResolution() - Method in class javax.sound.midi.MidiFileFormat
Obtains the timing resolution for the MIDI file.
getResolvedName() - Method in class javax.naming.NamingException
Retrieves the leading portion of the name that was resolved successfully.
getResolvedObj() - Method in class javax.naming.NamingException
Retrieves the object to which resolution was successful.
getResolvedObj() - Method in class javax.naming.spi.ResolveResult
Retrieves the Object to which resolution was successful.
getResolveParent() - Method in interface javax.swing.text.Keymap
Fetches the parent keymap used to resolve key-bindings.
getResolveParent() - Method in class javax.swing.text.SimpleAttributeSet
Gets the resolving parent.
getResolveParent() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
If not overriden, the resolving parent defaults to the parent element.
getResolveParent() - Method in class javax.swing.text.StyleContext.NamedStyle
Gets attributes from the parent.
getResolveParent() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the resolving parent.
getResolveParent() - Method in interface javax.swing.text.AttributeSet
Gets the resolving parent.
getResolveParent() - Method in class javax.swing.text.html.HTMLDocument.RunElement
Gets the resolving parent.
getResolveParent() - Method in class javax.swing.text.html.HTMLDocument.BlockElement
Gets the resolving parent.
getResource(String) - Method in class java.lang.ClassLoader
Finds the resource with the given name.
getResource(String) - Method in class java.lang.Class
Finds a resource with a given name.
getResource(String, BeanContextChild) - Method in class java.beans.beancontext.BeanContextSupport

getResource(String, BeanContextChild) - Method in interface java.beans.beancontext.BeanContext
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
getResourceAsStream(String) - Method in class java.lang.ClassLoader
Returns an input stream for reading the specified resource.
getResourceAsStream(String) - Method in class java.lang.Class
Finds a resource with a given name.
getResourceAsStream(String, BeanContextChild) - Method in class java.beans.beancontext.BeanContextSupport

getResourceAsStream(String, BeanContextChild) - Method in interface java.beans.beancontext.BeanContext
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
getResources() - Method in interface javax.sound.midi.Soundbank
Extracts a list of non-Instrument resources contained in the sound bank.
getResources(String) - Method in class java.lang.ClassLoader
Finds all the resources with the given name.
getResponseCode() - Method in class java.net.HttpURLConnection
Gets HTTP response status from responses like:
getResponseControls() - Method in class javax.naming.ldap.InitialLdapContext

getResponseControls() - Method in interface javax.naming.ldap.LdapContext
Retrieves the response controls produced as a result of the last method invoked on this context.
getResponseMessage() - Method in class java.net.HttpURLConnection
Gets the HTTP response message, if any, returned along with the response code from a server.
getRestartMode() - Method in class java.rmi.activation.ActivationDesc
Returns the "restart" mode of the object associated with this activation descriptor.
getResultSet() - Method in interface java.sql.Statement
Returns the current result as a ResultSet object.
getResultSet() - Method in interface java.sql.Array
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
getResultSet(long, int) - Method in interface java.sql.Array
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
getResultSet(long, int, Map) - Method in interface java.sql.Array
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
getResultSet(Map) - Method in interface java.sql.Array
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
getResultSetConcurrency() - Method in interface java.sql.Statement
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
getResultSetType() - Method in interface java.sql.Statement
Retrieves the result set type for ResultSet objects generated by this Statement object.
getResultStream(boolean) - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
getReturningAttributes() - Method in class javax.naming.directory.SearchControls
Retrieves the attributes that will be returned as part of the search.
getReturningObjFlag() - Method in class javax.naming.directory.SearchControls
Determines whether objects will be returned as part of the result.
getReturnType() - Method in class java.lang.reflect.Method
Returns a Class object that represents the formal return type of the method represented by this Method object.
getRevocationDate() - Method in class java.security.cert.X509CRLEntry
Gets the revocation date from this X509CRLEntry, the revocationDate.
getRevokedCertificate(BigInteger) - Method in class java.security.cert.X509CRL
Gets the CRL entry, if any, with the given certificate serialNumber.
getRevokedCertificates() - Method in class java.security.cert.X509CRL
Gets all the entries from this CRL.
getRGB() - Method in class java.awt.Color
Returns the RGB value representing the color in the default sRGB ColorModel.
getRGB() - Method in class java.awt.SystemColor
Gets the "current" RGB value representing the symbolic color.
getRGB(int) - Method in class java.awt.image.ColorModel
Returns the color/alpha components of the pixel in the default RGB color model format.
getRGB(int) - Method in class java.awt.image.ComponentColorModel
Returns the color/alpha components of the pixel in the default RGB color model format.
getRGB(int) - Method in class java.awt.image.DirectColorModel
Returns the color/alpha components of the pixel in the default RGB color model format.
getRGB(int) - Method in class java.awt.image.IndexColorModel
Returns the color/alpha components of the pixel in the default RGB color model format.
getRGB(int, int) - Method in class java.awt.image.BufferedImage
Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
getRGB(int, int, int, int, int[], int, int) - Method in class java.awt.image.BufferedImage
Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data.
getRGB(Object) - Method in class java.awt.image.ColorModel
Returns the color/alpha components for the specified pixel in the default RGB color model format.
getRGB(Object) - Method in class java.awt.image.ComponentColorModel
Returns the color/alpha components for the specified pixel in the default RGB color model format.
getRGB(Object) - Method in class java.awt.image.DirectColorModel
Returns the color/alpha components for the specified pixel in the default RGB color model format.
getRGBColorComponents(float[]) - Method in class java.awt.Color
Returns a float array containing only the color components of the Color, in the default sRGB color space.
getRGBComponents(float[]) - Method in class java.awt.Color
Returns a float array containing the color and alpha components of the Color, as represented in the default sRGB color space.
getRGBdefault() - Static method in class java.awt.image.ColorModel
Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.
getRGBs(int[]) - Method in class java.awt.image.IndexColorModel
Converts data for each index from the color and alpha component arrays to an int in the default RGB ColorModel format and copies the resulting 32-bit ARGB values into the specified array.
getRightChildIndent() - Method in class javax.swing.plaf.basic.BasicTreeUI

getRightComponent() - Method in class javax.swing.JSplitPane
Returns the component to the right (or below) the divider.
getRightIndent(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the right indent setting.
getRightInset() - Method in class javax.swing.text.CompositeView
Gets the right inset.
getRightInset() - Method in class javax.swing.text.AsyncBoxView
Get the right part of the margin around the view.
getRMIRepositoryID(Class) - Method in interface javax.rmi.CORBA.ValueHandler
Returns the CORBA RepositoryId for the given Java class.
getRolloverIcon() - Method in class javax.swing.AbstractButton
Returns the rollover icon for the button.
getRolloverSelectedIcon() - Method in class javax.swing.AbstractButton
Returns the rollover selection icon for the button.
getRoot() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the root of the tree that contains this node.
getRoot() - Method in interface javax.swing.tree.TreeModel
Returns the root of the tree.
getRoot() - Method in class javax.swing.tree.DefaultTreeModel
Returns the root of the tree.
getRoot(Component) - Static method in class javax.swing.SwingUtilities
Returns the root component for the current component tree.
getRootCause() - Method in class javax.naming.NamingException
Retrieves the root cause of this NamingException, if any.
getRootElement() - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Gets the root element.
getRootElements() - Method in interface javax.swing.text.Document
Returns all of the root elements that are defined.
getRootElements() - Method in class javax.swing.text.AbstractDocument
Gets all root elements defined.
getRootFrame() - Static method in class javax.swing.JOptionPane
Returns the Frame to use for the class methods in which a frame is not provided.
getRootPane() - Method in class javax.swing.JComponent
Returns the JRootPane ancestor for a component
getRootPane() - Method in class javax.swing.JWindow
Returns the rootPane object for this window.
getRootPane() - Method in class javax.swing.JApplet
Returns the rootPane object for this applet.
getRootPane() - Method in class javax.swing.JInternalFrame
Returns the rootPane object for this frame.
getRootPane() - Method in class javax.swing.JFrame
Returns the rootPane object for this frame.
getRootPane() - Method in interface javax.swing.RootPaneContainer
Return this component's single JRootPane child.
getRootPane() - Method in class javax.swing.JDialog
Returns the rootPane object for this dialog.
getRootPane(Component) - Static method in class javax.swing.SwingUtilities
If c is a JRootPane descendant return its JRootPane ancestor.
getRoots() - Method in class javax.swing.filechooser.FileSystemView
Returns all root partitians on this system.
getRootView(JTextComponent) - Method in class javax.swing.plaf.TextUI
Fetches a View with the allocation of the associated text component (i.e.
getRootView(JTextComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Fetches a View with the allocation of the associated text component (i.e.
getRootView(JTextComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call getRootView on each UI handled by this MultiUI.
getRotateInstance(double) - Static method in class java.awt.geom.AffineTransform
Returns a transform representing a rotation transformation.
getRotateInstance(double, double, double) - Static method in class java.awt.geom.AffineTransform
Returns a transform that rotates coordinates around an anchor point.
getRoundedCorners() - Method in class javax.swing.border.LineBorder
Returns whether this border will be drawn with rounded corners.
getRow() - Method in interface java.sql.ResultSet
Retrieves the current row number.
getRowBounds(int) - Method in class javax.swing.JTree
Returns the Rectangle that the node at the specified row is drawn in.
getRowCount() - Method in class javax.swing.JTree
Returns the number of rows that are currently being displayed.
getRowCount() - Method in class javax.swing.JTable
Returns the number of rows in this table's model.
getRowCount() - Method in class javax.swing.table.DefaultTableModel
Returns the number of rows in this data table.
getRowCount() - Method in interface javax.swing.table.TableModel
Returns the number of rows in the model.
getRowCount() - Method in class javax.swing.text.TableView.TableCell
Deprecated. Gets the number of rows this cell spans (that is, the grid height).
getRowCount() - Method in class javax.swing.tree.AbstractLayoutCache
Number of rows being displayed.
getRowCount() - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the number of visible rows.
getRowCount() - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns the number of visible rows.
getRowCount(JTree) - Method in class javax.swing.plaf.TreeUI
Returns the number of rows that are being displayed.
getRowCount(JTree) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the number of rows that are being displayed.
getRowCount(JTree) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getRowCount on each UI handled by this MultiUI.
getRowEnd(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the ending row model position of the row that contains the specified model position.
getRowForLocation(int, int) - Method in class javax.swing.JTree
Returns the row for the specified location.
getRowForPath(JTree, TreePath) - Method in class javax.swing.plaf.TreeUI
Returns the row that the last item identified in path is visible at.
getRowForPath(JTree, TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns the row that the last item identified in path is visible at.
getRowForPath(JTree, TreePath) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call getRowForPath on each UI handled by this MultiUI.
getRowForPath(TreePath) - Method in class javax.swing.JTree
Returns the row that displays the node identified by the specified path.
getRowForPath(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the row that the last item identified in path is visible at.
getRowForPath(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the row that the last item identified in path is visible at.
getRowForPath(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns the row that the last item identified in path is visible at.
getRowHeader() - Method in class javax.swing.ScrollPaneLayout
Returns the JViewport object that is the row header.
getRowHeader() - Method in class javax.swing.JScrollPane
Returns the row header.
getRowHeight() - Method in class javax.swing.JTree
Returns the height of each row.
getRowHeight() - Method in class javax.swing.JTable
Returns the height of a table row, in pixels.
getRowHeight() - Method in class javax.swing.JTextArea
Defines the meaning of the height of a row.
getRowHeight() - Method in class javax.swing.tree.AbstractLayoutCache
Returns the height of each row.
getRowHeight() - Method in class javax.swing.plaf.basic.BasicTreeUI

getRowHeight(int) - Method in class javax.swing.JTable
Returns the height, in pixels, of the cells in row.
getRowHeight(int) - Method in class javax.swing.plaf.basic.BasicListUI
Returns the height of the specified row based on the current layout.
getRowMapper() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the RowMapper instance that is able to map a TreePath to a row.
getRowMapper() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the RowMapper instance that is able to map a TreePath to a row.
getRowMargin() - Method in class javax.swing.JTable
Gets the amount of empty space, in pixels, between cells.
getRows() - Method in class java.awt.GridLayout
Gets the number of rows in this layout.
getRows() - Method in class java.awt.List
Get the number of visible lines in this list.
getRows() - Method in class java.awt.TextArea
Gets the number of rows in the text area.
getRows() - Method in class javax.swing.JTextArea
Returns the number of rows in the TextArea.
getRowSelectionAllowed() - Method in class javax.swing.JTable
Returns true if rows can be selected.
getRowsForPaths(TreePath[]) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the rows that the TreePath instances in path are being displayed at.
getRowsForPaths(TreePath[]) - Method in interface javax.swing.tree.RowMapper
Returns the rows that the TreePath instances in path are being displayed at.
getRowStart(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the starting row model position of the row that contains the specified model position.
getRowX(int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler

getRSB() - Method in class java.awt.font.GlyphMetrics
Returns the right (bottom) side bearing of the glyph.
getRule() - Method in class java.awt.AlphaComposite
Returns the compositing rule of this AlphaComposite.
getRule(HTML.Tag, Element) - Method in class javax.swing.text.html.StyleSheet
Fetches the style to use to render the given type of HTML tag.
getRule(String) - Method in class javax.swing.text.html.StyleSheet
Fetches the rule that best matches the selector given in string form.
getRules() - Method in class java.text.RuleBasedCollator
Gets the table-based rules for the collation object.
getRunForTab(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getRunLimit() - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character following the run with respect to all attributes containing the current character.
getRunLimit(AttributedCharacterIterator.Attribute) - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character following the run with respect to the given attribute containing the current character.
getRunLimit(Set) - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character following the run with respect to the given attributes containing the current character.
getRunStart() - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character of the run with respect to all attributes containing the current character.
getRunStart(AttributedCharacterIterator.Attribute) - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character of the run with respect to the given attribute containing the current character.
getRunStart(Set) - Method in interface java.text.AttributedCharacterIterator
Returns the index of the first character of the run with respect to the given attributes containing the current character.
getRuntime() - Static method in class java.lang.Runtime
Returns the runtime object associated with the current Java application.
getRunTimeCodeBase() - Method in interface javax.rmi.CORBA.ValueHandler
Returns the CodeBase for this ValueHandler.
getSample(int, int, int) - Method in class java.awt.image.Raster
Returns the sample in a specified band for the pixel located at (x,y) as an int.
getSample(int, int, int, DataBuffer) - Method in class java.awt.image.SampleModel
Returns the sample in a specified band for the pixel located at (x,y) as an int.
getSample(int, int, int, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns as int the sample in a specified band for the pixel located at (x,y).
getSample(int, int, int, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns as int the sample in a specified band for the pixel located at (x,y).
getSample(int, int, int, DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns as int the sample in a specified band for the pixel located at (x, y).
getSample(int, int, int, DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns as int the sample in a specified band for the pixel located at (x,y).
getSampleDouble(int, int, int) - Method in class java.awt.image.Raster
Returns the sample in a specified band for a pixel located at (x,y) as a double.
getSampleDouble(int, int, int, DataBuffer) - Method in class java.awt.image.SampleModel
Returns the sample in a specified band for a pixel located at (x,y) as a double.
getSampleDouble(int, int, int, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns the sample in a specified band for a pixel located at (x,y) as a double.
getSampleDouble(int, int, int, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns the sample in a specified band for a pixel located at (x,y) as a double.
getSampleFloat(int, int, int) - Method in class java.awt.image.Raster
Returns the sample in a specified band for the pixel located at (x,y) as a float.
getSampleFloat(int, int, int, DataBuffer) - Method in class java.awt.image.SampleModel
Returns the sample in a specified band for the pixel located at (x,y) as a float.
getSampleFloat(int, int, int, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns the sample in a specified band for the pixel located at (x,y) as a float.
getSampleFloat(int, int, int, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns the sample in a specified band for the pixel located at (x,y) as a float.
getSampleModel() - Method in interface java.awt.image.RenderedImage
Returns the SampleModel associated with this image.
getSampleModel() - Method in class java.awt.image.BufferedImage
Returns the SampleModel associated with this BufferedImage.
getSampleModel() - Method in class java.awt.image.Raster
Returns the SampleModel that describes the layout of the image data.
getSampleModelTranslateX() - Method in class java.awt.image.Raster
Returns the X translation from the coordinate system of the SampleModel to that of the Raster.
getSampleModelTranslateY() - Method in class java.awt.image.Raster
Returns the Y translation from the coordinate system of the SampleModel to that of the Raster.
getSampleRate() - Method in class javax.sound.sampled.AudioFormat
Obtains the sample rate.
getSamples(int, int, int, int, int, double[]) - Method in class java.awt.image.Raster
Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.
getSamples(int, int, int, int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.
getSamples(int, int, int, int, int, float[]) - Method in class java.awt.image.Raster
Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.
getSamples(int, int, int, int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.
getSamples(int, int, int, int, int, int[]) - Method in class java.awt.image.Raster
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
getSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
getSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
getSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
getSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
getSampleSize() - Method in class java.awt.image.SampleModel
Returns the size in bits of samples for all bands.
getSampleSize() - Method in class java.awt.image.ComponentSampleModel
Returns the number of bits per sample for all bands.
getSampleSize() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the number of bits per sample for all bands.
getSampleSize() - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the number of bits per sample for all bands.
getSampleSize(int) - Method in class java.awt.image.SampleModel
Returns the size in bits of samples for the specified band.
getSampleSize(int) - Method in class java.awt.image.ComponentSampleModel
Returns the number of bits per sample for the specified band.
getSampleSize(int) - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the number of bits per sample for the specified band.
getSampleSize(int) - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the number of bits per sample for the specified band.
getSampleSizeInBits() - Method in class javax.sound.sampled.AudioFormat
Obtains the size of a sample.
getScale(int) - Method in interface java.sql.ResultSetMetaData
Gets the designated column's number of digits to right of the decimal point.
getScaledInstance(int, int, int) - Method in class java.awt.Image
Creates a scaled version of this image.
getScaleFactors(float[]) - Method in class java.awt.image.RescaleOp
Returns the scale factors in the given array.
getScaleInstance(double, double) - Static method in class java.awt.geom.AffineTransform
Returns a transform representing a scaling transformation.
getScaleX() - Method in class java.awt.geom.AffineTransform
Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix.
getScaleY() - Method in class java.awt.geom.AffineTransform
Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix.
getScanlineStride() - Method in class java.awt.image.ComponentSampleModel
Returns the scanline stride of this ComponentSampleModel.
getScanlineStride() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the scanline stride.
getScanlineStride() - Method in class java.awt.image.SinglePixelPackedSampleModel
Returns the scanline stride of this SinglePixelPackedSampleModel.
getSchema(Name) - Method in interface javax.naming.directory.DirContext
Retrieves the schema associated with the named object.
getSchema(Name) - Method in class javax.naming.directory.InitialDirContext

getSchema(String) - Method in interface javax.naming.directory.DirContext
Retrieves the schema associated with the named object.
getSchema(String) - Method in class javax.naming.directory.InitialDirContext

getSchemaClassDefinition(Name) - Method in interface javax.naming.directory.DirContext
Retrieves a context containing the schema objects of the named object's class definitions.
getSchemaClassDefinition(Name) - Method in class javax.naming.directory.InitialDirContext

getSchemaClassDefinition(String) - Method in interface javax.naming.directory.DirContext
Retrieves a context containing the schema objects of the named object's class definitions.
getSchemaClassDefinition(String) - Method in class javax.naming.directory.InitialDirContext

getSchemaName(int) - Method in interface java.sql.ResultSetMetaData
Get the designated column's table's schema.
getSchemas() - Method in interface java.sql.DatabaseMetaData
Gets the schema names available in this database.
getSchemaTerm() - Method in interface java.sql.DatabaseMetaData
What's the database vendor's preferred term for "schema"?
getScope() - Method in class java.security.Identity
Deprecated. Returns this identity's scope.
getScreenDevices() - Method in class java.awt.GraphicsEnvironment
Returns an array of all of the screen GraphicsDevice objects.
getScreenResolution() - Method in class java.awt.Toolkit
Returns the screen resolution in dots-per-inch.
getScreenSize() - Method in class java.awt.Toolkit
Gets the size of the screen.
getScrollableBlockIncrement(Rectangle, int, int) - Method in class javax.swing.JList
Returns the block increment amount.
getScrollableBlockIncrement(Rectangle, int, int) - Method in class javax.swing.JTree
Returns the amount for a block increment, which is the height or width of visibleRect, based on orientation.
getScrollableBlockIncrement(Rectangle, int, int) - Method in interface javax.swing.Scrollable
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
getScrollableBlockIncrement(Rectangle, int, int) - Method in class javax.swing.JTable
Returns visibleRect.height or visibleRect.width, depending on this table's orientation.
getScrollableBlockIncrement(Rectangle, int, int) - Method in class javax.swing.text.JTextComponent
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
getScrollableTracksViewportHeight() - Method in class javax.swing.JEditorPane
Returns true if a viewport should always force the height of this Scrollable to match the height of the viewport.
getScrollableTracksViewportHeight() - Method in class javax.swing.JList
Returns true if this JList is displayed in a JViewport and the viewport is taller than JList's preferred height; otherwise returns false.
getScrollableTracksViewportHeight() - Method in class javax.swing.JTree
Returns false to indicate that the height of the viewport does not determine the height of the table, unless the preferred height of the tree is smaller than the viewports height.
getScrollableTracksViewportHeight() - Method in interface javax.swing.Scrollable
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.
getScrollableTracksViewportHeight() - Method in class javax.swing.JTable
Returns false to indicate that the height of the viewport does not determine the height of the table.
getScrollableTracksViewportHeight() - Method in class javax.swing.text.JTextComponent
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.
getScrollableTracksViewportWidth() - Method in class javax.swing.JEditorPane
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.
getScrollableTracksViewportWidth() - Method in class javax.swing.JList
Returns true if this JList is displayed in a JViewport and the viewport is wider than JList's preferred width; otherwise returns false.
getScrollableTracksViewportWidth() - Method in class javax.swing.JTree
Returns false to indicate that the width of the viewport does not determine the width of the table, unless the preferred width of the tree is smaller than the viewports width.
getScrollableTracksViewportWidth() - Method in interface javax.swing.Scrollable
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
getScrollableTracksViewportWidth() - Method in class javax.swing.JTable
Returns false to indicate that the width of the viewport does not determine the width of the table.
getScrollableTracksViewportWidth() - Method in class javax.swing.JTextArea
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.
getScrollableTracksViewportWidth() - Method in class javax.swing.text.JTextComponent
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
getScrollableUnitIncrement(Rectangle, int, int) - Method in class javax.swing.JList
Returns the distance to scroll to expose the next or previous row (for vertical scrolling) or character (for horizontal scrolling).
getScrollableUnitIncrement(Rectangle, int, int) - Method in class javax.swing.JTree
Returns the amount to increment when scrolling.
getScrollableUnitIncrement(Rectangle, int, int) - Method in interface javax.swing.Scrollable
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
getScrollableUnitIncrement(Rectangle, int, int) - Method in class javax.swing.JTable
Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).
getScrollableUnitIncrement(Rectangle, int, int) - Method in class javax.swing.JTextArea
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
getScrollableUnitIncrement(Rectangle, int, int) - Method in class javax.swing.text.JTextComponent
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
getScrollbarDisplayPolicy() - Method in class java.awt.ScrollPane
Returns the display policy for the scrollbars.
getScrollbarVisibility() - Method in class java.awt.TextArea
Gets an enumerated value that indicates which scroll bars the text area uses.
getScrollMode() - Method in class javax.swing.JViewport
Returns the current scrolling mode.
getScrollOffset() - Method in class javax.swing.JTextField
Gets the scroll offset.
getScrollPane() - Method in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
Returns the JScrollPane housing the JTree, or null if one isn't found.
getScrollPosition() - Method in class java.awt.ScrollPane
Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port.
getScrollsOnExpand() - Method in class javax.swing.JTree
Returns true if the tree scrolls to show previously hidden children.
getSearchScope() - Method in class javax.naming.directory.SearchControls
Retrieves the search scope of these SearchControls.
getSearchStringEscape() - Method in interface java.sql.DatabaseMetaData
Gets the string that can be used to escape wildcard characters.
getSecondary1() - Method in class javax.swing.plaf.metal.MetalTheme

getSecondary1() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getSecondary2() - Method in class javax.swing.plaf.metal.MetalTheme

getSecondary2() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getSecondary3() - Method in class javax.swing.plaf.metal.MetalTheme

getSecondary3() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getSeconds() - Method in class java.sql.Date
Deprecated.
getSeconds() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.SECOND).
getSecurityContext() - Method in class java.lang.SecurityManager
Creates an object that encapsulates the current execution environment.
getSecurityContext(ClassLoader) - Static method in class java.rmi.server.RMIClassLoader
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.
getSecurityContext(ClassLoader) - Method in interface java.rmi.server.LoaderHandler
Deprecated. no replacement
getSecurityManager() - Static method in class java.lang.System
Gets the system security interface.
getSeed(int) - Static method in class java.security.SecureRandom
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
getSelectColor() - Method in class javax.swing.plaf.metal.MetalToggleButtonUI

getSelectColor() - Method in class javax.swing.plaf.metal.MetalRadioButtonUI

getSelectColor() - Method in class javax.swing.plaf.metal.MetalButtonUI

getSelectedAccessibleColumns() - Method in interface javax.accessibility.AccessibleTable
Returns the selected columns in a table.
getSelectedAccessibleColumns() - Method in class javax.swing.JTable.AccessibleJTable
Returns the selected columns in a table.
getSelectedAccessibleRows() - Method in interface javax.accessibility.AccessibleTable
Returns the selected rows in a table.
getSelectedAccessibleRows() - Method in class javax.swing.JTable.AccessibleJTable
Returns the selected rows in a table.
getSelectedCheckbox() - Method in class java.awt.CheckboxGroup
Gets the current choice from this check box group.
getSelectedColor() - Method in class javax.swing.colorchooser.DefaultColorSelectionModel

getSelectedColor() - Method in interface javax.swing.colorchooser.ColorSelectionModel

getSelectedColumn() - Method in class javax.swing.JTable
Returns the index of the first selected column, -1 if no column is selected.
getSelectedColumnCount() - Method in class javax.swing.JTable
Returns the number of selected columns.
getSelectedColumnCount() - Method in class javax.swing.table.DefaultTableColumnModel
Returns the number of columns selected.
getSelectedColumnCount() - Method in interface javax.swing.table.TableColumnModel
Returns the number of selected columns.
getSelectedColumns() - Method in class javax.swing.JTable
Returns the indices of all selected columns.
getSelectedColumns() - Method in class javax.swing.table.DefaultTableColumnModel
Returns an array of selected columns.
getSelectedColumns() - Method in interface javax.swing.table.TableColumnModel
Returns an array of indicies of all selected columns.
getSelectedComponent() - Method in class javax.swing.JTabbedPane
Returns the currently selected component for this tabbedpane.
getSelectedFile() - Method in class javax.swing.JFileChooser
Returns the selected file.
getSelectedFiles() - Method in class javax.swing.JFileChooser
Returns a list of selected files if the file chooser is set to allow multiple selection.
getSelectedFrame() - Method in class javax.swing.JDesktopPane
return the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.
getSelectedIcon() - Method in class javax.swing.AbstractButton
Returns the selected icon for the button.
getSelectedIndex() - Method in class java.awt.List
Gets the index of the selected item on the list,
getSelectedIndex() - Method in class java.awt.Choice
Returns the index of the currently selected item.
getSelectedIndex() - Method in class javax.swing.DefaultSingleSelectionModel

getSelectedIndex() - Method in class javax.swing.JTabbedPane
Returns the currently selected index for this tabbedpane.
getSelectedIndex() - Method in interface javax.swing.SingleSelectionModel
Returns the model's selection.
getSelectedIndex() - Method in class javax.swing.JComboBox
Returns the first item in the list that matches the given item.
getSelectedIndex() - Method in class javax.swing.JList
Returns the first selected index; returns -1 if there is no selected item.
getSelectedIndexes() - Method in class java.awt.List
Gets the selected indexes on the list.
getSelectedIndices() - Method in class javax.swing.JList
Returns an array of all of the selected indices in increasing order.
getSelectedItem() - Method in class java.awt.List
Get the selected item on this scrolling list.
getSelectedItem() - Method in class java.awt.Choice
Gets a representation of the current choice as a string.
getSelectedItem() - Method in class javax.swing.DefaultComboBoxModel

getSelectedItem() - Method in class javax.swing.JComboBox
Returns the currently selected item.
getSelectedItem() - Method in interface javax.swing.ComboBoxModel
Return the selected item
getSelectedItem() - Method in class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

getSelectedItem() - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

getSelectedItems() - Method in class java.awt.List
Get the selected items on this scrolling list.
getSelectedObjects() - Method in class java.awt.Checkbox
Returns an array (length 1) containing the checkbox label or null if the checkbox is not selected.
getSelectedObjects() - Method in class java.awt.List
Returns the selected items on the list in an array of Objects.
getSelectedObjects() - Method in class java.awt.Choice
Returns an array (length 1) containing the currently selected item.
getSelectedObjects() - Method in interface java.awt.ItemSelectable
Returns the selected items or null if no items are selected.
getSelectedObjects() - Method in class java.awt.CheckboxMenuItem
Returns the an array (length 1) containing the checkbox menu item label or null if the checkbox is not selected.
getSelectedObjects() - Method in class javax.swing.AbstractButton
Returns an array (length 1) containing the label or null if the button is not selected.
getSelectedObjects() - Method in class javax.swing.JCheckBoxMenuItem
Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.
getSelectedObjects() - Method in class javax.swing.JComboBox
Returns an array containing the selected item.
getSelectedObjects() - Method in class javax.swing.DefaultButtonModel
Overriden to return null
getSelectedPath() - Method in class javax.swing.MenuSelectionManager
Returns the path to the currently selected menu item
getSelectedRow() - Method in class javax.swing.JTable
Returns the index of the first selected row, -1 if no row is selected.
getSelectedRowCount() - Method in class javax.swing.JTable
Returns the number of selected rows.
getSelectedRows() - Method in class javax.swing.JTable
Returns the indices of all selected rows.
getSelectedTabPadInsets(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getSelectedText() - Method in class java.awt.TextComponent
Gets the selected text from the text that is presented by this text component.
getSelectedText() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the portion of the text that is selected.
getSelectedText() - Method in interface javax.accessibility.AccessibleText
Returns the portion of the text that is selected.
getSelectedText() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the portion of the text that is selected.
getSelectedText() - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the portion of the text that is selected.
getSelectedText() - Method in class javax.swing.text.JTextComponent
Returns the selected text contained in this TextComponent.
getSelectedText() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the portion of the text that is selected.
getSelectedText(AttributedCharacterIterator.Attribute[]) - Method in interface java.awt.im.InputMethodRequests
Gets the currently selected text from the text editing component.
getSelectedTextColor() - Method in class javax.swing.text.JTextComponent
Fetches the current color used to render the selected text.
getSelectedValue() - Method in class javax.swing.JList
Returns the first selected value, or null if the selection is empty.
getSelectedValues() - Method in class javax.swing.JList
Returns an array of the values for the selected cells.
getSelection() - Method in class javax.swing.ButtonGroup
Return the selected button model.
getSelectionBackground() - Method in class javax.swing.JList
Returns the background color for selected cells.
getSelectionBackground() - Method in class javax.swing.JTable
Returns the background color for selected cells.
getSelectionBackground() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
The "selectionBackground" is the color of the text when it is drawn over an unfilled area of the progress bar.
getSelectionColor() - Method in class javax.swing.text.JTextComponent
Fetches the current color used to render the selection.
getSelectionCount() - Method in class javax.swing.JTree
Returns the number of nodes selected.
getSelectionCount() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the number of paths that are selected.
getSelectionCount() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the number of paths that are selected.
getSelectionEnd() - Method in class java.awt.TextComponent
Gets the end position of the selected text in this text component.
getSelectionEnd() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the end offset within the selected text.
getSelectionEnd() - Method in interface javax.accessibility.AccessibleText
Returns the end offset within the selected text.
getSelectionEnd() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the end offset within the selected text.
getSelectionEnd() - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the end offset within the selected text.
getSelectionEnd() - Method in class javax.swing.text.JTextComponent
Returns the selected text's end position.
getSelectionEnd() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the end offset within the selected text.
getSelectionForeground() - Method in class javax.swing.JList
Returns the selection foreground color.
getSelectionForeground() - Method in class javax.swing.JTable
Returns the foreground color for selected cells.
getSelectionForeground() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
The "selectionForeground" is the color of the text when it is drawn over a filled area of the progress bar.
getSelectionMode() - Method in class javax.swing.DefaultListSelectionModel
Returns the selection mode.
getSelectionMode() - Method in class javax.swing.JList
Returns whether single-item or multiple-item selections are allowed.
getSelectionMode() - Method in interface javax.swing.ListSelectionModel
Returns the current selection mode.
getSelectionMode() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the selection mode, one of SINGLE_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION or CONTIGUOUS_TREE_SELECTION.
getSelectionMode() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the current selection mode, one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
getSelectionModel() - Method in class javax.swing.JColorChooser
Returns the data model that handles color selections.
getSelectionModel() - Method in class javax.swing.JPopupMenu
Returns the model object that handles single selections.
getSelectionModel() - Method in class javax.swing.JList
Returns the value of the current selection model.
getSelectionModel() - Method in class javax.swing.JTree
Returns the model for selections.
getSelectionModel() - Method in class javax.swing.JTable
Returns the ListSelectionModel that is used to maintain row selection state.
getSelectionModel() - Method in class javax.swing.JMenuBar
Returns the model object that handles single selections.
getSelectionModel() - Method in class javax.swing.table.DefaultTableColumnModel
Returns the ListSelectionModel that is used to maintain column selection state.
getSelectionModel() - Method in interface javax.swing.table.TableColumnModel
Returns the current selection model.
getSelectionModel() - Method in class javax.swing.tree.AbstractLayoutCache
Returns the model used to maintain the selection.
getSelectionModel() - Method in class javax.swing.plaf.basic.BasicTreeUI

getSelectionPainter() - Method in class javax.swing.text.DefaultCaret
Gets the painter for the Highlighter.
getSelectionPath() - Method in class javax.swing.JTree
Returns the path to the first selected node.
getSelectionPath() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the first path in the selection.
getSelectionPath() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the first path in the selection.
getSelectionPaths() - Method in class javax.swing.JTree
Returns the paths of all selected values.
getSelectionPaths() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns the paths in the selection.
getSelectionPaths() - Method in interface javax.swing.tree.TreeSelectionModel
Returns the paths in the selection.
getSelectionRows() - Method in class javax.swing.JTree
Returns all of the currently selected rows.
getSelectionRows() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns all of the currently selected rows.
getSelectionRows() - Method in interface javax.swing.tree.TreeSelectionModel
Returns all of the currently selected rows.
getSelectionStart() - Method in class java.awt.TextComponent
Gets the start position of the selected text in this text component.
getSelectionStart() - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
Returns the start offset within the selected text.
getSelectionStart() - Method in interface javax.accessibility.AccessibleText
Returns the start offset within the selected text.
getSelectionStart() - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Returns the start offset within the selected text.
getSelectionStart() - Method in class javax.swing.JLabel.AccessibleJLabel
Returns the start offset within the selected text.
getSelectionStart() - Method in class javax.swing.text.JTextComponent
Returns the selected text's start position.
getSelectionStart() - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns the start offset within the selected text.
getSelectionValues() - Method in class javax.swing.JOptionPane
Returns the selection values.
getSendBufferSize() - Method in class java.net.DatagramSocket
Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.
getSendBufferSize() - Method in class java.net.Socket
Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket.
getSentenceInstance() - Static method in class java.text.BreakIterator
Create BreakIterator for sentence-breaks using default locale Returns an instance of a BreakIterator implementing sentence breaks.
getSentenceInstance(Locale) - Static method in class java.text.BreakIterator
Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterator implementing sentence breaks.
getSeparatorBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getSeparatorBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getSeparatorForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getSeparatorForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getSeparatorSize() - Method in class javax.swing.JToolBar.Separator
Returns the size of the separator
getSequence() - Method in interface javax.sound.midi.Sequencer
Obtains the sequence on which the Sequencer is currently operating.
getSequence(File) - Static method in class javax.sound.midi.MidiSystem
Obtains a MIDI sequence from the specified File.
getSequence(File) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains a MIDI sequence from the File provided.
getSequence(InputStream) - Static method in class javax.sound.midi.MidiSystem
Obtains a MIDI sequence from the specified input stream.
getSequence(InputStream) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains a MIDI sequence from the input stream provided.
getSequence(URL) - Static method in class javax.sound.midi.MidiSystem
Obtains a MIDI sequence from the specified URL.
getSequence(URL) - Method in class javax.sound.midi.spi.MidiFileReader
Obtains a MIDI sequence from the URL provided.
getSequencer() - Static method in class javax.sound.midi.MidiSystem
Obtains the default sequencer.
getSerialNumber() - Method in class java.security.cert.X509Certificate
Gets the serialNumber value from the certificate.
getSerialNumber() - Method in class java.security.cert.X509CRLEntry
Gets the serial number from this X509CRLEntry, the userCertificate.
getSerialVersionUID() - Method in class java.io.ObjectStreamClass
Return the serialVersionUID for this class.
getService(BeanContextChild, Object, Class, Object, BeanContextServiceRevokedListener) - Method in class java.beans.beancontext.BeanContextServicesSupport
obtain a service which may be delegated
getService(BeanContextChild, Object, Class, Object, BeanContextServiceRevokedListener) - Method in interface java.beans.beancontext.BeanContextServices
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
getService(BeanContextServices, Object, Class, Object) - Method in class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider

getService(BeanContextServices, Object, Class, Object) - Method in interface java.beans.beancontext.BeanContextServiceProvider
Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
getServiceClass() - Method in class java.beans.beancontext.BeanContextServiceAvailableEvent
Gets the service class that is the subject of this notification.
getServiceClass() - Method in class java.beans.beancontext.BeanContextServiceRevokedEvent
Gets the service class that is the subject of this notification
getServiceProvider() - Method in class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider

getServicesBeanInfo() - Method in interface java.beans.beancontext.BeanContextServiceProviderBeanInfo
Gets a BeanInfo array, one for each service class or interface statically available from this ServiceProvider.
getShadowColor() - Method in class javax.swing.border.EtchedBorder
Returns the shadow color of the etched border.
getShadowColor() - Method in class javax.swing.plaf.basic.BasicSliderUI

getShadowColor(Component) - Method in class javax.swing.border.EtchedBorder
Returns the shadow color of the etched border when rendered on the specified component.
getShadowInnerColor() - Method in class javax.swing.border.BevelBorder
Returns the inner shadow color of the bevel border.
getShadowInnerColor(Component) - Method in class javax.swing.border.BevelBorder
Returns the inner shadow color of the bevel border when rendered on the specified component.
getShadowOuterColor() - Method in class javax.swing.border.BevelBorder
Returns the outer shadow color of the bevel border.
getShadowOuterColor(Component) - Method in class javax.swing.border.BevelBorder
Returns the outer shadow color of the bevel border when rendered on the specified component.
getSharedAncestor(DefaultMutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the nearest common ancestor to this node and aNode.
getShearInstance(double, double) - Static method in class java.awt.geom.AffineTransform
Returns a transform representing a shearing transformation.
getShearX() - Method in class java.awt.geom.AffineTransform
Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix.
getShearY() - Method in class java.awt.geom.AffineTransform
Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix.
getShift() - Method in class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

getShift() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon

getShift() - Method in class javax.swing.plaf.metal.MetalIconFactory.FileIcon16

getShift() - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon

getShort(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language.
getShort(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
getShort(Object) - Method in class java.lang.reflect.Field
Gets the value of a field as a short on the specified object.
getShort(Object, int) - Static method in class java.lang.reflect.Array
Returns the value of the indexed component in the specified array object, as a short.
getShort(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
getShortcut() - Method in class java.awt.MenuItem
Get the MenuShortcut object associated with this menu item,
getShortcutMenuItem(MenuShortcut) - Method in class java.awt.MenuBar
Gets the instance of MenuItem associated with the specified MenuShortcut object, or null if none of the menu items being managed by this menu bar is associated with the specified menu shortcut.
getShortDescription() - Method in class java.beans.FeatureDescriptor
Gets the short description of this feature.
getShortMonths() - Method in class java.text.DateFormatSymbols
Gets short month strings.
getShortParameter(int) - Method in class java.awt.image.renderable.ParameterBlock
A convenience method to return a parameter as a short.
getShortWeekdays() - Method in class java.text.DateFormatSymbols
Gets short weekday strings.
getShowHorizontalLines() - Method in class javax.swing.JTable
Returns true if the table draws horizontal lines between cells, false if it doesn't.
getShowsRootHandles() - Method in class javax.swing.JTree
Returns true if handles for the root nodes are displayed.
getShowsRootHandles() - Method in class javax.swing.plaf.basic.BasicTreeUI

getShowVerticalLines() - Method in class javax.swing.JTable
Returns true if the table draws vertical lines between cells, false if it doesn't.
getSiblingCount() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the number of siblings of this node.
getSides() - Method in class java.awt.JobAttributes
Returns how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.
getSigAlgName() - Method in class java.security.cert.X509Certificate
Gets the signature algorithm name for the certificate signature algorithm.
getSigAlgName() - Method in class java.security.cert.X509CRL
Gets the signature algorithm name for the CRL signature algorithm.
getSigAlgOID() - Method in class java.security.cert.X509Certificate
Gets the signature algorithm OID string from the certificate.
getSigAlgOID() - Method in class java.security.cert.X509CRL
Gets the signature algorithm OID string from the CRL.
getSigAlgParams() - Method in class java.security.cert.X509Certificate
Gets the DER-encoded signature algorithm parameters from this certificate's signature algorithm.
getSigAlgParams() - Method in class java.security.cert.X509CRL
Gets the DER-encoded signature algorithm parameters from this CRL's signature algorithm.
getSignature() - Method in class java.security.SignedObject
Retrieves the signature on the signed object, in the form of a byte array.
getSignature() - Method in class java.security.cert.X509Certificate
Gets the signature value (the raw signature bits) from the certificate.
getSignature() - Method in class java.security.cert.X509CRL
Gets the signature value (the raw signature bits) from the CRL.
getSigners() - Method in class java.lang.Class
Gets the signers of this class.
getSize() - Method in class java.awt.Component
Returns the size of this component in the form of a Dimension object.
getSize() - Method in class java.awt.Component.AccessibleAWTComponent
Returns the size of this object in the form of a Dimension object.
getSize() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns the size of this object in the form of a Dimension object.
getSize() - Method in class java.awt.Font
Returns the point size of this Font, rounded to an integer.
getSize() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Returns the size of this object in the form of a Dimension object.
getSize() - Method in class java.awt.Dimension
Gets the size of this Dimension object.
getSize() - Method in class java.awt.Rectangle
Gets the size of this Rectangle, represented by the returned Dimension.
getSize() - Method in class java.awt.image.DataBuffer
Returns the size (in array elements) of all banks.
getSize() - Method in class java.util.zip.ZipEntry
Returns the uncompressed size of the entry data, or -1 if not known.
getSize() - Method in interface javax.accessibility.AccessibleComponent
Returns the size of this object in the form of a Dimension object.
getSize() - Method in interface javax.swing.ListModel
Returns the length of the list.
getSize() - Method in class javax.swing.DefaultComboBoxModel

getSize() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild

getSize() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

getSize() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell

getSize() - Method in class javax.swing.DefaultListModel
Returns the number of components in this list.
getSize() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

getSize() - Method in class javax.swing.plaf.basic.BasicDirectoryModel

getSize() - Method in class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

getSize() - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

getSize(Dimension) - Method in class java.awt.Component
Store the width/height of this component into "return value" rv and return rv.
getSize(Dimension) - Method in class javax.swing.JComponent
Stores the width/height of this component into "return value" rv and returns rv.
getSize(int) - Method in class javax.swing.SizeSequence
Returns the size of the specified entry.
getSize2D() - Method in class java.awt.Font
Returns the point size of this Font in float value.
getSizeButtonsToSameWidth() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Returns true, basic L&F wants all the buttons to have the same width.
getSizeOfComponent(Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the width of the passed in component.
getSizes() - Method in class javax.swing.SizeSequence
Returns the size of all entries.
getSizes() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the sizes of the components.
getSlaveSyncMode() - Method in interface javax.sound.midi.Sequencer
Obtains the current slave synchronization mode for this sequencer.
getSlaveSyncModes() - Method in interface javax.sound.midi.Sequencer
Obtains the set of slave synchronization modes supported by the sequencer.
getSmallDisplayIcon() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Returns the large display icon for the panel.
getSnapToTicks() - Method in class javax.swing.JSlider
Returns true if the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
getSocketFactory() - Static method in class java.rmi.server.RMISocketFactory
Returns the socket factory set by the setSocketFactory method.
getSoLinger() - Method in class java.net.Socket
Returns setting for SO_LINGER.
getSolo() - Method in interface javax.sound.midi.MidiChannel
Obtains the current solo state for this channel.
getSoTimeout() - Method in class java.net.DatagramSocket
Retrive setting for SO_TIMEOUT.
getSoTimeout() - Method in class java.net.Socket
Returns setting for SO_TIMEOUT.
getSoTimeout() - Method in class java.net.ServerSocket
Retrive setting for SO_TIMEOUT.
getSoundbank() - Method in class javax.sound.midi.SoundbankResource
Obtains the sound bank that contains this SoundbankResource.
getSoundbank(File) - Static method in class javax.sound.midi.MidiSystem
Constructs a Soundbank by reading it from the specified File.
getSoundbank(File) - Method in class javax.sound.midi.spi.SoundbankReader
Obtains a soundbank object from the File provided.
getSoundbank(InputStream) - Static method in class javax.sound.midi.MidiSystem
Constructs a MIDI sound bank by reading it from the specified stream.
getSoundbank(InputStream) - Method in class javax.sound.midi.spi.SoundbankReader
Obtains a soundbank object from the InputStream provided.
getSoundbank(URL) - Static method in class javax.sound.midi.MidiSystem
Constructs a Soundbank by reading it from the specified URL.
getSoundbank(URL) - Method in class javax.sound.midi.spi.SoundbankReader
Obtains a soundbank object from the URL provided.
getSource() - Method in class java.awt.Image
Gets the object that produces the pixels for the image.
getSource() - Method in class java.awt.image.BufferedImage
Returns the object that produces the pixels for the image.
getSource() - Method in class java.util.EventObject
The object on which the Event initially occurred.
getSource(int) - Method in class java.awt.image.renderable.ParameterBlock
Returns a source as a general Object.
getSourceActions() - Method in class java.awt.dnd.DragGestureRecognizer
This method returns an int representing the type of action(s) this Drag and Drop operation will support.
getSourceActions() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns an int representing the action(s) supported by the source.
getSourceActions() - Method in class java.awt.dnd.DragSourceContext
This method returns an int representing the current action(s) associated with this DragSourceContext.
getSourceActions() - Method in class java.awt.dnd.DropTargetDragEvent
This method returns an int representing set of actions supported by the source.
getSourceAsBeanContextServices() - Method in class java.beans.beancontext.BeanContextServiceAvailableEvent
Gets the source as a reference of type BeanContextServices.
getSourceAsBeanContextServices() - Method in class java.beans.beancontext.BeanContextServiceRevokedEvent
Gets the source as a reference of type BeanContextServices
getSourceAsDragGestureRecognizer() - Method in class java.awt.dnd.DragGestureEvent
This method returns the source as a DragGestureRecognizer.
getSourceElement() - Method in class javax.swing.text.html.HTMLFrameHyperlinkEvent
returns the element that corresponds to the source of the event.
getSourceEncodings() - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains the set of source format encodings from which format conversion services are provided by this provider.
getSourceLineInfo() - Method in interface javax.sound.sampled.Mixer
Obtains information about the set of source lines supported by this mixer.
getSourceLineInfo(Line.Info) - Method in interface javax.sound.sampled.Mixer
Obtains information about source lines of a particular type supported by the mixer.
getSourceLineInfo(Line.Info) - Static method in class javax.sound.sampled.AudioSystem
Obtains information about source lines of a particular type that are supported by any installed mixer.
getSourceLines() - Method in interface javax.sound.sampled.Mixer
Obtains the set of all source lines currently open to this mixer.
getSources() - Method in interface java.awt.image.RenderedImage
Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage.
getSources() - Method in class java.awt.image.BufferedImage
Returns a Vector of RenderedImage objects that are the immediate sources, not the sources of these immediate sources, of image data for this BufferedImage.
getSources() - Method in class java.awt.image.renderable.RenderableImageOp
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
getSources() - Method in interface java.awt.image.renderable.RenderableImage
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
getSources() - Method in class java.awt.image.renderable.ParameterBlock
Returns the entire Vector of sources.
getSourceString() - Method in class java.text.CollationKey
Returns the String that this CollationKey represents.
getSouthPane() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getSpaceAbove(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the space above setting.
getSpaceBelow(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the space below setting.
getSpan(GlyphView, int, int, TabExpander, float) - Method in class javax.swing.text.GlyphView.GlyphPainter
Determine the span the glyphs given a start location (for tab expansion).
getSpan(int, int) - Method in class javax.swing.text.BoxView
Fetch the span of a particular childs current layout
getSpecificationTitle() - Method in class java.lang.Package
Return the title of the specification that this package implements.
getSpecificationVendor() - Method in class java.lang.Package
Return the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package.
getSpecificationVersion() - Method in class java.lang.Package
Returns the version number of the specification that this package implements.
getSplitPane() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Returns the splitpane this instance is currently contained in.
getSplitPaneBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getSplitPaneDividerBorder() - Static method in class javax.swing.plaf.basic.BasicBorders
Returns a border instance for a JSplitPane divider
getSQLKeywords() - Method in interface java.sql.DatabaseMetaData
Gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords.
getSQLState() - Method in class java.sql.SQLException
Retrieves the SQLState for this SQLException object.
getSQLTypeName() - Method in interface java.sql.SQLData
Returns the fully-qualified name of the SQL user-defined type that this object represents.
getSQLTypeName() - Method in interface java.sql.Struct
Retrieves the SQL type name of the SQL structured type that this Struct object represents.
getStartIndex() - Method in class javax.accessibility.AccessibleHyperlink
Gets the index with the hypertext document at which this link begins
getStartIndex() - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Get the index with the hypertext document at which this link begins
getStartOffset() - Method in class javax.swing.text.View
Fetches the portion of the model that this view is responsible for.
getStartOffset() - Method in interface javax.swing.text.Element
Fetches the offset from the beginning of the document that this element begins at.
getStartOffset() - Method in class javax.swing.text.GlyphView
Fetches the portion of the model that this view is responsible for.
getStartOffset() - Method in interface javax.swing.text.Highlighter.Highlight
Gets the starting model offset for the highlight.
getStartOffset() - Method in class javax.swing.text.AbstractWriter
Returns the first offset to be output.
getStartOffset() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Gets the starting offset in the model for the element.
getStartOffset() - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the starting offset in the model for the element.
getStartOffset() - Method in class javax.swing.text.AbstractDocument.LeafElement
Gets the starting offset in the model for the element.
getStartOffset() - Method in class javax.swing.text.html.HTMLDocument.Iterator
Start of the range for which the current occurence of the tag is defined and has the same attributes.
getStartPoint() - Method in class java.awt.geom.Arc2D
Returns the starting point of the arc.
getStartPosition() - Method in interface javax.swing.text.Document
Returns a position that represents the start of the document.
getStartPosition() - Method in class javax.swing.text.AbstractDocument
Returns a position that represents the start of the document.
getState() - Method in class java.awt.Checkbox
Determines whether this check box is in the "on" or "off" state.
getState() - Method in class java.awt.Frame
Gets the state of this frame.
getState() - Method in class java.awt.CheckboxMenuItem
Determines whether the state of this check box menu item is "on" or "off."
getState() - Method in class java.awt.im.InputMethodHighlight
Returns the conversion state of the text range.
getState() - Method in class javax.swing.JCheckBoxMenuItem
Returns the selected-state of the item.
getStateChange() - Method in class java.awt.event.ItemEvent
Returns the type of state change (selected or deselected).
getStateLabel(boolean) - Method in class javax.sound.sampled.BooleanControl
Obtains the label for the specified state.
getStatement() - Method in interface java.sql.ResultSet
Returns the Statement object that produced this ResultSet object.
getStateToBind(Object, Name, Context, Hashtable) - Method in interface javax.naming.spi.StateFactory
Retrieves the state of an object for binding.
getStateToBind(Object, Name, Context, Hashtable) - Static method in class javax.naming.spi.NamingManager
Retrieves the state of an object for binding.
getStateToBind(Object, Name, Context, Hashtable, Attributes) - Static method in class javax.naming.spi.DirectoryManager
Retrieves the state of an object for binding when given the original object and its attributes.
getStateToBind(Object, Name, Context, Hashtable, Attributes) - Method in interface javax.naming.spi.DirStateFactory
Retrieves the state of an object for binding given the object and attributes to be transformed.
getStaticAttribute(Object) - Static method in class javax.swing.text.StyleContext
Returns the object previously registered with registerStaticAttributeKey.
getStaticAttributeKey(Object) - Static method in class javax.swing.text.StyleContext
Returns the String that key will be registered with
getStatus() - Method in class java.awt.image.PixelGrabber
Return the status of the pixels.
getStatus() - Method in class javax.sound.midi.MidiMessage
Obtains the status byte for the MIDI message.
getStream(URL) - Method in class javax.swing.JEditorPane
Fetches a stream for the given URL, which is about to be loaded by the setPage method.
getStrength() - Method in class java.text.Collator
Returns this Collator's strength property.
getStrikethroughOffset() - Method in class java.awt.font.LineMetrics
Returns the position of the strike-through line relative to the baseline.
getStrikethroughThickness() - Method in class java.awt.font.LineMetrics
Returns the thickness of the strike-through line.
getString() - Method in class javax.swing.JProgressBar
Returns the current value of the Progress String.
getString() - Method in class javax.swing.text.html.parser.Entity
Return the data as a string.
getString(int) - Method in interface java.sql.CallableStatement
Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
getString(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
getString(int, int) - Method in interface javax.swing.text.AbstractDocument.Content
Fetches a string of characters contained in the sequence.
getString(int, int) - Method in class javax.swing.text.StringContent
Retrieves a portion of the content.
getString(int, int) - Method in class javax.swing.text.GapContent
Retrieves a portion of the content.
getString(Object) - Method in class javax.swing.UIDefaults
If the value of key is a String return it, otherwise return null.
getString(Object) - Static method in class javax.swing.UIManager
Returns a string from the defaults table.
getString(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
getString(String) - Method in class java.util.ResourceBundle
Get an object from a ResourceBundle.
getStringArray(String) - Method in class java.util.ResourceBundle
Get an object from a ResourceBundle.
getStringBounds(char[], int, int, FontRenderContext) - Method in class java.awt.Font
Returns the bounds of the specified array of characters in the specified FontRenderContext.
getStringBounds(char[], int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the bounds of the specified array of characters in the specified Graphics context.
getStringBounds(CharacterIterator, int, int, FontRenderContext) - Method in class java.awt.Font
Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
getStringBounds(CharacterIterator, int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
getStringBounds(String, FontRenderContext) - Method in class java.awt.Font
Returns the bounds of the specified String in the specified FontRenderContext.
getStringBounds(String, Graphics) - Method in class java.awt.FontMetrics
Returns the bounds of the specified String in the specified Graphics context.
getStringBounds(String, int, int, FontRenderContext) - Method in class java.awt.Font
Returns the bounds of the specified String in the specified FontRenderContext.
getStringBounds(String, int, int, Graphics) - Method in class java.awt.FontMetrics
Returns the bounds of the specified String in the specified Graphics context.
getStringFunctions() - Method in interface java.sql.DatabaseMetaData
Gets a comma-separated list of string functions.
getStringPlacement(Graphics, String, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
Designate the place where the progress string will be drawn.
getStroke() - Method in class java.awt.Graphics2D
Returns the current Stroke in the Graphics2D context.
getStrongCaret(TextHitInfo, TextHitInfo, TextLayout) - Method in class java.awt.font.TextLayout.CaretPolicy
Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.
getStyle() - Method in class java.awt.Font
Returns the style of this Font.
getStyle() - Method in class java.awt.im.InputMethodHighlight
Returns the rendering style attributes for the text range, or null.
getStyle(String) - Method in class javax.swing.JTextPane
Fetches a named non-null style previously added.
getStyle(String) - Method in class javax.swing.text.StyleContext
Fetches a named style previously added to the document
getStyle(String) - Method in interface javax.swing.text.StyledDocument
Fetches a named style previously added.
getStyle(String) - Method in class javax.swing.text.DefaultStyledDocument
Fetches a named style previously added.
getStyledDocument() - Method in class javax.swing.JTextPane
Fetches the model associated with the editor.
getStyledDocument(JEditorPane) - Method in class javax.swing.text.StyledEditorKit.StyledTextAction
Gets the document associated with an editor pane.
getStyledEditorKit() - Method in class javax.swing.JTextPane
Gets the editor kit.
getStyledEditorKit(JEditorPane) - Method in class javax.swing.text.StyledEditorKit.StyledTextAction
Gets the editor kit associated with an editor pane.
getStyleNames() - Method in class javax.swing.text.StyleContext
Fetches the names of the styles defined.
getStyleNames() - Method in class javax.swing.text.DefaultStyledDocument
Fetches the list of of style names.
getStyleSheet() - Method in class javax.swing.text.html.ParagraphView

getStyleSheet() - Method in class javax.swing.text.html.BlockView

getStyleSheet() - Method in class javax.swing.text.html.InlineView

getStyleSheet() - Method in class javax.swing.text.html.HTMLDocument
Fetches the StyleSheet with the document-specific display rules (CSS) that were specified in the HTML document itself.
getStyleSheet() - Method in class javax.swing.text.html.HTMLEditorKit
Get the set of styles currently being used to render the HTML elements.
getStyleSheets() - Method in class javax.swing.text.html.StyleSheet
Returns an array of the linked StyleSheets.
getSubElements() - Method in class javax.swing.JMenuItem
This method returns an array containing the sub-menu components for this menu component.
getSubElements() - Method in class javax.swing.JMenu
Returns an array of MenuElements containing the submenu for this menu component.
getSubElements() - Method in class javax.swing.JPopupMenu
Returns an array of MenuElements containing the submenu for this menu component.
getSubElements() - Method in class javax.swing.JMenuBar
Implemented to be a MenuElement -- returns the menus in this menu bar.
getSubElements() - Method in interface javax.swing.MenuElement
This method should return an array containing the sub-elements for the receiving menu element
getSubimage(int, int, int, int) - Method in class java.awt.image.BufferedImage
Returns a subimage defined by a specified rectangular region.
getSubjectDN() - Method in class java.security.cert.X509Certificate
Gets the subject (subject distinguished name) value from the certificate.
getSubjectUniqueID() - Method in class java.security.cert.X509Certificate
Gets the subjectUniqueID value from the certificate.
getSubString(long, int) - Method in interface java.sql.Clob
Returns a copy of the specified substring in the CLOB value designated by this Clob object.
getSubTextFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getSubTextFont() - Method in class javax.swing.plaf.metal.MetalTheme

getSubTextFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getSubType() - Method in class java.awt.datatransfer.DataFlavor

getSuffix(int) - Method in interface javax.naming.Name
Creates a name whose components consist of a suffix of the components in this name.
getSuffix(int) - Method in class javax.naming.CompoundName
Creates a compound name whose components consist of a suffix of the components in this compound name.
getSuffix(int) - Method in class javax.naming.CompositeName
Creates a composite name whose components consist of a suffix of the components in this composite name.
getSuperclass() - Method in class java.lang.Class
Returns the Class representing the superclass of the entity (class, interface, primitive type or void) represented by this Class.
getSyncAllWidths() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

getSynthesizer() - Static method in class javax.sound.midi.MidiSystem
Obtains the default synthesizer.
getSystem() - Method in class java.rmi.activation.ActivationGroupID
Returns the group's activation system.
getSystem() - Static method in class java.rmi.activation.ActivationGroup
Returns the activation system for the VM.
getSystemClassLoader() - Static method in class java.lang.ClassLoader
Returns the system class loader for delegation.
getSystemClipboard() - Method in class java.awt.Toolkit
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.
getSystemCustomCursor(String) - Static method in class java.awt.Cursor

getSystemEventQueue() - Method in class java.awt.Toolkit
Get the application's or applet's EventQueue instance.
getSystemEventQueueImpl() - Method in class java.awt.Toolkit

getSystemFunctions() - Method in interface java.sql.DatabaseMetaData
Gets a comma-separated list of system functions.
getSystemLookAndFeelClassName() - Static method in class javax.swing.UIManager
Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
getSystemResource(String) - Static method in class java.lang.ClassLoader
Find a resource of the specified name from the search path used to load classes.
getSystemResourceAsStream(String) - Static method in class java.lang.ClassLoader
Open for reading, a resource of the specified name from the search path used to load classes.
getSystemResources(String) - Static method in class java.lang.ClassLoader
Finds all resources of the specified name from the search path used to load classes.
getSystemScope() - Static method in class java.security.IdentityScope
Deprecated. Returns the system's identity scope.
getSystemTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getSystemTextColor() - Method in class javax.swing.plaf.metal.MetalTheme

getSystemTextFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getSystemTextFont() - Method in class javax.swing.plaf.metal.MetalTheme

getSystemTextFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getTab(int) - Method in class javax.swing.text.TabSet
Returns the TabStop at index index.
getTabAfter(float) - Method in class javax.swing.text.TabSet
Returns the Tab instance after location.
getTabAreaInsets(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabBase() - Method in class javax.swing.text.ParagraphView

getTabbedSpan(float, TabExpander) - Method in class javax.swing.text.GlyphView
Determines the desired span when using the given tab expansion implementation.
getTabbedSpan(float, TabExpander) - Method in interface javax.swing.text.TabableView
Determines the desired span when using the given tab expansion implementation.
getTabbedTextOffset(Segment, FontMetrics, int, int, TabExpander, int) - Static method in class javax.swing.text.Utilities
Determines the relative offset into the given text that best represents the given span in the view coordinate system.
getTabbedTextOffset(Segment, FontMetrics, int, int, TabExpander, int, boolean) - Static method in class javax.swing.text.Utilities

getTabbedTextWidth(Segment, FontMetrics, int, TabExpander, int) - Static method in class javax.swing.text.Utilities
Determines the width of the given segment of text taking tabs into consideration.
getTabBounds(JTabbedPane, int) - Method in class javax.swing.plaf.TabbedPaneUI

getTabBounds(JTabbedPane, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabBounds(JTabbedPane, int) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getTabBounds on each UI handled by this MultiUI.
getTabCount() - Method in class javax.swing.JTabbedPane
Returns the number of tabs in this tabbedpane.
getTabCount() - Method in class javax.swing.text.TabSet
Returns the number of Tab instances the receiver contains.
getTabExpander() - Method in class javax.swing.text.GlyphView
Fetch the TabExpander to use if tabs are present in this view.
getTabIndex(TabStop) - Method in class javax.swing.text.TabSet

getTabIndexAfter(float) - Method in class javax.swing.text.TabSet
Returns the index of the Tab to be used after location.
getTabInsets(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabLabelShiftX(int, int, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabLabelShiftX(int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
Overidden to do nothing for the Java L&F.
getTabLabelShiftY(int, int, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabLabelShiftY(int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
Overidden to do nothing for the Java L&F.
getTable() - Method in class java.awt.image.ByteLookupTable
Returns the lookup table data by reference.
getTable() - Method in class java.awt.image.LookupOp
Returns the LookupTable.
getTable() - Method in class java.awt.image.ShortLookupTable
Returns the lookup table data by reference.
getTable() - Method in class javax.swing.table.JTableHeader
Returns the table associated with this header.
getTableCellEditorComponent(JTable, Object, boolean, int, int) - Method in class javax.swing.DefaultCellEditor

getTableCellEditorComponent(JTable, Object, boolean, int, int) - Method in interface javax.swing.table.TableCellEditor
Sets an initial value for the editor.
getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) - Method in interface javax.swing.table.TableCellRenderer
Returns the component used for drawing the cell.
getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) - Method in class javax.swing.table.DefaultTableCellRenderer
Returns the default table cell renderer.
getTableHeader() - Method in class javax.swing.JTable
Returns the tableHeader used by this JTable.
getTableName(int) - Method in interface java.sql.ResultSetMetaData
Gets the designated column's table name.
getTablePrivileges(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of the access rights for each table available in a catalog.
getTables(String, String, String, String[]) - Method in interface java.sql.DatabaseMetaData
Gets a description of tables available in a catalog.
getTableTypes() - Method in interface java.sql.DatabaseMetaData
Gets the table types available in this database.
getTabPlacement() - Method in class javax.swing.JTabbedPane
Returns the placement of the tabs for this tabbedpane.
getTabRunCount() - Method in class javax.swing.JTabbedPane
Returns the number of tab runs currently used to display the tabs.
getTabRunCount(JTabbedPane) - Method in class javax.swing.plaf.TabbedPaneUI

getTabRunCount(JTabbedPane) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabRunCount(JTabbedPane) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call getTabRunCount on each UI handled by this MultiUI.
getTabRunIndent(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabRunOffset(int, int, int, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabRunOverlay(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabRunOverlay(int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI

getTabSet() - Method in class javax.swing.text.ParagraphView
Gets the Tabset to be used in calculating tabs.
getTabSet(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Gets the TabSet.
getTabSize() - Method in class javax.swing.JTextArea
Gets the number of characters used to expand tabs.
getTabSize() - Method in class javax.swing.text.PlainView
Returns the tab size set for the document, defaulting to 8.
getTabSize() - Method in class javax.swing.text.WrappedPlainView
Returns the tab size set for the document, defaulting to 8.
getTag() - Method in class javax.swing.text.html.HTMLDocument.Iterator
Type of tag this iterator represents.
getTag(String) - Static method in class javax.swing.text.html.HTML
Fetch a tag constant for a well-known tag name (i.e.
getTags() - Method in interface java.beans.PropertyEditor
If the property value must be one of a set of known tagged values, then this method should return an array of the tags.
getTags() - Method in class java.beans.PropertyEditorSupport
If the property value must be one of a set of known tagged values, then this method should return an array of the tag values.
getTarget() - Method in class javax.accessibility.AccessibleRelation
Returns the target objects for this relation
getTarget() - Method in interface javax.rmi.CORBA.Tie
Returns the target for this tie.
getTarget() - Method in class javax.swing.text.html.HTMLFrameHyperlinkEvent
returns the target for the link.
getTargetActions() - Method in class java.awt.dnd.DropTargetContext
This method returns an int representing the current actions this DropTarget will accept.
getTargetActions() - Method in class java.awt.dnd.DragSourceDragEvent
This method returns the logical intersection of the current target, source, and user actions.
getTargetEncodings() - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains the set of target format encodings to which format conversion services are provided by this provider.
getTargetEncodings(AudioFormat.Encoding) - Static method in class javax.sound.sampled.AudioSystem
Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
getTargetEncodings(AudioFormat) - Static method in class javax.sound.sampled.AudioSystem
Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
getTargetEncodings(AudioFormat) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains the set of target format encodings supported by the format converter given a particular source format.
getTargetException() - Method in class java.lang.reflect.InvocationTargetException
Get the thrown target exception.
getTargetFormats(AudioFormat.Encoding, AudioFormat) - Static method in class javax.sound.sampled.AudioSystem
Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
getTargetFormats(AudioFormat.Encoding, AudioFormat) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
getTargetLineInfo() - Method in interface javax.sound.sampled.Mixer
Obtains information about the set of target lines supported by this mixer.
getTargetLineInfo(Line.Info) - Method in interface javax.sound.sampled.Mixer
Obtains information about target lines of a particular type supported by the mixer.
getTargetLineInfo(Line.Info) - Static method in class javax.sound.sampled.AudioSystem
Obtains information about target lines of a particular type that are supported by any installed mixer.
getTargetLines() - Method in interface javax.sound.sampled.Mixer
Obtains the set of all target lines currently open from this mixer.
getTBSCertificate() - Method in class java.security.cert.X509Certificate
Gets the DER-encoded certificate information, the tbsCertificate from this certificate.
getTBSCertList() - Method in class java.security.cert.X509CRL
Gets the DER-encoded CRL information, the tbsCertList from this CRL.
getTcpNoDelay() - Method in class java.net.Socket
Tests if TCP_NODELAY is enabled.
getTempoFactor() - Method in interface javax.sound.midi.Sequencer
Returns the current tempo factor for the sequencer.
getTempoInBPM() - Method in interface javax.sound.midi.Sequencer
Obtains the current tempo, expressed in beats per minute.
getTempoInMPQ() - Method in interface javax.sound.midi.Sequencer
Obtains the current tempo, expressed in microseconds per quarter note.
getText() - Method in class java.awt.TextComponent
Gets the text that is presented by this text component.
getText() - Method in class java.awt.Label
Gets the text of this label.
getText() - Method in class java.awt.event.InputMethodEvent
Gets the combined committed and composed text.
getText() - Method in class java.text.BreakIterator
Get the text being scanned
getText() - Method in class javax.swing.JEditorPane
Returns the text contained in this TextComponent in terms of the content type of this editor.
getText() - Method in class javax.swing.AbstractButton
Returns the button's text.
getText() - Method in class javax.swing.JPasswordField
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
getText() - Method in class javax.swing.JLabel
Returns the text string that the label displays.
getText() - Method in class javax.swing.text.JTextComponent
Returns the text contained in this TextComponent.
getText(Element) - Method in class javax.swing.text.AbstractWriter
Returns the text associated with the element.
getText(int, int) - Method in class javax.swing.JPasswordField
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
getText(int, int) - Method in class javax.swing.text.JTextComponent
Fetches a portion of the text represented by the component.
getText(int, int) - Method in interface javax.swing.text.Document
Fetches the text contained within the given portion of the document.
getText(int, int) - Method in class javax.swing.text.GlyphView
Fetch a reference to the text that occupies the given range.
getText(int, int) - Method in class javax.swing.text.AbstractDocument
Gets a sequence of text from the document.
getText(int, int, Segment) - Method in interface javax.swing.text.Document
Fetches the text contained within the given portion of the document.
getText(int, int, Segment) - Method in class javax.swing.text.AbstractDocument
Gets some text from the document potentially without making a copy.
getTextBorder() - Static method in class javax.swing.plaf.metal.MetalBorders
Returns a border instance for a text component
getTextComponent(ActionEvent) - Method in class javax.swing.text.TextAction
Determines the component to use for the action.
getTextFieldBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getTextFieldBorder() - Static method in class javax.swing.plaf.metal.MetalBorders
Returns a border instance for a JTextField
getTextHighlightColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getTextHighlightColor() - Method in class javax.swing.plaf.metal.MetalTheme

getTextLocation(TextHitInfo) - Method in interface java.awt.im.InputMethodRequests
Gets the location of a specified offset in the current composed text, or of the selection in committed text.
getTextNonSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the color the text is drawn with when the node isn't selected.
getTextPlainUnicodeFlavor() - Static method in class java.awt.datatransfer.DataFlavor

getTextSelectionColor() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Returns the color the text is drawn with when the node is selected.
getTextShiftOffset() - Method in class javax.swing.plaf.basic.BasicButtonUI

getThickness() - Method in class javax.swing.border.LineBorder
Returns the thickness of the border.
getThisUpdate() - Method in class java.security.cert.X509CRL
Gets the thisUpdate date from the CRL.
getThreadGroup() - Method in class java.lang.Thread
Returns the thread group to which this thread belongs.
getThreadGroup() - Method in class java.lang.SecurityManager
Returns the thread group into which to instantiate any new thread being created at the time this is being called.
getThumbBounds() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
Return the current size/location of the thumb.
getThumbOverhang() - Method in class javax.swing.plaf.metal.MetalSliderUI
Returns the amount that the thumb goes past the slide bar.
getThumbSize() - Method in class javax.swing.plaf.basic.BasicSliderUI

getThumbSize() - Method in class javax.swing.plaf.metal.MetalSliderUI

getTick() - Method in class javax.sound.midi.MidiEvent
Obtains the time-stamp for the event, in MIDI ticks
getTickLength() - Method in class javax.sound.midi.Sequence
Obtains the duration of this sequence, expressed in MIDI ticks.
getTickLength() - Method in interface javax.sound.midi.Sequencer
Obtains the length of the current sequence, expressed in MIDI ticks.
getTickLength() - Method in class javax.swing.plaf.basic.BasicSliderUI
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
getTickLength() - Method in class javax.swing.plaf.metal.MetalSliderUI
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
getTickPosition() - Method in interface javax.sound.midi.Sequencer
Obtains the current position in the sequence, expressed in MIDI ticks.
getTie(Remote) - Static method in class javax.rmi.CORBA.Util
Returns the tie (if any) for a given target object.
getTie(Remote) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.getTie(java.rmi.Remote).
getTile(int, int) - Method in interface java.awt.image.RenderedImage
Returns tile (tileX, tileY).
getTile(int, int) - Method in class java.awt.image.BufferedImage
Returns tile (tileX, tileY).
getTiledSizeRequirements(SizeRequirements[]) - Static method in class javax.swing.SizeRequirements
Determines the total space necessary to place a set of components end-to-end.
getTileGridXOffset() - Method in interface java.awt.image.RenderedImage
Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).
getTileGridXOffset() - Method in class java.awt.image.BufferedImage
Returns the x offset of the tile grid relative to the origin, For example, the x coordinate of the location of tile (0, 0).
getTileGridYOffset() - Method in interface java.awt.image.RenderedImage
Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).
getTileGridYOffset() - Method in class java.awt.image.BufferedImage
Returns the y offset of the tile grid relative to the origin, For example, the y coordinate of the location of tile (0, 0).
getTileHeight() - Method in interface java.awt.image.RenderedImage
Returns the tile height in pixels.
getTileHeight() - Method in class java.awt.image.BufferedImage
Returns the tile height in pixels.
getTileIcon() - Method in class javax.swing.border.MatteBorder
Returns the icon used for tiling the border or null if a solid color is being used.
getTileWidth() - Method in interface java.awt.image.RenderedImage
Returns the tile width in pixels.
getTileWidth() - Method in class java.awt.image.BufferedImage
Returns the tile width in pixels.
getTime() - Method in class java.util.Date
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
getTime() - Method in class java.util.Calendar
Gets this Calendar's current time.
getTime() - Method in class java.util.zip.ZipEntry
Returns the modification time of the entry, or -1 if not specified.
getTime(int) - Method in interface java.sql.CallableStatement
Get the value of a JDBC TIME parameter as a java.sql.Time object.
getTime(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
getTime(int, Calendar) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
getTime(int, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
getTime(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
getTime(String, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
getTimeDateFunctions() - Method in interface java.sql.DatabaseMetaData
Gets a comma-separated list of time and date functions.
getTimeInMillis() - Method in class java.util.Calendar
Gets this Calendar's current time as a long.
getTimeInstance() - Static method in class java.text.DateFormat
Gets the time formatter with the default formatting style for the default locale.
getTimeInstance(int) - Static method in class java.text.DateFormat
Gets the time formatter with the given formatting style for the default locale.
getTimeInstance(int, Locale) - Static method in class java.text.DateFormat
Gets the time formatter with the given formatting style for the given locale.
getTimeLimit() - Method in class javax.naming.directory.SearchControls
Retrieves the time limit of these SearchControls in milliseconds.
getTimestamp(int) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
getTimestamp(int) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
getTimestamp(int, Calendar) - Method in interface java.sql.CallableStatement
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
getTimestamp(int, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
getTimestamp(String) - Method in interface java.sql.ResultSet
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
getTimestamp(String, Calendar) - Method in interface java.sql.ResultSet
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
getTimeToLive() - Method in class java.net.MulticastSocket
Get the default time-to-live for multicast packets sent out on the socket.
getTimeToLive() - Method in class java.net.DatagramSocketImpl
Retrieve the TTL (time-to-live) option.
getTimeZone() - Method in class java.text.DateFormat
Gets the time zone.
getTimeZone() - Method in class java.util.Calendar
Gets the time zone.
getTimeZone(String) - Static method in class java.util.TimeZone
Gets the TimeZone for the given ID.
getTimezoneOffset() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET).
getTipText() - Method in class javax.swing.JToolTip
Returns the text that is shown when the tool tip is displayed.
getTitle() - Method in class java.awt.Dialog
Gets the title of the dialog.
getTitle() - Method in class java.awt.Frame
Gets the title of the frame.
getTitle() - Method in class javax.swing.JInternalFrame
Returns the title of the JInternalFrame.
getTitle() - Method in class javax.swing.border.TitledBorder
Returns the title of the titled border.
getTitleAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab title at index.
getTitleColor() - Method in class javax.swing.border.TitledBorder
Returns the title-color of the titled border.
getTitleFont() - Method in class javax.swing.border.TitledBorder
Returns the title-font of the titled border.
getTitleJustification() - Method in class javax.swing.border.TitledBorder
Returns the title-justification of the titled border.
getTitlePosition() - Method in class javax.swing.border.TitledBorder
Returns the title-position of the titled border.
getToggleButtonBorder() - Static method in class javax.swing.plaf.basic.BasicBorders

getToggleButtonBorder() - Static method in class javax.swing.plaf.metal.MetalBorders
Returns a border instance for a JToggleButton
getToggleClickCount() - Method in class javax.swing.JTree
Returns the number of mouse clicks needed to expand or close a node.
getToIndex() - Method in class javax.swing.event.TableColumnModelEvent
Returns the toIndex.
getTokenThreshold() - Method in class javax.swing.text.html.HTMLDocument
Gets the number of tokens to buffer before trying to update the documents element structure.
getToolkit() - Method in class java.awt.Component
Gets the toolkit of this component.
getToolkit() - Method in class java.awt.Window
Returns the toolkit of this frame.
getToolTipLocation(MouseEvent) - Method in class javax.swing.JComponent
Returns the tooltip location in this component's coordinate system.
getToolTipText() - Method in class javax.swing.JComponent
Returns the tooltip string that has been set with setToolTipText().
getToolTipText(MouseEvent) - Method in class javax.swing.JComponent
Returns the string to be used as the tooltip for event.
getToolTipText(MouseEvent) - Method in class javax.swing.JTabbedPane
Returns the tooltip text for the component determined by the mouse event location.
getToolTipText(MouseEvent) - Method in class javax.swing.JTree
Overrides JComponent's getToolTipText method in order to allow renderer's tips to be used if it has text set.
getToolTipText(MouseEvent) - Method in class javax.swing.JTable
Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.
getToolTipText(MouseEvent) - Method in class javax.swing.table.JTableHeader
Allows the renderer's tips to be used if there is text set.
getToolTipTextAt(int) - Method in class javax.swing.JTabbedPane
Returns the tab tooltip text at index.
getToPage() - Method in class java.awt.JobAttributes
Returns, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed.
getTopComponent() - Method in class javax.swing.JSplitPane
Returns the component above, or to the left of the divider.
getTopInset() - Method in class javax.swing.text.CompositeView
Gets the top inset.
getTopInset() - Method in class javax.swing.text.AsyncBoxView
Get the top part of the margin around the view.
getTopLevelAncestor() - Method in class javax.swing.JComponent
Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
getTotalColumnWidth() - Method in class javax.swing.table.DefaultTableColumnModel
Returns the total combined width of all columns.
getTotalColumnWidth() - Method in interface javax.swing.table.TableColumnModel
Returns the total width of all the columns.
getTotalIn() - Method in class java.util.zip.Deflater
Returns the total number of bytes input so far.
getTotalIn() - Method in class java.util.zip.Inflater
Returns the total number of bytes input so far.
getTotalOut() - Method in class java.util.zip.Deflater
Returns the total number of bytes output so far.
getTotalOut() - Method in class java.util.zip.Inflater
Returns the total number of bytes output so far.
getTrackBounds() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
Return the current bounds of the track, i.e.
getTrackLength() - Method in class javax.swing.plaf.metal.MetalSliderUI
Returns the longer dimension of the slide bar.
getTrackMute(int) - Method in interface javax.sound.midi.Sequencer
Obtains the current mute state for a track.
getTracks() - Method in class javax.sound.midi.Sequence
Obtains an array containing all the tracks in this sequence.
getTrackSolo(int) - Method in interface javax.sound.midi.Sequencer
Obtains the current solo state for a track.
getTrackWidth() - Method in class javax.swing.plaf.metal.MetalSliderUI
Returns the shorter dimension of the track.
getTransactionIsolation() - Method in interface java.sql.Connection
Gets this Connection's current transaction isolation level.
getTransferable() - Method in class java.awt.dnd.DropTargetContext
get the Transferable (proxy) operand of this operation
getTransferable() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns the Transferable object associated with the drop.
getTransferable() - Method in class java.awt.dnd.DragSourceContext
This method returns the Transferable associated with this DragSourceContext.
getTransferData(DataFlavor) - Method in interface java.awt.datatransfer.Transferable
Returns an object which represents the data to be transferred.
getTransferData(DataFlavor) - Method in class java.awt.datatransfer.StringSelection
Returns the Transferable's data in the requested DataFlavor if possible.
getTransferData(DataFlavor) - Method in class java.awt.dnd.DropTargetContext.TransferableProxy
get the transfer data
getTransferDataFlavors() - Method in interface java.awt.datatransfer.Transferable
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
getTransferDataFlavors() - Method in class java.awt.datatransfer.StringSelection
Returns an array of flavors in which this Transferable can provide the data.
getTransferDataFlavors() - Method in class java.awt.dnd.DropTargetContext.TransferableProxy
get the flavors
getTransferSize() - Method in class java.sql.DataTruncation
Gets the number of bytes of data actually transferred.
getTransferType() - Method in class java.awt.image.SampleModel
Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
getTransferType() - Method in class java.awt.image.Raster
Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
getTransferType() - Method in class java.awt.image.ColorModel
Returns the transfer type of this ColorModel.
getTransferType() - Method in class java.awt.image.MultiPixelPackedSampleModel
Returns the TransferType used to transfer pixels by way of the getDataElements and setDataElements methods.
getTransform() - Method in class java.awt.Graphics2D
Returns a copy of the current Transform in the Graphics2D context.
getTransform() - Method in class java.awt.Font
Returns a copy of the transform associated with this Font.
getTransform() - Method in class java.awt.font.TransformAttribute
Returns a copy of the wrapped transform.
getTransform() - Method in class java.awt.font.FontRenderContext
Gets the transform that is used to scale typographical points to pixels in this FontRenderContext.
getTransform() - Method in class java.awt.image.AffineTransformOp
Returns the affine transform used by this transform operation.
getTransform() - Method in class java.awt.image.renderable.RenderContext
Gets the current user-to-device AffineTransform.
getTranslateInstance(double, double) - Static method in class java.awt.geom.AffineTransform
Returns a transform representing a translation transformation.
getTranslateX() - Method in class java.awt.geom.AffineTransform
Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix.
getTranslateY() - Method in class java.awt.geom.AffineTransform
Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix.
getTransmitter() - Static method in class javax.sound.midi.MidiSystem
Obtains a MIDI transmitter from an external MIDI port or other default source.
getTransmitter() - Method in interface javax.sound.midi.MidiDevice
Obtains a MIDI OUT connection from which the MIDI device will transmit MIDI data The returned transmitter must be closed when the application has finished using it.
getTransparency() - Method in class java.awt.TexturePaint
Returns the transparency mode for this TexturePaint.
getTransparency() - Method in interface java.awt.Transparency
Returns the type of this Transparency.
getTransparency() - Method in class java.awt.GradientPaint
Returns the transparency mode for this GradientPaint.
getTransparency() - Method in class java.awt.Color
Returns the transparency mode for this Color.
getTransparency() - Method in class java.awt.image.ColorModel
Returns the transparency.
getTransparency() - Method in class java.awt.image.IndexColorModel
Returns the transparency.
getTransparentPixel() - Method in class java.awt.image.IndexColorModel
Returns the index of the transparent pixel in this IndexColorModel or -1 if there is no transparent pixel.
getTRC() - Method in class java.awt.color.ICC_ProfileGray
Returns the TRC as an array of shorts.
getTRC(int) - Method in class java.awt.color.ICC_ProfileRGB
Returns the TRC for a particular component as an array of shorts.
getTreeCellEditorComponent(JTree, Object, boolean, boolean, boolean, int) - Method in class javax.swing.DefaultCellEditor

getTreeCellEditorComponent(JTree, Object, boolean, boolean, boolean, int) - Method in interface javax.swing.tree.TreeCellEditor
Sets an initial value for the editor.
getTreeCellEditorComponent(JTree, Object, boolean, boolean, boolean, int) - Method in class javax.swing.tree.DefaultTreeCellEditor
Configures the editor.
getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Configures the renderer based on the passed in components.
getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean) - Method in interface javax.swing.tree.TreeCellRenderer
Sets the value of the current tree cell to value.
getTreeComputerIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeControlIcon(boolean) - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeFloppyDriveIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeFolderIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeHardDriveIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeLeafIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getTreeLock() - Method in class java.awt.Component
Gets the locking object for AWT component-tree and layout Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
getTreeLock() - Method in class java.awt.MenuComponent
Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
getTreePath() - Method in class javax.swing.event.TreeModelEvent
For all events, except treeStructureChanged, returns the parent of the changed nodes.
getTrigger() - Method in class java.awt.dnd.DragSourceContext
This method returns the DragGestureEvent that initially triggered the drag.
getTriggerEvent() - Method in class java.awt.dnd.DragGestureRecognizer
This method returns the first event in the series of events that initiated the Drag and Drop operation.
getTriggerEvent() - Method in class java.awt.dnd.DragGestureEvent
This method returns the initial event that triggered the gesture.
getTTL() - Method in class java.net.MulticastSocket
Deprecated. use the getTimeToLive method instead, which returns an int instead of a byte.
getTTL() - Method in class java.net.DatagramSocketImpl
Deprecated. use getTimeToLive instead.
getType() - Method in class java.awt.GraphicsDevice
Returns the type of this GraphicsDevice.
getType() - Method in class java.awt.Cursor
Returns the type for this cursor.
getType() - Method in class java.awt.color.ColorSpace
Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...).
getType() - Method in class java.awt.font.GlyphMetrics
Returns the raw glyph type code.
getType() - Method in class java.awt.geom.AffineTransform
Retrieves the flag bits describing the conversion properties of this transform.
getType() - Method in class java.awt.image.BufferedImage
Returns the image type.
getType() - Method in class java.io.ObjectStreamField
Get the type of the field.
getType() - Method in class java.lang.reflect.Field
Returns a Class object that identifies the declared type for the field represented by this Field object.
getType() - Method in class java.security.KeyStore
Returns the type of this keystore.
getType() - Method in class java.security.cert.CertificateFactory
Returns the name of the certificate type associated with this certificate factory.
getType() - Method in class java.security.cert.Certificate
Returns the type of this certificate.
getType() - Method in class java.security.cert.CRL
Returns the type of this CRL.
getType() - Method in interface java.sql.ResultSet
Returns the type of this ResultSet object.
getType() - Method in interface javax.accessibility.AccessibleTableModelChange
Returns the type of event
getType() - Method in class javax.sound.sampled.Control
Obtains the control's type.
getType() - Method in class javax.sound.sampled.AudioFileFormat
Obtains the audio file type, such as WAVE or AU.
getType() - Method in class javax.sound.sampled.LineEvent
Obtains the event's type.
getType() - Method in class javax.sound.midi.MetaMessage
Obtains the type of the MetaMessage.
getType() - Method in class javax.sound.midi.MidiFileFormat
Obtains the MIDI file type.
getType() - Method in class javax.naming.RefAddr
Retrieves the address type of this address.
getType() - Method in class javax.naming.event.NamingEvent
Returns the type of this event.
getType() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

getType() - Method in interface javax.swing.event.DocumentEvent
Gets the type of event.
getType() - Method in class javax.swing.event.TableModelEvent
Returns the type of event - one of: INSERT, UPDATE and DELETE.
getType() - Method in class javax.swing.event.ListDataEvent
Returns the event type.
getType() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Returns the type of event.
getType() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Gets the element type.
getType() - Method in class javax.swing.text.html.parser.AttributeList

getType() - Method in class javax.swing.text.html.parser.Element
Get type.
getType() - Method in class javax.swing.text.html.parser.Entity
Get the type of the entity.
getType(char) - Static method in class java.lang.Character
Returns a value indicating a character category.
getTypeCode() - Method in class java.io.ObjectStreamField
Returns character encoding of field type.
getTypeDescription(File) - Method in class javax.swing.JFileChooser
Returns the file type.
getTypeDescription(File) - Method in class javax.swing.filechooser.FileView
A human readable description of the type of the file.
getTypeDescription(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

getTypeInfo() - Method in interface java.sql.DatabaseMetaData
Gets a description of all the standard SQL types supported by this database.
getTypeMap() - Method in interface java.sql.Connection
Gets the type map object associated with this connection.
getTypeString() - Method in class java.io.ObjectStreamField
Return the JVM type signature.
getUDTs(String, String, String, int[]) - Method in interface java.sql.DatabaseMetaData
Gets a description of the user-defined types defined in a particular schema.
getUI() - Method in class javax.swing.JViewport
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JTabbedPane
Returns the UI object which implements the L&F for this component.
getUI() - Method in class javax.swing.AbstractButton
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JOptionPane
Returns the UI object which implements the L&F for this component.
getUI() - Method in class javax.swing.JColorChooser
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JPopupMenu
Returns the look and feel (L&F) object that renders this component.
getUI() - Method in class javax.swing.JSeparator
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JComboBox
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JList
Returns the look and feel (L&F) object that renders this component.
getUI() - Method in class javax.swing.JToolTip
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JInternalFrame
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JSplitPane
Returns the SplitPaneUI that is providing the current look and feel.
getUI() - Method in class javax.swing.JTree
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JTable
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JLabel
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JFileChooser
Gets the UI object which implements the L&F for this component.
getUI() - Method in class javax.swing.JDesktopPane
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JToolBar
Returns the toolbar's current UI.
getUI() - Method in class javax.swing.JMenuBar
Returns the menubar's current UI.
getUI() - Method in class javax.swing.JScrollPane
Returns the look and feel (L&F) object that renders this component.
getUI() - Method in class javax.swing.JScrollBar
Returns the delegate that implements the look and feel for this component.
getUI() - Method in class javax.swing.JProgressBar
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JRootPane
Returns the L&F object that renders this component.
getUI() - Method in class javax.swing.JSlider
Gets the UI object which implements the L&F for this component.
getUI() - Method in class javax.swing.table.JTableHeader
Returns the look and feel (L&F) object that renders this component.
getUI() - Method in class javax.swing.text.JTextComponent
Fetches the user-interface factory for this text-oriented editor.
getUI(JComponent) - Method in class javax.swing.UIDefaults
Creates an ComponentUI implementation for the specified component.
getUI(JComponent) - Static method in class javax.swing.UIManager
Returns the L&F object that renders the target component.
getUIActionMap(JComponent) - Static method in class javax.swing.SwingUtilities
Returns the ActionMap provided by the UI in component component.
getUIClass(String) - Method in class javax.swing.UIDefaults
Returns the L&F class that renders this component.
getUIClass(String, ClassLoader) - Method in class javax.swing.UIDefaults
The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
getUIClassID() - Method in class javax.swing.JComponent
Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component.
getUIClassID() - Method in class javax.swing.JEditorPane
Gets the class ID for the UI.
getUIClassID() - Method in class javax.swing.JTextPane
Returns the class ID for the UI.
getUIClassID() - Method in class javax.swing.JViewport
Returns a string that specifies the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JTabbedPane
Returns the name of the UI class that implements the L&F for this component.
getUIClassID() - Method in class javax.swing.JMenuItem
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JCheckBoxMenuItem
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JToggleButton
Returns a string that specifies the name of the l&f class that renders this component.
getUIClassID() - Method in class javax.swing.JCheckBox
Returns a string that specifies the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JTextField
Gets the class ID for a UI.
getUIClassID() - Method in class javax.swing.JPasswordField
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JOptionPane
Returns the name of the UI class that implements the L&F for this component.
getUIClassID() - Method in class javax.swing.JMenu
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JColorChooser
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JButton
Returns a string that specifies the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JPopupMenu
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JSeparator
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JPopupMenu.Separator
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JComboBox
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JList
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
getUIClassID() - Method in class javax.swing.JToolTip
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JInternalFrame
Returns the name of the L&F class which renders this component.
getUIClassID() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JPanel
Returns a string that specifies the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JSplitPane
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JTree
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JTable
Returns the suffix used to construct the name of the L&F class used to render this component.
getUIClassID() - Method in class javax.swing.JLabel
Returns a string that specifies the name of the l&f class that renders this component.
getUIClassID() - Method in class javax.swing.JFileChooser
Returns a string that specifies the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JDesktopPane
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JRadioButton
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JToolBar
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JToolBar.Separator
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JMenuBar
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JRadioButtonMenuItem
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JTextArea
Returns the class ID for the UI.
getUIClassID() - Method in class javax.swing.JScrollPane
Returns the suffix used to construct the name of the L&F class used to render this component.
getUIClassID() - Method in class javax.swing.JScrollBar
Returns the name of the LookAndFeel class for this component.
getUIClassID() - Method in class javax.swing.JProgressBar
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.JRootPane
Returns a string that specifies the name of the l&f class that renders this component.
getUIClassID() - Method in class javax.swing.JSlider
Returns the name of the L&F class that renders this component.
getUIClassID() - Method in class javax.swing.table.JTableHeader
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
getUIError(String) - Method in class javax.swing.UIDefaults
If getUI() fails for any reason, it calls this method before returning null.
getUIInputMap(JComponent, int) - Static method in class javax.swing.SwingUtilities
Returns the InputMap provided by the UI for condition condition in component component.
getUIs() - Method in class javax.swing.plaf.multi.MultiListUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiLabelUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiPanelUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiTextUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiTreeUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiViewportUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiButtonUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiToolBarUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiSliderUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiTableUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiToolTipUI
Return the list of UI's associated with this multiplexing UI.
getUIs() - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Return the list of UI's associated with this multiplexing UI.
getUndeclaredThrowable() - Method in class java.lang.reflect.UndeclaredThrowableException
Returns the Throwable instance wrapped in this UndeclaredThrowableException.
getUnderlineOffset() - Method in class java.awt.font.LineMetrics
Returns the position of the underline relative to the baseline.
getUnderlineThickness() - Method in class java.awt.font.LineMetrics
Returns the thickness of the underline.
getUndoOrRedoPresentationName() - Method in class javax.swing.undo.UndoManager
Return the appropriate name for a command that toggles between undo and redo.
getUndoPresentationName() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Provides a localized, human readable description of the undoable form of this edit, e.g.
getUndoPresentationName() - Method in class javax.swing.undo.AbstractUndoableEdit
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName.
getUndoPresentationName() - Method in class javax.swing.undo.CompoundEdit
Returns getUndoPresentationName from the last UndoableEdit added to edits.
getUndoPresentationName() - Method in class javax.swing.undo.UndoManager
If inProgress, returns getUndoPresentationName of the significant edit that will be undone when undo() is invoked.
getUndoPresentationName() - Method in interface javax.swing.undo.UndoableEdit
Provide a localized, human readable description of the undoable form of this edit, e.g.
getUnexecutedModifications() - Method in class javax.naming.directory.AttributeModificationException
Retrieves the unexecuted modification list.
getUnicodeStream(int) - Method in interface java.sql.ResultSet
Deprecated. use getCharacterStream in place of getUnicodeStream
getUnicodeStream(String) - Method in interface java.sql.ResultSet
Deprecated.
getUnitIncrement() - Method in class java.awt.Scrollbar
Gets the unit increment for this scrollbar.
getUnitIncrement() - Method in interface java.awt.Adjustable
Gets the unit value increment for the adjustable object.
getUnitIncrement() - Method in class javax.swing.JScrollBar
For backwards compatibility with java.awt.Scrollbar.
getUnitIncrement(int) - Method in class javax.swing.JScrollBar
Returns the amount to change the scrollbar's value by, given a unit up/down request.
getUnitIncrement(int) - Method in class javax.swing.JScrollPane.ScrollBar
Computes the unit increment for scrolling if the viewport's view is a Scrollable object.
getUnits() - Method in class javax.sound.sampled.FloatControl
Obtains the label for the units in which the control's values are expressed, such as "dB" or "frames per second."
getUnnormalizedComponents(float[], int, int[], int) - Method in class java.awt.image.ColorModel
Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array.
getUpdateAction() - Method in class javax.swing.plaf.basic.BasicFileChooserUI

getUpdateCount() - Method in interface java.sql.Statement
Returns the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
getUpdateCounts() - Method in class java.sql.BatchUpdateException
Retrieves the update count for each update statement in the batch update that executed successfully before this exception occurred.
getUpdateLevel() - Method in class javax.swing.undo.UndoableEditSupport
Returns the update level value.
getUpdatePeriod() - Method in class javax.sound.sampled.FloatControl
Obtains the smallest time interval, in microseconds, over which the control's value can change during a shift.
getUpdateRect() - Method in class java.awt.event.PaintEvent
Returns the rectangle representing the area which needs to be repainted in response to this event.
getUpdateTableInRealTime() - Method in class javax.swing.table.JTableHeader
Obsolete as of Java 2 platform v1.3.
getURL() - Method in class java.net.URLConnection
Returns the value of this URLConnection's URL field.
getURL() - Method in interface java.sql.DatabaseMetaData
What's the url for this database?
getURL() - Method in class javax.swing.event.HyperlinkEvent
Gets the URL that the link refers to.
getURLContext(String, Hashtable) - Static method in class javax.naming.spi.NamingManager
Creates a context for the given URL scheme id.
getURLOrDefaultInitCtx(Name) - Method in class javax.naming.InitialContext
Retrieves a context for resolving name.
getURLOrDefaultInitCtx(String) - Method in class javax.naming.InitialContext
Retrieves a context for resolving the string name name.
getURLs() - Method in class java.net.URLClassLoader
Returns the search path of URLs for loading classes and resources.
getUseCaches() - Method in class java.net.URLConnection
Returns the value of this URLConnection's useCaches field.
getUserAction() - Method in class java.awt.dnd.DragSourceDragEvent
This method returns an int representing the user's currently selected drop action.
getUserInfo() - Method in class java.net.URL
Returns the userInfo part of this URL.
getUserName() - Method in class java.awt.print.PrinterJob
Gets the name of the printing user.
getUserName() - Method in class java.net.PasswordAuthentication
Returns the user name.
getUserName() - Method in interface java.sql.DatabaseMetaData
What's our user name as known to the database?
getUserObject() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns this node's user object.
getUserObjectPath() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the user object path, from the root, to get to this node.
getUserTextColor() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getUserTextColor() - Method in class javax.swing.plaf.metal.MetalTheme

getUserTextFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getUserTextFont() - Method in class javax.swing.plaf.metal.MetalTheme

getUserTextFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getVAdjustable() - Method in class java.awt.ScrollPane
Returns the Adjustable object which represents the state of the vertical scrollbar.
getValidPixels() - Method in class java.awt.image.IndexColorModel
Returns a BigInteger that indicates the valid/invalid pixels in the colormap.
getValue() - Method in class java.awt.Scrollbar
Gets the current value of this scroll bar.
getValue() - Method in interface java.awt.Adjustable
Gets the current value of the adjustable object.
getValue() - Method in class java.awt.event.AdjustmentEvent
Returns the current value in the adjustment event.
getValue() - Method in interface java.beans.PropertyEditor
Gets the property value.
getValue() - Method in class java.beans.PropertyEditorSupport
Gets the value of the property.
getValue() - Method in class java.rmi.dgc.Lease
Returns the lease duration.
getValue() - Method in class java.text.Annotation
Returns the value of the attribute, which may be null.
getValue() - Method in interface java.util.Map.Entry
Returns the value corresponding to this entry.
getValue() - Method in class java.util.zip.Adler32
Returns checksum value.
getValue() - Method in interface java.util.zip.Checksum
Returns the current checksum value.
getValue() - Method in class java.util.zip.CRC32
Returns CRC-32 value.
getValue() - Method in class javax.sound.sampled.EnumControl
Obtains this control's current value.
getValue() - Method in class javax.sound.sampled.FloatControl
Obtains this control's current value.
getValue() - Method in class javax.sound.sampled.BooleanControl
Obtains this control's current value.
getValue() - Method in class javax.swing.DefaultBoundedRangeModel
Return the model's current value.
getValue() - Method in class javax.swing.JOptionPane
Returns the value the user has selected.
getValue() - Method in interface javax.swing.BoundedRangeModel
Returns the model's current value.
getValue() - Method in class javax.swing.JScrollBar
Returns the scrollbar's value.
getValue() - Method in class javax.swing.JProgressBar
Returns the model's current value.
getValue() - Method in class javax.swing.JSlider
Returns the sliders value.
getValue() - Method in class javax.swing.text.html.Option
Convenience method to return the string associated with the value attribute.
getValue() - Method in class javax.swing.text.html.parser.AttributeList

getValue(Attributes.Name) - Method in class java.util.jar.Attributes
Returns the value of the specified Attributes.Name, or null if the attribute was not found.
getValue(String) - Method in class java.beans.FeatureDescriptor
Retrieve a named attribute with this feature.
getValue(String) - Method in class java.util.jar.Attributes
Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.
getValue(String) - Method in interface javax.swing.Action
Gets one of this object's properties using the associated key.
getValue(String) - Method in class javax.swing.AbstractAction
Gets the Object associated with the specified key.
getValueAt(int, int) - Method in class javax.swing.JTable
Returns the cell value at row and column.
getValueAt(int, int) - Method in class javax.swing.table.DefaultTableModel
Returns an attribute value for the cell at row and column.
getValueAt(int, int) - Method in interface javax.swing.table.TableModel
Returns the value for the cell at columnIndex and rowIndex.
getValueIsAdjusting() - Method in class javax.swing.DefaultBoundedRangeModel
Returns true if the value is in the process of changing as a result of actions being taken by the user.
getValueIsAdjusting() - Method in class javax.swing.DefaultListSelectionModel

getValueIsAdjusting() - Method in class javax.swing.JList
Returns the value of the data model's isAdjusting property.
getValueIsAdjusting() - Method in interface javax.swing.ListSelectionModel
Returns true if the value is undergoing a series of changes.
getValueIsAdjusting() - Method in interface javax.swing.BoundedRangeModel
Returns true if the current changes to the value property are part of a series of changes.
getValueIsAdjusting() - Method in class javax.swing.JScrollBar
True if the scrollbar knob is being dragged.
getValueIsAdjusting() - Method in class javax.swing.JSlider
True if the slider knob is being dragged.
getValueIsAdjusting() - Method in class javax.swing.event.ListSelectionEvent
Returns true if this is one of multiple change events.
getValues() - Method in class javax.sound.sampled.EnumControl
Returns the set of possible values for this control.
getValues() - Method in class javax.swing.text.html.parser.AttributeList

getVariant() - Method in class java.util.Locale
Returns the variant code for this locale.
getVariation() - Method in class java.awt.im.InputMethodHighlight
Returns the variation of the text range.
getVendor() - Method in class javax.sound.sampled.Mixer.Info
Obtains the vendor of the mixer.
getVendor() - Method in interface javax.sound.midi.Soundbank
Obtains a string naming the company that provides the sound bank
getVendor() - Method in class javax.sound.midi.MidiDevice.Info
Obtains the name of the company who supplies the device.
getVerifyInputWhenFocusTarget() - Method in class javax.swing.JComponent
Get the value that indicates whether the input verifier for the current focus owner will be called before this component requests focus.
getVersion() - Method in interface java.awt.font.OpenType
Returns the version of the OpenType font.
getVersion() - Method in class java.security.Provider
Returns the version number for this provider.
getVersion() - Method in class java.security.cert.X509Certificate
Gets the version (version number) value from the certificate.
getVersion() - Method in class java.security.cert.X509CRL
Gets the version (version number) value from the CRL.
getVersion() - Method in class javax.sound.sampled.Mixer.Info
Obtains the version of the mixer.
getVersion() - Method in interface javax.sound.midi.Soundbank
Obtains the version string for the sound bank.
getVersion() - Method in class javax.sound.midi.MidiDevice.Info
Obtains the version of the device.
getVersionColumns(String, String, String) - Method in interface java.sql.DatabaseMetaData
Gets a description of a table's columns that are automatically updated when any value in a row is updated.
getVerticalAlignment() - Method in class javax.swing.AbstractButton
Returns the vertical alignment of the text and icon.
getVerticalAlignment() - Method in class javax.swing.JLabel
Returns the alignment of the label's contents along the Y axis.
getVerticalLegBuffer() - Method in class javax.swing.plaf.basic.BasicTreeUI
The vertical element of legs between nodes starts at the bottom of the parent node by default.
getVerticalScrollBar() - Method in class javax.swing.ScrollPaneLayout
Returns the JScrollBar object that handles vertical scrolling.
getVerticalScrollBar() - Method in class javax.swing.JScrollPane
Returns the vertical scroll bar that controls the viewports vertical view position.
getVerticalScrollBarPolicy() - Method in class javax.swing.ScrollPaneLayout
Returns the vertical scrollbar-display policy.
getVerticalScrollBarPolicy() - Method in class javax.swing.JScrollPane
Returns the vertical scroll bar policy value.
getVerticalSliderThumbIcon() - Static method in class javax.swing.plaf.metal.MetalIconFactory

getVerticalTextPosition() - Method in class javax.swing.AbstractButton
Returns the vertical position of the text relative to the icon.
getVerticalTextPosition() - Method in class javax.swing.JLabel
Returns the vertical position of the label's text, relative to its image.
getVgap() - Method in class java.awt.CardLayout
Gets the vertical gap between components.
getVgap() - Method in class java.awt.GridLayout
Gets the vertical gap between components.
getVgap() - Method in class java.awt.BorderLayout
Returns the vertical gap between components.
getVgap() - Method in class java.awt.FlowLayout
Gets the vertical gap between components.
getView() - Method in class javax.swing.JViewport
Returns the JViewports one child or null.
getView(int) - Method in class javax.swing.text.View
Gets the nth child view.
getView(int) - Method in class javax.swing.text.CompositeView
Gets the n-th view in this container.
getView(int) - Method in class javax.swing.text.AsyncBoxView
Gets the nth child view.
getViewAtPoint(int, int, Rectangle) - Method in class javax.swing.text.CompositeView
Fetches the child view at the given point.
getViewAtPoint(int, int, Rectangle) - Method in class javax.swing.text.BoxView
Fetches the child view at the given point.
getViewAtPosition(int, Rectangle) - Method in class javax.swing.text.CompositeView
Fetches the child view that represents the given position in the model.
getViewAtPosition(int, Rectangle) - Method in class javax.swing.text.TableView
Fetches the child view that represents the given position in the model.
getViewAtPosition(int, Rectangle) - Method in class javax.swing.text.TableView.TableRow
Fetches the child view that represents the given position in the model.
getViewAttributes(View) - Method in class javax.swing.text.html.StyleSheet
Fetches a set of attributes to use in the view for displaying.
getViewCount() - Method in class javax.swing.text.View
Returns the number of views in this view.
getViewCount() - Method in class javax.swing.text.CompositeView
Returns the number of child views of this view.
getViewCount() - Method in class javax.swing.text.AsyncBoxView
Returns the number of views in this view.
getViewFactory() - Method in class javax.swing.text.View
Fetches the ViewFactory implementation that is feeding the view hierarchy.
getViewFactory() - Method in class javax.swing.text.EditorKit
Fetches a factory that is suitable for producing views of any models that are produced by this kit.
getViewFactory() - Method in class javax.swing.text.DefaultEditorKit
Fetches a factory that is suitable for producing views of any models that are produced by this kit.
getViewFactory() - Method in class javax.swing.text.StyledEditorKit
Fetches a factory that is suitable for producing views of any models that are produced by this kit.
getViewFactory() - Method in class javax.swing.text.html.HTMLEditorKit
Fetch a factory that is suitable for producing views of any models that are produced by this kit.
getViewIndex(int, Position.Bias) - Method in class javax.swing.text.View
Returns the child view index representing the given position in the model.
getViewIndex(int, Position.Bias) - Method in class javax.swing.text.CompositeView
Returns the child view index representing the given position in the model.
getViewIndex(int, Position.Bias) - Method in class javax.swing.text.AsyncBoxView
Returns the child view index representing the given position in the model.
getViewIndexAtPoint(float, float, Shape) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Fetches the child view index at the given point.
getViewIndexAtPosition(int) - Method in class javax.swing.text.CompositeView
Fetches the child view index representing the given position in the model.
getViewIndexAtPosition(int) - Method in class javax.swing.text.FlowView
Fetches the child view index representing the given position in the model.
getViewIndexAtPosition(int) - Method in class javax.swing.text.ZoneView
Fetches the child view index representing the given position in the model.
getViewIndexAtPosition(int, Position.Bias) - Method in class javax.swing.text.AsyncBoxView
Fetches the child view index representing the given position in the model.
getViewIndexAtVisualOffset(float) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Locate the view responsible for an offset into the box along the major axis.
getViewport() - Method in class javax.swing.ScrollPaneLayout
Returns the JViewport object that displays the scrollable contents.
getViewport() - Method in class javax.swing.JScrollPane
Returns the current JViewport.
getViewportBorder() - Method in class javax.swing.JScrollPane
Returns the Border object that surrounds the viewport.
getViewportBorderBounds() - Method in class javax.swing.JScrollPane
Returns the bounds of the viewport's border.
getViewportBorderBounds(JScrollPane) - Method in class javax.swing.ScrollPaneLayout
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().
getViewportSize() - Method in class java.awt.ScrollPane
Returns the current size of the scroll pane's view port.
getViewPosition() - Method in class javax.swing.JViewport
Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.
getViewRect() - Method in class javax.swing.JViewport
Returns a rectangle whose origin is getViewPosition and size is getExtentSize.
getViewSize() - Method in class javax.swing.JViewport
If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size.
getVisible() - Method in class java.awt.Scrollbar
Deprecated. As of JDK version 1.1, replaced by getVisibleAmount().
getVisibleAdvance() - Method in class java.awt.font.TextLayout
Returns the advance of this TextLayout, minus trailing whitespace.
getVisibleAmount() - Method in class java.awt.Scrollbar
Gets the visible amount of this scroll bar.
getVisibleAmount() - Method in interface java.awt.Adjustable
Gets the length of the propertional indicator.
getVisibleAmount() - Method in class javax.swing.JScrollBar
Returns the scrollbar's extent, aka its "visibleAmount".
getVisibleChildCount(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Returns the number of visible children for row.
getVisibleChildCount(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns the number of visible children for row.
getVisibleChildCount(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns the number of visible children for row.
getVisibleComponent() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI

getVisibleEditorRect() - Method in class javax.swing.plaf.basic.BasicTextUI
Gets the allocation to give the root View.
getVisibleIndex() - Method in class java.awt.List
Gets the index of the item that was last made visible by the method makeVisible.
getVisiblePathsFrom(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Returns an Enumerator that increments over the visible paths starting at the passed in location.
getVisiblePathsFrom(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns an Enumerator that increments over the visible paths starting at the passed in location.
getVisiblePathsFrom(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns an Enumerator that increments over the visible paths starting at the passed in location.
getVisiblePosition() - Method in class java.awt.event.InputMethodEvent
Gets the position that's most important to be visible.
getVisibleRect() - Method in class javax.swing.JComponent
Returns the Component's "visible rectangle" - the intersection of this component's visible rectangle:
getVisibleRowCount() - Method in class javax.swing.JList
Returns the preferred number of visible rows.
getVisibleRowCount() - Method in class javax.swing.JTree
Returns the number of rows that are displayed in the display area.
getVisualBounds() - Method in class java.awt.font.GlyphVector
Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector.
getVisualHighlightShape(TextHitInfo, TextHitInfo) - Method in class java.awt.font.TextLayout
Returns a Shape enclosing the visual selection in the specified range, extended to the bounds.
getVisualHighlightShape(TextHitInfo, TextHitInfo, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns a path enclosing the visual selection in the specified range, extended to bounds.
getVisualOtherHit(TextHitInfo) - Method in class java.awt.font.TextLayout
Returns the hit on the opposite side of the specified hit's caret.
getVMID() - Method in class java.rmi.dgc.Lease
Returns the client VMID associated with the lease.
getVoiceStatus() - Method in interface javax.sound.midi.Synthesizer
Obtains the current status of the voices produced by this synthesizer.
getVScrollbarWidth() - Method in class java.awt.ScrollPane
Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
getWantsInput() - Method in class javax.swing.JOptionPane
Returns true if a parentComponent will be provided for the user to input.
getWarnings() - Method in interface java.sql.Statement
Retrieves the first warning reported by calls on this Statement object.
getWarnings() - Method in interface java.sql.Connection
Returns the first warning reported by calls on this Connection.
getWarnings() - Method in interface java.sql.ResultSet
Returns the first warning reported by calls on this ResultSet object.
getWarningString() - Method in class java.awt.Window
Gets the warning string that is displayed with this window.
getWarningString() - Method in class javax.swing.JInternalFrame
Gets the warning string that is displayed with this window.
getWeekdays() - Method in class java.text.DateFormatSymbols
Gets weekday strings.
getWestPane() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI

getWhen() - Method in class java.awt.event.InputEvent
Returns the timestamp of when this event occurred.
getWhite() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWhite() - Method in class javax.swing.plaf.metal.MetalTheme

getWidth() - Method in class java.awt.Component
Return the current width of this component.
getWidth() - Method in class java.awt.Dimension
Returns the width of this dimension in double precision.
getWidth() - Method in class java.awt.Rectangle
Returns the width of the bounding Rectangle in double precision.
getWidth() - Method in class java.awt.geom.Dimension2D
Returns the width of this Dimension in double precision.
getWidth() - Method in class java.awt.geom.RectangularShape
Returns the width of the framing rectangle in double precision.
getWidth() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the width of this RoundRectangle2D in double precision.
getWidth() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the width of this RoundRectangle2D in double precision.
getWidth() - Method in class java.awt.geom.Rectangle2D.Float
Returns the width of this Rectangle2D in double precision.
getWidth() - Method in class java.awt.geom.Rectangle2D.Double
Returns the width of this Rectangle2D in double precision.
getWidth() - Method in class java.awt.geom.Arc2D.Float
Returns the width of the ellipse of which this arc is a partial section
getWidth() - Method in class java.awt.geom.Arc2D.Double
Returns the width of the ellipse of which this arc is a partial section
getWidth() - Method in class java.awt.geom.Ellipse2D.Float
Returns the overall width of this Ellipse2D in double precision.
getWidth() - Method in class java.awt.geom.Ellipse2D.Double
Returns the overall width of this Ellipse2D in double precision.
getWidth() - Method in class java.awt.image.SampleModel
Returns the width in pixels.
getWidth() - Method in class java.awt.image.Kernel
Returns the width of this Kernel.
getWidth() - Method in class java.awt.image.PixelGrabber
Get the width of the pixel buffer (after adjusting for image width).
getWidth() - Method in interface java.awt.image.RenderedImage
Returns the width of the RenderedImage.
getWidth() - Method in class java.awt.image.BufferedImage
Returns the width of the BufferedImage.
getWidth() - Method in class java.awt.image.Raster
Returns the width in pixels of the Raster.
getWidth() - Method in class java.awt.image.renderable.RenderableImageOp
Gets the width in user coordinate space.
getWidth() - Method in interface java.awt.image.renderable.RenderableImage
Gets the width in user coordinate space.
getWidth() - Method in class java.awt.print.Paper
Returns the width of the page in 1/72nds of an inch.
getWidth() - Method in class java.awt.print.PageFormat
Returns the width, in 1/72nds of an inch, of the page.
getWidth() - Method in class javax.swing.JComponent
Returns the current width of this component.
getWidth() - Method in class javax.swing.table.TableColumn
Returns the width of the TableColumn.
getWidth() - Method in class javax.swing.text.BoxView
The current width of the box.
getWidth(ImageObserver) - Method in class java.awt.Image
Determines the width of the image.
getWidth(ImageObserver) - Method in class java.awt.image.BufferedImage
Returns the actual width of the image.
getWidthOfHighValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getWidthOfLowValueLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getWidthOfWidestLabel() - Method in class javax.swing.plaf.basic.BasicSliderUI

getWidths() - Method in class java.awt.FontMetrics
Gets the advance widths of the first 256 characters in the Font.
getWindingRule() - Method in interface java.awt.geom.PathIterator
Returns the winding rule for determining the interior of the path.
getWindingRule() - Method in class java.awt.geom.GeneralPath
Returns the fill style winding rule.
getWindingRule() - Method in class java.awt.geom.FlatteningPathIterator
Returns the winding rule for determining the interior of the path.
getWindow() - Method in class java.awt.event.WindowEvent
Returns the originator of the event.
getWindowAncestor(Component) - Static method in class javax.swing.SwingUtilities

getWindowBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getWindowTitleBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowTitleBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getWindowTitleFont() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowTitleFont() - Method in class javax.swing.plaf.metal.MetalTheme

getWindowTitleFont() - Method in class javax.swing.plaf.metal.DefaultMetalTheme

getWindowTitleForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowTitleForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getWindowTitleInactiveBackground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowTitleInactiveBackground() - Method in class javax.swing.plaf.metal.MetalTheme

getWindowTitleInactiveForeground() - Static method in class javax.swing.plaf.metal.MetalLookAndFeel

getWindowTitleInactiveForeground() - Method in class javax.swing.plaf.metal.MetalTheme

getWordEnd(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the end of a word for the given location.
getWordInstance() - Static method in class java.text.BreakIterator
Create BreakIterator for word-breaks using default locale.
getWordInstance(Locale) - Static method in class java.text.BreakIterator
Create BreakIterator for word-breaks using specified locale.
getWordStart(JTextComponent, int) - Static method in class javax.swing.text.Utilities
Determines the start of a word for the given model location.
getWrapStyleWord() - Method in class javax.swing.JTextArea
Get the style of wrapping used if the text area is wrapping lines.
getWritableParent() - Method in class java.awt.image.WritableRaster
Returns the parent WritableRaster (if any) of this WritableRaster, or else null.
getWritableTile(int, int) - Method in class java.awt.image.BufferedImage
Checks out a tile for writing.
getWritableTile(int, int) - Method in interface java.awt.image.WritableRenderedImage
Checks out a tile for writing.
getWritableTileIndices() - Method in class java.awt.image.BufferedImage
Returns an array of Point objects indicating which tiles are checked out for writing.
getWritableTileIndices() - Method in interface java.awt.image.WritableRenderedImage
Returns an array of Point objects indicating which tiles are checked out for writing.
getWriteMethod() - Method in class java.beans.PropertyDescriptor
Gets the method that should be used to write the property value.
getWriter() - Method in class javax.swing.text.AbstractWriter
Returns the Writer that is used to output the content.
getX() - Method in class java.awt.Component
Return the current x coordinate of the components origin.
getX() - Method in class java.awt.Point
Returns the X coordinate of the point in double precision.
getX() - Method in class java.awt.Rectangle
Returns the X coordinate of the bounding Rectangle in double precision.
getX() - Method in class java.awt.event.MouseEvent
Returns the horizontal x position of the event relative to the source component.
getX() - Method in class java.awt.geom.Point2D
Returns the X coordinate of this Point2D in double precision.
getX() - Method in class java.awt.geom.RectangularShape
Returns the X coordinate of the upper left corner of the framing rectangle in double precision.
getX() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the X coordinate of this RoundRectangle2D in double precision.
getX() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the X coordinate of this RoundRectangle2D in double precision.
getX() - Method in class java.awt.geom.Rectangle2D.Float
Returns the X coordinate of this Rectangle2D in double precision.
getX() - Method in class java.awt.geom.Rectangle2D.Double
Returns the X coordinate of this Rectangle2D in double precision.
getX() - Method in class java.awt.geom.Point2D.Float
Returns the X coordinate of this Point2D in double precision.
getX() - Method in class java.awt.geom.Point2D.Double
Returns the X coordinate of this Point2D in double precision.
getX() - Method in class java.awt.geom.Arc2D.Float
Returns the x coordinate of the upper left corner of the arc.
getX() - Method in class java.awt.geom.Arc2D.Double
Returns the x coordinate of the upper left corner of the arc.
getX() - Method in class java.awt.geom.Ellipse2D.Float
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
getX() - Method in class java.awt.geom.Ellipse2D.Double
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
getX() - Method in interface java.security.interfaces.DSAPrivateKey
Returns the value of the private key, x.
getX() - Method in class java.security.spec.DSAPrivateKeySpec
Returns the private key x.
getX() - Method in class javax.swing.JComponent
Returns the current x coordinate of the component's origin.
getX1() - Method in class java.awt.geom.Line2D
Returns the X coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.Line2D.Float
Returns the X coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.Line2D.Double
Returns the X coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.QuadCurve2D
Returns the x coordinate of the start point in double in precision.
getX1() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the x coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the x coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.CubicCurve2D
Returns the X coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the X coordinate of the start point in double precision.
getX1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the X coordinate of the start point in double precision.
getX2() - Method in class java.awt.geom.Line2D
Returns the X coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.Line2D.Float
Returns the X coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.Line2D.Double
Returns the X coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.QuadCurve2D
Returns the x coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the x coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the x coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.CubicCurve2D
Returns the X coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the X coordinate of the end point in double precision.
getX2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the X coordinate of the end point in double precision.
getXOrigin() - Method in class java.awt.image.Kernel
Returns the X origin of this Kernel.
getY() - Method in class java.awt.Component
Return the current y coordinate of the components origin.
getY() - Method in class java.awt.Point
Returns the Y coordinate of the point in double precision.
getY() - Method in class java.awt.Rectangle
Returns the Y coordinate of the bounding Rectangle in double precision.
getY() - Method in class java.awt.event.MouseEvent
Returns the vertical y position of the event relative to the source component.
getY() - Method in class java.awt.geom.Point2D
Returns the Y coordinate of this Point2D in double precision.
getY() - Method in class java.awt.geom.RectangularShape
Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.
getY() - Method in class java.awt.geom.RoundRectangle2D.Float
Returns the Y coordinate of this RoundRectangle2D in double precision.
getY() - Method in class java.awt.geom.RoundRectangle2D.Double
Returns the Y coordinate of this RoundRectangle2D in double precision.
getY() - Method in class java.awt.geom.Rectangle2D.Float
Returns the Y coordinate of this Rectangle2D in double precision.
getY() - Method in class java.awt.geom.Rectangle2D.Double
Returns the Y coordinate of this Rectangle2D in double precision.
getY() - Method in class java.awt.geom.Point2D.Float
Returns the Y coordinate of this Point2D in double precision.
getY() - Method in class java.awt.geom.Point2D.Double
Returns the Y coordinate of this Point2D in double precision.
getY() - Method in class java.awt.geom.Arc2D.Float
Returns the y coordinate of the upper left corner of the arc.
getY() - Method in class java.awt.geom.Arc2D.Double
Returns the y coordinate of the upper left corner of the arc.
getY() - Method in class java.awt.geom.Ellipse2D.Float
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
getY() - Method in class java.awt.geom.Ellipse2D.Double
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
getY() - Method in interface java.security.interfaces.DSAPublicKey
Returns the value of the public key, y.
getY() - Method in class java.security.spec.DSAPublicKeySpec
Returns the public key y.
getY() - Method in class javax.swing.JComponent
Returns the current y coordinate of the component's origin.
getY1() - Method in class java.awt.geom.Line2D
Returns the Y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.Line2D.Float
Returns the Y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.Line2D.Double
Returns the Y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.QuadCurve2D
Returns the y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.CubicCurve2D
Returns the Y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the Y coordinate of the start point in double precision.
getY1() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the Y coordinate of the start point in double precision.
getY2() - Method in class java.awt.geom.Line2D
Returns the Y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.Line2D.Float
Returns the Y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.Line2D.Double
Returns the Y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.QuadCurve2D
Returns the y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.QuadCurve2D.Float
Returns the y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.QuadCurve2D.Double
Returns the y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.CubicCurve2D
Returns the Y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.CubicCurve2D.Float
Returns the Y coordinate of the end point in double precision.
getY2() - Method in class java.awt.geom.CubicCurve2D.Double
Returns the Y coordinate of the end point in double precision.
getYear() - Method in class java.sql.Time
Deprecated.
getYear() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900.
getYOrigin() - Method in class java.awt.image.Kernel
Returns the Y origin of this Kernel.
getZeroDigit() - Method in class java.text.DecimalFormatSymbols
Gets the character used for zero.
getZoneStrings() - Method in class java.text.DateFormatSymbols
Gets timezone strings.
GLASS_PANE - Static variable in class javax.accessibility.AccessibleRole
A pane that is guaranteed to be painted on top of all panes beneath it.
GLASS_PANE_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
glassPane - Variable in class javax.swing.JRootPane
The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.
glassPaneDispatcher - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI

globalHierarchyLock - Static variable in interface java.beans.beancontext.BeanContext
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
GlyphJustificationInfo - class java.awt.font.GlyphJustificationInfo.
The GlyphJustificationInfo class represents information about the justification properties of a glyph.
GlyphJustificationInfo(float, boolean, int, float, float, boolean, int, float, float) - Constructor for class java.awt.font.GlyphJustificationInfo
Constructs information about the justification properties of a glyph.
GlyphMetrics - class java.awt.font.GlyphMetrics.
The GlyphMetrics class represents infomation for a single glyph.
GlyphMetrics(float, Rectangle2D, byte) - Constructor for class java.awt.font.GlyphMetrics
Constructs a GlyphMetrics object.
GlyphVector - class java.awt.font.GlyphVector.
A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
GlyphVector() - Constructor for class java.awt.font.GlyphVector

GlyphView - class javax.swing.text.GlyphView.
A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
GlyphView.GlyphPainter - class javax.swing.text.GlyphView.GlyphPainter.
A class to perform rendering of the glyphs.
GlyphView.GlyphPainter() - Constructor for class javax.swing.text.GlyphView.GlyphPainter

GlyphView(Element) - Constructor for class javax.swing.text.GlyphView
Constructs a new view wrapped on an element.
GoodBreakWeight - Static variable in class javax.swing.text.View
The weight to indicate a view supports breaking, but better opportunities probably exist.
GOT_FOCUS - Static variable in class java.awt.Event
A component gained the focus.
gotDefault - Variable in class javax.naming.InitialContext
Field indicating whether the initial context has been obtained by calling NamingManager.getInitialContext().
gotFocus(Event, Object) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
grabFocus() - Method in class javax.swing.JComponent
Sets the focus on the receiving component if it doesn't already have it.
grabPixels() - Method in class java.awt.image.PixelGrabber
Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered.
grabPixels(long) - Method in class java.awt.image.PixelGrabber
Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered or until the specified timeout has elapsed.
GradientPaint - class java.awt.GradientPaint.
The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
GradientPaint(float, float, Color, float, float, Color) - Constructor for class java.awt.GradientPaint
Constructs a simple acyclic GradientPaint object.
GradientPaint(float, float, Color, float, float, Color, boolean) - Constructor for class java.awt.GradientPaint
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
GradientPaint(Point2D, Color, Point2D, Color) - Constructor for class java.awt.GradientPaint
Constructs a simple acyclic GradientPaint object.
GradientPaint(Point2D, Color, Point2D, Color, boolean) - Constructor for class java.awt.GradientPaint
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
GraphicAttribute - class java.awt.font.GraphicAttribute.
This class is used with the CHAR_REPLACEMENT attribute.
GraphicAttribute(int) - Constructor for class java.awt.font.GraphicAttribute
Constructs a GraphicAttribute.
Graphics - class java.awt.Graphics.
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Graphics() - Constructor for class java.awt.Graphics
Constructs a new Graphics object.
Graphics2D - class java.awt.Graphics2D.
This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
Graphics2D() - Constructor for class java.awt.Graphics2D
Constructs a new Graphics2D object.
GraphicsConfigTemplate - class java.awt.GraphicsConfigTemplate.
The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration.
GraphicsConfigTemplate() - Constructor for class java.awt.GraphicsConfigTemplate
This class is an abstract class so only subclasses can be instantiated.
GraphicsConfiguration - class java.awt.GraphicsConfiguration.
The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
GraphicsConfiguration() - Constructor for class java.awt.GraphicsConfiguration
This is an abstract class that cannot be instantiated directly.
GraphicsDevice - class java.awt.GraphicsDevice.
The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment.
GraphicsDevice() - Constructor for class java.awt.GraphicsDevice
This is an abstract class that cannot be instantiated directly.
GraphicsEnvironment - class java.awt.GraphicsEnvironment.
The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform.
GraphicsEnvironment() - Constructor for class java.awt.GraphicsEnvironment
This is an abstract class and cannot be instantiated directly.
gray - Static variable in class java.awt.Color
The color gray.
GrayFilter - class javax.swing.GrayFilter.
An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.
GrayFilter(boolean, int) - Constructor for class javax.swing.GrayFilter
Constructs a GrayFilter object that filters a color image to a grayscale image.
GREEK - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GREEK_EXTENDED - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
green - Static variable in class java.awt.Color
The color green.
GREENCOMPONENT - Static variable in class java.awt.color.ICC_ProfileRGB
To request a gamma value or TRC for the green component.
GregorianCalendar - class java.util.GregorianCalendar.
GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.
GregorianCalendar() - Constructor for class java.util.GregorianCalendar
Constructs a default GregorianCalendar using the current time in the default time zone with the default locale.
GregorianCalendar(int, int, int) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar with the given date set in the default time zone with the default locale.
GregorianCalendar(int, int, int, int, int) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(int, int, int, int, int, int) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(Locale) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.
GregorianCalendar(TimeZone) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar based on the current time in the given time zone with the default locale.
GregorianCalendar(TimeZone, Locale) - Constructor for class java.util.GregorianCalendar
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.
GridBagConstraints - class java.awt.GridBagConstraints.
The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
GridBagConstraints() - Constructor for class java.awt.GridBagConstraints
Creates a GridBagConstraint object with all of its fields set to their default value.
GridBagConstraints(int, int, int, int, double, double, int, int, Insets, int, int) - Constructor for class java.awt.GridBagConstraints
Creates a GridBagConstraints object with all of its fields set to the passed-in arguments.
GridBagLayout - class java.awt.GridBagLayout.
The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
GridBagLayout() - Constructor for class java.awt.GridBagLayout
Creates a grid bag layout manager.
gridColor - Variable in class javax.swing.JTable
The color of the grid.
gridheight - Variable in class java.awt.GridBagConstraints
Specifies the number of cells in a column for the component's display area.
GridLayout - class java.awt.GridLayout.
The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
GridLayout() - Constructor for class java.awt.GridLayout
Creates a grid layout with a default of one column per component, in a single row.
GridLayout(int, int) - Constructor for class java.awt.GridLayout
Creates a grid layout with the specified number of rows and columns.
GridLayout(int, int, int, int) - Constructor for class java.awt.GridLayout
Creates a grid layout with the specified number of rows and columns.
gridwidth - Variable in class java.awt.GridBagConstraints
Specifies the number of cells in a row for the component's display area.
gridx - Variable in class java.awt.GridBagConstraints
Specifies the cell at the left of the component's display area, where the leftmost cell has gridx=0.
gridy - Variable in class java.awt.GridBagConstraints
Specifies the cell at the top of the component's display area, where the topmost cell has gridy=0.
group - Variable in class javax.swing.DefaultButtonModel

Group - interface java.security.acl.Group.
This interface is used to represent a group of principals.
grow(int, int) - Method in class java.awt.Rectangle
Resizes the Rectangle both horizontally and vertically.
growAbsorb - Variable in class java.awt.font.GlyphJustificationInfo
If true, this glyph absorbs all extra space at this and lower priority levels when it grows.
growLeftLimit - Variable in class java.awt.font.GlyphJustificationInfo
The maximum amount by which the left side of this glyph can grow.
growPriority - Variable in class java.awt.font.GlyphJustificationInfo
The priority level of this glyph as it is growing.
growRightLimit - Variable in class java.awt.font.GlyphJustificationInfo
The maximum amount by which the right side of this glyph can grow.
Guard - interface java.security.Guard.
This interface represents a guard, which is an object that is used to protect access to another object.
GuardedObject - class java.security.GuardedObject.
A GuardedObject is an object that is used to protect access to another object.
GuardedObject(Object, Guard) - Constructor for class java.security.GuardedObject
Constructs a GuardedObject using the specified object and guard.
guessContentTypeFromName(String) - Static method in class java.net.URLConnection
Tries to determine the content type of an object, based on the specified "file" component of a URL.
guessContentTypeFromStream(InputStream) - Static method in class java.net.URLConnection
Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
GUJARATI - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GURMUKHI - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
GZIP_MAGIC - Static variable in class java.util.zip.GZIPInputStream
GZIP header magic number.
GZIPInputStream - class java.util.zip.GZIPInputStream.
This class implements a stream filter for reading compressed data in the GZIP format.
GZIPInputStream(InputStream) - Constructor for class java.util.zip.GZIPInputStream
Creates a new input stream with a default buffer size.
GZIPInputStream(InputStream, int) - Constructor for class java.util.zip.GZIPInputStream
Creates a new input stream with the specified buffer size.
GZIPOutputStream - class java.util.zip.GZIPOutputStream.
This class implements a stream filter for writing compressed data in the GZIP file format.
GZIPOutputStream(OutputStream) - Constructor for class java.util.zip.GZIPOutputStream
Creates a new output stream with a default buffer size.
GZIPOutputStream(OutputStream, int) - Constructor for class java.util.zip.GZIPOutputStream
Creates a new output stream with the specified buffer size.
Overview  Package  Class  Use  Tree  Deprecated   Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV LETTER   NEXT LETTER FRAMES    NO FRAMES
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 _


H-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

H

h - Variable in class java.lang.reflect.Proxy
the invocation handler for this proxy instance.
H1 - Static variable in class javax.swing.text.html.HTML.Tag
H2 - Static variable in class javax.swing.text.html.HTML.Tag
H3 - Static variable in class javax.swing.text.html.HTML.Tag
H4 - Static variable in class javax.swing.text.html.HTML.Tag
H5 - Static variable in class javax.swing.text.html.HTML.Tag
H6 - Static variable in class javax.swing.text.html.HTML.Tag
HALFWIDTH_AND_FULLWIDTH_FORMS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
HALFWIDTH_KATAKANA - Static variable in class java.awt.im.InputSubset
Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms character block.
HALIGN - Static variable in class javax.swing.text.html.HTML.Attribute
halt(int) - Method in class java.lang.Runtime
Forcibly terminates the currently running Java virtual machine.
HAND_CURSOR - Static variable in class java.awt.Cursor
The hand cursor type.
HAND_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.HAND_CURSOR.
handleComment(char[]) - Method in class javax.swing.text.html.parser.Parser
Called when an HTML comment is encountered.
handleComment(char[]) - Method in class javax.swing.text.html.parser.DocumentParser
handleComment(char[], int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleComment(char[], int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
handleEmptyTag(TagElement) - Method in class javax.swing.text.html.parser.Parser
Called when an empty tag is encountered.
handleEmptyTag(TagElement) - Method in class javax.swing.text.html.parser.DocumentParser
Handle Empty Tag.
handleEndOfLineString(String) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
This is invoked after the stream has been parsed, but before flush.
handleEndOfLineString(String) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
This is invoked after the stream has been parsed, but before flush.
handleEndTag(HTML.Tag, int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleEndTag(HTML.Tag, int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Callback from the parser.
handleEndTag(TagElement) - Method in class javax.swing.text.html.parser.Parser
Called when an end tag is encountered.
handleEndTag(TagElement) - Method in class javax.swing.text.html.parser.DocumentParser
Handle End Tag.
handleEOFInComment() - Method in class javax.swing.text.html.parser.Parser
handleError(int, String) - Method in class javax.swing.text.html.parser.Parser
An error has occurred.
handleError(int, String) - Method in class javax.swing.text.html.parser.DocumentParser
handleError(String, int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleEvent(Event) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
handleExpandControlClick(TreePath, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Messaged when the user clicks the particular row, this invokes toggleExpandState.
handleGetObject(String) - Method in class java.util.ResourceBundle
Get an object from a ResourceBundle.
handleGetObject(String) - Method in class java.util.PropertyResourceBundle
Override of ResourceBundle, same semantics
handleGetObject(String) - Method in class java.util.ListResourceBundle
Override of ResourceBundle, same semantics
handleJustify(float) - Method in class java.awt.font.TextLayout
Justify this layout.
handleSimpleTag(HTML.Tag, MutableAttributeSet, int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleSimpleTag(HTML.Tag, MutableAttributeSet, int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Callback from the parser.
handleStartTag(HTML.Tag, MutableAttributeSet, int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleStartTag(HTML.Tag, MutableAttributeSet, int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Callback from the parser.
handleStartTag(TagElement) - Method in class javax.swing.text.html.parser.Parser
Called when a start tag is encountered.
handleStartTag(TagElement) - Method in class javax.swing.text.html.parser.DocumentParser
Handle Start Tag.
handleText(char[]) - Method in class javax.swing.text.html.parser.Parser
Called when PCDATA is encountered.
handleText(char[]) - Method in class javax.swing.text.html.parser.DocumentParser
Handle Text.
handleText(char[], int) - Method in class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleText(char[], int) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Called by the parser to indicate a block of text was encountered.
handleTitle(char[]) - Method in class javax.swing.text.html.parser.Parser
Called when an HTML title tag is encountered.
HANGING_BASELINE - Static variable in class java.awt.Font
The baseline used in Devanigiri and similar scripts when laying out text
HANGING_BASELINE - Static variable in class java.awt.font.GraphicAttribute
Aligns origin of graphic to hanging baseline of line.
HANGUL_COMPATIBILITY_JAMO - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
HANGUL_JAMO - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
HANGUL_SYLLABLES - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
HANJA - Static variable in class java.awt.im.InputSubset
Constant for all Han characters used in writing Korean, including a subset of the CJK unified ideographs as well as Korean Han characters that may be defined as surrogate characters.
hardDriveIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
hasAlpha() - Method in class java.awt.image.ColorModel
Returns whether or not alpha is supported in this ColorModel.
hasBeenExpanded(TreePath) - Method in class javax.swing.JTree
Returns true if the node identified by the path has ever been expanded.
hasChanged() - Method in class java.util.Observable
Tests if this object has changed.
hasChildren - Variable in class javax.swing.JTree.DynamicUtilTreeNode
Does the this JTree have children? This property is currently not implemented.
HasControls - interface javax.naming.ldap.HasControls.
This interface is for returning controls with objects returned in NamingEnumerations.
hasCustomComponents - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI
This is set to true in validateComponent if a Component is contained in either the message or the buttons.
hasDynamicLocaleList() - Method in interface java.awt.im.spi.InputMethodDescriptor
Returns whether the list of available locales can change at runtime.
hasEntered - Variable in class javax.swing.plaf.basic.BasicComboPopup
hasExtensions() - Method in class java.security.cert.X509CRLEntry
Returns true if this CRL entry has extensions.
hasFocus - Variable in class javax.swing.tree.DefaultTreeCellRenderer
True if has focus.
hasFocus - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
hasFocus() - Method in class java.awt.Component
Returns true if this Component has the keyboard focus.
hasFocus() - Method in class javax.swing.JComponent
Returns true if this Component has the keyboard focus.
hash(Object, int) - Method in class org.omg.CORBA.portable.Delegate
Returns an ORB-internal identifier (hashcode) for this object reference.
hashCode() - Method in class java.awt.MenuShortcut
Returns the hashcode for this MenuShortcut.
hashCode() - Method in class java.awt.Insets
Returns the hash code for this Insets.
hashCode() - Method in class java.awt.Font
Returns a hashcode for this Font.
hashCode() - Method in class java.awt.RenderingHints
Returns the hash code value for this RenderingHints.
hashCode() - Method in class java.awt.RenderingHints.Key
The hash code for all Key objects will be the same as the system identity code of the object as defined by the System.identityHashCode() method.
hashCode() - Method in class java.awt.Color
Computes the hash code for this Color.
hashCode() - Method in class java.awt.Dimension
Returns the hash code for this Dimension.
hashCode() - Method in class java.awt.BasicStroke
Returns the hashcode for this stroke.
hashCode() - Method in class java.awt.PageAttributes
Returns a hash code value for this PageAttributes.
hashCode() - Method in class java.awt.JobAttributes
Returns a hash code value for this JobAttributes.
hashCode() - Method in class java.awt.AlphaComposite
Returns the hashcode for this composite.
hashCode() - Method in class java.awt.datatransfer.DataFlavor
Returns hash code for this DataFlavor.
hashCode() - Method in class java.awt.font.TextLayout
Returns the hash code of this TextLayout.
hashCode() - Method in class java.awt.font.ImageGraphicAttribute
Returns a hashcode for this ImageGraphicAttribute.
hashCode() - Method in class java.awt.font.TextHitInfo
Returns the hash code.
hashCode() - Method in class java.awt.font.ShapeGraphicAttribute
Returns a hashcode for this ShapeGraphicAttribute.
hashCode() - Method in class java.awt.geom.Point2D
Returns the hashcode for this Point2D.
hashCode() - Method in class java.awt.geom.Rectangle2D
Returns the hashcode for this Rectangle2D.
hashCode() - Method in class java.awt.geom.AffineTransform
Returns the hashcode for this transform.
hashCode() - Method in class java.awt.image.ColorModel
Returns the hash code for this ColorModel.
hashCode() - Method in class java.io.FilePermission
Returns the hash code value for this object.
hashCode() - Method in class java.io.File
Computes a hash code for this abstract pathname.
hashCode() - Method in class java.lang.Object
Returns a hash code value for the object.
hashCode() - Method in class java.lang.Character
Returns a hash code for this Character.
hashCode() - Method in class java.lang.Character.Subset
Returns the standard hash code as defined by the Object.hashCode() method.
hashCode() - Method in class java.lang.Long
Computes a hashcode for this Long.
hashCode() - Method in class java.lang.Short
Returns a hashcode for this Short.
hashCode() - Method in class java.lang.String
Returns a hashcode for this string.
hashCode() - Method in class java.lang.Float
Returns a hashcode for this Float object.
hashCode() - Method in class java.lang.Integer
Returns a hashcode for this Integer.
hashCode() - Method in class java.lang.Package
Return the hashcode computed from the package name.
hashCode() - Method in class java.lang.Byte
Returns a hashcode for this Byte.
hashCode() - Method in class java.lang.Double
Returns a hashcode for this Double object.
hashCode() - Method in class java.lang.Boolean
Returns a hash code for this Boolean object.
hashCode() - Method in class java.lang.reflect.Method
Returns a hashcode for this Method.
hashCode() - Method in class java.lang.reflect.Field
Returns a hashcode for this Field.
hashCode() - Method in class java.lang.reflect.Constructor
Returns a hashcode for this Constructor.
hashCode() - Method in class java.math.BigInteger
Returns the hash code for this BigInteger.
hashCode() - Method in class java.math.BigDecimal
Returns the hash code for this BigDecimal.
hashCode() - Method in class java.net.URL
Creates an integer suitable for hash table indexing.
hashCode() - Method in class java.net.SocketPermission
Returns the hash code value for this object.
hashCode() - Method in class java.net.InetAddress
Returns a hashcode for this IP address.
hashCode() - Method in class java.rmi.MarshalledObject
Return a hash code for this MarshalledObject.
hashCode() - Method in class java.rmi.activation.ActivationGroupDesc
Produce identical numbers for similar ActivationGroupDescs.
hashCode() - Method in class java.rmi.activation.ActivationGroupDesc.CommandEnvironment
Return identical values for similar CommandEnvironments.
hashCode() - Method in class java.rmi.activation.ActivationDesc
Return the same hashCode for similar ActivationDescs.
hashCode() - Method in class java.rmi.activation.ActivationGroupID
Returns a hashcode for the group's identifier.
hashCode() - Method in class java.rmi.activation.ActivationID
Returns a hashcode for the activation id.
hashCode() - Method in class java.rmi.dgc.VMID
Compute hash code for this VMID.
hashCode() - Method in class java.rmi.server.RemoteObject
Returns a hashcode for a remote object.
hashCode() - Method in class java.rmi.server.UID
Returns a hashcode for the UID.
hashCode() - Method in class java.rmi.server.ObjID
Returns the hash code for the ObjID (the object number).
hashCode() - Method in class java.security.Permission
Returns the hash code value for this Permission object.
hashCode() - Method in class java.security.BasicPermission
Returns the hash code value for this object.
hashCode() - Method in class java.security.CodeSource
Returns the hash code value for this object.
hashCode() - Method in class java.security.UnresolvedPermission
Returns the hash code value for this object.
hashCode() - Method in class java.security.Identity
Deprecated. Returns a hashcode for this identity.
hashCode() - Method in class java.security.AccessControlContext
Returns the hash code value for this context.
hashCode() - Method in class java.security.AllPermission
Returns the hash code value for this object.
hashCode() - Method in interface java.security.Principal
Returns a hashcode for this principal.
hashCode() - Method in class java.security.cert.Certificate
Returns a hashcode value for this certificate from its encoded form.
hashCode() - Method in class java.security.cert.X509CRLEntry
Returns a hashcode value for this CRL entry from its encoded form.
hashCode() - Method in class java.security.cert.X509CRL
Returns a hashcode value for this CRL from its encoded form.
hashCode() - Method in class java.text.AttributedCharacterIterator.Attribute
Returns a hash code value for the object.
hashCode() - Method in class java.text.NumberFormat
Overrides hashCode
hashCode() - Method in class java.text.ChoiceFormat
Generates a hash code for the message format object.
hashCode() - Method in class java.text.ParsePosition
Returns a hash code for this ParsePosition.
hashCode() - Method in class java.text.Collator
Generates the hash code for this Collator.
hashCode() - Method in class java.text.RuleBasedCollator
Generates the hash code for the table-based collation object
hashCode() - Method in class java.text.DateFormat
Overrides hashCode
hashCode() - Method in class java.text.CollationKey
Creates a hash code for this CollationKey.
hashCode() - Method in class java.text.StringCharacterIterator
Computes a hashcode for this iterator.
hashCode() - Method in class java.text.SimpleDateFormat
Override hashCode.
hashCode() - Method in class java.text.FieldPosition
Returns a hash code for this FieldPosition.
hashCode() - Method in class java.text.DateFormatSymbols
Override hashCode.
hashCode() - Method in class java.text.DecimalFormat
Overrides hashCode
hashCode() - Method in class java.text.DecimalFormatSymbols
Override hashCode.
hashCode() - Method in class java.text.MessageFormat
Generates a hash code for the message format object.
hashCode() - Method in class java.util.Hashtable
Returns the hash code value for this Map as per the definition in the Map interface.
hashCode() - Method in class java.util.Date
Returns a hash code value for this object.
hashCode() - Method in class java.util.BitSet
Returns a hash code value for this bit set.
hashCode() - Method in class java.util.AbstractSet
Returns the hash code value for this set.
hashCode() - Method in class java.util.AbstractMap
Returns the hash code value for this map.
hashCode() - Method in class java.util.AbstractList
Returns the hash code value for this list.
hashCode() - Method in class java.util.Vector
Returns the hash code value for this Vector.
hashCode() - Method in class java.util.PropertyPermission
Returns the hash code value for this object.
hashCode() - Method in interface java.util.Collection
Returns the hash code value for this collection.
hashCode() - Method in class java.util.SimpleTimeZone
Override hashCode.
hashCode() - Method in class java.util.Calendar
Returns a hash code for this calendar.
hashCode() - Method in class java.util.GregorianCalendar
Override hashCode.
hashCode() - Method in interface java.util.Set
Returns the hash code value for this set.
hashCode() - Method in interface java.util.List
Returns the hash code value for this list.
hashCode() - Method in class java.util.Locale
Override hashCode.
hashCode() - Method in interface java.util.Map
Returns the hash code value for this map.
hashCode() - Method in interface java.util.Map.Entry
Returns the hash code value for this map entry.
hashCode() - Method in class java.util.jar.Attributes
Returns the hash code value for this Map.
hashCode() - Method in class java.util.jar.Attributes.Name
Computes the hash value for this attribute name.
hashCode() - Method in class java.util.jar.Manifest
Returns the hash code for this Manifest.
hashCode() - Method in class java.util.zip.ZipEntry
Returns the hash code value for this entry.
hashCode() - Method in class javax.sound.sampled.Control.Type
Finalizes the hashCode method
hashCode() - Method in class javax.sound.sampled.Mixer.Info
Finalizes the hashcode method.
hashCode() - Method in class javax.sound.sampled.AudioFileFormat.Type
Finalizes the hashCode method
hashCode() - Method in class javax.sound.sampled.LineEvent.Type
Finalizes the hashcode method.
hashCode() - Method in class javax.sound.sampled.AudioFormat.Encoding
Finalizes the hashCode method
hashCode() - Method in class javax.sound.sampled.ReverbType
Finalizes the hashcode method.
hashCode() - Method in class javax.sound.sampled.Port.Info
Finalizes the hashCode method
hashCode() - Method in class javax.sound.midi.MidiDevice.Info
Finalizes the hashcode method.
hashCode() - Method in class javax.sound.midi.Sequencer.SyncMode
Finalizes the hashcode method.
hashCode() - Method in class javax.naming.Reference
Computes the hash code of this reference.
hashCode() - Method in class javax.naming.RefAddr
Computes the hash code of this address using its address type and contents.
hashCode() - Method in class javax.naming.BinaryRefAddr
Computes the hash code of this address using its address type and contents.
hashCode() - Method in class javax.naming.CompoundName
Computes the hash code of this compound name.
hashCode() - Method in class javax.naming.CompositeName
Computes the hash code of this composite name.
hashCode() - Method in class javax.naming.directory.BasicAttribute
Calculates the hash code of this attribute.
hashCode() - Method in class javax.naming.directory.BasicAttributes
Calculates the hash code of this BasicAttributes.
hashCode() - Method in class javax.rmi.CORBA.Stub
Returns a hash code value for the object which is the same for all stubs that represent the same remote object.
hashCode() - Method in class javax.swing.KeyStroke
Returns a numeric value for this object that is likely to be reasonably unique, so it can be used as the index value in a Hashtable.
hashCode() - Method in class javax.swing.text.SimpleAttributeSet
Returns a hashcode for this set of attributes.
hashCode() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Returns a hashcode for this set of attributes.
hashCode() - Method in class javax.swing.text.TabStop
Returns the hashCode for the object.
hashCode() - Method in class javax.swing.text.html.HTML.UnknownTag
hashCode() - Method in class javax.swing.tree.TreePath
Returns the hashCode for the object.
hashCode() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns the hash code for this ObjectImpl object.
hashCode(Object) - Method in class org.omg.CORBA.portable.Delegate
Provide the implementation to override the hashCode() method of the delegating CORBA object.
hashCode(Stub) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.hashCode().
hashCode(URL) - Method in class java.net.URLStreamHandler
Provides the default hash calculation.
HashMap - class java.util.HashMap.
Hash table based implementation of the Map interface.
HashMap() - Constructor for class java.util.HashMap
Constructs a new, empty map with a default capacity and load factor, which is 0.75.
HashMap(int) - Constructor for class java.util.HashMap
Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75.
HashMap(int, float) - Constructor for class java.util.HashMap
Constructs a new, empty map with the specified initial capacity and the specified load factor.
HashMap(Map) - Constructor for class java.util.HashMap
Constructs a new map with the same mappings as the given map.
HashSet - class java.util.HashSet.
This class implements the Set interface, backed by a hash table (actually a HashMap instance).
HashSet() - Constructor for class java.util.HashSet
Constructs a new, empty set; the backing HashMap instance has default capacity and load factor, which is 0.75.
HashSet(Collection) - Constructor for class java.util.HashSet
Constructs a new set containing the elements in the specified collection.
HashSet(int) - Constructor for class java.util.HashSet
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75.
HashSet(int, float) - Constructor for class java.util.HashSet
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and the specified load factor.
Hashtable - class java.util.Hashtable.
This class implements a hashtable, which maps keys to values.
Hashtable() - Constructor for class java.util.Hashtable
Constructs a new, empty hashtable with a default capacity and load factor, which is 0.75.
Hashtable(int) - Constructor for class java.util.Hashtable
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
Hashtable(int, float) - Constructor for class java.util.Hashtable
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
Hashtable(Map) - Constructor for class java.util.Hashtable
Constructs a new hashtable with the same mappings as the given Map.
hasInitialContextFactoryBuilder() - Static method in class javax.naming.spi.NamingManager
Determines whether an initial context factory builder has been set.
hasListeners(String) - Method in class java.beans.PropertyChangeSupport
Check if there are any listeners for a specific property.
hasListeners(String) - Method in class java.beans.VetoableChangeSupport
Check if there are any listeners for a specific property.
hasListeners(String) - Method in class javax.swing.event.SwingPropertyChangeSupport
Check if there are any listeners for a specific property.
hasMore() - Method in interface javax.naming.NamingEnumeration
Determines whether there are any more elements in the enumeration.
hasMoreElements() - Method in interface java.util.Enumeration
Tests if this enumeration contains more elements.
hasMoreElements() - Method in class java.util.StringTokenizer
Returns the same value as the hasMoreTokens method.
hasMoreTokens() - Method in class java.util.StringTokenizer
Tests if there are more tokens available from this tokenizer's string.
hasNext() - Method in class java.beans.beancontext.BeanContextSupport.BCSIterator
hasNext() - Method in interface java.util.ListIterator
Returns true if this list iterator has more elements when traversing the list in the forward direction.
hasNext() - Method in interface java.util.Iterator
Returns true if the iteration has more elements.
hasPrevious() - Method in interface java.util.ListIterator
Returns true if this list iterator has more elements when traversing the list in the reverse direction.
hasSameRules(TimeZone) - Method in class java.util.TimeZone
Returns true if this zone has the same rule and offset as another zone.
hasSameRules(TimeZone) - Method in class java.util.SimpleTimeZone
Return true if this zone has the same rules and offset as another zone.
hasService(Class) - Method in class java.beans.beancontext.BeanContextServicesSupport
has a service, which may be delegated
hasService(Class) - Method in interface java.beans.beancontext.BeanContextServices
Reports whether or not a given service is currently available from this context.
hasTileWriters() - Method in class java.awt.image.BufferedImage
Returns whether or not any tile is checked out for writing.
hasTileWriters() - Method in interface java.awt.image.WritableRenderedImage
Returns whether any tile is checked out for writing.
hasUniformLineMetrics() - Method in class java.awt.FontMetrics
Checks to see if the Font has uniform line metrics.
hasUniformLineMetrics() - Method in class java.awt.Font
Checks whether or not this Font has uniform line metrics.
hasUnsupportedCriticalExtension() - Method in interface java.security.cert.X509Extension
Check if there is a critical extension that is not supported.
head - Variable in class javax.swing.text.html.parser.DTD
HEAD - Static variable in class javax.swing.text.html.HTML.Tag
header - Variable in class javax.swing.plaf.basic.BasicTableHeaderUI
The JTableHeader that is delegating the painting to this UI.
HEADER_RENDERER_PROPERTY - Static variable in class javax.swing.table.TableColumn
Obsolete as of Java 2 platform v1.3.
HEADER_ROW - Static variable in class javax.swing.event.TableModelEvent
Identifies the header row.
HEADER_VALUE_PROPERTY - Static variable in class javax.swing.table.TableColumn
Obsolete as of Java 2 platform v1.3.
headerRenderer - Variable in class javax.swing.table.TableColumn
The renderer used to draw the header of the column.
headerValue - Variable in class javax.swing.table.TableColumn
The header value of the column.
headMap(Object) - Method in class java.util.TreeMap
Returns a view of the portion of this map whose keys are strictly less than toKey.
headMap(Object) - Method in interface java.util.SortedMap
Returns a view of the portion of this sorted map whose keys are strictly less than toKey.
HEADPHONE - Static variable in class javax.sound.sampled.Port.Info
A type of port that sends audio to a headphone jack.
headSet(Object) - Method in class java.util.TreeSet
Returns a view of the portion of this set whose elements are strictly less than toElement.
headSet(Object) - Method in interface java.util.SortedSet
Returns a view of the portion of this sorted set whose elements are strictly less than toElement.
heavyWeightPopupEnabled - Variable in class javax.swing.ToolTipManager
HEBREW - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
height - Variable in class java.awt.Dimension
The height dimension.
height - Variable in class java.awt.Rectangle
The height of the Rectangle.
height - Variable in class java.awt.geom.RoundRectangle2D.Float
The height of this RoundRectangle2D.
height - Variable in class java.awt.geom.RoundRectangle2D.Double
The height of this RoundRectangle2D.
height - Variable in class java.awt.geom.Rectangle2D.Float
The height of this Rectangle2D.
height - Variable in class java.awt.geom.Rectangle2D.Double
The height of this Rectangle2D.
height - Variable in class java.awt.geom.Arc2D.Float
The overall height of the full ellipse of which this arc is a partial section (not considering the angular extents).
height - Variable in class java.awt.geom.Arc2D.Double
The overall height of the full ellipse (not considering the angular extents).
height - Variable in class java.awt.geom.Ellipse2D.Float
The overall height of this Ellipse2D.
height - Variable in class java.awt.geom.Ellipse2D.Double
The overall height of the Ellipse2D.
height - Variable in class java.awt.image.SampleModel
Height in pixels of the region of image data that this SampleModel describes.
height - Variable in class java.awt.image.Raster
The height of this Raster.
HEIGHT - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
HEIGHT - Static variable in class javax.swing.text.html.HTML.Attribute
HEIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
helpButtonMnemonic - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
helpButtonText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
helpButtonToolTipText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
hiddenDivider - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Divider that is used for noncontinuous layout mode.
HIDE_ON_CLOSE - Static variable in interface javax.swing.WindowConstants
The hide-window default window close operation
hide() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
hide() - Method in class java.awt.Window
Hide this Window, its subcomponents, and all of its owned children.
hide() - Method in class java.awt.Dialog
Hides the Dialog and then causes show() to return if it is currently blocked.
hide() - Method in class javax.swing.JComponent
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
hide() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.hide().
hide() - Method in interface javax.swing.plaf.basic.ComboPopup
Hides the popup
hidePopup() - Method in class javax.swing.JComboBox
Causes the combo box to close its popup window.
hideWindows() - Method in interface java.awt.im.spi.InputMethod
Closes or hides all windows opened by this input method instance or its class.
HIERARCHY_BOUNDS_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting hierarchy bounds events.
HIERARCHY_CHANGED - Static variable in class java.awt.event.HierarchyEvent
A modification was made to the entire hierarchy tree.
HIERARCHY_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting hierarchy events.
HIERARCHY_FIRST - Static variable in class java.awt.event.HierarchyEvent
Marks the first integer id for the range of hierarchy event ids.
HIERARCHY_LAST - Static variable in class java.awt.event.HierarchyEvent
Marks the last integer id for the range of ancestor event ids.
HierarchyBoundsAdapter - class java.awt.event.HierarchyBoundsAdapter.
An abstract adapter class for receiving ancestor moved and resized events.
HierarchyBoundsAdapter() - Constructor for class java.awt.event.HierarchyBoundsAdapter
HierarchyBoundsListener - interface java.awt.event.HierarchyBoundsListener.
The listener interface for receiving ancestor moved and resized events.
hierarchyChanged(HierarchyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.
hierarchyChanged(HierarchyEvent) - Method in interface java.awt.event.HierarchyListener
Called when the hierarchy has been changed.
HierarchyEvent - class java.awt.event.HierarchyEvent.
An event which indicates a change to the Component hierarchy to which a Component belongs.
HierarchyEvent(Component, int, Component, Container) - Constructor for class java.awt.event.HierarchyEvent
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
HierarchyEvent(Component, int, Component, Container, long) - Constructor for class java.awt.event.HierarchyEvent
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
HierarchyListener - interface java.awt.event.HierarchyListener.
The listener interface for receiving hierarchy changed events.
HIGH - Static variable in class java.awt.PageAttributes.PrintQualityType
The PrintQualityType instance to use for specifying a high print quality.
highestLayer() - Method in class javax.swing.JLayeredPane
Returns the highest layer value from all current children.
highlight - Variable in class javax.swing.border.EtchedBorder
highlight - Variable in class javax.swing.plaf.basic.BasicSeparatorUI
highlight - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
highlight - Variable in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
highlight - Variable in class javax.swing.plaf.basic.BasicBorders.FieldBorder
highlight - Variable in class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
highlightColor - Static variable in class javax.swing.plaf.metal.MetalSliderUI
Highlighter - interface javax.swing.text.Highlighter.
An interface for an object that allows one to mark up the background with colored areas.
Highlighter.Highlight - interface javax.swing.text.Highlighter.Highlight.
Highlighter.HighlightPainter - interface javax.swing.text.Highlighter.HighlightPainter.
Highlight renderer.
highlightInner - Variable in class javax.swing.border.BevelBorder
highlightOuter - Variable in class javax.swing.border.BevelBorder
HINTS_OBSERVED - Static variable in interface java.awt.image.renderable.RenderableImage
String constant that can be used to identify a property on a RenderedImage obtained via the createRendering or createScaledRendering methods.
HIRAGANA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
hit(Rectangle, Shape, boolean) - Method in class java.awt.Graphics2D
Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space.
hitClip(int, int, int, int) - Method in class java.awt.Graphics
Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area.
hitTestChar(float, float) - Method in class java.awt.font.TextLayout
Returns a TextHitInfo corresponding to the specified point.
hitTestChar(float, float, Rectangle2D) - Method in class java.awt.font.TextLayout
Returns a TextHitInfo corresponding to the specified point.
HOME - Static variable in class java.awt.Event
The Home key, a non-ASCII action key.
homeFolderIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
homeKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
HORIZONTAL - Static variable in class java.awt.Scrollbar
A constant that indicates a horizontal scroll bar.
HORIZONTAL - Static variable in interface java.awt.Adjustable
The horizontal orientation.
HORIZONTAL - Static variable in class java.awt.GridBagConstraints
Resize the component horizontally but not vertically.
HORIZONTAL - Static variable in class javax.accessibility.AccessibleState
Indicates the orientation of this object is horizontal.
HORIZONTAL - Static variable in interface javax.swing.SwingConstants
Horizontal orientation.
HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's horizontal alignment.
HORIZONTAL_SCROLLBAR - Static variable in interface javax.swing.ScrollPaneConstants
Identifies a horizonal scrollbar.
HORIZONTAL_SCROLLBAR_ALWAYS - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the horizontal scroll bar policy so that horizontal scrollbars are always displayed.
HORIZONTAL_SCROLLBAR_AS_NEEDED - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the horizontal scroll bar policy so that horizontal scrollbars are displayed only when needed.
HORIZONTAL_SCROLLBAR_NEVER - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the horizontal scroll bar policy so that horizontal scrollbars are never displayed.
HORIZONTAL_SCROLLBAR_POLICY - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the horizontal scroll bar policy property.
HORIZONTAL_SPLIT - Static variable in class javax.swing.JSplitPane
Horizontal split indicates the Components are split along the x axis.
HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's horizontal text position.
horizontalScrollBar - Variable in class javax.swing.JScrollPane
The scrollpane's horizontal scrollbar child.
horizontalScrollBarPolicy - Variable in class javax.swing.JScrollPane
The display policy for the horizontal scrollbar.
horizThumbIcon - Static variable in class javax.swing.plaf.metal.MetalSliderUI
hostsEqual(URL, URL) - Method in class java.net.URLStreamHandler
Compares the host components of two URLs.
HOUR - Static variable in class java.util.Calendar
Field number for get and set indicating the hour of the morning or afternoon.
HOUR_OF_DAY - Static variable in class java.util.Calendar
Field number for get and set indicating the hour of the day.
HOUR_OF_DAY0_FIELD - Static variable in class java.text.DateFormat
Useful constant for zero-based HOUR_OF_DAY field alignment.
HOUR_OF_DAY1_FIELD - Static variable in class java.text.DateFormat
Useful constant for one-based HOUR_OF_DAY field alignment.
HOUR0_FIELD - Static variable in class java.text.DateFormat
Useful constant for zero-based HOUR field alignment.
HOUR1_FIELD - Static variable in class java.text.DateFormat
Useful constant for one-based HOUR field alignment.
HR - Static variable in class javax.swing.text.html.HTML.Tag
HREF - Static variable in class javax.swing.text.html.HTML.Attribute
hsb - Variable in class javax.swing.ScrollPaneLayout
The scrollpanes horizontal scrollbar child.
hsbChangeListener - Variable in class javax.swing.plaf.basic.BasicScrollPaneUI
hsbPolicy - Variable in class javax.swing.ScrollPaneLayout
The display policy for the horizontal scrollbar.
HSBtoRGB(float, float, float) - Static method in class java.awt.Color
Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.
HSPACE - Static variable in class javax.swing.text.html.HTML.Attribute
html - Variable in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
HTML to insert.
html - Variable in class javax.swing.text.html.parser.DTD
HTML - class javax.swing.text.html.HTML.
Constants used in the HTMLDocument.
HTML - Static variable in class javax.swing.text.html.HTML.Tag
HTML.Attribute - class javax.swing.text.html.HTML.Attribute.
Typesafe enumeration representing an html attribute.
HTML.Tag - class javax.swing.text.html.HTML.Tag.
Typesafe enumeration for an html tag.
HTML.Tag() - Constructor for class javax.swing.text.html.HTML.Tag
HTML.Tag(String) - Constructor for class javax.swing.text.html.HTML.Tag
HTML.Tag(String, boolean, boolean) - Constructor for class javax.swing.text.html.HTML.Tag
HTML.UnknownTag - class javax.swing.text.html.HTML.UnknownTag.
HTML.UnknownTag(String) - Constructor for class javax.swing.text.html.HTML.UnknownTag
HTML() - Constructor for class javax.swing.text.html.HTML
HTMLDocument - class javax.swing.text.html.HTMLDocument.
A document that models HTML.
HTMLDocument.BlockElement - class javax.swing.text.html.HTMLDocument.BlockElement.
An element that represents a structural block of HTML.
HTMLDocument.BlockElement(HTMLDocument, Element, AttributeSet) - Constructor for class javax.swing.text.html.HTMLDocument.BlockElement
Constructs a composite element that initially contains no children.
HTMLDocument.HTMLReader - class javax.swing.text.html.HTMLDocument.HTMLReader.
An HTML reader to load an HTML document with an HTML element structure.
HTMLDocument.HTMLReader.BlockAction - class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction.
HTMLDocument.HTMLReader.BlockAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
HTMLDocument.HTMLReader.CharacterAction - class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction.
HTMLDocument.HTMLReader.CharacterAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction
HTMLDocument.HTMLReader.FormAction - class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction.
Action to support forms by building all of the elements used to represent form controls.
HTMLDocument.HTMLReader.FormAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction
HTMLDocument.HTMLReader.HiddenAction - class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction.
HTMLDocument.HTMLReader.HiddenAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction
HTMLDocument.HTMLReader.IsindexAction - class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction.
HTMLDocument.HTMLReader.IsindexAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction
HTMLDocument.HTMLReader.ParagraphAction - class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction.
HTMLDocument.HTMLReader.ParagraphAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction
HTMLDocument.HTMLReader.PreAction - class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction.
HTMLDocument.HTMLReader.PreAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction
HTMLDocument.HTMLReader.SpecialAction - class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction.
HTMLDocument.HTMLReader.SpecialAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction
HTMLDocument.HTMLReader.TagAction - class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction.
An action to be performed in response to parsing a tag.
HTMLDocument.HTMLReader.TagAction(HTMLDocument.HTMLReader) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
HTMLDocument.HTMLReader(HTMLDocument, int) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader
HTMLDocument.HTMLReader(HTMLDocument, int, int, int, HTML.Tag) - Constructor for class javax.swing.text.html.HTMLDocument.HTMLReader
HTMLDocument.Iterator - class javax.swing.text.html.HTMLDocument.Iterator.
An iterator to iterate over a particular type of tag.
HTMLDocument.Iterator() - Constructor for class javax.swing.text.html.HTMLDocument.Iterator
HTMLDocument.RunElement - class javax.swing.text.html.HTMLDocument.RunElement.
An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.
HTMLDocument.RunElement(HTMLDocument, Element, AttributeSet, int, int) - Constructor for class javax.swing.text.html.HTMLDocument.RunElement
Constructs an element that represents content within the document (has no children).
HTMLDocument() - Constructor for class javax.swing.text.html.HTMLDocument
Constructs an HTML document.
HTMLDocument(AbstractDocument.Content, StyleSheet) - Constructor for class javax.swing.text.html.HTMLDocument
Constructs an HTML document with the given content storage implementation and the given style/attribute storage mechanism.
HTMLDocument(StyleSheet) - Constructor for class javax.swing.text.html.HTMLDocument
Constructs an HTML document with the default content storage implementation and the given style/attribute storage mechanism.
HTMLEditorKit - class javax.swing.text.html.HTMLEditorKit.
The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
HTMLEditorKit.HTMLFactory - class javax.swing.text.html.HTMLEditorKit.HTMLFactory.
A factory to build views for HTML.
HTMLEditorKit.HTMLFactory() - Constructor for class javax.swing.text.html.HTMLEditorKit.HTMLFactory
HTMLEditorKit.HTMLTextAction - class javax.swing.text.html.HTMLEditorKit.HTMLTextAction.
An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
HTMLEditorKit.HTMLTextAction(String) - Constructor for class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
HTMLEditorKit.InsertHTMLTextAction - class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction.
InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
HTMLEditorKit.InsertHTMLTextAction(String, String, HTML.Tag, HTML.Tag) - Constructor for class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
HTMLEditorKit.InsertHTMLTextAction(String, String, HTML.Tag, HTML.Tag, HTML.Tag, HTML.Tag) - Constructor for class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
HTMLEditorKit.LinkController - class javax.swing.text.html.HTMLEditorKit.LinkController.
Class to watch the associated component and fire hyperlink events on it when appropriate.
HTMLEditorKit.LinkController() - Constructor for class javax.swing.text.html.HTMLEditorKit.LinkController
HTMLEditorKit.Parser - class javax.swing.text.html.HTMLEditorKit.Parser.
Interface to be supported by the parser.
HTMLEditorKit.Parser() - Constructor for class javax.swing.text.html.HTMLEditorKit.Parser
HTMLEditorKit.ParserCallback - class javax.swing.text.html.HTMLEditorKit.ParserCallback.
The result of parsing drives these callback methods.
HTMLEditorKit.ParserCallback() - Constructor for class javax.swing.text.html.HTMLEditorKit.ParserCallback
HTMLEditorKit() - Constructor for class javax.swing.text.html.HTMLEditorKit
Constructs an HTMLEditorKit, creates a StyleContext, and loads the style sheet.
HTMLFrameHyperlinkEvent - class javax.swing.text.html.HTMLFrameHyperlinkEvent.
HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.
HTMLFrameHyperlinkEvent(Object, HyperlinkEvent.EventType, URL, Element, String) - Constructor for class javax.swing.text.html.HTMLFrameHyperlinkEvent
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object, HyperlinkEvent.EventType, URL, String) - Constructor for class javax.swing.text.html.HTMLFrameHyperlinkEvent
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object, HyperlinkEvent.EventType, URL, String, Element, String) - Constructor for class javax.swing.text.html.HTMLFrameHyperlinkEvent
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object, HyperlinkEvent.EventType, URL, String, String) - Constructor for class javax.swing.text.html.HTMLFrameHyperlinkEvent
Creates a new object representing a hypertext link event.
HTMLWriter - class javax.swing.text.html.HTMLWriter.
This is a writer for HTMLDocuments.
HTMLWriter(Writer, HTMLDocument) - Constructor for class javax.swing.text.html.HTMLWriter
Creates a new HTMLWriter.
HTMLWriter(Writer, HTMLDocument, int, int) - Constructor for class javax.swing.text.html.HTMLWriter
Creates a new HTMLWriter.
HTTP_ACCEPTED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 202: Accepted.
HTTP_BAD_GATEWAY - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 502: Bad Gateway.
HTTP_BAD_METHOD - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 405: Method Not Allowed.
HTTP_BAD_REQUEST - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 400: Bad Request.
HTTP_CLIENT_TIMEOUT - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 408: Request Time-Out.
HTTP_CONFLICT - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 409: Conflict.
HTTP_CREATED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 201: Created.
HTTP_ENTITY_TOO_LARGE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 413: Request Entity Too Large.
HTTP_FORBIDDEN - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 403: Forbidden.
HTTP_GATEWAY_TIMEOUT - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 504: Gateway Timeout.
HTTP_GONE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 410: Gone.
HTTP_INTERNAL_ERROR - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 500: Internal Server Error.
HTTP_LENGTH_REQUIRED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 411: Length Required.
HTTP_MOVED_PERM - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 301: Moved Permanently.
HTTP_MOVED_TEMP - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 302: Temporary Redirect.
HTTP_MULT_CHOICE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 300: Multiple Choices.
HTTP_NO_CONTENT - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 204: No Content.
HTTP_NOT_ACCEPTABLE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 406: Not Acceptable.
HTTP_NOT_AUTHORITATIVE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 203: Non-Authoritative Information.
HTTP_NOT_FOUND - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 404: Not Found.
HTTP_NOT_IMPLEMENTED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 501: Not Implemented.
HTTP_NOT_MODIFIED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 304: Not Modified.
HTTP_OK - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 200: OK.
HTTP_PARTIAL - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 206: Partial Content.
HTTP_PAYMENT_REQUIRED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 402: Payment Required.
HTTP_PRECON_FAILED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 412: Precondition Failed.
HTTP_PROXY_AUTH - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 407: Proxy Authentication Required.
HTTP_REQ_TOO_LONG - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 414: Request-URI Too Large.
HTTP_RESET - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 205: Reset Content.
HTTP_SEE_OTHER - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 303: See Other.
HTTP_SERVER_ERROR - Static variable in class java.net.HttpURLConnection
Deprecated. it is misplaced and shouldn't have existed.
HTTP_UNAUTHORIZED - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 401: Unauthorized.
HTTP_UNAVAILABLE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 503: Service Unavailable.
HTTP_UNSUPPORTED_TYPE - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 415: Unsupported Media Type.
HTTP_USE_PROXY - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 305: Use Proxy.
HTTP_VERSION - Static variable in class java.net.HttpURLConnection
HTTP Status-Code 505: HTTP Version Not Supported.
HTTPEQUIV - Static variable in class javax.swing.text.html.HTML.Attribute
HttpURLConnection - class java.net.HttpURLConnection.
A URLConnection with support for HTTP-specific features.
HttpURLConnection(URL) - Constructor for class java.net.HttpURLConnection
Constructor for the URLStreamHandler.
HUFFMAN_ONLY - Static variable in class java.util.zip.Deflater
Compression strategy for Huffman coding only.
HyperlinkEvent - class javax.swing.event.HyperlinkEvent.
HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
HyperlinkEvent.EventType - class javax.swing.event.HyperlinkEvent.EventType.
Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
HyperlinkEvent(Object, HyperlinkEvent.EventType, URL) - Constructor for class javax.swing.event.HyperlinkEvent
Creates a new object representing a hypertext link event.
HyperlinkEvent(Object, HyperlinkEvent.EventType, URL, String) - Constructor for class javax.swing.event.HyperlinkEvent
Creates a new object representing a hypertext link event.
HyperlinkListener - interface javax.swing.event.HyperlinkListener.
HyperlinkListener
hyperlinkUpdate(HyperlinkEvent) - Method in interface javax.swing.event.HyperlinkListener
Called when a hypertext link is updated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Package Hierarchies:
java.applet, java.awt, java.awt.color, java.awt.datatransfer, java.awt.dnd, java.awt.event, java.awt.font, java.awt.geom, java.awt.im, java.awt.im.spi, java.awt.image, java.awt.image.renderable, java.awt.print, java.beans, java.beans.beancontext, java.io, java.lang, java.lang.ref, java.lang.reflect, java.math, java.net, java.rmi, java.rmi.activation, java.rmi.dgc, java.rmi.registry, java.rmi.server, java.security, java.security.acl, java.security.cert, java.security.interfaces, java.security.spec, java.sql, java.text, java.util, java.util.jar, java.util.zip, javax.accessibility, javax.naming, javax.naming.directory, javax.naming.event, javax.naming.ldap, javax.naming.spi, javax.rmi, javax.rmi.CORBA, javax.sound.midi, javax.sound.midi.spi, javax.sound.sampled, javax.sound.sampled.spi, javax.swing, javax.swing.border, javax.swing.colorchooser, javax.swing.event, javax.swing.filechooser, javax.swing.plaf, javax.swing.plaf.basic, javax.swing.plaf.metal, javax.swing.plaf.multi, javax.swing.table, javax.swing.text, javax.swing.text.html, javax.swing.text.html.parser, javax.swing.text.rtf, javax.swing.tree, javax.swing.undo, javax.transaction, org.omg.CORBA, org.omg.CORBA_2_3, org.omg.CORBA_2_3.portable, org.omg.CORBA.DynAnyPackage, org.omg.CORBA.ORBPackage, org.omg.CORBA.portable, org.omg.CORBA.TypeCodePackage, org.omg.CosNaming, org.omg.CosNaming.NamingContextPackage, org.omg.SendingContext, org.omg.stub.java.rmi

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction
      • class javax.swing.plaf.basic.BasicSliderUI.ActionScroller
      • class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
      • class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction
      • class javax.swing.text.TextAction
        • class javax.swing.text.DefaultEditorKit.BeepAction
        • class javax.swing.text.DefaultEditorKit.CopyAction
        • class javax.swing.text.DefaultEditorKit.CutAction
        • class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
        • class javax.swing.text.DefaultEditorKit.InsertBreakAction
        • class javax.swing.text.DefaultEditorKit.InsertContentAction
        • class javax.swing.text.DefaultEditorKit.InsertTabAction
        • class javax.swing.text.DefaultEditorKit.PasteAction
        • class javax.swing.text.StyledEditorKit.StyledTextAction
          • class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
            • class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
          • class javax.swing.text.StyledEditorKit.AlignmentAction
          • class javax.swing.text.StyledEditorKit.BoldAction
          • class javax.swing.text.StyledEditorKit.FontFamilyAction
          • class javax.swing.text.StyledEditorKit.FontSizeAction
          • class javax.swing.text.StyledEditorKit.ForegroundAction
          • class javax.swing.text.StyledEditorKit.ItalicAction
          • class javax.swing.text.StyledEditorKit.UnderlineAction
    • class javax.swing.border.AbstractBorder (implements javax.swing.border.Border, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicBorders.ButtonBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
        • class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
      • class javax.swing.plaf.basic.BasicBorders.FieldBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.basic.BasicBorders.MarginBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.basic.BasicBorders.MenuBarBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.BevelBorder
        • class javax.swing.plaf.BorderUIResource.BevelBorderUIResource (implements javax.swing.plaf.UIResource)
        • class javax.swing.border.SoftBevelBorder
      • class javax.swing.border.CompoundBorder
        • class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.EmptyBorder (implements java.io.Serializable)
        • class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource (implements javax.swing.plaf.UIResource)
        • class javax.swing.border.MatteBorder
          • class javax.swing.plaf.BorderUIResource.MatteBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.EtchedBorder
        • class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.LineBorder
        • class javax.swing.plaf.BorderUIResource.LineBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.ButtonBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder
        • class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder
      • class javax.swing.plaf.metal.MetalBorders.Flush3DBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.metal.MetalBorders.TextFieldBorder
      • class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.MenuBarBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.MenuItemBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.PaletteBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
      • class javax.swing.plaf.metal.MetalBorders.ToolBarBorder (implements javax.swing.SwingConstants, javax.swing.plaf.UIResource)
      • class javax.swing.border.TitledBorder
        • class javax.swing.plaf.BorderUIResource.TitledBorderUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.AbstractButton.ButtonChangeListener (implements javax.swing.event.ChangeListener, java.io.Serializable)
    • class javax.swing.AbstractCellEditor (implements javax.swing.CellEditor, java.io.Serializable)
      • class javax.swing.DefaultCellEditor (implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor)
    • class java.util.AbstractCollection (implements java.util.Collection)
      • class java.util.AbstractList (implements java.util.List)
        • class java.util.AbstractSequentialList
          • class java.util.LinkedList (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
        • class java.util.ArrayList (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
        • class java.util.Vector (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
          • class java.util.Stack
      • class java.util.AbstractSet (implements java.util.Set)
        • class java.util.HashSet (implements java.lang.Cloneable, java.io.Serializable, java.util.Set)
        • class java.util.TreeSet (implements java.lang.Cloneable, java.io.Serializable, java.util.SortedSet)
    • class javax.swing.text.AbstractDocument (implements javax.swing.text.Document, java.io.Serializable)
      • class javax.swing.text.DefaultStyledDocument (implements javax.swing.text.StyledDocument)
        • class javax.swing.text.html.HTMLDocument
      • class javax.swing.text.PlainDocument
    • class javax.swing.text.AbstractDocument.AbstractElement (implements javax.swing.text.Element, javax.swing.text.MutableAttributeSet, java.io.Serializable, javax.swing.tree.TreeNode)
      • class javax.swing.text.AbstractDocument.BranchElement
        • class javax.swing.text.DefaultStyledDocument.SectionElement
        • class javax.swing.text.html.HTMLDocument.BlockElement
      • class javax.swing.text.AbstractDocument.LeafElement
        • class javax.swing.text.html.HTMLDocument.RunElement
    • class javax.swing.tree.AbstractLayoutCache (implements javax.swing.tree.RowMapper)
      • class javax.swing.tree.FixedHeightLayoutCache
      • class javax.swing.tree.VariableHeightLayoutCache
    • class javax.swing.tree.AbstractLayoutCache.NodeDimensions
      • class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
    • class javax.swing.AbstractListModel (implements javax.swing.ListModel, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicDirectoryModel (implements java.beans.PropertyChangeListener)
      • class javax.swing.DefaultComboBoxModel (implements javax.swing.MutableComboBoxModel, java.io.Serializable)
      • class javax.swing.DefaultListModel
      • class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel (implements javax.swing.ComboBoxModel)
      • class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel (implements javax.swing.ComboBoxModel, java.beans.PropertyChangeListener)
    • class java.util.AbstractMap (implements java.util.Map)
      • class java.util.HashMap (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
      • class java.util.TreeMap (implements java.lang.Cloneable, java.io.Serializable, java.util.SortedMap)
      • class java.util.WeakHashMap (implements java.util.Map)
    • class javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)
      • class javax.swing.table.DefaultTableModel (implements java.io.Serializable)
    • class javax.swing.undo.AbstractUndoableEdit (implements java.io.Serializable, javax.swing.undo.UndoableEdit)
      • class javax.swing.text.AbstractDocument.ElementEdit (implements javax.swing.event.DocumentEvent.ElementChange)
      • class javax.swing.undo.CompoundEdit
        • class javax.swing.text.AbstractDocument.DefaultDocumentEvent (implements javax.swing.event.DocumentEvent)
        • class javax.swing.undo.UndoManager (implements javax.swing.event.UndoableEditListener)
      • class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
      • class javax.swing.undo.StateEdit
    • class javax.swing.text.AbstractWriter
      • class javax.swing.text.html.HTMLWriter
      • class javax.swing.text.html.MinimalHTMLWriter
    • class java.security.AccessControlContext
    • class java.security.AccessController
    • class javax.accessibility.AccessibleBundle
      • class javax.accessibility.AccessibleRelation
      • class javax.accessibility.AccessibleRole
      • class javax.accessibility.AccessibleState
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class javax.swing.Box.Filler.AccessibleBoxFiller
        • class java.awt.Button.AccessibleAWTButton (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
        • class java.awt.Canvas.AccessibleAWTCanvas
        • class java.awt.Checkbox.AccessibleAWTCheckbox (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue, java.awt.event.ItemListener)
        • class java.awt.Choice.AccessibleAWTChoice (implements javax.accessibility.AccessibleAction)
        • class java.awt.Container.AccessibleAWTContainer
          • class javax.swing.Box.AccessibleBox
          • class javax.swing.CellRendererPane.AccessibleCellRendererPane
          • class javax.swing.JComponent.AccessibleJComponent
            • class javax.swing.AbstractButton.AccessibleAbstractButton (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleText, javax.accessibility.AccessibleValue)
              • class javax.swing.JButton.AccessibleJButton
              • class javax.swing.JMenuItem.AccessibleJMenuItem (implements javax.swing.event.ChangeListener)
                • class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
                • class javax.swing.JMenu.AccessibleJMenu (implements javax.accessibility.AccessibleSelection)
                • class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
              • class javax.swing.JToggleButton.AccessibleJToggleButton (implements java.awt.event.ItemListener)
                • class javax.swing.JCheckBox.AccessibleJCheckBox
                • class javax.swing.JRadioButton.AccessibleJRadioButton
            • class javax.swing.JColorChooser.AccessibleJColorChooser
            • class javax.swing.JComboBox.AccessibleJComboBox (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleSelection)
            • class javax.swing.JDesktopPane.AccessibleJDesktopPane
            • class javax.swing.JFileChooser.AccessibleJFileChooser
            • class javax.swing.JInternalFrame.AccessibleJInternalFrame (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JLabel.AccessibleJLabel (implements javax.accessibility.AccessibleText)
            • class javax.swing.JLayeredPane.AccessibleJLayeredPane
            • class javax.swing.JList.AccessibleJList (implements javax.accessibility.AccessibleSelection, javax.swing.event.ListDataListener, javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener)
            • class javax.swing.JMenuBar.AccessibleJMenuBar (implements javax.accessibility.AccessibleSelection)
            • class javax.swing.JOptionPane.AccessibleJOptionPane
            • class javax.swing.JPanel.AccessibleJPanel
            • class javax.swing.JPopupMenu.AccessibleJPopupMenu
            • class javax.swing.JProgressBar.AccessibleJProgressBar (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JRootPane.AccessibleJRootPane
            • class javax.swing.JScrollBar.AccessibleJScrollBar (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JScrollPane.AccessibleJScrollPane (implements javax.swing.event.ChangeListener)
            • class javax.swing.JSeparator.AccessibleJSeparator
            • class javax.swing.JSlider.AccessibleJSlider (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JSplitPane.AccessibleJSplitPane (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JTabbedPane.AccessibleJTabbedPane (implements javax.accessibility.AccessibleSelection, javax.swing.event.ChangeListener)
            • class javax.swing.JTable.AccessibleJTable (implements javax.accessibility.AccessibleSelection, javax.accessibility.AccessibleTable, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener)
            • class javax.swing.table.JTableHeader.AccessibleJTableHeader
            • class javax.swing.text.JTextComponent.AccessibleJTextComponent (implements javax.accessibility.AccessibleText, javax.swing.event.CaretListener, javax.swing.event.DocumentListener)
              • class javax.swing.JEditorPane.AccessibleJEditorPane
                • class javax.swing.JEditorPane.AccessibleJEditorPaneHTML
                • class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport (implements javax.accessibility.AccessibleHypertext)
              • class javax.swing.JTextArea.AccessibleJTextArea
              • class javax.swing.JTextField.AccessibleJTextField
                • class javax.swing.JPasswordField.AccessibleJPasswordField
            • class javax.swing.JToolBar.AccessibleJToolBar
            • class javax.swing.JToolTip.AccessibleJToolTip
            • class javax.swing.JTree.AccessibleJTree (implements javax.accessibility.AccessibleSelection, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener)
            • class javax.swing.JViewport.AccessibleJViewport
          • class java.awt.Panel.AccessibleAWTPanel
            • class java.applet.Applet.AccessibleApplet
              • class javax.swing.JApplet.AccessibleJApplet
          • class java.awt.ScrollPane.AccessibleAWTScrollPane
          • class java.awt.Window.AccessibleAWTWindow
            • class java.awt.Dialog.AccessibleAWTDialog
              • class javax.swing.JDialog.AccessibleJDialog
            • class java.awt.Frame.AccessibleAWTFrame
              • class javax.swing.JFrame.AccessibleJFrame
            • class javax.swing.JWindow.AccessibleJWindow
        • class java.awt.Label.AccessibleAWTLabel
        • class java.awt.List.AccessibleAWTList (implements javax.accessibility.AccessibleSelection, java.awt.event.ActionListener, java.awt.event.ItemListener)
        • class java.awt.List.AccessibleAWTList.AccessibleAWTListChild (implements javax.accessibility.Accessible)
        • class java.awt.Scrollbar.AccessibleAWTScrollBar (implements javax.accessibility.AccessibleValue)
        • class java.awt.TextComponent.AccessibleAWTTextComponent (implements javax.accessibility.AccessibleText, java.awt.event.TextListener)
          • class java.awt.TextArea.AccessibleAWTTextArea
          • class java.awt.TextField.AccessibleAWTTextField
      • class javax.swing.ImageIcon.AccessibleImageIcon (implements javax.accessibility.AccessibleIcon, java.io.Serializable)
      • class javax.swing.JList.AccessibleJList.AccessibleJListChild (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
      • class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
      • class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
      • class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode (implements javax.accessibility.Accessible, javax.accessibility.AccessibleAction, javax.accessibility.AccessibleComponent, javax.accessibility.AccessibleSelection)
      • class java.awt.MenuComponent.AccessibleAWTMenuComponent (implements javax.accessibility.AccessibleComponent, javax.accessibility.AccessibleSelection, java.io.Serializable)
        • class java.awt.MenuBar.AccessibleAWTMenuBar
        • class java.awt.MenuItem.AccessibleAWTMenuItem (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
          • class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
          • class java.awt.Menu.AccessibleAWTMenu
            • class java.awt.PopupMenu.AccessibleAWTPopupMenu
    • class javax.accessibility.AccessibleHyperlink (implements javax.accessibility.AccessibleAction)
      • class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
    • class java.lang.reflect.AccessibleObject
      • class java.lang.reflect.Constructor (implements java.lang.reflect.Member)
      • class java.lang.reflect.Field (implements java.lang.reflect.Member)
      • class java.lang.reflect.Method (implements java.lang.reflect.Member)
    • class javax.accessibility.AccessibleRelationSet
    • class javax.accessibility.AccessibleStateSet
    • class javax.swing.ActionMap (implements java.io.Serializable)
      • class javax.swing.plaf.ActionMapUIResource (implements javax.swing.plaf.UIResource)
    • class java.rmi.activation.ActivationDesc (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupDesc (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupDesc.CommandEnvironment (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupID (implements java.io.Serializable)
    • class java.rmi.activation.ActivationID (implements java.io.Serializable)
    • class java.util.zip.Adler32 (implements java.util.zip.Checksum)
    • class java.awt.geom.AffineTransform (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.image.AffineTransformOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.security.AlgorithmParameterGenerator
    • class java.security.AlgorithmParameterGeneratorSpi
    • class java.security.AlgorithmParameters
    • class java.security.AlgorithmParametersSpi
    • class java.awt.AlphaComposite (implements java.awt.Composite)
    • class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
    • class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.text.Annotation
    • class org.omg.CORBA.Any (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.AnyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.AnySeqHelper
    • class org.omg.CORBA.AnySeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.geom.Area (implements java.lang.Cloneable, java.awt.Shape)
    • class java.lang.reflect.Array
    • class java.util.Arrays
    • class javax.swing.text.AsyncBoxView.ChildLocator
    • class javax.swing.text.AsyncBoxView.ChildState (implements java.lang.Runnable)
    • class java.text.AttributedCharacterIterator.Attribute (implements java.io.Serializable)
      • class java.awt.font.TextAttribute
    • class java.text.AttributedString
    • class javax.swing.text.html.parser.AttributeList (implements javax.swing.text.html.parser.DTDConstants, java.io.Serializable)
    • class java.util.jar.Attributes (implements java.lang.Cloneable, java.util.Map)
    • class java.util.jar.Attributes.Name
    • class java.awt.AttributeValue
      • class java.awt.JobAttributes.DefaultSelectionType
      • class java.awt.JobAttributes.DestinationType
      • class java.awt.JobAttributes.DialogType
      • class java.awt.JobAttributes.MultipleDocumentHandlingType
      • class java.awt.JobAttributes.SidesType
      • class java.awt.PageAttributes.ColorType
      • class java.awt.PageAttributes.MediaType
      • class java.awt.PageAttributes.OrientationRequestedType
      • class java.awt.PageAttributes.OriginType
      • class java.awt.PageAttributes.PrintQualityType
    • class javax.sound.sampled.AudioFileFormat
    • class javax.sound.sampled.AudioFileFormat.Type
    • class javax.sound.sampled.spi.AudioFileReader
    • class javax.sound.sampled.spi.AudioFileWriter
    • class javax.sound.sampled.AudioFormat
    • class javax.sound.sampled.AudioFormat.Encoding
    • class javax.sound.sampled.AudioSystem
    • class java.net.Authenticator
    • class java.awt.AWTEventMulticaster (implements java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.HierarchyBoundsListener, java.awt.event.HierarchyListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.TextListener, java.awt.event.WindowListener)
    • class java.awt.image.BandCombineOp (implements java.awt.image.RasterOp)
    • class javax.naming.directory.BasicAttribute (implements javax.naming.directory.Attribute)
    • class javax.naming.directory.BasicAttributes (implements javax.naming.directory.Attributes)
    • class javax.swing.plaf.basic.BasicBorders
    • class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder (implements javax.swing.border.Border, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.basic.BasicButtonListener (implements javax.swing.event.ChangeListener, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicComboBoxEditor (implements javax.swing.ComboBoxEditor, java.awt.event.FocusListener)
      • class javax.swing.plaf.basic.BasicComboBoxEditor.UIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalComboBoxEditor
        • class javax.swing.plaf.metal.MetalComboBoxEditor.UIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager (implements java.awt.LayoutManager)
      • class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager
    • class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler (implements java.awt.event.ItemListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener
    • class javax.swing.plaf.basic.BasicComboPopup.ItemHandler (implements java.awt.event.ItemListener)
    • class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicGraphicsUtils
    • class javax.swing.plaf.basic.BasicHTML
    • class javax.swing.plaf.basic.BasicIconFactory (implements java.io.Serializable)
    • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener (implements javax.swing.event.InternalFrameListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler (implements java.awt.event.ComponentListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicListUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicListUI.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicListUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicSliderUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener
    • class javax.swing.plaf.basic.BasicSliderUI.ScrollListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
      • class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
    • class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager (implements java.awt.LayoutManager2)
      • class javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler (implements java.beans.PropertyChangeListener)
    • class java.awt.BasicStroke (implements java.awt.Stroke)
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout (implements java.awt.LayoutManager)
      • class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicTableUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTableUI.KeyHandler (implements java.awt.event.KeyListener)
    • class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.DockingListener (implements javax.swing.event.MouseInputListener)
      • class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener
    • class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener (implements java.awt.event.ContainerListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler (implements javax.swing.event.CellEditorListener)
    • class javax.swing.plaf.basic.BasicTreeUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler (implements javax.swing.event.TreeExpansionListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler (implements javax.swing.event.TreeModelListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler (implements javax.swing.event.TreeSelectionListener)
    • class java.beans.beancontext.BeanContextChildSupport (implements java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServicesListener, java.io.Serializable)
      • class java.beans.beancontext.BeanContextSupport (implements java.beans.beancontext.BeanContext, java.beans.PropertyChangeListener, java.io.Serializable, java.beans.VetoableChangeListener)
        • class java.beans.beancontext.BeanContextServicesSupport (implements java.beans.beancontext.BeanContextServices)
    • class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider (implements java.beans.beancontext.BeanContextServiceProvider, java.beans.beancontext.BeanContextServiceRevokedListener)
    • class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider (implements java.io.Serializable)
    • class java.beans.beancontext.BeanContextSupport.BCSChild (implements java.io.Serializable)
      • class java.beans.beancontext.BeanContextServicesSupport.BCSSChild
    • class java.beans.beancontext.BeanContextSupport.BCSIterator (implements java.util.Iterator)
    • class java.beans.Beans
    • class org.omg.CosNaming.Binding (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.BindingHelper
    • class org.omg.CosNaming.BindingHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingIteratorHelper
    • class org.omg.CosNaming.BindingIteratorHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingListHelper
    • class org.omg.CosNaming.BindingListHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingType (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.BindingTypeHelper
    • class org.omg.CosNaming.BindingTypeHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.util.BitSet (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.print.Book (implements java.awt.print.Pageable)
    • class java.lang.Boolean (implements java.io.Serializable)
    • class org.omg.CORBA.BooleanHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.BooleanSeqHelper
    • class org.omg.CORBA.BooleanSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class javax.swing.BorderFactory
    • class java.awt.BorderLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class javax.swing.plaf.BorderUIResource (implements javax.swing.border.Border, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.BoxLayout (implements java.awt.LayoutManager2, java.io.Serializable)
      • class javax.swing.plaf.basic.DefaultMenuLayout (implements javax.swing.plaf.UIResource)
    • class java.text.BreakIterator (implements java.lang.Cloneable)
    • class javax.swing.ButtonGroup (implements java.io.Serializable)
    • class org.omg.CORBA.ByteHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.util.Calendar (implements java.lang.Cloneable, java.io.Serializable)
      • class java.util.GregorianCalendar
    • class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
    • class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.CardLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.security.cert.Certificate (implements java.io.Serializable)
      • class java.security.cert.X509Certificate (implements java.security.cert.X509Extension)
    • class java.security.cert.Certificate.CertificateRep (implements java.io.Serializable)
    • class java.security.cert.CertificateFactory
    • class java.security.cert.CertificateFactorySpi
    • class java.lang.Character (implements java.lang.Comparable, java.io.Serializable)
    • class java.lang.Character.Subset
      • class java.lang.Character.UnicodeBlock
      • class java.awt.im.InputSubset
    • class org.omg.CORBA.CharHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.CharSeqHelper
    • class org.omg.CORBA.CharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.CheckboxGroup (implements java.io.Serializable)
    • class java.lang.Class (implements java.io.Serializable)
    • class javax.rmi.CORBA.ClassDesc (implements java.io.Serializable)
    • class java.lang.ClassLoader
      • class java.security.SecureClassLoader
        • class java.net.URLClassLoader
    • class java.awt.datatransfer.Clipboard
    • class java.security.CodeSource (implements java.io.Serializable)
    • class java.text.CollationElementIterator
    • class java.text.CollationKey (implements java.lang.Comparable)
    • class java.text.Collator (implements java.lang.Cloneable, java.util.Comparator)
      • class java.text.RuleBasedCollator
    • class java.util.Collections
    • class java.awt.Color (implements java.awt.Paint, java.io.Serializable)
      • class javax.swing.plaf.ColorUIResource (implements javax.swing.plaf.UIResource)
      • class java.awt.SystemColor (implements java.io.Serializable)
    • class javax.swing.colorchooser.ColorChooserComponentFactory
    • class java.awt.image.ColorConvertOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.ColorModel (implements java.awt.Transparency)
      • class java.awt.image.ComponentColorModel
      • class java.awt.image.IndexColorModel
      • class java.awt.image.PackedColorModel
        • class java.awt.image.DirectColorModel
    • class java.awt.color.ColorSpace (implements java.io.Serializable)
      • class java.awt.color.ICC_ColorSpace
    • class java.lang.Compiler
    • class org.omg.CORBA.CompletionStatus (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.CompletionStatusHelper
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class javax.swing.Box.Filler (implements javax.accessibility.Accessible)
      • class java.awt.Button (implements javax.accessibility.Accessible)
      • class java.awt.Canvas (implements javax.accessibility.Accessible)
      • class java.awt.Checkbox (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Choice (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Container
        • class javax.swing.plaf.basic.BasicSplitPaneDivider (implements java.beans.PropertyChangeListener)
        • class javax.swing.Box (implements javax.accessibility.Accessible)
        • class javax.swing.CellRendererPane (implements javax.accessibility.Accessible)
        • class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
            • class javax.swing.JButton (implements javax.accessibility.Accessible)
              • class javax.swing.plaf.basic.BasicArrowButton (implements javax.swing.SwingConstants)
                • class javax.swing.plaf.metal.MetalScrollButton
              • class javax.swing.plaf.metal.MetalComboBoxButton
            • class javax.swing.JMenuItem (implements javax.accessibility.Accessible, javax.swing.MenuElement)
              • class javax.swing.JCheckBoxMenuItem (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
              • class javax.swing.JMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
              • class javax.swing.JRadioButtonMenuItem (implements javax.accessibility.Accessible)
            • class javax.swing.JToggleButton (implements javax.accessibility.Accessible)
              • class javax.swing.JCheckBox (implements javax.accessibility.Accessible)
              • class javax.swing.JRadioButton (implements javax.accessibility.Accessible)
          • class javax.swing.plaf.basic.BasicInternalFrameTitlePane
            • class javax.swing.plaf.metal.MetalInternalFrameTitlePane
          • class javax.swing.JColorChooser (implements javax.accessibility.Accessible)
          • class javax.swing.JComboBox (implements javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.ItemSelectable, javax.swing.event.ListDataListener)
          • class javax.swing.JFileChooser (implements javax.accessibility.Accessible)
          • class javax.swing.JInternalFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class javax.swing.JInternalFrame.JDesktopIcon (implements javax.accessibility.Accessible)
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.plaf.basic.BasicComboBoxRenderer (implements javax.swing.ListCellRenderer, java.io.Serializable)
              • class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource (implements javax.swing.plaf.UIResource)
            • class javax.swing.DefaultListCellRenderer (implements javax.swing.ListCellRenderer, java.io.Serializable)
              • class javax.swing.DefaultListCellRenderer.UIResource (implements javax.swing.plaf.UIResource)
              • class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer
              • class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer
            • class javax.swing.table.DefaultTableCellRenderer (implements java.io.Serializable, javax.swing.table.TableCellRenderer)
              • class javax.swing.table.DefaultTableCellRenderer.UIResource (implements javax.swing.plaf.UIResource)
            • class javax.swing.tree.DefaultTreeCellRenderer (implements javax.swing.tree.TreeCellRenderer)
          • class javax.swing.JLayeredPane (implements javax.accessibility.Accessible)
            • class javax.swing.JDesktopPane (implements javax.accessibility.Accessible)
          • class javax.swing.JList (implements javax.accessibility.Accessible, javax.swing.Scrollable)
          • class javax.swing.JMenuBar (implements javax.accessibility.Accessible, javax.swing.MenuElement)
            • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
          • class javax.swing.JOptionPane (implements javax.accessibility.Accessible)
          • class javax.swing.JPanel (implements javax.accessibility.Accessible)
            • class javax.swing.colorchooser.AbstractColorChooserPanel
          • class javax.swing.JPopupMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
            • class javax.swing.plaf.basic.BasicComboPopup (implements javax.swing.plaf.basic.ComboPopup)
              • class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup
          • class javax.swing.JProgressBar (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JRootPane (implements javax.accessibility.Accessible)
          • class javax.swing.JScrollBar (implements javax.accessibility.Accessible, java.awt.Adjustable)
            • class javax.swing.JScrollPane.ScrollBar (implements javax.swing.plaf.UIResource)
          • class javax.swing.JScrollPane (implements javax.accessibility.Accessible, javax.swing.ScrollPaneConstants)
          • class javax.swing.JSeparator (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.JPopupMenu.Separator
            • class javax.swing.JToolBar.Separator
          • class javax.swing.JSlider (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JSplitPane (implements javax.accessibility.Accessible)
          • class javax.swing.JTabbedPane (implements javax.accessibility.Accessible, java.io.Serializable, javax.swing.SwingConstants)
          • class javax.swing.JTable (implements javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.Scrollable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener)
          • class javax.swing.table.JTableHeader (implements javax.accessibility.Accessible, javax.swing.event.TableColumnModelListener)
          • class javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
            • class javax.swing.JEditorPane
              • class javax.swing.JTextPane
            • class javax.swing.JTextArea
            • class javax.swing.JTextField (implements javax.swing.SwingConstants)
              • class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
              • class javax.swing.JPasswordField
          • class javax.swing.JToolBar (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JToolTip (implements javax.accessibility.Accessible)
          • class javax.swing.JTree (implements javax.accessibility.Accessible, javax.swing.Scrollable)
          • class javax.swing.JViewport (implements javax.accessibility.Accessible)
        • class java.awt.Panel (implements javax.accessibility.Accessible)
          • class java.applet.Applet
            • class javax.swing.JApplet (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
        • class java.awt.ScrollPane (implements javax.accessibility.Accessible)
        • class java.awt.Window (implements javax.accessibility.Accessible)
          • class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
          • class java.awt.Dialog
            • class java.awt.FileDialog
            • class javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class java.awt.Frame (implements java.awt.MenuContainer)
            • class javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class javax.swing.JWindow (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
      • class java.awt.Label (implements javax.accessibility.Accessible)
      • class java.awt.List (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Scrollbar (implements javax.accessibility.Accessible, java.awt.Adjustable)
      • class java.awt.TextComponent (implements javax.accessibility.Accessible)
        • class java.awt.TextArea
        • class java.awt.TextField
    • class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler (implements java.awt.event.ComponentListener)
    • class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler (implements java.awt.event.FocusListener)
    • class java.awt.event.ComponentAdapter (implements java.awt.event.ComponentListener)
      • class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler
      • class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler (implements java.awt.event.ActionListener)
      • class javax.swing.JViewport.ViewListener (implements java.io.Serializable)
    • class java.awt.ComponentOrientation (implements java.io.Serializable)
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.ButtonUI
        • class javax.swing.plaf.basic.BasicButtonUI
          • class javax.swing.plaf.basic.BasicToggleButtonUI
            • class javax.swing.plaf.basic.BasicRadioButtonUI
              • class javax.swing.plaf.basic.BasicCheckBoxUI
              • class javax.swing.plaf.metal.MetalRadioButtonUI
                • class javax.swing.plaf.metal.MetalCheckBoxUI
            • class javax.swing.plaf.metal.MetalToggleButtonUI
          • class javax.swing.plaf.metal.MetalButtonUI
        • class javax.swing.plaf.MenuItemUI
          • class javax.swing.plaf.basic.BasicMenuItemUI
            • class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
            • class javax.swing.plaf.basic.BasicMenuUI
            • class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
          • class javax.swing.plaf.multi.MultiMenuItemUI
        • class javax.swing.plaf.multi.MultiButtonUI
      • class javax.swing.plaf.ColorChooserUI
        • class javax.swing.plaf.basic.BasicColorChooserUI
        • class javax.swing.plaf.multi.MultiColorChooserUI
      • class javax.swing.plaf.ComboBoxUI
        • class javax.swing.plaf.basic.BasicComboBoxUI
          • class javax.swing.plaf.metal.MetalComboBoxUI
        • class javax.swing.plaf.multi.MultiComboBoxUI
      • class javax.swing.plaf.DesktopIconUI
        • class javax.swing.plaf.basic.BasicDesktopIconUI
          • class javax.swing.plaf.metal.MetalDesktopIconUI
        • class javax.swing.plaf.multi.MultiDesktopIconUI
      • class javax.swing.plaf.DesktopPaneUI
        • class javax.swing.plaf.basic.BasicDesktopPaneUI
        • class javax.swing.plaf.multi.MultiDesktopPaneUI
      • class javax.swing.plaf.FileChooserUI
        • class javax.swing.plaf.basic.BasicFileChooserUI
          • class javax.swing.plaf.metal.MetalFileChooserUI
        • class javax.swing.plaf.multi.MultiFileChooserUI
      • class javax.swing.plaf.InternalFrameUI
        • class javax.swing.plaf.basic.BasicInternalFrameUI
          • class javax.swing.plaf.metal.MetalInternalFrameUI
        • class javax.swing.plaf.multi.MultiInternalFrameUI
      • class javax.swing.plaf.LabelUI
        • class javax.swing.plaf.basic.BasicLabelUI (implements java.beans.PropertyChangeListener)
          • class javax.swing.plaf.metal.MetalLabelUI
        • class javax.swing.plaf.multi.MultiLabelUI
      • class javax.swing.plaf.ListUI
        • class javax.swing.plaf.basic.BasicListUI
        • class javax.swing.plaf.multi.MultiListUI
      • class javax.swing.plaf.MenuBarUI
        • class javax.swing.plaf.basic.BasicMenuBarUI
        • class javax.swing.plaf.multi.MultiMenuBarUI
      • class javax.swing.plaf.OptionPaneUI
        • class javax.swing.plaf.basic.BasicOptionPaneUI
        • class javax.swing.plaf.multi.MultiOptionPaneUI
      • class javax.swing.plaf.PanelUI
        • class javax.swing.plaf.basic.BasicPanelUI
        • class javax.swing.plaf.multi.MultiPanelUI
      • class javax.swing.plaf.PopupMenuUI
        • class javax.swing.plaf.basic.BasicPopupMenuUI
        • class javax.swing.plaf.multi.MultiPopupMenuUI
      • class javax.swing.plaf.ProgressBarUI
        • class javax.swing.plaf.basic.BasicProgressBarUI
          • class javax.swing.plaf.metal.MetalProgressBarUI
        • class javax.swing.plaf.multi.MultiProgressBarUI
      • class javax.swing.plaf.RootPaneUI
        • class javax.swing.plaf.basic.BasicRootPaneUI (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.ScrollBarUI
        • class javax.swing.plaf.basic.BasicScrollBarUI (implements java.awt.LayoutManager, javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalScrollBarUI
        • class javax.swing.plaf.multi.MultiScrollBarUI
      • class javax.swing.plaf.ScrollPaneUI
        • class javax.swing.plaf.basic.BasicScrollPaneUI (implements javax.swing.ScrollPaneConstants)
          • class javax.swing.plaf.metal.MetalScrollPaneUI
        • class javax.swing.plaf.multi.MultiScrollPaneUI
      • class javax.swing.plaf.SeparatorUI
        • class javax.swing.plaf.basic.BasicSeparatorUI
          • class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
          • class javax.swing.plaf.basic.BasicToolBarSeparatorUI
          • class javax.swing.plaf.metal.MetalSeparatorUI
            • class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
        • class javax.swing.plaf.multi.MultiSeparatorUI
      • class javax.swing.plaf.SliderUI
        • class javax.swing.plaf.basic.BasicSliderUI
          • class javax.swing.plaf.metal.MetalSliderUI
        • class javax.swing.plaf.multi.MultiSliderUI
      • class javax.swing.plaf.SplitPaneUI
        • class javax.swing.plaf.basic.BasicSplitPaneUI
          • class javax.swing.plaf.metal.MetalSplitPaneUI
        • class javax.swing.plaf.multi.MultiSplitPaneUI
      • class javax.swing.plaf.TabbedPaneUI
        • class javax.swing.plaf.basic.BasicTabbedPaneUI (implements javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalTabbedPaneUI
        • class javax.swing.plaf.multi.MultiTabbedPaneUI
      • class javax.swing.plaf.TableHeaderUI
        • class javax.swing.plaf.basic.BasicTableHeaderUI
        • class javax.swing.plaf.multi.MultiTableHeaderUI
      • class javax.swing.plaf.TableUI
        • class javax.swing.plaf.basic.BasicTableUI
        • class javax.swing.plaf.multi.MultiTableUI
      • class javax.swing.plaf.TextUI
        • class javax.swing.plaf.basic.BasicTextUI (implements javax.swing.text.ViewFactory)
          • class javax.swing.plaf.basic.BasicEditorPaneUI
            • class javax.swing.plaf.basic.BasicTextPaneUI
          • class javax.swing.plaf.basic.BasicTextAreaUI
          • class javax.swing.plaf.basic.BasicTextFieldUI
            • class javax.swing.plaf.basic.BasicPasswordFieldUI
            • class javax.swing.plaf.metal.MetalTextFieldUI
          • class javax.swing.text.DefaultTextUI
        • class javax.swing.plaf.multi.MultiTextUI
      • class javax.swing.plaf.ToolBarUI
        • class javax.swing.plaf.basic.BasicToolBarUI (implements javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalToolBarUI
        • class javax.swing.plaf.multi.MultiToolBarUI
      • class javax.swing.plaf.ToolTipUI
        • class javax.swing.plaf.basic.BasicToolTipUI
          • class javax.swing.plaf.metal.MetalToolTipUI
        • class javax.swing.plaf.multi.MultiToolTipUI
      • class javax.swing.plaf.TreeUI
        • class javax.swing.plaf.basic.BasicTreeUI
          • class javax.swing.plaf.metal.MetalTreeUI
        • class javax.swing.plaf.multi.MultiTreeUI
      • class javax.swing.plaf.ViewportUI
        • class javax.swing.plaf.basic.BasicViewportUI
        • class javax.swing.plaf.multi.MultiViewportUI
    • class javax.naming.CompositeName (implements javax.naming.Name)
    • class javax.naming.CompoundName (implements javax.naming.Name)
    • class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler (implements java.awt.event.ContainerListener)
    • class java.awt.event.ContainerAdapter (implements java.awt.event.ContainerListener)
    • class java.net.ContentHandler
    • class javax.swing.text.html.parser.ContentModel (implements java.io.Serializable)
    • class org.omg.CORBA.Context
    • class org.omg.CORBA.ContextList
    • class javax.sound.sampled.Control
      • class javax.sound.sampled.BooleanControl
      • class javax.sound.sampled.CompoundControl
      • class javax.sound.sampled.EnumControl
      • class javax.sound.sampled.FloatControl
    • class javax.sound.sampled.Control.Type
      • class javax.sound.sampled.BooleanControl.Type
      • class javax.sound.sampled.CompoundControl.Type
      • class javax.sound.sampled.EnumControl.Type
      • class javax.sound.sampled.FloatControl.Type
    • class javax.naming.ldap.ControlFactory
    • class java.awt.image.ConvolveOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.util.zip.CRC32 (implements java.util.zip.Checksum)
    • class java.security.cert.CRL
      • class java.security.cert.X509CRL (implements java.security.cert.X509Extension)
    • class javax.swing.text.html.CSS (implements java.io.Serializable)
    • class javax.swing.text.html.CSS.Attribute
    • class java.awt.geom.CubicCurve2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.CubicCurve2D.Double
      • class java.awt.geom.CubicCurve2D.Float
    • class org.omg.CORBA.CurrentHelper
    • class org.omg.CORBA.CurrentHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.Cursor (implements java.io.Serializable)
    • class java.awt.image.DataBuffer
      • class java.awt.image.DataBufferByte
      • class java.awt.image.DataBufferInt
      • class java.awt.image.DataBufferShort
      • class java.awt.image.DataBufferUShort
    • class java.awt.datatransfer.DataFlavor (implements java.lang.Cloneable, java.io.Externalizable)
    • class java.net.DatagramPacket
    • class java.net.DatagramSocket
      • class java.net.MulticastSocket
    • class java.net.DatagramSocketImpl (implements java.net.SocketOptions)
    • class java.util.Date (implements java.lang.Cloneable, java.lang.Comparable, java.io.Serializable)
      • class java.sql.Date
      • class java.sql.Time
      • class java.sql.Timestamp
    • class java.text.DateFormatSymbols (implements java.lang.Cloneable, java.io.Serializable)
    • class java.text.DecimalFormatSymbols (implements java.lang.Cloneable, java.io.Serializable)
    • class javax.swing.DefaultBoundedRangeModel (implements javax.swing.BoundedRangeModel, java.io.Serializable)
    • class javax.swing.DefaultButtonModel (implements javax.swing.ButtonModel, java.io.Serializable)
      • class javax.swing.JToggleButton.ToggleButtonModel
    • class javax.swing.DefaultCellEditor.EditorDelegate (implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable)
    • class javax.swing.colorchooser.DefaultColorSelectionModel (implements javax.swing.colorchooser.ColorSelectionModel, java.io.Serializable)
    • class javax.swing.DefaultDesktopManager (implements javax.swing.DesktopManager, java.io.Serializable)
    • class javax.swing.DefaultListSelectionModel (implements java.lang.Cloneable, javax.swing.ListSelectionModel, java.io.Serializable)
    • class javax.swing.tree.DefaultMutableTreeNode (implements java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable)
      • class javax.swing.JTree.DynamicUtilTreeNode
    • class javax.swing.DefaultSingleSelectionModel (implements java.io.Serializable, javax.swing.SingleSelectionModel)
    • class javax.swing.text.DefaultStyledDocument.ElementBuffer (implements java.io.Serializable)
    • class javax.swing.text.DefaultStyledDocument.ElementSpec
    • class javax.swing.table.DefaultTableColumnModel (implements javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.table.TableColumnModel)
    • class javax.swing.tree.DefaultTreeCellEditor (implements java.awt.event.ActionListener, javax.swing.tree.TreeCellEditor, javax.swing.event.TreeSelectionListener)
    • class javax.swing.tree.DefaultTreeModel (implements java.io.Serializable, javax.swing.tree.TreeModel)
    • class javax.swing.tree.DefaultTreeSelectionModel (implements java.lang.Cloneable, java.io.Serializable, javax.swing.tree.TreeSelectionModel)
      • class javax.swing.JTree.EmptySelectionModel
    • class org.omg.CORBA.DefinitionKind (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.DefinitionKindHelper
    • class java.util.zip.Deflater
    • class org.omg.CORBA.portable.Delegate
      • class org.omg.CORBA_2_3.portable.Delegate
    • class java.util.Dictionary
      • class java.util.Hashtable (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
        • class java.util.Properties
          • class java.security.Provider
        • class javax.swing.UIDefaults
    • class java.awt.geom.Dimension2D (implements java.lang.Cloneable)
      • class java.awt.Dimension (implements java.io.Serializable)
        • class javax.swing.plaf.DimensionUIResource (implements javax.swing.plaf.UIResource)
    • class javax.naming.spi.DirStateFactory.Result
    • class java.awt.dnd.DnDConstants
    • class javax.swing.event.DocumentEvent.EventType
    • class org.omg.CORBA.DoubleHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.DoubleSeqHelper
    • class org.omg.CORBA.DoubleSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.dnd.DragGestureRecognizer
      • class java.awt.dnd.MouseDragGestureRecognizer (implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener)
    • class java.awt.dnd.DragSource
    • class java.awt.dnd.DragSourceContext (implements java.awt.dnd.DragSourceListener)
    • class java.sql.DriverManager
    • class java.sql.DriverPropertyInfo
    • class java.awt.dnd.DropTarget (implements java.awt.dnd.DropTargetListener, java.io.Serializable)
    • class java.awt.dnd.DropTarget.DropTargetAutoScroller (implements java.awt.event.ActionListener)
    • class java.awt.dnd.DropTargetContext
    • class java.awt.dnd.DropTargetContext.TransferableProxy (implements java.awt.datatransfer.Transferable)
    • class java.security.spec.DSAParameterSpec (implements java.security.spec.AlgorithmParameterSpec, java.security.interfaces.DSAParams)
    • class java.security.spec.DSAPrivateKeySpec (implements java.security.spec.KeySpec)
    • class java.security.spec.DSAPublicKeySpec (implements java.security.spec.KeySpec)
    • class javax.swing.text.html.parser.DTD (implements javax.swing.text.html.parser.DTDConstants)
    • class javax.swing.text.EditorKit (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.DefaultEditorKit
        • class javax.swing.text.StyledEditorKit
          • class javax.swing.text.html.HTMLEditorKit
          • class javax.swing.text.rtf.RTFEditorKit
    • class javax.swing.text.html.parser.Element (implements javax.swing.text.html.parser.DTDConstants, java.io.Serializable)
    • class javax.swing.text.ElementIterator (implements java.lang.Cloneable)
    • class java.security.spec.EncodedKeySpec (implements java.security.spec.KeySpec)
      • class java.security.spec.PKCS8EncodedKeySpec
      • class java.security.spec.X509EncodedKeySpec
    • class javax.swing.text.html.parser.Entity (implements javax.swing.text.html.parser.DTDConstants)
    • class org.omg.CORBA.Environment
    • class java.awt.Event (implements java.io.Serializable)
    • class javax.swing.event.EventListenerList (implements java.io.Serializable)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.awt.AWTEvent
        • class java.awt.event.ActionEvent
        • class java.awt.event.AdjustmentEvent
        • class javax.swing.event.AncestorEvent
        • class java.awt.event.ComponentEvent
          • class java.awt.event.ContainerEvent
          • class java.awt.event.FocusEvent
          • class java.awt.event.InputEvent
            • class java.awt.event.KeyEvent
              • class javax.swing.event.MenuKeyEvent
            • class java.awt.event.MouseEvent
              • class javax.swing.event.MenuDragMouseEvent
          • class java.awt.event.PaintEvent
          • class java.awt.event.WindowEvent
        • class java.awt.event.HierarchyEvent
        • class java.awt.event.InputMethodEvent
        • class javax.swing.event.InternalFrameEvent
        • class java.awt.event.InvocationEvent (implements java.awt.ActiveEvent)
        • class java.awt.event.ItemEvent
        • class java.awt.event.TextEvent
      • class java.beans.beancontext.BeanContextEvent
        • class java.beans.beancontext.BeanContextMembershipEvent
        • class java.beans.beancontext.BeanContextServiceAvailableEvent
        • class java.beans.beancontext.BeanContextServiceRevokedEvent
      • class javax.swing.event.CaretEvent
      • class javax.swing.event.ChangeEvent
      • class java.awt.dnd.DragGestureEvent
      • class java.awt.dnd.DragSourceEvent
        • class java.awt.dnd.DragSourceDragEvent
        • class java.awt.dnd.DragSourceDropEvent
      • class java.awt.dnd.DropTargetEvent
        • class java.awt.dnd.DropTargetDragEvent
        • class java.awt.dnd.DropTargetDropEvent
      • class javax.swing.event.HyperlinkEvent
        • class javax.swing.text.html.HTMLFrameHyperlinkEvent
      • class javax.sound.sampled.LineEvent
      • class javax.swing.event.ListDataEvent
      • class javax.swing.event.ListSelectionEvent
      • class javax.swing.event.MenuEvent
      • class javax.naming.event.NamingEvent
      • class javax.naming.event.NamingExceptionEvent
      • class javax.swing.event.PopupMenuEvent
      • class java.beans.PropertyChangeEvent
      • class javax.swing.event.TableColumnModelEvent
      • class javax.swing.event.TableModelEvent
      • class javax.swing.event.TreeExpansionEvent
      • class javax.swing.event.TreeModelEvent
      • class javax.swing.event.TreeSelectionEvent
      • class javax.swing.event.UndoableEditEvent
      • class javax.naming.ldap.UnsolicitedNotificationEvent
    • class java.awt.EventQueue
    • class org.omg.CORBA.ExceptionList
    • class java.beans.FeatureDescriptor
      • class java.beans.BeanDescriptor
      • class java.beans.EventSetDescriptor
      • class java.beans.MethodDescriptor
      • class java.beans.ParameterDescriptor
      • class java.beans.PropertyDescriptor
        • class java.beans.IndexedPropertyDescriptor
    • class org.omg.CORBA.FieldNameHelper
    • class java.text.FieldPosition
    • class java.io.File (implements java.lang.Comparable, java.io.Serializable)
    • class java.io.FileDescriptor
    • class javax.swing.filechooser.FileFilter
      • class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter
    • class javax.swing.filechooser.FileSystemView
    • class javax.swing.filechooser.FileView
      • class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
    • class java.awt.image.FilteredImageSource (implements java.awt.image.ImageProducer)
    • class org.omg.CORBA.FixedHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.geom.FlatteningPathIterator (implements java.awt.geom.PathIterator)
    • class org.omg.CORBA.FloatHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.FloatSeqHelper
    • class org.omg.CORBA.FloatSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.FlowLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class javax.swing.text.FlowView.FlowStrategy
    • class java.awt.event.FocusAdapter (implements java.awt.event.FocusListener)
      • class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler
      • class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
    • class javax.swing.FocusManager
      • class javax.swing.DefaultFocusManager
    • class java.awt.Font (implements java.io.Serializable)
      • class javax.swing.plaf.FontUIResource (implements javax.swing.plaf.UIResource)
    • class java.awt.FontMetrics (implements java.io.Serializable)
    • class java.awt.font.FontRenderContext
    • class java.text.Format (implements java.lang.Cloneable, java.io.Serializable)
      • class java.text.DateFormat
        • class java.text.SimpleDateFormat
      • class java.text.MessageFormat
      • class java.text.NumberFormat
        • class java.text.ChoiceFormat
        • class java.text.DecimalFormat
    • class javax.sound.sampled.spi.FormatConversionProvider
    • class javax.swing.text.GapVector (implements java.io.Serializable)
      • class javax.swing.text.GapContent (implements javax.swing.text.AbstractDocument.Content, java.io.Serializable)
    • class java.awt.geom.GeneralPath (implements java.lang.Cloneable, java.awt.Shape)
    • class java.awt.font.GlyphJustificationInfo
    • class java.awt.font.GlyphMetrics
    • class java.awt.font.GlyphVector (implements java.lang.Cloneable)
    • class javax.swing.text.GlyphView.GlyphPainter
    • class java.awt.GradientPaint (implements java.awt.Paint)
    • class java.awt.font.GraphicAttribute
      • class java.awt.font.ImageGraphicAttribute
      • class java.awt.font.ShapeGraphicAttribute
    • class java.awt.Graphics
      • class javax.swing.DebugGraphics
      • class java.awt.Graphics2D
    • class java.awt.GraphicsConfigTemplate (implements java.io.Serializable)
    • class java.awt.GraphicsConfiguration
    • class java.awt.GraphicsDevice
    • class java.awt.GraphicsEnvironment
    • class java.awt.GridBagConstraints (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.GridBagLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.awt.GridLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class java.security.GuardedObject (implements java.io.Serializable)
    • class java.awt.event.HierarchyBoundsAdapter (implements java.awt.event.HierarchyBoundsListener)
    • class javax.swing.text.html.HTML
    • class javax.swing.text.html.HTML.Attribute
    • class javax.swing.text.html.HTML.Tag
      • class javax.swing.text.html.HTML.UnknownTag (implements java.io.Serializable)
    • class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction
    • class javax.swing.text.html.HTMLDocument.Iterator
    • class javax.swing.text.html.HTMLEditorKit.HTMLFactory (implements javax.swing.text.ViewFactory)
    • class javax.swing.text.html.HTMLEditorKit.Parser
      • class javax.swing.text.html.parser.ParserDelegator (implements java.io.Serializable)
    • class javax.swing.text.html.HTMLEditorKit.ParserCallback
      • class javax.swing.text.html.HTMLDocument.HTMLReader
    • class javax.swing.event.HyperlinkEvent.EventType
    • class java.awt.color.ICC_Profile (implements java.io.Serializable)
      • class java.awt.color.ICC_ProfileGray
      • class java.awt.color.ICC_ProfileRGB
    • class javax.swing.plaf.IconUIResource (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class org.omg.CORBA.IdentifierHelper
    • class java.security.Identity (implements java.security.Principal, java.io.Serializable)
      • class java.security.IdentityScope
      • class java.security.Signer
    • class org.omg.CORBA.IDLTypeHelper
    • class java.awt.Image
      • class java.awt.image.BufferedImage (implements java.awt.image.WritableRenderedImage)
    • class java.awt.image.ImageFilter (implements java.lang.Cloneable, java.awt.image.ImageConsumer)
      • class java.awt.image.BufferedImageFilter (implements java.lang.Cloneable)
      • class java.awt.image.CropImageFilter
      • class java.awt.image.ReplicateScaleFilter
        • class java.awt.image.AreaAveragingScaleFilter
      • class java.awt.image.RGBImageFilter
        • class javax.swing.GrayFilter
    • class javax.swing.ImageIcon (implements javax.accessibility.Accessible, javax.swing.Icon, java.io.Serializable)
    • class java.net.InetAddress (implements java.io.Serializable)
    • class java.util.zip.Inflater
    • class javax.naming.InitialContext (implements javax.naming.Context)
      • class javax.naming.directory.InitialDirContext (implements javax.naming.directory.DirContext)
        • class javax.naming.ldap.InitialLdapContext (implements javax.naming.ldap.LdapContext)
    • class org.omg.CORBA.Initializer (implements org.omg.CORBA.portable.IDLEntity)
    • class java.awt.im.InputContext
    • class javax.swing.InputMap (implements java.io.Serializable)
      • class javax.swing.ComponentInputMap
        • class javax.swing.plaf.ComponentInputMapUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.InputMapUIResource (implements javax.swing.plaf.UIResource)
    • class java.awt.im.InputMethodHighlight
    • class java.io.InputStream
      • class javax.sound.sampled.AudioInputStream
      • class java.io.ByteArrayInputStream
      • class java.io.FileInputStream
      • class java.io.FilterInputStream
        • class java.io.BufferedInputStream
        • class java.util.zip.CheckedInputStream
        • class java.io.DataInputStream (implements java.io.DataInput)
        • class java.security.DigestInputStream
        • class java.util.zip.InflaterInputStream
          • class java.util.zip.GZIPInputStream
          • class java.util.zip.ZipInputStream (implements java.util.zip.ZipConstants)
            • class java.util.jar.JarInputStream
        • class java.io.LineNumberInputStream
        • class javax.swing.ProgressMonitorInputStream
        • class java.io.PushbackInputStream
      • class org.omg.CORBA.portable.InputStream
        • class org.omg.CORBA_2_3.portable.InputStream
      • class java.io.ObjectInputStream (implements java.io.ObjectInput, java.io.ObjectStreamConstants)
      • class java.io.PipedInputStream
      • class java.io.SequenceInputStream
      • class java.io.StringBufferInputStream
    • class javax.swing.InputVerifier
    • class java.awt.Insets (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.plaf.InsetsUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.event.InternalFrameAdapter (implements javax.swing.event.InternalFrameListener)
    • class org.omg.CORBA.IntHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.beans.Introspector
    • class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
    • class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.IstringHelper
    • class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler (implements java.awt.event.ContainerListener)
    • class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler (implements java.awt.event.FocusListener)
    • class java.awt.JobAttributes (implements java.lang.Cloneable)
    • class javax.swing.JRootPane.RootLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class javax.swing.JTabbedPane.ModelListener (implements javax.swing.event.ChangeListener, java.io.Serializable)
    • class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange (implements javax.accessibility.AccessibleTableModelChange)
    • class javax.swing.text.JTextComponent.KeyBinding
    • class javax.swing.JTree.TreeModelHandler (implements javax.swing.event.TreeModelListener)
    • class javax.swing.JTree.TreeSelectionRedirector (implements java.io.Serializable, javax.swing.event.TreeSelectionListener)
    • class java.awt.image.Kernel (implements java.lang.Cloneable)
    • class java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
      • class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler
      • class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
    • class java.security.KeyFactory
    • class java.security.KeyFactorySpi
    • class java.security.KeyPair (implements java.io.Serializable)
    • class java.security.KeyPairGeneratorSpi
      • class java.security.KeyPairGenerator
    • class java.security.KeyStore
    • class java.security.KeyStoreSpi
    • class javax.swing.KeyStroke (implements java.io.Serializable)
    • class javax.swing.text.LayeredHighlighter (implements javax.swing.text.Highlighter)
      • class javax.swing.text.DefaultHighlighter
        • class javax.swing.plaf.basic.BasicTextUI.BasicHighlighter (implements javax.swing.plaf.UIResource)
    • class javax.swing.text.LayeredHighlighter.LayerPainter (implements javax.swing.text.Highlighter.HighlightPainter)
      • class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
    • class javax.swing.text.LayoutQueue
    • class java.rmi.dgc.Lease (implements java.io.Serializable)
    • class javax.sound.sampled.Line.Info
      • class javax.sound.sampled.DataLine.Info
      • class javax.sound.sampled.Port.Info
    • class java.awt.geom.Line2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Line2D.Double
      • class java.awt.geom.Line2D.Float
    • class java.awt.font.LineBreakMeasurer
    • class javax.sound.sampled.LineEvent.Type
    • class java.awt.font.LineMetrics
    • class java.util.Locale (implements java.lang.Cloneable, java.io.Serializable)
    • class java.rmi.registry.LocateRegistry
    • class org.omg.CORBA.LongHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.LongLongSeqHelper
    • class org.omg.CORBA.LongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.LongSeqHelper
    • class org.omg.CORBA.LongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class javax.swing.LookAndFeel
      • class javax.swing.plaf.basic.BasicLookAndFeel (implements java.io.Serializable)
        • class javax.swing.plaf.metal.MetalLookAndFeel
      • class javax.swing.plaf.multi.MultiLookAndFeel
    • class java.awt.image.LookupOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.LookupTable
      • class java.awt.image.ByteLookupTable
      • class java.awt.image.ShortLookupTable
    • class java.util.jar.Manifest (implements java.lang.Cloneable)
    • class java.rmi.MarshalledObject (implements java.io.Serializable)
    • class java.lang.Math
    • class java.awt.MediaTracker (implements java.io.Serializable)
    • class java.awt.image.MemoryImageSource (implements java.awt.image.ImageProducer)
    • class java.awt.MenuComponent (implements java.io.Serializable)
      • class java.awt.MenuBar (implements javax.accessibility.Accessible, java.awt.MenuContainer)
      • class java.awt.MenuItem (implements javax.accessibility.Accessible)
        • class java.awt.CheckboxMenuItem (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
        • class java.awt.Menu (implements javax.accessibility.Accessible, java.awt.MenuContainer)
          • class java.awt.PopupMenu
    • class javax.swing.MenuSelectionManager
    • class java.awt.MenuShortcut (implements java.io.Serializable)
    • class java.security.MessageDigestSpi
      • class java.security.MessageDigest
    • class javax.swing.plaf.metal.MetalBorders
    • class javax.swing.plaf.metal.MetalCheckBoxIcon (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.metal.MetalComboBoxIcon (implements javax.swing.Icon, java.io.Serializable)
    • class javax.swing.plaf.metal.MetalIconFactory (implements java.io.Serializable)
    • class javax.swing.plaf.metal.MetalIconFactory.FileIcon16 (implements javax.swing.Icon, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon
    • class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16 (implements javax.swing.Icon, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon
    • class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon (implements javax.swing.Icon, java.io.Serializable)
    • class javax.swing.plaf.metal.MetalTheme
      • class javax.swing.plaf.metal.DefaultMetalTheme
    • class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener (implements java.awt.event.ContainerListener)
    • class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener (implements java.beans.PropertyChangeListener)
    • class javax.sound.midi.MidiDevice.Info
    • class javax.sound.midi.spi.MidiDeviceProvider
    • class javax.sound.midi.MidiEvent
    • class javax.sound.midi.MidiFileFormat
    • class javax.sound.midi.spi.MidiFileReader
    • class javax.sound.midi.spi.MidiFileWriter
    • class javax.sound.midi.MidiMessage (implements java.lang.Cloneable)
      • class javax.sound.midi.MetaMessage
      • class javax.sound.midi.ShortMessage
      • class javax.sound.midi.SysexMessage
    • class javax.sound.midi.MidiSystem
    • class javax.sound.sampled.Mixer.Info
    • class javax.sound.sampled.spi.MixerProvider
    • class javax.naming.directory.ModificationItem (implements java.io.Serializable)
    • class java.lang.reflect.Modifier
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler
      • class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler
      • class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener
      • class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener
      • class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler
      • class javax.swing.plaf.basic.BasicTreeUI.MouseHandler
      • class javax.swing.text.html.FormView.MouseEventListener
      • class javax.swing.text.html.HTMLEditorKit.LinkController (implements java.awt.event.MouseMotionListener, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener
      • class javax.swing.ToolTipManager (implements java.awt.event.MouseMotionListener)
    • class javax.swing.event.MouseInputAdapter (implements javax.swing.event.MouseInputListener)
      • class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler
      • class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener (implements javax.swing.SwingConstants)
      • class javax.swing.plaf.basic.BasicSliderUI.TrackListener
    • class java.awt.event.MouseMotionAdapter (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler
      • class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler
    • class javax.naming.NameClassPair (implements java.io.Serializable)
      • class javax.naming.Binding
        • class javax.naming.directory.SearchResult
    • class org.omg.CosNaming.NameComponent (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.NameComponentHelper
    • class org.omg.CosNaming.NameComponentHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.NamedValue
    • class org.omg.CosNaming.NameHelper
    • class org.omg.CosNaming.NameHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.NameValuePair (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.NameValuePairHelper
    • class java.rmi.Naming
    • class org.omg.CosNaming.NamingContextHelper
    • class org.omg.CosNaming.NamingContextHolder (implements org.omg.CORBA.portable.Streamable)
    • class javax.naming.spi.NamingManager
      • class javax.naming.spi.DirectoryManager
    • class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
    • class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
    • class org.omg.CosNaming.NamingContextPackage.NotFoundHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReason (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.lang.Number (implements java.io.Serializable)
      • class java.math.BigDecimal (implements java.lang.Comparable)
      • class java.math.BigInteger (implements java.lang.Comparable)
      • class java.lang.Byte (implements java.lang.Comparable)
      • class java.lang.Double (implements java.lang.Comparable)
      • class java.lang.Float (implements java.lang.Comparable)
      • class java.lang.Integer (implements java.lang.Comparable)
      • class java.lang.Long (implements java.lang.Comparable)
      • class java.lang.Short (implements java.lang.Comparable)
    • class org.omg.CORBA.NVList
    • class org.omg.CORBA.ObjectHelper
    • class org.omg.CORBA.ObjectHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CosNaming._BindingIteratorStub (implements org.omg.CosNaming.BindingIterator)
      • class org.omg.CORBA._IDLTypeStub (implements org.omg.CORBA.IDLType)
      • class org.omg.CosNaming._NamingContextStub (implements org.omg.CosNaming.NamingContext)
      • class org.omg.CORBA._PolicyStub (implements org.omg.CORBA.Policy)
      • class org.omg.CORBA.DynamicImplementation
        • class org.omg.CosNaming._BindingIteratorImplBase (implements org.omg.CosNaming.BindingIterator)
        • class org.omg.CosNaming._NamingContextImplBase (implements org.omg.CosNaming.NamingContext)
      • class org.omg.CORBA_2_3.portable.ObjectImpl
        • class javax.rmi.CORBA.Stub (implements java.io.Serializable)
          • class org.omg.stub.java.rmi._Remote_Stub (implements java.rmi.Remote)
    • class java.io.ObjectInputStream.GetField
    • class java.io.ObjectOutputStream.PutField
    • class java.io.ObjectStreamClass (implements java.io.Serializable)
    • class java.io.ObjectStreamField (implements java.lang.Comparable)
    • class java.rmi.server.ObjID (implements java.io.Serializable)
    • class java.util.Observable
    • class org.omg.CORBA.OctetSeqHelper
    • class org.omg.CORBA.OctetSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.rmi.server.Operation
    • class javax.swing.text.html.Option
    • class org.omg.CORBA.ORB
      • class org.omg.CORBA_2_3.ORB
    • class java.io.OutputStream
      • class java.io.ByteArrayOutputStream
      • class java.io.FileOutputStream
      • class java.io.FilterOutputStream
        • class java.io.BufferedOutputStream
        • class java.util.zip.CheckedOutputStream
        • class java.io.DataOutputStream (implements java.io.DataOutput)
        • class java.util.zip.DeflaterOutputStream
          • class java.util.zip.GZIPOutputStream
          • class java.util.zip.ZipOutputStream (implements java.util.zip.ZipConstants)
            • class java.util.jar.JarOutputStream
        • class java.security.DigestOutputStream
        • class java.io.PrintStream
          • class java.rmi.server.LogStream
      • class java.io.ObjectOutputStream (implements java.io.ObjectOutput, java.io.ObjectStreamConstants)
      • class org.omg.CORBA.portable.OutputStream
        • class org.omg.CORBA_2_3.portable.OutputStream
      • class java.io.PipedOutputStream
    • class javax.swing.OverlayLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.lang.Package
    • class java.awt.PageAttributes (implements java.lang.Cloneable)
    • class java.awt.print.PageFormat (implements java.lang.Cloneable)
    • class java.awt.print.Paper (implements java.lang.Cloneable)
    • class java.awt.image.renderable.ParameterBlock (implements java.lang.Cloneable, java.io.Serializable)
    • class java.text.ParsePosition
    • class javax.swing.text.html.parser.Parser (implements javax.swing.text.html.parser.DTDConstants)
      • class javax.swing.text.html.parser.DocumentParser
    • class java.net.PasswordAuthentication
    • class javax.sound.midi.Patch
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.AllPermission
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class javax.sound.sampled.AudioPermission
        • class java.awt.AWTPermission
        • class java.net.NetPermission
        • class java.util.PropertyPermission
        • class java.lang.reflect.ReflectPermission
        • class java.lang.RuntimePermission
        • class java.security.SecurityPermission
        • class java.io.SerializablePermission
        • class java.sql.SQLPermission
      • class java.io.FilePermission (implements java.io.Serializable)
      • class java.net.SocketPermission (implements java.io.Serializable)
      • class java.security.UnresolvedPermission (implements java.io.Serializable)
    • class java.security.PermissionCollection (implements java.io.Serializable)
      • class java.security.Permissions (implements java.io.Serializable)
    • class java.awt.image.PixelGrabber (implements java.awt.image.ImageConsumer)
    • class java.awt.geom.Point2D (implements java.lang.Cloneable)
      • class java.awt.Point (implements java.io.Serializable)
      • class java.awt.geom.Point2D.Double
      • class java.awt.geom.Point2D.Float
    • class java.security.Policy
    • class org.omg.CORBA.PolicyHelper
    • class org.omg.CORBA.PolicyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.PolicyListHelper
    • class org.omg.CORBA.PolicyListHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.PolicyTypeHelper
    • class java.awt.Polygon (implements java.io.Serializable, java.awt.Shape)
    • class javax.rmi.PortableRemoteObject
    • class javax.swing.text.Position.Bias
    • class org.omg.CORBA.Principal
    • class org.omg.CORBA.PrincipalHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.print.PrinterJob
    • class java.awt.PrintJob
    • class java.lang.Process
    • class javax.swing.ProgressMonitor
    • class java.beans.PropertyChangeSupport (implements java.io.Serializable)
      • class javax.swing.event.SwingPropertyChangeSupport
    • class java.beans.PropertyEditorManager
    • class java.beans.PropertyEditorSupport (implements java.beans.PropertyEditor)
    • class java.security.ProtectionDomain
    • class java.lang.reflect.Proxy (implements java.io.Serializable)
    • class java.awt.geom.QuadCurve2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.QuadCurve2D.Double
      • class java.awt.geom.QuadCurve2D.Float
    • class java.util.Random (implements java.io.Serializable)
      • class java.security.SecureRandom
    • class java.io.RandomAccessFile (implements java.io.DataInput, java.io.DataOutput)
    • class java.awt.image.Raster
      • class java.awt.image.WritableRaster
    • class java.io.Reader
      • class java.io.BufferedReader
        • class java.io.LineNumberReader
      • class java.io.CharArrayReader
      • class java.io.FilterReader
        • class java.io.PushbackReader
      • class java.io.InputStreamReader
        • class java.io.FileReader
      • class java.io.PipedReader
      • class java.io.StringReader
    • class java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Arc2D
        • class java.awt.geom.Arc2D.Double
        • class java.awt.geom.Arc2D.Float
      • class java.awt.geom.Ellipse2D
        • class java.awt.geom.Ellipse2D.Double
        • class java.awt.geom.Ellipse2D.Float
      • class java.awt.geom.Rectangle2D
        • class java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
          • class javax.swing.text.DefaultCaret (implements javax.swing.text.Caret, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener)
            • class javax.swing.plaf.basic.BasicTextUI.BasicCaret (implements javax.swing.plaf.UIResource)
        • class java.awt.geom.Rectangle2D.Double
        • class java.awt.geom.Rectangle2D.Float
      • class java.awt.geom.RoundRectangle2D
        • class java.awt.geom.RoundRectangle2D.Double
        • class java.awt.geom.RoundRectangle2D.Float
    • class javax.naming.RefAddr (implements java.io.Serializable)
      • class javax.naming.BinaryRefAddr
      • class javax.naming.StringRefAddr
    • class java.lang.ref.Reference
      • class java.lang.ref.PhantomReference
      • class java.lang.ref.SoftReference
      • class java.lang.ref.WeakReference
    • class javax.naming.Reference (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.naming.LinkRef
    • class java.lang.ref.ReferenceQueue
    • class java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable)
      • class java.rmi.server.RemoteServer
        • class java.rmi.activation.Activatable
        • class java.rmi.server.UnicastRemoteObject
          • class java.rmi.activation.ActivationGroup (implements java.rmi.activation.ActivationInstantiator)
      • class java.rmi.server.RemoteStub
    • class java.awt.image.renderable.RenderableImageOp (implements java.awt.image.renderable.RenderableImage)
    • class java.awt.image.renderable.RenderableImageProducer (implements java.awt.image.ImageProducer, java.lang.Runnable)
    • class java.awt.image.renderable.RenderContext (implements java.lang.Cloneable)
    • class java.awt.RenderingHints (implements java.lang.Cloneable, java.util.Map)
    • class java.awt.RenderingHints.Key
    • class javax.swing.RepaintManager
    • class org.omg.CORBA.RepositoryIdHelper
    • class org.omg.CORBA.Request
    • class java.awt.image.RescaleOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class javax.naming.spi.ResolveResult (implements java.io.Serializable)
    • class java.util.ResourceBundle
      • class java.util.ListResourceBundle
        • class javax.accessibility.AccessibleResourceBundle
      • class java.util.PropertyResourceBundle
    • class javax.sound.sampled.ReverbType
    • class java.rmi.server.RMIClassLoader
    • class java.rmi.server.RMISocketFactory (implements java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
    • class java.awt.Robot
    • class java.security.spec.RSAKeyGenParameterSpec (implements java.security.spec.AlgorithmParameterSpec)
    • class java.security.spec.RSAPrivateKeySpec (implements java.security.spec.KeySpec)
      • class java.security.spec.RSAPrivateCrtKeySpec
    • class java.security.spec.RSAPublicKeySpec (implements java.security.spec.KeySpec)
    • class java.lang.Runtime
    • class java.awt.image.SampleModel
      • class java.awt.image.ComponentSampleModel
        • class java.awt.image.BandedSampleModel
        • class java.awt.image.PixelInterleavedSampleModel
      • class java.awt.image.MultiPixelPackedSampleModel
      • class java.awt.image.SinglePixelPackedSampleModel
    • class javax.swing.ScrollPaneLayout (implements java.awt.LayoutManager, javax.swing.ScrollPaneConstants, java.io.Serializable)
      • class javax.swing.ScrollPaneLayout.UIResource (implements javax.swing.plaf.UIResource)
    • class javax.naming.directory.SearchControls (implements java.io.Serializable)
    • class java.security.SecureRandomSpi (implements java.io.Serializable)
    • class java.security.Security
    • class java.lang.SecurityManager
      • class java.rmi.RMISecurityManager
    • class javax.swing.text.Segment (implements java.text.CharacterIterator, java.lang.Cloneable)
    • class javax.sound.midi.Sequence
    • class javax.sound.midi.Sequencer.SyncMode
    • class org.omg.CORBA.portable.ServantObject
    • class org.omg.CORBA.ServerRequest
    • class java.net.ServerSocket
    • class org.omg.CORBA.ServiceDetail (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ServiceDetailHelper
    • class org.omg.CORBA.ServiceInformation (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ServiceInformationHelper
    • class org.omg.CORBA.ServiceInformationHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.SetOverrideType (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.SetOverrideTypeHelper
    • class org.omg.CORBA.ShortHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ShortSeqHelper
    • class org.omg.CORBA.ShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.security.SignatureSpi
      • class java.security.Signature
    • class java.security.SignedObject (implements java.io.Serializable)
    • class javax.swing.text.SimpleAttributeSet (implements java.lang.Cloneable, javax.swing.text.MutableAttributeSet, java.io.Serializable)
    • class java.beans.SimpleBeanInfo (implements java.beans.BeanInfo)
    • class javax.swing.SizeRequirements (implements java.io.Serializable)
    • class javax.swing.SizeSequence
    • class java.net.Socket
    • class java.net.SocketImpl (implements java.net.SocketOptions)
    • class javax.sound.midi.spi.SoundbankReader
    • class javax.sound.midi.SoundbankResource
      • class javax.sound.midi.Instrument
    • class java.io.StreamTokenizer
    • class java.lang.StrictMath
    • class java.lang.String (implements java.lang.Comparable, java.io.Serializable)
    • class java.lang.StringBuffer (implements java.io.Serializable)
    • class java.text.StringCharacterIterator (implements java.text.CharacterIterator)
    • class javax.swing.text.StringContent (implements javax.swing.text.AbstractDocument.Content, java.io.Serializable)
    • class org.omg.CORBA.StringHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.datatransfer.StringSelection (implements java.awt.datatransfer.ClipboardOwner, java.awt.datatransfer.Transferable)
    • class java.util.StringTokenizer (implements java.util.Enumeration)
    • class org.omg.CORBA.StringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)
    • class org.omg.CORBA.StructMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.StructMemberHelper
    • class javax.swing.text.StyleConstants
      • class javax.swing.text.StyleConstants.CharacterConstants (implements javax.swing.text.AttributeSet.CharacterAttribute)
      • class javax.swing.text.StyleConstants.ColorConstants (implements javax.swing.text.AttributeSet.CharacterAttribute, javax.swing.text.AttributeSet.ColorAttribute)
      • class javax.swing.text.StyleConstants.FontConstants (implements javax.swing.text.AttributeSet.CharacterAttribute, javax.swing.text.AttributeSet.FontAttribute)
      • class javax.swing.text.StyleConstants.ParagraphConstants (implements javax.swing.text.AttributeSet.ParagraphAttribute)
    • class javax.swing.text.StyleContext (implements javax.swing.text.AbstractDocument.AttributeContext, java.io.Serializable)
      • class javax.swing.text.html.StyleSheet
    • class javax.swing.text.StyleContext.NamedStyle (implements java.io.Serializable, javax.swing.text.Style)
    • class javax.swing.text.StyleContext.SmallAttributeSet (implements javax.swing.text.AttributeSet)
    • class javax.swing.text.html.StyleSheet.BoxPainter (implements java.io.Serializable)
    • class javax.swing.text.html.StyleSheet.ListPainter (implements java.io.Serializable)
    • class javax.swing.SwingUtilities (implements javax.swing.SwingConstants)
    • class java.lang.System
    • class java.awt.datatransfer.SystemFlavorMap (implements java.awt.datatransfer.FlavorMap)
    • class javax.swing.table.TableColumn (implements java.io.Serializable)
    • class javax.swing.text.TabSet (implements java.io.Serializable)
    • class javax.swing.text.TabStop (implements java.io.Serializable)
    • class javax.swing.text.html.parser.TagElement
    • class org.omg.CORBA.TCKind
    • class java.awt.font.TextHitInfo
    • class java.awt.font.TextLayout (implements java.lang.Cloneable)
    • class java.awt.font.TextLayout.CaretPolicy
    • class java.awt.font.TextMeasurer
    • class java.awt.TexturePaint (implements java.awt.Paint)
    • class java.lang.Thread (implements java.lang.Runnable)
    • class java.lang.ThreadGroup
    • class java.lang.ThreadLocal
      • class java.lang.InheritableThreadLocal
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Error
        • class java.awt.AWTError
        • class java.lang.LinkageError
          • class java.lang.ClassCircularityError
          • class java.lang.ClassFormatError
            • class java.lang.UnsupportedClassVersionError
          • class java.lang.ExceptionInInitializerError
          • class java.lang.IncompatibleClassChangeError
            • class java.lang.AbstractMethodError
            • class java.lang.IllegalAccessError
            • class java.lang.InstantiationError
            • class java.lang.NoSuchFieldError
            • class java.lang.NoSuchMethodError
          • class java.lang.NoClassDefFoundError
          • class java.lang.UnsatisfiedLinkError
          • class java.lang.VerifyError
        • class java.lang.ThreadDeath
        • class java.lang.VirtualMachineError
          • class java.lang.InternalError
          • class java.lang.OutOfMemoryError
          • class java.lang.StackOverflowError
          • class java.lang.UnknownError
      • class java.lang.Exception
        • class java.security.acl.AclNotFoundException
        • class java.rmi.activation.ActivationException
          • class java.rmi.activation.UnknownGroupException
          • class java.rmi.activation.UnknownObjectException
        • class java.rmi.AlreadyBoundException
        • class org.omg.CORBA.portable.ApplicationException
        • class java.awt.AWTException
        • class javax.swing.text.BadLocationException
        • class java.lang.ClassNotFoundException
        • class java.lang.CloneNotSupportedException
          • class java.rmi.server.ServerCloneException
        • class java.util.zip.DataFormatException
        • class javax.swing.tree.ExpandVetoException
        • class java.awt.FontFormatException
        • class java.security.GeneralSecurityException
          • class java.security.cert.CertificateException
            • class java.security.cert.CertificateEncodingException
            • class java.security.cert.CertificateExpiredException
            • class java.security.cert.CertificateNotYetValidException
            • class java.security.cert.CertificateParsingException
          • class java.security.cert.CRLException
          • class java.security.DigestException
          • class java.security.InvalidAlgorithmParameterException
          • class java.security.spec.InvalidKeySpecException
          • class java.security.spec.InvalidParameterSpecException
          • class java.security.KeyException
            • class java.security.InvalidKeyException
            • class java.security.KeyManagementException
          • class java.security.KeyStoreException
          • class java.security.NoSuchAlgorithmException
          • class java.security.NoSuchProviderException
          • class java.security.SignatureException
          • class java.security.UnrecoverableKeyException
        • class java.lang.IllegalAccessException
        • class java.lang.InstantiationException
        • class java.lang.InterruptedException
        • class java.beans.IntrospectionException
        • class javax.sound.midi.InvalidMidiDataException
        • class java.lang.reflect.InvocationTargetException
        • class java.io.IOException
          • class javax.swing.text.ChangedCharSetException
          • class java.io.CharConversionException
          • class java.io.EOFException
          • class java.io.FileNotFoundException
          • class java.io.InterruptedIOException
          • class java.net.MalformedURLException
          • class java.io.ObjectStreamException
            • class java.io.InvalidClassException
            • class java.io.InvalidObjectException
            • class java.io.NotActiveException
            • class java.io.NotSerializableException
            • class java.io.OptionalDataException
            • class java.io.StreamCorruptedException
            • class java.io.WriteAbortedException
          • class java.net.ProtocolException
          • class java.rmi.RemoteException
            • class java.rmi.AccessException
            • class java.rmi.activation.ActivateFailedException
            • class java.rmi.ConnectException
            • class java.rmi.ConnectIOException
            • class java.rmi.server.ExportException
              • class java.rmi.server.SocketSecurityException
            • class javax.transaction.InvalidTransactionException
            • class java.rmi.MarshalException
            • class java.rmi.NoSuchObjectException
            • class java.rmi.ServerError
            • class java.rmi.ServerException
            • class java.rmi.ServerRuntimeException
            • class java.rmi.server.SkeletonMismatchException
            • class java.rmi.server.SkeletonNotFoundException
            • class java.rmi.StubNotFoundException
            • class javax.transaction.TransactionRequiredException
            • class javax.transaction.TransactionRolledbackException
            • class java.rmi.UnexpectedException
            • class java.rmi.UnknownHostException
            • class java.rmi.UnmarshalException
          • class java.net.SocketException
            • class java.net.BindException
            • class java.net.ConnectException
            • class java.net.NoRouteToHostException
          • class java.io.SyncFailedException
          • class java.net.UnknownHostException
          • class java.net.UnknownServiceException
          • class java.io.UnsupportedEncodingException
          • class java.io.UTFDataFormatException
          • class java.util.zip.ZipException
            • class java.util.jar.JarException
        • class java.security.acl.LastOwnerException
        • class javax.sound.sampled.LineUnavailableException
        • class javax.sound.midi.MidiUnavailableException
        • class java.awt.datatransfer.MimeTypeParseException
        • class javax.naming.NamingException
          • class javax.naming.directory.AttributeInUseException
          • class javax.naming.directory.AttributeModificationException
          • class javax.naming.CannotProceedException
          • class javax.naming.CommunicationException
          • class javax.naming.ConfigurationException
          • class javax.naming.ContextNotEmptyException
          • class javax.naming.InsufficientResourcesException
          • class javax.naming.InterruptedNamingException
          • class javax.naming.directory.InvalidAttributeIdentifierException
          • class javax.naming.directory.InvalidAttributesException
          • class javax.naming.directory.InvalidAttributeValueException
          • class javax.naming.InvalidNameException
          • class javax.naming.directory.InvalidSearchControlsException
          • class javax.naming.directory.InvalidSearchFilterException
          • class javax.naming.LimitExceededException
            • class javax.naming.SizeLimitExceededException
            • class javax.naming.TimeLimitExceededException
          • class javax.naming.LinkException
            • class javax.naming.LinkLoopException
            • class javax.naming.MalformedLinkException
          • class javax.naming.NameAlreadyBoundException
          • class javax.naming.NameNotFoundException
          • class javax.naming.NamingSecurityException
            • class javax.naming.AuthenticationException
            • class javax.naming.AuthenticationNotSupportedException
            • class javax.naming.NoPermissionException
          • class javax.naming.NoInitialContextException
          • class javax.naming.directory.NoSuchAttributeException
          • class javax.naming.NotContextException
          • class javax.naming.OperationNotSupportedException
          • class javax.naming.PartialResultException
          • class javax.naming.ReferralException
            • class javax.naming.ldap.LdapReferralException
          • class javax.naming.directory.SchemaViolationException
          • class javax.naming.ServiceUnavailableException
        • class java.awt.geom.NoninvertibleTransformException
        • class java.lang.NoSuchFieldException
        • class java.lang.NoSuchMethodException
        • class java.rmi.NotBoundException
        • class java.security.acl.NotOwnerException
        • class java.text.ParseException
        • class java.awt.print.PrinterException
          • class java.awt.print.PrinterAbortException
          • class java.awt.print.PrinterIOException
        • class java.security.PrivilegedActionException
        • class java.beans.PropertyVetoException
        • class org.omg.CORBA.portable.RemarshalException
        • class java.lang.RuntimeException
          • class java.lang.ArithmeticException
          • class java.lang.ArrayStoreException
          • class javax.swing.undo.CannotRedoException
          • class javax.swing.undo.CannotUndoException
          • class java.lang.ClassCastException
          • class java.awt.color.CMMException
          • class java.util.ConcurrentModificationException
          • class java.util.EmptyStackException
          • class java.lang.IllegalArgumentException
            • class java.lang.IllegalThreadStateException
            • class java.security.InvalidParameterException
            • class java.lang.NumberFormatException
          • class java.lang.IllegalMonitorStateException
          • class java.awt.geom.IllegalPathStateException
          • class java.lang.IllegalStateException
            • class java.awt.IllegalComponentStateException
            • class java.awt.dnd.InvalidDnDOperationException
          • class java.awt.image.ImagingOpException
          • class java.lang.IndexOutOfBoundsException
            • class java.lang.ArrayIndexOutOfBoundsException
            • class java.lang.StringIndexOutOfBoundsException
          • class java.util.MissingResourceException
          • class java.lang.NegativeArraySizeException
          • class java.util.NoSuchElementException
          • class java.lang.NullPointerException
          • class java.awt.color.ProfileDataException
          • class java.security.ProviderException
          • class java.awt.image.RasterFormatException
          • class java.lang.SecurityException
            • class java.security.AccessControlException
            • class java.rmi.RMISecurityException
          • class org.omg.CORBA.SystemException
            • class org.omg.CORBA.BAD_CONTEXT
            • class org.omg.CORBA.BAD_INV_ORDER
            • class org.omg.CORBA.BAD_OPERATION
            • class org.omg.CORBA.BAD_PARAM
            • class org.omg.CORBA.BAD_TYPECODE
            • class org.omg.CORBA.COMM_FAILURE
            • class org.omg.CORBA.DATA_CONVERSION
            • class org.omg.CORBA.FREE_MEM
            • class org.omg.CORBA.IMP_LIMIT
            • class org.omg.CORBA.portable.IndirectionException
            • class org.omg.CORBA.INITIALIZE
            • class org.omg.CORBA.INTERNAL
            • class org.omg.CORBA.INTF_REPOS
            • class org.omg.CORBA.INV_FLAG
            • class org.omg.CORBA.INV_IDENT
            • class org.omg.CORBA.INV_OBJREF
            • class org.omg.CORBA.INV_POLICY
            • class org.omg.CORBA.INVALID_TRANSACTION
            • class org.omg.CORBA.MARSHAL
            • class org.omg.CORBA.NO_IMPLEMENT
            • class org.omg.CORBA.NO_MEMORY
            • class org.omg.CORBA.NO_PERMISSION
            • class org.omg.CORBA.NO_RESOURCES
            • class org.omg.CORBA.NO_RESPONSE
            • class org.omg.CORBA.OBJ_ADAPTER
            • class org.omg.CORBA.OBJECT_NOT_EXIST
            • class org.omg.CORBA.PERSIST_STORE
            • class org.omg.CORBA.TRANSACTION_REQUIRED
            • class org.omg.CORBA.TRANSACTION_ROLLEDBACK
            • class org.omg.CORBA.TRANSIENT
            • class org.omg.CORBA.UNKNOWN
            • class org.omg.CORBA.portable.UnknownException
          • class java.lang.reflect.UndeclaredThrowableException
          • class java.lang.UnsupportedOperationException
        • class java.rmi.server.ServerNotActiveException
        • class java.sql.SQLException
          • class java.sql.BatchUpdateException
          • class java.sql.SQLWarning
            • class java.sql.DataTruncation
        • class java.util.TooManyListenersException
        • class javax.sound.sampled.UnsupportedAudioFileException
        • class java.awt.datatransfer.UnsupportedFlavorException
        • class javax.swing.UnsupportedLookAndFeelException
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.AlreadyBound (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.TypeCodePackage.BadKind
          • class org.omg.CORBA.Bounds
          • class org.omg.CORBA.TypeCodePackage.Bounds
          • class org.omg.CosNaming.NamingContextPackage.CannotProceed (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.ORBPackage.InconsistentTypeCode
          • class org.omg.CORBA.DynAnyPackage.Invalid
          • class org.omg.CORBA.ORBPackage.InvalidName
          • class org.omg.CosNaming.NamingContextPackage.InvalidName (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.DynAnyPackage.InvalidSeq
          • class org.omg.CORBA.DynAnyPackage.InvalidValue
          • class org.omg.CosNaming.NamingContextPackage.NotEmpty (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.NotFound (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.PolicyError
          • class org.omg.CORBA.DynAnyPackage.TypeMismatch
          • class org.omg.CORBA.UnknownUserException
          • class org.omg.CORBA.WrongTransaction
    • class java.util.Timer
    • class javax.swing.Timer (implements java.io.Serializable)
    • class java.util.TimerTask (implements java.lang.Runnable)
    • class java.util.TimeZone (implements java.lang.Cloneable, java.io.Serializable)
      • class java.util.SimpleTimeZone
    • class java.awt.Toolkit
    • class javax.swing.ToolTipManager.insideTimerAction (implements java.awt.event.ActionListener)
    • class javax.swing.ToolTipManager.outsideTimerAction (implements java.awt.event.ActionListener)
    • class javax.swing.ToolTipManager.stillInsideTimerAction (implements java.awt.event.ActionListener)
    • class javax.sound.midi.Track
    • class java.awt.font.TransformAttribute (implements java.io.Serializable)
    • class javax.swing.tree.TreePath (implements java.io.Serializable)
    • class org.omg.CORBA.TypeCode (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.TypeCodeHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.sql.Types
    • class java.rmi.server.UID (implements java.io.Serializable)
    • class javax.swing.UIDefaults.LazyInputMap (implements javax.swing.UIDefaults.LazyValue)
    • class javax.swing.UIDefaults.ProxyLazyValue (implements javax.swing.UIDefaults.LazyValue)
    • class javax.swing.UIManager (implements java.io.Serializable)
    • class javax.swing.UIManager.LookAndFeelInfo
    • class org.omg.CORBA.ULongLongSeqHelper
    • class org.omg.CORBA.ULongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ULongSeqHelper
    • class org.omg.CORBA.ULongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class javax.swing.undo.UndoableEditSupport
    • class org.omg.CORBA.UnionMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.UnionMemberHelper
    • class java.net.URL (implements java.io.Serializable)
    • class java.net.URLConnection
      • class java.net.HttpURLConnection
      • class java.net.JarURLConnection
    • class java.net.URLDecoder
    • class java.net.URLEncoder
    • class java.net.URLStreamHandler
    • class org.omg.CORBA.UShortSeqHelper
    • class org.omg.CORBA.UShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class javax.rmi.CORBA.Util
    • class javax.swing.text.Utilities
    • class org.omg.CORBA.ValueBaseHelper
    • class org.omg.CORBA.ValueBaseHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ValueMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ValueMemberHelper
    • class org.omg.CORBA.VersionSpecHelper
    • class java.beans.VetoableChangeSupport (implements java.io.Serializable)
    • class javax.swing.text.View (implements javax.swing.SwingConstants)
      • class javax.swing.text.AsyncBoxView
      • class javax.swing.text.ComponentView
        • class javax.swing.text.html.FormView (implements java.awt.event.ActionListener)
        • class javax.swing.text.html.ObjectView
      • class javax.swing.text.CompositeView
        • class javax.swing.text.BoxView
          • class javax.swing.text.html.BlockView
            • class javax.swing.text.html.ListView
          • class javax.swing.text.FlowView
            • class javax.swing.text.ParagraphView (implements javax.swing.text.TabExpander)
              • class javax.swing.text.html.ParagraphView
          • class javax.swing.text.TableView
          • class javax.swing.text.TableView.TableCell (implements javax.swing.text.TableView.GridCell)
          • class javax.swing.text.TableView.TableRow
          • class javax.swing.text.WrappedPlainView (implements javax.swing.text.TabExpander)
          • class javax.swing.text.ZoneView
      • class javax.swing.text.GlyphView (implements java.lang.Cloneable, javax.swing.text.TabableView)
        • class javax.swing.text.LabelView (implements javax.swing.text.TabableView)
          • class javax.swing.text.html.InlineView
      • class javax.swing.text.IconView
      • class javax.swing.text.PlainView (implements javax.swing.text.TabExpander)
        • class javax.swing.text.FieldView
          • class javax.swing.text.PasswordView
    • class javax.swing.ViewportLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class org.omg.CORBA.VisibilityHelper
    • class java.rmi.dgc.VMID (implements java.io.Serializable)
    • class javax.sound.midi.VoiceStatus
    • class java.lang.Void
    • class org.omg.CORBA.WCharSeqHelper
    • class org.omg.CORBA.WCharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.awt.event.WindowAdapter (implements java.awt.event.WindowListener)
      • class javax.swing.plaf.basic.BasicToolBarUI.FrameListener
      • class javax.swing.JMenu.WinListener (implements java.io.Serializable)
    • class java.io.Writer
      • class java.io.BufferedWriter
      • class java.io.CharArrayWriter
      • class java.io.FilterWriter
      • class java.io.OutputStreamWriter
        • class java.io.FileWriter
      • class java.io.PipedWriter
      • class java.io.PrintWriter
      • class java.io.StringWriter
    • class org.omg.CORBA.WStringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)
    • class java.security.cert.X509CRLEntry (implements java.security.cert.X509Extension)
    • class java.util.zip.ZipEntry (implements java.lang.Cloneable, java.util.zip.ZipConstants)
      • class java.util.jar.JarEntry
    • class java.util.zip.ZipFile (implements java.util.zip.ZipConstants)
      • class java.util.jar.JarFile

Interface Hierarchy

  • interface javax.swing.text.AbstractDocument.AttributeContext
  • interface javax.swing.text.AbstractDocument.Content
  • interface javax.accessibility.Accessible
  • interface javax.accessibility.AccessibleAction
  • interface javax.accessibility.AccessibleComponent
  • interface javax.accessibility.AccessibleIcon
  • interface javax.accessibility.AccessibleSelection
  • interface javax.accessibility.AccessibleTable
  • interface javax.accessibility.AccessibleTableModelChange
  • interface javax.accessibility.AccessibleText
    • interface javax.accessibility.AccessibleHypertext
  • interface javax.accessibility.AccessibleValue
  • interface java.awt.ActiveEvent
  • interface java.awt.Adjustable
  • interface java.security.spec.AlgorithmParameterSpec
  • interface java.applet.AppletContext
  • interface java.beans.AppletInitializer
  • interface java.applet.AppletStub
  • interface org.omg.CORBA.ARG_IN
  • interface org.omg.CORBA.ARG_INOUT
  • interface org.omg.CORBA.ARG_OUT
  • interface java.sql.Array
  • interface javax.swing.text.AttributeSet
    • interface javax.swing.text.MutableAttributeSet
      • interface javax.swing.text.Style
  • interface javax.swing.text.AttributeSet.CharacterAttribute
  • interface javax.swing.text.AttributeSet.ColorAttribute
  • interface javax.swing.text.AttributeSet.FontAttribute
  • interface javax.swing.text.AttributeSet.ParagraphAttribute
  • interface java.applet.AudioClip
  • interface java.awt.dnd.Autoscroll
  • interface org.omg.CORBA.BAD_POLICY
  • interface org.omg.CORBA.BAD_POLICY_TYPE
  • interface org.omg.CORBA.BAD_POLICY_VALUE
  • interface java.beans.beancontext.BeanContextChild
    • interface java.beans.beancontext.BeanContext (also extends java.util.Collection, java.beans.DesignMode, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface java.beans.beancontext.BeanContextChildComponentProxy
  • interface java.beans.beancontext.BeanContextContainerProxy
  • interface java.beans.beancontext.BeanContextProxy
  • interface java.beans.beancontext.BeanContextServiceProvider
  • interface java.beans.BeanInfo
    • interface java.beans.beancontext.BeanContextServiceProviderBeanInfo
  • interface org.omg.CosNaming.BindingIteratorOperations
    • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface java.sql.Blob
  • interface javax.swing.border.Border
  • interface javax.swing.BoundedRangeModel
  • interface org.omg.CORBA.portable.BoxedValueHelper
  • interface java.awt.image.BufferedImageOp
  • interface javax.swing.text.Caret
  • interface javax.swing.CellEditor
    • interface javax.swing.table.TableCellEditor
    • interface javax.swing.tree.TreeCellEditor
  • interface java.security.Certificate
  • interface java.util.zip.Checksum
  • interface java.awt.datatransfer.ClipboardOwner
  • interface java.sql.Clob
  • interface java.lang.Cloneable
    • interface java.security.acl.AclEntry
    • interface javax.naming.directory.Attribute (also extends java.io.Serializable)
    • interface javax.naming.directory.Attributes (also extends java.io.Serializable)
    • interface java.text.CharacterIterator
      • interface java.text.AttributedCharacterIterator
    • interface javax.naming.Name (also extends java.io.Serializable)
  • interface java.util.Collection
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.beans.DesignMode, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
    • interface java.util.List
    • interface java.util.Set
      • interface java.util.SortedSet
  • interface javax.swing.colorchooser.ColorSelectionModel
  • interface javax.swing.ComboBoxEditor
  • interface javax.swing.plaf.basic.ComboPopup
  • interface java.lang.Comparable
  • interface java.util.Comparator
  • interface java.awt.Composite
  • interface java.awt.CompositeContext
  • interface java.sql.Connection
  • interface java.net.ContentHandlerFactory
  • interface javax.naming.Context
    • interface javax.naming.directory.DirContext
      • interface javax.naming.event.EventDirContext (also extends javax.naming.event.EventContext)
      • interface javax.naming.ldap.LdapContext
    • interface javax.naming.event.EventContext
      • interface javax.naming.event.EventDirContext (also extends javax.naming.directory.DirContext)
  • interface org.omg.CORBA.CTX_RESTRICT_SCOPE
  • interface org.omg.CORBA.CurrentOperations
    • interface org.omg.CORBA.Current (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface java.beans.Customizer
  • interface org.omg.CORBA.CustomMarshal
    • interface org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.portable.ValueBase)
  • interface java.sql.DatabaseMetaData
  • interface java.net.DatagramSocketImplFactory
  • interface java.io.DataInput
    • interface java.io.ObjectInput
  • interface java.io.DataOutput
    • interface java.io.ObjectOutput
  • interface java.beans.DesignMode
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.util.Collection, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface javax.swing.DesktopManager
  • interface javax.swing.text.Document
    • interface javax.swing.text.StyledDocument
  • interface javax.swing.event.DocumentEvent
  • interface javax.swing.event.DocumentEvent.ElementChange
  • interface java.security.DomainCombiner
  • interface java.sql.Driver
  • interface java.security.interfaces.DSAKey
    • interface java.security.interfaces.DSAPrivateKey (also extends java.security.PrivateKey)
    • interface java.security.interfaces.DSAPublicKey (also extends java.security.PublicKey)
  • interface java.security.interfaces.DSAKeyPairGenerator
  • interface java.security.interfaces.DSAParams
  • interface javax.swing.text.html.parser.DTDConstants
  • interface javax.swing.text.Element
  • interface java.util.Enumeration
    • interface javax.naming.NamingEnumeration
  • interface java.util.EventListener
    • interface java.awt.event.ActionListener
      • interface javax.swing.Action
    • interface java.awt.event.AdjustmentListener
    • interface javax.swing.event.AncestorListener
    • interface java.awt.event.AWTEventListener
    • interface java.beans.beancontext.BeanContextMembershipListener
    • interface java.beans.beancontext.BeanContextServiceRevokedListener
      • interface java.beans.beancontext.BeanContextServicesListener
        • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContext)
    • interface javax.swing.event.CaretListener
    • interface javax.swing.event.CellEditorListener
    • interface javax.swing.event.ChangeListener
    • interface java.awt.event.ComponentListener
    • interface java.awt.event.ContainerListener
    • interface javax.sound.midi.ControllerEventListener
    • interface javax.swing.event.DocumentListener
    • interface java.awt.dnd.DragGestureListener
    • interface java.awt.dnd.DragSourceListener
    • interface java.awt.dnd.DropTargetListener
    • interface java.awt.event.FocusListener
    • interface java.awt.event.HierarchyBoundsListener
    • interface java.awt.event.HierarchyListener
    • interface javax.swing.event.HyperlinkListener
    • interface java.awt.event.InputMethodListener
    • interface javax.swing.event.InternalFrameListener
    • interface java.awt.event.ItemListener
    • interface java.awt.event.KeyListener
    • interface javax.sound.sampled.LineListener
    • interface javax.swing.event.ListDataListener
    • interface javax.swing.event.ListSelectionListener
    • interface javax.swing.event.MenuDragMouseListener
    • interface javax.swing.event.MenuKeyListener
    • interface javax.swing.event.MenuListener
    • interface javax.sound.midi.MetaEventListener
    • interface java.awt.event.MouseListener
      • interface javax.swing.event.MouseInputListener (also extends java.awt.event.MouseMotionListener)
    • interface java.awt.event.MouseMotionListener
      • interface javax.swing.event.MouseInputListener (also extends java.awt.event.MouseListener)
    • interface javax.naming.event.NamingListener
      • interface javax.naming.event.NamespaceChangeListener
      • interface javax.naming.event.ObjectChangeListener
      • interface javax.naming.ldap.UnsolicitedNotificationListener
    • interface javax.swing.event.PopupMenuListener
    • interface java.beans.PropertyChangeListener
    • interface javax.swing.event.TableColumnModelListener
    • interface javax.swing.event.TableModelListener
    • interface java.awt.event.TextListener
    • interface javax.swing.event.TreeExpansionListener
    • interface javax.swing.event.TreeModelListener
    • interface javax.swing.event.TreeSelectionListener
    • interface javax.swing.event.TreeWillExpandListener
    • interface javax.swing.event.UndoableEditListener
    • interface java.beans.VetoableChangeListener
    • interface java.awt.event.WindowListener
  • interface java.io.FileFilter
  • interface java.io.FilenameFilter
  • interface java.net.FileNameMap
  • interface java.awt.datatransfer.FlavorMap
  • interface java.security.Guard
  • interface javax.naming.ldap.HasControls
    • interface javax.naming.ldap.UnsolicitedNotification (also extends javax.naming.ldap.ExtendedResponse)
  • interface javax.swing.text.Highlighter
  • interface javax.swing.text.Highlighter.Highlight
  • interface javax.swing.text.Highlighter.HighlightPainter
  • interface javax.swing.Icon
  • interface java.awt.image.ImageConsumer
  • interface java.awt.image.ImageObserver
  • interface java.awt.image.ImageProducer
  • interface javax.naming.spi.InitialContextFactory
  • interface javax.naming.spi.InitialContextFactoryBuilder
  • interface java.awt.im.spi.InputMethod
  • interface java.awt.im.spi.InputMethodDescriptor
  • interface java.awt.im.InputMethodRequests
    • interface java.awt.im.spi.InputMethodContext
  • interface java.lang.reflect.InvocationHandler
  • interface org.omg.CORBA.portable.InvokeHandler
    • interface javax.rmi.CORBA.Tie
  • interface org.omg.CORBA.IRObjectOperations
    • interface org.omg.CORBA.IDLTypeOperations
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObject)
    • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
  • interface java.awt.ItemSelectable
    • interface javax.swing.ButtonModel
  • interface java.util.Iterator
    • interface java.util.ListIterator
  • interface javax.swing.JComboBox.KeySelectionManager
  • interface javax.swing.text.Keymap
  • interface java.security.spec.KeySpec
  • interface java.awt.LayoutManager
    • interface java.awt.LayoutManager2
  • interface javax.sound.sampled.Line
    • interface javax.sound.sampled.DataLine
      • interface javax.sound.sampled.Clip
      • interface javax.sound.sampled.SourceDataLine
      • interface javax.sound.sampled.TargetDataLine
    • interface javax.sound.sampled.Mixer
    • interface javax.sound.sampled.Port
  • interface javax.swing.ListCellRenderer
  • interface javax.swing.ListModel
    • interface javax.swing.ComboBoxModel
      • interface javax.swing.MutableComboBoxModel
  • interface javax.swing.ListSelectionModel
  • interface java.rmi.server.LoaderHandler
  • interface java.util.Map
    • interface java.util.SortedMap
  • interface java.util.Map.Entry
  • interface java.lang.reflect.Member
  • interface java.awt.MenuContainer
  • interface javax.swing.MenuElement
  • interface javax.sound.midi.MidiChannel
  • interface javax.sound.midi.MidiDevice
    • interface javax.sound.midi.Sequencer
    • interface javax.sound.midi.Synthesizer
  • interface java.awt.font.MultipleMaster
  • interface javax.naming.NameParser
  • interface org.omg.CosNaming.NamingContextOperations
    • interface org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface org.omg.CORBA.Object
    • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.DomainManagerOperations
      • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
    • interface org.omg.CORBA.DynAny
      • interface org.omg.CORBA.DynArray (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynEnum (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynFixed (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynSequence (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynStruct (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynUnion (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynValue (also extends org.omg.CORBA.Object)
    • interface org.omg.CORBA.DynArray (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynEnum (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynFixed (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynSequence (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynStruct (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynUnion (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynValue (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObjectOperations)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextOperations)
    • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.PolicyOperations)
    • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.SendingContext.RunTimeOperations)
  • interface javax.naming.spi.ObjectFactory
    • interface javax.naming.spi.DirObjectFactory
  • interface javax.naming.spi.ObjectFactoryBuilder
  • interface java.io.ObjectInputValidation
  • interface java.io.ObjectStreamConstants
  • interface java.util.Observer
  • interface org.omg.CORBA.OMGVMCID
  • interface java.awt.font.OpenType
  • interface java.security.acl.Owner
    • interface java.security.acl.Acl
  • interface java.awt.print.Pageable
  • interface java.awt.PaintContext
  • interface java.awt.geom.PathIterator
  • interface java.security.acl.Permission
  • interface org.omg.CORBA.PolicyOperations
    • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface javax.rmi.CORBA.PortableRemoteObjectDelegate
  • interface javax.swing.text.Position
  • interface java.security.Principal
    • interface java.security.acl.Group
  • interface java.awt.print.Printable
  • interface java.awt.print.PrinterGraphics
  • interface java.awt.PrintGraphics
  • interface org.omg.CORBA.PRIVATE_MEMBER
  • interface java.security.PrivilegedAction
  • interface java.security.PrivilegedExceptionAction
  • interface java.beans.PropertyEditor
  • interface org.omg.CORBA.PUBLIC_MEMBER
  • interface java.awt.image.RasterOp
  • interface javax.sound.midi.Receiver
  • interface java.sql.Ref
  • interface javax.naming.Referenceable
  • interface java.rmi.registry.RegistryHandler
  • interface java.rmi.Remote
    • interface java.rmi.activation.ActivationInstantiator
    • interface java.rmi.activation.ActivationMonitor
    • interface java.rmi.activation.ActivationSystem
    • interface java.rmi.activation.Activator
    • interface java.rmi.dgc.DGC
    • interface java.rmi.registry.Registry
  • interface java.rmi.server.RemoteCall
  • interface java.awt.image.renderable.RenderableImage
  • interface java.awt.image.RenderedImage
    • interface java.awt.image.WritableRenderedImage
  • interface java.awt.image.renderable.RenderedImageFactory
    • interface java.awt.image.renderable.ContextualRenderedImageFactory
  • interface javax.swing.Renderer
  • interface javax.naming.spi.Resolver
  • interface org.omg.CORBA.portable.ResponseHandler
  • interface java.sql.ResultSet
  • interface java.sql.ResultSetMetaData
  • interface java.rmi.server.RMIClientSocketFactory
  • interface java.rmi.server.RMIFailureHandler
  • interface java.rmi.server.RMIServerSocketFactory
  • interface javax.swing.RootPaneContainer
  • interface javax.swing.tree.RowMapper
  • interface java.security.interfaces.RSAKey
    • interface java.security.interfaces.RSAPrivateKey (also extends java.security.PrivateKey)
      • interface java.security.interfaces.RSAPrivateCrtKey
    • interface java.security.interfaces.RSAPublicKey (also extends java.security.PublicKey)
  • interface java.lang.Runnable
  • interface org.omg.SendingContext.RunTimeOperations
    • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface javax.swing.Scrollable
  • interface javax.swing.ScrollPaneConstants
  • interface java.io.Serializable
    • interface javax.naming.directory.Attribute (also extends java.lang.Cloneable)
    • interface javax.naming.directory.Attributes (also extends java.lang.Cloneable)
    • interface javax.naming.ldap.Control
    • interface javax.naming.ldap.ExtendedRequest
    • interface javax.naming.ldap.ExtendedResponse
      • interface javax.naming.ldap.UnsolicitedNotification (also extends javax.naming.ldap.HasControls)
    • interface java.io.Externalizable
      • interface java.rmi.server.RemoteRef
        • interface java.rmi.server.ServerRef
    • interface org.omg.CORBA.portable.IDLEntity
      • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.IDLTypeOperations, org.omg.CORBA.IRObject)
      • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.IRObjectOperations, org.omg.CORBA.Object)
        • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
        • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
      • interface org.omg.CosNaming.NamingContext (also extends org.omg.CosNaming.NamingContextOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.Object, org.omg.CORBA.PolicyOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.IRObject)
      • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.Object, org.omg.SendingContext.RunTimeOperations)
      • interface org.omg.CORBA.portable.ValueBase
        • interface org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.CustomMarshal)
        • interface org.omg.CORBA.DataInputStream
        • interface org.omg.CORBA.DataOutputStream
        • interface org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.Streamable)
    • interface java.security.Key
      • interface java.security.PrivateKey
        • interface java.security.interfaces.DSAPrivateKey (also extends java.security.interfaces.DSAKey)
        • interface java.security.interfaces.RSAPrivateKey (also extends java.security.interfaces.RSAKey)
          • interface java.security.interfaces.RSAPrivateCrtKey
      • interface java.security.PublicKey
        • interface java.security.interfaces.DSAPublicKey (also extends java.security.interfaces.DSAKey)
        • interface java.security.interfaces.RSAPublicKey (also extends java.security.interfaces.RSAKey)
    • interface javax.naming.Name (also extends java.lang.Cloneable)
  • interface java.awt.Shape
  • interface javax.swing.SingleSelectionModel
  • interface java.rmi.server.Skeleton
  • interface java.net.SocketImplFactory
  • interface java.net.SocketOptions
  • interface javax.sound.midi.Soundbank
  • interface java.sql.SQLData
  • interface java.sql.SQLInput
  • interface java.sql.SQLOutput
  • interface javax.swing.undo.StateEditable
  • interface javax.naming.spi.StateFactory
    • interface javax.naming.spi.DirStateFactory
  • interface java.sql.Statement
    • interface java.sql.PreparedStatement
      • interface java.sql.CallableStatement
  • interface org.omg.CORBA.portable.Streamable
    • interface org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.ValueBase)
  • interface java.awt.Stroke
  • interface java.sql.Struct
  • interface javax.rmi.CORBA.StubDelegate
  • interface javax.swing.SwingConstants
  • interface javax.swing.text.TabableView
  • interface javax.swing.text.TabExpander
  • interface javax.swing.table.TableCellRenderer
  • interface javax.swing.table.TableColumnModel
  • interface javax.swing.table.TableModel
  • interface java.awt.image.TileObserver
  • interface java.awt.datatransfer.Transferable
  • interface javax.sound.midi.Transmitter
  • interface java.awt.Transparency
    • interface java.awt.Paint
  • interface javax.swing.tree.TreeCellRenderer
  • interface javax.swing.tree.TreeModel
  • interface javax.swing.tree.TreeNode
    • interface javax.swing.tree.MutableTreeNode
  • interface javax.swing.tree.TreeSelectionModel
  • interface javax.swing.UIDefaults.ActiveValue
  • interface javax.swing.UIDefaults.LazyValue
  • interface javax.swing.plaf.UIResource
  • interface javax.swing.undo.UndoableEdit
  • interface java.rmi.server.Unreferenced
  • interface org.omg.CORBA.UNSUPPORTED_POLICY
  • interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE
  • interface java.net.URLStreamHandlerFactory
  • interface javax.rmi.CORBA.UtilDelegate
  • interface org.omg.CORBA.portable.ValueFactory
  • interface javax.rmi.CORBA.ValueHandler
  • interface javax.swing.text.ViewFactory
  • interface java.beans.Visibility
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.util.Collection, java.beans.DesignMode)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface org.omg.CORBA.VM_ABSTRACT
  • interface org.omg.CORBA.VM_CUSTOM
  • interface org.omg.CORBA.VM_NONE
  • interface org.omg.CORBA.VM_TRUNCATABLE
  • interface javax.swing.WindowConstants
  • interface java.security.cert.X509Extension
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


I-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

I

I - Static variable in class javax.swing.text.html.HTML.Tag
icAbsoluteColorimetric - Static variable in class java.awt.color.ICC_Profile
ICC Profile Rendering Intent: AbsoluteColorimetric.
ICC_ColorSpace - class java.awt.color.ICC_ColorSpace.
An implementation of the abstract ColorSpace class.
ICC_ColorSpace(ICC_Profile) - Constructor for class java.awt.color.ICC_ColorSpace
Constructs a new ICC_ColorSpace from an ICC_Profile object.
ICC_Profile - class java.awt.color.ICC_Profile.
A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).
ICC_ProfileGray - class java.awt.color.ICC_ProfileGray.
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
ICC_ProfileRGB - class java.awt.color.ICC_ProfileRGB.
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags.
icCurveCount - Static variable in class java.awt.color.ICC_Profile
ICC Profile Constant: curveType count.
icCurveData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Constant: curveType data.
icHdrAttributes - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: device attributes.
icHdrCmmId - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: CMM for this profile.
icHdrColorSpace - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: color space of data.
icHdrCreator - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: profile creator.
icHdrDate - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: date profile was created.
icHdrDeviceClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: type of profile.
icHdrFlags - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: various bit settings.
icHdrIlluminant - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: profile illuminant.
icHdrMagic - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: icMagicNumber.
icHdrManufacturer - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: device manufacturer.
icHdrModel - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: device model number.
icHdrPcs - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: PCS - XYZ or Lab only.
icHdrPlatform - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: primary platform.
icHdrRenderingIntent - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: rendering intent.
icHdrSize - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: profile size in bytes.
icHdrVersion - Static variable in class java.awt.color.ICC_Profile
ICC Profile Header Location: format version number.
icon - Variable in class javax.swing.JOptionPane
Icon used in pane.
icon - Variable in class javax.swing.plaf.basic.BasicRadioButtonUI
Icon - interface javax.swing.Icon.
A small fixed size picture, typically used to decorate components.
ICON - Static variable in class javax.accessibility.AccessibleRole
A small fixed size picture, typically used to decorate components.
ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon that represents the button.
ICON_COLOR_16x16 - Static variable in interface java.beans.BeanInfo
Constant to indicate a 16 x 16 color icon.
ICON_COLOR_32x32 - Static variable in interface java.beans.BeanInfo
Constant to indicate a 32 x 32 color icon.
ICON_MONO_16x16 - Static variable in interface java.beans.BeanInfo
Constant to indicate a 16 x 16 monochrome icon.
ICON_MONO_32x32 - Static variable in interface java.beans.BeanInfo
Constant to indicate a 32 x 32 monochrome icon.
ICON_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for icon.
iconable - Variable in class javax.swing.JInternalFrame
The frame can "iconized" (shrunk down and displayed as an icon-image).
IconAttribute - Static variable in class javax.swing.text.StyleConstants
Name of the icon attribute.
IconAttribute - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the icon attribute.
iconButton - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
iconCache - Variable in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
IconElementName - Static variable in class javax.swing.text.StyleConstants
Name of elements used to represent icons.
iconIcon - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
ICONIFIED - Static variable in class java.awt.Frame
ICONIFIED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is minimized and is represented only by an icon.
ICONIFY_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
iconifyAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
iconifyFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, remove this frame from it's parent and add an iconic representation.
iconifyFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Removes the frame from its parent and adds its desktopIcon to the parent.
iconifyFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the user wants to iconify the frame.
iconOnly - Variable in class javax.swing.plaf.metal.MetalComboBoxButton
IconUIResource - class javax.swing.plaf.IconUIResource.
IconUIResource(Icon) - Constructor for class javax.swing.plaf.IconUIResource
Creates a UIResource icon object which wraps an existing Icon instance.
IconView - class javax.swing.text.IconView.
Icon decorator that implements the view interface.
IconView(Element) - Constructor for class javax.swing.text.IconView
Creates a new icon view that represents an element.
icPerceptual - Static variable in class java.awt.color.ICC_Profile
ICC Profile Rendering Intent: Perceptual.
icRelativeColorimetric - Static variable in class java.awt.color.ICC_Profile
ICC Profile Rendering Intent: RelativeColorimetric.
icSaturation - Static variable in class java.awt.color.ICC_Profile
ICC Profile Rendering Intent: Saturation.
icSigAbstractClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'abst'.
icSigAToB0Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'A2B0'.
icSigAToB1Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'A2B1'.
icSigAToB2Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'A2B2'.
icSigBlueColorantTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'bXYZ'.
icSigBlueTRCTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'bTRC'.
icSigBToA0Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'B2A0'.
icSigBToA1Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'B2A1'.
icSigBToA2Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'B2A2'.
icSigCalibrationDateTimeTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'calt'.
icSigCharTargetTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'targ'.
icSigChromaticityTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'chrm'.
icSigCmyData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'CMY '.
icSigCmykData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'CMYK'.
icSigColorSpaceClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'spac'.
icSigCopyrightTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'cprt'.
icSigCrdInfoTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'crdi'.
icSigDeviceMfgDescTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'dmnd'.
icSigDeviceModelDescTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'dmdd'.
icSigDeviceSettingsTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'devs'.
icSigDisplayClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'mntr'.
icSigGamutTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'gamt'.
icSigGrayData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'GRAY'.
icSigGrayTRCTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'kTRC'.
icSigGreenColorantTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'gXYZ'.
icSigGreenTRCTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'gTRC'.
icSigHead - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'head' - special.
icSigHlsData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'HLS'.
icSigHsvData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'HSV'.
icSigInputClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'scnr'.
icSigLabData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'Lab '.
icSigLinkClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'link'.
icSigLuminanceTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'lumi'.
icSigLuvData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'Luv '.
icSigMeasurementTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'meas'.
icSigMediaBlackPointTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'bkpt'.
icSigMediaWhitePointTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'wtpt'.
icSigNamedColor2Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'ncl2'.
icSigNamedColorClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'nmcl'.
icSigOutputClass - Static variable in class java.awt.color.ICC_Profile
ICC Profile Class Signature: 'prtr'.
icSigOutputResponseTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'resp'.
icSigPreview0Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'pre0'.
icSigPreview1Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'pre1'.
icSigPreview2Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'pre2'.
icSigProfileDescriptionTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'desc'.
icSigProfileSequenceDescTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'pseq'.
icSigPs2CRD0Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'psd0'.
icSigPs2CRD1Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'psd1'.
icSigPs2CRD2Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'psd2'.
icSigPs2CRD3Tag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'psd3'.
icSigPs2CSATag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'ps2s'.
icSigPs2RenderingIntentTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'ps2i'.
icSigRedColorantTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'rXYZ'.
icSigRedTRCTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'rTRC'.
icSigRgbData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'RGB '.
icSigScreeningDescTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'scrd'.
icSigScreeningTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'scrn'.
icSigSpace2CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '2CLR'.
icSigSpace3CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '3CLR'.
icSigSpace4CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '4CLR'.
icSigSpace5CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '5CLR'.
icSigSpace6CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '6CLR'.
icSigSpace7CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '7CLR'.
icSigSpace8CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '8CLR'.
icSigSpace9CLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: '9CLR'.
icSigSpaceACLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'ACLR'.
icSigSpaceBCLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'BCLR'.
icSigSpaceCCLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'CCLR'.
icSigSpaceDCLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'DCLR'.
icSigSpaceECLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'ECLR'.
icSigSpaceFCLR - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'FCLR'.
icSigTechnologyTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'tech'.
icSigUcrBgTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'bfd '.
icSigViewingCondDescTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'vued'.
icSigViewingConditionsTag - Static variable in class java.awt.color.ICC_Profile
ICC Profile Tag Signature: 'view'.
icSigXYZData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'XYZ '.
icSigYCbCrData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'YCbr'.
icSigYxyData - Static variable in class java.awt.color.ICC_Profile
ICC Profile Color Space Type Signature: 'Yxy '.
icTagReserved - Static variable in class java.awt.color.ICC_Profile
ICC Profile Constant: reserved.
icTagType - Static variable in class java.awt.color.ICC_Profile
ICC Profile Constant: tag type signaturE.
icXYZNumberX - Static variable in class java.awt.color.ICC_Profile
ICC Profile Constant: XYZNumber X.
id - Variable in class java.awt.Event
Indicates which type of event the event is, and which other Event variables are relevant for the event.
id - Variable in class java.awt.AWTEvent
id - Variable in class org.omg.CORBA.NameValuePair
The name to be associated with a value by this NameValuePair object.
id - Variable in class org.omg.CORBA.ValueMember
The name of the value member described by this ValueMember object.
id - Variable in class org.omg.CosNaming.NameComponent
ID - Static variable in class javax.swing.text.html.HTML.Attribute
ID - Static variable in interface javax.swing.text.html.parser.DTDConstants
id() - Static method in class org.omg.CORBA.UnionMemberHelper
id() - Static method in class org.omg.CORBA.ServiceInformationHelper
id() - Static method in class org.omg.CORBA.PolicyListHelper
id() - Static method in class org.omg.CORBA.NameValuePairHelper
id() - Static method in class org.omg.CORBA.LongSeqHelper
id() - Static method in class org.omg.CORBA.OctetSeqHelper
id() - Static method in class org.omg.CORBA.IdentifierHelper
id() - Static method in class org.omg.CORBA.FloatSeqHelper
id() - Static method in class org.omg.CORBA.ServiceDetailHelper
id() - Static method in class org.omg.CORBA.BooleanSeqHelper
id() - Static method in class org.omg.CORBA.VisibilityHelper
id() - Static method in class org.omg.CORBA.ULongSeqHelper
id() - Static method in class org.omg.CORBA.StringValueHelper
id() - Static method in class org.omg.CORBA.CharSeqHelper
id() - Static method in class org.omg.CORBA.SetOverrideTypeHelper
id() - Static method in class org.omg.CORBA.VersionSpecHelper
id() - Static method in class org.omg.CORBA.DefinitionKindHelper
id() - Static method in class org.omg.CORBA.StructMemberHelper
id() - Static method in class org.omg.CORBA.IDLTypeHelper
id() - Static method in class org.omg.CORBA.UShortSeqHelper
id() - Static method in class org.omg.CORBA.WCharSeqHelper
id() - Method in class org.omg.CORBA.TypeCode
Retrieves the RepositoryId globally identifying the type of this TypeCode object.
id() - Static method in class org.omg.CORBA.DoubleSeqHelper
id() - Static method in class org.omg.CORBA.WStringValueHelper
id() - Static method in class org.omg.CORBA.PolicyTypeHelper
id() - Static method in class org.omg.CORBA.ULongLongSeqHelper
id() - Static method in class org.omg.CORBA.RepositoryIdHelper
id() - Static method in class org.omg.CORBA.ShortSeqHelper
id() - Static method in class org.omg.CORBA.ObjectHelper
id() - Static method in class org.omg.CORBA.CurrentHelper
id() - Static method in class org.omg.CORBA.LongLongSeqHelper
id() - Static method in class org.omg.CORBA.CompletionStatusHelper
id() - Static method in class org.omg.CORBA.FieldNameHelper
id() - Static method in class org.omg.CORBA.ValueBaseHelper
id() - Static method in class org.omg.CORBA.PolicyHelper
id() - Static method in class org.omg.CORBA.AnySeqHelper
id() - Static method in class org.omg.CORBA.ValueMemberHelper
id() - Static method in class org.omg.CosNaming.NameHelper
id() - Static method in class org.omg.CosNaming.IstringHelper
id() - Static method in class org.omg.CosNaming.BindingListHelper
id() - Static method in class org.omg.CosNaming.BindingIteratorHelper
id() - Static method in class org.omg.CosNaming.NameComponentHelper
id() - Static method in class org.omg.CosNaming.BindingTypeHelper
id() - Static method in class org.omg.CosNaming.NamingContextHelper
id() - Static method in class org.omg.CosNaming.BindingHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
id() - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
IDENTICAL - Static variable in class java.text.Collator
Collator strength value.
identifier - Variable in class javax.swing.table.TableColumn
This object is not used internally by the drawing machinery of the JTable; identifiers may be set in the TableColumn as as an optional way to tag and locate table columns.
IdentifierHelper - class org.omg.CORBA.IdentifierHelper.
org/omg/CORBA/IdentifierHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:42 o'clock GMT+00:00
IdentifierHelper() - Constructor for class org.omg.CORBA.IdentifierHelper
identities() - Method in class java.security.IdentityScope
Deprecated. Returns an enumeration of all identities in this identity scope.
Identity - class java.security.Identity.
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
Identity() - Constructor for class java.security.Identity
Deprecated. Constructor for serialization only.
Identity(String) - Constructor for class java.security.Identity
Deprecated. Constructs an identity with the specified name and no scope.
Identity(String, IdentityScope) - Constructor for class java.security.Identity
Deprecated. Constructs an identity with the specified name and scope.
identityEquals(Identity) - Method in class java.security.Identity
Deprecated. Tests for equality between the specified identity and this identity.
identityHashCode(Object) - Static method in class java.lang.System
Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().
IdentityScope - class java.security.IdentityScope.
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
IdentityScope() - Constructor for class java.security.IdentityScope
Deprecated. This constructor is used for serialization only and should not be used by subclasses.
IdentityScope(String) - Constructor for class java.security.IdentityScope
Deprecated. Constructs a new identity scope with the specified name.
IdentityScope(String, IdentityScope) - Constructor for class java.security.IdentityScope
Deprecated. Constructs a new identity scope with the specified name and scope.
IDLEntity - interface org.omg.CORBA.portable.IDLEntity.
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
IDLType - interface org.omg.CORBA.IDLType.
An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
IDLTypeHelper - class org.omg.CORBA.IDLTypeHelper.
org/omg/CORBA/IDLTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
IDLTypeHelper() - Constructor for class org.omg.CORBA.IDLTypeHelper
IDLTypeOperations - interface org.omg.CORBA.IDLTypeOperations.
This interface must be implemented by all IDLType objects.
IDREF - Static variable in interface javax.swing.text.html.parser.DTDConstants
IDREFS - Static variable in interface javax.swing.text.html.parser.DTDConstants
IEEEremainder(double, double) - Static method in class java.lang.StrictMath
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
IEEEremainder(double, double) - Static method in class java.lang.Math
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
ifModifiedSince - Variable in class java.net.URLConnection
Some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.
IGNORE_ALL_BEANINFO - Static variable in class java.beans.Introspector
IGNORE_IMMEDIATE_BEANINFO - Static variable in class java.beans.Introspector
IllegalAccessError - error java.lang.IllegalAccessError.
Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
IllegalAccessError() - Constructor for class java.lang.IllegalAccessError
Constructs an IllegalAccessError with no detail message.
IllegalAccessError(String) - Constructor for class java.lang.IllegalAccessError
Constructs an IllegalAccessError with the specified detail message.
IllegalAccessException - exception java.lang.IllegalAccessException.
Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
IllegalAccessException() - Constructor for class java.lang.IllegalAccessException
Constructs an IllegalAccessException without a detail message.
IllegalAccessException(String) - Constructor for class java.lang.IllegalAccessException
Constructs an IllegalAccessException with a detail message.
IllegalArgumentException - exception java.lang.IllegalArgumentException.
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
IllegalArgumentException() - Constructor for class java.lang.IllegalArgumentException
Constructs an IllegalArgumentException with no detail message.
IllegalArgumentException(String) - Constructor for class java.lang.IllegalArgumentException
Constructs an IllegalArgumentException with the specified detail message.
IllegalComponentStateException - exception java.awt.IllegalComponentStateException.
Signals that an AWT component is not in an appropriate state for the requested operation.
IllegalComponentStateException() - Constructor for class java.awt.IllegalComponentStateException
Constructs an IllegalComponentStateException with no detail message.
IllegalComponentStateException(String) - Constructor for class java.awt.IllegalComponentStateException
Constructs an IllegalComponentStateException with the specified detail message.
IllegalMonitorStateException - exception java.lang.IllegalMonitorStateException.
Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
IllegalMonitorStateException() - Constructor for class java.lang.IllegalMonitorStateException
Constructs an IllegalMonitorStateException with no detail message.
IllegalMonitorStateException(String) - Constructor for class java.lang.IllegalMonitorStateException
Constructs an IllegalMonitorStateException with the specified detail message.
IllegalPathStateException - exception java.awt.geom.IllegalPathStateException.
The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
IllegalPathStateException() - Constructor for class java.awt.geom.IllegalPathStateException
Constructs an IllegalPathStateException with no detail message.
IllegalPathStateException(String) - Constructor for class java.awt.geom.IllegalPathStateException
Constructs an IllegalPathStateException with the specified detail message.
IllegalStateException - exception java.lang.IllegalStateException.
Signals that a method has been invoked at an illegal or inappropriate time.
IllegalStateException() - Constructor for class java.lang.IllegalStateException
Constructs an IllegalStateException with no detail message.
IllegalStateException(String) - Constructor for class java.lang.IllegalStateException
Constructs an IllegalStateException with the specified detail message.
IllegalThreadStateException - exception java.lang.IllegalThreadStateException.
Thrown to indicate that a thread is not in an appropriate state for the requested operation.
IllegalThreadStateException() - Constructor for class java.lang.IllegalThreadStateException
Constructs an IllegalThreadStateException with no detail message.
IllegalThreadStateException(String) - Constructor for class java.lang.IllegalThreadStateException
Constructs an IllegalThreadStateException with the specified detail message.
Image - class java.awt.Image.
The abstract class Image is the superclass of all classes that represent graphical images.
Image() - Constructor for class java.awt.Image
IMAGEABORTED - Static variable in interface java.awt.image.ImageConsumer
The image creation process was deliberately aborted.
imageComplete(int) - Method in class java.awt.image.ImageFilter
Filters the information provided in the imageComplete method of the ImageConsumer interface.
imageComplete(int) - Method in class java.awt.image.PixelGrabber
The imageComplete method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
imageComplete(int) - Method in interface java.awt.image.ImageConsumer
The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occured.
imageComplete(int) - Method in class java.awt.image.BufferedImageFilter
Filters the information provided in the imageComplete method of the ImageConsumer interface.
ImageConsumer - interface java.awt.image.ImageConsumer.
The interface for objects expressing interest in image data through the ImageProducer interfaces.
IMAGEERROR - Static variable in interface java.awt.image.ImageConsumer
An error was encountered while producing the image.
ImageFilter - class java.awt.image.ImageFilter.
This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
ImageFilter() - Constructor for class java.awt.image.ImageFilter
ImageGraphicAttribute - class java.awt.font.ImageGraphicAttribute.
The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.
ImageGraphicAttribute(Image, int) - Constructor for class java.awt.font.ImageGraphicAttribute
Constucts an ImageGraphicAttribute from the specified Image.
ImageGraphicAttribute(Image, int, float, float) - Constructor for class java.awt.font.ImageGraphicAttribute
Constructs an ImageGraphicAttribute from the specified Image.
ImageIcon - class javax.swing.ImageIcon.
An implementation of the Icon interface that paints Icons from Images.
ImageIcon.AccessibleImageIcon - class javax.swing.ImageIcon.AccessibleImageIcon.
This class implements accessibility support for the ImageIcon class.
ImageIcon.AccessibleImageIcon(ImageIcon) - Constructor for class javax.swing.ImageIcon.AccessibleImageIcon
ImageIcon() - Constructor for class javax.swing.ImageIcon
Creates an uninitialized image icon.
ImageIcon(byte[]) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG.
ImageIcon(byte[], String) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG.
ImageIcon(Image) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from an image object.
ImageIcon(Image, String) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from the image.
ImageIcon(String) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from the specified file.
ImageIcon(String, String) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from the specified file.
ImageIcon(URL) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from the specified URL.
ImageIcon(URL, String) - Constructor for class javax.swing.ImageIcon
Creates an ImageIcon from the specified URL.
ImageObserver - interface java.awt.image.ImageObserver.
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.
ImageProducer - interface java.awt.image.ImageProducer.
The interface for objects which can produce the image data for Images.
imageSubmit(String) - Method in class javax.swing.text.html.FormView
This method is called to submit a form in response to a click on an image -- an <INPUT> form element of type "image".
imageUpdate(Image, int, int, int, int, int) - Method in class java.awt.Component
Repaints the component when the image has changed.
imageUpdate(Image, int, int, int, int, int) - Method in interface java.awt.image.ImageObserver
This method is called when information about an image which was previously requested using an asynchronous interface becomes available.
imageUpdate(Image, int, int, int, int, int) - Method in class javax.swing.AbstractButton
This is overridden to return false if the current Icon's Image is not equal to the passed in Image img.
imageUpdate(Image, int, int, int, int, int) - Method in class javax.swing.JLabel
This is overriden to return false if the current Icon's Image is not equal to the passed in Image img.
ImagingOpException - exception java.awt.image.ImagingOpException.
The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
ImagingOpException(String) - Constructor for class java.awt.image.ImagingOpException
Constructs an ImagingOpException object with the specified message.
IMG - Static variable in class javax.swing.text.html.HTML.Tag
IMG_ALIGN_BOTTOM - Static variable in class javax.swing.text.html.HTMLEditorKit
Align images at the bottom.
IMG_ALIGN_MIDDLE - Static variable in class javax.swing.text.html.HTMLEditorKit
Align images in the middle.
IMG_ALIGN_TOP - Static variable in class javax.swing.text.html.HTMLEditorKit
Align images at the top.
IMG_BORDER - Static variable in class javax.swing.text.html.HTMLEditorKit
Align images at the border.
IMP_LIMIT - exception org.omg.CORBA.IMP_LIMIT.
The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
IMP_LIMIT() - Constructor for class org.omg.CORBA.IMP_LIMIT
Constructs an IMP_LIMIT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
IMP_LIMIT(int, CompletionStatus) - Constructor for class org.omg.CORBA.IMP_LIMIT
Constructs an IMP_LIMIT exception with the specified minor code and completion status.
IMP_LIMIT(String) - Constructor for class org.omg.CORBA.IMP_LIMIT
Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
IMP_LIMIT(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.IMP_LIMIT
Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.
impl - Variable in class javax.naming.CompoundName
Implementation of this compound name.
implAccept(Socket) - Method in class java.net.ServerSocket
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.
IMPLEMENTATION_TITLE - Static variable in class java.util.jar.Attributes.Name
Name object for Implementation-Title manifest attribute used for package versioning.
IMPLEMENTATION_URL - Static variable in class java.util.jar.Attributes.Name
Name object for Implementation-Vendor-URL manifest attribute used for package versioning.
IMPLEMENTATION_VENDOR - Static variable in class java.util.jar.Attributes.Name
Name object for Implementation-Vendor manifest attribute used for package versioning.
IMPLEMENTATION_VENDOR_ID - Static variable in class java.util.jar.Attributes.Name
Name object for Implementation-Vendor-Id manifest attribute used for package versioning.
IMPLEMENTATION_VERSION - Static variable in class java.util.jar.Attributes.Name
Name object for Implementation-Version manifest attribute used for package versioning.
IMPLIED - Static variable in class javax.swing.text.html.HTML.Tag
All text content must be in a paragraph element.
IMPLIED - Static variable in class javax.swing.text.html.HTMLEditorKit.ParserCallback
This is passed as an attribute in the attributeset to indicate the element is implied eg, the string '<>foo<\t>' contains an implied html element and an implied body element.
IMPLIED - Static variable in interface javax.swing.text.html.parser.DTDConstants
implies(CodeSource) - Method in class java.security.CodeSource
Returns true if this CodeSource object "implies" the specified CodeSource.
implies(Permission) - Method in class java.io.FilePermission
Checks if this FilePermission object "implies" the specified permission.
implies(Permission) - Method in class java.net.SocketPermission
Checks if this socket permission object "implies" the specified permission.
implies(Permission) - Method in class java.security.Permission
Checks if the specified permission's actions are "implied by" this object's actions.
implies(Permission) - Method in class java.security.BasicPermission
Checks if the specified permission is "implied" by this object.
implies(Permission) - Method in class java.security.UnresolvedPermission
This method always returns false for unresolved permissions.
implies(Permission) - Method in class java.security.AllPermission
Checks if the specified permission is "implied" by this object.
implies(Permission) - Method in class java.security.ProtectionDomain
Check and see if this ProtectionDomain implies the permissions expressed in the Permission object.
implies(Permission) - Method in class java.security.PermissionCollection
Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
implies(Permission) - Method in class java.security.Permissions
Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object.
implies(Permission) - Method in class java.util.PropertyPermission
Checks if this PropertyPermission object "implies" the specified permission.
importedKeyCascade - Static variable in interface java.sql.DatabaseMetaData
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeyInitiallyDeferred - Static variable in interface java.sql.DatabaseMetaData
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeyInitiallyImmediate - Static variable in interface java.sql.DatabaseMetaData
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeyNoAction - Static variable in interface java.sql.DatabaseMetaData
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeyNotDeferrable - Static variable in interface java.sql.DatabaseMetaData
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeyRestrict - Static variable in interface java.sql.DatabaseMetaData
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeySetDefault - Static variable in interface java.sql.DatabaseMetaData
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importedKeySetNull - Static variable in interface java.sql.DatabaseMetaData
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
importStyleSheet(URL) - Method in class javax.swing.text.html.StyleSheet
Imports a style sheet from url.
in - Variable in class java.io.FilterReader
The underlying character-input stream, or null if the stream has been closed.
in - Variable in class java.io.FilterInputStream
The input stream to be filtered.
in - Variable in class java.io.PipedInputStream
The index of the position in the circular buffer at which the next byte of data will be stored when received from the connected piped output stream.
in - Static variable in class java.io.FileDescriptor
A handle to the standard input stream.
in - Static variable in class java.lang.System
The "standard" input stream.
INACTIVE_CAPTION - Static variable in class java.awt.SystemColor
The array index for the inactive caption background color.
INACTIVE_CAPTION_BORDER - Static variable in class java.awt.SystemColor
The array index for the inactive caption border color.
INACTIVE_CAPTION_TEXT - Static variable in class java.awt.SystemColor
The array index for the inactive caption text color.
inactive(ActivationID) - Static method in class java.rmi.activation.Activatable
Informs the system that the object with the corresponding activation id is currently inactive.
inactiveCaption - Static variable in class java.awt.SystemColor
The background color for inactive captions in window borders.
inactiveCaptionBorder - Static variable in class java.awt.SystemColor
The border color for inactive captios in window borders.
inactiveCaptionText - Static variable in class java.awt.SystemColor
The text color for inactive captions in window borders.
inactiveGroup() - Method in class java.rmi.activation.ActivationGroup
This protected method is necessary for subclasses to make the inactiveGroup callback to the group's monitor.
inactiveGroup(ActivationGroupID, long) - Method in interface java.rmi.activation.ActivationMonitor
Informs that the group is now inactive.
inactiveObject(ActivationID) - Method in class java.rmi.activation.ActivationGroup
The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
inactiveObject(ActivationID) - Method in interface java.rmi.activation.ActivationMonitor
An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates).
inCheck - Variable in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
inClass(String) - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
inClassLoader() - Method in class java.lang.SecurityManager
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
inclusions - Variable in class javax.swing.text.html.parser.Element
IncompatibleClassChangeError - error java.lang.IncompatibleClassChangeError.
Thrown when an incompatible class change has occurred to some class definition.
IncompatibleClassChangeError() - Constructor for class java.lang.IncompatibleClassChangeError
Constructs an IncompatibleClassChangeError with no detail message.
IncompatibleClassChangeError(String) - Constructor for class java.lang.IncompatibleClassChangeError
Constructs an IncompatibleClassChangeError with the specified detail message.
InconsistentTypeCode - exception org.omg.CORBA.ORBPackage.InconsistentTypeCode.
InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
InconsistentTypeCode() - Constructor for class org.omg.CORBA.ORBPackage.InconsistentTypeCode
Constructs an InconsistentTypeCode user exception with no reason message.
InconsistentTypeCode(String) - Constructor for class org.omg.CORBA.ORBPackage.InconsistentTypeCode
Constructs an InconsistentTypeCode user exception with the specified reason message.
incrButton - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
INCREASE_HIGHLIGHT - Static variable in class javax.swing.plaf.basic.BasicScrollBarUI
increaseButton - Variable in class javax.swing.plaf.metal.MetalScrollBarUI
incrIndent() - Method in class javax.swing.text.AbstractWriter
Increments the indent level.
inDaylightTime(Date) - Method in class java.util.TimeZone
Queries if the given date is in daylight savings time in this time zone.
inDaylightTime(Date) - Method in class java.util.SimpleTimeZone
Overrides TimeZone Queries if the given date is in Daylight Savings Time.
indent() - Method in class javax.swing.text.AbstractWriter
Does indentation.
index - Variable in class javax.swing.text.html.parser.Element
IndexColorModel - class java.awt.image.IndexColorModel.
The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
IndexColorModel(int, int, byte[], byte[], byte[]) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from the specified arrays of red, green, and blue components.
IndexColorModel(int, int, byte[], byte[], byte[], byte[]) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from the given arrays of red, green, blue and alpha components.
IndexColorModel(int, int, byte[], byte[], byte[], int) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from the given arrays of red, green, and blue components.
IndexColorModel(int, int, byte[], int, boolean) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
IndexColorModel(int, int, byte[], int, boolean, int) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
IndexColorModel(int, int, int[], int, boolean, int, int) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from an array of ints where each int is comprised of red, green, blue, and optional alpha components in the default RGB color model format.
IndexColorModel(int, int, int[], int, int, BigInteger) - Constructor for class java.awt.image.IndexColorModel
Constructs an IndexColorModel from an int array where each int is comprised of red, green, blue, and alpha components in the default RGB color model format.
IndexedPropertyDescriptor - class java.beans.IndexedPropertyDescriptor.
An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.
IndexedPropertyDescriptor(String, Class) - Constructor for class java.beans.IndexedPropertyDescriptor
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.
IndexedPropertyDescriptor(String, Class, String, String, String, String) - Constructor for class java.beans.IndexedPropertyDescriptor
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
IndexedPropertyDescriptor(String, Method, Method, Method, Method) - Constructor for class java.beans.IndexedPropertyDescriptor
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
indexOf(int) - Method in class java.lang.String
Returns the index within this string of the first occurrence of the specified character.
indexOf(int, int) - Method in class java.lang.String
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
indexOf(Object) - Method in class java.util.AbstractList
Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.
indexOf(Object) - Method in class java.util.Vector
Searches for the first occurence of the given argument, testing for equality using the equals method.
indexOf(Object) - Method in class java.util.LinkedList
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element.
indexOf(Object) - Method in interface java.util.List
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
indexOf(Object) - Method in class java.util.ArrayList
Searches for the first occurence of the given argument, testing for equality using the equals method.
indexOf(Object) - Method in class javax.swing.DefaultListModel
Searches for the first occurence of the given argument.
indexOf(Object) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
indexOf(Object, int) - Method in class java.util.Vector
Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
indexOf(Object, int) - Method in class javax.swing.DefaultListModel
Searches for the first occurence of the given argument, beginning the search at index.
indexOf(String) - Method in class java.lang.String
Returns the index within this string of the first occurrence of the specified substring.
indexOf(String, int) - Method in class java.lang.String
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
indexOfComponent(Component) - Method in class javax.swing.JTabbedPane
Returns the index of the tab for the specified component.
indexOfTab(Icon) - Method in class javax.swing.JTabbedPane
Returns the first tab index with a given icon, or -1 if no tab has this icon.
indexOfTab(String) - Method in class javax.swing.JTabbedPane
Returns the first tab index with a given title, or -1 if no tab has this title.
IndexOutOfBoundsException - exception java.lang.IndexOutOfBoundsException.
Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
IndexOutOfBoundsException() - Constructor for class java.lang.IndexOutOfBoundsException
Constructs an IndexOutOfBoundsException with no detail message.
IndexOutOfBoundsException(String) - Constructor for class java.lang.IndexOutOfBoundsException
Constructs an IndexOutOfBoundsException with the specified detail message.
indexToLocation(int) - Method in class javax.swing.JList
Returns the origin of the specified item in JList coordinates.
indexToLocation(JList, int) - Method in class javax.swing.plaf.ListUI
Returns the origin of the specified item in JList coordinates, null if index isn't valid.
indexToLocation(JList, int) - Method in class javax.swing.plaf.basic.BasicListUI
indexToLocation(JList, int) - Method in class javax.swing.plaf.multi.MultiListUI
Call indexToLocation on each UI handled by this MultiUI.
IndirectionException - exception org.omg.CORBA.portable.IndirectionException.
The Indirection exception is a Java specific system exception.
IndirectionException(int) - Constructor for class org.omg.CORBA.portable.IndirectionException
Creates an IndirectionException with the right offset value.
InetAddress - class java.net.InetAddress.
This class represents an Internet Protocol (IP) address.
inf - Variable in class java.util.zip.InflaterInputStream
Decompressor for this stream.
inflate(byte[]) - Method in class java.util.zip.Inflater
Uncompresses bytes into specified buffer.
inflate(byte[], int, int) - Method in class java.util.zip.Inflater
Uncompresses bytes into specified buffer.
Inflater - class java.util.zip.Inflater.
This class provides support for general purpose decompression using popular ZLIB compression library.
Inflater() - Constructor for class java.util.zip.Inflater
Creates a new decompressor.
Inflater(boolean) - Constructor for class java.util.zip.Inflater
Creates a new decompressor.
InflaterInputStream - class java.util.zip.InflaterInputStream.
This class implements a stream filter for uncompressing data in the "deflate" compression format.
InflaterInputStream(InputStream) - Constructor for class java.util.zip.InflaterInputStream
Creates a new input stream with a default decompressor and buffer size.
InflaterInputStream(InputStream, Inflater) - Constructor for class java.util.zip.InflaterInputStream
Creates a new input stream with the specified decompressor and a default buffer size.
InflaterInputStream(InputStream, Inflater, int) - Constructor for class java.util.zip.InflaterInputStream
Creates a new input stream with the specified decompressor and buffer size.
info - Static variable in class java.awt.SystemColor
The background color for info(help) text.
INFO - Static variable in class java.awt.SystemColor
The array index for the info background color.
INFO_TEXT - Static variable in class java.awt.SystemColor
The array index for the info text color.
inFontTag() - Method in class javax.swing.text.html.MinimalHTMLWriter
Returns true if we are currently in a <font> tag.
INFORMATION_MESSAGE - Static variable in class javax.swing.JOptionPane
Used for information messages.
infoText - Static variable in class java.awt.SystemColor
The text color for info(help) text.
InheritableThreadLocal - class java.lang.InheritableThreadLocal.
This class extends ThreadLocal to provide inheritance of values from parent Thread to child Thread: when a child thread is created, the child receives initial values for all InheritableThreadLocals for which the parent has values.
InheritableThreadLocal() - Constructor for class java.lang.InheritableThreadLocal
Creates an InheritableThreadLocal variable.
inHitRegion(int, int) - Method in class javax.swing.tree.DefaultTreeCellEditor
Should return true if the passed in location is a valid mouse location to start editing from.
init() - Method in class java.applet.Applet
Called by the browser or applet viewer to inform this applet that it has been loaded into the system.
init() - Static method in class org.omg.CORBA.ORB
Returns the ORB singleton object.
init(AlgorithmParameterSpec) - Method in class java.security.AlgorithmParameters
Initializes this parameter object using the parameters specified in paramSpec.
init(AlgorithmParameterSpec) - Method in class java.security.AlgorithmParameterGenerator
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
init(AlgorithmParameterSpec, SecureRandom) - Method in class java.security.AlgorithmParameterGenerator
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
init(Applet, Properties) - Static method in class org.omg.CORBA.ORB
Creates a new ORB instance for an applet.
init(byte[]) - Method in class java.security.AlgorithmParameters
Imports the specified parameters and decodes them according to the primary decoding format for parameters.
init(byte[], String) - Method in class java.security.AlgorithmParameters
Imports the parameters from params and decodes them according to the specified decoding scheme.
init(Hashtable) - Method in class javax.naming.InitialContext
Initializes the initial context using the supplied environment.
init(int) - Method in class java.security.AlgorithmParameterGenerator
Initializes this parameter generator for a certain size.
init(int, SecureRandom) - Method in class java.security.AlgorithmParameterGenerator
Initializes this parameter generator for a certain size and source of randomness.
init(StateEditable, String) - Method in class javax.swing.undo.StateEdit
init(String[], Properties) - Static method in class org.omg.CORBA.ORB
Creates a new ORB instance for a standalone application.
init(String, Icon) - Method in class javax.swing.AbstractButton
init(String, Icon) - Method in class javax.swing.JMenuItem
Initialize the menu item with the specified text and icon.
initClassDefaults(UIDefaults) - Method in class javax.swing.plaf.basic.BasicLookAndFeel
Initialize the uiClassID to BasicComponentUI mapping.
initClassDefaults(UIDefaults) - Method in class javax.swing.plaf.metal.MetalLookAndFeel
Initialize the uiClassID to BasicComponentUI mapping.
initComponentDefaults(UIDefaults) - Method in class javax.swing.plaf.basic.BasicLookAndFeel
initComponentDefaults(UIDefaults) - Method in class javax.swing.plaf.metal.MetalLookAndFeel
INITIAL_CONTEXT_FACTORY - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the initial context factory to use.
INITIAL_SELECTION_VALUE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for initialSelectionValue.
INITIAL_VALUE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bounds property name for initialValue.
InitialContext - class javax.naming.InitialContext.
This class is the starting context for performing naming operations.
InitialContext() - Constructor for class javax.naming.InitialContext
Constructs an initial context.
InitialContext(boolean) - Constructor for class javax.naming.InitialContext
Constructs an initial context with the option of not initializing it.
InitialContext(Hashtable) - Constructor for class javax.naming.InitialContext
Constructs an initial context using the supplied environment.
InitialContextFactory - interface javax.naming.spi.InitialContextFactory.
This interface represents a factory that creates an initial context.
InitialContextFactoryBuilder - interface javax.naming.spi.InitialContextFactoryBuilder.
This interface represents a builder that creates initial context factories.
InitialDirContext - class javax.naming.directory.InitialDirContext.
This class is the starting context for performing directory operations.
InitialDirContext() - Constructor for class javax.naming.directory.InitialDirContext
Constructs an initial DirContext.
InitialDirContext(boolean) - Constructor for class javax.naming.directory.InitialDirContext
Constructs an initial DirContext with the option of not initializing it.
InitialDirContext(Hashtable) - Constructor for class javax.naming.directory.InitialDirContext
Constructs an initial DirContext using the supplied environment.
initialFocusComponent - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI
Component to receive focus when messaged with selectInitialValue.
INITIALIZE - exception org.omg.CORBA.INITIALIZE.
The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
initialize() - Method in class java.beans.beancontext.BeanContextSupport
protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.
initialize() - Method in class java.beans.beancontext.BeanContextServicesSupport
called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state.
initialize() - Method in class javax.swing.LookAndFeel
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults().
INITIALIZE() - Constructor for class org.omg.CORBA.INITIALIZE
Constructs an INITIALIZE exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO.
initialize(AlgorithmParameterSpec) - Method in class java.security.KeyPairGenerator
Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
initialize(AlgorithmParameterSpec, SecureRandom) - Method in class java.security.KeyPairGeneratorSpi
Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
initialize(AlgorithmParameterSpec, SecureRandom) - Method in class java.security.KeyPairGenerator
Initializes the key pair generator with the given parameter set and source of randomness.
initialize(Applet, BeanContext) - Method in interface java.beans.AppletInitializer
If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container.
initialize(DSAParams, SecureRandom) - Method in interface java.security.interfaces.DSAKeyPairGenerator
Initializes the key pair generator using p, q and g, the DSA family parameters.
initialize(int) - Method in class java.security.KeyPairGenerator
Initializes the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
initialize(int, boolean, SecureRandom) - Method in interface java.security.interfaces.DSAKeyPairGenerator
Initializes the key pair generator for a given modulus length, without parameters.
INITIALIZE(int, CompletionStatus) - Constructor for class org.omg.CORBA.INITIALIZE
Constructs an INITIALIZE exception with the specified minor code and completion status.
initialize(int, SecureRandom) - Method in class java.security.KeyPairGeneratorSpi
Initializes the key pair generator for a certain keysize, using the default parameter set.
initialize(int, SecureRandom) - Method in class java.security.KeyPairGenerator
Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
INITIALIZE(String) - Constructor for class org.omg.CORBA.INITIALIZE
Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
INITIALIZE(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INITIALIZE
Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.
initializeAutoscrolling(Point) - Method in class java.awt.dnd.DropTarget
initialize autoscrolling
initializeBeanContextResources() - Method in class java.beans.beancontext.BeanContextChildSupport
This method may be overridden by subclasses to provide their own initialization behaviors.
initializeBeanContextResources() - Method in class java.beans.beancontext.BeanContextServicesSupport
called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext.
initializeDesktopProperties() - Method in class java.awt.Toolkit
initializeDesktopProperties
initializeLocalVars() - Method in class javax.swing.JTable
Initializes table properties to their default values.
initializeLocalVars() - Method in class javax.swing.table.JTableHeader
Initializes the local variables and properties with default values.
Initializer - class org.omg.CORBA.Initializer.
This is the mapping for an IDL structure which specifies an initializer for a value type.
Initializer() - Constructor for class org.omg.CORBA.Initializer
Constructs an Initializer object with the members attribute null.
Initializer(StructMember[]) - Constructor for class org.omg.CORBA.Initializer
Constructs an Initializer object and assigns the members attribute with the given parameter.
InitialLdapContext - class javax.naming.ldap.InitialLdapContext.
This class is the starting context for performing LDAPv3-style extended operations and controls.
InitialLdapContext() - Constructor for class javax.naming.ldap.InitialLdapContext
Constructs an initial context using no environment properties or connection request controls.
InitialLdapContext(Hashtable, Control[]) - Constructor for class javax.naming.ldap.InitialLdapContext
Constructs an initial context using environment properties and connection request controls.
initialSelectionValue - Variable in class javax.swing.JOptionPane
Initial value to select in selectionValues.
initialValue - Variable in class javax.swing.JOptionPane
Value that should be initialy selected in options.
initialValue() - Method in class java.lang.ThreadLocal
Returns the calling thread's initial value for this ThreadLocal variable.
initSign(PrivateKey) - Method in class java.security.Signature
Initialize this object for signing.
initSign(PrivateKey, SecureRandom) - Method in class java.security.Signature
Initialize this object for signing.
initSystemColorDefaults(UIDefaults) - Method in class javax.swing.plaf.basic.BasicLookAndFeel
Load the SystemColors into the defaults table.
initSystemColorDefaults(UIDefaults) - Method in class javax.swing.plaf.metal.MetalLookAndFeel
Load the SystemColors into the defaults table.
initVerify(Certificate) - Method in class java.security.Signature
Initializes this object for verification, using the public key from the given certificate.
initVerify(PublicKey) - Method in class java.security.Signature
Initializes this object for verification.
InlineView - class javax.swing.text.html.InlineView.
Displays the inline element styles based upon css attributes.
InlineView(Element) - Constructor for class javax.swing.text.html.InlineView
Constructs a new view wrapped on an element.
INPUT - Static variable in class javax.swing.text.html.HTML.Tag
INPUT_METHOD_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting input method events.
INPUT_METHOD_FIRST - Static variable in class java.awt.event.InputMethodEvent
Marks the first integer id for the range of input method event ids.
INPUT_METHOD_HIGHLIGHT - Static variable in class java.awt.font.TextAttribute
Attribute key for input method highlight styles.
INPUT_METHOD_LAST - Static variable in class java.awt.event.InputMethodEvent
Marks the last integer id for the range of input method event ids.
INPUT_METHOD_SEGMENT - Static variable in class java.text.AttributedCharacterIterator.Attribute
Attribute key for input method segments.
INPUT_METHOD_TEXT_CHANGED - Static variable in class java.awt.event.InputMethodEvent
The event type indicating changed input method text.
INPUT_METHOD_UNDERLINE - Static variable in class java.awt.font.TextAttribute
Attribute key for input method underline adornments.
INPUT_VALUE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for inputValue.
inputComponent - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI
JComponent provide for input if optionPane.getWantsInput() returns true.
InputContext - class java.awt.im.InputContext.
An InputContext object manages the communication between text editing components and input methods.
InputContext() - Constructor for class java.awt.im.InputContext
Constructs an InputContext.
InputEvent - class java.awt.event.InputEvent.
The root event class for all component-level input events.
InputMap - class javax.swing.InputMap.
InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
InputMap() - Constructor for class javax.swing.InputMap
Creates an InputMap with no parent and no mappings.
InputMapUIResource - class javax.swing.plaf.InputMapUIResource.
A subclass of javax.swing.InputMap that implements UIResource.
InputMapUIResource() - Constructor for class javax.swing.plaf.InputMapUIResource
InputMethod - interface java.awt.im.spi.InputMethod.
Defines the interface for an input method that supports complex text input.
InputMethodContext - interface java.awt.im.spi.InputMethodContext.
Provides methods that input methods can use to communicate with their client components or to request other services.
InputMethodDescriptor - interface java.awt.im.spi.InputMethodDescriptor.
Defines methods that provide sufficient information about an input method to enable selection and loading of that input method.
InputMethodEvent - class java.awt.event.InputMethodEvent.
Input method events contain information about text that is being composed using an input method.
InputMethodEvent(Component, int, AttributedCharacterIterator, int, TextHitInfo, TextHitInfo) - Constructor for class java.awt.event.InputMethodEvent
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.
InputMethodEvent(Component, int, TextHitInfo, TextHitInfo) - Constructor for class java.awt.event.InputMethodEvent
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition.
InputMethodHighlight - class java.awt.im.InputMethodHighlight.
An InputMethodHighlight is used to describe the highlight attributes of text being composed.
InputMethodHighlight(boolean, int) - Constructor for class java.awt.im.InputMethodHighlight
Constructs an input method highlight record.
InputMethodHighlight(boolean, int, int) - Constructor for class java.awt.im.InputMethodHighlight
Constructs an input method highlight record.
InputMethodHighlight(boolean, int, int, Map) - Constructor for class java.awt.im.InputMethodHighlight
Constructs an input method highlight record.
InputMethodListener - interface java.awt.event.InputMethodListener.
The listener interface for receiving input method events.
InputMethodRequests - interface java.awt.im.InputMethodRequests.
InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods.
inputMethodTextChanged(InputMethodEvent) - Method in class java.awt.AWTEventMulticaster
Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.
inputMethodTextChanged(InputMethodEvent) - Method in interface java.awt.event.InputMethodListener
Invoked when the text entered through an input method has changed.
InputStream - class java.io.InputStream.
This abstract class is the superclass of all classes representing an input stream of bytes.
InputStream - class org.omg.CORBA.portable.InputStream.
InputStream is the Java API for reading IDL types from CDR marshal streams.
InputStream - class org.omg.CORBA_2_3.portable.InputStream.
InputStream provides for the reading of all of the mapped IDL types from the stream.
InputStream() - Constructor for class java.io.InputStream
InputStream() - Constructor for class org.omg.CORBA.portable.InputStream
InputStream() - Constructor for class org.omg.CORBA_2_3.portable.InputStream
InputStreamReader - class java.io.InputStreamReader.
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding.
InputStreamReader(InputStream) - Constructor for class java.io.InputStreamReader
Create an InputStreamReader that uses the default character encoding.
InputStreamReader(InputStream, String) - Constructor for class java.io.InputStreamReader
Create an InputStreamReader that uses the named character encoding.
InputSubset - class java.awt.im.InputSubset.
Defines additional Unicode subsets for use by input methods.
inputValue - Variable in class javax.swing.JOptionPane
Value the user has input.
InputVerifier - class javax.swing.InputVerifier.
The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields.
InputVerifier() - Constructor for class javax.swing.InputVerifier
inRange(Element) - Method in class javax.swing.text.AbstractWriter
This method determines whether the current element is in the range specified.
INSERT - Static variable in class java.awt.Event
The Insert key, a non-ASCII action key.
INSERT - Static variable in interface javax.accessibility.AccessibleTableModelChange
Identifies the insertion of new rows and/or columns.
INSERT - Static variable in class javax.swing.event.DocumentEvent.EventType
Insert type.
INSERT - Static variable in class javax.swing.event.TableModelEvent
Identifies the addtion of new rows or columns.
insert_any(Any) - Method in interface org.omg.CORBA.DynAny
Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
insert_any(Any) - Method in class org.omg.CORBA.Any
Inserts the given Any object into this Any object's value field.
insert_boolean(boolean) - Method in interface org.omg.CORBA.DynAny
Inserts the given boolean as the value for this DynAny object.
insert_boolean(boolean) - Method in class org.omg.CORBA.Any
Inserts the given boolean into this Any object's value field.
insert_char(char) - Method in interface org.omg.CORBA.DynAny
Inserts the given char as the value for this DynAny object.
insert_char(char) - Method in class org.omg.CORBA.Any
Inserts the given char into this Any object's value field.
insert_double(double) - Method in interface org.omg.CORBA.DynAny
Inserts the given double as the value for this DynAny object.
insert_double(double) - Method in class org.omg.CORBA.Any
Inserts the given double into this Any object's value field.
insert_fixed(BigDecimal) - Method in class org.omg.CORBA.Any
Inserts the given java.math.BigDecimal object into this Any object's value field.
insert_fixed(BigDecimal, TypeCode) - Method in class org.omg.CORBA.Any
Inserts the given java.math.BigDecimal object into this Any object's value field.
insert_float(float) - Method in interface org.omg.CORBA.DynAny
Inserts the given float as the value for this DynAny object.
insert_float(float) - Method in class org.omg.CORBA.Any
Inserts the given float into this Any object's value field.
insert_long(int) - Method in interface org.omg.CORBA.DynAny
Inserts the given int as the value for this DynAny object.
insert_long(int) - Method in class org.omg.CORBA.Any
Inserts the given int into this Any object's value field.
insert_longlong(long) - Method in interface org.omg.CORBA.DynAny
Inserts the given long as the value for this DynAny object.
insert_longlong(long) - Method in class org.omg.CORBA.Any
Inserts the given long into this Any object's value field.
insert_Object(Object) - Method in class org.omg.CORBA.Any
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
insert_Object(Object, TypeCode) - Method in class org.omg.CORBA.Any
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
insert_octet(byte) - Method in interface org.omg.CORBA.DynAny
Inserts the given byte as the value for this DynAny object.
insert_octet(byte) - Method in class org.omg.CORBA.Any
Inserts the given byte into this Any object's value field.
insert_Principal(Principal) - Method in class org.omg.CORBA.Any
Deprecated. Deprecated by CORBA 2.2.
insert_reference(Object) - Method in interface org.omg.CORBA.DynAny
Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
insert_short(short) - Method in interface org.omg.CORBA.DynAny
Inserts the given short as the value for this DynAny object.
insert_short(short) - Method in class org.omg.CORBA.Any
Inserts the given short into this Any object's value field.
insert_Streamable(Streamable) - Method in class org.omg.CORBA.Any
Inserts the given Streamable object into this Any object's value field.
insert_string(String) - Method in interface org.omg.CORBA.DynAny
Inserts the given String object as the value for this DynAny object.
insert_string(String) - Method in class org.omg.CORBA.Any
Inserts the given String object into this Any object's value field.
insert_typecode(TypeCode) - Method in interface org.omg.CORBA.DynAny
Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
insert_TypeCode(TypeCode) - Method in class org.omg.CORBA.Any
Inserts the given TypeCode object into this Any object's value field.
insert_ulong(int) - Method in interface org.omg.CORBA.DynAny
Inserts the given int as the value for this DynAny object.
insert_ulong(int) - Method in class org.omg.CORBA.Any
Inserts the given int into this Any object's value field.
insert_ulonglong(long) - Method in interface org.omg.CORBA.DynAny
Inserts the given long as the value for this DynAny object.
insert_ulonglong(long) - Method in class org.omg.CORBA.Any
Inserts the given long into this Any object's value field.
insert_ushort(short) - Method in interface org.omg.CORBA.DynAny
Inserts the given short as the value for this DynAny object.
insert_ushort(short) - Method in class org.omg.CORBA.Any
Inserts the given short into this Any object's value field.
insert_val(Serializable) - Method in interface org.omg.CORBA.DynAny
Inserts the given java.io.Serializable object as the value for this DynAny object.
insert_Value(Serializable) - Method in class org.omg.CORBA.Any
Inserts the given java.io.Serializable object into this Any object's value field.
insert_Value(Serializable, TypeCode) - Method in class org.omg.CORBA.Any
Inserts the given java.io.Serializable object into this Any object's value field.
insert_wchar(char) - Method in interface org.omg.CORBA.DynAny
Inserts the given char as the value for this DynAny object.
insert_wchar(char) - Method in class org.omg.CORBA.Any
Inserts the given char into this Any object's value field.
insert_wstring(String) - Method in interface org.omg.CORBA.DynAny
Inserts the given String as the value for this DynAny object.
insert_wstring(String) - Method in class org.omg.CORBA.Any
Inserts the given String object into this Any object's value field.
insert(Action, int) - Method in class javax.swing.JMenu
Inserts a new menu item attached to the specified Action object at a given position.
insert(Action, int) - Method in class javax.swing.JPopupMenu
Inserts a menu item for the specified Action object at a given position.
insert(Any, AlreadyBound) - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
insert(Any, Any[]) - Static method in class org.omg.CORBA.AnySeqHelper
insert(Any, Binding) - Static method in class org.omg.CosNaming.BindingHelper
insert(Any, Binding[]) - Static method in class org.omg.CosNaming.BindingListHelper
insert(Any, BindingIterator) - Static method in class org.omg.CosNaming.BindingIteratorHelper
insert(Any, BindingType) - Static method in class org.omg.CosNaming.BindingTypeHelper
insert(Any, boolean[]) - Static method in class org.omg.CORBA.BooleanSeqHelper
insert(Any, byte[]) - Static method in class org.omg.CORBA.OctetSeqHelper
insert(Any, CannotProceed) - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
insert(Any, char[]) - Static method in class org.omg.CORBA.CharSeqHelper
insert(Any, char[]) - Static method in class org.omg.CORBA.WCharSeqHelper
insert(Any, CompletionStatus) - Static method in class org.omg.CORBA.CompletionStatusHelper
insert(Any, Current) - Static method in class org.omg.CORBA.CurrentHelper
insert(Any, DefinitionKind) - Static method in class org.omg.CORBA.DefinitionKindHelper
insert(Any, double[]) - Static method in class org.omg.CORBA.DoubleSeqHelper
insert(Any, float[]) - Static method in class org.omg.CORBA.FloatSeqHelper
insert(Any, IDLType) - Static method in class org.omg.CORBA.IDLTypeHelper
insert(Any, int) - Static method in class org.omg.CORBA.PolicyTypeHelper
insert(Any, int[]) - Static method in class org.omg.CORBA.LongSeqHelper
insert(Any, int[]) - Static method in class org.omg.CORBA.ULongSeqHelper
insert(Any, InvalidName) - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
insert(Any, long[]) - Static method in class org.omg.CORBA.ULongLongSeqHelper
insert(Any, long[]) - Static method in class org.omg.CORBA.LongLongSeqHelper
insert(Any, NameComponent) - Static method in class org.omg.CosNaming.NameComponentHelper
insert(Any, NameComponent[]) - Static method in class org.omg.CosNaming.NameHelper
insert(Any, NameValuePair) - Static method in class org.omg.CORBA.NameValuePairHelper
insert(Any, NamingContext) - Static method in class org.omg.CosNaming.NamingContextHelper
insert(Any, NotEmpty) - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
insert(Any, NotFound) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
insert(Any, NotFoundReason) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
insert(Any, Object) - Static method in class org.omg.CORBA.ObjectHelper
insert(Any, Policy) - Static method in class org.omg.CORBA.PolicyHelper
insert(Any, Policy[]) - Static method in class org.omg.CORBA.PolicyListHelper
insert(Any, Serializable) - Static method in class org.omg.CORBA.ValueBaseHelper
insert(Any, ServiceDetail) - Static method in class org.omg.CORBA.ServiceDetailHelper
insert(Any, ServiceInformation) - Static method in class org.omg.CORBA.ServiceInformationHelper
insert(Any, SetOverrideType) - Static method in class org.omg.CORBA.SetOverrideTypeHelper
insert(Any, short) - Static method in class org.omg.CORBA.VisibilityHelper
insert(Any, short[]) - Static method in class org.omg.CORBA.UShortSeqHelper
insert(Any, short[]) - Static method in class org.omg.CORBA.ShortSeqHelper
insert(Any, String) - Static method in class org.omg.CORBA.IdentifierHelper
insert(Any, String) - Static method in class org.omg.CORBA.StringValueHelper
insert(Any, String) - Static method in class org.omg.CORBA.VersionSpecHelper
insert(Any, String) - Static method in class org.omg.CORBA.WStringValueHelper
insert(Any, String) - Static method in class org.omg.CORBA.RepositoryIdHelper
insert(Any, String) - Static method in class org.omg.CORBA.FieldNameHelper
insert(Any, String) - Static method in class org.omg.CosNaming.IstringHelper
insert(Any, StructMember) - Static method in class org.omg.CORBA.StructMemberHelper
insert(Any, UnionMember) - Static method in class org.omg.CORBA.UnionMemberHelper
insert(Any, ValueMember) - Static method in class org.omg.CORBA.ValueMemberHelper
insert(Component, int) - Method in class javax.swing.JPopupMenu
Inserts the specified component into the menu at a given position.
insert(int, boolean) - Method in class java.lang.StringBuffer
Inserts the string representation of the boolean argument into this string buffer.
insert(int, char) - Method in class java.lang.StringBuffer
Inserts the string representation of the char argument into this string buffer.
insert(int, char[]) - Method in class java.lang.StringBuffer
Inserts the string representation of the char array argument into this string buffer.
insert(int, char[], int, int) - Method in class java.lang.StringBuffer
Inserts the string representation of a subarray of the str array argument into this string buffer.
insert(int, DefaultStyledDocument.ElementSpec[]) - Method in class javax.swing.text.DefaultStyledDocument
Inserts new elements in bulk.
insert(int, DefaultStyledDocument.ElementSpec[]) - Method in class javax.swing.text.html.HTMLDocument
Inserts new elements in bulk.
insert(int, double) - Method in class java.lang.StringBuffer
Inserts the string representation of the double argument into this string buffer.
insert(int, float) - Method in class java.lang.StringBuffer
Inserts the string representation of the float argument into this string buffer.
insert(int, int) - Method in class java.lang.StringBuffer
Inserts the string representation of the second int argument into this string buffer.
insert(int, int, DefaultStyledDocument.ElementSpec[], AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Inserts new content.
insert(int, long) - Method in class java.lang.StringBuffer
Inserts the string representation of the long argument into this string buffer.
insert(int, Object) - Method in class java.lang.StringBuffer
Inserts the string representation of the Object argument into this string buffer.
insert(int, String) - Method in class java.lang.StringBuffer
Inserts the string into this string buffer.
insert(int, View) - Method in class javax.swing.text.View
Inserts a single child view.
insert(JMenuItem, int) - Method in class javax.swing.JMenu
Inserts the specified JMenuitem at a given position.
insert(MenuItem, int) - Method in class java.awt.Menu
Inserts a menu item into this menu at the specified position.
insert(MutableTreeNode, int) - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.
insert(MutableTreeNode, int) - Method in interface javax.swing.tree.MutableTreeNode
Adds child to the receiver at index.
insert(String, int) - Method in class java.awt.Menu
Inserts a menu item with the specified label into this menu at the specified position.
insert(String, int) - Method in class java.awt.Choice
Inserts the item into this choice at the specified position.
insert(String, int) - Method in class java.awt.TextArea
Inserts the specified text at the specified position in this text area.
insert(String, int) - Method in class javax.swing.JMenu
Inserts a new menu item with the specified text at a given position.
insert(String, int) - Method in class javax.swing.JTextArea
Inserts the specified text at the specified position.
insertAfterEnd(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Inserts the HTML specified as a string after the the end of the given element.
insertAfterStart(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Inserts the HTML specified as a string at the start of the element.
insertAtBoundary(JEditorPane, HTMLDocument, int, Element, String, HTML.Tag, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
This is invoked when inserting at a boundary.
insertAtBoundry(JEditorPane, HTMLDocument, int, Element, String, HTML.Tag, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Deprecated. As of Java 2 platform v1.3, use insertAtBoundary
insertBeforeEnd(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Inserts the HTML specified as a string at the end of the element.
insertBeforeStart(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Inserts the HTML specified as string before the start of the given element.
insertBreakAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to place a line/paragraph break into the document.
insertChar(AttributedCharacterIterator, int) - Method in class java.awt.font.LineBreakMeasurer
Updates this LineBreakMeasurer after a single character is inserted into the text, and sets the current position to the beginning of the paragraph.
insertChar(AttributedCharacterIterator, int) - Method in class java.awt.font.TextMeasurer
Updates the TextMeasurer after a single character has been inserted into the paragraph currently represented by this TextMeasurer.
insertComponent(Component) - Method in class javax.swing.JTextPane
Inserts a component into the document as a replacement for the currently selected content.
insertContentAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to place content into the associated document.
insertElementAt(Object, int) - Method in class java.util.Vector
Inserts the specified object as a component in this vector at the specified index.
insertElementAt(Object, int) - Method in class javax.swing.DefaultComboBoxModel
insertElementAt(Object, int) - Method in class javax.swing.DefaultListModel
Inserts the specified object as a component in this list at the specified index.
insertElementAt(Object, int) - Method in interface javax.swing.MutableComboBoxModel
Adds an item at a specific index
insertEntries(int, int, int) - Method in class javax.swing.SizeSequence
Adds a contiguous group of entries to this SizeSequence.
insertHTML(HTMLDocument, int, String, int, int, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit
Inserts HTML into an existing document.
insertHTML(JEditorPane, HTMLDocument, int, String, int, int, HTML.Tag) - Method in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
A cover for HTMLEditorKit.insertHTML.
insertIcon(Icon) - Method in class javax.swing.JTextPane
Inserts an icon into the document as a replacement for the currently selected content.
insertIndexForLayer(int, int) - Method in class javax.swing.JLayeredPane
Primative method that determines the proper location to insert a new child based on layer and position requests.
insertIndexInterval(int, int, boolean) - Method in class javax.swing.DefaultListSelectionModel
Insert length indices beginning before/after index.
insertIndexInterval(int, int, boolean) - Method in interface javax.swing.ListSelectionModel
Insert length indices beginning before/after index.
insertItemAt(Object, int) - Method in class javax.swing.JComboBox
Inserts an item into the item list at a given index.
insertNodeInto(MutableTreeNode, MutableTreeNode, int) - Method in class javax.swing.tree.DefaultTreeModel
Invoked this to insert newChild at location index in parents children.
insertProviderAt(Provider, int) - Static method in class java.security.Security
Adds a new provider, at a specified position.
insertRow() - Method in interface java.sql.ResultSet
Inserts the contents of the insert row into this ResultSet objaect and into the database.
insertRow(int, Object[]) - Method in class javax.swing.table.DefaultTableModel
Inserts a row at row in the model.
insertRow(int, Vector) - Method in class javax.swing.table.DefaultTableModel
Inserts a row at row in the model.
insertsAreDetected(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted().
insertSeparator(int) - Method in class java.awt.Menu
Inserts a separator at the specified position.
insertSeparator(int) - Method in class javax.swing.JMenu
Inserts a separator at the specified position.
insertString(int, String) - Method in interface javax.swing.text.AbstractDocument.Content
Inserts a string of characters into the sequence.
insertString(int, String) - Method in class javax.swing.text.StringContent
Inserts a string into the content.
insertString(int, String) - Method in class javax.swing.text.GapContent
Inserts a string into the content.
insertString(int, String, AttributeSet) - Method in interface javax.swing.text.Document
Inserts a string of content.
insertString(int, String, AttributeSet) - Method in class javax.swing.text.AbstractDocument
Inserts some content into the document.
insertTab(String, Icon, Component, String, int) - Method in class javax.swing.JTabbedPane
Inserts a component, at index, represented by a title and/or icon, either of which may be null.
insertTabAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to place a tab character into the document.
insertText(String, int) - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by insert(String, int).
insertUpdate(AbstractDocument.DefaultDocumentEvent, AttributeSet) - Method in class javax.swing.text.AbstractDocument
Updates document structure as a result of text insertion.
insertUpdate(AbstractDocument.DefaultDocumentEvent, AttributeSet) - Method in class javax.swing.text.PlainDocument
Updates document structure as a result of text insertion.
insertUpdate(AbstractDocument.DefaultDocumentEvent, AttributeSet) - Method in class javax.swing.text.DefaultStyledDocument
Updates document structure as a result of text insertion.
insertUpdate(AbstractDocument.DefaultDocumentEvent, AttributeSet) - Method in class javax.swing.text.html.HTMLDocument
Updates document structure as a result of text insertion.
insertUpdate(DefaultStyledDocument.ElementSpec[]) - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Inserts an update into the document.
insertUpdate(DocumentEvent) - Method in interface javax.swing.event.DocumentListener
Gives notification that there was an insert into the document.
insertUpdate(DocumentEvent) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Handles document insert (fire appropriate property change event which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.View
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.GlyphView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.FlowView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.PlainView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.FieldView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.WrappedPlainView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.ZoneView
Gives notification that something was inserted into the document in a location that this view is responsible for.
insertUpdate(FlowView, DocumentEvent, Rectangle) - Method in class javax.swing.text.FlowView.FlowStrategy
Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
insetCache - Variable in class javax.swing.plaf.basic.BasicSliderUI
insets - Variable in class java.awt.GridBagConstraints
This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.
Insets - class java.awt.Insets.
An Insets object is a representation of the borders of a container.
insets() - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by getInsets().
Insets(int, int, int, int) - Constructor for class java.awt.Insets
Creates and initializes a new Insets object with the specified top, left, bottom, and right insets.
InsetsUIResource - class javax.swing.plaf.InsetsUIResource.
InsetsUIResource(int, int, int, int) - Constructor for class javax.swing.plaf.InsetsUIResource
inside(int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
inside(int, int) - Method in class java.awt.Polygon
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
inside(int, int) - Method in class java.awt.Rectangle
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
insideBorder - Variable in class javax.swing.border.CompoundBorder
install(JEditorPane) - Method in class javax.swing.text.EditorKit
Called when the kit is being installed into the a JEditorPane.
install(JEditorPane) - Method in class javax.swing.text.StyledEditorKit
Called when the kit is being installed into a JEditorPane.
install(JEditorPane) - Method in class javax.swing.text.html.HTMLEditorKit
Called when the kit is being installed into the a JEditorPane.
install(JTextComponent) - Method in interface javax.swing.text.Highlighter
Called when the UI is being installed into the interface of a JTextComponent.
install(JTextComponent) - Method in class javax.swing.text.DefaultHighlighter
Called when the UI is being installed into the interface of a JTextComponent.
install(JTextComponent) - Method in class javax.swing.text.DefaultCaret
Called when the UI is being installed into the interface of a JTextComponent.
install(JTextComponent) - Method in interface javax.swing.text.Caret
Called when the UI is being installed into the interface of a JTextComponent.
installAncestorListener() - Method in class javax.swing.JComboBox
installBorder(JComponent, String) - Static method in class javax.swing.LookAndFeel
Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
installChooserPanel(JColorChooser) - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Invoked when the panel is added to the chooser.
installColors(JComponent, String, String) - Static method in class javax.swing.LookAndFeel
Convenience method for initializing a component's foreground and background color properties with values from the current defaults table.
installColorsAndFont(JComponent, String, String, String) - Static method in class javax.swing.LookAndFeel
Convenience method for initializing a components foreground background and font properties with values from the current defaults table.
installComboBoxListeners() - Method in class javax.swing.plaf.basic.BasicComboPopup
This method adds the necessary listeners to the JComboBox.
installComboBoxModelListeners(ComboBoxModel) - Method in class javax.swing.plaf.basic.BasicComboPopup
installComponents() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
installComponents() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
installComponents() - Method in class javax.swing.plaf.basic.BasicToolBarUI
installComponents() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installComponents() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
The editor and arrow button are added to the JComboBox here.
installComponents() - Method in class javax.swing.plaf.basic.BasicTreeUI
Intalls the subcomponents of the tree, which is the renderer pane.
installComponents() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
installComponents() - Method in class javax.swing.plaf.metal.MetalDesktopIconUI
installComponents(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installComponents(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
installComponents(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
installComponents(JMenuItem) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
installComponents(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicTextUI
Initializes component properties, e.g.
installDefaults() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicMenuUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicTableUI
Initialize JTable properties, e.g.
installDefaults() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
installDefaults() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicToolBarUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicListUI
Initialize JList properties, e.g.
installDefaults() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Installs the default colors, default font, default renderer, and default editor into the JComboBox.
installDefaults() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Initialize JTableHeader properties, e.g.
installDefaults() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicTreeUI
installDefaults() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Installs the UI defaults.
installDefaults() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
installDefaults() - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
installDefaults() - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
installDefaults() - Method in class javax.swing.plaf.metal.MetalScrollBarUI
installDefaults() - Method in class javax.swing.plaf.metal.MetalDesktopIconUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalToggleButtonUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalRadioButtonUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalButtonUI
installDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalCheckBoxUI
installDefaults(JComponent) - Method in class javax.swing.plaf.basic.BasicViewportUI
installDefaults(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
installDefaults(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installDefaults(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
installDefaults(JPanel) - Method in class javax.swing.plaf.basic.BasicPanelUI
installDefaults(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
installDefaults(JScrollPane) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
installDefaults(JSeparator) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
installDefaults(JSeparator) - Method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI
installDefaults(JSeparator) - Method in class javax.swing.plaf.metal.MetalSeparatorUI
installDefaults(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
installDesktopManager() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
installIcons(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTextUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicEditorPaneUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicComboPopup
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTableUI
Register all keyboard actions on the JTable.
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicToolBarUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicListUI
Register keyboard actions for the up and down arrow keys.
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Adds keyboard actions to the JComboBox.
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Register all keyboard actions on the JTableHeader.
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTreeUI
installKeyboardActions() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Installs the keyboard actions for the UI.
installKeyboardActions() - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
installKeyboardActions(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
installKeyboardActions(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonListener
Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).
installKeyboardActions(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
installKeyboardActions(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
installKeyboardActions(JScrollPane) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
installKeyboardActions(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
installListeners() - Method in class javax.swing.plaf.basic.BasicTextUI
Installs listeners for the UI.
installListeners() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
installListeners() - Method in class javax.swing.plaf.basic.BasicMenuUI
installListeners() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
installListeners() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
installListeners() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
installListeners() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
installListeners() - Method in class javax.swing.plaf.basic.BasicTableUI
Attaches listeners to the JTable.
installListeners() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
installListeners() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
installListeners() - Method in class javax.swing.plaf.basic.BasicToolBarUI
installListeners() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installListeners() - Method in class javax.swing.plaf.basic.BasicListUI
Create and install the listeners for the JList, its model, and its selectionModel.
installListeners() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Attaches listeners to the JComboBox and JComboBoxModel.
installListeners() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
Attaches listeners to the JTableHeader.
installListeners() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
installListeners() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
installListeners() - Method in class javax.swing.plaf.basic.BasicTreeUI
installListeners() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Installs the event listeners for the UI.
installListeners() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
installListeners() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
installListeners() - Method in class javax.swing.plaf.metal.MetalScrollBarUI
installListeners() - Method in class javax.swing.plaf.metal.MetalToolBarUI
installListeners(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
installListeners(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
installListeners(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installListeners(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
installListeners(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
installListeners(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
installListeners(JScrollPane) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
installListeners(JScrollPane) - Method in class javax.swing.plaf.metal.MetalScrollPaneUI
installListeners(JSeparator) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
installListeners(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
installListListeners() - Method in class javax.swing.plaf.basic.BasicComboPopup
Called by configureList() to add the necessary listeners to the list.
installLookAndFeel(String, String) - Static method in class javax.swing.UIManager
Creates a new look and feel and adds it to the current array.
installLookAndFeel(UIManager.LookAndFeelInfo) - Static method in class javax.swing.UIManager
Adds the specified look and feel to the current array and then calls UIManager.setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
installMouseHandlers(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installNonRolloverBorders(JComponent) - Method in class javax.swing.plaf.metal.MetalToolBarUI
installNormalBorders(JComponent) - Method in class javax.swing.plaf.metal.MetalToolBarUI
installPreviewPanel() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
installRolloverBorders(JComponent) - Method in class javax.swing.plaf.metal.MetalToolBarUI
installStrings(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installStrings(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
installTitlePane() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
installUI(JComponent) - Method in class javax.swing.plaf.ComponentUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Installs the UI for a component.
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Installs the reciever as the L&F for the passed in JOptionPane
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicPanelUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicViewportUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicListUI
Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuBarUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicColorChooserUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Installs the UI.
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
installUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalTreeUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalTextFieldUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalSliderUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalToolBarUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalScrollPaneUI
installUI(JComponent) - Method in class javax.swing.plaf.metal.MetalToolTipUI
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call installUI on each UI handled by this MultiUI.
installUI(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call installUI on each UI handled by this MultiUI.
instanceFollowRedirects - Variable in class java.net.HttpURLConnection
If true, the protocol will automatically follow redirects.
instantiate(ClassLoader, String) - Static method in class java.beans.Beans
Instantiate a JavaBean.
instantiate(ClassLoader, String, BeanContext) - Static method in class java.beans.Beans
Instantiate a JavaBean.
instantiate(ClassLoader, String, BeanContext, AppletInitializer) - Static method in class java.beans.Beans
Instantiate a bean.
instantiateChild(String) - Method in class java.beans.beancontext.BeanContextSupport
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
instantiateChild(String) - Method in interface java.beans.beancontext.BeanContext
Instantiate the javaBean named as a child of this BeanContext.
InstantiationError - error java.lang.InstantiationError.
Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
InstantiationError() - Constructor for class java.lang.InstantiationError
Constructs an InstantiationError with no detail message.
InstantiationError(String) - Constructor for class java.lang.InstantiationError
Constructs an InstantiationError with the specified detail message.
InstantiationException - exception java.lang.InstantiationException.
Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
InstantiationException() - Constructor for class java.lang.InstantiationException
Constructs an InstantiationException with no detail message.
InstantiationException(String) - Constructor for class java.lang.InstantiationException
Constructs an InstantiationException with the specified detail message.
Instrument - class javax.sound.midi.Instrument.
An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect.
Instrument(Soundbank, Patch, String, Class) - Constructor for class javax.sound.midi.Instrument
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.
InsufficientResourcesException - exception javax.naming.InsufficientResourcesException.
This exception is thrown when resources are not available to complete the requested operation.
InsufficientResourcesException() - Constructor for class javax.naming.InsufficientResourcesException
Constructs a new instance of InsufficientResourcesException with all name resolution fields and explanation initialized to null.
InsufficientResourcesException(String) - Constructor for class javax.naming.InsufficientResourcesException
Constructs a new instance of InsufficientResourcesException using an explanation.
insureRowContinuity() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Makes sure the currently selected TreePaths are valid for the current selection mode.
insureUniqueness() - Method in class javax.swing.tree.DefaultTreeSelectionModel
This method is obsolete and its implementation is now a noop.
intBitsToFloat(int) - Static method in class java.lang.Float
Returns the single-float corresponding to a given bit represention.
Integer - class java.lang.Integer.
The Integer class wraps a value of the primitive type int in an object.
INTEGER - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.
INTEGER_FIELD - Static variable in class java.text.NumberFormat
Field constant used to construct a FieldPosition object.
Integer(int) - Constructor for class java.lang.Integer
Constructs a newly allocated Integer object that represents the primitive int argument.
Integer(String) - Constructor for class java.lang.Integer
Constructs a newly allocated Integer object that represents the value represented by the string.
INTERFACE - Static variable in class java.lang.reflect.Modifier
The int value representing the interface modifier.
intern() - Method in class java.lang.String
Returns a canonical representation for the string object.
INTERNAL - exception org.omg.CORBA.INTERNAL.
The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
INTERNAL_CLOCK - Static variable in class javax.sound.midi.Sequencer.SyncMode
A master synchronization mode that makes the sequencer get its timing information from its internal clock.
INTERNAL_FRAME - Static variable in class javax.accessibility.AccessibleRole
A frame-like object that is clipped by a desktop pane.
INTERNAL_FRAME_ACTIVATED - Static variable in class javax.swing.event.InternalFrameEvent
The window activated event type.
INTERNAL_FRAME_CLOSED - Static variable in class javax.swing.event.InternalFrameEvent
The window closed event.
INTERNAL_FRAME_CLOSING - Static variable in class javax.swing.event.InternalFrameEvent
The "window is closing" event.
INTERNAL_FRAME_DEACTIVATED - Static variable in class javax.swing.event.InternalFrameEvent
The window deactivated event type.
INTERNAL_FRAME_DEICONIFIED - Static variable in class javax.swing.event.InternalFrameEvent
The window deiconified event type.
INTERNAL_FRAME_FIRST - Static variable in class javax.swing.event.InternalFrameEvent
The first number in the range of ids used for window events.
INTERNAL_FRAME_ICONIFIED - Static variable in class javax.swing.event.InternalFrameEvent
The window iconified event.
INTERNAL_FRAME_LAST - Static variable in class javax.swing.event.InternalFrameEvent
The last number in the range of ids used for window events.
INTERNAL_FRAME_OPENED - Static variable in class javax.swing.event.InternalFrameEvent
The window opened event.
INTERNAL() - Constructor for class org.omg.CORBA.INTERNAL
Constructs an INTERNAL exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INTERNAL(int, CompletionStatus) - Constructor for class org.omg.CORBA.INTERNAL
Constructs an INTERNAL exception with the specified minor code and completion status.
INTERNAL(String) - Constructor for class org.omg.CORBA.INTERNAL
Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INTERNAL(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INTERNAL
Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.
InternalError - error java.lang.InternalError.
Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
InternalError() - Constructor for class java.lang.InternalError
Constructs an InternalError with no detail message.
InternalError(String) - Constructor for class java.lang.InternalError
Constructs an InternalError with the specified detail message.
internalFrameActivated(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame is activated.
internalFrameActivated(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame is activated.
internalFrameActivated(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
InternalFrameAdapter - class javax.swing.event.InternalFrameAdapter.
An abstract adapter class for receiving internal frame events.
InternalFrameAdapter() - Constructor for class javax.swing.event.InternalFrameAdapter
internalFrameClosed(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame has been closed.
internalFrameClosed(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame has been closed.
internalFrameClosed(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
internalFrameClosing(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame is in the process of being closed.
internalFrameClosing(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame is in the process of being closed.
internalFrameClosing(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
internalFrameDeactivated(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame is de-activated.
internalFrameDeactivated(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame is de-activated.
internalFrameDeactivated(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
internalFrameDeiconified(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame is de-iconified.
internalFrameDeiconified(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame is de-iconified.
internalFrameDeiconified(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
InternalFrameEvent - class javax.swing.event.InternalFrameEvent.
InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
InternalFrameEvent(JInternalFrame, int) - Constructor for class javax.swing.event.InternalFrameEvent
Constructs a InternalFrameEvent object.
internalFrameIconified(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame is iconified.
internalFrameIconified(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when an internal frame is iconified.
internalFrameIconified(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
internalFrameLayout - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
InternalFrameListener - interface javax.swing.event.InternalFrameListener.
The listener interface for receiving internal frame events.
internalFrameOpened(InternalFrameEvent) - Method in class javax.swing.event.InternalFrameAdapter
Invoked when an internal frame has been opened.
internalFrameOpened(InternalFrameEvent) - Method in interface javax.swing.event.InternalFrameListener
Invoked when a internal frame has been opened.
internalFrameOpened(InternalFrameEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
InternalFrameUI - class javax.swing.plaf.InternalFrameUI.
Pluggable look and feel interface for JInternalFrame.
InternalFrameUI() - Constructor for class javax.swing.plaf.InternalFrameUI
internalGet(int) - Method in class java.util.Calendar
Gets the value for a given time field.
interrupt() - Method in class java.lang.ThreadGroup
Interrupts all threads in this thread group.
interrupt() - Method in class java.lang.Thread
Interrupts this thread.
interrupted() - Static method in class java.lang.Thread
Tests whether the current thread has been interrupted.
InterruptedException - exception java.lang.InterruptedException.
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
InterruptedException() - Constructor for class java.lang.InterruptedException
Constructs an InterruptedException with no detail message.
InterruptedException(String) - Constructor for class java.lang.InterruptedException
Constructs an InterruptedException with the specified detail message.
InterruptedIOException - exception java.io.InterruptedIOException.
Signals that an I/O operation has been interrupted.
InterruptedIOException() - Constructor for class java.io.InterruptedIOException
Constructs an InterruptedIOException with null as its error detail message.
InterruptedIOException(String) - Constructor for class java.io.InterruptedIOException
Constructs an InterruptedIOException with the specified detail message.
InterruptedNamingException - exception javax.naming.InterruptedNamingException.
This exception is thrown when the naming operation being invoked has been interrupted.
InterruptedNamingException() - Constructor for class javax.naming.InterruptedNamingException
Constructs an instance of InterruptedNamingException with all name resolution fields and explanation initialized to null.
InterruptedNamingException(String) - Constructor for class javax.naming.InterruptedNamingException
Constructs an instance of InterruptedNamingException using an explanation of the problem.
intersect(Area) - Method in class java.awt.geom.Area
Sets the shape of this Area to the intersection of its current shape and the shape of the specified Area.
intersect(Rectangle2D, Rectangle2D, Rectangle2D) - Static method in class java.awt.geom.Rectangle2D
Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
intersection(Rectangle) - Method in class java.awt.Rectangle
Computes the intersection of this Rectangle with the specified Rectangle.
intersects(double, double, double, double) - Method in class java.awt.Polygon
Tests if the interior of this Polygon intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in interface java.awt.Shape
Tests if the interior of the Shape intersects the interior of a specified rectangular area.
intersects(double, double, double, double) - Method in class java.awt.geom.Rectangle2D
Tests if the interior of this Rectangle2D intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D
Tests if the interior of this RoundRectangle2D intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in class java.awt.geom.Area
Tests whether the interior of this Area object intersects the interior of the specified rectangular area.
intersects(double, double, double, double) - Method in class java.awt.geom.Line2D
Tests if this Line2D intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in class java.awt.geom.Arc2D
Determines whether or not the interior of the arc intersects the interior of the specified rectangle.
intersects(double, double, double, double) - Method in class java.awt.geom.Ellipse2D
Tests if the interior of this Ellipse2D intersects the interior of a specified rectangular area.
intersects(double, double, double, double) - Method in class java.awt.geom.GeneralPath
Tests if the interior of this Shape intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in class java.awt.geom.QuadCurve2D
Tests if the shape of this QuadCurve2D intersects the interior of a specified set of rectangular coordinates.
intersects(double, double, double, double) - Method in class java.awt.geom.CubicCurve2D
Tests if the shape intersects the interior of a specified set of rectangular coordinates.
intersects(Rectangle) - Method in class java.awt.Rectangle
Determines whether or not this Rectangle and the specified Rectangle intersect.
intersects(Rectangle2D) - Method in class java.awt.Polygon
Tests if the interior of this Polygon intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in interface java.awt.Shape
Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.RectangularShape
Tests if the interior of theShape intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.Area
Tests whether the interior of this Area object intersects the interior of the specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.Line2D
Tests if this Line2D intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.GeneralPath
Tests if the interior of this Shape intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.QuadCurve2D
Tests if the shape of this QuadCurve2D intersects the interior of a specified Rectangle2D.
intersects(Rectangle2D) - Method in class java.awt.geom.CubicCurve2D
Tests if the shape intersects the interior of a specified Rectangle2D.
intersectsLine(double, double, double, double) - Method in class java.awt.geom.Rectangle2D
Tests if the specified line segment intersects the interior of this Rectangle2D.
intersectsLine(double, double, double, double) - Method in class java.awt.geom.Line2D
Tests if the line segment from (X1, Y1) to (X2, Y2) intersects this line segment.
intersectsLine(Line2D) - Method in class java.awt.geom.Rectangle2D
Tests if the specified line segment intersects the interior of this Rectangle2D.
intersectsLine(Line2D) - Method in class java.awt.geom.Line2D
Tests if the specified line segment intersects this line segment.
INTERVAL_ADDED - Static variable in class javax.swing.event.ListDataEvent
Identifies the addition of one or more contiguous items to the list
INTERVAL_REMOVED - Static variable in class javax.swing.event.ListDataEvent
Identifies the removal of one or more contiguous items from the list
intervalAdded(ListDataEvent) - Method in class javax.swing.JComboBox
Invoked items have been added to the internal data model.
intervalAdded(ListDataEvent) - Method in class javax.swing.JList.AccessibleJList
List Data Listener interval added method.
intervalAdded(ListDataEvent) - Method in interface javax.swing.event.ListDataListener
Sent after the indices in the index0,index1 interval have been inserted in the data model.
intervalAdded(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler
intervalAdded(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicListUI.ListDataHandler
intervalAdded(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
intervalAdded(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
intervalRemoved(ListDataEvent) - Method in class javax.swing.JComboBox
Invoked when values have been removed from the data model.
intervalRemoved(ListDataEvent) - Method in class javax.swing.JList.AccessibleJList
List Data Listener interval removed method.
intervalRemoved(ListDataEvent) - Method in interface javax.swing.event.ListDataListener
Sent after the indices in the index0,index1 interval have been removed from the data model.
intervalRemoved(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler
intervalRemoved(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicListUI.ListDataHandler
intervalRemoved(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
intervalRemoved(ListDataEvent) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
INTF_REPOS - exception org.omg.CORBA.INTF_REPOS.
The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
INTF_REPOS() - Constructor for class org.omg.CORBA.INTF_REPOS
Constructs an INTF_REPOS exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INTF_REPOS(int, CompletionStatus) - Constructor for class org.omg.CORBA.INTF_REPOS
Constructs an INTF_REPOS exception with the specified minor code and completion status.
INTF_REPOS(String) - Constructor for class org.omg.CORBA.INTF_REPOS
Constructs an INTF_REPOS exception with the specified detail.
INTF_REPOS(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INTF_REPOS
Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.
IntHolder - class org.omg.CORBA.IntHolder.
A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods.
IntHolder() - Constructor for class org.omg.CORBA.IntHolder
Constructs a new IntHolder object with its value field initialized to 0.
IntHolder(int) - Constructor for class org.omg.CORBA.IntHolder
Constructs a new IntHolder object with its value field initialized to the given int.
intKey() - Method in class java.awt.RenderingHints.Key
Returns the private integer key that the subclass instantiated this Key with.
IntrospectionException - exception java.beans.IntrospectionException.
Thrown when an exception happens during Introspection.
IntrospectionException(String) - Constructor for class java.beans.IntrospectionException
Constructs an IntrospectionException with a detailed message.
Introspector - class java.beans.Introspector.
The Introspector class provides a standard way for tools to learn about the properties, events, and methods supported by a target Java Bean.
intValue() - Method in class java.lang.Number
Returns the value of the specified number as an int.
intValue() - Method in class java.lang.Long
Returns the value of this Long as an int.
intValue() - Method in class java.lang.Short
Returns the value of this Short as an int.
intValue() - Method in class java.lang.Float
Returns the integer value of this Float (by casting to an int).
intValue() - Method in class java.lang.Integer
Returns the value of this Integer as an int.
intValue() - Method in class java.lang.Byte
Returns the value of this Byte as an int.
intValue() - Method in class java.lang.Double
Returns the integer value of this Double (by casting to an int).
intValue() - Method in class java.math.BigInteger
Converts this BigInteger to an int.
intValue() - Method in class java.math.BigDecimal
Converts this BigDecimal to an int.
INV_FLAG - exception org.omg.CORBA.INV_FLAG.
The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
INV_FLAG() - Constructor for class org.omg.CORBA.INV_FLAG
Constructs an INV_FLAG exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INV_FLAG(int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_FLAG
Constructs an INV_FLAG exception with the specified minor code and completion status.
INV_FLAG(String) - Constructor for class org.omg.CORBA.INV_FLAG
Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_FLAG(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_FLAG
Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.
INV_IDENT - exception org.omg.CORBA.INV_IDENT.
The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
INV_IDENT() - Constructor for class org.omg.CORBA.INV_IDENT
Constructs an INV_IDENT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INV_IDENT(int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_IDENT
Constructs an INV_IDENT exception with the specified minor code and completion status.
INV_IDENT(String) - Constructor for class org.omg.CORBA.INV_IDENT
Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_IDENT(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_IDENT
Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.
INV_OBJREF - exception org.omg.CORBA.INV_OBJREF.
The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
INV_OBJREF() - Constructor for class org.omg.CORBA.INV_OBJREF
Constructs an INV_OBJREF exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INV_OBJREF(int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_OBJREF
Constructs an INV_OBJREF exception with the specified minor code and completion status.
INV_OBJREF(String) - Constructor for class org.omg.CORBA.INV_OBJREF
Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_OBJREF(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_OBJREF
Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.
INV_POLICY - exception org.omg.CORBA.INV_POLICY.
The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
INV_POLICY() - Constructor for class org.omg.CORBA.INV_POLICY
Constructs a INV_POLICY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
INV_POLICY(int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_POLICY
Constructs a INV_POLICY exception with the specified minor code and completion status.
INV_POLICY(String) - Constructor for class org.omg.CORBA.INV_POLICY
Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_POLICY(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INV_POLICY
Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
Invalid - exception org.omg.CORBA.DynAnyPackage.Invalid.
Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
INVALID_TRANSACTION - exception org.omg.CORBA.INVALID_TRANSACTION.
The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
INVALID_TRANSACTION() - Constructor for class org.omg.CORBA.INVALID_TRANSACTION
Constructs an INVALID_TRANSACTION exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INVALID_TRANSACTION(int, CompletionStatus) - Constructor for class org.omg.CORBA.INVALID_TRANSACTION
Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
INVALID_TRANSACTION(String) - Constructor for class org.omg.CORBA.INVALID_TRANSACTION
Constructs an INVALID_TRANSACTION exception with the specified detail message.
INVALID_TRANSACTION(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.INVALID_TRANSACTION
Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.
Invalid() - Constructor for class org.omg.CORBA.DynAnyPackage.Invalid
Constructs an Invalid object.
Invalid(String) - Constructor for class org.omg.CORBA.DynAnyPackage.Invalid
Constructs an Invalid object.
InvalidAlgorithmParameterException - exception java.security.InvalidAlgorithmParameterException.
This is the exception for invalid or inappropriate algorithm parameters.
InvalidAlgorithmParameterException() - Constructor for class java.security.InvalidAlgorithmParameterException
Constructs an InvalidAlgorithmParameterException with no detail message.
InvalidAlgorithmParameterException(String) - Constructor for class java.security.InvalidAlgorithmParameterException
Constructs an InvalidAlgorithmParameterException with the specified detail message.
invalidate() - Method in class java.awt.Component
Invalidates this component.
invalidate() - Method in class java.awt.Container
Invalidates the container.
invalidate() - Method in class javax.swing.CellRendererPane
Overridden to avoid propogating a invalidate up the tree when the cell renderer child is configured.
invalidateFileCache() - Method in class javax.swing.plaf.basic.BasicDirectoryModel
invalidateLayout(Container) - Method in interface java.awt.LayoutManager2
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
invalidateLayout(Container) - Method in class java.awt.CardLayout
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
invalidateLayout(Container) - Method in class java.awt.BorderLayout
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
invalidateLayout(Container) - Method in class java.awt.GridBagLayout
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
invalidateLayout(Container) - Method in class javax.swing.BoxLayout
Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.
invalidateLayout(Container) - Method in class javax.swing.OverlayLayout
Indicates a child has changed its layout related information, which causes any cached calculations to be flushed.
invalidateLayout(Container) - Method in class javax.swing.JRootPane.RootLayout
invalidateLayout(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Does nothing.
invalidatePathBounds(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
invalidatePathBounds(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
invalidatePathBounds(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
invalidateSizes() - Method in class javax.swing.tree.AbstractLayoutCache
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
invalidateSizes() - Method in class javax.swing.tree.VariableHeightLayoutCache
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
invalidateSizes() - Method in class javax.swing.tree.FixedHeightLayoutCache
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
InvalidAttributeIdentifierException - exception javax.naming.directory.InvalidAttributeIdentifierException.
This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
InvalidAttributeIdentifierException() - Constructor for class javax.naming.directory.InvalidAttributeIdentifierException
Constructs a new instance of InvalidAttributeIdentifierException.
InvalidAttributeIdentifierException(String) - Constructor for class javax.naming.directory.InvalidAttributeIdentifierException
Constructs a new instance of InvalidAttributeIdentifierException using the explanation supplied.
InvalidAttributesException - exception javax.naming.directory.InvalidAttributesException.
This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
InvalidAttributesException() - Constructor for class javax.naming.directory.InvalidAttributesException
Constructs a new instance of InvalidAttributesException.
InvalidAttributesException(String) - Constructor for class javax.naming.directory.InvalidAttributesException
Constructs a new instance of InvalidAttributesException using an explanation.
InvalidAttributeValueException - exception javax.naming.directory.InvalidAttributeValueException.
This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
InvalidAttributeValueException() - Constructor for class javax.naming.directory.InvalidAttributeValueException
Constructs a new instance of InvalidAttributeValueException.
InvalidAttributeValueException(String) - Constructor for class javax.naming.directory.InvalidAttributeValueException
Constructs a new instance of InvalidAttributeValueException using an explanation.
InvalidClassException - exception java.io.InvalidClassException.
Thrown when the Serialization runtime detects one of the following problems with a Class.
InvalidClassException(String) - Constructor for class java.io.InvalidClassException
Report a InvalidClassException for the reason specified.
InvalidClassException(String, String) - Constructor for class java.io.InvalidClassException
Constructs an InvalidClassException object.
InvalidDnDOperationException - exception java.awt.dnd.InvalidDnDOperationException.
This exception is thrown by various methods in the java.awt.dnd package.
InvalidDnDOperationException() - Constructor for class java.awt.dnd.InvalidDnDOperationException
Create a default Exception
InvalidDnDOperationException(String) - Constructor for class java.awt.dnd.InvalidDnDOperationException
Create an Exception with its own descriptive message
InvalidKeyException - exception java.security.InvalidKeyException.
This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidKeyException() - Constructor for class java.security.InvalidKeyException
Constructs an InvalidKeyException with no detail message.
InvalidKeyException(String) - Constructor for class java.security.InvalidKeyException
Constructs an InvalidKeyException with the specified detail message.
InvalidKeySpecException - exception java.security.spec.InvalidKeySpecException.
This is the exception for invalid key specifications.
InvalidKeySpecException() - Constructor for class java.security.spec.InvalidKeySpecException
Constructs an InvalidKeySpecException with no detail message.
InvalidKeySpecException(String) - Constructor for class java.security.spec.InvalidKeySpecException
Constructs an InvalidKeySpecException with the specified detail message.
InvalidMidiDataException - exception javax.sound.midi.InvalidMidiDataException.
An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
InvalidMidiDataException() - Constructor for class javax.sound.midi.InvalidMidiDataException
Constructs an InvalidMidiDataException with null for its error detail message.
InvalidMidiDataException(String) - Constructor for class javax.sound.midi.InvalidMidiDataException
Constructs an InvalidMidiDataException with the specified detail message.
InvalidName - exception org.omg.CORBA.ORBPackage.InvalidName.
The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.
InvalidName - exception org.omg.CosNaming.NamingContextPackage.InvalidName.
InvalidName() - Constructor for class org.omg.CORBA.ORBPackage.InvalidName
Constructs an InvalidName exception with no reason message.
InvalidName() - Constructor for class org.omg.CosNaming.NamingContextPackage.InvalidName
InvalidName(String) - Constructor for class org.omg.CORBA.ORBPackage.InvalidName
Constructs an InvalidName exception with the specified reason message.
InvalidNameException - exception javax.naming.InvalidNameException.
This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
InvalidNameException() - Constructor for class javax.naming.InvalidNameException
Constructs an instance of InvalidNameException with all fields set to null.
InvalidNameException(String) - Constructor for class javax.naming.InvalidNameException
Constructs an instance of InvalidNameException using an explanation of the problem.
InvalidNameHelper - class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.
InvalidNameHolder - class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder.
InvalidNameHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
InvalidNameHolder(InvalidName) - Constructor for class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
InvalidObjectException - exception java.io.InvalidObjectException.
Indicates that one or more deserialized objects failed validation tests.
InvalidObjectException(String) - Constructor for class java.io.InvalidObjectException
Constructs an InvalidObjectException.
InvalidParameterException - exception java.security.InvalidParameterException.
This exception is thrown when an invalid parameter is passed to a method.
InvalidParameterException() - Constructor for class java.security.InvalidParameterException
Constructs an InvalidParameterException with no detail message.
InvalidParameterException(String) - Constructor for class java.security.InvalidParameterException
Constructs an InvalidParameterException with the specified detail message.
InvalidParameterSpecException - exception java.security.spec.InvalidParameterSpecException.
This is the exception for invalid parameter specifications.
InvalidParameterSpecException() - Constructor for class java.security.spec.InvalidParameterSpecException
Constructs an InvalidParameterSpecException with no detail message.
InvalidParameterSpecException(String) - Constructor for class java.security.spec.InvalidParameterSpecException
Constructs an InvalidParameterSpecException with the specified detail message.
InvalidSearchControlsException - exception javax.naming.directory.InvalidSearchControlsException.
This exception is thrown when the specification of the SearchControls for a search operation is invalid.
InvalidSearchControlsException() - Constructor for class javax.naming.directory.InvalidSearchControlsException
Constructs a new instance of InvalidSearchControlsException.
InvalidSearchControlsException(String) - Constructor for class javax.naming.directory.InvalidSearchControlsException
Constructs a new instance of InvalidSearchControlsException with an explanation.
InvalidSearchFilterException - exception javax.naming.directory.InvalidSearchFilterException.
This exception is thrown when the specification of a search filter is invalid.
InvalidSearchFilterException() - Constructor for class javax.naming.directory.InvalidSearchFilterException
Constructs a new instance of InvalidSearchFilterException.
InvalidSearchFilterException(String) - Constructor for class javax.naming.directory.InvalidSearchFilterException
Constructs a new instance of InvalidSearchFilterException with an explanation.
InvalidSeq - exception org.omg.CORBA.DynAnyPackage.InvalidSeq.
The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
InvalidSeq() - Constructor for class org.omg.CORBA.DynAnyPackage.InvalidSeq
Constructs an InvalidSeq object.
InvalidSeq(String) - Constructor for class org.omg.CORBA.DynAnyPackage.InvalidSeq
Constructs an InvalidSeq object.
InvalidTransactionException - exception javax.transaction.InvalidTransactionException.
This exception indicates that the request carried an invalid transaction context.
InvalidTransactionException() - Constructor for class javax.transaction.InvalidTransactionException
InvalidTransactionException(String) - Constructor for class javax.transaction.InvalidTransactionException
InvalidValue - exception org.omg.CORBA.DynAnyPackage.InvalidValue.
InvalidValue() - Constructor for class org.omg.CORBA.DynAnyPackage.InvalidValue
Constructs an InvalidValue object.
InvalidValue(String) - Constructor for class org.omg.CORBA.DynAnyPackage.InvalidValue
Constructs an InvalidValue object.
inverseTransform(double[], int, double[], int, int) - Method in class java.awt.geom.AffineTransform
Inverse transforms an array of double precision coordinates by this transform.
inverseTransform(Point2D, Point2D) - Method in class java.awt.geom.AffineTransform
Inverse transforms the specified ptSrc and stores the result in ptDst.
INVITE - Static variable in class java.awt.PageAttributes.MediaType
An alias for INVITE_ENVELOPE.
INVITE_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Invitation Envelope, 220 x 220 mm.
INVOCATION_DEFAULT - Static variable in class java.awt.event.InvocationEvent
The default id for all InvocationEvents.
INVOCATION_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting invocation events.
INVOCATION_FIRST - Static variable in class java.awt.event.InvocationEvent
Marks the first integer id for the range of invocation event ids.
INVOCATION_LAST - Static variable in class java.awt.event.InvocationEvent
Marks the last integer id for the range of invocation event ids.
InvocationEvent - class java.awt.event.InvocationEvent.
An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
InvocationEvent(Object, int, Runnable, Object, boolean) - Constructor for class java.awt.event.InvocationEvent
Constructs an InvocationEvent with the specified source and ID which will execute the runnable's run() method when dispatched.
InvocationEvent(Object, Runnable) - Constructor for class java.awt.event.InvocationEvent
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationEvent(Object, Runnable, Object, boolean) - Constructor for class java.awt.event.InvocationEvent
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationHandler - interface java.lang.reflect.InvocationHandler.
InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
InvocationTargetException - exception java.lang.reflect.InvocationTargetException.
InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
InvocationTargetException() - Constructor for class java.lang.reflect.InvocationTargetException
Constructs an InvocationTargetException with null as the target exception.
InvocationTargetException(Throwable) - Constructor for class java.lang.reflect.InvocationTargetException
Constructs a InvocationTargetException with a target exception.
InvocationTargetException(Throwable, String) - Constructor for class java.lang.reflect.InvocationTargetException
Constructs a InvocationTargetException with a target exception and a detail message.
INVOICE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Invoice, 5 1/2 x 8 1/2 in.
invoke() - Method in class org.omg.CORBA.Request
Makes a synchronous invocation using the information in the Request object.
invoke(Object, Method, Object[]) - Method in interface java.lang.reflect.InvocationHandler
Processes a method invocation on a proxy instance and returns the result.
invoke(Object, Object[]) - Method in class java.lang.reflect.Method
Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
invoke(Object, OutputStream) - Method in class org.omg.CORBA.portable.Delegate
invoke is called by a stub to invoke an operation.
invoke(RemoteCall) - Method in interface java.rmi.server.RemoteRef
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

invoke(Remote, Method, Object[], long) - Method in interface java.rmi.server.RemoteRef
Invoke a method.
invoke(ServerRequest) - Method in class org.omg.CORBA.DynamicImplementation
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception.
invoke(ServerRequest) - Method in class org.omg.CosNaming._BindingIteratorImplBase
invoke(ServerRequest) - Method in class org.omg.CosNaming._NamingContextImplBase
invokeAndWait(Runnable) - Static method in class java.awt.EventQueue
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
invokeAndWait(Runnable) - Static method in class javax.swing.SwingUtilities
Causes doRun.run() to be executed synchronously on the AWT event dispatching thread.
InvokeHandler - interface org.omg.CORBA.portable.InvokeHandler.
This interface provides a dispatching mechanism for an incoming call.
invokeLater(Runnable) - Static method in class java.awt.EventQueue
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
invokeLater(Runnable) - Static method in class javax.swing.SwingUtilities
Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread.
INVOKES_STOP_CELL_EDITING_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for messagesStopCellEditing.
invokesStopCellEditing - Variable in class javax.swing.JTree
If true, when editing is to be stopped by way of selection changing, data in tree changing or other means stopCellEditing is invoked, and changes are saved.
IOException - exception java.io.IOException.
Signals that an I/O exception of some sort has occurred.
IOException() - Constructor for class java.io.IOException
Constructs an IOException with null as its error detail message.
IOException(String) - Constructor for class java.io.IOException
Constructs an IOException with the specified detail message.
IP_MULTICAST_IF - Static variable in interface java.net.SocketOptions
Set which outgoing interface on which to send multicast packets.
IPA_EXTENSIONS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
ipadx - Variable in class java.awt.GridBagConstraints
This field specifies the internal padding of the component, how much space to add to the minimum width of the component.
ipady - Variable in class java.awt.GridBagConstraints
This field specifies the internal padding, that is, how much space to add to the minimum height of the component.
IRObject - interface org.omg.CORBA.IRObject.
An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
IRObjectOperations - interface org.omg.CORBA.IRObjectOperations.
This is the Operations interface for the mapping from IRObject.
is_a(Object, String) - Method in class org.omg.CORBA.portable.Delegate
Checks if the object reference is an instance of the given interface.
IS_CLOSED_PROPERTY - Static variable in class javax.swing.JInternalFrame
Constrained property name indicating that the frame is closed.
is_equivalent(Object, Object) - Method in class org.omg.CORBA.portable.Delegate
Determines if the two object references are equivalent.
IS_ICON_PROPERTY - Static variable in class javax.swing.JInternalFrame
Constrained property name indicating that the frame is iconified.
is_local(Object) - Method in class org.omg.CORBA.portable.Delegate
Returns true if this object is implemented by a local servant.
IS_MAXIMUM_PROPERTY - Static variable in class javax.swing.JInternalFrame
Constrained property name indicating that the frame is maximized.
IS_PALETTE - Static variable in class javax.swing.plaf.metal.MetalInternalFrameUI
IS_SELECTED_PROPERTY - Static variable in class javax.swing.JInternalFrame
Constrained property name indicated that this frame has selected status.
isAbsolute() - Method in class java.io.File
Tests whether this abstract pathname is absolute.
isAbstract(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the abstract modifier.
isAcceptAllFileFilterUsed() - Method in class javax.swing.JFileChooser
Returns whether the AcceptAll FileFilter is used.
isAccessible() - Method in class java.lang.reflect.AccessibleObject
Get the value of the accessible flag for this object.
isAccessibleChildSelected(int) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Determines if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class java.awt.List.AccessibleAWTList
Returns true if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in interface javax.accessibility.AccessibleSelection
Determines if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
isAccessibleChildSelected(int) - Method in class javax.swing.JMenu.AccessibleJMenu
Returns true if the current child of this object is selected (that is, if this child is a popped-up submenu).
isAccessibleChildSelected(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Determines if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JList.AccessibleJList
Returns true if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JTree.AccessibleJTree
Returns true if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Returns true if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JTable.AccessibleJTable
Determines if the current child of this object is selected.
isAccessibleChildSelected(int) - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Returns true if the current child of this object is selected.
isAccessibleColumnSelected(int) - Method in interface javax.accessibility.AccessibleTable
Returns a boolean value indicating whether the specified column is selected.
isAccessibleColumnSelected(int) - Method in class javax.swing.JTable.AccessibleJTable
Returns a boolean value indicating whether the specified column is selected
isAccessibleRowSelected(int) - Method in interface javax.accessibility.AccessibleTable
Returns a boolean value indicating whether the specified row is selected.
isAccessibleRowSelected(int) - Method in class javax.swing.JTable.AccessibleJTable
Returns a boolean value indicating whether the specified row is selected
isAccessibleSelected(int, int) - Method in interface javax.accessibility.AccessibleTable
Returns a boolean value indicating whether the accessible at a specified row and column is selected.
isAccessibleSelected(int, int) - Method in class javax.swing.JTable.AccessibleJTable
Returns a boolean value indicating whether the accessible at a given (row, column) is selected
isActionKey() - Method in class java.awt.event.KeyEvent
Returns whether or not the key in this event is an "action" key, as defined in Event.java.
isActive() - Method in class java.applet.Applet
Determines if this applet is active.
isActive() - Method in interface java.applet.AppletStub
Determines if the applet is active.
isActive() - Method in class java.awt.dnd.DropTarget
This method returns a boolean indicating whether or not this DropTarget is currently active (ready to accept drops).
isActive() - Method in interface javax.sound.sampled.DataLine
Indicates whether the line is engaging in active I/O (such as playback or capture).
isAddedPath() - Method in class javax.swing.event.TreeSelectionEvent
Returns true if the first path element has been added to the selection, a return value of false means the first path has been removed from the selection.
isAddedPath(int) - Method in class javax.swing.event.TreeSelectionEvent
Returns true if the path identified by index was added to the selection.
isAddedPath(TreePath) - Method in class javax.swing.event.TreeSelectionEvent
Returns true if the path identified by path was added to the selection.
isAfter(int, int, Rectangle) - Method in class javax.swing.text.CompositeView
Tests whether a point lies after the rectangle range.
isAfter(int, int, Rectangle) - Method in class javax.swing.text.BoxView
Determines if a point falls after an allocated region.
isAfterLast() - Method in interface java.sql.ResultSet
Indicates whether the cursor is after the last row in this ResultSet object.
isAlive() - Method in class java.lang.Thread
Tests if this thread is alive.
isAllocationValid() - Method in class javax.swing.text.BoxView
Are the allocations for the children still valid?
isAlphaPremultiplied() - Method in class java.awt.image.BufferedImage
Returns whether or not the alpha has been premultiplied.
isAlphaPremultiplied() - Method in class java.awt.image.ColorModel
Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel.
isAltDown() - Method in class java.awt.event.InputEvent
Returns whether or not the Alt modifier is down on this event.
isAltGraphDown() - Method in class java.awt.event.InputEvent
Returns whether or not the Alt-Graph modifier is down on this event.
isAncestorOf(Component) - Method in class java.awt.Container
Checks if the component is contained in the component hierarchy of this container.
isAntiAliased() - Method in class java.awt.font.FontRenderContext
Gets the text anti-aliasing mode used in this FontRenderContext.
isArmed() - Method in class javax.swing.JMenuItem
Returns whether the menu item is "armed".
isArmed() - Method in interface javax.swing.ButtonModel
Indicates partial commitment towards pressing the button.
isArmed() - Method in class javax.swing.DefaultButtonModel
Indicates partial commitment towards pressing the button.
isArray() - Method in class java.lang.Class
Determines if this Class object represents an array class.
isAssignableFrom(Class) - Method in class java.lang.Class
Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter.
isAutoIncrement(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether the designated column is automatically numbered, thus read-only.
isAutoScrolling - Variable in class javax.swing.plaf.basic.BasicComboPopup
isAutoWaitForIdle() - Method in class java.awt.Robot
Returns whether this Robot automatically invokes waitForIdle after generating an event.
isBackingStoreEnabled() - Method in class javax.swing.JViewport
Deprecated. As of Java 2 platform v1.3, replaced by getScrollMode().
isBefore(int, int, Rectangle) - Method in class javax.swing.text.CompositeView
Tests whether a point lies before the rectangle range.
isBefore(int, int, Rectangle) - Method in class javax.swing.text.BoxView
Determines if a point falls before an allocated region.
isBeforeFirst() - Method in interface java.sql.ResultSet
Indicates whether the cursor is before the first row in this ResultSet object.
isBigEndian() - Method in class javax.sound.sampled.AudioFormat
Indicates whether the audio data is stored in big-endian or little-endian byte order.
isBlock() - Method in class javax.swing.text.html.HTML.Tag
Block tags are tags that add structure to a document.
isBlockTag(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Determines if the HTML.Tag associated with the element is a block tag.
isBold() - Method in class java.awt.Font
Indicates whether or not this Font object's style is BOLD.
isBold(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the bold attribute is set.
isBorderOpaque() - Method in class javax.swing.border.AbstractBorder
This default implementation returns false.
isBorderOpaque() - Method in class javax.swing.border.BevelBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.SoftBevelBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.EmptyBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.MatteBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.CompoundBorder
Returns whether or not this compound border is opaque.
isBorderOpaque() - Method in class javax.swing.border.LineBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.TitledBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.border.EtchedBorder
Returns whether or not the border is opaque.
isBorderOpaque() - Method in interface javax.swing.border.Border
Returns whether or not the border is opaque.
isBorderOpaque() - Method in class javax.swing.plaf.BorderUIResource
isBorderOpaque() - Method in class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
isBorderPainted() - Method in class javax.swing.AbstractButton
Returns whether the border should be painted.
isBorderPainted() - Method in class javax.swing.JPopupMenu
Checks whether the border should be painted.
isBorderPainted() - Method in class javax.swing.JToolBar
Checks whether the border should be painted.
isBorderPainted() - Method in class javax.swing.JMenuBar
Returns true if the menu bars border should be painted.
isBorderPainted() - Method in class javax.swing.JProgressBar
Returns true if the progress bar has a border or false if it does not.
isBorderPaintedFlat() - Method in class javax.swing.JCheckBox
Returns whether the border should be painted flat.
isBound() - Method in class java.beans.PropertyDescriptor
Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
isBoundary(int) - Method in class java.text.BreakIterator
Return true if the specified position is a boundary position.
isCanceled() - Method in class javax.swing.ProgressMonitor
Returns true if the user hits the Cancel button in the progress dialog.
isCancelled() - Method in class java.awt.print.PrinterJob
Returns true if a print job is in progress, but is going to be cancelled at the next opportunity; otherwise returns false.
isCaseIgnored() - Method in interface javax.naming.directory.Attributes
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.
isCaseIgnored() - Method in class javax.naming.directory.BasicAttributes
isCaseSensitive(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether a column's case matters.
isCatalogAtStart() - Method in interface java.sql.DatabaseMetaData
Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end)
isCellEditable(EventObject) - Method in interface javax.swing.CellEditor
Ask the editor if it can start editing using anEvent.
isCellEditable(EventObject) - Method in class javax.swing.AbstractCellEditor
Returns true.
isCellEditable(EventObject) - Method in class javax.swing.DefaultCellEditor
isCellEditable(EventObject) - Method in class javax.swing.DefaultCellEditor.EditorDelegate
isCellEditable(EventObject) - Method in class javax.swing.tree.DefaultTreeCellEditor
If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
isCellEditable(int, int) - Method in class javax.swing.JTable
Returns true if the cell at row and column is editable.
isCellEditable(int, int) - Method in class javax.swing.table.AbstractTableModel
Returns false.
isCellEditable(int, int) - Method in class javax.swing.table.DefaultTableModel
Returns true regardless of parameter values.
isCellEditable(int, int) - Method in interface javax.swing.table.TableModel
Returns true if the cell at rowIndex and columnIndex is editable.
isCellSelected(int, int) - Method in class javax.swing.JTable
Returns true if the cell at the specified position is selected.
isCertificateEntry(String) - Method in class java.security.KeyStore
Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
isClosable() - Method in class javax.swing.JInternalFrame
Returns whether this JInternalFrame be closed by some user action.
isClosed - Variable in class javax.swing.JInternalFrame
The frame has been closed.
isClosed() - Method in interface java.sql.Connection
Tests to see if a Connection is closed.
isClosed() - Method in class javax.swing.JInternalFrame
Returns whether this JInternalFrame is currently closed.
isCoalesce() - Method in class javax.swing.Timer
Returns true if the Timer coalesces multiple pending performCommand() messages.
isCollapsed(int) - Method in class javax.swing.JTree
Returns true if the node at the specified display row is collapsed.
isCollapsed(TreePath) - Method in class javax.swing.JTree
Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
isColumnSelected(int) - Method in class javax.swing.JTable
Returns true if the column at the specified index is selected.
isCombining() - Method in class java.awt.font.GlyphMetrics
Returns true if this is a combining glyph.
isCompatibleRaster(Raster) - Method in class java.awt.image.ColorModel
Returns true if raster is compatible with this ColorModel and false if it is not.
isCompatibleRaster(Raster) - Method in class java.awt.image.ComponentColorModel
Returns true if raster is compatible with this ColorModel; false if it is not.
isCompatibleRaster(Raster) - Method in class java.awt.image.DirectColorModel
Returns true if raster is compatible with this ColorModel and false if it is not.
isCompatibleRaster(Raster) - Method in class java.awt.image.IndexColorModel
Returns true if raster is compatible with this ColorModel or false if it is not compatible with this ColorModel.
isCompatibleSampleModel(SampleModel) - Method in class java.awt.image.ColorModel
Checks if the SampleModel is compatible with this ColorModel.
isCompatibleSampleModel(SampleModel) - Method in class java.awt.image.PackedColorModel
Checks if the specified SampleModel is compatible with this ColorModel.
isCompatibleSampleModel(SampleModel) - Method in class java.awt.image.ComponentColorModel
Checks whether or not the specified SampleModel is compatible with this ColorModel.
isCompatibleSampleModel(SampleModel) - Method in class java.awt.image.IndexColorModel
Checks if the specified SampleModel is compatible with this ColorModel.
isCompatibleValue(Object) - Method in class java.awt.RenderingHints.Key
Returns true if the specified object is a valid value for this Key.
isCompatibleWith(String) - Method in class java.lang.Package
Compare this package's specification version with a desired version.
isCompletelyDirty(JComponent) - Method in class javax.swing.RepaintManager
Convenience method that returns true if aComponent will be completely painted during the next paintDirtyRegions().
isComponent() - Method in class java.awt.font.GlyphMetrics
Returns true if this is a component glyph.
isComponentPartOfCurrentMenu(Component) - Method in class javax.swing.MenuSelectionManager
Return true if c is part of the currently used menu
isCompositionEnabled() - Method in class java.awt.im.InputContext
Determines whether the current input method is enabled for composition.
isCompositionEnabled() - Method in interface java.awt.im.spi.InputMethod
Determines whether this input method is enabled.
isConstrained() - Method in class java.beans.PropertyDescriptor
Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
isConsumed() - Method in class java.awt.AWTEvent
isConsumed() - Method in class java.awt.event.InputMethodEvent
Returns whether or not this event has been consumed.
isConsumed() - Method in class java.awt.event.InputEvent
Returns whether or not this event has been consumed.
isConsumer(ImageConsumer) - Method in class java.awt.image.FilteredImageSource
Determines whether an ImageConsumer is on the list of consumers currently interested in data for this image.
isConsumer(ImageConsumer) - Method in interface java.awt.image.ImageProducer
This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
isConsumer(ImageConsumer) - Method in class java.awt.image.MemoryImageSource
Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
isConsumer(ImageConsumer) - Method in class java.awt.image.renderable.RenderableImageProducer
Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
isContentAreaFilled() - Method in class javax.swing.AbstractButton
Checks whether the "content area" of the button should be filled.
isContinuousLayout() - Method in class javax.swing.JSplitPane
Returns true if the child comopnents are continuously redisplayed and layed out during user intervention.
isContinuousLayout() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Determines wether the JSplitPane is set to use a continuous layout.
isControlDown() - Method in class java.awt.event.InputEvent
Returns whether or not the Control modifier is down on this event.
isControlSupported(Control.Type) - Method in interface javax.sound.sampled.Line
Indicates whether the line supports a control of the specified type.
isConversionSupported(AudioFormat.Encoding, AudioFormat) - Static method in class javax.sound.sampled.AudioSystem
Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
isConversionSupported(AudioFormat.Encoding, AudioFormat) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Indicates whether the format converter supports conversion to a particular encoding from a particular format.
isConversionSupported(AudioFormat, AudioFormat) - Static method in class javax.sound.sampled.AudioSystem
Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
isConversionSupported(AudioFormat, AudioFormat) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Indicates whether the format converter supports conversion to one particular format from another.
isCritical() - Method in interface javax.naming.ldap.Control
Determines the criticality of the LDAP control.
isCS_sRGB() - Method in class java.awt.color.ColorSpace
Returns true if the ColorSpace is CS_sRGB.
isCurrency(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether the designated column is a cash value.
isCurrentServiceInvalidNow() - Method in class java.beans.beancontext.BeanContextServiceRevokedEvent
Reports if the current service is being forcibly revoked, in which case the references are now invalidated and unusable.
isCustomMarshaled(Class) - Method in interface javax.rmi.CORBA.ValueHandler
Indicates whether the given class performs custom or default marshaling.
isCyclic() - Method in class java.awt.GradientPaint
Returns true if the gradient cycles repeatedly between the two colors C1 and C2.
isDaemon() - Method in class java.lang.ThreadGroup
Tests if this thread group is a daemon thread group.
isDaemon() - Method in class java.lang.Thread
Tests if this thread is a daemon thread.
isDataFlavorSupported(DataFlavor) - Method in interface java.awt.datatransfer.Transferable
Returns whether or not the specified data flavor is supported for this object.
isDataFlavorSupported(DataFlavor) - Method in class java.awt.datatransfer.StringSelection
Returns whether the requested flavor is supported by this Transferable.
isDataFlavorSupported(DataFlavor) - Method in class java.awt.dnd.DropTargetContext
This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.
isDataFlavorSupported(DataFlavor) - Method in class java.awt.dnd.DropTargetContext.TransferableProxy
check if a particular flavor is supported?
isDataFlavorSupported(DataFlavor) - Method in class java.awt.dnd.DropTargetDropEvent
This method returns a boolean indicating if the specified DataFlavor is available from the source.
isDataFlavorSupported(DataFlavor) - Method in class java.awt.dnd.DropTargetDragEvent
This method returns a boolean indicating if the specified DataFlavor is supported.
isDecimalSeparatorAlwaysShown() - Method in class java.text.DecimalFormat
Allows you to get the behavior of the decimal separator with integers.
isDefaultButton() - Method in class javax.swing.JButton
Returns whether or not this button is the default button on the RootPane.
isDefaultCapable() - Method in class javax.swing.JButton
Returns whether or not this button is capable of being the default button on the RootPane.
isDefined(char) - Static method in class java.lang.Character
Determines if a character has a defined meaning in Unicode.
isDefined(Object) - Method in class javax.swing.text.SimpleAttributeSet
Tells whether a given attribute is defined.
isDefined(Object) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Checks whether a given attribute is defined.
isDefined(Object) - Method in class javax.swing.text.StyleContext.NamedStyle
Checks whether a given attribute is defined.
isDefined(Object) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Checks whether a given attribute is defined.
isDefined(Object) - Method in interface javax.swing.text.AttributeSet
Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
isDefinitelyWritable(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether a write on the designated column will definitely succeed.
isDelegated() - Method in class java.beans.beancontext.BeanContextChildSupport
Reports whether or not this class is a delegate of another.
isDescendant(TreePath) - Method in class javax.swing.tree.TreePath
Returns true if aTreePath is a descendant of this TreePath.
isDescendingFrom(Component, Component) - Static method in class javax.swing.SwingUtilities
Return true if a component a descends from a component b
isDesignTime() - Static method in class java.beans.Beans
Test if we are in design-mode.
isDesignTime() - Method in interface java.beans.DesignMode
A value of true denotes that JavaBeans should behave in design time mode, a value of false denotes runtime behavior.
isDesignTime() - Method in class java.beans.beancontext.BeanContextSupport
Reports whether or not this object is in currently in design time mode.
isDestroyed() - Method in class java.lang.ThreadGroup
Tests if this thread group has been destroyed.
isDeviceSupported(MidiDevice.Info) - Method in class javax.sound.midi.spi.MidiDeviceProvider
Indicates whether the device provider supports the device represented by the specified device info object.
isDigit(char) - Static method in class java.lang.Character
Determines if the specified character is a digit.
isDirectory() - Method in class java.io.File
Tests whether the file denoted by this abstract pathname is a directory.
isDirectory() - Method in class java.util.zip.ZipEntry
Returns true if this is a directory entry.
isDirectorySelectionEnabled() - Method in class javax.swing.JFileChooser
Convenience call that determines if directories are selectable based on the current file selection mode.
isDispatchThread() - Static method in class java.awt.EventQueue
Returns true if the calling thread is the current AWT EventQueue's dispatch thread.
isDisplayable() - Method in class java.awt.Component
Determines whether this component is displayable.
isDone() - Method in interface java.awt.geom.PathIterator
Tests if the iteration is complete.
isDone() - Method in class java.awt.geom.FlatteningPathIterator
Tests if the iteration is complete.
isDoubleBuffered() - Method in class java.awt.Component
Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later.
isDoubleBuffered() - Method in class javax.swing.JComponent
Returns whether the receiving component should use a buffer to paint.
isDoubleBufferingEnabled() - Method in class javax.swing.RepaintManager
Returns true if this object is double buffered.
isDragging - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
isDragging - Variable in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
isDragImageSupported() - Static method in class java.awt.dnd.DragSource
This method returns a boolean indicating whether or not drag Image support is available on the underlying platform.
isDrawingBuffer() - Method in class javax.swing.DebugGraphics
Returns the drawingBuffer value.
isDynamic() - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Returns true if successive renderings (that is, calls to create(RenderContext, ParameterBlock)) with the same arguments may produce different results.
isDynamic() - Method in class java.awt.image.renderable.RenderableImageOp
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results.
isDynamic() - Method in interface java.awt.image.renderable.RenderableImage
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results.
isEditable - Variable in class javax.swing.JComboBox
isEditable() - Method in class java.awt.TextComponent
Indicates whether or not this text component is editable.
isEditable() - Method in class javax.swing.JComboBox
Returns true if the JComboBox is editable.
isEditable() - Method in class javax.swing.JTree
Returns true if the tree is editable.
isEditable() - Method in class javax.swing.text.JTextComponent
Returns the boolean indicating whether this TextComponent is editable or not.
isEditable() - Method in class javax.swing.plaf.basic.BasicTreeUI
isEditing() - Method in class javax.swing.JTree
Returns true if the tree is being edited.
isEditing() - Method in class javax.swing.JTable
Returns true if a cell is being edited.
isEditing(JTree) - Method in class javax.swing.plaf.TreeUI
Returns true if the tree is being edited.
isEditing(JTree) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns true if the tree is being edited.
isEditing(JTree) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call isEditing on each UI handled by this MultiUI.
isEmpty() - Method in class java.awt.RenderingHints
Returns true if this RenderingHints contains no key-value mappings.
isEmpty() - Method in class java.awt.Rectangle
Determines whether or not this Rectangle is empty.
isEmpty() - Method in class java.awt.geom.RectangularShape
Determines whether the RectangularShape is empty.
isEmpty() - Method in class java.awt.geom.RoundRectangle2D.Float
Determines whether or not this RoundRectangle2D is empty.
isEmpty() - Method in class java.awt.geom.RoundRectangle2D.Double
Determines whether or not this RoundRectangle2D is empty.
isEmpty() - Method in class java.awt.geom.Area
Tests whether this Area object encloses any area.
isEmpty() - Method in class java.awt.geom.Rectangle2D.Float
Determines whether or not this Rectangle2D is empty.
isEmpty() - Method in class java.awt.geom.Rectangle2D.Double
Determines whether or not this Rectangle2D is empty.
isEmpty() - Method in class java.awt.geom.Arc2D.Float
Determines whether the arc is empty.
isEmpty() - Method in class java.awt.geom.Arc2D.Double
Determines whether the arc is empty.
isEmpty() - Method in class java.awt.geom.Ellipse2D.Float
Determines whether or not the bounding box of this Ellipse2D is empty.
isEmpty() - Method in class java.awt.geom.Ellipse2D.Double
Determines whether or not the bounding box of this Ellipse2D is empty.
isEmpty() - Method in class java.beans.beancontext.BeanContextSupport
Reports whether or not this BeanContext is empty.
isEmpty() - Method in class java.util.Dictionary
Tests if this dictionary maps no keys to value.
isEmpty() - Method in class java.util.Hashtable
Tests if this hashtable maps no keys to values.
isEmpty() - Method in class java.util.AbstractCollection
Returns true if this collection contains no elements.
isEmpty() - Method in class java.util.TreeSet
Returns true if this set contains no elements.
isEmpty() - Method in class java.util.AbstractMap
Returns true if this map contains no key-value mappings.
isEmpty() - Method in class java.util.Vector
Tests if this vector has no components.
isEmpty() - Method in interface java.util.Collection
Returns true if this collection contains no elements.
isEmpty() - Method in class java.util.WeakHashMap
Returns true if this map contains no key-value mappings.
isEmpty() - Method in class java.util.HashSet
Returns true if this set contains no elements.
isEmpty() - Method in interface java.util.Set
Returns true if this set contains no elements.
isEmpty() - Method in interface java.util.List
Returns true if this list contains no elements.
isEmpty() - Method in class java.util.ArrayList
Tests if this list has no elements.
isEmpty() - Method in class java.util.HashMap
Returns true if this map contains no key-value mappings.
isEmpty() - Method in interface java.util.Map
Returns true if this map contains no key-value mappings.
isEmpty() - Method in class java.util.jar.Attributes
Returns true if this Map contains no attributes.
isEmpty() - Method in interface javax.naming.Name
Determines whether this name is empty.
isEmpty() - Method in class javax.naming.CompoundName
Determines whether this compound name is empty.
isEmpty() - Method in class javax.naming.CompositeName
Determines whether this composite name is empty.
isEmpty() - Method in class javax.swing.DefaultListModel
Tests if this list has no components.
isEmpty() - Method in class javax.swing.text.SimpleAttributeSet
Checks whether the set of attributes is empty.
isEmpty() - Method in class javax.swing.text.html.parser.Element
Check if empty
isEnabled() - Method in class java.awt.Component
Determines whether this component is enabled.
isEnabled() - Method in class java.awt.Component.AccessibleAWTComponent
Determine if the object is enabled.
isEnabled() - Method in class java.awt.MenuItem
Checks whether this menu item is enabled.
isEnabled() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Determine if the object is enabled.
isEnabled() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Determine if the object is enabled.
isEnabled() - Method in interface javax.accessibility.AccessibleComponent
Determines if the object is enabled.
isEnabled() - Method in class javax.swing.ToolTipManager
Returns true if this object is enabled.
isEnabled() - Method in interface javax.swing.Action
Returns the enabled state of the Action.
isEnabled() - Method in interface javax.swing.ButtonModel
Indicates if the button can be selected or pressed by an input device (such as a mouse pointer).
isEnabled() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
isEnabled() - Method in class javax.swing.DefaultButtonModel
Indicates if the button can be selected or pressed by an input device (such as a mouse pointer).
isEnabled() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
isEnabled() - Method in class javax.swing.AbstractAction
Returns true if the action is enabled.
isEnabled() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Determines if the object is enabled.
isEnabled() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
isEnabled() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
isEnabled() - Method in class javax.swing.plaf.basic.BasicSliderUI.ActionScroller
isEnabledAt(int) - Method in class javax.swing.JTabbedPane
Returns whether or not the tab at index is currently enabled.
isEnqueued() - Method in class java.lang.ref.Reference
Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector.
isEqual(AttributeSet) - Method in class javax.swing.text.SimpleAttributeSet
Compares two attribute sets.
isEqual(AttributeSet) - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Checks whether two attribute sets are equal.
isEqual(AttributeSet) - Method in class javax.swing.text.StyleContext.NamedStyle
Checks whether two attribute sets are equal.
isEqual(AttributeSet) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Checks whether two attribute sets are equal.
isEqual(AttributeSet) - Method in interface javax.swing.text.AttributeSet
Determines if the two attribute sets are equivalent.
isEqual(byte[], byte[]) - Static method in class java.security.MessageDigest
Compares two digests for equality.
isErrorAny() - Method in class java.awt.MediaTracker
Checks the error status of all of the images.
isErrorID(int) - Method in class java.awt.MediaTracker
Checks the error status of all of the images tracked by this media tracker with the specified identifier.
isEventDispatchThread() - Static method in class javax.swing.SwingUtilities
Returns true if the current thread is an AWT event dispatching thread.
isExpanded(int) - Method in class javax.swing.JTree
Returns true if the node at the specified display row is currently expanded.
isExpanded(TreePath) - Method in class javax.swing.JTree
Returns true if the node identified by the path is currently expanded,
isExpanded(TreePath) - Method in class javax.swing.tree.AbstractLayoutCache
Returns true if the value identified by row is currently expanded.
isExpanded(TreePath) - Method in class javax.swing.tree.VariableHeightLayoutCache
Returns true if the value identified by row is currently expanded.
isExpanded(TreePath) - Method in class javax.swing.tree.FixedHeightLayoutCache
Returns true if the value identified by row is currently expanded.
isExpert() - Method in class java.beans.FeatureDescriptor
The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.
isFile() - Method in class java.io.File
Tests whether the file denoted by this abstract pathname is a normal file.
isFileHidingEnabled() - Method in class javax.swing.JFileChooser
Returns true if hidden files are not shown in the file chooser; otherwise, returns false.
isFileSelectionEnabled() - Method in class javax.swing.JFileChooser
Convenience call that determines if files are selectable based on the current file selection mode.
isFileTypeSupported(AudioFileFormat.Type) - Static method in class javax.sound.sampled.AudioSystem
Indicates whether file writing support for the specified file type is provided by the system.
isFileTypeSupported(AudioFileFormat.Type) - Method in class javax.sound.sampled.spi.AudioFileWriter
Indicates whether file writing support for the specified file type is provided by this audio file writer.
isFileTypeSupported(AudioFileFormat.Type, AudioInputStream) - Static method in class javax.sound.sampled.AudioSystem
Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
isFileTypeSupported(AudioFileFormat.Type, AudioInputStream) - Method in class javax.sound.sampled.spi.AudioFileWriter
Indicates whether an audio file of the type specified can be written from the audio input stream indicated.
isFileTypeSupported(int) - Static method in class javax.sound.midi.MidiSystem
Indicates whether file writing support for the specified MIDI file type is provided by the system.
isFileTypeSupported(int) - Method in class javax.sound.midi.spi.MidiFileWriter
Indicates whether file writing support for the specified MIDI file type is provided by this file writer.
isFileTypeSupported(int, Sequence) - Static method in class javax.sound.midi.MidiSystem
Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
isFileTypeSupported(int, Sequence) - Method in class javax.sound.midi.spi.MidiFileWriter
Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
isFinal(int) - Static method in class java.lang.reflect.Modifier
Return true if the specified integer includes the final modifier.
isFirst() - Method in interface java.sql.ResultSet
Indicates whether the cursor is on the first row of this ResultSet object.
isFixedRowHeight() - Method in class javax.swing.JTree
Returns true if the height of each display row is a fixed size.
isFixedRowHeight() - Method in class javax.swing.tree.AbstractLayoutCache
Returns true if the height of each row is a fixed size.
isFlavorJavaFileListType() - Method in class java.awt.datatransfer.DataFlavor
isFlavorRemoteObjectType() - Method in class java.awt.datatransfer.DataFlavor
isFlavorSerializedObjectType() - Method in class java.awt.datatransfer.DataFlavor
isFloatable() - Method in class javax.swing.JToolBar
Returns true if the JToolbar can be dragged out by the user.
isFloating() - Method in class javax.swing.plaf.basic.BasicToolBarUI
isFocusCycleRoot() - Method in class javax.swing.JComponent
Override this method and return true if your component is the root of of a component tree with its own focus cycle.
isFocusCycleRoot() - Method in class javax.swing.JEditorPane
Makes JEditorPane be the root of a focus cycle.
isFocusCycleRoot() - Method in class javax.swing.JRootPane
Make JRootPane be the root of a focus cycle.
isFocusManagerEnabled() - Static method in class javax.swing.FocusManager
Return whether Swing's focus manager is enabled
isFocusPainted() - Method in class javax.swing.AbstractButton
Returns whether focus should be painted.
isFocusTraversable() - Method in class java.awt.Component
Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
isFocusTraversable() - Method in class java.awt.Component.AccessibleAWTComponent
Returns whether this object can accept focus or not.
isFocusTraversable() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Returns whether this object can accept focus or not.
isFocusTraversable() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Returns whether this object can accept focus or not.
isFocusTraversable() - Method in interface javax.accessibility.AccessibleComponent
Returns whether this object can accept focus or not.
isFocusTraversable() - Method in class javax.swing.JComponent
Identifies whether or not this component can receive the focus.
isFocusTraversable() - Method in class javax.swing.AbstractButton
Identifies whether or not this component can receive the focus.
isFocusTraversable() - Method in class javax.swing.JSeparator
Identifies whether or not this component can receive the focus.
isFocusTraversable() - Method in class javax.swing.JComboBox
Returns true if the component can receive the focus.
isFocusTraversable() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
isFocusTraversable() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
isFocusTraversable() - Method in class javax.swing.JTable
We override this method, whose implementation in JComponent returns false, to return true.
isFocusTraversable() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
isFocusTraversable() - Method in class javax.swing.JScrollBar
Identifies whether or not this component can receive the focus.
isFocusTraversable() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
isFocusTraversable() - Method in class javax.swing.text.JTextComponent
Returns true if the focus can be traversed.
isFocusTraversable() - Method in class javax.swing.plaf.basic.BasicComboPopup
Overridden to unconditionally return false.
isFocusTraversable() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
isFocusTraversable() - Method in class javax.swing.plaf.basic.BasicArrowButton
isFocusTraversable() - Method in class javax.swing.plaf.metal.MetalComboBoxButton
isFocusTraversable(JComboBox) - Method in class javax.swing.plaf.ComboBoxUI
Determine whether or not the combo box itself is traversable
isFocusTraversable(JComboBox) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Determines if the JComboBox is focus traversable.
isFocusTraversable(JComboBox) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
isFocusTraversable(JComboBox) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call isFocusTraversable on each UI handled by this MultiUI.
isFormatSupported(AudioFormat) - Method in class javax.sound.sampled.DataLine.Info
Indicates whether this data line supports a particular audio format.
isFreeStanding - Variable in class javax.swing.plaf.metal.MetalScrollBarUI
isGeneral() - Method in class javax.swing.text.html.parser.Entity
Return true if it is a parameter entity.
isGraphicsConfigSupported(GraphicsConfiguration) - Method in class java.awt.GraphicsConfigTemplate
Returns a boolean indicating whether or not the specified GraphicsConfiguration can be used to create a drawing surface that supports the indicated features.
isGroupingUsed() - Method in class java.text.NumberFormat
Returns true if grouping is used in this format.
isGuiAvailable() - Static method in class java.beans.Beans
Determines whether beans can assume a GUI is available.
isHidden() - Method in class java.beans.FeatureDescriptor
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
isHidden() - Method in class java.io.File
Tests whether the file named by this abstract pathname is a hidden file.
isHidden(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
isHiddenFile(File) - Method in class javax.swing.filechooser.FileSystemView
Returns whether a file is hidden or not.
isHorizontal() - Method in class java.awt.ComponentOrientation
Are lines horizontal? This will return true for horizontal, left-to-right writing systems such as Roman.
isHTMLString(String) - Static method in class javax.swing.plaf.basic.BasicHTML
Check the given string to see if it should trigger the html rendering logic in a non-text component that supports html rendering.
isIcon - Variable in class javax.swing.JInternalFrame
The frame has been iconized.
isIcon() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame is currently iconified.
isIconifiable() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame can be iconified by some user action.
isIconOnly() - Method in class javax.swing.plaf.metal.MetalComboBoxButton
isIdentifierIgnorable(char) - Static method in class java.lang.Character
Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
isIdentity() - Method in class java.awt.geom.AffineTransform
Returns true if this AffineTransform is an identity transform.
isInDefaultEventSet() - Method in class java.beans.EventSetDescriptor
Report if an event set is in the "default set".
isindex - Variable in class javax.swing.text.html.parser.DTD
ISINDEX - Static variable in class javax.swing.text.html.HTML.Tag
isIndexSelected(int) - Method in class java.awt.List
Determines if the specified item in this scrolling list is selected.
isInfinite() - Method in class java.lang.Float
Returns true if this Float value is infinitely large in magnitude.
isInfinite() - Method in class java.lang.Double
Returns true if this Double value is infinitely large in magnitude.
isInfinite(double) - Static method in class java.lang.Double
Returns true if the specified number is infinitely large in magnitude.
isInfinite(float) - Static method in class java.lang.Float
Returns true if the specified number is infinitely large in magnitude.
isInherited() - Method in class javax.swing.text.html.CSS.Attribute
Indicates if the attribute should be inherited from the parent or not.
isInProgress() - Method in class javax.swing.undo.CompoundEdit
Returns true if this edit is in progress--that is, it has not received end.
isInstance(Object) - Method in class java.lang.Class
Determines if the specified Object is assignment-compatible with the object represented by this Class.
isInstanceOf(Object, Class) - Static method in class java.beans.Beans
Check if a bean can be viewed as a given target type.
isInterface() - Method in class java.lang.Class
Determines if the specified Class object represents an interface type.
isInterface(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the interface modifier.
isInterrupted() - Method in class java.lang.Thread
Tests whether this thread has been interrupted.
isISOControl(char) - Static method in class java.lang.Character
Determines if the specified character is an ISO control character.
isItalic() - Method in class java.awt.Font
Indicates whether or not this Font object's style is ITALIC.
isItalic(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the italic attribute is set.
isJavaIdentifierPart(char) - Static method in class java.lang.Character
Determines if the specified character may be part of a Java identifier as other than the first character.
isJavaIdentifierStart(char) - Static method in class java.lang.Character
Determines if the specified character is permissible as the first character in a Java identifier.
isJavaLetter(char) - Static method in class java.lang.Character
Deprecated. Replaced by isJavaIdentifierStart(char).
isJavaLetterOrDigit(char) - Static method in class java.lang.Character
Deprecated. Replaced by isJavaIdentifierPart(char).
isJavaMIMEType(String) - Static method in class java.awt.datatransfer.SystemFlavorMap
isKeyBindingActive() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
isKeyBindingRegistered() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
isKeyDown - Variable in class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
Set to true while keyPressed is active.
isKeyEntry(String) - Method in class java.security.KeyStore
Returns true if the entry identified by the given alias is a key entry, and false otherwise.
isLargeModel() - Method in class javax.swing.JTree
Returns true if the tree is configured for a large model.
isLargeModel() - Method in class javax.swing.plaf.basic.BasicTreeUI
isLast() - Method in interface java.sql.ResultSet
Indicates whether the cursor is on the last row of this ResultSet object.
isLayoutValid() - Method in class javax.swing.text.AsyncBoxView.ChildState
Has the child view been laid out.
isLeadAnchorNotificationEnabled() - Method in class javax.swing.DefaultListSelectionModel
Returns the value of the leadAnchorNotificationEnabled flag.
isLeadingEdge() - Method in class java.awt.font.TextHitInfo
Returns true if the leading edge of the character was hit.
isLeaf() - Method in class javax.swing.JTree.DynamicUtilTreeNode
Returns true if this node allows children.
isLeaf() - Method in interface javax.swing.text.Element
Is this element a leaf element?
isLeaf() - Method in class javax.swing.text.AbstractDocument.AbstractElement
Checks whether the element is a leaf.
isLeaf() - Method in class javax.swing.text.AbstractDocument.BranchElement
Checks whether the element is a leaf.
isLeaf() - Method in class javax.swing.text.AbstractDocument.LeafElement
Checks whether the element is a leaf.
isLeaf() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if this node has no children.
isLeaf() - Method in interface javax.swing.tree.TreeNode
Returns true if the receiver is a leaf.
isLeaf(int) - Method in class javax.swing.plaf.basic.BasicTreeUI
isLeaf(Object) - Method in interface javax.swing.tree.TreeModel
Returns true if node is a leaf.
isLeaf(Object) - Method in class javax.swing.tree.DefaultTreeModel
Returns whether the specified node is a leaf node.
isLeapYear(int) - Method in class java.util.GregorianCalendar
Determines if the given year is a leap year.
isLeftMouseButton(MouseEvent) - Static method in class javax.swing.SwingUtilities
Returns true if the mouse event specifies the left mouse button.
isLeftToRight() - Method in class java.awt.ComponentOrientation
HorizontalLines: Do items run left-to-right?
Vertical Lines: Do lines run left-to-right?
This will return true for horizontal, left-to-right writing systems such as Roman.
isLeftToRight() - Method in class java.awt.font.TextLayout
Returns true if this TextLayout has a left-to-right base direction or false if it has a right-to-left base direction.
isLenient() - Method in class java.text.DateFormat
Tell whether date/time parsing is to be lenient.
isLenient() - Method in class java.util.Calendar
Tell whether date/time interpretation is to be lenient.
isLetter(char) - Static method in class java.lang.Character
Determines if the specified character is a letter.
isLetterOrDigit(char) - Static method in class java.lang.Character
Determines if the specified character is a letter or digit.
isLigature() - Method in class java.awt.font.GlyphMetrics
Returns true if this is a ligature glyph.
isLight - Variable in class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon
isLightweight() - Method in class java.awt.Component
A lightweight component doesn't have a native toolkit peer.
isLightweightComponent(Component) - Static method in class javax.swing.JComponent
Returns true if this component is a lightweight, that is, if it doesn't have a native window system peer.
isLightWeightPopupEnabled() - Method in class javax.swing.ToolTipManager
Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used.
isLightWeightPopupEnabled() - Method in class javax.swing.JPopupMenu
Returns true if light weight (all-Java) popups are in use, or false if heavy weight (native peer) popups are being used.
isLightWeightPopupEnabled() - Method in class javax.swing.JComboBox
Returns true if lightweight (all-Java) popups are in use, or false if heavyweight (native peer) popups are being used.
isLineEmpty() - Method in class javax.swing.text.AbstractWriter
Returns true if the current line should be considered empty.
isLineSupported(Line.Info) - Method in interface javax.sound.sampled.Mixer
Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object.
isLineSupported(Line.Info) - Static method in class javax.sound.sampled.AudioSystem
Indicates whether the the system supports any lines that match the specified Line.Info object.
isLocal - Variable in class java.awt.dnd.DropTargetContext.TransferableProxy
A boolean indicating if the DragSource is in the same JVM as the DropTarget.
isLocal(Stub) - Static method in class javax.rmi.CORBA.Util
Returns true if the stub is in the same ORB instance as is the servant.
isLocal(Stub) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.isLocal(javax.rmi.CORBA.Stub).
isLocallyDefined(KeyStroke) - Method in interface javax.swing.text.Keymap
Determines if the given key sequence is locally defined.
isLocalTransfer() - Method in class java.awt.dnd.DropTargetDropEvent
This method returns an int indicating if the source is in the same JVM as the target.
isLocationInExpandControl(int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTreeUI
isLocationInExpandControl(TreePath, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns true if mouseX and mouseY fall in the area of row that is used to expand/collapse the node and the node at row does not represent a leaf.
isLowerCase(char) - Static method in class java.lang.Character
Determines if the specified character is a lowercase character.
isManagingFocus() - Method in class javax.swing.JComponent
Override this method and return true if your JComponent manages focus.
isManagingFocus() - Method in class javax.swing.JEditorPane
Turns off tab traversal once focus is gained.
isManagingFocus() - Method in class javax.swing.JTable
We override this method, whose implementation in JComponent returns false, to return true.
isManagingFocus() - Method in class javax.swing.JMenuBar
Returns true to indicate that this component manages focus events internally.
isManagingFocus() - Method in class javax.swing.JTextArea
Turns off tab traversal once focus gained.
ISMAP - Static variable in class javax.swing.text.html.HTML.Attribute
isMaximizable() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame can be maximized by some user action.
isMaximum - Variable in class javax.swing.JInternalFrame
The frame has been expanded to its maximum size.
isMaximum() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame is currently maximized.
isMaximumSizeSet() - Method in class javax.swing.JComponent
Returns true if the maximum size has been set to a non-null value otherwise returns false.
isMember(Principal) - Method in interface java.security.acl.Group
Returns true if the passed principal is a member of the group.
isMenuComponent(Component) - Method in class javax.swing.JMenu
Returns true if the specified component exists in the submenu hierarchy.
isMetaDown() - Method in class java.awt.event.InputEvent
Returns whether or not the Meta modifier is down on this event.
isMiddleMouseButton(MouseEvent) - Static method in class javax.swing.SwingUtilities
Returns true if the mouse event specifies the middle mouse button.
isMimeTypeEqual(DataFlavor) - Method in class java.awt.datatransfer.DataFlavor
Compare the mimeType of two DataFlavor objects no parameters are considered
isMimeTypeEqual(String) - Method in class java.awt.datatransfer.DataFlavor
Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor.
isMimeTypeSerializedObject() - Method in class java.awt.datatransfer.DataFlavor
does the DataFlavor represent a serialized object?
isMinimumSizeDirty - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
isMinimumSizeSet() - Method in class javax.swing.JComponent
Returns true if the minimum size has been set to a non-null value otherwise returns false.
isMixerSupported(Mixer.Info) - Method in class javax.sound.sampled.spi.MixerProvider
Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.
isModal() - Method in class java.awt.Dialog
Indicates whether the dialog is modal.
isMulticastAddress() - Method in class java.net.InetAddress
Utility routine to check if the InetAddress is an IP multicast address.
isMultipleMode() - Method in class java.awt.List
Determines whether this list allows multiple selections.
isMultiSelectEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returning true signifies a mouse event on the node should select from the anchor point.
isMultiSelectionEnabled() - Method in class javax.swing.JFileChooser
Returns true if multiple files can be selected.
isNaN() - Method in class java.lang.Float
Returns true if this Float value is Not-a-Number (NaN).
isNaN() - Method in class java.lang.Double
Returns true if this Double value is the special Not-a-Number (NaN) value.
isNaN(double) - Static method in class java.lang.Double
Returns true if the specified number is the special Not-a-Number (NaN) value.
isNaN(float) - Static method in class java.lang.Float
Returns true if the specified number is the special Not-a-Number (NaN) value.
isNative(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the native modifier.
isNativeLookAndFeel() - Method in class javax.swing.LookAndFeel
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
isNativeLookAndFeel() - Method in class javax.swing.plaf.metal.MetalLookAndFeel
isNativeLookAndFeel() - Method in class javax.swing.plaf.multi.MultiLookAndFeel
isNavigationKey(int) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Returns whether or not the supplied keyCode maps to a key that is used for navigation.
isNegative() - Method in interface java.security.acl.AclEntry
Returns true if this is a negative ACL entry (one denying the associated principal the set of permissions in the entry), false otherwise.
isNodeAncestor(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.
isNodeChild(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if aNode is a child of this node.
isNodeDescendant(DefaultMutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children.
isNodeRelated(DefaultMutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if and only if aNode is in the same tree as this node.
isNodeSibling(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if anotherNode is a sibling of (has the same parent as) this node.
isNullable(int) - Method in interface java.sql.ResultSetMetaData
Indicates the nullability of values in the designated column.
ISO_2A0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS 2A0, 1189 x 1682 mm.
ISO_4A0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS 4A0, 1682 x 2378 mm.
ISO_A0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A0, 841 x 1189 mm.
ISO_A1 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A1, 594 x 841 mm.
ISO_A10 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A10, 26 x 37 mm.
ISO_A2 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A2, 420 x 594 mm.
ISO_A3 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A3, 297 x 420 mm.
ISO_A4 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A4, 210 x 297 mm.
ISO_A5 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A5, 148 x 210 mm.
ISO_A6 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A6, 105 x 148 mm.
ISO_A7 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A7, 74 x 105 mm.
ISO_A8 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A8, 52 x 74 mm.
ISO_A9 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN & JIS A9, 37 x 52 mm.
ISO_B0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B0, 1000 x 1414 mm.
ISO_B1 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B1, 707 x 1000 mm.
ISO_B10 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B10, 31 x 44 mm.
ISO_B2 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B2, 500 x 707 mm.
ISO_B3 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B3, 353 x 500 mm.
ISO_B4 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B4, 250 x 353 mm.
ISO_B4_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B4.
ISO_B5 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B5, 176 x 250 mm.
ISO_B5_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_B5.
ISO_B6 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B6, 125 x 176 mm.
ISO_B7 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B7, 88 x 125 mm.
ISO_B8 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B8, 62 x 88 mm.
ISO_B9 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN B9, 44 x 62 mm.
ISO_C0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C0, 917 x 1297 mm.
ISO_C0_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C0.
ISO_C1 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C1, 648 x 917 mm.
ISO_C1_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C1.
ISO_C10 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C10, 28 x 40 mm.
ISO_C10_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C10.
ISO_C2 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C2, 458 x 648 mm.
ISO_C2_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C2.
ISO_C3 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C3, 324 x 458 mm.
ISO_C3_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C3.
ISO_C4 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C4, 229 x 324 mm.
ISO_C4_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C4.
ISO_C5 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C5, 162 x 229 mm.
ISO_C5_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C5.
ISO_C6 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C6, 114 x 162 mm.
ISO_C6_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C6.
ISO_C7 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C7, 81 x 114 mm.
ISO_C7_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C7.
ISO_C8 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C8, 57 x 81 mm.
ISO_C8_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C8.
ISO_C9 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO/DIN C9, 40 x 57 mm.
ISO_C9_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_C9.
ISO_DESIGNATED_LONG - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for ISO Designated Long, 110 x 220 mm.
ISO_DESIGNATED_LONG_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
An alias for ISO_DESIGNATED_LONG.
isOneTouchExpandable() - Method in class javax.swing.JSplitPane
Returns true if the pane provides a UI widget to collapse/expand the divider.
isOnKeyRelease() - Method in class javax.swing.KeyStroke
Returns true if this keystroke is active on key release.
isOpaque() - Method in class java.awt.Component
Returns true if this component is completely opaque, returns false by default.
isOpaque() - Method in class javax.swing.JComponent
Returns true if this component is completely opaque.
isOpaque() - Method in class javax.swing.JDesktopPane
Returns true to indicate that this component paints every pixel in its range.
isOpaque() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
isOpen() - Method in interface javax.sound.sampled.Line
Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be playing or capturing sound.
isOpen() - Method in interface javax.sound.midi.MidiDevice
Reports whether the device is open.
isOptimizedDrawingEnabled() - Method in class javax.swing.JComponent
Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap.
isOptimizedDrawingEnabled() - Method in class javax.swing.JViewport
The JViewport overrides the default implementation of this method (in JComponent) to return false.
isOptimizedDrawingEnabled() - Method in class javax.swing.JLayeredPane
Returns false if components in the pane can overlap, which makes optimized drawing impossible.
isOptimizedDrawingEnabled() - Method in class javax.swing.JRootPane
The GlassPane and ContentPane have the same bounds, which means JRootPane does not tiles its children and this should return false.
isOrdered() - Method in class javax.naming.directory.BasicAttribute
isOrdered() - Method in interface javax.naming.directory.Attribute
Determines whether this attribute's values are ordered.
isOwner(Principal) - Method in interface java.security.acl.Owner
Returns true if the given principal is an owner of the ACL.
isPaintable() - Method in interface java.beans.PropertyEditor
Determines whether this property editor is paintable.
isPaintable() - Method in class java.beans.PropertyEditorSupport
Determines whether the class will honor the painValue method.
isPaintingTile() - Method in class javax.swing.JComponent
Returns true if the receiving component is currently painting a tile.
isPalette - Variable in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
isParameter() - Method in class javax.swing.text.html.parser.Entity
Return true if it is a parameter entity.
isParseIntegerOnly() - Method in class java.text.NumberFormat
Returns true if this format will parse numbers as integers only.
isPathEditable(TreePath) - Method in class javax.swing.JTree
Returns isEditable.
isPathSelected(TreePath) - Method in class javax.swing.JTree
Returns true if the item identified by the path is currently selected.
isPathSelected(TreePath) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns true if the path, path, is in the current selection.
isPathSelected(TreePath) - Method in interface javax.swing.tree.TreeSelectionModel
Returns true if the path, path, is in the current selection.
isPlain() - Method in class java.awt.Font
Indicates whether or not this Font object's style is PLAIN.
isPolygonal() - Method in class java.awt.geom.Area
Tests whether this Area consists entirely of straight edged polygonal geometry.
isPopupMenuVisible() - Method in class javax.swing.JMenu
Returns true if the menu's popup window is visible.
isPopupTrigger() - Method in class java.awt.event.MouseEvent
Returns whether or not this mouse event is the popup-menu trigger event for the platform.
isPopupTrigger(MouseEvent) - Method in class javax.swing.JPopupMenu
Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
isPopupTrigger(MouseEvent) - Method in class javax.swing.plaf.PopupMenuUI
isPopupTrigger(MouseEvent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
isPopupVisible() - Method in class javax.swing.JComboBox
Determines the visibility of the popup.
isPopupVisible(JComboBox) - Method in class javax.swing.plaf.ComboBoxUI
Determine the visibility of the popup
isPopupVisible(JComboBox) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Tells if the popup is visible or not.
isPopupVisible(JComboBox) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call isPopupVisible on each UI handled by this MultiUI.
isPreferred() - Method in class java.beans.FeatureDescriptor
The "preferred" flag is used to identify features that are particularly important for presenting to humans.
isPreferredSizeSet() - Method in class javax.swing.JComponent
Returns true if the preferred size has been set to a non-null value otherwise returns false.
isPreformatted() - Method in class javax.swing.text.html.HTML.Tag
isPreformatted() - Method in class javax.swing.text.html.parser.TagElement
isPressed() - Method in interface javax.swing.ButtonModel
Indicates if button has been pressed.
isPressed() - Method in class javax.swing.DefaultButtonModel
Indicates if button has been pressed.
isPrimitive() - Method in class java.io.ObjectStreamField
Return true if this field has a primitive type.
isPrimitive() - Method in class java.lang.Class
Determines if the specified Class object represents a primitive type.
isPrivate(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the private modifier.
isProbablePrime(int) - Method in class java.math.BigInteger
Returns true if this BigInteger is probably prime, false if it's definitely composite.
isPropagated() - Method in class java.beans.beancontext.BeanContextEvent
Reports whether or not this event is propagated from some other BeanContext.
isProtected(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the protected modifier.
isProxyClass(Class) - Static method in class java.lang.reflect.Proxy
Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.
isPublic(int) - Static method in class java.lang.reflect.Modifier
Return true if the specified integer includes the public modifier.
isReadOnly() - Method in class java.security.PermissionCollection
Returns true if this PermissionCollection object is marked as readonly.
isReadOnly() - Method in interface java.sql.Connection
Tests to see if the connection is in read-only mode.
isReadOnly() - Method in interface java.sql.DatabaseMetaData
Is the database in read-only mode?
isReadOnly(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether the designated column is definitely not writable.
isRecording() - Method in interface javax.sound.midi.Sequencer
Indicates whether the Sequencer is currently recording.
isRectangleContainingRectangle(Rectangle, Rectangle) - Static method in class javax.swing.SwingUtilities
Return true if a contains b
isRectangular() - Method in class java.awt.geom.Area
Tests whether this Area is rectangular in shape.
isRelative() - Method in class javax.naming.NameClassPair
Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
isRepeats() - Method in class javax.swing.Timer
Returns true if the Timer will send a actionPerformed() message to its listeners multiple times.
isReplacing - Variable in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
isRepresentationClassInputStream() - Method in class java.awt.datatransfer.DataFlavor
does the DataFlavor represent a java.io.InputStream
isRepresentationClassRemote() - Method in class java.awt.datatransfer.DataFlavor
isRepresentationClassSerializable() - Method in class java.awt.datatransfer.DataFlavor
isRequestFocusEnabled() - Method in class javax.swing.JComponent
Returns whether the receiving component can obtain the focus by calling requestFocus.
isResizable - Variable in class javax.swing.table.TableColumn
If true, the user is allowed to resize the column; the default is true.
isResizable() - Method in class java.awt.Dialog
Indicates whether this dialog is resizable by the user.
isResizable() - Method in class java.awt.Frame
Indicates whether this frame is resizable by the user.
isResizable() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame can be resized by some user action.
isRevoked(Certificate) - Method in class java.security.cert.CRL
Checks whether the given certificate is on this CRL.
isRightMouseButton(MouseEvent) - Static method in class javax.swing.SwingUtilities
Returns true if the mouse event specifies the right mouse button.
isRollover() - Method in interface javax.swing.ButtonModel
Indicates that the mouse is over the button.
isRollover() - Method in class javax.swing.DefaultButtonModel
Indicates that the mouse is over the button.
isRolloverBorders() - Method in class javax.swing.plaf.metal.MetalToolBarUI
isRolloverEnabled() - Method in class javax.swing.AbstractButton
Checks whether rollover effects are enabled.
isRoot() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns true if this node is the root of the tree.
isRoot(File) - Method in class javax.swing.filechooser.FileSystemView
Determines if the given file is a root partition or drive.
isRootPaneCheckingEnabled() - Method in class javax.swing.JWindow
Returns whether calls to add and setLayout will cause an exception to be thrown.
isRootPaneCheckingEnabled() - Method in class javax.swing.JApplet
isRootPaneCheckingEnabled() - Method in class javax.swing.JInternalFrame
Returns whether calls to add and setLayout cause an exception to be thrown.
isRootPaneCheckingEnabled() - Method in class javax.swing.JFrame
Returns whether calls to add and setLayout cause an exception to be thrown.
isRootPaneCheckingEnabled() - Method in class javax.swing.JDialog
Returns true if the methods add and setLayout should be checked.
isRootVisible() - Method in class javax.swing.JTree
Returns true if the root node of the tree is displayed.
isRootVisible() - Method in class javax.swing.tree.AbstractLayoutCache
Returns true if the root node of the tree is displayed.
isRootVisible() - Method in class javax.swing.plaf.basic.BasicTreeUI
isRowSelected(int) - Method in class javax.swing.JTree
Returns true if the node identitifed by row is selected.
isRowSelected(int) - Method in class javax.swing.JTable
Returns true if the row at the specified index is selected.
isRowSelected(int) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns true if the row identitifed by row is selected.
isRowSelected(int) - Method in interface javax.swing.tree.TreeSelectionModel
Returns true if the row identitifed by row is selected.
isRunning() - Method in interface javax.sound.sampled.DataLine
Indicates whether the line is running.
isRunning() - Method in interface javax.sound.midi.Sequencer
Indicates whether the Sequencer is currently running.
isRunning() - Method in class javax.swing.Timer
Returns true if the Timer is running.
isSealed() - Method in class java.lang.Package
Returns true if this package is sealed.
isSealed(URL) - Method in class java.lang.Package
Returns true if this package is sealed with respect to the specified code source url.
isSearchable(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether the designated column can be used in a where clause.
isSelected - Variable in class javax.swing.JInternalFrame
The frame is currently selected.
isSelected - Variable in class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
isSelected() - Method in class java.awt.im.InputMethodHighlight
Returns whether the text range is selected.
isSelected() - Method in class javax.swing.DefaultSingleSelectionModel
isSelected() - Method in interface javax.swing.SingleSelectionModel
Returns true if the selection model currently has a selected value.
isSelected() - Method in class javax.swing.AbstractButton
Returns the state of the button.
isSelected() - Method in class javax.swing.JMenu
Returns true if the menu is currently selected (highlighted).
isSelected() - Method in interface javax.swing.ButtonModel
Indicates if the button has been selected.
isSelected() - Method in class javax.swing.DefaultButtonModel
Indicates if the button has been selected.
isSelected() - Method in class javax.swing.JInternalFrame
Returns whether the JInternalFrame is the currently "selected" or active frame.
isSelected() - Method in class javax.swing.JToggleButton.ToggleButtonModel
Checks if the button is selected.
isSelected() - Method in class javax.swing.JMenuBar
Returns true if the menu bar currently has a component selected.
isSelected() - Method in class javax.swing.text.html.Option
Fetches the selection state associated with this option.
isSelected(ButtonModel) - Method in class javax.swing.ButtonGroup
Returns the selected value for the button.
isSelected(int) - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by isIndexSelected(int).
isSelectedIndex(int) - Method in class javax.swing.DefaultListSelectionModel
isSelectedIndex(int) - Method in class javax.swing.JList
Returns true if the specified index is selected.
isSelectedIndex(int) - Method in interface javax.swing.ListSelectionModel
Returns true if the specified index is selected.
isSelectionEmpty() - Method in class javax.swing.DefaultListSelectionModel
isSelectionEmpty() - Method in class javax.swing.JList
Returns true if nothing is selected.
isSelectionEmpty() - Method in class javax.swing.JTree
Returns true if the selection is currently empty.
isSelectionEmpty() - Method in interface javax.swing.ListSelectionModel
Returns true if no indices are selected.
isSelectionEmpty() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns true if the selection is currently empty.
isSelectionEmpty() - Method in interface javax.swing.tree.TreeSelectionModel
Returns true if the selection is currently empty.
isSelectionVisible() - Method in class javax.swing.text.DefaultCaret
Checks whether the current selection is visible.
isSelectionVisible() - Method in interface javax.swing.text.Caret
Determines if the selection is currently visible.
isSerializing() - Method in class java.beans.beancontext.BeanContextSupport
Is this BeanContext in the process of being serialized?
isServiceClass(Class) - Method in class java.beans.beancontext.BeanContextServiceRevokedEvent
Checks this event to determine whether or not the service being revoked is of a particular class.
isSet - Variable in class java.util.Calendar
The flags which tell if a specified time field for the calendar is set.
isSet(int) - Method in class java.util.Calendar
Determines if the given time field has a value set.
isShiftDown() - Method in class java.awt.event.InputEvent
Returns whether or not the Shift modifier is down on this event.
isShowing() - Method in class java.awt.Component
Determines whether this component is showing on screen.
isShowing() - Method in class java.awt.Component.AccessibleAWTComponent
Determine if the object is showing.
isShowing() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Determine if the object is showing.
isShowing() - Method in class java.awt.Window
Checks if this Window is showing on screen.
isShowing() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Determine if the object is showing.
isShowing() - Method in interface javax.accessibility.AccessibleComponent
Determines if the object is showing.
isShowing() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
isShowing() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
isShowing() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Determines if the object is showing.
isShowing() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
isSigned(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether values in the designated column are signed numbers.
isSignificant() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
DefaultDocument events are significant.
isSignificant() - Method in class javax.swing.undo.AbstractUndoableEdit
This default implementation returns true.
isSignificant() - Method in class javax.swing.undo.CompoundEdit
Returns true if any of the UndoableEdits in edits do.
isSignificant() - Method in interface javax.swing.undo.UndoableEdit
Return false if this edit is insignificant--for example one that maintains the user's selection, but does not change any model state.
isSingular() - Method in class java.awt.geom.Area
Tests whether this Area is comprised of a single closed subpath.
isSoundbankSupported(Soundbank) - Method in interface javax.sound.midi.Synthesizer
Informs the caller whether this synthesizer is capable of loading instruments from the specified soundbank.
isSource() - Method in class javax.sound.sampled.Port.Info
Indicates whether the port is a source or a target for its mixer.
isSourceEncodingSupported(AudioFormat.Encoding) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Indicates whether the format converter supports conversion from the specified source format encoding.
isSpace(char) - Static method in class java.lang.Character
Deprecated. Replaced by isWhitespace(char).
isSpaceChar(char) - Static method in class java.lang.Character
Determines if the specified character is a Unicode space character.
isStandard() - Method in class java.awt.font.GlyphMetrics
Returns true if this is a standard glyph.
isStatic(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the static modifier.
isStrict(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the strictfp modifier.
isStrikeThrough() - Method in class javax.swing.text.GlyphView
Determine if the glyphs should have a strikethrough line.
isStrikeThrough() - Method in class javax.swing.text.LabelView
Determine if the glyphs should have a strikethrough line.
isStrikeThrough(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the strikethrough attribute is set.
isStringPainted() - Method in class javax.swing.JProgressBar
Returns true if the progress bar will render a string onto the representation of the progress bar.
isSubscript() - Method in class javax.swing.text.GlyphView
Determine if the glyphs should be rendered as superscript.
isSubscript() - Method in class javax.swing.text.LabelView
Determine if the glyphs should be rendered as superscript.
isSubscript(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the subscript attribute is set.
isSuperscript() - Method in class javax.swing.text.GlyphView
Determine if the glyphs should be rendered as subscript.
isSuperscript() - Method in class javax.swing.text.LabelView
Determine if the glyphs should be rendered as subscript.
isSuperscript(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the superscript attribute is set.
isSupportedLookAndFeel() - Method in class javax.swing.LookAndFeel
Return true if the underlying platform supports and or permits this look and feel.
isSupportedLookAndFeel() - Method in class javax.swing.plaf.metal.MetalLookAndFeel
isSupportedLookAndFeel() - Method in class javax.swing.plaf.multi.MultiLookAndFeel
isSynchronizationSupported(Line[], boolean) - Method in interface javax.sound.sampled.Mixer
Reports whether this mixer supports synchronization of the specified set of lines.
isSynchronized(int) - Static method in class java.lang.reflect.Modifier
Return true if the specified integer includes the synchronized modifier.
isTargetEncodingSupported(AudioFormat.Encoding) - Method in class javax.sound.sampled.spi.FormatConversionProvider
Indicates whether the format converter supports conversion to the specified target format encoding.
isTearOff() - Method in class java.awt.Menu
Indicates whether this menu is a tear-off menu.
isTearOff() - Method in class javax.swing.JMenu
Returns true if the menu can be torn off.
isTemporary() - Method in class java.awt.event.FocusEvent
Identifies the focus change event as temporary or permanent.
isText(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Returns true if the element is a text element.
isTileWritable(int, int) - Method in class java.awt.image.BufferedImage
Returns whether or not a tile is currently checked out for writing.
isTileWritable(int, int) - Method in interface java.awt.image.WritableRenderedImage
Returns whether a tile is currently checked out for writing.
isTimeSet - Variable in class java.util.Calendar
True if then the value of time is valid.
isTitleCase(char) - Static method in class java.lang.Character
Determines if the specified character is a titlecase character.
isToggleEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returning true indicates the row under the mouse should be toggled based on the event.
isToggleSelectionEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returning true signifies a mouse event on the node should toggle the selection of only the row under mouse.
isTopLevelMenu() - Method in class javax.swing.JMenu
Returns true if the menu is a 'top-level menu', that is, if it is the direct child of a menubar.
isTransient(int) - Static method in class java.lang.reflect.Modifier
Return true if the specifier integer includes the transient modifier.
isTraversable(File) - Method in class javax.swing.JFileChooser
Returns true if the file (directory) can be visited.
isTraversable(File) - Method in class javax.swing.filechooser.FileView
Whether the directory is traversable or not.
isTraversable(File) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
IstringHelper - class org.omg.CosNaming.IstringHelper.
isUnderline() - Method in class javax.swing.text.GlyphView
Determine if the glyphs should be underlined.
isUnderline() - Method in class javax.swing.text.LabelView
Determine if the glyphs should be underlined.
isUnderline(AttributeSet) - Static method in class javax.swing.text.StyleConstants
Checks whether the underline attribute is set.
isUnicast() - Method in class java.beans.EventSetDescriptor
Normally event sources are multicast.
isUnicodeIdentifierPart(char) - Static method in class java.lang.Character
Determines if the specified character may be part of a Unicode identifier as other than the first character.
isUnicodeIdentifierStart(char) - Static method in class java.lang.Character
Determines if the specified character is permissible as the first character in a Unicode identifier.
isUnique() - Static method in class java.rmi.dgc.VMID
Deprecated.
isUpperCase(char) - Static method in class java.lang.Character
Determines if the specified character is an uppercase character.
isValid() - Method in class java.awt.Component
Determines whether this component is valid.
isValid() - Method in class java.awt.image.IndexColorModel
Returns whether or not all of the pixels are valid.
isValid() - Method in class javax.accessibility.AccessibleHyperlink
Since the document a link is associated with may have changed, this method returns whether or not this Link is still valid (with respect to the document it references).
isValid() - Method in class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Since the document a link is associated with may have changed, this method returns whether this Link is valid anymore (with respect to the document it references).
isValid() - Method in class javax.swing.text.html.HTMLDocument.Iterator
Indicates if the iterator is currently representing an occurence of a tag.
isValid() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Returns true if the dragging session is valid.
isValid(int) - Method in class java.awt.image.IndexColorModel
Returns whether or not the pixel is valid.
isValidateRoot() - Method in class javax.swing.JComponent
If this method returns true, revalidate() calls by descendants of this component will cause the entire tree beginning with this root to be validated.
isValidateRoot() - Method in class javax.swing.JTextField
Calls to revalidate that come from within the textfield itself will be handled by validating the textfield, unless the receiver is contained within a JViewport, in which case this returns false.
isValidateRoot() - Method in class javax.swing.JSplitPane
Returns true, so that calls to revalidate on any descendant of this JSplitPane will cause a request to be queued that will validate the JSplitPane and all its descendants.
isValidateRoot() - Method in class javax.swing.JScrollPane
Calls revalidate on any descendant of this JScrollPane.
isValidateRoot() - Method in class javax.swing.JRootPane
If a descendant of this JRootPane calls revalidate, validate from here on down.
isVertical() - Method in class java.awt.font.TextLayout
Returns true if this TextLayout is vertical.
isViewSizeSet - Variable in class javax.swing.JViewport
True when the viewport dimensions have been determined.
isVisible() - Method in class java.awt.Component
Determines whether this component should be visible when its parent is visible.
isVisible() - Method in class java.awt.Component.AccessibleAWTComponent
Determine if the object is visible.
isVisible() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Determine if the object is visible.
isVisible() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Determine if the object is visible.
isVisible() - Method in interface javax.accessibility.AccessibleComponent
Determines if the object is visible.
isVisible() - Method in class javax.swing.JPopupMenu
Returns true if the popup menu is visible (currently being displayed).
isVisible() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
isVisible() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
isVisible() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Determines if this object is visible.
isVisible() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
isVisible() - Method in class javax.swing.text.View
Returns a boolean that indicates whether the view is visible or not.
isVisible() - Method in class javax.swing.text.DefaultCaret
Determines if the caret is currently visible.
isVisible() - Method in interface javax.swing.text.Caret
Determines if the caret is currently visible.
isVisible() - Method in class javax.swing.text.html.ParagraphView
Indicates whether or not this view should be displayed.
isVisible() - Method in interface javax.swing.plaf.basic.ComboPopup
Returns whether or not the popup is visible
isVisible(TreePath) - Method in class javax.swing.JTree
Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.
isVolatile(int) - Static method in class java.lang.reflect.Modifier
Return true if the specified integer includes the volatile modifier.
isWhitespace() - Method in class java.awt.font.GlyphMetrics
Returns true if this is a whitespace glyph.
isWhitespace(char) - Static method in class java.lang.Character
Determines if the specified character is white space according to Java.
isWritable(int) - Method in interface java.sql.ResultSetMetaData
Indicates whether it is possible for a write on the designated column to succeed.
isZoneLoaded(View) - Method in class javax.swing.text.ZoneView
Determine if a zone is in the loaded state.
ITALIAN - Static variable in class java.util.Locale
Useful constant for language.
Italic - Static variable in class javax.swing.text.StyleConstants
Name of the italic attribute.
Italic - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the italic attribute.
Italic - Static variable in class javax.swing.text.StyleConstants.FontConstants
Name of the italic attribute.
ITALIC - Static variable in class java.awt.Font
The italicized style constant.
ITALIC_ACTION - Static variable in class javax.swing.text.html.HTMLEditorKit
The italic action identifier
ITALY - Static variable in class java.awt.PageAttributes.MediaType
An alias for ITALY_ENVELOPE.
ITALY - Static variable in class java.util.Locale
Useful constant for country.
ITALY_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Italy Envelope, 110 x 230 mm.
ITEM_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting item events.
ITEM_FIRST - Static variable in class java.awt.event.ItemEvent
The first number in the range of ids used for item events.
ITEM_LAST - Static variable in class java.awt.event.ItemEvent
The last number in the range of ids used for item events.
ITEM_STATE_CHANGED - Static variable in class java.awt.event.ItemEvent
This event id indicates that an item's state changed.
item(int) - Method in class org.omg.CORBA.ContextList
Returns the String object at the given index.
item(int) - Method in class org.omg.CORBA.ExceptionList
Returns the TypeCode object at the given index.
item(int) - Method in class org.omg.CORBA.NVList
Retrieves the NamedValue object at the given index.
ItemEvent - class java.awt.event.ItemEvent.
A semantic event which indicates that an item was selected or deselected.
ItemEvent(ItemSelectable, int, Object, int) - Constructor for class java.awt.event.ItemEvent
Constructs an ItemEvent object.
itemListener - Variable in class javax.swing.AbstractButton
The button model's ItemListener.
itemListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
itemListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
ItemListener - interface java.awt.event.ItemListener.
The listener interface for receiving item events.
ItemSelectable - interface java.awt.ItemSelectable.
The interface for objects which contain a set of items for which zero or more can be selected.
itemStateChanged(ItemEvent) - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Fire accessible property change events when the state of the toggle button changes.
itemStateChanged(ItemEvent) - Method in class java.awt.AWTEventMulticaster
Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
itemStateChanged(ItemEvent) - Method in class java.awt.List.AccessibleAWTList
itemStateChanged(ItemEvent) - Method in interface java.awt.event.ItemListener
Invoked when an item has been selected or deselected.
itemStateChanged(ItemEvent) - Method in class javax.swing.JToggleButton.AccessibleJToggleButton
Fire accessible property change events when the state of the toggle button changes.
itemStateChanged(ItemEvent) - Method in class javax.swing.DefaultCellEditor.EditorDelegate
itemStateChanged(ItemEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ItemHandler
itemStateChanged(ItemEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler
Iterator - interface java.util.Iterator.
An iterator over a collection.
iterator() - Method in class java.awt.dnd.DragGestureEvent
This method returns an Iterator for the events comprising the gesture.
iterator() - Method in class java.beans.beancontext.BeanContextMembershipEvent
Gets the array of children affected by this event.
iterator() - Method in class java.beans.beancontext.BeanContextSupport
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
iterator() - Method in class java.util.AbstractCollection
Returns an iterator over the elements contained in this collection.
iterator() - Method in class java.util.TreeSet
Returns an iterator over the elements in this set.
iterator() - Method in class java.util.AbstractList
Returns an iterator over the elements in this list in proper sequence.
iterator() - Method in interface java.util.Collection
Returns an iterator over the elements in this collection.
iterator() - Method in class java.util.AbstractSequentialList
Returns an iterator over the elements in this list (in proper sequence).
iterator() - Method in class java.util.HashSet
Returns an iterator over the elements in this set.
iterator() - Method in interface java.util.Set
Returns an iterator over the elements in this set.
iterator() - Method in interface java.util.List
Returns an iterator over the elements in this list in proper sequence.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


J-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

J

JANUARY - Static variable in class java.util.Calendar
Value of the MONTH field indicating the first month of the year.
JAPAN - Static variable in class java.util.Locale
Useful constant for country.
JAPANESE - Static variable in class java.util.Locale
Useful constant for language.
JApplet - class javax.swing.JApplet.
An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
JApplet.AccessibleJApplet - class javax.swing.JApplet.AccessibleJApplet.
This class implements accessibility support for the JApplet class.
JApplet.AccessibleJApplet(JApplet) - Constructor for class javax.swing.JApplet.AccessibleJApplet
JApplet() - Constructor for class javax.swing.JApplet
Creates a swing applet instance.
JarEntry - class java.util.jar.JarEntry.
This class is used to represent a JAR file entry.
JarEntry(JarEntry) - Constructor for class java.util.jar.JarEntry
Creates a new JarEntry with fields taken from the specified JarEntry object.
JarEntry(String) - Constructor for class java.util.jar.JarEntry
Creates a new JarEntry for the specified JAR file entry name.
JarEntry(ZipEntry) - Constructor for class java.util.jar.JarEntry
Creates a new JarEntry with fields taken from the specified ZipEntry object.
JarException - exception java.util.jar.JarException.
Signals that an error of some sort has occurred while reading from or writing to a JAR file.
JarException() - Constructor for class java.util.jar.JarException
Constructs a JarException with no detail message.
JarException(String) - Constructor for class java.util.jar.JarException
Constructs a JarException with the specified detail message.
JarFile - class java.util.jar.JarFile.
The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile.
JarFile(File) - Constructor for class java.util.jar.JarFile
Creates a new JarFile to read from the specified File object.
JarFile(File, boolean) - Constructor for class java.util.jar.JarFile
Creates a new JarFile to read from the specified File object.
JarFile(File, boolean, int) - Constructor for class java.util.jar.JarFile
Creates a new JarFile to read from the specified File object in the specified mode.
JarFile(String) - Constructor for class java.util.jar.JarFile
Creates a new JarFile to read from the specified file name.
JarFile(String, boolean) - Constructor for class java.util.jar.JarFile
Creates a new JarFile to read from the specified file name.
jarFileURLConnection - Variable in class java.net.JarURLConnection
The connection to the JAR file URL, if the connection has been initiated.
JarInputStream - class java.util.jar.JarInputStream.
The JarInputStream class is used to read the contents of a JAR file from any input stream.
JarInputStream(InputStream) - Constructor for class java.util.jar.JarInputStream
Creates a new JarInputStream and reads the optional manifest.
JarInputStream(InputStream, boolean) - Constructor for class java.util.jar.JarInputStream
Creates a new JarInputStream and reads the optional manifest.
JarOutputStream - class java.util.jar.JarOutputStream.
The JarOutputStream class is used to write the contents of a JAR file to any output stream.
JarOutputStream(OutputStream) - Constructor for class java.util.jar.JarOutputStream
Creates a new JarOutputStream with no manifest.
JarOutputStream(OutputStream, Manifest) - Constructor for class java.util.jar.JarOutputStream
Creates a new JarOutputStream with the specified Manifest.
JarURLConnection - class java.net.JarURLConnection.
A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
JarURLConnection(URL) - Constructor for class java.net.JarURLConnection
Creates the new JarURLConnection to the specified URL.
JAVA_OBJECT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
java.applet - package java.applet
Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt - package java.awt
Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color - package java.awt.color
Provides classes for color spaces.
java.awt.datatransfer - package java.awt.datatransfer
Provides interfaces and classes for transferring data between and within applications.
java.awt.dnd - package 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.
java.awt.event - package java.awt.event
Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font - package java.awt.font
Provides classes and interface relating to fonts.
java.awt.geom - package java.awt.geom
Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im - package java.awt.im
Provides classes and interfaces for the input method framework.
java.awt.im.spi - package java.awt.im.spi
Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image - package java.awt.image
Provides classes for creating and modifying images.
java.awt.image.renderable - package java.awt.image.renderable
Provides classes and interfaces for producing rendering-independent images.
java.awt.print - package java.awt.print
Provides classes and interfaces for a general printing API.
java.beans - package java.beans
Contains classes related to Java Beans development.
java.beans.beancontext - package java.beans.beancontext
Provides classes and interfaces relating to bean context.
java.io - package java.io
Provides for system input and output through data streams, serialization and the file system.
java.lang - package java.lang
Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref - package java.lang.ref
Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
java.lang.reflect - package java.lang.reflect
Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math - package java.math
Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net - package java.net
Provides the classes for implementing networking applications.
java.rmi - package java.rmi
Provides the RMI package.
java.rmi.activation - package java.rmi.activation
Provides support for RMI Object Activation.
java.rmi.dgc - package java.rmi.dgc
Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry - package java.rmi.registry
Provides a class and two interfaces for the RMI registry.
java.rmi.server - package java.rmi.server
Provides classes and interfaces for supporting the server side of RMI.
java.security - package java.security
Provides the classes and interfaces for the security framework.
java.security.acl - package java.security.acl
The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert - package java.security.cert
Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces - package java.security.interfaces
Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec - package java.security.spec
Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql - package java.sql
Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text - package java.text
Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util - package java.util
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar - package java.util.jar
Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip - package java.util.zip
Provides classes for reading and writing the standard ZIP and GZIP file formats.
javaFileListFlavor - Static variable in class java.awt.datatransfer.DataFlavor
To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used.
javaJVMLocalObjectMimeType - Static variable in class java.awt.datatransfer.DataFlavor
to transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type, across a Transferable interface WITHIN THE SAME JVM, a DataFlavor with this type/subtype is used, with a representationClass equal to the type of the class/interface being passed across the Transferble.
javaRemoteObjectMimeType - Static variable in class java.awt.datatransfer.DataFlavor
In order to pass a live link to a Remote object via a Drag and Drop ACTION_LINK operation a Mime Content Type of application/x-java-remote-object should be used, where the representation class of the DataFlavor represents the type of the Remote interface to be transferred.
javaSerializedObjectMimeType - Static variable in class java.awt.datatransfer.DataFlavor
a MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent.
javax.accessibility - package javax.accessibility
Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming - package javax.naming
Provides the classes and interfaces for accessing naming services.
javax.naming.directory - package javax.naming.directory
Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event - package javax.naming.event
Provides support for event notification when accessing naming and directory services.
javax.naming.ldap - package javax.naming.ldap
Provides support for LDAPv3 extended operations and controls.
javax.naming.spi - package javax.naming.spi
Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi - package javax.rmi
Contains user APIs for RMI-IIOP.
javax.rmi.CORBA - package javax.rmi.CORBA
Contains portability APIs for RMI-IIOP.
javax.sound.midi - package javax.sound.midi
Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi - package javax.sound.midi.spi
Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled - package javax.sound.sampled
Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi - package javax.sound.sampled.spi
Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing - package javax.swing
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border - package javax.swing.border
Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser - package javax.swing.colorchooser
Contains classes and interfaces used by the JColorChooser component.
javax.swing.event - package javax.swing.event
Provides for events fired by Swing components.
javax.swing.filechooser - package javax.swing.filechooser
Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf - package javax.swing.plaf
Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic - package javax.swing.plaf.basic
Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal - package javax.swing.plaf.metal
Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi - package javax.swing.plaf.multi
The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table - package javax.swing.table
Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text - package javax.swing.text
Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html - package javax.swing.text.html
Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser - package javax.swing.text.html.parser
Provides the default HTML parser, along with support classes.
javax.swing.text.rtf - package javax.swing.text.rtf
Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree - package javax.swing.tree
Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo - package javax.swing.undo
Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction - package javax.transaction
Contains three exceptions thrown by the ORB machinery during unmarshalling.
JButton - class javax.swing.JButton.
An implementation of a "push" button.
JButton.AccessibleJButton - class javax.swing.JButton.AccessibleJButton.
This class implements accessibility support for the JButton class.
JButton.AccessibleJButton(JButton) - Constructor for class javax.swing.JButton.AccessibleJButton
JButton() - Constructor for class javax.swing.JButton
Creates a button with no set text or icon.
JButton(Action) - Constructor for class javax.swing.JButton
Creates a button where properties are taken from the Action supplied.
JButton(Icon) - Constructor for class javax.swing.JButton
Creates a button with an icon.
JButton(String) - Constructor for class javax.swing.JButton
Creates a button with text.
JButton(String, Icon) - Constructor for class javax.swing.JButton
Creates a button with initial text and an icon.
JCheckBox - class javax.swing.JCheckBox.
An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
JCheckBox.AccessibleJCheckBox - class javax.swing.JCheckBox.AccessibleJCheckBox.
This class implements accessibility support for the JCheckBox class.
JCheckBox.AccessibleJCheckBox(JCheckBox) - Constructor for class javax.swing.JCheckBox.AccessibleJCheckBox
JCheckBox() - Constructor for class javax.swing.JCheckBox
Creates an initially unselected check box button with no text, no icon.
JCheckBox(Action) - Constructor for class javax.swing.JCheckBox
Creates a check box where properties are taken from the Action supplied.
JCheckBox(Icon) - Constructor for class javax.swing.JCheckBox
Creates an initially unselected check box with an icon.
JCheckBox(Icon, boolean) - Constructor for class javax.swing.JCheckBox
Creates a check box with an icon and specifies whether or not it is initially selected.
JCheckBox(String) - Constructor for class javax.swing.JCheckBox
Creates an initially unselected check box with text.
JCheckBox(String, boolean) - Constructor for class javax.swing.JCheckBox
Creates a check box with text and specifies whether or not it is initially selected.
JCheckBox(String, Icon) - Constructor for class javax.swing.JCheckBox
Creates an initially unselected check box with the specified text and icon.
JCheckBox(String, Icon, boolean) - Constructor for class javax.swing.JCheckBox
Creates a check box with text and icon, and specifies whether or not it is initially selected.
JCheckBoxMenuItem - class javax.swing.JCheckBoxMenuItem.
A menu item that can be selected or deselected.
JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem - class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem.
This class implements accessibility support for the JCheckBoxMenuItem class.
JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem(JCheckBoxMenuItem) - Constructor for class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
JCheckBoxMenuItem() - Constructor for class javax.swing.JCheckBoxMenuItem
Creates an initially unselected check box menu item with no set text or icon.
JCheckBoxMenuItem(Action) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates a menu item whose properties are taken from the Action supplied.
JCheckBoxMenuItem(Icon) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates an initially unselected check box menu item with an icon.
JCheckBoxMenuItem(String) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates an initially unselected check box menu item with text.
JCheckBoxMenuItem(String, boolean) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates a check box menu item with the specified text and selection state.
JCheckBoxMenuItem(String, Icon) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(String, Icon, boolean) - Constructor for class javax.swing.JCheckBoxMenuItem
Creates a check box menu item with the specified text, icon, and selection state.
JColorChooser - class javax.swing.JColorChooser.
JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
JColorChooser.AccessibleJColorChooser - class javax.swing.JColorChooser.AccessibleJColorChooser.
This class implements accessibility support for the JColorChooser class.
JColorChooser.AccessibleJColorChooser(JColorChooser) - Constructor for class javax.swing.JColorChooser.AccessibleJColorChooser
JColorChooser() - Constructor for class javax.swing.JColorChooser
Creates a color chooser pane with an initial color of white.
JColorChooser(Color) - Constructor for class javax.swing.JColorChooser
Creates a color chooser pane with the specified initial color.
JColorChooser(ColorSelectionModel) - Constructor for class javax.swing.JColorChooser
Creates a color chooser pane with the specified ColorSelectionModel.
JComboBox - class javax.swing.JComboBox.
A component that combines a button or text field and a drop-down list.
JComboBox.AccessibleJComboBox - class javax.swing.JComboBox.AccessibleJComboBox.
This class implements accessibility support for the JComboBox class.
JComboBox.AccessibleJComboBox(JComboBox) - Constructor for class javax.swing.JComboBox.AccessibleJComboBox
JComboBox.KeySelectionManager - interface javax.swing.JComboBox.KeySelectionManager.
The interface that defines a KeySelectionManager.
JComboBox() - Constructor for class javax.swing.JComboBox
Creates a JComboBox with a default data model.
JComboBox(ComboBoxModel) - Constructor for class javax.swing.JComboBox
Creates a JComboBox that takes it's items from an existing ComboBoxModel.
JComboBox(Object[]) - Constructor for class javax.swing.JComboBox
Creates a JComboBox that contains the elements in the specified array.
JComboBox(Vector) - Constructor for class javax.swing.JComboBox
Creates a JComboBox that contains the elements in the specified Vector.
JComponent - class javax.swing.JComponent.
The base class for all Swing components except top-level containers.
JComponent.AccessibleJComponent - class javax.swing.JComponent.AccessibleJComponent.
Inner class of JComponent used to provide default support for accessibility.
JComponent.AccessibleJComponent.AccessibleContainerHandler - class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler.
Fire PropertyChange listener, if one is registered, when children added/removed.
JComponent.AccessibleJComponent.AccessibleContainerHandler(JComponent.AccessibleJComponent) - Constructor for class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler
JComponent.AccessibleJComponent.AccessibleFocusHandler - class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler.
Fire PropertyChange listener, if one is registered, when focus events happen
JComponent.AccessibleJComponent.AccessibleFocusHandler(JComponent.AccessibleJComponent) - Constructor for class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler
JComponent.AccessibleJComponent(JComponent) - Constructor for class javax.swing.JComponent.AccessibleJComponent
Though the class is abstract, this should be called by all sub-classes.
JComponent() - Constructor for class javax.swing.JComponent
Default JComponent constructor.
jdbcCompliant() - Method in interface java.sql.Driver
Reports whether this driver is a genuine JDBC COMPLIANTTM driver.
JDesktopPane - class javax.swing.JDesktopPane.
A container used to create a multiple-document interface or a virtual desktop.
JDesktopPane.AccessibleJDesktopPane - class javax.swing.JDesktopPane.AccessibleJDesktopPane.
This class implements accessibility support for the JDesktopPane class.
JDesktopPane.AccessibleJDesktopPane(JDesktopPane) - Constructor for class javax.swing.JDesktopPane.AccessibleJDesktopPane
JDesktopPane() - Constructor for class javax.swing.JDesktopPane
Creates a new JDesktopPane.
JDialog - class javax.swing.JDialog.
The main class for creating a dialog window.
JDialog.AccessibleJDialog - class javax.swing.JDialog.AccessibleJDialog.
This class implements accessibility support for the JDialog class.
JDialog.AccessibleJDialog(JDialog) - Constructor for class javax.swing.JDialog.AccessibleJDialog
JDialog() - Constructor for class javax.swing.JDialog
Creates a non-modal dialog without a title and without a specified Frame owner.
JDialog(Dialog) - Constructor for class javax.swing.JDialog
Creates a non-modal dialog without a title with the specifed Dialog as its owner.
JDialog(Dialog, boolean) - Constructor for class javax.swing.JDialog
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
JDialog(Dialog, String) - Constructor for class javax.swing.JDialog
Creates a non-modal dialog with the specified title and with the specified owner dialog.
JDialog(Dialog, String, boolean) - Constructor for class javax.swing.JDialog
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
JDialog(Frame) - Constructor for class javax.swing.JDialog
Creates a non-modal dialog without a title with the specifed Frame as its owner.
JDialog(Frame, boolean) - Constructor for class javax.swing.JDialog
Creates a modal or non-modal dialog without a title and with the specified owner Frame.
JDialog(Frame, String) - Constructor for class javax.swing.JDialog
Creates a non-modal dialog with the specified title and with the specified owner frame.
JDialog(Frame, String, boolean) - Constructor for class javax.swing.JDialog
Creates a modal or non-modal dialog with the specified title and the specified owner Frame.
JEditorPane - class javax.swing.JEditorPane.
A text component to edit various kinds of content.
JEditorPane.AccessibleJEditorPane - class javax.swing.JEditorPane.AccessibleJEditorPane.
This class implements accessibility support for the JEditorPane class.
JEditorPane.AccessibleJEditorPane(JEditorPane) - Constructor for class javax.swing.JEditorPane.AccessibleJEditorPane
JEditorPane.AccessibleJEditorPaneHTML - class javax.swing.JEditorPane.AccessibleJEditorPaneHTML.
This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
JEditorPane.AccessibleJEditorPaneHTML(JEditorPane) - Constructor for class javax.swing.JEditorPane.AccessibleJEditorPaneHTML
JEditorPane.JEditorPaneAccessibleHypertextSupport - class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.
What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink - class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(JEditorPane.JEditorPaneAccessibleHypertextSupport, Element) - Constructor for class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
JEditorPane.JEditorPaneAccessibleHypertextSupport(JEditorPane) - Constructor for class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
Make one of these puppies
JEditorPane() - Constructor for class javax.swing.JEditorPane
Creates a new JEditorPane.
JEditorPane(String) - Constructor for class javax.swing.JEditorPane
Creates a JEditorPane based on a string containing a URL specification.
JEditorPane(String, String) - Constructor for class javax.swing.JEditorPane
Creates a JEditorPane that has been initialized to the given text.
JEditorPane(URL) - Constructor for class javax.swing.JEditorPane
Creates a JEditorPane based on a specified URL for input.
JFileChooser - class javax.swing.JFileChooser.
JFileChooser provides a simple mechanism for the user to choose a file.
JFileChooser.AccessibleJFileChooser - class javax.swing.JFileChooser.AccessibleJFileChooser.
This class implements accessibility support for the JFileChooser class.
JFileChooser.AccessibleJFileChooser(JFileChooser) - Constructor for class javax.swing.JFileChooser.AccessibleJFileChooser
JFileChooser() - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser pointing to the user's home directory.
JFileChooser(File) - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser using the given File as the path.
JFileChooser(File, FileSystemView) - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser using the given current directory and FileSystemView.
JFileChooser(FileSystemView) - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser using the given FileSystemView.
JFileChooser(String) - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser using the given path.
JFileChooser(String, FileSystemView) - Constructor for class javax.swing.JFileChooser
Constructs a JFileChooser using the given current directory path and FileSystemView.
JFrame - class javax.swing.JFrame.
An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
JFrame.AccessibleJFrame - class javax.swing.JFrame.AccessibleJFrame.
This class implements accessibility support for the JFrame class.
JFrame.AccessibleJFrame(JFrame) - Constructor for class javax.swing.JFrame.AccessibleJFrame
JFrame() - Constructor for class javax.swing.JFrame
Constructs a new frame that is initially invisible.
JFrame(GraphicsConfiguration) - Constructor for class javax.swing.JFrame
Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.
JFrame(String) - Constructor for class javax.swing.JFrame
Creates a new, initially invisible Frame with the specified title.
JFrame(String, GraphicsConfiguration) - Constructor for class javax.swing.JFrame
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.
JInternalFrame - class javax.swing.JInternalFrame.
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
JInternalFrame.AccessibleJInternalFrame - class javax.swing.JInternalFrame.AccessibleJInternalFrame.
This class implements accessibility support for the JInternalFrame class.
JInternalFrame.AccessibleJInternalFrame(JInternalFrame) - Constructor for class javax.swing.JInternalFrame.AccessibleJInternalFrame
JInternalFrame.JDesktopIcon - class javax.swing.JInternalFrame.JDesktopIcon.
This component represents an iconified version of a JInternalFrame.
JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon - class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.
This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon(JInternalFrame.JDesktopIcon) - Constructor for class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
JInternalFrame.JDesktopIcon(JInternalFrame) - Constructor for class javax.swing.JInternalFrame.JDesktopIcon
Create an icon for an internal frame
JInternalFrame() - Constructor for class javax.swing.JInternalFrame
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.
JInternalFrame(String) - Constructor for class javax.swing.JInternalFrame
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
JInternalFrame(String, boolean) - Constructor for class javax.swing.JInternalFrame
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.
JInternalFrame(String, boolean, boolean) - Constructor for class javax.swing.JInternalFrame
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.
JInternalFrame(String, boolean, boolean, boolean) - Constructor for class javax.swing.JInternalFrame
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.
JInternalFrame(String, boolean, boolean, boolean, boolean) - Constructor for class javax.swing.JInternalFrame
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified.
JIS_B0 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B0, 1030 x 1456 mm.
JIS_B1 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B1, 728 x 1030 mm.
JIS_B10 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B10, 32 x 45 mm.
JIS_B2 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B2, 515 x 728 mm.
JIS_B3 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B3, 364 x 515 mm.
JIS_B4 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B4, 257 x 364 mm.
JIS_B5 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B5, 182 x 257 mm.
JIS_B6 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B6, 128 x 182 mm.
JIS_B7 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B7, 91 x 128 mm.
JIS_B8 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B8, 64 x 91 mm.
JIS_B9 - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for JIS B9, 45 x 64 mm.
JLabel - class javax.swing.JLabel.
A display area for a short text string or an image, or both.
JLabel.AccessibleJLabel - class javax.swing.JLabel.AccessibleJLabel.
The class used to obtain the accessible role for this object.
JLabel.AccessibleJLabel(JLabel) - Constructor for class javax.swing.JLabel.AccessibleJLabel
JLabel() - Constructor for class javax.swing.JLabel
Creates a JLabel instance with no image and with an empty string for the title.
JLabel(Icon) - Constructor for class javax.swing.JLabel
Creates a JLabel instance with the specified image.
JLabel(Icon, int) - Constructor for class javax.swing.JLabel
Creates a JLabel instance with the specified image and horizontal alignment.
JLabel(String) - Constructor for class javax.swing.JLabel
Creates a JLabel instance with the specified text.
JLabel(String, Icon, int) - Constructor for class javax.swing.JLabel
Creates a JLabel instance with the specified text, image, and horizontal alignment.
JLabel(String, int) - Constructor for class javax.swing.JLabel
Creates a JLabel instance with the specified text and horizontal alignment.
JLayeredPane - class javax.swing.JLayeredPane.
JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
JLayeredPane.AccessibleJLayeredPane - class javax.swing.JLayeredPane.AccessibleJLayeredPane.
This class implements accessibility support for the JLayeredPane class.
JLayeredPane.AccessibleJLayeredPane(JLayeredPane) - Constructor for class javax.swing.JLayeredPane.AccessibleJLayeredPane
JLayeredPane() - Constructor for class javax.swing.JLayeredPane
Create a new JLayeredPane
JList - class javax.swing.JList.
A component that allows the user to select one or more objects from a list.
JList.AccessibleJList - class javax.swing.JList.AccessibleJList.
This class implements accessibility support for the JList class.
JList.AccessibleJList.AccessibleJListChild - class javax.swing.JList.AccessibleJList.AccessibleJListChild.
This class implements accessibility support appropriate for list children.
JList.AccessibleJList.AccessibleJListChild(JList.AccessibleJList, JList, int) - Constructor for class javax.swing.JList.AccessibleJList.AccessibleJListChild
JList.AccessibleJList(JList) - Constructor for class javax.swing.JList.AccessibleJList
JList() - Constructor for class javax.swing.JList
Constructs a JList with an empty model.
JList(ListModel) - Constructor for class javax.swing.JList
Constructs a JList that displays the elements in the specified, non-null model.
JList(Object[]) - Constructor for class javax.swing.JList
Constructs a JList that displays the elements in the specified array.
JList(Vector) - Constructor for class javax.swing.JList
Constructs a JList that displays the elements in the specified Vector.
JMenu - class javax.swing.JMenu.
An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JMenu.AccessibleJMenu - class javax.swing.JMenu.AccessibleJMenu.
This class implements accessibility support for the JMenu class.
JMenu.AccessibleJMenu(JMenu) - Constructor for class javax.swing.JMenu.AccessibleJMenu
JMenu.WinListener - class javax.swing.JMenu.WinListener.
A listener class that watches for a popup window closing.
JMenu.WinListener(JMenu, JPopupMenu) - Constructor for class javax.swing.JMenu.WinListener
Create the window listener for the specified popup.
JMenu() - Constructor for class javax.swing.JMenu
Constructs a new JMenu with no text.
JMenu(Action) - Constructor for class javax.swing.JMenu
Constructs a menu whose properties are taken from the Action supplied.
JMenu(String) - Constructor for class javax.swing.JMenu
Constructs a new JMenu with the supplied string as its text.
JMenu(String, boolean) - Constructor for class javax.swing.JMenu
Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.
JMenuBar - class javax.swing.JMenuBar.
An implementation of a menu bar.
JMenuBar.AccessibleJMenuBar - class javax.swing.JMenuBar.AccessibleJMenuBar.
This class implements accessibility support for the JMenuBar class.
JMenuBar.AccessibleJMenuBar(JMenuBar) - Constructor for class javax.swing.JMenuBar.AccessibleJMenuBar
JMenuBar() - Constructor for class javax.swing.JMenuBar
Creates a new menu bar.
JMenuItem - class javax.swing.JMenuItem.
An implementation of an item in a menu.
JMenuItem.AccessibleJMenuItem - class javax.swing.JMenuItem.AccessibleJMenuItem.
This class implements accessibility support for the JMenuItem class.
JMenuItem() - Constructor for class javax.swing.JMenuItem
Creates a menuItem with no set text or icon.
JMenuItem(Action) - Constructor for class javax.swing.JMenuItem
Creates a menu item whose properties are taken from the Action supplied.
JMenuItem(Icon) - Constructor for class javax.swing.JMenuItem
Creates a menuItem with an icon.
JMenuItem(String) - Constructor for class javax.swing.JMenuItem
Creates a menuItem with text.
JMenuItem(String, Icon) - Constructor for class javax.swing.JMenuItem
Creates a menu item with the supplied text and icon.
JMenuItem(String, int) - Constructor for class javax.swing.JMenuItem
Creates a menuItem with the specified text and keyboard mnemonic.
JobAttributes - class java.awt.JobAttributes.
A set of attributes which control a print job.
JobAttributes.DefaultSelectionType - class java.awt.JobAttributes.DefaultSelectionType.
A type-safe enumeration of possible default selection states.
JobAttributes.DestinationType - class java.awt.JobAttributes.DestinationType.
A type-safe enumeration of possible job destinations.
JobAttributes.DialogType - class java.awt.JobAttributes.DialogType.
A type-safe enumeration of possible dialogs to display to the user.
JobAttributes.MultipleDocumentHandlingType - class java.awt.JobAttributes.MultipleDocumentHandlingType.
A type-safe enumeration of possible multiple document handling states.
JobAttributes.SidesType - class java.awt.JobAttributes.SidesType.
A type-safe enumeration of possible multi-page impositions.
JobAttributes() - Constructor for class java.awt.JobAttributes
Constructs a JobAttributes instance with default values for every attribute.
JobAttributes(int, JobAttributes.DefaultSelectionType, JobAttributes.DestinationType, JobAttributes.DialogType, String, int, int, JobAttributes.MultipleDocumentHandlingType, int[][], String, JobAttributes.SidesType) - Constructor for class java.awt.JobAttributes
Constructs a JobAttributes instance with the specified values for every attribute.
JobAttributes(JobAttributes) - Constructor for class java.awt.JobAttributes
Constructs a JobAttributes instance which is a copy of the supplied JobAttributes.
JOIN_BEVEL - Static variable in class java.awt.BasicStroke
Joins path segments by connecting the outer corners of their wide outlines with a straight segment.
JOIN_MITER - Static variable in class java.awt.BasicStroke
Joins path segments by extending their outside edges until they meet.
JOIN_ROUND - Static variable in class java.awt.BasicStroke
Joins path segments by rounding off the corner at a radius of half the line width.
join() - Method in class java.lang.Thread
Waits for this thread to die.
join(InetAddress) - Method in class java.net.DatagramSocketImpl
Join the multicast group.
join(long) - Method in class java.lang.Thread
Waits at most millis milliseconds for this thread to die.
join(long, int) - Method in class java.lang.Thread
Waits at most millis milliseconds plus nanos nanoseconds for this thread to die.
JoinFractureDirection - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getDirection.
joinGroup(InetAddress) - Method in class java.net.MulticastSocket
Joins a multicast group.Its behavior may be affected by setInterface.
JoinNextDirection - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getDirection.
JoinPreviousDirection - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getDirection.
JOptionPane - class javax.swing.JOptionPane.
JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JOptionPane.AccessibleJOptionPane - class javax.swing.JOptionPane.AccessibleJOptionPane.
This class implements accessibility support for the JOptionPane class.
JOptionPane.AccessibleJOptionPane(JOptionPane) - Constructor for class javax.swing.JOptionPane.AccessibleJOptionPane
JOptionPane() - Constructor for class javax.swing.JOptionPane
Creates a JOptionPane with a test message.
JOptionPane(Object) - Constructor for class javax.swing.JOptionPane
Creates a instance of JOptionPane to display a message using the plain-message message type and the default options delivered by the UI.
JOptionPane(Object, int) - Constructor for class javax.swing.JOptionPane
Creates an instance of JOptionPane to display a message with the specified message type and the default options,
JOptionPane(Object, int, int) - Constructor for class javax.swing.JOptionPane
Creates an instance of JOptionPane to display a message with the specified message type and options.
JOptionPane(Object, int, int, Icon) - Constructor for class javax.swing.JOptionPane
Creates an instance of JOptionPane to display a message with the specified message type, options, and icon.
JOptionPane(Object, int, int, Icon, Object[]) - Constructor for class javax.swing.JOptionPane
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options.
JOptionPane(Object, int, int, Icon, Object[], Object) - Constructor for class javax.swing.JOptionPane
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options, with the initially-selected option specified.
JPanel - class javax.swing.JPanel.
JPanel is a generic lightweight container.
JPanel.AccessibleJPanel - class javax.swing.JPanel.AccessibleJPanel.
This class implements accessibility support for the JPanel class.
JPanel.AccessibleJPanel(JPanel) - Constructor for class javax.swing.JPanel.AccessibleJPanel
JPanel() - Constructor for class javax.swing.JPanel
Create a new JPanel with a double buffer and a flow layout
JPanel(boolean) - Constructor for class javax.swing.JPanel
Create a new JPanel with FlowLayout and the specified buffering strategy.
JPanel(LayoutManager) - Constructor for class javax.swing.JPanel
Create a new buffered JPanel with the specified layout manager
JPanel(LayoutManager, boolean) - Constructor for class javax.swing.JPanel
Creates a new JPanel with the specified layout manager and buffering strategy.
JPasswordField - class javax.swing.JPasswordField.
JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
JPasswordField.AccessibleJPasswordField - class javax.swing.JPasswordField.AccessibleJPasswordField.
This class implements accessibility support for the JPasswordField class.
JPasswordField.AccessibleJPasswordField(JPasswordField) - Constructor for class javax.swing.JPasswordField.AccessibleJPasswordField
JPasswordField() - Constructor for class javax.swing.JPasswordField
Constructs a new JPasswordField, with a default document, null starting text string, and 0 column width.
JPasswordField(Document, String, int) - Constructor for class javax.swing.JPasswordField
Constructs a new JPasswordField that uses the given text storage model and the given number of columns.
JPasswordField(int) - Constructor for class javax.swing.JPasswordField
Constructs a new empty JPasswordField with the specified number of columns.
JPasswordField(String) - Constructor for class javax.swing.JPasswordField
Constructs a new JPasswordField initialized with the specified text.
JPasswordField(String, int) - Constructor for class javax.swing.JPasswordField
Constructs a new JPasswordField initialized with the specified text and columns.
JPopupMenu - class javax.swing.JPopupMenu.
An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JPopupMenu.AccessibleJPopupMenu - class javax.swing.JPopupMenu.AccessibleJPopupMenu.
This class implements accessibility support for the JPopupMenu class.
JPopupMenu.AccessibleJPopupMenu(JPopupMenu) - Constructor for class javax.swing.JPopupMenu.AccessibleJPopupMenu
JPopupMenu.Separator - class javax.swing.JPopupMenu.Separator.
A popup menu-specific separator.
JPopupMenu.Separator() - Constructor for class javax.swing.JPopupMenu.Separator
JPopupMenu() - Constructor for class javax.swing.JPopupMenu
Constructs a JPopupMenu without an "invoker".
JPopupMenu(String) - Constructor for class javax.swing.JPopupMenu
Constructs a JPopupMenu with the specified title.
JProgressBar - class javax.swing.JProgressBar.
A component that displays an integer value within a bounded interval.
JProgressBar.AccessibleJProgressBar - class javax.swing.JProgressBar.AccessibleJProgressBar.
This class implements accessibility support for the JProgressBar class.
JProgressBar.AccessibleJProgressBar(JProgressBar) - Constructor for class javax.swing.JProgressBar.AccessibleJProgressBar
JProgressBar() - Constructor for class javax.swing.JProgressBar
Creates a horizontal progress bar.
JProgressBar(BoundedRangeModel) - Constructor for class javax.swing.JProgressBar
Creates a horizontal progress bar, the default orientation.
JProgressBar(int) - Constructor for class javax.swing.JProgressBar
Creates a progress bar with the specified orientation, which can be either JProgressBar.VERTICAL or JProgressBar.HORIZONTAL.
JProgressBar(int, int) - Constructor for class javax.swing.JProgressBar
Creates a horizontal progress bar, which is the default.
JProgressBar(int, int, int) - Constructor for class javax.swing.JProgressBar
Creates a progress bar using the specified orientation, minimum, and maximum.
JRadioButton - class javax.swing.JRadioButton.
An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
JRadioButton.AccessibleJRadioButton - class javax.swing.JRadioButton.AccessibleJRadioButton.
This class implements accessibility support for the JRadioButton class.
JRadioButton.AccessibleJRadioButton(JRadioButton) - Constructor for class javax.swing.JRadioButton.AccessibleJRadioButton
JRadioButton() - Constructor for class javax.swing.JRadioButton
Creates an initially unselected radio button with no set text.
JRadioButton(Action) - Constructor for class javax.swing.JRadioButton
Creates a radiobutton where properties are taken from the Action supplied.
JRadioButton(Icon) - Constructor for class javax.swing.JRadioButton
Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Icon, boolean) - Constructor for class javax.swing.JRadioButton
Creates a radio button with the specified image and selection state, but no text.
JRadioButton(String) - Constructor for class javax.swing.JRadioButton
Creates an unselected radio button with the specified text.
JRadioButton(String, boolean) - Constructor for class javax.swing.JRadioButton
Creates a radio button with the specified text and selection state.
JRadioButton(String, Icon) - Constructor for class javax.swing.JRadioButton
Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String, Icon, boolean) - Constructor for class javax.swing.JRadioButton
Creates a radio button that has the specified text, image, and selection state.
JRadioButtonMenuItem - class javax.swing.JRadioButtonMenuItem.
An implementation of a radio button menu item.
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem - class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem.
This class implements accessibility support for the JRadioButtonMenuItem class.
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem(JRadioButtonMenuItem) - Constructor for class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
JRadioButtonMenuItem() - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a JRadioButtonMenuItem with no set text or icon.
JRadioButtonMenuItem(Action) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a radio button menu item whose properties are taken from the Action supplied.
JRadioButtonMenuItem(Icon) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a JRadioButtonMenuItem with an icon.
JRadioButtonMenuItem(Icon, boolean) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a radio button menu item with the specified image and selection state, but no text.
JRadioButtonMenuItem(String) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a JRadioButtonMenuItem with text.
JRadioButtonMenuItem(String, boolean) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a radio button menu item with the specified text and selection state.
JRadioButtonMenuItem(String, Icon) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a radio button menu item with the specified text and Icon.
JRadioButtonMenuItem(String, Icon, boolean) - Constructor for class javax.swing.JRadioButtonMenuItem
Creates a radio button menu item that has the specified text, image, and selection state.
JRootPane - class javax.swing.JRootPane.
A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
JRootPane.AccessibleJRootPane - class javax.swing.JRootPane.AccessibleJRootPane.
This class implements accessibility support for the JRootPane class.
JRootPane.AccessibleJRootPane(JRootPane) - Constructor for class javax.swing.JRootPane.AccessibleJRootPane
JRootPane.RootLayout - class javax.swing.JRootPane.RootLayout.
A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
JRootPane.RootLayout(JRootPane) - Constructor for class javax.swing.JRootPane.RootLayout
JRootPane() - Constructor for class javax.swing.JRootPane
Create a JRootPane, setting up its glassPane, LayeredPane, and contentPane.
JScrollBar - class javax.swing.JScrollBar.
An implementation of a scrollbar.
JScrollBar.AccessibleJScrollBar - class javax.swing.JScrollBar.AccessibleJScrollBar.
This class implements accessibility support for the JScrollBar class.
JScrollBar.AccessibleJScrollBar(JScrollBar) - Constructor for class javax.swing.JScrollBar.AccessibleJScrollBar
JScrollBar() - Constructor for class javax.swing.JScrollBar
Creates a vertical scrollbar with the following initial values:
JScrollBar(int) - Constructor for class javax.swing.JScrollBar
Creates a scrollbar with the specified orientation and the following initial values:
JScrollBar(int, int, int, int, int) - Constructor for class javax.swing.JScrollBar
Creates a scrollbar with the specified orientation, value, extent, mimimum, and maximum.
JScrollPane - class javax.swing.JScrollPane.
Provides a scrollable view of a component.
JScrollPane.AccessibleJScrollPane - class javax.swing.JScrollPane.AccessibleJScrollPane.
This class implements accessibility support for the JScrollPane class.
JScrollPane.AccessibleJScrollPane(JScrollPane) - Constructor for class javax.swing.JScrollPane.AccessibleJScrollPane
Constructor to set up listener on viewport.
JScrollPane.ScrollBar - class javax.swing.JScrollPane.ScrollBar.
By default JScrollPane creates scrollbars that are instances of this class.
JScrollPane.ScrollBar(JScrollPane, int) - Constructor for class javax.swing.JScrollPane.ScrollBar
Creates a scrollbar with the specified orientation, where the options are: JScrollPane.VERTICAL JScrollPane.HORIZONTAL
JScrollPane() - Constructor for class javax.swing.JScrollPane
Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed.
JScrollPane(Component) - Constructor for class javax.swing.JScrollPane
Creates a JScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.
JScrollPane(Component, int, int) - Constructor for class javax.swing.JScrollPane
Creates a JScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.
JScrollPane(int, int) - Constructor for class javax.swing.JScrollPane
Creates an empty (no viewport view) JScrollPane with specified scrollbar policies.
JSeparator - class javax.swing.JSeparator.
An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
JSeparator.AccessibleJSeparator - class javax.swing.JSeparator.AccessibleJSeparator.
This class implements accessibility support for the JSeparator class.
JSeparator.AccessibleJSeparator(JSeparator) - Constructor for class javax.swing.JSeparator.AccessibleJSeparator
JSeparator() - Constructor for class javax.swing.JSeparator
Creates a new horizontal separator.
JSeparator(int) - Constructor for class javax.swing.JSeparator
Creates a new separator with the specified horizontal or vertical orientation.
JSlider - class javax.swing.JSlider.
A component that lets the user graphically select a value by slding a knob within a bounded interval.
JSlider.AccessibleJSlider - class javax.swing.JSlider.AccessibleJSlider.
This class implements accessibility support for the JSlider class.
JSlider.AccessibleJSlider(JSlider) - Constructor for class javax.swing.JSlider.AccessibleJSlider
JSlider() - Constructor for class javax.swing.JSlider
Creates a horizontal slider with the range 0 to 100 and an intitial value of 50.
JSlider(BoundedRangeModel) - Constructor for class javax.swing.JSlider
Creates a horizontal slider using the specified BoundedRangeModel.
JSlider(int) - Constructor for class javax.swing.JSlider
Creates a slider using the specified orientation with the range 0 to 100 and an intitial value of 50.
JSlider(int, int) - Constructor for class javax.swing.JSlider
Creates a horizontal slider using the specified min and max with an intitial value of 50.
JSlider(int, int, int) - Constructor for class javax.swing.JSlider
Creates a horizontal slider using the specified min, max and value.
JSlider(int, int, int, int) - Constructor for class javax.swing.JSlider
Creates a slider with the specified orientation and the specified mimimum, maximum, and initial values.
JSplitPane - class javax.swing.JSplitPane.
JSplitPane is used to divide two (and only two) Components.
JSplitPane.AccessibleJSplitPane - class javax.swing.JSplitPane.AccessibleJSplitPane.
This class implements accessibility support for the JSplitPane class.
JSplitPane.AccessibleJSplitPane(JSplitPane) - Constructor for class javax.swing.JSplitPane.AccessibleJSplitPane
JSplitPane() - Constructor for class javax.swing.JSplitPane
Creates a new JSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.
JSplitPane(int) - Constructor for class javax.swing.JSplitPane
Creates a new JSplitPane configured with the specified orientation and no continuous layout.
JSplitPane(int, boolean) - Constructor for class javax.swing.JSplitPane
Creates a new JSplitPane with the specified orientation and redrawing style.
JSplitPane(int, boolean, Component, Component) - Constructor for class javax.swing.JSplitPane
Creates a new JSplitPane with the specified orientation and redrawing style, and with the specified components.
JSplitPane(int, Component, Component) - Constructor for class javax.swing.JSplitPane
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
JTabbedPane - class javax.swing.JTabbedPane.
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTabbedPane.AccessibleJTabbedPane - class javax.swing.JTabbedPane.AccessibleJTabbedPane.
This class implements accessibility support for the JTabbedPane class.
JTabbedPane.AccessibleJTabbedPane(JTabbedPane) - Constructor for class javax.swing.JTabbedPane.AccessibleJTabbedPane
Constructs an AccessibleJTabbedPane
JTabbedPane.ModelListener - class javax.swing.JTabbedPane.ModelListener.
We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.
JTabbedPane.ModelListener(JTabbedPane) - Constructor for class javax.swing.JTabbedPane.ModelListener
JTabbedPane() - Constructor for class javax.swing.JTabbedPane
Creates an empty TabbedPane.
JTabbedPane(int) - Constructor for class javax.swing.JTabbedPane
Creates an empty TabbedPane with the specified tab placement of either: TOP, BOTTOM, LEFT, or RIGHT.
JTable - class javax.swing.JTable.
JTable is a user-interface component that presents data in a two-dimensional table format.
JTable.AccessibleJTable - class javax.swing.JTable.AccessibleJTable.
This class implements accessibility support for the JTable class.
JTable.AccessibleJTable.AccessibleJTableCell - class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.
The class provides an implementation of the Java Accessibility API appropriate to table cells.
JTable.AccessibleJTable.AccessibleJTableCell(JTable.AccessibleJTable, JTable, int, int, int) - Constructor for class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Constructs an AccessibleJTableHeaderEntry
JTable.AccessibleJTable.AccessibleJTableModelChange - class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange.
JTable.AccessibleJTable.AccessibleJTableModelChange(JTable.AccessibleJTable, int, int, int, int, int) - Constructor for class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
JTable() - Constructor for class javax.swing.JTable
Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
JTable(int, int) - Constructor for class javax.swing.JTable
Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel.
JTable(Object[][], Object[]) - Constructor for class javax.swing.JTable
Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.
JTable(TableModel) - Constructor for class javax.swing.JTable
Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
JTable(TableModel, TableColumnModel) - Constructor for class javax.swing.JTable
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
JTable(TableModel, TableColumnModel, ListSelectionModel) - Constructor for class javax.swing.JTable
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.
JTable(Vector, Vector) - Constructor for class javax.swing.JTable
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.
JTableHeader - class javax.swing.table.JTableHeader.
This is the object which manages the header of the JTable.
JTableHeader.AccessibleJTableHeader - class javax.swing.table.JTableHeader.AccessibleJTableHeader.
This class implements accessibility support for the JTableHeader class.
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry - class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.
This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(JTableHeader.AccessibleJTableHeader, int, JTableHeader, JTable) - Constructor for class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
Constructs an AccessiblJTableHeaaderEntry
JTableHeader.AccessibleJTableHeader(JTableHeader) - Constructor for class javax.swing.table.JTableHeader.AccessibleJTableHeader
JTableHeader() - Constructor for class javax.swing.table.JTableHeader
Constructs a JTableHeader with a default TableColumnModel.
JTableHeader(TableColumnModel) - Constructor for class javax.swing.table.JTableHeader
Constructs a JTableHeader which is initialized with cm as the column model.
JTextArea - class javax.swing.JTextArea.
A TextArea is a multi-line area that displays plain text.
JTextArea.AccessibleJTextArea - class javax.swing.JTextArea.AccessibleJTextArea.
This class implements accessibility support for the JTextArea class.
JTextArea.AccessibleJTextArea(JTextArea) - Constructor for class javax.swing.JTextArea.AccessibleJTextArea
JTextArea() - Constructor for class javax.swing.JTextArea
Constructs a new TextArea.
JTextArea(Document) - Constructor for class javax.swing.JTextArea
Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0).
JTextArea(Document, String, int, int) - Constructor for class javax.swing.JTextArea
Constructs a new JTextArea with the specified number of rows and columns, and the given model.
JTextArea(int, int) - Constructor for class javax.swing.JTextArea
Constructs a new empty TextArea with the specified number of rows and columns.
JTextArea(String) - Constructor for class javax.swing.JTextArea
Constructs a new TextArea with the specified text displayed.
JTextArea(String, int, int) - Constructor for class javax.swing.JTextArea
Constructs a new TextArea with the specified text and number of rows and columns.
JTextComponent - class javax.swing.text.JTextComponent.
JTextComponent is the base class for swing text components.
JTextComponent.AccessibleJTextComponent - class javax.swing.text.JTextComponent.AccessibleJTextComponent.
This class implements accessibility support for the JTextComponent class.
JTextComponent.AccessibleJTextComponent(JTextComponent) - Constructor for class javax.swing.text.JTextComponent.AccessibleJTextComponent
Constructs an AccessibleJTextComponent.
JTextComponent.KeyBinding - class javax.swing.text.JTextComponent.KeyBinding.
Binding record for creating key bindings.
JTextComponent.KeyBinding(KeyStroke, String) - Constructor for class javax.swing.text.JTextComponent.KeyBinding
Creates a new key binding.
JTextComponent() - Constructor for class javax.swing.text.JTextComponent
Creates a new JTextComponent.
JTextField - class javax.swing.JTextField.
JTextField is a lightweight component that allows the editing of a single line of text.
JTextField.AccessibleJTextField - class javax.swing.JTextField.AccessibleJTextField.
This class implements accessibility support for the JTextField class.
JTextField.AccessibleJTextField(JTextField) - Constructor for class javax.swing.JTextField.AccessibleJTextField
JTextField() - Constructor for class javax.swing.JTextField
Constructs a new TextField.
JTextField(Document, String, int) - Constructor for class javax.swing.JTextField
Constructs a new JTextField that uses the given text storage model and the given number of columns.
JTextField(int) - Constructor for class javax.swing.JTextField
Constructs a new empty TextField with the specified number of columns.
JTextField(String) - Constructor for class javax.swing.JTextField
Constructs a new TextField initialized with the specified text.
JTextField(String, int) - Constructor for class javax.swing.JTextField
Constructs a new TextField initialized with the specified text and columns.
JTextPane - class javax.swing.JTextPane.
A text component that can be marked up with attributes that are represented graphically.
JTextPane() - Constructor for class javax.swing.JTextPane
Constructs a new JTextPane.
JTextPane(StyledDocument) - Constructor for class javax.swing.JTextPane
Constructs a new JTextPane, with a specified document model.
JToggleButton - class javax.swing.JToggleButton.
An implementation of a two-state button.
JToggleButton.AccessibleJToggleButton - class javax.swing.JToggleButton.AccessibleJToggleButton.
This class implements accessibility support for the JToggleButton class.
JToggleButton.AccessibleJToggleButton(JToggleButton) - Constructor for class javax.swing.JToggleButton.AccessibleJToggleButton
JToggleButton.ToggleButtonModel - class javax.swing.JToggleButton.ToggleButtonModel.
The ToggleButton model
JToggleButton.ToggleButtonModel() - Constructor for class javax.swing.JToggleButton.ToggleButtonModel
Creates a new ToggleButton Model
JToggleButton() - Constructor for class javax.swing.JToggleButton
Creates an initially unselected toggle button without setting the text or image.
JToggleButton(Action) - Constructor for class javax.swing.JToggleButton
Creates a toggle button where properties are taken from the Action supplied.
JToggleButton(Icon) - Constructor for class javax.swing.JToggleButton
Creates an initially unselected toggle button with the specified image but no text.
JToggleButton(Icon, boolean) - Constructor for class javax.swing.JToggleButton
Creates a toggle button with the specified image and selection state, but no text.
JToggleButton(String) - Constructor for class javax.swing.JToggleButton
Creates an unselected toggle button with the specified text.
JToggleButton(String, boolean) - Constructor for class javax.swing.JToggleButton
Creates a toggle button with the specified text and selection state.
JToggleButton(String, Icon) - Constructor for class javax.swing.JToggleButton
Creates a toggle button that has the specified text and image, and that is initially unselected.
JToggleButton(String, Icon, boolean) - Constructor for class javax.swing.JToggleButton
Creates a toggle button with the specified text, image, and selection state.
JToolBar - class javax.swing.JToolBar.
JToolBar provides a component that is useful for displaying commonly used Actions or controls.
JToolBar.AccessibleJToolBar - class javax.swing.JToolBar.AccessibleJToolBar.
This class implements accessibility support for the JToolBar class.
JToolBar.AccessibleJToolBar(JToolBar) - Constructor for class javax.swing.JToolBar.AccessibleJToolBar
JToolBar.Separator - class javax.swing.JToolBar.Separator.
A toolbar-specific separator.
JToolBar.Separator() - Constructor for class javax.swing.JToolBar.Separator
Creates a new toolbar separator with the default size as defined by the current look and feel.
JToolBar.Separator(Dimension) - Constructor for class javax.swing.JToolBar.Separator
Creates a new toolbar separator with the specified size.
JToolBar() - Constructor for class javax.swing.JToolBar
Creates a new toolbar; orientation defaults to HORIZONTAL.
JToolBar(int) - Constructor for class javax.swing.JToolBar
Creates a new toolbar with the specified orientation.
JToolBar(String) - Constructor for class javax.swing.JToolBar
Creates a new toolbar with the specified name.
JToolBar(String, int) - Constructor for class javax.swing.JToolBar
Creates a new toolbar with a specified name and orientation.
JToolTip - class javax.swing.JToolTip.
Used to display a "Tip" for a Component.
JToolTip.AccessibleJToolTip - class javax.swing.JToolTip.AccessibleJToolTip.
This class implements accessibility support for the JToolTip class.
JToolTip.AccessibleJToolTip(JToolTip) - Constructor for class javax.swing.JToolTip.AccessibleJToolTip

JToolTip() - Constructor for class javax.swing.JToolTip
Creates a tool tip.
JTree - class javax.swing.JTree.
A control that displays a set of hierarchical data as an outline.
JTree.AccessibleJTree - class javax.swing.JTree.AccessibleJTree.
This class implements accessibility support for the JTree class.
JTree.AccessibleJTree.AccessibleJTreeNode - class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.
This class implements accessibility support for the JTree child.
JTree.AccessibleJTree.AccessibleJTreeNode(JTree.AccessibleJTree, JTree, TreePath, Accessible) - Constructor for class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Constructs an AccessibleJTreeNode
JTree.AccessibleJTree(JTree) - Constructor for class javax.swing.JTree.AccessibleJTree

JTree.DynamicUtilTreeNode - class javax.swing.JTree.DynamicUtilTreeNode.
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
JTree.DynamicUtilTreeNode(Object, Object) - Constructor for class javax.swing.JTree.DynamicUtilTreeNode
Creates a node with the specified object as its value and with the specified children.
JTree.EmptySelectionModel - class javax.swing.JTree.EmptySelectionModel.
EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
JTree.EmptySelectionModel() - Constructor for class javax.swing.JTree.EmptySelectionModel

JTree.TreeModelHandler - class javax.swing.JTree.TreeModelHandler.
Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.
JTree.TreeModelHandler(JTree) - Constructor for class javax.swing.JTree.TreeModelHandler

JTree.TreeSelectionRedirector - class javax.swing.JTree.TreeSelectionRedirector.
Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
JTree.TreeSelectionRedirector(JTree) - Constructor for class javax.swing.JTree.TreeSelectionRedirector

JTree() - Constructor for class javax.swing.JTree
Returns a JTree with a sample model.
JTree(Hashtable) - Constructor for class javax.swing.JTree
Returns a JTree created from a Hashtable which does not display with root.
JTree(Object[]) - Constructor for class javax.swing.JTree
Returns a JTree with each element of the specified array as the child of a new root node which is not displayed.
JTree(TreeModel) - Constructor for class javax.swing.JTree
Returns an instance of JTree which displays the root node -- the tree is created using the specified data model.
JTree(TreeNode) - Constructor for class javax.swing.JTree
Returns a JTree with the specified TreeNode as its root, which displays the root node.
JTree(TreeNode, boolean) - Constructor for class javax.swing.JTree
Returns a JTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
JTree(Vector) - Constructor for class javax.swing.JTree
Returns a JTree with each element of the specified Vector as the child of a new root node which is not displayed.
JULY - Static variable in class java.util.Calendar
Value of the MONTH field indicating the seventh month of the year.
JUNE - Static variable in class java.util.Calendar
Value of the MONTH field indicating the sixth month of the year.
JUSTIFICATION - Static variable in class java.awt.font.TextAttribute
Attribute key for the justification of a paragraph.
JUSTIFICATION_FULL - Static variable in class java.awt.font.TextAttribute
Justify the line to the full requested width.
JUSTIFICATION_NONE - Static variable in class java.awt.font.TextAttribute
Do not allow the line to be justified.
JViewport - class javax.swing.JViewport.
The "viewport" or "porthole" through which you see the underlying information.
JViewport.AccessibleJViewport - class javax.swing.JViewport.AccessibleJViewport.
This class implements accessibility support for the JViewport class.
JViewport.AccessibleJViewport(JViewport) - Constructor for class javax.swing.JViewport.AccessibleJViewport

JViewport.ViewListener - class javax.swing.JViewport.ViewListener.
A listener for the view.
JViewport.ViewListener(JViewport) - Constructor for class javax.swing.JViewport.ViewListener

JViewport() - Constructor for class javax.swing.JViewport
Creates a JViewport.
JWindow - class javax.swing.JWindow.
A JWindow is a container that can be displayed anywhere on the user's desktop.
JWindow.AccessibleJWindow - class javax.swing.JWindow.AccessibleJWindow.
This class implements accessibility support for the JWindow class.
JWindow.AccessibleJWindow(JWindow) - Constructor for class javax.swing.JWindow.AccessibleJWindow

JWindow() - Constructor for class javax.swing.JWindow
Creates a window with no specified owner.
JWindow(Frame) - Constructor for class javax.swing.JWindow
Creates a window with the specified owner frame.
JWindow(GraphicsConfiguration) - Constructor for class javax.swing.JWindow
Creates a window with the specified GraphicsConfiguration of a screen device.
JWindow(Window) - Constructor for class javax.swing.JWindow
Creates a window with the owner and the specified GraphicsConfiguration of a screen device.
JWindow(Window, GraphicsConfiguration) - Constructor for class javax.swing.JWindow

Overview  Package  Class  Use  Tree  Deprecated   Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV LETTER   NEXT LETTER FRAMES    NO FRAMES
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 _


K-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

K

KANBUN - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
KANJI - Static variable in class java.awt.im.InputSubset
Constant for all Han characters used in writing Japanese, including a subset of the CJK unified ideographs as well as Japanese Han characters that may be defined as surrogate characters.
KANNADA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
KATAKANA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
KBD - Static variable in class javax.swing.text.html.HTML.Tag
Kernel - class java.awt.image.Kernel.
The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation.
Kernel(int, int, float[]) - Constructor for class java.awt.image.Kernel
Constructs a Kernel object from an array of floats.
key - Variable in class java.awt.Event
The key code of the key that was pressed in a keyboard event.
key - Variable in class javax.accessibility.AccessibleBundle
The locale independent name of the state.
key - Variable in class javax.swing.text.JTextComponent.KeyBinding
The key.
Key - interface java.security.Key.
The Key interface is the top-level interface for all keys.
KEY_ACTION - Static variable in class java.awt.Event
The user has pressed a non-ASCII action key.
KEY_ACTION_RELEASE - Static variable in class java.awt.Event
The user has released a non-ASCII action key.
KEY_ALPHA_INTERPOLATION - Static variable in class java.awt.RenderingHints
Alpha interpolation hint key
KEY_ANTIALIASING - Static variable in class java.awt.RenderingHints
Antialiasing hint key
KEY_COLOR_RENDERING - Static variable in class java.awt.RenderingHints
Color rendering hint key
KEY_DITHERING - Static variable in class java.awt.RenderingHints
Dithering hint key
KEY_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting key events.
KEY_FIRST - Static variable in class java.awt.event.KeyEvent
The first number in the range of ids used for key events.
KEY_FRACTIONALMETRICS - Static variable in class java.awt.RenderingHints
Font fractional metrics hint key
KEY_INTERPOLATION - Static variable in class java.awt.RenderingHints
Interpolation hint key
KEY_LAST - Static variable in class java.awt.event.KeyEvent
The last number in the range of ids used for key events.
KEY_PRESS - Static variable in class java.awt.Event
The user has pressed a normal key.
KEY_PRESSED - Static variable in class java.awt.event.KeyEvent
The "key pressed" event.
KEY_RELEASE - Static variable in class java.awt.Event
The user has released a normal key.
KEY_RELEASED - Static variable in class java.awt.event.KeyEvent
The "key released" event.
KEY_RENDERING - Static variable in class java.awt.RenderingHints
Rendering hint key
KEY_STROKE_CONTROL - Static variable in class java.awt.RenderingHints
Stroke normalization control hint key
KEY_TEXT_ANTIALIASING - Static variable in class java.awt.RenderingHints
Text antialiasing hint key
KEY_TYPED - Static variable in class java.awt.event.KeyEvent
The "key typed" event.
KeyAdapter - class java.awt.event.KeyAdapter.
An abstract adapter class for receiving keyboard events.
KeyAdapter() - Constructor for class java.awt.event.KeyAdapter
KEYBOARD_DIVIDER_MOVE_OFFSET - Static variable in class javax.swing.plaf.basic.BasicSplitPaneUI
How far (relativ) the divider does move when it is moved around by the cursor keys on the keyboard.
keyboardDownRightListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
keyboardEndListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
keyboardHomeListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
keyboardResizeToggleListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
keyboardUpLeftListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
keyDown(Event, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
keyEqualsCharSet() - Method in class javax.swing.text.ChangedCharSetException
KeyEvent - class java.awt.event.KeyEvent.
An event which indicates that a keystroke occurred in a component.
KeyEvent(Component, int, long, int, int) - Constructor for class java.awt.event.KeyEvent
KeyEvent(Component, int, long, int, int, char) - Constructor for class java.awt.event.KeyEvent
Constructs a KeyEvent object.
KeyException - exception java.security.KeyException.
This is the basic key exception.
KeyException() - Constructor for class java.security.KeyException
Constructs a KeyException with no detail message.
KeyException(String) - Constructor for class java.security.KeyException
Constructs a KeyException with the specified detail message.
KeyFactory - class java.security.KeyFactory.
Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
KeyFactory(KeyFactorySpi, Provider, String) - Constructor for class java.security.KeyFactory
Creates a KeyFactory object.
KeyFactorySpi - class java.security.KeyFactorySpi.
This class defines the Service Provider Interface (SPI) for the KeyFactory class.
KeyFactorySpi() - Constructor for class java.security.KeyFactorySpi
keyListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
keyListener - Variable in class javax.swing.plaf.basic.BasicTableUI
keyListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
KeyListener - interface java.awt.event.KeyListener.
The listener interface for receiving keyboard events (keystrokes).
KeyManagementException - exception java.security.KeyManagementException.
This is the general key management exception, for all operations dealing with key management.
KeyManagementException() - Constructor for class java.security.KeyManagementException
Constructs a KeyManagementException with no detail message.
KeyManagementException(String) - Constructor for class java.security.KeyManagementException
Constructs a KeyManagementException with the specified detail message.
Keymap - interface javax.swing.text.Keymap.
A collection of bindings of KeyStrokes to actions.
KeyPair - class java.security.KeyPair.
This class is a simple holder for a key pair (a public key and a private key).
KeyPair(PublicKey, PrivateKey) - Constructor for class java.security.KeyPair
Constructs a key pair from the given public key and private key.
KeyPairGenerator - class java.security.KeyPairGenerator.
The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGenerator(String) - Constructor for class java.security.KeyPairGenerator
Creates a KeyPairGenerator object for the specified algorithm.
KeyPairGeneratorSpi - class java.security.KeyPairGeneratorSpi.
This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
KeyPairGeneratorSpi() - Constructor for class java.security.KeyPairGeneratorSpi
keyPress(int) - Method in class java.awt.Robot
Presses a given key.
keyPressed(KeyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
keyPressed(KeyEvent) - Method in interface java.awt.event.KeyListener
Invoked when a key has been pressed.
keyPressed(KeyEvent) - Method in class java.awt.event.KeyAdapter
Invoked when a key has been pressed.
keyPressed(KeyEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.KeyHandler
keyPressed(KeyEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
keyPressed(KeyEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
keyRelease(int) - Method in class java.awt.Robot
Releases a given key.
keyReleased(KeyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.
keyReleased(KeyEvent) - Method in interface java.awt.event.KeyListener
Invoked when a key has been released.
keyReleased(KeyEvent) - Method in class java.awt.event.KeyAdapter
Invoked when a key has been released.
keyReleased(KeyEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler
keyReleased(KeyEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.KeyHandler
keyReleased(KeyEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
keys() - Method in class java.util.Dictionary
Returns an enumeration of the keys in this dictionary.
keys() - Method in class java.util.Hashtable
Returns an enumeration of the keys in this hashtable.
keys() - Method in class javax.swing.InputMap
Returns the KeyStrokes that are bound in this InputMap.
keys() - Method in class javax.swing.ActionMap
Returns the Action names that are bound in this ActionMap.
keySelectionManager - Variable in class javax.swing.JComboBox
keySet() - Method in class java.awt.RenderingHints
Returns a Set view of the Keys contained in this RenderingHints.
keySet() - Method in class java.security.Provider
Returns an unmodifiable Set view of the property keys contained in this provider.
keySet() - Method in class java.util.Hashtable
Returns a Set view of the keys contained in this Hashtable.
keySet() - Method in class java.util.AbstractMap
Returns a Set view of the keys contained in this map.
keySet() - Method in class java.util.TreeMap
Returns a Set view of the keys contained in this map.
keySet() - Method in class java.util.HashMap
Returns a set view of the keys contained in this map.
keySet() - Method in interface java.util.Map
Returns a set view of the keys contained in this map.
keySet() - Method in class java.util.jar.Attributes
Returns a Set view of the attribute names (keys) contained in this Map.
KeySpec - interface java.security.spec.KeySpec.
A (transparent) specification of the key material that constitutes a cryptographic key.
KeyStore - class java.security.KeyStore.
This class represents an in-memory collection of keys and certificates.
KeyStore(KeyStoreSpi, Provider, String) - Constructor for class java.security.KeyStore
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.
KeyStoreException - exception java.security.KeyStoreException.
This is the generic KeyStore exception.
KeyStoreException() - Constructor for class java.security.KeyStoreException
Constructs a KeyStoreException with no detail message.
KeyStoreException(String) - Constructor for class java.security.KeyStoreException
Constructs a KeyStoreException with the specified detail message.
KeyStoreSpi - class java.security.KeyStoreSpi.
This class defines the Service Provider Interface (SPI) for the KeyStore class.
KeyStoreSpi() - Constructor for class java.security.KeyStoreSpi
KeyStroke - class javax.swing.KeyStroke.
A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
keyTyped(KeyEvent) - Method in class java.awt.AWTEventMulticaster
Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
keyTyped(KeyEvent) - Method in interface java.awt.event.KeyListener
Invoked when a key has been typed.
keyTyped(KeyEvent) - Method in class java.awt.event.KeyAdapter
Invoked when a key has been typed.
keyTyped(KeyEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.KeyHandler
keyUp(Event, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
kind - Variable in class org.omg.CosNaming.NameComponent
kind() - Method in class org.omg.CORBA.TypeCode
Retrieves the kind of this TypeCode object.
KOREA - Static variable in class java.util.Locale
Useful constant for country.
KOREAN - Static variable in class java.util.Locale
Useful constant for language.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


L-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

L

label - Variable in class org.omg.CORBA.UnionMember
The label of the union member described by this UnionMember object.
Label - class java.awt.Label.
A Label object is a component for placing text in a container.
LABEL - Static variable in class javax.accessibility.AccessibleRole
An object used to present an icon or short string in an interface.
LABEL_FOR - Static variable in class javax.accessibility.AccessibleRelation
Indicates an object is a label for one or more target objects.
LABEL_FOR_PROPERTY - Static variable in class javax.accessibility.AccessibleRelation
Identifies that the target group for a label has changed
Label.AccessibleAWTLabel - class java.awt.Label.AccessibleAWTLabel.
This class implements accessibility support for the Label class.
Label.AccessibleAWTLabel(Label) - Constructor for class java.awt.Label.AccessibleAWTLabel
Label() - Constructor for class java.awt.Label
Constructs an empty label.
Label(String) - Constructor for class java.awt.Label
Constructs a new label with the specified string of text, left justified.
Label(String, int) - Constructor for class java.awt.Label
Constructs a new label that presents the specified string of text with the specified alignment.
LABELED_BY - Static variable in class javax.accessibility.AccessibleRelation
Indicates an object is labeled by one or more target objects.
LABELED_BY_PROPERTY - Static variable in class javax.accessibility.AccessibleRelation
Identifies that the objects that are doing the labeling have changed
labelFor - Variable in class javax.swing.JLabel
labelRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
labelUI - Static variable in class javax.swing.plaf.basic.BasicLabelUI
LabelUI - class javax.swing.plaf.LabelUI.
Pluggable look and feel interface for JLabel.
LabelUI() - Constructor for class javax.swing.plaf.LabelUI
LabelView - class javax.swing.text.LabelView.
A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
LabelView(Element) - Constructor for class javax.swing.text.LabelView
Constructs a new view wrapped on an element.
LANDSCAPE - Static variable in class java.awt.PageAttributes.OrientationRequestedType
The OrientationRequestedType instance to use for specifying a landscape orientation.
LANDSCAPE - Static variable in class java.awt.print.PageFormat
The origin is at the bottom left of the paper with x running bottom to top and y running left to right.
LANG - Static variable in class javax.swing.text.html.HTML.Attribute
LANGUAGE - Static variable in class java.text.AttributedCharacterIterator.Attribute
Attribute key for the language of some text.
LANGUAGE - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the preferred language to use with the service.
LANGUAGE - Static variable in class javax.swing.text.html.HTML.Attribute
LAO - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LARGE_MODEL_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for largeModel.
largeModel - Variable in class javax.swing.JTree
Is this tree a large model? This is a code-optimization setting.
largeModel - Variable in class javax.swing.plaf.basic.BasicTreeUI
True if doing optimizations for a largeModel.
LAST_DIVIDER_LOCATION_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property for lastLocation.
last() - Method in interface java.sql.ResultSet
Moves the cursor to the last row in this ResultSet object.
last() - Method in interface java.text.CharacterIterator
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
last() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.last() for String.
last() - Method in class java.text.BreakIterator
Return the last boundary.
last() - Method in class java.util.TreeSet
Returns the last (highest) element currently in this sorted set.
last() - Method in interface java.util.SortedSet
Returns the last (highest) element currently in this sorted set.
last() - Method in class javax.swing.text.Segment
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
last(Container) - Method in class java.awt.CardLayout
Flips to the last card of the container.
lastAlloc - Variable in class javax.swing.text.AsyncBoxView.ChildLocator
The last seen allocation (for repainting when changes are flushed upward).
lastColumn - Variable in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
lastDividerLocation - Variable in class javax.swing.JSplitPane
Previous location of the split pane.
lastEdit() - Method in class javax.swing.undo.CompoundEdit
Returns the last UndoableEdit in edits, or null if edits is empty
lastElement() - Method in class java.util.Vector
Returns the last component of the vector.
lastElement() - Method in class javax.swing.DefaultListModel
Returns the last component of the list.
lastIndexOf(int) - Method in class java.lang.String
Returns the index within this string of the last occurrence of the specified character.
lastIndexOf(int, int) - Method in class java.lang.String
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.
lastIndexOf(Object) - Method in class java.util.AbstractList
Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.
lastIndexOf(Object) - Method in class java.util.Vector
Returns the index of the last occurrence of the specified object in this vector.
lastIndexOf(Object) - Method in class java.util.LinkedList
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.
lastIndexOf(Object) - Method in interface java.util.List
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
lastIndexOf(Object) - Method in class java.util.ArrayList
Returns the index of the last occurrence of the specified object in this list.
lastIndexOf(Object) - Method in class javax.swing.DefaultListModel
Returns the index of the last occurrence of the specified object in this list.
lastIndexOf(Object, int) - Method in class java.util.Vector
Searches backwards for the specified object, starting from the specified index, and returns an index to it.
lastIndexOf(Object, int) - Method in class javax.swing.DefaultListModel
Searches backwards for the specified object, starting from the specified index, and returns an index to it.
lastIndexOf(String) - Method in class java.lang.String
Returns the index within this string of the rightmost occurrence of the specified substring.
lastIndexOf(String, int) - Method in class java.lang.String
Returns the index within this string of the last occurrence of the specified substring.
lastKey() - Method in class java.util.TreeMap
Returns the last (highest) key currently in this sorted map.
lastKey() - Method in interface java.util.SortedMap
Returns the last (highest) key currently in this sorted map.
lastModified() - Method in class java.io.File
Returns the time that the file denoted by this abstract pathname was last modified.
LastOwnerException - exception java.security.acl.LastOwnerException.
This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
LastOwnerException() - Constructor for class java.security.acl.LastOwnerException
Constructs a LastOwnerException.
lastPageFirst() - Method in class java.awt.PrintJob
Returns true if the last page will be printed first.
lastPaintPosition - Variable in class javax.swing.JViewport
The last viewPosition that we've painted, so we know how much of the backing store image is valid.
lastPath - Variable in class javax.swing.tree.DefaultTreeCellEditor
last path that was selected.
lastRow - Variable in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
lastRow - Variable in class javax.swing.event.TableModelEvent
lastRow - Variable in class javax.swing.tree.DefaultTreeCellEditor
Row that was last passed into getTreeCellEditorComponent.
lastSelectedRow - Variable in class javax.swing.plaf.basic.BasicTreeUI
Index of the row that was last selected.
lastTabInRun(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
lastValidOffset - Variable in class javax.swing.text.AsyncBoxView.ChildLocator
The location of the last offset calculation that is valid.
LATIN - Static variable in class java.awt.im.InputSubset
Constant for all Latin characters, including the characters in the BASIC_LATIN, LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B Unicode character blocks.
LATIN_1_SUPPLEMENT - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LATIN_DIGITS - Static variable in class java.awt.im.InputSubset
Constant for the digits included in the BASIC_LATIN Unicode character block.
LATIN_EXTENDED_A - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LATIN_EXTENDED_ADDITIONAL - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LATIN_EXTENDED_B - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LAYER_PROPERTY - Static variable in class javax.swing.JLayeredPane
Bound property
LAYERED_PANE - Static variable in class javax.accessibility.AccessibleRole
A specialized pane that allows its children to be drawn in layers, providing a form of stacking order.
LAYERED_PANE_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
LayeredHighlighter - class javax.swing.text.LayeredHighlighter.
LayeredHighlighter.LayerPainter - class javax.swing.text.LayeredHighlighter.LayerPainter.
Layered highlight renderer.
LayeredHighlighter.LayerPainter() - Constructor for class javax.swing.text.LayeredHighlighter.LayerPainter
LayeredHighlighter() - Constructor for class javax.swing.text.LayeredHighlighter
layeredPane - Variable in class javax.swing.JRootPane
The layered pane that manages the menu bar and content pane.
layout() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by doLayout().
layout() - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by doLayout().
layout() - Method in class java.awt.ScrollPane
Deprecated. As of JDK version 1.1, replaced by doLayout().
layout(FlowView) - Method in class javax.swing.text.FlowView.FlowStrategy
Update the flow on the given FlowView.
layout(int, int) - Method in class javax.swing.text.BoxView
Performs layout of the children.
layout(int, int) - Method in class javax.swing.text.FlowView
Lays out the children.
layoutChanged(int) - Method in class javax.swing.text.BoxView
Invalidate the layout along an axis.
layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle, Rectangle) - Method in class javax.swing.plaf.basic.BasicLabelUI
Forwards the call to SwingUtilities.layoutCompoundLabel().
layoutColumns(int, int[], int[], SizeRequirements[]) - Method in class javax.swing.text.TableView
Layout the columns to fit within the given target span.
layoutComboBox(Container, MetalComboBoxUI.MetalComboBoxLayoutManager) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
layoutCompoundLabel(FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle, Rectangle, int) - Static method in class javax.swing.SwingUtilities
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
layoutCompoundLabel(JComponent, FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle, Rectangle, int) - Static method in class javax.swing.SwingUtilities
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
layoutContainer(Container) - Method in class java.awt.CardLayout
Lays out the specified container using this card layout.
layoutContainer(Container) - Method in class java.awt.GridLayout
Lays out the specified container using this layout.
layoutContainer(Container) - Method in class java.awt.BorderLayout
Lays out the container argument using this border layout.
layoutContainer(Container) - Method in interface java.awt.LayoutManager
Lays out the container in the specified panel.
layoutContainer(Container) - Method in class java.awt.GridBagLayout
Lays out the specified container using this grid bag layout.
layoutContainer(Container) - Method in class java.awt.FlowLayout
Lays out the container.
layoutContainer(Container) - Method in class javax.swing.ViewportLayout
Called by the AWT when the specified container needs to be laid out.
layoutContainer(Container) - Method in class javax.swing.ScrollPaneLayout
Lay out the scrollpane.
layoutContainer(Container) - Method in class javax.swing.BoxLayout
Called by the AWT when the specified container needs to be laid out.
layoutContainer(Container) - Method in class javax.swing.OverlayLayout
Called by the AWT when the specified container needs to be laid out.
layoutContainer(Container) - Method in class javax.swing.JRootPane.RootLayout
Instructs the layout manager to perform the layout for the specified container.
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Does the actual layout.
layoutContainer(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
layoutContainer(Container) - Method in class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager
layoutHScrollbar(JScrollBar) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
layoutInfo - Variable in class java.awt.GridBagLayout
This field holds tha layout information for the gridbag.
layoutLabel(int, FontMetrics, int, String, Icon, Rectangle, Rectangle, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
layoutMajorAxis(int, int, int[], int[]) - Method in class javax.swing.text.BoxView
Perform layout for the major axis of the box (i.e.
layoutMajorAxis(int, int, int[], int[]) - Method in class javax.swing.text.TableView.TableRow
Perform layout for the major axis of the box (i.e.
layoutManager - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
LayoutManager that is created and placed into the split pane.
LayoutManager - interface java.awt.LayoutManager.
Defines the interface for classes that know how to layout Containers.
LayoutManager2 - interface java.awt.LayoutManager2.
Defines an interface for classes that know how to layout Containers based on a layout constraints object.
layoutMinorAxis(int, int, int[], int[]) - Method in class javax.swing.text.BoxView
Perform layout for the minor axis of the box (i.e.
layoutMinorAxis(int, int, int[], int[]) - Method in class javax.swing.text.TableView
Perform layout for the minor axis of the box (i.e.
layoutMinorAxis(int, int, int[], int[]) - Method in class javax.swing.text.TableView.TableRow
Perform layout for the minor axis of the box (i.e.
layoutMinorAxis(int, int, int[], int[]) - Method in class javax.swing.text.html.BlockView
Perform layout for the minor axis of the box (i.e.
layoutPool - Variable in class javax.swing.text.FlowView
These are the views that represent the child elements of the element this view represents (The logical view to translate to a physical view).
LayoutQueue - class javax.swing.text.LayoutQueue.
A queue of text layout tasks.
LayoutQueue() - Constructor for class javax.swing.text.LayoutQueue
Construct a layout queue.
layoutRow(FlowView, int, int) - Method in class javax.swing.text.FlowView.FlowStrategy
Creates a row of views that will fit within the layout span of the row.
layoutSpan - Variable in class javax.swing.text.FlowView
Default constraint against which the flow is created against.
layoutVScrollbar(JScrollBar) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
lazilyLoadDesktopProperty(String) - Method in class java.awt.Toolkit
an opportunity to lazily evaluate desktop property values.
LdapContext - interface javax.naming.ldap.LdapContext.
This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.
LdapReferralException - exception javax.naming.ldap.LdapReferralException.
This abstract class is used to represent an LDAP referral exception.
LdapReferralException() - Constructor for class javax.naming.ldap.LdapReferralException
Constructs a new instance of LdapReferralException.
LdapReferralException(String) - Constructor for class javax.naming.ldap.LdapReferralException
Constructs a new instance of LdapReferralException using the explanation supplied.
LEAD_DOTS - Static variable in class javax.swing.text.TabStop
LEAD_EQUALS - Static variable in class javax.swing.text.TabStop
LEAD_HYPHENS - Static variable in class javax.swing.text.TabStop
LEAD_NONE - Static variable in class javax.swing.text.TabStop
LEAD_SELECTION_PATH_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for leadSelectionPath.
LEAD_THICKLINE - Static variable in class javax.swing.text.TabStop
LEAD_UNDERLINE - Static variable in class javax.swing.text.TabStop
leadAnchorNotificationEnabled - Variable in class javax.swing.DefaultListSelectionModel
leadIndex - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Index of the lead path in selection.
LEADING - Static variable in class java.awt.FlowLayout
This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g.
LEADING - Static variable in interface javax.swing.SwingConstants
Identifies the leading edge of text for use with left-to-right and right-to-left languages.
LEADING - Static variable in class javax.swing.border.TitledBorder
Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.
leading(int) - Static method in class java.awt.font.TextHitInfo
Creates a TextHitInfo on the leading edge of the character at the specified charIndex.
leadPath - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Last path that was added.
leadRow - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Lead row.
leafIcon - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Icon used to show leaf nodes.
Lease - class java.rmi.dgc.Lease.
A lease contains a unique VM identifier and a lease duration.
Lease(VMID, long) - Constructor for class java.rmi.dgc.Lease
Constructs a lease with a specific VMID and lease duration.
leave(InetAddress) - Method in class java.net.DatagramSocketImpl
Leave the multicast group.
leaveGroup(InetAddress) - Method in class java.net.MulticastSocket
Leave a multicast group.
LEDGER - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Ledger, 11 x 17 in.
left - Variable in class java.awt.Insets
The inset from the left.
left - Variable in class javax.swing.border.EmptyBorder
LEFT - Static variable in class java.awt.Event
The Left Arrow key, a non-ASCII action key.
LEFT - Static variable in class java.awt.Label
Indicates that the label should be left justified.
LEFT - Static variable in class java.awt.FlowLayout
This value indicates that each row of components should be left-justified.
LEFT - Static variable in interface javax.swing.SwingConstants
Box-orientation constant used to specify the left side of a box.
LEFT - Static variable in class javax.swing.JSplitPane
Used to add a Component to the left of the other Component.
LEFT - Static variable in class javax.swing.border.TitledBorder
Position title text at the left side of the border line.
LEFT_ALIGNMENT - Static variable in class java.awt.Component
Ease-of-use constant for getAlignmentX.
LEFT_TO_RIGHT - Static variable in class java.awt.ComponentOrientation
Items run left to right and lines flow top to bottom Examples: English, French.
leftButton - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Button for quickly toggling the left component.
leftChildIndent - Variable in class javax.swing.plaf.basic.BasicTreeUI
Distance between left margin and where verical dashes will be drawn.
leftComponent - Variable in class javax.swing.JSplitPane
The left or top component.
LeftIndent - Static variable in class javax.swing.text.StyleConstants
The amount to indent the left side of the paragraph.
LeftIndent - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount to indent the left side of the paragraph.
leftKey - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
Deprecated. As of Java 2 platform v1.3.
leftKey - Variable in class javax.swing.plaf.basic.BasicToolBarUI
Deprecated. As of Java 2 platform v1.3.
leftKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
leftToRightCache - Variable in class javax.swing.plaf.basic.BasicSliderUI
LEGAL - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_LEGAL.
len - Variable in class java.util.zip.InflaterInputStream
Length of input buffer.
length - Variable in class java.io.OptionalDataException
The number of bytes of primitive data available to be read in the current buffer.
length - Variable in class javax.sound.midi.MidiMessage
The number of bytes in the MIDI message, including the status byte and any data bytes.
length() - Method in class java.io.File
Returns the length of the file denoted by this abstract pathname.
length() - Method in class java.io.RandomAccessFile
Returns the length of this file.
length() - Method in class java.lang.String
Returns the length of this string.
length() - Method in class java.lang.StringBuffer
Returns the length (character count) of this string buffer.
length() - Method in interface java.sql.Blob
Returns the number of bytes in the BLOB value designated by this Blob object.
length() - Method in interface java.sql.Clob
Returns the number of characters in the CLOB value designated by this Clob object.
length() - Method in class java.util.BitSet
Returns the "logical size" of this BitSet: the index of the highest set bit in the BitSet plus one.
length() - Method in interface javax.swing.text.AbstractDocument.Content
Current length of the sequence of character content.
length() - Method in class javax.swing.text.StringContent
Returns the length of the content.
length() - Method in class javax.swing.text.GapContent
Returns the length of the content.
length() - Method in class org.omg.CORBA.TypeCode
Returns the number of elements in the type described by this TypeCode object.
length() - Method in interface org.omg.CORBA.DynSequence
Returns the length of the sequence represented by this DynFixed object.
length(int) - Method in interface org.omg.CORBA.DynSequence
Sets the length of the sequence represented by this DynFixed object to the given argument.
LETTER - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_LETTER.
LETTER_NUMBER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
LETTER_SPACING - Static variable in class javax.swing.text.html.CSS.Attribute
LETTERLIKE_SYMBOLS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
LI - Static variable in class javax.swing.text.html.HTML.Tag
LIGATURE - Static variable in class java.awt.font.GlyphMetrics
Indicates a glyph that represents multiple characters as a ligature, for example 'fi' or 'ffi'.
LIGHT - Static variable in class javax.swing.plaf.metal.MetalIconFactory
lightGray - Static variable in class java.awt.Color
The color light gray.
lightHighlight - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
lightHighlight - Variable in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
lightHighlight - Variable in class javax.swing.plaf.basic.BasicBorders.FieldBorder
lightWeightPopupEnabled - Variable in class javax.swing.ToolTipManager
lightWeightPopupEnabled - Variable in class javax.swing.JComboBox
LimitExceededException - exception javax.naming.LimitExceededException.
This exception is thrown when a method terminates abnormally due to a user or system specified limit.
LimitExceededException() - Constructor for class javax.naming.LimitExceededException
Constructs a new instance of LimitExceededException with all name resolution fields and explanation initialized to null.
LimitExceededException(String) - Constructor for class javax.naming.LimitExceededException
Constructs a new instance of LimitExceededException using an explanation.
Line - interface javax.sound.sampled.Line.
The Line interface represents a mono or multi-channel audio feed.
LINE_HEIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
LINE_IN - Static variable in class javax.sound.sampled.Port.Info
A type of port that gets audio from a line-level audio input jack.
LINE_OUT - Static variable in class javax.sound.sampled.Port.Info
A type of port that sends audio to a line-level audio output jack.
LINE_SEPARATOR - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
Line.Info - class javax.sound.sampled.Line.Info.
A Line.Info object contains information about a line.
Line.Info(Class) - Constructor for class javax.sound.sampled.Line.Info
Constructs an info object that describes a line of the specified class.
Line2D - class java.awt.geom.Line2D.
This Line2D class represents a line segment in (x, y) coordinate space.
Line2D.Double - class java.awt.geom.Line2D.Double.
A line segment specified with double coordinates.
Line2D.Double() - Constructor for class java.awt.geom.Line2D.Double
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Double(double, double, double, double) - Constructor for class java.awt.geom.Line2D.Double
Constructs and initializes a Line2D from the specified coordinates.
Line2D.Double(Point2D, Point2D) - Constructor for class java.awt.geom.Line2D.Double
Constructs and initializes a Line2D from the specified Point2D objects.
Line2D.Float - class java.awt.geom.Line2D.Float.
A line segment specified with float coordinates.
Line2D.Float() - Constructor for class java.awt.geom.Line2D.Float
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Float(float, float, float, float) - Constructor for class java.awt.geom.Line2D.Float
Constructs and initializes a Line from the specified coordinates.
Line2D.Float(Point2D, Point2D) - Constructor for class java.awt.geom.Line2D.Float
Constructs and initializes a Line2D from the specified Point2D objects.
Line2D() - Constructor for class java.awt.geom.Line2D
This is an abstract class that cannot be instantiated directly.
LineBorder - class javax.swing.border.LineBorder.
A class which implements a line border of arbitrary thickness and of a single color.
LineBorder(Color) - Constructor for class javax.swing.border.LineBorder
Creates a line border with the specified color and a thickness = 1.
LineBorder(Color, int) - Constructor for class javax.swing.border.LineBorder
Creates a line border with the specified color and thickness.
LineBorder(Color, int, boolean) - Constructor for class javax.swing.border.LineBorder
Creates a line border with the specified color, thickness, and corner shape.
LineBreakMeasurer - class java.awt.font.LineBreakMeasurer.
The LineBreakMeasurer class allows styled text to be broken into lines (or segments) that fit within a particular visual advance.
LineBreakMeasurer(AttributedCharacterIterator, BreakIterator, FontRenderContext) - Constructor for class java.awt.font.LineBreakMeasurer
Constructs a LineBreakMeasurer for the specified text.
LineBreakMeasurer(AttributedCharacterIterator, FontRenderContext) - Constructor for class java.awt.font.LineBreakMeasurer
Constructs a LineBreakMeasurer for the specified text.
lineColor - Variable in class javax.swing.border.LineBorder
LineEvent - class javax.sound.sampled.LineEvent.
The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.
LineEvent.Type - class javax.sound.sampled.LineEvent.Type.
The LineEvent.Type inner class identifies what kind of event occurred on a line.
LineEvent.Type(String) - Constructor for class javax.sound.sampled.LineEvent.Type
Constructs a new event type.
LineEvent(Line, LineEvent.Type, long) - Constructor for class javax.sound.sampled.LineEvent
Constructs a new event of the specified type, originating from the specified line.
lineLimitAttribute - Static variable in class javax.swing.text.PlainDocument
Name of the attribute that specifies the maximum length of a line, if there is a maximum length.
LineListener - interface javax.sound.sampled.LineListener.
Instances of classes that implement the LineListener interface can register to receive events when a line's status changes.
LineMetrics - class java.awt.font.LineMetrics.
The LineMetrics class allows access to the metrics needed to layout characters along a line and to layout of a set of lines.
LineMetrics() - Constructor for class java.awt.font.LineMetrics
lineno() - Method in class java.io.StreamTokenizer
Return the current line number.
LineNumberInputStream - class java.io.LineNumberInputStream.
Deprecated. This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.
LineNumberInputStream(InputStream) - Constructor for class java.io.LineNumberInputStream
Deprecated. Constructs a newline number input stream that reads its input from the specified input stream.
LineNumberReader - class java.io.LineNumberReader.
A buffered character-input stream that keeps track of line numbers.
LineNumberReader(Reader) - Constructor for class java.io.LineNumberReader
Create a new line-numbering reader, using the default input-buffer size.
LineNumberReader(Reader, int) - Constructor for class java.io.LineNumberReader
Create a new line-numbering reader, reading characters into a buffer of the given size.
linesIntersect(double, double, double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Tests if the line segment from (X1, Y1) to (X2, Y2) intersects the line segment from (X3, Y3) to (X4, Y4).
LineSpacing - Static variable in class javax.swing.text.StyleConstants
The amount of space between lines of the paragraph.
LineSpacing - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount of space between lines of the paragraph.
lineTo(float, float) - Method in class java.awt.geom.GeneralPath
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates.
LineUnavailableException - exception javax.sound.sampled.LineUnavailableException.
A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
LineUnavailableException() - Constructor for class javax.sound.sampled.LineUnavailableException
Constructs a LineUnavailableException that has null as its error detail message.
LineUnavailableException(String) - Constructor for class javax.sound.sampled.LineUnavailableException
Constructs a LineUnavailableException that has the specified detail message.
LINK - Static variable in class javax.swing.text.html.HTML.Tag
LINK - Static variable in class javax.swing.text.html.HTML.Attribute
LinkageError - error java.lang.LinkageError.
Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
LinkageError() - Constructor for class java.lang.LinkageError
Constructs a LinkageError with no detail message.
LinkageError(String) - Constructor for class java.lang.LinkageError
Constructs a LinkageError with the specified detail message.
LinkedList - class java.util.LinkedList.
Linked list implementation of the List interface.
LinkedList() - Constructor for class java.util.LinkedList
Constructs an empty list.
LinkedList(Collection) - Constructor for class java.util.LinkedList
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
LinkException - exception javax.naming.LinkException.
This exception is used to describe problems encounter while resolving links.
LinkException() - Constructor for class javax.naming.LinkException
Constructs a new instance of LinkException.
LinkException(String) - Constructor for class javax.naming.LinkException
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
linkExplanation - Variable in class javax.naming.LinkException
Contains the exception of why resolution of the link failed.
LinkLoopException - exception javax.naming.LinkLoopException.
This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
LinkLoopException() - Constructor for class javax.naming.LinkLoopException
Constructs a new instance of LinkLoopException.
LinkLoopException(String) - Constructor for class javax.naming.LinkLoopException
Constructs a new instance of LinkLoopException with an explanation All the other fields are initialized to null.
LinkRef - class javax.naming.LinkRef.
This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
LinkRef(Name) - Constructor for class javax.naming.LinkRef
Constructs a LinkRef for a name.
LinkRef(String) - Constructor for class javax.naming.LinkRef
Constructs a LinkRef for a string name.
linkRemainingName - Variable in class javax.naming.LinkException
Contains the remaining link name that has not been resolved yet.
linkResolvedName - Variable in class javax.naming.LinkException
Contains the part of the link that has been successfully resolved.
linkResolvedObj - Variable in class javax.naming.LinkException
Contains the object to which resolution of the part of the link was successful.
list - Variable in class javax.swing.plaf.basic.BasicComboPopup
list - Variable in class javax.swing.plaf.basic.BasicListUI
List - class java.awt.List.
The List component presents the user with a scrolling list of text items.
List - interface java.util.List.
An ordered collection (also known as a sequence).
LIST - Static variable in class javax.accessibility.AccessibleRole
An object that presents a list of objects to the user and allows the user to select one or more of them.
LIST_DESELECT - Static variable in class java.awt.Event
An item in a list has been deselected.
list_initial_services() - Method in class org.omg.CORBA.ORB
Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
LIST_ITEM - Static variable in class javax.accessibility.AccessibleRole
An object that presents an element in a list.
LIST_SELECT - Static variable in class java.awt.Event
An item in a list has been selected.
LIST_STYLE - Static variable in class javax.swing.text.html.CSS.Attribute
LIST_STYLE_IMAGE - Static variable in class javax.swing.text.html.CSS.Attribute
LIST_STYLE_POSITION - Static variable in class javax.swing.text.html.CSS.Attribute
LIST_STYLE_TYPE - Static variable in class javax.swing.text.html.CSS.Attribute
List.AccessibleAWTList - class java.awt.List.AccessibleAWTList.
This class implements accessibility support for the List class.
List.AccessibleAWTList.AccessibleAWTListChild - class java.awt.List.AccessibleAWTList.AccessibleAWTListChild.
This class implements accessibility support for List children.
List.AccessibleAWTList.AccessibleAWTListChild(List.AccessibleAWTList, List, int) - Constructor for class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
List.AccessibleAWTList(List) - Constructor for class java.awt.List.AccessibleAWTList
list() - Method in class java.awt.Component
Prints a listing of this component to the standard system output stream System.out.
list() - Method in class java.io.File
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.
list() - Method in class java.lang.ThreadGroup
Prints information about this thread group to the standard output.
list() - Method in interface java.rmi.registry.Registry
Returns an array of the names bound in the registry.
List() - Constructor for class java.awt.List
Creates a new scrolling list.
list(FilenameFilter) - Method in class java.io.File
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
List(int) - Constructor for class java.awt.List
Creates a new scrolling list initialized with the specified number of visible lines.
list(int, BindingListHolder, BindingIteratorHolder) - Method in class org.omg.CosNaming._NamingContextStub
list(int, BindingListHolder, BindingIteratorHolder) - Method in interface org.omg.CosNaming.NamingContextOperations
The list operation allows a client to iterate through a set of bindings in a naming context.
List(int, boolean) - Constructor for class java.awt.List
Creates a new scrolling list initialized to display the specified number of rows.
list(Name) - Method in class javax.naming.InitialContext
list(Name) - Method in interface javax.naming.Context
Enumerates the names bound in the named context, along with the class names of objects bound to them.
list(PrintStream) - Method in class java.awt.Component
Prints a listing of this component to the specified output stream.
list(PrintStream) - Method in class java.util.Properties
Prints this property list out to the specified output stream.
list(PrintStream, int) - Method in class java.awt.Component
Prints out a list, starting at the specified indention, to the specified print stream.
list(PrintStream, int) - Method in class java.awt.Container
Prints a listing of this container to the specified output stream.
list(PrintWriter) - Method in class java.awt.Component
Prints a listing to the specified print writer.
list(PrintWriter) - Method in class java.util.Properties
Prints this property list out to the specified output stream.
list(PrintWriter, int) - Method in class java.awt.Component
Prints out a list, starting at the specified indention, to the specified print writer.
list(PrintWriter, int) - Method in class java.awt.Container
Prints out a list, starting at the specified indention, to the specified print writer.
list(String) - Static method in class java.rmi.Naming
Returns an array of the names bound in the registry.
list(String) - Method in class javax.naming.InitialContext
list(String) - Method in interface javax.naming.Context
Enumerates the names bound in the named context, along with the class names of objects bound to them.
listBindings(Name) - Method in class javax.naming.InitialContext
listBindings(Name) - Method in interface javax.naming.Context
Enumerates the names bound in the named context, along with the objects bound to them.
listBindings(String) - Method in class javax.naming.InitialContext
listBindings(String) - Method in interface javax.naming.Context
Enumerates the names bound in the named context, along with the objects bound to them.
listBox - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
listBox - Variable in class javax.swing.plaf.metal.MetalComboBoxButton
ListCellRenderer - interface javax.swing.ListCellRenderer.
Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListDataEvent - class javax.swing.event.ListDataEvent.
Defines an event that encapsulates changes to a list.
ListDataEvent(Object, int, int, int) - Constructor for class javax.swing.event.ListDataEvent
Constructs a ListDataEvent object.
listDataListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
listDataListener - Variable in class javax.swing.plaf.basic.BasicListUI
listDataListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
ListDataListener - interface javax.swing.event.ListDataListener.
ListDataListener
listen(int) - Method in class java.net.SocketImpl
Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.
listenerList - Variable in class javax.swing.DefaultSingleSelectionModel
The collection of registered listeners
listenerList - Variable in class javax.swing.JComponent
listenerList - Variable in class javax.swing.DefaultBoundedRangeModel
The listeners waiting for model changes.
listenerList - Variable in class javax.swing.AbstractListModel
listenerList - Variable in class javax.swing.MenuSelectionManager
listenerList - Variable in class javax.swing.AbstractCellEditor
listenerList - Variable in class javax.swing.DefaultListSelectionModel
listenerList - Variable in class javax.swing.Timer
listenerList - Variable in class javax.swing.DefaultButtonModel
listenerList - Variable in class javax.swing.colorchooser.DefaultColorSelectionModel
listenerList - Variable in class javax.swing.event.EventListenerList
listenerList - Variable in class javax.swing.table.AbstractTableModel
List of listeners
listenerList - Variable in class javax.swing.table.DefaultTableColumnModel
List of TableColumnModelListener
listenerList - Variable in class javax.swing.text.StyleContext.NamedStyle
The change listeners for the model.
listenerList - Variable in class javax.swing.text.AbstractDocument
The event listener list for the document.
listenerList - Variable in class javax.swing.text.DefaultCaret
The event listener list.
listenerList - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Event listener list.
listenerList - Variable in class javax.swing.tree.DefaultTreeModel
Listeners.
listeners - Variable in class javax.swing.undo.UndoableEditSupport
listFiles() - Method in class java.io.File
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
listFiles(FileFilter) - Method in class java.io.File
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
listFiles(FilenameFilter) - Method in class java.io.File
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
ListIterator - interface java.util.ListIterator.
An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.
listIterator() - Method in class java.util.AbstractList
Returns an iterator of the elements in this list (in proper sequence).
listIterator() - Method in interface java.util.List
Returns a list iterator of the elements in this list (in proper sequence).
listIterator(int) - Method in class java.util.AbstractList
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
listIterator(int) - Method in class java.util.AbstractSequentialList
Returns a list iterator over the elements in this list (in proper sequence).
listIterator(int) - Method in class java.util.LinkedList
Returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
listIterator(int) - Method in interface java.util.List
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
ListModel - interface javax.swing.ListModel.
This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
listMouseListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
listMouseMotionListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
ListResourceBundle - class java.util.ListResourceBundle.
ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
ListResourceBundle() - Constructor for class java.util.ListResourceBundle
Sole constructor.
listRoots() - Static method in class java.io.File
List the available filesystem roots.
ListSelectionEvent - class javax.swing.event.ListSelectionEvent.
An event that characterizes a change in the current selection.
ListSelectionEvent(Object, int, int, boolean) - Constructor for class javax.swing.event.ListSelectionEvent
Represents a change in selection status between firstIndex and lastIndex inclusive (firstIndex is less than or equal to lastIndex).
listSelectionListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
listSelectionListener - Variable in class javax.swing.plaf.basic.BasicListUI
ListSelectionListener - interface javax.swing.event.ListSelectionListener.
The listener that's notified when a lists selection value changes.
listSelectionModel - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Handles maintaining the list selection model.
ListSelectionModel - interface javax.swing.ListSelectionModel.
This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
ListUI - class javax.swing.plaf.ListUI.
The JList pluggable look and feel delegate.
ListUI() - Constructor for class javax.swing.plaf.ListUI
ListView - class javax.swing.text.html.ListView.
A view implementation to display an html list
ListView(Element) - Constructor for class javax.swing.text.html.ListView
Creates a new view that represents a list element.
listViewIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
LIVE_DRAG_MODE - Static variable in class javax.swing.JDesktopPane
Used to indicate you wish to see the entire contents of the item being dragged inside the desktop pane.
LOAD - Static variable in class java.awt.FileDialog
This constant value indicates that the purpose of the file dialog window is to locate a file from which to read.
LOAD_FILE - Static variable in class java.awt.Event
A file loading event.
load(InputStream) - Method in class java.security.Provider
Reads a property list (key and element pairs) from the input stream.
load(InputStream) - Method in class java.util.Properties
Reads a property list (key and element pairs) from the input stream.
load(InputStream, char[]) - Method in class java.security.KeyStore
Loads this KeyStore from the given input stream.
load(String) - Static method in class java.lang.System
Loads a code file with the specified filename from the local file system as a dynamic library.
load(String) - Method in class java.lang.Runtime
Loads the specified filename as a dynamic library.
loadAllInstruments(Soundbank) - Method in interface javax.sound.midi.Synthesizer
Loads onto the Synthesizer all instruments contained in the specified Soundbank.
loadChildren() - Method in class javax.swing.JTree.DynamicUtilTreeNode
Loads the children based on childValue.
loadChildren(ViewFactory) - Method in class javax.swing.text.CompositeView
Loads all of the children to initialize the view.
loadChildren(ViewFactory) - Method in class javax.swing.text.FlowView
Loads all of the children to initialize the view.
loadChildren(ViewFactory) - Method in class javax.swing.text.AsyncBoxView
Loads all of the children to initialize the view.
loadChildren(ViewFactory) - Method in class javax.swing.text.WrappedPlainView
Loads all of the children to initialize the view.
loadChildren(ViewFactory) - Method in class javax.swing.text.ZoneView
Loads all of the children to initialize the view.
loadClass(String) - Method in class java.lang.ClassLoader
Loads the class with the specified name.
loadClass(String) - Static method in class java.rmi.server.RMIClassLoader
Deprecated. replaced by loadClass(String,String) method
loadClass(String) - Method in interface java.rmi.server.LoaderHandler
Deprecated. no replacement
loadClass(String, boolean) - Method in class java.lang.ClassLoader
Loads the class with the specified name.
loadClass(String, String) - Static method in class java.rmi.server.RMIClassLoader
Loads a class from a codebase URL path.
loadClass(String, String, ClassLoader) - Static method in class javax.rmi.CORBA.Util
Returns a class instance for the specified class.
loadClass(String, String, ClassLoader) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).
loadClass(URL, String) - Static method in class java.rmi.server.RMIClassLoader
Loads a class from a codebase URL.
loadClass(URL, String) - Method in interface java.rmi.server.LoaderHandler
Deprecated. no replacement
loadedChildren - Variable in class javax.swing.JTree.DynamicUtilTreeNode
Have the children been loaded yet?
LoaderHandler - interface java.rmi.server.LoaderHandler.
Deprecated. no replacement
loadImage(Image) - Method in class javax.swing.ImageIcon
Loads the image, returning only when the image is loaded.
loadImage(String) - Method in class java.beans.SimpleBeanInfo
This is a utility method to help in loading icon images.
LOADING - Static variable in class java.awt.MediaTracker
Flag indicating some media is currently being loaded.
loadInstrument(Instrument) - Method in interface javax.sound.midi.Synthesizer
Makes a particular instrument available for synthesis.
loadInstruments(Soundbank, Patch[]) - Method in interface javax.sound.midi.Synthesizer
Loads the instruments referenced by the specified patches, from the specified Soundbank.
loadKeyBindings(InputMap, Object[]) - Static method in class javax.swing.LookAndFeel
Loads the bindings in keys into retMap.
loadKeymap(Keymap, JTextComponent.KeyBinding[], Action[]) - Static method in class javax.swing.text.JTextComponent
Loads a keymap with a bunch of bindings.
loadLibrary(String) - Static method in class java.lang.System
Loads the system library specified by the libname argument.
loadLibrary(String) - Method in class java.lang.Runtime
Loads the dynamic library with the specified library name.
loadRules(Reader, URL) - Method in class javax.swing.text.html.StyleSheet
Loads a set of rules that have been specified in terms of CSS1 grammar.
loadSystemColors(int[]) - Method in class java.awt.Toolkit
Fills in the integer array that is supplied as an argument with the current system color values.
loadSystemColors(UIDefaults, String[], boolean) - Method in class javax.swing.plaf.basic.BasicLookAndFeel
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants.
localControl(boolean) - Method in interface javax.sound.midi.MidiChannel
Turns local control on or off.
locale - Variable in class java.beans.beancontext.BeanContextSupport
The current locale of this BeanContext.
Locale - class java.util.Locale.
A Locale object represents a specific geographical, political, or cultural region.
Locale(String, String) - Constructor for class java.util.Locale
Construct a locale from language, country.
Locale(String, String, String) - Constructor for class java.util.Locale
Construct a locale from language, country, variant.
localport - Variable in class java.net.SocketImpl
The local port number to which this socket is connected.
localPort - Variable in class java.net.DatagramSocketImpl
The local port number.
locate(int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
locate(int, int) - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
LocateRegistry - class java.rmi.registry.LocateRegistry.
LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.
location() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getLocation().
location(int, int) - Method in class java.awt.GridBagLayout
Determines which cell in the layout grid contains the point specified by (x, y).
locationToIndex(JList, Point) - Method in class javax.swing.plaf.ListUI
Convert a point in JList coordinates to the index of the cell at that location.
locationToIndex(JList, Point) - Method in class javax.swing.plaf.basic.BasicListUI
locationToIndex(JList, Point) - Method in class javax.swing.plaf.multi.MultiListUI
Call locationToIndex on each UI handled by this MultiUI.
locationToIndex(Point) - Method in class javax.swing.JList
Converts a point in JList coordinates to the index of the cell at that location.
locator - Variable in class javax.swing.text.AsyncBoxView
Object that manages the offsets of the children.
lock - Variable in class java.io.Reader
The object used to synchronize operations on this stream.
lock - Variable in class java.io.Writer
The object used to synchronize operations on this stream.
LOG_OPTION - Static variable in class javax.swing.DebugGraphics
Log graphics operations.
log(double) - Static method in class java.lang.StrictMath
Returns the natural logarithm (base e) of a double value.
log(double) - Static method in class java.lang.Math
Returns the natural logarithm (base e) of a double value.
log(String) - Static method in class java.rmi.server.LogStream
Deprecated. no replacement
LOGICAL_STYLE_ACTION - Static variable in class javax.swing.text.html.HTMLEditorKit
The logical style choice action identifier The logical style is passed in as an argument
LogStream - class java.rmi.server.LogStream.
Deprecated. no replacement
logStream() - Static method in class javax.swing.DebugGraphics
Returns the stream to which the DebugGraphics logs drawing operations.
Long - class java.lang.Long.
The Long class wraps a value of the primitive type long in an object.
LONG - Static variable in class java.text.DateFormat
Constant for long style pattern.
LONG - Static variable in class java.util.TimeZone
A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
LONG_DESCRIPTION - Static variable in interface javax.swing.Action
The key used for storing a longer description for the action, could be used for context-sensitive help.
Long(long) - Constructor for class java.lang.Long
Constructs a newly allocated Long object that represents the primitive long argument.
Long(String) - Constructor for class java.lang.Long
Constructs a newly allocated Long object that represents the value represented by the string in decimal form.
longBitsToDouble(long) - Static method in class java.lang.Double
Returns the double-float corresponding to a given bit represention.
LongHolder - class org.omg.CORBA.LongHolder.
A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods.
LongHolder() - Constructor for class org.omg.CORBA.LongHolder
Constructs a new LongHolder object with its value field initialized to 0.
LongHolder(long) - Constructor for class org.omg.CORBA.LongHolder
Constructs a new LongHolder object with its value field initialized to the given long.
LongLongSeqHelper - class org.omg.CORBA.LongLongSeqHelper.
org/omg/CORBA/LongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
LongLongSeqHelper() - Constructor for class org.omg.CORBA.LongLongSeqHelper
LongLongSeqHolder - class org.omg.CORBA.LongLongSeqHolder.
org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongLongSeqHolder() - Constructor for class org.omg.CORBA.LongLongSeqHolder
LongLongSeqHolder(long[]) - Constructor for class org.omg.CORBA.LongLongSeqHolder
LongSeqHelper - class org.omg.CORBA.LongSeqHelper.
org/omg/CORBA/LongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongSeqHelper() - Constructor for class org.omg.CORBA.LongSeqHelper
LongSeqHolder - class org.omg.CORBA.LongSeqHolder.
org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongSeqHolder() - Constructor for class org.omg.CORBA.LongSeqHolder
LongSeqHolder(int[]) - Constructor for class org.omg.CORBA.LongSeqHolder
longValue() - Method in class java.lang.Number
Returns the value of the specified number as a long.
longValue() - Method in class java.lang.Long
Returns the value of this Long as a long value.
longValue() - Method in class java.lang.Short
Returns the value of this Short as a long.
longValue() - Method in class java.lang.Float
Returns the long value of this Float (by casting to a long).
longValue() - Method in class java.lang.Integer
Returns the value of this Integer as a long.
longValue() - Method in class java.lang.Byte
Returns the value of this Byte as a long.
longValue() - Method in class java.lang.Double
Returns the long value of this Double (by casting to a long).
longValue() - Method in class java.math.BigInteger
Converts this BigInteger to a long.
longValue() - Method in class java.math.BigDecimal
Converts this BigDecimal to a long.
LONGVARBINARY - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
LONGVARCHAR - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
LookAndFeel - class javax.swing.LookAndFeel.
Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
LookAndFeel() - Constructor for class javax.swing.LookAndFeel
lookup_value_factory(String) - Method in class org.omg.CORBA_2_3.ORB
lookup(Class) - Static method in class java.io.ObjectStreamClass
Find the descriptor for a class that can be serialized.
lookup(Name) - Method in class javax.naming.InitialContext
lookup(Name) - Method in interface javax.naming.Context
Retrieves the named object.
lookup(String) - Static method in class java.rmi.Naming
Returns a reference, a stub, for the remote object associated with the specified name.
lookup(String) - Method in interface java.rmi.registry.Registry
Returns a reference, a stub, for the remote object associated with the specified name.
lookup(String) - Method in class javax.naming.InitialContext
lookup(String) - Method in interface javax.naming.Context
Retrieves the named object.
lookupConstraints(Component) - Method in class java.awt.GridBagLayout
Retrieves the constraints for the specified component.
lookupLink(Name) - Method in class javax.naming.InitialContext
lookupLink(Name) - Method in interface javax.naming.Context
Retrieves the named object, following links except for the terminal atomic component of the name.
lookupLink(String) - Method in class javax.naming.InitialContext
lookupLink(String) - Method in interface javax.naming.Context
Retrieves the named object, following links except for the terminal atomic component of the name.
LookupOp - class java.awt.image.LookupOp.
This class implements a lookup operation from the source to the destination.
LookupOp(LookupTable, RenderingHints) - Constructor for class java.awt.image.LookupOp
Constructs a LookupOp object given the lookup table and a RenderingHints object (which may be null).
lookupPixel(byte[], byte[]) - Method in class java.awt.image.ByteLookupTable
Returns an array of samples of a pixel, translated with the lookup table.
lookupPixel(int[], int[]) - Method in class java.awt.image.LookupTable
Returns an int array of components for one pixel.
lookupPixel(int[], int[]) - Method in class java.awt.image.ByteLookupTable
Returns an array of samples of a pixel, translated with the lookup table.
lookupPixel(int[], int[]) - Method in class java.awt.image.ShortLookupTable
Returns an array of samples of a pixel, translated with the lookup table.
lookupPixel(short[], short[]) - Method in class java.awt.image.ShortLookupTable
Returns an array of samples of a pixel, translated with the lookup table.
LookupTable - class java.awt.image.LookupTable.
This abstract class defines a lookup table object.
LookupTable(int, int) - Constructor for class java.awt.image.LookupTable
Constructs a new LookupTable from the number of components and an offset into the lookup table.
LOOP_CONTINUOUSLY - Static variable in interface javax.sound.sampled.Clip
A value indicating that looping should continue indefinitely rather than complete after a specific number of loops.
loop() - Method in interface java.applet.AudioClip
Starts playing this audio clip in a loop.
loop(int) - Method in interface javax.sound.sampled.Clip
Starts looping playback from the current position.
LOST_FOCUS - Static variable in class java.awt.Event
A component lost the focus.
lostFocus(Event, Object) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
lostOwnership(Clipboard, Transferable) - Method in class java.awt.datatransfer.StringSelection
lostOwnership(Clipboard, Transferable) - Method in interface java.awt.datatransfer.ClipboardOwner
Notifies this object that it is no longer the owner of the contents of the clipboard.
LOWER_LEADING_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the lower leading edge corner of the viewport.
LOWER_LEFT_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the lower left corner of the viewport.
LOWER_RIGHT_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the lower right corner of the viewport.
LOWER_TRAILING_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the lower trailing edge corner of the viewport.
LOWERCASE_LETTER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
lowerCaseMode(boolean) - Method in class java.io.StreamTokenizer
Determines whether or not word token are automatically lowercased.
LOWERED - Static variable in class javax.swing.border.BevelBorder
Lowered bevel type.
LOWERED - Static variable in class javax.swing.border.EtchedBorder
Lowered etched type.
lowerLeft - Variable in class javax.swing.ScrollPaneLayout
The component to display in the lower left corner.
lowerLeft - Variable in class javax.swing.JScrollPane
The component to display in the lower left corner.
lowerRight - Variable in class javax.swing.ScrollPaneLayout
The component to display in the lower right corner.
lowerRight - Variable in class javax.swing.JScrollPane
The component to display in the lower right corner.
lowestLayer() - Method in class javax.swing.JLayeredPane
Returns the lowest layer value from all current children.
LOWSRC - Static variable in class javax.swing.text.html.HTML.Attribute
lt(File, File) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


M-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

M

magenta - Static variable in class java.awt.Color
The color magenta.
MAIN_CLASS - Static variable in class java.util.jar.Attributes.Name
Name object for Main-Class manifest attribute used for launching applications packaged in JAR files.
majorRequirementChange(AsyncBoxView.ChildState, float) - Method in class javax.swing.text.AsyncBoxView
Requirements changed along the major axis.
majorTickSpacing - Variable in class javax.swing.JSlider
The number of values between the major tick marks -- the larger marks that break up the minor tick marks.
makeBounds(double, double, double, double) - Method in class java.awt.geom.Arc2D
Constructs a Rectangle2D of the appropriate precision to hold the parameters calculated to be the bounding box of this arc.
makeBounds(double, double, double, double) - Method in class java.awt.geom.Arc2D.Float
Return the high-precision bounding box of the arc.
makeBounds(double, double, double, double) - Method in class java.awt.geom.Arc2D.Double
Returns the high-precision bounding box of the arc.
makeComponentInputMap(JComponent, Object[]) - Static method in class javax.swing.LookAndFeel
Creates a ComponentInputMap from keys.
makeIcon(Class, String) - Static method in class javax.swing.LookAndFeel
Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.
makeInputMap(Object[]) - Static method in class javax.swing.LookAndFeel
Creates a InputMap from keys.
makeKeyBindings(Object[]) - Static method in class javax.swing.LookAndFeel
Convenience method for building lists of KeyBindings.
makeTag(Element) - Method in class javax.swing.text.html.parser.Parser
makeTag(Element, boolean) - Method in class javax.swing.text.html.parser.Parser
Makes a TagElement.
makeVisible(int) - Method in class java.awt.List
Makes the item at the specified index visible.
makeVisible(TreePath) - Method in class javax.swing.JTree
Ensures that the node identified by path is currently viewable.
MALAYALAM - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
MalformedLinkException - exception javax.naming.MalformedLinkException.
This exception is thrown when a malformed link was encountered while resolving or constructing a link.
MalformedLinkException() - Constructor for class javax.naming.MalformedLinkException
Constructs a new instance of Malformed LinkException.
MalformedLinkException(String) - Constructor for class javax.naming.MalformedLinkException
Constructs a new instance of MalformedLinkException with an explanation All the other fields are initialized to null.
MalformedURLException - exception java.net.MalformedURLException.
Thrown to indicate that a malformed URL has occurred.
MalformedURLException() - Constructor for class java.net.MalformedURLException
Constructs a MalformedURLException with no detail message.
MalformedURLException(String) - Constructor for class java.net.MalformedURLException
Constructs a MalformedURLException with the specified detail message.
Manifest - class java.util.jar.Manifest.
The Manifest class is used to maintain Manifest entry names and their associated Attributes.
MANIFEST_NAME - Static variable in class java.util.jar.JarFile
The JAR manifest file name.
MANIFEST_VERSION - Static variable in class java.util.jar.Attributes.Name
Name object for Manifest-Version manifest attribute.
Manifest() - Constructor for class java.util.jar.Manifest
Constructs a new, empty Manifest.
Manifest(InputStream) - Constructor for class java.util.jar.Manifest
Constructs a new Manifest from the specified input stream.
Manifest(Manifest) - Constructor for class java.util.jar.Manifest
Constructs a new Manifest that is a copy of the specified Manifest.
map - Variable in class java.util.jar.Attributes
The attribute name-value mappings.
Map - interface java.util.Map.
An object that maps keys to values.
MAP - Static variable in class javax.swing.text.html.HTML.Tag
Map.Entry - interface java.util.Map.Entry.
A map entry (key-value pair).
mapInputMethodHighlight(InputMethodHighlight) - Method in class java.awt.Toolkit
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.
mapLibraryName(String) - Static method in class java.lang.System
Maps a library name into a platform-specific string representing a native library.
mapRenderContext(int, RenderContext, ParameterBlock, RenderableImage) - Method in interface java.awt.image.renderable.ContextualRenderedImageFactory
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.
mapSystemException(SystemException) - Static method in class javax.rmi.CORBA.Util
Maps a SystemException to a RemoteException.
mapSystemException(SystemException) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).
MARCH - Static variable in class java.util.Calendar
Value of the MONTH field indicating the third month of the year.
MARGIN - Static variable in class javax.swing.text.html.CSS.Attribute
MARGIN_BOTTOM - Static variable in class javax.swing.text.html.CSS.Attribute
MARGIN_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's margins.
MARGIN_LEFT - Static variable in class javax.swing.text.html.CSS.Attribute
MARGIN_RIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
MARGIN_TOP - Static variable in class javax.swing.text.html.CSS.Attribute
MARGINHEIGHT - Static variable in class javax.swing.text.html.HTML.Attribute
MARGINWIDTH - Static variable in class javax.swing.text.html.HTML.Attribute
mark - Variable in class java.io.ByteArrayInputStream
The currently marked position in the stream.
mark(int) - Method in class java.io.Reader
Mark the present position in the stream.
mark(int) - Method in class java.io.FilterReader
Mark the present position in the stream.
mark(int) - Method in class java.io.InputStream
Marks the current position in this input stream.
mark(int) - Method in class java.io.FilterInputStream
Marks the current position in this input stream.
mark(int) - Method in class java.io.PushbackReader
Mark the present position in the stream.
mark(int) - Method in class java.io.BufferedReader
Mark the present position in the stream.
mark(int) - Method in class java.io.LineNumberReader
Mark the present position in the stream.
mark(int) - Method in class java.io.StringReader
Mark the present position in the stream.
mark(int) - Method in class java.io.BufferedInputStream
See the general contract of the mark method of InputStream.
mark(int) - Method in class java.io.ByteArrayInputStream
Set the current marked position in the stream.
mark(int) - Method in class java.io.CharArrayReader
Mark the present position in the stream.
mark(int) - Method in class java.io.LineNumberInputStream
Deprecated. Marks the current position in this input stream.
mark(int) - Method in class javax.sound.sampled.AudioInputStream
Marks the current position in this audio input stream.
markCompletelyClean(JComponent) - Method in class javax.swing.RepaintManager
Mark a component completely clean.
markCompletelyDirty(JComponent) - Method in class javax.swing.RepaintManager
Mark a component completely dirty.
markedPos - Variable in class java.io.CharArrayReader
The position of mark in buffer.
markFirstTime(Element) - Method in class javax.swing.text.html.parser.Parser
Marks the first time a tag has been seen in a document
marklimit - Variable in class java.io.BufferedInputStream
The maximum read ahead allowed after a call to the mark method before subsequent calls to the reset method fail.
markpos - Variable in class java.io.BufferedInputStream
The value of the pos field at the time the last mark method was called.
markSupported() - Method in class java.io.Reader
Tell whether this stream supports the mark() operation.
markSupported() - Method in class java.io.FilterReader
Tell whether this stream supports the mark() operation.
markSupported() - Method in class java.io.InputStream
Tests if this input stream supports the mark and reset methods.
markSupported() - Method in class java.io.FilterInputStream
Tests if this input stream supports the mark and reset methods.
markSupported() - Method in class java.io.PushbackReader
Tell whether this stream supports the mark() operation, which it does not.
markSupported() - Method in class java.io.BufferedReader
Tell whether this stream supports the mark() operation, which it does.
markSupported() - Method in class java.io.StringReader
Tell whether this stream supports the mark() operation, which it does.
markSupported() - Method in class java.io.PushbackInputStream
Tests if this input stream supports the mark and reset methods, which it does not.
markSupported() - Method in class java.io.BufferedInputStream
Tests if this input stream supports the mark and reset methods.
markSupported() - Method in class java.io.ByteArrayInputStream
Tests if ByteArrayInputStream supports mark/reset.
markSupported() - Method in class java.io.CharArrayReader
Tell whether this stream supports the mark() operation, which it does.
markSupported() - Method in class javax.sound.sampled.AudioInputStream
Tests whether this audio input stream supports the mark and reset methods.
MARSHAL - exception org.omg.CORBA.MARSHAL.
The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
MARSHAL() - Constructor for class org.omg.CORBA.MARSHAL
Constructs a MARSHAL exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
marshal(DataOutputStream) - Method in interface org.omg.CORBA.CustomMarshal
Marshal method has to be implemented by the Customized Marshal class This is the method invoked for Marshalling.
MARSHAL(int, CompletionStatus) - Constructor for class org.omg.CORBA.MARSHAL
Constructs a MARSHAL exception with the specified minor code and completion status.
MARSHAL(String) - Constructor for class org.omg.CORBA.MARSHAL
Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
MARSHAL(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.MARSHAL
Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
MarshalException - exception java.rmi.MarshalException.
A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
MarshalException(String) - Constructor for class java.rmi.MarshalException
Constructs a MarshalException with the specified detail message.
MarshalException(String, Exception) - Constructor for class java.rmi.MarshalException
Constructs a MarshalException with the specified detail message and nested exception.
MarshalledObject - class java.rmi.MarshalledObject.
A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
MarshalledObject(Object) - Constructor for class java.rmi.MarshalledObject
Creates a new MarshalledObject that contains the serialized representation of the current state of the supplied object.
MASTER_GAIN - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the overall gain on a line.
match(DataFlavor) - Method in class java.awt.datatransfer.DataFlavor
Two DataFlavors match if their primary types, subtypes, and representation classes are all equal.
matches(AudioFormat) - Method in class javax.sound.sampled.AudioFormat
Indicates whether this format matches the one specified.
matches(Line.Info) - Method in class javax.sound.sampled.Line.Info
Indicates whether the specified info object matches this one.
matches(Line.Info) - Method in class javax.sound.sampled.DataLine.Info
Determines whether the specified info object matches this one.
matches(Line.Info) - Method in class javax.sound.sampled.Port.Info
Indicates whether this info object specified matches this one.
matchNameAttribute(AttributeSet, HTML.Tag) - Method in class javax.swing.text.html.HTMLWriter
Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.
Math - class java.lang.Math.
The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
MATH_SYMBOL - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
MATHEMATICAL_OPERATORS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
MatteBorder - class javax.swing.border.MatteBorder.
A class which provides a matte-like border of either a solid color or a tiled icon.
MatteBorder(Icon) - Constructor for class javax.swing.border.MatteBorder
Creates a matte border with the specified tile icon.
MatteBorder(Insets, Color) - Constructor for class javax.swing.border.MatteBorder
Creates a matte border with the specified insets and color.
MatteBorder(Insets, Icon) - Constructor for class javax.swing.border.MatteBorder
Creates a matte border with the specified insets and tile icon.
MatteBorder(int, int, int, int, Color) - Constructor for class javax.swing.border.MatteBorder
Creates a matte border with the specified insets and color.
MatteBorder(int, int, int, int, Icon) - Constructor for class javax.swing.border.MatteBorder
Creates a matte border with the specified insets and tile icon.
MAX_PRIORITY - Static variable in class java.lang.Thread
The maximum priority that a thread can have.
MAX_RADIX - Static variable in class java.lang.Character
The maximum radix available for conversion to and from Strings.
MAX_SCROLL - Static variable in class javax.swing.plaf.basic.BasicSliderUI
MAX_VALUE - Static variable in class java.lang.Character
The constant value of this field is the largest value of type char.
MAX_VALUE - Static variable in class java.lang.Long
The largest value of type long.
MAX_VALUE - Static variable in class java.lang.Short
The maximum value a Short can have.
MAX_VALUE - Static variable in class java.lang.Float
The largest positive value of type float.
MAX_VALUE - Static variable in class java.lang.Integer
The largest value of type int.
MAX_VALUE - Static variable in class java.lang.Byte
The maximum value a Byte can have.
MAX_VALUE - Static variable in class java.lang.Double
The largest positive finite value of type double.
max(BigDecimal) - Method in class java.math.BigDecimal
Returns the maximum of this BigDecimal and val.
max(BigInteger) - Method in class java.math.BigInteger
Returns the maximum of this BigInteger and val.
max(Collection) - Static method in class java.util.Collections
Returns the maximum element of the given collection, according to the natural ordering of its elements.
max(Collection, Comparator) - Static method in class java.util.Collections
Returns the maximum element of the given collection, according to the order induced by the specified comparator.
max(double, double) - Static method in class java.lang.StrictMath
Returns the greater of two double values.
max(double, double) - Static method in class java.lang.Math
Returns the greater of two double values.
max(float, float) - Static method in class java.lang.StrictMath
Returns the greater of two float values.
max(float, float) - Static method in class java.lang.Math
Returns the greater of two float values.
max(int, int) - Static method in class java.lang.StrictMath
Returns the greater of two int values.
max(int, int) - Static method in class java.lang.Math
Returns the greater of two int values.
max(long, long) - Static method in class java.lang.StrictMath
Returns the greater of two long values.
max(long, long) - Static method in class java.lang.Math
Returns the greater of two long values.
maxButton - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
MAXGRIDSIZE - Static variable in class java.awt.GridBagLayout
The maximum number of grid positions (both horizontally and vertically) that can be laid out by the grid bag layout.
maxIcon - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
maximizable - Variable in class javax.swing.JInternalFrame
The frame can be expanded to the size of the desktop pane.
MAXIMIZE_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
maximizeAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
maximizeFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, the frame should be resized to match it's parents bounds.
maximizeFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Resizes the frame to fill its parents bounds.
maximizeFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the user wants to maximize the frame.
maximizeKey - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
Deprecated. As of JDK version 1.3.
maximum - Variable in class javax.swing.SizeRequirements
The maximum size allowed.
maximumLayoutSize(Container) - Method in interface java.awt.LayoutManager2
Returns the maximum size of this component.
maximumLayoutSize(Container) - Method in class java.awt.CardLayout
Returns the maximum dimensions for this layout given the components in the specified target container.
maximumLayoutSize(Container) - Method in class java.awt.BorderLayout
Returns the maximum dimensions for this layout given the components in the specified target container.
maximumLayoutSize(Container) - Method in class java.awt.GridBagLayout
Returns the maximum dimensions for this layout given the components in the specified target container.
maximumLayoutSize(Container) - Method in class javax.swing.BoxLayout
Returns the maximum dimensions the target container can use to lay out the components it contains.
maximumLayoutSize(Container) - Method in class javax.swing.OverlayLayout
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
maximumLayoutSize(Container) - Method in class javax.swing.JRootPane.RootLayout
Returns the maximum amount of space the layout can use.
maximumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the maximum layout size, which is Integer.MAX_VALUE in both directions.
maximumRowCount - Variable in class javax.swing.JComboBox
maximumThumbSize - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
MAXLENGTH - Static variable in class javax.swing.text.html.HTML.Attribute
maxTabHeight - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
maxTabWidth - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
maxWidth - Variable in class javax.swing.table.TableColumn
The maximum width of the column.
MAY - Static variable in class java.util.Calendar
Value of the MONTH field indicating the fifth month of the year.
maybeUpdateLayoutState() - Method in class javax.swing.plaf.basic.BasicListUI
If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded.
MD - Static variable in interface javax.swing.text.html.parser.DTDConstants
MediaTracker - class java.awt.MediaTracker.
The MediaTracker class is a utility class to track the status of a number of media objects.
MediaTracker(Component) - Constructor for class java.awt.MediaTracker
Creates a media tracker to track images for a given component.
MEDIUM - Static variable in class java.text.DateFormat
Constant for medium style pattern.
Member - interface java.lang.reflect.Member.
Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
member_count() - Method in class org.omg.CORBA.TypeCode
Retrieves the number of members in the type described by this TypeCode object.
member_kind() - Method in interface org.omg.CORBA.DynUnion
Returns the TCKind associated with the member of this union.
member_label(int) - Method in class org.omg.CORBA.TypeCode
Retrieves the label of the union member identified by the given index.
member_name() - Method in interface org.omg.CORBA.DynUnion
Allows for the inspection of the name of this union member without checking the value of the discriminator.
member_name(int) - Method in class org.omg.CORBA.TypeCode
Retrieves the simple name of the member identified by the given index.
member_name(String) - Method in interface org.omg.CORBA.DynUnion
Allows for the assignment of the name of this union member.
MEMBER_OF - Static variable in class javax.accessibility.AccessibleRelation
Indicates an object is a member of a group of one or more target objects.
MEMBER_OF_PROPERTY - Static variable in class javax.accessibility.AccessibleRelation
Identifies that group membership has changed.
member_type(int) - Method in class org.omg.CORBA.TypeCode
Retrieves the TypeCode object describing the type of the member identified by the given index.
member_visibility(int) - Method in class org.omg.CORBA.TypeCode
Returns the constant that indicates the visibility of the member at the given index.
member() - Method in interface org.omg.CORBA.DynUnion
Returns a DynAny object reference that is used in order to insert/get a member of this union.
members - Variable in class org.omg.CORBA.Initializer
members contains the reference to all the Initializers of non abstract value types.
members() - Method in interface java.security.acl.Group
Returns an enumeration of the members in the group.
MemoryImageSource - class java.awt.image.MemoryImageSource.
This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image.
MemoryImageSource(int, int, ColorModel, byte[], int, int) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
MemoryImageSource(int, int, ColorModel, byte[], int, int, Hashtable) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
MemoryImageSource(int, int, ColorModel, int[], int, int) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
MemoryImageSource(int, int, ColorModel, int[], int, int, Hashtable) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
MemoryImageSource(int, int, int[], int, int) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of integers in the default RGB ColorModel to produce data for an Image object.
MemoryImageSource(int, int, int[], int, int, Hashtable) - Constructor for class java.awt.image.MemoryImageSource
Constructs an ImageProducer object which uses an array of integers in the default RGB ColorModel to produce data for an Image object.
menu - Static variable in class java.awt.SystemColor
The background color for menus.
menu - Variable in class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
Menu - class java.awt.Menu.
A Menu object is a pull-down menu component that is deployed from a menu bar.
MENU - Static variable in class java.awt.SystemColor
The array index for the menu background color.
MENU - Static variable in class javax.accessibility.AccessibleRole
An object usually found inside a menu bar that contains a list of actions the user can choose from.
MENU - Static variable in class javax.swing.text.html.HTML.Tag
MENU_BAR - Static variable in class javax.accessibility.AccessibleRole
An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from.
MENU_BAR_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
MENU_ITEM - Static variable in class javax.accessibility.AccessibleRole
An object usually contained in a menu that presents an action the user can choose.
MENU_TEXT - Static variable in class java.awt.SystemColor
The array index for the menu text color.
Menu.AccessibleAWTMenu - class java.awt.Menu.AccessibleAWTMenu.
Inner class of Menu used to provide default support for accessibility.
Menu.AccessibleAWTMenu(Menu) - Constructor for class java.awt.Menu.AccessibleAWTMenu
Menu() - Constructor for class java.awt.Menu
Constructs a new menu with an empty label.
Menu(String) - Constructor for class java.awt.Menu
Constructs a new menu with the specified label.
Menu(String, boolean) - Constructor for class java.awt.Menu
Constructs a new menu with the specified label, indicating whether the menu can be torn off.
menuBar - Variable in class javax.swing.JRootPane
The menu bar.
menuBar - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
menuBar - Variable in class javax.swing.plaf.basic.BasicMenuBarUI
MenuBar - class java.awt.MenuBar.
The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
MenuBar.AccessibleAWTMenuBar - class java.awt.MenuBar.AccessibleAWTMenuBar.
Inner class of MenuBar used to provide default support for accessibility.
MenuBar.AccessibleAWTMenuBar(MenuBar) - Constructor for class java.awt.MenuBar.AccessibleAWTMenuBar
MenuBar() - Constructor for class java.awt.MenuBar
Creates a new menu bar.
MenuBarUI - class javax.swing.plaf.MenuBarUI.
Pluggable look and feel interface for JMenuBar.
MenuBarUI() - Constructor for class javax.swing.plaf.MenuBarUI
menuCanceled(MenuEvent) - Method in interface javax.swing.event.MenuListener
Invoked when the menu is canceled.
MenuComponent - class java.awt.MenuComponent.
The abstract class MenuComponent is the superclass of all menu-related components.
MenuComponent.AccessibleAWTMenuComponent - class java.awt.MenuComponent.AccessibleAWTMenuComponent.
Inner class of MenuComponent used to provide default support for accessibility.
MenuComponent.AccessibleAWTMenuComponent(MenuComponent) - Constructor for class java.awt.MenuComponent.AccessibleAWTMenuComponent
Although the class is abstract, this should be called by all sub-classes.
MenuComponent() - Constructor for class java.awt.MenuComponent
Constructor for MenuComponent.
MenuContainer - interface java.awt.MenuContainer.
The super class of all menu related containers.
menuDeselected(MenuEvent) - Method in interface javax.swing.event.MenuListener
Invoked when the menu is deselected.
menuDragMouseDragged(MenuDragMouseEvent) - Method in interface javax.swing.event.MenuDragMouseListener
Invoked when the mouse is being dragged in a menu component's display area.
menuDragMouseEntered(MenuDragMouseEvent) - Method in interface javax.swing.event.MenuDragMouseListener
Invoked when the dragged mouse has entered a menu component's display area.
MenuDragMouseEvent - class javax.swing.event.MenuDragMouseEvent.
MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
MenuDragMouseEvent(Component, int, long, int, int, int, int, boolean, MenuElement[], MenuSelectionManager) - Constructor for class javax.swing.event.MenuDragMouseEvent
Constructs a MenuDragMouseEvent object.
menuDragMouseExited(MenuDragMouseEvent) - Method in interface javax.swing.event.MenuDragMouseListener
Invoked when the dragged mouse has left a menu component's display area.
menuDragMouseListener - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
MenuDragMouseListener - interface javax.swing.event.MenuDragMouseListener.
Defines a menu mouse-drag listener.
menuDragMouseReleased(MenuDragMouseEvent) - Method in interface javax.swing.event.MenuDragMouseListener
Invoked when a dragged mouse is release in a menu component's display area.
MenuElement - interface javax.swing.MenuElement.
Any component that can be placed into a menu should implement this interface.
MenuEvent - class javax.swing.event.MenuEvent.
MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
MenuEvent(Object) - Constructor for class javax.swing.event.MenuEvent
Constructs a MenuEvent object.
menuItem - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
MenuItem - class java.awt.MenuItem.
All items in a menu must belong to the class MenuItem, or one of its subclasses.
MenuItem.AccessibleAWTMenuItem - class java.awt.MenuItem.AccessibleAWTMenuItem.
Inner class of MenuItem used to provide default support for accessibility.
MenuItem.AccessibleAWTMenuItem(MenuItem) - Constructor for class java.awt.MenuItem.AccessibleAWTMenuItem
MenuItem() - Constructor for class java.awt.MenuItem
Constructs a new MenuItem with an empty label and no keyboard shortcut.
MenuItem(String) - Constructor for class java.awt.MenuItem
Constructs a new MenuItem with the specified label and no keyboard shortcut.
MenuItem(String, MenuShortcut) - Constructor for class java.awt.MenuItem
Create a menu item with an associated keyboard shortcut.
MenuItemUI - class javax.swing.plaf.MenuItemUI.
Pluggable look and feel interface for JMenuItem.
MenuItemUI() - Constructor for class javax.swing.plaf.MenuItemUI
MenuKeyEvent - class javax.swing.event.MenuKeyEvent.
MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
MenuKeyEvent(Component, int, long, int, int, char, MenuElement[], MenuSelectionManager) - Constructor for class javax.swing.event.MenuKeyEvent
Constructs a MenuKeyEvent object.
menuKeyListener - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
MenuKeyListener - interface javax.swing.event.MenuKeyListener.
MenuKeyListener
menuKeyPressed(MenuKeyEvent) - Method in interface javax.swing.event.MenuKeyListener
Invoked when a key has been pressed.
menuKeyReleased(MenuKeyEvent) - Method in interface javax.swing.event.MenuKeyListener
Invoked when a key has been released.
menuKeyTyped(MenuKeyEvent) - Method in interface javax.swing.event.MenuKeyListener
Invoked when a key has been typed.
menuListener - Variable in class javax.swing.plaf.basic.BasicMenuUI
MenuListener - interface javax.swing.event.MenuListener.
Defines a listener for menu events.
menuSelected(MenuEvent) - Method in interface javax.swing.event.MenuListener
Invoked when a menu is selected.
menuSelectionChanged(boolean) - Method in class javax.swing.JMenuItem
Called by the MenuSelectionManager when the MenuElement is selected or unselected.
menuSelectionChanged(boolean) - Method in class javax.swing.JMenu
Messaged when the menubar selection changes to activate or deactivate this menu.
menuSelectionChanged(boolean) - Method in class javax.swing.JPopupMenu
Messaged when the menubar selection changes to activate or deactivate this menu.
menuSelectionChanged(boolean) - Method in class javax.swing.JMenuBar
Implemented to be a MenuElement -- does nothing.
menuSelectionChanged(boolean) - Method in interface javax.swing.MenuElement
Call by the MenuSelection when the MenuElement is added or remove from the menu selection.
MenuSelectionManager - class javax.swing.MenuSelectionManager.
A MenuSelectionManager owns the selection in menu hierarchy.
MenuSelectionManager() - Constructor for class javax.swing.MenuSelectionManager

MenuShortcut - class java.awt.MenuShortcut.
A class which represents a keyboard accelerator for a MenuItem.
MenuShortcut(int) - Constructor for class java.awt.MenuShortcut
Constructs a new MenuShortcut for the specified key.
MenuShortcut(int, boolean) - Constructor for class java.awt.MenuShortcut
Constructs a new MenuShortcut for the specified key.
menuText - Static variable in class java.awt.SystemColor
The text color for menus.
message - Variable in class javax.swing.JOptionPane
Message to display.
MESSAGE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for message.
MESSAGE_TYPE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bounds property name for type.
MessageDigest - class java.security.MessageDigest.
This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
MessageDigest(String) - Constructor for class java.security.MessageDigest
Creates a message digest with the specified algorithm name.
MessageDigestSpi - class java.security.MessageDigestSpi.
This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
MessageDigestSpi() - Constructor for class java.security.MessageDigestSpi

MessageFormat - class java.text.MessageFormat.
MessageFormat provides a means to produce concatenated messages in language-neutral way.
MessageFormat(String) - Constructor for class java.text.MessageFormat
Constructs with the specified pattern.
messageType - Variable in class javax.swing.JOptionPane
Message type.
meta - Variable in class javax.swing.text.html.parser.DTD

META - Static variable in class javax.sound.midi.MetaMessage
Status byte for MetaMessage (0xFF, or 255), which is used in MIDI files.
META - Static variable in class javax.swing.text.html.HTML.Tag

META_MASK - Static variable in class java.awt.Event
This flag indicates that the Meta key was down when the event occurred.
META_MASK - Static variable in class java.awt.event.ActionEvent
The meta modifier.
META_MASK - Static variable in class java.awt.event.InputEvent
The meta key modifier constant.
meta(MetaMessage) - Method in interface javax.sound.midi.MetaEventListener
Invoked when a Sequencer has encountered and processed a MetaMessage in the Sequence it is processing.
metaDown() - Method in class java.awt.Event
Checks if the Meta key is down.
MetaEventListener - interface javax.sound.midi.MetaEventListener.
The MetaEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a MetaMessage.
MetalBorders - class javax.swing.plaf.metal.MetalBorders.
Factory object that can vend Borders appropriate for the metal L & F.
MetalBorders.ButtonBorder - class javax.swing.plaf.metal.MetalBorders.ButtonBorder.

MetalBorders.ButtonBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.ButtonBorder

MetalBorders.Flush3DBorder - class javax.swing.plaf.metal.MetalBorders.Flush3DBorder.

MetalBorders.Flush3DBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.Flush3DBorder

MetalBorders.InternalFrameBorder - class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder.

MetalBorders.InternalFrameBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder

MetalBorders.MenuBarBorder - class javax.swing.plaf.metal.MetalBorders.MenuBarBorder.

MetalBorders.MenuBarBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.MenuBarBorder

MetalBorders.MenuItemBorder - class javax.swing.plaf.metal.MetalBorders.MenuItemBorder.

MetalBorders.MenuItemBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.MenuItemBorder

MetalBorders.OptionDialogBorder - class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder.

MetalBorders.OptionDialogBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder

MetalBorders.PaletteBorder - class javax.swing.plaf.metal.MetalBorders.PaletteBorder.
Border for a Palatte.
MetalBorders.PaletteBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.PaletteBorder

MetalBorders.PopupMenuBorder - class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder.

MetalBorders.PopupMenuBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder

MetalBorders.RolloverButtonBorder - class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder.

MetalBorders.RolloverButtonBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder

MetalBorders.ScrollPaneBorder - class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder.

MetalBorders.ScrollPaneBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder

MetalBorders.TableHeaderBorder - class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder.
Border for a Table Header
MetalBorders.TableHeaderBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder

MetalBorders.TextFieldBorder - class javax.swing.plaf.metal.MetalBorders.TextFieldBorder.

MetalBorders.TextFieldBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.TextFieldBorder

MetalBorders.ToggleButtonBorder - class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder.

MetalBorders.ToggleButtonBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder

MetalBorders.ToolBarBorder - class javax.swing.plaf.metal.MetalBorders.ToolBarBorder.

MetalBorders.ToolBarBorder() - Constructor for class javax.swing.plaf.metal.MetalBorders.ToolBarBorder

MetalBorders() - Constructor for class javax.swing.plaf.metal.MetalBorders

MetalButtonUI - class javax.swing.plaf.metal.MetalButtonUI.
MetalButtonUI implementation
MetalButtonUI() - Constructor for class javax.swing.plaf.metal.MetalButtonUI

MetalCheckBoxIcon - class javax.swing.plaf.metal.MetalCheckBoxIcon.
CheckboxIcon implementation for OrganicCheckBoxUI
MetalCheckBoxIcon() - Constructor for class javax.swing.plaf.metal.MetalCheckBoxIcon

MetalCheckBoxUI - class javax.swing.plaf.metal.MetalCheckBoxUI.
CheckboxUI implementation for MetalCheckboxUI
MetalCheckBoxUI() - Constructor for class javax.swing.plaf.metal.MetalCheckBoxUI

MetalComboBoxButton - class javax.swing.plaf.metal.MetalComboBoxButton.
JButton subclass to help out MetalComboBoxUI
MetalComboBoxButton(JComboBox, Icon, boolean, CellRendererPane, JList) - Constructor for class javax.swing.plaf.metal.MetalComboBoxButton

MetalComboBoxButton(JComboBox, Icon, CellRendererPane, JList) - Constructor for class javax.swing.plaf.metal.MetalComboBoxButton

MetalComboBoxEditor - class javax.swing.plaf.metal.MetalComboBoxEditor.
The default editor for Metal editable combo boxes
MetalComboBoxEditor.UIResource - class javax.swing.plaf.metal.MetalComboBoxEditor.UIResource.
A subclass of BasicComboBoxEditor that implements UIResource.
MetalComboBoxEditor.UIResource() - Constructor for class javax.swing.plaf.metal.MetalComboBoxEditor.UIResource

MetalComboBoxEditor() - Constructor for class javax.swing.plaf.metal.MetalComboBoxEditor

MetalComboBoxIcon - class javax.swing.plaf.metal.MetalComboBoxIcon.
This utility class draws the horizontal bars which indicate a MetalComboBox
MetalComboBoxIcon() - Constructor for class javax.swing.plaf.metal.MetalComboBoxIcon

MetalComboBoxUI - class javax.swing.plaf.metal.MetalComboBoxUI.
Metal UI for JComboBox
MetalComboBoxUI.MetalComboBoxLayoutManager - class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager.
This inner class is marked "public" due to a compiler bug.
MetalComboBoxUI.MetalComboBoxLayoutManager(MetalComboBoxUI) - Constructor for class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager

MetalComboBoxUI.MetalComboPopup - class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup.
This inner class is marked "public" due to a compiler bug.
MetalComboBoxUI.MetalComboPopup(MetalComboBoxUI, JComboBox) - Constructor for class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup

MetalComboBoxUI.MetalPropertyChangeListener - class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener.
This inner class is marked "public" due to a compiler bug.
MetalComboBoxUI.MetalPropertyChangeListener(MetalComboBoxUI) - Constructor for class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener

MetalComboBoxUI() - Constructor for class javax.swing.plaf.metal.MetalComboBoxUI

MetalDesktopIconUI - class javax.swing.plaf.metal.MetalDesktopIconUI.
Metal desktop icon.
MetalDesktopIconUI() - Constructor for class javax.swing.plaf.metal.MetalDesktopIconUI

MetalFileChooserUI - class javax.swing.plaf.metal.MetalFileChooserUI.
Metal L&F implementation of a FileChooser.
MetalFileChooserUI.DirectoryComboBoxAction - class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction.
Acts when DirectoryComboBox has changed the selected item.
MetalFileChooserUI.DirectoryComboBoxAction(MetalFileChooserUI) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction

MetalFileChooserUI.DirectoryComboBoxModel - class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel.
Data model for a type-face selection combo-box.
MetalFileChooserUI.DirectoryComboBoxModel(MetalFileChooserUI) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

MetalFileChooserUI.FileRenderer - class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer.

MetalFileChooserUI.FileRenderer(MetalFileChooserUI) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer

MetalFileChooserUI.FilterComboBoxModel - class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel.
Data model for a type-face selection combo-box.
MetalFileChooserUI.FilterComboBoxModel(MetalFileChooserUI) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

MetalFileChooserUI.FilterComboBoxRenderer - class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer.
Render different type sizes and styles.
MetalFileChooserUI.FilterComboBoxRenderer(MetalFileChooserUI) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer

MetalFileChooserUI.SingleClickListener - class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener.

MetalFileChooserUI.SingleClickListener(MetalFileChooserUI, JList) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener

MetalFileChooserUI(JFileChooser) - Constructor for class javax.swing.plaf.metal.MetalFileChooserUI

MetalIconFactory - class javax.swing.plaf.metal.MetalIconFactory.
Factory object that can vend Icons appropriate for Metal.
MetalIconFactory.FileIcon16 - class javax.swing.plaf.metal.MetalIconFactory.FileIcon16.
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.FileIcon16() - Constructor for class javax.swing.plaf.metal.MetalIconFactory.FileIcon16

MetalIconFactory.FolderIcon16 - class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16.
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.FolderIcon16() - Constructor for class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

MetalIconFactory.PaletteCloseIcon - class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.
Defines an icon for Palette close
MetalIconFactory.PaletteCloseIcon() - Constructor for class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

MetalIconFactory.TreeControlIcon - class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon.
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.TreeControlIcon(boolean) - Constructor for class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

MetalIconFactory.TreeFolderIcon - class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon.
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.TreeFolderIcon() - Constructor for class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon

MetalIconFactory.TreeLeafIcon - class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon.

MetalIconFactory.TreeLeafIcon() - Constructor for class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon

MetalIconFactory() - Constructor for class javax.swing.plaf.metal.MetalIconFactory

MetalInternalFrameTitlePane - class javax.swing.plaf.metal.MetalInternalFrameTitlePane.
Class that manages a JLF title bar
MetalInternalFrameTitlePane(JInternalFrame) - Constructor for class javax.swing.plaf.metal.MetalInternalFrameTitlePane

MetalInternalFrameUI - class javax.swing.plaf.metal.MetalInternalFrameUI.
Metal implementation of JInternalFrame.
MetalInternalFrameUI(JInternalFrame) - Constructor for class javax.swing.plaf.metal.MetalInternalFrameUI

metalLabelUI - Static variable in class javax.swing.plaf.metal.MetalLabelUI

MetalLabelUI - class javax.swing.plaf.metal.MetalLabelUI.
A Windows L&F implementation of LabelUI.
MetalLabelUI() - Constructor for class javax.swing.plaf.metal.MetalLabelUI

MetalLookAndFeel - class javax.swing.plaf.metal.MetalLookAndFeel.
Implements The Metal Look and Feel.
MetalLookAndFeel() - Constructor for class javax.swing.plaf.metal.MetalLookAndFeel

MetalPopupMenuSeparatorUI - class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI.
A Metal L&F implementation of PopupMenuSeparatorUI.
MetalPopupMenuSeparatorUI() - Constructor for class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI

MetalProgressBarUI - class javax.swing.plaf.metal.MetalProgressBarUI.
The Metal implementation of ProgressBarUI.
MetalProgressBarUI() - Constructor for class javax.swing.plaf.metal.MetalProgressBarUI

MetalRadioButtonUI - class javax.swing.plaf.metal.MetalRadioButtonUI.
RadioButtonUI implementation for MetalRadioButtonUI
MetalRadioButtonUI() - Constructor for class javax.swing.plaf.metal.MetalRadioButtonUI

MetalScrollBarUI - class javax.swing.plaf.metal.MetalScrollBarUI.
Implementation of ScrollBarUI for the Metal Look and Feel
MetalScrollBarUI() - Constructor for class javax.swing.plaf.metal.MetalScrollBarUI

MetalScrollButton - class javax.swing.plaf.metal.MetalScrollButton.
JButton object for Metal scrollbar arrows.
MetalScrollButton(int, int, boolean) - Constructor for class javax.swing.plaf.metal.MetalScrollButton

MetalScrollPaneUI - class javax.swing.plaf.metal.MetalScrollPaneUI.
A Metal L&F implementation of ScrollPaneUI.
MetalScrollPaneUI() - Constructor for class javax.swing.plaf.metal.MetalScrollPaneUI

MetalSeparatorUI - class javax.swing.plaf.metal.MetalSeparatorUI.
A Metal L&F implementation of SeparatorUI.
MetalSeparatorUI() - Constructor for class javax.swing.plaf.metal.MetalSeparatorUI

MetalSliderUI - class javax.swing.plaf.metal.MetalSliderUI.
A Java L&F implementation of SliderUI.
MetalSliderUI.MetalPropertyListener - class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener.

MetalSliderUI.MetalPropertyListener(MetalSliderUI) - Constructor for class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener

MetalSliderUI() - Constructor for class javax.swing.plaf.metal.MetalSliderUI

MetalSplitPaneUI - class javax.swing.plaf.metal.MetalSplitPaneUI.
Metal split pane.
MetalSplitPaneUI() - Constructor for class javax.swing.plaf.metal.MetalSplitPaneUI

MetalTabbedPaneUI - class javax.swing.plaf.metal.MetalTabbedPaneUI.
The Metal subclass of BasicTabbedPaneUI.
MetalTabbedPaneUI.TabbedPaneLayout - class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout.
This inner class is marked "public" due to a compiler bug.
MetalTabbedPaneUI.TabbedPaneLayout(MetalTabbedPaneUI) - Constructor for class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout

MetalTabbedPaneUI() - Constructor for class javax.swing.plaf.metal.MetalTabbedPaneUI

MetalTextFieldUI - class javax.swing.plaf.metal.MetalTextFieldUI.
Basis of a look and feel for a JTextField.
MetalTextFieldUI() - Constructor for class javax.swing.plaf.metal.MetalTextFieldUI

MetalTheme - class javax.swing.plaf.metal.MetalTheme.
This interface acts as a generic way to describe the colors used by Metal.
MetalTheme() - Constructor for class javax.swing.plaf.metal.MetalTheme

MetalToggleButtonUI - class javax.swing.plaf.metal.MetalToggleButtonUI.
MetalToggleButton implementation
MetalToggleButtonUI() - Constructor for class javax.swing.plaf.metal.MetalToggleButtonUI

MetalToolBarUI - class javax.swing.plaf.metal.MetalToolBarUI.
A Metal Look and Feel implementation of ToolBarUI.
MetalToolBarUI.MetalContainerListener - class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener.

MetalToolBarUI.MetalContainerListener(MetalToolBarUI) - Constructor for class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener

MetalToolBarUI.MetalDockingListener - class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener.

MetalToolBarUI.MetalDockingListener(MetalToolBarUI, JToolBar) - Constructor for class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

MetalToolBarUI.MetalRolloverListener - class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener.

MetalToolBarUI.MetalRolloverListener(MetalToolBarUI) - Constructor for class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener

MetalToolBarUI() - Constructor for class javax.swing.plaf.metal.MetalToolBarUI

MetalToolTipUI - class javax.swing.plaf.metal.MetalToolTipUI.
A Metal L&F extension of BasicToolTipUI.
MetalToolTipUI() - Constructor for class javax.swing.plaf.metal.MetalToolTipUI

MetalTreeUI - class javax.swing.plaf.metal.MetalTreeUI.
MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.
MetalTreeUI() - Constructor for class javax.swing.plaf.metal.MetalTreeUI

MetaMessage - class javax.sound.midi.MetaMessage.
A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
MetaMessage() - Constructor for class javax.sound.midi.MetaMessage
Constructs a new MetaMessage.
MetaMessage(byte[]) - Constructor for class javax.sound.midi.MetaMessage
Constructs a new MetaMessage.
method - Variable in class java.net.HttpURLConnection
The HTTP method (GET,POST,PUT,etc.).
Method - class java.lang.reflect.Method.
A Method provides information about, and access to, a single method on a class or interface.
METHOD - Static variable in class javax.swing.text.html.HTML.Attribute

MethodDescriptor - class java.beans.MethodDescriptor.
A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.
MethodDescriptor(Method) - Constructor for class java.beans.MethodDescriptor
Constructs a MethodDescriptor from a Method.
MethodDescriptor(Method, ParameterDescriptor[]) - Constructor for class java.beans.MethodDescriptor
Constructs a MethodDescriptor from a Method providing descriptive information for each of the method's parameters.
metrics - Variable in class javax.swing.text.PlainView
Font metrics for the currrent font.
MICROPHONE - Static variable in class javax.sound.sampled.Port.Info
A type of port that gets audio from a built-in microphone or a microphone jack.
microsecondLength - Variable in class javax.sound.midi.MidiFileFormat
The duration of the MIDI file in microseconds.
MIDI_SYNC - Static variable in class javax.sound.midi.Sequencer.SyncMode
A master or slave synchronization mode that specifies the use of MIDI clock messages.
MIDI_TIME_CODE - Static variable in class javax.sound.midi.ShortMessage
Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).
MIDI_TIME_CODE - Static variable in class javax.sound.midi.Sequencer.SyncMode
A master or slave synchronization mode that specifies the use of MIDI Time Code.
MidiChannel - interface javax.sound.midi.MidiChannel.
A MidiChannel object represents a single MIDI channel.
MidiDevice - interface javax.sound.midi.MidiDevice.
MidiDevice is the base interface for all MIDI devices.
MidiDevice.Info - class javax.sound.midi.MidiDevice.Info.
A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
MidiDevice.Info(String, String, String, String) - Constructor for class javax.sound.midi.MidiDevice.Info
Constructs a device info object.
MidiDeviceProvider - class javax.sound.midi.spi.MidiDeviceProvider.
A MidiDeviceProvider is a factory or provider for a particular type of MIDI device.
MidiDeviceProvider() - Constructor for class javax.sound.midi.spi.MidiDeviceProvider

MidiEvent - class javax.sound.midi.MidiEvent.
MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a Sequence object.
MidiEvent(MidiMessage, long) - Constructor for class javax.sound.midi.MidiEvent
Constructs a new MidiEvent.
MidiFileFormat - class javax.sound.midi.MidiFileFormat.
A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.
MidiFileFormat(int, float, int, int, long) - Constructor for class javax.sound.midi.MidiFileFormat
Constructs a MidiFileFormat.
MidiFileReader - class javax.sound.midi.spi.MidiFileReader.
A MidiFileReader supplies MIDI file-reading services.
MidiFileReader() - Constructor for class javax.sound.midi.spi.MidiFileReader

MidiFileWriter - class javax.sound.midi.spi.MidiFileWriter.
A MidiFileWriter supplies MIDI file-writing services.
MidiFileWriter() - Constructor for class javax.sound.midi.spi.MidiFileWriter

MidiMessage - class javax.sound.midi.MidiMessage.
MidiMessage is the base class for MIDI messages.
MidiMessage(byte[]) - Constructor for class javax.sound.midi.MidiMessage
Constructs a new MidiMessage.
MidiSystem - class javax.sound.midi.MidiSystem.
The MidiSystem class provides access to the installed MIDI system resources, including devices such as synthesizers, sequencers, and MIDI input and output ports.
MidiUnavailableException - exception javax.sound.midi.MidiUnavailableException.
A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.
MidiUnavailableException() - Constructor for class javax.sound.midi.MidiUnavailableException
Constructs a MidiUnavailableException that has null as its error detail message.
MidiUnavailableException(String) - Constructor for class javax.sound.midi.MidiUnavailableException
Constructs a MidiUnavailableException with the specified detail message.
MILLISECOND - Static variable in class java.util.Calendar
Field number for get and set indicating the millisecond within the second.
MILLISECOND_FIELD - Static variable in class java.text.DateFormat
Useful constant for MILLISECOND field alignment.
MimeTypeParseException - exception java.awt.datatransfer.MimeTypeParseException.
A class to encapsulate MimeType parsing related exceptions
MimeTypeParseException() - Constructor for class java.awt.datatransfer.MimeTypeParseException
Constructs a MimeTypeParseException with no specified detail message.
MimeTypeParseException(String) - Constructor for class java.awt.datatransfer.MimeTypeParseException
Constructs a MimeTypeParseException with the specified detail message.
MIN_PRIORITY - Static variable in class java.lang.Thread
The minimum priority that a thread can have.
MIN_RADIX - Static variable in class java.lang.Character
The minimum radix available for conversion to and from Strings.
MIN_SCROLL - Static variable in class javax.swing.plaf.basic.BasicSliderUI

MIN_VALUE - Static variable in class java.lang.Character
The constant value of this field is the smallest value of type char.
MIN_VALUE - Static variable in class java.lang.Long
The smallest value of type long.
MIN_VALUE - Static variable in class java.lang.Short
The minimum value a Short can have.
MIN_VALUE - Static variable in class java.lang.Float
The smallest positive value of type float.
MIN_VALUE - Static variable in class java.lang.Integer
The smallest value of type int.
MIN_VALUE - Static variable in class java.lang.Byte
The minimum value a Byte can have.
MIN_VALUE - Static variable in class java.lang.Double
The smallest positive value of type double.
min(BigDecimal) - Method in class java.math.BigDecimal
Returns the minimum of this BigDecimal and val.
min(BigInteger) - Method in class java.math.BigInteger
Returns the minimum of this BigInteger and val.
min(Collection) - Static method in class java.util.Collections
Returns the minimum element of the given collection, according to the natural ordering of its elements.
min(Collection, Comparator) - Static method in class java.util.Collections
Returns the minimum element of the given collection, according to the order induced by the specified comparator.
min(double, double) - Static method in class java.lang.StrictMath
Returns the smaller of two double values.
min(double, double) - Static method in class java.lang.Math
Returns the smaller of two double values.
min(float, float) - Static method in class java.lang.StrictMath
Returns the smaller of two float values.
min(float, float) - Static method in class java.lang.Math
Returns the smaller of two float values.
min(int, int) - Static method in class java.lang.StrictMath
Returns the smaller of two int values.
min(int, int) - Static method in class java.lang.Math
Returns the smaller of two int values.
min(long, long) - Static method in class java.lang.StrictMath
Returns the smaller of two long values.
min(long, long) - Static method in class java.lang.Math
Returns the smaller of two long values.
minIcon - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

MinimalHTMLWriter - class javax.swing.text.html.MinimalHTMLWriter.
MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit.
MinimalHTMLWriter(Writer, StyledDocument) - Constructor for class javax.swing.text.html.MinimalHTMLWriter
Creates a new MinimalHTMLWriter.
MinimalHTMLWriter(Writer, StyledDocument, int, int) - Constructor for class javax.swing.text.html.MinimalHTMLWriter
Creates a new MinimalHTMLWriter.
minimizeFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
Generally, this indicates that the frame should be restored to it's size and position prior to a maximizeFrame() call.
minimizeFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Restores the frame back to its size and position prior to a maximizeFrame() call.
minimizeFrame(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
This method is called when the user wants to minimize the frame.
minimizeKey - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
Deprecated. As of JDK version 1.3.
minimum - Variable in class javax.swing.SizeRequirements
The minimum size required.
MinimumHeight - Static variable in class javax.swing.plaf.basic.BasicOptionPaneUI

minimumLayoutSize(Container) - Method in class java.awt.CardLayout
Calculates the minimum size for the specified panel.
minimumLayoutSize(Container) - Method in class java.awt.GridLayout
Determines the minimum size of the container argument using this grid layout.
minimumLayoutSize(Container) - Method in class java.awt.BorderLayout
Determines the minimum size of the target container using this layout manager.
minimumLayoutSize(Container) - Method in interface java.awt.LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
minimumLayoutSize(Container) - Method in class java.awt.GridBagLayout
Determines the minimum size of the target container using this grid bag layout.
minimumLayoutSize(Container) - Method in class java.awt.FlowLayout
Returns the minimum dimensions needed to layout the components contained in the specified target container.
minimumLayoutSize(Container) - Method in class javax.swing.ViewportLayout
Returns the minimum dimensions needed to layout the components contained in the specified target container.
minimumLayoutSize(Container) - Method in class javax.swing.ScrollPaneLayout
The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
minimumLayoutSize(Container) - Method in class javax.swing.BoxLayout
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
minimumLayoutSize(Container) - Method in class javax.swing.OverlayLayout
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
minimumLayoutSize(Container) - Method in class javax.swing.JRootPane.RootLayout
Returns the minimum amount of space the layout needs.
minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicScrollBarUI

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager

minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the minimum size needed to contain the children.
minimumLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout

minimumSize - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI

minimumSize() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
minimumSize() - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
minimumSize() - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
minimumSize() - Method in class java.awt.TextField
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
minimumSize() - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
minimumSize(int) - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
minimumSize(int) - Method in class java.awt.TextField
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
minimumSize(int, int) - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).
minimumThumbSize - Variable in class javax.swing.plaf.basic.BasicScrollBarUI

MinimumWidth - Static variable in class javax.swing.plaf.basic.BasicOptionPaneUI

minor - Variable in class org.omg.CORBA.SystemException
The CORBA Exception minor code.
minorRequirementChange(AsyncBoxView.ChildState) - Method in class javax.swing.text.AsyncBoxView
Requirements changed along the minor axis.
minorTickSpacing - Variable in class javax.swing.JSlider
The number of values between the minor tick marks -- the smaller marks that occur between the major tick marks.
MINSIZE - Static variable in class java.awt.GridBagLayout
The smallest grid that can be laid out by the grid bag layout.
minTabWidth - Variable in class javax.swing.plaf.metal.MetalTabbedPaneUI

MINUTE - Static variable in class java.util.Calendar
Field number for get and set indicating the minute within the hour.
MINUTE_FIELD - Static variable in class java.text.DateFormat
Useful constant for MINUTE field alignment.
minWidth - Variable in class javax.swing.table.TableColumn
The minimum width of the column.
minX - Variable in class java.awt.image.Raster
The X coordinate of the upper-left pixel of this Raster.
minY - Variable in class java.awt.image.Raster
The Y coordinate of the upper-left pixel of this Raster.
MISCELLANEOUS_SYMBOLS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
MISCELLANEOUS_TECHNICAL - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
missing_node - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason

MissingResourceException - exception java.util.MissingResourceException.
Signals that a resource is missing.
MissingResourceException(String, String, String) - Constructor for class java.util.MissingResourceException
Constructs a MissingResourceException with the specified information.
Mixer - interface javax.sound.sampled.Mixer.
A mixer is an audio device with one or more lines.
Mixer.Info - class javax.sound.sampled.Mixer.Info.
The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
Mixer.Info(String, String, String, String) - Constructor for class javax.sound.sampled.Mixer.Info
Constructs a mixer's info object, passing it the given textual information.
MixerProvider - class javax.sound.sampled.spi.MixerProvider.
A provider or factory for a particular mixer type.
MixerProvider() - Constructor for class javax.sound.sampled.spi.MixerProvider

mkdir() - Method in class java.io.File
Creates the directory named by this abstract pathname.
mkdirs() - Method in class java.io.File
Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.
mnemonic - Variable in class javax.swing.DefaultButtonModel

MNEMONIC_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the button's mnemonic.
MNEMONIC_KEY - Static variable in interface javax.swing.Action
The key used for storing an int key code to be used as the mnemonic for the action.
mod(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this mod m).
MODAL - Static variable in class javax.accessibility.AccessibleState
Indicates something must be done with this object before the user can interact with an object in a different window.
MODAL_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Modal layer.
modCount - Variable in class java.util.AbstractList
The number of times this list has been structurally modified.
model - Variable in class javax.swing.JTabbedPane
The default selection model
model - Variable in class javax.swing.AbstractButton
The data model that determines the button's state.
model - Variable in class javax.swing.JScrollBar
The model that represents the scrollbar's minimum, maximum, extent (aka "visibleAmount") and current value.
model - Variable in class javax.swing.JProgressBar
The data structure that holds the various values for the progress bar.
MODEL - Static variable in interface javax.swing.text.html.parser.DTDConstants

MODEL_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button model.
ModelAttribute - Static variable in class javax.swing.text.StyleConstants
Attribute used to identify the model for embedded objects that have a model view separation.
modelChanged - Static variable in class javax.swing.plaf.basic.BasicListUI

modelChanged() - Method in class javax.swing.plaf.basic.BasicTextUI
Flags model changes.
modelIndex - Variable in class javax.swing.table.TableColumn
The index of the column in the model which is to be displayed by this TableColumn.
modelListener - Variable in class javax.swing.plaf.basic.BasicScrollBarUI

modelToView(GlyphView, int, Position.Bias, Shape) - Method in class javax.swing.text.GlyphView.GlyphPainter
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int) - Method in class javax.swing.text.JTextComponent
Converts the given location in the model to a place in the view coordinate system.
modelToView(int, Position.Bias, int, Position.Bias, Shape) - Method in class javax.swing.text.View
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Position.Bias, int, Position.Bias, Shape) - Method in class javax.swing.text.CompositeView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape) - Method in class javax.swing.text.View
Deprecated.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.View
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.CompositeView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.GlyphView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.BoxView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.PlainView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.FieldView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.PasswordView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.AsyncBoxView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.ComponentView
Provides a mapping from the coordinate space of the model to that of the view.
modelToView(int, Shape, Position.Bias) - Method in class javax.swing.text.IconView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
modelToView(JTextComponent, int) - Method in class javax.swing.plaf.TextUI
Converts the given location in the model to a place in the view coordinate system.
modelToView(JTextComponent, int) - Method in class javax.swing.plaf.basic.BasicTextUI
Converts the given location in the model to a place in the view coordinate system.
modelToView(JTextComponent, int) - Method in class javax.swing.plaf.multi.MultiTextUI
Call modelToView on each UI handled by this MultiUI.
modelToView(JTextComponent, int, Position.Bias) - Method in class javax.swing.plaf.TextUI
Converts the given location in the model to a place in the view coordinate system.
modelToView(JTextComponent, int, Position.Bias) - Method in class javax.swing.plaf.basic.BasicTextUI
Converts the given location in the model to a place in the view coordinate system.
modelToView(JTextComponent, int, Position.Bias) - Method in class javax.swing.plaf.multi.MultiTextUI
Converts the given location in the model to a place in the view coordinate system.
ModificationItem - class javax.naming.directory.ModificationItem.
This class represents a modification item.
ModificationItem(int, Attribute) - Constructor for class javax.naming.directory.ModificationItem
Creates a new instance of ModificationItem.
modifier - Variable in class javax.swing.text.html.parser.AttributeList

Modifier - class java.lang.reflect.Modifier.
The Modifier class provides static methods and constants to decode class and member access modifiers.
MODIFIER_LETTER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
MODIFIER_SYMBOL - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
Modifier() - Constructor for class java.lang.reflect.Modifier

modifiers - Variable in class java.awt.Event
The state of the modifier keys.
modifyAttributes(Name, int, Attributes) - Method in interface javax.naming.directory.DirContext
Modifies the attributes associated with a named object.
modifyAttributes(Name, int, Attributes) - Method in class javax.naming.directory.InitialDirContext

modifyAttributes(Name, ModificationItem[]) - Method in interface javax.naming.directory.DirContext
Modifies the attributes associated with a named object using an ordered list of modifications.
modifyAttributes(Name, ModificationItem[]) - Method in class javax.naming.directory.InitialDirContext

modifyAttributes(String, int, Attributes) - Method in interface javax.naming.directory.DirContext
Modifies the attributes associated with a named object.
modifyAttributes(String, int, Attributes) - Method in class javax.naming.directory.InitialDirContext

modifyAttributes(String, ModificationItem[]) - Method in interface javax.naming.directory.DirContext
Modifies the attributes associated with a named object using an ordered list of modifications.
modifyAttributes(String, ModificationItem[]) - Method in class javax.naming.directory.InitialDirContext

modInverse(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this-1 mod m).
modPow(BigInteger, BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (thisexponent mod m).
MONARCH - Static variable in class java.awt.PageAttributes.MediaType
An alias for MONARCH_ENVELOPE.
MONARCH_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Monarch Envelope, 3 7/8 x 7 1/2 in.
MONDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Monday.
MONOCHROME - Static variable in class java.awt.PageAttributes.ColorType
The ColorType instance to use for specifying monochrome printing.
MONTH - Static variable in class java.util.Calendar
Field number for get and set indicating the month.
MONTH_FIELD - Static variable in class java.text.DateFormat
Useful constant for MONTH field alignment.
MOUSE_CLICKED - Static variable in class java.awt.event.MouseEvent
The "mouse clicked" event.
MOUSE_DOWN - Static variable in class java.awt.Event
The user has pressed the mouse button.
MOUSE_DRAG - Static variable in class java.awt.Event
The user has moved the mouse with a button pressed.
MOUSE_DRAGGED - Static variable in class java.awt.event.MouseEvent
The "mouse dragged" event.
MOUSE_ENTER - Static variable in class java.awt.Event
The mouse has entered a component.
MOUSE_ENTERED - Static variable in class java.awt.event.MouseEvent
The "mouse entered" event.
MOUSE_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting mouse events.
MOUSE_EXIT - Static variable in class java.awt.Event
The mouse has exited a component.
MOUSE_EXITED - Static variable in class java.awt.event.MouseEvent
The "mouse exited" event.
MOUSE_FIRST - Static variable in class java.awt.event.MouseEvent
The first number in the range of ids used for mouse events.
MOUSE_LAST - Static variable in class java.awt.event.MouseEvent
The last number in the range of ids used for mouse events.
MOUSE_MOTION_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting mouse motion events.
MOUSE_MOVE - Static variable in class java.awt.Event
The mouse has moved with no button pressed.
MOUSE_MOVED - Static variable in class java.awt.event.MouseEvent
The "mouse moved" event.
MOUSE_PRESSED - Static variable in class java.awt.event.MouseEvent
The "mouse pressed" event.
MOUSE_RELEASED - Static variable in class java.awt.event.MouseEvent
The "mouse released" event.
MOUSE_UP - Static variable in class java.awt.Event
The user has released the mouse button.
MouseAdapter - class java.awt.event.MouseAdapter.
An abstract adapter class for receiving mouse events.
MouseAdapter() - Constructor for class java.awt.event.MouseAdapter

mouseClicked(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
mouseClicked(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when the mouse has been clicked on a component.
mouseClicked(MouseEvent) - Method in interface java.awt.event.MouseListener
Invoked when the mouse has been clicked on a component.
mouseClicked(MouseEvent) - Method in class java.awt.event.MouseAdapter
Invoked when the mouse has been clicked on a component.
mouseClicked(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseClicked(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Called when the mouse is clicked.
mouseClicked(MouseEvent) - Method in class javax.swing.text.html.HTMLEditorKit.LinkController
Called for a mouse click event.
mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Ignore mouseClicked events.
mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mouseClicked(MouseEvent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener

mouseDown(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
mouseDrag(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
mouseDragged(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
mouseDragged(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when a mouse button is pressed on a component.
mouseDragged(MouseEvent) - Method in interface java.awt.event.MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged.
mouseDragged(MouseEvent) - Method in class java.awt.event.MouseMotionAdapter
Invoked when a mouse button is pressed on a component and then dragged.
mouseDragged(MouseEvent) - Method in class javax.swing.ToolTipManager

mouseDragged(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseDragged(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Moves the caret position according to the mouse pointer's current location.
mouseDragged(MouseEvent) - Method in class javax.swing.text.html.HTMLEditorKit.LinkController

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
Set the models value to the position of the top/left of the thumb relative to the origin of the track.
mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Ignore mouseDragged events.
mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
If dragger is not null it is messaged with continueDrag.
mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
Set the models value to the position of the top/left of the thumb relative to the origin of the track.
mouseDragged(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mouseDragged(MouseEvent) - Method in class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

MouseDragGestureRecognizer - class java.awt.dnd.MouseDragGestureRecognizer.
This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.
MouseDragGestureRecognizer(DragSource) - Constructor for class java.awt.dnd.MouseDragGestureRecognizer
Construct a new MouseDragGestureRecognizer given the DragSource for the Component.
MouseDragGestureRecognizer(DragSource, Component) - Constructor for class java.awt.dnd.MouseDragGestureRecognizer
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.
MouseDragGestureRecognizer(DragSource, Component, int) - Constructor for class java.awt.dnd.MouseDragGestureRecognizer
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.
MouseDragGestureRecognizer(DragSource, Component, int, DragGestureListener) - Constructor for class java.awt.dnd.MouseDragGestureRecognizer
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.
mouseEnter(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
mouseEntered(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
mouseEntered(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when the mouse enters a component.
mouseEntered(MouseEvent) - Method in interface java.awt.event.MouseListener
Invoked when the mouse enters a component.
mouseEntered(MouseEvent) - Method in class java.awt.event.MouseAdapter
Invoked when the mouse enters a component.
mouseEntered(MouseEvent) - Method in class javax.swing.ToolTipManager

mouseEntered(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseEntered(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Called when the mouse enters a region.
mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Forward the mouseEntered event to the underlying child container.
mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseEntered(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

MouseEvent - class java.awt.event.MouseEvent.
/** An event which indicates that a mouse action occurred in a component.
MouseEvent(Component, int, long, int, int, int, int, boolean) - Constructor for class java.awt.event.MouseEvent
Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.
mouseExit(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
mouseExited(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
mouseExited(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when the mouse exits a component.
mouseExited(MouseEvent) - Method in interface java.awt.event.MouseListener
Invoked when the mouse exits a component.
mouseExited(MouseEvent) - Method in class java.awt.event.MouseAdapter
Invoked when the mouse exits a component.
mouseExited(MouseEvent) - Method in class javax.swing.ToolTipManager

mouseExited(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseExited(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Called when the mouse exits a region.
mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Forward the mouseExited event to the underlying child container.
mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseExited(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mouseHandler - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Handles mouse events from both this class, and the split pane.
MouseInputAdapter - class javax.swing.event.MouseInputAdapter.
The adapter which receives mouse events and mouse motion events.
MouseInputAdapter() - Constructor for class javax.swing.event.MouseInputAdapter

mouseInputListener - Variable in class javax.swing.plaf.basic.BasicMenuItemUI

mouseInputListener - Variable in class javax.swing.plaf.basic.BasicTableUI

mouseInputListener - Variable in class javax.swing.plaf.basic.BasicListUI

mouseInputListener - Variable in class javax.swing.plaf.basic.BasicTableHeaderUI

MouseInputListener - interface javax.swing.event.MouseInputListener.
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.
mouseListener - Variable in class javax.swing.plaf.basic.BasicComboPopup

mouseListener - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI

MouseListener - interface java.awt.event.MouseListener.
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionAdapter - class java.awt.event.MouseMotionAdapter.
An abstract adapter class for receiving mouse motion events.
MouseMotionAdapter() - Constructor for class java.awt.event.MouseMotionAdapter

mouseMotionListener - Variable in class javax.swing.plaf.basic.BasicComboPopup

MouseMotionListener - interface java.awt.event.MouseMotionListener.
The listener interface for receiving mouse motion events on a component.
mouseMove(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
mouseMove(int, int) - Method in class java.awt.Robot
Moves mouse pointer to given screen coordinates.
mouseMoved(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
mouseMoved(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when the mouse button has been moved on a component (with no buttons no down).
mouseMoved(MouseEvent) - Method in interface java.awt.event.MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
mouseMoved(MouseEvent) - Method in class java.awt.event.MouseMotionAdapter
Invoked when the mouse button has been moved on a component (with no buttons no down).
mouseMoved(MouseEvent) - Method in class javax.swing.ToolTipManager

mouseMoved(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseMoved(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Called when the mouse is moved.
mouseMoved(MouseEvent) - Method in class javax.swing.text.html.HTMLEditorKit.LinkController

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Forward the mouseMoved event to the underlying child container.
mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
Resets the cursor based on the orientation.
mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.TrackListener

mouseMoved(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mousePress(int) - Method in class java.awt.Robot
Presses one or more mouse buttons.
mousePressed(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
mousePressed(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when a mouse button has been pressed on a Component.
mousePressed(MouseEvent) - Method in interface java.awt.event.MouseListener
Invoked when a mouse button has been pressed on a component.
mousePressed(MouseEvent) - Method in class java.awt.event.MouseAdapter
Invoked when a mouse button has been pressed on a component.
mousePressed(MouseEvent) - Method in class javax.swing.ToolTipManager

mousePressed(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mousePressed(MouseEvent) - Method in class javax.swing.text.DefaultCaret
If button 1 is pressed, this is implemented to request focus on the associated text component, and to set the caret position.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseHandler
Invoked when a mouse button has been pressed on a component.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
Starts the dragging session by creating the appropriate instance of DragController.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
mousePressed(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mousePressed(MouseEvent) - Method in class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

mouseRelease(int) - Method in class java.awt.Robot
Releases one or more mouse buttons.
mouseReleased(MouseEvent) - Method in class java.awt.AWTEventMulticaster
Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
mouseReleased(MouseEvent) - Method in class java.awt.dnd.MouseDragGestureRecognizer
Invoked when a mouse button has been released on a component.
mouseReleased(MouseEvent) - Method in interface java.awt.event.MouseListener
Invoked when a mouse button has been released on a component.
mouseReleased(MouseEvent) - Method in class java.awt.event.MouseAdapter
Invoked when a mouse button has been released on a component.
mouseReleased(MouseEvent) - Method in class javax.swing.event.MouseInputAdapter

mouseReleased(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Called when the mouse is released.
mouseReleased(MouseEvent) - Method in class javax.swing.text.html.FormView.MouseEventListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
Ignore mouseReleased events.
mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
If dragger is not null it is messaged with completeDrag.
mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.TrackListener

mouseReleased(MouseEvent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

mouseUp(Event, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
MOVE_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

MOVE_CURSOR - Static variable in class java.awt.Cursor
The move cursor type.
MOVE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.MOVE_CURSOR.
move(int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
move(int, int) - Method in class java.awt.Point
Moves this point to the specificed location in the (x, y) coordinate plane.
move(int, int) - Method in class java.awt.Rectangle
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
moveAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

moveAndRepaint(JComponent, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

moveCaret(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Tries to move the position of the caret from the coordinates of a mouse event, using viewToModel().
moveCaretPosition(int) - Method in class javax.swing.text.JTextComponent
Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called.
moveColumn(int, int) - Method in class javax.swing.JTable
Moves the column column to the position currently occupied by the column targetColumn in the view.
moveColumn(int, int) - Method in class javax.swing.table.DefaultTableColumnModel
Moves the column and heading at columnIndex to newIndex.
moveColumn(int, int) - Method in interface javax.swing.table.TableColumnModel
Moves the column and its header at columnIndex to newIndex.
moveDot(int) - Method in class javax.swing.text.DefaultCaret
Moves the caret position to some other position.
moveDot(int) - Method in interface javax.swing.text.Caret
Moves the caret position (dot) to some other position, leaving behind the mark.
movePointLeft(int) - Method in class java.math.BigDecimal
Returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the left.
movePointRight(int) - Method in class java.math.BigDecimal
Moves the decimal point the specified number of places to the right.
moveRow(int, int, int) - Method in class javax.swing.table.DefaultTableModel
Moves one or more rows starting at startIndex to endIndex in the model to the toIndex.
moveTo(float, float) - Method in class java.awt.geom.GeneralPath
Adds a point to the path by moving to the specified coordinates.
moveToBack() - Method in class javax.swing.JInternalFrame
Convenience method that moves this component to position -1 if its parent is a JLayeredPane.
moveToBack(Component) - Method in class javax.swing.JLayeredPane
Moves the component to the bottom of the components in it's current layer (position -1).
moveToCurrentRow() - Method in interface java.sql.ResultSet
Moves the cursor to the remembered cursor position, usually the current row.
moveToFront() - Method in class javax.swing.JInternalFrame
Convenience method that moves this component to position 0 if its parent is a JLayeredPane.
moveToFront(Component) - Method in class javax.swing.JLayeredPane
Moves the component to the top of the components in it's current layer (position 0).
moveToInsertRow() - Method in interface java.sql.ResultSet
Moves the cursor to the insert row.
MS - Static variable in interface javax.swing.text.html.parser.DTDConstants

MULTI_LINE - Static variable in class javax.accessibility.AccessibleState
Indicates this (text) object can contain multiple lines of text
MULTI_SELECTION_ENABLED_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Enables multiple-file selections.
MultiButtonUI - class javax.swing.plaf.multi.MultiButtonUI.
MultiButtonUI implementation
MultiButtonUI() - Constructor for class javax.swing.plaf.multi.MultiButtonUI

MulticastSocket - class java.net.MulticastSocket.
The multicast datagram socket class is useful for sending and receiving IP multicast packets.
MulticastSocket() - Constructor for class java.net.MulticastSocket
Create a multicast socket.
MulticastSocket(int) - Constructor for class java.net.MulticastSocket
Create a multicast socket and bind it to a specific port.
MultiColorChooserUI - class javax.swing.plaf.multi.MultiColorChooserUI.
MultiColorChooserUI implementation
MultiColorChooserUI() - Constructor for class javax.swing.plaf.multi.MultiColorChooserUI

MultiComboBoxUI - class javax.swing.plaf.multi.MultiComboBoxUI.
MultiComboBoxUI implementation
MultiComboBoxUI() - Constructor for class javax.swing.plaf.multi.MultiComboBoxUI

MultiDesktopIconUI - class javax.swing.plaf.multi.MultiDesktopIconUI.
MultiDesktopIconUI implementation
MultiDesktopIconUI() - Constructor for class javax.swing.plaf.multi.MultiDesktopIconUI

MultiDesktopPaneUI - class javax.swing.plaf.multi.MultiDesktopPaneUI.
MultiDesktopPaneUI implementation
MultiDesktopPaneUI() - Constructor for class javax.swing.plaf.multi.MultiDesktopPaneUI

MultiFileChooserUI - class javax.swing.plaf.multi.MultiFileChooserUI.
MultiFileChooserUI implementation
MultiFileChooserUI() - Constructor for class javax.swing.plaf.multi.MultiFileChooserUI

MultiInternalFrameUI - class javax.swing.plaf.multi.MultiInternalFrameUI.
MultiInternalFrameUI implementation
MultiInternalFrameUI() - Constructor for class javax.swing.plaf.multi.MultiInternalFrameUI

MultiLabelUI - class javax.swing.plaf.multi.MultiLabelUI.
MultiLabelUI implementation
MultiLabelUI() - Constructor for class javax.swing.plaf.multi.MultiLabelUI

MultiListUI - class javax.swing.plaf.multi.MultiListUI.
MultiListUI implementation
MultiListUI() - Constructor for class javax.swing.plaf.multi.MultiListUI

MultiLookAndFeel - class javax.swing.plaf.multi.MultiLookAndFeel.
A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.
MultiLookAndFeel() - Constructor for class javax.swing.plaf.multi.MultiLookAndFeel

MultiMenuBarUI - class javax.swing.plaf.multi.MultiMenuBarUI.
MultiMenuBarUI implementation
MultiMenuBarUI() - Constructor for class javax.swing.plaf.multi.MultiMenuBarUI

MultiMenuItemUI - class javax.swing.plaf.multi.MultiMenuItemUI.
MultiMenuItemUI implementation
MultiMenuItemUI() - Constructor for class javax.swing.plaf.multi.MultiMenuItemUI

MultiOptionPaneUI - class javax.swing.plaf.multi.MultiOptionPaneUI.
MultiOptionPaneUI implementation
MultiOptionPaneUI() - Constructor for class javax.swing.plaf.multi.MultiOptionPaneUI

MultiPanelUI - class javax.swing.plaf.multi.MultiPanelUI.
MultiPanelUI implementation
MultiPanelUI() - Constructor for class javax.swing.plaf.multi.MultiPanelUI

MultiPixelPackedSampleModel - class java.awt.image.MultiPixelPackedSampleModel.
The MultiPixelPackedSampleModel class represents one-banded images and can pack multiple one-sample pixels into one data element.
MultiPixelPackedSampleModel(int, int, int, int) - Constructor for class java.awt.image.MultiPixelPackedSampleModel
Constructs a MultiPixelPackedSampleModel with the specified data type, width, height and number of bits per pixel.
MultiPixelPackedSampleModel(int, int, int, int, int, int) - Constructor for class java.awt.image.MultiPixelPackedSampleModel
Constructs a MultiPixelPackedSampleModel with specified data type, width, height, number of bits per pixel, scanline stride and data bit offset.
MULTIPLE - Static variable in class javax.swing.text.html.HTML.Attribute

MULTIPLE_INTERVAL_SELECTION - Static variable in interface javax.swing.ListSelectionModel
A value for the selectionMode property: select one or more contiguous ranges of indices at a time.
MultipleMaster - interface java.awt.font.MultipleMaster.
The MultipleMaster interface represents Type 1 Multiple Master fonts.
multiply(BigDecimal) - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (this * val), and whose scale is (this.scale() + val.scale()).
multiply(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this * val).
MultiPopupMenuUI - class javax.swing.plaf.multi.MultiPopupMenuUI.
MultiPopupMenuUI implementation
MultiPopupMenuUI() - Constructor for class javax.swing.plaf.multi.MultiPopupMenuUI

MultiProgressBarUI - class javax.swing.plaf.multi.MultiProgressBarUI.
MultiProgressBarUI implementation
MultiProgressBarUI() - Constructor for class javax.swing.plaf.multi.MultiProgressBarUI

MultiScrollBarUI - class javax.swing.plaf.multi.MultiScrollBarUI.
MultiScrollBarUI implementation
MultiScrollBarUI() - Constructor for class javax.swing.plaf.multi.MultiScrollBarUI

MultiScrollPaneUI - class javax.swing.plaf.multi.MultiScrollPaneUI.
MultiScrollPaneUI implementation
MultiScrollPaneUI() - Constructor for class javax.swing.plaf.multi.MultiScrollPaneUI

MULTISELECTABLE - Static variable in class javax.accessibility.AccessibleState
Indicates this object allows more than one of its children to be selected at the same time.
MultiSeparatorUI - class javax.swing.plaf.multi.MultiSeparatorUI.
MultiSeparatorUI implementation
MultiSeparatorUI() - Constructor for class javax.swing.plaf.multi.MultiSeparatorUI

MultiSliderUI - class javax.swing.plaf.multi.MultiSliderUI.
MultiSliderUI implementation
MultiSliderUI() - Constructor for class javax.swing.plaf.multi.MultiSliderUI

MultiSplitPaneUI - class javax.swing.plaf.multi.MultiSplitPaneUI.
MultiSplitPaneUI implementation
MultiSplitPaneUI() - Constructor for class javax.swing.plaf.multi.MultiSplitPaneUI

MultiTabbedPaneUI - class javax.swing.plaf.multi.MultiTabbedPaneUI.
MultiTabbedPaneUI implementation
MultiTabbedPaneUI() - Constructor for class javax.swing.plaf.multi.MultiTabbedPaneUI

MultiTableHeaderUI - class javax.swing.plaf.multi.MultiTableHeaderUI.
MultiTableHeaderUI implementation
MultiTableHeaderUI() - Constructor for class javax.swing.plaf.multi.MultiTableHeaderUI

MultiTableUI - class javax.swing.plaf.multi.MultiTableUI.
MultiTableUI implementation
MultiTableUI() - Constructor for class javax.swing.plaf.multi.MultiTableUI

MultiTextUI - class javax.swing.plaf.multi.MultiTextUI.
MultiTextUI implementation
MultiTextUI() - Constructor for class javax.swing.plaf.multi.MultiTextUI

MultiToolBarUI - class javax.swing.plaf.multi.MultiToolBarUI.
MultiToolBarUI implementation
MultiToolBarUI() - Constructor for class javax.swing.plaf.multi.MultiToolBarUI

MultiToolTipUI - class javax.swing.plaf.multi.MultiToolTipUI.
MultiToolTipUI implementation
MultiToolTipUI() - Constructor for class javax.swing.plaf.multi.MultiToolTipUI

MultiTreeUI - class javax.swing.plaf.multi.MultiTreeUI.
MultiTreeUI implementation
MultiTreeUI() - Constructor for class javax.swing.plaf.multi.MultiTreeUI

MultiViewportUI - class javax.swing.plaf.multi.MultiViewportUI.
MultiViewportUI implementation
MultiViewportUI() - Constructor for class javax.swing.plaf.multi.MultiViewportUI

MutableAttributeSet - interface javax.swing.text.MutableAttributeSet.
A generic interface for a mutable collection of unique attributes.
MutableComboBoxModel - interface javax.swing.MutableComboBoxModel.
A mutable version of ComboBoxModel.
MutableTreeNode - interface javax.swing.tree.MutableTreeNode.
Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
MUTE - Static variable in class javax.sound.sampled.BooleanControl.Type
Represents a control for the mute status of a line.
myProps - Variable in class javax.naming.InitialContext
The environment associated with this InitialContext.
mySyntax - Variable in class javax.naming.CompoundName
Syntax properties for this compound name.
Overview  Package  Class  Use  Tree  Deprecated   Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV LETTER   NEXT LETTER FRAMES    NO FRAMES
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 _


N-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

N

N - Static variable in class javax.swing.text.html.HTML.Attribute
N_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The north-resize cursor type.
N_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.N_RESIZE_CURSOR.
NA_10X13_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 10 x 13 in.
NA_10X14_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 10 x 14 in.
NA_10X15_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 10 x 15 in.
NA_6X9_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 6 x 9 in.
NA_7X9_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 7 x 9 in.
NA_9X11_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 9 x 11 in.
NA_9X12_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American 9 x 12 in.
NA_LEGAL - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American Legal, 8 1/2 x 14 in.
NA_LETTER - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American Letter, 8 1/2 x 11 in.
NA_NUMBER_10_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American #10 Business Envelope, 4 1/8 x 9 1/2 in.
NA_NUMBER_11_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American #11 Business Envelope, 4 1/2 x 10 3/8 in.
NA_NUMBER_12_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American #12 Business Envelope, 4 3/4 x 11 in.
NA_NUMBER_14_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American #14 Business Envelope, 5 x 11 1/2 in.
NA_NUMBER_9_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for North American #9 Business Envelope, 3 7/8 x 8 7/8 in.
name - Variable in class java.awt.Font
The logical name of this Font, as passed to the constructor.
name - Variable in class java.awt.Cursor
The user-visible name of the cursor.
name - Variable in class java.sql.DriverPropertyInfo
The name of the property.
name - Variable in class javax.swing.text.html.parser.AttributeList
name - Variable in class javax.swing.text.html.parser.DTD
name - Variable in class javax.swing.text.html.parser.Element
name - Variable in class javax.swing.text.html.parser.Entity
name - Variable in class org.omg.CORBA.UnionMember
The name of the union member described by this UnionMember object.
name - Variable in class org.omg.CORBA.StructMember
The name of the struct member described by this StructMember object.
name - Variable in class org.omg.CORBA.ValueMember
The name of the value member described by this ValueMember object.
Name - interface javax.naming.Name.
The Name interface represents a generic name -- an ordered sequence of components.
NAME - Static variable in interface javax.swing.Action
The key used for storing the name for the action, used for a menu or button.
NAME - Static variable in class javax.swing.text.html.HTML.Attribute
NAME - Static variable in interface javax.swing.text.html.parser.DTDConstants
name() - Method in class org.omg.CORBA.NamedValue
Retrieves the name for this NamedValue object.
name() - Method in class org.omg.CORBA.Principal
Deprecated. Deprecated by CORBA 2.2.
name() - Method in class org.omg.CORBA.TypeCode
Retrieves the simple name identifying this TypeCode object within its enclosing scope.
name(byte[]) - Method in class org.omg.CORBA.Principal
Deprecated. Deprecated by CORBA 2.2.
name2type(String) - Static method in class javax.swing.text.html.parser.AttributeList
name2type(String) - Static method in class javax.swing.text.html.parser.Element
name2type(String) - Static method in class javax.swing.text.html.parser.Entity
NameAlreadyBoundException - exception javax.naming.NameAlreadyBoundException.
This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
NameAlreadyBoundException() - Constructor for class javax.naming.NameAlreadyBoundException
Constructs a new instance of NameAlreadyBoundException.
NameAlreadyBoundException(String) - Constructor for class javax.naming.NameAlreadyBoundException
Constructs a new instance of NameAlreadyBoundException using the explanation supplied.
NameAttribute - Static variable in class javax.swing.text.StyleConstants
Attribute name used to name the collection of attributes.
NameAttribute - Static variable in interface javax.swing.text.AttributeSet
Attribute name used to name the collection of attributes.
NameClassPair - class javax.naming.NameClassPair.
This class represents the object name and class name pair of a binding found in a context.
NameClassPair(String, String) - Constructor for class javax.naming.NameClassPair
Constructs an instance of a NameClassPair given its name and class name.
NameClassPair(String, String, boolean) - Constructor for class javax.naming.NameClassPair
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
NameComponent - class org.omg.CosNaming.NameComponent.
NameComponent() - Constructor for class org.omg.CosNaming.NameComponent
NameComponent(String, String) - Constructor for class org.omg.CosNaming.NameComponent
NameComponentHelper - class org.omg.CosNaming.NameComponentHelper.
NameComponentHolder - class org.omg.CosNaming.NameComponentHolder.
NameComponentHolder() - Constructor for class org.omg.CosNaming.NameComponentHolder
NameComponentHolder(NameComponent) - Constructor for class org.omg.CosNaming.NameComponentHolder
NamedValue - class org.omg.CORBA.NamedValue.
An object used in the DII and DSI to describe arguments and return values.
NamedValue() - Constructor for class org.omg.CORBA.NamedValue
NameHelper - class org.omg.CosNaming.NameHelper.
NameHolder - class org.omg.CosNaming.NameHolder.
NameHolder() - Constructor for class org.omg.CosNaming.NameHolder
NameHolder(NameComponent[]) - Constructor for class org.omg.CosNaming.NameHolder
NameNotFoundException - exception javax.naming.NameNotFoundException.
This exception is thrown when a component of the name cannot be resolved because it is not bound.
NameNotFoundException() - Constructor for class javax.naming.NameNotFoundException
Constructs a new instance of NameNotFoundException.
NameNotFoundException(String) - Constructor for class javax.naming.NameNotFoundException
Constructs a new instance of NameNotFoundException using the explanation supplied.
NameParser - interface javax.naming.NameParser.
This interface is used for parsing names from a hierarchical namespace.
NAMES - Static variable in interface javax.swing.text.html.parser.DTDConstants
NamespaceChangeListener - interface javax.naming.event.NamespaceChangeListener.
Specifies the methods that a listener interested in namespace changes must implement.
NameValuePair - class org.omg.CORBA.NameValuePair.
The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
NameValuePair() - Constructor for class org.omg.CORBA.NameValuePair
Constructs an empty NameValuePair object.
NameValuePair(String, Any) - Constructor for class org.omg.CORBA.NameValuePair
Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
NameValuePairHelper - class org.omg.CORBA.NameValuePairHelper.
org/omg/CORBA/NameValuePairHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
NameValuePairHelper() - Constructor for class org.omg.CORBA.NameValuePairHelper
Naming - class java.rmi.Naming.
The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry.
NamingContext - interface org.omg.CosNaming.NamingContext.
A naming context is an object that contains a set of name bindings in which each name is unique.
NamingContextHelper - class org.omg.CosNaming.NamingContextHelper.
NamingContextHolder - class org.omg.CosNaming.NamingContextHolder.
NamingContextHolder() - Constructor for class org.omg.CosNaming.NamingContextHolder
NamingContextHolder(NamingContext) - Constructor for class org.omg.CosNaming.NamingContextHolder
NamingContextOperations - interface org.omg.CosNaming.NamingContextOperations.
org/omg/CosNaming/NamingContextOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:53 PM PST
NamingEnumeration - interface javax.naming.NamingEnumeration.
This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.
NamingEvent - class javax.naming.event.NamingEvent.
This class represents an event fired by a naming/directory service.
NamingEvent(EventContext, int, Binding, Binding, Object) - Constructor for class javax.naming.event.NamingEvent
Constructs an instance of NamingEvent.
NamingException - exception javax.naming.NamingException.
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
NamingException() - Constructor for class javax.naming.NamingException
Constructs a new NamingException.
NamingException(String) - Constructor for class javax.naming.NamingException
Constructs a new NamingException with an explanation.
NamingExceptionEvent - class javax.naming.event.NamingExceptionEvent.
This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.
NamingExceptionEvent(EventContext, NamingException) - Constructor for class javax.naming.event.NamingExceptionEvent
Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.
namingExceptionThrown(NamingExceptionEvent) - Method in interface javax.naming.event.NamingListener
Called when a naming exception is thrown while attempting to fire a NamingEvent.
NamingListener - interface javax.naming.event.NamingListener.
This interface is the root of listener interfaces that handle NamingEvents.
NamingManager - class javax.naming.spi.NamingManager.
This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.
NamingSecurityException - exception javax.naming.NamingSecurityException.
This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
NamingSecurityException() - Constructor for class javax.naming.NamingSecurityException
Constructs a new instance of NamingSecurityException.
NamingSecurityException(String) - Constructor for class javax.naming.NamingSecurityException
Constructs a new instance of NamingSecurityException using the explanation supplied.
NaN - Static variable in class java.lang.Float
The Not-a-Number (NaN) value of type float.
NaN - Static variable in class java.lang.Double
A Not-a-Number (NaN) value of type double.
narrow(Object) - Static method in class org.omg.CORBA.IDLTypeHelper
narrow(Object) - Static method in class org.omg.CORBA.CurrentHelper
narrow(Object) - Static method in class org.omg.CORBA.PolicyHelper
narrow(Object) - Static method in class org.omg.CosNaming.BindingIteratorHelper
narrow(Object) - Static method in class org.omg.CosNaming.NamingContextHelper
narrow(Object, Class) - Static method in class javax.rmi.PortableRemoteObject
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.
narrow(Object, Class) - Method in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).
NATIVE - Static variable in class java.awt.JobAttributes.DialogType
The DialogType instance to use for specifying the platform's native print dialog.
NATIVE - Static variable in class java.lang.reflect.Modifier
The int value representing the native modifier.
nativeSQL(String) - Method in interface java.sql.Connection
Converts the given SQL statement into the system's native SQL grammar.
navigateFocusedComp(int) - Method in class javax.swing.plaf.basic.BasicToolBarUI
navigateKey - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
Deprecated. As of JDK version 1.3.
navigateKey2 - Variable in class javax.swing.plaf.basic.BasicDesktopPaneUI
Deprecated. As of JDK version 1.3.
navigateSelectedTab(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
ncontext - Static variable in class org.omg.CosNaming.BindingType
nCopies(int, Object) - Static method in class java.util.Collections
Returns an immutable list consisting of n copies of the specified object.
NE_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The north-east-resize cursor type.
NE_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.NE_RESIZE_CURSOR.
needsDictionary() - Method in class java.util.zip.Inflater
Returns true if a preset dictionary is needed for decompression.
needsGui() - Method in interface java.beans.Visibility
Determines whether this bean needs a GUI.
needsGui() - Method in class java.beans.beancontext.BeanContextSupport
This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
needsInput() - Method in class java.util.zip.Deflater
Returns true if the input data buffer is empty and setInput() should be called in order to provide more input.
needsInput() - Method in class java.util.zip.Inflater
Returns true if no data remains in the input buffer.
negate() - Method in class java.math.BigInteger
Returns a BigInteger whose value is (-this).
negate() - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (-this), and whose scale is this.scale().
NEGATIVE_INFINITY - Static variable in class java.lang.Float
The negative infinity of type float.
NEGATIVE_INFINITY - Static variable in class java.lang.Double
The negative infinity of type double.
NEGATIVE_SCROLL - Static variable in class javax.swing.plaf.basic.BasicSliderUI
NegativeArraySizeException - exception java.lang.NegativeArraySizeException.
Thrown if an application tries to create an array with negative size.
NegativeArraySizeException() - Constructor for class java.lang.NegativeArraySizeException
Constructs a NegativeArraySizeException with no detail message.
NegativeArraySizeException(String) - Constructor for class java.lang.NegativeArraySizeException
Constructs a NegativeArraySizeException with the specified detail message.
NetPermission - class java.net.NetPermission.
This class is for various network permissions.
NetPermission(String) - Constructor for class java.net.NetPermission
Creates a new NetPermission with the specified name.
NetPermission(String, String) - Constructor for class java.net.NetPermission
Creates a new NetPermission object with the specified name.
new_context() - Method in class org.omg.CosNaming._NamingContextStub
new_context() - Method in interface org.omg.CosNaming.NamingContextOperations
This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
newAttributes - Variable in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
newAudioClip(URL) - Static method in class java.applet.Applet
Get an audio clip from the given URL.
newBinding - Variable in class javax.naming.event.NamingEvent
Contains information about the object after the change.
newCall(RemoteObject, Operation[], int, long) - Method in interface java.rmi.server.RemoteRef
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

newDataAvailable(TableModelEvent) - Method in class javax.swing.table.DefaultTableModel
Equivalent to fireTableChanged.
newFolderIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
newInstance() - Method in class java.lang.Class
Creates a new instance of the class represented by this Class object.
newInstance(ActivationID, ActivationDesc) - Method in interface java.rmi.activation.ActivationInstantiator
The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.
newInstance(Class, int) - Static method in class java.lang.reflect.Array
Creates a new array with the specified component type and length.
newInstance(Class, int[]) - Static method in class java.lang.reflect.Array
Creates a new array with the specified component type and dimensions.
newInstance(Control[]) - Method in class javax.naming.ldap.InitialLdapContext
newInstance(Control[]) - Method in interface javax.naming.ldap.LdapContext
Creates a new instance of this context initialized using request controls.
newInstance(Object[]) - Method in class java.lang.reflect.Constructor
Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.
newInstance(URL[]) - Static method in class java.net.URLClassLoader
Creates a new instance of URLClassLoader for the specified URLs and default parent class loader.
newInstance(URL[], ClassLoader) - Static method in class java.net.URLClassLoader
Creates a new instance of URLClassLoader for the specified URLs and parent class loader.
newLeadSelectionPath - Variable in class javax.swing.event.TreeSelectionEvent
leadSelectionPath after the paths changed, may be null.
NEWLINE - Static variable in class javax.swing.text.AbstractWriter
How the text packages models newlines.
newLine() - Method in class java.io.BufferedWriter
Write a line separator.
newmodel - Variable in class java.awt.image.RGBImageFilter
The ColorModel with which to replace origmodel when the user calls substituteColorModel.
newPermissionCollection() - Method in class java.io.FilePermission
Returns a new PermissionCollection object for storing FilePermission objects.
newPermissionCollection() - Method in class java.net.SocketPermission
Returns a new PermissionCollection object for storing SocketPermission objects.
newPermissionCollection() - Method in class java.security.Permission
Returns an empty PermissionCollection for a given Permission object, or null if one is not defined.
newPermissionCollection() - Method in class java.security.BasicPermission
Returns a new PermissionCollection object for storing BasicPermission objects.
newPermissionCollection() - Method in class java.security.UnresolvedPermission
Returns a new PermissionCollection object for storing UnresolvedPermission objects.
newPermissionCollection() - Method in class java.security.AllPermission
Returns a new PermissionCollection object for storing AllPermission objects.
newPermissionCollection() - Method in class java.util.PropertyPermission
Returns a new PermissionCollection object for storing PropertyPermission objects.
newPixels() - Method in class java.awt.image.MemoryImageSource
Send a whole new buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
newPixels(byte[], ColorModel, int, int) - Method in class java.awt.image.MemoryImageSource
Change to a new byte array to hold the pixels for this image.
newPixels(int[], ColorModel, int, int) - Method in class java.awt.image.MemoryImageSource
Change to a new int array to hold the pixels for this image.
newPixels(int, int, int, int) - Method in class java.awt.image.MemoryImageSource
Send a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
newPixels(int, int, int, int, boolean) - Method in class java.awt.image.MemoryImageSource
Send a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image.
newProxyInstance(ClassLoader, Class[], InvocationHandler) - Static method in class java.lang.reflect.Proxy
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
newRowsAdded(TableModelEvent) - Method in class javax.swing.table.DefaultTableModel
Ensures that the new rows have the correct number of columns.
next - Variable in class javax.swing.text.html.parser.AttributeList
next - Variable in class javax.swing.text.html.parser.ContentModel
The next content model (in a ',', '|' or '&' expression).
next_n(int, BindingListHolder) - Method in interface org.omg.CosNaming.BindingIteratorOperations
This operation returns at most the requested number of bindings.
next_n(int, BindingListHolder) - Method in class org.omg.CosNaming._BindingIteratorStub
next_one(BindingHolder) - Method in interface org.omg.CosNaming.BindingIteratorOperations
This operation returns the next binding.
next_one(BindingHolder) - Method in class org.omg.CosNaming._BindingIteratorStub
next() - Method in interface java.awt.geom.PathIterator
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
next() - Method in class java.awt.geom.FlatteningPathIterator
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
next() - Method in class java.beans.beancontext.BeanContextSupport.BCSIterator
next() - Method in interface java.sql.ResultSet
Moves the cursor down one row from its current position.
next() - Method in class java.text.CollationElementIterator
Get the next collation element in the string.
next() - Method in interface java.text.CharacterIterator
Increments the iterator's index by one and returns the character at the new index.
next() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.next() for String.
next() - Method in class java.text.BreakIterator
Return the boundary following the current boundary.
next() - Method in interface java.util.ListIterator
Returns the next element in the list.
next() - Method in interface java.util.Iterator
Returns the next element in the interation.
next() - Method in interface javax.naming.NamingEnumeration
Retrieves the next element in the enumeration.
next() - Method in class javax.swing.text.ElementIterator
Fetches the next Element.
next() - Method in class javax.swing.text.Segment
Increments the iterator's index by one and returns the character at the new index.
next() - Method in class javax.swing.text.html.HTMLDocument.Iterator
Move the iterator forward to the next occurence of the tag it represents.
next() - Method in interface org.omg.CORBA.DynAny
Moves to the next component of this DynAny object.
next(Container) - Method in class java.awt.CardLayout
Flips to the next card of the specified container.
next(int) - Method in class java.security.SecureRandom
Generates an integer containing the user-specified number of pseudo-random bits (right justified, with leading zeros).
next(int) - Method in class java.text.BreakIterator
Return the nth boundary from the current boundary
next(int) - Method in class java.util.Random
Generates the next pseudorandom number.
nextBoolean() - Method in class java.util.Random
Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
nextBytes(byte[]) - Method in class java.security.SecureRandom
Generates a user-specified number of random bytes.
nextBytes(byte[]) - Method in class java.util.Random
Generates random bytes and places them into a user-supplied byte array.
nextDouble() - Method in class java.util.Random
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
nextDouble(double) - Static method in class java.text.ChoiceFormat
Finds the least double greater than d.
nextDouble(double, boolean) - Static method in class java.text.ChoiceFormat
Finds the least double greater than d (if positive == true), or the greatest double less than d (if positive == false).
nextElement() - Method in interface java.util.Enumeration
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
nextElement() - Method in class java.util.StringTokenizer
Returns the same value as the nextToken method, except that its declared return value is Object rather than String.
nextFloat() - Method in class java.util.Random
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
nextFocus() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by transferFocus().
nextGaussian() - Method in class java.util.Random
Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.
nextIndex() - Method in interface java.util.ListIterator
Returns the index of the element that would be returned by a subsequent call to next.
nextInt() - Method in class java.util.Random
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
nextInt(int) - Method in class java.util.Random
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
nextLayout(float) - Method in class java.awt.font.LineBreakMeasurer
Returns the next layout, and updates the current position.
nextLayout(float, int, boolean) - Method in class java.awt.font.LineBreakMeasurer
Returns the next layout, and updates the current position.
nextLong() - Method in class java.util.Random
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
nextOffset(float) - Method in class java.awt.font.LineBreakMeasurer
Returns the position at the end of the next layout.
nextOffset(float, int, boolean) - Method in class java.awt.font.LineBreakMeasurer
Returns the position at the end of the next layout.
nextTabStop(float, int) - Method in interface javax.swing.text.TabExpander
Returns the next tab stop position given a reference position.
nextTabStop(float, int) - Method in class javax.swing.text.ParagraphView
Returns the next tab stop position given a reference position.
nextTabStop(float, int) - Method in class javax.swing.text.PlainView
Returns the next tab stop position after a given reference position.
nextTabStop(float, int) - Method in class javax.swing.text.WrappedPlainView
Returns the next tab stop position after a given reference position.
nextToken() - Method in class java.io.StreamTokenizer
Parses the next token from the input stream of this tokenizer.
nextToken() - Method in class java.util.StringTokenizer
Returns the next token from this string tokenizer.
nextToken(String) - Method in class java.util.StringTokenizer
Returns the next token in this string tokenizer's string.
nextWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of the next word.
NMTOKEN - Static variable in interface javax.swing.text.html.parser.DTDConstants
NMTOKENS - Static variable in interface javax.swing.text.html.parser.DTDConstants
NO_COMPRESSION - Static variable in class java.util.zip.Deflater
Compression level for no compression.
NO_DECOMPOSITION - Static variable in class java.text.Collator
Decomposition mode value.
NO_FIELDS - Static variable in class java.io.ObjectStreamClass
Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields.
NO_HIGHLIGHT - Static variable in class javax.swing.plaf.basic.BasicScrollBarUI
NO_IMPLEMENT - exception org.omg.CORBA.NO_IMPLEMENT.
The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
NO_IMPLEMENT() - Constructor for class org.omg.CORBA.NO_IMPLEMENT
Constructs a NO_IMPLEMENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_IMPLEMENT(int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_IMPLEMENT
Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
NO_IMPLEMENT(String) - Constructor for class org.omg.CORBA.NO_IMPLEMENT
Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_IMPLEMENT(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_IMPLEMENT
Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
NO_MEMORY - exception org.omg.CORBA.NO_MEMORY.
The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
NO_MEMORY() - Constructor for class org.omg.CORBA.NO_MEMORY
Constructs a NO_MEMORY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_MEMORY(int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_MEMORY
Constructs a NO_MEMORY exception with the specified minor code and completion status.
NO_MEMORY(String) - Constructor for class org.omg.CORBA.NO_MEMORY
Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_MEMORY(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_MEMORY
Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
NO_OPTION - Static variable in class javax.swing.JOptionPane
Return value from class method if NO is chosen.
NO_PERMISSION - exception org.omg.CORBA.NO_PERMISSION.
The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
NO_PERMISSION() - Constructor for class org.omg.CORBA.NO_PERMISSION
Constructs a NO_PERMISSION exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_PERMISSION(int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_PERMISSION
Constructs a NO_PERMISSION exception with the specified minor code and completion status.
NO_PERMISSION(String) - Constructor for class org.omg.CORBA.NO_PERMISSION
Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_PERMISSION(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_PERMISSION
Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
NO_RESOURCES - exception org.omg.CORBA.NO_RESOURCES.
The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
NO_RESOURCES() - Constructor for class org.omg.CORBA.NO_RESOURCES
Constructs a NO_RESOURCES exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_RESOURCES(int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_RESOURCES
Constructs a NO_RESOURCES exception with the specified minor code and completion status.
NO_RESOURCES(String) - Constructor for class org.omg.CORBA.NO_RESOURCES
Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESOURCES(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_RESOURCES
Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
NO_RESPONSE - exception org.omg.CORBA.NO_RESPONSE.
The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
NO_RESPONSE() - Constructor for class org.omg.CORBA.NO_RESPONSE
Constructs a NO_RESPONSE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_RESPONSE(int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_RESPONSE
Constructs a NO_RESPONSE exception with the specified minor code and completion status.
NO_RESPONSE(String) - Constructor for class org.omg.CORBA.NO_RESPONSE
Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESPONSE(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.NO_RESPONSE
Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
NO_SUCH_PAGE - Static variable in interface java.awt.print.Printable
Returned from print to signify that the pageIndex is too large and that the requested page does not exist.
NO_SYNC - Static variable in class javax.sound.midi.Sequencer.SyncMode
A slave synchronization mode indicating that no timing information should be sent to the receiver.
nobject - Static variable in class org.omg.CosNaming.BindingType
NoClassDefFoundError - error java.lang.NoClassDefFoundError.
Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
NoClassDefFoundError() - Constructor for class java.lang.NoClassDefFoundError
Constructs a NoClassDefFoundError with no detail message.
NoClassDefFoundError(String) - Constructor for class java.lang.NoClassDefFoundError
Constructs a NoClassDefFoundError with the specified detail message.
nodeChanged(TreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method after you've changed how node is to be represented in the tree.
nodeDimensions - Variable in class javax.swing.tree.AbstractLayoutCache
Object responsible for getting the size of a node.
nodeDimensions - Variable in class javax.swing.plaf.basic.BasicTreeUI
Reponsible for telling the TreeState the size needed for a node.
nodesChanged(TreeNode, int[]) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
nodeStructureChanged(TreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method if you've totally changed the children of node and its childrens children...
nodesWereInserted(TreeNode, int[]) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method after you've inserted some TreeNodes into node.
nodesWereRemoved(TreeNode, int[], Object[]) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method after you've removed some TreeNodes from node.
noFocusBorder - Static variable in class javax.swing.DefaultListCellRenderer
noFocusBorder - Static variable in class javax.swing.table.DefaultTableCellRenderer
noFocusBorder - Static variable in class javax.swing.plaf.basic.BasicComboBoxRenderer
NOFRAMES - Static variable in class javax.swing.text.html.HTML.Tag
NOHREF - Static variable in class javax.swing.text.html.HTML.Attribute
NoInitialContextException - exception javax.naming.NoInitialContextException.
This exception is thrown when no initial context implementation can be created.
NoInitialContextException() - Constructor for class javax.naming.NoInitialContextException
Constructs an instance of NoInitialContextException.
NoInitialContextException(String) - Constructor for class javax.naming.NoInitialContextException
Constructs an instance of NoInitialContextException with an explanation.
NON_CONTINUOUS_DIVIDER - Static variable in class javax.swing.plaf.basic.BasicSplitPaneUI
The divider used for non-continuous layout is added to the split pane with this object.
non_existent(Object) - Method in class org.omg.CORBA.portable.Delegate
Determines whether the server object for the object reference has been destroyed.
NON_SPACING_MARK - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
nonContinuousLayoutDivider - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Instance for the shadow of the divider when non continuous layout is being used.
NONCRITICAL - Static variable in interface javax.naming.ldap.Control
Indicates a non-critical control.
NONE - Static variable in class java.awt.JobAttributes.DialogType
The DialogType instance to use for specifying no print dialog.
NONE - Static variable in class java.awt.GridBagConstraints
Do not resize the component.
NONE_OPTION - Static variable in class javax.swing.DebugGraphics
Don't debug graphics operations.
NoninvertibleTransformException - exception java.awt.geom.NoninvertibleTransformException.
The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.
NoninvertibleTransformException(String) - Constructor for class java.awt.geom.NoninvertibleTransformException
Constructs an instance of NoninvertibleTransformException with the specified detail message.
NoPermissionException - exception javax.naming.NoPermissionException.
This exception is thrown when attempting to perform an operation for which the client has no permission.
NoPermissionException() - Constructor for class javax.naming.NoPermissionException
Constructs a new instance of NoPermissionException.
NoPermissionException(String) - Constructor for class javax.naming.NoPermissionException
Constructs a new instance of NoPermissionException using an explanation.
NORESIZE - Static variable in class javax.swing.text.html.HTML.Attribute
NORM_PRIORITY - Static variable in class java.lang.Thread
The default priority that is assigned to a thread.
NORMAL - Static variable in class java.awt.Frame
NORMAL - Static variable in class java.awt.PageAttributes.PrintQualityType
The PrintQualityType instance to use for specifying a normal print quality.
normalizeMimeType(String) - Method in class java.awt.datatransfer.DataFlavor
Deprecated.
normalizeMimeTypeParameter(String, String) - Method in class java.awt.datatransfer.DataFlavor
Deprecated.
normalizeTabRuns(int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
normalizeTabRuns(int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
NoRouteToHostException - exception java.net.NoRouteToHostException.
Signals that an error occurred while attempting to connect a socket to a remote address and port.
NoRouteToHostException() - Constructor for class java.net.NoRouteToHostException
Construct a new NoRouteToHostException with no detailed message.
NoRouteToHostException(String) - Constructor for class java.net.NoRouteToHostException
Constructs a new NoRouteToHostException with the specified detail message as to why the remote host cannot be reached.
NORTH - Static variable in class java.awt.BorderLayout
The north layout constraint (top of container).
NORTH - Static variable in class java.awt.GridBagConstraints
Put the component at the top of its display area, centered horizontally.
NORTH - Static variable in interface javax.swing.SwingConstants
Compass-direction North (up).
NORTH_EAST - Static variable in interface javax.swing.SwingConstants
Compass-direction north-east (upper right).
NORTH_WEST - Static variable in interface javax.swing.SwingConstants
Compass-direction north west (upper left).
NORTHEAST - Static variable in class java.awt.GridBagConstraints
Put the component at the top-right corner of its display area.
northPane - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
NORTHWEST - Static variable in class java.awt.GridBagConstraints
Put the component at the top-left corner of its display area.
NOSHADE - Static variable in class javax.swing.text.html.HTML.Attribute
NoSuchAlgorithmException - exception java.security.NoSuchAlgorithmException.
This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchAlgorithmException() - Constructor for class java.security.NoSuchAlgorithmException
Constructs a NoSuchAlgorithmException with no detail message.
NoSuchAlgorithmException(String) - Constructor for class java.security.NoSuchAlgorithmException
Constructs a NoSuchAlgorithmException with the specified detail message.
NoSuchAttributeException - exception javax.naming.directory.NoSuchAttributeException.
This exception is thrown when attempting to access an attribute that does not exist.
NoSuchAttributeException() - Constructor for class javax.naming.directory.NoSuchAttributeException
Constructs a new instance of NoSuchAttributeException.
NoSuchAttributeException(String) - Constructor for class javax.naming.directory.NoSuchAttributeException
Constructs a new instance of NoSuchAttributeException using an explanation.
NoSuchElementException - exception java.util.NoSuchElementException.
Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
NoSuchElementException() - Constructor for class java.util.NoSuchElementException
Constructs a NoSuchElementException with null as its error message string.
NoSuchElementException(String) - Constructor for class java.util.NoSuchElementException
Constructs a NoSuchElementException, saving a reference to the error message string s for later retrieval by the getMessage method.
NoSuchFieldError - error java.lang.NoSuchFieldError.
Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
NoSuchFieldError() - Constructor for class java.lang.NoSuchFieldError
Constructs a NoSuchFieldException with no detail message.
NoSuchFieldError(String) - Constructor for class java.lang.NoSuchFieldError
Constructs a NoSuchFieldException with the specified detail message.
NoSuchFieldException - exception java.lang.NoSuchFieldException.
Signals that the class doesn't have a field of a specified name.
NoSuchFieldException() - Constructor for class java.lang.NoSuchFieldException
Constructor.
NoSuchFieldException(String) - Constructor for class java.lang.NoSuchFieldException
Constructor with a detail message.
NoSuchMethodError - error java.lang.NoSuchMethodError.
Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
NoSuchMethodError() - Constructor for class java.lang.NoSuchMethodError
Constructs a NoSuchMethodError with no detail message.
NoSuchMethodError(String) - Constructor for class java.lang.NoSuchMethodError
Constructs a NoSuchMethodError with the specified detail message.
NoSuchMethodException - exception java.lang.NoSuchMethodException.
Thrown when a particular method cannot be found.
NoSuchMethodException() - Constructor for class java.lang.NoSuchMethodException
Constructs a NoSuchMethodException without a detail message.
NoSuchMethodException(String) - Constructor for class java.lang.NoSuchMethodException
Constructs a NoSuchMethodException with a detail message.
NoSuchObjectException - exception java.rmi.NoSuchObjectException.
A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
NoSuchObjectException(String) - Constructor for class java.rmi.NoSuchObjectException
Constructs a NoSuchObjectException with the specified detail message.
NoSuchProviderException - exception java.security.NoSuchProviderException.
This exception is thrown when a particular security provider is requested but is not available in the environment.
NoSuchProviderException() - Constructor for class java.security.NoSuchProviderException
Constructs a NoSuchProviderException with no detail message.
NoSuchProviderException(String) - Constructor for class java.security.NoSuchProviderException
Constructs a NoSuchProviderException with the specified detail message.
not_context - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
not_object - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
NOT_SPECIFIED - Static variable in class javax.sound.sampled.AudioSystem
An integer that stands for an unknown numeric value.
not() - Method in class java.math.BigInteger
Returns a BigInteger whose value is (~this).
NotActiveException - exception java.io.NotActiveException.
Thrown when serialization or deserialization is not active.
NotActiveException() - Constructor for class java.io.NotActiveException
Constructor to create a new NotActiveException without a reason.
NotActiveException(String) - Constructor for class java.io.NotActiveException
Constructor to create a new NotActiveException with the reason given.
NOTATION - Static variable in interface javax.swing.text.html.parser.DTDConstants
NotBoundException - exception java.rmi.NotBoundException.
A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
NotBoundException() - Constructor for class java.rmi.NotBoundException
Constructs a NotBoundException with no specified detail message.
NotBoundException(String) - Constructor for class java.rmi.NotBoundException
Constructs a NotBoundException with the specified detail message.
NotContextException - exception javax.naming.NotContextException.
This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
NotContextException() - Constructor for class javax.naming.NotContextException
Constructs a new instance of NotContextException.
NotContextException(String) - Constructor for class javax.naming.NotContextException
Constructs a new instance of NotContextException using an explanation.
note - Variable in class javax.sound.midi.VoiceStatus
The MIDI note that this voice is playing.
NOTE - Static variable in class java.awt.PageAttributes.MediaType
An alias for NA_LETTER.
NOTE_OFF - Static variable in class javax.sound.midi.ShortMessage
Command value for Note Off message (0x80, or 128)
NOTE_ON - Static variable in class javax.sound.midi.ShortMessage
Command value for Note On message (0x90, or 144)
NotEmpty - exception org.omg.CosNaming.NamingContextPackage.NotEmpty.
NotEmpty() - Constructor for class org.omg.CosNaming.NamingContextPackage.NotEmpty
NotEmptyHelper - class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.
NotEmptyHolder - class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder.
NotEmptyHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
NotEmptyHolder(NotEmpty) - Constructor for class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
noteOff(int) - Method in interface javax.sound.midi.MidiChannel
Turns the specified note off.
noteOff(int, int) - Method in interface javax.sound.midi.MidiChannel
Turns the specified note off.
noteOn(int, int) - Method in interface javax.sound.midi.MidiChannel
Starts the specified note sounding.
NotFound - exception org.omg.CosNaming.NamingContextPackage.NotFound.
NotFound() - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFound
NotFound(NotFoundReason, NameComponent[]) - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFound
NotFoundHelper - class org.omg.CosNaming.NamingContextPackage.NotFoundHelper.
NotFoundHolder - class org.omg.CosNaming.NamingContextPackage.NotFoundHolder.
NotFoundHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
NotFoundHolder(NotFound) - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
NotFoundReason - class org.omg.CosNaming.NamingContextPackage.NotFoundReason.
NotFoundReasonHelper - class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper.
NotFoundReasonHolder - class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder.
NotFoundReasonHolder() - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
NotFoundReasonHolder(NotFoundReason) - Constructor for class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
notificationReceived(UnsolicitedNotificationEvent) - Method in interface javax.naming.ldap.UnsolicitedNotificationListener
Called when an unsolicited notification has been received.
notifier - Variable in class java.awt.event.InvocationEvent
The (potentially null) Object whose notifyAll() method will be called immediately after the Runnable.run() method returns.
notify() - Method in class java.lang.Object
Wakes up a single thread that is waiting on this object's monitor.
notifyAction - Static variable in class javax.swing.JTextField
Name of the action to send notification that the contents of the field have been accepted.
notifyAction(Action, KeyStroke, KeyEvent, Object, int) - Static method in class javax.swing.SwingUtilities
Invokes actionPerformed on action if action is enabled (and non null).
notifyAll() - Method in class java.lang.Object
Wakes up all threads that are waiting on this object's monitor.
notifyClientWindowChange(Rectangle) - Method in interface java.awt.im.spi.InputMethod
Notifies this input method of changes in the client window location or state.
notifyObservers() - Method in class java.util.Observable
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
notifyObservers(Object) - Method in class java.util.Observable
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
notifyPathChange(Vector, TreePath) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Notifies listeners of a change in path.
NotOwnerException - exception java.security.acl.NotOwnerException.
This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.
NotOwnerException() - Constructor for class java.security.acl.NotOwnerException
Constructs a NotOwnerException.
notSelectedTextColor - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
notSelectedTitleColor - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
NotSerializableException - exception java.io.NotSerializableException.
Thrown when an instance is required to have a Serializable interface.
NotSerializableException() - Constructor for class java.io.NotSerializableException
Constructs a NotSerializableException object.
NotSerializableException(String) - Constructor for class java.io.NotSerializableException
Constructs a NotSerializableException object with message string.
NOVEMBER - Static variable in class java.util.Calendar
Value of the MONTH field indicating the eleventh month of the year.
NOWRAP - Static variable in class javax.swing.text.html.HTML.Attribute
npoints - Variable in class java.awt.Polygon
The total number of points.
NULL - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL.
NULL_ATTRIBUTE_VALUE - Static variable in class javax.swing.text.html.HTML
NULLORDER - Static variable in class java.text.CollationElementIterator
Null order which indicates the end of string is reached by the cursor.
nullPlusNonNullIsNull() - Method in interface java.sql.DatabaseMetaData
Are concatenations between NULL and non-NULL values NULL? For SQL-92 compliance, a JDBC technology-enabled driver will return true.
NullPointerException - exception java.lang.NullPointerException.
Thrown when an application attempts to use null in a case where an object is required.
NullPointerException() - Constructor for class java.lang.NullPointerException
Constructs a NullPointerException with no detail message.
NullPointerException(String) - Constructor for class java.lang.NullPointerException
Constructs a NullPointerException with the specified detail message.
nullsAreSortedAtEnd() - Method in interface java.sql.DatabaseMetaData
Are NULL values sorted at the end regardless of sort order?
nullsAreSortedAtStart() - Method in interface java.sql.DatabaseMetaData
Are NULL values sorted at the start regardless of sort order?
nullsAreSortedHigh() - Method in interface java.sql.DatabaseMetaData
Are NULL values sorted high?
nullsAreSortedLow() - Method in interface java.sql.DatabaseMetaData
Are NULL values sorted low?
NUM_COLORS - Static variable in class java.awt.SystemColor
The number of system colors in the array.
NUM_LOCK - Static variable in class java.awt.Event
The Num Lock key, a non-ASCII action key.
numBands - Variable in class java.awt.image.SampleModel
Number of bands of the image data that this SampleModel describes.
numBands - Variable in class java.awt.image.ComponentSampleModel
The number of bands in this ComponentSampleModel.
numBands - Variable in class java.awt.image.Raster
The number of bands in the Raster.
numBanks - Variable in class java.awt.image.ComponentSampleModel
The number of banks in this ComponentSampleModel.
Number - class java.lang.Number.
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
NUMBER - Static variable in interface javax.swing.text.html.parser.DTDConstants
NUMBER_FORMS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Number() - Constructor for class java.lang.Number
numberFormat - Variable in class java.text.DateFormat
The number formatter that DateFormat uses to format numbers in dates and times.
NumberFormat - class java.text.NumberFormat.
NumberFormat is the abstract base class for all number formats.
NumberFormat() - Constructor for class java.text.NumberFormat
NumberFormatException - exception java.lang.NumberFormatException.
Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
NumberFormatException() - Constructor for class java.lang.NumberFormatException
Constructs a NumberFormatException with no detail message.
NumberFormatException(String) - Constructor for class java.lang.NumberFormatException
Constructs a NumberFormatException with the specified detail message.
NUMBERS - Static variable in interface javax.swing.text.html.parser.DTDConstants
numDataElements - Variable in class java.awt.image.Raster
The number of DataBuffer data elements per pixel.
NUMERIC - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.
NUTOKEN - Static variable in interface javax.swing.text.html.parser.DTDConstants
NUTOKENS - Static variable in interface javax.swing.text.html.parser.DTDConstants
nval - Variable in class java.io.StreamTokenizer
If the current token is a number, this field contains the value of that number.
NVList - class org.omg.CORBA.NVList.
A modifiable list containing NamedValue objects.
NVList() - Constructor for class org.omg.CORBA.NVList
NW_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The north-west-resize cursor type.
NW_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.NW_RESIZE_CURSOR.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


O-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

O

OBJ_ADAPTER - exception org.omg.CORBA.OBJ_ADAPTER.
The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
OBJ_ADAPTER() - Constructor for class org.omg.CORBA.OBJ_ADAPTER
Constructs an OBJ_ADAPTER exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
OBJ_ADAPTER(int, CompletionStatus) - Constructor for class org.omg.CORBA.OBJ_ADAPTER
Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
OBJ_ADAPTER(String) - Constructor for class org.omg.CORBA.OBJ_ADAPTER
Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJ_ADAPTER(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.OBJ_ADAPTER
Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
object - Variable in class javax.swing.undo.StateEdit
The object being edited
Object - class java.lang.Object.
Class Object is the root of the class hierarchy.
Object - interface org.omg.CORBA.Object.
The definition for a CORBA object reference.
OBJECT - Static variable in class javax.swing.text.html.HTML.Tag
OBJECT_ADDED - Static variable in class javax.naming.event.NamingEvent
Naming event type for indicating that a new object has been added.
OBJECT_CHANGED - Static variable in class javax.naming.event.NamingEvent
Naming event type for indicating that an object has been changed.
OBJECT_FACTORIES - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the list of object factories to use.
OBJECT_NOT_EXIST - exception org.omg.CORBA.OBJECT_NOT_EXIST.
The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
OBJECT_NOT_EXIST() - Constructor for class org.omg.CORBA.OBJECT_NOT_EXIST
Constructs an OBJECT_NOT_EXIST exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
OBJECT_NOT_EXIST(int, CompletionStatus) - Constructor for class org.omg.CORBA.OBJECT_NOT_EXIST
Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
OBJECT_NOT_EXIST(String) - Constructor for class org.omg.CORBA.OBJECT_NOT_EXIST
Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJECT_NOT_EXIST(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.OBJECT_NOT_EXIST
Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
OBJECT_REMOVED - Static variable in class javax.naming.event.NamingEvent
Naming event type for indicating that an object has been removed.
OBJECT_RENAMED - Static variable in class javax.naming.event.NamingEvent
Naming event type for indicating that an object has been renamed.
OBJECT_SCOPE - Static variable in class javax.naming.directory.SearchControls
Search the named object.
OBJECT_SCOPE - Static variable in interface javax.naming.event.EventContext
Constant for expressing interest in events concerning the object named by the target.
object_to_string(Object) - Method in class org.omg.CORBA.ORB
Converts the given CORBA object reference to a string.
Object() - Constructor for class java.lang.Object
objectAdded(NamingEvent) - Method in interface javax.naming.event.NamespaceChangeListener
Called when an object has been added.
objectChanged(NamingEvent) - Method in interface javax.naming.event.ObjectChangeListener
Called when an object has been changed.
ObjectChangeListener - interface javax.naming.event.ObjectChangeListener.
Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.
ObjectFactory - interface javax.naming.spi.ObjectFactory.
This interface represents a factory for creating an object.
ObjectFactoryBuilder - interface javax.naming.spi.ObjectFactoryBuilder.
This interface represents a builder that creates object factories.
ObjectHelper - class org.omg.CORBA.ObjectHelper.
ObjectHelper() - Constructor for class org.omg.CORBA.ObjectHelper
ObjectHolder - class org.omg.CORBA.ObjectHolder.
A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object).
ObjectHolder() - Constructor for class org.omg.CORBA.ObjectHolder
Constructs a new ObjectHolder object with its value field initialized to null.
ObjectHolder(Object) - Constructor for class org.omg.CORBA.ObjectHolder
Constructs a new ObjectHolder object with its value field initialized to the given Object.
ObjectImpl - class org.omg.CORBA.portable.ObjectImpl.
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
ObjectImpl - class org.omg.CORBA_2_3.portable.ObjectImpl.
ObjectImpl class is the base class for all stubs.
ObjectImpl() - Constructor for class org.omg.CORBA.portable.ObjectImpl
ObjectImpl() - Constructor for class org.omg.CORBA_2_3.portable.ObjectImpl
ObjectInput - interface java.io.ObjectInput.
ObjectInput extends the DataInput interface to include the reading of objects.
ObjectInputStream - class java.io.ObjectInputStream.
An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectInputStream.GetField - class java.io.ObjectInputStream.GetField.
Provide access to the persistent fields read from the input stream.
ObjectInputStream.GetField() - Constructor for class java.io.ObjectInputStream.GetField
ObjectInputStream() - Constructor for class java.io.ObjectInputStream
Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.
ObjectInputStream(InputStream) - Constructor for class java.io.ObjectInputStream
Create an ObjectInputStream that reads from the specified InputStream.
ObjectInputValidation - interface java.io.ObjectInputValidation.
Callback interface to allow validation of objects within a graph.
ObjectOutput - interface java.io.ObjectOutput.
ObjectOutput extends the DataOutput interface to include writing of objects.
ObjectOutputStream - class java.io.ObjectOutputStream.
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
ObjectOutputStream.PutField - class java.io.ObjectOutputStream.PutField.
Provide programatic access to the persistent fields to be written to ObjectOutput.
ObjectOutputStream.PutField() - Constructor for class java.io.ObjectOutputStream.PutField
ObjectOutputStream() - Constructor for class java.io.ObjectOutputStream
Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.
ObjectOutputStream(OutputStream) - Constructor for class java.io.ObjectOutputStream
Creates an ObjectOutputStream that writes to the specified OutputStream.
objectRemoved(NamingEvent) - Method in interface javax.naming.event.NamespaceChangeListener
Called when an object has been removed.
objectRenamed(NamingEvent) - Method in interface javax.naming.event.NamespaceChangeListener
Called when an object has been renamed.
ObjectStreamClass - class java.io.ObjectStreamClass.
Serialization's descriptor for classes.
ObjectStreamConstants - interface java.io.ObjectStreamConstants.
Constants written into the Object Serialization Stream.
ObjectStreamException - exception java.io.ObjectStreamException.
Superclass of all exceptions specific to Object Stream classes.
ObjectStreamException() - Constructor for class java.io.ObjectStreamException
Create an ObjectStreamException.
ObjectStreamException(String) - Constructor for class java.io.ObjectStreamException
Create an ObjectStreamException with the specified argument.
ObjectStreamField - class java.io.ObjectStreamField.
A description of a Serializable field from a Serializable class.
ObjectStreamField(String, Class) - Constructor for class java.io.ObjectStreamField
Create a Serializable field with the specified type.
ObjectView - class javax.swing.text.html.ObjectView.
Component decorator that implements the view interface for <object> elements.
ObjectView(Element) - Constructor for class javax.swing.text.html.ObjectView
Creates a new ObjectView object.
ObjID - class java.rmi.server.ObjID.
An ObjID is used to identify remote objects uniquely in a VM over time.
ObjID() - Constructor for class java.rmi.server.ObjID
Generates a unique object identifier.
ObjID(int) - Constructor for class java.rmi.server.ObjID
Generates a "well-known" object ID.
Observable - class java.util.Observable.
This class represents an observable object, or "data" in the model-view paradigm.
Observable() - Constructor for class java.util.Observable
Construct an Observable with zero Observers.
Observer - interface java.util.Observer.
A class can implement the Observer interface when it wants to be informed of changes in observable objects.
OctetSeqHelper - class org.omg.CORBA.OctetSeqHelper.
org/omg/CORBA/OctetSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
OctetSeqHelper() - Constructor for class org.omg.CORBA.OctetSeqHelper
OctetSeqHolder - class org.omg.CORBA.OctetSeqHolder.
org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
OctetSeqHolder() - Constructor for class org.omg.CORBA.OctetSeqHolder
OctetSeqHolder(byte[]) - Constructor for class org.omg.CORBA.OctetSeqHolder
OCTOBER - Static variable in class java.util.Calendar
Value of the MONTH field indicating the tenth month of the year.
oEnd - Variable in class javax.swing.text.html.parser.Element
of(char) - Static method in class java.lang.Character.UnicodeBlock
Returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.
offset - Variable in class java.awt.image.DataBuffer
Offset into default (first) bank from which to get the first element.
offset - Variable in class javax.swing.text.Segment
This is the offset into the array that the desired text begins.
offset - Variable in class javax.swing.tree.DefaultTreeCellEditor
Used in editing.
offset - Variable in class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
offset - Variable in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
offset - Variable in class org.omg.CORBA.portable.IndirectionException
Points to the stream's offset.
offsetRequested() - Method in class javax.swing.text.BadLocationException
Returns the offset into the document that was not legal.
offsets - Variable in class java.awt.image.DataBuffer
Offsets into all banks.
OK_CANCEL_OPTION - Static variable in class javax.swing.JOptionPane
Type used for showConfirmDialog.
OK_OPTION - Static variable in class javax.swing.JOptionPane
Return value form class method if OK is chosen.
okToUseGui - Variable in class java.beans.beancontext.BeanContextSupport
A boolean indicating if this instance may now render a GUI.
okToUseGui() - Method in interface java.beans.Visibility
This method instructs the bean that it is OK to use the Gui.
okToUseGui() - Method in class java.beans.beancontext.BeanContextSupport
Notify this instance that it may now render a GUI
OL - Static variable in class javax.swing.text.html.HTML.Tag
oldBinding - Variable in class javax.naming.event.NamingEvent
Contains information about the object before the change.
oldBorderPainted - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
oldLeadSelectionPath - Variable in class javax.swing.event.TreeSelectionEvent
leadSelectionPath before the paths changed, may be null.
OMGVMCID - interface org.omg.CORBA.OMGVMCID.
The vendor minor code ID reserved for OMG.
omitEnd() - Method in class javax.swing.text.html.parser.Element
Return true if the end tag can be omitted.
omitStart() - Method in class javax.swing.text.html.parser.Element
Return true if the start tag can be omitted.
on(boolean) - Method in class java.security.DigestOutputStream
Turns the digest function on or off.
on(boolean) - Method in class java.security.DigestInputStream
Turns the digest function on or off.
ONE - Static variable in class java.math.BigInteger
The BigInteger constant one.
ONE_SIDED - Static variable in class java.awt.JobAttributes.SidesType
The SidesType instance to use for specifying that consecutive job pages should be printed upon the same side of consecutive media sheets.
ONE_TOUCH_EXPANDABLE_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property for oneTouchExpandable.
ONE_TOUCH_OFFSET - Static variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
ONE_TOUCH_SIZE - Static variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.
ONELEVEL_SCOPE - Static variable in class javax.naming.directory.SearchControls
Search one level of the named context.
ONELEVEL_SCOPE - Static variable in interface javax.naming.event.EventContext
Constant for expressing interest in events concerning objects in the context named by the target, excluding the context named by the target.
oneTouchExpandable - Variable in class javax.swing.JSplitPane
Is a little widget provided to quickly expand/collapse the split pane?
oneTouchExpandableChanged() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes.
op_name() - Method in class org.omg.CORBA.ServerRequest
Deprecated. use operation()
OPAQUE - Static variable in interface java.awt.Transparency
Represents image data that is guaranteed to be completely opaque, meaning that all pixels have an alpha value of 1.0.
OPAQUE - Static variable in class javax.accessibility.AccessibleState
Indicates this object paints every pixel within its rectangular region.
OPEN - Static variable in class java.awt.geom.Arc2D
The closure type for an open arc with no path segments connecting the two ends of the arc segment.
OPEN - Static variable in class javax.sound.sampled.LineEvent.Type
A type of event that is sent when a line opens, reserving system resources for itself.
OPEN_DELETE - Static variable in class java.util.zip.ZipFile
Mode flag to open a zip file and mark it for deletion.
OPEN_DIALOG - Static variable in class javax.swing.JFileChooser
Type value indicating that the JFileChooser supports an "Open" file operation.
OPEN_READ - Static variable in class java.util.zip.ZipFile
Mode flag to open a zip file for reading.
open() - Method in interface javax.sound.sampled.Line
Opens the line, indicating that it should acquire any required system resources and become operational.
open() - Method in interface javax.sound.midi.MidiDevice
Opens the device, indicating that it should now acquire any system resources it requires and become operational.
open(AudioFormat) - Method in interface javax.sound.sampled.TargetDataLine
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
open(AudioFormat) - Method in interface javax.sound.sampled.SourceDataLine
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
open(AudioFormat, byte[], int, int) - Method in interface javax.sound.sampled.Clip
Opens the clip, meaning that it should acquire any required system resources and become operational.
open(AudioFormat, int) - Method in interface javax.sound.sampled.TargetDataLine
Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.
open(AudioFormat, int) - Method in interface javax.sound.sampled.SourceDataLine
Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
open(AudioInputStream) - Method in interface javax.sound.sampled.Clip
Opens the clip with the format and audio data present in the provided audio input stream.
openButtonMnemonic - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
openButtonText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
openButtonToolTipText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
openConnection() - Method in class java.net.URL
Returns a URLConnection object that represents a connection to the remote object referred to by the URL.
openConnection(URL) - Method in class java.net.URLStreamHandler
Opens a connection to the object referenced by the URL argument.
openFrame(JInternalFrame) - Method in interface javax.swing.DesktopManager
If possible, display this frame in an appropriate location.
openFrame(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Normally this method will not be called.
openIcon - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Icon used to show non-leaf nodes that are expanded.
openMenuKey - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
Deprecated. As of Java 2 platform v1.3.
openStream() - Method in class java.net.URL
Opens a connection to this URL and returns an InputStream for reading from that connection.
OpenType - interface java.awt.font.OpenType.
The OpenType interface represents OpenType and TrueType fonts.
Operation - class java.rmi.server.Operation.
Deprecated. no replacement
operation() - Method in class org.omg.CORBA.ServerRequest
Retrieves the name of the operation being invoked.
operation() - Method in class org.omg.CORBA.Request
Retrieves the name of the method to be invoked.
Operation(String) - Constructor for class java.rmi.server.Operation
Deprecated. no replacement
OperationNotSupportedException - exception javax.naming.OperationNotSupportedException.
This exception is thrown when a context implementation does not support the operation being invoked.
OperationNotSupportedException() - Constructor for class javax.naming.OperationNotSupportedException
Constructs a new instance of OperationNotSupportedException.
OperationNotSupportedException(String) - Constructor for class javax.naming.OperationNotSupportedException
Constructs a new instance of OperationNotSupportedException using an explanation.
OPTICAL_CHARACTER_RECOGNITION - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
Option - class javax.swing.text.html.Option.
Value for the ListModel used to represent <option> elements.
OPTION - Static variable in class javax.swing.text.html.HTML.Tag
OPTION_PANE - Static variable in class javax.accessibility.AccessibleRole
A specialized pane whose primary use is inside a DIALOG
OPTION_TYPE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for optionType.
Option(AttributeSet) - Constructor for class javax.swing.text.html.Option
Creates a new Option object.
OptionalDataException - exception java.io.OptionalDataException.
Unexpected data appeared in an ObjectInputStream trying to read an Object.
optionPane - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI
JOptionPane that the reciever is providing the look and feel for.
OptionPaneUI - class javax.swing.plaf.OptionPaneUI.
Pluggable look and feel interface for JOptionPane.
OptionPaneUI() - Constructor for class javax.swing.plaf.OptionPaneUI
options - Variable in class javax.swing.JOptionPane
Options to display to the user.
OPTIONS_PROPERTY - Static variable in class javax.swing.JOptionPane
Bounds property namer for option.
optionType - Variable in class javax.swing.JOptionPane
Option type, one of DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
or(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this | val).
or(BitSet) - Method in class java.util.BitSet
Performs a logical OR of this bit set with the bit set argument.
orange - Static variable in class java.awt.Color
The color orange.
ORB - class org.omg.CORBA.ORB.
A class providing APIs for the CORBA Object Request Broker features.
ORB - class org.omg.CORBA_2_3.ORB.
A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.
orb() - Method in interface javax.rmi.CORBA.Tie
Returns the ORB for this tie.
orb() - Method in class org.omg.CORBA.portable.OutputStream
Returns the ORB that created this OutputStream.
orb() - Method in class org.omg.CORBA.portable.InputStream
Returns the ORB that created this InputStream.
ORB() - Constructor for class org.omg.CORBA.ORB
ORB() - Constructor for class org.omg.CORBA_2_3.ORB
orb(Object) - Method in class org.omg.CORBA.portable.Delegate
Provides a reference to the orb associated with its parameter.
orb(ORB) - Method in interface javax.rmi.CORBA.Tie
Sets the ORB for this tie.
ordered - Variable in class javax.naming.directory.BasicAttribute
A flag for recording whether this attribute's values are ordered.
ordinaryChar(int) - Method in class java.io.StreamTokenizer
Specifies that the character argument is "ordinary" in this tokenizer.
ordinaryChars(int, int) - Method in class java.io.StreamTokenizer
Specifies that all characters c in the range low <= c <= high are "ordinary" in this tokenizer.
org.omg.CORBA - package org.omg.CORBA
Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 - package org.omg.CORBA_2_3
The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable - package org.omg.CORBA_2_3.portable
Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage - package org.omg.CORBA.DynAnyPackage
Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage - package org.omg.CORBA.ORBPackage
Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable - package org.omg.CORBA.portable
Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage - package org.omg.CORBA.TypeCodePackage
Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming - package org.omg.CosNaming
Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage - package org.omg.CosNaming.NamingContextPackage
Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext - package org.omg.SendingContext
Provides support for the marshalling of value types.
org.omg.stub.java.rmi - package org.omg.stub.java.rmi
Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.
orientation - Variable in class javax.swing.JSplitPane
How the views are split.
orientation - Variable in class javax.swing.JScrollBar
orientation - Variable in class javax.swing.JProgressBar
The orientation to display the progress bar.
orientation - Variable in class javax.swing.JSlider
orientation - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Orientation of the JSplitPane.
Orientation - Static variable in class javax.swing.text.StyleConstants
Orientation for a paragraph.
Orientation - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
Orientation for the paragraph.
ORIENTATION_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property name for orientation (horizontal or vertical).
origin - Variable in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
originalEx - Variable in class org.omg.CORBA.portable.UnknownException
A throwable--the original exception that was wrapped in a CORBA UnknownException.
OriginateDirection - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getDirection.
origmodel - Variable in class java.awt.image.RGBImageFilter
The ColorModel to be replaced by newmodel when the user calls substituteColorModel.
ORIYA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
oStart - Variable in class javax.swing.text.html.parser.Element
OTHER - Static variable in class java.sql.Types
The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
OTHER_LETTER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
OTHER_NUMBER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
OTHER_PUNCTUATION - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
OTHER_SYMBOL - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
othersDeletesAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether deletes made by others are visible.
othersInsertsAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether inserts made by others are visible.
othersUpdatesAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether updates made by others are visible.
out - Variable in class java.io.FilterWriter
The underlying character-output stream.
out - Variable in class java.io.FilterOutputStream
The underlying output stream to be filtered.
out - Variable in class java.io.PipedInputStream
The index of the position in the circular buffer at which the next byte of data will be read by this piped input stream.
out - Variable in class java.io.PrintWriter
The underlying character-output stream of this PrintWriter.
out - Static variable in class java.io.FileDescriptor
A handle to the standard output stream.
out - Static variable in class java.lang.System
The "standard" output stream.
OUT_BOTTOM - Static variable in class java.awt.geom.Rectangle2D
The bitmask that indicates that a point lies below this Rectangle2D.
OUT_LEFT - Static variable in class java.awt.geom.Rectangle2D
The bitmask that indicates that a point lies to the left of this Rectangle2D.
OUT_RIGHT - Static variable in class java.awt.geom.Rectangle2D
The bitmask that indicates that a point lies to the right of this Rectangle2D.
OUT_TOP - Static variable in class java.awt.geom.Rectangle2D
The bitmask that indicates that a point lies above this Rectangle2D.
outcode(double, double) - Method in class java.awt.Rectangle
Determines where the specified coordinates lie with respect to this Rectangle.
outcode(double, double) - Method in class java.awt.geom.Rectangle2D
Determines where the specified coordinates lie with respect to this Rectangle2D.
outcode(double, double) - Method in class java.awt.geom.Rectangle2D.Float
Determines where the specified float coordinates lie with respect to this Rectangle2D.
outcode(double, double) - Method in class java.awt.geom.Rectangle2D.Double
Determines where the specified double coordinates lie with respect to this Rectangle2D.
outcode(Point2D) - Method in class java.awt.geom.Rectangle2D
Determines where the specified Point2D lies with respect to this Rectangle2D.
OUTLINE_DRAG_MODE - Static variable in class javax.swing.JDesktopPane
Used to indicate you wish to see only an outline of the item being dragged inside the desktop pane.
OutOfMemoryError - error java.lang.OutOfMemoryError.
Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
OutOfMemoryError() - Constructor for class java.lang.OutOfMemoryError
Constructs an OutOfMemoryError with no detail message.
OutOfMemoryError(String) - Constructor for class java.lang.OutOfMemoryError
Constructs an OutOfMemoryError with the specified detail message.
outpixbuf - Variable in class java.awt.image.ReplicateScaleFilter
A byte array initialized with a size of ReplicateScaleFilter.destWidth and used to deliver a row of pixel data to the ImageConsumer.
output(char[], int, int) - Method in class javax.swing.text.AbstractWriter
The last stop in writing out content.
output(char[], int, int) - Method in class javax.swing.text.html.HTMLWriter
This method is overriden to map any character entities, such as < to &lt;.
OutputStream - class java.io.OutputStream.
This abstract class is the superclass of all classes representing an output stream of bytes.
OutputStream - class org.omg.CORBA.portable.OutputStream.
OuputStream is the Java API for writing IDL types to CDR marshal streams.
OutputStream - class org.omg.CORBA_2_3.portable.OutputStream.
OutputStream provides interface for writing of all of the mapped IDL type to the stream.
OutputStream() - Constructor for class java.io.OutputStream
OutputStream() - Constructor for class org.omg.CORBA.portable.OutputStream
OutputStream() - Constructor for class org.omg.CORBA_2_3.portable.OutputStream
OutputStreamWriter - class java.io.OutputStreamWriter.
An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding.
OutputStreamWriter(OutputStream) - Constructor for class java.io.OutputStreamWriter
Create an OutputStreamWriter that uses the default character encoding.
OutputStreamWriter(OutputStream, String) - Constructor for class java.io.OutputStreamWriter
Create an OutputStreamWriter that uses the named character encoding.
outsideBorder - Variable in class javax.swing.border.CompoundBorder
OVER - Static variable in class java.awt.dnd.DragSourceContext
An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.
OverlayLayout - class javax.swing.OverlayLayout.
A layout manager to arrange components over the top of each other.
OverlayLayout(Container) - Constructor for class javax.swing.OverlayLayout
Constructs a layout manager that performs overlay arrangment of the children.
ownDeletesAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether a result set's own deletes are visible.
owner - Variable in class java.awt.datatransfer.Clipboard
Owner - interface java.security.acl.Owner.
Interface for managing owners of Access Control Lists (ACLs) or ACL configurations.
ownInsertsAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether a result set's own inserts are visible.
ownUpdatesAreVisible(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether a result set's own updates are visible.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Overview

PREV NEXT FRAMES NO FRAMES

JavaTM 2 Platform, Standard Edition, v 1.3.1
API Specification

This document is the API specification for the Java 2 Platform, Standard Edition, version 1.3.1.

See:
Description

Java 2 Platform Packages
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref | Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

This document is the API specification for the Java 2 Platform, Standard Edition, version 1.3.1.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


P-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

P

p - Variable in class javax.swing.text.html.parser.DTD
P - Static variable in class javax.swing.text.html.HTML.Tag
pack() - Method in class java.awt.Window
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
pack() - Method in class javax.swing.JPopupMenu
Lays out the container so that it uses the minimum space needed to display its contents.
pack() - Method in class javax.swing.JInternalFrame
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
Package - class java.lang.Package.
Package objects contain version information about the implementation and specification of a Java package.
packagePrefix - Static variable in interface java.rmi.server.RemoteRef
Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
packagePrefix - Static variable in interface java.rmi.server.LoaderHandler
Deprecated. package of system LoaderHandler implementation.
PackedColorModel - class java.awt.image.PackedColorModel.
The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.
PackedColorModel(ColorSpace, int, int[], int, boolean, int, int) - Constructor for class java.awt.image.PackedColorModel
Constructs a PackedColorModel from a color mask array, which specifies which bits in an int pixel representation contain each of the color samples, and an alpha mask.
PackedColorModel(ColorSpace, int, int, int, int, int, boolean, int, int) - Constructor for class java.awt.image.PackedColorModel
Constructs a PackedColorModel from the specified masks which indicate which bits in an int pixel representation contain the alpha, red, green and blue color samples.
padding - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
PADDING - Static variable in class javax.swing.text.html.CSS.Attribute
PADDING_BOTTOM - Static variable in class javax.swing.text.html.CSS.Attribute
PADDING_LEFT - Static variable in class javax.swing.text.html.CSS.Attribute
PADDING_RIGHT - Static variable in class javax.swing.text.html.CSS.Attribute
PADDING_TOP - Static variable in class javax.swing.text.html.CSS.Attribute
padSelectedTab(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
padSelectedTab(int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
padSpaceBetweenStrings - Static variable in class javax.swing.plaf.metal.MetalToolTipUI
padTabRun(int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
PAGE_EXISTS - Static variable in interface java.awt.print.Printable
Returned from Printable.print(Graphics, PageFormat, int) to signify that the requested page was rendered.
PAGE_TAB - Static variable in class javax.accessibility.AccessibleRole
An object that is a child of a page tab list.
PAGE_TAB_LIST - Static variable in class javax.accessibility.AccessibleRole
An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object.
Pageable - interface java.awt.print.Pageable.
The Pageable implementation represents a set of pages to be printed.
PageAttributes - class java.awt.PageAttributes.
A set of attributes which control the output of a printed page.
PageAttributes.ColorType - class java.awt.PageAttributes.ColorType.
A type-safe enumeration of possible color states.
PageAttributes.MediaType - class java.awt.PageAttributes.MediaType.
A type-safe enumeration of possible paper sizes.
PageAttributes.OrientationRequestedType - class java.awt.PageAttributes.OrientationRequestedType.
A type-safe enumeration of possible orientations.
PageAttributes.OriginType - class java.awt.PageAttributes.OriginType.
A type-safe enumeration of possible origins.
PageAttributes.PrintQualityType - class java.awt.PageAttributes.PrintQualityType.
A type-safe enumeration of possible print qualities.
PageAttributes() - Constructor for class java.awt.PageAttributes
Constructs a PageAttributes instance with default values for every attribute.
PageAttributes(PageAttributes.ColorType, PageAttributes.MediaType, PageAttributes.OrientationRequestedType, PageAttributes.OriginType, PageAttributes.PrintQualityType, int[]) - Constructor for class java.awt.PageAttributes
Constructs a PageAttributes instance with the specified values for every attribute.
PageAttributes(PageAttributes) - Constructor for class java.awt.PageAttributes
Constructs a PageAttributes instance which is a copy of the supplied PageAttributes.
pageDialog(PageFormat) - Method in class java.awt.print.PrinterJob
Displays a dialog that allows modification of a PageFormat instance.
pageDownAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to page down vertically.
PageFormat - class java.awt.print.PageFormat.
The PageFormat class describes the size and orientation of a page to be printed.
PageFormat() - Constructor for class java.awt.print.PageFormat
Creates a default, portrait-oriented PageFormat.
pageUpAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to page up vertically.
Paint - interface java.awt.Paint.
This Paint interface defines how color patterns can be generated for Graphics2D operations.
PAINT - Static variable in class java.awt.event.PaintEvent
The paint event type.
PAINT_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting paint events.
PAINT_FIRST - Static variable in class java.awt.event.PaintEvent
Marks the first integer id for the range of paint event ids.
PAINT_LAST - Static variable in class java.awt.event.PaintEvent
Marks the last integer id for the range of paint event ids.
paint(GlyphView, Graphics, Shape, int, int) - Method in class javax.swing.text.GlyphView.GlyphPainter
Paint the glyphs representing the given range.
paint(Graphics) - Method in class java.awt.Component
Paints this component.
paint(Graphics) - Method in class java.awt.Container
Paints the container.
paint(Graphics) - Method in class java.awt.Canvas
This method is called to repaint this canvas.
paint(Graphics) - Method in class javax.swing.JComponent
This method is invoked by Swing to draw components.
paint(Graphics) - Method in class javax.swing.JViewport
Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
paint(Graphics) - Method in class javax.swing.JLayeredPane
Paints this JLayeredPane within the specified graphics context.
paint(Graphics) - Method in class javax.swing.CellRendererPane
Shouldn't be called.
paint(Graphics) - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Draws the panel.
paint(Graphics) - Method in interface javax.swing.text.Highlighter
Renders the highlights.
paint(Graphics) - Method in class javax.swing.text.DefaultHighlighter
Renders the highlights.
paint(Graphics) - Method in class javax.swing.text.DefaultCaret
Renders the caret as a vertical line.
paint(Graphics) - Method in interface javax.swing.text.Caret
Renders the caret.
paint(Graphics) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Paints the value.
paint(Graphics) - Method in class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
Overrides Container.paint to paint the node's icon and use the selection color for the background.
paint(Graphics) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
paint(Graphics) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
paint(Graphics) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Paints the divider.
paint(Graphics) - Method in class javax.swing.plaf.basic.BasicArrowButton
paint(Graphics) - Method in class javax.swing.plaf.metal.MetalScrollButton
paint(Graphics, float, float, float, float, View) - Method in class javax.swing.text.html.StyleSheet.BoxPainter
Paints the CSS box according to the attributes given.
paint(Graphics, float, float, float, float, View, int) - Method in class javax.swing.text.html.StyleSheet.ListPainter
Paints the CSS list decoration according to the attributes given.
paint(Graphics, int, int, Shape, JTextComponent) - Method in interface javax.swing.text.Highlighter.HighlightPainter
Renders the highlight.
paint(Graphics, int, int, Shape, JTextComponent) - Method in class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
Paints a highlight.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.ComponentUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Paints the interface.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicToggleButtonUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
paint the radio button
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarSeparatorUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
All purpose paint method that should do the right thing for almost all linear progress bars.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
Paint a representation of the table instance that was set in installUI().
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicListUI
Paint the rows that intersect the Graphics objects clipRect.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Messaged to paint the look and feel.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalTreeUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalSeparatorUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalRadioButtonUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalProgressBarUI
The sole reason for this paint method to even be here is that the JLF/Metal ProgressBar has a bit of special highlighting that needs to get drawn.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalToolTipUI
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call paint on each UI handled by this MultiUI.
paint(Graphics, Shape) - Method in class javax.swing.text.View
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.GlyphView
Renders a portion of a text style run.
paint(Graphics, Shape) - Method in class javax.swing.text.BoxView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.ParagraphView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.PlainView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.FieldView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.AsyncBoxView
Render the view using the given allocation and rendering surface.
paint(Graphics, Shape) - Method in class javax.swing.text.ComponentView
The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).
paint(Graphics, Shape) - Method in class javax.swing.text.IconView
Paints the icon.
paint(Graphics, Shape) - Method in class javax.swing.text.WrappedPlainView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.html.ParagraphView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.html.BlockView
Renders using the given rendering surface and area on that surface.
paint(Graphics, Shape) - Method in class javax.swing.text.html.ListView
Renders using the given rendering surface and area on that surface.
paintAll(Graphics) - Method in class java.awt.Component
Paints this component and all of its subcomponents.
paintBackground(Graphics) - Method in class javax.swing.plaf.basic.BasicTextUI
Paints a background for the view.
paintBorder - Variable in class javax.swing.JProgressBar
Whether to display the border around the progress bar.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.AbstractBorder
This default implementation does no painting.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.BevelBorder
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.SoftBevelBorder
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.EmptyBorder
Does no drawing by default.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.MatteBorder
Paints the matte border.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.CompoundBorder
Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.LineBorder
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.TitledBorder
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.EtchedBorder
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in interface javax.swing.border.Border
Paints the border for the specified component with the specified position and size.
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.BorderUIResource
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.MenuBarBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.FieldBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.Flush3DBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.ButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.PaletteBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.MenuBarBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.MenuItemBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.ToolBarBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.TextFieldBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder
paintBorder(Component, Graphics, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
paintBorder(Graphics) - Method in class javax.swing.JComponent
Paints the component's border.
paintBorder(Graphics) - Method in class javax.swing.AbstractButton
Paint the button's border if BorderPainted property is true.
paintBorder(Graphics) - Method in class javax.swing.JPopupMenu
Paints the popup menu's border if BorderPainted property is true.
paintBorder(Graphics) - Method in class javax.swing.JToolBar
Paint the toolbar's border if BorderPainted property is true.
paintBorder(Graphics) - Method in class javax.swing.JMenuBar
Paints the menubar's border if BorderPainted property is true.
paintBorder(Graphics) - Method in class javax.swing.JProgressBar
Paint the progress bar's border if BorderPainted property is true.
paintBottomTabBorder(int, Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintButtonPressed(Graphics, AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
paintButtonPressed(Graphics, AbstractButton) - Method in class javax.swing.plaf.basic.BasicToggleButtonUI
paintButtonPressed(Graphics, AbstractButton) - Method in class javax.swing.plaf.metal.MetalToggleButtonUI
paintButtonPressed(Graphics, AbstractButton) - Method in class javax.swing.plaf.metal.MetalButtonUI
paintCell(Graphics, int, Rectangle, ListCellRenderer, ListModel, ListSelectionModel, int) - Method in class javax.swing.plaf.basic.BasicListUI
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
paintChild(Graphics, Rectangle, int) - Method in class javax.swing.text.BoxView
Paints a child.
paintChild(Graphics, Rectangle, int) - Method in class javax.swing.text.html.ListView
Paints one of the children; called by paint().
paintChildren(Graphics) - Method in class javax.swing.JComponent
Paints this component's children.
paintChildren(Graphics) - Method in class javax.swing.JSplitPane
Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
paintChildren(Graphics) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Paint the children that intersect the clip area.
paintComponent(Graphics) - Method in class javax.swing.JComponent
If the UI delegate is non-null, calls its paint method.
paintComponent(Graphics) - Method in class javax.swing.JInternalFrame
paintComponent(Graphics) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
paintComponent(Graphics) - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
paintComponent(Graphics) - Method in class javax.swing.plaf.metal.MetalComboBoxButton
paintComponent(Graphics, Component, Container, int, int, int, int) - Static method in class javax.swing.SwingUtilities
Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
paintComponent(Graphics, Component, Container, int, int, int, int) - Method in class javax.swing.CellRendererPane
Calls this.paintComponent(g, c, p, x, y, w, h, false).
paintComponent(Graphics, Component, Container, int, int, int, int, boolean) - Method in class javax.swing.CellRendererPane
Paint a cell renderer component c on graphics object g.
paintComponent(Graphics, Component, Container, Rectangle) - Static method in class javax.swing.SwingUtilities
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
paintComponent(Graphics, Component, Container, Rectangle) - Method in class javax.swing.CellRendererPane
Calls this.paintComponent() with the rectangles x,y,width,height fields.
paintComponents(Graphics) - Method in class java.awt.Container
Paints each of the components in this container.
paintContentBorder(Graphics, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintContentBorderBottomEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintContentBorderBottomEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintContentBorderLeftEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintContentBorderLeftEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintContentBorderRightEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintContentBorderRightEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintContentBorderTopEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintContentBorderTopEdge(Graphics, int, int, int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
PaintContext - interface java.awt.PaintContext.
The PaintContext interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on a Graphics2D.
paintCurrentValue(Graphics, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Paints the currently selected item.
paintCurrentValueBackground(Graphics, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Paints the background of the currently selected item.
paintDecreaseHighlight(Graphics) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
paintDirtyRegions() - Method in class javax.swing.RepaintManager
Paint all of the components that have been marked dirty.
paintDisabledText(JLabel, Graphics, String, int, int) - Method in class javax.swing.plaf.basic.BasicLabelUI
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
paintDisabledText(JLabel, Graphics, String, int, int) - Method in class javax.swing.plaf.metal.MetalLabelUI
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
paintEnabledText(JLabel, Graphics, String, int, int) - Method in class javax.swing.plaf.basic.BasicLabelUI
Paint clippedText at textX, textY with the labels foreground color.
PaintEvent - class java.awt.event.PaintEvent.
The component-level paint event.
PaintEvent(Component, int, Rectangle) - Constructor for class java.awt.event.PaintEvent
Constructs a PaintEvent object with the specified source component and type.
paintExpandControl(Graphics, Rectangle, Insets, Rectangle, TreePath, int, boolean, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints the expand (toggle) part of a row.
paintFocus(Graphics) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintFocus(Graphics) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintFocus(Graphics, AbstractButton, Rectangle, Rectangle, Rectangle) - Method in class javax.swing.plaf.basic.BasicButtonUI
paintFocus(Graphics, AbstractButton, Rectangle, Rectangle, Rectangle) - Method in class javax.swing.plaf.basic.BasicToggleButtonUI
paintFocus(Graphics, AbstractButton, Rectangle, Rectangle, Rectangle) - Method in class javax.swing.plaf.metal.MetalToggleButtonUI
paintFocus(Graphics, AbstractButton, Rectangle, Rectangle, Rectangle) - Method in class javax.swing.plaf.metal.MetalButtonUI
paintFocus(Graphics, Rectangle, Dimension) - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
paintFocus(Graphics, Rectangle, Dimension) - Method in class javax.swing.plaf.metal.MetalRadioButtonUI
paintFocusIndicator(Graphics, int, Rectangle[], int, Rectangle, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintFocusIndicator(Graphics, int, Rectangle[], int, Rectangle, Rectangle, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintHighlightBelowTab() - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintHorizontalLabel(Graphics, int, Component) - Method in class javax.swing.plaf.basic.BasicSliderUI
Called for every label in the label table.
paintHorizontalLine(Graphics, JComponent, int, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints a horizontal line.
paintHorizontalPartOfLeg(Graphics, Rectangle, Insets, Rectangle, TreePath, int, boolean, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints the horizontal part of the leg.
paintHorizontalPartOfLeg(Graphics, Rectangle, Insets, Rectangle, TreePath, int, boolean, boolean, boolean) - Method in class javax.swing.plaf.metal.MetalTreeUI
paintHorizontalSeparators(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalTreeUI
paintIcon(Component, Graphics, int, int) - Method in interface javax.swing.Icon
Draw the icon at the specified location.
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.ImageIcon
Paints the icon.
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.IconUIResource
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalCheckBoxIcon
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalIconFactory.FileIcon16
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon
paintIcon(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalComboBoxIcon
Paints the horizontal bars for the
paintIcon(Graphics, AbstractButton, Rectangle) - Method in class javax.swing.plaf.basic.BasicToggleButtonUI
paintIcon(Graphics, int, int, Icon, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintIcon(Graphics, JComponent, Rectangle) - Method in class javax.swing.plaf.basic.BasicButtonUI
paintImmediately(int, int, int, int) - Method in class javax.swing.JComponent
Paints the specified region in this component and all of its descendants that overlap the region, immediately.
paintImmediately(Rectangle) - Method in class javax.swing.JComponent
Paints the specified region now.
paintIncreaseHighlight(Graphics) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
paintLabels(Graphics) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintLayer(Graphics, int, int, Shape, JTextComponent, View) - Method in class javax.swing.text.LayeredHighlighter.LayerPainter
paintLayer(Graphics, int, int, Shape, JTextComponent, View) - Method in class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
Paints a portion of a highlight.
paintLayeredHighlights(Graphics, int, int, Shape, JTextComponent, View) - Method in class javax.swing.text.LayeredHighlighter
When leaf Views (such as LabelView) are rendering they should call into this method.
paintLayeredHighlights(Graphics, int, int, Shape, JTextComponent, View) - Method in class javax.swing.text.DefaultHighlighter
When leaf Views (such as LabelView) are rendering they should call into this method.
paintLeftTabBorder(int, Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintLoweredBevel(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.BevelBorder
paintMajorTickForHorizSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintMajorTickForHorizSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintMajorTickForVertSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintMajorTickForVertSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintMe(Component, Graphics, int, int) - Method in class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon
paintMenuItem(Graphics, JComponent, Icon, Icon, Color, Color, int) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
paintMinorTickForHorizSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintMinorTickForHorizSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintMinorTickForVertSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintMinorTickForVertSlider(Graphics, Rectangle, int) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintPalette(Graphics) - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
paintRaisedBevel(Component, Graphics, int, int, int, int) - Method in class javax.swing.border.BevelBorder
paintRightTabBorder(int, Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintRow(Graphics, Rectangle, Insets, Rectangle, TreePath, int, boolean, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints the renderer part of a row.
paintSafely(Graphics) - Method in class javax.swing.plaf.basic.BasicTextUI
Paints the interface safely with a guarantee that the model won't change from the view of this thread.
paintString - Variable in class javax.swing.JProgressBar
Whether to textually display a String on the progress bar.
paintString(Graphics, int, int, int, int, int, Insets) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
paintTab(Graphics, int, Rectangle[], int, Rectangle, Rectangle) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintTabBackground(Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintTabBackground(Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintTabBorder(Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
this function draws the border around each tab note that this function does now draw the background of the tab.
paintTabBorder(Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintText(Graphics, AbstractButton, Rectangle, String) - Method in class javax.swing.plaf.basic.BasicToggleButtonUI
paintText(Graphics, int, Font, FontMetrics, int, String, Rectangle, boolean) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
paintText(Graphics, JComponent, Rectangle, String) - Method in class javax.swing.plaf.basic.BasicButtonUI
paintText(Graphics, JComponent, Rectangle, String) - Method in class javax.swing.plaf.metal.MetalToggleButtonUI
paintText(Graphics, JComponent, Rectangle, String) - Method in class javax.swing.plaf.metal.MetalButtonUI
paintThumb(Graphics) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintThumb(Graphics) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintThumb(Graphics, JComponent, Rectangle) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
paintThumb(Graphics, JComponent, Rectangle) - Method in class javax.swing.plaf.metal.MetalScrollBarUI
paintTicks(Graphics) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintTopTabBorder(int, Graphics, int, int, int, int, int, int, boolean) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
paintTrack(Graphics) - Method in class javax.swing.plaf.basic.BasicSliderUI
paintTrack(Graphics) - Method in class javax.swing.plaf.metal.MetalSliderUI
paintTrack(Graphics, JComponent, Rectangle) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
paintTrack(Graphics, JComponent, Rectangle) - Method in class javax.swing.plaf.metal.MetalScrollBarUI
paintTriangle(Graphics, int, int, int, int, boolean) - Method in class javax.swing.plaf.basic.BasicArrowButton
paintValue(Graphics, Rectangle) - Method in interface java.beans.PropertyEditor
Paint a representation of the value into a given area of screen real estate.
paintValue(Graphics, Rectangle) - Method in class java.beans.PropertyEditorSupport
Paint a representation of the value into a given area of screen real estate.
paintVerticalLabel(Graphics, int, Component) - Method in class javax.swing.plaf.basic.BasicSliderUI
Called for every label in the label table.
paintVerticalLine(Graphics, JComponent, int, int, int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints a vertical line.
paintVerticalPartOfLeg(Graphics, Rectangle, Insets, TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Paints the vertical part of the leg.
paintVerticalPartOfLeg(Graphics, Rectangle, Insets, TreePath) - Method in class javax.swing.plaf.metal.MetalTreeUI
PALETTE_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Palette layer.
paletteCloseIcon - Variable in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
paletteTitleHeight - Variable in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
PAN - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the relative pan (left-right positioning) of the signal.
Panel - class java.awt.Panel.
Panel is the simplest container class.
PANEL - Static variable in class javax.accessibility.AccessibleRole
A generic container that is often used to group objects.
Panel.AccessibleAWTPanel - class java.awt.Panel.AccessibleAWTPanel.
This class implements accessibility support for the Panel class.
Panel.AccessibleAWTPanel(Panel) - Constructor for class java.awt.Panel.AccessibleAWTPanel
Panel() - Constructor for class java.awt.Panel
Creates a new panel using the default layout manager.
Panel(LayoutManager) - Constructor for class java.awt.Panel
Creates a new panel with the specified layout manager.
PanelUI - class javax.swing.plaf.PanelUI.
Pluggable look and feel interface for Panel.
PanelUI() - Constructor for class javax.swing.plaf.PanelUI
Paper - class java.awt.print.Paper.
The Paper class describes the physical characteristics of a piece of paper.
Paper() - Constructor for class java.awt.print.Paper
Creates a letter sized piece of paper with one inch margins.
PARA_INDENT_LEFT - Static variable in class javax.swing.text.html.HTMLEditorKit
The paragraph left indent action identifier
PARA_INDENT_RIGHT - Static variable in class javax.swing.text.html.HTMLEditorKit
The paragraph right indent action identifier
PARAGRAPH_SEPARATOR - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
ParagraphElementName - Static variable in class javax.swing.text.AbstractDocument
Name of elements used to represent paragraphs
ParagraphView - class javax.swing.text.ParagraphView.
View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
ParagraphView - class javax.swing.text.html.ParagraphView.
Displays the a paragraph, and uses css attributes for its configuration.
ParagraphView(Element) - Constructor for class javax.swing.text.ParagraphView
Constructs a ParagraphView for the given element.
ParagraphView(Element) - Constructor for class javax.swing.text.html.ParagraphView
Constructs a ParagraphView for the given element.
param - Variable in class javax.swing.text.html.parser.DTD
PARAM - Static variable in class javax.swing.text.html.HTML.Tag
PARAMETER - Static variable in interface javax.swing.text.html.parser.DTDConstants
ParameterBlock - class java.awt.image.renderable.ParameterBlock.
A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.
ParameterBlock() - Constructor for class java.awt.image.renderable.ParameterBlock
A dummy constructor.
ParameterBlock(Vector) - Constructor for class java.awt.image.renderable.ParameterBlock
Constructs a ParameterBlock with a given Vector of sources.
ParameterBlock(Vector, Vector) - Constructor for class java.awt.image.renderable.ParameterBlock
Constructs a ParameterBlock with a given Vector of sources and Vector of parameters.
ParameterDescriptor - class java.beans.ParameterDescriptor.
The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.
ParameterDescriptor() - Constructor for class java.beans.ParameterDescriptor
Public default constructor.
parameters - Variable in class java.awt.image.renderable.ParameterBlock
A Vector of non-source parameters, stored as arbitrary Objects.
params(NVList) - Method in class org.omg.CORBA.ServerRequest
Deprecated. use the method arguments
paramString() - Method in class java.awt.Component
Returns a string representing the state of this component.
paramString() - Method in class java.awt.Container
Returns the parameter string representing the state of this container.
paramString() - Method in class java.awt.Event
Returns the parameter string representing this event.
paramString() - Method in class java.awt.ScrollPane
paramString() - Method in class java.awt.Scrollbar
Returns the parameter string representing the state of this scroll bar.
paramString() - Method in class java.awt.MenuComponent
Returns the parameter string representing the state of this menu component.
paramString() - Method in class java.awt.MenuItem
Returns the parameter string representing the state of this menu item.
paramString() - Method in class java.awt.Menu
Gets the parameter string representing the state of this menu.
paramString() - Method in class java.awt.Checkbox
Returns the parameter string representing the state of this check box.
paramString() - Method in class java.awt.MenuShortcut
paramString() - Method in class java.awt.Dialog
Returns the parameter string representing the state of this dialog window.
paramString() - Method in class java.awt.FileDialog
Returns the parameter string representing the state of this file dialog window.
paramString() - Method in class java.awt.List
Returns the parameter string representing the state of this scrolling list.
paramString() - Method in class java.awt.TextComponent
Returns the parameter string representing the state of this text component.
paramString() - Method in class java.awt.Choice
Returns the parameter string representing the state of this choice menu.
paramString() - Method in class java.awt.Frame
Returns the parameter String of this Frame.
paramString() - Method in class java.awt.AWTEvent
Returns a string representing the state of this event.
paramString() - Method in class java.awt.Label
Returns the parameter string representing the state of this label.
paramString() - Method in class java.awt.TextField
Returns the parameter string representing the state of this text field.
paramString() - Method in class java.awt.Button
Returns the parameter string representing the state of this button.
paramString() - Method in class java.awt.CheckboxMenuItem
Returns the parameter string representing the state of this check box menu item.
paramString() - Method in class java.awt.TextArea
Returns the parameter string representing the state of this text area.
paramString() - Method in class java.awt.event.InputMethodEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.HierarchyEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.ComponentEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.WindowEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.ContainerEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.ActionEvent
Returns a parameter string identifying this action event.
paramString() - Method in class java.awt.event.MouseEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.TextEvent
Returns a parameter string identifying this text event.
paramString() - Method in class java.awt.event.PaintEvent
paramString() - Method in class java.awt.event.AdjustmentEvent
paramString() - Method in class java.awt.event.ItemEvent
Returns a parameter string identifying this item event.
paramString() - Method in class java.awt.event.FocusEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.InvocationEvent
Returns a parameter string identifying this event.
paramString() - Method in class java.awt.event.KeyEvent
Returns a parameter string identifying this event.
paramString() - Method in class javax.swing.JComponent
Returns a string representation of this JComponent.
paramString() - Method in class javax.swing.JEditorPane
Returns a string representation of this JEditorPane.
paramString() - Method in class javax.swing.JTextPane
Returns a string representation of this JTextPane.
paramString() - Method in class javax.swing.JViewport
Returns a string representation of this JViewport.
paramString() - Method in class javax.swing.JTabbedPane
Returns a string representation of this JTabbedPane.
paramString() - Method in class javax.swing.AbstractButton
Returns a string representation of this AbstractButton.
paramString() - Method in class javax.swing.JMenuItem
Returns a string representation of this JMenuItem.
paramString() - Method in class javax.swing.JCheckBoxMenuItem
Returns a string representation of this JCheckBoxMenuItem.
paramString() - Method in class javax.swing.JLayeredPane
Returns a string representation of this JLayeredPane.
paramString() - Method in class javax.swing.JToggleButton
Returns a string representation of this JToggleButton.
paramString() - Method in class javax.swing.JCheckBox
Returns a string representation of this JCheckBox.
paramString() - Method in class javax.swing.JTextField
Returns a string representation of this JTextField.
paramString() - Method in class javax.swing.JPasswordField
Returns a string representation of this JPasswordField.
paramString() - Method in class javax.swing.JOptionPane
Returns a string representation of this JOptionPane.
paramString() - Method in class javax.swing.JMenu
Returns a string representation of this JMenu.
paramString() - Method in class javax.swing.JColorChooser
Returns a string representation of this JColorChooser.
paramString() - Method in class javax.swing.JButton
Returns a string representation of this JButton.
paramString() - Method in class javax.swing.JPopupMenu
Returns a string representation of this JPopupMenu.
paramString() - Method in class javax.swing.JSeparator
Returns a string representation of this JSeparator.
paramString() - Method in class javax.swing.JWindow
Returns a string representation of this JWindow.
paramString() - Method in class javax.swing.JApplet
Returns a string representation of this JApplet.
paramString() - Method in class javax.swing.JComboBox
Returns a string representation of this JComboBox.
paramString() - Method in class javax.swing.JList
Returns a string representation of this JList.
paramString() - Method in class javax.swing.JToolTip
Returns a string representation of this JToolTip.
paramString() - Method in class javax.swing.JInternalFrame
Returns a string representation of this JInternalFrame.
paramString() - Method in class javax.swing.JPanel
Returns a string representation of this JPanel.
paramString() - Method in class javax.swing.JFrame
Returns a string representation of this JFrame.
paramString() - Method in class javax.swing.JSplitPane
Returns a string representation of this JSplitPane.
paramString() - Method in class javax.swing.JTree
Returns a string representation of this JTree.
paramString() - Method in class javax.swing.JTable
Returns a string representation of this table.
paramString() - Method in class javax.swing.JLabel
Returns a string representation of this JLabel.
paramString() - Method in class javax.swing.JFileChooser
Returns a string representation of this JFileChooser.
paramString() - Method in class javax.swing.JDesktopPane
Returns a string representation of this JDesktopPane.
paramString() - Method in class javax.swing.JRadioButton
Returns a string representation of this JRadioButton.
paramString() - Method in class javax.swing.JToolBar
Returns a string representation of this JToolBar.
paramString() - Method in class javax.swing.JMenuBar
Returns a string representation of this JMenuBar.
paramString() - Method in class javax.swing.JRadioButtonMenuItem
Returns a string representation of this JRadioButtonMenuItem.
paramString() - Method in class javax.swing.JTextArea
Returns a string representation of this JTextArea.
paramString() - Method in class javax.swing.JScrollPane
Returns a string representation of this JScrollPane.
paramString() - Method in class javax.swing.JScrollBar
Returns a string representation of this JScrollBar.
paramString() - Method in class javax.swing.JProgressBar
Returns a string representation of this JProgressBar.
paramString() - Method in class javax.swing.JRootPane
Returns a string representation of this JRootPane.
paramString() - Method in class javax.swing.JDialog
Returns a string representation of this JDialog.
paramString() - Method in class javax.swing.JSlider
Returns a string representation of this JSlider.
paramString() - Method in class javax.swing.event.InternalFrameEvent
Returns a parameter string identifying this event.
paramString() - Method in class javax.swing.table.JTableHeader
Returns a string representation of this JTableHeader.
paramString() - Method in class javax.swing.text.JTextComponent
Returns a string representation of this JTextComponent.
parent - Variable in class java.awt.image.Raster
The parent of this Raster, or null.
parent - Variable in class java.util.ResourceBundle
The parent bundle is consulted by getObject when this bundle does not contain a particular resource.
parent - Variable in class javax.swing.tree.DefaultMutableTreeNode
this node's parent, or null if this node has no parent
PARENT_CHANGED - Static variable in class java.awt.event.HierarchyEvent
The hierarchy changed through a reparent operation.
parent() - Method in class org.omg.CORBA.Context
Retrieves the parent of this Context object.
parentOf(ThreadGroup) - Method in class java.lang.ThreadGroup
Tests if this thread group is either the thread group argument or one of its ancestor thread groups.
parentTag - Variable in class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
Tag to check for in the document.
parse(Reader) - Method in class javax.swing.text.html.parser.Parser
Parse an HTML stream, given a DTD.
parse(Reader, HTMLEditorKit.ParserCallback, boolean) - Method in class javax.swing.text.html.HTMLEditorKit.Parser
Parse the given stream and drive the given callback with the results of the parse.
parse(Reader, HTMLEditorKit.ParserCallback, boolean) - Method in class javax.swing.text.html.parser.ParserDelegator
parse(Reader, HTMLEditorKit.ParserCallback, boolean) - Method in class javax.swing.text.html.parser.DocumentParser
parse(String) - Method in class java.text.NumberFormat
Convenience method.
parse(String) - Method in class java.text.DateFormat
Parse a date/time string.
parse(String) - Method in class java.text.MessageFormat
Parses the string.
parse(String) - Static method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
parse(String) - Method in interface javax.naming.NameParser
Parses a name into its components.
parse(String, ParsePosition) - Method in class java.text.NumberFormat
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
parse(String, ParsePosition) - Method in class java.text.ChoiceFormat
Parses a Number from the input text.
parse(String, ParsePosition) - Method in class java.text.DateFormat
Parse a date/time string according to the given parse position.
parse(String, ParsePosition) - Method in class java.text.SimpleDateFormat
Overrides DateFormat
parse(String, ParsePosition) - Method in class java.text.DecimalFormat
Returns an instance of Number with a value matching the given string.
parse(String, ParsePosition) - Method in class java.text.MessageFormat
Parses the string.
parseBuffer - Variable in class javax.swing.text.html.HTMLDocument.HTMLReader
parseByte(String) - Static method in class java.lang.Byte
Assuming the specified String represents a byte, returns that byte's value.
parseByte(String, int) - Static method in class java.lang.Byte
Assuming the specified String represents a byte, returns that byte's value.
parseDouble(String) - Static method in class java.lang.Double
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
parseDTDMarkup() - Method in class javax.swing.text.html.parser.Parser
Parses th Document Declaration Type markup declaration.
ParseException - exception java.text.ParseException.
Signals that an error has been reached unexpectedly while parsing.
ParseException(String, int) - Constructor for class java.text.ParseException
Constructs a ParseException with the specified detail message and offset.
parseFloat(String) - Static method in class java.lang.Float
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
parseInt(String) - Static method in class java.lang.Integer
Parses the string argument as a signed decimal integer.
parseInt(String, int) - Static method in class java.lang.Integer
Parses the string argument as a signed integer in the radix specified by the second argument.
parseLevel(String) - Static method in class java.rmi.server.LogStream
Deprecated. no replacement
parseLong(String) - Static method in class java.lang.Long
Parses the string argument as a signed decimal long.
parseLong(String, int) - Static method in class java.lang.Long
Parses the string argument as a signed long in the radix specified by the second argument.
parseMarkupDeclarations(StringBuffer) - Method in class javax.swing.text.html.parser.Parser
Parse markup declarations.
parseNumbers() - Method in class java.io.StreamTokenizer
Specifies that numbers should be parsed by this tokenizer.
parseObject(String) - Method in class java.text.Format
Parses a string to produce an object.
parseObject(String, ParsePosition) - Method in class java.text.Format
Parses a string to produce an object.
parseObject(String, ParsePosition) - Method in class java.text.NumberFormat
Parses a string to produce an object.
parseObject(String, ParsePosition) - Method in class java.text.DateFormat
Parse a date/time string into an Object.
parseObject(String, ParsePosition) - Method in class java.text.MessageFormat
Parses the string.
ParsePosition - class java.text.ParsePosition.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
ParsePosition(int) - Constructor for class java.text.ParsePosition
Create a new ParsePosition with the given initial index.
Parser - class javax.swing.text.html.parser.Parser.
A simple DTD-driven HTML parser.
Parser(DTD) - Constructor for class javax.swing.text.html.parser.Parser
ParserDelegator - class javax.swing.text.html.parser.ParserDelegator.
Responsible for starting up a new DocumentParser each time its parse method is invoked.
ParserDelegator() - Constructor for class javax.swing.text.html.parser.ParserDelegator
parseShort(String) - Static method in class java.lang.Short
Assuming the specified String represents a short, returns that short's value.
parseShort(String, int) - Static method in class java.lang.Short
Assuming the specified String represents a short, returns that short's value.
parseURL(URL, String, int, int) - Method in class java.net.URLStreamHandler
Parses the string representation of a URL into a URL object.
PartialResultException - exception javax.naming.PartialResultException.
This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
PartialResultException() - Constructor for class javax.naming.PartialResultException
Constructs a new instance of PartialResultException.
PartialResultException(String) - Constructor for class javax.naming.PartialResultException
Constructs a new instance of the exception using the explanation message specified.
PASSWORD_TEXT - Static variable in class javax.accessibility.AccessibleRole
A text object used for passwords, or other places where the text contents is not shown visibly to the user
PasswordAuthentication - class java.net.PasswordAuthentication.
The class PasswordAuthentication is a data holder that is used by Authenticator.
PasswordAuthentication(String, char[]) - Constructor for class java.net.PasswordAuthentication
Creates a new PasswordAuthentication object from the given user name and password.
PasswordView - class javax.swing.text.PasswordView.
Implements a View suitable for use in JPasswordField UI implementations.
PasswordView(Element) - Constructor for class javax.swing.text.PasswordView
Constructs a new view wrapped on an element.
paste() - Method in class javax.swing.text.JTextComponent
Transfers the contents of the system clipboard into the associated text model.
pasteAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
Patch - class javax.sound.midi.Patch.
A Patch object represents a location, on a MIDI synthesizer, into which a single instrument is stored (loaded).
Patch(int, int) - Constructor for class javax.sound.midi.Patch
Constructs a new patch object from the specified bank and program numbers (which should be in the range from 0 to 127).
path - Variable in class javax.swing.event.TreeExpansionEvent
Path to the value this event represents.
path - Variable in class javax.swing.event.TreeModelEvent
Path to the parent of the nodes that have changed.
pathByAddingChild(Object) - Method in class javax.swing.tree.TreePath
Returns a new path containing all the elements of this object plus child.
pathFromAncestorEnumeration(TreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns an enumeration that follows the path from ancestor to this node.
PathIterator - interface java.awt.geom.PathIterator.
The PathIterator interface provides the mechanism for objects that implement the Shape interface to return the geometry of their boundary by allowing a caller to retrieve the path of that boundary a segment at a time.
paths - Variable in class javax.swing.event.TreeSelectionEvent
Paths this event represents.
pathSeparator - Static variable in class java.io.File
The system-dependent path-separator character, represented as a string for convenience.
pathSeparatorChar - Static variable in class java.io.File
The system-dependent path-separator character.
pathWasCollapsed(TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Messaged from the VisibleTreeNode after it has collapsed.
pathWasExpanded(TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Messaged from the VisibleTreeNode after it has been expanded.
PAUSE - Static variable in class java.awt.Event
The Pause key, a non-ASCII action key.
pcdata - Variable in class javax.swing.text.html.parser.DTD
PCM_SIGNED - Static variable in class javax.sound.sampled.AudioFormat.Encoding
Specifies signed, linear PCM data.
PCM_UNSIGNED - Static variable in class javax.sound.sampled.AudioFormat.Encoding
Specifies unsigned, linear PCM data.
pcSupport - Variable in class java.beans.beancontext.BeanContextChildSupport
The PropertyChangeSupport associated with this BeanContextChildSupport.
peek() - Method in class java.util.Stack
Looks at the object at the top of this stack without removing it from the stack.
peek(InetAddress) - Method in class java.net.DatagramSocketImpl
Peek at the packet to see who it is from.
peekEvent() - Method in class java.awt.EventQueue
Return the first event on the EventQueue without removing it.
peekEvent(int) - Method in class java.awt.EventQueue
Return the first event with the specified id, if any.
perform_work() - Method in class org.omg.CORBA.ORB
Performs an implementation-dependent unit of work if called by the main thread.
performDefaultLayout() - Method in class java.awt.font.GlyphVector
Assigns default positions to each glyph in this GlyphVector.
Permission - class java.security.Permission.
Abstract class for representing access to a system resource.
Permission - interface java.security.acl.Permission.
This interface represents a permission, such as that used to grant a particular type of access to a resource.
Permission(String) - Constructor for class java.security.Permission
Constructs a permission with the specified name.
PermissionCollection - class java.security.PermissionCollection.
Abstract class representing a collection of Permission objects.
PermissionCollection() - Constructor for class java.security.PermissionCollection
Permissions - class java.security.Permissions.
This class represents a heterogeneous collection of Permissions.
permissions() - Method in interface java.security.acl.AclEntry
Returns an enumeration of the permissions in this ACL entry.
Permissions() - Constructor for class java.security.Permissions
Creates a new Permissions object containing no PermissionCollections.
PERSIST_STORE - exception org.omg.CORBA.PERSIST_STORE.
The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
PERSIST_STORE() - Constructor for class org.omg.CORBA.PERSIST_STORE
Constructs a PERSIST_STORE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
PERSIST_STORE(int, CompletionStatus) - Constructor for class org.omg.CORBA.PERSIST_STORE
Constructs a PERSIST_STORE exception with the specified minor code and completion status.
PERSIST_STORE(String) - Constructor for class org.omg.CORBA.PERSIST_STORE
Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
PERSIST_STORE(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.PERSIST_STORE
Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
PERSONAL - Static variable in class java.awt.PageAttributes.MediaType
An alias for PERSONAL_ENVELOPE.
PERSONAL_ENVELOPE - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for 6 3/4 envelope, 3 5/8 x 6 1/2 in.
PGDN - Static variable in class java.awt.Event
The Page Down key, a non-ASCII action key.
PGUP - Static variable in class java.awt.Event
The Page Up key, a non-ASCII action key.
PhantomReference - class java.lang.ref.PhantomReference.
Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
PhantomReference(Object, ReferenceQueue) - Constructor for class java.lang.ref.PhantomReference
Creates a new phantom reference that refers to the given object and is registered with the given queue.
PHYSICAL - Static variable in class java.awt.PageAttributes.OriginType
The OriginType instance to use for specifying a physical origin.
PI - Static variable in class java.lang.StrictMath
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
PI - Static variable in class java.lang.Math
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
PI - Static variable in interface javax.swing.text.html.parser.DTDConstants
PIE - Static variable in class java.awt.geom.Arc2D
The closure type for an arc closed by drawing straight line segments from the start of the arc segment to the center of the full ellipse and from that point to the end of the arc segment.
pink - Static variable in class java.awt.Color
The color pink.
PIPE_SIZE - Static variable in class java.io.PipedInputStream
The size of the pipe's circular input buffer.
PipedInputStream - class java.io.PipedInputStream.
A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
PipedInputStream() - Constructor for class java.io.PipedInputStream
Creates a PipedInputStream so that it is not yet connected.
PipedInputStream(PipedOutputStream) - Constructor for class java.io.PipedInputStream
Creates a PipedInputStream so that it is connected to the piped output stream src.
PipedOutputStream - class java.io.PipedOutputStream.
A piped output stream can be connected to a piped input stream to create a communications pipe.
PipedOutputStream() - Constructor for class java.io.PipedOutputStream
Creates a piped output stream that is not yet connected to a piped input stream.
PipedOutputStream(PipedInputStream) - Constructor for class java.io.PipedOutputStream
Creates a piped output stream connected to the specified piped input stream.
PipedReader - class java.io.PipedReader.
Piped character-input streams.
PipedReader() - Constructor for class java.io.PipedReader
Creates a PipedReader so that it is not yet connected.
PipedReader(PipedWriter) - Constructor for class java.io.PipedReader
Creates a PipedReader so that it is connected to the piped writer src.
PipedWriter - class java.io.PipedWriter.
Piped character-output streams.
PipedWriter() - Constructor for class java.io.PipedWriter
Creates a piped writer that is not yet connected to a piped reader.
PipedWriter(PipedReader) - Constructor for class java.io.PipedWriter
Creates a piped writer connected to the specified piped reader.
PITCH_BEND - Static variable in class javax.sound.midi.ShortMessage
Command value for Pitch Bend message (0xE0, or 224)
pixel_bits - Variable in class java.awt.image.ColorModel
The total number of bits in the pixel.
PixelGrabber - class java.awt.image.PixelGrabber.
The PixelGrabber class implements an ImageConsumer which can be attached to an Image or ImageProducer object to retrieve a subset of the pixels in that image.
PixelGrabber(Image, int, int, int, int, boolean) - Constructor for class java.awt.image.PixelGrabber
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image.
PixelGrabber(Image, int, int, int, int, int[], int, int) - Constructor for class java.awt.image.PixelGrabber
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image into the given array.
PixelGrabber(ImageProducer, int, int, int, int, int[], int, int) - Constructor for class java.awt.image.PixelGrabber
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the image produced by the specified ImageProducer into the given array.
PixelInterleavedSampleModel - class java.awt.image.PixelInterleavedSampleModel.
This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
PixelInterleavedSampleModel(int, int, int, int, int, int[]) - Constructor for class java.awt.image.PixelInterleavedSampleModel
Constructs a PixelInterleavedSampleModel with the specified parameters.
pixelStride - Variable in class java.awt.image.ComponentSampleModel
Pixel stride (in data array elements) of the region of image data described by this ComponentSampleModel.
PKCS8EncodedKeySpec - class java.security.spec.PKCS8EncodedKeySpec.
This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:
PKCS8EncodedKeySpec(byte[]) - Constructor for class java.security.spec.PKCS8EncodedKeySpec
Creates a new PKCS8EncodedKeySpec with the given encoded key.
PLAIN - Static variable in class java.awt.Font
The plain style constant.
PLAIN_MESSAGE - Static variable in class javax.swing.JOptionPane
No icon is used.
PlainDocument - class javax.swing.text.PlainDocument.
A plain document that maintains no character attributes.
PlainDocument() - Constructor for class javax.swing.text.PlainDocument
Constructs a plain text document.
PlainDocument(AbstractDocument.Content) - Constructor for class javax.swing.text.PlainDocument
Constructs a plain text document.
plainTextFlavor - Static variable in class java.awt.datatransfer.DataFlavor
Deprecated. as of 1.3. Use DataFlavor.getReaderForText( Transferable) instead of Transferable. getTransferData(DataFlavor.plainTextFlavor).
PlainView - class javax.swing.text.PlainView.
Implements View interface for a simple multi-line text view that has text in one font and color.
PlainView(Element) - Constructor for class javax.swing.text.PlainView
Constructs a new PlainView wrapped on an element.
play() - Method in interface java.applet.AudioClip
Starts playing this audio clip.
play(URL) - Method in class java.applet.Applet
Plays the audio clip at the specified absolute URL.
play(URL, String) - Method in class java.applet.Applet
Plays the audio clip given the URL and a specifier that is relative to it.
PM - Static variable in class java.util.Calendar
Value of the AM_PM field indicating the period of the day from noon to just before midnight.
Point - class java.awt.Point.
A point representing a location in (x, y) coordinate space, specified in integer precision.
Point() - Constructor for class java.awt.Point
Constructs and initializes a point at the origin (0, 0) of the coordinate space.
Point(int, int) - Constructor for class java.awt.Point
Constructs and initializes a point at the specified (x, y) location in the coordinate space.
Point(Point) - Constructor for class java.awt.Point
Constructs and initializes a point with the same location as the specified Point object.
Point2D - class java.awt.geom.Point2D.
The Point2D class defines a point representing a location in (x, y) coordinate space.
Point2D.Double - class java.awt.geom.Point2D.Double.
The Double class defines a point specified in double precision.
Point2D.Double() - Constructor for class java.awt.geom.Point2D.Double
Constructs and initializes a Point2D with coordinates (0, 0).
Point2D.Double(double, double) - Constructor for class java.awt.geom.Point2D.Double
Constructs and initializes a Point2D with the specified coordinates.
Point2D.Float - class java.awt.geom.Point2D.Float.
The Float class defines a point specified in float precision.
Point2D.Float() - Constructor for class java.awt.geom.Point2D.Float
Constructs and initializes a Point2D with coordinates (0, 0).
Point2D.Float(float, float) - Constructor for class java.awt.geom.Point2D.Float
Constructs and initializes a Point2D with the specified coordinates.
Point2D() - Constructor for class java.awt.geom.Point2D
This is an abstract class that cannot be instantiated directly.
pointSize - Variable in class java.awt.Font
The point size of this Font in float.
Policy - class java.security.Policy.
This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).
Policy - interface org.omg.CORBA.Policy.
org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
policy_type() - Method in interface org.omg.CORBA.PolicyOperations
Return the constant value that corresponds to the type of the policy object.
policy_type() - Method in class org.omg.CORBA._PolicyStub
Returns the constant value that corresponds to the type of the policy object.
Policy() - Constructor for class java.security.Policy
PolicyError - exception org.omg.CORBA.PolicyError.
An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
PolicyError() - Constructor for class org.omg.CORBA.PolicyError
Constructs a default PolicyError user exception with no reason code and an empty reason detail message.
PolicyError(short) - Constructor for class org.omg.CORBA.PolicyError
Constructs a PolicyError user exception initialized with the given reason code and an empty reason detail message.
PolicyError(String, short) - Constructor for class org.omg.CORBA.PolicyError
Constructs a PolicyError user exception initialized with the given reason detail message and reason code.
PolicyHelper - class org.omg.CORBA.PolicyHelper.
org/omg/CORBA/PolicyHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyHelper() - Constructor for class org.omg.CORBA.PolicyHelper
PolicyHolder - class org.omg.CORBA.PolicyHolder.
org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyHolder() - Constructor for class org.omg.CORBA.PolicyHolder
PolicyHolder(Policy) - Constructor for class org.omg.CORBA.PolicyHolder
PolicyListHelper - class org.omg.CORBA.PolicyListHelper.
org/omg/CORBA/PolicyListHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
PolicyListHelper() - Constructor for class org.omg.CORBA.PolicyListHelper
PolicyListHolder - class org.omg.CORBA.PolicyListHolder.
org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
PolicyListHolder() - Constructor for class org.omg.CORBA.PolicyListHolder
PolicyListHolder(Policy[]) - Constructor for class org.omg.CORBA.PolicyListHolder
PolicyOperations - interface org.omg.CORBA.PolicyOperations.
org/omg/CORBA/PolicyOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyTypeHelper - class org.omg.CORBA.PolicyTypeHelper.
org/omg/CORBA/PolicyTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyTypeHelper() - Constructor for class org.omg.CORBA.PolicyTypeHelper
poll_next_response() - Method in class org.omg.CORBA.ORB
Finds out if any of the deferred (asynchronous) invocations have a response yet.
poll_response() - Method in class org.omg.CORBA.Request
Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
poll() - Method in class java.lang.ref.ReferenceQueue
Polls this queue to see if a reference object is available, returning one immediately if so.
POLY_PRESSURE - Static variable in class javax.sound.midi.ShortMessage
Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 128)
Polygon - class java.awt.Polygon.
The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
Polygon() - Constructor for class java.awt.Polygon
Creates an empty polygon.
Polygon(int[], int[], int) - Constructor for class java.awt.Polygon
Constructs and initializes a Polygon from the specified parameters.
pop() - Method in class java.awt.EventQueue
Stop dispatching events using this EventQueue instance.
pop() - Method in class java.util.Stack
Removes the object at the top of this stack and returns that object as the value of this function.
popCharacterStyle() - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Pops a previously pushed character style off the stack to return to a previous style.
popup - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
POPUP_LAYER - Static variable in class javax.swing.JLayeredPane
Convenience object defining the Popup layer.
POPUP_MENU - Static variable in class javax.accessibility.AccessibleRole
A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices.
popupKeyListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
popupListener - Variable in class javax.swing.JMenu
The window-closing listener for the popup.
popupMenu - Variable in class javax.swing.plaf.basic.BasicPopupMenuUI
PopupMenu - class java.awt.PopupMenu.
A class that implements a menu which can be dynamically popped up at a specified position within a component.
PopupMenu.AccessibleAWTPopupMenu - class java.awt.PopupMenu.AccessibleAWTPopupMenu.
Inner class of PopupMenu used to provide default support for accessibility.
PopupMenu.AccessibleAWTPopupMenu(PopupMenu) - Constructor for class java.awt.PopupMenu.AccessibleAWTPopupMenu
PopupMenu() - Constructor for class java.awt.PopupMenu
Creates a new popup menu.
PopupMenu(String) - Constructor for class java.awt.PopupMenu
Creates a new popup menu with the specified name.
popupMenuCanceled(PopupMenuEvent) - Method in interface javax.swing.event.PopupMenuListener
This method is called when the popup menu is canceled
PopupMenuEvent - class javax.swing.event.PopupMenuEvent.
PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
PopupMenuEvent(Object) - Constructor for class javax.swing.event.PopupMenuEvent
Constructs a PopupMenuEvent object.
PopupMenuListener - interface javax.swing.event.PopupMenuListener.
A popup menu listener
PopupMenuUI - class javax.swing.plaf.PopupMenuUI.
Pluggable look and feel interface for JPopupMenu.
PopupMenuUI() - Constructor for class javax.swing.plaf.PopupMenuUI
popupMenuWillBecomeInvisible(PopupMenuEvent) - Method in interface javax.swing.event.PopupMenuListener
This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time
popupMenuWillBecomeVisible(PopupMenuEvent) - Method in interface javax.swing.event.PopupMenuListener
This method is called before the popup menu becomes visible
popupMouseListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
popupMouseMotionListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
port - Variable in class java.net.SocketImpl
The port number on the remote host to which this socket is connected.
Port - interface javax.sound.sampled.Port.
Ports are simple lines for input or output of audio to or from audio devices.
Port.Info - class javax.sound.sampled.Port.Info.
The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.
Port.Info(Class, String, boolean) - Constructor for class javax.sound.sampled.Port.Info
Constructs a port's info object from the information given.
PortableRemoteObject - class javax.rmi.PortableRemoteObject.
Server implementation objects may either inherit from javax.rmi.PortableRemoteObject or they may implement a remote interface and then use the exportObject method to register themselves as a server object.
PortableRemoteObject() - Constructor for class javax.rmi.PortableRemoteObject
Initializes the object by calling exportObject(this).
PortableRemoteObjectDelegate - interface javax.rmi.CORBA.PortableRemoteObjectDelegate.
Supports delegation for method implementations in PortableRemoteObject.
PORTRAIT - Static variable in class java.awt.PageAttributes.OrientationRequestedType
The OrientationRequestedType instance to use for specifying a portrait orientation.
PORTRAIT - Static variable in class java.awt.print.PageFormat
The origin is at the top left of the paper with x running to the right and y running down the paper.
pos - Variable in class java.io.PushbackInputStream
The position within the pushback buffer from which the next byte will be read.
pos - Variable in class java.io.StringBufferInputStream
Deprecated. The index of the next character to read from the input stream buffer.
pos - Variable in class java.io.BufferedInputStream
The current position in the buffer.
pos - Variable in class java.io.ByteArrayInputStream
The index of the next character to read from the input stream buffer.
pos - Variable in class java.io.CharArrayReader
The current buffer position.
Position - interface javax.swing.text.Position.
Represents a location within a document.
Position.Bias - class javax.swing.text.Position.Bias.
A typesafe enumeration to indicate bias to a position in the model.
position(Blob, long) - Method in interface java.sql.Blob
Determines the byte position in the BLOB value designated by this Blob object at which pattern begins.
position(byte[], long) - Method in interface java.sql.Blob
Determines the byte position at which the specified byte pattern begins within the BLOB value that this Blob object represents.
position(Clob, long) - Method in interface java.sql.Clob
Determines the character position at which the specified Clob object searchstr appears in this Clob object.
position(String, long) - Method in interface java.sql.Clob
Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.
positionCaret(MouseEvent) - Method in class javax.swing.text.DefaultCaret
Tries to set the position of the caret from the coordinates of a mouse event, using viewToModel().
positionForMouseEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Returns the new position to put the divider at based on the passed in MouseEvent.
positionForMouseEvent(MouseEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
Returns the new position to put the divider at based on the passed in MouseEvent.
positionToElement(int) - Method in class javax.swing.text.AbstractDocument.BranchElement
Gets the child element that contains the given model position.
POSITIVE_INFINITY - Static variable in class java.lang.Float
The positive infinity of type float.
POSITIVE_INFINITY - Static variable in class java.lang.Double
The positive infinity of type double.
POSITIVE_SCROLL - Static variable in class javax.swing.plaf.basic.BasicSliderUI
postActionEvent() - Method in class javax.swing.JTextField
Processes action events occurring on this textfield by dispatching them to any registered ActionListener objects.
postClosingEvent(JInternalFrame) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
Post a WINDOW_CLOSING-like event to the frame, so that it can be treated like a regular Frame.
postEdit(UndoableEdit) - Method in class javax.swing.undo.UndoableEditSupport
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
postEvent(AWTEvent) - Method in class java.awt.EventQueue
Post a 1.1-style event to the EventQueue.
postEvent(Event) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
postEvent(Event) - Method in class java.awt.MenuComponent
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
postEvent(Event) - Method in interface java.awt.MenuContainer
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
postEvent(Event) - Method in class java.awt.Window
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
postorderEnumeration() - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.
postRemoveUpdate(AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.AbstractDocument
Updates any document structure as a result of text removal.
postState - Variable in class javax.swing.undo.StateEdit
The state information after the edit
POSTURE - Static variable in class java.awt.font.TextAttribute
Attribute key for the posture of a font.
POSTURE_OBLIQUE - Static variable in class java.awt.font.TextAttribute
The standard italic posture.
POSTURE_REGULAR - Static variable in class java.awt.font.TextAttribute
The standard posture, upright.
pow(double, double) - Static method in class java.lang.StrictMath
Returns of value of the first argument raised to the power of the second argument.
pow(double, double) - Static method in class java.lang.Math
Returns of value of the first argument raised to the power of the second argument.
pow(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (thisexponent).
PPQ - Static variable in class javax.sound.midi.Sequence
The tempo-based timing type, for which the resolution is expressed in pulses (ticks) per quarter note.
PRC - Static variable in class java.util.Locale
Useful constant for country.
PRE - Static variable in class javax.swing.text.html.HTML.Tag
preceding(int) - Method in class java.text.BreakIterator
Return the last boundary preceding the specfied offset.
preConcatenate(AffineTransform) - Method in class java.awt.geom.AffineTransform
Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space.
preConcatenateTransform(AffineTransform) - Method in class java.awt.image.renderable.RenderContext
Modifies the current user-to-device transform by prepending another transform.
preConcetenateTransform(AffineTransform) - Method in class java.awt.image.renderable.RenderContext
Deprecated. replaced by preConcatenateTransform(AffineTransform).
preContent(char[]) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds the given content that was encountered in a PRE element.
predefined - Static variable in class java.awt.Cursor
preferenceChanged(boolean, boolean) - Method in class javax.swing.text.AsyncBoxView.ChildState
Mark preferences changed for this child.
preferenceChanged(View, boolean, boolean) - Method in class javax.swing.text.View
Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
preferenceChanged(View, boolean, boolean) - Method in class javax.swing.text.BoxView
This is called by a child to indicated its preferred span has changed.
preferenceChanged(View, boolean, boolean) - Method in class javax.swing.text.AsyncBoxView
Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
preferred - Variable in class javax.swing.SizeRequirements
The preferred (natural) size.
PREFERRED - Static variable in class java.awt.GraphicsConfigTemplate
Value used for "Enum" (Integer) type.
preferredLayoutSize(Container) - Method in class java.awt.CardLayout
Determines the preferred size of the container argument using this card layout.
preferredLayoutSize(Container) - Method in class java.awt.GridLayout
Determines the preferred size of the container argument using this grid layout.
preferredLayoutSize(Container) - Method in class java.awt.BorderLayout
Determines the preferred size of the target container using this layout manager, based on the components in the container.
preferredLayoutSize(Container) - Method in interface java.awt.LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
preferredLayoutSize(Container) - Method in class java.awt.GridBagLayout
Determines the preferred size of the target container using this grid bag layout.
preferredLayoutSize(Container) - Method in class java.awt.FlowLayout
Returns the preferred dimensions for this layout given the components in the specified target container.
preferredLayoutSize(Container) - Method in class javax.swing.ViewportLayout
Returns the preferred dimensions for this layout given the components in the specified target container.
preferredLayoutSize(Container) - Method in class javax.swing.ScrollPaneLayout
The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
preferredLayoutSize(Container) - Method in class javax.swing.BoxLayout
Returns the preferred dimensions for this layout, given the components in the specified target container.
preferredLayoutSize(Container) - Method in class javax.swing.OverlayLayout
Returns the preferred dimensions for this layout given the components in the specified target container.
preferredLayoutSize(Container) - Method in class javax.swing.JRootPane.RootLayout
Returns the amount of space the layout would like to have.
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Returns the preferred size needed to contain the children.
preferredLayoutSize(Container) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
preferredMinSize - Variable in class javax.swing.plaf.basic.BasicTreeUI
Minimum preferred size.
preferredSize - Variable in class javax.swing.plaf.basic.BasicTreeUI
Size needed to completely display all the nodes.
PREFERREDSIZE - Static variable in class java.awt.GridBagLayout
preferredSize() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
preferredSize() - Method in class java.awt.Container
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
preferredSize() - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
preferredSize() - Method in class java.awt.TextField
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
preferredSize() - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
preferredSize(int) - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
preferredSize(int) - Method in class java.awt.TextField
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
preferredSize(int, int) - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).
preferredTabAreaHeight(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
preferredTabAreaWidth(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
preferredViewportSize - Variable in class javax.swing.JTable
Used by the Scrollable interface to determine the initial visible area.
preorderEnumeration() - Method in class javax.swing.tree.DefaultMutableTreeNode
Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.
prepareCall(String) - Method in interface java.sql.Connection
Creates a CallableStatement object for calling database stored procedures.
prepareCall(String, int, int) - Method in interface java.sql.Connection
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatement - interface java.sql.PreparedStatement.
An object that represents a precompiled SQL statement.
prepareEditor(TableCellEditor, int, int) - Method in class javax.swing.JTable
Prepares the editor by querying the data model for the value and selection state of the cell at row, column.
prepareForDragging() - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Message to prepare for dragging.
prepareForEditing() - Method in class javax.swing.tree.DefaultTreeCellEditor
Invoked just before editing is to start.
prepareForUIInstall() - Method in class javax.swing.plaf.basic.BasicTreeUI
Invoked after the tree instance variable has been set, but before any defaults/listeners have been installed.
prepareForUIUninstall() - Method in class javax.swing.plaf.basic.BasicTreeUI
prepareImage(Image, ImageObserver) - Method in class java.awt.Component
Prepares an image for rendering on this component.
prepareImage(Image, int, int, ImageObserver) - Method in class java.awt.Component
Prepares an image for rendering on this component at the specified width and height.
prepareImage(Image, int, int, ImageObserver) - Method in class java.awt.Toolkit
Prepares an image for rendering.
prepareRenderer(TableCellRenderer, int, int) - Method in class javax.swing.JTable
Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
prepareStatement(String) - Method in interface java.sql.Connection
Creates a PreparedStatement object for sending parameterized SQL statements to the database.
prepareStatement(String, int, int) - Method in interface java.sql.Connection
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
PRESSED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is currently pressed.
PRESSED - Static variable in class javax.swing.DefaultButtonModel
Indicates that the button has been "pressed" (typically, when the mouse is released).
PRESSED_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the button has been pressed.
preState - Variable in class javax.swing.undo.StateEdit
The state information prior to the edit
PREVIEW_PANEL_PROPERTY - Static variable in class javax.swing.JColorChooser
The preview panel property name.
previewListener - Variable in class javax.swing.plaf.basic.BasicColorChooserUI
previous() - Method in interface java.sql.ResultSet
Moves the cursor to the previous row in this ResultSet object.
previous() - Method in class java.text.CollationElementIterator
Get the previous collation element in the string.
previous() - Method in interface java.text.CharacterIterator
Decrements the iterator's index by one and returns the character at the new index.
previous() - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.previous() for String.
previous() - Method in class java.text.BreakIterator
Return the boundary preceding the current boundary.
previous() - Method in interface java.util.ListIterator
Returns the previous element in the list.
previous() - Method in class javax.swing.text.ElementIterator
Fetches the previous Element.
previous() - Method in class javax.swing.text.Segment
Decrements the iterator's index by one and returns the character at the new index.
previous(Container) - Method in class java.awt.CardLayout
Flips to the previous card of the specified container.
previousDouble(double) - Static method in class java.text.ChoiceFormat
Finds the greatest double less than d.
previousIndex() - Method in interface java.util.ListIterator
Returns the index of the element that would be returned by a subsequent call to previous.
previousWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of the previous word.
PRIMARY - Static variable in class java.text.Collator
Collator strength value.
primaryOrder(int) - Static method in class java.text.CollationElementIterator
Return the primary component of a collation element.
Principal - interface java.security.Principal.
This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
Principal - class org.omg.CORBA.Principal.
Deprecated. Deprecated by CORBA 2.2.
Principal() - Constructor for class org.omg.CORBA.Principal
Deprecated.
PrincipalHolder - class org.omg.CORBA.PrincipalHolder.
Deprecated. Deprecated by CORBA 2.2.
PrincipalHolder() - Constructor for class org.omg.CORBA.PrincipalHolder
Deprecated. Constructs a new PrincipalHolder object with its value field initialized to null.
PrincipalHolder(Principal) - Constructor for class org.omg.CORBA.PrincipalHolder
Deprecated. Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.
PRINT_SCREEN - Static variable in class java.awt.Event
The Print Screen key, a non-ASCII action key.
print() - Method in class java.awt.print.PrinterJob
Prints a set of pages.
print(boolean) - Method in class java.io.PrintStream
Print a boolean value.
print(boolean) - Method in class java.io.PrintWriter
Print a boolean value.
print(char) - Method in class java.io.PrintStream
Print a character.
print(char) - Method in class java.io.PrintWriter
Print a character.
print(char[]) - Method in class java.io.PrintStream
Print an array of characters.
print(char[]) - Method in class java.io.PrintWriter
Print an array of characters.
print(double) - Method in class java.io.PrintStream
Print a double-precision floating-point number.
print(double) - Method in class java.io.PrintWriter
Print a double-precision floating-point number.
print(float) - Method in class java.io.PrintStream
Print a floating-point number.
print(float) - Method in class java.io.PrintWriter
Print a floating-point number.
print(Graphics) - Method in class java.awt.Component
Prints this component.
print(Graphics) - Method in class java.awt.Container
Prints the container.
print(Graphics) - Method in class javax.swing.JComponent
Invoke this method to print the receiver.
print(Graphics, PageFormat, int) - Method in interface java.awt.print.Printable
Prints the page at the specified index into the specified Graphics context in the specified format.
print(int) - Method in class java.io.PrintStream
Print an integer.
print(int) - Method in class java.io.PrintWriter
Print an integer.
print(long) - Method in class java.io.PrintStream
Print a long integer.
print(long) - Method in class java.io.PrintWriter
Print a long integer.
print(Object) - Method in class java.io.PrintStream
Print an object.
print(Object) - Method in class java.io.PrintWriter
Print an object.
print(String) - Method in class java.io.PrintStream
Print a string.
print(String) - Method in class java.io.PrintWriter
Print a string.
Printable - interface java.awt.print.Printable.
The Printable interface is implemented by the print methods of the current page painter, which is called by the printing system to render a page.
PRINTABLE - Static variable in class java.awt.PageAttributes.OriginType
The OriginType instance to use for specifying a printable origin.
printAll(Graphics) - Method in class java.awt.Component
Prints this component and all of its subcomponents.
printAll(Graphics) - Method in class javax.swing.JComponent
Invoke this method to print the receiver.
printBorder(Graphics) - Method in class javax.swing.JComponent
Prints the component's border.
printChildren(Graphics) - Method in class javax.swing.JComponent
Prints this component's children.
printComponent(Graphics) - Method in class javax.swing.JComponent
This is invoked during a printing operation.
printComponents(Graphics) - Method in class java.awt.Container
Prints each of the components in this container.
printComponents(Graphics) - Method in class java.awt.ScrollPane
Prints the component in this scroll pane.
printDialog() - Method in class java.awt.print.PrinterJob
Presents a dialog to the user for changing the properties of the print job.
PRINTER - Static variable in class java.awt.JobAttributes.DestinationType
The DestinationType instance to use for specifying print to printer.
PrinterAbortException - exception java.awt.print.PrinterAbortException.
The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
PrinterAbortException() - Constructor for class java.awt.print.PrinterAbortException
Constructs a new PrinterAbortException with no detail message.
PrinterAbortException(String) - Constructor for class java.awt.print.PrinterAbortException
Constructs a new PrinterAbortException with the specified detail message.
PrinterException - exception java.awt.print.PrinterException.
The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
PrinterException() - Constructor for class java.awt.print.PrinterException
Constructs a new PrinterException object without a detail message.
PrinterException(String) - Constructor for class java.awt.print.PrinterException
Constructs a new PrinterException object with the specified detail message.
PrinterGraphics - interface java.awt.print.PrinterGraphics.
The PrinterGraphics interface is implemented by Graphics objects that are passed to Printable objects to render a page.
PrinterIOException - exception java.awt.print.PrinterIOException.
The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.
PrinterIOException(IOException) - Constructor for class java.awt.print.PrinterIOException
Constructs a new PrinterIOException with the string representation of the specified IOException.
PrinterJob - class java.awt.print.PrinterJob.
The PrinterJob class is the principal class that controls printing.
PrinterJob() - Constructor for class java.awt.print.PrinterJob
A PrinterJob object should be created using the static getPrinterJob method.
PrintGraphics - interface java.awt.PrintGraphics.
An abstract class which provides a print graphics context for a page.
PrintJob - class java.awt.PrintJob.
An abstract class which initiates and executes a print job.
PrintJob() - Constructor for class java.awt.PrintJob
println() - Method in class java.io.PrintStream
Terminate the current line by writing the line separator string.
println() - Method in class java.io.PrintWriter
Terminate the current line by writing the line separator string.
println(boolean) - Method in class java.io.PrintStream
Print a boolean and then terminate the line.
println(boolean) - Method in class java.io.PrintWriter
Print a boolean value and then terminate the line.
println(char) - Method in class java.io.PrintStream
Print a character and then terminate the line.
println(char) - Method in class java.io.PrintWriter
Print a character and then terminate the line.
println(char[]) - Method in class java.io.PrintStream
Print an array of characters and then terminate the line.
println(char[]) - Method in class java.io.PrintWriter
Print an array of characters and then terminate the line.
println(double) - Method in class java.io.PrintStream
Print a double and then terminate the line.
println(double) - Method in class java.io.PrintWriter
Print a double-precision floating-point number and then terminate the line.
println(float) - Method in class java.io.PrintStream
Print a float and then terminate the line.
println(float) - Method in class java.io.PrintWriter
Print a floating-point number and then terminate the line.
println(int) - Method in class java.io.PrintStream
Print an integer and then terminate the line.
println(int) - Method in class java.io.PrintWriter
Print an integer and then terminate the line.
println(long) - Method in class java.io.PrintStream
Print a long and then terminate the line.
println(long) - Method in class java.io.PrintWriter
Print a long integer and then terminate the line.
println(Object) - Method in class java.io.PrintStream
Print an Object and then terminate the line.
println(Object) - Method in class java.io.PrintWriter
Print an Object and then terminate the line.
println(String) - Method in class java.io.PrintStream
Print a String and then terminate the line.
println(String) - Method in class java.io.PrintWriter
Print a String and then terminate the line.
println(String) - Static method in class java.sql.DriverManager
Prints a message to the current JDBC log stream.
printStackTrace() - Method in class java.lang.Throwable
Prints this Throwable and its backtrace to the standard error stream.
printStackTrace() - Method in class java.lang.ExceptionInInitializerError
Prints the stack trace of the exception that occurred.
printStackTrace() - Method in class java.lang.ClassNotFoundException
Prints the stack backtrace.
printStackTrace() - Method in class java.lang.reflect.InvocationTargetException
Prints the stack trace of the thrown target exception.
printStackTrace() - Method in class java.lang.reflect.UndeclaredThrowableException
Prints this UndeclaredThrowableException and its backtrace to the standard error stream.
printStackTrace() - Method in class java.rmi.RemoteException
Prints the composite message to System.err.
printStackTrace() - Method in class java.rmi.activation.ActivationException
Prints the composite message to System.err.
printStackTrace() - Method in class java.rmi.server.ServerCloneException
Returns the detail message, including the message from the nested exception if there is one.
printStackTrace() - Method in class java.security.PrivilegedActionException
Prints the stack trace of the exception that occurred.
printStackTrace() - Method in class javax.naming.NamingException
Prints this exception's stack trace to System.err.
printStackTrace(PrintStream) - Method in class java.lang.Throwable
Prints this Throwable and its backtrace to the specified print stream.
printStackTrace(PrintStream) - Method in class java.lang.ExceptionInInitializerError
Prints the stack trace of the exception that occurred to the specified print stream.
printStackTrace(PrintStream) - Method in class java.lang.ClassNotFoundException
Prints the stack backtrace to the specified print stream.
printStackTrace(PrintStream) - Method in class java.lang.reflect.InvocationTargetException
Prints the stack trace of the thrown target exception to the specified print stream.
printStackTrace(PrintStream) - Method in class java.lang.reflect.UndeclaredThrowableException
Prints this UndeclaredThrowableException and its backtrace to the specified PrintStream.
printStackTrace(PrintStream) - Method in class java.rmi.RemoteException
Prints the composite message and the embedded stack trace to the specified stream ps.
printStackTrace(PrintStream) - Method in class java.rmi.activation.ActivationException
Prints the composite message and the embedded stack trace to the specified stream ps.
printStackTrace(PrintStream) - Method in class java.rmi.server.ServerCloneException
Prints the composite message and the embedded stack trace to the specified stream ps.
printStackTrace(PrintStream) - Method in class java.security.PrivilegedActionException
Prints the stack trace of the exception that occurred to the specified print stream.
printStackTrace(PrintStream) - Method in class javax.naming.NamingException
Prints this exception's stack trace to a print stream.
printStackTrace(PrintWriter) - Method in class java.lang.Throwable
Prints this Throwable and its backtrace to the specified print writer.
printStackTrace(PrintWriter) - Method in class java.lang.ExceptionInInitializerError
Prints the stack trace of the exception that occurred to the specified print writer.
printStackTrace(PrintWriter) - Method in class java.lang.ClassNotFoundException
Prints the stack backtrace to the specified print writer.
printStackTrace(PrintWriter) - Method in class java.lang.reflect.InvocationTargetException
Prints the stack trace of the thrown target exception to the specified print writer.
printStackTrace(PrintWriter) - Method in class java.lang.reflect.UndeclaredThrowableException
Prints this UndeclaredThrowableException and its backtrace to the specified PrintWriter.
printStackTrace(PrintWriter) - Method in class java.rmi.RemoteException
Prints the composite message and the embedded stack trace to the specified print writer pw.
printStackTrace(PrintWriter) - Method in class java.rmi.activation.ActivationException
Prints the composite message and the embedded stack trace to the specified print writer pw.
printStackTrace(PrintWriter) - Method in class java.rmi.server.ServerCloneException
Prints the composite message and the embedded stack trace to the specified writer pw.
printStackTrace(PrintWriter) - Method in class java.security.PrivilegedActionException
Prints the stack trace of the exception that occurred to the specified print writer.
printStackTrace(PrintWriter) - Method in class javax.naming.NamingException
Prints this exception's stack trace to a print writer.
PrintStream - class java.io.PrintStream.
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintStream(OutputStream) - Constructor for class java.io.PrintStream
Create a new print stream.
PrintStream(OutputStream, boolean) - Constructor for class java.io.PrintStream
Create a new print stream.
PrintWriter - class java.io.PrintWriter.
Print formatted representations of objects to a text-output stream.
PrintWriter(OutputStream) - Constructor for class java.io.PrintWriter
Create a new PrintWriter, without automatic line flushing, from an existing OutputStream.
PrintWriter(OutputStream, boolean) - Constructor for class java.io.PrintWriter
Create a new PrintWriter from an existing OutputStream.
PrintWriter(Writer) - Constructor for class java.io.PrintWriter
Create a new PrintWriter, without automatic line flushing.
PrintWriter(Writer, boolean) - Constructor for class java.io.PrintWriter
Create a new PrintWriter.
PRIORITY_INTERCHAR - Static variable in class java.awt.font.GlyphJustificationInfo
The second lowest justification priority.
PRIORITY_KASHIDA - Static variable in class java.awt.font.GlyphJustificationInfo
The highest justification priority.
PRIORITY_NONE - Static variable in class java.awt.font.GlyphJustificationInfo
The lowest justification priority.
PRIORITY_WHITESPACE - Static variable in class java.awt.font.GlyphJustificationInfo
The second highest justification priority.
PRIVATE - Static variable in class java.lang.reflect.Modifier
The int value representing the private modifier.
PRIVATE_MEMBER - interface org.omg.CORBA.PRIVATE_MEMBER.
PRIVATE_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type.
PRIVATE_USE - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
PRIVATE_USE_AREA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
PrivateKey - interface java.security.PrivateKey.
A private key.
PrivilegedAction - interface java.security.PrivilegedAction.
A computation to be performed with privileges enabled.
PrivilegedActionException - exception java.security.PrivilegedActionException.
This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
PrivilegedActionException(Exception) - Constructor for class java.security.PrivilegedActionException
Constructs a new PrivilegedActionException "wrapping" the specific Exception.
PrivilegedExceptionAction - interface java.security.PrivilegedExceptionAction.
A computation to be performed with privileges enabled, that throws one or more checked exceptions.
procedureColumnIn - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column stores IN parameters.
procedureColumnInOut - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column stores INOUT parameters.
procedureColumnOut - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column stores OUT parameters.
procedureColumnResult - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column stores results.
procedureColumnReturn - Static variable in interface java.sql.DatabaseMetaData
Indicates that the column stores return values.
procedureColumnUnknown - Static variable in interface java.sql.DatabaseMetaData
Indicates that type of the column is unknown.
procedureNoNulls - Static variable in interface java.sql.DatabaseMetaData
Indicates that NULL values are not allowed.
procedureNoResult - Static variable in interface java.sql.DatabaseMetaData
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
procedureNullable - Static variable in interface java.sql.DatabaseMetaData
Indicates that NULL values are allowed.
procedureNullableUnknown - Static variable in interface java.sql.DatabaseMetaData
Indicates that whether NULL values are allowed is unknown.
procedureResultUnknown - Static variable in interface java.sql.DatabaseMetaData
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
procedureReturnsResult - Static variable in interface java.sql.DatabaseMetaData
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
Process - class java.lang.Process.
The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
Process() - Constructor for class java.lang.Process
processActionEvent(ActionEvent) - Method in class java.awt.MenuItem
Processes action events occurring on this menu item, by dispatching them to any registered ActionListener objects.
processActionEvent(ActionEvent) - Method in class java.awt.List
Processes action events occurring on this component by dispatching them to any registered ActionListener objects.
processActionEvent(ActionEvent) - Method in class java.awt.TextField
Processes action events occurring on this text field by dispatching them to any registered ActionListener objects.
processActionEvent(ActionEvent) - Method in class java.awt.Button
Processes action events occurring on this button by dispatching them to any registered ActionListener objects.
processAdjustmentEvent(AdjustmentEvent) - Method in class java.awt.Scrollbar
Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects.
processComponentEvent(ComponentEvent) - Method in class java.awt.Component
Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
processComponentKeyEvent(KeyEvent) - Method in class javax.swing.JComponent
Processes any key events that the component itself recognizes.
processComponentKeyEvent(KeyEvent) - Method in class javax.swing.JEditorPane
Overridden to handle processing of tab/shift tab.
processContainerEvent(ContainerEvent) - Method in class java.awt.Container
Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
processEvent(AWTEvent) - Method in class java.awt.Component
Processes events occurring on this component.
processEvent(AWTEvent) - Method in class java.awt.Container
Processes events on this container.
processEvent(AWTEvent) - Method in class java.awt.Scrollbar
Processes events on this scroll bar.
processEvent(AWTEvent) - Method in class java.awt.MenuComponent
Processes events occurring on this menu component.
processEvent(AWTEvent) - Method in class java.awt.MenuItem
Processes events on this menu item.
processEvent(AWTEvent) - Method in class java.awt.Checkbox
Processes events on this check box.
processEvent(AWTEvent) - Method in class java.awt.Window
Processes events on this window.
processEvent(AWTEvent) - Method in class java.awt.List
Processes events on this scrolling list.
processEvent(AWTEvent) - Method in class java.awt.TextComponent
Processes events on this text component.
processEvent(AWTEvent) - Method in class java.awt.Choice
Processes events on this choice.
processEvent(AWTEvent) - Method in class java.awt.TextField
Processes events on this text field.
processEvent(AWTEvent) - Method in class java.awt.Button
Processes events on this button.
processEvent(AWTEvent) - Method in class java.awt.CheckboxMenuItem
Processes events on this check box menu item.
processFocusEvent(FocusEvent) - Method in class java.awt.Component
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
processFocusEvent(FocusEvent) - Method in class javax.swing.JComponent
processFocusEvent(FocusEvent) - Method in class javax.swing.JMenu
Processes any focus events, such as FocusEvent.FOCUS_GAINED or FocusEvent.FOCUS_LOST.
processHierarchyBoundsEvent(HierarchyEvent) - Method in class java.awt.Component
Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
processHierarchyEvent(HierarchyEvent) - Method in class java.awt.Component
Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
processHTMLFrameHyperlinkEvent(HTMLFrameHyperlinkEvent) - Method in class javax.swing.text.html.HTMLDocument
Processes HyperlinkEvents that are generated by documents in an HTML frame.
processInputMethodEvent(InputMethodEvent) - Method in class java.awt.Component
Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
processInputMethodEvent(InputMethodEvent) - Method in class javax.swing.text.JTextComponent
processItemEvent(ItemEvent) - Method in class java.awt.Checkbox
Processes item events occurring on this check box by dispatching them to any registered ItemListener objects.
processItemEvent(ItemEvent) - Method in class java.awt.List
Processes item events occurring on this list by dispatching them to any registered ItemListener objects.
processItemEvent(ItemEvent) - Method in class java.awt.Choice
Processes item events occurring on this Choice menu by dispatching them to any registered ItemListener objects.
processItemEvent(ItemEvent) - Method in class java.awt.CheckboxMenuItem
Processes item events occurring on this check box menu item by dispatching them to any registered ItemListener objects.
processKeyBinding(KeyStroke, KeyEvent, int, boolean) - Method in class javax.swing.JComponent
Invoked to process the key bindings for ks as the result of the KeyEvent e.
processKeyBinding(KeyStroke, KeyEvent, int, boolean) - Method in class javax.swing.JTable
processKeyBinding(KeyStroke, KeyEvent, int, boolean) - Method in class javax.swing.JMenuBar
Subclassed to check all the child menus.
processKeyEvent(Component, KeyEvent) - Method in class javax.swing.FocusManager
This method is called by JComponents when a key event occurs.
processKeyEvent(Component, KeyEvent) - Method in class javax.swing.DefaultFocusManager
processKeyEvent(KeyEvent) - Method in class java.awt.Component
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
processKeyEvent(KeyEvent) - Method in class javax.swing.JComponent
Overrides processKeyEvent to process events.
processKeyEvent(KeyEvent) - Method in class javax.swing.JEditorPane
Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
processKeyEvent(KeyEvent) - Method in class javax.swing.JMenu
Processes key stroke events for this menu, such as mnemonics and accelerators.
processKeyEvent(KeyEvent) - Method in class javax.swing.MenuSelectionManager
When a MenuElement receives an event from a KeyListener, it should never process the event directly.
processKeyEvent(KeyEvent) - Method in class javax.swing.JApplet
processKeyEvent(KeyEvent) - Method in class javax.swing.JComboBox
Handles KeyEvents, looking for the Tab key.
processKeyEvent(KeyEvent) - Method in class javax.swing.JFrame
Processes key events occurring on this component and, if appropriate, passes them on to components in the frame which have registered interest in them.
processKeyEvent(KeyEvent) - Method in class javax.swing.JTextArea
Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
processKeyEvent(KeyEvent) - Method in class javax.swing.JDialog
Processes key events occurring on this component and, if appropriate, passes them on to components in the dialog which have registered interest in them.
processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JMenuItem
Process a key event forwarded from the MenuSelectionManager.
processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JPopupMenu
This method is required to conform to the MenuElement interface, but it not implemented.
processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JMenuBar
Implemented to be a MenuElement -- does nothing.
processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager) - Method in interface javax.swing.MenuElement
Process a key event.
processMenuDragMouseEvent(MenuDragMouseEvent) - Method in class javax.swing.JMenuItem
Handle mouse drag in a menu.
processMenuKeyEvent(MenuKeyEvent) - Method in class javax.swing.JMenuItem
Handle a keystroke in a menu.
processMouseEvent(JMenuItem, MouseEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
processMouseEvent(JMenuItem, MouseEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
processMouseEvent(MouseEvent) - Method in class java.awt.Component
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
processMouseEvent(MouseEvent) - Method in class javax.swing.MenuSelectionManager
When a MenuElement receives an event from a MouseListener, it should never process the event directly.
processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JMenuItem
Process a mouse event forwarded from the MenuSelectionManager.
processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JPopupMenu
This method is required to conform to the MenuElement interface, but it not implemented.
processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) - Method in class javax.swing.JMenuBar
Implemented to be a MenuElement -- does nothing.
processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) - Method in interface javax.swing.MenuElement
Process a mouse event.
processMouseMotionEvent(MouseEvent) - Method in class java.awt.Component
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
processMouseMotionEvent(MouseEvent) - Method in class javax.swing.JComponent
processTextEvent(TextEvent) - Method in class java.awt.TextComponent
Processes text events occurring on this text component by dispatching them to any registered TextListener objects.
processWindowEvent(WindowEvent) - Method in class java.awt.Window
Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
processWindowEvent(WindowEvent) - Method in class javax.swing.JFrame
Processes window events occurring on this component.
processWindowEvent(WindowEvent) - Method in class javax.swing.JDialog
Handles window events depending on the state of the defaultCloseOperation property.
ProfileDataException - exception java.awt.color.ProfileDataException.
This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.
ProfileDataException(String) - Constructor for class java.awt.color.ProfileDataException
Constructs a ProfileDataException with the specified detail message.
program - Variable in class javax.sound.midi.VoiceStatus
The program number of the instrument that this voice is currently using.
PROGRAM_CHANGE - Static variable in class javax.sound.midi.ShortMessage
Command value for Program Change message (0xC0, or 192)
programChange(int) - Method in interface javax.sound.midi.MidiChannel
Changes a program (patch).
programChange(int, int) - Method in interface javax.sound.midi.MidiChannel
Changes the program using bank and program (patch) numbers.
PROGRESS_BAR - Static variable in class javax.accessibility.AccessibleRole
An object used to indicate how much of a task has been completed.
progressBar - Variable in class javax.swing.plaf.basic.BasicProgressBarUI
ProgressBarUI - class javax.swing.plaf.ProgressBarUI.
Pluggable look and feel interface for JProgressBar.
ProgressBarUI() - Constructor for class javax.swing.plaf.ProgressBarUI
ProgressMonitor - class javax.swing.ProgressMonitor.
A class to monitor the progress of some operation.
ProgressMonitor(Component, Object, String, int, int) - Constructor for class javax.swing.ProgressMonitor
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
ProgressMonitorInputStream - class javax.swing.ProgressMonitorInputStream.
Monitors the progress of reading from some InputStream.
ProgressMonitorInputStream(Component, Object, InputStream) - Constructor for class javax.swing.ProgressMonitorInputStream
Constructs an object to monitor the progress of an input stream.
progressString - Variable in class javax.swing.JProgressBar
A optional String that can be displayed on the progress bar.
PROMPT - Static variable in class javax.swing.text.html.HTML.Attribute
propagatedFrom - Variable in class java.beans.beancontext.BeanContextEvent
The BeanContext from which this event was propagated
Properties - class java.util.Properties.
The Properties class represents a persistent set of properties.
PROPERTIES - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
Properties() - Constructor for class java.util.Properties
Creates an empty property list with no default values.
Properties(Properties) - Constructor for class java.util.Properties
Creates an empty property list with the specified defaults.
propertyChange(PropertyChangeEvent) - Method in interface java.beans.PropertyChangeListener
This method gets called when a bound property is changed.
propertyChange(PropertyChangeEvent) - Method in class java.beans.beancontext.BeanContextSupport
subclasses may envelope to monitor child property changes.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.JList.AccessibleJList
Property Change Listener change method.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to selection model, column model, etc.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.table.DefaultTableColumnModel
Property Change Listener change method.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTextUI
This method gets called when a bound property is changed on the associated JTextComponent.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicEditorPaneUI
This method gets called when a bound property is changed on the associated JTextComponent.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTextPaneUI
This method gets called when a bound property is changed on the associated JTextComponent.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler
If the source of the PropertyChangeEvent e equals the optionPane and is one of the ICON_PROPERTY, MESSAGE_PROPERTY, OPTIONS_PROPERTY or INITIAL_VALUE_PROPERTY, validateComponent is invoked.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTextFieldUI
This method gets called when a bound property is changed on the associated JTextComponent.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener
Detects changes in state from the JInternalFrame and handles actions.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicLabelUI
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler
Messaged from the JSplitPane the reciever is contained in.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
Invoked when a property changes on the root pane.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicTextAreaUI
This method gets called when a bound property is changed on the associated JTextComponent.
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalTextFieldUI
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener
propertyChange(PropertyChangeEvent) - Method in class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener
PropertyChangeEvent - class java.beans.PropertyChangeEvent.
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeEvent(Object, String, Object, Object) - Constructor for class java.beans.PropertyChangeEvent
Constructs a new PropertyChangeEvent.
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicComboPopup
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicMenuUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicListUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicComboBoxUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicColorChooserUI
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Instance of the PropertyChangeListener for this JSplitPane.
propertyChangeListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
PropertyChangeListener - interface java.beans.PropertyChangeListener.
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyChangeSupport - class java.beans.PropertyChangeSupport.
This is a utility class that can be used by beans that support bound properties.
PropertyChangeSupport(Object) - Constructor for class java.beans.PropertyChangeSupport
Constructs a PropertyChangeSupport object.
PropertyDescriptor - class java.beans.PropertyDescriptor.
A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.
PropertyDescriptor(String, Class) - Constructor for class java.beans.PropertyDescriptor
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.
PropertyDescriptor(String, Class, String, String) - Constructor for class java.beans.PropertyDescriptor
This constructor takes the name of a simple property, and method names for reading and writing the property.
PropertyDescriptor(String, Method, Method) - Constructor for class java.beans.PropertyDescriptor
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
PropertyEditor - interface java.beans.PropertyEditor.
A PropertyEditor class provides support for GUIs that want to allow users to edit a property value of a given type.
PropertyEditorManager - class java.beans.PropertyEditorManager.
The PropertyEditorManager can be used to locate a property editor for any given type name.
PropertyEditorManager() - Constructor for class java.beans.PropertyEditorManager
PropertyEditorSupport - class java.beans.PropertyEditorSupport.
This is a support class to help build property editors.
PropertyEditorSupport() - Constructor for class java.beans.PropertyEditorSupport
Constructor for use by derived PropertyEditor classes.
PropertyEditorSupport(Object) - Constructor for class java.beans.PropertyEditorSupport
Constructor for use when a PropertyEditor is delegating to us.
propertyKey - Static variable in class javax.swing.plaf.basic.BasicHTML
Key to use for the html renderer when stored as a client property of a JComponent.
propertyListener - Variable in class javax.swing.plaf.basic.BasicToolBarUI
PROPERTYNAME - Static variable in interface java.beans.DesignMode
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.
propertyNames() - Method in class java.util.Properties
Returns an enumeration of all the keys in this property list, including the keys in the default property list.
PropertyPermission - class java.util.PropertyPermission.
This class is for property permissions.
PropertyPermission(String, String) - Constructor for class java.util.PropertyPermission
Creates a new PropertyPermission object with the specified name.
PropertyResourceBundle - class java.util.PropertyResourceBundle.
PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
PropertyResourceBundle(InputStream) - Constructor for class java.util.PropertyResourceBundle
Creates a property resource
PropertyVetoException - exception java.beans.PropertyVetoException.
A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
PropertyVetoException(String, PropertyChangeEvent) - Constructor for class java.beans.PropertyVetoException
Constructs a PropertyVetoException with a detailed message.
PROTECTED - Static variable in class java.lang.reflect.Modifier
The int value representing the protected modifier.
ProtectionDomain - class java.security.ProtectionDomain.
This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.
ProtectionDomain(CodeSource, PermissionCollection) - Constructor for class java.security.ProtectionDomain
Creates a new ProtectionDomain with the given CodeSource and Permissions.
PROTOCOL_VERSION_1 - Static variable in interface java.io.ObjectStreamConstants
A Stream Protocol Version.
PROTOCOL_VERSION_2 - Static variable in interface java.io.ObjectStreamConstants
A Stream Protocol Version.
ProtocolException - exception java.net.ProtocolException.
Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
ProtocolException() - Constructor for class java.net.ProtocolException
Constructs a new ProtocolException with no detail message.
ProtocolException(String) - Constructor for class java.net.ProtocolException
Constructs a new ProtocolException with the specified detail message.
prototypeCellValueChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
Provider - class java.security.Provider.
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
PROVIDER_URL - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying configuration information for the service provider to use.
Provider(String, double, String) - Constructor for class java.security.Provider
Constructs a provider with the specified name, version number, and information.
ProviderException - exception java.security.ProviderException.
A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
ProviderException() - Constructor for class java.security.ProviderException
Constructs a ProviderException with no detail message.
ProviderException(String) - Constructor for class java.security.ProviderException
Constructs a ProviderException with the specified detail message.
proxy - Variable in class java.beans.beancontext.BeanContextServicesSupport
Delegate for the BeanContextServiceProvider.
Proxy - class java.lang.reflect.Proxy.
Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
Proxy(InvocationHandler) - Constructor for class java.lang.reflect.Proxy
Constructs a new Proxy instance from a subclass (typically, a dynamic proxy class) with the specified value for its invocation handler.
ptLineDist(double, double) - Method in class java.awt.geom.Line2D
Returns the distance from a point to this line.
ptLineDist(double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Returns the distance from a point to a line.
ptLineDist(Point2D) - Method in class java.awt.geom.Line2D
Returns the distance from a Point2D to this line.
ptLineDistSq(double, double) - Method in class java.awt.geom.Line2D
Returns the square of the distance from a point to this line.
ptLineDistSq(double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Returns the square of the distance from a point to a line.
ptLineDistSq(Point2D) - Method in class java.awt.geom.Line2D
Returns the square of the distance from a specified Point2D to this line.
ptSegDist(double, double) - Method in class java.awt.geom.Line2D
Returns the distance from a point to this line segment.
ptSegDist(double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Returns the distance from a point to a line segment.
ptSegDist(Point2D) - Method in class java.awt.geom.Line2D
Returns the distance from a Point2D to this line segment.
ptSegDistSq(double, double) - Method in class java.awt.geom.Line2D
Returns the square of the distance from a point to this line segment.
ptSegDistSq(double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Returns the square of the distance from a point to a line segment.
ptSegDistSq(Point2D) - Method in class java.awt.geom.Line2D
Returns the square of the distance from a Point2D to this line segment.
PUBLIC - Static variable in interface java.lang.reflect.Member
Identifies the set of all public members of a class or interface, including inherited members.
PUBLIC - Static variable in class java.lang.reflect.Modifier
The int value representing the public modifier.
PUBLIC - Static variable in interface javax.swing.text.html.parser.DTDConstants
PUBLIC_MEMBER - interface org.omg.CORBA.PUBLIC_MEMBER.
PUBLIC_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type.
PublicKey - interface java.security.PublicKey.
A public key.
PUSH_BUTTON - Static variable in class javax.accessibility.AccessibleRole
An object the user can manipulate to tell the application to do something.
push(EventQueue) - Method in class java.awt.EventQueue
Replace the existing EventQueue with the specified one.
push(Object) - Method in class java.util.Stack
Pushes an item onto the top of this stack.
pushBack() - Method in class java.io.StreamTokenizer
Causes the next call to the nextToken method of this tokenizer to return the current value in the ttype field, and not to modify the value in the nval or sval field.
PushbackInputStream - class java.io.PushbackInputStream.
A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
PushbackInputStream(InputStream) - Constructor for class java.io.PushbackInputStream
Creates a PushbackInputStream and saves its argument, the input stream in, for later use.
PushbackInputStream(InputStream, int) - Constructor for class java.io.PushbackInputStream
Creates a PushbackInputStream with a pushback buffer of the specified size, and saves its argument, the input stream in, for later use.
PushbackReader - class java.io.PushbackReader.
A character-stream reader that allows characters to be pushed back into the stream.
PushbackReader(Reader) - Constructor for class java.io.PushbackReader
Create a new pushback reader with a one-character pushback buffer.
PushbackReader(Reader, int) - Constructor for class java.io.PushbackReader
Create a new pushback reader with a pushback buffer of the given size.
pushCharacterStyle() - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Pushes the current character style on a stack in preparation for forming a new nested character style.
put(Attribute) - Method in interface javax.naming.directory.Attributes
Adds a new attribute to the attribute set.
put(Attribute) - Method in class javax.naming.directory.BasicAttributes
put(KeyStroke, Object) - Method in class javax.swing.InputMap
Adds a binding for keyStroke to actionMapKey.
put(KeyStroke, Object) - Method in class javax.swing.ComponentInputMap
Adds a binding for keyStroke to actionMapKey.
put(Object, Action) - Method in class javax.swing.ActionMap
Adds a binding for key to action.
put(Object, Object) - Method in class java.awt.RenderingHints
Maps the specified key to the specified value in this RenderingHints object.
put(Object, Object) - Method in class java.security.Provider
Sets the key property to have the specified value.
put(Object, Object) - Method in class java.util.Dictionary
Maps the specified key to the specified value in this dictionary.
put(Object, Object) - Method in class java.util.Hashtable
Maps the specified key to the specified value in this hashtable.
put(Object, Object) - Method in class java.util.AbstractMap
Associates the specified value with the specified key in this map (optional operation).
put(Object, Object) - Method in class java.util.WeakHashMap
Updates this map so that the given key maps to the given value.
put(Object, Object) - Method in class java.util.TreeMap
Associates the specified value with the specified key in this map.
put(Object, Object) - Method in class java.util.HashMap
Associates the specified value with the specified key in this map.
put(Object, Object) - Method in interface java.util.Map
Associates the specified value with the specified key in this map (optional operation).
put(Object, Object) - Method in class java.util.jar.Attributes
Associates the specified value with the specified attribute name (key) in this Map.
put(Object, Object) - Method in class javax.swing.UIDefaults
Sets the value of key to value.
put(Object, Object) - Static method in class javax.swing.UIManager
Stores an object in the defaults table.
put(String, boolean) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named boolean field into the persistent field.
put(String, byte) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named byte field into the persistent fields.
put(String, char) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named char field into the persistent fields.
put(String, double) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named double field into the persistent field.
put(String, float) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named float field into the persistent fields.
put(String, int) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named int field into the persistent fields.
put(String, long) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named long field into the persistent fields.
put(String, Object) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named Object field into the persistent field.
put(String, Object) - Method in interface javax.naming.directory.Attributes
Adds a new attribute to the attribute set.
put(String, Object) - Method in class javax.naming.directory.BasicAttributes
put(String, short) - Method in class java.io.ObjectOutputStream.PutField
Put the value of the named short field into the persistent fields.
putAll(Map) - Method in class java.awt.RenderingHints
Copies all of the mappings from the specified Map to this RenderingHints.
putAll(Map) - Method in class java.security.Provider
Copies all of the mappings from the specified Map to this provider.
putAll(Map) - Method in class java.util.Hashtable
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
putAll(Map) - Method in class java.util.AbstractMap
Copies all of the mappings from the specified map to this map (optional operation).
putAll(Map) - Method in class java.util.TreeMap
Copies all of the mappings from the specified map to this map.
putAll(Map) - Method in class java.util.HashMap
Copies all of the mappings from the specified map to this one.
putAll(Map) - Method in interface java.util.Map
Copies all of the mappings from the specified map to this map (optional operation).
putAll(Map) - Method in class java.util.jar.Attributes
Copies all of the attribute name-value mappings from the specified Attributes to this Map.
putClientProperty(Object, Object) - Method in class javax.swing.JComponent
Adds an arbitrary key/value "client property" to this component.
putDefaults(Object[]) - Method in class javax.swing.UIDefaults
Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent.
putDTDHash(String, DTD) - Static method in class javax.swing.text.html.parser.DTD
putFields() - Method in class java.io.ObjectOutputStream
Retrieve the object used to buffer persistent fields to be written to the stream.
putLayer(JComponent, int) - Static method in class javax.swing.JLayeredPane
Sets the layer property on a JComponent.
putNextEntry(ZipEntry) - Method in class java.util.jar.JarOutputStream
Begins writing a new JAR file entry and positions the stream to the start of the entry data.
putNextEntry(ZipEntry) - Method in class java.util.zip.ZipOutputStream
Begins writing a new ZIP file entry and positions the stream to the start of the entry data.
putProperty(Object, Object) - Method in interface javax.swing.text.Document
Puts a new property on the list.
putProperty(Object, Object) - Method in class javax.swing.text.AbstractDocument
A convenience method for storing up a property value.
putValue(String, Object) - Method in interface javax.swing.Action
Sets one of this object's properties using the associated key.
putValue(String, Object) - Method in class javax.swing.AbstractAction
Sets the Value associated with the specified key.
putValue(String, String) - Method in class java.util.jar.Attributes
Associates the specified value with the specified attribute name, specified as a String.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Q-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

Q

QuadCurve2D - class java.awt.geom.QuadCurve2D.
The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
QuadCurve2D.Double - class java.awt.geom.QuadCurve2D.Double.
A quadratic parametric curve segment specified with double coordinates.
QuadCurve2D.Double() - Constructor for class java.awt.geom.QuadCurve2D.Double
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
QuadCurve2D.Double(double, double, double, double, double, double) - Constructor for class java.awt.geom.QuadCurve2D.Double
Constructs and initializes a QuadCurve2D from the specified coordinates.
QuadCurve2D.Float - class java.awt.geom.QuadCurve2D.Float.
A quadratic parametric curve segment specified with float coordinates.
QuadCurve2D.Float() - Constructor for class java.awt.geom.QuadCurve2D.Float
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
QuadCurve2D.Float(float, float, float, float, float, float) - Constructor for class java.awt.geom.QuadCurve2D.Float
Constructs and initializes a QuadCurve2D from the specified coordinates.
QuadCurve2D() - Constructor for class java.awt.geom.QuadCurve2D
This is an abstract class that cannot be instantiated directly.
quadTo(float, float, float, float) - Method in class java.awt.geom.GeneralPath
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the coordinates (x2, y2), using the specified point (x1, y1) as a quadratic parametric control point.
QUARTO - Static variable in class java.awt.PageAttributes.MediaType
The MediaType instance for Quarto, 215 x 275 mm.
QUESTION_MESSAGE - Static variable in class javax.swing.JOptionPane
Used for questions.
quoteChar(int) - Method in class java.io.StreamTokenizer
Specifies that matching pairs of this character delimit string constants in this tokenizer.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


R-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

R

RADIO_BUTTON - Static variable in class javax.accessibility.AccessibleRole
A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked.
RAISED - Static variable in class javax.swing.border.BevelBorder
Raised bevel type.
RAISED - Static variable in class javax.swing.border.EtchedBorder
Raised etched type.
Random - class java.util.Random.
An instance of this class is used to generate a stream of pseudorandom numbers.
random() - Static method in class java.lang.StrictMath
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
random() - Static method in class java.lang.Math
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
Random() - Constructor for class java.util.Random
Creates a new random number generator.
Random(long) - Constructor for class java.util.Random
Creates a new random number generator using a single long seed:
RandomAccessFile - class java.io.RandomAccessFile.
Instances of this class support both reading and writing to a random access file.
RandomAccessFile(File, String) - Constructor for class java.io.RandomAccessFile
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
RandomAccessFile(String, String) - Constructor for class java.io.RandomAccessFile
Creates a random access file stream to read from, and optionally to write to, a file with the specified name.
RANDOMPIXELORDER - Static variable in interface java.awt.image.ImageConsumer
The pixels will be delivered in a random order.
RANGE - Static variable in class java.awt.JobAttributes.DefaultSelectionType
The DefaultSelectionType instance to use for specifying that a range of pages of the job should be printed.
Raster - class java.awt.image.Raster.
A class representing a rectangular array of pixels.
Raster(SampleModel, DataBuffer, Point) - Constructor for class java.awt.image.Raster
Constructs a Raster with the given SampleModel and DataBuffer.
Raster(SampleModel, DataBuffer, Rectangle, Point, Raster) - Constructor for class java.awt.image.Raster
Constructs a Raster with the given SampleModel, DataBuffer, and parent.
Raster(SampleModel, Point) - Constructor for class java.awt.image.Raster
Constructs a Raster with the given SampleModel.
RasterFormatException - exception java.awt.image.RasterFormatException.
The RasterFormatException is thrown if there is invalid layout information in the Raster.
RasterFormatException(String) - Constructor for class java.awt.image.RasterFormatException
Constructs a new RasterFormatException with the specified message.
RasterOp - interface java.awt.image.RasterOp.
This interface describes single-input/single-output operations performed on Raster objects.
RAW_TEXT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the raw text state.
RCDATA - Static variable in interface javax.swing.text.html.parser.DTDConstants
RCSID - Static variable in class javax.swing.undo.StateEdit
RCSID - Static variable in interface javax.swing.undo.StateEditable
Resource ID for this class.
read_abstract_interface() - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshal the value object or a suitable stub object.
read_abstract_interface(Class) - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshal the class object or the stub class corresponding to the passed type.
read_Abstract() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL Abstract interface from the input stream.
read_any_array(AnySeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL Anys from offset for length elements from the input stream.
read_any() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL Any value from the input stream.
read_any() - Method in class org.omg.CORBA.portable.InputStream
Reads an Any from this input stream.
read_boolean_array(boolean[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of booleans from this input stream.
read_boolean_array(BooleanSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL booleans from offset for length elements from the input stream.
read_boolean() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL boolean value from the input stream.
read_boolean() - Method in class org.omg.CORBA.portable.InputStream
Reads a boolean value from this input stream.
read_char_array(char[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of chars from this input stream.
read_char_array(CharSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL characters from offset for length elements from the input stream.
read_char() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL character value from the input stream.
read_char() - Method in class org.omg.CORBA.portable.InputStream
Reads a char value from this input stream.
read_Context() - Method in class org.omg.CORBA.portable.InputStream
Reads a CORBA context from the stream.
read_double_array(double[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of boubles from this input stream.
read_double_array(DoubleSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL doubles from offset for length elements from the input stream.
read_double() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL double from the input stream.
read_double() - Method in class org.omg.CORBA.portable.InputStream
Reads a double value from this input stream.
read_fixed() - Method in class org.omg.CORBA.portable.InputStream
Reads a BigDecimal number.
read_float_array(float[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of floats from this input stream.
read_float_array(FloatSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL floats from offset for length elements from the input stream.
read_float() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL float from the input stream.
read_float() - Method in class org.omg.CORBA.portable.InputStream
Reads a float value from this input stream.
read_long_array(int[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of CORBA longs (i.e.
read_long_array(LongSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL longs from offset for length elements from the input stream.
read_long() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL long from the input stream.
read_long() - Method in class org.omg.CORBA.portable.InputStream
Reads a CORBA long (i.e.
read_longlong_array(long[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of CORBA longlongs (i.e.
read_longlong_array(LongLongSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL long longs from offset for length elements from the input stream.
read_longlong() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL long long from the input stream.
read_longlong() - Method in class org.omg.CORBA.portable.InputStream
Reads a CORBA longlong (i.e.
read_Object() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL CORBA::Object from the input stream.
read_Object() - Method in class org.omg.CORBA.portable.InputStream
Reads a CORBA object from this input stream.
read_Object(Class) - Method in class org.omg.CORBA.portable.InputStream
read_Object unmarshals an object and returns a CORBA Object which is an instance of the class passed as its argument.
read_octet_array(byte[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of octets (i.e.
read_octet_array(OctetSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL octets from offset for length elements from the input stream.
read_octet() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL octet value from the input stream.
read_octet() - Method in class org.omg.CORBA.portable.InputStream
Reads an octet (i.e.
read_Principal() - Method in class org.omg.CORBA.portable.InputStream
Deprecated. Deprecated by CORBA 2.2.
read_short_array(short[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of shorts from this input stream.
read_short_array(ShortSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL shorts from offset for length elements from the input stream.
read_short() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL short from the input stream.
read_short() - Method in class org.omg.CORBA.portable.InputStream
Reads a short value from this input stream.
read_string() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL string from the input stream.
read_string() - Method in class org.omg.CORBA.portable.InputStream
Reads a string value from this input stream.
read_TypeCode() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL typecode from the input stream.
read_TypeCode() - Method in class org.omg.CORBA.portable.InputStream
Reads a TypeCode from this input stream.
read_ulong_array(int[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of unsigned CORBA longs (i.e.
read_ulong_array(ULongSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL unsigned longs from offset for length elements from the input stream.
read_ulong() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL unsigned long from the input stream.
read_ulong() - Method in class org.omg.CORBA.portable.InputStream
Reads an unsigned CORBA long (i.e.
read_ulonglong_array(long[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of unsigned CORBA longlongs (i.e.
read_ulonglong_array(ULongLongSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL unsigned long longs from offset for length elements from the input stream.
read_ulonglong() - Method in interface org.omg.CORBA.DataInputStream
Reads an unsigned IDL long long from the input stream.
read_ulonglong() - Method in class org.omg.CORBA.portable.InputStream
Reads a CORBA unsigned longlong (i.e.
read_ushort_array(short[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of unsigned shorts from this input stream.
read_ushort_array(UShortSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL unsigned shorts from offset for length elements from the input stream.
read_ushort() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL unsigned short from the input stream.
read_ushort() - Method in class org.omg.CORBA.portable.InputStream
Reads a unsigned short value from this input stream.
read_value() - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshalls a value type from the input stream.
read_Value() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL value type from the input stream.
read_value(BoxedValueHelper) - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshalls a value type from the input stream.
read_value(Class) - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshalls a value type from the input stream.
read_value(InputStream) - Method in class org.omg.CORBA.StringValueHelper
read_value(InputStream) - Method in class org.omg.CORBA.WStringValueHelper
read_value(InputStream) - Method in interface org.omg.CORBA.portable.ValueFactory
Is called by the ORB runtime while in the process of unmarshaling a value type.
read_value(InputStream) - Method in interface org.omg.CORBA.portable.BoxedValueHelper
read_value(InputStream, TypeCode) - Method in class org.omg.CORBA.Any
Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
read_value(Serializable) - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshalls a value type from the input stream.
read_value(String) - Method in class org.omg.CORBA_2_3.portable.InputStream
unmarshalls a value type from the input stream.
read_wchar_array(char[], int, int) - Method in class org.omg.CORBA.portable.InputStream
Reads an array of wide chars from this input stream.
read_wchar_array(WCharSeqHolder, int, int) - Method in interface org.omg.CORBA.DataInputStream
Reads array of IDL wide characters from offset for length elements from the input stream.
read_wchar() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL wide character value from the input stream.
read_wchar() - Method in class org.omg.CORBA.portable.InputStream
Reads a wide char value from this input stream.
read_wstring() - Method in interface org.omg.CORBA.DataInputStream
Reads an IDL wide string from the input stream.
read_wstring() - Method in class org.omg.CORBA.portable.InputStream
Reads a wide string value from this input stream.
read() - Method in class java.io.Reader
Read a single character.
read() - Method in class java.io.FilterReader
Read a single character.
read() - Method in class java.io.InputStream
Reads the next byte of data from the input stream.
read() - Method in class java.io.FilterInputStream
Reads the next byte of data from this input stream.
read() - Method in class java.io.PipedReader
Reads the next character of data from this piped stream.
read() - Method in class java.io.PushbackReader
Read a single character.
read() - Method in class java.io.BufferedReader
Read a single character.
read() - Method in class java.io.LineNumberReader
Read a single character.
read() - Method in interface java.io.ObjectInput
Reads a byte of data.
read() - Method in class java.io.StringReader
Read a single character.
read() - Method in class java.io.ObjectInputStream
Reads a byte of data.
read() - Method in class java.io.PipedInputStream
Reads the next byte of data from this piped input stream.
read() - Method in class java.io.InputStreamReader
Read a single character.
read() - Method in class java.io.PushbackInputStream
Reads the next byte of data from this input stream.
read() - Method in class java.io.StringBufferInputStream
Deprecated. Reads the next byte of data from this input stream.
read() - Method in class java.io.BufferedInputStream
See the general contract of the read method of InputStream.
read() - Method in class java.io.ByteArrayInputStream
Reads the next byte of data from this input stream.
read() - Method in class java.io.CharArrayReader
Read a single character.
read() - Method in class java.io.RandomAccessFile
Reads a byte of data from this file.
read() - Method in class java.io.SequenceInputStream
Reads the next byte of data from this input stream.
read() - Method in class java.io.LineNumberInputStream
Deprecated. Reads the next byte of data from this input stream.
read() - Method in class java.io.FileInputStream
Reads a byte of data from this input stream.
read() - Method in class java.security.DigestInputStream
Reads a byte, and updates the message digest (if the digest function is on).
read() - Method in class java.util.zip.InflaterInputStream
Reads a byte of uncompressed data.
read() - Method in class java.util.zip.CheckedInputStream
Reads a byte.
read() - Method in class javax.sound.sampled.AudioInputStream
Reads the next byte of data from the audio input stream.
read() - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.read to update the progress monitor after the read.
read() - Method in class org.omg.CORBA.portable.InputStream
read(byte[]) - Method in class java.io.InputStream
Reads some number of bytes from the input stream and stores them into the buffer array b.
read(byte[]) - Method in class java.io.FilterInputStream
Reads up to byte.length bytes of data from this input stream into an array of bytes.
read(byte[]) - Method in interface java.io.ObjectInput
Reads into an array of bytes.
read(byte[]) - Method in class java.io.RandomAccessFile
Reads up to b.length bytes of data from this file into an array of bytes.
read(byte[]) - Method in class java.io.DataInputStream
See the general contract of the read method of DataInput.
read(byte[]) - Method in class java.io.FileInputStream
Reads up to b.length bytes of data from this input stream into an array of bytes.
read(byte[]) - Method in class javax.sound.sampled.AudioInputStream
Reads some number of bytes from the audio input stream and stores them into the buffer array b.
read(byte[]) - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.read to update the progress monitor after the read.
read(byte[], int, int) - Method in class java.io.InputStream
Reads up to len bytes of data from the input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.FilterInputStream
Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in interface java.io.ObjectInput
Reads into an array of bytes.
read(byte[], int, int) - Method in class java.io.ObjectInputStream
Reads into an array of bytes.
read(byte[], int, int) - Method in class java.io.PipedInputStream
Reads up to len bytes of data from this piped input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.PushbackInputStream
Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.StringBufferInputStream
Deprecated. Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.BufferedInputStream
Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.
read(byte[], int, int) - Method in class java.io.ByteArrayInputStream
Reads up to len bytes of data into an array of bytes from this input stream.
read(byte[], int, int) - Method in class java.io.RandomAccessFile
Reads up to len bytes of data from this file into an array of bytes.
read(byte[], int, int) - Method in class java.io.SequenceInputStream
Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.DataInputStream
See the general contract of the read method of DataInput.
read(byte[], int, int) - Method in class java.io.LineNumberInputStream
Deprecated. Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in class java.io.FileInputStream
Reads up to len bytes of data from this input stream into an array of bytes.
read(byte[], int, int) - Method in class java.security.DigestInputStream
Reads into a byte array, and updates the message digest (if the digest function is on).
read(byte[], int, int) - Method in class java.util.jar.JarInputStream
Reads from the current JAR file entry into an array of bytes.
read(byte[], int, int) - Method in class java.util.zip.InflaterInputStream
Reads uncompressed data into an array of bytes.
read(byte[], int, int) - Method in class java.util.zip.ZipInputStream
Reads from the current ZIP entry into an array of bytes.
read(byte[], int, int) - Method in class java.util.zip.CheckedInputStream
Reads into an array of bytes.
read(byte[], int, int) - Method in class java.util.zip.GZIPInputStream
Reads uncompressed data into an array of bytes.
read(byte[], int, int) - Method in class javax.sound.sampled.AudioInputStream
Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.
read(byte[], int, int) - Method in interface javax.sound.sampled.TargetDataLine
Reads audio data from the data line's input buffer.
read(byte[], int, int) - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.read to update the progress monitor after the read.
read(char[]) - Method in class java.io.Reader
Read characters into an array.
read(char[], int, int) - Method in class java.io.Reader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.FilterReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.PipedReader
Reads up to len characters of data from this piped stream into an array of characters.
read(char[], int, int) - Method in class java.io.PushbackReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.BufferedReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.LineNumberReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.StringReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.InputStreamReader
Read characters into a portion of an array.
read(char[], int, int) - Method in class java.io.CharArrayReader
Read characters into a portion of an array.
read(DataInput) - Static method in class java.rmi.server.UID
Reads the UID from the input stream.
read(DataInputStream) - Method in class javax.swing.text.html.parser.DTD
read(InputStream) - Method in class java.util.jar.Manifest
Reads the Manifest from the specified InputStream.
read(InputStream) - Static method in class org.omg.CORBA.UnionMemberHelper
read(InputStream) - Static method in class org.omg.CORBA.ServiceInformationHelper
read(InputStream) - Static method in class org.omg.CORBA.PolicyListHelper
read(InputStream) - Static method in class org.omg.CORBA.NameValuePairHelper
read(InputStream) - Static method in class org.omg.CORBA.LongSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.OctetSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.IdentifierHelper
read(InputStream) - Static method in class org.omg.CORBA.FloatSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.ServiceDetailHelper
read(InputStream) - Static method in class org.omg.CORBA.BooleanSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.VisibilityHelper
read(InputStream) - Static method in class org.omg.CORBA.ULongSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.StringValueHelper
read(InputStream) - Static method in class org.omg.CORBA.CharSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.SetOverrideTypeHelper
read(InputStream) - Static method in class org.omg.CORBA.VersionSpecHelper
read(InputStream) - Static method in class org.omg.CORBA.DefinitionKindHelper
read(InputStream) - Static method in class org.omg.CORBA.StructMemberHelper
read(InputStream) - Static method in class org.omg.CORBA.IDLTypeHelper
read(InputStream) - Static method in class org.omg.CORBA.UShortSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.WCharSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.DoubleSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.WStringValueHelper
read(InputStream) - Static method in class org.omg.CORBA.PolicyTypeHelper
read(InputStream) - Static method in class org.omg.CORBA.ULongLongSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.RepositoryIdHelper
read(InputStream) - Static method in class org.omg.CORBA.ShortSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.ObjectHelper
read(InputStream) - Static method in class org.omg.CORBA.CurrentHelper
read(InputStream) - Static method in class org.omg.CORBA.LongLongSeqHelper
read(InputStream) - Static method in class org.omg.CORBA.CompletionStatusHelper
read(InputStream) - Static method in class org.omg.CORBA.FieldNameHelper
read(InputStream) - Static method in class org.omg.CORBA.ValueBaseHelper
read(InputStream) - Static method in class org.omg.CORBA.PolicyHelper
read(InputStream) - Static method in class org.omg.CORBA.AnySeqHelper
read(InputStream) - Static method in class org.omg.CORBA.ValueMemberHelper
read(InputStream) - Static method in class org.omg.CosNaming.NameHelper
read(InputStream) - Static method in class org.omg.CosNaming.IstringHelper
read(InputStream) - Static method in class org.omg.CosNaming.BindingListHelper
read(InputStream) - Static method in class org.omg.CosNaming.BindingIteratorHelper
read(InputStream) - Static method in class org.omg.CosNaming.NameComponentHelper
read(InputStream) - Static method in class org.omg.CosNaming.BindingTypeHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextHelper
read(InputStream) - Static method in class org.omg.CosNaming.BindingHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
read(InputStream) - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
read(InputStream, Document, int) - Method in class javax.swing.text.EditorKit
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
read(InputStream, Document, int) - Method in class javax.swing.text.DefaultEditorKit
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
read(InputStream, Document, int) - Method in class javax.swing.text.rtf.RTFEditorKit
Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
read(InputStream, Object) - Method in class javax.swing.JEditorPane
This method initializes from a stream.
read(ObjectInput) - Static method in class java.rmi.server.ObjID
Constructs an object id whose contents is read from the specified input stream.
read(Reader, Document, int) - Method in class javax.swing.text.EditorKit
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
read(Reader, Document, int) - Method in class javax.swing.text.DefaultEditorKit
Inserts content from the given stream, which will be treated as plain text.
read(Reader, Document, int) - Method in class javax.swing.text.html.HTMLEditorKit
Inserts content from the given stream.
read(Reader, Document, int) - Method in class javax.swing.text.rtf.RTFEditorKit
Insert content from the given stream, which will be treated as plain text.
read(Reader, Object) - Method in class javax.swing.text.JTextComponent
Initializes from a stream.
readAny(InputStream) - Static method in class javax.rmi.CORBA.Util
Reads a java.lang.Object as a CORBA any.
readAny(InputStream) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).
readArray() - Method in interface java.sql.SQLInput
Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
readAsciiStream() - Method in interface java.sql.SQLInput
Returns the next attribute in the stream as a stream of ASCII characters.
readAttributes(ObjectInputStream, MutableAttributeSet) - Method in class javax.swing.text.StyleContext
Context-specific handling of reading in attributes
readAttributeSet(ObjectInputStream, MutableAttributeSet) - Static method in class javax.swing.text.StyleContext
Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.
readBigDecimal() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language.
readBinaryStream() - Method in interface java.sql.SQLInput
Returns the next attribute in the stream as a stream of uninterpreted bytes.
readBlob() - Method in interface java.sql.SQLInput
Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
readBoolean() - Method in class java.io.ObjectInputStream
Reads in a boolean.
readBoolean() - Method in interface java.io.DataInput
Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
readBoolean() - Method in class java.io.RandomAccessFile
Reads a boolean from this file.
readBoolean() - Method in class java.io.DataInputStream
See the general contract of the readBoolean method of DataInput.
readBoolean() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a boolean in the Java programming language.
readByte() - Method in class java.io.ObjectInputStream
Reads an 8 bit byte.
readByte() - Method in interface java.io.DataInput
Reads and returns one input byte.
readByte() - Method in class java.io.RandomAccessFile
Reads a signed eight-bit value from this file.
readByte() - Method in class java.io.DataInputStream
See the general contract of the readByte method of DataInput.
readByte() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a byte in the Java programming language.
readBytes() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as an array of bytes in the Java programming language.
readChar() - Method in class java.io.ObjectInputStream
Reads a 16 bit char.
readChar() - Method in interface java.io.DataInput
Reads an input char and returns the char value.
readChar() - Method in class java.io.RandomAccessFile
Reads a Unicode character from this file.
readChar() - Method in class java.io.DataInputStream
See the general contract of the readChar method of DataInput.
readCharacterStream() - Method in interface java.sql.SQLInput
Returns the next attribute in the stream as a stream of Unicode characters.
readChildren(ObjectInputStream) - Method in class java.beans.beancontext.BeanContextSupport
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
readClassDescriptor() - Method in class java.io.ObjectInputStream
Read a class descriptor from the serialization stream.
readClob() - Method in interface java.sql.SQLInput
Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
readDate() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a java.sql.Date object.
readDouble() - Method in class java.io.ObjectInputStream
Reads a 64 bit double.
readDouble() - Method in interface java.io.DataInput
Reads eight input bytes and returns a double value.
readDouble() - Method in class java.io.RandomAccessFile
Reads a double from this file.
readDouble() - Method in class java.io.DataInputStream
See the general contract of the readDouble method of DataInput.
readDouble() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a double in the Java programming language.
Reader - class java.io.Reader.
Abstract class for reading character streams.
Reader() - Constructor for class java.io.Reader
Create a new character-stream reader whose critical sections will synchronize on the reader itself.
Reader(Object) - Constructor for class java.io.Reader
Create a new character-stream reader whose critical sections will synchronize on the given object.
readExternal(ObjectInput) - Method in class java.awt.datatransfer.DataFlavor
restore this DataFlavor from an Serialized state
readExternal(ObjectInput) - Method in interface java.io.Externalizable
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
readFields() - Method in class java.io.ObjectInputStream
Reads the persistent fields from the stream and makes them available by name.
readFloat() - Method in class java.io.ObjectInputStream
Reads a 32 bit float.
readFloat() - Method in interface java.io.DataInput
Reads four input bytes and returns a float value.
readFloat() - Method in class java.io.RandomAccessFile
Reads a float from this file.
readFloat() - Method in class java.io.DataInputStream
See the general contract of the readFloat method of DataInput.
readFloat() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a float in the Java programming language.
readFully(byte[]) - Method in class java.io.ObjectInputStream
Reads bytes, blocking until all bytes are read.
readFully(byte[]) - Method in interface java.io.DataInput
Reads some bytes from an input stream and stores them into the buffer array b.
readFully(byte[]) - Method in class java.io.RandomAccessFile
Reads b.length bytes from this file into the byte array, starting at the current file pointer.
readFully(byte[]) - Method in class java.io.DataInputStream
See the general contract of the readFully method of DataInput.
readFully(byte[], int, int) - Method in class java.io.ObjectInputStream
Reads bytes, blocking until all bytes are read.
readFully(byte[], int, int) - Method in interface java.io.DataInput
Reads len bytes from an input stream.
readFully(byte[], int, int) - Method in class java.io.RandomAccessFile
Reads exactly len bytes from this file into the byte array, starting at the current file pointer.
readFully(byte[], int, int) - Method in class java.io.DataInputStream
See the general contract of the readFully method of DataInput.
READING - Static variable in class java.text.AttributedCharacterIterator.Attribute
Attribute key for the reading of some text.
readInt() - Method in class java.io.ObjectInputStream
Reads a 32 bit int.
readInt() - Method in interface java.io.DataInput
Reads four input bytes and returns an int value.
readInt() - Method in class java.io.RandomAccessFile
Reads a signed 32-bit integer from this file.
readInt() - Method in class java.io.DataInputStream
See the general contract of the readInt method of DataInput.
readInt() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as an int in the Java programming language.
readLine() - Method in class java.io.BufferedReader
Read a line of text.
readLine() - Method in class java.io.LineNumberReader
Read a line of text.
readLine() - Method in class java.io.ObjectInputStream
Deprecated. This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.
readLine() - Method in interface java.io.DataInput
Reads the next line of text from the input stream.
readLine() - Method in class java.io.RandomAccessFile
Reads the next line of text from this file.
readLine() - Method in class java.io.DataInputStream
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
readLock() - Method in class javax.swing.text.AbstractDocument
Acquires a lock to begin reading some state from the document.
readLong() - Method in class java.io.ObjectInputStream
Reads a 64 bit long.
readLong() - Method in interface java.io.DataInput
Reads eight input bytes and returns a long value.
readLong() - Method in class java.io.RandomAccessFile
Reads a signed 64-bit integer from this file.
readLong() - Method in class java.io.DataInputStream
See the general contract of the readLong method of DataInput.
readLong() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a long in the Java programming language.
readObject() - Method in interface java.io.ObjectInput
Read and return an object.
readObject() - Method in class java.io.ObjectInputStream
Read an object from the ObjectInputStream.
readObject() - Method in interface java.sql.SQLInput
Returns the datum at the head of the stream as an Object in the Java programming language.
readObject(Stub, ObjectInputStream) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.
readObjectOverride() - Method in class java.io.ObjectInputStream
This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.
readOnlyAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to set the editor into read-only mode.
readRef() - Method in interface java.sql.SQLInput
Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
readResolve() - Method in class java.awt.color.ICC_Profile
Resolves instances being deserialized into instances registered with CMM.
readResolve() - Method in class java.awt.font.TextAttribute
Resolves instances being deserialized to the predefined constants.
readResolve() - Method in class java.security.cert.Certificate.CertificateRep
Resolve the Certificate Object.
readResolve() - Method in class java.text.AttributedCharacterIterator.Attribute
Resolves instances being deserialized to the predefined constants.
readShort() - Method in class java.io.ObjectInputStream
Reads a 16 bit short.
readShort() - Method in interface java.io.DataInput
Reads two input bytes and returns a short value.
readShort() - Method in class java.io.RandomAccessFile
Reads a signed 16-bit number from this file.
readShort() - Method in class java.io.DataInputStream
See the general contract of the readShort method of DataInput.
readShort() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a short in the Java programming language.
readSQL(SQLInput, String) - Method in interface java.sql.SQLData
Populates this object with data read from the database.
readStreamHeader() - Method in class java.io.ObjectInputStream
The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.
readString() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a String in the Java programming language.
readTime() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a java.sql.Time object.
readTimestamp() - Method in interface java.sql.SQLInput
Reads the next attribute in the stream as a java.sql.Timestamp object.
readUnlock() - Method in class javax.swing.text.AbstractDocument
Does a read unlock.
readUnsignedByte() - Method in class java.io.ObjectInputStream
Reads an unsigned 8 bit byte.
readUnsignedByte() - Method in interface java.io.DataInput
Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
readUnsignedByte() - Method in class java.io.RandomAccessFile
Reads an unsigned eight-bit number from this file.
readUnsignedByte() - Method in class java.io.DataInputStream
See the general contract of the readUnsignedByte method of DataInput.
readUnsignedShort() - Method in class java.io.ObjectInputStream
Reads an unsigned 16 bit short.
readUnsignedShort() - Method in interface java.io.DataInput
Reads two input bytes and returns an int value in the range 0 through 65535.
readUnsignedShort() - Method in class java.io.RandomAccessFile
Reads an unsigned 16-bit number from this file.
readUnsignedShort() - Method in class java.io.DataInputStream
See the general contract of the readUnsignedShort method of DataInput.
readUTF() - Method in class java.io.ObjectInputStream
Reads a UTF format String.
readUTF() - Method in interface java.io.DataInput
Reads in a string that has been encoded using a modified UTF-8 format.
readUTF() - Method in class java.io.RandomAccessFile
Reads in a string from this file.
readUTF() - Method in class java.io.DataInputStream
See the general contract of the readUTF method of DataInput.
readUTF(DataInput) - Static method in class java.io.DataInputStream
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
readValue(InputStream, int, Class, String, RunTime) - Method in interface javax.rmi.CORBA.ValueHandler
Reads a value from the stream using Java semantics.
ready() - Method in class java.io.Reader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.FilterReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.PipedReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.PushbackReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.BufferedReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.StringReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.InputStreamReader
Tell whether this stream is ready to be read.
ready() - Method in class java.io.CharArrayReader
Tell whether this stream is ready to be read.
REAL - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.
realEditor - Variable in class javax.swing.tree.DefaultTreeCellEditor
Editor handling the editing.
realSource - Variable in class javax.swing.undo.UndoableEditSupport
reason - Variable in class org.omg.CORBA.PolicyError
The reason for the PolicyError exception being thrown.
rebind_context(NameComponent[], NamingContext) - Method in class org.omg.CosNaming._NamingContextStub
rebind_context(NameComponent[], NamingContext) - Method in interface org.omg.CosNaming.NamingContextOperations
Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
rebind(NameComponent[], Object) - Method in class org.omg.CosNaming._NamingContextStub
rebind(NameComponent[], Object) - Method in interface org.omg.CosNaming.NamingContextOperations
Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
rebind(Name, Object) - Method in class javax.naming.InitialContext
rebind(Name, Object) - Method in interface javax.naming.Context
Binds a name to an object, overwriting any existing binding.
rebind(Name, Object, Attributes) - Method in interface javax.naming.directory.DirContext
Binds a name to an object, along with associated attributes, overwriting any existing binding.
rebind(Name, Object, Attributes) - Method in class javax.naming.directory.InitialDirContext
rebind(String, Object) - Method in class javax.naming.InitialContext
rebind(String, Object) - Method in interface javax.naming.Context
Binds a name to an object, overwriting any existing binding.
rebind(String, Object, Attributes) - Method in interface javax.naming.directory.DirContext
Binds a name to an object, along with associated attributes, overwriting any existing binding.
rebind(String, Object, Attributes) - Method in class javax.naming.directory.InitialDirContext
rebind(String, Remote) - Static method in class java.rmi.Naming
Rebinds the specified name to a new remote object.
rebind(String, Remote) - Method in interface java.rmi.registry.Registry
Rebinds the specified name to a new remote object.
recalculateIfInsetsChanged() - Method in class javax.swing.plaf.basic.BasicSliderUI
recalculateIfOrientationChanged() - Method in class javax.swing.plaf.basic.BasicSliderUI
recalcWidthCache() - Method in class javax.swing.table.DefaultTableColumnModel
Recalculates the total combined width of all columns.
receive(DatagramPacket) - Method in class java.net.DatagramSocket
Receives a datagram packet from this socket.
receive(DatagramPacket) - Method in class java.net.DatagramSocketImpl
Receive the datagram packet.
receive(int) - Method in class java.io.PipedInputStream
Receives a byte of data.
Receiver - interface javax.sound.midi.Receiver.
A Receiver receives MidiEvent objects and typically does something useful in response, such as interpreting them to generate sound or raw MIDI output.
reclaim(AttributeSet) - Method in class javax.swing.text.StyleContext
Returns a set no longer needed by the MutableAttributeSet implmentation.
reclaim(AttributeSet) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Reclaims an attribute set.
reconnect(Control[]) - Method in class javax.naming.ldap.InitialLdapContext
reconnect(Control[]) - Method in interface javax.naming.ldap.LdapContext
Reconnects to the LDAP server using the supplied controls and this context's environment.
reconvert() - Method in class java.awt.im.InputContext
Asks the current input method to reconvert text from the current client component.
reconvert() - Method in interface java.awt.im.spi.InputMethod
Starts the reconversion operation.
recordDisable(Track) - Method in interface javax.sound.midi.Sequencer
Disables recording to the specified track.
recordEnable(Track, int) - Method in interface javax.sound.midi.Sequencer
Prepares the specified track for recording events received on a particular channel.
Rectangle - class java.awt.Rectangle.
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Rectangle() - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are both zero.
Rectangle(Dimension) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top left corner is (0, 0) and whose width and height are specified by the Dimension argument.
Rectangle(int, int) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are specified by the arguments of the same name.
Rectangle(int, int, int, int) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top-left corner is specified as (x, y) and whose width and height are specified by the arguments of the same name.
Rectangle(Point) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top-left corner is the specified Point, and whose width and height are both zero.
Rectangle(Point, Dimension) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle whose top-left corner is specified by the Point argument, and whose width and height are specified by the Dimension argument.
Rectangle(Rectangle) - Constructor for class java.awt.Rectangle
Constructs a new Rectangle, initialized to match the values of the specificed Rectangle.
Rectangle2D - class java.awt.geom.Rectangle2D.
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
Rectangle2D.Double - class java.awt.geom.Rectangle2D.Double.
The Double class defines a rectangle specified in double coordinates.
Rectangle2D.Double() - Constructor for class java.awt.geom.Rectangle2D.Double
Constructs a new Rectangle2D, initialized to location (0, 0) and size (0, 0).
Rectangle2D.Double(double, double, double, double) - Constructor for class java.awt.geom.Rectangle2D.Double
Constructs and initializes a Rectangle2D from the specified double coordinates.
Rectangle2D.Float - class java.awt.geom.Rectangle2D.Float.
The Float class defines a rectangle specified in float coordinates.
Rectangle2D.Float() - Constructor for class java.awt.geom.Rectangle2D.Float
Constructs a new Rectangle2D, initialized to location (0.0, 0.0) and size (0.0, 0.0).
Rectangle2D.Float(float, float, float, float) - Constructor for class java.awt.geom.Rectangle2D.Float
Constructs and initializes a Rectangle2D from the specified float coordinates.
Rectangle2D() - Constructor for class java.awt.geom.Rectangle2D
This is an abstract class that cannot be instantiated directly.
rectangleForCurrentValue() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Returns the area that is reserved for drawing the currently selected item.
RectangularShape - class java.awt.geom.RectangularShape.
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
RectangularShape() - Constructor for class java.awt.geom.RectangularShape
This is an abstract class that cannot be instantiated directly.
rects - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
red - Static variable in class java.awt.Color
The color red.
REDCOMPONENT - Static variable in class java.awt.color.ICC_ProfileRGB
To request a gamma value or TRC for the red component.
redo() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Redoes a change.
redo() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Redoes a change.
redo() - Method in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
Redoes a change.
redo() - Method in class javax.swing.undo.AbstractUndoableEdit
Throws CannotRedoException if canRedo() returns false.
redo() - Method in class javax.swing.undo.CompoundEdit
Sends redo() to all contained UndoableEdits in the order in which they were added.
redo() - Method in class javax.swing.undo.UndoManager
If this UndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it.
redo() - Method in class javax.swing.undo.StateEdit
Tells the edited object to apply the state after the edit
redo() - Method in interface javax.swing.undo.UndoableEdit
Re-apply the edit, assuming that it has been undone.
RedoName - Static variable in class javax.swing.undo.AbstractUndoableEdit
String returned by getRedoPresentationName()
redoTo(UndoableEdit) - Method in class javax.swing.undo.UndoManager
Redoes all changes from indexOfNextAdd to edit.
ref - Variable in class java.rmi.server.RemoteObject
the object's remote reference.
Ref - interface java.sql.Ref.
The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
REF - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
RefAddr - class javax.naming.RefAddr.
This class represents the address of a communications end-point.
RefAddr(String) - Constructor for class javax.naming.RefAddr
Constructs a new instance of RefAddr using its address type.
Reference - class java.lang.ref.Reference.
Abstract base class for reference objects.
Reference - class javax.naming.Reference.
This class represents a reference to an object that is found outside of the naming/directory system.
Reference(String) - Constructor for class javax.naming.Reference
Constructs a new reference for an object with class name 'className'.
Reference(String, RefAddr) - Constructor for class javax.naming.Reference
Constructs a new reference for an object with class name 'className' and an address.
Reference(String, RefAddr, String, String) - Constructor for class javax.naming.Reference
Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.
Reference(String, String, String) - Constructor for class javax.naming.Reference
Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.
Referenceable - interface javax.naming.Referenceable.
This interface is implemented by an object that can provide a Reference to itself.
ReferenceQueue - class java.lang.ref.ReferenceQueue.
Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
ReferenceQueue() - Constructor for class java.lang.ref.ReferenceQueue
Constructs a new reference-object queue.
REFERRAL - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
ReferralException - exception javax.naming.ReferralException.
This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
ReferralException() - Constructor for class javax.naming.ReferralException
Constructs a new instance of ReferralException.
ReferralException(String) - Constructor for class javax.naming.ReferralException
Constructs a new instance of ReferralException using the explanation supplied.
ReflectPermission - class java.lang.reflect.ReflectPermission.
The Permission class for reflective operations.
ReflectPermission(String) - Constructor for class java.lang.reflect.ReflectPermission
Constructs a ReflectPermission with the specified name.
ReflectPermission(String, String) - Constructor for class java.lang.reflect.ReflectPermission
Constructs a ReflectPermission with the specified name and actions.
refresh() - Method in class java.security.Policy
Refreshes/reloads the policy configuration.
refreshRow() - Method in interface java.sql.ResultSet
Refreshes the current row with its most recent value in the database.
regionMatches(boolean, int, String, int, int) - Method in class java.lang.String
Tests if two string regions are equal.
regionMatches(int, String, int, int) - Method in class java.lang.String
Tests if two string regions are equal.
register_value_factory(String, ValueFactory) - Method in class org.omg.CORBA_2_3.ORB
register(ActivationDesc) - Static method in class java.rmi.activation.Activatable
Register an object descriptor for an activatable remote object so that is can be activated on demand.
registerComponent(JComponent) - Method in class javax.swing.ToolTipManager
Register a component for tooltip management.
registerDriver(Driver) - Static method in class java.sql.DriverManager
Registers the given driver with the DriverManager.
registerEditor(Class, Class) - Static method in class java.beans.PropertyEditorManager
Register an editor class to be used to editor values of a given target class.
registerEditorKitForContentType(String, String) - Static method in class javax.swing.JEditorPane
Establishes the default bindings of type to classname.
registerEditorKitForContentType(String, String, ClassLoader) - Static method in class javax.swing.JEditorPane
Establishes the default bindings of type to classname.
registerGroup(ActivationGroupDesc) - Method in interface java.rmi.activation.ActivationSystem
Register the activation group.
registerKeyboardAction(ActionListener, KeyStroke, int) - Method in class javax.swing.JComponent
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
registerKeyboardAction(ActionListener, String, KeyStroke, int) - Method in class javax.swing.JComponent
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
registerKeyboardActions() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
registerListeners() - Method in class java.awt.dnd.DragGestureRecognizer
register this DragGestureRecognizer's Listeners with the Component subclasses must override this method
registerListeners() - Method in class java.awt.dnd.MouseDragGestureRecognizer
register this DragGestureRecognizer's Listeners with the Component
registerObject(ActivationDesc) - Method in interface java.rmi.activation.ActivationSystem
The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
registerOutParameter(int, int) - Method in interface java.sql.CallableStatement
Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
registerOutParameter(int, int, int) - Method in interface java.sql.CallableStatement
Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
registerOutParameter(int, int, String) - Method in interface java.sql.CallableStatement
Registers the designated output parameter.
registerStaticAttributeKey(Object) - Static method in class javax.swing.text.StyleContext
Registers an object as a static object that is being used as a key in attribute sets.
registerTag(HTML.Tag, HTMLDocument.HTMLReader.TagAction) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Registers a handler for the given tag.
registerTarget(Tie, Remote) - Static method in class javax.rmi.CORBA.Util
Registers a target for a tie.
registerTarget(Tie, Remote) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote).
registerValidation(ObjectInputValidation, int) - Method in class java.io.ObjectInputStream
Register an object to be validated before the graph is returned.
Registry - interface java.rmi.registry.Registry.
For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references.
REGISTRY_ID - Static variable in class java.rmi.server.ObjID
well-known id for the registry.
REGISTRY_PORT - Static variable in interface java.rmi.registry.Registry
Well known port for registry.
RegistryHandler - interface java.rmi.registry.RegistryHandler.
Deprecated. no replacement
registryImpl(int) - Method in interface java.rmi.registry.RegistryHandler
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.
registryStub(String, int) - Method in interface java.rmi.registry.RegistryHandler
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.
rehash() - Method in class java.util.Hashtable
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently.
rejectDrag() - Method in class java.awt.dnd.DropTargetContext
reject the Drag.
rejectDrag() - Method in class java.awt.dnd.DropTargetDragEvent
Reject the drag as a result of examining either the dropAction or the available DataFlavor types.
rejectDrop() - Method in class java.awt.dnd.DropTargetContext
called to signal that the drop is unacceptable.
rejectDrop() - Method in class java.awt.dnd.DropTargetDropEvent
reject the Drop.
rejectedSetBCOnce - Variable in class java.beans.beancontext.BeanContextChildSupport
A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation.
REL - Static variable in class javax.swing.text.html.HTML.Attribute
relations - Variable in class javax.accessibility.AccessibleRelationSet
Each entry in the Vector represents an AccessibleRelation.
RELATIVE - Static variable in class java.awt.GridBagConstraints
Specify that this component is the next-to-last component in its column or row (gridwidth, gridheight), or that this component be placed next to the previously added component (gridx, gridy).
relative(int) - Method in interface java.sql.ResultSet
Moves the cursor a relative number of rows, either positive or negative.
relativeCCW(double, double) - Method in class java.awt.geom.Line2D
Returns an indicator of where the specified point (PX, PY) lies with respect to this line segment.
relativeCCW(double, double, double, double, double, double) - Static method in class java.awt.geom.Line2D
Returns an indicator of where the specified point (PX, PY) lies with respect to the line segment from (X1, Y1) to (X2, Y2).
relativeCCW(Point2D) - Method in class java.awt.geom.Line2D
Returns an indicator of where the specified Point2D lies with respect to this line segment.
release(Object) - Method in class org.omg.CORBA.portable.Delegate
Releases resources associated with the object reference provided.
releaseBeanContextResources() - Method in class java.beans.beancontext.BeanContextChildSupport
This method may be overridden by subclasses to provide their own release behaviors.
releaseBeanContextResources() - Method in class java.beans.beancontext.BeanContextServicesSupport
called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext.
releaseInputStream() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
releaseOutputStream() - Method in interface java.rmi.server.RemoteCall
Deprecated. no replacement
releaseReply(Object, InputStream) - Method in class org.omg.CORBA.portable.Delegate
releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
releaseService(BeanContextChild, Object, Object) - Method in class java.beans.beancontext.BeanContextServicesSupport
release a service
releaseService(BeanContextChild, Object, Object) - Method in interface java.beans.beancontext.BeanContextServices
Releases a BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service by calling releaseService() on the underlying BeanContextServiceProvider.
releaseService(BeanContextServices, Object, Object) - Method in class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
releaseService(BeanContextServices, Object, Object) - Method in interface java.beans.beancontext.BeanContextServiceProvider
Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
releaseWritableTile(int, int) - Method in class java.awt.image.BufferedImage
Relinquishes permission to write to a tile.
releaseWritableTile(int, int) - Method in interface java.awt.image.WritableRenderedImage
Relinquishes the right to write to a tile.
reload() - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method if you've modified the TreeNodes upon which this model depends.
reload(TreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Invoke this method if you've modified the TreeNodes upon which this model depends.
REMAINDER - Static variable in class java.awt.GridBagConstraints
Specify that this component is the last component in its column or row.
remainder(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this % val).
remainingName - Variable in class javax.naming.NamingException
Contains the remaining name that has not been resolved yet.
remainingName - Variable in class javax.naming.spi.ResolveResult
Field containing the remaining name yet to be resolved.
remainingNewName - Variable in class javax.naming.CannotProceedException
Contains the remaining unresolved part of the second "name" argument to Context.rename().
remapInstrument(Instrument, Instrument) - Method in interface javax.sound.midi.Synthesizer
Remaps an instrument.
RemarshalException - exception org.omg.CORBA.portable.RemarshalException.
This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
RemarshalException() - Constructor for class org.omg.CORBA.portable.RemarshalException
Constructs a RemarshalException.
Remote - interface java.rmi.Remote.
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteCall - interface java.rmi.server.RemoteCall.
Deprecated. no replacement.
remoteEquals(RemoteRef) - Method in interface java.rmi.server.RemoteRef
Compares two remote objects for equality.
RemoteException - exception java.rmi.RemoteException.
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
RemoteException() - Constructor for class java.rmi.RemoteException
Constructs a RemoteException with no specified detail message.
RemoteException(String) - Constructor for class java.rmi.RemoteException
Constructs a RemoteException with the specified detail message.
RemoteException(String, Throwable) - Constructor for class java.rmi.RemoteException
Constructs a RemoteException with the specified detail message and nested exception.
remoteHashCode() - Method in interface java.rmi.server.RemoteRef
Returns a hashcode for a remote object.
RemoteObject - class java.rmi.server.RemoteObject.
The RemoteObject class implements the java.lang.Object behavior for remote objects.
RemoteObject() - Constructor for class java.rmi.server.RemoteObject
Creates a remote object.
RemoteObject(RemoteRef) - Constructor for class java.rmi.server.RemoteObject
Creates a remote object, initialized with the specified remote reference.
RemoteRef - interface java.rmi.server.RemoteRef.
RemoteRef represents the handle for a remote object.
RemoteServer - class java.rmi.server.RemoteServer.
The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
RemoteServer() - Constructor for class java.rmi.server.RemoteServer
Constructs a RemoteServer.
RemoteServer(RemoteRef) - Constructor for class java.rmi.server.RemoteServer
Constructs a RemoteServer with the given reference type.
RemoteStub - class java.rmi.server.RemoteStub.
The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
RemoteStub() - Constructor for class java.rmi.server.RemoteStub
Constructs a RemoteStub.
RemoteStub(RemoteRef) - Constructor for class java.rmi.server.RemoteStub
Constructs a RemoteStub, with the specified remote reference.
remoteToString() - Method in interface java.rmi.server.RemoteRef
Returns a String that represents the reference of this remote object.
REMOVE - Static variable in class javax.swing.event.DocumentEvent.EventType
Remove type.
REMOVE_ATTRIBUTE - Static variable in interface javax.naming.directory.DirContext
This constant specifies to delete the specified attribute values from the attribute.
remove() - Method in class java.beans.beancontext.BeanContextSupport.BCSIterator
remove() - Method in class java.lang.ref.ReferenceQueue
Removes the next reference object in this queue, blocking until one becomes available.
remove() - Method in interface java.util.ListIterator
Removes from the list the last element that was returned by next or previous (optional operation).
remove() - Method in interface java.util.Iterator
Removes from the underlying collection the last element returned by the iterator (optional operation).
remove(AbstractButton) - Method in class javax.swing.ButtonGroup
Removes the button from the group.
remove(AccessibleRelation) - Method in class javax.accessibility.AccessibleRelationSet
Removes a relation from the current relation set.
remove(AccessibleState) - Method in class javax.accessibility.AccessibleStateSet
Removes a state from the current state set.
remove(ActionListener, ActionListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
remove(AdjustmentListener, AdjustmentListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
remove(Class, EventListener) - Method in class javax.swing.event.EventListenerList
Removes the listener as a listener of the specified type.
remove(Component) - Method in class java.awt.Container
Removes the specified component from this container.
remove(Component) - Method in class javax.swing.JViewport
Removes the Viewports one lightweight child.
remove(Component) - Method in class javax.swing.JTabbedPane
Removes the tab which corresponds to the specified component.
remove(Component) - Method in class javax.swing.JMenu
Removes the component c from this menu.
remove(Component) - Method in class javax.swing.JWindow
Removes the specified component from this container.
remove(Component) - Method in class javax.swing.JApplet
Removes the specified component from this container.
remove(Component) - Method in class javax.swing.JInternalFrame
Removes the specified component from this container.
remove(Component) - Method in class javax.swing.JFrame
Removes the specified component from this container.
remove(Component) - Method in class javax.swing.JSplitPane
Removes the child component, component from the pane.
remove(Component) - Method in class javax.swing.JDialog
Removes the specified component from this container.
remove(ComponentListener, ComponentListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old component-listener from component-listener-l and returns the resulting multicast listener.
remove(ContainerListener, ContainerListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old container-listener from container-listener-l and returns the resulting multicast listener.
remove(EventListener) - Method in class java.awt.AWTEventMulticaster
Removes a listener from this multicaster and returns the resulting multicast listener.
remove(FocusListener, FocusListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
remove(HierarchyBoundsListener, HierarchyBoundsListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.
remove(HierarchyListener, HierarchyListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.
remove(InputMethodListener, InputMethodListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.
remove(int) - Method in class java.awt.Container
Removes the component, specified by index, from this container.
remove(int) - Method in class java.awt.Menu
Removes the menu item at the specified index from this menu.
remove(int) - Method in class java.awt.MenuBar
Removes the menu located at the specified index from this menu bar.
remove(int) - Method in class java.awt.List
Remove the item at the specified position from this scrolling list.
remove(int) - Method in class java.awt.Choice
Removes an item from the choice menu at the specified position.
remove(int) - Method in class java.util.AbstractList
Removes the element at the specified position in this list (optional operation).
remove(int) - Method in class java.util.Vector
Removes the element at the specified position in this Vector.
remove(int) - Method in class java.util.AbstractSequentialList
Removes the element at the specified position in this list.
remove(int) - Method in class java.util.LinkedList
Removes the element at the specified position in this list.
remove(int) - Method in interface java.util.List
Removes the element at the specified position in this list (optional operation).
remove(int) - Method in class java.util.ArrayList
Removes the element at the specified position in this list.
remove(int) - Method in class javax.naming.Reference
Deletes the address at index posn from the list of addresses.
remove(int) - Method in interface javax.naming.Name
Removes a component from this name.
remove(int) - Method in class javax.naming.CompoundName
Deletes a component from this compound name.
remove(int) - Method in class javax.naming.CompositeName
Deletes a component from this composite name.
remove(int) - Method in class javax.naming.directory.BasicAttribute
remove(int) - Method in interface javax.naming.directory.Attribute
Removes an attribute value from the ordered list of attribute values.
remove(int) - Method in class javax.swing.JTabbedPane
Removes the tab and component which corresponds to the specified index.
remove(int) - Method in class javax.swing.JLayeredPane
Remove the indexed component from this pane.
remove(int) - Method in class javax.swing.JMenu
Removes the menu item at the specified index from this menu.
remove(int) - Method in class javax.swing.JPopupMenu
Removes the component at the specified index from this popup menu.
remove(int) - Method in class javax.swing.JSplitPane
Removes the Component at the specified index.
remove(int) - Method in class javax.swing.DefaultListModel
Removes the element at the specified position in this list.
remove(int) - Method in class javax.swing.text.View
Removes one of the children at the given position.
remove(int) - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes the child at the specified index from this node's children and sets that node's parent to null.
remove(int) - Method in interface javax.swing.tree.MutableTreeNode
Removes the child at index from the receiver.
remove(int) - Method in class org.omg.CORBA.ContextList
Removes the String object at the given index.
remove(int) - Method in class org.omg.CORBA.ExceptionList
Removes the TypeCode object at the given index.
remove(int) - Method in class org.omg.CORBA.NVList
Removes the NamedValue object at the given index.
remove(int, int) - Method in interface javax.swing.text.Document
Removes a portion of the content of the document.
remove(int, int) - Method in class javax.swing.text.AbstractDocument
Removes some content from the document.
remove(int, int) - Method in interface javax.swing.text.AbstractDocument.Content
Removes some portion of the sequence.
remove(int, int) - Method in class javax.swing.text.StringContent
Removes part of the content.
remove(int, int) - Method in class javax.swing.text.GapContent
Removes part of the content.
remove(int, int, AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Removes content.
remove(ItemListener, ItemListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
remove(JMenuItem) - Method in class javax.swing.JMenu
Removes the specified menu item from this menu.
remove(KeyListener, KeyListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old key-listener from key-listener-l and returns the resulting multicast listener.
remove(KeyStroke) - Method in class javax.swing.InputMap
Removes the binding for key from this InputMap.
remove(KeyStroke) - Method in class javax.swing.ComponentInputMap
Removes the binding for key from this object.
remove(long) - Method in class java.lang.ref.ReferenceQueue
Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
remove(MenuComponent) - Method in class java.awt.Component
Removes the specified popup menu from the component.
remove(MenuComponent) - Method in class java.awt.Menu
Removes the specified menu item from this menu.
remove(MenuComponent) - Method in interface java.awt.MenuContainer
remove(MenuComponent) - Method in class java.awt.MenuBar
Removes the specified menu component from this menu bar.
remove(MenuComponent) - Method in class java.awt.Frame
Removes the specified menu bar from this frame.
remove(MidiEvent) - Method in class javax.sound.midi.Track
Removes the specified event from the track.
remove(MouseListener, MouseListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.
remove(MouseMotionListener, MouseMotionListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.
remove(MutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes aChild from this node's child array, giving it a null parent.
remove(MutableTreeNode) - Method in interface javax.swing.tree.MutableTreeNode
Removes node from the receiver.
remove(Object) - Method in class java.awt.RenderingHints
Removes the key and its corresponding value from this RenderingHints object.
remove(Object) - Method in class java.beans.beancontext.BeanContextSupport
Removes a child from this BeanContext.
remove(Object) - Method in class java.security.Provider
Removes the key property (and its corresponding value).
remove(Object) - Method in class java.util.Dictionary
Removes the key (and its corresponding value) from this dictionary.
remove(Object) - Method in class java.util.Hashtable
Removes the key (and its corresponding value) from this hashtable.
remove(Object) - Method in class java.util.AbstractCollection
Removes a single instance of the specified element from this collection, if it is present (optional operation).
remove(Object) - Method in class java.util.TreeSet
Removes the given element from this set if it is present.
remove(Object) - Method in class java.util.AbstractMap
Removes the mapping for this key from this map if present (optional operation).
remove(Object) - Method in class java.util.Vector
Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
remove(Object) - Method in interface java.util.Collection
Removes a single instance of the specified element from this collection, if it is present (optional operation).
remove(Object) - Method in class java.util.WeakHashMap
Removes the mapping for the given key from this map, if present.
remove(Object) - Method in class java.util.HashSet
Removes the given element from this set if it is present.
remove(Object) - Method in interface java.util.Set
Removes the specified element from this set if it is present (optional operation).
remove(Object) - Method in class java.util.LinkedList
Removes the first occurrence of the specified element in this list.
remove(Object) - Method in class java.util.TreeMap
Removes the mapping for this key from this TreeMap if present.
remove(Object) - Method in interface java.util.List
Removes the first occurrence in this list of the specified element (optional operation).
remove(Object) - Method in class java.util.HashMap
Removes the mapping for this key from this map if present.
remove(Object) - Method in interface java.util.Map
Removes the mapping for this key from this map if present (optional operation).
remove(Object) - Method in class java.util.jar.Attributes
Removes the attribute with the specified name (key) from this Map.
remove(Object) - Method in class javax.naming.directory.BasicAttribute
Removes a specified value from this attribute.
remove(Object) - Method in interface javax.naming.directory.Attribute
Removes a specified value from the attribute.
remove(Object) - Method in class javax.swing.ActionMap
Removes the binding for key from this ActionMap.
remove(Object, boolean) - Method in class java.beans.beancontext.BeanContextSupport
internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
remove(String) - Method in class java.awt.List
Removes the first occurrence of an item from the list.
remove(String) - Method in class java.awt.Choice
Remove the first occurrence of item from the Choice menu.
remove(String) - Method in interface javax.naming.directory.Attributes
Removes the attribute with the attribute id 'attrID' from the attribute set.
remove(String) - Method in class javax.naming.directory.BasicAttributes
remove(TextListener, TextListener) - Static method in class java.awt.AWTEventMulticaster
remove(WindowListener, WindowListener) - Static method in class java.awt.AWTEventMulticaster
Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
removeAccessibleSelection(int) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Removes the specified child of the object from the object's selection.
removeAccessibleSelection(int) - Method in class java.awt.List.AccessibleAWTList
Removes the specified selected item in the object from the object's selection.
removeAccessibleSelection(int) - Method in interface javax.accessibility.AccessibleSelection
Removes the specified child of the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
removeAccessibleSelection(int) - Method in class javax.swing.JMenu.AccessibleJMenu
Removes the nth item from the selection.
removeAccessibleSelection(int) - Method in class javax.swing.JComboBox.AccessibleJComboBox
Removes the specified child of the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JList.AccessibleJList
Removes the specified selected item in the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree
Removes the specified selected item in the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Removes the specified selected item in the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JTable.AccessibleJTable
Removes the specified child of the object from the object's selection.
removeAccessibleSelection(int) - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Removes the nth selected item in the object from the object's selection.
removeActionListener(ActionListener) - Method in class java.awt.MenuItem
Removes the specified action listener so it no longer receives action events from this menu item.
removeActionListener(ActionListener) - Method in class java.awt.List
Removes the specified action listener so that it no longer receives action events from this list.
removeActionListener(ActionListener) - Method in class java.awt.TextField
Removes the specified action listener so that it no longer receives action events from this text field.
removeActionListener(ActionListener) - Method in class java.awt.Button
Removes the specified action listener so that it no longer receives action events from this button.
removeActionListener(ActionListener) - Method in class javax.swing.AbstractButton
Removes an ActionListener from the button.
removeActionListener(ActionListener) - Method in class javax.swing.JTextField
Removes the specified action listener so that it no longer receives action events from this textfield.
removeActionListener(ActionListener) - Method in interface javax.swing.ButtonModel
Removes an ActionListener from the button.
removeActionListener(ActionListener) - Method in class javax.swing.JComboBox
Removes an ActionListener.
removeActionListener(ActionListener) - Method in class javax.swing.Timer
Removes an ActionListener from the Timer.
removeActionListener(ActionListener) - Method in class javax.swing.DefaultButtonModel
Removes an ActionListener from the button.
removeActionListener(ActionListener) - Method in interface javax.swing.ComboBoxEditor
Remove an ActionListener
removeActionListener(ActionListener) - Method in class javax.swing.JFileChooser
Removes an ActionListener from the button.
removeActionListener(ActionListener) - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
removeAdjustmentListener(AdjustmentListener) - Method in class java.awt.Scrollbar
Removes the specified adjustment listener so that it no longer receives instances of AdjustmentEvent from this scroll bar.
removeAdjustmentListener(AdjustmentListener) - Method in interface java.awt.Adjustable
Removes an adjustment listener.
removeAdjustmentListener(AdjustmentListener) - Method in class javax.swing.JScrollBar
Removes an AdjustmentEvent listener.
removeAll() - Method in class java.awt.Container
Removes all the components from this container.
removeAll() - Method in class java.awt.Menu
Removes all items from this menu.
removeAll() - Method in class java.awt.List
Removes all items from this list.
removeAll() - Method in class java.awt.Choice
Removes all items from the choice menu.
removeAll() - Method in class javax.swing.JTabbedPane
Removes all the tabs and their corresponding components from the tabbedpane.
removeAll() - Method in class javax.swing.JMenu
Removes all menu items from this menu.
removeAll() - Method in class javax.swing.JSplitPane
Removes all the child components from the split pane.
removeAll() - Method in class javax.swing.text.View
Removes all of the children.
removeAll(Collection) - Method in class java.beans.beancontext.BeanContextSupport
remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
removeAll(Collection) - Method in class java.util.AbstractCollection
Removes from this collection all of its elements that are contained in the specified collection (optional operation).
removeAll(Collection) - Method in class java.util.AbstractSet
Removes from this set all of its elements that are contained in the specified collection (optional operation).
removeAll(Collection) - Method in class java.util.Vector
Removes from this Vector all of its elements that are contained in the specified Collection.
removeAll(Collection) - Method in interface java.util.Collection
Removes all this collection's elements that are also contained in the specified collection (optional operation).
removeAll(Collection) - Method in interface java.util.Set
Removes from this set all of its elements that are contained in the specified collection (optional operation).
removeAll(Collection) - Method in interface java.util.List
Removes from this list all the elements that are contained in the specified collection (optional operation).
removeAllChildren() - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes all of this node's children, setting their parents to null.
removeAllElements() - Method in class java.util.Vector
Removes all components from this vector and sets its size to zero.
removeAllElements() - Method in class javax.swing.DefaultComboBoxModel
Empties the list.
removeAllElements() - Method in class javax.swing.DefaultListModel
Removes all components from this list and sets its size to zero.
removeAllHighlights() - Method in interface javax.swing.text.Highlighter
Removes all highlights this highlighter is responsible for.
removeAllHighlights() - Method in class javax.swing.text.DefaultHighlighter
Removes all highlights.
removeAllItems() - Method in class javax.swing.JComboBox
Removes all items from the item list.
removeAncestorListener(AncestorListener) - Method in class javax.swing.JComponent
Unregisters listener so that it will no longer receive AncestorEvents
removeAttribute(AttributeSet, Object) - Method in class javax.swing.text.StyleContext
Removes an attribute from the set.
removeAttribute(AttributeSet, Object) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Removes an attribute from the set.
removeAttribute(AttributeSet, Object) - Method in class javax.swing.text.html.StyleSheet
Removes an attribute from the set.
removeAttribute(Object) - Method in class javax.swing.text.SimpleAttributeSet
Removes an attribute from the list.
removeAttribute(Object) - Method in class javax.swing.text.StyleContext.NamedStyle
Removes an attribute from the set.
removeAttribute(Object) - Method in interface javax.swing.text.MutableAttributeSet
Creates a new attribute set similar to this one except that it contains no attribute with the given name.
removeAttribute(Object) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Removes an attribute from the set.
removeAttributes(AttributeSet) - Method in class javax.swing.text.SimpleAttributeSet
Removes a set of attributes from the list.
removeAttributes(AttributeSet) - Method in class javax.swing.text.StyleContext.NamedStyle
Removes a set of attributes for the element.
removeAttributes(AttributeSet) - Method in interface javax.swing.text.MutableAttributeSet
Creates a new attribute set similar to this one except that it contains no attribute with any of the given names and values.
removeAttributes(AttributeSet) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Removes a set of attributes for the element.
removeAttributes(AttributeSet, AttributeSet) - Method in class javax.swing.text.StyleContext
Removes a set of attributes for the element.
removeAttributes(AttributeSet, AttributeSet) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Removes a set of attributes for the element.
removeAttributes(AttributeSet, AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Removes a set of attributes.
removeAttributes(AttributeSet, Enumeration) - Method in class javax.swing.text.StyleContext
Removes a set of attributes for the element.
removeAttributes(AttributeSet, Enumeration) - Method in interface javax.swing.text.AbstractDocument.AttributeContext
Removes a set of attributes for the element.
removeAttributes(AttributeSet, Enumeration) - Method in class javax.swing.text.html.StyleSheet
Removes a set of attributes for the element.
removeAttributes(Enumeration) - Method in class javax.swing.text.SimpleAttributeSet
Removes a set of attributes from the list.
removeAttributes(Enumeration) - Method in class javax.swing.text.StyleContext.NamedStyle
Removes a set of attributes for the element.
removeAttributes(Enumeration) - Method in interface javax.swing.text.MutableAttributeSet
Creates a new attribute set similar to this one except that it contains no attribute with any of the given names.
removeAttributes(Enumeration) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Removes a set of attributes for the element.
removeAuxiliaryLookAndFeel(LookAndFeel) - Static method in class javax.swing.UIManager
Remove a LookAndFeel from the list of auxiliary look and feels.
removeAWTEventListener(AWTEventListener) - Method in class java.awt.Toolkit
Removes an AWTEventListener from receiving dispatched AWTEvents.
removeBeanContextMembershipListener(BeanContextMembershipListener) - Method in class java.beans.beancontext.BeanContextSupport
Removes a BeanContextMembershipListener
removeBeanContextMembershipListener(BeanContextMembershipListener) - Method in interface java.beans.beancontext.BeanContext
Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.
removeBeanContextServicesListener(BeanContextServicesListener) - Method in class java.beans.beancontext.BeanContextServicesSupport
remove a BeanContextServicesListener
removeBeanContextServicesListener(BeanContextServicesListener) - Method in interface java.beans.beancontext.BeanContextServices
Removes a BeanContextServicesListener from this BeanContext
removeBindings() - Method in interface javax.swing.text.Keymap
Removes all bindings from the keymap.
removeCaretListener(CaretListener) - Method in class javax.swing.text.JTextComponent
Removes a caret listener.
removeCellEditorListener(CellEditorListener) - Method in interface javax.swing.CellEditor
Remove a listener from the list that's notified
removeCellEditorListener(CellEditorListener) - Method in class javax.swing.AbstractCellEditor
Removes a CellEditorListener from the listener list.
removeCellEditorListener(CellEditorListener) - Method in class javax.swing.tree.DefaultTreeCellEditor
Removes the previously added CellEditorListener l.
removeCertificate(Certificate) - Method in class java.security.Identity
Deprecated. Removes a certificate from this identity.
removeChangeListener(ChangeListener) - Method in class javax.swing.DefaultSingleSelectionModel
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in class javax.swing.JViewport
Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.
removeChangeListener(ChangeListener) - Method in class javax.swing.JTabbedPane
Removes a ChangeListener from this tabbedpane.
removeChangeListener(ChangeListener) - Method in interface javax.swing.SingleSelectionModel
Removes listener as a listener to changes in the model.
removeChangeListener(ChangeListener) - Method in class javax.swing.AbstractButton
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in class javax.swing.DefaultBoundedRangeModel
Removes a ChangeListener.
removeChangeListener(ChangeListener) - Method in class javax.swing.MenuSelectionManager
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in interface javax.swing.ButtonModel
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in class javax.swing.DefaultButtonModel
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in interface javax.swing.BoundedRangeModel
Removes a ChangeListener from the model's listener list.
removeChangeListener(ChangeListener) - Method in class javax.swing.JProgressBar
Removes a ChangeListener from the button.
removeChangeListener(ChangeListener) - Method in class javax.swing.JSlider
Removes a ChangeListener from the slider.
removeChangeListener(ChangeListener) - Method in class javax.swing.colorchooser.DefaultColorSelectionModel
Removes a ChangeListener from the model.
removeChangeListener(ChangeListener) - Method in interface javax.swing.colorchooser.ColorSelectionModel
Removes listener as a listener to changes in the model.
removeChangeListener(ChangeListener) - Method in interface javax.swing.text.Style
Removes a listener that was tracking attribute changes.
removeChangeListener(ChangeListener) - Method in class javax.swing.text.StyleContext
Removes a listener that was tracking styles being added or removed.
removeChangeListener(ChangeListener) - Method in class javax.swing.text.StyleContext.NamedStyle
Removes a change listener.
removeChangeListener(ChangeListener) - Method in class javax.swing.text.DefaultCaret
Removes a listener that was tracking caret position changes.
removeChangeListener(ChangeListener) - Method in interface javax.swing.text.Caret
Removes a listener that was tracking caret position changes.
removeChoosableFileFilter(FileFilter) - Method in class javax.swing.JFileChooser
Removes a filter from the list of user choosable file filters.
removeChooserPanel(AbstractColorChooserPanel) - Method in class javax.swing.JColorChooser
Removes the Color Panel specified.
removeColumn(TableColumn) - Method in class javax.swing.JTable
Removes aColumn from this JTable's array of columns.
removeColumn(TableColumn) - Method in class javax.swing.table.DefaultTableColumnModel
Deletes the column from the tableColumns array.
removeColumn(TableColumn) - Method in interface javax.swing.table.TableColumnModel
Deletes the TableColumn column from the tableColumns array.
removeColumnModelListener(TableColumnModelListener) - Method in class javax.swing.table.DefaultTableColumnModel
Removes a listener for table column model events.
removeColumnModelListener(TableColumnModelListener) - Method in interface javax.swing.table.TableColumnModel
Removes a listener for table column model events.
removeColumnSelectionInterval(int, int) - Method in class javax.swing.JTable
Deselects the columns from index0 to index1, inclusive.
removeComponentListener(ComponentListener) - Method in class java.awt.Component
Removes the specified component listener so that it no longer receives component events from this component.
removeConsumer(ImageConsumer) - Method in class java.awt.image.FilteredImageSource
Removes an ImageConsumer from the list of consumers interested in data for this image.
removeConsumer(ImageConsumer) - Method in interface java.awt.image.ImageProducer
This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data.
removeConsumer(ImageConsumer) - Method in class java.awt.image.MemoryImageSource
Remove an ImageConsumer from the list of consumers interested in data for this image.
removeConsumer(ImageConsumer) - Method in class java.awt.image.renderable.RenderableImageProducer
Remove an ImageConsumer from the list of consumers interested in data for this image.
removeContainerListener(ContainerListener) - Method in class java.awt.Container
Removes the specified container listener so it no longer receives container events from this container.
removeControlButtons() - Method in class javax.swing.plaf.metal.MetalFileChooserUI
removeControllerEventListener(ControllerEventListener, int[]) - Method in interface javax.sound.midi.Sequencer
Removes a controller event listener's interest in one or more types of controller event.
removeDescendantSelectedPaths(TreePath, boolean) - Method in class javax.swing.JTree
Removes any paths in the selection that are descendants of path.
removeDescendantToggledPaths(Enumeration) - Method in class javax.swing.JTree
Removes any descendants of the TreePaths in toRemove that have been expanded.
removeDocumentListener(DocumentListener) - Method in interface javax.swing.text.Document
Unregisters the given observer from the notification list so it will no longer receive change updates.
removeDocumentListener(DocumentListener) - Method in class javax.swing.text.AbstractDocument
Removes a document listener.
removeDocumentListener(DocumentListener) - Method in class javax.swing.text.DefaultStyledDocument
Removes a document listener.
removeDragGestureListener(DragGestureListener) - Method in class java.awt.dnd.DragGestureRecognizer
unregister the current DragGestureListener
removeDragSourceListener(DragSourceListener) - Method in class java.awt.dnd.DragSourceContext
This method removes the specified DragSourceListener from this DragSourceContext.
removeDropTargetListener(DropTargetListener) - Method in class java.awt.dnd.DropTarget
Remove the current DropTargetListener (UNICAST SOURCE)
removeEditor() - Method in class javax.swing.JTable
Discards the editor object and frees the real estate it used for cell rendering.
removeEditor() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Removes the editor from the JComboBox.
removeElement(Object) - Method in class java.util.Vector
Removes the first (lowest-indexed) occurrence of the argument from this vector.
removeElement(Object) - Method in class javax.swing.DefaultComboBoxModel
removeElement(Object) - Method in class javax.swing.DefaultListModel
Removes the first (lowest-indexed) occurrence of the argument from this list.
removeElement(Object) - Method in interface javax.swing.MutableComboBoxModel
Removes an item from the model.
removeElementAt(int) - Method in class java.util.Vector
Deletes the component at the specified index.
removeElementAt(int) - Method in class javax.swing.DefaultComboBoxModel
removeElementAt(int) - Method in class javax.swing.DefaultListModel
Deletes the component at the specified index.
removeElementAt(int) - Method in interface javax.swing.MutableComboBoxModel
Removes an item at a specific index
removeEntries(int, int) - Method in class javax.swing.SizeSequence
Removes a contiguous group of entries from this SizeSequence.
removeEntry(Principal, AclEntry) - Method in interface java.security.acl.Acl
Removes an ACL entry from this ACL.
removeFirst() - Method in class java.util.LinkedList
Removes and returns the first element from this list.
removeFocusListener(FocusListener) - Method in class java.awt.Component
Removes the specified focus listener so that it no longer receives focus events from this component.
removeFocusListener(FocusListener) - Method in class java.awt.Component.AccessibleAWTComponent
Removes the specified focus listener so it no longer receives focus events from this component.
removeFocusListener(FocusListener) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Removes the specified focus listener so it no longer receives focus events from this component.
removeFocusListener(FocusListener) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Removes the specified focus listener so it no longer receives focus events from this component.
removeFocusListener(FocusListener) - Method in interface javax.accessibility.AccessibleComponent
Removes the specified focus listener so it no longer receives focus events from this component.
removeFocusListener(FocusListener) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
removeFocusListener(FocusListener) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
removeFocusListener(FocusListener) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
removeFocusListener(FocusListener) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
removeFromEnvironment(String) - Method in class javax.naming.InitialContext
removeFromEnvironment(String) - Method in interface javax.naming.Context
Removes an environment property from the environment of this context.
removeFromParent() - Method in class javax.swing.tree.DefaultMutableTreeNode
Removes the subtree rooted at this node from the tree, giving this node a null parent.
removeFromParent() - Method in interface javax.swing.tree.MutableTreeNode
Removes the receiver from its parent.
removeFromSource() - Method in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler
removeHierarchyBoundsListener(HierarchyBoundsListener) - Method in class java.awt.Component
Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
removeHierarchyListener(HierarchyListener) - Method in class java.awt.Component
Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
removeHighlight(Object) - Method in interface javax.swing.text.Highlighter
Removes a highlight from the view.
removeHighlight(Object) - Method in class javax.swing.text.DefaultHighlighter
Removes a highlight from the view.
removeHyperlinkListener(HyperlinkListener) - Method in class javax.swing.JEditorPane
Removes a hyperlink listener.
removeIconFor(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
Convience method to remove the desktopIcon of f is necessary.
removeIdentity(Identity) - Method in class java.security.IdentityScope
Deprecated. Removes an identity from this identity scope.
removeImage(Image) - Method in class java.awt.MediaTracker
Remove the specified image from this media tracker.
removeImage(Image, int) - Method in class java.awt.MediaTracker
Remove the specified image from the specified tracking ID of this media tracker.
removeImage(Image, int, int, int) - Method in class java.awt.MediaTracker
Remove the specified image with the specified width, height, and ID from this media tracker.
removeIndexInterval(int, int) - Method in class javax.swing.DefaultListSelectionModel
Remove the indices in the interval index0,index1 (inclusive) from the selection model.
removeIndexInterval(int, int) - Method in interface javax.swing.ListSelectionModel
Remove the indices in the interval index0,index1 (inclusive) from the selection model.
removeInputMethodListener(InputMethodListener) - Method in class java.awt.Component
Removes the specified input method listener so that it no longer receives input method events from this component.
removeInternal(EventListener, EventListener) - Static method in class java.awt.AWTEventMulticaster
Returns the resulting multicast listener after removing the old listener from listener-l.
removeInternalFrameListener(InternalFrameListener) - Method in class javax.swing.JInternalFrame
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
removeInvalidComponent(JComponent) - Method in class javax.swing.RepaintManager
Remove a component from the list of invalid components.
removeItem(Object) - Method in class javax.swing.JComboBox
Removes an item from the item list.
removeItemAt(int) - Method in class javax.swing.JComboBox
Removes the item at anIndex This method works only if the JComboBox uses the default data model.
removeItemListener(ItemListener) - Method in class java.awt.Checkbox
Removes the specified item listener so that the item listener no longer receives item events from this check box.
removeItemListener(ItemListener) - Method in class java.awt.List
Removes the specified item listener so that it no longer receives item events from this list.
removeItemListener(ItemListener) - Method in class java.awt.Choice
Removes the specified item listener so that it no longer receives item events from this Choice menu.
removeItemListener(ItemListener) - Method in interface java.awt.ItemSelectable
Removes an item listener.
removeItemListener(ItemListener) - Method in class java.awt.CheckboxMenuItem
Removes the specified item listener so that it no longer receives item events from this check box menu item.
removeItemListener(ItemListener) - Method in class javax.swing.AbstractButton
Removes an ItemListener from the button.
removeItemListener(ItemListener) - Method in interface javax.swing.ButtonModel
Removes an ItemListener from the button.
removeItemListener(ItemListener) - Method in class javax.swing.JComboBox
Removes an ItemListener.
removeItemListener(ItemListener) - Method in class javax.swing.DefaultButtonModel
Removes an ItemListener from the button.
removeKeyListener(KeyListener) - Method in class java.awt.Component
Removes the specified key listener so that it no longer receives key events from this component.
removeKeymap(String) - Static method in class javax.swing.text.JTextComponent
Removes a named keymap previously added to the document.
removeKeyStrokeBinding(KeyStroke) - Method in interface javax.swing.text.Keymap
Removes a binding from the keymap.
removeLast() - Method in class java.util.LinkedList
Removes and returns the last element from this list.
removeLayoutComponent(Component) - Method in class java.awt.CardLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class java.awt.GridLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class java.awt.BorderLayout
Removes the specified component from this border layout.
removeLayoutComponent(Component) - Method in interface java.awt.LayoutManager
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class java.awt.GridBagLayout
Removes the specified component from this layout.
removeLayoutComponent(Component) - Method in class java.awt.FlowLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class javax.swing.ViewportLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class javax.swing.ScrollPaneLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class javax.swing.BoxLayout
Not used by this class.
removeLayoutComponent(Component) - Method in class javax.swing.OverlayLayout
Removes the specified component from the layout.
removeLayoutComponent(Component) - Method in class javax.swing.JRootPane.RootLayout
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Removes the specified component from our knowledge.
removeLayoutComponent(Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
removeLineListener(LineListener) - Method in interface javax.sound.sampled.Line
Removes the specified listener from this line's list of listeners.
removeListDataListener(ListDataListener) - Method in interface javax.swing.ListModel
Remove a listener from the list that's notified each time a change to the data model occurs.
removeListDataListener(ListDataListener) - Method in class javax.swing.AbstractListModel
Remove a listener from the list that's notified each time a change to the data model occurs.
removeListeners() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
removeListSelectionListener(ListSelectionListener) - Method in class javax.swing.DefaultListSelectionModel
removeListSelectionListener(ListSelectionListener) - Method in class javax.swing.JList
Removes a listener from the list that's notified each time a change to the selection occurs.
removeListSelectionListener(ListSelectionListener) - Method in interface javax.swing.ListSelectionModel
Remove a listener from the list that's notified each time a change to the selection occurs.
removeMember(Principal) - Method in interface java.security.acl.Group
Removes the specified member from the group.
removeMenuDragMouseListener(MenuDragMouseListener) - Method in class javax.swing.JMenuItem
Removes a MenuDragMouseListener from the menu item
removeMenuKeyListener(MenuKeyListener) - Method in class javax.swing.JMenuItem
Removes a MenuKeyListener from the menu item
removeMenuListener(MenuListener) - Method in class javax.swing.JMenu
Removes a listener for menu events.
removeMetaEventListener(MetaEventListener) - Method in interface javax.sound.midi.Sequencer
Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered.
removeMouseListener(MouseListener) - Method in class java.awt.Component
Removes the specified mouse listener so that it no longer receives mouse events from this component.
removeMouseMotionListener(MouseMotionListener) - Method in class java.awt.Component
Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
removeNamingListener(NamingListener) - Method in interface javax.naming.event.EventContext
Removes a listener from receiving naming events fired by this EventContext.
removeNodeFromParent(MutableTreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Message this to remove node from its parent.
removeNotify() - Method in class java.awt.Component
Makes this Component undisplayable by destroying it native screen resource.
removeNotify() - Method in class java.awt.Container
Makes this Container undisplayable by removing its connection to its native screen resource.
removeNotify() - Method in class java.awt.MenuComponent
Removes the menu component's peer.
removeNotify() - Method in class java.awt.Menu
Removes the menu's peer.
removeNotify() - Method in class java.awt.MenuBar
Removes the menu bar's peer.
removeNotify() - Method in class java.awt.List
Removes the peer for this list.
removeNotify() - Method in class java.awt.TextComponent
Removes the TextComponent's peer.
removeNotify() - Method in class java.awt.Frame
Makes this Frame undisplayable by removing its connection to its native screen resource.
removeNotify() - Method in class java.awt.dnd.DropTargetContext
Called when disassociated with the DropTargetContextPeer.
removeNotify() - Method in interface java.awt.im.spi.InputMethod
Notifies the input method that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.
removeNotify() - Method in class javax.swing.JComponent
Notifies this component that it no longer has a parent component.
removeNotify() - Method in class javax.swing.JButton
Overrides JComponent.removeNotify to check if this button is currently set as the default button on the RootPane, and if so, sets the RootPane's default button to null to ensure the RootPane doesn't hold onto an invalid button reference.
removeNotify() - Method in class javax.swing.JTable
Calls the unconfigureEnclosingScrollPane method.
removeNotify() - Method in class javax.swing.JMenuBar
Overrides JComponent.removeNotify to unregister this menu bar with the current keyboard manager.
removeNotify() - Method in class javax.swing.JRootPane
Unregister ourselves from SystemEventQueueUtils.
removeNotify() - Method in class javax.swing.text.JTextComponent
Notifies this component that it has been removed from its container.
removeNotify() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
removeNotify(Component) - Method in class java.awt.im.InputContext
Notifies the input context that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.
removeNotify(ComponentPeer) - Method in class java.awt.dnd.DropTarget
Notify the DropTarget that it has been disassociated from a Component This method is usually called from java.awt.Component.removeNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been disassociated with that Component.
removeParameters() - Method in class java.awt.image.renderable.ParameterBlock
Clears the list of parameters.
removePermission(Permission) - Method in interface java.security.acl.AclEntry
Removes the specified permission from this ACL entry.
removePopupMenuListener(PopupMenuListener) - Method in class javax.swing.JPopupMenu
Removes a PopupMenu listener.
removePropertyChangeListener(PropertyChangeListener) - Method in class java.awt.Component
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class java.awt.Component.AccessibleAWTComponent
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in interface java.beans.PropertyEditor
Remove a listener for the PropertyChange event.
removePropertyChangeListener(PropertyChangeListener) - Method in class java.beans.PropertyChangeSupport
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in interface java.beans.Customizer
Remove a listener for the PropertyChange event.
removePropertyChangeListener(PropertyChangeListener) - Method in class java.beans.PropertyEditorSupport
Remove a listener for the PropertyChange event.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.accessibility.AccessibleContext
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JComponent
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JComponent.AccessibleJComponent
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in interface javax.swing.Action
Removes a PropertyChange listener.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.UIDefaults
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.AbstractAction
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Static method in class javax.swing.UIManager
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.event.SwingPropertyChangeSupport
Remove a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.table.TableColumn
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
removePropertyChangeListener(PropertyChangeListener) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(PropertyChangeListener) - Method in interface javax.swing.tree.TreeSelectionModel
Removes a PropertyChangeListener from the listener list.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class java.awt.Component
Remove a PropertyChangeListener for a specific property.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class java.awt.Toolkit
remove the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class java.beans.PropertyChangeSupport
Remove a PropertyChangeListener for a specific property.
removePropertyChangeListener(String, PropertyChangeListener) - Method in interface java.beans.beancontext.BeanContextChild
Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class java.beans.beancontext.BeanContextChildSupport
Remove a property change listener.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class javax.swing.JComponent
Removes a PropertyChangeListener for a specific property.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class javax.swing.event.SwingPropertyChangeSupport
Remove a PropertyChangeListener for a specific property.
removeProvider(String) - Static method in class java.security.Security
Removes the provider with the specified name.
removeRange(int, int) - Method in class java.util.AbstractList
Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.
removeRange(int, int) - Method in class java.util.Vector
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
removeRange(int, int) - Method in class java.util.ArrayList
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
removeRange(int, int) - Method in class javax.swing.DefaultListModel
Deletes the components at the specified range of indexes.
removeRedundantState() - Method in class javax.swing.undo.StateEdit
Remove redundant key/values in state hashtables.
removeRow(int) - Method in class javax.swing.table.DefaultTableModel
Removes the row at row from the model.
removeRowSelectionInterval(int, int) - Method in class javax.swing.JTable
Deselects the rows from index0 to index1, inclusive.
removeSelectionInterval(int, int) - Method in class javax.swing.DefaultListSelectionModel
removeSelectionInterval(int, int) - Method in class javax.swing.JList
Sets the selection to be the set difference of the specified interval and the current selection.
removeSelectionInterval(int, int) - Method in class javax.swing.JTree
Removes the nodes between index0 and index1, inclusive, from the selection.
removeSelectionInterval(int, int) - Method in interface javax.swing.ListSelectionModel
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.
removeSelectionPath(TreePath) - Method in class javax.swing.JTree
Removes the node identified by the specified path from the current selection.
removeSelectionPath(TreePath) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Removes path from the selection.
removeSelectionPath(TreePath) - Method in interface javax.swing.tree.TreeSelectionModel
Removes path from the selection.
removeSelectionPaths(TreePath[]) - Method in class javax.swing.JTree
Removes the nodes identified by the specified paths from the current selection.
removeSelectionPaths(TreePath[]) - Method in class javax.swing.JTree.EmptySelectionModel
A null implementation that removes nothing.
removeSelectionPaths(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Removes paths from the selection.
removeSelectionPaths(TreePath[]) - Method in interface javax.swing.tree.TreeSelectionModel
Removes paths from the selection.
removeSelectionRow(int) - Method in class javax.swing.JTree
Removes the path at the index row from the current selection.
removeSelectionRows(int[]) - Method in class javax.swing.JTree
Removes the paths that are selected at each of the specified rows.
removeShutdownHook(Thread) - Method in class java.lang.Runtime
De-registers a previously-registered virtual-machine shutdown hook.
removeSources() - Method in class java.awt.image.renderable.ParameterBlock
Clears the list of source images.
removeStyle(String) - Method in class javax.swing.JTextPane
Removes a named non-null style previously added to the document.
removeStyle(String) - Method in class javax.swing.text.StyleContext
Removes a named style previously added to the document.
removeStyle(String) - Method in interface javax.swing.text.StyledDocument
Removes a named style previously added to the document.
removeStyle(String) - Method in class javax.swing.text.DefaultStyledDocument
Removes a named style previously added to the document.
removeStyle(String) - Method in class javax.swing.text.html.StyleSheet
Removes a named style previously added to the document.
removeStyleSheet(StyleSheet) - Method in class javax.swing.text.html.StyleSheet
Removes the StyleSheet ss from those of the receiver.
removeTabAt(int) - Method in class javax.swing.JTabbedPane
Removes the tab at index.
removeTableModelListener(TableModelListener) - Method in class javax.swing.table.AbstractTableModel
Removes a listener from the list that's notified each time a change to the data model occurs.
removeTableModelListener(TableModelListener) - Method in interface javax.swing.table.TableModel
Removes a listener from the list that is notified each time a change to the data model occurs.
removeTextListener(TextListener) - Method in class java.awt.TextComponent
Removes the specified text event listener so that it no longer receives text events from this text component If l is null, no exception is thrown and no action is performed.
removeTileObserver(TileObserver) - Method in class java.awt.image.BufferedImage
Removes a tile observer.
removeTileObserver(TileObserver) - Method in interface java.awt.image.WritableRenderedImage
Removes an observer.
removeTreeExpansionListener(TreeExpansionListener) - Method in class javax.swing.JTree
Removes a listener for TreeExpansion events.
removeTreeModelListener(TreeModelListener) - Method in interface javax.swing.tree.TreeModel
Removes a listener previously added with addTreeModelListener().
removeTreeModelListener(TreeModelListener) - Method in class javax.swing.tree.DefaultTreeModel
Removes a listener previously added with addTreeModelListener().
removeTreeSelectionListener(TreeSelectionListener) - Method in class javax.swing.JTree
Removes a TreeSelection listener.
removeTreeSelectionListener(TreeSelectionListener) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
removeTreeSelectionListener(TreeSelectionListener) - Method in interface javax.swing.tree.TreeSelectionModel
Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
removeTreeWillExpandListener(TreeWillExpandListener) - Method in class javax.swing.JTree
Removes a listener for TreeWillExpand events.
removeUndoableEditListener(UndoableEditListener) - Method in interface javax.swing.text.Document
Unregisters the given observer from the notification list so it will no longer receive updates.
removeUndoableEditListener(UndoableEditListener) - Method in class javax.swing.text.AbstractDocument
Removes an undo listener.
removeUndoableEditListener(UndoableEditListener) - Method in class javax.swing.undo.UndoableEditSupport
Removes an UndoableEditListener.
removeUpdate() - Method in class javax.swing.text.DefaultStyledDocument.ElementBuffer
Updates the element structure in response to a removal from the associated sequence in the document.
removeUpdate(AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.AbstractDocument
Updates any document structure as a result of text removal.
removeUpdate(AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.PlainDocument
Updates any document structure as a result of text removal.
removeUpdate(AbstractDocument.DefaultDocumentEvent) - Method in class javax.swing.text.DefaultStyledDocument
Updates document structure as a result of text removal.
removeUpdate(DocumentEvent) - Method in interface javax.swing.event.DocumentListener
Gives notification that a portion of the document has been removed.
removeUpdate(DocumentEvent) - Method in class javax.swing.text.JTextComponent.AccessibleJTextComponent
Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.View
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.GlyphView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.FlowView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.PlainView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.FieldView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.WrappedPlainView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(DocumentEvent, Shape, ViewFactory) - Method in class javax.swing.text.ZoneView
Gives notification that something was removed from the document in a location that this view is responsible for.
removeUpdate(FlowView, DocumentEvent, Rectangle) - Method in class javax.swing.text.FlowView.FlowStrategy
Gives notification that something was removed from the document in a location that the given flow view is responsible for.
removeVetoableChangeListener(String, VetoableChangeListener) - Method in class java.beans.VetoableChangeSupport
Remove a VetoableChangeListener for a specific property.
removeVetoableChangeListener(String, VetoableChangeListener) - Method in interface java.beans.beancontext.BeanContextChild
Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
removeVetoableChangeListener(String, VetoableChangeListener) - Method in class java.beans.beancontext.BeanContextChildSupport
Removes a VetoableChangeListener.
removeVetoableChangeListener(VetoableChangeListener) - Method in class java.beans.VetoableChangeSupport
Remove a VetoableChangeListener from the listener list.
removeVetoableChangeListener(VetoableChangeListener) - Method in class javax.swing.JComponent
Removes a VetoableChangeListener from the listener list.
removeWindowListener(WindowListener) - Method in class java.awt.Window
Removes the specified window listener so that it no longer receives window events from this window.
rename(Name, Name) - Method in class javax.naming.InitialContext
rename(Name, Name) - Method in interface javax.naming.Context
Binds a new name to the object bound to an old name, and unbinds the old name.
rename(String, String) - Method in class javax.naming.InitialContext
rename(String, String) - Method in interface javax.naming.Context
Binds a new name to the object bound to an old name, and unbinds the old name.
renameTo(File) - Method in class java.io.File
Renames the file denoted by this abstract pathname.
render(Runnable) - Method in interface javax.swing.text.Document
This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.
render(Runnable) - Method in class javax.swing.text.AbstractDocument
This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.
RenderableImage - interface java.awt.image.renderable.RenderableImage.
A RenderableImage is a common interface for rendering-independent images (a notion which subsumes resolution independence).
RenderableImageOp - class java.awt.image.renderable.RenderableImageOp.
This class handles the renderable aspects of an operation with help from its associated instance of a ContextualRenderedImageFactory.
RenderableImageOp(ContextualRenderedImageFactory, ParameterBlock) - Constructor for class java.awt.image.renderable.RenderableImageOp
Constructs a RenderedImageOp given a ContextualRenderedImageFactory object, and a ParameterBlock containing RenderableImage sources and other parameters.
RenderableImageProducer - class java.awt.image.renderable.RenderableImageProducer.
An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage.
RenderableImageProducer(RenderableImage, RenderContext) - Constructor for class java.awt.image.renderable.RenderableImageProducer
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.
RenderContext - class java.awt.image.renderable.RenderContext.
A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage.
RenderContext(AffineTransform) - Constructor for class java.awt.image.renderable.RenderContext
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform, RenderingHints) - Constructor for class java.awt.image.renderable.RenderContext
Constructs a RenderContext with a given transform and rendering hints.
RenderContext(AffineTransform, Shape) - Constructor for class java.awt.image.renderable.RenderContext
Constructs a RenderContext with a given transform and area of interest.
RenderContext(AffineTransform, Shape, RenderingHints) - Constructor for class java.awt.image.renderable.RenderContext
Constructs a RenderContext with a given transform.
RenderedImage - interface java.awt.image.RenderedImage.
RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.
RenderedImageFactory - interface java.awt.image.renderable.RenderedImageFactory.
The RenderedImageFactory interface (often abbreviated RIF) is intended to be implemented by classes that wish to act as factories to produce different renderings, for example by executing a series of BufferedImageOps on a set of sources, depending on a specific set of parameters, properties, and rendering hints.
renderer - Variable in class javax.swing.JComboBox
renderer - Variable in class javax.swing.tree.DefaultTreeCellEditor
Renderer, used to get border and offsets from.
Renderer - interface javax.swing.Renderer.
Defines the requirements for an object responsible for "rendering" (displaying) a value.
rendererPane - Variable in class javax.swing.plaf.basic.BasicTableUI
rendererPane - Variable in class javax.swing.plaf.basic.BasicListUI
rendererPane - Variable in class javax.swing.plaf.basic.BasicTableHeaderUI
rendererPane - Variable in class javax.swing.plaf.basic.BasicTreeUI
Used to paint the TreeCellRenderer.
rendererPane - Variable in class javax.swing.plaf.metal.MetalComboBoxButton
RenderingHints - class java.awt.RenderingHints.
The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
RenderingHints.Key - class java.awt.RenderingHints.Key.
Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
RenderingHints.Key(int) - Constructor for class java.awt.RenderingHints.Key
Construct a key using the indicated private key.
RenderingHints(Map) - Constructor for class java.awt.RenderingHints
Constructs a new object with keys and values initialized from the specified Map object (which may be null).
RenderingHints(RenderingHints.Key, Object) - Constructor for class java.awt.RenderingHints
Constructs a new object with the specified key/value pair.
reorderingAllowed - Variable in class javax.swing.table.JTableHeader
If true, reordering of columns are allowed by the user; the default is true.
repaint() - Method in class java.awt.Component
Repaints this component.
repaint() - Method in class javax.swing.text.DefaultCaret
Cause the caret to be painted.
repaint(int, int, int, int) - Method in class java.awt.Component
Repaints the specified rectangle of this component.
repaint(long) - Method in class java.awt.Component
Repaints the component.
repaint(long, int, int, int, int) - Method in class java.awt.Component
Repaints the specified rectangle of this component within tm milliseconds.
repaint(long, int, int, int, int) - Method in class javax.swing.JComponent
Adds the specified region to the dirty region list if the component is showing.
repaint(long, int, int, int, int) - Method in class javax.swing.JViewport
Always repaint in the parents coordinate system to make sure only one paint is performed by the RepaintManager.
repaint(long, int, int, int, int) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
repaint(long, int, int, int, int) - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
repaint(long, int, int, int, int) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
repaint(Rectangle) - Method in class javax.swing.JComponent
Adds the specified region to the dirty region list if the component is showing.
repaint(Rectangle) - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
repaint(Rectangle) - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
repaint(Rectangle) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
repaintCellFocus() - Method in class javax.swing.plaf.basic.BasicListUI.FocusHandler
RepaintManager - class javax.swing.RepaintManager.
This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.
RepaintManager() - Constructor for class javax.swing.RepaintManager
Create a new RepaintManager instance.
repeatKeyAction - Variable in class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
Key code that is being generated for.
REPLACE_ATTRIBUTE - Static variable in interface javax.naming.directory.DirContext
This constant specifies to replace an attribute with specified values.
replace(char, char) - Method in class java.lang.String
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
replace(int, int, Element[]) - Method in class javax.swing.text.AbstractDocument.BranchElement
Replaces content with a new set of elements.
replace(int, int, String) - Method in class java.lang.StringBuffer
Replaces the characters in a substring of this StringBuffer with characters in the specified String.
replace(int, int, View[]) - Method in class javax.swing.text.View
Replace child views.
replace(int, int, View[]) - Method in class javax.swing.text.CompositeView
Replace child views.
replace(int, int, View[]) - Method in class javax.swing.text.BoxView
Invalidates the layout and resizes the cache of requests/allocations.
replace(int, int, View[]) - Method in class javax.swing.text.AsyncBoxView
Calls the superclass to update the child views, and updates the status records for the children.
replace(int, int, View[]) - Method in class javax.swing.text.TableView
Change the child views.
replace(int, int, View[]) - Method in class javax.swing.text.TableView.TableRow
Change the child views.
replaceEdit(UndoableEdit) - Method in class javax.swing.undo.AbstractUndoableEdit
This default implementation returns false.
replaceEdit(UndoableEdit) - Method in interface javax.swing.undo.UndoableEdit
Return true if this UndoableEdit should replace anEdit.
replaceItem(String, int) - Method in class java.awt.List
Replaces the item at the specified index in the scrolling list with the new string.
replaceObject(Object) - Method in class java.io.ObjectOutputStream
This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization.
replacePane(JComponent, JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
Adds necessary mouseHandlers to currentPane and adds it to frame.
replaceRange(String, int, int) - Method in class java.awt.TextArea
Replaces text between the indicated start and end positions with the specified replacement text.
replaceRange(String, int, int) - Method in class javax.swing.JTextArea
Replaces text from the indicated start to end position with the new text specified.
replaceSelection(String) - Method in class javax.swing.JEditorPane
Replaces the currently selected content with new content represented by the given string.
replaceSelection(String) - Method in class javax.swing.JTextPane
Replaces the currently selected content with new content represented by the given string.
replaceSelection(String) - Method in class javax.swing.text.JTextComponent
Replaces the currently selected content with new content represented by the given string.
replaceText(String, int, int) - Method in class java.awt.TextArea
Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).
replaceUIActionMap(JComponent, ActionMap) - Static method in class javax.swing.SwingUtilities
Convenience method to change the UI ActionMap for component to uiActionMap.
replaceUIInputMap(JComponent, int, InputMap) - Static method in class javax.swing.SwingUtilities
Convenience method to change the UI InputMap for component to uiInputMap.
ReplicateScaleFilter - class java.awt.image.ReplicateScaleFilter.
An ImageFilter class for scaling images using the simplest algorithm.
ReplicateScaleFilter(int, int) - Constructor for class java.awt.image.ReplicateScaleFilter
Constructs a ReplicateScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
Repository - interface org.omg.CORBA.Repository.
This is the interface which defines the interface repository.
RepositoryIdHelper - class org.omg.CORBA.RepositoryIdHelper.
org/omg/CORBA/RepositoryIdHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
RepositoryIdHelper() - Constructor for class org.omg.CORBA.RepositoryIdHelper
Request - class org.omg.CORBA.Request.
An object containing the information necessary for invoking a method.
Request() - Constructor for class org.omg.CORBA.Request
request(Object, String) - Method in class org.omg.CORBA.portable.Delegate
Creates a Request instance for use in the Dynamic Invocation Interface.
request(Object, String, boolean) - Method in class org.omg.CORBA.portable.Delegate
request is called by a stub to obtain an OutputStream for marshaling arguments.
requestDefaultFocus() - Method in class javax.swing.JComponent
Requests the focus for the component that should have the focus by default.
requestFocus() - Method in class java.awt.Component
Requests that this component get the input focus.
requestFocus() - Method in class java.awt.Component.AccessibleAWTComponent
Requests focus for this object.
requestFocus() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Requests focus for this object.
requestFocus() - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Requests focus for this object.
requestFocus() - Method in interface javax.accessibility.AccessibleComponent
Requests focus for this object.
requestFocus() - Method in class javax.swing.JComponent
Sets focus on the receiving component if isRequestFocusEnabled returns true and the component doesn't already have focus.
requestFocus() - Method in class javax.swing.JCheckBoxMenuItem
Override JComponent.requestFocus() to prevent grabbing the focus.
requestFocus() - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
requestFocus() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
requestFocus() - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
requestFocus() - Method in class javax.swing.JRadioButtonMenuItem
Overrides Component.requestFocus to not grab focus.
requestFocus() - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
requestFocus() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
requestPasswordAuthentication(InetAddress, int, String, String, String) - Static method in class java.net.Authenticator
Ask the authenticator that has been registered with the system for a password.
requestTopDownLeftRightResend(ImageConsumer) - Method in class java.awt.image.FilteredImageSource
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
requestTopDownLeftRightResend(ImageConsumer) - Method in interface java.awt.image.ImageProducer
This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.
requestTopDownLeftRightResend(ImageConsumer) - Method in class java.awt.image.MemoryImageSource
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
requestTopDownLeftRightResend(ImageConsumer) - Method in class java.awt.image.renderable.RenderableImageProducer
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
required - Variable in class java.sql.DriverPropertyInfo
The required field is true if a value must be supplied for this property during Driver.connect and false otherwise.
REQUIRED - Static variable in class java.awt.GraphicsConfigTemplate
Value used for "Enum" (Integer) type.
REQUIRED - Static variable in interface javax.swing.text.html.parser.DTDConstants
RescaleOp - class java.awt.image.RescaleOp.
This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset.
RescaleOp(float[], float[], RenderingHints) - Constructor for class java.awt.image.RescaleOp
Constructs a new RescaleOp with the desired scale factors and offsets.
RescaleOp(float, float, RenderingHints) - Constructor for class java.awt.image.RescaleOp
Constructs a new RescaleOp with the desired scale factor and offset.
rescanCurrentDirectory() - Method in class javax.swing.JFileChooser
Tells the UI to rescan its files list from the current directory.
rescanCurrentDirectory(JFileChooser) - Method in class javax.swing.plaf.FileChooserUI
rescanCurrentDirectory(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
rescanCurrentDirectory(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
rescanCurrentDirectory(JFileChooser) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call rescanCurrentDirectory on each UI handled by this MultiUI.
resendTopDownLeftRight(ImageProducer) - Method in class java.awt.image.ImageFilter
Responds to a request for a TopDownLeftRight (TDLR) ordered resend of the pixel data from an ImageConsumer.
RESERVED_ID_MAX - Static variable in class java.awt.AWTEvent
The maximum value for reserved AWT event IDs.
RESET - Static variable in class javax.swing.text.html.FormView
Deprecated. As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText
reset() - Method in class java.awt.geom.Area
Removes all of the geometry from this Area and restores it to an empty area.
reset() - Method in class java.awt.geom.GeneralPath
Resets the path to empty.
reset() - Method in class java.io.Reader
Reset the stream.
reset() - Method in class java.io.FilterReader
Reset the stream.
reset() - Method in class java.io.InputStream
Repositions this stream to the position at the time the mark method was last called on this input stream.
reset() - Method in class java.io.FilterInputStream
Repositions this stream to the position at the time the mark method was last called on this input stream.
reset() - Method in class java.io.PushbackReader
Reset the stream.
reset() - Method in class java.io.BufferedReader
Reset the stream to the most recent mark.
reset() - Method in class java.io.LineNumberReader
Reset the stream to the most recent mark.
reset() - Method in class java.io.StringReader
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked.
reset() - Method in class java.io.StringBufferInputStream
Deprecated. Resets the input stream to begin reading from the first character of this input stream's underlying buffer.
reset() - Method in class java.io.ObjectOutputStream
Reset will disregard the state of any objects already written to the stream.
reset() - Method in class java.io.BufferedInputStream
See the general contract of the reset method of InputStream.
reset() - Method in class java.io.ByteArrayInputStream
Resets the buffer to the marked position.
reset() - Method in class java.io.CharArrayReader
Reset the stream to the most recent mark, or to the beginning if it has never been marked.
reset() - Method in class java.io.CharArrayWriter
Resets the buffer so that you can use it again without throwing away the already allocated buffer.
reset() - Method in class java.io.ByteArrayOutputStream
Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the ouput stream is discarded.
reset() - Method in class java.io.LineNumberInputStream
Deprecated. Repositions this stream to the position at the time the mark method was last called on this input stream.
reset() - Method in class java.security.MessageDigest
Resets the digest for further use.
reset() - Method in class java.text.CollationElementIterator
Resets the cursor to the beginning of the string.
reset() - Method in class java.util.zip.Adler32
Resets checksum to initial value.
reset() - Method in class java.util.zip.Deflater
Resets deflater so that a new set of input data can be processed.
reset() - Method in interface java.util.zip.Checksum
Resets the checksum to its initial value.
reset() - Method in class java.util.zip.Inflater
Resets inflater so that a new set of input data can be processed.
reset() - Method in class java.util.zip.CRC32
Resets CRC-32 to initial value.
reset() - Method in class javax.sound.sampled.AudioInputStream
Repositions this audio input stream to the position it had at the time its mark method was last invoked.
reset() - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.reset to reset the progress monitor as well as the stream.
resetAllControllers() - Method in interface javax.sound.midi.MidiChannel
Resets all the implemented controllers to their default values.
resetChoosableFileFilters() - Method in class javax.swing.JFileChooser
Resets the choosable file filter list to its starting state.
resetInputValue() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Sets the input value in the option pane the receiver is providing the look and feel for based on the value in the inputComponent.
resetKeyboardActions() - Method in class javax.swing.JComponent
Unregisters all the bindings in the first tier InputMaps and ActionMap.
resetLayoutManager() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.
resetMarksAtZero() - Method in class javax.swing.text.GapContent
Resets all the marks that have an offset of 0 to have an index of zero as well.
resetRecognizer() - Method in class java.awt.dnd.DragGestureRecognizer
Reset the Recognizer, if its currently recognizing a gesture, ignore it.
resetRowSelection() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Updates this object's mapping from TreePath to rows.
resetRowSelection() - Method in interface javax.swing.tree.TreeSelectionModel
Updates this object's mapping from TreePaths to rows.
resetSizeAt(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Resets the size of the Component at the passed in location.
resetSyntax() - Method in class java.io.StreamTokenizer
Resets this tokenizer's syntax table so that all characters are "ordinary." See the ordinaryChar method for more information on a character being ordinary.
resetToPreferredSizes() - Method in class javax.swing.JSplitPane
Lays out the JSplitPane layout based on the preferred size of the children components.
resetToPreferredSizes() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Marks the receiver so that the next time this instance is layed out it'll ask for the preferred sizes.
resetToPreferredSizes(JSplitPane) - Method in class javax.swing.plaf.SplitPaneUI
Messaged to relayout the JSplitPane based on the preferred size of the children components.
resetToPreferredSizes(JSplitPane) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Messaged to reset the preferred sizes.
resetToPreferredSizes(JSplitPane) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call resetToPreferredSizes on each UI handled by this MultiUI.
resetViewPort() - Method in class javax.swing.JScrollPane.AccessibleJScrollPane
reshape(int, int, int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
reshape(int, int, int, int) - Method in class java.awt.Rectangle
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
reshape(int, int, int, int) - Method in class javax.swing.JComponent
Moves and resizes this component.
reshape(int, int, int, int) - Method in class javax.swing.JViewport
Sets the bounds of this viewport.
reshape(int, int, int, int) - Method in class javax.swing.JInternalFrame
Moves and resizes this component.
resizable - Variable in class javax.swing.JInternalFrame
The frame's size can be changed.
RESIZABLE - Static variable in class javax.accessibility.AccessibleState
Indicates the size of this object is not fixed.
RESIZE_NONE - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener
RESIZE_WEIGHT_PROPERTY - Static variable in class javax.swing.JSplitPane
Bound property for weight.
resize(Dimension) - Method in class java.applet.Applet
Requests that this applet be resized.
resize(Dimension) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
resize(int, int) - Method in class java.applet.Applet
Requests that this applet be resized.
resize(int, int) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
resize(int, int) - Method in class java.awt.Rectangle
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
resizeAndRepaint() - Method in class javax.swing.JTable
Equivalent to revalidate followed by repaint.
resizeAndRepaint() - Method in class javax.swing.table.JTableHeader
Sizes the header and marks it as needing display.
resizedPostingDisableCount - Variable in class javax.swing.table.TableColumn
Deprecated. as of Java 2 platform v1.3
resizeFrame(JComponent, int, int, int, int) - Method in interface javax.swing.DesktopManager
The user has resized the component.
resizeFrame(JComponent, int, int, int, int) - Method in class javax.swing.DefaultDesktopManager
Calls setBoundsForFrame() with the new values.
resizingAllowed - Variable in class javax.swing.table.JTableHeader
If true, resizing of columns are allowed by the user; the default is true.
resizingColumn - Variable in class javax.swing.table.JTableHeader
The index of the column being resized.
resolution - Variable in class javax.sound.midi.Sequence
The timing resolution of the sequence.
resolution - Variable in class javax.sound.midi.MidiFileFormat
The timing resolution of the MIDI file.
resolve_initial_references(String) - Method in class org.omg.CORBA.ORB
Resolves a specific object reference from the set of available initial service names.
resolve(NameComponent[]) - Method in class org.omg.CosNaming._NamingContextStub
resolve(NameComponent[]) - Method in interface org.omg.CosNaming.NamingContextOperations
The resolve operation is the process of retrieving an object bound to a name in a given context.
ResolveAttribute - Static variable in class javax.swing.text.StyleConstants
Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
ResolveAttribute - Static variable in interface javax.swing.text.AttributeSet
Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
resolveClass(Class) - Method in class java.lang.ClassLoader
Links the specified class.
resolveClass(ObjectStreamClass) - Method in class java.io.ObjectInputStream
Load the local class equivalent of the specified stream class description.
resolvedName - Variable in class javax.naming.NamingException
Contains the part of the name that has been successfully resolved.
resolvedObj - Variable in class javax.naming.NamingException
Contains the object to which resolution of the part of the name was successful.
resolvedObj - Variable in class javax.naming.spi.ResolveResult
Field containing the Object that was resolved to successfully.
resolveObject(Object) - Method in class java.io.ObjectInputStream
This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
resolveProxyClass(String[]) - Method in class java.io.ObjectInputStream
Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
Resolver - interface javax.naming.spi.Resolver.
This interface represents an "intermediate context" for name resolution.
ResolveResult - class javax.naming.spi.ResolveResult.
This class represents the result of resolution of a name.
ResolveResult() - Constructor for class javax.naming.spi.ResolveResult
Constructs an instance of ResolveResult with the resolved object and remaining name both initialized to null.
ResolveResult(Object, Name) - Constructor for class javax.naming.spi.ResolveResult
Constructs a new instance of ResolveResult consisting of the resolved Object and the remaining name.
ResolveResult(Object, String) - Constructor for class javax.naming.spi.ResolveResult
Constructs a new instance of ResolveResult consisting of the resolved object and the remaining unresolved component.
resolveToClass(Name, Class) - Method in interface javax.naming.spi.Resolver
Partially resolves a name.
resolveToClass(String, Class) - Method in interface javax.naming.spi.Resolver
Partially resolves a name.
ResourceBundle - class java.util.ResourceBundle.
Resource bundles contain locale-specific objects.
ResourceBundle() - Constructor for class java.util.ResourceBundle
Sole constructor.
responseCode - Variable in class java.net.HttpURLConnection
An int representing the three digit HTTP Status-Code.
ResponseHandler - interface org.omg.CORBA.portable.ResponseHandler.
This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
responseMessage - Variable in class java.net.HttpURLConnection
The HTTP response message.
rest_of_name - Variable in class org.omg.CosNaming.NamingContextPackage.NotFound
rest_of_name - Variable in class org.omg.CosNaming.NamingContextPackage.CannotProceed
restart() - Method in class javax.swing.Timer
Restarts a Timer, canceling any pending firings, and causing it to fire with its initial dely.
RESTORE_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
restoreAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
restoreState(Hashtable) - Method in interface javax.swing.undo.StateEditable
Upon receiving this message the receiver should extract any relevant state out of state.
restoreSubcomponentFocus() - Method in class javax.swing.JInternalFrame
This method directs the internal frame to restore focus to the last subcomponent that had focus.
result() - Method in class org.omg.CORBA.Request
Retrieves the NamedValue object containing the return value for the method.
result(Any) - Method in class org.omg.CORBA.ServerRequest
Deprecated. use the method set_result
ResultSet - interface java.sql.ResultSet.
A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
ResultSetMetaData - interface java.sql.ResultSetMetaData.
An object that can be used to get information about the types and properties of the columns in a ResultSet object.
resume() - Method in class java.lang.ThreadGroup
Deprecated. This method is used solely in conjunction with Thread.suspend and ThreadGroup.suspend, both of which have been deprecated, as they are inherently deadlock-prone. See Thread.suspend() for details.
resume() - Method in class java.lang.Thread
Deprecated. This method exists solely for use with Thread.suspend(), which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
retainAll(Collection) - Method in class java.beans.beancontext.BeanContextSupport
retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
retainAll(Collection) - Method in class java.util.AbstractCollection
Retains only the elements in this collection that are contained in the specified collection (optional operation).
retainAll(Collection) - Method in class java.util.Vector
Retains only the elements in this Vector that are contained in the specified Collection.
retainAll(Collection) - Method in interface java.util.Collection
Retains only the elements in this collection that are contained in the specified collection (optional operation).
retainAll(Collection) - Method in interface java.util.Set
Retains only the elements in this set that are contained in the specified collection (optional operation).
retainAll(Collection) - Method in interface java.util.List
Retains only the elements in this list that are contained in the specified collection (optional operation).
retryReferral() - Method in class javax.naming.ReferralException
Retries the referral currently being processed.
return_value() - Method in class org.omg.CORBA.Request
Returns the Any object that contains the value for the result of the method.
REV - Static variable in class javax.swing.text.html.HTML.Attribute
revalidate() - Method in class javax.swing.JComponent
Supports deferred automatic layout.
revalidate() - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
revalidate() - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
revalidate() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
REVERB - Static variable in class javax.sound.sampled.EnumControl.Type
Represents a control over a set of possible reverberation settings.
REVERB_RETURN - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the post-reverb gain on a line.
REVERB_SEND - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the pre-reverb gain on a line.
ReverbType - class javax.sound.sampled.ReverbType.
The ReverbType class provides methods for accessing various reverberation settings to be applied to an audio signal.
ReverbType(String, int, float, int, float, int) - Constructor for class javax.sound.sampled.ReverbType
Constructs a new reverb type that has the specified reverberation parameter values.
REVERSE_LANDSCAPE - Static variable in class java.awt.print.PageFormat
The origin is at the top right of the paper with x running top to bottom and y running right to left.
reverse() - Method in class java.lang.StringBuffer
The character sequence contained in this string buffer is replaced by the reverse of the sequence.
reverse(List) - Static method in class java.util.Collections
Reverses the order of the elements in the specified list.
reverseOrder() - Static method in class java.util.Collections
Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
revokeService(Class, BeanContextServiceProvider, boolean) - Method in class java.beans.beancontext.BeanContextServicesSupport
remove a service
revokeService(Class, BeanContextServiceProvider, boolean) - Method in interface java.beans.beancontext.BeanContextServices
BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method.
rewind() - Method in interface org.omg.CORBA.DynAny
Moves the internal pointer to the first component.
RGBImageFilter - class java.awt.image.RGBImageFilter.
This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.
RGBImageFilter() - Constructor for class java.awt.image.RGBImageFilter
RGBtoHSB(int, int, int, float[]) - Static method in class java.awt.Color
Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.
right - Variable in class java.awt.Insets
The inset from the right.
right - Variable in class javax.swing.border.EmptyBorder
RIGHT - Static variable in class java.awt.Event
The Right Arrow key, a non-ASCII action key.
RIGHT - Static variable in class java.awt.Label
Indicates that the label should be right justified.
RIGHT - Static variable in class java.awt.FlowLayout
This value indicates that each row of components should be right-justified.
RIGHT - Static variable in interface javax.swing.SwingConstants
Box-orientation constant used to specify the right side of a box.
RIGHT - Static variable in class javax.swing.JSplitPane
Used to add a Component to the right of the other Component.
RIGHT - Static variable in class javax.swing.border.TitledBorder
Position title text at the right side of the border line.
RIGHT_ALIGNMENT - Static variable in class java.awt.Component
Ease-of-use constant for getAlignmentX.
RIGHT_TO_LEFT - Static variable in class java.awt.ComponentOrientation
Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.
rightButton - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
Button for quickly toggling the right component.
rightChildIndent - Variable in class javax.swing.plaf.basic.BasicTreeUI
Distance to add to leftChildIndent to determine where cell contents will be drawn.
rightComponent - Variable in class javax.swing.JSplitPane
The right or bottom component.
RightIndent - Static variable in class javax.swing.text.StyleConstants
The amount to indent the right side of the paragraph.
RightIndent - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount to indent the right side of the paragraph.
rightKey - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
Deprecated. As of Java 2 platform v1.3.
rightKey - Variable in class javax.swing.plaf.basic.BasicToolBarUI
Deprecated. As of Java 2 platform v1.3.
rightKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
rint(double) - Static method in class java.lang.StrictMath
Returns the double value that is closest in value to a and is equal to a mathematical integer.
rint(double) - Static method in class java.lang.Math
Returns the double value that is closest in value to a and is equal to a mathematical integer.
RMIClassLoader - class java.rmi.server.RMIClassLoader.
RMIClassLoader provides static methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class can be loaded.
RMIClientSocketFactory - interface java.rmi.server.RMIClientSocketFactory.
An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
RMIFailureHandler - interface java.rmi.server.RMIFailureHandler.
An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call.
RMISecurityException - exception java.rmi.RMISecurityException.
Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
RMISecurityException(String) - Constructor for class java.rmi.RMISecurityException
Deprecated. no replacement
RMISecurityException(String, String) - Constructor for class java.rmi.RMISecurityException
Deprecated. no replacement
RMISecurityManager - class java.rmi.RMISecurityManager.
RMISecurityManager provides an example security manager for use by RMI applications that use downloaded code.
RMISecurityManager() - Constructor for class java.rmi.RMISecurityManager
Constructs a new RMISecurityManager.
RMIServerSocketFactory - interface java.rmi.server.RMIServerSocketFactory.
An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
RMISocketFactory - class java.rmi.server.RMISocketFactory.
An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
RMISocketFactory() - Constructor for class java.rmi.server.RMISocketFactory
Constructs an RMISocketFactory.
Robot - class java.awt.Robot.
This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.
Robot() - Constructor for class java.awt.Robot
Constructs a Robot object in the coordinate system of the primary screen.
Robot(GraphicsDevice) - Constructor for class java.awt.Robot
Creates a Robot for the given screen device.
roll(int, boolean) - Method in class java.util.Calendar
Time Field Rolling function.
roll(int, boolean) - Method in class java.util.GregorianCalendar
Overrides Calendar Time Field Rolling function.
roll(int, int) - Method in class java.util.Calendar
Time Field Rolling function.
roll(int, int) - Method in class java.util.GregorianCalendar
Roll a field by a signed amount.
rollback() - Method in interface java.sql.Connection
Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
ROLLOVER - Static variable in class javax.swing.DefaultButtonModel
Indicates that the mouse is over the button.
ROLLOVER_ENABLED_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's
ROLLOVER_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the cursor is over the button.
ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the cursor is over the button and it has been selected.
rolloverListener - Variable in class javax.swing.plaf.metal.MetalToolBarUI
ROMAN_BASELINE - Static variable in class java.awt.Font
The baseline used in most Roman scripts when laying out text
ROMAN_BASELINE - Static variable in class java.awt.font.GraphicAttribute
Aligns origin of graphic to roman baseline of line.
root - Variable in class javax.swing.tree.DefaultTreeModel
Root of the tree.
ROOT_PANE - Static variable in class javax.accessibility.AccessibleRole
A specialized pane that has a glass pane and a layered pane as its children.
ROOT_PANE_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
ROOT_VISIBLE_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for rootVisible.
rootException - Variable in class javax.naming.NamingException
Contains the original exception that caused this NamingException to be thrown.
rootPane - Variable in class javax.swing.JWindow
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
rootPane - Variable in class javax.swing.JApplet
rootPane - Variable in class javax.swing.JInternalFrame
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
rootPane - Variable in class javax.swing.JFrame
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
rootPane - Variable in class javax.swing.JDialog
rootPaneCheckingEnabled - Variable in class javax.swing.JWindow
If true then calls to add and setLayout will cause an exception to be thrown.
rootPaneCheckingEnabled - Variable in class javax.swing.JApplet
rootPaneCheckingEnabled - Variable in class javax.swing.JInternalFrame
If true then calls to add and setLayout cause an exception to be thrown.
rootPaneCheckingEnabled - Variable in class javax.swing.JFrame
If true then calls to add and setLayout will cause an exception to be thrown.
rootPaneCheckingEnabled - Variable in class javax.swing.JDialog
RootPaneContainer - interface javax.swing.RootPaneContainer.
This interface is implemented by components that have a single JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
RootPaneUI - class javax.swing.plaf.RootPaneUI.
Pluggable look and feel interface for JRootPane.
RootPaneUI() - Constructor for class javax.swing.plaf.RootPaneUI
rootVisible - Variable in class javax.swing.JTree
True if the root node is displayed, false if its children are the highest visible nodes.
rootVisible - Variable in class javax.swing.tree.AbstractLayoutCache
True if the root node is displayed, false if its children are the highest visible nodes.
rotate(double) - Method in class java.awt.Graphics2D
Concatenates the current Graphics2D Transform with a rotation transform.
rotate(double) - Method in class java.awt.geom.AffineTransform
Concatenates this transform with a rotation transformation.
rotate(double, double, double) - Method in class java.awt.Graphics2D
Concatenates the current Graphics2D Transform with a translated rotation transform.
rotate(double, double, double) - Method in class java.awt.geom.AffineTransform
Concatenates this transform with a transform that rotates coordinates around an anchor point.
rotateInsets(Insets, Insets, int) - Static method in class javax.swing.plaf.basic.BasicTabbedPaneUI
rotateTabRuns(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
rotateTabRuns(int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
ROUND_CEILING - Static variable in class java.math.BigDecimal
Rounding mode to round towards positive infinity.
ROUND_DOWN - Static variable in class java.math.BigDecimal
Rounding mode to round towards zero.
ROUND_FLOOR - Static variable in class java.math.BigDecimal
Rounding mode to round towards negative infinity.
ROUND_HALF_DOWN - Static variable in class java.math.BigDecimal
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
ROUND_HALF_EVEN - Static variable in class java.math.BigDecimal
Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.
ROUND_HALF_UP - Static variable in class java.math.BigDecimal
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
ROUND_UNNECESSARY - Static variable in class java.math.BigDecimal
Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.
ROUND_UP - Static variable in class java.math.BigDecimal
Rounding mode to round away from zero.
round(double) - Static method in class java.lang.StrictMath
Returns the closest long to the argument.
round(double) - Static method in class java.lang.Math
Returns the closest long to the argument.
round(float) - Static method in class java.lang.StrictMath
Returns the closest int to the argument.
round(float) - Static method in class java.lang.Math
Returns the closest int to the argument.
roundedCorners - Variable in class javax.swing.border.LineBorder
RoundRectangle2D - class java.awt.geom.RoundRectangle2D.
The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
RoundRectangle2D.Double - class java.awt.geom.RoundRectangle2D.Double.
The Double class defines a rectangle with rounded corners all specified in double coordinates.
RoundRectangle2D.Double() - Constructor for class java.awt.geom.RoundRectangle2D.Double
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.
RoundRectangle2D.Double(double, double, double, double, double, double) - Constructor for class java.awt.geom.RoundRectangle2D.Double
Constructs and initializes a RoundRectangle2D from the specified coordinates.
RoundRectangle2D.Float - class java.awt.geom.RoundRectangle2D.Float.
The Float class defines a rectangle with rounded corners all specified in float coordinates.
RoundRectangle2D.Float() - Constructor for class java.awt.geom.RoundRectangle2D.Float
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.
RoundRectangle2D.Float(float, float, float, float, float, float) - Constructor for class java.awt.geom.RoundRectangle2D.Float
Constructs and initializes a RoundRectangle2D from the specified coordinates.
RoundRectangle2D() - Constructor for class java.awt.geom.RoundRectangle2D
This is an abstract class that cannot be instantiated directly.
ROW_HEADER - Static variable in class javax.accessibility.AccessibleRole
The header for a row of data.
ROW_HEADER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the area along the left side of the viewport between the upper left corner and the lower left corner.
ROW_HEIGHT_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for rowHeight.
rowAtPoint(Point) - Method in class javax.swing.JTable
Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
rowDeleted() - Method in interface java.sql.ResultSet
Indicates whether a row has been deleted.
rowHead - Variable in class javax.swing.ScrollPaneLayout
The row header child.
rowHeader - Variable in class javax.swing.JScrollPane
The row header child.
rowHeight - Variable in class javax.swing.JTree
Height to use for each display row.
rowHeight - Variable in class javax.swing.JTable
The height in pixels of each row in the table.
rowHeight - Variable in class javax.swing.tree.AbstractLayoutCache
Height to use for each row.
rowHeights - Variable in class java.awt.GridBagLayout
This field holds the overrides to the row minimum heights.
rowInserted() - Method in interface java.sql.ResultSet
Indicates whether the current row has had an insertion.
rowMapper - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Provides a row for a given path.
RowMapper - interface javax.swing.tree.RowMapper.
Defines the requirements for an object that translates paths in the tree into display rows.
rowMargin - Variable in class javax.swing.JTable
The height in pixels of the margin between the cells in each row.
ROWS - Static variable in class javax.swing.text.html.HTML.Attribute
rowSelectionAllowed - Variable in class javax.swing.JTable
True if row selection is allowed in this table.
ROWSPAN - Static variable in class javax.swing.text.html.HTML.Attribute
rowsRemoved(TableModelEvent) - Method in class javax.swing.table.DefaultTableModel
Equivalent to fireTableChanged.
rowUpdated() - Method in interface java.sql.ResultSet
Indicates whether the current row has been updated.
rowWeights - Variable in class java.awt.GridBagLayout
This field holds the overrides to the row weights.
RSAKey - interface java.security.interfaces.RSAKey.
The interface to an RSA public or private key.
RSAKeyGenParameterSpec - class java.security.spec.RSAKeyGenParameterSpec.
This class specifies the set of parameters used to generate an RSA key pair.
RSAKeyGenParameterSpec(int, BigInteger) - Constructor for class java.security.spec.RSAKeyGenParameterSpec
Constructs a new RSAParameterSpec object from the given keysize and public-exponent value.
RSAPrivateCrtKey - interface java.security.interfaces.RSAPrivateCrtKey.
The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
RSAPrivateCrtKeySpec - class java.security.spec.RSAPrivateCrtKeySpec.
This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
RSAPrivateCrtKeySpec(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger) - Constructor for class java.security.spec.RSAPrivateCrtKeySpec
Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.
RSAPrivateKey - interface java.security.interfaces.RSAPrivateKey.
The interface to an RSA private key.
RSAPrivateKeySpec - class java.security.spec.RSAPrivateKeySpec.
This class specifies an RSA private key.
RSAPrivateKeySpec(BigInteger, BigInteger) - Constructor for class java.security.spec.RSAPrivateKeySpec
RSAPublicKey - interface java.security.interfaces.RSAPublicKey.
The interface to an RSA public key.
RSAPublicKeySpec - class java.security.spec.RSAPublicKeySpec.
This class specifies an RSA public key.
RSAPublicKeySpec(BigInteger, BigInteger) - Constructor for class java.security.spec.RSAPublicKeySpec
RTFEditorKit - class javax.swing.text.rtf.RTFEditorKit.
This is the default implementation of RTF editing functionality.
RTFEditorKit() - Constructor for class javax.swing.text.rtf.RTFEditorKit
Constructs an RTFEditorKit.
RuleBasedCollator - class java.text.RuleBasedCollator.
The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
RuleBasedCollator(String) - Constructor for class java.text.RuleBasedCollator
RuleBasedCollator constructor.
RUN_DIRECTION - Static variable in class java.awt.font.TextAttribute
Attribute key for the run direction of the line.
RUN_DIRECTION_LTR - Static variable in class java.awt.font.TextAttribute
Left-to-right run direction.
RUN_DIRECTION_RTL - Static variable in class java.awt.font.TextAttribute
Right-to-left run direction.
run() - Method in class java.awt.image.renderable.RenderableImageProducer
The runnable method for this class.
run() - Method in class java.lang.Thread
If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.
run() - Method in interface java.lang.Runnable
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
run() - Method in interface java.security.PrivilegedExceptionAction
Performs the computation.
run() - Method in interface java.security.PrivilegedAction
Performs the computation.
run() - Method in class java.util.TimerTask
The action to be performed by this timer task.
run() - Method in class javax.swing.text.AsyncBoxView.ChildState
Update the child state.
run() - Method in class org.omg.CORBA.ORB
This operation returns when the ORB has shutdown.
runCount - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
runFinalization() - Static method in class java.lang.System
Runs the finalization methods of any objects pending finalization.
runFinalization() - Method in class java.lang.Runtime
Runs the finalization methods of any objects pending finalization.
runFinalizersOnExit(boolean) - Static method in class java.lang.System
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
runFinalizersOnExit(boolean) - Static method in class java.lang.Runtime
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
runnable - Variable in class java.awt.event.InvocationEvent
The Runnable whose run() method will be called.
Runnable - interface java.lang.Runnable.
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
Runtime - class java.lang.Runtime.
Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
RunTime - interface org.omg.SendingContext.RunTime.
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT
RuntimeException - exception java.lang.RuntimeException.
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
RuntimeException() - Constructor for class java.lang.RuntimeException
Constructs a RuntimeException with no detail message.
RuntimeException(String) - Constructor for class java.lang.RuntimeException
Constructs a RuntimeException with the specified detail message.
RunTimeOperations - interface org.omg.SendingContext.RunTimeOperations.
org/omg/SendingContext/RunTimeOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT
RuntimePermission - class java.lang.RuntimePermission.
This class is for runtime permissions.
RuntimePermission(String) - Constructor for class java.lang.RuntimePermission
Creates a new RuntimePermission with the specified name.
RuntimePermission(String, String) - Constructor for class java.lang.RuntimePermission
Creates a new RuntimePermission object with the specified name.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


S-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

S

S - Static variable in class javax.swing.text.html.HTML.Tag
S_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The south-resize cursor type.
S_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.S_RESIZE_CURSOR.
sameFile(URL) - Method in class java.net.URL
Compares two URLs, excluding the "ref" fields.
sameFile(URL, URL) - Method in class java.net.URLStreamHandler
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path.
SAMP - Static variable in class javax.swing.text.html.HTML.Tag
SAMPLE_RATE - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control that changes the sample rate of audio playback.
sampleModel - Variable in class java.awt.image.Raster
The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.
SampleModel - class java.awt.image.SampleModel.
This abstract class defines an interface for extracting samples of pixels in an image.
SampleModel(int, int, int, int) - Constructor for class java.awt.image.SampleModel
Constructs a SampleModel with the specified parameters.
sampleModelTranslateX - Variable in class java.awt.image.Raster
The X translation from the coordinate space of the Raster's SampleModel to that of the Raster.
sampleModelTranslateY - Variable in class java.awt.image.Raster
The Y translation from the coordinate space of the Raster's SampleModel to that of the Raster.
sampleRate - Variable in class javax.sound.sampled.AudioFormat
The number of samples played or recorded per second, for sounds that have this format.
sampleSizeInBits - Variable in class javax.sound.sampled.AudioFormat
The number of bits in each sample of a sound that has this format.
SATURDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Saturday.
SAVE - Static variable in class java.awt.FileDialog
This constant value indicates that the purpose of the file dialog window is to locate a file to which to write.
SAVE_DIALOG - Static variable in class javax.swing.JFileChooser
Type value indicating that the JFileChooser supports a "Save" file operation.
SAVE_FILE - Static variable in class java.awt.Event
A file saving event.
save(ObjectOutputStream, String, EventListener) - Static method in class java.awt.AWTEventMulticaster
save(OutputStream, String) - Method in class java.util.Properties
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.
saveButtonMnemonic - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
saveButtonText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
saveButtonToolTipText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
saveInternal(ObjectOutputStream, String) - Method in class java.awt.AWTEventMulticaster
SC_BLOCK_DATA - Static variable in interface java.io.ObjectStreamConstants
Bit mask for ObejctStreamClass flag.
SC_EXTERNALIZABLE - Static variable in interface java.io.ObjectStreamConstants
Bit mask for ObjectStreamClass flag.
SC_SERIALIZABLE - Static variable in interface java.io.ObjectStreamConstants
Bit mask for ObjectStreamClass flag.
SC_WRITE_METHOD - Static variable in interface java.io.ObjectStreamConstants
Bit mask for ObjectStreamClass flag.
SCALE_AREA_AVERAGING - Static variable in class java.awt.Image
Use the Area Averaging image scaling algorithm.
SCALE_DEFAULT - Static variable in class java.awt.Image
Use the default image-scaling algorithm.
SCALE_FAST - Static variable in class java.awt.Image
Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.
SCALE_REPLICATE - Static variable in class java.awt.Image
Use the image scaling algorithm embodied in the ReplicateScaleFilter class.
SCALE_SMOOTH - Static variable in class java.awt.Image
Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.
scale() - Method in class java.math.BigDecimal
Returns the scale of this BigDecimal.
scale(double, double) - Method in class java.awt.Graphics2D
Concatenates the current Graphics2D Transform with a scaling transformation Subsequent rendering is resized according to the specified scaling factors relative to the previous scaling.
scale(double, double) - Method in class java.awt.geom.AffineTransform
Concatenates this transform with a scaling transformation.
scanlineStride - Variable in class java.awt.image.ComponentSampleModel
Line stride (in data array elements) of the region of image data described by this ComponentSampleModel.
schedule(TimerTask, Date) - Method in class java.util.Timer
Schedules the specified task for execution at the specified time.
schedule(TimerTask, Date, long) - Method in class java.util.Timer
Schedules the specified task for repeated fixed-delay execution, beginning at the specified time.
schedule(TimerTask, long) - Method in class java.util.Timer
Schedules the specified task for execution after the specified delay.
schedule(TimerTask, long, long) - Method in class java.util.Timer
Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay.
scheduleAtFixedRate(TimerTask, Date, long) - Method in class java.util.Timer
Schedules the specified task for repeated fixed-rate execution, beginning at the specified time.
scheduleAtFixedRate(TimerTask, long, long) - Method in class java.util.Timer
Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
scheduledExecutionTime() - Method in class java.util.TimerTask
Returns the scheduled execution time of the most recent actual execution of this task.
SchemaViolationException - exception javax.naming.directory.SchemaViolationException.
This exception is thrown when a method in some ways violates the schema.
SchemaViolationException() - Constructor for class javax.naming.directory.SchemaViolationException
Constructs a new instance of SchemaViolationException.
SchemaViolationException(String) - Constructor for class javax.naming.directory.SchemaViolationException
Constructs a new instance of SchemaViolationException using the explanation supplied.
SCRIPT - Static variable in class javax.swing.text.html.HTML.Tag
SCROLL_ABSOLUTE - Static variable in class java.awt.Event
The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion.
SCROLL_BAR - Static variable in class javax.accessibility.AccessibleRole
An object usually used to allow a user to incrementally view a large amount of data.
SCROLL_BEGIN - Static variable in class java.awt.Event
The scroll begin event.
SCROLL_DOWN - Static variable in class javax.swing.plaf.basic.BasicComboPopup
SCROLL_END - Static variable in class java.awt.Event
The scroll end event.
SCROLL_LINE_DOWN - Static variable in class java.awt.Event
The user has activated the line down area of a scroll bar.
SCROLL_LINE_UP - Static variable in class java.awt.Event
The user has activated the line up area of a scroll bar.
SCROLL_LOCK - Static variable in class java.awt.Event
The Scroll Lock key, a non-ASCII action key.
SCROLL_PAGE_DOWN - Static variable in class java.awt.Event
The user has activated the page down area of a scroll bar.
SCROLL_PAGE_UP - Static variable in class java.awt.Event
The user has activated the page up area of a scroll bar.
SCROLL_PANE - Static variable in class javax.accessibility.AccessibleRole
An object that allows a user to incrementally view a large amount of information.
SCROLL_UP - Static variable in class javax.swing.plaf.basic.BasicComboPopup
Scrollable - interface javax.swing.Scrollable.
An interface that provides information to a scrolling container like JScrollPane.
scrollbar - Static variable in class java.awt.SystemColor
The background color for scrollbars.
scrollbar - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
scrollBar - Variable in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
ScrollBar that is being adjusted.
Scrollbar - class java.awt.Scrollbar.
The Scrollbar class embodies a scroll bar, a familiar user-interface object.
SCROLLBAR - Static variable in class java.awt.SystemColor
The array index for the scrollbar background color.
Scrollbar.AccessibleAWTScrollBar - class java.awt.Scrollbar.AccessibleAWTScrollBar.
This class implements accessibility support for the Scrollbar class.
Scrollbar.AccessibleAWTScrollBar(Scrollbar) - Constructor for class java.awt.Scrollbar.AccessibleAWTScrollBar
Scrollbar() - Constructor for class java.awt.Scrollbar
Constructs a new vertical scroll bar.
Scrollbar(int) - Constructor for class java.awt.Scrollbar
Constructs a new scroll bar with the specified orientation.
Scrollbar(int, int, int, int, int) - Constructor for class java.awt.Scrollbar
Constructs a new scroll bar with the specified orientation, initial value, page size, and minimum and maximum values.
SCROLLBARS_ALWAYS - Static variable in class java.awt.ScrollPane
Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.
SCROLLBARS_AS_NEEDED - Static variable in class java.awt.ScrollPane
Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension.
SCROLLBARS_BOTH - Static variable in class java.awt.TextArea
Create and display both vertical and horizontal scrollbars.
SCROLLBARS_HORIZONTAL_ONLY - Static variable in class java.awt.TextArea
Create and display horizontal scrollbar only.
SCROLLBARS_NEVER - Static variable in class java.awt.ScrollPane
Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child.
SCROLLBARS_NONE - Static variable in class java.awt.TextArea
Do not create or display any scrollbars for the text area.
SCROLLBARS_VERTICAL_ONLY - Static variable in class java.awt.TextArea
Create and display vertical scrollbar only.
ScrollBarUI - class javax.swing.plaf.ScrollBarUI.
Pluggable look and feel interface for JScrollBar.
ScrollBarUI() - Constructor for class javax.swing.plaf.ScrollBarUI
scrollBarWidth - Variable in class javax.swing.plaf.metal.MetalScrollBarUI
scrollByBlock(int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
scrollByBlock(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
scrollByUnit(int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
scrollByUnit(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
scrollDirection - Variable in class javax.swing.plaf.basic.BasicComboPopup
scrollDueToClickInTrack(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
This function is called when a mousePressed was detected in the track, not in the thumb.
scrollDueToClickInTrack(int) - Method in class javax.swing.plaf.metal.MetalSliderUI
scroller - Variable in class javax.swing.plaf.basic.BasicComboPopup
SCROLLING - Static variable in class javax.swing.text.html.HTML.Attribute
scrollListener - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
scrollListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
scrollpane - Variable in class javax.swing.plaf.basic.BasicScrollPaneUI
ScrollPane - class java.awt.ScrollPane.
A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
ScrollPane.AccessibleAWTScrollPane - class java.awt.ScrollPane.AccessibleAWTScrollPane.
This class implements accessibility support for the ScrollPane class.
ScrollPane.AccessibleAWTScrollPane(ScrollPane) - Constructor for class java.awt.ScrollPane.AccessibleAWTScrollPane
ScrollPane() - Constructor for class java.awt.ScrollPane
Create a new scrollpane container with a scrollbar display policy of "as needed".
ScrollPane(int) - Constructor for class java.awt.ScrollPane
Create a new scrollpane container.
ScrollPaneConstants - interface javax.swing.ScrollPaneConstants.
Constants used with the JScrollPane component.
ScrollPaneLayout - class javax.swing.ScrollPaneLayout.
The layout manager used by JScrollPane.
ScrollPaneLayout.UIResource - class javax.swing.ScrollPaneLayout.UIResource.
The UI resource version of ScrollPaneLayout.
ScrollPaneLayout.UIResource() - Constructor for class javax.swing.ScrollPaneLayout.UIResource
ScrollPaneLayout() - Constructor for class javax.swing.ScrollPaneLayout
ScrollPaneUI - class javax.swing.plaf.ScrollPaneUI.
Pluggable look and feel interface for JScrollPane.
ScrollPaneUI() - Constructor for class javax.swing.plaf.ScrollPaneUI
scrollPathToVisible(TreePath) - Method in class javax.swing.JTree
Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.
scrollRectToVisible(Rectangle) - Method in class javax.swing.JComponent
Forwards the scrollRectToVisible() message to the JComponent's parent.
scrollRectToVisible(Rectangle) - Method in class javax.swing.JViewport
Overridden to scroll the view so that Rectangle within the view becomes visible.
scrollRectToVisible(Rectangle) - Method in class javax.swing.JTextField
Scrolls the field left or right.
scrollRowToVisible(int) - Method in class javax.swing.JTree
Scrolls the item identified by row until it is displayed.
SCROLLS_ON_EXPAND_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for scrollsOnExpand.
scrollsOnExpand - Variable in class javax.swing.JTree
If true, when a node is expanded, as many of the descendants are scrolled to be visible.
scrollTimer - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
scrollTimer - Variable in class javax.swing.plaf.basic.BasicSliderUI
scrollToReference(String) - Method in class javax.swing.JEditorPane
Scrolls the view to the given reference location (that is, the value returned by the UL.getRef method for the URL being displayed).
scrollUnderway - Variable in class javax.swing.JViewport
The scrollUnderway flag is used for components like JList.
SDATA - Static variable in interface javax.swing.text.html.parser.DTDConstants
SE_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The south-east-resize cursor type.
SE_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.SE_RESIZE_CURSOR.
SEALED - Static variable in class java.util.jar.Attributes.Name
Name object for Sealed manifest attribute used for sealing.
search(Name, Attributes) - Method in interface javax.naming.directory.DirContext
Searches in a single context for objects that contain a specified set of attributes.
search(Name, Attributes) - Method in class javax.naming.directory.InitialDirContext
search(Name, Attributes, String[]) - Method in interface javax.naming.directory.DirContext
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
search(Name, Attributes, String[]) - Method in class javax.naming.directory.InitialDirContext
search(Name, String, Object[], SearchControls) - Method in interface javax.naming.directory.DirContext
Searches in the named context or object for entries that satisfy the given search filter.
search(Name, String, Object[], SearchControls) - Method in class javax.naming.directory.InitialDirContext
search(Name, String, SearchControls) - Method in interface javax.naming.directory.DirContext
Searches in the named context or object for entries that satisfy the given search filter.
search(Name, String, SearchControls) - Method in class javax.naming.directory.InitialDirContext
search(Object) - Method in class java.util.Stack
Returns the 1-based position where an object is on this stack.
search(String, Attributes) - Method in interface javax.naming.directory.DirContext
Searches in a single context for objects that contain a specified set of attributes.
search(String, Attributes) - Method in class javax.naming.directory.InitialDirContext
search(String, Attributes, String[]) - Method in interface javax.naming.directory.DirContext
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
search(String, Attributes, String[]) - Method in class javax.naming.directory.InitialDirContext
search(String, String, Object[], SearchControls) - Method in interface javax.naming.directory.DirContext
Searches in the named context or object for entries that satisfy the given search filter.
search(String, String, Object[], SearchControls) - Method in class javax.naming.directory.InitialDirContext
search(String, String, SearchControls) - Method in interface javax.naming.directory.DirContext
Searches in the named context or object for entries that satisfy the given search filter.
search(String, String, SearchControls) - Method in class javax.naming.directory.InitialDirContext
SearchControls - class javax.naming.directory.SearchControls.
This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
SearchControls() - Constructor for class javax.naming.directory.SearchControls
Constructs a search constraints using defaults.
SearchControls(int, long, int, String[], boolean, boolean) - Constructor for class javax.naming.directory.SearchControls
Constructs a search constraints using arguments.
SearchResult - class javax.naming.directory.SearchResult.
This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.
SearchResult(String, Object, Attributes) - Constructor for class javax.naming.directory.SearchResult
Constructs a search result using the result's name, its bound object, and its attributes.
SearchResult(String, Object, Attributes, boolean) - Constructor for class javax.naming.directory.SearchResult
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
SearchResult(String, String, Object, Attributes) - Constructor for class javax.naming.directory.SearchResult
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
SearchResult(String, String, Object, Attributes, boolean) - Constructor for class javax.naming.directory.SearchResult
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
SECOND - Static variable in class java.util.Calendar
Field number for get and set indicating the second within the minute.
SECOND_FIELD - Static variable in class java.text.DateFormat
Useful constant for SECOND field alignment.
SECONDARY - Static variable in class java.text.Collator
Collator strength value.
secondaryOrder(int) - Static method in class java.text.CollationElementIterator
Return the secondary component of a collation element.
SectionElementName - Static variable in class javax.swing.text.AbstractDocument
Name of elements used to hold sections (lines/paragraphs).
SecureClassLoader - class java.security.SecureClassLoader.
This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
SecureClassLoader() - Constructor for class java.security.SecureClassLoader
Creates a new SecureClassLoader using the default parent class loader for delegation.
SecureClassLoader(ClassLoader) - Constructor for class java.security.SecureClassLoader
Creates a new SecureClassLoader using the specified parent class loader for delegation.
SecureRandom - class java.security.SecureRandom.
This class provides a cryptographically strong pseudo-random number generator (PRNG).
SecureRandom() - Constructor for class java.security.SecureRandom
By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation.
SecureRandom(byte[]) - Constructor for class java.security.SecureRandom
By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation.
SecureRandom(SecureRandomSpi, Provider) - Constructor for class java.security.SecureRandom
Creates a SecureRandom object.
SecureRandomSpi - class java.security.SecureRandomSpi.
This class defines the Service Provider Interface (SPI) for the SecureRandom class.
SecureRandomSpi() - Constructor for class java.security.SecureRandomSpi
Security - class java.security.Security.
This class centralizes all security properties and common security methods.
SECURITY_AUTHENTICATION - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the security level to use.
SECURITY_CREDENTIALS - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service.
SECURITY_PRINCIPAL - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service.
SECURITY_PROTOCOL - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the security protocol to use.
SecurityException - exception java.lang.SecurityException.
Thrown by the security manager to indicate a security violation.
SecurityException() - Constructor for class java.lang.SecurityException
Constructs a SecurityException with no detail message.
SecurityException(String) - Constructor for class java.lang.SecurityException
Constructs a SecurityException with the specified detail message.
SecurityManager - class java.lang.SecurityManager.
The security manager is a class that allows applications to implement a security policy.
SecurityManager() - Constructor for class java.lang.SecurityManager
Constructs a new SecurityManager.
SecurityPermission - class java.security.SecurityPermission.
This class is for security permissions.
SecurityPermission(String) - Constructor for class java.security.SecurityPermission
Creates a new SecurityPermission with the specified name.
SecurityPermission(String, String) - Constructor for class java.security.SecurityPermission
Creates a new SecurityPermission object with the specified name.
seek(int) - Method in interface org.omg.CORBA.DynAny
Moves the internal pointer to the given index.
seek(long) - Method in class java.io.RandomAccessFile
Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs.
SEG_CLOSE - Static variable in interface java.awt.geom.PathIterator
The segment type constant that specifies that the preceding subpath should be closed by appending a line segment back to the point corresponding to the most recent SEG_MOVETO.
SEG_CUBICTO - Static variable in interface java.awt.geom.PathIterator
The segment type constant for the set of 3 points that specify a cubic parametric curve to be drawn from the most recently specified point.
SEG_LINETO - Static variable in interface java.awt.geom.PathIterator
The segment type constant for a point that specifies the end point of a line to be drawn from the most recently specified point.
SEG_MOVETO - Static variable in interface java.awt.geom.PathIterator
The segment type constant for a point that specifies the starting location for a new subpath.
SEG_QUADTO - Static variable in interface java.awt.geom.PathIterator
The segment type constant for the pair of points that specify a quadratic parametric curve to be drawn from the most recently specified point.
Segment - class javax.swing.text.Segment.
A segment of a character array representing a fragment of text.
Segment() - Constructor for class javax.swing.text.Segment
Creates a new segment.
Segment(char[], int, int) - Constructor for class javax.swing.text.Segment
Creates a new segment referring to an existing array.
SELECT - Static variable in class javax.swing.text.html.HTML.Tag
select(int) - Method in class java.awt.List
Selects the item at the specified index in the scrolling list.
select(int) - Method in class java.awt.Choice
Sets the selected item in this Choice menu to be the item at the specified position.
select(int, int) - Method in class java.awt.TextComponent
Selects the text between the specified start and end positions.
select(int, int) - Method in class javax.swing.text.JTextComponent
Selects the text found between the specified start and end locations.
select(String) - Method in class java.awt.Choice
Sets the selected item in this Choice menu to be the item whose name is equal to the specified string.
SELECTABLE - Static variable in class javax.accessibility.AccessibleState
Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that can be selected.
selectAdjacentRunTab(int, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
selectAll() - Method in class java.awt.TextComponent
Selects all the text in this text component.
selectAll() - Method in interface javax.swing.ComboBoxEditor
Ask the editor to start editing and to select everything
selectAll() - Method in class javax.swing.JTable
Selects all rows, columns, and cells in the table.
selectAll() - Method in class javax.swing.text.JTextComponent
Selects all the text in the TextComponent.
selectAll() - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
selectAllAccessibleSelection() - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Causes every child of the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class java.awt.List.AccessibleAWTList
Causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in interface javax.accessibility.AccessibleSelection
Causes every child of the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane
selectAllAccessibleSelection() - Method in class javax.swing.JMenu.AccessibleJMenu
Normally causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JComboBox.AccessibleJComboBox
Causes every child of the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JList.AccessibleJList
Causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree
Causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAccessibleSelection() - Method in class javax.swing.JTable.AccessibleJTable
Causes every child of the object to be selected, but only if the JTable supports multiple selections, and if individual cell selection is enabled.
selectAllAccessibleSelection() - Method in class javax.swing.JMenuBar.AccessibleJMenuBar
Normally causes every selected item in the object to be selected if the object supports multiple selections.
selectAllAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for selecting the entire document
selectBestTextFlavor(DataFlavor[]) - Static method in class java.awt.datatransfer.DataFlavor
selectColor - Variable in class javax.swing.plaf.metal.MetalToggleButtonUI
selectColor - Variable in class javax.swing.plaf.metal.MetalTabbedPaneUI
selectColor - Variable in class javax.swing.plaf.metal.MetalRadioButtonUI
selectColor - Variable in class javax.swing.plaf.metal.MetalButtonUI
selectContent(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Writes out the content of the SELECT form element.
selected - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Is the value currently selected.
SELECTED - Static variable in class java.awt.event.ItemEvent
This state-change value indicates that an item was selected.
SELECTED - Static variable in class javax.accessibility.AccessibleState
Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that has been selected.
SELECTED - Static variable in class javax.swing.DefaultButtonModel
Indicates that the button has been selected.
SELECTED - Static variable in class javax.swing.text.html.HTML.Attribute
SELECTED_CONVERTED_TEXT_HIGHLIGHT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the default highlight for selected converted text.
SELECTED_FILE_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies change in user's single-file selection.
SELECTED_FILES_CHANGED_PROPERTY - Static variable in class javax.swing.JFileChooser
Identifies change in user's multiple-file selection.
SELECTED_ICON_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change to the icon used when the button has been selected.
SELECTED_RAW_TEXT_HIGHLIGHT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the default highlight for selected raw text.
selectedItemChanged() - Method in class javax.swing.JComboBox
This method is called when the selected item changes.
selectedItemReminder - Variable in class javax.swing.JComboBox
selectedRun - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
selectedTabPadInsets - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
selectedTextColor - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
selectedTitleColor - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
selectHighlight - Variable in class javax.swing.plaf.metal.MetalTabbedPaneUI
selectInitialValue() - Method in class javax.swing.JOptionPane
Requests that the initial value be selected, which will set focus to the initial value.
selectInitialValue(JOptionPane) - Method in class javax.swing.plaf.OptionPaneUI
Requests the component representing the default value to have focus.
selectInitialValue(JOptionPane) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
selectInitialValue(JOptionPane) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call selectInitialValue on each UI handled by this MultiUI.
selectInputMethod(Locale) - Method in class java.awt.im.InputContext
Selects an input method that supports the given locale.
selection - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Paths that are currently selected.
SELECTION - Static variable in class java.awt.JobAttributes.DefaultSelectionType
The DefaultSelectionType instance to use for specifying that the current selection should be printed.
SELECTION_MODE_PROPERTY - Static variable in class javax.swing.tree.DefaultTreeSelectionModel
Property name for selectionMode.
SELECTION_MODEL_PROPERTY - Static variable in class javax.swing.JColorChooser
The selection model property name.
SELECTION_MODEL_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for selectionModel.
SELECTION_VALUES_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for selectionValues.
selectionBackground - Variable in class javax.swing.JTable
The background color of selected cells.
selectionBackground - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
selectionBackwardAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for extending the selection by moving the caret logically backward one position.
selectionBeginAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of the document.
selectionBeginLineAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a line, extending the selection.
selectionBeginParagraphAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a paragraph, extending the selection.
selectionBeginWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the begining of a word, extending the selection.
selectionDownAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically downward one position, extending the selection.
selectionEndAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of the document.
selectionEndLineAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a line, extending the selection.
selectionEndParagraphAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a paragraph, extending the selection.
selectionEndWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret to the end of a word, extending the selection.
selectionForeground - Variable in class javax.swing.JTable
The foreground color of selected cells.
selectionForeground - Variable in class javax.swing.plaf.basic.BasicMenuItemUI
selectionForKey(char, ComboBoxModel) - Method in interface javax.swing.JComboBox.KeySelectionManager
Given aKey and the model, returns the row that should become selected.
selectionForwardAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for extending the selection by moving the caret logically forward one position.
selectionMode - Variable in class javax.swing.tree.DefaultTreeSelectionModel
Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
selectionModel - Variable in class javax.swing.JTree
Models the set of selected nodes in this tree.
selectionModel - Variable in class javax.swing.JTable
The ListSelectionModel of the table, used to keep track of row selections.
selectionModel - Variable in class javax.swing.table.DefaultTableColumnModel
Model for keeping track of column selections
selectionModelChanged - Static variable in class javax.swing.plaf.basic.BasicListUI
selectionNextWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the selection to the begining of the next word, extending the selection.
selectionPreviousWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the selection to the begining of the previous word, extending the selection.
selectionRedirector - Variable in class javax.swing.JTree
Creates a new event and passed it off the selectionListeners.
selectionUpAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically upward one position, extending the selection.
selectionValues - Variable in class javax.swing.JOptionPane
Array of values the user can choose from.
selectLineAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for selecting a line around the caret.
selectNextIndex() - Method in class javax.swing.plaf.basic.BasicListUI
Selected the previous row and force it to be visible.
selectNextPossibleValue() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Selects the next item in the list.
selectNextPossibleValue() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
selectNextTab(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
selectParagraphAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for selecting a paragraph around the caret.
selectPathForEvent(TreePath, MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Messaged to update the selection based on a MouseEvent over a particular row.
selectPreviousIndex() - Method in class javax.swing.plaf.basic.BasicListUI
Selected the previous row and force it to be visible.
selectPreviousPossibleValue() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Selects the previous item in the list.
selectPreviousPossibleValue() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
selectPreviousTab(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
selectWithKeyChar(char) - Method in class javax.swing.JComboBox
Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character.
selectWordAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for selecting a word around the caret.
send_deferred() - Method in class org.omg.CORBA.Request
Makes an asynchronous invocation on the request.
send_multiple_requests_deferred(Request[]) - Method in class org.omg.CORBA.ORB
Sends multiple dynamic (DII) requests asynchronously.
send_multiple_requests_oneway(Request[]) - Method in class org.omg.CORBA.ORB
Sends multiple dynamic (DII) requests asynchronously without expecting any responses.
send_oneway() - Method in class org.omg.CORBA.Request
Makes a oneway invocation on the request.
send(DatagramPacket) - Method in class java.net.DatagramSocket
Sends a datagram packet from this socket.
send(DatagramPacket) - Method in class java.net.DatagramSocketImpl
Sends a datagram packet.
send(DatagramPacket, byte) - Method in class java.net.MulticastSocket
Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket.
send(MidiMessage, long) - Method in interface javax.sound.midi.Receiver
Sends a MIDI message and time-stamp to this receiver.
SENTENCE - Static variable in interface javax.accessibility.AccessibleText
Constant used to indicate that the part of the text that should be retrieved is a sentence.
SEPARATE_DOCUMENTS_COLLATED_COPIES - Static variable in class java.awt.JobAttributes.MultipleDocumentHandlingType
The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, collated documents.
SEPARATE_DOCUMENTS_UNCOLLATED_COPIES - Static variable in class java.awt.JobAttributes.MultipleDocumentHandlingType
The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, uncollated documents.
separator - Static variable in class java.io.File
The system-dependent default name-separator character, represented as a string for convenience.
SEPARATOR - Static variable in class javax.accessibility.AccessibleRole
An object usually contained in a menu to provide a visual and logical separation of the contents in a menu.
separatorChar - Static variable in class java.io.File
The system-dependent default name-separator character.
SeparatorUI - class javax.swing.plaf.SeparatorUI.
Pluggable look and feel interface for JSeparator.
SeparatorUI() - Constructor for class javax.swing.plaf.SeparatorUI
SEPTEMBER - Static variable in class java.util.Calendar
Value of the MONTH field indicating the ninth month of the year.
Sequence - class javax.sound.midi.Sequence.
A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object.
Sequence(float, int) - Constructor for class javax.sound.midi.Sequence
Constructs a new MIDI sequence with the specified timing division type and timing resolution.
Sequence(float, int, int) - Constructor for class javax.sound.midi.Sequence
Constructs a new MIDI sequence with the specified timing division type, timing resolution, and number of tracks.
SequenceInputStream - class java.io.SequenceInputStream.
A SequenceInputStream represents the logical concatenation of other input streams.
SequenceInputStream(Enumeration) - Constructor for class java.io.SequenceInputStream
Initializes a newly created SequenceInputStream by remembering the argument, which must be an Enumeration that produces objects whose run-time type is InputStream.
SequenceInputStream(InputStream, InputStream) - Constructor for class java.io.SequenceInputStream
Initializes a newly created SequenceInputStream by remembering the two arguments, which will be read in order, first s1 and then s2, to provide the bytes to be read from this SequenceInputStream.
Sequencer - interface javax.sound.midi.Sequencer.
A hardware or software device that plays back a MIDI sequence is known as a sequencer.
Sequencer.SyncMode - class javax.sound.midi.Sequencer.SyncMode.
A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device.
Sequencer.SyncMode(String) - Constructor for class javax.sound.midi.Sequencer.SyncMode
Constructs a synchronization mode.
serializable - Variable in class java.beans.beancontext.BeanContextServicesSupport
The number of instances of a serializable BeanContextServceProvider.
Serializable - interface java.io.Serializable.
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
SerializablePermission - class java.io.SerializablePermission.
This class is for Serializable permissions.
SerializablePermission(String) - Constructor for class java.io.SerializablePermission
Creates a new SerializablePermission with the specified name.
SerializablePermission(String, String) - Constructor for class java.io.SerializablePermission
Creates a new SerializablePermission object with the specified name.
serialize(ObjectOutputStream, Collection) - Method in class java.beans.beancontext.BeanContextSupport
Used by writeObject to serialize a Collection.
serialVersionUID - Static variable in interface java.rmi.server.RemoteRef
indicate compatibility with JDK 1.1.x version of class.
serialVersionUID - Static variable in interface java.rmi.server.ServerRef
indicate compatibility with JDK 1.1.x version of class.
serialVersionUID - Static variable in interface java.security.Key
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
serialVersionUID - Static variable in interface java.security.PrivateKey
serialVersionUID - Static variable in interface java.security.PublicKey
serialVersionUID - Static variable in interface java.security.interfaces.DSAPrivateKey
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
serialVersionUID - Static variable in interface java.security.interfaces.DSAPublicKey
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
serialVersionUID - Static variable in interface javax.naming.directory.Attribute
Use serialVersionUID from JNDI 1.1.1 for interoperability.
servant - Variable in class org.omg.CORBA.portable.ServantObject
The real servant.
servant_postinvoke(Object, ServantObject) - Method in class org.omg.CORBA.portable.Delegate
servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
servant_preinvoke(Object, String, Class) - Method in class org.omg.CORBA.portable.Delegate
Returns a Java reference to the servant which should be used for this request.
ServantObject - class org.omg.CORBA.portable.ServantObject.
This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
ServantObject() - Constructor for class org.omg.CORBA.portable.ServantObject
ServerCloneException - exception java.rmi.server.ServerCloneException.
A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
ServerCloneException(String) - Constructor for class java.rmi.server.ServerCloneException
Constructs an ServerCloneException with the specified detail message.
ServerCloneException(String, Exception) - Constructor for class java.rmi.server.ServerCloneException
Constructs an ServerCloneException with the specified detail message and nested exception.
ServerError - exception java.rmi.ServerError.
A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
ServerError(String, Error) - Constructor for class java.rmi.ServerError
Constructs a ServerError with the specified detail message and nested error.
ServerException - exception java.rmi.ServerException.
A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
ServerException(String) - Constructor for class java.rmi.ServerException
Constructs a ServerException with the specified detail message.
ServerException(String, Exception) - Constructor for class java.rmi.ServerException
Constructs a ServerException with the specified detail message and nested exception.
ServerNotActiveException - exception java.rmi.server.ServerNotActiveException.
An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
ServerNotActiveException() - Constructor for class java.rmi.server.ServerNotActiveException
Constructs an ServerNotActiveException with no specified detail message.
ServerNotActiveException(String) - Constructor for class java.rmi.server.ServerNotActiveException
Constructs an ServerNotActiveException with the specified detail message.
ServerRef - interface java.rmi.server.ServerRef.
A ServerRef represents the server-side handle for a remote object implementation.
ServerRequest - class org.omg.CORBA.ServerRequest.
An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
ServerRequest() - Constructor for class org.omg.CORBA.ServerRequest
ServerRuntimeException - exception java.rmi.ServerRuntimeException.
Deprecated. no replacement
ServerRuntimeException(String, Exception) - Constructor for class java.rmi.ServerRuntimeException
Deprecated. no replacement
ServerSocket - class java.net.ServerSocket.
This class implements server sockets.
ServerSocket(int) - Constructor for class java.net.ServerSocket
Creates a server socket on a specified port.
ServerSocket(int, int) - Constructor for class java.net.ServerSocket
Creates a server socket and binds it to the specified local port number, with the specified backlog.
ServerSocket(int, int, InetAddress) - Constructor for class java.net.ServerSocket
Create a server with the specified port, listen backlog, and local IP address to bind to.
service_detail - Variable in class org.omg.CORBA.ServiceDetail
The data describing the ORB service that this ServiceDetail object represents.
service_detail_type - Variable in class org.omg.CORBA.ServiceDetail
The type of the ORB service that this ServiceDetail object represents.
service_details - Variable in class org.omg.CORBA.ServiceInformation
service_options - Variable in class org.omg.CORBA.ServiceInformation
serviceAvailable(BeanContextServiceAvailableEvent) - Method in class java.beans.beancontext.BeanContextChildSupport
A new service is available from the nesting BeanContext.
serviceAvailable(BeanContextServiceAvailableEvent) - Method in class java.beans.beancontext.BeanContextServicesSupport
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
serviceAvailable(BeanContextServiceAvailableEvent) - Method in interface java.beans.beancontext.BeanContextServicesListener
The service named has been registered.
serviceClass - Variable in class java.beans.beancontext.BeanContextServiceAvailableEvent
A Class reference to the newly available service
serviceClass - Variable in class java.beans.beancontext.BeanContextServiceRevokedEvent
A Class reference to the service that is being revoked.
ServiceDetail - class org.omg.CORBA.ServiceDetail.
An object that represents an ORB service.
ServiceDetail() - Constructor for class org.omg.CORBA.ServiceDetail
Constructs a ServiceDetail object with 0 for the type of ORB service and an empty description.
ServiceDetail(int, byte[]) - Constructor for class org.omg.CORBA.ServiceDetail
Constructs a ServiceDetail object with the given ORB service type and the given description.
ServiceDetailHelper - class org.omg.CORBA.ServiceDetailHelper.
ServiceInformation - class org.omg.CORBA.ServiceInformation.
ServiceInformation is an IDL struct in the CORBA module.
ServiceInformation() - Constructor for class org.omg.CORBA.ServiceInformation
ServiceInformation(int[], ServiceDetail[]) - Constructor for class org.omg.CORBA.ServiceInformation
ServiceInformationHelper - class org.omg.CORBA.ServiceInformationHelper.
ServiceInformationHolder - class org.omg.CORBA.ServiceInformationHolder.
A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods.
ServiceInformationHolder() - Constructor for class org.omg.CORBA.ServiceInformationHolder
Constructs a new ServiceInformationHolder object with its value field initialized to null.
ServiceInformationHolder(ServiceInformation) - Constructor for class org.omg.CORBA.ServiceInformationHolder
Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.
serviceProvider - Variable in class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
serviceRevoked(BeanContextServiceRevokedEvent) - Method in class java.beans.beancontext.BeanContextChildSupport
A service provided by the nesting BeanContext has been revoked.
serviceRevoked(BeanContextServiceRevokedEvent) - Method in class java.beans.beancontext.BeanContextServicesSupport
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
serviceRevoked(BeanContextServiceRevokedEvent) - Method in class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
serviceRevoked(BeanContextServiceRevokedEvent) - Method in interface java.beans.beancontext.BeanContextServiceRevokedListener
The service named has been revoked.
services - Variable in class java.beans.beancontext.BeanContextServicesSupport
all accesses to the protected transient HashMap services field should be synchronized on that object
ServiceUnavailableException - exception javax.naming.ServiceUnavailableException.
This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
ServiceUnavailableException() - Constructor for class javax.naming.ServiceUnavailableException
Constructs a new instance of ServiceUnavailableException.
ServiceUnavailableException(String) - Constructor for class javax.naming.ServiceUnavailableException
Constructs a new instance of ServiceUnavailableException using an explanation.
Set - interface java.util.Set.
A collection that contains no duplicate elements.
set_as_default() - Method in interface org.omg.CORBA.DynUnion
Determines whether the discriminator associated with this union has been assigned a valid default value.
set_as_default(boolean) - Method in interface org.omg.CORBA.DynUnion
Determines whether the discriminator associated with this union gets assigned a valid default value.
set_delegate(Object) - Method in class org.omg.CORBA_2_3.ORB
set_elements(Any[]) - Method in interface org.omg.CORBA.DynArray
Sets the value of this DynArray object to the given array.
set_elements(Any[]) - Method in interface org.omg.CORBA.DynSequence
Sets the values of all elements in this sequence with the given array.
set_exception(Any) - Method in class org.omg.CORBA.ServerRequest
Returns the given exception to the client.
set_members(NameValuePair[]) - Method in interface org.omg.CORBA.DynStruct
Set the members of the struct.
set_members(NameValuePair[]) - Method in interface org.omg.CORBA.DynValue
Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
set_one_value(String, Any) - Method in class org.omg.CORBA.Context
Creates a NamedValue object and adds it to this Context object.
SET_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The SetOverrideType constant for the enum value SET_OVERRIDE.
set_parameters(Applet, Properties) - Method in class org.omg.CORBA.ORB
Allows the ORB implementation to be initialized with the given applet and parameters.
set_parameters(String[], Properties) - Method in class org.omg.CORBA.ORB
Allows the ORB implementation to be initialized with the given parameters and properties.
set_policy_override(Object, Policy[], SetOverrideType) - Method in class org.omg.CORBA.portable.Delegate
Associates the policies passed in with a newly created object reference that it returns.
set_result(Any) - Method in class org.omg.CORBA.ServerRequest
Specifies any return value for the call.
set_return_type(TypeCode) - Method in class org.omg.CORBA.Request
Sets the typecode for the return value of the method.
set_value(byte[]) - Method in interface org.omg.CORBA.DynFixed
Sets the given fixed type instance as the value for this DynFixed object.
set_values(NVList) - Method in class org.omg.CORBA.Context
I Sets one or more property values in this Context object.
set(byte, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Byte.
set(char, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Character.
set(double, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Double.
set(float, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Float.
set(int) - Method in class java.util.BitSet
Sets the bit specified by the index to true.
set(int, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with an Integer.
set(int, int) - Method in class java.util.Calendar
Sets the time field with the given value.
set(int, int, int) - Method in class java.util.Calendar
Sets the values for the fields year, month, and date.
set(int, int, int, int, int) - Method in class java.util.Calendar
Sets the values for the fields year, month, date, hour, and minute.
set(int, int, int, int, int, int) - Method in class java.util.Calendar
Sets the values for the fields year, month, date, hour, minute, and second.
set(int, Object) - Method in class java.util.AbstractList
Replaces the element at the specified position in this list with the specified element (optional operation).
set(int, Object) - Method in class java.util.Vector
Replaces the element at the specified position in this Vector with the specified element.
set(int, Object) - Method in class java.util.AbstractSequentialList
Replaces the element at the specified position in this list with the specified element.
set(int, Object) - Method in class java.util.LinkedList
Replaces the element at the specified position in this list with the specified element.
set(int, Object) - Method in interface java.util.List
Replaces the element at the specified position in this list with the specified element (optional operation).
set(int, Object) - Method in class java.util.ArrayList
Replaces the element at the specified position in this list with the specified element.
set(int, Object) - Method in class javax.naming.directory.BasicAttribute
set(int, Object) - Method in interface javax.naming.directory.Attribute
Sets an attribute value in the ordered list of attribute values.
set(int, Object) - Method in class javax.swing.DefaultListModel
Replaces the element at the specified position in this list with the specified element.
set(JobAttributes) - Method in class java.awt.JobAttributes
Sets all of the attributes of this JobAttributes to the same values as the attributes of obj.
set(long, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Long.
set(Object) - Method in class java.lang.ThreadLocal
Sets the calling thread's instance of this ThreadLocal variable to the given value.
set(Object) - Method in class java.lang.InheritableThreadLocal
Sets the calling thread's instance of this ThreadLocal variable to the given value.
set(Object) - Method in interface java.util.ListIterator
Replaces the last element returned by next or previous with the specified element (optional operation).
set(Object, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters.
set(Object, int, Object) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified new value.
set(Object, Object) - Method in class java.lang.reflect.Field
Sets the field represented by this Field object on the specified object argument to the specified new value.
set(PageAttributes) - Method in class java.awt.PageAttributes
Sets all of the attributes of this PageAttributes to the same values as the attributes of obj.
set(short, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an Object in the list of parameters with a Short.
set(String, String, int, String, String) - Method in class java.net.URL
Sets the fields of the URL.
set(String, String, int, String, String, String, String, String) - Method in class java.net.URL
Sets the specified 8 fields of the URL.
set2DigitYearStart(Date) - Method in class java.text.SimpleDateFormat
Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.
setAccelerator(KeyStroke) - Method in class javax.swing.JMenuItem
Set the key combination which invokes the Menu Item's action listeners without navigating the menu hierarchy.
setAccelerator(KeyStroke) - Method in class javax.swing.JMenu
setAccelerator is not defined for JMenu.
setAcceptAllFileFilterUsed(boolean) - Method in class javax.swing.JFileChooser
Determines if the AcceptAll FileFilter is used.
setAccessible(AccessibleObject[], boolean) - Static method in class java.lang.reflect.AccessibleObject
Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).
setAccessible(boolean) - Method in class java.lang.reflect.AccessibleObject
Set the accessible flag for this object to the indicated boolean value.
setAccessibleCaption(Accessible) - Method in interface javax.accessibility.AccessibleTable
Sets the caption for the table.
setAccessibleCaption(Accessible) - Method in class javax.swing.JTable.AccessibleJTable
Sets the caption for the table.
setAccessibleColumnDescription(int, Accessible) - Method in interface javax.accessibility.AccessibleTable
Sets the description text of the specified column in the table.
setAccessibleColumnDescription(int, Accessible) - Method in class javax.swing.JTable.AccessibleJTable
Sets the description text of the specified column of the table.
setAccessibleColumnHeader(AccessibleTable) - Method in interface javax.accessibility.AccessibleTable
Sets the column headers.
setAccessibleColumnHeader(AccessibleTable) - Method in class javax.swing.JTable.AccessibleJTable
Return the column headers as an AccessibleTable.
setAccessibleDescription(String) - Method in class javax.accessibility.AccessibleContext
Sets the accessible description of this object.
setAccessibleDescription(String) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setAccessibleDescription(String) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Set the accessible description of this object.
setAccessibleDescription(String) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the accessible description of this object.
setAccessibleDescription(String) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setAccessibleIconDescription(String) - Method in interface javax.accessibility.AccessibleIcon
Sets the description of the icon.
setAccessibleIconDescription(String) - Method in class javax.swing.ImageIcon.AccessibleImageIcon
Sets the description of the icon.
setAccessibleName(String) - Method in class javax.accessibility.AccessibleContext
Sets the localized accessible name of this object.
setAccessibleName(String) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setAccessibleName(String) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Set the localized accessible name of this object.
setAccessibleName(String) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the localized accessible name of this object.
setAccessibleName(String) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setAccessibleParent(Accessible) - Method in class javax.accessibility.AccessibleContext
Sets the Accessible parent of this object.
setAccessibleRowDescription(int, Accessible) - Method in interface javax.accessibility.AccessibleTable
Sets the description text of the specified row of the table.
setAccessibleRowDescription(int, Accessible) - Method in class javax.swing.JTable.AccessibleJTable
Sets the description text of the specified row of the table.
setAccessibleRowHeader(AccessibleTable) - Method in interface javax.accessibility.AccessibleTable
Sets the row headers.
setAccessibleRowHeader(AccessibleTable) - Method in class javax.swing.JTable.AccessibleJTable
Return the row headers as an AccessibleTable.
setAccessibleSummary(Accessible) - Method in interface javax.accessibility.AccessibleTable
Sets the summary description of the table
setAccessibleSummary(Accessible) - Method in class javax.swing.JTable.AccessibleJTable
Sets the summary description of the table.
setAccessory(JComponent) - Method in class javax.swing.JFileChooser
Sets the accessory component.
setAction(Action) - Method in class javax.swing.AbstractButton
Sets the Action for the ActionEvent source.
setAction(Action) - Method in class javax.swing.JTextField
Sets the Action for the ActionEvent source.
setAction(Action) - Method in class javax.swing.JComboBox
Sets the Action for the ActionEvent source.
setActionCommand(String) - Method in class java.awt.MenuItem
Sets the command name of the action event that is fired by this menu item.
setActionCommand(String) - Method in class java.awt.Button
Sets the command name for the action event fired by this button.
setActionCommand(String) - Method in class javax.swing.AbstractButton
Sets the action command for this button.
setActionCommand(String) - Method in class javax.swing.JTextField
Sets the command string used for action events.
setActionCommand(String) - Method in interface javax.swing.ButtonModel
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
setActionCommand(String) - Method in class javax.swing.JComboBox
Sets the action commnand that should be included in the event sent to action listeners.
setActionCommand(String) - Method in class javax.swing.DefaultButtonModel
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
setActionMap(ActionMap) - Method in class javax.swing.JComponent
Sets the ActionMap to am.
setActivationDesc(ActivationID, ActivationDesc) - Method in interface java.rmi.activation.ActivationSystem
Set the activation descriptor, desc for the object with the activation identifier, id.
setActivationGroupDesc(ActivationGroupID, ActivationGroupDesc) - Method in interface java.rmi.activation.ActivationSystem
Set the activation group descriptor, desc for the object with the activation group identifier, id.
setActive(boolean) - Method in class java.awt.dnd.DropTarget
Set the DropTarget active if true, inactive if false.
setAddress(InetAddress) - Method in class java.net.DatagramPacket
Sets the IP address of the machine to which this datagram is being sent.
setAlignment(int) - Method in class java.awt.Label
Sets the alignment for this label to the specified alignment.
setAlignment(int) - Method in class java.awt.FlowLayout
Sets the alignment for this layout.
setAlignment(MutableAttributeSet, int) - Static method in class javax.swing.text.StyleConstants
Sets alignment.
setAlignmentX(float) - Method in class javax.swing.JComponent
Sets the the vertical alignment.
setAlignmentY(float) - Method in class javax.swing.JComponent
Sets the the horizontal alignment.
setAllocation(Shape) - Method in class javax.swing.text.AsyncBoxView.ChildLocator
Copy the currently allocated shape into the Rectangle used to store the current allocation.
setAllowsChildren(boolean) - Method in class javax.swing.tree.DefaultMutableTreeNode
Determines whether or not this node is allowed to have children.
setAllowUserInteraction(boolean) - Method in class java.net.URLConnection
Set the value of the allowUserInteraction field of this URLConnection.
setAltName(Name) - Method in class javax.naming.CannotProceedException
Sets the altName field of this exception.
setAltNameCtx(Context) - Method in class javax.naming.CannotProceedException
Sets the altNameCtx field of this exception.
setAmPmStrings(String[]) - Method in class java.text.DateFormatSymbols
Sets ampm strings.
setAnchorSelectionIndex(int) - Method in class javax.swing.DefaultListSelectionModel
Set the anchor selection index, leaving all selection values unchanged.
setAnchorSelectionIndex(int) - Method in interface javax.swing.ListSelectionModel
Set the anchor selection index.
setAnchorSelectionPath(TreePath) - Method in class javax.swing.JTree
Sets the path identified as the anchor.
setAngleExtent(double) - Method in class java.awt.geom.Arc2D
Sets the angular extent of this arc to the specified double value.
setAngleExtent(double) - Method in class java.awt.geom.Arc2D.Float
Sets the angular extent of this arc to the specified double value.
setAngleExtent(double) - Method in class java.awt.geom.Arc2D.Double
Sets the angular extent of this arc to the specified double value.
setAngles(double, double, double, double) - Method in class java.awt.geom.Arc2D
Sets the starting angle and angular extent of this arc using two sets of coordinates.
setAngles(Point2D, Point2D) - Method in class java.awt.geom.Arc2D
Sets the starting angle and angular extent of this arc using two points.
setAngleStart(double) - Method in class java.awt.geom.Arc2D
Sets the starting angle of this arc to the specified double value.
setAngleStart(double) - Method in class java.awt.geom.Arc2D.Float
Sets the starting angle of this arc to the specified double value.
setAngleStart(double) - Method in class java.awt.geom.Arc2D.Double
Sets the starting angle of this arc to the specified double value.
setAngleStart(Point2D) - Method in class java.awt.geom.Arc2D
Sets the starting angle of this arc to the angle that the specified point defines relative to the center of this arc.
setAnimated(boolean) - Method in class java.awt.image.MemoryImageSource
Change this memory image into a multi-frame animation or a single-frame static image depending on the animated parameter.
setApproveButtonMnemonic(char) - Method in class javax.swing.JFileChooser
Sets the approve button's mnemonic using a character.
setApproveButtonMnemonic(int) - Method in class javax.swing.JFileChooser
Sets the approve button's mnemonic using a numeric keycode.
setApproveButtonText(String) - Method in class javax.swing.JFileChooser
Sets the text used in the ApproveButton in the FileChooserUI.
setApproveButtonToolTipText(String) - Method in class javax.swing.JFileChooser
Sets the tooltip text used in the ApproveButton.
setArc(Arc2D) - Method in class java.awt.geom.Arc2D
Sets this arc to be the same as the specified arc.
setArc(double, double, double, double, double, double, int) - Method in class java.awt.geom.Arc2D
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
setArc(double, double, double, double, double, double, int) - Method in class java.awt.geom.Arc2D.Float
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
setArc(double, double, double, double, double, double, int) - Method in class java.awt.geom.Arc2D.Double
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
setArc(Point2D, Dimension2D, double, double, int) - Method in class java.awt.geom.Arc2D
Sets the location, size, angular extents, and closure type of this arc to the specified values.
setArc(Rectangle2D, double, double, int) - Method in class java.awt.geom.Arc2D
Sets the location, size, angular extents, and closure type of this arc to the specified values.
setArcByCenter(double, double, double, double, double, int) - Method in class java.awt.geom.Arc2D
Sets the position, bounds, angular extents, and closure type of this arc to the specified values.
setArcByTangent(Point2D, Point2D, Point2D, double) - Method in class java.awt.geom.Arc2D
Sets the position, bounds, and angular extents of this arc to the specified value.
setArcType(int) - Method in class java.awt.geom.Arc2D
Sets the closure type of this arc to the specified value: OPEN, CHORD, or PIE.
setAreaOfInterest(Shape) - Method in class java.awt.image.renderable.RenderContext
Sets the current area of interest.
setArmed(boolean) - Method in class javax.swing.JMenuItem
Identifies the menu item as "armed".
setArmed(boolean) - Method in interface javax.swing.ButtonModel
Marks the button as "armed".
setArmed(boolean) - Method in class javax.swing.DefaultButtonModel
Marks the button as "armed".
setArray(int, Array) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given Array object.
setAsciiStream(int, InputStream, int) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
setAsksAllowsChildren(boolean) - Method in class javax.swing.tree.DefaultTreeModel
Sets whether or not to test leafness by asking getAllowsChildren() or isLeaf() to the TreeNodes.
setAsText(String) - Method in interface java.beans.PropertyEditor
Set the property value by parsing a given String.
setAsText(String) - Method in class java.beans.PropertyEditorSupport
Sets the property value by parsing a given String.
setAsynchronousLoadPriority(int) - Method in class javax.swing.text.AbstractDocument
Set the asynchronous loading priority.
setAttributes(Attributes) - Method in class javax.naming.directory.SearchResult
Sets the attributes of this search result to attrs.
setAutoCommit(boolean) - Method in interface java.sql.Connection
Sets this connection's auto-commit mode.
setAutoCreateColumnsFromModel(boolean) - Method in class javax.swing.JTable
Sets this table's autoCreateColumnsFromModel flag.
setAutoDelay(int) - Method in class java.awt.Robot
Sets the number of milliseconds this Robot sleeps after generating an event.
setAutoResizeMode(int) - Method in class javax.swing.JTable
Sets the table's auto resize mode when the table is resized.
setAutoscrolls(boolean) - Method in class javax.swing.JComponent
If true this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling, such as JViewport.
setAutoWaitForIdle(boolean) - Method in class java.awt.Robot
Sets whether this Robot automatically invokes waitForIdle after generating an event.
setAxis(int) - Method in class javax.swing.text.BoxView
Set the axis property.
setBackground(Color) - Method in class java.awt.Component
Sets the background color of this component.
setBackground(Color) - Method in class java.awt.Component.AccessibleAWTComponent
Set the background color of this object.
setBackground(Color) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the background color of this object.
setBackground(Color) - Method in class java.awt.Graphics2D
Sets the background color for the Graphics2D context.
setBackground(Color) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the background color of this object.
setBackground(Color) - Method in class java.awt.TextComponent
Sets the background color of this text component.
setBackground(Color) - Method in interface javax.accessibility.AccessibleComponent
Sets the background color of this object.
setBackground(Color) - Method in class javax.swing.JComponent
Sets the background color of this component.
setBackground(Color) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setBackground(Color) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
Set the background color of this object.
setBackground(Color) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the background color of this object.
setBackground(Color) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setBackground(Color) - Method in class javax.swing.table.DefaultTableCellRenderer
Overrides JComponent.setForeground to assign the unselected-background color to the specified color.
setBackground(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Subclassed to map ColorUIResources to null.
setBackground(MutableAttributeSet, Color) - Static method in class javax.swing.text.StyleConstants
Sets the background color.
setBackgroundAt(int, Color) - Method in class javax.swing.JTabbedPane
Sets the background color at index to background which can be null, in which case the tab's background color will default to the background color of the tabbedpane.
setBackgroundNonSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the background color to be used for non selected nodes.
setBackgroundSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the color to use for the background if node is selected.
setBackingStoreEnabled(boolean) - Method in class javax.swing.JViewport
Deprecated. As of Java 2 platform v1.3, replaced by setScrollMode().
setBase(URL) - Method in class javax.swing.text.html.StyleSheet
Sets the base.
setBase(URL) - Method in class javax.swing.text.html.HTMLDocument
Sets the location to resolve relative URLs against.
setBaseFontSize(int) - Method in class javax.swing.text.html.StyleSheet
setBaseFontSize(String) - Method in class javax.swing.text.html.StyleSheet
setBasicSplitPaneUI(BasicSplitPaneUI) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Sets the SplitPaneUI that is using the receiver.
setBeanContext(BeanContext) - Method in interface java.beans.beancontext.BeanContextChild
Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters: propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).
setBeanContext(BeanContext) - Method in class java.beans.beancontext.BeanContextChildSupport
Sets the BeanContext for this BeanContextChildSupport.
setBeanInfoSearchPath(String[]) - Static method in class java.beans.Introspector
Change the list of package names that will be used for finding BeanInfo classes.
setBeginIndex(int) - Method in class java.text.FieldPosition
Sets the begin index.
setBidiLevel(MutableAttributeSet, int) - Static method in class javax.swing.text.StyleConstants
Sets the BidiLevel.
setBigDecimal(int, BigDecimal) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a java.math.BigDecimal value.
setBinaryStream(int, InputStream, int) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
setBit(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit set.
setBlinkRate(int) - Method in class javax.swing.text.DefaultCaret
Sets the caret blink rate.
setBlinkRate(int) - Method in interface javax.swing.text.Caret
Sets the blink rate of the caret.
setBlob(int, Blob) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given Blob object.
setBlockIncrement(int) - Method in class java.awt.Scrollbar
Sets the block increment for this scroll bar.
setBlockIncrement(int) - Method in interface java.awt.Adjustable
Sets the block value increment for the adjustable object.
setBlockIncrement(int) - Method in class javax.swing.JScrollBar
Sets the blockIncrement property.
setBlockIncrement(int) - Method in class javax.swing.JScrollPane.ScrollBar
Messages super to set the value, and resets the blockIncrementSet instance variable to true.
setBold(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the bold attribute.
setBoolean(int, boolean) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java boolean value.
setBoolean(Object, boolean) - Method in class java.lang.reflect.Field
Sets the value of a field as a boolean on the specified object.
setBoolean(Object, int, boolean) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified boolean value.
setBorder(Border) - Method in class javax.swing.JComponent
Sets the border of this component.
setBorder(Border) - Method in class javax.swing.JViewport
The viewport "scrolls" it's child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).
setBorder(Border) - Method in class javax.swing.border.TitledBorder
Sets the border of the titled border.
setBorder(Border) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Sets the border of this component.
setBorderColor(Color) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
setBorderPainted(boolean) - Method in class javax.swing.AbstractButton
Sets whether the border should be painted.
setBorderPainted(boolean) - Method in class javax.swing.JPopupMenu
Sets whether the border should be painted.
setBorderPainted(boolean) - Method in class javax.swing.JToolBar
Sets whether the border should be painted.
setBorderPainted(boolean) - Method in class javax.swing.JMenuBar
Sets whether the border should be painted.
setBorderPainted(boolean) - Method in class javax.swing.JProgressBar
Sets whether the progress bar should paint its border.
setBorderPaintedFlat(boolean) - Method in class javax.swing.JCheckBox
Sets whether the border should be painted flat.
setBorderSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the color to use for the border.
setBorderSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellEditor
Sets the color to use for the border.
setBorderToNonRollover(Component) - Method in class javax.swing.plaf.metal.MetalToolBarUI
setBorderToNormal(Component) - Method in class javax.swing.plaf.metal.MetalToolBarUI
setBorderToRollover(Component) - Method in class javax.swing.plaf.metal.MetalToolBarUI
setBottomComponent(Component) - Method in class javax.swing.JSplitPane
Sets the component below, or to the right of the divider.
setBottomInset(float) - Method in class javax.swing.text.AsyncBoxView
Set the bottom part of the margin around the view.
setBound(boolean) - Method in class java.beans.PropertyDescriptor
Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
setBounds(int, int, int, int) - Method in class java.awt.Component
Moves and resizes this component.
setBounds(int, int, int, int) - Method in class java.awt.Rectangle
Sets the bounding Rectangle of this Rectangle to the specified x, y, width, and height.
setBounds(Rectangle) - Method in class java.awt.Component
Moves and resizes this component to conform to the new bounding rectangle r.
setBounds(Rectangle) - Method in class java.awt.Component.AccessibleAWTComponent
Sets the bounds of this object in the form of a Rectangle object.
setBounds(Rectangle) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Sets the bounds of this object in the form of a Rectangle object.
setBounds(Rectangle) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Sets the bounds of this object in the form of a Rectangle object.
setBounds(Rectangle) - Method in class java.awt.Rectangle
Sets the bounding Rectangle of this Rectangle to match the specified Rectangle.
setBounds(Rectangle) - Method in interface javax.accessibility.AccessibleComponent
Sets the bounds of this object in the form of a Rectangle object.
setBounds(Rectangle) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setBounds(Rectangle) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setBounds(Rectangle) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
setBounds(Rectangle) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setBoundsForFrame(JComponent, int, int, int, int) - Method in interface javax.swing.DesktopManager
This is a primative reshape method.
setBoundsForFrame(JComponent, int, int, int, int) - Method in class javax.swing.DefaultDesktopManager
This moves the JComponent and repaints the damaged areas.
setButtonIcons() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
setByte(int, byte) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java byte value.
setByte(Object, byte) - Method in class java.lang.reflect.Field
Sets the value of a field as a byte on the specified object.
setByte(Object, int, byte) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified boolean value.
setBytes(int, byte[]) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java array of bytes.
setCalendar(Calendar) - Method in class java.text.DateFormat
Set the calendar to be used by this date format.
setCanWrapLines(boolean) - Method in class javax.swing.text.AbstractWriter
Sets whether or not lines can be wrapped.
setCaret(Caret) - Method in class javax.swing.text.JTextComponent
Sets the caret to be used.
setCaretColor(Color) - Method in class javax.swing.text.JTextComponent
Sets the current color used to render the caret.
setCaretPosition(int) - Method in class java.awt.TextComponent
Sets the position of the text insertion caret for this text component.
setCaretPosition(int) - Method in class javax.swing.text.JTextComponent
Sets the position of the text insertion caret for the TextComponent.
setCatalog(String) - Method in interface java.sql.Connection
Sets a catalog name in order to select a subspace of this Connection's database in which to work.
setCellEditor(TableCellEditor) - Method in class javax.swing.JTable
Sets the cellEditor variable.
setCellEditor(TableCellEditor) - Method in class javax.swing.table.TableColumn
Sets the editor to used by when a cell in this column is edited.
setCellEditor(TreeCellEditor) - Method in class javax.swing.JTree
Sets the cell editor.
setCellEditor(TreeCellEditor) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the cell editor.
setCellLength(int) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
setCellRenderer(ListCellRenderer) - Method in class javax.swing.JList
Sets the delegate that's used to paint each cell in the list.
setCellRenderer(TableCellRenderer) - Method in class javax.swing.table.TableColumn
Sets the TableCellRenderer used by JTable to draw individual values for this column.
setCellRenderer(TreeCellRenderer) - Method in class javax.swing.JTree
Sets the TreeCellRenderer that will be used to draw each cell.
setCellRenderer(TreeCellRenderer) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the TreeCellRenderer to tcr.
setCellSelectionEnabled(boolean) - Method in class javax.swing.JTable
Sets whether this table allows both a column selection and a row selection to exist simultaneously.
setCellSpacing(int) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
setCentersChildren(boolean) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
setCertificateEntry(String, Certificate) - Method in class java.security.KeyStore
Assigns the given certificate to the given alias.
setChanged() - Method in class java.util.Observable
Marks this Observable object as having been changed; the hasChanged method will now return true.
setChannelPressure(int) - Method in interface javax.sound.midi.MidiChannel
Reacts to a change in the keyboard pressure.
setChar(Object, char) - Method in class java.lang.reflect.Field
Sets the value of a field as a char on the specified object.
setChar(Object, int, char) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified byte value.
setCharacterAttributes(AttributeSet, boolean) - Method in class javax.swing.JTextPane
Applies the given attributes to character content.
setCharacterAttributes(int, int, AttributeSet, boolean) - Method in interface javax.swing.text.StyledDocument
Changes the content element attributes used for the given range of existing content in the document.
setCharacterAttributes(int, int, AttributeSet, boolean) - Method in class javax.swing.text.DefaultStyledDocument
Sets attributes for some part of the document.
setCharacterAttributes(JEditorPane, AttributeSet, boolean) - Method in class javax.swing.text.StyledEditorKit.StyledTextAction
Applies the given attributes to character content.
setCharacterStream(int, Reader, int) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given Reader object, which is the given number of characters long.
setCharacterSubsets(Character.Subset[]) - Method in class java.awt.im.InputContext
Sets the subsets of the Unicode character set that input methods of this input context should be allowed to input.
setCharacterSubsets(Character.Subset[]) - Method in interface java.awt.im.spi.InputMethod
Sets the subsets of the Unicode character set that this input method is allowed to input.
setCharAt(int, char) - Method in class java.lang.StringBuffer
The character at the specified index of this string buffer is set to ch.
setCheckboxGroup(CheckboxGroup) - Method in class java.awt.Checkbox
Sets this check box's group to be the specified check box group.
setChoices(double[], String[]) - Method in class java.text.ChoiceFormat
Set the choices to be used in formatting.
setChooserPanels(AbstractColorChooserPanel[]) - Method in class javax.swing.JColorChooser
Specifies the Color Panels used to choose a color value.
setClassName(String) - Method in class javax.naming.NameClassPair
Sets the class name of this binding.
setClickCountToStart(int) - Method in class javax.swing.DefaultCellEditor
Specifies the number of clicks needed to start editing.
setClip(int, int, int, int) - Method in class java.awt.Graphics
Sets the current clip to the rectangle specified by the given coordinates.
setClip(int, int, int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.setClip.
setClip(Shape) - Method in class java.awt.Graphics
Sets the current clipping area to an arbitrary clip shape.
setClip(Shape) - Method in class javax.swing.DebugGraphics
Overrides Graphics.setClip.
setClob(int, Clob) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given Clob object.
setClosable(boolean) - Method in class javax.swing.JInternalFrame
Sets that this JInternalFrame can be closed by some user action.
setClosed(boolean) - Method in class javax.swing.JInternalFrame
Calling this method with a value of true to close the frame.
setClosedIcon(Icon) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the icon used to represent non-leaf nodes that are not expanded.
setCoalesce(boolean) - Method in class javax.swing.Timer
Sets whether the Timer coalesces multiple pending ActionEvent firings.
setCollapsedIcon(Icon) - Method in class javax.swing.plaf.basic.BasicTreeUI
setColor(Color) - Method in class java.awt.Graphics
Sets this graphics context's current color to the specified color.
setColor(Color) - Method in class javax.swing.JColorChooser
Sets the current color of the color chooser to the specified color.
setColor(Color) - Method in class javax.swing.DebugGraphics
Sets the color to be used for drawing and filling lines and shapes.
setColor(int) - Method in class javax.swing.JColorChooser
Sets the current color of the color chooser to the specified color.
setColor(int, int, int) - Method in class javax.swing.JColorChooser
Sets the current color of the color chooser to the specified RGB color.
setColor(PageAttributes.ColorType) - Method in class java.awt.PageAttributes
Specifies whether pages using these attributes will be rendered in color or monochrome.
setColorModel(ColorModel) - Method in class java.awt.image.ImageFilter
Filter the information provided in the setColorModel method of the ImageConsumer interface.
setColorModel(ColorModel) - Method in class java.awt.image.PixelGrabber
The setColorModel method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setColorModel(ColorModel) - Method in class java.awt.image.RGBImageFilter
If the ColorModel is an IndexColorModel, and the subclass has set the canFilterIndexColorModel flag to true, we substitute a filtered version of the color model here and wherever that original ColorModel object appears in the setPixels methods.
setColorModel(ColorModel) - Method in interface java.awt.image.ImageConsumer
The ColorModel object used for the majority of the pixels reported using the setPixels method calls.
setColorModel(ColorModel) - Method in class java.awt.image.BufferedImageFilter
Filters the information provided in the setColorModel method of the ImageConsumer interface.
setColumnCount(int) - Method in class javax.swing.table.DefaultTableModel
Sets the number of columns in the model.
setColumnHeader(JViewport) - Method in class javax.swing.JScrollPane
Removes the old columnHeader, if it exists.
setColumnHeaderView(Component) - Method in class javax.swing.JScrollPane
Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane.
setColumnIdentifiers(Object[]) - Method in class javax.swing.table.DefaultTableModel
Replaces the column identifiers in the model.
setColumnIdentifiers(Vector) - Method in class javax.swing.table.DefaultTableModel
Replaces the column identifiers in the model.
setColumnMargin(int) - Method in class javax.swing.table.DefaultTableColumnModel
Sets the column margin to newMargin.
setColumnMargin(int) - Method in interface javax.swing.table.TableColumnModel
Sets the TableColumn's column margin to newMargin.
setColumnModel(TableColumnModel) - Method in class javax.swing.JTable
Sets the column model for this table to newModel and registers for listener notifications from the new column model.
setColumnModel(TableColumnModel) - Method in class javax.swing.table.JTableHeader
Sets the column model for this table to newModel and registers for listener notifications from the new column model.
setColumns(int) - Method in class java.awt.GridLayout
Sets the number of columns in this layout to the specified value.
setColumns(int) - Method in class java.awt.TextField
Sets the number of columns in this text field.
setColumns(int) - Method in class java.awt.TextArea
Sets the number of columns for this text area.
setColumns(int) - Method in class javax.swing.JTextField
Sets the number of columns in this TextField, and then invalidate the layout.
setColumns(int) - Method in class javax.swing.JTextArea
Sets the number of columns for this TextArea.
setColumnSelectionAllowed(boolean) - Method in class javax.swing.JTable
Sets whether the columns in this model can be selected.
setColumnSelectionAllowed(boolean) - Method in class javax.swing.table.DefaultTableColumnModel
Sets whether column selection is allowed.
setColumnSelectionAllowed(boolean) - Method in interface javax.swing.table.TableColumnModel
Sets whether the columns in this model may be selected.
setColumnSelectionInterval(int, int) - Method in class javax.swing.JTable
Selects the columns from index0 to index1, inclusive.
setComboBox(JComboBox) - Method in class javax.swing.plaf.metal.MetalComboBoxButton
setComboIcon(Icon) - Method in class javax.swing.plaf.metal.MetalComboBoxButton
setComment(String) - Method in class java.util.zip.ZipEntry
Sets the optional comment string for the entry.
setComment(String) - Method in class java.util.zip.ZipOutputStream
Sets the ZIP file comment.
setComponent(Component) - Method in class java.awt.dnd.DragGestureRecognizer
set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.
setComponent(Component) - Method in class java.awt.dnd.DropTarget
Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget); or droptarget.setComponent(component);
setComponent(JComponent) - Method in class javax.swing.JToolTip
Specifies the component that the tooltip describes.
setComponent(MutableAttributeSet, Component) - Static method in class javax.swing.text.StyleConstants
Sets the component attribute.
setComponentAt(int, Component) - Method in class javax.swing.JTabbedPane
Sets the component at index to component.
setComponentOrientation(ComponentOrientation) - Method in class java.awt.Component
Set the language-sensitive orientation that is to be used to order the elements or text within this component.
setComponentOrientation(ComponentOrientation) - Method in class javax.swing.JScrollPane
Sets the orientation for the vertical and horizontal scrollbars as determined by the ComponentOrientation argument.
setComponentToSize(Component, int, int, Insets, Dimension) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.
setComposite(Composite) - Method in class java.awt.Graphics2D
Sets the Composite for the Graphics2D context.
setCompositionEnabled(boolean) - Method in class java.awt.im.InputContext
Enables or disables the current input method for composition, depending on the value of the parameter enable.
setCompositionEnabled(boolean) - Method in interface java.awt.im.spi.InputMethod
Enables or disables this input method for composition, depending on the value of the parameter enable.
setCompressedSize(long) - Method in class java.util.zip.ZipEntry
Sets the size of the compressed entry data.
setConstrained(boolean) - Method in class java.beans.PropertyDescriptor
Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
setConstraints(Component, GridBagConstraints) - Method in class java.awt.GridBagLayout
Sets the constraints for the specified component in this layout.
setContentAreaFilled(boolean) - Method in class javax.swing.AbstractButton
Sets whether the button should paint the content area or leave it transparent.
setContentHandlerFactory(ContentHandlerFactory) - Static method in class java.net.URLConnection
Sets the ContentHandlerFactory of an application.
setContentPane(Container) - Method in class javax.swing.JWindow
Sets the contentPane property for this window.
setContentPane(Container) - Method in class javax.swing.JApplet
Sets the contentPane property.
setContentPane(Container) - Method in class javax.swing.JInternalFrame
Sets this JInternalFrame's content pane.
setContentPane(Container) - Method in class javax.swing.JFrame
Sets the contentPane property.
setContentPane(Container) - Method in interface javax.swing.RootPaneContainer
The "contentPane" is the primary container for application specific components.
setContentPane(Container) - Method in class javax.swing.JRootPane
Sets the content pane -- the container that holds the components parented by the root pane.
setContentPane(Container) - Method in class javax.swing.JDialog
Sets the contentPane property.
setContents(Transferable, ClipboardOwner) - Method in class java.awt.datatransfer.Clipboard
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.
setContentType(String) - Method in class javax.swing.JEditorPane
Sets the type of content that this editor handles.
setContextClassLoader(ClassLoader) - Method in class java.lang.Thread
Sets the context ClassLoader for this Thread.
setContinuousLayout(boolean) - Method in class javax.swing.JSplitPane
Sets whether or not the child components are continuously redisplayed and layed out during user intervention.
setContinuousLayout(boolean) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Turn continuous layout on/off.
setControlButtonsAreShown(boolean) - Method in class javax.swing.JFileChooser
Sets whether the approve and cancel buttons are shown in the file chooser.
setCopies(int) - Method in class java.awt.JobAttributes
Specifies the number of copies the application should render for jobs using these attributes.
setCopies(int) - Method in class java.awt.print.PrinterJob
Sets the number of copies to be printed.
setCopiesToDefault() - Method in class java.awt.JobAttributes
Sets the number of copies the application should render for jobs using these attributes to the default.
setCorner(String, Component) - Method in class javax.swing.JScrollPane
Adds a child that will appear in one of the scroll panes corners, if there's room.
setCountLimit(long) - Method in class javax.naming.directory.SearchControls
Sets the maximum number of entries to be returned as a result of the search.
setCrc(long) - Method in class java.util.zip.ZipEntry
Sets the CRC-32 checksum of the uncompressed entry data.
setCurrencySymbol(String) - Method in class java.text.DecimalFormatSymbols
Set the string denoting the local currency.
setCurrent(Checkbox) - Method in class java.awt.CheckboxGroup
Deprecated. As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).
setCurrentAccessibleValue(Number) - Method in class java.awt.Scrollbar.AccessibleAWTScrollBar
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class java.awt.MenuItem.AccessibleAWTMenuItem
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class java.awt.Checkbox.AccessibleAWTCheckbox
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class java.awt.Button.AccessibleAWTButton
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in interface javax.accessibility.AccessibleValue
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.AbstractButton.AccessibleAbstractButton
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JInternalFrame.AccessibleJInternalFrame
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JSplitPane.AccessibleJSplitPane
Sets the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JScrollBar.AccessibleJScrollBar
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JProgressBar.AccessibleJProgressBar
Set the value of this object as a Number.
setCurrentAccessibleValue(Number) - Method in class javax.swing.JSlider.AccessibleJSlider
Set the value of this object as a Number.
setCurrentDirectory(File) - Method in class javax.swing.JFileChooser
Sets the current directory.
setCurrentLineLength(int) - Method in class javax.swing.text.AbstractWriter
Sets the current line length.
setCurrentManager(FocusManager) - Static method in class javax.swing.FocusManager
Set the FocusManager that should be used for the calling thread.
setCurrentManager(RepaintManager) - Static method in class javax.swing.RepaintManager
Set the RepaintManager that should be used for the calling thread.
setCurrentTheme(MetalTheme) - Static method in class javax.swing.plaf.metal.MetalLookAndFeel
setCursor(Cursor) - Method in class java.awt.Component
Sets the cursor image to the specified cursor.
setCursor(Cursor) - Method in class java.awt.Component.AccessibleAWTComponent
Set the Cursor of this object.
setCursor(Cursor) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the Cursor of this object.
setCursor(Cursor) - Method in class java.awt.Window
Set the cursor image to a specified cursor.
setCursor(Cursor) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the Cursor of this object.
setCursor(Cursor) - Method in class java.awt.dnd.DragSourceContext
This method sets the current drag Cursor.
setCursor(Cursor) - Method in interface javax.accessibility.AccessibleComponent
Sets the Cursor of this object.
setCursor(Cursor) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setCursor(Cursor) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setCursor(Cursor) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the Cursor of this object.
setCursor(Cursor) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setCursor(int) - Method in class java.awt.Frame
Deprecated. As of JDK version 1.1, replaced by Component.setCursor(Cursor).
setCursorName(String) - Method in interface java.sql.Statement
Defines the SQL cursor name that will be used by subsequent Statement object execute methods.
setCurve(CubicCurve2D) - Method in class java.awt.geom.CubicCurve2D
Sets the location of the endpoints and controlpoints of this curve to the same as those in the specified CubicCurve2D.
setCurve(double[], int) - Method in class java.awt.geom.QuadCurve2D
Sets the location of the endpoints and controlpoints of this QuadCurve2D to the double coordinates at the specified offset in the specified array.
setCurve(double[], int) - Method in class java.awt.geom.CubicCurve2D
Sets the location of the endpoints and controlpoints of this curve to the double coordinates at the specified offset in the specified array.
setCurve(double, double, double, double, double, double) - Method in class java.awt.geom.QuadCurve2D
Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
setCurve(double, double, double, double, double, double) - Method in class java.awt.geom.QuadCurve2D.Float
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified double coordinates.
setCurve(double, double, double, double, double, double) - Method in class java.awt.geom.QuadCurve2D.Double
Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
setCurve(double, double, double, double, double, double, double, double) - Method in class java.awt.geom.CubicCurve2D
Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
setCurve(double, double, double, double, double, double, double, double) - Method in class java.awt.geom.CubicCurve2D.Float
Sets the location of the endpoints and controlpoints of this CubicCurve2D to the specified double coordinates.
setCurve(double, double, double, double, double, double, double, double) - Method in class java.awt.geom.CubicCurve2D.Double
Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
setCurve(float, float, float, float, float, float) - Method in class java.awt.geom.QuadCurve2D.Float
Sets the location of the endpoints and controlpoint of this curve to the specified float coordinates.
setCurve(float, float, float, float, float, float, float, float) - Method in class java.awt.geom.CubicCurve2D.Float
Sets the location of the endpoints and controlpoints of this curve to the specified float coordinates.
setCurve(Point2D[], int) - Method in class java.awt.geom.QuadCurve2D
Sets the location of the endpoints and controlpoints of this QuadCurve2D to the coordinates of the Point2D objects at the specified offset in the specified array.
setCurve(Point2D[], int) - Method in class java.awt.geom.CubicCurve2D
Sets the location of the endpoints and controlpoints of this curve to the coordinates of the Point2D objects at the specified offset in the specified array.
setCurve(Point2D, Point2D, Point2D) - Method in class java.awt.geom.QuadCurve2D
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified Point2D coordinates.
setCurve(Point2D, Point2D, Point2D, Point2D) - Method in class java.awt.geom.CubicCurve2D
Sets the location of the endpoints and controlpoints of this curve to the specified Point2D coordinates.
setCurve(QuadCurve2D) - Method in class java.awt.geom.QuadCurve2D
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the same as those in the specified QuadCurve2D.
setDaemon(boolean) - Method in class java.lang.ThreadGroup
Changes the daemon status of this thread group.
setDaemon(boolean) - Method in class java.lang.Thread
Marks this thread as either a daemon thread or a user thread.
setData(byte[]) - Method in class java.net.DatagramPacket
Set the data buffer for this packet.
setData(byte[], int, int) - Method in class java.net.DatagramPacket
Set the data buffer for this packet.
setData(int, byte[]) - Method in class java.awt.color.ICC_Profile
Sets a particular tagged data element in the profile from a byte array.
setData(Raster) - Method in class java.awt.image.BufferedImage
Sets a rectangular region of the image to the contents of the specified Raster r, which is assumed to be in the same coordinate space as the BufferedImage.
setData(Raster) - Method in interface java.awt.image.WritableRenderedImage
Sets a rect of the image to the contents of the Raster r, which is assumed to be in the same coordinate space as the WritableRenderedImage.
setDataElements(int, int, int, int, Object) - Method in class java.awt.image.WritableRaster
Sets the data for a rectangle of pixels from a primitive array of type TransferType.
setDataElements(int, int, int, int, Object, DataBuffer) - Method in class java.awt.image.SampleModel
Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Object) - Method in class java.awt.image.WritableRaster
Sets the data for a single pixel from a primitive array of type TransferType.
setDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.SampleModel
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Object, DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
setDataElements(int, int, Raster) - Method in class java.awt.image.WritableRaster
Sets the data for a rectangle of pixels from an input Raster.
setDatagramSocketImplFactory(DatagramSocketImplFactory) - Static method in class java.net.DatagramSocket
Sets the datagram socket implementation factory for the application.
setDataVector(Object[][], Object[]) - Method in class javax.swing.table.DefaultTableModel
Replaces the value in the dataVector instance variable with the values in the array newData.
setDataVector(Vector, Vector) - Method in class javax.swing.table.DefaultTableModel
Replaces the current dataVector instance variable with the new Vector of rows, newData.
setDate(int) - Method in class java.sql.Time
Deprecated.
setDate(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).
setDate(int, Date) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a value.
setDate(int, Date, Calendar) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
setDateFormatSymbols(DateFormatSymbols) - Method in class java.text.SimpleDateFormat
Allows you to set the date/time formatting data.
setDebugGraphicsOptions(int) - Method in class javax.swing.JComponent
Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.
setDebugOptions(int) - Method in class javax.swing.DebugGraphics
Enables/disables diagnostic information about every graphics operation.
setDecimalFormatSymbols(DecimalFormatSymbols) - Method in class java.text.DecimalFormat
Sets the decimal format symbols, which is generally not changed by the programmer or user.
setDecimalSeparator(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for decimal sign.
setDecimalSeparatorAlwaysShown(boolean) - Method in class java.text.DecimalFormat
Allows you to set the behavior of the decimal separator with integers.
setDecomposition(int) - Method in class java.text.Collator
Set the decomposition mode of this Collator.
setDefault(Authenticator) - Static method in class java.net.Authenticator
Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authenticator.
setDefault(Locale) - Static method in class java.util.Locale
Sets the default locale for this instance of the Java Virtual Machine.
setDefault(TimeZone) - Static method in class java.util.TimeZone
Sets the TimeZone that is returned by the getDefault method.
setDefaultAction(Action) - Method in interface javax.swing.text.Keymap
Set the default action to fire if a key is typed.
setDefaultActions(int) - Method in class java.awt.dnd.DropTarget
Sets the default acceptable actions for this DropTarget
setDefaultAllowUserInteraction(boolean) - Static method in class java.net.URLConnection
Sets the default value of the allowUserInteraction field for all future URLConnection objects to the specified value.
setDefaultButton(JButton) - Method in class javax.swing.JRootPane
Sets the current default button for this JRootPane.
setDefaultCapable(boolean) - Method in class javax.swing.JButton
Sets whether or not this button is capable of being the default button on the RootPane.
setDefaultCloseOperation(int) - Method in class javax.swing.JInternalFrame
Sets the operation which will happen by default when the user initiates a "close" on this window.
setDefaultCloseOperation(int) - Method in class javax.swing.JFrame
Sets the operation that will happen by default when the user initiates a "close" on this frame.
setDefaultCloseOperation(int) - Method in class javax.swing.JDialog
Sets the operation which will happen by default when the user initiates a "close" on this dialog.
setDefaultCursor(Cursor) - Method in class javax.swing.text.html.HTMLEditorKit
Sets the default cursor.
setDefaultDTD() - Static method in class javax.swing.text.html.parser.ParserDelegator
setDefaultEditor(Class, TableCellEditor) - Method in class javax.swing.JTable
Sets a default cell editor to be used if no editor has been set in a TableColumn.
setDefaultLightWeightPopupEnabled(boolean) - Static method in class javax.swing.JPopupMenu
Sets the default value for the lightWeightPopupEnabled property.
setDefaultQueue(LayoutQueue) - Static method in class javax.swing.text.LayoutQueue
Set the default layout queue.
setDefaultRenderer(Class, TableCellRenderer) - Method in class javax.swing.JTable
Sets a default cell renderer to be used if no renderer has been set in a TableColumn.
setDefaultRenderer(TableCellRenderer) - Method in class javax.swing.table.JTableHeader
Sets the default renderer to be used when no headerRenderer is defined by a TabelColumn.
setDefaultRequestProperty(String, String) - Static method in class java.net.URLConnection
Deprecated. The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
setDefaultSelection(JobAttributes.DefaultSelectionType) - Method in class java.awt.JobAttributes
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.
setDefaultStream(PrintStream) - Static method in class java.rmi.server.LogStream
Deprecated. no replacement
setDefaultUseCaches(boolean) - Method in class java.net.URLConnection
Sets the default value of the useCaches field to the specified value.
setDelay(int) - Method in class javax.swing.JMenu
Sets the suggested delay before the menu's PopupMenu is popped up or down.
setDelay(int) - Method in class javax.swing.Timer
Sets the Timer's delay, the number of milliseconds between successive actionPerfomed() messages to its listeners
setDerefLinkFlag(boolean) - Method in class javax.naming.directory.SearchControls
Enables/disables link dereferencing during the search.
setDescription(String) - Method in class javax.swing.ImageIcon
Sets the description of the image.
setDesignTime(boolean) - Static method in class java.beans.Beans
Used to indicate whether of not we are running in an application builder environment.
setDesignTime(boolean) - Method in interface java.beans.DesignMode
Sets the "value" of the "designTime" property.
setDesignTime(boolean) - Method in class java.beans.beancontext.BeanContextSupport
Sets the new design time value for this BeanContext.
setDesktopIcon(JInternalFrame.JDesktopIcon) - Method in class javax.swing.JInternalFrame
Sets the JDesktopIcon associated with this JInternalFrame.
setDesktopManager(DesktopManager) - Method in class javax.swing.JDesktopPane
Sets the DesktopManger that will handle desktop-specific UI actions.
setDesktopProperty(String, Object) - Method in class java.awt.Toolkit
set the named desktop property to the specified value and fire a property change event to notify any listeners that the value has changed
setDestination(JobAttributes.DestinationType) - Method in class java.awt.JobAttributes
Specifies whether output will be to a printer or a file for jobs using these attributes.
setDialog(JobAttributes.DialogType) - Method in class java.awt.JobAttributes
Specifies whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.
setDialogTitle(String) - Method in class javax.swing.JFileChooser
Sets the string that goes in the JFileChooser window's title bar.
setDialogType(int) - Method in class javax.swing.JFileChooser
Sets the type of this dialog.
setDictionary(byte[]) - Method in class java.util.zip.Deflater
Sets preset dictionary for compression.
setDictionary(byte[]) - Method in class java.util.zip.Inflater
Sets the preset dictionary to the given array of bytes.
setDictionary(byte[], int, int) - Method in class java.util.zip.Deflater
Sets preset dictionary for compression.
setDictionary(byte[], int, int) - Method in class java.util.zip.Inflater
Sets the preset dictionary to the given array of bytes.
setDigit(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for a digit in a pattern.
setDimensions(int, int) - Method in class java.awt.image.ImageFilter
Filters the information provided in the setDimensions method of the ImageConsumer interface.
setDimensions(int, int) - Method in class java.awt.image.ReplicateScaleFilter
Override the dimensions of the source image and pass the dimensions of the new scaled size to the ImageConsumer.
setDimensions(int, int) - Method in class java.awt.image.PixelGrabber
The setDimensions method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setDimensions(int, int) - Method in interface java.awt.image.ImageConsumer
The dimensions of the source image are reported using the setDimensions method call.
setDimensions(int, int) - Method in class java.awt.image.CropImageFilter
Override the source image's dimensions and pass the dimensions of the rectangular cropped region to the ImageConsumer.
setDimensions(int, int) - Method in class java.awt.image.BufferedImageFilter
Filters the information provided in the setDimensions method of the ImageConsumer interface.
setDirection(int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
setDirection(int) - Method in class javax.swing.plaf.basic.BasicArrowButton
setDirection(int) - Method in class javax.swing.plaf.basic.BasicSliderUI.ScrollListener
setDirection(short) - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Sets the direction.
setDirectory(String) - Method in class java.awt.FileDialog
Sets the directory of this file dialog window to be the specified directory.
setDirectoryName(String) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
setDirectoryName(String) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
setDisabledIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the disabled icon for the button.
setDisabledIcon(Icon) - Method in class javax.swing.JLabel
Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).
setDisabledIconAt(int, Icon) - Method in class javax.swing.JTabbedPane
Sets the disabled icon at index to icon which can be null.
setDisabledSelectedIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the disabled selection icon for the button.
setDisabledTextColor(Color) - Method in class javax.swing.text.JTextComponent
Sets the current color used to render the disabled text.
setDismissDelay(int) - Method in class javax.swing.ToolTipManager
Specifies the dismisal delay value.
setDisplayedMnemonic(char) - Method in class javax.swing.JLabel
Specifies the displayedMnemonic as a char value.
setDisplayedMnemonic(int) - Method in class javax.swing.JLabel
Specify a keycode that indicates a mnemonic key.
setDisplayName(String) - Method in class java.beans.FeatureDescriptor
Sets the localized display name of this feature.
setDividerLocation(double) - Method in class javax.swing.JSplitPane
Sets the divider location as a percentage of the JSplitPane's size.
setDividerLocation(int) - Method in class javax.swing.JSplitPane
Sets the location of the divider.
setDividerLocation(JSplitPane, int) - Method in class javax.swing.plaf.SplitPaneUI
Sets the location of the divider to location.
setDividerLocation(JSplitPane, int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Sets the location of the divider to location.
setDividerLocation(JSplitPane, int) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call setDividerLocation on each UI handled by this MultiUI.
setDividerSize(int) - Method in class javax.swing.JSplitPane
Sets the size of the divider.
setDividerSize(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneDivider
Sets the size of the divider to newSize.
setDockingColor(Color) - Method in class javax.swing.plaf.basic.BasicToolBarUI
Sets the color displayed when over a docking area
setDocument(Document) - Method in class javax.swing.JTextPane
Associates the editor with a text document.
setDocument(Document) - Method in class javax.swing.text.JTextComponent
Associates the editor with a text document.
setDocumentProperties(Dictionary) - Method in class javax.swing.text.AbstractDocument
Replace the document properties dictionary for this document.
setDoInput(boolean) - Method in class java.net.URLConnection
Sets the value of the doInput field for this URLConnection to the specified value.
setDoOutput(boolean) - Method in class java.net.URLConnection
Sets the value of the doOutput field for this URLConnection to the specified value.
setDot(int) - Method in class javax.swing.text.DefaultCaret
Sets the caret position and mark to some position.
setDot(int) - Method in interface javax.swing.text.Caret
Sets the caret position to some position.
setDouble(int, double) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java double value.
setDouble(Object, double) - Method in class java.lang.reflect.Field
Sets the value of a field as a double on the specified object.
setDouble(Object, int, double) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified double value.
setDoubleBuffered(boolean) - Method in class javax.swing.JComponent
Sets whether the receiving component should use a buffer to paint.
setDoubleBufferingEnabled(boolean) - Method in class javax.swing.RepaintManager
Enables or disables double buffering.
setDoubleBufferMaximumSize(Dimension) - Method in class javax.swing.RepaintManager
Set the maximum double buffer size.
setDraggedColumn(TableColumn) - Method in class javax.swing.table.JTableHeader
Sets the header's draggedColumn to aColumn
setDraggedDistance(int) - Method in class javax.swing.table.JTableHeader
Sets the header's draggedDistance to distance.
setDragMode(int) - Method in class javax.swing.JDesktopPane
Set the "dragging style" used by the desktop pane.
setDragOffset(Point) - Method in class javax.swing.plaf.metal.MetalToolBarUI
setDrawsLayeredHighlights(boolean) - Method in class javax.swing.text.DefaultHighlighter
If true, highlights are drawn as the Views draw the text.
setDropTarget(DropTarget) - Method in class java.awt.Component
Associate a DropTarget with this Component.
setDSTSavings(int) - Method in class java.util.SimpleTimeZone
Sets the amount of time in ms that the clock is advanced during DST.
setEastPane(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setEchoChar(char) - Method in class java.awt.TextField
Sets the echo character for this text field.
setEchoChar(char) - Method in class javax.swing.JPasswordField
Sets the echo character for this JPasswordField.
setEchoCharacter(char) - Method in class java.awt.TextField
Deprecated. As of JDK version 1.1, replaced by setEchoChar(char).
setEditable(boolean) - Method in class java.awt.TextComponent
Sets the flag that determines whether or not this text component is editable.
setEditable(boolean) - Method in class javax.swing.JComboBox
Determines whether the JComboBox field is editable.
setEditable(boolean) - Method in class javax.swing.JTree
Determines whether the tree is editable.
setEditable(boolean) - Method in class javax.swing.text.JTextComponent
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
setEditable(boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Configures the receiver to allow, or not allow, editing.
setEditingColumn(int) - Method in class javax.swing.JTable
Sets the editingColumn variable.
setEditingRow(int) - Method in class javax.swing.JTable
Sets the editingRow variable.
setEditor(ComboBoxEditor) - Method in class javax.swing.JComboBox
Sets the editor used to paint and edit the selected item in the JComboBox field.
setEditorKit(EditorKit) - Method in class javax.swing.JEditorPane
Sets the currently installed kit for handling content.
setEditorKit(EditorKit) - Method in class javax.swing.JTextPane
Sets the currently installed kit for handling content.
setEditorKitForContentType(String, EditorKit) - Method in class javax.swing.JEditorPane
Directly sets the editor kit to use for the given type.
setEditorSearchPath(String[]) - Static method in class java.beans.PropertyEditorManager
Change the list of package names that will be used for finding property editors.
setElem(int, int) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the first (default) bank from the given integer.
setElem(int, int) - Method in class java.awt.image.DataBufferUShort
Sets the requested data array element in the first (default) bank to the specified value.
setElem(int, int) - Method in class java.awt.image.DataBufferByte
Sets the requested data array element in the first (default) bank to the specified value.
setElem(int, int) - Method in class java.awt.image.DataBufferInt
Sets the requested data array element in the first (default) bank to the specified value.
setElem(int, int) - Method in class java.awt.image.DataBufferShort
Sets the requested data array element in the first (default) bank to the specified value.
setElem(int, int, int) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the specified bank from the given integer.
setElem(int, int, int) - Method in class java.awt.image.DataBufferUShort
Sets the requested data array element in the specified bank from the given integer.
setElem(int, int, int) - Method in class java.awt.image.DataBufferByte
Sets the requested data array element in the specified bank from the given integer.
setElem(int, int, int) - Method in class java.awt.image.DataBufferInt
Sets the requested data array element in the specified bank to the integer value i.
setElem(int, int, int) - Method in class java.awt.image.DataBufferShort
Sets the requested data array element in the specified bank from the given integer.
setElemDouble(int, double) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the first (default) bank from the given double.
setElemDouble(int, int, double) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the specified bank from the given double.
setElementAt(Object, int) - Method in class java.util.Vector
Sets the component at the specified index of this vector to be the specified object.
setElementAt(Object, int) - Method in class javax.swing.DefaultListModel
Sets the component at the specified index of this list to be the specified object.
setElemFloat(int, float) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the first (default) bank from the given float.
setElemFloat(int, int, float) - Method in class java.awt.image.DataBuffer
Sets the requested data array element in the specified bank from the given float.
setEnabled(boolean) - Method in class java.awt.Component
Enables or disables this component, depending on the value of the parameter b.
setEnabled(boolean) - Method in class java.awt.Component.AccessibleAWTComponent
Set the enabled state of the object.
setEnabled(boolean) - Method in class java.awt.MenuItem
Sets whether or not this menu item can be chosen.
setEnabled(boolean) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the enabled state of the object.
setEnabled(boolean) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the enabled state of the object.
setEnabled(boolean) - Method in interface javax.accessibility.AccessibleComponent
Sets the enabled state of the object.
setEnabled(boolean) - Method in class javax.swing.JComponent
Sets whether or not this component is enabled.
setEnabled(boolean) - Method in class javax.swing.ToolTipManager
Enables or disables the tooltip.
setEnabled(boolean) - Method in class javax.swing.AbstractButton
Enables (or disables) the button.
setEnabled(boolean) - Method in class javax.swing.JMenuItem
Enable or disable the menu item.
setEnabled(boolean) - Method in interface javax.swing.Action
Sets the enabled state of the Action.
setEnabled(boolean) - Method in interface javax.swing.ButtonModel
Enables or disables the button.
setEnabled(boolean) - Method in class javax.swing.JComboBox
Enables the combo box so that items can be selected.
setEnabled(boolean) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setEnabled(boolean) - Method in class javax.swing.DefaultButtonModel
Enables or disables the button.
setEnabled(boolean) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setEnabled(boolean) - Method in class javax.swing.AbstractAction
Enables or disables the action.
setEnabled(boolean) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the enabled state of the object.
setEnabled(boolean) - Method in class javax.swing.JScrollBar
Enables the component so that the knob position can be changed.
setEnabled(boolean) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setEnabledAt(int, boolean) - Method in class javax.swing.JTabbedPane
Sets whether or not the tab at index is enabled.
setEndIndex(int) - Method in class java.text.FieldPosition
Sets the end index.
setEndRule(int, int, int) - Method in class java.util.SimpleTimeZone
Sets the DST end rule to a fixed date within a month.
setEndRule(int, int, int, int) - Method in class java.util.SimpleTimeZone
Sets the daylight savings ending rule.
setEndRule(int, int, int, int, boolean) - Method in class java.util.SimpleTimeZone
Sets the DST end rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
setEnvironment(Hashtable) - Method in class javax.naming.CannotProceedException
Sets the environment that will be returned when getEnvironment() is called.
setEras(String[]) - Method in class java.text.DateFormatSymbols
Sets era strings.
setErr(PrintStream) - Static method in class java.lang.System
Reassigns the "standard" error output stream.
setError() - Method in class java.io.PrintStream
Set the error state of the stream to true.
setError() - Method in class java.io.PrintWriter
Indicate that an error has occurred.
setErrorIndex(int) - Method in class java.text.ParsePosition
Set the index at which a parse error occurred.
setEscapeProcessing(boolean) - Method in interface java.sql.Statement
Sets escape processing on or off.
setExpandedIcon(Icon) - Method in class javax.swing.plaf.basic.BasicTreeUI
setExpandedState(TreePath, boolean) - Method in class javax.swing.JTree
Sets the expanded state of this JTree.
setExpandedState(TreePath, boolean) - Method in class javax.swing.tree.AbstractLayoutCache
Marks the path path expanded state to isExpanded.
setExpandedState(TreePath, boolean) - Method in class javax.swing.tree.VariableHeightLayoutCache
Marks the path path expanded state to isExpanded.
setExpandedState(TreePath, boolean) - Method in class javax.swing.tree.FixedHeightLayoutCache
Marks the path path expanded state to isExpanded.
setExpandsSelectedPaths(boolean) - Method in class javax.swing.JTree
Configures the expandsSelectedPaths property.
setExpert(boolean) - Method in class java.beans.FeatureDescriptor
The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.
setExtent(int) - Method in class javax.swing.DefaultBoundedRangeModel
Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
setExtent(int) - Method in interface javax.swing.BoundedRangeModel
Sets the model's extent.
setExtent(int) - Method in class javax.swing.JSlider
Sets the size of the range "covered" by the knob.
setExtentSize(Dimension) - Method in class javax.swing.JViewport
Sets the size of the visible part of the view using view coordinates.
setExtra(byte[]) - Method in class java.util.zip.ZipEntry
Sets the optional extra field data for the entry.
setFailureHandler(RMIFailureHandler) - Static method in class java.rmi.server.RMISocketFactory
Sets the failure handler to be called by the RMI runtime if server socket creation fails.
setFetchDirection(int) - Method in interface java.sql.Statement
Gives the driver a hint as to the direction in which the rows in a result set will be processed.
setFetchDirection(int) - Method in interface java.sql.ResultSet
Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
setFetchSize(int) - Method in interface java.sql.Statement
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
setFetchSize(int) - Method in interface java.sql.ResultSet
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
setFile(String) - Method in class java.awt.FileDialog
Sets the selected file for this file dialog window to be the specified file.
setFileFilter(FileFilter) - Method in class javax.swing.JFileChooser
Sets the current file filter.
setFileHidingEnabled(boolean) - Method in class javax.swing.JFileChooser
Sets file hiding on or off.
setFileName(String) - Method in class java.awt.JobAttributes
Specifies the file name for the output file for jobs using these attributes.
setFileName(String) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
setFileName(String) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
setFilenameFilter(FilenameFilter) - Method in class java.awt.FileDialog
Sets the filename filter for this file dialog window to the specified filter.
setFileNameMap(FileNameMap) - Static method in class java.net.URLConnection
Sets the FileNameMap.
setFileSelectionMode(int) - Method in class javax.swing.JFileChooser
Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories.
setFileSystemView(FileSystemView) - Method in class javax.swing.JFileChooser
Sets the file system view that the JFileChooser uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.
setFileView(FileView) - Method in class javax.swing.JFileChooser
Sets the file view to used to retrieve UI information, such as the icon that represents a file or the type description of a file.
setFirstDayOfWeek(int) - Method in class java.util.Calendar
Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
setFirstLineIndent(float) - Method in class javax.swing.text.ParagraphView
Set the indent on the first line
setFirstLineIndent(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets the first line indent.
setFixedCellHeight(int) - Method in class javax.swing.JList
Sets the height of every cell in the list.
setFixedCellWidth(int) - Method in class javax.swing.JList
Sets the width of every cell in the list.
setFlashColor(Color) - Static method in class javax.swing.DebugGraphics
Sets the Color used to flash drawing operations.
setFlashCount(int) - Static method in class javax.swing.DebugGraphics
Sets the number of times that drawing operations will flash.
setFlashTime(int) - Static method in class javax.swing.DebugGraphics
Sets the time delay of drawing operation flashing.
setFlavorMap(FlavorMap) - Method in class java.awt.dnd.DropTarget
This method sets the FlavorMap associated with this DropTarget.
setFloat(int, float) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java float value.
setFloat(Object, float) - Method in class java.lang.reflect.Field
Sets the value of a field as a float on the specified object.
setFloat(Object, int, float) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified float value.
setFloatable(boolean) - Method in class javax.swing.JToolBar
Sets whether the toolbar can be made to float.
setFloating(boolean, Point) - Method in class javax.swing.plaf.basic.BasicToolBarUI
setFloatingColor(Color) - Method in class javax.swing.plaf.basic.BasicToolBarUI
Sets the color displayed when over a floating area
setFloatingLocation(int, int) - Method in class javax.swing.plaf.basic.BasicToolBarUI
setFocusAccelerator(char) - Method in class javax.swing.text.JTextComponent
Sets the key accelerator that will cause the receiving text component to get the focus.
setFocusPainted(boolean) - Method in class javax.swing.AbstractButton
Sets whether focus should be painted.
setFollowRedirects(boolean) - Static method in class java.net.HttpURLConnection
Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this class.
setFont(Font) - Method in class java.awt.Component
Sets the font of this component.
setFont(Font) - Method in class java.awt.Container
Sets the font of this container.
setFont(Font) - Method in class java.awt.Component.AccessibleAWTComponent
Set the Font of this object.
setFont(Font) - Method in class java.awt.MenuComponent
Sets the font to be used for this menu component to the specified font.
setFont(Font) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the Font of this object.
setFont(Font) - Method in class java.awt.Graphics
Sets this graphics context's font to the specified font.
setFont(Font) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the Font of this object.
setFont(Font) - Method in interface javax.accessibility.AccessibleComponent
Sets the Font of this object.
setFont(Font) - Method in class javax.swing.JComponent
Sets the font for this component.
setFont(Font) - Method in class javax.swing.JTextField
Sets the current font.
setFont(Font) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setFont(Font) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setFont(Font) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the Font of this object.
setFont(Font) - Method in class javax.swing.JTextArea
Sets the current font.
setFont(Font) - Method in class javax.swing.DebugGraphics
Sets the Font used for text drawing operations.
setFont(Font) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setFont(Font) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Subclassed to map FontUIResources to null.
setFont(Font) - Method in class javax.swing.tree.DefaultTreeCellEditor
Sets the font to edit with.
setFontFamily(MutableAttributeSet, String) - Static method in class javax.swing.text.StyleConstants
Sets the font attribute.
setFontSize(MutableAttributeSet, int) - Static method in class javax.swing.text.StyleConstants
Sets the font size attribute.
setForeground(Color) - Method in class java.awt.Component
Sets the foreground color of this component.
setForeground(Color) - Method in class java.awt.Component.AccessibleAWTComponent
Set the foreground color of this object.
setForeground(Color) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the foreground color of this object.
setForeground(Color) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the foreground color of this object.
setForeground(Color) - Method in interface javax.accessibility.AccessibleComponent
Sets the foreground color of this object.
setForeground(Color) - Method in class javax.swing.JComponent
Sets the foreground color of this component.
setForeground(Color) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setForeground(Color) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setForeground(Color) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the foreground color of this object.
setForeground(Color) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setForeground(Color) - Method in class javax.swing.table.DefaultTableCellRenderer
Overrides JComponent.setForeground to assign the unselected-foreground color to the specified color.
setForeground(MutableAttributeSet, Color) - Static method in class javax.swing.text.StyleConstants
Sets the foreground color.
setForegroundAt(int, Color) - Method in class javax.swing.JTabbedPane
Sets the foreground color at index to foreground which can be null, in which case the tab's foreground color will default to the foreground color of this tabbedpane.
setFormat(int, Format) - Method in class java.text.MessageFormat
Set a format to be used on a variable in the pattern.
setFormats(Format[]) - Method in class java.text.MessageFormat
Sets formats to use on parameters.
setFrame(double, double, double, double) - Method in class java.awt.geom.RectangularShape
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
setFrame(double, double, double, double) - Method in class java.awt.geom.Rectangle2D
Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values.
setFrame(double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D
Sets the location and size of the outer bounds of this RoundRectangle2D to the specified rectangular values.
setFrame(double, double, double, double) - Method in class java.awt.geom.Arc2D
Sets the location and size of the outer bounds of this arc to the specified values.
setFrame(double, double, double, double) - Method in class java.awt.geom.Ellipse2D.Float
Sets the location and size of this Ellipse2D to the specified double values.
setFrame(double, double, double, double) - Method in class java.awt.geom.Ellipse2D.Double
Sets the location and size of this Ellipse2D to the specified double values.
setFrame(float, float, float, float) - Method in class java.awt.geom.Ellipse2D.Float
Sets the location and size of this Ellipse2D to the specified float values.
setFrame(Point2D, Dimension2D) - Method in class java.awt.geom.RectangularShape
Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
setFrame(Rectangle2D) - Method in class java.awt.geom.RectangularShape
Sets the framing rectangle of this Shape to be the specified Rectangle2D.
setFrameFromCenter(double, double, double, double) - Method in class java.awt.geom.RectangularShape
Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
setFrameFromCenter(Point2D, Point2D) - Method in class java.awt.geom.RectangularShape
Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
setFrameFromDiagonal(double, double, double, double) - Method in class java.awt.geom.RectangularShape
Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
setFrameFromDiagonal(Point2D, Point2D) - Method in class java.awt.geom.RectangularShape
Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
setFrameIcon(Icon) - Method in class javax.swing.JInternalFrame
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner).
setFramePosition(int) - Method in interface javax.sound.sampled.Clip
Sets the media position in sample frames.
setFreeStanding(boolean) - Method in class javax.swing.plaf.metal.MetalScrollButton
setFromPage(int) - Method in class java.awt.JobAttributes
Specifies, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed.
setFullBufferUpdates(boolean) - Method in class java.awt.image.MemoryImageSource
Specify whether this animated memory image should always be updated by sending the complete buffer of pixels whenever there is a change.
setGlassPane(Component) - Method in class javax.swing.JWindow
Sets the glassPane property.
setGlassPane(Component) - Method in class javax.swing.JApplet
Sets the glassPane property.
setGlassPane(Component) - Method in class javax.swing.JInternalFrame
Sets this JInternalFrame's glassPane property.
setGlassPane(Component) - Method in class javax.swing.JFrame
Sets the glassPane property.
setGlassPane(Component) - Method in interface javax.swing.RootPaneContainer
The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane.
setGlassPane(Component) - Method in class javax.swing.JRootPane
Sets a specified Component to be the glass pane for this root pane.
setGlassPane(Component) - Method in class javax.swing.JDialog
Sets the glassPane property.
setGlyphPainter(GlyphView.GlyphPainter) - Method in class javax.swing.text.GlyphView
Sets the painter to use for rendering glyphs.
setGlyphPosition(int, Point2D) - Method in class java.awt.font.GlyphVector
Sets the position of the specified glyph within this GlyphVector.
setGlyphTransform(int, AffineTransform) - Method in class java.awt.font.GlyphVector
Sets the transform of the specified glyph within this GlyphVector.
setGregorianChange(Date) - Method in class java.util.GregorianCalendar
Sets the GregorianCalendar change date.
setGridColor(Color) - Method in class javax.swing.JTable
Sets the color used to draw grid lines to gridColor and redisplays.
setGridLocation(int, int) - Method in class javax.swing.text.TableView.TableCell
Deprecated. Sets the grid location.
setGroup(ButtonGroup) - Method in interface javax.swing.ButtonModel
Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
setGroup(ButtonGroup) - Method in class javax.swing.DefaultButtonModel
Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
setGroupingSeparator(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for thousands separator.
setGroupingSize(int) - Method in class java.text.DecimalFormat
Set the grouping size.
setGroupingUsed(boolean) - Method in class java.text.NumberFormat
Set whether or not grouping will be used in this format.
setGuiAvailable(boolean) - Static method in class java.beans.Beans
Used to indicate whether of not we are running in an environment where GUI interaction is available.
setHashColor(Color) - Method in class javax.swing.plaf.basic.BasicTreeUI
setHeaderRenderer(TableCellRenderer) - Method in class javax.swing.table.TableColumn
Sets the TableCellRenderer used to draw the TableColumn's header to headerRenderer.
setHeaderValue(Object) - Method in class javax.swing.table.TableColumn
Sets the Object whose string representation will be used as the value for the headerRenderer.
setHelpMenu(JMenu) - Method in class javax.swing.JMenuBar
Sets the help menu that appears when the user selects the "help" option in the menu bar.
setHelpMenu(Menu) - Method in class java.awt.MenuBar
Sets the specified menu to be this menu bar's help menu.
setHgap(int) - Method in class java.awt.CardLayout
Sets the horizontal gap between components.
setHgap(int) - Method in class java.awt.GridLayout
Sets the horizontal gap between components to the specified value.
setHgap(int) - Method in class java.awt.BorderLayout
Sets the horizontal gap between components.
setHgap(int) - Method in class java.awt.FlowLayout
Sets the horizontal gap between components.
setHidden(boolean) - Method in class java.beans.FeatureDescriptor
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
setHighlighter(Highlighter) - Method in class javax.swing.text.JTextComponent
Sets the highlighter to be used.
setHints(int) - Method in class java.awt.image.ImageFilter
Filters the information provided in the setHints method of the ImageConsumer interface.
setHints(int) - Method in class java.awt.image.PixelGrabber
The setHints method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setHints(int) - Method in interface java.awt.image.ImageConsumer
The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front.
setHints(int) - Method in class java.awt.image.AreaAveragingScaleFilter
Detect if the data is being delivered with the necessary hints to allow the averaging algorithm to do its work.
setHorizontalAlignment(int) - Method in class javax.swing.AbstractButton
Sets the horizontal alignment of the icon and text.
setHorizontalAlignment(int) - Method in class javax.swing.JTextField
Sets the horizontal alignment of the text.
setHorizontalAlignment(int) - Method in class javax.swing.JLabel
Sets the alignment of the label's contents along the X axis.
setHorizontalScrollBar(JScrollBar) - Method in class javax.swing.JScrollPane
Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.
setHorizontalScrollBarPolicy(int) - Method in class javax.swing.ScrollPaneLayout
Sets the horizontal scrollbar-display policy.
setHorizontalScrollBarPolicy(int) - Method in class javax.swing.JScrollPane
Determines when the horizontal scrollbar appears in the scrollpane.
setHorizontalTextPosition(int) - Method in class javax.swing.AbstractButton
Sets the horizontal position of the text relative to the icon.
setHorizontalTextPosition(int) - Method in class javax.swing.JLabel
Sets the horizontal position of the label's text, relative to its image.
setHours(int) - Method in class java.sql.Date
Deprecated.
setHours(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours).
setHumanPresentableName(String) - Method in class java.awt.datatransfer.DataFlavor
Sets the human presentable name for the data format that this DataFlavor represents.
setIcon(boolean) - Method in class javax.swing.JInternalFrame
Iconizes and de-iconizes the frame.
setIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the button's default icon.
setIcon(Icon) - Method in class javax.swing.JOptionPane
Sets the icon to display.
setIcon(Icon) - Method in class javax.swing.JLabel
Defines the icon this component will display.
setIcon(MutableAttributeSet, Icon) - Static method in class javax.swing.text.StyleConstants
Sets the icon attribute.
setIconAt(int, Icon) - Method in class javax.swing.JTabbedPane
Sets the icon at index to icon which can be null.
setIconifiable(boolean) - Method in class javax.swing.JInternalFrame
Sets that the JInternalFrame can be made an icon by some user action.
setIconImage(Image) - Method in class java.awt.Frame
Sets the image to displayed in the minimized icon for this frame.
setIconOnly(boolean) - Method in class javax.swing.plaf.metal.MetalComboBoxButton
setIconTextGap(int) - Method in class javax.swing.JLabel
If both the icon and text properties are set, this property defines the space between them.
setID(String) - Method in class java.util.TimeZone
Sets the time zone ID.
setIdentifier(Object) - Method in class javax.swing.table.TableColumn
Sets the TableColumn's identifier to anIdentifier.
setIfModifiedSince(long) - Method in class java.net.URLConnection
Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
setImage(Image) - Method in class javax.swing.ImageIcon
Sets the image displayed by this icon.
setImageableArea(double, double, double, double) - Method in class java.awt.print.Paper
Sets the imageable area of this Paper.
setImageObserver(ImageObserver) - Method in class javax.swing.ImageIcon
Sets the image observer for the image.
setIn(InputStream) - Static method in class java.lang.System
Reassigns the "standard" input stream.
setInDefaultEventSet(boolean) - Method in class java.beans.EventSetDescriptor
Mark an event set as being in the "default" set (or not).
setIndentSpace(int) - Method in class javax.swing.text.AbstractWriter
Enables subclasses to specify how many spaces an indent maps to.
setIndex(int) - Method in class java.text.ParsePosition
Set the current parse position.
setIndex(int) - Method in interface java.text.CharacterIterator
Sets the position to the specified position in the text and returns that character.
setIndex(int) - Method in class java.text.StringCharacterIterator
Implements CharacterIterator.setIndex() for String.
setIndex(int) - Method in class javax.swing.text.Segment
Sets the position to the specified position in the text and returns that character.
setIndexedReadMethod(Method) - Method in class java.beans.IndexedPropertyDescriptor
Sets the method that should be used to read an indexed property value.
setIndexedWriteMethod(Method) - Method in class java.beans.IndexedPropertyDescriptor
Sets the method that should be used to write an indexed property value.
setInfinity(String) - Method in class java.text.DecimalFormatSymbols
Set the character used to represent infinity.
setInfo(String) - Method in class java.security.Identity
Deprecated. Specifies a general information string for this identity.
setInitialContextFactoryBuilder(InitialContextFactoryBuilder) - Static method in class javax.naming.spi.NamingManager
Sets the InitialContextFactory builder to be builder.
setInitialDelay(int) - Method in class javax.swing.ToolTipManager
Specifies the initial delay value.
setInitialDelay(int) - Method in class javax.swing.Timer
Sets the Timer's initial delay.
setInitialSelectionValue(Object) - Method in class javax.swing.JOptionPane
Sets the initial selection value.
setInitialValue(Object) - Method in class javax.swing.JOptionPane
Sets the initial value that is to be enabled -- the Component that has the focus when the pane is initially displayed.
setInnerHTML(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Replaces the children of the given element with the contents specified as an HTML string.
setInput(byte[]) - Method in class java.util.zip.Deflater
Sets input data for compression.
setInput(byte[]) - Method in class java.util.zip.Inflater
Sets input data for decompression.
setInput(byte[], int, int) - Method in class java.util.zip.Deflater
Sets input data for compression.
setInput(byte[], int, int) - Method in class java.util.zip.Inflater
Sets input data for decompression.
setInputMap(int, InputMap) - Method in class javax.swing.JComponent
Sets the InputMap to use under the condition condition to map.
setInputMethodContext(InputMethodContext) - Method in interface java.awt.im.spi.InputMethod
Sets the input method context, which is used to dispatch input method events to the client component and to request information from the client component.
setInputValue(Object) - Method in class javax.swing.JOptionPane
Sets the user's input-value.
setInputVerifier(InputVerifier) - Method in class javax.swing.JComponent
Sets the input verifier for this component.
setInsets(short, short, short, short) - Method in class javax.swing.text.CompositeView
Sets the insets for the view.
setInstalledLookAndFeels(UIManager.LookAndFeelInfo[]) - Static method in class javax.swing.UIManager
Replaces the current array of installed LookAndFeelInfos.
setInstanceFollowRedirects(boolean) - Method in class java.net.HttpURLConnection
Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this HttpURLConnection instance.
setInt(int, int) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java int value.
setInt(Object, int) - Method in class java.lang.reflect.Field
Sets the value of a field as an int on the specified object.
setInt(Object, int, int) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified int value.
setIntercellSpacing(Dimension) - Method in class javax.swing.JTable
Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
setInterface(InetAddress) - Method in class java.net.MulticastSocket
Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface.
setInternalFrame(JInternalFrame) - Method in class javax.swing.JInternalFrame.JDesktopIcon
Sets the JInternalFrame that this DesktopIcon is associated with.
setInternationalCurrencySymbol(String) - Method in class java.text.DecimalFormatSymbols
Set the international string denoting the local currency.
setInverted(boolean) - Method in class javax.swing.JSlider
Specify true to reverse the value-range shown for the slider and false to put the value range in the normal order.
setInvoker(Component) - Method in class javax.swing.JPopupMenu
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
setInvokesStopCellEditing(boolean) - Method in class javax.swing.JTree
Determines what happens when editing is interrupted by selecting another node in the tree, a change in the tree's data, or by some other means.
setItalic(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the italic attribute.
setItem(Object) - Method in interface javax.swing.ComboBoxEditor
Set the item that should be edited.
setItem(Object) - Method in class javax.swing.plaf.basic.BasicComboBoxEditor
setJMenuBar(JMenuBar) - Method in class javax.swing.JApplet
Sets the menubar for this applet.
setJMenuBar(JMenuBar) - Method in class javax.swing.JInternalFrame
Sets the JMenuBar for this JInternalFrame.
setJMenuBar(JMenuBar) - Method in class javax.swing.JFrame
Sets the menubar for this frame.
setJMenuBar(JMenuBar) - Method in class javax.swing.JRootPane
Adds or changes the menu bar used in the layered pane.
setJMenuBar(JMenuBar) - Method in class javax.swing.JDialog
Sets the menubar for this dialog.
setJobName(String) - Method in class java.awt.print.PrinterJob
Sets the name of the document to be printed.
setJustification(int) - Method in class javax.swing.text.ParagraphView
Set the type of justification.
setKeepAlive(boolean) - Method in class java.net.Socket
Enable/disable SO_KEEPALIVE.
setKeyBindingActive(boolean) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setKeyBindingRegistered(boolean) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setKeyChar(char) - Method in class java.awt.event.KeyEvent
Set the keyChar value to indicate a logical character.
setKeyCode(int) - Method in class java.awt.event.KeyEvent
Set the keyCode value to indicate a physical key.
setKeyEntry(String, byte[], Certificate[]) - Method in class java.security.KeyStore
Assigns the given key (that has already been protected) to the given alias.
setKeyEntry(String, Key, char[], Certificate[]) - Method in class java.security.KeyStore
Assigns the given key to the given alias, protecting it with the given password.
setKeymap(Keymap) - Method in class javax.swing.text.JTextComponent
Sets the keymap to use for binding events to actions.
setKeyPair(KeyPair) - Method in class java.security.Signer
Deprecated. Sets the key pair (public key and private key) for this signer.
setKeySelectionManager(JComboBox.KeySelectionManager) - Method in class javax.swing.JComboBox
Sets the object that translates a keyboard character into a list selection.
setLabel(String) - Method in class java.awt.MenuItem
Sets the label for this menu item to the specified label.
setLabel(String) - Method in class java.awt.Checkbox
Sets this check box's label to be the string argument.
setLabel(String) - Method in class java.awt.Button
Sets the button's label to be the specified string.
setLabel(String) - Method in class javax.swing.AbstractButton
Deprecated. - Replaced by setText(text)
setLabel(String) - Method in class javax.swing.JPopupMenu
Sets the popup menu's label.
setLabel(String) - Method in class javax.swing.text.html.Option
Sets the label to be used for the option.
setLabelFor(Component) - Method in class javax.swing.JLabel
Set the component this is labelling.
setLabelTable(Dictionary) - Method in class javax.swing.JSlider
Used to specify what label will be drawn at any given value.
setLargeModel(boolean) - Method in class javax.swing.JTree
Specifies whether the UI should use a large model.
setLargeModel(boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Updates the componentListener, if necessary.
setLastDividerLocation(int) - Method in class javax.swing.JSplitPane
Sets the last location the divider was at to newLastLocation.
setLastDragLocation(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Set the last drag location of the JSplitPane.
setLastModified(long) - Method in class java.io.File
Sets the last-modified time of the file or directory named by this abstract pathname.
setLayer(Component, int) - Method in class javax.swing.JLayeredPane
Sets the layer attribute on the specified component, making it the bottommost component in that layer.
setLayer(Component, int, int) - Method in class javax.swing.JLayeredPane
Sets the layer attribute for the specified component and also sets its position within that layer.
setLayer(int) - Method in class javax.swing.JInternalFrame
Convenience method for setting the layer attribute of this component.
setLayer(Integer) - Method in class javax.swing.JInternalFrame
Convenience method for setting the layer attribute of this component.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JWindow
Sets the layeredPane property.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JApplet
Sets the layeredPane property.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JInternalFrame
Sets this JInternalFrame's layeredPane property.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JFrame
Sets the layeredPane property.
setLayeredPane(JLayeredPane) - Method in interface javax.swing.RootPaneContainer
A Container that manages the contentPane and in some cases a menu bar.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JRootPane
Set the layered pane for the root pane.
setLayeredPane(JLayeredPane) - Method in class javax.swing.JDialog
Sets the layeredPane property.
setLayout(LayoutManager) - Method in class java.awt.Container
Sets the layout manager for this container.
setLayout(LayoutManager) - Method in class java.awt.ScrollPane
Sets the layout manager for this container.
setLayout(LayoutManager) - Method in class javax.swing.JWindow
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
setLayout(LayoutManager) - Method in class javax.swing.JApplet
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
setLayout(LayoutManager) - Method in class javax.swing.JInternalFrame
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
setLayout(LayoutManager) - Method in class javax.swing.JFrame
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
setLayout(LayoutManager) - Method in class javax.swing.Box
Throws an AWTError, since a Box can use only a BoxLayout.
setLayout(LayoutManager) - Method in class javax.swing.JScrollPane
Sets the layout manager for this JScrollPane.
setLayout(LayoutManager) - Method in class javax.swing.JDialog
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
setLeadAnchorNotificationEnabled(boolean) - Method in class javax.swing.DefaultListSelectionModel
Sets the value of the leadAnchorNotificationEnabled flag.
setLeadSelectionIndex(int) - Method in class javax.swing.DefaultListSelectionModel
Sets the lead selection index, ensuring that values between the anchor and the new lead are either all selected or all deselected.
setLeadSelectionIndex(int) - Method in interface javax.swing.ListSelectionModel
Set the lead selection index.
setLeadSelectionPath(TreePath) - Method in class javax.swing.JTree
Sets the path identifies as the lead.
setLeafIcon(Icon) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the icon used to represent leaf nodes.
setLeftChildIndent(int) - Method in class javax.swing.plaf.basic.BasicTreeUI
setLeftComponent(Component) - Method in class javax.swing.JSplitPane
Sets the component to the left (or above) the divider.
setLeftIndent(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets left indent.
setLeftInset(float) - Method in class javax.swing.text.AsyncBoxView
Set the left part of the margin around the view.
setLength(int) - Method in class java.lang.StringBuffer
Sets the length of this String buffer.
setLength(int) - Method in class java.net.DatagramPacket
Set the length for this packet.
setLength(long) - Method in class java.io.RandomAccessFile
Sets the length of this file.
setLenient(boolean) - Method in class java.text.DateFormat
Specify whether or not date/time parsing is to be lenient.
setLenient(boolean) - Method in class java.util.Calendar
Specify whether or not date/time interpretation is to be lenient.
setLevel(int) - Method in class java.util.zip.ZipOutputStream
Sets the compression level for subsequent entries which are DEFLATED.
setLevel(int) - Method in class java.util.zip.Deflater
Sets the current compression level to the specified value.
setLightWeightPopupEnabled(boolean) - Method in class javax.swing.ToolTipManager
When displaying the JToolTip, the ToolTipManager choose to use a light weight JPanel if it fits.
setLightWeightPopupEnabled(boolean) - Method in class javax.swing.JPopupMenu
When displaying the popup, JPopupMenu chooses to use a light weight popup if it fits.
setLightWeightPopupEnabled(boolean) - Method in class javax.swing.JComboBox
When displaying the popup, JComboBox choose to use a light weight popup if it fits.
setLimit(int) - Method in class javax.swing.undo.UndoManager
Set the maximum number of edits this UndoManager will hold.
setLine(double, double, double, double) - Method in class java.awt.geom.Line2D
Sets the location of the endpoints of this Line2D to the specified double coordinates.
setLine(double, double, double, double) - Method in class java.awt.geom.Line2D.Float
Sets the location of the endpoints of this Line2D to the specified double coordinates.
setLine(double, double, double, double) - Method in class java.awt.geom.Line2D.Double
Sets the location of the endpoints of this Line2D to the specified double coordinates.
setLine(float, float, float, float) - Method in class java.awt.geom.Line2D.Float
Sets the location of the endpoints of this Line2D to the specified float coordinates.
setLine(Line2D) - Method in class java.awt.geom.Line2D
Sets the location of the endpoints of this Line2D to the same as those endpoints of the specified Line2D.
setLine(Point2D, Point2D) - Method in class java.awt.geom.Line2D
Sets the location of the endpoints of this Line2D to the specified Point2D coordinates.
setLineIncrement(int) - Method in class java.awt.Scrollbar
Deprecated. As of JDK version 1.1, replaced by setUnitIncrement(int).
setLineLength(int) - Method in class javax.swing.text.AbstractWriter
Enables subclasses to set the number of characters they want written per line.
setLineNumber(int) - Method in class java.io.LineNumberReader
Set the current line number.
setLineNumber(int) - Method in class java.io.LineNumberInputStream
Deprecated. Sets the line number to the specified argument.
setLineSeparator(String) - Method in class javax.swing.text.AbstractWriter
Sets the String used to reprsent newlines.
setLineSpacing(float) - Method in class javax.swing.text.ParagraphView
Set the line spacing.
setLineSpacing(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets line spacing.
setLineWrap(boolean) - Method in class javax.swing.JTextArea
Sets the line-wrapping policy of the text area.
setLinkCursor(Cursor) - Method in class javax.swing.text.html.HTMLEditorKit
Sets the cursor to use over links.
setLinkExplanation(String) - Method in class javax.naming.LinkException
Sets the explanation associated with the problem encounter when resolving a link.
setLinkRemainingName(Name) - Method in class javax.naming.LinkException
Sets the remaining link name field of this exception.
setLinkResolvedName(Name) - Method in class javax.naming.LinkException
Sets the resolved link name field of this exception.
setLinkResolvedObj(Object) - Method in class javax.naming.LinkException
Sets the link resolved object field of this exception.
setListData(Object[]) - Method in class javax.swing.JList
Constructs a ListModel from an array of objects and then applies setModel to it.
setListData(Vector) - Method in class javax.swing.JList
Constructs a ListModel from a Vector and then applies setModel to it.
setLocale(Locale) - Method in class java.awt.Component
Sets the locale of this component.
setLocale(Locale) - Method in interface java.awt.im.spi.InputMethod
Attempts to set the input locale.
setLocale(Locale) - Method in class java.beans.beancontext.BeanContextSupport
Sets the locale of this BeanContext.
setLocale(Locale) - Method in class java.text.MessageFormat
Constructs with the specified pattern and formats for the arguments in that pattern.
setLocalPatternChars(String) - Method in class java.text.DateFormatSymbols
Sets localized date-time pattern characters.
setLocation(double, double) - Method in class java.awt.Point
Sets the location of this point to the specified float coordinates.
setLocation(double, double) - Method in class java.awt.geom.Point2D
Sets the location of this Point2D to the specified float coordinates.
setLocation(double, double) - Method in class java.awt.geom.Point2D.Float
Sets the location of this Point2D to the specified double coordinates.
setLocation(double, double) - Method in class java.awt.geom.Point2D.Double
Sets the location of this Point2D to the specified double coordinates.
setLocation(float, float) - Method in class java.awt.geom.Point2D.Float
Sets the location of this Point2D to the specified float coordinates.
setLocation(int, int) - Method in class java.awt.Component
Moves this component to a new location.
setLocation(int, int) - Method in class java.awt.Point
Changes the point to have the specificed location.
setLocation(int, int) - Method in class java.awt.Rectangle
Moves this Rectangle to the specified location.
setLocation(int, int) - Method in class javax.swing.JPopupMenu
Sets the location of the upper left corner of the popup menu using x, y coordinates.
setLocation(Point) - Method in class java.awt.Component
Moves this component to a new location.
setLocation(Point) - Method in class java.awt.Component.AccessibleAWTComponent
Sets the location of the object relative to the parent.
setLocation(Point) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Sets the location of the object relative to the parent.
setLocation(Point) - Method in class java.awt.Point
Sets the location of the point to the specificed location.
setLocation(Point) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Sets the location of the object relative to the parent.
setLocation(Point) - Method in class java.awt.Rectangle
Moves this Rectangle to the specified location.
setLocation(Point) - Method in interface javax.accessibility.AccessibleComponent
Sets the location of the object relative to the parent.
setLocation(Point) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setLocation(Point) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setLocation(Point) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the location of the object relative to the parent.
setLocation(Point) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setLocation(Point2D) - Method in class java.awt.geom.Point2D
Sets the location of this Point2D to the same coordinates as the specified Point2D object.
setLocationRelativeTo(Component) - Method in class javax.swing.JDialog
Sets the location of the dialog relative to the specified component.
setLockingKeyState(int, boolean) - Method in class java.awt.Toolkit
Sets the state of the given locking key on the keyboard.
setLog(OutputStream) - Static method in class java.rmi.server.RemoteServer
Log RMI calls to the output stream out.
setLogicalStyle(int, Style) - Method in interface javax.swing.text.StyledDocument
Sets the logical style to use for the paragraph at the given position.
setLogicalStyle(int, Style) - Method in class javax.swing.text.DefaultStyledDocument
Sets the logical style to use for the paragraph at the given position.
setLogicalStyle(Style) - Method in class javax.swing.JTextPane
Sets the logical style to use for the paragraph at the current caret position.
setLoginTimeout(int) - Static method in class java.sql.DriverManager
Sets the maximum time in seconds that a driver will wait while attempting to connect to a database.
setLogStream(PrintStream) - Static method in class java.sql.DriverManager
Deprecated.
setLogStream(PrintStream) - Static method in class javax.swing.DebugGraphics
Sets the stream to which the DebugGraphics logs drawing operations.
setLogTimers(boolean) - Static method in class javax.swing.Timer
Enables or disables the timer log.
setLogWriter(PrintWriter) - Static method in class java.sql.DriverManager
Sets the logging/tracing PrintWriter object that is used by the DriverManager and all drivers.
setLong(int, long) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java long value.
setLong(Object, int, long) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified long value.
setLong(Object, long) - Method in class java.lang.reflect.Field
Sets the value of a field as a long on the specified object.
setLookAndFeel(LookAndFeel) - Static method in class javax.swing.UIManager
Set the current default look and feel using a LookAndFeel object.
setLookAndFeel(String) - Static method in class javax.swing.UIManager
Set the current default look and feel using a class name.
setLoopPoints(int, int) - Method in interface javax.sound.sampled.Clip
Sets the first and last sample frames that will be played in the loop.
setMagicCaretPosition(Point) - Method in class javax.swing.text.DefaultCaret
Saves the current caret position.
setMagicCaretPosition(Point) - Method in interface javax.swing.text.Caret
Set the current caret visual location.
setMajorOffset(float) - Method in class javax.swing.text.AsyncBoxView.ChildState
This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location.
setMajorTickSpacing(int) - Method in class javax.swing.JSlider
This method sets the major tick spacing.
setMargin(Insets) - Method in class javax.swing.AbstractButton
Sets space for margin between the button's border and the label.
setMargin(Insets) - Method in class javax.swing.JToolBar
Sets the margin between the toolbar's border and its buttons.
setMargin(Insets) - Method in class javax.swing.JMenuBar
Sets the margin between the menubar's border and its menus.
setMargin(Insets) - Method in class javax.swing.text.JTextComponent
Sets margin space between the text component's border and its text.
setMasterSyncMode(Sequencer.SyncMode) - Method in interface javax.sound.midi.Sequencer
Sets the source of timing information used by this sequencer.
setMaxFieldSize(int) - Method in interface java.sql.Statement
Sets the limit for the maximum number of bytes in a column to the given number of bytes.
setMaximizable(boolean) - Method in class javax.swing.JInternalFrame
Sets that the JInternalFrame can be maximized by some user action.
setMaximum(boolean) - Method in class javax.swing.JInternalFrame
Maximizes and restores the frame.
setMaximum(int) - Method in class java.awt.Scrollbar
Sets the maximum value of this scroll bar.
setMaximum(int) - Method in interface java.awt.Adjustable
Sets the maximum value of the adjustable object.
setMaximum(int) - Method in class javax.swing.DefaultBoundedRangeModel
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
setMaximum(int) - Method in class javax.swing.ProgressMonitor
Specifies the maximum value.
setMaximum(int) - Method in interface javax.swing.BoundedRangeModel
Sets the model's maximum to newMaximum.
setMaximum(int) - Method in class javax.swing.JScrollBar
Sets the model's maximum property.
setMaximum(int) - Method in class javax.swing.JProgressBar
Sets the model's maximum to x.
setMaximum(int) - Method in class javax.swing.JSlider
Sets the models maximum property.
setMaximumFractionDigits(int) - Method in class java.text.NumberFormat
Sets the maximum number of digits allowed in the fraction portion of a number.
setMaximumFractionDigits(int) - Method in class java.text.DecimalFormat
Sets the maximum number of digits allowed in the fraction portion of a number.
setMaximumIntegerDigits(int) - Method in class java.text.NumberFormat
Sets the maximum number of digits allowed in the integer portion of a number.
setMaximumIntegerDigits(int) - Method in class java.text.DecimalFormat
Sets the maximum number of digits allowed in the integer portion of a number.
setMaximumRowCount(int) - Method in class javax.swing.JComboBox
Sets the maximum number of rows the JComboBox displays.
setMaximumSize(Dimension) - Method in class javax.swing.JComponent
Sets the maximum size of this component to a constant value.
setMaximumZoneSize(int) - Method in class javax.swing.text.ZoneView
Set the desired maximum zone size.
setMaxPage(int) - Method in class java.awt.JobAttributes
Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes.
setMaxPriority(int) - Method in class java.lang.ThreadGroup
Sets the maximum priority of the group.
setMaxRows(int) - Method in interface java.sql.Statement
Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
setMaxWidth(int) - Method in class javax.swing.table.TableColumn
Sets the TableColumn's maximum width to maxWidth; also adjusts the width and preferred width if they are greater than this value.
setMaxZonesLoaded(int) - Method in class javax.swing.text.ZoneView
Set the current setting of the number of zones allowed to be loaded at the same time.
setMedia(PageAttributes.MediaType) - Method in class java.awt.PageAttributes
Specifies the desired paper size for pages using these attributes.
setMediaToDefault() - Method in class java.awt.PageAttributes
Sets the paper size for pages using these attributes to the default size for the default locale.
setMenuBar(JMenuBar) - Method in class javax.swing.JInternalFrame
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar m).
setMenuBar(JMenuBar) - Method in class javax.swing.JRootPane
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu).
setMenuBar(MenuBar) - Method in class java.awt.Frame
Sets the menu bar for this frame to the specified menu bar.
setMenuLocation(int, int) - Method in class javax.swing.JMenu
Sets the location of the popup component.
setMessage(byte[], int) - Method in class javax.sound.midi.MidiMessage
Sets the data for the MIDI message.
setMessage(byte[], int) - Method in class javax.sound.midi.SysexMessage
Sets the data for the system exclusive message.
setMessage(int) - Method in class javax.sound.midi.ShortMessage
Sets the parameters for a MIDI message that takes no data bytes.
setMessage(int, byte[], int) - Method in class javax.sound.midi.SysexMessage
Sets the data for the system exclusive message.
setMessage(int, byte[], int) - Method in class javax.sound.midi.MetaMessage
Sets the message parameters for a MetaMessage.
setMessage(int, int, int) - Method in class javax.sound.midi.ShortMessage
Sets the parameters for a MIDI message that takes one or two data bytes.
setMessage(int, int, int, int) - Method in class javax.sound.midi.ShortMessage
Sets the short message parameters for a channel message which takes one or two data bytes.
setMessage(Object) - Method in class javax.swing.JOptionPane
Sets the option pane's message-object.
setMessageDigest(MessageDigest) - Method in class java.security.DigestOutputStream
Associates the specified message digest with this stream.
setMessageDigest(MessageDigest) - Method in class java.security.DigestInputStream
Associates the specified message digest with this stream.
setMessageType(int) - Method in class javax.swing.JOptionPane
Sets the option pane's message type.
setMethod(int) - Method in class java.util.zip.ZipEntry
Sets the compression method for the entry.
setMethod(int) - Method in class java.util.zip.ZipOutputStream
Sets the default compression method for subsequent entries.
setMicrosecondPosition(long) - Method in interface javax.sound.sampled.Clip
Sets the media position in microseconds.
setMicrosecondPosition(long) - Method in interface javax.sound.midi.Sequencer
Sets the current position in the sequence, expressed in microseconds
setMillisToDecideToPopup(int) - Method in class javax.swing.ProgressMonitor
Specifies the amount of time to wait before deciding whether or not to popup a progress monitor.
setMillisToPopup(int) - Method in class javax.swing.ProgressMonitor
Specifies the amount of time it will take for the popup to appear.
setMinimalDaysInFirstWeek(int) - Method in class java.util.Calendar
Sets what the minimal days required in the first week of the year are; For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1.
setMinimum(int) - Method in class java.awt.Scrollbar
Sets the minimum value of this scroll bar.
setMinimum(int) - Method in interface java.awt.Adjustable
Sets the minimum value of the adjustable object.
setMinimum(int) - Method in class javax.swing.DefaultBoundedRangeModel
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
setMinimum(int) - Method in class javax.swing.ProgressMonitor
Specifies the minimum value.
setMinimum(int) - Method in interface javax.swing.BoundedRangeModel
Sets the model's minimum to newMinimum.
setMinimum(int) - Method in class javax.swing.JScrollBar
Sets the model's minimum property.
setMinimum(int) - Method in class javax.swing.JProgressBar
Sets the model's minimum to x.
setMinimum(int) - Method in class javax.swing.JSlider
Sets the models minimum property.
setMinimumFractionDigits(int) - Method in class java.text.NumberFormat
Sets the minimum number of digits allowed in the fraction portion of a number.
setMinimumFractionDigits(int) - Method in class java.text.DecimalFormat
Sets the minimum number of digits allowed in the fraction portion of a number.
setMinimumIntegerDigits(int) - Method in class java.text.NumberFormat
Sets the minimum number of digits allowed in the integer portion of a number.
setMinimumIntegerDigits(int) - Method in class java.text.DecimalFormat
Sets the minimum number of digits allowed in the integer portion of a number.
setMinimumSize(Dimension) - Method in class javax.swing.JComponent
Sets the minimum size of this component to a constant value.
setMinorTickSpacing(int) - Method in class javax.swing.JSlider
This method sets the minor tick spacing.
setMinPage(int) - Method in class java.awt.JobAttributes
Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes.
setMinusSign(char) - Method in class java.text.DecimalFormatSymbols
Set the character used to represent minus sign.
setMinutes(int) - Method in class java.sql.Date
Deprecated.
setMinutes(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes).
setMinWidth(int) - Method in class javax.swing.table.TableColumn
Sets the TableColumn's minimum width to minWidth; also adjusts the current width and preferred width if they are less than this value.
setMnemonic(char) - Method in class javax.swing.AbstractButton
Specifies the mnemonic value.
setMnemonic(int) - Method in class javax.swing.AbstractButton
Sets the keyboard mnemonic on the current model.
setMnemonic(int) - Method in interface javax.swing.ButtonModel
Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
setMnemonic(int) - Method in class javax.swing.DefaultButtonModel
Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
setModal(boolean) - Method in class java.awt.Dialog
Specifies whether this dialog should be modal.
setMode(int) - Method in class java.awt.FileDialog
Sets the mode of the file dialog.
setModel(BoundedRangeModel) - Method in class javax.swing.JScrollBar
Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
setModel(BoundedRangeModel) - Method in class javax.swing.JProgressBar
Sets the data model used by the JProgressBar.
setModel(BoundedRangeModel) - Method in class javax.swing.JSlider
Sets the model that handles the sliders three fundamental properties: minimum, maximum, value.
setModel(ButtonModel) - Method in class javax.swing.AbstractButton
Sets the model that this button represents.
setModel(ButtonModel) - Method in class javax.swing.JMenu
Sets the data model for the "menu button" -- the label that the user clicks to open or close the menu.
setModel(ComboBoxModel) - Method in class javax.swing.JComboBox
Sets the data model that the JComboBox uses to obtain the list of items.
setModel(ListModel) - Method in class javax.swing.JList
Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners.
setModel(SingleSelectionModel) - Method in class javax.swing.JTabbedPane
Sets the model to be used with this tabbedpane.
setModel(TableModel) - Method in class javax.swing.JTable
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
setModel(TreeModel) - Method in class javax.swing.JTree
Sets the TreeModel that will provide the data.
setModel(TreeModel) - Method in class javax.swing.tree.AbstractLayoutCache
Sets the TreeModel that will provide the data.
setModel(TreeModel) - Method in class javax.swing.tree.VariableHeightLayoutCache
Sets the TreeModel that will provide the data.
setModel(TreeModel) - Method in class javax.swing.tree.FixedHeightLayoutCache
Sets the TreeModel that will provide the data.
setModel(TreeModel) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the TreeModel.
setModelIndex(int) - Method in class javax.swing.table.TableColumn
Sets the model index for this column.
setModifiers(int) - Method in class java.awt.event.KeyEvent
Set the modifiers to indicate additional keys that were held down (shift, ctrl, alt, meta) defined as part of InputEvent.
setMonetaryDecimalSeparator(char) - Method in class java.text.DecimalFormatSymbols
Set the monetary decimal separator.
setMono(boolean) - Method in interface javax.sound.midi.MidiChannel
Turns mono mode on or off.
setMonth(int) - Method in class java.sql.Time
Deprecated.
setMonth(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month).
setMonths(String[]) - Method in class java.text.DateFormatSymbols
Sets month strings.
setMultipleDocumentHandling(JobAttributes.MultipleDocumentHandlingType) - Method in class java.awt.JobAttributes
Specifies the handling of multiple documents, including collation, for jobs using these attributes.
setMultipleDocumentHandlingToDefault() - Method in class java.awt.JobAttributes
Sets the handling of multiple documents, including collation, for jobs using these attributes to the default.
setMultipleMode(boolean) - Method in class java.awt.List
Sets the flag that determines whether this list allows multiple selections.
setMultipleSelections(boolean) - Method in class java.awt.List
Deprecated. As of JDK version 1.1, replaced by setMultipleMode(boolean).
setMultiplier(int) - Method in class java.text.DecimalFormat
Set the multiplier for use in percent, permill, etc.
setMultiSelectionEnabled(boolean) - Method in class javax.swing.JFileChooser
Sets the file chooser to allow multiple file selections.
setMute(boolean) - Method in interface javax.sound.midi.MidiChannel
Sets the mute state for this channel.
setName(Principal, String) - Method in interface java.security.acl.Acl
Sets the name of this ACL.
setName(String) - Method in class java.awt.Component
Sets the name of the component to the specified string.
setName(String) - Method in class java.awt.MenuComponent
Sets the name of the component to the specified string.
setName(String) - Method in class java.beans.FeatureDescriptor
Sets the programmatic name of this feature.
setName(String) - Method in class java.lang.Thread
Changes the name of this thread to be equal to the argument name.
setName(String) - Method in class javax.naming.NameClassPair
Sets the name of this binding.
setName(String) - Method in class javax.swing.text.StyleContext.NamedStyle
Changes the name of the style.
setNaN(String) - Method in class java.text.DecimalFormatSymbols
Set the character used to represent NaN.
setNanos(int) - Method in class java.sql.Timestamp
Sets this Timestamp object's nanos field to the given value.
setNegativePermissions() - Method in interface java.security.acl.AclEntry
Sets this ACL entry to be a negative one.
setNegativePrefix(String) - Method in class java.text.DecimalFormat
Set the negative prefix.
setNegativeSuffix(String) - Method in class java.text.DecimalFormat
Set the positive suffix.
setNextException(SQLException) - Method in class java.sql.SQLException
Adds an SQLException object to the end of the chain.
setNextFocusableComponent(Component) - Method in class javax.swing.JComponent
Specifies the next component to get the focus after this one, for example, when the tab key is pressed.
setNextWarning(SQLWarning) - Method in class java.sql.SQLWarning
Adds an SQLWarning object to the end of the chain.
setNodeDimensions(AbstractLayoutCache.NodeDimensions) - Method in class javax.swing.tree.AbstractLayoutCache
Sets the renderer that is responsible for drawing nodes in the tree and which is threfore responsible foc calculating the dimensions of individual nodes.
setNodeDimensions(AbstractLayoutCache.NodeDimensions) - Method in class javax.swing.tree.VariableHeightLayoutCache
Sets the renderer that is responsible for drawing nodes in the tree.
setNonContinuousLayoutDivider(Component) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Sets the divider to use when the splitPane is configured to not continuously layout.
setNonContinuousLayoutDivider(Component, boolean) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Sets the divider to use.
setNormalBounds(Rectangle) - Method in class javax.swing.JInternalFrame
Sets the normal bounds for this frame, the bounds that the frame would be restored to from its maximized state.
setNorthPane(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setNote(String) - Method in class javax.swing.ProgressMonitor
Specifies the additional note that is displayed along with the progress message.
setNull(int, int) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to SQL NULL.
setNull(int, int, String) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to SQL NULL.
setNumberFormat(NumberFormat) - Method in class java.text.DateFormat
Allows you to set the number formatter.
setNumRows(int) - Method in class javax.swing.table.DefaultTableModel
Obsolete as of Java 2 platform v1.3.
setObject(int, Object) - Method in interface java.sql.PreparedStatement
Sets the value of the designated parameter using the given object.
setObject(int, Object, int) - Method in interface java.sql.PreparedStatement
Sets the value of the designated parameter with the given object.
setObject(int, Object, int, int) - Method in interface java.sql.PreparedStatement
Sets the value of the designated parameter with the given object.
setObject(Object) - Method in interface java.beans.Customizer
Set the object to be customized.
setObject(Object) - Method in class javax.naming.Binding
Sets the object associated with this binding.
setObjectFactoryBuilder(ObjectFactoryBuilder) - Static method in class javax.naming.spi.NamingManager
The ObjectFactoryBuilder determines the policy used when trying to load object factories.
setOffset(int) - Method in class java.io.ObjectStreamField
Offset within instance data.
setOffset(int) - Method in class java.text.CollationElementIterator
Sets the iterator to point to the collation element corresponding to the specified character (the parameter is a CHARACTER offset in the original string, not an offset into its corresponding sequence of collation elements).
setOffset(Point) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
setOmni(boolean) - Method in interface javax.sound.midi.MidiChannel
Turns omni mode on or off.
setOneTouchExpandable(boolean) - Method in class javax.swing.JSplitPane
Determines whether the JSplitPane provides a UI widget on the divider to quickly expand/collapse the divider.
setOpaque(boolean) - Method in class javax.swing.JComponent
If true the component paints every pixel within its bounds.
setOpenIcon(Icon) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the icon used to represent non-leaf nodes that are expanded.
setOption(int, Object) - Method in interface java.net.SocketOptions
Enable/disable the option specified by optID.
setOptions(Object[]) - Method in class javax.swing.JOptionPane
Sets the options this pane displays.
setOptionType(int) - Method in class javax.swing.JOptionPane
Sets the options to display.
setOrientation(int) - Method in class java.awt.Scrollbar
Sets the orientation for this scroll bar.
setOrientation(int) - Method in class java.awt.print.PageFormat
Sets the page orientation.
setOrientation(int) - Method in class javax.swing.JSeparator
Sets the orientation of the separator.
setOrientation(int) - Method in class javax.swing.JSplitPane
Sets the orientation, or how the splitter is divided.
setOrientation(int) - Method in class javax.swing.JToolBar
Sets the orientation of the toolbar.
setOrientation(int) - Method in class javax.swing.JScrollBar
Set the scrollbar's orientation to either VERTICAL or HORIZONTAL.
setOrientation(int) - Method in class javax.swing.JProgressBar
Sets the progress bar's orientation to newOrientation, which must be JProgressBar.VERTICAL or JProgressBar.HORIZONTAL.
setOrientation(int) - Method in class javax.swing.JSlider
Set the scrollbars orientation to either VERTICAL or HORIZONTAL.
setOrientation(int) - Method in class javax.swing.plaf.basic.BasicToolBarUI
setOrientation(int) - Method in class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
setOrientation(int) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Set the orientation for the JSplitPane.
setOrientationRequested(int) - Method in class java.awt.PageAttributes
Specifies the print orientation for pages using these attributes.
setOrientationRequested(PageAttributes.OrientationRequestedType) - Method in class java.awt.PageAttributes
Specifies the print orientation for pages using these attributes.
setOrientationRequestedToDefault() - Method in class java.awt.PageAttributes
Sets the print orientation for pages using these attributes to the default.
setOrigin(PageAttributes.OriginType) - Method in class java.awt.PageAttributes
Specifies whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.
setOut(PrintStream) - Static method in class java.lang.System
Reassigns the "standard" output stream.
setOuterHTML(Element, String) - Method in class javax.swing.text.html.HTMLDocument
Replaces the given element in the parent with the contents specified as an HTML string.
setOutputStream(OutputStream) - Method in class java.rmi.server.LogStream
Deprecated. no replacement
SetOverrideType - class org.omg.CORBA.SetOverrideType.
The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
SetOverrideType(int) - Constructor for class org.omg.CORBA.SetOverrideType
Constructs the SetOverrideType instance given a int.
SetOverrideTypeHelper - class org.omg.CORBA.SetOverrideTypeHelper.
org/omg/CORBA/SetOverrideTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
SetOverrideTypeHelper() - Constructor for class org.omg.CORBA.SetOverrideTypeHelper
setPadding(int) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
setPage(int, Printable, PageFormat) - Method in class java.awt.print.Book
Sets the PageFormat and the Painter for a specified page number.
setPage(String) - Method in class javax.swing.JEditorPane
Sets the current URL being displayed.
setPage(URL) - Method in class javax.swing.JEditorPane
Sets the current URL being displayed.
setPageable(Pageable) - Method in class java.awt.print.PrinterJob
Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.
setPageIncrement(int) - Method in class java.awt.Scrollbar
Deprecated. As of JDK version 1.1, replaced by setBlockIncrement().
setPageRanges(int[][]) - Method in class java.awt.JobAttributes
Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed.
setPaint(Paint) - Method in class java.awt.Graphics2D
Sets the Paint attribute for the Graphics2D context.
setPaintLabels(boolean) - Method in class javax.swing.JSlider
Determines whether labels are painted on the slider.
setPaintMode() - Method in class java.awt.Graphics
Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color.
setPaintMode() - Method in class javax.swing.DebugGraphics
Overrides Graphics.setPaintMode.
setPaintTicks(boolean) - Method in class javax.swing.JSlider
Determines whether tick marks are painted on the slider.
setPaintTrack(boolean) - Method in class javax.swing.JSlider
Determines whether the track is painted on the slider.
setPalette(boolean) - Method in class javax.swing.plaf.metal.MetalInternalFrameTitlePane
setPalette(boolean) - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
setPaper(Paper) - Method in class java.awt.print.PageFormat
Sets the Paper object for this PageFormat.
setParagraphAttributes(AttributeSet, boolean) - Method in class javax.swing.JTextPane
Applies the given attributes to paragraphs.
setParagraphAttributes(int, int, AttributeSet, boolean) - Method in interface javax.swing.text.StyledDocument
Sets paragraph attributes.
setParagraphAttributes(int, int, AttributeSet, boolean) - Method in class javax.swing.text.DefaultStyledDocument
Sets attributes for a paragraph.
setParagraphAttributes(int, int, AttributeSet, boolean) - Method in class javax.swing.text.html.HTMLDocument
Sets attributes for a paragraph.
setParagraphAttributes(JEditorPane, AttributeSet, boolean) - Method in class javax.swing.text.StyledEditorKit.StyledTextAction
Applies the given attributes to paragraphs.
setParagraphInsets(AttributeSet) - Method in class javax.swing.text.CompositeView
Sets the insets from the paragraph attributes specified in the given attributes.
setParameter(AlgorithmParameterSpec) - Method in class java.security.Signature
Initializes this signature engine with the specified parameter set.
setParameter(String, Object) - Method in class java.security.Signature
Deprecated. Use setParameter.
setParameterBlock(ParameterBlock) - Method in class java.awt.image.renderable.RenderableImageOp
Change the current ParameterBlock of the operation, allowing editing of image rendering chains.
setParameters(Vector) - Method in class java.awt.image.renderable.ParameterBlock
Sets the entire Vector of parameters to a given Vector.
setParent(ActionMap) - Method in class javax.swing.ActionMap
Sets this ActionMap's parent.
setParent(InputMap) - Method in class javax.swing.InputMap
Sets this InputMap's parent.
setParent(InputMap) - Method in class javax.swing.ComponentInputMap
Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
setParent(MutableTreeNode) - Method in class javax.swing.tree.DefaultMutableTreeNode
Sets this node's parent to newParent but does not change the parent's child array.
setParent(MutableTreeNode) - Method in interface javax.swing.tree.MutableTreeNode
Sets the parent of the receiver to newParent.
setParent(ResourceBundle) - Method in class java.util.ResourceBundle
Set the parent bundle of this bundle.
setParent(View) - Method in class javax.swing.text.View
Establishes the parent view for this view.
setParent(View) - Method in class javax.swing.text.CompositeView
Sets the parent of the view.
setParent(View) - Method in class javax.swing.text.AsyncBoxView
Sets the parent of the view.
setParent(View) - Method in class javax.swing.text.ComponentView
Sets the parent for a child view.
setParent(View) - Method in class javax.swing.text.html.ParagraphView
Establishes the parent view for this view.
setParent(View) - Method in class javax.swing.text.html.BlockView
Establishes the parent view for this view.
setParseIntegerOnly(boolean) - Method in class java.text.NumberFormat
Sets whether or not numbers should be parsed as integers only.
setParser(HTMLEditorKit.Parser) - Method in class javax.swing.text.html.HTMLDocument
Sets the parser that is used by the methods that insert html into the existing document, eg setInnerHTML, setOuterHTML...
setPatternSeparator(char) - Method in class java.text.DecimalFormatSymbols
Set the character used to separate positive and negative subpatterns in a pattern.
setPercent(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for percent sign.
setPerMill(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for mille percent sign.
setPitchBend(int) - Method in interface javax.sound.midi.MidiChannel
Changes the pitch offset for all notes on this channel.
setPixel(int, int, double[]) - Method in class java.awt.image.WritableRaster
Sets a pixel in the DataBuffer using a double array of samples for input.
setPixel(int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets a pixel in the DataBuffer using a double array of samples for input.
setPixel(int, int, float[]) - Method in class java.awt.image.WritableRaster
Sets a pixel in the DataBuffer using a float array of samples for input.
setPixel(int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets a pixel in the DataBuffer using a float array of samples for input.
setPixel(int, int, int[]) - Method in class java.awt.image.WritableRaster
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Sets a pixel in the DataBuffer using an int array for input.
setPixel(int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.ImageFilter
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.ReplicateScaleFilter
Choose which rows and columns of the delivered byte pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.PixelGrabber
The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.RGBImageFilter
If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in interface java.awt.image.ImageConsumer
The pixels of the image are delivered using one or more calls to the setPixels method.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.CropImageFilter
Determine whether the delivered byte pixels intersect the region to be extracted and passes through only that subset of pixels that appear in the output region.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.BufferedImageFilter
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
setPixels(int, int, int, int, ColorModel, byte[], int, int) - Method in class java.awt.image.AreaAveragingScaleFilter
Combine the components for the delivered byte pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.ImageFilter
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.ReplicateScaleFilter
Choose which rows and columns of the delivered int pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.PixelGrabber
The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.RGBImageFilter
If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel, otherwise converts the buffer of integer pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method to be converted one by one.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in interface java.awt.image.ImageConsumer
The pixels of the image are delivered using one or more calls to the setPixels method.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.CropImageFilter
Determine if the delivered int pixels intersect the region to be extracted and pass through only that subset of pixels that appear in the output region.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.BufferedImageFilter
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
setPixels(int, int, int, int, ColorModel, int[], int, int) - Method in class java.awt.image.AreaAveragingScaleFilter
Combine the components for the delivered int pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.
setPixels(int, int, int, int, double[]) - Method in class java.awt.image.WritableRaster
Sets all samples for a rectangle of pixels from a double array containing one sample per array element.
setPixels(int, int, int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets all samples for a rectangle of pixels from a double array containing one sample per array element.
setPixels(int, int, int, int, float[]) - Method in class java.awt.image.WritableRaster
Sets all samples for a rectangle of pixels from a float array containing one sample per array element.
setPixels(int, int, int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets all samples for a rectangle of pixels from a float array containing one sample per array element.
setPixels(int, int, int, int, int[]) - Method in class java.awt.image.WritableRaster
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
setPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
setPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
setPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
setPixels(int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
setPolicy(Policy) - Static method in class java.security.Policy
Sets the system-wide Policy object.
setPolyPressure(int, int) - Method in interface javax.sound.midi.MidiChannel
Reacts to a change in the specified note's key pressure.
setPopupMenuVisible(boolean) - Method in class javax.swing.JMenu
Sets the visibility of the menu's popup.
setPopupSize(Dimension) - Method in class javax.swing.JPopupMenu
Sets the size of the Popup window using a Dimension object.
setPopupSize(int, int) - Method in class javax.swing.JPopupMenu
Sets the size of the Popup window to the specified width and height.
setPopupVisible(boolean) - Method in class javax.swing.JComboBox
Sets the visibility of the popup.
setPopupVisible(JComboBox, boolean) - Method in class javax.swing.plaf.ComboBoxUI
Set the visiblity of the popup
setPopupVisible(JComboBox, boolean) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Hides the popup.
setPopupVisible(JComboBox, boolean) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call setPopupVisible on each UI handled by this MultiUI.
setPort(int) - Method in class java.net.DatagramPacket
Sets the port number on the remote host to which this datagram is being sent.
setPosition(Component, int) - Method in class javax.swing.JLayeredPane
Moves the component to position within it's current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.
setPosition(int) - Method in class java.awt.font.LineBreakMeasurer
Sets the current position of this LineBreakMeasurer.
setPositivePrefix(String) - Method in class java.text.DecimalFormat
Set the positive prefix.
setPositiveSuffix(String) - Method in class java.text.DecimalFormat
Set the positive suffix.
setPreferred(boolean) - Method in class java.beans.FeatureDescriptor
The "preferred" flag is used to identify features that are particularly important for presenting to humans.
setPreferredMinSize(Dimension) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the preferred minimum size.
setPreferredScrollableViewportSize(Dimension) - Method in class javax.swing.JTable
Sets the preferred size of the viewport for this table.
setPreferredSize(Dimension) - Method in class javax.swing.JComponent
Sets the preferred size of the receiving component.
setPreferredWidth(int) - Method in class javax.swing.table.TableColumn
Sets this column's preferred width to preferredWidth.
setPreservesUnknownTags(boolean) - Method in class javax.swing.text.html.HTMLDocument
Sets how unknown tags are handled.
setPressed(boolean) - Method in interface javax.swing.ButtonModel
Sets the button to pressed or unpressed.
setPressed(boolean) - Method in class javax.swing.DefaultButtonModel
Sets the button to pressed or unpressed.
setPressed(boolean) - Method in class javax.swing.JToggleButton.ToggleButtonModel
Sets the pressed state of the toggle button.
setPressedIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the pressed icon for the button.
setPreviewPanel(JComponent) - Method in class javax.swing.JColorChooser
Sets the current preview panel.
setPreviousBounds(JInternalFrame, Rectangle) - Method in class javax.swing.DefaultDesktopManager
Stores the bounds of the component just before a maximize call.
setPrincipal(Principal) - Method in interface java.security.acl.AclEntry
Specifies the principal for which permissions are granted or denied by this ACL entry.
setPrintable(Printable) - Method in class java.awt.print.PrinterJob
Calls painter to render the pages.
setPrintable(Printable, PageFormat) - Method in class java.awt.print.PrinterJob
Calls painter to render the pages in the specified format.
setPrinter(String) - Method in class java.awt.JobAttributes
Specifies the destination printer for jobs using these attributes.
setPrinterResolution(int) - Method in class java.awt.PageAttributes
Specifies the desired cross feed and feed print resolutions in dots per inch for pages using these attributes.
setPrinterResolution(int[]) - Method in class java.awt.PageAttributes
Specifies the desired print resolution for pages using these attributes.
setPrinterResolutionToDefault() - Method in class java.awt.PageAttributes
Sets the printer resolution for pages using these attributes to the default.
setPrintQuality(int) - Method in class java.awt.PageAttributes
Specifies the print quality for pages using these attributes.
setPrintQuality(PageAttributes.PrintQualityType) - Method in class java.awt.PageAttributes
Specifies the print quality for pages using these attributes.
setPrintQualityToDefault() - Method in class java.awt.PageAttributes
Sets the print quality for pages using these attributes to the default.
setPriority(int) - Method in class java.lang.Thread
Changes the priority of this thread.
setProgress(int) - Method in class javax.swing.ProgressMonitor
Indicate the progress of the operation being monitored.
setPropagatedFrom(BeanContext) - Method in class java.beans.beancontext.BeanContextEvent
Sets the BeanContext from which this event was propagated.
setPropagationId(Object) - Method in class java.beans.PropertyChangeEvent
Sets the propagationId object for the event.
setProperties(Hashtable) - Method in class java.awt.image.ImageFilter
Passes the properties from the source object along after adding a property indicating the stream of filters it has been run through.
setProperties(Hashtable) - Method in class java.awt.image.ReplicateScaleFilter
Passes along the properties from the source object after adding a property indicating the scale applied.
setProperties(Hashtable) - Method in class java.awt.image.PixelGrabber
The setProperties method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
setProperties(Hashtable) - Method in interface java.awt.image.ImageConsumer
Sets the extensible list of properties associated with this image.
setProperties(Hashtable) - Method in class java.awt.image.CropImageFilter
Passes along the properties from the source object after adding a property indicating the cropped region.
setProperties(Properties) - Static method in class java.lang.System
Sets the system properties to the Properties argument.
setPropertiesFromAttributes() - Method in class javax.swing.text.LabelView
Set the cached properties from the attributes.
setPropertiesFromAttributes() - Method in class javax.swing.text.ParagraphView
setPropertiesFromAttributes() - Method in class javax.swing.text.html.ParagraphView
Sets up the paragraph from css attributes instead of the values found in StyleConstants (i.e.
setPropertiesFromAttributes() - Method in class javax.swing.text.html.BlockView
Update any cached values that come from attributes.
setPropertiesFromAttributes() - Method in class javax.swing.text.html.InlineView
Set the cached properties from the attributes.
setPropertiesFromAttributes() - Method in class javax.swing.text.html.ListView
setProperty(String, String) - Static method in class java.lang.System
Sets the system property indicated by the specified key.
setProperty(String, String) - Static method in class java.security.Security
Sets a security property value.
setProperty(String, String) - Method in class java.util.Properties
Calls the hashtable method put.
setPropertyEditorClass(Class) - Method in class java.beans.PropertyDescriptor
Normally PropertyEditors will be found using the PropertyEditorManager.
setPrototypeCellValue(Object) - Method in class javax.swing.JList
Computes the fixedCellWidth and fixedCellHeight properties by configuring the cellRenderer to index equals zero for the specified value and then computing the renderer component's preferred size.
setPublicKey(PublicKey) - Method in class java.security.Identity
Deprecated. Sets this identity's public key.
setQueryTimeout(int) - Method in interface java.sql.Statement
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
setRangeProperties(int, int, int, int, boolean) - Method in class javax.swing.DefaultBoundedRangeModel
Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
setRangeProperties(int, int, int, int, boolean) - Method in interface javax.swing.BoundedRangeModel
This method sets all of the model's data with a single method call.
setRawOffset(int) - Method in class java.util.TimeZone
Sets the base time zone offset to GMT.
setRawOffset(int) - Method in class java.util.SimpleTimeZone
Overrides TimeZone Sets the base time zone offset to GMT.
setReadMethod(Method) - Method in class java.beans.PropertyDescriptor
Sets the method that should be used to read the property value.
setReadOnly() - Method in class java.io.File
Marks the file or directory named by this abstract pathname so that only read operations are allowed.
setReadOnly() - Method in class java.security.PermissionCollection
Marks this PermissionCollection object as "readonly".
setReadOnly(boolean) - Method in interface java.sql.Connection
Puts this connection in read-only mode as a hint to enable database optimizations.
setReceiveBufferSize(int) - Method in class java.net.DatagramSocket
Sets the SO_RCVBUF option to the specified value for this DatagramSocket.
setReceiveBufferSize(int) - Method in class java.net.Socket
Sets the SO_RCVBUF option to the specified value for this Socket.
setReceiver(Receiver) - Method in interface javax.sound.midi.Transmitter
Sets the receiver to which this transmitter will deliver MIDI messages.
setRect(double, double, double, double) - Method in class java.awt.Rectangle
Sets the bounds of this Rectangle to the specified x, y, width, and height.
setRect(double, double, double, double) - Method in class java.awt.geom.Rectangle2D
Sets the location and size of this Rectangle2D to the specified double values.
setRect(double, double, double, double) - Method in class java.awt.geom.Rectangle2D.Float
Sets the location and size of this Rectangle2D to the specified double values.
setRect(double, double, double, double) - Method in class java.awt.geom.Rectangle2D.Double
Sets the location and size of this Rectangle2D to the specified double values.
setRect(float, float, float, float) - Method in class java.awt.geom.Rectangle2D.Float
Sets the location and size of this Rectangle2D to the specified float values.
setRect(int, int, Raster) - Method in class java.awt.image.WritableRaster
Copies pixels from Raster srcRaster to this WritableRaster.
setRect(Raster) - Method in class java.awt.image.WritableRaster
Copies pixels from Raster srcRaster to this WritableRaster.
setRect(Rectangle2D) - Method in class java.awt.geom.Rectangle2D
Sets this Rectangle2D to be the same as the specified Rectangle2D.
setRect(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Float
Sets this Rectangle2D to be the same as the specified Rectangle2D.
setRect(Rectangle2D) - Method in class java.awt.geom.Rectangle2D.Double
Sets this Rectangle2D to be the same as the specified Rectangle2D.
setRef(int, Ref) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given REF(<structured-type>) value.
setRef(RemoteStub, RemoteRef) - Static method in class java.rmi.server.RemoteStub
Deprecated. no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.
setRelative(boolean) - Method in class javax.naming.NameClassPair
Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
setRemainingName(Name) - Method in class javax.naming.NamingException
Sets the remaining name field of this exception.
setRemainingName(Name) - Method in class javax.naming.spi.ResolveResult
Sets the remaining name field of this result to name.
setRemainingNewName(Name) - Method in class javax.naming.CannotProceedException
Sets the "remaining new name" field of this exception.
setRenderContext(RenderContext) - Method in class java.awt.image.renderable.RenderableImageProducer
Sets a new RenderContext to use for the next startProduction() call.
setRenderer(ListCellRenderer) - Method in class javax.swing.JComboBox
Sets the renderer that paints the item selected from the list in the JComboBox field.
setRenderingHint(RenderingHints.Key, Object) - Method in class java.awt.Graphics2D
Sets the value of a single preference for the rendering algorithms.
setRenderingHints(Map) - Method in class java.awt.Graphics2D
Replaces the values of all preferences for the rendering algorithms with the specified hints.
setRenderingHints(RenderingHints) - Method in class java.awt.image.renderable.RenderContext
Sets the rendering hints of this RenderContext.
setReorderingAllowed(boolean) - Method in class javax.swing.table.JTableHeader
Sets whether the user can drag column headers to reorder columns.
setRepeats(boolean) - Method in class javax.swing.Timer
If flag is false, instructs the Timer to send actionPerformed() to its listeners only once, and then stop.
setRequestControls(Control[]) - Method in class javax.naming.ldap.InitialLdapContext
setRequestControls(Control[]) - Method in interface javax.naming.ldap.LdapContext
Sets the request controls for methods subsequently invoked on this context.
setRequestFocusEnabled(boolean) - Method in class javax.swing.JComponent
Sets whether the receiving component can obtain the focus by calling requestFocus.
setRequestMethod(String) - Method in class java.net.HttpURLConnection
Set the method for the URL request, one of: GET POST HEAD OPTIONS PUT DELETE TRACE are legal, subject to protocol restrictions.
setRequestProperty(String, String) - Method in class java.net.URLConnection
Sets the general request property.
setReshowDelay(int) - Method in class javax.swing.ToolTipManager
Specifies the time to delay before reshowing the tooltip.
setResizable(boolean) - Method in class java.awt.Dialog
Sets whether this dialog is resizable by the user.
setResizable(boolean) - Method in class java.awt.Frame
Sets whether this frame is resizable by the user.
setResizable(boolean) - Method in class javax.swing.JInternalFrame
Sets that the JInternalFrame can be resized by some user action.
setResizable(boolean) - Method in class javax.swing.table.TableColumn
Sets whether this column can be resized.
setResizeWeight(double) - Method in class javax.swing.JSplitPane
Specifies how to distribute extra space when the size of the split pane changes.
setResizingAllowed(boolean) - Method in class javax.swing.table.JTableHeader
Sets whether the user can resize columns by dragging between headers.
setResizingColumn(TableColumn) - Method in class javax.swing.table.JTableHeader
Sets the header's resizingColumn to aColumn.
setResolvedName(Name) - Method in class javax.naming.NamingException
Sets the resolved name field of this exception.
setResolvedObj(Object) - Method in class javax.naming.NamingException
Sets the resolved object field of this exception.
setResolvedObj(Object) - Method in class javax.naming.spi.ResolveResult
Sets the resolved Object field of this result to obj.
setResolveParent(AttributeSet) - Method in class javax.swing.text.SimpleAttributeSet
Sets the resolving parent.
setResolveParent(AttributeSet) - Method in class javax.swing.text.StyleContext.NamedStyle
Sets the resolving parent.
setResolveParent(AttributeSet) - Method in interface javax.swing.text.MutableAttributeSet
Sets the resolving parent.
setResolveParent(AttributeSet) - Method in class javax.swing.text.AbstractDocument.AbstractElement
Sets the resolving parent.
setResolveParent(Keymap) - Method in interface javax.swing.text.Keymap
Sets the parent keymap, which will be used to resolve key-bindings.
setReturningAttributes(String[]) - Method in class javax.naming.directory.SearchControls
Specifies the attributes that will be returned as part of the search.
setReturningObjFlag(boolean) - Method in class javax.naming.directory.SearchControls
Enables/disables returning objects returned as part of the result.
setRGB(int, int, int) - Method in class java.awt.image.BufferedImage
Sets a pixel in this BufferedImage to the specified RGB value.
setRGB(int, int, int, int, int[], int, int) - Method in class java.awt.image.BufferedImage
Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data.
setRightChildIndent(int) - Method in class javax.swing.plaf.basic.BasicTreeUI
setRightComponent(Component) - Method in class javax.swing.JSplitPane
Sets the component to the right (or below) the divider.
setRightIndent(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets right indent.
setRightInset(float) - Method in class javax.swing.text.AsyncBoxView
Set the right part of the margin around the view.
setRollover(boolean) - Method in interface javax.swing.ButtonModel
Sets or clears the button's rollover state
setRollover(boolean) - Method in class javax.swing.DefaultButtonModel
Sets or clears the button's rollover state
setRolloverBorders(boolean) - Method in class javax.swing.plaf.metal.MetalToolBarUI
setRolloverEnabled(boolean) - Method in class javax.swing.AbstractButton
Sets whether rollover effects should be enabled.
setRolloverIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the rollover icon for the button.
setRolloverSelectedIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the rollover selected icon for the button.
setRoot(TreeNode) - Method in class javax.swing.tree.DefaultTreeModel
Sets the root to root.
setRootCause(Throwable) - Method in class javax.naming.NamingException
Records that the root cause of this NamingException.
setRootFrame(Frame) - Static method in class javax.swing.JOptionPane
Sets the frame to use for class methods in which a frame is not provided.
setRootPane(JRootPane) - Method in class javax.swing.JWindow
Sets the new rootPane object for this window.
setRootPane(JRootPane) - Method in class javax.swing.JApplet
Sets the rootPane property.
setRootPane(JRootPane) - Method in class javax.swing.JInternalFrame
Sets the rootPane property.
setRootPane(JRootPane) - Method in class javax.swing.JFrame
Sets the rootPane property.
setRootPane(JRootPane) - Method in class javax.swing.JDialog
Sets the rootPane property.
setRootPaneCheckingEnabled(boolean) - Method in class javax.swing.JWindow
Determines whether calls to add and setLayout will cause an exception to be thrown.
setRootPaneCheckingEnabled(boolean) - Method in class javax.swing.JApplet
If true then calls to add() and setLayout() will cause an exception to be thrown.
setRootPaneCheckingEnabled(boolean) - Method in class javax.swing.JInternalFrame
Determines whether calls to add and setLayout cause an exception to be thrown.
setRootPaneCheckingEnabled(boolean) - Method in class javax.swing.JFrame
Determines whether calls to add and setLayout will cause an exception to be thrown.
setRootPaneCheckingEnabled(boolean) - Method in class javax.swing.JDialog
If true then calls to add and setLayout will cause an exception to be thrown.
setRootVisible(boolean) - Method in class javax.swing.JTree
Determines whether or not the root node from the TreeModel is visible.
setRootVisible(boolean) - Method in class javax.swing.tree.AbstractLayoutCache
Determines whether or not the root node from the TreeModel is visible.
setRootVisible(boolean) - Method in class javax.swing.tree.VariableHeightLayoutCache
Determines whether or not the root node from the TreeModel is visible.
setRootVisible(boolean) - Method in class javax.swing.tree.FixedHeightLayoutCache
Determines whether or not the root node from the TreeModel is visible.
setRootVisible(boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the root to being visible.
setRoundRect(double, double, double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D
Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.
setRoundRect(double, double, double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D.Float
Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
setRoundRect(double, double, double, double, double, double) - Method in class java.awt.geom.RoundRectangle2D.Double
Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
setRoundRect(float, float, float, float, float, float) - Method in class java.awt.geom.RoundRectangle2D.Float
Sets the location, size, and arc radii of this RoundRectangle2D to the specified float values.
setRoundRect(RoundRectangle2D) - Method in class java.awt.geom.RoundRectangle2D
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
setRoundRect(RoundRectangle2D) - Method in class java.awt.geom.RoundRectangle2D.Float
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
setRoundRect(RoundRectangle2D) - Method in class java.awt.geom.RoundRectangle2D.Double
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
setRowCount(int) - Method in class javax.swing.table.DefaultTableModel
Sets the number of rows in the model.
setRowHeader(JViewport) - Method in class javax.swing.JScrollPane
Removes the old rowHeader, if it exists.
setRowHeaderView(Component) - Method in class javax.swing.JScrollPane
Creates a row-header viewport if necessary, sets its view and then adds the row-header viewport to the scrollpane.
setRowHeight(int) - Method in class javax.swing.JTree
Sets the height of each cell, in pixels.
setRowHeight(int) - Method in class javax.swing.JTable
Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints.
setRowHeight(int) - Method in class javax.swing.tree.AbstractLayoutCache
Sets the height of each cell.
setRowHeight(int) - Method in class javax.swing.tree.VariableHeightLayoutCache
Sets the height of each cell.
setRowHeight(int) - Method in class javax.swing.tree.FixedHeightLayoutCache
Sets the height of each cell.
setRowHeight(int) - Method in class javax.swing.plaf.basic.BasicTreeUI
Sets the row height, this is forwarded to the treeState.
setRowHeight(int, int) - Method in class javax.swing.JTable
Sets the height for row to rowHeight, revalidates, and repaints.
setRowMapper(RowMapper) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Sets the RowMapper instance.
setRowMapper(RowMapper) - Method in interface javax.swing.tree.TreeSelectionModel
Sets the RowMapper instance.
setRowMargin(int) - Method in class javax.swing.JTable
Sets the amount of empty space between cells in adjacent rows.
setRows(int) - Method in class java.awt.GridLayout
Sets the number of rows in this layout to the specified value.
setRows(int) - Method in class java.awt.TextArea
Sets the number of rows for this text area.
setRows(int) - Method in class javax.swing.JTextArea
Sets the number of rows for this TextArea.
setRowSelectionAllowed(boolean) - Method in class javax.swing.JTable
Sets whether the rows in this model can be selected.
setRowSelectionInterval(int, int) - Method in class javax.swing.JTable
Selects the rows from index0 to index1, inclusive.
setSample(int, int, int, double) - Method in class java.awt.image.WritableRaster
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
setSample(int, int, int, double, DataBuffer) - Method in class java.awt.image.SampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
setSample(int, int, int, double, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
setSample(int, int, int, double, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
setSample(int, int, int, float) - Method in class java.awt.image.WritableRaster
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
setSample(int, int, int, float, DataBuffer) - Method in class java.awt.image.SampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
setSample(int, int, int, float, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
setSample(int, int, int, float, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
setSample(int, int, int, int) - Method in class java.awt.image.WritableRaster
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
setSample(int, int, int, int, DataBuffer) - Method in class java.awt.image.SampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
setSample(int, int, int, int, DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
setSample(int, int, int, int, DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
setSample(int, int, int, int, DataBuffer) - Method in class java.awt.image.MultiPixelPackedSampleModel
Sets a sample in the specified band for the pixel located at (x, y) in the DataBuffer using an int for input.
setSample(int, int, int, int, DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
setSamples(int, int, int, int, int, double[]) - Method in class java.awt.image.WritableRaster
Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element.
setSamples(int, int, int, int, int, double[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element.
setSamples(int, int, int, int, int, float[]) - Method in class java.awt.image.WritableRaster
Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element.
setSamples(int, int, int, int, int, float[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element.
setSamples(int, int, int, int, int, int[]) - Method in class java.awt.image.WritableRaster
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
setSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SampleModel
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
setSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.ComponentSampleModel
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
setSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.BandedSampleModel
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
setSamples(int, int, int, int, int, int[], DataBuffer) - Method in class java.awt.image.SinglePixelPackedSampleModel
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
setScale(int) - Method in class java.math.BigDecimal
Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's.
setScale(int, int) - Method in class java.math.BigDecimal
Returns a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.
setScrollByBlock(boolean) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
setScrollByBlock(boolean) - Method in class javax.swing.plaf.basic.BasicSliderUI.ScrollListener
setScrollMode(int) - Method in class javax.swing.JViewport
Used to control the method of scrolling the viewport contents.
setScrollOffset(int) - Method in class javax.swing.JTextField
Sets the scroll offset.
setScrollPosition(int, int) - Method in class java.awt.ScrollPane
Scrolls to the specified position within the child component.
setScrollPosition(Point) - Method in class java.awt.ScrollPane
Scrolls to the specified position within the child component.
setScrollsOnExpand(boolean) - Method in class javax.swing.JTree
Determines whether or not when a node is expanded, as many of the descendants are scrolled to be inside the viewport as possible.
setSearchScope(int) - Method in class javax.naming.directory.SearchControls
Sets the search scope to one of: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE.
setSeconds(int) - Method in class java.sql.Date
Deprecated.
setSeconds(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds).
setSecurityManager(SecurityManager) - Static method in class java.lang.System
Sets the System security.
setSeed(byte[]) - Method in class java.security.SecureRandom
Reseeds this random object.
setSeed(long) - Method in class java.security.SecureRandom
Reseeds this random object, using the eight bytes contained in the given long seed.
setSeed(long) - Method in class java.util.Random
Sets the seed of this random number generator using a single long seed.
setSelected(boolean) - Method in class javax.swing.AbstractButton
Sets the state of the button.
setSelected(boolean) - Method in class javax.swing.JMenu
Sets the selection status of the menu.
setSelected(boolean) - Method in interface javax.swing.ButtonModel
Selects or deselects the button.
setSelected(boolean) - Method in class javax.swing.DefaultButtonModel
Selects or deselects the button.
setSelected(boolean) - Method in class javax.swing.JInternalFrame
Selects and deselects the JInternalFrame.
setSelected(boolean) - Method in class javax.swing.JToggleButton.ToggleButtonModel
Sets the selected state of the button.
setSelected(ButtonModel, boolean) - Method in class javax.swing.ButtonGroup
Sets the selected value for the button.
setSelected(Component) - Method in class javax.swing.JPopupMenu
Sets the currently selected component, This will result in a change to the selection model.
setSelected(Component) - Method in class javax.swing.JMenuBar
Sets the currently selected component, producing a a change to the selection model.
setSelectedCheckbox(Checkbox) - Method in class java.awt.CheckboxGroup
Sets the currently selected check box in this group to be the specified check box.
setSelectedColor(Color) - Method in class javax.swing.colorchooser.DefaultColorSelectionModel
setSelectedColor(Color) - Method in interface javax.swing.colorchooser.ColorSelectionModel
Sets the model's selected color to color.
setSelectedComponent(Component) - Method in class javax.swing.JTabbedPane
Sets the selected component for this tabbedpane.
setSelectedFile(File) - Method in class javax.swing.JFileChooser
Sets the selected file.
setSelectedFiles(File[]) - Method in class javax.swing.JFileChooser
Sets the list of selected files if the file chooser is set to allow multiple selection.
setSelectedFrame(JInternalFrame) - Method in class javax.swing.JDesktopPane
set the currently active JInternalFrame in this JDesktopPane.
setSelectedIcon(Icon) - Method in class javax.swing.AbstractButton
Sets the selected icon for the button.
setSelectedIndex(int) - Method in class javax.swing.DefaultSingleSelectionModel
setSelectedIndex(int) - Method in class javax.swing.JTabbedPane
Sets the selected index for this tabbedpane.
setSelectedIndex(int) - Method in interface javax.swing.SingleSelectionModel
Sets the model's selected index to index.
setSelectedIndex(int) - Method in class javax.swing.JComboBox
Selects the item at index anIndex.
setSelectedIndex(int) - Method in class javax.swing.JList
Selects a single cell.
setSelectedIndices(int[]) - Method in class javax.swing.JList
Selects a set of cells.
setSelectedItem(Object) - Method in class javax.swing.DefaultComboBoxModel
setSelectedItem(Object) - Method in class javax.swing.JComboBox
Sets the selected item in the JComboBox by specifying the object in the list.
setSelectedItem(Object) - Method in interface javax.swing.ComboBoxModel
Set the selected item
setSelectedItem(Object) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel
setSelectedItem(Object) - Method in class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel
setSelectedPath(MenuElement[]) - Method in class javax.swing.MenuSelectionManager
Change the selection in the menu hierarchy.
setSelectedTextColor(Color) - Method in class javax.swing.text.JTextComponent
Sets the current color used to render the selected text.
setSelectedValue(Object, boolean) - Method in class javax.swing.JList
Selects the specified object from the list.
setSelection(boolean) - Method in class javax.swing.text.html.Option
Sets the selected state.
setSelectionBackground(Color) - Method in class javax.swing.JList
Sets the background color for selected cells.
setSelectionBackground(Color) - Method in class javax.swing.JTable
Sets the background color for selected cells.
setSelectionColor(Color) - Method in class javax.swing.text.JTextComponent
Sets the current color used to render the selection.
setSelectionEnd(int) - Method in class java.awt.TextComponent
Sets the selection end for this text component to the specified position.
setSelectionEnd(int) - Method in class javax.swing.text.JTextComponent
Sets the selection end to the specified position.
setSelectionForeground(Color) - Method in class javax.swing.JList
Sets the foreground color for selected cells.
setSelectionForeground(Color) - Method in class javax.swing.JTable
Sets the foreground color for selected cells.
setSelectionInterval(int, int) - Method in class javax.swing.DefaultListSelectionModel
setSelectionInterval(int, int) - Method in class javax.swing.JList
Selects the specified interval.
setSelectionInterval(int, int) - Method in class javax.swing.JTree
Selects the nodes between index0 and index1, inclusive.
setSelectionInterval(int, int) - Method in interface javax.swing.ListSelectionModel
Change the selection to be between index0 and index1 inclusive.
setSelectionMode(int) - Method in class javax.swing.DefaultListSelectionModel
Sets the selection mode.
setSelectionMode(int) - Method in class javax.swing.JList
Determines whether single-item or multiple-item selections are allowed.
setSelectionMode(int) - Method in interface javax.swing.ListSelectionModel
Set the selection mode.
setSelectionMode(int) - Method in class javax.swing.JTable
Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
setSelectionMode(int) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
setSelectionMode(int) - Method in interface javax.swing.tree.TreeSelectionModel
Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
setSelectionModel(ColorSelectionModel) - Method in class javax.swing.JColorChooser
Set the model containing the selected color.
setSelectionModel(ListSelectionModel) - Method in class javax.swing.JList
Sets the selectionModel for the list to a non-null ListSelectionModel implementation.
setSelectionModel(ListSelectionModel) - Method in class javax.swing.JTable
Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.
setSelectionModel(ListSelectionModel) - Method in class javax.swing.table.DefaultTableColumnModel
Sets the selection model for this TableColumnModel to newModel and registers for listener notifications from the new selection model.
setSelectionModel(ListSelectionModel) - Method in interface javax.swing.table.TableColumnModel
Sets the selection model.
setSelectionModel(SingleSelectionModel) - Method in class javax.swing.JPopupMenu
Sets the model object to handle single selections.
setSelectionModel(SingleSelectionModel) - Method in class javax.swing.JMenuBar
Sets the model object to handle single selections.
setSelectionModel(TreeSelectionModel) - Method in class javax.swing.JTree
Sets the tree's selection model.
setSelectionModel(TreeSelectionModel) - Method in class javax.swing.tree.AbstractLayoutCache
Sets the TreeSelectionModel used to manage the selection to new LSM.
setSelectionModel(TreeSelectionModel) - Method in class javax.swing.plaf.basic.BasicTreeUI
Resets the selection model.
setSelectionPath(TreePath) - Method in class javax.swing.JTree
Selects the node identified by the specified path.
setSelectionPath(TreePath) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Sets the selection to path.
setSelectionPath(TreePath) - Method in interface javax.swing.tree.TreeSelectionModel
Sets the selection to path.
setSelectionPaths(TreePath[]) - Method in class javax.swing.JTree
Selects the nodes identified by the specified array of paths.
setSelectionPaths(TreePath[]) - Method in class javax.swing.JTree.EmptySelectionModel
A null implementation that selects nothing.
setSelectionPaths(TreePath[]) - Method in class javax.swing.tree.DefaultTreeSelectionModel
Sets the selection to the paths in paths.
setSelectionPaths(TreePath[]) - Method in interface javax.swing.tree.TreeSelectionModel
Sets the selection to path.
setSelectionRow(int) - Method in class javax.swing.JTree
Selects the node at the specified row in the display.
setSelectionRows(int[]) - Method in class javax.swing.JTree
Selects the nodes corresponding to each of the specified rows in the display.
setSelectionStart(int) - Method in class java.awt.TextComponent
Sets the selection start for this text component to the specified position.
setSelectionStart(int) - Method in class javax.swing.text.JTextComponent
Sets the selection start to the specified position.
setSelectionValues(Object[]) - Method in class javax.swing.JOptionPane
Sets the selection values for a pane that provides the user with a list of items to choose from.
setSelectionVisible(boolean) - Method in class javax.swing.text.DefaultCaret
Changes the selection visibility.
setSelectionVisible(boolean) - Method in interface javax.swing.text.Caret
Sets the visibility of the selection
setSendBufferSize(int) - Method in class java.net.DatagramSocket
Sets the SO_SNDBUF option to the specified value for this DatagramSocket.
setSendBufferSize(int) - Method in class java.net.Socket
Sets the SO_SNDBUF option to the specified value for this Socket.
setSeparatorSize(Dimension) - Method in class javax.swing.JToolBar.Separator
Sets the size of the separator.
setSequence(InputStream) - Method in interface javax.sound.midi.Sequencer
Sets the current sequence on which the sequencer operates.
setSequence(Sequence) - Method in interface javax.sound.midi.Sequencer
Sets the current sequence on which the sequencer operates.
setShort(int, short) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java short value.
setShort(Object, int, short) - Static method in class java.lang.reflect.Array
Sets the value of the indexed component of the specified array object to the specified short value.
setShort(Object, short) - Method in class java.lang.reflect.Field
Sets the value of a field as a short on the specified object.
setShortcut(MenuShortcut) - Method in class java.awt.MenuItem
Set the MenuShortcut object associated with this menu item.
setShortDescription(String) - Method in class java.beans.FeatureDescriptor
You can associate a short descriptive string with a feature.
setShortMonths(String[]) - Method in class java.text.DateFormatSymbols
Sets short month strings.
setShortWeekdays(String[]) - Method in class java.text.DateFormatSymbols
Sets short weekday strings.
setShowGrid(boolean) - Method in class javax.swing.JTable
Sets whether the table draws grid lines around cells.
setShowHorizontalLines(boolean) - Method in class javax.swing.JTable
Sets whether the table draws horizontal lines between cells.
setShowsRootHandles(boolean) - Method in class javax.swing.JTree
Determines whether the node handles are to be displayed.
setShowsRootHandles(boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Determines whether the node handles are to be displayed.
setShowVerticalLines(boolean) - Method in class javax.swing.JTable
Sets whether the table draws vertical lines between cells.
setSides(JobAttributes.SidesType) - Method in class java.awt.JobAttributes
Specifies how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.
setSidesToDefault() - Method in class java.awt.JobAttributes
Sets how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes to the default.
setSigners(Class, Object[]) - Method in class java.lang.ClassLoader
Sets the signers of a class.
setSize(Dimension) - Method in class java.awt.Component
Resizes this component so that it has width d.width and height d.height.
setSize(Dimension) - Method in class java.awt.Component.AccessibleAWTComponent
Resizes this object so that it has width width and height.
setSize(Dimension) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Resizes this object..
setSize(Dimension) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Resizes this object so that it has width and height.
setSize(Dimension) - Method in class java.awt.Dimension
Set the size of this Dimension object to the specified size.
setSize(Dimension) - Method in class java.awt.Rectangle
Sets the size of this Rectangle to match the specified Dimension.
setSize(Dimension) - Method in interface javax.accessibility.AccessibleComponent
Resizes this object so that it has width and height.
setSize(Dimension) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setSize(Dimension) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setSize(Dimension) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
setSize(Dimension) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setSize(Dimension2D) - Method in class java.awt.geom.Dimension2D
Sets the size of this Dimension2D object to match the specified size.
setSize(double, double) - Method in class java.awt.Dimension
Set the size of this Dimension object to the specified width and height in double precision.
setSize(double, double) - Method in class java.awt.geom.Dimension2D
Sets the size of this Dimension object to the specified width and height.
setSize(double, double) - Method in class java.awt.print.Paper
Sets the width and height of this Paper object, which represents the properties of the page onto which printing occurs.
setSize(float, float) - Method in class javax.swing.text.View
Sets the size of the view.
setSize(float, float) - Method in class javax.swing.text.BoxView
Sets the size of the view.
setSize(float, float) - Method in class javax.swing.text.AsyncBoxView
Sets the size of the view.
setSize(float, float) - Method in class javax.swing.text.ComponentView
Sets the size of the view.
setSize(float, float) - Method in class javax.swing.text.IconView
Sets the size of the view.
setSize(float, float) - Method in class javax.swing.text.WrappedPlainView
Sets the size of the view.
setSize(int) - Method in class java.util.Vector
Sets the size of this vector.
setSize(int) - Method in class javax.swing.DefaultListModel
Sets the size of this list.
setSize(int, int) - Method in class java.awt.Component
Resizes this component so that it has width width and height.
setSize(int, int) - Method in class java.awt.Dimension
Set the size of this Dimension object to the specified width and height.
setSize(int, int) - Method in class java.awt.Rectangle
Sets the size of this Rectangle to the specified width and height.
setSize(int, int) - Method in class javax.swing.SizeSequence
Sets the size of the specified entry.
setSize(long) - Method in class java.util.zip.ZipEntry
Sets the uncompressed size of the entry data.
setSizes(int[]) - Method in class javax.swing.SizeSequence
Resets this SizeSequence object, using the data in the sizes argument.
setSizes(int[]) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Sets the sizes to newSizes.
setSlaveSyncMode(Sequencer.SyncMode) - Method in interface javax.sound.midi.Sequencer
Sets the slave synchronization mode for the sequencer.
setSnapToTicks(boolean) - Method in class javax.swing.JSlider
Specifying true makes the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
setSocketFactory(RMISocketFactory) - Static method in class java.rmi.server.RMISocketFactory
Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory).
setSocketFactory(SocketImplFactory) - Static method in class java.net.ServerSocket
Sets the server socket implementation factory for the application.
setSocketImplFactory(SocketImplFactory) - Static method in class java.net.Socket
Sets the client socket implementation factory for the application.
setSoLinger(boolean, int) - Method in class java.net.Socket
Enable/disable SO_LINGER with the specified linger time in seconds.
setSolo(boolean) - Method in interface javax.sound.midi.MidiChannel
Sets the solo state for this channel.
setSoTimeout(int) - Method in class java.net.DatagramSocket
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
setSoTimeout(int) - Method in class java.net.Socket
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
setSoTimeout(int) - Method in class java.net.ServerSocket
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
setSource(Object) - Method in class java.awt.event.KeyEvent
Set the source of this KeyEvent.
setSource(Object, int) - Method in class java.awt.image.renderable.ParameterBlock
Replaces an entry in the list of source with a new source.
setSourceActions(int) - Method in class java.awt.dnd.DragGestureRecognizer
This method sets the permitted source drag action(s) for this Drag and Drop operation.
setSources(Vector) - Method in class java.awt.image.renderable.ParameterBlock
Sets the entire Vector of sources to a given Vector.
setSouthPane(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setSpaceAbove(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets space above.
setSpaceBelow(MutableAttributeSet, float) - Static method in class javax.swing.text.StyleConstants
Sets space below.
setStartRule(int, int, int) - Method in class java.util.SimpleTimeZone
Sets the DST start rule to a fixed date within a month.
setStartRule(int, int, int, int) - Method in class java.util.SimpleTimeZone
Sets the daylight savings starting rule.
setStartRule(int, int, int, int, boolean) - Method in class java.util.SimpleTimeZone
Sets the DST start rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
setStartYear(int) - Method in class java.util.SimpleTimeZone
Sets the daylight savings starting year.
setState(boolean) - Method in class java.awt.Checkbox
Sets the state of this check box to the specified state.
setState(boolean) - Method in class java.awt.CheckboxMenuItem
Sets this check box menu item to the specifed state.
setState(boolean) - Method in class javax.swing.JCheckBoxMenuItem
Sets the selected-state of the item.
setState(int) - Method in class java.awt.Frame
Sets the state of this frame.
setStrategy(int) - Method in class java.util.zip.Deflater
Sets the compression strategy to the specified value.
setStrength(int) - Method in class java.text.Collator
Sets this Collator's strength property.
setStrikeThrough(boolean) - Method in class javax.swing.text.LabelView
Set whether or not the view has a strike/line through it.
setStrikeThrough(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the strikethrough attribute.
setString(int, String) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a Java String value.
setString(String) - Method in class javax.swing.JProgressBar
Sets the value of the Progress String.
setStringPainted(boolean) - Method in class javax.swing.JProgressBar
Sets whether the progress bar will render a string.
setStroke(Stroke) - Method in class java.awt.Graphics2D
Sets the Stroke for the Graphics2D context.
setStub(AppletStub) - Method in class java.applet.Applet
Sets this applet's stub.
setStyledDocument(StyledDocument) - Method in class javax.swing.JTextPane
Associates the editor with a text document.
setStyleSheet(StyleSheet) - Method in class javax.swing.text.html.HTMLEditorKit
Set the set of styles to be used to render the various HTML elements.
setSubscript(boolean) - Method in class javax.swing.text.LabelView
Set whether or not the view represents a subscript.
setSubscript(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the subscript attribute.
setSuperscript(boolean) - Method in class javax.swing.text.LabelView
Set whether or not the view represents a superscript.
setSuperscript(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the superscript attribute.
setSyncAllWidths(boolean) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
setSystem(ActivationSystem) - Static method in class java.rmi.activation.ActivationGroup
Set the activation system for the VM.
setSystemScope(IdentityScope) - Static method in class java.security.IdentityScope
Deprecated. Sets the system's identity scope.
setTable(JTable) - Method in class javax.swing.table.JTableHeader
Sets the table associated with this header.
setTableHeader(JTableHeader) - Method in class javax.swing.JTable
Sets the tableHeader working with this JTable to newHeader.
setTabPlacement(int) - Method in class javax.swing.JTabbedPane
Sets the tab placement for this tabbedpane.
setTabSet(MutableAttributeSet, TabSet) - Static method in class javax.swing.text.StyleConstants
Sets the TabSet.
setTabSize(int) - Method in class javax.swing.JTextArea
Sets the number of characters to expand tabs to.
setTarget(Object) - Method in class javax.accessibility.AccessibleRelation
Sets the target object for this relation
setTarget(Object[]) - Method in class javax.accessibility.AccessibleRelation
Sets the target objects for this relation
setTarget(Remote) - Method in interface javax.rmi.CORBA.Tie
Called by Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote) to set the target for this tie.
setTargetActions(int) - Method in class java.awt.dnd.DropTargetContext
This method sets the current actions acceptable to this DropTarget.
setTcpNoDelay(boolean) - Method in class java.net.Socket
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
setTempoFactor(float) - Method in interface javax.sound.midi.Sequencer
Scales the sequencer's actual playback tempo by the factor provided.
setTempoInBPM(float) - Method in interface javax.sound.midi.Sequencer
Sets the tempo in beats per minute.
setTempoInMPQ(float) - Method in interface javax.sound.midi.Sequencer
Sets the tempo in microseconds per quarter note.
setText(CharacterIterator) - Method in class java.text.CollationElementIterator
Set a new string over which to iterate.
setText(CharacterIterator) - Method in class java.text.BreakIterator
Set a new text for scanning.
setText(String) - Method in class java.awt.TextComponent
Sets the text that is presented by this text component to be the specified text.
setText(String) - Method in class java.awt.Label
Sets the text for this label to the specified text.
setText(String) - Method in class java.awt.TextField
Sets the text that is presented by this text component to be the specified text.
setText(String) - Method in class java.text.CollationElementIterator
Set a new string over which to iterate.
setText(String) - Method in class java.text.StringCharacterIterator
Reset this iterator to point to a new string.
setText(String) - Method in class java.text.BreakIterator
Set a new text string to be scanned.
setText(String) - Method in class javax.swing.JEditorPane
Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor.
setText(String) - Method in class javax.swing.AbstractButton
Sets the button's text.
setText(String) - Method in class javax.swing.JLabel
Defines the single line of text this component will display.
setText(String) - Method in class javax.swing.text.JTextComponent
Sets the text of this TextComponent to the specified text.
setTextNonSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the color the text is drawn with when the node isn't selected.
setTextSelectionColor(Color) - Method in class javax.swing.tree.DefaultTreeCellRenderer
Sets the color the text is drawn with when the node is selected.
setTextShiftOffset() - Method in class javax.swing.plaf.basic.BasicButtonUI
setThumbBounds(int, int, int, int) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
Set the bounds of the thumb and force a repaint that includes the old thumbBounds and the new one.
setThumbBounds(int, int, int, int) - Method in class javax.swing.plaf.metal.MetalScrollBarUI
This is overridden only to increase the invalid area.
setThumbLocation(int, int) - Method in class javax.swing.plaf.basic.BasicSliderUI
setTick(long) - Method in class javax.sound.midi.MidiEvent
Sets the time-stamp for the event, in MIDI ticks
setTickPosition(long) - Method in interface javax.sound.midi.Sequencer
Sets the current sequencer position in MIDI ticks
setTime(Date) - Method in class java.util.Calendar
Sets this Calendar's current time with the given Date.
setTime(int, Time) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a java.sql.Time value.
setTime(int, Time, Calendar) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
setTime(long) - Method in class java.sql.Date
Sets an existing Date object using the given milliseconds time value.
setTime(long) - Method in class java.sql.Time
Sets a Time object using a milliseconds time value.
setTime(long) - Method in class java.util.Date
Sets this Date object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
setTime(long) - Method in class java.util.zip.ZipEntry
Sets the modification time of the entry.
setTimeInMillis(long) - Method in class java.util.Calendar
Sets this Calendar's current time from the given long value.
setTimeLimit(int) - Method in class javax.naming.directory.SearchControls
Sets the time limit of these SearchControls in milliseconds.
setTimestamp(int, Timestamp) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to a java.sql.Timestamp value.
setTimestamp(int, Timestamp, Calendar) - Method in interface java.sql.PreparedStatement
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
setTimeToLive(int) - Method in class java.net.MulticastSocket
Set the default time-to-live for multicast packets sent out on this socket.
setTimeToLive(int) - Method in class java.net.DatagramSocketImpl
Set the TTL (time-to-live) option.
setTimeZone(TimeZone) - Method in class java.text.DateFormat
Sets the time zone for the calendar of this DateFormat object.
setTimeZone(TimeZone) - Method in class java.util.Calendar
Sets the time zone with the given time zone value.
setTipText(String) - Method in class javax.swing.JToolTip
Sets the text to show when the tool tip is displayed.
setTitle(String) - Method in class java.awt.Dialog
Sets the title of the Dialog.
setTitle(String) - Method in class java.awt.Frame
Sets the title for this frame to the specified string.
setTitle(String) - Method in class javax.swing.JInternalFrame
Sets the JInternalFrame title.
setTitle(String) - Method in class javax.swing.border.TitledBorder
Sets the title of the titled border.
setTitleAt(int, String) - Method in class javax.swing.JTabbedPane
Sets the title at index to title which can be null.
setTitleColor(Color) - Method in class javax.swing.border.TitledBorder
Sets the title-color of the titled border.
setTitleFont(Font) - Method in class javax.swing.border.TitledBorder
Sets the title-font of the titled border.
setTitleJustification(int) - Method in class javax.swing.border.TitledBorder
Sets the title-justification of the titled border.
setTitlePosition(int) - Method in class javax.swing.border.TitledBorder
Sets the title-position of the titled border.
setToggleClickCount(int) - Method in class javax.swing.JTree
Sets the number of mouse clicks before a node will expand or close.
setToIdentity() - Method in class java.awt.geom.AffineTransform
Resets this transform to the Identity transform.
setTokenThreshold(int) - Method in class javax.swing.text.html.HTMLDocument
Sets the number of tokens to buffer before trying to update the documents element structure.
setToolTipText(String) - Method in class javax.swing.JComponent
Registers the text to display in a tool tip.
setToolTipTextAt(int, String) - Method in class javax.swing.JTabbedPane
Sets the tooltip text at index to toolTipText which can be null.
setToPage(int) - Method in class java.awt.JobAttributes
Specifies, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed.
setTopComponent(Component) - Method in class javax.swing.JSplitPane
Sets the component above, or to the left of the divider.
setTopInset(float) - Method in class javax.swing.text.AsyncBoxView
Set the top part of the margin around the view.
setToRotation(double) - Method in class java.awt.geom.AffineTransform
Sets this transform to a rotation transformation.
setToRotation(double, double, double) - Method in class java.awt.geom.AffineTransform
Sets this transform to a translated rotation transformation.
setToScale(double, double) - Method in class java.awt.geom.AffineTransform
Sets this transform to a scaling transformation.
setToShear(double, double) - Method in class java.awt.geom.AffineTransform
Sets this transform to a shearing transformation.
setToTranslation(double, double) - Method in class java.awt.geom.AffineTransform
Sets this transform to a translation transformation.
setTrackMute(int, boolean) - Method in interface javax.sound.midi.Sequencer
Sets the mute state for a track.
setTrackSolo(int, boolean) - Method in interface javax.sound.midi.Sequencer
Sets the solo state for a track.
setTransactionIsolation(int) - Method in interface java.sql.Connection
Attempts to change the transaction isolation level to the one given.
setTransform(AffineTransform) - Method in class java.awt.Graphics2D
Sets the Transform in the Graphics2D context.
setTransform(AffineTransform) - Method in class java.awt.geom.AffineTransform
Sets this transform to a copy of the transform in the specified AffineTransform object.
setTransform(AffineTransform) - Method in class java.awt.image.renderable.RenderContext
Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.
setTransform(double, double, double, double, double, double) - Method in class java.awt.geom.AffineTransform
Sets this transform to the matrix specified by the 6 double precision values.
setTree(JTree) - Method in class javax.swing.tree.DefaultTreeCellEditor
Sets the tree currently editing for.
setTTL(byte) - Method in class java.net.MulticastSocket
Deprecated. use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.
setTTL(byte) - Method in class java.net.DatagramSocketImpl
Deprecated. use setTimeToLive instead.
setType(short) - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Sets the element type.
setTypeMap(Map) - Method in interface java.sql.Connection
Installs the given type map as the type map for this connection.
setUI(ButtonUI) - Method in class javax.swing.AbstractButton
Sets the L&F object that renders this component.
setUI(ColorChooserUI) - Method in class javax.swing.JColorChooser
Sets the L&F object that renders this component.
setUI(ComboBoxUI) - Method in class javax.swing.JComboBox
Sets the L&F object that renders this component.
setUI(ComponentUI) - Method in class javax.swing.JComponent
Sets the look and feel delegate for this component.
setUI(DesktopIconUI) - Method in class javax.swing.JInternalFrame.JDesktopIcon
Sets the L&F object that renders this component.
setUI(DesktopPaneUI) - Method in class javax.swing.JDesktopPane
Sets the L&F object that renders this component.
setUI(InternalFrameUI) - Method in class javax.swing.JInternalFrame
Sets the UI delegate for this JInternalFrame.
setUI(LabelUI) - Method in class javax.swing.JLabel
Sets the L&F object that renders this component.
setUI(ListUI) - Method in class javax.swing.JList
Sets the look and feel (L&F) object that renders this component.
setUI(MenuBarUI) - Method in class javax.swing.JMenuBar
Sets the L&F object that renders this component.
setUI(MenuItemUI) - Method in class javax.swing.JMenuItem
Sets the L&F object that renders this component.
setUI(OptionPaneUI) - Method in class javax.swing.JOptionPane
Sets the UI object which implements the L&F for this component.
setUI(PopupMenuUI) - Method in class javax.swing.JPopupMenu
Sets the L&F object that renders this component.
setUI(ProgressBarUI) - Method in class javax.swing.JProgressBar
Sets the L&F object that renders this component.
setUI(RootPaneUI) - Method in class javax.swing.JRootPane
Sets the L&F object that renders this component.
setUI(ScrollPaneUI) - Method in class javax.swing.JScrollPane
Sets the ScrollPaneUI object that provides the look and feel (L&F) for this component.
setUI(SeparatorUI) - Method in class javax.swing.JSeparator
Sets the L&F object that renders this component.
setUI(SliderUI) - Method in class javax.swing.JSlider
Sets the UI object which implements the L&F for this component.
setUI(SplitPaneUI) - Method in class javax.swing.JSplitPane
Sets the L&F object that renders this component.
setUI(TabbedPaneUI) - Method in class javax.swing.JTabbedPane
Sets the UI object which implements the L&F for this component.
setUI(TableHeaderUI) - Method in class javax.swing.table.JTableHeader
Sets the look and feel (L&F) object that renders this component.
setUI(TableUI) - Method in class javax.swing.JTable
Sets the L&F object that renders this component and repaints.
setUI(TextUI) - Method in class javax.swing.text.JTextComponent
Sets the user-interface factory for this text-oriented editor
setUI(ToolBarUI) - Method in class javax.swing.JToolBar
Sets the L&F object that renders this component.
setUI(TreeUI) - Method in class javax.swing.JTree
Sets the L&F object that renders this component.
setUI(ViewportUI) - Method in class javax.swing.JViewport
Sets the L&F object that renders this component.
setUnderline(boolean) - Method in class javax.swing.text.LabelView
Set whether or not the view is underlined.
setUnderline(MutableAttributeSet, boolean) - Static method in class javax.swing.text.StyleConstants
Sets the underline attribute.
setUnexecutedModifications(ModificationItem[]) - Method in class javax.naming.directory.AttributeModificationException
Sets the unexecuted modification list to be e.
setUnicast(boolean) - Method in class java.beans.EventSetDescriptor
Mark an event set as unicast (or not).
setUnicodeStream(int, InputStream, int) - Method in interface java.sql.PreparedStatement
Deprecated.
setUnitIncrement(int) - Method in class java.awt.Scrollbar
Sets the unit increment for this scroll bar.
setUnitIncrement(int) - Method in interface java.awt.Adjustable
Sets the unit value increment for the adjustable object.
setUnitIncrement(int) - Method in class javax.swing.JScrollBar
Sets the unitIncrement property.
setUnitIncrement(int) - Method in class javax.swing.JScrollPane.ScrollBar
Messages super to set the value, and resets the unitIncrementSet instance variable to true.
setup(FileSystemView) - Method in class javax.swing.JFileChooser
Performs common constructor initialization and setup.
setUpdateRect(Rectangle) - Method in class java.awt.event.PaintEvent
Sets the rectangle representing the area which needs to be repainted in response to this event.
setUpdateTableInRealTime(boolean) - Method in class javax.swing.table.JTableHeader
Obsolete as of Java 2 platform v1.3.
setupMenuCloseKey() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setupMenuOpenKey() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setupPostTimer(JMenu) - Method in class javax.swing.plaf.basic.BasicMenuUI
setURL(URL, String, String, int, String, String) - Method in class java.net.URLStreamHandler
Deprecated. Use setURL(URL, String, String, int, String, String, String, String);
setURL(URL, String, String, int, String, String, String, String, String) - Method in class java.net.URLStreamHandler
Sets the fields of the URL argument to the indicated values.
setURLStreamHandlerFactory(URLStreamHandlerFactory) - Static method in class java.net.URL
Sets an application's URLStreamHandlerFactory.
setUseCaches(boolean) - Method in class java.net.URLConnection
Sets the value of the useCaches field of this URLConnection to the specified value.
setUserObject(Object) - Method in class javax.swing.tree.DefaultMutableTreeNode
Sets the user object for this node to userObject.
setUserObject(Object) - Method in interface javax.swing.tree.MutableTreeNode
Resets the user object of the receiver to object.
setValue(boolean) - Method in class javax.sound.sampled.BooleanControl
Sets the current value for the control.
setValue(float) - Method in class javax.sound.sampled.FloatControl
Sets the current value for the control.
setValue(int) - Method in class java.awt.Scrollbar
Sets the value of this scroll bar to the specified value.
setValue(int) - Method in interface java.awt.Adjustable
Sets the current value of the adjustable object.
setValue(int) - Method in class javax.swing.DefaultBoundedRangeModel
Sets the current value of the model.
setValue(int) - Method in interface javax.swing.BoundedRangeModel
Sets the model's current value to newValue if newValue satisfies the model's constraints.
setValue(int) - Method in class javax.swing.JScrollBar
Sets the scrollbar's value.
setValue(int) - Method in class javax.swing.JProgressBar
Sets the model's current value to x.
setValue(int) - Method in class javax.swing.JSlider
Sets the sliders current value.
setValue(Object) - Method in interface java.beans.PropertyEditor
Set (or change) the object that is to be edited.
setValue(Object) - Method in class java.beans.PropertyEditorSupport
Set (or change) the object that is to be edited.
setValue(Object) - Method in interface java.util.Map.Entry
Replaces the value corresponding to this entry with the specified value (optional operation).
setValue(Object) - Method in class javax.sound.sampled.EnumControl
Sets the current value for the control.
setValue(Object) - Method in class javax.swing.JOptionPane
Sets the value the user has chosen.
setValue(Object) - Method in class javax.swing.DefaultCellEditor.EditorDelegate
setValue(Object) - Method in class javax.swing.table.DefaultTableCellRenderer
Sets the string for the cell being rendered to value.
setValue(Object, boolean) - Method in interface javax.swing.Renderer
Specifies the value to display and whether or not the value should be portrayed as "currently selected".
setValue(String, Object) - Method in class java.beans.FeatureDescriptor
Associate a named attribute with this feature.
setValueAt(Object, int, int) - Method in class javax.swing.JTable
Sets the value for the cell in the table model at row and column.
setValueAt(Object, int, int) - Method in class javax.swing.table.AbstractTableModel
This empty implementation is provided so users don't have to implement this method if their data model is not editable.
setValueAt(Object, int, int) - Method in class javax.swing.table.DefaultTableModel
Sets the object value for the cell at column and row.
setValueAt(Object, int, int) - Method in interface javax.swing.table.TableModel
Sets the value in the cell at columnIndex and rowIndex to aValue.
setValueIsAdjusting(boolean) - Method in class javax.swing.DefaultBoundedRangeModel
Sets the valueIsAdjusting property.
setValueIsAdjusting(boolean) - Method in class javax.swing.DefaultListSelectionModel
setValueIsAdjusting(boolean) - Method in class javax.swing.JList
Sets the data model's isAdjusting property to true, so that a single event will be generated when all of the selection events have finished (for example, when the mouse is being dragged over the list in selection mode).
setValueIsAdjusting(boolean) - Method in interface javax.swing.ListSelectionModel
This property is true if upcoming changes to the value of the model should be considered a single event.
setValueIsAdjusting(boolean) - Method in interface javax.swing.BoundedRangeModel
This attribute indicates that any upcoming changes to the value of the model should be considered a single event.
setValueIsAdjusting(boolean) - Method in class javax.swing.JScrollBar
Sets the model's valueIsAdjusting property.
setValueIsAdjusting(boolean) - Method in class javax.swing.JSlider
Sets the models valueIsAdjusting property.
setValues(int, int, int, int) - Method in class java.awt.Scrollbar
Sets the values of four properties for this scroll bar.
setValues(int, int, int, int) - Method in class javax.swing.JScrollBar
Sets the four BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
setVerifyInputWhenFocusTarget(boolean) - Method in class javax.swing.JComponent
Set the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.
setVerticalAlignment(int) - Method in class javax.swing.AbstractButton
Sets the vertical alignment of the icon and text.
setVerticalAlignment(int) - Method in class javax.swing.JLabel
Sets the alignment of the label's contents along the Y axis.
setVerticalScrollBar(JScrollBar) - Method in class javax.swing.JScrollPane
Adds the scrollbar that controls the viewports vertical view position to the scrollpane.
setVerticalScrollBarPolicy(int) - Method in class javax.swing.ScrollPaneLayout
Sets the vertical scrollbar-display policy.
setVerticalScrollBarPolicy(int) - Method in class javax.swing.JScrollPane
Determines when the vertical scrollbar appears in the scrollpane.
setVerticalTextPosition(int) - Method in class javax.swing.AbstractButton
Sets the vertical position of the text relative to the icon.
setVerticalTextPosition(int) - Method in class javax.swing.JLabel
Sets the vertical position of the label's text, relative to its image.
setVgap(int) - Method in class java.awt.CardLayout
Sets the vertical gap between components.
setVgap(int) - Method in class java.awt.GridLayout
Sets the vertical gap between components to the specified value.
setVgap(int) - Method in class java.awt.BorderLayout
Sets the vertical gap between components.
setVgap(int) - Method in class java.awt.FlowLayout
Sets the vertical gap between components.
setView(Component) - Method in class javax.swing.JViewport
Sets the JViewports one lightweight child (view), which can be null.
setView(View) - Method in class javax.swing.plaf.basic.BasicTextUI
Sets the current root of the view hierarchy and calls invalidate().
setViewport(JViewport) - Method in class javax.swing.JScrollPane
Removes the old viewport (if there is one); forces the viewPosition of the new viewport to be in the +x,+y quadrant; syncs up the row and column headers (if there are any) with the new viewport; and finally syncs the scrollbars and headers with the new viewport.
setViewportBorder(Border) - Method in class javax.swing.JScrollPane
Adds a border around the viewport.
setViewportView(Component) - Method in class javax.swing.JScrollPane
Creates a viewport if necessary and then sets its view.
setViewPosition(Point) - Method in class javax.swing.JViewport
Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.
setViewSize(Dimension) - Method in class javax.swing.JViewport
Sets the view coordinates that appear in the upper left hand corner of the viewport, and the size of the view.
setVisible(boolean) - Method in class java.awt.Component
Shows or hides this component depending on the value of parameter b.
setVisible(boolean) - Method in class java.awt.Component.AccessibleAWTComponent
Set the visible state of the object.
setVisible(boolean) - Method in class java.awt.MenuComponent.AccessibleAWTMenuComponent
Set the visible state of the object.
setVisible(boolean) - Method in class java.awt.List.AccessibleAWTList.AccessibleAWTListChild
Set the visible state of the object.
setVisible(boolean) - Method in interface javax.accessibility.AccessibleComponent
Sets the visible state of the object.
setVisible(boolean) - Method in class javax.swing.JComponent
Makes the component visible or invisible.
setVisible(boolean) - Method in class javax.swing.JPopupMenu
Sets the visibility of the popup menu.
setVisible(boolean) - Method in class javax.swing.JList.AccessibleJList.AccessibleJListChild
setVisible(boolean) - Method in class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
setVisible(boolean) - Method in class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
Sets the visible state of the object.
setVisible(boolean) - Method in class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
setVisible(boolean) - Method in class javax.swing.text.DefaultCaret
Sets the caret visibility, and repaints the caret.
setVisible(boolean) - Method in interface javax.swing.text.Caret
Sets the visibility of the caret.
setVisibleAmount(int) - Method in class java.awt.Scrollbar
Sets the visible amount of this scroll bar.
setVisibleAmount(int) - Method in interface java.awt.Adjustable
Sets the length of the proportionl indicator of the adjustable object.
setVisibleAmount(int) - Method in class javax.swing.JScrollBar
Set the model's extent property.
setVisibleComponent(Component) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
setVisibleRowCount(int) - Method in class javax.swing.JList
Sets the preferred number of rows in the list that can be displayed without a scollbar, as determined by the nearest JViewport ancestor, if any.
setVisibleRowCount(int) - Method in class javax.swing.JTree
Sets the number of rows that are to be displayed.
setWantsInput(boolean) - Method in class javax.swing.JOptionPane
If newValue is true, a parentComponent is provided to allow the user to input a value.
setWasIcon(JInternalFrame, Boolean) - Method in class javax.swing.DefaultDesktopManager
Sets that the component has been iconized and the bounds of the desktopIcon are valid.
setWeekdays(String[]) - Method in class java.text.DateFormatSymbols
Sets weekday strings.
setWestPane(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
setWidth(int) - Method in class javax.swing.table.TableColumn
This method should not be used to set the widths of columns in the JTable, use setPreferredWidth instead.
setWindingRule(int) - Method in class java.awt.geom.GeneralPath
Sets the winding rule for this path to the specified value.
setWrapStyleWord(boolean) - Method in class javax.swing.JTextArea
Set the style of wrapping used if the text area is wrapping lines.
setWriteMethod(Method) - Method in class java.beans.PropertyDescriptor
Sets the method that should be used to write the property value.
setXORMode(Color) - Method in class java.awt.Graphics
Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.
setXORMode(Color) - Method in class javax.swing.DebugGraphics
Overrides Graphics.setXORMode.
setYear(int) - Method in class java.sql.Time
Deprecated.
setYear(int) - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900).
setZeroDigit(char) - Method in class java.text.DecimalFormatSymbols
Set the character used for zero.
setZoneStrings(String[][]) - Method in class java.text.DateFormatSymbols
Sets timezone strings.
shadow - Variable in class javax.swing.border.EtchedBorder
shadow - Variable in class javax.swing.plaf.basic.BasicSeparatorUI
shadow - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
shadow - Variable in class javax.swing.plaf.basic.BasicBorders.ButtonBorder
shadow - Variable in class javax.swing.plaf.basic.BasicBorders.FieldBorder
shadow - Variable in class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
shadowInner - Variable in class javax.swing.border.BevelBorder
shadowOuter - Variable in class javax.swing.border.BevelBorder
shallowClone() - Method in class java.awt.image.renderable.ParameterBlock
Creates a shallow copy of a ParameterBlock.
Shape - interface java.awt.Shape.
The Shape interface provides definitions for objects that represent some form of geometric shape.
SHAPE - Static variable in class javax.swing.text.html.HTML.Attribute
ShapeGraphicAttribute - class java.awt.font.ShapeGraphicAttribute.
The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.
ShapeGraphicAttribute(Shape, int, boolean) - Constructor for class java.awt.font.ShapeGraphicAttribute
Constructs a ShapeGraphicAttribute for the specified Shape.
SHAPES - Static variable in class javax.swing.text.html.HTML.Attribute
sharedInstance - Static variable in class javax.swing.JTree.EmptySelectionModel
Unique shared instance.
sharedInstance() - Static method in class javax.swing.ToolTipManager
Returns a shared ToolTipManager instance.
sharedInstance() - Static method in class javax.swing.JTree.EmptySelectionModel
Returns a shared instance of an empty selection model.
shear(double, double) - Method in class java.awt.Graphics2D
Concatenates the current Graphics2D Transform with a shearing transform.
shear(double, double) - Method in class java.awt.geom.AffineTransform
Concatenates this transform with a shearing transformation.
SHIFT_MASK - Static variable in class java.awt.Event
This flag indicates that the Shift key was down when the event occurred.
SHIFT_MASK - Static variable in class java.awt.event.ActionEvent
The shift modifier.
SHIFT_MASK - Static variable in class java.awt.event.InputEvent
The shift key modifier constant.
shift(float, float, int) - Method in class javax.sound.sampled.FloatControl
Changes the control value from the initial value to the final value linearly over the specified time period, specified in microseconds.
shiftDown() - Method in class java.awt.Event
Checks if the Shift key is down.
shiftEnd(int) - Method in class javax.swing.text.GapContent
Make the gap bigger, moving any necessary data and updating the appropriate marks
shiftGap(int) - Method in class javax.swing.text.GapContent
Move the start of the gap to a new location, without changing the size of the gap.
shiftGapEndUp(int) - Method in class javax.swing.text.GapContent
Adjust the gap end upward.
shiftGapStartDown(int) - Method in class javax.swing.text.GapContent
Adjust the gap end downward.
shiftLeft(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this << n).
shiftRight(int) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this >> n).
Short - class java.lang.Short.
The Short class is the standard wrapper for short values.
SHORT - Static variable in class java.text.DateFormat
Constant for short style pattern.
SHORT - Static variable in class java.util.TimeZone
A style specifier for getDisplayName() indicating a short name, such as "PST."
SHORT_DESCRIPTION - Static variable in interface javax.swing.Action
The key used for storing a short description for the action, used for tooltip text.
Short(short) - Constructor for class java.lang.Short
Constructs a Short object initialized to the specified short value.
Short(String) - Constructor for class java.lang.Short
Constructs a Short object initialized to the value specified by the String parameter.
shortcuts() - Method in class java.awt.MenuBar
Gets an enumeration of all menu shortcuts this menu bar is managing.
ShortHolder - class org.omg.CORBA.ShortHolder.
A Holder class for a short that is used to store "out" and "inout" parameters in IDL operations.
ShortHolder() - Constructor for class org.omg.CORBA.ShortHolder
Constructs a new ShortHolder object with its value field initialized to 0.
ShortHolder(short) - Constructor for class org.omg.CORBA.ShortHolder
Constructs a new ShortHolder object with its value field initialized to the given short.
ShortLookupTable - class java.awt.image.ShortLookupTable.
This class defines a lookup table object.
ShortLookupTable(int, short[]) - Constructor for class java.awt.image.ShortLookupTable
Constructs a ShortLookupTable object from an array of shorts representing a lookup table for each band.
ShortLookupTable(int, short[][]) - Constructor for class java.awt.image.ShortLookupTable
Constructs a ShortLookupTable object from an array of short arrays representing a lookup table for each band.
ShortMessage - class javax.sound.midi.ShortMessage.
A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
ShortMessage() - Constructor for class javax.sound.midi.ShortMessage
Constructs a new ShortMessage.
ShortMessage(byte[]) - Constructor for class javax.sound.midi.ShortMessage
Constructs a new ShortMessage.
ShortSeqHelper - class org.omg.CORBA.ShortSeqHelper.
org/omg/CORBA/ShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ShortSeqHelper() - Constructor for class org.omg.CORBA.ShortSeqHelper
ShortSeqHolder - class org.omg.CORBA.ShortSeqHolder.
org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ShortSeqHolder() - Constructor for class org.omg.CORBA.ShortSeqHolder
ShortSeqHolder(short[]) - Constructor for class org.omg.CORBA.ShortSeqHolder
shortValue() - Method in class java.lang.Number
Returns the value of the specified number as a short.
shortValue() - Method in class java.lang.Long
Returns the value of this Long as a short.
shortValue() - Method in class java.lang.Short
Returns the value of this Short as a short.
shortValue() - Method in class java.lang.Float
Returns the value of this Float as a short (by casting to a short).
shortValue() - Method in class java.lang.Integer
Returns the value of this Integer as a short.
shortValue() - Method in class java.lang.Byte
Returns the value of this Byte as a short.
shortValue() - Method in class java.lang.Double
Returns the value of this Double as a short (by casting to a short).
shouldFillGap(int, int, int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
shouldPadTabRun(int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
shouldPadTabRun(int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
shouldPaintExpandControl(TreePath, int, boolean, boolean, boolean) - Method in class javax.swing.plaf.basic.BasicTreeUI
Returns true if the expand (toggle) control should be drawn for the specified row.
shouldRotateTabRuns(int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
shouldRotateTabRuns(int, int) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
shouldScroll(int) - Method in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
shouldSelectCell(EventObject) - Method in interface javax.swing.CellEditor
The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not.
shouldSelectCell(EventObject) - Method in class javax.swing.AbstractCellEditor
Returns true.
shouldSelectCell(EventObject) - Method in class javax.swing.DefaultCellEditor
shouldSelectCell(EventObject) - Method in class javax.swing.DefaultCellEditor.EditorDelegate
shouldSelectCell(EventObject) - Method in class javax.swing.tree.DefaultTreeCellEditor
Messages the realEditor for the return value.
shouldStartEditingTimer(EventObject) - Method in class javax.swing.tree.DefaultTreeCellEditor
Returns true if event is a MouseEvent and the click count is 1.
shouldYieldFocus(JComponent) - Method in class javax.swing.InputVerifier
Calls verify(input) to ensure that the input is valid.
show() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
show() - Method in class java.awt.Window
Makes the Window visible.
show() - Method in class java.awt.Dialog
Makes the Dialog visible.
show() - Method in class javax.swing.JInternalFrame
Shows this internal frame, and brings it to the front.
show() - Method in class javax.swing.plaf.basic.BasicComboPopup
Implementation of ComboPopup.show().
show() - Method in interface javax.swing.plaf.basic.ComboPopup
Shows the popup
show(boolean) - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
show(Component, int, int) - Method in class java.awt.PopupMenu
Shows the popup menu at the x, y position relative to an origin component.
show(Component, int, int) - Method in class javax.swing.JPopupMenu
Displays the popup menu at the position x,y in the coordinate space of the component invoker.
show(Container, String) - Method in class java.awt.CardLayout
Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
showConfirmDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".
showConfirmDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Brings up a modal dialog where the number of choices is determined by the optionType parameter.
showConfirmDialog(Component, Object, String, int, int) - Static method in class javax.swing.JOptionPane
Brings up a modal dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
showConfirmDialog(Component, Object, String, int, int, Icon) - Static method in class javax.swing.JOptionPane
Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
showDialog(Component, String) - Method in class javax.swing.JFileChooser
Pops a custom file chooser dialog with a custom approve button.
showDialog(Component, String, Color) - Static method in class javax.swing.JColorChooser
Shows a modal color-chooser dialog and blocks until the dialog is hidden.
showDocument(URL) - Method in interface java.applet.AppletContext
Replaces the Web page currently being viewed with the given URL.
showDocument(URL, String) - Method in interface java.applet.AppletContext
Requests that the browser or applet viewer show the Web page indicated by the url argument.
showHorizontalLines - Variable in class javax.swing.JTable
The table draws horizontal lines between cells if showHorizontalLines is true.
SHOWING - Static variable in class javax.accessibility.AccessibleState
Indicates this object, the object's parent, the object's parent's parent, and so on, are all visible.
SHOWING_CHANGED - Static variable in class java.awt.event.HierarchyEvent
The showing state of the hierarchy changed.
showInputDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Shows a question-message dialog requesting input from the user parented to parentComponent.
showInputDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
showInputDialog(Component, Object, String, int, Icon, Object[], Object) - Static method in class javax.swing.JOptionPane
Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
showInputDialog(Object) - Static method in class javax.swing.JOptionPane
Shows a question-message dialog requesting input from the user.
showInternalConfirmDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, "Select an Option".
showInternalConfirmDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Brings up a internal dialog panel where the number of choices is determined by the optionType parameter.
showInternalConfirmDialog(Component, Object, String, int, int) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
showInternalConfirmDialog(Component, Object, String, int, int, Icon) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
showInternalInputDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Shows an internal question-message dialog requesting input from the user parented to parentComponent.
showInternalInputDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
showInternalInputDialog(Component, Object, String, int, Icon, Object[], Object) - Static method in class javax.swing.JOptionPane
Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
showInternalMessageDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Brings up an internal confirmation dialog panel.
showInternalMessageDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel that displays a message using a default icon determined by the messageType parameter.
showInternalMessageDialog(Component, Object, String, int, Icon) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel displaying a message, specifying all parameters.
showInternalOptionDialog(Component, Object, String, int, int, Icon, Object[], Object) - Static method in class javax.swing.JOptionPane
Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
showMessageDialog(Component, Object) - Static method in class javax.swing.JOptionPane
Brings up a modal information-message dialog titled "Message".
showMessageDialog(Component, Object, String, int) - Static method in class javax.swing.JOptionPane
Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
showMessageDialog(Component, Object, String, int, Icon) - Static method in class javax.swing.JOptionPane
Brings up a dialog displaying a message, specifying all parameters.
showOpenDialog(Component) - Method in class javax.swing.JFileChooser
Pops up an "Open File" file chooser dialog.
showOptionDialog(Component, Object, String, int, int, Icon, Object[], Object) - Static method in class javax.swing.JOptionPane
Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
showPopup() - Method in class javax.swing.JComboBox
Causes the combo box to display its popup window.
SHOWS_ROOT_HANDLES_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for showsRootHandles.
showSaveDialog(Component) - Method in class javax.swing.JFileChooser
Pops up a "Save File" file chooser dialog.
showsRootHandles - Variable in class javax.swing.JTree
True if handles are displayed at the topmost level of the tree.
showStatus(String) - Method in interface java.applet.AppletContext
Requests that the argument string be displayed in the "status window".
showStatus(String) - Method in class java.applet.Applet
Requests that the argument string be displayed in the "status window".
showSystemMenu() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
showVerticalLines - Variable in class javax.swing.JTable
The table draws vertical lines between cells if showVerticalLines is true.
shrinkAbsorb - Variable in class java.awt.font.GlyphJustificationInfo
If true,this glyph absorbs all remaining shrinkage at this and lower priority levels as it shrinks.
shrinkLeftLimit - Variable in class java.awt.font.GlyphJustificationInfo
The maximum amount by which the left side of this glyph can shrink (a positive number).
shrinkPriority - Variable in class java.awt.font.GlyphJustificationInfo
The priority level of this glyph as it is shrinking.
shrinkRightLimit - Variable in class java.awt.font.GlyphJustificationInfo
The maximum amount by which the right side of this glyph can shrink (a positive number).
shuffle(List) - Static method in class java.util.Collections
Randomly permutes the specified list using a default source of randomness.
shuffle(List, Random) - Static method in class java.util.Collections
Randomly permute the specified list using the specified source of randomness.
shutdown() - Method in interface java.rmi.activation.ActivationSystem
Shutdown the activation system.
shutdown(boolean) - Method in class org.omg.CORBA.ORB
Instructs the ORB to shut down, which causes all object adapters to shut down.
shutdownInput() - Method in class java.net.SocketImpl
Places the input stream for this socket at "end of stream".
shutdownInput() - Method in class java.net.Socket
Places the input stream for this socket at "end of stream".
shutdownOutput() - Method in class java.net.SocketImpl
Disables the output stream for this socket.
shutdownOutput() - Method in class java.net.Socket
Disables the output stream for this socket.
SIGN - Static variable in class java.security.Signature
Possible Signature.state value, signifying that this signature object has been initialized for signing.
sign() - Method in class java.security.Signature
Returns the signature bytes of all the data updated.
sign(byte[], int, int) - Method in class java.security.Signature
Finishes the signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
Signature - class java.security.Signature.
This Signature class is used to provide applications the functionality of a digital signature algorithm.
SIGNATURE_VERSION - Static variable in class java.util.jar.Attributes.Name
Name object for Signature-Version manifest attribute used when signing JAR files.
Signature(String) - Constructor for class java.security.Signature
Creates a Signature object for the specified algorithm.
SignatureException - exception java.security.SignatureException.
This is the generic Signature exception.
SignatureException() - Constructor for class java.security.SignatureException
Constructs a SignatureException with no detail message.
SignatureException(String) - Constructor for class java.security.SignatureException
Constructs a SignatureException with the specified detail message.
SignatureSpi - class java.security.SignatureSpi.
This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
SignatureSpi() - Constructor for class java.security.SignatureSpi
SignedObject - class java.security.SignedObject.
SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
SignedObject(Serializable, PrivateKey, Signature) - Constructor for class java.security.SignedObject
Constructs a SignedObject from any Serializable object.
Signer - class java.security.Signer.
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
Signer() - Constructor for class java.security.Signer
Deprecated. Creates a signer.
Signer(String) - Constructor for class java.security.Signer
Deprecated. Creates a signer with the specified identity name.
Signer(String, IdentityScope) - Constructor for class java.security.Signer
Deprecated. Creates a signer with the specified identity name and scope.
signum() - Method in class java.math.BigInteger
Returns the signum function of this BigInteger.
signum() - Method in class java.math.BigDecimal
Returns the signum function of this BigDecimal.
SILENT - Static variable in class java.rmi.server.LogStream
Deprecated. log level constant (no logging).
SIMPLE_SCROLL_MODE - Static variable in class javax.swing.JViewport
This mode uses the very simple method of redrawing the entire contents of the scrollpane each time it is scrolled.
SimpleAttributeSet - class javax.swing.text.SimpleAttributeSet.
A straightforward implementation of MutableAttributeSet using a hash table.
SimpleAttributeSet() - Constructor for class javax.swing.text.SimpleAttributeSet
Creates a new attribute set.
SimpleAttributeSet(AttributeSet) - Constructor for class javax.swing.text.SimpleAttributeSet
Creates a new attribute set based on a supplied set of attributes.
SimpleBeanInfo - class java.beans.SimpleBeanInfo.
This is a support class to make it easier for people to provide BeanInfo classes.
SimpleBeanInfo() - Constructor for class java.beans.SimpleBeanInfo
SimpleDateFormat - class java.text.SimpleDateFormat.
SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
SimpleDateFormat() - Constructor for class java.text.SimpleDateFormat
Construct a SimpleDateFormat using the default pattern for the default locale.
SimpleDateFormat(String) - Constructor for class java.text.SimpleDateFormat
Construct a SimpleDateFormat using the given pattern in the default locale.
SimpleDateFormat(String, DateFormatSymbols) - Constructor for class java.text.SimpleDateFormat
Construct a SimpleDateFormat using the given pattern and locale-specific symbol data.
SimpleDateFormat(String, Locale) - Constructor for class java.text.SimpleDateFormat
Construct a SimpleDateFormat using the given pattern and locale.
SimpleTimeZone - class java.util.SimpleTimeZone.
SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
SimpleTimeZone(int, String) - Constructor for class java.util.SimpleTimeZone
Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID.
SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) - Constructor for class java.util.SimpleTimeZone
Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time.
SimpleTimeZone(int, String, int, int, int, int, int, int, int, int, int) - Constructor for class java.util.SimpleTimeZone
Constructor.
SIMPLIFIED_CHINESE - Static variable in class java.util.Locale
Useful constant for language.
SIMPLIFIED_HANZI - Static variable in class java.awt.im.InputSubset
Constant for all Han characters used in writing Simplified Chinese, including a subset of the CJK unified ideographs as well as Simplified Chinese Han characters that may be defined as surrogate characters.
sin(double) - Static method in class java.lang.StrictMath
Returns the trigonometric sine of an angle.
sin(double) - Static method in class java.lang.Math
Returns the trigonometric sine of an angle.
SINGLE_INTERVAL_SELECTION - Static variable in interface javax.swing.ListSelectionModel
A value for the selectionMode property: select one contiguous range of indices at a time.
SINGLE_LINE - Static variable in class javax.accessibility.AccessibleState
Indicates this (text) object can contain only a single line of text
SINGLE_SELECTION - Static variable in interface javax.swing.ListSelectionModel
A value for the selectionMode property: select one list index at a time.
SINGLE_TREE_SELECTION - Static variable in interface javax.swing.tree.TreeSelectionModel
Selection can only contain one path at a time.
SINGLEFRAME - Static variable in interface java.awt.image.ImageConsumer
The image contain a single static image.
SINGLEFRAMEDONE - Static variable in interface java.awt.image.ImageConsumer
One frame of the image is complete but there are more frames to be delivered.
SINGLEPASS - Static variable in interface java.awt.image.ImageConsumer
The pixels will be delivered in a single pass.
SinglePixelPackedSampleModel - class java.awt.image.SinglePixelPackedSampleModel.
This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel.
SinglePixelPackedSampleModel(int, int, int, int[]) - Constructor for class java.awt.image.SinglePixelPackedSampleModel
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands.
SinglePixelPackedSampleModel(int, int, int, int, int[]) - Constructor for class java.awt.image.SinglePixelPackedSampleModel
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands and a scanline stride equal to scanlineStride data array elements.
SingleSelectionModel - interface javax.swing.SingleSelectionModel.
A model that supports at most one indexed selection.
singleton(Object) - Static method in class java.util.Collections
Returns an immutable set containing only the specified object.
singletonList(Object) - Static method in class java.util.Collections
Returns an immutable list containing only the specified object.
singletonMap(Object, Object) - Static method in class java.util.Collections
Returns an immutable map, mapping only the specified key to the specified value.
size - Variable in class java.awt.Font
The point size of this Font, rounded to integer.
size - Variable in class java.awt.image.DataBuffer
Usable size of all banks.
Size - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the font size.
Size - Static variable in class javax.swing.text.StyleConstants.FontConstants
Name of the font size.
SIZE - Static variable in class java.awt.font.TextAttribute
Attribute key for the font size.
SIZE - Static variable in class javax.swing.text.html.HTML.Attribute
SIZE_CMD - Static variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
size() - Method in class java.awt.Component
Deprecated. As of JDK version 1.1, replaced by getSize().
size() - Method in class java.awt.RenderingHints
Returns the number of key-value mappings in this RenderingHints.
size() - Method in class java.beans.beancontext.BeanContextMembershipEvent
Gets the number of children affected by the notification.
size() - Method in class java.beans.beancontext.BeanContextSupport
Gets the number of children currently nested in this BeanContext.
size() - Method in class java.io.DataOutputStream
Returns the current value of the counter written, the number of bytes written to this data output stream so far.
size() - Method in class java.io.CharArrayWriter
Returns the current size of the buffer.
size() - Method in class java.io.ByteArrayOutputStream
Returns the current size of the buffer.
size() - Method in class java.security.KeyStore
Retrieves the number of entries in this keystore.
size() - Method in class java.security.IdentityScope
Deprecated. Returns the number of identities within this identity scope.
size() - Method in class java.util.Dictionary
Returns the number of entries (dinstint keys) in this dictionary.
size() - Method in class java.util.Hashtable
Returns the number of keys in this hashtable.
size() - Method in class java.util.BitSet
Returns the number of bits of space actually in use by this BitSet to represent bit values.
size() - Method in class java.util.AbstractCollection
Returns the number of elements in this collection.
size() - Method in class java.util.TreeSet
Returns the number of elements in this set (its cardinality).
size() - Method in class java.util.AbstractMap
Returns the number of key-value mappings in this map.
size() - Method in class java.util.Vector
Returns the number of components in this vector.
size() - Method in interface java.util.Collection
Returns the number of elements in this collection.
size() - Method in class java.util.WeakHashMap
Returns the number of key-value mappings in this map.
size() - Method in class java.util.HashSet
Returns the number of elements in this set (its cardinality).
size() - Method in interface java.util.Set
Returns the number of elements in this set (its cardinality).
size() - Method in class java.util.LinkedList
Returns the number of elements in this list.
size() - Method in class java.util.TreeMap
Returns the number of key-value mappings in this map.
size() - Method in interface java.util.List
Returns the number of elements in this list.
size() - Method in class java.util.ArrayList
Returns the number of elements in this list.
size() - Method in class java.util.HashMap
Returns the number of key-value mappings in this map.
size() - Method in interface java.util.Map
Returns the number of key-value mappings in this map.
size() - Method in class java.util.jar.Attributes
Returns the number of attributes in this Map.
size() - Method in class java.util.zip.ZipFile
Returns the number of entries in the ZIP file.
size() - Method in class javax.accessibility.AccessibleRelationSet
Returns the number of relations in the relation set.
size() - Method in class javax.sound.midi.Track
Obtains the number of events in this track.
size() - Method in class javax.naming.Reference
Retrieves the number of addresses in this reference.
size() - Method in interface javax.naming.Name
Returns the number of components in this name.
size() - Method in class javax.naming.CompoundName
Retrieves the number of components in this compound name.
size() - Method in class javax.naming.CompositeName
Retrieves the number of components in this composite name.
size() - Method in class javax.naming.directory.BasicAttribute
size() - Method in interface javax.naming.directory.Attributes
Retrieves the number of attributes in the attribute set.
size() - Method in interface javax.naming.directory.Attribute
Retrieves the number of values in this attribute.
size() - Method in class javax.naming.directory.BasicAttributes
size() - Method in class javax.swing.InputMap
Returns the number of KeyStroke bindings.
size() - Method in class javax.swing.ActionMap
Returns the number of KeyStroke bindings.
size() - Method in class javax.swing.DefaultListModel
Returns the number of components in this list.
sizeAction - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
sizeColumnsToFit(boolean) - Method in class javax.swing.JTable
Deprecated. As of Swing version 1.0.3, replaced by sizeColumnsToFit(int).
sizeColumnsToFit(int) - Method in class javax.swing.JTable
Resizes one or more of the columns in the table so that the total width of all of this JTable's columns is equal to the width of the table.
SizeLimitExceededException - exception javax.naming.SizeLimitExceededException.
This exception is thrown when a method produces a result that exceeds a size-related limit.
SizeLimitExceededException() - Constructor for class javax.naming.SizeLimitExceededException
Constructs a new instance of SizeLimitExceededException.
SizeLimitExceededException(String) - Constructor for class javax.naming.SizeLimitExceededException
Constructs a new instance of SizeLimitExceededException using an explanation.
SizeRequirements - class javax.swing.SizeRequirements.
For the convenience of layout managers, calculates information about the size and position of components.
SizeRequirements() - Constructor for class javax.swing.SizeRequirements
Creates a SizeRequirements object with the minimum, preferred, and maximum sizes set to zero and an alignment value of 0.5 (centered).
SizeRequirements(int, int, int, float) - Constructor for class javax.swing.SizeRequirements
Creates a SizeRequirements object with the specified minimum, preferred, and maximum sizes and the specified alignment.
sizes - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
SizeSequence - class javax.swing.SizeSequence.
A SizeSequence object efficiently maintains an ordered list of sizes and corresponding positions.
SizeSequence() - Constructor for class javax.swing.SizeSequence
Creates a new SizeSequence object that contains no entries.
SizeSequence(int) - Constructor for class javax.swing.SizeSequence
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size 0.
SizeSequence(int[]) - Constructor for class javax.swing.SizeSequence
Creates a new SizeSequence object that contains the specified sizes.
SizeSequence(int, int) - Constructor for class javax.swing.SizeSequence
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size value.
sizeWidthToFit() - Method in class javax.swing.table.TableColumn
Resizes the TableColumn to fit the width of its header cell.
Skeleton - interface java.rmi.server.Skeleton.
Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
SkeletonMismatchException - exception java.rmi.server.SkeletonMismatchException.
Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
SkeletonMismatchException(String) - Constructor for class java.rmi.server.SkeletonMismatchException
Deprecated. no replacement
SkeletonNotFoundException - exception java.rmi.server.SkeletonNotFoundException.
Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
SkeletonNotFoundException(String) - Constructor for class java.rmi.server.SkeletonNotFoundException
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message.
SkeletonNotFoundException(String, Exception) - Constructor for class java.rmi.server.SkeletonNotFoundException
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message and nested exception.
skip(long) - Method in class java.io.Reader
Skip characters.
skip(long) - Method in class java.io.FilterReader
Skip characters.
skip(long) - Method in class java.io.InputStream
Skips over and discards n bytes of data from this input stream.
skip(long) - Method in class java.io.FilterInputStream
Skips over and discards n bytes of data from the input stream.
skip(long) - Method in class java.io.BufferedReader
Skip characters.
skip(long) - Method in class java.io.LineNumberReader
Skip characters.
skip(long) - Method in interface java.io.ObjectInput
Skips n bytes of input.
skip(long) - Method in class java.io.StringReader
Skip characters.
skip(long) - Method in class java.io.PushbackInputStream
Skips over and discards n bytes of data from this input stream.
skip(long) - Method in class java.io.StringBufferInputStream
Deprecated. Skips n bytes of input from this input stream.
skip(long) - Method in class java.io.BufferedInputStream
See the general contract of the skip method of InputStream.
skip(long) - Method in class java.io.ByteArrayInputStream
Skips n bytes of input from this input stream.
skip(long) - Method in class java.io.CharArrayReader
Skip characters.
skip(long) - Method in class java.io.LineNumberInputStream
Deprecated. Skips over and discards n bytes of data from this input stream.
skip(long) - Method in class java.io.FileInputStream
Skips over and discards n bytes of data from the input stream.
skip(long) - Method in class java.util.zip.InflaterInputStream
Skips specified number of bytes of uncompressed data.
skip(long) - Method in class java.util.zip.ZipInputStream
Skips specified number of bytes in the current ZIP entry.
skip(long) - Method in class java.util.zip.CheckedInputStream
Skips specified number of bytes of input.
skip(long) - Method in class javax.sound.sampled.AudioInputStream
Skips over and discards a specified number of bytes from this audio input stream.
skip(long) - Method in class javax.swing.ProgressMonitorInputStream
Overrides FilterInputStream.skip to update the progress monitor after the skip.
skipBytes(int) - Method in class java.io.ObjectInputStream
Skips bytes, block until all bytes are skipped.
skipBytes(int) - Method in interface java.io.DataInput
Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.
skipBytes(int) - Method in class java.io.RandomAccessFile
Attempts to skip over n bytes of input discarding the skipped bytes.
skipBytes(int) - Method in class java.io.DataInputStream
See the general contract of the skipBytes method of DataInput.
skipReferral() - Method in class javax.naming.ReferralException
Discards the referral about to be processed.
slashSlashComments(boolean) - Method in class java.io.StreamTokenizer
Determines whether or not the tokenizer recognizes C++-style comments.
slashStarComments(boolean) - Method in class java.io.StreamTokenizer
Determines whether or not the tokenizer recognizes C-style comments.
sleep(long) - Static method in class java.lang.Thread
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds.
sleep(long, int) - Static method in class java.lang.Thread
Causes the currently executing thread to sleep (cease execution) for the specified number of milliseconds plus the specified number of nanoseconds.
slider - Variable in class javax.swing.plaf.basic.BasicSliderUI
SLIDER - Static variable in class javax.accessibility.AccessibleRole
An object that allows the user to select from a bounded range.
SLIDER_FILL - Variable in class javax.swing.plaf.metal.MetalSliderUI
sliderModel - Variable in class javax.swing.JSlider
The data model that handles the numeric maximum value, minimum value, and current-position value for the slider.
SliderUI - class javax.swing.plaf.SliderUI.
Pluggable look and feel interface for JSlider.
SliderUI() - Constructor for class javax.swing.plaf.SliderUI
SMALL - Static variable in class javax.swing.text.html.HTML.Tag
SMALL_FORM_VARIANTS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
SMALL_ICON - Static variable in interface javax.swing.Action
The key used for storing a small icon for the action, used for toolbar buttons.
SMALLINT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.
SMPTE_24 - Static variable in class javax.sound.midi.Sequence
The SMPTE-based timing type with 24 frames per second (resolution is expressed in ticks per frame).
SMPTE_25 - Static variable in class javax.sound.midi.Sequence
The SMPTE-based timing type with 25 frames per second (resolution is expressed in ticks per frame).
SMPTE_30 - Static variable in class javax.sound.midi.Sequence
The SMPTE-based timing type with 30 frames per second (resolution is expressed in ticks per frame).
SMPTE_30DROP - Static variable in class javax.sound.midi.Sequence
The SMPTE-based timing type with 29.97 frames per second (resolution is expressed in ticks per frame).
snapToTicks - Variable in class javax.swing.JSlider
If true, the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
SND - Static variable in class javax.sound.sampled.AudioFileFormat.Type
Specifies a SND file.
SO_BINDADDR - Static variable in interface java.net.SocketOptions
Fetch the local address binding of a socket (this option cannot be "set" only "gotten", since sockets are bound at creation time, and so the locally bound address cannot be changed).
SO_KEEPALIVE - Static variable in interface java.net.SocketOptions
When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer.
SO_LINGER - Static variable in interface java.net.SocketOptions
Specify a linger-on-close timeout.
SO_RCVBUF - Static variable in interface java.net.SocketOptions
Set a hint the size of the underlying buffers used by the platform for incoming network I/O.
SO_REUSEADDR - Static variable in interface java.net.SocketOptions
Sets SO_REUSEADDR for a socket.
SO_SNDBUF - Static variable in interface java.net.SocketOptions
Set a hint the size of the underlying buffers used by the platform for outgoing network I/O.
SO_TIMEOUT - Static variable in interface java.net.SocketOptions
Set a timeout on blocking Socket operations:
Socket - class java.net.Socket.
This class implements client sockets (also called just "sockets").
Socket() - Constructor for class java.net.Socket
Creates an unconnected socket, with the system-default type of SocketImpl.
Socket(InetAddress, int) - Constructor for class java.net.Socket
Creates a stream socket and connects it to the specified port number at the specified IP address.
Socket(InetAddress, int, boolean) - Constructor for class java.net.Socket
Deprecated. Use DatagramSocket instead for UDP transport.
Socket(InetAddress, int, InetAddress, int) - Constructor for class java.net.Socket
Creates a socket and connects it to the specified remote address on the specified remote port.
Socket(SocketImpl) - Constructor for class java.net.Socket
Creates an unconnected Socket with a user-specified SocketImpl.
Socket(String, int) - Constructor for class java.net.Socket
Creates a stream socket and connects it to the specified port number on the named host.
Socket(String, int, boolean) - Constructor for class java.net.Socket
Deprecated. Use DatagramSocket instead for UDP transport.
Socket(String, int, InetAddress, int) - Constructor for class java.net.Socket
Creates a socket and connects it to the specified remote host on the specified remote port.
SocketException - exception java.net.SocketException.
Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
SocketException() - Constructor for class java.net.SocketException
Constructs a new SocketException with no detail message.
SocketException(String) - Constructor for class java.net.SocketException
Constructs a new SocketException with the specified detail message.
SocketImpl - class java.net.SocketImpl.
The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
SocketImpl() - Constructor for class java.net.SocketImpl
SocketImplFactory - interface java.net.SocketImplFactory.
This interface defines a factory for socket implementations.
SocketOptions - interface java.net.SocketOptions.
Interface of methods to get/set socket options.
SocketPermission - class java.net.SocketPermission.
This class represents access to a network via sockets.
SocketPermission(String, String) - Constructor for class java.net.SocketPermission
Creates a new SocketPermission object with the specified actions.
SocketSecurityException - exception java.rmi.server.SocketSecurityException.
A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.
SocketSecurityException(String) - Constructor for class java.rmi.server.SocketSecurityException
Constructs an SocketSecurityException with the specified detail message.
SocketSecurityException(String, Exception) - Constructor for class java.rmi.server.SocketSecurityException
Constructs an SocketSecurityException with the specified detail message and nested exception.
SoftBevelBorder - class javax.swing.border.SoftBevelBorder.
A class which implements a raised or lowered bevel with softened corners.
SoftBevelBorder(int) - Constructor for class javax.swing.border.SoftBevelBorder
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
SoftBevelBorder(int, Color, Color) - Constructor for class javax.swing.border.SoftBevelBorder
Creates a bevel border with the specified type, highlight and shadow colors.
SoftBevelBorder(int, Color, Color, Color, Color) - Constructor for class javax.swing.border.SoftBevelBorder
Creates a bevel border with the specified type, highlight shadow colors.
SoftReference - class java.lang.ref.SoftReference.
Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
SoftReference(Object) - Constructor for class java.lang.ref.SoftReference
Creates a new soft reference that refers to the given object.
SoftReference(Object, ReferenceQueue) - Constructor for class java.lang.ref.SoftReference
Creates a new soft reference that refers to the given object and is registered with the given queue.
solveCubic(double[]) - Static method in class java.awt.geom.CubicCurve2D
Solves the cubic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots.
solveCubic(double[], double[]) - Static method in class java.awt.geom.CubicCurve2D
Solve the cubic whose coefficients are in the eqn array and place the non-complex roots into the res array, returning the number of roots.
solveQuadratic(double[]) - Static method in class java.awt.geom.QuadCurve2D
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots.
solveQuadratic(double[], double[]) - Static method in class java.awt.geom.QuadCurve2D
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots into the res array, returning the number of roots.
SOMEBITS - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
SONG_POSITION_POINTER - Static variable in class javax.sound.midi.ShortMessage
Status byte for Song Position Pointer message (0xF2, or 242).
SONG_SELECT - Static variable in class javax.sound.midi.ShortMessage
Status byte for MIDI Song Select message (0xF3, or 243).
sort(byte[]) - Static method in class java.util.Arrays
Sorts the specified array of bytes into ascending numerical order.
sort(byte[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of bytes into ascending numerical order.
sort(char[]) - Static method in class java.util.Arrays
Sorts the specified array of chars into ascending numerical order.
sort(char[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of chars into ascending numerical order.
sort(double[]) - Static method in class java.util.Arrays
Sorts the specified array of doubles into ascending numerical order.
sort(double[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of doubles into ascending numerical order.
sort(float[]) - Static method in class java.util.Arrays
Sorts the specified array of floats into ascending numerical order.
sort(float[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of floats into ascending numerical order.
sort(int[]) - Static method in class java.util.Arrays
Sorts the specified array of ints into ascending numerical order.
sort(int[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of ints into ascending numerical order.
sort(List) - Static method in class java.util.Collections
Sorts the specified list into ascending order, according to the natural ordering of its elements.
sort(List, Comparator) - Static method in class java.util.Collections
Sorts the specified list according to the order induced by the specified comparator.
sort(long[]) - Static method in class java.util.Arrays
Sorts the specified array of longs into ascending numerical order.
sort(long[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of longs into ascending numerical order.
sort(Object[]) - Static method in class java.util.Arrays
Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.
sort(Object[], Comparator) - Static method in class java.util.Arrays
Sorts the specified array of objects according to the order induced by the specified comparator.
sort(Object[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.
sort(Object[], int, int, Comparator) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
sort(short[]) - Static method in class java.util.Arrays
Sorts the specified array of shorts into ascending numerical order.
sort(short[], int, int) - Static method in class java.util.Arrays
Sorts the specified range of the specified array of shorts into ascending numerical order.
sort(Vector) - Method in class javax.swing.plaf.basic.BasicDirectoryModel
SortedMap - interface java.util.SortedMap.
A map that further guarantees that it will be in ascending key order, sorted according to the natural ordering of its keys (see the Comparable interface), or by a comparator provided at sorted map creation time.
SortedSet - interface java.util.SortedSet.
A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time.
Soundbank - interface javax.sound.midi.Soundbank.
A Soundbank contains a set of Instruments that can be loaded into a Synthesizer.
SoundbankReader - class javax.sound.midi.spi.SoundbankReader.
A SoundbankReader supplies soundbank file-reading services.
SoundbankReader() - Constructor for class javax.sound.midi.spi.SoundbankReader
SoundbankResource - class javax.sound.midi.SoundbankResource.
A SoundbankResource represents any audio resource stored in a Soundbank.
SoundbankResource(Soundbank, String, Class) - Constructor for class javax.sound.midi.SoundbankResource
Constructs a new SoundbankResource from the given sound bank and wavetable index.
source - Variable in class java.util.EventObject
The object on which the Event initially occurred.
source - Variable in class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler
Source that events are coming from.
sourceActions - Variable in class java.awt.dnd.DragGestureRecognizer
An int representing the type(s) of action(s) used in this Drag and Drop operation.
SourceDataLine - interface javax.sound.sampled.SourceDataLine.
A source data line is a data line to which data may be written.
sources - Variable in class java.awt.image.renderable.ParameterBlock
A Vector of sources, stored as arbitrary Objects.
SOUTH - Static variable in class java.awt.BorderLayout
The south layout constraint (bottom of container).
SOUTH - Static variable in class java.awt.GridBagConstraints
Put the component at the bottom of its display area, centered horizontally.
SOUTH - Static variable in interface javax.swing.SwingConstants
Compass-direction south (down).
SOUTH_EAST - Static variable in interface javax.swing.SwingConstants
Compass-direction south-east (lower right).
SOUTH_WEST - Static variable in interface javax.swing.SwingConstants
Compass-direction south-west (lower left).
SOUTHEAST - Static variable in class java.awt.GridBagConstraints
Put the component at the bottom-right corner of its display area.
southPane - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
SOUTHWEST - Static variable in class java.awt.GridBagConstraints
Put the component at the bottom-left corner of its display area.
SPACE_SEPARATOR - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
SpaceAbove - Static variable in class javax.swing.text.StyleConstants
The amount of space above the paragraph.
SpaceAbove - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount of space above the paragraph.
SpaceBelow - Static variable in class javax.swing.text.StyleConstants
The amount of space below the paragraph.
SpaceBelow - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
The amount of space below the paragraph.
SPACING_MODIFIER_LETTERS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
SPAN - Static variable in class javax.swing.text.html.HTML.Tag
SPEAKER - Static variable in class javax.sound.sampled.Port.Info
A type of port that sends audio to a built-in speaker or a speaker jack.
SPECIAL_SYSTEM_EXCLUSIVE - Static variable in class javax.sound.midi.SysexMessage
Status byte for Special System Exclusive message (0xF7, or 247), which is used in MIDI files.
SPECIALS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
SPECIFICATION_TITLE - Static variable in class java.util.jar.Attributes.Name
Name object for Specification-Title manifest attribute used for package versioning.
SPECIFICATION_VENDOR - Static variable in class java.util.jar.Attributes.Name
Name object for Specification-Vendor manifest attribute used for package versioning.
SPECIFICATION_VERSION - Static variable in class java.util.jar.Attributes.Name
Name object for Specification-Version manifest attribute used for package versioning.
SPLIT_PANE - Static variable in class javax.accessibility.AccessibleRole
A specialized panel that presents two other panels at the same time.
splitPane - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
JSplitPane instance this instance is providing the look and feel for.
splitPane - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
JSplitPane the receiver is contained in.
splitPaneUI - Variable in class javax.swing.plaf.basic.BasicSplitPaneDivider
UI this instance was created from.
SplitPaneUI - class javax.swing.plaf.SplitPaneUI.
Pluggable look and feel interface for JSplitPane.
SplitPaneUI() - Constructor for class javax.swing.plaf.SplitPaneUI
spPropertyChangeListener - Variable in class javax.swing.plaf.basic.BasicScrollPaneUI
SQLData - interface java.sql.SQLData.
The interface used for the custom mapping of SQL user-defined types.
SQLException - exception java.sql.SQLException.
An exception that provides information on a database access error or other errors.
SQLException() - Constructor for class java.sql.SQLException
Constructs an SQLException object; reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.
SQLException(String) - Constructor for class java.sql.SQLException
Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.
SQLException(String, String) - Constructor for class java.sql.SQLException
Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.
SQLException(String, String, int) - Constructor for class java.sql.SQLException
Constructs a fully-specified SQLException object.
SQLInput - interface java.sql.SQLInput.
An input stream that contains a stream of values representing an instance of an SQL structured or distinct type.
SQLOutput - interface java.sql.SQLOutput.
The output stream for writing the attributes of a user-defined type back to the database.
SQLPermission - class java.sql.SQLPermission.
The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.
SQLPermission(String) - Constructor for class java.sql.SQLPermission
Creates a new SQLPermission object with the specified name.
SQLPermission(String, String) - Constructor for class java.sql.SQLPermission
Creates a new SQLPermission object with the specified name.
SQLWarning - exception java.sql.SQLWarning.
An exception that provides information on database access warnings.
SQLWarning() - Constructor for class java.sql.SQLWarning
Constructs a default SQLWarning object.
SQLWarning(String) - Constructor for class java.sql.SQLWarning
Constructs an SQLWarning object with the given value for a reason; SQLState defaults to null, and vendorCode defaults to 0.
SQLWarning(String, String) - Constructor for class java.sql.SQLWarning
Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.
SQLWarning(String, String, int) - Constructor for class java.sql.SQLWarning
Constructs a fully-specified SQLWarning object initialized with the given values.
sqrt(double) - Static method in class java.lang.StrictMath
Returns the positive square root of a double value.
sqrt(double) - Static method in class java.lang.Math
Returns the correctly rounded positive square root of a double value.
Src - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque SRC rule with an alpha of 1.0f.
SRC - Static variable in class java.awt.AlphaComposite
Porter-Duff Source rule.
SRC - Static variable in class javax.swing.text.html.HTML.Attribute
SRC_IN - Static variable in class java.awt.AlphaComposite
Porter-Duff Source In Destination rule.
SRC_OUT - Static variable in class java.awt.AlphaComposite
Porter-Duff Source Held Out By Destination rule.
SRC_OVER - Static variable in class java.awt.AlphaComposite
Porter-Duff Source Over Destination rule.
srccols - Variable in class java.awt.image.ReplicateScaleFilter
An int array containing information about a column of pixels.
srcHeight - Variable in class java.awt.image.ReplicateScaleFilter
The height of the source image.
SrcIn - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque SRC_IN rule with an alpha of 1.0f.
SrcOut - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque SRC_OUT rule with an alpha of 1.0f.
SrcOver - Static variable in class java.awt.AlphaComposite
AlphaComposite object that implements the opaque SRC_OVER rule with an alpha of 1.0f.
srcrows - Variable in class java.awt.image.ReplicateScaleFilter
An int array containing information about a row of pixels.
srcWidth - Variable in class java.awt.image.ReplicateScaleFilter
The width of the source image.
Stack - class java.util.Stack.
The Stack class represents a last-in-first-out (LIFO) stack of objects.
Stack() - Constructor for class java.util.Stack
Creates an empty Stack.
StackOverflowError - error java.lang.StackOverflowError.
Thrown when a stack overflow occurs because an application recurses too deeply.
StackOverflowError() - Constructor for class java.lang.StackOverflowError
Constructs a StackOverflowError with no detail message.
StackOverflowError(String) - Constructor for class java.lang.StackOverflowError
Constructs a StackOverflowError with the specified detail message.
STANDARD - Static variable in class java.awt.font.GlyphMetrics
Indicates a glyph that represents a single standard character.
STANDBY - Static variable in class javax.swing.text.html.HTML.Attribute
start - Variable in class java.awt.geom.Arc2D.Float
The starting angle of the arc in degrees.
start - Variable in class java.awt.geom.Arc2D.Double
The starting angle of the arc in degrees.
START - Static variable in class javax.sound.sampled.LineEvent.Type
A type of event that is sent when a line begins to engage in active input or output of audio data in response to a start request.
START - Static variable in class javax.sound.midi.ShortMessage
Status byte for Start message (0xFA, or 250).
START - Static variable in class javax.swing.text.html.HTML.Attribute

START_PUNCTUATION - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
start() - Method in class java.applet.Applet
Called by the browser or applet viewer to inform this applet that it should start its execution.
start() - Method in class java.lang.Thread
Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
start() - Method in interface javax.sound.sampled.DataLine
Allows a line to engage in data I/O.
start() - Method in interface javax.sound.midi.Sequencer
Starts playback of the MIDI data in the currently loaded sequence.
start() - Method in class javax.swing.Timer
Starts the Timer, causing it to send actionPerformed() messages to its listeners.
start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to.
start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction

start(HTML.Tag, MutableAttributeSet) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction

startAutoScrolling(int) - Method in class javax.swing.plaf.basic.BasicComboPopup
Called by BasicComboPopup$InvocationMouseMotionHandler to handle auto- scrolling the list.
startCellEditing(EventObject) - Method in class javax.swing.DefaultCellEditor.EditorDelegate

startDrag(Cursor, Image, Point, Transferable, DragSourceListener) - Method in class java.awt.dnd.DragGestureEvent
Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.
startDrag(Cursor, Transferable, DragSourceListener) - Method in class java.awt.dnd.DragGestureEvent
Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
startDrag(DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener) - Method in class java.awt.dnd.DragSource
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
startDrag(DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener, FlavorMap) - Method in class java.awt.dnd.DragSource
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
startDrag(DragGestureEvent, Cursor, Transferable, DragSourceListener) - Method in class java.awt.dnd.DragSource
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
startDrag(DragGestureEvent, Cursor, Transferable, DragSourceListener, FlavorMap) - Method in class java.awt.dnd.DragSource
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
startDragging() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.
startEditing(TreePath, MouseEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI
Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
startEditingAtPath(JTree, TreePath) - Method in class javax.swing.plaf.TreeUI
Selects the last item in path and tries to edit it.
startEditingAtPath(JTree, TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Selects the last item in path and tries to edit it.
startEditingAtPath(JTree, TreePath) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call startEditingAtPath on each UI handled by this MultiUI.
startEditingAtPath(TreePath) - Method in class javax.swing.JTree
Selects the node identified by the specified path and initiates editing.
startEditingTimer() - Method in class javax.swing.tree.DefaultTreeCellEditor
Starts the editing timer.
startFontTag(String) - Method in class javax.swing.text.html.MinimalHTMLWriter
This is no longer used, instead <span> will be written out.
startGrabbing() - Method in class java.awt.image.PixelGrabber
Request the PixelGrabber to start fetching the pixels.
startProduction(ImageConsumer) - Method in class java.awt.image.FilteredImageSource
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
startProduction(ImageConsumer) - Method in interface java.awt.image.ImageProducer
This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer.
startProduction(ImageConsumer) - Method in class java.awt.image.MemoryImageSource
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately start delivery of the image data through the ImageConsumer interface.
startProduction(ImageConsumer) - Method in class java.awt.image.renderable.RenderableImageProducer
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
startRecording() - Method in interface javax.sound.midi.Sequencer
Starts recording and playback of MIDI data.
startsWith(Name) - Method in interface javax.naming.Name
Determines whether this name starts with a specified prefix.
startsWith(Name) - Method in class javax.naming.CompoundName
Determines whether a compound name is a prefix of this compound name.
startsWith(Name) - Method in class javax.naming.CompositeName
Determines whether a composite name is a prefix of this composite name.
startsWith(String) - Method in class java.lang.String
Tests if this string starts with the specified prefix.
startsWith(String, int) - Method in class java.lang.String
Tests if this string starts with the specified prefix beginning a specified index.
STARTTAG - Static variable in interface javax.swing.text.html.parser.DTDConstants

startTag(Element) - Method in class javax.swing.text.html.HTMLWriter
Writes out a start tag for the element.
startTag(TagElement) - Method in class javax.swing.text.html.parser.Parser
Handle a start tag.
StartTagType - Static variable in class javax.swing.text.DefaultStyledDocument.ElementSpec
A possible value for getType.
startTimer() - Method in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
Creates, if necessary, and starts a Timer to check if need to resize the bounds.
state - Variable in class java.security.Signature
Current state of this signature object.
STATE_FACTORIES - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the list of state factories to use.
stateChanged(ChangeEvent) - Method in class javax.swing.JTabbedPane.ModelListener

stateChanged(ChangeEvent) - Method in class javax.swing.JTabbedPane.AccessibleJTabbedPane

stateChanged(ChangeEvent) - Method in class javax.swing.JMenuItem.AccessibleJMenuItem
Supports the change listener interface and fires property change
stateChanged(ChangeEvent) - Method in class javax.swing.AbstractButton.ButtonChangeListener

stateChanged(ChangeEvent) - Method in class javax.swing.JScrollPane.AccessibleJScrollPane
Supports the change listener interface and fires property change
stateChanged(ChangeEvent) - Method in interface javax.swing.event.ChangeListener
Invoked when the target of the listener has changed its state.
stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicButtonListener

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener

stateChanged(ChangeEvent) - Method in class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler

StateEdit - class javax.swing.undo.StateEdit.
StateEdit is a general edit for objects that change state.
StateEdit(StateEditable) - Constructor for class javax.swing.undo.StateEdit
Create and return a new StateEdit.
StateEdit(StateEditable, String) - Constructor for class javax.swing.undo.StateEdit
Create and return a new StateEdit with a presentation name.
StateEditable - interface javax.swing.undo.StateEditable.
StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
StateFactory - interface javax.naming.spi.StateFactory.
This interface represents a factory for obtaining the state of an object for binding.
stateMask - Variable in class javax.swing.DefaultButtonModel

Statement - interface java.sql.Statement.
The object used for executing a static SQL statement and obtaining the results produced by it.
STATEMENT - Static variable in class java.awt.PageAttributes.MediaType
An alias for INVOICE.
states - Variable in class javax.accessibility.AccessibleStateSet
Each entry in the Vector represents an AccessibleState.
STATIC - Static variable in class java.lang.reflect.Modifier
The int value representing the static modifier.
STATICIMAGEDONE - Static variable in interface java.awt.image.ImageConsumer
The image is complete and there are no more pixels or frames to be delivered.
status() - Method in class java.awt.image.PixelGrabber
Returns the status of the pixels.
statusAll(boolean) - Method in class java.awt.MediaTracker
Calculates and returns the bitwise inclusive OR of the status of all media that are tracked by this media tracker.
statusID(int, boolean) - Method in class java.awt.MediaTracker
Calculates and returns the bitwise inclusive OR of the status of all media with the specified identifier that are tracked by this media tracker.
STOP - Static variable in class javax.sound.sampled.LineEvent.Type
A type of event that is sent when a line ceases active input or output of audio data in response to a stop request, or because the end of media has been reached.
STOP - Static variable in class javax.sound.midi.ShortMessage
Status byte for Stop message (0xFC, or 252).
stop() - Method in interface java.applet.AudioClip
Stops playing this audio clip.
stop() - Method in class java.applet.Applet
Called by the browser or applet viewer to inform this applet that it should stop its execution.
stop() - Method in class java.awt.dnd.DropTarget.DropTargetAutoScroller
cause autoscrolling to stop
stop() - Method in class java.lang.ThreadGroup
Deprecated. This method is inherently unsafe. See Thread.stop() for details.
stop() - Method in class java.lang.Thread
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
stop() - Method in interface javax.sound.sampled.DataLine
Stops the line.
stop() - Method in interface javax.sound.midi.Sequencer
Stops recording, if active, and playback of the currently loaded sequence, if any.
stop() - Method in class javax.swing.Timer
Stops a Timer, causing it to stop sending actionPerformed() messages to its Target.
stop(Throwable) - Method in class java.lang.Thread
Deprecated. This method is inherently unsafe. See Thread.stop() (with no arguments) for details. An additional danger of this method is that it may be used to generate exceptions that the target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
stopAutoScrolling() - Method in class javax.swing.plaf.basic.BasicComboPopup

stopCellEditing() - Method in interface javax.swing.CellEditor
Tell the editor to stop editing and accept any partially edited value as the value of the editor.
stopCellEditing() - Method in class javax.swing.AbstractCellEditor
Calls fireEditingStopped and returns true.
stopCellEditing() - Method in class javax.swing.DefaultCellEditor

stopCellEditing() - Method in class javax.swing.DefaultCellEditor.EditorDelegate

stopCellEditing() - Method in class javax.swing.tree.DefaultTreeCellEditor
If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
stopEditing() - Method in class javax.swing.JTree
Ends the current editing session.
stopEditing(JTree) - Method in class javax.swing.plaf.TreeUI
Stops the current editing session.
stopEditing(JTree) - Method in class javax.swing.plaf.basic.BasicTreeUI
Stops the current editing session.
stopEditing(JTree) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call stopEditing on each UI handled by this MultiUI.
stopEditingInCompleteEditing - Variable in class javax.swing.plaf.basic.BasicTreeUI
Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing.
stopRecording() - Method in interface javax.sound.midi.Sequencer
Stops recording, if active.
store(OutputStream, char[]) - Method in class java.security.KeyStore
Stores this keystore to the given output stream, and protects its integrity with the given password.
store(OutputStream, String) - Method in class java.util.Properties
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.
STORED - Static variable in class java.util.zip.ZipEntry
Compression method for uncompressed entries.
STORED - Static variable in class java.util.zip.ZipOutputStream
Compression method for uncompressed (STORED) entries.
storesLowerCaseIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lower case?
storesLowerCaseQuotedIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lower case?
storesMixedCaseIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case?
storesMixedCaseQuotedIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case?
storeState(Hashtable) - Method in interface javax.swing.undo.StateEditable
Upon receiving this message the receiver should place any relevant state into state.
storesUpperCaseIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in upper case?
storesUpperCaseQuotedIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in upper case?
strategy - Variable in class javax.swing.text.FlowView
The behavior for keeping the flow updated.
STREAM_MAGIC - Static variable in interface java.io.ObjectStreamConstants
Magic number that is written to the stream header.
STREAM_VERSION - Static variable in interface java.io.ObjectStreamConstants
Version number that is written to the stream header.
Streamable - interface org.omg.CORBA.portable.Streamable.
The base class for the Holder classess of all complex IDL types.
StreamableValue - interface org.omg.CORBA.portable.StreamableValue.
Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
StreamCorruptedException - exception java.io.StreamCorruptedException.
Thrown when control information that was read from an object stream violates internal consistency checks.
StreamCorruptedException() - Constructor for class java.io.StreamCorruptedException
Create a StreamCorruptedException and list no reason why thrown.
StreamCorruptedException(String) - Constructor for class java.io.StreamCorruptedException
Create a StreamCorruptedException and list a reason why thrown.
StreamDescriptionProperty - Static variable in interface javax.swing.text.Document
The property name for the description of the stream used to initialize the document.
StreamTokenizer - class java.io.StreamTokenizer.
The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
StreamTokenizer(InputStream) - Constructor for class java.io.StreamTokenizer
Deprecated. As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
StreamTokenizer(Reader) - Constructor for class java.io.StreamTokenizer
Create a tokenizer that parses the given character stream.
strict - Variable in class javax.swing.text.html.parser.Parser
This flag determines whether or not the Parser will be strict in enforcing SGML compatibility.
STRICT - Static variable in class java.lang.reflect.Modifier
The int value representing the strictfp modifier.
StrictMath - class java.lang.StrictMath.
The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
STRIKE - Static variable in class javax.swing.text.html.HTML.Tag

StrikeThrough - Static variable in class javax.swing.text.StyleConstants
Name of the Strikethrough attribute.
StrikeThrough - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the strikethrough attribute.
STRIKETHROUGH - Static variable in class java.awt.font.TextAttribute
Attribute key for the strikethrough adornment.
STRIKETHROUGH_ON - Static variable in class java.awt.font.TextAttribute
A single strikethrough.
String - class java.lang.String.
The String class represents character strings.
string_to_object(String) - Method in class org.omg.CORBA.ORB
Converts a string produced by the method object_to_string back to a CORBA object reference.
String() - Constructor for class java.lang.String
Initializes a newly created String object so that it represents an empty character sequence.
String(byte[]) - Constructor for class java.lang.String
Construct a new String by converting the specified array of bytes using the platform's default character encoding.
String(byte[], int) - Constructor for class java.lang.String
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
String(byte[], int, int) - Constructor for class java.lang.String
Construct a new String by converting the specified subarray of bytes using the platform's default character encoding.
String(byte[], int, int, int) - Constructor for class java.lang.String
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
String(byte[], int, int, String) - Constructor for class java.lang.String
Construct a new String by converting the specified subarray of bytes using the specified character encoding.
String(byte[], String) - Constructor for class java.lang.String
Construct a new String by converting the specified array of bytes using the specified character encoding.
String(char[]) - Constructor for class java.lang.String
Allocates a new String so that it represents the sequence of characters currently contained in the character array argument.
String(char[], int, int) - Constructor for class java.lang.String
Allocates a new String that contains characters from a subarray of the character array argument.
String(String) - Constructor for class java.lang.String
Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
String(StringBuffer) - Constructor for class java.lang.String
Allocates a new string that contains the sequence of characters currently contained in the string buffer argument.
StringBuffer - class java.lang.StringBuffer.
A string buffer implements a mutable sequence of characters.
StringBuffer() - Constructor for class java.lang.StringBuffer
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
StringBuffer(int) - Constructor for class java.lang.StringBuffer
Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
StringBuffer(String) - Constructor for class java.lang.StringBuffer
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
StringBufferInputStream - class java.io.StringBufferInputStream.
Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
StringBufferInputStream(String) - Constructor for class java.io.StringBufferInputStream
Deprecated. Creates a string input stream to read data from the specified string.
StringCharacterIterator - class java.text.StringCharacterIterator.
StringCharacterIterator implements the CharacterIterater protocol for a String.
StringCharacterIterator(String) - Constructor for class java.text.StringCharacterIterator
Constructs an iterator with an initial index of 0.
StringCharacterIterator(String, int) - Constructor for class java.text.StringCharacterIterator
Constructs an iterator with the specified initial index.
StringCharacterIterator(String, int, int, int) - Constructor for class java.text.StringCharacterIterator
Constructs an iterator over the given range of the given string, with the index set at the specified position.
StringContent - class javax.swing.text.StringContent.
An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
StringContent() - Constructor for class javax.swing.text.StringContent
Creates a new StringContent object.
StringContent(int) - Constructor for class javax.swing.text.StringContent
Creates a new StringContent object, with the initial size specified.
stringFlavor - Static variable in class java.awt.datatransfer.DataFlavor
The DataFlavor representing a Java Unicode String class, where:
StringHolder - class org.omg.CORBA.StringHolder.
A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations.
StringHolder() - Constructor for class org.omg.CORBA.StringHolder
Constructs a new StringHolder object with its value field initialized to null.
StringHolder(String) - Constructor for class org.omg.CORBA.StringHolder
Constructs a new StringHolder object with its value field initialized to the given String.
StringIndexOutOfBoundsException - exception java.lang.StringIndexOutOfBoundsException.
Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
StringIndexOutOfBoundsException() - Constructor for class java.lang.StringIndexOutOfBoundsException
Constructs a StringIndexOutOfBoundsException with no detail message.
StringIndexOutOfBoundsException(int) - Constructor for class java.lang.StringIndexOutOfBoundsException
Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
StringIndexOutOfBoundsException(String) - Constructor for class java.lang.StringIndexOutOfBoundsException
Constructs a StringIndexOutOfBoundsException with the specified detail message.
StringReader - class java.io.StringReader.
A character stream whose source is a string.
StringReader(String) - Constructor for class java.io.StringReader
Create a new string reader.
StringRefAddr - class javax.naming.StringRefAddr.
This class represents the string form of the address of a communications end-point.
StringRefAddr(String, String) - Constructor for class javax.naming.StringRefAddr
Constructs a new instance of StringRefAddr using its address type and contents.
StringSelection - class java.awt.datatransfer.StringSelection.
A Transferable which implements the capability required to transfer a String.
StringSelection(String) - Constructor for class java.awt.datatransfer.StringSelection
Creates a Transferable capable of transferring the specified String.
stringToColor(String) - Method in class javax.swing.text.html.StyleSheet
Converts a color string such as "RED" or "#NNNNNN" to a Color.
StringTokenizer - class java.util.StringTokenizer.
The string tokenizer class allows an application to break a string into tokens.
StringTokenizer(String) - Constructor for class java.util.StringTokenizer
Constructs a string tokenizer for the specified string.
StringTokenizer(String, String) - Constructor for class java.util.StringTokenizer
Constructs a string tokenizer for the specified string.
StringTokenizer(String, String, boolean) - Constructor for class java.util.StringTokenizer
Constructs a string tokenizer for the specified string.
StringValueHelper - class org.omg.CORBA.StringValueHelper.
org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00
StringValueHelper() - Constructor for class org.omg.CORBA.StringValueHelper

stringWidth(String) - Method in class java.awt.FontMetrics
Returns the total advance width for showing the specified String in this Font.
StringWriter - class java.io.StringWriter.
A character stream that collects its output in a string buffer, which can then be used to construct a string.
StringWriter() - Constructor for class java.io.StringWriter
Create a new string writer, using the default initial string-buffer size.
StringWriter(int) - Constructor for class java.io.StringWriter
Create a new string writer, using the specified initial string-buffer size.
Stroke - interface java.awt.Stroke.
The Stroke interface allows a Graphics2D object to obtain a Shape that is the decorated outline, or stylistic representation of the outline, of the specified Shape.
STROKE - Static variable in class java.awt.font.ShapeGraphicAttribute
A key indicating the shape should be stroked with a 1-pixel wide stroke.
STRONG - Static variable in class javax.swing.text.html.HTML.Tag

Struct - interface java.sql.Struct.
The standard mapping in the Java programming language for an SQL structured type.
STRUCT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
StructMember - class org.omg.CORBA.StructMember.
A description of a member of an IDL struct.
StructMember() - Constructor for class org.omg.CORBA.StructMember
Constructs a default StructMember object.
StructMember(String, TypeCode, IDLType) - Constructor for class org.omg.CORBA.StructMember
Constructs a StructMember object initialized with the given values.
StructMemberHelper - class org.omg.CORBA.StructMemberHelper.
org/omg/CORBA/StructMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
StructMemberHelper() - Constructor for class org.omg.CORBA.StructMemberHelper

Stub - class javax.rmi.CORBA.Stub.
Base class from which all RMI-IIOP stubs must inherit.
Stub() - Constructor for class javax.rmi.CORBA.Stub
Creates an RMI-IIOP stub and sets its delegate if necessary.
StubDelegate - interface javax.rmi.CORBA.StubDelegate.
Supports delegation for method implementations in Stub.
StubNotFoundException - exception java.rmi.StubNotFoundException.
A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
StubNotFoundException(String) - Constructor for class java.rmi.StubNotFoundException
Constructs a StubNotFoundException with the specified detail message and nested exception.
StubNotFoundException(String, Exception) - Constructor for class java.rmi.StubNotFoundException
Constructs a StubNotFoundException with the specified detail message and nested exception.
style - Variable in class java.awt.Font
The style of this Font, as passed to the constructor.
Style - interface javax.swing.text.Style.
A collection of attributes to associate with an element in a document.
STYLE - Static variable in class javax.swing.text.html.HTML.Tag

STYLE - Static variable in class javax.swing.text.html.HTML.Attribute

styleChanged(Style) - Method in class javax.swing.text.DefaultStyledDocument
Creates a change event for the whole document and propagates it to the listeners.
StyleConstants - class javax.swing.text.StyleConstants.
A collection of well known or common attribute keys and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.
StyleConstants.CharacterConstants - class javax.swing.text.StyleConstants.CharacterConstants.
This is a typesafe enumeration of the well-known attributes that contribute to a character style.
StyleConstants.ColorConstants - class javax.swing.text.StyleConstants.ColorConstants.
This is a typesafe enumeration of the well-known attributes that contribute to a color.
StyleConstants.FontConstants - class javax.swing.text.StyleConstants.FontConstants.
This is a typesafe enumeration of the well-known attributes that contribute to a font.
StyleConstants.ParagraphConstants - class javax.swing.text.StyleConstants.ParagraphConstants.
This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
StyleContext - class javax.swing.text.StyleContext.
A pool of styles and their associated resources.
StyleContext.NamedStyle - class javax.swing.text.StyleContext.NamedStyle.
A collection of attributes, typically used to represent character and paragraph styles.
StyleContext.NamedStyle(StyleContext) - Constructor for class javax.swing.text.StyleContext.NamedStyle
Creates a new named style, with a null name and parent.
StyleContext.NamedStyle(StyleContext, String, Style) - Constructor for class javax.swing.text.StyleContext.NamedStyle
Creates a new named style.
StyleContext.NamedStyle(StyleContext, Style) - Constructor for class javax.swing.text.StyleContext.NamedStyle
Creates a new named style.
StyleContext.SmallAttributeSet - class javax.swing.text.StyleContext.SmallAttributeSet.
This class holds a small number of attributes in an array.
StyleContext.SmallAttributeSet(StyleContext, AttributeSet) - Constructor for class javax.swing.text.StyleContext.SmallAttributeSet

StyleContext.SmallAttributeSet(StyleContext, Object[]) - Constructor for class javax.swing.text.StyleContext.SmallAttributeSet

StyleContext() - Constructor for class javax.swing.text.StyleContext
Creates a new StyleContext object.
StyledDocument - interface javax.swing.text.StyledDocument.
Interface for a generic styled document.
StyledEditorKit - class javax.swing.text.StyledEditorKit.
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
StyledEditorKit.AlignmentAction - class javax.swing.text.StyledEditorKit.AlignmentAction.
An action to set paragraph alignment.
StyledEditorKit.AlignmentAction(String, int) - Constructor for class javax.swing.text.StyledEditorKit.AlignmentAction
Creates a new AlignmentAction.
StyledEditorKit.BoldAction - class javax.swing.text.StyledEditorKit.BoldAction.
An action to toggle the bold attribute.
StyledEditorKit.BoldAction() - Constructor for class javax.swing.text.StyledEditorKit.BoldAction
Constructs a new BoldAction.
StyledEditorKit.FontFamilyAction - class javax.swing.text.StyledEditorKit.FontFamilyAction.
An action to set the font family in the associated JEditorPane.
StyledEditorKit.FontFamilyAction(String, String) - Constructor for class javax.swing.text.StyledEditorKit.FontFamilyAction
Creates a new FontFamilyAction.
StyledEditorKit.FontSizeAction - class javax.swing.text.StyledEditorKit.FontSizeAction.
An action to set the font size in the associated JEditorPane.
StyledEditorKit.FontSizeAction(String, int) - Constructor for class javax.swing.text.StyledEditorKit.FontSizeAction
Creates a new FontSizeAction.
StyledEditorKit.ForegroundAction - class javax.swing.text.StyledEditorKit.ForegroundAction.
An action to set foreground color.
StyledEditorKit.ForegroundAction(String, Color) - Constructor for class javax.swing.text.StyledEditorKit.ForegroundAction
Creates a new ForegroundAction.
StyledEditorKit.ItalicAction - class javax.swing.text.StyledEditorKit.ItalicAction.
An action to toggle the italic attribute.
StyledEditorKit.ItalicAction() - Constructor for class javax.swing.text.StyledEditorKit.ItalicAction
Constructs a new ItalicAction.
StyledEditorKit.StyledTextAction - class javax.swing.text.StyledEditorKit.StyledTextAction.
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
StyledEditorKit.StyledTextAction(String) - Constructor for class javax.swing.text.StyledEditorKit.StyledTextAction
Creates a new StyledTextAction from a string action name.
StyledEditorKit.UnderlineAction - class javax.swing.text.StyledEditorKit.UnderlineAction.
An action to toggle the underline attribute.
StyledEditorKit.UnderlineAction() - Constructor for class javax.swing.text.StyledEditorKit.UnderlineAction
Constructs a new UnderlineAction.
StyledEditorKit() - Constructor for class javax.swing.text.StyledEditorKit

StyleSheet - class javax.swing.text.html.StyleSheet.
Support for defining the visual characteristics of HTML views being rendered.
StyleSheet.BoxPainter - class javax.swing.text.html.StyleSheet.BoxPainter.
Class to carry out some of the duties of CSS formatting.
StyleSheet.ListPainter - class javax.swing.text.html.StyleSheet.ListPainter.
Class to carry out some of the duties of CSS list formatting.
StyleSheet() - Constructor for class javax.swing.text.html.StyleSheet
Construct a StyleSheet
SUB - Static variable in class javax.swing.text.html.HTML.Tag

SUBCLASS_IMPLEMENTATION_PERMISSION - Static variable in interface java.io.ObjectStreamConstants
Enable overriding of readObject and writeObject.
subdivide(CubicCurve2D, CubicCurve2D) - Method in class java.awt.geom.CubicCurve2D
Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters.
subdivide(CubicCurve2D, CubicCurve2D, CubicCurve2D) - Static method in class java.awt.geom.CubicCurve2D
Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.
subdivide(double[], int, double[], int, double[], int) - Static method in class java.awt.geom.QuadCurve2D
Subdivides the quadratic curve specified by the coordinates stored in the src array at indices srcoff through srcoff + 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
subdivide(double[], int, double[], int, double[], int) - Static method in class java.awt.geom.CubicCurve2D
Subdivides the cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
subdivide(QuadCurve2D, QuadCurve2D) - Method in class java.awt.geom.QuadCurve2D
Subdivides this QuadCurve2D and stores the resulting two subdivided curves into the left and right curve parameters.
subdivide(QuadCurve2D, QuadCurve2D, QuadCurve2D) - Static method in class java.awt.geom.QuadCurve2D
Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.
subList(int, int) - Method in class java.util.AbstractList
Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.
subList(int, int) - Method in class java.util.Vector
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
subList(int, int) - Method in interface java.util.List
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
subMap(Object, Object) - Method in class java.util.TreeMap
Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
subMap(Object, Object) - Method in interface java.util.SortedMap
Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.
SUBMIT - Static variable in class javax.swing.text.html.FormView
Deprecated. As of 1.3, value now comes from UIManager property FormView.submitButtonText
submitData(String) - Method in class javax.swing.text.html.FormView
This method is responsible for submitting the form data.
Subscript - Static variable in class javax.swing.text.StyleConstants
Name of the Subscript attribute.
Subscript - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the subscript attribute.
subSet(Object, Object) - Method in class java.util.TreeSet
Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
subSet(Object, Object) - Method in interface java.util.SortedSet
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.
substituteColorModel(ColorModel, ColorModel) - Method in class java.awt.image.RGBImageFilter
Registers two ColorModel objects for substitution.
SUBSTITUTION_PERMISSION - Static variable in interface java.io.ObjectStreamConstants
Enable substitution of one object for another during serialization/deserialization.
substring(int) - Method in class java.lang.String
Returns a new string that is a substring of this string.
substring(int) - Method in class java.lang.StringBuffer
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.The substring begins at the specified index and extends to the end of the StringBuffer.
substring(int, int) - Method in class java.lang.String
Returns a new string that is a substring of this string.
substring(int, int) - Method in class java.lang.StringBuffer
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.
subtract(Area) - Method in class java.awt.geom.Area
Subtracts the shape of the specified Area from the shape of this Area.
subtract(BigDecimal) - Method in class java.math.BigDecimal
Returns a BigDecimal whose value is (this - val), and whose scale is max(this.scale(), val.scale()).
subtract(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this - val).
SUBTREE_SCOPE - Static variable in class javax.naming.directory.SearchControls
Search the entire subtree rooted at the named object.
SUBTREE_SCOPE - Static variable in interface javax.naming.event.EventContext
Constant for expressing interest in events concerning objects in the subtree of the object named by the target, including the object named by the target.
SUNDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Sunday.
SUP - Static variable in class javax.swing.text.html.HTML.Tag

superLayout(Container) - Method in class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager

Superscript - Static variable in class javax.swing.text.StyleConstants
Name of the Superscript attribute.
Superscript - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the superscript attribute.
SUPERSCRIPT - Static variable in class java.awt.font.TextAttribute
Attribute key for super and subscripting.
SUPERSCRIPT_SUB - Static variable in class java.awt.font.TextAttribute
Standard subscript.
SUPERSCRIPT_SUPER - Static variable in class java.awt.font.TextAttribute
Standard superscript.
SUPERSCRIPTS_AND_SUBSCRIPTS - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
supportsAlterTableWithAddColumn() - Method in interface java.sql.DatabaseMetaData
Is "ALTER TABLE" with add column supported?
supportsAlterTableWithDropColumn() - Method in interface java.sql.DatabaseMetaData
Is "ALTER TABLE" with drop column supported?
supportsANSI92EntryLevelSQL() - Method in interface java.sql.DatabaseMetaData
Is the ANSI92 entry level SQL grammar supported? All JDBC CompliantTM drivers must return true.
supportsANSI92FullSQL() - Method in interface java.sql.DatabaseMetaData
Is the ANSI92 full SQL grammar supported?
supportsANSI92IntermediateSQL() - Method in interface java.sql.DatabaseMetaData
Is the ANSI92 intermediate SQL grammar supported?
supportsBatchUpdates() - Method in interface java.sql.DatabaseMetaData
Indicates whether the driver supports batch updates.
supportsCatalogsInDataManipulation() - Method in interface java.sql.DatabaseMetaData
Can a catalog name be used in a data manipulation statement?
supportsCatalogsInIndexDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a catalog name be used in an index definition statement?
supportsCatalogsInPrivilegeDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a catalog name be used in a privilege definition statement?
supportsCatalogsInProcedureCalls() - Method in interface java.sql.DatabaseMetaData
Can a catalog name be used in a procedure call statement?
supportsCatalogsInTableDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a catalog name be used in a table definition statement?
supportsColumnAliasing() - Method in interface java.sql.DatabaseMetaData
Is column aliasing supported?
supportsConvert() - Method in interface java.sql.DatabaseMetaData
Is the CONVERT function between SQL types supported?
supportsConvert(int, int) - Method in interface java.sql.DatabaseMetaData
Is CONVERT between the given SQL types supported?
supportsCoreSQLGrammar() - Method in interface java.sql.DatabaseMetaData
Is the ODBC Core SQL grammar supported?
supportsCorrelatedSubqueries() - Method in interface java.sql.DatabaseMetaData
Are correlated subqueries supported? A JDBC CompliantTM driver always returns true.
supportsCustomEditor() - Method in interface java.beans.PropertyEditor
Determines whether this property editor supports a custom editor.
supportsCustomEditor() - Method in class java.beans.PropertyEditorSupport
Determines whether the propertyEditor can provide a custom editor.
supportsDataDefinitionAndDataManipulationTransactions() - Method in interface java.sql.DatabaseMetaData
Are both data definition and data manipulation statements within a transaction supported?
supportsDataManipulationTransactionsOnly() - Method in interface java.sql.DatabaseMetaData
Are only data manipulation statements within a transaction supported?
supportsDifferentTableCorrelationNames() - Method in interface java.sql.DatabaseMetaData
If table correlation names are supported, are they restricted to be different from the names of the tables?
supportsExpressionsInOrderBy() - Method in interface java.sql.DatabaseMetaData
Are expressions in "ORDER BY" lists supported?
supportsExtendedSQLGrammar() - Method in interface java.sql.DatabaseMetaData
Is the ODBC Extended SQL grammar supported?
supportsFullOuterJoins() - Method in interface java.sql.DatabaseMetaData
Are full nested outer joins supported?
supportsGroupBy() - Method in interface java.sql.DatabaseMetaData
Is some form of "GROUP BY" clause supported?
supportsGroupByBeyondSelect() - Method in interface java.sql.DatabaseMetaData
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
supportsGroupByUnrelated() - Method in interface java.sql.DatabaseMetaData
Can a "GROUP BY" clause use columns not in the SELECT?
supportsIntegrityEnhancementFacility() - Method in interface java.sql.DatabaseMetaData
Is the SQL Integrity Enhancement Facility supported?
supportsLikeEscapeClause() - Method in interface java.sql.DatabaseMetaData
Is the escape character in "LIKE" clauses supported? A JDBC CompliantTM driver always returns true.
supportsLimitedOuterJoins() - Method in interface java.sql.DatabaseMetaData
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
supportsMinimumSQLGrammar() - Method in interface java.sql.DatabaseMetaData
Is the ODBC Minimum SQL grammar supported? All JDBC CompliantTM drivers must return true.
supportsMixedCaseIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return false.
supportsMixedCaseQuotedIdentifiers() - Method in interface java.sql.DatabaseMetaData
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return true.
supportsMultipleResultSets() - Method in interface java.sql.DatabaseMetaData
Are multiple ResultSet from a single execute supported?
supportsMultipleTransactions() - Method in interface java.sql.DatabaseMetaData
Can we have multiple transactions open at once (on different connections)?
supportsNonNullableColumns() - Method in interface java.sql.DatabaseMetaData
Can columns be defined as non-nullable? A JDBC CompliantTM driver always returns true.
supportsOpenCursorsAcrossCommit() - Method in interface java.sql.DatabaseMetaData
Can cursors remain open across commits?
supportsOpenCursorsAcrossRollback() - Method in interface java.sql.DatabaseMetaData
Can cursors remain open across rollbacks?
supportsOpenStatementsAcrossCommit() - Method in interface java.sql.DatabaseMetaData
Can statements remain open across commits?
supportsOpenStatementsAcrossRollback() - Method in interface java.sql.DatabaseMetaData
Can statements remain open across rollbacks?
supportsOrderByUnrelated() - Method in interface java.sql.DatabaseMetaData
Can an "ORDER BY" clause use columns not in the SELECT statement?
supportsOuterJoins() - Method in interface java.sql.DatabaseMetaData
Is some form of outer join supported?
supportsPositionedDelete() - Method in interface java.sql.DatabaseMetaData
Is positioned DELETE supported?
supportsPositionedUpdate() - Method in interface java.sql.DatabaseMetaData
Is positioned UPDATE supported?
supportsResultSetConcurrency(int, int) - Method in interface java.sql.DatabaseMetaData
Does the database support the concurrency type in combination with the given result set type?
supportsResultSetType(int) - Method in interface java.sql.DatabaseMetaData
Does the database support the given result set type?
supportsSchemasInDataManipulation() - Method in interface java.sql.DatabaseMetaData
Can a schema name be used in a data manipulation statement?
supportsSchemasInIndexDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a schema name be used in an index definition statement?
supportsSchemasInPrivilegeDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a schema name be used in a privilege definition statement?
supportsSchemasInProcedureCalls() - Method in interface java.sql.DatabaseMetaData
Can a schema name be used in a procedure call statement?
supportsSchemasInTableDefinitions() - Method in interface java.sql.DatabaseMetaData
Can a schema name be used in a table definition statement?
supportsSelectForUpdate() - Method in interface java.sql.DatabaseMetaData
Is SELECT for UPDATE supported?
supportsStoredProcedures() - Method in interface java.sql.DatabaseMetaData
Are stored procedure calls using the stored procedure escape syntax supported?
supportsSubqueriesInComparisons() - Method in interface java.sql.DatabaseMetaData
Are subqueries in comparison expressions supported? A JDBC CompliantTM driver always returns true.
supportsSubqueriesInExists() - Method in interface java.sql.DatabaseMetaData
Are subqueries in 'exists' expressions supported? A JDBC CompliantTM driver always returns true.
supportsSubqueriesInIns() - Method in interface java.sql.DatabaseMetaData
Are subqueries in 'in' statements supported? A JDBC CompliantTM driver always returns true.
supportsSubqueriesInQuantifieds() - Method in interface java.sql.DatabaseMetaData
Are subqueries in quantified expressions supported? A JDBC CompliantTM driver always returns true.
supportsTableCorrelationNames() - Method in interface java.sql.DatabaseMetaData
Are table correlation names supported? A JDBC CompliantTM driver always returns true.
supportsTransactionIsolationLevel(int) - Method in interface java.sql.DatabaseMetaData
Does this database support the given transaction isolation level?
supportsTransactions() - Method in interface java.sql.DatabaseMetaData
Are transactions supported? If not, invoking the method commit is a noop and the isolation level is TRANSACTION_NONE.
supportsUnion() - Method in interface java.sql.DatabaseMetaData
Is SQL UNION supported?
supportsUnionAll() - Method in interface java.sql.DatabaseMetaData
Is SQL UNION ALL supported?
SURROGATE - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
SURROGATES_AREA - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
suspend() - Method in class java.lang.ThreadGroup
Deprecated. This method is inherently deadlock-prone. See Thread.suspend() for details.
suspend() - Method in class java.lang.Thread
Deprecated. This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
sval - Variable in class java.io.StreamTokenizer
If the current token is a word token, this field contains a string giving the characters of the word token.
SW_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The south-west-resize cursor type.
SW_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.SW_RESIZE_CURSOR.
SWAP_COLORS - Static variable in class java.awt.font.TextAttribute
Attribute key for swapping foreground and background Paints (or Colors).
SWAP_COLORS_ON - Static variable in class java.awt.font.TextAttribute
Swap foreground and background.
SWING_COMPONENT - Static variable in class javax.accessibility.AccessibleRole
A Swing component, but nothing else is known about it.
SwingConstants - interface javax.swing.SwingConstants.
A collection of constants generally used for positioning and orienting components on the screen.
SwingPropertyChangeSupport - class javax.swing.event.SwingPropertyChangeSupport.
This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
SwingPropertyChangeSupport(Object) - Constructor for class javax.swing.event.SwingPropertyChangeSupport
Constructs a SwingPropertyChangeSupport object.
SwingUtilities - class javax.swing.SwingUtilities.
A collection of utility methods for Swing.
sync() - Method in class java.awt.Toolkit
Synchronizes this toolkit's graphics state.
sync() - Method in class java.io.FileDescriptor
Force all system buffers to synchronize with the underlying device.
syncAllWidths - Variable in class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

SyncFailedException - exception java.io.SyncFailedException.
Signals that a sync operation has failed.
SyncFailedException(String) - Constructor for class java.io.SyncFailedException
Constructs an SyncFailedException with a detail message.
synchronize(Line[], boolean) - Method in interface javax.sound.sampled.Mixer
Synchronizes two or more lines.
SYNCHRONIZED - Static variable in class java.lang.reflect.Modifier
The int value representing the synchronized modifier.
synchronizedCollection(Collection) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) collection backed by the specified collection.
synchronizedList(List) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) list backed by the specified list.
synchronizedMap(Map) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) map backed by the specified map.
synchronizedSet(Set) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) set backed by the specified set.
synchronizedSortedMap(SortedMap) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.
synchronizedSortedSet(SortedSet) - Static method in class java.util.Collections
Returns a synchronized (thread-safe) sorted set backed by the specified sorted set.
syncScrollPaneWithViewport() - Method in class javax.swing.plaf.basic.BasicScrollPaneUI

syncWithScrollPane(JScrollPane) - Method in class javax.swing.ScrollPaneLayout
This method must be called after setting a JScrollPanes layout manager.
synthesizedElement(Element) - Method in class javax.swing.text.html.HTMLWriter
Returns true if the element is a synthesized element.
Synthesizer - interface javax.sound.midi.Synthesizer.
A Synthesizer generates sound.
SysexMessage - class javax.sound.midi.SysexMessage.
A SysexMessage object represents a MIDI system exclusive message.
SysexMessage() - Constructor for class javax.sound.midi.SysexMessage
Constructs a new SysexMessage.
SysexMessage(byte[]) - Constructor for class javax.sound.midi.SysexMessage
Constructs a new SysexMessage.
System - class java.lang.System.
The System class contains several useful class fields and methods.
SYSTEM - Static variable in interface javax.swing.text.html.parser.DTDConstants

SYSTEM_EXCLUSIVE - Static variable in class javax.sound.midi.SysexMessage
Status byte for System Exclusive message (0xF0, or 240).
SYSTEM_PORT - Static variable in interface java.rmi.activation.ActivationSystem
The port to lookup the activation system.
SYSTEM_RESET - Static variable in class javax.sound.midi.ShortMessage
Status byte for System Reset message (0xFF, or 255).
SystemColor - class java.awt.SystemColor.
A class to encapsulate symbolic colors representing the color of GUI objects on a system.
SystemException - exception org.omg.CORBA.SystemException.
The root class for all CORBA standard exceptions.
SystemException(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.SystemException
Constructs a SystemException exception with the specified detail message, minor code, and completion status.
SystemFlavorMap - class java.awt.datatransfer.SystemFlavorMap.
The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
Overview  Package  Class  Use  Tree  Deprecated   Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV LETTER   NEXT LETTER FRAMES    NO FRAMES
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 _


Serialized Form

Package java.applet

Class java.applet.Applet implements Serializable

Serialized Fields

accessibleContext

AccessibleContext accessibleContext

Class java.applet.Applet.AccessibleApplet implements Serializable

Serialized Fields

this$0

Applet this$0

Package java.awt

Class java.awt.AWTError implements Serializable

Class java.awt.AWTEvent implements Serializable

Serialized Fields

id

int id

consumed

boolean consumed

Class java.awt.AWTException implements Serializable

Class java.awt.AWTPermission implements Serializable

Class java.awt.BorderLayout implements Serializable

Serialized Fields

hgap

int hgap
Constructs a border layout with the horizontal gaps between components. The horizontal gap is specified by hgap.
See Also:
BorderLayout.getHgap(), setHgap()

vgap

int vgap
Constructs a border layout with the vertical gaps between components. The vertical gap is specified by vgap.
See Also:
BorderLayout.getVgap(), setVgap()

north

Component north
Constant to specify components location to be the north portion of the border layout.
See Also:
BorderLayout.getChild(java.lang.String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), #getLayoutAllignment, BorderLayout.removeLayoutComponent(java.awt.Component)

west

Component west
Constant to specify components location to be the west portion of the border layout.
See Also:
BorderLayout.getChild(java.lang.String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), #getLayoutAllignment, BorderLayout.removeLayoutComponent(java.awt.Component)

east

Component east
Constant to specify components location to be the east portion of the border layout.
See Also:
BorderLayout.getChild(java.lang.String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), #getLayoutAllignment, BorderLayout.removeLayoutComponent(java.awt.Component)

south

Component south
Constant to specify components location to be the south portion of the border layout.
See Also:
BorderLayout.getChild(java.lang.String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), #getLayoutAllignment, BorderLayout.removeLayoutComponent(java.awt.Component)

center

Component center
Constant to specify components location to be the center portion of the border layout.
See Also:
BorderLayout.getChild(java.lang.String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), #getLayoutAllignment, BorderLayout.removeLayoutComponent(java.awt.Component)

firstLine

Component firstLine
A relative positioning constant, that can be used instead of north, south, east, west or center. mixing the two types of constants can lead to unpredicable results. If you use both types, the relative constants will take precedence. For example, if you add components using both the NORTH and BEFORE_FIRST_LINE constants in a container whose orientation is LEFT_TO_RIGHT, only the BEFORE_FIRST_LINE will be layed out. This will be the same for lastLine, firstItem, lastItem.

lastLine

Component lastLine
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

firstItem

Component firstItem
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

lastItem

Component lastItem
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

Class java.awt.Button implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: Component
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the components. Unrecognised keys or values will be Ignored.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListener(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

label

String label

actionCommand

String actionCommand

buttonSerializedDataVersion

int buttonSerializedDataVersion

Class java.awt.Button.AccessibleAWTButton implements Serializable

Serialized Fields

this$0

Button this$0

Class java.awt.Canvas implements Serializable

Class java.awt.Canvas.AccessibleAWTCanvas implements Serializable

Serialized Fields

this$0

Canvas this$0

Class java.awt.CardLayout implements Serializable

Serialized Fields

tab

Hashtable tab

hgap

int hgap

vgap

int vgap

Class java.awt.Checkbox implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: Component
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the components. Unrecognised keys or values will be Ignored.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

label

String label
The label of the Checkbox. This field can be null. If a label is not specified it defaults to null or "".
See Also:
Checkbox.getLabel(), setLabel()

state

boolean state
The state of the Checkbox.
See Also:
Checkbox.getState(), setState()

group

CheckboxGroup group
The check box group. This field can be null indicating that the checkbox is not a group checkbox.
See Also:
getCheckBoxGroup(), setCheckBoxGroup()

checkboxSerializedDataVersion

int checkboxSerializedDataVersion

Class java.awt.Checkbox.AccessibleAWTCheckbox implements Serializable

Serialized Fields

this$0

Checkbox this$0

Class java.awt.CheckboxGroup implements Serializable

Serialized Fields

selectedCheckbox

Checkbox selectedCheckbox
The current choice.
See Also:
CheckboxGroup.getCurrent(), setCurrent()

Class java.awt.CheckboxMenuItem implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: MenuItem
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Menu Item. Unrecognised keys or values will be Ignored.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

state

boolean state

checkboxMenuItemSerializedDataVersion

int checkboxMenuItemSerializedDataVersion

Class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem implements Serializable

Serialized Fields

this$0

CheckboxMenuItem this$0

Class java.awt.Choice implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: Component
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the components. Unrecognised keys or values will be Ignored.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

pItems

Vector pItems
The items for the Choice. This can be a null value.
See Also:
add(),
addItem(),
getItem(),
Choice.getItemCount(),
insert(),
remove()

selectedIndex

int selectedIndex
The index of the current choice for this Choice.
See Also:
getSelectedItem, select()

choiceSerializedDataVersion

int choiceSerializedDataVersion

Class java.awt.Choice.AccessibleAWTChoice implements Serializable

Serialized Fields

this$0

Choice this$0

Class java.awt.Color implements Serializable

Serialized Fields

value

int value
The color value.
See Also:
Color.getRGB()

frgbvalue

float[] frgbvalue
The color value in the default sRGB ColorSpace as float components (no alpha). If null after object construction, this must be an sRGB color constructed with 8-bit precision, so compute from the int color value.
See Also:
Color.getRGBColorComponents(float[]), Color.getRGBComponents(float[])

fvalue

float[] fvalue
The color value in the native ColorSpace as float components (no alpha). If null after object construction, this must be an sRGB color constructed with 8-bit precision, so compute from the int color value.
See Also:
Color.getRGBColorComponents(float[]), Color.getRGBComponents(float[])

falpha

float falpha
The alpha value as a float component. If frgbvalue is null, this is not valid data, so compute from the int color value.
See Also:
Color.getRGBComponents(float[]), Color.getComponents(float[])

cs

ColorSpace cs
The ColorSpace. If null, then it's default is sRGB.
See Also:
Color.getColor(java.lang.String),
Color.getColorSpace(),
Color.getColorComponents(float[])

theContext

PaintContext theContext
The paint context used to generate a solid color pattern.
See Also:
createContext()

Class java.awt.Component implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the components. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListener(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

x

int x
The x position of the component in the parent's coordinate system.
See Also:
Component.getLocation()

y

int y
The y position of the component in the parent's coordinate system.
See Also:
Component.getLocation()

width

int width
The width of the component.
See Also:
Component.getSize()

height

int height
The height of the component.
See Also:
Component.getSize()

foreground

Color foreground
The foreground color for this component. foreground color can be null.
See Also:
Component.getForeground(), Component.setForeground(java.awt.Color)

background

Color background
The background color for this component. background can be null.
See Also:
Component.getBackground(), Component.setBackground(java.awt.Color)

font

Font font
The font used by this component. The font can be null.
See Also:
Component.getFont(), Component.setFont(java.awt.Font)

peerFont

Font peerFont
The font which the peer is currently using. (null if no peer exists.)

cursor

Cursor cursor
The cursor displayed when pointer is over this component. This value can be null.
See Also:
Component.getCursor(), Component.setCursor(java.awt.Cursor)

locale

Locale locale
The locale for the component.
See Also:
Component.getLocale(), Component.setLocale(java.util.Locale)

visible

boolean visible
True when the object is visible. An object that is not visible is not drawn on the screen.
See Also:
Component.isVisible(), Component.setVisible(boolean)

enabled

boolean enabled
True when the object is enabled. An object that is not enabled does not interact with the user.
See Also:
Component.isEnabled(), Component.setEnabled(boolean)

valid

boolean valid
True when the object is valid. An invalid object needs to be layed out. This flag is set to false when the object size is changed.
See Also:
Component.isValid(),
Component.validate(),
Component.invalidate()

dropTarget

DropTarget dropTarget
The DropTarget associated with this Component.
See Also:
Component.setDropTarget(java.awt.dnd.DropTarget), Component.getDropTarget()
Since:
1.2

hasFocus

boolean hasFocus
True if this component has enabled focus events and currently has the focus.
See Also:
Component.hasFocus, Component.processFocusEvent(java.awt.event.FocusEvent)

popups

Vector popups
See Also:
add()

name

String name
A components name. This field can be null.
See Also:
Component.getName(), Component.setName(String)

nameExplicitlySet

boolean nameExplicitlySet
A bool to determine whether the name has been set explicitly. nameExplicitlySet will be false if the name has not been set and true if it has.
See Also:
Component.getName(), Component.setName(String)

minSize

Dimension minSize
Internal, cached size information. (This field perhaps should have been transient).

prefSize

Dimension prefSize
Internal, cached size information (This field perhaps should have been transient).

newEventsOnly

boolean newEventsOnly
newEventsOnly will be true if the event is one of the event types enabled for the component. It will then allow for normal processing to continue. If it is false the event is passed to the components parent and up the ancestor tree until the event has been consumed.
See Also:
dispatchEvent()

eventMask

long eventMask
The eventMask is ONLY set by subclasses via enableEvents. The mask should NOT be set when listeners are registered so that we can distinguish the difference between when listeners request events and subclasses request them. One bit is used to indicate whether input methods are enabled; this bit is set by enableInputMethods and is on by default.
See Also:
enableInputMethods()

changeSupport

PropertyChangeSupport changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.
See Also:
addPropertyChangeListener, removePropertyChangeListener, firePropertyChange
Since:
1.2

isPacked

boolean isPacked

componentSerializedDataVersion

int componentSerializedDataVersion
Component Serialized Data Version.

accessibleContext

AccessibleContext accessibleContext

Class java.awt.Component.AccessibleAWTComponent implements Serializable

Serialized Fields

this$0

Component this$0

accessibleAWTComponentHandler

ComponentListener accessibleAWTComponentHandler

accessibleAWTFocusHandler

FocusListener accessibleAWTFocusHandler

Class java.awt.ComponentOrientation implements Serializable

Serialized Fields

orientation

int orientation

Class java.awt.Container implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: Component
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the components. Unrecognised keys or values will be Ignored.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

ncomponents

int ncomponents
The number of components in this container. This value can be null.
See Also:
getComponent(),
Container.getComponents(),
Container.getComponentCount()

component

Component[] component
The components in this container.
See Also:
add(), Container.getComponents()

layoutMgr

LayoutManager layoutMgr
Layout manager for this container.
See Also:
Container.doLayout(),
setLayout(),
Container.getLayout()

dispatcher

LightweightDispatcher dispatcher
Event router for lightweight components. If this container is native, this dispatcher takes care of forwarding and retargeting the events to lightweight components contained (if any).

maxSize

Dimension maxSize

containerSerializedDataVersion

int containerSerializedDataVersion

Class java.awt.Container.AccessibleAWTContainer implements Serializable

Serialized Fields

this$0

Container this$0

accessibleContainerHandler

ContainerListener accessibleContainerHandler

Class java.awt.Cursor implements Serializable

Serialized Fields

type

int type
The chosen cursor type initially set to the DEFAULT_CURSOR.
See Also:
Cursor.getType()

name

String name
The user-visible name of the cursor.
See Also:
Cursor.getName()

Class java.awt.Dialog implements Serializable

Serialized Fields

resizable

boolean resizable
A dialog's resizable property. Will be true if the Dialog is to be resizable, otherwise it will be false.
See Also:
setResizable()

modal

boolean modal
Will be true if the Dialog is modal, otherwise the dialog will be modeless. A modal Dialog grabs all the input to the owner frame from the user.
See Also:
Dialog.isModal(), setModal()

title

String title
Specifies the title of the Dialog. This field can be null.
See Also:
Dialog.getTitle(), setTitle()

Class java.awt.Dialog.AccessibleAWTDialog implements Serializable

Serialized Fields

this$0

Dialog this$0

Class java.awt.Dimension implements Serializable

Serialized Fields

width

int width
The width dimension. Negative values can be used.
See Also:
Dimension.getSize(), Dimension.setSize(double, double)

height

int height
The height dimension. Negative values can be used.
See Also:
Dimension.getSize(), Dimension.setSize(double, double)

Class java.awt.Event implements Serializable

Serialized Fields

target

Object target
The target component. This indicates the component over which the event occurred or with which the event is associated. This object has been replaced by AWTEvent.getSource()
See Also:
EventObject.getSource()

when

long when
The time stamp. Replaced by InputEvent.getWhen().
See Also:
InputEvent.getWhen()

id

int id
Indicates which type of event the event is, and which other Event variables are relevant for the event. This has been replaced by AWTEvent.getID()
See Also:
AWTEvent.getID()

x

int x
The x coordinate of the event. Replaced by MouseEvent.getX()
See Also:
MouseEvent.getX()

y

int y
The y coordinate of the event. Replaced by MouseEvent.getY()
See Also:
MouseEvent.getY()

key

int key
The key code of the key that was pressed in a keyboard event. This has been replaced by KeyEvent.getKeyCode()
See Also:
KeyEvent.getKeyCode()

modifiers

int modifiers
The state of the modifier keys. This is replaced with InputEvent.getModifiers() In java 1.1 MouseEvent and KeyEvent are subclasses of InputEvent.
See Also:
InputEvent.getModifiers()

clickCount

int clickCount
For MOUSE_DOWN events, this field indicates the number of consecutive clicks. For other events, its value is 0. This field has been replaced by MouseEvent.getClickCount().
See Also:
MouseEvent.getClickCount().

arg

Object arg
An arbitrary argument of the event. The value of this field depends on the type of event. arg has been replaced b event specific property.

evt

Event evt
The next event. This field is set when putting events into a linked list. This has been replaced by EventQueue.
See Also:
EventQueue

consumed

boolean consumed
This field controls whether or not the event is sent back down to the peer once the target has processed it - false means it's sent to the peer, true means it's not.
See Also:
Event.isConsumed()

Class java.awt.EventDispatchThread.EmptyEvent implements Serializable

Serialized Fields

this$0

EventDispatchThread this$0

Class java.awt.FileDialog implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Description copied from class: Window
Read the default ObjectInputStream, a possibly null listener to receive item events fired by the Window, and a possibly null list of child Windows. Unrecognised keys or values will be Ignored.
Serialized Fields

mode

int mode

dir

String dir

file

String file

filter

FilenameFilter filter

Class java.awt.FlowLayout implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Read this object out of a serialization stream, handling objects written by older versions of the class that didn't contain all of the fields we use now..
Serialized Fields

align

int align
align is the proprty that determines how each row distributes empty space. It can be one of the following three values : LEFT RIGHT CENTER
See Also:
FlowLayout.getAlignment(), FlowLayout.setAlignment(int)

newAlign

int newAlign
newAlign is the property that determines how each row distributes empty space for the Java 2 platform, v1.2 and greater. It can be one of the following three values : LEFT RIGHT CENTER
See Also:
FlowLayout.getAlignment(), FlowLayout.setAlignment(int)
Since:
1.2

hgap

int hgap
The flow layout manager allows a seperation of components with gaps. The horizontal gap will specify the space between components.
See Also:
getHgap, setHgap

vgap

int vgap
The flow layout manager allows a seperation of components with gaps. The vertical gap will specify the space between rows.
See Also:
getVgap, setVgap

serialVersionOnStream

int serialVersionOnStream
This represent the currentSerialVersion which is bein used. It will be one of two values : 0 versions before Java 2 platform v1.2.. 1 versions after Java 2 platform v1.2..
Since:
1.2

Class java.awt.FocusManager implements Serializable

Serialized Fields

focusRoot

Container focusRoot

focusOwner

Component focusOwner

Class java.awt.Font implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Font. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws ClassNotFoundException,
                         IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

fRequestedAttributes

Hashtable fRequestedAttributes
A map of font attributes available in this font. Attributes include things like ligatures and glyph substitution.
See Also:
Font.getAttributes()

name

String name
The logical name of this Font, as passed to the constructor.
See Also:
Font.getName()
Since:
JDK1.0

style

int style
The style of this Font, as passed to the constructor. This style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
See Also:
Font.getStyle()
Since:
JDK1.0

size

int size
The point size of this Font, rounded to integer.
See Also:
Font.getSize()
Since:
JDK1.0

pointSize

float pointSize
The point size of this Font in float.
See Also:
Font.getSize(), Font.getSize2D()

fontSerializedDataVersion

int fontSerializedDataVersion
The font Serializable Data Form.

Class java.awt.FontFormatException implements Serializable

Class java.awt.FontMetrics implements Serializable

Serialized Fields

font

Font font
The actual Font from which the font metrics are created. This cannot be null.
See Also:
FontMetrics.getFont()

Class java.awt.Frame implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Frame. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
java.awt.Component.itemListenerK
Serialized Fields

title

String title
This is the title of the frame. It can be changed at any time. title can be null and if this is the case the title = "".
See Also:
Frame.getTitle(), setTitle()

icon

Image icon
icon is the graphical way we can represent the frame. icon can be null, but obviously if you try to set the icon image icon cannot be null.
See Also:
Frame.getIconImage(), setIconImage()

menuBar

MenuBar menuBar
The frames menubar. If menuBar = null the frame will not have a menubar.
See Also:
Frame.getMenuBar(), setMenuBar()

resizable

boolean resizable
This field indicates whether the the frame is resizable This property can be changed at any time. resizable will be true if the frame is resizable, otherwise it will be false.
See Also:
Frame.isResizable()

mbManagement

boolean mbManagement
mbManagement is only used by the Motif implementation.

state

int state

ownedWindows

Vector ownedWindows

frameSerializedDataVersion

int frameSerializedDataVersion
Frame Serialized Data Version.

Class java.awt.Frame.AccessibleAWTFrame implements Serializable

Serialized Fields

this$0

Frame this$0

Class java.awt.GraphicsConfigTemplate implements Serializable

Class java.awt.GridBagConstraints implements Serializable

Serialized Fields

gridx

int gridx
Specifies the cell at the left of the component's display area, where the leftmost cell has gridx=0. The value RELATIVE specifies that the component be placed just to the right of the component that was added to the container just before this component was added.

The default value is RELATIVE. gridx should be a non-negative value.

See Also:
GridBagConstraints.clone(), GridBagConstraints.gridy

gridy

int gridy
Specifies the cell at the top of the component's display area, where the topmost cell has gridy=0. The value RELATIVE specifies that the component be placed just below the component that was added to the container just before this component was added.

The default value is RELATIVE. gridy should be a non-negative value.

See Also:
GridBagConstraints.clone(), GridBagConstraints.gridx

gridwidth

int gridwidth
Specifies the number of cells in a row for the component's display area.

Use REMAINDER to specify that the component be the last one in its row. Use RELATIVE to specify that the component be the next-to-last one in its row.

gridwidth should be non-negative and the default value is 1.

See Also:
GridBagConstraints.clone(), GridBagConstraints.gridheight

gridheight

int gridheight
Specifies the number of cells in a column for the component's display area.

Use REMAINDER to specify that the component be the last one in its column. Use RELATIVE to specify that the component be the next-to-last one in its column.

gridheight should be a non-negative value and the default value is 1.

See Also:
GridBagConstraints.clone(), GridBagConstraints.gridwidth

weightx

double weightx
Specifies how to distribute extra horizontal space.

The grid bag layout manager calculates the weight of a column to be the maximum weightx of all the components in a column. If the resulting layout is smaller horizontally than the area it needs to fill, the extra space is distributed to each column in proportion to its weight. A column that has a weight of zero receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the left and right edges.

The default value of this field is 0. weightx should be a non-negative value.

See Also:
GridBagConstraints.clone(), GridBagConstraints.weighty

weighty

double weighty
Specifies how to distribute extra vertical space.

The grid bag layout manager calculates the weight of a row to be the maximum weighty of all the components in a row. If the resulting layout is smaller vertically than the area it needs to fill, the extra space is distributed to each row in proportion to its weight. A row that has a weight of zero receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the top and bottom edges.

The default value of this field is 0. weighty should be a non-negative value.

See Also:
GridBagConstraints.clone(), GridBagConstraints.weightx

anchor

int anchor
This field is used when the component is smaller than its display area. It determines where, within the display area, to place the component. Possible values are CENTER, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, and NORTHWEST. The default value is CENTER.
See Also:
GridBagConstraints.clone()

fill

int fill
This field is used when the component's display area is larger than the component's requested size. It determines whether to resize the component, and if so, how.

The following values are valid for fill:

  • NONE: Do not resize the component.
  • HORIZONTAL: Make the component wide enough to fill its display area horizontally, but do not change its height.
  • VERTICAL: Make the component tall enough to fill its display area vertically, but do not change its width.
  • BOTH: Make the component fill its display area entirely.

The default value is NONE.

See Also:
GridBagConstraints.clone()

insets

Insets insets
This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.

The default value is new Insets(0, 0, 0, 0).

See Also:
GridBagConstraints.clone()

ipadx

int ipadx
This field specifies the internal padding of the component, how much space to add to the minimum width of the component. The width of the component is at least its minimum width plus (ipadx * 2) pixels.

The default value is 0.

See Also:
GridBagConstraints.clone(), GridBagConstraints.ipady

ipady

int ipady
This field specifies the internal padding, that is, how much space to add to the minimum height of the component. The height of the component is at least its minimum height plus (ipady * 2) pixels.

The default value is 0.

See Also:
GridBagConstraints.clone(), GridBagConstraints.ipadx

tempX

int tempX
Temporary place holder for the x coordinate.

tempY

int tempY
Temporary place holder for the y coordinate.

tempWidth

int tempWidth
Temporary place holder for the Width of the component.

tempHeight

int tempHeight
Temporary place holder for the Height of the component.

minWidth

int minWidth
The minimum width of the component. It is used to calculate ipady, where the default will be 0.
See Also:
ipady

minHeight

int minHeight
The minimum height of the component. It is used to calculate ipadx, where the default will be 0.
See Also:
ipadx

Class java.awt.GridBagLayout implements Serializable

Serialized Fields

comptable

Hashtable comptable
This hashtable maintains the association between a component and its gridbag constraints. The Keys in comptable are the components and the values are the instances of GridBagConstraints.
See Also:
GridBagConstraints

defaultConstraints

GridBagConstraints defaultConstraints
This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the defaultConstraints.
See Also:
GridBagLayout.getConstraints(Component),
GridBagLayout.setConstraints(Component, GridBagConstraints),
GridBagLayout.lookupConstraints(Component)

layoutInfo

GridBagLayoutInfo layoutInfo
This field holds tha layout information for the gridbag. The information in this field is based on the most recent validation of the gridbag. If layoutInfo is null this indicates that there are no components in the gridbag or if there are components, they have not yet been validated.
See Also:
GridBagLayout.GetLayoutInfo(Container, int)

columnWidths

int[] columnWidths
This field holds the overrides to the column minimum width. If this field is non-null the values are applied to the gridbag after all of the minimum columns widths have been calculated. If columnWidths has more elements than the number of columns, columns are added to the gridbag to match the number of elements in columnWidth.
See Also:
GridBagLayout.getLayoutDimensions()

rowHeights

int[] rowHeights
This field holds the overrides to the row minimum heights. If this field is non-null the values are applied to the gridbag after all of the minimum row heights have been calculated. If rowHeights has more elements than the number of rows, rowa are added to the gridbag to match the number of elements in rowHeights.
See Also:
GridBagLayout.getLayoutDimensions()

columnWeights

double[] columnWeights
This field holds the overrides to the column weights. If this field is non-null the values are applied to the gridbag after all of the columns weights have been calculated. If columnWeights[i] > weight for column i, then column i is assigned the weight in columnWeights[i]. If columnWeights has more elements than the number of columns, the excess elements are ignored - they do not cause more columns to be created.

rowWeights

double[] rowWeights
This field holds the overrides to the row weights. If this field is non-null the values are applied to the gridbag after all of the rows weights have been calculated. If rowWeights[i] > weight for row i, then row i is assigned the weight in rowWeights[i]. If rowWeights has more elements than the number of rows, the excess elements are ignored - they do not cause more rows to be created.

Class java.awt.GridBagLayoutInfo implements Serializable

Serialized Fields

width

int width

height

int height

startx

int startx

starty

int starty

minWidth

int[] minWidth

minHeight

int[] minHeight

weightX

double[] weightX

weightY

double[] weightY

Class java.awt.GridLayout implements Serializable

Serialized Fields

hgap

int hgap
This is the horizontal gap (in pixels) which specifies the space between columns. They can be changed at any time. This should be a non negative integer.
See Also:
GridLayout.getHgap(), setHgap()

vgap

int vgap
This is the vertical gap (in pixels) which specifies the space between rows. They can be changed at any time. This should be a non negative integer.
See Also:
GridLayout.getVgap(), setVgap()

rows

int rows
This is the number of rows specified for the grid. The number of rows can be changed at any time. This should be a non negative integer, where '0' means 'any number' meaning that the number of Rows in that dimension depends on the other dimension.
See Also:
GridLayout.getRows(), setRows()

cols

int cols
This is the number of columns specified for the grid. The number of columns can be changed at any time. This should be a non negative integer, where '0' means 'any number' meaning that the number of Columns in that dimension depends on the other dimension.
See Also:
GridLayout.getColumns(), setColumns()

Class java.awt.IllegalComponentStateException implements Serializable

Class java.awt.ImageMediaEntry implements Serializable

Serialized Fields

image

Image image

width

int width

height

int height

Class java.awt.Insets implements Serializable

Serialized Fields

top

int top
The inset from the top. This value is added to the Top of the rectangle to yield a new location for the Top.
See Also:
Insets.clone()

left

int left
The inset from the left. This value is added to the Left of the rectangle to yield a new location for the Left edge.
See Also:
Insets.clone()

bottom

int bottom
The inset from the bottom. This value is subtracted from the Bottom of the rectangle to yield a new location for the Bottom.
See Also:
Insets.clone()

right

int right
The inset from the right. This value is subtracted from the Right of the rectangle to yield a new location for the Right edge.
See Also:
Insets.clone()

Class java.awt.Label implements Serializable

Serialized Fields

text

String text
The text of this label. This text can be modified by the program but never by the user.
See Also:
Label.getText(), setText()

alignment

int alignment
The label's alignment. The default alignment is set to be left justified.
See Also:
Label.getAlignment(), setAlignment()

Class java.awt.Label.AccessibleAWTLabel implements Serializable

Serialized Fields

this$0

Label this$0

Class java.awt.LightweightDispatcher implements Serializable

Serialized Fields

nativeContainer

Container nativeContainer
The windowed container that might be hosting events for lightweight components.

focus

Component focus
The current lightweight component that has focus that is being hosted by this container. If this is a null reference then there is currently no focus on a lightweight component being hosted by this container

dragging

boolean dragging
Indicates if the mouse pointer is currently being dragged... this is needed because we may receive exit events while dragging and need to keep the current mouse target in this case.

nativeCursor

Cursor nativeCursor
This variable is not used, but kept for serialization compatibility

eventMask

long eventMask
The event mask for contained lightweight components. Lightweight components need a windowed container to host window-related events. This seperate mask indicates events that have been requested by contained lightweight components without effecting the mask of the windowed component itself.

Class java.awt.List implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the List. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

items

Vector items
A vector created to contain items which will become part of the List Component.
See Also:
addItem(), getItem()

rows

int rows
This field will represent the number of rows in the List Component. It is specified only once, and that is when the list component is actually created. It will never change.
See Also:
List.getRows()

multipleMode

boolean multipleMode
multipleMode is a variable that will be set to true if a list component is to be set to multiple selection mode, that is where the user can select more than one item in a list at one time. multipleMode will be set to false if the list component is set to single selection, that is where the user can only select one item on the list at any one time.
See Also:
List.isMultipleMode(), setMultipleMode()

selected

int[] selected
selected is an array that will contain the indices of items that have been selected.
See Also:
List.getSelectedIndexes(), List.getSelectedIndex()

visibleIndex

int visibleIndex
This variable contains the value that will be used when trying to make a particular list item visible.
See Also:
makeVisible()

listSerializedDataVersion

int listSerializedDataVersion
The List Components Serialized Data Version.

Class java.awt.List.AccessibleAWTList implements Serializable

Serialized Fields

this$0

List this$0

Class java.awt.List.AccessibleAWTList.AccessibleAWTListChild implements Serializable

Serialized Fields

this$1

List.AccessibleAWTList this$1

parent

List parent

indexInParent

int indexInParent

Class java.awt.MediaTracker implements Serializable

Serialized Fields

target

Component target
A given Component that will be tracked by a media tracker where the image will eventually be drawn.
See Also:
MediaTracker()

head

MediaEntry head
The head of the list of Images that is being tracked by the MediaTracker.
See Also:
addImage(), removeImage()

Class java.awt.Menu implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Menu. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws ClassNotFoundException,
                         IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

items

Vector items
A vector of the items that will be part of the Menu.
See Also:
Menu.countItems()

tearOff

boolean tearOff
This field indicates whether the menu has the tear of property or not. It will be set to true if the menu has the tear off property and it will be set to false> if it does not. A torn off menu can be deleted by a user when it is no longer needed.
See Also:
Menu.isTearOff()

isHelpMenu

boolean isHelpMenu
This field will be set to true if the Menu in question is actually a help menu. Otherwise it will be set to false.

menuSerializedDataVersion

int menuSerializedDataVersion
The menu serialized Data Version.

Class java.awt.Menu.AccessibleAWTMenu implements Serializable

Serialized Fields

this$0

Menu this$0

Class java.awt.MenuBar implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the MenuBar. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws ClassNotFoundException,
                         IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

menus

Vector menus
This field represents a vector of the actual menus that will be part of the MenuBar.
See Also:
MenuBar.countMenus()

helpMenu

Menu helpMenu
This menu is a special menu dedicated to help. The one thing to note about this menu is that on some platforms it appears at the right edge of the menubar.
See Also:
MenuBar.getHelpMenu(), setHelpMenu()

menuBarSerializedDataVersion

int menuBarSerializedDataVersion
The MenuBar's serialized data version.

Class java.awt.MenuBar.AccessibleAWTMenuBar implements Serializable

Serialized Fields

this$0

MenuBar this$0

Class java.awt.MenuComponent implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Serialized Fields

font

Font font
The Menu Components Font. This value can be null at which point a default will be used.
See Also:
setFont(), MenuComponent.getFont()

name

String name
The Menu Components name.
See Also:
MenuComponent.getName(), setName()

nameExplicitlySet

boolean nameExplicitlySet
A variable to indicate whether a name is explicitly set. If it is true the name will be set explicitly.
See Also:
setName()

newEventsOnly

boolean newEventsOnly
See Also:
dispatchEvent()

accessibleContext

AccessibleContext accessibleContext

Class java.awt.MenuComponent.AccessibleAWTMenuComponent implements Serializable

Serialized Fields

this$0

MenuComponent this$0

Class java.awt.MenuItem implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Menu Item. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

enabled

boolean enabled
A value to indicate whether a menu item is enabled or not. If it is enabled, enabled will be set to true. Else enabled will be set to false.
See Also:
MenuItem.isEnabled(), setEnabled()

label

String label
label is the label of a menu item. It can be any string.
See Also:
MenuItem.getLabel(), setLabel()

actionCommand

String actionCommand
This field indicates the command tha has been issued by a particular menu item. By default the actionCommand is the label of the menu item, unless it has been set using setActionCommand.
See Also:
setActionCommand(), MenuItem.getActionCommand()

eventMask

long eventMask
The eventMask is ONLY set by subclasses via enableEvents. The mask should NOT be set when listeners are registered so that we can distinguish the difference between when listeners request events and subclasses request them.

shortcut

MenuShortcut shortcut
A sequence of key stokes that ia associated with a menu item. Note :in 1.1.2 you must use setActionCommand() on a menu item in order for its shortcut to work.
See Also:
MenuItem.getShortcut(),
setShortcut(),
MenuItem.deleteShortcut()

menuItemSerializedDataVersion

int menuItemSerializedDataVersion
Menu item serialized data version.

Class java.awt.MenuItem.AccessibleAWTMenuItem implements Serializable

Serialized Fields

this$0

MenuItem this$0

Class java.awt.MenuShortcut implements Serializable

Serialized Fields

key

int key
This is indicates the virtual keycode for the menu shortcut. It is the key code with which the menu short cut will be created. In 1.1.2 you must use setActionCommand() on a menu item in order for its shortcut to work, otherwise it will fire a null action command. Must use KeyEvent virtual keys - eg : VK_A.
See Also:
MenuShortcut.getKey(), MenuShortcut.usesShiftModifier()

usesShift

boolean usesShift
Indicates whether the shft key was pressed. If true, the shift key was pressed. If false, the shift key was not pressed
See Also:
MenuShortcut.usesShiftModifier()

Class java.awt.Panel implements Serializable

Class java.awt.Panel.AccessibleAWTPanel implements Serializable

Serialized Fields

this$0

Panel this$0

Class java.awt.PeerFixer implements Serializable

Serialized Fields

scroller

ScrollPane scroller

Class java.awt.Point implements Serializable

Serialized Fields

x

int x
The x coordinate. If no x coordinate is set it will default to '0'.
See Also:
Point.getLocation(), Point.move(int, int)

y

int y
The y coordinate. If no y coordinate is set it will default to '0'.
See Also:
Point.getLocation(), Point.move(int, int)

Class java.awt.Polygon implements Serializable

Serialized Fields

npoints

int npoints
The total number of points. This value can be NULL.
See Also:
Polygon.addPoint(int, int)

xpoints

int[] xpoints
The array of x coordinates.
See Also:
Polygon.addPoint(int, int)

ypoints

int[] ypoints
The array of y coordinates.
See Also:
Polygon.addPoint(int, int)

bounds

Rectangle bounds
Bounds of the polygon. This value can be NULL. Please see the javadoc comments getBounds().
See Also:
Polygon.getBoundingBox(), Polygon.getBounds()

Class java.awt.PopupMenu implements Serializable

Class java.awt.PopupMenu.AccessibleAWTPopupMenu implements Serializable

Serialized Fields

this$0

PopupMenu this$0

Class java.awt.Rectangle implements Serializable

Serialized Fields

x

int x
The x coordinate of the Rectangle.
See Also:
Rectangle.setLocation(int, int), Rectangle.getLocation()

y

int y
The y coordinate of the Rectangle.
See Also:
Rectangle.setLocation(int, int), Rectangle.getLocation()

width

int width
The width of the Rectangle.
See Also:
Rectangle.setSize(int, int), Rectangle.getSize()
Since:
JDK1.0.

height

int height
The height of the Rectangle.
See Also:
Rectangle.setSize(int, int), Rectangle.getSize()

Class java.awt.Scrollbar implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Scrollbar. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating and ItemListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK
Serialized Fields

value

int value
The value of the Scrollbar. value should be either greater than minimum or less that maximum
See Also:
Scrollbar.getValue(), setValue()

maximum

int maximum
The maximum value of the Scrollbar. This value must be greater than the minimum value.
This integer can be either positive or negative, and it's range can be altered at any time.
See Also:
Scrollbar.getMaximum(), setMaximum()

minimum

int minimum
The minimum value of the Scrollbar. This value must be greater than the minimum value.
This integer can be either positive or negative.
See Also:
Scrollbar.getMinimum(), setMinimum()

visibleAmount

int visibleAmount
The size of the visible portion of the Scrollbar. The size of the scrollbox is normally used to indicate the visibleAmount.
See Also:
Scrollbar.getVisibleAmount(), setVisibleAmount()

orientation

int orientation
The Scrollbar's orientation--being either horizontal or vertical. This value should be specified when the scrollbar is being created.
orientation can be either : VERTICAL or HORIZONTAL only.
See Also:
Scrollbar.getOrientation(), setOrientation()

lineIncrement

int lineIncrement
The amount by which the scrollbar value will change when going up or down by a line. This value should be a non negative integer.
See Also:
setLineIncrement(), Scrollbar.getLineIncrement()

pageIncrement

int pageIncrement
The amount by which the scrollbar value will change when going up or down by a page. This value should be a non negative integer.
See Also:
setPageIncrement(), Scrollbar.getPageIncrement()

scrollbarSerializedDataVersion

int scrollbarSerializedDataVersion
The scrollbars serialized Data Version.

Class java.awt.Scrollbar.AccessibleAWTScrollBar implements Serializable

Serialized Fields

this$0

Scrollbar this$0

Class java.awt.ScrollPane implements Serializable

Serialized Fields

scrollbarDisplayPolicy

int scrollbarDisplayPolicy
There are 3 ways in which a scroll bar can be displayed. This integer will represent one of these 3 displays - (SCROLLBARS_ALWAYS, SCROLLBARS_AS_NEEDED, SCROLLBARS_NEVER)
See Also:
ScrollPane.getScrollbarDisplayPolicy()

vAdjustable

ScrollPaneAdjustable vAdjustable
An adjustable Vertical Scrollbar. It is important to not that you must NOT call 3 Adjustable methods ie : setMinimum(), setMaximum(), setVisibleAmount().
See Also:
ScrollPane.getVAdjustable(), Adjustable

hAdjustable

ScrollPaneAdjustable hAdjustable
An adjustable Horizontal Scrollbar. It is important to not that you must NOT call 3 Adjustable method ie : setMinimum(), setMaximum(), setVisibleAmount().
See Also:
ScrollPane.getHAdjustable(), Adjustable

Class java.awt.ScrollPane.AccessibleAWTScrollPane implements Serializable

Serialized Fields

this$0

ScrollPane this$0

Class java.awt.ScrollPane.PeerFixer implements Serializable

Serialized Fields

this$0

ScrollPane this$0

scroller

ScrollPane scroller

Class java.awt.ScrollPaneAdjustable implements Serializable

Serialized Fields

sp

ScrollPane sp

orientation

int orientation

minimum

int minimum

maximum

int maximum

visibleAmount

int visibleAmount

unitIncrement

int unitIncrement

blockIncrement

int blockIncrement

value

int value

adjustmentListener

AdjustmentListener adjustmentListener

Class java.awt.SystemColor implements Serializable

Class java.awt.TextArea implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream.
Serialized Fields

rows

int rows
The number of rows in the TextArea. This parameter will determine the text area's height. Guaranteed to be non-negative.
See Also:
TextArea.getRows(), setRows()

columns

int columns
The number of columns in the TextArea. A column is an approximate average character width that is platform-dependent. This parameter will determine the text area's width. Guaranteed to be non-negative.
See Also:
TextArea.getColumns(), setColumns()

scrollbarVisibility

int scrollbarVisibility
Determines which scrollbars are created for the
 text area. It can be one of four values :
 SCROLLBARS_BOTH = both scrollbars.
SCROLLBARS_HORIZONTAL_ONLY = Horizontal bar only.
SCROLLBARS_VERTICAL_ONLY = Vertical bar only.
SCROLLBARS_NONE = No scrollbars.
See Also:
TextArea.getScrollbarVisibility()

textAreaSerializedDataVersion

int textAreaSerializedDataVersion
The textArea Serialized Data Version.

Class java.awt.TextArea.AccessibleAWTTextArea implements Serializable

Serialized Fields

this$0

TextArea this$0

Class java.awt.TextComponent implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream, and if it isn't null, add a listener to receive text events fired by the TextComponent. Unrecognized keys or values will be ignored.
See Also:
removeTextListener(), addTextListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable TextListener(s) as optional data. The non-serializable TextListener(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of zero or more pairs. A pair consists of a String and Object. The String indicates the type of object and is one of the following : textListenerK indicating and TextListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.textListenerK
Serialized Fields

text

String text
The value of the text. A null value is the same as "".
See Also:
setText(), TextComponent.getText()

editable

boolean editable
A boolean indicating whether or not this TextComponent is editable. It will be true if the text component is editable and false if not.
See Also:
TextComponent.isEditable()

selectionStart

int selectionStart
The selection refers to the selected text, and the selectionStart is the start position of the selected text.
See Also:
TextComponent.getSelectionStart(), setSelectionStart()

selectionEnd

int selectionEnd
The selection refers to the selected text, and the selectionEnd is the end position of the selected text.
See Also:
TextComponent.getSelectionEnd(), setSelectionEnd()

backgroundSetByClientCode

boolean backgroundSetByClientCode

textComponentSerializedDataVersion

int textComponentSerializedDataVersion
The textComponent SerializedDataVersion.

checkForEnableIM

boolean checkForEnableIM

Class java.awt.TextComponent.AccessibleAWTTextComponent implements Serializable

Serialized Fields

this$0

TextComponent this$0

Class java.awt.TextField implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the ObjectInputStream and if it isn't null, add a listener to receive action events fired by the TextField. Unrecognized keys or values will be ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ActionListener(s) as optional data. The non-serializable ActionListener(s) are detected and no attempt is made to serialize them.
Serial Data:
Null terminated sequence of zero or more pairs. A pair consists of a String and Object. The String indicates the type of object and is one of the following : ActionListenerK indicating and ActionListener object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.actionListenerK
Serialized Fields

columns

int columns
The number of columns in the text field. A column is an approximate average character width that is platform-dependent. Guaranteed to be non-negative.
See Also:
setColumns(), TextField.getColumns()

echoChar

char echoChar
The echo character, which is used when the user wishes to disguise the characters typed into the text field. The disguises are removed if echoChar = 0.
See Also:
TextField.getEchoChar(),
setEchoChar(),
TextField.echoCharIsSet()

textFieldSerializedDataVersion

int textFieldSerializedDataVersion
The textField Serialized Data Version.

Class java.awt.TextField.AccessibleAWTTextField implements Serializable

Serialized Fields

this$0

TextField this$0

Class java.awt.Window implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Read the default ObjectInputStream, a possibly null listener to receive item events fired by the Window, and a possibly null list of child Windows. Unrecognised keys or values will be Ignored.
See Also:
removeActionListener(), addActionListener()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListener(s) are detected and no attempt is made to serialize them. Write a list of child Windows as optional data.
Serial Data:
Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : itemListenerK indicating an ItemListener object.Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The String indicates the type of object and is one of the following : ownedWindowK indicating a child Window object.
See Also:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), java.awt.Component.itemListenerK, java.awt.Component.ownedWindowK
Serialized Fields

warningString

String warningString
This represents the warning message that is to be displayed in a non secure window. ie : a window that has a security manager installed for which calling SecurityManager.checkTopLevelWindow() is false. This message can be displayed anywhere in the window.
See Also:
Window.getWarningString()

state

int state
An Integer value representing the Window State.
See Also:
Window.show()
Since:
1.2

focusMgr

FocusManager focusMgr
The Focus for the Window in question, and its components.
Since:
1.2

windowSerializedDataVersion

int windowSerializedDataVersion
The window serialized data version.

Class java.awt.Window.AccessibleAWTWindow implements Serializable

Serialized Fields

this$0

Window this$0

Package java.awt.color

Class java.awt.color.CMMException implements Serializable

Class java.awt.color.ColorSpace implements Serializable

Serialized Fields

type

int type

numComponents

int numComponents

Class java.awt.color.ICC_ColorSpace implements Serializable

Serialized Fields

thisProfile

ICC_Profile thisProfile

Class java.awt.color.ICC_Profile implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reads default serializable fields from the stream. Reads from the stream a string and an array of bytes as additional data.
Serial Data:
The String is the name of one of CS_* constants defined in the ColorSpace class if the profile object is a profile for a predefined color space (for example "CS_sRGB"). The string is null otherwise.

The byte[] array is the profile data for the profile. It will usually be null for the predefined profiles.

If the string is recognized as a constant name for predefined color space the object will be resolved into profile obtained with getInstance(int cspace) and the profile data are ignored. Otherwise the object will be resolved into profile obtained with getInstance(byte[] data).

See Also:
ICC_Profile.readResolve(),
ICC_Profile.getInstance(int),
ICC_Profile.getInstance(byte[])

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Writes default serializable fields to the stream. Writes a string and an array of bytes to the stream as additional data.
Serial Data:
The String is the name of one of CS_* constants defined in the ColorSpace class if the profile object is a profile for a predefined color space (for example "CS_sRGB"). The string is null otherwise.

The byte[] array is the profile data for the profile. For predefined color spaces null is written instead of the profile data. If in the future versions of Java API new predefined color spaces will be added, future versions of this class may choose to write for new predefined color spaces not only the color space name, but the profile data as well so that older versions could still deserialize the object.

Serialized Fields

iccProfileSerializedDataVersion

int iccProfileSerializedDataVersion
Version of the format of additional serialized data in the stream. Version 1 corresponds to Java 2 Platform, v1.3.
Since:
1.3

Class java.awt.color.ICC_ProfileGray implements Serializable

Class java.awt.color.ICC_ProfileRGB implements Serializable

Class java.awt.color.ProfileDataException implements Serializable

Package java.awt.datatransfer

Class java.awt.datatransfer.DataFlavor implements Serializable

Serialization Methods

readExternal

public void readExternal(ObjectInput is)
                  throws IOException,
                         ClassNotFoundException
restore this DataFlavor from an Serialized state

writeExternal

public void writeExternal(ObjectOutput os)
                   throws IOException
Serialize this DataFlavor

Class java.awt.datatransfer.MimeType implements Serializable

Serialization Methods

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings and arrays.

Class java.awt.datatransfer.MimeTypeParseException implements Serializable

Class java.awt.datatransfer.UnsupportedFlavorException implements Serializable

Package java.awt.dnd

Class java.awt.dnd.DragGestureEvent implements Serializable

Serialized Fields

events

List events

dragSource

DragSource dragSource

component

Component component

origin

Point origin

action

int action

Class java.awt.dnd.DragSourceDragEvent implements Serializable

Serialized Fields

targetActions

int targetActions

dropAction

int dropAction

gestureModifiers

int gestureModifiers

Class java.awt.dnd.DragSourceDropEvent implements Serializable

Serialized Fields

dropSuccess

boolean dropSuccess

dropAction

int dropAction

Class java.awt.dnd.DragSourceEvent implements Serializable

Class java.awt.dnd.DropTarget implements Serializable

Serialized Fields

component

Component component

actions

int actions

active

boolean active

dtListener

DropTargetListener dtListener

Class java.awt.dnd.DropTargetDragEvent implements Serializable

Serialized Fields

location

Point location

actions

int actions

dropAction

int dropAction

Class java.awt.dnd.DropTargetDropEvent implements Serializable

Serialized Fields

location

Point location

actions

int actions

dropAction

int dropAction

isLocalTx

boolean isLocalTx

Class java.awt.dnd.DropTargetEvent implements Serializable

Serialized Fields

context

DropTargetContext context
The DropTargetConext associated with this DropTargetEvent.

Class java.awt.dnd.InvalidDnDOperationException implements Serializable

Package java.awt.event

Class java.awt.event.ActionEvent implements Serializable

Serialized Fields

actionCommand

String actionCommand
The nonlocalized string that gives more details of what actually caused the event. This information is very specific to the component that fired it.
See Also:
ActionEvent.getActionCommand()

modifiers

int modifiers
This represents the key modifier that was selected, and is used to determine the state of the selected key. If no modifier has been selected it will default to zero.
See Also:
ActionEvent.getModifiers()

Class java.awt.event.AdjustmentEvent implements Serializable

Serialized Fields

adjustable

Adjustable adjustable
The adjustable object that fired the event.
See Also:
AdjustmentEvent.getAdjustable()

value

int value
value will contain the new value of the adjustable object. This value will always be in a range associated adjustable object.
See Also:
AdjustmentEvent.getValue()

adjustmentType

int adjustmentType
The adjustmentType describes how the adjustable object value has changed. This value can be increased/decreased by a block or unit amount where the block is associated with page increments/decrements, and a unit is associated with line increments/decrements.
See Also:
AdjustmentEvent.getAdjustmentType()

Class java.awt.event.ComponentEvent implements Serializable

Class java.awt.event.ContainerEvent implements Serializable

Serialized Fields

child

Component child
The non-null component that is being added or removed from the Container.
See Also:
getChild

Class java.awt.event.FocusEvent implements Serializable

Serialized Fields

temporary

boolean temporary
A focus event can have two different levels, permanent and temporary. It will be set to true if some operation takes away the focus temporarily and intends on getting it back once the event is completed. Otherwise it will be set to false.
See Also:
FocusEvent.isTemporary()

Class java.awt.event.HierarchyEvent implements Serializable

Serialized Fields

changed

Component changed

changedParent

Container changedParent

changeFlags

long changeFlags

Class java.awt.event.InputEvent implements Serializable

Serialized Fields

when

long when
The input events Time stamp. The time stamp is in UTC format that indicates when the input event was created.
See Also:
InputEvent.getWhen()

modifiers

int modifiers
The state of the modifier key at the time the input event was fired.
See Also:
InputEvent.getModifiers(), MouseEvent

Class java.awt.event.InputMethodEvent implements Serializable

Class java.awt.event.InvocationEvent implements Serializable

Serialized Fields

runnable

Runnable runnable
The Runnable whose run() method will be called.

notifier

Object notifier
The (potentially null) Object whose notifyAll() method will be called immediately after the Runnable.run() method returns.

catchExceptions

boolean catchExceptions
Set to true if dispatch() catches Exception and stores it in the exception instance variable. If false, Exceptions are propagated up to the EventDispatchThread's dispatch loop.

exception

Exception exception
The (potentially null) Exception thrown during execution of the Runnable.run() method. This variable will also be null if a particular instance does not catch exceptions.

Class java.awt.event.ItemEvent implements Serializable

Serialized Fields

item

Object item
The item whose selection state has changed.
See Also:
ItemEvent.getItem()

stateChange

int stateChange
stateChange indicates whether the item was selected or deselected.
See Also:
ItemEvent.getStateChange()

Class java.awt.event.KeyEvent implements Serializable

Serialized Fields

keyCode

int keyCode
The unique value assigned to each of the keys on the keyboard. There is a common set of key codes that can be fired by most keyboards. The symbolic name for a key code should be used rather than the code value itself.
See Also:
KeyEvent.getKeyCode(), setKeyCode()

keyChar

char keyChar
keyChar is a valid unicode character that is fired by a key or a key combination on a keyboard.
See Also:
KeyEvent.getKeyChar(), setKeyChar()

Class java.awt.event.MouseEvent implements Serializable

Serialized Fields

x

int x
The mouse events x coordinate. The x value is relative to the component that fired the event.
See Also:
MouseEvent.getX()

y

int y
The mouse events y coordinate. The y value is relative to the component that fired the event.
See Also:
MouseEvent.getY()

clickCount

int clickCount
Indicates the number of quick consecutive clicks of a mouse button. clickCount will be valid for only three mouse events :
MOUSE_CLICKED, MOUSE_PRESSED and MOUSE_RELEASED. For the above, the clickCount will be at least 1. For all other events the count will be 0.
See Also:
MouseEvent.getClickCount().

popupTrigger

boolean popupTrigger
A property used to indicate whether a Popup Menu should appear with a certain gestures. If popupTrigger = false no popup menu should appear. If it is true then a popup menu should appear .
See Also:
PopupMenu, MouseEvent.isPopupTrigger()

Class java.awt.event.PaintEvent implements Serializable

Serialized Fields

updateRect

Rectangle updateRect
This is the rectangle that represents the area on the source component that requires a repaint. This rectangle should be non null.
See Also:
Rectangle, setUpdateRect(), PaintEvent.getUpdateRect()

Class java.awt.event.TextEvent implements Serializable

Class java.awt.event.WindowEvent implements Serializable

Package java.awt.font

Class java.awt.font.TextAttribute implements Serializable

Class java.awt.font.TransformAttribute implements Serializable

Serialized Fields

transform

AffineTransform transform

Package java.awt.geom

Class java.awt.geom.AffineTransform implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws ClassNotFoundException,
                         IOException
Serialized Fields

m00

double m00
The X coordinate scaling element of the 3x3 affine transformation matrix.

m10

double m10
The Y coordinate shearing element of the 3x3 affine transformation matrix.

m01

double m01
The X coordinate shearing element of the 3x3 affine transformation matrix.

m11

double m11
The Y coordinate scaling element of the 3x3 affine transformation matrix.

m02

double m02
The X coordinate of the translation element of the 3x3 affine transformation matrix.

m12

double m12
The Y coordinate of the translation element of the 3x3 affine transformation matrix.

Class java.awt.geom.IllegalPathStateException implements Serializable

Class java.awt.geom.NoninvertibleTransformException implements Serializable

Package java.awt.image

Class java.awt.image.ImagingOpException implements Serializable

Class java.awt.image.RasterFormatException implements Serializable

Package java.awt.image.renderable

Class java.awt.image.renderable.ParameterBlock implements Serializable

Serialized Fields

sources

Vector sources
A Vector of sources, stored as arbitrary Objects.

parameters

Vector parameters
A Vector of non-source parameters, stored as arbitrary Objects.

Package java.awt.print

Class java.awt.print.PrinterAbortException implements Serializable

Class java.awt.print.PrinterException implements Serializable

Class java.awt.print.PrinterIOException implements Serializable

Serialized Fields

mException

IOException mException
The IO error that terminated the print job.

Package java.beans

Class java.beans.IntrospectionException implements Serializable

Class java.beans.PropertyChangeEvent implements Serializable

Serialized Fields

propertyName

String propertyName
name of the property that changed. May be null, if not known.

newValue

Object newValue
New value for property. May be null if not known.

oldValue

Object oldValue
Previous value for property. May be null if not known.

propagationId

Object propagationId
Propagation ID. May be null.
See Also:
#getPropagationId.

Class java.beans.PropertyChangeSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serial Data:
Null terminated list of PropertyChangeListeners.

At serialization time we skip non-serializable listeners and only serialize the serializable listeners.

Serialized Fields

children

Hashtable children
Hashtable for managing listeners for specific properties. Maps property names to PropertyChangeSupport objects.
Since:
1.2

source

Object source
The object to be provided as the "source" for any generated events.

propertyChangeSupportSerializedDataVersion

int propertyChangeSupportSerializedDataVersion
Internal version number
Since:

Class java.beans.PropertyVetoException implements Serializable

Serialized Fields

evt

PropertyChangeEvent evt
A PropertyChangeEvent describing the vetoed change.

Class java.beans.VetoableChangeSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serial Data:
Null terminated list of VetoableChangeListeners.

At serialization time we skip non-serializable listeners and only serialize the serializable listeners.

Serialized Fields

children

Hashtable children
Hashtable for managing listeners for specific properties. Maps property names to VetoableChangeSupport objects.
Since:
1.2

source

Object source
The object to be provided as the "source" for any generated events.

vetoableChangeSupportSerializedDataVersion

int vetoableChangeSupportSerializedDataVersion
Internal version number

Package java.beans.beancontext

Class java.beans.beancontext.BeanContextChildSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream ois)
                 throws IOException,
                        ClassNotFoundException
Restore a persistent object, must wait for subsequent setBeanContext() to fully restore any resources obtained from the new nesting BeanContext

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException
Write the persistence state of the object.
Serialized Fields

beanContextChildPeer

BeanContextChild beanContextChildPeer
The BeanContext in which this BeanContextChild is nested.

pcSupport

PropertyChangeSupport pcSupport
The PropertyChangeSupport associated with this BeanContextChildSupport.

vcSupport

VetoableChangeSupport vcSupport
The VetoableChangeSupport associated with this BeanContextChildSupport.

Class java.beans.beancontext.BeanContextEvent implements Serializable

Serialized Fields

propagatedFrom

BeanContext propagatedFrom
The BeanContext from which this event was propagated

Class java.beans.beancontext.BeanContextMembershipEvent implements Serializable

Serialized Fields

children

Collection children
The list of children affected by this event notification.

Class java.beans.beancontext.BeanContextServiceAvailableEvent implements Serializable

Serialized Fields

serviceClass

Class serviceClass
A Class reference to the newly available service

Class java.beans.beancontext.BeanContextServiceRevokedEvent implements Serializable

Serialized Fields

serviceClass

Class serviceClass
A Class reference to the service that is being revoked.

invalidateRefs

boolean invalidateRefs

Class java.beans.beancontext.BeanContextServicesSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream ois)
                 throws IOException,
                        ClassNotFoundException
deserialize the instance

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException
serialize the instance

Class java.beans.beancontext.BeanContextServicesSupport.BCSSChild implements Serializable

Serialized Fields

this$0

BeanContextServicesSupport this$0

Class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider implements Serializable

Serialized Fields

serviceProvider

BeanContextServiceProvider serviceProvider

Class java.beans.beancontext.BeanContextSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream ois)
                 throws IOException,
                        ClassNotFoundException
deserialize contents ... if this instance has a distinct peer the children are *not* serialized here, the peer's readObject() must call readChildren() after deserializing this instance.

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException,
                         ClassNotFoundException
Serialize the BeanContextSupport, if this instance has a distinct peer (that is this object is acting as a delegate for another) then the children of this instance are not serialized here due to a 'chicken and egg' problem that occurs on deserialization of the children at the same time as this instance. Therefore in situations where there is a distinct peer to this instance it should always call writeObject() followed by writeChildren() and readObject() followed by readChildren().
Serialized Fields

serializable

int serializable

locale

Locale locale
The current locale of this BeanContext.

okToUseGui

boolean okToUseGui
A boolean indicating if this instance may now render a GUI.

designTime

boolean designTime
A boolean indicating whether or not this object is currently in design time mode.

Class java.beans.beancontext.BeanContextSupport.BCSChild implements Serializable

Serialized Fields

this$0

BeanContextSupport this$0

child

Object child

proxyPeer

Object proxyPeer

Package java.io

Class java.io.CharConversionException implements Serializable

Class java.io.EOFException implements Serializable

Class java.io.File implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore this filename. The original separator character is read. If it is different than the separator character on this system, then the old seperator is replaced by the local separator.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
WriteObject is called to save this filename. The separator character is saved also so it can be replaced in case the path is reconstituted on a different host type.
Serialized Fields

path

String path
This abstract pathname's normalized pathname string. A normalized pathname string uses the default name-separator character and does not contain any duplicate or redundant separators.

Class java.io.FileNotFoundException implements Serializable

Class java.io.FilePermission implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the FilePermission from a stream.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
WriteObject is called to save the state of the FilePermission to a stream. The actions are serialized, and the superclass takes care of the name.
Serialized Fields

actions

String actions
the actions string.

Class java.io.FilePermissionCollection implements Serializable

Serialized Fields

permissions

Vector permissions

Class java.io.InterruptedIOException implements Serializable

Serialized Fields

bytesTransferred

int bytesTransferred
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.

Class java.io.InvalidClassException implements Serializable

Serialized Fields

classname

String classname
Name of the invalid class.
Name of the invalid class.

Class java.io.InvalidObjectException implements Serializable

Class java.io.IOException implements Serializable

Class java.io.NotActiveException implements Serializable

Class java.io.NotSerializableException implements Serializable

Class java.io.ObjectOutputStream.Stack implements Serializable

Class java.io.ObjectStreamClass implements Serializable

Serialization Overview

Class ObjectStreamClass is special cased within the Serialization Stream Protocol. An ObjectStreamClass is written intially into an ObjectOutputStream in the following format:
      TC_CLASSDESC className, serialVersionUID, flags,
                   length, list of field descriptions.

 FIELDNAME        TYPES
                  DESCRIPTION
 --------------------------------------
 className        primitive data String
                  Fully qualified class name.

 serialVersionUID long
                  Stream Unique Identifier for compatible classes
                  with same base class name.

 flags            byte
                  Attribute bit fields defined in
                  java.io.ObjectStreamConstants.SC_*.

 length           short
                  The number of field descriptions to follow.

 fieldDescription (byte, primitive data String, String Object)
                  A pseudo-externalized format of class
                  java.io.ObjectStreamField.
                  Consists of typeCode, fieldName, and,
                  if a nonPrimitive typecode, a fully qualified
                  class name. See Class.getName method
                  for the typecode byte encodings.
The first time the class descriptor is written into the stream, a new handle is generated. Future references to the class descriptor are written as references to the initial class descriptor instance.
See Also:
ObjectOutputStream.writeUTF(java.lang.String)
Serialized Fields

Class java.io.ObjectStreamException implements Serializable

Class java.io.OptionalDataException implements Serializable

Serialized Fields

length

int length
The number of bytes of primitive data available to be read in the current buffer.

eof

boolean eof
True if there is no more data in the buffered part of the stream.

Class java.io.SerializablePermission implements Serializable

Serialized Fields

actions

String actions

Class java.io.StreamCorruptedException implements Serializable

Class java.io.SyncFailedException implements Serializable

Class java.io.UnsupportedEncodingException implements Serializable

Class java.io.UTFDataFormatException implements Serializable

Class java.io.WriteAbortedException implements Serializable

Serialized Fields

detail

Exception detail
Exception that was caught while writing the ObjectStream.

Package java.lang

Class java.lang.AbstractMethodError implements Serializable

Class java.lang.ArithmeticException implements Serializable

Class java.lang.ArrayIndexOutOfBoundsException implements Serializable

Class java.lang.ArrayStoreException implements Serializable

Class java.lang.Boolean implements Serializable

Serialized Fields

value

boolean value
The value of the Boolean.

Class java.lang.Byte implements Serializable

Serialized Fields

value

byte value
The value of the Byte.

Class java.lang.Character implements Serializable

Serialized Fields

value

char value
The value of the Character.

Class java.lang.Class implements Serializable

Serialization Overview

Class Class is special cased within the Serialization Stream Protocol. A Class instance is written intially into an ObjectOutputStream in the following format:
      TC_CLASS ClassDescriptor
      A ClassDescriptor is a special cased serialization of
      a java.io.ObjectStreamClass instance.
A new handle is generated for the initial time the class descriptor is written into the stream. Future references to the class descriptor are written as references to the initial class descriptor instance.
See Also:
ObjectStreamClass
Serialized Fields

Class java.lang.ClassCastException implements Serializable

Class java.lang.ClassCircularityError implements Serializable

Class java.lang.ClassFormatError implements Serializable

Class java.lang.ClassNotFoundException implements Serializable

Serialized Fields

ex

Throwable ex
This field holds the exception ex if the ClassNotFoundException(String s, Throwable ex) constructor was used to instantiate the object
Since:
1.2

Class java.lang.CloneNotSupportedException implements Serializable

Class java.lang.Double implements Serializable

Serialized Fields

value

double value
The value of the Double.

Class java.lang.Error implements Serializable

Class java.lang.Exception implements Serializable

Class java.lang.ExceptionInInitializerError implements Serializable

Serialized Fields

exception

Throwable exception
This field holds the exception if the ExceptionInInitializerError(Throwable thrown) constructor was used to instantiate the object

Class java.lang.Float implements Serializable

Serialized Fields

value

float value
The value of the Float.

Class java.lang.IllegalAccessError implements Serializable

Class java.lang.IllegalAccessException implements Serializable

Class java.lang.IllegalArgumentException implements Serializable

Class java.lang.IllegalMonitorStateException implements Serializable

Class java.lang.IllegalStateException implements Serializable

Class java.lang.IllegalThreadStateException implements Serializable

Class java.lang.IncompatibleClassChangeError implements Serializable

Class java.lang.IndexOutOfBoundsException implements Serializable

Class java.lang.InstantiationError implements Serializable

Class java.lang.InstantiationException implements Serializable

Class java.lang.Integer implements Serializable

Serialized Fields

value

int value
The value of the Integer.

Class java.lang.InternalError implements Serializable

Class java.lang.InterruptedException implements Serializable

Class java.lang.LinkageError implements Serializable

Class java.lang.Long implements Serializable

Serialized Fields

value

long value
The value of the Long.

Class java.lang.NegativeArraySizeException implements Serializable

Class java.lang.NoClassDefFoundError implements Serializable

Class java.lang.NoSuchFieldError implements Serializable

Class java.lang.NoSuchFieldException implements Serializable

Class java.lang.NoSuchMethodError implements Serializable

Class java.lang.NoSuchMethodException implements Serializable

Class java.lang.NullPointerException implements Serializable

Class java.lang.Number implements Serializable

Class java.lang.NumberFormatException implements Serializable

Class java.lang.OutOfMemoryError implements Serializable

Class java.lang.RuntimeException implements Serializable

Class java.lang.RuntimePermission implements Serializable

Class java.lang.SecurityException implements Serializable

Class java.lang.Short implements Serializable

Serialized Fields

value

short value
The value of the Short.

Class java.lang.StackOverflowError implements Serializable

Class java.lang.String implements Serializable

Serialization Overview

Class String is special cased within the Serialization Stream Protocol. A String instance is written intially into an ObjectOutputStream in the following format:
      TC_STRING (utf String)
The String is written by method DataOutput.writeUTF. A new handle is generated to refer to all future references to the string instance within the stream.
Serialized Fields

Class java.lang.String.CaseInsensitiveComparator implements Serializable

Class java.lang.StringBuffer implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the StringBuffer from a stream.
Serialized Fields

value

char[] value
The value is used for character storage.

count

int count
The count is the number of characters in the buffer.

shared

boolean shared
A flag indicating whether the buffer is shared

Class java.lang.StringIndexOutOfBoundsException implements Serializable

Class java.lang.ThreadDeath implements Serializable

Class java.lang.Throwable implements Serializable

Serialized Fields

detailMessage

String detailMessage
Specific details about the Throwable. For example, for FileNotFoundThrowables, this contains the name of the file that could not be found.

Class java.lang.UnknownError implements Serializable

Class java.lang.UnsatisfiedLinkError implements Serializable

Class java.lang.UnsupportedClassVersionError implements Serializable

Class java.lang.UnsupportedOperationException implements Serializable

Class java.lang.VerifyError implements Serializable

Class java.lang.VirtualMachineError implements Serializable

Package java.lang.reflect

Class java.lang.reflect.InvocationTargetException implements Serializable

Serialized Fields

target

Throwable target
This field holds the target if the InvocationTargetException(Throwable target) constructor was used to instantiate the object

Class java.lang.reflect.Proxy implements Serializable

Serialized Fields

h

InvocationHandler h
the invocation handler for this proxy instance.

Class java.lang.reflect.ReflectPermission implements Serializable

Class java.lang.reflect.UndeclaredThrowableException implements Serializable

Serialized Fields

undeclaredThrowable

Throwable undeclaredThrowable
the undeclared checked exception that was thrown

Package java.math

Class java.math.BigDecimal implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the BigDecimal instance from a stream (that is, deserialize it).
Serialized Fields

intVal

BigInteger intVal
The unscaled value of this BigDecimal, as returned by unscaledValue().
See Also:
BigDecimal.unscaledValue()

scale

int scale
The scale of this BigDecimal, as returned by scale().
See Also:
BigDecimal.scale

Class java.math.BigInteger implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the BigInteger instance from a stream (that is, deserialize it). The magnitude is read in as an array of bytes for historical reasons, but it is converted to an array of ints and the byte array is discarded.
Serialized Fields

signum

int signum
The signum of this BigInteger: -1 for negative, 0 for zero, or 1 for positive. Note that the BigInteger zero must have a signum of 0. This is necessary to ensures that there is exactly one representation for each BigInteger value.

magnitude

byte[] magnitude
This field is required for historical reasons. The magnitude of a BigInteger used to be in a byte representation, and is still serialized that way. The mag field is used in all real computations but the magnitude field is required for storage.

bitCount

int bitCount
The bitCount of this BigInteger, as returned by bitCount(), or -1 (either value is acceptable).
See Also:
BigInteger.bitCount

bitLength

int bitLength
The bitLength of this BigInteger, as returned by bitLength(), or -1 (either value is acceptable).
See Also:
BigInteger.bitLength

lowestSetBit

int lowestSetBit
The lowest set bit of this BigInteger, as returned by getLowestSetBit(), or -2 (either value is acceptable).
See Also:
BigInteger.getLowestSetBit()

firstNonzeroByteNum

int firstNonzeroByteNum
The index of the lowest-order byte in the magnitude of this BigInteger that contains a nonzero byte, or -2 (either value is acceptable). The least significant byte has int-number 0, the next byte in order of increasing significance has byte-number 1, and so forth.

Package java.net

Class java.net.BindException implements Serializable

Class java.net.ConnectException implements Serializable

Class java.net.InetAddress implements Serializable

Serialized Fields

hostName

String hostName

address

int address

family

int family

Class java.net.MalformedURLException implements Serializable

Class java.net.NetPermission implements Serializable

Class java.net.NoRouteToHostException implements Serializable

Class java.net.ProtocolException implements Serializable

Class java.net.SocketException implements Serializable

Class java.net.SocketPermission implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the SocketPermission from a stream.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
WriteObject is called to save the state of the SocketPermission to a stream. The actions are serialized, and the superclass takes care of the name.
Serialized Fields

actions

String actions
the actions string.

Class java.net.SocketPermissionCollection implements Serializable

Serialized Fields

permissions

Vector permissions
The SocketPermissions for this set.

Class java.net.UnknownHostException implements Serializable

Class java.net.UnknownServiceException implements Serializable

Class java.net.URL implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the URL from the stream. It reads the components of the URL and finds the local stream handler.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
WriteObject is called to save the state of the URL to an ObjectOutputStream. The handler is not saved since it is specific to this system.
Serial Data:
the default write object value. When read back in, the reader must ensure that calling getURLStreamHandler with the protocol variable returns a valid URLStreamHandler and throw an IOException if it does not.
Serialized Fields

protocol

String protocol
The protocol to use (ftp, http, nntp, ... etc.) .

host

String host
The host name in which to connect to.

port

int port
The protocol port to connect to.

file

String file
The specified file name on that host.

authority

String authority
The authority part of this URL.

ref

String ref
# reference.

hashCode

int hashCode

Package java.rmi

Class java.rmi.AccessException implements Serializable

Class java.rmi.AlreadyBoundException implements Serializable

Class java.rmi.ConnectException implements Serializable

Class java.rmi.ConnectIOException implements Serializable

Class java.rmi.MarshalException implements Serializable

Class java.rmi.MarshalledObject implements Serializable

Serialized Fields

objBytes

byte[] objBytes
Bytes of serialized representation. If objBytes is null then the object marshalled was a null reference.

locBytes

byte[] locBytes
Bytes of location annotations, which are ignored by equals. If locBytes is null, there were no non-null annotations during marshalling.

hash

int hash
Stored hash code of contained object.
See Also:
MarshalledObject.hashCode()

Class java.rmi.NoSuchObjectException implements Serializable

Class java.rmi.NotBoundException implements Serializable

Class java.rmi.RemoteException implements Serializable

Serialized Fields

detail

Throwable detail
Nested Exception to hold wrapped remote exception.
Since:
JDK1.1

Class java.rmi.RMISecurityException implements Serializable

Class java.rmi.ServerError implements Serializable

Class java.rmi.ServerException implements Serializable

Class java.rmi.ServerRuntimeException implements Serializable

Class java.rmi.StubNotFoundException implements Serializable

Class java.rmi.UnexpectedException implements Serializable

Class java.rmi.UnknownHostException implements Serializable

Class java.rmi.UnmarshalException implements Serializable

Package java.rmi.activation

Class java.rmi.activation.Activatable implements Serializable

Serialized Fields

id

ActivationID id
Activation Identifier for this object.

Class java.rmi.activation.ActivateFailedException implements Serializable

Class java.rmi.activation.ActivationDesc implements Serializable

Serialized Fields

groupID

ActivationGroupID groupID
the group's identifier

className

String className
the object's class name

location

String location
the object's code location

data

MarshalledObject data
the object's initialization data

restart

boolean restart
indicates whether the object should be restarted

Class java.rmi.activation.ActivationException implements Serializable

Serialized Fields

detail

Throwable detail
Nested Exception to hold wrapped remote exceptions.

Class java.rmi.activation.ActivationGroup implements Serializable

Serialized Fields

groupID

ActivationGroupID groupID
the group's identifier

monitor

ActivationMonitor monitor
the group's monitor

incarnation

long incarnation
the group's incarnation number

Class java.rmi.activation.ActivationGroupDesc implements Serializable

Serialized Fields

className

String className
The group's fully package qualified class name.

location

String location
The location from where to load the group's class.

data

MarshalledObject data
The group's initialization data.

env

ActivationGroupDesc.CommandEnvironment env
The controlling options for executing the VM in another process.

props

Properties props
A properties map which will override those set by default in the subprocess environment.

Class java.rmi.activation.ActivationGroupDesc.CommandEnvironment implements Serializable

Serialized Fields

command

String command

options

String[] options

Class java.rmi.activation.ActivationGroupID implements Serializable

Serialized Fields

system

ActivationSystem system
The group's activation system.

uid

UID uid
The group's unique id.

Class java.rmi.activation.ActivationID implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
readObject for object serialization. Reads in a java.rmi.server.UID and a remote reference. The remote reference is read via a direct call to readExternal(ObjectInputStream in). Default serialization is not used. The reference is used to create the activator field in this object. That is, the activator field is set to the stub returned from RemoteProxy.getStub(activatorClassName, ref).

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException,
                         ClassNotFoundException
writeObject for object serialization. Writes out a java.rmi.server.UID and the reference to the activator responsible for activating the object associated with this id, the remote reference contained in the activator field.
Serial Data:
Writes out a java.rmi.server.UID, and the unqualified class name, in UTF-8, of the remote reference contained in the activator field. Delegates to the activator's remote reference to write itself to out. Directly calls writeExternal(ObjectStream out) on the return value of activator.getRef(). Default serialization is not used.
Serialized Fields

activator

Activator activator
the object's activator

uid

UID uid
the object's unique id

Class java.rmi.activation.UnknownGroupException implements Serializable

Class java.rmi.activation.UnknownObjectException implements Serializable

Package java.rmi.dgc

Class java.rmi.dgc.Lease implements Serializable

Serialized Fields

vmid

VMID vmid
Virtual Machine ID with which this Lease is associated.
See Also:
Lease.getVMID()

value

long value
Duration of this lease.
See Also:
Lease.getValue()

Class java.rmi.dgc.VMID implements Serializable

Serialized Fields

addr

byte[] addr
array of bytes uniquely identifying host created on

uid

UID uid
unique identifier with respect to host created on

Package java.rmi.server

Class java.rmi.server.ExportException implements Serializable

Class java.rmi.server.ObjID implements Serializable

Serialized Fields

objNum

long objNum
object number
See Also:
ObjID.hashCode()

space

UID space
address space identifier (unique to host)

Class java.rmi.server.ObjID.InsecureRandom implements Serializable

Serialized Fields

nextNum

long nextNum

Class java.rmi.server.RemoteObject implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
readObject for object serialization. Reads in the unqualified class name of the remote reference field, ref, in UTF-8 and delegates to the ref field to read in its representation. The ref field is read via a direct call to ref.readExternal(ObjectInputStream in). Default serialization is not used.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException,
                         ClassNotFoundException
writeObject for object serialization. Writes out the class name of the remote reference contained in this class and delegates to the reference to write out its representation.
Serial Data:
Writes out the unqualified class name of the remote reference field, ref, in UTF-8 and delegates to the ref field to write out its representation. Different information will be written to out depending upon the ref field's type. Default serialization is not used.

Class java.rmi.server.RemoteServer implements Serializable

Class java.rmi.server.RemoteStub implements Serializable

Class java.rmi.server.ServerCloneException implements Serializable

Serialized Fields

detail

Exception detail
Nested exception for ServerCloneException.
Since:
JDK1.1

Class java.rmi.server.ServerNotActiveException implements Serializable

Class java.rmi.server.SkeletonMismatchException implements Serializable

Class java.rmi.server.SkeletonNotFoundException implements Serializable

Class java.rmi.server.SocketSecurityException implements Serializable

Class java.rmi.server.UID implements Serializable

Serialized Fields

unique

int unique
Integer that helps create a unique UID.

time

long time
Long used to record the time. The time will be used to create a unique UID.

count

short count
Short used to create a hash key for this UID.

Class java.rmi.server.UnicastRemoteObject implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Re-export the remote object when it is deserialized.
Serialized Fields

port

int port
port number on which to export object

csf

RMIClientSocketFactory csf
client-side socket factory (if any)

ssf

RMIServerSocketFactory ssf
server-side socket factory (if any) to use when exporting object

Package java.security

Class java.security.AccessControlException implements Serializable

Serialized Fields

perm

Permission perm

Class java.security.AllPermission implements Serializable

Class java.security.AllPermissionCollection implements Serializable

Serialized Fields

all_allowed

boolean all_allowed

Class java.security.BasicPermission implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the BasicPermission from a stream.

Class java.security.BasicPermissionCollection implements Serializable

Serialized Fields

permissions

Hashtable permissions

all_allowed

boolean all_allowed

Class java.security.CodeSource implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream ois)
                 throws IOException,
                        ClassNotFoundException
Restores this object from a stream (i.e., deserializes it).

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException
Writes this object out to a stream (i.e., serializes it).
Serial Data:
An initial URL is followed by an int indicating the number of certificates to follow (a value of "zero" denotes that there are no certificates associated with this object). Each certificate is written out starting with a String denoting the certificate type, followed by an int specifying the length of the certificate encoding, followed by the certificate encoding itself which is written out as an array of bytes.
Serialized Fields

location

URL location
The code location.

Class java.security.DigestException implements Serializable

Class java.security.GeneralSecurityException implements Serializable

Class java.security.GuardedObject implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException
Writes this object out to a stream (i.e., serializes it). We check the guard if there is one.
Serialized Fields

object

Object object

guard

Guard guard

Class java.security.Identity implements Serializable

Serialized Fields

name

String name
Deprecated.
The name for this identity.

publicKey

PublicKey publicKey
Deprecated.
The public key for this identity.

info

String info
Deprecated.
Generic, descriptive information about the identity.

scope

IdentityScope scope
Deprecated.
The scope of the identity.

certificates

Vector certificates
Deprecated.
The certificates for this identity.

Class java.security.IdentityScope implements Serializable

Class java.security.InvalidAlgorithmParameterException implements Serializable

Class java.security.InvalidKeyException implements Serializable

Class java.security.InvalidParameterException implements Serializable

Class java.security.KeyException implements Serializable

Class java.security.KeyManagementException implements Serializable

Class java.security.KeyPair implements Serializable

Serialized Fields

privateKey

PrivateKey privateKey

publicKey

PublicKey publicKey

Class java.security.KeyStoreException implements Serializable

Class java.security.NoSuchAlgorithmException implements Serializable

Class java.security.NoSuchProviderException implements Serializable

Class java.security.Permission implements Serializable

Serialized Fields

name

String name

Class java.security.PermissionCollection implements Serializable

Serialized Fields

readOnly

boolean readOnly

Class java.security.Permissions implements Serializable

Serialized Fields

perms

Hashtable perms

allPermission

PermissionCollection allPermission

Class java.security.PermissionsHash implements Serializable

Serialized Fields

perms

Hashtable perms

Class java.security.PrivilegedActionException implements Serializable

Serialized Fields

exception

Exception exception

Class java.security.Provider implements Serializable

Serialized Fields

name

String name
The provider name.

info

String info
A description of the provider and its services.

version

double version
The provider version number.

Class java.security.ProviderException implements Serializable

Class java.security.SecureRandom implements Serializable

Serialized Fields

provider

Provider provider
The provider.
Since:
1.2

secureRandomSpi

SecureRandomSpi secureRandomSpi
The provider implementation.
Since:
1.2

state

byte[] state

digest

MessageDigest digest

randomBytes

byte[] randomBytes
We know that the MessageDigest class does not implement java.io.Serializable. However, since this field is no longer used, it will always be NULL and won't affect the serialization of the SecureRandom class itself.

randomBytesUsed

int randomBytesUsed

counter

long counter

Class java.security.SecureRandomSpi implements Serializable

Class java.security.SecurityPermission implements Serializable

Class java.security.SignatureException implements Serializable

Class java.security.SignedObject implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the SignedObject from a stream.
Serialized Fields

content

byte[] content

signature

byte[] signature

thealgorithm

String thealgorithm

Class java.security.Signer implements Serializable

Serialized Fields

privateKey

PrivateKey privateKey
Deprecated.
The signer's private key.

Class java.security.UnrecoverableKeyException implements Serializable

Class java.security.UnresolvedPermission implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream ois)
                 throws IOException,
                        ClassNotFoundException
Restores this object from a stream (i.e., deserializes it).

writeObject

private void writeObject(ObjectOutputStream oos)
                  throws IOException
Writes this object out to a stream (i.e., serializes it).
Serial Data:
An initial String denoting the type is followed by a String denoting the name is followed by a String denoting the actions is followed by an int indicating the number of certificates to follow (a value of "zero" denotes that there are no certificates associated with this object). Each certificate is written out starting with a String denoting the certificate type, followed by an int specifying the length of the certificate encoding, followed by the certificate encoding itself which is written out as an array of bytes.
Serialized Fields

type

String type
The class name of the Permission class that will be created when this unresolved permission is resolved.

name

String name
The permission name.

actions

String actions
The actions of the permission.

Class java.security.UnresolvedPermissionCollection implements Serializable

Serialized Fields

permissions

Hashtable permissions

Package java.security.acl

Class java.security.acl.AclNotFoundException implements Serializable

Class java.security.acl.LastOwnerException implements Serializable

Class java.security.acl.NotOwnerException implements Serializable

Package java.security.cert

Class java.security.cert.Certificate implements Serializable

Serialized Fields

type

String type

Class java.security.cert.Certificate.CertificateRep implements Serializable

Serialized Fields

type

String type

data

byte[] data

Class java.security.cert.CertificateEncodingException implements Serializable

Class java.security.cert.CertificateException implements Serializable

Class java.security.cert.CertificateExpiredException implements Serializable

Class java.security.cert.CertificateNotYetValidException implements Serializable

Class java.security.cert.CertificateParsingException implements Serializable

Class java.security.cert.CRLException implements Serializable

Class java.security.cert.X509Certificate implements Serializable

Package java.security.spec

Class java.security.spec.InvalidKeySpecException implements Serializable

Class java.security.spec.InvalidParameterSpecException implements Serializable

Package java.sql

Class java.sql.BatchUpdateException implements Serializable

Serialized Fields

updateCounts

int[] updateCounts
The array that describes the outcome of a batch execution.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

Class java.sql.DataTruncation implements Serializable

Serialized Fields

index

int index

parameter

boolean parameter

read

boolean read

dataSize

int dataSize

transferSize

int transferSize

Class java.sql.Date implements Serializable

Class java.sql.SQLException implements Serializable

Serialized Fields

SQLState

String SQLState

vendorCode

int vendorCode

next

SQLException next

Class java.sql.SQLPermission implements Serializable

Class java.sql.SQLWarning implements Serializable

Class java.sql.Time implements Serializable

Class java.sql.Timestamp implements Serializable

Serialized Fields

nanos

int nanos

Package java.text

Class java.text.AttributedCharacterIterator.Attribute implements Serializable

Serialized Fields

name

String name
The name of this Attribute. The name is used primarily by readResolve to look up the corresponding predefined instance when deserializing an instance.

Class java.text.ChoiceFormat implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
After reading an object from the input stream, do a simple verification to maintain class invariants.
Serialized Fields

choiceLimits

double[] choiceLimits
A list of lower bounds for the choices. The formatter will return choiceFormats[i] if the number being formatted is greater than or equal to choiceLimits[i] and less than choiceLimits[i+1].

choiceFormats

String[] choiceFormats
A list of choice strings. The formatter will return choiceFormats[i] if the number being formatted is greater than or equal to choiceLimits[i] and less than choiceLimits[i+1].

Class java.text.DateFormat implements Serializable

Serialized Fields

calendar

Calendar calendar
The calendar that DateFormat uses to produce the time field values needed to implement date and time formatting. Subclasses should initialize this to a calendar appropriate for the locale associated with this DateFormat.

numberFormat

NumberFormat numberFormat
The number formatter that DateFormat uses to format numbers in dates and times. Subclasses should initialize this to a number format appropriate for the locale associated with this DateFormat.

Class java.text.DateFormatSymbols implements Serializable

Serialized Fields

eras

String[] eras
Era strings. For example: "AD" and "BC". An array of 2 strings, indexed by Calendar.BC and Calendar.AD.

months

String[] months
Month strings. For example: "January", "February", etc. An array of 13 strings (some calendars have 13 months), indexed by Calendar.JANUARY, Calendar.FEBRUARY, etc.

shortMonths

String[] shortMonths
Short month strings. For example: "Jan", "Feb", etc. An array of 13 strings (some calendars have 13 months), indexed by Calendar.JANUARY, Calendar.FEBRUARY, etc.

weekdays

String[] weekdays
Weekday strings. For example: "Sunday", "Monday", etc. An array of 8 strings, indexed by Calendar.SUNDAY, Calendar.MONDAY, etc. The element weekdays[0] is ignored.

shortWeekdays

String[] shortWeekdays
Short weekday strings. For example: "Sun", "Mon", etc. An array of 8 strings, indexed by Calendar.SUNDAY, Calendar.MONDAY, etc. The element shortWeekdays[0] is ignored.

ampms

String[] ampms
AM and PM strings. For example: "AM" and "PM". An array of 2 strings, indexed by Calendar.AM and Calendar.PM.

zoneStrings

String[][] zoneStrings
Localized names of time zones in this locale. This is a two-dimensional array of strings of size n by m, where m is at least 5. Each of the n rows is an entry containing the localized names for a single TimeZone. Each such row contains (with i ranging from 0..n-1):
  • zoneStrings[i][0] - time zone ID
  • zoneStrings[i][1] - long name of zone in standard time
  • zoneStrings[i][2] - short name of zone in standard time
  • zoneStrings[i][3] - long name of zone in daylight savings time
  • zoneStrings[i][4] - short name of zone in daylight savings time
The zone ID is not localized; it corresponds to the ID value associated with a system time zone object. All other entries are localized names. If a zone does not implement daylight savings time, the daylight savings time names are ignored.
See Also:
java.text.resources.DateFormatZoneData, TimeZone

localPatternChars

String localPatternChars
Localized date-time pattern characters. For example, a locale may wish to use 'u' rather than 'y' to represent years in its date format pattern strings. This string must be exactly 18 characters long, with the index of the characters described by DateFormat.ERA_FIELD, DateFormat.YEAR_FIELD, etc. Thus, if the string were "Xz...", then localized patterns would use 'X' for era and 'z' for year.

Class java.text.DecimalFormat implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
First, read the default serializable fields from the stream. Then if serialVersionOnStream is less than 1, indicating that the stream was written by JDK 1.1, initialize useExponentialNotation to false, since it was not present in JDK 1.1. Finally, set serialVersionOnStream back to the maximum allowed value so that default serialization will work properly if this object is streamed out again.

If the minimum or maximum integer digit count is larger than DOUBLE_INTEGER_DIGITS or if the minimum or maximum fraction digit count is larger than DOUBLE_FRACTION_DIGITS, then the stream data is invalid and this method throws an InvalidObjectException.

Stream versions older than 2 will not have the affix pattern variables posPrefixPattern etc. As a result, they will be initialized to null, which means the affix strings will be taken as literal values. This is exactly what we want, since that corresponds to the pre-version-2 behavior.

Serialized Fields

positivePrefix

String positivePrefix
The symbol used as a prefix when formatting positive numbers, e.g. "+".
See Also:
DecimalFormat.getPositivePrefix()

positiveSuffix

String positiveSuffix
The symbol used as a suffix when formatting positive numbers. This is often an empty string.
See Also:
DecimalFormat.getPositiveSuffix()

negativePrefix

String negativePrefix
The symbol used as a prefix when formatting negative numbers, e.g. "-".
See Also:
DecimalFormat.getNegativePrefix()

negativeSuffix

String negativeSuffix
The symbol used as a suffix when formatting negative numbers. This is often an empty string.
See Also:
DecimalFormat.getNegativeSuffix()

posPrefixPattern

String posPrefixPattern
The prefix pattern for non-negative numbers. This variable corresponds to positivePrefix.

This pattern is expanded by the method expandAffix() to positivePrefix to update the latter to reflect changes in symbols. If this variable is null then positivePrefix is taken as a literal value that does not change when symbols changes. This variable is always null for DecimalFormat objects older than stream version 2 restored from stream.

See Also:
DecimalFormat.positivePrefix, DecimalFormat.expandAffix(java.lang.String, java.lang.StringBuffer)
Since:
1.3

posSuffixPattern

String posSuffixPattern
The suffix pattern for non-negative numbers. This variable corresponds to positiveSuffix. This variable is analogous to posPrefixPattern; see that variable for further documentation.
See Also:
DecimalFormat.positiveSuffix, DecimalFormat.posPrefixPattern
Since:
1.3

negPrefixPattern

String negPrefixPattern
The prefix pattern for negative numbers. This variable corresponds to negativePrefix. This variable is analogous to posPrefixPattern; see that variable for further documentation.
See Also:
DecimalFormat.negativePrefix, DecimalFormat.posPrefixPattern
Since:
1.3

negSuffixPattern

String negSuffixPattern
The suffix pattern for negative numbers. This variable corresponds to negativeSuffix. This variable is analogous to posPrefixPattern; see that variable for further documentation.
See Also:
DecimalFormat.negativeSuffix, DecimalFormat.posPrefixPattern
Since:
1.3

multiplier

int multiplier
The multiplier for use in percent, permill, etc.
See Also:
DecimalFormat.getMultiplier()

groupingSize

byte groupingSize
The number of digits between grouping separators in the integer portion of a number. Must be greater than 0 if NumberFormat.groupingUsed is true.
See Also:
DecimalFormat.getGroupingSize(), NumberFormat.isGroupingUsed()

decimalSeparatorAlwaysShown

boolean decimalSeparatorAlwaysShown
If true, forces the decimal separator to always appear in a formatted number, even if the fractional part of the number is zero.
See Also:
DecimalFormat.isDecimalSeparatorAlwaysShown()

symbols

DecimalFormatSymbols symbols
The DecimalFormatSymbols object used by this format. It contains the symbols used to format numbers, e.g. the grouping separator, decimal separator, and so on.
See Also:
DecimalFormat.setDecimalFormatSymbols(java.text.DecimalFormatSymbols), DecimalFormatSymbols

useExponentialNotation

boolean useExponentialNotation
True to force the use of exponential (i.e. scientific) notation when formatting numbers.
Since:
1.2

minExponentDigits

byte minExponentDigits
The minimum number of digits used to display the exponent when a number is formatted in exponential notation. This field is ignored if useExponentialNotation is not true.
Since:
1.2

serialVersionOnStream

int serialVersionOnStream
The internal serial version which says which version was written Possible values are:
  • 0 (default): versions before the Java 2 platform v1.2
  • 1: version for 1.2, which includes the two new fields useExponentialNotation and minExponentDigits.
  • 2: version for 1.3 and later, which adds four new fields: posPrefixPattern, posSuffixPattern, negPrefixPattern, and negSuffixPattern.
Since:
1.2

Class java.text.DecimalFormatSymbols implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Read the default serializable fields, then if serialVersionOnStream is less than 1, initialize monetarySeparator to be the same as decimalSeparator and exponential to be 'E'. Finally, set serialVersionOnStream back to the maximum allowed value so that default serialization will work properly if this object is streamed out again.
Since:
JDK 1.1.6
Serialized Fields

zeroDigit

char zeroDigit
Character used for zero.
See Also:
DecimalFormatSymbols.getZeroDigit()

groupingSeparator

char groupingSeparator
Character used for thousands separator.
See Also:
DecimalFormatSymbols.getGroupingSeparator()

decimalSeparator

char decimalSeparator
Character used for decimal sign.
See Also:
DecimalFormatSymbols.getDecimalSeparator()

perMill

char perMill
Character used for mille percent sign.
See Also:
DecimalFormatSymbols.getPerMill()

percent

char percent
Character used for percent sign.
See Also:
DecimalFormatSymbols.getPercent()

digit

char digit
Character used for a digit in a pattern.
See Also:
DecimalFormatSymbols.getDigit()

patternSeparator

char patternSeparator
Character used to separate positive and negative subpatterns in a pattern.
See Also:
DecimalFormatSymbols.getPatternSeparator()

infinity

String infinity
Character used to represent infinity.
See Also:
DecimalFormatSymbols.getInfinity()

NaN

String NaN
Character used to represent NaN.
See Also:
DecimalFormatSymbols.getNaN()

minusSign

char minusSign
Character used to represent minus sign.
See Also:
DecimalFormatSymbols.getMinusSign()

currencySymbol

String currencySymbol
String denoting the local currency, e.g. "$".
See Also:
DecimalFormatSymbols.getCurrencySymbol()

intlCurrencySymbol

String intlCurrencySymbol
International string denoting the local currency, e.g. "USD".
See Also:
DecimalFormatSymbols.getInternationalCurrencySymbol()

monetarySeparator

char monetarySeparator
The decimal separator used when formatting currency values.
See Also:
DecimalFormatSymbols.getMonetaryDecimalSeparator()
Since:
JDK 1.1.6

exponential

char exponential
The character used to distinguish the exponent in a number formatted in exponential notation, e.g. 'E' for a number such as "1.23E45".

Note that the public API provides no way to set this field, even though it is supported by the implementation and the stream format. The intent is that this will be added to the API in the future.

Since:
JDK 1.1.6

serialVersionOnStream

int serialVersionOnStream
Describes the version of DecimalFormatSymbols present on the stream. Possible values are:
  • 0 (or uninitialized): versions prior to JDK 1.1.6.
  • 1: Versions written by JDK 1.1.6 or later, which includes two new fields: monetarySeparator and exponential.
When streaming out a DecimalFormatSymbols, the most recent format (corresponding to the highest allowable serialVersionOnStream) is always written.
Since:
JDK 1.1.6

Class java.text.Format implements Serializable

Class java.text.MessageFormat implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
After reading an object from the input stream, do a simple verification to maintain class invariants.
Serialized Fields

locale

Locale locale
The locale to use for formatting numbers and dates.

pattern

String pattern
The string that the formatted values are to be plugged into. In other words, this is the pattern supplied on construction with all of the {} expressions taken out.

formats

Format[] formats
An array of ten formatters, which are used to format the first ten arguments.

offsets

int[] offsets
The positions where the results of formatting each argument are to be inserted into the pattern.

argumentNumbers

int[] argumentNumbers
The argument numbers corresponding to each formatter. (The formatters are stored in the order they occur in the pattern, not in the order in which the arguments are specified.)

maxOffset

int maxOffset
One less than the number of entries in offsets. Can also be thought of as the index of the highest-numbered element in offsets that is being used. All of these arrays should have the same number of elements being used as offsets does, and so this variable suffices to tell us how many entries are in all of them.

Class java.text.NumberFormat implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
First, read in the default serializable data. Then, if serialVersionOnStream is less than 1, indicating that the stream was written by JDK 1.1, set the int fields such as maximumIntegerDigits to be equal to the byte fields such as maxIntegerDigits, since the int fields were not present in JDK 1.1. Finally, set serialVersionOnStream back to the maximum allowed value so that default serialization will work properly if this object is streamed out again.

If minimumIntegerDigits is greater than maximumIntegerDigits or minimumFractionDigits is greater than maximumFractionDigits, then the stream data is invalid and this method throws an InvalidObjectException. In addition, if any of these values is negative, then this method throws an InvalidObjectException.

Since:
1.2

writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Write out the default serializable data, after first setting the byte fields such as maxIntegerDigits to be equal to the int fields such as maximumIntegerDigits (or to Byte.MAX_VALUE, whichever is smaller), for compatibility with the JDK 1.1 version of the stream format.
Since:
1.2
Serialized Fields

groupingUsed

boolean groupingUsed
True if the the grouping (i.e. thousands) separator is used when formatting and parsing numbers.
See Also:
NumberFormat.isGroupingUsed()

maxIntegerDigits

byte maxIntegerDigits
The maximum number of digits allowed in the integer portion of a number. maxIntegerDigits must be greater than or equal to minIntegerDigits.

Note: This field exists only for serialization compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new int field maximumIntegerDigits is used instead. When writing to a stream, maxIntegerDigits is set to maximumIntegerDigits or Byte.MAX_VALUE, whichever is smaller. When reading from a stream, this field is used only if serialVersionOnStream is less than 1.

See Also:
NumberFormat.getMaximumIntegerDigits()

minIntegerDigits

byte minIntegerDigits
The minimum number of digits allowed in the integer portion of a number. minimumIntegerDigits must be less than or equal to maximumIntegerDigits.

Note: This field exists only for serialization compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new int field minimumIntegerDigits is used instead. When writing to a stream, minIntegerDigits is set to minimumIntegerDigits or Byte.MAX_VALUE, whichever is smaller. When reading from a stream, this field is used only if serialVersionOnStream is less than 1.

See Also:
NumberFormat.getMinimumIntegerDigits()

maxFractionDigits

byte maxFractionDigits
The maximum number of digits allowed in the fractional portion of a number. maximumFractionDigits must be greater than or equal to minimumFractionDigits.

Note: This field exists only for serialization compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new int field maximumFractionDigits is used instead. When writing to a stream, maxFractionDigits is set to maximumFractionDigits or Byte.MAX_VALUE, whichever is smaller. When reading from a stream, this field is used only if serialVersionOnStream is less than 1.

See Also:
NumberFormat.getMaximumFractionDigits()

minFractionDigits

byte minFractionDigits
The minimum number of digits allowed in the fractional portion of a number. minimumFractionDigits must be less than or equal to maximumFractionDigits.

Note: This field exists only for serialization compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new int field minimumFractionDigits is used instead. When writing to a stream, minFractionDigits is set to minimumFractionDigits or Byte.MAX_VALUE, whichever is smaller. When reading from a stream, this field is used only if serialVersionOnStream is less than 1.

See Also:
NumberFormat.getMinimumFractionDigits()

parseIntegerOnly

boolean parseIntegerOnly
True if this format will parse numbers as integers only.
See Also:
NumberFormat.isParseIntegerOnly()

maximumIntegerDigits

int maximumIntegerDigits
The maximum number of digits allowed in the integer portion of a number. maximumIntegerDigits must be greater than or equal to minimumIntegerDigits.
See Also:
NumberFormat.getMaximumIntegerDigits()
Since:
1.2

minimumIntegerDigits

int minimumIntegerDigits
The minimum number of digits allowed in the integer portion of a number. minimumIntegerDigits must be less than or equal to maximumIntegerDigits.
See Also:
NumberFormat.getMinimumIntegerDigits()
Since:
1.2

maximumFractionDigits

int maximumFractionDigits
The maximum number of digits allowed in the fractional portion of a number. maximumFractionDigits must be greater than or equal to minimumFractionDigits.
See Also:
NumberFormat.getMaximumFractionDigits()
Since:
1.2

minimumFractionDigits

int minimumFractionDigits
The minimum number of digits allowed in the fractional portion of a number. minimumFractionDigits must be less than or equal to maximumFractionDigits.
See Also:
NumberFormat.getMinimumFractionDigits()
Since:
1.2

serialVersionOnStream

int serialVersionOnStream
Describes the version of NumberFormat present on the stream. Possible values are:
  • 0 (or uninitialized): the JDK 1.1 version of the stream format. In this version, the int fields such as maximumIntegerDigits were not present, and the byte fields such as maxIntegerDigits are used instead.
  • 1: the 1.2 version of the stream format. The values of the byte fields such as maxIntegerDigits are ignored, and the int fields such as maximumIntegerDigits are used instead.
When streaming out a NumberFormat, the most recent format (corresponding to the highest allowable serialVersionOnStream) is always written.
Since:
1.2

Class java.text.ParseException implements Serializable

Serialized Fields

errorOffset

int errorOffset
The zero-based character offset into the string being parsed at which the error was found during parsing.

Class java.text.SimpleDateFormat implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Override readObject.
Serialized Fields

serialVersionOnStream

int serialVersionOnStream
The version of the serialized data on the stream. Possible values:
  • 0 or not present on stream: JDK 1.1.3. This version has no defaultCenturyStart on stream.
  • 1 JDK 1.1.4 or later. This version adds defaultCenturyStart.
When streaming out this class, the most recent format and the highest allowable serialVersionOnStream is written.
Since:
JDK1.1.4

pattern

String pattern
The pattern string of this formatter. This is always a non-localized pattern. May not be null. See class documentation for details.

formatData

DateFormatSymbols formatData
The symbols used by this formatter for week names, month names, etc. May not be null.
See Also:
DateFormatSymbols

defaultCenturyStart

Date defaultCenturyStart
We map dates with two-digit years into the century starting at defaultCenturyStart, which may be any date. May not be null.
Since:
JDK1.1.4

Package java.util

Class java.util.ArrayList implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the ArrayList instance from a stream (that is, deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of the ArrayList instance to a stream (that is, serialize it).
Serial Data:
The length of the array backing the ArrayList instance is emitted (int), followed by all of its elements (each an Object) in the proper order.
Serialized Fields

size

int size
The size of the ArrayList (the number of elements it contains).

Class java.util.Arrays.ArrayList implements Serializable

Serialized Fields

a

Object[] a

Class java.util.BitSet implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
This override of readObject makes sure unitsInUse is set properly when deserializing a bitset
Serialized Fields

bits

long[] bits
The bits in this BitSet. The ith bit is stored in bits[i/64] at bit position i % 64 (where bit position 0 refers to the least significant bit and 63 refers to the most significant bit). INVARIANT: The words in bits[] above unitInUse-1 are zero.

Class java.util.Calendar implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Reconstitute this object from a stream (i.e., deserialize it).

writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Save the state of this object to a stream (i.e., serialize it). Ideally, Calendar would only write out its state data and the current time, and not write any field data out, such as fields[], isTimeSet, areFieldsSet, and isSet[]. nextStamp also should not be part of the persistent state. Unfortunately, this didn't happen before JDK 1.1 shipped. To be compatible with JDK 1.1, we will always have to write out the field values and state flags. However, nextStamp can be removed from the serialization stream; this will probably happen in the near future.
Serialized Fields

fields

int[] fields
The field values for the currently set time for this calendar. This is an array of FIELD_COUNT integers, with index values ERA through DST_OFFSET.

isSet

boolean[] isSet
The flags which tell if a specified time field for the calendar is set. A new object has no fields set. After the first call to a method which generates the fields, they all remain set after that. This is an array of FIELD_COUNT booleans, with index values ERA through DST_OFFSET.

time

long time
The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
See Also:
Calendar.isTimeSet

isTimeSet

boolean isTimeSet
True if then the value of time is valid. The time is made invalid by a change to an item of field[].
See Also:
Calendar.time

areFieldsSet

boolean areFieldsSet
True if fields[] are in sync with the currently set time. If false, then the next attempt to get the value of a field will force a recomputation of all fields from the current value of time.

lenient

boolean lenient
True if this calendar allows out-of-range field values during computation of time from fields[].
See Also:
Calendar.setLenient(boolean)

zone

TimeZone zone
The TimeZone used by this calendar. Calendar uses the time zone data to translate between locale and GMT time.

firstDayOfWeek

int firstDayOfWeek
The first day of the week, with possible values SUNDAY, MONDAY, etc. This is a locale-dependent value.

minimalDaysInFirstWeek

int minimalDaysInFirstWeek
The number of days required for the first week in a month or year, with possible values from 1 to 7. This is a locale-dependent value.

nextStamp

int nextStamp
The next available value for stamp[], an internal array. This actually should not be written out to the stream, and will probably be removed from the stream in the near future. In the meantime, a value of MINIMUM_USER_STAMP should be used.

serialVersionOnStream

int serialVersionOnStream
The version of the serialized data on the stream. Possible values:
0 or not present on stream
JDK 1.1.5 or earlier.
1
JDK 1.1.6 or later. Writes a correct 'time' value as well as compatible values for other fields. This is a transitional format.
When streaming out this class, the most recent format and the highest allowable serialVersionOnStream is written.
Since:
JDK1.1.6

Class java.util.Collections.CopiesList implements Serializable

Serialized Fields

n

int n

element

Object element

Class java.util.Collections.EmptyList implements Serializable

Class java.util.Collections.EmptyMap implements Serializable

Class java.util.Collections.EmptySet implements Serializable

Class java.util.Collections.ReverseComparator implements Serializable

Class java.util.Collections.SingletonList implements Serializable

Serialized Fields

element

Object element

Class java.util.Collections.SingletonMap implements Serializable

Serialized Fields

k

Object k

v

Object v

Class java.util.Collections.SingletonSet implements Serializable

Serialized Fields

element

Object element

Class java.util.Collections.SynchronizedCollection implements Serializable

Serialized Fields

c

Collection c

mutex

Object mutex

Class java.util.Collections.SynchronizedList implements Serializable

Serialized Fields

list

List list

Class java.util.Collections.SynchronizedMap implements Serializable

Serialized Fields

m

Map m

mutex

Object mutex

Class java.util.Collections.SynchronizedSet implements Serializable

Class java.util.Collections.SynchronizedSortedMap implements Serializable

Serialized Fields

sm

SortedMap sm

Class java.util.Collections.SynchronizedSortedSet implements Serializable

Serialized Fields

ss

SortedSet ss

Class java.util.Collections.UnmodifiableCollection implements Serializable

Serialized Fields

c

Collection c

Class java.util.Collections.UnmodifiableList implements Serializable

Serialized Fields

list

List list

Class java.util.Collections.UnmodifiableMap implements Serializable

Serialized Fields

m

Map m

Class java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet implements Serializable

Class java.util.Collections.UnmodifiableSet implements Serializable

Class java.util.Collections.UnmodifiableSortedMap implements Serializable

Serialized Fields

sm

SortedMap sm

Class java.util.Collections.UnmodifiableSortedSet implements Serializable

Serialized Fields

ss

SortedSet ss

Class java.util.ConcurrentModificationException implements Serializable

Class java.util.Date implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute this object from a stream (i.e., deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of this object to a stream (i.e., serialize it).
Serial Data:
The value returned by getTime() is emitted (long). This represents the offset from January 1, 1970, 00:00:00 GMT in milliseconds.

Class java.util.EmptyStackException implements Serializable

Class java.util.EventObject implements Serializable

Class java.util.GregorianCalendar implements Serializable

Serialized Fields

gregorianCutover

long gregorianCutover
The point at which the Gregorian calendar rules are used, measured in milliseconds from the standard epoch. Default is October 15, 1582 (Gregorian) 00:00:00 UTC or -12219292800000L. For this value, October 4, 1582 (Julian) is followed by October 15, 1582 (Gregorian). This corresponds to Julian day number 2299161.

Class java.util.HashMap implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the HashMap instance from a stream (i.e., deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of the HashMap instance to a stream (i.e., serialize it).
Serial Data:
The capacity of the HashMap (the length of the bucket array) is emitted (int), followed by the size of the HashMap (the number of key-value mappings), followed by the key (Object) and value (Object) for each key-value mapping represented by the HashMap The key-value mappings are emitted in no particular order.
Serialized Fields

threshold

int threshold
The table is rehashed when its size exceeds this threshold. (The value of this field is (int)(capacity * loadFactor).)

loadFactor

float loadFactor
The load factor for the hashtable.

Class java.util.HashSet implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the HashSet instance from a stream (that is, deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of this HashSet instance to a stream (that is, serialize this set).
Serial Data:
The capacity of the backing HashMap instance (int), and its load factor (float) are emitted, followed by the size of the set (the number of elements it contains) (int), followed by all of its elements (each an Object) in no particular order.

Class java.util.Hashtable implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the Hashtable from a stream (i.e., deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of the Hashtable to a stream (i.e., serialize it).
Serial Data:
The capacity of the Hashtable (the length of the bucket array) is emitted (int), followed by the size of the Hashtable (the number of key-value mappings), followed by the key (Object) and value (Object) for each key-value mapping represented by the Hashtable The key-value mappings are emitted in no particular order.
Serialized Fields

threshold

int threshold
The table is rehashed when its size exceeds this threshold. (The value of this field is (int)(capacity * loadFactor).)

loadFactor

float loadFactor
The load factor for the hashtable.

Class java.util.LinkedList implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute this LinkedList instance from a stream (that is deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of this LinkedList instance to a stream (that is, serialize it).
Serial Data:
The size of the list (the number of elements it contains) is emitted (int), followed by all of its elements (each an Object) in the proper order.

Class java.util.Locale implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Serial Data:
The first three fields are three String objects: the first is a 2-letter ISO 639 code representing the locale's language, the second is a 2-letter ISO 3166 code representing the locale's region or country, and the third is an optional chain of variant codes defined by this library. Any of the fields may be the empty string. The fourth field is an intrepresenting the locale's hash code, but is ignored by readObject(). Whatever this field's value, the hash code is initialized to -1, a sentinel value that indicates the hash code must be recomputed.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Serial Data:
The first three fields are three String objects: the first is a 2-letter ISO 639 code representing the locale's language, the second is a 2-letter ISO 3166 code representing the locale's region or country, and the third is an optional chain of variant codes defined by this library. Any of the fields may be the empty string. The fourth field is an int whose value is always -1. This is a sentinel value indicating the Locale's hash code must be recomputed.
Serialized Fields

language

String language
See Also:
Locale.getLanguage()

country

String country
See Also:
Locale.getCountry()

variant

String variant
See Also:
Locale.getVariant()

hashcode

int hashcode
Placeholder for the object's hash code. Always -1.

Class java.util.MissingResourceException implements Serializable

Serialized Fields

className

String className
The class name of the resource bundle requested by the user.

key

String key
The name of the specific resource requested by the user.

Class java.util.NoSuchElementException implements Serializable

Class java.util.Properties implements Serializable

Serialized Fields

defaults

Properties defaults
A property list that contains default values for any keys not found in this property list.

Class java.util.PropertyPermission implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
readObject is called to restore the state of the PropertyPermission from a stream.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
WriteObject is called to save the state of the PropertyPermission to a stream. The actions are serialized, and the superclass takes care of the name.
Serialized Fields

actions

String actions
The actions string.

Class java.util.PropertyPermissionCollection implements Serializable

Serialized Fields

permissions

Hashtable permissions
Table of permissions.

all_allowed

boolean all_allowed
Boolean saying if "*" is in the collection.

Class java.util.Random implements Serializable

Serialized Fields

seed

long seed
The internal state associated with this pseudorandom number generator. (The specs for the methods in this class describe the ongoing computation of this value.)

nextNextGaussian

double nextNextGaussian

haveNextNextGaussian

boolean haveNextNextGaussian

Class java.util.SimpleTimeZone implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Reconstitute this object from a stream (i.e., deserialize it). We handle both JDK 1.1 binary formats and full formats with a packed byte array.

writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Save the state of this object to a stream (i.e., serialize it).
Serial Data:
We write out two formats, a JDK 1.1 compatible format, using DOW_IN_MONTH_MODE rules, in the required section, followed by the full rules, in packed format, in the optional section. The optional section will be ignored by JDK 1.1 code upon stream in.

Contents of the optional section: The length of a byte array is emitted (int); this is 4 as of this release. The byte array of the given length is emitted. The contents of the byte array are the true values of the fields startDay, startDayOfWeek, endDay, and endDayOfWeek. The values of these fields in the required section are approximate values suited to the rule mode DOW_IN_MONTH_MODE, which is the only mode recognized by JDK 1.1.

Serialized Fields

startMonth

int startMonth
The month in which daylight savings time starts. This value must be between Calendar.JANUARY and Calendar.DECEMBER inclusive. This value must not equal endMonth.

If useDaylight is false, this value is ignored.

startDay

int startDay
This field has two possible interpretations:
startMode == DOW_IN_MONTH
startDay indicates the day of the month of startMonth on which daylight savings time starts, from 1 to 28, 30, or 31, depending on the startMonth.
startMode != DOW_IN_MONTH
startDay indicates which startDayOfWeek in th month startMonth daylight savings time starts on. For example, a value of +1 and a startDayOfWeek of Calendar.SUNDAY indicates the first Sunday of startMonth. Likewise, +2 would indicate the second Sunday, and -1 the last Sunday. A value of 0 is illegal.

If useDaylight is false, this value is ignored.

startDayOfWeek

int startDayOfWeek
The day of the week on which daylight savings time starts. This value must be between Calendar.SUNDAY and Calendar.SATURDAY inclusive.

If useDaylight is false or startMode == DAY_OF_MONTH, this value is ignored.

startTime

int startTime
The time in milliseconds after midnight at which daylight savings time starts. This value is expressed as wall time, standard time, or UTC time, depending on the setting of startTimeMode.

If useDaylight is false, this value is ignored.

startTimeMode

int startTimeMode
The format of startTime, either WALL_TIME, STANDARD_TIME, or UTC_TIME.
Since:
JDK 1.3

endMonth

int endMonth
The month in which daylight savings time ends. This value must be between Calendar.JANUARY and Calendar.UNDECIMBER. This value must not equal startMonth.

If useDaylight is false, this value is ignored.

endDay

int endDay
This field has two possible interpretations:
endMode == DOW_IN_MONTH
endDay indicates the day of the month of endMonth on which daylight savings time ends, from 1 to 28, 30, or 31, depending on the endMonth.
endMode != DOW_IN_MONTH
endDay indicates which endDayOfWeek in th month endMonth daylight savings time ends on. For example, a value of +1 and a endDayOfWeek of Calendar.SUNDAY indicates the first Sunday of endMonth. Likewise, +2 would indicate the second Sunday, and -1 the last Sunday. A value of 0 is illegal.

If useDaylight is false, this value is ignored.

endDayOfWeek

int endDayOfWeek
The day of the week on which daylight savings time ends. This value must be between Calendar.SUNDAY and Calendar.SATURDAY inclusive.

If useDaylight is false or endMode == DAY_OF_MONTH, this value is ignored.

endTime

int endTime
The time in milliseconds after midnight at which daylight savings time ends. This value is expressed as wall time, standard time, or UTC time, depending on the setting of endTimeMode.

If useDaylight is false, this value is ignored.

endTimeMode

int endTimeMode
The format of endTime, either WALL_TIME, STANDARD_TIME, or UTC_TIME.
Since:
JDK 1.3

startYear

int startYear
The year in which daylight savings time is first observed. This is an AD value. If this value is less than 1 then daylight savings is observed for all AD years.

If useDaylight is false, this value is ignored.

rawOffset

int rawOffset
The offset in milliseconds between this zone and GMT. Negative offsets are to the west of Greenwich. To obtain local standard time, add the offset to GMT time. To obtain local wall time it may also be necessary to add dstSavings.

useDaylight

boolean useDaylight
A boolean value which is true if and only if this zone uses daylight savings time. If this value is false, several other fields are ignored.

monthLength

byte[] monthLength
This field was serialized in JDK 1.1, so we have to keep it that way to maintain serialization compatibility. However, there's no need to recreate the array each time we create a new time zone.
An array of bytes containing the values {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}. This is ignored as of the Java 2 platform v1.2, however, it must be streamed out for compatibility with JDK 1.1.

startMode

int startMode
Variables specifying the mode of the start rule. Takes the following values:
DOM_MODE
Exact day of week; e.g., March 1.
DOW_IN_MONTH_MODE
Day of week in month; e.g., last Sunday in March.
DOW_GE_DOM_MODE
Day of week after day of month; e.g., Sunday on or after March 15.
DOW_LE_DOM_MODE
Day of week before day of month; e.g., Sunday on or before March 15.
The setting of this field affects the interpretation of the startDay field.

If useDaylight is false, this value is ignored.

Since:
JDK1.1.4

endMode

int endMode
Variables specifying the mode of the end rule. Takes the following values:
DOM_MODE
Exact day of week; e.g., March 1.
DOW_IN_MONTH_MODE
Day of week in month; e.g., last Sunday in March.
DOW_GE_DOM_MODE
Day of week after day of month; e.g., Sunday on or after March 15.
DOW_LE_DOM_MODE
Day of week before day of month; e.g., Sunday on or before March 15.
The setting of this field affects the interpretation of the endDay field.

If useDaylight is false, this value is ignored.

Since:
JDK1.1.4

dstSavings

int dstSavings
A positive value indicating the amount of time saved during DST in milliseconds. Typically one hour (3600000); sometimes 30 minutes (1800000).

If useDaylight is false, this value is ignored.

Since:
JDK1.1.4

serialVersionOnStream

int serialVersionOnStream
The version of the serialized data on the stream. Possible values:
0 or not present on stream
JDK 1.1.3 or earlier.
1
JDK 1.1.4 or later. Includes three new fields: startMode, endMode, and dstSavings.
2
JDK 1.3 or later. Includes two new fields: startTimeMode and endTimeMode.
When streaming out this class, the most recent format and the highest allowable serialVersionOnStream is written.
Since:
JDK1.1.4

Class java.util.Stack implements Serializable

Class java.util.TimeZone implements Serializable

Serialized Fields

ID

String ID
The string identifier of this TimeZone. This is a programmatic identifier used internally to look up TimeZone objects from the system table and also to map them to their localized display names. ID values are unique in the system table but may not be for dynamically created zones.

Class java.util.TooManyListenersException implements Serializable

Class java.util.TreeMap implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the TreeMap instance from a stream (i.e., deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of the TreeMap instance to a stream (i.e., serialize it).
Serial Data:
The size of the TreeMap (the number of key-value mappings) is emitted (int), followed by the key (Object) and value (Object) for each key-value mapping represented by the TreeMap. The key-value mappings are emitted in key-order (as determined by the TreeMap's Comparator, or by the keys' natural ordering if the TreeMap has no Comparator).
Serialized Fields

comparator

Comparator comparator
The Comparator used to maintain order in this TreeMap, or null if this TreeMap uses its elements natural ordering.

Class java.util.TreeMap.SubMap implements Serializable

Serialized Fields

this$0

TreeMap this$0

fromStart

boolean fromStart
fromKey is significant only if fromStart is false. Similarly, toKey is significant only if toStart is false.

toEnd

boolean toEnd
fromKey is significant only if fromStart is false. Similarly, toKey is significant only if toStart is false.

fromKey

Object fromKey

toKey

Object toKey

Class java.util.TreeSet implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitute the TreeSet instance from a stream (that is, deserialize it).

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Save the state of the TreeSet instance to a stream (that is, serialize it).
Serial Data:
Emits the comparator used to order this set, or null if it obeys its elements' natural ordering (Object), followed by the size of the set (the number of elements it contains) (int), followed by all of its elements (each an Object) in order (as determined by the set's Comparator, or by the elements' natural ordering if the set has no Comparator).

Class java.util.Vector implements Serializable

Serialized Fields

elementData

Object[] elementData
The array buffer into which the components of the vector are stored. The capacity of the vector is the length of this array buffer, and is at least large enough to contain all the vector's elements.

Any array elements following the last element in the Vector are null.

elementCount

int elementCount
The number of valid components in this Vector object. Components elementData[0] through elementData[elementCount-1] are the actual items.

capacityIncrement

int capacityIncrement
The amount by which the capacity of the vector is automatically incremented when its size becomes greater than its capacity. If the capacity increment is less than or equal to zero, the capacity of the vector is doubled each time it needs to grow.

Package java.util.jar

Class java.util.jar.JarException implements Serializable

Package java.util.zip

Class java.util.zip.DataFormatException implements Serializable

Class java.util.zip.ZipException implements Serializable

Package javax.naming

Class javax.naming.AuthenticationException implements Serializable

Class javax.naming.AuthenticationNotSupportedException implements Serializable

Class javax.naming.BinaryRefAddr implements Serializable

Serialized Fields

buf

byte[] buf
Contains the bytes of the address. This field is initialized by the constructor and returned using getAddressBytes() and getAddressContents().

Class javax.naming.Binding implements Serializable

Serialized Fields

boundObj

Object boundObj
Contains this binding's object. It is initialized by the constuctor and can be updated using setObject.
See Also:
Binding.getObject(), Binding.setObject(java.lang.Object)

Class javax.naming.CannotProceedException implements Serializable

Serialized Fields

remainingNewName

Name remainingNewName
Contains the remaining unresolved part of the second "name" argument to Context.rename(). This information necessary for continuing the Context.rename() operation.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getRemainingName() and setRemainingName().

See Also:
CannotProceedException.getRemainingNewName(), CannotProceedException.setRemainingNewName(javax.naming.Name)

environment

Hashtable environment
Contains the environment relevant for the Context or DirContext method that cannot proceed.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getEnvironment() and setEnvironment().

See Also:
CannotProceedException.getEnvironment(), CannotProceedException.setEnvironment(java.util.Hashtable)

altName

Name altName
Contains the name of the resolved object, relative to the context altNameCtx. It is a composite name. If null, then no name is specified. See the javax.naming.spi.ObjectFactory.getObjectInstance method for details on how this is used.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getAltName() and setAltName().

See Also:
CannotProceedException.getAltName(), CannotProceedException.setAltName(javax.naming.Name), CannotProceedException.altNameCtx, ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

altNameCtx

Context altNameCtx
Contains the context relative to which altName is specified. If null, then the default initial context is implied. See the javax.naming.spi.ObjectFactory.getObjectInstance method for details on how this is used.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getAltNameCtx() and setAltNameCtx().

See Also:
CannotProceedException.getAltNameCtx(), CannotProceedException.setAltNameCtx(javax.naming.Context), CannotProceedException.altName, ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

Class javax.naming.CommunicationException implements Serializable

Class javax.naming.CompositeName implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Overriden to avoid implementation dependency.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Overriden to avoid implementation dependency.
Serial Data:
The number of components (an int) followed by the individual components (each a String).

Class javax.naming.CompoundName implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Overriden to avoid implementation dependency.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Overriden to avoid implementation dependency.
Serial Data:
The syntax Properties, followed by the number of components (an int), and the individual components (each a String).

Class javax.naming.ConfigurationException implements Serializable

Class javax.naming.ContextNotEmptyException implements Serializable

Class javax.naming.InsufficientResourcesException implements Serializable

Class javax.naming.InterruptedNamingException implements Serializable

Class javax.naming.InvalidNameException implements Serializable

Class javax.naming.LimitExceededException implements Serializable

Class javax.naming.LinkException implements Serializable

Serialized Fields

linkResolvedName

Name linkResolvedName
Contains the part of the link that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
LinkException.getLinkResolvedName(), LinkException.setLinkResolvedName(javax.naming.Name)

linkResolvedObj

Object linkResolvedObj
Contains the object to which resolution of the part of the link was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
LinkException.getLinkResolvedObj(), LinkException.setLinkResolvedObj(java.lang.Object)

linkRemainingName

Name linkRemainingName
Contains the remaining link name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
LinkException.getLinkRemainingName(), LinkException.setLinkRemainingName(javax.naming.Name)

linkExplanation

String linkExplanation
Contains the exception of why resolution of the link failed. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
LinkException.getLinkExplanation(), LinkException.setLinkExplanation(java.lang.String)

Class javax.naming.LinkLoopException implements Serializable

Class javax.naming.LinkRef implements Serializable

Class javax.naming.MalformedLinkException implements Serializable

Class javax.naming.NameAlreadyBoundException implements Serializable

Class javax.naming.NameClassPair implements Serializable

Serialized Fields

name

String name
Contains the name of this NameClassPair. It is initialized by the constructor and can be updated using setName().
See Also:
NameClassPair.getName(), NameClassPair.setName(java.lang.String)

className

String className
Contains the class name contained in this NameClassPair. It is initialized by the constructor and can be updated using setClassName().
See Also:
NameClassPair.getClassName(), NameClassPair.setClassName(java.lang.String)

isRel

boolean isRel
Records whether the name of this NameClassPair is relative to the target context. It is initialized by the constructor and can be updated using setRelative().
See Also:
NameClassPair.isRelative(),
NameClassPair.setRelative(boolean),
NameClassPair.getName(),
NameClassPair.setName(java.lang.String)

Class javax.naming.NameImpl implements Serializable

Serialized Fields

components

Vector components

syntaxDirection

String syntaxDirection

syntaxSeparator

String syntaxSeparator

syntaxSeparator2

String syntaxSeparator2

syntaxCaseInsensitive

boolean syntaxCaseInsensitive

syntaxTrimBlanks

boolean syntaxTrimBlanks

syntaxEscape

String syntaxEscape

syntaxBeginQuote1

String syntaxBeginQuote1

syntaxEndQuote1

String syntaxEndQuote1

syntaxBeginQuote2

String syntaxBeginQuote2

syntaxEndQuote2

String syntaxEndQuote2

syntaxAvaSeparator

String syntaxAvaSeparator

syntaxTypevalSeparator

String syntaxTypevalSeparator

STYLE_NONE

int STYLE_NONE

STYLE_QUOTE1

int STYLE_QUOTE1

STYLE_QUOTE2

int STYLE_QUOTE2

STYLE_ESCAPE

int STYLE_ESCAPE

escapingStyle

int escapingStyle

Class javax.naming.NameNotFoundException implements Serializable

Class javax.naming.NamingException implements Serializable

Serialized Fields

resolvedName

Name resolvedName
Contains the part of the name that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
NamingException.getResolvedName(), NamingException.setResolvedName(javax.naming.Name)

resolvedObj

Object resolvedObj
Contains the object to which resolution of the part of the name was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
NamingException.getResolvedObj(), NamingException.setResolvedObj(java.lang.Object)

remainingName

Name remainingName
Contains the remaining name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get, set, "append" methods.
See Also:
NamingException.getRemainingName(),
NamingException.setRemainingName(javax.naming.Name),
NamingException.appendRemainingName(javax.naming.Name),
NamingException.appendRemainingComponent(java.lang.String)

rootException

Throwable rootException
Contains the original exception that caused this NamingException to be thrown. This field is set if there is additional information that could be obtained from the original exception, or if there original exception could not be mapped to a subclass of NamingException. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
NamingException.getRootCause(), NamingException.setRootCause(java.lang.Throwable)

Class javax.naming.NamingSecurityException implements Serializable

Class javax.naming.NoInitialContextException implements Serializable

Class javax.naming.NoPermissionException implements Serializable

Class javax.naming.NotContextException implements Serializable

Class javax.naming.OperationNotSupportedException implements Serializable

Class javax.naming.PartialResultException implements Serializable

Class javax.naming.RefAddr implements Serializable

Serialized Fields

addrType

String addrType
Contains the type of this address.

Class javax.naming.Reference implements Serializable

Serialized Fields

className

String className
Contains the fully-qualified name of the class of the object to which this Reference refers.
See Also:
Class.getName()

addrs

Vector addrs
Contains the addresses contained in this Reference. Initialized by constructor.

classFactory

String classFactory
Contains the name of the factory class for creating an instance of the object to which this Reference refers. Initialized to null.

classFactoryLocation

String classFactoryLocation
Contains the location of the factory class. Initialized to null.

Class javax.naming.ReferralException implements Serializable

Class javax.naming.ServiceUnavailableException implements Serializable

Class javax.naming.SizeLimitExceededException implements Serializable

Class javax.naming.StringRefAddr implements Serializable

Serialized Fields

contents

String contents
Contains the contents of this address. Can be null.

Class javax.naming.TimeLimitExceededException implements Serializable

Package javax.naming.directory

Class javax.naming.directory.AttributeInUseException implements Serializable

Class javax.naming.directory.AttributeModificationException implements Serializable

Serialized Fields

unexecs

ModificationItem[] unexecs
Contains the possibly null list of unexecuted modifications.

Class javax.naming.directory.BasicAttribute implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Overriden to avoid exposing implementation details.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Overriden to avoid exposing implementation details
Serial Data:
Default field (the attribute ID -- a String), followed by the number of values (an int), and the individual values.
Serialized Fields

attrID

String attrID
Holds the attribute's id. It is initialized by the public constructor and cannot be null unless methods in BasicAttribute that use attrID have been overridden.

ordered

boolean ordered
A flag for recording whether this attribute's values are ordered.

Class javax.naming.directory.BasicAttributes implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Overriden to avoid exposing implementation details.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Overriden to avoid exposing implementation details.
Serial Data:
Default field (ignoreCase flag -- a boolean), followed by the number of attributes in the set (an int), and then the individual Attribute objects.
Serialized Fields

ignoreCase

boolean ignoreCase
Indicates whether case of attribute ids is ignored.

Class javax.naming.directory.InvalidAttributeIdentifierException implements Serializable

Class javax.naming.directory.InvalidAttributesException implements Serializable

Class javax.naming.directory.InvalidAttributeValueException implements Serializable

Class javax.naming.directory.InvalidSearchControlsException implements Serializable

Class javax.naming.directory.InvalidSearchFilterException implements Serializable

Class javax.naming.directory.ModificationItem implements Serializable

Serialized Fields

mod_op

int mod_op
Contains an integer identify the modification to be performed.

attr

Attribute attr
Contains the attribute identifying the attribute and/or its value to be applied for the modification.

Class javax.naming.directory.NoSuchAttributeException implements Serializable

Class javax.naming.directory.SchemaViolationException implements Serializable

Class javax.naming.directory.SearchControls implements Serializable

Serialized Fields

searchScope

int searchScope
Contains the scope with which to apply the search. One of ONELEVEL_SCOPE, OBJECT_SCOPE, or SUBTREE_SCOPE.

timeLimit

int timeLimit
Contains the milliseconds to wait before returning from search.

derefLink

boolean derefLink
Indicates whether JNDI links are dereferenced during search.

returnObj

boolean returnObj
Indicates whether object is returned in SearchResult.

countLimit

long countLimit
Contains the maximum number of SearchResults to return.

attributesToReturn

String[] attributesToReturn
Contains the list of attributes to be returned in SearchResult for each matching entry of search. null indicates that all attributes are to be returned.

Class javax.naming.directory.SearchResult implements Serializable

Serialized Fields

attrs

Attributes attrs
Contains the attributes returned with the object.

Package javax.naming.event

Class javax.naming.event.NamingEvent implements Serializable

Serialized Fields

changeInfo

Object changeInfo
Contains information about the change that generated this event.

type

int type
Contains the type of this event.
See Also:
NamingEvent.OBJECT_ADDED, NamingEvent.OBJECT_REMOVED, NamingEvent.OBJECT_RENAMED, NamingEvent.OBJECT_CHANGED

oldBinding

Binding oldBinding
Contains information about the object before the change.

newBinding

Binding newBinding
Contains information about the object after the change.

Class javax.naming.event.NamingExceptionEvent implements Serializable

Serialized Fields

exception

NamingException exception
Contains the exception that was thrown

Package javax.naming.ldap

Class javax.naming.ldap.LdapReferralException implements Serializable

Class javax.naming.ldap.UnsolicitedNotificationEvent implements Serializable

Serialized Fields

notice

UnsolicitedNotification notice
The notification that caused this event to be fired.

Package javax.naming.spi

Class javax.naming.spi.ResolveResult implements Serializable

Serialized Fields

resolvedObj

Object resolvedObj
Field containing the Object that was resolved to successfully. It can be null only when constructed using a subclass. Constructors should always initialize this.

remainingName

Name remainingName
Field containing the remaining name yet to be resolved. It can be null only when constructed using a subclass. Constructors should always initialize this.

Package javax.rmi.CORBA

Class javax.rmi.CORBA.ClassDesc implements Serializable

Serialized Fields

repid

String repid
The class's RepositoryId.

codebase

String codebase
A space-separated list of codebase URLs.

Class javax.rmi.CORBA.Stub implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Serialization method to restore the IOR state.

writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Serialization method to save the IOR state.
Serial Data:
The length of the IOR type ID (int), followed by the IOR type ID (byte array encoded using ISO8859-1), followed by the number of IOR profiles (int), followed by the IOR profiles. Each IOR profile is written as a profile tag (int), followed by the length of the profile data (int), followed by the profile data (byte array).

Package javax.sound.midi

Class javax.sound.midi.InvalidMidiDataException implements Serializable

Class javax.sound.midi.MidiUnavailableException implements Serializable

Package javax.sound.sampled

Class javax.sound.sampled.AudioPermission implements Serializable

Class javax.sound.sampled.LineEvent implements Serializable

Serialized Fields

type

LineEvent.Type type
The kind of line event (OPEN, CLOSE, START, or STOP).
See Also:
LineEvent.getType()

position

long position
The media position when the event occurred, expressed in sample frames. Note that this field is only relevant to certain events generated by data lines, such as START and STOP. For events generated by lines that do not count sample frames, and for any other events for which this value is not known, the position value should be AudioSystem.NOT_SPECIFIED.
See Also:
LineEvent.getFramePosition()

Class javax.sound.sampled.LineUnavailableException implements Serializable

Class javax.sound.sampled.UnsupportedAudioFileException implements Serializable

Package javax.swing

Class javax.swing.AbstractAction implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

enabled

boolean enabled
Specifies whether action is enabled; the default is true.

changeSupport

SwingPropertyChangeSupport changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.

Class javax.swing.AbstractButton implements Serializable

Serialized Fields

model

ButtonModel model
The data model that determines the button's state.

text

String text

margin

Insets margin

defaultMargin

Insets defaultMargin

defaultIcon

Icon defaultIcon

pressedIcon

Icon pressedIcon

disabledIcon

Icon disabledIcon

selectedIcon

Icon selectedIcon

disabledSelectedIcon

Icon disabledSelectedIcon

rolloverIcon

Icon rolloverIcon

rolloverSelectedIcon

Icon rolloverSelectedIcon

paintBorder

boolean paintBorder

paintFocus

boolean paintFocus

rolloverEnabled

boolean rolloverEnabled

contentAreaFilled

boolean contentAreaFilled

verticalAlignment

int verticalAlignment

horizontalAlignment

int horizontalAlignment

verticalTextPosition

int verticalTextPosition

horizontalTextPosition

int horizontalTextPosition

accessibleIcon

AccessibleIcon accessibleIcon

changeListener

ChangeListener changeListener
The button model's changeListener.

actionListener

ActionListener actionListener
The button model's ActionListener.

itemListener

ItemListener itemListener
The button model's ItemListener.

action

Action action

actionPropertyChangeListener

PropertyChangeListener actionPropertyChangeListener

Class javax.swing.AbstractButton.AccessibleAbstractButton implements Serializable

Serialized Fields

this$0

AbstractButton this$0

Class javax.swing.AbstractButton.ButtonChangeListener implements Serializable

Serialized Fields

this$0

AbstractButton this$0

Class javax.swing.AbstractButton.ForwardActionEvents implements Serializable

Serialized Fields

this$0

AbstractButton this$0

Class javax.swing.AbstractButton.ForwardItemEvents implements Serializable

Serialized Fields

this$0

AbstractButton this$0

Class javax.swing.AbstractCellEditor implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList

Class javax.swing.AbstractListModel implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList

Class javax.swing.ActionMap implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

parent

ActionMap parent
Parent that handles any bindings we don't contain.

Class javax.swing.AncestorNotifier implements Serializable

Serialized Fields

firstInvisibleAncestor

Component firstInvisibleAncestor

listenerList

EventListenerList listenerList

root

JComponent root

Class javax.swing.Autoscroller implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

component

JComponent component

Class javax.swing.Box implements Serializable

Serialized Fields

accessibleContext

AccessibleContext accessibleContext
The currently set AccessibleContext object.

Class javax.swing.Box.AccessibleBox implements Serializable

Serialized Fields

this$0

Box this$0

Class javax.swing.Box.Filler implements Serializable

Serialized Fields

reqMin

Dimension reqMin

reqPref

Dimension reqPref

reqMax

Dimension reqMax

accessibleContext

AccessibleContext accessibleContext
The currently set AccessibleContext object.

Class javax.swing.Box.Filler.AccessibleBoxFiller implements Serializable

Serialized Fields

this$0

Box.Filler this$0

Class javax.swing.BoxLayout implements Serializable

Serialized Fields

axis

int axis

target

Container target

Class javax.swing.ButtonGroup implements Serializable

Serialized Fields

buttons

Vector buttons

selection

ButtonModel selection
The current choice.

Class javax.swing.CellRendererPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: Container
Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize them.
Serialized Fields

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.CellRendererPane.AccessibleCellRendererPane implements Serializable

Serialized Fields

this$0

CellRendererPane this$0

Class javax.swing.ColorChooserDialog implements Serializable

Serialized Fields

initialColor

Color initialColor

chooserPane

JColorChooser chooserPane

Class javax.swing.ColorChooserDialog.Closer implements Serializable

Class javax.swing.ColorChooserDialog.DisposeOnClose implements Serializable

Class javax.swing.ColorTracker implements Serializable

Serialized Fields

chooser

JColorChooser chooser

color

Color color

Class javax.swing.ComponentInputMap implements Serializable

Serialized Fields

component

JComponent component
Component binding is created for.

Class javax.swing.DefaultBoundedRangeModel implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList
The listeners waiting for model changes.

value

int value

extent

int extent

min

int min

max

int max

isAdjusting

boolean isAdjusting

Class javax.swing.DefaultButtonModel implements Serializable

Serialized Fields

stateMask

int stateMask

actionCommand

String actionCommand

group

ButtonGroup group

mnemonic

int mnemonic

listenerList

EventListenerList listenerList

Class javax.swing.DefaultCellEditor implements Serializable

Serialized Fields

editorComponent

JComponent editorComponent

delegate

DefaultCellEditor.EditorDelegate delegate

clickCountToStart

int clickCountToStart

Class javax.swing.DefaultCellEditor.EditorDelegate implements Serializable

Serialized Fields

this$0

DefaultCellEditor this$0

value

Object value

Class javax.swing.DefaultComboBoxModel implements Serializable

Serialized Fields

objects

Vector objects

selectedObject

Object selectedObject

Class javax.swing.DefaultDesktopManager implements Serializable

Serialized Fields

dragMode

int dragMode

Class javax.swing.DefaultListCellRenderer implements Serializable

Class javax.swing.DefaultListCellRenderer.UIResource implements Serializable

Class javax.swing.DefaultListModel implements Serializable

Serialized Fields

delegate

Vector delegate

Class javax.swing.DefaultListSelectionModel implements Serializable

Serialized Fields

selectionMode

int selectionMode

minIndex

int minIndex

maxIndex

int maxIndex

anchorIndex

int anchorIndex

leadIndex

int leadIndex

firstAdjustedIndex

int firstAdjustedIndex

lastAdjustedIndex

int lastAdjustedIndex

isAdjusting

boolean isAdjusting

firstChangedIndex

int firstChangedIndex

lastChangedIndex

int lastChangedIndex

value

BitSet value

listenerList

EventListenerList listenerList

leadAnchorNotificationEnabled

boolean leadAnchorNotificationEnabled

Class javax.swing.DefaultPopupFactory.JPanelPopup implements Serializable

Serialized Fields

this$0

DefaultPopupFactory this$0

desiredLocationX

int desiredLocationX

desiredLocationY

int desiredLocationY

Class javax.swing.DefaultPopupFactory.PanelPopup implements Serializable

Serialized Fields

this$0

DefaultPopupFactory this$0

desiredLocationX

int desiredLocationX

desiredLocationY

int desiredLocationY

rootPane

JRootPane rootPane

Class javax.swing.DefaultPopupFactory.WindowPopup implements Serializable

Serialized Fields

this$0

DefaultPopupFactory this$0

saveX

int saveX

saveY

int saveY

firstShow

boolean firstShow

Class javax.swing.DefaultPopupFactory.WindowPopup.AccessibleWindowPopup implements Serializable

Serialized Fields

this$1

DefaultPopupFactory.WindowPopup this$1

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.DefaultSingleSelectionModel implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList
The collection of registered listeners

index

int index

Class javax.swing.ImageIcon implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

imageObserver

ImageObserver imageObserver

description

String description

width

int width

height

int height

accessibleContext

ImageIcon.AccessibleImageIcon accessibleContext
--- Accessibility Support ---

Class javax.swing.ImageIcon.AccessibleImageIcon implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

this$0

ImageIcon this$0

Class javax.swing.InputMap implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

parent

InputMap parent
Parent that handles any bindings we don't contain.

Class javax.swing.JApplet implements Serializable

Serialized Fields

rootPane

JRootPane rootPane
See Also:
JApplet.getRootPane(), JApplet.setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

boolean rootPaneCheckingEnabled
See Also:
JApplet.isRootPaneCheckingEnabled(), JApplet.setRootPaneCheckingEnabled(boolean)

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.JApplet.AccessibleJApplet implements Serializable

Serialized Fields

this$0

JApplet this$0

Class javax.swing.JButton implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

defaultCapable

boolean defaultCapable

Class javax.swing.JButton.AccessibleJButton implements Serializable

Serialized Fields

this$0

JButton this$0

Class javax.swing.JCheckBox implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
See JComponent.readObject() for information about serialization in Swing.
Serialized Fields

flat

boolean flat

Class javax.swing.JCheckBox.AccessibleJCheckBox implements Serializable

Serialized Fields

this$0

JCheckBox this$0

Class javax.swing.JCheckBoxMenuItem implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem implements Serializable

Serialized Fields

this$0

JCheckBoxMenuItem this$0

Class javax.swing.JColorChooser implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

selectionModel

ColorSelectionModel selectionModel

previewPanel

JComponent previewPanel

chooserPanels

AbstractColorChooserPanel[] chooserPanels

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.JColorChooser.AccessibleJColorChooser implements Serializable

Serialized Fields

this$0

JColorChooser this$0

Class javax.swing.JComboBox implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

dataModel

ComboBoxModel dataModel

renderer

ListCellRenderer renderer

editor

ComboBoxEditor editor

maximumRowCount

int maximumRowCount

isEditable

boolean isEditable

selectedItemReminder

Object selectedItemReminder

keySelectionManager

JComboBox.KeySelectionManager keySelectionManager

actionCommand

String actionCommand

lightWeightPopupEnabled

boolean lightWeightPopupEnabled

firedActionEventOnContentsChanged

boolean firedActionEventOnContentsChanged

firingActionEvent

boolean firingActionEvent

action

Action action

actionPropertyChangeListener

PropertyChangeListener actionPropertyChangeListener

Class javax.swing.JComboBox.AccessibleJComboBox implements Serializable

Serialized Fields

this$0

JComboBox this$0

Class javax.swing.JComboBox.DefaultKeySelectionManager implements Serializable

Serialized Fields

this$0

JComboBox this$0

Class javax.swing.JComponent implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.
See Also:
JComponent.ReadObjectCallback

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

preferredSize

Dimension preferredSize

minimumSize

Dimension minimumSize

maximumSize

Dimension maximumSize

alignmentX

Float alignmentX

alignmentY

Float alignmentY

ancestorNotifier

AncestorNotifier ancestorNotifier

_bounds

Rectangle _bounds

listenerList

EventListenerList listenerList

clientProperties

Hashtable clientProperties

vetoableChangeSupport

VetoableChangeSupport vetoableChangeSupport

autoscroller

Autoscroller autoscroller

border

Border border

flags

int flags

inputVerifier

InputVerifier inputVerifier

verifyInputWhenFocusTarget

boolean verifyInputWhenFocusTarget

focusInputMap

InputMap focusInputMap
Used for WHEN_FOCUSED bindings.

ancestorInputMap

InputMap ancestorInputMap
Used for WHEN_ANCESTOR_OF_FOCUSED_COMPONENT bindings.

windowInputMap

ComponentInputMap windowInputMap
Used for WHEN_IN_FOCUSED_KEY bindings.

actionMap

ActionMap actionMap
ActionMap.

accessibleContext

AccessibleContext accessibleContext
The AccessibleContext associated with this JComponent.

htmlView

Object htmlView

changeSupport

SwingPropertyChangeSupport changeSupport

paintImmediatelyClip

Rectangle paintImmediatelyClip

Class javax.swing.JComponent.AccessibleJComponent implements Serializable

Serialized Fields

this$0

JComponent this$0

accessibleContainerHandler

ContainerListener accessibleContainerHandler

accessibleFocusHandler

FocusListener accessibleFocusHandler

Class javax.swing.JComponent.EnableSerializationFocusListener implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

this$0

JComponent this$0

Class javax.swing.JComponent.KeyboardState implements Serializable

Class javax.swing.JDesktopPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

dragMode

int dragMode

Class javax.swing.JDesktopPane.AccessibleJDesktopPane implements Serializable

Serialized Fields

this$0

JDesktopPane this$0

Class javax.swing.JDialog implements Serializable

Serialized Fields

defaultCloseOperation

int defaultCloseOperation

rootPane

JRootPane rootPane
See Also:
JDialog.getRootPane(), JDialog.setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

boolean rootPaneCheckingEnabled
See Also:
JDialog.isRootPaneCheckingEnabled(), JDialog.setRootPaneCheckingEnabled(boolean)

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.JDialog.AccessibleJDialog implements Serializable

Serialized Fields

this$0

JDialog this$0

Class javax.swing.JEditorPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

kit

EditorKit kit
Current content binding of the editor.

pageProperties

Hashtable pageProperties

typeHandlers

Hashtable typeHandlers
Table of registered type handlers for this editor.

managingFocus

boolean managingFocus
Indicates whether we are managing focus.
See Also:
JEditorPane.processComponentKeyEvent(java.awt.event.KeyEvent), JEditorPane.isManagingFocus()

Class javax.swing.JEditorPane.AccessibleJEditorPane implements Serializable

Serialized Fields

this$0

JEditorPane this$0

Class javax.swing.JEditorPane.AccessibleJEditorPaneHTML implements Serializable

Serialized Fields

this$0

JEditorPane this$0

Class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport implements Serializable

Serialized Fields

this$0

JEditorPane this$0

hyperlinks

JEditorPane.JEditorPaneAccessibleHypertextSupport.LinkVector hyperlinks

linksValid

boolean linksValid

Class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.LinkVector implements Serializable

Serialized Fields

this$1

JEditorPane.JEditorPaneAccessibleHypertextSupport this$1

Class javax.swing.JEditorPane.PlainEditorKit implements Serializable

Class javax.swing.JFileChooser implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

dialogTitle

String dialogTitle

approveButtonText

String approveButtonText

approveButtonToolTipText

String approveButtonToolTipText

approveButtonMnemonic

int approveButtonMnemonic

actionListener

ActionListener actionListener

filters

Vector filters

dialog

JDialog dialog

dialogType

int dialogType

returnValue

int returnValue

accessory

JComponent accessory

fileView

FileView fileView

uiFileView

FileView uiFileView

controlsShown

boolean controlsShown

useFileHiding

boolean useFileHiding

fileSelectionMode

int fileSelectionMode

multiSelectionEnabled

boolean multiSelectionEnabled

useAcceptAllFileFilter

boolean useAcceptAllFileFilter

fileFilter

FileFilter fileFilter

fileSystemView

FileSystemView fileSystemView

currentDirectory

File currentDirectory

selectedFile

File selectedFile

selectedFiles

File[] selectedFiles

accessibleContext

AccessibleContext accessibleContext

Class javax.swing.JFileChooser.AccessibleJFileChooser implements Serializable

Serialized Fields

this$0

JFileChooser this$0

Class javax.swing.JFrame implements Serializable

Serialized Fields

defaultCloseOperation

int defaultCloseOperation

rootPane

JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
JRootPane, RootPaneContainer

rootPaneCheckingEnabled

boolean rootPaneCheckingEnabled
If true then calls to add and setLayout will cause an exception to be thrown. The default is false.
See Also:
JFrame.isRootPaneCheckingEnabled(), JFrame.setRootPaneCheckingEnabled(boolean)

accessibleContext

AccessibleContext accessibleContext
The accessible context property.

Class javax.swing.JFrame.AccessibleJFrame implements Serializable

Serialized Fields

this$0

JFrame this$0

Class javax.swing.JInternalFrame implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

rootPane

JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
JRootPane, RootPaneContainer

rootPaneCheckingEnabled

boolean rootPaneCheckingEnabled
If true then calls to add and setLayout cause an exception to be thrown.

closable

boolean closable
The frame can be closed.

isClosed

boolean isClosed
The frame has been closed.

maximizable

boolean maximizable
The frame can be expanded to the size of the desktop pane.

isMaximum

boolean isMaximum
The frame has been expanded to its maximum size.
See Also:
JInternalFrame.maximizable

iconable

boolean iconable
The frame can "iconized" (shrunk down and displayed as an icon-image).
See Also:
JInternalFrame.JDesktopIcon

isIcon

boolean isIcon
The frame has been iconized.
See Also:
JInternalFrame.iconable

resizable

boolean resizable
The frame's size can be changed.

isSelected

boolean isSelected
The frame is currently selected.

frameIcon

Icon frameIcon
The icon shown in the top-left corner of the frame.

title

String title
The title displayed in the frame's title bar.

desktopIcon

JInternalFrame.JDesktopIcon desktopIcon
The icon that is displayed when the frame is iconized.
See Also:
JInternalFrame.iconable

opened

boolean opened

normalBounds

Rectangle normalBounds

defaultCloseOperation

int defaultCloseOperation

lastFocusOwner

Component lastFocusOwner

isDragging

boolean isDragging

danger

boolean danger

Class javax.swing.JInternalFrame.AccessibleJInternalFrame implements Serializable

Serialized Fields

this$0

JInternalFrame this$0

Class javax.swing.JInternalFrame.JDesktopIcon implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

internalFrame

JInternalFrame internalFrame

Class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon implements Serializable

Serialized Fields

this$0

JInternalFrame.JDesktopIcon this$0

Class javax.swing.JLabel implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

mnemonic

int mnemonic

text

String text

defaultIcon

Icon defaultIcon

disabledIcon

Icon disabledIcon

disabledIconSet

boolean disabledIconSet

verticalAlignment

int verticalAlignment

horizontalAlignment

int horizontalAlignment

verticalTextPosition

int verticalTextPosition

horizontalTextPosition

int horizontalTextPosition

iconTextGap

int iconTextGap

labelFor

Component labelFor

accessibleIcon

AccessibleIcon accessibleIcon

Class javax.swing.JLabel.AccessibleJLabel implements Serializable

Serialized Fields

this$0

JLabel this$0

Class javax.swing.JLayeredPane implements Serializable

Serialized Fields

componentToLayer

Hashtable componentToLayer

optimizedDrawingPossible

boolean optimizedDrawingPossible

Class javax.swing.JLayeredPane.AccessibleJLayeredPane implements Serializable

Serialized Fields

this$0

JLayeredPane this$0

Class javax.swing.JList implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

fixedCellWidth

int fixedCellWidth

fixedCellHeight

int fixedCellHeight

horizontalScrollIncrement

int horizontalScrollIncrement

prototypeCellValue

Object prototypeCellValue

visibleRowCount

int visibleRowCount

selectionForeground

Color selectionForeground

selectionBackground

Color selectionBackground

selectionModel

ListSelectionModel selectionModel

dataModel

ListModel dataModel

cellRenderer

ListCellRenderer cellRenderer

selectionListener

ListSelectionListener selectionListener

Class javax.swing.JList.AccessibleJList implements Serializable

Serialized Fields

this$0

JList this$0

leadSelectionIndex

int leadSelectionIndex

Class javax.swing.JList.ListSelectionHandler implements Serializable

Serialized Fields

this$0

JList this$0

Class javax.swing.JMenu implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

popupMenu

JPopupMenu popupMenu

menuChangeListener

ChangeListener menuChangeListener

menuEvent

MenuEvent menuEvent

delay

int delay

receivedKeyPressed

boolean receivedKeyPressed
Set to true when a KEY_PRESSED event is received and the menu is selected, and false when a KEY_RELEASED (or focus lost) is received. If processKeyEvent is invoked with a KEY_TYPED or KEY_RELEASED event, and this is false, a MenuKeyEvent is NOT created. This is needed to avoid activating a menuitem when the menu and menuitem share the same mnemonic.

popupListener

JMenu.WinListener popupListener
The window-closing listener for the popup.
See Also:
JMenu.WinListener

Class javax.swing.JMenu.AccessibleJMenu implements Serializable

Serialized Fields

this$0

JMenu this$0

Class javax.swing.JMenu.MenuChangeListener implements Serializable

Serialized Fields

this$0

JMenu this$0

isSelected

boolean isSelected

Class javax.swing.JMenu.WinListener implements Serializable

Serialized Fields

this$0

JMenu this$0

popupMenu

JPopupMenu popupMenu

Class javax.swing.JMenuBar implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
See JComponent.readObject() for information about serialization in Swing.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

paintBorder

boolean paintBorder

margin

Insets margin

Class javax.swing.JMenuBar.AccessibleJMenuBar implements Serializable

Serialized Fields

this$0

JMenuBar this$0

Class javax.swing.JMenuItem implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
See JComponent.readObject() for information about serialization in Swing.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

accelerator

KeyStroke accelerator

Class javax.swing.JMenuItem.AccessibleJMenuItem implements Serializable

Serialized Fields

this$0

JMenuItem this$0

Class javax.swing.JMenuItem.MenuItemFocusListener implements Serializable

Class javax.swing.JOptionPane implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Description copied from class: JComponent
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

messageType

int messageType
Message type.

optionType

int optionType
Option type, one of DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.

wantsInput

boolean wantsInput
If true, a UI widget will be provided to the user to get input.

Class javax.swing.JOptionPane.AccessibleJOptionPane implements Serializable

Serialized Fields

this$0

JOptionPane this$0

Class javax.swing.JPanel implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Class javax.swing.JPanel.AccessibleJPanel implements Serializable

Serialized Fields

this$0

JPanel this$0

Class javax.swing.JPasswordField implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

echoChar

char echoChar

Class javax.swing.JPasswordField.AccessibleJPasswordField implements Serializable

Serialized Fields

this$0

JPasswordField this$0

Class javax.swing.JPopupMenu implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Description copied from class: JComponent
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

desiredLocationX

int desiredLocationX

desiredLocationY

int desiredLocationY

label

String label

paintBorder

boolean paintBorder

margin

Insets margin

lightWeightPopupEnabled

boolean lightWeightPopupEnabled

selectionModel

SingleSelectionModel selectionModel

Class javax.swing.JPopupMenu.AccessibleJPopupMenu implements Serializable

Serialized Fields

this$0

JPopupMenu this$0

Class javax.swing.JPopupMenu.Separator implements Serializable

Class javax.swing.JProgressBar implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

orientation

int orientation
The orientation to display the progress bar. The default is HORIZONTAL.

paintBorder

boolean paintBorder
Whether to display the border around the progress bar. The default is true.

model

BoundedRangeModel model
The data structure that holds the various values for the progress bar.

progressString

String progressString
A optional String that can be displayed on the progress bar. The default is null. Setting this to a non-null value does not imply that the String will be displayed.

paintString

boolean paintString
Whether to textually display a String on the progress bar. The default is false. Setting this to true will cause a textual display of the progress to de rendered on the progress bar. If the progressString is null, the percentage done to be displayed on the progress bar. If the progressString is non-null, it is rendered on the progress bar.

changeListener

ChangeListener changeListener

Class javax.swing.JProgressBar.AccessibleJProgressBar implements Serializable

Serialized Fields

this$0

JProgressBar this$0

Class javax.swing.JProgressBar.ModelListener implements Serializable

Serialized Fields

this$0

JProgressBar this$0

Class javax.swing.JRadioButton implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Class javax.swing.JRadioButton.AccessibleJRadioButton implements Serializable

Serialized Fields

this$0

JRadioButton this$0

Class javax.swing.JRadioButtonMenuItem implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.

Class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem implements Serializable

Serialized Fields

this$0

JRadioButtonMenuItem this$0

Class javax.swing.JRootPane implements Serializable

Serialized Fields

focusOwner

JComponent focusOwner
The subcomponent that currently has focus, or null if no subcomponent currently has focus

previousFocusOwner

JComponent previousFocusOwner

menuBar

JMenuBar menuBar
The menu bar.

contentPane

Container contentPane
The content pane.

layeredPane

JLayeredPane layeredPane
The layered pane that manages the menu bar and content pane.

glassPane

Component glassPane
The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.

defaultButton

JButton defaultButton
The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs.

defaultPressAction

JRootPane.DefaultAction defaultPressAction
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this unusable field is no longer used. To override the default button you should replace the Action in the JRootPane's ActionMap. Please refer to the key bindings specification for further details.
See Also:
JRootPane.defaultButton

defaultReleaseAction

JRootPane.DefaultAction defaultReleaseAction
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this unusable field is no longer used. To override the default button you should replace the Action in the JRootPane's ActionMap. Please refer to the key bindings specification for further details.
See Also:
JRootPane.defaultButton

Class javax.swing.JRootPane.AccessibleJRootPane implements Serializable

Serialized Fields

this$0

JRootPane this$0

Class javax.swing.JRootPane.DefaultAction implements Serializable

Serialized Fields

owner

JButton owner

root

JRootPane root

press

boolean press

Class javax.swing.JRootPane.RootLayout implements Serializable

Serialized Fields

this$0

JRootPane this$0

Class javax.swing.JScrollBar implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

fwdAdjustmentEvents

ChangeListener fwdAdjustmentEvents
All changes from the model are treated as though the user moved the scrollbar knob.

model

BoundedRangeModel model
The model that represents the scrollbar's minimum, maximum, extent (aka "visibleAmount") and current value.
See Also:
JScrollBar.setModel(javax.swing.BoundedRangeModel)

orientation

int orientation
See Also:
JScrollBar.setOrientation(int)

unitIncrement

int unitIncrement
See Also:
JScrollBar.setUnitIncrement(int)

blockIncrement

int blockIncrement
See Also:
JScrollBar.setBlockIncrement(int)

Class javax.swing.JScrollBar.AccessibleJScrollBar implements Serializable

Serialized Fields

this$0

JScrollBar this$0

Class javax.swing.JScrollBar.ModelListener implements Serializable

Serialized Fields

this$0

JScrollBar this$0

Class javax.swing.JScrollPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

viewportBorder

Border viewportBorder

verticalScrollBarPolicy

int verticalScrollBarPolicy
The display policy for the vertical scrollbar. The default is JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED.
See Also:
JScrollPane.setVerticalScrollBarPolicy(int)

horizontalScrollBarPolicy

int horizontalScrollBarPolicy
The display policy for the horizontal scrollbar. The default is JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED.
See Also:
JScrollPane.setHorizontalScrollBarPolicy(int)

viewport

JViewport viewport
The scrollpane's viewport child. Default is an empty JViewport.
See Also:
JScrollPane.setViewport(javax.swing.JViewport)

verticalScrollBar

JScrollBar verticalScrollBar
The scrollpane's vertical scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setVerticalScrollBar(javax.swing.JScrollBar)

horizontalScrollBar

JScrollBar horizontalScrollBar
The scrollpane's horizontal scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar)

rowHeader

JViewport rowHeader
The row header child. Default is null.
See Also:
JScrollPane.setRowHeader(javax.swing.JViewport)

columnHeader

JViewport columnHeader
The column header child. Default is null.
See Also:
JScrollPane.setColumnHeader(javax.swing.JViewport)

lowerLeft

Component lowerLeft
The component to display in the lower left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

lowerRight

Component lowerRight
The component to display in the lower right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperLeft

Component upperLeft
The component to display in the upper left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperRight

Component upperRight
The component to display in the upper right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

Class javax.swing.JScrollPane.AccessibleJScrollPane implements Serializable

Serialized Fields

this$0

JScrollPane this$0

viewPort

JViewport viewPort

Class javax.swing.JScrollPane.ScrollBar implements Serializable

Serialized Fields

this$0

JScrollPane this$0

unitIncrementSet

boolean unitIncrementSet
Set to true when the unit increment has been explicitly set. If this is false the viewport's view is obtained and if it is an instance of Scrollable the unit increment from it is used.

blockIncrementSet

boolean blockIncrementSet
Set to true when the block increment has been explicitly set. If this is false the viewport's view is obtained and if it is an instance of Scrollable the block increment from it is used.

Class javax.swing.JSeparator implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

orientation

int orientation

Class javax.swing.JSeparator.AccessibleJSeparator implements Serializable

Serialized Fields

this$0

JSeparator this$0

Class javax.swing.JSlider implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

paintTicks

boolean paintTicks

paintTrack

boolean paintTrack

paintLabels

boolean paintLabels

isInverted

boolean isInverted

sliderModel

BoundedRangeModel sliderModel
The data model that handles the numeric maximum value, minimum value, and current-position value for the slider.

majorTickSpacing

int majorTickSpacing
The number of values between the major tick marks -- the larger marks that break up the minor tick marks.

minorTickSpacing

int minorTickSpacing
The number of values between the minor tick marks -- the smaller marks that occur between the major tick marks.
See Also:
JSlider.setMinorTickSpacing(int)

snapToTicks

boolean snapToTicks
If true, the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob. The default is false.
See Also:
JSlider.setSnapToTicks(boolean)

snapToValue

boolean snapToValue
If true, the knob (and the data value it represents) resolve to the closest slider value next to where the user positioned the knob.

orientation

int orientation
See Also:
JSlider.setOrientation(int)

labelTable

Dictionary labelTable

changeListener

ChangeListener changeListener
The changeListener (no suffix) is the listener we add to the Sliders model. By default this listener just forwards events to ChangeListeners (if any) added directly to the slider.
See Also:
JSlider.addChangeListener(javax.swing.event.ChangeListener), JSlider.createChangeListener()

Class javax.swing.JSlider.1$SmartHashtable.LabelUIResource implements Serializable

Serialized Fields

this$1

javax.swing.JSlider.1$SmartHashtable this$1

Class javax.swing.JSlider.AccessibleJSlider implements Serializable

Serialized Fields

this$0

JSlider this$0

Class javax.swing.JSlider.ModelListener implements Serializable

Serialized Fields

this$0

JSlider this$0

Class javax.swing.JSplitPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

orientation

int orientation
How the views are split.

continuousLayout

boolean continuousLayout
Whether or not the views are continuously redisplayed while resizing.

leftComponent

Component leftComponent
The left or top component.

rightComponent

Component rightComponent
The right or bottom component.

dividerSize

int dividerSize
Size of the divider.

oneTouchExpandable

boolean oneTouchExpandable
Is a little widget provided to quickly expand/collapse the split pane?

lastDividerLocation

int lastDividerLocation
Previous location of the split pane.

resizeWeight

double resizeWeight
How to distribute extra space.

dividerLocation

int dividerLocation
Location of the divider, at least the value that was set, the UI may have a different value.

Class javax.swing.JSplitPane.AccessibleJSplitPane implements Serializable

Serialized Fields

this$0

JSplitPane this$0

Class javax.swing.JTabbedPane implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
See readObject and writeObject in JComponent for more information about serialization in Swing.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

tabPlacement

int tabPlacement
Where the tabs are placed.
See Also:
JTabbedPane.setTabPlacement(int)

model

SingleSelectionModel model
The default selection model

haveRegistered

boolean haveRegistered

changeListener

ChangeListener changeListener
The changeListener is the listener we add to the model.

pages

Vector pages

Class javax.swing.JTabbedPane.AccessibleJTabbedPane implements Serializable

Serialized Fields

this$0

JTabbedPane this$0

Class javax.swing.JTabbedPane.ModelListener implements Serializable

Serialized Fields

this$0

JTabbedPane this$0

Class javax.swing.JTabbedPane.Page implements Serializable

Serialized Fields

this$0

JTabbedPane this$0

title

String title

background

Color background

foreground

Color foreground

icon

Icon icon

disabledIcon

Icon disabledIcon

parent

JTabbedPane parent

component

Component component

tip

String tip

enabled

boolean enabled

needsUIUpdate

boolean needsUIUpdate

Class javax.swing.JTable implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Description copied from class: JComponent
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

dataModel

TableModel dataModel
The TableModel of the table.

columnModel

TableColumnModel columnModel
The TableColumnModel of the table.

selectionModel

ListSelectionModel selectionModel
The ListSelectionModel of the table, used to keep track of row selections.

tableHeader

JTableHeader tableHeader
The TableHeader working with the table.

rowHeight

int rowHeight
The height in pixels of each row in the table.

rowMargin

int rowMargin
The height in pixels of the margin between the cells in each row.

gridColor

Color gridColor
The color of the grid.

showHorizontalLines

boolean showHorizontalLines
The table draws horizontal lines between cells if showHorizontalLines is true.

showVerticalLines

boolean showVerticalLines
The table draws vertical lines between cells if showVerticalLines is true.

autoResizeMode

int autoResizeMode
Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.

autoCreateColumnsFromModel

boolean autoCreateColumnsFromModel
The table will query the TableModel to build the default set of columns if this is true.

preferredViewportSize

Dimension preferredViewportSize
Used by the Scrollable interface to determine the initial visible area.

rowSelectionAllowed

boolean rowSelectionAllowed
True if row selection is allowed in this table.

cellSelectionEnabled

boolean cellSelectionEnabled
Obsolete as of Java 2 platform v1.3. Please use the rowSelectionAllowed property and the columnSelectionAllowed property of the columnModel instead. Or use the method getCellSelectionEnabled.

selectionForeground

Color selectionForeground
The foreground color of selected cells.

selectionBackground

Color selectionBackground
The background color of selected cells.

reentrantCall

boolean reentrantCall

rowModel

SizeSequence rowModel

Class javax.swing.JTable.AccessibleJTable implements Serializable

Serialized Fields

this$0

JTable this$0

lastSelectedRow

int lastSelectedRow

lastSelectedCol

int lastSelectedCol

caption

Accessible caption

summary

Accessible summary

rowDescription

Accessible[] rowDescription

columnDescription

Accessible[] columnDescription

Class javax.swing.JTable.BooleanEditor implements Serializable

Class javax.swing.JTable.BooleanRenderer implements Serializable

Class javax.swing.JTable.DateRenderer implements Serializable

Serialized Fields

formatter

DateFormat formatter

Class javax.swing.JTable.DoubleRenderer implements Serializable

Serialized Fields

formatter

NumberFormat formatter

Class javax.swing.JTable.GenericEditor implements Serializable

Serialized Fields

argTypes

Class[] argTypes

constructor

Constructor constructor

value

Object value

Class javax.swing.JTable.IconRenderer implements Serializable

Class javax.swing.JTable.NumberEditor implements Serializable

Class javax.swing.JTable.NumberRenderer implements Serializable

Class javax.swing.JTextArea implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

rows

int rows

columns

int columns

columnWidth

int columnWidth

rowHeight

int rowHeight

wrap

boolean wrap

word

boolean word

Class javax.swing.JTextArea.AccessibleJTextArea implements Serializable

Serialized Fields

this$0

JTextArea this$0

Class javax.swing.JTextField implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.
Serialized Fields

action

Action action

actionPropertyChangeListener

PropertyChangeListener actionPropertyChangeListener

visibility

BoundedRangeModel visibility

horizontalAlignment

int horizontalAlignment

columns

int columns

columnWidth

int columnWidth

command

String command

Class javax.swing.JTextField.AccessibleJTextField implements Serializable

Serialized Fields

this$0

JTextField this$0

Class javax.swing.JTextField.NotifyAction implements Serializable

Class javax.swing.JTextPane implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Class javax.swing.JToggleButton implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Class javax.swing.JToggleButton.AccessibleJToggleButton implements Serializable

Serialized Fields

this$0

JToggleButton this$0

Class javax.swing.JToggleButton.ToggleButtonModel implements Serializable

Class javax.swing.JToolBar implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

paintBorder

boolean paintBorder

margin

Insets margin

floatable

boolean floatable

orientation

int orientation

Class javax.swing.JToolBar.AccessibleJToolBar implements Serializable

Serialized Fields

this$0

JToolBar this$0

Class javax.swing.JToolBar.RightToLeftToolBarLayout implements Serializable

Class javax.swing.JToolBar.Separator implements Serializable

Serialized Fields

separatorSize

Dimension separatorSize

Class javax.swing.JToolTip implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

tipText

String tipText

component

JComponent component

Class javax.swing.JToolTip.AccessibleJToolTip implements Serializable

Serialized Fields

this$0

JToolTip this$0

Class javax.swing.JTree implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Description copied from class: JComponent
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Description copied from class: JComponent
Before writing a JComponent to an ObjectOutputStream we temporarily uninstall its UI. This is tricky to do because we want to uninstall the UI before any of the JComponent's children (or its LayoutManager etc.) are written, and we don't want to restore the UI until the most derived JComponent subclass has been been stored.
Serialized Fields

rootVisible

boolean rootVisible
True if the root node is displayed, false if its children are the highest visible nodes.

rowHeight

int rowHeight
Height to use for each display row. If this is <= 0="0" the="the" renderer="renderer" determines="determines" the="the" height="height" for="for" each="each" row.

showsRootHandles

boolean showsRootHandles
True if handles are displayed at the topmost level of the tree.

A handle is a small icon that displays adjacent to the node which allows the user to click once to expand or collapse the node. A common interface shows a plus sign (+) for a node which can be expanded and a minus sign (-) for a node which can be collapsed. Handles are always shown for nodes below the topmost level.

If the rootVisible setting specifies that the root node is to be displayed, then that is the only node at the topmost level. If the root node is not displayed, then all of its children are at the topmost level of the tree. Handles are always displayed for nodes other than the topmost.

If the root node isn't visible, it is generally a good to make this value true. Otherwise, the tree looks exactly like a list, and users may not know that the "list entries" are actually tree nodes.

See Also:
JTree.rootVisible

editable

boolean editable
Is the tree editable? Default is false.

largeModel

boolean largeModel
Is this tree a large model? This is a code-optimization setting. A large model can be used when the cell height is the same for all nodes. The UI will then cache very little information and instead continually message the model. Without a large model the UI caches most of the information, resulting in fewer method calls to the model.

This value is only a suggestion to the UI. Not all UIs will take advantage of it. Default value is false.

visibleRowCount

int visibleRowCount
Number of rows to make visible at one time. This value is used for the Scrollable interface. It determines the preferred size of the display area.

invokesStopCellEditing

boolean invokesStopCellEditing
If true, when editing is to be stopped by way of selection changing, data in tree changing or other means stopCellEditing is invoked, and changes are saved. If false, cancelCellEditing is invoked, and changes are discarded. Default is false.

scrollsOnExpand

boolean scrollsOnExpand
If true, when a node is expanded, as many of the descendants are scrolled to be visible.

toggleClickCount

int toggleClickCount
Number of mouse clicks before a node is expanded.

leadPath

TreePath leadPath
Lead selection path, may not be null.

anchorPath

TreePath anchorPath
Anchor path.

expandsSelectedPaths

boolean expandsSelectedPaths
True if paths in the selection should be expanded.

settingUI

boolean settingUI
This is set to true for the life of the setUI call.

Class javax.swing.JTree.AccessibleJTree implements Serializable

Serialized Fields

this$0

JTree this$0

leadSelectionPath

TreePath leadSelectionPath

leadSelectionAccessible

Accessible leadSelectionAccessible

Class javax.swing.JTree.DynamicUtilTreeNode implements Serializable

Serialized Fields

hasChildren

boolean hasChildren
Does the this JTree have children? This property is currently not implemented.

childValue

Object childValue
Value to create children with.

loadedChildren

boolean loadedChildren
Have the children been loaded yet?

Class javax.swing.JTree.EmptySelectionModel implements Serializable

Class javax.swing.JTree.TreeSelectionRedirector implements Serializable

Serialized Fields

this$0

JTree this$0

Class javax.swing.JViewport implements Serializable

Serialized Fields

isViewSizeSet

boolean isViewSizeSet
True when the viewport dimensions have been determined. The default is false.

lastPaintPosition

Point lastPaintPosition
The last viewPosition that we've painted, so we know how much of the backing store image is valid.

backingStore

boolean backingStore
Deprecated. As of Java 2 platform v1.3

True when this viewport is maintaining an offscreen image of its contents, so that some scrolling can take place using fast "bit-blit" operations instead of by accessing the view object to construct the display. The default is false.
See Also:
JViewport.setScrollMode(int)

scrollUnderway

boolean scrollUnderway
The scrollUnderway flag is used for components like JList. When the downarrow key is pressed on a JList and the selected cell is the last in the list, the scrollpane autoscrolls. Here, the old selected cell needs repainting and so we need a flag to make the viewport do the optimized painting only when there is an explicit call to setViewPosition(Point). When setBounds is called through other routes, the flag is off and the view repaints normally. Another approach would be to remove this from the JViewport class and have the JList manage this case by using setBackingStoreEnabled. The default is false.

viewListener

ComponentListener viewListener

scrollMode

int scrollMode
See Also:
JViewport.setScrollMode(int)
Since:
1.3

Class javax.swing.JViewport.AccessibleJViewport implements Serializable

Serialized Fields

this$0

JViewport this$0

Class javax.swing.JViewport.ViewListener implements Serializable

Serialized Fields

this$0

JViewport this$0

Class javax.swing.JWindow implements Serializable

Serialized Fields

rootPane

JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
JWindow.getRootPane(), JWindow.setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

boolean rootPaneCheckingEnabled
If true then calls to add and setLayout will cause an exception to be thrown.
See Also:
JWindow.isRootPaneCheckingEnabled(), JWindow.setRootPaneCheckingEnabled(boolean)

accessibleContext

AccessibleContext accessibleContext
The accessible context property.

Class javax.swing.JWindow.AccessibleJWindow implements Serializable

Serialized Fields

this$0

JWindow this$0

Class javax.swing.KeyStroke implements Serializable

Serialized Fields

keyChar

char keyChar

keyCode

int keyCode

modifiers

int modifiers

onKeyRelease

boolean onKeyRelease

Class javax.swing.MultiUIDefaults implements Serializable

Serialized Fields

tables

UIDefaults[] tables

Class javax.swing.OverlayLayout implements Serializable

Serialized Fields

target

Container target

xChildren

SizeRequirements[] xChildren

yChildren

SizeRequirements[] yChildren

xTotal

SizeRequirements xTotal

yTotal

SizeRequirements yTotal

Class javax.swing.ProgressMonitor.ProgressOptionPane implements Serializable

Serialized Fields

this$0

ProgressMonitor this$0

Class javax.swing.ScrollPaneLayout implements Serializable

Serialized Fields

viewport

JViewport viewport
The scrollpanes viewport child. Default is an empty JViewport.
See Also:
JScrollPane.setViewport(javax.swing.JViewport)

vsb

JScrollBar vsb
The scrollpanes vertical scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setVerticalScrollBar(javax.swing.JScrollBar)

hsb

JScrollBar hsb
The scrollpanes horizontal scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar)

rowHead

JViewport rowHead
The row header child. Default is null.
See Also:
JScrollPane.setRowHeader(javax.swing.JViewport)

colHead

JViewport colHead
The column header child. Default is null.
See Also:
JScrollPane.setColumnHeader(javax.swing.JViewport)

lowerLeft

Component lowerLeft
The component to display in the lower left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

lowerRight

Component lowerRight
The component to display in the lower right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperLeft

Component upperLeft
The component to display in the upper left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperRight

Component upperRight
The component to display in the upper right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

vsbPolicy

int vsbPolicy
The display policy for the vertical scrollbar. The default is JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED.

This field is obsolete, please use the JScrollPane field instead.

See Also:
JScrollPane.setVerticalScrollBarPolicy(int)

hsbPolicy

int hsbPolicy
The display policy for the horizontal scrollbar. The default is JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED.

This field is obsolete, please use the JScrollPane field instead.

See Also:
JScrollPane.setHorizontalScrollBarPolicy(int)

Class javax.swing.ScrollPaneLayout.UIResource implements Serializable

Class javax.swing.SizeRequirements implements Serializable

Serialized Fields

minimum

int minimum
The minimum size required. For a component comp, this should be equal to either comp.getMinimumSize().width or comp.getMinimumSize().height.

preferred

int preferred
The preferred (natural) size. For a component comp, this should be equal to either comp.getPreferredSize().width or comp.getPreferredSize().height.

maximum

int maximum
The maximum size allowed. For a component comp, this should be equal to either comp.getMaximumSize().width or comp.getMaximumSize().height.

alignment

float alignment
The alignment, specified as a value between 0.0 and 1.0, inclusive. To specify centering, the alignment should be 0.5.

Class javax.swing.SystemEventQueueUtilities.RunnableCanvas implements Serializable

Serialized Fields

runnableEvents

Vector runnableEvents

isRegistered

boolean isRegistered

Class javax.swing.SystemEventQueueUtilities.RunnableEvent implements Serializable

Serialized Fields

doRun

Runnable doRun

lock

Object lock

exception

Exception exception

Class javax.swing.SystemEventQueueUtilities.RunnableTarget implements Serializable

Class javax.swing.Timer implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList

eventQueued

boolean eventQueued

initialDelay

int initialDelay

delay

int delay

repeats

boolean repeats

coalesce

boolean coalesce

doPostEvent

Runnable doPostEvent

expirationTime

long expirationTime

nextTimer

Timer nextTimer

running

boolean running

Class javax.swing.Timer.DoPostEvent implements Serializable

Serialized Fields

this$0

Timer this$0

Class javax.swing.UIDefaults implements Serializable

Serialized Fields

changeSupport

SwingPropertyChangeSupport changeSupport

Class javax.swing.UIManager implements Serializable

Class javax.swing.UnsupportedLookAndFeelException implements Serializable

Class javax.swing.ViewportLayout implements Serializable

Package javax.swing.border

Class javax.swing.border.AbstractBorder implements Serializable

Class javax.swing.border.BevelBorder implements Serializable

Serialized Fields

bevelType

int bevelType

highlightOuter

Color highlightOuter

highlightInner

Color highlightInner

shadowInner

Color shadowInner

shadowOuter

Color shadowOuter

Class javax.swing.border.CompoundBorder implements Serializable

Serialized Fields

outsideBorder

Border outsideBorder

insideBorder

Border insideBorder

Class javax.swing.border.EmptyBorder implements Serializable

Serialized Fields

left

int left

right

int right

top

int top

bottom

int bottom

Class javax.swing.border.EtchedBorder implements Serializable

Serialized Fields

etchType

int etchType

highlight

Color highlight

shadow

Color shadow

Class javax.swing.border.LineBorder implements Serializable

Serialized Fields

thickness

int thickness

lineColor

Color lineColor

roundedCorners

boolean roundedCorners

Class javax.swing.border.MatteBorder implements Serializable

Serialized Fields

color

Color color

tileIcon

Icon tileIcon

Class javax.swing.border.SoftBevelBorder implements Serializable

Class javax.swing.border.TitledBorder implements Serializable

Serialized Fields

title

String title

border

Border border

titlePosition

int titlePosition

titleJustification

int titleJustification

titleFont

Font titleFont

titleColor

Color titleColor

textLoc

Point textLoc

Package javax.swing.colorchooser

Class javax.swing.colorchooser.AbstractColorChooserPanel implements Serializable

Serialized Fields

chooser

JColorChooser chooser

colorListener

ChangeListener colorListener

dirty

boolean dirty

Class javax.swing.colorchooser.AbstractColorChooserPanel.ModelListener implements Serializable

Serialized Fields

this$0

AbstractColorChooserPanel this$0

Class javax.swing.colorchooser.CenterLayout implements Serializable

Class javax.swing.colorchooser.DefaultColorSelectionModel implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList

selectedColor

Color selectedColor

Class javax.swing.colorchooser.DefaultHSBChooserPanel implements Serializable

Serialized Fields

hsb

float[] hsb

palette

DefaultHSBChooserPanel.AbstractHSBImage palette

sliderPalette

DefaultHSBChooserPanel.AbstractHSBImage sliderPalette

slider

JSlider slider

hField

JIntegerTextField hField

sField

JIntegerTextField sField

bField

JIntegerTextField bField

redField

JTextField redField

greenField

JTextField greenField

blueField

JTextField blueField

isAdjusting

boolean isAdjusting

isUpdatingOften

boolean isUpdatingOften

paletteSelection

Point paletteSelection

paletteLabel

JLabel paletteLabel

sliderPaletteLabel

JLabel sliderPaletteLabel

hRadio

JRadioButton hRadio

sRadio

JRadioButton sRadio

bRadio

JRadioButton bRadio

paletteImage

Image paletteImage

sliderImage

Image sliderImage

sliderType

int sliderType

Class javax.swing.colorchooser.DefaultPreviewPanel implements Serializable

Serialized Fields

squareSize

int squareSize

squareGap

int squareGap

innerGap

int innerGap

textGap

int textGap

font

Font font

sampleText

String sampleText

swatchWidth

int swatchWidth

oldColor

Color oldColor

Class javax.swing.colorchooser.DefaultRGBChooserPanel implements Serializable

Serialized Fields

redSlider

JSlider redSlider

greenSlider

JSlider greenSlider

blueSlider

JSlider blueSlider

redField

JIntegerTextField redField

blueField

JIntegerTextField blueField

greenField

JIntegerTextField greenField

minValue

int minValue

maxValue

int maxValue

isAdjusting

boolean isAdjusting

Class javax.swing.colorchooser.DefaultRGBChooserPanel.NumberListener implements Serializable

Serialized Fields

this$0

DefaultRGBChooserPanel this$0

Class javax.swing.colorchooser.DefaultSwatchChooserPanel implements Serializable

Serialized Fields

swatchPanel

SwatchPanel swatchPanel

recentSwatchPanel

RecentSwatchPanel recentSwatchPanel

mainSwatchListener

MouseListener mainSwatchListener

recentSwatchListener

MouseListener recentSwatchListener

Class javax.swing.colorchooser.DefaultSwatchChooserPanel.MainSwatchListener implements Serializable

Serialized Fields

this$0

DefaultSwatchChooserPanel this$0

Class javax.swing.colorchooser.DefaultSwatchChooserPanel.RecentSwatchListener implements Serializable

Serialized Fields

this$0

DefaultSwatchChooserPanel this$0

Class javax.swing.colorchooser.JIntegerTextField implements Serializable

Class javax.swing.colorchooser.JIntegerTextField.ValueDelta implements Serializable

Serialized Fields

this$0

JIntegerTextField this$0

delta

int delta

Class javax.swing.colorchooser.MainSwatchPanel implements Serializable

Class javax.swing.colorchooser.NumericDocument implements Serializable

Serialized Fields

min

int min

max

int max

currentVal

int currentVal

checkingEnabled

boolean checkingEnabled

Class javax.swing.colorchooser.RecentSwatchPanel implements Serializable

Class javax.swing.colorchooser.SmartGridLayout implements Serializable

Serialized Fields

rows

int rows

columns

int columns

xGap

int xGap

yGap

int yGap

componentCount

int componentCount

layoutGrid

Component[][] layoutGrid

Class javax.swing.colorchooser.SwatchPanel implements Serializable

Serialized Fields

colors

Color[] colors

swatchSize

Dimension swatchSize

numSwatches

Dimension numSwatches

gap

Dimension gap

Package javax.swing.event

Class javax.swing.event.AncestorEvent implements Serializable

Serialized Fields

ancestor

Container ancestor

ancestorParent

Container ancestorParent

Class javax.swing.event.CaretEvent implements Serializable

Class javax.swing.event.ChangeEvent implements Serializable

Class javax.swing.event.EventListenerList implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException

Class javax.swing.event.HyperlinkEvent implements Serializable

Serialized Fields

type

HyperlinkEvent.EventType type

u

URL u

desc

String desc

Class javax.swing.event.InternalFrameEvent implements Serializable

Class javax.swing.event.ListDataEvent implements Serializable

Serialized Fields

type

int type

index0

int index0

index1

int index1

Class javax.swing.event.ListSelectionEvent implements Serializable

Serialized Fields

firstIndex

int firstIndex

lastIndex

int lastIndex

isAdjusting

boolean isAdjusting

Class javax.swing.event.MenuDragMouseEvent implements Serializable

Serialized Fields

path

MenuElement[] path

manager

MenuSelectionManager manager

Class javax.swing.event.MenuEvent implements Serializable

Class javax.swing.event.MenuKeyEvent implements Serializable

Serialized Fields

path

MenuElement[] path

manager

MenuSelectionManager manager

Class javax.swing.event.PopupMenuEvent implements Serializable

Class javax.swing.event.SwingPropertyChangeSupport implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

children

Hashtable children

source

Object source

Class javax.swing.event.TableColumnModelEvent implements Serializable

Serialized Fields

fromIndex

int fromIndex
The index of the column from where it was moved or removed

toIndex

int toIndex
The index of the column to where it was moved or added from

Class javax.swing.event.TableModelEvent implements Serializable

Serialized Fields

type

int type

firstRow

int firstRow

lastRow

int lastRow

column

int column

Class javax.swing.event.TreeExpansionEvent implements Serializable

Serialized Fields

path

TreePath path
Path to the value this event represents.

Class javax.swing.event.TreeModelEvent implements Serializable

Serialized Fields

path

TreePath path
Path to the parent of the nodes that have changed.

childIndices

int[] childIndices
Indices identifying the position of where the children were.

children

Object[] children
Children that have been removed.

Class javax.swing.event.TreeSelectionEvent implements Serializable

Serialized Fields

paths

TreePath[] paths
Paths this event represents.

areNew

boolean[] areNew
For each path identifies if that is path is in fact new.

oldLeadSelectionPath

TreePath oldLeadSelectionPath
leadSelectionPath before the paths changed, may be null.

newLeadSelectionPath

TreePath newLeadSelectionPath
leadSelectionPath after the paths changed, may be null.

Class javax.swing.event.UndoableEditEvent implements Serializable

Serialized Fields

myEdit

UndoableEdit myEdit

Package javax.swing.filechooser

Class javax.swing.filechooser.FileSystemRoot implements Serializable

Package javax.swing.plaf

Class javax.swing.plaf.ActionMapUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource implements Serializable

Serialized Fields

delegate

Border delegate

Class javax.swing.plaf.BorderUIResource.BevelBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.LineBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.MatteBorderUIResource implements Serializable

Class javax.swing.plaf.BorderUIResource.TitledBorderUIResource implements Serializable

Class javax.swing.plaf.ColorUIResource implements Serializable

Class javax.swing.plaf.ComponentInputMapUIResource implements Serializable

Class javax.swing.plaf.DimensionUIResource implements Serializable

Class javax.swing.plaf.FontUIResource implements Serializable

Class javax.swing.plaf.IconUIResource implements Serializable

Serialized Fields

delegate

Icon delegate

Class javax.swing.plaf.InputMapUIResource implements Serializable

Class javax.swing.plaf.InsetsUIResource implements Serializable

Package javax.swing.plaf.basic

Class javax.swing.plaf.basic.BasicArrowButton implements Serializable

Serialized Fields

direction

int direction

Class javax.swing.plaf.basic.BasicBorders.ButtonBorder implements Serializable

Serialized Fields

shadow

Color shadow

darkShadow

Color darkShadow

highlight

Color highlight

lightHighlight

Color lightHighlight

Class javax.swing.plaf.basic.BasicBorders.FieldBorder implements Serializable

Serialized Fields

shadow

Color shadow

darkShadow

Color darkShadow

highlight

Color highlight

lightHighlight

Color lightHighlight

Class javax.swing.plaf.basic.BasicBorders.MarginBorder implements Serializable

Class javax.swing.plaf.basic.BasicBorders.MenuBarBorder implements Serializable

Serialized Fields

shadow

Color shadow

highlight

Color highlight

Class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder implements Serializable

Class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder implements Serializable

Class javax.swing.plaf.basic.BasicButtonListener.PressedAction implements Serializable

Serialized Fields

b

AbstractButton b

Class javax.swing.plaf.basic.BasicButtonListener.ReleasedAction implements Serializable

Serialized Fields

b

AbstractButton b

Class javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxRenderer implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxUI.AltAction implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxUI.DownAction implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxUI.HidePopupAction implements Serializable

Class javax.swing.plaf.basic.BasicComboBoxUI.KeyToListDispatcher implements Serializable

Serialized Fields

keyCode

int keyCode

Class javax.swing.plaf.basic.BasicComboBoxUI.UpAction implements Serializable

Class javax.swing.plaf.basic.BasicComboPopup implements Serializable

Serialized Fields

comboBox

JComboBox comboBox

list

JList list

scroller

JScrollPane scroller

valueIsAdjusting

boolean valueIsAdjusting

mouseMotionListener

MouseMotionListener mouseMotionListener

mouseListener

MouseListener mouseListener

keyListener

KeyListener keyListener

listSelectionListener

ListSelectionListener listSelectionListener

listDataListener

ListDataListener listDataListener

listMouseListener

MouseListener listMouseListener

listMouseMotionListener

MouseMotionListener listMouseMotionListener

propertyChangeListener

PropertyChangeListener propertyChangeListener

itemListener

ItemListener itemListener

autoscrollTimer

Timer autoscrollTimer

hasEntered

boolean hasEntered

isAutoScrolling

boolean isAutoScrolling

scrollDirection

int scrollDirection

lightNav

boolean lightNav

Class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDesktopPaneUI.MoveResizeAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

command

String command

Class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDesktopPaneUI.PreviousAction implements Serializable

Serialized Fields

this$0

BasicDesktopPaneUI this$0

Class javax.swing.plaf.basic.BasicDirectoryModel implements Serializable

Serialized Fields

filechooser

JFileChooser filechooser

fileCache

Vector fileCache

loadThread

BasicDirectoryModel.LoadFilesThread loadThread

files

Vector files

directories

Vector directories

fetchID

int fetchID

Class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction implements Serializable

Serialized Fields

this$0

BasicFileChooserUI this$0

Class javax.swing.plaf.basic.BasicHTML.BasicDocument implements Serializable

Serialized Fields

host

JComponent host
The host, that is where we are rendering.

Class javax.swing.plaf.basic.BasicHTML.BasicEditorKit implements Serializable

Class javax.swing.plaf.basic.BasicHTML.TaggedColor implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.CheckBoxIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.CheckBoxMenuItemIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.EmptyFrameIcon implements Serializable

Serialized Fields

height

int height

width

int width

Class javax.swing.plaf.basic.BasicIconFactory.MenuArrowIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.MenuItemArrowIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.MenuItemCheckIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.RadioButtonIcon implements Serializable

Class javax.swing.plaf.basic.BasicIconFactory.RadioButtonMenuItemIcon implements Serializable

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane implements Serializable

Serialized Fields

menuBar

JMenuBar menuBar

iconButton

JButton iconButton

maxButton

JButton maxButton

closeButton

JButton closeButton

windowMenu

JMenu windowMenu

frame

JInternalFrame frame

selectedTitleColor

Color selectedTitleColor

selectedTextColor

Color selectedTextColor

notSelectedTitleColor

Color notSelectedTitleColor

notSelectedTextColor

Color notSelectedTextColor

maxIcon

Icon maxIcon

minIcon

Icon minIcon

iconIcon

Icon iconIcon

closeIcon

Icon closeIcon

propertyChangeListener

PropertyChangeListener propertyChangeListener

closeAction

Action closeAction

maximizeAction

Action maximizeAction

iconifyAction

Action iconifyAction

restoreAction

Action restoreAction

moveAction

Action moveAction

sizeAction

Action sizeAction

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.NoFocusButton implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.ShowSystemMenuAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

show

boolean show

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar implements Serializable

Serialized Fields

this$0

BasicInternalFrameTitlePane this$0

Class javax.swing.plaf.basic.BasicLabelUI.PressAction implements Serializable

Class javax.swing.plaf.basic.BasicLabelUI.ReleaseAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.ClearSelectionAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.EndAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.HomeAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.IncrementLeadSelectionAction implements Serializable

Serialized Fields

amount

int amount
Amount to offset, subclasses will define what this means.

selectionType

int selectionType
One of CHANGE_LEAD, CHANGE_SELECTION or EXTEND_SELECTION.

Class javax.swing.plaf.basic.BasicListUI.PageDownAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.PageUpAction implements Serializable

Class javax.swing.plaf.basic.BasicListUI.SelectAllAction implements Serializable

Class javax.swing.plaf.basic.BasicLookAndFeel implements Serializable

Class javax.swing.plaf.basic.BasicMenuBarUI.RightToLeftMenuLayout implements Serializable

Class javax.swing.plaf.basic.BasicMenuBarUI.TakeFocus implements Serializable

Class javax.swing.plaf.basic.BasicMenuItemUI.ClickAction implements Serializable

Class javax.swing.plaf.basic.BasicMenuUI.CancelAction implements Serializable

Class javax.swing.plaf.basic.BasicMenuUI.PostAction implements Serializable

Serialized Fields

menu

JMenu menu

force

boolean force

Class javax.swing.plaf.basic.BasicMenuUI.ReturnAction implements Serializable

Serialized Fields

this$0

BasicMenuUI this$0

Class javax.swing.plaf.basic.BasicMenuUI.SelectChildItemAction implements Serializable

Class javax.swing.plaf.basic.BasicMenuUI.SelectNextItemAction implements Serializable

Class javax.swing.plaf.basic.BasicMenuUI.SelectParentItemAction implements Serializable

Class javax.swing.plaf.basic.BasicMenuUI.SelectPreviousItemAction implements Serializable

Class javax.swing.plaf.basic.BasicOptionPaneUI.CloseAction implements Serializable

Class javax.swing.plaf.basic.BasicRootPaneUI.DefaultAction implements Serializable

Serialized Fields

root

JRootPane root

press

boolean press

Class javax.swing.plaf.basic.BasicScrollBarUI.SharedActionScroller implements Serializable

Serialized Fields

dir

int dir

block

boolean block

Class javax.swing.plaf.basic.BasicScrollPaneUI.ScrollAction implements Serializable

Serialized Fields

orientation

int orientation
Direction to scroll.

direction

int direction
1 indicates scroll down, -1 up.

block

boolean block
True indicates a block scroll, otherwise a unit scroll.

Class javax.swing.plaf.basic.BasicScrollPaneUI.ScrollEndAction implements Serializable

Class javax.swing.plaf.basic.BasicScrollPaneUI.ScrollHomeAction implements Serializable

Class javax.swing.plaf.basic.BasicSliderUI.ActionScroller implements Serializable

Serialized Fields

this$0

BasicSliderUI this$0

dir

int dir

block

boolean block

slider

JSlider slider

Class javax.swing.plaf.basic.BasicSliderUI.SharedActionScroller implements Serializable

Serialized Fields

dir

int dir

block

boolean block

Class javax.swing.plaf.basic.BasicSplitPaneDivider implements Serializable

Serialized Fields

dragger

BasicSplitPaneDivider.DragController dragger
Handles mouse dragging message to do the actual dragging.

splitPaneUI

BasicSplitPaneUI splitPaneUI
UI this instance was created from.

dividerSize

int dividerSize
Size of the divider.

hiddenDivider

Component hiddenDivider
Divider that is used for noncontinuous layout mode.

splitPane

JSplitPane splitPane
JSplitPane the receiver is contained in.

mouseHandler

BasicSplitPaneDivider.MouseHandler mouseHandler
Handles mouse events from both this class, and the split pane. Mouse events are handled for the splitpane since you want to be able to drag when clicking on the border of the divider, which is not drawn by the divider.

orientation

int orientation
Orientation of the JSplitPane.

leftButton

JButton leftButton
Button for quickly toggling the left component.

rightButton

JButton rightButton
Button for quickly toggling the right component.

border

Border border
Border.

Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightAction implements Serializable

Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndAction implements Serializable

Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeAction implements Serializable

Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleAction implements Serializable

Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftAction implements Serializable

Class javax.swing.plaf.basic.BasicSplitPaneUI.ToggleSideFocusAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.DownAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.LeftAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.PageDownAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.PageUpAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.RequestFocusAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.RequestFocusForVisibleAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.RightAction implements Serializable

Class javax.swing.plaf.basic.BasicTabbedPaneUI.UpAction implements Serializable

Class javax.swing.plaf.basic.BasicTableUI.CancelEditingAction implements Serializable

Class javax.swing.plaf.basic.BasicTableUI.NavigationalAction implements Serializable

Serialized Fields

dx

int dx

dy

int dy

toggle

boolean toggle

extend

boolean extend

inSelection

boolean inSelection

anchorRow

int anchorRow

anchorColumn

int anchorColumn

leadRow

int leadRow

leadColumn

int leadColumn

Class javax.swing.plaf.basic.BasicTableUI.PagingAction implements Serializable

Serialized Fields

forwards

boolean forwards

vertically

boolean vertically

toLimit

boolean toLimit

Class javax.swing.plaf.basic.BasicTableUI.SelectAllAction implements Serializable

Class javax.swing.plaf.basic.BasicTableUI.StartEditingAction implements Serializable

Class javax.swing.plaf.basic.BasicTextFieldUI.BasicFieldCaret implements Serializable

Class javax.swing.plaf.basic.BasicTextUI.BasicCaret implements Serializable

Class javax.swing.plaf.basic.BasicTextUI.FocusAction implements Serializable

Serialized Fields

this$0

BasicTextUI this$0

Class javax.swing.plaf.basic.BasicToolBarUI.DownAction implements Serializable

Class javax.swing.plaf.basic.BasicToolBarUI.DragWindow implements Serializable

Serialized Fields

this$0

BasicToolBarUI this$0

borderColor

Color borderColor

orientation

int orientation

offset

Point offset

Class javax.swing.plaf.basic.BasicToolBarUI.KeyAction implements Serializable

Class javax.swing.plaf.basic.BasicToolBarUI.LeftAction implements Serializable

Class javax.swing.plaf.basic.BasicToolBarUI.RightAction implements Serializable

Class javax.swing.plaf.basic.BasicToolBarUI.UpAction implements Serializable

Class javax.swing.plaf.basic.BasicTreeUI.ScrollAction implements Serializable

Serialized Fields

component

JComponent component

direction

int direction

amount

int amount

Class javax.swing.plaf.basic.BasicTreeUI.TreeAddSelectionAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

changeAnchor

boolean changeAnchor

Class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

Class javax.swing.plaf.basic.BasicTreeUI.TreeEditAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

Class javax.swing.plaf.basic.BasicTreeUI.TreeExtendSelectionAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

Class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

direction

int direction

addToSelection

boolean addToSelection
Set to true if append to selection.

changeSelection

boolean changeSelection

Class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

direction

int direction
Specifies the direction to adjust the selection by.

addToSelection

boolean addToSelection
If true the new item is added to the selection, if false the selection is reset.

changeSelection

boolean changeSelection

Class javax.swing.plaf.basic.BasicTreeUI.TreePageAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

direction

int direction
Specifies the direction to adjust the selection by.

addToSelection

boolean addToSelection
True indicates should set selection from anchor path.

changeSelection

boolean changeSelection

Class javax.swing.plaf.basic.BasicTreeUI.TreeScrollLRAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

direction

int direction
Specifies the direction to adjust the selection by.

addToSelection

boolean addToSelection

changeSelection

boolean changeSelection

Class javax.swing.plaf.basic.BasicTreeUI.TreeSelectAllAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

selectAll

boolean selectAll

Class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

Class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction implements Serializable

Serialized Fields

this$0

BasicTreeUI this$0

direction

int direction
Determines direction to traverse, 1 means expand, -1 means collapse.

changeSelection

boolean changeSelection
True if the selection is reset, false means only the lead path changes.

Class javax.swing.plaf.basic.CenterLayout implements Serializable

Class javax.swing.plaf.basic.DefaultMenuLayout implements Serializable

Package javax.swing.plaf.metal

Class javax.swing.plaf.metal.MetalBorders.ButtonBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.Flush3DBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.MenuBarBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.MenuItemBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder implements Serializable

Serialized Fields

titleHeight

int titleHeight

Class javax.swing.plaf.metal.MetalBorders.PaletteBorder implements Serializable

Serialized Fields

titleHeight

int titleHeight

Class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder implements Serializable

Serialized Fields

editorBorderInsets

Insets editorBorderInsets

Class javax.swing.plaf.metal.MetalBorders.TextFieldBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder implements Serializable

Class javax.swing.plaf.metal.MetalBorders.ToolBarBorder implements Serializable

Serialized Fields

bumps

MetalBumps bumps

Class javax.swing.plaf.metal.MetalCheckBoxIcon implements Serializable

Class javax.swing.plaf.metal.MetalComboBoxButton implements Serializable

Serialized Fields

comboBox

JComboBox comboBox

listBox

JList listBox

rendererPane

CellRendererPane rendererPane

comboIcon

Icon comboIcon

iconOnly

boolean iconOnly

Class javax.swing.plaf.metal.MetalComboBoxEditor.EditorBorder implements Serializable

Serialized Fields

this$0

MetalComboBoxEditor this$0

Class javax.swing.plaf.metal.MetalComboBoxIcon implements Serializable

Class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup implements Serializable

Serialized Fields

this$0

MetalComboBoxUI this$0

Class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

Class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

directories

Vector directories

topIndex

int topIndex

pathCount

int pathCount

selectedDirectory

File selectedDirectory

Class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

ii

MetalFileChooserUI.IndentIcon ii

Class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

Class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

filters

FileFilter[] filters

Class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer implements Serializable

Serialized Fields

this$0

MetalFileChooserUI this$0

Class javax.swing.plaf.metal.MetalIconFactory implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.CheckBoxIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.CheckBoxMenuItemIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileChooserDetailViewIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileChooserHomeFolderIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileChooserListViewIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileChooserNewFolderIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileChooserUpFolderIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FileIcon16 implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16 implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.HorizontalSliderThumbIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.InternalFrameAltMaximizeIcon implements Serializable

Serialized Fields

iconSize

int iconSize

Class javax.swing.plaf.metal.MetalIconFactory.InternalFrameCloseIcon implements Serializable

Serialized Fields

iconSize

int iconSize

Class javax.swing.plaf.metal.MetalIconFactory.InternalFrameDefaultMenuIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.InternalFrameMaximizeIcon implements Serializable

Serialized Fields

iconSize

int iconSize

Class javax.swing.plaf.metal.MetalIconFactory.InternalFrameMinimizeIcon implements Serializable

Serialized Fields

iconSize

int iconSize

Class javax.swing.plaf.metal.MetalIconFactory.MenuArrowIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.MenuItemArrowIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.MenuItemCheckIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon implements Serializable

Serialized Fields

iconSize

int iconSize

Class javax.swing.plaf.metal.MetalIconFactory.RadioButtonIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.RadioButtonMenuItemIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.TreeComputerIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon implements Serializable

Serialized Fields

isLight

boolean isLight

Class javax.swing.plaf.metal.MetalIconFactory.TreeFloppyDriveIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.TreeHardDriveIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon implements Serializable

Class javax.swing.plaf.metal.MetalIconFactory.VerticalSliderThumbIcon implements Serializable

Class javax.swing.plaf.metal.MetalInternalFrameTitlePane implements Serializable

Serialized Fields

isPalette

boolean isPalette

paletteCloseIcon

Icon paletteCloseIcon

paletteTitleHeight

int paletteTitleHeight

buttonsWidth

int buttonsWidth

activeBumps

MetalBumps activeBumps

inactiveBumps

MetalBumps inactiveBumps

paletteBumps

MetalBumps paletteBumps

Class javax.swing.plaf.metal.MetalLookAndFeel implements Serializable

Class javax.swing.plaf.metal.MetalScrollButton implements Serializable

Serialized Fields

isFreeStanding

boolean isFreeStanding

buttonWidth

int buttonWidth

Class javax.swing.plaf.metal.MetalSplitPaneDivider implements Serializable

Serialized Fields

bumps

MetalBumps bumps

focusBumps

MetalBumps focusBumps

inset

int inset

controlColor

Color controlColor

primaryControlColor

Color primaryControlColor

Package javax.swing.plaf.multi

Class javax.swing.plaf.multi.MultiUIDefaults implements Serializable

Package javax.swing.table

Class javax.swing.table.AbstractTableModel implements Serializable

Serialized Fields

listenerList

EventListenerList listenerList
List of listeners

Class javax.swing.table.DefaultTableCellRenderer implements Serializable

Serialized Fields

unselectedForeground

Color unselectedForeground

unselectedBackground

Color unselectedBackground

Class javax.swing.table.DefaultTableCellRenderer.UIResource implements Serializable

Class javax.swing.table.DefaultTableColumnModel implements Serializable

Serialized Fields

tableColumns

Vector tableColumns
Array of TableColumn objects in this model

selectionModel

ListSelectionModel selectionModel
Model for keeping track of column selections

columnMargin

int columnMargin
Width margin between each column

listenerList

EventListenerList listenerList
List of TableColumnModelListener

columnSelectionAllowed

boolean columnSelectionAllowed
Column selection allowed in this column model

totalColumnWidth

int totalColumnWidth
A local cache of the combined width of all columns

Class javax.swing.table.DefaultTableModel implements Serializable

Serialized Fields

dataVector

Vector dataVector
The Vector of Vectors of Object values.

columnIdentifiers

Vector columnIdentifiers
The Vector of column identifiers.

Class javax.swing.table.JTableHeader implements Serializable

Serialization Methods

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject and writeObject in JComponent for more information about serialization in Swing.
Serialized Fields

table

JTable table
The table for which this object is the header; the default is null.

columnModel

TableColumnModel columnModel
The TableColumnModel of the table header.

reorderingAllowed

boolean reorderingAllowed
If true, reordering of columns are allowed by the user; the default is true.

resizingAllowed

boolean resizingAllowed
If true, resizing of columns are allowed by the user; the default is true.

updateTableInRealTime

boolean updateTableInRealTime
Obsolete as of Java 2 platform v1.3. Real time repaints, in response to column dragging or resizing, are now unconditional.

defaultRenderer

TableCellRenderer defaultRenderer
The default renderer to be used when a TableColumn does not define a headerRenderer.

Class javax.swing.table.JTableHeader.AccessibleJTableHeader implements Serializable

Serialized Fields

this$0

JTableHeader this$0

Class javax.swing.table.TableColumn implements Serializable

Serialized Fields

modelIndex

int modelIndex
The index of the column in the model which is to be displayed by this TableColumn. As columns are moved around in the view modelIndex remains constant.

identifier

Object identifier
This object is not used internally by the drawing machinery of the JTable; identifiers may be set in the TableColumn as as an optional way to tag and locate table columns. The table package does not modify or invoke any methods in these identifer objects other than the equals method which is used in the getColumnIndex() method in the DefaultTableColumnModel.

width

int width
The width of the column.

minWidth

int minWidth
The minimum width of the column.

preferredWidth

int preferredWidth
The preferred width of the column.

maxWidth

int maxWidth
The maximum width of the column.

headerRenderer

TableCellRenderer headerRenderer
The renderer used to draw the header of the column.

headerValue

Object headerValue
The header value of the column.

cellRenderer

TableCellRenderer cellRenderer
The renderer used to draw the data cells of the column.

cellEditor

TableCellEditor cellEditor
The editor used to edit the data cells of the column.

isResizable

boolean isResizable
If true, the user is allowed to resize the column; the default is true.

changeSupport

SwingPropertyChangeSupport changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.

Package javax.swing.text

Class javax.swing.text.AbstractDocument implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Serialized Fields

documentProperties

Dictionary documentProperties
Storage for document-wide properties.

listenerList

EventListenerList listenerList
The event listener list for the document.

data

AbstractDocument.Content data
Where the text is actually stored, and a set of marks that track change as the document is edited are managed.

context

AbstractDocument.AttributeContext context
Factory for the attributes. This is the strategy for attribute compression and control of the lifetime of a set of attributes as a collection. This may be shared with other documents.

Class javax.swing.text.AbstractDocument.AbstractElement implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

this$0

AbstractDocument this$0

parent

Element parent

Class javax.swing.text.AbstractDocument.BidiElement implements Serializable

Serialized Fields

this$0

AbstractDocument this$0

Class javax.swing.text.AbstractDocument.BidiRootElement implements Serializable

Serialized Fields

this$0

AbstractDocument this$0

Class javax.swing.text.AbstractDocument.BranchElement implements Serializable

Serialized Fields

this$0

AbstractDocument this$0

children

AbstractDocument.AbstractElement[] children

nchildren

int nchildren

lastIndex

int lastIndex

Class javax.swing.text.AbstractDocument.DefaultDocumentEvent implements Serializable

Serialized Fields

this$0

AbstractDocument this$0

offset

int offset

length

int length

changeLookup

Hashtable changeLookup

type

DocumentEvent.EventType type

Class javax.swing.text.AbstractDocument.ElementEdit implements Serializable

Serialized Fields

e

Element e

index

int index

removed

Element[] removed

added

Element[] added

Class javax.swing.text.AbstractDocument.LeafElement implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

this$0

AbstractDocument this$0

Class javax.swing.text.AsyncBoxView.ChildVector implements Serializable

Class javax.swing.text.BadLocationException implements Serializable

Serialized Fields

offs

int offs

Class javax.swing.text.ChangedCharSetException implements Serializable

Serialized Fields

charSetSpec

String charSetSpec

charSetKey

boolean charSetKey

Class javax.swing.text.ComponentView.Invalidator implements Serializable

Serialized Fields

this$0

ComponentView this$0

min

Dimension min

pref

Dimension pref

max

Dimension max

yalign

float yalign

xalign

float xalign

Class javax.swing.text.DefaultCaret implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

listenerList

EventListenerList listenerList
The event listener list.

component

JTextComponent component

async

boolean async
flag to indicate if async updates should move the caret.

visible

boolean visible

dot

int dot

mark

int mark

selectionTag

Object selectionTag

selectionVisible

boolean selectionVisible

flasher

Timer flasher

magicCaretPosition

Point magicCaretPosition

dotLTR

boolean dotLTR

markLTR

boolean markLTR

Class javax.swing.text.DefaultEditorKit implements Serializable

Class javax.swing.text.DefaultEditorKit.BeepAction implements Serializable

Class javax.swing.text.DefaultEditorKit.BeginAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.BeginLineAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.BeginParagraphAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.BeginWordAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.CopyAction implements Serializable

Class javax.swing.text.DefaultEditorKit.CutAction implements Serializable

Class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction implements Serializable

Class javax.swing.text.DefaultEditorKit.DeleteNextCharAction implements Serializable

Class javax.swing.text.DefaultEditorKit.DeletePrevCharAction implements Serializable

Class javax.swing.text.DefaultEditorKit.DumpModelAction implements Serializable

Class javax.swing.text.DefaultEditorKit.EndAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.EndLineAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.EndParagraphAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.EndWordAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.InsertBreakAction implements Serializable

Class javax.swing.text.DefaultEditorKit.InsertContentAction implements Serializable

Class javax.swing.text.DefaultEditorKit.InsertTabAction implements Serializable

Class javax.swing.text.DefaultEditorKit.NextVisualPositionAction implements Serializable

Serialized Fields

select

boolean select

direction

int direction

Class javax.swing.text.DefaultEditorKit.NextWordAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.PageAction implements Serializable

Serialized Fields

select

boolean select

left

boolean left

Class javax.swing.text.DefaultEditorKit.PageDownAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.PageUpAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.PasteAction implements Serializable

Class javax.swing.text.DefaultEditorKit.PreviousWordAction implements Serializable

Serialized Fields

select

boolean select

Class javax.swing.text.DefaultEditorKit.ReadOnlyAction implements Serializable

Class javax.swing.text.DefaultEditorKit.SelectAllAction implements Serializable

Class javax.swing.text.DefaultEditorKit.SelectLineAction implements Serializable

Serialized Fields

start

Action start

end

Action end

Class javax.swing.text.DefaultEditorKit.SelectParagraphAction implements Serializable

Serialized Fields

start

Action start

end

Action end

Class javax.swing.text.DefaultEditorKit.SelectWordAction implements Serializable

Serialized Fields

start

Action start

end

Action end

Class javax.swing.text.DefaultEditorKit.ToggleComponentOrientationAction implements Serializable

Class javax.swing.text.DefaultEditorKit.UnselectAction implements Serializable

Class javax.swing.text.DefaultEditorKit.WritableAction implements Serializable

Class javax.swing.text.DefaultStyledDocument implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Serialized Fields

buffer

DefaultStyledDocument.ElementBuffer buffer

Class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit implements Serializable

Serialized Fields

newAttributes

AttributeSet newAttributes

copy

AttributeSet copy

isReplacing

boolean isReplacing

element

Element element

Class javax.swing.text.DefaultStyledDocument.ElementBuffer implements Serializable

Serialized Fields

this$0

DefaultStyledDocument this$0

root

Element root

Class javax.swing.text.DefaultStyledDocument.SectionElement implements Serializable

Serialized Fields

this$0

DefaultStyledDocument this$0

Class javax.swing.text.DefaultStyledDocument.StyleChangeUndoableEdit implements Serializable

Serialized Fields

element

AbstractDocument.AbstractElement element
Element to change resolve parent of.

newStyle

Style newStyle
New style.

oldStyle

AttributeSet oldStyle
Old style, before setting newStyle.

Class javax.swing.text.EditorKit implements Serializable

Class javax.swing.text.GapContent implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

Class javax.swing.text.GapContent.InsertUndo implements Serializable

Serialized Fields

this$0

GapContent this$0

offset

int offset
Where string was inserted.

length

int length
Length of string inserted.

string

String string
The string that was inserted. This will only be valid after an undo.

posRefs

Vector posRefs
An array of instances of UndoPosRef for the Positions in the range that was removed, valid after undo.

Class javax.swing.text.GapContent.MarkVector implements Serializable

Class javax.swing.text.GapContent.RemoveUndo implements Serializable

Serialized Fields

this$0

GapContent this$0

offset

int offset
Where the string was removed from.

length

int length
Length of string removed.

string

String string
The string that was removed. This is valid when redo is valid.

posRefs

Vector posRefs
An array of instances of UndoPosRef for the Positions in the range that was removed, valid before undo.

Class javax.swing.text.GapVector implements Serializable

Serialized Fields

array

Object array
The array of items. The type is determined by the subclass.

g0

int g0
start of gap in the array

g1

int g1
end of gap in the array

Class javax.swing.text.JTextComponent implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Description copied from class: JComponent
We use the ObjectInputStream "registerValidation" callback to update the UI for the entire tree of components after they've all been read in.
Serialized Fields

model

Document model
The document model.

caretColor

Color caretColor

selectionColor

Color selectionColor

selectedTextColor

Color selectedTextColor

disabledTextColor

Color disabledTextColor

editable

boolean editable

margin

Insets margin

focusAccelerator

char focusAccelerator

canAccessSystemClipboard

boolean canAccessSystemClipboard
Indicates if it is safe to access the system clipboard. Once false, access will never be checked again.

editor

JTextComponent editor

inputMethodRequestsHandler

InputMethodRequests inputMethodRequestsHandler

composedText

AttributedString composedText

composedTextContent

String composedTextContent

composedTextStart

Position composedTextStart

composedTextEnd

Position composedTextEnd

composedTextCaret

JTextComponent.ComposedTextCaret composedTextCaret

needToSendKeyTypedEvent

boolean needToSendKeyTypedEvent

Class javax.swing.text.JTextComponent.AccessibleJTextComponent implements Serializable

Serialized Fields

this$0

JTextComponent this$0

caretPos

int caretPos

Class javax.swing.text.JTextComponent.ComposedTextCaret implements Serializable

Serialized Fields

this$0

JTextComponent this$0

bg

Color bg

Class javax.swing.text.JTextComponent.InputMethodRequestsHandler implements Serializable

Serialized Fields

this$0

JTextComponent this$0

Class javax.swing.text.JTextComponent.KeymapActionMap implements Serializable

Serialized Fields

keymap

Keymap keymap

Class javax.swing.text.JTextComponent.KeymapWrapper implements Serializable

Serialized Fields

keymap

Keymap keymap

Class javax.swing.text.JTextComponent.MutableCaretEvent implements Serializable

Serialized Fields

dragActive

boolean dragActive

dot

int dot

mark

int mark

Class javax.swing.text.PlainDocument implements Serializable

Serialized Fields

defaultRoot

AbstractDocument.AbstractElement defaultRoot

added

Vector added

removed

Vector removed

Class javax.swing.text.SimpleAttributeSet implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException

Class javax.swing.text.SimpleAttributeSet.EmptyAttributeSet implements Serializable

Class javax.swing.text.StateInvariantError implements Serializable

Class javax.swing.text.StringContent implements Serializable

Serialized Fields

data

char[] data

count

int count

Class javax.swing.text.StringContent.InsertUndo implements Serializable

Serialized Fields

this$0

StringContent this$0

offset

int offset

length

int length

string

String string

posRefs

Vector posRefs

Class javax.swing.text.StringContent.RemoveUndo implements Serializable

Serialized Fields

this$0

StringContent this$0

offset

int offset

length

int length

string

String string

posRefs

Vector posRefs

Class javax.swing.text.StyleContext implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

styles

Style styles

unusedSets

int unusedSets
Number of immutable sets that are not currently being used. This helps indicate when the sets need to be cleaned out of the hashtable they are stored in.

Class javax.swing.text.StyleContext.NamedStyle implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

this$0

StyleContext this$0

listenerList

EventListenerList listenerList
The change listeners for the model.

Class javax.swing.text.StyledEditorKit implements Serializable

Serialized Fields

currentRun

Element currentRun

currentParagraph

Element currentParagraph

inputAttributes

MutableAttributeSet inputAttributes
This is the set of attributes used to store the input attributes.

inputAttributeUpdater

StyledEditorKit.AttributeTracker inputAttributeUpdater
This listener will be attached to the caret of the text component that the EditorKit gets installed into. This should keep the input attributes updated for use by the styled actions.

Class javax.swing.text.StyledEditorKit.AlignmentAction implements Serializable

Serialized Fields

a

int a

Class javax.swing.text.StyledEditorKit.AttributeTracker implements Serializable

Serialized Fields

this$0

StyledEditorKit this$0

Class javax.swing.text.StyledEditorKit.BoldAction implements Serializable

Class javax.swing.text.StyledEditorKit.FontFamilyAction implements Serializable

Serialized Fields

family

String family

Class javax.swing.text.StyledEditorKit.FontSizeAction implements Serializable

Serialized Fields

size

int size

Class javax.swing.text.StyledEditorKit.ForegroundAction implements Serializable

Serialized Fields

fg

Color fg

Class javax.swing.text.StyledEditorKit.ItalicAction implements Serializable

Class javax.swing.text.StyledEditorKit.StyledTextAction implements Serializable

Class javax.swing.text.StyledEditorKit.UnderlineAction implements Serializable

Class javax.swing.text.TabSet implements Serializable

Serialized Fields

tabs

TabStop[] tabs
TabStops this TabSet contains.

Class javax.swing.text.TabStop implements Serializable

Serialized Fields

alignment

int alignment
Tab type.

position

float position
Location, from the left margin, that tab is at.

leader

int leader

Class javax.swing.text.TextAction implements Serializable

Package javax.swing.text.html

Class javax.swing.text.html.CommentView.CommentBorder implements Serializable

Class javax.swing.text.html.CSS implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

baseFontSize

int baseFontSize
Size used for relative units.

Class javax.swing.text.html.CSS.BackgroundImage implements Serializable

Serialized Fields

loadedImage

boolean loadedImage

image

ImageIcon image

Class javax.swing.text.html.CSS.BackgroundPosition implements Serializable

Serialized Fields

horizontalPosition

float horizontalPosition

verticalPosition

float verticalPosition

relative

short relative

Class javax.swing.text.html.CSS.BorderStyle implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException

Class javax.swing.text.html.CSS.BorderWidthValue implements Serializable

Serialized Fields

index

int index
Index into values.

Class javax.swing.text.html.CSS.ColorValue implements Serializable

Serialized Fields

c

Color c

Class javax.swing.text.html.CSS.CssValue implements Serializable

Serialized Fields

svalue

String svalue
The value as a string... before conversion to a binary format.

Class javax.swing.text.html.CSS.CssValueMapper implements Serializable

Class javax.swing.text.html.CSS.FontFamily implements Serializable

Serialized Fields

family

String family

Class javax.swing.text.html.CSS.FontSize implements Serializable

Serialized Fields

this$0

CSS this$0

value

float value

index

boolean index

lu

CSS.LengthUnit lu

Class javax.swing.text.html.CSS.FontWeight implements Serializable

Serialized Fields

weight

int weight

Class javax.swing.text.html.CSS.LengthUnit implements Serializable

Serialized Fields

type

short type

value

float value

Class javax.swing.text.html.CSS.LengthValue implements Serializable

Serialized Fields

percentage

boolean percentage
If true, span is a percentage value, and that to determine the length another value needs to be passed in.

span

float span
Either the absolute value (percentage == false) or a percentage value.

Class javax.swing.text.html.CSS.StringValue implements Serializable

Class javax.swing.text.html.HiddenTagView.EndTagBorder implements Serializable

Class javax.swing.text.html.HiddenTagView.StartTagBorder implements Serializable

Class javax.swing.text.html.HTML.UnknownTag implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException

Class javax.swing.text.html.HTMLDocument implements Serializable

Serialized Fields

frameDocument

boolean frameDocument

preservesUnknownTags

boolean preservesUnknownTags

radioButtonGroup

ButtonGroup radioButtonGroup

base

URL base
The location to resolve relative URLs against. By default this will be the document's URL if the document was loaded from a URL. If a base tag is found and can be parsed, it will be used as the base location.

parser

HTMLEditorKit.Parser parser
The parser that is used when inserting html into the existing document.

Class javax.swing.text.html.HTMLDocument.BlockElement implements Serializable

Serialized Fields

this$0

HTMLDocument this$0

Class javax.swing.text.html.HTMLDocument.RunElement implements Serializable

Serialized Fields

this$0

HTMLDocument this$0

Class javax.swing.text.html.HTMLEditorKit implements Serializable

Serialized Fields

input

MutableAttributeSet input

linkHandler

HTMLEditorKit.LinkController linkHandler

defaultCursor

Cursor defaultCursor

linkCursor

Cursor linkCursor

Class javax.swing.text.html.HTMLEditorKit.ActivateLinkAction implements Serializable

Class javax.swing.text.html.HTMLEditorKit.HTMLTextAction implements Serializable

Class javax.swing.text.html.HTMLEditorKit.InsertHRAction implements Serializable

Class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction implements Serializable

Serialized Fields

html

String html
HTML to insert.

parentTag

HTML.Tag parentTag
Tag to check for in the document.

addTag

HTML.Tag addTag
Tag in HTML to start adding tags from.

alternateParentTag

HTML.Tag alternateParentTag
Alternate Tag to check for in the document if parentTag is not found.

alternateAddTag

HTML.Tag alternateAddTag
Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.

adjustSelection

boolean adjustSelection
True indicates the selection should be adjusted after an insert.

Class javax.swing.text.html.HTMLEditorKit.LinkController implements Serializable

Serialized Fields

curElem

Element curElem

href

String href

bias

Position.Bias[] bias
This is used by viewToModel to avoid allocing a new array each time.

Class javax.swing.text.html.HTMLEditorKit.NavigateLinkAction implements Serializable

Serialized Fields

focusPainter

HTMLEditorKit.NavigateLinkAction.FocusHighlightPainter focusPainter

selectionTag

Object selectionTag

focusBack

boolean focusBack

Class javax.swing.text.html.HTMLFrameHyperlinkEvent implements Serializable

Serialized Fields

targetFrame

String targetFrame

sourceElement

Element sourceElement

Class javax.swing.text.html.Map.PolygonRegionContainment implements Serializable

Serialized Fields

percentValues

float[] percentValues
If any value is a percent there will be an entry here for the percent value. Use percentIndex to find out the index for it.

percentIndexs

int[] percentIndexs

lastWidth

int lastWidth
Last value of width passed in.

lastHeight

int lastHeight
Last value of height passed in.

Class javax.swing.text.html.Map.RectangleRegionContainment implements Serializable

Serialized Fields

percents

float[] percents
Will be non-null if one of the values is a percent, and any value that is non null indicates it is a percent (order is x, y, width, height).

lastWidth

int lastWidth
Last value of width passed in.

lastHeight

int lastHeight
Last value of height passed in.

Class javax.swing.text.html.OptionComboBoxModel implements Serializable

Serialized Fields

selectedOption

Option selectedOption

Class javax.swing.text.html.OptionListModel implements Serializable

Serialized Fields

selectionMode

int selectionMode

minIndex

int minIndex

maxIndex

int maxIndex

anchorIndex

int anchorIndex

leadIndex

int leadIndex

firstChangedIndex

int firstChangedIndex

lastChangedIndex

int lastChangedIndex

isAdjusting

boolean isAdjusting

value

BitSet value

initialValue

BitSet initialValue

listenerList

EventListenerList listenerList

leadAnchorNotificationEnabled

boolean leadAnchorNotificationEnabled

Class javax.swing.text.html.StyleSheet implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
Serialized Fields

css

CSS css

selectorMapping

Hashtable selectorMapping
An inverted graph of the selectors. Each key will be a String tag, and each value will be a Hashtable. Further the key RULE is used for the styles attached to the particular location, and SPECIFICITY is used to indicate the specificity.

resolvedStyles

Hashtable resolvedStyles
Maps from selector (as a string) to Style that includes all relevant styles.

linkedStyleSheets

Vector linkedStyleSheets
Vector of StyleSheets that the rules are to reference.

base

URL base
Where the style sheet was found. Used for relative imports.

Class javax.swing.text.html.StyleSheet.BackgroundImagePainter implements Serializable

Serialized Fields

backgroundImage

ImageIcon backgroundImage

hPosition

float hPosition

vPosition

float vPosition

flags

short flags

paintX

int paintX

paintY

int paintY

paintMaxX

int paintMaxX

paintMaxY

int paintMaxY

Class javax.swing.text.html.StyleSheet.BoxPainter implements Serializable

Serialized Fields

topMargin

float topMargin

bottomMargin

float bottomMargin

leftMargin

float leftMargin

rightMargin

float rightMargin

marginFlags

short marginFlags

border

Border border

binsets

Insets binsets

css

CSS css

ss

StyleSheet ss

bg

Color bg

bgPainter

StyleSheet.BackgroundImagePainter bgPainter

Class javax.swing.text.html.StyleSheet.LargeConversionSet implements Serializable

Serialized Fields

this$0

StyleSheet this$0

Class javax.swing.text.html.StyleSheet.ListPainter implements Serializable

Serialized Fields

start

int start

type

CSS.Value type

imageurl

URL imageurl

img

Icon img

bulletgap

int bulletgap

Class javax.swing.text.html.StyleSheet.MuxingAttributeSet implements Serializable

Serialized Fields

attrs

AttributeSet[] attrs

Class javax.swing.text.html.StyleSheet.ResolvedStyle implements Serializable

Serialized Fields

name

String name
The name of the Style, which is the selector. This will NEVER change!

extendedIndex

int extendedIndex
Start index of styles coming from other StyleSheets.

Class javax.swing.text.html.StyleSheet.SheetAttribute implements Serializable

Serialized Fields

cache

boolean cache

name

String name

Class javax.swing.text.html.StyleSheet.ViewAttributeSet implements Serializable

Serialized Fields

this$0

StyleSheet this$0

host

View host
View created for.

Class javax.swing.text.html.TextAreaDocument implements Serializable

Serialized Fields

initialText

String initialText

Package javax.swing.text.html.parser

Class javax.swing.text.html.parser.AttributeList implements Serializable

Serialized Fields

name

String name

type

int type

values

Vector values

modifier

int modifier

value

String value

next

AttributeList next

Class javax.swing.text.html.parser.ContentModel implements Serializable

Serialized Fields

type

int type
Type. Either '*', '?', '+', ',', '|', '&'.

content

Object content
The content. Either an Element or a ContentModel.

next

ContentModel next
The next content model (in a ',', '|' or '&' expression).

valSet

boolean[] valSet

val

boolean[] val

Class javax.swing.text.html.parser.Element implements Serializable

Serialized Fields

index

int index

name

String name

oStart

boolean oStart

oEnd

boolean oEnd

inclusions

BitSet inclusions

exclusions

BitSet exclusions

type

int type

content

ContentModel content

atts

AttributeList atts

data

Object data
A field to store user data. Mostly used to store style sheets.

Class javax.swing.text.html.parser.ParserDelegator implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException

Package javax.swing.text.rtf

Class javax.swing.text.rtf.RTFEditorKit implements Serializable

Package javax.swing.tree

Class javax.swing.tree.DefaultMutableTreeNode implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

parent

MutableTreeNode parent
this node's parent, or null if this node has no parent

children

Vector children
array of children, may be null if this node has no children

allowsChildren

boolean allowsChildren
true if the node is able to have children

Class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField implements Serializable

Serialized Fields

this$0

DefaultTreeCellEditor this$0

border

Border border
Border to use.

Class javax.swing.tree.DefaultTreeCellEditor.EditorContainer implements Serializable

Serialized Fields

this$0

DefaultTreeCellEditor this$0

Class javax.swing.tree.DefaultTreeCellRenderer implements Serializable

Serialized Fields

selected

boolean selected
Is the value currently selected.

hasFocus

boolean hasFocus
True if has focus.

drawsFocusBorderAroundIcon

boolean drawsFocusBorderAroundIcon
True if draws focus border around icon as well.

textSelectionColor

Color textSelectionColor
Color to use for the foreground for selected nodes.

textNonSelectionColor

Color textNonSelectionColor
Color to use for the foreground for non-selected nodes.

backgroundSelectionColor

Color backgroundSelectionColor
Color to use for the background when a node is selected.

backgroundNonSelectionColor

Color backgroundNonSelectionColor
Color to use for the background when the node isn't selected.

borderSelectionColor

Color borderSelectionColor
Color to use for the background when the node isn't selected.

Class javax.swing.tree.DefaultTreeModel implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

root

TreeNode root
Root of the tree.

listenerList

EventListenerList listenerList
Listeners.

asksAllowsChildren

boolean asksAllowsChildren
Determines how the isLeaf method figures out if a node is a leaf node. If true, a node is a leaf node if it does not allow children. (If it allows children, it is not a leaf node, even if no children are present.) That lets you distinguish between folder nodes and file nodes in a file system, for example.

If this value is false, then any node which has no children is a leaf node, and any node may acquire children.

See Also:
TreeNode.getAllowsChildren(),
TreeModel.isLeaf(java.lang.Object),
DefaultTreeModel.setAsksAllowsChildren(boolean)

Class javax.swing.tree.DefaultTreeSelectionModel implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

changeSupport

SwingPropertyChangeSupport changeSupport
Used to messaged registered listeners.

selection

TreePath[] selection
Paths that are currently selected. Will be null if nothing is currently selected.

listenerList

EventListenerList listenerList
Event listener list.

listSelectionModel

DefaultListSelectionModel listSelectionModel
Handles maintaining the list selection model. The RowMapper is used to map from a TreePath to a row, and the value is then placed here.

selectionMode

int selectionMode
Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

leadPath

TreePath leadPath
Last path that was added.

leadIndex

int leadIndex
Index of the lead path in selection.

leadRow

int leadRow
Lead row.

uniquePaths

Hashtable uniquePaths
Used to make sure the paths are unique, will contain all the paths in selection.

lastPaths

Hashtable lastPaths

tempPaths

TreePath[] tempPaths

Class javax.swing.tree.ExpandVetoException implements Serializable

Serialized Fields

event

TreeExpansionEvent event
The event that the exception was created for.

Class javax.swing.tree.FixedHeightLayoutCache.FHTreeStateNode implements Serializable

Serialized Fields

this$0

FixedHeightLayoutCache this$0

isExpanded

boolean isExpanded
Is this node expanded?

childIndex

int childIndex
Index of this node from the model.

row

int row
Row of the receiver. This is only valid if the row is expanded.

path

TreePath path
Path of this node.

Class javax.swing.tree.TreePath implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Serialized Fields

parentPath

TreePath parentPath
Path representing the parent, null if lastPathComponent represents the root.

Class javax.swing.tree.VariableHeightLayoutCache.TreeStateNode implements Serializable

Serialized Fields

this$0

VariableHeightLayoutCache this$0

preferredWidth

int preferredWidth
Preferred size needed to draw the user object.

preferredHeight

int preferredHeight

xOrigin

int xOrigin
X location that the user object will be drawn at.

yOrigin

int yOrigin
Y location that the user object will be drawn at.

expanded

boolean expanded
Is this node currently expanded?

hasBeenExpanded

boolean hasBeenExpanded
Has this node been expanded at least once?

path

TreePath path
Path of this node.

Package javax.swing.undo

Class javax.swing.undo.AbstractUndoableEdit implements Serializable

Serialized Fields

hasBeenDone

boolean hasBeenDone
Defaults to true. Becomes false if this edit is undone, true again if it is redone.

alive

boolean alive
True if this edit has not received die().

Class javax.swing.undo.CannotRedoException implements Serializable

Class javax.swing.undo.CannotUndoException implements Serializable

Class javax.swing.undo.CompoundEdit implements Serializable

Serialized Fields

inProgress

boolean inProgress
True iff this edit has never received end()

edits

Vector edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit

Class javax.swing.undo.StateEdit implements Serializable

Serialized Fields

object

StateEditable object
The object being edited

preState

Hashtable preState
The state information prior to the edit

postState

Hashtable postState
The state information after the edit

undoRedoName

String undoRedoName
The undo/redo presentation name

Class javax.swing.undo.UndoManager implements Serializable

Serialized Fields

indexOfNextAdd

int indexOfNextAdd

limit

int limit

Package javax.transaction

Class javax.transaction.InvalidTransactionException implements Serializable

Class javax.transaction.TransactionRequiredException implements Serializable

Class javax.transaction.TransactionRolledbackException implements Serializable

Package org.omg.CORBA

Class org.omg.CORBA._IDLTypeStub implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)

writeObject

private void writeObject(ObjectOutputStream s)

Class org.omg.CORBA._PolicyStub implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream s)

writeObject

private void writeObject(ObjectOutputStream s)

Class org.omg.CORBA.Any implements Serializable

Class org.omg.CORBA.BAD_CONTEXT implements Serializable

Class org.omg.CORBA.BAD_INV_ORDER implements Serializable

Class org.omg.CORBA.BAD_OPERATION implements Serializable

Class org.omg.CORBA.BAD_PARAM implements Serializable

Class org.omg.CORBA.BAD_TYPECODE implements Serializable

Class org.omg.CORBA.Bounds implements Serializable

Class org.omg.CORBA.COMM_FAILURE implements Serializable

Class org.omg.CORBA.CompletionStatus implements Serializable

Serialized Fields

_value

int _value

Class org.omg.CORBA.DATA_CONVERSION implements Serializable

Class org.omg.CORBA.DefinitionKind implements Serializable

Serialized Fields

_value

int _value
The field that holds a value for a DefinitionKind object.

Class org.omg.CORBA.FREE_MEM implements Serializable

Class org.omg.CORBA.IMP_LIMIT implements Serializable

Class org.omg.CORBA.INITIALIZE implements Serializable

Class org.omg.CORBA.Initializer implements Serializable

Serialized Fields

members

StructMember[] members
members contains the reference to all the Initializers of non abstract value types.

Class org.omg.CORBA.INTERNAL implements Serializable

Class org.omg.CORBA.INTF_REPOS implements Serializable

Class org.omg.CORBA.INV_FLAG implements Serializable

Class org.omg.CORBA.INV_IDENT implements Serializable

Class org.omg.CORBA.INV_OBJREF implements Serializable

Class org.omg.CORBA.INV_POLICY implements Serializable

Class org.omg.CORBA.INVALID_TRANSACTION implements Serializable

Class org.omg.CORBA.MARSHAL implements Serializable

Class org.omg.CORBA.NameValuePair implements Serializable

Serialized Fields

id

String id
The name to be associated with a value by this NameValuePair object.

value

Any value
The value to be associated with a name by this NameValuePair object.

Class org.omg.CORBA.NO_IMPLEMENT implements Serializable

Class org.omg.CORBA.NO_MEMORY implements Serializable

Class org.omg.CORBA.NO_PERMISSION implements Serializable

Class org.omg.CORBA.NO_RESOURCES implements Serializable

Class org.omg.CORBA.NO_RESPONSE implements Serializable

Class org.omg.CORBA.OBJ_ADAPTER implements Serializable

Class org.omg.CORBA.OBJECT_NOT_EXIST implements Serializable

Class org.omg.CORBA.PERSIST_STORE implements Serializable

Class org.omg.CORBA.PolicyError implements Serializable

Serialized Fields

reason

short reason
The reason for the PolicyError exception being thrown.

Class org.omg.CORBA.ServiceDetail implements Serializable

Serialized Fields

service_detail_type

int service_detail_type
The type of the ORB service that this ServiceDetail object represents.

service_detail

byte[] service_detail
The data describing the ORB service that this ServiceDetail object represents.

Class org.omg.CORBA.ServiceInformation implements Serializable

Serialized Fields

service_options

int[] service_options

service_details

ServiceDetail[] service_details

Class org.omg.CORBA.SetOverrideType implements Serializable

Serialized Fields

_value

int _value

Class org.omg.CORBA.StructMember implements Serializable

Serialized Fields

name

String name
The name of the struct member described by this StructMember object.

type

TypeCode type
The type of the struct member described by this StructMember object.

type_def

IDLType type_def
The typedef that represents the IDL type of the struct member described by this StructMember object.

Class org.omg.CORBA.SystemException implements Serializable

Serialized Fields

minor

int minor
The CORBA Exception minor code.

completed

CompletionStatus completed
The status of the operation that threw this exception.

Class org.omg.CORBA.TRANSACTION_REQUIRED implements Serializable

Class org.omg.CORBA.TRANSACTION_ROLLEDBACK implements Serializable

Class org.omg.CORBA.TRANSIENT implements Serializable

Class org.omg.CORBA.TypeCode implements Serializable

Class org.omg.CORBA.UnionMember implements Serializable

Serialized Fields

name

String name
The name of the union member described by this UnionMember object.

label

Any label
The label of the union member described by this UnionMember object.

type

TypeCode type
The type of the union member described by this UnionMember object.

type_def

IDLType type_def
The typedef that represents the IDL type of the union member described by this UnionMember object.

Class org.omg.CORBA.UNKNOWN implements Serializable

Class org.omg.CORBA.UnknownUserException implements Serializable

Serialized Fields

except

Any except
The Any instance that contains the actual user exception thrown by the server.

Class org.omg.CORBA.UserException implements Serializable

Class org.omg.CORBA.ValueMember implements Serializable

Serialized Fields

name

String name
The name of the value member described by this ValueMember object.

id

String id
The name of the value member described by this ValueMember object.

defined_in

String defined_in
The name of the value member described by this ValueMember object.

version

String version
The name of the value member described by this ValueMember object.

type

TypeCode type
The type of the value member described by this ValueMember object.

type_def

IDLType type_def
The typedef that represents the IDL type of the value member described by this ValueMember object.

access

short access
The type of access (public, private) for the value member described by this ValueMember object.

Class org.omg.CORBA.WrongTransaction implements Serializable

Package org.omg.CORBA.DynAnyPackage

Class org.omg.CORBA.DynAnyPackage.Invalid implements Serializable

Class org.omg.CORBA.DynAnyPackage.InvalidSeq implements Serializable

Class org.omg.CORBA.DynAnyPackage.InvalidValue implements Serializable

Class org.omg.CORBA.DynAnyPackage.TypeMismatch implements Serializable

Package org.omg.CORBA.ORBPackage

Class org.omg.CORBA.ORBPackage.InconsistentTypeCode implements Serializable

Class org.omg.CORBA.ORBPackage.InvalidName implements Serializable

Package org.omg.CORBA.portable

Class org.omg.CORBA.portable.ApplicationException implements Serializable

Serialized Fields

id

String id

ins

InputStream ins

Class org.omg.CORBA.portable.IndirectionException implements Serializable

Serialized Fields

offset

int offset
Points to the stream's offset.

Class org.omg.CORBA.portable.RemarshalException implements Serializable

Class org.omg.CORBA.portable.UnknownException implements Serializable

Serialized Fields

originalEx

Throwable originalEx
A throwable--the original exception that was wrapped in a CORBA UnknownException.

Package org.omg.CORBA.TypeCodePackage

Class org.omg.CORBA.TypeCodePackage.BadKind implements Serializable

Class org.omg.CORBA.TypeCodePackage.Bounds implements Serializable

Package org.omg.CosNaming

Class org.omg.CosNaming._BindingIteratorImplBase implements Serializable

Class org.omg.CosNaming._BindingIteratorStub implements Serializable

Class org.omg.CosNaming._NamingContextImplBase implements Serializable

Class org.omg.CosNaming._NamingContextStub implements Serializable

Class org.omg.CosNaming.Binding implements Serializable

Serialized Fields

binding_name

NameComponent[] binding_name

binding_type

BindingType binding_type

Class org.omg.CosNaming.BindingType implements Serializable

Serialized Fields

_value

int _value

Class org.omg.CosNaming.NameComponent implements Serializable

Serialized Fields

id

String id

kind

String kind

Package org.omg.CosNaming.NamingContextPackage

Class org.omg.CosNaming.NamingContextPackage.AlreadyBound implements Serializable

Class org.omg.CosNaming.NamingContextPackage.CannotProceed implements Serializable

Serialized Fields

cxt

NamingContext cxt

rest_of_name

NameComponent[] rest_of_name

Class org.omg.CosNaming.NamingContextPackage.InvalidName implements Serializable

Class org.omg.CosNaming.NamingContextPackage.NotEmpty implements Serializable

Class org.omg.CosNaming.NamingContextPackage.NotFound implements Serializable

Serialized Fields

why

NotFoundReason why

rest_of_name

NameComponent[] rest_of_name

Class org.omg.CosNaming.NamingContextPackage.NotFoundReason implements Serializable

Serialized Fields

_value

int _value

Package org.omg.stub.java.rmi

Class org.omg.stub.java.rmi._Remote_Stub implements Serializable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


T-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

T

TAB - Static variable in class java.awt.Event
The Tab key.
TabableView - interface javax.swing.text.TabableView.
Interface for View's that have size dependant upon tabs.
tabAreaBackground - Variable in class javax.swing.plaf.metal.MetalTabbedPaneUI
tabAreaInsets - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
TabbedPaneUI - class javax.swing.plaf.TabbedPaneUI.
Pluggable look and feel interface for JTabbedPane.
TabbedPaneUI() - Constructor for class javax.swing.plaf.TabbedPaneUI
tabChangeListener - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
TabExpander - interface javax.swing.text.TabExpander.
Simple interface to allow for different types of implementations of tab expansion.
tabForCoordinate(JTabbedPane, int, int) - Method in class javax.swing.plaf.TabbedPaneUI
tabForCoordinate(JTabbedPane, int, int) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
tabForCoordinate(JTabbedPane, int, int) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call tabForCoordinate on each UI handled by this MultiUI.
tabInsets - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
table - Variable in class javax.swing.table.JTableHeader
The table for which this object is the header; the default is null.
table - Variable in class javax.swing.plaf.basic.BasicTableUI
TABLE - Static variable in class javax.accessibility.AccessibleRole
An object used to present information in terms of rows and columns.
TABLE - Static variable in class javax.swing.text.html.HTML.Tag
TableCellEditor - interface javax.swing.table.TableCellEditor.
This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.
TableCellRenderer - interface javax.swing.table.TableCellRenderer.
This interface defines the method required by any object that would like to be a renderer for cells in a JTable.
tableChanged(TableModelEvent) - Method in class javax.swing.JTable
Invoked when this table's TableModel generates a TableModelEvent.
tableChanged(TableModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to the table contents
tableChanged(TableModelEvent) - Method in interface javax.swing.event.TableModelListener
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
TableColumn - class javax.swing.table.TableColumn.
A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.
TableColumn() - Constructor for class javax.swing.table.TableColumn
Cover method, using a default model index of 0, default width of 75, a null renderer and a null editor.
TableColumn(int) - Constructor for class javax.swing.table.TableColumn
Cover method, using a default width of 75, a null renderer and a null editor.
TableColumn(int, int) - Constructor for class javax.swing.table.TableColumn
Cover method, using a null renderer and a null editor.
TableColumn(int, int, TableCellRenderer, TableCellEditor) - Constructor for class javax.swing.table.TableColumn
Creates and initializes an instance of TableColumn with modelIndex.
TableColumnModel - interface javax.swing.table.TableColumnModel.
Defines the requirements for a table column model object suitable for use with JTable.
TableColumnModelEvent - class javax.swing.event.TableColumnModelEvent.
TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
TableColumnModelEvent(TableColumnModel, int, int) - Constructor for class javax.swing.event.TableColumnModelEvent
Constructs a TableColumnModelEvent object.
TableColumnModelListener - interface javax.swing.event.TableColumnModelListener.
TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.
tableColumns - Variable in class javax.swing.table.DefaultTableColumnModel
Array of TableColumn objects in this model
tableHeader - Variable in class javax.swing.JTable
The TableHeader working with the table.
TableHeaderUI - class javax.swing.plaf.TableHeaderUI.
Pluggable look and feel interface for JTableHeader.
TableHeaderUI() - Constructor for class javax.swing.plaf.TableHeaderUI
tableIndexClustered - Static variable in interface java.sql.DatabaseMetaData
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
tableIndexHashed - Static variable in interface java.sql.DatabaseMetaData
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
tableIndexOther - Static variable in interface java.sql.DatabaseMetaData
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
tableIndexStatistic - Static variable in interface java.sql.DatabaseMetaData
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
TableModel - interface javax.swing.table.TableModel.
The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.
TableModelEvent - class javax.swing.event.TableModelEvent.
TableModelEvent is used to notify listeners that a table model has changed.
TableModelEvent(TableModel) - Constructor for class javax.swing.event.TableModelEvent
All row data in the table has changed, listeners should discard any state that was based on the rows and requery the TableModel to get the new row count and all the appropriate values.
TableModelEvent(TableModel, int) - Constructor for class javax.swing.event.TableModelEvent
This row of data has been updated.
TableModelEvent(TableModel, int, int) - Constructor for class javax.swing.event.TableModelEvent
The data in rows [firstRow, lastRow] have been updated.
TableModelEvent(TableModel, int, int, int) - Constructor for class javax.swing.event.TableModelEvent
The cells in column column in the range [firstRow, lastRow] have been updated.
TableModelEvent(TableModel, int, int, int, int) - Constructor for class javax.swing.event.TableModelEvent
The cells from (firstRow, column) to (lastRow, column) have been changed.
TableModelListener - interface javax.swing.event.TableModelListener.
TableModelListener defines the interface for an object that listens to changes in a TableModel.
tableRowsDeleted(TableModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to the table contents (row deletions)
tableRowsInserted(TableModelEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to the table contents (row insertions)
TableUI - class javax.swing.plaf.TableUI.
Pluggable look and feel interface for JTable.
TableUI() - Constructor for class javax.swing.plaf.TableUI
TableView - class javax.swing.text.TableView.
Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
TableView.TableCell - class javax.swing.text.TableView.TableCell.
Deprecated. A table cell can now be any View implementation.
TableView.TableCell(TableView, Element) - Constructor for class javax.swing.text.TableView.TableCell
Deprecated. Constructs a TableCell for the given element.
TableView.TableRow - class javax.swing.text.TableView.TableRow.
View of a row in a row-centric table.
TableView.TableRow(TableView, Element) - Constructor for class javax.swing.text.TableView.TableRow
Constructs a TableView for the given element.
TableView(Element) - Constructor for class javax.swing.text.TableView
Constructs a TableView for the given element.
TABLOID - Static variable in class java.awt.PageAttributes.MediaType
An alias for LEDGER.
tabPane - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
tabPlacement - Variable in class javax.swing.JTabbedPane
Where the tabs are placed.
tabRunOverlay - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
tabRuns - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
TabSet - class javax.swing.text.TabSet.
A TabSet is comprised of many TabStops.
TabSet - Static variable in class javax.swing.text.StyleConstants
TabSet for the paragraph, type is a TabSet containing TabStops.
TabSet - Static variable in class javax.swing.text.StyleConstants.ParagraphConstants
TabSet for the paragraph.
TabSet(TabStop[]) - Constructor for class javax.swing.text.TabSet
Creates and returns an instance of TabSet.
tabSizeAttribute - Static variable in class javax.swing.text.PlainDocument
Name of the attribute that specifies the tab size for tabs contained in the content.
TabStop - class javax.swing.text.TabStop.
This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
TabStop(float) - Constructor for class javax.swing.text.TabStop
Creates a tab at position pos with a default alignment and default leader.
TabStop(float, int, int) - Constructor for class javax.swing.text.TabStop
Creates a tab with the specified position pos, alignment align and leader leader.
TAG_ACNT - Static variable in interface java.awt.font.OpenType
Accent attachment.
TAG_AVAR - Static variable in interface java.awt.font.OpenType
Axis variaiton.
TAG_BASE - Static variable in interface java.awt.font.OpenType
Baseline data.
TAG_BDAT - Static variable in interface java.awt.font.OpenType
Bitmap data.
TAG_BLOC - Static variable in interface java.awt.font.OpenType
Bitmap location.
TAG_BSLN - Static variable in interface java.awt.font.OpenType
Baseline table.
TAG_CFF - Static variable in interface java.awt.font.OpenType
Compact font format (Type1 font).
TAG_CMAP - Static variable in interface java.awt.font.OpenType
Character to glyph mapping.
TAG_CVAR - Static variable in interface java.awt.font.OpenType
CVT variation.
TAG_CVT - Static variable in interface java.awt.font.OpenType
Control value table.
TAG_DSIG - Static variable in interface java.awt.font.OpenType
Digital signature.
TAG_EBDT - Static variable in interface java.awt.font.OpenType
Embedded bitmap data.
TAG_EBLC - Static variable in interface java.awt.font.OpenType
Embedded bitmap location.
TAG_EBSC - Static variable in interface java.awt.font.OpenType
Embedded bitmap scaling.
TAG_FDSC - Static variable in interface java.awt.font.OpenType
Font descriptors.
TAG_FEAT - Static variable in interface java.awt.font.OpenType
Feature name.
TAG_FMTX - Static variable in interface java.awt.font.OpenType
Font metrics.
TAG_FPGM - Static variable in interface java.awt.font.OpenType
Font program.
TAG_FVAR - Static variable in interface java.awt.font.OpenType
Font variation.
TAG_GASP - Static variable in interface java.awt.font.OpenType
Grid-fitting and scan conversion procedure.
TAG_GDEF - Static variable in interface java.awt.font.OpenType
Glyph definition.
TAG_GLYF - Static variable in interface java.awt.font.OpenType
Glyph data.
TAG_GPOS - Static variable in interface java.awt.font.OpenType
Glyph positioning.
TAG_GSUB - Static variable in interface java.awt.font.OpenType
Glyph substitution.
TAG_GVAR - Static variable in interface java.awt.font.OpenType
Glyph variation.
TAG_HDMX - Static variable in interface java.awt.font.OpenType
Horizontal device metrics.
TAG_HEAD - Static variable in interface java.awt.font.OpenType
Font header.
TAG_HHEA - Static variable in interface java.awt.font.OpenType
Horizontal metrics header.
TAG_HMTX - Static variable in interface java.awt.font.OpenType
Horizontal metrics.
TAG_JSTF - Static variable in interface java.awt.font.OpenType
Justification.
TAG_JUST - Static variable in interface java.awt.font.OpenType
Justification.
TAG_KERN - Static variable in interface java.awt.font.OpenType
Kerning.
TAG_LCAR - Static variable in interface java.awt.font.OpenType
Ligature caret.
TAG_LOCA - Static variable in interface java.awt.font.OpenType
Index to location.
TAG_LTSH - Static variable in interface java.awt.font.OpenType
Linear threshold.
TAG_MAXP - Static variable in interface java.awt.font.OpenType
Maximum profile.
TAG_MMFX - Static variable in interface java.awt.font.OpenType
Multiple master font metrics.
TAG_MMSD - Static variable in interface java.awt.font.OpenType
Multiple master supplementary data.
TAG_MORT - Static variable in interface java.awt.font.OpenType
Glyph metamorphosis.
TAG_NAME - Static variable in interface java.awt.font.OpenType
Naming table.
TAG_OPBD - Static variable in interface java.awt.font.OpenType
Optical bounds.
TAG_OS2 - Static variable in interface java.awt.font.OpenType
OS/2 and Windows specific metrics.
TAG_PCLT - Static variable in interface java.awt.font.OpenType
PCL 5 data.
TAG_POST - Static variable in interface java.awt.font.OpenType
PostScript Information.
TAG_PREP - Static variable in interface java.awt.font.OpenType
CVT preprogram.
TAG_PROP - Static variable in interface java.awt.font.OpenType
Glyph properties.
TAG_TRAK - Static variable in interface java.awt.font.OpenType
Tracking.
TAG_TYP1 - Static variable in interface java.awt.font.OpenType
Adobe Type 1 font data.
TAG_VDMX - Static variable in interface java.awt.font.OpenType
Vertical device metrics.
TAG_VHEA - Static variable in interface java.awt.font.OpenType
Vertical metrics header.
TAG_VMTX - Static variable in interface java.awt.font.OpenType
Vertical metrics.
TagElement - class javax.swing.text.html.parser.TagElement.
A generic HTML TagElement class.
TagElement(Element) - Constructor for class javax.swing.text.html.parser.TagElement
TagElement(Element, boolean) - Constructor for class javax.swing.text.html.parser.TagElement
tailMap(Object) - Method in class java.util.TreeMap
Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
tailMap(Object) - Method in interface java.util.SortedMap
Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.
tailSet(Object) - Method in class java.util.TreeSet
Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
tailSet(Object) - Method in interface java.util.SortedSet
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.
TAIWAN - Static variable in class java.util.Locale
Useful constant for country.
TAMIL - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
tan(double) - Static method in class java.lang.StrictMath
Returns the trigonometric tangent of an angle.
tan(double) - Static method in class java.lang.Math
Returns the trigonometric tangent of an angle.
target - Variable in class java.awt.Event
The target component.
TARGET - Static variable in class javax.swing.text.html.HTML.Attribute
target() - Method in class org.omg.CORBA.Request
Retrieves the the target object reference.
TargetDataLine - interface javax.sound.sampled.TargetDataLine.
A target data line is a type of DataLine from which audio data can be read.
targetMustExist() - Method in interface javax.naming.event.EventContext
Determines whether a listener can register interest in a target that does not exist.
TC_ARRAY - Static variable in interface java.io.ObjectStreamConstants
new Array.
TC_BASE - Static variable in interface java.io.ObjectStreamConstants
First tag value.
TC_BLOCKDATA - Static variable in interface java.io.ObjectStreamConstants
Block of optional data.
TC_BLOCKDATALONG - Static variable in interface java.io.ObjectStreamConstants
long Block data.
TC_CLASS - Static variable in interface java.io.ObjectStreamConstants
Reference to Class.
TC_CLASSDESC - Static variable in interface java.io.ObjectStreamConstants
new Class Descriptor.
TC_ENDBLOCKDATA - Static variable in interface java.io.ObjectStreamConstants
End of optional block data blocks for an object.
TC_EXCEPTION - Static variable in interface java.io.ObjectStreamConstants
Exception during write.
TC_LONGSTRING - Static variable in interface java.io.ObjectStreamConstants
Long string.
TC_MAX - Static variable in interface java.io.ObjectStreamConstants
Last tag value.
TC_NULL - Static variable in interface java.io.ObjectStreamConstants
Null object reference.
TC_OBJECT - Static variable in interface java.io.ObjectStreamConstants
new Object.
TC_PROXYCLASSDESC - Static variable in interface java.io.ObjectStreamConstants
new Proxy Class Descriptor.
TC_REFERENCE - Static variable in interface java.io.ObjectStreamConstants
Reference to an object already written into the stream.
TC_RESET - Static variable in interface java.io.ObjectStreamConstants
Reset stream context.
TC_STRING - Static variable in interface java.io.ObjectStreamConstants
new String.
TCKind - class org.omg.CORBA.TCKind.
The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
TCKind(int) - Constructor for class org.omg.CORBA.TCKind
Deprecated. Do not use this constructor as this method should be private according to the OMG specification. Use TCKind.from_int(int) instead.
TCP_NODELAY - Static variable in interface java.net.SocketOptions
Disable Nagle's algorithm for this connection.
TD - Static variable in class javax.swing.text.html.HTML.Tag
TELUGU - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
TERTIARY - Static variable in class java.text.Collator
Collator strength value.
tertiaryOrder(int) - Static method in class java.text.CollationElementIterator
Return the tertiary component of a collation element.
testBit(int) - Method in class java.math.BigInteger
Returns true if and only if the designated bit is set.
text - Static variable in class java.awt.SystemColor
The background color for text components.
TEXT - Static variable in class java.awt.SystemColor
The array index for the text background color.
TEXT - Static variable in class javax.accessibility.AccessibleRole
An object that presents text to the user.
TEXT - Static variable in class javax.swing.text.html.HTML.Attribute
TEXT_ALIGN - Static variable in class javax.swing.text.html.CSS.Attribute
TEXT_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's text.
TEXT_CURSOR - Static variable in class java.awt.Cursor
The text cursor type.
TEXT_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.TEXT_CURSOR.
TEXT_DECORATION - Static variable in class javax.swing.text.html.CSS.Attribute
TEXT_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting text events.
TEXT_FIRST - Static variable in class java.awt.event.TextEvent
The first number in the range of ids used for text events.
TEXT_HIGHLIGHT - Static variable in class java.awt.SystemColor
The array index for the text highlight color.
TEXT_HIGHLIGHT_TEXT - Static variable in class java.awt.SystemColor
The array index for the text highlight text color.
TEXT_INACTIVE_TEXT - Static variable in class java.awt.SystemColor
The array index for the text inactive text color.
TEXT_INDENT - Static variable in class javax.swing.text.html.CSS.Attribute
TEXT_INSET_H - Static variable in class javax.swing.border.TitledBorder
TEXT_LAST - Static variable in class java.awt.event.TextEvent
The last number in the range of ids used for text events.
TEXT_SPACING - Static variable in class javax.swing.border.TitledBorder
TEXT_TEXT - Static variable in class java.awt.SystemColor
The array index for the text text color.
TEXT_TRANSFORM - Static variable in class javax.swing.text.html.CSS.Attribute
TEXT_VALUE_CHANGED - Static variable in class java.awt.event.TextEvent
This event id indicates that object's text changed.
text(Element) - Method in class javax.swing.text.AbstractWriter
Writes out text.
text(Element) - Method in class javax.swing.text.html.HTMLWriter
Writes out text.
text(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out text.
TextAction - class javax.swing.text.TextAction.
An Action implementation useful for key bindings that are shared across a number of different text components.
TextAction(String) - Constructor for class javax.swing.text.TextAction
Creates a new JTextAction object.
TextArea - class java.awt.TextArea.
A TextArea object is a multi-line region that displays text.
TEXTAREA - Static variable in class javax.swing.text.html.HTML.Tag
TextArea.AccessibleAWTTextArea - class java.awt.TextArea.AccessibleAWTTextArea.
This class implements accessibility support for the TextArea class.
TextArea.AccessibleAWTTextArea(TextArea) - Constructor for class java.awt.TextArea.AccessibleAWTTextArea
TextArea() - Constructor for class java.awt.TextArea
Constructs a new text area.
TextArea(int, int) - Constructor for class java.awt.TextArea
Constructs a new empty text area with the specified number of rows and columns.
TextArea(String) - Constructor for class java.awt.TextArea
Constructs a new text area with the specified text.
TextArea(String, int, int) - Constructor for class java.awt.TextArea
Constructs a new text area with the specified text, and with the specified number of rows and columns.
TextArea(String, int, int, int) - Constructor for class java.awt.TextArea
Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified.
textAreaContent(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Writes out text that is contained in a TEXTAREA form element.
textAreaContent(char[]) - Method in class javax.swing.text.html.HTMLDocument.HTMLReader
Adds the given content to the textarea document.
TextAttribute - class java.awt.font.TextAttribute.
The TextAttribute class defines attribute keys and attribute values used for text rendering.
TextAttribute(String) - Constructor for class java.awt.font.TextAttribute
Constructs a TextAttribute with the specified name.
TextComponent - class java.awt.TextComponent.
The TextComponent class is the superclass of any component that allows the editing of some text.
TextComponent.AccessibleAWTTextComponent - class java.awt.TextComponent.AccessibleAWTTextComponent.
This class implements accessibility support for the TextComponent class.
TextComponent.AccessibleAWTTextComponent(TextComponent) - Constructor for class java.awt.TextComponent.AccessibleAWTTextComponent
Constructs an AccessibleAWTTextComponent.
TextEvent - class java.awt.event.TextEvent.
A semantic event which indicates that an object's text changed.
TextEvent(Object, int) - Constructor for class java.awt.event.TextEvent
Constructs a TextEvent object.
TextField - class java.awt.TextField.
A TextField object is a text component that allows for the editing of a single line of text.
TextField.AccessibleAWTTextField - class java.awt.TextField.AccessibleAWTTextField.
This class implements accessibility support for the TextField class.
TextField.AccessibleAWTTextField(TextField) - Constructor for class java.awt.TextField.AccessibleAWTTextField
TextField() - Constructor for class java.awt.TextField
Constructs a new text field.
TextField(int) - Constructor for class java.awt.TextField
Constructs a new empty text field with the specified number of columns.
TextField(String) - Constructor for class java.awt.TextField
Constructs a new text field initialized with the specified text.
TextField(String, int) - Constructor for class java.awt.TextField
Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns.
textHighlight - Static variable in class java.awt.SystemColor
The background color for highlighted text.
textHighlightText - Static variable in class java.awt.SystemColor
The text color for highlighted text.
TextHitInfo - class java.awt.font.TextHitInfo.
The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.
textIconGap - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
textInactiveText - Static variable in class java.awt.SystemColor
The text color for inactive text.
TextLayout - class java.awt.font.TextLayout.
TextLayout is an immutable graphical representation of styled character data.
TextLayout.CaretPolicy - class java.awt.font.TextLayout.CaretPolicy.
Defines a policy for determining the strong caret location.
TextLayout.CaretPolicy() - Constructor for class java.awt.font.TextLayout.CaretPolicy
Constructs a CaretPolicy.
TextLayout(AttributedCharacterIterator, FontRenderContext) - Constructor for class java.awt.font.TextLayout
Constructs a TextLayout from an iterator over styled text.
TextLayout(String, Font, FontRenderContext) - Constructor for class java.awt.font.TextLayout
Constructs a TextLayout from a String and a Font.
TextLayout(String, Map, FontRenderContext) - Constructor for class java.awt.font.TextLayout
Constructs a TextLayout from a String and an attribute set.
textListener - Variable in class java.awt.TextComponent
TextListener - interface java.awt.event.TextListener.
The listener interface for receiving text events.
TextMeasurer - class java.awt.font.TextMeasurer.
TextMeasurer provides the primitive operations needed for line break: measuring up to a given advance, determining the advance of a range of characters, and generating a TextLayout for a range of characters.
TextMeasurer(AttributedCharacterIterator, FontRenderContext) - Constructor for class java.awt.font.TextMeasurer
Constructs a TextMeasurer from the source text.
textNonSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Color to use for the foreground for non-selected nodes.
textSelectionColor - Variable in class javax.swing.tree.DefaultTreeCellRenderer
Color to use for the foreground for selected nodes.
textText - Static variable in class java.awt.SystemColor
The text color for text components.
TextUI - class javax.swing.plaf.TextUI.
Text editor user interface
TextUI() - Constructor for class javax.swing.plaf.TextUI
TexturePaint - class java.awt.TexturePaint.
The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage.
TexturePaint(BufferedImage, Rectangle2D) - Constructor for class java.awt.TexturePaint
Constructs a TexturePaint object.
textValueChanged(TextEvent) - Method in class java.awt.AWTEventMulticaster
textValueChanged(TextEvent) - Method in class java.awt.TextComponent.AccessibleAWTTextComponent
TextListener notification of a text value change.
textValueChanged(TextEvent) - Method in interface java.awt.event.TextListener
Invoked when the value of the text has changed.
TH - Static variable in class javax.swing.text.html.HTML.Tag
THAI - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
thickness - Variable in class javax.swing.border.LineBorder
thisObject() - Method in interface javax.rmi.CORBA.Tie
Returns an object reference for the target object represented by this tie.
Thread - class java.lang.Thread.
A thread is a thread of execution in a program.
Thread() - Constructor for class java.lang.Thread
Allocates a new Thread object.
Thread(Runnable) - Constructor for class java.lang.Thread
Allocates a new Thread object.
Thread(Runnable, String) - Constructor for class java.lang.Thread
Allocates a new Thread object.
Thread(String) - Constructor for class java.lang.Thread
Allocates a new Thread object.
Thread(ThreadGroup, Runnable) - Constructor for class java.lang.Thread
Allocates a new Thread object.
Thread(ThreadGroup, Runnable, String) - Constructor for class java.lang.Thread
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
Thread(ThreadGroup, String) - Constructor for class java.lang.Thread
Allocates a new Thread object.
ThreadDeath - error java.lang.ThreadDeath.
An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
ThreadDeath() - Constructor for class java.lang.ThreadDeath
ThreadGroup - class java.lang.ThreadGroup.
A thread group represents a set of threads.
ThreadGroup(String) - Constructor for class java.lang.ThreadGroup
Constructs a new thread group.
ThreadGroup(ThreadGroup, String) - Constructor for class java.lang.ThreadGroup
Creates a new thread group.
ThreadLocal - class java.lang.ThreadLocal.
This class provides ThreadLocal variables.
ThreadLocal() - Constructor for class java.lang.ThreadLocal
Creates a ThreadLocal variable.
Throwable - class java.lang.Throwable.
The Throwable class is the superclass of all errors and exceptions in the Java language.
Throwable() - Constructor for class java.lang.Throwable
Constructs a new Throwable with null as its error message string.
Throwable(String) - Constructor for class java.lang.Throwable
Constructs a new Throwable with the specified error message.
thumbColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
thumbColor - Static variable in class javax.swing.plaf.metal.MetalSliderUI
thumbDarkShadowColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
thumbHighlightColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
thumbLightShadowColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
thumbRect - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
thumbRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
THURSDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Thursday.
TIBETAN - Static variable in class java.lang.Character.UnicodeBlock
Constant for the Unicode character block of the same name.
TICK_BUFFER - Variable in class javax.swing.plaf.metal.MetalSliderUI
tickLength - Static variable in class javax.swing.plaf.metal.MetalSliderUI
tickRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
ticks() - Method in class javax.sound.midi.Track
Obtains the length of the track, expressed in MIDI ticks.
Tie - interface javax.rmi.CORBA.Tie.
Defines methods which all RMI-IIOP server side ties must implement.
tileIcon - Variable in class javax.swing.border.MatteBorder
TileObserver - interface java.awt.image.TileObserver.
An interface for objects that wish to be informed when tiles of a WritableRenderedImage become modifiable by some writer via a call to getWritableTile, and when they become unmodifiable via the last call to releaseWritableTile.
tileUpdate(WritableRenderedImage, int, int, boolean) - Method in interface java.awt.image.TileObserver
A tile is about to be updated (it is either about to be grabbed for writing, or it is being released from writing).
time - Variable in class java.util.Calendar
The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
Time - class java.sql.Time.
A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
TIME - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.
Time(int, int, int) - Constructor for class java.sql.Time
Deprecated. Use the constructor that takes a milliseconds value in place of this constructor
Time(long) - Constructor for class java.sql.Time
Constructs a Time object using a milliseconds time value.
TimeLimitExceededException - exception javax.naming.TimeLimitExceededException.
This exception is thrown when a method does not terminate within the specified time limit.
TimeLimitExceededException() - Constructor for class javax.naming.TimeLimitExceededException
Constructs a new instance of TimeLimitExceededException.
TimeLimitExceededException(String) - Constructor for class javax.naming.TimeLimitExceededException
Constructs a new instance of TimeLimitExceededException using the argument supplied.
timer - Variable in class javax.swing.tree.DefaultTreeCellEditor
Used before starting the editing session.
timer - Variable in class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
Timer used when inside a scrollpane and the scrollbar is adjusting.
Timer - class java.util.Timer.
A facility for threads to schedule tasks for future execution in a background thread.
Timer - class javax.swing.Timer.
Causes an action to occur at a predefined rate.
Timer() - Constructor for class java.util.Timer
Creates a new timer.
Timer(boolean) - Constructor for class java.util.Timer
Creates a new timer whose associated thread may be specified to run as a daemon.
Timer(int, ActionListener) - Constructor for class javax.swing.Timer
Creates a Timer that will notify its listeners every delay milliseconds.
TimerTask - class java.util.TimerTask.
A task that can be scheduled for one-time or repeated execution by a Timer.
TimerTask() - Constructor for class java.util.TimerTask
Creates a new timer task.
Timestamp - class java.sql.Timestamp.
A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
TIMESTAMP - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.
Timestamp(int, int, int, int, int, int, int) - Constructor for class java.sql.Timestamp
Deprecated. instead use the constructor Timestamp(long millis)
Timestamp(long) - Constructor for class java.sql.Timestamp
Constructs a Timestamp object using a milliseconds time value.
TimeZone - class java.util.TimeZone.
TimeZone represents a time zone offset, and also figures out daylight savings.
TIMEZONE_FIELD - Static variable in class java.text.DateFormat
Useful constant for TIMEZONE field alignment.
TimeZone() - Constructor for class java.util.TimeZone
Sole constructor.
TIMING_CLOCK - Static variable in class javax.sound.midi.ShortMessage
Status byte for Timing Clock messagem (0xF8, or 248).
TINYINT - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.
title - Variable in class javax.swing.JInternalFrame
The title displayed in the frame's title bar.
title - Variable in class javax.swing.border.TitledBorder
title - Variable in class javax.swing.text.html.parser.DTD
TITLE - Static variable in class javax.swing.text.html.HTML.Tag
TITLE - Static variable in class javax.swing.text.html.HTML.Attribute
TITLE_PROPERTY - Static variable in class javax.swing.JInternalFrame
Bound property name.
TITLECASE_LETTER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
titleColor - Variable in class javax.swing.border.TitledBorder
TitledBorder - class javax.swing.border.TitledBorder.
A class which implements an arbitrary border with the addition of a String title in a specified position and justification.
TitledBorder(Border) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance with the specified border and an empty title.
TitledBorder(Border, String) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance with the specified border and title.
TitledBorder(Border, String, int, int) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
TitledBorder(Border, String, int, int, Font) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder(Border, String, int, int, Font, Color) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
TitledBorder(String) - Constructor for class javax.swing.border.TitledBorder
Creates a TitledBorder instance.
titleFont - Variable in class javax.swing.border.TitledBorder
titleJustification - Variable in class javax.swing.border.TitledBorder
titlePane - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
titlePosition - Variable in class javax.swing.border.TitledBorder
TitleProperty - Static variable in interface javax.swing.text.Document
The property name for the title of the document, if there is one.
tk_abstract_interface - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.
tk_alias - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_alias.
tk_any - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_any.
tk_array - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_array.
tk_boolean - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_boolean.
tk_char - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_char.
tk_double - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_double.
tk_enum - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_enum.
tk_except - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_except.
tk_fixed - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_fixed.
tk_float - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_float.
tk_long - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_long.
tk_longdouble - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_longdouble.
tk_longlong - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_longlong.
tk_native - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_native.
tk_null - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_null.
tk_objref - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_objref.
tk_octet - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_octet.
tk_Principal - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_Principal.
tk_sequence - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_sequence.
tk_short - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_short.
tk_string - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_string.
tk_struct - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_struct.
tk_TypeCode - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.
tk_ulong - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_ulong.
tk_ulonglong - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.
tk_union - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_union.
tk_ushort - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_ushort.
tk_value - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_value.
tk_value_box - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_value_box.
tk_void - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_void.
tk_wchar - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_wchar.
tk_wstring - Static variable in class org.omg.CORBA.TCKind
The TCKind constant whose value field is initialized with TCKind._tk_wstring.
to_any() - Method in interface org.omg.CORBA.DynAny
Convert a DynAny object to an Any object.
toArray() - Method in class java.awt.dnd.DragGestureEvent
This method returns an Object array of the events comprising the drag gesture.
toArray() - Method in class java.beans.beancontext.BeanContextMembershipEvent
Gets the array of children affected by this event.
toArray() - Method in class java.beans.beancontext.BeanContextSupport
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
toArray() - Method in class java.util.AbstractCollection
Returns an array containing all of the elements in this collection.
toArray() - Method in class java.util.Vector
Returns an array containing all of the elements in this Vector in the correct order.
toArray() - Method in interface java.util.Collection
Returns an array containing all of the elements in this collection.
toArray() - Method in interface java.util.Set
Returns an array containing all of the elements in this set.
toArray() - Method in class java.util.LinkedList
Returns an array containing all of the elements in this list in the correct order.
toArray() - Method in interface java.util.List
Returns an array containing all of the elements in this list in proper sequence.
toArray() - Method in class java.util.ArrayList
Returns an array containing all of the elements in this list in the correct order.
toArray() - Method in class javax.accessibility.AccessibleStateSet
Returns the current state set as an array of AccessibleState
toArray() - Method in class javax.accessibility.AccessibleRelationSet
Returns the current relation set as an array of AccessibleRelation
toArray() - Method in class javax.swing.DefaultListModel
Returns an array containing all of the elements in this list in the correct order.
toArray(Object[]) - Method in class java.awt.dnd.DragGestureEvent
This method returns an array of the events comprising the drag gesture.
toArray(Object[]) - Method in class java.beans.beancontext.BeanContextSupport
Gets an array containing all children of this BeanContext that match the types contained in arry.
toArray(Object[]) - Method in class java.util.AbstractCollection
Returns an array with a runtime type is that of the specified array and that contains all of the elements in this collection.
toArray(Object[]) - Method in class java.util.Vector
Returns an array containing all of the elements in this Vector in the correct order.
toArray(Object[]) - Method in interface java.util.Collection
Returns an array containing all of the elements in this collection whose runtime type is that of the specified array.
toArray(Object[]) - Method in interface java.util.Set
Returns an array containing all of the elements in this set whose runtime type is that of the specified array.
toArray(Object[]) - Method in class java.util.LinkedList
Returns an array containing all of the elements in this list in the correct order.
toArray(Object[]) - Method in interface java.util.List
Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.
toArray(Object[]) - Method in class java.util.ArrayList
Returns an array containing all of the elements in this list in the correct order.
toBack() - Method in class java.awt.Window
Sends this window to the back.
toBack() - Method in class javax.swing.JInternalFrame
Sends this internal frame to the back.
toBigInteger() - Method in class java.math.BigDecimal
Converts this BigDecimal to a BigInteger.
toBinaryString(int) - Static method in class java.lang.Integer
Creates a string representation of the integer argument as an unsigned integer in base 2.
toBinaryString(long) - Static method in class java.lang.Long
Creates a string representation of the long argument as an unsigned integer in base 2.
toByteArray() - Method in class java.io.ByteArrayOutputStream
Creates a newly allocated byte array.
toByteArray() - Method in class java.math.BigInteger
Returns a byte array containing the two's-complement representation of this BigInteger.
toByteArray() - Method in class java.text.CollationKey
Converts the CollationKey to a sequence of bits.
toCharArray() - Method in class java.io.CharArrayWriter
Returns a copy of the input data.
toCharArray() - Method in class java.lang.String
Converts this string to a new character array.
toCIEXYZ(float[]) - Method in class java.awt.color.ColorSpace
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
toCIEXYZ(float[]) - Method in class java.awt.color.ICC_ColorSpace
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
toDegrees(double) - Static method in class java.lang.StrictMath
Converts an angle measured in radians to the equivalent angle measured in degrees.
toDegrees(double) - Static method in class java.lang.Math
Converts an angle measured in radians to the equivalent angle measured in degrees.
toDisplayString() - Method in class javax.accessibility.AccessibleBundle
Gets localized string describing the key using the default locale.
toDisplayString(Locale) - Method in class javax.accessibility.AccessibleBundle
Obtains the key as a localized string.
toDisplayString(String, Locale) - Method in class javax.accessibility.AccessibleBundle
Obtains the key as a localized string.
toExternalForm() - Method in class java.net.URL
Constructs a string representation of this URL.
toExternalForm(URL) - Method in class java.net.URLStreamHandler
Converts a URL of a specific protocol to a String.
toFront() - Method in class java.awt.Window
Brings this window to the front.
toFront() - Method in class javax.swing.JInternalFrame
Brings this internal frame to the front.
TOGGLE_BUTTON - Static variable in class javax.accessibility.AccessibleRole
A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
TOGGLE_CLICK_COUNT_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for toggleClickCount.
toggleClickCount - Variable in class javax.swing.JTree
Number of mouse clicks before a node is expanded.
toggleExpandState(TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Expands path if it is not expanded, or collapses row if it is expanded.
toggleOpenClose() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Hides the popup if it is showing and shows the popup if it is hidden.
togglePopup() - Method in class javax.swing.plaf.basic.BasicComboPopup
Makes the popup visible if it is hidden and makes it hidden if it is visible.
toGMTString() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.
toHexString(int) - Static method in class java.lang.Integer
Creates a string representation of the integer argument as an unsigned integer in base 16.
toHexString(long) - Static method in class java.lang.Long
Creates a string representation of the long argument as an unsigned integer in base 16.
toIndex - Variable in class javax.swing.event.TableColumnModelEvent
The index of the column to where it was moved or added from
toLocaleString() - Method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date).
toLocalizedPattern() - Method in class java.text.SimpleDateFormat
Return a localized pattern string describing this date format.
toLocalizedPattern() - Method in class java.text.DecimalFormat
Synthesizes a localized pattern string that represents the current state of this Format object.
toLowerCase() - Method in class java.lang.String
Converts all of the characters in this String to lower case using the rules of the default locale, which is returned by Locale.getDefault.
toLowerCase(char) - Static method in class java.lang.Character
The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned.
toLowerCase(Locale) - Method in class java.lang.String
Converts all of the characters in this String to lower case using the rules of the given Locale.
toOctalString(int) - Static method in class java.lang.Integer
Creates a string representation of the integer argument as an unsigned integer in base 8.
toOctalString(long) - Static method in class java.lang.Long
Creates a string representation of the long argument as an unsigned integer in base 8.
TOOL_BAR - Static variable in class javax.accessibility.AccessibleRole
A bar or palette usually composed of push buttons or toggle buttons.
TOOL_TIP - Static variable in class javax.accessibility.AccessibleRole
An object that provides information about another object.
TOOL_TIP_TEXT_KEY - Static variable in class javax.swing.JComponent
The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".
toolBar - Variable in class javax.swing.plaf.basic.BasicToolBarUI
toolBar - Variable in class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
toolBarContListener - Variable in class javax.swing.plaf.basic.BasicToolBarUI
toolBarFocusListener - Variable in class javax.swing.plaf.basic.BasicToolBarUI
ToolBarUI - class javax.swing.plaf.ToolBarUI.
Pluggable look and feel interface for JToolBar.
ToolBarUI() - Constructor for class javax.swing.plaf.ToolBarUI
Toolkit - class java.awt.Toolkit.
This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.
Toolkit() - Constructor for class java.awt.Toolkit
ToolTipManager - class javax.swing.ToolTipManager.
Manages all the ToolTips in the system.
ToolTipManager.insideTimerAction - class javax.swing.ToolTipManager.insideTimerAction.
ToolTipManager.insideTimerAction(ToolTipManager) - Constructor for class javax.swing.ToolTipManager.insideTimerAction
ToolTipManager.outsideTimerAction - class javax.swing.ToolTipManager.outsideTimerAction.
ToolTipManager.outsideTimerAction(ToolTipManager) - Constructor for class javax.swing.ToolTipManager.outsideTimerAction
ToolTipManager.stillInsideTimerAction - class javax.swing.ToolTipManager.stillInsideTimerAction.
ToolTipManager.stillInsideTimerAction(ToolTipManager) - Constructor for class javax.swing.ToolTipManager.stillInsideTimerAction
ToolTipUI - class javax.swing.plaf.ToolTipUI.
Pluggable look and feel interface for JToolTip.
ToolTipUI() - Constructor for class javax.swing.plaf.ToolTipUI
TooManyListenersException - exception java.util.TooManyListenersException.
The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
TooManyListenersException() - Constructor for class java.util.TooManyListenersException
Constructs a TooManyListenersException with no detail message.
TooManyListenersException(String) - Constructor for class java.util.TooManyListenersException
Constructs a TooManyListenersException with the specified detail message.
top - Variable in class java.awt.Insets
The inset from the top.
top - Variable in class javax.swing.border.EmptyBorder
TOP - Static variable in interface javax.swing.SwingConstants
Box-orientation constant used to specify the top of a box.
TOP - Static variable in class javax.swing.JSplitPane
Used to add a Component above the other Component.
TOP - Static variable in class javax.swing.border.TitledBorder
Position the title in the middle of the border's top line.
TOP_ALIGNMENT - Static variable in class java.awt.Component
Ease-of-use constant for getAlignmentY().
TOP_ALIGNMENT - Static variable in class java.awt.font.GraphicAttribute
Aligns top of graphic to top of line.
toPattern() - Method in class java.text.ChoiceFormat
Gets the pattern.
toPattern() - Method in class java.text.SimpleDateFormat
Return a pattern string describing this date format.
toPattern() - Method in class java.text.DecimalFormat
Synthesizes a pattern string that represents the current state of this Format object.
toPattern() - Method in class java.text.MessageFormat
Gets the pattern.
TOPDOWNLEFTRIGHT - Static variable in interface java.awt.image.ImageConsumer
The pixels will be delivered in top-down, left-to-right order.
toRadians(double) - Static method in class java.lang.StrictMath
Converts an angle measured in degrees to the equivalent angle measured in radians.
toRadians(double) - Static method in class java.lang.Math
Converts an angle measured in degrees to the equivalent angle measured in radians.
toRGB(float[]) - Method in class java.awt.color.ColorSpace
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
toRGB(float[]) - Method in class java.awt.color.ICC_ColorSpace
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
toString() - Method in class java.awt.Component
Returns a string representation of this component and its values.
toString() - Method in class java.awt.Event
Returns a representation of this event's values as a string.
toString() - Method in class java.awt.CardLayout
Returns a string representation of the state of this card layout.
toString() - Method in class java.awt.MenuComponent
Returns a representation of this menu component as a string.
toString() - Method in class java.awt.FontMetrics
Returns a representation of this FontMetrics object's values as a String.
toString() - Method in class java.awt.Graphics
Returns a String object representing this Graphics object's value.
toString() - Method in class java.awt.MenuShortcut
Returns an internationalized description of the MenuShortcut.
toString() - Method in class java.awt.GridLayout
Returns the string representation of this grid layout's values.
toString() - Method in class java.awt.BorderLayout
Returns a string representation of the state of this border layout.
toString() - Method in class java.awt.Insets
Returns a string representation of this Insets object.
toString() - Method in class java.awt.Font
Converts this Font object to a String representation.
toString() - Method in class java.awt.RenderingHints
Returns a rather long string representation of the hashmap which contains the mappings of keys to values for this RenderingHints object.
toString() - Method in class java.awt.Point
Returns a string representation of this point and its location in the (x, y) coordinate space.
toString() - Method in class java.awt.Color
Returns a string representation of this Color.
toString() - Method in class java.awt.CheckboxGroup
Returns a string representation of this check box group, including the value of its current selection.
toString() - Method in class java.awt.Cursor
Returns a string representation of this cursor.
toString() - Method in class java.awt.Dimension
Returns a string representation of the values of this Dimension object's height and width fields.
toString() - Method in class java.awt.GridBagLayout
Returns a string representation of this grid bag layout's values.
toString() - Method in class java.awt.PageAttributes
Returns a string representation of this PageAttributes.
toString() - Method in class java.awt.JobAttributes
Returns a string representation of this JobAttributes.
toString() - Method in class java.awt.AWTEvent
toString() - Method in class java.awt.Rectangle
Returns a String representing this Rectangle and its values.
toString() - Method in class java.awt.FlowLayout
Returns a string representation of this FlowLayout object and its values.
toString() - Method in class java.awt.SystemColor
Returns the String representation of this Color's values.
toString() - Method in class java.awt.Robot
Returns a string representation of this Robot.
toString() - Method in class java.awt.datatransfer.DataFlavor
String representation of this DataFlavor and its parameters.
toString() - Method in class java.awt.font.TextLayout
Returns debugging information for this TextLayout.
toString() - Method in class java.awt.font.TextHitInfo
Returns a String representing the hit for debugging use only.
toString() - Method in class java.awt.geom.Rectangle2D.Float
Returns the String representation of this Rectangle2D.
toString() - Method in class java.awt.geom.Rectangle2D.Double
Returns the String representation of this Rectangle2D.
toString() - Method in class java.awt.geom.Point2D.Float
Returns a String that represents the value of this Point2D.
toString() - Method in class java.awt.geom.Point2D.Double
Returns a String that represents the value of this Point2D.
toString() - Method in class java.awt.geom.AffineTransform
Returns a String that represents the value of this Object.
toString() - Method in class java.awt.image.BufferedImage
Returns a String representation of this BufferedImage object and its values.
toString() - Method in class java.awt.image.ColorModel
Returns the String representation of the contents of this ColorModelobject.
toString() - Method in class java.awt.image.DirectColorModel
Returns a String that represents this DirectColorModel.
toString() - Method in class java.awt.image.IndexColorModel
Returns the String representation of the contents of this ColorModelobject.
toString() - Method in class java.io.StreamTokenizer
Returns the string representation of the current stream token.
toString() - Method in class java.io.File
Returns the pathname string of this abstract pathname.
toString() - Method in class java.io.StringWriter
Return the buffer's current value as a string.
toString() - Method in class java.io.ObjectStreamClass
Return a string describing this ObjectStreamClass.
toString() - Method in class java.io.ObjectStreamField
Return a string that describes this field.
toString() - Method in class java.io.CharArrayWriter
Converts input data to a string.
toString() - Method in class java.io.ByteArrayOutputStream
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
toString() - Method in class java.lang.Object
Returns a string representation of the object.
toString() - Method in class java.lang.Throwable
Returns a short description of this throwable object.
toString() - Method in class java.lang.Character
Returns a String object representing this character's value.
toString() - Method in class java.lang.Character.Subset
Returns the name of this subset.
toString() - Method in class java.lang.Long
Returns a String object representing this Long's value.
toString() - Method in class java.lang.ThreadGroup
Returns a string representation of this Thread group.
toString() - Method in class java.lang.Thread
Returns a string representation of this thread, including the thread's name, priority, and thread group.
toString() - Method in class java.lang.Short
Returns a String object representing this Short's value.
toString() - Method in class java.lang.String
This object (which is already a string!) is itself returned.
toString() - Method in class java.lang.Float
Returns a String representation of this Float object.
toString() - Method in class java.lang.Integer
Returns a String object representing this Integer's value.
toString() - Method in class java.lang.StringBuffer
Converts to a string representing the data in this string buffer.
toString() - Method in class java.lang.Package
Returns the string representation of this Package.
toString() - Method in class java.lang.Byte
Returns a String object representing this Byte's value.
toString() - Method in class java.lang.Class
Converts the object to a string.
toString() - Method in class java.lang.Double
Returns a String representation of this Double object.
toString() - Method in class java.lang.Boolean
Returns a String object representing this Boolean's value.
toString() - Method in class java.lang.reflect.Method
Returns a string describing this Method.
toString() - Method in class java.lang.reflect.Field
Returns a string describing this Field.
toString() - Method in class java.lang.reflect.Constructor
Returns a string describing this Constructor.
toString() - Method in class java.math.BigInteger
Returns the decimal String representation of this BigInteger.
toString() - Method in class java.math.BigDecimal
Returns the string representation of this BigDecimal.
toString() - Method in class java.net.URLConnection
Returns a String representation of this URL connection.
toString() - Method in class java.net.SocketImpl
Returns the address and port of this socket as a String.
toString() - Method in class java.net.Socket
Converts this socket to a String.
toString() - Method in class java.net.URL
Constructs a string representation of this URL.
toString() - Method in class java.net.ServerSocket
Returns the implementation address and implementation port of this socket as a String.
toString() - Method in class java.net.InetAddress
Converts this IP address to a String.
toString() - Method in class java.rmi.dgc.VMID
Return string representation of this VMID.
toString() - Method in class java.rmi.server.RemoteObject
Returns a String that represents the value of this remote object.
toString() - Method in class java.rmi.server.UID
Returns the string representation of the UID.
toString() - Method in class java.rmi.server.ObjID
Returns a string containing the object id representation.
toString() - Method in class java.rmi.server.Operation
Deprecated. no replacement
toString() - Method in class java.rmi.server.LogStream
Deprecated. no replacement
toString() - Method in class java.security.Permission
Returns a string describing this Permission.
toString() - Method in class java.security.Provider
Returns a string with the name and the version number of this provider.
toString() - Method in class java.security.CodeSource
Returns a string describing this CodeSource, telling its URL and certificates.
toString() - Method in class java.security.UnresolvedPermission
Returns a string describing this UnresolvedPermission.
toString() - Method in class java.security.Identity
Deprecated. Returns a short string describing this identity, telling its name and its scope (if any).
toString() - Method in class java.security.Signer
Deprecated. Returns a string of information about the signer.
toString() - Method in class java.security.PrivilegedActionException
Returns a string describing this exception, including a description of the exception it wraps.
toString() - Method in class java.security.ProtectionDomain
Convert a ProtectionDomain to a String.
toString() - Method in class java.security.AlgorithmParameters
Returns a formatted string describing the parameters.
toString() - Method in class java.security.PermissionCollection
Returns a string describing this PermissionCollection object, providing information about all the permissions it contains.
toString() - Method in class java.security.MessageDigest
Returns a string representation of this message digest object.
toString() - Method in class java.security.DigestOutputStream
Prints a string representation of this digest output stream and its associated message digest object.
toString() - Method in class java.security.Signature
Returns a string representation of this signature object, providing information that includes the state of the object and the name of the algorithm used.
toString() - Method in class java.security.DigestInputStream
Prints a string representation of this digest input stream and its associated message digest object.
toString() - Method in interface java.security.Principal
Returns a string representation of this principal.
toString() - Method in class java.security.IdentityScope
Deprecated. Returns a string representation of this identity scope, including its name, its scope name, and the number of identities in this identity scope.
toString() - Method in interface java.security.acl.AclEntry
Returns a string representation of the contents of this ACL entry.
toString() - Method in interface java.security.acl.Permission
Prints a string representation of this permission.
toString() - Method in interface java.security.acl.Acl
Returns a string representation of the ACL contents.
toString() - Method in class java.security.cert.Certificate
Returns a string representation of this certificate.
toString() - Method in class java.security.cert.CRL
Returns a string representation of this CRL.
toString() - Method in class java.security.cert.X509CRLEntry
Returns a string representation of this CRL entry.
toString() - Method in class java.sql.Timestamp
Formats a timestamp in JDBC timestamp escape format.
toString() - Method in class java.sql.Date
Formats a date in the date escape format yyyy-mm-dd.
toString() - Method in class java.sql.Time
Formats a time in JDBC date escape format
toString() - Method in class java.text.AttributedCharacterIterator.Attribute
Returns a string representation of the object.
toString() - Method in class java.text.ParsePosition
Return a string representation of this ParsePosition.
toString() - Method in class java.text.FieldPosition
Return a string representation of this FieldPosition.
toString() - Method in class java.text.Annotation
Returns the String representation of this Annotation.
toString() - Method in class java.util.EventObject
Returns a String representation of this EventObject.
toString() - Method in class java.util.Hashtable
Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space).
toString() - Method in class java.util.Date
Converts this Date object to a String of the form:
toString() - Method in class java.util.BitSet
Returns a string representation of this bit set.
toString() - Method in class java.util.AbstractCollection
Returns a string representation of this collection.
toString() - Method in class java.util.AbstractMap
Returns a string representation of this map.
toString() - Method in class java.util.Vector
Returns a string representation of this Vector, containing the String representation of each element.
toString() - Method in class java.util.SimpleTimeZone
Return a string representation of this time zone.
toString() - Method in class java.util.Calendar
Return a string representation of this calendar.
toString() - Method in class java.util.Locale
Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars.
toString() - Method in class java.util.jar.Attributes.Name
Returns the attribute name as a String.
toString() - Method in class java.util.zip.ZipEntry
Returns a string representation of the ZIP entry.
toString() - Method in class javax.accessibility.AccessibleBundle
Gets localized string describing the key using the default locale.
toString() - Method in class javax.accessibility.AccessibleStateSet
Creates a localized String representing all the states in the set using the default locale.
toString() - Method in class javax.accessibility.AccessibleRelationSet
Creates a localized String representing all the relations in the set using the default locale.
toString() - Method in class javax.sound.sampled.Line.Info
Obtains a textual description of the line info.
toString() - Method in class javax.sound.sampled.DataLine.Info
Obtains a textual description of the data line info.
toString() - Method in class javax.sound.sampled.Control
Obtains a String describing the control type and its current state.
toString() - Method in class javax.sound.sampled.Control.Type
Provides the String representation of the control type.
toString() - Method in class javax.sound.sampled.Mixer.Info
Provides a string representation of the mixer info.
toString() - Method in class javax.sound.sampled.AudioFileFormat
Provides a string representation of the file format.
toString() - Method in class javax.sound.sampled.AudioFileFormat.Type
Provides the file type's name as the String representation of the file type.
toString() - Method in class javax.sound.sampled.EnumControl
Provides a string representation of the control.
toString() - Method in class javax.sound.sampled.LineEvent
Obtains a string representation of the event.
toString() - Method in class javax.sound.sampled.LineEvent.Type
Returns the type name as the string representation.
toString() - Method in class javax.sound.sampled.AudioFormat
Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data".
toString() - Method in class javax.sound.sampled.AudioFormat.Encoding
Provides the String representation of the encoding.
toString() - Method in class javax.sound.sampled.FloatControl
Provides a string representation of the control
toString() - Method in class javax.sound.sampled.CompoundControl
Provides a string representation of the control
toString() - Method in class javax.sound.sampled.ReverbType
Provides a String representation of the reverb type, including its name and its parameter settings.
toString() - Method in class javax.sound.sampled.Port.Info
Provides a String representation of the port.
toString() - Method in class javax.sound.sampled.BooleanControl
Provides a string representation of the control
toString() - Method in class javax.sound.midi.MidiDevice.Info
Provides a string representation of the device information.
toString() - Method in class javax.sound.midi.Sequencer.SyncMode
Provides this synchronization mode's name as the string representation of the mode.
toString() - Method in class javax.naming.Reference
Generates the string representation of this reference.
toString() - Method in class javax.naming.NamingException
Generates the string representation of this exception.
toString() - Method in class javax.naming.RefAddr
Generates the string representation of this address.
toString() - Method in class javax.naming.LinkException
Generates the string representation of this exception.
toString() - Method in class javax.naming.BinaryRefAddr
Generates the string representation of this address.
toString() - Method in class javax.naming.NameClassPair
Generates the string representation of this name/class pair.
toString() - Method in class javax.naming.Binding
Generates the string representation of this binding.
toString() - Method in class javax.naming.CompoundName
Generates the string representation of this compound name, using the syntax rules of the compound name.
toString() - Method in class javax.naming.CompositeName
Generates the string representation of this composite name.
toString() - Method in class javax.naming.directory.AttributeModificationException
The string representation of this exception consists of information about where the error occurred, and the first unexecuted modification.
toString() - Method in class javax.naming.directory.BasicAttribute
Generates the string representation of this attribute.
toString() - Method in class javax.naming.directory.SearchResult
Generates the string representation of this SearchResult.
toString() - Method in class javax.naming.directory.BasicAttributes
Generates the string representation of this attribute set.
toString() - Method in class javax.naming.directory.ModificationItem
Generates the string representation of this modification item, which consists of the modification operation and its related attribute.
toString() - Method in class javax.rmi.CORBA.Stub
Returns a string representation of this stub.
toString() - Method in class javax.swing.KeyStroke
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.DefaultBoundedRangeModel
Returns a string that displays all of the BoundedRangeModel properties.
toString() - Method in class javax.swing.RepaintManager
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.LookAndFeel
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.DefaultListSelectionModel
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.SizeRequirements
Returns a string describing the minimum, preferred, and maximum size requirements, along with the alignment.
toString() - Method in class javax.swing.DefaultListModel
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.ImageIcon
Returns a string representation of this image.
toString() - Method in class javax.swing.UIManager.LookAndFeelInfo
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.event.HyperlinkEvent.EventType
Converts the type to a string.
toString() - Method in class javax.swing.event.DocumentEvent.EventType
Converts the type to a string.
toString() - Method in class javax.swing.event.EventListenerList
Returns a string representation of the EventListenerList.
toString() - Method in class javax.swing.event.ListSelectionEvent
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.event.TreeModelEvent
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.text.SimpleAttributeSet
Converts the attribute set to a String.
toString() - Method in class javax.swing.text.StyleContext
Converts a StyleContext to a String.
toString() - Method in class javax.swing.text.StyleContext.SmallAttributeSet
Returns a string showing the key/value pairs
toString() - Method in class javax.swing.text.StyleContext.NamedStyle
Converts the style to a string.
toString() - Method in class javax.swing.text.Position.Bias
string representation
toString() - Method in class javax.swing.text.StyleConstants
Returns the string representation.
toString() - Method in class javax.swing.text.TabSet
Returns the string representation of the set of tabs.
toString() - Method in class javax.swing.text.AbstractDocument.BranchElement
Converts the element to a string.
toString() - Method in class javax.swing.text.AbstractDocument.LeafElement
Converts the element to a string.
toString() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Returns a string description of the change event.
toString() - Method in class javax.swing.text.DefaultCaret
toString() - Method in class javax.swing.text.TabStop
toString() - Method in class javax.swing.text.Segment
Converts a segment into a String.
toString() - Method in class javax.swing.text.DefaultStyledDocument.ElementSpec
Converts the element to a string.
toString() - Method in class javax.swing.text.html.Option
String representation is the label.
toString() - Method in class javax.swing.text.html.HTML.Tag
Return the string representation of the tag.
toString() - Method in class javax.swing.text.html.HTML.Attribute
toString() - Method in class javax.swing.text.html.CSS.Attribute
The string representation of the attribute.
toString() - Method in class javax.swing.text.html.parser.AttributeList
toString() - Method in class javax.swing.text.html.parser.DTD
Return a string representation.
toString() - Method in class javax.swing.text.html.parser.ContentModel
Convert to a string.
toString() - Method in class javax.swing.text.html.parser.Element
Convert to a string.
toString() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.tree.DefaultMutableTreeNode
Returns the result of sending toString() to this node's user object, or null if this node has no user object.
toString() - Method in class javax.swing.tree.TreePath
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.undo.AbstractUndoableEdit
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.undo.CompoundEdit
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.undo.UndoManager
Returns a string that displays and identifies this object's properties.
toString() - Method in class javax.swing.undo.UndoableEditSupport
Returns a string that displays and identifies this object's properties.
toString() - Method in class org.omg.CORBA.SystemException
Converts this exception to a representative string.
toString() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a String object that represents this ObjectImpl object.
toString(boolean) - Method in class java.security.Identity
Deprecated. Returns a string representation of this identity, with optionally more details than that provided by the toString method without any arguments.
toString(boolean) - Method in interface java.security.Certificate
Deprecated. Returns a string that represents the contents of the certificate.
toString(boolean) - Method in class javax.naming.NamingException
Generates the string representation in more detail.
toString(boolean) - Method in class javax.naming.LinkException
Generates the string representation of this exception.
toString(byte) - Static method in class java.lang.Byte
Returns a new String object representing the specified Byte.
toString(double) - Static method in class java.lang.Double
Creates a string representation of the double argument.
toString(float) - Static method in class java.lang.Float
Returns a String representation for the specified float value.
toString(int) - Method in class java.io.ByteArrayOutputStream
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding.
toString(int) - Static method in class java.lang.Integer
Returns a new String object representing the specified integer.
toString(int) - Static method in class java.lang.reflect.Modifier
Return a string describing the access modifier flags in the specified modifier.
toString(int) - Method in class java.math.BigInteger
Returns the String representation of this BigInteger in the given radix.
toString(int, int) - Static method in class java.lang.Integer
Creates a string representation of the first argument in the radix specified by the second argument.
toString(long) - Static method in class java.lang.Long
Returns a new String object representing the specified integer.
toString(long, int) - Static method in class java.lang.Long
Creates a string representation of the first argument in the radix specified by the second argument.
toString(Object) - Method in class org.omg.CORBA.portable.Delegate
Provide the implementation to override the toString() method of the delegating CORBA object.
toString(short) - Static method in class java.lang.Short
Returns a new String object representing the specified Short.
toString(String) - Method in class java.io.ByteArrayOutputStream
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
toString(Stub) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.toString().
toStub(Remote) - Static method in class java.rmi.server.RemoteObject
Returns the stub for the remote object obj passed as a parameter.
toStub(Remote) - Static method in class javax.rmi.PortableRemoteObject
Returns a stub for the given server object.
toStub(Remote) - Method in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).
totalChildIndent - Variable in class javax.swing.plaf.basic.BasicTreeUI
Total distance that will be indented.
totalColumnWidth - Variable in class javax.swing.table.DefaultTableColumnModel
A local cache of the combined width of all columns
totalMemory() - Method in class java.lang.Runtime
Returns the total amount of memory in the Java Virtual Machine.
toTitleCase(char) - Static method in class java.lang.Character
Converts the character argument to titlecase.
toUpperCase() - Method in class java.lang.String
Converts all of the characters in this String to upper case using the rules of the default locale, which is returned by Locale.getDefault.
toUpperCase(char) - Static method in class java.lang.Character
Converts the character argument to uppercase.
toUpperCase(Locale) - Method in class java.lang.String
Converts all of the characters in this String to upper case using the rules of the given locale.
toURL() - Method in class java.io.File
Converts this abstract pathname into a file: URL.
toViewCoordinates(Dimension) - Method in class javax.swing.JViewport
Converts a size in pixel coordinates to view coordinates.
toViewCoordinates(Point) - Method in class javax.swing.JViewport
Converts a point in pixel coordinates to view coordinates.
TR - Static variable in class javax.swing.text.html.HTML.Tag
traceInstructions(boolean) - Method in class java.lang.Runtime
Enables/Disables tracing of instructions.
traceMethodCalls(boolean) - Method in class java.lang.Runtime
Enables/Disables tracing of method calls.
Track - class javax.sound.midi.Track.
A MIDI track is an independent stream of MIDI events (time-stamped MIDI data) that can be stored along with other tracks in a standard MIDI file.
TRACK - Static variable in class java.awt.event.AdjustmentEvent
The absolute tracking adjustment type.
trackBuffer - Variable in class javax.swing.plaf.basic.BasicSliderUI
trackColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
tracker - Static variable in class javax.swing.ImageIcon
trackHighlight - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
trackHighlightColor - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
trackListener - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
trackListener - Variable in class javax.swing.plaf.basic.BasicSliderUI
trackRect - Variable in class javax.swing.plaf.basic.BasicScrollBarUI
trackRect - Variable in class javax.swing.plaf.basic.BasicSliderUI
tracks - Variable in class javax.sound.midi.Sequence
The MIDI tracks in this sequence.
trackWidth - Static variable in class javax.swing.plaf.metal.MetalSliderUI
TRADITIONAL_CHINESE - Static variable in class java.util.Locale
Useful constant for language.
TRADITIONAL_HANZI - Static variable in class java.awt.im.InputSubset
Constant for all Han characters used in writing Traditional Chinese, including a subset of the CJK unified ideographs as well as Traditional Chinese Han characters that may be defined as surrogate characters.
TRAILING - Static variable in class java.awt.FlowLayout
This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g.
TRAILING - Static variable in interface javax.swing.SwingConstants
Identifies the trailing edge of text for use with left-to-right and right-to-left languages.
TRAILING - Static variable in class javax.swing.border.TitledBorder
Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.
trailing(int) - Static method in class java.awt.font.TextHitInfo
Creates a hit on the trailing edge of the character at the specified charIndex.
TRANSACTION_NONE - Static variable in interface java.sql.Connection
Indicates that transactions are not supported.
TRANSACTION_READ_COMMITTED - Static variable in interface java.sql.Connection
Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
TRANSACTION_READ_UNCOMMITTED - Static variable in interface java.sql.Connection
Dirty reads, non-repeatable reads and phantom reads can occur.
TRANSACTION_REPEATABLE_READ - Static variable in interface java.sql.Connection
Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
TRANSACTION_REQUIRED - exception org.omg.CORBA.TRANSACTION_REQUIRED.
The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
TRANSACTION_REQUIRED() - Constructor for class org.omg.CORBA.TRANSACTION_REQUIRED
Constructs a TRANSACTION_REQUIRED exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSACTION_REQUIRED(int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSACTION_REQUIRED
Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
TRANSACTION_REQUIRED(String) - Constructor for class org.omg.CORBA.TRANSACTION_REQUIRED
Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_REQUIRED(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSACTION_REQUIRED
Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
TRANSACTION_ROLLEDBACK - exception org.omg.CORBA.TRANSACTION_ROLLEDBACK.
The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
TRANSACTION_ROLLEDBACK() - Constructor for class org.omg.CORBA.TRANSACTION_ROLLEDBACK
Constructs a TRANSACTION_ROLLEDBACK exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSACTION_ROLLEDBACK(int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSACTION_ROLLEDBACK
Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
TRANSACTION_ROLLEDBACK(String) - Constructor for class org.omg.CORBA.TRANSACTION_ROLLEDBACK
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_ROLLEDBACK(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSACTION_ROLLEDBACK
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
TRANSACTION_SERIALIZABLE - Static variable in interface java.sql.Connection
Dirty reads, non-repeatable reads and phantom reads are prevented.
TransactionRequiredException - exception javax.transaction.TransactionRequiredException.
This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
TransactionRequiredException() - Constructor for class javax.transaction.TransactionRequiredException
TransactionRequiredException(String) - Constructor for class javax.transaction.TransactionRequiredException
TransactionRolledbackException - exception javax.transaction.TransactionRolledbackException.
This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.
TransactionRolledbackException() - Constructor for class javax.transaction.TransactionRolledbackException
TransactionRolledbackException(String) - Constructor for class javax.transaction.TransactionRolledbackException
transferable - Variable in class java.awt.dnd.DropTargetContext.TransferableProxy
The "actual" Transferable that the Proxy is a Proxy for, usually supplied from the underlying system.
Transferable - interface java.awt.datatransfer.Transferable.
Defines the interface for classes that can be used to provide data for a transfer operation.
transferablesFlavorsChanged() - Method in class java.awt.dnd.DragSourceContext
This method notifies the peer that the Transferable's DataFlavors have changed.
transferFocus() - Method in class java.awt.Component
Transfers the focus to the next component.
transferType - Variable in class java.awt.image.ColorModel
Data type of the array used to represent pixel values.
TRANSFORM - Static variable in class java.awt.font.TextAttribute
Attribute key for the transform of a font.
transform(AffineTransform) - Method in class java.awt.Graphics2D
Composes an AffineTransform object with the Transform in this Graphics2D according to the rule last-specified-first-applied.
transform(AffineTransform) - Method in class java.awt.geom.Area
Transforms the geometry of this Area using the specified AffineTransform.
transform(AffineTransform) - Method in class java.awt.geom.GeneralPath
Transforms the geometry of this path using the specified AffineTransform.
transform(double[], int, double[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of double precision coordinates by this transform.
transform(double[], int, float[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of double precision coordinates by this transform and stores the results into an array of floats.
transform(float[], int, double[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles.
transform(float[], int, float[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of floating point coordinates by this transform.
transform(Point2D[], int, Point2D[], int, int) - Method in class java.awt.geom.AffineTransform
Transforms an array of point objects by this transform.
transform(Point2D, Point2D) - Method in class java.awt.geom.AffineTransform
Transforms the specified ptSrc and stores the result in ptDst.
TransformAttribute - class java.awt.font.TransformAttribute.
The TransformAttribute class provides an immutable wrapper for a transform so that it is safe to use as an attribute.
TransformAttribute(AffineTransform) - Constructor for class java.awt.font.TransformAttribute
Wraps the specified transform.
TRANSIENT - exception org.omg.CORBA.TRANSIENT.
The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
TRANSIENT - Static variable in class java.lang.reflect.Modifier
The int value representing the transient modifier.
TRANSIENT - Static variable in class javax.accessibility.AccessibleState
Indicates this object is transient.
TRANSIENT() - Constructor for class org.omg.CORBA.TRANSIENT
Constructs a TRANSIENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSIENT(int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSIENT
Constructs a TRANSIENT exception with the specified minor code and completion status.
TRANSIENT(String) - Constructor for class org.omg.CORBA.TRANSIENT
Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSIENT(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.TRANSIENT
Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
translate(double, double) - Method in class java.awt.Graphics2D
Concatenates the current Graphics2D Transform with a translation transform.
translate(double, double) - Method in class java.awt.geom.AffineTransform
Concatenates this transform with a translation transformation.
translate(int, int) - Method in class java.awt.Polygon
Translates the vertices of the Polygon by deltaX along the x axis and by deltaY along the y axis.
translate(int, int) - Method in class java.awt.Event
Translates this event so that its x and y coordinates are increased by dx and dy, respectively.
translate(int, int) - Method in class java.awt.Graphics
Translates the origin of the graphics context to the point (x, y) in the current coordinate system.
translate(int, int) - Method in class java.awt.Graphics2D
Translates the origin of the Graphics2D context to the point (x, y) in the current coordinate system.
translate(int, int) - Method in class java.awt.Point
Translates this point, at location (x, y), by dx along the x axis and dy along the y axis so that it now represents the point (x + dx, y + dy).
translate(int, int) - Method in class java.awt.Rectangle
Translates this Rectangle the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.
translate(int, int) - Method in class javax.swing.DebugGraphics
Overrides Graphics.translate.
translateHTMLToCSS(AttributeSet) - Method in class javax.swing.text.html.StyleSheet
Converts a set of HTML attributes to an equivalent set of CSS attributes.
translateKey(Key) - Method in class java.security.KeyFactory
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
translatePoint(int, int) - Method in class java.awt.event.MouseEvent
Translates the event's coordinates to a new position by adding specified x (horizontal) and y (veritcal) offsets.
TRANSLUCENT - Static variable in interface java.awt.Transparency
Represents image data that contains or might contain arbitrary alpha values between and including 0.0 and 1.0.
Transmitter - interface javax.sound.midi.Transmitter.
A Transmitter sends MidiEvent objects to one or more Receivers.
Transparency - interface java.awt.Transparency.
The Transparency interface defines the common transparency modes for implementing classes.
tree - Variable in class javax.swing.tree.DefaultTreeCellEditor
JTree instance listening too.
tree - Variable in class javax.swing.plaf.basic.BasicTreeUI
Component that we're going to be drawing into.
TREE - Static variable in class javax.accessibility.AccessibleRole
An object used to present hierarchical information to the user.
TREE_MODEL_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for treeModel.
TreeCellEditor - interface javax.swing.tree.TreeCellEditor.
Adds to CellEditor the extensions necessary to configure an editor in a tree.
TreeCellRenderer - interface javax.swing.tree.TreeCellRenderer.
Defines the requirements for an object that displays a tree node.
treeCollapsed(TreeExpansionEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Collapsed notification.
treeCollapsed(TreeExpansionEvent) - Method in interface javax.swing.event.TreeExpansionListener
Called whenever an item in the tree has been collapsed.
treeCollapsed(TreeExpansionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler
Called whenever an item in the tree has been collapsed.
treeDidChange() - Method in class javax.swing.JTree
Sent when the tree has changed enough that we need to resize the bounds, but not enough that we need to remove the expanded node set (e.g nodes were expanded or collapsed, or nodes were inserted into the tree).
treeExpanded(TreeExpansionEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Model Expansion notification.
treeExpanded(TreeExpansionEvent) - Method in interface javax.swing.event.TreeExpansionListener
Called whenever an item in the tree has been expanded.
treeExpanded(TreeExpansionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler
Called whenever an item in the tree has been expanded.
TreeExpansionEvent - class javax.swing.event.TreeExpansionEvent.
An event used to identify a single path in a tree.
TreeExpansionEvent(Object, TreePath) - Constructor for class javax.swing.event.TreeExpansionEvent
Constructs a TreeExpansionEvent object.
TreeExpansionListener - interface javax.swing.event.TreeExpansionListener.
The listener that's notified when a tree expands or collapses a node.
TreeMap - class java.util.TreeMap.
Red-Black tree based implementation of the SortedMap interface.
TreeMap() - Constructor for class java.util.TreeMap
Constructs a new, empty map, sorted according to the keys' natural order.
TreeMap(Comparator) - Constructor for class java.util.TreeMap
Constructs a new, empty map, sorted according to the given comparator.
TreeMap(Map) - Constructor for class java.util.TreeMap
Constructs a new map containing the same mappings as the given map, sorted according to the keys' natural order.
TreeMap(SortedMap) - Constructor for class java.util.TreeMap
Constructs a new map containing the same mappings as the given SortedMap, sorted according to the same ordering.
treeModel - Variable in class javax.swing.JTree
The model that defines the tree displayed by this object.
treeModel - Variable in class javax.swing.tree.AbstractLayoutCache
Model providing information.
treeModel - Variable in class javax.swing.plaf.basic.BasicTreeUI
Used to determine what to display.
TreeModel - interface javax.swing.tree.TreeModel.
The interface that defines a suitable data model for a JTree.
TreeModelEvent - class javax.swing.event.TreeModelEvent.
Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeModelEvent(Object, Object[]) - Constructor for class javax.swing.event.TreeModelEvent
Used to create an event when the node structure has changed in some way, identifying the path to the root of a modified subtree as an array of Objects.
TreeModelEvent(Object, Object[], int[], Object[]) - Constructor for class javax.swing.event.TreeModelEvent
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as an array of Objects.
TreeModelEvent(Object, TreePath) - Constructor for class javax.swing.event.TreeModelEvent
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.
TreeModelEvent(Object, TreePath, int[], Object[]) - Constructor for class javax.swing.event.TreeModelEvent
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
treeModelListener - Variable in class javax.swing.JTree
Updates the expandedState.
TreeModelListener - interface javax.swing.event.TreeModelListener.
Defines the interface for an object that listens to changes in a TreeModel.
TreeNode - interface javax.swing.tree.TreeNode.
Defines the requirements for an object that can be used as a tree node in a JTree.
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.JTree.TreeModelHandler
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Model Node change notification.
treeNodesChanged(TreeModelEvent) - Method in interface javax.swing.event.TreeModelListener
Invoked after a node (or a set of siblings) has changed in some way.
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.tree.AbstractLayoutCache
Invoked after a node (or a set of siblings) has changed in some way.
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.tree.VariableHeightLayoutCache
Invoked after a node (or a set of siblings) has changed in some way.
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.tree.FixedHeightLayoutCache
Invoked after a node (or a set of siblings) has changed in some way.
treeNodesChanged(TreeModelEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.JTree.TreeModelHandler
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Model Node change notification.
treeNodesInserted(TreeModelEvent) - Method in interface javax.swing.event.TreeModelListener
Invoked after nodes have been inserted into the tree.
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.tree.AbstractLayoutCache
Invoked after nodes have been inserted into the tree.
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.tree.VariableHeightLayoutCache
Invoked after nodes have been inserted into the tree.
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.tree.FixedHeightLayoutCache
Invoked after nodes have been inserted into the tree.
treeNodesInserted(TreeModelEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.JTree.TreeModelHandler
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Model Node change notification.
treeNodesRemoved(TreeModelEvent) - Method in interface javax.swing.event.TreeModelListener
Invoked after nodes have been removed from the tree.
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.tree.AbstractLayoutCache
Invoked after nodes have been removed from the tree.
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.tree.VariableHeightLayoutCache
Invoked after nodes have been removed from the tree.
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.tree.FixedHeightLayoutCache
Invoked after nodes have been removed from the tree.
treeNodesRemoved(TreeModelEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
TreePath - class javax.swing.tree.TreePath.
Represents a path to a node.
TreePath() - Constructor for class javax.swing.tree.TreePath
Primarily provided for subclasses that represent paths in a different manner.
TreePath(Object) - Constructor for class javax.swing.tree.TreePath
Constructs a TreePath containing only a single element.
TreePath(Object[]) - Constructor for class javax.swing.tree.TreePath
Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model.
TreePath(Object[], int) - Constructor for class javax.swing.tree.TreePath
Constructs a new TreePath with the identified path components of length length.
TreePath(TreePath, Object) - Constructor for class javax.swing.tree.TreePath
Constructs a new TreePath, which is the path identified by parent ending in lastElement.
TreeSelectionEvent - class javax.swing.event.TreeSelectionEvent.
An event that characterizes a change in the current selection.
TreeSelectionEvent(Object, TreePath[], boolean[], TreePath, TreePath) - Constructor for class javax.swing.event.TreeSelectionEvent
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent(Object, TreePath, boolean, TreePath, TreePath) - Constructor for class javax.swing.event.TreeSelectionEvent
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionListener - interface javax.swing.event.TreeSelectionListener.
The listener that's notified when the selection in a TreeSelectionModel changes.
treeSelectionModel - Variable in class javax.swing.tree.AbstractLayoutCache
Selection model.
treeSelectionModel - Variable in class javax.swing.plaf.basic.BasicTreeUI
Model maintaing the selection.
TreeSelectionModel - interface javax.swing.tree.TreeSelectionModel.
This interface represents the current state of the selection for the tree component.
TreeSet - class java.util.TreeSet.
This class implements the Set interface, backed by a TreeMap instance.
TreeSet() - Constructor for class java.util.TreeSet
Constructs a new, empty set, sorted according to the elements' natural order.
TreeSet(Collection) - Constructor for class java.util.TreeSet
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order.
TreeSet(Comparator) - Constructor for class java.util.TreeSet
Constructs a new, empty set, sorted according to the given comparator.
TreeSet(SortedSet) - Constructor for class java.util.TreeSet
Constructs a new set containing the same elements as the given sorted set, sorted according to the same ordering.
treeState - Variable in class javax.swing.plaf.basic.BasicTreeUI
Object responsible for handling sizing and expanded issues.
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.JTree.TreeModelHandler
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Model structure change change notification.
treeStructureChanged(TreeModelEvent) - Method in interface javax.swing.event.TreeModelListener
Invoked after the tree has drastically changed structure from a given node down.
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.tree.AbstractLayoutCache
Invoked after the tree has drastically changed structure from a given node down.
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.tree.VariableHeightLayoutCache
Invoked after the tree has drastically changed structure from a given node down.
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.tree.FixedHeightLayoutCache
Invoked after the tree has drastically changed structure from a given node down.
treeStructureChanged(TreeModelEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
TreeUI - class javax.swing.plaf.TreeUI.
Pluggable look and feel interface for JTree.
TreeUI() - Constructor for class javax.swing.plaf.TreeUI
treeWillCollapse(TreeExpansionEvent) - Method in interface javax.swing.event.TreeWillExpandListener
Invoked whenever a node in the tree is about to be collapsed.
treeWillExpand(TreeExpansionEvent) - Method in interface javax.swing.event.TreeWillExpandListener
Invoked whenever a node in the tree is about to be expanded.
TreeWillExpandListener - interface javax.swing.event.TreeWillExpandListener.
The listener that's notified when a tree expands or collapses a node.
trim() - Method in class java.lang.String
Removes white space from both ends of this string.
trimEdits(int, int) - Method in class javax.swing.undo.UndoManager
Tell the edits in the given range (inclusive) to die, and remove them from edits.
trimForLimit() - Method in class javax.swing.undo.UndoManager
Reduce the number of queued edits to a range of size limit, centered on indexOfNextAdd.
trimToSize() - Method in class java.util.Vector
Trims the capacity of this vector to be the vector's current size.
trimToSize() - Method in class java.util.ArrayList
Trims the capacity of this ArrayList instance to be the list's current size.
trimToSize() - Method in class javax.swing.DefaultListModel
Trims the capacity of this list to be the list's current size.
TRUE - Static variable in class java.lang.Boolean
The Boolean object corresponding to the primitive value true.
TRUETYPE_FONT - Static variable in class java.awt.Font
Create a Font of type TRUETYPE.
tryToLoadClass(String, ClassLoader) - Static method in class java.awt.datatransfer.DataFlavor
tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
TT - Static variable in class javax.swing.text.html.HTML.Tag
TT_EOF - Static variable in class java.io.StreamTokenizer
A constant indicating that the end of the stream has been read.
TT_EOL - Static variable in class java.io.StreamTokenizer
A constant indicating that the end of the line has been read.
TT_NUMBER - Static variable in class java.io.StreamTokenizer
A constant indicating that a number token has been read.
TT_WORD - Static variable in class java.io.StreamTokenizer
A constant indicating that a word token has been read.
ttype - Variable in class java.io.StreamTokenizer
After a call to the nextToken method, this field contains the type of the token just read.
TUESDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Tuesday.
TUNE_REQUEST - Static variable in class javax.sound.midi.ShortMessage
Status byte for Tune Request message (0xF6, or 246).
TWO_SIDED_LONG_EDGE - Static variable in class java.awt.JobAttributes.SidesType
The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge.
TWO_SIDED_SHORT_EDGE - Static variable in class java.awt.JobAttributes.SidesType
The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge.
type - Variable in class javax.sound.midi.MidiFileFormat
The type of MIDI file.
type - Variable in class javax.naming.event.NamingEvent
Contains the type of this event.
type - Variable in class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
type - Variable in class javax.swing.event.TableModelEvent
type - Variable in class javax.swing.text.html.parser.AttributeList
type - Variable in class javax.swing.text.html.parser.ContentModel
Type.
type - Variable in class javax.swing.text.html.parser.Element
type - Variable in class javax.swing.text.html.parser.Entity
type - Variable in class org.omg.CORBA.UnionMember
The type of the union member described by this UnionMember object.
type - Variable in class org.omg.CORBA.StructMember
The type of the struct member described by this StructMember object.
type - Variable in class org.omg.CORBA.ValueMember
The type of the value member described by this ValueMember object.
TYPE - Static variable in class java.lang.Character
The Class object representing the primitive type char.
TYPE - Static variable in class java.lang.Long
The Class object representing the primitive type long.
TYPE - Static variable in class java.lang.Void
The Class object representing the primitive Java type void.
TYPE - Static variable in class java.lang.Short
The Class object representing the primitive type short.
TYPE - Static variable in class java.lang.Float
The Class object representing the primitive type float.
TYPE - Static variable in class java.lang.Integer
The Class object representing the primitive type int.
TYPE - Static variable in class java.lang.Byte
The Class object representing the primitive type byte.
TYPE - Static variable in class java.lang.Double
The Class object representing the primitive type double.
TYPE - Static variable in class java.lang.Boolean
The Class object representing the primitive type boolean.
TYPE - Static variable in class javax.swing.text.html.HTML.Attribute
TYPE_2CLR - Static variable in class java.awt.color.ColorSpace
Generic 2 component color spaces.
TYPE_3BYTE_BGR - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGB color components, corresponding to a Windows-style BGR color model) with the colors Blue, Green, and Red stored in 3 bytes.
TYPE_3CLR - Static variable in class java.awt.color.ColorSpace
Generic 3 component color spaces.
TYPE_4BYTE_ABGR - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
TYPE_4BYTE_ABGR_PRE - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
TYPE_4CLR - Static variable in class java.awt.color.ColorSpace
Generic 4 component color spaces.
TYPE_5CLR - Static variable in class java.awt.color.ColorSpace
Generic 5 component color spaces.
TYPE_6CLR - Static variable in class java.awt.color.ColorSpace
Generic 6 component color spaces.
TYPE_7CLR - Static variable in class java.awt.color.ColorSpace
Generic 7 component color spaces.
TYPE_8CLR - Static variable in class java.awt.color.ColorSpace
Generic 8 component color spaces.
TYPE_9CLR - Static variable in class java.awt.color.ColorSpace
Generic 9 component color spaces.
TYPE_ACLR - Static variable in class java.awt.color.ColorSpace
Generic 10 component color spaces.
TYPE_BCLR - Static variable in class java.awt.color.ColorSpace
Generic 11 component color spaces.
TYPE_BILINEAR - Static variable in class java.awt.image.AffineTransformOp
Bilinear interpolation type.
TYPE_BYTE - Static variable in class java.awt.image.DataBuffer
Tag for unsigned byte data.
TYPE_BYTE_BINARY - Static variable in class java.awt.image.BufferedImage
Represents an opaque byte-packed binary image.
TYPE_BYTE_GRAY - Static variable in class java.awt.image.BufferedImage
Represents a unsigned byte grayscale image, non-indexed.
TYPE_BYTE_INDEXED - Static variable in class java.awt.image.BufferedImage
Represents an indexed byte image.
TYPE_CCLR - Static variable in class java.awt.color.ColorSpace
Generic 12 component color spaces.
TYPE_CMY - Static variable in class java.awt.color.ColorSpace
Any of the family of CMY color spaces.
TYPE_CMYK - Static variable in class java.awt.color.ColorSpace
Any of the family of CMYK color spaces.
TYPE_CUSTOM - Static variable in class java.awt.image.BufferedImage
Image type is not recognized so it must be a customized image.
TYPE_DCLR - Static variable in class java.awt.color.ColorSpace
Generic 13 component color spaces.
type_def - Variable in class org.omg.CORBA.UnionMember
The typedef that represents the IDL type of the union member described by this UnionMember object.
type_def - Variable in class org.omg.CORBA.StructMember
The typedef that represents the IDL type of the struct member described by this StructMember object.
type_def - Variable in class org.omg.CORBA.ValueMember
The typedef that represents the IDL type of the value member described by this ValueMember object.
TYPE_DOUBLE - Static variable in class java.awt.image.DataBuffer
Tag for double data.
TYPE_ECLR - Static variable in class java.awt.color.ColorSpace
Generic 14 component color spaces.
TYPE_FCLR - Static variable in class java.awt.color.ColorSpace
Generic 15 component color spaces.
TYPE_FLIP - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits.
TYPE_FLOAT - Static variable in class java.awt.image.DataBuffer
Tag for float data.
TYPE_FORWARD_ONLY - Static variable in interface java.sql.ResultSet
The constant indicating the type for a ResultSet object whose cursor may move only forward.
TYPE_GENERAL_ROTATION - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits.
TYPE_GENERAL_SCALE - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits.
TYPE_GENERAL_TRANSFORM - Static variable in class java.awt.geom.AffineTransform
This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates.
TYPE_GRAY - Static variable in class java.awt.color.ColorSpace
Any of the family of GRAY color spaces.
TYPE_HLS - Static variable in class java.awt.color.ColorSpace
Any of the family of HLS color spaces.
TYPE_HSV - Static variable in class java.awt.color.ColorSpace
Any of the family of HSV color spaces.
TYPE_IDENTITY - Static variable in class java.awt.geom.AffineTransform
This constant indicates that the transform defined by this object is an identity transform.
TYPE_IMAGE_BUFFER - Static variable in class java.awt.GraphicsDevice
Device is an image buffer.
TYPE_INT - Static variable in class java.awt.image.DataBuffer
Tag for int data.
TYPE_INT_ARGB - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGBA color components packed into integer pixels.
TYPE_INT_ARGB_PRE - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGBA color components packed into integer pixels.
TYPE_INT_BGR - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGB color components, corresponding to a Windows- or Solaris- style BGR color model, with the colors Blue, Green, and Red packed into integer pixels.
TYPE_INT_RGB - Static variable in class java.awt.image.BufferedImage
Represents an image with 8-bit RGB color components packed into integer pixels.
TYPE_Lab - Static variable in class java.awt.color.ColorSpace
Any of the family of Lab color spaces.
TYPE_Luv - Static variable in class java.awt.color.ColorSpace
Any of the family of Luv color spaces.
TYPE_MASK_ROTATION - Static variable in class java.awt.geom.AffineTransform
This constant is a bit mask for any of the rotation flag bits.
TYPE_MASK_SCALE - Static variable in class java.awt.geom.AffineTransform
This constant is a bit mask for any of the scale flag bits.
type_modifier() - Method in class org.omg.CORBA.TypeCode
Returns a constant indicating the modifier of the value type that this TypeCode object describes.
TYPE_NEAREST_NEIGHBOR - Static variable in class java.awt.image.AffineTransformOp
Nearest-neighbor interpolation type.
TYPE_PRINTER - Static variable in class java.awt.GraphicsDevice
Device is a printer.
TYPE_QUADRANT_ROTATION - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits.
TYPE_RASTER_SCREEN - Static variable in class java.awt.GraphicsDevice
Device is a raster screen.
TYPE_RGB - Static variable in class java.awt.color.ColorSpace
Any of the family of RGB color spaces.
TYPE_SCROLL_INSENSITIVE - Static variable in interface java.sql.ResultSet
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
TYPE_SCROLL_SENSITIVE - Static variable in interface java.sql.ResultSet
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.
TYPE_SHORT - Static variable in class java.awt.image.DataBuffer
Tag for signed short data.
TYPE_TRANSLATION - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits.
TYPE_UNDEFINED - Static variable in class java.awt.image.DataBuffer
Tag for undefined data
TYPE_UNIFORM_SCALE - Static variable in class java.awt.geom.AffineTransform
This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits.
TYPE_USHORT - Static variable in class java.awt.image.DataBuffer
Tag for unsigned short data.
TYPE_USHORT_555_RGB - Static variable in class java.awt.image.BufferedImage
Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha.
TYPE_USHORT_565_RGB - Static variable in class java.awt.image.BufferedImage
Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha.
TYPE_USHORT_GRAY - Static variable in class java.awt.image.BufferedImage
Represents an unsigned short grayscale image, non-indexed).
TYPE_XYZ - Static variable in class java.awt.color.ColorSpace
Any of the family of XYZ color spaces.
TYPE_YCbCr - Static variable in class java.awt.color.ColorSpace
Any of the family of YCbCr color spaces.
TYPE_Yxy - Static variable in class java.awt.color.ColorSpace
Any of the family of Yxy color spaces.
type() - Method in interface org.omg.CORBA.DynAny
Returns the TypeCode of the object inserted into this DynAny.
type() - Static method in class org.omg.CORBA.UnionMemberHelper
type() - Static method in class org.omg.CORBA.ServiceInformationHelper
type() - Static method in class org.omg.CORBA.PolicyListHelper
type() - Method in class org.omg.CORBA.Any
Returns type information for the element contained in this Any object.
type() - Static method in class org.omg.CORBA.NameValuePairHelper
type() - Static method in class org.omg.CORBA.LongSeqHelper
type() - Static method in class org.omg.CORBA.OctetSeqHelper
type() - Static method in class org.omg.CORBA.IdentifierHelper
type() - Static method in class org.omg.CORBA.FloatSeqHelper
type() - Static method in class org.omg.CORBA.ServiceDetailHelper
type() - Static method in class org.omg.CORBA.BooleanSeqHelper
type() - Static method in class org.omg.CORBA.VisibilityHelper
type() - Static method in class org.omg.CORBA.ULongSeqHelper
type() - Static method in class org.omg.CORBA.StringValueHelper
type() - Static method in class org.omg.CORBA.CharSeqHelper
type() - Static method in class org.omg.CORBA.SetOverrideTypeHelper
type() - Static method in class org.omg.CORBA.VersionSpecHelper
type() - Static method in class org.omg.CORBA.DefinitionKindHelper
type() - Static method in class org.omg.CORBA.StructMemberHelper
type() - Static method in class org.omg.CORBA.IDLTypeHelper
type() - Static method in class org.omg.CORBA.UShortSeqHelper
type() - Static method in class org.omg.CORBA.WCharSeqHelper
type() - Static method in class org.omg.CORBA.DoubleSeqHelper
type() - Static method in class org.omg.CORBA.WStringValueHelper
type() - Static method in class org.omg.CORBA.PolicyTypeHelper
type() - Static method in class org.omg.CORBA.ULongLongSeqHelper
type() - Static method in class org.omg.CORBA.RepositoryIdHelper
type() - Static method in class org.omg.CORBA.ShortSeqHelper
type() - Static method in class org.omg.CORBA.ObjectHelper
type() - Static method in class org.omg.CORBA.CurrentHelper
type() - Static method in class org.omg.CORBA.LongLongSeqHelper
type() - Method in class org.omg.CORBA._IDLTypeStub
type() - Static method in class org.omg.CORBA.CompletionStatusHelper
type() - Method in interface org.omg.CORBA.IDLTypeOperations
The type attribute describes the type defined by an object derived from IDLType.
type() - Static method in class org.omg.CORBA.FieldNameHelper
type() - Static method in class org.omg.CORBA.ValueBaseHelper
type() - Static method in class org.omg.CORBA.PolicyHelper
type() - Static method in class org.omg.CORBA.AnySeqHelper
type() - Static method in class org.omg.CORBA.ValueMemberHelper
type() - Static method in class org.omg.CosNaming.NameHelper
type() - Static method in class org.omg.CosNaming.IstringHelper
type() - Static method in class org.omg.CosNaming.BindingListHelper
type() - Static method in class org.omg.CosNaming.BindingIteratorHelper
type() - Static method in class org.omg.CosNaming.NameComponentHelper
type() - Static method in class org.omg.CosNaming.BindingTypeHelper
type() - Static method in class org.omg.CosNaming.NamingContextHelper
type() - Static method in class org.omg.CosNaming.BindingHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
type() - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
type(TypeCode) - Method in class org.omg.CORBA.Any
Sets this Any object's type field to the given TypeCode object and clears its value.
type2name(int) - Static method in class javax.swing.text.html.parser.AttributeList
TypeCode - class org.omg.CORBA.TypeCode.
A container for information about a specific CORBA data type.
TypeCode() - Constructor for class org.omg.CORBA.TypeCode
TypeCodeHolder - class org.omg.CORBA.TypeCodeHolder.
A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations.
TypeCodeHolder() - Constructor for class org.omg.CORBA.TypeCodeHolder
Constructs a new TypeCodeHolder object with its value field initialized to null.
TypeCodeHolder(TypeCode) - Constructor for class org.omg.CORBA.TypeCodeHolder
Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
TypeMismatch - exception org.omg.CORBA.DynAnyPackage.TypeMismatch.
TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.
TypeMismatch() - Constructor for class org.omg.CORBA.DynAnyPackage.TypeMismatch
Constructs a TypeMismatch object.
TypeMismatch(String) - Constructor for class org.omg.CORBA.DynAnyPackage.TypeMismatch
Constructs a TypeMismatch object.
typeNoNulls - Static variable in interface java.sql.DatabaseMetaData
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
typeNullable - Static variable in interface java.sql.DatabaseMetaData
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
typeNullableUnknown - Static variable in interface java.sql.DatabaseMetaData
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
typePredBasic - Static variable in interface java.sql.DatabaseMetaData
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
typePredChar - Static variable in interface java.sql.DatabaseMetaData
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
typePredNone - Static variable in interface java.sql.DatabaseMetaData
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
Types - class java.sql.Types.
The class that defines the constants that are used to identify generic SQL types, called JDBC types.
typeSearchable - Static variable in interface java.sql.DatabaseMetaData
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


U-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

U

U - Static variable in class javax.swing.text.html.HTML.Tag
ui - Variable in class javax.swing.JComponent
ui - Variable in class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
UID - class java.rmi.server.UID.
Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.
UID() - Constructor for class java.rmi.server.UID
Creates a pure identifier that is unique with respect to the host on which it is generated.
UID(short) - Constructor for class java.rmi.server.UID
Creates a "well-known" ID.
UIDefaults - class javax.swing.UIDefaults.
A table of defaults for Swing components.
UIDefaults.ActiveValue - interface javax.swing.UIDefaults.ActiveValue.
This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
UIDefaults.LazyInputMap - class javax.swing.UIDefaults.LazyInputMap.
LazyInputMap will create a InputMap in its createValue method.
UIDefaults.LazyInputMap(Object[]) - Constructor for class javax.swing.UIDefaults.LazyInputMap
UIDefaults.LazyValue - interface javax.swing.UIDefaults.LazyValue.
This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
UIDefaults.ProxyLazyValue - class javax.swing.UIDefaults.ProxyLazyValue.
This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
UIDefaults.ProxyLazyValue(String) - Constructor for class javax.swing.UIDefaults.ProxyLazyValue
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String, Object[]) - Constructor for class javax.swing.UIDefaults.ProxyLazyValue
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String, String) - Constructor for class javax.swing.UIDefaults.ProxyLazyValue
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String, String, Object[]) - Constructor for class javax.swing.UIDefaults.ProxyLazyValue
Creates a LazyValue which will construct an instance when asked.
UIDefaults() - Constructor for class javax.swing.UIDefaults
Create an empty defaults table.
UIDefaults(Object[]) - Constructor for class javax.swing.UIDefaults
Create a defaults table initialized with the specified key/value pairs.
UIManager - class javax.swing.UIManager.
This class keeps track of the current look and feel and its defaults.
UIManager.LookAndFeelInfo - class javax.swing.UIManager.LookAndFeelInfo.
Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
UIManager.LookAndFeelInfo(String, String) - Constructor for class javax.swing.UIManager.LookAndFeelInfo
Constructs an UIManager$LookAndFeelInfo object.
UIManager() - Constructor for class javax.swing.UIManager
UIResource - interface javax.swing.plaf.UIResource.
This interface is used to mark objects created by ComponentUI delegates.
uis - Variable in class javax.swing.plaf.multi.MultiListUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiSeparatorUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiLabelUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiPopupMenuUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiPanelUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiScrollBarUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiTextUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiComboBoxUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiTableHeaderUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiFileChooserUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiColorChooserUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiTreeUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiViewportUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiTabbedPaneUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiProgressBarUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiScrollPaneUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiOptionPaneUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiSplitPaneUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiButtonUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiToolBarUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiSliderUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiDesktopPaneUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiTableUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiDesktopIconUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiMenuItemUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiInternalFrameUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiToolTipUI
The Vector containing the real UI's.
uis - Variable in class javax.swing.plaf.multi.MultiMenuBarUI
The Vector containing the real UI's.
uisToArray(Vector) - Static method in class javax.swing.plaf.multi.MultiLookAndFeel
Turn the Vector of UI's into an array.
UK - Static variable in class java.util.Locale
Useful constant for country.
UL - Static variable in class javax.swing.text.html.HTML.Tag
ULAW - Static variable in class javax.sound.sampled.AudioFormat.Encoding
Specifies u-law encoded data.
ULongLongSeqHelper - class org.omg.CORBA.ULongLongSeqHelper.
org/omg/CORBA/ULongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
ULongLongSeqHelper() - Constructor for class org.omg.CORBA.ULongLongSeqHelper
ULongLongSeqHolder - class org.omg.CORBA.ULongLongSeqHolder.
org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
ULongLongSeqHolder() - Constructor for class org.omg.CORBA.ULongLongSeqHolder
ULongLongSeqHolder(long[]) - Constructor for class org.omg.CORBA.ULongLongSeqHolder
ULongSeqHelper - class org.omg.CORBA.ULongSeqHelper.
org/omg/CORBA/ULongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ULongSeqHelper() - Constructor for class org.omg.CORBA.ULongSeqHelper
ULongSeqHolder - class org.omg.CORBA.ULongSeqHolder.
org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ULongSeqHolder() - Constructor for class org.omg.CORBA.ULongSeqHolder
ULongSeqHolder(int[]) - Constructor for class org.omg.CORBA.ULongSeqHolder
UNASSIGNED - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
unbind(Name) - Method in class javax.naming.InitialContext
unbind(Name) - Method in interface javax.naming.Context
Unbinds the named object.
unbind(NameComponent[]) - Method in class org.omg.CosNaming._NamingContextStub
unbind(NameComponent[]) - Method in interface org.omg.CosNaming.NamingContextOperations
The unbind operation removes a name binding from a context.
unbind(String) - Static method in class java.rmi.Naming
Destroys the binding for the specified name that is associated with a remote object.
unbind(String) - Method in interface java.rmi.registry.Registry
Destroys the binding for the specified name that is associated with a remote object.
unbind(String) - Method in class javax.naming.InitialContext
unbind(String) - Method in interface javax.naming.Context
Unbinds the named object.
uncaughtException(Thread, Throwable) - Method in class java.lang.ThreadGroup
Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.
unconfigureArrowButton() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Unconfigures the arrow button by removing listeners.
unconfigureArrowButton() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
unconfigureEditor() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Unconfigures the editor by removing listeners.
unconfigureEditor() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
unconfigureEnclosingScrollPane() - Method in class javax.swing.JTable
Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null.
UNDECIMBER - Static variable in class java.util.Calendar
Value of the MONTH field indicating the thirteenth month of the year.
UndeclaredThrowableException - exception java.lang.reflect.UndeclaredThrowableException.
Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.
UndeclaredThrowableException(Throwable) - Constructor for class java.lang.reflect.UndeclaredThrowableException
Constructs an UndeclaredThrowableException with the specifed Throwable.
UndeclaredThrowableException(Throwable, String) - Constructor for class java.lang.reflect.UndeclaredThrowableException
Constructs an UndeclaredThrowableException with the specified Throwable and a detail message.
UNDEFINED_CONDITION - Static variable in class javax.swing.JComponent
Constant used by some of the APIs to mean that no condition is defined.
UndefinedProperty - Static variable in class java.awt.Image
The UndefinedProperty object should be returned whenever a property which was not defined for a particular image is fetched.
Underline - Static variable in class javax.swing.text.StyleConstants
Name of the underline attribute.
Underline - Static variable in class javax.swing.text.StyleConstants.CharacterConstants
Name of the underline attribute.
UNDERLINE - Static variable in class java.awt.font.TextAttribute
Attribute key for underline adornments.
UNDERLINE_LOW_DASHED - Static variable in class java.awt.font.TextAttribute
Single pixel dashed low underline.
UNDERLINE_LOW_DOTTED - Static variable in class java.awt.font.TextAttribute
Single pixel dotted low underline.
UNDERLINE_LOW_GRAY - Static variable in class java.awt.font.TextAttribute
Double pixel gray low underline.
UNDERLINE_LOW_ONE_PIXEL - Static variable in class java.awt.font.TextAttribute
Single pixel solid low underline.
UNDERLINE_LOW_TWO_PIXEL - Static variable in class java.awt.font.TextAttribute
Double pixel solid low underline.
UNDERLINE_ON - Static variable in class java.awt.font.TextAttribute
Standard underline at the roman baseline for roman text, and below the decenders for other text.
undo() - Method in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
Undoes a change.
undo() - Method in class javax.swing.text.AbstractDocument.ElementEdit
Undoes a change.
undo() - Method in class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
Undoes a change.
undo() - Method in class javax.swing.undo.AbstractUndoableEdit
Throws CannotUndoException if canUndo() returns false.
undo() - Method in class javax.swing.undo.CompoundEdit
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.
undo() - Method in class javax.swing.undo.UndoManager
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it.
undo() - Method in class javax.swing.undo.StateEdit
Tells the edited object to apply the state prior to the edit
undo() - Method in interface javax.swing.undo.UndoableEdit
Undo the edit that was made.
UndoableEdit - interface javax.swing.undo.UndoableEdit.
An object representing an edit that has been done, and that can be undone and redone
UndoableEditEvent - class javax.swing.event.UndoableEditEvent.
An event indicating that an operation which can be undone has occurred.
UndoableEditEvent(Object, UndoableEdit) - Constructor for class javax.swing.event.UndoableEditEvent
Constructs an UndoableEditEvent object.
undoableEditHappened(UndoableEditEvent) - Method in interface javax.swing.event.UndoableEditListener
An undoable edit happened
undoableEditHappened(UndoableEditEvent) - Method in class javax.swing.undo.UndoManager
Called by the UndoabledEdit sources this UndoManager listens to.
UndoableEditListener - interface javax.swing.event.UndoableEditListener.
Interface implemented by a class interested in hearing about undoable operations.
UndoableEditSupport - class javax.swing.undo.UndoableEditSupport.
A support class used for managing UndoableEdit listeners.
UndoableEditSupport() - Constructor for class javax.swing.undo.UndoableEditSupport
Constructs an UndoableEditSupport object.
UndoableEditSupport(Object) - Constructor for class javax.swing.undo.UndoableEditSupport
Constructs an UndoableEditSupport object.
UndoManager - class javax.swing.undo.UndoManager.
Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.
UndoManager() - Constructor for class javax.swing.undo.UndoManager
UndoName - Static variable in class javax.swing.undo.AbstractUndoableEdit
String returned by getUndoPresentationName()
undoOrRedo() - Method in class javax.swing.undo.UndoManager
Undo or redo as appropriate.
undoRedoName - Variable in class javax.swing.undo.StateEdit
The undo/redo presentation name
undoTo(UndoableEdit) - Method in class javax.swing.undo.UndoManager
Undoes all changes from indexOfNextAdd to edit.
UnexpectedException - exception java.rmi.UnexpectedException.
An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
UnexpectedException(String) - Constructor for class java.rmi.UnexpectedException
Constructs an UnexpectedException with the specified detail message.
UnexpectedException(String, Exception) - Constructor for class java.rmi.UnexpectedException
Constructs a UnexpectedException with the specified detail message and nested exception.
unexportObject(Remote) - Static method in class javax.rmi.PortableRemoteObject
Deregisters a server object from the runtime, allowing the object to become available for garbage collection.
unexportObject(Remote) - Static method in class javax.rmi.CORBA.Util
Removes the associated tie from an internal table and calls Tie.deactivate() to deactivate the object.
unexportObject(Remote) - Method in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Delegation call for PortableRemoteObject.unexportObject(java.rmi.Remote).
unexportObject(Remote) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.unexportObject(java.rmi.Remote).
unexportObject(Remote, boolean) - Static method in class java.rmi.activation.Activatable
Remove the remote object, obj, from the RMI runtime.
unexportObject(Remote, boolean) - Static method in class java.rmi.server.UnicastRemoteObject
Remove the remote object, obj, from the RMI runtime.
UnicastRemoteObject - class java.rmi.server.UnicastRemoteObject.
The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.
UnicastRemoteObject() - Constructor for class java.rmi.server.UnicastRemoteObject
Create and export a new UnicastRemoteObject object using an anonymous port.
UnicastRemoteObject(int) - Constructor for class java.rmi.server.UnicastRemoteObject
Create and export a new UnicastRemoteObject object using the particular supplied port.
UnicastRemoteObject(int, RMIClientSocketFactory, RMIServerSocketFactory) - Constructor for class java.rmi.server.UnicastRemoteObject
Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.
uninitialize() - Method in class javax.swing.LookAndFeel
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel.
UNINITIALIZED - Static variable in class java.security.Signature
Possible Signature.state value, signifying that this signature object has not yet been initialized.
UNINITIALIZED_VALUE - Static variable in class javax.swing.JOptionPane
Indicates that the user has not yet selected a value.
uninstallBorder(JComponent) - Static method in class javax.swing.LookAndFeel
Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource.
uninstallChooserPanel(JColorChooser) - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Invoked when the panel is removed from the chooser.
uninstallComboBoxModelListeners(ComboBoxModel) - Method in class javax.swing.plaf.basic.BasicComboPopup
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicToolBarUI
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
The editor and/or arrow button are removed from the JComboBox here.
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicTreeUI
Uninstalls the renderer pane.
uninstallComponents() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
uninstallComponents() - Method in class javax.swing.plaf.metal.MetalDesktopIconUI
uninstallComponents(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallComponents(JFileChooser) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
uninstallComponents(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
uninstallComponents(JMenuItem) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
uninstallComponents(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
uninstallDefaultChoosers() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicTextUI
Sets the component properties that haven't been explicitly overriden to null.
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicMenuUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicTableUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicToolBarUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicListUI
Set the JList properties that haven't been explicitly overriden to null.
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicTreeUI
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Uninstalls the UI defaults.
uninstallDefaults() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.basic.BasicRadioButtonUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalToggleButtonUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalRadioButtonUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalButtonUI
uninstallDefaults(AbstractButton) - Method in class javax.swing.plaf.metal.MetalCheckBoxUI
uninstallDefaults(JComponent) - Method in class javax.swing.plaf.basic.BasicViewportUI
uninstallDefaults(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
uninstallDefaults(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallDefaults(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
uninstallDefaults(JPanel) - Method in class javax.swing.plaf.basic.BasicPanelUI
uninstallDefaults(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
uninstallDefaults(JScrollPane) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
uninstallDefaults(JSeparator) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
uninstallDesktopManager() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
uninstallIcons(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallingUI() - Method in class javax.swing.plaf.basic.BasicComboPopup
Called when the UI is uninstalling.
uninstallingUI() - Method in interface javax.swing.plaf.basic.ComboPopup
Called to inform the ComboPopup that the UI is uninstalling.
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTextUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicComboPopup
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTableUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicToolBarUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicListUI
Unregister keyboard actions for the up and down arrow keys.
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Removes the focus InputMap and ActionMap.
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicTreeUI
uninstallKeyboardActions() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Uninstalls the keyboard actions for the UI.
uninstallKeyboardActions() - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
uninstallKeyboardActions(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
uninstallKeyboardActions(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonListener
Unregister's default key actions
uninstallKeyboardActions(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
uninstallKeyboardActions(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
uninstallKeyboardActions(JScrollPane) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
uninstallKeyboardActions(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicTextUI
Uninstalls listeners for the UI.
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicMenuItemUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicMenuUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicProgressBarUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicTableUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicScrollBarUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicToolBarUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicListUI
Remove the listeners for the JList, its model, and its selectionModel.
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicComboBoxUI
Removes listeners from the JComboBox and JComboBoxModel.
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicMenuBarUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicColorChooserUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicTreeUI
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Uninstalls the event listeners for the UI.
uninstallListeners() - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
uninstallListeners() - Method in class javax.swing.plaf.metal.MetalComboBoxUI
uninstallListeners() - Method in class javax.swing.plaf.metal.MetalToolBarUI
uninstallListeners(AbstractButton) - Method in class javax.swing.plaf.basic.BasicButtonUI
uninstallListeners(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
uninstallListeners(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
uninstallListeners(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallListeners(JLabel) - Method in class javax.swing.plaf.basic.BasicLabelUI
uninstallListeners(JRootPane) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
uninstallListeners(JScrollPane) - Method in class javax.swing.plaf.metal.MetalScrollPaneUI
uninstallListeners(JSeparator) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
uninstallListeners(JSlider) - Method in class javax.swing.plaf.basic.BasicSliderUI
uninstallStrings(JFileChooser) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.ComponentUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Deinstalls the UI for a component.
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSeparatorUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicButtonUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicProgressBarUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicOptionPaneUI
Removes the receiver from the L&F controller of the passed in split pane.
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTabbedPaneUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicPanelUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicPopupMenuUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTableUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicViewportUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicToolTipUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollBarUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicToolBarUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicInternalFrameUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicListUI
Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order.
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicLabelUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicComboBoxUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTableHeaderUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicMenuBarUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicColorChooserUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicTreeUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSplitPaneUI
Uninstalls the UI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicRootPaneUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicDesktopIconUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.basic.BasicSliderUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalTreeUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalInternalFrameUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalComboBoxUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalToolBarUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.metal.MetalScrollPaneUI
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call uninstallUI on each UI handled by this MultiUI.
uninstallUI(JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call uninstallUI on each UI handled by this MultiUI.
union(Rectangle) - Method in class java.awt.Rectangle
Computes the union of this Rectangle with the specified Rectangle.
union(Rectangle2D, Rectangle2D, Rectangle2D) - Static method in class java.awt.geom.Rectangle2D
Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
UnionMember - class org.omg.CORBA.UnionMember.
A description in the Interface Repository of a member of an IDL union.
UnionMember() - Constructor for class org.omg.CORBA.UnionMember
Constructs a new UnionMember object with its fields initialized to null.
UnionMember(String, Any, TypeCode, IDLType) - Constructor for class org.omg.CORBA.UnionMember
Constructs a new UnionMember object with its fields initialized to the given values.
UnionMemberHelper - class org.omg.CORBA.UnionMemberHelper.
org/omg/CORBA/UnionMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
UnionMemberHelper() - Constructor for class org.omg.CORBA.UnionMemberHelper
UNIT_DECREMENT - Static variable in class java.awt.event.AdjustmentEvent
The unit decrement adjustment type.
UNIT_INCREMENT - Static variable in class java.awt.event.AdjustmentEvent
The unit increment adjustment type.
unitIncrement - Variable in class javax.swing.JScrollBar
UNKNOWN - exception org.omg.CORBA.UNKNOWN.
The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
UNKNOWN - Static variable in class java.awt.ComponentOrientation
Indicates that a component's orientation has not been set.
UNKNOWN - Static variable in class javax.accessibility.AccessibleRole
The object contains some Accessible information, but its role is not known.
UNKNOWN_LENGTH - Static variable in class javax.sound.midi.MidiFileFormat
Represents unknown length.
UNKNOWN_NUMBER_OF_PAGES - Static variable in interface java.awt.print.Pageable
This constant is returned from the getNumberOfPages method if a Pageable implementation does not know the number of pages in its set
UNKNOWN() - Constructor for class org.omg.CORBA.UNKNOWN
Constructs an UNKNOWN exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
UNKNOWN(int, CompletionStatus) - Constructor for class org.omg.CORBA.UNKNOWN
Constructs an UNKNOWN exception with the specified minor code and completion status.
UNKNOWN(String) - Constructor for class org.omg.CORBA.UNKNOWN
Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
UNKNOWN(String, int, CompletionStatus) - Constructor for class org.omg.CORBA.UNKNOWN
Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
UnknownError - error java.lang.UnknownError.
Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
UnknownError() - Constructor for class java.lang.UnknownError
Constructs an UnknownError with no detail message.
UnknownError(String) - Constructor for class java.lang.UnknownError
Constructs an UnknownError with the specified detail message.
UnknownException - exception org.omg.CORBA.portable.UnknownException.
The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.
UnknownException(Throwable) - Constructor for class org.omg.CORBA.portable.UnknownException
Constructs an UnknownException object.
UnknownGroupException - exception java.rmi.activation.UnknownGroupException.
An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
UnknownGroupException(String) - Constructor for class java.rmi.activation.UnknownGroupException
Constructs an UnknownGroupException with the specified detail message.
UnknownHostException - exception java.net.UnknownHostException.
Thrown to indicate that the IP address of a host could not be determined.
UnknownHostException - exception java.rmi.UnknownHostException.
An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.
UnknownHostException() - Constructor for class java.net.UnknownHostException
Constructs a new UnknownHostException with no detail message.
UnknownHostException(String) - Constructor for class java.net.UnknownHostException
Constructs a new UnknownHostException with the specified detail message.
UnknownHostException(String) - Constructor for class java.rmi.UnknownHostException
Constructs an UnknownHostException with the specified detail message.
UnknownHostException(String, Exception) - Constructor for class java.rmi.UnknownHostException
Constructs an UnknownHostException with the specified detail message and nested exception.
UnknownObjectException - exception java.rmi.activation.UnknownObjectException.
An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.
UnknownObjectException(String) - Constructor for class java.rmi.activation.UnknownObjectException
Constructs an UnknownObjectException with the specified detail message.
UnknownServiceException - exception java.net.UnknownServiceException.
Thrown to indicate that an unknown service exception has occurred.
UnknownServiceException() - Constructor for class java.net.UnknownServiceException
Constructs a new UnknownServiceException with no detail message.
UnknownServiceException(String) - Constructor for class java.net.UnknownServiceException
Constructs a new UnknownServiceException with the specified detail message.
UnknownUserException - exception org.omg.CORBA.UnknownUserException.
A class that contains user exceptions returned by the server.
UnknownUserException() - Constructor for class org.omg.CORBA.UnknownUserException
Constructs an UnknownUserException object.
UnknownUserException(Any) - Constructor for class org.omg.CORBA.UnknownUserException
Constructs an UnknownUserException object that contains the given Any object.
unloadAllInstruments(Soundbank) - Method in interface javax.sound.midi.Synthesizer
Unloads all instruments contained in the specified Soundbank.
unloadInstrument(Instrument) - Method in interface javax.sound.midi.Synthesizer
Unloads a particular instrument.
unloadInstruments(Soundbank, Patch[]) - Method in interface javax.sound.midi.Synthesizer
Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.
unloadZone(View) - Method in class javax.swing.text.ZoneView
Unload a zone (Convert the zone to its memory saving state).
unmarshal(DataInputStream) - Method in interface org.omg.CORBA.CustomMarshal
Unmarshal method has to be implemented by the Customized Marshal class This is the method invoked for Unmarshalling.
UnmarshalException - exception java.rmi.UnmarshalException.
An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).
UnmarshalException(String) - Constructor for class java.rmi.UnmarshalException
Constructs an UnmarshalException with the specified detail message.
UnmarshalException(String, Exception) - Constructor for class java.rmi.UnmarshalException
Constructs an UnmarshalException with the specified detail message and nested exception.
unmodifiableCollection(Collection) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified collection.
unmodifiableList(List) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified list.
unmodifiableMap(Map) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified map.
unmodifiableSet(Set) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified set.
unmodifiableSortedMap(SortedMap) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified sorted map.
unmodifiableSortedSet(SortedSet) - Static method in class java.util.Collections
Returns an unmodifiable view of the specified sorted set.
UNNECESSARY - Static variable in class java.awt.GraphicsConfigTemplate
Value used for "Enum" (Integer) type.
unread(byte[]) - Method in class java.io.PushbackInputStream
Pushes back an array of bytes by copying it to the front of the pushback buffer.
unread(byte[], int, int) - Method in class java.io.PushbackInputStream
Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer.
unread(char[]) - Method in class java.io.PushbackReader
Push back an array of characters by copying it to the front of the pushback buffer.
unread(char[], int, int) - Method in class java.io.PushbackReader
Push back a portion of an array of characters by copying it to the front of the pushback buffer.
unread(int) - Method in class java.io.PushbackReader
Push back a single character.
unread(int) - Method in class java.io.PushbackInputStream
Pushes back a byte by copying it to the front of the pushback buffer.
UnrecoverableKeyException - exception java.security.UnrecoverableKeyException.
This exception is thrown if a key in the keystore cannot be recovered.
UnrecoverableKeyException() - Constructor for class java.security.UnrecoverableKeyException
Constructs an UnrecoverableKeyException with no detail message.
UnrecoverableKeyException(String) - Constructor for class java.security.UnrecoverableKeyException
Constructs an UnrecoverableKeyException with the specified detail message, which provides more information about why this exception has been thrown.
Unreferenced - interface java.rmi.server.Unreferenced.
A remote object implementation should implement the Unreferenced interface to receive notification when there are no more clients that reference that remote object.
unreferenced() - Method in interface java.rmi.server.Unreferenced
Called by the RMI runtime sometime after the runtime determines that the reference list, the list of clients referencing the remote object, becomes empty.
unregister_value_factory(String) - Method in class org.omg.CORBA_2_3.ORB
unregister(ActivationID) - Static method in class java.rmi.activation.Activatable
Revokes previous registration for the activation descriptor associated with id.
unregisterComponent(JComponent) - Method in class javax.swing.ToolTipManager
Remove a component from tooltip control.
unregisterGroup(ActivationGroupID) - Method in interface java.rmi.activation.ActivationSystem
Remove the activation group.
unregisterKeyboardAction(KeyStroke) - Method in class javax.swing.JComponent
This method is now obsolete.
unregisterKeyboardActions() - Method in class javax.swing.plaf.basic.BasicDesktopPaneUI
unregisterListeners() - Method in class java.awt.dnd.DragGestureRecognizer
unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
unregisterListeners() - Method in class java.awt.dnd.MouseDragGestureRecognizer
unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
unregisterObject(ActivationID) - Method in interface java.rmi.activation.ActivationSystem
Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
UnresolvedPermission - class java.security.UnresolvedPermission.
The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
UnresolvedPermission(String, String, String, Certificate[]) - Constructor for class java.security.UnresolvedPermission
Creates a new UnresolvedPermission containing the permission information needed later to actually create a Permission of the specified class, when the permission is resolved.
UnsatisfiedLinkError - error java.lang.UnsatisfiedLinkError.
Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
UnsatisfiedLinkError() - Constructor for class java.lang.UnsatisfiedLinkError
Constructs an UnsatisfiedLinkError with no detail message.
UnsatisfiedLinkError(String) - Constructor for class java.lang.UnsatisfiedLinkError
Constructs an UnsatisfiedLinkError with the specified detail message.
unscaledValue() - Method in class java.math.BigDecimal
Returns a BigInteger whose value is the unscaled value of this BigDecimal.
UNSELECTED_CONVERTED_TEXT_HIGHLIGHT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the default highlight for unselected converted text.
UNSELECTED_RAW_TEXT_HIGHLIGHT - Static variable in class java.awt.im.InputMethodHighlight
Constant for the default highlight for unselected raw text.
UnsolicitedNotification - interface javax.naming.ldap.UnsolicitedNotification.
This interface represents an unsolicited notification as defined in RFC 2251.
UnsolicitedNotificationEvent - class javax.naming.ldap.UnsolicitedNotificationEvent.
This class represents an event fired in response to an unsolicited notification sent by the LDAP server.
UnsolicitedNotificationEvent(Object, UnsolicitedNotification) - Constructor for class javax.naming.ldap.UnsolicitedNotificationEvent
Constructs a new instance of UnsolicitedNotificationEvent.
UnsolicitedNotificationListener - interface javax.naming.ldap.UnsolicitedNotificationListener.
This interface is for handling UnsolicitedNotificationEvent.
UNSUPPORTED_POLICY - interface org.omg.CORBA.UNSUPPORTED_POLICY.
UNSUPPORTED_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
UNSUPPORTED_POLICY_VALUE - interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE.
UNSUPPORTED_POLICY_VALUE is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
UnsupportedAudioFileException - exception javax.sound.sampled.UnsupportedAudioFileException.
An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.
UnsupportedAudioFileException() - Constructor for class javax.sound.sampled.UnsupportedAudioFileException
Constructs a UnsupportedAudioFileException that has null as its error detail message.
UnsupportedAudioFileException(String) - Constructor for class javax.sound.sampled.UnsupportedAudioFileException
Constructs a UnsupportedAudioFileException that has the specified detail message.
UnsupportedClassVersionError - error java.lang.UnsupportedClassVersionError.
Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
UnsupportedClassVersionError() - Constructor for class java.lang.UnsupportedClassVersionError
Constructs a UnsupportedClassVersionError with no detail message.
UnsupportedClassVersionError(String) - Constructor for class java.lang.UnsupportedClassVersionError
Constructs a UnsupportedClassVersionError with the specified detail message.
UnsupportedEncodingException - exception java.io.UnsupportedEncodingException.
The Character Encoding is not supported.
UnsupportedEncodingException() - Constructor for class java.io.UnsupportedEncodingException
Constructs an UnsupportedEncodingException without a detail message.
UnsupportedEncodingException(String) - Constructor for class java.io.UnsupportedEncodingException
Constructs an UnsupportedEncodingException with a detail message.
UnsupportedFlavorException - exception java.awt.datatransfer.UnsupportedFlavorException.
Signals that the requested data is not supported in this flavor.
UnsupportedFlavorException(DataFlavor) - Constructor for class java.awt.datatransfer.UnsupportedFlavorException
Constructs an UnsupportedFlavorException.
UnsupportedLookAndFeelException - exception javax.swing.UnsupportedLookAndFeelException.
An exception that indicates the request look & feel management classes are not present on the user's system.
UnsupportedLookAndFeelException(String) - Constructor for class javax.swing.UnsupportedLookAndFeelException
Constructs an UnsupportedLookAndFeelException object.
UnsupportedOperationException - exception java.lang.UnsupportedOperationException.
Thrown to indicate that the requested operation is not supported.
UnsupportedOperationException() - Constructor for class java.lang.UnsupportedOperationException
Constructs an UnsupportedOperationException with no detail message.
UnsupportedOperationException(String) - Constructor for class java.lang.UnsupportedOperationException
Constructs an UnsupportedOperationException with the specified detail message.
unsynchronize(Line[]) - Method in interface javax.sound.sampled.Mixer
Releases synchronization for the specified lines.
UP - Static variable in class java.awt.Event
The Up Arrow key, a non-ASCII action key.
upAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the Action for moving the caret logically upward one position.
UPDATE - Static variable in class java.awt.event.PaintEvent
The update event type.
UPDATE - Static variable in interface javax.accessibility.AccessibleTableModelChange
Identifies a change to existing data.
UPDATE - Static variable in class javax.swing.event.TableModelEvent
Identifies a change to existing data.
update(byte) - Method in class java.security.MessageDigest
Updates the digest using the specified byte.
update(byte) - Method in class java.security.Signature
Updates the data to be signed or verified by a byte.
update(byte[]) - Method in class java.security.MessageDigest
Updates the digest using the specified array of bytes.
update(byte[]) - Method in class java.security.Signature
Updates the data to be signed or verified, using the specified array of bytes.
update(byte[]) - Method in class java.util.zip.Adler32
Updates checksum with specified array of bytes.
update(byte[]) - Method in class java.util.zip.CRC32
Updates checksum with specified array of bytes.
update(byte[], int, int) - Method in class java.security.MessageDigest
Updates the digest using the specified array of bytes, starting at the specified offset.
update(byte[], int, int) - Method in class java.security.Signature
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
update(byte[], int, int) - Method in class java.util.zip.Adler32
Updates checksum with specified array of bytes.
update(byte[], int, int) - Method in interface java.util.zip.Checksum
Updates the current checksum with the specified array of bytes.
update(byte[], int, int) - Method in class java.util.zip.CRC32
Updates CRC-32 with specified array of bytes.
update(Graphics) - Method in class java.awt.Component
Updates this component.
update(Graphics) - Method in class java.awt.Container
Updates the container.
update(Graphics) - Method in class javax.swing.JComponent
Calls paint(g).
update(Graphics) - Method in class javax.swing.JApplet
Just calls paint(g).
update(Graphics) - Method in class javax.swing.CellRendererPane
Shouldn't be called.
update(Graphics) - Method in class javax.swing.JFrame
Just calls paint(g).
update(Graphics) - Method in class javax.swing.JDialog
Calls paint(g).
update(Graphics, JComponent) - Method in class javax.swing.plaf.ComponentUI
update(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicTextUI
Superclass paints background in an uncontrollable way (i.e.
update(Graphics, JComponent) - Method in class javax.swing.plaf.basic.BasicMenuItemUI
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
update(Graphics, JComponent) - Method in class javax.swing.plaf.metal.MetalTabbedPaneUI
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiListUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSeparatorUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiLabelUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiPopupMenuUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiPanelUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiScrollBarUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTextUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiComboBoxUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTableHeaderUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiFileChooserUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiColorChooserUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTreeUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiViewportUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTabbedPaneUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiProgressBarUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiScrollPaneUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiOptionPaneUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSplitPaneUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiButtonUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiToolBarUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiSliderUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopPaneUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiTableUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiDesktopIconUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiMenuItemUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiInternalFrameUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiToolTipUI
Call update on each UI handled by this MultiUI.
update(Graphics, JComponent) - Method in class javax.swing.plaf.multi.MultiMenuBarUI
Call update on each UI handled by this MultiUI.
update(int) - Method in class java.util.zip.Adler32
Updates checksum with specified byte.
update(int) - Method in interface java.util.zip.Checksum
Updates the current checksum with the specified byte.
update(int) - Method in class java.util.zip.CRC32
Updates CRC-32 with specified byte.
update(LineEvent) - Method in interface javax.sound.sampled.LineListener
Informs the listener that a line's state has changed.
update(Observable, Object) - Method in interface java.util.Observer
This method is called whenever the observed object is changed.
updateAsciiStream(int, InputStream, int) - Method in interface java.sql.ResultSet
Updates the designated column with an ascii stream value.
updateAsciiStream(String, InputStream, int) - Method in interface java.sql.ResultSet
Updates the designated column with an ascii stream value.
updateAutoscroll(Point) - Method in class java.awt.dnd.DropTarget
update autoscrolling with current cursor locn
updateBigDecimal(int, BigDecimal) - Method in interface java.sql.ResultSet
Updates the designated column with a java.math.BigDecimal value.
updateBigDecimal(String, BigDecimal) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.BigDecimal value.
updateBinaryStream(int, InputStream, int) - Method in interface java.sql.ResultSet
Updates the designated column with a binary stream value.
updateBinaryStream(String, InputStream, int) - Method in interface java.sql.ResultSet
Updates the designated column with a binary stream value.
updateBoolean(int, boolean) - Method in interface java.sql.ResultSet
Updates the designated column with a boolean value.
updateBoolean(String, boolean) - Method in interface java.sql.ResultSet
Updates the designated column with a boolean value.
updateButtonMnemonic - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
updateButtonText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
updateButtonToolTipText - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
updateByte(int, byte) - Method in interface java.sql.ResultSet
Updates the designated column with a byte value.
updateByte(String, byte) - Method in interface java.sql.ResultSet
Updates the designated column with a byte value.
updateBytes(int, byte[]) - Method in interface java.sql.ResultSet
Updates the designated column with a byte array value.
updateBytes(String, byte[]) - Method in interface java.sql.ResultSet
Updates the designated column with a boolean value.
updateCachedPreferredSize() - Method in class javax.swing.plaf.basic.BasicTreeUI
Updates the preferredSize instance variable, which is returned from getPreferredSize().
updateCellEditor() - Method in class javax.swing.plaf.basic.BasicTreeUI
Updates the cellEditor based on the editability of the JTree that we're contained in.
updateCharacterStream(int, Reader, int) - Method in interface java.sql.ResultSet
Updates the designated column with a character stream value.
updateCharacterStream(String, Reader, int) - Method in interface java.sql.ResultSet
Updates the designated column with a character stream value.
updateChildren(DocumentEvent.ElementChange, DocumentEvent, ViewFactory) - Method in class javax.swing.text.View
Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
updateChildren(DocumentEvent.ElementChange, DocumentEvent, ViewFactory) - Method in class javax.swing.text.ZoneView
The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.
updateChooser() - Method in class javax.swing.colorchooser.AbstractColorChooserPanel
Invoked automatically when the model's state changes.
updateColumnHeader(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
updateComponents() - Method in class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
Determines the components.
updateComponentTreeUI(Component) - Static method in class javax.swing.SwingUtilities
A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.
updateCurrentCursor(int, int, int) - Method in class java.awt.dnd.DragSourceContext
check the cursor for updates and implement defaults
updateDate(int, Date) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Date value.
updateDate(String, Date) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Date value.
updateDepthOffset() - Method in class javax.swing.plaf.basic.BasicTreeUI
Updates how much each depth should be offset by.
updateDouble(int, double) - Method in interface java.sql.ResultSet
Updates the designated column with a double value.
updateDouble(String, double) - Method in interface java.sql.ResultSet
Updates the designated column with a double value.
updateExpandedDescendants(TreePath) - Method in class javax.swing.plaf.basic.BasicTreeUI
Updates the expanded state of all the descendants of path by getting the expanded descendants from the tree and forwarding to the tree state.
updateFloat(int, float) - Method in interface java.sql.ResultSet
Updates the designated column with a float value.
updateFloat(String, float) - Method in interface java.sql.ResultSet
Updates the designated column with a float value.
updateInt(int, int) - Method in interface java.sql.ResultSet
Updates the designated column with an int value.
updateInt(String, int) - Method in interface java.sql.ResultSet
Updates the designated column with an int value.
updateLabelUIs() - Method in class javax.swing.JSlider
Called internally to replace the label UIs with the latest versions from the UIFactory when the UIFactory notifies us via updateUI that the L&F has changed.
updateLayout(DocumentEvent.ElementChange, DocumentEvent, Shape) - Method in class javax.swing.text.View
Update the layout in response to receiving notification of change from the model.
updateLayout(DocumentEvent.ElementChange, DocumentEvent, Shape) - Method in class javax.swing.text.AsyncBoxView
Update the layout in response to receiving notification of change from the model.
updateLayoutCacheExpandedNodes() - Method in class javax.swing.plaf.basic.BasicTreeUI
Makes all the nodes that are expanded in JTree expanded in LayoutCache.
updateLayoutState() - Method in class javax.swing.plaf.basic.BasicListUI
Recompute the value of cellHeight or cellHeights based and cellWidth, based on the current font and the current values of fixedCellWidth, fixedCellHeight, and prototypeCellValue.
updateLayoutStateNeeded - Variable in class javax.swing.plaf.basic.BasicListUI
updateLeadIndex() - Method in class javax.swing.tree.DefaultTreeSelectionModel
Updates the leadIndex instance variable.
updateLevel - Variable in class javax.swing.undo.UndoableEditSupport
updateListBoxSelectionForEvent(MouseEvent, boolean) - Method in class javax.swing.plaf.basic.BasicComboPopup
A utility method used by the event listeners.
updateLocation(Point) - Method in class java.awt.dnd.DropTarget.DropTargetAutoScroller
cause autoscroll to occur
updateLong(int, long) - Method in interface java.sql.ResultSet
Updates the designated column with a long value.
updateLong(String, long) - Method in interface java.sql.ResultSet
Updates the designated column with a long value.
updateNull(int) - Method in interface java.sql.ResultSet
Gives a nullable column a null value.
updateNull(String) - Method in interface java.sql.ResultSet
Updates the designated column with a null value.
updateObject(int, Object) - Method in interface java.sql.ResultSet
Updates the designated column with an Object value.
updateObject(int, Object, int) - Method in interface java.sql.ResultSet
Updates the designated column with an Object value.
updateObject(String, Object) - Method in interface java.sql.ResultSet
Updates the designated column with an Object value.
updateObject(String, Object, int) - Method in interface java.sql.ResultSet
Updates the designated column with an Object value.
updateRenderer() - Method in class javax.swing.plaf.basic.BasicTreeUI
Messaged from the tree we're in when the renderer has changed.
updateRenderer(JComponent, String) - Static method in class javax.swing.plaf.basic.BasicHTML
Stash the HTML render for the given text into the client properties of the given JComponent.
updateRow() - Method in interface java.sql.ResultSet
Updates the underlying database with the new contents of the current row of this ResultSet object.
updateRowHeader(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
updatesAreDetected(int) - Method in interface java.sql.DatabaseMetaData
Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
updateScrollBarDisplayPolicy(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
updateShort(int, short) - Method in interface java.sql.ResultSet
Updates the designated column with a short value.
updateShort(String, short) - Method in interface java.sql.ResultSet
Updates the designated column with a short value.
updateSize() - Method in class javax.swing.plaf.basic.BasicTreeUI
Marks the cached size as being invalid, and messages the tree with treeDidChange.
updateString(int, String) - Method in interface java.sql.ResultSet
Updates the designated column with a String value.
updateString(String, String) - Method in interface java.sql.ResultSet
Updates the designated column with a String value.
updateTableInRealTime - Variable in class javax.swing.table.JTableHeader
Obsolete as of Java 2 platform v1.3.
updateTime(int, Time) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Time value.
updateTime(String, Time) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Time value.
updateTimestamp(int, Timestamp) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Timestamp value.
updateTimestamp(String, Timestamp) - Method in interface java.sql.ResultSet
Updates the designated column with a java.sql.Timestamp value.
updateUI() - Method in class javax.swing.JComponent
Resets the UI property to a value from the current look and feel.
updateUI() - Method in class javax.swing.JViewport
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JTabbedPane
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.AbstractButton
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JMenuItem
Resets the UI property with a value from the current look and feel.
updateUI() - Method in class javax.swing.JToggleButton
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JCheckBox
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JOptionPane
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JMenu
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JColorChooser
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JButton
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JPopupMenu
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JSeparator
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JComboBox
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JList
Sets the UI property with the "ListUI" from the current default UIFactory.
updateUI() - Method in class javax.swing.JToolTip
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JInternalFrame
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JInternalFrame.JDesktopIcon
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JPanel
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JSplitPane
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JTree
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JTable
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JLabel
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JFileChooser
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JDesktopPane
Notification from the UIManager that the L&F has changed.
updateUI() - Method in class javax.swing.JRadioButton
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JToolBar
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JMenuBar
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JScrollPane
Replaces the current ScrollPaneUI object with a version from the current default look and feel.
updateUI() - Method in class javax.swing.JScrollBar
Overrides JComponent.updateUI.
updateUI() - Method in class javax.swing.JProgressBar
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JRootPane
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.JSlider
Notification from the UIFactory that the L&F has changed.
updateUI() - Method in class javax.swing.table.JTableHeader
Notification from the UIManager that the look and feel (L&F) has changed.
updateUI() - Method in class javax.swing.table.DefaultTableCellRenderer
Notification from the UIManager that the look and feel [L&F] has changed.
updateUI() - Method in class javax.swing.text.JTextComponent
Reloads the pluggable UI.
updateUndoPositions(Vector) - Method in class javax.swing.text.StringContent
Resets the location for all the UndoPosRef instances in positions.
updateUndoPositions(Vector, int, int) - Method in class javax.swing.text.GapContent
Resets the location for all the UndoPosRef instances in positions.
updateViewport(PropertyChangeEvent) - Method in class javax.swing.plaf.basic.BasicScrollPaneUI
upFolderIcon - Variable in class javax.swing.plaf.basic.BasicFileChooserUI
upKey - Variable in class javax.swing.plaf.basic.BasicTabbedPaneUI
Deprecated. As of Java 2 platform v1.3.
upKey - Variable in class javax.swing.plaf.basic.BasicToolBarUI
Deprecated. As of Java 2 platform v1.3.
upKey - Variable in class javax.swing.plaf.basic.BasicSplitPaneUI
Deprecated. As of Java 2 platform v1.3.
UPPER_LEADING_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the upper leading edge corner of the viewport.
UPPER_LEFT_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the upper left corner of the viewport.
UPPER_RIGHT_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the upper right corner of the viewport.
UPPER_TRAILING_CORNER - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the upper trailing edge corner of the viewport.
UPPERCASE_LETTER - Static variable in class java.lang.Character
Public data for enumerated Unicode general category types.
upperLeft - Variable in class javax.swing.ScrollPaneLayout
The component to display in the upper left corner.
upperLeft - Variable in class javax.swing.JScrollPane
The component to display in the upper left corner.
upperRight - Variable in class javax.swing.ScrollPaneLayout
The component to display in the upper right corner.
upperRight - Variable in class javax.swing.JScrollPane
The component to display in the upper right corner.
url - Variable in class java.net.URLConnection
The URL represents the remote object on the World Wide Web to which this connection is opened.
URL - class java.net.URL.
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
URL_PKG_PREFIXES - Static variable in interface javax.naming.Context
Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories.
URL(String) - Constructor for class java.net.URL
Creates a URL object from the String representation.
URL(String, String, int, String) - Constructor for class java.net.URL
Creates a URL object from the specified protocol, host, port number, and file.
URL(String, String, int, String, URLStreamHandler) - Constructor for class java.net.URL
Creates a URL object from the specified protocol, host, port number, file, and handler.
URL(String, String, String) - Constructor for class java.net.URL
Creates a URL from the specified protocol name, host name, and file name.
URL(URL, String) - Constructor for class java.net.URL
Creates a URL by parsing the given spec within a specified context.
URL(URL, String, URLStreamHandler) - Constructor for class java.net.URL
Creates a URL by parsing the given spec with the specified handler within a specified context.
URLClassLoader - class java.net.URLClassLoader.
This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
URLClassLoader(URL[]) - Constructor for class java.net.URLClassLoader
Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader.
URLClassLoader(URL[], ClassLoader) - Constructor for class java.net.URLClassLoader
Constructs a new URLClassLoader for the given URLs.
URLClassLoader(URL[], ClassLoader, URLStreamHandlerFactory) - Constructor for class java.net.URLClassLoader
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.
URLConnection - class java.net.URLConnection.
The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
URLConnection(URL) - Constructor for class java.net.URLConnection
Constructs a URL connection to the specified URL.
URLDecoder - class java.net.URLDecoder.
The class contains a utility method for converting from a MIME format called "x-www-form-urlencoded" to a String
URLDecoder() - Constructor for class java.net.URLDecoder
URLEncoder - class java.net.URLEncoder.
The class contains a utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.
URLStreamHandler - class java.net.URLStreamHandler.
The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
URLStreamHandler() - Constructor for class java.net.URLStreamHandler
URLStreamHandlerFactory - interface java.net.URLStreamHandlerFactory.
This interface defines a factory for URL stream protocol handlers.
US - Static variable in class java.util.Locale
Useful constant for country.
USE_ALL_BEANINFO - Static variable in class java.beans.Introspector
useCaches - Variable in class java.net.URLConnection
If true, the protocol is allowed to use caching whenever it can.
useDaylightTime() - Method in class java.util.TimeZone
Queries if this time zone uses daylight savings time.
useDaylightTime() - Method in class java.util.SimpleTimeZone
Overrides TimeZone Queries if this time zone uses Daylight Savings Time.
USEMAP - Static variable in class javax.swing.text.html.HTML.Attribute
useProtocolVersion(int) - Method in class java.io.ObjectOutputStream
Specify stream protocol version to use when writing the stream.
UserException - exception org.omg.CORBA.UserException.
The root class for CORBA IDL-defined user exceptions.
UserException() - Constructor for class org.omg.CORBA.UserException
Constructs a UserException object.
UserException(String) - Constructor for class org.omg.CORBA.UserException
Constructs a UserException object with a detail message.
userObject - Variable in class javax.swing.tree.DefaultMutableTreeNode
optional user object
usesFractionalMetrics() - Method in class java.awt.font.FontRenderContext
Gets the text fractional metrics mode requested by the application for use in this FontRenderContext.
usesLocalFilePerTable() - Method in interface java.sql.DatabaseMetaData
Does the database use a file for each table?
usesLocalFiles() - Method in interface java.sql.DatabaseMetaData
Does the database store tables in a local file?
usesShiftModifier() - Method in class java.awt.MenuShortcut
Return whether this MenuShortcut must be invoked using the SHIFT key.
UShortSeqHelper - class org.omg.CORBA.UShortSeqHelper.
org/omg/CORBA/UShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
UShortSeqHelper() - Constructor for class org.omg.CORBA.UShortSeqHelper
UShortSeqHolder - class org.omg.CORBA.UShortSeqHolder.
org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
UShortSeqHolder() - Constructor for class org.omg.CORBA.UShortSeqHolder
UShortSeqHolder(short[]) - Constructor for class org.omg.CORBA.UShortSeqHolder
usingProxy() - Method in class java.net.HttpURLConnection
Indicates if the connection is going through a proxy.
UTC(int, int, int, int, int, int) - Static method in class java.util.Date
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime().
UTFDataFormatException - exception java.io.UTFDataFormatException.
Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
UTFDataFormatException() - Constructor for class java.io.UTFDataFormatException
Constructs a UTFDataFormatException with null as its error detail message.
UTFDataFormatException(String) - Constructor for class java.io.UTFDataFormatException
Constructs a UTFDataFormatException with the specified detail message.
Util - class javax.rmi.CORBA.Util.
Provides utility methods that can be used by stubs and ties to perform common operations.
UtilDelegate - interface javax.rmi.CORBA.UtilDelegate.
Supports delegation for method implementations in Util.
Utilities - class javax.swing.text.Utilities.
A collection of methods to deal with various text related activities.
Utilities() - Constructor for class javax.swing.text.Utilities
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


V-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

V

valid() - Method in class java.io.FileDescriptor
Tests if this file descriptor object is valid.
validate() - Method in class java.awt.Component
Ensures that this component has a valid layout.
validate() - Method in class java.awt.Container
Validates this container and all of its subcomponents.
validate() - Method in class javax.swing.DefaultListCellRenderer
Overridden for performance reasons.
validate() - Method in class javax.swing.table.DefaultTableCellRenderer
Overridden for performance reasons.
validate() - Method in class javax.swing.tree.DefaultTreeCellRenderer
Overridden for performance reasons.
validateFileCache() - Method in class javax.swing.plaf.basic.BasicDirectoryModel
validateInvalidComponents() - Method in class javax.swing.RepaintManager
Validate all of the components that have been marked invalid.
validateObject() - Method in interface java.io.ObjectInputValidation
Validates the object.
validatePage(PageFormat) - Method in class java.awt.print.PrinterJob
Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob.
validatePendingAdd(Object) - Method in class java.beans.beancontext.BeanContextSupport
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.
validatePendingRemove(Object) - Method in class java.beans.beancontext.BeanContextSupport
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.
validatePendingSetBeanContext(BeanContext) - Method in class java.beans.beancontext.BeanContextChildSupport
Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.
validateTree() - Method in class java.awt.Container
Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid).
validCachedPreferredSize - Variable in class javax.swing.plaf.basic.BasicTreeUI
Is the preferredSize valid?
VALIGN - Static variable in class javax.swing.text.html.HTML.Attribute
value - Variable in class java.sql.DriverPropertyInfo
The value field specifies the current value of the property, based on a combination of the information supplied to the method getPropertyInfo, the Java environment, and the driver-supplied default values.
value - Variable in class javax.swing.JOptionPane
Currently selected value, will be a valid option, or UNINITIALIZED_VALUE or null.
value - Variable in class javax.swing.DefaultCellEditor.EditorDelegate
value - Variable in class javax.swing.text.html.parser.AttributeList
value - Variable in class org.omg.CORBA.UShortSeqHolder
value - Static variable in interface org.omg.CORBA.UNSUPPORTED_POLICY
The Error code for PolicyError exception.
value - Variable in class org.omg.CORBA.DoubleHolder
The double value held by this DoubleHolder object.
value - Variable in class org.omg.CORBA.AnyHolder
The Any value held by this AnyHolder object.
value - Static variable in interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE
The Error code for PolicyError exception.
value - Variable in class org.omg.CORBA.DoubleSeqHolder
value - Static variable in interface org.omg.CORBA.ARG_OUT
The constant value indicating an output argument.
value - Variable in class org.omg.CORBA.ShortSeqHolder
value - Static variable in interface org.omg.CORBA.VM_TRUNCATABLE
The value representing a truncatable value type in a typecode.
value - Variable in class org.omg.CORBA.ObjectHolder
The Object value held by this ObjectHolder object.
value - Static variable in interface org.omg.CORBA.OMGVMCID
The vendor minor code ID reserved for OMG.
value - Variable in class org.omg.CORBA.LongLongSeqHolder
value - Static variable in interface org.omg.CORBA.VM_NONE
The value representing the value type in a typecode as per CORBA 2.3 spec.
value - Variable in class org.omg.CORBA.ShortHolder
The short value held by this ShortHolder object.
value - Static variable in interface org.omg.CORBA.CTX_RESTRICT_SCOPE
The field containing the int value of a CTX_RESTRICT_SCOPE flag.
value - Static variable in interface org.omg.CORBA.ARG_INOUT
The constant value indicating an argument used for both input and output.
value - Variable in class org.omg.CORBA.ULongLongSeqHolder
value - Static variable in interface org.omg.CORBA.BAD_POLICY_TYPE
The Error code in PolicyError exception.
value - Variable in class org.omg.CORBA.CurrentHolder
value - Variable in class org.omg.CORBA.CharHolder
The char value held by this CharHolder object.
value - Static variable in interface org.omg.CORBA.PRIVATE_MEMBER
Constant to define a private member in the ValueMember class
value - Variable in class org.omg.CORBA.PrincipalHolder
Deprecated. The Principal value held by this PrincipalHolder object.
value - Variable in class org.omg.CORBA.ValueBaseHolder
The java.io.Serializable value held by this ValueBaseHolder object.
value - Static variable in interface org.omg.CORBA.BAD_POLICY_VALUE
The value used to represent a bad policy value error in a PolicyError exception.
value - Variable in class org.omg.CORBA.PolicyHolder
value - Variable in class org.omg.CORBA.AnySeqHolder
value - Variable in class org.omg.CORBA.PolicyListHolder
value - Variable in class org.omg.CORBA.NameValuePair
The value to be associated with a name by this NameValuePair object.
value - Variable in class org.omg.CORBA.ServiceInformationHolder
The ServiceInformation value held by this ServiceInformationHolder object in its value field.
value - Variable in class org.omg.CORBA.IntHolder
The int value held by this IntHolder object in its value field.
value - Variable in class org.omg.CORBA.LongSeqHolder
value - Variable in class org.omg.CORBA.StringHolder
The String value held by this StringHolder object.
value - Variable in class org.omg.CORBA.FixedHolder
The value held by the FixedHolder
value - Variable in class org.omg.CORBA.TypeCodeHolder
The TypeCode value held by this TypeCodeHolder object.
value - Variable in class org.omg.CORBA.OctetSeqHolder
value - Variable in class org.omg.CORBA.BooleanSeqHolder
value - Variable in class org.omg.CORBA.FloatSeqHolder
value - Variable in class org.omg.CORBA.ULongSeqHolder
value - Static variable in interface org.omg.CORBA.VM_CUSTOM
The value representing a custom marshalled value type in a typecode.
value - Variable in class org.omg.CORBA.FloatHolder
The float value held by this FloatHolder object.
value - Variable in class org.omg.CORBA.ByteHolder
The byte value held by this ByteHolder object.
value - Variable in class org.omg.CORBA.BooleanHolder
The boolean value held by this BooleanHolder object.
value - Variable in class org.omg.CORBA.CharSeqHolder
value - Variable in class org.omg.CORBA.LongHolder
The long value held by this LongHolder object.
value - Static variable in interface org.omg.CORBA.PUBLIC_MEMBER
Constant to define a public member in the ValueMember class
value - Variable in class org.omg.CORBA.WCharSeqHolder
value - Static variable in interface org.omg.CORBA.ARG_IN
The value indicating an input argument.
value - Static variable in interface org.omg.CORBA.VM_ABSTRACT
value - Static variable in interface org.omg.CORBA.BAD_POLICY
The Error code in PolicyError exception.
value - Variable in class org.omg.CosNaming.BindingIteratorHolder
value - Variable in class org.omg.CosNaming.NameComponentHolder
value - Variable in class org.omg.CosNaming.BindingTypeHolder
value - Variable in class org.omg.CosNaming.BindingListHolder
value - Variable in class org.omg.CosNaming.BindingHolder
value - Variable in class org.omg.CosNaming.NameHolder
value - Variable in class org.omg.CosNaming.NamingContextHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
value - Variable in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
VALUE - Static variable in class javax.swing.text.html.HTML.Attribute
VALUE_ALPHA_INTERPOLATION_DEFAULT - Static variable in class java.awt.RenderingHints
Alpha interpolation hint value -- ALPHA_INTERPOLATION_DEFAULT
VALUE_ALPHA_INTERPOLATION_QUALITY - Static variable in class java.awt.RenderingHints
Alpha interpolation hint value -- ALPHA_INTERPOLATION_QUALITY
VALUE_ALPHA_INTERPOLATION_SPEED - Static variable in class java.awt.RenderingHints
Alpha interpolation hint value -- ALPHA_INTERPOLATION_SPEED
VALUE_ANTIALIAS_DEFAULT - Static variable in class java.awt.RenderingHints
Antialiasing hint values -- rendering is done with the platform default antialiasing mode.
VALUE_ANTIALIAS_OFF - Static variable in class java.awt.RenderingHints
Antialiasing hint values -- rendering is done without antialiasing
VALUE_ANTIALIAS_ON - Static variable in class java.awt.RenderingHints
Antialiasing hint values -- rendering is done with antialiasing
value_as_string() - Method in interface org.omg.CORBA.DynEnum
Return the value of the IDL enum stored in this DynEnum as a string.
value_as_string(String) - Method in interface org.omg.CORBA.DynEnum
Set a particular enum in this DynEnum.
value_as_ulong() - Method in interface org.omg.CORBA.DynEnum
Return the value of the IDL enum as a Java int.
value_as_ulong(int) - Method in interface org.omg.CORBA.DynEnum
Set the value of the IDL enum.
VALUE_COLOR_RENDER_DEFAULT - Static variable in class java.awt.RenderingHints
Color rendering hint value -- COLOR_RENDER_DEFAULT
VALUE_COLOR_RENDER_QUALITY - Static variable in class java.awt.RenderingHints
Color rendering hint value -- COLOR_RENDER_QUALITY
VALUE_COLOR_RENDER_SPEED - Static variable in class java.awt.RenderingHints
Color rendering hint value -- COLOR_RENDER_SPEED
VALUE_DITHER_DEFAULT - Static variable in class java.awt.RenderingHints
Dithering hint values -- use the platform default for dithering
VALUE_DITHER_DISABLE - Static variable in class java.awt.RenderingHints
Dithering hint values -- do not dither when rendering
VALUE_DITHER_ENABLE - Static variable in class java.awt.RenderingHints
Dithering hint values -- dither when rendering, if needed
VALUE_FRACTIONALMETRICS_DEFAULT - Static variable in class java.awt.RenderingHints
Font fractional metrics hint values -- use the platform default for fractional metrics
VALUE_FRACTIONALMETRICS_OFF - Static variable in class java.awt.RenderingHints
Font fractional metrics hint values -- fractional metrics disabled
VALUE_FRACTIONALMETRICS_ON - Static variable in class java.awt.RenderingHints
Font fractional metrics hint values -- fractional metrics enabled
VALUE_INTERPOLATION_BICUBIC - Static variable in class java.awt.RenderingHints
Interpolation hint value -- INTERPOLATION_BICUBIC
VALUE_INTERPOLATION_BILINEAR - Static variable in class java.awt.RenderingHints
Interpolation hint value -- INTERPOLATION_BILINEAR
VALUE_INTERPOLATION_NEAREST_NEIGHBOR - Static variable in class java.awt.RenderingHints
Interpolation hint value -- INTERPOLATION_NEAREST_NEIGHBOR
VALUE_PROPERTY - Static variable in class javax.swing.JOptionPane
Bounds property name for value.
VALUE_RENDER_DEFAULT - Static variable in class java.awt.RenderingHints
Rendering hint values -- The platform default rendering algorithms are chosen.
VALUE_RENDER_QUALITY - Static variable in class java.awt.RenderingHints
Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output quality.
VALUE_RENDER_SPEED - Static variable in class java.awt.RenderingHints
Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output speed.
VALUE_STROKE_DEFAULT - Static variable in class java.awt.RenderingHints
Stroke normalization control hint value -- STROKE_DEFAULT
VALUE_STROKE_NORMALIZE - Static variable in class java.awt.RenderingHints
Stroke normalization control hint value -- STROKE_NORMALIZE
VALUE_STROKE_PURE - Static variable in class java.awt.RenderingHints
Stroke normalization control hint value -- STROKE_PURE
VALUE_TEXT_ANTIALIAS_DEFAULT - Static variable in class java.awt.RenderingHints
Text antialiasing hint value -- text rendering is done using the platform default text antialiasing mode.
VALUE_TEXT_ANTIALIAS_OFF - Static variable in class java.awt.RenderingHints
Text antialiasing hint value -- text rendering is done without antialiasing
VALUE_TEXT_ANTIALIAS_ON - Static variable in class java.awt.RenderingHints
Text antialiasing hint value -- text rendering is done with antialiasing
value() - Method in class org.omg.CORBA.SetOverrideType
Retrieves the value of this SetOverrideType instance.
value() - Method in class org.omg.CORBA.TCKind
Retrieves the value of this TCKind instance.
value() - Method in class org.omg.CORBA.NamedValue
Retrieves the value for this NamedValue object.
value() - Method in class org.omg.CORBA.CompletionStatus
Retrieves the value of this CompletionStatus object.
value() - Method in class org.omg.CORBA.DefinitionKind
Returns the int constant identifying the type of an IR object.
value() - Method in class org.omg.CosNaming.BindingType
value() - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
ValueBase - interface org.omg.CORBA.portable.ValueBase.
The generated Java classes corresponding to valuetype IDL types implement this interface.
ValueBaseHelper - class org.omg.CORBA.ValueBaseHelper.
ValueBaseHelper() - Constructor for class org.omg.CORBA.ValueBaseHelper
ValueBaseHolder - class org.omg.CORBA.ValueBaseHolder.
A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods.
ValueBaseHolder() - Constructor for class org.omg.CORBA.ValueBaseHolder
Constructs a new ValueBaseHolder object with its value field initialized to 0.
ValueBaseHolder(Serializable) - Constructor for class org.omg.CORBA.ValueBaseHolder
Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.
valueChanged(ListSelectionEvent) - Method in class javax.swing.JList.AccessibleJList
List Selection Listener value change method.
valueChanged(ListSelectionEvent) - Method in class javax.swing.JTable
Invoked when the row selection changes -- repaints to show the new selection.
valueChanged(ListSelectionEvent) - Method in class javax.swing.JTable.AccessibleJTable
Track changes to table cell selections
valueChanged(ListSelectionEvent) - Method in interface javax.swing.event.ListSelectionListener
Called whenever the value of the selection changes.
valueChanged(ListSelectionEvent) - Method in class javax.swing.table.DefaultTableColumnModel
A ListSelectionListener that forwards ListSelectionEvents when there is a column selection change.
valueChanged(ListSelectionEvent) - Method in class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler
valueChanged(ListSelectionEvent) - Method in class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener
valueChanged(ListSelectionEvent) - Method in class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler
valueChanged(ListSelectionEvent) - Method in class javax.swing.plaf.metal.MetalFileChooserUI
valueChanged(TreeSelectionEvent) - Method in class javax.swing.JTree.TreeSelectionRedirector
Invoked by the TreeSelectionModel when the selection changes.
valueChanged(TreeSelectionEvent) - Method in class javax.swing.JTree.AccessibleJTree
Tree Selection Listener value change method.
valueChanged(TreeSelectionEvent) - Method in interface javax.swing.event.TreeSelectionListener
Called whenever the value of the selection changes.
valueChanged(TreeSelectionEvent) - Method in class javax.swing.tree.DefaultTreeCellEditor
Resets lastPath.
valueChanged(TreeSelectionEvent) - Method in class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler
Messaged when the selection changes in the tree we're displaying for.
ValueFactory - interface org.omg.CORBA.portable.ValueFactory.
The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory.
valueForPathChanged(TreePath, Object) - Method in interface javax.swing.tree.TreeModel
Messaged when the user has altered the value for the item identified by path to newValue.
valueForPathChanged(TreePath, Object) - Method in class javax.swing.tree.DefaultTreeModel
This sets the user object of the TreeNode identified by path and posts a node changed.
valueForXPosition(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
Returns a value give an x position.
valueForYPosition(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
Returns a value give a y position.
ValueHandler - interface javax.rmi.CORBA.ValueHandler.
Defines methods which allow serialization of Java objects to and from GIOP streams.
valueIsAdjusting - Variable in class javax.swing.plaf.basic.BasicComboPopup
ValueMember - class org.omg.CORBA.ValueMember.
A description in the Interface Repository of a member of a value object.
ValueMember() - Constructor for class org.omg.CORBA.ValueMember
Constructs a default ValueMember object.
ValueMember(String, String, String, String, TypeCode, IDLType, short) - Constructor for class org.omg.CORBA.ValueMember
Constructs a ValueMember object initialized with the given values.
ValueMemberHelper - class org.omg.CORBA.ValueMemberHelper.
org/omg/CORBA/ValueMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
ValueMemberHelper() - Constructor for class org.omg.CORBA.ValueMemberHelper
valueOf(boolean) - Static method in class java.lang.String
Returns the string representation of the boolean argument.
valueOf(char) - Static method in class java.lang.String
Returns the string representation of the char argument.
valueOf(char[]) - Static method in class java.lang.String
Returns the string representation of the char array argument.
valueOf(char[], int, int) - Static method in class java.lang.String
Returns the string representation of a specific subarray of the char array argument.
valueOf(double) - Static method in class java.lang.String
Returns the string representation of the double argument.
valueOf(float) - Static method in class java.lang.String
Returns the string representation of the float argument.
valueOf(int) - Static method in class java.lang.String
Returns the string representation of the int argument.
valueOf(long) - Static method in class java.lang.String
Returns the string representation of the long argument.
valueOf(long) - Static method in class java.math.BigInteger
Returns a BigInteger whose value is equal to that of the specified long.
valueOf(long) - Static method in class java.math.BigDecimal
Translates a long value into a BigDecimal with a scale of zero.
valueOf(long, int) - Static method in class java.math.BigDecimal
Translates a long unscaled value and an int scale into a BigDecimal.
valueOf(Object) - Static method in class java.lang.String
Returns the string representation of the Object argument.
valueOf(String) - Static method in class java.lang.Long
Returns a new long object initialized to the value of the specified String.
valueOf(String) - Static method in class java.lang.Short
Assuming the specified String represents a short, returns a new Short object initialized to that value.
valueOf(String) - Static method in class java.lang.Float
Returns the floating point value represented by the specified String.
valueOf(String) - Static method in class java.lang.Integer
Returns a new Integer object initialized to the value of the specified String.
valueOf(String) - Static method in class java.lang.Byte
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
valueOf(String) - Static method in class java.lang.Double
Returns a new Double object initialized to the value represented by the specified string.
valueOf(String) - Static method in class java.lang.Boolean
Returns a Boolean with a value represented by the specified String.
valueOf(String) - Static method in class java.sql.Timestamp
Converts a String object in JDBC timestamp escape format to a Timestamp value.
valueOf(String) - Static method in class java.sql.Date
Converts a string in JDBC date escape format to a Date value.
valueOf(String) - Static method in class java.sql.Time
Converts a string in JDBC time escape format to a Time value.
valueOf(String, int) - Static method in class java.lang.Long
Returns a new long object initialized to the value of the specified String.
valueOf(String, int) - Static method in class java.lang.Short
Assuming the specified String represents a short, returns a new Short object initialized to that value.
valueOf(String, int) - Static method in class java.lang.Integer
Returns a new Integer object initialized to the value of the specified String.
valueOf(String, int) - Static method in class java.lang.Byte
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
values - Variable in class javax.naming.directory.BasicAttribute
Holds the attribute's values.
values - Variable in class javax.swing.text.html.parser.AttributeList
values() - Method in class java.awt.RenderingHints
Returns a Collection view of the values contained in this RenderinHints.
values() - Method in class java.security.Provider
Returns an unmodifiable Collection view of the property values contained in this provider.
values() - Method in class java.util.Hashtable
Returns a Collection view of the values contained in this Hashtable.
values() - Method in class java.util.AbstractMap
Returns a collection view of the values contained in this map.
values() - Method in class java.util.TreeMap
Returns a collection view of the values contained in this map.
values() - Method in class java.util.HashMap
Returns a collection view of the values contained in this map.
values() - Method in interface java.util.Map
Returns a collection view of the values contained in this map.
values() - Method in class java.util.jar.Attributes
Returns a Collection view of the attribute values contained in this Map.
VALUETYPE - Static variable in class javax.swing.text.html.HTML.Attribute
VAR - Static variable in class javax.swing.text.html.HTML.Tag
VARBINARY - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.
VARCHAR - Static variable in class java.sql.Types
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.
VariableHeightLayoutCache - class javax.swing.tree.VariableHeightLayoutCache.
NOTE: This will become more open in a future release.
VariableHeightLayoutCache() - Constructor for class javax.swing.tree.VariableHeightLayoutCache
vcSupport - Variable in class java.beans.beancontext.BeanContextChildSupport
The VetoableChangeSupport associated with this BeanContextChildSupport.
Vector - class java.util.Vector.
The Vector class implements a growable array of objects.
Vector() - Constructor for class java.util.Vector
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.
Vector(Collection) - Constructor for class java.util.Vector
Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Vector(int) - Constructor for class java.util.Vector
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.
Vector(int, int) - Constructor for class java.util.Vector
Constructs an empty vector with the specified initial capacity and capacity increment.
VERBOSE - Static variable in class java.rmi.server.LogStream
Deprecated. log level constant (verbose logging).
VERIFY - Static variable in class java.security.Signature
Possible Signature.state value, signifying that this signature object has been initialized for verification.
verify(byte[]) - Method in class java.security.Signature
Verifies the passed-in signature.
verify(JComponent) - Method in class javax.swing.InputVerifier
Checks whether the JComponent's input is valid.
verify(PublicKey) - Method in class java.security.cert.Certificate
Verifies that this certificate was signed using the private key that corresponds to the specified public key.
verify(PublicKey) - Method in class java.security.cert.X509CRL
Verifies that this CRL was signed using the private key that corresponds to the given public key.
verify(PublicKey, Signature) - Method in class java.security.SignedObject
Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
verify(PublicKey, String) - Method in class java.security.cert.Certificate
Verifies that this certificate was signed using the private key that corresponds to the specified public key.
verify(PublicKey, String) - Method in class java.security.cert.X509CRL
Verifies that this CRL was signed using the private key that corresponds to the given public key.
VerifyError - error java.lang.VerifyError.
Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
VerifyError() - Constructor for class java.lang.VerifyError
Constructs an VerifyError with no detail message.
VerifyError(String) - Constructor for class java.lang.VerifyError
Constructs an VerifyError with the specified detail message.
version - Variable in class org.omg.CORBA.ValueMember
The name of the value member described by this ValueMember object.
VERSION - Static variable in class javax.swing.text.html.HTML.Attribute
versionColumnNotPseudo - Static variable in interface java.sql.DatabaseMetaData
Indicates that this version column is NOT a pseudo column.
versionColumnPseudo - Static variable in interface java.sql.DatabaseMetaData
Indicates that this version column is a pseudo column.
versionColumnUnknown - Static variable in interface java.sql.DatabaseMetaData
Indicates that this version column may or may not be a pseudo column.
VersionSpecHelper - class org.omg.CORBA.VersionSpecHelper.
org/omg/CORBA/VersionSpecHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
VersionSpecHelper() - Constructor for class org.omg.CORBA.VersionSpecHelper
VERTICAL - Static variable in class java.awt.Scrollbar
A constant that indicates a vertical scroll bar.
VERTICAL - Static variable in interface java.awt.Adjustable
The vertical orientation.
VERTICAL - Static variable in class java.awt.GridBagConstraints
Resize the component vertically but not horizontally.
VERTICAL - Static variable in class javax.accessibility.AccessibleState
Indicates the orientation of this object is vertical.
VERTICAL - Static variable in interface javax.swing.SwingConstants
Vertical orientation.
VERTICAL_ALIGN - Static variable in class javax.swing.text.html.CSS.Attribute
VERTICAL_ALIGNMENT_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's vertical alignment.
VERTICAL_SCROLLBAR - Static variable in interface javax.swing.ScrollPaneConstants
Identifies a vertical scrollbar.
VERTICAL_SCROLLBAR_ALWAYS - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the vertical scroll bar policy so that vertical scrollbars are always displayed.
VERTICAL_SCROLLBAR_AS_NEEDED - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the vertical scroll bar policy so that vertical scrollbars are displayed only when needed.
VERTICAL_SCROLLBAR_NEVER - Static variable in interface javax.swing.ScrollPaneConstants
Used to set the vertical scroll bar policy so that vertical scrollbars are never displayed.
VERTICAL_SCROLLBAR_POLICY - Static variable in interface javax.swing.ScrollPaneConstants
Identifies the vertical scroll bar policy property.
VERTICAL_SPLIT - Static variable in class javax.swing.JSplitPane
Vertical split indicates the Components are split along the y axis.
VERTICAL_TEXT_POSITION_CHANGED_PROPERTY - Static variable in class javax.swing.AbstractButton
Identifies a change in the button's vertical text position.
verticalScrollBar - Variable in class javax.swing.JScrollPane
The scrollpane's vertical scrollbar child.
verticalScrollBarPolicy - Variable in class javax.swing.JScrollPane
The display policy for the vertical scrollbar.
vertThumbIcon - Static variable in class javax.swing.plaf.metal.MetalSliderUI
vetoableChange(PropertyChangeEvent) - Method in interface java.beans.VetoableChangeListener
This method gets called when a constrained property is changed.
vetoableChange(PropertyChangeEvent) - Method in class java.beans.beancontext.BeanContextSupport
subclasses may envelope to monitor veto child property changes.
VetoableChangeListener - interface java.beans.VetoableChangeListener.
A VetoableChange event gets fired whenever a bean changes a "constrained" property.
VetoableChangeSupport - class java.beans.VetoableChangeSupport.
This is a utility class that can be used by beans that support constrained properties.
VetoableChangeSupport(Object) - Constructor for class java.beans.VetoableChangeSupport
Constructs a VetoableChangeSupport object.
View - class javax.swing.text.View.
A very important part of the text package is the View class.
View(Element) - Constructor for class javax.swing.text.View
Creates a new View object.
ViewFactory - interface javax.swing.text.ViewFactory.
A factory to create a view of some portion of document subject.
viewport - Variable in class javax.swing.ScrollPaneLayout
The scrollpanes viewport child.
viewport - Variable in class javax.swing.JScrollPane
The scrollpane's viewport child.
viewPort - Variable in class javax.swing.JScrollPane.AccessibleJScrollPane
VIEWPORT - Static variable in class javax.accessibility.AccessibleRole
An object usually used in a scroll pane.
VIEWPORT - Static variable in interface javax.swing.ScrollPaneConstants
Identifies a "viewport" or display area, within which scrolled contents are visible.
viewportChangeListener - Variable in class javax.swing.plaf.basic.BasicScrollPaneUI
ViewportLayout - class javax.swing.ViewportLayout.
The default layout manager for JViewport.
ViewportLayout() - Constructor for class javax.swing.ViewportLayout
ViewportUI - class javax.swing.plaf.ViewportUI.
Pluggable look and feel interface for JViewport.
ViewportUI() - Constructor for class javax.swing.plaf.ViewportUI
viewToModel(float, float, Shape) - Method in class javax.swing.text.View
Deprecated.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.View
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.CompositeView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.GlyphView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.BoxView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.PlainView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.FieldView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.PasswordView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.AsyncBoxView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.ComponentView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.IconView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(GlyphView, float, float, Shape, Position.Bias[]) - Method in class javax.swing.text.GlyphView.GlyphPainter
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(JTextComponent, Point) - Method in class javax.swing.plaf.TextUI
Converts the given place in the view coordinate system to the nearest representative location in the model.
viewToModel(JTextComponent, Point) - Method in class javax.swing.plaf.basic.BasicTextUI
Converts the given place in the view coordinate system to the nearest representative location in the model.
viewToModel(JTextComponent, Point) - Method in class javax.swing.plaf.multi.MultiTextUI
Call viewToModel on each UI handled by this MultiUI.
viewToModel(JTextComponent, Point, Position.Bias[]) - Method in class javax.swing.plaf.TextUI
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(JTextComponent, Point, Position.Bias[]) - Method in class javax.swing.plaf.basic.BasicTextUI
Converts the given place in the view coordinate system to the nearest representative location in the model.
viewToModel(JTextComponent, Point, Position.Bias[]) - Method in class javax.swing.plaf.multi.MultiTextUI
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
viewToModel(Point) - Method in class javax.swing.text.JTextComponent
Converts the given place in the view coordinate system to the nearest representative location in the model.
VirtualMachineError - error java.lang.VirtualMachineError.
Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
VirtualMachineError() - Constructor for class java.lang.VirtualMachineError
Constructs a VirtualMachineError with no detail message.
VirtualMachineError(String) - Constructor for class java.lang.VirtualMachineError
Constructs a VirtualMachineError with the specified detail message.
Visibility - interface java.beans.Visibility.
Under some circumstances a bean may be run on servers where a GUI is not available.
VisibilityHelper - class org.omg.CORBA.VisibilityHelper.
org/omg/CORBA/VisibilityHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
VisibilityHelper() - Constructor for class org.omg.CORBA.VisibilityHelper
VISIBLE - Static variable in class javax.accessibility.AccessibleState
Indicates this object is visible.
VISIBLE_ROW_COUNT_PROPERTY - Static variable in class javax.swing.JTree
Bound property name for visibleRowCount.
visibleRowCount - Variable in class javax.swing.JTree
Number of rows to make visible at one time.
VK_0 - Static variable in class java.awt.event.KeyEvent
VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)
VK_1 - Static variable in class java.awt.event.KeyEvent
VK_2 - Static variable in class java.awt.event.KeyEvent
VK_3 - Static variable in class java.awt.event.KeyEvent
VK_4 - Static variable in class java.awt.event.KeyEvent
VK_5 - Static variable in class java.awt.event.KeyEvent
VK_6 - Static variable in class java.awt.event.KeyEvent
VK_7 - Static variable in class java.awt.event.KeyEvent
VK_8 - Static variable in class java.awt.event.KeyEvent
VK_9 - Static variable in class java.awt.event.KeyEvent
VK_A - Static variable in class java.awt.event.KeyEvent
VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)
VK_ACCEPT - Static variable in class java.awt.event.KeyEvent
Constant for the Accept or Commit function key.
VK_ADD - Static variable in class java.awt.event.KeyEvent
VK_AGAIN - Static variable in class java.awt.event.KeyEvent
VK_ALL_CANDIDATES - Static variable in class java.awt.event.KeyEvent
Constant for the All Candidates function key.
VK_ALPHANUMERIC - Static variable in class java.awt.event.KeyEvent
Constant for the Alphanumeric function key.
VK_ALT - Static variable in class java.awt.event.KeyEvent
VK_ALT_GRAPH - Static variable in class java.awt.event.KeyEvent
Constant for the AltGraph function key.
VK_AMPERSAND - Static variable in class java.awt.event.KeyEvent
VK_ASTERISK - Static variable in class java.awt.event.KeyEvent
VK_AT - Static variable in class java.awt.event.KeyEvent
Constant for the "@" key.
VK_B - Static variable in class java.awt.event.KeyEvent
VK_BACK_QUOTE - Static variable in class java.awt.event.KeyEvent
VK_BACK_SLASH - Static variable in class java.awt.event.KeyEvent
VK_BACK_SPACE - Static variable in class java.awt.event.KeyEvent
VK_BRACELEFT - Static variable in class java.awt.event.KeyEvent
VK_BRACERIGHT - Static variable in class java.awt.event.KeyEvent
VK_C - Static variable in class java.awt.event.KeyEvent
VK_CANCEL - Static variable in class java.awt.event.KeyEvent
VK_CAPS_LOCK - Static variable in class java.awt.event.KeyEvent
VK_CIRCUMFLEX - Static variable in class java.awt.event.KeyEvent
Constant for the "^" key.
VK_CLEAR - Static variable in class java.awt.event.KeyEvent
VK_CLOSE_BRACKET - Static variable in class java.awt.event.KeyEvent
VK_CODE_INPUT - Static variable in class java.awt.event.KeyEvent
Constant for the Code Input function key.
VK_COLON - Static variable in class java.awt.event.KeyEvent
Constant for the ":" key.
VK_COMMA - Static variable in class java.awt.event.KeyEvent
VK_COMPOSE - Static variable in class java.awt.event.KeyEvent
Constant for the Compose function key.
VK_CONTROL - Static variable in class java.awt.event.KeyEvent
VK_CONVERT - Static variable in class java.awt.event.KeyEvent
Constant for the Convert function key.
VK_COPY - Static variable in class java.awt.event.KeyEvent
VK_CUT - Static variable in class java.awt.event.KeyEvent
VK_D - Static variable in class java.awt.event.KeyEvent
VK_DEAD_ABOVEDOT - Static variable in class java.awt.event.KeyEvent
VK_DEAD_ABOVERING - Static variable in class java.awt.event.KeyEvent
VK_DEAD_ACUTE - Static variable in class java.awt.event.KeyEvent
VK_DEAD_BREVE - Static variable in class java.awt.event.KeyEvent
VK_DEAD_CARON - Static variable in class java.awt.event.KeyEvent
VK_DEAD_CEDILLA - Static variable in class java.awt.event.KeyEvent
VK_DEAD_CIRCUMFLEX - Static variable in class java.awt.event.KeyEvent
VK_DEAD_DIAERESIS - Static variable in class java.awt.event.KeyEvent
VK_DEAD_DOUBLEACUTE - Static variable in class java.awt.event.KeyEvent
VK_DEAD_GRAVE - Static variable in class java.awt.event.KeyEvent
VK_DEAD_IOTA - Static variable in class java.awt.event.KeyEvent
VK_DEAD_MACRON - Static variable in class java.awt.event.KeyEvent
VK_DEAD_OGONEK - Static variable in class java.awt.event.KeyEvent
VK_DEAD_SEMIVOICED_SOUND - Static variable in class java.awt.event.KeyEvent
VK_DEAD_TILDE - Static variable in class java.awt.event.KeyEvent
VK_DEAD_VOICED_SOUND - Static variable in class java.awt.event.KeyEvent
VK_DECIMAL - Static variable in class java.awt.event.KeyEvent
VK_DELETE - Static variable in class java.awt.event.KeyEvent
VK_DIVIDE - Static variable in class java.awt.event.KeyEvent
VK_DOLLAR - Static variable in class java.awt.event.KeyEvent
Constant for the "$" key.
VK_DOWN - Static variable in class java.awt.event.KeyEvent
VK_E - Static variable in class java.awt.event.KeyEvent
VK_END - Static variable in class java.awt.event.KeyEvent
VK_ENTER - Static variable in class java.awt.event.KeyEvent
VK_EQUALS - Static variable in class java.awt.event.KeyEvent
VK_ESCAPE - Static variable in class java.awt.event.KeyEvent
VK_EURO_SIGN - Static variable in class java.awt.event.KeyEvent
Constant for the Euro currency sign key.
VK_EXCLAMATION_MARK - Static variable in class java.awt.event.KeyEvent
Constant for the "!" key.
VK_F - Static variable in class java.awt.event.KeyEvent
VK_F1 - Static variable in class java.awt.event.KeyEvent
Constant for the F1 function key.
VK_F10 - Static variable in class java.awt.event.KeyEvent
Constant for the F10 function key.
VK_F11 - Static variable in class java.awt.event.KeyEvent
Constant for the F11 function key.
VK_F12 - Static variable in class java.awt.event.KeyEvent
Constant for the F12 function key.
VK_F13 - Static variable in class java.awt.event.KeyEvent
Constant for the F13 function key.
VK_F14 - Static variable in class java.awt.event.KeyEvent
Constant for the F14 function key.
VK_F15 - Static variable in class java.awt.event.KeyEvent
Constant for the F15 function key.
VK_F16 - Static variable in class java.awt.event.KeyEvent
Constant for the F16 function key.
VK_F17 - Static variable in class java.awt.event.KeyEvent
Constant for the F17 function key.
VK_F18 - Static variable in class java.awt.event.KeyEvent
Constant for the F18 function key.
VK_F19 - Static variable in class java.awt.event.KeyEvent
Constant for the F19 function key.
VK_F2 - Static variable in class java.awt.event.KeyEvent
Constant for the F2 function key.
VK_F20 - Static variable in class java.awt.event.KeyEvent
Constant for the F20 function key.
VK_F21 - Static variable in class java.awt.event.KeyEvent
Constant for the F21 function key.
VK_F22 - Static variable in class java.awt.event.KeyEvent
Constant for the F22 function key.
VK_F23 - Static variable in class java.awt.event.KeyEvent
Constant for the F23 function key.
VK_F24 - Static variable in class java.awt.event.KeyEvent
Constant for the F24 function key.
VK_F3 - Static variable in class java.awt.event.KeyEvent
Constant for the F3 function key.
VK_F4 - Static variable in class java.awt.event.KeyEvent
Constant for the F4 function key.
VK_F5 - Static variable in class java.awt.event.KeyEvent
Constant for the F5 function key.
VK_F6 - Static variable in class java.awt.event.KeyEvent
Constant for the F6 function key.
VK_F7 - Static variable in class java.awt.event.KeyEvent
Constant for the F7 function key.
VK_F8 - Static variable in class java.awt.event.KeyEvent
Constant for the F8 function key.
VK_F9 - Static variable in class java.awt.event.KeyEvent
Constant for the F9 function key.
VK_FINAL - Static variable in class java.awt.event.KeyEvent
VK_FIND - Static variable in class java.awt.event.KeyEvent
VK_FULL_WIDTH - Static variable in class java.awt.event.KeyEvent
Constant for the Full-Width Characters function key.
VK_G - Static variable in class java.awt.event.KeyEvent
VK_GREATER - Static variable in class java.awt.event.KeyEvent
VK_H - Static variable in class java.awt.event.KeyEvent
VK_HALF_WIDTH - Static variable in class java.awt.event.KeyEvent
Constant for the Half-Width Characters function key.
VK_HELP - Static variable in class java.awt.event.KeyEvent
VK_HIRAGANA - Static variable in class java.awt.event.KeyEvent
Constant for the Hiragana function key.
VK_HOME - Static variable in class java.awt.event.KeyEvent
VK_I - Static variable in class java.awt.event.KeyEvent
VK_INPUT_METHOD_ON_OFF - Static variable in class java.awt.event.KeyEvent
Constant for the input method on/off key.
VK_INSERT - Static variable in class java.awt.event.KeyEvent
VK_INVERTED_EXCLAMATION_MARK - Static variable in class java.awt.event.KeyEvent
Constant for the inverted exclamation mark key.
VK_J - Static variable in class java.awt.event.KeyEvent
VK_JAPANESE_HIRAGANA - Static variable in class java.awt.event.KeyEvent
Constant for the Japanese-Hiragana function key.
VK_JAPANESE_KATAKANA - Static variable in class java.awt.event.KeyEvent
Constant for the Japanese-Katakana function key.
VK_JAPANESE_ROMAN - Static variable in class java.awt.event.KeyEvent
Constant for the Japanese-Roman function key.
VK_K - Static variable in class java.awt.event.KeyEvent
VK_KANA - Static variable in class java.awt.event.KeyEvent
VK_KANA_LOCK - Static variable in class java.awt.event.KeyEvent
Constant for the locking Kana function key.
VK_KANJI - Static variable in class java.awt.event.KeyEvent
VK_KATAKANA - Static variable in class java.awt.event.KeyEvent
Constant for the Katakana function key.
VK_KP_DOWN - Static variable in class java.awt.event.KeyEvent
Constant for the key pad arrow down function key.
VK_KP_LEFT - Static variable in class java.awt.event.KeyEvent
Constant for the key pad arrow left function key.
VK_KP_RIGHT - Static variable in class java.awt.event.KeyEvent
Constant for the key pad arrow right function key.
VK_KP_UP - Static variable in class java.awt.event.KeyEvent
Constant for the key pad arrow up function key.
VK_L - Static variable in class java.awt.event.KeyEvent
VK_LEFT - Static variable in class java.awt.event.KeyEvent
VK_LEFT_PARENTHESIS - Static variable in class java.awt.event.KeyEvent
Constant for the "(" key.
VK_LESS - Static variable in class java.awt.event.KeyEvent
VK_M - Static variable in class java.awt.event.KeyEvent
VK_META - Static variable in class java.awt.event.KeyEvent
VK_MINUS - Static variable in class java.awt.event.KeyEvent
Constant for the "-" key.
VK_MODECHANGE - Static variable in class java.awt.event.KeyEvent
VK_MULTIPLY - Static variable in class java.awt.event.KeyEvent
VK_N - Static variable in class java.awt.event.KeyEvent
VK_NONCONVERT - Static variable in class java.awt.event.KeyEvent
Constant for the Don't Convert function key.
VK_NUM_LOCK - Static variable in class java.awt.event.KeyEvent
VK_NUMBER_SIGN - Static variable in class java.awt.event.KeyEvent
Constant for the "#" key.
VK_NUMPAD0 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD1 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD2 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD3 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD4 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD5 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD6 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD7 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD8 - Static variable in class java.awt.event.KeyEvent
VK_NUMPAD9 - Static variable in class java.awt.event.KeyEvent
VK_O - Static variable in class java.awt.event.KeyEvent
VK_OPEN_BRACKET - Static variable in class java.awt.event.KeyEvent
VK_P - Static variable in class java.awt.event.KeyEvent
VK_PAGE_DOWN - Static variable in class java.awt.event.KeyEvent
VK_PAGE_UP - Static variable in class java.awt.event.KeyEvent
VK_PASTE - Static variable in class java.awt.event.KeyEvent
VK_PAUSE - Static variable in class java.awt.event.KeyEvent
VK_PERIOD - Static variable in class java.awt.event.KeyEvent
VK_PLUS - Static variable in class java.awt.event.KeyEvent
Constant for the "+" key.
VK_PREVIOUS_CANDIDATE - Static variable in class java.awt.event.KeyEvent
Constant for the Previous Candidate function key.
VK_PRINTSCREEN - Static variable in class java.awt.event.KeyEvent
VK_PROPS - Static variable in class java.awt.event.KeyEvent
VK_Q - Static variable in class java.awt.event.KeyEvent
VK_QUOTE - Static variable in class java.awt.event.KeyEvent
VK_QUOTEDBL - Static variable in class java.awt.event.KeyEvent
VK_R - Static variable in class java.awt.event.KeyEvent
VK_RIGHT - Static variable in class java.awt.event.KeyEvent
VK_RIGHT_PARENTHESIS - Static variable in class java.awt.event.KeyEvent
Constant for the ")" key.
VK_ROMAN_CHARACTERS - Static variable in class java.awt.event.KeyEvent
Constant for the Roman Characters function key.
VK_S - Static variable in class java.awt.event.KeyEvent
VK_SCROLL_LOCK - Static variable in class java.awt.event.KeyEvent
VK_SEMICOLON - Static variable in class java.awt.event.KeyEvent
VK_SEPARATER - Static variable in class java.awt.event.KeyEvent
VK_SHIFT - Static variable in class java.awt.event.KeyEvent
VK_SLASH - Static variable in class java.awt.event.KeyEvent
VK_SPACE - Static variable in class java.awt.event.KeyEvent
VK_STOP - Static variable in class java.awt.event.KeyEvent
VK_SUBTRACT - Static variable in class java.awt.event.KeyEvent
VK_T - Static variable in class java.awt.event.KeyEvent
VK_TAB - Static variable in class java.awt.event.KeyEvent
VK_U - Static variable in class java.awt.event.KeyEvent
VK_UNDEFINED - Static variable in class java.awt.event.KeyEvent
KEY_TYPED events do not have a keyCode value.
VK_UNDERSCORE - Static variable in class java.awt.event.KeyEvent
Constant for the "_" key.
VK_UNDO - Static variable in class java.awt.event.KeyEvent
VK_UP - Static variable in class java.awt.event.KeyEvent
VK_V - Static variable in class java.awt.event.KeyEvent
VK_W - Static variable in class java.awt.event.KeyEvent
VK_X - Static variable in class java.awt.event.KeyEvent
VK_Y - Static variable in class java.awt.event.KeyEvent
VK_Z - Static variable in class java.awt.event.KeyEvent
VLINK - Static variable in class javax.swing.text.html.HTML.Attribute
VM_ABSTRACT - interface org.omg.CORBA.VM_ABSTRACT.
VM_CUSTOM - interface org.omg.CORBA.VM_CUSTOM.
Defines the code used to represent a custom marshalled value type in a typecode.
VM_NONE - interface org.omg.CORBA.VM_NONE.
Defines the code used to represent the one of the values of a value type in a typecode.
VM_TRUNCATABLE - interface org.omg.CORBA.VM_TRUNCATABLE.
Defines the code used to represent a truncatable value type in a typecode.
VMID - class java.rmi.dgc.VMID.
A VMID is a identifier that is unique across all Java virtual machines.
VMID() - Constructor for class java.rmi.dgc.VMID
Create a new VMID.
VoiceStatus - class javax.sound.midi.VoiceStatus.
A VoiceStatus object contains information about the current status of one of the voices produced by a Synthesizer.
VoiceStatus() - Constructor for class javax.sound.midi.VoiceStatus
Void - class java.lang.Void.
The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.
VOLATILE - Static variable in class java.lang.reflect.Modifier
The int value representing the volatile modifier.
volume - Variable in class javax.sound.midi.VoiceStatus
The current MIDI volume level for the voice.
VOLUME - Static variable in class javax.sound.sampled.FloatControl.Type
Represents a control for the volume on a line.
vsb - Variable in class javax.swing.ScrollPaneLayout
The scrollpanes vertical scrollbar child.
vsbChangeListener - Variable in class javax.swing.plaf.basic.BasicScrollPaneUI
vsbPolicy - Variable in class javax.swing.ScrollPaneLayout
The display policy for the vertical scrollbar.
VSPACE - Static variable in class javax.swing.text.html.HTML.Attribute
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


W-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

W

W_RESIZE_CURSOR - Static variable in class java.awt.Cursor
The west-resize cursor type.
W_RESIZE_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.W_RESIZE_CURSOR.
WAIT_CURSOR - Static variable in class java.awt.Cursor
The wait cursor type.
WAIT_CURSOR - Static variable in class java.awt.Frame
Deprecated. replaced by Cursor.WAIT_CURSOR.
wait() - Method in class java.lang.Object
Causes current thread to wait until another thread invokes the Object.notify() method or the Object.notifyAll() method for this object.
wait(long) - Method in class java.lang.Object
Causes current thread to wait until either another thread invokes the Object.notify() method or the Object.notifyAll() method for this object, or a specified amount of time has elapsed.
wait(long, int) - Method in class java.lang.Object
Causes current thread to wait until another thread invokes the Object.notify() method or the Object.notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
waitFor() - Method in class java.lang.Process
causes the current thread to wait, if necessary, until the process represented by this Process object has terminated.
waitForAll() - Method in class java.awt.MediaTracker
Starts loading all images tracked by this media tracker.
waitForAll(long) - Method in class java.awt.MediaTracker
Starts loading all images tracked by this media tracker.
waitForID(int) - Method in class java.awt.MediaTracker
Starts loading all images tracked by this media tracker with the specified identifier.
waitForID(int, long) - Method in class java.awt.MediaTracker
Starts loading all images tracked by this media tracker with the specified identifier.
waitForIdle() - Method in class java.awt.Robot
Waits until all events currently on the event queue have been processed.
waitForWork() - Method in class javax.swing.text.LayoutQueue
Used by the worker thread to get a new task to execute
WANTS_INPUT_PROPERTY - Static variable in class javax.swing.JOptionPane
Bound property name for wantsInput.
wantsInput - Variable in class javax.swing.JOptionPane
If true, a UI widget will be provided to the user to get input.
WARNING_MESSAGE - Static variable in class javax.swing.JOptionPane
Used for warning messages.
wasFocused - Variable in class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
wasIcon(JInternalFrame) - Method in class javax.swing.DefaultDesktopManager
wasNull() - Method in interface java.sql.CallableStatement
Indicates whether or not the last OUT parameter read had the value of SQL NULL.
wasNull() - Method in interface java.sql.SQLInput
Determines whether the last value read was SQL NULL.
wasNull() - Method in interface java.sql.ResultSet
Reports whether the last column read had a value of SQL NULL.
WAVE - Static variable in class javax.sound.sampled.AudioFileFormat.Type
Specifies a WAVE file.
WCharSeqHelper - class org.omg.CORBA.WCharSeqHelper.
org/omg/CORBA/WCharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
WCharSeqHelper() - Constructor for class org.omg.CORBA.WCharSeqHelper
WCharSeqHolder - class org.omg.CORBA.WCharSeqHolder.
org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
WCharSeqHolder() - Constructor for class org.omg.CORBA.WCharSeqHolder
WCharSeqHolder(char[]) - Constructor for class org.omg.CORBA.WCharSeqHolder
WeakHashMap - class java.util.WeakHashMap.
A hashtable-based Map implementation with weak keys.
WeakHashMap() - Constructor for class java.util.WeakHashMap
Constructs a new, empty WeakHashMap with the default initial capacity and the default load factor, which is 0.75.
WeakHashMap(int) - Constructor for class java.util.WeakHashMap
Constructs a new, empty WeakHashMap with the given initial capacity and the default load factor, which is 0.75.
WeakHashMap(int, float) - Constructor for class java.util.WeakHashMap
Constructs a new, empty WeakHashMap with the given initial capacity and the given load factor.
WeakHashMap(Map) - Constructor for class java.util.WeakHashMap
Constructs a new WeakHashMap with the same mappings as the specified Map.
WeakReference - class java.lang.ref.WeakReference.
Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.
WeakReference(Object) - Constructor for class java.lang.ref.WeakReference
Creates a new weak reference that refers to the given object.
WeakReference(Object, ReferenceQueue) - Constructor for class java.lang.ref.WeakReference
Creates a new weak reference that refers to the given object and is registered with the given queue.
WEDNESDAY - Static variable in class java.util.Calendar
Value of the DAY_OF_WEEK field indicating Wednesday.
WEEK_OF_MONTH - Static variable in class java.util.Calendar
Field number for get and set indicating the week number within the current month.
WEEK_OF_MONTH_FIELD - Static variable in class java.text.DateFormat
Useful constant for WEEK_OF_MONTH field alignment.
WEEK_OF_YEAR - Static variable in class java.util.Calendar
Field number for get and set indicating the week number within the current year.
WEEK_OF_YEAR_FIELD - Static variable in class java.text.DateFormat
Useful constant for WEEK_OF_YEAR field alignment.
weight - Variable in class java.awt.font.GlyphJustificationInfo
The weight of this glyph.
WEIGHT - Static variable in class java.awt.font.TextAttribute
Attribute key for the weight of a font.
WEIGHT_BOLD - Static variable in class java.awt.font.TextAttribute
The standard bold weight.
WEIGHT_DEMIBOLD - Static variable in class java.awt.font.TextAttribute
A moderately lighter weight than BOLD.
WEIGHT_DEMILIGHT - Static variable in class java.awt.font.TextAttribute
An intermediate weight between LIGHT and STANDARD.
WEIGHT_EXTRA_LIGHT - Static variable in class java.awt.font.TextAttribute
The lightest predefined weight.
WEIGHT_EXTRABOLD - Static variable in class java.awt.font.TextAttribute
An extra heavy weight.
WEIGHT_HEAVY - Static variable in class java.awt.font.TextAttribute
A moderately heavier weight than BOLD.
WEIGHT_LIGHT - Static variable in class java.awt.font.TextAttribute
The standard light weight.
WEIGHT_MEDIUM - Static variable in class java.awt.font.TextAttribute
An intermediate weight between the REGULAR and BOLD weights.
WEIGHT_REGULAR - Static variable in class java.awt.font.TextAttribute
The standard weight.
WEIGHT_SEMIBOLD - Static variable in class java.awt.font.TextAttribute
A moderately heavier weight than REGULAR.
WEIGHT_ULTRABOLD - Static variable in class java.awt.font.TextAttribute
The heaviest predefined weight.
weightx - Variable in class java.awt.GridBagConstraints
Specifies how to distribute extra horizontal space.
weighty - Variable in class java.awt.GridBagConstraints
Specifies how to distribute extra vertical space.
WEST - Static variable in class java.awt.BorderLayout
The west layout constraint (left side of container).
WEST - Static variable in class java.awt.GridBagConstraints
Put the component on the left side of its display area, centered vertically.
WEST - Static variable in interface javax.swing.SwingConstants
Compass-direction west (left).
westPane - Variable in class javax.swing.plaf.basic.BasicInternalFrameUI
when - Variable in class java.awt.Event
The time stamp.
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT - Static variable in class javax.swing.JComponent
Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is an ancestor of the focused component or is itself the focused component.
WHEN_FOCUSED - Static variable in class javax.swing.JComponent
Constant used for registerKeyboardAction() that means that the command should be invoked when the component has the focus.
WHEN_IN_FOCUSED_WINDOW - Static variable in class javax.swing.JComponent
Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is in the window that has the focus or is itself the focused component.
white - Static variable in class java.awt.Color
The color white.
WHITE_SPACE - Static variable in class javax.swing.text.html.CSS.Attribute
WHITESPACE - Static variable in class java.awt.font.GlyphMetrics
Indicates a glyph with no visual representation.
whitespaceChars(int, int) - Method in class java.io.StreamTokenizer
Specifies that all characters c in the range low <= c <= high are white space characters.
why - Variable in class org.omg.CosNaming.NamingContextPackage.NotFound
width - Variable in class java.awt.Dimension
The width dimension.
width - Variable in class java.awt.Rectangle
The width of the Rectangle.
width - Variable in class java.awt.geom.RoundRectangle2D.Float
The width of this RoundRectangle2D.
width - Variable in class java.awt.geom.RoundRectangle2D.Double
The width of this RoundRectangle2D.
width - Variable in class java.awt.geom.Rectangle2D.Float
The width of this Rectangle2D.
width - Variable in class java.awt.geom.Rectangle2D.Double
The width of this Rectangle2D.
width - Variable in class java.awt.geom.Arc2D.Float
The overall width of the full ellipse of which this arc is a partial section (not considering the angular extents).
width - Variable in class java.awt.geom.Arc2D.Double
The overall width of the full ellipse (not considering the angular extents).
width - Variable in class java.awt.geom.Ellipse2D.Float
The overall width of this Ellipse2D.
width - Variable in class java.awt.geom.Ellipse2D.Double
The overall width of this Ellipse2D.
width - Variable in class java.awt.image.SampleModel
Width in pixels of the region of image data that this SampleModel describes.
width - Variable in class java.awt.image.Raster
The width of this Raster.
width - Variable in class javax.swing.table.TableColumn
The width of the column.
WIDTH - Static variable in class java.awt.font.TextAttribute
Attribute key for the width of a font.
WIDTH - Static variable in interface java.awt.image.ImageObserver
This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
WIDTH - Static variable in class javax.swing.text.html.HTML.Attribute
WIDTH - Static variable in class javax.swing.text.html.CSS.Attribute
WIDTH_CONDENSED - Static variable in class java.awt.font.TextAttribute
The most condensed predefined width.
WIDTH_EXTENDED - Static variable in class java.awt.font.TextAttribute
The most extended predefined width.
WIDTH_REGULAR - Static variable in class java.awt.font.TextAttribute
The standard width.
WIDTH_SEMI_CONDENSED - Static variable in class java.awt.font.TextAttribute
A moderately condensed width.
WIDTH_SEMI_EXTENDED - Static variable in class java.awt.font.TextAttribute
A moderately extended width.
WIND_EVEN_ODD - Static variable in interface java.awt.geom.PathIterator
The winding rule constant for specifying an even-odd rule for determining the interior of a path.
WIND_EVEN_ODD - Static variable in class java.awt.geom.GeneralPath
An even-odd winding rule for determining the interior of a path.
WIND_NON_ZERO - Static variable in interface java.awt.geom.PathIterator
The winding rule constant for specifying a non-zero rule for determining the interior of a path.
WIND_NON_ZERO - Static variable in class java.awt.geom.GeneralPath
A non-zero winding rule for determining the interior of a path.
window - Static variable in class java.awt.SystemColor
The background color for windows.
Window - class java.awt.Window.
A Window object is a top-level window with no borders and no menubar.
WINDOW - Static variable in class java.awt.SystemColor
The array index for the window background color.
WINDOW - Static variable in class javax.accessibility.AccessibleRole
A top level window with no title or border.
WINDOW_ACTIVATED - Static variable in class java.awt.event.WindowEvent
The window activated event type.
WINDOW_BORDER - Static variable in class java.awt.SystemColor
The array index for the window border color.
WINDOW_CLOSED - Static variable in class java.awt.event.WindowEvent
The window closed event.
WINDOW_CLOSING - Static variable in class java.awt.event.WindowEvent
The "window is closing" event.
WINDOW_DEACTIVATED - Static variable in class java.awt.event.WindowEvent
The window deactivated event type.
WINDOW_DEICONIFIED - Static variable in class java.awt.event.WindowEvent
The window deiconified event type.
WINDOW_DEICONIFY - Static variable in class java.awt.Event
The user has asked the window manager to de-iconify the window.
WINDOW_DESTROY - Static variable in class java.awt.Event
The user has asked the window manager to kill the window.
WINDOW_EVENT_MASK - Static variable in class java.awt.AWTEvent
The event mask for selecting window events.
WINDOW_EXPOSE - Static variable in class java.awt.Event
The user has asked the window manager to expose the window.
WINDOW_FIRST - Static variable in class java.awt.event.WindowEvent
The first number in the range of ids used for window events.
WINDOW_ICONIFIED - Static variable in class java.awt.event.WindowEvent
The window iconified event.
WINDOW_ICONIFY - Static variable in class java.awt.Event
The user has asked the window manager to iconify the window.
WINDOW_LAST - Static variable in class java.awt.event.WindowEvent
The last number in the range of ids used for window events.
WINDOW_MOVED - Static variable in class java.awt.Event
The user has asked the window manager to move the window.
WINDOW_OPENED - Static variable in class java.awt.event.WindowEvent
The window opened event.
WINDOW_TEXT - Static variable in class java.awt.SystemColor
The array index for the window text color.
Window.AccessibleAWTWindow - class java.awt.Window.AccessibleAWTWindow.
This class implements accessibility support for the Window class.
Window.AccessibleAWTWindow(Window) - Constructor for class java.awt.Window.AccessibleAWTWindow
Window(Frame) - Constructor for class java.awt.Window
Constructs a new invisible window with the specified Frame as its owner.
Window(Window) - Constructor for class java.awt.Window
Constructs a new invisible window with the specified Window as its owner.
Window(Window, GraphicsConfiguration) - Constructor for class java.awt.Window
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
windowActivated(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
windowActivated(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.
windowActivated(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window is activated.
WindowAdapter - class java.awt.event.WindowAdapter.
An abstract adapter class for receiving window events.
WindowAdapter() - Constructor for class java.awt.event.WindowAdapter
windowBorder - Static variable in class java.awt.SystemColor
The border color for windows.
windowClosed(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
windowClosed(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when a window has been closed as the result of calling dispose on the window.
windowClosed(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window has been closed.
windowClosing(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
windowClosing(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when the user attempts to close the window from the window's system menu.
windowClosing(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window is in the process of being closed.
windowClosing(WindowEvent) - Method in class javax.swing.JMenu.WinListener
Deselect the menu when the popup is closed from outside.
windowClosing(WindowEvent) - Method in class javax.swing.plaf.basic.BasicToolBarUI.FrameListener
WindowConstants - interface javax.swing.WindowConstants.
Constants used to control the window-closing operation.
windowDeactivated(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
windowDeactivated(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.
windowDeactivated(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window is de-activated.
windowDeiconified(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
windowDeiconified(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when a window is changed from a minimized to a normal state.
windowDeiconified(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window is de-iconified.
WindowEvent - class java.awt.event.WindowEvent.
A low-level event which indicates that a window has changed its status.
WindowEvent(Window, int) - Constructor for class java.awt.event.WindowEvent
Constructs a WindowEvent object.
windowForComponent(Component) - Static method in class javax.swing.SwingUtilities
Return aComponent's window
windowIconified(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
windowIconified(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked when a window is changed from a normal to a minimized state.
windowIconified(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window is iconified.
windowInit() - Method in class javax.swing.JWindow
Called by the constructors to init the JWindow properly.
WindowListener - interface java.awt.event.WindowListener.
The listener interface for receiving window events.
windowMenu - Variable in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
windowOpened(WindowEvent) - Method in class java.awt.AWTEventMulticaster
Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.
windowOpened(WindowEvent) - Method in interface java.awt.event.WindowListener
Invoked the first time a window is made visible.
windowOpened(WindowEvent) - Method in class java.awt.event.WindowAdapter
Invoked when a window has been opened.
windowText - Static variable in class java.awt.SystemColor
The text color for windows.
WORD - Static variable in interface javax.accessibility.AccessibleText
Constant used to indicate that the part of the text that should be retrieved is a word.
WORD_SPACING - Static variable in class javax.swing.text.html.CSS.Attribute
wordChars(int, int) - Method in class java.io.StreamTokenizer
Specifies that all characters c in the range low <= c <= high are word constituents.
work_pending() - Method in class org.omg.CORBA.ORB
Returns true if the ORB needs the main thread to perform some work, and false if the ORB does not need the main thread.
wrapException(Throwable) - Static method in class javax.rmi.CORBA.Util
Wraps an exception thrown by an implementation method.
wrapException(Throwable) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.wrapException(java.lang.Throwable).
WrappedPlainView - class javax.swing.text.WrappedPlainView.
View of plain text (text with only one font and color) that does line-wrapping.
WrappedPlainView(Element) - Constructor for class javax.swing.text.WrappedPlainView
Creates a new WrappedPlainView.
WrappedPlainView(Element, boolean) - Constructor for class javax.swing.text.WrappedPlainView
Creates a new WrappedPlainView.
writableAction - Static variable in class javax.swing.text.DefaultEditorKit
Name of the action to set the editor into writeable mode.
WritableRaster - class java.awt.image.WritableRaster.
This class extends Raster to provide pixel writing capabilities.
WritableRaster(SampleModel, DataBuffer, Point) - Constructor for class java.awt.image.WritableRaster
Constructs a WritableRaster with the given SampleModel and DataBuffer.
WritableRaster(SampleModel, DataBuffer, Rectangle, Point, WritableRaster) - Constructor for class java.awt.image.WritableRaster
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.
WritableRaster(SampleModel, Point) - Constructor for class java.awt.image.WritableRaster
Constructs a WritableRaster with the given SampleModel.
WritableRenderedImage - interface java.awt.image.WritableRenderedImage.
WriteableRenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters and which can be modified and/or written over.
write_abstract_interface(Object) - Method in class org.omg.CORBA_2_3.portable.OutputStream
marshals a value object or a stub object.
write_Abstract(Object) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL Abstract interface type to the output stream.
write_any_array(Any[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL Anys from offset for length elements to the output stream.
write_any(Any) - Method in interface org.omg.CORBA.DataOutputStream
Writes the Any value to the output stream.
write_any(Any) - Method in class org.omg.CORBA.portable.OutputStream
Writes an Any on this output stream.
write_boolean_array(boolean[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL booleans from offset for length elements to the output stream.
write_boolean_array(boolean[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of booleans on this output stream.
write_boolean(boolean) - Method in interface org.omg.CORBA.DataOutputStream
Writes the boolean value to the output stream.
write_boolean(boolean) - Method in class org.omg.CORBA.portable.OutputStream
Writes a boolean value to this stream.
write_char_array(char[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL characters from offset for length elements to the output stream.
write_char_array(char[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of chars on this output stream.
write_char(char) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL character value to the output stream.
write_char(char) - Method in class org.omg.CORBA.portable.OutputStream
Writes a char value to this stream.
write_Context(Context, ContextList) - Method in class org.omg.CORBA.portable.OutputStream
Writes a CORBA context on this stream.
write_double_array(double[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL doubles from offset for length elements to the output stream.
write_double_array(double[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of doubles on this output stream.
write_double(double) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL double value to the output stream.
write_double(double) - Method in class org.omg.CORBA.portable.OutputStream
Writes a double value to this stream.
write_fixed(BigDecimal) - Method in class org.omg.CORBA.portable.OutputStream
Writes a BigDecimal number.
write_float_array(float[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL floats from offset for length elements to the output stream.
write_float_array(float[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of floats on this output stream.
write_float(float) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL float value to the output stream.
write_float(float) - Method in class org.omg.CORBA.portable.OutputStream
Writes a float value to this stream.
write_long_array(int[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL longs from offset for length elements to the output stream.
write_long_array(int[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of CORBA longs (i.e.
write_long(int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL long value (represented as a Java int) to the output stream.
write_long(int) - Method in class org.omg.CORBA.portable.OutputStream
Writes a CORBA long (i.e.
write_longlong_array(long[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL long longs from offset for length elements to the output stream.
write_longlong_array(long[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of CORBA longlongs (i.e.
write_longlong(long) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL long long value (represented as a Java long) to the output stream.
write_longlong(long) - Method in class org.omg.CORBA.portable.OutputStream
Writes a CORBA longlong (i.e.
write_Object(Object) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL CORBA::Object value to the output stream.
write_Object(Object) - Method in class org.omg.CORBA.portable.OutputStream
Writes a CORBA Object on this output stream.
write_octet_array(byte[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL octets from offset for length elements to the output stream.
write_octet_array(byte[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of CORBA octets (bytes) on this output stream.
write_octet(byte) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL octet value (represented as a Java byte) to the output stream.
write_octet(byte) - Method in class org.omg.CORBA.portable.OutputStream
Writes a CORBA octet (i.e.
write_Principal(Principal) - Method in class org.omg.CORBA.portable.OutputStream
Deprecated. Deprecated by CORBA 2.2.
write_short_array(short[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL shorts from offset for length elements to the output stream.
write_short_array(short[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of shorts on this output stream.
write_short(short) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL short value to the output stream.
write_short(short) - Method in class org.omg.CORBA.portable.OutputStream
Writes a short value to this stream.
write_string(String) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL string value to the output stream.
write_string(String) - Method in class org.omg.CORBA.portable.OutputStream
Writes a string value to this stream.
write_TypeCode(TypeCode) - Method in interface org.omg.CORBA.DataOutputStream
Writes the typecode to the output stream.
write_TypeCode(TypeCode) - Method in class org.omg.CORBA.portable.OutputStream
Writes a TypeCode on this output stream.
write_ulong_array(int[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL unsigned longs (represented as Java ints) from offset for length elements to the output stream.
write_ulong_array(int[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of unsigned CORBA longs (i.e.
write_ulong(int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL unsigned long value (represented as a Java int) to the output stream.
write_ulong(int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an unsigned CORBA long (i.e.
write_ulonglong_array(long[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL unsigned long longs (represented as Java longs) from offset for length elements to the output stream.
write_ulonglong_array(long[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of unsigned CORBA longlongs (i.e.
write_ulonglong(long) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL unsigned long long value (represented as a Java long) to the output stream.
write_ulonglong(long) - Method in class org.omg.CORBA.portable.OutputStream
Writes an unsigned CORBA longlong (i.e.
write_ushort_array(short[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL unsigned shorts (represented as Java shorts) from offset for length elements to the output stream.
write_ushort_array(short[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of unsigned shorts on this output stream.
write_ushort(short) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL unsigned short value (represented as a Java short value) to the output stream.
write_ushort(short) - Method in class org.omg.CORBA.portable.OutputStream
Writes an unsigned short value to this stream.
write_value(OutputStream) - Method in class org.omg.CORBA.Any
Writes out to the given output stream the typecode and value of this Any object.
write_value(OutputStream, Serializable) - Method in class org.omg.CORBA.StringValueHelper
write_value(OutputStream, Serializable) - Method in class org.omg.CORBA.WStringValueHelper
write_value(OutputStream, Serializable) - Method in interface org.omg.CORBA.portable.BoxedValueHelper
write_value(Serializable) - Method in class org.omg.CORBA_2_3.portable.OutputStream
marshals a value type to the output stream.
write_Value(Serializable) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL value type value to the output stream.
write_value(Serializable, BoxedValueHelper) - Method in class org.omg.CORBA_2_3.portable.OutputStream
marshals a value type to the output stream.
write_value(Serializable, Class) - Method in class org.omg.CORBA_2_3.portable.OutputStream
marshals a value type to the output stream.
write_value(Serializable, String) - Method in class org.omg.CORBA_2_3.portable.OutputStream
marshals a value type to the output stream.
write_wchar_array(char[], int, int) - Method in interface org.omg.CORBA.DataOutputStream
Writes the array of IDL wide characters from offset for length elements to the output stream.
write_wchar_array(char[], int, int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an array of wide chars on this output stream.
write_wchar(char) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL wide character value to the output stream.
write_wchar(char) - Method in class org.omg.CORBA.portable.OutputStream
Writes a wide char value to this stream.
write_wstring(String) - Method in interface org.omg.CORBA.DataOutputStream
Writes the IDL wide string value (represented as a Java String) to the output stream.
write_wstring(String) - Method in class org.omg.CORBA.portable.OutputStream
Writes a wide string value to this stream.
write() - Method in class javax.swing.text.AbstractWriter
This abstract method needs to be implemented by subclasses.
write() - Method in class javax.swing.text.html.HTMLWriter
Iterates over the Element tree and controls the writing out of all the tags and its attributes.
write() - Method in class javax.swing.text.html.MinimalHTMLWriter
Generates HTML output from a StyledDocument.
write(AudioInputStream, AudioFileFormat.Type, File) - Static method in class javax.sound.sampled.AudioSystem
Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
write(AudioInputStream, AudioFileFormat.Type, File) - Method in class javax.sound.sampled.spi.AudioFileWriter
Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
write(AudioInputStream, AudioFileFormat.Type, OutputStream) - Static method in class javax.sound.sampled.AudioSystem
Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
write(AudioInputStream, AudioFileFormat.Type, OutputStream) - Method in class javax.sound.sampled.spi.AudioFileWriter
Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.
write(byte[]) - Method in class java.io.OutputStream
Writes b.length bytes from the specified byte array to this output stream.
write(byte[]) - Method in class java.io.FilterOutputStream
Writes b.length bytes to this output stream.
write(byte[]) - Method in class java.io.FileOutputStream
Writes b.length bytes from the specified byte array to this file output stream.
write(byte[]) - Method in interface java.io.ObjectOutput
Writes an array of bytes.
write(byte[]) - Method in interface java.io.DataOutput
Writes to the output stream all the bytes in array b.
write(byte[]) - Method in class java.io.ObjectOutputStream
Writes an array of bytes.
write(byte[]) - Method in class java.io.RandomAccessFile
Writes b.length bytes from the specified byte array to this file, starting at the current file pointer.
write(byte[], int, int) - Method in class java.io.OutputStream
Writes len bytes from the specified byte array starting at offset off to this output stream.
write(byte[], int, int) - Method in class java.io.FilterOutputStream
Writes len bytes from the specified byte array starting at offset off to this output stream.
write(byte[], int, int) - Method in class java.io.PrintStream
Write len bytes from the specified byte array starting at offset off to this stream.
write(byte[], int, int) - Method in class java.io.DataOutputStream
Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
write(byte[], int, int) - Method in class java.io.FileOutputStream
Writes len bytes from the specified byte array starting at offset off to this file output stream.
write(byte[], int, int) - Method in interface java.io.ObjectOutput
Writes a sub array of bytes.
write(byte[], int, int) - Method in interface java.io.DataOutput
Writes len bytes from array b, in order, to the output stream.
write(byte[], int, int) - Method in class java.io.ObjectOutputStream
Writes a sub array of bytes.
write(byte[], int, int) - Method in class java.io.BufferedOutputStream
Writes len bytes from the specified byte array starting at offset off to this buffered output stream.
write(byte[], int, int) - Method in class java.io.RandomAccessFile
Writes len bytes from the specified byte array starting at offset off to this file.
write(byte[], int, int) - Method in class java.io.PipedOutputStream
Writes len bytes from the specified byte array starting at offset off to this piped output stream.
write(byte[], int, int) - Method in class java.io.ByteArrayOutputStream
Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
write(byte[], int, int) - Method in class java.rmi.server.LogStream
Deprecated. no replacement
write(byte[], int, int) - Method in class java.security.DigestOutputStream
Updates the message digest (if the digest function is on) using the specified subarray, and in any case writes the subarray to the output stream.
write(byte[], int, int) - Method in class java.util.zip.DeflaterOutputStream
Writes an array of bytes to the compressed output stream.
write(byte[], int, int) - Method in class java.util.zip.ZipOutputStream
Writes an array of bytes to the current ZIP entry data.
write(byte[], int, int) - Method in class java.util.zip.GZIPOutputStream
Writes array of bytes to the compressed output stream.
write(byte[], int, int) - Method in class java.util.zip.CheckedOutputStream
Writes an array of bytes.
write(byte[], int, int) - Method in interface javax.sound.sampled.SourceDataLine
Writes audio data to the mixer via this source data line.
write(char) - Method in class javax.swing.text.AbstractWriter
Writes out a character.
write(char[]) - Method in class java.io.Writer
Write an array of characters.
write(char[]) - Method in class java.io.PrintWriter
Write an array of characters.
write(char[], int, int) - Method in class java.io.Writer
Write a portion of an array of characters.
write(char[], int, int) - Method in class java.io.FilterWriter
Write a portion of an array of characters.
write(char[], int, int) - Method in class java.io.PipedWriter
Writes len characters from the specified character array starting at offset off to this piped output stream.
write(char[], int, int) - Method in class java.io.StringWriter
Write a portion of an array of characters.
write(char[], int, int) - Method in class java.io.OutputStreamWriter
Write a portion of an array of characters.
write(char[], int, int) - Method in class java.io.PrintWriter
Write a portion of an array of characters.
write(char[], int, int) - Method in class java.io.CharArrayWriter
Writes characters to the buffer.
write(char[], int, int) - Method in class java.io.BufferedWriter
Write a portion of an array of characters.
write(char[], int, int) - Method in class javax.swing.text.AbstractWriter
All write methods call into this one.
write(DataOutput) - Method in class java.rmi.server.UID
Write the UID to output stream, out.
write(int) - Method in class java.io.Writer
Write a single character.
write(int) - Method in class java.io.FilterWriter
Write a single character.
write(int) - Method in class java.io.OutputStream
Writes the specified byte to this output stream.
write(int) - Method in class java.io.FilterOutputStream
Writes the specified byte to this output stream.
write(int) - Method in class java.io.PrintStream
Write the specified byte to this stream.
write(int) - Method in class java.io.PipedWriter
Writes the specified char to the piped output stream.
write(int) - Method in class java.io.DataOutputStream
Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
write(int) - Method in class java.io.FileOutputStream
Writes the specified byte to this file output stream.
write(int) - Method in interface java.io.ObjectOutput
Writes a byte.
write(int) - Method in interface java.io.DataOutput
Writes to the output stream the eight low-order bits of the argument b.
write(int) - Method in class java.io.StringWriter
Write a single character.
write(int) - Method in class java.io.OutputStreamWriter
Write a single character.
write(int) - Method in class java.io.PrintWriter
Write a single character.
write(int) - Method in class java.io.ObjectOutputStream
Writes a byte.
write(int) - Method in class java.io.BufferedOutputStream
Writes the specified byte to this buffered output stream.
write(int) - Method in class java.io.CharArrayWriter
Writes a character to the buffer.
write(int) - Method in class java.io.RandomAccessFile
Writes the specified byte to this file.
write(int) - Method in class java.io.PipedOutputStream
Writes the specified byte to the piped output stream.
write(int) - Method in class java.io.ByteArrayOutputStream
Writes the specified byte to this byte array output stream.
write(int) - Method in class java.io.BufferedWriter
Write a single character.
write(int) - Method in class java.rmi.server.LogStream
Deprecated. no replacement
write(int) - Method in class java.security.DigestOutputStream
Updates the message digest (if the digest function is on) using the specified byte, and in any case writes the byte to the output stream.
write(int) - Method in class java.util.zip.DeflaterOutputStream
Writes a byte to the compressed output stream.
write(int) - Method in class java.util.zip.CheckedOutputStream
Writes a byte.
write(int) - Method in class org.omg.CORBA.portable.OutputStream
Writes an integer (length of arrays) onto this stream.
write(ObjectOutput) - Method in class java.io.ObjectOutputStream.PutField
Write the data and fields to the specified ObjectOutput stream.
write(ObjectOutput) - Method in class java.rmi.server.ObjID
Marshals object id to output stream.
write(OutputStream) - Method in class java.awt.color.ICC_Profile
Write this ICC_Profile to an OutputStream.
write(OutputStream) - Method in class java.util.jar.Manifest
Writes the Manifest to the specified OutputStream.
write(OutputStream, AlreadyBound) - Static method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
write(OutputStream, Any[]) - Static method in class org.omg.CORBA.AnySeqHelper
write(OutputStream, Binding) - Static method in class org.omg.CosNaming.BindingHelper
write(OutputStream, Binding[]) - Static method in class org.omg.CosNaming.BindingListHelper
write(OutputStream, BindingIterator) - Static method in class org.omg.CosNaming.BindingIteratorHelper
write(OutputStream, BindingType) - Static method in class org.omg.CosNaming.BindingTypeHelper
write(OutputStream, boolean[]) - Static method in class org.omg.CORBA.BooleanSeqHelper
write(OutputStream, byte[]) - Static method in class org.omg.CORBA.OctetSeqHelper
write(OutputStream, CannotProceed) - Static method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
write(OutputStream, char[]) - Static method in class org.omg.CORBA.CharSeqHelper
write(OutputStream, char[]) - Static method in class org.omg.CORBA.WCharSeqHelper
write(OutputStream, CompletionStatus) - Static method in class org.omg.CORBA.CompletionStatusHelper
write(OutputStream, Current) - Static method in class org.omg.CORBA.CurrentHelper
write(OutputStream, DefinitionKind) - Static method in class org.omg.CORBA.DefinitionKindHelper
write(OutputStream, Document, int, int) - Method in class javax.swing.text.EditorKit
Writes content from a document to the given stream in a format appropriate for this kind of content handler.
write(OutputStream, Document, int, int) - Method in class javax.swing.text.DefaultEditorKit
Writes content from a document to the given stream in a format appropriate for this kind of content handler.
write(OutputStream, Document, int, int) - Method in class javax.swing.text.rtf.RTFEditorKit
Write content from a document to the given stream in a format appropriate for this kind of content handler.
write(OutputStream, double[]) - Static method in class org.omg.CORBA.DoubleSeqHelper
write(OutputStream, float[]) - Static method in class org.omg.CORBA.FloatSeqHelper
write(OutputStream, IDLType) - Static method in class org.omg.CORBA.IDLTypeHelper
write(OutputStream, int) - Static method in class org.omg.CORBA.PolicyTypeHelper
write(OutputStream, int[]) - Static method in class org.omg.CORBA.LongSeqHelper
write(OutputStream, int[]) - Static method in class org.omg.CORBA.ULongSeqHelper
write(OutputStream, InvalidName) - Static method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
write(OutputStream, long[]) - Static method in class org.omg.CORBA.ULongLongSeqHelper
write(OutputStream, long[]) - Static method in class org.omg.CORBA.LongLongSeqHelper
write(OutputStream, NameComponent) - Static method in class org.omg.CosNaming.NameComponentHelper
write(OutputStream, NameComponent[]) - Static method in class org.omg.CosNaming.NameHelper
write(OutputStream, NameValuePair) - Static method in class org.omg.CORBA.NameValuePairHelper
write(OutputStream, NamingContext) - Static method in class org.omg.CosNaming.NamingContextHelper
write(OutputStream, NotEmpty) - Static method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
write(OutputStream, NotFound) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
write(OutputStream, NotFoundReason) - Static method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
write(OutputStream, Object) - Static method in class org.omg.CORBA.ObjectHelper
write(OutputStream, Policy) - Static method in class org.omg.CORBA.PolicyHelper
write(OutputStream, Policy[]) - Static method in class org.omg.CORBA.PolicyListHelper
write(OutputStream, Serializable) - Static method in class org.omg.CORBA.ValueBaseHelper
write(OutputStream, ServiceDetail) - Static method in class org.omg.CORBA.ServiceDetailHelper
write(OutputStream, ServiceInformation) - Static method in class org.omg.CORBA.ServiceInformationHelper
write(OutputStream, SetOverrideType) - Static method in class org.omg.CORBA.SetOverrideTypeHelper
write(OutputStream, short) - Static method in class org.omg.CORBA.VisibilityHelper
write(OutputStream, short[]) - Static method in class org.omg.CORBA.UShortSeqHelper
write(OutputStream, short[]) - Static method in class org.omg.CORBA.ShortSeqHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.IdentifierHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.StringValueHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.VersionSpecHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.WStringValueHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.RepositoryIdHelper
write(OutputStream, String) - Static method in class org.omg.CORBA.FieldNameHelper
write(OutputStream, String) - Static method in class org.omg.CosNaming.IstringHelper
write(OutputStream, StructMember) - Static method in class org.omg.CORBA.StructMemberHelper
write(OutputStream, UnionMember) - Static method in class org.omg.CORBA.UnionMemberHelper
write(OutputStream, ValueMember) - Static method in class org.omg.CORBA.ValueMemberHelper
write(Sequence, int, File) - Static method in class javax.sound.midi.MidiSystem
Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
write(Sequence, int, File) - Method in class javax.sound.midi.spi.MidiFileWriter
Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.
write(Sequence, int, OutputStream) - Static method in class javax.sound.midi.MidiSystem
Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.
write(Sequence, int, OutputStream) - Method in class javax.sound.midi.spi.MidiFileWriter
Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
write(String) - Method in class java.awt.color.ICC_Profile
Write this ICC_Profile to a file.
write(String) - Method in class java.io.Writer
Write a string.
write(String) - Method in class java.io.StringWriter
Write a string.
write(String) - Method in class java.io.PrintWriter
Write a string.
write(String) - Method in class javax.swing.text.AbstractWriter
Writes out a string.
write(String, int, int) - Method in class java.io.Writer
Write a portion of a string.
write(String, int, int) - Method in class java.io.FilterWriter
Write a portion of a string.
write(String, int, int) - Method in class java.io.StringWriter
Write a portion of a string.
write(String, int, int) - Method in class java.io.OutputStreamWriter
Write a portion of a string.
write(String, int, int) - Method in class java.io.PrintWriter
Write a portion of a string.
write(String, int, int) - Method in class java.io.CharArrayWriter
Write a portion of a string to the buffer.
write(String, int, int) - Method in class java.io.BufferedWriter
Write a portion of a String.
write(Writer) - Method in class javax.swing.text.JTextComponent
Stores the contents of the model into the given stream.
write(Writer, Document, int, int) - Method in class javax.swing.text.EditorKit
Writes content from a document to the given stream in a format appropriate for this kind of content handler.
write(Writer, Document, int, int) - Method in class javax.swing.text.DefaultEditorKit
Writes content from a document to the given stream as plain text.
write(Writer, Document, int, int) - Method in class javax.swing.text.html.HTMLEditorKit
Write content from a document to the given stream in a format appropriate for this kind of content handler.
write(Writer, Document, int, int) - Method in class javax.swing.text.rtf.RTFEditorKit
Write content from a document to the given stream as plain text.
WriteAbortedException - exception java.io.WriteAbortedException.
Signals that one of the ObjectStreamExceptions was thrown during a write operation.
WriteAbortedException(String, Exception) - Constructor for class java.io.WriteAbortedException
Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation.
writeAbstractObject(OutputStream, Object) - Static method in class javax.rmi.CORBA.Util
Writes a java.lang.Object as either a value or a CORBA Object.
writeAbstractObject(OutputStream, Object) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
writeAny(OutputStream, Object) - Static method in class javax.rmi.CORBA.Util
Writes any java.lang.Object as a CORBA any.
writeAny(OutputStream, Object) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).
writeArray(Array) - Method in interface java.sql.SQLOutput
Writes an SQL ARRAY value to the stream.
writeAsciiStream(InputStream) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a stream of ASCII characters.
writeAttributes(AttributeSet) - Method in class javax.swing.text.AbstractWriter
Writes out the set of attributes as " =" pairs.
writeAttributes(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Writes out the attribute set.
writeAttributes(AttributeSet) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.
writeAttributes(ObjectOutputStream, AttributeSet) - Method in class javax.swing.text.StyleContext
Context-specific handling of writing out attributes
writeAttributeSet(ObjectOutputStream, AttributeSet) - Static method in class javax.swing.text.StyleContext
Writes a set of attributes to the given object stream for the purpose of serialization.
writeBigDecimal(BigDecimal) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a java.math.BigDecimal object.
writeBinaryStream(InputStream) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a stream of uninterpreted bytes.
writeBlob(Blob) - Method in interface java.sql.SQLOutput
Writes an SQL BLOB value to the stream.
writeBody() - Method in class javax.swing.text.html.MinimalHTMLWriter
Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
writeBoolean(boolean) - Method in class java.io.DataOutputStream
Writes a boolean to the underlying output stream as a 1-byte value.
writeBoolean(boolean) - Method in interface java.io.DataOutput
Writes a boolean value to this output stream.
writeBoolean(boolean) - Method in class java.io.ObjectOutputStream
Writes a boolean.
writeBoolean(boolean) - Method in class java.io.RandomAccessFile
Writes a boolean to the file as a one-byte value.
writeBoolean(boolean) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java boolean.
writeByte(byte) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java byte.
writeByte(int) - Method in class java.io.DataOutputStream
Writes out a byte to the underlying output stream as a 1-byte value.
writeByte(int) - Method in interface java.io.DataOutput
Writes to the output stream the eight low- order bits of the argument v.
writeByte(int) - Method in class java.io.ObjectOutputStream
Writes an 8 bit byte.
writeByte(int) - Method in class java.io.RandomAccessFile
Writes a byte to the file as a one-byte value.
writeBytes(byte[]) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as an array of bytes.
writeBytes(String) - Method in class java.io.DataOutputStream
Writes out the string to the underlying output stream as a sequence of bytes.
writeBytes(String) - Method in interface java.io.DataOutput
Writes a string to the output stream.
writeBytes(String) - Method in class java.io.ObjectOutputStream
Writes a String as a sequence of bytes.
writeBytes(String) - Method in class java.io.RandomAccessFile
Writes the string to the file as a sequence of bytes.
writeChar(int) - Method in class java.io.DataOutputStream
Writes a char to the underlying output stream as a 2-byte value, high byte first.
writeChar(int) - Method in interface java.io.DataOutput
Writes a char value, wich is comprised of two bytes, to the output stream.
writeChar(int) - Method in class java.io.ObjectOutputStream
Writes a 16 bit char.
writeChar(int) - Method in class java.io.RandomAccessFile
Writes a char to the file as a two-byte value, high byte first.
writeCharacterStream(Reader) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a stream of Unicode characters.
writeChars(String) - Method in class java.io.DataOutputStream
Writes a string to the underlying output stream as a sequence of characters.
writeChars(String) - Method in interface java.io.DataOutput
Writes every character in the string s, to the output stream, in order, two bytes per character.
writeChars(String) - Method in class java.io.ObjectOutputStream
Writes a String as a sequence of chars.
writeChars(String) - Method in class java.io.RandomAccessFile
Writes a string to the file as a sequence of characters.
writeChildren(ObjectOutputStream) - Method in class java.beans.beancontext.BeanContextSupport
Used to serialize all children of this BeanContext.
writeClassDescriptor(ObjectStreamClass) - Method in class java.io.ObjectOutputStream
Write the specified class descriptor to the ObjectOutputStream.
writeClob(Clob) - Method in interface java.sql.SQLOutput
Writes an SQL CLOB value to the stream.
writeComponent(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Responsible for handling Component Elements; deliberately unimplemented.
writeContent(Element, boolean) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out the attribute set in an HTML-compliant manner.
writeDate(Date) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a java.sql.Date object.
writeDouble(double) - Method in class java.io.DataOutputStream
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
writeDouble(double) - Method in interface java.io.DataOutput
Writes a double value, which is comprised of eight bytes, to the output stream.
writeDouble(double) - Method in class java.io.ObjectOutputStream
Writes a 64 bit double.
writeDouble(double) - Method in class java.io.RandomAccessFile
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the file as an eight-byte quantity, high byte first.
writeDouble(double) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java double.
writeEmbeddedTags(AttributeSet) - Method in class javax.swing.text.html.HTMLWriter
Searches for embedded tags in the AttributeSet and writes them out.
writeEndParagraph() - Method in class javax.swing.text.html.MinimalHTMLWriter
Emits an end tag for a <p> tag.
writeEndTag(String) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out an end tag appropriately indented.
writeExternal(ObjectOutput) - Method in class java.awt.datatransfer.DataFlavor
Serialize this DataFlavor
writeExternal(ObjectOutput) - Method in interface java.io.Externalizable
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
writeFields() - Method in class java.io.ObjectOutputStream
Write the buffered fields to the stream.
writeFloat(float) - Method in class java.io.DataOutputStream
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
writeFloat(float) - Method in interface java.io.DataOutput
Writes a float value, which is comprised of four bytes, to the output stream.
writeFloat(float) - Method in class java.io.ObjectOutputStream
Writes a 32 bit float.
writeFloat(float) - Method in class java.io.RandomAccessFile
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the file as a four-byte quantity, high byte first.
writeFloat(float) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java float.
writeHeader() - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag.
writeHTMLTags(AttributeSet) - Method in class javax.swing.text.html.MinimalHTMLWriter
Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
writeImage(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Responsible for handling Icon Elements; deliberately unimplemented.
writeInt(int) - Method in class java.io.DataOutputStream
Writes an int to the underlying output stream as four bytes, high byte first.
writeInt(int) - Method in interface java.io.DataOutput
Writes an int value, which is comprised of four bytes, to the output stream.
writeInt(int) - Method in class java.io.ObjectOutputStream
Writes a 32 bit int.
writeInt(int) - Method in class java.io.RandomAccessFile
Writes an int to the file as four bytes, high byte first.
writeInt(int) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java int.
writeLeaf(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Responsible for writing out other non-text leaf elements.
writeLineSeparator() - Method in class javax.swing.text.AbstractWriter
Writes the line separator.
writeLineSeparator() - Method in class javax.swing.text.html.HTMLWriter
Writes the line separator.
writeLock() - Method in class javax.swing.text.AbstractDocument
Acquires a lock to begin mutating the document this lock protects.
writeLong(long) - Method in class java.io.DataOutputStream
Writes a long to the underlying output stream as eight bytes, high byte first.
writeLong(long) - Method in interface java.io.DataOutput
Writes an long value, which is comprised of four bytes, to the output stream.
writeLong(long) - Method in class java.io.ObjectOutputStream
Writes a 64 bit long.
writeLong(long) - Method in class java.io.RandomAccessFile
Writes a long to the file as eight bytes, high byte first.
writeLong(long) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java long.
writeNonHTMLAttributes(AttributeSet) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.
writeObject(Object) - Method in interface java.io.ObjectOutput
Write an object to the underlying storage or stream.
writeObject(Object) - Method in class java.io.ObjectOutputStream
Write the specified object to the ObjectOutputStream.
writeObject(SQLData) - Method in interface java.sql.SQLOutput
Writes to the stream the data contained in the given SQLData object.
writeObject(Stub, ObjectOutputStream) - Method in interface javax.rmi.CORBA.StubDelegate
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.
writeObjectOverride(Object) - Method in class java.io.ObjectOutputStream
Method used by subclasses to override the default writeObject method.
writeOption(Option) - Method in class javax.swing.text.html.HTMLWriter
Writes out the content of the Option form element.
Writer - class java.io.Writer.
Abstract class for writing to character streams.
Writer() - Constructor for class java.io.Writer
Create a new character-stream writer whose critical sections will synchronize on the writer itself.
Writer(Object) - Constructor for class java.io.Writer
Create a new character-stream writer whose critical sections will synchronize on the given object.
writeRef(Ref) - Method in interface java.sql.SQLOutput
Writes an SQL REF value to the stream.
writeRemoteObject(OutputStream, Object) - Static method in class javax.rmi.CORBA.Util
Writes a java.lang.Object as a CORBA Object.
writeRemoteObject(OutputStream, Object) - Method in interface javax.rmi.CORBA.UtilDelegate
Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
writeReplace() - Method in class java.security.cert.Certificate
Replace the Certificate to be serialized.
writeReplace(Serializable) - Method in interface javax.rmi.CORBA.ValueHandler
If the value contains a writeReplace method then the result is returned.
writeShort(int) - Method in class java.io.DataOutputStream
Writes a short to the underlying output stream as two bytes, high byte first.
writeShort(int) - Method in interface java.io.DataOutput
Writes two bytes to the output stream to represent the value of the argument.
writeShort(int) - Method in class java.io.ObjectOutputStream
Writes a 16 bit short.
writeShort(int) - Method in class java.io.RandomAccessFile
Writes a short to the file as two bytes, high byte first.
writeShort(short) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a Java short.
writeSQL(SQLOutput) - Method in interface java.sql.SQLData
Writes this object to the given SQL data stream, converting it back to its SQL value in the data source.
writeStartParagraph(Element) - Method in class javax.swing.text.html.MinimalHTMLWriter
Emits the start tag for a paragraph.
writeStartTag(String) - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out a start tag appropriately indented.
writeStreamHeader() - Method in class java.io.ObjectOutputStream
The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream.
writeString(String) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a String in the Java programming language.
writeStruct(Struct) - Method in interface java.sql.SQLOutput
Writes an SQL structured type value to the stream.
writeStyles() - Method in class javax.swing.text.html.MinimalHTMLWriter
Writes out all the named styles as the content of the <style> tag.
writeTime(Time) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a java.sql.Time object.
writeTimestamp(Timestamp) - Method in interface java.sql.SQLOutput
Writes the next attribute to the stream as a java.sql.Timestamp object.
writeTo(OutputStream) - Method in class java.io.ByteArrayOutputStream
Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count).
writeTo(Writer) - Method in class java.io.CharArrayWriter
Writes the contents of the buffer to another character stream.
writeUnlock() - Method in class javax.swing.text.AbstractDocument
Releases the write lock held because the write operation is finished.
writeUTF(String) - Method in class java.io.DataOutputStream
Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
writeUTF(String) - Method in interface java.io.DataOutput
Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s.
writeUTF(String) - Method in class java.io.ObjectOutputStream
Primitive data write of this String in UTF format.
writeUTF(String) - Method in class java.io.RandomAccessFile
Writes a string to the file using UTF-8 encoding in a machine-independent manner.
writeValue(OutputStream, Serializable) - Method in interface javax.rmi.CORBA.ValueHandler
Writes a value to the stream using Java semantics.
written - Variable in class java.io.DataOutputStream
The number of bytes written to the data output stream so far.
WrongTransaction - exception org.omg.CORBA.WrongTransaction.
The CORBA WrongTransaction user-defined exception.
WrongTransaction() - Constructor for class org.omg.CORBA.WrongTransaction
Constructs a WrongTransaction object with an empty detail message.
WrongTransaction(String) - Constructor for class org.omg.CORBA.WrongTransaction
Constructs a WrongTransaction object with the given detail message.
WStringValueHelper - class org.omg.CORBA.WStringValueHelper.
org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00
WStringValueHelper() - Constructor for class org.omg.CORBA.WStringValueHelper
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


X-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

X

x - Variable in class java.awt.Event
The x coordinate of the event.
x - Variable in class java.awt.Point
The x coordinate.
x - Variable in class java.awt.Rectangle
The x coordinate of the Rectangle.
x - Variable in class java.awt.geom.RoundRectangle2D.Float
The X coordinate of this RoundRectangle2D.
x - Variable in class java.awt.geom.RoundRectangle2D.Double
The X coordinate of this RoundRectangle2D.
x - Variable in class java.awt.geom.Rectangle2D.Float
The x coordinate of this Rectangle2D.
x - Variable in class java.awt.geom.Rectangle2D.Double
The x coordinate of this Rectangle2D.
x - Variable in class java.awt.geom.Point2D.Float
The X coordinate of this Point2D.
x - Variable in class java.awt.geom.Point2D.Double
The X coordinate of this Point2D.
x - Variable in class java.awt.geom.Arc2D.Float
The x coordinate of the upper left corner of the arc.
x - Variable in class java.awt.geom.Arc2D.Double
The x coordinate of the upper left corner of the arc.
x - Variable in class java.awt.geom.Ellipse2D.Float
The x coordinate of the upper left corner of this Ellipse2D.
x - Variable in class java.awt.geom.Ellipse2D.Double
The x coordinate of the upper left corner of this Ellipse2D.
X_AXIS - Static variable in class javax.swing.BoxLayout
Specifies that components should be laid out left to right.
X_AXIS - Static variable in class javax.swing.text.View
Axis for format/break operations.
x1 - Variable in class java.awt.geom.Line2D.Float
The X coordinate of the start point of the line segment.
x1 - Variable in class java.awt.geom.Line2D.Double
The X coordinate of the start point of the line segment.
x1 - Variable in class java.awt.geom.QuadCurve2D.Float
The x coordinate of the start point of the quadratic curve segment.
x1 - Variable in class java.awt.geom.QuadCurve2D.Double
The x coordinate of the start point of the quadratic curve segment.
x1 - Variable in class java.awt.geom.CubicCurve2D.Float
The X coordinate of the start point of the cubic curve segment.
x1 - Variable in class java.awt.geom.CubicCurve2D.Double
The X coordinate of the start point of the cubic curve segment.
x2 - Variable in class java.awt.geom.Line2D.Float
The X coordinate of the end point of the line segment.
x2 - Variable in class java.awt.geom.Line2D.Double
The X coordinate of the end point of the line segment.
x2 - Variable in class java.awt.geom.QuadCurve2D.Float
The x coordinate of the end point of the quadratic curve segment.
x2 - Variable in class java.awt.geom.QuadCurve2D.Double
The x coordinate of the end point of the quadratic curve segment.
x2 - Variable in class java.awt.geom.CubicCurve2D.Float
The X coordinate of the end point of the cubic curve segment.
x2 - Variable in class java.awt.geom.CubicCurve2D.Double
The X coordinate of the end point of the cubic curve segment.
X509Certificate - class java.security.cert.X509Certificate.
Abstract class for X.509 certificates.
X509Certificate() - Constructor for class java.security.cert.X509Certificate
Constructor for X.509 certificates.
X509CRL - class java.security.cert.X509CRL.
Abstract class for an X.509 Certificate Revocation List (CRL).
X509CRL() - Constructor for class java.security.cert.X509CRL
Constructor for X.509 CRLs.
X509CRLEntry - class java.security.cert.X509CRLEntry.
Abstract class for a revoked certificate in a CRL (Certificate Revocation List).
X509CRLEntry() - Constructor for class java.security.cert.X509CRLEntry
X509EncodedKeySpec - class java.security.spec.X509EncodedKeySpec.
This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:
X509EncodedKeySpec(byte[]) - Constructor for class java.security.spec.X509EncodedKeySpec
Creates a new X509EncodedKeySpec with the given encoded key.
X509Extension - interface java.security.cert.X509Extension.
Interface for an X.509 extension.
xor(BigInteger) - Method in class java.math.BigInteger
Returns a BigInteger whose value is (this ^ val).
xor(BitSet) - Method in class java.util.BitSet
Performs a logical XOR of this bit set with the bit set argument.
xpoints - Variable in class java.awt.Polygon
The array of x coordinates.
xPositionForValue(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Y-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

Y

y - Variable in class java.awt.Event
The y coordinate of the event.
y - Variable in class java.awt.Point
The y coordinate.
y - Variable in class java.awt.Rectangle
The y coordinate of the Rectangle.
y - Variable in class java.awt.geom.RoundRectangle2D.Float
The Y coordinate of this RoundRectangle2D.
y - Variable in class java.awt.geom.RoundRectangle2D.Double
The Y coordinate of this RoundRectangle2D.
y - Variable in class java.awt.geom.Rectangle2D.Float
The y coordinate of this Rectangle2D.
y - Variable in class java.awt.geom.Rectangle2D.Double
The y coordinate of this Rectangle2D.
y - Variable in class java.awt.geom.Point2D.Float
The Y coordinate of this Point2D.
y - Variable in class java.awt.geom.Point2D.Double
The Y coordinate of this Point2D.
y - Variable in class java.awt.geom.Arc2D.Float
The y coordinate of the upper left corner of the arc.
y - Variable in class java.awt.geom.Arc2D.Double
The y coordinate of the upper left corner of the arc.
y - Variable in class java.awt.geom.Ellipse2D.Float
The y coordinate of the upper left corner of this Ellipse2D.
y - Variable in class java.awt.geom.Ellipse2D.Double
The y coordinate of the upper left corner of this Ellipse2D.
Y_AXIS - Static variable in class javax.swing.BoxLayout
Specifies that components should be laid out top to bottom.
Y_AXIS - Static variable in class javax.swing.text.View
Axis for format/break operations.
y1 - Variable in class java.awt.geom.Line2D.Float
The Y coordinate of the start point of the line segment.
y1 - Variable in class java.awt.geom.Line2D.Double
The Y coordinate of the start point of the line segment.
y1 - Variable in class java.awt.geom.QuadCurve2D.Float
The y coordinate of the start point of the quadratic curve segment.
y1 - Variable in class java.awt.geom.QuadCurve2D.Double
The x coordinate of the start point of the quadratic curve segment.
y1 - Variable in class java.awt.geom.CubicCurve2D.Float
The Y coordinate of the start point of the cubic curve segment.
y1 - Variable in class java.awt.geom.CubicCurve2D.Double
The Y coordinate of the start point of the cubic curve segment.
y2 - Variable in class java.awt.geom.Line2D.Float
The Y coordinate of the end point of the line segment.
y2 - Variable in class java.awt.geom.Line2D.Double
The Y coordinate of the end point of the line segment.
y2 - Variable in class java.awt.geom.QuadCurve2D.Float
The y coordinate of the end point of the quadratic curve segment.
y2 - Variable in class java.awt.geom.QuadCurve2D.Double
The y coordinate of the end point of the quadratic curve segment.
y2 - Variable in class java.awt.geom.CubicCurve2D.Float
The Y coordinate of the end point of the cubic curve segment.
y2 - Variable in class java.awt.geom.CubicCurve2D.Double
The Y coordinate of the end point of the cubic curve segment.
YEAR - Static variable in class java.util.Calendar
Field number for get and set indicating the year.
YEAR_FIELD - Static variable in class java.text.DateFormat
Useful constant for YEAR field alignment.
yellow - Static variable in class java.awt.Color
The color yellow.
YES_NO_CANCEL_OPTION - Static variable in class javax.swing.JOptionPane
Type used for showConfirmDialog.
YES_NO_OPTION - Static variable in class javax.swing.JOptionPane
Type used for showConfirmDialog.
YES_OPTION - Static variable in class javax.swing.JOptionPane
Return value from class method if YES is chosen.
yield() - Static method in class java.lang.Thread
Causes the currently executing thread object to temporarily pause and allow other threads to execute.
ypoints - Variable in class java.awt.Polygon
The array of y coordinates.
yPositionForValue(int) - Method in class javax.swing.plaf.basic.BasicSliderUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Z-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

Z

ZERO - Static variable in class java.math.BigInteger
The BigInteger constant zero.
ZipEntry - class java.util.zip.ZipEntry.
This class is used to represent a ZIP file entry.
ZipEntry(String) - Constructor for class java.util.zip.ZipEntry
Creates a new zip entry with the specified name.
ZipEntry(ZipEntry) - Constructor for class java.util.zip.ZipEntry
Creates a new zip entry with fields taken from the specified zip entry.
ZipException - exception java.util.zip.ZipException.
Signals that a Zip exception of some sort has occurred.
ZipException() - Constructor for class java.util.zip.ZipException
Constructs an ZipException with null as its error detail message.
ZipException(String) - Constructor for class java.util.zip.ZipException
Constructs an ZipException with the specified detail message.
ZipFile - class java.util.zip.ZipFile.
This class is used to read entries from a zip file.
ZipFile(File) - Constructor for class java.util.zip.ZipFile
Opens a ZIP file for reading given the specified File object.
ZipFile(File, int) - Constructor for class java.util.zip.ZipFile
Opens a new ZipFile to read from the specified File object in the specified mode.
ZipFile(String) - Constructor for class java.util.zip.ZipFile
Opens a zip file for reading.
ZipInputStream - class java.util.zip.ZipInputStream.
This class implements an input stream filter for reading files in the ZIP file format.
ZipInputStream(InputStream) - Constructor for class java.util.zip.ZipInputStream
Creates a new ZIP input stream.
ZipOutputStream - class java.util.zip.ZipOutputStream.
This class implements an output stream filter for writing files in the ZIP file format.
ZipOutputStream(OutputStream) - Constructor for class java.util.zip.ZipOutputStream
Creates a new ZIP output stream.
ZONE_OFFSET - Static variable in class java.util.Calendar
Field number for get and set indicating the raw offset from GMT in milliseconds.
ZoneView - class javax.swing.text.ZoneView.
ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.
ZoneView(Element, int) - Constructor for class javax.swing.text.ZoneView
Constructs a ZoneView.
zoneWasLoaded(View) - Method in class javax.swing.text.ZoneView
Called by a zone when it gets loaded.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


java.applet Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.applet

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class java.awt.Container.AccessibleAWTContainer
          • class java.awt.Panel.AccessibleAWTPanel
            • class java.applet.Applet.AccessibleApplet
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class java.awt.Panel (implements javax.accessibility.Accessible)
          • class java.applet.Applet

Interface Hierarchy

  • interface java.applet.AppletContext
  • interface java.applet.AppletStub
  • interface java.applet.AudioClip
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.applet

Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

See:
Description

Interface Summary
AppletContext | This interface corresponds to an applet's environment: the document containing the applet and the other applets in the same document.
AppletStub | When an applet is first created, an applet stub is attached to it using the applet's setStub method.
AudioClip | The AudioClip interface is a simple abstraction for playing a sound clip.

Class Summary
Applet An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Package java.applet Description

Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

The applet framework involves two entities: the applet and the applet context. An applet is an embeddable window (see the Panel class) with a few extra methods that the applet context can use to initialize, start, and stop the applet.

The applet context is an application that is responsible for loading and running applets. For example, the applet context could be a Web browser or an applet development environment.

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.applet

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.applet

Packages that use java.applet
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.beans | Contains classes related to Java Beans development.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Classes in java.applet used by java.applet
Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
AppletContext
This interface corresponds to an applet's environment: the document containing the applet and the other applets in the same document.
AppletStub
When an applet is first created, an applet stub is attached to it using the applet's setStub method.
AudioClip
The AudioClip interface is a simple abstraction for playing a sound clip.

Classes in java.applet used by java.beans
Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Classes in java.applet used by javax.swing
Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Classes in java.applet used by org.omg.CORBA
Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AccessibleApplet

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.applet
Class Applet.AccessibleApplet

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Panel.AccessibleAWTPanel
                          |
                          +--java.applet.Applet.AccessibleApplet
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
JApplet.AccessibleJApplet
Enclosing class:
Applet
protected class Applet.AccessibleApplet
extends Panel.AccessibleAWTPanel

This class implements accessibility support for the Applet class. It provides an implementation of the Java Accessibility API appropriate to applet user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Applet.AccessibleApplet()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Applet.AccessibleApplet

protected Applet.AccessibleApplet()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Panel.AccessibleAWTPanel
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Applet

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.applet
Class Applet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JApplet
public class Applet
extends Panel

An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

The Applet class must be the superclass of any applet that is to be embedded in a Web page or viewed by the Java Applet Viewer. The Applet class provides a standard interface between applets and their environment.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.
Inner classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Applet()
Method Summary
void | destroy() Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Applet.
AppletContext | getAppletContext() Determines this applet's context, which allows the applet to query and affect the environment in which it runs.
String | getAppletInfo() Returns information about this applet.
AudioClip | getAudioClip(URL url) Returns the AudioClip object specified by the URL argument.
AudioClip | getAudioClip(URL url, String name) Returns the AudioClip object specified by the URL and name arguments.
URL | getCodeBase() Gets the base URL.
URL | getDocumentBase() Returns an absolute URL naming the directory of the document in which the applet is embedded.
Image | getImage(URL url) Returns an Image object that can then be painted on the screen.
Image | getImage(URL url, String name) Returns an Image object that can then be painted on the screen.
Locale | getLocale() Gets the Locale for the applet, if it has been set.
String | getParameter(String name) Returns the value of the named parameter in the HTML tag.
String[][] | getParameterInfo() Returns information about the parameters than are understood by this applet.
void | init() Called by the browser or applet viewer to inform this applet that it has been loaded into the system.
boolean | isActive() Determines if this applet is active.
static AudioClip | newAudioClip(URL url) Get an audio clip from the given URL.
void | play(URL url) Plays the audio clip at the specified absolute URL.
void | play(URL url, String name) Plays the audio clip given the URL and a specifier that is relative to it.
void | resize(Dimension d) Requests that this applet be resized.
void | resize(int width, int height) Requests that this applet be resized.
void | setStub(AppletStub stub) Sets this applet's stub.
void | showStatus(String msg) Requests that the argument string be displayed in the "status window".
void | start() Called by the browser or applet viewer to inform this applet that it should start its execution.
void | stop() Called by the browser or applet viewer to inform this applet that it should stop its execution.
Methods inherited from class java.awt.Panel
addNotify
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Applet

public Applet()
Method Detail

setStub

public final void setStub(AppletStub stub)
Sets this applet's stub. This is done automatically by the system.
Parameters:
stub - the new stub.

isActive

public boolean isActive()
Determines if this applet is active. An applet is marked active just before its start method is called. It becomes inactive just before its stop method is called.
Returns:
true if the applet is active; false otherwise.
See Also:
start(), stop()

getDocumentBase

public URL getDocumentBase()
Returns an absolute URL naming the directory of the document in which the applet is embedded. For example, suppose an applet is contained within the document:
    http://java.sun.com/products/jdk/1.2/index.html
The document base is:
    http://java.sun.com/products/jdk/1.2/
Returns:
the URL of the document that contains this applet.
See Also:
getCodeBase()

getCodeBase

public URL getCodeBase()
Gets the base URL. This is the URL of the applet itself.
Returns:
the URL of this applet.
See Also:
getDocumentBase()

getParameter

public String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For example, if this applet is specified as
 <applet code="Clock" width=50 height=50>
 <param name=Color value="blue">
 </applet>

then a call to getParameter("Color") returns the value "blue".

The name argument is case insensitive.

Parameters:
name - a parameter name.
Returns:
the value of the named parameter, or null if not set.

getAppletContext

public AppletContext getAppletContext()
Determines this applet's context, which allows the applet to query and affect the environment in which it runs.

This environment of an applet represents the document that contains the applet.

Returns:
the applet's context.

resize

public void resize(int width,
                   int height)
Requests that this applet be resized.
Overrides:
resize in class Component
Parameters:
width - the new requested width for the applet.
height - the new requested height for the applet.

resize

public void resize(Dimension d)
Requests that this applet be resized.
Overrides:
resize in class Component
Parameters:
d - an object giving the new width and height.

showStatus

public void showStatus(String msg)
Requests that the argument string be displayed in the "status window". Many browsers and applet viewers provide such a window, where the application can inform users of its current state.
Parameters:
msg - a string to display in the status window.

getImage

public Image getImage(URL url)
Returns an Image object that can then be painted on the screen. The url that is passed as an argument must specify an absolute URL.

This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.

Parameters:
url - an absolute URL giving the location of the image.
Returns:
the image at the specified URL.
See Also:
Image

getImage

public Image getImage(URL url,
                      String name)
Returns an Image object that can then be painted on the screen. The url argument must specify an absolute URL. The name argument is a specifier that is relative to the url argument.

This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.

Parameters:
url - an absolute URL giving the base location of the image.
name - the location of the image, relative to the url argument.
Returns:
the image at the specified URL.
See Also:
Image

newAudioClip

public static final AudioClip newAudioClip(URL url)
Get an audio clip from the given URL.
Parameters:
url - points to the audio clip
Returns:
the audio clip at the specified URL.
Since:
1.2

getAudioClip

public AudioClip getAudioClip(URL url)
Returns the AudioClip object specified by the URL argument.

This method always returns immediately, whether or not the audio clip exists. When this applet attempts to play the audio clip, the data will be loaded.

Parameters:
url - an absolute URL giving the location of the audio clip.
Returns:
the audio clip at the specified URL.
See Also:
AudioClip

getAudioClip

public AudioClip getAudioClip(URL url,
                              String name)
Returns the AudioClip object specified by the URL and name arguments.

This method always returns immediately, whether or not the audio clip exists. When this applet attempts to play the audio clip, the data will be loaded.

Parameters:
url - an absolute URL giving the base location of the audio clip.
name - the location of the audio clip, relative to the url argument.
Returns:
the audio clip at the specified URL.
See Also:
AudioClip

getAppletInfo

public String getAppletInfo()
Returns information about this applet. An applet should override this method to return a String containing information about the author, version, and copyright of the applet.

The implementation of this method provided by the Applet class returns null.

Returns:
a string containing information about the author, version, and copyright of the applet.

getLocale

public Locale getLocale()
Gets the Locale for the applet, if it has been set. If no Locale has been set, then the default Locale is returned.
Overrides:
getLocale in class Component
Returns:
the Locale for the applet
Since:
JDK1.1

getParameterInfo

public String[][] getParameterInfo()
Returns information about the parameters than are understood by this applet. An applet should override this method to return an array of Strings describing these parameters.

Each element of the array should be a set of three Strings containing the name, the type, and a description. For example:

 String pinfo[][] = {
     {"fps",    "1-10",    "frames per second"},
     {"repeat", "boolean", "repeat image loop"},
     {"imgs",   "url",     "images directory"}
 };

The implementation of this method provided by the Applet class returns null.

Returns:
an array describing the parameters this applet looks for.

play

public void play(URL url)
Plays the audio clip at the specified absolute URL. Nothing happens if the audio clip cannot be found.
Parameters:
url - an absolute URL giving the location of the audio clip.

play

public void play(URL url,
                 String name)
Plays the audio clip given the URL and a specifier that is relative to it. Nothing happens if the audio clip cannot be found.
Parameters:
url - an absolute URL giving the base location of the audio clip.
name - the location of the audio clip, relative to the url argument.

init

public void init()
Called by the browser or applet viewer to inform this applet that it has been loaded into the system. It is always called before the first time that the start method is called.

A subclass of Applet should override this method if it has initialization to perform. For example, an applet with threads would use the init method to create the threads and the destroy method to kill them.

The implementation of this method provided by the Applet class does nothing.

See Also:
destroy(),
start(),
stop()

start

public void start()
Called by the browser or applet viewer to inform this applet that it should start its execution. It is called after the init method and each time the applet is revisited in a Web page.

A subclass of Applet should override this method if it has any operation that it wants to perform each time the Web page containing it is visited. For example, an applet with animation might want to use the start method to resume animation, and the stop method to suspend the animation.

The implementation of this method provided by the Applet class does nothing.

See Also:
destroy(),
init(),
stop()

stop

public void stop()
Called by the browser or applet viewer to inform this applet that it should stop its execution. It is called when the Web page that contains this applet has been replaced by another page, and also just before the applet is to be destroyed.

A subclass of Applet should override this method if it has any operation that it wants to perform each time the Web page containing it is no longer visible. For example, an applet with animation might want to use the start method to resume animation, and the stop method to suspend the animation.

The implementation of this method provided by the Applet class does nothing.

See Also:
destroy(), init()

destroy

public void destroy()
Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated. The stop method will always be called before destroy.

A subclass of Applet should override this method if it has any operation that it wants to perform before it is destroyed. For example, an applet with threads would use the init method to create the threads and the destroy method to kill them.

The implementation of this method provided by the Applet class does nothing.

See Also:
init(),
start(),
stop()

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Applet. For applets, the AccessibleContext takes the form of an AccessibleApplet. A new AccessibleApplet instance is created if necessary.
Overrides:
getAccessibleContext in class Panel
Returns:
an AccessibleApplet that serves as the AccessibleContext of this Applet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AppletContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.applet
Interface AppletContext

public interface AppletContext

This interface corresponds to an applet's environment: the document containing the applet and the other applets in the same document.

The methods in this interface can be used by an applet to obtain information about its environment.

Since:
JDK1.0

Method Summary
Applet | getApplet(String name) Finds and returns the applet in the document represented by this applet context with the given name.
Enumeration | getApplets() Finds all the applets in the document represented by this applet context.
AudioClip | getAudioClip(URL url) Creates an audio clip.
Image | getImage(URL url) Returns an Image object that can then be painted on the screen.
void | showDocument(URL url) Replaces the Web page currently being viewed with the given URL.
void | showDocument(URL url, String target) Requests that the browser or applet viewer show the Web page indicated by the url argument.
void | showStatus(String status) Requests that the argument string be displayed in the "status window".

Method Detail

getAudioClip

public AudioClip getAudioClip(URL url)
Creates an audio clip.
Parameters:
url - an absolute URL giving the location of the audio clip.
Returns:
the audio clip at the specified URL.

getImage

public Image getImage(URL url)
Returns an Image object that can then be painted on the screen. The url argument that is passed as an argument must specify an absolute URL.

This method always returns immediately, whether or not the image exists. When the applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.

Parameters:
url - an absolute URL giving the location of the image.
Returns:
the image at the specified URL.
See Also:
Image

getApplet

public Applet getApplet(String name)
Finds and returns the applet in the document represented by this applet context with the given name. The name can be set in the HTML tag by setting the name attribute.
Parameters:
name - an applet name.
Returns:
the applet with the given name, or null if not found.

getApplets

public Enumeration getApplets()
Finds all the applets in the document represented by this applet context.
Returns:
an enumeration of all applets in the document represented by this applet context.

showDocument

public void showDocument(URL url)
Replaces the Web page currently being viewed with the given URL. This method may be ignored by applet contexts that are not browsers.
Parameters:
url - an absolute URL giving the location of the document.

showDocument

public void showDocument(URL url,
                         String target)
Requests that the browser or applet viewer show the Web page indicated by the url argument. The target argument indicates in which HTML frame the document is to be displayed. The target argument is interpreted as follows:

"_self" | Show in the window and frame that contain the applet.
"_parent" | Show in the applet's parent frame. If the applet's frame has no parent frame, acts the same as "_self".
"_top" | Show in the top-level frame of the applet's window. If the applet's frame is the top-level frame, acts the same as "_self".
"_blank" | Show in a new, unnamed top-level window.
name | Show in the frame or window named name. If a target named name does not already exist, a new top-level window with the specified name is created, and the document is shown there.

An applet viewer or browser is free to ignore showDocument.

Parameters:
url - an absolute URL giving the location of the document.
target - a String indicating where to display the page.

showStatus

public void showStatus(String status)
Requests that the argument string be displayed in the "status window". Many browsers and applet viewers provide such a window, where the application can inform users of its current state.
Parameters:
status - a string to display in the status window.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AppletStub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.applet
Interface AppletStub

public interface AppletStub

When an applet is first created, an applet stub is attached to it using the applet's setStub method. This stub serves as the interface between the applet and the browser environment or applet viewer environment in which the application is running.

Since:
JDK1.0
See Also:
Applet.setStub(java.applet.AppletStub)

Method Summary
void | appletResize(int width, int height) Called when the applet wants to be resized.
AppletContext | getAppletContext() Gets a handler to the applet's context.
URL | getCodeBase() Gets the base URL.
URL | getDocumentBase() Returns an absolute URL naming the directory of the document in which the applet is embedded.
String | getParameter(String name) Returns the value of the named parameter in the HTML tag.
boolean | isActive() Determines if the applet is active.

Method Detail

isActive

public boolean isActive()
Determines if the applet is active. An applet is active just before its start method is called. It becomes inactive just before its stop method is called.
Returns:
true if the applet is active; false otherwise.

getDocumentBase

public URL getDocumentBase()
Returns an absolute URL naming the directory of the document in which the applet is embedded. For example, suppose an applet is contained within the document:
    http://java.sun.com/products/jdk/1.2/index.html
The document base is:
    http://java.sun.com/products/jdk/1.2/
Returns:
the URL of the document that contains this applet.
See Also:
getCodeBase()

getCodeBase

public URL getCodeBase()
Gets the base URL.
Returns:
the URL of the applet.

getParameter

public String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as
 <applet code="Clock" width=50 height=50>
 <param name=Color value="blue">
 </applet>

then a call to getParameter("Color") returns the value "blue".

Parameters:
name - a parameter name.
Returns:
the value of the named parameter, or null if not set.

getAppletContext

public AppletContext getAppletContext()
Gets a handler to the applet's context.
Returns:
the applet's context.

appletResize

public void appletResize(int width,
                         int height)
Called when the applet wants to be resized.
Parameters:
width - the new requested width for the applet.
height - the new requested height for the applet.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AudioClip

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.applet
Interface AudioClip

public interface AudioClip

The AudioClip interface is a simple abstraction for playing a sound clip. Multiple AudioClip items can be playing at the same time, and the resulting sound is mixed together to produce a composite.

Since:
JDK1.0

Method Summary
void | loop() Starts playing this audio clip in a loop.
void | play() Starts playing this audio clip.
void | stop() Stops playing this audio clip.

Method Detail

play

public void play()
Starts playing this audio clip. Each time this method is called, the clip is restarted from the beginning.

loop

public void loop()
Starts playing this audio clip in a loop.

stop

public void stop()
Stops playing this audio clip.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.applet.Applet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.applet.Applet

Packages that use Applet
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.beans | Contains classes related to Java Beans development.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Applet in java.applet

Methods in java.applet that return Applet
 Applet AppletContext.getApplet(String name)
Finds and returns the applet in the document represented by this applet context with the given name.

Constructors in java.applet with parameters of type Applet
Applet.AccessibleApplet()

Uses of Applet in java.beans

Methods in java.beans with parameters of type Applet
void | AppletInitializer.initialize(Applet newAppletBean, BeanContext bCtxt) If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container.
void | AppletInitializer.activate(Applet newApplet) Activate, and/or mark Applet active.

Uses of Applet in javax.swing

Subclasses of Applet in javax.swing
 class JApplet
An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.

Uses of Applet in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type Applet
static ORB | ORB.init(Applet app, Properties props) Creates a new ORB instance for an applet.
protected abstract void | ORB.set_parameters(Applet app, Properties props) Allows the ORB implementation to be initialized with the given applet and parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.applet.Applet.AccessibleApplet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.applet.Applet.AccessibleApplet

Packages that use Applet.AccessibleApplet
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Applet.AccessibleApplet in javax.swing

Subclasses of Applet.AccessibleApplet in javax.swing
protected  class JApplet.AccessibleJApplet
This class implements accessibility support for the JApplet class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.applet.AppletContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.applet.AppletContext

Packages that use AppletContext
java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

Uses of AppletContext in java.applet

Methods in java.applet that return AppletContext
AppletContext | Applet.getAppletContext() Determines this applet's context, which allows the applet to query and affect the environment in which it runs.
AppletContext | AppletStub.getAppletContext() Gets a handler to the applet's context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.applet.AppletStub

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.applet.AppletStub

Packages that use AppletStub
java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

Uses of AppletStub in java.applet

Methods in java.applet with parameters of type AppletStub
 void Applet.setStub(AppletStub stub)
Sets this applet's stub.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.applet.AudioClip

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.applet.AudioClip

Packages that use AudioClip
java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

Uses of AudioClip in java.applet

Methods in java.applet that return AudioClip
AudioClip | AppletContext.getAudioClip(URL url) Creates an audio clip.
static AudioClip | Applet.newAudioClip(URL url) Get an audio clip from the given URL.
AudioClip | Applet.getAudioClip(URL url) Returns the AudioClip object specified by the URL argument.
AudioClip | Applet.getAudioClip(URL url, String name) Returns the AudioClip object specified by the URL and name arguments.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


java.awt Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class java.awt.Button.AccessibleAWTButton (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
        • class java.awt.Canvas.AccessibleAWTCanvas
        • class java.awt.Checkbox.AccessibleAWTCheckbox (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue, java.awt.event.ItemListener)
        • class java.awt.Choice.AccessibleAWTChoice (implements javax.accessibility.AccessibleAction)
        • class java.awt.Container.AccessibleAWTContainer
          • class java.awt.Panel.AccessibleAWTPanel
          • class java.awt.ScrollPane.AccessibleAWTScrollPane
          • class java.awt.Window.AccessibleAWTWindow
            • class java.awt.Dialog.AccessibleAWTDialog
            • class java.awt.Frame.AccessibleAWTFrame
        • class java.awt.Label.AccessibleAWTLabel
        • class java.awt.List.AccessibleAWTList (implements javax.accessibility.AccessibleSelection, java.awt.event.ActionListener, java.awt.event.ItemListener)
        • class java.awt.List.AccessibleAWTList.AccessibleAWTListChild (implements javax.accessibility.Accessible)
        • class java.awt.Scrollbar.AccessibleAWTScrollBar (implements javax.accessibility.AccessibleValue)
        • class java.awt.TextComponent.AccessibleAWTTextComponent (implements javax.accessibility.AccessibleText, java.awt.event.TextListener)
          • class java.awt.TextArea.AccessibleAWTTextArea
          • class java.awt.TextField.AccessibleAWTTextField
      • class java.awt.MenuComponent.AccessibleAWTMenuComponent (implements javax.accessibility.AccessibleComponent, javax.accessibility.AccessibleSelection, java.io.Serializable)
        • class java.awt.MenuBar.AccessibleAWTMenuBar
        • class java.awt.MenuItem.AccessibleAWTMenuItem (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
          • class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleValue)
          • class java.awt.Menu.AccessibleAWTMenu
            • class java.awt.PopupMenu.AccessibleAWTPopupMenu
    • class java.awt.AlphaComposite (implements java.awt.Composite)
    • class java.awt.AttributeValue
      • class java.awt.JobAttributes.DefaultSelectionType
      • class java.awt.JobAttributes.DestinationType
      • class java.awt.JobAttributes.DialogType
      • class java.awt.JobAttributes.MultipleDocumentHandlingType
      • class java.awt.JobAttributes.SidesType
      • class java.awt.PageAttributes.ColorType
      • class java.awt.PageAttributes.MediaType
      • class java.awt.PageAttributes.OrientationRequestedType
      • class java.awt.PageAttributes.OriginType
      • class java.awt.PageAttributes.PrintQualityType
    • class java.awt.AWTEventMulticaster (implements java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.HierarchyBoundsListener, java.awt.event.HierarchyListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.TextListener, java.awt.event.WindowListener)
    • class java.awt.BasicStroke (implements java.awt.Stroke)
    • class java.awt.BorderLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.awt.CardLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.awt.CheckboxGroup (implements java.io.Serializable)
    • class java.awt.Color (implements java.awt.Paint, java.io.Serializable)
      • class java.awt.SystemColor (implements java.io.Serializable)
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Button (implements javax.accessibility.Accessible)
      • class java.awt.Canvas (implements javax.accessibility.Accessible)
      • class java.awt.Checkbox (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Choice (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Container
        • class java.awt.Panel (implements javax.accessibility.Accessible)
        • class java.awt.ScrollPane (implements javax.accessibility.Accessible)
        • class java.awt.Window (implements javax.accessibility.Accessible)
          • class java.awt.Dialog
            • class java.awt.FileDialog
          • class java.awt.Frame (implements java.awt.MenuContainer)
      • class java.awt.Label (implements javax.accessibility.Accessible)
      • class java.awt.List (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
      • class java.awt.Scrollbar (implements javax.accessibility.Accessible, java.awt.Adjustable)
      • class java.awt.TextComponent (implements javax.accessibility.Accessible)
        • class java.awt.TextArea
        • class java.awt.TextField
    • class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler (implements java.awt.event.ComponentListener)
    • class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler (implements java.awt.event.FocusListener)
    • class java.awt.ComponentOrientation (implements java.io.Serializable)
    • class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler (implements java.awt.event.ContainerListener)
    • class java.awt.Cursor (implements java.io.Serializable)
    • class java.awt.geom.Dimension2D (implements java.lang.Cloneable)
      • class java.awt.Dimension (implements java.io.Serializable)
    • class java.awt.Event (implements java.io.Serializable)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.awt.AWTEvent
    • class java.awt.EventQueue
    • class java.awt.FlowLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class java.awt.Font (implements java.io.Serializable)
    • class java.awt.FontMetrics (implements java.io.Serializable)
    • class java.awt.GradientPaint (implements java.awt.Paint)
    • class java.awt.Graphics
      • class java.awt.Graphics2D
    • class java.awt.GraphicsConfigTemplate (implements java.io.Serializable)
    • class java.awt.GraphicsConfiguration
    • class java.awt.GraphicsDevice
    • class java.awt.GraphicsEnvironment
    • class java.awt.GridBagConstraints (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.GridBagLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class java.awt.GridLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class java.awt.Image
    • class java.awt.Insets (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.JobAttributes (implements java.lang.Cloneable)
    • class java.awt.MediaTracker (implements java.io.Serializable)
    • class java.awt.MenuComponent (implements java.io.Serializable)
      • class java.awt.MenuBar (implements javax.accessibility.Accessible, java.awt.MenuContainer)
      • class java.awt.MenuItem (implements javax.accessibility.Accessible)
        • class java.awt.CheckboxMenuItem (implements javax.accessibility.Accessible, java.awt.ItemSelectable)
        • class java.awt.Menu (implements javax.accessibility.Accessible, java.awt.MenuContainer)
          • class java.awt.PopupMenu
    • class java.awt.MenuShortcut (implements java.io.Serializable)
    • class java.awt.PageAttributes (implements java.lang.Cloneable)
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.awt.AWTPermission
    • class java.awt.geom.Point2D (implements java.lang.Cloneable)
      • class java.awt.Point (implements java.io.Serializable)
    • class java.awt.Polygon (implements java.io.Serializable, java.awt.Shape)
    • class java.awt.PrintJob
    • class java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Rectangle2D
        • class java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
    • class java.awt.RenderingHints (implements java.lang.Cloneable, java.util.Map)
    • class java.awt.RenderingHints.Key
    • class java.awt.Robot
    • class java.awt.TexturePaint (implements java.awt.Paint)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Error
        • class java.awt.AWTError
      • class java.lang.Exception
        • class java.awt.AWTException
        • class java.awt.FontFormatException
        • class java.lang.RuntimeException
          • class java.lang.IllegalStateException
            • class java.awt.IllegalComponentStateException
    • class java.awt.Toolkit

Interface Hierarchy

  • interface java.awt.ActiveEvent
  • interface java.awt.Adjustable
  • interface java.awt.Composite
  • interface java.awt.CompositeContext
  • interface java.awt.ItemSelectable
  • interface java.awt.LayoutManager
    • interface java.awt.LayoutManager2
  • interface java.awt.MenuContainer
  • interface java.awt.PaintContext
  • interface java.awt.PrintGraphics
  • interface java.awt.Shape
  • interface java.awt.Stroke
  • interface java.awt.Transparency
    • interface java.awt.Paint
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt

Contains all of the classes for creating user interfaces and for painting graphics and images.

See:
Description

Interface Summary
ActiveEvent | An interface for events that know how dispatch themselves.
Adjustable | The interface for objects which have an adjustable numeric value contained within a bounded range of values.
Composite | The Composite interface, along with CompositeContext, defines the methods to compose a draw primitive with the underlying graphics area.
CompositeContext | The CompositeContext interface defines the encapsulated and optimized environment for a compositing operation.
ItemSelectable | The interface for objects which contain a set of items for which zero or more can be selected.
LayoutManager | Defines the interface for classes that know how to layout Containers.
LayoutManager2 | Defines an interface for classes that know how to layout Containers based on a layout constraints object.
MenuContainer | The super class of all menu related containers.
Paint | This Paint interface defines how color patterns can be generated for Graphics2D operations.
PaintContext | The PaintContext interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on a Graphics2D.
PrintGraphics | An abstract class which provides a print graphics context for a page.
Shape | The Shape interface provides definitions for objects that represent some form of geometric shape.
Stroke | The Stroke interface allows a Graphics2D object to obtain a Shape that is the decorated outline, or stylistic representation of the outline, of the specified Shape.
Transparency | The Transparency interface defines the common transparency modes for implementing classes.

Class Summary
AlphaComposite | This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images.
AWTEvent | The root event class for all AWT events.
AWTEventMulticaster | A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
AWTPermission | This class is for AWT permissions.
BasicStroke | The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke.
BorderLayout | A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
Button | This class creates a labeled button.
Canvas | A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
CardLayout | A CardLayout object is a layout manager for a container.
Checkbox | A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
CheckboxGroup | The CheckboxGroup class is used to group together a set of Checkbox buttons.
CheckboxMenuItem | This class represents a check box that can be included in a menu.
Choice | The Choice class presents a pop-up menu of choices.
Color | The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component | A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
ComponentOrientation | The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
Container | A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Cursor | A class to encapsulate the bitmap representation of the mouse cursor.
Dialog | A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
Dimension | The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Event | Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model.
EventQueue | EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.
FileDialog | The FileDialog class displays a dialog window from which the user can select a file.
FlowLayout | A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph.
Font | The Font class represents fonts.
FontMetrics | The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Frame | A Frame is a top-level window with a title and a border.
GradientPaint | The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
Graphics | The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Graphics2D | This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
GraphicsConfigTemplate | The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration.
GraphicsConfiguration | The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
GraphicsDevice | The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment.
GraphicsEnvironment | The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform.
GridBagConstraints | The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
GridBagLayout | The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
GridLayout | The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
Image | The abstract class Image is the superclass of all classes that represent graphical images.
Insets | An Insets object is a representation of the borders of a container.
JobAttributes | A set of attributes which control a print job.
JobAttributes.DefaultSelectionType | A type-safe enumeration of possible default selection states.
JobAttributes.DestinationType | A type-safe enumeration of possible job destinations.
JobAttributes.DialogType | A type-safe enumeration of possible dialogs to display to the user.
JobAttributes.MultipleDocumentHandlingType | A type-safe enumeration of possible multiple document handling states.
JobAttributes.SidesType | A type-safe enumeration of possible multi-page impositions.
Label | A Label object is a component for placing text in a container.
List | The List component presents the user with a scrolling list of text items.
MediaTracker | The MediaTracker class is a utility class to track the status of a number of media objects.
Menu | A Menu object is a pull-down menu component that is deployed from a menu bar.
MenuBar | The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
MenuComponent | The abstract class MenuComponent is the superclass of all menu-related components.
MenuItem | All items in a menu must belong to the class MenuItem, or one of its subclasses.
MenuShortcut | A class which represents a keyboard accelerator for a MenuItem.
PageAttributes | A set of attributes which control the output of a printed page.
PageAttributes.ColorType | A type-safe enumeration of possible color states.
PageAttributes.MediaType | A type-safe enumeration of possible paper sizes.
PageAttributes.OrientationRequestedType | A type-safe enumeration of possible orientations.
PageAttributes.OriginType | A type-safe enumeration of possible origins.
PageAttributes.PrintQualityType | A type-safe enumeration of possible print qualities.
Panel | Panel is the simplest container class.
Point | A point representing a location in (x, y) coordinate space, specified in integer precision.
Polygon | The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
PopupMenu | A class that implements a menu which can be dynamically popped up at a specified position within a component.
PrintJob | An abstract class which initiates and executes a print job.
Rectangle | A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
RenderingHints | The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
RenderingHints.Key | Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
Robot | This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.
Scrollbar | The Scrollbar class embodies a scroll bar, a familiar user-interface object.
ScrollPane | A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
SystemColor | A class to encapsulate symbolic colors representing the color of GUI objects on a system.
TextArea | A TextArea object is a multi-line region that displays text.
TextComponent | The TextComponent class is the superclass of any component that allows the editing of some text.
TextField | A TextField object is a text component that allows for the editing of a single line of text.
TexturePaint | The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage.
Toolkit | This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.
Window | A Window object is a top-level window with no borders and no menubar.

Exception Summary
AWTException | Signals that an Absract Window Toolkit exception has occurred.
FontFormatException | Thrown by method createFont in the Font class to indicate that the specified font is bad.
IllegalComponentStateException | Signals that an AWT component is not in an appropriate state for the requested operation.

Error Summary
AWTError Thrown when a serious Abstract Window Toolkit error has occurred.

Package java.awt Description

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 compo nents 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.

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt

Packages that use java.awt
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in java.awt used by java.applet
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
MenuContainer
The super class of all menu related containers.
Panel
Panel is the simplest container class.
Panel.AccessibleAWTPanel
This class implements accessibility support for the Panel class.

Classes in java.awt used by java.awt
Adjustable
The interface for objects which have an adjustable numeric value contained within a bounded range of values.
AlphaComposite
This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images.
AWTEvent
The root event class for all AWT events.
AWTException
Signals that an Absract Window Toolkit exception has occurred.
Button
This class creates a labeled button.
Canvas
A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
Checkbox
A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
CheckboxGroup
The CheckboxGroup class is used to group together a set of Checkbox buttons.
CheckboxMenuItem
This class represents a check box that can be included in a menu.
Choice
The Choice class presents a pop-up menu of choices.
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
ComponentOrientation
The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
Composite
The Composite interface, along with CompositeContext, defines the methods to compose a draw primitive with the underlying graphics area.
CompositeContext
The CompositeContext interface defines the encapsulated and optimized environment for a compositing operation.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Dialog
A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Event
Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model.
EventQueue
EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.
FileDialog
The FileDialog class displays a dialog window from which the user can select a file.
Font
The Font class represents fonts.
FontFormatException
Thrown by method createFont in the Font class to indicate that the specified font is bad.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Frame
A Frame is a top-level window with a title and a border.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Graphics2D
This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
GraphicsConfigTemplate
The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration.
GraphicsConfiguration
The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
GraphicsDevice
The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment.
GraphicsEnvironment
The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform.
GridBagConstraints
The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Insets
An Insets object is a representation of the borders of a container.
ItemSelectable
The interface for objects which contain a set of items for which zero or more can be selected.
JobAttributes
A set of attributes which control a print job.
JobAttributes.DefaultSelectionType
A type-safe enumeration of possible default selection states.
JobAttributes.DestinationType
A type-safe enumeration of possible job destinations.
JobAttributes.DialogType
A type-safe enumeration of possible dialogs to display to the user.
JobAttributes.MultipleDocumentHandlingType
A type-safe enumeration of possible multiple document handling states.
JobAttributes.SidesType
A type-safe enumeration of possible multi-page impositions.
Label
A Label object is a component for placing text in a container.
LayoutManager
Defines the interface for classes that know how to layout Containers.
LayoutManager2
Defines an interface for classes that know how to layout Containers based on a layout constraints object.
List
The List component presents the user with a scrolling list of text items.
List.AccessibleAWTList
This class implements accessibility support for the List class.
Menu
A Menu object is a pull-down menu component that is deployed from a menu bar.
Menu.AccessibleAWTMenu
Inner class of Menu used to provide default support for accessibility.
MenuBar
The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
MenuComponent
The abstract class MenuComponent is the superclass of all menu-related components.
MenuComponent.AccessibleAWTMenuComponent
Inner class of MenuComponent used to provide default support for accessibility.
MenuContainer
The super class of all menu related containers.
MenuItem
All items in a menu must belong to the class MenuItem, or one of its subclasses.
MenuItem.AccessibleAWTMenuItem
Inner class of MenuItem used to provide default support for accessibility.
MenuShortcut
A class which represents a keyboard accelerator for a MenuItem.
PageAttributes
A set of attributes which control the output of a printed page.
PageAttributes.ColorType
A type-safe enumeration of possible color states.
PageAttributes.MediaType
A type-safe enumeration of possible paper sizes.
PageAttributes.OrientationRequestedType
A type-safe enumeration of possible orientations.
PageAttributes.OriginType
A type-safe enumeration of possible origins.
PageAttributes.PrintQualityType
A type-safe enumeration of possible print qualities.
Paint
This Paint interface defines how color patterns can be generated for Graphics2D operations.
PaintContext
The PaintContext interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on a Graphics2D.
Panel
Panel is the simplest container class.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Polygon
The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
PopupMenu
A class that implements a menu which can be dynamically popped up at a specified position within a component.
PrintJob
An abstract class which initiates and executes a print job.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
RenderingHints
The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
RenderingHints.Key
Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
Scrollbar
The Scrollbar class embodies a scroll bar, a familiar user-interface object.
ScrollPane
A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.
Stroke
The Stroke interface allows a Graphics2D object to obtain a Shape that is the decorated outline, or stylistic representation of the outline, of the specified Shape.
SystemColor
A class to encapsulate symbolic colors representing the color of GUI objects on a system.
TextArea
A TextArea object is a multi-line region that displays text.
TextComponent
The TextComponent class is the superclass of any component that allows the editing of some text.
TextComponent.AccessibleAWTTextComponent
This class implements accessibility support for the TextComponent class.
TextField
A TextField object is a text component that allows for the editing of a single line of text.
Toolkit
This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.
Transparency
The Transparency interface defines the common transparency modes for implementing classes.
Window
A Window object is a top-level window with no borders and no menubar.
Window.AccessibleAWTWindow
This class implements accessibility support for the Window class.

Classes in java.awt used by java.awt.dnd
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Insets
An Insets object is a representation of the borders of a container.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.

Classes in java.awt used by java.awt.event
ActiveEvent
An interface for events that know how dispatch themselves.
Adjustable
The interface for objects which have an adjustable numeric value contained within a bounded range of values.
AWTEvent
The root event class for all AWT events.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
ItemSelectable
The interface for objects which contain a set of items for which zero or more can be selected.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Window
A Window object is a top-level window with no borders and no menubar.

Classes in java.awt used by java.awt.font
Font
The Font class represents fonts.
Graphics2D
This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.

Classes in java.awt used by java.awt.geom
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.

Classes in java.awt used by java.awt.im
AWTEvent
The root event class for all AWT events.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by java.awt.im.spi
AWTEvent
The root event class for all AWT events.
AWTException
Signals that an Absract Window Toolkit exception has occurred.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Window
A Window object is a top-level window with no borders and no menubar.

Classes in java.awt used by java.awt.image
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Graphics2D
This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
RenderingHints
The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
Transparency
The Transparency interface defines the common transparency modes for implementing classes.

Classes in java.awt used by java.awt.image.renderable
RenderingHints
The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.

Classes in java.awt used by java.awt.print
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.

Classes in java.awt used by java.beans
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by java.beans.beancontext
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.

Classes in java.awt used by javax.accessibility
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
IllegalComponentStateException
Signals that an AWT component is not in an appropriate state for the requested operation.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by javax.swing
Adjustable
The interface for objects which have an adjustable numeric value contained within a bounded range of values.
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
ComponentOrientation
The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Dialog
A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
Dialog.AccessibleAWTDialog
This class implements accessibility support for the Dialog class.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Frame
A Frame is a top-level window with a title and a border.
Frame.AccessibleAWTFrame
This class implements accessibility support for the Frame class.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
GraphicsConfiguration
The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
IllegalComponentStateException
Signals that an AWT component is not in an appropriate state for the requested operation.
Image
The abstract class Image is the superclass of all classes that represent graphical images.
Insets
An Insets object is a representation of the borders of a container.
ItemSelectable
The interface for objects which contain a set of items for which zero or more can be selected.
LayoutManager
Defines the interface for classes that know how to layout Containers.
LayoutManager2
Defines an interface for classes that know how to layout Containers based on a layout constraints object.
MediaTracker
The MediaTracker class is a utility class to track the status of a number of media objects.
MenuContainer
The super class of all menu related containers.
Panel
Panel is the simplest container class.
Panel.AccessibleAWTPanel
This class implements accessibility support for the Panel class.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.
Window
A Window object is a top-level window with no borders and no menubar.
Window.AccessibleAWTWindow
This class implements accessibility support for the Window class.

Classes in java.awt used by javax.swing.border
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Insets
An Insets object is a representation of the borders of a container.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by javax.swing.colorchooser
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
MenuContainer
The super class of all menu related containers.

Classes in java.awt used by javax.swing.event
AWTEvent
The root event class for all AWT events.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.

Classes in java.awt used by javax.swing.plaf
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Insets
An Insets object is a representation of the borders of a container.
Paint
This Paint interface defines how color patterns can be generated for Graphics2D operations.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Transparency
The Transparency interface defines the common transparency modes for implementing classes.

Classes in java.awt used by javax.swing.plaf.basic
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
GridBagConstraints
The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
Insets
An Insets object is a representation of the borders of a container.
ItemSelectable
The interface for objects which contain a set of items for which zero or more can be selected.
LayoutManager
Defines the interface for classes that know how to layout Containers.
LayoutManager2
Defines an interface for classes that know how to layout Containers based on a layout constraints object.
MenuContainer
The super class of all menu related containers.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.
Window
A Window object is a top-level window with no borders and no menubar.

Classes in java.awt used by javax.swing.plaf.metal
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Insets
An Insets object is a representation of the borders of a container.
ItemSelectable
The interface for objects which contain a set of items for which zero or more can be selected.
LayoutManager
Defines the interface for classes that know how to layout Containers.
MenuContainer
The super class of all menu related containers.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by javax.swing.plaf.multi
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by javax.swing.table
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
MenuContainer
The super class of all menu related containers.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Classes in java.awt used by javax.swing.text
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
FontMetrics
The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Insets
An Insets object is a representation of the borders of a container.
MenuContainer
The super class of all menu related containers.
Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.

Classes in java.awt used by javax.swing.text.html
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Cursor
A class to encapsulate the bitmap representation of the mouse cursor.
Font
The Font class represents fonts.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
Shape
The Shape interface provides definitions for objects that represent some form of geometric shape.

Classes in java.awt used by javax.swing.tree
Color
The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
Component
A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
Font
The Font class represents fonts.
Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
MenuContainer
The super class of all menu related containers.
Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AccessibleAWTButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Button.AccessibleAWTButton

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Button.AccessibleAWTButton
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
Button
protected class Button.AccessibleAWTButton
extends Component.AccessibleAWTComponent
implements AccessibleAction, AccessibleValue

This class implements accessibility support for the Button class. It provides an implementation of the Java Accessibility API appropriate to button user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Button.AccessibleAWTButton()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
String | getAccessibleName() Get the accessible name of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Button.AccessibleAWTButton

protected Button.AccessibleAWTButton()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class Component.AccessibleAWTComponent
Returns:
the localized name of the object -- can be null if this object does not have a name

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. The default behavior of a button is to have one action - toggle the button.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
1, the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0 if this isn't selected or an Integer of 1 if this is selected.
See Also:
AbstractButton#isSelected

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0.

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTCanvas

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Canvas.AccessibleAWTCanvas

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Canvas.AccessibleAWTCanvas
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
Canvas
protected class Canvas.AccessibleAWTCanvas
extends Component.AccessibleAWTComponent

This class implements accessibility support for the Canvas class. It provides an implementation of the Java Accessibility API appropriate to canvas user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Canvas.AccessibleAWTCanvas()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Canvas.AccessibleAWTCanvas

protected Canvas.AccessibleAWTCanvas()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTCheckbox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Checkbox.AccessibleAWTCheckbox

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Checkbox.AccessibleAWTCheckbox
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleValue, EventListener, ItemListener, Serializable
Enclosing class:
Checkbox
protected class Checkbox.AccessibleAWTCheckbox
extends Component.AccessibleAWTComponent
implements ItemListener, AccessibleAction, AccessibleValue

This class implements accessibility support for the Checkbox class. It provides an implementation of the Java Accessibility API appropriate to checkbox user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
Checkbox.AccessibleAWTCheckbox()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
void | itemStateChanged(ItemEvent e) Fire accessible property change events when the state of the toggle button changes.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Checkbox.AccessibleAWTCheckbox

public Checkbox.AccessibleAWTCheckbox()
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)
Fire accessible property change events when the state of the toggle button changes.
Specified by:
itemStateChanged in interface ItemListener

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. If there is more than one, the first one is the "default" action.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number. If the value has not been set, the return value will be null.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
value of the object
See Also:
setCurrentAccessibleValue(java.lang.Number)

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set; else False
See Also:
getCurrentAccessibleValue()

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
Minimum value of the object; null if this object does not have a minimum value
See Also:
getMaximumAccessibleValue()

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
Maximum value of the object; null if this object does not have a maximum value
See Also:
getMinimumAccessibleValue()

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTCheckboxMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class CheckboxMenuItem.AccessibleAWTCheckboxMenuItem

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
              |
              +--java.awt.MenuItem.AccessibleAWTMenuItem
                    |
                    +--java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleValue, Serializable
Enclosing class:
CheckboxMenuItem
protected class CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
extends MenuItem.AccessibleAWTMenuItem
implements AccessibleAction, AccessibleValue

Inner class of CheckboxMenuItem used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

This class implements accessibility support for the CheckboxMenuItem class. It provides an implementation of the Java Accessibility API appropriate to checkbox menu item user-interface elements.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected CheckboxMenuItem.AccessibleAWTCheckboxMenuItem()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class java.awt.MenuItem.AccessibleAWTMenuItem
getAccessibleName
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CheckboxMenuItem.AccessibleAWTCheckboxMenuItem

protected CheckboxMenuItem.AccessibleAWTCheckboxMenuItem()
Method Detail

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class MenuItem.AccessibleAWTMenuItem
Returns:
this object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class MenuItem.AccessibleAWTMenuItem
Returns:
this object

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. If there is more than one, the first one is the "default" action.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Overrides:
getAccessibleActionCount in class MenuItem.AccessibleAWTMenuItem
Returns:
the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Overrides:
getAccessibleActionDescription in class MenuItem.AccessibleAWTMenuItem
Parameters:
i - zero-based index of the actions

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Overrides:
doAccessibleAction in class MenuItem.AccessibleAWTMenuItem
Parameters:
i - zero-based index of actions
Returns:
true if the action was performed; otherwise false.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number. If the value has not been set, the return value will be null.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Overrides:
getCurrentAccessibleValue in class MenuItem.AccessibleAWTMenuItem
Returns:
value of the object
See Also:
setCurrentAccessibleValue(java.lang.Number)

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Overrides:
setCurrentAccessibleValue in class MenuItem.AccessibleAWTMenuItem
Returns:
true if the value was set; otherwise false
See Also:
getCurrentAccessibleValue()

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Overrides:
getMinimumAccessibleValue in class MenuItem.AccessibleAWTMenuItem
Returns:
Minimum value of the object; null if this object does not have a minimum value
See Also:
getMaximumAccessibleValue()

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Overrides:
getMaximumAccessibleValue in class MenuItem.AccessibleAWTMenuItem
Returns:
Maximum value of the object; null if this object does not have a maximum value
See Also:
getMinimumAccessibleValue()

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class MenuItem.AccessibleAWTMenuItem
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTChoice

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Choice.AccessibleAWTChoice

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Choice.AccessibleAWTChoice
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, Serializable
Enclosing class:
Choice
protected class Choice.AccessibleAWTChoice
extends Component.AccessibleAWTComponent
implements AccessibleAction

This class implements accessibility support for the Choice class. It provides an implementation of the Java Accessibility API appropriate to choice user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
Choice.AccessibleAWTChoice()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
String | getAccessibleActionDescription(int i) Returns a description of the specified action of the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Choice.AccessibleAWTChoice

public Choice.AccessibleAWTChoice()
Method Detail

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object
See Also:
AccessibleAction

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
the zero-based number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Returns a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions
Returns:
a String description of the action
See Also:
getAccessibleActionCount()

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the action was performed; otherwise false.
See Also:
getAccessibleActionCount()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Component.AccessibleAWTComponent

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
Box.Filler.AccessibleBoxFiller, Button.AccessibleAWTButton, Canvas.AccessibleAWTCanvas, Checkbox.AccessibleAWTCheckbox, Choice.AccessibleAWTChoice, Container.AccessibleAWTContainer, Label.AccessibleAWTLabel, List.AccessibleAWTList, List.AccessibleAWTList.AccessibleAWTListChild, Scrollbar.AccessibleAWTScrollBar, TextComponent.AccessibleAWTTextComponent
Enclosing class:
Component
protected abstract class Component.AccessibleAWTComponent
extends AccessibleContext
implements Serializable, AccessibleComponent

Inner class of Component used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by component developers.

The class used to obtain the accessible role for this object.

See Also:
Serialized Form

Inner Class Summary
protected class | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler Fire PropertyChange listener, if one is registered, when shown/hidden..
protected class | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
Field Summary
protected ComponentListener | accessibleAWTComponentHandler
protected FocusListener | accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Component.AccessibleAWTComponent()
Though the class is abstract, this should be called by all sub-classes.
Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleComponent | getAccessibleComponent() Get the AccessibleComponent associated with this object if one exists.
String | getAccessibleDescription() Get the accessible description of this object.
int | getAccessibleIndexInParent() Get the index of this object in its accessible parent.
String | getAccessibleName() Get the accessible name of this object.
Accessible | getAccessibleParent() Get the Accessible parent of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Color | getBackground() Get the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Get the Cursor of this object.
Font | getFont() Get the Font of this object.
FontMetrics | getFontMetrics(Font f) Get the FontMetrics of this object.
Color | getForeground() Get the foreground color of this object.
Locale | getLocale() Return the locale of this object.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determine if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determine if the object is showing.
boolean | isVisible() Determine if the object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | requestFocus() Requests focus for this object.
void | setBackground(Color c) Set the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor cursor) Set the Cursor of this object.
void | setEnabled(boolean b) Set the enabled state of the object.
void | setFont(Font f) Set the Font of this object.
void | setForeground(Color c) Set the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width width and height.
void | setVisible(boolean b) Set the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

accessibleAWTComponentHandler

protected ComponentListener accessibleAWTComponentHandler

accessibleAWTFocusHandler

protected FocusListener accessibleAWTFocusHandler
Constructor Detail

Component.AccessibleAWTComponent

protected Component.AccessibleAWTComponent()
Though the class is abstract, this should be called by all sub-classes.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
Overrides:
addPropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object. This should almost never return java.awt.Component.getName(), as that generally isn't a localized name, and doesn't have meaning for the user. If the object is fundamentally a text object (e.g. a menu item), the accessible name should be the text of the object (e.g. "save"). If the object has a tooltip, the tooltip text may also be an appropriate String to return.
Overrides:
getAccessibleName in class AccessibleContext
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleDescription

public String getAccessibleDescription()
Get the accessible description of this object. This should be a concise, localized description of what this object is - what is its meaning to the user. If the object has a tooltip, the tooltip text may be an appropriate string to return, assuming it contains a concise description of the object (instead of just the name of the object - e.g. a "Save" icon on a toolbar that had "save" as the tooltip text shouldn't return the tooltip text as the description, but something like "Saves the current text document" instead).
Overrides:
getAccessibleDescription in class AccessibleContext
Returns:
the localized description of the object -- can be null if this object does not have a description
See Also:
AccessibleContext.setAccessibleDescription(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleParent

public Accessible getAccessibleParent()
Get the Accessible parent of this object. If the parent of this object implements Accessible, this method should simply return getParent().
Overrides:
getAccessibleParent in class AccessibleContext
Returns:
the Accessible parent of this object -- can be null if this object does not have an Accessible parent

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Get the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getLocale

public Locale getLocale()
Return the locale of this object.
Overrides:
getLocale in class AccessibleContext
Returns:
the locale of this object

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
the component

getBackground

public Color getBackground()
Get the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null

setBackground

public void setBackground(Color c)
Set the background color of this object. (For transparency, see isOpaque.)
Specified by:
setBackground in interface AccessibleComponent
Parameters:
c - the new Color for the background
See Also:
Component.isOpaque()

getForeground

public Color getForeground()
Get the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null

setForeground

public void setForeground(Color c)
Set the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Parameters:
c - the new Color for the foreground

getCursor

public Cursor getCursor()
Get the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null

setCursor

public void setCursor(Cursor cursor)
Set the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Parameters:
c - the new Cursor for the object

getFont

public Font getFont()
Get the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null

setFont

public void setFont(Font f)
Set the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Parameters:
f - the new Font for the object

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Get the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
getFont()

isEnabled

public boolean isEnabled()
Determine if the object is enabled.
Specified by:
isEnabled in interface AccessibleComponent
Returns:
true if object is enabled; otherwise, false

setEnabled

public void setEnabled(boolean b)
Set the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it

isVisible

public boolean isVisible()
Determine if the object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen because one of the objects that this object is contained by is not visible. To determine if an object is showing on the screen, use isShowing().
Specified by:
isVisible in interface AccessibleComponent
Returns:
true if object is visible; otherwise, false

setVisible

public void setVisible(boolean b)
Set the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it

isShowing

public boolean isShowing()
Determine if the object is showing. This is determined by checking the visibility of the object and ancestors of the object. Note: this will return true even if the object is obscured by another (for example, it happens to be underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false

getLocationOnScreen

public Point getLocationOnScreen()
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Returns:
location of object on screen -- can be null if this object is not on the screen

getLocation

public Point getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Returns:
An instance of Point representing the top-left corner of the objects's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen

setLocation

public void setLocation(Point p)
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.

setBounds

public void setBounds(Rectangle r)
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Parameters:
A - rectangle indicating this component's bounds

getSize

public Dimension getSize()
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this objects's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen

setSize

public void setSize(Dimension d)
Resizes this object so that it has width width and height.
Specified by:
setSize in interface AccessibleComponent
Parameters:
d - - The dimension specifying the new size of the object.

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Parameters:
p - The point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null

isFocusTraversable

public boolean isFocusTraversable()
Returns whether this object can accept focus or not.
Specified by:
isFocusTraversable in interface AccessibleComponent
Returns:
true if object can accept focus; otherwise false

requestFocus

public void requestFocus()
Requests focus for this object.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Parameters:
l - the focus listener

removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Parameters:
l - the focus listener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTComponentHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Component.AccessibleAWTComponent.AccessibleAWTComponentHandler

java.lang.Object
  |
  +--java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
All Implemented Interfaces:
ComponentListener, EventListener
Enclosing class:
Component.AccessibleAWTComponent
protected class Component.AccessibleAWTComponent.AccessibleAWTComponentHandler
extends Object
implements ComponentListener

Fire PropertyChange listener, if one is registered, when shown/hidden..

Constructor Summary
protected Component.AccessibleAWTComponent.AccessibleAWTComponentHandler()
Method Summary
void | componentHidden(ComponentEvent e) Invoked when the component has been made invisible.
void | componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | componentResized(ComponentEvent e) Invoked when the component's size changes.
void | componentShown(ComponentEvent e) Invoked when the component has been made visible.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Component.AccessibleAWTComponent.AccessibleAWTComponentHandler

protected Component.AccessibleAWTComponent.AccessibleAWTComponentHandler()
Method Detail

componentHidden

public void componentHidden(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made invisible.
Specified by:
componentHidden in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made visible.
Specified by:
componentShown in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's position changes.
Specified by:
componentMoved in interface ComponentListener

componentResized

public void componentResized(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's size changes.
Specified by:
componentResized in interface ComponentListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTContainer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Container.AccessibleAWTContainer

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
Box.AccessibleBox, CellRendererPane.AccessibleCellRendererPane, JComponent.AccessibleJComponent, Panel.AccessibleAWTPanel, ScrollPane.AccessibleAWTScrollPane, Window.AccessibleAWTWindow
Enclosing class:
Container
protected class Container.AccessibleAWTContainer
extends Component.AccessibleAWTComponent

Inner class of Container used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by container developers.

The class used to obtain the accessible role for this object, as well as implementing many of the methods in the AccessibleContainer interface.

See Also:
Serialized Form

Inner Class Summary
protected  class Container.AccessibleAWTContainer.AccessibleContainerHandler
Fire PropertyChange listener, if one is registered, when children added/removed.
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Field Summary
protected  ContainerListener accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Container.AccessibleAWTContainer()
Method Summary
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleRole, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

accessibleContainerHandler

protected ContainerListener accessibleContainerHandler
Constructor Detail

Container.AccessibleAWTContainer

protected Container.AccessibleAWTContainer()
Method Detail

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class Component.AccessibleAWTComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class Component.AccessibleAWTComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Component.AccessibleAWTComponent
Parameters:
p - The point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTDialog

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Dialog.AccessibleAWTDialog

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
                          |
                          +--java.awt.Dialog.AccessibleAWTDialog
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
JDialog.AccessibleJDialog
Enclosing class:
Dialog
protected class Dialog.AccessibleAWTDialog
extends Window.AccessibleAWTWindow

This class implements accessibility support for the Dialog class. It provides an implementation of the Java Accessibility API appropriate to dialog user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Dialog.AccessibleAWTDialog()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Dialog.AccessibleAWTDialog

protected Dialog.AccessibleAWTDialog()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Window.AccessibleAWTWindow
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Window.AccessibleAWTWindow
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTFocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

java.lang.Object
  |
  +--java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
Component.AccessibleAWTComponent
protected class Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
extends Object
implements FocusListener

Fire PropertyChange listener, if one is registered, when focus events happen

Constructor Summary
protected Component.AccessibleAWTComponent.AccessibleAWTFocusHandler()
Method Summary
void | focusGained(FocusEvent event) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent event) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

protected Component.AccessibleAWTComponent.AccessibleAWTFocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent event)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent event)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTFrame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Frame.AccessibleAWTFrame

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
                          |
                          +--java.awt.Frame.AccessibleAWTFrame
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
JFrame.AccessibleJFrame
Enclosing class:
Frame
protected class Frame.AccessibleAWTFrame
extends Window.AccessibleAWTWindow

This class implements accessibility support for the Frame class. It provides an implementation of the Java Accessibility API appropriate to frame user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Frame.AccessibleAWTFrame()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Frame.AccessibleAWTFrame

protected Frame.AccessibleAWTFrame()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Window.AccessibleAWTWindow
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Window.AccessibleAWTWindow
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTLabel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Label.AccessibleAWTLabel

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Label.AccessibleAWTLabel
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
Label
protected class Label.AccessibleAWTLabel
extends Component.AccessibleAWTComponent

This class implements accessibility support for the Label class. It provides an implementation of the Java Accessibility API appropriate to label user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
Label.AccessibleAWTLabel()
Method Summary
String | getAccessibleName() Get the accessible name of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Label.AccessibleAWTLabel

public Label.AccessibleAWTLabel()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class Component.AccessibleAWTComponent
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class List.AccessibleAWTList

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.List.AccessibleAWTList
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, ActionListener, EventListener, ItemListener, Serializable
Enclosing class:
List
protected class List.AccessibleAWTList
extends Component.AccessibleAWTComponent
implements AccessibleSelection, ItemListener, ActionListener

This class implements accessibility support for the List class. It provides an implementation of the Java Accessibility API appropriate to list user-interface elements.

See Also:
Serialized Form

Inner Class Summary
protected  class List.AccessibleAWTList.AccessibleAWTListChild
This class implements accessibility support for List children.
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
List.AccessibleAWTList()
Method Summary
void | actionPerformed(ActionEvent event) Invoked when an action occurs.
void | addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
Accessible | getAccessibleAt(Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
int | getAccessibleSelectionCount() Returns the number of items currently selected.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected.
void | itemStateChanged(ItemEvent event) Invoked when an item has been selected or deselected.
void | removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection.
void | selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

List.AccessibleAWTList

public List.AccessibleAWTList()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener

itemStateChanged

public void itemStateChanged(ItemEvent event)
Description copied from interface: ItemListener
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Specified by:
itemStateChanged in interface ItemListener

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
Overrides:
getAccessibleAt in class Component.AccessibleAWTComponent
Returns:
the Accessible at the specified location, if it exists

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class Component.AccessibleAWTComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class Component.AccessibleAWTComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of items currently selected. If no items are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected item in the object. If there isn't a selection, or there are fewer items selected than the integer passed in, the return value will be null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified selected item in the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every selected item in the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTListChild

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class List.AccessibleAWTList.AccessibleAWTListChild

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.List.AccessibleAWTList.AccessibleAWTListChild
All Implemented Interfaces:
Accessible, AccessibleComponent, Serializable
Enclosing class:
List.AccessibleAWTList
protected class List.AccessibleAWTList.AccessibleAWTListChild
extends Component.AccessibleAWTComponent
implements Accessible

This class implements accessibility support for List children. It provides an implementation of the Java Accessibility API appropriate to list children user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
List.AccessibleAWTList.AccessibleAWTListChild(List parent, int indexInParent)
Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children of the object.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext for this object.
int | getAccessibleIndexInParent() Get the 0-based index of this object in its accessible parent.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
Color | getBackground() Get the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Get the Cursor of this object.
Font | getFont() Get the Font of this object.
FontMetrics | getFontMetrics(Font f) Get the FontMetrics of this object.
Color | getForeground() Get the foreground color of this object.
Locale | getLocale() Gets the locale of the component.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determine if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determine if the object is showing.
boolean | isVisible() Determine if the object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | requestFocus() Requests focus for this object.
void | setBackground(Color c) Set the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor cursor) Set the Cursor of this object.
void | setEnabled(boolean b) Set the enabled state of the object.
void | setFont(Font f) Set the Font of this object.
void | setForeground(Color c) Set the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Set the visible state of the object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addPropertyChangeListener, getAccessibleComponent, getAccessibleDescription, getAccessibleName, getAccessibleParent, removePropertyChangeListener
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

List.AccessibleAWTList.AccessibleAWTListChild

public List.AccessibleAWTList.AccessibleAWTListChild(List parent,
                                                     int indexInParent)
Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext for this object. In the implementation of the Java Accessibility API for this class, return this object, which acts as its own AccessibleContext.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object. The AccessibleStateSet of an object is composed of a set of unique AccessibleState's. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_STATE_PROPERTY property.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, Component.addPropertyChangeListener(java.beans.PropertyChangeListener)

getLocale

public Locale getLocale()
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Overrides:
getLocale in class Component.AccessibleAWTComponent
Returns:
This component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Get the 0-based index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class Component.AccessibleAWTComponent
Returns:
the 0-based index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
Component.AccessibleAWTComponent.getAccessibleParent(),
getAccessibleChildrenCount(),
getAccessibleChild(int)

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children of the object.
Overrides:
getAccessibleChildrenCount in class Component.AccessibleAWTComponent
Returns:
the number of accessible children of the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the specified Accessible child of the object. The Accessible children of an Accessible object are zero-based, so the first child of an Accessible child is at index 0, the second child is at index 1, and so on.
Overrides:
getAccessibleChild in class Component.AccessibleAWTComponent
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object
See Also:
getAccessibleChildrenCount()

getBackground

public Color getBackground()
Get the background color of this object.
Overrides:
getBackground in class Component.AccessibleAWTComponent
Returns:
the background color, if supported, of the object; otherwise, null
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(Color c)
Set the background color of this object.
Overrides:
setBackground in class Component.AccessibleAWTComponent
Parameters:
c - the new Color for the background
See Also:
setBackground(java.awt.Color)

getForeground

public Color getForeground()
Get the foreground color of this object.
Overrides:
getForeground in class Component.AccessibleAWTComponent
Returns:
the foreground color, if supported, of the object; otherwise, null
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(Color c)
Set the foreground color of this object.
Overrides:
setForeground in class Component.AccessibleAWTComponent
Parameters:
c - the new Color for the foreground
See Also:
getForeground()

getCursor

public Cursor getCursor()
Get the Cursor of this object.
Overrides:
getCursor in class Component.AccessibleAWTComponent
Returns:
the Cursor, if supported, of the object; otherwise, null
See Also:
setCursor(java.awt.Cursor)

setCursor

public void setCursor(Cursor cursor)
Set the Cursor of this object.
Overrides:
setCursor in class Component.AccessibleAWTComponent
Parameters:
c - the new Cursor for the object
See Also:
getCursor()

getFont

public Font getFont()
Get the Font of this object.
Overrides:
getFont in class Component.AccessibleAWTComponent
Returns:
the Font,if supported, for the object; otherwise, null
See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font f)
Set the Font of this object.
Overrides:
setFont in class Component.AccessibleAWTComponent
Parameters:
f - the new Font for the object
See Also:
getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Get the FontMetrics of this object.
Overrides:
getFontMetrics in class Component.AccessibleAWTComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
getFont()

isEnabled

public boolean isEnabled()
Determine if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSet.
Overrides:
isEnabled in class Component.AccessibleAWTComponent
Returns:
true if object is enabled; otherwise, false
See Also:
setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.ENABLED, AccessibleStateSet

setEnabled

public void setEnabled(boolean b)
Set the enabled state of the object.
Overrides:
setEnabled in class Component.AccessibleAWTComponent
Parameters:
b - if true, enables this object; otherwise, disables it
See Also:
isEnabled()

isVisible

public boolean isVisible()
Determine if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use isShowing().

Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSet.

Overrides:
isVisible in class Component.AccessibleAWTComponent
Returns:
true if object is visible; otherwise, false
See Also:
setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE, AccessibleStateSet

setVisible

public void setVisible(boolean b)
Set the visible state of the object.
Overrides:
setVisible in class Component.AccessibleAWTComponent
Parameters:
b - if true, shows this object; otherwise, hides it
See Also:
isVisible()

isShowing

public boolean isShowing()
Determine if the object is showing. This is determined by checking the visibility of the object and visibility of the object ancestors. Note: this will return true even if the object is obscured by another (for example, it to object is underneath a menu that was pulled down).
Overrides:
isShowing in class Component.AccessibleAWTComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Overrides:
contains in class Component.AccessibleAWTComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
See Also:
getBounds()

getLocationOnScreen

public Point getLocationOnScreen()
Returns the location of the object on the screen.
Overrides:
getLocationOnScreen in class Component.AccessibleAWTComponent
Returns:
location of object on screen; null if this object is not on the screen
See Also:
getBounds(), getLocation()

getLocation

public Point getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Overrides:
getLocation in class Component.AccessibleAWTComponent
Returns:
An instance of Point representing the top-left corner of the objects's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen
See Also:
getBounds(), getLocationOnScreen()

setLocation

public void setLocation(Point p)
Sets the location of the object relative to the parent.
Overrides:
setLocation in class Component.AccessibleAWTComponent
Parameters:
p - the new position for the top-left corner
See Also:
getLocation()

getBounds

public Rectangle getBounds()
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Overrides:
getBounds in class Component.AccessibleAWTComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Overrides:
setBounds in class Component.AccessibleAWTComponent
Parameters:
r - rectangle indicating this component's bounds
See Also:
getBounds()

getSize

public Dimension getSize()
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this objects's height, and the width field of the Dimension object contains this object's width.
Overrides:
getSize in class Component.AccessibleAWTComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Resizes this object so that it has width and height.
Overrides:
setSize in class Component.AccessibleAWTComponent
Parameters:
d - - The dimension specifying the new size of the object.
See Also:
getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Component.AccessibleAWTComponent
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSet.
Overrides:
isFocusTraversable in class Component.AccessibleAWTComponent
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
Overrides:
requestFocus in class Component.AccessibleAWTComponent
See Also:
isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.
Overrides:
addFocusListener in class Component.AccessibleAWTComponent
Parameters:
l - the focus listener
See Also:
removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.
Overrides:
removeFocusListener in class Component.AccessibleAWTComponent
Parameters:
l - the focus listener
See Also:
addFocusListener(java.awt.event.FocusListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Menu.AccessibleAWTMenu

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
              |
              +--java.awt.MenuItem.AccessibleAWTMenuItem
                    |
                    +--java.awt.Menu.AccessibleAWTMenu
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleValue, Serializable
Direct Known Subclasses:
PopupMenu.AccessibleAWTPopupMenu
Enclosing class:
Menu
protected class Menu.AccessibleAWTMenu
extends MenuItem.AccessibleAWTMenuItem

Inner class of Menu used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

This class implements accessibility support for the Menu class. It provides an implementation of the Java Accessibility API appropriate to menu user-interface elements.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Menu.AccessibleAWTMenu()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.MenuItem.AccessibleAWTMenuItem
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleName, getAccessibleValue, getCurrentAccessibleValue, getMaximumAccessibleValue, getMinimumAccessibleValue, setCurrentAccessibleValue
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Menu.AccessibleAWTMenu

protected Menu.AccessibleAWTMenu()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class MenuItem.AccessibleAWTMenuItem
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTMenuBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuBar.AccessibleAWTMenuBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
              |
              +--java.awt.MenuBar.AccessibleAWTMenuBar
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, Serializable
Enclosing class:
MenuBar
protected class MenuBar.AccessibleAWTMenuBar
extends MenuComponent.AccessibleAWTMenuComponent

Inner class of MenuBar used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

This class implements accessibility support for the MenuBar class. It provides an implementation of the Java Accessibility API appropriate to menu bar user-interface elements.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected MenuBar.AccessibleAWTMenuBar()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MenuBar.AccessibleAWTMenuBar

protected MenuBar.AccessibleAWTMenuBar()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class MenuComponent.AccessibleAWTMenuComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTMenuComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuComponent.AccessibleAWTMenuComponent

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, Serializable
Direct Known Subclasses:
MenuBar.AccessibleAWTMenuBar, MenuItem.AccessibleAWTMenuItem
Enclosing class:
MenuComponent
protected abstract class MenuComponent.AccessibleAWTMenuComponent
extends AccessibleContext
implements Serializable, AccessibleComponent, AccessibleSelection

Inner class of MenuComponent used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

The class used to obtain the accessible role for this object.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected MenuComponent.AccessibleAWTMenuComponent()
Although the class is abstract, this should be called by all sub-classes.
Method Summary
void | addAccessibleSelection(int i) Adds the specified Accessible child of the object to the object's selection.
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleComponent | getAccessibleComponent() Get the AccessibleComponent associated with this object if one exists.
String | getAccessibleDescription() Get the accessible description of this object.
int | getAccessibleIndexInParent() Get the index of this object in its accessible parent.
String | getAccessibleName() Get the accessible name of this object.
Accessible | getAccessibleParent() Get the Accessible parent of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object which allows its Accessible children to be selected.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the object.
int | getAccessibleSelectionCount() Returns the number of Accessible children currently selected.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Color | getBackground() Get the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Get the Cursor of this object.
Font | getFont() Get the Font of this object.
FontMetrics | getFontMetrics(Font f) Get the FontMetrics of this object.
Color | getForeground() Get the foreground color of this object.
Locale | getLocale() Return the locale of this object.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
boolean | isEnabled() Determine if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determine if the object is showing.
boolean | isVisible() Determine if the object is visible.
void | removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | requestFocus() Requests focus for this object.
void | selectAllAccessibleSelection() Causes every child of the object to be selected if the object supports multiple selections.
void | setBackground(Color c) Set the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor cursor) Set the Cursor of this object.
void | setEnabled(boolean b) Set the enabled state of the object.
void | setFont(Font f) Set the Font of this object.
void | setForeground(Color c) Set the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object..
void | setVisible(boolean b) Set the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MenuComponent.AccessibleAWTMenuComponent

protected MenuComponent.AccessibleAWTMenuComponent()
Although the class is abstract, this should be called by all sub-classes.
Method Detail

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object which allows its Accessible children to be selected.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
AccessibleSelection if supported by object; else return null
See Also:
AccessibleSelection

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object. This should almost never return java.awt.MenuComponent.getName(), as that generally isn't a localized name, and doesn't have meaning for the user. If the object is fundamentally a text object (e.g. a menu item), the accessible name should be the text of the object (e.g. "save"). If the object has a tooltip, the tooltip text may also be an appropriate String to return.
Overrides:
getAccessibleName in class AccessibleContext
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleDescription

public String getAccessibleDescription()
Get the accessible description of this object. This should be a concise, localized description of what this object is - what is its meaning to the user. If the object has a tooltip, the tooltip text may be an appropriate string to return, assuming it contains a concise description of the object (instead of just the name of the object - e.g. a "Save" icon on a toolbar that had "save" as the tooltip text shouldn't return the tooltip text as the description, but something like "Saves the current text document" instead).
Overrides:
getAccessibleDescription in class AccessibleContext
Returns:
the localized description of the object -- can be null if this object does not have a description
See Also:
AccessibleContext.setAccessibleDescription(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleParent

public Accessible getAccessibleParent()
Get the Accessible parent of this object. If the parent of this object implements Accessible, this method should simply return getParent().
Overrides:
getAccessibleParent in class AccessibleContext
Returns:
the Accessible parent of this object -- can be null if this object does not have an Accessible parent

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Get the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getLocale

public Locale getLocale()
Return the locale of this object.
Overrides:
getLocale in class AccessibleContext
Returns:
the locale of this object

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
the component

getBackground

public Color getBackground()
Get the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null

setBackground

public void setBackground(Color c)
Set the background color of this object. (For transparency, see isOpaque.)
Specified by:
setBackground in interface AccessibleComponent
Parameters:
c - the new Color for the background
See Also:
Component.isOpaque()

getForeground

public Color getForeground()
Get the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null

setForeground

public void setForeground(Color c)
Set the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Parameters:
c - the new Color for the foreground

getCursor

public Cursor getCursor()
Get the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null

setCursor

public void setCursor(Cursor cursor)
Set the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Parameters:
c - the new Cursor for the object

getFont

public Font getFont()
Get the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null

setFont

public void setFont(Font f)
Set the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Parameters:
f - the new Font for the object

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Get the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
getFont()

isEnabled

public boolean isEnabled()
Determine if the object is enabled.
Specified by:
isEnabled in interface AccessibleComponent
Returns:
true if object is enabled; otherwise, false

setEnabled

public void setEnabled(boolean b)
Set the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it

isVisible

public boolean isVisible()
Determine if the object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen because one of the objects that this object is contained by is not visible. To determine if an object is showing on the screen, use isShowing().
Specified by:
isVisible in interface AccessibleComponent
Returns:
true if object is visible; otherwise, false

setVisible

public void setVisible(boolean b)
Set the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it

isShowing

public boolean isShowing()
Determine if the object is showing. This is determined by checking the visibility of the object and ancestors of the object. Note: this will return true even if the object is obscured by another (for example, it happens to be underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false

getLocationOnScreen

public Point getLocationOnScreen()
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Returns:
location of object on screen -- can be null if this object is not on the screen

getLocation

public Point getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Returns:
An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen

setLocation

public void setLocation(Point p)
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.

setBounds

public void setBounds(Rectangle r)
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Parameters:
A - rectangle indicating this component's bounds

getSize

public Dimension getSize()
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen

setSize

public void setSize(Dimension d)
Resizes this object..
Specified by:
setSize in interface AccessibleComponent
Parameters:
d - - The dimension specifying the new size of the object.

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Parameters:
p - The point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null

isFocusTraversable

public boolean isFocusTraversable()
Returns whether this object can accept focus or not.
Specified by:
isFocusTraversable in interface AccessibleComponent
Returns:
true if object can accept focus; otherwise false

requestFocus

public void requestFocus()
Requests focus for this object.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Parameters:
l - the focus listener

removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Parameters:
l - the focus listener

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected child in the object. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null.

Note that the index represents the i-th selected child, which is different from the i-th child.

Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
Returns:
true if the current child of this object is selected; else false.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified Accessible child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuItem.AccessibleAWTMenuItem

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
              |
              +--java.awt.MenuItem.AccessibleAWTMenuItem
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleValue, Serializable
Direct Known Subclasses:
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem, Menu.AccessibleAWTMenu
Enclosing class:
MenuItem
protected class MenuItem.AccessibleAWTMenuItem
extends MenuComponent.AccessibleAWTMenuComponent
implements AccessibleAction, AccessibleValue

Inner class of MenuItem used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

This class implements accessibility support for the MenuItem class. It provides an implementation of the Java Accessibility API appropriate to menu item user-interface elements.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected MenuItem.AccessibleAWTMenuItem()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
String | getAccessibleName() Get the accessible name of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MenuItem.AccessibleAWTMenuItem

protected MenuItem.AccessibleAWTMenuItem()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class MenuComponent.AccessibleAWTMenuComponent
Returns:
the localized name of the object -- can be null if this object does not have a name

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class MenuComponent.AccessibleAWTMenuComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. The default behavior of a menu item is to have one action.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
1, the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the action was performed; otherwise false.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0 if this isn't selected or an Integer of 1 if this is selected.
See Also:
AbstractButton#isSelected

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTPanel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Panel.AccessibleAWTPanel

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Panel.AccessibleAWTPanel
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
Applet.AccessibleApplet
Enclosing class:
Panel
protected class Panel.AccessibleAWTPanel
extends Container.AccessibleAWTContainer

This class implements accessibility support for the Panel class. It provides an implementation of the Java Accessibility API appropriate to panel user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Panel.AccessibleAWTPanel()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Panel.AccessibleAWTPanel

protected Panel.AccessibleAWTPanel()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTPopupMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PopupMenu.AccessibleAWTPopupMenu

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.MenuComponent.AccessibleAWTMenuComponent
              |
              +--java.awt.MenuItem.AccessibleAWTMenuItem
                    |
                    +--java.awt.Menu.AccessibleAWTMenu
                          |
                          +--java.awt.PopupMenu.AccessibleAWTPopupMenu
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleValue, Serializable
Enclosing class:
PopupMenu
protected class PopupMenu.AccessibleAWTPopupMenu
extends Menu.AccessibleAWTMenu

Inner class of PopupMenu used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by menu component developers.

This class implements accessibility support for the PopupMenu class. It provides an implementation of the Java Accessibility API appropriate to popup menu user-interface elements.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected PopupMenu.AccessibleAWTPopupMenu()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.MenuItem.AccessibleAWTMenuItem
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleName, getAccessibleValue, getCurrentAccessibleValue, getMaximumAccessibleValue, getMinimumAccessibleValue, setCurrentAccessibleValue
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PopupMenu.AccessibleAWTPopupMenu

protected PopupMenu.AccessibleAWTPopupMenu()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Menu.AccessibleAWTMenu
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTScrollBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Scrollbar.AccessibleAWTScrollBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Scrollbar.AccessibleAWTScrollBar
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
Scrollbar
protected class Scrollbar.AccessibleAWTScrollBar
extends Component.AccessibleAWTComponent
implements AccessibleValue

This class implements accessibility support for the Scrollbar class. It provides an implementation of the Java Accessibility API appropriate to scrollbar user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Scrollbar.AccessibleAWTScrollBar()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the accessible value of this object.
Number | getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | getMinimumAccessibleValue() Get the minimum accessible value of this object.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Scrollbar.AccessibleAWTScrollBar

protected Scrollbar.AccessibleAWTScrollBar()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the accessible value of this object.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
The current value of this object.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum accessible value of this object.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
The minimum value of this object.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum accessible value of this object.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
The maximum value of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTScrollPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class ScrollPane.AccessibleAWTScrollPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.ScrollPane.AccessibleAWTScrollPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
ScrollPane
protected class ScrollPane.AccessibleAWTScrollPane
extends Container.AccessibleAWTContainer

This class implements accessibility support for the ScrollPane class. It provides an implementation of the Java Accessibility API appropriate to scroll pane user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected ScrollPane.AccessibleAWTScrollPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScrollPane.AccessibleAWTScrollPane

protected ScrollPane.AccessibleAWTScrollPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTTextArea

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextArea.AccessibleAWTTextArea

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.TextComponent.AccessibleAWTTextComponent
                    |
                    +--java.awt.TextArea.AccessibleAWTTextArea
All Implemented Interfaces:
AccessibleComponent, AccessibleText, EventListener, Serializable, TextListener
Enclosing class:
TextArea
protected class TextArea.AccessibleAWTTextArea
extends TextComponent.AccessibleAWTTextComponent

This class implements accessibility support for the TextArea class. It provides an implementation of the Java Accessibility API appropriate to text area user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected TextArea.AccessibleAWTTextArea()
Method Summary
 AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Methods inherited from class java.awt.TextComponent.AccessibleAWTTextComponent
getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, textValueChanged
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextArea.AccessibleAWTTextArea

protected TextArea.AccessibleAWTTextArea()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class TextComponent.AccessibleAWTTextComponent
Returns:
an instance of AccessibleStateSet describing the states of the object
See Also:
AccessibleStateSet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTTextComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextComponent.AccessibleAWTTextComponent

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.TextComponent.AccessibleAWTTextComponent
All Implemented Interfaces:
AccessibleComponent, AccessibleText, EventListener, Serializable, TextListener
Direct Known Subclasses:
TextArea.AccessibleAWTTextArea, TextField.AccessibleAWTTextField
Enclosing class:
TextComponent
protected class TextComponent.AccessibleAWTTextComponent
extends Component.AccessibleAWTComponent
implements AccessibleText, TextListener

This class implements accessibility support for the TextComponent class. It provides an implementation of the Java Accessibility API appropriate to text component user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
TextComponent.AccessibleAWTTextComponent()
Constructs an AccessibleAWTTextComponent.
Method Summary
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of the TextComponent.
AccessibleText | getAccessibleText() Get the AccessibleText associated with this object.
String | getAfterIndex(int part, int index) Returns the String after a given index.
String | getAtIndex(int part, int index) Returns the String at a given index.
String | getBeforeIndex(int part, int index) Returns the String before a given index.
int | getCaretPosition() Returns the zero-based offset of the caret.
AttributeSet | getCharacterAttribute(int i) Returns the AttributeSet for a given character (at a given index).
Rectangle | getCharacterBounds(int i) Determines the bounding box of the character at the given index into the string.
int | getCharCount() Returns the number of characters (valid indicies)
int | getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
String | getSelectedText() Returns the portion of the text that is selected.
int | getSelectionEnd() Returns the end offset within the selected text.
int | getSelectionStart() Returns the start offset within the selected text.
void | textValueChanged(TextEvent textEvent) TextListener notification of a text value change.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextComponent.AccessibleAWTTextComponent

public TextComponent.AccessibleAWTTextComponent()
Constructs an AccessibleAWTTextComponent. Adds a listener to track caret change.
Method Detail

textValueChanged

public void textValueChanged(TextEvent textEvent)
TextListener notification of a text value change.
Specified by:
textValueChanged in interface TextListener

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of the TextComponent. The AccessibleStateSet of an object is composed of a set of unique AccessibleStates. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the AccessibleContext.ACCESSIBLE_STATE_PROPERTY property.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, Component.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object (AccessibleRole.TEXT)
See Also:
AccessibleRole

getAccessibleText

public AccessibleText getAccessibleText()
Get the AccessibleText associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleText interface on behalf of itself.
Overrides:
getAccessibleText in class AccessibleContext
Returns:
this object

getIndexAtPoint

public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point. If the point is invalid, this method returns -1.
Specified by:
getIndexAtPoint in interface AccessibleText
Parameters:
p - the Point in local coordinates
Returns:
the zero-based index of the character under Point p.

getCharacterBounds

public Rectangle getCharacterBounds(int i)
Determines the bounding box of the character at the given index into the string. The bounds are returned in local coordinates. If the index is invalid a null rectangle is returned.
Specified by:
getCharacterBounds in interface AccessibleText
Parameters:
i - the index into the String >= 0
Returns:
the screen coordinates of the character's bounding box

getCharCount

public int getCharCount()
Returns the number of characters (valid indicies)
Specified by:
getCharCount in interface AccessibleText
Returns:
the number of characters >= 0

getCaretPosition

public int getCaretPosition()
Returns the zero-based offset of the caret. Note: The character to the right of the caret will have the same index value as the offset (the caret is between two characters).
Specified by:
getCaretPosition in interface AccessibleText
Returns:
the zero-based offset of the caret.

getCharacterAttribute

public AttributeSet getCharacterAttribute(int i)
Returns the AttributeSet for a given character (at a given index).
Specified by:
getCharacterAttribute in interface AccessibleText
Parameters:
i - the zero-based index into the text
Returns:
the AttributeSet of the character

getSelectionStart

public int getSelectionStart()
Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.
Specified by:
getSelectionStart in interface AccessibleText
Returns:
the index into the text of the start of the selection >= 0

getSelectionEnd

public int getSelectionEnd()
Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.
Specified by:
getSelectionEnd in interface AccessibleText
Returns:
the index into teh text of the end of the selection >= 0

getSelectedText

public String getSelectedText()
Returns the portion of the text that is selected.
Specified by:
getSelectedText in interface AccessibleText
Returns:
the text, null if no selection

getAtIndex

public String getAtIndex(int part,
                         int index)
Returns the String at a given index.
Specified by:
getAtIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getAfterIndex

public String getAfterIndex(int part,
                            int index)
Returns the String after a given index.
Specified by:
getAfterIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getBeforeIndex

public String getBeforeIndex(int part,
                             int index)
Returns the String before a given index.
Specified by:
getBeforeIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTTextField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextField.AccessibleAWTTextField

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.TextComponent.AccessibleAWTTextComponent
                    |
                    +--java.awt.TextField.AccessibleAWTTextField
All Implemented Interfaces:
AccessibleComponent, AccessibleText, EventListener, Serializable, TextListener
Enclosing class:
TextField
protected class TextField.AccessibleAWTTextField
extends TextComponent.AccessibleAWTTextComponent

This class implements accessibility support for the TextField class. It provides an implementation of the Java Accessibility API appropriate to text field user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected TextField.AccessibleAWTTextField()
Method Summary
 AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Methods inherited from class java.awt.TextComponent.AccessibleAWTTextComponent
getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, textValueChanged
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextField.AccessibleAWTTextField

protected TextField.AccessibleAWTTextField()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class TextComponent.AccessibleAWTTextComponent
Returns:
an instance of AccessibleStateSet describing the states of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAWTWindow

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Window.AccessibleAWTWindow

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
Dialog.AccessibleAWTDialog, Frame.AccessibleAWTFrame, JWindow.AccessibleJWindow
Enclosing class:
Window
protected class Window.AccessibleAWTWindow
extends Container.AccessibleAWTContainer

This class implements accessibility support for the Window class. It provides an implementation of the Java Accessibility API appropriate to window user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Window.AccessibleAWTWindow()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Window.AccessibleAWTWindow

protected Window.AccessibleAWTWindow()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessibleContainerHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Container.AccessibleAWTContainer.AccessibleContainerHandler

java.lang.Object
  |
  +--java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler
All Implemented Interfaces:
ContainerListener, EventListener
Enclosing class:
Container.AccessibleAWTContainer
protected class Container.AccessibleAWTContainer.AccessibleContainerHandler
extends Object
implements ContainerListener

Fire PropertyChange listener, if one is registered, when children added/removed.

Constructor Summary
protected Container.AccessibleAWTContainer.AccessibleContainerHandler()
Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Container.AccessibleAWTContainer.AccessibleContainerHandler

protected Container.AccessibleAWTContainer.AccessibleContainerHandler()
Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface ContainerListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActiveEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface ActiveEvent

All Known Implementing Classes:
InvocationEvent
public interface ActiveEvent

An interface for events that know how dispatch themselves. By implementing this interface an event can be placed upon the event queue and its dispatch() method will be called when the event is dispatched, using the EventDispatchThread.

This is a very useful mechanism for avoiding deadlocks. If a thread is executing in a critical section (i.e., it has entered one or more monitors), calling other synchronized code may cause deadlocks. To avoid the potential deadlocks, an ActiveEvent can be created to run the second section of code at later time. If there is contention on the monitor, the second thread will simply block until the first thread has finished its work and exited its monitors.

For security reasons, it is often desirable to use an ActiveEvent to avoid calling untrusted code from a critical thread. For instance, peer implementations can use this facility to avoid making calls into user code from a system thread. Doing so avoids potential deadlocks and denial-of-service attacks.

Since:
1.2

Method Summary
 void dispatch()
Dispatch the event to it's target, listeners of the events source, or do whatever it is this event is supposed to do.

Method Detail

dispatch

public void dispatch()
Dispatch the event to it's target, listeners of the events source, or do whatever it is this event is supposed to do.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Adjustable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Adjustable

All Known Implementing Classes:
Scrollbar, JScrollBar
public interface Adjustable

The interface for objects which have an adjustable numeric value contained within a bounded range of values.

Field Summary
static int | HORIZONTAL The horizontal orientation.
static int | VERTICAL The vertical orientation.
Method Summary
void | addAdjustmentListener(AdjustmentListener l) Add a listener to recieve adjustment events when the value of the adjustable object changes.
int | getBlockIncrement() Gets the block value increment for the adjustable object.
int | getMaximum() Gets the maximum value of the adjustable object.
int | getMinimum() Gets the minimum value of the adjustable object.
int | getOrientation() Gets the orientation of the adjustable object.
int | getUnitIncrement() Gets the unit value increment for the adjustable object.
int | getValue() Gets the current value of the adjustable object.
int | getVisibleAmount() Gets the length of the propertional indicator.
void | removeAdjustmentListener(AdjustmentListener l) Removes an adjustment listener.
void | setBlockIncrement(int b) Sets the block value increment for the adjustable object.
void | setMaximum(int max) Sets the maximum value of the adjustable object.
void | setMinimum(int min) Sets the minimum value of the adjustable object.
void | setUnitIncrement(int u) Sets the unit value increment for the adjustable object.
void | setValue(int v) Sets the current value of the adjustable object.
void | setVisibleAmount(int v) Sets the length of the proportionl indicator of the adjustable object.

Field Detail

HORIZONTAL

public static final int HORIZONTAL
The horizontal orientation.

VERTICAL

public static final int VERTICAL
The vertical orientation.
Method Detail

getOrientation

public int getOrientation()
Gets the orientation of the adjustable object.

setMinimum

public void setMinimum(int min)
Sets the minimum value of the adjustable object.
Parameters:
min - the minimum value

getMinimum

public int getMinimum()
Gets the minimum value of the adjustable object.

setMaximum

public void setMaximum(int max)
Sets the maximum value of the adjustable object.
Parameters:
max - the maximum value

getMaximum

public int getMaximum()
Gets the maximum value of the adjustable object.

setUnitIncrement

public void setUnitIncrement(int u)
Sets the unit value increment for the adjustable object.
Parameters:
u - the unit increment

getUnitIncrement

public int getUnitIncrement()
Gets the unit value increment for the adjustable object.

setBlockIncrement

public void setBlockIncrement(int b)
Sets the block value increment for the adjustable object.
Parameters:
b - the block increment

getBlockIncrement

public int getBlockIncrement()
Gets the block value increment for the adjustable object.

setVisibleAmount

public void setVisibleAmount(int v)
Sets the length of the proportionl indicator of the adjustable object.
Parameters:
v - the length of the indicator

getVisibleAmount

public int getVisibleAmount()
Gets the length of the propertional indicator.

setValue

public void setValue(int v)
Sets the current value of the adjustable object. This value must be within the range defined by the minimum and maximum values for this object.
Parameters:
v - the current value

getValue

public int getValue()
Gets the current value of the adjustable object.

addAdjustmentListener

public void addAdjustmentListener(AdjustmentListener l)
Add a listener to recieve adjustment events when the value of the adjustable object changes.
Parameters:
l - the listener to recieve events
See Also:
AdjustmentEvent

removeAdjustmentListener

public void removeAdjustmentListener(AdjustmentListener l)
Removes an adjustment listener.
Parameters:
l - the listener being removed
See Also:
AdjustmentEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlphaComposite

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AlphaComposite

java.lang.Object
  |
  +--java.awt.AlphaComposite
All Implemented Interfaces:
Composite
public final class AlphaComposite
extends Object
implements Composite

This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images. The rules implemented by this class are a subset of the Porter-Duff rules described in T. Porter and T. Duff, "Compositing Digital Images", SIGGRAPH 84, 253-259.

If any input does not have an alpha channel, an alpha value of 1.0, which is completely opaque, is assumed for all pixels. A constant alpha value can also be specified to be multiplied with the alpha value of the source pixels.

The following abbreviations are used in the description of the rules:

  • Cs = one of the color components of the source pixel.
  • Cd = one of the color components of the destination pixel.
  • As = alpha component of the source pixel.
  • Ad = alpha component of the destination pixel.
  • Fs = fraction of the source pixel that contributes to the output.
  • Fd = fraction of the input destination pixel that contributes to the output.

The color and alpha components produced by the compositing operation are calculated as follows:

     Cd = Cs*Fs + Cd*Fd
     Ad = As*Fs + Ad*Fd
where Fs and Fd are specified by each rule. The above equations assume that both source and destination pixels have the color components premultiplied by the alpha component. Similarly, the equations expressed in the definitions of compositing rules below assume premultiplied alpha.

For performance reasons, it is preferrable that Rasters passed to the compose method of a CompositeContext object created by the AlphaComposite class have premultiplied data. If either source or destination Rasters are not premultiplied, however, appropriate conversions are performed before and after the compositing operation.

The alpha resulting from the compositing operation is stored in the destination if the destination has an alpha channel. Otherwise, the resulting color is divided by the resulting alpha before being stored in the destination and the alpha is discarded. If the alpha value is 0.0, the color values are set to 0.0.

See Also:
Composite, CompositeContext

Field Summary
static AlphaComposite | Clear AlphaComposite object that implements the opaque CLEAR rule with an alpha of 1.0f.
static int | CLEAR Porter-Duff Clear rule.
static int | DST_IN Porter-Duff Destination In Source rule.
static int | DST_OUT Porter-Duff Destination Held Out By Source rule.
static int | DST_OVER Porter-Duff Destination Over Source rule.
static AlphaComposite | DstIn AlphaComposite object that implements the opaque DST_IN rule with an alpha of 1.0f.
static AlphaComposite | DstOut AlphaComposite object that implements the opaque DST_OUT rule with an alpha of 1.0f.
static AlphaComposite | DstOver AlphaComposite object that implements the opaque DST_OVER rule with an alpha of 1.0f.
static AlphaComposite | Src AlphaComposite object that implements the opaque SRC rule with an alpha of 1.0f.
static int | SRC Porter-Duff Source rule.
static int | SRC_IN Porter-Duff Source In Destination rule.
static int | SRC_OUT Porter-Duff Source Held Out By Destination rule.
static int | SRC_OVER Porter-Duff Source Over Destination rule.
static AlphaComposite | SrcIn AlphaComposite object that implements the opaque SRC_IN rule with an alpha of 1.0f.
static AlphaComposite | SrcOut AlphaComposite object that implements the opaque SRC_OUT rule with an alpha of 1.0f.
static AlphaComposite | SrcOver AlphaComposite object that implements the opaque SRC_OVER rule with an alpha of 1.0f.
Method Summary
CompositeContext | createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context for the compositing operation.
boolean | equals(Object obj) Tests if the specified Object is equal to this AlphaComposite object.
float | getAlpha() Returns the alpha value of thisAlphaComposite.
static AlphaComposite | getInstance(int rule) Creates an AlphaComposite object with the specified rule.
static AlphaComposite | getInstance(int rule, float alpha) Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source.
int | getRule() Returns the compositing rule of this AlphaComposite.
int | hashCode() Returns the hashcode for this composite.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

CLEAR

public static final int CLEAR
Porter-Duff Clear rule. Both the color and the alpha of the destination are cleared. Neither the source nor the destination is used as input.

Fs = 0 and Fd = 0, thus:

     Cd = 0
     Ad = 0

SRC

public static final int SRC
Porter-Duff Source rule. The source is copied to the destination. The destination is not used as input.

Fs = 1 and Fd = 0, thus:

     Cd = Cs
     Ad = As

SRC_OVER

public static final int SRC_OVER
Porter-Duff Source Over Destination rule. The source is composited over the destination.

Fs = 1 and Fd = (1-As), thus:

     Cd = Cs + Cd*(1-As)
     Ad = As + Ad*(1-As)

DST_OVER

public static final int DST_OVER
Porter-Duff Destination Over Source rule. The destination is composited over the source and the result replaces the destination.

Fs = (1-Ad) and Fd = 1, thus:

     Cd = Cs*(1-Ad) + Cd
     Ad = As*(1-Ad) + Ad

SRC_IN

public static final int SRC_IN
Porter-Duff Source In Destination rule. The part of the source lying inside of the destination replaces the destination.

Fs = Ad and Fd = 0, thus:

     Cd = Cs*Ad
     Ad = As*Ad

DST_IN

public static final int DST_IN
Porter-Duff Destination In Source rule. The part of the destination lying inside of the source replaces the destination.

Fs = 0 and Fd = As, thus:

     Cd = Cd*As
     Ad = Ad*As

SRC_OUT

public static final int SRC_OUT
Porter-Duff Source Held Out By Destination rule. The part of the source lying outside of the destination replaces the destination.

Fs = (1-Ad) and Fd = 0, thus:

     Cd = Cs*(1-Ad)
     Ad = As*(1-Ad)

DST_OUT

public static final int DST_OUT
Porter-Duff Destination Held Out By Source rule. The part of the destination lying outside of the source replaces the destination.

Fs = 0 and Fd = (1-As), thus:

     Cd = Cd*(1-As)
     Ad = Ad*(1-As)

Clear

public static final AlphaComposite Clear
AlphaComposite object that implements the opaque CLEAR rule with an alpha of 1.0f.
See Also:
CLEAR

Src

public static final AlphaComposite Src
AlphaComposite object that implements the opaque SRC rule with an alpha of 1.0f.
See Also:
SRC

SrcOver

public static final AlphaComposite SrcOver
AlphaComposite object that implements the opaque SRC_OVER rule with an alpha of 1.0f.
See Also:
SRC_OVER

DstOver

public static final AlphaComposite DstOver
AlphaComposite object that implements the opaque DST_OVER rule with an alpha of 1.0f.
See Also:
DST_OVER

SrcIn

public static final AlphaComposite SrcIn
AlphaComposite object that implements the opaque SRC_IN rule with an alpha of 1.0f.
See Also:
SRC_IN

DstIn

public static final AlphaComposite DstIn
AlphaComposite object that implements the opaque DST_IN rule with an alpha of 1.0f.
See Also:
DST_IN

SrcOut

public static final AlphaComposite SrcOut
AlphaComposite object that implements the opaque SRC_OUT rule with an alpha of 1.0f.
See Also:
SRC_OUT

DstOut

public static final AlphaComposite DstOut
AlphaComposite object that implements the opaque DST_OUT rule with an alpha of 1.0f.
See Also:
DST_OUT
Method Detail

getInstance

public static AlphaComposite getInstance(int rule)
Creates an AlphaComposite object with the specified rule.
Parameters:
rule - the compositing rule
Throws:
IllegalArgumentException - if rule is not one of the following: CLEAR, SRC, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, or DST_OUT

getInstance

public static AlphaComposite getInstance(int rule,
                                         float alpha)
Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source. The source is multiplied with the specified alpha before being composited with the destination.
Parameters:
rule - the compositing rule
alpha - the constant alpha to be multiplied with the alpha of the source. alpha must be a floating point number in the inclusive range [0.0, 1.0].

createContext

public CompositeContext createContext(ColorModel srcColorModel,
                                      ColorModel dstColorModel,
                                      RenderingHints hints)
Creates a context for the compositing operation. The context contains state that is used in performing the compositing operation.
Specified by:
createContext in interface Composite
Parameters:
srcColorModel - the ColorModel of the source
dstColorModel - the ColorModel of the destination
Returns:
the CompositeContext object to be used to perform compositing operations.

getAlpha

public float getAlpha()
Returns the alpha value of thisAlphaComposite. If this AlphaComposite does not have an alpha value, 1.0 is returned.
Returns:
the alpha value of this AlphaComposite.

getRule

public int getRule()
Returns the compositing rule of this AlphaComposite.
Returns:
the compositing rule of this AlphaComposite.

hashCode

public int hashCode()
Returns the hashcode for this composite.
Overrides:
hashCode in class Object
Returns:
a hash code for this composite.

equals

public boolean equals(Object obj)
Tests if the specified Object is equal to this AlphaComposite object.
Overrides:
equals in class Object
Parameters:
obj - the Object to test for equality
Returns:
true if obj equals this AlphaComposite; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AWTError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AWTError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.awt.AWTError
All Implemented Interfaces:
Serializable
public class AWTError
extends Error

Thrown when a serious Abstract Window Toolkit error has occurred.

See Also:
Serialized Form

Constructor Summary
AWTError(String msg)
Constructs an instance of AWTError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AWTError

public AWTError(String msg)
Constructs an instance of AWTError with the specified detail message.
Parameters:
msg - the detail message.
Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AWTEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AWTEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ActionEvent, AdjustmentEvent, AncestorEvent, ComponentEvent, HierarchyEvent, InputMethodEvent, InternalFrameEvent, InvocationEvent, ItemEvent, TextEvent
public abstract class AWTEvent
extends EventObject

The root event class for all AWT events. This class and its subclasses supercede the original java.awt.Event class. Subclasses of this root AWTEvent class defined outside of the java.awt.event package should define event ID values greater than the value defined by RESERVED_ID_MAX.

The event masks defined in this class are needed by Component subclasses which are using Component.enableEvents() to select for event types not selected by registered listeners. If a listener is registered on a component, the appropriate event mask is already set internally by the component.

The masks are also used to specify to which types of events an AWTEventListener should listen. The masks are bitwise-ORed together and passed to Toolkit.addAWTEventListener.

Since:
1.1
See Also:
Component.enableEvents(long), Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long), ActionEvent, AdjustmentEvent, ComponentEvent, ContainerEvent, FocusEvent, InputMethodEvent, InvocationEvent, ItemEvent, HierarchyEvent, KeyEvent, MouseEvent, PaintEvent, TextEvent, WindowEvent, Serialized Form

Field Summary
static long | ACTION_EVENT_MASK The event mask for selecting action events.
static long | ADJUSTMENT_EVENT_MASK The event mask for selecting adjustment events.
static long | COMPONENT_EVENT_MASK The event mask for selecting component events.
protected boolean | consumed
static long | CONTAINER_EVENT_MASK The event mask for selecting container events.
static long | FOCUS_EVENT_MASK The event mask for selecting focus events.
static long | HIERARCHY_BOUNDS_EVENT_MASK The event mask for selecting hierarchy bounds events.
static long | HIERARCHY_EVENT_MASK The event mask for selecting hierarchy events.
protected int | id
static long | INPUT_METHOD_EVENT_MASK The event mask for selecting input method events.
static long | INVOCATION_EVENT_MASK The event mask for selecting invocation events.
static long | ITEM_EVENT_MASK The event mask for selecting item events.
static long | KEY_EVENT_MASK The event mask for selecting key events.
static long | MOUSE_EVENT_MASK The event mask for selecting mouse events.
static long | MOUSE_MOTION_EVENT_MASK The event mask for selecting mouse motion events.
static long | PAINT_EVENT_MASK The event mask for selecting paint events.
static int | RESERVED_ID_MAX The maximum value for reserved AWT event IDs.
static long | TEXT_EVENT_MASK The event mask for selecting text events.
static long | WINDOW_EVENT_MASK The event mask for selecting window events.
Fields inherited from class java.util.EventObject
source
Constructor Summary
AWTEvent(Event event)
Constructs an AWTEvent object from the parameters of a 1.0-style event.
AWTEvent(Object source, int id)
Constructs an AWTEvent object with the specified source object and type.
Method Summary
protected void | consume()
protected void | finalize() Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
int | getID() Returns the event type.
protected boolean | isConsumed()
String | paramString() Returns a string representing the state of this event.
String | toString() Returns a String representation of this EventObject.
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

id

protected int id

consumed

protected boolean consumed

COMPONENT_EVENT_MASK

public static final long COMPONENT_EVENT_MASK
The event mask for selecting component events.

CONTAINER_EVENT_MASK

public static final long CONTAINER_EVENT_MASK
The event mask for selecting container events.

FOCUS_EVENT_MASK

public static final long FOCUS_EVENT_MASK
The event mask for selecting focus events.

KEY_EVENT_MASK

public static final long KEY_EVENT_MASK
The event mask for selecting key events.

MOUSE_EVENT_MASK

public static final long MOUSE_EVENT_MASK
The event mask for selecting mouse events.

MOUSE_MOTION_EVENT_MASK

public static final long MOUSE_MOTION_EVENT_MASK
The event mask for selecting mouse motion events.

WINDOW_EVENT_MASK

public static final long WINDOW_EVENT_MASK
The event mask for selecting window events.

ACTION_EVENT_MASK

public static final long ACTION_EVENT_MASK
The event mask for selecting action events.

ADJUSTMENT_EVENT_MASK

public static final long ADJUSTMENT_EVENT_MASK
The event mask for selecting adjustment events.

ITEM_EVENT_MASK

public static final long ITEM_EVENT_MASK
The event mask for selecting item events.

TEXT_EVENT_MASK

public static final long TEXT_EVENT_MASK
The event mask for selecting text events.

INPUT_METHOD_EVENT_MASK

public static final long INPUT_METHOD_EVENT_MASK
The event mask for selecting input method events.

PAINT_EVENT_MASK

public static final long PAINT_EVENT_MASK
The event mask for selecting paint events.

INVOCATION_EVENT_MASK

public static final long INVOCATION_EVENT_MASK
The event mask for selecting invocation events.

HIERARCHY_EVENT_MASK

public static final long HIERARCHY_EVENT_MASK
The event mask for selecting hierarchy events.

HIERARCHY_BOUNDS_EVENT_MASK

public static final long HIERARCHY_BOUNDS_EVENT_MASK
The event mask for selecting hierarchy bounds events.

RESERVED_ID_MAX

public static final int RESERVED_ID_MAX
The maximum value for reserved AWT event IDs. Programs defining their own event IDs should use IDs greater than this value.
Constructor Detail

AWTEvent

public AWTEvent(Event event)
Constructs an AWTEvent object from the parameters of a 1.0-style event.
Parameters:
event - the old-style event

AWTEvent

public AWTEvent(Object source,
                int id)
Constructs an AWTEvent object with the specified source object and type.
Parameters:
source - the object where the event originated
Method Detail

getID

public int getID()
Returns the event type.

toString

public String toString()
Description copied from class: EventObject
Returns a String representation of this EventObject.
Overrides:
toString in class EventObject
Following copied from class: java.util.EventObject
Returns:
A a String representation of this EventObject.

paramString

public String paramString()
Returns a string representing the state of this event. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Returns:
a string representation of this event.

consume

protected void consume()

isConsumed

protected boolean isConsumed()

finalize

protected void finalize()
                 throws Throwable
Description copied from class: Object
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

The general contract of finalize is that it is invoked if and when the JavaTM virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AWTEventMulticaster

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AWTEventMulticaster

java.lang.Object
  |
  +--java.awt.AWTEventMulticaster
All Implemented Interfaces:
ActionListener, AdjustmentListener, ComponentListener, ContainerListener, EventListener, FocusListener, HierarchyBoundsListener, HierarchyListener, InputMethodListener, ItemListener, KeyListener, MouseListener, MouseMotionListener, TextListener, WindowListener
public class AWTEventMulticaster
extends Object
implements ComponentListener, ContainerListener, FocusListener, KeyListener, MouseListener, MouseMotionListener, WindowListener, ActionListener, ItemListener, AdjustmentListener, TextListener, InputMethodListener, HierarchyListener, HierarchyBoundsListener

A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package. This class will manage an immutable structure consisting of a chain of event listeners and will dispatch events to those listeners. Because the structure is immutable, it is safe to use this API to add/remove listeners during the process of an event dispatch operation. An example of how this class could be used to implement a new component which fires "action" events:

 public myComponent extends Component {
     ActionListener actionListener = null;

     public synchronized void addActionListener(ActionListener l) {
       actionListener = AWTEventMulticaster.add(actionListener, l);
     }
     public synchronized void removeActionListener(ActionListener l) {
         actionListener = AWTEventMulticaster.remove(actionListener, l);
     }
     public void processEvent(AWTEvent e) {
         // when event occurs which causes "action" semantic
         if (actionListener != null) {
             actionListener.actionPerformed(new ActionEvent());
         }
 }

Since:
1.1

Field Summary
protected EventListener | a
protected EventListener | b
Constructor Summary
protected AWTEventMulticaster(EventListener a, EventListener b)
Creates an event multicaster instance which chains listener-a with listener-b.
Method Summary
void | actionPerformed(ActionEvent e) Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
static ActionListener | add(ActionListener a, ActionListener b) Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
static AdjustmentListener | add(AdjustmentListener a, AdjustmentListener b) Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
static ComponentListener | add(ComponentListener a, ComponentListener b) Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
static ContainerListener | add(ContainerListener a, ContainerListener b) Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
static FocusListener | add(FocusListener a, FocusListener b) Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
static HierarchyBoundsListener | add(HierarchyBoundsListener a, HierarchyBoundsListener b) Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
static HierarchyListener | add(HierarchyListener a, HierarchyListener b) Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
static InputMethodListener | add(InputMethodListener a, InputMethodListener b) Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
static ItemListener | add(ItemListener a, ItemListener b) Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
static KeyListener | add(KeyListener a, KeyListener b) Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
static MouseListener | add(MouseListener a, MouseListener b) Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
static MouseMotionListener | add(MouseMotionListener a, MouseMotionListener b) Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
static TextListener | add(TextListener a, TextListener b)
static WindowListener | add(WindowListener a, WindowListener b) Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
protected static EventListener | addInternal(EventListener a, EventListener b) Returns the resulting multicast listener from adding listener-a and listener-b together.
void | adjustmentValueChanged(AdjustmentEvent e) Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.
void | ancestorMoved(HierarchyEvent e) Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.
void | ancestorResized(HierarchyEvent e) Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.
void | caretPositionChanged(InputMethodEvent e) Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.
void | componentAdded(ContainerEvent e) Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
void | componentHidden(ComponentEvent e) Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
void | componentMoved(ComponentEvent e) Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
void | componentRemoved(ContainerEvent e) Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
void | componentResized(ComponentEvent e) Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
void | componentShown(ComponentEvent e) Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
void | focusGained(FocusEvent e) Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
void | focusLost(FocusEvent e) Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
void | hierarchyChanged(HierarchyEvent e) Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.
void | inputMethodTextChanged(InputMethodEvent e) Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.
void | itemStateChanged(ItemEvent e) Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
void | keyPressed(KeyEvent e) Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
void | keyReleased(KeyEvent e) Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.
void | keyTyped(KeyEvent e) Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
void | mouseClicked(MouseEvent e) Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
void | mouseDragged(MouseEvent e) Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
void | mouseEntered(MouseEvent e) Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
void | mouseExited(MouseEvent e) Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
void | mouseMoved(MouseEvent e) Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
void | mousePressed(MouseEvent e) Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
void | mouseReleased(MouseEvent e) Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
static ActionListener | remove(ActionListener l, ActionListener oldl) Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
static AdjustmentListener | remove(AdjustmentListener l, AdjustmentListener oldl) Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
static ComponentListener | remove(ComponentListener l, ComponentListener oldl) Removes the old component-listener from component-listener-l and returns the resulting multicast listener.
static ContainerListener | remove(ContainerListener l, ContainerListener oldl) Removes the old container-listener from container-listener-l and returns the resulting multicast listener.
protected EventListener | remove(EventListener oldl) Removes a listener from this multicaster and returns the resulting multicast listener.
static FocusListener | remove(FocusListener l, FocusListener oldl) Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
static HierarchyBoundsListener | remove(HierarchyBoundsListener l, HierarchyBoundsListener oldl) Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.
static HierarchyListener | remove(HierarchyListener l, HierarchyListener oldl) Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.
static InputMethodListener | remove(InputMethodListener l, InputMethodListener oldl) Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.
static ItemListener | remove(ItemListener l, ItemListener oldl) Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
static KeyListener | remove(KeyListener l, KeyListener oldl) Removes the old key-listener from key-listener-l and returns the resulting multicast listener.
static MouseListener | remove(MouseListener l, MouseListener oldl) Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.
static MouseMotionListener | remove(MouseMotionListener l, MouseMotionListener oldl) Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.
static TextListener | remove(TextListener l, TextListener oldl)
static WindowListener | remove(WindowListener l, WindowListener oldl) Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
protected static EventListener | removeInternal(EventListener l, EventListener oldl) Returns the resulting multicast listener after removing the old listener from listener-l.
protected static void | save(ObjectOutputStream s, String k, EventListener l)
protected void | saveInternal(ObjectOutputStream s, String k)
void | textValueChanged(TextEvent e) Invoked when the value of the text has changed.
void | windowActivated(WindowEvent e) Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
void | windowClosed(WindowEvent e) Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
void | windowClosing(WindowEvent e) Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
void | windowDeactivated(WindowEvent e) Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
void | windowDeiconified(WindowEvent e) Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
void | windowIconified(WindowEvent e) Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
void | windowOpened(WindowEvent e) Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

a

protected final EventListener a

b

protected final EventListener b
Constructor Detail

AWTEventMulticaster

protected AWTEventMulticaster(EventListener a,
                              EventListener b)
Creates an event multicaster instance which chains listener-a with listener-b. Input parameters a and b should not be null, though implementations may vary in choosing whether or not to throw NullPointerException in that case.
Parameters:
a - listener-a
b - listener-b
Method Detail

remove

protected EventListener remove(EventListener oldl)
Removes a listener from this multicaster and returns the resulting multicast listener.
Parameters:
oldl - the listener to be removed

componentResized

public void componentResized(ComponentEvent e)
Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
Specified by:
componentResized in interface ComponentListener
Parameters:
e - the component event

componentMoved

public void componentMoved(ComponentEvent e)
Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
Specified by:
componentMoved in interface ComponentListener
Parameters:
e - the component event

componentShown

public void componentShown(ComponentEvent e)
Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
Specified by:
componentShown in interface ComponentListener
Parameters:
e - the component event

componentHidden

public void componentHidden(ComponentEvent e)
Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
Specified by:
componentHidden in interface ComponentListener
Parameters:
e - the component event

componentAdded

public void componentAdded(ContainerEvent e)
Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
Specified by:
componentAdded in interface ContainerListener
Parameters:
e - the component event

componentRemoved

public void componentRemoved(ContainerEvent e)
Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
Specified by:
componentRemoved in interface ContainerListener
Parameters:
e - the component event

focusGained

public void focusGained(FocusEvent e)
Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
Specified by:
focusGained in interface FocusListener
Parameters:
e - the focus event

focusLost

public void focusLost(FocusEvent e)
Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
Specified by:
focusLost in interface FocusListener
Parameters:
e - the focus event

keyTyped

public void keyTyped(KeyEvent e)
Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
Specified by:
keyTyped in interface KeyListener
Parameters:
e - the key event

keyPressed

public void keyPressed(KeyEvent e)
Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
Specified by:
keyPressed in interface KeyListener
Parameters:
e - the key event

keyReleased

public void keyReleased(KeyEvent e)
Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.
Specified by:
keyReleased in interface KeyListener
Parameters:
e - the key event

mouseClicked

public void mouseClicked(MouseEvent e)
Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the mouse event

mousePressed

public void mousePressed(MouseEvent e)
Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
Specified by:
mousePressed in interface MouseListener
Parameters:
e - the mouse event

mouseReleased

public void mouseReleased(MouseEvent e)
Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
Specified by:
mouseReleased in interface MouseListener
Parameters:
e - the mouse event

mouseEntered

public void mouseEntered(MouseEvent e)
Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
Specified by:
mouseEntered in interface MouseListener
Parameters:
e - the mouse event

mouseExited

public void mouseExited(MouseEvent e)
Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
Specified by:
mouseExited in interface MouseListener
Parameters:
e - the mouse event

mouseDragged

public void mouseDragged(MouseEvent e)
Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - the mouse event

mouseMoved

public void mouseMoved(MouseEvent e)
Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - the mouse event

windowOpened

public void windowOpened(WindowEvent e)
Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.
Specified by:
windowOpened in interface WindowListener
Parameters:
e - the window event

windowClosing

public void windowClosing(WindowEvent e)
Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
Specified by:
windowClosing in interface WindowListener
Parameters:
e - the window event

windowClosed

public void windowClosed(WindowEvent e)
Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
Specified by:
windowClosed in interface WindowListener
Parameters:
e - the window event

windowIconified

public void windowIconified(WindowEvent e)
Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
Specified by:
windowIconified in interface WindowListener
Parameters:
e - the window event

windowDeiconified

public void windowDeiconified(WindowEvent e)
Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
Specified by:
windowDeiconified in interface WindowListener
Parameters:
e - the window event

windowActivated

public void windowActivated(WindowEvent e)
Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
Specified by:
windowActivated in interface WindowListener
Parameters:
e - the window event

windowDeactivated

public void windowDeactivated(WindowEvent e)
Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
Specified by:
windowDeactivated in interface WindowListener
Parameters:
e - the window event

actionPerformed

public void actionPerformed(ActionEvent e)
Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the action event

itemStateChanged

public void itemStateChanged(ItemEvent e)
Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - the item event

adjustmentValueChanged

public void adjustmentValueChanged(AdjustmentEvent e)
Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.
Specified by:
adjustmentValueChanged in interface AdjustmentListener
Parameters:
e - the adjustment event

textValueChanged

public void textValueChanged(TextEvent e)
Description copied from interface: TextListener
Invoked when the value of the text has changed. The code written for this method performs the operations that need to occur when text changes.
Specified by:
textValueChanged in interface TextListener

inputMethodTextChanged

public void inputMethodTextChanged(InputMethodEvent e)
Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.
Specified by:
inputMethodTextChanged in interface InputMethodListener
Parameters:
e - the item event

caretPositionChanged

public void caretPositionChanged(InputMethodEvent e)
Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.
Specified by:
caretPositionChanged in interface InputMethodListener
Parameters:
e - the item event

hierarchyChanged

public void hierarchyChanged(HierarchyEvent e)
Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.
Specified by:
hierarchyChanged in interface HierarchyListener
Parameters:
e - the item event

ancestorMoved

public void ancestorMoved(HierarchyEvent e)
Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.
Specified by:
ancestorMoved in interface HierarchyBoundsListener
Parameters:
e - the item event

ancestorResized

public void ancestorResized(HierarchyEvent e)
Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.
Specified by:
ancestorResized in interface HierarchyBoundsListener
Parameters:
e - the item event

add

public static ComponentListener add(ComponentListener a,
                                    ComponentListener b)
Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
Parameters:
a - component-listener-a
b - component-listener-b

add

public static ContainerListener add(ContainerListener a,
                                    ContainerListener b)
Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
Parameters:
a - container-listener-a
b - container-listener-b

add

public static FocusListener add(FocusListener a,
                                FocusListener b)
Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
Parameters:
a - focus-listener-a
b - focus-listener-b

add

public static KeyListener add(KeyListener a,
                              KeyListener b)
Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
Parameters:
a - key-listener-a
b - key-listener-b

add

public static MouseListener add(MouseListener a,
                                MouseListener b)
Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
Parameters:
a - mouse-listener-a
b - mouse-listener-b

add

public static MouseMotionListener add(MouseMotionListener a,
                                      MouseMotionListener b)
Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
Parameters:
a - mouse-motion-listener-a
b - mouse-motion-listener-b

add

public static WindowListener add(WindowListener a,
                                 WindowListener b)
Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
Parameters:
a - window-listener-a
b - window-listener-b

add

public static ActionListener add(ActionListener a,
                                 ActionListener b)
Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
Parameters:
a - action-listener-a
b - action-listener-b

add

public static ItemListener add(ItemListener a,
                               ItemListener b)
Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
Parameters:
a - item-listener-a
b - item-listener-b

add

public static AdjustmentListener add(AdjustmentListener a,
                                     AdjustmentListener b)
Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
Parameters:
a - adjustment-listener-a
b - adjustment-listener-b

add

public static TextListener add(TextListener a,
                               TextListener b)

add

public static InputMethodListener add(InputMethodListener a,
                                      InputMethodListener b)
Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
Parameters:
a - input-method-listener-a
b - input-method-listener-b

add

public static HierarchyListener add(HierarchyListener a,
                                    HierarchyListener b)
Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
Parameters:
a - hierarchy-listener-a
b - hierarchy-listener-b

add

public static HierarchyBoundsListener add(HierarchyBoundsListener a,
                                          HierarchyBoundsListener b)
Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
Parameters:
a - hierarchy-bounds-listener-a
b - hierarchy-bounds-listener-b

remove

public static ComponentListener remove(ComponentListener l,
                                       ComponentListener oldl)
Removes the old component-listener from component-listener-l and returns the resulting multicast listener.
Parameters:
l - component-listener-l
oldl - the component-listener being removed

remove

public static ContainerListener remove(ContainerListener l,
                                       ContainerListener oldl)
Removes the old container-listener from container-listener-l and returns the resulting multicast listener.
Parameters:
l - container-listener-l
oldl - the container-listener being removed

remove

public static FocusListener remove(FocusListener l,
                                   FocusListener oldl)
Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
Parameters:
l - focus-listener-l
oldl - the focus-listener being removed

remove

public static KeyListener remove(KeyListener l,
                                 KeyListener oldl)
Removes the old key-listener from key-listener-l and returns the resulting multicast listener.
Parameters:
l - key-listener-l
oldl - the key-listener being removed

remove

public static MouseListener remove(MouseListener l,
                                   MouseListener oldl)
Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.
Parameters:
l - mouse-listener-l
oldl - the mouse-listener being removed

remove

public static MouseMotionListener remove(MouseMotionListener l,
                                         MouseMotionListener oldl)
Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.
Parameters:
l - mouse-motion-listener-l
oldl - the mouse-motion-listener being removed

remove

public static WindowListener remove(WindowListener l,
                                    WindowListener oldl)
Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
Parameters:
l - window-listener-l
oldl - the window-listener being removed

remove

public static ActionListener remove(ActionListener l,
                                    ActionListener oldl)
Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
Parameters:
l - action-listener-l
oldl - the action-listener being removed

remove

public static ItemListener remove(ItemListener l,
                                  ItemListener oldl)
Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
Parameters:
l - item-listener-l
oldl - the item-listener being removed

remove

public static AdjustmentListener remove(AdjustmentListener l,
                                        AdjustmentListener oldl)
Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
Parameters:
l - adjustment-listener-l
oldl - the adjustment-listener being removed

remove

public static TextListener remove(TextListener l,
                                  TextListener oldl)

remove

public static InputMethodListener remove(InputMethodListener l,
                                         InputMethodListener oldl)
Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.
Parameters:
l - input-method-listener-l
oldl - the input-method-listener being removed

remove

public static HierarchyListener remove(HierarchyListener l,
                                       HierarchyListener oldl)
Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.
Parameters:
l - hierarchy-listener-l
oldl - the hierarchy-listener being removed

remove

public static HierarchyBoundsListener remove(HierarchyBoundsListener l,
                                             HierarchyBoundsListener oldl)
Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.
Parameters:
l - hierarchy-bounds-listener-l
oldl - the hierarchy-bounds-listener being removed

addInternal

protected static EventListener addInternal(EventListener a,
                                           EventListener b)
Returns the resulting multicast listener from adding listener-a and listener-b together. If listener-a is null, it returns listener-b; If listener-b is null, it returns listener-a If neither are null, then it creates and returns a new AWTEventMulticaster instance which chains a with b.
Parameters:
a - event listener-a
b - event listener-b

removeInternal

protected static EventListener removeInternal(EventListener l,
                                              EventListener oldl)
Returns the resulting multicast listener after removing the old listener from listener-l. If listener-l equals the old listener OR listener-l is null, returns null. Else if listener-l is an instance of AWTEventMulticaster, then it removes the old listener from it. Else, returns listener l.
Parameters:
l - the listener being removed from
oldl - the listener being removed

saveInternal

protected void saveInternal(ObjectOutputStream s,
                            String k)
                     throws IOException

save

protected static void save(ObjectOutputStream s,
                           String k,
                           EventListener l)
                    throws IOException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AWTException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AWTException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.AWTException
All Implemented Interfaces:
Serializable
public class AWTException
extends Exception

Signals that an Absract Window Toolkit exception has occurred.

See Also:
Serialized Form

Constructor Summary
AWTException(String msg)
Constructs an instance of AWTException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AWTException

public AWTException(String msg)
Constructs an instance of AWTException with the specified detail message. A detail message is an instance of String that describes this particular exception.
Parameters:
msg - the detail message
Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AWTPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class AWTPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.awt.AWTPermission
All Implemented Interfaces:
Guard, Serializable
public final class AWTPermission
extends BasicPermission

This class is for AWT permissions. An AWTPermission contains a target name but no actions list; you either have the named permission or you don't.

The target name is the name of the AWT permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk could be used to represent all AWT permissions.

The following table lists all the possible AWTPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
accessClipboard | Posting and retrieval of information to and from the AWT clipboard | This would allow malfeasant code to share potentially sensitive or confidential information.
accessEventQueue | Access to the AWT event queue | After retrieving the AWT event queue, malicious code may peek at and even remove existing events from its event queue, as well as post bogus events which may purposefully cause the application or applet to misbehave in an insecure manner.
listenToAllAWTEvents | Listen to all AWT events, system-wide | After adding an AWT event listener, malicious code may scan all AWT events dispatched in the system, allowing it to read all user input (such as passwords). Each AWT event listener is called from within the context of that event queue's EventDispatchThread, so if the accessEventQueue permission is also enabled, malicious code could modify the contents of AWT event queues system-wide, causing the application or applet to misbehave in an insecure manner.
showWindowWithoutWarningBanner | Display of a window without also displaying a banner warning that the window was created by an applet | Without this warning, an applet may pop up windows without the user knowing that they belong to an applet. Since users may make security-sensitive decisions based on whether or not the window belongs to an applet (entering a username and password into a dialog box, for example), disabling this warning banner may allow applets to trick the user into entering such information.
readDisplayPixels | Readback of pixels from the display screen | Interfaces such as the java.awt.Composite interface or the java.awt.Robot class allow arbitrary code to examine pixels on the display enable malicious code to snoop on the activities of the user.
createRobot | Create java.awt.Robot objects | The java.awt.Robot object allows code to generate native-level mouse and keyboard events as well as read the screen. It could allow malicious code to control the system, run other programs, read the display, and deny mouse and keyboard access to the user.

See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
AWTPermission(String name)
Creates a new AWTPermission with the specified name.
AWTPermission(String name, String actions)
Creates a new AWTPermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AWTPermission

public AWTPermission(String name)
Creates a new AWTPermission with the specified name. The name is the symbolic name of the AWTPermission, such as "topLevelWindow", "systemClipboard", etc. An asterisk may be used to indicate all AWT permissions.
Parameters:
name - the name of the AWTPermission.

AWTPermission

public AWTPermission(String name,
                     String actions)
Creates a new AWTPermission object with the specified name. The name is the symbolic name of the AWTPermission, and the actions String is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the AWTPermission.
actions - should be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicStroke

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class BasicStroke

java.lang.Object
  |
  +--java.awt.BasicStroke
All Implemented Interfaces:
Stroke
public class BasicStroke
extends Object
implements Stroke

The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke. The rendering attributes defined by BasicStroke describe the shape of the mark made by a pen drawn along the outline of a Shape and the decorations applied at the ends and joins of path segments of the Shape. These rendering attributes include:

width
The pen width, measured perpendicularly to the pen trajectory.
end caps
The decoration applied to the ends of unclosed subpaths and dash segments. Subpaths that start and end on the same point are still considered unclosed if they do not have a CLOSE segment. See SEG_CLOSE for more information on the CLOSE segment. The three different decorations are: CAP_BUTT, CAP_ROUND, and CAP_SQUARE.
line joins
The decoration applied at the intersection of two path segments and at the intersection of the endpoints of a subpath that is closed using SEG_CLOSE. The three different decorations are: JOIN_BEVEL, JOIN_MITER, and JOIN_ROUND.
miter limit
The limit to trim a line join that has a JOIN_MITER decoration. A line join is trimmed when the ratio of miter length to stroke width is greater than the miterlimit value. The miter length is the diagonal length of the miter, which is the distance between the inside corner and the outside corner of the intersection. The smaller the angle formed by two line segments, the longer the miter length and the sharper the angle of intersection. The default miterlimit value of 10.0f causes all angles less than 11 degrees to be trimmed. Trimming miters converts the decoration of the line join to bevel.
dash attributes
The definition of how to make a dash pattern by alternating between opaque and transparent sections.
All attributes that specify measurements and distances controlling the shape of the returned outline are measured in the same coordinate system as the original unstroked Shape argument. When a Graphics2D object uses a Stroke object to redefine a path during the execution of one of its draw methods, the geometry is supplied in its original form before the Graphics2D transform attribute is applied. Therefore, attributes such as the pen width are interpreted in the user space coordinate system of the Graphics2D object and are subject to the scaling and shearing effects of the user-space-to-device-space transform in that particular Graphics2D. For example, the width of a rendered shape's outline is determined not only by the width attribute of this BasicStroke, but also by the transform attribute of the Graphics2D object. Consider this code:
     // sets the Graphics2D object's Tranform attribute
g2d.scale(10, 10);
     // sets the Graphics2D object's Stroke attribute
     g2d.setStroke(new BasicStroke(1.5f));
Assuming there are no other scaling transforms added to the Graphics2D object, the resulting line will be approximately 15 pixels wide. As the example code demonstrates, a floating-point line offers better precision, especially when large transforms are used with a Graphics2D object. When a line is diagonal, the exact width depends on how the rendering pipeline chooses which pixels to fill as it traces the theoretical widened outline. The choice of which pixels to turn on is affected by the antialiasing attribute because the antialiasing rendering pipeline can choose to color partially-covered pixels.

For more information on the user space coordinate system and the rendering process, see the Graphics2D class comments.

See Also:
Graphics2D

Field Summary
static int | CAP_BUTT Ends unclosed subpaths and dash segments with no added decoration.
static int | CAP_ROUND Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.
static int | CAP_SQUARE Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width.
static int | JOIN_BEVEL Joins path segments by connecting the outer corners of their wide outlines with a straight segment.
static int | JOIN_MITER Joins path segments by extending their outside edges until they meet.
static int | JOIN_ROUND Joins path segments by rounding off the corner at a radius of half the line width.
Constructor Summary
BasicStroke()
Constructs a new BasicStroke with defaults for all attributes.
BasicStroke(float width)
Constructs a solid BasicStroke with the specified line width and with default values for the cap and join styles.
BasicStroke(float width, int cap, int join)
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float width, int cap, int join, float miterlimit)
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase)
Constructs a new BasicStroke with the specified attributes.
Method Summary
Shape | createStrokedShape(Shape s) Returns a Shape whose interior defines the stroked outline of a specified Shape.
boolean | equals(Object obj) Tests if a specified object is equal to this BasicStroke by first testing if it is a BasicStroke and then comparing its width, join, cap, miter limit, dash, and dash phase attributes with those of this BasicStroke.
float[] | getDashArray() Returns the array representing the lengths of the dash segments.
float | getDashPhase() Returns the current dash phase.
int | getEndCap() Returns the end cap style.
int | getLineJoin() Returns the line join style.
float | getLineWidth() Returns the line width.
float | getMiterLimit() Returns the limit of miter joins.
int | hashCode() Returns the hashcode for this stroke.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

JOIN_MITER

public static final int JOIN_MITER
Joins path segments by extending their outside edges until they meet.

JOIN_ROUND

public static final int JOIN_ROUND
Joins path segments by rounding off the corner at a radius of half the line width.

JOIN_BEVEL

public static final int JOIN_BEVEL
Joins path segments by connecting the outer corners of their wide outlines with a straight segment.

CAP_BUTT

public static final int CAP_BUTT
Ends unclosed subpaths and dash segments with no added decoration.

CAP_ROUND

public static final int CAP_ROUND
Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.

CAP_SQUARE

public static final int CAP_SQUARE
Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width.
Constructor Detail

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join,
                   float miterlimit,
                   float[] dash,
                   float dash_phase)
Constructs a new BasicStroke with the specified attributes.
Parameters:
width - the width of this BasicStroke. The width must be greater than or equal to 0.0f. If width is set to 0.0f, the stroke is rendered as the thinnest possible line for the target device and the antialias hint setting.
cap - the decoration of the ends of a BasicStroke
join - the decoration applied where path segments meet
miterlimit - the limit to trim the miter join. The miterlimit must be greater than or equal to 1.0f.
dash - the array representing the dashing pattern
dash_phase - the offset to start the dashing pattern
Throws:
IllegalArgumentException - if width is negative
IllegalArgumentException - if cap is not either CAP_BUTT, CAP_ROUND or CAP_SQUARE
IllegalArgumentException - if miterlimit is less than 1 and join is JOIN_MITER
IllegalArgumentException - if join is not either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
IllegalArgumentException - if dash_phase is negative and dash is not null
IllegalArgumentException - if the length of dash is zero
IllegalArgumentException - if dash lengths are all zero.

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join,
                   float miterlimit)
Constructs a solid BasicStroke with the specified attributes.
Parameters:
width - the width of the BasicStroke
cap - the decoration of the ends of a BasicStroke
join - the decoration applied where path segments meet
miterlimit - the limit to trim the miter join
Throws:
IllegalArgumentException - if width is negative
IllegalArgumentException - if cap is not either CAP_BUTT, CAP_ROUND or CAP_SQUARE
IllegalArgumentException - if miterlimit is less than 1 and join is JOIN_MITER
IllegalArgumentException - if join is not either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join)
Constructs a solid BasicStroke with the specified attributes. The miterlimit parameter is unnecessary in cases where the default is allowable or the line joins are not specified as JOIN_MITER.
Parameters:
width - the width of the BasicStroke
cap - the decoration of the ends of a BasicStroke
join - the decoration applied where path segments meet
Throws:
IllegalArgumentException - if width is negative
IllegalArgumentException - if cap is not either CAP_BUTT, CAP_ROUND or CAP_SQUARE
IllegalArgumentException - if join is not either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER

BasicStroke

public BasicStroke(float width)
Constructs a solid BasicStroke with the specified line width and with default values for the cap and join styles.
Parameters:
width - the width of the BasicStroke
Throws:
IllegalArgumentException - if width is negative

BasicStroke

public BasicStroke()
Constructs a new BasicStroke with defaults for all attributes. The default attributes are a solid line of width 1.0, CAP_SQUARE, JOIN_MITER, a miter limit of 10.0.
Method Detail

createStrokedShape

public Shape createStrokedShape(Shape s)
Returns a Shape whose interior defines the stroked outline of a specified Shape.
Specified by:
createStrokedShape in interface Stroke
Parameters:
s - the Shape boundary be stroked
Returns:
the Shape of the stroked outline.

getLineWidth

public float getLineWidth()
Returns the line width. Line width is represented in user space, which is the default-coordinate space used by Java 2D. See the Graphics2D class comments for more information on the user space coordinate system.
Returns:
the line width of this BasicStroke.
See Also:
Graphics2D

getEndCap

public int getEndCap()
Returns the end cap style.
Returns:
the end cap style of this BasicStroke as one of the static int values that define possible end cap styles.

getLineJoin

public int getLineJoin()
Returns the line join style.
Returns:
the line join style of the BasicStroke as one of the static int values that define possible line join styles.

getMiterLimit

public float getMiterLimit()
Returns the limit of miter joins.
Returns:
the limit of miter joins of the BasicStroke.

getDashArray

public float[] getDashArray()
Returns the array representing the lengths of the dash segments. Alternate entries in the array represent the user space lengths of the opaque and transparent segments of the dashes. As the pen moves along the outline of the Shape to be stroked, the user space distance that the pen travels is accumulated. The distance value is used to index into the dash array. The pen is opaque when its current cumulative distance maps to an even element of the dash array and transparent otherwise.
Returns:
the dash array.

getDashPhase

public float getDashPhase()
Returns the current dash phase. The dash phase is a distance specified in user coordinates that represents an offset into the dashing pattern. In other words, the dash phase defines the point in the dashing pattern that will correspond to the beginning of the stroke.
Returns:
the dash phase as a float value.

hashCode

public int hashCode()
Returns the hashcode for this stroke.
Overrides:
hashCode in class Object
Returns:
a hash code for this stroke.

equals

public boolean equals(Object obj)
Tests if a specified object is equal to this BasicStroke by first testing if it is a BasicStroke and then comparing its width, join, cap, miter limit, dash, and dash phase attributes with those of this BasicStroke.
Overrides:
equals in class Object
Parameters:
obj - the specified object to compare to this BasicStroke
Returns:
true if the width, join, cap, miter limit, dash, and dash phase are the same for both objects; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BorderLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class BorderLayout

java.lang.Object
  |
  +--java.awt.BorderLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
public class BorderLayout
extends Object
implements LayoutManager2, Serializable

A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center. Each region is identified by a corresponding constant: NORTH, SOUTH, EAST, WEST, and CENTER. When adding a component to a container with a border layout, use one of these five constants, for example:

    Panel p = new Panel();
    p.setLayout(new BorderLayout());
    p.add(new Button("Okay"), BorderLayout.SOUTH);
As a convenience, BorderLayout interprets the absence of a string specification the same as the constant CENTER:
    Panel p2 = new Panel();
    p2.setLayout(new BorderLayout());
    p2.add(new TextArea());  // Same as p.add(new TextArea(), BorderLayout.CENTER);

In addition, BorderLayout supports four relative positioning constants, BEFORE_FIRST_LINE, AFTER_LAST_LINE, BEFORE_LINE_BEGINS, and AFTER_LINE_ENDS. In a container whose ComponentOrientation is set to ComponentOrientation.LEFT_TO_RIGHT, these constants map to NORTH, SOUTH, WEST, and EAST, respectively

Mixing the two types of constants can lead to unpredicable results. If you use both types, the relative constants will take precedence. For example, if you add components using both the NORTH and BEFORE_FIRST_LINE constants in a container whose orientation is LEFT_TO_RIGHT, only the BEFORE_FIRST_LINE will be layed out.

NOTE: Currently (in the Java 2 platform v1.2), BorderLayout does not support vertical orientations. The isVertical setting on the container's ComponentOrientation is not respected.

The components are laid out according to their preferred sizes and the constraints of the container's size. The NORTH and SOUTH components may be stretched horizontally; the EAST and WEST components may be stretched vertically; the CENTER component may stretch both horizontally and vertically to fill any space left over.

Here is an example of five buttons in an applet laid out using the BorderLayout layout manager:

The code for this applet is as follows:

 import java.awt.*;
 import java.applet.Applet;

 public class buttonDir extends Applet {
   public void init() {
     setLayout(new BorderLayout());
     add(new Button("North"), BorderLayout.NORTH);
     add(new Button("South"), BorderLayout.SOUTH);
     add(new Button("East"), BorderLayout.EAST);
     add(new Button("West"), BorderLayout.WEST);
     add(new Button("Center"), BorderLayout.CENTER);
   }
 }

Since:
JDK1.0
See Also:
Container.add(String, Component), ComponentOrientation, Serialized Form

Field Summary
static String | AFTER_LAST_LINE The component comes after the last line of the layout's content.
static String | AFTER_LINE_ENDS The component goes at the end of the line direction for the layout.
static String | BEFORE_FIRST_LINE The component comes before the first line of the layout's content.
static String | BEFORE_LINE_BEGINS The component goes at the beginning of the line direction for the layout.
static String | CENTER The center layout constraint (middle of container).
static String | EAST The east layout constraint (right side of container).
static String | NORTH The north layout constraint (top of container).
static String | SOUTH The south layout constraint (bottom of container).
static String | WEST The west layout constraint (left side of container).
Constructor Summary
BorderLayout()
Constructs a new border layout with no gaps between components.
BorderLayout(int hgap, int vgap)
Constructs a border layout with the specified gaps between components.
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
int | getHgap() Returns the horizontal gap between components.
float | getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
int | getVgap() Returns the vertical gap between components.
void | invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | layoutContainer(Container target) Lays out the container argument using this border layout.
Dimension | maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
Dimension | minimumLayoutSize(Container target) Determines the minimum size of the target container using this layout manager.
Dimension | preferredLayoutSize(Container target) Determines the preferred size of the target container using this layout manager, based on the components in the container.
void | removeLayoutComponent(Component comp) Removes the specified component from this border layout.
void | setHgap(int hgap) Sets the horizontal gap between components.
void | setVgap(int vgap) Sets the vertical gap between components.
String | toString() Returns a string representation of the state of this border layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

NORTH

public static final String NORTH
The north layout constraint (top of container).

SOUTH

public static final String SOUTH
The south layout constraint (bottom of container).

EAST

public static final String EAST
The east layout constraint (right side of container).

WEST

public static final String WEST
The west layout constraint (left side of container).

CENTER

public static final String CENTER
The center layout constraint (middle of container).

BEFORE_FIRST_LINE

public static final String BEFORE_FIRST_LINE
The component comes before the first line of the layout's content. For Western, top-to-bottom, left-to-right orientations, this is equivalent to NORTH.
See Also:
Component.getComponentOrientation()
Since:
1.2

AFTER_LAST_LINE

public static final String AFTER_LAST_LINE
The component comes after the last line of the layout's content. For Western, top-to-bottom, left-to-right orientations, this is equivalent to SOUTH.
See Also:
Component.getComponentOrientation()
Since:
1.2

BEFORE_LINE_BEGINS

public static final String BEFORE_LINE_BEGINS
The component goes at the beginning of the line direction for the layout. For Western, top-to-bottom, left-to-right orientations, this is equivalent to WEST.
See Also:
Component.getComponentOrientation()
Since:
1.2

AFTER_LINE_ENDS

public static final String AFTER_LINE_ENDS
The component goes at the end of the line direction for the layout. For Western, top-to-bottom, left-to-right orientations, this is equivalent to EAST.
See Also:
Component.getComponentOrientation()
Since:
1.2
Constructor Detail

BorderLayout

public BorderLayout()
Constructs a new border layout with no gaps between components.

BorderLayout

public BorderLayout(int hgap,
                    int vgap)
Constructs a border layout with the specified gaps between components. The horizontal gap is specified by hgap and the vertical gap is specified by vgap.
Parameters:
hgap - the horizontal gap.
vgap - the vertical gap.
Method Detail

getHgap

public int getHgap()
Returns the horizontal gap between components.
Since:
JDK1.1

setHgap

public void setHgap(int hgap)
Sets the horizontal gap between components.
Parameters:
hgap - the horizontal gap between components
Since:
JDK1.1

getVgap

public int getVgap()
Returns the vertical gap between components.
Since:
JDK1.1

setVgap

public void setVgap(int vgap)
Sets the vertical gap between components.
Parameters:
vgap - the vertical gap between components
Since:
JDK1.1

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to the layout, using the specified constraint object. For border layouts, the constraint must be one of the following constants: NORTH, SOUTH, EAST, WEST, or CENTER.

Most applications do not call this method directly. This method is called when a component is added to a container using the Container.add method with the same argument types.

Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component to be added.
constraints - an object that specifies how and where the component is added to the layout.
Throws:
IllegalArgumentException - if the constraint object is not a string, or if it not one of the five specified constants.
Since:
JDK1.1
See Also:
Container.add(java.awt.Component, java.lang.Object)

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).

Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from this border layout. This method is called when a container calls its remove or removeAll methods. Most applications do not call this method directly.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed.
See Also:
Container.remove(java.awt.Component), Container.removeAll()

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Determines the minimum size of the target container using this layout manager.

This method is called when a container calls its getMinimumSize method. Most applications do not call this method directly.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
Returns:
the minimum dimensions needed to lay out the subcomponents of the specified container.
See Also:
Container, preferredLayoutSize(java.awt.Container), Container.getMinimumSize()

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Determines the preferred size of the target container using this layout manager, based on the components in the container.

Most applications do not call this method directly. This method is called when a container calls its getPreferredSize method.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
Returns:
the preferred dimensions to lay out the subcomponents of the specified container.
See Also:
Container, minimumLayoutSize(java.awt.Container), Container.getPreferredSize()

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the component which needs to be laid out
See Also:
Container, minimumLayoutSize(java.awt.Container), preferredLayoutSize(java.awt.Container)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container parent)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container parent)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Specified by:
invalidateLayout in interface LayoutManager2

layoutContainer

public void layoutContainer(Container target)
Lays out the container argument using this border layout.

This method actually reshapes the components in the specified container in order to satisfy the constraints of this BorderLayout object. The NORTH and SOUTH components, if any, are placed at the top and bottom of the container, respectively. The WEST and EAST components are then placed on the left and right, respectively. Finally, the CENTER object is placed in any remaining space in the middle.

Most applications do not call this method directly. This method is called when a container calls its doLayout method.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
target - the container in which to do the layout.
See Also:
Container, Container.doLayout()

toString

public String toString()
Returns a string representation of the state of this border layout.
Overrides:
toString in class Object
Returns:
a string representation of this border layout.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Button

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Button

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Button
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class Button
extends Component
implements Accessible

This class creates a labeled button. The application can cause some action to happen when the button is pushed. This image depicts three views of a "Quit" button as it appears under the Solaris operating system:

The first view shows the button as it appears normally. The second view shows the button when it has input focus. Its outline is darkened to let the user know that it is an active object. The third view shows the button when the user clicks the mouse over the button, and thus requests that an action be performed.

The gesture of clicking on a button with the mouse is associated with one instance of ActionEvent, which is sent out when the mouse is both pressed and released over the button. If an application is interested in knowing when the button has been pressed but not released, as a separate gesture, it can specialize processMouseEvent, or it can register itself as a listener for mouse events by calling addMouseListener. Both of these methods are defined by Component, the abstract superclass of all components.

When a button is pressed and released, AWT sends an instance of ActionEvent to the button, by calling processEvent on the button. The button's processEvent method receives all events for the button; it passes an action event along by calling its own processActionEvent method. The latter method passes the action event on to any action listeners that have registered an interest in action events generated by this button.

If an application wants to perform some action based on a button being pressed and released, it should implement ActionListener and register the new listener to receive events from this button, by calling the button's addActionListener method. The application can make use of the button's action command as a messaging protocol.

Since:
JDK1.0
See Also:
ActionEvent, ActionListener, Component.processMouseEvent(java.awt.event.MouseEvent), Component.addMouseListener(java.awt.event.MouseListener), Serialized Form

Inner Class Summary
protected  class Button.AccessibleAWTButton
This class implements accessibility support for the Button class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Button()
Constructs a Button with no label.
Button(String label)
Constructs a Button with the specified label.
Method Summary
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this button.
void | addNotify() Creates the peer of the button.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Button.
String | getActionCommand() Returns the command name of the action event fired by this button.
String | getLabel() Gets the label of this button.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the Button with addXXXListener(), where XXX is the name of the listenerType argument.
protected String | paramString() Returns the parameter string representing the state of this button.
protected void | processActionEvent(ActionEvent e) Processes action events occurring on this button by dispatching them to any registered ActionListener objects.
protected void | processEvent(AWTEvent e) Processes events on this button.
void | removeActionListener(ActionListener l) Removes the specified action listener so that it no longer receives action events from this button.
void | setActionCommand(String command) Sets the command name for the action event fired by this button.
void | setLabel(String label) Sets the button's label to be the specified string.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Button

public Button()
Constructs a Button with no label.

Button

public Button(String label)
Constructs a Button with the specified label.
Parameters:
label - A string label for the button.
Method Detail

addNotify

public void addNotify()
Creates the peer of the button. The button's peer allows the application to change the look of the button without changing its functionality.
Overrides:
addNotify in class Component
See Also:
Toolkit.createButton(java.awt.Button), Component.getToolkit()

getLabel

public String getLabel()
Gets the label of this button.
Returns:
the button's label, or null if the button has no label.
See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String label)
Sets the button's label to be the specified string.
Parameters:
label - the new label, or null if the button has no label.
See Also:
getLabel()

setActionCommand

public void setActionCommand(String command)
Sets the command name for the action event fired by this button. By default this action command is set to match the label of the button.
Parameters:
command - A string used to set the button's action command. If the string is null then the action command is set to match the label of the button.
Since:
JDK1.1
See Also:
ActionEvent

getActionCommand

public String getActionCommand()
Returns the command name of the action event fired by this button. If the command name is null (default) then this method returns the label of the button.

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this button. Action events occur when a user presses or releases the mouse over this button. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener
Since:
JDK1.1
See Also:
ActionListener, removeActionListener(java.awt.event.ActionListener)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this button. Action events occur when a user presses or releases the mouse over this button. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener
Since:
JDK1.1
See Also:
ActionListener, addActionListener(java.awt.event.ActionListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Button with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ActionListener(s) for the given Button b, one would write:
 ActionListener[] als = (ActionListener[])(b.getListeners(ActionListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this button
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this button. If an event is an instance of ActionEvent, this method invokes the processActionEvent method. Otherwise, it invokes processEvent on the superclass.
Overrides:
processEvent in class Component
Parameters:
e - the event.
Since:
JDK1.1
See Also:
ActionEvent, processActionEvent(java.awt.event.ActionEvent)

processActionEvent

protected void processActionEvent(ActionEvent e)
Processes action events occurring on this button by dispatching them to any registered ActionListener objects.

This method is not called unless action events are enabled for this button. Action events are enabled when one of the following occurs:

  • An ActionListener object is registered via addActionListener.
  • Action events are enabled via enableEvents.
Parameters:
e - the action event.
Since:
JDK1.1
See Also:
ActionListener, addActionListener(java.awt.event.ActionListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this button. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this button.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Button. For buttons, the AccessibleContext takes the form of an AccessibleAWTButton. A new AccessibleAWTButton instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTButton that serves as the AccessibleContext of this Button
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Canvas

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Canvas

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class Canvas
extends Component
implements Accessible

A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.

An application must subclass the Canvas class in order to get useful functionality such as creating a custom component. The paint method must be overridden in order to perform custom graphics on the canvas.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class Canvas.AccessibleAWTCanvas
This class implements accessibility support for the Canvas class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Canvas()
Constructs a new Canvas.
Canvas(GraphicsConfiguration config)
Constructs a new Canvas given a GraphicsConfiguration object.
Method Summary
void | addNotify() Creates the peer of the canvas.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Canvas.
void | paint(Graphics g) This method is called to repaint this canvas.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Canvas

public Canvas()
Constructs a new Canvas.

Canvas

public Canvas(GraphicsConfiguration config)
Constructs a new Canvas given a GraphicsConfiguration object.
Parameters:
config - a reference to a GraphicsConfiguration object.
See Also:
GraphicsConfiguration
Method Detail

addNotify

public void addNotify()
Creates the peer of the canvas. This peer allows you to change the user interface of the canvas without changing its functionality.
Overrides:
addNotify in class Component
See Also:
Toolkit.createCanvas(java.awt.Canvas), Component.getToolkit()

paint

public void paint(Graphics g)
This method is called to repaint this canvas. Most applications that subclass Canvas should override this method in order to perform some useful operation.

The paint method provided by Canvas redraws this canvas's rectangle in the background color.

The graphics context's origin (0, 0) is the top-left corner of this canvas. Its clipping region is the area of the context.

Overrides:
paint in class Component
Parameters:
g - the graphics context.
See Also:
Graphics

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Canvas. For canvases, the AccessibleContext takes the form of an AccessibleAWTCanvas. A new AccessibleAWTCanvas instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTCanvas that serves as the AccessibleContext of this Canvas
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CardLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class CardLayout

java.lang.Object
  |
  +--java.awt.CardLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
public class CardLayout
extends Object
implements LayoutManager2, Serializable

A CardLayout object is a layout manager for a container. It treats each component in the container as a card. Only one card is visible at a time, and the container acts as a stack of cards. The first component added to a CardLayout object is the visible component when the container is first displayed.

The ordering of cards is determined by the container's own internal ordering of its component objects. CardLayout defines a set of methods that allow an application to flip through these cards sequentially, or to show a specified card. The CardLayou#addLayoutComponent method can be used to associate a string identifier with a given card for fast random access.

Since:
JDK1.0
See Also:
Container, Serialized Form

Constructor Summary
CardLayout()
Creates a new card layout with gaps of size zero.
CardLayout(int hgap, int vgap)
Creates a new card layout with the specified horizontal and vertical gaps.
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to this card layout's internal table of names.
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
void | first(Container parent) Flips to the first card of the container.
int | getHgap() Gets the horizontal gap between components.
float | getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
int | getVgap() Gets the vertical gap between components.
void | invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | last(Container parent) Flips to the last card of the container.
void | layoutContainer(Container parent) Lays out the specified container using this card layout.
Dimension | maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
Dimension | minimumLayoutSize(Container parent) Calculates the minimum size for the specified panel.
void | next(Container parent) Flips to the next card of the specified container.
Dimension | preferredLayoutSize(Container parent) Determines the preferred size of the container argument using this card layout.
void | previous(Container parent) Flips to the previous card of the specified container.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
void | setHgap(int hgap) Sets the horizontal gap between components.
void | setVgap(int vgap) Sets the vertical gap between components.
void | show(Container parent, String name) Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
String | toString() Returns a string representation of the state of this card layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CardLayout

public CardLayout()
Creates a new card layout with gaps of size zero.

CardLayout

public CardLayout(int hgap,
                  int vgap)
Creates a new card layout with the specified horizontal and vertical gaps. The horizontal gaps are placed at the left and right edges. The vertical gaps are placed at the top and bottom edges.
Parameters:
hgap - the horizontal gap.
vgap - the vertical gap.
Method Detail

getHgap

public int getHgap()
Gets the horizontal gap between components.
Returns:
the horizontal gap between components.
Since:
JDK1.1
See Also:
setHgap(int), getVgap()

setHgap

public void setHgap(int hgap)
Sets the horizontal gap between components.
Parameters:
hgap - the horizontal gap between components.
Since:
JDK1.1
See Also:
getHgap(), setVgap(int)

getVgap

public int getVgap()
Gets the vertical gap between components.
Returns:
the vertical gap between components.
See Also:
setVgap(int), getHgap()

setVgap

public void setVgap(int vgap)
Sets the vertical gap between components.
Parameters:
vgap - the vertical gap between components.
Since:
JDK1.1
See Also:
getVgap(), setHgap(int)

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to this card layout's internal table of names. The object specified by constraints must be a string. The card layout stores this string as a key-value pair that can be used for random access to a particular card. By calling the show method, an application can display the component with the specified name.
Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component to be added.
constraints - a tag that identifies a particular card in the layout.
Throws:
IllegalArgumentException - if the constraint is not a string.
See Also:
show(java.awt.Container, java.lang.String)

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).

Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout. If the card was visible on top, the next card underneath it is shown.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed.
See Also:
Container.remove(java.awt.Component), Container.removeAll()

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Determines the preferred size of the container argument using this card layout.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the name of the parent container.
Returns:
the preferred dimensions to lay out the subcomponents of the specified container.
See Also:
Container.getPreferredSize(), minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size for the specified panel.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the name of the parent container in which to do the layout.
Returns:
the minimum dimensions required to lay out the subcomponents of the specified container.
See Also:
Container.doLayout(), preferredLayoutSize(java.awt.Container)

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the component which needs to be laid out
See Also:
Container, minimumLayoutSize(java.awt.Container), preferredLayoutSize(java.awt.Container)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container parent)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container parent)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Specified by:
invalidateLayout in interface LayoutManager2

layoutContainer

public void layoutContainer(Container parent)
Lays out the specified container using this card layout.

Each component in the parent container is reshaped to be the size of the container, minus space for surrounding insets, horizontal gaps, and vertical gaps.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the name of the parent container in which to do the layout.
See Also:
Container.doLayout()

first

public void first(Container parent)
Flips to the first card of the container.
Parameters:
parent - the name of the parent container in which to do the layout.
See Also:
last(java.awt.Container)

next

public void next(Container parent)
Flips to the next card of the specified container. If the currently visible card is the last one, this method flips to the first card in the layout.
Parameters:
parent - the name of the parent container in which to do the layout.
See Also:
previous(java.awt.Container)

previous

public void previous(Container parent)
Flips to the previous card of the specified container. If the currently visible card is the first one, this method flips to the last card in the layout.
Parameters:
parent - the name of the parent container in which to do the layout.
See Also:
next(java.awt.Container)

last

public void last(Container parent)
Flips to the last card of the container.
Parameters:
parent - the name of the parent container in which to do the layout.
See Also:
first(java.awt.Container)

show

public void show(Container parent,
                 String name)
Flips to the component that was added to this layout with the specified name, using addLayoutComponent. If no such component exists, then nothing happens.
Parameters:
parent - the name of the parent container in which to do the layout.
name - the component name.
See Also:
addLayoutComponent(java.awt.Component, java.lang.Object)

toString

public String toString()
Returns a string representation of the state of this card layout.
Overrides:
toString in class Object
Returns:
a string representation of this card layout.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Checkbox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Checkbox

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Checkbox
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable
public class Checkbox
extends Component
implements ItemSelectable, Accessible

A check box is a graphical component that can be in either an "on" (true) or "off" (false) state. Clicking on a check box changes its state from "on" to "off," or from "off" to "on."

The following code example creates a set of check boxes in a grid layout:

 setLayout(new GridLayout(3, 1));
 add(new Checkbox("one", null, true));
 add(new Checkbox("two"));
 add(new Checkbox("three"));

This image depicts the check boxes and grid layout created by this code example:

The button labeled one is in the "on" state, and the other two are in the "off" state. In this example, which uses the GridLayout class, the states of the three check boxes are set independently.

Alternatively, several check boxes can be grouped together under the control of a single object, using the CheckboxGroup class. In a check box group, at most one button can be in the "on" state at any given time. Clicking on a check box to turn it on forces any other check box in the same group that is on into the "off" state.

Since:
JDK1.0
See Also:
GridLayout, CheckboxGroup, Serialized Form

Inner Class Summary
protected  class Checkbox.AccessibleAWTCheckbox
This class implements accessibility support for the Checkbox class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Checkbox()
Creates a check box with no label.
Checkbox(String label)
Creates a check box with the specified label.
Checkbox(String label, boolean state)
Creates a check box with the specified label and sets the specified state.
Checkbox(String label, boolean state, CheckboxGroup group)
Creates a check box with the specified label, in the specified check box group, and set to the specified state.
Checkbox(String label, CheckboxGroup group, boolean state)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.
Method Summary
void | addItemListener(ItemListener l) Adds the specified item listener to receive item events from this check box.
void | addNotify() Creates the peer of the Checkbox.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Checkbox.
CheckboxGroup | getCheckboxGroup() Determines this check box's group.
String | getLabel() Gets the label of this check box.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the Checkbox with addXXXListener(), where XXX is the name of the listenerType argument.
Object[] | getSelectedObjects() Returns an array (length 1) containing the checkbox label or null if the checkbox is not selected.
boolean | getState() Determines whether this check box is in the "on" or "off" state.
protected String | paramString() Returns the parameter string representing the state of this check box.
protected void | processEvent(AWTEvent e) Processes events on this check box.
protected void | processItemEvent(ItemEvent e) Processes item events occurring on this check box by dispatching them to any registered ItemListener objects.
void | removeItemListener(ItemListener l) Removes the specified item listener so that the item listener no longer receives item events from this check box.
void | setCheckboxGroup(CheckboxGroup g) Sets this check box's group to be the specified check box group.
void | setLabel(String label) Sets this check box's label to be the string argument.
void | setState(boolean state) Sets the state of this check box to the specified state.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Checkbox

public Checkbox()
Creates a check box with no label. The state of this check box is set to "off," and it is not part of any check box group.

Checkbox

public Checkbox(String label)
Creates a check box with the specified label. The state of this check box is set to "off," and it is not part of any check box group.
Parameters:
label - a string label for this check box, or null for no label.

Checkbox

public Checkbox(String label,
                boolean state)
Creates a check box with the specified label and sets the specified state. This check box is not part of any check box group.
Parameters:
label - a string label for this check box, or null for no label.
state - the initial state of this check box.

Checkbox

public Checkbox(String label,
                boolean state,
                CheckboxGroup group)
Creates a check box with the specified label, in the specified check box group, and set to the specified state.
Parameters:
label - a string label for this check box, or null for no label.
state - the initial state of this check box.
group - a check box group for this check box, or null for no group.
Since:
JDK1.1

Checkbox

public Checkbox(String label,
                CheckboxGroup group,
                boolean state)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.
Parameters:
label - a string label for this check box, or null for no label.
group - a check box group for this check box, or null for no group.
state - the initial state of this check box.
Since:
JDK1.1
Method Detail

addNotify

public void addNotify()
Creates the peer of the Checkbox. The peer allows you to change the look of the Checkbox without changing its functionality.
Overrides:
addNotify in class Component
See Also:
Toolkit.createCheckbox(java.awt.Checkbox), Component.getToolkit()

getLabel

public String getLabel()
Gets the label of this check box.
Returns:
the label of this check box, or null if this check box has no label.
See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String label)
Sets this check box's label to be the string argument.
Parameters:
label - a string to set as the new label, or null for no label.
See Also:
getLabel()

getState

public boolean getState()
Determines whether this check box is in the "on" or "off" state. The boolean value true indicates the "on" state, and false indicates the "off" state.
Returns:
the state of this check box, as a boolean value.
See Also:
setState(boolean)

setState

public void setState(boolean state)
Sets the state of this check box to the specified state. The boolean value true indicates the "on" state, and false indicates the "off" state.
Parameters:
state - the boolean state of the check box.
See Also:
getState()

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array (length 1) containing the checkbox label or null if the checkbox is not selected.
Specified by:
getSelectedObjects in interface ItemSelectable
See Also:
ItemSelectable

getCheckboxGroup

public CheckboxGroup getCheckboxGroup()
Determines this check box's group.
Returns:
this check box's group, or null if the check box is not part of a check box group.
See Also:
setCheckboxGroup(java.awt.CheckboxGroup)

setCheckboxGroup

public void setCheckboxGroup(CheckboxGroup g)
Sets this check box's group to be the specified check box group. If this check box is already in a different check box group, it is first taken out of that group.
Parameters:
g - the new check box group, or null to remove this check box from any check box group.
See Also:
getCheckboxGroup()

addItemListener

public void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this check box. If l is null, no exception is thrown and no action is performed.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the item listener
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, removeItemListener(java.awt.event.ItemListener)

removeItemListener

public void removeItemListener(ItemListener l)
Removes the specified item listener so that the item listener no longer receives item events from this check box. If l is null, no exception is thrown and no action is performed.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the item listener
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Checkbox with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ItemListener(s) for the given Checkbox c, one would write:
 ItemListener[] ils = (ItemListener[])(c.getListeners(ItemListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this checkbox
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this check box. If the event is an instance of ItemEvent, this method invokes the processItemEvent method. Otherwise, it calls its superclass's processEvent method.
Overrides:
processEvent in class Component
Parameters:
e - the event.
Since:
JDK1.1
See Also:
ItemEvent, processItemEvent(java.awt.event.ItemEvent)

processItemEvent

protected void processItemEvent(ItemEvent e)
Processes item events occurring on this check box by dispatching them to any registered ItemListener objects.

This method is not called unless item events are enabled for this component. Item events are enabled when one of the following occurs:

  • An ItemListener object is registered via addItemListener.
  • Item events are enabled via enableEvents.
Parameters:
e - the item event.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this check box. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this check box.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Checkbox. For checkboxes, the AccessibleContext takes the form of an AccessibleAWTCheckbox. A new AccessibleAWTCheckbox is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTCheckbox that serves as the AccessibleContext of this Checkbox
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckboxGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class CheckboxGroup

java.lang.Object
  |
  +--java.awt.CheckboxGroup
All Implemented Interfaces:
Serializable
public class CheckboxGroup
extends Object
implements Serializable

The CheckboxGroup class is used to group together a set of Checkbox buttons.

Exactly one check box button in a CheckboxGroup can be in the "on" state at any given time. Pushing any button sets its state to "on" and forces any other button that is in the "on" state into the "off" state.

The following code example produces a new check box group, with three check boxes:

 setLayout(new GridLayout(3, 1));
 CheckboxGroup cbg = new CheckboxGroup();
 add(new Checkbox("one", cbg, true));
 add(new Checkbox("two", cbg, false));
 add(new Checkbox("three", cbg, false));

This image depicts the check box group created by this example:

Since:
JDK1.0
See Also:
Checkbox, Serialized Form

Constructor Summary
CheckboxGroup()
Creates a new instance of CheckboxGroup.
Method Summary
 Checkbox getCurrent()
Deprecated. As of JDK version 1.1, replaced by getSelectedCheckbox().
 Checkbox getSelectedCheckbox()
Gets the current choice from this check box group.
 void setCurrent(Checkbox box)
Deprecated. As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).
 void setSelectedCheckbox(Checkbox box)
Sets the currently selected check box in this group to be the specified check box.
 String toString()
Returns a string representation of this check box group, including the value of its current selection.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CheckboxGroup

public CheckboxGroup()
Creates a new instance of CheckboxGroup.
Method Detail

getSelectedCheckbox

public Checkbox getSelectedCheckbox()
Gets the current choice from this check box group. The current choice is the check box in this group that is currently in the "on" state, or null if all check boxes in the group are off.
Returns:
the check box that is currently in the "on" state, or null.
Since:
JDK1.1
See Also:
Checkbox, setSelectedCheckbox(java.awt.Checkbox)

getCurrent

public Checkbox getCurrent()
Deprecated. As of JDK version 1.1, replaced by getSelectedCheckbox().

setSelectedCheckbox

public void setSelectedCheckbox(Checkbox box)
Sets the currently selected check box in this group to be the specified check box. This method sets the state of that check box to "on" and sets all other check boxes in the group to be off.

If the check box argument is null, all check boxes in this check box group are deselected. If the check box argument belongs to a different check box group, this method does nothing.

Parameters:
box - the Checkbox to set as the current selection.
Since:
JDK1.1
See Also:
Checkbox, getSelectedCheckbox()

setCurrent

public void setCurrent(Checkbox box)
Deprecated. As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).

toString

public String toString()
Returns a string representation of this check box group, including the value of its current selection.
Overrides:
toString in class Object
Returns:
a string representation of this check box group.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckboxMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class CheckboxMenuItem

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuItem
              |
              +--java.awt.CheckboxMenuItem
All Implemented Interfaces:
Accessible, ItemSelectable, Serializable
public class CheckboxMenuItem
extends MenuItem
implements ItemSelectable, Accessible

This class represents a check box that can be included in a menu. Clicking on the check box in the menu changes its state from "on" to "off" or from "off" to "on."

The following picture depicts a menu which contains an instance of CheckBoxMenuItem:

The item labeled Check shows a check box menu item in its "off" state.

When a check box menu item is selected, AWT sends an item event to the item. Since the event is an instance of ItemEvent, the processEvent method examines the event and passes it along to processItemEvent. The latter method redirects the event to any ItemListener objects that have registered an interest in item events generated by this menu item.

Since:
JDK1.0
See Also:
ItemEvent, ItemListener, Serialized Form

Inner Class Summary
protected  class CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Inner class of CheckboxMenuItem used to provide default support for accessibility.
Inner classes inherited from class java.awt.MenuItem
MenuItem.AccessibleAWTMenuItem
Inner classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
Constructor Summary
CheckboxMenuItem()
Create a check box menu item with an empty label.
CheckboxMenuItem(String label)
Create a check box menu item with the specified label.
CheckboxMenuItem(String label, boolean state)
Create a check box menu item with the specified label and state.
Method Summary
void | addItemListener(ItemListener l) Adds the specified item listener to receive item events from this check box menu item.
void | addNotify() Creates the peer of the checkbox item.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this CheckboxMenuItem.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the CheckboxMenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
Object[] | getSelectedObjects() Returns the an array (length 1) containing the checkbox menu item label or null if the checkbox is not selected.
boolean | getState() Determines whether the state of this check box menu item is "on" or "off."
String | paramString() Returns the parameter string representing the state of this check box menu item.
protected void | processEvent(AWTEvent e) Processes events on this check box menu item.
protected void | processItemEvent(ItemEvent e) Processes item events occurring on this check box menu item by dispatching them to any registered ItemListener objects.
void | removeItemListener(ItemListener l) Removes the specified item listener so that it no longer receives item events from this check box menu item.
void | setState(boolean b) Sets this check box menu item to the specifed state.
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getLabel, getShortcut, isEnabled, processActionEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, removeNotify, setFont, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CheckboxMenuItem

public CheckboxMenuItem()
Create a check box menu item with an empty label. The item's state is initially set to "off."
Since:
JDK1.1

CheckboxMenuItem

public CheckboxMenuItem(String label)
Create a check box menu item with the specified label. The item's state is initially set to "off."
Parameters:
label - a string label for the check box menu item, or null for an unlabeled menu item.

CheckboxMenuItem

public CheckboxMenuItem(String label,
                        boolean state)
Create a check box menu item with the specified label and state.
Parameters:
label - a string label for the check box menu item, or null for an unlabeled menu item.
state - the initial state of the menu item, where true indicates "on" and false indicates "off."
Since:
JDK1.1
Method Detail

addNotify

public void addNotify()
Creates the peer of the checkbox item. This peer allows us to change the look of the checkbox item without changing its functionality. Most applications do not call this method directly.
Overrides:
addNotify in class MenuItem
See Also:
Toolkit.createCheckboxMenuItem(java.awt.CheckboxMenuItem), Component.getToolkit()

getState

public boolean getState()
Determines whether the state of this check box menu item is "on" or "off."
Returns:
the state of this check box menu item, where true indicates "on" and false indicates "off."
See Also:
setState(boolean)

setState

public void setState(boolean b)
Sets this check box menu item to the specifed state. The boolean value true indicates "on" while false indicates "off."
Parameters:
b - the boolean state of this check box menu item.
See Also:
getState()

getSelectedObjects

public Object[] getSelectedObjects()
Returns the an array (length 1) containing the checkbox menu item label or null if the checkbox is not selected.
Specified by:
getSelectedObjects in interface ItemSelectable
See Also:
ItemSelectable

addItemListener

public void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this check box menu item. If l is null, no exception is thrown and no action is performed.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the item listener
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, Choice.removeItemListener(java.awt.event.ItemListener)

removeItemListener

public void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this check box menu item. If l is null, no exception is thrown and no action is performed.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the item listener
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, Choice.addItemListener(java.awt.event.ItemListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the CheckboxMenuItem with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ItemListener(s) for the given CheckboxMenuItem c, one would write:
 ItemListener[] ils = (ItemListener[])(c.getListeners(ItemListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class MenuItem
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this checkbox menu item
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this check box menu item. If the event is an instance of ItemEvent, this method invokes the processItemEvent method. If the event is not an item event, it invokes processEvent on the superclass.

Check box menu items currently support only item events.

Overrides:
processEvent in class MenuItem
Parameters:
e - the event
Since:
JDK1.1
See Also:
ItemEvent, processItemEvent(java.awt.event.ItemEvent)

processItemEvent

protected void processItemEvent(ItemEvent e)
Processes item events occurring on this check box menu item by dispatching them to any registered ItemListener objects.

This method is not called unless item events are enabled for this menu item. Item events are enabled when one of the following occurs:

  • An ItemListener object is registered via addItemListener.
  • Item events are enabled via enableEvents.
Parameters:
e - the item event.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener), MenuItem.enableEvents(long)

paramString

public String paramString()
Returns the parameter string representing the state of this check box menu item. This string is useful for debugging.
Overrides:
paramString in class MenuItem
Returns:
the parameter string of this check box menu item.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this CheckboxMenuItem. For checkbox menu items, the AccessibleContext takes the form of an AccessibleAWTCheckboxMenuItem. A new AccessibleAWTCheckboxMenuItem is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class MenuItem
Returns:
an AccessibleAWTCheckboxMenuItem that serves as the AccessibleContext of this CheckboxMenuItem
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Choice

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Choice

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Choice
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable
public class Choice
extends Component
implements ItemSelectable, Accessible

The Choice class presents a pop-up menu of choices. The current choice is displayed as the title of the menu.

The following code example produces a pop-up menu:

 Choice ColorChooser = new Choice();
 ColorChooser.add("Green");
 ColorChooser.add("Red");
 ColorChooser.add("Blue");

After this choice menu has been added to a panel, it appears as follows in its normal state:

In the picture, "Green" is the current choice. Pushing the mouse button down on the object causes a menu to appear with the current choice highlighted.

Some native platforms do not support arbitrary resizing of Choice components and the behavior of setSize()/getSize() is bound by such limitations. Native GUI Choice components' size are often bound by such attributes as font size and length of items contained within the Choice.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class Choice.AccessibleAWTChoice
This class implements accessibility support for the Choice class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Choice()
Creates a new choice menu.
Method Summary
 void add(String item)
Adds an item to this Choice menu.
 void addItem(String item)
Adds an item to this Choice.
 void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this Choice menu.
 void addNotify()
Creates the Choice's peer.
 int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Choice.
 String getItem(int index)
Gets the string at the specified index in this Choice menu.
 int getItemCount()
Returns the number of items in this Choice menu.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Choice with addXXXListener(), where XXX is the name of the listenerType argument.
 int getSelectedIndex()
Returns the index of the currently selected item.
 String getSelectedItem()
Gets a representation of the current choice as a string.
 Object[] getSelectedObjects()
Returns an array (length 1) containing the currently selected item.
 void insert(String item, int index)
Inserts the item into this choice at the specified position.
protected  String paramString()
Returns the parameter string representing the state of this choice menu.
protected  void processEvent(AWTEvent e)
Processes events on this choice.
protected  void processItemEvent(ItemEvent e)
Processes item events occurring on this Choice menu by dispatching them to any registered ItemListener objects.
 void remove(int position)
Removes an item from the choice menu at the specified position.
 void remove(String item)
Remove the first occurrence of item from the Choice menu.
 void removeAll()
Removes all items from the choice menu.
 void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this Choice menu.
 void select(int pos)
Sets the selected item in this Choice menu to be the item at the specified position.
 void select(String str)
Sets the selected item in this Choice menu to be the item whose name is equal to the specified string.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Choice

public Choice()
Creates a new choice menu. The menu initially has no items in it.

By default, the first item added to the choice menu becomes the selected item, until a different selection is made by the user by calling one of the select methods.

See Also:
select(int), select(java.lang.String)
Method Detail

addNotify

public void addNotify()
Creates the Choice's peer. This peer allows us to change the look of the Choice without changing its functionality.
Overrides:
addNotify in class Component
See Also:
Toolkit.createChoice(java.awt.Choice), Component.getToolkit()

getItemCount

public int getItemCount()
Returns the number of items in this Choice menu.
Since:
JDK1.1
See Also:
getItem(int)

countItems

public int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().

getItem

public String getItem(int index)
Gets the string at the specified index in this Choice menu.
Parameters:
index - the index at which to begin.
See Also:
getItemCount()

add

public void add(String item)
Adds an item to this Choice menu.
Parameters:
item - the item to be added
Throws:
NullPointerException - if the item's value is null.
Since:
JDK1.1

addItem

public void addItem(String item)
Adds an item to this Choice.
Parameters:
item - the item to be added
Throws:
NullPointerException - If the item's value is equal to null.

insert

public void insert(String item,
                   int index)
Inserts the item into this choice at the specified position.
Parameters:
item - the item to be inserted
index - the position at which the item should be inserted
Throws:
IllegalArgumentException - if index is less than 0.

remove

public void remove(String item)
Remove the first occurrence of item from the Choice menu.
Parameters:
item - the item to remove from this Choice menu.
Throws:
IllegalArgumentException - if the item doesn't exist in the choice menu.
Since:
JDK1.1

remove

public void remove(int position)
Removes an item from the choice menu at the specified position.
Parameters:
position - the position of the item.
Since:
JDK1.1

removeAll

public void removeAll()
Removes all items from the choice menu.
Since:
JDK1.1
See Also:
remove(java.lang.String)

getSelectedItem

public String getSelectedItem()
Gets a representation of the current choice as a string.
Returns:
a string representation of the currently selected item in this choice menu.
See Also:
getSelectedIndex()

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array (length 1) containing the currently selected item. If this choice has no items, returns null.
Specified by:
getSelectedObjects in interface ItemSelectable
See Also:
ItemSelectable

getSelectedIndex

public int getSelectedIndex()
Returns the index of the currently selected item.
See Also:
getSelectedItem()

select

public void select(int pos)
Sets the selected item in this Choice menu to be the item at the specified position.
Parameters:
pos - the positon of the selected item.
Throws:
IllegalArgumentException - if the specified position is invalid.
See Also:
getSelectedItem(), getSelectedIndex()

select

public void select(String str)
Sets the selected item in this Choice menu to be the item whose name is equal to the specified string. If more than one item matches (is equal to) the specified string, the one with the smallest index is selected.
Parameters:
str - the specified string
See Also:
getSelectedItem(), getSelectedIndex()

addItemListener

public void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this Choice menu. If l is null, no exception is thrown and no action is performed.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the item listener.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, removeItemListener(java.awt.event.ItemListener)

removeItemListener

public void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this Choice menu. If l is null, no exception is thrown and no action is performed.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the item listener.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Choice with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ItemListener(s) for the given Choice c, one would write:
 ItemListener[] ils = (ItemListener[])(c.getListeners(ItemListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this choice
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this choice. If the event is an instance of ItemEvent, it invokes the processItemEvent method. Otherwise, it calls its superclass's processEvent method.
Overrides:
processEvent in class Component
Parameters:
e - the event.
Since:
JDK1.1
See Also:
ItemEvent, processItemEvent(java.awt.event.ItemEvent)

processItemEvent

protected void processItemEvent(ItemEvent e)
Processes item events occurring on this Choice menu by dispatching them to any registered ItemListener objects.

This method is not called unless item events are enabled for this component. Item events are enabled when one of the following occurs:

  • An ItemListener object is registered via addItemListener.
  • Item events are enabled via enableEvents.
Parameters:
e - the item event.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this choice menu. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this Choice menu.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Choice. For Choice components, the AccessibleContext takes the form of an AccessibleAWTChoice. A new AccessibleAWTChoice instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTChoice that serves as the AccessibleContext of this Choice
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.AWTError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AWTError

No usage of java.awt.AWTError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.AWTEventMulticaster

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AWTEventMulticaster

No usage of java.awt.AWTEventMulticaster

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.AWTPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AWTPermission

No usage of java.awt.AWTPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.BasicStroke

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.BasicStroke

No usage of java.awt.BasicStroke

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.BorderLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.BorderLayout

No usage of java.awt.BorderLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Button.AccessibleAWTButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Button.AccessibleAWTButton

No usage of java.awt.Button.AccessibleAWTButton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Canvas.AccessibleAWTCanvas

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Canvas.AccessibleAWTCanvas

No usage of java.awt.Canvas.AccessibleAWTCanvas

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.CardLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.CardLayout

No usage of java.awt.CardLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Checkbox.AccessibleAWTCheckbox

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Checkbox.AccessibleAWTCheckbox

No usage of java.awt.Checkbox.AccessibleAWTCheckbox

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem

No usage of java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Choice.AccessibleAWTChoice

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Choice.AccessibleAWTChoice

No usage of java.awt.Choice.AccessibleAWTChoice

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler

No usage of java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

No usage of java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler

No usage of java.awt.Container.AccessibleAWTContainer.AccessibleContainerHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.FlowLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.FlowLayout

No usage of java.awt.FlowLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GradientPaint

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GradientPaint

No usage of java.awt.GradientPaint

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GridBagLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GridBagLayout

No usage of java.awt.GridBagLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GridLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GridLayout

No usage of java.awt.GridLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Label.AccessibleAWTLabel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Label.AccessibleAWTLabel

No usage of java.awt.Label.AccessibleAWTLabel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.List.AccessibleAWTList.AccessibleAWTListChild

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.List.AccessibleAWTList.AccessibleAWTListChild

No usage of java.awt.List.AccessibleAWTList.AccessibleAWTListChild

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuBar.AccessibleAWTMenuBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuBar.AccessibleAWTMenuBar

No usage of java.awt.MenuBar.AccessibleAWTMenuBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PopupMenu.AccessibleAWTPopupMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PopupMenu.AccessibleAWTPopupMenu

No usage of java.awt.PopupMenu.AccessibleAWTPopupMenu

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Robot

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Robot

No usage of java.awt.Robot

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Scrollbar.AccessibleAWTScrollBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Scrollbar.AccessibleAWTScrollBar

No usage of java.awt.Scrollbar.AccessibleAWTScrollBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.ScrollPane.AccessibleAWTScrollPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.ScrollPane.AccessibleAWTScrollPane

No usage of java.awt.ScrollPane.AccessibleAWTScrollPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextArea.AccessibleAWTTextArea

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextArea.AccessibleAWTTextArea

No usage of java.awt.TextArea.AccessibleAWTTextArea

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextField.AccessibleAWTTextField

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextField.AccessibleAWTTextField

No usage of java.awt.TextField.AccessibleAWTTextField

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TexturePaint

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TexturePaint

No usage of java.awt.TexturePaint

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.PrintGraphics

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.PrintGraphics

No usage of java.awt.PrintGraphics

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.AlphaComposite

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AlphaComposite

Packages that use AlphaComposite
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of AlphaComposite in java.awt

Fields in java.awt declared as AlphaComposite
static AlphaComposite | AlphaComposite.Clear AlphaComposite object that implements the opaque CLEAR rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.Src AlphaComposite object that implements the opaque SRC rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.SrcOver AlphaComposite object that implements the opaque SRC_OVER rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.DstOver AlphaComposite object that implements the opaque DST_OVER rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.SrcIn AlphaComposite object that implements the opaque SRC_IN rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.DstIn AlphaComposite object that implements the opaque DST_IN rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.SrcOut AlphaComposite object that implements the opaque SRC_OUT rule with an alpha of 1.0f.
static AlphaComposite | AlphaComposite.DstOut AlphaComposite object that implements the opaque DST_OUT rule with an alpha of 1.0f.

Methods in java.awt that return AlphaComposite
static AlphaComposite | AlphaComposite.getInstance(int rule) Creates an AlphaComposite object with the specified rule.
static AlphaComposite | AlphaComposite.getInstance(int rule, float alpha) Creates an AlphaComposite object with the specified rule and the constant alpha to multiply with the alpha of the source.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.AWTEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AWTEvent

Packages that use AWTEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
javax.swing.event | Provides for events fired by Swing components.

Uses of AWTEvent in java.awt

Methods in java.awt that return AWTEvent
protected AWTEvent | Component.coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent) Potentially coalesce an event being posted with an existing event.
AWTEvent | EventQueue.getNextEvent() Remove an event from the EventQueue and return it.
AWTEvent | EventQueue.peekEvent() Return the first event on the EventQueue without removing it.
AWTEvent | EventQueue.peekEvent(int id) Return the first event with the specified id, if any.

Methods in java.awt with parameters of type AWTEvent
void | Component.dispatchEvent(AWTEvent e) Dispatches an event to this component or one of its sub components.
protected AWTEvent | Component.coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent) Potentially coalesce an event being posted with an existing event.
protected void | Component.processEvent(AWTEvent e) Processes events occurring on this component.
protected void | Container.processEvent(AWTEvent e) Processes events on this container.
protected void | Scrollbar.processEvent(AWTEvent e) Processes events on this scroll bar.
void | MenuComponent.dispatchEvent(AWTEvent e)
protected void | MenuComponent.processEvent(AWTEvent e) Processes events occurring on this menu component.
protected void | MenuItem.processEvent(AWTEvent e) Processes events on this menu item.
protected void | Checkbox.processEvent(AWTEvent e) Processes events on this check box.
protected void | Window.processEvent(AWTEvent e) Processes events on this window.
protected void | List.processEvent(AWTEvent e) Processes events on this scrolling list.
protected void | TextComponent.processEvent(AWTEvent e) Processes events on this text component.
protected void | Choice.processEvent(AWTEvent e) Processes events on this choice.
void | EventQueue.postEvent(AWTEvent theEvent) Post a 1.1-style event to the EventQueue.
protected void | EventQueue.dispatchEvent(AWTEvent event) Dispatch an event.
protected void | TextField.processEvent(AWTEvent e) Processes events on this text field.
protected void | Button.processEvent(AWTEvent e) Processes events on this button.
protected void | CheckboxMenuItem.processEvent(AWTEvent e) Processes events on this check box menu item.

Uses of AWTEvent in java.awt.event

Subclasses of AWTEvent in java.awt.event
class | ActionEvent A semantic event which indicates that a component-defined action occured.
class | AdjustmentEvent The adjustment event emitted by Adjustable objects.
class | ComponentEvent A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
class | ContainerEvent A low-level event which indicates that a container's contents changed because a component was added or removed.
class | FocusEvent A low-level event which indicates that a component has gained or lost the keyboard focus.
class | HierarchyEvent An event which indicates a change to the Component hierarchy to which a Component belongs.
class | InputEvent The root event class for all component-level input events.
class | InputMethodEvent Input method events contain information about text that is being composed using an input method.
class | InvocationEvent An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
class | ItemEvent A semantic event which indicates that an item was selected or deselected.
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.
class | PaintEvent The component-level paint event.
class | TextEvent A semantic event which indicates that an object's text changed.
class | WindowEvent A low-level event which indicates that a window has changed its status.

Methods in java.awt.event with parameters of type AWTEvent
 void AWTEventListener.eventDispatched(AWTEvent event)
Invoked when an event is dispatched in the AWT.

Uses of AWTEvent in java.awt.im

Methods in java.awt.im with parameters of type AWTEvent
 void InputContext.dispatchEvent(AWTEvent event)
Dispatches an event to the active input method.

Uses of AWTEvent in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type AWTEvent
 void InputMethod.dispatchEvent(AWTEvent event)
Dispatches the event to the input method.

Uses of AWTEvent in javax.swing.event

Subclasses of AWTEvent in javax.swing.event
class | AncestorEvent An event reported to a child component that originated from an ancestor in the component hierarchy.
class | InternalFrameEvent InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.AWTException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.AWTException

Packages that use AWTException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Uses of AWTException in java.awt

Methods in java.awt that throw AWTException
static Cursor Cursor.getSystemCustomCursor(String name)

Constructors in java.awt that throw AWTException
Robot()
Constructs a Robot object in the coordinate system of the primary screen.
Robot(GraphicsDevice screen)
Creates a Robot for the given screen device.

Uses of AWTException in java.awt.im.spi

Methods in java.awt.im.spi that throw AWTException
 Locale[] InputMethodDescriptor.getAvailableLocales()
Returns the locales supported by the corresponding input method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Button

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Button

Packages that use Button
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Button in java.awt

Methods in java.awt with parameters of type Button
protected abstract  java.awt.peer.ButtonPeer Toolkit.createButton(Button target)
Creates this toolkit's implementation of Button using the specified peer interface.

Constructors in java.awt with parameters of type Button
Button.AccessibleAWTButton()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Canvas

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Canvas

Packages that use Canvas
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Canvas in java.awt

Methods in java.awt with parameters of type Canvas
protected abstract  java.awt.peer.CanvasPeer Toolkit.createCanvas(Canvas target)
Creates this toolkit's implementation of Canvas using the specified peer interface.

Constructors in java.awt with parameters of type Canvas
Canvas.AccessibleAWTCanvas()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Checkbox

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Checkbox

Packages that use Checkbox
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Checkbox in java.awt

Methods in java.awt that return Checkbox
 Checkbox CheckboxGroup.getSelectedCheckbox()
Gets the current choice from this check box group.
 Checkbox CheckboxGroup.getCurrent()
Deprecated. As of JDK version 1.1, replaced by getSelectedCheckbox().

Methods in java.awt with parameters of type Checkbox
protected abstract java.awt.peer.CheckboxPeer | Toolkit.createCheckbox(Checkbox target) Creates this toolkit's implementation of Checkbox using the specified peer interface.
void | CheckboxGroup.setSelectedCheckbox(Checkbox box) Sets the currently selected check box in this group to be the specified check box.
void | CheckboxGroup.setCurrent(Checkbox box) Deprecated. As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).

Constructors in java.awt with parameters of type Checkbox
Checkbox.AccessibleAWTCheckbox()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.CheckboxGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.CheckboxGroup

Packages that use CheckboxGroup
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of CheckboxGroup in java.awt

Methods in java.awt that return CheckboxGroup
 CheckboxGroup Checkbox.getCheckboxGroup()
Determines this check box's group.

Methods in java.awt with parameters of type CheckboxGroup
 void Checkbox.setCheckboxGroup(CheckboxGroup g)
Sets this check box's group to be the specified check box group.

Constructors in java.awt with parameters of type CheckboxGroup
Checkbox(String label, boolean state, CheckboxGroup group)
Creates a check box with the specified label, in the specified check box group, and set to the specified state.
Checkbox(String label, CheckboxGroup group, boolean state)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.CheckboxMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.CheckboxMenuItem

Packages that use CheckboxMenuItem
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of CheckboxMenuItem in java.awt

Methods in java.awt with parameters of type CheckboxMenuItem
protected abstract  java.awt.peer.CheckboxMenuItemPeer Toolkit.createCheckboxMenuItem(CheckboxMenuItem target)
Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.

Constructors in java.awt with parameters of type CheckboxMenuItem
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Choice

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Choice

Packages that use Choice
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Choice in java.awt

Methods in java.awt with parameters of type Choice
protected abstract  java.awt.peer.ChoicePeer Toolkit.createChoice(Choice target)
Creates this toolkit's implementation of Choice using the specified peer interface.

Constructors in java.awt with parameters of type Choice
Choice.AccessibleAWTChoice()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Color

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Color

Packages that use Color
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Color in java.awt

Subclasses of Color in java.awt
 class SystemColor
A class to encapsulate symbolic colors representing the color of GUI objects on a system.

Fields in java.awt declared as Color
static Color | Color.white The color white.
static Color | Color.lightGray The color light gray.
static Color | Color.gray The color gray.
static Color | Color.darkGray The color dark gray.
static Color | Color.black The color black.
static Color | Color.red The color red.
static Color | Color.pink The color pink.
static Color | Color.orange The color orange.
static Color | Color.yellow The color yellow.
static Color | Color.green The color green.
static Color | Color.magenta The color magenta.
static Color | Color.cyan The color cyan.
static Color | Color.blue The color blue.

Methods in java.awt that return Color
Color | Component.getForeground() Gets the foreground color of this component.
Color | Component.getBackground() Gets the background color of this component.
Color | Component.AccessibleAWTComponent.getBackground() Get the background color of this object.
Color | Component.AccessibleAWTComponent.getForeground() Get the foreground color of this object.
Color | MenuComponent.AccessibleAWTMenuComponent.getBackground() Get the background color of this object.
Color | MenuComponent.AccessibleAWTMenuComponent.getForeground() Get the foreground color of this object.
abstract Color | Graphics.getColor() Gets this graphics context's current color.
abstract Color | Graphics2D.getBackground() Returns the background color used for clearing a region.
Color | GradientPaint.getColor1() Returns the color C1 anchored by the point P1.
Color | GradientPaint.getColor2() Returns the color C2 anchored by the point P2.
Color | Color.brighter() Creates a new Color that is a brighter version of this Color.
Color | Color.darker() Creates a new Color that is a darker version of this Color.
static Color | Color.decode(String nm) Converts a String to an integer and returns the specified opaque Color.
static Color | Color.getColor(String nm) Finds a color in the system properties.
static Color | Color.getColor(String nm, Color v) Finds a color in the system properties.
static Color | Color.getColor(String nm, int v) Finds a color in the system properties.
static Color | Color.getHSBColor(float h, float s, float b) Creates a Color object based on the specified values for the HSB color model.
Color | List.AccessibleAWTList.AccessibleAWTListChild.getBackground() Get the background color of this object.
Color | List.AccessibleAWTList.AccessibleAWTListChild.getForeground() Get the foreground color of this object.
Color | TextComponent.getBackground() Gets the background color of this text component.
Color | Robot.getPixelColor(int x, int y) Returns the color of a pixel at the given screen coordinates.

Methods in java.awt with parameters of type Color
void | Component.setForeground(Color c) Sets the foreground color of this component.
void | Component.setBackground(Color c) Sets the background color of this component.
void | Component.AccessibleAWTComponent.setBackground(Color c) Set the background color of this object.
void | Component.AccessibleAWTComponent.setForeground(Color c) Set the foreground color of this object.
void | MenuComponent.AccessibleAWTMenuComponent.setBackground(Color c) Set the background color of this object.
void | MenuComponent.AccessibleAWTMenuComponent.setForeground(Color c) Set the foreground color of this object.
abstract void | Graphics.setColor(Color c) Sets this graphics context's current color to the specified color.
abstract void | Graphics.setXORMode(Color c1) Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.
abstract boolean | Graphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.
abstract boolean | Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract boolean | Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract void | Graphics2D.setBackground(Color color) Sets the background color for the Graphics2D context.
static Color | Color.getColor(String nm, Color v) Finds a color in the system properties.
void | List.AccessibleAWTList.AccessibleAWTListChild.setBackground(Color c) Set the background color of this object.
void | List.AccessibleAWTList.AccessibleAWTListChild.setForeground(Color c) Set the foreground color of this object.
void | TextComponent.setBackground(Color c) Sets the background color of this text component.

Constructors in java.awt with parameters of type Color
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
Constructs a simple acyclic GradientPaint object.
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
Constructs a simple acyclic GradientPaint object.
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.

Uses of Color in javax.accessibility

Methods in javax.accessibility that return Color
Color | AccessibleComponent.getBackground() Gets the background color of this object.
Color | AccessibleComponent.getForeground() Gets the foreground color of this object.

Methods in javax.accessibility with parameters of type Color
void | AccessibleComponent.setBackground(Color c) Sets the background color of this object.
void | AccessibleComponent.setForeground(Color c) Sets the foreground color of this object.

Uses of Color in javax.swing

Fields in javax.swing declared as Color
protected Color | JTable.gridColor The color of the grid.
protected Color | JTable.selectionForeground The foreground color of selected cells.
protected Color | JTable.selectionBackground The background color of selected cells.

Methods in javax.swing that return Color
Color | JTabbedPane.getBackgroundAt(int index) Returns the tab background color at index.
Color | JTabbedPane.getForegroundAt(int index) Returns the tab foreground color at index.
static Color | JColorChooser.showDialog(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.
Color | JColorChooser.getColor() Gets the current color value from the color chooser.
Color | JList.getSelectionForeground() Returns the selection foreground color.
Color | JList.getSelectionBackground() Returns the background color for selected cells.
Color | JList.AccessibleJList.AccessibleJListChild.getBackground()
Color | JList.AccessibleJList.AccessibleJListChild.getForeground()
Color | UIDefaults.getColor(Object key) If the value of key is a Color return it, otherwise return null.
Color | JTree.AccessibleJTree.AccessibleJTreeNode.getBackground() Get the background color of this object.
Color | JTree.AccessibleJTree.AccessibleJTreeNode.getForeground() Get the foreground color of this object.
Color | JTable.getGridColor() Returns the color used to draw grid lines.
Color | JTable.getSelectionForeground() Returns the foreground color for selected cells.
Color | JTable.getSelectionBackground() Returns the background color for selected cells.
Color | JTable.AccessibleJTable.AccessibleJTableCell.getBackground() Gets the background color of this object.
Color | JTable.AccessibleJTable.AccessibleJTableCell.getForeground() Gets the foreground color of this object.
static Color | UIManager.getColor(Object key) Returns a drawing color from the defaults table.
static Color | DebugGraphics.flashColor() Returns the Color used to flash drawing operations.
Color | DebugGraphics.getColor() Returns the Color used for text drawing operations.

Methods in javax.swing with parameters of type Color
void | JComponent.setForeground(Color fg) Sets the foreground color of this component.
void | JComponent.setBackground(Color bg) Sets the background color of this component.
void | JTabbedPane.setBackgroundAt(int index, Color background) Sets the background color at index to background which can be null, in which case the tab's background color will default to the background color of the tabbedpane.
void | JTabbedPane.setForegroundAt(int index, Color foreground) Sets the foreground color at index to foreground which can be null, in which case the tab's foreground color will default to the foreground color of this tabbedpane.
static Border | BorderFactory.createLineBorder(Color color) Creates a line border withe the specified color.
static Border | BorderFactory.createLineBorder(Color color, int thickness) Creates a line border with the specified color and width.
static Border | BorderFactory.createBevelBorder(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.
static Border | BorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
static Border | BorderFactory.createEtchedBorder(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static Border | BorderFactory.createEtchedBorder(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
static MatteBorder | BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color) Creates a matte-look border using a solid color.
static Color | JColorChooser.showDialog(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.
void | JColorChooser.setColor(Color color) Sets the current color of the color chooser to the specified color.
void | JList.setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.
void | JList.setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.
void | JList.AccessibleJList.AccessibleJListChild.setBackground(Color c)
void | JList.AccessibleJList.AccessibleJListChild.setForeground(Color c)
void | JTree.AccessibleJTree.AccessibleJTreeNode.setBackground(Color c) Set the background color of this object.
void | JTree.AccessibleJTree.AccessibleJTreeNode.setForeground(Color c)
void | JTable.setGridColor(Color gridColor) Sets the color used to draw grid lines to gridColor and redisplays.
void | JTable.setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.
void | JTable.setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.
void | JTable.AccessibleJTable.AccessibleJTableCell.setBackground(Color c) Sets the background color of this object.
void | JTable.AccessibleJTable.AccessibleJTableCell.setForeground(Color c) Sets the foreground color of this object.
static void | DebugGraphics.setFlashColor(Color flashColor) Sets the Color used to flash drawing operations.
void | DebugGraphics.setColor(Color aColor) Sets the color to be used for drawing and filling lines and shapes.
void | DebugGraphics.setXORMode(Color aColor) Overrides Graphics.setXORMode.
boolean | DebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.

Constructors in javax.swing with parameters of type Color
JColorChooser(Color initialColor)
Creates a color chooser pane with the specified initial color.

Uses of Color in javax.swing.border

Fields in javax.swing.border declared as Color
protected Color | BevelBorder.highlightOuter
protected Color | BevelBorder.highlightInner
protected Color | BevelBorder.shadowInner
protected Color | BevelBorder.shadowOuter
protected Color | MatteBorder.color
protected Color | LineBorder.lineColor
protected Color | TitledBorder.titleColor
protected Color | EtchedBorder.highlight
protected Color | EtchedBorder.shadow

Methods in javax.swing.border that return Color
Color | BevelBorder.getHighlightOuterColor(Component c) Returns the outer highlight color of the bevel border when rendered on the specified component.
Color | BevelBorder.getHighlightInnerColor(Component c) Returns the inner highlight color of the bevel border when rendered on the specified component.
Color | BevelBorder.getShadowInnerColor(Component c) Returns the inner shadow color of the bevel border when rendered on the specified component.
Color | BevelBorder.getShadowOuterColor(Component c) Returns the outer shadow color of the bevel border when rendered on the specified component.
Color | BevelBorder.getHighlightOuterColor() Returns the outer highlight color of the bevel border.
Color | BevelBorder.getHighlightInnerColor() Returns the inner highlight color of the bevel border.
Color | BevelBorder.getShadowInnerColor() Returns the inner shadow color of the bevel border.
Color | BevelBorder.getShadowOuterColor() Returns the outer shadow color of the bevel border.
Color | MatteBorder.getMatteColor() Returns the color used for tiling the border or null if a tile icon is being used.
Color | LineBorder.getLineColor() Returns the color of the border.
Color | TitledBorder.getTitleColor() Returns the title-color of the titled border.
Color | EtchedBorder.getHighlightColor(Component c) Returns the highlight color of the etched border when rendered on the specified component.
Color | EtchedBorder.getHighlightColor() Returns the highlight color of the etched border.
Color | EtchedBorder.getShadowColor(Component c) Returns the shadow color of the etched border when rendered on the specified component.
Color | EtchedBorder.getShadowColor() Returns the shadow color of the etched border.

Methods in javax.swing.border with parameters of type Color
 void TitledBorder.setTitleColor(Color titleColor)
Sets the title-color of the titled border.

Constructors in javax.swing.border with parameters of type Color
BevelBorder(int bevelType, Color highlight, Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
SoftBevelBorder(int bevelType, Color highlight, Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
MatteBorder(int top, int left, int bottom, int right, Color matteColor)
Creates a matte border with the specified insets and color.
MatteBorder(Insets borderInsets, Color matteColor)
Creates a matte border with the specified insets and color.
LineBorder(Color color)
Creates a line border with the specified color and a thickness = 1.
LineBorder(Color color, int thickness)
Creates a line border with the specified color and thickness.
LineBorder(Color color, int thickness, boolean roundedCorners)
Creates a line border with the specified color, thickness, and corner shape.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
EtchedBorder(Color highlight, Color shadow)
Creates a lowered etched border with the specified highlight and shadow colors.
EtchedBorder(int etchType, Color highlight, Color shadow)
Creates an etched border with the specified etch-type, highlight and shadow colors.

Uses of Color in javax.swing.colorchooser

Methods in javax.swing.colorchooser that return Color
Color | DefaultColorSelectionModel.getSelectedColor()
Color | ColorSelectionModel.getSelectedColor()
protected Color | AbstractColorChooserPanel.getColorFromModel() Returns the color that is currently selected.

Methods in javax.swing.colorchooser with parameters of type Color
void | DefaultColorSelectionModel.setSelectedColor(Color color)
void | ColorSelectionModel.setSelectedColor(Color color) Sets the model's selected color to color.

Constructors in javax.swing.colorchooser with parameters of type Color
DefaultColorSelectionModel(Color color)
Initializes selectedColor to color

Uses of Color in javax.swing.plaf

Subclasses of Color in javax.swing.plaf
 class ColorUIResource

Constructors in javax.swing.plaf with parameters of type Color
ColorUIResource(Color c)
BorderUIResource.LineBorderUIResource(Color color)
BorderUIResource.LineBorderUIResource(Color color, int thickness)
BorderUIResource.BevelBorderUIResource(int bevelType, Color highlight, Color shadow)
BorderUIResource.BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
BorderUIResource.EtchedBorderUIResource(Color highlight, Color shadow)
BorderUIResource.EtchedBorderUIResource(int etchType, Color highlight, Color shadow)
BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)

Uses of Color in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Color
protected Color | BasicSeparatorUI.shadow
protected Color | BasicSeparatorUI.highlight
protected Color | BasicMenuItemUI.selectionBackground
protected Color | BasicMenuItemUI.selectionForeground
protected Color | BasicMenuItemUI.disabledForeground
protected Color | BasicMenuItemUI.acceleratorForeground
protected Color | BasicMenuItemUI.acceleratorSelectionForeground
protected Color | BasicTabbedPaneUI.highlight
protected Color | BasicTabbedPaneUI.lightHighlight
protected Color | BasicTabbedPaneUI.shadow
protected Color | BasicTabbedPaneUI.darkShadow
protected Color | BasicTabbedPaneUI.focus
protected Color | BasicInternalFrameTitlePane.selectedTitleColor
protected Color | BasicInternalFrameTitlePane.selectedTextColor
protected Color | BasicInternalFrameTitlePane.notSelectedTitleColor
protected Color | BasicInternalFrameTitlePane.notSelectedTextColor
protected Color | BasicScrollBarUI.thumbHighlightColor
protected Color | BasicScrollBarUI.thumbLightShadowColor
protected Color | BasicScrollBarUI.thumbDarkShadowColor
protected Color | BasicScrollBarUI.thumbColor
protected Color | BasicScrollBarUI.trackColor
protected Color | BasicScrollBarUI.trackHighlightColor
protected Color | BasicBorders.ButtonBorder.shadow
protected Color | BasicBorders.ButtonBorder.darkShadow
protected Color | BasicBorders.ButtonBorder.highlight
protected Color | BasicBorders.ButtonBorder.lightHighlight
protected Color | BasicBorders.FieldBorder.shadow
protected Color | BasicBorders.FieldBorder.darkShadow
protected Color | BasicBorders.FieldBorder.highlight
protected Color | BasicBorders.FieldBorder.lightHighlight
protected Color | BasicBorders.SplitPaneBorder.highlight
protected Color | BasicBorders.SplitPaneBorder.shadow
protected Color | BasicToolBarUI.dockingColor
protected Color | BasicToolBarUI.floatingColor
protected Color | BasicToolBarUI.dockingBorderColor
protected Color | BasicToolBarUI.floatingBorderColor

Methods in javax.swing.plaf.basic that return Color
protected Color | BasicProgressBarUI.getSelectionForeground() The "selectionForeground" is the color of the text when it is drawn over a filled area of the progress bar.
protected Color | BasicProgressBarUI.getSelectionBackground() The "selectionBackground" is the color of the text when it is drawn over an unfilled area of the progress bar.
Color | BasicToolBarUI.getDockingColor() Gets the color displayed when over a docking area
Color | BasicToolBarUI.getFloatingColor() Gets the color displayed when over a floating area
Color | BasicToolBarUI.DragWindow.getBorderColor()
protected Color | BasicTreeUI.getHashColor()
protected Color | BasicSliderUI.getShadowColor()
protected Color | BasicSliderUI.getHighlightColor()
protected Color | BasicSliderUI.getFocusColor()

Methods in javax.swing.plaf.basic with parameters of type Color
protected void | BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
static void | BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void | BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
static void | BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void | BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
void | BasicToolBarUI.setDockingColor(Color c) Sets the color displayed when over a docking area
void | BasicToolBarUI.setFloatingColor(Color c) Sets the color displayed when over a floating area
void | BasicToolBarUI.DragWindow.setBorderColor(Color c)
protected void | BasicTreeUI.setHashColor(Color color)

Constructors in javax.swing.plaf.basic with parameters of type Color
BasicBorders.ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
BasicBorders.ToggleButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
BasicBorders.RadioButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
BasicBorders.MenuBarBorder(Color shadow, Color highlight)
BasicBorders.FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
BasicBorders.SplitPaneBorder(Color highlight, Color shadow)

Uses of Color in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as Color
protected Color | MetalToggleButtonUI.focusColor
protected Color | MetalToggleButtonUI.selectColor
protected Color | MetalToggleButtonUI.disabledTextColor
protected Color | MetalTabbedPaneUI.tabAreaBackground
protected Color | MetalTabbedPaneUI.selectColor
protected Color | MetalTabbedPaneUI.selectHighlight
protected Color | MetalRadioButtonUI.focusColor
protected Color | MetalRadioButtonUI.selectColor
protected Color | MetalRadioButtonUI.disabledTextColor
protected static Color | MetalSliderUI.thumbColor
protected static Color | MetalSliderUI.highlightColor
protected static Color | MetalSliderUI.darkShadowColor
protected Color | MetalButtonUI.focusColor
protected Color | MetalButtonUI.selectColor
protected Color | MetalButtonUI.disabledTextColor

Methods in javax.swing.plaf.metal that return Color
protected Color | MetalToggleButtonUI.getSelectColor()
protected Color | MetalToggleButtonUI.getDisabledTextColor()
protected Color | MetalToggleButtonUI.getFocusColor()
protected Color | MetalTabbedPaneUI.getColorForGap(int currentRun, int x, int y)
protected Color | MetalRadioButtonUI.getSelectColor()
protected Color | MetalRadioButtonUI.getDisabledTextColor()
protected Color | MetalRadioButtonUI.getFocusColor()
protected Color | MetalButtonUI.getSelectColor()
protected Color | MetalButtonUI.getDisabledTextColor()
protected Color | MetalButtonUI.getFocusColor()

Uses of Color in javax.swing.table

Methods in javax.swing.table that return Color
Color | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()
Color | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()

Methods in javax.swing.table with parameters of type Color
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(Color c)
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(Color c)
void | DefaultTableCellRenderer.setForeground(Color c) Overrides JComponent.setForeground to assign the unselected-foreground color to the specified color.
void | DefaultTableCellRenderer.setBackground(Color c) Overrides JComponent.setForeground to assign the unselected-background color to the specified color.

Uses of Color in javax.swing.text

Methods in javax.swing.text that return Color
Color | JTextComponent.getCaretColor() Fetches the current color used to render the caret.
Color | JTextComponent.getSelectionColor() Fetches the current color used to render the selection.
Color | JTextComponent.getSelectedTextColor() Fetches the current color used to render the selected text.
Color | JTextComponent.getDisabledTextColor() Fetches the current color used to render the selected text.
Color | StyleContext.getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
Color | StyleContext.getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
Color | GlyphView.getBackground() Fetch the background color to use to render the glyphs.
Color | GlyphView.getForeground() Fetch the foreground color to use to render the glyphs.
Color | LabelView.getBackground() Fetch the background color to use to render the glyphs.
Color | LabelView.getForeground() Fetch the foreground color to use to render the glyphs.
static Color | StyleConstants.getForeground(AttributeSet a) Gets the foreground color setting from the attribute list.
static Color | StyleConstants.getBackground(AttributeSet a) Gets the background color setting from the attribute list.
Color | DefaultHighlighter.DefaultHighlightPainter.getColor() Returns the color of the highlight.
Color | StyledDocument.getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
Color | StyledDocument.getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
Color | DefaultStyledDocument.getForeground(AttributeSet attr) Gets the foreground color from an attribute set.
Color | DefaultStyledDocument.getBackground(AttributeSet attr) Gets the background color from an attribute set.

Methods in javax.swing.text with parameters of type Color
void | JTextComponent.setCaretColor(Color c) Sets the current color used to render the caret.
void | JTextComponent.setSelectionColor(Color c) Sets the current color used to render the selection.
void | JTextComponent.setSelectedTextColor(Color c) Sets the current color used to render the selected text.
void | JTextComponent.setDisabledTextColor(Color c) Sets the current color used to render the disabled text.
static void | StyleConstants.setForeground(MutableAttributeSet a, Color fg) Sets the foreground color.
static void | StyleConstants.setBackground(MutableAttributeSet a, Color fg) Sets the background color.

Constructors in javax.swing.text with parameters of type Color
DefaultHighlighter.DefaultHighlightPainter(Color c)
Constructs a new highlight painter.
StyledEditorKit.ForegroundAction(String nm, Color fg)
Creates a new ForegroundAction.

Uses of Color in javax.swing.text.html

Methods in javax.swing.text.html that return Color
Color | StyleSheet.getForeground(AttributeSet a) Takes a set of attributes and turn it into a foreground color specification.
Color | StyleSheet.getBackground(AttributeSet a) Takes a set of attributes and turn it into a background color specification.
Color | StyleSheet.stringToColor(String string) Converts a color string such as "RED" or "#NNNNNN" to a Color.

Uses of Color in javax.swing.tree

Fields in javax.swing.tree declared as Color
protected Color | DefaultTreeCellRenderer.textSelectionColor Color to use for the foreground for selected nodes.
protected Color | DefaultTreeCellRenderer.textNonSelectionColor Color to use for the foreground for non-selected nodes.
protected Color | DefaultTreeCellRenderer.backgroundSelectionColor Color to use for the background when a node is selected.
protected Color | DefaultTreeCellRenderer.backgroundNonSelectionColor Color to use for the background when the node isn't selected.
protected Color | DefaultTreeCellRenderer.borderSelectionColor Color to use for the background when the node isn't selected.
protected Color | DefaultTreeCellEditor.borderSelectionColor True if the border selection color should be drawn.

Methods in javax.swing.tree that return Color
Color | DefaultTreeCellRenderer.getTextSelectionColor() Returns the color the text is drawn with when the node is selected.
Color | DefaultTreeCellRenderer.getTextNonSelectionColor() Returns the color the text is drawn with when the node isn't selected.
Color | DefaultTreeCellRenderer.getBackgroundSelectionColor() Returns the color to use for the background if node is selected.
Color | DefaultTreeCellRenderer.getBackgroundNonSelectionColor() Returns the background color to be used for non selected nodes.
Color | DefaultTreeCellRenderer.getBorderSelectionColor() Returns the color the border is drawn.
Color | DefaultTreeCellEditor.getBorderSelectionColor() Returns the color the border is drawn.

Methods in javax.swing.tree with parameters of type Color
void | DefaultTreeCellRenderer.setTextSelectionColor(Color newColor) Sets the color the text is drawn with when the node is selected.
void | DefaultTreeCellRenderer.setTextNonSelectionColor(Color newColor) Sets the color the text is drawn with when the node isn't selected.
void | DefaultTreeCellRenderer.setBackgroundSelectionColor(Color newColor) Sets the color to use for the background if node is selected.
void | DefaultTreeCellRenderer.setBackgroundNonSelectionColor(Color newColor) Sets the background color to be used for non selected nodes.
void | DefaultTreeCellRenderer.setBorderSelectionColor(Color newColor) Sets the color to use for the border.
void | DefaultTreeCellRenderer.setBackground(Color color) Subclassed to map ColorUIResources to null.
void | DefaultTreeCellEditor.setBorderSelectionColor(Color newColor) Sets the color to use for the border.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Component

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Component

Packages that use Component
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.im | Provides classes and interfaces for the input method framework.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Component in java.applet

Subclasses of Component in java.applet
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of Component in java.awt

Subclasses of Component in java.awt
class | Button This class creates a labeled button.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
class | Choice The Choice class presents a pop-up menu of choices.
class | Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.
class | Label A Label object is a component for placing text in a container.
class | List The List component presents the user with a scrolling list of text items.
class | Panel Panel is the simplest container class.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
class | TextArea A TextArea object is a multi-line region that displays text.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
class | Window A Window object is a top-level window with no borders and no menubar.

Methods in java.awt that return Component
 Component Component.getComponentAt(int x, int y)
Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component.
 Component Component.locate(int x, int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Component Component.getComponentAt(Point p)
Returns the component or subcomponent that contains the specified point.
 Component Container.getComponent(int n)
Gets the nth component in this container.
 Component[] Container.getComponents()
Gets all the components in this container.
 Component Container.add(Component comp)
Adds the specified component to the end of this container.
 Component Container.add(String name, Component comp)
Adds the specified component to this container.
 Component Container.add(Component comp, int index)
Adds the specified component to this container at the given position.
 Component Container.getComponentAt(int x, int y)
Locates the component that contains the x,y position.
 Component Container.locate(int x, int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Component Container.getComponentAt(Point p)
Gets the component that contains the specified point.
 Component Container.findComponentAt(int x, int y)
Locates the visible child component that contains the specified position.
 Component Container.findComponentAt(Point p)
Locates the visible child component that contains the specified point.
 Component Window.getFocusOwner()
Returns the child component of this Window which has focus if and only if this Window is active.

Methods in java.awt with parameters of type Component
 Component Container.add(Component comp)
Adds the specified component to the end of this container.
 Component Container.add(String name, Component comp)
Adds the specified component to this container.
 Component Container.add(Component comp, int index)
Adds the specified component to this container at the given position.
 void Container.add(Component comp, Object constraints)
Adds the specified component to the end of this container.
 void Container.add(Component comp, Object constraints, int index)
Adds the specified component to this container with the specified constraints at the specified index.
protected  void Container.addImpl(Component comp, Object constraints, int index)
Adds the specified component to this container at the specified index.
 void Container.remove(Component comp)
Removes the specified component from this container.
 boolean Container.isAncestorOf(Component c)
Checks if the component is contained in the component hierarchy of this container.
 void LayoutManager2.addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
 void CardLayout.addLayoutComponent(Component comp, Object constraints)
Adds the specified component to this card layout's internal table of names.
 void CardLayout.addLayoutComponent(String name, Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).
 void CardLayout.removeLayoutComponent(Component comp)
Removes the specified component from the layout.
protected  void ScrollPane.addImpl(Component comp, Object constraints, int index)
Adds the specified component to this scroll pane container.
 void GridLayout.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
 void GridLayout.removeLayoutComponent(Component comp)
Removes the specified component from the layout.
 void BorderLayout.addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
 void BorderLayout.addLayoutComponent(String name, Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).
 void BorderLayout.removeLayoutComponent(Component comp)
Removes the specified component from this border layout.
 void LayoutManager.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
 void LayoutManager.removeLayoutComponent(Component comp)
Removes the specified component from the layout.
protected  java.awt.peer.LightweightPeer Toolkit.createComponent(Component target)
Creates a peer for a component or container.
protected static Container Toolkit.getNativeContainer(Component c)
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
 DragGestureRecognizer Toolkit.createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation
 void PopupMenu.show(Component origin, int x, int y)
Shows the popup menu at the x, y position relative to an origin component.
 void GridBagLayout.setConstraints(Component comp, GridBagConstraints constraints)
Sets the constraints for the specified component in this layout.
 GridBagConstraints GridBagLayout.getConstraints(Component comp)
Gets the constraints for the specified component.
protected  GridBagConstraints GridBagLayout.lookupConstraints(Component comp)
Retrieves the constraints for the specified component.
 void GridBagLayout.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
 void GridBagLayout.addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
 void GridBagLayout.removeLayoutComponent(Component comp)
Removes the specified component from this layout.
 void FlowLayout.addLayoutComponent(String name, Component comp)
Adds the specified component to the layout.
 void FlowLayout.removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Constructors in java.awt with parameters of type Component
Component.AccessibleAWTComponent()
Though the class is abstract, this should be called by all sub-classes.
MediaTracker(Component comp)
Creates a media tracker to track images for a given component.

Uses of Component in java.awt.dnd

Fields in java.awt.dnd declared as Component
protected  Component DragGestureRecognizer.component
The Component associated with this DragGestureRecognizer.

Methods in java.awt.dnd that return Component
Component | DropTargetContext.getComponent() This method returns the Component associated with this DropTargetContext.
Component | DragGestureRecognizer.getComponent() This method returns the Component that is to be "observed" by the DragGestureRecognizer for drag initiating gestures.
Component | DragSourceContext.getComponent() This method returns the Component associated with this DragSourceContext.
Component | DragGestureEvent.getComponent() This method returns the Component associated with this DragGestureEvent.
Component | DropTarget.getComponent() This method returns the Component associated with this DropTarget.

Methods in java.awt.dnd with parameters of type Component
 void DragGestureRecognizer.setComponent(Component c)
set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.
 DragGestureRecognizer DragSource.createDragGestureRecognizer(Class recognizerAbstractClass, Component c, int actions, DragGestureListener dgl)
Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
 DragGestureRecognizer DragSource.createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl)
Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.
 void DropTarget.setComponent(Component c)
Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget); or droptarget.setComponent(component);
protected  DropTarget.DropTargetAutoScroller DropTarget.createDropTargetAutoScroller(Component c, Point p)
create an embedded autoscroller

Constructors in java.awt.dnd with parameters of type Component
DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.
DragGestureRecognizer(DragSource ds, Component c, int sa)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.
DragGestureRecognizer(DragSource ds, Component c)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, and the Component this DragGestureRecognizer should "observe" for drag initiating gestures.
MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.
MouseDragGestureRecognizer(DragSource ds, Component c, int act)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.
MouseDragGestureRecognizer(DragSource ds, Component c)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.
DropTarget(Component c, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.
DropTarget(Component c, int ops, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.
DropTarget.DropTargetAutoScroller(Component c, Point p)
construct a DropTargetAutoScroller

Uses of Component in java.awt.event

Methods in java.awt.event that return Component
Component | HierarchyEvent.getComponent() Returns the originator of the event.
Component | HierarchyEvent.getChanged() Returns the Component at the top of the hierarchy which was changed.
Component | ComponentEvent.getComponent() Returns the originator of the event.
Component | ContainerEvent.getChild() Returns the component that was affected by the event.

Constructors in java.awt.event with parameters of type Component
InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.
InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition.
HierarchyEvent(Component source, int id, Component changed, Container changedParent)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
HierarchyEvent(Component source, int id, Component changed, Container changedParent, long changeFlags)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
ComponentEvent(Component source, int id)
Constructs a ComponentEvent object.
ContainerEvent(Component source, int id, Component child)
Constructs a ContainerEvent object.
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.
PaintEvent(Component source, int id, Rectangle updateRect)
Constructs a PaintEvent object with the specified source component and type.
FocusEvent(Component source, int id, boolean temporary)
Constructs a FocusEvent object and identifies whether or not the change is temporary.
FocusEvent(Component source, int id)
Constructs a FocusEvent object and identifies it as a permanent change in focus.
KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar)
Constructs a KeyEvent object.
KeyEvent(Component source, int id, long when, int modifiers, int keyCode)

Uses of Component in java.awt.im

Methods in java.awt.im with parameters of type Component
 void InputContext.removeNotify(Component client)
Notifies the input context that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.

Uses of Component in java.beans

Methods in java.beans that return Component
Component | PropertyEditor.getCustomEditor() A PropertyEditor may choose to make available a full custom Component that edits its property value.
Component | PropertyEditorSupport.getCustomEditor() A PropertyEditor may chose to make available a full custom Component that edits its property value.

Uses of Component in java.beans.beancontext

Methods in java.beans.beancontext that return Component
 Component BeanContextChildComponentProxy.getComponent()
Gets the java.awt.Component associated with this BeanContextChild.

Uses of Component in javax.swing

Subclasses of Component in javax.swing
class | AbstractButton Defines common behaviors for buttons and menu items.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JComponent The base class for all Swing components except top-level containers.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JDialog The main class for creating a dialog window.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Fields in javax.swing declared as Component
protected Component | ScrollPaneLayout.lowerLeft The component to display in the lower left corner.
protected Component | ScrollPaneLayout.lowerRight The component to display in the lower right corner.
protected Component | ScrollPaneLayout.upperLeft The component to display in the upper left corner.
protected Component | ScrollPaneLayout.upperRight The component to display in the upper right corner.
protected Component | JSplitPane.leftComponent The left or top component.
protected Component | JSplitPane.rightComponent The right or bottom component.
protected Component | JTable.editorComp If editing, the Component that is handling the editing.
protected Component | JLabel.labelFor
protected static Component | ImageIcon.component
protected Component | JScrollPane.lowerLeft The component to display in the lower left corner.
protected Component | JScrollPane.lowerRight The component to display in the lower right corner.
protected Component | JScrollPane.upperLeft The component to display in the upper left corner.
protected Component | JScrollPane.upperRight The component to display in the upper right corner.
protected Component | JRootPane.glassPane The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.

Methods in javax.swing that return Component
Component | JComponent.getNextFocusableComponent() Returns the next focusable component or null if the focus manager should choose the next focusable component automatically.
Component | JViewport.getView() Returns the JViewports one child or null.
Component | JTabbedPane.getSelectedComponent() Returns the currently selected component for this tabbedpane.
Component | JTabbedPane.add(Component component) Adds a component with a tab title defaulting to the name of the component.
Component | JTabbedPane.add(String title, Component component) Adds a component with the specified tab title.
Component | JTabbedPane.add(Component component, int index) Adds a component at the specified tab index with a tab title defaulting to the name of the component.
Component | JTabbedPane.getComponentAt(int index) Returns the component at index.
Component | JMenuItem.getComponent() This method returns the java.awt.Component used to paint this object.
Component[] | JLayeredPane.getComponentsInLayer(int layer) Returns an array of the components in the specified layer.
Component | JMenu.add(Component c) Appends a component to the end of this menu.
Component | JMenu.add(Component c, int index) Adds the specified component to this container at the given position.
Component | JMenu.getMenuComponent(int n) Returns the component at position n.
Component[] | JMenu.getMenuComponents() Returns an array of Components of the menu's subcomponents.
Component | JMenu.getComponent() Returns the java.awt.Component used to paint this MenuElement.
Component | MenuSelectionManager.componentForPoint(Component source, Point sourcePoint) Returns the component in the currently selected path which contains sourcePoint.
Component | DefaultCellEditor.getComponent() Returns the a reference to the editor component.
Component | DefaultCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Component | DefaultCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
Component | JPopupMenu.getInvoker() Returns the component which is the 'invoker' of this popup menu.
Component | JPopupMenu.getComponentAtIndex(int i) Deprecated. replaced by getComponent(int i)
Component | JPopupMenu.getComponent() Returns this JPopupMenu component.
Component | JWindow.getGlassPane() Returns the glassPane Component for this window.
protected Component | ScrollPaneLayout.addSingletonComponent(Component oldC, Component newC) The method used to remove an existing component.
Component | ScrollPaneLayout.getCorner(String key) Returns the Component at the specified corner.
Component | JApplet.getGlassPane() Returns the glassPane object for this applet.
static Component | SwingUtilities.getDeepestComponentAt(Component parent, int x, int y) Returns the deepest visible descendent Component of parent that contains the location x, y.
static Component | SwingUtilities.findFocusOwner(Component c) Return the child component which has focus, if any.
static Component | SwingUtilities.getRoot(Component c) Returns the root component for the current component tree.
Component | Renderer.getComponent() Returns the component used to render the value.
Component | JInternalFrame.getGlassPane() Returns the glassPane object for this frame.
Component | JInternalFrame.getFocusOwner() If this JInternalFrame is active, return the child which has focus.
Component | JFrame.getGlassPane() Returns the glassPane object for this frame.
Component | JSplitPane.getLeftComponent() Returns the component to the left (or above) the divider.
Component | JSplitPane.getTopComponent() Returns the component above, or to the left of the divider.
Component | JSplitPane.getRightComponent() Returns the component to the right (or below) the divider.
Component | JSplitPane.getBottomComponent() Returns the component below, or to the right of the divider.
Component | ComboBoxEditor.getEditorComponent() Return the component that should be added to the tree hierarchy for this editor
Component | JTable.getEditorComponent() Returns the component that is handling the editing session.
Component | JTable.prepareRenderer(TableCellRenderer renderer, int row, int column) Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
Component | JTable.prepareEditor(TableCellEditor editor, int row, int column) Prepares the editor by querying the data model for the value and selection state of the cell at row, column.
Component | JLabel.getLabelFor() Get the component this is labelling.
Component | DefaultListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Component | ListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) Return a component that has been configured to display the specified value.
Component | JToolBar.getComponentAtIndex(int i) Returns the component at the specified index.
Component | JMenuBar.getComponentAtIndex(int i) Deprecated. replaced by getComponent(int i)
Component | JMenuBar.getComponent() Implemented to be a MenuElement.
static Component | Box.createRigidArea(Dimension d) Creates an invisible component that's always the specified size.
static Component | Box.createHorizontalStrut(int width) Creates an invisible, fixed-width component.
static Component | Box.createVerticalStrut(int height) Creates an invisible, fixed-height component.
static Component | Box.createGlue() Creates an invisible "glue" component that can be useful in a Box whose visible components have a maximum width (for a horizontal box) or height (for a vertical box).
static Component | Box.createHorizontalGlue() Creates a horizontal glue component.
static Component | Box.createVerticalGlue() Creates a vertical glue component.
Component | RootPaneContainer.getGlassPane() Returns the glassPane.
Component | JScrollPane.getCorner(String key) Returns the component at the specified corner.
Component | MenuElement.getComponent() This method should return the java.awt.Component used to paint the receiving element.
protected Component | JRootPane.createGlassPane() Called by the constructor methods to create the default glassPane.
Component | JRootPane.getGlassPane() Returns the current glass pane for this JRootPane.
Component | JDialog.getGlassPane() Returns the glassPane object for this dialog.
Component | DefaultFocusManager.getFirstComponent(Container aContainer) Return the first component that should receive the focus
Component | DefaultFocusManager.getLastComponent(Container aContainer) Return the last component that should receive the focus
Component | DefaultFocusManager.getComponentBefore(Container aContainer, Component aComponent) Return the component that should receive the focus before aComponent
Component | DefaultFocusManager.getComponentAfter(Container aContainer, Component aComponent) Return the component the should receive the focus after aComponent

Methods in javax.swing with parameters of type Component
 void JComponent.setNextFocusableComponent(Component aComponent)
Specifies the next component to get the focus after this one, for example, when the tab key is pressed.
static boolean JComponent.isLightweightComponent(Component c)
Returns true if this component is a lightweight, that is, if it doesn't have a native window system peer.
 void JTextPane.insertComponent(Component c)
Inserts a component into the document as a replacement for the currently selected content.
 void ViewportLayout.addLayoutComponent(String name, Component c)
Adds the specified component to the layout.
 void ViewportLayout.removeLayoutComponent(Component c)
Removes the specified component from the layout.
protected  void JViewport.addImpl(Component child, Object constraints, int index)
Sets the JViewports one lightweight child, which can be null.
 void JViewport.remove(Component child)
Removes the Viewports one lightweight child.
 void JViewport.setView(Component view)
Sets the JViewports one lightweight child (view), which can be null.
 void JTabbedPane.setSelectedComponent(Component c)
Sets the selected component for this tabbedpane.
 void JTabbedPane.insertTab(String title, Icon icon, Component component, String tip, int index)
Inserts a component, at index, represented by a title and/or icon, either of which may be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component, String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component)
Adds a component represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Component component)
Adds a component represented by a title and no icon.
 Component JTabbedPane.add(Component component)
Adds a component with a tab title defaulting to the name of the component.
 Component JTabbedPane.add(String title, Component component)
Adds a component with the specified tab title.
 Component JTabbedPane.add(Component component, int index)
Adds a component at the specified tab index with a tab title defaulting to the name of the component.
 void JTabbedPane.add(Component component, Object constraints)
Adds a component to the tabbed pane.
 void JTabbedPane.add(Component component, Object constraints, int index)
Adds a component at the specified tab index.
 void JTabbedPane.remove(Component component)
Removes the tab which corresponds to the specified component.
 void JTabbedPane.setComponentAt(int index, Component component)
Sets the component at index to component.
 int JTabbedPane.indexOfComponent(Component component)
Returns the index of the tab for the specified component.
protected  void JLayeredPane.addImpl(Component comp, Object constraints, int index)
static JLayeredPane JLayeredPane.getLayeredPaneAbove(Component c)
Convenience method that returns the first JLayeredPane which contains the specified component.
 void JLayeredPane.setLayer(Component c, int layer)
Sets the layer attribute on the specified component, making it the bottommost component in that layer.
 void JLayeredPane.setLayer(Component c, int layer, int position)
Sets the layer attribute for the specified component and also sets its position within that layer.
 int JLayeredPane.getLayer(Component c)
Returns the layer attribute for the specified Component.
 int JLayeredPane.getIndexOf(Component c)
Returns the index of the specified Component.
 void JLayeredPane.moveToFront(Component c)
Moves the component to the top of the components in it's current layer (position 0).
 void JLayeredPane.moveToBack(Component c)
Moves the component to the bottom of the components in it's current layer (position -1).
 void JLayeredPane.setPosition(Component c, int position)
Moves the component to position within it's current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.
 int JLayeredPane.getPosition(Component c)
Get the relative position of the component within its layer.
static String JOptionPane.showInputDialog(Component parentComponent, Object message)
Shows a question-message dialog requesting input from the user parented to parentComponent.
static String JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static void JOptionPane.showMessageDialog(Component parentComponent, Object message)
Brings up a modal information-message dialog titled "Message".
static void JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType)
Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
static void JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up a dialog displaying a message, specifying all parameters.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message)
Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType)
Brings up a modal dialog where the number of choices is determined by the optionType parameter.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
Brings up a modal dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
 JDialog JOptionPane.createDialog(Component parentComponent, String title)
Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message)
Brings up an internal confirmation dialog panel.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType)
Brings up an internal dialog panel that displays a message using a default icon determined by the messageType parameter.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up an internal dialog panel displaying a message, specifying all parameters.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message)
Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, "Select an Option".
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType)
Brings up a internal dialog panel where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
Brings up an internal dialog panel where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static String JOptionPane.showInternalInputDialog(Component parentComponent, Object message)
Shows an internal question-message dialog requesting input from the user parented to parentComponent.
static String JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
 JInternalFrame JOptionPane.createInternalFrame(Component parentComponent, String title)
Creates and returns an instance of JInternalFrame.
static Frame JOptionPane.getFrameForComponent(Component parentComponent)
Returns the specified component's Frame.
static JDesktopPane JOptionPane.getDesktopPaneForComponent(Component parentComponent)
Returns the specified component's desktop pane.
static RepaintManager RepaintManager.currentManager(Component c)
Return the RepaintManager for the calling thread given a Component.
 Image RepaintManager.getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
 Component JMenu.add(Component c)
Appends a component to the end of this menu.
 Component JMenu.add(Component c, int index)
Adds the specified component to this container at the given position.
 void JMenu.remove(Component c)
Removes the component c from this menu.
 boolean JMenu.isMenuComponent(Component c)
Returns true if the specified component exists in the submenu hierarchy.
 Component MenuSelectionManager.componentForPoint(Component source, Point sourcePoint)
Returns the component in the currently selected path which contains sourcePoint.
 boolean MenuSelectionManager.isComponentPartOfCurrentMenu(Component c)
Return true if c is part of the currently used menu
static Color JColorChooser.showDialog(Component component, String title, Color initialColor)
Shows a modal color-chooser dialog and blocks until the dialog is hidden.
static JDialog JColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.
 void JPopupMenu.insert(Component component, int index)
Inserts the specified component into the menu at a given position.
 void JPopupMenu.setInvoker(Component invoker)
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
 void JPopupMenu.show(Component invoker, int x, int y)
Displays the popup menu at the position x,y in the coordinate space of the component invoker.
 int JPopupMenu.getComponentIndex(Component c)
Returns the index of the specified component.
 void JPopupMenu.setSelected(Component sel)
Sets the currently selected component, This will result in a change to the selection model.
protected  void JWindow.addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 void JWindow.remove(Component comp)
Removes the specified component from this container.
 void JWindow.setGlassPane(Component glassPane)
Sets the glassPane property.
protected  Component ScrollPaneLayout.addSingletonComponent(Component oldC, Component newC)
The method used to remove an existing component.
 void ScrollPaneLayout.addLayoutComponent(String s, Component c)
Adds the specified component to the layout.
 void ScrollPaneLayout.removeLayoutComponent(Component c)
Removes the specified component from the layout.
protected  void JApplet.addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 void JApplet.remove(Component comp)
Removes the specified component from this container.
 void JApplet.setGlassPane(Component glassPane)
Sets the glassPane property.
static Rectangle SwingUtilities.getLocalBounds(Component aComponent)
Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent
static Window SwingUtilities.getWindowAncestor(Component c)
static Point SwingUtilities.convertPoint(Component source, Point aPoint, Component destination)
Convert a aPoint in source coordinate system to destination coordinate system.
static Point SwingUtilities.convertPoint(Component source, int x, int y, Component destination)
Convert the point (x,y) in source coordinate system to destination coordinate system.
static Rectangle SwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination)
Convert the rectangle aRectangle in source coordinate system to destination coordinate system.
static Container SwingUtilities.getAncestorOfClass(Class c, Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds.
static Container SwingUtilities.getAncestorNamed(String name, Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds.
static Component SwingUtilities.getDeepestComponentAt(Component parent, int x, int y)
Returns the deepest visible descendent Component of parent that contains the location x, y.
static MouseEvent SwingUtilities.convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination)
Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system.
static void SwingUtilities.convertPointToScreen(Point p, Component c)
Convert a point from a component's coordinate system to screen coordinates.
static void SwingUtilities.convertPointFromScreen(Point p, Component c)
Convert a point from a screen coordinates to a component's coordinate system
static Window SwingUtilities.windowForComponent(Component aComponent)
Return aComponent's window
static boolean SwingUtilities.isDescendingFrom(Component a, Component b)
Return true if a component a descends from a component b
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
static void SwingUtilities.updateComponentTreeUI(Component c)
A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.
static int SwingUtilities.getAccessibleIndexInParent(Component c)
Get the index of this object in its accessible parent.
static Accessible SwingUtilities.getAccessibleAt(Component c, Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
static AccessibleStateSet SwingUtilities.getAccessibleStateSet(Component c)
Get the state of this object.
static int SwingUtilities.getAccessibleChildrenCount(Component c)
Returns the number of accessible children in the object.
static Accessible SwingUtilities.getAccessibleChild(Component c, int i)
Return the nth Accessible child of the object.
static Component SwingUtilities.findFocusOwner(Component c)
Return the child component which has focus, if any.
static JRootPane SwingUtilities.getRootPane(Component c)
If c is a JRootPane descendant return its JRootPane ancestor.
static Component SwingUtilities.getRoot(Component c)
Returns the root component for the current component tree.
 void BoxLayout.addLayoutComponent(String name, Component comp)
Not used by this class.
 void BoxLayout.removeLayoutComponent(Component comp)
Not used by this class.
 void BoxLayout.addLayoutComponent(Component comp, Object constraints)
Not used by this class.
protected  void CellRendererPane.addImpl(Component x, Object constraints, int index)
If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).<
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
Paint a cell renderer component c on graphics object g.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Calls this.paintComponent(g, c, p, x, y, w, h, false).
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.
protected  void JInternalFrame.addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 void JInternalFrame.remove(Component comp)
Removes the specified component from this container.
 void JInternalFrame.setGlassPane(Component glass)
Sets this JInternalFrame's glassPane property.
protected  void JFrame.addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to this component, they must be added to its contentPane instead.
 void JFrame.remove(Component comp)
Removes the specified component from this container.
 void JFrame.setGlassPane(Component glassPane)
Sets the glassPane property.
 void JSplitPane.setLeftComponent(Component comp)
Sets the component to the left (or above) the divider.
 void JSplitPane.setTopComponent(Component comp)
Sets the component above, or to the left of the divider.
 void JSplitPane.setRightComponent(Component comp)
Sets the component to the right (or below) the divider.
 void JSplitPane.setBottomComponent(Component comp)
Sets the component below, or to the right of the divider.
 void JSplitPane.remove(Component component)
Removes the child component, component from the pane.
protected  void JSplitPane.addImpl(Component comp, Object constraints, int index)
Adds the specified component to this split pane.
abstract  void FocusManager.processKeyEvent(Component focusedComponent, KeyEvent anEvent)
This method is called by JComponents when a key event occurs.
abstract  void FocusManager.focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component You can call this method to cause the focus manager to focus the next component
abstract  void FocusManager.focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component You can call this methid to cause the focus manager to focus the previous component
 void JLabel.setLabelFor(Component c)
Set the component this is labelling.
 int JFileChooser.showOpenDialog(Component parent)
Pops up an "Open File" file chooser dialog.
 int JFileChooser.showSaveDialog(Component parent)
Pops up a "Save File" file chooser dialog.
 int JFileChooser.showDialog(Component parent, String approveButtonText)
Pops a custom file chooser dialog with a custom approve button.
 void Icon.paintIcon(Component c, Graphics g, int x, int y)
Draw the icon at the specified location.
 int JToolBar.getComponentIndex(Component c)
Returns the index of the specified component.
protected  void JToolBar.addImpl(Component comp, Object constraints, int index)
If a JButton is being added, it is initially set to be disabled.
 int JMenuBar.getComponentIndex(Component c)
Returns the index of the specified component.
 void JMenuBar.setSelected(Component sel)
Sets the currently selected component, producing a a change to the selection model.
 void ImageIcon.paintIcon(Component c, Graphics g, int x, int y)
Paints the icon.
 void RootPaneContainer.setGlassPane(Component glassPane)
The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane.
 void JScrollPane.setViewportView(Component view)
Creates a viewport if necessary and then sets its view.
 void JScrollPane.setRowHeaderView(Component view)
Creates a row-header viewport if necessary, sets its view and then adds the row-header viewport to the scrollpane.
 void JScrollPane.setColumnHeaderView(Component view)
Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane.
 void JScrollPane.setCorner(String key, Component corner)
Adds a child that will appear in one of the scroll panes corners, if there's room.
 void OverlayLayout.addLayoutComponent(String name, Component comp)
Adds the specified component to the layout.
 void OverlayLayout.removeLayoutComponent(Component comp)
Removes the specified component from the layout.
 void OverlayLayout.addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
 void JRootPane.setGlassPane(Component glass)
Sets a specified Component to be the glass pane for this root pane.
protected  void JRootPane.addImpl(Component comp, Object constraints, int index)
Overridden to enforce the position of the glass component as the zero child.
 void JRootPane.RootLayout.addLayoutComponent(String name, Component comp)
 void JRootPane.RootLayout.removeLayoutComponent(Component comp)
 void JRootPane.RootLayout.addLayoutComponent(Component comp, Object constraints)
protected  void JDialog.addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 void JDialog.remove(Component comp)
Removes the specified component from this container.
 void JDialog.setGlassPane(Component glassPane)
Sets the glassPane property.
 void JDialog.setLocationRelativeTo(Component c)
Sets the location of the dialog relative to the specified component.
 void DefaultFocusManager.processKeyEvent(Component focusedComponent, KeyEvent anEvent)
 void DefaultFocusManager.focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component
 void DefaultFocusManager.focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component
 Component DefaultFocusManager.getComponentBefore(Container aContainer, Component aComponent)
Return the component that should receive the focus before aComponent
 Component DefaultFocusManager.getComponentAfter(Container aContainer, Component aComponent)
Return the component the should receive the focus after aComponent
 boolean DefaultFocusManager.compareTabOrder(Component a, Component b)
Return true if a should be before b in the "tab" order.

Constructors in javax.swing with parameters of type Component
JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and redrawing style, and with the specified components.
ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
Constructs an object to monitor the progress of an input stream.
JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
Creates a JScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.
JScrollPane(Component view)
Creates a JScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.

Uses of Component in javax.swing.border

Methods in javax.swing.border with parameters of type Component
void | AbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Insets | AbstractBorder.getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
Insets | AbstractBorder.getBorderInsets(Component c, Insets insets) Reinitializes the insets parameter with this Border's current Insets.
Rectangle | AbstractBorder.getInteriorRectangle(Component c, int x, int y, int width, int height) This convenience method calls the static method.
static Rectangle | AbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.
void | BevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | BevelBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | BevelBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Color | BevelBorder.getHighlightOuterColor(Component c) Returns the outer highlight color of the bevel border when rendered on the specified component.
Color | BevelBorder.getHighlightInnerColor(Component c) Returns the inner highlight color of the bevel border when rendered on the specified component.
Color | BevelBorder.getShadowInnerColor(Component c) Returns the inner shadow color of the bevel border when rendered on the specified component.
Color | BevelBorder.getShadowOuterColor(Component c) Returns the outer shadow color of the bevel border when rendered on the specified component.
protected void | BevelBorder.paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
protected void | BevelBorder.paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
void | SoftBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | SoftBevelBorder.getBorderInsets(Component c) Returns the insets of the border.
void | EmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Does no drawing by default.
Insets | EmptyBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | EmptyBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
void | MatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the matte border.
Insets | MatteBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | MatteBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
void | CompoundBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
Insets | CompoundBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | CompoundBorder.getBorderInsets(Component c) Returns the insets of the composite border by adding the insets of the outside border to the insets of the inside border.
void | LineBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | LineBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | LineBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
void | TitledBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | TitledBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | TitledBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Dimension | TitledBorder.getMinimumSize(Component c) Returns the minimum dimensions this border requires in order to fully display the border and title.
protected Font | TitledBorder.getFont(Component c)
void | EtchedBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | EtchedBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | EtchedBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Color | EtchedBorder.getHighlightColor(Component c) Returns the highlight color of the etched border when rendered on the specified component.
Color | EtchedBorder.getShadowColor(Component c) Returns the shadow color of the etched border when rendered on the specified component.
void | Border.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Insets | Border.getBorderInsets(Component c) Returns the insets of the border.

Uses of Component in javax.swing.colorchooser

Subclasses of Component in javax.swing.colorchooser
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of Component in javax.swing.event

Constructors in javax.swing.event with parameters of type Component
MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuKeyEvent object.
MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuDragMouseEvent object.

Uses of Component in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type Component
void | BorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BorderUIResource.getBorderInsets(Component c)
void | IconUIResource.paintIcon(Component c, Graphics g, int x, int y)

Uses of Component in javax.swing.plaf.basic

Subclasses of Component in javax.swing.plaf.basic
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicToolBarUI.DragWindow

Fields in javax.swing.plaf.basic declared as Component
Component | BasicMenuUI.ChangeHandler.wasFocused
protected Component | BasicOptionPaneUI.initialFocusComponent Component to receive focus when messaged with selectInitialValue.
protected Component | BasicComboBoxUI.editor
protected Component | BasicTreeUI.editingComponent When editing, this will be the Component that is doing the actual editing.
protected Component | BasicTreeUI.MouseInputHandler.source Source that events are coming from.
protected Component | BasicTreeUI.MouseInputHandler.destination Destination that recieves all events.
protected Component | BasicSplitPaneUI.nonContinuousLayoutDivider Instance for the shadow of the divider when non continuous layout is being used.
protected Component[] | BasicSplitPaneUI.BasicHorizontalLayoutManager.components
protected Component | BasicSplitPaneDivider.hiddenDivider Divider that is used for noncontinuous layout mode.

Methods in javax.swing.plaf.basic that return Component
protected Component | BasicTabbedPaneUI.getVisibleComponent()
Component | BasicComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
protected Component | BasicSplitPaneUI.createDefaultNonContinuousLayoutDivider() Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.
Component | BasicSplitPaneUI.getNonContinuousLayoutDivider() Returns the divider to use when the splitPane is configured to not continuously layout.
Component | BasicComboBoxEditor.getEditorComponent()
protected Component | BasicSliderUI.getLowestValueLabel() Returns the label that corresponds to the highest slider value in the label table.
protected Component | BasicSliderUI.getHighestValueLabel() Returns the label that corresponds to the lowest slider value in the label table.

Methods in javax.swing.plaf.basic with parameters of type Component
void | BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(String string, Component comp)
void | BasicOptionPaneUI.ButtonAreaLayout.removeLayoutComponent(Component c)
protected void | BasicTabbedPaneUI.setVisibleComponent(Component component)
void | BasicTabbedPaneUI.TabbedPaneLayout.addLayoutComponent(String name, Component comp)
void | BasicTabbedPaneUI.TabbedPaneLayout.removeLayoutComponent(Component comp)
void | BasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent(String name, Component c)
void | BasicInternalFrameTitlePane.TitlePaneLayout.removeLayoutComponent(Component c)
void | BasicScrollBarUI.addLayoutComponent(String name, Component child)
void | BasicScrollBarUI.removeLayoutComponent(Component child)
void | BasicBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.ButtonBorder.getBorderInsets(Component c)
void | BasicBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.ToggleButtonBorder.getBorderInsets(Component c)
void | BasicBorders.RadioButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.RadioButtonBorder.getBorderInsets(Component c)
void | BasicBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.MenuBarBorder.getBorderInsets(Component c)
Insets | BasicBorders.MarginBorder.getBorderInsets(Component c)
void | BasicBorders.FieldBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.FieldBorder.getBorderInsets(Component c)
void | BasicBorders.SplitPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Insets | BasicBorders.SplitPaneBorder.getBorderInsets(Component c)
boolean | BasicToolBarUI.canDock(Component c, Point p)
void | BasicInternalFrameUI.InternalFrameLayout.addLayoutComponent(String name, Component c)
void | BasicInternalFrameUI.InternalFrameLayout.removeLayoutComponent(Component c)
void | BasicComboBoxUI.ComboBoxLayoutManager.addLayoutComponent(String name, Component comp)
void | BasicComboBoxUI.ComboBoxLayoutManager.removeLayoutComponent(Component comp)
protected void | BasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
protected void | BasicSplitPaneUI.setNonContinuousLayoutDivider(Component newDivider) Sets the divider to use when the splitPane is configured to not continuously layout.
protected void | BasicSplitPaneUI.setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes) Sets the divider to use.
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(String place, Component component) Adds the component at place.
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.removeLayoutComponent(Component component) Removes the specified component from our knowledge.
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
protected int | BasicSplitPaneUI.BasicHorizontalLayoutManager.getPreferredSizeOfComponent(Component c) Returns the width of the passed in Components preferred size.
protected int | BasicSplitPaneUI.BasicHorizontalLayoutManager.getSizeOfComponent(Component c) Returns the width of the passed in component.
protected void | BasicSplitPaneUI.BasicHorizontalLayoutManager.setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.
void | BasicSplitPaneDivider.DividerLayout.removeLayoutComponent(Component c)
void | BasicSplitPaneDivider.DividerLayout.addLayoutComponent(String string, Component c)
protected void | BasicSliderUI.paintHorizontalLabel(Graphics g, int value, Component label) Called for every label in the label table.
protected void | BasicSliderUI.paintVerticalLabel(Graphics g, int value, Component label) Called for every label in the label table.

Constructors in javax.swing.plaf.basic with parameters of type Component
BasicTreeUI.MouseInputHandler(Component source, Component destination, MouseEvent event)

Uses of Component in javax.swing.plaf.metal

Subclasses of Component in javax.swing.plaf.metal
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Methods in javax.swing.plaf.metal that return Component
Component | MetalFileChooserUI.FileRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Component | MetalFileChooserUI.FilterComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Methods in javax.swing.plaf.metal with parameters of type Component
void | MetalCheckBoxIcon.paintIcon(Component c, Graphics g, int x, int y)
protected void | MetalCheckBoxIcon.drawCheck(Component c, Graphics g, int x, int y)
protected void | MetalToolBarUI.setBorderToRollover(Component c)
protected void | MetalToolBarUI.setBorderToNonRollover(Component c)
protected void | MetalToolBarUI.setBorderToNormal(Component c)
void | MetalBorders.Flush3DBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.Flush3DBorder.getBorderInsets(Component c)
void | MetalBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.ButtonBorder.getBorderInsets(Component c)
void | MetalBorders.InternalFrameBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.InternalFrameBorder.getBorderInsets(Component c)
void | MetalBorders.PaletteBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.PaletteBorder.getBorderInsets(Component c)
void | MetalBorders.OptionDialogBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.OptionDialogBorder.getBorderInsets(Component c)
void | MetalBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.MenuBarBorder.getBorderInsets(Component c)
void | MetalBorders.MenuItemBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.MenuItemBorder.getBorderInsets(Component c)
void | MetalBorders.PopupMenuBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.PopupMenuBorder.getBorderInsets(Component c)
void | MetalBorders.RolloverButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ToolBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.ToolBarBorder.getBorderInsets(Component c)
void | MetalBorders.TextFieldBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ScrollPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.ScrollPaneBorder.getBorderInsets(Component c)
void | MetalBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.TableHeaderBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Insets | MetalBorders.TableHeaderBorder.getBorderInsets(Component c)
void | MetalIconFactory.PaletteCloseIcon.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.FolderIcon16.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.FileIcon16.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.TreeControlIcon.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.TreeControlIcon.paintMe(Component c, Graphics g, int x, int y)
void | MetalComboBoxIcon.paintIcon(Component c, Graphics g, int x, int y) Paints the horizontal bars for the

Uses of Component in javax.swing.table

Subclasses of Component in javax.swing.table
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.

Methods in javax.swing.table that return Component
Component | TableCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Sets an initial value for the editor.
Component | TableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the component used for drawing the cell.
Component | DefaultTableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the default table cell renderer.

Uses of Component in javax.swing.text

Subclasses of Component in javax.swing.text
 class JTextComponent
JTextComponent is the base class for swing text components.

Methods in javax.swing.text that return Component
static Component | StyleConstants.getComponent(AttributeSet a) Gets the component setting from the attribute list.
protected Component | ComponentView.createComponent() Create the component that is associated with this view.
Component | ComponentView.getComponent() Fetch the component associated with the view.

Methods in javax.swing.text with parameters of type Component
static void StyleConstants.setComponent(MutableAttributeSet a, Component c)
Sets the component attribute.

Uses of Component in javax.swing.text.html

Methods in javax.swing.text.html that return Component
protected Component | FormView.createComponent() Create the component.
protected Component | ObjectView.createComponent() Create the component.

Uses of Component in javax.swing.tree

Subclasses of Component in javax.swing.tree
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Fields in javax.swing.tree declared as Component
protected  Component DefaultTreeCellEditor.editingComponent
Component used in editing, obtained from the editingContainer.

Methods in javax.swing.tree that return Component
Component | DefaultTreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) Configures the renderer based on the passed in components.
Component | TreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Sets the value of the current tree cell to value.
Component | TreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Sets an initial value for the editor.
Component | DefaultTreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Configures the editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Component.AccessibleAWTComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Component.AccessibleAWTComponent

Packages that use Component.AccessibleAWTComponent
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Component.AccessibleAWTComponent in java.applet

Subclasses of Component.AccessibleAWTComponent in java.applet
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Uses of Component.AccessibleAWTComponent in java.awt

Subclasses of Component.AccessibleAWTComponent in java.awt
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
protected class | Canvas.AccessibleAWTCanvas This class implements accessibility support for the Canvas class.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
protected class | Container.AccessibleAWTContainer Inner class of Container used to provide default support for accessibility.
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
protected class | Label.AccessibleAWTLabel This class implements accessibility support for the Label class.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Constructors in java.awt with parameters of type Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler()
Component.AccessibleAWTComponent.AccessibleAWTFocusHandler()

Uses of Component.AccessibleAWTComponent in javax.swing

Subclasses of Component.AccessibleAWTComponent in javax.swing
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
protected class | Box.Filler.AccessibleBoxFiller This class implements accessibility support for the Box.Filler class.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.

Uses of Component.AccessibleAWTComponent in javax.swing.table

Subclasses of Component.AccessibleAWTComponent in javax.swing.table
protected  class JTableHeader.AccessibleJTableHeader
This class implements accessibility support for the JTableHeader class.

Uses of Component.AccessibleAWTComponent in javax.swing.text

Subclasses of Component.AccessibleAWTComponent in javax.swing.text
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.ComponentOrientation

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.ComponentOrientation

Packages that use ComponentOrientation
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ComponentOrientation in java.awt

Fields in java.awt declared as ComponentOrientation
static ComponentOrientation | ComponentOrientation.LEFT_TO_RIGHT Items run left to right and lines flow top to bottom Examples: English, French.
static ComponentOrientation | ComponentOrientation.RIGHT_TO_LEFT Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.
static ComponentOrientation | ComponentOrientation.UNKNOWN Indicates that a component's orientation has not been set.

Methods in java.awt that return ComponentOrientation
ComponentOrientation | Component.getComponentOrientation() Retrieve the language-sensitive orientation that is to be used to order the elements or text within this component.
static ComponentOrientation | ComponentOrientation.getOrientation(Locale locale) Return the orientation that is appropriate for the given locale
static ComponentOrientation | ComponentOrientation.getOrientation(ResourceBundle bdl) Return the orientation appropriate for the given ResourceBundle's localization.

Methods in java.awt with parameters of type ComponentOrientation
 void Component.setComponentOrientation(ComponentOrientation o)
Set the language-sensitive orientation that is to be used to order the elements or text within this component.

Uses of ComponentOrientation in javax.swing

Methods in javax.swing with parameters of type ComponentOrientation
 void JScrollPane.setComponentOrientation(ComponentOrientation co)
Sets the orientation for the vertical and horizontal scrollbars as determined by the ComponentOrientation argument.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Container

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Container

Packages that use Container
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Container in java.applet

Subclasses of Container in java.applet
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of Container in java.awt

Subclasses of Container in java.awt
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.
class | Panel Panel is the simplest container class.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
class | Window A Window object is a top-level window with no borders and no menubar.

Methods in java.awt that return Container
Container | Component.getParent() Gets the parent of this component.
protected static Container | Toolkit.getNativeContainer(Component c) Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).

Methods in java.awt with parameters of type Container
Dimension | LayoutManager2.maximumLayoutSize(Container target) Returns the maximum size of this component.
float | LayoutManager2.getLayoutAlignmentX(Container target) Returns the alignment along the x axis.
float | LayoutManager2.getLayoutAlignmentY(Container target) Returns the alignment along the y axis.
void | LayoutManager2.invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Dimension | CardLayout.preferredLayoutSize(Container parent) Determines the preferred size of the container argument using this card layout.
Dimension | CardLayout.minimumLayoutSize(Container parent) Calculates the minimum size for the specified panel.
Dimension | CardLayout.maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
float | CardLayout.getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | CardLayout.getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
void | CardLayout.invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | CardLayout.layoutContainer(Container parent) Lays out the specified container using this card layout.
void | CardLayout.first(Container parent) Flips to the first card of the container.
void | CardLayout.next(Container parent) Flips to the next card of the specified container.
void | CardLayout.previous(Container parent) Flips to the previous card of the specified container.
void | CardLayout.last(Container parent) Flips to the last card of the container.
void | CardLayout.show(Container parent, String name) Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
Dimension | GridLayout.preferredLayoutSize(Container parent) Determines the preferred size of the container argument using this grid layout.
Dimension | GridLayout.minimumLayoutSize(Container parent) Determines the minimum size of the container argument using this grid layout.
void | GridLayout.layoutContainer(Container parent) Lays out the specified container using this layout.
Dimension | BorderLayout.minimumLayoutSize(Container target) Determines the minimum size of the target container using this layout manager.
Dimension | BorderLayout.preferredLayoutSize(Container target) Determines the preferred size of the target container using this layout manager, based on the components in the container.
Dimension | BorderLayout.maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
float | BorderLayout.getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | BorderLayout.getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
void | BorderLayout.invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | BorderLayout.layoutContainer(Container target) Lays out the container argument using this border layout.
Dimension | LayoutManager.preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Dimension | LayoutManager.minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
void | LayoutManager.layoutContainer(Container parent) Lays out the container in the specified panel.
Dimension | GridBagLayout.preferredLayoutSize(Container parent) Determines the preferred size of the target container using this grid bag layout.
Dimension | GridBagLayout.minimumLayoutSize(Container parent) Determines the minimum size of the target container using this grid bag layout.
Dimension | GridBagLayout.maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
float | GridBagLayout.getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | GridBagLayout.getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
void | GridBagLayout.invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | GridBagLayout.layoutContainer(Container parent) Lays out the specified container using this grid bag layout.
protected java.awt.GridBagLayoutInfo | GridBagLayout.GetLayoutInfo(Container parent, int sizeflag) Print the layout constraints.
protected Dimension | GridBagLayout.GetMinSize(Container parent, java.awt.GridBagLayoutInfo info)
protected void | GridBagLayout.ArrangeGrid(Container parent)
Dimension | FlowLayout.preferredLayoutSize(Container target) Returns the preferred dimensions for this layout given the components in the specified target container.
Dimension | FlowLayout.minimumLayoutSize(Container target) Returns the minimum dimensions needed to layout the components contained in the specified target container.
void | FlowLayout.layoutContainer(Container target) Lays out the container.

Constructors in java.awt with parameters of type Container
Container.AccessibleAWTContainer()

Uses of Container in java.awt.event

Methods in java.awt.event that return Container
 Container HierarchyEvent.getChangedParent()
Returns the parent of the Component returned by getChanged().
 Container ContainerEvent.getContainer()
Returns the originator of the event.

Constructors in java.awt.event with parameters of type Container
HierarchyEvent(Component source, int id, Component changed, Container changedParent)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
HierarchyEvent(Component source, int id, Component changed, Container changedParent, long changeFlags)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.

Uses of Container in java.beans.beancontext

Methods in java.beans.beancontext that return Container
 Container BeanContextContainerProxy.getContainer()
Gets the java.awt.Container associated with this BeanContext.

Uses of Container in javax.swing

Subclasses of Container in javax.swing
class | AbstractButton Defines common behaviors for buttons and menu items.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JComponent The base class for all Swing components except top-level containers.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JDialog The main class for creating a dialog window.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Fields in javax.swing declared as Container
protected  Container JRootPane.contentPane
The content pane.

Methods in javax.swing that return Container
Container | JComponent.getTopLevelAncestor() Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
Container | JWindow.getContentPane() Returns the Container which is the contentPane for this window.
Container | JApplet.getContentPane() Returns the contentPane object for this applet.
static Container | SwingUtilities.getAncestorOfClass(Class c, Component comp) Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds.
static Container | SwingUtilities.getAncestorNamed(String name, Component comp) Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds.
Container | JInternalFrame.getContentPane()
Container | JFrame.getContentPane() Returns the contentPane object for this frame.
Container | RootPaneContainer.getContentPane() Returns the contentPane.
protected Container | JRootPane.createContentPane() Called by the constructor methods to create the default contentPane.
Container | JRootPane.getContentPane() Returns the content pane -- the container that holds the components parented by the root pane.
Container | JDialog.getContentPane() Returns the contentPane object for this dialog.

Methods in javax.swing with parameters of type Container
 Dimension ViewportLayout.preferredLayoutSize(Container parent)
Returns the preferred dimensions for this layout given the components in the specified target container.
 Dimension ViewportLayout.minimumLayoutSize(Container parent)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
 void ViewportLayout.layoutContainer(Container parent)
Called by the AWT when the specified container needs to be laid out.
 void JWindow.setContentPane(Container contentPane)
Sets the contentPane property for this window.
 Dimension ScrollPaneLayout.preferredLayoutSize(Container parent)
The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
 Dimension ScrollPaneLayout.minimumLayoutSize(Container parent)
The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
 void ScrollPaneLayout.layoutContainer(Container parent)
Lay out the scrollpane.
 void JApplet.setContentPane(Container contentPane)
Sets the contentPane property.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
 void BoxLayout.invalidateLayout(Container target)
Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.
 Dimension BoxLayout.preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout, given the components in the specified target container.
 Dimension BoxLayout.minimumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
 Dimension BoxLayout.maximumLayoutSize(Container target)
Returns the maximum dimensions the target container can use to lay out the components it contains.
 float BoxLayout.getLayoutAlignmentX(Container target)
Returns the alignment along the X axis for the container.
 float BoxLayout.getLayoutAlignmentY(Container target)
Returns the alignment along the Y axis for the container.
 void BoxLayout.layoutContainer(Container target)
Called by the AWT when the specified container needs to be laid out.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
Paint a cell renderer component c on graphics object g.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Calls this.paintComponent(g, c, p, x, y, w, h, false).
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.
 void JInternalFrame.setContentPane(Container c)
Sets this JInternalFrame's content pane.
 void JFrame.setContentPane(Container contentPane)
Sets the contentPane property.
 void RootPaneContainer.setContentPane(Container contentPane)
The "contentPane" is the primary container for application specific components.
 void OverlayLayout.invalidateLayout(Container target)
Indicates a child has changed its layout related information, which causes any cached calculations to be flushed.
 Dimension OverlayLayout.preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container.
 Dimension OverlayLayout.minimumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
 Dimension OverlayLayout.maximumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
 float OverlayLayout.getLayoutAlignmentX(Container target)
Returns the alignment along the x axis for the container.
 float OverlayLayout.getLayoutAlignmentY(Container target)
Returns the alignment along the y axis for the container.
 void OverlayLayout.layoutContainer(Container target)
Called by the AWT when the specified container needs to be laid out.
 void JRootPane.setContentPane(Container content)
Sets the content pane -- the container that holds the components parented by the root pane.
 Dimension JRootPane.RootLayout.preferredLayoutSize(Container parent)
Returns the amount of space the layout would like to have.
 Dimension JRootPane.RootLayout.minimumLayoutSize(Container parent)
Returns the minimum amount of space the layout needs.
 Dimension JRootPane.RootLayout.maximumLayoutSize(Container target)
Returns the maximum amount of space the layout can use.
 void JRootPane.RootLayout.layoutContainer(Container parent)
Instructs the layout manager to perform the layout for the specified container.
 float JRootPane.RootLayout.getLayoutAlignmentX(Container target)
 float JRootPane.RootLayout.getLayoutAlignmentY(Container target)
 void JRootPane.RootLayout.invalidateLayout(Container target)
 void JDialog.setContentPane(Container contentPane)
Sets the contentPane property.
 Component DefaultFocusManager.getFirstComponent(Container aContainer)
Return the first component that should receive the focus
 Component DefaultFocusManager.getLastComponent(Container aContainer)
Return the last component that should receive the focus
 Component DefaultFocusManager.getComponentBefore(Container aContainer, Component aComponent)
Return the component that should receive the focus before aComponent
 Component DefaultFocusManager.getComponentAfter(Container aContainer, Component aComponent)
Return the component the should receive the focus after aComponent

Constructors in javax.swing with parameters of type Container
BoxLayout(Container target, int axis)
Creates a layout manager that will lay out components either left to right or top to bottom, as specified in the axis parameter.
OverlayLayout(Container target)
Constructs a layout manager that performs overlay arrangment of the children.

Uses of Container in javax.swing.colorchooser

Subclasses of Container in javax.swing.colorchooser
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of Container in javax.swing.event

Methods in javax.swing.event that return Container
Container | AncestorEvent.getAncestor() Returns the ancestor that the event actually occured on.
Container | AncestorEvent.getAncestorParent() Returns the parent of the ancestor the event actually occured on.

Constructors in javax.swing.event with parameters of type Container
AncestorEvent(JComponent source, int id, Container ancestor, Container ancestorParent)
Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status.

Uses of Container in javax.swing.plaf.basic

Subclasses of Container in javax.swing.plaf.basic
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicToolBarUI.DragWindow

Methods in javax.swing.plaf.basic that return Container
protected Container | BasicOptionPaneUI.createMessageArea() Messaged from installComponents to create a Container containing the body of the message.
protected Container | BasicOptionPaneUI.createSeparator()
protected Container | BasicOptionPaneUI.createButtonArea() Creates and returns a Container containin the buttons.

Methods in javax.swing.plaf.basic with parameters of type Container
protected void | BasicOptionPaneUI.addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) Creates the appropriate object to represent msg and places it into container.
protected void | BasicOptionPaneUI.addIcon(Container top) Creates and adds a JLabel representing the icon returned from getIcon to top.
protected void | BasicOptionPaneUI.burstStringInto(Container c, String d, int maxll) Recursively creates new JLabel instances to represent d.
protected void | BasicOptionPaneUI.addButtonComponents(Container container, Object[] buttons, int initialIndex) Creates the appropriate object to represent each of the objects in buttons and adds it to container.
void | BasicOptionPaneUI.ButtonAreaLayout.layoutContainer(Container container)
Dimension | BasicOptionPaneUI.ButtonAreaLayout.minimumLayoutSize(Container c)
Dimension | BasicOptionPaneUI.ButtonAreaLayout.preferredLayoutSize(Container c)
Dimension | BasicTabbedPaneUI.TabbedPaneLayout.preferredLayoutSize(Container parent)
Dimension | BasicTabbedPaneUI.TabbedPaneLayout.minimumLayoutSize(Container parent)
void | BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer(Container parent)
Dimension | BasicInternalFrameTitlePane.TitlePaneLayout.preferredLayoutSize(Container c)
Dimension | BasicInternalFrameTitlePane.TitlePaneLayout.minimumLayoutSize(Container c)
void | BasicInternalFrameTitlePane.TitlePaneLayout.layoutContainer(Container c)
Dimension | BasicScrollBarUI.preferredLayoutSize(Container scrollbarContainer)
Dimension | BasicScrollBarUI.minimumLayoutSize(Container scrollbarContainer)
void | BasicScrollBarUI.layoutContainer(Container scrollbarContainer)
Dimension | BasicInternalFrameUI.InternalFrameLayout.preferredLayoutSize(Container c)
Dimension | BasicInternalFrameUI.InternalFrameLayout.minimumLayoutSize(Container c)
void | BasicInternalFrameUI.InternalFrameLayout.layoutContainer(Container c)
Dimension | BasicComboBoxUI.ComboBoxLayoutManager.preferredLayoutSize(Container parent)
Dimension | BasicComboBoxUI.ComboBoxLayoutManager.minimumLayoutSize(Container parent)
void | BasicComboBoxUI.ComboBoxLayoutManager.layoutContainer(Container parent)
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.layoutContainer(Container container) Does the actual layout.
Dimension | BasicSplitPaneUI.BasicHorizontalLayoutManager.minimumLayoutSize(Container container) Returns the minimum size needed to contain the children.
Dimension | BasicSplitPaneUI.BasicHorizontalLayoutManager.preferredLayoutSize(Container container) Returns the preferred size needed to contain the children.
float | BasicSplitPaneUI.BasicHorizontalLayoutManager.getLayoutAlignmentX(Container target) Returns the alignment along the x axis.
float | BasicSplitPaneUI.BasicHorizontalLayoutManager.getLayoutAlignmentY(Container target) Returns the alignment along the y axis.
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.invalidateLayout(Container c) Does nothing.
Dimension | BasicSplitPaneUI.BasicHorizontalLayoutManager.maximumLayoutSize(Container target) Returns the maximum layout size, which is Integer.MAX_VALUE in both directions.
void | BasicSplitPaneDivider.DividerLayout.layoutContainer(Container c)
Dimension | BasicSplitPaneDivider.DividerLayout.minimumLayoutSize(Container c)
Dimension | BasicSplitPaneDivider.DividerLayout.preferredLayoutSize(Container c)

Constructors in javax.swing.plaf.basic with parameters of type Container
DefaultMenuLayout(Container target, int axis)

Uses of Container in javax.swing.plaf.metal

Subclasses of Container in javax.swing.plaf.metal
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Methods in javax.swing.plaf.metal with parameters of type Container
void | MetalComboBoxUI.layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
void | MetalComboBoxUI.MetalComboBoxLayoutManager.layoutContainer(Container parent)
void | MetalComboBoxUI.MetalComboBoxLayoutManager.superLayout(Container parent)

Uses of Container in javax.swing.table

Subclasses of Container in javax.swing.table
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.

Uses of Container in javax.swing.text

Subclasses of Container in javax.swing.text
 class JTextComponent
JTextComponent is the base class for swing text components.

Methods in javax.swing.text that return Container
 Container View.getContainer()
Fetches the container hosting the view.

Uses of Container in javax.swing.tree

Subclasses of Container in javax.swing.tree
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Fields in javax.swing.tree declared as Container
protected  Container DefaultTreeCellEditor.editingContainer
Editing container, will contain the editorComponent.

Methods in javax.swing.tree that return Container
protected  Container DefaultTreeCellEditor.createContainer()
Creates the container to manage placement of editingComponent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Container.AccessibleAWTContainer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Container.AccessibleAWTContainer

Packages that use Container.AccessibleAWTContainer
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Container.AccessibleAWTContainer in java.applet

Subclasses of Container.AccessibleAWTContainer in java.applet
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Uses of Container.AccessibleAWTContainer in java.awt

Subclasses of Container.AccessibleAWTContainer in java.awt
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Constructors in java.awt with parameters of type Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler()

Uses of Container.AccessibleAWTContainer in javax.swing

Subclasses of Container.AccessibleAWTContainer in javax.swing
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.

Uses of Container.AccessibleAWTContainer in javax.swing.table

Subclasses of Container.AccessibleAWTContainer in javax.swing.table
protected  class JTableHeader.AccessibleJTableHeader
This class implements accessibility support for the JTableHeader class.

Uses of Container.AccessibleAWTContainer in javax.swing.text

Subclasses of Container.AccessibleAWTContainer in javax.swing.text
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Cursor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Cursor

Packages that use Cursor
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Cursor in java.awt

Fields in java.awt declared as Cursor
protected static Cursor[] Cursor.predefined

Methods in java.awt that return Cursor
Cursor | Component.getCursor() Gets the cursor set in the component.
Cursor | Component.AccessibleAWTComponent.getCursor() Get the Cursor of this object.
Cursor | MenuComponent.AccessibleAWTMenuComponent.getCursor() Get the Cursor of this object.
Cursor | Toolkit.createCustomCursor(Image cursor, Point hotSpot, String name) Creates a new custom cursor object.
Cursor | List.AccessibleAWTList.AccessibleAWTListChild.getCursor() Get the Cursor of this object.
static Cursor | Cursor.getPredefinedCursor(int type) Returns a cursor object with the specified predefined type.
static Cursor | Cursor.getSystemCustomCursor(String name)
static Cursor | Cursor.getDefaultCursor() Return the system default cursor.

Methods in java.awt with parameters of type Cursor
void | Component.setCursor(Cursor cursor) Sets the cursor image to the specified cursor.
void | Component.AccessibleAWTComponent.setCursor(Cursor cursor) Set the Cursor of this object.
void | MenuComponent.AccessibleAWTMenuComponent.setCursor(Cursor cursor) Set the Cursor of this object.
void | Window.setCursor(Cursor cursor) Set the cursor image to a specified cursor.
void | List.AccessibleAWTList.AccessibleAWTListChild.setCursor(Cursor cursor) Set the Cursor of this object.

Uses of Cursor in java.awt.dnd

Fields in java.awt.dnd declared as Cursor
static Cursor | DragSource.DefaultCopyDrop The default Cursor to use with a copy operation indicating that a drop is currently allowed.
static Cursor | DragSource.DefaultMoveDrop The default Cursor to use with a move operation indicating that a drop is currently allowed.
static Cursor | DragSource.DefaultLinkDrop The default Cursor to use with a link operation indicating that a drop is currently allowed.
static Cursor | DragSource.DefaultCopyNoDrop The default Cursor to use with a copy operation indicating that a drop is currently not allowed.
static Cursor | DragSource.DefaultMoveNoDrop The default Cursor to use with a move operation indicating that a drop is currently not allowed.
static Cursor | DragSource.DefaultLinkNoDrop The default Cursor to use with a link operation indicating that a drop is currently not allowed.

Methods in java.awt.dnd that return Cursor
 Cursor DragSourceContext.getCursor()
This method returns the current drag Cursor.

Methods in java.awt.dnd with parameters of type Cursor
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
void | DragSourceContext.setCursor(Cursor c) This method sets the current drag Cursor.
void | DragGestureEvent.startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Constructors in java.awt.dnd with parameters of type Cursor
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.

Uses of Cursor in javax.accessibility

Methods in javax.accessibility that return Cursor
 Cursor AccessibleComponent.getCursor()
Gets the Cursor of this object.

Methods in javax.accessibility with parameters of type Cursor
 void AccessibleComponent.setCursor(Cursor cursor)
Sets the Cursor of this object.

Uses of Cursor in javax.swing

Methods in javax.swing that return Cursor
Cursor | JList.AccessibleJList.AccessibleJListChild.getCursor()
Cursor | JTree.AccessibleJTree.AccessibleJTreeNode.getCursor()
Cursor | JTable.AccessibleJTable.AccessibleJTableCell.getCursor() Gets the Cursor of this object.

Methods in javax.swing with parameters of type Cursor
void | JList.AccessibleJList.AccessibleJListChild.setCursor(Cursor c)
void | JTree.AccessibleJTree.AccessibleJTreeNode.setCursor(Cursor c)
void | JTable.AccessibleJTable.AccessibleJTableCell.setCursor(Cursor c) Sets the Cursor of this object.

Uses of Cursor in javax.swing.table

Methods in javax.swing.table that return Cursor
 Cursor JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getCursor()

Methods in javax.swing.table with parameters of type Cursor
 void JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setCursor(Cursor c)

Uses of Cursor in javax.swing.text.html

Methods in javax.swing.text.html that return Cursor
Cursor | HTMLEditorKit.getDefaultCursor() Returns the default cursor.
Cursor | HTMLEditorKit.getLinkCursor() Returns the cursor to use over hyper links.

Methods in javax.swing.text.html with parameters of type Cursor
void | HTMLEditorKit.setDefaultCursor(Cursor cursor) Sets the default cursor.
void | HTMLEditorKit.setLinkCursor(Cursor cursor) Sets the cursor to use over links.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Dialog

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Dialog

Packages that use Dialog
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Dialog in java.awt

Subclasses of Dialog in java.awt
 class FileDialog
The FileDialog class displays a dialog window from which the user can select a file.

Methods in java.awt with parameters of type Dialog
protected abstract  java.awt.peer.DialogPeer Toolkit.createDialog(Dialog target)
Creates this toolkit's implementation of Dialog using the specified peer interface.

Constructors in java.awt with parameters of type Dialog
Dialog(Dialog owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner dialog.
Dialog(Dialog owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner dialog and title.
Dialog(Dialog owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner dialog, title, and modality.
Dialog.AccessibleAWTDialog()

Uses of Dialog in javax.swing

Subclasses of Dialog in javax.swing
 class JDialog
The main class for creating a dialog window.

Constructors in javax.swing with parameters of type Dialog
JDialog(Dialog owner)
Creates a non-modal dialog without a title with the specifed Dialog as its owner.
JDialog(Dialog owner, boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
JDialog(Dialog owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog.
JDialog(Dialog owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Dialog.AccessibleAWTDialog

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Dialog.AccessibleAWTDialog

Packages that use Dialog.AccessibleAWTDialog
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Dialog.AccessibleAWTDialog in javax.swing

Subclasses of Dialog.AccessibleAWTDialog in javax.swing
protected  class JDialog.AccessibleJDialog
This class implements accessibility support for the JDialog class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Dimension

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Dimension

Packages that use Dimension
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Dimension in java.applet

Methods in java.applet with parameters of type Dimension
 void Applet.resize(Dimension d)
Requests that this applet be resized.

Uses of Dimension in java.awt

Methods in java.awt that return Dimension
 Dimension Component.getSize()
Returns the size of this component in the form of a Dimension object.
 Dimension Component.size()
Deprecated. As of JDK version 1.1, replaced by getSize().
 Dimension Component.getSize(Dimension rv)
Store the width/height of this component into "return value" rv and return rv.
 Dimension Component.getPreferredSize()
Gets the preferred size of this component.
 Dimension Component.preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension Component.getMinimumSize()
Gets the mininimum size of this component.
 Dimension Component.minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension Component.getMaximumSize()
Gets the maximum size of this component.
 Dimension Container.getPreferredSize()
Returns the preferred size of this container.
 Dimension Container.preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension Container.getMinimumSize()
Returns the minimum size of this container.
 Dimension Container.minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension Container.getMaximumSize()
Returns the maximum size of this container.
 Dimension Component.AccessibleAWTComponent.getSize()
Returns the size of this object in the form of a Dimension object.
 Dimension LayoutManager2.maximumLayoutSize(Container target)
Returns the maximum size of this component.
 Dimension CardLayout.preferredLayoutSize(Container parent)
Determines the preferred size of the container argument using this card layout.
 Dimension CardLayout.minimumLayoutSize(Container parent)
Calculates the minimum size for the specified panel.
 Dimension CardLayout.maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
 Dimension ScrollPane.getViewportSize()
Returns the current size of the scroll pane's view port.
 Dimension MenuComponent.AccessibleAWTMenuComponent.getSize()
Returns the size of this object in the form of a Dimension object.
 Dimension GridLayout.preferredLayoutSize(Container parent)
Determines the preferred size of the container argument using this grid layout.
 Dimension GridLayout.minimumLayoutSize(Container parent)
Determines the minimum size of the container argument using this grid layout.
 Dimension BorderLayout.minimumLayoutSize(Container target)
Determines the minimum size of the target container using this layout manager.
 Dimension BorderLayout.preferredLayoutSize(Container target)
Determines the preferred size of the target container using this layout manager, based on the components in the container.
 Dimension BorderLayout.maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
 Dimension LayoutManager.preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 Dimension LayoutManager.minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
abstract  Dimension Toolkit.getScreenSize()
Gets the size of the screen.
 Dimension Toolkit.getBestCursorSize(int preferredWidth, int preferredHeight)
Returns the supported cursor dimension which is closest to the desired sizes.
 Dimension List.getPreferredSize(int rows)
Gets the preferred dimensions for a list with the specified number of rows.
 Dimension List.preferredSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
 Dimension List.getPreferredSize()
Gets the preferred size of this scrolling list.
 Dimension List.preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension List.getMinimumSize(int rows)
Gets the minumum dimensions for a list with the specified number of rows.
 Dimension List.minimumSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
 Dimension List.getMinimumSize()
Determines the minimum size of this scrolling list.
 Dimension List.minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension List.AccessibleAWTList.AccessibleAWTListChild.getSize()
Returns the size of this object in the form of a Dimension object.
 Dimension Dimension.getSize()
Gets the size of this Dimension object.
 Dimension GridBagLayout.preferredLayoutSize(Container parent)
Determines the preferred size of the target container using this grid bag layout.
 Dimension GridBagLayout.minimumLayoutSize(Container parent)
Determines the minimum size of the target container using this grid bag layout.
 Dimension GridBagLayout.maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
protected  Dimension GridBagLayout.GetMinSize(Container parent, java.awt.GridBagLayoutInfo info)
 Dimension TextField.getPreferredSize(int columns)
Gets the preferred size of this text field with the specified number of columns.
 Dimension TextField.preferredSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
 Dimension TextField.getPreferredSize()
Gets the preferred size of this text field.
 Dimension TextField.preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension TextField.getMinimumSize(int columns)
Gets the minumum dimensions for a text field with the specified number of columns.
 Dimension TextField.minimumSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
 Dimension TextField.getMinimumSize()
Gets the minumum dimensions for this text field.
 Dimension TextField.minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension Rectangle.getSize()
Gets the size of this Rectangle, represented by the returned Dimension.
 Dimension FlowLayout.preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container.
 Dimension FlowLayout.minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
abstract  Dimension PrintJob.getPageDimension()
Returns the dimensions of the page in pixels.
 Dimension TextArea.getPreferredSize(int rows, int columns)
Determines the preferred size of a text area with the specified number of rows and columns.
 Dimension TextArea.preferredSize(int rows, int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).
 Dimension TextArea.getPreferredSize()
Determines the preferred size of this text area.
 Dimension TextArea.preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension TextArea.getMinimumSize(int rows, int columns)
Determines the minimum size of a text area with the specified number of rows and columns.
 Dimension TextArea.minimumSize(int rows, int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).
 Dimension TextArea.getMinimumSize()
Determines the minimum size of this text area.
 Dimension TextArea.minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Methods in java.awt with parameters of type Dimension
void | Component.setSize(Dimension d) Resizes this component so that it has width d.width and height d.height.
void | Component.resize(Dimension d) Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
Dimension | Component.getSize(Dimension rv) Store the width/height of this component into "return value" rv and return rv.
void | Component.AccessibleAWTComponent.setSize(Dimension d) Resizes this object so that it has width width and height.
void | MenuComponent.AccessibleAWTMenuComponent.setSize(Dimension d) Resizes this object..
void | List.AccessibleAWTList.AccessibleAWTListChild.setSize(Dimension d) Resizes this object so that it has width and height.
void | Dimension.setSize(Dimension d) Set the size of this Dimension object to the specified size.
void | Rectangle.setSize(Dimension d) Sets the size of this Rectangle to match the specified Dimension.

Constructors in java.awt with parameters of type Dimension
Dimension(Dimension d)
Creates an instance of Dimension whose width and height are the same as for the specified dimension.
Rectangle(Point p, Dimension d)
Constructs a new Rectangle whose top-left corner is specified by the Point argument, and whose width and height are specified by the Dimension argument.
Rectangle(Dimension d)
Constructs a new Rectangle whose top left corner is (0, 0) and whose width and height are specified by the Dimension argument.

Uses of Dimension in javax.accessibility

Methods in javax.accessibility that return Dimension
 Dimension AccessibleComponent.getSize()
Returns the size of this object in the form of a Dimension object.

Methods in javax.accessibility with parameters of type Dimension
 void AccessibleComponent.setSize(Dimension d)
Resizes this object so that it has width and height.

Uses of Dimension in javax.swing

Fields in javax.swing declared as Dimension
protected  Dimension JTable.preferredViewportSize
Used by the Scrollable interface to determine the initial visible area.

Methods in javax.swing that return Dimension
Dimension | JComponent.getPreferredSize() If the preferredSize has been set to a non-null value just returns it.
Dimension | JComponent.getMaximumSize() If the maximum size has been set to a non-null value just returns it.
Dimension | JComponent.getMinimumSize() If the minimum size has been set to a non-null value just returns it.
Dimension | JComponent.getSize(Dimension rv) Stores the width/height of this component into "return value" rv and returns rv.
Dimension | JEditorPane.getPreferredSize() Returns the preferred size for the JEditorPane.
Dimension | ViewportLayout.preferredLayoutSize(Container parent) Returns the preferred dimensions for this layout given the components in the specified target container.
Dimension | ViewportLayout.minimumLayoutSize(Container parent) Returns the minimum dimensions needed to layout the components contained in the specified target container.
Dimension | JViewport.getViewSize() If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size.
Dimension | JViewport.getExtentSize() Returns the size of the visible part of the view in view coordinates.
Dimension | JViewport.toViewCoordinates(Dimension size) Converts a size in pixel coordinates to view coordinates.
Dimension | JTextField.getPreferredSize() Returns the preferred size Dimensions needed for this TextField.
Dimension | RepaintManager.getDoubleBufferMaximumSize() Returns the maximum double buffer size.
Dimension | ScrollPaneLayout.preferredLayoutSize(Container parent) The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
Dimension | ScrollPaneLayout.minimumLayoutSize(Container parent) The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
Dimension | JList.getPreferredScrollableViewportSize() Computes the size of the viewport needed to display visibleRowCount rows.
Dimension | JList.AccessibleJList.AccessibleJListChild.getSize()
Dimension | UIDefaults.getDimension(Object key) If the value of key is a Dimension return it, otherwise return null.
Dimension | BoxLayout.preferredLayoutSize(Container target) Returns the preferred dimensions for this layout, given the components in the specified target container.
Dimension | BoxLayout.minimumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | BoxLayout.maximumLayoutSize(Container target) Returns the maximum dimensions the target container can use to lay out the components it contains.
Dimension | JTree.getPreferredScrollableViewportSize() Returns the preferred display size of a JTree.
Dimension | JTree.AccessibleJTree.AccessibleJTreeNode.getSize()
Dimension | Scrollable.getPreferredScrollableViewportSize() Returns the preferred size of the viewport for a view component.
Dimension | JTable.getIntercellSpacing() Returns the horizontal and vertical space between cells.
Dimension | JTable.getPreferredScrollableViewportSize() Returns the preferred size of the viewport for this table.
Dimension | JTable.AccessibleJTable.AccessibleJTableCell.getSize()
Dimension | JToolBar.Separator.getSeparatorSize() Returns the size of the separator
Dimension | JToolBar.Separator.getMinimumSize() Returns the minimum size for the separator.
Dimension | JToolBar.Separator.getMaximumSize() Returns the maximum size for the separator.
Dimension | JToolBar.Separator.getPreferredSize() Returns the preferred size for the separator.
static Dimension | UIManager.getDimension(Object key) Returns a dimension from the defaults table.
Dimension | JTextArea.getPreferredSize() Returns the preferred size of the TextArea.
Dimension | JTextArea.getPreferredScrollableViewportSize() Returns the preferred size of the viewport if this component is embedded in a JScrollPane.
Dimension | Box.Filler.getMinimumSize() Returns the minimum size of the component.
Dimension | Box.Filler.getPreferredSize() Returns the preferred size of the component.
Dimension | Box.Filler.getMaximumSize() Returns the maximum size of the component.
Dimension | JScrollBar.getMinimumSize() The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
Dimension | JScrollBar.getMaximumSize() The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
Dimension | OverlayLayout.preferredLayoutSize(Container target) Returns the preferred dimensions for this layout given the components in the specified target container.
Dimension | OverlayLayout.minimumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | OverlayLayout.maximumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | JRootPane.RootLayout.preferredLayoutSize(Container parent) Returns the amount of space the layout would like to have.
Dimension | JRootPane.RootLayout.minimumLayoutSize(Container parent) Returns the minimum amount of space the layout needs.
Dimension | JRootPane.RootLayout.maximumLayoutSize(Container target) Returns the maximum amount of space the layout can use.

Methods in javax.swing with parameters of type Dimension
void | JComponent.setPreferredSize(Dimension preferredSize) Sets the preferred size of the receiving component.
void | JComponent.setMaximumSize(Dimension maximumSize) Sets the maximum size of this component to a constant value.
void | JComponent.setMinimumSize(Dimension minimumSize) Sets the minimum size of this component to a constant value.
Dimension | JComponent.getSize(Dimension rv) Stores the width/height of this component into "return value" rv and returns rv.
void | JViewport.setViewSize(Dimension newSize) Sets the view coordinates that appear in the upper left hand corner of the viewport, and the size of the view.
protected boolean | JViewport.computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint) Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
Dimension | JViewport.toViewCoordinates(Dimension size) Converts a size in pixel coordinates to view coordinates.
void | JViewport.setExtentSize(Dimension newExtent) Sets the size of the visible part of the view using view coordinates.
void | RepaintManager.setDoubleBufferMaximumSize(Dimension d) Set the maximum double buffer size.
void | JPopupMenu.setPopupSize(Dimension d) Sets the size of the Popup window using a Dimension object.
void | JList.AccessibleJList.AccessibleJListChild.setSize(Dimension d)
void | JTree.AccessibleJTree.AccessibleJTreeNode.setSize(Dimension d)
void | JTable.setIntercellSpacing(Dimension intercellSpacing) Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
void | JTable.setPreferredScrollableViewportSize(Dimension size) Sets the preferred size of the viewport for this table.
void | JTable.AccessibleJTable.AccessibleJTableCell.setSize(Dimension d)
void | JToolBar.addSeparator(Dimension size) Appends a toolbar separator of a specified size to the end of the toolbar.
void | JToolBar.Separator.setSeparatorSize(Dimension size) Sets the size of the separator.
static Component | Box.createRigidArea(Dimension d) Creates an invisible component that's always the specified size.
void | Box.Filler.changeShape(Dimension min, Dimension pref, Dimension max) Change the size requests for this shape.

Constructors in javax.swing with parameters of type Dimension
JToolBar.Separator(Dimension size)
Creates a new toolbar separator with the specified size.
Box.Filler(Dimension min, Dimension pref, Dimension max)
Constructor to create shape with the given size ranges.

Uses of Dimension in javax.swing.border

Methods in javax.swing.border that return Dimension
 Dimension TitledBorder.getMinimumSize(Component c)
Returns the minimum dimensions this border requires in order to fully display the border and title.

Uses of Dimension in javax.swing.plaf

Subclasses of Dimension in javax.swing.plaf
 class DimensionUIResource

Methods in javax.swing.plaf that return Dimension
Dimension | ComponentUI.getPreferredSize(JComponent c)
Dimension | ComponentUI.getMinimumSize(JComponent c)
Dimension | ComponentUI.getMaximumSize(JComponent c)

Uses of Dimension in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Dimension
protected Dimension | BasicOptionPaneUI.minimumSize
protected Dimension | BasicScrollBarUI.minimumThumbSize
protected Dimension | BasicScrollBarUI.maximumThumbSize
protected Dimension | BasicComboBoxUI.cachedMinimumSize
protected Dimension | BasicTreeUI.preferredMinSize Minimum preferred size.
protected Dimension | BasicTreeUI.preferredSize Size needed to completely display all the nodes.

Methods in javax.swing.plaf.basic that return Dimension
 Dimension BasicTextUI.getPreferredSize(JComponent c)
Gets the preferred size for the editor component.
 Dimension BasicTextUI.getMinimumSize(JComponent c)
Gets the minimum size for the editor component.
 Dimension BasicTextUI.getMaximumSize(JComponent c)
Gets the maximum size for the editor component.
 Dimension BasicSeparatorUI.getPreferredSize(JComponent c)
 Dimension BasicSeparatorUI.getMinimumSize(JComponent c)
 Dimension BasicSeparatorUI.getMaximumSize(JComponent c)
 Dimension BasicMenuItemUI.getMinimumSize(JComponent c)
 Dimension BasicMenuItemUI.getPreferredSize(JComponent c)
 Dimension BasicMenuItemUI.getMaximumSize(JComponent c)
protected  Dimension BasicMenuItemUI.getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
 Dimension BasicButtonUI.getMinimumSize(JComponent c)
 Dimension BasicButtonUI.getPreferredSize(JComponent c)
 Dimension BasicButtonUI.getMaximumSize(JComponent c)
 Dimension BasicRadioButtonUI.getPreferredSize(JComponent c)
The preferred size of the radio button
 Dimension BasicToolBarSeparatorUI.getPreferredSize(JComponent c)
 Dimension BasicToolBarSeparatorUI.getMinimumSize(JComponent c)
 Dimension BasicToolBarSeparatorUI.getMaximumSize(JComponent c)
 Dimension BasicMenuUI.getMaximumSize(JComponent c)
protected  Dimension BasicProgressBarUI.getPreferredInnerHorizontal()
protected  Dimension BasicProgressBarUI.getPreferredInnerVertical()
 Dimension BasicProgressBarUI.getPreferredSize(JComponent c)
 Dimension BasicProgressBarUI.getMinimumSize(JComponent c)
The Minimum size for this component is 10.
 Dimension BasicProgressBarUI.getMaximumSize(JComponent c)
 Dimension BasicOptionPaneUI.getMinimumOptionPaneSize()
Returns the minimum size the option pane should be.
 Dimension BasicOptionPaneUI.getPreferredSize(JComponent c)
If c is the JOptionPane the reciever is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
 Dimension BasicOptionPaneUI.getMinimumSize(JComponent c)
Messages getPreferredSize.
 Dimension BasicOptionPaneUI.getMaximumSize(JComponent c)
Messages getPreferredSize.
 Dimension BasicOptionPaneUI.ButtonAreaLayout.minimumLayoutSize(Container c)
 Dimension BasicOptionPaneUI.ButtonAreaLayout.preferredLayoutSize(Container c)
 Dimension BasicTabbedPaneUI.getPreferredSize(JComponent c)
 Dimension BasicTabbedPaneUI.getMinimumSize(JComponent c)
 Dimension BasicTabbedPaneUI.getMaximumSize(JComponent c)
 Dimension BasicTabbedPaneUI.TabbedPaneLayout.preferredLayoutSize(Container parent)
 Dimension BasicTabbedPaneUI.TabbedPaneLayout.minimumLayoutSize(Container parent)
protected  Dimension BasicTabbedPaneUI.TabbedPaneLayout.calculateSize(boolean minimum)
 Dimension BasicPopupMenuUI.getMinimumSize(JComponent c)
 Dimension BasicPopupMenuUI.getPreferredSize(JComponent c)
 Dimension BasicPopupMenuUI.getMaximumSize(JComponent c)
static Dimension BasicGraphicsUtils.getPreferredButtonSize(AbstractButton b, int textIconGap)
 Dimension BasicTableUI.getMinimumSize(JComponent c)
Return the minimum size of the table.
 Dimension BasicTableUI.getPreferredSize(JComponent c)
Return the preferred size of the table.
 Dimension BasicTableUI.getMaximumSize(JComponent c)
Return the maximum size of the table.
 Dimension BasicInternalFrameTitlePane.TitlePaneLayout.preferredLayoutSize(Container c)
 Dimension BasicInternalFrameTitlePane.TitlePaneLayout.minimumLayoutSize(Container c)
 Dimension BasicToolTipUI.getPreferredSize(JComponent c)
 Dimension BasicToolTipUI.getMinimumSize(JComponent c)
 Dimension BasicToolTipUI.getMaximumSize(JComponent c)
 Dimension BasicScrollBarUI.getPreferredSize(JComponent c)
A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb.
 Dimension BasicScrollBarUI.getMinimumSize(JComponent c)
A vertical scrollbars minimum width is the largest minimum width of the (non null) increment/decrement buttons, and the minimum width of the thumb.
 Dimension BasicScrollBarUI.getMaximumSize(JComponent c)
protected  Dimension BasicScrollBarUI.getMinimumThumbSize()
Return the smallest acceptable size for the thumb.
protected  Dimension BasicScrollBarUI.getMaximumThumbSize()
Return the largest acceptable size for the thumb.
 Dimension BasicScrollBarUI.preferredLayoutSize(Container scrollbarContainer)
 Dimension BasicScrollBarUI.minimumLayoutSize(Container scrollbarContainer)
 Dimension BasicToolBarUI.getMinimumSize(JComponent c)
 Dimension BasicToolBarUI.getPreferredSize(JComponent c)
 Dimension BasicToolBarUI.getMaximumSize(JComponent c)
 Dimension BasicComboBoxRenderer.getPreferredSize()
 Dimension BasicInternalFrameUI.getPreferredSize(JComponent x)
 Dimension BasicInternalFrameUI.getMinimumSize(JComponent x)
 Dimension BasicInternalFrameUI.getMaximumSize(JComponent x)
 Dimension BasicInternalFrameUI.InternalFrameLayout.preferredLayoutSize(Container c)
 Dimension BasicInternalFrameUI.InternalFrameLayout.minimumLayoutSize(Container c)
 Dimension BasicDesktopPaneUI.getPreferredSize(JComponent c)
 Dimension BasicDesktopPaneUI.getMinimumSize(JComponent c)
 Dimension BasicDesktopPaneUI.getMaximumSize(JComponent c)
 Dimension BasicListUI.getPreferredSize(JComponent c)
The preferredSize of a list is total height of the rows and the maximum width of the cells.
 Dimension BasicListUI.getMinimumSize(JComponent c)
 Dimension BasicListUI.getMaximumSize(JComponent c)
 Dimension BasicLabelUI.getPreferredSize(JComponent c)
 Dimension BasicLabelUI.getMinimumSize(JComponent c)
 Dimension BasicLabelUI.getMaximumSize(JComponent c)
 Dimension BasicComboBoxUI.getPreferredSize(JComponent c)
 Dimension BasicComboBoxUI.getMinimumSize(JComponent c)
 Dimension BasicComboBoxUI.getMaximumSize(JComponent c)
protected  Dimension BasicComboBoxUI.getDefaultSize()
Return the default size of an empty combo box.
protected  Dimension BasicComboBoxUI.getDisplaySize()
 Dimension BasicComboBoxUI.ComboBoxLayoutManager.preferredLayoutSize(Container parent)
 Dimension BasicComboBoxUI.ComboBoxLayoutManager.minimumLayoutSize(Container parent)
 Dimension BasicTableHeaderUI.getMinimumSize(JComponent c)
Return the minimum size of the header.
 Dimension BasicTableHeaderUI.getPreferredSize(JComponent c)
Return the preferred size of the header.
 Dimension BasicTableHeaderUI.getMaximumSize(JComponent c)
Return the maximum size of the header.
 Dimension BasicMenuBarUI.getPreferredSize(JComponent c)
 Dimension BasicMenuBarUI.getMinimumSize(JComponent c)
 Dimension BasicMenuBarUI.getMaximumSize(JComponent c)
 Dimension BasicPopupMenuSeparatorUI.getPreferredSize(JComponent c)
 Dimension BasicTreeUI.getPreferredMinSize()
Returns the minimum preferred size.
 Dimension BasicTreeUI.getPreferredSize(JComponent c)
Returns the preferred size to properly display the tree, this is a cover method for getPreferredSize(c, false).
 Dimension BasicTreeUI.getPreferredSize(JComponent c, boolean checkConsistancy)
Returns the preferred size to represent the tree in c.
 Dimension BasicTreeUI.getMinimumSize(JComponent c)
Returns the minimum size for this component.
 Dimension BasicTreeUI.getMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
 Dimension BasicSplitPaneUI.getPreferredSize(JComponent jc)
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
 Dimension BasicSplitPaneUI.getMinimumSize(JComponent jc)
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
 Dimension BasicSplitPaneUI.getMaximumSize(JComponent jc)
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
 Dimension BasicSplitPaneUI.BasicHorizontalLayoutManager.minimumLayoutSize(Container container)
Returns the minimum size needed to contain the children.
 Dimension BasicSplitPaneUI.BasicHorizontalLayoutManager.preferredLayoutSize(Container container)
Returns the preferred size needed to contain the children.
 Dimension BasicSplitPaneUI.BasicHorizontalLayoutManager.maximumLayoutSize(Container target)
Returns the maximum layout size, which is Integer.MAX_VALUE in both directions.
 Dimension BasicSplitPaneDivider.getPreferredSize()
Returns dividerSize x dividerSize
 Dimension BasicSplitPaneDivider.getMinimumSize()
Returns dividerSize x dividerSize
 Dimension BasicSplitPaneDivider.DividerLayout.minimumLayoutSize(Container c)
 Dimension BasicSplitPaneDivider.DividerLayout.preferredLayoutSize(Container c)
 Dimension BasicScrollPaneUI.getPreferredSize(JComponent c)
 Dimension BasicScrollPaneUI.getMinimumSize(JComponent c)
 Dimension BasicScrollPaneUI.getMaximumSize(JComponent c)
 Dimension BasicArrowButton.getPreferredSize()
 Dimension BasicArrowButton.getMinimumSize()
 Dimension BasicArrowButton.getMaximumSize()
 Dimension BasicDesktopIconUI.getPreferredSize(JComponent c)
 Dimension BasicDesktopIconUI.getMinimumSize(JComponent c)
 Dimension BasicDesktopIconUI.getMaximumSize(JComponent c)
 Dimension BasicSliderUI.getPreferredHorizontalSize()
 Dimension BasicSliderUI.getPreferredVerticalSize()
 Dimension BasicSliderUI.getMinimumHorizontalSize()
 Dimension BasicSliderUI.getMinimumVerticalSize()
 Dimension BasicSliderUI.getPreferredSize(JComponent c)
 Dimension BasicSliderUI.getMinimumSize(JComponent c)
 Dimension BasicSliderUI.getMaximumSize(JComponent c)
protected  Dimension BasicSliderUI.getThumbSize()

Methods in javax.swing.plaf.basic with parameters of type Dimension
protected void | BasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size)
void | BasicTreeUI.setPreferredMinSize(Dimension newSize) Sets the preferred minimum size.
protected int | BasicSplitPaneUI.BasicHorizontalLayoutManager.getAvailableSize(Dimension containerSize, Insets insets) Returns the available width based on the container size and Insets.
protected void | BasicSplitPaneUI.BasicHorizontalLayoutManager.setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.

Uses of Dimension in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return Dimension
Dimension | MetalSeparatorUI.getPreferredSize(JComponent c)
Dimension | MetalPopupMenuSeparatorUI.getPreferredSize(JComponent c)
Dimension | MetalFileChooserUI.getPreferredSize(JComponent c)
Dimension | MetalFileChooserUI.getMinimumSize(JComponent c)
Dimension | MetalFileChooserUI.getMaximumSize(JComponent c)
Dimension | MetalScrollButton.getPreferredSize()
Dimension | MetalScrollButton.getMinimumSize()
Dimension | MetalScrollButton.getMaximumSize()
Dimension | MetalComboBoxUI.getMinimumSize(JComponent c)
protected Dimension | MetalSliderUI.getThumbSize()
Dimension | MetalScrollBarUI.getPreferredSize(JComponent c)
protected Dimension | MetalScrollBarUI.getMinimumThumbSize()
Dimension | MetalDesktopIconUI.getPreferredSize(JComponent c)
Dimension | MetalToolTipUI.getPreferredSize(JComponent c)

Methods in javax.swing.plaf.metal with parameters of type Dimension
protected  void MetalRadioButtonUI.paintFocus(Graphics g, Rectangle t, Dimension d)

Uses of Dimension in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return Dimension
Dimension | MultiListUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiListUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiListUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiTextUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTextUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTextUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiTableUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTableUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTableUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.

Uses of Dimension in javax.swing.table

Methods in javax.swing.table that return Dimension
 Dimension JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getSize()

Methods in javax.swing.table with parameters of type Dimension
 void JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setSize(Dimension d)

Uses of Dimension in javax.swing.text

Methods in javax.swing.text that return Dimension
 Dimension JTextComponent.getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for a view component.

Uses of Dimension in javax.swing.tree

Methods in javax.swing.tree that return Dimension
Dimension | DefaultTreeCellRenderer.getPreferredSize() Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
Dimension | DefaultTreeCellEditor.DefaultTextField.getPreferredSize() Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
Dimension | DefaultTreeCellEditor.EditorContainer.getPreferredSize() Returns the preferred size for the Container.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Event

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Event

Packages that use Event
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Event in java.awt

Fields in java.awt declared as Event
 Event Event.evt
The next event.

Methods in java.awt with parameters of type Event
void | Component.deliverEvent(Event e) Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).
boolean | Component.postEvent(Event e) Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
boolean | Component.handleEvent(Event evt) Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
boolean | Component.mouseDown(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
boolean | Component.mouseDrag(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
boolean | Component.mouseUp(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
boolean | Component.mouseMove(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
boolean | Component.mouseEnter(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
boolean | Component.mouseExit(Event evt, int x, int y) Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
boolean | Component.keyDown(Event evt, int key) Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
boolean | Component.keyUp(Event evt, int key) Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
boolean | Component.action(Event evt, Object what) Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
boolean | Component.gotFocus(Event evt, Object what) Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
boolean | Component.lostFocus(Event evt, Object what) Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
void | Container.deliverEvent(Event e) Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
boolean | MenuComponent.postEvent(Event evt) Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
boolean | MenuContainer.postEvent(Event evt) Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
boolean | Window.postEvent(Event e) Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).

Constructors in java.awt with parameters of type Event
AWTEvent(Event event)
Constructs an AWTEvent object from the parameters of a 1.0-style event.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.EventQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.EventQueue

Packages that use EventQueue
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of EventQueue in java.awt

Methods in java.awt that return EventQueue
EventQueue | Toolkit.getSystemEventQueue() Get the application's or applet's EventQueue instance.
protected abstract EventQueue | Toolkit.getSystemEventQueueImpl()

Methods in java.awt with parameters of type EventQueue
 void EventQueue.push(EventQueue newEventQueue)
Replace the existing EventQueue with the specified one.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.FileDialog

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.FileDialog

Packages that use FileDialog
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of FileDialog in java.awt

Methods in java.awt with parameters of type FileDialog
protected abstract  java.awt.peer.FileDialogPeer Toolkit.createFileDialog(FileDialog target)
Creates this toolkit's implementation of FileDialog using the specified peer interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Font

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Font

Packages that use Font
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Font in java.awt

Fields in java.awt declared as Font
protected  Font FontMetrics.font
The actual Font from which the font metrics are created.

Methods in java.awt that return Font
Font | Component.getFont() Gets the font of this component.
Font | Component.AccessibleAWTComponent.getFont() Get the Font of this object.
abstract Font[] | GraphicsEnvironment.getAllFonts() Returns an array containing a one-point size instance of all fonts available in this GraphicsEnvironment.
Font | MenuComponent.getFont() Gets the font used for this menu component.
Font | MenuComponent.AccessibleAWTMenuComponent.getFont() Get the Font of this object.
Font | MenuContainer.getFont()
Font | FontMetrics.getFont() Gets the Font described by this FontMetrics object.
abstract Font | Graphics.getFont() Gets the current font.
static Font | Font.getFont(Map attributes) Returns a Font appropriate to this attribute set.
static Font | Font.createFont(int fontFormat, InputStream fontStream) Returns a new Font with the specified font type and input data.
static Font | Font.getFont(String nm) Returns a Font object from the system properties list.
static Font | Font.decode(String str) Returns the Font that the str argument describes.
static Font | Font.getFont(String nm, Font font) Gets the specified Font from the system properties list.
Font | Font.deriveFont(int style, float size) Creates a new Font object by replicating this Font object and applying a new style and size.
Font | Font.deriveFont(int style, AffineTransform trans) Creates a new Font object by replicating this Font object and applying a new style and transform.
Font | Font.deriveFont(float size) Creates a new Font object by replicating the current Font object and applying a new size to it.
Font | Font.deriveFont(AffineTransform trans) Creates a new Font object by replicating the current Font object and applying a new transform to it.
Font | Font.deriveFont(int style) Creates a new Font object by replicating the current Font object and applying a new style to it.
Font | Font.deriveFont(Map attributes) Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
Font | List.AccessibleAWTList.AccessibleAWTListChild.getFont() Get the Font of this object.

Methods in java.awt with parameters of type Font
void | Component.setFont(Font f) Sets the font of this component.
FontMetrics | Component.getFontMetrics(Font font) Gets the font metrics for the specified font.
void | Container.setFont(Font f) Sets the font of this container.
void | Component.AccessibleAWTComponent.setFont(Font f) Set the Font of this object.
FontMetrics | Component.AccessibleAWTComponent.getFontMetrics(Font f) Get the FontMetrics of this object.
void | MenuComponent.setFont(Font f) Sets the font to be used for this menu component to the specified font.
void | MenuComponent.AccessibleAWTMenuComponent.setFont(Font f) Set the Font of this object.
FontMetrics | MenuComponent.AccessibleAWTMenuComponent.getFontMetrics(Font f) Get the FontMetrics of this object.
abstract void | Graphics.setFont(Font font) Sets this graphics context's font to the specified font.
abstract FontMetrics | Graphics.getFontMetrics(Font f) Gets the font metrics for the specified font.
static Font | Font.getFont(String nm, Font font) Gets the specified Font from the system properties list.
abstract FontMetrics | Toolkit.getFontMetrics(Font font) Deprecated. This returns integer metrics for the default screen.
void | List.AccessibleAWTList.AccessibleAWTListChild.setFont(Font f) Set the Font of this object.
FontMetrics | List.AccessibleAWTList.AccessibleAWTListChild.getFontMetrics(Font f) Get the FontMetrics of this object.

Constructors in java.awt with parameters of type Font
FontMetrics(Font font)
Creates a new FontMetrics object for finding out height and width information about the specified Font and specific character glyphs in that Font.

Uses of Font in java.awt.font

Methods in java.awt.font that return Font
abstract Font | GlyphVector.getFont() Returns the Font associated with this GlyphVector.
Font | MultipleMaster.deriveMMFont(float[] axes) Creates a new instance of a multiple master font based on the design axis values contained in the specified array.
Font | MultipleMaster.deriveMMFont(float[] glyphWidths, float avgStemWidth, float typicalCapHeight, float typicalXHeight, float italicAngle) Creates a new instance of a multiple master font based on detailed metric information.

Constructors in java.awt.font with parameters of type Font
TextLayout(String string, Font font, FontRenderContext frc)
Constructs a TextLayout from a String and a Font.

Uses of Font in javax.accessibility

Methods in javax.accessibility that return Font
 Font AccessibleComponent.getFont()
Gets the Font of this object.

Methods in javax.accessibility with parameters of type Font
void | AccessibleComponent.setFont(Font f) Sets the Font of this object.
FontMetrics | AccessibleComponent.getFontMetrics(Font f) Gets the FontMetrics of this object.

Uses of Font in javax.swing

Methods in javax.swing that return Font
Font | JList.AccessibleJList.AccessibleJListChild.getFont()
Font | UIDefaults.getFont(Object key) If the value of key is a Font return it, otherwise return null.
Font | JTree.AccessibleJTree.AccessibleJTreeNode.getFont()
Font | JTable.AccessibleJTable.AccessibleJTableCell.getFont() Gets the Font of this object.
static Font | UIManager.getFont(Object key) Returns a drawing font from the defaults table.
Font | DebugGraphics.getFont() Returns the Font used for text drawing operations.

Methods in javax.swing with parameters of type Font
void | JComponent.setFont(Font font) Sets the font for this component.
void | JTextField.setFont(Font f) Sets the current font.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
void | JList.AccessibleJList.AccessibleJListChild.setFont(Font f)
FontMetrics | JList.AccessibleJList.AccessibleJListChild.getFontMetrics(Font f)
void | JTree.AccessibleJTree.AccessibleJTreeNode.setFont(Font f)
FontMetrics | JTree.AccessibleJTree.AccessibleJTreeNode.getFontMetrics(Font f)
void | JTable.AccessibleJTable.AccessibleJTableCell.setFont(Font f) Sets the Font of this object.
FontMetrics | JTable.AccessibleJTable.AccessibleJTableCell.getFontMetrics(Font f) Gets the FontMetrics of this object.
void | JTextArea.setFont(Font f) Sets the current font.
void | DebugGraphics.setFont(Font aFont) Sets the Font used for text drawing operations.
FontMetrics | DebugGraphics.getFontMetrics(Font f) Overrides Graphics.getFontMetrics.

Uses of Font in javax.swing.border

Fields in javax.swing.border declared as Font
protected  Font TitledBorder.titleFont

Methods in javax.swing.border that return Font
Font | TitledBorder.getTitleFont() Returns the title-font of the titled border.
protected Font | TitledBorder.getFont(Component c)

Methods in javax.swing.border with parameters of type Font
 void TitledBorder.setTitleFont(Font titleFont)
Sets the title-font of the titled border.

Constructors in javax.swing.border with parameters of type Font
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.

Uses of Font in javax.swing.plaf

Subclasses of Font in javax.swing.plaf
 class FontUIResource
A subclass of java.awt.Font that implements UIResource.

Constructors in javax.swing.plaf with parameters of type Font
FontUIResource(Font font)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)

Uses of Font in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Font
protected  Font BasicMenuItemUI.acceleratorFont

Methods in javax.swing.plaf.basic with parameters of type Font
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)

Uses of Font in javax.swing.table

Methods in javax.swing.table that return Font
 Font JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFont()

Methods in javax.swing.table with parameters of type Font
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setFont(Font f)
FontMetrics | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFontMetrics(Font f)

Uses of Font in javax.swing.text

Methods in javax.swing.text that return Font
Font | StyleContext.getFont(AttributeSet attr) Gets the font from an attribute set.
Font | StyleContext.getFont(String family, int style, int size) Gets a new font.
Font | GlyphView.getFont() Fetch the font that the glyphs should be based upon.
Font | LabelView.getFont() Fetch the font that the glyphs should be based upon.
Font | StyledDocument.getFont(AttributeSet attr) Takes a set of attributes and turn it into a font specification.
Font | DefaultStyledDocument.getFont(AttributeSet attr) Gets the font from an attribute set.

Methods in javax.swing.text with parameters of type Font
 FontMetrics StyleContext.getFontMetrics(Font f)
Returns font metrics for a font.

Uses of Font in javax.swing.text.html

Methods in javax.swing.text.html that return Font
 Font StyleSheet.getFont(AttributeSet a)
Fetches the font to use for the given set of attributes.

Uses of Font in javax.swing.tree

Fields in javax.swing.tree declared as Font
protected  Font DefaultTreeCellEditor.font
Font to paint with, null indicates font of renderer is to be used.

Methods in javax.swing.tree that return Font
Font | DefaultTreeCellEditor.getFont() Gets the font used for editing.
Font | DefaultTreeCellEditor.DefaultTextField.getFont()

Methods in javax.swing.tree with parameters of type Font
void | DefaultTreeCellRenderer.setFont(Font font) Subclassed to map FontUIResources to null.
void | DefaultTreeCellEditor.setFont(Font font) Sets the font to edit with.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.FontFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.FontFormatException

Packages that use FontFormatException
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of FontFormatException in java.awt

Methods in java.awt that throw FontFormatException
static Font Font.createFont(int fontFormat, InputStream fontStream)
Returns a new Font with the specified font type and input data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.FontMetrics

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.FontMetrics

Packages that use FontMetrics
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FontMetrics in java.awt

Methods in java.awt that return FontMetrics
FontMetrics | Component.getFontMetrics(Font font) Gets the font metrics for the specified font.
FontMetrics | Component.AccessibleAWTComponent.getFontMetrics(Font f) Get the FontMetrics of this object.
FontMetrics | MenuComponent.AccessibleAWTMenuComponent.getFontMetrics(Font f) Get the FontMetrics of this object.
FontMetrics | Graphics.getFontMetrics() Gets the font metrics of the current font.
abstract FontMetrics | Graphics.getFontMetrics(Font f) Gets the font metrics for the specified font.
abstract FontMetrics | Toolkit.getFontMetrics(Font font) Deprecated. This returns integer metrics for the default screen.
FontMetrics | List.AccessibleAWTList.AccessibleAWTListChild.getFontMetrics(Font f) Get the FontMetrics of this object.

Uses of FontMetrics in javax.accessibility

Methods in javax.accessibility that return FontMetrics
 FontMetrics AccessibleComponent.getFontMetrics(Font f)
Gets the FontMetrics of this object.

Uses of FontMetrics in javax.swing

Methods in javax.swing that return FontMetrics
FontMetrics | JList.AccessibleJList.AccessibleJListChild.getFontMetrics(Font f)
FontMetrics | JTree.AccessibleJTree.AccessibleJTreeNode.getFontMetrics(Font f)
FontMetrics | JTable.AccessibleJTable.AccessibleJTableCell.getFontMetrics(Font f) Gets the FontMetrics of this object.
FontMetrics | DebugGraphics.getFontMetrics() Overrides Graphics.getFontMetrics.
FontMetrics | DebugGraphics.getFontMetrics(Font f) Overrides Graphics.getFontMetrics.

Methods in javax.swing with parameters of type FontMetrics
static int | SwingUtilities.computeStringWidth(FontMetrics fm, String str) Compute the width of the string using a font with the specified "metrics" (sizes).
static String | SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String | SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.

Uses of FontMetrics in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return FontMetrics
protected  FontMetrics BasicTabbedPaneUI.getFontMetrics()

Methods in javax.swing.plaf.basic with parameters of type FontMetrics
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected  int BasicTabbedPaneUI.calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().

Uses of FontMetrics in javax.swing.table

Methods in javax.swing.table that return FontMetrics
 FontMetrics JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFontMetrics(Font f)

Uses of FontMetrics in javax.swing.text

Fields in javax.swing.text declared as FontMetrics
protected  FontMetrics PlainView.metrics
Font metrics for the currrent font.

Methods in javax.swing.text that return FontMetrics
FontMetrics | StyleContext.getFontMetrics(Font f) Returns font metrics for a font.
protected FontMetrics | LabelView.getFontMetrics() Deprecated. FontMetrics are not used for glyph rendering when running in the Java2 SDK.
protected FontMetrics | FieldView.getFontMetrics() Fetches the font metrics associated with the component hosting this view.

Methods in javax.swing.text with parameters of type FontMetrics
static int | Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determines the relative offset into the given text that best represents the given span in the view coordinate system.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
static int | Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determine where to break the given text to fit within the the given span.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Frame

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Frame

Packages that use Frame
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Frame in java.awt

Methods in java.awt that return Frame
static Frame[] Frame.getFrames()
Returns an array containing all Frames created by the application.

Methods in java.awt with parameters of type Frame
protected abstract java.awt.peer.FramePeer | Toolkit.createFrame(Frame target) Creates this toolkit's implementation of Frame using the specified peer interface.
abstract PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, Properties props) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Constructors in java.awt with parameters of type Frame
Window(Frame owner)
Constructs a new invisible window with the specified Frame as its owner.
Dialog(Frame owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner frame.
Dialog(Frame owner, boolean modal)
Constructs an initially invisible Dialog with an empty title, the specified owner frame and modality.
Dialog(Frame owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner frame and title.
Dialog(Frame owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner frame, title, and modality.
FileDialog(Frame parent)
Creates a file dialog for loading a file.
FileDialog(Frame parent, String title)
Creates a file dialog window with the specified title for loading a file.
FileDialog(Frame parent, String title, int mode)
Creates a file dialog window with the specified title for loading or saving a file.
Frame.AccessibleAWTFrame()

Uses of Frame in javax.swing

Subclasses of Frame in javax.swing
 class JFrame
An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.

Methods in javax.swing that return Frame
static Frame | JOptionPane.getFrameForComponent(Component parentComponent) Returns the specified component's Frame.
static Frame | JOptionPane.getRootFrame() Returns the Frame to use for the class methods in which a frame is not provided.

Methods in javax.swing with parameters of type Frame
static void JOptionPane.setRootFrame(Frame newRootFrame)
Sets the frame to use for class methods in which a frame is not provided.

Constructors in javax.swing with parameters of type Frame
JWindow(Frame owner)
Creates a window with the specified owner frame.
JDialog(Frame owner)
Creates a non-modal dialog without a title with the specifed Frame as its owner.
JDialog(Frame owner, boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner Frame.
JDialog(Frame owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner frame.
JDialog(Frame owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner Frame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Frame.AccessibleAWTFrame

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Frame.AccessibleAWTFrame

Packages that use Frame.AccessibleAWTFrame
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Frame.AccessibleAWTFrame in javax.swing

Subclasses of Frame.AccessibleAWTFrame in javax.swing
protected  class JFrame.AccessibleJFrame
This class implements accessibility support for the JFrame class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Graphics

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Graphics

Packages that use Graphics
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Graphics in java.awt

Subclasses of Graphics in java.awt
 class Graphics2D
This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.

Methods in java.awt that return Graphics
Graphics | Component.getGraphics() Creates a graphics context for this component.
abstract Graphics | Graphics.create() Creates a new Graphics object that is a copy of this Graphics object.
Graphics | Graphics.create(int x, int y, int width, int height) Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
abstract Graphics | PrintJob.getGraphics() Gets a Graphics object that will draw to the next page.
abstract Graphics | Image.getGraphics() Creates a graphics context for drawing to an off-screen image.

Methods in java.awt with parameters of type Graphics
void | Component.paint(Graphics g) Paints this component.
void | Component.update(Graphics g) Updates this component.
void | Component.paintAll(Graphics g) Paints this component and all of its subcomponents.
void | Component.print(Graphics g) Prints this component.
void | Component.printAll(Graphics g) Prints this component and all of its subcomponents.
void | Container.paint(Graphics g) Paints the container.
void | Container.update(Graphics g) Updates the container.
void | Container.print(Graphics g) Prints the container.
void | Container.paintComponents(Graphics g) Paints each of the components in this container.
void | Container.printComponents(Graphics g) Prints each of the components in this container.
void | ScrollPane.printComponents(Graphics g) Prints the component in this scroll pane.
void | Canvas.paint(Graphics g) This method is called to repaint this canvas.
LineMetrics | FontMetrics.getLineMetrics(String str, Graphics context) Returns the LineMetrics object for the specified String in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(String str, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified String in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified character array in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(String str, Graphics context) Returns the bounds of the specified String in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context) Returns the bounds of the specified String in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context) Returns the bounds of the specified array of characters in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
Rectangle2D | FontMetrics.getMaxCharBounds(Graphics context) Returns the bounds for the character with the maximum bounds in the specified Graphics context.

Uses of Graphics in java.awt.image

Methods in java.awt.image that return Graphics
 Graphics BufferedImage.getGraphics()
This method returns a Graphics2D, but is here for backwards compatibility.

Uses of Graphics in java.awt.print

Methods in java.awt.print with parameters of type Graphics
 int Printable.print(Graphics graphics, PageFormat pageFormat, int pageIndex)
Prints the page at the specified index into the specified Graphics context in the specified format.

Uses of Graphics in java.beans

Methods in java.beans with parameters of type Graphics
void | PropertyEditor.paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.
void | PropertyEditorSupport.paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.

Uses of Graphics in javax.swing

Subclasses of Graphics in javax.swing
 class DebugGraphics
Graphics subclass supporting graphics debugging.

Methods in javax.swing that return Graphics
protected Graphics | JComponent.getComponentGraphics(Graphics g) Returns the graphics object used to paint this component.
Graphics | JComponent.getGraphics() Returns this component's graphics context, which lets you draw on a component.
Graphics | DebugGraphics.create() Overrides Graphics.create to return a DebugGraphics object.
Graphics | DebugGraphics.create(int x, int y, int width, int height) Overrides Graphics.create to return a DebugGraphics object.

Methods in javax.swing with parameters of type Graphics
protected  Graphics JComponent.getComponentGraphics(Graphics g)
Returns the graphics object used to paint this component.
protected  void JComponent.paintComponent(Graphics g)
If the UI delegate is non-null, calls its paint method.
protected  void JComponent.paintChildren(Graphics g)
Paints this component's children.
protected  void JComponent.paintBorder(Graphics g)
Paints the component's border.
 void JComponent.update(Graphics g)
Calls paint(g).
 void JComponent.paint(Graphics g)
This method is invoked by Swing to draw components.
 void JComponent.printAll(Graphics g)
Invoke this method to print the receiver.
 void JComponent.print(Graphics g)
Invoke this method to print the receiver.
protected  void JComponent.printComponent(Graphics g)
This is invoked during a printing operation.
protected  void JComponent.printChildren(Graphics g)
Prints this component's children.
protected  void JComponent.printBorder(Graphics g)
Prints the component's border.
 void JViewport.paint(Graphics g)
Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
protected  void AbstractButton.paintBorder(Graphics g)
Paint the button's border if BorderPainted property is true.
 void JLayeredPane.paint(Graphics g)
Paints this JLayeredPane within the specified graphics context.
protected  void JPopupMenu.paintBorder(Graphics g)
Paints the popup menu's border if BorderPainted property is true.
 void JApplet.update(Graphics g)
Just calls paint(g).
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
 void CellRendererPane.paint(Graphics g)
Shouldn't be called.
 void CellRendererPane.update(Graphics g)
Shouldn't be called.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
Paint a cell renderer component c on graphics object g.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Calls this.paintComponent(g, c, p, x, y, w, h, false).
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.
protected  void JInternalFrame.paintComponent(Graphics g)
 void JFrame.update(Graphics g)
Just calls paint(g).
protected  void JSplitPane.paintChildren(Graphics g)
Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
 void Icon.paintIcon(Component c, Graphics g, int x, int y)
Draw the icon at the specified location.
protected  void JToolBar.paintBorder(Graphics g)
Paint the toolbar's border if BorderPainted property is true.
protected  void JMenuBar.paintBorder(Graphics g)
Paints the menubar's border if BorderPainted property is true.
 void ImageIcon.paintIcon(Component c, Graphics g, int x, int y)
Paints the icon.
protected  void JProgressBar.paintBorder(Graphics g)
Paint the progress bar's border if BorderPainted property is true.
 void JDialog.update(Graphics g)
Calls paint(g).

Constructors in javax.swing with parameters of type Graphics
DebugGraphics(Graphics graphics, JComponent component)
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
DebugGraphics(Graphics graphics)
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.

Uses of Graphics in javax.swing.border

Methods in javax.swing.border with parameters of type Graphics
void | AbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
void | BevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
protected void | BevelBorder.paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
protected void | BevelBorder.paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
void | SoftBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
void | EmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Does no drawing by default.
void | MatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the matte border.
void | CompoundBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
void | LineBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
void | TitledBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
void | EtchedBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
void | Border.paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.

Uses of Graphics in javax.swing.colorchooser

Methods in javax.swing.colorchooser with parameters of type Graphics
 void AbstractColorChooserPanel.paint(Graphics g)
Draws the panel.

Uses of Graphics in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type Graphics
void | ComponentUI.paint(Graphics g, JComponent c)
void | ComponentUI.update(Graphics g, JComponent c)
abstract void | SplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g) Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
void | BorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
void | IconUIResource.paintIcon(Component c, Graphics g, int x, int y)

Uses of Graphics in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type Graphics
protected  void BasicTextUI.paintBackground(Graphics g)
Paints a background for the view.
protected  void BasicTextUI.paintSafely(Graphics g)
Paints the interface safely with a guarantee that the model won't change from the view of this thread.
 void BasicTextUI.update(Graphics g, JComponent c)
Superclass paints background in an uncontrollable way (i.e.
 void BasicTextUI.paint(Graphics g, JComponent c)
Paints the interface.
 void BasicSeparatorUI.paint(Graphics g, JComponent c)
 void BasicMenuItemUI.update(Graphics g, JComponent c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
 void BasicMenuItemUI.paint(Graphics g, JComponent c)
protected  void BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
 void BasicButtonUI.paint(Graphics g, JComponent c)
protected  void BasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect)
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected  void BasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected  void BasicButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
 void BasicToggleButtonUI.paint(Graphics g, JComponent c)
protected  void BasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
protected  void BasicToggleButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
protected  void BasicToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected  void BasicToggleButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
 void BasicRadioButtonUI.paint(Graphics g, JComponent c)
paint the radio button
protected  void BasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size)
 void BasicToolBarSeparatorUI.paint(Graphics g, JComponent c)
 void BasicProgressBarUI.paint(Graphics g, JComponent c)
All purpose paint method that should do the right thing for almost all linear progress bars.
protected  void BasicProgressBarUI.paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected  Point BasicProgressBarUI.getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height)
Designate the place where the progress string will be drawn.
 void BasicTabbedPaneUI.paint(Graphics g, JComponent c)
protected  void BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
this function draws the border around each tab note that this function does now draw the background of the tab.
protected  void BasicTabbedPaneUI.paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected  void BasicTabbedPaneUI.paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
protected  void BasicTabbedPaneUI.paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected  void BasicTabbedPaneUI.paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected  void BasicTabbedPaneUI.paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected  void BasicTabbedPaneUI.paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
static void BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
static void BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void BasicGraphicsUtils.drawString(Graphics g, String text, int underlinedChar, int x, int y)
Draw a string with the graphics g at location (x,y) just like g.drawString() would.
static void BasicGraphicsUtils.drawDashedRect(Graphics g, int x, int y, int width, int height)
 void BasicTableUI.paint(Graphics g, JComponent c)
Paint a representation of the table instance that was set in installUI().
 void BasicInternalFrameTitlePane.paintComponent(Graphics g)
 void BasicInternalFrameTitlePane.SystemMenuBar.paint(Graphics g)
 void BasicToolTipUI.paint(Graphics g, JComponent c)
 void BasicScrollBarUI.paint(Graphics g, JComponent c)
protected  void BasicScrollBarUI.paintDecreaseHighlight(Graphics g)
protected  void BasicScrollBarUI.paintIncreaseHighlight(Graphics g)
protected  void BasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected  void BasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
 void BasicBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicBorders.RadioButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicBorders.FieldBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicBorders.SplitPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
 void BasicToolBarUI.DragWindow.paint(Graphics g)
 void BasicDesktopPaneUI.paint(Graphics g, JComponent c)
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
 void BasicListUI.paint(Graphics g, JComponent c)
Paint the rows that intersect the Graphics objects clipRect.
protected  void BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with the labels foreground color.
protected  void BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
 void BasicLabelUI.paint(Graphics g, JComponent c)
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
 void BasicComboBoxUI.paint(Graphics g, JComponent c)
 void BasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the currently selected item.
 void BasicComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the background of the currently selected item.
 void BasicTableHeaderUI.paint(Graphics g, JComponent c)
 void BasicPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
 void BasicTreeUI.paint(Graphics g, JComponent c)
protected  void BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the horizontal part of the leg.
protected  void BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
Paints the vertical part of the leg.
protected  void BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the expand (toggle) part of a row.
protected  void BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the renderer part of a row.
protected  void BasicTreeUI.paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
Paints a vertical line.
protected  void BasicTreeUI.paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
Paints a horizontal line.
protected  void BasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
protected  void BasicTreeUI.drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
protected  void BasicTreeUI.drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
 void BasicSplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g)
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
 void BasicSplitPaneUI.paint(Graphics g, JComponent jc)
Messaged to paint the look and feel.
 void BasicSplitPaneDivider.paint(Graphics g)
Paints the divider.
 void BasicScrollPaneUI.paint(Graphics g, JComponent c)
 void BasicArrowButton.paint(Graphics g)
 void BasicArrowButton.paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
 void BasicSliderUI.paint(Graphics g, JComponent c)
 void BasicSliderUI.paintFocus(Graphics g)
 void BasicSliderUI.paintTrack(Graphics g)
 void BasicSliderUI.paintTicks(Graphics g)
protected  void BasicSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected  void BasicSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected  void BasicSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected  void BasicSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
 void BasicSliderUI.paintLabels(Graphics g)
protected  void BasicSliderUI.paintHorizontalLabel(Graphics g, int value, Component label)
Called for every label in the label table.
protected  void BasicSliderUI.paintVerticalLabel(Graphics g, int value, Component label)
Called for every label in the label table.
 void BasicSliderUI.paintThumb(Graphics g)

Uses of Graphics in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type Graphics
void | MetalTreeUI.paint(Graphics g, JComponent c)
protected void | MetalTreeUI.paintHorizontalSeparators(Graphics g, JComponent c)
protected void | MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
protected void | MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
void | MetalSeparatorUI.paint(Graphics g, JComponent c)
void | MetalPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
void | MetalCheckBoxIcon.paintIcon(Component c, Graphics g, int x, int y)
protected void | MetalCheckBoxIcon.drawCheck(Component c, Graphics g, int x, int y)
protected void | MetalLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY) Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
protected void | MetalToggleButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void | MetalToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | MetalTabbedPaneUI.paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected void | MetalTabbedPaneUI.paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | MetalTabbedPaneUI.paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | MetalTabbedPaneUI.paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | MetalTabbedPaneUI.paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
void | MetalTabbedPaneUI.update(Graphics g, JComponent c)
protected void | MetalTabbedPaneUI.paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
void | MetalTabbedPaneUI.paint(Graphics g, JComponent c)
protected void | MetalTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void | MetalTabbedPaneUI.paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | MetalTabbedPaneUI.paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | MetalTabbedPaneUI.paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | MetalTabbedPaneUI.paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
void | MetalScrollButton.paint(Graphics g)
void | MetalRadioButtonUI.paint(Graphics g, JComponent c)
protected void | MetalRadioButtonUI.paintFocus(Graphics g, Rectangle t, Dimension d)
void | MetalInternalFrameTitlePane.paintPalette(Graphics g)
void | MetalInternalFrameTitlePane.paintComponent(Graphics g)
void | MetalComboBoxButton.paintComponent(Graphics g)
void | MetalComboBoxUI.paint(Graphics g, JComponent c)
void | MetalProgressBarUI.paint(Graphics g, JComponent c) The sole reason for this paint method to even be here is that the JLF/Metal ProgressBar has a bit of special highlighting that needs to get drawn.
void | MetalSliderUI.paintThumb(Graphics g)
void | MetalSliderUI.paintTrack(Graphics g)
void | MetalSliderUI.paintFocus(Graphics g)
protected void | MetalSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | MetalSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | MetalSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | MetalSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | MetalScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected void | MetalScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
void | MetalBorders.Flush3DBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.InternalFrameBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.PaletteBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.OptionDialogBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.MenuItemBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.PopupMenuBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.RolloverButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ToolBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.TextFieldBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ScrollPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
void | MetalBorders.TableHeaderBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
protected void | MetalButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | MetalButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
void | MetalIconFactory.PaletteCloseIcon.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.FolderIcon16.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.FileIcon16.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.TreeControlIcon.paintIcon(Component c, Graphics g, int x, int y)
void | MetalIconFactory.TreeControlIcon.paintMe(Component c, Graphics g, int x, int y)
void | MetalToolTipUI.paint(Graphics g, JComponent c)
void | MetalComboBoxIcon.paintIcon(Component c, Graphics g, int x, int y) Paints the horizontal bars for the

Uses of Graphics in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type Graphics
void | MultiListUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiListUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiSeparatorUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSeparatorUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiLabelUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiLabelUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiPopupMenuUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiPopupMenuUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiPanelUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiPanelUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiScrollBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiScrollBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiTextUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTextUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiComboBoxUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiComboBoxUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiTableHeaderUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTableHeaderUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiFileChooserUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiFileChooserUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiColorChooserUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiColorChooserUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiTreeUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTreeUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiViewportUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiViewportUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiProgressBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiProgressBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiScrollPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiScrollPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiOptionPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiOptionPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiSplitPaneUI.finishedPaintingChildren(JSplitPane a, Graphics b) Call finishedPaintingChildren on each UI handled by this MultiUI.
void | MultiSplitPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSplitPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiButtonUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiButtonUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiToolBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiToolBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiSliderUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSliderUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiTableUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTableUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiDesktopIconUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiDesktopIconUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiMenuItemUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiMenuItemUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiInternalFrameUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiInternalFrameUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiToolTipUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiToolTipUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
void | MultiMenuBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiMenuBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.

Uses of Graphics in javax.swing.text

Methods in javax.swing.text that return Graphics
 Graphics View.getGraphics()
Fetch a Graphics for rendering.

Methods in javax.swing.text with parameters of type Graphics
abstract void | View.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
void | GlyphView.paint(Graphics g, Shape a) Renders a portion of a text style run.
void | Highlighter.paint(Graphics g) Renders the highlights.
void | Highlighter.HighlightPainter.paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) Renders the highlight.
protected void | BoxView.paintChild(Graphics g, Rectangle alloc, int index) Paints a child.
void | BoxView.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
void | ParagraphView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
protected void | PlainView.drawLine(int lineIndex, Graphics g, int x, int y) Renders a line of text, suppressing whitespace at the end and exanding any tabs.
protected int | PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
void | PlainView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | FieldView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
abstract void | LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
void | DefaultHighlighter.paint(Graphics g) Renders the highlights.
void | DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
abstract Shape | LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
void | DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c) Paints a highlight.
Shape | DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
protected int | PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
protected int | PasswordView.drawEchoCharacter(Graphics g, int x, int y, char c) Renders the echo character, or whatever graphic should be used to display the password characters.
abstract void | GlyphView.GlyphPainter.paint(GlyphView v, Graphics g, Shape a, int p0, int p1) Paint the glyphs representing the given range.
void | AsyncBoxView.paint(Graphics g, Shape alloc) Render the view using the given allocation and rendering surface.
void | AsyncBoxView.ChildLocator.paintChildren(Graphics g) Paint the children that intersect the clip area.
void | DefaultCaret.paint(Graphics g) Renders the caret as a vertical line.
void | Caret.paint(Graphics g) Renders the caret.
void | ComponentView.paint(Graphics g, Shape a) The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).
void | IconView.paint(Graphics g, Shape a) Paints the icon.
protected void | WrappedPlainView.drawLine(int p0, int p1, Graphics g, int x, int y) Renders a line of text, suppressing whitespace at the end and expanding any tabs.
protected int | WrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | WrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
void | WrappedPlainView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
static int | Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique.

Uses of Graphics in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Graphics
 void StyleSheet.BoxPainter.paint(Graphics g, float x, float y, float w, float h, View v)
Paints the CSS box according to the attributes given.
 void StyleSheet.ListPainter.paint(Graphics g, float x, float y, float w, float h, View v, int item)
Paints the CSS list decoration according to the attributes given.
 void ParagraphView.paint(Graphics g, Shape a)
Renders using the given rendering surface and area on that surface.
 void BlockView.paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.
 void ListView.paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.
protected  void ListView.paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint().

Uses of Graphics in javax.swing.tree

Methods in javax.swing.tree with parameters of type Graphics
void | DefaultTreeCellRenderer.paint(Graphics g) Paints the value.
void | DefaultTreeCellEditor.EditorContainer.paint(Graphics g) Overrides Container.paint to paint the node's icon and use the selection color for the background.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Graphics2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Graphics2D

Packages that use Graphics2D
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.image | Provides classes for creating and modifying images.

Uses of Graphics2D in java.awt

Methods in java.awt that return Graphics2D
abstract  Graphics2D GraphicsEnvironment.createGraphics(BufferedImage img)
Returns a Graphics2D object for rendering into the specified BufferedImage.

Uses of Graphics2D in java.awt.font

Methods in java.awt.font with parameters of type Graphics2D
void | TextLayout.draw(Graphics2D g2, float x, float y) Renders this TextLayout at the specified location in the specified Graphics2D context.
abstract void | GraphicAttribute.draw(Graphics2D graphics, float x, float y) Renders this GraphicAttribute at the specified location.
void | ImageGraphicAttribute.draw(Graphics2D graphics, float x, float y) Renders the graphic at the specified location.
void | ShapeGraphicAttribute.draw(Graphics2D graphics, float x, float y) Draws the graphic at the given location.

Uses of Graphics2D in java.awt.image

Methods in java.awt.image that return Graphics2D
 Graphics2D BufferedImage.createGraphics()
Creates a Graphics2D, which can be used to draw into this BufferedImage.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GraphicsConfigTemplate

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GraphicsConfigTemplate

Packages that use GraphicsConfigTemplate
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of GraphicsConfigTemplate in java.awt

Methods in java.awt with parameters of type GraphicsConfigTemplate
 GraphicsConfiguration GraphicsDevice.getBestConfiguration(GraphicsConfigTemplate gct)
Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GraphicsConfiguration

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GraphicsConfiguration

Packages that use GraphicsConfiguration
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of GraphicsConfiguration in java.awt

Methods in java.awt that return GraphicsConfiguration
GraphicsConfiguration | Component.getGraphicsConfiguration() Get the GraphicsConfiguration associated with this Component.
abstract GraphicsConfiguration | Graphics2D.getDeviceConfiguration() Returns the device configuration associated with this Graphics2D.
abstract GraphicsConfiguration[] | GraphicsDevice.getConfigurations() Returns all of the GraphicsConfiguration objects associated with this GraphicsDevice.
abstract GraphicsConfiguration | GraphicsDevice.getDefaultConfiguration() Returns the default GraphicsConfiguration associated with this GraphicsDevice.
GraphicsConfiguration | GraphicsDevice.getBestConfiguration(GraphicsConfigTemplate gct) Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
abstract GraphicsConfiguration | GraphicsConfigTemplate.getBestConfiguration(GraphicsConfiguration[] gc) Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
GraphicsConfiguration | Window.getGraphicsConfiguration() This method returns the GraphicsConfiguration used by this Window.

Methods in java.awt with parameters of type GraphicsConfiguration
abstract GraphicsConfiguration | GraphicsConfigTemplate.getBestConfiguration(GraphicsConfiguration[] gc) Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
abstract boolean | GraphicsConfigTemplate.isGraphicsConfigSupported(GraphicsConfiguration gc) Returns a boolean indicating whether or not the specified GraphicsConfiguration can be used to create a drawing surface that supports the indicated features.

Constructors in java.awt with parameters of type GraphicsConfiguration
Canvas(GraphicsConfiguration config)
Constructs a new Canvas given a GraphicsConfiguration object.
Window(Window owner, GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
Frame(GraphicsConfiguration gc)
Create a Frame with the specified GraphicsConfiguration of a screen device.
Frame(String title, GraphicsConfiguration gc)
Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.

Uses of GraphicsConfiguration in javax.swing

Constructors in javax.swing with parameters of type GraphicsConfiguration
JWindow(GraphicsConfiguration gc)
Creates a window with the specified GraphicsConfiguration of a screen device.
JWindow(Window owner, GraphicsConfiguration gc)
JFrame(GraphicsConfiguration gc)
Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.
JFrame(String title, GraphicsConfiguration gc)
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GraphicsDevice

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GraphicsDevice

Packages that use GraphicsDevice
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of GraphicsDevice in java.awt

Methods in java.awt that return GraphicsDevice
abstract GraphicsDevice[] | GraphicsEnvironment.getScreenDevices() Returns an array of all of the screen GraphicsDevice objects.
abstract GraphicsDevice | GraphicsEnvironment.getDefaultScreenDevice() Returns the default screen GraphicsDevice.
abstract GraphicsDevice | GraphicsConfiguration.getDevice() Returns the GraphicsDevice associated with this GraphicsConfiguration.

Constructors in java.awt with parameters of type GraphicsDevice
Robot(GraphicsDevice screen)
Creates a Robot for the given screen device.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GraphicsEnvironment

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GraphicsEnvironment

Packages that use GraphicsEnvironment
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of GraphicsEnvironment in java.awt

Methods in java.awt that return GraphicsEnvironment
static GraphicsEnvironment GraphicsEnvironment.getLocalGraphicsEnvironment()
Returns the local GraphicsEnvironment.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.GridBagConstraints

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.GridBagConstraints

Packages that use GridBagConstraints
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of GridBagConstraints in java.awt

Fields in java.awt declared as GridBagConstraints
protected  GridBagConstraints GridBagLayout.defaultConstraints
This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the defaultConstraints.

Methods in java.awt that return GridBagConstraints
GridBagConstraints | GridBagLayout.getConstraints(Component comp) Gets the constraints for the specified component.
protected GridBagConstraints | GridBagLayout.lookupConstraints(Component comp) Retrieves the constraints for the specified component.

Methods in java.awt with parameters of type GridBagConstraints
void | GridBagLayout.setConstraints(Component comp, GridBagConstraints constraints) Sets the constraints for the specified component in this layout.
protected void | GridBagLayout.AdjustForGravity(GridBagConstraints constraints, Rectangle r)

Uses of GridBagConstraints in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type GridBagConstraints
protected  void BasicOptionPaneUI.addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
Creates the appropriate object to represent msg and places it into container.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.IllegalComponentStateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.IllegalComponentStateException

Packages that use IllegalComponentStateException
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of IllegalComponentStateException in javax.accessibility

Methods in javax.accessibility that throw IllegalComponentStateException
abstract  Locale AccessibleContext.getLocale()
Gets the locale of the component.

Uses of IllegalComponentStateException in javax.swing

Methods in javax.swing that throw IllegalComponentStateException
 Locale ImageIcon.AccessibleImageIcon.getLocale()
Returns the locale of this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Image

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Image

Packages that use Image
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.beans | Contains classes related to Java Beans development.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Image in java.applet

Methods in java.applet that return Image
Image | AppletContext.getImage(URL url) Returns an Image object that can then be painted on the screen.
Image | Applet.getImage(URL url) Returns an Image object that can then be painted on the screen.
Image | Applet.getImage(URL url, String name) Returns an Image object that can then be painted on the screen.

Uses of Image in java.awt

Methods in java.awt that return Image
Image | Component.createImage(ImageProducer producer) Creates an image from the specified image producer.
Image | Component.createImage(int width, int height) Creates an off-screen drawable image to be used for double buffering.
abstract Image | Toolkit.getImage(String filename) Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
abstract Image | Toolkit.getImage(URL url) Returns an image which gets pixel data from the specified URL.
abstract Image | Toolkit.createImage(String filename) Returns an image which gets pixel data from the specified file.
abstract Image | Toolkit.createImage(URL url) Returns an image which gets pixel data from the specified URL.
abstract Image | Toolkit.createImage(ImageProducer producer) Creates an image with the specified image producer.
Image | Toolkit.createImage(byte[] imagedata) Creates an image which decodes the image stored in the specified byte array.
abstract Image | Toolkit.createImage(byte[] imagedata, int imageoffset, int imagelength) Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
Image | Frame.getIconImage() Gets the image to be displayed in the minimized icon for this frame.
Image | Image.getScaledInstance(int width, int height, int hints) Creates a scaled version of this image.

Methods in java.awt with parameters of type Image
boolean | Component.imageUpdate(Image img, int infoflags, int x, int y, int w, int h) Repaints the component when the image has changed.
boolean | Component.prepareImage(Image image, ImageObserver observer) Prepares an image for rendering on this component.
boolean | Component.prepareImage(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering on this component at the specified width and height.
int | Component.checkImage(Image image, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.
int | Component.checkImage(Image image, int width, int height, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.
abstract boolean | Graphics.drawImage(Image img, int x, int y, ImageObserver observer) Draws as much of the specified image as is currently available.
abstract boolean | Graphics.drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract boolean | Graphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.
abstract boolean | Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract boolean | Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract boolean | Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract boolean | Graphics2D.drawImage(Image img, AffineTransform xform, ImageObserver obs) Renders an image, applying a transform from image space into user space before drawing.
abstract boolean | Toolkit.prepareImage(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering.
abstract int | Toolkit.checkImage(Image image, int width, int height, ImageObserver observer) Indicates the construction status of a specified image that is being prepared for display.
Cursor | Toolkit.createCustomCursor(Image cursor, Point hotSpot, String name) Creates a new custom cursor object.
void | Frame.setIconImage(Image image) Sets the image to displayed in the minimized icon for this frame.
void | MediaTracker.addImage(Image image, int id) Adds an image to the list of images being tracked by this media tracker.
void | MediaTracker.addImage(Image image, int id, int w, int h) Adds a scaled image to the list of images being tracked by this media tracker.
void | MediaTracker.removeImage(Image image) Remove the specified image from this media tracker.
void | MediaTracker.removeImage(Image image, int id) Remove the specified image from the specified tracking ID of this media tracker.
void | MediaTracker.removeImage(Image image, int id, int width, int height) Remove the specified image with the specified width, height, and ID from this media tracker.

Uses of Image in java.awt.dnd

Methods in java.awt.dnd with parameters of type Image
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Constructors in java.awt.dnd with parameters of type Image
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.

Uses of Image in java.awt.font

Constructors in java.awt.font with parameters of type Image
ImageGraphicAttribute(Image image, int alignment)
Constucts an ImageGraphicAttribute from the specified Image.
ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
Constructs an ImageGraphicAttribute from the specified Image.

Uses of Image in java.awt.im.spi

Methods in java.awt.im.spi that return Image
 Image InputMethodDescriptor.getInputMethodIcon(Locale inputLocale)
Returns an icon for the corresponding input method.

Uses of Image in java.awt.image

Subclasses of Image in java.awt.image
 class BufferedImage
The BufferedImage subclass describes an Image with an accessible buffer of image data.

Methods in java.awt.image with parameters of type Image
 boolean ImageObserver.imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
This method is called when information about an image which was previously requested using an asynchronous interface becomes available.

Constructors in java.awt.image with parameters of type Image
PixelGrabber(Image img, int x, int y, int w, int h, int[] pix, int off, int scansize)
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image into the given array.
PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB)
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image.

Uses of Image in java.beans

Methods in java.beans that return Image
Image | BeanInfo.getIcon(int iconKind) This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc.
Image | SimpleBeanInfo.getIcon(int iconKind) Claim there are no icons available.
Image | SimpleBeanInfo.loadImage(String resourceName) This is a utility method to help in loading icon images.

Uses of Image in javax.swing

Fields in javax.swing declared as Image
protected  Image JViewport.backingStoreImage
The view image used for a backing store.

Methods in javax.swing that return Image
Image | RepaintManager.getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight) Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
static Image | GrayFilter.createDisabledImage(Image i) Creates a disabled image
Image | ImageIcon.getImage() Returns this icon's Image.

Methods in javax.swing with parameters of type Image
boolean | AbstractButton.imageUpdate(Image img, int infoflags, int x, int y, int w, int h) This is overridden to return false if the current Icon's Image is not equal to the passed in Image img.
static Image | GrayFilter.createDisabledImage(Image i) Creates a disabled image
boolean | JLabel.imageUpdate(Image img, int infoflags, int x, int y, int w, int h) This is overriden to return false if the current Icon's Image is not equal to the passed in Image img.
protected void | ImageIcon.loadImage(Image image) Loads the image, returning only when the image is loaded.
void | ImageIcon.setImage(Image image) Sets the image displayed by this icon.
boolean | DebugGraphics.drawImage(Image img, int x, int y, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.

Constructors in javax.swing with parameters of type Image
ImageIcon(Image image, String description)
Creates an ImageIcon from the image.
ImageIcon(Image image)
Creates an ImageIcon from an image object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Insets

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Insets

Packages that use Insets
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Insets in java.awt

Fields in java.awt declared as Insets
 Insets GridBagConstraints.insets
This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.

Methods in java.awt that return Insets
 Insets Container.getInsets()
Determines the insets of this container, which indicate the size of the container's border.
 Insets Container.insets()
Deprecated. As of JDK version 1.1, replaced by getInsets().

Constructors in java.awt with parameters of type Insets
GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
Creates a GridBagConstraints object with all of its fields set to the passed-in arguments.

Uses of Insets in java.awt.dnd

Methods in java.awt.dnd that return Insets
 Insets Autoscroll.getAutoscrollInsets()
This method returns the Insets describing the autoscrolling region or border relative to the geometry of the implementing Component.

Uses of Insets in javax.swing

Methods in javax.swing that return Insets
Insets | JComponent.getInsets() If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.
Insets | JComponent.getInsets(Insets insets) Returns an Insets object containing this component's inset values.
Insets | JViewport.getInsets() Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.
Insets | JViewport.getInsets(Insets insets) Returns an Insets object containing this JViewports inset values.
Insets | AbstractButton.getMargin() Returns the margin between the button's border and the label.
Insets | JPopupMenu.getMargin() Returns the margin, in pixels, between the popup menu's border and its containees.
Insets | UIDefaults.getInsets(Object key) If the value of key is an Insets return it, otherwise return null.
Insets | JToolBar.getMargin() Returns the margin between the toolbar's border and its buttons.
Insets | JMenuBar.getMargin() Returns the margin between the menubar's border and its menus.
static Insets | UIManager.getInsets(Object key) Returns an Insets object from the defaults table.

Methods in javax.swing with parameters of type Insets
Insets | JComponent.getInsets(Insets insets) Returns an Insets object containing this component's inset values.
Insets | JViewport.getInsets(Insets insets) Returns an Insets object containing this JViewports inset values.
void | AbstractButton.setMargin(Insets m) Sets space for margin between the button's border and the label.
void | JToolBar.setMargin(Insets m) Sets the margin between the toolbar's border and its buttons.
void | JMenuBar.setMargin(Insets m) Sets the margin between the menubar's border and its menus.

Uses of Insets in javax.swing.border

Methods in javax.swing.border that return Insets
Insets | AbstractBorder.getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
Insets | AbstractBorder.getBorderInsets(Component c, Insets insets) Reinitializes the insets parameter with this Border's current Insets.
Insets | BevelBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | BevelBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | SoftBevelBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | EmptyBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | EmptyBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | EmptyBorder.getBorderInsets() Returns the insets of the border.
Insets | MatteBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | MatteBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | MatteBorder.getBorderInsets() Returns the insets of the border.
Insets | CompoundBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | CompoundBorder.getBorderInsets(Component c) Returns the insets of the composite border by adding the insets of the outside border to the insets of the inside border.
Insets | LineBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | LineBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | TitledBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | TitledBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | EtchedBorder.getBorderInsets(Component c) Returns the insets of the border.
Insets | EtchedBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | Border.getBorderInsets(Component c) Returns the insets of the border.

Methods in javax.swing.border with parameters of type Insets
Insets | AbstractBorder.getBorderInsets(Component c, Insets insets) Reinitializes the insets parameter with this Border's current Insets.
Insets | BevelBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | EmptyBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | MatteBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | CompoundBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | LineBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | TitledBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Insets | EtchedBorder.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.

Constructors in javax.swing.border with parameters of type Insets
EmptyBorder(Insets borderInsets)
Creates an empty border with the specified insets.
MatteBorder(Insets borderInsets, Color matteColor)
Creates a matte border with the specified insets and color.
MatteBorder(Insets borderInsets, Icon tileIcon)
Creates a matte border with the specified insets and tile icon.

Uses of Insets in javax.swing.plaf

Subclasses of Insets in javax.swing.plaf
 class InsetsUIResource

Methods in javax.swing.plaf that return Insets
 Insets BorderUIResource.getBorderInsets(Component c)

Constructors in javax.swing.plaf with parameters of type Insets
BorderUIResource.EmptyBorderUIResource(Insets insets)

Uses of Insets in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Insets
protected Insets | BasicTabbedPaneUI.tabInsets
protected Insets | BasicTabbedPaneUI.selectedTabPadInsets
protected Insets | BasicTabbedPaneUI.tabAreaInsets
protected Insets | BasicTabbedPaneUI.contentBorderInsets
protected Insets | BasicSliderUI.focusInsets
protected Insets | BasicSliderUI.insetCache

Methods in javax.swing.plaf.basic that return Insets
protected  Insets BasicTabbedPaneUI.getTabInsets(int tabPlacement, int tabIndex)
protected  Insets BasicTabbedPaneUI.getSelectedTabPadInsets(int tabPlacement)
protected  Insets BasicTabbedPaneUI.getTabAreaInsets(int tabPlacement)
protected  Insets BasicTabbedPaneUI.getContentBorderInsets(int tabPlacement)
static Insets BasicGraphicsUtils.getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()
static Insets BasicGraphicsUtils.getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()
 Insets BasicBorders.ButtonBorder.getBorderInsets(Component c)
 Insets BasicBorders.ToggleButtonBorder.getBorderInsets(Component c)
 Insets BasicBorders.RadioButtonBorder.getBorderInsets(Component c)
 Insets BasicBorders.MenuBarBorder.getBorderInsets(Component c)
 Insets BasicBorders.MarginBorder.getBorderInsets(Component c)
 Insets BasicBorders.FieldBorder.getBorderInsets(Component c)
 Insets BasicBorders.SplitPaneBorder.getBorderInsets(Component c)
 Insets BasicToolBarUI.DragWindow.getInsets()
protected  Insets BasicComboBoxUI.getInsets()
Gets the insets from the JComboBox.
 Insets BasicSplitPaneUI.getInsets(JComponent jc)
Returns the insets.
 Insets BasicSplitPaneDivider.getInsets()
If a border has been set on this component, returns the border's insets, else calls super.getInsets.
 Insets BasicDesktopIconUI.getInsets(JComponent c)

Methods in javax.swing.plaf.basic with parameters of type Insets
protected int | BasicProgressBarUI.getAmountFull(Insets b, int width, int height) This determines the amount of the progress bar that should be filled based on the percent done gathered from the model.
protected void | BasicProgressBarUI.paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected static void | BasicTabbedPaneUI.rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)
protected void | BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the horizontal part of the leg.
protected void | BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) Paints the vertical part of the leg.
protected void | BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the expand (toggle) part of a row.
protected void | BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the renderer part of a row.
protected int | BasicSplitPaneUI.BasicHorizontalLayoutManager.getAvailableSize(Dimension containerSize, Insets insets) Returns the available width based on the container size and Insets.
protected int | BasicSplitPaneUI.BasicHorizontalLayoutManager.getInitialLocation(Insets insets) Returns the left inset, unless the Insets are null in which case 0 is returned.
protected void | BasicSplitPaneUI.BasicHorizontalLayoutManager.setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.

Uses of Insets in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as Insets
protected static Insets | MetalComboBoxEditor.editorBorderInsets
protected static Insets | MetalBorders.ButtonBorder.borderInsets
protected static Insets | MetalBorders.MenuBarBorder.borderInsets
protected static Insets | MetalBorders.MenuItemBorder.borderInsets
protected static Insets | MetalBorders.PopupMenuBorder.borderInsets
protected Insets | MetalBorders.TableHeaderBorder.editorBorderInsets

Methods in javax.swing.plaf.metal that return Insets
Insets | MetalBorders.Flush3DBorder.getBorderInsets(Component c)
Insets | MetalBorders.ButtonBorder.getBorderInsets(Component c)
Insets | MetalBorders.InternalFrameBorder.getBorderInsets(Component c)
Insets | MetalBorders.PaletteBorder.getBorderInsets(Component c)
Insets | MetalBorders.OptionDialogBorder.getBorderInsets(Component c)
Insets | MetalBorders.MenuBarBorder.getBorderInsets(Component c)
Insets | MetalBorders.MenuItemBorder.getBorderInsets(Component c)
Insets | MetalBorders.PopupMenuBorder.getBorderInsets(Component c)
Insets | MetalBorders.ToolBarBorder.getBorderInsets(Component c)
Insets | MetalBorders.ScrollPaneBorder.getBorderInsets(Component c)
Insets | MetalBorders.TableHeaderBorder.getBorderInsets(Component c)

Methods in javax.swing.plaf.metal with parameters of type Insets
protected void | MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
protected void | MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)

Uses of Insets in javax.swing.text

Methods in javax.swing.text that return Insets
 Insets JTextComponent.getMargin()
Returns the margin between the text component's border and its text.

Methods in javax.swing.text with parameters of type Insets
 void JTextComponent.setMargin(Insets m)
Sets margin space between the text component's border and its text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes

Packages that use JobAttributes
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes in java.awt

Methods in java.awt with parameters of type JobAttributes
PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
void | JobAttributes.set(JobAttributes obj) Sets all of the attributes of this JobAttributes to the same values as the attributes of obj.

Constructors in java.awt with parameters of type JobAttributes
JobAttributes(JobAttributes obj)
Constructs a JobAttributes instance which is a copy of the supplied JobAttributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes.DefaultSelectionType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes.DefaultSelectionType

Packages that use JobAttributes.DefaultSelectionType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes.DefaultSelectionType in java.awt

Fields in java.awt declared as JobAttributes.DefaultSelectionType
static JobAttributes.DefaultSelectionType | JobAttributes.DefaultSelectionType.ALL The DefaultSelectionType instance to use for specifying that all pages of the job should be printed.
static JobAttributes.DefaultSelectionType | JobAttributes.DefaultSelectionType.RANGE The DefaultSelectionType instance to use for specifying that a range of pages of the job should be printed.
static JobAttributes.DefaultSelectionType | JobAttributes.DefaultSelectionType.SELECTION The DefaultSelectionType instance to use for specifying that the current selection should be printed.

Methods in java.awt that return JobAttributes.DefaultSelectionType
 JobAttributes.DefaultSelectionType JobAttributes.getDefaultSelection()
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.

Methods in java.awt with parameters of type JobAttributes.DefaultSelectionType
 void JobAttributes.setDefaultSelection(JobAttributes.DefaultSelectionType defaultSelection)
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.

Constructors in java.awt with parameters of type JobAttributes.DefaultSelectionType
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes.DestinationType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes.DestinationType

Packages that use JobAttributes.DestinationType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes.DestinationType in java.awt

Fields in java.awt declared as JobAttributes.DestinationType
static JobAttributes.DestinationType | JobAttributes.DestinationType.FILE The DestinationType instance to use for specifying print to file.
static JobAttributes.DestinationType | JobAttributes.DestinationType.PRINTER The DestinationType instance to use for specifying print to printer.

Methods in java.awt that return JobAttributes.DestinationType
 JobAttributes.DestinationType JobAttributes.getDestination()
Specifies whether output will be to a printer or a file for jobs using these attributes.

Methods in java.awt with parameters of type JobAttributes.DestinationType
 void JobAttributes.setDestination(JobAttributes.DestinationType destination)
Specifies whether output will be to a printer or a file for jobs using these attributes.

Constructors in java.awt with parameters of type JobAttributes.DestinationType
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes.DialogType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes.DialogType

Packages that use JobAttributes.DialogType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes.DialogType in java.awt

Fields in java.awt declared as JobAttributes.DialogType
static JobAttributes.DialogType | JobAttributes.DialogType.COMMON The DialogType instance to use for specifying the cross-platform, pure Java print dialog.
static JobAttributes.DialogType | JobAttributes.DialogType.NATIVE The DialogType instance to use for specifying the platform's native print dialog.
static JobAttributes.DialogType | JobAttributes.DialogType.NONE The DialogType instance to use for specifying no print dialog.

Methods in java.awt that return JobAttributes.DialogType
 JobAttributes.DialogType JobAttributes.getDialog()
Returns whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.

Methods in java.awt with parameters of type JobAttributes.DialogType
 void JobAttributes.setDialog(JobAttributes.DialogType dialog)
Specifies whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.

Constructors in java.awt with parameters of type JobAttributes.DialogType
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes.MultipleDocumentHandlingType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes.MultipleDocumentHandlingType

Packages that use JobAttributes.MultipleDocumentHandlingType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes.MultipleDocumentHandlingType in java.awt

Fields in java.awt declared as JobAttributes.MultipleDocumentHandlingType
static JobAttributes.MultipleDocumentHandlingType | JobAttributes.MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, collated documents.
static JobAttributes.MultipleDocumentHandlingType | JobAttributes.MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, uncollated documents.

Methods in java.awt that return JobAttributes.MultipleDocumentHandlingType
 JobAttributes.MultipleDocumentHandlingType JobAttributes.getMultipleDocumentHandling()
Specifies the handling of multiple documents, including collation, for jobs using these attributes.

Methods in java.awt with parameters of type JobAttributes.MultipleDocumentHandlingType
 void JobAttributes.setMultipleDocumentHandling(JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling)
Specifies the handling of multiple documents, including collation, for jobs using these attributes.

Constructors in java.awt with parameters of type JobAttributes.MultipleDocumentHandlingType
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.JobAttributes.SidesType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.JobAttributes.SidesType

Packages that use JobAttributes.SidesType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of JobAttributes.SidesType in java.awt

Fields in java.awt declared as JobAttributes.SidesType
static JobAttributes.SidesType | JobAttributes.SidesType.ONE_SIDED The SidesType instance to use for specifying that consecutive job pages should be printed upon the same side of consecutive media sheets.
static JobAttributes.SidesType | JobAttributes.SidesType.TWO_SIDED_LONG_EDGE The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge.
static JobAttributes.SidesType | JobAttributes.SidesType.TWO_SIDED_SHORT_EDGE The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge.

Methods in java.awt that return JobAttributes.SidesType
 JobAttributes.SidesType JobAttributes.getSides()
Returns how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.

Methods in java.awt with parameters of type JobAttributes.SidesType
 void JobAttributes.setSides(JobAttributes.SidesType sides)
Specifies how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.

Constructors in java.awt with parameters of type JobAttributes.SidesType
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Label

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Label

Packages that use Label
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Label in java.awt

Methods in java.awt with parameters of type Label
protected abstract  java.awt.peer.LabelPeer Toolkit.createLabel(Label target)
Creates this toolkit's implementation of Label using the specified peer interface.

Constructors in java.awt with parameters of type Label
Label.AccessibleAWTLabel()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.List

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.List

Packages that use List
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of List in java.awt

Methods in java.awt with parameters of type List
protected abstract  java.awt.peer.ListPeer Toolkit.createList(List target)
Creates this toolkit's implementation of List using the specified peer interface.

Constructors in java.awt with parameters of type List
List.AccessibleAWTList()
List.AccessibleAWTList.AccessibleAWTListChild(List parent, int indexInParent)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.List.AccessibleAWTList

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.List.AccessibleAWTList

Packages that use List.AccessibleAWTList
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of List.AccessibleAWTList in java.awt

Constructors in java.awt with parameters of type List.AccessibleAWTList
List.AccessibleAWTList.AccessibleAWTListChild(List parent, int indexInParent)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MediaTracker

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MediaTracker

Packages that use MediaTracker
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of MediaTracker in javax.swing

Fields in javax.swing declared as MediaTracker
protected static MediaTracker ImageIcon.tracker

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Menu

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Menu

Packages that use Menu
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Menu in java.awt

Subclasses of Menu in java.awt
 class PopupMenu
A class that implements a menu which can be dynamically popped up at a specified position within a component.

Methods in java.awt that return Menu
Menu | MenuBar.getHelpMenu() Gets the help menu on the menu bar.
Menu | MenuBar.add(Menu m) Adds the specified menu to the menu bar.
Menu | MenuBar.getMenu(int i) Gets the specified menu.

Methods in java.awt with parameters of type Menu
protected abstract java.awt.peer.MenuPeer | Toolkit.createMenu(Menu target) Creates this toolkit's implementation of Menu using the specified peer interface.
void | MenuBar.setHelpMenu(Menu m) Sets the specified menu to be this menu bar's help menu.
Menu | MenuBar.add(Menu m) Adds the specified menu to the menu bar.

Constructors in java.awt with parameters of type Menu
Menu.AccessibleAWTMenu()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Menu.AccessibleAWTMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Menu.AccessibleAWTMenu

Packages that use Menu.AccessibleAWTMenu
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Menu.AccessibleAWTMenu in java.awt

Subclasses of Menu.AccessibleAWTMenu in java.awt
protected  class PopupMenu.AccessibleAWTPopupMenu
Inner class of PopupMenu used to provide default support for accessibility.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuBar

Packages that use MenuBar
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuBar in java.awt

Methods in java.awt that return MenuBar
 MenuBar Frame.getMenuBar()
Gets the menu bar for this frame.

Methods in java.awt with parameters of type MenuBar
protected abstract java.awt.peer.MenuBarPeer | Toolkit.createMenuBar(MenuBar target) Creates this toolkit's implementation of MenuBar using the specified peer interface.
void | Frame.setMenuBar(MenuBar mb) Sets the menu bar for this frame to the specified menu bar.

Constructors in java.awt with parameters of type MenuBar
MenuBar.AccessibleAWTMenuBar()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuComponent

Packages that use MenuComponent
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuComponent in java.awt

Subclasses of MenuComponent in java.awt
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
class | MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
class | MenuItem All items in a menu must belong to the class MenuItem, or one of its subclasses.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.

Methods in java.awt with parameters of type MenuComponent
void | Component.remove(MenuComponent popup) Removes the specified popup menu from the component.
void | Menu.remove(MenuComponent item) Removes the specified menu item from this menu.
void | MenuContainer.remove(MenuComponent comp)
void | MenuBar.remove(MenuComponent m) Removes the specified menu component from this menu bar.
void | Frame.remove(MenuComponent m) Removes the specified menu bar from this frame.

Constructors in java.awt with parameters of type MenuComponent
MenuComponent.AccessibleAWTMenuComponent()
Although the class is abstract, this should be called by all sub-classes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuComponent.AccessibleAWTMenuComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuComponent.AccessibleAWTMenuComponent

Packages that use MenuComponent.AccessibleAWTMenuComponent
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuComponent.AccessibleAWTMenuComponent in java.awt

Subclasses of MenuComponent.AccessibleAWTMenuComponent in java.awt
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuItem

Packages that use MenuItem
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuItem in java.awt

Subclasses of MenuItem in java.awt
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.

Methods in java.awt that return MenuItem
MenuItem | Menu.getItem(int index) Gets the item located at the specified index of this menu.
MenuItem | Menu.add(MenuItem mi) Adds the specified menu item to this menu.
MenuItem | MenuBar.getShortcutMenuItem(MenuShortcut s) Gets the instance of MenuItem associated with the specified MenuShortcut object, or null if none of the menu items being managed by this menu bar is associated with the specified menu shortcut.

Methods in java.awt with parameters of type MenuItem
MenuItem | Menu.add(MenuItem mi) Adds the specified menu item to this menu.
void | Menu.insert(MenuItem menuitem, int index) Inserts a menu item into this menu at the specified position.
protected abstract java.awt.peer.MenuItemPeer | Toolkit.createMenuItem(MenuItem target) Creates this toolkit's implementation of MenuItem using the specified peer interface.

Constructors in java.awt with parameters of type MenuItem
MenuItem.AccessibleAWTMenuItem()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuItem.AccessibleAWTMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuItem.AccessibleAWTMenuItem

Packages that use MenuItem.AccessibleAWTMenuItem
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuItem.AccessibleAWTMenuItem in java.awt

Subclasses of MenuItem.AccessibleAWTMenuItem in java.awt
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.MenuShortcut

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.MenuShortcut

Packages that use MenuShortcut
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of MenuShortcut in java.awt

Methods in java.awt that return MenuShortcut
 MenuShortcut MenuItem.getShortcut()
Get the MenuShortcut object associated with this menu item,

Methods in java.awt with parameters of type MenuShortcut
void | MenuItem.setShortcut(MenuShortcut s) Set the MenuShortcut object associated with this menu item.
boolean | MenuShortcut.equals(MenuShortcut s) Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
MenuItem | MenuBar.getShortcutMenuItem(MenuShortcut s) Gets the instance of MenuItem associated with the specified MenuShortcut object, or null if none of the menu items being managed by this menu bar is associated with the specified menu shortcut.
void | MenuBar.deleteShortcut(MenuShortcut s) Deletes the specified menu shortcut.

Constructors in java.awt with parameters of type MenuShortcut
MenuItem(String label, MenuShortcut s)
Create a menu item with an associated keyboard shortcut.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes

Packages that use PageAttributes
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes in java.awt

Methods in java.awt with parameters of type PageAttributes
PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
void | PageAttributes.set(PageAttributes obj) Sets all of the attributes of this PageAttributes to the same values as the attributes of obj.

Constructors in java.awt with parameters of type PageAttributes
PageAttributes(PageAttributes obj)
Constructs a PageAttributes instance which is a copy of the supplied PageAttributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes.ColorType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes.ColorType

Packages that use PageAttributes.ColorType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes.ColorType in java.awt

Fields in java.awt declared as PageAttributes.ColorType
static PageAttributes.ColorType | PageAttributes.ColorType.COLOR The ColorType instance to use for specifying color printing.
static PageAttributes.ColorType | PageAttributes.ColorType.MONOCHROME The ColorType instance to use for specifying monochrome printing.

Methods in java.awt that return PageAttributes.ColorType
 PageAttributes.ColorType PageAttributes.getColor()
Returns whether pages using these attributes will be rendered in color or monochrome.

Methods in java.awt with parameters of type PageAttributes.ColorType
 void PageAttributes.setColor(PageAttributes.ColorType color)
Specifies whether pages using these attributes will be rendered in color or monochrome.

Constructors in java.awt with parameters of type PageAttributes.ColorType
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes.MediaType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes.MediaType

Packages that use PageAttributes.MediaType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes.MediaType in java.awt

Fields in java.awt declared as PageAttributes.MediaType
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_4A0 The MediaType instance for ISO/DIN & JIS 4A0, 1682 x 2378 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_2A0 The MediaType instance for ISO/DIN & JIS 2A0, 1189 x 1682 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A0 The MediaType instance for ISO/DIN & JIS A0, 841 x 1189 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A1 The MediaType instance for ISO/DIN & JIS A1, 594 x 841 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A2 The MediaType instance for ISO/DIN & JIS A2, 420 x 594 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A3 The MediaType instance for ISO/DIN & JIS A3, 297 x 420 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A4 The MediaType instance for ISO/DIN & JIS A4, 210 x 297 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A5 The MediaType instance for ISO/DIN & JIS A5, 148 x 210 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A6 The MediaType instance for ISO/DIN & JIS A6, 105 x 148 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A7 The MediaType instance for ISO/DIN & JIS A7, 74 x 105 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A8 The MediaType instance for ISO/DIN & JIS A8, 52 x 74 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A9 The MediaType instance for ISO/DIN & JIS A9, 37 x 52 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_A10 The MediaType instance for ISO/DIN & JIS A10, 26 x 37 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B0 The MediaType instance for ISO/DIN B0, 1000 x 1414 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B1 The MediaType instance for ISO/DIN B1, 707 x 1000 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B2 The MediaType instance for ISO/DIN B2, 500 x 707 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B3 The MediaType instance for ISO/DIN B3, 353 x 500 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B4 The MediaType instance for ISO/DIN B4, 250 x 353 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B5 The MediaType instance for ISO/DIN B5, 176 x 250 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B6 The MediaType instance for ISO/DIN B6, 125 x 176 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B7 The MediaType instance for ISO/DIN B7, 88 x 125 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B8 The MediaType instance for ISO/DIN B8, 62 x 88 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B9 The MediaType instance for ISO/DIN B9, 44 x 62 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B10 The MediaType instance for ISO/DIN B10, 31 x 44 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B0 The MediaType instance for JIS B0, 1030 x 1456 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B1 The MediaType instance for JIS B1, 728 x 1030 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B2 The MediaType instance for JIS B2, 515 x 728 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B3 The MediaType instance for JIS B3, 364 x 515 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B4 The MediaType instance for JIS B4, 257 x 364 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B5 The MediaType instance for JIS B5, 182 x 257 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B6 The MediaType instance for JIS B6, 128 x 182 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B7 The MediaType instance for JIS B7, 91 x 128 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B8 The MediaType instance for JIS B8, 64 x 91 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B9 The MediaType instance for JIS B9, 45 x 64 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.JIS_B10 The MediaType instance for JIS B10, 32 x 45 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C0 The MediaType instance for ISO/DIN C0, 917 x 1297 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C1 The MediaType instance for ISO/DIN C1, 648 x 917 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C2 The MediaType instance for ISO/DIN C2, 458 x 648 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C3 The MediaType instance for ISO/DIN C3, 324 x 458 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C4 The MediaType instance for ISO/DIN C4, 229 x 324 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C5 The MediaType instance for ISO/DIN C5, 162 x 229 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C6 The MediaType instance for ISO/DIN C6, 114 x 162 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C7 The MediaType instance for ISO/DIN C7, 81 x 114 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C8 The MediaType instance for ISO/DIN C8, 57 x 81 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C9 The MediaType instance for ISO/DIN C9, 40 x 57 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C10 The MediaType instance for ISO/DIN C10, 28 x 40 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_DESIGNATED_LONG The MediaType instance for ISO Designated Long, 110 x 220 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.EXECUTIVE The MediaType instance for Executive, 7 1/4 x 10 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.FOLIO The MediaType instance for Folio, 8 1/2 x 13 in.
static PageAttributes.MediaType | PageAttributes.MediaType.INVOICE The MediaType instance for Invoice, 5 1/2 x 8 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.LEDGER The MediaType instance for Ledger, 11 x 17 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_LETTER The MediaType instance for North American Letter, 8 1/2 x 11 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_LEGAL The MediaType instance for North American Legal, 8 1/2 x 14 in.
static PageAttributes.MediaType | PageAttributes.MediaType.QUARTO The MediaType instance for Quarto, 215 x 275 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.A The MediaType instance for Engineering A, 8 1/2 x 11 in.
static PageAttributes.MediaType | PageAttributes.MediaType.B The MediaType instance for Engineering B, 11 x 17 in.
static PageAttributes.MediaType | PageAttributes.MediaType.C The MediaType instance for Engineering C, 17 x 22 in.
static PageAttributes.MediaType | PageAttributes.MediaType.D The MediaType instance for Engineering D, 22 x 34 in.
static PageAttributes.MediaType | PageAttributes.MediaType.E The MediaType instance for Engineering E, 34 x 44 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_10X15_ENVELOPE The MediaType instance for North American 10 x 15 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_10X14_ENVELOPE The MediaType instance for North American 10 x 14 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_10X13_ENVELOPE The MediaType instance for North American 10 x 13 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_9X12_ENVELOPE The MediaType instance for North American 9 x 12 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_9X11_ENVELOPE The MediaType instance for North American 9 x 11 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_7X9_ENVELOPE The MediaType instance for North American 7 x 9 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_6X9_ENVELOPE The MediaType instance for North American 6 x 9 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_NUMBER_9_ENVELOPE The MediaType instance for North American #9 Business Envelope, 3 7/8 x 8 7/8 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_NUMBER_10_ENVELOPE The MediaType instance for North American #10 Business Envelope, 4 1/8 x 9 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_NUMBER_11_ENVELOPE The MediaType instance for North American #11 Business Envelope, 4 1/2 x 10 3/8 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_NUMBER_12_ENVELOPE The MediaType instance for North American #12 Business Envelope, 4 3/4 x 11 in.
static PageAttributes.MediaType | PageAttributes.MediaType.NA_NUMBER_14_ENVELOPE The MediaType instance for North American #14 Business Envelope, 5 x 11 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.INVITE_ENVELOPE The MediaType instance for Invitation Envelope, 220 x 220 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.ITALY_ENVELOPE The MediaType instance for Italy Envelope, 110 x 230 mm.
static PageAttributes.MediaType | PageAttributes.MediaType.MONARCH_ENVELOPE The MediaType instance for Monarch Envelope, 3 7/8 x 7 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.PERSONAL_ENVELOPE The MediaType instance for 6 3/4 envelope, 3 5/8 x 6 1/2 in.
static PageAttributes.MediaType | PageAttributes.MediaType.A0 An alias for ISO_A0.
static PageAttributes.MediaType | PageAttributes.MediaType.A1 An alias for ISO_A1.
static PageAttributes.MediaType | PageAttributes.MediaType.A2 An alias for ISO_A2.
static PageAttributes.MediaType | PageAttributes.MediaType.A3 An alias for ISO_A3.
static PageAttributes.MediaType | PageAttributes.MediaType.A4 An alias for ISO_A4.
static PageAttributes.MediaType | PageAttributes.MediaType.A5 An alias for ISO_A5.
static PageAttributes.MediaType | PageAttributes.MediaType.A6 An alias for ISO_A6.
static PageAttributes.MediaType | PageAttributes.MediaType.A7 An alias for ISO_A7.
static PageAttributes.MediaType | PageAttributes.MediaType.A8 An alias for ISO_A8.
static PageAttributes.MediaType | PageAttributes.MediaType.A9 An alias for ISO_A9.
static PageAttributes.MediaType | PageAttributes.MediaType.A10 An alias for ISO_A10.
static PageAttributes.MediaType | PageAttributes.MediaType.B0 An alias for ISO_B0.
static PageAttributes.MediaType | PageAttributes.MediaType.B1 An alias for ISO_B1.
static PageAttributes.MediaType | PageAttributes.MediaType.B2 An alias for ISO_B2.
static PageAttributes.MediaType | PageAttributes.MediaType.B3 An alias for ISO_B3.
static PageAttributes.MediaType | PageAttributes.MediaType.B4 An alias for ISO_B4.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B4_ENVELOPE An alias for ISO_B4.
static PageAttributes.MediaType | PageAttributes.MediaType.B5 An alias for ISO_B5.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_B5_ENVELOPE An alias for ISO_B5.
static PageAttributes.MediaType | PageAttributes.MediaType.B6 An alias for ISO_B6.
static PageAttributes.MediaType | PageAttributes.MediaType.B7 An alias for ISO_B7.
static PageAttributes.MediaType | PageAttributes.MediaType.B8 An alias for ISO_B8.
static PageAttributes.MediaType | PageAttributes.MediaType.B9 An alias for ISO_B9.
static PageAttributes.MediaType | PageAttributes.MediaType.B10 An alias for ISO_B10.
static PageAttributes.MediaType | PageAttributes.MediaType.C0 An alias for ISO_C0.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C0_ENVELOPE An alias for ISO_C0.
static PageAttributes.MediaType | PageAttributes.MediaType.C1 An alias for ISO_C1.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C1_ENVELOPE An alias for ISO_C1.
static PageAttributes.MediaType | PageAttributes.MediaType.C2 An alias for ISO_C2.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C2_ENVELOPE An alias for ISO_C2.
static PageAttributes.MediaType | PageAttributes.MediaType.C3 An alias for ISO_C3.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C3_ENVELOPE An alias for ISO_C3.
static PageAttributes.MediaType | PageAttributes.MediaType.C4 An alias for ISO_C4.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C4_ENVELOPE An alias for ISO_C4.
static PageAttributes.MediaType | PageAttributes.MediaType.C5 An alias for ISO_C5.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C5_ENVELOPE An alias for ISO_C5.
static PageAttributes.MediaType | PageAttributes.MediaType.C6 An alias for ISO_C6.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C6_ENVELOPE An alias for ISO_C6.
static PageAttributes.MediaType | PageAttributes.MediaType.C7 An alias for ISO_C7.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C7_ENVELOPE An alias for ISO_C7.
static PageAttributes.MediaType | PageAttributes.MediaType.C8 An alias for ISO_C8.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C8_ENVELOPE An alias for ISO_C8.
static PageAttributes.MediaType | PageAttributes.MediaType.C9 An alias for ISO_C9.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C9_ENVELOPE An alias for ISO_C9.
static PageAttributes.MediaType | PageAttributes.MediaType.C10 An alias for ISO_C10.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_C10_ENVELOPE An alias for ISO_C10.
static PageAttributes.MediaType | PageAttributes.MediaType.ISO_DESIGNATED_LONG_ENVELOPE An alias for ISO_DESIGNATED_LONG.
static PageAttributes.MediaType | PageAttributes.MediaType.STATEMENT An alias for INVOICE.
static PageAttributes.MediaType | PageAttributes.MediaType.TABLOID An alias for LEDGER.
static PageAttributes.MediaType | PageAttributes.MediaType.LETTER An alias for NA_LETTER.
static PageAttributes.MediaType | PageAttributes.MediaType.NOTE An alias for NA_LETTER.
static PageAttributes.MediaType | PageAttributes.MediaType.LEGAL An alias for NA_LEGAL.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_10X15 An alias for NA_10X15_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_10X14 An alias for NA_10X14_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_10X13 An alias for NA_10X13_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_9X12 An alias for NA_9X12_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_9X11 An alias for NA_9X11_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_7X9 An alias for NA_7X9_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_6X9 An alias for NA_6X9_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_9 An alias for NA_NUMBER_9_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_10 An alias for NA_NUMBER_10_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_11 An alias for NA_NUMBER_11_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_12 An alias for NA_NUMBER_12_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_14 An alias for NA_NUMBER_14_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_INVITE An alias for INVITE_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_ITALY An alias for ITALY_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_MONARCH An alias for MONARCH_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ENV_PERSONAL An alias for PERSONAL_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.INVITE An alias for INVITE_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.ITALY An alias for ITALY_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.MONARCH An alias for MONARCH_ENVELOPE.
static PageAttributes.MediaType | PageAttributes.MediaType.PERSONAL An alias for PERSONAL_ENVELOPE.

Methods in java.awt that return PageAttributes.MediaType
 PageAttributes.MediaType PageAttributes.getMedia()
Returns the paper size for pages using these attributes.

Methods in java.awt with parameters of type PageAttributes.MediaType
 void PageAttributes.setMedia(PageAttributes.MediaType media)
Specifies the desired paper size for pages using these attributes.

Constructors in java.awt with parameters of type PageAttributes.MediaType
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes.OrientationRequestedType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes.OrientationRequestedType

Packages that use PageAttributes.OrientationRequestedType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes.OrientationRequestedType in java.awt

Fields in java.awt declared as PageAttributes.OrientationRequestedType
static PageAttributes.OrientationRequestedType | PageAttributes.OrientationRequestedType.PORTRAIT The OrientationRequestedType instance to use for specifying a portrait orientation.
static PageAttributes.OrientationRequestedType | PageAttributes.OrientationRequestedType.LANDSCAPE The OrientationRequestedType instance to use for specifying a landscape orientation.

Methods in java.awt that return PageAttributes.OrientationRequestedType
 PageAttributes.OrientationRequestedType PageAttributes.getOrientationRequested()
Returns the print orientation for pages using these attributes.

Methods in java.awt with parameters of type PageAttributes.OrientationRequestedType
 void PageAttributes.setOrientationRequested(PageAttributes.OrientationRequestedType orientationRequested)
Specifies the print orientation for pages using these attributes.

Constructors in java.awt with parameters of type PageAttributes.OrientationRequestedType
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes.OriginType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes.OriginType

Packages that use PageAttributes.OriginType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes.OriginType in java.awt

Fields in java.awt declared as PageAttributes.OriginType
static PageAttributes.OriginType | PageAttributes.OriginType.PHYSICAL The OriginType instance to use for specifying a physical origin.
static PageAttributes.OriginType | PageAttributes.OriginType.PRINTABLE The OriginType instance to use for specifying a printable origin.

Methods in java.awt that return PageAttributes.OriginType
 PageAttributes.OriginType PageAttributes.getOrigin()
Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.

Methods in java.awt with parameters of type PageAttributes.OriginType
 void PageAttributes.setOrigin(PageAttributes.OriginType origin)
Specifies whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.

Constructors in java.awt with parameters of type PageAttributes.OriginType
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PageAttributes.PrintQualityType

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PageAttributes.PrintQualityType

Packages that use PageAttributes.PrintQualityType
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PageAttributes.PrintQualityType in java.awt

Fields in java.awt declared as PageAttributes.PrintQualityType
static PageAttributes.PrintQualityType | PageAttributes.PrintQualityType.HIGH The PrintQualityType instance to use for specifying a high print quality.
static PageAttributes.PrintQualityType | PageAttributes.PrintQualityType.NORMAL The PrintQualityType instance to use for specifying a normal print quality.
static PageAttributes.PrintQualityType | PageAttributes.PrintQualityType.DRAFT The PrintQualityType instance to use for specifying a draft print quality.

Methods in java.awt that return PageAttributes.PrintQualityType
 PageAttributes.PrintQualityType PageAttributes.getPrintQuality()
Returns the print quality for pages using these attributes.

Methods in java.awt with parameters of type PageAttributes.PrintQualityType
 void PageAttributes.setPrintQuality(PageAttributes.PrintQualityType printQuality)
Specifies the print quality for pages using these attributes.

Constructors in java.awt with parameters of type PageAttributes.PrintQualityType
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Panel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Panel

Packages that use Panel
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Panel in java.applet

Subclasses of Panel in java.applet
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of Panel in java.awt

Methods in java.awt with parameters of type Panel
protected abstract  java.awt.peer.PanelPeer Toolkit.createPanel(Panel target)
Creates this toolkit's implementation of Panel using the specified peer interface.

Constructors in java.awt with parameters of type Panel
Panel.AccessibleAWTPanel()

Uses of Panel in javax.swing

Subclasses of Panel in javax.swing
 class JApplet
An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Panel.AccessibleAWTPanel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Panel.AccessibleAWTPanel

Packages that use Panel.AccessibleAWTPanel
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Panel.AccessibleAWTPanel in java.applet

Subclasses of Panel.AccessibleAWTPanel in java.applet
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Uses of Panel.AccessibleAWTPanel in javax.swing

Subclasses of Panel.AccessibleAWTPanel in javax.swing
protected  class JApplet.AccessibleJApplet
This class implements accessibility support for the JApplet class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Point

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Point

Packages that use Point
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.image | Provides classes for creating and modifying images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Point in java.awt

Methods in java.awt that return Point
 Point Component.getLocation()
Gets the location of this component in the form of a point specifying the component's top-left corner.
 Point Component.getLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
 Point Component.location()
Deprecated. As of JDK version 1.1, replaced by getLocation().
 Point Component.getLocation(Point rv)
Store the x,y origin of this component into "return value" rv and return rv.
 Point Component.AccessibleAWTComponent.getLocationOnScreen()
Returns the location of the object on the screen.
 Point Component.AccessibleAWTComponent.getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
 Point ScrollPane.getScrollPosition()
Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port.
 Point MenuComponent.AccessibleAWTMenuComponent.getLocationOnScreen()
Returns the location of the object on the screen.
 Point MenuComponent.AccessibleAWTMenuComponent.getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
 Point Point.getLocation()
Returns the location of this point.
 Point List.AccessibleAWTList.AccessibleAWTListChild.getLocationOnScreen()
Returns the location of the object on the screen.
 Point List.AccessibleAWTList.AccessibleAWTListChild.getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
 Point GridBagLayout.getLayoutOrigin()
Determines the origin of the layout grid.
 Point GridBagLayout.location(int x, int y)
Determines which cell in the layout grid contains the point specified by (x, y).
 Point Rectangle.getLocation()
Returns the location of this Rectangle.

Methods in java.awt with parameters of type Point
void | Component.setLocation(Point p) Moves this component to a new location.
Point | Component.getLocation(Point rv) Store the x,y origin of this component into "return value" rv and return rv.
boolean | Component.contains(Point p) Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
Component | Component.getComponentAt(Point p) Returns the component or subcomponent that contains the specified point.
Component | Container.getComponentAt(Point p) Gets the component that contains the specified point.
Component | Container.findComponentAt(Point p) Locates the visible child component that contains the specified point.
boolean | Component.AccessibleAWTComponent.contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
void | Component.AccessibleAWTComponent.setLocation(Point p) Sets the location of the object relative to the parent.
Accessible | Component.AccessibleAWTComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | Container.AccessibleAWTContainer.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
boolean | Polygon.contains(Point p) Determines whether the specified Point is inside this Polygon.
void | ScrollPane.setScrollPosition(Point p) Scrolls to the specified position within the child component.
boolean | MenuComponent.AccessibleAWTMenuComponent.contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
void | MenuComponent.AccessibleAWTMenuComponent.setLocation(Point p) Sets the location of the object relative to the parent.
Accessible | MenuComponent.AccessibleAWTMenuComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Cursor | Toolkit.createCustomCursor(Image cursor, Point hotSpot, String name) Creates a new custom cursor object.
void | Point.setLocation(Point p) Sets the location of the point to the specificed location.
Accessible | List.AccessibleAWTList.getAccessibleAt(Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
boolean | List.AccessibleAWTList.AccessibleAWTListChild.contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
void | List.AccessibleAWTList.AccessibleAWTListChild.setLocation(Point p) Sets the location of the object relative to the parent.
Accessible | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
int | TextComponent.AccessibleAWTTextComponent.getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
void | Rectangle.setLocation(Point p) Moves this Rectangle to the specified location.
boolean | Rectangle.contains(Point p) Checks whether or not this Rectangle contains the specified Point.
void | Rectangle.add(Point pt) Adds the specified Point to this Rectangle.

Constructors in java.awt with parameters of type Point
Point(Point p)
Constructs and initializes a point with the same location as the specified Point object.
Rectangle(Point p, Dimension d)
Constructs a new Rectangle whose top-left corner is specified by the Point argument, and whose width and height are specified by the Dimension argument.
Rectangle(Point p)
Constructs a new Rectangle whose top-left corner is the specified Point, and whose width and height are both zero.

Uses of Point in java.awt.dnd

Methods in java.awt.dnd that return Point
Point | DropTargetDropEvent.getLocation() This method returns a Point indicating the Cursor's current location in the Component's coordinates.
Point | DragGestureEvent.getDragOrigin() This method returns a Point in the coordinates of the Component over which the drag originated.
Point | DropTargetDragEvent.getLocation() This method returns a Point indicating the Cursor's current location within the Component's coordinates.

Methods in java.awt.dnd with parameters of type Point
protected void | DragGestureRecognizer.fireDragGestureRecognized(int dragAction, Point p) Notify the DragGestureListener that a Drag and Drop initiating gesture has occurred.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.
protected DropTarget.DropTargetAutoScroller | DropTarget.createDropTargetAutoScroller(Component c, Point p) create an embedded autoscroller
protected void | DropTarget.initializeAutoscrolling(Point p) initialize autoscrolling
protected void | DropTarget.updateAutoscroll(Point dragCursorLocn) update autoscrolling with current cursor locn
protected void | DropTarget.DropTargetAutoScroller.updateLocation(Point newLocn) cause autoscroll to occur
void | Autoscroll.autoscroll(Point cursorLocn) notify the Component to autoscroll

Constructors in java.awt.dnd with parameters of type Point
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDropEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and the current set of actions supported by the source.
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)
Construct a DropTargetEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, the current set of actions supported by the source, and a boolean indicating if the source is in the same JVM as the target.
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.
DropTarget.DropTargetAutoScroller(Component c, Point p)
construct a DropTargetAutoScroller
DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDragEvent given the DropTargetContext for this operation, the location of the "Drag" Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and current set of actions supported by the source.

Uses of Point in java.awt.event

Methods in java.awt.event that return Point
 Point MouseEvent.getPoint()
Returns the x,y position of the event relative to the source component.

Uses of Point in java.awt.image

Methods in java.awt.image that return Point
Point[] | BufferedImage.getWritableTileIndices() Returns an array of Point objects indicating which tiles are checked out for writing.
Point[] | WritableRenderedImage.getWritableTileIndices() Returns an array of Point objects indicating which tiles are checked out for writing.

Methods in java.awt.image with parameters of type Point
static WritableRaster | Raster.createInterleavedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.
static WritableRaster | Raster.createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | Raster.createBandedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.
static WritableRaster | Raster.createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.
static WritableRaster | Raster.createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.
static WritableRaster | Raster.createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location) Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.
static WritableRaster | Raster.createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | Raster.createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location) Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.
static Raster | Raster.createRaster(SampleModel sm, DataBuffer db, Point location) Creates a Raster with the specified SampleModel and DataBuffer.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, Point location) Creates a WritableRaster with the specified SampleModel.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, DataBuffer db, Point location) Creates a WritableRaster with the specified SampleModel and DataBuffer.

Constructors in java.awt.image with parameters of type Point
Raster(SampleModel sampleModel, Point origin)
Constructs a Raster with the given SampleModel.
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a Raster with the given SampleModel and DataBuffer.
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent.
WritableRaster(SampleModel sampleModel, Point origin)
Constructs a WritableRaster with the given SampleModel.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a WritableRaster with the given SampleModel and DataBuffer.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.

Uses of Point in javax.accessibility

Methods in javax.accessibility that return Point
Point | AccessibleComponent.getLocationOnScreen() Returns the location of the object on the screen.
Point | AccessibleComponent.getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.

Methods in javax.accessibility with parameters of type Point
int | AccessibleText.getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
boolean | AccessibleComponent.contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
void | AccessibleComponent.setLocation(Point p) Sets the location of the object relative to the parent.
Accessible | AccessibleComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.

Uses of Point in javax.swing

Fields in javax.swing declared as Point
protected  Point JViewport.lastPaintPosition
The last viewPosition that we've painted, so we know how much of the backing store image is valid.

Methods in javax.swing that return Point
Point | JComponent.getToolTipLocation(MouseEvent event) Returns the tooltip location in this component's coordinate system.
Point | JComponent.getLocation(Point rv) Stores the x,y origin of this component into "return value" rv and returns rv.
Point | JViewport.getViewPosition() Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.
Point | JViewport.toViewCoordinates(Point p) Converts a point in pixel coordinates to view coordinates.
protected Point | JMenu.getPopupMenuOrigin() Computes the origin for the JMenu's popup menu.
static Point | SwingUtilities.convertPoint(Component source, Point aPoint, Component destination) Convert a aPoint in source coordinate system to destination coordinate system.
static Point | SwingUtilities.convertPoint(Component source, int x, int y, Component destination) Convert the point (x,y) in source coordinate system to destination coordinate system.
Point | JList.indexToLocation(int index) Returns the origin of the specified item in JList coordinates.
Point | JList.AccessibleJList.AccessibleJListChild.getLocationOnScreen()
Point | JList.AccessibleJList.AccessibleJListChild.getLocation()
Point | JTree.AccessibleJTree.AccessibleJTreeNode.getLocationOnScreen()
protected Point | JTree.AccessibleJTree.AccessibleJTreeNode.getLocationInJTree()
Point | JTree.AccessibleJTree.AccessibleJTreeNode.getLocation()
Point | JTable.AccessibleJTable.AccessibleJTableCell.getLocationOnScreen() Returns the location of the object on the screen.
Point | JTable.AccessibleJTable.AccessibleJTableCell.getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.

Methods in javax.swing with parameters of type Point
 Point JComponent.getLocation(Point rv)
Stores the x,y origin of this component into "return value" rv and returns rv.
 void JViewport.setViewPosition(Point p)
Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.
protected  boolean JViewport.computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint)
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
 Point JViewport.toViewCoordinates(Point p)
Converts a point in pixel coordinates to view coordinates.
 Accessible JTabbedPane.AccessibleJTabbedPane.getAccessibleAt(Point p)
 int AbstractButton.AccessibleAbstractButton.getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point.
 Component MenuSelectionManager.componentForPoint(Component source, Point sourcePoint)
Returns the component in the currently selected path which contains sourcePoint.
static Point SwingUtilities.convertPoint(Component source, Point aPoint, Component destination)
Convert a aPoint in source coordinate system to destination coordinate system.
static void SwingUtilities.convertPointToScreen(Point p, Component c)
Convert a point from a component's coordinate system to screen coordinates.
static void SwingUtilities.convertPointFromScreen(Point p, Component c)
Convert a point from a screen coordinates to a component's coordinate system
static Accessible SwingUtilities.getAccessibleAt(Component c, Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
 int JList.locationToIndex(Point location)
Converts a point in JList coordinates to the index of the cell at that location.
 Accessible JList.AccessibleJList.getAccessibleAt(Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
 boolean JList.AccessibleJList.AccessibleJListChild.contains(Point p)
 void JList.AccessibleJList.AccessibleJListChild.setLocation(Point p)
 Accessible JList.AccessibleJList.AccessibleJListChild.getAccessibleAt(Point p)
 Accessible JTree.AccessibleJTree.getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
 boolean JTree.AccessibleJTree.AccessibleJTreeNode.contains(Point p)
 void JTree.AccessibleJTree.AccessibleJTreeNode.setLocation(Point p)
 Accessible JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAt(Point p)
 int JTable.columnAtPoint(Point point)
Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
 int JTable.rowAtPoint(Point point)
Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
 Accessible JTable.AccessibleJTable.getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
 boolean JTable.AccessibleJTable.AccessibleJTableCell.contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
 void JTable.AccessibleJTable.AccessibleJTableCell.setLocation(Point p)
Sets the location of the object relative to the parent.
 Accessible JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAt(Point p)
 int JLabel.AccessibleJLabel.getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point.

Uses of Point in javax.swing.plaf

Methods in javax.swing.plaf that return Point
abstract  Point ListUI.indexToLocation(JList list, int index)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.

Methods in javax.swing.plaf with parameters of type Point
abstract int | TextUI.viewToModel(JTextComponent t, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
abstract int | TextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract int | ListUI.locationToIndex(JList list, Point location) Convert a point in JList coordinates to the index of the cell at that location.

Uses of Point in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Point
protected  Point BasicToolBarUI.DockingListener.origin

Methods in javax.swing.plaf.basic that return Point
protected Point | BasicProgressBarUI.getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height) Designate the place where the progress string will be drawn.
Point | BasicToolBarUI.DragWindow.getOffset()
Point | BasicListUI.indexToLocation(JList list, int index)

Methods in javax.swing.plaf.basic with parameters of type Point
int | BasicTextUI.viewToModel(JTextComponent tc, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | BasicTextUI.viewToModel(JTextComponent tc, Point pt, Position.Bias[] biasReturn) Converts the given place in the view coordinate system to the nearest representative location in the model.
void | BasicToolBarUI.setFloating(boolean b, Point p)
boolean | BasicToolBarUI.canDock(Component c, Point p)
protected void | BasicToolBarUI.dragTo(Point position, Point origin)
protected void | BasicToolBarUI.floatAt(Point position, Point origin)
void | BasicToolBarUI.DragWindow.setOffset(Point p)
int | BasicListUI.locationToIndex(JList list, Point location)

Uses of Point in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type Point
protected  void MetalToolBarUI.setDragOffset(Point p)

Uses of Point in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return Point
 Point MultiListUI.indexToLocation(JList a, int b)
Call indexToLocation on each UI handled by this MultiUI.

Methods in javax.swing.plaf.multi with parameters of type Point
int | MultiListUI.locationToIndex(JList a, Point b) Call locationToIndex on each UI handled by this MultiUI.
int | MultiTextUI.viewToModel(JTextComponent a, Point b) Call viewToModel on each UI handled by this MultiUI.
int | MultiTextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.

Uses of Point in javax.swing.table

Methods in javax.swing.table that return Point
Point | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocationOnScreen()
Point | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocation()

Methods in javax.swing.table with parameters of type Point
int | JTableHeader.columnAtPoint(Point point) Returns the index of the column that point lies in, or -1 if it lies out of bounds.
Accessible | JTableHeader.AccessibleJTableHeader.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
boolean | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.contains(Point p)
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setLocation(Point p)
Accessible | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAt(Point p)

Uses of Point in javax.swing.text

Methods in javax.swing.text that return Point
Point | DefaultCaret.getMagicCaretPosition() Gets the saved caret position.
Point | Caret.getMagicCaretPosition() Gets the current caret visual location.

Methods in javax.swing.text with parameters of type Point
int | JTextComponent.viewToModel(Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | JTextComponent.AccessibleJTextComponent.getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
void | DefaultCaret.setMagicCaretPosition(Point p) Saves the current caret position.
void | Caret.setMagicCaretPosition(Point p) Set the current caret visual location.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Polygon

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Polygon

Packages that use Polygon
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Polygon in java.awt

Methods in java.awt with parameters of type Polygon
void | Graphics.drawPolygon(Polygon p) Draws the outline of a polygon defined by the specified Polygon object.
void | Graphics.fillPolygon(Polygon p) Fills the polygon defined by the specified Polygon object with the graphics context's current color.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PopupMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PopupMenu

Packages that use PopupMenu
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PopupMenu in java.awt

Methods in java.awt with parameters of type PopupMenu
void | Component.add(PopupMenu popup) Adds the specified popup menu to the component.
protected abstract java.awt.peer.PopupMenuPeer | Toolkit.createPopupMenu(PopupMenu target) Creates this toolkit's implementation of PopupMenu using the specified peer interface.

Constructors in java.awt with parameters of type PopupMenu
PopupMenu.AccessibleAWTPopupMenu()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.PrintJob

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.PrintJob

Packages that use PrintJob
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PrintJob in java.awt

Methods in java.awt that return PrintJob
abstract PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, Properties props) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
PrintJob | Toolkit.getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes) Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
PrintJob | PrintGraphics.getPrintJob() Returns the PrintJob object from which this PrintGraphics object originated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Rectangle

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Rectangle

Packages that use Rectangle
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.beans | Contains classes related to Java Beans development.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Rectangle in java.awt

Fields in java.awt declared as Rectangle
protected  Rectangle Polygon.bounds
Bounds of the polygon.

Methods in java.awt that return Rectangle
 Rectangle Component.getBounds()
Gets the bounds of this component in the form of a Rectangle object.
 Rectangle Component.bounds()
Deprecated. As of JDK version 1.1, replaced by getBounds().
 Rectangle Component.getBounds(Rectangle rv)
Store the bounds of this component into "return value" rv and return rv.
 Rectangle Component.AccessibleAWTComponent.getBounds()
Gets the bounds of this object in the form of a Rectangle object.
 Rectangle Polygon.getBounds()
Gets the bounding box of this Polygon.
 Rectangle Polygon.getBoundingBox()
Deprecated. As of JDK version 1.1, replaced by getBounds().
abstract  Rectangle GraphicsConfiguration.getBounds()
Returns the bounds of the GraphicsConfiguration in the device coordinates.
 Rectangle MenuComponent.AccessibleAWTMenuComponent.getBounds()
Gets the bounds of this object in the form of a Rectangle object.
abstract  Rectangle Graphics.getClipBounds()
Returns the bounding rectangle of the current clipping area.
 Rectangle Graphics.getClipRect()
Deprecated. As of JDK version 1.1, replaced by getClipBounds().
 Rectangle Graphics.getClipBounds(Rectangle r)
Returns the bounding rectangle of the current clipping area.
 Rectangle Shape.getBounds()
Returns an integer Rectangle that completely encloses the Shape.
 Rectangle List.AccessibleAWTList.AccessibleAWTListChild.getBounds()
Gets the bounds of this object in the form of a Rectangle object.
 Rectangle TextComponent.AccessibleAWTTextComponent.getCharacterBounds(int i)
Determines the bounding box of the character at the given index into the string.
 Rectangle Rectangle.getBounds()
Gets the bounding Rectangle of this Rectangle.
 Rectangle Rectangle.intersection(Rectangle r)
Computes the intersection of this Rectangle with the specified Rectangle.
 Rectangle Rectangle.union(Rectangle r)
Computes the union of this Rectangle with the specified Rectangle.

Methods in java.awt with parameters of type Rectangle
void | Component.setBounds(Rectangle r) Moves and resizes this component to conform to the new bounding rectangle r.
Rectangle | Component.getBounds(Rectangle rv) Store the bounds of this component into "return value" rv and return rv.
void | Component.AccessibleAWTComponent.setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
void | MenuComponent.AccessibleAWTMenuComponent.setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
Rectangle | Graphics.getClipBounds(Rectangle r) Returns the bounding rectangle of the current clipping area.
abstract boolean | Graphics2D.hit(Rectangle rect, Shape s, boolean onStroke) Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
void | List.AccessibleAWTList.AccessibleAWTListChild.setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
protected void | GridBagLayout.AdjustForGravity(GridBagConstraints constraints, Rectangle r)
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
void | Rectangle.setBounds(Rectangle r) Sets the bounding Rectangle of this Rectangle to match the specified Rectangle.
boolean | Rectangle.contains(Rectangle r) Checks whether or not this Rectangle entirely contains the specified Rectangle.
boolean | Rectangle.intersects(Rectangle r) Determines whether or not this Rectangle and the specified Rectangle intersect.
Rectangle | Rectangle.intersection(Rectangle r) Computes the intersection of this Rectangle with the specified Rectangle.
Rectangle | Rectangle.union(Rectangle r) Computes the union of this Rectangle with the specified Rectangle.
void | Rectangle.add(Rectangle r) Adds a Rectangle to this Rectangle.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.
BufferedImage | Robot.createScreenCapture(Rectangle screenRect) Creates an image containing pixels read from the screen.

Constructors in java.awt with parameters of type Rectangle
Rectangle(Rectangle r)
Constructs a new Rectangle, initialized to match the values of the specificed Rectangle.

Uses of Rectangle in java.awt.event

Methods in java.awt.event that return Rectangle
 Rectangle PaintEvent.getUpdateRect()
Returns the rectangle representing the area which needs to be repainted in response to this event.

Methods in java.awt.event with parameters of type Rectangle
 void PaintEvent.setUpdateRect(Rectangle updateRect)
Sets the rectangle representing the area which needs to be repainted in response to this event.

Constructors in java.awt.event with parameters of type Rectangle
PaintEvent(Component source, int id, Rectangle updateRect)
Constructs a PaintEvent object with the specified source component and type.

Uses of Rectangle in java.awt.geom

Methods in java.awt.geom that return Rectangle
Rectangle | RectangularShape.getBounds() Returns the bounding box of the Shape.
Rectangle | Area.getBounds() Returns a bounding Rectangle that completely encloses this Area.
Rectangle | Line2D.getBounds() Returns the bounding box of this Line2D.
Rectangle | GeneralPath.getBounds() Return the bounding box of the path.
Rectangle | QuadCurve2D.getBounds() Returns the bounding box of this QuadCurve2D.
Rectangle | CubicCurve2D.getBounds() Returns the bounding box of the shape.

Uses of Rectangle in java.awt.im

Methods in java.awt.im that return Rectangle
 Rectangle InputMethodRequests.getTextLocation(TextHitInfo offset)
Gets the location of a specified offset in the current composed text, or of the selection in committed text.

Uses of Rectangle in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type Rectangle
 void InputMethod.notifyClientWindowChange(Rectangle bounds)
Notifies this input method of changes in the client window location or state.

Uses of Rectangle in java.awt.image

Methods in java.awt.image that return Rectangle
 Rectangle Raster.getBounds()
Returns the bounding Rectangle of this Raster.

Methods in java.awt.image with parameters of type Rectangle
Raster | RenderedImage.getData(Rectangle rect) Computes and returns an arbitrary region of the RenderedImage.
Raster | BufferedImage.getData(Rectangle rect) Computes and returns an arbitrary region of the BufferedImage.
WritableRaster | Raster.createCompatibleWritableRaster(Rectangle rect) Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.

Constructors in java.awt.image with parameters of type Rectangle
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.

Uses of Rectangle in java.beans

Methods in java.beans with parameters of type Rectangle
void | PropertyEditor.paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.
void | PropertyEditorSupport.paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.

Uses of Rectangle in javax.accessibility

Methods in javax.accessibility that return Rectangle
Rectangle | AccessibleText.getCharacterBounds(int i) Determines the bounding box of the character at the given index into the string.
Rectangle | AccessibleComponent.getBounds() Gets the bounds of this object in the form of a Rectangle object.

Methods in javax.accessibility with parameters of type Rectangle
 void AccessibleComponent.setBounds(Rectangle r)
Sets the bounds of this object in the form of a Rectangle object.

Uses of Rectangle in javax.swing

Methods in javax.swing that return Rectangle
 Rectangle JComponent.getBounds(Rectangle rv)
Stores the bounds of this component into "return value" rv and returns rv.
 Rectangle JComponent.getVisibleRect()
Returns the Component's "visible rectangle" - the intersection of this component's visible rectangle:
 Rectangle JViewport.getViewRect()
Returns a rectangle whose origin is getViewPosition and size is getExtentSize.
 Rectangle JTabbedPane.getBoundsAt(int index)
Returns the tab bounds at index.
 Rectangle AbstractButton.AccessibleAbstractButton.getCharacterBounds(int i)
Determine the bounding box of the character at the given index into the string.
 Rectangle RepaintManager.getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component.
 Rectangle ScrollPaneLayout.getViewportBorderBounds(JScrollPane scrollpane)
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().
static Rectangle SwingUtilities.getLocalBounds(Component aComponent)
Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent
static Rectangle SwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination)
Convert the rectangle aRectangle in source coordinate system to destination coordinate system.
static Rectangle SwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest)
Convenience to calculate the intersection of two rectangles without allocating a new rectangle.
static Rectangle SwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest)
Convenience to calculate the union of two rectangles without allocating a new rectangle Return dest
static Rectangle[] SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB)
Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB.
 Rectangle JList.getCellBounds(int index0, int index1)
Returns the bounds of the specified range of items in JList coordinates.
 Rectangle JList.AccessibleJList.AccessibleJListChild.getBounds()
 Rectangle JInternalFrame.getNormalBounds()
If the JInternalFrame is not in maximized state, return getBounds(); otherwise, return the bounds that the JInternalFrame would be restored to.
protected  Rectangle DefaultDesktopManager.getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
protected  Rectangle DefaultDesktopManager.getPreviousBounds(JInternalFrame f)
 Rectangle JTree.getPathBounds(TreePath path)
Returns the Rectangle that the specified node will be drawn into.
 Rectangle JTree.getRowBounds(int row)
Returns the Rectangle that the node at the specified row is drawn in.
 Rectangle JTree.AccessibleJTree.AccessibleJTreeNode.getBounds()
 Rectangle JTable.getCellRect(int row, int column, boolean includeSpacing)
Returns a rectangle for the cell that lies at the intersection of row and column.
 Rectangle JTable.AccessibleJTable.AccessibleJTableCell.getBounds()
 Rectangle JLabel.AccessibleJLabel.getCharacterBounds(int i)
Determine the bounding box of the character at the given index into the string.
 Rectangle JScrollPane.getViewportBorderBounds()
Returns the bounds of the viewport's border.
 Rectangle DebugGraphics.getClipBounds()
Overrides Graphics.getClipBounds.

Methods in javax.swing with parameters of type Rectangle
 void JComponent.scrollRectToVisible(Rectangle aRect)
Forwards the scrollRectToVisible() message to the JComponent's parent.
 Rectangle JComponent.getBounds(Rectangle rv)
Stores the bounds of this component into "return value" rv and returns rv.
 void JComponent.computeVisibleRect(Rectangle visibleRect)
Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for this component and all of its ancestors.
 void JComponent.repaint(Rectangle r)
Adds the specified region to the dirty region list if the component is showing.
 void JComponent.paintImmediately(Rectangle r)
Paints the specified region now.
 void JViewport.scrollRectToVisible(Rectangle contentRect)
Overridden to scroll the view so that Rectangle within the view becomes visible.
protected  boolean JViewport.computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint)
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
 void JTextField.scrollRectToVisible(Rectangle r)
Scrolls the field left or right.
static boolean SwingUtilities.isRectangleContainingRectangle(Rectangle a, Rectangle b)
Return true if a contains b
static Rectangle SwingUtilities.convertRectangle(Component source, Rectangle aRectangle, Component destination)
Convert the rectangle aRectangle in source coordinate system to destination coordinate system.
static Rectangle SwingUtilities.computeIntersection(int x, int y, int width, int height, Rectangle dest)
Convenience to calculate the intersection of two rectangles without allocating a new rectangle.
static Rectangle SwingUtilities.computeUnion(int x, int y, int width, int height, Rectangle dest)
Convenience to calculate the union of two rectangles without allocating a new rectangle Return dest
static Rectangle[] SwingUtilities.computeDifference(Rectangle rectA, Rectangle rectB)
Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB.
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
 int JList.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Returns the distance to scroll to expose the next or previous row (for vertical scrolling) or character (for horizontal scrolling).
 int JList.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
Returns the block increment amount.
 void JList.AccessibleJList.AccessibleJListChild.setBounds(Rectangle r)
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.
 void JInternalFrame.setNormalBounds(Rectangle r)
Sets the normal bounds for this frame, the bounds that the frame would be restored to from its maximized state.
protected  void DefaultDesktopManager.setPreviousBounds(JInternalFrame f, Rectangle r)
Stores the bounds of the component just before a maximize call.
 int JTree.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Returns the amount to increment when scrolling.
 int JTree.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
Returns the amount for a block increment, which is the height or width of visibleRect, based on orientation.
 void JTree.AccessibleJTree.AccessibleJTreeNode.setBounds(Rectangle r)
 int Scrollable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
 int Scrollable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
 int JTable.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).
 int JTable.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
Returns visibleRect.height or visibleRect.width, depending on this table's orientation.
 void JTable.AccessibleJTable.AccessibleJTableCell.setBounds(Rectangle r)
 void DefaultListCellRenderer.repaint(Rectangle r)
Overridden for performance reasons.
 int JTextArea.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.

Uses of Rectangle in javax.swing.border

Methods in javax.swing.border that return Rectangle
Rectangle | AbstractBorder.getInteriorRectangle(Component c, int x, int y, int width, int height) This convenience method calls the static method.
static Rectangle | AbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.

Uses of Rectangle in javax.swing.plaf

Methods in javax.swing.plaf that return Rectangle
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos) Converts the given location in the model to a place in the view coordinate system.
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
abstract Rectangle | TabbedPaneUI.getTabBounds(JTabbedPane pane, int index)
abstract Rectangle | TreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
abstract Rectangle | ListUI.getCellBounds(JList list, int index1, int index2) Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

Uses of Rectangle in javax.swing.plaf.basic

Subclasses of Rectangle in javax.swing.plaf.basic
static class BasicTextUI.BasicCaret

Fields in javax.swing.plaf.basic declared as Rectangle
protected Rectangle[] | BasicTabbedPaneUI.rects
protected Rectangle | BasicScrollBarUI.thumbRect
protected Rectangle | BasicScrollBarUI.trackRect
protected Rectangle | BasicSliderUI.focusRect
protected Rectangle | BasicSliderUI.contentRect
protected Rectangle | BasicSliderUI.labelRect
protected Rectangle | BasicSliderUI.tickRect
protected Rectangle | BasicSliderUI.trackRect
protected Rectangle | BasicSliderUI.thumbRect

Methods in javax.swing.plaf.basic that return Rectangle
protected Rectangle | BasicTextUI.getVisibleEditorRect() Gets the allocation to give the root View.
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos) Converts the given location in the model to a place in the view coordinate system.
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
protected Rectangle | BasicComboPopup.computePopupBounds(int px, int py, int pw, int ph)
Rectangle | BasicTabbedPaneUI.getTabBounds(JTabbedPane pane, int i)
protected Rectangle | BasicScrollBarUI.getThumbBounds() Return the current size/location of the thumb.
protected Rectangle | BasicScrollBarUI.getTrackBounds() Return the current bounds of the track, i.e.
Rectangle | BasicListUI.getCellBounds(JList list, int index1, int index2)
protected Rectangle | BasicComboBoxUI.rectangleForCurrentValue() Returns the area that is reserved for drawing the currently selected item.
Rectangle | BasicTreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
Rectangle | BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) Responsible for getting the size of a particular node.

Methods in javax.swing.plaf.basic with parameters of type Rectangle
protected  void BasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect)
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected  void BasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected  void BasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
protected  void BasicToggleButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
protected  void BasicToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected  void BasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size)
protected  void BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected  void BasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
 void BasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the currently selected item.
 void BasicComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the background of the currently selected item.
protected  void BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the horizontal part of the leg.
protected  void BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
Paints the vertical part of the leg.
protected  void BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the expand (toggle) part of a row.
protected  void BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the renderer part of a row.
 Rectangle BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size)
Responsible for getting the size of a particular node.
protected  void BasicSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected  void BasicSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected  void BasicSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected  void BasicSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)

Uses of Rectangle in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type Rectangle
protected void | MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
protected void | MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
protected void | MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void | MetalToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | MetalTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void | MetalRadioButtonUI.paintFocus(Graphics g, Rectangle t, Dimension d)
protected void | MetalSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | MetalSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | MetalSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | MetalSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | MetalScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected void | MetalScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
protected void | MetalButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)

Uses of Rectangle in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return Rectangle
Rectangle | MultiListUI.getCellBounds(JList a, int b, int c) Call getCellBounds on each UI handled by this MultiUI.
Rectangle | MultiTextUI.modelToView(JTextComponent a, int b) Call modelToView on each UI handled by this MultiUI.
Rectangle | MultiTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
Rectangle | MultiTreeUI.getPathBounds(JTree a, TreePath b) Call getPathBounds on each UI handled by this MultiUI.
Rectangle | MultiTabbedPaneUI.getTabBounds(JTabbedPane a, int b) Call getTabBounds on each UI handled by this MultiUI.

Uses of Rectangle in javax.swing.table

Methods in javax.swing.table that return Rectangle
Rectangle | JTableHeader.getHeaderRect(int column) Returns the rectangle containing the header tile at column.
Rectangle | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBounds()

Methods in javax.swing.table with parameters of type Rectangle
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBounds(Rectangle r)
void | DefaultTableCellRenderer.repaint(Rectangle r) Overridden for performance reasons.

Uses of Rectangle in javax.swing.text

Subclasses of Rectangle in javax.swing.text
 class DefaultCaret
A default implementation of Caret.

Fields in javax.swing.text declared as Rectangle
protected Rectangle | AsyncBoxView.ChildLocator.lastAlloc The last seen allocation (for repainting when changes are flushed upward).
protected Rectangle | AsyncBoxView.ChildLocator.childAlloc A shape to use for the child allocation to avoid creating a lot of garbage.

Methods in javax.swing.text that return Rectangle
Rectangle | JTextComponent.modelToView(int pos) Converts the given location in the model to a place in the view coordinate system.
Rectangle | JTextComponent.AccessibleJTextComponent.getCharacterBounds(int i) Determines the bounding box of the character at the given index into the string.
protected Rectangle | CompositeView.getInsideAllocation(Shape a) Translates the immutable allocation given to the view to a mutable allocation that represents the interior allocation (i.e.

Methods in javax.swing.text with parameters of type Rectangle
int | JTextComponent.getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
int | JTextComponent.getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
protected abstract boolean | CompositeView.isBefore(int x, int y, Rectangle alloc) Tests whether a point lies before the rectangle range.
protected abstract boolean | CompositeView.isAfter(int x, int y, Rectangle alloc) Tests whether a point lies after the rectangle range.
protected abstract View | CompositeView.getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
protected abstract void | CompositeView.childAllocation(int index, Rectangle a) Returns the allocation for a given child.
protected View | CompositeView.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected void | BoxView.paintChild(Graphics g, Rectangle alloc, int index) Paints a child.
protected boolean | BoxView.isBefore(int x, int y, Rectangle innerAlloc) Determines if a point falls before an allocated region.
protected boolean | BoxView.isAfter(int x, int y, Rectangle innerAlloc) Determines if a point falls after an allocated region.
protected View | BoxView.getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
protected void | BoxView.childAllocation(int index, Rectangle alloc) Allocates a region for a child view.
void | FlowView.FlowStrategy.insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was removed from the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected View | TableView.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected View | TableView.TableRow.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected void | DefaultCaret.damage(Rectangle r) Damages the area surrounding the caret to cause it to be repainted in a new location.
protected void | DefaultCaret.adjustVisibility(Rectangle nloc) Scrolls the associated view (if necessary) to make the caret visible.

Uses of Rectangle in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Rectangle
protected  void ListView.paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint().

Uses of Rectangle in javax.swing.tree

Methods in javax.swing.tree that return Rectangle
abstract Rectangle | AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
protected Rectangle | AbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) Returns, by reference in size, the size needed to reprensent value.
Rectangle | VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
abstract Rectangle | AbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds) Returns, by reference in bounds, the size and x origin to place value at.
Rectangle | FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.

Methods in javax.swing.tree with parameters of type Rectangle
void | DefaultTreeCellRenderer.repaint(Rectangle r) Overridden for performance reasons.
int | AbstractLayoutCache.getPreferredWidth(Rectangle bounds) Returns the preferred width for the passed in region.
abstract Rectangle | AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
protected Rectangle | AbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) Returns, by reference in size, the size needed to reprensent value.
Rectangle | VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
int | VariableHeightLayoutCache.getPreferredWidth(Rectangle bounds) Returns the preferred width and height for the region in visibleRegion.
abstract Rectangle | AbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds) Returns, by reference in bounds, the size and x origin to place value at.
Rectangle | FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.RenderingHints

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.RenderingHints

Packages that use RenderingHints
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Uses of RenderingHints in java.awt

Methods in java.awt that return RenderingHints
abstract  RenderingHints Graphics2D.getRenderingHints()
Gets the preferences for the rendering algorithms.

Methods in java.awt with parameters of type RenderingHints
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
void | RenderingHints.add(RenderingHints hints) Adds all of the keys and corresponding values from the specified RenderingHints object to this RenderingHints object.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
CompositeContext | AlphaComposite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context for the compositing operation.
CompositeContext | Composite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context containing state that is used to perform the compositing operation.
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.

Uses of RenderingHints in java.awt.image

Methods in java.awt.image that return RenderingHints
RenderingHints | LookupOp.getRenderingHints() Returns the rendering hints for this op.
RenderingHints | BufferedImageOp.getRenderingHints() Returns the rendering hints for this BufferedImageOp.
RenderingHints | ConvolveOp.getRenderingHints() Returns the rendering hints for this op.
RenderingHints | BandCombineOp.getRenderingHints() Returns the rendering hints for this operation.
RenderingHints | AffineTransformOp.getRenderingHints() Returns the rendering hints used by this transform operation.
RenderingHints | RasterOp.getRenderingHints() Returns the rendering hints for this RasterOp.
RenderingHints | ColorConvertOp.getRenderingHints() Returns the rendering hints used by this op.
RenderingHints | RescaleOp.getRenderingHints() Returns the rendering hints for this op.

Constructors in java.awt.image with parameters of type RenderingHints
LookupOp(LookupTable lookup, RenderingHints hints)
Constructs a LookupOp object given the lookup table and a RenderingHints object (which may be null).
ConvolveOp(Kernel kernel, int edgeCondition, RenderingHints hints)
Constructs a ConvolveOp given a Kernel, an edge condition, and a RenderingHints object (which may be null).
BandCombineOp(float[][] matrix, RenderingHints hints)
Constructs a BandCombineOp with the specified matrix.
AffineTransformOp(AffineTransform xform, RenderingHints hints)
Constructs an AffineTransformOp given an affine transform.
ColorConvertOp(RenderingHints hints)
Constructs a new ColorConvertOp which will convert from a source color space to a destination color space.
ColorConvertOp(ColorSpace cspace, RenderingHints hints)
Constructs a new ColorConvertOp from a ColorSpace object.
ColorConvertOp(ColorSpace srcCspace, ColorSpace dstCspace, RenderingHints hints)
Constructs a new ColorConvertOp from two ColorSpace objects.
ColorConvertOp(ICC_Profile[] profiles, RenderingHints hints)
Constructs a new ColorConvertOp from an array of ICC_Profiles.
RescaleOp(float[] scaleFactors, float[] offsets, RenderingHints hints)
Constructs a new RescaleOp with the desired scale factors and offsets.
RescaleOp(float scaleFactor, float offset, RenderingHints hints)
Constructs a new RescaleOp with the desired scale factor and offset.

Uses of RenderingHints in java.awt.image.renderable

Methods in java.awt.image.renderable that return RenderingHints
 RenderingHints RenderContext.getRenderingHints()
Gets the rendering hints of this RenderContext.

Methods in java.awt.image.renderable with parameters of type RenderingHints
void | RenderContext.setRenderingHints(RenderingHints hints) Sets the rendering hints of this RenderContext.
RenderedImage | RenderedImageFactory.create(ParameterBlock paramBlock, RenderingHints hints) Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints.
RenderedImage | RenderableImageOp.createScaledRendering(int w, int h, RenderingHints hints) Creates a RenderedImage instance of this image with width w, and height h in pixels.
RenderedImage | RenderableImage.createScaledRendering(int w, int h, RenderingHints hints) Creates a RenderedImage instance of this image with width w, and height h in pixels.

Constructors in java.awt.image.renderable with parameters of type RenderingHints
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev, RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.RenderingHints.Key

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.RenderingHints.Key

Packages that use RenderingHints.Key
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of RenderingHints.Key in java.awt

Fields in java.awt declared as RenderingHints.Key
static RenderingHints.Key | RenderingHints.KEY_ANTIALIASING Antialiasing hint key
static RenderingHints.Key | RenderingHints.KEY_RENDERING Rendering hint key
static RenderingHints.Key | RenderingHints.KEY_DITHERING Dithering hint key
static RenderingHints.Key | RenderingHints.KEY_TEXT_ANTIALIASING Text antialiasing hint key
static RenderingHints.Key | RenderingHints.KEY_FRACTIONALMETRICS Font fractional metrics hint key
static RenderingHints.Key | RenderingHints.KEY_INTERPOLATION Interpolation hint key
static RenderingHints.Key | RenderingHints.KEY_ALPHA_INTERPOLATION Alpha interpolation hint key
static RenderingHints.Key | RenderingHints.KEY_COLOR_RENDERING Color rendering hint key
static RenderingHints.Key | RenderingHints.KEY_STROKE_CONTROL Stroke normalization control hint key

Methods in java.awt with parameters of type RenderingHints.Key
abstract void | Graphics2D.setRenderingHint(RenderingHints.Key hintKey, Object hintValue) Sets the value of a single preference for the rendering algorithms.
abstract Object | Graphics2D.getRenderingHint(RenderingHints.Key hintKey) Returns the value of a single preference for the rendering algorithms.

Constructors in java.awt with parameters of type RenderingHints.Key
RenderingHints(RenderingHints.Key key, Object value)
Constructs a new object with the specified key/value pair.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Scrollbar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Scrollbar

Packages that use Scrollbar
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Scrollbar in java.awt

Methods in java.awt with parameters of type Scrollbar
protected abstract  java.awt.peer.ScrollbarPeer Toolkit.createScrollbar(Scrollbar target)
Creates this toolkit's implementation of Scrollbar using the specified peer interface.

Constructors in java.awt with parameters of type Scrollbar
Scrollbar.AccessibleAWTScrollBar()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.ScrollPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.ScrollPane

Packages that use ScrollPane
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of ScrollPane in java.awt

Methods in java.awt with parameters of type ScrollPane
protected abstract  java.awt.peer.ScrollPanePeer Toolkit.createScrollPane(ScrollPane target)
Creates this toolkit's implementation of ScrollPane using the specified peer interface.

Constructors in java.awt with parameters of type ScrollPane
ScrollPane.AccessibleAWTScrollPane()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.SystemColor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.SystemColor

Packages that use SystemColor
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of SystemColor in java.awt

Fields in java.awt declared as SystemColor
static SystemColor | SystemColor.desktop The color of the desktop background.
static SystemColor | SystemColor.activeCaption The background color for captions in window borders.
static SystemColor | SystemColor.activeCaptionText The text color for captions in window borders.
static SystemColor | SystemColor.activeCaptionBorder The border color for captions in window borders.
static SystemColor | SystemColor.inactiveCaption The background color for inactive captions in window borders.
static SystemColor | SystemColor.inactiveCaptionText The text color for inactive captions in window borders.
static SystemColor | SystemColor.inactiveCaptionBorder The border color for inactive captios in window borders.
static SystemColor | SystemColor.window The background color for windows.
static SystemColor | SystemColor.windowBorder The border color for windows.
static SystemColor | SystemColor.windowText The text color for windows.
static SystemColor | SystemColor.menu The background color for menus.
static SystemColor | SystemColor.menuText The text color for menus.
static SystemColor | SystemColor.text The background color for text components.
static SystemColor | SystemColor.textText The text color for text components.
static SystemColor | SystemColor.textHighlight The background color for highlighted text.
static SystemColor | SystemColor.textHighlightText The text color for highlighted text.
static SystemColor | SystemColor.textInactiveText The text color for inactive text.
static SystemColor | SystemColor.control The background color for control objects.
static SystemColor | SystemColor.controlText The text color for control objects.
static SystemColor | SystemColor.controlHighlight The regular highlight color for control objects.
static SystemColor | SystemColor.controlLtHighlight The light highlight color for control objects.
static SystemColor | SystemColor.controlShadow The regular shadow color for control objects.
static SystemColor | SystemColor.controlDkShadow The dark shadow color for control objects.
static SystemColor | SystemColor.scrollbar The background color for scrollbars.
static SystemColor | SystemColor.info The background color for info(help) text.
static SystemColor | SystemColor.infoText The text color for info(help) text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextArea

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextArea

Packages that use TextArea
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of TextArea in java.awt

Methods in java.awt with parameters of type TextArea
protected abstract  java.awt.peer.TextAreaPeer Toolkit.createTextArea(TextArea target)
Creates this toolkit's implementation of TextArea using the specified peer interface.

Constructors in java.awt with parameters of type TextArea
TextArea.AccessibleAWTTextArea()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextComponent

Packages that use TextComponent
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of TextComponent in java.awt

Subclasses of TextComponent in java.awt
class | TextArea A TextArea object is a multi-line region that displays text.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.

Constructors in java.awt with parameters of type TextComponent
TextComponent.AccessibleAWTTextComponent()
Constructs an AccessibleAWTTextComponent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextComponent.AccessibleAWTTextComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextComponent.AccessibleAWTTextComponent

Packages that use TextComponent.AccessibleAWTTextComponent
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of TextComponent.AccessibleAWTTextComponent in java.awt

Subclasses of TextComponent.AccessibleAWTTextComponent in java.awt
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.TextField

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.TextField

Packages that use TextField
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of TextField in java.awt

Methods in java.awt with parameters of type TextField
protected abstract  java.awt.peer.TextFieldPeer Toolkit.createTextField(TextField target)
Creates this toolkit's implementation of TextField using the specified peer interface.

Constructors in java.awt with parameters of type TextField
TextField.AccessibleAWTTextField()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Toolkit

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Toolkit

Packages that use Toolkit
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Toolkit in java.awt

Methods in java.awt that return Toolkit
Toolkit | Component.getToolkit() Gets the toolkit of this component.
Toolkit | Window.getToolkit() Returns the toolkit of this frame.
static Toolkit | Toolkit.getDefaultToolkit() Gets the default toolkit.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Window

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Window

Packages that use Window
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of Window in java.awt

Subclasses of Window in java.awt
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.

Methods in java.awt that return Window
Window | Window.getOwner() Returns the owner of this window.
Window[] | Window.getOwnedWindows() Return an array containing all the windows this window currently owns.

Methods in java.awt with parameters of type Window
protected abstract  java.awt.peer.WindowPeer Toolkit.createWindow(Window target)
Creates this toolkit's implementation of Window using the specified peer interface.

Constructors in java.awt with parameters of type Window
Window(Window owner)
Constructs a new invisible window with the specified Window as its owner.
Window(Window owner, GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
Window.AccessibleAWTWindow()

Uses of Window in java.awt.event

Methods in java.awt.event that return Window
 Window WindowEvent.getWindow()
Returns the originator of the event.

Constructors in java.awt.event with parameters of type Window
WindowEvent(Window source, int id)
Constructs a WindowEvent object.

Uses of Window in java.awt.im.spi

Methods in java.awt.im.spi that return Window
 Window InputMethodContext.createInputMethodWindow(String title, boolean attachToInputContext)
Creates a top-level window for use by the input method.

Uses of Window in javax.swing

Subclasses of Window in javax.swing
class | JDialog The main class for creating a dialog window.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Methods in javax.swing that return Window
static Window | SwingUtilities.getWindowAncestor(Component c)
static Window | SwingUtilities.windowForComponent(Component aComponent) Return aComponent's window

Constructors in javax.swing with parameters of type Window
JWindow(Window owner)
Creates a window with the owner and the specified GraphicsConfiguration of a screen device.
JWindow(Window owner, GraphicsConfiguration gc)

Uses of Window in javax.swing.plaf.basic

Subclasses of Window in javax.swing.plaf.basic
protected  class BasicToolBarUI.DragWindow

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.Window.AccessibleAWTWindow

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.Window.AccessibleAWTWindow

Packages that use Window.AccessibleAWTWindow
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Window.AccessibleAWTWindow in java.awt

Subclasses of Window.AccessibleAWTWindow in java.awt
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.

Uses of Window.AccessibleAWTWindow in javax.swing

Subclasses of Window.AccessibleAWTWindow in javax.swing
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.ActiveEvent

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.ActiveEvent

Packages that use ActiveEvent
java.awt.event Provides interfaces and classes for dealing with different types of events fired by AWT components.

Uses of ActiveEvent in java.awt.event

Classes in java.awt.event that implement ActiveEvent
 class InvocationEvent
An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Adjustable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Adjustable

Packages that use Adjustable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Adjustable in java.awt

Classes in java.awt that implement Adjustable
 class Scrollbar
The Scrollbar class embodies a scroll bar, a familiar user-interface object.

Methods in java.awt that return Adjustable
Adjustable | ScrollPane.getVAdjustable() Returns the Adjustable object which represents the state of the vertical scrollbar.
Adjustable | ScrollPane.getHAdjustable() Returns the Adjustable object which represents the state of the horizontal scrollbar.

Uses of Adjustable in java.awt.event

Methods in java.awt.event that return Adjustable
 Adjustable AdjustmentEvent.getAdjustable()
Returns the Adjustable object where this event originated.

Constructors in java.awt.event with parameters of type Adjustable
AdjustmentEvent(Adjustable source, int id, int type, int value)
Constructs a AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.

Uses of Adjustable in javax.swing

Classes in javax.swing that implement Adjustable
class | JScrollBar An implementation of a scrollbar.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Composite

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Composite

Packages that use Composite
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Composite in java.awt

Classes in java.awt that implement Composite
 class AlphaComposite
This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images.

Methods in java.awt that return Composite
abstract  Composite Graphics2D.getComposite()
Returns the current Composite in the Graphics2D context.

Methods in java.awt with parameters of type Composite
abstract  void Graphics2D.setComposite(Composite comp)
Sets the Composite for the Graphics2D context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.CompositeContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.CompositeContext

Packages that use CompositeContext
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of CompositeContext in java.awt

Methods in java.awt that return CompositeContext
CompositeContext | AlphaComposite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context for the compositing operation.
CompositeContext | Composite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context containing state that is used to perform the compositing operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.ItemSelectable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.ItemSelectable

Packages that use ItemSelectable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ItemSelectable in java.awt

Classes in java.awt that implement ItemSelectable
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
class | Choice The Choice class presents a pop-up menu of choices.
class | List The List component presents the user with a scrolling list of text items.

Uses of ItemSelectable in java.awt.event

Methods in java.awt.event that return ItemSelectable
 ItemSelectable ItemEvent.getItemSelectable()
Returns the originator of the event.

Constructors in java.awt.event with parameters of type ItemSelectable
ItemEvent(ItemSelectable source, int id, Object item, int stateChange)
Constructs an ItemEvent object.

Uses of ItemSelectable in javax.swing

Subinterfaces of ItemSelectable in javax.swing
 interface ButtonModel
State Model for buttons.

Classes in javax.swing that implement ItemSelectable
class | AbstractButton Defines common behaviors for buttons and menu items.
class | DefaultButtonModel The default implementation of a Button component's data model.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuItem An implementation of an item in a menu.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JToggleButton An implementation of a two-state button.
static class | JToggleButton.ToggleButtonModel The ToggleButton model

Uses of ItemSelectable in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ItemSelectable
 class BasicArrowButton
JButton object that draws a scaled Arrow in one of the cardinal directions.

Uses of ItemSelectable in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ItemSelectable
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.LayoutManager

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.LayoutManager

Packages that use LayoutManager
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of LayoutManager in java.awt

Subinterfaces of LayoutManager in java.awt
 interface LayoutManager2
Defines an interface for classes that know how to layout Containers based on a layout constraints object.

Classes in java.awt that implement LayoutManager
class | BorderLayout A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
class | CardLayout A CardLayout object is a layout manager for a container.
class | FlowLayout A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph.
class | GridBagLayout The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
class | GridLayout The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.

Methods in java.awt that return LayoutManager
 LayoutManager Container.getLayout()
Gets the layout manager for this container.

Methods in java.awt with parameters of type LayoutManager
void | Container.setLayout(LayoutManager mgr) Sets the layout manager for this container.
void | ScrollPane.setLayout(LayoutManager mgr) Sets the layout manager for this container.

Constructors in java.awt with parameters of type LayoutManager
Panel(LayoutManager layout)
Creates a new panel with the specified layout manager.

Uses of LayoutManager in javax.swing

Classes in javax.swing that implement LayoutManager
class | BoxLayout A layout manager that allows multiple components to be layed out either vertically or horizontally.
protected class | JRootPane.RootLayout A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
class | OverlayLayout A layout manager to arrange components over the top of each other.
class | ScrollPaneLayout The layout manager used by JScrollPane.
static class | ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.
class | ViewportLayout The default layout manager for JViewport.

Methods in javax.swing that return LayoutManager
protected LayoutManager | JViewport.createLayoutManager() Subclassers can override this to install a different layout manager (or null) in the constructor.
protected LayoutManager | JRootPane.createRootLayout() Called by the constructor methods to create the default layoutManager.

Methods in javax.swing with parameters of type LayoutManager
void | JWindow.setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void | JApplet.setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void | JInternalFrame.setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void | JFrame.setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void | Box.setLayout(LayoutManager l) Throws an AWTError, since a Box can use only a BoxLayout.
void | JScrollPane.setLayout(LayoutManager layout) Sets the layout manager for this JScrollPane.
void | JDialog.setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.

Constructors in javax.swing with parameters of type LayoutManager
JPanel(LayoutManager layout, boolean isDoubleBuffered)
Creates a new JPanel with the specified layout manager and buffering strategy.
JPanel(LayoutManager layout)
Create a new buffered JPanel with the specified layout manager

Uses of LayoutManager in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement LayoutManager
class | BasicComboBoxUI.ComboBoxLayoutManager This layout manager handles the 'standard' layout of combo boxes.
class | BasicInternalFrameTitlePane.TitlePaneLayout This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameUI.InternalFrameLayout
static class | BasicOptionPaneUI.ButtonAreaLayout ButtonAreaLayout acts similiar to FlowLayout.
class | BasicScrollBarUI Implementation of ScrollBarUI for the Basic Look and Feel
protected class | BasicSplitPaneDivider.DividerLayout Used to layout a BasicSplitPaneDivider.
class | BasicSplitPaneUI.BasicHorizontalLayoutManager LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
class | BasicSplitPaneUI.BasicVerticalLayoutManager LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
class | BasicTabbedPaneUI.TabbedPaneLayout This inner class is marked "public" due to a compiler bug.
class | DefaultMenuLayout The default layout manager for Popup menus and menubars.

Fields in javax.swing.plaf.basic declared as LayoutManager
protected  LayoutManager BasicInternalFrameUI.internalFrameLayout

Methods in javax.swing.plaf.basic that return LayoutManager
protected LayoutManager | BasicOptionPaneUI.createLayoutManager()
protected LayoutManager | BasicTabbedPaneUI.createLayoutManager()
protected LayoutManager | BasicInternalFrameTitlePane.createLayout()
protected LayoutManager | BasicInternalFrameUI.createLayoutManager()
protected LayoutManager | BasicComboBoxUI.createLayoutManager() Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left.

Uses of LayoutManager in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement LayoutManager
class | MetalComboBoxUI.MetalComboBoxLayoutManager This inner class is marked "public" due to a compiler bug.
class | MetalScrollBarUI Implementation of ScrollBarUI for the Metal Look and Feel
class | MetalTabbedPaneUI.TabbedPaneLayout This inner class is marked "public" due to a compiler bug.

Methods in javax.swing.plaf.metal that return LayoutManager
protected LayoutManager | MetalTabbedPaneUI.createLayoutManager()
protected LayoutManager | MetalInternalFrameTitlePane.createLayout()
protected LayoutManager | MetalComboBoxUI.createLayoutManager()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.LayoutManager2

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.LayoutManager2

Packages that use LayoutManager2
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of LayoutManager2 in java.awt

Classes in java.awt that implement LayoutManager2
class | BorderLayout A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
class | CardLayout A CardLayout object is a layout manager for a container.
class | GridBagLayout The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.

Uses of LayoutManager2 in javax.swing

Classes in javax.swing that implement LayoutManager2
class | BoxLayout A layout manager that allows multiple components to be layed out either vertically or horizontally.
protected class | JRootPane.RootLayout A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
class | OverlayLayout A layout manager to arrange components over the top of each other.

Uses of LayoutManager2 in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement LayoutManager2
class | BasicSplitPaneUI.BasicHorizontalLayoutManager LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
class | BasicSplitPaneUI.BasicVerticalLayoutManager LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
class | DefaultMenuLayout The default layout manager for Popup menus and menubars.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.MenuContainer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.MenuContainer

Packages that use MenuContainer
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of MenuContainer in java.applet

Classes in java.applet that implement MenuContainer
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of MenuContainer in java.awt

Classes in java.awt that implement MenuContainer
class | Button This class creates a labeled button.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
class | Choice The Choice class presents a pop-up menu of choices.
class | Component A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
class | Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.
class | Label A Label object is a component for placing text in a container.
class | List The List component presents the user with a scrolling list of text items.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
class | MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
class | Panel Panel is the simplest container class.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
class | TextArea A TextArea object is a multi-line region that displays text.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
class | Window A Window object is a top-level window with no borders and no menubar.

Methods in java.awt that return MenuContainer
 MenuContainer MenuComponent.getParent()
Returns the parent container for this menu component.

Uses of MenuContainer in javax.swing

Classes in javax.swing that implement MenuContainer
class | AbstractButton Defines common behaviors for buttons and menu items.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JComponent The base class for all Swing components except top-level containers.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JDialog The main class for creating a dialog window.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Uses of MenuContainer in javax.swing.colorchooser

Classes in javax.swing.colorchooser that implement MenuContainer
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of MenuContainer in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement MenuContainer
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicToolBarUI.DragWindow

Uses of MenuContainer in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement MenuContainer
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Uses of MenuContainer in javax.swing.table

Classes in javax.swing.table that implement MenuContainer
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.

Uses of MenuContainer in javax.swing.text

Classes in javax.swing.text that implement MenuContainer
 class JTextComponent
JTextComponent is the base class for swing text components.

Uses of MenuContainer in javax.swing.tree

Classes in javax.swing.tree that implement MenuContainer
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Paint

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Paint

Packages that use Paint
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of Paint in java.awt

Classes in java.awt that implement Paint
class | Color The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
class | GradientPaint The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
class | SystemColor A class to encapsulate symbolic colors representing the color of GUI objects on a system.
class | TexturePaint The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage.

Methods in java.awt that return Paint
abstract  Paint Graphics2D.getPaint()
Returns the current Paint of the Graphics2D context.

Methods in java.awt with parameters of type Paint
abstract  void Graphics2D.setPaint(Paint paint)
Sets the Paint attribute for the Graphics2D context.

Uses of Paint in javax.swing.plaf

Classes in javax.swing.plaf that implement Paint
 class ColorUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.PaintContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.PaintContext

Packages that use PaintContext
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of PaintContext in java.awt

Methods in java.awt that return PaintContext
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Shape

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Shape

Packages that use Shape
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Shape in java.awt

Classes in java.awt that implement Shape
class | Polygon The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
class | Rectangle A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Methods in java.awt that return Shape
Shape | Stroke.createStrokedShape(Shape p) Returns an outline Shape which encloses the area that should be painted when the Shape is stroked according to the rules defined by the object implementing the Stroke interface.
abstract Shape | Graphics.getClip() Gets the current clipping area.
Shape | BasicStroke.createStrokedShape(Shape s) Returns a Shape whose interior defines the stroked outline of a specified Shape.

Methods in java.awt with parameters of type Shape
Shape | Stroke.createStrokedShape(Shape p) Returns an outline Shape which encloses the area that should be painted when the Shape is stroked according to the rules defined by the object implementing the Stroke interface.
abstract void | Graphics.setClip(Shape clip) Sets the current clipping area to an arbitrary clip shape.
abstract void | Graphics2D.draw(Shape s) Strokes the outline of a Shape using the settings of the current Graphics2D context.
abstract void | Graphics2D.fill(Shape s) Fills the interior of a Shape using the settings of the Graphics2D context.
abstract boolean | Graphics2D.hit(Rectangle rect, Shape s, boolean onStroke) Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space.
abstract void | Graphics2D.clip(Shape s) Intersects the current Clip with the interior of the specified Shape and sets the Clip to the resulting intersection.
Shape | BasicStroke.createStrokedShape(Shape s) Returns a Shape whose interior defines the stroked outline of a specified Shape.

Uses of Shape in java.awt.font

Methods in java.awt.font that return Shape
abstract Shape | GlyphVector.getOutline() Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
abstract Shape | GlyphVector.getOutline(float x, float y) Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.
abstract Shape | GlyphVector.getGlyphOutline(int glyphIndex) Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
abstract Shape | GlyphVector.getGlyphLogicalBounds(int glyphIndex) Returns the logical bounds of the specified glyph within this GlyphVector.
abstract Shape | GlyphVector.getGlyphVisualBounds(int glyphIndex) Returns the visual bounds of the specified glyph within the GlyphVector.
Shape | TextLayout.getCaretShape(TextHitInfo hit, Rectangle2D bounds) Returns a Shape representing the caret at the specified hit inside the specified bounds.
Shape | TextLayout.getCaretShape(TextHitInfo hit) Returns a Shape representing the caret at the specified hit inside the natural bounds of this TextLayout.
Shape[] | TextLayout.getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) Returns two paths corresponding to the strong and weak caret.
Shape[] | TextLayout.getCaretShapes(int offset, Rectangle2D bounds) Returns two paths corresponding to the strong and weak caret.
Shape[] | TextLayout.getCaretShapes(int offset) Returns two paths corresponding to the strong and weak caret.
Shape | TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) Returns a path enclosing the visual selection in the specified range, extended to bounds.
Shape | TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) Returns a Shape enclosing the visual selection in the specified range, extended to the bounds.
Shape | TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds) Returns a Shape enclosing the logical selection in the specified range, extended to the specified bounds.
Shape | TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint) Returns a Shape enclosing the logical selection in the specified range, extended to the natural bounds of this TextLayout.
Shape | TextLayout.getBlackBoxBounds(int firstEndpoint, int secondEndpoint) Returns the black box bounds of the characters in the specified range.
Shape | TextLayout.getOutline(AffineTransform tx) Returns a Shape representing the outline of this TextLayout.

Constructors in java.awt.font with parameters of type Shape
ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
Constructs a ShapeGraphicAttribute for the specified Shape.

Uses of Shape in java.awt.geom

Classes in java.awt.geom that implement Shape
class | Arc2D Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,
class | Area The Area class is a device-independent specification of an arbitrarily-shaped area.
class | CubicCurve2D The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
static class | CubicCurve2D.Double A cubic parametric curve segment specified with double coordinates.
static class | CubicCurve2D.Float A cubic parametric curve segment specified with float coordinates.
class | Ellipse2D The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.
class | GeneralPath The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves.
class | Line2D This Line2D class represents a line segment in (x, y) coordinate space.
static class | Line2D.Double A line segment specified with double coordinates.
static class | Line2D.Float A line segment specified with float coordinates.
class | QuadCurve2D The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
static class | QuadCurve2D.Double A quadratic parametric curve segment specified with double coordinates.
static class | QuadCurve2D.Float A quadratic parametric curve segment specified with float coordinates.
class | Rectangle2D The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.
class | RectangularShape RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
class | RoundRectangle2D The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.

Methods in java.awt.geom that return Shape
Shape | GeneralPath.createTransformedShape(AffineTransform at) Returns a new transformed Shape.
Shape | AffineTransform.createTransformedShape(Shape pSrc) Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.

Methods in java.awt.geom with parameters of type Shape
void | GeneralPath.append(Shape s, boolean connect) Appends the geometry of the specified Shape object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
Shape | AffineTransform.createTransformedShape(Shape pSrc) Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.

Constructors in java.awt.geom with parameters of type Shape
Area(Shape s)
The Area class creates an area geometry from the specified Shape object.
GeneralPath(Shape s)
Constructs a new GeneralPath object from an arbitrary Shape object.

Uses of Shape in java.awt.image.renderable

Methods in java.awt.image.renderable that return Shape
 Shape RenderContext.getAreaOfInterest()
Gets the ares of interest currently contained in the RenderContext.

Methods in java.awt.image.renderable with parameters of type Shape
 void RenderContext.setAreaOfInterest(Shape newAoi)
Sets the current area of interest.

Constructors in java.awt.image.renderable with parameters of type Shape
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev, Shape aoi)
Constructs a RenderContext with a given transform and area of interest.

Uses of Shape in javax.swing

Methods in javax.swing that return Shape
 Shape DebugGraphics.getClip()
Overrides Graphics.getClip.

Methods in javax.swing with parameters of type Shape
 void DebugGraphics.setClip(Shape clip)
Overrides Graphics.setClip.

Uses of Shape in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Shape
static class BasicTextUI.BasicCaret

Uses of Shape in javax.swing.text

Classes in javax.swing.text that implement Shape
 class DefaultCaret
A default implementation of Caret.

Methods in javax.swing.text that return Shape
Shape | View.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
abstract Shape | View.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int pos, Shape a) Deprecated.
Shape | CompositeView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | CompositeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | GlyphView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | BoxView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | BoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | PlainView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
protected Shape | FieldView.adjustAllocation(Shape a) Adjusts the allocation given to the view to be a suitable allocation for a text field.
Shape | FieldView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract Shape | LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
Shape | DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
Shape | PasswordView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract Shape | GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | AsyncBoxView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | AsyncBoxView.ChildLocator.getChildAllocation(int index, Shape a) Fetch the allocation to use for a child view.
protected Shape | AsyncBoxView.ChildLocator.getChildAllocation(int index) Fetch the allocation to use for a child view.
Shape | ComponentView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.
Shape | IconView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.

Methods in javax.swing.text with parameters of type Shape
abstract void | View.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
Shape | View.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
int | View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract Shape | View.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract int | View.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | View.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | View.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | View.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | View.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | View.forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Forward the DocumentEvent to the give child view.
protected void | View.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
Shape | View.modelToView(int pos, Shape a) Deprecated.
int | View.viewToModel(float x, float y, Shape a) Deprecated.
Shape | CompositeView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | CompositeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | CompositeView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
protected Rectangle | CompositeView.getInsideAllocation(Shape a) Translates the immutable allocation given to the view to a mutable allocation that represents the interior allocation (i.e.
protected int | CompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
protected int | CompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
void | GlyphView.paint(Graphics g, Shape a) Renders a portion of a text style run.
Shape | GlyphView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | GlyphView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | GlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
void | GlyphView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | GlyphView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | GlyphView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | LabelView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | Highlighter.HighlightPainter.paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) Renders the highlight.
protected void | BoxView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
void | BoxView.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
Shape | BoxView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | BoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | BoxView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | FlowView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FlowView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | FlowView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected int | ParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Overriden from CompositeView.
protected int | ParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position to x.
void | ParagraphView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
View | ParagraphView.breakView(int axis, float len, Shape a) Breaks this view on the given axis at the given length.
void | ParagraphView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | PlainView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
Shape | PlainView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | PlainView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | PlainView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | PlainView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | PlainView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected Shape | FieldView.adjustAllocation(Shape a) Adjusts the allocation given to the view to be a suitable allocation for a text field.
void | FieldView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
Shape | FieldView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | FieldView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | FieldView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FieldView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
abstract void | LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
void | DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
abstract Shape | LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
void | DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c) Paints a highlight.
Shape | DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
Shape | PasswordView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | PasswordView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract void | GlyphView.GlyphPainter.paint(GlyphView v, Graphics g, Shape a, int p0, int p1) Paint the glyphs representing the given range.
abstract Shape | GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract int | GlyphView.GlyphPainter.viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
protected void | AsyncBoxView.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
void | AsyncBoxView.paint(Graphics g, Shape alloc) Render the view using the given allocation and rendering surface.
Shape | AsyncBoxView.getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Shape | AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | AsyncBoxView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | AsyncBoxView.ChildLocator.getChildAllocation(int index, Shape a) Fetch the allocation to use for a child view.
int | AsyncBoxView.ChildLocator.getViewIndexAtPoint(float x, float y, Shape a) Fetches the child view index at the given point.
protected void | AsyncBoxView.ChildLocator.setAllocation(Shape a) Copy the currently allocated shape into the Rectangle used to store the current allocation.
protected void | TableView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
void | ComponentView.paint(Graphics g, Shape a) The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).
Shape | ComponentView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.
int | ComponentView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | IconView.paint(Graphics g, Shape a) Paints the icon.
Shape | IconView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | IconView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
void | WrappedPlainView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | WrappedPlainView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | WrappedPlainView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | WrappedPlainView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | ZoneView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | ZoneView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.

Uses of Shape in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Shape
void | ParagraphView.paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | BlockView.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
void | BlockView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
void | InlineView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | ListView.paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Stroke

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Stroke

Packages that use Stroke
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of Stroke in java.awt

Classes in java.awt that implement Stroke
 class BasicStroke
The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke.

Methods in java.awt that return Stroke
abstract  Stroke Graphics2D.getStroke()
Returns the current Stroke in the Graphics2D context.

Methods in java.awt with parameters of type Stroke
abstract  void Graphics2D.setStroke(Stroke s)
Sets the Stroke for the Graphics2D context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.Transparency

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.Transparency

Packages that use Transparency
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of Transparency in java.awt

Subinterfaces of Transparency in java.awt
 interface Paint
This Paint interface defines how color patterns can be generated for Graphics2D operations.

Classes in java.awt that implement Transparency
class | Color The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
class | GradientPaint The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
class | SystemColor A class to encapsulate symbolic colors representing the color of GUI objects on a system.
class | TexturePaint The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage.

Uses of Transparency in java.awt.image

Classes in java.awt.image that implement Transparency
class | ColorModel The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
class | ComponentColorModel A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element.
class | DirectColorModel The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
class | IndexColorModel The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
class | PackedColorModel The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.

Uses of Transparency in javax.swing.plaf

Classes in javax.swing.plaf that implement Transparency
 class ColorUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


java.awt.color Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.color

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.color.ColorSpace (implements java.io.Serializable)
      • class java.awt.color.ICC_ColorSpace
    • class java.awt.color.ICC_Profile (implements java.io.Serializable)
      • class java.awt.color.ICC_ProfileGray
      • class java.awt.color.ICC_ProfileRGB
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class java.awt.color.CMMException
          • class java.awt.color.ProfileDataException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.color

Provides classes for color spaces.

See:
Description

Class Summary
ColorSpace | This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
ICC_ColorSpace | An implementation of the abstract ColorSpace class.
ICC_Profile | A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).
ICC_ProfileGray | A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
ICC_ProfileRGB | A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags.

Exception Summary
CMMException | This exception is thrown if the native CMM returns an error.
ProfileDataException | This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Package java.awt.color Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.color

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.color

Packages that use java.awt.color
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.image | Provides classes for creating and modifying images.

Classes in java.awt.color used by java.awt
ColorSpace
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.

Classes in java.awt.color used by java.awt.color
ColorSpace
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
ICC_Profile
A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).

Classes in java.awt.color used by java.awt.image
ColorSpace
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
ICC_Profile
A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.CMMException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.CMMException

No usage of java.awt.color.CMMException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ICC_ColorSpace

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ICC_ColorSpace

No usage of java.awt.color.ICC_ColorSpace

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ICC_ProfileGray

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ICC_ProfileGray

No usage of java.awt.color.ICC_ProfileGray

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ICC_ProfileRGB

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ICC_ProfileRGB

No usage of java.awt.color.ICC_ProfileRGB

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ProfileDataException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ProfileDataException

No usage of java.awt.color.ProfileDataException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ColorSpace

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ColorSpace

Packages that use ColorSpace
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.image | Provides classes for creating and modifying images.

Uses of ColorSpace in java.awt

Methods in java.awt that return ColorSpace
 ColorSpace Color.getColorSpace()
Returns the ColorSpace of this Color.

Methods in java.awt with parameters of type ColorSpace
float[] | Color.getComponents(ColorSpace cspace, float[] compArray) Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter.
float[] | Color.getColorComponents(ColorSpace cspace, float[] compArray) Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter.

Constructors in java.awt with parameters of type ColorSpace
Color(ColorSpace cspace, float[] components, float alpha)
Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha.

Uses of ColorSpace in java.awt.color

Subclasses of ColorSpace in java.awt.color
 class ICC_ColorSpace
An implementation of the abstract ColorSpace class.

Methods in java.awt.color that return ColorSpace
static ColorSpace ColorSpace.getInstance(int colorspace)
Returns a ColorSpace representing one of the specific predefined color spaces.

Uses of ColorSpace in java.awt.image

Methods in java.awt.image that return ColorSpace
 ColorSpace ColorModel.getColorSpace()
Returns the ColorSpace associated with this ColorModel.

Constructors in java.awt.image with parameters of type ColorSpace
ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
Constructs a ColorModel that translates pixel values to color/alpha components.
PackedColorModel(ColorSpace space, int bits, int[] colorMaskArray, int alphaMask, boolean isAlphaPremultiplied, int trans, int transferType)
Constructs a PackedColorModel from a color mask array, which specifies which bits in an int pixel representation contain each of the color samples, and an alpha mask.
PackedColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int trans, int transferType)
Constructs a PackedColorModel from the specified masks which indicate which bits in an int pixel representation contain the alpha, red, green and blue color samples.
ComponentColorModel(ColorSpace colorSpace, int[] bits, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
Constructs a ComponentColorModel from the specified parameters.
DirectColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
Constructs a DirectColorModel from the specified parameters.
ColorConvertOp(ColorSpace cspace, RenderingHints hints)
Constructs a new ColorConvertOp from a ColorSpace object.
ColorConvertOp(ColorSpace srcCspace, ColorSpace dstCspace, RenderingHints hints)
Constructs a new ColorConvertOp from two ColorSpace objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.color.ICC_Profile

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.color.ICC_Profile

Packages that use ICC_Profile
java.awt.color | Provides classes for color spaces.
java.awt.image | Provides classes for creating and modifying images.

Uses of ICC_Profile in java.awt.color

Subclasses of ICC_Profile in java.awt.color
class | ICC_ProfileGray A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
class | ICC_ProfileRGB A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags.

Methods in java.awt.color that return ICC_Profile
static ICC_Profile | ICC_Profile.getInstance(byte[] data) Constructs an ICC_Profile object corresponding to the data in a byte array.
static ICC_Profile | ICC_Profile.getInstance(int cspace) Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB).
static ICC_Profile | ICC_Profile.getInstance(String fileName) Constructs an ICC_Profile corresponding to the data in a file.
static ICC_Profile | ICC_Profile.getInstance(InputStream s) Constructs an ICC_Profile corresponding to the data in an InputStream.
ICC_Profile | ICC_ColorSpace.getProfile() Returns the ICC_Profile for this ICC_ColorSpace.

Constructors in java.awt.color with parameters of type ICC_Profile
ICC_ColorSpace(ICC_Profile profile)
Constructs a new ICC_ColorSpace from an ICC_Profile object.

Uses of ICC_Profile in java.awt.image

Methods in java.awt.image that return ICC_Profile
 ICC_Profile[] ColorConvertOp.getICC_Profiles()
Returns the array of ICC_Profiles used to construct this ColorConvertOp.

Constructors in java.awt.image with parameters of type ICC_Profile
ColorConvertOp(ICC_Profile[] profiles, RenderingHints hints)
Constructs a new ColorConvertOp from an array of ICC_Profiles.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CMMException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class CMMException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.awt.color.CMMException
All Implemented Interfaces:
Serializable
public class CMMException
extends RuntimeException

This exception is thrown if the native CMM returns an error.

See Also:
Serialized Form

Constructor Summary
CMMException(String s)
Constructs a CMMException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CMMException

public CMMException(String s)
Constructs a CMMException with the specified detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ColorSpace

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ColorSpace

java.lang.Object
  |
  +--java.awt.color.ColorSpace
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ICC_ColorSpace
public abstract class ColorSpace
extends Object
implements Serializable

This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice. It contains methods that transform Colors in a specific color space to/from sRGB and to/from a well-defined CIEXYZ color space.

Several variables are defined for purposes of referring to color space types (e.g. TYPE_RGB, TYPE_XYZ, etc.) and to refer to specific color spaces (e.g. CS_sRGB and CS_CIEXYZ). sRGB is a proposed standard RGB color space. For more information, see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .

The purpose of the methods to transform to/from the well-defined CIEXYZ color space is to support conversions between any two color spaces at a reasonably high degree of accuracy. It is expected that particular implementations of subclasses of ColorSpace (e.g. ICC_ColorSpace) will support high performance conversion based on underlying platform color management systems.

The CS_CIEXYZ space used by the toCIEXYZ/fromCIEXYZ methods can be described as follows:

      CIEXYZ
      viewing illuminance: 200 lux
      viewing white point: CIE D50
      media white point: "that of a perfectly reflecting diffuser" -- D50
      media black point: 0 lux or 0 Reflectance
      flare: 1 percent
      surround: 20percent of the media white point
      media description: reflection print (i.e., RLAB, Hunt viewing media)
      note: For developers creating an ICC profile for this conversion
            space, the following is applicable.  Use a simple Von Kries
            white point adaptation folded into the 3X3 matrix parameters
            and fold the flare and surround effects into the three
            one-dimensional lookup tables (assuming one uses the minimal
            model for monitors).

See Also:
ICC_ColorSpace, Serialized Form

Field Summary
static int | CS_CIEXYZ The CIEXYZ conversion color space defined above.
static int | CS_GRAY The built-in linear gray scale color space.
static int | CS_LINEAR_RGB A built-in linear RGB color space.
static int | CS_PYCC The Photo YCC conversion color space.
static int | CS_sRGB The sRGB color space defined at http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .
static int | TYPE_2CLR Generic 2 component color spaces.
static int | TYPE_3CLR Generic 3 component color spaces.
static int | TYPE_4CLR Generic 4 component color spaces.
static int | TYPE_5CLR Generic 5 component color spaces.
static int | TYPE_6CLR Generic 6 component color spaces.
static int | TYPE_7CLR Generic 7 component color spaces.
static int | TYPE_8CLR Generic 8 component color spaces.
static int | TYPE_9CLR Generic 9 component color spaces.
static int | TYPE_ACLR Generic 10 component color spaces.
static int | TYPE_BCLR Generic 11 component color spaces.
static int | TYPE_CCLR Generic 12 component color spaces.
static int | TYPE_CMY Any of the family of CMY color spaces.
static int | TYPE_CMYK Any of the family of CMYK color spaces.
static int | TYPE_DCLR Generic 13 component color spaces.
static int | TYPE_ECLR Generic 14 component color spaces.
static int | TYPE_FCLR Generic 15 component color spaces.
static int | TYPE_GRAY Any of the family of GRAY color spaces.
static int | TYPE_HLS Any of the family of HLS color spaces.
static int | TYPE_HSV Any of the family of HSV color spaces.
static int | TYPE_Lab Any of the family of Lab color spaces.
static int | TYPE_Luv Any of the family of Luv color spaces.
static int | TYPE_RGB Any of the family of RGB color spaces.
static int | TYPE_XYZ Any of the family of XYZ color spaces.
static int | TYPE_YCbCr Any of the family of YCbCr color spaces.
static int | TYPE_Yxy Any of the family of Yxy color spaces.
Constructor Summary
protected ColorSpace(int type, int numcomponents)
Constructs a ColorSpace object given a color space type and the number of components.
Method Summary
abstract float[] | fromCIEXYZ(float[] colorvalue) Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
abstract float[] | fromRGB(float[] rgbvalue) Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
static ColorSpace | getInstance(int colorspace) Returns a ColorSpace representing one of the specific predefined color spaces.
String | getName(int idx) Returns the name of the component given the component index
int | getNumComponents() Returns the number of components of this ColorSpace.
int | getType() Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...).
boolean | isCS_sRGB() Returns true if the ColorSpace is CS_sRGB.
abstract float[] | toCIEXYZ(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
abstract float[] | toRGB(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE_XYZ

public static final int TYPE_XYZ
Any of the family of XYZ color spaces.

TYPE_Lab

public static final int TYPE_Lab
Any of the family of Lab color spaces.

TYPE_Luv

public static final int TYPE_Luv
Any of the family of Luv color spaces.

TYPE_YCbCr

public static final int TYPE_YCbCr
Any of the family of YCbCr color spaces.

TYPE_Yxy

public static final int TYPE_Yxy
Any of the family of Yxy color spaces.

TYPE_RGB

public static final int TYPE_RGB
Any of the family of RGB color spaces.

TYPE_GRAY

public static final int TYPE_GRAY
Any of the family of GRAY color spaces.

TYPE_HSV

public static final int TYPE_HSV
Any of the family of HSV color spaces.

TYPE_HLS

public static final int TYPE_HLS
Any of the family of HLS color spaces.

TYPE_CMYK

public static final int TYPE_CMYK
Any of the family of CMYK color spaces.

TYPE_CMY

public static final int TYPE_CMY
Any of the family of CMY color spaces.

TYPE_2CLR

public static final int TYPE_2CLR
Generic 2 component color spaces.

TYPE_3CLR

public static final int TYPE_3CLR
Generic 3 component color spaces.

TYPE_4CLR

public static final int TYPE_4CLR
Generic 4 component color spaces.

TYPE_5CLR

public static final int TYPE_5CLR
Generic 5 component color spaces.

TYPE_6CLR

public static final int TYPE_6CLR
Generic 6 component color spaces.

TYPE_7CLR

public static final int TYPE_7CLR
Generic 7 component color spaces.

TYPE_8CLR

public static final int TYPE_8CLR
Generic 8 component color spaces.

TYPE_9CLR

public static final int TYPE_9CLR
Generic 9 component color spaces.

TYPE_ACLR

public static final int TYPE_ACLR
Generic 10 component color spaces.

TYPE_BCLR

public static final int TYPE_BCLR
Generic 11 component color spaces.

TYPE_CCLR

public static final int TYPE_CCLR
Generic 12 component color spaces.

TYPE_DCLR

public static final int TYPE_DCLR
Generic 13 component color spaces.

TYPE_ECLR

public static final int TYPE_ECLR
Generic 14 component color spaces.

TYPE_FCLR

public static final int TYPE_FCLR
Generic 15 component color spaces.

CS_sRGB

public static final int CS_sRGB
The sRGB color space defined at http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .

CS_LINEAR_RGB

public static final int CS_LINEAR_RGB
A built-in linear RGB color space. This space is based on the same RGB primaries as CS_sRGB, but has a linear tone reproduction curve.

CS_CIEXYZ

public static final int CS_CIEXYZ
The CIEXYZ conversion color space defined above.

CS_PYCC

public static final int CS_PYCC
The Photo YCC conversion color space.

CS_GRAY

public static final int CS_GRAY
The built-in linear gray scale color space.
Constructor Detail

ColorSpace

protected ColorSpace(int type,
                     int numcomponents)
Constructs a ColorSpace object given a color space type and the number of components.
Method Detail

getInstance

public static ColorSpace getInstance(int colorspace)
Returns a ColorSpace representing one of the specific predefined color spaces.
Parameters:
colorspace - a specific color space identified by one of the predefined class constants (e.g. CS_sRGB, CS_LINEAR_RGB, CS_CIEXYZ, CS_GRAY, or CS_PYCC)

isCS_sRGB

public boolean isCS_sRGB()
Returns true if the ColorSpace is CS_sRGB.

toRGB

public abstract float[] toRGB(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of this color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of the CS_sRGB color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace
Returns:
a float array of length 3

fromRGB

public abstract float[] fromRGB(float[] rgbvalue)
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of the CS_sRGB color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of this color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters:
rgbvalue - a float array with length of at least 3
Returns:
a float array with length equal to the number of components in this ColorSpace

toCIEXYZ

public abstract float[] toCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ values returned by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. This representation is not the same as the XYZ values that would be measured from the given color value by a colorimeter. A further transformation is necessary to compute the XYZ values that would be measured using current CIE recommended practices. See the toCIEXYZ method of ICC_ColorSpace for further information.

Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace
Returns:
a float array of length 3

fromCIEXYZ

public abstract float[] fromCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ argument values taken by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. The color values returned by this method are not those that would produce the XYZ value passed to the method when measured by a colorimeter. If you have XYZ values corresponding to measurements made using current CIE recommended practices, they must be converted to D50 relative values before being passed to this method. See the fromCIEXYZ method of ICC_ColorSpace for further information.

Parameters:
colorvalue - a float array with length of at least 3
Returns:
a float array with length equal to the number of components in this ColorSpace

getType

public int getType()
Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...). The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.

getNumComponents

public int getNumComponents()
Returns the number of components of this ColorSpace.

getName

public String getName(int idx)
Returns the name of the component given the component index
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ICC_ColorSpace

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ICC_ColorSpace

java.lang.Object
  |
  +--java.awt.color.ColorSpace
        |
        +--java.awt.color.ICC_ColorSpace
All Implemented Interfaces:
Serializable
public class ICC_ColorSpace
extends ColorSpace

An implementation of the abstract ColorSpace class. This representation of device independent and device dependent color spaces is based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).

Typically, a Color or ColorModel would be associated with an ICC Profile which is either an input, display, or output profile (see the ICC specification). There are other types of ICC Profiles, e.g. abstract profiles, device link profiles, and named color profiles, which do not contain information appropriate for representing the color space of a color, image, or device (see ICC_Profile). Attempting to create an ICC_ColorSpace object from an inappropriate ICC Profile is an error.

ICC Profiles represent transformations from the color space of the profile (e.g. a monitor) to a Profile Connection Space (PCS). Profiles of interest for tagging images or colors have a PCS which is one of the device independent spaces (one CIEXYZ space and two CIELab spaces) defined in the ICC Profile Format Specification. Most profiles of interest either have invertible transformations or explicitly specify transformations going both directions. Should an ICC_ColorSpace object be used in a way requiring a conversion from PCS to the profile's native space and there is inadequate data to correctly perform the conversion, the ICC_ColorSpace object will produce output in the specified type of color space (e.g. TYPE_RGB, TYPE_CMYK, etc.), but the specific color values of the output data will be undefined.

The details of this class are not important for simple applets, which draw in a default color space or manipulate and display imported images with a known color space. At most, such applets would need to get one of the default color spaces via ColorSpace.getInstance().

See Also:
ColorSpace, ICC_Profile, Serialized Form

Fields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
Constructor Summary
ICC_ColorSpace(ICC_Profile profile)
Constructs a new ICC_ColorSpace from an ICC_Profile object.
Method Summary
float[] | fromCIEXYZ(float[] colorvalue) Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
float[] | fromRGB(float[] rgbvalue) Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
ICC_Profile | getProfile() Returns the ICC_Profile for this ICC_ColorSpace.
float[] | toCIEXYZ(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
float[] | toRGB(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
Methods inherited from class java.awt.color.ColorSpace
getInstance, getName, getNumComponents, getType, isCS_sRGB
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ICC_ColorSpace

public ICC_ColorSpace(ICC_Profile profile)
Constructs a new ICC_ColorSpace from an ICC_Profile object.
Throws:
IllegalArgumentException - if profile is inappropriate for representing a ColorSpace.
Method Detail

getProfile

public ICC_Profile getProfile()
Returns the ICC_Profile for this ICC_ColorSpace.

toRGB

public float[] toRGB(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of this color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of the CS_sRGB color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Overrides:
toRGB in class ColorSpace
Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace.
Returns:
a float array of length 3.

fromRGB

public float[] fromRGB(float[] rgbvalue)
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of the CS_sRGB color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of this color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Overrides:
fromRGB in class ColorSpace
Parameters:
rgbvalue - a float array with length of at least 3.
Returns:
a float array with length equal to the number of components in this ColorSpace.

toCIEXYZ

public float[] toCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

This method transforms color values using relative colorimetry, as defined by the ICC Specification. This means that the XYZ values returned by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. This representation is not the same as the XYZ values that would be measured from the given color value by a colorimeter. A further transformation is necessary to compute the XYZ values that would be measured using current CIE recommended practices. The paragraphs below explain this in more detail.

The ICC standard uses a device independent color space (DICS) as the mechanism for converting color from one device to another device. In this architecture, colors are converted from the source device's color space to the ICC DICS and then from the ICC DICS to the destination device's color space. The ICC standard defines device profiles which contain transforms which will convert between a device's color space and the ICC DICS. The overall conversion of colors from a source device to colors of a destination device is done by connecting the device-to-DICS transform of the profile for the source device to the DICS-to-device transform of the profile for the destination device. For this reason, the ICC DICS is commonly referred to as the profile connection space (PCS). The color space used in the methods toCIEXYZ and fromCIEXYZ is the CIEXYZ PCS defined by the ICC Specification. This is also the color space represented by ColorSpace.CS_CIEXYZ.

The XYZ values of a color are often represented as relative to some white point, so the actual meaning of the XYZ values cannot be known without knowing the white point of those values. This is known as relative colorimetry. The PCS uses a white point of D50, so the XYZ values of the PCS are relative to D50. For example, white in the PCS will have the XYZ values of D50, which is defined to be X=.9642, Y=1.000, and Z=0.8249. This white point is commonly used for graphic arts applications, but others are often used in other applications.

To quantify the color characteristics of a device such as a printer or monitor, measurements of XYZ values for particular device colors are typically made. For purposes of this discussion, the term device XYZ values is used to mean the XYZ values that would be measured from device colors using current CIE recommended practices.

Converting between device XYZ values and the PCS XYZ values returned by this method corresponds to converting between the device's color space, as represented by CIE colorimetric values, and the PCS. There are many factors involved in this process, some of which are quite subtle. The most important, however, is the adjustment made to account for differences between the device's white point and the white point of the PCS. There are many techniques for doing this and it is the subject of much current research and controversy. Some commonly used methods are XYZ scaling, the von Kries transform, and the Bradford transform. The proper method to use depends upon each particular application.

The simplest method is XYZ scaling. In this method each device XYZ value is converted to a PCS XYZ value by multiplying it by the ratio of the PCS white point (D50) to the device white point.

 Xd, Yd, Zd are the device XYZ values
 Xdw, Ydw, Zdw are the device XYZ white point values
 Xp, Yp, Zp are the PCS XYZ values
 Xd50, Yd50, Zd50 are the PCS XYZ white point values

 Xp = Xd * (Xd50 / Xdw)
 Yp = Yd * (Yd50 / Ydw)
 Zp = Zd * (Zd50 / Zdw)

Conversion from the PCS to the device would be done by inverting these equations:

 Xd = Xp * (Xdw / Xd50)
 Yd = Yp * (Ydw / Yd50)
 Zd = Zp * (Zdw / Zd50)

Note that the media white point tag in an ICC profile is not the same as the device white point. The media white point tag is expressed in PCS values and is used to represent the difference between the XYZ of device illuminant and the XYZ of the device media when measured under that illuminant. The device white point is expressed as the device XYZ values corresponding to white displayed on the device. For example, displaying the RGB color (1.0, 1.0, 1.0) on an sRGB device will result in a measured device XYZ value of D65. This will not be the same as the media white point tag XYZ value in the ICC profile for an sRGB device.

Overrides:
toCIEXYZ in class ColorSpace
Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace.
Returns:
a float array of length 3.

fromCIEXYZ

public float[] fromCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

This method transforms color values using relative colorimetry, as defined by the ICC Specification. This means that the XYZ argument values taken by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. The color values returned by this method are not those that would produce the XYZ value passed to the method when measured by a colorimeter. If you have XYZ values corresponding to measurements made using current CIE recommended practices, they must be converted to D50 relative values before being passed to this method. The paragraphs below explain this in more detail.

The ICC standard uses a device independent color space (DICS) as the mechanism for converting color from one device to another device. In this architecture, colors are converted from the source device's color space to the ICC DICS and then from the ICC DICS to the destination device's color space. The ICC standard defines device profiles which contain transforms which will convert between a device's color space and the ICC DICS. The overall conversion of colors from a source device to colors of a destination device is done by connecting the device-to-DICS transform of the profile for the source device to the DICS-to-device transform of the profile for the destination device. For this reason, the ICC DICS is commonly referred to as the profile connection space (PCS). The color space used in the methods toCIEXYZ and fromCIEXYZ is the CIEXYZ PCS defined by the ICC Specification. This is also the color space represented by ColorSpace.CS_CIEXYZ.

The XYZ values of a color are often represented as relative to some white point, so the actual meaning of the XYZ values cannot be known without knowing the white point of those values. This is known as relative colorimetry. The PCS uses a white point of D50, so the XYZ values of the PCS are relative to D50. For example, white in the PCS will have the XYZ values of D50, which is defined to be X=.9642, Y=1.000, and Z=0.8249. This white point is commonly used for graphic arts applications, but others are often used in other applications.

To quantify the color characteristics of a device such as a printer or monitor, measurements of XYZ values for particular device colors are typically made. For purposes of this discussion, the term device XYZ values is used to mean the XYZ values that would be measured from device colors using current CIE recommended practices.

Converting between device XYZ values and the PCS XYZ values taken as arguments by this method corresponds to converting between the device's color space, as represented by CIE colorimetric values, and the PCS. There are many factors involved in this process, some of which are quite subtle. The most important, however, is the adjustment made to account for differences between the device's white point and the white point of the PCS. There are many techniques for doing this and it is the subject of much current research and controversy. Some commonly used methods are XYZ scaling, the von Kries transform, and the Bradford transform. The proper method to use depends upon each particular application.

The simplest method is XYZ scaling. In this method each device XYZ value is converted to a PCS XYZ value by multiplying it by the ratio of the PCS white point (D50) to the device white point.

 Xd, Yd, Zd are the device XYZ values
 Xdw, Ydw, Zdw are the device XYZ white point values
 Xp, Yp, Zp are the PCS XYZ values
 Xd50, Yd50, Zd50 are the PCS XYZ white point values

 Xp = Xd * (Xd50 / Xdw)
 Yp = Yd * (Yd50 / Ydw)
 Zp = Zd * (Zd50 / Zdw)

Conversion from the PCS to the device would be done by inverting these equations:

 Xd = Xp * (Xdw / Xd50)
 Yd = Yp * (Ydw / Yd50)
 Zd = Zp * (Zdw / Zd50)

Note that the media white point tag in an ICC profile is not the same as the device white point. The media white point tag is expressed in PCS values and is used to represent the difference between the XYZ of device illuminant and the XYZ of the device media when measured under that illuminant. The device white point is expressed as the device XYZ values corresponding to white displayed on the device. For example, displaying the RGB color (1.0, 1.0, 1.0) on an sRGB device will result in a measured device XYZ value of D65. This will not be the same as the media white point tag XYZ value in the ICC profile for an sRGB device.

Overrides:
fromCIEXYZ in class ColorSpace
Parameters:
colorvalue - a float array with length of at least 3.
Returns:
a float array with length equal to the number of components in this ColorSpace.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICC_Profile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ICC_Profile

java.lang.Object
  |
  +--java.awt.color.ICC_Profile
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ICC_ProfileGray, ICC_ProfileRGB
public class ICC_Profile
extends Object
implements Serializable

A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).

An ICC_ColorSpace object can be constructed from an appropriate ICC_Profile. Typically, an ICC_ColorSpace would be associated with an ICC Profile which is either an input, display, or output profile (see the ICC specification). There are also device link, abstract, color space conversion, and named color profiles. These are less useful for tagging a color or image, but are useful for other purposes (in particular device link profiles can provide improved performance for converting from one device's color space to another's).

ICC Profiles represent transformations from the color space of the profile (e.g. a monitor) to a Profile Connection Space (PCS). Profiles of interest for tagging images or colors have a PCS which is one of the two specific device independent spaces (one CIEXYZ space and one CIELab space) defined in the ICC Profile Format Specification. Most profiles of interest either have invertible transformations or explicitly specify transformations going both directions.

See Also:
ICC_ColorSpace, Serialized Form

Field Summary
static int | CLASS_ABSTRACT Profile class is abstract.
static int | CLASS_COLORSPACECONVERSION Profile class is color space conversion.
static int | CLASS_DEVICELINK Profile class is device link.
static int | CLASS_DISPLAY Profile class is display.
static int | CLASS_INPUT Profile class is input.
static int | CLASS_NAMEDCOLOR Profile class is named color.
static int | CLASS_OUTPUT Profile class is output.
static int | icAbsoluteColorimetric ICC Profile Rendering Intent: AbsoluteColorimetric.
static int | icCurveCount ICC Profile Constant: curveType count.
static int | icCurveData ICC Profile Constant: curveType data.
static int | icHdrAttributes ICC Profile Header Location: device attributes.
static int | icHdrCmmId ICC Profile Header Location: CMM for this profile.
static int | icHdrColorSpace ICC Profile Header Location: color space of data.
static int | icHdrCreator ICC Profile Header Location: profile creator.
static int | icHdrDate ICC Profile Header Location: date profile was created.
static int | icHdrDeviceClass ICC Profile Header Location: type of profile.
static int | icHdrFlags ICC Profile Header Location: various bit settings.
static int | icHdrIlluminant ICC Profile Header Location: profile illuminant.
static int | icHdrMagic ICC Profile Header Location: icMagicNumber.
static int | icHdrManufacturer ICC Profile Header Location: device manufacturer.
static int | icHdrModel ICC Profile Header Location: device model number.
static int | icHdrPcs ICC Profile Header Location: PCS - XYZ or Lab only.
static int | icHdrPlatform ICC Profile Header Location: primary platform.
static int | icHdrRenderingIntent ICC Profile Header Location: rendering intent.
static int | icHdrSize ICC Profile Header Location: profile size in bytes.
static int | icHdrVersion ICC Profile Header Location: format version number.
static int | icPerceptual ICC Profile Rendering Intent: Perceptual.
static int | icRelativeColorimetric ICC Profile Rendering Intent: RelativeColorimetric.
static int | icSaturation ICC Profile Rendering Intent: Saturation.
static int | icSigAbstractClass ICC Profile Class Signature: 'abst'.
static int | icSigAToB0Tag ICC Profile Tag Signature: 'A2B0'.
static int | icSigAToB1Tag ICC Profile Tag Signature: 'A2B1'.
static int | icSigAToB2Tag ICC Profile Tag Signature: 'A2B2'.
static int | icSigBlueColorantTag ICC Profile Tag Signature: 'bXYZ'.
static int | icSigBlueTRCTag ICC Profile Tag Signature: 'bTRC'.
static int | icSigBToA0Tag ICC Profile Tag Signature: 'B2A0'.
static int | icSigBToA1Tag ICC Profile Tag Signature: 'B2A1'.
static int | icSigBToA2Tag ICC Profile Tag Signature: 'B2A2'.
static int | icSigCalibrationDateTimeTag ICC Profile Tag Signature: 'calt'.
static int | icSigCharTargetTag ICC Profile Tag Signature: 'targ'.
static int | icSigChromaticityTag ICC Profile Tag Signature: 'chrm'.
static int | icSigCmyData ICC Profile Color Space Type Signature: 'CMY '.
static int | icSigCmykData ICC Profile Color Space Type Signature: 'CMYK'.
static int | icSigColorSpaceClass ICC Profile Class Signature: 'spac'.
static int | icSigCopyrightTag ICC Profile Tag Signature: 'cprt'.
static int | icSigCrdInfoTag ICC Profile Tag Signature: 'crdi'.
static int | icSigDeviceMfgDescTag ICC Profile Tag Signature: 'dmnd'.
static int | icSigDeviceModelDescTag ICC Profile Tag Signature: 'dmdd'.
static int | icSigDeviceSettingsTag ICC Profile Tag Signature: 'devs'.
static int | icSigDisplayClass ICC Profile Class Signature: 'mntr'.
static int | icSigGamutTag ICC Profile Tag Signature: 'gamt'.
static int | icSigGrayData ICC Profile Color Space Type Signature: 'GRAY'.
static int | icSigGrayTRCTag ICC Profile Tag Signature: 'kTRC'.
static int | icSigGreenColorantTag ICC Profile Tag Signature: 'gXYZ'.
static int | icSigGreenTRCTag ICC Profile Tag Signature: 'gTRC'.
static int | icSigHead ICC Profile Tag Signature: 'head' - special.
static int | icSigHlsData ICC Profile Color Space Type Signature: 'HLS'.
static int | icSigHsvData ICC Profile Color Space Type Signature: 'HSV'.
static int | icSigInputClass ICC Profile Class Signature: 'scnr'.
static int | icSigLabData ICC Profile Color Space Type Signature: 'Lab '.
static int | icSigLinkClass ICC Profile Class Signature: 'link'.
static int | icSigLuminanceTag ICC Profile Tag Signature: 'lumi'.
static int | icSigLuvData ICC Profile Color Space Type Signature: 'Luv '.
static int | icSigMeasurementTag ICC Profile Tag Signature: 'meas'.
static int | icSigMediaBlackPointTag ICC Profile Tag Signature: 'bkpt'.
static int | icSigMediaWhitePointTag ICC Profile Tag Signature: 'wtpt'.
static int | icSigNamedColor2Tag ICC Profile Tag Signature: 'ncl2'.
static int | icSigNamedColorClass ICC Profile Class Signature: 'nmcl'.
static int | icSigOutputClass ICC Profile Class Signature: 'prtr'.
static int | icSigOutputResponseTag ICC Profile Tag Signature: 'resp'.
static int | icSigPreview0Tag ICC Profile Tag Signature: 'pre0'.
static int | icSigPreview1Tag ICC Profile Tag Signature: 'pre1'.
static int | icSigPreview2Tag ICC Profile Tag Signature: 'pre2'.
static int | icSigProfileDescriptionTag ICC Profile Tag Signature: 'desc'.
static int | icSigProfileSequenceDescTag ICC Profile Tag Signature: 'pseq'.
static int | icSigPs2CRD0Tag ICC Profile Tag Signature: 'psd0'.
static int | icSigPs2CRD1Tag ICC Profile Tag Signature: 'psd1'.
static int | icSigPs2CRD2Tag ICC Profile Tag Signature: 'psd2'.
static int | icSigPs2CRD3Tag ICC Profile Tag Signature: 'psd3'.
static int | icSigPs2CSATag ICC Profile Tag Signature: 'ps2s'.
static int | icSigPs2RenderingIntentTag ICC Profile Tag Signature: 'ps2i'.
static int | icSigRedColorantTag ICC Profile Tag Signature: 'rXYZ'.
static int | icSigRedTRCTag ICC Profile Tag Signature: 'rTRC'.
static int | icSigRgbData ICC Profile Color Space Type Signature: 'RGB '.
static int | icSigScreeningDescTag ICC Profile Tag Signature: 'scrd'.
static int | icSigScreeningTag ICC Profile Tag Signature: 'scrn'.
static int | icSigSpace2CLR ICC Profile Color Space Type Signature: '2CLR'.
static int | icSigSpace3CLR ICC Profile Color Space Type Signature: '3CLR'.
static int | icSigSpace4CLR ICC Profile Color Space Type Signature: '4CLR'.
static int | icSigSpace5CLR ICC Profile Color Space Type Signature: '5CLR'.
static int | icSigSpace6CLR ICC Profile Color Space Type Signature: '6CLR'.
static int | icSigSpace7CLR ICC Profile Color Space Type Signature: '7CLR'.
static int | icSigSpace8CLR ICC Profile Color Space Type Signature: '8CLR'.
static int | icSigSpace9CLR ICC Profile Color Space Type Signature: '9CLR'.
static int | icSigSpaceACLR ICC Profile Color Space Type Signature: 'ACLR'.
static int | icSigSpaceBCLR ICC Profile Color Space Type Signature: 'BCLR'.
static int | icSigSpaceCCLR ICC Profile Color Space Type Signature: 'CCLR'.
static int | icSigSpaceDCLR ICC Profile Color Space Type Signature: 'DCLR'.
static int | icSigSpaceECLR ICC Profile Color Space Type Signature: 'ECLR'.
static int | icSigSpaceFCLR ICC Profile Color Space Type Signature: 'FCLR'.
static int | icSigTechnologyTag ICC Profile Tag Signature: 'tech'.
static int | icSigUcrBgTag ICC Profile Tag Signature: 'bfd '.
static int | icSigViewingCondDescTag ICC Profile Tag Signature: 'vued'.
static int | icSigViewingConditionsTag ICC Profile Tag Signature: 'view'.
static int | icSigXYZData ICC Profile Color Space Type Signature: 'XYZ '.
static int | icSigYCbCrData ICC Profile Color Space Type Signature: 'YCbr'.
static int | icSigYxyData ICC Profile Color Space Type Signature: 'Yxy '.
static int | icTagReserved ICC Profile Constant: reserved.
static int | icTagType ICC Profile Constant: tag type signaturE.
static int | icXYZNumberX ICC Profile Constant: XYZNumber X.
Method Summary
protected void | finalize() Frees the resources associated with an ICC_Profile object.
int | getColorSpaceType() Returns the color space type.
byte[] | getData() Returns a byte array corresponding to the data of this ICC_Profile.
byte[] | getData(int tagSignature) Returns a particular tagged data element from the profile as a byte array.
static ICC_Profile | getInstance(byte[] data) Constructs an ICC_Profile object corresponding to the data in a byte array.
static ICC_Profile | getInstance(InputStream s) Constructs an ICC_Profile corresponding to the data in an InputStream.
static ICC_Profile | getInstance(int cspace) Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB).
static ICC_Profile | getInstance(String fileName) Constructs an ICC_Profile corresponding to the data in a file.
int | getMajorVersion() Returns profile major version.
int | getMinorVersion() Returns profile minor version.
int | getNumComponents() Returns the number of color components in the "input" color space of this profile.
int | getPCSType() Returns the color space type of the Profile Connection Space (PCS).
int | getProfileClass() Returns the profile class.
protected Object | readResolve() Resolves instances being deserialized into instances registered with CMM.
void | setData(int tagSignature, byte[] tagData) Sets a particular tagged data element in the profile from a byte array.
void | write(OutputStream s) Write this ICC_Profile to an OutputStream.
void | write(String fileName) Write this ICC_Profile to a file.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CLASS_INPUT

public static final int CLASS_INPUT
Profile class is input.

CLASS_DISPLAY

public static final int CLASS_DISPLAY
Profile class is display.

CLASS_OUTPUT

public static final int CLASS_OUTPUT
Profile class is output.

CLASS_DEVICELINK

public static final int CLASS_DEVICELINK
Profile class is device link.

CLASS_COLORSPACECONVERSION

public static final int CLASS_COLORSPACECONVERSION
Profile class is color space conversion.

CLASS_ABSTRACT

public static final int CLASS_ABSTRACT
Profile class is abstract.

CLASS_NAMEDCOLOR

public static final int CLASS_NAMEDCOLOR
Profile class is named color.

icSigXYZData

public static final int icSigXYZData
ICC Profile Color Space Type Signature: 'XYZ '.

icSigLabData

public static final int icSigLabData
ICC Profile Color Space Type Signature: 'Lab '.

icSigLuvData

public static final int icSigLuvData
ICC Profile Color Space Type Signature: 'Luv '.

icSigYCbCrData

public static final int icSigYCbCrData
ICC Profile Color Space Type Signature: 'YCbr'.

icSigYxyData

public static final int icSigYxyData
ICC Profile Color Space Type Signature: 'Yxy '.

icSigRgbData

public static final int icSigRgbData
ICC Profile Color Space Type Signature: 'RGB '.

icSigGrayData

public static final int icSigGrayData
ICC Profile Color Space Type Signature: 'GRAY'.

icSigHsvData

public static final int icSigHsvData
ICC Profile Color Space Type Signature: 'HSV'.

icSigHlsData

public static final int icSigHlsData
ICC Profile Color Space Type Signature: 'HLS'.

icSigCmykData

public static final int icSigCmykData
ICC Profile Color Space Type Signature: 'CMYK'.

icSigCmyData

public static final int icSigCmyData
ICC Profile Color Space Type Signature: 'CMY '.

icSigSpace2CLR

public static final int icSigSpace2CLR
ICC Profile Color Space Type Signature: '2CLR'.

icSigSpace3CLR

public static final int icSigSpace3CLR
ICC Profile Color Space Type Signature: '3CLR'.

icSigSpace4CLR

public static final int icSigSpace4CLR
ICC Profile Color Space Type Signature: '4CLR'.

icSigSpace5CLR

public static final int icSigSpace5CLR
ICC Profile Color Space Type Signature: '5CLR'.

icSigSpace6CLR

public static final int icSigSpace6CLR
ICC Profile Color Space Type Signature: '6CLR'.

icSigSpace7CLR

public static final int icSigSpace7CLR
ICC Profile Color Space Type Signature: '7CLR'.

icSigSpace8CLR

public static final int icSigSpace8CLR
ICC Profile Color Space Type Signature: '8CLR'.

icSigSpace9CLR

public static final int icSigSpace9CLR
ICC Profile Color Space Type Signature: '9CLR'.

icSigSpaceACLR

public static final int icSigSpaceACLR
ICC Profile Color Space Type Signature: 'ACLR'.

icSigSpaceBCLR

public static final int icSigSpaceBCLR
ICC Profile Color Space Type Signature: 'BCLR'.

icSigSpaceCCLR

public static final int icSigSpaceCCLR
ICC Profile Color Space Type Signature: 'CCLR'.

icSigSpaceDCLR

public static final int icSigSpaceDCLR
ICC Profile Color Space Type Signature: 'DCLR'.

icSigSpaceECLR

public static final int icSigSpaceECLR
ICC Profile Color Space Type Signature: 'ECLR'.

icSigSpaceFCLR

public static final int icSigSpaceFCLR
ICC Profile Color Space Type Signature: 'FCLR'.

icSigInputClass

public static final int icSigInputClass
ICC Profile Class Signature: 'scnr'.

icSigDisplayClass

public static final int icSigDisplayClass
ICC Profile Class Signature: 'mntr'.

icSigOutputClass

public static final int icSigOutputClass
ICC Profile Class Signature: 'prtr'.

icSigLinkClass

public static final int icSigLinkClass
ICC Profile Class Signature: 'link'.

icSigAbstractClass

public static final int icSigAbstractClass
ICC Profile Class Signature: 'abst'.

icSigColorSpaceClass

public static final int icSigColorSpaceClass
ICC Profile Class Signature: 'spac'.

icSigNamedColorClass

public static final int icSigNamedColorClass
ICC Profile Class Signature: 'nmcl'.

icPerceptual

public static final int icPerceptual
ICC Profile Rendering Intent: Perceptual.

icRelativeColorimetric

public static final int icRelativeColorimetric
ICC Profile Rendering Intent: RelativeColorimetric.

icSaturation

public static final int icSaturation
ICC Profile Rendering Intent: Saturation.

icAbsoluteColorimetric

public static final int icAbsoluteColorimetric
ICC Profile Rendering Intent: AbsoluteColorimetric.

icSigHead

public static final int icSigHead
ICC Profile Tag Signature: 'head' - special.

icSigAToB0Tag

public static final int icSigAToB0Tag
ICC Profile Tag Signature: 'A2B0'.

icSigAToB1Tag

public static final int icSigAToB1Tag
ICC Profile Tag Signature: 'A2B1'.

icSigAToB2Tag

public static final int icSigAToB2Tag
ICC Profile Tag Signature: 'A2B2'.

icSigBlueColorantTag

public static final int icSigBlueColorantTag
ICC Profile Tag Signature: 'bXYZ'.

icSigBlueTRCTag

public static final int icSigBlueTRCTag
ICC Profile Tag Signature: 'bTRC'.

icSigBToA0Tag

public static final int icSigBToA0Tag
ICC Profile Tag Signature: 'B2A0'.

icSigBToA1Tag

public static final int icSigBToA1Tag
ICC Profile Tag Signature: 'B2A1'.

icSigBToA2Tag

public static final int icSigBToA2Tag
ICC Profile Tag Signature: 'B2A2'.

icSigCalibrationDateTimeTag

public static final int icSigCalibrationDateTimeTag
ICC Profile Tag Signature: 'calt'.

icSigCharTargetTag

public static final int icSigCharTargetTag
ICC Profile Tag Signature: 'targ'.

icSigCopyrightTag

public static final int icSigCopyrightTag
ICC Profile Tag Signature: 'cprt'.

icSigCrdInfoTag

public static final int icSigCrdInfoTag
ICC Profile Tag Signature: 'crdi'.

icSigDeviceMfgDescTag

public static final int icSigDeviceMfgDescTag
ICC Profile Tag Signature: 'dmnd'.

icSigDeviceModelDescTag

public static final int icSigDeviceModelDescTag
ICC Profile Tag Signature: 'dmdd'.

icSigDeviceSettingsTag

public static final int icSigDeviceSettingsTag
ICC Profile Tag Signature: 'devs'.

icSigGamutTag

public static final int icSigGamutTag
ICC Profile Tag Signature: 'gamt'.

icSigGrayTRCTag

public static final int icSigGrayTRCTag
ICC Profile Tag Signature: 'kTRC'.

icSigGreenColorantTag

public static final int icSigGreenColorantTag
ICC Profile Tag Signature: 'gXYZ'.

icSigGreenTRCTag

public static final int icSigGreenTRCTag
ICC Profile Tag Signature: 'gTRC'.

icSigLuminanceTag

public static final int icSigLuminanceTag
ICC Profile Tag Signature: 'lumi'.

icSigMeasurementTag

public static final int icSigMeasurementTag
ICC Profile Tag Signature: 'meas'.

icSigMediaBlackPointTag

public static final int icSigMediaBlackPointTag
ICC Profile Tag Signature: 'bkpt'.

icSigMediaWhitePointTag

public static final int icSigMediaWhitePointTag
ICC Profile Tag Signature: 'wtpt'.

icSigNamedColor2Tag

public static final int icSigNamedColor2Tag
ICC Profile Tag Signature: 'ncl2'.

icSigOutputResponseTag

public static final int icSigOutputResponseTag
ICC Profile Tag Signature: 'resp'.

icSigPreview0Tag

public static final int icSigPreview0Tag
ICC Profile Tag Signature: 'pre0'.

icSigPreview1Tag

public static final int icSigPreview1Tag
ICC Profile Tag Signature: 'pre1'.

icSigPreview2Tag

public static final int icSigPreview2Tag
ICC Profile Tag Signature: 'pre2'.

icSigProfileDescriptionTag

public static final int icSigProfileDescriptionTag
ICC Profile Tag Signature: 'desc'.

icSigProfileSequenceDescTag

public static final int icSigProfileSequenceDescTag
ICC Profile Tag Signature: 'pseq'.

icSigPs2CRD0Tag

public static final int icSigPs2CRD0Tag
ICC Profile Tag Signature: 'psd0'.

icSigPs2CRD1Tag

public static final int icSigPs2CRD1Tag
ICC Profile Tag Signature: 'psd1'.

icSigPs2CRD2Tag

public static final int icSigPs2CRD2Tag
ICC Profile Tag Signature: 'psd2'.

icSigPs2CRD3Tag

public static final int icSigPs2CRD3Tag
ICC Profile Tag Signature: 'psd3'.

icSigPs2CSATag

public static final int icSigPs2CSATag
ICC Profile Tag Signature: 'ps2s'.

icSigPs2RenderingIntentTag

public static final int icSigPs2RenderingIntentTag
ICC Profile Tag Signature: 'ps2i'.

icSigRedColorantTag

public static final int icSigRedColorantTag
ICC Profile Tag Signature: 'rXYZ'.

icSigRedTRCTag

public static final int icSigRedTRCTag
ICC Profile Tag Signature: 'rTRC'.

icSigScreeningDescTag

public static final int icSigScreeningDescTag
ICC Profile Tag Signature: 'scrd'.

icSigScreeningTag

public static final int icSigScreeningTag
ICC Profile Tag Signature: 'scrn'.

icSigTechnologyTag

public static final int icSigTechnologyTag
ICC Profile Tag Signature: 'tech'.

icSigUcrBgTag

public static final int icSigUcrBgTag
ICC Profile Tag Signature: 'bfd '.

icSigViewingCondDescTag

public static final int icSigViewingCondDescTag
ICC Profile Tag Signature: 'vued'.

icSigViewingConditionsTag

public static final int icSigViewingConditionsTag
ICC Profile Tag Signature: 'view'.

icSigChromaticityTag

public static final int icSigChromaticityTag
ICC Profile Tag Signature: 'chrm'.

icHdrSize

public static final int icHdrSize
ICC Profile Header Location: profile size in bytes.

icHdrCmmId

public static final int icHdrCmmId
ICC Profile Header Location: CMM for this profile.

icHdrVersion

public static final int icHdrVersion
ICC Profile Header Location: format version number.

icHdrDeviceClass

public static final int icHdrDeviceClass
ICC Profile Header Location: type of profile.

icHdrColorSpace

public static final int icHdrColorSpace
ICC Profile Header Location: color space of data.

icHdrPcs

public static final int icHdrPcs
ICC Profile Header Location: PCS - XYZ or Lab only.

icHdrDate

public static final int icHdrDate
ICC Profile Header Location: date profile was created.

icHdrMagic

public static final int icHdrMagic
ICC Profile Header Location: icMagicNumber.

icHdrPlatform

public static final int icHdrPlatform
ICC Profile Header Location: primary platform.

icHdrFlags

public static final int icHdrFlags
ICC Profile Header Location: various bit settings.

icHdrManufacturer

public static final int icHdrManufacturer
ICC Profile Header Location: device manufacturer.

icHdrModel

public static final int icHdrModel
ICC Profile Header Location: device model number.

icHdrAttributes

public static final int icHdrAttributes
ICC Profile Header Location: device attributes.

icHdrRenderingIntent

public static final int icHdrRenderingIntent
ICC Profile Header Location: rendering intent.

icHdrIlluminant

public static final int icHdrIlluminant
ICC Profile Header Location: profile illuminant.

icHdrCreator

public static final int icHdrCreator
ICC Profile Header Location: profile creator.

icTagType

public static final int icTagType
ICC Profile Constant: tag type signaturE.

icTagReserved

public static final int icTagReserved
ICC Profile Constant: reserved.

icCurveCount

public static final int icCurveCount
ICC Profile Constant: curveType count.

icCurveData

public static final int icCurveData
ICC Profile Constant: curveType data.

icXYZNumberX

public static final int icXYZNumberX
ICC Profile Constant: XYZNumber X.
Method Detail

finalize

protected void finalize()
Frees the resources associated with an ICC_Profile object.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

getInstance

public static ICC_Profile getInstance(byte[] data)
Constructs an ICC_Profile object corresponding to the data in a byte array. Throws an IllegalArgumentException if the data does not correspond to a valid ICC Profile.

getInstance

public static ICC_Profile getInstance(int cspace)
Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB). Throws an IllegalArgumentException if cspace is not one of the defined color spaces.

getInstance

public static ICC_Profile getInstance(String fileName)
                               throws IOException
Constructs an ICC_Profile corresponding to the data in a file. fileName may be an absolute or a relative file specification. Relative file names are looked for in several places: first, relative to any directories specified by the java.iccprofile.path property; second, relative to any directories specified by the java.class.path property; finally, in a directory used to store profiles always available, such as the profile for sRGB. Built-in profiles use .pf as the file name extension for profiles, e.g. sRGB.pf. This method throws an IOException if the specified file cannot be opened or if an I/O error occurs while reading the file. It throws an IllegalArgumentException if the file does not contain valid ICC Profile data.

getInstance

public static ICC_Profile getInstance(InputStream s)
                               throws IOException
Constructs an ICC_Profile corresponding to the data in an InputStream. This method throws an IllegalArgumentException if the stream does not contain valid ICC Profile data. It throws an IOException if an I/O error occurs while reading the stream.

getMajorVersion

public int getMajorVersion()
Returns profile major version.

getMinorVersion

public int getMinorVersion()
Returns profile minor version.

getProfileClass

public int getProfileClass()
Returns the profile class. Returns one of the predefined profile class constants.

getColorSpaceType

public int getColorSpaceType()
Returns the color space type. Returns one of the color space type constants defined by the ColorSpace class. This is the "input" color space of the profile. The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.

getPCSType

public int getPCSType()
Returns the color space type of the Profile Connection Space (PCS). Returns one of the color space type constants defined by the ColorSpace class. This is the "output" color space of the profile. For an input, display, or output profile useful for tagging colors or images, this will be either TYPE_XYZ or TYPE_Lab and should be interpreted as the corresponding specific color space defined in the ICC specification. For a device link profile, this could be any of the color space type constants.

write

public void write(String fileName)
           throws IOException
Write this ICC_Profile to a file. Throws an IOException if the file cannot be opened for writing or if an I/O error occurs while writing the file.

write

public void write(OutputStream s)
           throws IOException
Write this ICC_Profile to an OutputStream. Throws an IOException an I/O error occurs while writing the stream.

getData

public byte[] getData()
Returns a byte array corresponding to the data of this ICC_Profile.

getData

public byte[] getData(int tagSignature)
Returns a particular tagged data element from the profile as a byte array. Elements are identified by signatures as defined in the ICC specification. The signature icSigHead can be used to get the header. This method is useful for advanced applets or applications which need to access profile data directly. Returns null if no such tag exists.

setData

public void setData(int tagSignature,
                    byte[] tagData)
Sets a particular tagged data element in the profile from a byte array. This method is useful for advanced applets or applications which need to access profile data directly.

getNumComponents

public int getNumComponents()
Returns the number of color components in the "input" color space of this profile. For example if the color space type of this profile is TYPE_RGB, then this method will return 3.

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Resolves instances being deserialized into instances registered with CMM.
Returns:
ICC_Profile object for profile registered with CMM.
Throws:
ObjectStreamException - never thrown, but mandated by the serialization spec.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICC_ProfileGray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ICC_ProfileGray

java.lang.Object
  |
  +--java.awt.color.ICC_Profile
        |
        +--java.awt.color.ICC_ProfileGray
All Implemented Interfaces:
Serializable
public class ICC_ProfileGray
extends ICC_Profile

A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags. Examples of this kind of profile are monochrome input profiles, monochrome display profiles, and monochrome output profiles. The getInstance methods in the ICC_Profile class will return an ICC_ProfileGray object when the above conditions are met. The advantage of this class is that it provides a lookup table that Java or native methods may be able to use directly to optimize color conversion in some cases.

To transform from a GRAY device profile color space to the CIEXYZ Profile Connection Space, the device gray component is transformed by a lookup through the tone reproduction curve (TRC). The result is treated as the achromatic component of the PCS.

                PCSY = grayTRC[deviceGray]
The inverse transform is done by converting the PCS Y components to device Gray via the inverse of the grayTRC.

See Also:
Serialized Form

Fields inherited from class java.awt.color.ICC_Profile
CLASS_ABSTRACT, CLASS_COLORSPACECONVERSION, CLASS_DEVICELINK, CLASS_DISPLAY, CLASS_INPUT, CLASS_NAMEDCOLOR, CLASS_OUTPUT, icAbsoluteColorimetric, icCurveCount, icCurveData, icHdrAttributes, icHdrCmmId, icHdrColorSpace, icHdrCreator, icHdrDate, icHdrDeviceClass, icHdrFlags, icHdrIlluminant, icHdrMagic, icHdrManufacturer, icHdrModel, icHdrPcs, icHdrPlatform, icHdrRenderingIntent, icHdrSize, icHdrVersion, icPerceptual, icRelativeColorimetric, icSaturation, icSigAbstractClass, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigBlueColorantTag, icSigBlueTRCTag, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigCalibrationDateTimeTag, icSigCharTargetTag, icSigChromaticityTag, icSigCmyData, icSigCmykData, icSigColorSpaceClass, icSigCopyrightTag, icSigCrdInfoTag, icSigDeviceMfgDescTag, icSigDeviceModelDescTag, icSigDeviceSettingsTag, icSigDisplayClass, icSigGamutTag, icSigGrayData, icSigGrayTRCTag, icSigGreenColorantTag, icSigGreenTRCTag, icSigHead, icSigHlsData, icSigHsvData, icSigInputClass, icSigLabData, icSigLinkClass, icSigLuminanceTag, icSigLuvData, icSigMeasurementTag, icSigMediaBlackPointTag, icSigMediaWhitePointTag, icSigNamedColor2Tag, icSigNamedColorClass, icSigOutputClass, icSigOutputResponseTag, icSigPreview0Tag, icSigPreview1Tag, icSigPreview2Tag, icSigProfileDescriptionTag, icSigProfileSequenceDescTag, icSigPs2CRD0Tag, icSigPs2CRD1Tag, icSigPs2CRD2Tag, icSigPs2CRD3Tag, icSigPs2CSATag, icSigPs2RenderingIntentTag, icSigRedColorantTag, icSigRedTRCTag, icSigRgbData, icSigScreeningDescTag, icSigScreeningTag, icSigSpace2CLR, icSigSpace3CLR, icSigSpace4CLR, icSigSpace5CLR, icSigSpace6CLR, icSigSpace7CLR, icSigSpace8CLR, icSigSpace9CLR, icSigSpaceACLR, icSigSpaceBCLR, icSigSpaceCCLR, icSigSpaceDCLR, icSigSpaceECLR, icSigSpaceFCLR, icSigTechnologyTag, icSigUcrBgTag, icSigViewingCondDescTag, icSigViewingConditionsTag, icSigXYZData, icSigYCbCrData, icSigYxyData, icTagReserved, icTagType, icXYZNumberX
Method Summary
float | getGamma() Returns a gamma value representing the tone reproduction curve (TRC).
float[] | getMediaWhitePoint() Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.
short[] | getTRC() Returns the TRC as an array of shorts.
Methods inherited from class java.awt.color.ICC_Profile
finalize, getColorSpaceType, getData, getData, getInstance, getInstance, getInstance, getInstance, getMajorVersion, getMinorVersion, getNumComponents, getPCSType, getProfileClass, readResolve, setData, write, write
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getMediaWhitePoint

public float[] getMediaWhitePoint()
Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.

getGamma

public float getGamma()
Returns a gamma value representing the tone reproduction curve (TRC). If the profile represents the TRC as a table rather than a single gamma value, then an exception is thrown. In this case the actual table can be obtained via getTRC(). When using a gamma value, the PCS Y component is computed as follows:

                          gamma
         PCSY = deviceGray
Returns:
the gamma value as a float.
Throws:
ProfileDataException - if the profile does not specify the TRC as a single gamma value.

getTRC

public short[] getTRC()
Returns the TRC as an array of shorts. If the profile has specified the TRC as linear (gamma = 1.0) or as a simple gamma value, this method throws an exception, and the getGamma() method should be used to get the gamma value. Otherwise the short array returned here represents a lookup table where the input Gray value is conceptually in the range [0.0, 1.0]. Value 0.0 maps to array index 0 and value 1.0 maps to array index length-1. Interpolation may be used to generate output values for input values which do not map exactly to an index in the array. Output values also map linearly to the range [0.0, 1.0]. Value 0.0 is represented by an array value of 0x0000 and value 1.0 by 0xFFFF, i.e. the values are really unsigned short values, although they are returned in a short array.
Returns:
a short array representing the TRC.
Throws:
ProfileDataException - if the profile does not specify the TRC as a table.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICC_ProfileRGB

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ICC_ProfileRGB

java.lang.Object
  |
  +--java.awt.color.ICC_Profile
        |
        +--java.awt.color.ICC_ProfileRGB
All Implemented Interfaces:
Serializable
public class ICC_ProfileRGB
extends ICC_Profile

A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags. Examples of this kind of profile are three-component matrix-based input profiles and RGB display profiles. The getInstance methods in the ICC_Profile class will return an ICC_ProfileRGB object when the above conditions are met. The advantage of this class is that it provides color transform matrices and lookup tables that Java or native methods may be able to use directly to optimize color conversion in some cases.

To transform from a device profile color space to the CIEXYZ Profile Connection Space, each device color component is first linearized by a lookup through the corresponding tone reproduction curve (TRC). Then the resulting linear RGB components are converted via a 3x3 matrix (constructed from the RGB colorants) to the CIEXYZ PCS.

                linearR = redTRC[deviceR]

                linearG = greenTRC[deviceG]

                linearB = blueTRC[deviceB]

  _      _       _                                             _   _         _
 [  PCSX  ]     [  redColorantX  greenColorantX  blueColorantX  ] [  linearR  ]
 [        ]     [                                               ] [           ]
 [  PCSY  ]  =  [  redColorantY  greenColorantY  blueColorantY  ] [  linearG  ]
 [        ]     [                                               ] [           ]
 [_ PCSZ _]     [_ redColorantZ  greenColorantZ  blueColorantZ _] [_ linearB _]
The inverse transform is done by converting PCS XYZ components to linear RGB components via the inverse of the above 3x3 matrix, and then converting linear RGB to device RGB via inverses of the TRCs.

See Also:
Serialized Form

Field Summary
static int | BLUECOMPONENT To request a gamma value or TRC for the blue component.
static int | GREENCOMPONENT To request a gamma value or TRC for the green component.
static int | REDCOMPONENT To request a gamma value or TRC for the red component.
Fields inherited from class java.awt.color.ICC_Profile
CLASS_ABSTRACT, CLASS_COLORSPACECONVERSION, CLASS_DEVICELINK, CLASS_DISPLAY, CLASS_INPUT, CLASS_NAMEDCOLOR, CLASS_OUTPUT, icAbsoluteColorimetric, icCurveCount, icCurveData, icHdrAttributes, icHdrCmmId, icHdrColorSpace, icHdrCreator, icHdrDate, icHdrDeviceClass, icHdrFlags, icHdrIlluminant, icHdrMagic, icHdrManufacturer, icHdrModel, icHdrPcs, icHdrPlatform, icHdrRenderingIntent, icHdrSize, icHdrVersion, icPerceptual, icRelativeColorimetric, icSaturation, icSigAbstractClass, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigBlueColorantTag, icSigBlueTRCTag, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigCalibrationDateTimeTag, icSigCharTargetTag, icSigChromaticityTag, icSigCmyData, icSigCmykData, icSigColorSpaceClass, icSigCopyrightTag, icSigCrdInfoTag, icSigDeviceMfgDescTag, icSigDeviceModelDescTag, icSigDeviceSettingsTag, icSigDisplayClass, icSigGamutTag, icSigGrayData, icSigGrayTRCTag, icSigGreenColorantTag, icSigGreenTRCTag, icSigHead, icSigHlsData, icSigHsvData, icSigInputClass, icSigLabData, icSigLinkClass, icSigLuminanceTag, icSigLuvData, icSigMeasurementTag, icSigMediaBlackPointTag, icSigMediaWhitePointTag, icSigNamedColor2Tag, icSigNamedColorClass, icSigOutputClass, icSigOutputResponseTag, icSigPreview0Tag, icSigPreview1Tag, icSigPreview2Tag, icSigProfileDescriptionTag, icSigProfileSequenceDescTag, icSigPs2CRD0Tag, icSigPs2CRD1Tag, icSigPs2CRD2Tag, icSigPs2CRD3Tag, icSigPs2CSATag, icSigPs2RenderingIntentTag, icSigRedColorantTag, icSigRedTRCTag, icSigRgbData, icSigScreeningDescTag, icSigScreeningTag, icSigSpace2CLR, icSigSpace3CLR, icSigSpace4CLR, icSigSpace5CLR, icSigSpace6CLR, icSigSpace7CLR, icSigSpace8CLR, icSigSpace9CLR, icSigSpaceACLR, icSigSpaceBCLR, icSigSpaceCCLR, icSigSpaceDCLR, icSigSpaceECLR, icSigSpaceFCLR, icSigTechnologyTag, icSigUcrBgTag, icSigViewingCondDescTag, icSigViewingConditionsTag, icSigXYZData, icSigYCbCrData, icSigYxyData, icTagReserved, icTagType, icXYZNumberX
Method Summary
float | getGamma(int component) Returns a gamma value representing the tone reproduction curve (TRC) for a particular component.
float[][] | getMatrix() Returns a 3x3 float matrix constructed from the X, Y, and Z components of the redColorantTag, greenColorantTag, and blueColorantTag in the ICC profile, as described above.
float[] | getMediaWhitePoint() Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.
short[] | getTRC(int component) Returns the TRC for a particular component as an array of shorts.
Methods inherited from class java.awt.color.ICC_Profile
finalize, getColorSpaceType, getData, getData, getInstance, getInstance, getInstance, getInstance, getMajorVersion, getMinorVersion, getNumComponents, getPCSType, getProfileClass, readResolve, setData, write, write
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

REDCOMPONENT

public static final int REDCOMPONENT
To request a gamma value or TRC for the red component.

GREENCOMPONENT

public static final int GREENCOMPONENT
To request a gamma value or TRC for the green component.

BLUECOMPONENT

public static final int BLUECOMPONENT
To request a gamma value or TRC for the blue component.
Method Detail

getMediaWhitePoint

public float[] getMediaWhitePoint()
Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.

getMatrix

public float[][] getMatrix()
Returns a 3x3 float matrix constructed from the X, Y, and Z components of the redColorantTag, greenColorantTag, and blueColorantTag in the ICC profile, as described above. This matrix can be used for color transforms in the forward direction of the profile, i.e. from the profile color space to the CIEXYZ PCS.

getGamma

public float getGamma(int component)
Returns a gamma value representing the tone reproduction curve (TRC) for a particular component. Component must be one of REDCOMPONENT, GREENCOMPONENT, or BLUECOMPONENT. If the profile represents the TRC for the corresponding component as a table rather than a single gamma value, then an exception is thrown. In this case the actual table can be obtained via getTRC(). When using a gamma value, the linear component (R, G, or B) is computed as follows:

                                          gamma
         linearComponent = deviceComponent
Returns:
the gamma value as a float.
Throws:
ProfileDataException - if the profile does not specify the corresponding TRC as a single gamma value.

getTRC

public short[] getTRC(int component)
Returns the TRC for a particular component as an array of shorts. Component must be one of REDCOMPONENT, GREENCOMPONENT, or BLUECOMPONENT. If the profile has specified the corresponding TRC as linear (gamma = 1.0) or as a simple gamma value, this method throws an exception, and the getGamma() method should be used to get the gamma value. Otherwise the short array returned here represents a lookup table where the input component value is conceptually in the range [0.0, 1.0]. Value 0.0 maps to array index 0 and value 1.0 maps to array index length-1. Interpolation may be used to generate output values for input values which do not map exactly to an index in the array. Output values also map linearly to the range [0.0, 1.0]. Value 0.0 is represented by an array value of 0x0000 and value 1.0 by 0xFFFF, i.e. the values are really unsigned short values, although they are returned in a short array.
Returns:
a short array representing the TRC.
Throws:
ProfileDataException - if the profile does not specify the corresponding TRC as a table.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ProfileDataException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.color
Class ProfileDataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.awt.color.ProfileDataException
All Implemented Interfaces:
Serializable
public class ProfileDataException
extends RuntimeException

This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

See Also:
Serialized Form

Constructor Summary
ProfileDataException(String s)
Constructs a ProfileDataException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ProfileDataException

public ProfileDataException(String s)
Constructs a ProfileDataException with the specified detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Color

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Color

java.lang.Object
  |
  +--java.awt.Color
All Implemented Interfaces:
Paint, Serializable, Transparency
Direct Known Subclasses:
ColorUIResource, SystemColor
public class Color
extends Object
implements Paint, Serializable

The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace. Every color has an implicit alpha value of 1.0 or an explicit one provided in the constructor. The alpha value defines the transparency of a color and can be represented by a float value in the range 0.0 - 1.0 or 0 - 255. An alpha value of 1.0 or 255 means that the color is completely opaque and an alpha value of 0 or 0.0 means that the color is completely transparent. When constructing a Color with an explicit alpha or getting the color/alpha components of a Color, the color components are never premultiplied by the alpha component.

The default color space for the Java 2D(tm) API is sRGB, a proposed standard RGB color space. For further information on sRGB, see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .

See Also:
ColorSpace, AlphaComposite, Serialized Form

Field Summary
static Color | black The color black.
static Color | blue The color blue.
static Color | cyan The color cyan.
static Color | darkGray The color dark gray.
static Color | gray The color gray.
static Color | green The color green.
static Color | lightGray The color light gray.
static Color | magenta The color magenta.
static Color | orange The color orange.
static Color | pink The color pink.
static Color | red The color red.
static Color | white The color white.
static Color | yellow The color yellow.
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
Color(ColorSpace cspace, float[] components, float alpha)
Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha.
Color(float r, float g, float b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0).
Color(float r, float g, float b, float a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
Color(int rgb)
Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
Color(int rgba, boolean hasalpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
Color(int r, int g, int b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255).
Color(int r, int g, int b, int a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
Method Summary
Color | brighter() Creates a new Color that is a brighter version of this Color.
PaintContext | createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
Color | darker() Creates a new Color that is a darker version of this Color.
static Color | decode(String nm) Converts a String to an integer and returns the specified opaque Color.
boolean | equals(Object obj) Determines whether another object is equal to this Color.
int | getAlpha() Returns the alpha component in the range 0-255.
int | getBlue() Returns the blue component in the range 0-255 in the default sRGB space.
static Color | getColor(String nm) Finds a color in the system properties.
static Color | getColor(String nm, Color v) Finds a color in the system properties.
static Color | getColor(String nm, int v) Finds a color in the system properties.
float[] | getColorComponents(ColorSpace cspace, float[] compArray) Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter.
float[] | getColorComponents(float[] compArray) Returns a float array containing only the color components of the Color, in the ColorSpace of the Color.
ColorSpace | getColorSpace() Returns the ColorSpace of this Color.
float[] | getComponents(ColorSpace cspace, float[] compArray) Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter.
float[] | getComponents(float[] compArray) Returns a float array containing the color and alpha components of the Color, in the ColorSpace of the Color.
int | getGreen() Returns the green component in the range 0-255 in the default sRGB space.
static Color | getHSBColor(float h, float s, float b) Creates a Color object based on the specified values for the HSB color model.
int | getRed() Returns the red component in the range 0-255 in the default sRGB space.
int | getRGB() Returns the RGB value representing the color in the default sRGB ColorModel.
float[] | getRGBColorComponents(float[] compArray) Returns a float array containing only the color components of the Color, in the default sRGB color space.
float[] | getRGBComponents(float[] compArray) Returns a float array containing the color and alpha components of the Color, as represented in the default sRGB color space.
int | getTransparency() Returns the transparency mode for this Color.
int | hashCode() Computes the hash code for this Color.
static int | HSBtoRGB(float hue, float saturation, float brightness) Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.
static float[] | RGBtoHSB(int r, int g, int b, float[] hsbvals) Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.
String | toString() Returns a string representation of this Color.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

white

public static final Color white
The color white. In the default sRGB space.

lightGray

public static final Color lightGray
The color light gray. In the default sRGB space.

gray

public static final Color gray
The color gray. In the default sRGB space.

darkGray

public static final Color darkGray
The color dark gray. In the default sRGB space.

black

public static final Color black
The color black. In the default sRGB space.

red

public static final Color red
The color red. In the default sRGB space.

pink

public static final Color pink
The color pink. In the default sRGB space.

orange

public static final Color orange
The color orange. In the default sRGB space.

yellow

public static final Color yellow
The color yellow. In the default sRGB space.

green

public static final Color green
The color green. In the default sRGB space.

magenta

public static final Color magenta
The color magenta. In the default sRGB space.

cyan

public static final Color cyan
The color cyan. In the default sRGB space.

blue

public static final Color blue
The color blue. In the default sRGB space.
Constructor Detail

Color

public Color(int r,
             int g,
             int b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255). The actual color used in rendering depends on finding the best match given the color space available for a given output device. Alpha is defaulted to 255.
Parameters:
r - the red component
g - the green component
b - the blue component
See Also:
getRed(),
getGreen(),
getBlue(),
getRGB()

Color

public Color(int r,
             int g,
             int b,
             int a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component
See Also:
getRed(),
getGreen(),
getBlue(),
getAlpha(),
getRGB()

Color

public Color(int rgb)
Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. The actual color used in rendering depends on finding the best match given the color space available for a particular output device. Alpha is defaulted to 255.
Parameters:
rgb - the combined RGB components
See Also:
ColorModel.getRGBdefault(),
getRed(),
getGreen(),
getBlue(),
getRGB()

Color

public Color(int rgba,
             boolean hasalpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. If the hasalpha argument is false, alpha is defaulted to 255.
Parameters:
rgba - the combined RGBA components
hasalpha - true if the alpha bits are valid; false otherwise
See Also:
ColorModel.getRGBdefault(),
getRed(),
getGreen(),
getBlue(),
getAlpha(),
getRGB()

Color

public Color(float r,
             float g,
             float b)
Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0). Alpha is defaulted to 1.0. The actual color used in rendering depends on finding the best match given the color space available for a particular output device.
Parameters:
r - the red component
g - the green component
b - the blue component
See Also:
getRed(),
getGreen(),
getBlue(),
getRGB()

Color

public Color(float r,
             float g,
             float b,
             float a)
Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0). The actual color used in rendering depends on finding the best match given the color space available for a particular output device.
Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component
See Also:
getRed(),
getGreen(),
getBlue(),
getAlpha(),
getRGB()

Color

public Color(ColorSpace cspace,
             float[] components,
             float alpha)
Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha. The number of components is determined by the type of the ColorSpace. For example, RGB requires 3 components, but CMYK requires 4 components.
Parameters:
cspace - the ColorSpace to be used to interpret the components
components - an arbitrary number of color components that is compatible with the
alpha - alpha value
Throws:
IllegalArgumentException - if any of the values in the components array or alpha is outside of the range 0.0 to 1.0
See Also:
getComponents(float[]), getColorComponents(float[])
Method Detail

getRed

public int getRed()
Returns the red component in the range 0-255 in the default sRGB space.
Returns:
the red component.
See Also:
getRGB()

getGreen

public int getGreen()
Returns the green component in the range 0-255 in the default sRGB space.
Returns:
the green component.
See Also:
getRGB()

getBlue

public int getBlue()
Returns the blue component in the range 0-255 in the default sRGB space.
Returns:
the blue component.
See Also:
getRGB()

getAlpha

public int getAlpha()
Returns the alpha component in the range 0-255.
Returns:
the alpha component.
See Also:
getRGB()

getRGB

public int getRGB()
Returns the RGB value representing the color in the default sRGB ColorModel. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue).
Returns:
the RGB value of the color in the default sRGB ColorModel.
Since:
JDK1.0
See Also:
ColorModel.getRGBdefault(),
getRed(),
getGreen(),
getBlue()

brighter

public Color brighter()
Creates a new Color that is a brighter version of this Color.

This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a brighter version of this Color. Although brighter and darker are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.

Returns:
a new Color object that is a brighter version of this Color.
Since:
JDK1.0
See Also:
darker()

darker

public Color darker()
Creates a new Color that is a darker version of this Color.

This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a darker version of this Color. Although brighter and darker are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.

Returns:
a new Color object that is a darker version of this Color.
Since:
JDK1.0
See Also:
brighter()

hashCode

public int hashCode()
Computes the hash code for this Color.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
Since:
JDK1.0

equals

public boolean equals(Object obj)
Determines whether another object is equal to this Color.

The result is true if and only if the argument is not null and is a Color object that has the same red, green, and blue values as this object.

Overrides:
equals in class Object
Parameters:
obj - the object to test for equality with this Color
Returns:
true if the objects are the same; false otherwise.
Since:
JDK1.0

toString

public String toString()
Returns a string representation of this Color. This method is intended to be used only for debugging purposes. The content and format of the returned string might vary between implementations. The returned string might be empty but cannot be null.
Overrides:
toString in class Object
Returns:
a string representation of this Color.

decode

public static Color decode(String nm)
                    throws NumberFormatException
Converts a String to an integer and returns the specified opaque Color. This method handles string formats that are used to represent octal and hexidecimal numbers.
Parameters:
nm - a String that represents an opaque color as a 24-bit integer
Returns:
the new Color object.
Throws:
NumberFormatException - if the specified string cannot be interpreted as a decimal, octal, or hexidecimal integer.
Since:
JDK1.1
See Also:
Integer.decode(java.lang.String)

getColor

public static Color getColor(String nm)
Finds a color in the system properties.

The argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or could not be parsed as an integer then null is returned.

Parameters:
nm - the name of the color property
Returns:
the Color converted from the system property.
Since:
JDK1.0
See Also:
System.getProperty(java.lang.String),
Integer.getInteger(java.lang.String),
Color(int)

getColor

public static Color getColor(String nm,
                             Color v)
Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or cannot be parsed as an integer then the Color specified by the second argument is returned instead.

Parameters:
nm - the name of the color property
v - the default Color
Returns:
the Color converted from the system property, or the specified Color.
Since:
JDK1.0
See Also:
System.getProperty(java.lang.String),
Integer.getInteger(java.lang.String),
Color(int)

getColor

public static Color getColor(String nm,
                             int v)
Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or could not be parsed as an integer then the integer value v is used instead, and is converted to a Color object.

Parameters:
nm - the name of the color property
v - the default color value, as an integer
Returns:
the Color converted from the system property or the Color converted from the specified integer.
Since:
JDK1.0
See Also:
System.getProperty(java.lang.String),
Integer.getInteger(java.lang.String),
Color(int)

HSBtoRGB

public static int HSBtoRGB(float hue,
                           float saturation,
                           float brightness)
Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.

The saturation and brightness components should be floating-point values between zero and one (numbers in the range 0.0-1.0). The hue component can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0 and 1. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.

The integer that is returned by HSBtoRGB encodes the value of a color in bits 0-23 of an integer value that is the same format used by the method getRGB. This integer can be supplied as an argument to the Color constructor that takes a single integer argument.

Parameters:
hue - the hue component of the color
saturation - the saturation of the color
brightness - the brightness of the color
Returns:
the RGB value of the color with the indicated hue, saturation, and brightness.
Since:
JDK1.0
See Also:
getRGB(), Color(int), ColorModel.getRGBdefault()

RGBtoHSB

public static float[] RGBtoHSB(int r,
                               int g,
                               int b,
                               float[] hsbvals)
Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.

If the hsbvals argument is null, then a new array is allocated to return the result. Otherwise, the method returns the array hsbvals, with the values put into that array.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color
hsbvals - the array used to return the three HSB values, or null
Returns:
an array of three elements containing the hue, saturation, and brightness (in that order), of the color with the indicated red, green, and blue components.
Since:
JDK1.0
See Also:
getRGB(), Color(int), ColorModel.getRGBdefault()

getHSBColor

public static Color getHSBColor(float h,
                                float s,
                                float b)
Creates a Color object based on the specified values for the HSB color model.

The s and b components should be floating-point values between zero and one (numbers in the range 0.0-1.0). The h component can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0 and 1. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.

Parameters:
h - the hue component
s - the saturation of the color
b - the brightness of the color
Returns:
a Color object with the specified hue, saturation, and brightness.
Since:
JDK1.0

getRGBComponents

public float[] getRGBComponents(float[] compArray)
Returns a float array containing the color and alpha components of the Color, as represented in the default sRGB color space. If compArray is null, an array of length 4 is created for the return value. Otherwise, compArray must have length 4 or greater, and it is filled in with the components and returned.
Parameters:
compArray - an array that this method fills with color and alpha components and returns
Returns:
the RGBA components in a float array.

getRGBColorComponents

public float[] getRGBColorComponents(float[] compArray)
Returns a float array containing only the color components of the Color, in the default sRGB color space. If compArray is null, an array of length 3 is created for the return value. Otherwise, compArray must have length 3 or greater, and it is filled in with the components and returned.
Parameters:
compArray - an array that this method fills with color components and returns
Returns:
the RGB components in a float array.

getComponents

public float[] getComponents(float[] compArray)
Returns a float array containing the color and alpha components of the Color, in the ColorSpace of the Color. If compArray is null, an array with length equal to the number of components in the associated ColorSpace plus one is created for the return value. Otherwise, compArray must have at least this length and it is filled in with the components and returned.
Parameters:
compArray - an array that this method fills with the color and alpha components of this Color in its ColorSpace and returns
Returns:
the color and alpha components in a float array.

getColorComponents

public float[] getColorComponents(float[] compArray)
Returns a float array containing only the color components of the Color, in the ColorSpace of the Color. If compArray is null, an array with length equal to the number of components in the associated ColorSpace is created for the return value. Otherwise, compArray must have at least this length and it is filled in with the components and returned.
Parameters:
compArray - an array that this method fills with the color components of this Color in its ColorSpace and returns
Returns:
the color components in a float array.

getComponents

public float[] getComponents(ColorSpace cspace,
                             float[] compArray)
Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter. If compArray is null, an array with length equal to the number of components in cspace plus one is created for the return value. Otherwise, compArray must have at least this length, and it is filled in with the components and returned.
Parameters:
cspace - a specified ColorSpace
compArray - an array that this method fills with the color and alpha components of this Color in the specified ColorSpace and returns
Returns:
the color and alpha components in a float array.

getColorComponents

public float[] getColorComponents(ColorSpace cspace,
                                  float[] compArray)
Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter. If compArray is null, an array with length equal to the number of components in cspace is created for the return value. Otherwise, compArray must have at least this length, and it is filled in with the components and returned.
Parameters:
cspace - a specified ColorSpace
compArray - an array that this method fills with the color components of this Color in the specified ColorSpace
Returns:
the color components in a float array.

getColorSpace

public ColorSpace getColorSpace()
Returns the ColorSpace of this Color.
Returns:
this Color object's ColorSpace.

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle r,
                                  Rectangle2D r2d,
                                  AffineTransform xform,
                                  RenderingHints hints)
Creates and returns a PaintContext used to generate a solid color pattern. This enables a Color object to be used as an argument to any method requiring an object implementing the Paint interface. The same PaintContext is returned, regardless of whether or not r, r2d, xform, or hints are null.
Specified by:
createContext in interface Paint
Parameters:
cm - the specified ColorModel
r - the specified Rectangle
r2d - the specified Rectangle2D
xform - the specified AffineTransform
hints - the specified RenderingHints
Returns:
a PaintContext that is used to generate a solid color pattern.
See Also:
Paint, PaintContext, Graphics2D.setPaint(java.awt.Paint)

getTransparency

public int getTransparency()
Returns the transparency mode for this Color. This is required to implement the Paint interface.
Specified by:
getTransparency in interface Transparency
Returns:
this Color object's transparency mode.
See Also:
Paint, Transparency, createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ColorType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes.ColorType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.PageAttributes.ColorType
Enclosing class:
PageAttributes
public static final class PageAttributes.ColorType
extends java.awt.AttributeValue

A type-safe enumeration of possible color states.

Field Summary
static PageAttributes.ColorType | COLOR The ColorType instance to use for specifying color printing.
static PageAttributes.ColorType | MONOCHROME The ColorType instance to use for specifying monochrome printing.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

COLOR

public static final PageAttributes.ColorType COLOR
The ColorType instance to use for specifying color printing.

MONOCHROME

public static final PageAttributes.ColorType MONOCHROME
The ColorType instance to use for specifying monochrome printing.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Component

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Component

java.lang.Object
  |
  +--java.awt.Component
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Box.Filler, Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent
public abstract class Component
extends Object
implements ImageObserver, MenuContainer, Serializable

A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user. Examples of components are the buttons, checkboxes, and scrollbars of a typical graphical user interface.

The Component class is the abstract superclass of the nonmenu-related Abstract Window Toolkit components. Class Component can also be extended directly to create a lightweight component. A lightweight component is a component that is not associated with a native opaque window.

See Also:
Serialized Form

Inner Class Summary
protected  class Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Field Summary
static float | BOTTOM_ALIGNMENT Ease-of-use constant for getAlignmentY.
static float | CENTER_ALIGNMENT Ease-of-use constant for getAlignmentY and getAlignmentX.
static float | LEFT_ALIGNMENT Ease-of-use constant for getAlignmentX.
static float | RIGHT_ALIGNMENT Ease-of-use constant for getAlignmentX.
static float | TOP_ALIGNMENT Ease-of-use constant for getAlignmentY().
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
protected Component()
Constructs a new component.
Method Summary
 boolean action(Event evt, Object what)
Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
 void add(PopupMenu popup)
Adds the specified popup menu to the component.
 void addComponentListener(ComponentListener l)
Adds the specified component listener to receive component events from this component.
 void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component when this component gains input focus.
 void addHierarchyBoundsListener(HierarchyBoundsListener l)
Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
 void addHierarchyListener(HierarchyListener l)
Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
 void addInputMethodListener(InputMethodListener l)
Adds the specified input method listener to receive input method events from this component.
 void addKeyListener(KeyListener l)
Adds the specified key listener to receive key events from this component.
 void addMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
 void addMouseMotionListener(MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this component.
 void addNotify()
Makes this Component displayable by connecting it to a native screen resource.
 void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.
 Rectangle bounds()
Deprecated. As of JDK version 1.1, replaced by getBounds().
 int checkImage(Image image, ImageObserver observer)
Returns the status of the construction of a screen representation of the specified image.
 int checkImage(Image image, int width, int height, ImageObserver observer)
Returns the status of the construction of a screen representation of the specified image.
protected  AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)
Potentially coalesce an event being posted with an existing event.
 boolean contains(int x, int y)
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
 boolean contains(Point p)
Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
 Image createImage(ImageProducer producer)
Creates an image from the specified image producer.
 Image createImage(int width, int height)
Creates an off-screen drawable image to be used for double buffering.
 void deliverEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).
 void disable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
protected  void disableEvents(long eventsToDisable)
Disables the events defined by the specified event mask parameter from being delivered to this component.
 void dispatchEvent(AWTEvent e)
Dispatches an event to this component or one of its sub components.
 void doLayout()
Prompts the layout manager to lay out this component.
 void enable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
 void enable(boolean b)
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
protected  void enableEvents(long eventsToEnable)
Enables the events defined by the specified event mask parameter to be delivered to this component.
 void enableInputMethods(boolean enable)
Enables or disables input method support for this component.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
Support for reporting bound property changes.
 AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this Component
 float getAlignmentX()
Returns the alignment along the x axis.
 float getAlignmentY()
Returns the alignment along the y axis.
 Color getBackground()
Gets the background color of this component.
 Rectangle getBounds()
Gets the bounds of this component in the form of a Rectangle object.
 Rectangle getBounds(Rectangle rv)
Store the bounds of this component into "return value" rv and return rv.
 ColorModel getColorModel()
Gets the instance of ColorModel used to display the component on the output device.
 Component getComponentAt(int x, int y)
Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component.
 Component getComponentAt(Point p)
Returns the component or subcomponent that contains the specified point.
 ComponentOrientation getComponentOrientation()
Retrieve the language-sensitive orientation that is to be used to order the elements or text within this component.
 Cursor getCursor()
Gets the cursor set in the component.
 DropTarget getDropTarget()
Get the DropTarget associated with this Component
 Font getFont()
Gets the font of this component.
 FontMetrics getFontMetrics(Font font)
Gets the font metrics for the specified font.
 Color getForeground()
Gets the foreground color of this component.
 Graphics getGraphics()
Creates a graphics context for this component.
 GraphicsConfiguration getGraphicsConfiguration()
Get the GraphicsConfiguration associated with this Component.
 int getHeight()
Return the current height of this component.
 InputContext getInputContext()
Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
 InputMethodRequests getInputMethodRequests()
Gets the input method request handler which supports requests from input methods for this component.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument.
 Locale getLocale()
Gets the locale of this component.
 Point getLocation()
Gets the location of this component in the form of a point specifying the component's top-left corner.
 Point getLocation(Point rv)
Store the x,y origin of this component into "return value" rv and return rv.
 Point getLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
 Dimension getMaximumSize()
Gets the maximum size of this component.
 Dimension getMinimumSize()
Gets the mininimum size of this component.
 String getName()
Gets the name of the component.
 Container getParent()
Gets the parent of this component.
 java.awt.peer.ComponentPeer getPeer()
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable().
 Dimension getPreferredSize()
Gets the preferred size of this component.
 Dimension getSize()
Returns the size of this component in the form of a Dimension object.
 Dimension getSize(Dimension rv)
Store the width/height of this component into "return value" rv and return rv.
 Toolkit getToolkit()
Gets the toolkit of this component.
 Object getTreeLock()
Gets the locking object for AWT component-tree and layout Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
 int getWidth()
Return the current width of this component.
 int getX()
Return the current x coordinate of the components origin.
 int getY()
Return the current y coordinate of the components origin.
 boolean gotFocus(Event evt, Object what)
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
 boolean handleEvent(Event evt)
Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
 boolean hasFocus()
Returns true if this Component has the keyboard focus.
 void hide()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
 boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
Repaints the component when the image has changed.
 boolean inside(int x, int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
 void invalidate()
Invalidates this component.
 boolean isDisplayable()
Determines whether this component is displayable.
 boolean isDoubleBuffered()
Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later.
 boolean isEnabled()
Determines whether this component is enabled.
 boolean isFocusTraversable()
Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
 boolean isLightweight()
A lightweight component doesn't have a native toolkit peer.
 boolean isOpaque()
Returns true if this component is completely opaque, returns false by default.
 boolean isShowing()
Determines whether this component is showing on screen.
 boolean isValid()
Determines whether this component is valid.
 boolean isVisible()
Determines whether this component should be visible when its parent is visible.
 boolean keyDown(Event evt, int key)
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
 boolean keyUp(Event evt, int key)
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
 void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().
 void list()
Prints a listing of this component to the standard system output stream System.out.
 void list(PrintStream out)
Prints a listing of this component to the specified output stream.
 void list(PrintStream out, int indent)
Prints out a list, starting at the specified indention, to the specified print stream.
 void list(PrintWriter out)
Prints a listing to the specified print writer.
 void list(PrintWriter out, int indent)
Prints out a list, starting at the specified indention, to the specified print writer.
 Component locate(int x, int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Point location()
Deprecated. As of JDK version 1.1, replaced by getLocation().
 boolean lostFocus(Event evt, Object what)
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
 Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 boolean mouseDown(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
 boolean mouseDrag(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
 boolean mouseEnter(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
 boolean mouseExit(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
 boolean mouseMove(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
 boolean mouseUp(Event evt, int x, int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
 void move(int x, int y)
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
 void nextFocus()
Deprecated. As of JDK version 1.1, replaced by transferFocus().
 void paint(Graphics g)
Paints this component.
 void paintAll(Graphics g)
Paints this component and all of its subcomponents.
protected  String paramString()
Returns a string representing the state of this component.
 boolean postEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
 Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 boolean prepareImage(Image image, ImageObserver observer)
Prepares an image for rendering on this component.
 boolean prepareImage(Image image, int width, int height, ImageObserver observer)
Prepares an image for rendering on this component at the specified width and height.
 void print(Graphics g)
Prints this component.
 void printAll(Graphics g)
Prints this component and all of its subcomponents.
protected  void processComponentEvent(ComponentEvent e)
Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
protected  void processEvent(AWTEvent e)
Processes events occurring on this component.
protected  void processFocusEvent(FocusEvent e)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected  void processHierarchyBoundsEvent(HierarchyEvent e)
Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
protected  void processHierarchyEvent(HierarchyEvent e)
Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
protected  void processInputMethodEvent(InputMethodEvent e)
Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
protected  void processKeyEvent(KeyEvent e)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
protected  void processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
protected  void processMouseMotionEvent(MouseEvent e)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
 void remove(MenuComponent popup)
Removes the specified popup menu from the component.
 void removeComponentListener(ComponentListener l)
Removes the specified component listener so that it no longer receives component events from this component.
 void removeFocusListener(FocusListener l)
Removes the specified focus listener so that it no longer receives focus events from this component.
 void removeHierarchyBoundsListener(HierarchyBoundsListener l)
Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
 void removeHierarchyListener(HierarchyListener l)
Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
 void removeInputMethodListener(InputMethodListener l)
Removes the specified input method listener so that it no longer receives input method events from this component.
 void removeKeyListener(KeyListener l)
Removes the specified key listener so that it no longer receives key events from this component.
 void removeMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component.
 void removeMouseMotionListener(MouseMotionListener l)
Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
 void removeNotify()
Makes this Component undisplayable by destroying it native screen resource.
 void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
 void repaint()
Repaints this component.
 void repaint(int x, int y, int width, int height)
Repaints the specified rectangle of this component.
 void repaint(long tm)
Repaints the component.
 void repaint(long tm, int x, int y, int width, int height)
Repaints the specified rectangle of this component within tm milliseconds.
 void requestFocus()
Requests that this component get the input focus.
 void reshape(int x, int y, int width, int height)
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
 void resize(Dimension d)
Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
 void resize(int width, int height)
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
 void setBackground(Color c)
Sets the background color of this component.
 void setBounds(int x, int y, int width, int height)
Moves and resizes this component.
 void setBounds(Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r.
 void setComponentOrientation(ComponentOrientation o)
Set the language-sensitive orientation that is to be used to order the elements or text within this component.
 void setCursor(Cursor cursor)
Sets the cursor image to the specified cursor.
 void setDropTarget(DropTarget dt)
Associate a DropTarget with this Component.
 void setEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b.
 void setFont(Font f)
Sets the font of this component.
 void setForeground(Color c)
Sets the foreground color of this component.
 void setLocale(Locale l)
Sets the locale of this component.
 void setLocation(int x, int y)
Moves this component to a new location.
 void setLocation(Point p)
Moves this component to a new location.
 void setName(String name)
Sets the name of the component to the specified string.
 void setSize(Dimension d)
Resizes this component so that it has width d.width and height d.height.
 void setSize(int width, int height)
Resizes this component so that it has width width and height.
 void setVisible(boolean b)
Shows or hides this component depending on the value of parameter b.
 void show()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
 void show(boolean b)
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
 Dimension size()
Deprecated. As of JDK version 1.1, replaced by getSize().
 String toString()
Returns a string representation of this component and its values.
 void transferFocus()
Transfers the focus to the next component.
 void update(Graphics g)
Updates this component.
 void validate()
Ensures that this component has a valid layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

TOP_ALIGNMENT

public static final float TOP_ALIGNMENT
Ease-of-use constant for getAlignmentY(). Specifies an alignment to the top of the component.
See Also:
getAlignmentY()

CENTER_ALIGNMENT

public static final float CENTER_ALIGNMENT
Ease-of-use constant for getAlignmentY and getAlignmentX. Specifies an alignment to the center of the component
See Also:
getAlignmentX(), getAlignmentY()

BOTTOM_ALIGNMENT

public static final float BOTTOM_ALIGNMENT
Ease-of-use constant for getAlignmentY. Specifies an alignment to the bottom of the component.
See Also:
getAlignmentY()

LEFT_ALIGNMENT

public static final float LEFT_ALIGNMENT
Ease-of-use constant for getAlignmentX. Specifies an alignment to the left side of the component.
See Also:
getAlignmentX()

RIGHT_ALIGNMENT

public static final float RIGHT_ALIGNMENT
Ease-of-use constant for getAlignmentX. Specifies an alignment to the right side of the component.
See Also:
getAlignmentX()
Constructor Detail

Component

protected Component()
Constructs a new component. Class Component can be extended directly to create a lightweight component that does not utilize an opaque native window. A lightweight component must be hosted by a native container somewhere higher up in the component tree (for example, by a Frame object).
Method Detail

getName

public String getName()
Gets the name of the component.
Returns:
This component's name.
Since:
JDK1.1
See Also:
setName(java.lang.String)

setName

public void setName(String name)
Sets the name of the component to the specified string.
Parameters:
name - The string that is to be this component's name.
Since:
JDK1.1
See Also:
getName()

getParent

public Container getParent()
Gets the parent of this component.
Returns:
The parent container of this component.
Since:
JDK1.0

getPeer

public java.awt.peer.ComponentPeer getPeer()
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable().

setDropTarget

public void setDropTarget(DropTarget dt)
Associate a DropTarget with this Component. The Component will receive drops only if it is enabled.
Parameters:
dt - The DropTarget
See Also:
isEnabled()

getDropTarget

public DropTarget getDropTarget()
Get the DropTarget associated with this Component

getGraphicsConfiguration

public GraphicsConfiguration getGraphicsConfiguration()
Get the GraphicsConfiguration associated with this Component. If the Component has not been assigned a specific GraphicsConfiguration, the GraphicsConfiguration of the Component object's top-level container is returned. If the Component has been created, but not yet added to a Container, this method returns null.
Returns:
the GraphicsConfiguration used by this Component or null
Since:
1.3

getTreeLock

public final Object getTreeLock()
Gets the locking object for AWT component-tree and layout Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
Returns:
This component's locking object.

getToolkit

public Toolkit getToolkit()
Gets the toolkit of this component. Note that the frame that contains a component controls which toolkit is used by that component. Therefore if the component is moved from one frame to another, the toolkit it uses may change.
Returns:
The toolkit of this component.
Since:
JDK1.0

isValid

public boolean isValid()
Determines whether this component is valid. A component is valid when it is correctly sized and positioned within its parent container and all its children are also valid. Components are invalidated when they are first shown on the screen.
Returns:
true if the component is valid; false otherwise.
Since:
JDK1.0
See Also:
validate(), invalidate()

isDisplayable

public boolean isDisplayable()
Determines whether this component is displayable. A component is displayable when it is connected to a native screen resource.

A component is made displayable either when it is added to a displayable containment hierarchy or when its containment hierarchy is made displayable. A containment hierarchy is made displayable when its ancestor window is either packed or made visible.

A component is made undisplayable either when it is removed from a displayable containment hierarchy or when its containment hierarchy is made undisplayable. A containment hierarchy is made undisplayable when its ancestor window is disposed.

Returns:
true if the component is displayable; false otherwise.
Since:
1.2
See Also:
Container.add(java.awt.Component),
Window.pack(),
Window.show(),
Container.remove(java.awt.Component),
Window.dispose()

isVisible

public boolean isVisible()
Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.
Returns:
true if the component is visible; false otherwise.
Since:
JDK1.0
See Also:
setVisible(boolean)

isShowing

public boolean isShowing()
Determines whether this component is showing on screen. This means that the component must be visible, and it must be in a container that is visible and showing.
Returns:
true if the component is showing; false otherwise.
Since:
JDK1.0
See Also:
setVisible(boolean)

isEnabled

public boolean isEnabled()
Determines whether this component is enabled. An enabled component can respond to user input and generate events. Components are enabled initially by default. A component may be enabled or disabled by calling its setEnabled method.
Returns:
true if the component is enabled; false otherwise.
Since:
JDK1.0
See Also:
setEnabled(boolean)

setEnabled

public void setEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b. An enabled component can respond to user input and generate events. Components are enabled initially by default.
Parameters:
b - If true, this component is enabled; otherwise this component is disabled.
Since:
JDK1.1
See Also:
isEnabled()

enable

public void enable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

enable

public void enable(boolean b)
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

disable

public void disable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

isDoubleBuffered

public boolean isDoubleBuffered()
Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later. Component subclasses that support double buffering should override this method to return true if double buffering is enabled.
Returns:
false by default

enableInputMethods

public void enableInputMethods(boolean enable)
Enables or disables input method support for this component. If input method support is enabled and the component also processes key events, incoming events are offered to the current input method and will only be processed by the component or dispatched to its listeners if the input method does not consume them. By default, input method support is enabled.
Parameters:
enable - true to enable, false to disable.
Since:
1.2
See Also:
processKeyEvent(java.awt.event.KeyEvent)

setVisible

public void setVisible(boolean b)
Shows or hides this component depending on the value of parameter b.
Parameters:
b - If true, shows this component; otherwise, hides this component.
Since:
JDK1.1
See Also:
isVisible()

show

public void show()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).

show

public void show(boolean b)
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).

hide

public void hide()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).

getForeground

public Color getForeground()
Gets the foreground color of this component.
Returns:
This component's foreground color. If this component does not have a foreground color, the foreground color of its parent is returned.
Since:
JDK1.0
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(Color c)
Sets the foreground color of this component.
Parameters:
c - The color to become this component's foreground color. If this parameter is null then this component will inherit the foreground color of its parent.
Since:
JDK1.0
See Also:
getForeground()

getBackground

public Color getBackground()
Gets the background color of this component.
Returns:
This component's background color. If this component does not have a background color, the background color of its parent is returned.
Since:
JDK1.0
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(Color c)
Sets the background color of this component.
Parameters:
c - The color to become this component's color. If this parameter is null then this component will inherit the background color of its parent. background color.
Since:
JDK1.0
See Also:
getBackground()

getFont

public Font getFont()
Gets the font of this component.
Specified by:
getFont in interface MenuContainer
Returns:
This component's font. If a font has not been set for this component, the font of its parent is returned.
Since:
JDK1.0
See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font f)
Sets the font of this component.
Parameters:
f - The font to become this component's font. If this parameter is null then this component will inherit the font of its parent.
Since:
JDK1.0
See Also:
getFont()

getLocale

public Locale getLocale()
Gets the locale of this component.
Returns:
This component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.
Since:
JDK1.1
See Also:
setLocale(java.util.Locale)

setLocale

public void setLocale(Locale l)
Sets the locale of this component.
Parameters:
l - The locale to become this component's locale.
Since:
JDK1.1
See Also:
getLocale()

getColorModel

public ColorModel getColorModel()
Gets the instance of ColorModel used to display the component on the output device.
Returns:
The color model used by this component.
Since:
JDK1.0
See Also:
ColorModel, ComponentPeer.getColorModel(), Toolkit.getColorModel()

getLocation

public Point getLocation()
Gets the location of this component in the form of a point specifying the component's top-left corner. The location will be relative to the parent's coordinate space.

Due to the asynchronous nature of native event handling, this method can return outdated values (for instance, after several calls of setLocation() in rapid succession). For this reason, the recommended method of obtaining a Component's position is within java.awt.event.ComponentListener.componentMoved(), which is called after the operating system has finished moving the Component.

Returns:
An instance of Point representing the top-left corner of the component's bounds in the coordinate space of the component's parent.
Since:
JDK1.1
See Also:
setLocation(int, int), getLocationOnScreen()

getLocationOnScreen

public Point getLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
Returns:
An instance of Point representing the top-left corner of the component's bounds in the coordinate space of the screen.
See Also:
setLocation(int, int), getLocation()

location

public Point location()
Deprecated. As of JDK version 1.1, replaced by getLocation().

setLocation

public void setLocation(int x,
                        int y)
Moves this component to a new location. The top-left corner of the new location is specified by the x and y parameters in the coordinate space of this component's parent.
Parameters:
x - The x-coordinate of the new location's top-left corner in the parent's coordinate space.
y - The y-coordinate of the new location's top-left corner in the parent's coordinate space.
Since:
JDK1.1
See Also:
getLocation(), setBounds(int, int, int, int)

move

public void move(int x,
                 int y)
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).

setLocation

public void setLocation(Point p)
Moves this component to a new location. The top-left corner of the new location is specified by point p. Point p is given in the parent's coordinate space.
Parameters:
p - The point defining the top-left corner of the new location, given in the coordinate space of this component's parent.
Since:
JDK1.1
See Also:
getLocation(), setBounds(int, int, int, int)

getSize

public Dimension getSize()
Returns the size of this component in the form of a Dimension object. The height field of the Dimension object contains this component's height, and the width field of the Dimension object contains this component's width.
Returns:
A Dimension object that indicates the size of this component.
Since:
JDK1.1
See Also:
setSize(int, int)

size

public Dimension size()
Deprecated. As of JDK version 1.1, replaced by getSize().

setSize

public void setSize(int width,
                    int height)
Resizes this component so that it has width width and height.
Parameters:
width - The new width of this component in pixels.
height - The new height of this component in pixels.
Since:
JDK1.1
See Also:
getSize(), setBounds(int, int, int, int)

resize

public void resize(int width,
                   int height)
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).

setSize

public void setSize(Dimension d)
Resizes this component so that it has width d.width and height d.height.
Parameters:
d - The dimension specifying the new size of this component.
Since:
JDK1.1
See Also:
setSize(int, int), setBounds(int, int, int, int)

resize

public void resize(Dimension d)
Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).

getBounds

public Rectangle getBounds()
Gets the bounds of this component in the form of a Rectangle object. The bounds specify this component's width, height, and location relative to its parent.
Returns:
A rectangle indicating this component's bounds.
See Also:
setBounds(int, int, int, int),
getLocation(),
getSize()

bounds

public Rectangle bounds()
Deprecated. As of JDK version 1.1, replaced by getBounds().

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.
Parameters:
x - The new x-coordinate of this component.
y - The new y-coordinate of this component.
width - The new width of this component.
height - The new height of this component.
See Also:
getBounds(),
setLocation(int, int),
setLocation(java.awt.Point),
setSize(int, int),
setSize(java.awt.Dimension)

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).

setBounds

public void setBounds(Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r. This component's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height
Parameters:
r - The new bounding rectangle for this component.
Since:
JDK1.1
See Also:
getBounds(),
setLocation(int, int),
setLocation(java.awt.Point),
setSize(int, int),
setSize(java.awt.Dimension)

getX

public int getX()
Return the current x coordinate of the components origin. This method is preferable to writing component.getBounds().x, or component.getLocation().x because it doesn't cause any heap allocations.
Returns:
the current x coordinate of the components origin.
Since:
1.2

getY

public int getY()
Return the current y coordinate of the components origin. This method is preferable to writing component.getBounds().y, or component.getLocation().y because it doesn't cause any heap allocations.
Returns:
the current y coordinate of the components origin.
Since:
1.2

getWidth

public int getWidth()
Return the current width of this component. This method is preferable to writing component.getBounds().width, or component.getSize().width because it doesn't cause any heap allocations.
Returns:
the current width of this component.
Since:
1.2

getHeight

public int getHeight()
Return the current height of this component. This method is preferable to writing component.getBounds().height, or component.getSize().height because it doesn't cause any heap allocations.
Returns:
the current height of this component.
Since:
1.2

getBounds

public Rectangle getBounds(Rectangle rv)
Store the bounds of this component into "return value" rv and return rv. If rv is null a new Rectangle is allocated. This version of getBounds() is useful if the caller wants to avoid allocating a new Rectangle object on the heap.
Parameters:
rv - the return value, modified to the components bounds
Returns:
rv

getSize

public Dimension getSize(Dimension rv)
Store the width/height of this component into "return value" rv and return rv. If rv is null a new Dimension object is allocated. This version of getSize() is useful if the caller wants to avoid allocating a new Dimension object on the heap.
Parameters:
rv - the return value, modified to the components size
Returns:
rv

getLocation

public Point getLocation(Point rv)
Store the x,y origin of this component into "return value" rv and return rv. If rv is null a new Point is allocated. This version of getLocation() is useful if the caller wants to avoid allocating a new Point object on the heap.
Parameters:
rv - the return value, modified to the components location
Returns:
rv

isOpaque

public boolean isOpaque()
Returns true if this component is completely opaque, returns false by default.

An opaque component paints every pixel within its rectangular region. A non-opaque component paints only some of its pixels, allowing the pixels underneath it to "show through". A component that does not fully paint its pixels therefore provides a degree of transparency. Only lightweight components can be transparent.

Subclasses that guarantee to always completely paint their contents should override this method and return true. All of the "heavyweight" AWT components are opaque.

Returns:
true if this component is completely opaque.
Since:
1.2
See Also:
isLightweight()

isLightweight

public boolean isLightweight()
A lightweight component doesn't have a native toolkit peer. Subclasses of Component and Container, other than the ones defined in this package like Button or Scrollbar, are lightweight. All of the Swing components are lightweights. This method will always return false if this Component is not displayable because it is impossible to determine the weight of an undisplayable Component.
Returns:
true if this component has a lightweight peer; false if it has a native peer or no peer.
Since:
1.2
See Also:
isDisplayable()

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this component.
Returns:
A dimension object indicating this component's preferred size.
See Also:
getMinimumSize(), LayoutManager

preferredSize

public Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

getMinimumSize

public Dimension getMinimumSize()
Gets the mininimum size of this component.
Returns:
A dimension object indicating this component's minimum size.
See Also:
getPreferredSize(), java.awtLayoutManager

minimumSize

public Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

getMaximumSize

public Dimension getMaximumSize()
Gets the maximum size of this component.
Returns:
A dimension object indicating this component's maximum size.
See Also:
getMinimumSize(), getPreferredSize(), LayoutManager

getAlignmentX

public float getAlignmentX()
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

getAlignmentY

public float getAlignmentY()
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

doLayout

public void doLayout()
Prompts the layout manager to lay out this component. This is usually called when the component (more specifically, container) is validated.
See Also:
validate(), LayoutManager

layout

public void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().

validate

public void validate()
Ensures that this component has a valid layout. This method is primarily intended to operate on instances of Container.
Since:
JDK1.0
See Also:
invalidate(), doLayout(), LayoutManager, Container.validate()

invalidate

public void invalidate()
Invalidates this component. This component and all parents above it are marked as needing to be laid out. This method can be called often, so it needs to execute quickly.
Since:
JDK1.0
See Also:
validate(), doLayout(), LayoutManager

getGraphics

public Graphics getGraphics()
Creates a graphics context for this component. This method will return null if this component is currently not displayable.
Returns:
A graphics context for this component, or null if it has none.
Since:
JDK1.0
See Also:
paint(java.awt.Graphics)

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Gets the font metrics for the specified font.
Parameters:
font - The font for which font metrics is to be obtained.
font - the font.
Returns:
The font metrics for font.
Since:
JDK1.0
See Also:
getFont(),
getPeer(),
ComponentPeer.getFontMetrics(java.awt.Font),
Toolkit.getFontMetrics(java.awt.Font)

setCursor

public void setCursor(Cursor cursor)
Sets the cursor image to the specified cursor. This cursor image is displayed when the contains method for this component returns true for the current cursor location, and this Component is visible, displayable, and enabled. Setting the cursor of a Container causes that cursor to be displayed within all of the container's subcomponents, except for those that have a non-null cursor.
Parameters:
cursor - One of the constants defined by the Cursor class. If this parameter is null then this component will inherit the cursor of its parent.
Since:
JDK1.1
See Also:
isEnabled(),
isShowing(),
getCursor(),
contains(int, int),
Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String),
Cursor

getCursor

public Cursor getCursor()
Gets the cursor set in the component. If the component does not have a cursor set, the cursor of its parent is returned. If no Cursor is set in the entire hierarchy, Cursor.DEFAULT_CURSOR is returned.
Since:
JDK1.1
See Also:
setCursor(java.awt.Cursor)

paint

public void paint(Graphics g)
Paints this component. This method is called when the contents of the component should be painted in response to the component first being shown or damage needing repair. The clip rectangle in the Graphics parameter will be set to the area which needs to be painted. For performance reasons, Components with zero width or height aren't considered to need painting when they are first shown, and also aren't considered to need repair.
Parameters:
g - The graphics context to use for painting.
Since:
JDK1.0
See Also:
update(java.awt.Graphics)

update

public void update(Graphics g)
Updates this component.

The AWT calls the update method in response to a call to repaintupdate or paint. You can assume that the background is not cleared.

The updatemethod of Component does the following:

  • Clears this component by filling it with the background color.
  • Sets the color of the graphics context to be the foreground color of this component.
  • Calls this component's paint method to completely redraw this component.

The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

Parameters:
g - the specified context to use for updating.
Since:
JDK1.0
See Also:
paint(java.awt.Graphics), repaint()

paintAll

public void paintAll(Graphics g)
Paints this component and all of its subcomponents.

The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

Parameters:
g - the graphics context to use for painting.
Since:
JDK1.0
See Also:
paint(java.awt.Graphics)

repaint

public void repaint()
Repaints this component.

This method causes a call to this component's update method as soon as possible.

Since:
JDK1.0
See Also:
update(java.awt.Graphics)

repaint

public void repaint(long tm)
Repaints the component. This will result in a call to update within tm milliseconds.
Parameters:
tm - maximum time in milliseconds before update
Since:
JDK1.0
See Also:
paint(java.awt.Graphics), update(java.awt.Graphics)

repaint

public void repaint(int x,
                    int y,
                    int width,
                    int height)
Repaints the specified rectangle of this component.

This method causes a call to this component's update method as soon as possible.

Parameters:
x - the x coordinate.
y - the y coordinate.
width - the width.
height - the height.
Since:
JDK1.0
See Also:
update(java.awt.Graphics)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Repaints the specified rectangle of this component within tm milliseconds.

This method causes a call to this component's update method.

Parameters:
tm - maximum time in milliseconds before update.
x - the x coordinate.
y - the y coordinate.
width - the width.
height - the height.
Since:
JDK1.0
See Also:
update(java.awt.Graphics)

print

public void print(Graphics g)
Prints this component. Applications should override this method for components that must do special processing before being printed or should be printed differently than they are painted.

The default implementation of this method calls the paint method.

The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

Parameters:
g - the graphics context to use for printing.
Since:
JDK1.0
See Also:
paint(java.awt.Graphics)

printAll

public void printAll(Graphics g)
Prints this component and all of its subcomponents.

The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

Parameters:
g - the graphics context to use for printing.
Since:
JDK1.0
See Also:
print(java.awt.Graphics)

imageUpdate

public boolean imageUpdate(Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
Repaints the component when the image has changed. This imageUpdate method of an ImageObserver is called when more information about an image which had been previously requested using an asynchronous routine such as the drawImage method of Graphics becomes available. See the definition of imageUpdate for more information on this method and its arguments.

The imageUpdate method of Component incrementally draws an image on the component as more of the bits of the image are available.

If the system property awt.image.incrementalDraw is missing or has the value true, the image is incrementally drawn, If the system property has any other value, then the image is not drawn until it has been completely loaded.

Also, if incremental drawing is in effect, the value of the system property awt.image.redrawrate is interpreted as an integer to give the maximum redraw rate, in milliseconds. If the system property is missing or cannot be interpreted as an integer, the redraw rate is once every 100ms.

The interpretation of the x, y, width, and height arguments depends on the value of the infoflags argument.

Specified by:
imageUpdate in interface ImageObserver
Parameters:
img - the image being observed.
infoflags - see imageUpdate for more information.
x - the x coordinate.
y - the y coordinate.
w - the width.
h - the height.
Returns:
false if the infoflags indicate that the image is completely loaded; true otherwise.
Since:
JDK1.0
See Also:
ImageObserver, Graphics.drawImage(java.awt.Image, int, int, java.awt.Color, java.awt.image.ImageObserver), Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Graphics.drawImage(java.awt.Image, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver), Graphics.drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

createImage

public Image createImage(ImageProducer producer)
Creates an image from the specified image producer.
Parameters:
producer - the image producer
Returns:
the image produced.
Since:
JDK1.0

createImage

public Image createImage(int width,
                         int height)
Creates an off-screen drawable image to be used for double buffering.
Parameters:
width - the specified width.
height - the specified height.
Returns:
an off-screen drawable image, which can be used for double buffering.
Since:
JDK1.0

prepareImage

public boolean prepareImage(Image image,
                            ImageObserver observer)
Prepares an image for rendering on this component. The image data is downloaded asynchronously in another thread and the appropriate screen representation of the image is generated.
Parameters:
image - the Image for which to prepare a screen representation.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
true if the image has already been fully prepared; false otherwise.
Since:
JDK1.0

prepareImage

public boolean prepareImage(Image image,
                            int width,
                            int height,
                            ImageObserver observer)
Prepares an image for rendering on this component at the specified width and height.

The image data is downloaded asynchronously in another thread, and an appropriately scaled screen representation of the image is generated.

Parameters:
image - the instance of Image for which to prepare a screen representation.
width - the width of the desired screen representation.
height - the height of the desired screen representation.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
true if the image has already been fully prepared; false otherwise.
Since:
JDK1.0
See Also:
ImageObserver

checkImage

public int checkImage(Image image,
                      ImageObserver observer)
Returns the status of the construction of a screen representation of the specified image.

This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

Parameters:
image - the Image object whose status is being checked.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available.
Since:
JDK1.0
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver

checkImage

public int checkImage(Image image,
                      int width,
                      int height,
                      ImageObserver observer)
Returns the status of the construction of a screen representation of the specified image.

This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

The checkImage method of Component calls its peer's checkImage method to calculate the flags. If this component does not yet have a peer, the component's toolkit's checkImage method is called instead.

Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

Parameters:
image - the Image object whose status is being checked.
width - the width of the scaled version whose status is to be checked.
height - the height of the scaled version whose status is to be checked.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available.
Since:
JDK1.0
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver

contains

public boolean contains(int x,
                        int y)
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
Parameters:
x - the x coordinate of the point.
y - the y coordinate of the point.
Since:
JDK1.1
See Also:
getComponentAt(int, int)

inside

public boolean inside(int x,
                      int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).

contains

public boolean contains(Point p)
Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
Parameters:
p - the point.
Since:
JDK1.1
See Also:
getComponentAt(java.awt.Point)

getComponentAt

public Component getComponentAt(int x,
                                int y)
Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component. This method only looks one level deep. If the point (x, y) is inside a subcomponent that itself has subcomponents, it does not go looking down the subcomponent tree.

The locate method of Component simply returns the component itself if the (x, y) coordinate location is inside its bounding box, and null otherwise.

Parameters:
x - the x coordinate.
y - the y coordinate.
Returns:
the component or subcomponent that contains the (x, y) location; null if the location is outside this component.
Since:
JDK1.0
See Also:
contains(int, int)

locate

public Component locate(int x,
                        int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).

getComponentAt

public Component getComponentAt(Point p)
Returns the component or subcomponent that contains the specified point.
Parameters:
p - the point.
Since:
JDK1.1
See Also:
contains(int, int)

deliverEvent

public void deliverEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).

dispatchEvent

public final void dispatchEvent(AWTEvent e)
Dispatches an event to this component or one of its sub components. Calls processEvent() before returning for 1.1-style events which have been enabled for the Component.
Parameters:
e - the event

postEvent

public boolean postEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).

Specified by:
postEvent in interface MenuContainer

addComponentListener

public void addComponentListener(ComponentListener l)
Adds the specified component listener to receive component events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the component listener.
Since:
JDK1.1
See Also:
ComponentEvent, ComponentListener, removeComponentListener(java.awt.event.ComponentListener)

removeComponentListener

public void removeComponentListener(ComponentListener l)
Removes the specified component listener so that it no longer receives component events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the component listener.
Since:
JDK1.1
See Also:
ComponentEvent, ComponentListener, addComponentListener(java.awt.event.ComponentListener)

addFocusListener

public void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component when this component gains input focus. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the focus listener.
Since:
JDK1.1
See Also:
FocusEvent, FocusListener, removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified focus listener so that it no longer receives focus events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the focus listener.
Since:
JDK1.1
See Also:
FocusEvent, FocusListener, addFocusListener(java.awt.event.FocusListener)

addHierarchyListener

public void addHierarchyListener(HierarchyListener l)
Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyListener, removeHierarchyListener(java.awt.event.HierarchyListener)

removeHierarchyListener

public void removeHierarchyListener(HierarchyListener l)
Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyListener, addHierarchyListener(java.awt.event.HierarchyListener)

addHierarchyBoundsListener

public void addHierarchyBoundsListener(HierarchyBoundsListener l)
Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy bounds listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyBoundsListener, removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)

removeHierarchyBoundsListener

public void removeHierarchyBoundsListener(HierarchyBoundsListener l)
Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy bounds listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyBoundsListener, addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)

addKeyListener

public void addKeyListener(KeyListener l)
Adds the specified key listener to receive key events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the key listener.
Since:
JDK1.1
See Also:
KeyEvent, KeyListener, removeKeyListener(java.awt.event.KeyListener)

removeKeyListener

public void removeKeyListener(KeyListener l)
Removes the specified key listener so that it no longer receives key events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the key listener.
Since:
JDK1.1
See Also:
KeyEvent, KeyListener, addKeyListener(java.awt.event.KeyListener)

addMouseListener

public void addMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse listener.
Since:
JDK1.1
See Also:
MouseEvent, MouseListener, removeMouseListener(java.awt.event.MouseListener)

removeMouseListener

public void removeMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse listener.
Since:
JDK1.1
See Also:
MouseEvent, MouseListener, addMouseListener(java.awt.event.MouseListener)

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse motion listener.
Since:
JDK1.1
See Also:
java.awt.event.MouseMotionEvent, MouseMotionListener, removeMouseMotionListener(java.awt.event.MouseMotionListener)

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener l)
Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse motion listener.
Since:
JDK1.1
See Also:
java.awt.event.MouseMotionEvent, MouseMotionListener, addMouseMotionListener(java.awt.event.MouseMotionListener)

addInputMethodListener

public void addInputMethodListener(InputMethodListener l)
Adds the specified input method listener to receive input method events from this component. A component will only receive input method events from input methods if it also overrides getInputMethodRequests to return an InputMethodRequests instance. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the input method listener.
Since:
1.2
See Also:
InputMethodEvent, InputMethodListener, removeInputMethodListener(java.awt.event.InputMethodListener), getInputMethodRequests()

removeInputMethodListener

public void removeInputMethodListener(InputMethodListener l)
Removes the specified input method listener so that it no longer receives input method events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the input method listener.
Since:
1.2
See Also:
InputMethodEvent, InputMethodListener, addInputMethodListener(java.awt.event.InputMethodListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the MouseListeners for the given Component c, one would write:
 MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class))
If no such listener list exists, then an empty array is returned.
Parameters:
listenerType - Type of listeners requested. This parameter must be a java.util.EventListener or subclass.
Throws:
ClassCastException - if the listenerType parameter is not a java.util.EventListener or subclass.
Since:
1.3

getInputMethodRequests

public InputMethodRequests getInputMethodRequests()
Gets the input method request handler which supports requests from input methods for this component. A component that supports on-the-spot text input must override this method to return an InputMethodRequests instance. At the same time, it also has to handle input method events.
Returns:
the input method request handler for this component, null by default.
Since:
1.2
See Also:
addInputMethodListener(java.awt.event.InputMethodListener)

getInputContext

public InputContext getInputContext()
Gets the input context used by this component for handling the communication with input methods when text is entered in this component. By default, the input context used for the parent component is returned. Components may override this to return a private input context.
Returns:
The input context used by this component. Null if no context can be determined.
Since:
1.2

enableEvents

protected final void enableEvents(long eventsToEnable)
Enables the events defined by the specified event mask parameter to be delivered to this component.

Event types are automatically enabled when a listener for that event type is added to the component.

This method only needs to be invoked by subclasses of Component which desire to have the specified event types delivered to processEvent regardless of whether or not a listener is registered.

Parameters:
eventsToEnable - the event mask defining the event types.
Since:
JDK1.1
See Also:
processEvent(java.awt.AWTEvent), disableEvents(long)

disableEvents

protected final void disableEvents(long eventsToDisable)
Disables the events defined by the specified event mask parameter from being delivered to this component.
Parameters:
eventsToDisable - the event mask defining the event types
Since:
JDK1.1
See Also:
enableEvents(long)

coalesceEvents

protected AWTEvent coalesceEvents(AWTEvent existingEvent,
                                  AWTEvent newEvent)
Potentially coalesce an event being posted with an existing event. This method is called by EventQueue.postEvent if an event with the same ID as the event to be posted is found in the queue (both events must have this component as their source). This method either returns a coalesced event which replaces the existing event (and the new event is then discarded), or null to indicate that no combining should be done (add the second event to the end of the queue). Either event parameter may be modified and returned, as the other one is discarded unless null is returned.

This implementation of coalesceEvents coalesces two event types: mouse move (and drag) events, and paint (and update) events. For mouse move events the last event is always returned, causing intermediate moves to be discarded. For paint events, the new event is coalesced into a complex RepaintArea in the peer. The new Event is always returned.

Parameters:
existingEvent - the event already on the EventQueue.
newEvent - the event being posted to the EventQueue.
Returns:
a coalesced event, or null indicating that no coalescing was done.

processEvent

protected void processEvent(AWTEvent e)
Processes events occurring on this component. By default this method calls the appropriate process<event type>Event method for the given class of event.
Parameters:
e - the event.
Since:
JDK1.1
See Also:
processComponentEvent(java.awt.event.ComponentEvent),
processFocusEvent(java.awt.event.FocusEvent),
processKeyEvent(java.awt.event.KeyEvent),
processMouseEvent(java.awt.event.MouseEvent),
processMouseMotionEvent(java.awt.event.MouseEvent),
processInputMethodEvent(java.awt.event.InputMethodEvent),
processHierarchyEvent(java.awt.event.HierarchyEvent)

processComponentEvent

protected void processComponentEvent(ComponentEvent e)
Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.

This method is not called unless component events are enabled for this component. Component events are enabled when one of the following occurs:

  • A ComponentListener object is registered via addComponentListener.
  • Component events are enabled via enableEvents.
Parameters:
e - the component event.
Since:
JDK1.1
See Also:
ComponentEvent, ComponentListener, addComponentListener(java.awt.event.ComponentListener), enableEvents(long)

processFocusEvent

protected void processFocusEvent(FocusEvent e)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

This method is not called unless focus events are enabled for this component. Focus events are enabled when one of the following occurs:

  • A FocusListener object is registered via addFocusListener.
  • Focus events are enabled via enableEvents.
Parameters:
e - the focus event.
Since:
JDK1.1
See Also:
FocusEvent, FocusListener, addFocusListener(java.awt.event.FocusListener), enableEvents(long)

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

This method is not called unless key events are enabled for this component. Key events are enabled when one of the following occurs:

  • A KeyListener object is registered via addKeyListener.
  • Key events are enabled via enableEvents.
Parameters:
e - the key event.
Since:
JDK1.1
See Also:
KeyEvent, KeyListener, addKeyListener(java.awt.event.KeyListener), enableEvents(long)

processMouseEvent

protected void processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

This method is not called unless mouse events are enabled for this component. Mouse events are enabled when one of the following occurs:

  • A MouseListener object is registered via addMouseListener.
  • Mouse events are enabled via enableEvents.
Parameters:
e - the mouse event.
Since:
JDK1.1
See Also:
MouseEvent, MouseListener, addMouseListener(java.awt.event.MouseListener), enableEvents(long)

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.

This method is not called unless mouse motion events are enabled for this component. Mouse motion events are enabled when one of the following occurs:

  • A MouseMotionListener object is registered via addMouseMotionListener.
  • Mouse motion events are enabled via enableEvents.
Parameters:
e - the mouse motion event.
Since:
JDK1.1
See Also:
java.awt.event.MouseMotionEvent, MouseMotionListener, addMouseMotionListener(java.awt.event.MouseMotionListener), enableEvents(long)

processInputMethodEvent

protected void processInputMethodEvent(InputMethodEvent e)
Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.

This method is not called unless input method events are enabled for this component. Input method events are enabled when one of the following occurs:

  • An InputMethodListener object is registered via addInputMethodListener.
  • Input method events are enabled via enableEvents.
Parameters:
e - the input method event
Since:
1.2
See Also:
InputMethodEvent, InputMethodListener, addInputMethodListener(java.awt.event.InputMethodListener), enableEvents(long)

processHierarchyEvent

protected void processHierarchyEvent(HierarchyEvent e)
Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.

This method is not called unless hierarchy events are enabled for this component. Hierarchy events are enabled when one of the following occurs:

  • An HierarchyListener object is registered via addHierarchyListener.
  • Hierarchy events are enabled via enableEvents.
Parameters:
e - the hierarchy event
Since:
1.3
See Also:
HierarchyEvent, HierarchyListener, addHierarchyListener(java.awt.event.HierarchyListener), enableEvents(long)

processHierarchyBoundsEvent

protected void processHierarchyBoundsEvent(HierarchyEvent e)
Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.

This method is not called unless hierarchy bounds events are enabled for this component. Hierarchy bounds events are enabled when one of the following occurs:

  • An HierarchyBoundsListener object is registered via addHierarchyBoundsListener.
  • Hierarchy bounds events are enabled via enableEvents.
Parameters:
e - the hierarchy event
Since:
1.3
See Also:
HierarchyEvent, HierarchyBoundsListener, addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), enableEvents(long)

handleEvent

public boolean handleEvent(Event evt)
Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).

mouseDown

public boolean mouseDown(Event evt,
                         int x,
                         int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).

mouseDrag

public boolean mouseDrag(Event evt,
                         int x,
                         int y)
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).

mouseUp

public boolean mouseUp(Event evt,
                       int x,
                       int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).

mouseMove

public boolean mouseMove(Event evt,
                         int x,
                         int y)
Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).

mouseEnter

public boolean mouseEnter(Event evt,
                          int x,
                          int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).

mouseExit

public boolean mouseExit(Event evt,
                         int x,
                         int y)
Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).

keyDown

public boolean keyDown(Event evt,
                       int key)
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).

keyUp

public boolean keyUp(Event evt,
                     int key)
Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).

action

public boolean action(Event evt,
                      Object what)
Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.

addNotify

public void addNotify()
Makes this Component displayable by connecting it to a native screen resource. This method is called internally by the toolkit and should not be called directly by programs.
Since:
JDK1.0
See Also:
isDisplayable(), removeNotify()

removeNotify

public void removeNotify()
Makes this Component undisplayable by destroying it native screen resource. This method is called by the toolkit internally and should not be called directly by programs.
Since:
JDK1.0
See Also:
isDisplayable(), addNotify()

gotFocus

public boolean gotFocus(Event evt,
                        Object what)
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).

lostFocus

public boolean lostFocus(Event evt,
                         Object what)
Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).

isFocusTraversable

public boolean isFocusTraversable()
Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal. If this method returns "false", this component may still request the keyboard focus using requestFocus(), but it will not automatically be assigned focus during tab traversal.
Returns:
true if this component is focus-traverable; false otherwise.
Since:
JDK1.1

requestFocus

public void requestFocus()
Requests that this component get the input focus. The component must be visible on the screen for this request to be granted
Since:
JDK1.0
See Also:
FocusEvent,
addFocusListener(java.awt.event.FocusListener),
processFocusEvent(java.awt.event.FocusEvent),
isFocusTraversable()

transferFocus

public void transferFocus()
Transfers the focus to the next component.
Since:
JDK1.1s
See Also:
requestFocus()

nextFocus

public void nextFocus()
Deprecated. As of JDK version 1.1, replaced by transferFocus().

hasFocus

public boolean hasFocus()
Returns true if this Component has the keyboard focus.
Returns:
true if this Component has the keyboard focus.
Since:
1.2

add

public void add(PopupMenu popup)
Adds the specified popup menu to the component.
Parameters:
popup - the popup menu to be added to the component.
Since:
JDK1.1
See Also:
remove(java.awt.MenuComponent)

remove

public void remove(MenuComponent popup)
Removes the specified popup menu from the component.
Specified by:
remove in interface MenuContainer
Parameters:
popup - the popup menu to be removed.
Since:
JDK1.1
See Also:
add(java.awt.PopupMenu)

paramString

protected String paramString()
Returns a string representing the state of this component. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Returns:
a string representation of this component's state.
Since:
JDK1.0

toString

public String toString()
Returns a string representation of this component and its values.
Overrides:
toString in class Object
Returns:
a string representation of this component.
Since:
JDK1.0

list

public void list()
Prints a listing of this component to the standard system output stream System.out.
Since:
JDK1.0
See Also:
System.out

list

public void list(PrintStream out)
Prints a listing of this component to the specified output stream.
Parameters:
out - a print stream.
Since:
JDK1.0

list

public void list(PrintStream out,
                 int indent)
Prints out a list, starting at the specified indention, to the specified print stream.
Parameters:
out - a print stream.
indent - number of spaces to indent.
Since:
JDK1.0
See Also:
PrintStream.println(java.lang.Object)

list

public void list(PrintWriter out)
Prints a listing to the specified print writer.
Parameters:
out - The print writer to print to.
Since:
JDK1.1

list

public void list(PrintWriter out,
                 int indent)
Prints out a list, starting at the specified indention, to the specified print writer.
Parameters:
out - The print writer to print to.
indent - The number of spaces to indent.
Since:
JDK1.1
See Also:
PrintStream.println(java.lang.Object)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit setFont, setBackground, or SetForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener is null, no exception is thrown and no action is performed.
Parameters:
listener - The PropertyChangeListener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. If listener is null, no exception is thrown and no action is performed.
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. If listener is null, no exception is thrown and no action is performed.
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

setComponentOrientation

public void setComponentOrientation(ComponentOrientation o)
Set the language-sensitive orientation that is to be used to order the elements or text within this component. Language-sensitive LayoutManager and Component subclasses will use this property to determine how to lay out and draw components.

At construction time, a component's orientation is set to ComponentOrientation.UNKNOWN, indicating that it has not been specified explicitly. The UNKNOWN orientation behaves the same as ComponentOrientation.LEFT_TO_RIGHT.

To set the orientation of a single component, use this method. To apply a ResourceBundle's orientation to an entire component hierarchy, use java.awt.Window.applyResourceBundle.

See Also:
ComponentOrientation, Window.applyResourceBundle(java.util.ResourceBundle)

getComponentOrientation

public ComponentOrientation getComponentOrientation()
Retrieve the language-sensitive orientation that is to be used to order the elements or text within this component. LayoutManager and Component subclasses that wish to respect orientation should call this method to get the component's orientation before performing layout or drawing.
See Also:
ComponentOrientation

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this Component
Returns:
the AccessibleContext of this Component
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentOrientation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class ComponentOrientation

java.lang.Object
  |
  +--java.awt.ComponentOrientation
All Implemented Interfaces:
Serializable
public final class ComponentOrientation
extends Object
implements Serializable

The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text. It is used to reflect the differences in this ordering between Western alphabets, Middle Eastern (such as Hebrew), and Far Eastern (such as Japanese).

Fundamentally, this governs items (such as characters) which are laid out in lines, with the lines then laid out in a block. This also applies to items in a widget: for example, in a check box where the box is positioned relative to the text.

There are four different orientations used in modern languages as in the following table.

 LT          RT          TL          TR
 A B C       C B A       A D G       G D A
 D E F       F E D       B E H       H E B
 G H I       I H G       C F I       I F C

(In the header, the two-letter abbreviation represents the item direction in the first letter, and the line direction in the second. For example, LT means "items left-to-right, lines top-to-bottom", BL means "items bottom-to-top, lines bottom-to-top", and so on.)

The orientations are:

  • LT - Western Europe (optional for Japanese, Chinese, Korean)
  • RT - Middle East (Arabic, Hebrew)
  • TR - Japanese, Chinese, Korean
  • TL - Mongolian
Components whose view and controller code depends on orientation should use the isLeftToRight() and isHorizontal() methods to determine their behavior. They should not include switch-like code that keys off of the constants, such as:
 if (orientation == LEFT_TO_RIGHT) {
   ...
 } else if (orientation == RIGHT_TO_LEFT) {
   ...
 } else {
   // Oops
 }
This is unsafe, since more constants may be added in the future and since it is not guaranteed that orientation objects will be unique.

See Also:
Serialized Form

Field Summary
static ComponentOrientation | LEFT_TO_RIGHT Items run left to right and lines flow top to bottom Examples: English, French.
static ComponentOrientation | RIGHT_TO_LEFT Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.
static ComponentOrientation | UNKNOWN Indicates that a component's orientation has not been set.
Method Summary
static ComponentOrientation | getOrientation(Locale locale) Return the orientation that is appropriate for the given locale
static ComponentOrientation | getOrientation(ResourceBundle bdl) Return the orientation appropriate for the given ResourceBundle's localization.
boolean | isHorizontal() Are lines horizontal? This will return true for horizontal, left-to-right writing systems such as Roman.
boolean | isLeftToRight() HorizontalLines: Do items run left-to-right? Vertical Lines: Do lines run left-to-right? This will return true for horizontal, left-to-right writing systems such as Roman.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LEFT_TO_RIGHT

public static final ComponentOrientation LEFT_TO_RIGHT
Items run left to right and lines flow top to bottom Examples: English, French.

RIGHT_TO_LEFT

public static final ComponentOrientation RIGHT_TO_LEFT
Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.

UNKNOWN

public static final ComponentOrientation UNKNOWN
Indicates that a component's orientation has not been set. To preserve the behavior of existing applications, isLeftToRight will return true for this value.
Method Detail

isHorizontal

public boolean isHorizontal()
Are lines horizontal? This will return true for horizontal, left-to-right writing systems such as Roman.

isLeftToRight

public boolean isLeftToRight()
HorizontalLines: Do items run left-to-right?
Vertical Lines: Do lines run left-to-right?
This will return true for horizontal, left-to-right writing systems such as Roman.

getOrientation

public static ComponentOrientation getOrientation(Locale locale)
Return the orientation that is appropriate for the given locale
Parameters:
locale - used as a key to look up the orientation in an internal resource bundle.

getOrientation

public static ComponentOrientation getOrientation(ResourceBundle bdl)
Return the orientation appropriate for the given ResourceBundle's localization. Three approaches are tried, inn the following order:
  1. Retrieve a ComponentOrientation object from the ResourceBundle using the string "Orientation" as the key.
  2. Use the ResourceBundle.getLocale to determine the bundle's locale, then return the orientation for that locale.
  3. Return the default locale's orientation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Composite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Composite

All Known Implementing Classes:
AlphaComposite
public interface Composite

The Composite interface, along with CompositeContext, defines the methods to compose a draw primitive with the underlying graphics area. After the Composite is set in the Graphics2D context, it combines a shape, text, or an image being rendered with the colors that have already been rendered according to pre-defined rules. The classes implementing this interface provide the rules and a method to create the context for a particular operation. CompositeContext is an environment used by the compositing operation, which is created by the Graphics2D prior to the start of the operation. CompositeContext contains private information and resources needed for a compositing operation. When the CompositeContext is no longer needed, the Graphics2D object disposes of it in order to reclaim resources allocated for the operation.

Instances of classes implementing Composite must be immutable because the Graphics2D does not clone these objects when they are set as an attribute with the setComposite method or when the Graphics2D object is cloned. This is to avoid undefined rendering behavior of Graphics2D, resulting from the modification of the Composite object after it has been set in the Graphics2D context.

Since this interface must expose the contents of pixels on the target device or image to potentially arbitrary code, the use of custom objects which implement this interface when rendering directly to a screen device is governed by the readDisplayPixels AWTPermission. The permission check will occur when such a custom object is passed to the setComposite method of a Graphics2D retrieved from a Component.

See Also:
AlphaComposite, CompositeContext, Graphics2D.setComposite(java.awt.Composite)

Method Summary
 CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)
Creates a context containing state that is used to perform the compositing operation.

Method Detail

createContext

public CompositeContext createContext(ColorModel srcColorModel,
                                      ColorModel dstColorModel,
                                      RenderingHints hints)
Creates a context containing state that is used to perform the compositing operation. In a multi-threaded environment, several contexts can exist simultaneously for a single Composite object.
Parameters:
srcColorModel - the ColorModel of the source
dstColorModel - the ColorModel of the destination
hints - the hint that the context object uses to choose between rendering alternatives
Returns:
the CompositeContext object used to perform the compositing operation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompositeContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface CompositeContext

public interface CompositeContext

The CompositeContext interface defines the encapsulated and optimized environment for a compositing operation. CompositeContext objects maintain state for compositing operations. In a multi-threaded environment, several contexts can exist simultaneously for a single Composite object.

See Also:
Composite

Method Summary
void | compose(Raster src, Raster dstIn, WritableRaster dstOut) Composes the two source Raster objects and places the result in the destination WritableRaster.
void | dispose() Releases resources allocated for a context.

Method Detail

dispose

public void dispose()
Releases resources allocated for a context.

compose

public void compose(Raster src,
                    Raster dstIn,
                    WritableRaster dstOut)
Composes the two source Raster objects and places the result in the destination WritableRaster. Note that the destination can be the same object as either the first or second source. Note that dstIn and dstOut must be compatible with the dstColorModel passed to the createContext method of the Composite interface.
Parameters:
src - the first source for the compositing operation
dstIn - the second source for the compositing operation
dstOut - the WritableRaster into which the result of the operation is stored
See Also:
Composite
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Container

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Container

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
BasicSplitPaneDivider, Box, CellRendererPane, DefaultTreeCellEditor.EditorContainer, JComponent, Panel, ScrollPane, Window
public class Container
extends Component

A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.

Components added to a container are tracked in a list. The order of the list will define the components' front-to-back stacking order within the container. If no index is specified when adding a component to a container, it will be added to the end of the list (and hence to the bottom of the stacking order).

Since:
JDK1.0
See Also:
add(java.awt.Component, int), getComponent(int), LayoutManager, Serialized Form

Inner Class Summary
protected  class Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Container()
Constructs a new Container.
Method Summary
 Component add(Component comp)
Adds the specified component to the end of this container.
 Component add(Component comp, int index)
Adds the specified component to this container at the given position.
 void add(Component comp, Object constraints)
Adds the specified component to the end of this container.
 void add(Component comp, Object constraints, int index)
Adds the specified component to this container with the specified constraints at the specified index.
 Component add(String name, Component comp)
Adds the specified component to this container.
 void addContainerListener(ContainerListener l)
Adds the specified container listener to receive container events from this container.
protected  void addImpl(Component comp, Object constraints, int index)
Adds the specified component to this container at the specified index.
 void addNotify()
Makes this Container displayable by connecting it to a native screen resource.
 int countComponents()
Deprecated. As of JDK version 1.1, replaced by getComponentCount().
 void deliverEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
 void doLayout()
Causes this container to lay out its components.
 Component findComponentAt(int x, int y)
Locates the visible child component that contains the specified position.
 Component findComponentAt(Point p)
Locates the visible child component that contains the specified point.
 float getAlignmentX()
Returns the alignment along the x axis.
 float getAlignmentY()
Returns the alignment along the y axis.
 Component getComponent(int n)
Gets the nth component in this container.
 Component getComponentAt(int x, int y)
Locates the component that contains the x,y position.
 Component getComponentAt(Point p)
Gets the component that contains the specified point.
 int getComponentCount()
Gets the number of components in this panel.
 Component[] getComponents()
Gets all the components in this container.
 Insets getInsets()
Determines the insets of this container, which indicate the size of the container's border.
 LayoutManager getLayout()
Gets the layout manager for this container.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType argument.
 Dimension getMaximumSize()
Returns the maximum size of this container.
 Dimension getMinimumSize()
Returns the minimum size of this container.
 Dimension getPreferredSize()
Returns the preferred size of this container.
 Insets insets()
Deprecated. As of JDK version 1.1, replaced by getInsets().
 void invalidate()
Invalidates the container.
 boolean isAncestorOf(Component c)
Checks if the component is contained in the component hierarchy of this container.
 void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().
 void list(PrintStream out, int indent)
Prints a listing of this container to the specified output stream.
 void list(PrintWriter out, int indent)
Prints out a list, starting at the specified indention, to the specified print writer.
 Component locate(int x, int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 void paint(Graphics g)
Paints the container.
 void paintComponents(Graphics g)
Paints each of the components in this container.
protected  String paramString()
Returns the parameter string representing the state of this container.
 Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 void print(Graphics g)
Prints the container.
 void printComponents(Graphics g)
Prints each of the components in this container.
protected  void processContainerEvent(ContainerEvent e)
Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
protected  void processEvent(AWTEvent e)
Processes events on this container.
 void remove(Component comp)
Removes the specified component from this container.
 void remove(int index)
Removes the component, specified by index, from this container.
 void removeAll()
Removes all the components from this container.
 void removeContainerListener(ContainerListener l)
Removes the specified container listener so it no longer receives container events from this container.
 void removeNotify()
Makes this Container undisplayable by removing its connection to its native screen resource.
 void setFont(Font f)
Sets the font of this container.
 void setLayout(LayoutManager mgr)
Sets the layout manager for this container.
 void update(Graphics g)
Updates the container.
 void validate()
Validates this container and all of its subcomponents.
protected  void validateTree()
Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid).
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Container

public Container()
Constructs a new Container. Containers can be extended directly, but are lightweight in this case and must be contained by a parent somewhere higher up in the component tree that is native. (such as Frame for example).
Method Detail

getComponentCount

public int getComponentCount()
Gets the number of components in this panel.
Returns:
the number of components in this panel.
Since:
JDK1.1
See Also:
getComponent(int)

countComponents

public int countComponents()
Deprecated. As of JDK version 1.1, replaced by getComponentCount().

getComponent

public Component getComponent(int n)
Gets the nth component in this container.
Parameters:
n - the index of the component to get.
Returns:
the nth component in this container.
Throws:
ArrayIndexOutOfBoundsException - if the nth value does not exist.

getComponents

public Component[] getComponents()
Gets all the components in this container.
Returns:
an array of all the components in this container.

getInsets

public Insets getInsets()
Determines the insets of this container, which indicate the size of the container's border.

A Frame object, for example, has a top inset that corresponds to the height of the frame's title bar.

Returns:
the insets of this container.
Since:
JDK1.1
See Also:
Insets, LayoutManager

insets

public Insets insets()
Deprecated. As of JDK version 1.1, replaced by getInsets().

add

public Component add(Component comp)
Adds the specified component to the end of this container.
Parameters:
comp - the component to be added.
Returns:
the component argument.

add

public Component add(String name,
                     Component comp)
Adds the specified component to this container. It is strongly advised to use the 1.1 method, add(Component, Object), in place of this method.

add

public Component add(Component comp,
                     int index)
Adds the specified component to this container at the given position.
Parameters:
comp - the component to be added.
index - the position at which to insert the component, or -1 to insert the component at the end.
Returns:
the component comp
See Also:
remove(int)

add

public void add(Component comp,
                Object constraints)
Adds the specified component to the end of this container. Also notifies the layout manager to add the component to this container's layout using the specified constraints object.
Parameters:
comp - the component to be added
constraints - an object expressing layout contraints for this component
Since:
JDK1.1
See Also:
LayoutManager

add

public void add(Component comp,
                Object constraints,
                int index)
Adds the specified component to this container with the specified constraints at the specified index. Also notifies the layout manager to add the component to the this container's layout using the specified constraints object.
Parameters:
comp - the component to be added
constraints - an object expressing layout contraints for this
index - the position in the container's list at which to insert the component. -1 means insert at the end. component
See Also:
remove(int), LayoutManager

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Adds the specified component to this container at the specified index. This method also notifies the layout manager to add the component to this container's layout using the specified constraints object.

This is the method to override if a program needs to track every add request to a container. An overriding method should usually include a call to the superclass's version of the method:

super.addImpl(comp, constraints, index)

Parameters:
comp - the component to be added.
constraints - an object expressing layout contraints for this component.
index - the position in the container's list at which to insert the component, where -1 means insert at the end.
Since:
JDK1.1
See Also:
add(java.awt.Component),
add(java.awt.Component, int),
add(java.awt.Component, java.lang.Object),
LayoutManager

remove

public void remove(int index)
Removes the component, specified by index, from this container.
Parameters:
index - the index of the component to be removed.
Since:
JDK1.1
See Also:
add(java.awt.Component)

remove

public void remove(Component comp)
Removes the specified component from this container.
Parameters:
comp - the component to be removed
See Also:
add(java.awt.Component)

removeAll

public void removeAll()
Removes all the components from this container.
See Also:
add(java.awt.Component), remove(int)

getLayout

public LayoutManager getLayout()
Gets the layout manager for this container.
See Also:
doLayout(), setLayout(java.awt.LayoutManager)

setLayout

public void setLayout(LayoutManager mgr)
Sets the layout manager for this container.
Parameters:
mgr - the specified layout manager
See Also:
doLayout(), getLayout()

doLayout

public void doLayout()
Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.
Overrides:
doLayout in class Component
Since:
JDK1.1
See Also:
LayoutManager.layoutContainer(java.awt.Container),
setLayout(java.awt.LayoutManager),
validate()

layout

public void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().

Overrides:
layout in class Component

invalidate

public void invalidate()
Invalidates the container. The container and all parents above it are marked as needing to be laid out. This method can be called often, so it needs to execute quickly.
Overrides:
invalidate in class Component
See Also:
validate(), layout(), LayoutManager

validate

public void validate()
Validates this container and all of its subcomponents.

AWT uses validate to cause a container to lay out its subcomponents again after the components it contains have been added to or modified.

Overrides:
validate in class Component
See Also:
validate(), Component.invalidate()

validateTree

protected void validateTree()
Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid). Synchronization should be provided by the method that calls this one: validate.

setFont

public void setFont(Font f)
Sets the font of this container.
Overrides:
setFont in class Component
Parameters:
f - The font to become this container's font.
Since:
JDK1.0
See Also:
Component.getFont()

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of this container.
Overrides:
getPreferredSize in class Component
Returns:
an instance of Dimension that represents the preferred size of this container.
See Also:
getMinimumSize(),
getLayout(),
LayoutManager.preferredLayoutSize(java.awt.Container),
Component.getPreferredSize()

preferredSize

public Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize in class Component

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of this container.
Overrides:
getMinimumSize in class Component
Returns:
an instance of Dimension that represents the minimum size of this container.
Since:
JDK1.1
See Also:
getPreferredSize(),
getLayout(),
LayoutManager.minimumLayoutSize(java.awt.Container),
Component.getMinimumSize()

minimumSize

public Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize in class Component

getMaximumSize

public Dimension getMaximumSize()
Returns the maximum size of this container.
Overrides:
getMaximumSize in class Component
See Also:
getPreferredSize()

getAlignmentX

public float getAlignmentX()
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Overrides:
getAlignmentX in class Component

getAlignmentY

public float getAlignmentY()
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Overrides:
getAlignmentY in class Component

paint

public void paint(Graphics g)
Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.
Overrides:
paint in class Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

update

public void update(Graphics g)
Updates the container. This forwards the update to any lightweight components that are children of this container. If this method is reimplemented, super.update(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, update() will not be forwarded to that child.
Overrides:
update in class Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

print

public void print(Graphics g)
Prints the container. This forwards the print to any lightweight components that are children of this container. If this method is reimplemented, super.print(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, print() will not be forwarded to that child.
Overrides:
print in class Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

paintComponents

public void paintComponents(Graphics g)
Paints each of the components in this container.
Parameters:
g - the graphics context.
See Also:
Component.paint(java.awt.Graphics), Component.paintAll(java.awt.Graphics)

printComponents

public void printComponents(Graphics g)
Prints each of the components in this container.
Parameters:
g - the graphics context.
See Also:
Component.print(java.awt.Graphics), Component.printAll(java.awt.Graphics)

addContainerListener

public void addContainerListener(ContainerListener l)
Adds the specified container listener to receive container events from this container. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the container listener

removeContainerListener

public void removeContainerListener(ContainerListener l)
Removes the specified container listener so it no longer receives container events from this container. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the container listener

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ContainerListener(s) for the given Container c, one would write:
 ContainerListener[] cls = (ContainerListener[])(c.getListeners(ContainerListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this container
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this container. If the event is a ContainerEvent, it invokes the processContainerEvent method, else it invokes its superclass's processEvent.
Overrides:
processEvent in class Component
Parameters:
e - the event

processContainerEvent

protected void processContainerEvent(ContainerEvent e)
Processes container events occurring on this container by dispatching them to any registered ContainerListener objects. NOTE: This method will not be called unless container events are enabled for this component; this happens when one of the following occurs: a) A ContainerListener object is registered via addContainerListener() b) Container events are enabled via enableEvents()
Parameters:
e - the container event
See Also:
Component.enableEvents(long)

deliverEvent

public void deliverEvent(Event e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)

Overrides:
deliverEvent in class Component

getComponentAt

public Component getComponentAt(int x,
                                int y)
Locates the component that contains the x,y position. The top-most child component is returned in the case where there is overlap in the components. This is determined by finding the component closest to the index 0 that claims to contain the given point via Component.contains(), except that Components which have native peers take precedence over those which do not (i.e., lightweight Components).
Overrides:
getComponentAt in class Component
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned; otherwise the top-most child is returned.
Since:
JDK1.1
See Also:
Component.contains(int, int)

locate

public Component locate(int x,
                        int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).

Overrides:
locate in class Component

getComponentAt

public Component getComponentAt(Point p)
Gets the component that contains the specified point.
Overrides:
getComponentAt in class Component
Parameters:
p - the point.
Returns:
returns the component that contains the point, or null if the component does not contain the point.
Since:
JDK1.1
See Also:
Component.contains(int, int)

findComponentAt

public Component findComponentAt(int x,
                                 int y)
Locates the visible child component that contains the specified position. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
Since:
1.2
See Also:
Component.contains(int, int), getComponentAt

findComponentAt

public Component findComponentAt(Point p)
Locates the visible child component that contains the specified point. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

Parameters:
p - the point.
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
Since:
1.2
See Also:
Component.contains(int, int), getComponentAt

addNotify

public void addNotify()
Makes this Container displayable by connecting it to a native screen resource. Making a container displayable will cause any of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs.
Overrides:
addNotify in class Component
See Also:
Component.isDisplayable(), removeNotify()

removeNotify

public void removeNotify()
Makes this Container undisplayable by removing its connection to its native screen resource. Make a container undisplayable will cause any of its children to be made undisplayable. This method is called by the toolkit internally and should not be called directly by programs.
Overrides:
removeNotify in class Component
See Also:
Component.isDisplayable(), addNotify()

isAncestorOf

public boolean isAncestorOf(Component c)
Checks if the component is contained in the component hierarchy of this container.
Parameters:
c - the component
Returns:
true if it is an ancestor; false otherwise.
Since:
JDK1.1

paramString

protected String paramString()
Returns the parameter string representing the state of this container. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this container.

list

public void list(PrintStream out,
                 int indent)
Prints a listing of this container to the specified output stream. The listing starts at the specified indentation.
Overrides:
list in class Component
Parameters:
out - a print stream.
indent - the number of spaces to indent.
Since:
JDK
See Also:
Component.list(java.io.PrintStream, int)

list

public void list(PrintWriter out,
                 int indent)
Prints out a list, starting at the specified indention, to the specified print writer.
Overrides:
list in class Component
Following copied from class: java.awt.Component
Parameters:
out - The print writer to print to.
indent - The number of spaces to indent.
See Also:
PrintStream.println(java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Cursor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Cursor

java.lang.Object
  |
  +--java.awt.Cursor
All Implemented Interfaces:
Serializable
public class Cursor
extends Object
implements Serializable

A class to encapsulate the bitmap representation of the mouse cursor.

See Also:
Component.setCursor(java.awt.Cursor), Serialized Form

Field Summary
static int | CROSSHAIR_CURSOR The crosshair cursor type.
static int | CUSTOM_CURSOR The type associated with all custom cursors.
static int | DEFAULT_CURSOR The default cursor type (gets set if no cursor is defined).
static int | E_RESIZE_CURSOR The east-resize cursor type.
static int | HAND_CURSOR The hand cursor type.
static int | MOVE_CURSOR The move cursor type.
static int | N_RESIZE_CURSOR The north-resize cursor type.
protected String | name The user-visible name of the cursor.
static int | NE_RESIZE_CURSOR The north-east-resize cursor type.
static int | NW_RESIZE_CURSOR The north-west-resize cursor type.
protected static Cursor[] | predefined
static int | S_RESIZE_CURSOR The south-resize cursor type.
static int | SE_RESIZE_CURSOR The south-east-resize cursor type.
static int | SW_RESIZE_CURSOR The south-west-resize cursor type.
static int | TEXT_CURSOR The text cursor type.
static int | W_RESIZE_CURSOR The west-resize cursor type.
static int | WAIT_CURSOR The wait cursor type.
Constructor Summary
 | Cursor(int type) Creates a new cursor object with the specified type.
protected | Cursor(String name) Creates a new custom cursor object with the specified name.
Method Summary
protected void | finalize() Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
static Cursor | getDefaultCursor() Return the system default cursor.
String | getName() Returns the name of this cursor.
static Cursor | getPredefinedCursor(int type) Returns a cursor object with the specified predefined type.
static Cursor | getSystemCustomCursor(String name)
int | getType() Returns the type for this cursor.
String | toString() Returns a string representation of this cursor.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_CURSOR

public static final int DEFAULT_CURSOR
The default cursor type (gets set if no cursor is defined).

CROSSHAIR_CURSOR

public static final int CROSSHAIR_CURSOR
The crosshair cursor type.

TEXT_CURSOR

public static final int TEXT_CURSOR
The text cursor type.

WAIT_CURSOR

public static final int WAIT_CURSOR
The wait cursor type.

SW_RESIZE_CURSOR

public static final int SW_RESIZE_CURSOR
The south-west-resize cursor type.

SE_RESIZE_CURSOR

public static final int SE_RESIZE_CURSOR
The south-east-resize cursor type.

NW_RESIZE_CURSOR

public static final int NW_RESIZE_CURSOR
The north-west-resize cursor type.

NE_RESIZE_CURSOR

public static final int NE_RESIZE_CURSOR
The north-east-resize cursor type.

N_RESIZE_CURSOR

public static final int N_RESIZE_CURSOR
The north-resize cursor type.

S_RESIZE_CURSOR

public static final int S_RESIZE_CURSOR
The south-resize cursor type.

W_RESIZE_CURSOR

public static final int W_RESIZE_CURSOR
The west-resize cursor type.

E_RESIZE_CURSOR

public static final int E_RESIZE_CURSOR
The east-resize cursor type.

HAND_CURSOR

public static final int HAND_CURSOR
The hand cursor type.

MOVE_CURSOR

public static final int MOVE_CURSOR
The move cursor type.

predefined

protected static Cursor[] predefined

CUSTOM_CURSOR

public static final int CUSTOM_CURSOR
The type associated with all custom cursors.

name

protected String name
The user-visible name of the cursor.
See Also:
getName()
Constructor Detail

Cursor

public Cursor(int type)
Creates a new cursor object with the specified type.
Parameters:
type - the type of cursor

Cursor

protected Cursor(String name)
Creates a new custom cursor object with the specified name.

Note: this constructor should only be used by AWT implementations as part of their support for custom cursors. Applications should use Toolkit.createCustomCursor().

Parameters:
name - the user-visible name of the cursor.
See Also:
Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)
Method Detail

getPredefinedCursor

public static Cursor getPredefinedCursor(int type)
Returns a cursor object with the specified predefined type.
Parameters:
type - the type of predefined cursor

getSystemCustomCursor

public static Cursor getSystemCustomCursor(String name)
                                    throws AWTException
Returns:
the system specific custom Cursor named Cursor names are, for example: "Invalid.16x16"

getDefaultCursor

public static Cursor getDefaultCursor()
Return the system default cursor.

getType

public int getType()
Returns the type for this cursor.

getName

public String getName()
Returns the name of this cursor.
Returns:
a localized description of this cursor.
Since:
1.2

toString

public String toString()
Returns a string representation of this cursor.
Overrides:
toString in class Object
Returns:
a string representation of this cursor.
Since:
1.2

finalize

protected void finalize()
                 throws Throwable
Description copied from class: Object
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

The general contract of finalize is that it is invoked if and when the JavaTM virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.datatransfer Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.datatransfer

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.datatransfer.Clipboard
    • class java.awt.datatransfer.DataFlavor (implements java.lang.Cloneable, java.io.Externalizable)
    • class java.awt.datatransfer.StringSelection (implements java.awt.datatransfer.ClipboardOwner, java.awt.datatransfer.Transferable)
    • class java.awt.datatransfer.SystemFlavorMap (implements java.awt.datatransfer.FlavorMap)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.awt.datatransfer.MimeTypeParseException
        • class java.awt.datatransfer.UnsupportedFlavorException

Interface Hierarchy

  • interface java.awt.datatransfer.ClipboardOwner
  • interface java.awt.datatransfer.FlavorMap
  • interface java.awt.datatransfer.Transferable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.datatransfer

Provides interfaces and classes for transferring data between and within applications.

See:
Description

Interface Summary
ClipboardOwner | Defines the interface for classes that will provide data to a clipboard.
FlavorMap | The FlavorMap is an interface to a map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
Transferable | Defines the interface for classes that can be used to provide data for a transfer operation.

Class Summary
Clipboard | A class which implements a mechanism to transfer data using cut/copy/paste operations.
DataFlavor | Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
StringSelection | A Transferable which implements the capability required to transfer a String.
SystemFlavorMap | The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.

Exception Summary
MimeTypeParseException | A class to encapsulate MimeType parsing related exceptions
UnsupportedFlavorException | Signals that the requested data is not supported in this flavor.

Package java.awt.datatransfer Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.datatransfer

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.datatransfer

Packages that use java.awt.datatransfer
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.

Classes in java.awt.datatransfer used by java.awt
Clipboard
A class which implements a mechanism to transfer data using cut/copy/paste operations.

Classes in java.awt.datatransfer used by java.awt.datatransfer
Clipboard
A class which implements a mechanism to transfer data using cut/copy/paste operations.
ClipboardOwner
Defines the interface for classes that will provide data to a clipboard.
DataFlavor
Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
FlavorMap
The FlavorMap is an interface to a map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
Transferable
Defines the interface for classes that can be used to provide data for a transfer operation.
UnsupportedFlavorException
Signals that the requested data is not supported in this flavor.

Classes in java.awt.datatransfer used by java.awt.dnd
DataFlavor
Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
FlavorMap
The FlavorMap is an interface to a map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
Transferable
Defines the interface for classes that can be used to provide data for a transfer operation.
UnsupportedFlavorException
Signals that the requested data is not supported in this flavor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.MimeTypeParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.MimeTypeParseException

No usage of java.awt.datatransfer.MimeTypeParseException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.StringSelection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.StringSelection

No usage of java.awt.datatransfer.StringSelection

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.SystemFlavorMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.SystemFlavorMap

No usage of java.awt.datatransfer.SystemFlavorMap

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.Clipboard

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.Clipboard

Packages that use Clipboard
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.

Uses of Clipboard in java.awt

Methods in java.awt that return Clipboard
abstract  Clipboard Toolkit.getSystemClipboard()
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.

Uses of Clipboard in java.awt.datatransfer

Methods in java.awt.datatransfer with parameters of type Clipboard
void | StringSelection.lostOwnership(Clipboard clipboard, Transferable contents)
void | ClipboardOwner.lostOwnership(Clipboard clipboard, Transferable contents) Notifies this object that it is no longer the owner of the contents of the clipboard.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.DataFlavor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.DataFlavor

Packages that use DataFlavor
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.

Uses of DataFlavor in java.awt.datatransfer

Fields in java.awt.datatransfer declared as DataFlavor
static DataFlavor | DataFlavor.stringFlavor The DataFlavor representing a Java Unicode String class, where:
static DataFlavor | DataFlavor.plainTextFlavor Deprecated. as of 1.3. Use DataFlavor.getReaderForText( Transferable) instead of Transferable. getTransferData(DataFlavor.plainTextFlavor).
static DataFlavor | DataFlavor.javaFileListFlavor To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used.

Methods in java.awt.datatransfer that return DataFlavor
DataFlavor[] | Transferable.getTransferDataFlavors() Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
DataFlavor[] | StringSelection.getTransferDataFlavors() Returns an array of flavors in which this Transferable can provide the data.
static DataFlavor | SystemFlavorMap.decodeDataFlavor(String atom)
static DataFlavor | DataFlavor.getTextPlainUnicodeFlavor()
static DataFlavor | DataFlavor.selectBestTextFlavor(DataFlavor[] availableFlavors)

Methods in java.awt.datatransfer with parameters of type DataFlavor
boolean | Transferable.isDataFlavorSupported(DataFlavor flavor) Returns whether or not the specified data flavor is supported for this object.
Object | Transferable.getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.
boolean | StringSelection.isDataFlavorSupported(DataFlavor flavor) Returns whether the requested flavor is supported by this Transferable.
Object | StringSelection.getTransferData(DataFlavor flavor) Returns the Transferable's data in the requested DataFlavor if possible.
Map | SystemFlavorMap.getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names
static String | SystemFlavorMap.encodeDataFlavor(DataFlavor df)
static DataFlavor | DataFlavor.selectBestTextFlavor(DataFlavor[] availableFlavors)
boolean | DataFlavor.equals(DataFlavor that) Two DataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal.
boolean | DataFlavor.match(DataFlavor that) Two DataFlavors match if their primary types, subtypes, and representation classes are all equal.
boolean | DataFlavor.isMimeTypeEqual(DataFlavor dataFlavor) Compare the mimeType of two DataFlavor objects no parameters are considered
Map | FlavorMap.getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names

Constructors in java.awt.datatransfer with parameters of type DataFlavor
UnsupportedFlavorException(DataFlavor flavor)
Constructs an UnsupportedFlavorException.

Uses of DataFlavor in java.awt.dnd

Methods in java.awt.dnd that return DataFlavor
protected DataFlavor[] | DropTargetContext.getCurrentDataFlavors() get the available DataFlavors of the Transferable operand of this operation.
DataFlavor[] | DropTargetContext.TransferableProxy.getTransferDataFlavors() get the flavors
DataFlavor[] | DropTargetDropEvent.getCurrentDataFlavors() This method returns the current DataFlavors.
DataFlavor[] | DropTargetDragEvent.getCurrentDataFlavors() This method returns the current DataFlavors from the DropTargetContext.

Methods in java.awt.dnd with parameters of type DataFlavor
protected boolean | DropTargetContext.isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.
boolean | DropTargetContext.TransferableProxy.isDataFlavorSupported(DataFlavor flavor) check if a particular flavor is supported?
Object | DropTargetContext.TransferableProxy.getTransferData(DataFlavor df) get the transfer data
boolean | DropTargetDropEvent.isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the specified DataFlavor is available from the source.
boolean | DropTargetDragEvent.isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the specified DataFlavor is supported.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.datatransfer.UnsupportedFlavorException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.datatransfer.UnsupportedFlavorException

Packages that use UnsupportedFlavorException
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.

Uses of UnsupportedFlavorException in java.awt.datatransfer

Methods in java.awt.datatransfer that throw UnsupportedFlavorException
Object | Transferable.getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.
Object | StringSelection.getTransferData(DataFlavor flavor) Returns the Transferable's data in the requested DataFlavor if possible.
Reader | DataFlavor.getReaderForText(Transferable transferable) Gets a reader for an input stream, decoded for the expected charset (encoding).

Uses of UnsupportedFlavorException in java.awt.dnd

Methods in java.awt.dnd that throw UnsupportedFlavorException
 Object DropTargetContext.TransferableProxy.getTransferData(DataFlavor df)
get the transfer data

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.datatransfer.ClipboardOwner

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.datatransfer.ClipboardOwner

Packages that use ClipboardOwner
java.awt.datatransfer Provides interfaces and classes for transferring data between and within applications.

Uses of ClipboardOwner in java.awt.datatransfer

Classes in java.awt.datatransfer that implement ClipboardOwner
 class StringSelection
A Transferable which implements the capability required to transfer a String.

Fields in java.awt.datatransfer declared as ClipboardOwner
protected  ClipboardOwner Clipboard.owner

Methods in java.awt.datatransfer with parameters of type ClipboardOwner
 void Clipboard.setContents(Transferable contents, ClipboardOwner owner)
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.datatransfer.FlavorMap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.datatransfer.FlavorMap

Packages that use FlavorMap
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.

Uses of FlavorMap in java.awt.datatransfer

Classes in java.awt.datatransfer that implement FlavorMap
 class SystemFlavorMap
The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.

Methods in java.awt.datatransfer that return FlavorMap
static FlavorMap SystemFlavorMap.getDefaultFlavorMap()
get the default system implementation

Uses of FlavorMap in java.awt.dnd

Methods in java.awt.dnd that return FlavorMap
FlavorMap | DragSource.getFlavorMap() This method returns the FlavorMap for this DragSource.
FlavorMap | DropTarget.getFlavorMap() This method returns the FlavorMap associated with this DropTarget

Methods in java.awt.dnd with parameters of type FlavorMap
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DropTarget.setFlavorMap(FlavorMap fm) This method sets the FlavorMap associated with this DropTarget.

Constructors in java.awt.dnd with parameters of type FlavorMap
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.datatransfer.Transferable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.datatransfer.Transferable

Packages that use Transferable
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.

Uses of Transferable in java.awt.datatransfer

Classes in java.awt.datatransfer that implement Transferable
 class StringSelection
A Transferable which implements the capability required to transfer a String.

Fields in java.awt.datatransfer declared as Transferable
protected  Transferable Clipboard.contents

Methods in java.awt.datatransfer that return Transferable
 Transferable Clipboard.getContents(Object requestor)
Returns a transferable object representing the current contents of the clipboard.

Methods in java.awt.datatransfer with parameters of type Transferable
void | StringSelection.lostOwnership(Clipboard clipboard, Transferable contents)
void | Clipboard.setContents(Transferable contents, ClipboardOwner owner) Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.
Reader | DataFlavor.getReaderForText(Transferable transferable) Gets a reader for an input stream, decoded for the expected charset (encoding).
void | ClipboardOwner.lostOwnership(Clipboard clipboard, Transferable contents) Notifies this object that it is no longer the owner of the contents of the clipboard.

Uses of Transferable in java.awt.dnd

Classes in java.awt.dnd that implement Transferable
protected  class DropTargetContext.TransferableProxy
The TransferableProxy is a nested helper class that supports the DropTargetContext in managing the transfer of data.

Fields in java.awt.dnd declared as Transferable
protected  Transferable DropTargetContext.TransferableProxy.transferable
The "actual" Transferable that the Proxy is a Proxy for, usually supplied from the underlying system.

Methods in java.awt.dnd that return Transferable
protected Transferable | DropTargetContext.getTransferable() get the Transferable (proxy) operand of this operation
protected Transferable | DropTargetContext.createTransferableProxy(Transferable t, boolean local) subclasses may override this to supply their own Proxy Transferable
Transferable | DropTargetDropEvent.getTransferable() This method returns the Transferable object associated with the drop.
Transferable | DragSourceContext.getTransferable() This method returns the Transferable associated with this DragSourceContext.

Methods in java.awt.dnd with parameters of type Transferable
protected Transferable | DropTargetContext.createTransferableProxy(Transferable t, boolean local) subclasses may override this to supply their own Proxy Transferable
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
void | DragGestureEvent.startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Constructors in java.awt.dnd with parameters of type Transferable
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Clipboard

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class Clipboard

java.lang.Object
  |
  +--java.awt.datatransfer.Clipboard
public class Clipboard
extends Object

A class which implements a mechanism to transfer data using cut/copy/paste operations.

Field Summary
protected Transferable | contents
protected ClipboardOwner | owner
Constructor Summary
Clipboard(String name)
Creates a clipboard object.
Method Summary
Transferable | getContents(Object requestor) Returns a transferable object representing the current contents of the clipboard.
String | getName() Returns the name of this clipboard object.
void | setContents(Transferable contents, ClipboardOwner owner) Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

owner

protected ClipboardOwner owner

contents

protected Transferable contents
Constructor Detail

Clipboard

public Clipboard(String name)
Creates a clipboard object.
Method Detail

getName

public String getName()
Returns the name of this clipboard object.

setContents

public void setContents(Transferable contents,
                        ClipboardOwner owner)
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. If there is an existing owner registered, that owner is notified that it no longer holds ownership of the clipboard contents.
Parameters:
content - the transferable object representing the clipboard content
owner - the object which owns the clipboard content

getContents

public Transferable getContents(Object requestor)
Returns a transferable object representing the current contents of the clipboard. If the clipboard currently has no contents, it returns null. The parameter Object requestor is not currently used.
Parameters:
requestor - the object requesting the clip data (not used)
Returns:
the current transferable object on the clipboard
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ClipboardOwner

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Interface ClipboardOwner

All Known Implementing Classes:
StringSelection
public interface ClipboardOwner

Defines the interface for classes that will provide data to a clipboard.

Method Summary
 void lostOwnership(Clipboard clipboard, Transferable contents)
Notifies this object that it is no longer the owner of the contents of the clipboard.

Method Detail

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
Notifies this object that it is no longer the owner of the contents of the clipboard.
Parameters:
clipboard - the clipboard that is no longer owned
contents - the contents which this owner had placed on the clipboard
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DataFlavor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class DataFlavor

java.lang.Object
  |
  +--java.awt.datatransfer.DataFlavor
All Implemented Interfaces:
Cloneable, Externalizable, Serializable
public class DataFlavor
extends Object
implements Externalizable, Cloneable

Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.

DataFlavor objects are constant and never change once instantiated.

See Also:
Serialized Form

Field Summary
static DataFlavor | javaFileListFlavor To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used.
static String | javaJVMLocalObjectMimeType to transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type, across a Transferable interface WITHIN THE SAME JVM, a DataFlavor with this type/subtype is used, with a representationClass equal to the type of the class/interface being passed across the Transferble.
static String | javaRemoteObjectMimeType In order to pass a live link to a Remote object via a Drag and Drop ACTION_LINK operation a Mime Content Type of application/x-java-remote-object should be used, where the representation class of the DataFlavor represents the type of the Remote interface to be transferred.
static String | javaSerializedObjectMimeType a MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent.
static DataFlavor | plainTextFlavor Deprecated. as of 1.3. Use DataFlavor.getReaderForText( Transferable) instead of Transferable. getTransferData(DataFlavor.plainTextFlavor).
static DataFlavor | stringFlavor The DataFlavor representing a Java Unicode String class, where:
Constructor Summary
DataFlavor()
Constructs a new DataFlavor.
DataFlavor(Class representationClass, String humanPresentableName)
Construct a DataFlavor that represents a Java class
DataFlavor(String mimeType)
Construct a DataFlavor from a Mime Type string.
DataFlavor(String mimeType, String humanPresentableName)
Construct a DataFlavor that represents a MimeType
DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader)
Construct a DataFlavor that represents a MimeType
Method Summary
Object | clone() Creates and returns a copy of this object.
boolean | equals(DataFlavor that) Two DataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal.
boolean | equals(Object o) If the object is an instance of DataFlavor, representationClass and MIME type will be compared.
boolean | equals(String s) Deprecated. As inconsistent with hashCode() contract, use isMimeTypeEqual(String) instead.
Class | getDefaultRepresentationClass()
String | getDefaultRepresentationClassAsString()
String | getHumanPresentableName() Returns the human presentable name for the data foramt that this DataFlavor represents.
String | getMimeType() Returns the MIME type string for this DataFlavor
String | getParameter(String paramName)
String | getPrimaryType()
Reader | getReaderForText(Transferable transferable) Gets a reader for an input stream, decoded for the expected charset (encoding).
Class | getRepresentationClass() Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.
String | getSubType()
static DataFlavor | getTextPlainUnicodeFlavor()
int | hashCode() Returns hash code for this DataFlavor.
boolean | isFlavorJavaFileListType()
boolean | isFlavorRemoteObjectType()
boolean | isFlavorSerializedObjectType()
boolean | isMimeTypeEqual(DataFlavor dataFlavor) Compare the mimeType of two DataFlavor objects no parameters are considered
boolean | isMimeTypeEqual(String mimeType) Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor.
boolean | isMimeTypeSerializedObject() does the DataFlavor represent a serialized object?
boolean | isRepresentationClassInputStream() does the DataFlavor represent a java.io.InputStream
boolean | isRepresentationClassRemote()
boolean | isRepresentationClassSerializable()
boolean | match(DataFlavor that) Two DataFlavors match if their primary types, subtypes, and representation classes are all equal.
protected String | normalizeMimeType(String mimeType) Deprecated.
protected String | normalizeMimeTypeParameter(String parameterName, String parameterValue) Deprecated.
void | readExternal(ObjectInput is) restore this DataFlavor from an Serialized state
static DataFlavor | selectBestTextFlavor(DataFlavor[] availableFlavors)
void | setHumanPresentableName(String humanPresentableName) Sets the human presentable name for the data format that this DataFlavor represents.
String | toString() String representation of this DataFlavor and its parameters.
protected static Class | tryToLoadClass(String className, ClassLoader fallback) tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
void | writeExternal(ObjectOutput os) Serialize this DataFlavor
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

stringFlavor

public static final DataFlavor stringFlavor
The DataFlavor representing a Java Unicode String class, where:

representationClass = java.lang.String
mimeType = "application/x-java-serialized-object"

plainTextFlavor

public static final DataFlavor plainTextFlavor
Deprecated. as of 1.3. Use DataFlavor.getReaderForText( Transferable) instead of Transferable. getTransferData(DataFlavor.plainTextFlavor).

The DataFlavor representing plain text with unicode encoding, where:

representationClass = InputStream
mimeType = "text/plain; charset=unicode"

This DataFlavor has been deprecated because (1) Its representation is an InputStream, an 8-bit based representation, while Unicode is a 16-bit character set; and (2) The charset "unicode" is not well-defined. "unicode" implies a particular platform's implementation of Unicode, not a cross-platform implementation.

javaSerializedObjectMimeType

public static final String javaSerializedObjectMimeType
a MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent. The representation class associated with this DataFlavor identifies the Java type of an object returned as a reference from an invocation java.awt.datatransfer.getTransferData().

javaFileListFlavor

public static final DataFlavor javaFileListFlavor
To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used. Each element of the list is required/guaranteed to be of type java.io.File.

javaJVMLocalObjectMimeType

public static final String javaJVMLocalObjectMimeType
to transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type, across a Transferable interface WITHIN THE SAME JVM, a DataFlavor with this type/subtype is used, with a representationClass equal to the type of the class/interface being passed across the Transferble. The object reference returned from Transferable.getTransferData() for a DataFlavor with this MIME Content-Type is required to be an instanceof the representation Class of the DataFlavor.

javaRemoteObjectMimeType

public static final String javaRemoteObjectMimeType
In order to pass a live link to a Remote object via a Drag and Drop ACTION_LINK operation a Mime Content Type of application/x-java-remote-object should be used, where the representation class of the DataFlavor represents the type of the Remote interface to be transferred.
Constructor Detail

DataFlavor

public DataFlavor()
Constructs a new DataFlavor. This constructor is provided only for the purpose of supporting the Externalizable interface. It is not intended for public (client) use.
Since:
1.2

DataFlavor

public DataFlavor(Class representationClass,
                  String humanPresentableName)
Construct a DataFlavor that represents a Java class

The returned DataFlavor will have the following characteristics

representationClass = representationClass
mimeType = application/x-java-serialized-object

Parameters:
representationClass - the class used to transfer data in this flavor
humanPresentableName - the human-readable string used to identify this flavor. If this parameter is null then the value of the the MIME Content Type is used.

DataFlavor

public DataFlavor(String mimeType,
                  String humanPresentableName)
Construct a DataFlavor that represents a MimeType

The returned DataFlavor will have the following characteristics:

If the mimeType is "application/x-java-serialized-object; class=<representation class>", the result is the same as calling new DataFlavor(Class:forName(<representation class>) as above

otherwise:

representationClass = InputStream
mimeType = mimeType

Parameters:
mimeType - the string used to identify the MIME type for this flavor. If the the mimeType does not specify a "class=" parameter, or if the class is not successfully loaded, then an IllegalArgumentException is thrown.
humanPresentableName - the human-readable string used to identify this flavor. If this parameter is null then the value of the the MIME Content Type is used.

DataFlavor

public DataFlavor(String mimeType,
                  String humanPresentableName,
                  ClassLoader classLoader)
           throws ClassNotFoundException
Construct a DataFlavor that represents a MimeType

The returned DataFlavor will have the following characteristics:

If the mimeType is "application/x-java-serialized-object; class=<representation class>", the result is the same as calling new DataFlavor(Class:forName(<representation class>) as above

otherwise:

representationClass = InputStream
mimeType = mimeType

Parameters:
mimeType - the string used to identify the MIME type for this flavor
humanPresentableName - the human-readible string used to identify this flavor

DataFlavor

public DataFlavor(String mimeType)
           throws ClassNotFoundException
Construct a DataFlavor from a Mime Type string. The string can specify a "class=" parameter to create a DataFlavor with the desired representation class. If the string does not contain "class=" parameter, java.io.InputStream is used as default.
Parameters:
mimeType - the string used to identify the MIME type for this flavor. If the class specified by "class=" parameter is not successfully loaded, then an IllegalArgumentException is thrown.
Method Detail

tryToLoadClass

protected static final Class tryToLoadClass(String className,
                                            ClassLoader fallback)
                                     throws ClassNotFoundException
tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
Parameters:
fallback - the fallback loader
Throws:
ClassNotFoundException -

toString

public String toString()
String representation of this DataFlavor and its parameters. The result String contains name of DataFlavor class, representation class and Mime type of this Flavor.
Overrides:
toString in class Object
Returns:
string representation of this DataFlavor

getTextPlainUnicodeFlavor

public static final DataFlavor getTextPlainUnicodeFlavor()

selectBestTextFlavor

public static final DataFlavor selectBestTextFlavor(DataFlavor[] availableFlavors)
Returns:
the best (highest fidelity) flavor in an encoding supported by the JDK, or null if none can be found.

getReaderForText

public Reader getReaderForText(Transferable transferable)
                        throws UnsupportedFlavorException,
                               IOException
Gets a reader for an input stream, decoded for the expected charset (encoding). This works only if the representation class of this flavor is java.io.InputStream (or a subclass). In case of representation class being Reader the result will be this class itself.
Returns:
a Reader to read the data
Throws:
IllegalArgumentException - if the representation class is not java.io.InputStream or java.lang.String
IllegalArgumentException - if the charset (character encoding) is not supported by the JDK.
IllegalArgumentException - if the transferable has null data.
NullPointerException - if the transferable argument is null.
UnsupportedEncodingException - if the encoding is not supported by this flavor.
UnsupportedFlavorException - if the transferable does not support this flavor.
IOException - if the data cannot be read because of an I/O error.

getMimeType

public String getMimeType()
Returns the MIME type string for this DataFlavor

getRepresentationClass

public Class getRepresentationClass()
Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.

getHumanPresentableName

public String getHumanPresentableName()
Returns the human presentable name for the data foramt that this DataFlavor represents. This name would be localized for different countries

getPrimaryType

public String getPrimaryType()
Returns:
the primary MIME type of this DataFlavor

getSubType

public String getSubType()
Returns:
the Sub MIME type of this DataFlavor

getParameter

public String getParameter(String paramName)
Returns:
the value of the name parameter

setHumanPresentableName

public void setHumanPresentableName(String humanPresentableName)
Sets the human presentable name for the data format that this DataFlavor represents. This name would be localized for different countries

equals

public boolean equals(Object o)
If the object is an instance of DataFlavor, representationClass and MIME type will be compared. This method does not use equals(String) method, so it does not return true for the objects of String type.
Overrides:
equals in class Object
Returns:
if the objects are equal

equals

public boolean equals(DataFlavor that)
Two DataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal. Additionally, if the primary type is "text", the charset parameter must also be equal. If either DataFlavor is of primary type "text", but no charset is specified, the platform default charset is assumed for that DataFlavor.
Returns:
if the DataFlavors represent exactly the same type.

equals

public boolean equals(String s)
Deprecated. As inconsistent with hashCode() contract, use isMimeTypeEqual(String) instead.

Compare only the mimeType against the passed in String and representationClass is not considered in the comparison. If representationClass needs to be compared, then equals(new DataFlavor(s)) may be used.
Returns:
if the String (MimeType) is equal

hashCode

public int hashCode()
Returns hash code for this DataFlavor. For two equal DataFlavors, hash codes are equal. For the String that matches DataFlavor.equals(String), it is not guaranteed that DataFlavor's hash code is equal to the hash code of the String.
Overrides:
hashCode in class Object
Returns:
a hash code for this DataFlavor

match

public boolean match(DataFlavor that)
Two DataFlavors match if their primary types, subtypes, and representation classes are all equal. Additionally, if the primary type is "text", the charset parameter is also considered. If either DataFlavor is of primary type "text", but no charset is specified, the platform default charset is assumed for that DataFlavor.

isMimeTypeEqual

public boolean isMimeTypeEqual(String mimeType)
Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor. Parameters are not incuded in the comparison. The comparison may involve adding default attributes for some MIME types (such as adding charset=US-ASCII to text/plain MIME types that have no charset parameter specified).
Parameters:
mimeType - the string representation of the MIME type
Returns:
true if the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor; false otherwise.
Throws:
NullPointerException - if mimeType is null

isMimeTypeEqual

public final boolean isMimeTypeEqual(DataFlavor dataFlavor)
Compare the mimeType of two DataFlavor objects no parameters are considered
Returns:
if the MimeTypes are equal

isMimeTypeSerializedObject

public boolean isMimeTypeSerializedObject()
does the DataFlavor represent a serialized object?

getDefaultRepresentationClass

public final Class getDefaultRepresentationClass()

getDefaultRepresentationClassAsString

public final String getDefaultRepresentationClassAsString()

isRepresentationClassInputStream

public boolean isRepresentationClassInputStream()
does the DataFlavor represent a java.io.InputStream

isRepresentationClassSerializable

public boolean isRepresentationClassSerializable()
Returns:
true if the representation class can be serialized

isRepresentationClassRemote

public boolean isRepresentationClassRemote()
Returns:
true if the representation class is Remote

isFlavorSerializedObjectType

public boolean isFlavorSerializedObjectType()
Returns:
if the DataFlavor specified represents a Serialized Object

isFlavorRemoteObjectType

public boolean isFlavorRemoteObjectType()
Returns:
if the DataFlavor specified represents a Remote Object

isFlavorJavaFileListType

public boolean isFlavorJavaFileListType()
Returns:
if flavor specified represents a List of File objects

writeExternal

public void writeExternal(ObjectOutput os)
                   throws IOException
Serialize this DataFlavor
Specified by:
writeExternal in interface Externalizable
Following copied from interface: java.io.Externalizable
Parameters:
out - the stream to write the object to
Throws:
IOException - Includes any I/O exceptions that may occur

readExternal

public void readExternal(ObjectInput is)
                  throws IOException,
                         ClassNotFoundException
restore this DataFlavor from an Serialized state
Specified by:
readExternal in interface Externalizable
Following copied from interface: java.io.Externalizable
Parameters:
in - the stream to read data from in order to restore the object
Throws:
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored cannot be found.

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: Object
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:
 x.clone() != x
will be true, and that the expression:
 x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
 x.clone().equals(x)
will be true, this is not an absolute requirement. Copying an object will typically entail creating a new instance of its class, but it also may require copying of internal data structures as well. No constructors are called.

The method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.

The class Object does not itself implement the interface Cloneable, so calling the clone method on an object whose class is Object will result in throwing an exception at run time. The clone method is implemented by the class Object as a convenient, general utility for subclasses that implement the interface Cloneable, possibly also overriding the clone method, in which case the overriding definition can refer to this utility definition by the call:

 super.clone()
Overrides:
clone in class Object
Returns:
a clone of this DataFlavor

normalizeMimeTypeParameter

protected String normalizeMimeTypeParameter(String parameterName,
                                            String parameterValue)
Deprecated.

Called on DataFlavor for every MIME Type parameter to allow DataFlavor subclasses to handle special parameters like the text/plain charset parameters, whose values are case insensitive. (MIME type parameter values are supposed to be case sensitive.

This method is called for each parameter name/value pair and should return the normalized representation of the parameterValue This method is never invoked by this implementation from 1.1 onwards

normalizeMimeType

protected String normalizeMimeType(String mimeType)
Deprecated.

Called for each MIME type string to give DataFlavor subtypes the opportunity to change how the normalization of MIME types is accomplished. One possible use would be to add default parameter/value pairs in cases where none are present in the MIME type string passed in This method is never invoked by this implementation from 1.1 onwards
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlavorMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Interface FlavorMap

All Known Implementing Classes:
SystemFlavorMap
public interface FlavorMap

The FlavorMap is an interface to a map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.

This map is used by the DnD system to map platform data types to MIME types to enable the transfer of objects between Java and the platform via the platform DnD System.

Since:
1.2
See Also:
SystemFlavorMap

Method Summary
Map | getFlavorsForNatives(String[] natives) map natives to corresponding flavors
Map | getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names

Method Detail

getNativesForFlavors

public Map getNativesForFlavors(DataFlavor[] flavors)
map flavors to native data types names
Parameters:
flavors - The array of DataFlavors to map to native types, or null
Returns:
a Map object which contains between 0 or more entries with keys of type DataFlavor and values of type String, where the String values mapped (if any) are the native (platform dependent) data type name corresponding to the (platform independent) DataFlavor (MimeType). If the parameter is null then the Map returned should be the complete map of all mappings between DataFlavors and their corresponding native names known to the implementation at the time of the call. The Map returned is mutable and considered to be owned by the caller, thus allowing "nesting" of FlavorMap implementations.

getFlavorsForNatives

public Map getFlavorsForNatives(String[] natives)
map natives to corresponding flavors
Parameters:
native - The array of String native types to map to DataFlavors, or null
Returns:
a Map object which contains 0 or more entries with keys of type String and values of type DataFlavor, where the DataFlavor values mapped (if any) are the (platform independent) types corresponding to their native (platform dependent) data type names. If the parameter is null then the map returned should be the complete map of all mappings between native names and their corresponding DataFlavors known to the implementation at the time of the call. The Map returned is mutable and considered to be owned by the caller, thus allowing "nesting" of FlavorMap implementations.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MimeTypeParseException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class MimeTypeParseException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.datatransfer.MimeTypeParseException
All Implemented Interfaces:
Serializable
public class MimeTypeParseException
extends Exception

A class to encapsulate MimeType parsing related exceptions

See Also:
Serialized Form

Constructor Summary
MimeTypeParseException()
Constructs a MimeTypeParseException with no specified detail message.
MimeTypeParseException(String s)
Constructs a MimeTypeParseException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MimeTypeParseException

public MimeTypeParseException()
Constructs a MimeTypeParseException with no specified detail message.

MimeTypeParseException

public MimeTypeParseException(String s)
Constructs a MimeTypeParseException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


StringSelection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class StringSelection

java.lang.Object
  |
  +--java.awt.datatransfer.StringSelection
All Implemented Interfaces:
ClipboardOwner, Transferable
public class StringSelection
extends Object
implements Transferable, ClipboardOwner

A Transferable which implements the capability required to transfer a String. This Transferable properly supports DataFlavor.stringFlavor and all equivalent flavors. Support for DataFlavor.plainTextFlavor and all equivalent flavors is deprecated. No other DataFlavors are supported.

See Also:
java.awt.datatransfer.DataFlavor.stringFlavor, java.awt.datatransfer.DataFlavor.plainTextFlavor

Constructor Summary
StringSelection(String data)
Creates a Transferable capable of transferring the specified String.
Method Summary
Object | getTransferData(DataFlavor flavor) Returns the Transferable's data in the requested DataFlavor if possible.
DataFlavor[] | getTransferDataFlavors() Returns an array of flavors in which this Transferable can provide the data.
boolean | isDataFlavorSupported(DataFlavor flavor) Returns whether the requested flavor is supported by this Transferable.
void | lostOwnership(Clipboard clipboard, Transferable contents) Notifies this object that it is no longer the owner of the contents of the clipboard.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringSelection

public StringSelection(String data)
Creates a Transferable capable of transferring the specified String.
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns an array of flavors in which this Transferable can provide the data. DataFlavor.stringFlavor is properly supported. Support for DataFlavor.plainTextFlavor is deprecated.
Specified by:
getTransferDataFlavors in interface Transferable
Returns:
an array of length two, whose elements are DataFlavor. stringFlavor and DataFlavor.plainTextFlavor.

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by this Transferable.
Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the requested flavor for the data
Returns:
true if flavor is equal to DataFlavor.stringFlavor or DataFlavor.plainTextFlavor; false if flavor is not one of the above flavors
Throws:
NullPointerException - if flavor is null

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Returns the Transferable's data in the requested DataFlavor if possible. If the desired flavor is DataFlavor.stringFlavor, or an equivalent flavor, the String representing the selection is returned. If the desired flavor is DataFlavor.plainTextFlavor , or an equivalent flavor, a Reader is returned. Note: The behavior of this method for DataFlavor.plainTextFlavor and equivalent DataFlavors is inconsistent with the definition of DataFlavor.plainTextFlavor.
Specified by:
getTransferData in interface Transferable
Parameters:
flavor - the requested flavor for the data
Returns:
the data in the requested flavor, as outlined above.
Throws:
UnsupportedFlavorException - if the requested data flavor is not equivalent to either DataFlavor.stringFlavor or DataFlavor.plainTextFlavor.
IOException - if an IOException occurs while retrieving the data. By default, StringSelection never throws this exception, but a subclass may.
NullPointerException - if flavor is null
See Also:
Reader

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
Description copied from interface: ClipboardOwner
Notifies this object that it is no longer the owner of the contents of the clipboard.
Specified by:
lostOwnership in interface ClipboardOwner
Following copied from interface: java.awt.datatransfer.ClipboardOwner
Parameters:
clipboard - the clipboard that is no longer owned
contents - the contents which this owner had placed on the clipboard
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemFlavorMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class SystemFlavorMap

java.lang.Object
  |
  +--java.awt.datatransfer.SystemFlavorMap
All Implemented Interfaces:
FlavorMap
public final class SystemFlavorMap
extends Object
implements FlavorMap

The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.

This map is used by the DnD system to map platform data types to MIME types to enable the transfer of objects between Java and the platform via the platform DnD System.

Since:
1.2

Method Summary
static DataFlavor | decodeDataFlavor(String atom)
static String | decodeJavaMIMEType(String atom)
static String | encodeDataFlavor(DataFlavor df)
static String | encodeJavaMIMEType(String mimeType)
static FlavorMap | getDefaultFlavorMap() get the default system implementation
Map | getFlavorsForNatives(String[] natives) map natives to corresponding flavors
Map | getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names
static boolean | isJavaMIMEType(String atom)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getDefaultFlavorMap

public static FlavorMap getDefaultFlavorMap()
get the default system implementation

getNativesForFlavors

public Map getNativesForFlavors(DataFlavor[] flavors)
map flavors to native data types names
Specified by:
getNativesForFlavors in interface FlavorMap
Following copied from interface: java.awt.datatransfer.FlavorMap
Parameters:
flavors - The array of DataFlavors to map to native types, or null
Returns:
a Map object which contains between 0 or more entries with keys of type DataFlavor and values of type String, where the String values mapped (if any) are the native (platform dependent) data type name corresponding to the (platform independent) DataFlavor (MimeType). If the parameter is null then the Map returned should be the complete map of all mappings between DataFlavors and their corresponding native names known to the implementation at the time of the call. The Map returned is mutable and considered to be owned by the caller, thus allowing "nesting" of FlavorMap implementations.

getFlavorsForNatives

public Map getFlavorsForNatives(String[] natives)
map natives to corresponding flavors
Specified by:
getFlavorsForNatives in interface FlavorMap
Following copied from interface: java.awt.datatransfer.FlavorMap
Parameters:
native - The array of String native types to map to DataFlavors, or null
Returns:
a Map object which contains 0 or more entries with keys of type String and values of type DataFlavor, where the DataFlavor values mapped (if any) are the (platform independent) types corresponding to their native (platform dependent) data type names. If the parameter is null then the map returned should be the complete map of all mappings between native names and their corresponding DataFlavors known to the implementation at the time of the call. The Map returned is mutable and considered to be owned by the caller, thus allowing "nesting" of FlavorMap implementations.

encodeJavaMIMEType

public static String encodeJavaMIMEType(String mimeType)
Returns:
encode a Java MIMEType for use as a native type name

encodeDataFlavor

public static String encodeDataFlavor(DataFlavor df)
Returns:
encode a Java MIMEType for use as a native type name

isJavaMIMEType

public static boolean isJavaMIMEType(String atom)
Returns:
if the native type string is an encoded Java MIMEType

decodeJavaMIMEType

public static String decodeJavaMIMEType(String atom)
Returns:
the decoded Java MIMEType string

decodeDataFlavor

public static DataFlavor decodeDataFlavor(String atom)
                                   throws ClassNotFoundException
Returns:
the decoded Java MIMEType as a DataFlavor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Transferable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Interface Transferable

All Known Implementing Classes:
StringSelection, DropTargetContext.TransferableProxy
public interface Transferable

Defines the interface for classes that can be used to provide data for a transfer operation.

Method Summary
Object | getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.
DataFlavor[] | getTransferDataFlavors() Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
boolean | isDataFlavorSupported(DataFlavor flavor) Returns whether or not the specified data flavor is supported for this object.

Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).
Returns:
an array of data flavors in which this data can be transferred

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.
Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating wjether or not the data flavor is supported

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.
Parameters:
flavor - the requested flavor for the data
Throws:
IOException - if the data is no longer available in the requested flavor.
UnsupportedFlavorException - if the requested data flavor is not supported.
See Also:
DataFlavor.getRepresentationClass()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnsupportedFlavorException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.datatransfer
Class UnsupportedFlavorException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.datatransfer.UnsupportedFlavorException
All Implemented Interfaces:
Serializable
public class UnsupportedFlavorException
extends Exception

Signals that the requested data is not supported in this flavor.

See Also:
Transferable.getTransferData(java.awt.datatransfer.DataFlavor), Serialized Form

Constructor Summary
UnsupportedFlavorException(DataFlavor flavor)
Constructs an UnsupportedFlavorException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedFlavorException

public UnsupportedFlavorException(DataFlavor flavor)
Constructs an UnsupportedFlavorException.
Parameters:
flavor - the flavor object which caused the exception
Throws:
NullPointerException - if flavor is null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DefaultSelectionType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes.DefaultSelectionType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.JobAttributes.DefaultSelectionType
Enclosing class:
JobAttributes
public static final class JobAttributes.DefaultSelectionType
extends java.awt.AttributeValue

A type-safe enumeration of possible default selection states.

Field Summary
static JobAttributes.DefaultSelectionType | ALL The DefaultSelectionType instance to use for specifying that all pages of the job should be printed.
static JobAttributes.DefaultSelectionType | RANGE The DefaultSelectionType instance to use for specifying that a range of pages of the job should be printed.
static JobAttributes.DefaultSelectionType | SELECTION The DefaultSelectionType instance to use for specifying that the current selection should be printed.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ALL

public static final JobAttributes.DefaultSelectionType ALL
The DefaultSelectionType instance to use for specifying that all pages of the job should be printed.

RANGE

public static final JobAttributes.DefaultSelectionType RANGE
The DefaultSelectionType instance to use for specifying that a range of pages of the job should be printed.

SELECTION

public static final JobAttributes.DefaultSelectionType SELECTION
The DefaultSelectionType instance to use for specifying that the current selection should be printed.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DestinationType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes.DestinationType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.JobAttributes.DestinationType
Enclosing class:
JobAttributes
public static final class JobAttributes.DestinationType
extends java.awt.AttributeValue

A type-safe enumeration of possible job destinations.

Field Summary
static JobAttributes.DestinationType | FILE The DestinationType instance to use for specifying print to file.
static JobAttributes.DestinationType | PRINTER The DestinationType instance to use for specifying print to printer.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

FILE

public static final JobAttributes.DestinationType FILE
The DestinationType instance to use for specifying print to file.

PRINTER

public static final JobAttributes.DestinationType PRINTER
The DestinationType instance to use for specifying print to printer.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Dialog

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Dialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
FileDialog, JDialog
public class Dialog
extends Window

A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user. The size of the dialog includes any area designated for the border. The dimensions of the border area can be obtained using the getInsets method, however, since these dimensions are platform-dependent, a valid insets value cannot be obtained until the dialog is made displayable by either calling pack or show. Since the border area is included in the overall size of the dialog, the border effectively obscures a portion of the dialog, constraining the area available for rendering and/or displaying subcomponents to the rectangle which has an upper-left corner location of (insets.left, insets.top), and has a size of width - (insets.left + insets.right) by height - (insets.top + insets.bottom).

The default layout for a dialog is BorderLayout.

A dialog must have either a frame or another dialog defined as its owner when it's constructed. When the owner window of a visible dialog is hidden or minimized, the dialog will automatically be hidden from the user. When the owner window is subsequently re-opened, then the dialog is made visible to the user again.

A dialog can be either modeless (the default) or modal. A modal dialog is one which blocks input to all other toplevel windows in the app context, except for any windows created with the dialog as their owner.

Dialogs are capable of generating the following window events: WindowOpened, WindowClosing, WindowClosed, WindowActivated, WindowDeactivated.

Since:
JDK1.0
See Also:
WindowEvent, Window.addWindowListener(java.awt.event.WindowListener), Serialized Form

Inner Class Summary
protected  class Dialog.AccessibleAWTDialog
This class implements accessibility support for the Dialog class.
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Dialog(Dialog owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner dialog.
Dialog(Dialog owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner dialog and title.
Dialog(Dialog owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner dialog, title, and modality.
Dialog(Frame owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner frame.
Dialog(Frame owner, boolean modal)
Constructs an initially invisible Dialog with an empty title, the specified owner frame and modality.
Dialog(Frame owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner frame and title.
Dialog(Frame owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner frame, title, and modality.
Method Summary
 void addNotify()
Makes this Dialog displayable by connecting it to a native screen resource.
 void dispose()
Disposes the Dialog and then causes show() to return if it is currently blocked.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Dialog.
 String getTitle()
Gets the title of the dialog.
 void hide()
Hides the Dialog and then causes show() to return if it is currently blocked.
 boolean isModal()
Indicates whether the dialog is modal.
 boolean isResizable()
Indicates whether this dialog is resizable by the user.
protected  String paramString()
Returns the parameter string representing the state of this dialog window.
 void setModal(boolean b)
Specifies whether this dialog should be modal.
 void setResizable(boolean resizable)
Sets whether this dialog is resizable by the user.
 void setTitle(String title)
Sets the title of the Dialog.
 void show()
Makes the Dialog visible.
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Dialog

public Dialog(Frame owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner frame.
Parameters:
owner - the owner of the dialog
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Frame owner,
              boolean modal)
Constructs an initially invisible Dialog with an empty title, the specified owner frame and modality.
Parameters:
owner - the owner of the dialog
modal - if true, dialog blocks input to other app windows when shown
Throws:
IllegalArgumentException - if owner is null

Dialog

public Dialog(Frame owner,
              String title)
Constructs an initially invisible, non-modal Dialog with the specified owner frame and title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Frame owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with the specified owner frame, title, and modality.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
modal - if true, dialog blocks input to other app windows when shown
Throws:
IllegalArgumentException - if owner is null
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Dialog

public Dialog(Dialog owner)
Constructs an initially invisible, non-modal Dialog with an empty title and the specified owner dialog.
Parameters:
owner - the owner of the dialog
Throws:
IllegalArgumentException - if owner is null
Since:
1.2

Dialog

public Dialog(Dialog owner,
              String title)
Constructs an initially invisible, non-modal Dialog with the specified owner dialog and title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
Throws:
IllegalArgumentException - if owner is null
Since:
1.2

Dialog

public Dialog(Dialog owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with the specified owner dialog, title, and modality.
Parameters:
owner - the owner of the dialog
title - the title of the dialog. A null value will be accepted without causing a NullPointerException to be thrown.
modal - if true, dialog blocks input to other app windows when shown
Throws:
IllegalArgumentException - if owner is null
Since:
1.2
Method Detail

addNotify

public void addNotify()
Makes this Dialog displayable by connecting it to a native screen resource. Making a dialog displayable will cause any of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs.
Overrides:
addNotify in class Window
See Also:
Component.isDisplayable(), Container.removeNotify()

isModal

public boolean isModal()
Indicates whether the dialog is modal. When a modal Dialog is made visible, user input will be blocked to the other windows in the app context, except for any windows created with this dialog as their owner.
Returns:
true if this dialog window is modal; false otherwise.
See Also:
setModal(boolean)

setModal

public void setModal(boolean b)
Specifies whether this dialog should be modal.
Since:
JDK1.1
See Also:
isModal()

getTitle

public String getTitle()
Gets the title of the dialog. The title is displayed in the dialog's border.
Returns:
the title of this dialog window. The title may be null.
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(String title)
Sets the title of the Dialog.
Parameters:
title - the title displayed in the dialog's border
See Also:
getTitle()

show

public void show()
Makes the Dialog visible. If the dialog and/or its owner are not yet displayable, both are made displayable. The dialog will be validated prior to being made visible. If the dialog is already visible, this will bring the dialog to the front.

If the dialog is modal and is not already visible, this call will not return until the dialog is hidden by calling hide or dispose. It is permissible to show modal dialogs from the event dispatching thread because the toolkit will ensure that another event pump runs while the one which invoked this method is blocked.

Overrides:
show in class Window
See Also:
Component.hide(),
Component.isDisplayable(),
Component.validate(),
isModal()

hide

public void hide()
Hides the Dialog and then causes show() to return if it is currently blocked.
Overrides:
hide in class Window
Following copied from class: java.awt.Window
See Also:
Window.show(), Window.dispose()

dispose

public void dispose()
Disposes the Dialog and then causes show() to return if it is currently blocked.
Overrides:
dispose in class Window
Following copied from class: java.awt.Window
See Also:
Component.isDisplayable(),
Window.pack(),
Window.show()

isResizable

public boolean isResizable()
Indicates whether this dialog is resizable by the user.
Returns:
true if the user can resize the dialog; false otherwise.
See Also:
setResizable(boolean)

setResizable

public void setResizable(boolean resizable)
Sets whether this dialog is resizable by the user.
Parameters:
resizable - true if the user can resize this dialog; false otherwise.
See Also:
isResizable()

paramString

protected String paramString()
Returns the parameter string representing the state of this dialog window. This string is useful for debugging.
Overrides:
paramString in class Container
Returns:
the parameter string of this dialog window.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Dialog. For dialogs, the AccessibleContext takes the form of an AccessibleAWTDialog. A new AccessibleAWTDialog instance is created if necessary.
Overrides:
getAccessibleContext in class Window
Returns:
an AccessibleAWTDialog that serves as the AccessibleContext of this Dialog
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DialogType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes.DialogType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.JobAttributes.DialogType
Enclosing class:
JobAttributes
public static final class JobAttributes.DialogType
extends java.awt.AttributeValue

A type-safe enumeration of possible dialogs to display to the user.

Field Summary
static JobAttributes.DialogType | COMMON The DialogType instance to use for specifying the cross-platform, pure Java print dialog.
static JobAttributes.DialogType | NATIVE The DialogType instance to use for specifying the platform's native print dialog.
static JobAttributes.DialogType | NONE The DialogType instance to use for specifying no print dialog.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

COMMON

public static final JobAttributes.DialogType COMMON
The DialogType instance to use for specifying the cross-platform, pure Java print dialog.

NATIVE

public static final JobAttributes.DialogType NATIVE
The DialogType instance to use for specifying the platform's native print dialog.

NONE

public static final JobAttributes.DialogType NONE
The DialogType instance to use for specifying no print dialog.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Dimension

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Dimension

java.lang.Object
  |
  +--java.awt.geom.Dimension2D
        |
        +--java.awt.Dimension
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
DimensionUIResource
public class Dimension
extends Dimension2D
implements Serializable

The Dimension class encapsulates the width and height of a component (in integer precision) in a single object. The class is associated with certain properties of components. Several methods defined by the Component class and the LayoutManager interface return a Dimension object.

Normally the values of width and height are non-negative integers. The constructors that allow you to create a dimension do not prevent you from setting a negative value for these properties. If the value of width or height is negative, the behavior of some methods defined by other objects is undefined.

Since:
JDK1.0
See Also:
Component, LayoutManager, Serialized Form

Field Summary
int | height The height dimension.
int | width The width dimension.
Constructor Summary
Dimension()
Creates an instance of Dimension with a width of zero and a height of zero.
Dimension(Dimension d)
Creates an instance of Dimension whose width and height are the same as for the specified dimension.
Dimension(int width, int height)
Constructs a Dimension and initializes it to the specified width and specified height.
Method Summary
boolean | equals(Object obj) Checks whether two dimension objects have equal values.
double | getHeight() Returns the height of this dimension in double precision.
Dimension | getSize() Gets the size of this Dimension object.
double | getWidth() Returns the width of this dimension in double precision.
int | hashCode() Returns the hash code for this Dimension.
void | setSize(Dimension d) Set the size of this Dimension object to the specified size.
void | setSize(double width, double height) Set the size of this Dimension object to the specified width and height in double precision.
void | setSize(int width, int height) Set the size of this Dimension object to the specified width and height.
String | toString() Returns a string representation of the values of this Dimension object's height and width fields.
Methods inherited from class java.awt.geom.Dimension2D
clone, setSize
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

width

public int width
The width dimension. Negative values can be used.
See Also:
getSize(), setSize(double, double)

height

public int height
The height dimension. Negative values can be used.
See Also:
getSize(), setSize(double, double)
Constructor Detail

Dimension

public Dimension()
Creates an instance of Dimension with a width of zero and a height of zero.

Dimension

public Dimension(Dimension d)
Creates an instance of Dimension whose width and height are the same as for the specified dimension.
Parameters:
d - the specified dimension for the width and height values.

Dimension

public Dimension(int width,
                 int height)
Constructs a Dimension and initializes it to the specified width and specified height.
Parameters:
width - the specified width dimension
height - the specified height dimension
Method Detail

getWidth

public double getWidth()
Returns the width of this dimension in double precision.
Overrides:
getWidth in class Dimension2D
Following copied from class: java.awt.geom.Dimension2D
Returns:
the width of this Dimension.

getHeight

public double getHeight()
Returns the height of this dimension in double precision.
Overrides:
getHeight in class Dimension2D
Following copied from class: java.awt.geom.Dimension2D
Returns:
the height of this Dimension.

setSize

public void setSize(double width,
                    double height)
Set the size of this Dimension object to the specified width and height in double precision.
Overrides:
setSize in class Dimension2D
Parameters:
width - the new width for the Dimension object
height - the new height for the Dimension object

getSize

public Dimension getSize()
Gets the size of this Dimension object. This method is included for completeness, to parallel the getSize method defined by Component.
Returns:
the size of this dimension, a new instance of Dimension with the same width and height.
Since:
JDK1.1
See Also:
setSize(double, double), Component.getSize()

setSize

public void setSize(Dimension d)
Set the size of this Dimension object to the specified size. This method is included for completeness, to parallel the setSize method defined by Component.
Parameters:
d - the new size for this Dimension object.
Since:
JDK1.1
See Also:
getSize(), Component.setSize(int, int)

setSize

public void setSize(int width,
                    int height)
Set the size of this Dimension object to the specified width and height. This method is included for completeness, to parallel the setSize method defined by Component.
Parameters:
width - the new width for this Dimension object.
height - the new height for this Dimension object.
Since:
JDK1.1
See Also:
getSize(), Component.setSize(int, int)

equals

public boolean equals(Object obj)
Checks whether two dimension objects have equal values.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns the hash code for this Dimension.
Overrides:
hashCode in class Object
Returns:
a hash code for this Dimension.

toString

public String toString()
Returns a string representation of the values of this Dimension object's height and width fields. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
toString in class Object
Returns:
a string representation of this Dimension object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.dnd Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.dnd

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.dnd.DnDConstants
    • class java.awt.dnd.DragGestureRecognizer
      • class java.awt.dnd.MouseDragGestureRecognizer (implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener)
    • class java.awt.dnd.DragSource
    • class java.awt.dnd.DragSourceContext (implements java.awt.dnd.DragSourceListener)
    • class java.awt.dnd.DropTarget (implements java.awt.dnd.DropTargetListener, java.io.Serializable)
    • class java.awt.dnd.DropTarget.DropTargetAutoScroller (implements java.awt.event.ActionListener)
    • class java.awt.dnd.DropTargetContext
    • class java.awt.dnd.DropTargetContext.TransferableProxy (implements java.awt.datatransfer.Transferable)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.awt.dnd.DragGestureEvent
      • class java.awt.dnd.DragSourceEvent
        • class java.awt.dnd.DragSourceDragEvent
        • class java.awt.dnd.DragSourceDropEvent
      • class java.awt.dnd.DropTargetEvent
        • class java.awt.dnd.DropTargetDragEvent
        • class java.awt.dnd.DropTargetDropEvent
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class java.lang.IllegalStateException
            • class java.awt.dnd.InvalidDnDOperationException

Interface Hierarchy

  • interface java.awt.dnd.Autoscroll
  • interface java.util.EventListener
    • interface java.awt.dnd.DragGestureListener
    • interface java.awt.dnd.DragSourceListener
    • interface java.awt.dnd.DropTargetListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package 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.

See:
Description

Interface Summary
Autoscroll | During DnD operations it is possible that a user may wish to drop the subject of the operation on a region of a scrollable GUI control that is not currently visible to the user.
DragGestureListener | This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.
DragSourceListener | The DragSourceListener defines the event interface for originators of Drag and Drop operations to track the state of the user's gesture, and to provide appropriate "drag over" feedback to the user throughout the Drag and Drop operation.
DropTargetListener | The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget.

Class Summary
DnDConstants | This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation.
DragGestureEvent | A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
DragGestureRecognizer | The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.
DragSource | The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
DragSourceContext | The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
DragSourceDragEvent | The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
DragSourceDropEvent | The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
DragSourceEvent | This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
DropTarget | The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
DropTarget.DropTargetAutoScroller | this protected nested class implements autoscrolling
DropTargetContext | A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget.
DropTargetDragEvent | The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
DropTargetDropEvent | The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
DropTargetEvent | The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.
MouseDragGestureRecognizer | This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Exception Summary
InvalidDnDOperationException This exception is thrown by various methods in the java.awt.dnd package.

Package java.awt.dnd Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.dnd

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.dnd

Packages that use java.awt.dnd
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Classes in java.awt.dnd used by java.awt
DragGestureEvent
A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
DragGestureListener
This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.
DragGestureRecognizer
The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.
DragSource
The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
DropTarget
The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Classes in java.awt.dnd used by java.awt.dnd
DragGestureEvent
A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
DragGestureListener
This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.
DragGestureRecognizer
The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.
DragSource
The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
DragSourceContext
The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
DragSourceDragEvent
The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
DragSourceDropEvent
The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
DragSourceEvent
This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
DragSourceListener
The DragSourceListener defines the event interface for originators of Drag and Drop operations to track the state of the user's gesture, and to provide appropriate "drag over" feedback to the user throughout the Drag and Drop operation.
DropTarget
The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
DropTarget.DropTargetAutoScroller
this protected nested class implements autoscrolling
DropTargetContext
A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget.
DropTargetDragEvent
The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
DropTargetDropEvent
The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
DropTargetEvent
The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.
DropTargetListener
The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget.
InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Autoscroll

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Interface Autoscroll

public interface Autoscroll

During DnD operations it is possible that a user may wish to drop the subject of the operation on a region of a scrollable GUI control that is not currently visible to the user.

In such situations it is desirable that the GUI control detect this and institute a scroll operation in order to make obscured region(s) visible to the user. This feature is known as autoscrolling.

If a GUI control is both an active DropTarget and is also scrollable, it can receive notifications of autoscrolling gestures by the user from the DnD system by implementing this interface.

An autoscrolling gesture is initiated by the user by keeping the drag cursor motionless with a border region of the Component, referred to as the "autoscrolling region", for a predefined period of time, this will result in repeated scroll requests to the Component until the drag Cursor resumes its motion.

Since:
1.2

Method Summary
void | autoscroll(Point cursorLocn) notify the Component to autoscroll
Insets | getAutoscrollInsets() This method returns the Insets describing the autoscrolling region or border relative to the geometry of the implementing Component.

Method Detail

getAutoscrollInsets

public Insets getAutoscrollInsets()
This method returns the Insets describing the autoscrolling region or border relative to the geometry of the implementing Component.

This value is read once by the DropTarget upon entry of the drag Cursor into the associated Component.

Returns:
the Insets

autoscroll

public void autoscroll(Point cursorLocn)
notify the Component to autoscroll

Parameters:
cursorLocn - A Point indicating the location of the cursor that triggered this operation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.dnd.DnDConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DnDConstants

No usage of java.awt.dnd.DnDConstants

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTargetContext.TransferableProxy

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTargetContext.TransferableProxy

No usage of java.awt.dnd.DropTargetContext.TransferableProxy

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.MouseDragGestureRecognizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.MouseDragGestureRecognizer

No usage of java.awt.dnd.MouseDragGestureRecognizer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.dnd.Autoscroll

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.dnd.Autoscroll

No usage of java.awt.dnd.Autoscroll

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragGestureEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragGestureEvent

Packages that use DragGestureEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of DragGestureEvent in java.awt

Methods in java.awt with parameters of type DragGestureEvent
abstract  java.awt.dnd.peer.DragSourceContextPeer Toolkit.createDragSourceContextPeer(DragGestureEvent dge)
create the peer for a DragSourceContext

Uses of DragGestureEvent in java.awt.dnd

Methods in java.awt.dnd that return DragGestureEvent
 DragGestureEvent DragSourceContext.getTrigger()
This method returns the DragGestureEvent that initially triggered the drag.

Methods in java.awt.dnd with parameters of type DragGestureEvent
void | DragGestureListener.dragGestureRecognized(DragGestureEvent dge) A DragGestureRecognizer has detected a platform-dependent drag initiating gesture and is notifying this listener in order for it to initiate the action for the user.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.

Constructors in java.awt.dnd with parameters of type DragGestureEvent
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragGestureRecognizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragGestureRecognizer

Packages that use DragGestureRecognizer
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of DragGestureRecognizer in java.awt

Methods in java.awt that return DragGestureRecognizer
 DragGestureRecognizer Toolkit.createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation

Uses of DragGestureRecognizer in java.awt.dnd

Subclasses of DragGestureRecognizer in java.awt.dnd
 class MouseDragGestureRecognizer
This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Methods in java.awt.dnd that return DragGestureRecognizer
DragGestureRecognizer | DragSource.createDragGestureRecognizer(Class recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
DragGestureRecognizer | DragSource.createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.
DragGestureRecognizer | DragGestureEvent.getSourceAsDragGestureRecognizer() This method returns the source as a DragGestureRecognizer.

Constructors in java.awt.dnd with parameters of type DragGestureRecognizer
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragSource

Packages that use DragSource
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of DragSource in java.awt

Methods in java.awt with parameters of type DragSource
 DragGestureRecognizer Toolkit.createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation

Uses of DragSource in java.awt.dnd

Fields in java.awt.dnd declared as DragSource
protected  DragSource DragGestureRecognizer.dragSource
The DragSource associated with this DragGestureRecognizer.

Methods in java.awt.dnd that return DragSource
DragSource | DragGestureRecognizer.getDragSource() This method returns the DragSource this DragGestureRecognizer will use in order to process the Drag and Drop operation.
static DragSource | DragSource.getDefaultDragSource() This method returns the DragSource object associated with the underlying platform.
DragSource | DragSourceContext.getDragSource() This method returns the DragSource that instantiated this DragSourceContext.
DragSource | DragGestureEvent.getDragSource() This method returns the DragSource.

Constructors in java.awt.dnd with parameters of type DragSource
DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.
DragGestureRecognizer(DragSource ds, Component c, int sa)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.
DragGestureRecognizer(DragSource ds, Component c)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, and the Component this DragGestureRecognizer should "observe" for drag initiating gestures.
DragGestureRecognizer(DragSource ds)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation.
MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.
MouseDragGestureRecognizer(DragSource ds, Component c, int act)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.
MouseDragGestureRecognizer(DragSource ds, Component c)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.
MouseDragGestureRecognizer(DragSource ds)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragSourceContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragSourceContext

Packages that use DragSourceContext
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.

Uses of DragSourceContext in java.awt.dnd

Methods in java.awt.dnd that return DragSourceContext
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
DragSourceContext | DragSourceEvent.getDragSourceContext() This method returns the DragSourceContext that originated the event.

Constructors in java.awt.dnd with parameters of type DragSourceContext
DragSourceEvent(DragSourceContext dsc)
Construct a DragSourceEvent given a specified DragSourceContext.
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers)
Constructs a DragSourceDragEvent.
DragSourceDropEvent(DragSourceContext dsc, int action, boolean success)
Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, and a boolean indicating if the drop was successful.
DragSourceDropEvent(DragSourceContext dsc)
Construct a DragSourceDropEvent for a drag that does not result in a drop.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragSourceDragEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragSourceDragEvent

Packages that use DragSourceDragEvent
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.

Uses of DragSourceDragEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type DragSourceDragEvent
 void DragSourceContext.dragEnter(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dragEnter() from the peer.
 void DragSourceContext.dragOver(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dragOver() from the peer.
 void DragSourceContext.dropActionChanged(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dropActionChanged() from the peer.
 void DragSourceListener.dragEnter(DragSourceDragEvent dsde)
Called as the hotspot enters a platform dependent drop site.
 void DragSourceListener.dragOver(DragSourceDragEvent dsde)
Called as the hotspot moves over a platform dependent drop site.
 void DragSourceListener.dropActionChanged(DragSourceDragEvent dsde)
Called when the user has modified the drop gesture.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragSourceDropEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragSourceDropEvent

Packages that use DragSourceDropEvent
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.

Uses of DragSourceDropEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type DragSourceDropEvent
 void DragSourceContext.dragDropEnd(DragSourceDropEvent dsde)
This method intercepts the DragSourceDropEvent associated with dragDropEnd() from the peer.
 void DragSourceListener.dragDropEnd(DragSourceDropEvent dsde)
This method is invoked to signify that the Drag and Drop operation is complete.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DragSourceEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DragSourceEvent

Packages that use DragSourceEvent
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.

Uses of DragSourceEvent in java.awt.dnd

Subclasses of DragSourceEvent in java.awt.dnd
class | DragSourceDragEvent The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
class | DragSourceDropEvent The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.

Methods in java.awt.dnd with parameters of type DragSourceEvent
 void DragSourceContext.dragExit(DragSourceEvent dse)
This method intercepts the DragSourceEvent associated with dragExit() from the peer.
 void DragSourceListener.dragExit(DragSourceEvent dse)
Called as the hotspot exits a platform dependent drop site.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTarget

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTarget

Packages that use DropTarget
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of DropTarget in java.awt

Methods in java.awt that return DropTarget
 DropTarget Component.getDropTarget()
Get the DropTarget associated with this Component

Methods in java.awt with parameters of type DropTarget
 void Component.setDropTarget(DropTarget dt)
Associate a DropTarget with this Component.

Uses of DropTarget in java.awt.dnd

Methods in java.awt.dnd that return DropTarget
 DropTarget DropTargetContext.getDropTarget()
This method returns the DropTarget associated with this DropTargetContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTarget.DropTargetAutoScroller

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTarget.DropTargetAutoScroller

Packages that use DropTarget.DropTargetAutoScroller
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.

Uses of DropTarget.DropTargetAutoScroller in java.awt.dnd

Methods in java.awt.dnd that return DropTarget.DropTargetAutoScroller
protected  DropTarget.DropTargetAutoScroller DropTarget.createDropTargetAutoScroller(Component c, Point p)
create an embedded autoscroller

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTargetContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTargetContext

Packages that use DropTargetContext
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.

Uses of DropTargetContext in java.awt.dnd

Fields in java.awt.dnd declared as DropTargetContext
protected  DropTargetContext DropTargetEvent.context
The DropTargetConext associated with this DropTargetEvent.

Methods in java.awt.dnd that return DropTargetContext
DropTargetContext | DropTargetEvent.getDropTargetContext() This method returns the DropTargetContext associated with this DropTargetEvent.
DropTargetContext | DropTarget.getDropTargetContext() This method returns the DropTargetContext associated with this DropTarget.
protected DropTargetContext | DropTarget.createDropTargetContext() Create the DropTargetContext associated with this DropTarget.

Constructors in java.awt.dnd with parameters of type DropTargetContext
DropTargetEvent(DropTargetContext dtc)
Construct a DropTargetEvent with a specified DropTargetContext.
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDropEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and the current set of actions supported by the source.
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)
Construct a DropTargetEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, the current set of actions supported by the source, and a boolean indicating if the source is in the same JVM as the target.
DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDragEvent given the DropTargetContext for this operation, the location of the "Drag" Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and current set of actions supported by the source.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTargetDragEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTargetDragEvent

Packages that use DropTargetDragEvent
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.

Uses of DropTargetDragEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type DropTargetDragEvent
 void DropTarget.dragEnter(DropTargetDragEvent dtde)
The DropTarget intercepts dragEnter() notifications before the registered DropTargetListener gets them.
 void DropTarget.dragOver(DropTargetDragEvent dtde)
The DropTarget intercepts dragOver() notifications before the registered DropTargetListener gets them.
 void DropTarget.dropActionChanged(DropTargetDragEvent dtde)
The DropTarget intercepts dropActionChanged() notifications before the registered DropTargetListener gets them.
 void DropTargetListener.dragEnter(DropTargetDragEvent dtde)
Called when a drag operation has encountered the DropTarget.
 void DropTargetListener.dragOver(DropTargetDragEvent dtde)
Called when a drag operation is ongoing on the DropTarget.
 void DropTargetListener.dropActionChanged(DropTargetDragEvent dtde)
Called if the user has modified the current drop gesture.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTargetDropEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTargetDropEvent

Packages that use DropTargetDropEvent
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.

Uses of DropTargetDropEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type DropTargetDropEvent
 void DropTarget.drop(DropTargetDropEvent dtde)
The DropTarget intercepts drop() notifications before the registered DropTargetListener gets them.
 void DropTargetListener.drop(DropTargetDropEvent dtde)
The drag operation has terminated with a drop on this DropTarget.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.DropTargetEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.DropTargetEvent

Packages that use DropTargetEvent
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.

Uses of DropTargetEvent in java.awt.dnd

Subclasses of DropTargetEvent in java.awt.dnd
class | DropTargetDragEvent The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
class | DropTargetDropEvent The DropTargetDropEvent is delivered via the DropTargetListener drop() method.

Methods in java.awt.dnd with parameters of type DropTargetEvent
 void DropTarget.dragExit(DropTargetEvent dte)
The DropTarget intercepts dragExit() notifications before the registered DropTargetListener gets them.
 void DropTargetListener.dragExit(DropTargetEvent dte)
The drag operation has departed the DropTarget without dropping.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.dnd.InvalidDnDOperationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.dnd.InvalidDnDOperationException

Packages that use InvalidDnDOperationException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of InvalidDnDOperationException in java.awt

Methods in java.awt that throw InvalidDnDOperationException
abstract  java.awt.dnd.peer.DragSourceContextPeer Toolkit.createDragSourceContextPeer(DragGestureEvent dge)
create the peer for a DragSourceContext

Uses of InvalidDnDOperationException in java.awt.dnd

Methods in java.awt.dnd that throw InvalidDnDOperationException
void | DropTargetContext.dropComplete(boolean success) This method signals that the drop is completed and if it was successful or not.
protected Transferable | DropTargetContext.getTransferable() get the Transferable (proxy) operand of this operation
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
void | DragGestureEvent.startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.dnd.DragGestureListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.dnd.DragGestureListener

Packages that use DragGestureListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of DragGestureListener in java.awt

Methods in java.awt with parameters of type DragGestureListener
 DragGestureRecognizer Toolkit.createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation

Uses of DragGestureListener in java.awt.dnd

Fields in java.awt.dnd declared as DragGestureListener
protected  DragGestureListener DragGestureRecognizer.dragGestureListener
The DragGestureListener associated with this DragGestureRecognizer.

Methods in java.awt.dnd with parameters of type DragGestureListener
void | DragGestureRecognizer.addDragGestureListener(DragGestureListener dgl) Register a new DragGestureListener.
void | DragGestureRecognizer.removeDragGestureListener(DragGestureListener dgl) unregister the current DragGestureListener
DragGestureRecognizer | DragSource.createDragGestureRecognizer(Class recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
DragGestureRecognizer | DragSource.createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.

Constructors in java.awt.dnd with parameters of type DragGestureListener
DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.
MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.dnd.DragSourceListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.dnd.DragSourceListener

Packages that use DragSourceListener
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.

Uses of DragSourceListener in java.awt.dnd

Classes in java.awt.dnd that implement DragSourceListener
 class DragSourceContext
The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.

Methods in java.awt.dnd with parameters of type DragSourceListener
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | DragSource.startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
protected DragSourceContext | DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
void | DragSourceContext.addDragSourceListener(DragSourceListener dsl) Add a DragSourceListener to this DragSourceContext if one has not already been added.
void | DragSourceContext.removeDragSourceListener(DragSourceListener dsl) This method removes the specified DragSourceListener from this DragSourceContext.
void | DragGestureEvent.startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
void | DragGestureEvent.startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Constructors in java.awt.dnd with parameters of type DragSourceListener
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.dnd.DropTargetListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.dnd.DropTargetListener

Packages that use DropTargetListener
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.

Uses of DropTargetListener in java.awt.dnd

Classes in java.awt.dnd that implement DropTargetListener
 class DropTarget
The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.

Methods in java.awt.dnd with parameters of type DropTargetListener
void | DropTarget.addDropTargetListener(DropTargetListener dtl) Add a new DropTargetListener (UNICAST SOURCE)
void | DropTarget.removeDropTargetListener(DropTargetListener dtl) Remove the current DropTargetListener (UNICAST SOURCE)

Constructors in java.awt.dnd with parameters of type DropTargetListener
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.
DropTarget(Component c, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.
DropTarget(Component c, int ops, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DnDConstants

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DnDConstants

java.lang.Object
  |
  +--java.awt.dnd.DnDConstants
public final class DnDConstants
extends Object

This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation.

Since:
1.2

Field Summary
static int | ACTION_COPY An int representing a "copy" action.
static int | ACTION_COPY_OR_MOVE An int representing a "copy" or "move" action.
static int | ACTION_LINK An int representing a "link" action.
static int | ACTION_MOVE An int representing a "move" action.
static int | ACTION_NONE An int representing no action.
static int | ACTION_REFERENCE An int representing a "reference" action (synonym for ACTION_LINK).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ACTION_NONE

public static final int ACTION_NONE
An int representing no action.

ACTION_COPY

public static final int ACTION_COPY
An int representing a "copy" action.

ACTION_MOVE

public static final int ACTION_MOVE
An int representing a "move" action.

ACTION_COPY_OR_MOVE

public static final int ACTION_COPY_OR_MOVE
An int representing a "copy" or "move" action.

ACTION_LINK

public static final int ACTION_LINK
An int representing a "link" action. The link verb is found in many, if not all native DnD platforms, and the actual interpretation of LINK semantics is both platform and application dependent. Broadly speaking, the semantic is "do not copy, or move the operand, but create a reference to it". Defining the meaning of "reference" is where ambiguity is introduced. The verb is provided for completeness, but its use is not recommended for DnD operations between logically distinct applications where misinterpretation of the operations semantics could lead to confusing results for the user.

ACTION_REFERENCE

public static final int ACTION_REFERENCE
An int representing a "reference" action (synonym for ACTION_LINK).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DragGestureEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragGestureEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DragGestureEvent
All Implemented Interfaces:
Serializable
public class DragGestureEvent
extends EventObject

A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.

See Also:
DragGestureRecognizer, DragGestureListener, DragSource, Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.
Method Summary
Component | getComponent() This method returns the Component associated with this DragGestureEvent.
int | getDragAction() This method returns an int representing the action selected by the user.
Point | getDragOrigin() This method returns a Point in the coordinates of the Component over which the drag originated.
DragSource | getDragSource() This method returns the DragSource.
DragGestureRecognizer | getSourceAsDragGestureRecognizer() This method returns the source as a DragGestureRecognizer.
InputEvent | getTriggerEvent() This method returns the initial event that triggered the gesture.
Iterator | iterator() This method returns an Iterator for the events comprising the gesture.
void | startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.
void | startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
Object[] | toArray() This method returns an Object array of the events comprising the drag gesture.
Object[] | toArray(Object[] array) This method returns an array of the events comprising the drag gesture.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DragGestureEvent

public DragGestureEvent(DragGestureRecognizer dgr,
                        int act,
                        Point ori,
                        List evs)
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.

Parameters:
dgr - The DragGestureRecognizer firing this event
act - The the user's preferred action
ori - The origin of the drag
evs - The List of events that comprise the gesture

Throws:
IllegalArgumentException - if input parameters are null
Method Detail

getSourceAsDragGestureRecognizer

public DragGestureRecognizer getSourceAsDragGestureRecognizer()
This method returns the source as a DragGestureRecognizer.

Returns:
the source as a DragGestureRecognizer

getComponent

public Component getComponent()
This method returns the Component associated with this DragGestureEvent.

Returns:
the Component

getDragSource

public DragSource getDragSource()
This method returns the DragSource.

Returns:
the DragSource

getDragOrigin

public Point getDragOrigin()
This method returns a Point in the coordinates of the Component over which the drag originated.

Returns:
the Point where the drag originated in Component coords.

iterator

public Iterator iterator()
This method returns an Iterator for the events comprising the gesture.

Returns:
an Iterator for the events comprising the gesture

toArray

public Object[] toArray()
This method returns an Object array of the events comprising the drag gesture.

Returns:
an array of the events comprising the gesture

toArray

public Object[] toArray(Object[] array)
This method returns an array of the events comprising the drag gesture.

Parameters:
array - the array of EventObject sub(types)

Returns:
an array of the events comprising the gesture

getDragAction

public int getDragAction()
This method returns an int representing the action selected by the user.

Returns:
the action selected by the user

getTriggerEvent

public InputEvent getTriggerEvent()
This method returns the initial event that triggered the gesture.

startDrag

public void startDrag(Cursor dragCursor,
                      Transferable transferable,
                      DragSourceListener dsl)
               throws InvalidDnDOperationException
Start the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.

Parameters:
dragCursor - The initial drag Cursor
transferable - The source's Transferable
dsl - The source's DragSourceListener

Throws:
InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.

startDrag

public void startDrag(Cursor dragCursor,
                      Image dragImage,
                      Point imageOffset,
                      Transferable transferable,
                      DragSourceListener dsl)
               throws InvalidDnDOperationException
Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.

Parameters:
dragCursor - The initial drag Cursor
dragImage - The source's dragImage
imageOffset - The dragImage's offset
transferable - The source's Transferable
dsl - The source's DragSourceListener

Throws:
InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragGestureListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Interface DragGestureListener

All Superinterfaces:
EventListener
public interface DragGestureListener
extends EventListener

This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.

The implementor of this interface is responsible for starting the drag as a result of receiving such notification.

See Also:
DragGestureRecognizer, DragGestureEvent, DragSource

Method Summary
 void dragGestureRecognized(DragGestureEvent dge)
A DragGestureRecognizer has detected a platform-dependent drag initiating gesture and is notifying this listener in order for it to initiate the action for the user.

Method Detail

dragGestureRecognized

public void dragGestureRecognized(DragGestureEvent dge)
A DragGestureRecognizer has detected a platform-dependent drag initiating gesture and is notifying this listener in order for it to initiate the action for the user.

Parameters:
dge - the DragGestureEvent describing the gesture that has just occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragGestureRecognizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragGestureRecognizer

java.lang.Object
  |
  +--java.awt.dnd.DragGestureRecognizer
Direct Known Subclasses:
MouseDragGestureRecognizer
public abstract class DragGestureRecognizer
extends Object

The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.

The appropriate DragGestureRecognizer subclass is obtained from the DragSource asssociated with a particular Component, or from the Toolkit object via its createDragGestureRecognizer() method.

Once the DragGestureRecognizer is associated with a particular Component it will register the appropriate listener interfaces on that Component in order to track the input events delivered to the Component.

Once the DragGestureRecognizer identifies a sequence of events on the Component as a drag initiating gesture, it will notify its unicast DragGestureListener by invoking its gestureRecognized() method.

When a concrete DragGestureRecognizer instance detects a drag initiating gesture on the Component it is associated with, it will fire a DragGestureEvent to the DragGestureListener registered on its unicast event source for DragGestureListener events. This DragGestureListener is responsible for causing the associated DragSource to start the Drag and Drop operation (if appropriate).

See Also:
DragGestureListener, DragGestureEvent, DragSource

Field Summary
protected Component | component The Component associated with this DragGestureRecognizer.
protected DragGestureListener | dragGestureListener The DragGestureListener associated with this DragGestureRecognizer.
protected DragSource | dragSource The DragSource associated with this DragGestureRecognizer.
protected ArrayList | events The list of events (in order) that the DragGestureRecognizer "recognized" as a "gesture" that triggers a drag.
protected int | sourceActions An int representing the type(s) of action(s) used in this Drag and Drop operation.
Constructor Summary
protected | DragGestureRecognizer(DragSource ds) Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation.
protected | DragGestureRecognizer(DragSource ds, Component c) Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, and the Component this DragGestureRecognizer should "observe" for drag initiating gestures.
protected | DragGestureRecognizer(DragSource ds, Component c, int sa) Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.
protected | DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl) Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.
Method Summary
void | addDragGestureListener(DragGestureListener dgl) Register a new DragGestureListener.
protected void | appendEvent(InputEvent awtie) Listeners registered on the Component by this Recognizer shall record all Events that are recognized as part of the series of Events that go to comprise a Drag and Drop initiating gesture via this API.
protected void | fireDragGestureRecognized(int dragAction, Point p) Notify the DragGestureListener that a Drag and Drop initiating gesture has occurred.
Component | getComponent() This method returns the Component that is to be "observed" by the DragGestureRecognizer for drag initiating gestures.
DragSource | getDragSource() This method returns the DragSource this DragGestureRecognizer will use in order to process the Drag and Drop operation.
int | getSourceActions() This method returns an int representing the type of action(s) this Drag and Drop operation will support.
InputEvent | getTriggerEvent() This method returns the first event in the series of events that initiated the Drag and Drop operation.
protected abstract void | registerListeners() register this DragGestureRecognizer's Listeners with the Component subclasses must override this method
void | removeDragGestureListener(DragGestureListener dgl) unregister the current DragGestureListener
void | resetRecognizer() Reset the Recognizer, if its currently recognizing a gesture, ignore it.
void | setComponent(Component c) set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.
void | setSourceActions(int actions) This method sets the permitted source drag action(s) for this Drag and Drop operation.
protected abstract void | unregisterListeners() unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

dragSource

protected DragSource dragSource
The DragSource associated with this DragGestureRecognizer.

component

protected Component component
The Component associated with this DragGestureRecognizer.

dragGestureListener

protected DragGestureListener dragGestureListener
The DragGestureListener associated with this DragGestureRecognizer.

sourceActions

protected int sourceActions
An int representing the type(s) of action(s) used in this Drag and Drop operation.

events

protected ArrayList events
The list of events (in order) that the DragGestureRecognizer "recognized" as a "gesture" that triggers a drag.
Constructor Detail

DragGestureRecognizer

protected DragGestureRecognizer(DragSource ds,
                                Component c,
                                int sa,
                                DragGestureListener dgl)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and the DragGestureListener to notify once a drag initiating gesture has been detected.

Parameters:
ds - the DragSource this DragGestureRecognizer will use to process the Drag and Drop operation
c - the Component this DragGestureRecognizer should "observe" the event stream to, in order to detect a drag initiating gesture. If this value is null, the DragGestureRecognizer is not associated with any Component.
sa - the set (logical OR) of the DnDConstants that this Drag and Drop operation will support
dgl - the DragGestureRecognizer to notify when a drag gesture is detected

Throws:
IllegalArgumentException - if ds is null.

DragGestureRecognizer

protected DragGestureRecognizer(DragSource ds,
                                Component c,
                                int sa)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, the Component this DragGestureRecognizer should "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.

Parameters:
ds - the DragSource this DragGestureRecognizer will use to process the Drag and Drop operation
c - the Component this DragGestureRecognizer should "observe" the event stream to, in order to detect a drag initiating gesture. If this value is null, the DragGestureRecognizer is not associated with any Component.
sa - the set (logical OR) of the DnDConstants that this Drag and Drop operation will support

Throws:
IllegalArgumentException - if ds is null.

DragGestureRecognizer

protected DragGestureRecognizer(DragSource ds,
                                Component c)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation, and the Component this DragGestureRecognizer should "observe" for drag initiating gestures.

Parameters:
ds - the DragSource this DragGestureRecognizer will use to process the Drag and Drop operation
c - the Component this DragGestureRecognizer should "observe" the event stream to, in order to detect a drag initiating gesture. If this value is null, the DragGestureRecognizer is not associated with any Component.

Throws:
IllegalArgumentException - if ds is null.

DragGestureRecognizer

protected DragGestureRecognizer(DragSource ds)
Construct a new DragGestureRecognizer given the DragSource to be used in this Drag and Drop operation.

Parameters:
ds - the DragSource this DragGestureRecognizer will use to process the Drag and Drop operation

Throws:
IllegalArgumentException - if ds is null.
Method Detail

registerListeners

protected abstract void registerListeners()
register this DragGestureRecognizer's Listeners with the Component subclasses must override this method

unregisterListeners

protected abstract void unregisterListeners()
unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method

getDragSource

public DragSource getDragSource()
This method returns the DragSource this DragGestureRecognizer will use in order to process the Drag and Drop operation.

Returns:
the DragSource

getComponent

public Component getComponent()
This method returns the Component that is to be "observed" by the DragGestureRecognizer for drag initiating gestures.

Returns:
The Component this DragGestureRecognizer is associated with

setComponent

public void setComponent(Component c)
set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.

Parameters:
c - The Component or null

getSourceActions

public int getSourceActions()
This method returns an int representing the type of action(s) this Drag and Drop operation will support.

Returns:
the currently permitted source action(s)

setSourceActions

public void setSourceActions(int actions)
This method sets the permitted source drag action(s) for this Drag and Drop operation.

Parameters:
actions - the permitted source drag action(s)

getTriggerEvent

public InputEvent getTriggerEvent()
This method returns the first event in the series of events that initiated the Drag and Drop operation.

Returns:
the initial event that triggered the drag gesture

resetRecognizer

public void resetRecognizer()
Reset the Recognizer, if its currently recognizing a gesture, ignore it.

addDragGestureListener

public void addDragGestureListener(DragGestureListener dgl)
                            throws TooManyListenersException
Register a new DragGestureListener.

Parameters:
dgl - the DragGestureListener to register with this DragGestureRecognizer.

Throws:
TooManyListenersException - if a DragGestureListener has already been added.

removeDragGestureListener

public void removeDragGestureListener(DragGestureListener dgl)
unregister the current DragGestureListener

Parameters:
dgl - the DragGestureListener to unregister from this DragGestureRecognizer

Throws:
IllegalArgumentException - if dgl is not (equal to) the currently registered DragGestureListener.

fireDragGestureRecognized

protected void fireDragGestureRecognized(int dragAction,
                                         Point p)
Notify the DragGestureListener that a Drag and Drop initiating gesture has occurred. Then reset the state of the Recognizer.

Parameters:
dragAction - The action initially selected by the users gesture
p - The point (in Component coords) where the gesture originated

appendEvent

protected void appendEvent(InputEvent awtie)
Listeners registered on the Component by this Recognizer shall record all Events that are recognized as part of the series of Events that go to comprise a Drag and Drop initiating gesture via this API.

This method is used by a DragGestureRecognizer implementation to add an InputEvent subclass (that it believes is one in a series of events that comprise a Drag and Drop operation) to the array of events that this DragGestureRecognizer maintains internally.

Parameters:
awtie - the InputEvent to add to this DragGestureRecognizer's internal array of events. Note that null is not a valid value, and will be ignored.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragSource

java.lang.Object
  |
  +--java.awt.dnd.DragSource
public class DragSource
extends Object

The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios:

  • 1 default instance per JVM for the lifetime of that JVM.
  • 1 instance per class of potential Drag Initiator object (e.g TextField). [implementation dependent]
  • 1 per instance of a particular Component, or application specific object associated with a Component instance in the GUI. [implementation dependent]
  • Some other arbitrary association. [implementation dependent]
Once the DragSource is obtained, a DragGestureRecognizer should also be obtained to associate the DragSource with a particular Component.

The initial interpretation of the user's gesture, and the subsequent starting of the drag operation are the responsibility of the implementing Component, which is usually implemented by a DragGestureRecognizer.

When a drag gesture occurs, the DragSource's startDrag() method shall be invoked in order to cause processing of the user's navigational gestures and delivery of Drag and Drop protocol notifications. A DragSource shall only permit a single Drag and Drop operation to be current at any one time, and shall reject any further startDrag() requests by throwing an IllegalDnDOperationException until such time as the extant operation is complete.

The startDrag() method invokes the createDragSourceContext() method to instantiate an appropriate DragSourceContext and associate the DragSourceContextPeer with that.

If the Drag and Drop System is unable to initiate a drag operation for some reason, the startDrag() method throws a java.awt.dnd.InvalidDnDOperationException to signal such a condition. Typically this exception is thrown when the underlying platform system is either not in a state to initiate a drag, or the parameters specified are invalid.

Note that during the drag, the set of operations exposed by the source at the start of the drag operation may not change until the operation is complete. The operation(s) are constant for the duration of the operation with respect to the DragSource.

Since:
1.2

Field Summary
static Cursor | DefaultCopyDrop The default Cursor to use with a copy operation indicating that a drop is currently allowed.
static Cursor | DefaultCopyNoDrop The default Cursor to use with a copy operation indicating that a drop is currently not allowed.
static Cursor | DefaultLinkDrop The default Cursor to use with a link operation indicating that a drop is currently allowed.
static Cursor | DefaultLinkNoDrop The default Cursor to use with a link operation indicating that a drop is currently not allowed.
static Cursor | DefaultMoveDrop The default Cursor to use with a move operation indicating that a drop is currently allowed.
static Cursor | DefaultMoveNoDrop The default Cursor to use with a move operation indicating that a drop is currently not allowed.
Constructor Summary
DragSource()
Construct a new DragSource.
Method Summary
DragGestureRecognizer | createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.
DragGestureRecognizer | createDragGestureRecognizer(Class recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
protected DragSourceContext | createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Create the DragSourceContext to handle this drag.
static DragSource | getDefaultDragSource() This method returns the DragSource object associated with the underlying platform.
FlavorMap | getFlavorMap() This method returns the FlavorMap for this DragSource.
static boolean | isDragImageSupported() This method returns a boolean indicating whether or not drag Image support is available on the underlying platform.
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DefaultCopyDrop

public static final Cursor DefaultCopyDrop
The default Cursor to use with a copy operation indicating that a drop is currently allowed.

DefaultMoveDrop

public static final Cursor DefaultMoveDrop
The default Cursor to use with a move operation indicating that a drop is currently allowed.

DefaultLinkDrop

public static final Cursor DefaultLinkDrop
The default Cursor to use with a link operation indicating that a drop is currently allowed.

DefaultCopyNoDrop

public static final Cursor DefaultCopyNoDrop
The default Cursor to use with a copy operation indicating that a drop is currently not allowed.

DefaultMoveNoDrop

public static final Cursor DefaultMoveNoDrop
The default Cursor to use with a move operation indicating that a drop is currently not allowed.

DefaultLinkNoDrop

public static final Cursor DefaultLinkNoDrop
The default Cursor to use with a link operation indicating that a drop is currently not allowed.
Constructor Detail

DragSource

public DragSource()
Construct a new DragSource.
Method Detail

getDefaultDragSource

public static DragSource getDefaultDragSource()
This method returns the DragSource object associated with the underlying platform.

Returns:
the platform DragSource

isDragImageSupported

public static boolean isDragImageSupported()
This method returns a boolean indicating whether or not drag Image support is available on the underlying platform.

Returns:
if the Drag Image support is available on this platform

startDrag

public void startDrag(DragGestureEvent trigger,
                      Cursor dragCursor,
                      Image dragImage,
                      Point imageOffset,
                      Transferable transferable,
                      DragSourceListener dsl,
                      FlavorMap flavorMap)
               throws InvalidDnDOperationException
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.

Parameters:
trigger - The DragGestureEvent that initiated the drag
dragCursor - The initial Cursor or null for defaults
dragImage - The image to drag or null,
imageOffset - The offset of the Image origin from the hotspot of the Cursor at the instant of the trigger
transferable - The subject data of the drag
dsl - The DragSourceListener
flavorMap - The FlavorMap to use, or null

Throws:
java.awt.dnd.InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.

startDrag

public void startDrag(DragGestureEvent trigger,
                      Cursor dragCursor,
                      Transferable transferable,
                      DragSourceListener dsl,
                      FlavorMap flavorMap)
               throws InvalidDnDOperationException
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.

Parameters:
trigger - The DragGestureEvent that initiated the drag
dragCursor - The initial Cursor or null for defaults
transferable - The subject data of the drag
dsl - The DragSourceListener
flavorMap - The FlavorMap to use or null

Throws:
java.awt.dnd.InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.

startDrag

public void startDrag(DragGestureEvent trigger,
                      Cursor dragCursor,
                      Image dragImage,
                      Point dragOffset,
                      Transferable transferable,
                      DragSourceListener dsl)
               throws InvalidDnDOperationException
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.

Parameters:
trigger - The DragGestureEvent that initiated the drag
dragCursor - The initial Cursor or null for defaults
dragImage - The Image to drag or null
imageOffset - The offset of the Image origin from the hotspot of the Cursor at the instant of the trigger
transferable - The subject data of the drag
dsl - The DragSourceListener

Throws:
java.awt.dnd.InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.

startDrag

public void startDrag(DragGestureEvent trigger,
                      Cursor dragCursor,
                      Transferable transferable,
                      DragSourceListener dsl)
               throws InvalidDnDOperationException
Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.

Parameters:
trigger - The DragGestureEvent that initiated the drag
dragCursor - The initial Cursor or null for defaults
transferable - The subject data of the drag
dsl - The DragSourceListener

Throws:
java.awt.dnd.InvalidDnDOperationException - if the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.

createDragSourceContext

protected DragSourceContext createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp,
                                                    DragGestureEvent dgl,
                                                    Cursor dragCursor,
                                                    Image dragImage,
                                                    Point imageOffset,
                                                    Transferable t,
                                                    DragSourceListener dsl)
Create the DragSourceContext to handle this drag. To incorporate a new DragSourceContext subclass, subclass DragSource and override this method.

Parameters:
dscp - The DragSourceContextPeer for this drag
trigger - The DragGestureEvent that triggered the drag
dragCursor - The initial Cursor to display
dragImage - The Image to drag or null
imageOffset - The offset of the Image origin from the hotspot of the cursor at the instant of the trigger
transferable - The subject data of the drag
dsl - The DragSourceListener

Returns:
the DragSourceContext

getFlavorMap

public FlavorMap getFlavorMap()
This method returns the FlavorMap for this DragSource.

Returns:
the FlavorMap for this DragSource

createDragGestureRecognizer

public DragGestureRecognizer createDragGestureRecognizer(Class recognizerAbstractClass,
                                                         Component c,
                                                         int actions,
                                                         DragGestureListener dgl)
Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.

Parameters:
recognizerAbstractClass - The requested abstract type
actions - The permitted source drag actions
c - The Component target
dgl - The DragGestureListener to notify

Returns:
the new DragGestureRecognizer or null if the Toolkit.createDragGestureRecognizer() method has no implementation available for the requested DragGestureRecognizer subclass and returns null.

createDefaultDragGestureRecognizer

public DragGestureRecognizer createDefaultDragGestureRecognizer(Component c,
                                                                int actions,
                                                                DragGestureListener dgl)
Creates a new DragSourceRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object. For this DragSource the default is MouseDragGestureRecognizer.

Parameters:
c - The Component target for the recognizer
actions - The permitted source actions
dgl - The DragGestureListener to notify

Returns:
the new DragGestureRecognizer or null if the Toolkit.createDragGestureRecognizer() method has no implementation available for the requested DragGestureRecognizer subclass and returns null.
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


DragSourceContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragSourceContext

java.lang.Object
  |
  +--java.awt.dnd.DragSourceContext
All Implemented Interfaces:
DragSourceListener, EventListener
public class DragSourceContext
extends Object
implements DragSourceListener

The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol. In particular it is responsible for managing event notifications to the DragSourceListener, and providing the Transferable state to enable the data transfer.

An instance of this class is created as a result of a DragSource's startDrag() method being successfully invoked. This instance is responsible for tracking the state of the operation on behalf of the DragSource and dispatching state changes to the DragSourceListener.

Note that the DragSourceContext itself implements the DragSourceListener interface. This is to allow the platform peer (the DragSourceContextPeer instance) created by the DragSource to notify the DragSourceContext of changes in state in the ongiong operation. This allows the DragSourceContext to interpose itself between the platform and the DragSourceListener provided by the initiator of the operation.

Since:
1.2

Field Summary
protected static int | CHANGED An int used by updateCurrentCursor() indicating that the user operation has changed.
protected static int | DEFAULT An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.
protected static int | ENTER An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.
protected static int | OVER An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.
Constructor Summary
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.
Method Summary
void | addDragSourceListener(DragSourceListener dsl) Add a DragSourceListener to this DragSourceContext if one has not already been added.
void | dragDropEnd(DragSourceDropEvent dsde) This method intercepts the DragSourceDropEvent associated with dragDropEnd() from the peer.
void | dragEnter(DragSourceDragEvent dsde) This method intercepts the DragSourceDragEvent associated with dragEnter() from the peer.
void | dragExit(DragSourceEvent dse) This method intercepts the DragSourceEvent associated with dragExit() from the peer.
void | dragOver(DragSourceDragEvent dsde) This method intercepts the DragSourceDragEvent associated with dragOver() from the peer.
void | dropActionChanged(DragSourceDragEvent dsde) This method intercepts the DragSourceDragEvent associated with dropActionChanged() from the peer.
Component | getComponent() This method returns the Component associated with this DragSourceContext.
Cursor | getCursor() This method returns the current drag Cursor.
DragSource | getDragSource() This method returns the DragSource that instantiated this DragSourceContext.
int | getSourceActions() This method returns an int representing the current action(s) associated with this DragSourceContext.
Transferable | getTransferable() This method returns the Transferable associated with this DragSourceContext.
DragGestureEvent | getTrigger() This method returns the DragGestureEvent that initially triggered the drag.
void | removeDragSourceListener(DragSourceListener dsl) This method removes the specified DragSourceListener from this DragSourceContext.
void | setCursor(Cursor c) This method sets the current drag Cursor.
void | transferablesFlavorsChanged() This method notifies the peer that the Transferable's DataFlavors have changed.
protected void | updateCurrentCursor(int dropOp, int targetAct, int status) check the cursor for updates and implement defaults
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT

protected static final int DEFAULT
An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.

ENTER

protected static final int ENTER
An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.

OVER

protected static final int OVER
An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.

CHANGED

protected static final int CHANGED
An int used by updateCurrentCursor() indicating that the user operation has changed.
Constructor Detail

DragSourceContext

public DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp,
                         DragGestureEvent trigger,
                         Cursor dragCursor,
                         Image dragImage,
                         Point offset,
                         Transferable t,
                         DragSourceListener dsl)
Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.
Parameters:
dscp - the DragSourceContextPeer for this drag
trigger - the triggering event
dragCursor - the initial Cursor
dragImage - the Image to drag (or null)
offset - the offset of the image origin from the hotspot at the instant of the triggering event
t - the Transferable
dsl - the DragSourceListener
Throws:
IllegalArgumentException - if trigger instance is incomplete
NullPointerException - if dscp, dsl, trigger, or t are null, or if dragImage is non-null and offset is null
Method Detail

getDragSource

public DragSource getDragSource()
This method returns the DragSource that instantiated this DragSourceContext.

Returns:
the DragSource that instantiated this DragSourceContext

getComponent

public Component getComponent()
This method returns the Component associated with this DragSourceContext.

Returns:
the Component that started the drag

getTrigger

public DragGestureEvent getTrigger()
This method returns the DragGestureEvent that initially triggered the drag.

Returns:
the Event that triggered the drag

getSourceActions

public int getSourceActions()
This method returns an int representing the current action(s) associated with this DragSourceContext.

Returns:
the current actions

setCursor

public void setCursor(Cursor c)
This method sets the current drag Cursor.

Parameters:
c - the Cursor to display. Note that while null is not prohibited, it is not an acceptable value for this parameter.

getCursor

public Cursor getCursor()
This method returns the current drag Cursor.

Returns:
the current drag Cursor

addDragSourceListener

public void addDragSourceListener(DragSourceListener dsl)
                           throws TooManyListenersException
Add a DragSourceListener to this DragSourceContext if one has not already been added. If a DragSourceListener already exists, this method throws a TooManyListenersException.

Parameters:
dsl - the DragSourceListener to add. Note that while null is not prohibited, it is not acceptable as a parameter.

Throws:
TooManyListenersException - if a DragSourceListener has already been added

removeDragSourceListener

public void removeDragSourceListener(DragSourceListener dsl)
This method removes the specified DragSourceListener from this DragSourceContext.

Parameters:
dsl - the DragSourceListener to remove. Note that while null is not prohibited, it is not acceptable as a parameter.

transferablesFlavorsChanged

public void transferablesFlavorsChanged()
This method notifies the peer that the Transferable's DataFlavors have changed.

dragEnter

public void dragEnter(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dragEnter() from the peer.

Note: This method is called by the peer implementation, not the user.

Specified by:
dragEnter in interface DragSourceListener
Parameters:
dsde - the intercepted DragSourceDragEvent

dragOver

public void dragOver(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dragOver() from the peer.

Note: This method is called by the peer implementation, not the user.

Specified by:
dragOver in interface DragSourceListener
Parameters:
dsde - the intercepted DragSourceDragEvent

dragExit

public void dragExit(DragSourceEvent dse)
This method intercepts the DragSourceEvent associated with dragExit() from the peer.

Note: This method is called by the peer implementation, not the user.

Specified by:
dragExit in interface DragSourceListener
Parameters:
dse - the intercepted DragSourceEvent

dropActionChanged

public void dropActionChanged(DragSourceDragEvent dsde)
This method intercepts the DragSourceDragEvent associated with dropActionChanged() from the peer.

Note: This method is called by the peer implementation, not the user.

Specified by:
dropActionChanged in interface DragSourceListener
Parameters:
dsde - the intercepted DragSourceDragEvent

dragDropEnd

public void dragDropEnd(DragSourceDropEvent dsde)
This method intercepts the DragSourceDropEvent associated with dragDropEnd() from the peer.

Note: This method is called by the peer implementation, not the user. The value of null is not acceptable as a parameter to this method.

Specified by:
dragDropEnd in interface DragSourceListener
Parameters:
dsde - the intercepted DragSourceDropEvent

getTransferable

public Transferable getTransferable()
This method returns the Transferable associated with this DragSourceContext.

Returns:
the Transferable

updateCurrentCursor

protected void updateCurrentCursor(int dropOp,
                                   int targetAct,
                                   int status)
check the cursor for updates and implement defaults

Parameters:
dropOp - the user's currently selected operation
targetAct - the current target's supported actions
status - the constant
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragSourceDragEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragSourceDragEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DragSourceEvent
              |
              +--java.awt.dnd.DragSourceDragEvent
All Implemented Interfaces:
Serializable
public class DragSourceDragEvent
extends DragSourceEvent

The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener. It contains state regarding the current state of the operation to enable the operations initiator to provide the end user with the appropriate drag over feedback.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers)
Constructs a DragSourceDragEvent.
Method Summary
int | getDropAction() This method returns an int representing the effective drop action which is the intersection of the user's selected action, and the source and target actions.
int | getGestureModifiers() This method returns an int representing the current state of the input device modifiers associated with the user's gesture.
int | getTargetActions() This method returns the logical intersection of the current target, source, and user actions.
int | getUserAction() This method returns an int representing the user's currently selected drop action.
Methods inherited from class java.awt.dnd.DragSourceEvent
getDragSourceContext
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DragSourceDragEvent

public DragSourceDragEvent(DragSourceContext dsc,
                           int dropAction,
                           int actions,
                           int modifiers)
Constructs a DragSourceDragEvent. This class is typically instantiated by the DragSourceContextPeer rather than directly by client code.

Parameters:
dsc - the DragSourceContext that is to manage notifications for this event.
dropAction - the value of one of the static fields from DNDConstants indicating the type of user drop action this event represents.
actions - the value of one of the static fields from DNDConstants indicating the type of target drop action supported by and returned from the current drop target.
modifiers - specifies the state of the input device modifiers associated with the user gesture.
Method Detail

getTargetActions

public int getTargetActions()
This method returns the logical intersection of the current target, source, and user actions.

Returns:
the logical intersection of the current target, source and user actions

getGestureModifiers

public int getGestureModifiers()
This method returns an int representing the current state of the input device modifiers associated with the user's gesture. Typically these would be mouse buttons or keyboard modifiers.

Returns:
the current state of the input device modifiers

getUserAction

public int getUserAction()
This method returns an int representing the user's currently selected drop action.

Returns:
the user's currently selected drop action

getDropAction

public int getDropAction()
This method returns an int representing the effective drop action which is the intersection of the user's selected action, and the source and target actions.

Returns:
the effective drop action which is the intersection of the user's selected action, and the source and target actions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragSourceDropEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragSourceDropEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DragSourceEvent
              |
              +--java.awt.dnd.DragSourceDropEvent
All Implemented Interfaces:
Serializable
public class DragSourceDropEvent
extends DragSourceEvent

The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method. It contains sufficient information for the originator of the operation to provide appropriate feedback to the end user when the operation completes.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
DragSourceDropEvent(DragSourceContext dsc)
Construct a DragSourceDropEvent for a drag that does not result in a drop.
DragSourceDropEvent(DragSourceContext dsc, int action, boolean success)
Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, and a boolean indicating if the drop was successful.
Method Summary
int | getDropAction() This method returns an int representing the action performed by the target on the subject of the drop.
boolean | getDropSuccess() This method returns a boolean indicating if the drop was a success.
Methods inherited from class java.awt.dnd.DragSourceEvent
getDragSourceContext
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DragSourceDropEvent

public DragSourceDropEvent(DragSourceContext dsc,
                           int action,
                           boolean success)
Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, and a boolean indicating if the drop was successful.

Parameters:
dsc - the DragSourceContext associated with this DragSourceDropEvent
action - the drop action
success - a boolean indicating if the drop was successful

DragSourceDropEvent

public DragSourceDropEvent(DragSourceContext dsc)
Construct a DragSourceDropEvent for a drag that does not result in a drop.

Parameters:
dsc - the DragSourceContext
Method Detail

getDropSuccess

public boolean getDropSuccess()
This method returns a boolean indicating if the drop was a success.

Returns:
if the drop was successful

getDropAction

public int getDropAction()
This method returns an int representing the action performed by the target on the subject of the drop.

Returns:
the action performed by the target on the subject of the drop
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragSourceEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DragSourceEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DragSourceEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DragSourceDragEvent, DragSourceDropEvent
public class DragSourceEvent
extends EventObject

This class is the base class for DragSourceDragEvent and DragSourceDropEvent.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
DragSourceEvent(DragSourceContext dsc)
Construct a DragSourceEvent given a specified DragSourceContext.
Method Summary
 DragSourceContext getDragSourceContext()
This method returns the DragSourceContext that originated the event.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DragSourceEvent

public DragSourceEvent(DragSourceContext dsc)
Construct a DragSourceEvent given a specified DragSourceContext.

Parameters:
dsc - the DragSourceContext
Method Detail

getDragSourceContext

public DragSourceContext getDragSourceContext()
This method returns the DragSourceContext that originated the event.

Returns:
the DragSourceContext that originated the event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragSourceListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Interface DragSourceListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
DragSourceContext
public interface DragSourceListener
extends EventListener

The DragSourceListener defines the event interface for originators of Drag and Drop operations to track the state of the user's gesture, and to provide appropriate "drag over" feedback to the user throughout the Drag and Drop operation.

Since:
1.2

Method Summary
void | dragDropEnd(DragSourceDropEvent dsde) This method is invoked to signify that the Drag and Drop operation is complete.
void | dragEnter(DragSourceDragEvent dsde) Called as the hotspot enters a platform dependent drop site.
void | dragExit(DragSourceEvent dse) Called as the hotspot exits a platform dependent drop site.
void | dragOver(DragSourceDragEvent dsde) Called as the hotspot moves over a platform dependent drop site.
void | dropActionChanged(DragSourceDragEvent dsde) Called when the user has modified the drop gesture.

Method Detail

dragEnter

public void dragEnter(DragSourceDragEvent dsde)
Called as the hotspot enters a platform dependent drop site. This method is invoked when the following conditions are true:
  • The logical cursor's hotspot initially intersects a GUI Component's visible geometry.
  • That Component has an active DropTarget associated with it.
  • The DropTarget's registered DropTargetListener dragEnter() method is invoked and returns successfully.
  • The registered DropTargetListener invokes the DropTargetDragEvent's acceptDrag() method to accept the drag based upon interrogation of the source's potential drop action(s) and available data types (DataFlavors).

Parameters:
dsde - the DragSourceDragEvent

dragOver

public void dragOver(DragSourceDragEvent dsde)
Called as the hotspot moves over a platform dependent drop site. This method is invoked when the following conditions are true:
  • The cursor's logical hotspot has moved but still intersects the visible geometry of the Component associated with the previous dragEnter() invocation.
  • That Component still has a DropTarget associated with it.
  • That DropTarget is still active.
  • The DropTarget's registered DropTargetListener dragOver() method is invoked and returns successfully.
  • The DropTarget does not reject the drag via rejectDrag()

Parameters:
dsde - the DragSourceDragEvent

dropActionChanged

public void dropActionChanged(DragSourceDragEvent dsde)
Called when the user has modified the drop gesture. This method is invoked when the state of the input device(s) that the user is interacting with changes. Such devices are typically the mouse buttons or keyboard modifiers that the user is interacting with.

Parameters:
dsde - the DragSourceDragEvent

dragExit

public void dragExit(DragSourceEvent dse)
Called as the hotspot exits a platform dependent drop site. This method is invoked when the following conditions are true:
  • The cursor's logical hotspot no longer intersects the visible geometry of the Component associated with the previous dragEnter() invocation.
OR
  • The Component that the logical cursor's hotspot intersected that resulted in the previous dragEnter() invocation no longer has an active DropTarget or DropTargetListener associated with it.
OR
  • The current DropTarget's DropTargetListener has invoked rejectDrag() since the last dragEnter() or dragOver() invocation.

Parameters:
dse - the DragSourceEvent

dragDropEnd

public void dragDropEnd(DragSourceDropEvent dsde)
This method is invoked to signify that the Drag and Drop operation is complete. The getDropSuccess() method of the DragSourceDropEvent can be used to determine the termination state. The getDropAction() method returns the operation that the DropTarget selected (via the DropTargetDropEvent acceptDrop() parameter) to apply to the Drop operation. Once this method is complete, the current DragSourceContext and associated resources become invalid.

Parameters:
dsde - the DragSourceDropEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTarget

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTarget

java.lang.Object
  |
  +--java.awt.dnd.DropTarget
All Implemented Interfaces:
DropTargetListener, EventListener, Serializable
public class DropTarget
extends Object
implements DropTargetListener, Serializable

The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.

Since:
1.2
See Also:
Serialized Form

Inner Class Summary
protected static class DropTarget.DropTargetAutoScroller
this protected nested class implements autoscrolling
Constructor Summary
DropTarget()
Construct a DropTarget.
DropTarget(Component c, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.
DropTarget(Component c, int ops, DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.
DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).
Method Summary
 void addDropTargetListener(DropTargetListener dtl)
Add a new DropTargetListener (UNICAST SOURCE)
 void addNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been associated with a Component This method is usually called from java.awt.Component.addNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been associated with that Component.
protected  void clearAutoscroll()
clear autoscrolling
protected  DropTarget.DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p)
create an embedded autoscroller
protected  DropTargetContext createDropTargetContext()
Create the DropTargetContext associated with this DropTarget.
 void dragEnter(DropTargetDragEvent dtde)
The DropTarget intercepts dragEnter() notifications before the registered DropTargetListener gets them.
 void dragExit(DropTargetEvent dte)
The DropTarget intercepts dragExit() notifications before the registered DropTargetListener gets them.
 void dragOver(DropTargetDragEvent dtde)
The DropTarget intercepts dragOver() notifications before the registered DropTargetListener gets them.
 void drop(DropTargetDropEvent dtde)
The DropTarget intercepts drop() notifications before the registered DropTargetListener gets them.
 void dropActionChanged(DropTargetDragEvent dtde)
The DropTarget intercepts dropActionChanged() notifications before the registered DropTargetListener gets them.
 Component getComponent()
This method returns the Component associated with this DropTarget.
 int getDefaultActions()
This method returns an int representing the current action(s) supported by this DropTarget.
 DropTargetContext getDropTargetContext()
This method returns the DropTargetContext associated with this DropTarget.
 FlavorMap getFlavorMap()
This method returns the FlavorMap associated with this DropTarget
protected  void initializeAutoscrolling(Point p)
initialize autoscrolling
 boolean isActive()
This method returns a boolean indicating whether or not this DropTarget is currently active (ready to accept drops).
 void removeDropTargetListener(DropTargetListener dtl)
Remove the current DropTargetListener (UNICAST SOURCE)
 void removeNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been disassociated from a Component This method is usually called from java.awt.Component.removeNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been disassociated with that Component.
 void setActive(boolean isActive)
Set the DropTarget active if true, inactive if false.
 void setComponent(Component c)
Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget); or droptarget.setComponent(component);
 void setDefaultActions(int ops)
Sets the default acceptable actions for this DropTarget
 void setFlavorMap(FlavorMap fm)
This method sets the FlavorMap associated with this DropTarget.
protected  void updateAutoscroll(Point dragCursorLocn)
update autoscrolling with current cursor locn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DropTarget

public DropTarget(Component c,
                  int ops,
                  DropTargetListener dtl,
                  boolean act,
                  FlavorMap fm)
Construct a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null).

The Component will receive drops only if it is enabled.

Parameters:
c - The Component with which this DropTarget is associated
ops - The default acceptable actions for this DropTarget
dtl - The DropTargetListener for this DropTarget
act - Is the DropTarget accepting drops.
fm - The FlavorMap to use or null

DropTarget

public DropTarget(Component c,
                  int ops,
                  DropTargetListener dtl,
                  boolean act)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.

The Component will receive drops only if it is enabled.

Parameters:
c - The Component with which this DropTarget is associated
ops - The default acceptable actions for this DropTarget
dtl - The DropTargetListener for this DropTarget
act - Is the DropTarget accepting drops.

DropTarget

public DropTarget()
Construct a DropTarget.

DropTarget

public DropTarget(Component c,
                  DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.

The Component will receive drops only if it is enabled.

Parameters:
c - The Component with which this DropTarget is associated
dtl - The DropTargetListener for this DropTarget

DropTarget

public DropTarget(Component c,
                  int ops,
                  DropTargetListener dtl)
Construct a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.

The Component will receive drops only if it is enabled.

Parameters:
c - The Component with which this DropTarget is associated
ops - The default acceptable actions for this DropTarget
dtl - The DropTargetListener for this DropTarget
Method Detail

setComponent

public void setComponent(Component c)
Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget); or droptarget.setComponent(component);

The Component will receive drops only if it is enabled.

Parameters:
c - The new Component this DropTarget is to be associated with.

getComponent

public Component getComponent()
This method returns the Component associated with this DropTarget.

Returns:
the current Component

setDefaultActions

public void setDefaultActions(int ops)
Sets the default acceptable actions for this DropTarget

Parameters:
ops - the default actions

See Also:
DnDConstants

getDefaultActions

public int getDefaultActions()
This method returns an int representing the current action(s) supported by this DropTarget.

Returns:
the current default actions

setActive

public void setActive(boolean isActive)
Set the DropTarget active if true, inactive if false.

Parameters:
isActive - sets the DropTarget (in)active.

isActive

public boolean isActive()
This method returns a boolean indicating whether or not this DropTarget is currently active (ready to accept drops).

Returns:
is the DropTarget active?

addDropTargetListener

public void addDropTargetListener(DropTargetListener dtl)
                           throws TooManyListenersException
Add a new DropTargetListener (UNICAST SOURCE)

Parameters:
dtl - The new DropTargetListener

Throws:
TooManyListenersException - if a DropTargetListener is already added to this DropTarget.

removeDropTargetListener

public void removeDropTargetListener(DropTargetListener dtl)
Remove the current DropTargetListener (UNICAST SOURCE)

Parameters:
dtl - the DropTargetListener to deregister.

dragEnter

public void dragEnter(DropTargetDragEvent dtde)
The DropTarget intercepts dragEnter() notifications before the registered DropTargetListener gets them.

Specified by:
dragEnter in interface DropTargetListener
Parameters:
dtde - the DropTargetDragEvent

dragOver

public void dragOver(DropTargetDragEvent dtde)
The DropTarget intercepts dragOver() notifications before the registered DropTargetListener gets them.

Specified by:
dragOver in interface DropTargetListener
Parameters:
dtde - the DropTargetDragEvent

dropActionChanged

public void dropActionChanged(DropTargetDragEvent dtde)
The DropTarget intercepts dropActionChanged() notifications before the registered DropTargetListener gets them.

Specified by:
dropActionChanged in interface DropTargetListener
Parameters:
dtde - the DropTargetDragEvent

dragExit

public void dragExit(DropTargetEvent dte)
The DropTarget intercepts dragExit() notifications before the registered DropTargetListener gets them.

Specified by:
dragExit in interface DropTargetListener
Parameters:
dte - the DropTargetEvent

drop

public void drop(DropTargetDropEvent dtde)
The DropTarget intercepts drop() notifications before the registered DropTargetListener gets them.

Specified by:
drop in interface DropTargetListener
Parameters:
dtde - the DropTargetDropEvent

getFlavorMap

public FlavorMap getFlavorMap()
This method returns the FlavorMap associated with this DropTarget

Returns:
the FlavorMap for this DropTarget

setFlavorMap

public void setFlavorMap(FlavorMap fm)
This method sets the FlavorMap associated with this DropTarget.

Parameters:
fm - set the new FlavorMap, or null for default

addNotify

public void addNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been associated with a Component This method is usually called from java.awt.Component.addNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been associated with that Component. Calling this method, other than to notify this DropTarget of the association of the ComponentPeer with the Component may result in a malfunction of the DnD system.

Parameters:
peer - The Peer of the Component we are associated with!

removeNotify

public void removeNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been disassociated from a Component This method is usually called from java.awt.Component.removeNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been disassociated with that Component. Calling this method, other than to notify this DropTarget of the disassociation of the ComponentPeer from the Component may result in a malfunction of the DnD system.

Parameters:
peer - The Peer of the Component we are being disassociated from!

getDropTargetContext

public DropTargetContext getDropTargetContext()
This method returns the DropTargetContext associated with this DropTarget.

Returns:
the DropTargetContext associated with this DropTarget.

createDropTargetContext

protected DropTargetContext createDropTargetContext()
Create the DropTargetContext associated with this DropTarget. Subclasses may override this method to instantiate their own DropTargetContext subclass. This call is typically *only* called by the platform's DropTargetContextPeer as a drag operation encounters this DropTarget. Accessing the Context while no Drag is current has undefined results.

createDropTargetAutoScroller

protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller(Component c,
                                                                         Point p)
create an embedded autoscroller

Parameters:
c - the Component
p - the Point

initializeAutoscrolling

protected void initializeAutoscrolling(Point p)
initialize autoscrolling

Parameters:
p - the Point

updateAutoscroll

protected void updateAutoscroll(Point dragCursorLocn)
update autoscrolling with current cursor locn

Parameters:
dragCursorLocn - the Point

clearAutoscroll

protected void clearAutoscroll()
clear autoscrolling
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetAutoScroller

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTarget.DropTargetAutoScroller

java.lang.Object
  |
  +--java.awt.dnd.DropTarget.DropTargetAutoScroller
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
DropTarget
protected static class DropTarget.DropTargetAutoScroller
extends Object
implements ActionListener

this protected nested class implements autoscrolling

Constructor Summary
protected DropTarget.DropTargetAutoScroller(Component c, Point p)
construct a DropTargetAutoScroller
Method Summary
void | actionPerformed(ActionEvent e) cause autoscroll to occur
protected void | stop() cause autoscrolling to stop
protected void | updateLocation(Point newLocn) cause autoscroll to occur
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DropTarget.DropTargetAutoScroller

protected DropTarget.DropTargetAutoScroller(Component c,
                                            Point p)
construct a DropTargetAutoScroller

Parameters:
c - the Component
p - the Point
Method Detail

updateLocation

protected void updateLocation(Point newLocn)
cause autoscroll to occur

Parameters:
newLocn - the Point

stop

protected void stop()
cause autoscrolling to stop

actionPerformed

public void actionPerformed(ActionEvent e)
cause autoscroll to occur

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the ActionEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTargetContext

java.lang.Object
  |
  +--java.awt.dnd.DropTargetContext
public class DropTargetContext
extends Object

A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget. The DropTargetContext provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag under feedback, but also to effect the subsequent data transfer if appropriate.

Since:
1.2

Inner Class Summary
protected  class DropTargetContext.TransferableProxy
The TransferableProxy is a nested helper class that supports the DropTargetContext in managing the transfer of data.
Method Summary
protected void | acceptDrag(int dragOperation) accept the Drag.
protected void | acceptDrop(int dropOperation) called to signal that the drop is acceptable using the specified operation.
void | addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp) Called when associated with the DropTargetContextPeer.
protected Transferable | createTransferableProxy(Transferable t, boolean local) subclasses may override this to supply their own Proxy Transferable
void | dropComplete(boolean success) This method signals that the drop is completed and if it was successful or not.
Component | getComponent() This method returns the Component associated with this DropTargetContext.
protected DataFlavor[] | getCurrentDataFlavors() get the available DataFlavors of the Transferable operand of this operation.
protected List | getCurrentDataFlavorsAsList() This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.
DropTarget | getDropTarget() This method returns the DropTarget associated with this DropTargetContext.
protected int | getTargetActions() This method returns an int representing the current actions this DropTarget will accept.
protected Transferable | getTransferable() get the Transferable (proxy) operand of this operation
protected boolean | isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.
protected void | rejectDrag() reject the Drag.
protected void | rejectDrop() called to signal that the drop is unacceptable.
void | removeNotify() Called when disassociated with the DropTargetContextPeer.
protected void | setTargetActions(int actions) This method sets the current actions acceptable to this DropTarget.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getDropTarget

public DropTarget getDropTarget()
This method returns the DropTarget associated with this DropTargetContext.

Returns:
the DropTarget associated with this DropTargetContext

getComponent

public Component getComponent()
This method returns the Component associated with this DropTargetContext.

Returns:
the Component associated with this Context

addNotify

public void addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
Called when associated with the DropTargetContextPeer.

Parameters:
dtcp - the DropTargetContextPeer

removeNotify

public void removeNotify()
Called when disassociated with the DropTargetContextPeer.

setTargetActions

protected void setTargetActions(int actions)
This method sets the current actions acceptable to this DropTarget.

Parameters:
actions - an int representing the supported action(s)

getTargetActions

protected int getTargetActions()
This method returns an int representing the current actions this DropTarget will accept.

Returns:
the current actions acceptable to this DropTarget

dropComplete

public void dropComplete(boolean success)
                  throws InvalidDnDOperationException
This method signals that the drop is completed and if it was successful or not.

Parameters:
success - true for success, false if not

Throws:
InvalidDnDOperationException - if a drop is not outstanding/extant

acceptDrag

protected void acceptDrag(int dragOperation)
accept the Drag.

Parameters:
dragOperation - the supported action(s)

rejectDrag

protected void rejectDrag()
reject the Drag.

acceptDrop

protected void acceptDrop(int dropOperation)
called to signal that the drop is acceptable using the specified operation. must be called during DropTargetListener.drop method invocation.

Parameters:
dropOperation - the supported action(s)

rejectDrop

protected void rejectDrop()
called to signal that the drop is unacceptable. must be called during DropTargetListener.drop method invocation.

getCurrentDataFlavors

protected DataFlavor[] getCurrentDataFlavors()
get the available DataFlavors of the Transferable operand of this operation.

Returns:
a DataFlavor[] containing the supported DataFlavors of the Transferable operand.

getCurrentDataFlavorsAsList

protected List getCurrentDataFlavorsAsList()
This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.

Returns:
the currently available DataFlavors as a java.util.List

isDataFlavorSupported

protected boolean isDataFlavorSupported(DataFlavor df)
This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.

Parameters:
df - the DataFlavor

Returns:
if the DataFlavor specified is supported

getTransferable

protected Transferable getTransferable()
                                throws InvalidDnDOperationException
get the Transferable (proxy) operand of this operation

Returns:
the Transferable
Throws:
InvalidDnDOperationException - if a drag is not outstanding/extant

createTransferableProxy

protected Transferable createTransferableProxy(Transferable t,
                                               boolean local)
subclasses may override this to supply their own Proxy Transferable

Parameters:
t - the Transferable
local - boolean

Returns:
the Transferable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetDragEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTargetDragEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DropTargetEvent
              |
              +--java.awt.dnd.DropTargetDragEvent
All Implemented Interfaces:
Serializable
public class DropTargetDragEvent
extends DropTargetEvent

The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.awt.dnd.DropTargetEvent
context
Fields inherited from class java.util.EventObject
source
Constructor Summary
DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDragEvent given the DropTargetContext for this operation, the location of the "Drag" Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and current set of actions supported by the source.
Method Summary
void | acceptDrag(int dragOperation) Accept the drag This method should be called from a DropTargetListeners dragEnter(), dragOver() and dragActionChanged() methods if the implementation wishes to accept an operation from the srcActions other than the one selected by the user as represented by the dropAction.
DataFlavor[] | getCurrentDataFlavors() This method returns the current DataFlavors from the DropTargetContext.
List | getCurrentDataFlavorsAsList() This method returns the current DataFlavors as a java.util.List
int | getDropAction() This method returns an int representing the currently selected drop action.
Point | getLocation() This method returns a Point indicating the Cursor's current location within the Component's coordinates.
int | getSourceActions() This method returns an int representing set of actions supported by the source.
boolean | isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the specified DataFlavor is supported.
void | rejectDrag() Reject the drag as a result of examining either the dropAction or the available DataFlavor types.
Methods inherited from class java.awt.dnd.DropTargetEvent
getDropTargetContext
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DropTargetDragEvent

public DropTargetDragEvent(DropTargetContext dtc,
                           Point cursorLocn,
                           int dropAction,
                           int srcActions)
Construct a DropTargetDragEvent given the DropTargetContext for this operation, the location of the "Drag" Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and current set of actions supported by the source.

Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursor's hotspot in Component coordinates
dropAction - The currently selected user drop action
srcActions - The current set of actions supported by the source

Throws:
NullPointerException - if cursorLocn is null
IllegalArgumentException - if the dropAction or srcActions are illegal values, or if dtc is null
Method Detail

getLocation

public Point getLocation()
This method returns a Point indicating the Cursor's current location within the Component's coordinates.

Returns:
the current cursor location in Component's coords.

getCurrentDataFlavors

public DataFlavor[] getCurrentDataFlavors()
This method returns the current DataFlavors from the DropTargetContext.

Returns:
current DataFlavors from the DropTargetContext

getCurrentDataFlavorsAsList

public List getCurrentDataFlavorsAsList()
This method returns the current DataFlavors as a java.util.List

Returns:
a java.util.List of the Current DataFlavors

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor df)
This method returns a boolean indicating if the specified DataFlavor is supported.

Parameters:
df - the DataFlavor to test

Returns:
if a particular DataFlavor is supported

getSourceActions

public int getSourceActions()
This method returns an int representing set of actions supported by the source.

Returns:
source actions

getDropAction

public int getDropAction()
This method returns an int representing the currently selected drop action.

Returns:
currently selected drop action

acceptDrag

public void acceptDrag(int dragOperation)
Accept the drag This method should be called from a DropTargetListeners dragEnter(), dragOver() and dragActionChanged() methods if the implementation wishes to accept an operation from the srcActions other than the one selected by the user as represented by the dropAction.

Parameters:
dragOperation - the operation accepted by the target

rejectDrag

public void rejectDrag()
Reject the drag as a result of examining either the dropAction or the available DataFlavor types.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetDropEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTargetDropEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DropTargetEvent
              |
              +--java.awt.dnd.DropTargetDropEvent
All Implemented Interfaces:
Serializable
public class DropTargetDropEvent
extends DropTargetEvent

The DropTargetDropEvent is delivered via the DropTargetListener drop() method.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.awt.dnd.DropTargetEvent
context
Fields inherited from class java.util.EventObject
source
Constructor Summary
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
Construct a DropTargetDropEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and the current set of actions supported by the source.
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)
Construct a DropTargetEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, the current set of actions supported by the source, and a boolean indicating if the source is in the same JVM as the target.
Method Summary
void | acceptDrop(int dropAction) accept the drop, using the specified action.
void | dropComplete(boolean success) This method notifies the DragSource that the drop transfer(s) are completed.
DataFlavor[] | getCurrentDataFlavors() This method returns the current DataFlavors.
List | getCurrentDataFlavorsAsList() This method returns the currently available DataFlavors as a java.util.List.
int | getDropAction() This method returns an int representing the action(s) supported by the source at the time of the drop.
Point | getLocation() This method returns a Point indicating the Cursor's current location in the Component's coordinates.
int | getSourceActions() This method returns an int representing the action(s) supported by the source.
Transferable | getTransferable() This method returns the Transferable object associated with the drop.
boolean | isDataFlavorSupported(DataFlavor df) This method returns a boolean indicating if the specified DataFlavor is available from the source.
boolean | isLocalTransfer() This method returns an int indicating if the source is in the same JVM as the target.
void | rejectDrop() reject the Drop.
Methods inherited from class java.awt.dnd.DropTargetEvent
getDropTargetContext
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DropTargetDropEvent

public DropTargetDropEvent(DropTargetContext dtc,
                           Point cursorLocn,
                           int dropAction,
                           int srcActions)
Construct a DropTargetDropEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, and the current set of actions supported by the source. By default, this constructor assumes that the target is not in the same virtual machine as the source; that is, isLocalTransfer() will return false.

Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursor's hotspot in Component coordinates
dropAction - The currently selected user drop action: COPY, MOVE, or LINK constants found in DnDConstants.
srcActions - The current set of actions supported by the source: some combination of COPY, MOVE, or LINK as exposed by the DragSource.

Throws:
NullPointerException - if cursorLocn is null
IllegalArgumentException - if the dropAction or srcActions are illegal values, or if dtc is null.

DropTargetDropEvent

public DropTargetDropEvent(DropTargetContext dtc,
                           Point cursorLocn,
                           int dropAction,
                           int srcActions,
                           boolean isLocal)
Construct a DropTargetEvent given the DropTargetContext for this operation, the location of the drag Cursor's hotspot in the Component's coordinates, the currently selected user drop action, the current set of actions supported by the source, and a boolean indicating if the source is in the same JVM as the target.

Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursor's hotspot in Component's coordinates
dropAction - The currently selected user drop action: COPY, MOVE, or LINK constants found in DnDConstants.
srcActions - The current set of actions supported by the source: some combination of COPY, MOVE, or LINK as exposed by the DragSource.
isLocalTx - True if the source is in the same JVM as the target
Method Detail

getLocation

public Point getLocation()
This method returns a Point indicating the Cursor's current location in the Component's coordinates.

Returns:
the current Cursor location in Component's coords.

getCurrentDataFlavors

public DataFlavor[] getCurrentDataFlavors()
This method returns the current DataFlavors.

Returns:
current DataFlavors

getCurrentDataFlavorsAsList

public List getCurrentDataFlavorsAsList()
This method returns the currently available DataFlavors as a java.util.List.

Returns:
the currently available DataFlavors as a java.util.List

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor df)
This method returns a boolean indicating if the specified DataFlavor is available from the source.

Parameters:
df - the DataFlavor to test

Returns:
if the DataFlavor specified is available from the source

getSourceActions

public int getSourceActions()
This method returns an int representing the action(s) supported by the source.

Returns:
source actions

getDropAction

public int getDropAction()
This method returns an int representing the action(s) supported by the source at the time of the drop.

Returns:
source actions

getTransferable

public Transferable getTransferable()
This method returns the Transferable object associated with the drop.

Returns:
the Transferable associated with the drop

acceptDrop

public void acceptDrop(int dropAction)
accept the drop, using the specified action.

Parameters:
dropAction - the specified action

rejectDrop

public void rejectDrop()
reject the Drop.

dropComplete

public void dropComplete(boolean success)
This method notifies the DragSource that the drop transfer(s) are completed.

Parameters:
success - a boolean indicating that the drop transfer(s) are completed.

isLocalTransfer

public boolean isLocalTransfer()
This method returns an int indicating if the source is in the same JVM as the target.

Returns:
if the Source is in the same JVM
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTargetEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DropTargetEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DropTargetDragEvent, DropTargetDropEvent
public class DropTargetEvent
extends EventObject

The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent. It encapsulates the current state of the Drag and Drop operations, in particular the current DropTargetContext.

Since:
1.2
See Also:
Serialized Form

Field Summary
protected  DropTargetContext context
The DropTargetConext associated with this DropTargetEvent.
Fields inherited from class java.util.EventObject
source
Constructor Summary
DropTargetEvent(DropTargetContext dtc)
Construct a DropTargetEvent with a specified DropTargetContext.
Method Summary
 DropTargetContext getDropTargetContext()
This method returns the DropTargetContext associated with this DropTargetEvent.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

context

protected DropTargetContext context
The DropTargetConext associated with this DropTargetEvent.
Constructor Detail

DropTargetEvent

public DropTargetEvent(DropTargetContext dtc)
Construct a DropTargetEvent with a specified DropTargetContext.

Parameters:
dtc - the DropTargetContext
Method Detail

getDropTargetContext

public DropTargetContext getDropTargetContext()
This method returns the DropTargetContext associated with this DropTargetEvent.

Returns:
the DropTargetContext
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DropTargetListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Interface DropTargetListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
DropTarget
public interface DropTargetListener
extends EventListener

The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget. Methods of this interface may be implemented to provide "drag under" visual feedback to the user throughout the Drag and Drop operation.

Since:
1.2

Method Summary
void | dragEnter(DropTargetDragEvent dtde) Called when a drag operation has encountered the DropTarget.
void | dragExit(DropTargetEvent dte) The drag operation has departed the DropTarget without dropping.
void | dragOver(DropTargetDragEvent dtde) Called when a drag operation is ongoing on the DropTarget.
void | drop(DropTargetDropEvent dtde) The drag operation has terminated with a drop on this DropTarget.
void | dropActionChanged(DropTargetDragEvent dtde) Called if the user has modified the current drop gesture.

Method Detail

dragEnter

public void dragEnter(DropTargetDragEvent dtde)
Called when a drag operation has encountered the DropTarget.

Parameters:
dtde - the DropTargetDragEvent

dragOver

public void dragOver(DropTargetDragEvent dtde)
Called when a drag operation is ongoing on the DropTarget.

Parameters:
dtde - the DropTargetDragEvent

dropActionChanged

public void dropActionChanged(DropTargetDragEvent dtde)
Called if the user has modified the current drop gesture.

Parameters:
dtde - the DropTargetDragEvent

dragExit

public void dragExit(DropTargetEvent dte)
The drag operation has departed the DropTarget without dropping.

Parameters:
dte - the DropTargetEvent

drop

public void drop(DropTargetDropEvent dtde)
The drag operation has terminated with a drop on this DropTarget. This method is responsible for undertaking the transfer of the data associated with the gesture. The DropTargetDropEvent provides a means to obtain a Transferable object that represents the data object(s) to be transfered.

From this method, the DropTargetListener shall accept or reject the drop via the acceptDrop(int dropAction) or rejectDrop() methods of the DropTargetDropEvent parameter.

Subsequent to acceptDrop(), but not before, DropTargetDropEvent's getTransferable() method may be invoked, and data transfer may be performed via the returned Transferable's getTransferData() method.

At the completion of a drop, an implementation of this method is required to signal the success/failure of the drop by passing an appropriate boolean to the DropTargetDropEvent's dropComplete(boolean success) method.

Note: The actual processing of the data transfer is not required to finish before this method returns. It may be deferred until later.

Parameters:
dtde - the DropTargetDropEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidDnDOperationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class InvalidDnDOperationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalStateException
                          |
                          +--java.awt.dnd.InvalidDnDOperationException
All Implemented Interfaces:
Serializable
public class InvalidDnDOperationException
extends IllegalStateException

This exception is thrown by various methods in the java.awt.dnd package. It is usually thrown to indicate that the target in question is unable to undertake the requested operation that the present time, since the undrelying DnD system is not in the appropriate state.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
InvalidDnDOperationException()
Create a default Exception
InvalidDnDOperationException(String msg)
Create an Exception with its own descriptive message
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidDnDOperationException

public InvalidDnDOperationException()
Create a default Exception

InvalidDnDOperationException

public InvalidDnDOperationException(String msg)
Create an Exception with its own descriptive message

Parameters:
msg - the detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MouseDragGestureRecognizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class MouseDragGestureRecognizer

java.lang.Object
  |
  +--java.awt.dnd.DragGestureRecognizer
        |
        +--java.awt.dnd.MouseDragGestureRecognizer
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
public abstract class MouseDragGestureRecognizer
extends DragGestureRecognizer
implements MouseListener, MouseMotionListener

This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures. Each platform will implement its own concrete subclass of this class, available via the Toolkit.createDragGestureRecognizer() method, to encapsulate the recognition of the platform dependent mouse gesture(s) that initiate a Drag and Drop operation.

See Also:
DragGestureListener, DragGestureEvent, DragSource

Fields inherited from class java.awt.dnd.DragGestureRecognizer
component, dragGestureListener, dragSource, events, sourceActions
Constructor Summary
protected | MouseDragGestureRecognizer(DragSource ds) Construct a new MouseDragGestureRecognizer given the DragSource for the Component.
protected | MouseDragGestureRecognizer(DragSource ds, Component c) Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.
protected | MouseDragGestureRecognizer(DragSource ds, Component c, int act) Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.
protected | MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl) Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a Component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
protected void | registerListeners() register this DragGestureRecognizer's Listeners with the Component
protected void | unregisterListeners() unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
Methods inherited from class java.awt.dnd.DragGestureRecognizer
addDragGestureListener, appendEvent, fireDragGestureRecognized, getComponent, getDragSource, getSourceActions, getTriggerEvent, removeDragGestureListener, resetRecognizer, setComponent, setSourceActions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MouseDragGestureRecognizer

protected MouseDragGestureRecognizer(DragSource ds,
                                     Component c,
                                     int act,
                                     DragGestureListener dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, the action(s) permitted for this drag operation, and the DragGestureListener to notify when a drag gesture is detected.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe
act - The actions permitted for this Drag
dgl - The DragGestureListener to notify when a gesture is detected

MouseDragGestureRecognizer

protected MouseDragGestureRecognizer(DragSource ds,
                                     Component c,
                                     int act)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, the Component to observe, and the action(s) permitted for this drag operation.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe
act - The actions permitted for this drag

MouseDragGestureRecognizer

protected MouseDragGestureRecognizer(DragSource ds,
                                     Component c)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe.

Parameters:
ds - The DragSource for the Component c
c - The Component to observe

MouseDragGestureRecognizer

protected MouseDragGestureRecognizer(DragSource ds)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component.

Parameters:
ds - The DragSource for the Component
Method Detail

registerListeners

protected void registerListeners()
register this DragGestureRecognizer's Listeners with the Component
Overrides:
registerListeners in class DragGestureRecognizer

unregisterListeners

protected void unregisterListeners()
unregister this DragGestureRecognizer's Listeners with the Component subclasses must override this method
Overrides:
unregisterListeners in class DragGestureRecognizer

mouseClicked

public void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the MouseEvent

mousePressed

public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a Component.

Specified by:
mousePressed in interface MouseListener
Parameters:
e - the MouseEvent

mouseReleased

public void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface MouseListener
Parameters:
e - the MouseEvent

mouseEntered

public void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.

Specified by:
mouseEntered in interface MouseListener
Parameters:
e - the MouseEvent

mouseExited

public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.

Specified by:
mouseExited in interface MouseListener
Parameters:
e - the MouseEvent

mouseDragged

public void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component.

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - the MouseEvent

mouseMoved

public void mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down).

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - the MouseEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TransferableProxy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.dnd
Class DropTargetContext.TransferableProxy

java.lang.Object
  |
  +--java.awt.dnd.DropTargetContext.TransferableProxy
All Implemented Interfaces:
Transferable
Enclosing class:
DropTargetContext
protected class DropTargetContext.TransferableProxy
extends Object
implements Transferable

The TransferableProxy is a nested helper class that supports the DropTargetContext in managing the transfer of data. In particular it provides automatic support for the de-serialization of application/x-java-serialized-object DatFlavors.

Field Summary
protected boolean | isLocal A boolean indicating if the DragSource is in the same JVM as the DropTarget.
protected Transferable | transferable The "actual" Transferable that the Proxy is a Proxy for, usually supplied from the underlying system.
Method Summary
Object | getTransferData(DataFlavor df) get the transfer data
DataFlavor[] | getTransferDataFlavors() get the flavors
boolean | isDataFlavorSupported(DataFlavor flavor) check if a particular flavor is supported?
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

transferable

protected Transferable transferable
The "actual" Transferable that the Proxy is a Proxy for, usually supplied from the underlying system.

isLocal

protected boolean isLocal
A boolean indicating if the DragSource is in the same JVM as the DropTarget.
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
get the flavors

Specified by:
getTransferDataFlavors in interface Transferable
Returns:
the DataFlavor array

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
check if a particular flavor is supported?

Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the DataFlavor

Returns:
a boolean indicating if the specified DataFlavor is supported.

getTransferData

public Object getTransferData(DataFlavor df)
                       throws UnsupportedFlavorException,
                              IOException
get the transfer data

Specified by:
getTransferData in interface Transferable
Parameters:
df - the DataFlavor

Returns:
the Object
Throws:
UnsupportedFlavorException - if the requested DataFlavor is not supported.
IOException - if the data is no longer available in the requested flavor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.event Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.event

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.event.ComponentAdapter (implements java.awt.event.ComponentListener)
    • class java.awt.event.ContainerAdapter (implements java.awt.event.ContainerListener)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.awt.AWTEvent
        • class java.awt.event.ActionEvent
        • class java.awt.event.AdjustmentEvent
        • class java.awt.event.ComponentEvent
          • class java.awt.event.ContainerEvent
          • class java.awt.event.FocusEvent
          • class java.awt.event.InputEvent
            • class java.awt.event.KeyEvent
            • class java.awt.event.MouseEvent
          • class java.awt.event.PaintEvent
          • class java.awt.event.WindowEvent
        • class java.awt.event.HierarchyEvent
        • class java.awt.event.InputMethodEvent
        • class java.awt.event.InvocationEvent (implements java.awt.ActiveEvent)
        • class java.awt.event.ItemEvent
        • class java.awt.event.TextEvent
    • class java.awt.event.FocusAdapter (implements java.awt.event.FocusListener)
    • class java.awt.event.HierarchyBoundsAdapter (implements java.awt.event.HierarchyBoundsListener)
    • class java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
    • class java.awt.event.MouseMotionAdapter (implements java.awt.event.MouseMotionListener)
    • class java.awt.event.WindowAdapter (implements java.awt.event.WindowListener)

Interface Hierarchy

  • interface java.util.EventListener
    • interface java.awt.event.ActionListener
    • interface java.awt.event.AdjustmentListener
    • interface java.awt.event.AWTEventListener
    • interface java.awt.event.ComponentListener
    • interface java.awt.event.ContainerListener
    • interface java.awt.event.FocusListener
    • interface java.awt.event.HierarchyBoundsListener
    • interface java.awt.event.HierarchyListener
    • interface java.awt.event.InputMethodListener
    • interface java.awt.event.ItemListener
    • interface java.awt.event.KeyListener
    • interface java.awt.event.MouseListener
    • interface java.awt.event.MouseMotionListener
    • interface java.awt.event.TextListener
    • interface java.awt.event.WindowListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.event

Provides interfaces and classes for dealing with different types of events fired by AWT components.

See:
Description

Interface Summary
ActionListener | The listener interface for receiving action events.
AdjustmentListener | The listener interface for receiving adjustment events.
AWTEventListener | The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.
ComponentListener | The listener interface for receiving component events.
ContainerListener | The listener interface for receiving container events.
FocusListener | The listener interface for receiving keyboard focus events on a component.
HierarchyBoundsListener | The listener interface for receiving ancestor moved and resized events.
HierarchyListener | The listener interface for receiving hierarchy changed events.
InputMethodListener | The listener interface for receiving input method events.
ItemListener | The listener interface for receiving item events.
KeyListener | The listener interface for receiving keyboard events (keystrokes).
MouseListener | The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener | The listener interface for receiving mouse motion events on a component.
TextListener | The listener interface for receiving text events.
WindowListener | The listener interface for receiving window events.

Class Summary
ActionEvent | A semantic event which indicates that a component-defined action occured.
AdjustmentEvent | The adjustment event emitted by Adjustable objects.
ComponentAdapter | An abstract adapter class for receiving component events.
ComponentEvent | A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ContainerAdapter | An abstract adapter class for receiving container events.
ContainerEvent | A low-level event which indicates that a container's contents changed because a component was added or removed.
FocusAdapter | An abstract adapter class for receiving keyboard focus events.
FocusEvent | A low-level event which indicates that a component has gained or lost the keyboard focus.
HierarchyBoundsAdapter | An abstract adapter class for receiving ancestor moved and resized events.
HierarchyEvent | An event which indicates a change to the Component hierarchy to which a Component belongs.
InputEvent | The root event class for all component-level input events.
InputMethodEvent | Input method events contain information about text that is being composed using an input method.
InvocationEvent | An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
ItemEvent | A semantic event which indicates that an item was selected or deselected.
KeyAdapter | An abstract adapter class for receiving keyboard events.
KeyEvent | An event which indicates that a keystroke occurred in a component.
MouseAdapter | An abstract adapter class for receiving mouse events.
MouseEvent | /** An event which indicates that a mouse action occurred in a component.
MouseMotionAdapter | An abstract adapter class for receiving mouse motion events.
PaintEvent | The component-level paint event.
TextEvent | A semantic event which indicates that an object's text changed.
WindowAdapter | An abstract adapter class for receiving window events.
WindowEvent | A low-level event which indicates that a window has changed its status.

Package java.awt.event Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.event

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.event

Packages that use java.awt.event
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in java.awt.event used by java.awt
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
AdjustmentEvent
The adjustment event emitted by Adjustable objects.
AdjustmentListener
The listener interface for receiving adjustment events.
AWTEventListener
The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.
ComponentEvent
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ComponentListener
The listener interface for receiving component events.
ContainerEvent
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerListener
The listener interface for receiving container events.
FocusEvent
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusListener
The listener interface for receiving keyboard focus events on a component.
HierarchyBoundsListener
The listener interface for receiving ancestor moved and resized events.
HierarchyEvent
An event which indicates a change to the Component hierarchy to which a Component belongs.
HierarchyListener
The listener interface for receiving hierarchy changed events.
InputMethodEvent
Input method events contain information about text that is being composed using an input method.
InputMethodListener
The listener interface for receiving input method events.
ItemEvent
A semantic event which indicates that an item was selected or deselected.
ItemListener
The listener interface for receiving item events.
KeyEvent
An event which indicates that a keystroke occurred in a component.
KeyListener
The listener interface for receiving keyboard events (keystrokes).
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.
TextEvent
A semantic event which indicates that an object's text changed.
TextListener
The listener interface for receiving text events.
WindowEvent
A low-level event which indicates that a window has changed its status.
WindowListener
The listener interface for receiving window events.

Classes in java.awt.event used by java.awt.dnd
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
InputEvent
The root event class for all component-level input events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.

Classes in java.awt.event used by java.awt.event
ActionEvent
A semantic event which indicates that a component-defined action occured.
AdjustmentEvent
The adjustment event emitted by Adjustable objects.
ComponentEvent
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ComponentListener
The listener interface for receiving component events.
ContainerEvent
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerListener
The listener interface for receiving container events.
FocusEvent
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusListener
The listener interface for receiving keyboard focus events on a component.
HierarchyBoundsListener
The listener interface for receiving ancestor moved and resized events.
HierarchyEvent
An event which indicates a change to the Component hierarchy to which a Component belongs.
InputEvent
The root event class for all component-level input events.
InputMethodEvent
Input method events contain information about text that is being composed using an input method.
ItemEvent
A semantic event which indicates that an item was selected or deselected.
KeyEvent
An event which indicates that a keystroke occurred in a component.
KeyListener
The listener interface for receiving keyboard events (keystrokes).
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.
TextEvent
A semantic event which indicates that an object's text changed.
WindowEvent
A low-level event which indicates that a window has changed its status.
WindowListener
The listener interface for receiving window events.

Classes in java.awt.event used by javax.accessibility
FocusListener
The listener interface for receiving keyboard focus events on a component.

Classes in java.awt.event used by javax.swing
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
AdjustmentListener
The listener interface for receiving adjustment events.
ComponentAdapter
An abstract adapter class for receiving component events.
ComponentEvent
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ComponentListener
The listener interface for receiving component events.
ContainerEvent
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerListener
The listener interface for receiving container events.
FocusEvent
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusListener
The listener interface for receiving keyboard focus events on a component.
ItemEvent
A semantic event which indicates that an item was selected or deselected.
ItemListener
The listener interface for receiving item events.
KeyEvent
An event which indicates that a keystroke occurred in a component.
MouseAdapter
An abstract adapter class for receiving mouse events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.
WindowAdapter
An abstract adapter class for receiving window events.
WindowEvent
A low-level event which indicates that a window has changed its status.
WindowListener
The listener interface for receiving window events.

Classes in java.awt.event used by javax.swing.event
ComponentEvent
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
InputEvent
The root event class for all component-level input events.
KeyEvent
An event which indicates that a keystroke occurred in a component.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.

Classes in java.awt.event used by javax.swing.plaf
MouseEvent
/** An event which indicates that a mouse action occurred in a component.

Classes in java.awt.event used by javax.swing.plaf.basic
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
ComponentAdapter
An abstract adapter class for receiving component events.
ComponentEvent
A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
ComponentListener
The listener interface for receiving component events.
ContainerEvent
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerListener
The listener interface for receiving container events.
FocusAdapter
An abstract adapter class for receiving keyboard focus events.
FocusEvent
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusListener
The listener interface for receiving keyboard focus events on a component.
ItemEvent
A semantic event which indicates that an item was selected or deselected.
ItemListener
The listener interface for receiving item events.
KeyAdapter
An abstract adapter class for receiving keyboard events.
KeyEvent
An event which indicates that a keystroke occurred in a component.
KeyListener
The listener interface for receiving keyboard events (keystrokes).
MouseAdapter
An abstract adapter class for receiving mouse events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionAdapter
An abstract adapter class for receiving mouse motion events.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.
WindowAdapter
An abstract adapter class for receiving window events.
WindowEvent
A low-level event which indicates that a window has changed its status.
WindowListener
The listener interface for receiving window events.

Classes in java.awt.event used by javax.swing.plaf.metal
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
ContainerEvent
A low-level event which indicates that a container's contents changed because a component was added or removed.
ContainerListener
The listener interface for receiving container events.
FocusListener
The listener interface for receiving keyboard focus events on a component.
MouseAdapter
An abstract adapter class for receiving mouse events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.

Classes in java.awt.event used by javax.swing.table
FocusListener
The listener interface for receiving keyboard focus events on a component.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.

Classes in java.awt.event used by javax.swing.text
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
FocusEvent
A low-level event which indicates that a component has gained or lost the keyboard focus.
FocusListener
The listener interface for receiving keyboard focus events on a component.
InputMethodEvent
Input method events contain information about text that is being composed using an input method.
InputMethodListener
The listener interface for receiving input method events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.

Classes in java.awt.event used by javax.swing.text.html
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.
MouseAdapter
An abstract adapter class for receiving mouse events.
MouseEvent
/** An event which indicates that a mouse action occurred in a component.
MouseListener
The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
MouseMotionListener
The listener interface for receiving mouse motion events on a component.

Classes in java.awt.event used by javax.swing.tree
ActionEvent
A semantic event which indicates that a component-defined action occured.
ActionListener
The listener interface for receiving action events.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ActionEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ActionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ActionEvent
All Implemented Interfaces:
Serializable
public class ActionEvent
extends AWTEvent

A semantic event which indicates that a component-defined action occured. This high-level event is generated by a component (such as a Button) when the component-specific action occurs (such as being pressed). The event is passed to every every ActionListener object that registered to receive such events using the component's addActionListener method.

The object that implements the ActionListener interface gets this ActionEvent when the event occurs. The listener is therefore spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "button pressed".

Since:
1.1
See Also:
ActionListener, Tutorial: Java 1.1 Event Model, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | ACTION_FIRST The first number in the range of ids used for action events.
static int | ACTION_LAST The last number in the range of ids used for action events.
static int | ACTION_PERFORMED This event id indicates that a meaningful action occured.
static int | ALT_MASK The alt modifier.
static int | CTRL_MASK The control modifier.
static int | META_MASK The meta modifier.
static int | SHIFT_MASK The shift modifier.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
ActionEvent(Object source, int id, String command)
Constructs an ActionEvent object.
ActionEvent(Object source, int id, String command, int modifiers)
Constructs an ActionEvent object with modifier keys.
Method Summary
String | getActionCommand() Returns the command string associated with this action.
int | getModifiers() Returns the modifier keys held down during this action event.
String | paramString() Returns a parameter string identifying this action event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK
The shift modifier. An indicator that the shift key was held down during the event.

CTRL_MASK

public static final int CTRL_MASK
The control modifier. An indicator that the control key was held down during the event.

META_MASK

public static final int META_MASK
The meta modifier. An indicator that the meta key was held down during the event.

ALT_MASK

public static final int ALT_MASK
The alt modifier. An indicator that the alt key was held down during the event.

ACTION_FIRST

public static final int ACTION_FIRST
The first number in the range of ids used for action events.

ACTION_LAST

public static final int ACTION_LAST
The last number in the range of ids used for action events.

ACTION_PERFORMED

public static final int ACTION_PERFORMED
This event id indicates that a meaningful action occured.
Constructor Detail

ActionEvent

public ActionEvent(Object source,
                   int id,
                   String command)
Constructs an ActionEvent object.
Parameters:
source - the object that originated the event
id - an integer that identifies the event
command - a string that may specify a command (possibly one of several) associated with the event

ActionEvent

public ActionEvent(Object source,
                   int id,
                   String command,
                   int modifiers)
Constructs an ActionEvent object with modifier keys.
Parameters:
source - the object that originated the event
id - an integer that identifies the event
command - a string that may specify a command (possibly one of several) associated with the event
modifiers - the modifier keys held down during this action
Method Detail

getActionCommand

public String getActionCommand()
Returns the command string associated with this action. This string allows a "modal" component to specify one of several commands, depending on its state. For example, a single button might toggle between "show details" and "hide details". The source object and the event would be the same in each case, but the command string would identify the intended action.
Returns:
the string identifying the command for this event

getModifiers

public int getModifiers()
Returns the modifier keys held down during this action event.
Returns:
the integer sum of the modifier constants

paramString

public String paramString()
Returns a parameter string identifying this action event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its associated command
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActionListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface ActionListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
Action
All Known Implementing Classes:
AWTEventMulticaster, DropTarget.DropTargetAutoScroller, List.AccessibleAWTList, ToolTipManager.insideTimerAction, ToolTipManager.outsideTimerAction, ToolTipManager.stillInsideTimerAction, DefaultCellEditor.EditorDelegate, JComboBox, FormView, DefaultTreeCellEditor, BasicOptionPaneUI.ButtonActionListener, BasicScrollBarUI.ScrollListener, BasicTreeUI.ComponentHandler, BasicSplitPaneUI.KeyboardUpLeftHandler, BasicSplitPaneUI.KeyboardDownRightHandler, BasicSplitPaneUI.KeyboardHomeHandler, BasicSplitPaneUI.KeyboardEndHandler, BasicSplitPaneUI.KeyboardResizeToggleHandler, BasicSliderUI.ScrollListener
public interface ActionListener
extends EventListener

The listener interface for receiving action events. The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a component, using the component's addActionListener method. When the action event occurs, that object's actionPerformed method is invoked.

Since:
1.1
See Also:
ActionEvent, Tutorial: Java 1.1 Event Model, Reference: The Java Class Libraries (update file)

Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AdjustmentEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class AdjustmentEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.AdjustmentEvent
All Implemented Interfaces:
Serializable
public class AdjustmentEvent
extends AWTEvent

The adjustment event emitted by Adjustable objects.

Since:
1.1
See Also:
Adjustable, AdjustmentListener, Serialized Form

Field Summary
static int | ADJUSTMENT_FIRST Marks the first integer id for the range of adjustment event ids.
static int | ADJUSTMENT_LAST Marks the last integer id for the range of adjustment event ids.
static int | ADJUSTMENT_VALUE_CHANGED The adjustment value changed event.
static int | BLOCK_DECREMENT The block decrement adjustment type.
static int | BLOCK_INCREMENT The block increment adjustment type.
static int | TRACK The absolute tracking adjustment type.
static int | UNIT_DECREMENT The unit decrement adjustment type.
static int | UNIT_INCREMENT The unit increment adjustment type.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
AdjustmentEvent(Adjustable source, int id, int type, int value)
Constructs a AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
Method Summary
Adjustable | getAdjustable() Returns the Adjustable object where this event originated.
int | getAdjustmentType() Returns the type of adjustment which caused the value changed event.
int | getValue() Returns the current value in the adjustment event.
String | paramString() Returns a string representing the state of this event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ADJUSTMENT_FIRST

public static final int ADJUSTMENT_FIRST
Marks the first integer id for the range of adjustment event ids.

ADJUSTMENT_LAST

public static final int ADJUSTMENT_LAST
Marks the last integer id for the range of adjustment event ids.

ADJUSTMENT_VALUE_CHANGED

public static final int ADJUSTMENT_VALUE_CHANGED
The adjustment value changed event.

UNIT_INCREMENT

public static final int UNIT_INCREMENT
The unit increment adjustment type.

UNIT_DECREMENT

public static final int UNIT_DECREMENT
The unit decrement adjustment type.

BLOCK_DECREMENT

public static final int BLOCK_DECREMENT
The block decrement adjustment type.

BLOCK_INCREMENT

public static final int BLOCK_INCREMENT
The block increment adjustment type.

TRACK

public static final int TRACK
The absolute tracking adjustment type.
Constructor Detail

AdjustmentEvent

public AdjustmentEvent(Adjustable source,
                       int id,
                       int type,
                       int value)
Constructs a AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value. type, and value.
Parameters:
source - the Adjustable object where the event originated
id - the event type
type - the adjustment type
value - the current value of the adjustment
Method Detail

getAdjustable

public Adjustable getAdjustable()
Returns the Adjustable object where this event originated.

getValue

public int getValue()
Returns the current value in the adjustment event.

getAdjustmentType

public int getAdjustmentType()
Returns the type of adjustment which caused the value changed event.
See Also:
UNIT_INCREMENT, UNIT_DECREMENT, BLOCK_INCREMENT, BLOCK_DECREMENT, TRACK

paramString

public String paramString()
Description copied from class: AWTEvent
Returns a string representing the state of this event. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class AWTEvent
Following copied from class: java.awt.AWTEvent
Returns:
a string representation of this event.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AdjustmentListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface AdjustmentListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster
public interface AdjustmentListener
extends EventListener

The listener interface for receiving adjustment events.

Since:
1.1

Method Summary
 void adjustmentValueChanged(AdjustmentEvent e)
Invoked when the value of the adjustable has changed.

Method Detail

adjustmentValueChanged

public void adjustmentValueChanged(AdjustmentEvent e)
Invoked when the value of the adjustable has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AWTEventListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface AWTEventListener

All Superinterfaces:
EventListener
public interface AWTEventListener
extends EventListener

The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses. Unlike the other EventListeners in this package, AWTEventListeners passively observe events being dispatched in the AWT, system-wide. Most applications should never use this class; applications which might use AWTEventListeners include event recorders for automated testing, and facilities such as the Java Accessibility package.

The class that is interested in monitoring AWT events implements this interface, and the object created with that class is registered with the Toolkit, using the Toolkit's addAWTEventListener method. When an event is dispatched anywhere in the AWT, that object's eventDispatcheded method is invoked.

Since:
1.2
See Also:
AWTEvent, Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long), Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener)

Method Summary
 void eventDispatched(AWTEvent event)
Invoked when an event is dispatched in the AWT.

Method Detail

eventDispatched

public void eventDispatched(AWTEvent event)
Invoked when an event is dispatched in the AWT.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.event.ContainerAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ContainerAdapter

No usage of java.awt.event.ContainerAdapter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.HierarchyBoundsAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.HierarchyBoundsAdapter

No usage of java.awt.event.HierarchyBoundsAdapter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.InvocationEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.InvocationEvent

No usage of java.awt.event.InvocationEvent

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.PaintEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.PaintEvent

No usage of java.awt.event.PaintEvent

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.ActionEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ActionEvent

Packages that use ActionEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of ActionEvent in java.awt

Methods in java.awt with parameters of type ActionEvent
protected void | MenuItem.processActionEvent(ActionEvent e) Processes action events occurring on this menu item, by dispatching them to any registered ActionListener objects.
void | AWTEventMulticaster.actionPerformed(ActionEvent e) Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
protected void | List.processActionEvent(ActionEvent e) Processes action events occurring on this component by dispatching them to any registered ActionListener objects.
void | List.AccessibleAWTList.actionPerformed(ActionEvent event)
protected void | TextField.processActionEvent(ActionEvent e) Processes action events occurring on this text field by dispatching them to any registered ActionListener objects.
protected void | Button.processActionEvent(ActionEvent e) Processes action events occurring on this button by dispatching them to any registered ActionListener objects.

Uses of ActionEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type ActionEvent
 void DropTarget.DropTargetAutoScroller.actionPerformed(ActionEvent e)
cause autoscroll to occur

Uses of ActionEvent in java.awt.event

Methods in java.awt.event with parameters of type ActionEvent
 void ActionListener.actionPerformed(ActionEvent e)
Invoked when an action occurs.

Uses of ActionEvent in javax.swing

Methods in javax.swing with parameters of type ActionEvent
void | ToolTipManager.insideTimerAction.actionPerformed(ActionEvent e)
void | ToolTipManager.outsideTimerAction.actionPerformed(ActionEvent e)
void | ToolTipManager.stillInsideTimerAction.actionPerformed(ActionEvent e)
protected void | AbstractButton.fireActionPerformed(ActionEvent event) Notifies all listeners that have registered interest for notification on this event type.
void | DefaultCellEditor.EditorDelegate.actionPerformed(ActionEvent e)
void | JComboBox.actionPerformed(ActionEvent e) This method is public as an implementation side effect.
protected void | Timer.fireActionPerformed(ActionEvent e) Notify all listeners that have registered interest for notification on this event type.
protected void | DefaultButtonModel.fireActionPerformed(ActionEvent e)

Uses of ActionEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ActionEvent
void | BasicOptionPaneUI.ButtonActionListener.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.CloseAction.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.MaximizeAction.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.IconifyAction.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.RestoreAction.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.MoveAction.actionPerformed(ActionEvent e)
void | BasicInternalFrameTitlePane.SizeAction.actionPerformed(ActionEvent e)
void | BasicScrollBarUI.ScrollListener.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.NewFolderAction.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.GoHomeAction.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.ChangeToParentDirectoryAction.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.ApproveSelectionAction.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.CancelSelectionAction.actionPerformed(ActionEvent e)
void | BasicFileChooserUI.UpdateAction.actionPerformed(ActionEvent e)
void | BasicDesktopPaneUI.OpenAction.actionPerformed(ActionEvent e)
void | BasicDesktopPaneUI.CloseAction.actionPerformed(ActionEvent e)
void | BasicDesktopPaneUI.MinimizeAction.actionPerformed(ActionEvent e)
void | BasicDesktopPaneUI.MaximizeAction.actionPerformed(ActionEvent e)
void | BasicDesktopPaneUI.NavigateAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.ComponentHandler.actionPerformed(ActionEvent ae) Public as a result of Timer.
void | BasicTreeUI.TreeTraverseAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.TreePageAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.TreeIncrementAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.TreeHomeAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.TreeToggleAction.actionPerformed(ActionEvent e)
void | BasicTreeUI.TreeCancelEditingAction.actionPerformed(ActionEvent e)
void | BasicSplitPaneUI.KeyboardUpLeftHandler.actionPerformed(ActionEvent ev)
void | BasicSplitPaneUI.KeyboardDownRightHandler.actionPerformed(ActionEvent ev)
void | BasicSplitPaneUI.KeyboardHomeHandler.actionPerformed(ActionEvent ev)
void | BasicSplitPaneUI.KeyboardEndHandler.actionPerformed(ActionEvent ev)
void | BasicSplitPaneUI.KeyboardResizeToggleHandler.actionPerformed(ActionEvent ev)
void | BasicSliderUI.ScrollListener.actionPerformed(ActionEvent e)
void | BasicSliderUI.ActionScroller.actionPerformed(ActionEvent e)

Uses of ActionEvent in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type ActionEvent
 void MetalFileChooserUI.DirectoryComboBoxAction.actionPerformed(ActionEvent e)

Uses of ActionEvent in javax.swing.text

Methods in javax.swing.text with parameters of type ActionEvent
protected JTextComponent | TextAction.getTextComponent(ActionEvent e) Determines the component to use for the action.
void | DefaultEditorKit.DefaultKeyTypedAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.InsertContentAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.InsertBreakAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.InsertTabAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.CutAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.CopyAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.PasteAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
void | DefaultEditorKit.BeepAction.actionPerformed(ActionEvent e) The operation to perform when this action is triggered.
protected JEditorPane | StyledEditorKit.StyledTextAction.getEditor(ActionEvent e) Gets the target editor for an action.
void | StyledEditorKit.FontFamilyAction.actionPerformed(ActionEvent e) Sets the font family.
void | StyledEditorKit.FontSizeAction.actionPerformed(ActionEvent e) Sets the font size.
void | StyledEditorKit.ForegroundAction.actionPerformed(ActionEvent e) Sets the foreground color.
void | StyledEditorKit.AlignmentAction.actionPerformed(ActionEvent e) Sets the alignment.
void | StyledEditorKit.BoldAction.actionPerformed(ActionEvent e) Toggles the bold attribute.
void | StyledEditorKit.ItalicAction.actionPerformed(ActionEvent e) Toggles the italic attribute.
void | StyledEditorKit.UnderlineAction.actionPerformed(ActionEvent e) Toggles the Underline attribute.

Uses of ActionEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type ActionEvent
void | HTMLEditorKit.InsertHTMLTextAction.actionPerformed(ActionEvent ae) Inserts the HTML into the document.
void | FormView.actionPerformed(ActionEvent evt) Responsible for processeing the ActionEvent.

Uses of ActionEvent in javax.swing.tree

Methods in javax.swing.tree with parameters of type ActionEvent
 void DefaultTreeCellEditor.actionPerformed(ActionEvent e)
Messaged when the timer fires, this will start the editing session.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.AdjustmentEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.AdjustmentEvent

Packages that use AdjustmentEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.

Uses of AdjustmentEvent in java.awt

Methods in java.awt with parameters of type AdjustmentEvent
protected void | Scrollbar.processAdjustmentEvent(AdjustmentEvent e) Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects.
void | AWTEventMulticaster.adjustmentValueChanged(AdjustmentEvent e) Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.

Uses of AdjustmentEvent in java.awt.event

Methods in java.awt.event with parameters of type AdjustmentEvent
 void AdjustmentListener.adjustmentValueChanged(AdjustmentEvent e)
Invoked when the value of the adjustable has changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.ComponentAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ComponentAdapter

Packages that use ComponentAdapter
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ComponentAdapter in javax.swing

Subclasses of ComponentAdapter in javax.swing
protected  class JViewport.ViewListener
A listener for the view.

Uses of ComponentAdapter in javax.swing.plaf.basic

Subclasses of ComponentAdapter in javax.swing.plaf.basic
class | BasicSliderUI.ComponentHandler Listener for resizing events.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.ComponentEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ComponentEvent

Packages that use ComponentEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ComponentEvent in java.awt

Methods in java.awt with parameters of type ComponentEvent
protected void | Component.processComponentEvent(ComponentEvent e) Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
void | AWTEventMulticaster.componentResized(ComponentEvent e) Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
void | AWTEventMulticaster.componentMoved(ComponentEvent e) Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
void | AWTEventMulticaster.componentShown(ComponentEvent e) Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
void | AWTEventMulticaster.componentHidden(ComponentEvent e) Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
void | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentHidden(ComponentEvent e)
void | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentShown(ComponentEvent e)
void | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentMoved(ComponentEvent e)
void | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler.componentResized(ComponentEvent e)

Uses of ComponentEvent in java.awt.event

Subclasses of ComponentEvent in java.awt.event
class | ContainerEvent A low-level event which indicates that a container's contents changed because a component was added or removed.
class | FocusEvent A low-level event which indicates that a component has gained or lost the keyboard focus.
class | InputEvent The root event class for all component-level input events.
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.
class | PaintEvent The component-level paint event.
class | WindowEvent A low-level event which indicates that a window has changed its status.

Methods in java.awt.event with parameters of type ComponentEvent
void | ComponentAdapter.componentResized(ComponentEvent e) Invoked when the component's size changes.
void | ComponentAdapter.componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | ComponentAdapter.componentShown(ComponentEvent e) Invoked when the component has been made visible.
void | ComponentAdapter.componentHidden(ComponentEvent e) Invoked when the component has been made invisible.
void | ComponentListener.componentResized(ComponentEvent e) Invoked when the component's size changes.
void | ComponentListener.componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | ComponentListener.componentShown(ComponentEvent e) Invoked when the component has been made visible.
void | ComponentListener.componentHidden(ComponentEvent e) Invoked when the component has been made invisible.

Uses of ComponentEvent in javax.swing

Methods in javax.swing with parameters of type ComponentEvent
 void JViewport.ViewListener.componentResized(ComponentEvent e)

Uses of ComponentEvent in javax.swing.event

Subclasses of ComponentEvent in javax.swing.event
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Uses of ComponentEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ComponentEvent
void | BasicInternalFrameUI.ComponentHandler.componentResized(ComponentEvent e) Invoked when a JInternalFrame's parent's size changes.
void | BasicInternalFrameUI.ComponentHandler.componentMoved(ComponentEvent e)
void | BasicInternalFrameUI.ComponentHandler.componentShown(ComponentEvent e)
void | BasicInternalFrameUI.ComponentHandler.componentHidden(ComponentEvent e)
void | BasicTreeUI.ComponentHandler.componentMoved(ComponentEvent e)
void | BasicSliderUI.ComponentHandler.componentResized(ComponentEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.ContainerEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ContainerEvent

Packages that use ContainerEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ContainerEvent in java.awt

Methods in java.awt with parameters of type ContainerEvent
protected void | Container.processContainerEvent(ContainerEvent e) Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
void | AWTEventMulticaster.componentAdded(ContainerEvent e) Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
void | AWTEventMulticaster.componentRemoved(ContainerEvent e) Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
void | Container.AccessibleAWTContainer.AccessibleContainerHandler.componentAdded(ContainerEvent e)
void | Container.AccessibleAWTContainer.AccessibleContainerHandler.componentRemoved(ContainerEvent e)

Uses of ContainerEvent in java.awt.event

Methods in java.awt.event with parameters of type ContainerEvent
void | ContainerAdapter.componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | ContainerAdapter.componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
void | ContainerListener.componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | ContainerListener.componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.

Uses of ContainerEvent in javax.swing

Methods in javax.swing with parameters of type ContainerEvent
void | JComponent.AccessibleJComponent.AccessibleContainerHandler.componentAdded(ContainerEvent e)
void | JComponent.AccessibleJComponent.AccessibleContainerHandler.componentRemoved(ContainerEvent e)

Uses of ContainerEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ContainerEvent
void | BasicToolBarUI.ToolBarContListener.componentAdded(ContainerEvent e)
void | BasicToolBarUI.ToolBarContListener.componentRemoved(ContainerEvent e)

Uses of ContainerEvent in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type ContainerEvent
void | MetalToolBarUI.MetalContainerListener.componentAdded(ContainerEvent e)
void | MetalToolBarUI.MetalContainerListener.componentRemoved(ContainerEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.FocusAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.FocusAdapter

Packages that use FocusAdapter
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of FocusAdapter in javax.swing.plaf.basic

Subclasses of FocusAdapter in javax.swing.plaf.basic
class | BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses.
class | BasicTabbedPaneUI.FocusHandler This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.FocusEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.FocusEvent

Packages that use FocusEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FocusEvent in java.awt

Methods in java.awt with parameters of type FocusEvent
protected void | Component.processFocusEvent(FocusEvent e) Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
void | AWTEventMulticaster.focusGained(FocusEvent e) Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
void | AWTEventMulticaster.focusLost(FocusEvent e) Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
void | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.focusGained(FocusEvent event)
void | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.focusLost(FocusEvent event)

Uses of FocusEvent in java.awt.event

Methods in java.awt.event with parameters of type FocusEvent
void | FocusAdapter.focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | FocusAdapter.focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
void | FocusListener.focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | FocusListener.focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.

Uses of FocusEvent in javax.swing

Methods in javax.swing with parameters of type FocusEvent
protected void | JComponent.processFocusEvent(FocusEvent e)
protected void | JMenu.processFocusEvent(FocusEvent e) Processes any focus events, such as FocusEvent.FOCUS_GAINED or FocusEvent.FOCUS_LOST.
void | JComponent.AccessibleJComponent.AccessibleFocusHandler.focusGained(FocusEvent event)
void | JComponent.AccessibleJComponent.AccessibleFocusHandler.focusLost(FocusEvent event)

Uses of FocusEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type FocusEvent
void | BasicTabbedPaneUI.FocusHandler.focusGained(FocusEvent e)
void | BasicTabbedPaneUI.FocusHandler.focusLost(FocusEvent e)
void | BasicTableUI.FocusHandler.focusGained(FocusEvent e)
void | BasicTableUI.FocusHandler.focusLost(FocusEvent e)
void | BasicToolBarUI.ToolBarFocusListener.focusGained(FocusEvent e)
void | BasicToolBarUI.ToolBarFocusListener.focusLost(FocusEvent e)
void | BasicButtonListener.focusGained(FocusEvent e)
void | BasicButtonListener.focusLost(FocusEvent e)
void | BasicListUI.FocusHandler.focusGained(FocusEvent e)
void | BasicListUI.FocusHandler.focusLost(FocusEvent e)
void | BasicComboBoxUI.FocusHandler.focusGained(FocusEvent e)
void | BasicComboBoxUI.FocusHandler.focusLost(FocusEvent e)
void | BasicTreeUI.FocusHandler.focusGained(FocusEvent e) Invoked when focus is activated on the tree we're in, redraws the lead row.
void | BasicTreeUI.FocusHandler.focusLost(FocusEvent e) Invoked when focus is activated on the tree we're in, redraws the lead row.
void | BasicSplitPaneUI.FocusHandler.focusLost(FocusEvent ev)
void | BasicComboBoxEditor.focusGained(FocusEvent e)
void | BasicComboBoxEditor.focusLost(FocusEvent e)
void | BasicSliderUI.FocusHandler.focusGained(FocusEvent e)
void | BasicSliderUI.FocusHandler.focusLost(FocusEvent e)

Uses of FocusEvent in javax.swing.text

Methods in javax.swing.text with parameters of type FocusEvent
void | DefaultCaret.focusGained(FocusEvent e) Called when the component containing the caret gains focus.
void | DefaultCaret.focusLost(FocusEvent e) Called when the component containing the caret loses focus.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.HierarchyEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.HierarchyEvent

Packages that use HierarchyEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.

Uses of HierarchyEvent in java.awt

Methods in java.awt with parameters of type HierarchyEvent
protected void | Component.processHierarchyEvent(HierarchyEvent e) Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
protected void | Component.processHierarchyBoundsEvent(HierarchyEvent e) Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
void | AWTEventMulticaster.hierarchyChanged(HierarchyEvent e) Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.
void | AWTEventMulticaster.ancestorMoved(HierarchyEvent e) Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.
void | AWTEventMulticaster.ancestorResized(HierarchyEvent e) Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.

Uses of HierarchyEvent in java.awt.event

Methods in java.awt.event with parameters of type HierarchyEvent
void | HierarchyBoundsListener.ancestorMoved(HierarchyEvent e) Called when an ancestor of the source is moved.
void | HierarchyBoundsListener.ancestorResized(HierarchyEvent e) Called when an ancestor of the source is resized.
void | HierarchyBoundsAdapter.ancestorMoved(HierarchyEvent e) Called when an ancestor of the source is moved.
void | HierarchyBoundsAdapter.ancestorResized(HierarchyEvent e) Called when an ancestor of the source is resized.
void | HierarchyListener.hierarchyChanged(HierarchyEvent e) Called when the hierarchy has been changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.InputEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.InputEvent

Packages that use InputEvent
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing.event | Provides for events fired by Swing components.

Uses of InputEvent in java.awt.dnd

Methods in java.awt.dnd that return InputEvent
InputEvent | DragGestureRecognizer.getTriggerEvent() This method returns the first event in the series of events that initiated the Drag and Drop operation.
InputEvent | DragGestureEvent.getTriggerEvent() This method returns the initial event that triggered the gesture.

Methods in java.awt.dnd with parameters of type InputEvent
protected  void DragGestureRecognizer.appendEvent(InputEvent awtie)
Listeners registered on the Component by this Recognizer shall record all Events that are recognized as part of the series of Events that go to comprise a Drag and Drop initiating gesture via this API.

Uses of InputEvent in java.awt.event

Subclasses of InputEvent in java.awt.event
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.

Uses of InputEvent in javax.swing.event

Subclasses of InputEvent in javax.swing.event
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.InputMethodEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.InputMethodEvent

Packages that use InputMethodEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of InputMethodEvent in java.awt

Methods in java.awt with parameters of type InputMethodEvent
protected void | Component.processInputMethodEvent(InputMethodEvent e) Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
void | AWTEventMulticaster.inputMethodTextChanged(InputMethodEvent e) Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.
void | AWTEventMulticaster.caretPositionChanged(InputMethodEvent e) Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.

Uses of InputMethodEvent in java.awt.event

Methods in java.awt.event with parameters of type InputMethodEvent
void | InputMethodListener.inputMethodTextChanged(InputMethodEvent event) Invoked when the text entered through an input method has changed.
void | InputMethodListener.caretPositionChanged(InputMethodEvent event) Invoked when the caret within composed text has changed.

Uses of InputMethodEvent in javax.swing.text

Methods in javax.swing.text with parameters of type InputMethodEvent
protected  void JTextComponent.processInputMethodEvent(InputMethodEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.ItemEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.ItemEvent

Packages that use ItemEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ItemEvent in java.awt

Methods in java.awt with parameters of type ItemEvent
protected void | Checkbox.processItemEvent(ItemEvent e) Processes item events occurring on this check box by dispatching them to any registered ItemListener objects.
void | Checkbox.AccessibleAWTCheckbox.itemStateChanged(ItemEvent e) Fire accessible property change events when the state of the toggle button changes.
void | AWTEventMulticaster.itemStateChanged(ItemEvent e) Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
protected void | List.processItemEvent(ItemEvent e) Processes item events occurring on this list by dispatching them to any registered ItemListener objects.
void | List.AccessibleAWTList.itemStateChanged(ItemEvent event)
protected void | Choice.processItemEvent(ItemEvent e) Processes item events occurring on this Choice menu by dispatching them to any registered ItemListener objects.
protected void | CheckboxMenuItem.processItemEvent(ItemEvent e) Processes item events occurring on this check box menu item by dispatching them to any registered ItemListener objects.

Uses of ItemEvent in java.awt.event

Methods in java.awt.event with parameters of type ItemEvent
 void ItemListener.itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected.

Uses of ItemEvent in javax.swing

Methods in javax.swing with parameters of type ItemEvent
protected void | AbstractButton.fireItemStateChanged(ItemEvent event) Notifies all listeners that have registered interest for notification on this event type.
void | JToggleButton.AccessibleJToggleButton.itemStateChanged(ItemEvent e) Fire accessible property change events when the state of the toggle button changes.
void | DefaultCellEditor.EditorDelegate.itemStateChanged(ItemEvent e)
protected void | JComboBox.fireItemStateChanged(ItemEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | DefaultButtonModel.fireItemStateChanged(ItemEvent e)

Uses of ItemEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ItemEvent
void | BasicComboPopup.ItemHandler.itemStateChanged(ItemEvent e)
void | BasicComboBoxUI.ItemHandler.itemStateChanged(ItemEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.KeyAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.KeyAdapter

Packages that use KeyAdapter
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of KeyAdapter in javax.swing.plaf.basic

Subclasses of KeyAdapter in javax.swing.plaf.basic
class | BasicComboBoxUI.KeyHandler This listener checks to see if the key event isn't a navigation key.
class | BasicComboPopup.InvocationKeyHandler This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
class | BasicTreeUI.KeyHandler This is used to get mutliple key down events to appropriately generate events.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.KeyEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.KeyEvent

Packages that use KeyEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of KeyEvent in java.awt

Methods in java.awt with parameters of type KeyEvent
protected void | Component.processKeyEvent(KeyEvent e) Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
void | AWTEventMulticaster.keyTyped(KeyEvent e) Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
void | AWTEventMulticaster.keyPressed(KeyEvent e) Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
void | AWTEventMulticaster.keyReleased(KeyEvent e) Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.

Uses of KeyEvent in java.awt.event

Methods in java.awt.event with parameters of type KeyEvent
void | KeyListener.keyTyped(KeyEvent e) Invoked when a key has been typed.
void | KeyListener.keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | KeyListener.keyReleased(KeyEvent e) Invoked when a key has been released.
void | KeyAdapter.keyTyped(KeyEvent e) Invoked when a key has been typed.
void | KeyAdapter.keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | KeyAdapter.keyReleased(KeyEvent e) Invoked when a key has been released.

Uses of KeyEvent in javax.swing

Methods in javax.swing with parameters of type KeyEvent
protected void | JComponent.processComponentKeyEvent(KeyEvent e) Processes any key events that the component itself recognizes.
protected void | JComponent.processKeyEvent(KeyEvent e) Overrides processKeyEvent to process events.
protected boolean | JComponent.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) Invoked to process the key bindings for ks as the result of the KeyEvent e.
protected void | JEditorPane.processComponentKeyEvent(KeyEvent e) Overridden to handle processing of tab/shift tab.
protected void | JEditorPane.processKeyEvent(KeyEvent e) Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
static KeyStroke | KeyStroke.getKeyStrokeForEvent(KeyEvent anEvent) Return a keystroke from an event.
void | JMenuItem.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Process a key event forwarded from the MenuSelectionManager.
protected void | JMenu.processKeyEvent(KeyEvent e) Processes key stroke events for this menu, such as mnemonics and accelerators.
void | MenuSelectionManager.processKeyEvent(KeyEvent e) When a MenuElement receives an event from a KeyListener, it should never process the event directly.
void | JPopupMenu.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
protected void | JApplet.processKeyEvent(KeyEvent e)
static boolean | SwingUtilities.notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers) Invokes actionPerformed on action if action is enabled (and non null).
void | JComboBox.processKeyEvent(KeyEvent e) Handles KeyEvents, looking for the Tab key.
protected void | JFrame.processKeyEvent(KeyEvent e) Processes key events occurring on this component and, if appropriate, passes them on to components in the frame which have registered interest in them.
abstract void | FocusManager.processKeyEvent(Component focusedComponent, KeyEvent anEvent) This method is called by JComponents when a key event occurs.
protected boolean | JTable.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
void | JMenuBar.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
protected boolean | JMenuBar.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) Subclassed to check all the child menus.
protected void | JTextArea.processKeyEvent(KeyEvent e) Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
void | MenuElement.processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager) Process a key event.
protected void | JDialog.processKeyEvent(KeyEvent e) Processes key events occurring on this component and, if appropriate, passes them on to components in the dialog which have registered interest in them.
void | DefaultFocusManager.processKeyEvent(Component focusedComponent, KeyEvent anEvent)

Uses of KeyEvent in javax.swing.event

Subclasses of KeyEvent in javax.swing.event
 class MenuKeyEvent
MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Uses of KeyEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type KeyEvent
void | BasicComboPopup.InvocationKeyHandler.keyReleased(KeyEvent e)
void | BasicTableUI.KeyHandler.keyPressed(KeyEvent e)
void | BasicTableUI.KeyHandler.keyReleased(KeyEvent e)
void | BasicTableUI.KeyHandler.keyTyped(KeyEvent e)
void | BasicComboBoxUI.KeyHandler.keyPressed(KeyEvent e)
void | BasicTreeUI.KeyHandler.keyPressed(KeyEvent e)
void | BasicTreeUI.KeyHandler.keyReleased(KeyEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.MouseAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.MouseAdapter

Packages that use MouseAdapter
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of MouseAdapter in javax.swing

Subclasses of MouseAdapter in javax.swing
 class ToolTipManager
Manages all the ToolTips in the system.

Uses of MouseAdapter in javax.swing.plaf.basic

Subclasses of MouseAdapter in javax.swing.plaf.basic
protected class | BasicComboPopup.InvocationMouseHandler This listener knows how and when to invoke this popup menu.
protected class | BasicComboPopup.ListMouseHandler This listener hides the popup when the mouse is released in the list.
protected class | BasicFileChooserUI.DoubleClickListener
protected class | BasicScrollBarUI.ArrowButtonListener Listener for cursor keys.
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
class | BasicTabbedPaneUI.MouseHandler This inner class is marked "public" due to a compiler bug.
class | BasicTreeUI.MouseHandler TreeMouseListener is responsible for updating the selection based on mouse events.

Uses of MouseAdapter in javax.swing.plaf.metal

Subclasses of MouseAdapter in javax.swing.plaf.metal
protected  class MetalFileChooserUI.SingleClickListener

Uses of MouseAdapter in javax.swing.text.html

Subclasses of MouseAdapter in javax.swing.text.html
protected class | FormView.MouseEventListener MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.MouseEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.MouseEvent

Packages that use MouseEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of MouseEvent in java.awt

Methods in java.awt with parameters of type MouseEvent
protected void | Component.processMouseEvent(MouseEvent e) Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
protected void | Component.processMouseMotionEvent(MouseEvent e) Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
void | AWTEventMulticaster.mouseClicked(MouseEvent e) Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
void | AWTEventMulticaster.mousePressed(MouseEvent e) Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
void | AWTEventMulticaster.mouseReleased(MouseEvent e) Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
void | AWTEventMulticaster.mouseEntered(MouseEvent e) Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
void | AWTEventMulticaster.mouseExited(MouseEvent e) Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
void | AWTEventMulticaster.mouseDragged(MouseEvent e) Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
void | AWTEventMulticaster.mouseMoved(MouseEvent e) Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.

Uses of MouseEvent in java.awt.dnd

Methods in java.awt.dnd with parameters of type MouseEvent
void | MouseDragGestureRecognizer.mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | MouseDragGestureRecognizer.mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a Component.
void | MouseDragGestureRecognizer.mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void | MouseDragGestureRecognizer.mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | MouseDragGestureRecognizer.mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | MouseDragGestureRecognizer.mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component.
void | MouseDragGestureRecognizer.mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).

Uses of MouseEvent in java.awt.event

Methods in java.awt.event with parameters of type MouseEvent
void | MouseMotionListener.mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | MouseMotionListener.mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | MouseMotionAdapter.mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | MouseMotionAdapter.mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | MouseListener.mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | MouseListener.mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | MouseListener.mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void | MouseListener.mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | MouseListener.mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | MouseAdapter.mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | MouseAdapter.mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | MouseAdapter.mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void | MouseAdapter.mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | MouseAdapter.mouseExited(MouseEvent e) Invoked when the mouse exits a component.

Uses of MouseEvent in javax.swing

Methods in javax.swing that return MouseEvent
static MouseEvent SwingUtilities.convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination)
Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system.

Methods in javax.swing with parameters of type MouseEvent
String | JComponent.getToolTipText(MouseEvent event) Returns the string to be used as the tooltip for event.
Point | JComponent.getToolTipLocation(MouseEvent event) Returns the tooltip location in this component's coordinate system.
protected void | JComponent.processMouseMotionEvent(MouseEvent e)
void | ToolTipManager.mouseEntered(MouseEvent event)
void | ToolTipManager.mouseExited(MouseEvent event)
void | ToolTipManager.mousePressed(MouseEvent event)
void | ToolTipManager.mouseDragged(MouseEvent event)
void | ToolTipManager.mouseMoved(MouseEvent event)
String | JTabbedPane.getToolTipText(MouseEvent event) Returns the tooltip text for the component determined by the mouse event location.
void | JMenuItem.processMouseEvent(MouseEvent e, MenuElement[] path, MenuSelectionManager manager) Process a mouse event forwarded from the MenuSelectionManager.
void | MenuSelectionManager.processMouseEvent(MouseEvent event) When a MenuElement receives an event from a MouseListener, it should never process the event directly.
void | JPopupMenu.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
boolean | JPopupMenu.isPopupTrigger(MouseEvent e) Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
static MouseEvent | SwingUtilities.convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination) Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system.
static boolean | SwingUtilities.isLeftMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the left mouse button.
static boolean | SwingUtilities.isMiddleMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the middle mouse button.
static boolean | SwingUtilities.isRightMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the right mouse button.
String | JTree.getToolTipText(MouseEvent event) Overrides JComponent's getToolTipText method in order to allow renderer's tips to be used if it has text set.
String | JTable.getToolTipText(MouseEvent event) Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.
void | JMenuBar.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | MenuElement.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Process a mouse event.

Uses of MouseEvent in javax.swing.event

Subclasses of MouseEvent in javax.swing.event
 class MenuDragMouseEvent
MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.

Methods in javax.swing.event with parameters of type MouseEvent
void | MouseInputAdapter.mouseClicked(MouseEvent e)
void | MouseInputAdapter.mousePressed(MouseEvent e)
void | MouseInputAdapter.mouseReleased(MouseEvent e)
void | MouseInputAdapter.mouseEntered(MouseEvent e)
void | MouseInputAdapter.mouseExited(MouseEvent e)
void | MouseInputAdapter.mouseDragged(MouseEvent e)
void | MouseInputAdapter.mouseMoved(MouseEvent e)

Uses of MouseEvent in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type MouseEvent
 boolean PopupMenuUI.isPopupTrigger(MouseEvent e)

Uses of MouseEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return MouseEvent
protected  MouseEvent BasicComboPopup.convertMouseEvent(MouseEvent e)

Methods in javax.swing.plaf.basic with parameters of type MouseEvent
void | BasicRadioButtonMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
protected void | BasicComboPopup.delegateFocus(MouseEvent e) This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up.
protected MouseEvent | BasicComboPopup.convertMouseEvent(MouseEvent e)
protected void | BasicComboPopup.updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll) A utility method used by the event listeners.
void | BasicComboPopup.InvocationMouseHandler.mousePressed(MouseEvent e)
void | BasicComboPopup.InvocationMouseHandler.mouseReleased(MouseEvent e)
void | BasicComboPopup.InvocationMouseMotionHandler.mouseDragged(MouseEvent e)
void | BasicComboPopup.ListMouseHandler.mousePressed(MouseEvent e)
void | BasicComboPopup.ListMouseHandler.mouseReleased(MouseEvent anEvent)
void | BasicComboPopup.ListMouseMotionHandler.mouseMoved(MouseEvent anEvent)
void | BasicTabbedPaneUI.MouseHandler.mousePressed(MouseEvent e)
void | BasicCheckBoxMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
boolean | BasicPopupMenuUI.isPopupTrigger(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseClicked(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseEntered(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseExited(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseMoved(MouseEvent e)
void | BasicTableUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicScrollBarUI.TrackListener.mouseReleased(MouseEvent e)
void | BasicScrollBarUI.TrackListener.mousePressed(MouseEvent e) If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
void | BasicScrollBarUI.TrackListener.mouseDragged(MouseEvent e) Set the models value to the position of the top/left of the thumb relative to the origin of the track.
void | BasicScrollBarUI.TrackListener.mouseMoved(MouseEvent e)
void | BasicScrollBarUI.ArrowButtonListener.mousePressed(MouseEvent e)
void | BasicScrollBarUI.ArrowButtonListener.mouseReleased(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseClicked(MouseEvent e)
void | BasicToolBarUI.DockingListener.mousePressed(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseReleased(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseEntered(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseExited(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseDragged(MouseEvent e)
void | BasicToolBarUI.DockingListener.mouseMoved(MouseEvent e)
void | BasicButtonListener.mouseMoved(MouseEvent e)
void | BasicButtonListener.mouseDragged(MouseEvent e)
void | BasicButtonListener.mouseClicked(MouseEvent e)
void | BasicButtonListener.mousePressed(MouseEvent e)
void | BasicButtonListener.mouseReleased(MouseEvent e)
void | BasicButtonListener.mouseEntered(MouseEvent e)
void | BasicButtonListener.mouseExited(MouseEvent e)
void | BasicFileChooserUI.DoubleClickListener.mouseClicked(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mouseClicked(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mouseReleased(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mousePressed(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mouseDragged(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mouseMoved(MouseEvent e)
void | BasicInternalFrameUI.BorderListener.mouseExited(MouseEvent e)
void | BasicInternalFrameUI.GlassPaneDispatcher.mousePressed(MouseEvent e) When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseEntered(MouseEvent e) Forward the mouseEntered event to the underlying child container.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseMoved(MouseEvent e) Forward the mouseMoved event to the underlying child container.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseExited(MouseEvent e) Forward the mouseExited event to the underlying child container.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseClicked(MouseEvent e) Ignore mouseClicked events.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseReleased(MouseEvent e) Ignore mouseReleased events.
void | BasicInternalFrameUI.GlassPaneDispatcher.mouseDragged(MouseEvent e) Ignore mouseDragged events.
void | BasicListUI.MouseInputHandler.mouseClicked(MouseEvent e)
void | BasicListUI.MouseInputHandler.mouseEntered(MouseEvent e)
void | BasicListUI.MouseInputHandler.mouseExited(MouseEvent e)
void | BasicListUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicListUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicListUI.MouseInputHandler.mouseMoved(MouseEvent e)
void | BasicListUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseClicked(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseMoved(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseEntered(MouseEvent e)
void | BasicTableHeaderUI.MouseInputHandler.mouseExited(MouseEvent e)
protected boolean | BasicTreeUI.startEditing(TreePath path, MouseEvent event) Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
protected boolean | BasicTreeUI.isToggleSelectionEvent(MouseEvent event) Returning true signifies a mouse event on the node should toggle the selection of only the row under mouse.
protected boolean | BasicTreeUI.isMultiSelectEvent(MouseEvent event) Returning true signifies a mouse event on the node should select from the anchor point.
protected boolean | BasicTreeUI.isToggleEvent(MouseEvent event) Returning true indicates the row under the mouse should be toggled based on the event.
protected void | BasicTreeUI.selectPathForEvent(TreePath path, MouseEvent event) Messaged to update the selection based on a MouseEvent over a particular row.
void | BasicTreeUI.MouseHandler.mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | BasicTreeUI.MouseInputHandler.mouseClicked(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mouseEntered(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mouseExited(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicTreeUI.MouseInputHandler.mouseMoved(MouseEvent e)
void | BasicSplitPaneDivider.MouseHandler.mousePressed(MouseEvent e) Starts the dragging session by creating the appropriate instance of DragController.
void | BasicSplitPaneDivider.MouseHandler.mouseReleased(MouseEvent e) If dragger is not null it is messaged with completeDrag.
void | BasicSplitPaneDivider.MouseHandler.mouseDragged(MouseEvent e) If dragger is not null it is messaged with continueDrag.
void | BasicSplitPaneDivider.MouseHandler.mouseMoved(MouseEvent e) Resets the cursor based on the orientation.
protected int | BasicSplitPaneDivider.DragController.positionForMouseEvent(MouseEvent e) Returns the new position to put the divider at based on the passed in MouseEvent.
protected void | BasicSplitPaneDivider.DragController.continueDrag(MouseEvent e) Messages dragDividerTo with the new location for the mouse event.
protected void | BasicSplitPaneDivider.DragController.completeDrag(MouseEvent e) Messages finishDraggingTo with the new location for the mouse event.
protected int | BasicSplitPaneDivider.VerticalDragController.positionForMouseEvent(MouseEvent e) Returns the new position to put the divider at based on the passed in MouseEvent.
void | BasicDesktopIconUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicDesktopIconUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicDesktopIconUI.MouseInputHandler.mouseMoved(MouseEvent e)
void | BasicDesktopIconUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicSliderUI.TrackListener.mouseReleased(MouseEvent e)
void | BasicSliderUI.TrackListener.mousePressed(MouseEvent e) If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
void | BasicSliderUI.TrackListener.mouseDragged(MouseEvent e) Set the models value to the position of the top/left of the thumb relative to the origin of the track.
void | BasicSliderUI.TrackListener.mouseMoved(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseClicked(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mousePressed(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseReleased(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseEntered(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseExited(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseDragged(MouseEvent e)
void | BasicMenuItemUI.MouseInputHandler.mouseMoved(MouseEvent e)

Constructors in javax.swing.plaf.basic with parameters of type MouseEvent
BasicTreeUI.MouseInputHandler(Component source, Component destination, MouseEvent event)
BasicSplitPaneDivider.DragController(MouseEvent e)
BasicSplitPaneDivider.VerticalDragController(MouseEvent e)

Uses of MouseEvent in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type MouseEvent
void | MetalFileChooserUI.SingleClickListener.mouseClicked(MouseEvent e)
void | MetalComboBoxUI.MetalComboPopup.delegateFocus(MouseEvent e)
void | MetalToolBarUI.MetalDockingListener.mousePressed(MouseEvent e)
void | MetalToolBarUI.MetalDockingListener.mouseDragged(MouseEvent e)

Uses of MouseEvent in javax.swing.table

Methods in javax.swing.table with parameters of type MouseEvent
 String JTableHeader.getToolTipText(MouseEvent event)
Allows the renderer's tips to be used if there is text set.

Uses of MouseEvent in javax.swing.text

Methods in javax.swing.text with parameters of type MouseEvent
protected  void DefaultCaret.positionCaret(MouseEvent e)
Tries to set the position of the caret from the coordinates of a mouse event, using viewToModel().
protected  void DefaultCaret.moveCaret(MouseEvent e)
Tries to move the position of the caret from the coordinates of a mouse event, using viewToModel().
 void DefaultCaret.mouseClicked(MouseEvent e)
Called when the mouse is clicked.
 void DefaultCaret.mousePressed(MouseEvent e)
If button 1 is pressed, this is implemented to request focus on the associated text component, and to set the caret position.
 void DefaultCaret.mouseReleased(MouseEvent e)
Called when the mouse is released.
 void DefaultCaret.mouseEntered(MouseEvent e)
Called when the mouse enters a region.
 void DefaultCaret.mouseExited(MouseEvent e)
Called when the mouse exits a region.
 void DefaultCaret.mouseDragged(MouseEvent e)
Moves the caret position according to the mouse pointer's current location.
 void DefaultCaret.mouseMoved(MouseEvent e)
Called when the mouse is moved.

Uses of MouseEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type MouseEvent
void | HTMLEditorKit.LinkController.mouseClicked(MouseEvent e) Called for a mouse click event.
void | HTMLEditorKit.LinkController.mouseDragged(MouseEvent e)
void | HTMLEditorKit.LinkController.mouseMoved(MouseEvent e)
void | FormView.MouseEventListener.mouseReleased(MouseEvent evt)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.MouseMotionAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.MouseMotionAdapter

Packages that use MouseMotionAdapter
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of MouseMotionAdapter in javax.swing.plaf.basic

Subclasses of MouseMotionAdapter in javax.swing.plaf.basic
protected class | BasicComboPopup.InvocationMouseMotionHandler This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
protected class | BasicComboPopup.ListMouseMotionHandler This listener changes the selected item as you move the mouse over the list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.TextEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.TextEvent

Packages that use TextEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.

Uses of TextEvent in java.awt

Methods in java.awt with parameters of type TextEvent
void | AWTEventMulticaster.textValueChanged(TextEvent e)
protected void | TextComponent.processTextEvent(TextEvent e) Processes text events occurring on this text component by dispatching them to any registered TextListener objects.
void | TextComponent.AccessibleAWTTextComponent.textValueChanged(TextEvent textEvent) TextListener notification of a text value change.

Uses of TextEvent in java.awt.event

Methods in java.awt.event with parameters of type TextEvent
 void TextListener.textValueChanged(TextEvent e)
Invoked when the value of the text has changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.WindowAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.WindowAdapter

Packages that use WindowAdapter
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of WindowAdapter in javax.swing

Subclasses of WindowAdapter in javax.swing
protected  class JMenu.WinListener
A listener class that watches for a popup window closing.

Uses of WindowAdapter in javax.swing.plaf.basic

Subclasses of WindowAdapter in javax.swing.plaf.basic
protected  class BasicToolBarUI.FrameListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.event.WindowEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.event.WindowEvent

Packages that use WindowEvent
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of WindowEvent in java.awt

Methods in java.awt with parameters of type WindowEvent
void | AWTEventMulticaster.windowOpened(WindowEvent e) Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.
void | AWTEventMulticaster.windowClosing(WindowEvent e) Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
void | AWTEventMulticaster.windowClosed(WindowEvent e) Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
void | AWTEventMulticaster.windowIconified(WindowEvent e) Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
void | AWTEventMulticaster.windowDeiconified(WindowEvent e) Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
void | AWTEventMulticaster.windowActivated(WindowEvent e) Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
void | AWTEventMulticaster.windowDeactivated(WindowEvent e) Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
protected void | Window.processWindowEvent(WindowEvent e) Processes window events occurring on this window by dispatching them to any registered WindowListener objects.

Uses of WindowEvent in java.awt.event

Methods in java.awt.event with parameters of type WindowEvent
void | WindowListener.windowOpened(WindowEvent e) Invoked the first time a window is made visible.
void | WindowListener.windowClosing(WindowEvent e) Invoked when the user attempts to close the window from the window's system menu.
void | WindowListener.windowClosed(WindowEvent e) Invoked when a window has been closed as the result of calling dispose on the window.
void | WindowListener.windowIconified(WindowEvent e) Invoked when a window is changed from a normal to a minimized state.
void | WindowListener.windowDeiconified(WindowEvent e) Invoked when a window is changed from a minimized to a normal state.
void | WindowListener.windowActivated(WindowEvent e) Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.
void | WindowListener.windowDeactivated(WindowEvent e) Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.
void | WindowAdapter.windowOpened(WindowEvent e) Invoked when a window has been opened.
void | WindowAdapter.windowClosing(WindowEvent e) Invoked when a window is in the process of being closed.
void | WindowAdapter.windowClosed(WindowEvent e) Invoked when a window has been closed.
void | WindowAdapter.windowIconified(WindowEvent e) Invoked when a window is iconified.
void | WindowAdapter.windowDeiconified(WindowEvent e) Invoked when a window is de-iconified.
void | WindowAdapter.windowActivated(WindowEvent e) Invoked when a window is activated.
void | WindowAdapter.windowDeactivated(WindowEvent e) Invoked when a window is de-activated.

Uses of WindowEvent in javax.swing

Methods in javax.swing with parameters of type WindowEvent
void | JMenu.WinListener.windowClosing(WindowEvent e) Deselect the menu when the popup is closed from outside.
protected void | JFrame.processWindowEvent(WindowEvent e) Processes window events occurring on this component.
protected void | JDialog.processWindowEvent(WindowEvent e) Handles window events depending on the state of the defaultCloseOperation property.

Uses of WindowEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type WindowEvent
 void BasicToolBarUI.FrameListener.windowClosing(WindowEvent w)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.ActionListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.ActionListener

Packages that use ActionListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of ActionListener in java.awt

Classes in java.awt that implement ActionListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.

Methods in java.awt that return ActionListener
static ActionListener | AWTEventMulticaster.add(ActionListener a, ActionListener b) Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
static ActionListener | AWTEventMulticaster.remove(ActionListener l, ActionListener oldl) Removes the old action-listener from action-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type ActionListener
void | MenuItem.addActionListener(ActionListener l) Adds the specified action listener to receive action events from this menu item.
void | MenuItem.removeActionListener(ActionListener l) Removes the specified action listener so it no longer receives action events from this menu item.
static ActionListener | AWTEventMulticaster.add(ActionListener a, ActionListener b) Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
static ActionListener | AWTEventMulticaster.remove(ActionListener l, ActionListener oldl) Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
void | List.addActionListener(ActionListener l) Adds the specified action listener to receive action events from this list.
void | List.removeActionListener(ActionListener l) Removes the specified action listener so that it no longer receives action events from this list.
void | TextField.addActionListener(ActionListener l) Adds the specified action listener to receive action events from this text field.
void | TextField.removeActionListener(ActionListener l) Removes the specified action listener so that it no longer receives action events from this text field.
void | Button.addActionListener(ActionListener l) Adds the specified action listener to receive action events from this button.
void | Button.removeActionListener(ActionListener l) Removes the specified action listener so that it no longer receives action events from this button.

Uses of ActionListener in java.awt.dnd

Classes in java.awt.dnd that implement ActionListener
protected static class DropTarget.DropTargetAutoScroller
this protected nested class implements autoscrolling

Uses of ActionListener in javax.swing

Subinterfaces of ActionListener in javax.swing
 interface Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.

Classes in javax.swing that implement ActionListener
class | AbstractAction This class provides default implementations for the JFC Action interface.
protected class | DefaultCellEditor.EditorDelegate
class | JComboBox A component that combines a button or text field and a drop-down list.
protected class | ToolTipManager.insideTimerAction
protected class | ToolTipManager.outsideTimerAction
protected class | ToolTipManager.stillInsideTimerAction

Fields in javax.swing declared as ActionListener
protected  ActionListener AbstractButton.actionListener
The button model's ActionListener.

Methods in javax.swing that return ActionListener
ActionListener | JComponent.getActionForKeyStroke(KeyStroke aKeyStroke) Returns the object that will perform the action registered for a given keystroke.
protected ActionListener | AbstractButton.createActionListener()

Methods in javax.swing with parameters of type ActionListener
 void JComponent.registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void JComponent.registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void AbstractButton.addActionListener(ActionListener l)
Adds an ActionListener to the button.
 void AbstractButton.removeActionListener(ActionListener l)
Removes an ActionListener from the button.
 void JTextField.addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this textfield.
 void JTextField.removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this textfield.
static JDialog JColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.
 void ButtonModel.addActionListener(ActionListener l)
Adds an ActionListener to the button.
 void ButtonModel.removeActionListener(ActionListener l)
Removes an ActionListener from the button.
 void JComboBox.addActionListener(ActionListener l)
Adds an ActionListener.
 void JComboBox.removeActionListener(ActionListener l)
Removes an ActionListener.
 void Timer.addActionListener(ActionListener listener)
Adds an actionListener to the Timer
 void Timer.removeActionListener(ActionListener listener)
Removes an ActionListener from the Timer.
 void DefaultButtonModel.addActionListener(ActionListener l)
Adds an ActionListener to the button.
 void DefaultButtonModel.removeActionListener(ActionListener l)
Removes an ActionListener from the button.
 void ComboBoxEditor.addActionListener(ActionListener l)
Add an ActionListener.
 void ComboBoxEditor.removeActionListener(ActionListener l)
Remove an ActionListener
 void JFileChooser.addActionListener(ActionListener l)
Adds an ActionListener to the button.
 void JFileChooser.removeActionListener(ActionListener l)
Removes an ActionListener from the button.

Constructors in javax.swing with parameters of type ActionListener
Timer(int delay, ActionListener listener)
Creates a Timer that will notify its listeners every delay milliseconds.

Uses of ActionListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ActionListener
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicOptionPaneUI.ButtonActionListener This inner class is marked "public" due to a compiler bug.
protected class | BasicScrollBarUI.ScrollListener Listener for scrolling events intiated in the ScrollPane.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicSliderUI.ScrollListener Scroll-event listener.
class | BasicSplitPaneUI.KeyboardDownRightHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardEndHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardHomeHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardResizeToggleHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardUpLeftHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.

Fields in javax.swing.plaf.basic declared as ActionListener
protected ActionListener | BasicSplitPaneUI.keyboardUpLeftListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.keyboardDownRightListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.keyboardHomeListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.keyboardEndListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.keyboardResizeToggleListener Deprecated. As of Java 2 platform v1.3.

Methods in javax.swing.plaf.basic that return ActionListener
protected ActionListener | BasicOptionPaneUI.createButtonActionListener(int buttonIndex)
protected ActionListener | BasicSplitPaneUI.createKeyboardUpLeftListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.createKeyboardDownRightListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.createKeyboardHomeListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.createKeyboardEndListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | BasicSplitPaneUI.createKeyboardResizeToggleListener() Deprecated. As of Java 2 platform v1.3.

Methods in javax.swing.plaf.basic with parameters of type ActionListener
void | BasicComboBoxEditor.addActionListener(ActionListener l)
void | BasicComboBoxEditor.removeActionListener(ActionListener l)

Uses of ActionListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ActionListener
protected  class MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item.

Uses of ActionListener in javax.swing.text

Classes in javax.swing.text that implement ActionListener
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Uses of ActionListener in javax.swing.text.html

Classes in javax.swing.text.html that implement ActionListener
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Uses of ActionListener in javax.swing.tree

Classes in javax.swing.tree that implement ActionListener
 class DefaultTreeCellEditor
A TreeCellEditor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.AdjustmentListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.AdjustmentListener

Packages that use AdjustmentListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AdjustmentListener in java.awt

Classes in java.awt that implement AdjustmentListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return AdjustmentListener
static AdjustmentListener | AWTEventMulticaster.add(AdjustmentListener a, AdjustmentListener b) Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
static AdjustmentListener | AWTEventMulticaster.remove(AdjustmentListener l, AdjustmentListener oldl) Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type AdjustmentListener
void | Scrollbar.addAdjustmentListener(AdjustmentListener l) Adds the specified adjustment listener to receive instances of AdjustmentEvent from this scroll bar.
void | Scrollbar.removeAdjustmentListener(AdjustmentListener l) Removes the specified adjustment listener so that it no longer receives instances of AdjustmentEvent from this scroll bar.
static AdjustmentListener | AWTEventMulticaster.add(AdjustmentListener a, AdjustmentListener b) Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
static AdjustmentListener | AWTEventMulticaster.remove(AdjustmentListener l, AdjustmentListener oldl) Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
void | Adjustable.addAdjustmentListener(AdjustmentListener l) Add a listener to recieve adjustment events when the value of the adjustable object changes.
void | Adjustable.removeAdjustmentListener(AdjustmentListener l) Removes an adjustment listener.

Uses of AdjustmentListener in javax.swing

Methods in javax.swing with parameters of type AdjustmentListener
void | JScrollBar.addAdjustmentListener(AdjustmentListener l) Adds an AdjustmentListener.
void | JScrollBar.removeAdjustmentListener(AdjustmentListener l) Removes an AdjustmentEvent listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.AWTEventListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.AWTEventListener

Packages that use AWTEventListener
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of AWTEventListener in java.awt

Methods in java.awt with parameters of type AWTEventListener
void | Toolkit.addAWTEventListener(AWTEventListener listener, long eventMask) Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.
void | Toolkit.removeAWTEventListener(AWTEventListener listener) Removes an AWTEventListener from receiving dispatched AWTEvents.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.ComponentListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.ComponentListener

Packages that use ComponentListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ComponentListener in java.awt

Classes in java.awt that implement ComponentListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler Fire PropertyChange listener, if one is registered, when shown/hidden..

Fields in java.awt declared as ComponentListener
protected  ComponentListener Component.AccessibleAWTComponent.accessibleAWTComponentHandler

Methods in java.awt that return ComponentListener
static ComponentListener | AWTEventMulticaster.add(ComponentListener a, ComponentListener b) Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
static ComponentListener | AWTEventMulticaster.remove(ComponentListener l, ComponentListener oldl) Removes the old component-listener from component-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type ComponentListener
void | Component.addComponentListener(ComponentListener l) Adds the specified component listener to receive component events from this component.
void | Component.removeComponentListener(ComponentListener l) Removes the specified component listener so that it no longer receives component events from this component.
static ComponentListener | AWTEventMulticaster.add(ComponentListener a, ComponentListener b) Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
static ComponentListener | AWTEventMulticaster.remove(ComponentListener l, ComponentListener oldl) Removes the old component-listener from component-listener-l and returns the resulting multicast listener.

Uses of ComponentListener in java.awt.event

Classes in java.awt.event that implement ComponentListener
 class ComponentAdapter
An abstract adapter class for receiving component events.

Uses of ComponentListener in javax.swing

Classes in javax.swing that implement ComponentListener
protected  class JViewport.ViewListener
A listener for the view.

Uses of ComponentListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ComponentListener
protected class | BasicInternalFrameUI.ComponentHandler
class | BasicSliderUI.ComponentHandler Listener for resizing events.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).

Fields in javax.swing.plaf.basic declared as ComponentListener
protected ComponentListener | BasicInternalFrameUI.componentListener
protected ComponentListener | BasicSliderUI.componentListener

Methods in javax.swing.plaf.basic that return ComponentListener
protected ComponentListener | BasicInternalFrameUI.createComponentListener()
protected ComponentListener | BasicTreeUI.createComponentListener() Creates and returns a new ComponentHandler.
protected ComponentListener | BasicSliderUI.createComponentListener(JSlider slider)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.ContainerListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.ContainerListener

Packages that use ContainerListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ContainerListener in java.awt

Classes in java.awt that implement ContainerListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | Container.AccessibleAWTContainer.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.

Fields in java.awt declared as ContainerListener
protected  ContainerListener Container.AccessibleAWTContainer.accessibleContainerHandler

Methods in java.awt that return ContainerListener
static ContainerListener | AWTEventMulticaster.add(ContainerListener a, ContainerListener b) Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
static ContainerListener | AWTEventMulticaster.remove(ContainerListener l, ContainerListener oldl) Removes the old container-listener from container-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type ContainerListener
void | Container.addContainerListener(ContainerListener l) Adds the specified container listener to receive container events from this container.
void | Container.removeContainerListener(ContainerListener l) Removes the specified container listener so it no longer receives container events from this container.
static ContainerListener | AWTEventMulticaster.add(ContainerListener a, ContainerListener b) Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
static ContainerListener | AWTEventMulticaster.remove(ContainerListener l, ContainerListener oldl) Removes the old container-listener from container-listener-l and returns the resulting multicast listener.

Uses of ContainerListener in java.awt.event

Classes in java.awt.event that implement ContainerListener
 class ContainerAdapter
An abstract adapter class for receiving container events.

Uses of ContainerListener in javax.swing

Classes in javax.swing that implement ContainerListener
protected  class JComponent.AccessibleJComponent.AccessibleContainerHandler
Fire PropertyChange listener, if one is registered, when children added/removed.

Fields in javax.swing declared as ContainerListener
protected  ContainerListener JComponent.AccessibleJComponent.accessibleContainerHandler

Uses of ContainerListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ContainerListener
protected  class BasicToolBarUI.ToolBarContListener

Fields in javax.swing.plaf.basic declared as ContainerListener
protected ContainerListener | BasicToolBarUI.toolBarContListener
protected ContainerListener | BasicMenuBarUI.containerListener

Methods in javax.swing.plaf.basic that return ContainerListener
protected ContainerListener | BasicToolBarUI.createToolBarContListener()
protected ContainerListener | BasicMenuBarUI.createContainerListener()

Uses of ContainerListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ContainerListener
protected  class MetalToolBarUI.MetalContainerListener

Fields in javax.swing.plaf.metal declared as ContainerListener
protected  ContainerListener MetalToolBarUI.contListener

Methods in javax.swing.plaf.metal that return ContainerListener
protected  ContainerListener MetalToolBarUI.createContainerListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.FocusListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.FocusListener

Packages that use FocusListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FocusListener in java.awt

Classes in java.awt that implement FocusListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen

Fields in java.awt declared as FocusListener
protected  FocusListener Component.AccessibleAWTComponent.accessibleAWTFocusHandler

Methods in java.awt that return FocusListener
static FocusListener | AWTEventMulticaster.add(FocusListener a, FocusListener b) Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
static FocusListener | AWTEventMulticaster.remove(FocusListener l, FocusListener oldl) Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type FocusListener
void | Component.addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component when this component gains input focus.
void | Component.removeFocusListener(FocusListener l) Removes the specified focus listener so that it no longer receives focus events from this component.
void | Component.AccessibleAWTComponent.addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | Component.AccessibleAWTComponent.removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | MenuComponent.AccessibleAWTMenuComponent.addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | MenuComponent.AccessibleAWTMenuComponent.removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
static FocusListener | AWTEventMulticaster.add(FocusListener a, FocusListener b) Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
static FocusListener | AWTEventMulticaster.remove(FocusListener l, FocusListener oldl) Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
void | List.AccessibleAWTList.AccessibleAWTListChild.addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | List.AccessibleAWTList.AccessibleAWTListChild.removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.

Uses of FocusListener in java.awt.event

Classes in java.awt.event that implement FocusListener
 class FocusAdapter
An abstract adapter class for receiving keyboard focus events.

Uses of FocusListener in javax.accessibility

Methods in javax.accessibility with parameters of type FocusListener
void | AccessibleComponent.addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | AccessibleComponent.removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.

Uses of FocusListener in javax.swing

Classes in javax.swing that implement FocusListener
protected  class JComponent.AccessibleJComponent.AccessibleFocusHandler
Fire PropertyChange listener, if one is registered, when focus events happen

Fields in javax.swing declared as FocusListener
protected  FocusListener JComponent.AccessibleJComponent.accessibleFocusHandler

Methods in javax.swing with parameters of type FocusListener
void | JList.AccessibleJList.AccessibleJListChild.addFocusListener(FocusListener l)
void | JList.AccessibleJList.AccessibleJListChild.removeFocusListener(FocusListener l)
void | JTree.AccessibleJTree.AccessibleJTreeNode.addFocusListener(FocusListener l)
void | JTree.AccessibleJTree.AccessibleJTreeNode.removeFocusListener(FocusListener l)
void | JTable.AccessibleJTable.AccessibleJTableCell.addFocusListener(FocusListener l)
void | JTable.AccessibleJTable.AccessibleJTableCell.removeFocusListener(FocusListener l)

Uses of FocusListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement FocusListener
class | BasicButtonListener Button Listener
class | BasicComboBoxEditor The default editor for editable combo boxes
static class | BasicComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
class | BasicComboBoxUI.FocusHandler This listener hides the popup when the focus is lost.
class | BasicListUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicSliderUI.FocusHandler Focus-change listener.
class | BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses.
class | BasicTabbedPaneUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.FocusHandler This inner class is marked "public" due to a compiler bug.
static class | BasicTextUI.BasicCaret
protected class | BasicToolBarUI.ToolBarFocusListener
class | BasicTreeUI.FocusHandler Repaints the lead selection row when focus is lost/gained.

Fields in javax.swing.plaf.basic declared as FocusListener
protected FocusListener | BasicTabbedPaneUI.focusListener
protected FocusListener | BasicTableUI.focusListener
protected FocusListener | BasicToolBarUI.toolBarFocusListener
protected FocusListener | BasicListUI.focusListener
protected FocusListener | BasicComboBoxUI.focusListener
protected FocusListener | BasicSplitPaneUI.focusListener Instance of the FocusListener for this JSplitPane.
protected FocusListener | BasicSliderUI.focusListener

Methods in javax.swing.plaf.basic that return FocusListener
protected FocusListener | BasicTabbedPaneUI.createFocusListener()
protected FocusListener | BasicTableUI.createFocusListener() Creates the focus listener for handling keyboard navigation in the JTable.
protected FocusListener | BasicToolBarUI.createToolBarFocusListener()
protected FocusListener | BasicListUI.createFocusListener()
protected FocusListener | BasicComboBoxUI.createFocusListener() Creates the focus listener that hides the popup when the focus is lost.
protected FocusListener | BasicTreeUI.createFocusListener() Creates a listener that is responsible for updating the display when focus is lost/gained.
protected FocusListener | BasicSplitPaneUI.createFocusListener() Creates a FocusListener for the JSplitPane UI.
protected FocusListener | BasicSliderUI.createFocusListener(JSlider slider)

Uses of FocusListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement FocusListener
class | MetalComboBoxEditor The default editor for Metal editable combo boxes
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.

Uses of FocusListener in javax.swing.table

Methods in javax.swing.table with parameters of type FocusListener
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.addFocusListener(FocusListener l)
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.removeFocusListener(FocusListener l)

Uses of FocusListener in javax.swing.text

Classes in javax.swing.text that implement FocusListener
 class DefaultCaret
A default implementation of Caret.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.HierarchyBoundsListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.HierarchyBoundsListener

Packages that use HierarchyBoundsListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.

Uses of HierarchyBoundsListener in java.awt

Classes in java.awt that implement HierarchyBoundsListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return HierarchyBoundsListener
static HierarchyBoundsListener | AWTEventMulticaster.add(HierarchyBoundsListener a, HierarchyBoundsListener b) Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
static HierarchyBoundsListener | AWTEventMulticaster.remove(HierarchyBoundsListener l, HierarchyBoundsListener oldl) Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type HierarchyBoundsListener
void | Component.addHierarchyBoundsListener(HierarchyBoundsListener l) Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
void | Component.removeHierarchyBoundsListener(HierarchyBoundsListener l) Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
static HierarchyBoundsListener | AWTEventMulticaster.add(HierarchyBoundsListener a, HierarchyBoundsListener b) Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
static HierarchyBoundsListener | AWTEventMulticaster.remove(HierarchyBoundsListener l, HierarchyBoundsListener oldl) Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.

Uses of HierarchyBoundsListener in java.awt.event

Classes in java.awt.event that implement HierarchyBoundsListener
 class HierarchyBoundsAdapter
An abstract adapter class for receiving ancestor moved and resized events.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.HierarchyListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.HierarchyListener

Packages that use HierarchyListener
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of HierarchyListener in java.awt

Classes in java.awt that implement HierarchyListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return HierarchyListener
static HierarchyListener | AWTEventMulticaster.add(HierarchyListener a, HierarchyListener b) Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
static HierarchyListener | AWTEventMulticaster.remove(HierarchyListener l, HierarchyListener oldl) Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type HierarchyListener
void | Component.addHierarchyListener(HierarchyListener l) Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
void | Component.removeHierarchyListener(HierarchyListener l) Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
static HierarchyListener | AWTEventMulticaster.add(HierarchyListener a, HierarchyListener b) Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
static HierarchyListener | AWTEventMulticaster.remove(HierarchyListener l, HierarchyListener oldl) Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.InputMethodListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.InputMethodListener

Packages that use InputMethodListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of InputMethodListener in java.awt

Classes in java.awt that implement InputMethodListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return InputMethodListener
static InputMethodListener | AWTEventMulticaster.add(InputMethodListener a, InputMethodListener b) Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
static InputMethodListener | AWTEventMulticaster.remove(InputMethodListener l, InputMethodListener oldl) Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type InputMethodListener
void | Component.addInputMethodListener(InputMethodListener l) Adds the specified input method listener to receive input method events from this component.
void | Component.removeInputMethodListener(InputMethodListener l) Removes the specified input method listener so that it no longer receives input method events from this component.
static InputMethodListener | AWTEventMulticaster.add(InputMethodListener a, InputMethodListener b) Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
static InputMethodListener | AWTEventMulticaster.remove(InputMethodListener l, InputMethodListener oldl) Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.

Uses of InputMethodListener in javax.swing.text

Methods in javax.swing.text with parameters of type InputMethodListener
 void JTextComponent.addInputMethodListener(InputMethodListener l)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.ItemListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.ItemListener

Packages that use ItemListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ItemListener in java.awt

Classes in java.awt that implement ItemListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.

Methods in java.awt that return ItemListener
static ItemListener | AWTEventMulticaster.add(ItemListener a, ItemListener b) Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
static ItemListener | AWTEventMulticaster.remove(ItemListener l, ItemListener oldl) Removes the old item-listener from item-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type ItemListener
void | Checkbox.addItemListener(ItemListener l) Adds the specified item listener to receive item events from this check box.
void | Checkbox.removeItemListener(ItemListener l) Removes the specified item listener so that the item listener no longer receives item events from this check box.
static ItemListener | AWTEventMulticaster.add(ItemListener a, ItemListener b) Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
static ItemListener | AWTEventMulticaster.remove(ItemListener l, ItemListener oldl) Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
void | List.addItemListener(ItemListener l) Adds the specified item listener to receive item events from this list.
void | List.removeItemListener(ItemListener l) Removes the specified item listener so that it no longer receives item events from this list.
void | Choice.addItemListener(ItemListener l) Adds the specified item listener to receive item events from this Choice menu.
void | Choice.removeItemListener(ItemListener l) Removes the specified item listener so that it no longer receives item events from this Choice menu.
void | ItemSelectable.addItemListener(ItemListener l) Add a listener to recieve item events when the state of an item changes.
void | ItemSelectable.removeItemListener(ItemListener l) Removes an item listener.
void | CheckboxMenuItem.addItemListener(ItemListener l) Adds the specified item listener to receive item events from this check box menu item.
void | CheckboxMenuItem.removeItemListener(ItemListener l) Removes the specified item listener so that it no longer receives item events from this check box menu item.

Uses of ItemListener in javax.swing

Classes in javax.swing that implement ItemListener
protected class | DefaultCellEditor.EditorDelegate
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.

Fields in javax.swing declared as ItemListener
protected  ItemListener AbstractButton.itemListener
The button model's ItemListener.

Methods in javax.swing that return ItemListener
protected  ItemListener AbstractButton.createItemListener()

Methods in javax.swing with parameters of type ItemListener
void | AbstractButton.addItemListener(ItemListener l) Adds an ItemListener to the checkbox.
void | AbstractButton.removeItemListener(ItemListener l) Removes an ItemListener from the button.
void | ButtonModel.addItemListener(ItemListener l) Adds an ItemListener to the button.
void | ButtonModel.removeItemListener(ItemListener l) Removes an ItemListener from the button.
void | JComboBox.addItemListener(ItemListener aListener) Adds an ItemListener.
void | JComboBox.removeItemListener(ItemListener aListener) Removes an ItemListener.
void | DefaultButtonModel.addItemListener(ItemListener l) Adds an ItemListener to the button.
void | DefaultButtonModel.removeItemListener(ItemListener l) Removes an ItemListener from the button.

Uses of ItemListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ItemListener
class | BasicComboBoxUI.ItemHandler This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.
protected class | BasicComboPopup.ItemHandler This listener watches for changes in the JComboBox's selection.

Fields in javax.swing.plaf.basic declared as ItemListener
protected ItemListener | BasicComboPopup.itemListener
protected ItemListener | BasicComboBoxUI.itemListener

Methods in javax.swing.plaf.basic that return ItemListener
protected ItemListener | BasicComboPopup.createItemListener() Creates an item listener that watches for changes in the selected item in the JComboBox.
protected ItemListener | BasicComboBoxUI.createItemListener() Creates the item listener that watches for updates in the current selection so that it can update the display.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.KeyListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.KeyListener

Packages that use KeyListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of KeyListener in java.awt

Classes in java.awt that implement KeyListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return KeyListener
static KeyListener | AWTEventMulticaster.add(KeyListener a, KeyListener b) Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
static KeyListener | AWTEventMulticaster.remove(KeyListener l, KeyListener oldl) Removes the old key-listener from key-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type KeyListener
void | Component.addKeyListener(KeyListener l) Adds the specified key listener to receive key events from this component.
void | Component.removeKeyListener(KeyListener l) Removes the specified key listener so that it no longer receives key events from this component.
static KeyListener | AWTEventMulticaster.add(KeyListener a, KeyListener b) Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
static KeyListener | AWTEventMulticaster.remove(KeyListener l, KeyListener oldl) Removes the old key-listener from key-listener-l and returns the resulting multicast listener.

Uses of KeyListener in java.awt.event

Classes in java.awt.event that implement KeyListener
 class KeyAdapter
An abstract adapter class for receiving keyboard events.

Uses of KeyListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement KeyListener
class | BasicComboBoxUI.KeyHandler This listener checks to see if the key event isn't a navigation key.
class | BasicComboPopup.InvocationKeyHandler This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
class | BasicTableUI.KeyHandler This inner class is marked "public" due to a compiler bug.
class | BasicTreeUI.KeyHandler This is used to get mutliple key down events to appropriately generate events.

Fields in javax.swing.plaf.basic declared as KeyListener
protected KeyListener | BasicComboPopup.keyListener
protected KeyListener | BasicTableUI.keyListener
protected KeyListener | BasicComboBoxUI.keyListener
protected KeyListener | BasicComboBoxUI.popupKeyListener

Methods in javax.swing.plaf.basic that return KeyListener
 KeyListener BasicComboPopup.getKeyListener()
Implementation of ComboPopup.getKeyListener().
protected  KeyListener BasicComboPopup.createKeyListener()
Creates the key listener that is returned by ComboPopup.getKeyListener().
protected  KeyListener BasicTableUI.createKeyListener()
Creates the key listener for handling keyboard navigation in the JTable.
 KeyListener ComboPopup.getKeyListener()
Returns a key listener that shows and hides the popup.
protected  KeyListener BasicComboBoxUI.createKeyListener()
Creates the key listener for handling type-ahead.
protected  KeyListener BasicTreeUI.createKeyListener()
Creates the listener reponsible for getting key events from the tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.MouseListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.MouseListener

Packages that use MouseListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of MouseListener in java.awt

Classes in java.awt that implement MouseListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return MouseListener
static MouseListener | AWTEventMulticaster.add(MouseListener a, MouseListener b) Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
static MouseListener | AWTEventMulticaster.remove(MouseListener l, MouseListener oldl) Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type MouseListener
void | Component.addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component.
void | Component.removeMouseListener(MouseListener l) Removes the specified mouse listener so that it no longer receives mouse events from this component.
static MouseListener | AWTEventMulticaster.add(MouseListener a, MouseListener b) Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
static MouseListener | AWTEventMulticaster.remove(MouseListener l, MouseListener oldl) Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.

Uses of MouseListener in java.awt.dnd

Classes in java.awt.dnd that implement MouseListener
 class MouseDragGestureRecognizer
This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Uses of MouseListener in java.awt.event

Classes in java.awt.event that implement MouseListener
 class MouseAdapter
An abstract adapter class for receiving mouse events.

Uses of MouseListener in javax.swing

Classes in javax.swing that implement MouseListener
 class ToolTipManager
Manages all the ToolTips in the system.

Uses of MouseListener in javax.swing.event

Subinterfaces of MouseListener in javax.swing.event
 interface MouseInputListener
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.

Classes in javax.swing.event that implement MouseListener
 class MouseInputAdapter
The adapter which receives mouse events and mouse motion events.

Uses of MouseListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement MouseListener
class | BasicButtonListener Button Listener
protected class | BasicComboPopup.InvocationMouseHandler This listener knows how and when to invoke this popup menu.
protected class | BasicComboPopup.ListMouseHandler This listener hides the popup when the mouse is released in the list.
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
protected class | BasicFileChooserUI.DoubleClickListener
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
protected class | BasicMenuItemUI.MouseInputHandler
protected class | BasicScrollBarUI.ArrowButtonListener Listener for cursor keys.
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
class | BasicSliderUI.TrackListener Track mouse movements.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
class | BasicTabbedPaneUI.MouseHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableHeaderUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
static class | BasicTextUI.BasicCaret
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
class | BasicTreeUI.MouseHandler TreeMouseListener is responsible for updating the selection based on mouse events.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.

Fields in javax.swing.plaf.basic declared as MouseListener
protected MouseListener | BasicComboPopup.mouseListener
protected MouseListener | BasicComboPopup.listMouseListener
protected MouseListener | BasicTabbedPaneUI.mouseListener
protected MouseListener | BasicComboBoxUI.popupMouseListener

Methods in javax.swing.plaf.basic that return MouseListener
 MouseListener BasicComboPopup.getMouseListener()
Implementation of ComboPopup.getMouseListener().
protected  MouseListener BasicComboPopup.createMouseListener()
Creates the mouse listener that is returned by ComboPopup.getMouseListener().
protected  MouseListener BasicComboPopup.createListMouseListener()
Creates a mouse listener that watches for mouse events in the popup's list.
protected  MouseListener BasicTabbedPaneUI.createMouseListener()
protected  MouseListener BasicFileChooserUI.createDoubleClickListener(JFileChooser fc, JList list)
 MouseListener ComboPopup.getMouseListener()
Returns a mouse listener that shows and hides the popup.
protected  MouseListener BasicTreeUI.createMouseListener()
Creates the listener responsible for updating the selection based on mouse events.

Uses of MouseListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement MouseListener
protected class | MetalFileChooserUI.SingleClickListener
protected class | MetalToolBarUI.MetalDockingListener

Uses of MouseListener in javax.swing.text

Classes in javax.swing.text that implement MouseListener
 class DefaultCaret
A default implementation of Caret.

Uses of MouseListener in javax.swing.text.html

Classes in javax.swing.text.html that implement MouseListener
protected class | FormView.MouseEventListener MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.MouseMotionListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.MouseMotionListener

Packages that use MouseMotionListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of MouseMotionListener in java.awt

Classes in java.awt that implement MouseMotionListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return MouseMotionListener
static MouseMotionListener | AWTEventMulticaster.add(MouseMotionListener a, MouseMotionListener b) Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
static MouseMotionListener | AWTEventMulticaster.remove(MouseMotionListener l, MouseMotionListener oldl) Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type MouseMotionListener
void | Component.addMouseMotionListener(MouseMotionListener l) Adds the specified mouse motion listener to receive mouse motion events from this component.
void | Component.removeMouseMotionListener(MouseMotionListener l) Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
static MouseMotionListener | AWTEventMulticaster.add(MouseMotionListener a, MouseMotionListener b) Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
static MouseMotionListener | AWTEventMulticaster.remove(MouseMotionListener l, MouseMotionListener oldl) Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.

Uses of MouseMotionListener in java.awt.dnd

Classes in java.awt.dnd that implement MouseMotionListener
 class MouseDragGestureRecognizer
This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Uses of MouseMotionListener in java.awt.event

Classes in java.awt.event that implement MouseMotionListener
 class MouseMotionAdapter
An abstract adapter class for receiving mouse motion events.

Uses of MouseMotionListener in javax.swing

Classes in javax.swing that implement MouseMotionListener
 class ToolTipManager
Manages all the ToolTips in the system.

Uses of MouseMotionListener in javax.swing.event

Subinterfaces of MouseMotionListener in javax.swing.event
 interface MouseInputListener
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.

Classes in javax.swing.event that implement MouseMotionListener
 class MouseInputAdapter
The adapter which receives mouse events and mouse motion events.

Uses of MouseMotionListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement MouseMotionListener
class | BasicButtonListener Button Listener
protected class | BasicComboPopup.InvocationMouseMotionHandler This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
protected class | BasicComboPopup.ListMouseMotionHandler This listener changes the selected item as you move the mouse over the list.
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
protected class | BasicMenuItemUI.MouseInputHandler
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
class | BasicSliderUI.TrackListener Track mouse movements.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
class | BasicTableHeaderUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
static class | BasicTextUI.BasicCaret
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.

Fields in javax.swing.plaf.basic declared as MouseMotionListener
protected MouseMotionListener | BasicComboPopup.mouseMotionListener
protected MouseMotionListener | BasicComboPopup.listMouseMotionListener
protected MouseMotionListener | BasicComboBoxUI.popupMouseMotionListener

Methods in javax.swing.plaf.basic that return MouseMotionListener
 MouseMotionListener BasicComboPopup.getMouseMotionListener()
Implementation of ComboPopup.getMouseMotionListener().
protected  MouseMotionListener BasicComboPopup.createMouseMotionListener()
Creates the mouse motion listener that is returned by ComboPopup.getMouseMotionListener().
protected  MouseMotionListener BasicComboPopup.createListMouseMotionListener()
Creates a mouse motion listener that watches for mouse events in the popup's list.
 MouseMotionListener ComboPopup.getMouseMotionListener()
Returns a mouse motion listener that makes the popup act like a menu.

Uses of MouseMotionListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement MouseMotionListener
protected  class MetalToolBarUI.MetalDockingListener

Uses of MouseMotionListener in javax.swing.text

Classes in javax.swing.text that implement MouseMotionListener
 class DefaultCaret
A default implementation of Caret.

Uses of MouseMotionListener in javax.swing.text.html

Classes in javax.swing.text.html that implement MouseMotionListener
static class HTMLEditorKit.LinkController
Class to watch the associated component and fire hyperlink events on it when appropriate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.TextListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.TextListener

Packages that use TextListener
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of TextListener in java.awt

Classes in java.awt that implement TextListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.

Fields in java.awt declared as TextListener
protected  TextListener TextComponent.textListener

Methods in java.awt that return TextListener
static TextListener | AWTEventMulticaster.add(TextListener a, TextListener b)
static TextListener | AWTEventMulticaster.remove(TextListener l, TextListener oldl)

Methods in java.awt with parameters of type TextListener
static TextListener | AWTEventMulticaster.add(TextListener a, TextListener b)
static TextListener | AWTEventMulticaster.remove(TextListener l, TextListener oldl)
void | TextComponent.addTextListener(TextListener l) Adds the specified text event listener to receive text events from this text component.
void | TextComponent.removeTextListener(TextListener l) Removes the specified text event listener so that it no longer receives text events from this text component If l is null, no exception is thrown and no action is performed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.event.WindowListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.event.WindowListener

Packages that use WindowListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of WindowListener in java.awt

Classes in java.awt that implement WindowListener
 class AWTEventMulticaster
A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.

Methods in java.awt that return WindowListener
static WindowListener | AWTEventMulticaster.add(WindowListener a, WindowListener b) Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
static WindowListener | AWTEventMulticaster.remove(WindowListener l, WindowListener oldl) Removes the old window-listener from window-listener-l and returns the resulting multicast listener.

Methods in java.awt with parameters of type WindowListener
static WindowListener | AWTEventMulticaster.add(WindowListener a, WindowListener b) Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
static WindowListener | AWTEventMulticaster.remove(WindowListener l, WindowListener oldl) Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
void | Window.addWindowListener(WindowListener l) Adds the specified window listener to receive window events from this window.
void | Window.removeWindowListener(WindowListener l) Removes the specified window listener so that it no longer receives window events from this window.

Uses of WindowListener in java.awt.event

Classes in java.awt.event that implement WindowListener
 class WindowAdapter
An abstract adapter class for receiving window events.

Uses of WindowListener in javax.swing

Classes in javax.swing that implement WindowListener
protected  class JMenu.WinListener
A listener class that watches for a popup window closing.

Uses of WindowListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement WindowListener
protected  class BasicToolBarUI.FrameListener

Methods in javax.swing.plaf.basic that return WindowListener
protected  WindowListener BasicToolBarUI.createFrameListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ComponentAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ComponentAdapter

java.lang.Object
  |
  +--java.awt.event.ComponentAdapter
All Implemented Interfaces:
ComponentListener, EventListener
Direct Known Subclasses:
BasicSliderUI.ComponentHandler, BasicTreeUI.ComponentHandler, JViewport.ViewListener
public abstract class ComponentAdapter
extends Object
implements ComponentListener

An abstract adapter class for receiving component events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a ComponentEvent listener and override the methods for the events of interest. (If you implement the ComponentListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using your class and then register it with a component using the component's addComponentListener method. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

Since:
1.1
See Also:
ComponentEvent, ComponentListener, Tutorial: Writing a Component Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
ComponentAdapter()
Method Summary
void | componentHidden(ComponentEvent e) Invoked when the component has been made invisible.
void | componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | componentResized(ComponentEvent e) Invoked when the component's size changes.
void | componentShown(ComponentEvent e) Invoked when the component has been made visible.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComponentAdapter

public ComponentAdapter()
Method Detail

componentResized

public void componentResized(ComponentEvent e)
Invoked when the component's size changes.
Specified by:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Invoked when the component's position changes.
Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Invoked when the component has been made visible.
Specified by:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Invoked when the component has been made invisible.
Specified by:
componentHidden in interface ComponentListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ComponentEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ContainerEvent, FocusEvent, InputEvent, PaintEvent, WindowEvent
public class ComponentEvent
extends AWTEvent

A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).

Component events are provided for notification purposes ONLY; The AWT will automatically handle component moves and resizes internally so that GUI layout works properly regardless of whether a program is receiving these events or not.

In addition to serving as the base class for other component-related events (InputEvent, FocusEvent, WindowEvent, ContainerEvent), this class defines the events that indicate changes in a component's size, position, or visibility.

This low-level event is generated by a component object (such as a List) when the component is moved, resized, rendered invisible, or made visible again. The event is passed to every ComponentListener or ComponentAdapter object which registered to receive such events using the component's addComponentListener method. (ComponentAdapter objects implement the ComponentListener interface.) Each such listener object gets this ComponentEvent when the event occurs.

Since:
1.1
See Also:
ComponentAdapter, ComponentListener, Tutorial: Writing a Component Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | COMPONENT_FIRST The first number in the range of ids used for component events.
static int | COMPONENT_HIDDEN This event indicates that the component was rendered invisible.
static int | COMPONENT_LAST The last number in the range of ids used for component events.
static int | COMPONENT_MOVED This event indicates that the component's position changed.
static int | COMPONENT_RESIZED This event indicates that the component's size changed.
static int | COMPONENT_SHOWN This event indicates that the component was made visible.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
ComponentEvent(Component source, int id)
Constructs a ComponentEvent object.
Method Summary
Component | getComponent() Returns the originator of the event.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

COMPONENT_FIRST

public static final int COMPONENT_FIRST
The first number in the range of ids used for component events.

COMPONENT_LAST

public static final int COMPONENT_LAST
The last number in the range of ids used for component events.

COMPONENT_MOVED

public static final int COMPONENT_MOVED
This event indicates that the component's position changed.

COMPONENT_RESIZED

public static final int COMPONENT_RESIZED
This event indicates that the component's size changed.

COMPONENT_SHOWN

public static final int COMPONENT_SHOWN
This event indicates that the component was made visible.

COMPONENT_HIDDEN

public static final int COMPONENT_HIDDEN
This event indicates that the component was rendered invisible.
Constructor Detail

ComponentEvent

public ComponentEvent(Component source,
                      int id)
Constructs a ComponentEvent object.
Parameters:
source - the Component object that originated the event
id - an integer indicating the type of event
Method Detail

getComponent

public Component getComponent()
Returns the originator of the event.
Returns:
the Component object that originated the event

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface ComponentListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, ComponentAdapter, BasicInternalFrameUI.ComponentHandler
public interface ComponentListener
extends EventListener

The listener interface for receiving component events. The class that is interested in processing a component event either implements this interface (and all the methods it contains) or extends the abstract ComponentAdapter class (overriding only the methods of interest). The listener object created from that class is then registered with a component using the component's addComponentListener method. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

Component events are provided for notification purposes ONLY; The AWT will automatically handle component moves and resizes internally so that GUI layout works properly regardless of whether a program registers a ComponentListener or not.

Since:
1.1
See Also:
ComponentAdapter, ComponentEvent, Tutorial: Writing a Component Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | componentHidden(ComponentEvent e) Invoked when the component has been made invisible.
void | componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | componentResized(ComponentEvent e) Invoked when the component's size changes.
void | componentShown(ComponentEvent e) Invoked when the component has been made visible.

Method Detail

componentResized

public void componentResized(ComponentEvent e)
Invoked when the component's size changes.

componentMoved

public void componentMoved(ComponentEvent e)
Invoked when the component's position changes.

componentShown

public void componentShown(ComponentEvent e)
Invoked when the component has been made visible.

componentHidden

public void componentHidden(ComponentEvent e)
Invoked when the component has been made invisible.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContainerAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ContainerAdapter

java.lang.Object
  |
  +--java.awt.event.ContainerAdapter
All Implemented Interfaces:
ContainerListener, EventListener
public abstract class ContainerAdapter
extends Object
implements ContainerListener

An abstract adapter class for receiving container events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a ContainerEvent listener and override the methods for the events of interest. (If you implement the ContainerListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addContainerListener method. When the container's contents change because a component has been added or removed, the relevant method in the listener object is invoked, and the ContainerEvent is passed to it.

Since:
1.1
See Also:
ContainerEvent, ContainerListener, Tutorial: Writing a Container Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
ContainerAdapter()
Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ContainerAdapter

public ContainerAdapter()
Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface ContainerListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContainerEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ContainerEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.ContainerEvent
All Implemented Interfaces:
Serializable
public class ContainerEvent
extends ComponentEvent

A low-level event which indicates that a container's contents changed because a component was added or removed.

Container events are provided for notification purposes ONLY; The AWT will automatically handle changes to the containers contents internally so that the program works properly regardless of whether the program is receiving these events or not.

This low-level event is generated by a container object (such as a Panel) when a component is added to it or removed from it. The event is passed to every ContainerListener or ContainerAdapter object which registered to receive such events using the component's addContainerListener method. (ContainerAdapter objects implement the ContainerListener interface.) Each such listener object gets this ContainerEvent when the event occurs.

Since:
1.1
See Also:
ContainerAdapter, ContainerListener, Tutorial: Writing a Container Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | COMPONENT_ADDED This event indicates that a component was added to the container.
static int | COMPONENT_REMOVED This event indicates that a component was removed from the container.
static int | CONTAINER_FIRST The first number in the range of ids used for container events.
static int | CONTAINER_LAST The last number in the range of ids used for container events.
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
ContainerEvent(Component source, int id, Component child)
Constructs a ContainerEvent object.
Method Summary
Component | getChild() Returns the component that was affected by the event.
Container | getContainer() Returns the originator of the event.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

CONTAINER_FIRST

public static final int CONTAINER_FIRST
The first number in the range of ids used for container events.

CONTAINER_LAST

public static final int CONTAINER_LAST
The last number in the range of ids used for container events.

COMPONENT_ADDED

public static final int COMPONENT_ADDED
This event indicates that a component was added to the container.

COMPONENT_REMOVED

public static final int COMPONENT_REMOVED
This event indicates that a component was removed from the container.
Constructor Detail

ContainerEvent

public ContainerEvent(Component source,
                      int id,
                      Component child)
Constructs a ContainerEvent object.
Parameters:
source - the Component object (container) that originated the event
id - an integer indicating the type of event
child - the component that was added or removed
Method Detail

getContainer

public Container getContainer()
Returns the originator of the event.
Returns:
the Container object that originated the event

getChild

public Component getChild()
Returns the component that was affected by the event.
Returns:
the Component object that was added or removed

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContainerListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface ContainerListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, Container.AccessibleAWTContainer.AccessibleContainerHandler, ContainerAdapter, JComponent.AccessibleJComponent.AccessibleContainerHandler, BasicToolBarUI.ToolBarContListener, MetalToolBarUI.MetalContainerListener
public interface ContainerListener
extends EventListener

The listener interface for receiving container events. The class that is interested in processing a container event either implements this interface (and all the methods it contains) or extends the abstract ContainerAdapter class (overriding only the methods of interest). The listener object created from that class is then registered with a component using the component's addContainerListener method. When the container's contents change because a component has been added or removed, the relevant method in the listener object is invoked, and the ContainerEvent is passed to it.

Container events are provided for notification purposes ONLY; The AWT will automatically handle add and remove operations internally so the program works properly regardless of whether the program registers a ComponentListener or not.

Since:
1.1
See Also:
ContainerAdapter, ContainerEvent, Tutorial: Writing a Container Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.

Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Invoked when a component has been added to the container.

componentRemoved

public void componentRemoved(ContainerEvent e)
Invoked when a component has been removed from the container.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class FocusAdapter

java.lang.Object
  |
  +--java.awt.event.FocusAdapter
All Implemented Interfaces:
EventListener, FocusListener
Direct Known Subclasses:
BasicSplitPaneUI.FocusHandler, BasicTabbedPaneUI.FocusHandler
public abstract class FocusAdapter
extends Object
implements FocusListener

An abstract adapter class for receiving keyboard focus events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a FocusEvent listener and override the methods for the events of interest. (If you implement the FocusListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addFocusListener method. When the component gains or loses the keyboard focus, the relevant method in the listener object is invoked, and the FocusEvent is passed to it.

Since:
1.1
See Also:
FocusEvent, FocusListener, Tutorial: Writing a Focus Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
FocusAdapter()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FocusAdapter

public FocusAdapter()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class FocusEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.FocusEvent
All Implemented Interfaces:
Serializable
public class FocusEvent
extends ComponentEvent

A low-level event which indicates that a component has gained or lost the keyboard focus. This low-level event is generated by a component (such as a text field). The event is passed to every FocusListener or FocusAdapter object which registered to receive such events using the component's addFocusListener method. (FocusAdapter objects implement the FocusListener interface.) Each such listener object gets this FocusEvent when the event occurs.

There are two levels of focus change events: permanent and temporary. Permanent focus change events occur when focus is directly moved from one component to another, such as through calls to requestFocus() or as the user uses the Tab key to traverse components. Temporary focus change events occur when focus is temporarily gained or lost for a component as the indirect result of another operation, such as window deactivation or a scrollbar drag. In this case, the original focus state will automatically be restored once that operation is finished, or, for the case of window deactivation, when the window is reactivated. Both permanent and temporary focus events are delivered using the FOCUS_GAINED and FOCUS_LOST event ids; the levels may be distinguished in the event using the isTemporary() method.

Since:
1.1
See Also:
FocusAdapter, FocusListener, Tutorial: Writing a Focus Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | FOCUS_FIRST The first number in the range of ids used for focus events.
static int | FOCUS_GAINED This event indicates that the component gained the keyboard focus.
static int | FOCUS_LAST The last number in the range of ids used for focus events.
static int | FOCUS_LOST This event indicates that the component lost the keyboard focus.
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
FocusEvent(Component source, int id)
Constructs a FocusEvent object and identifies it as a permanent change in focus.
FocusEvent(Component source, int id, boolean temporary)
Constructs a FocusEvent object and identifies whether or not the change is temporary.
Method Summary
boolean | isTemporary() Identifies the focus change event as temporary or permanent.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

FOCUS_FIRST

public static final int FOCUS_FIRST
The first number in the range of ids used for focus events.

FOCUS_LAST

public static final int FOCUS_LAST
The last number in the range of ids used for focus events.

FOCUS_GAINED

public static final int FOCUS_GAINED
This event indicates that the component gained the keyboard focus.

FOCUS_LOST

public static final int FOCUS_LOST
This event indicates that the component lost the keyboard focus.
Constructor Detail

FocusEvent

public FocusEvent(Component source,
                  int id,
                  boolean temporary)
Constructs a FocusEvent object and identifies whether or not the change is temporary.
Parameters:
source - the Component that originated the event
id - an integer indicating the type of event
temporary - a boolean, true if the focus change is temporary

FocusEvent

public FocusEvent(Component source,
                  int id)
Constructs a FocusEvent object and identifies it as a permanent change in focus.
Parameters:
source - the Component that originated the event
id - an integer indicating the type of event
Method Detail

isTemporary

public boolean isTemporary()
Identifies the focus change event as temporary or permanent.
Returns:
a boolean value, true if the focus change is temporary

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface FocusListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler, FocusAdapter, JComponent.AccessibleJComponent.AccessibleFocusHandler, DefaultCaret, BasicTableUI.FocusHandler, BasicToolBarUI.ToolBarFocusListener, BasicButtonListener, BasicListUI.FocusHandler, BasicComboBoxUI.FocusHandler, BasicTreeUI.FocusHandler, BasicComboBoxEditor, BasicSliderUI.FocusHandler
public interface FocusListener
extends EventListener

The listener interface for receiving keyboard focus events on a component. The class that is interested in processing a focus event either implements this interface (and all the methods it contains) or extends the abstract FocusAdapter class (overriding only the methods of interest). The listener object created from that class is then registered with a component using the component's addFocusListener method. When the component gains or loses the keyboard focus, the relevant method in the listener object is invoked, and the FocusEvent is passed to it.

Since:
1.1
See Also:
FocusAdapter, FocusEvent, Tutorial: Writing a Focus Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.

Method Detail

focusGained

public void focusGained(FocusEvent e)
Invoked when a component gains the keyboard focus.

focusLost

public void focusLost(FocusEvent e)
Invoked when a component loses the keyboard focus.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HierarchyBoundsAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class HierarchyBoundsAdapter

java.lang.Object
  |
  +--java.awt.event.HierarchyBoundsAdapter
All Implemented Interfaces:
EventListener, HierarchyBoundsListener
public abstract class HierarchyBoundsAdapter
extends Object
implements HierarchyBoundsListener

An abstract adapter class for receiving ancestor moved and resized events. The methods in this class are empty. This class exists as a convenience for creating listener objects.

Extend this class and override the method for the event of interest. (If you implement the HierarchyBoundsListener interface, you have to define both methods in it. This abstract class defines null methods for them both, so you only have to define the method for the event you care about.)

Create a listener object using your class and then register it with a Component using the Component's addHierarchyBoundsListener method. When the hierarchy to which the Component belongs changes by resize or movement of an ancestor, the relevant method in the listener object is invoked, and the HierarchyEvent is passed to it.

Since:
1.3
See Also:
HierarchyBoundsListener, HierarchyEvent

Constructor Summary
HierarchyBoundsAdapter()
Method Summary
void | ancestorMoved(HierarchyEvent e) Called when an ancestor of the source is moved.
void | ancestorResized(HierarchyEvent e) Called when an ancestor of the source is resized.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HierarchyBoundsAdapter

public HierarchyBoundsAdapter()
Method Detail

ancestorMoved

public void ancestorMoved(HierarchyEvent e)
Called when an ancestor of the source is moved.
Specified by:
ancestorMoved in interface HierarchyBoundsListener

ancestorResized

public void ancestorResized(HierarchyEvent e)
Called when an ancestor of the source is resized.
Specified by:
ancestorResized in interface HierarchyBoundsListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HierarchyBoundsListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface HierarchyBoundsListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, HierarchyBoundsAdapter
public interface HierarchyBoundsListener
extends EventListener

The listener interface for receiving ancestor moved and resized events. The class that is interested in processing these events either implements this interface (and all the methods it contains) or extends the abstract HierarchyBoundsAdapter class (overriding only the method of interest). The listener object created from that class is then registered with a Component using the Component's addHierarchyBoundsListener method. When the hierarchy to which the Component belongs changes by the resizing or movement of an ancestor, the relevant method in the listener object is invoked, and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout works properly regardless of whether a program registers an HierarchyBoundsListener or not.

Since:
1.3
See Also:
HierarchyBoundsAdapter, HierarchyEvent

Method Summary
void | ancestorMoved(HierarchyEvent e) Called when an ancestor of the source is moved.
void | ancestorResized(HierarchyEvent e) Called when an ancestor of the source is resized.

Method Detail

ancestorMoved

public void ancestorMoved(HierarchyEvent e)
Called when an ancestor of the source is moved.

ancestorResized

public void ancestorResized(HierarchyEvent e)
Called when an ancestor of the source is resized.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HierarchyEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class HierarchyEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.HierarchyEvent
All Implemented Interfaces:
Serializable
public class HierarchyEvent
extends AWTEvent

An event which indicates a change to the Component hierarchy to which a Component belongs.

  • Hierarchy Change Events (HierarchyListener)
    • addition of an ancestor
    • removal of an ancestor
    • hierarchy made displayable
    • hierarchy made undisplayable
    • hierarchy shown on the screen (both visible and displayable)
    • hierarchy hidden on the screen (either invisible or undisplayable)
  • Ancestor Reshape Events (HierarchyBoundsListener)
    • an ancestor was resized
    • an ancestor was moved

Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout and displayability works properly regardless of whether a program is receiving these events or not.

This event is generated by a Container object (such as a Panel) when the Container is added, removed, moved, or resized, and passed down the hierarchy. It is also generated by a Component object when that object's addNotify, removeNotify, show, or hide method is called. ANCESTOR_MOVED and ANCESTOR_RESIZED events are dispatched to every HierarchyBoundsListener or HierarchyBoundsAdapter object which registered to receive such events using the Component's addHierarchyBoundsListener method. (HierarchyBoundsAdapter objects implement the HierarchyBoundsListener interface.) HIERARCHY_CHANGED events are dispatched to every HierarchyListener object which registered to receive such events using the Component's addHierarchyListener method. Each such listener object gets this HierarchyEvent when the event occurs.

Since:
1.3
See Also:
HierarchyListener, HierarchyBoundsAdapter, HierarchyBoundsListener, Serialized Form

Field Summary
static int | ANCESTOR_MOVED An ancestor-Container was moved.
static int | ANCESTOR_RESIZED An ancestor-Container was resized.
static int | DISPLAYABILITY_CHANGED The displayability of the hierarchy changed.
static int | HIERARCHY_CHANGED A modification was made to the entire hierarchy tree.
static int | HIERARCHY_FIRST Marks the first integer id for the range of hierarchy event ids.
static int | HIERARCHY_LAST Marks the last integer id for the range of ancestor event ids.
static int | PARENT_CHANGED The hierarchy changed through a reparent operation.
static int | SHOWING_CHANGED The showing state of the hierarchy changed.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
HierarchyEvent(Component source, int id, Component changed, Container changedParent)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
HierarchyEvent(Component source, int id, Component changed, Container changedParent, long changeFlags)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
Method Summary
 Component getChanged()
Returns the Component at the top of the hierarchy which was changed.
 Container getChangedParent()
Returns the parent of the Component returned by getChanged().
 long getChangeFlags()
Returns a bitmask which indicates the type(s) of HIERARCHY_CHANGED events represented in this event object.
 Component getComponent()
Returns the originator of the event.
 String paramString()
Returns a parameter string identifying this event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

HIERARCHY_FIRST

public static final int HIERARCHY_FIRST
Marks the first integer id for the range of hierarchy event ids.

HIERARCHY_CHANGED

public static final int HIERARCHY_CHANGED
A modification was made to the entire hierarchy tree.

ANCESTOR_MOVED

public static final int ANCESTOR_MOVED
An ancestor-Container was moved.

ANCESTOR_RESIZED

public static final int ANCESTOR_RESIZED
An ancestor-Container was resized.

HIERARCHY_LAST

public static final int HIERARCHY_LAST
Marks the last integer id for the range of ancestor event ids.

PARENT_CHANGED

public static final int PARENT_CHANGED
The hierarchy changed through a reparent operation.

DISPLAYABILITY_CHANGED

public static final int DISPLAYABILITY_CHANGED
The displayability of the hierarchy changed. To discern the current displayability of the hierarchy, call Component.isDisplayable(). Displayability changes occur in response to explicit or implicit calls to Component.addNotify() and Component.removeNotify().
See Also:
Component.isDisplayable(),
Component.addNotify(),
Component.removeNotify()

SHOWING_CHANGED

public static final int SHOWING_CHANGED
The showing state of the hierarchy changed. To discern the current showing state of the hierarchy, call Component.isShowing(). Showing state changes occur when either the displayability or visibility of the hierarchy occurs. Displayability changes occur in response to explicit or implicit calls to Component.addNotify() and Component.removeNotify(). Visibility changes occur in response to explicit or implicit calls to Component.show() and Component.hide().
See Also:
Component.isShowing(),
Component.addNotify(),
Component.removeNotify(),
Component.show(),
Component.hide()
Constructor Detail

HierarchyEvent

public HierarchyEvent(Component source,
                      int id,
                      Component changed,
                      Container changedParent)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
Parameters:
source - the Component object that originated the event
id - an integer indicating the type of event
changed - the Component at the top of the hierarchy which was changed
changedParent - the parent of changed. This may be the parent before or after the change, depending on the type of change.

HierarchyEvent

public HierarchyEvent(Component source,
                      int id,
                      Component changed,
                      Container changedParent,
                      long changeFlags)
Constructs an HierarchyEvent object to identify a change in the Component hierarchy.
Parameters:
source - the Component object that originated the event
id - an integer indicating the type of event
changed - the Component at the top of the hierarchy which was changed
changedParent - the parent of changed. This may be the parent before or after the change, depending on the type of change.
changeFlags - a bitmask which indicates the type(s) of HIERARCHY_CHANGED events represented in this event object
Method Detail

getComponent

public Component getComponent()
Returns the originator of the event.
Returns:
the Component object that originated the event

getChanged

public Component getChanged()
Returns the Component at the top of the hierarchy which was changed.
Returns:
the changed Component

getChangedParent

public Container getChangedParent()
Returns the parent of the Component returned by getChanged(). For a HIERARCHY_CHANGED event where the change was of type PARENT_CHANGED via a call to Container.add, the parent returned is the parent after the add operation. For a HIERARCHY_CHANGED event where the change was of type PARENT_CHANGED via a call to Container.remove, the parent returned is the parent before the remove operation. For all other events and types, the parent returned is the parent during the operation.
Returns:
the parent of the changed Component

getChangeFlags

public long getChangeFlags()
Returns a bitmask which indicates the type(s) of HIERARCHY_CHANGED events represented in this event object. The bits have been bitwise-ored together.
Returns:
the bitmask, or 0 if this is not an HIERARCHY_CHANGED event

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HierarchyListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface HierarchyListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster
public interface HierarchyListener
extends EventListener

The listener interface for receiving hierarchy changed events. The class that is interested in processing a hierarchy changed event should implement this interface. The listener object created from that class is then registered with a Component using the Component's addHierarchyListener method. When the hierarchy to which the Component belongs changes, the hierarchyChanged method in the listener object is invoked, and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout, displayability, and visibility work properly regardless of whether a program registers a HierarchyListener or not.

Since:
1.3
See Also:
HierarchyEvent

Method Summary
 void hierarchyChanged(HierarchyEvent e)
Called when the hierarchy has been changed.

Method Detail

hierarchyChanged

public void hierarchyChanged(HierarchyEvent e)
Called when the hierarchy has been changed. To discern the actual type of change, call HierarchyEvent.getChangeFlags().
See Also:
HierarchyEvent.getChangeFlags()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class InputEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.InputEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
KeyEvent, MouseEvent
public abstract class InputEvent
extends ComponentEvent

The root event class for all component-level input events. Input events are delivered to listeners before they are processed normally by the source where they originated. This allows listeners and component subclasses to "consume" the event so that the source will not process them in their default manner. For example, consuming mousePressed events on a Button component will prevent the Button from being activated.

Since:
1.1
See Also:
KeyEvent, KeyAdapter, MouseEvent, MouseAdapter, MouseMotionAdapter, Serialized Form

Field Summary
static int | ALT_GRAPH_MASK The alt-graph key modifier constant.
static int | ALT_MASK The alt key modifier constant.
static int | BUTTON1_MASK The mouse button1 modifier constant.
static int | BUTTON2_MASK The mouse button2 modifier constant.
static int | BUTTON3_MASK The mouse button3 modifier constant.
static int | CTRL_MASK The control key modifier constant.
static int | META_MASK The meta key modifier constant.
static int | SHIFT_MASK The shift key modifier constant.
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Method Summary
void | consume() Consumes this event so that it will not be processed in the default manner by the source which originated it.
int | getModifiers() Returns the modifiers flag for this event.
long | getWhen() Returns the timestamp of when this event occurred.
boolean | isAltDown() Returns whether or not the Alt modifier is down on this event.
boolean | isAltGraphDown() Returns whether or not the Alt-Graph modifier is down on this event.
boolean | isConsumed() Returns whether or not this event has been consumed.
boolean | isControlDown() Returns whether or not the Control modifier is down on this event.
boolean | isMetaDown() Returns whether or not the Meta modifier is down on this event.
boolean | isShiftDown() Returns whether or not the Shift modifier is down on this event.
Methods inherited from class java.awt.event.ComponentEvent
getComponent, paramString
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK
The shift key modifier constant.

CTRL_MASK

public static final int CTRL_MASK
The control key modifier constant.

META_MASK

public static final int META_MASK
The meta key modifier constant.

ALT_MASK

public static final int ALT_MASK
The alt key modifier constant.

ALT_GRAPH_MASK

public static final int ALT_GRAPH_MASK
The alt-graph key modifier constant.

BUTTON1_MASK

public static final int BUTTON1_MASK
The mouse button1 modifier constant.

BUTTON2_MASK

public static final int BUTTON2_MASK
The mouse button2 modifier constant.

BUTTON3_MASK

public static final int BUTTON3_MASK
The mouse button3 modifier constant.
Method Detail

isShiftDown

public boolean isShiftDown()
Returns whether or not the Shift modifier is down on this event.

isControlDown

public boolean isControlDown()
Returns whether or not the Control modifier is down on this event.

isMetaDown

public boolean isMetaDown()
Returns whether or not the Meta modifier is down on this event.

isAltDown

public boolean isAltDown()
Returns whether or not the Alt modifier is down on this event.

isAltGraphDown

public boolean isAltGraphDown()
Returns whether or not the Alt-Graph modifier is down on this event.

getWhen

public long getWhen()
Returns the timestamp of when this event occurred.

getModifiers

public int getModifiers()
Returns the modifiers flag for this event.

consume

public void consume()
Consumes this event so that it will not be processed in the default manner by the source which originated it.
Overrides:
consume in class AWTEvent

isConsumed

public boolean isConsumed()
Returns whether or not this event has been consumed.
Overrides:
isConsumed in class AWTEvent
See Also:
consume()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMethodEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class InputMethodEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.InputMethodEvent
All Implemented Interfaces:
Serializable
public class InputMethodEvent
extends AWTEvent

Input method events contain information about text that is being composed using an input method. Whenever the text changes, the input method sends an event. If the text component that's currently using the input method is an active client, the event is dispatched to that component. Otherwise, it is dispatched to a separate composition window.

The text included with the input method event consists of two parts: committed text and composed text. Either part may be empty. The two parts together replace any uncommitted composed text sent in previous events, or the currently selected committed text. Committed text should be integrated into the text component's persistent data, it will not be sent again. Composed text may be sent repeatedly, with changes to reflect the user's editing operations. Committed text always precedes composed text.

Since:
1.2
See Also:
Serialized Form

Field Summary
static int | CARET_POSITION_CHANGED The event type indicating a changed insertion point in input method text.
static int | INPUT_METHOD_FIRST Marks the first integer id for the range of input method event ids.
static int | INPUT_METHOD_LAST Marks the last integer id for the range of input method event ids.
static int | INPUT_METHOD_TEXT_CHANGED The event type indicating changed input method text.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.
InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition.
Method Summary
void | consume() Consumes this event so that it will not be processed in the default manner by the source which originated it.
TextHitInfo | getCaret() Gets the caret.
int | getCommittedCharacterCount() Gets the number of committed characters in the text.
AttributedCharacterIterator | getText() Gets the combined committed and composed text.
TextHitInfo | getVisiblePosition() Gets the position that's most important to be visible.
boolean | isConsumed() Returns whether or not this event has been consumed.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

INPUT_METHOD_FIRST

public static final int INPUT_METHOD_FIRST
Marks the first integer id for the range of input method event ids.

INPUT_METHOD_TEXT_CHANGED

public static final int INPUT_METHOD_TEXT_CHANGED
The event type indicating changed input method text. This event is generated by input methods while processing input.

CARET_POSITION_CHANGED

public static final int CARET_POSITION_CHANGED
The event type indicating a changed insertion point in input method text. This event is generated by input methods while processing input if only the caret changed.

INPUT_METHOD_LAST

public static final int INPUT_METHOD_LAST
Marks the last integer id for the range of input method event ids.
Constructor Detail

InputMethodEvent

public InputMethodEvent(Component source,
                        int id,
                        AttributedCharacterIterator text,
                        int committedCharacterCount,
                        TextHitInfo caret,
                        TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within text if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise.

Parameters:
source - The object where the event originated.
id - The event type.
text - The combined committed and composed text, committed text first. Must be null when the event type is CARET_POSITION_CHANGED; may be null for INPUT_METHOD_TEXT_CHANGED if there's no committed or composed text.
committedCharacterCount - The number of committed characters in the text.
caret - the caret (a.k.a. insertion point). Null if there's no caret within current composed text.
visiblePosition - The position that's most important to be visible. Null if there's no recommendation for a visible position within current composed text.
Throws:
IllegalArgumentException - if id is not in the range INPUT_METHOD_FIRST..INPUT_METHOD_LAST, if id is CARET_POSITION_CHANGED and text is not null, or if committedCharacterCount is not in the range 0..(text.getEndIndex() - text.getBeginIndex())

InputMethodEvent

public InputMethodEvent(Component source,
                        int id,
                        TextHitInfo caret,
                        TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition. The text is set to null, committedCharacterCount to 0.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event if the event being constructed as a CARET_POSITION_CHANGED event. For an INPUT_METHOD_TEXT_CHANGED event without text, caret and visiblePosition must be null.

Parameters:
source - The object where the event originated.
id - The event type.
caret - the caret (a.k.a. insertion point). Null if there's no caret within current composed text.
visiblePosition - The position that's most important to be visible. Null if there's no recommendation for a visible position within current composed text.
Method Detail

getText

public AttributedCharacterIterator getText()
Gets the combined committed and composed text. Characters from index 0 to index getCommittedCharacterCount() - 1 are committed text, the remaining characters are composed text.
Returns:
the text. Always null for CARET_POSITION_CHANGED; may be null for INPUT_METHOD_TEXT_CHANGED if there's no composed or committed text.

getCommittedCharacterCount

public int getCommittedCharacterCount()
Gets the number of committed characters in the text.

getCaret

public TextHitInfo getCaret()
Gets the caret.

The offset of the caret is relative to the current composed text; that is, the composed text within getText() if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within getText() of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise.

Returns:
the caret (a.k.a. insertion point). Null if there's no caret within current composed text.

getVisiblePosition

public TextHitInfo getVisiblePosition()
Gets the position that's most important to be visible.

The offset of the visible position is relative to the current composed text; that is, the composed text within getText() if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within getText() of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise.

Returns:
the position that's most important to be visible. Null if there's no recommendation for a visible position within current composed text.

consume

public void consume()
Consumes this event so that it will not be processed in the default manner by the source which originated it.
Overrides:
consume in class AWTEvent

isConsumed

public boolean isConsumed()
Returns whether or not this event has been consumed.
Overrides:
isConsumed in class AWTEvent
See Also:
consume()

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging. It contains the event ID in text form, the characters of the committed and composed text separated by "+", the number of committed characters, the caret, and the visible position.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMethodListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface InputMethodListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster
public interface InputMethodListener
extends EventListener

The listener interface for receiving input method events. A text editing component has to install an input method event listener in order to work with input methods.

The text editing component also has to provide an instance of InputMethodRequests.

Since:
1.2
See Also:
InputMethodEvent, InputMethodRequests

Method Summary
void | caretPositionChanged(InputMethodEvent event) Invoked when the caret within composed text has changed.
void | inputMethodTextChanged(InputMethodEvent event) Invoked when the text entered through an input method has changed.

Method Detail

inputMethodTextChanged

public void inputMethodTextChanged(InputMethodEvent event)
Invoked when the text entered through an input method has changed.

caretPositionChanged

public void caretPositionChanged(InputMethodEvent event)
Invoked when the caret within composed text has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class InvocationEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.InvocationEvent
All Implemented Interfaces:
ActiveEvent, Serializable
public class InvocationEvent
extends AWTEvent
implements ActiveEvent

An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread. This class can be used as a reference implementation of ActiveEvent rather than declaring a new class and defining dispatch().

Instances of this class are placed on the EventQueue by calls to invokeLater and invokeAndWait. Client code can use this fact to write replacement functions for invokeLater and invokeAndWait without writing special-case code in any AWTEventListener objects.

Since:
1.2
See Also:
ActiveEvent, EventQueue.invokeLater(java.lang.Runnable), EventQueue.invokeAndWait(java.lang.Runnable), AWTEventListener, Serialized Form

Field Summary
protected boolean | catchExceptions Set to true if dispatch() catches Exception and stores it in the exception instance variable.
static int | INVOCATION_DEFAULT The default id for all InvocationEvents.
static int | INVOCATION_FIRST Marks the first integer id for the range of invocation event ids.
static int | INVOCATION_LAST Marks the last integer id for the range of invocation event ids.
protected Object | notifier The (potentially null) Object whose notifyAll() method will be called immediately after the Runnable.run() method returns.
protected Runnable | runnable The Runnable whose run() method will be called.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
protected InvocationEvent(Object source, int id, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source and ID which will execute the runnable's run() method when dispatched.
  InvocationEvent(Object source, Runnable runnable)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
  InvocationEvent(Object source, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
Method Summary
 void dispatch()
Executes the Runnable's run() method and notifies the notifier (if any) when run() returns.
 Exception getException()
Returns any Exception caught while executing the Runnable's run() method.
 String paramString()
Returns a parameter string identifying this event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

INVOCATION_FIRST

public static final int INVOCATION_FIRST
Marks the first integer id for the range of invocation event ids.

INVOCATION_DEFAULT

public static final int INVOCATION_DEFAULT
The default id for all InvocationEvents.

INVOCATION_LAST

public static final int INVOCATION_LAST
Marks the last integer id for the range of invocation event ids.

runnable

protected Runnable runnable
The Runnable whose run() method will be called.

notifier

protected Object notifier
The (potentially null) Object whose notifyAll() method will be called immediately after the Runnable.run() method returns.

catchExceptions

protected boolean catchExceptions
Set to true if dispatch() catches Exception and stores it in the exception instance variable. If false, Exceptions are propagated up to the EventDispatchThread's dispatch loop.
Constructor Detail

InvocationEvent

public InvocationEvent(Object source,
                       Runnable runnable)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
Parameters:
source - the Object that originated the event
runnable - the Runnable whose run() method will be executed

InvocationEvent

public InvocationEvent(Object source,
                       Runnable runnable,
                       Object notifier,
                       boolean catchExceptions)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched. If notifier is non-null, notifyAll() will be called on it immediately after run() returns.
Parameters:
source - the Object that originated the event
runnable - the Runnable whose run() method will be executed
notifier - the Object whose notifyAll() method will be called after Runnable.run() has returned
catchExceptions - specifies whether dispatch() should catch Exception when executing the Runnable's run() method, or should instead propagate those Exceptions to the EventDispatchThread's dispatch loop

InvocationEvent

protected InvocationEvent(Object source,
                          int id,
                          Runnable runnable,
                          Object notifier,
                          boolean catchExceptions)
Constructs an InvocationEvent with the specified source and ID which will execute the runnable's run() method when dispatched. If notifier is non-null, notifyAll() will be called on it immediately after run() returns.
Parameters:
source - the Object that originated the event
id - the ID for the Event
runnable - the Runnable whose run() method will be executed
notifier - the Object whose notifyAll() method will be called after Runnable.run() has returned
catchExceptions - specifies whether dispatch() should catch Exception when executing the Runnable's run() method, or should instead propagate those Exceptions to the EventDispatchThread's dispatch loop
Method Detail

dispatch

public void dispatch()
Executes the Runnable's run() method and notifies the notifier (if any) when run() returns.
Specified by:
dispatch in interface ActiveEvent

getException

public Exception getException()
Returns any Exception caught while executing the Runnable's run() method.
Returns:
A reference to the Exception if one was thrown; null if no Exception was thrown or if this InvocationEvent does not catch exceptions

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
A string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItemEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class ItemEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ItemEvent
All Implemented Interfaces:
Serializable
public class ItemEvent
extends AWTEvent

A semantic event which indicates that an item was selected or deselected. This high-level event is generated by an ItemSelectable object (such as a List) when an item is selected or de-selected. The event is passed to every ItemListener object which registered to receive such events using the component's addItemListener method.

The object that implements the ItemListener interface gets this ItemEvent when the event occurs. The listener is spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "item selected" or "item deselected".

Since:
1.1
See Also:
ItemSelectable, ItemListener, Tutorial: Writing an Item Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | DESELECTED This state-change-value indicates that a selected item was un-selected.
static int | ITEM_FIRST The first number in the range of ids used for item events.
static int | ITEM_LAST The last number in the range of ids used for item events.
static int | ITEM_STATE_CHANGED This event id indicates that an item's state changed.
static int | SELECTED This state-change value indicates that an item was selected.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
ItemEvent(ItemSelectable source, int id, Object item, int stateChange)
Constructs an ItemEvent object.
Method Summary
Object | getItem() Returns the item affected by the event.
ItemSelectable | getItemSelectable() Returns the originator of the event.
int | getStateChange() Returns the type of state change (selected or deselected).
String | paramString() Returns a parameter string identifying this item event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ITEM_FIRST

public static final int ITEM_FIRST
The first number in the range of ids used for item events.

ITEM_LAST

public static final int ITEM_LAST
The last number in the range of ids used for item events.

ITEM_STATE_CHANGED

public static final int ITEM_STATE_CHANGED
This event id indicates that an item's state changed.

SELECTED

public static final int SELECTED
This state-change value indicates that an item was selected.

DESELECTED

public static final int DESELECTED
This state-change-value indicates that a selected item was un-selected.
Constructor Detail

ItemEvent

public ItemEvent(ItemSelectable source,
                 int id,
                 Object item,
                 int stateChange)
Constructs an ItemEvent object.
Parameters:
source - the ItemSelectable object that originated the event
id - an integer that identifies the event type
item - an object -- the item affected by the event
stateChange - an integer that indicates whether the item was selected or deselected
Method Detail

getItemSelectable

public ItemSelectable getItemSelectable()
Returns the originator of the event.
Returns:
the ItemSelectable object that originated the event.

getItem

public Object getItem()
Returns the item affected by the event.
Returns:
the item (object) that was affected by the event

getStateChange

public int getStateChange()
Returns the type of state change (selected or deselected).
Returns:
an integer that indicates whether the item was selected or deselected
See Also:
SELECTED, DESELECTED

paramString

public String paramString()
Returns a parameter string identifying this item event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItemListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface ItemListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, Checkbox.AccessibleAWTCheckbox, List.AccessibleAWTList, JToggleButton.AccessibleJToggleButton, DefaultCellEditor.EditorDelegate, BasicComboPopup.ItemHandler, BasicComboBoxUI.ItemHandler
public interface ItemListener
extends EventListener

The listener interface for receiving item events. The class that is interested in processing an item event implements this interface. The object created with that class is then registered with a component using the component's addItemListener method. When an item-selection event occurs, the listener object's itemStateChanged method is invoked.

Since:
1.1
See Also:
ItemSelectable, ItemEvent, Tutorial: Writing an Item Listener, Reference: The Java Class Libraries (update file)

Method Summary
 void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected.

Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class KeyAdapter

java.lang.Object
  |
  +--java.awt.event.KeyAdapter
All Implemented Interfaces:
EventListener, KeyListener
Direct Known Subclasses:
BasicComboBoxUI.KeyHandler, BasicComboPopup.InvocationKeyHandler, BasicTreeUI.KeyHandler
public abstract class KeyAdapter
extends Object
implements KeyListener

An abstract adapter class for receiving keyboard events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a KeyEvent listener and override the methods for the events of interest. (If you implement the KeyListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addKeyListener method. When a key is pressed, released, or typed (pressed and released), the relevant method in the listener object is invoked, and the KeyEvent is passed to it.

Since:
1.1
See Also:
KeyEvent, KeyListener, Tutorial: Writing a Key Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
KeyAdapter()
Method Summary
void | keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | keyReleased(KeyEvent e) Invoked when a key has been released.
void | keyTyped(KeyEvent e) Invoked when a key has been typed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyAdapter

public KeyAdapter()
Method Detail

keyTyped

public void keyTyped(KeyEvent e)
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.
Specified by:
keyTyped in interface KeyListener

keyPressed

public void keyPressed(KeyEvent e)
Invoked when a key has been pressed.
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Invoked when a key has been released.
Specified by:
keyReleased in interface KeyListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class KeyEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.InputEvent
                          |
                          +--java.awt.event.KeyEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MenuKeyEvent
public class KeyEvent
extends InputEvent

An event which indicates that a keystroke occurred in a component.

This low-level event is generated by a component object (such as a text field) when a key is pressed, released, or typed. The event is passed to every KeyListener or KeyAdapter object which registered to receive such events using the component's addKeyListener method. (KeyAdapter objects implement the KeyListener interface.) Each such listener object gets this KeyEvent when the event occurs.

"Key typed" events are higher-level and generally do not depend on the platform or keyboard layout. They are generated when a character is entered, and are the preferred way to find out about character input. In the simplest case, a key typed event is produced by a single key press (e.g., 'a'). Often, however, characters are produced by series of key presses (e.g., 'shift' + 'a'), and the mapping from key pressed events to key typed events may be many-to-one or many-to-many. Key releases are not usually necessary to generate a key typed event, but there are some cases where the key typed event is not generated until a key is released (e.g., entering ASCII sequences via the Alt-Numpad method in Windows). No key typed events are generated for keys that don't generate characters (e.g., action keys, modifier keys, etc.). The getKeyChar method always returns a valid Unicode character or CHAR_UNDEFINED. For key pressed and key released events, the getKeyCode method returns the event's keyCode. For key typed events, the getKeyCode method always returns VK_UNDEFINED.

"Key pressed" and "key released" events are lower-level and depend on the platform and keyboard layout. They are generated whenever a key is pressed or released, and are the only way to find out about keys that don't generate character input (e.g., action keys, modifier keys, etc.). The key being pressed or released is indicated by the getKeyCode method, which returns a virtual key code.

Virtual key codes are used to report which keyboard key has been pressed, rather than a character generated by the combination of one or more keystrokes (like "A", which comes from shift and "a").

For example, pressing the Shift key will cause a KEY_PRESSED event with a VK_SHIFT keyCode, while pressing the 'a' key will result in a VK_A keyCode. After the 'a' key is released, a KEY_RELEASED event will be fired with VK_A. Separately, a KEY_TYPED event with a keyChar value of 'A' is generated.

Notes:

  • Key combinations which do not result in characters, such as action keys like F1 and the HELP key, do not generate KEY_TYPED events.
  • Not all keyboards or systems are capable of generating all virtual key codes. No attempt is made in Java to artificially generate these keys.
  • Virtual key codes do not identify a physical key, they depend on the platform and keyboard layout. For example, the key that on a Windows U.S. keyboard layout generates VK_Q, generates VK_A on a Windows French keyboard layout.
  • In order to support the platform-independent handling of action keys, the Java platform uses a few additional virtual key constants for functions that would otherwise have to be recognized by interpreting virtual key codes and modifiers. For example, for Japanese Windows keyboards, VK_ALL_CANDIDATES is returned instead of VK_CONVERT with the ALT modifer.

WARNING: Aside from those keys that are defined by the Java language (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ constants. Sun reserves the right to change these values as needed to accomodate a wider range of keyboards in the future.

Since:
1.1
See Also:
KeyAdapter, KeyListener, Tutorial: Writing a Key Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static char | CHAR_UNDEFINED KEY_PRESSED and KEY_RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
static int | KEY_FIRST The first number in the range of ids used for key events.
static int | KEY_LAST The last number in the range of ids used for key events.
static int | KEY_PRESSED The "key pressed" event.
static int | KEY_RELEASED The "key released" event.
static int | KEY_TYPED The "key typed" event.
static int | VK_0 VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)
static int | VK_1
static int | VK_2
static int | VK_3
static int | VK_4
static int | VK_5
static int | VK_6
static int | VK_7
static int | VK_8
static int | VK_9
static int | VK_A VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)
static int | VK_ACCEPT Constant for the Accept or Commit function key.
static int | VK_ADD
static int | VK_AGAIN
static int | VK_ALL_CANDIDATES Constant for the All Candidates function key.
static int | VK_ALPHANUMERIC Constant for the Alphanumeric function key.
static int | VK_ALT
static int | VK_ALT_GRAPH Constant for the AltGraph function key.
static int | VK_AMPERSAND
static int | VK_ASTERISK
static int | VK_AT Constant for the "@" key.
static int | VK_B
static int | VK_BACK_QUOTE
static int | VK_BACK_SLASH
static int | VK_BACK_SPACE
static int | VK_BRACELEFT
static int | VK_BRACERIGHT
static int | VK_C
static int | VK_CANCEL
static int | VK_CAPS_LOCK
static int | VK_CIRCUMFLEX Constant for the "^" key.
static int | VK_CLEAR
static int | VK_CLOSE_BRACKET
static int | VK_CODE_INPUT Constant for the Code Input function key.
static int | VK_COLON Constant for the ":" key.
static int | VK_COMMA
static int | VK_COMPOSE Constant for the Compose function key.
static int | VK_CONTROL
static int | VK_CONVERT Constant for the Convert function key.
static int | VK_COPY
static int | VK_CUT
static int | VK_D
static int | VK_DEAD_ABOVEDOT
static int | VK_DEAD_ABOVERING
static int | VK_DEAD_ACUTE
static int | VK_DEAD_BREVE
static int | VK_DEAD_CARON
static int | VK_DEAD_CEDILLA
static int | VK_DEAD_CIRCUMFLEX
static int | VK_DEAD_DIAERESIS
static int | VK_DEAD_DOUBLEACUTE
static int | VK_DEAD_GRAVE
static int | VK_DEAD_IOTA
static int | VK_DEAD_MACRON
static int | VK_DEAD_OGONEK
static int | VK_DEAD_SEMIVOICED_SOUND
static int | VK_DEAD_TILDE
static int | VK_DEAD_VOICED_SOUND
static int | VK_DECIMAL
static int | VK_DELETE
static int | VK_DIVIDE
static int | VK_DOLLAR Constant for the "$" key.
static int | VK_DOWN
static int | VK_E
static int | VK_END
static int | VK_ENTER
static int | VK_EQUALS
static int | VK_ESCAPE
static int | VK_EURO_SIGN Constant for the Euro currency sign key.
static int | VK_EXCLAMATION_MARK Constant for the "!" key.
static int | VK_F
static int | VK_F1 Constant for the F1 function key.
static int | VK_F10 Constant for the F10 function key.
static int | VK_F11 Constant for the F11 function key.
static int | VK_F12 Constant for the F12 function key.
static int | VK_F13 Constant for the F13 function key.
static int | VK_F14 Constant for the F14 function key.
static int | VK_F15 Constant for the F15 function key.
static int | VK_F16 Constant for the F16 function key.
static int | VK_F17 Constant for the F17 function key.
static int | VK_F18 Constant for the F18 function key.
static int | VK_F19 Constant for the F19 function key.
static int | VK_F2 Constant for the F2 function key.
static int | VK_F20 Constant for the F20 function key.
static int | VK_F21 Constant for the F21 function key.
static int | VK_F22 Constant for the F22 function key.
static int | VK_F23 Constant for the F23 function key.
static int | VK_F24 Constant for the F24 function key.
static int | VK_F3 Constant for the F3 function key.
static int | VK_F4 Constant for the F4 function key.
static int | VK_F5 Constant for the F5 function key.
static int | VK_F6 Constant for the F6 function key.
static int | VK_F7 Constant for the F7 function key.
static int | VK_F8 Constant for the F8 function key.
static int | VK_F9 Constant for the F9 function key.
static int | VK_FINAL
static int | VK_FIND
static int | VK_FULL_WIDTH Constant for the Full-Width Characters function key.
static int | VK_G
static int | VK_GREATER
static int | VK_H
static int | VK_HALF_WIDTH Constant for the Half-Width Characters function key.
static int | VK_HELP
static int | VK_HIRAGANA Constant for the Hiragana function key.
static int | VK_HOME
static int | VK_I
static int | VK_INPUT_METHOD_ON_OFF Constant for the input method on/off key.
static int | VK_INSERT
static int | VK_INVERTED_EXCLAMATION_MARK Constant for the inverted exclamation mark key.
static int | VK_J
static int | VK_JAPANESE_HIRAGANA Constant for the Japanese-Hiragana function key.
static int | VK_JAPANESE_KATAKANA Constant for the Japanese-Katakana function key.
static int | VK_JAPANESE_ROMAN Constant for the Japanese-Roman function key.
static int | VK_K
static int | VK_KANA
static int | VK_KANA_LOCK Constant for the locking Kana function key.
static int | VK_KANJI
static int | VK_KATAKANA Constant for the Katakana function key.
static int | VK_KP_DOWN Constant for the key pad arrow down function key.
static int | VK_KP_LEFT Constant for the key pad arrow left function key.
static int | VK_KP_RIGHT Constant for the key pad arrow right function key.
static int | VK_KP_UP Constant for the key pad arrow up function key.
static int | VK_L
static int | VK_LEFT
static int | VK_LEFT_PARENTHESIS Constant for the "(" key.
static int | VK_LESS
static int | VK_M
static int | VK_META
static int | VK_MINUS Constant for the "-" key.
static int | VK_MODECHANGE
static int | VK_MULTIPLY
static int | VK_N
static int | VK_NONCONVERT Constant for the Don't Convert function key.
static int | VK_NUM_LOCK
static int | VK_NUMBER_SIGN Constant for the "#" key.
static int | VK_NUMPAD0
static int | VK_NUMPAD1
static int | VK_NUMPAD2
static int | VK_NUMPAD3
static int | VK_NUMPAD4
static int | VK_NUMPAD5
static int | VK_NUMPAD6
static int | VK_NUMPAD7
static int | VK_NUMPAD8
static int | VK_NUMPAD9
static int | VK_O
static int | VK_OPEN_BRACKET
static int | VK_P
static int | VK_PAGE_DOWN
static int | VK_PAGE_UP
static int | VK_PASTE
static int | VK_PAUSE
static int | VK_PERIOD
static int | VK_PLUS Constant for the "+" key.
static int | VK_PREVIOUS_CANDIDATE Constant for the Previous Candidate function key.
static int | VK_PRINTSCREEN
static int | VK_PROPS
static int | VK_Q
static int | VK_QUOTE
static int | VK_QUOTEDBL
static int | VK_R
static int | VK_RIGHT
static int | VK_RIGHT_PARENTHESIS Constant for the ")" key.
static int | VK_ROMAN_CHARACTERS Constant for the Roman Characters function key.
static int | VK_S
static int | VK_SCROLL_LOCK
static int | VK_SEMICOLON
static int | VK_SEPARATER
static int | VK_SHIFT
static int | VK_SLASH
static int | VK_SPACE
static int | VK_STOP
static int | VK_SUBTRACT
static int | VK_T
static int | VK_TAB
static int | VK_U
static int | VK_UNDEFINED KEY_TYPED events do not have a keyCode value.
static int | VK_UNDERSCORE Constant for the "_" key.
static int | VK_UNDO
static int | VK_UP
static int | VK_V
static int | VK_W
static int | VK_X
static int | VK_Y
static int | VK_Z
Fields inherited from class java.awt.event.InputEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
KeyEvent(Component source, int id, long when, int modifiers, int keyCode)
KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar)
Constructs a KeyEvent object.
Method Summary
char | getKeyChar() Returns the character associated with the key in this event.
int | getKeyCode() Returns the integer key-code associated with the key in this event.
static String | getKeyModifiersText(int modifiers) Returns a String describing the modifier key(s), such as "Shift", or "Ctrl+Shift".
static String | getKeyText(int keyCode) Returns a String describing the keyCode, such as "HOME", "F1" or "A".
boolean | isActionKey() Returns whether or not the key in this event is an "action" key, as defined in Event.java.
String | paramString() Returns a parameter string identifying this event.
void | setKeyChar(char keyChar) Set the keyChar value to indicate a logical character.
void | setKeyCode(int keyCode) Set the keyCode value to indicate a physical key.
void | setModifiers(int modifiers) Set the modifiers to indicate additional keys that were held down (shift, ctrl, alt, meta) defined as part of InputEvent.
void | setSource(Object newSource) Set the source of this KeyEvent.
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

KEY_FIRST

public static final int KEY_FIRST
The first number in the range of ids used for key events.

KEY_LAST

public static final int KEY_LAST
The last number in the range of ids used for key events.

KEY_TYPED

public static final int KEY_TYPED
The "key typed" event. This event is generated when a character is entered. In the simplest case, it is produced by a single key press. Often, however, characters are produced by series of key presses, and the mapping from key pressed events to key typed events may be many-to-one or many-to-many.

KEY_PRESSED

public static final int KEY_PRESSED
The "key pressed" event. This event is generated when a key is pushed down.

KEY_RELEASED

public static final int KEY_RELEASED
The "key released" event. This event is generated when a key is let up.

VK_ENTER

public static final int VK_ENTER

VK_BACK_SPACE

public static final int VK_BACK_SPACE

VK_TAB

public static final int VK_TAB

VK_CANCEL

public static final int VK_CANCEL

VK_CLEAR

public static final int VK_CLEAR

VK_SHIFT

public static final int VK_SHIFT

VK_CONTROL

public static final int VK_CONTROL

VK_ALT

public static final int VK_ALT

VK_PAUSE

public static final int VK_PAUSE

VK_CAPS_LOCK

public static final int VK_CAPS_LOCK

VK_ESCAPE

public static final int VK_ESCAPE

VK_SPACE

public static final int VK_SPACE

VK_PAGE_UP

public static final int VK_PAGE_UP

VK_PAGE_DOWN

public static final int VK_PAGE_DOWN

VK_END

public static final int VK_END

VK_HOME

public static final int VK_HOME

VK_LEFT

public static final int VK_LEFT

VK_UP

public static final int VK_UP

VK_RIGHT

public static final int VK_RIGHT

VK_DOWN

public static final int VK_DOWN

VK_COMMA

public static final int VK_COMMA

VK_MINUS

public static final int VK_MINUS
Constant for the "-" key.
Since:
1.2

VK_PERIOD

public static final int VK_PERIOD

VK_SLASH

public static final int VK_SLASH

VK_0

public static final int VK_0
VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)

VK_1

public static final int VK_1

VK_2

public static final int VK_2

VK_3

public static final int VK_3

VK_4

public static final int VK_4

VK_5

public static final int VK_5

VK_6

public static final int VK_6

VK_7

public static final int VK_7

VK_8

public static final int VK_8

VK_9

public static final int VK_9

VK_SEMICOLON

public static final int VK_SEMICOLON

VK_EQUALS

public static final int VK_EQUALS

VK_A

public static final int VK_A
VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)

VK_B

public static final int VK_B

VK_C

public static final int VK_C

VK_D

public static final int VK_D

VK_E

public static final int VK_E

VK_F

public static final int VK_F

VK_G

public static final int VK_G

VK_H

public static final int VK_H

VK_I

public static final int VK_I

VK_J

public static final int VK_J

VK_K

public static final int VK_K

VK_L

public static final int VK_L

VK_M

public static final int VK_M

VK_N

public static final int VK_N

VK_O

public static final int VK_O

VK_P

public static final int VK_P

VK_Q

public static final int VK_Q

VK_R

public static final int VK_R

VK_S

public static final int VK_S

VK_T

public static final int VK_T

VK_U

public static final int VK_U

VK_V

public static final int VK_V

VK_W

public static final int VK_W

VK_X

public static final int VK_X

VK_Y

public static final int VK_Y

VK_Z

public static final int VK_Z

VK_OPEN_BRACKET

public static final int VK_OPEN_BRACKET

VK_BACK_SLASH

public static final int VK_BACK_SLASH

VK_CLOSE_BRACKET

public static final int VK_CLOSE_BRACKET

VK_NUMPAD0

public static final int VK_NUMPAD0

VK_NUMPAD1

public static final int VK_NUMPAD1

VK_NUMPAD2

public static final int VK_NUMPAD2

VK_NUMPAD3

public static final int VK_NUMPAD3

VK_NUMPAD4

public static final int VK_NUMPAD4

VK_NUMPAD5

public static final int VK_NUMPAD5

VK_NUMPAD6

public static final int VK_NUMPAD6

VK_NUMPAD7

public static final int VK_NUMPAD7

VK_NUMPAD8

public static final int VK_NUMPAD8

VK_NUMPAD9

public static final int VK_NUMPAD9

VK_MULTIPLY

public static final int VK_MULTIPLY

VK_ADD

public static final int VK_ADD

VK_SEPARATER

public static final int VK_SEPARATER

VK_SUBTRACT

public static final int VK_SUBTRACT

VK_DECIMAL

public static final int VK_DECIMAL

VK_DIVIDE

public static final int VK_DIVIDE

VK_DELETE

public static final int VK_DELETE

VK_NUM_LOCK

public static final int VK_NUM_LOCK

VK_SCROLL_LOCK

public static final int VK_SCROLL_LOCK

VK_F1

public static final int VK_F1
Constant for the F1 function key.

VK_F2

public static final int VK_F2
Constant for the F2 function key.

VK_F3

public static final int VK_F3
Constant for the F3 function key.

VK_F4

public static final int VK_F4
Constant for the F4 function key.

VK_F5

public static final int VK_F5
Constant for the F5 function key.

VK_F6

public static final int VK_F6
Constant for the F6 function key.

VK_F7

public static final int VK_F7
Constant for the F7 function key.

VK_F8

public static final int VK_F8
Constant for the F8 function key.

VK_F9

public static final int VK_F9
Constant for the F9 function key.

VK_F10

public static final int VK_F10
Constant for the F10 function key.

VK_F11

public static final int VK_F11
Constant for the F11 function key.

VK_F12

public static final int VK_F12
Constant for the F12 function key.

VK_F13

public static final int VK_F13
Constant for the F13 function key.
Since:
1.2

VK_F14

public static final int VK_F14
Constant for the F14 function key.
Since:
1.2

VK_F15

public static final int VK_F15
Constant for the F15 function key.
Since:
1.2

VK_F16

public static final int VK_F16
Constant for the F16 function key.
Since:
1.2

VK_F17

public static final int VK_F17
Constant for the F17 function key.
Since:
1.2

VK_F18

public static final int VK_F18
Constant for the F18 function key.
Since:
1.2

VK_F19

public static final int VK_F19
Constant for the F19 function key.
Since:
1.2

VK_F20

public static final int VK_F20
Constant for the F20 function key.
Since:
1.2

VK_F21

public static final int VK_F21
Constant for the F21 function key.
Since:
1.2

VK_F22

public static final int VK_F22
Constant for the F22 function key.
Since:
1.2

VK_F23

public static final int VK_F23
Constant for the F23 function key.
Since:
1.2

VK_F24

public static final int VK_F24
Constant for the F24 function key.
Since:
1.2

VK_PRINTSCREEN

public static final int VK_PRINTSCREEN

VK_INSERT

public static final int VK_INSERT

VK_HELP

public static final int VK_HELP

VK_META

public static final int VK_META

VK_BACK_QUOTE

public static final int VK_BACK_QUOTE

VK_QUOTE

public static final int VK_QUOTE

VK_KP_UP

public static final int VK_KP_UP
Constant for the key pad arrow up function key.
Since:
1.2

VK_KP_DOWN

public static final int VK_KP_DOWN
Constant for the key pad arrow down function key.
Since:
1.2

VK_KP_LEFT

public static final int VK_KP_LEFT
Constant for the key pad arrow left function key.
Since:
1.2

VK_KP_RIGHT

public static final int VK_KP_RIGHT
Constant for the key pad arrow right function key.
Since:
1.2

VK_DEAD_GRAVE

public static final int VK_DEAD_GRAVE
Since:
1.2

VK_DEAD_ACUTE

public static final int VK_DEAD_ACUTE
Since:
1.2

VK_DEAD_CIRCUMFLEX

public static final int VK_DEAD_CIRCUMFLEX
Since:
1.2

VK_DEAD_TILDE

public static final int VK_DEAD_TILDE
Since:
1.2

VK_DEAD_MACRON

public static final int VK_DEAD_MACRON
Since:
1.2

VK_DEAD_BREVE

public static final int VK_DEAD_BREVE
Since:
1.2

VK_DEAD_ABOVEDOT

public static final int VK_DEAD_ABOVEDOT
Since:
1.2

VK_DEAD_DIAERESIS

public static final int VK_DEAD_DIAERESIS
Since:
1.2

VK_DEAD_ABOVERING

public static final int VK_DEAD_ABOVERING
Since:
1.2

VK_DEAD_DOUBLEACUTE

public static final int VK_DEAD_DOUBLEACUTE
Since:
1.2

VK_DEAD_CARON

public static final int VK_DEAD_CARON
Since:
1.2

VK_DEAD_CEDILLA

public static final int VK_DEAD_CEDILLA
Since:
1.2

VK_DEAD_OGONEK

public static final int VK_DEAD_OGONEK
Since:
1.2

VK_DEAD_IOTA

public static final int VK_DEAD_IOTA
Since:
1.2

VK_DEAD_VOICED_SOUND

public static final int VK_DEAD_VOICED_SOUND
Since:
1.2

VK_DEAD_SEMIVOICED_SOUND

public static final int VK_DEAD_SEMIVOICED_SOUND
Since:
1.2

VK_AMPERSAND

public static final int VK_AMPERSAND
Since:
1.2

VK_ASTERISK

public static final int VK_ASTERISK
Since:
1.2

VK_QUOTEDBL

public static final int VK_QUOTEDBL
Since:
1.2

VK_LESS

public static final int VK_LESS
Since:
1.2

VK_GREATER

public static final int VK_GREATER
Since:
1.2

VK_BRACELEFT

public static final int VK_BRACELEFT
Since:
1.2

VK_BRACERIGHT

public static final int VK_BRACERIGHT
Since:
1.2

VK_AT

public static final int VK_AT
Constant for the "@" key.
Since:
1.2

VK_COLON

public static final int VK_COLON
Constant for the ":" key.
Since:
1.2

VK_CIRCUMFLEX

public static final int VK_CIRCUMFLEX
Constant for the "^" key.
Since:
1.2

VK_DOLLAR

public static final int VK_DOLLAR
Constant for the "$" key.
Since:
1.2

VK_EURO_SIGN

public static final int VK_EURO_SIGN
Constant for the Euro currency sign key.
Since:
1.2

VK_EXCLAMATION_MARK

public static final int VK_EXCLAMATION_MARK
Constant for the "!" key.
Since:
1.2

VK_INVERTED_EXCLAMATION_MARK

public static final int VK_INVERTED_EXCLAMATION_MARK
Constant for the inverted exclamation mark key.
Since:
1.2

VK_LEFT_PARENTHESIS

public static final int VK_LEFT_PARENTHESIS
Constant for the "(" key.
Since:
1.2

VK_NUMBER_SIGN

public static final int VK_NUMBER_SIGN
Constant for the "#" key.
Since:
1.2

VK_PLUS

public static final int VK_PLUS
Constant for the "+" key.
Since:
1.2

VK_RIGHT_PARENTHESIS

public static final int VK_RIGHT_PARENTHESIS
Constant for the ")" key.
Since:
1.2

VK_UNDERSCORE

public static final int VK_UNDERSCORE
Constant for the "_" key.
Since:
1.2

VK_FINAL

public static final int VK_FINAL

VK_CONVERT

public static final int VK_CONVERT
Constant for the Convert function key.

VK_NONCONVERT

public static final int VK_NONCONVERT
Constant for the Don't Convert function key.

VK_ACCEPT

public static final int VK_ACCEPT
Constant for the Accept or Commit function key.

VK_MODECHANGE

public static final int VK_MODECHANGE

VK_KANA

public static final int VK_KANA

VK_KANJI

public static final int VK_KANJI

VK_ALPHANUMERIC

public static final int VK_ALPHANUMERIC
Constant for the Alphanumeric function key.
Since:
1.2

VK_KATAKANA

public static final int VK_KATAKANA
Constant for the Katakana function key.
Since:
1.2

VK_HIRAGANA

public static final int VK_HIRAGANA
Constant for the Hiragana function key.
Since:
1.2

VK_FULL_WIDTH

public static final int VK_FULL_WIDTH
Constant for the Full-Width Characters function key.
Since:
1.2

VK_HALF_WIDTH

public static final int VK_HALF_WIDTH
Constant for the Half-Width Characters function key.
Since:
1.2

VK_ROMAN_CHARACTERS

public static final int VK_ROMAN_CHARACTERS
Constant for the Roman Characters function key.
Since:
1.2

VK_ALL_CANDIDATES

public static final int VK_ALL_CANDIDATES
Constant for the All Candidates function key.
Since:
1.2

VK_PREVIOUS_CANDIDATE

public static final int VK_PREVIOUS_CANDIDATE
Constant for the Previous Candidate function key.
Since:
1.2

VK_CODE_INPUT

public static final int VK_CODE_INPUT
Constant for the Code Input function key.
Since:
1.2

VK_JAPANESE_KATAKANA

public static final int VK_JAPANESE_KATAKANA
Constant for the Japanese-Katakana function key. This key switches to a Japanese input method and selects its Katakana input mode.
Since:
1.2

VK_JAPANESE_HIRAGANA

public static final int VK_JAPANESE_HIRAGANA
Constant for the Japanese-Hiragana function key. This key switches to a Japanese input method and selects its Hiragana input mode.
Since:
1.2

VK_JAPANESE_ROMAN

public static final int VK_JAPANESE_ROMAN
Constant for the Japanese-Roman function key. This key switches to a Japanese input method and selects its Roman-Direct input mode.
Since:
1.2

VK_KANA_LOCK

public static final int VK_KANA_LOCK
Constant for the locking Kana function key. This key locks the keyboard into a Kana layout.
Since:
1.3

VK_INPUT_METHOD_ON_OFF

public static final int VK_INPUT_METHOD_ON_OFF
Constant for the input method on/off key.
Since:
1.3

VK_CUT

public static final int VK_CUT
Since:
1.2

VK_COPY

public static final int VK_COPY
Since:
1.2

VK_PASTE

public static final int VK_PASTE
Since:
1.2

VK_UNDO

public static final int VK_UNDO
Since:
1.2

VK_AGAIN

public static final int VK_AGAIN
Since:
1.2

VK_FIND

public static final int VK_FIND
Since:
1.2

VK_PROPS

public static final int VK_PROPS
Since:
1.2

VK_STOP

public static final int VK_STOP
Since:
1.2

VK_COMPOSE

public static final int VK_COMPOSE
Constant for the Compose function key.
Since:
1.2

VK_ALT_GRAPH

public static final int VK_ALT_GRAPH
Constant for the AltGraph function key.
Since:
1.2

VK_UNDEFINED

public static final int VK_UNDEFINED
KEY_TYPED events do not have a keyCode value. This value is used, instead.

CHAR_UNDEFINED

public static final char CHAR_UNDEFINED
KEY_PRESSED and KEY_RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
Constructor Detail

KeyEvent

public KeyEvent(Component source,
                int id,
                long when,
                int modifiers,
                int keyCode,
                char keyChar)
Constructs a KeyEvent object.
Parameters:
source - the Component that originated the event
id - an integer identifying the type of event
when - a long integer that specifys the time the event occurred
modifiers - the modifier keys down during event (shift, ctrl, alt, meta)
keyCode - the integer code for an actual key, or VK_UNDEFINED (for a key-typed event)
keyChar - the Unicode character generated by this event, or CHAR_UNDEFINED (for key-pressed and key-released events which do not map to a valid Unicode character)

KeyEvent

public KeyEvent(Component source,
                int id,
                long when,
                int modifiers,
                int keyCode)
Method Detail

setSource

public void setSource(Object newSource)
Set the source of this KeyEvent. Dispatching this event subsequent to this operation will send this event to the new Object.
Parameters:
newSource - the KeyEvent's new source.

getKeyCode

public int getKeyCode()
Returns the integer key-code associated with the key in this event.
Returns:
the integer code for an actual key on the keyboard. (For KEY_TYPED events, keyCode is VK_UNDEFINED.)

setKeyCode

public void setKeyCode(int keyCode)
Set the keyCode value to indicate a physical key.
Parameters:
keyCode - an integer corresponding to an actual key on the keyboard.

setKeyChar

public void setKeyChar(char keyChar)
Set the keyChar value to indicate a logical character.
Parameters:
keyChar - a char corresponding to to the combination of keystrokes that make up this event.

setModifiers

public void setModifiers(int modifiers)
Set the modifiers to indicate additional keys that were held down (shift, ctrl, alt, meta) defined as part of InputEvent.

NOTE: use of this method is not recommended, because many AWT implementations do not recognize modifier changes. This is especially true for KEY_TYPED events where the shift modifier is changed.

Parameters:
modifiers - an integer combination of the modifier constants.
See Also:
InputEvent

getKeyChar

public char getKeyChar()
Returns the character associated with the key in this event. For example, the key-typed event for shift + "a" returns the value for "A".
Returns:
the Unicode character defined for this key event. If no valid Unicode character exists for this key event, keyChar is CHAR_UNDEFINED.

getKeyText

public static String getKeyText(int keyCode)
Returns a String describing the keyCode, such as "HOME", "F1" or "A". These strings can be localized by changing the awt.properties file.
Returns:
string a text description for a physical key, identified by its keyCode

getKeyModifiersText

public static String getKeyModifiersText(int modifiers)
Returns a String describing the modifier key(s), such as "Shift", or "Ctrl+Shift". These strings can be localized by changing the awt.properties file.
Returns:
string a text description of the combination of modifier keys that were held down during the event

isActionKey

public boolean isActionKey()
Returns whether or not the key in this event is an "action" key, as defined in Event.java.
Returns:
boolean value, true if the key is an "action" key
See Also:
Event

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface KeyListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, KeyAdapter, BasicTableUI.KeyHandler
public interface KeyListener
extends EventListener

The listener interface for receiving keyboard events (keystrokes). The class that is interested in processing a keyboard event either implements this interface (and all the methods it contains) or extends the abstract KeyAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with a component using the component's addKeyListener method. A keyboard event is generated when a key is pressed, released, or typed (pressedn and released). The relevant method in the listener object is then invoked, and the KeyEvent is passed to it.

Since:
1.1
See Also:
KeyAdapter, KeyEvent, Tutorial: Writing a Key Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | keyReleased(KeyEvent e) Invoked when a key has been released.
void | keyTyped(KeyEvent e) Invoked when a key has been typed.

Method Detail

keyTyped

public void keyTyped(KeyEvent e)
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.

keyPressed

public void keyPressed(KeyEvent e)
Invoked when a key has been pressed.

keyReleased

public void keyReleased(KeyEvent e)
Invoked when a key has been released.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class MouseAdapter

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
All Implemented Interfaces:
EventListener, MouseListener
Direct Known Subclasses:
BasicComboPopup.InvocationMouseHandler, BasicComboPopup.ListMouseHandler, BasicFileChooserUI.DoubleClickListener, BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.TrackListener, BasicSplitPaneDivider.MouseHandler, BasicTabbedPaneUI.MouseHandler, BasicTreeUI.MouseHandler, FormView.MouseEventListener, HTMLEditorKit.LinkController, MetalFileChooserUI.SingleClickListener, ToolTipManager
public abstract class MouseAdapter
extends Object
implements MouseListener

An abstract adapter class for receiving mouse events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse events let you track when a mouse is pressed, released, clicked, when it enters a component, and when it exits. (To track mouse moves and mouse drags, use the MouseMotionAdapter.)

Extend this class to create a MouseEvent listener and override the methods for the events of interest. (If you implement the MouseListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addMouseListener method. When a mouse button is pressed, released, or clicked (pressed and released), or when the mouse cursor enters or exits the component, the relevant method in the listener object is invoked and the MouseEvent is passed to it.

Since:
1.1
See Also:
MouseEvent, MouseListener, Tutorial: Writing a Mouse Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
MouseAdapter()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MouseAdapter

public MouseAdapter()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class MouseEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.InputEvent
                          |
                          +--java.awt.event.MouseEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MenuDragMouseEvent
public class MouseEvent
extends InputEvent

/** An event which indicates that a mouse action occurred in a component. This event is used both for mouse events (click, enter, exit) and mouse motion events (moves and drags).

This low-level event is generated by a component object for:

  • Mouse Events
    • a mouse button is pressed
    • a mouse button is released
    • a mouse button is clicked (pressed and released)
    • the mouse cursor enters a component
    • the mouse cursor exits a component
  • Mouse Motion Events
    • the mouse is moved
    • the mouse is dragged

A MouseEvent object is passed to every MouseListener or MouseAdapter object which registered to receive the "interesting" mouse events using the component's addMouseListener method. (MouseAdapter objects implement the MouseListener interface.) Each such listener object gets a MouseEvent containing the mouse event.

A MouseEvent object is also passed to every MouseMotionListener or MouseMotionAdapter object which registered to receive mouse motion events using the component's addMouseMotionListener method. (MouseMotionAdapter objects implement the MouseMotionListener interface.) Each such listener object gets a MouseEvent containing the mouse motion event.

When a mouse button is clicked, events are generated and sent to the registered MouseListeners, with the button mask set in the modifier field. For example, if the first mouse button is pressed, events are sent in the following order:

    MOUSE_PRESSED:  BUTTON1_MASK
    MOUSE_RELEASED: BUTTON1_MASK
    MOUSE_CLICKED:  BUTTON1_MASK
When multiple mouse buttons are pressed, each press, release, and click results in a separate event. The button mask in the modifier field reflects only the button that changed state, not the current state of all buttons.

For example, if the user presses button 1 followed by button 2 and releases them in the same order, the following sequence of events is generated:

    MOUSE_PRESSED:  BUTTON1_MASK
    MOUSE_PRESSED:  BUTTON2_MASK
    MOUSE_RELEASED: BUTTON1_MASK
    MOUSE_CLICKED:  BUTTON1_MASK
    MOUSE_RELEASED: BUTTON2_MASK
    MOUSE_CLICKED:  BUTTON2_MASK
If button2 is released first, the MOUSE_RELEASED/MOUSE_CLICKED pair for BUTTON2_MASK arrives first, followed by the pair for BUTTON1_MASK.

Since:
1.1
See Also:
MouseAdapter, MouseListener, MouseMotionAdapter, MouseMotionListener, Tutorial: Writing a Mouse Listener, Tutorial: Writing a Mouse Motion Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | MOUSE_CLICKED The "mouse clicked" event.
static int | MOUSE_DRAGGED The "mouse dragged" event.
static int | MOUSE_ENTERED The "mouse entered" event.
static int | MOUSE_EXITED The "mouse exited" event.
static int | MOUSE_FIRST The first number in the range of ids used for mouse events.
static int | MOUSE_LAST The last number in the range of ids used for mouse events.
static int | MOUSE_MOVED The "mouse moved" event.
static int | MOUSE_PRESSED The "mouse pressed" event.
static int | MOUSE_RELEASED The "mouse released" event.
Fields inherited from class java.awt.event.InputEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.
Method Summary
int | getClickCount() Return the number of mouse clicks associated with this event.
Point | getPoint() Returns the x,y position of the event relative to the source component.
int | getX() Returns the horizontal x position of the event relative to the source component.
int | getY() Returns the vertical y position of the event relative to the source component.
boolean | isPopupTrigger() Returns whether or not this mouse event is the popup-menu trigger event for the platform.
String | paramString() Returns a parameter string identifying this event.
void | translatePoint(int x, int y) Translates the event's coordinates to a new position by adding specified x (horizontal) and y (veritcal) offsets.
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

MOUSE_FIRST

public static final int MOUSE_FIRST
The first number in the range of ids used for mouse events.

MOUSE_LAST

public static final int MOUSE_LAST
The last number in the range of ids used for mouse events.

MOUSE_CLICKED

public static final int MOUSE_CLICKED
The "mouse clicked" event. This MouseEvent occurs when a mouse button is pressed and released.

MOUSE_PRESSED

public static final int MOUSE_PRESSED
The "mouse pressed" event. This MouseEvent occurs when a mouse button is pushed down.

MOUSE_RELEASED

public static final int MOUSE_RELEASED
The "mouse released" event. This MouseEvent occurs when a mouse button is let up.

MOUSE_MOVED

public static final int MOUSE_MOVED
The "mouse moved" event. This MouseMotionEvent occurs when the mouse position changes.

MOUSE_ENTERED

public static final int MOUSE_ENTERED
The "mouse entered" event. This MouseEvent occurs when the mouse cursor enters a component's area.

MOUSE_EXITED

public static final int MOUSE_EXITED
The "mouse exited" event. This MouseEvent occurs when the mouse cursor leaves a component's area.

MOUSE_DRAGGED

public static final int MOUSE_DRAGGED
The "mouse dragged" event. This MouseMotionEvent occurs when the mouse position changes while the "drag" modifier is active (for example, the shift key).
Constructor Detail

MouseEvent

public MouseEvent(Component source,
                  int id,
                  long when,
                  int modifiers,
                  int x,
                  int y,
                  int clickCount,
                  boolean popupTrigger)
Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.
Parameters:
source - the Component that originated the event
id - the integer that identifies the event
when - a long int that gives the time the event occurred
modifiers - the modifier keys down during event (shift, ctrl, alt, meta)
x - the horizontal x coordinate for the mouse location
y - the vertical y coordinate for the mouse location
clickCount - the number of mouse clicks associated with event
popupTrigger - a boolean, true if this event is a trigger for a popup-menu
Method Detail

getX

public int getX()
Returns the horizontal x position of the event relative to the source component.
Returns:
x an integer indicating horizontal position relative to the component

getY

public int getY()
Returns the vertical y position of the event relative to the source component.
Returns:
y an integer indicating vertical position relative to the component

getPoint

public Point getPoint()
Returns the x,y position of the event relative to the source component.
Returns:
a Point object containing the x and y coordinates relative to the source component

translatePoint

public void translatePoint(int x,
                           int y)
Translates the event's coordinates to a new position by adding specified x (horizontal) and y (veritcal) offsets.
Parameters:
x - the horizontal x value to add to the current x coordinate position
y - the vertical y value to add to the current y coordinate position

getClickCount

public int getClickCount()
Return the number of mouse clicks associated with this event.
Returns:
integer value for the number of clicks

isPopupTrigger

public boolean isPopupTrigger()
Returns whether or not this mouse event is the popup-menu trigger event for the platform.
Returns:
boolean, true if this event is the popup-menu trigger for this platform

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface MouseListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
MouseInputListener
All Known Implementing Classes:
AWTEventMulticaster, MouseDragGestureRecognizer, MouseAdapter, DefaultCaret, BasicButtonListener
public interface MouseListener
extends EventListener

The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component. (To track mouse moves and mouse drags, use the MouseMotionListener.)

The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract MouseAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with a component using the component's addMouseListener method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs the relevant method in the listener object is invoked, and the MouseEvent is passed to it.

Since:
1.1
See Also:
MouseAdapter, MouseEvent, Tutorial: Writing a Mouse Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.

Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.

mousePressed

public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.

mouseReleased

public void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.

mouseEntered

public void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.

mouseExited

public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseMotionAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class MouseMotionAdapter

java.lang.Object
  |
  +--java.awt.event.MouseMotionAdapter
All Implemented Interfaces:
EventListener, MouseMotionListener
Direct Known Subclasses:
BasicComboPopup.InvocationMouseMotionHandler, BasicComboPopup.ListMouseMotionHandler
public abstract class MouseMotionAdapter
extends Object
implements MouseMotionListener

An abstract adapter class for receiving mouse motion events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse motion events occur when a mouse is moved or dragged. (Many such events will be generated in a normal program. To track clicks and other mouse events, use the MouseAdapter.)

Extend this class to create a MouseMotionEvent listener and override the methods for the events of interest. (If you implement the MouseMotionListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addMouseMotionListener method. When the mouse is moved or dragged, the relevant method in the listener object is invoked and the MouseEvent is passed to it.

Since:
1.1
See Also:
MouseEvent, MouseMotionListener, Tutorial: Writing a Mouse Motion Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
MouseMotionAdapter()
Method Summary
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MouseMotionAdapter

public MouseMotionAdapter()
Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseMotionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface MouseMotionListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
MouseInputListener
All Known Implementing Classes:
AWTEventMulticaster, MouseDragGestureRecognizer, MouseMotionAdapter, ToolTipManager, DefaultCaret, HTMLEditorKit.LinkController, BasicScrollBarUI.TrackListener, BasicButtonListener, BasicSplitPaneDivider.MouseHandler
public interface MouseMotionListener
extends EventListener

The listener interface for receiving mouse motion events on a component. (For clicks and other mouse events, use the MouseListener.)

The class that is interested in processing a mouse motion event either implements this interface (and all the methods it contains) or extends the abstract MouseMotionAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with a component using the component's addMouseMotionListener method. A mouse motion event is generated when the mouse is moved or dragged. (Many such events will be generated). When a mouse motion event occurs, the relevant method in the listener object is invoked, and the MouseEvent is passed to it.

Since:
1.1
See Also:
MouseMotionAdapter, MouseEvent, Tutorial: Writing a Mouse Motion Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).

Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

mouseMoved

public void mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PaintEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class PaintEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.PaintEvent
All Implemented Interfaces:
Serializable
public class PaintEvent
extends ComponentEvent

The component-level paint event. This event is a special type which is used to ensure that paint/update method calls are serialized along with the other events delivered from the event queue. This event is not designed to be used with the Event Listener model; programs should continue to override paint/update methods in order render themselves properly.

Since:
1.1
See Also:
Serialized Form

Field Summary
static int | PAINT The paint event type.
static int | PAINT_FIRST Marks the first integer id for the range of paint event ids.
static int | PAINT_LAST Marks the last integer id for the range of paint event ids.
static int | UPDATE The update event type.
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
PaintEvent(Component source, int id, Rectangle updateRect)
Constructs a PaintEvent object with the specified source component and type.
Method Summary
Rectangle | getUpdateRect() Returns the rectangle representing the area which needs to be repainted in response to this event.
String | paramString() Returns a parameter string identifying this event.
void | setUpdateRect(Rectangle updateRect) Sets the rectangle representing the area which needs to be repainted in response to this event.
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

PAINT_FIRST

public static final int PAINT_FIRST
Marks the first integer id for the range of paint event ids.

PAINT_LAST

public static final int PAINT_LAST
Marks the last integer id for the range of paint event ids.

PAINT

public static final int PAINT
The paint event type.

UPDATE

public static final int UPDATE
The update event type.
Constructor Detail

PaintEvent

public PaintEvent(Component source,
                  int id,
                  Rectangle updateRect)
Constructs a PaintEvent object with the specified source component and type.
Parameters:
source - the object where the event originated
id - the event type
updateRect - the rectangle area which needs to be repainted
Method Detail

getUpdateRect

public Rectangle getUpdateRect()
Returns the rectangle representing the area which needs to be repainted in response to this event.

setUpdateRect

public void setUpdateRect(Rectangle updateRect)
Sets the rectangle representing the area which needs to be repainted in response to this event.
Parameters:
updateRect - the rectangle area which needs to be repainted

paramString

public String paramString()
Description copied from class: ComponentEvent
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Following copied from class: java.awt.event.ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class TextEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.TextEvent
All Implemented Interfaces:
Serializable
public class TextEvent
extends AWTEvent

A semantic event which indicates that an object's text changed. This high-level event is generated by an object (such as a TextComponent) when its text changes. The event is passed to every TextListener object which registered to receive such events using the component's addTextListener method.

The object that implements the TextListener interface gets this TextEvent when the event occurs. The listener is spared the details of processing individual mouse movements and key strokes Instead, it can process a "meaningful" (semantic) event like "text changed".

Since:
1.1
See Also:
TextComponent, TextListener, Tutorial: Writing a Text Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | TEXT_FIRST The first number in the range of ids used for text events.
static int | TEXT_LAST The last number in the range of ids used for text events.
static int | TEXT_VALUE_CHANGED This event id indicates that object's text changed.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
TextEvent(Object source, int id)
Constructs a TextEvent object.
Method Summary
 String paramString()
Returns a parameter string identifying this text event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

TEXT_FIRST

public static final int TEXT_FIRST
The first number in the range of ids used for text events.

TEXT_LAST

public static final int TEXT_LAST
The last number in the range of ids used for text events.

TEXT_VALUE_CHANGED

public static final int TEXT_VALUE_CHANGED
This event id indicates that object's text changed.
Constructor Detail

TextEvent

public TextEvent(Object source,
                 int id)
Constructs a TextEvent object.
Parameters:
source - the (TextComponent) object that originated the event
id - an integer that identifies the event type
Method Detail

paramString

public String paramString()
Returns a parameter string identifying this text event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface TextListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, TextComponent.AccessibleAWTTextComponent
public interface TextListener
extends EventListener

The listener interface for receiving text events. The class that is interested in processing a text event implements this interface. The object created with that class is then registered with a component using the component's addTextListener method. When the component's text changes, the listener object's textValueChanged method is invoked.

Since:
1.1
See Also:
TextEvent, Tutorial: Writing a Text Listener, Reference: The Java Class Libraries (update file)

Method Summary
 void textValueChanged(TextEvent e)
Invoked when the value of the text has changed.

Method Detail

textValueChanged

public void textValueChanged(TextEvent e)
Invoked when the value of the text has changed. The code written for this method performs the operations that need to occur when text changes.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WindowAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class WindowAdapter

java.lang.Object
  |
  +--java.awt.event.WindowAdapter
All Implemented Interfaces:
EventListener, WindowListener
Direct Known Subclasses:
BasicToolBarUI.FrameListener, JMenu.WinListener
public abstract class WindowAdapter
extends Object
implements WindowListener

An abstract adapter class for receiving window events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a WindowEvent listener and override the methods for the events of interest. (If you implement the WindowListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a Window using the window's addWindowListener method. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the WindowEvent is passed to it.

Since:
1.1
See Also:
WindowEvent, WindowListener, Tutorial: Writing a Window Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
WindowAdapter()
Method Summary
void | windowActivated(WindowEvent e) Invoked when a window is activated.
void | windowClosed(WindowEvent e) Invoked when a window has been closed.
void | windowClosing(WindowEvent e) Invoked when a window is in the process of being closed.
void | windowDeactivated(WindowEvent e) Invoked when a window is de-activated.
void | windowDeiconified(WindowEvent e) Invoked when a window is de-iconified.
void | windowIconified(WindowEvent e) Invoked when a window is iconified.
void | windowOpened(WindowEvent e) Invoked when a window has been opened.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WindowAdapter

public WindowAdapter()
Method Detail

windowOpened

public void windowOpened(WindowEvent e)
Invoked when a window has been opened.
Specified by:
windowOpened in interface WindowListener

windowClosing

public void windowClosing(WindowEvent e)
Invoked when a window is in the process of being closed. The close operation can be overridden at this point.
Specified by:
windowClosing in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Invoked when a window has been closed.
Specified by:
windowClosed in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Invoked when a window is iconified.
Specified by:
windowIconified in interface WindowListener
Following copied from interface: java.awt.event.WindowListener
See Also:
Frame.setIconImage(java.awt.Image)

windowDeiconified

public void windowDeiconified(WindowEvent e)
Invoked when a window is de-iconified.
Specified by:
windowDeiconified in interface WindowListener

windowActivated

public void windowActivated(WindowEvent e)
Invoked when a window is activated.
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Invoked when a window is de-activated.
Specified by:
windowDeactivated in interface WindowListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WindowEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Class WindowEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.WindowEvent
All Implemented Interfaces:
Serializable
public class WindowEvent
extends ComponentEvent

A low-level event which indicates that a window has changed its status. This low-level event is generated by a Window object when it is opened, closed, about to close, activated or deactivated, iconified or deconified.

The event is passed to every WindowListener or WindowAdapter object which registered to receive such events using the window's addWindowListener method. (WindowAdapter objects implement the WindowListener interface.) Each such listener object gets this WindowEvent when the event occurs.

Since:
1.1
See Also:
WindowAdapter, WindowListener, Tutorial: Writing a Window Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int | WINDOW_ACTIVATED The window activated event type.
static int | WINDOW_CLOSED The window closed event.
static int | WINDOW_CLOSING The "window is closing" event.
static int | WINDOW_DEACTIVATED The window deactivated event type.
static int | WINDOW_DEICONIFIED The window deiconified event type.
static int | WINDOW_FIRST The first number in the range of ids used for window events.
static int | WINDOW_ICONIFIED The window iconified event.
static int | WINDOW_LAST The last number in the range of ids used for window events.
static int | WINDOW_OPENED The window opened event.
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
WindowEvent(Window source, int id)
Constructs a WindowEvent object.
Method Summary
Window | getWindow() Returns the originator of the event.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

WINDOW_FIRST

public static final int WINDOW_FIRST
The first number in the range of ids used for window events.

WINDOW_LAST

public static final int WINDOW_LAST
The last number in the range of ids used for window events.

WINDOW_OPENED

public static final int WINDOW_OPENED
The window opened event. This event is delivered only the first time a window is made visible.

WINDOW_CLOSING

public static final int WINDOW_CLOSING
The "window is closing" event. This event is delivered when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled.

WINDOW_CLOSED

public static final int WINDOW_CLOSED
The window closed event. This event is delivered after the window has been closed as the result of a call to dispose.

WINDOW_ICONIFIED

public static final int WINDOW_ICONIFIED
The window iconified event. This event is delivered when the window has been changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property.
See Also:
Frame.setIconImage(java.awt.Image)

WINDOW_DEICONIFIED

public static final int WINDOW_DEICONIFIED
The window deiconified event type. This event is delivered when the window has been changed from a minimized to a normal state.

WINDOW_ACTIVATED

public static final int WINDOW_ACTIVATED
The window activated event type. This event is delivered when the window becomes the user's active window, which means that the window (or one of its subcomponents) will receive keyboard events.

WINDOW_DEACTIVATED

public static final int WINDOW_DEACTIVATED
The window deactivated event type. This event is delivered when a window is no longer the user's active window, which means keyboard events will no longer be delivered to the window or its subcomponents.
Constructor Detail

WindowEvent

public WindowEvent(Window source,
                   int id)
Constructs a WindowEvent object.
Parameters:
source - the Window object that originated the event
id - an integer indicating the type of event
Method Detail

getWindow

public Window getWindow()
Returns the originator of the event.
Returns:
the Window object that originated the event

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class ComponentEvent
Returns:
a string identifying the event and its attributes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WindowListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.event
Interface WindowListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, WindowAdapter
public interface WindowListener
extends EventListener

The listener interface for receiving window events. The class that is interested in processing a window event either implements this interface (and all the methods it contains) or extends the abstract WindowAdapter class (overriding only the methods of interest). The listener object created from that class is then registered with a Window using the window's addWindowListener method. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the WindowEvent is passed to it.

Since:
1.1
See Also:
WindowAdapter, WindowEvent, Tutorial: Writing a Window Listener, Reference: The Java Class Libraries (update file)

Method Summary
void | windowActivated(WindowEvent e) Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.
void | windowClosed(WindowEvent e) Invoked when a window has been closed as the result of calling dispose on the window.
void | windowClosing(WindowEvent e) Invoked when the user attempts to close the window from the window's system menu.
void | windowDeactivated(WindowEvent e) Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.
void | windowDeiconified(WindowEvent e) Invoked when a window is changed from a minimized to a normal state.
void | windowIconified(WindowEvent e) Invoked when a window is changed from a normal to a minimized state.
void | windowOpened(WindowEvent e) Invoked the first time a window is made visible.

Method Detail

windowOpened

public void windowOpened(WindowEvent e)
Invoked the first time a window is made visible.

windowClosing

public void windowClosing(WindowEvent e)
Invoked when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled.

windowClosed

public void windowClosed(WindowEvent e)
Invoked when a window has been closed as the result of calling dispose on the window.

windowIconified

public void windowIconified(WindowEvent e)
Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property.
See Also:
Frame.setIconImage(java.awt.Image)

windowDeiconified

public void windowDeiconified(WindowEvent e)
Invoked when a window is changed from a minimized to a normal state.

windowActivated

public void windowActivated(WindowEvent e)
Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.

windowDeactivated

public void windowDeactivated(WindowEvent e)
Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Event

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Event

java.lang.Object
  |
  +--java.awt.Event
All Implemented Interfaces:
Serializable
public class Event
extends Object
implements Serializable

Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, the Event class is maintained only for backwards compatibilty. The information in this class description is provided to assist programmers in converting Java 1.0 programs to the new event model.

In the Java 1.0 event model, an event contains an id field that indicates what type of event it is and which other Event variables are relevant for the event.

For keyboard events, key contains a value indicating which key was activated, and modifiers contains the modifiers for that event. For the KEY_PRESS and KEY_RELEASE event ids, the value of key is the unicode character code for the key. For KEY_ACTION and KEY_ACTION_RELEASE, the value of key is one of the defined action-key identifiers in the Event class (PGUP, PGDN, F1, F2, etc).

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static int | ACTION_EVENT This event indicates that the user wants some action to occur.
static int | ALT_MASK This flag indicates that the Alt key was down when the event occurred.
Object | arg An arbitrary argument of the event.
static int | BACK_SPACE The BackSpace key.
static int | CAPS_LOCK The Caps Lock key, a non-ASCII action key.
int | clickCount For MOUSE_DOWN events, this field indicates the number of consecutive clicks.
static int | CTRL_MASK This flag indicates that the Control key was down when the event occurred.
static int | DELETE The Delete key.
static int | DOWN The Down Arrow key, a non-ASCII action key.
static int | END The End key, a non-ASCII action key.
static int | ENTER The Enter key.
static int | ESCAPE The Escape key.
Event | evt The next event.
static int | F1 The F1 function key, a non-ASCII action key.
static int | F10 The F10 function key, a non-ASCII action key.
static int | F11 The F11 function key, a non-ASCII action key.
static int | F12 The F12 function key, a non-ASCII action key.
static int | F2 The F2 function key, a non-ASCII action key.
static int | F3 The F3 function key, a non-ASCII action key.
static int | F4 The F4 function key, a non-ASCII action key.
static int | F5 The F5 function key, a non-ASCII action key.
static int | F6 The F6 function key, a non-ASCII action key.
static int | F7 The F7 function key, a non-ASCII action key.
static int | F8 The F8 function key, a non-ASCII action key.
static int | F9 The F9 function key, a non-ASCII action key.
static int | GOT_FOCUS A component gained the focus.
static int | HOME The Home key, a non-ASCII action key.
int | id Indicates which type of event the event is, and which other Event variables are relevant for the event.
static int | INSERT The Insert key, a non-ASCII action key.
int | key The key code of the key that was pressed in a keyboard event.
static int | KEY_ACTION The user has pressed a non-ASCII action key.
static int | KEY_ACTION_RELEASE The user has released a non-ASCII action key.
static int | KEY_PRESS The user has pressed a normal key.
static int | KEY_RELEASE The user has released a normal key.
static int | LEFT The Left Arrow key, a non-ASCII action key.
static int | LIST_DESELECT An item in a list has been deselected.
static int | LIST_SELECT An item in a list has been selected.
static int | LOAD_FILE A file loading event.
static int | LOST_FOCUS A component lost the focus.
static int | META_MASK This flag indicates that the Meta key was down when the event occurred.
int | modifiers The state of the modifier keys.
static int | MOUSE_DOWN The user has pressed the mouse button.
static int | MOUSE_DRAG The user has moved the mouse with a button pressed.
static int | MOUSE_ENTER The mouse has entered a component.
static int | MOUSE_EXIT The mouse has exited a component.
static int | MOUSE_MOVE The mouse has moved with no button pressed.
static int | MOUSE_UP The user has released the mouse button.
static int | NUM_LOCK The Num Lock key, a non-ASCII action key.
static int | PAUSE The Pause key, a non-ASCII action key.
static int | PGDN The Page Down key, a non-ASCII action key.
static int | PGUP The Page Up key, a non-ASCII action key.
static int | PRINT_SCREEN The Print Screen key, a non-ASCII action key.
static int | RIGHT The Right Arrow key, a non-ASCII action key.
static int | SAVE_FILE A file saving event.
static int | SCROLL_ABSOLUTE The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion.
static int | SCROLL_BEGIN The scroll begin event.
static int | SCROLL_END The scroll end event.
static int | SCROLL_LINE_DOWN The user has activated the line down area of a scroll bar.
static int | SCROLL_LINE_UP The user has activated the line up area of a scroll bar.
static int | SCROLL_LOCK The Scroll Lock key, a non-ASCII action key.
static int | SCROLL_PAGE_DOWN The user has activated the page down area of a scroll bar.
static int | SCROLL_PAGE_UP The user has activated the page up area of a scroll bar.
static int | SHIFT_MASK This flag indicates that the Shift key was down when the event occurred.
static int | TAB The Tab key.
Object | target The target component.
static int | UP The Up Arrow key, a non-ASCII action key.
long | when The time stamp.
static int | WINDOW_DEICONIFY The user has asked the window manager to de-iconify the window.
static int | WINDOW_DESTROY The user has asked the window manager to kill the window.
static int | WINDOW_EXPOSE The user has asked the window manager to expose the window.
static int | WINDOW_ICONIFY The user has asked the window manager to iconify the window.
static int | WINDOW_MOVED The user has asked the window manager to move the window.
int | x The x coordinate of the event.
int | y The y coordinate of the event.
Constructor Summary
Event(Object target, int id, Object arg)
Creates an instance of Event with the specified target component, event type, and argument.
Event(Object target, long when, int id, int x, int y, int key, int modifiers)
Creates an instance of Event, with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and an argument set to null.
Event(Object target, long when, int id, int x, int y, int key, int modifiers, Object arg)
Creates an instance of Event with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and argument.
Method Summary
boolean | controlDown() Checks if the Control key is down.
boolean | metaDown() Checks if the Meta key is down.
protected String | paramString() Returns the parameter string representing this event.
boolean | shiftDown() Checks if the Shift key is down.
String | toString() Returns a representation of this event's values as a string.
void | translate(int x, int y) Translates this event so that its x and y coordinates are increased by dx and dy, respectively.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK
This flag indicates that the Shift key was down when the event occurred.

CTRL_MASK

public static final int CTRL_MASK
This flag indicates that the Control key was down when the event occurred.

META_MASK

public static final int META_MASK
This flag indicates that the Meta key was down when the event occurred. For mouse events, this flag indicates that the right button was pressed or released.

ALT_MASK

public static final int ALT_MASK
This flag indicates that the Alt key was down when the event occurred. For mouse events, this flag indicates that the middle mouse button was pressed or released.

HOME

public static final int HOME
The Home key, a non-ASCII action key.

END

public static final int END
The End key, a non-ASCII action key.

PGUP

public static final int PGUP
The Page Up key, a non-ASCII action key.

PGDN

public static final int PGDN
The Page Down key, a non-ASCII action key.

UP

public static final int UP
The Up Arrow key, a non-ASCII action key.

DOWN

public static final int DOWN
The Down Arrow key, a non-ASCII action key.

LEFT

public static final int LEFT
The Left Arrow key, a non-ASCII action key.

RIGHT

public static final int RIGHT
The Right Arrow key, a non-ASCII action key.

F1

public static final int F1
The F1 function key, a non-ASCII action key.

F2

public static final int F2
The F2 function key, a non-ASCII action key.

F3

public static final int F3
The F3 function key, a non-ASCII action key.

F4

public static final int F4
The F4 function key, a non-ASCII action key.

F5

public static final int F5
The F5 function key, a non-ASCII action key.

F6

public static final int F6
The F6 function key, a non-ASCII action key.

F7

public static final int F7
The F7 function key, a non-ASCII action key.

F8

public static final int F8
The F8 function key, a non-ASCII action key.

F9

public static final int F9
The F9 function key, a non-ASCII action key.

F10

public static final int F10
The F10 function key, a non-ASCII action key.

F11

public static final int F11
The F11 function key, a non-ASCII action key.

F12

public static final int F12
The F12 function key, a non-ASCII action key.

PRINT_SCREEN

public static final int PRINT_SCREEN
The Print Screen key, a non-ASCII action key.

SCROLL_LOCK

public static final int SCROLL_LOCK
The Scroll Lock key, a non-ASCII action key.

CAPS_LOCK

public static final int CAPS_LOCK
The Caps Lock key, a non-ASCII action key.

NUM_LOCK

public static final int NUM_LOCK
The Num Lock key, a non-ASCII action key.

PAUSE

public static final int PAUSE
The Pause key, a non-ASCII action key.

INSERT

public static final int INSERT
The Insert key, a non-ASCII action key.

ENTER

public static final int ENTER
The Enter key.

BACK_SPACE

public static final int BACK_SPACE
The BackSpace key.

TAB

public static final int TAB
The Tab key.

ESCAPE

public static final int ESCAPE
The Escape key.

DELETE

public static final int DELETE
The Delete key.

WINDOW_DESTROY

public static final int WINDOW_DESTROY
The user has asked the window manager to kill the window.

WINDOW_EXPOSE

public static final int WINDOW_EXPOSE
The user has asked the window manager to expose the window.

WINDOW_ICONIFY

public static final int WINDOW_ICONIFY
The user has asked the window manager to iconify the window.

WINDOW_DEICONIFY

public static final int WINDOW_DEICONIFY
The user has asked the window manager to de-iconify the window.

WINDOW_MOVED

public static final int WINDOW_MOVED
The user has asked the window manager to move the window.

KEY_PRESS

public static final int KEY_PRESS
The user has pressed a normal key.

KEY_RELEASE

public static final int KEY_RELEASE
The user has released a normal key.

KEY_ACTION

public static final int KEY_ACTION
The user has pressed a non-ASCII action key. The key field contains a value that indicates that the event occurred on one of the action keys, which comprise the 12 function keys, the arrow (cursor) keys, Page Up, Page Down, Home, End, Print Screen, Scroll Lock, Caps Lock, Num Lock, Pause, and Insert.

KEY_ACTION_RELEASE

public static final int KEY_ACTION_RELEASE
The user has released a non-ASCII action key. The key field contains a value that indicates that the event occurred on one of the action keys, which comprise the 12 function keys, the arrow (cursor) keys, Page Up, Page Down, Home, End, Print Screen, Scroll Lock, Caps Lock, Num Lock, Pause, and Insert.

MOUSE_DOWN

public static final int MOUSE_DOWN
The user has pressed the mouse button. The ALT_MASK flag indicates that the middle button has been pressed. The META_MASKflag indicates that the right button has been pressed.
See Also:
ALT_MASK, META_MASK

MOUSE_UP

public static final int MOUSE_UP
The user has released the mouse button. The ALT_MASK flag indicates that the middle button has been released. The META_MASKflag indicates that the right button has been released.
See Also:
ALT_MASK, META_MASK

MOUSE_MOVE

public static final int MOUSE_MOVE
The mouse has moved with no button pressed.

MOUSE_ENTER

public static final int MOUSE_ENTER
The mouse has entered a component.

MOUSE_EXIT

public static final int MOUSE_EXIT
The mouse has exited a component.

MOUSE_DRAG

public static final int MOUSE_DRAG
The user has moved the mouse with a button pressed. The ALT_MASK flag indicates that the middle button is being pressed. The META_MASK flag indicates that the right button is being pressed.
See Also:
ALT_MASK, META_MASK

SCROLL_LINE_UP

public static final int SCROLL_LINE_UP
The user has activated the line up area of a scroll bar.

SCROLL_LINE_DOWN

public static final int SCROLL_LINE_DOWN
The user has activated the line down area of a scroll bar.

SCROLL_PAGE_UP

public static final int SCROLL_PAGE_UP
The user has activated the page up area of a scroll bar.

SCROLL_PAGE_DOWN

public static final int SCROLL_PAGE_DOWN
The user has activated the page down area of a scroll bar.

SCROLL_ABSOLUTE

public static final int SCROLL_ABSOLUTE
The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion.

SCROLL_BEGIN

public static final int SCROLL_BEGIN
The scroll begin event.

SCROLL_END

public static final int SCROLL_END
The scroll end event.

LIST_SELECT

public static final int LIST_SELECT
An item in a list has been selected.

LIST_DESELECT

public static final int LIST_DESELECT
An item in a list has been deselected.

ACTION_EVENT

public static final int ACTION_EVENT
This event indicates that the user wants some action to occur.

LOAD_FILE

public static final int LOAD_FILE
A file loading event.

SAVE_FILE

public static final int SAVE_FILE
A file saving event.

GOT_FOCUS

public static final int GOT_FOCUS
A component gained the focus.

LOST_FOCUS

public static final int LOST_FOCUS
A component lost the focus.

target

public Object target
The target component. This indicates the component over which the event occurred or with which the event is associated. This object has been replaced by AWTEvent.getSource()
See Also:
EventObject.getSource()

when

public long when
The time stamp. Replaced by InputEvent.getWhen().
See Also:
InputEvent.getWhen()

id

public int id
Indicates which type of event the event is, and which other Event variables are relevant for the event. This has been replaced by AWTEvent.getID()
See Also:
AWTEvent.getID()

x

public int x
The x coordinate of the event. Replaced by MouseEvent.getX()
See Also:
MouseEvent.getX()

y

public int y
The y coordinate of the event. Replaced by MouseEvent.getY()
See Also:
MouseEvent.getY()

key

public int key
The key code of the key that was pressed in a keyboard event. This has been replaced by KeyEvent.getKeyCode()
See Also:
KeyEvent.getKeyCode()

modifiers

public int modifiers
The state of the modifier keys. This is replaced with InputEvent.getModifiers() In java 1.1 MouseEvent and KeyEvent are subclasses of InputEvent.
See Also:
InputEvent.getModifiers()

clickCount

public int clickCount
For MOUSE_DOWN events, this field indicates the number of consecutive clicks. For other events, its value is 0. This field has been replaced by MouseEvent.getClickCount().
See Also:
MouseEvent.getClickCount().

arg

public Object arg
An arbitrary argument of the event. The value of this field depends on the type of event. arg has been replaced b event specific property.

evt

public Event evt
The next event. This field is set when putting events into a linked list. This has been replaced by EventQueue.
See Also:
EventQueue
Constructor Detail

Event

public Event(Object target,
             long when,
             int id,
             int x,
             int y,
             int key,
             int modifiers,
             Object arg)
Creates an instance of Event with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and argument.
Parameters:
target - the target component.
when - the time stamp.
id - the event type.
x - the x coordinate.
y - the y coordinate.
key - the key pressed in a keyboard event.
modifiers - the state of the modifier keys.
arg - the specified argument.

Event

public Event(Object target,
             long when,
             int id,
             int x,
             int y,
             int key,
             int modifiers)
Creates an instance of Event, with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and an argument set to null.
Parameters:
target - the target component.
when - the time stamp.
id - the event type.
x - the x coordinate.
y - the y coordinate.
key - the key pressed in a keyboard event.
modifiers - the state of the modifier keys.

Event

public Event(Object target,
             int id,
             Object arg)
Creates an instance of Event with the specified target component, event type, and argument.
Parameters:
target - the target component.
id - the event type.
arg - the specified argument.
Method Detail

translate

public void translate(int x,
                      int y)
Translates this event so that its x and y coordinates are increased by dx and dy, respectively.

This method translates an event relative to the given component. This involves, at a minimum, translating the coordinates into the local coordinate system of the given component. It may also involve translating a region in the case of an expose event.

Parameters:
dx - the distance to translate the x coordinate.
dy - the distance to translate the y coordinate.

shiftDown

public boolean shiftDown()
Checks if the Shift key is down.
Returns:
true if the key is down; false otherwise.
See Also:
modifiers, controlDown(), metaDown()

controlDown

public boolean controlDown()
Checks if the Control key is down.
Returns:
true if the key is down; false otherwise.
See Also:
modifiers, shiftDown(), metaDown()

metaDown

public boolean metaDown()
Checks if the Meta key is down.
Returns:
true if the key is down; false otherwise.
See Also:
modifiers, shiftDown(), controlDown()

paramString

protected String paramString()
Returns the parameter string representing this event. This string is useful for debugging.
Returns:
the parameter string of this event.

toString

public String toString()
Returns a representation of this event's values as a string.
Overrides:
toString in class Object
Returns:
a string that represents the event and the values of its member fields.
Since:
JDK1.1
See Also:
paramString()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class EventQueue

java.lang.Object
  |
  +--java.awt.EventQueue
public class EventQueue
extends Object

EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.

Some browsers partition applets in different code bases into separate contexts, and establish walls between these contexts. In such a scenario, there will be one EventQueue per context. Other browsers place all applets into the same context, implying that there will be only a single, global EventQueue for all applets. This behavior is implementation-dependent. Consult your browser's documentation for more information.

Since:
1.1

Constructor Summary
EventQueue()
Method Summary
protected void | dispatchEvent(AWTEvent event) Dispatch an event.
AWTEvent | getNextEvent() Remove an event from the EventQueue and return it.
static void | invokeAndWait(Runnable runnable) Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
static void | invokeLater(Runnable runnable) Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
static boolean | isDispatchThread() Returns true if the calling thread is the current AWT EventQueue's dispatch thread.
AWTEvent | peekEvent() Return the first event on the EventQueue without removing it.
AWTEvent | peekEvent(int id) Return the first event with the specified id, if any.
protected void | pop() Stop dispatching events using this EventQueue instance.
void | postEvent(AWTEvent theEvent) Post a 1.1-style event to the EventQueue.
void | push(EventQueue newEventQueue) Replace the existing EventQueue with the specified one.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EventQueue

public EventQueue()
Method Detail

postEvent

public void postEvent(AWTEvent theEvent)
Post a 1.1-style event to the EventQueue. If there is an existing event on the queue with the same ID and event source, the source Component's coalesceEvents method will be called.
Parameters:
theEvent - an instance of java.awt.AWTEvent, or a subclass of it.

getNextEvent

public AWTEvent getNextEvent()
                      throws InterruptedException
Remove an event from the EventQueue and return it. This method will block until an event has been posted by another thread.
Returns:
the next AWTEvent
Throws:
InterruptedException - if another thread has interrupted this thread.

peekEvent

public AWTEvent peekEvent()
Return the first event on the EventQueue without removing it.
Returns:
the first event

peekEvent

public AWTEvent peekEvent(int id)
Return the first event with the specified id, if any.
Parameters:
id - the id of the type of event desired.
Returns:
the first event of the specified id

dispatchEvent

protected void dispatchEvent(AWTEvent event)
Dispatch an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object:

Event Type | Source Type | Dispatched To
ActiveEvent | Any | event.dispatch()
Other | Component | source.dispatchEvent(AWTEvent)
Other | MenuComponent | source.dispatchEvent(AWTEvent)
Other | Other | No action (ignored)

Parameters:
theEvent - an instance of java.awt.AWTEvent, or a subclass of it.

push

public void push(EventQueue newEventQueue)
Replace the existing EventQueue with the specified one. Any pending events are transferred to the new EventQueue for processing by it.
Parameters:
an - EventQueue (or subclass thereof) instance to be used.
See Also:
pop()

pop

protected void pop()
            throws EmptyStackException
Stop dispatching events using this EventQueue instance. Any pending events are transferred to the previous EventQueue for processing by it.
Throws:
if - no previous push was made on this EventQueue.
See Also:
push(java.awt.EventQueue)

isDispatchThread

public static boolean isDispatchThread()
Returns true if the calling thread is the current AWT EventQueue's dispatch thread. Use this call the ensure that a given task is being executed (or not being) on the current AWT EventDispatchThread.
Returns:
true if running on the current AWT EventQueue's dispatch thread.

invokeLater

public static void invokeLater(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed.
Parameters:
runnable - the Runnable whose run() method should be executed synchronously on the EventQueue
Since:
1.2
See Also:
invokeAndWait(java.lang.Runnable)

invokeAndWait

public static void invokeAndWait(Runnable runnable)
                          throws InterruptedException,
                                 InvocationTargetException
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed. The call blocks until this has happened. This method will throw an Error if called from the event dispatcher thread.
Parameters:
runnable - the Runnable whose run() method should be executed synchronously on the EventQueue
Throws:
InterruptedException - if another thread has interrupted this thread
InvocationTargetException - if an exception is thrown when running runnable
Since:
1.2
See Also:
invokeLater(java.lang.Runnable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileDialog

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class FileDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--java.awt.FileDialog
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class FileDialog
extends Dialog

The FileDialog class displays a dialog window from which the user can select a file.

Since it is a modal dialog, when the application calls its show method to display the dialog, it blocks the rest of the application until the user has chosen a file.

Since:
JDK1.0
See Also:
Window.show(), Serialized Form

Inner classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | LOAD This constant value indicates that the purpose of the file dialog window is to locate a file from which to read.
static int | SAVE This constant value indicates that the purpose of the file dialog window is to locate a file to which to write.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
FileDialog(Frame parent)
Creates a file dialog for loading a file.
FileDialog(Frame parent, String title)
Creates a file dialog window with the specified title for loading a file.
FileDialog(Frame parent, String title, int mode)
Creates a file dialog window with the specified title for loading or saving a file.
Method Summary
void | addNotify() Creates the file dialog's peer.
String | getDirectory() Gets the directory of this file dialog.
String | getFile() Gets the selected file of this file dialog.
FilenameFilter | getFilenameFilter() Determines this file dialog's filename filter.
int | getMode() Indicates whether this file dialog box is for loading from a file or for saving to a file.
protected String | paramString() Returns the parameter string representing the state of this file dialog window.
void | setDirectory(String dir) Sets the directory of this file dialog window to be the specified directory.
void | setFile(String file) Sets the selected file for this file dialog window to be the specified file.
void | setFilenameFilter(FilenameFilter filter) Sets the filename filter for this file dialog window to the specified filter.
void | setMode(int mode) Sets the mode of the file dialog.
Methods inherited from class java.awt.Dialog
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, setModal, setResizable, setTitle, show
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LOAD

public static final int LOAD
This constant value indicates that the purpose of the file dialog window is to locate a file from which to read.

SAVE

public static final int SAVE
This constant value indicates that the purpose of the file dialog window is to locate a file to which to write.
Constructor Detail

FileDialog

public FileDialog(Frame parent)
Creates a file dialog for loading a file. The title of the file dialog is initially empty.
Parameters:
parent - the owner of the dialog
Since:
JDK1.1

FileDialog

public FileDialog(Frame parent,
                  String title)
Creates a file dialog window with the specified title for loading a file. The files shown are those in the current directory.
Parameters:
parent - the owner of the dialog.
title - the title of the dialog.

FileDialog

public FileDialog(Frame parent,
                  String title,
                  int mode)
Creates a file dialog window with the specified title for loading or saving a file.

If the value of mode is LOAD, then the file dialog is finding a file to read. If the value of mode is SAVE, the file dialog is finding a place to write a file.

Parameters:
parent - the owner of the dialog.
title - the title of the dialog.
mode - the mode of the dialog.
See Also:
LOAD, SAVE
Method Detail

addNotify

public void addNotify()
Creates the file dialog's peer. The peer allows us to change the look of the file dialog without changing its functionality.
Overrides:
addNotify in class Dialog
Following copied from class: java.awt.Dialog
See Also:
Component.isDisplayable(), Container.removeNotify()

getMode

public int getMode()
Indicates whether this file dialog box is for loading from a file or for saving to a file.
Returns:
the mode of this file dialog window, either FileDialog.LOAD or FileDialog.SAVE.
See Also:
LOAD, SAVE, setMode(int)

setMode

public void setMode(int mode)
Sets the mode of the file dialog.
Parameters:
mode - the mode for this file dialog, either FileDialog.LOAD or FileDialog.SAVE.
Throws:
IllegalArgumentException - if an illegal file dialog mode is used.
Since:
JDK1.1
See Also:
LOAD, SAVE, getMode()

getDirectory

public String getDirectory()
Gets the directory of this file dialog.
Returns:
the (potentially null or invalid) directory of this FileDialog.
See Also:
setDirectory(java.lang.String)

setDirectory

public void setDirectory(String dir)
Sets the directory of this file dialog window to be the specified directory. Specifying a null or an invalid directory implies an implementation-defined default. This default will not be realized, however, until the user has selected a file. Until this point, getDirectory() will return the value passed into this method.

Specifying "" as the directory is exactly equivalent to specifying null as the directory.

Parameters:
dir - the specific directory.
See Also:
getDirectory()

getFile

public String getFile()
Gets the selected file of this file dialog.
Returns:
the currently selected file of this file dialog window, or null if none is selected.
See Also:
setFile(java.lang.String)

setFile

public void setFile(String file)
Sets the selected file for this file dialog window to be the specified file. This file becomes the default file if it is set before the file dialog window is first shown.

Specifying "" as the file is exactly equivalent to specifying null as the file.

Parameters:
file - the file being set.
See Also:
getFile()

getFilenameFilter

public FilenameFilter getFilenameFilter()
Determines this file dialog's filename filter. A filename filter allows the user to specify which files appear in the file dialog window. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0.
Returns:
this file dialog's filename filter.
See Also:
FilenameFilter, setFilenameFilter(java.io.FilenameFilter)

setFilenameFilter

public void setFilenameFilter(FilenameFilter filter)
Sets the filename filter for this file dialog window to the specified filter. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0.
Parameters:
filter - the specified filter.
See Also:
FilenameFilter, getFilenameFilter()

paramString

protected String paramString()
Returns the parameter string representing the state of this file dialog window. This string is useful for debugging.
Overrides:
paramString in class Dialog
Returns:
the parameter string of this file dialog window.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlowLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class FlowLayout

java.lang.Object
  |
  +--java.awt.FlowLayout
All Implemented Interfaces:
LayoutManager, Serializable
public class FlowLayout
extends Object
implements LayoutManager, Serializable

A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. Flow layouts are typically used to arrange buttons in a panel. It will arrange buttons left to right until no more buttons fit on the same line. Each line is centered.

For example, the following picture shows an applet using the flow layout manager (its default layout manager) to position three buttons:

Graphic of Layout for Three Buttons

Here is the code for this applet:

 import java.awt.*;
 import java.applet.Applet;

 public class myButtons extends Applet {
     Button button1, button2, button3;
     public void init() {
         button1 = new Button("Ok");
         button2 = new Button("Open");
         button3 = new Button("Close");
         add(button1);
         add(button2);
         add(button3);
     }
 }

A flow layout lets each component assume its natural (preferred) size.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static int | CENTER This value indicates that each row of components should be centered.
static int | LEADING This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g.
static int | LEFT This value indicates that each row of components should be left-justified.
static int | RIGHT This value indicates that each row of components should be right-justified.
static int | TRAILING This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g.
Constructor Summary
FlowLayout()
Constructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int align)
Constructs a new Flow Layout with the specified alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int align, int hgap, int vgap)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.
Method Summary
void | addLayoutComponent(String name, Component comp) Adds the specified component to the layout.
int | getAlignment() Gets the alignment for this layout.
int | getHgap() Gets the horizontal gap between components.
int | getVgap() Gets the vertical gap between components.
void | layoutContainer(Container target) Lays out the container.
Dimension | minimumLayoutSize(Container target) Returns the minimum dimensions needed to layout the components contained in the specified target container.
Dimension | preferredLayoutSize(Container target) Returns the preferred dimensions for this layout given the components in the specified target container.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
void | setAlignment(int align) Sets the alignment for this layout.
void | setHgap(int hgap) Sets the horizontal gap between components.
void | setVgap(int vgap) Sets the vertical gap between components.
String | toString() Returns a string representation of this FlowLayout object and its values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LEFT

public static final int LEFT
This value indicates that each row of components should be left-justified.

CENTER

public static final int CENTER
This value indicates that each row of components should be centered.

RIGHT

public static final int RIGHT
This value indicates that each row of components should be right-justified.

LEADING

public static final int LEADING
This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g. to the left in left-to-right orientations.
See Also:
Component.getComponentOrientation(), ComponentOrientation
Since:
1.2 Package-private pending API change approval

TRAILING

public static final int TRAILING
This value indicates that each row of components should be justified to the leading edge of the container's orientation, e.g. to the right in left-to-right orientations.
See Also:
Component.getComponentOrientation(), ComponentOrientation
Since:
1.2 Package-private pending API change approval
Constructor Detail

FlowLayout

public FlowLayout()
Constructs a new Flow Layout with a centered alignment and a default 5-unit horizontal and vertical gap.

FlowLayout

public FlowLayout(int align)
Constructs a new Flow Layout with the specified alignment and a default 5-unit horizontal and vertical gap. The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, or FlowLayout.CENTER.
Parameters:
align - the alignment value

FlowLayout

public FlowLayout(int align,
                  int hgap,
                  int vgap)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.

The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, or FlowLayout.CENTER.

Parameters:
align - the alignment value.
hgap - the horizontal gap between components.
vgap - the vertical gap between components.
Method Detail

getAlignment

public int getAlignment()
Gets the alignment for this layout. Possible values are FlowLayout.LEFT, FlowLayout.RIGHT, or FlowLayout.CENTER.
Returns:
the alignment value for this layout.
Since:
JDK1.1
See Also:
setAlignment(int)

setAlignment

public void setAlignment(int align)
Sets the alignment for this layout. Possible values are FlowLayout.LEFT, FlowLayout.RIGHT, and FlowLayout.CENTER.
Parameters:
align - the alignment value.
Since:
JDK1.1
See Also:
getAlignment()

getHgap

public int getHgap()
Gets the horizontal gap between components.
Returns:
the horizontal gap between components.
Since:
JDK1.1
See Also:
setHgap(int)

setHgap

public void setHgap(int hgap)
Sets the horizontal gap between components.
Parameters:
hgap - the horizontal gap between components
Since:
JDK1.1
See Also:
getHgap()

getVgap

public int getVgap()
Gets the vertical gap between components.
Returns:
the vertical gap between components.
Since:
JDK1.1
See Also:
setVgap(int)

setVgap

public void setVgap(int vgap)
Sets the vertical gap between components.
Parameters:
vgap - the vertical gap between components
Since:
JDK1.1
See Also:
getVgap()

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component to the layout. Not used by this class.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout. Not used by this class.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to remove
See Also:
Container.removeAll()

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
the preferred dimensions to lay out the subcomponents of the specified container.
See Also:
Container, minimumLayoutSize(java.awt.Container), Container.getPreferredSize()

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
the minimum dimensions to lay out the subcomponents of the specified container.
See Also:
preferredLayoutSize(java.awt.Container), Container, Container.doLayout()

layoutContainer

public void layoutContainer(Container target)
Lays out the container. This method lets each component take its preferred size by reshaping the components in the target container in order to satisfy the constraints of this FlowLayout object.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
target - the specified component being laid out.
See Also:
Container, Container.doLayout()

toString

public String toString()
Returns a string representation of this FlowLayout object and its values.
Overrides:
toString in class Object
Returns:
a string representation of this layout.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Font

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Font

java.lang.Object
  |
  +--java.awt.Font
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FontUIResource
public class Font
extends Object
implements Serializable

The Font class represents fonts. The capabilities of this class have been extended over the java.awt.Font class in JDK(tm) 1.1 and earlier releases to provide for developers the ability to utilize more sophisticated typographic features.

It is important to present the concepts behind using the words character and glyph separately. A character is a symbol that represents items like letters and numbers in a particular writing system. For example, lowercase-g is a character. When a particular character has been rendered, a shape now represents this character. This shape is called a glyph.

Chararcter encoding is a conversion table that maps character codes to glyph codes in the font. The character encoding used in the Java 2D(tm) API is Unicode. For more information on Unicode you can visit the site http://www.unicode.org.

Characters and glyphs do not have one-to-one correspondence. For example, lowercase-a acute can be represented by two glyphs: lowercase-a and acute. Another example is ligatures such as ligature -fi which is a single glyph representing two characters, f and i.

A Font is a collection of glyphs. A Font can have many faces, such as heavy, medium, oblique, gothic and regular. All of these faces have similar typographic design.

There are three different names that you can get from a Font object. The logical font name is the same as that used by java.awt.Font in JDK 1.1 and earlier releases. The font face name, or just font name for short, is the name of a particular font face, like Helvetica Bold. The family name is the name of the font family that determines the typographic design across several faces, like Helvetica. The font face name is the one that should be used to specify fonts. This name signifies actual fonts in the host system, and does not identify font names with the shape of font characters as the logical font name does.

The Font class represents an instance of a font face from a collection of font faces that are present in the system resources of the host system. As examples, Arial Bold and Courier Bold Italic are font faces. There can be several Font objects associated with a font face, each differing in size, style, transform and font features. The getAllFonts method of the GraphicsEnvironment class returns an array of all font faces available in the system. These font faces are returned as Font objects with a size of 1, identity transform and default font features. These base fonts can then be used to derive new Font objects with varying sizes, styles, transforms and font features via the deriveFont methods in this class.

See Also:
GraphicsEnvironment.getAllFonts(), Serialized Form

Field Summary
static int | BOLD The bold style constant.
static int | CENTER_BASELINE The baseline used in ideographic scripts like Chinese, Japanese, and Korean when laying out text
static int | HANGING_BASELINE The baseline used in Devanigiri and similar scripts when laying out text
static int | ITALIC The italicized style constant.
protected String | name The logical name of this Font, as passed to the constructor.
static int | PLAIN The plain style constant.
protected float | pointSize The point size of this Font in float.
static int | ROMAN_BASELINE The baseline used in most Roman scripts when laying out text
protected int | size The point size of this Font, rounded to integer.
protected int | style The style of this Font, as passed to the constructor.
static int | TRUETYPE_FONT Create a Font of type TRUETYPE.
Constructor Summary
Font(Map attributes)
Creates a new Font with the specified attributes.
Font(String name, int style, int size)
Creates a new Font from the specified name, style and point size.
Method Summary
boolean | canDisplay(char c) Checks if this Font has a glyph for the specified character.
int | canDisplayUpTo(char[] text, int start, int limit) Indicates whether or not this Font can display the characters in the specified text starting at start and ending at limit.
int | canDisplayUpTo(CharacterIterator iter, int start, int limit) Indicates whether or not this Font can display the specified String.
int | canDisplayUpTo(String str) Indicates whether or not this Font can display a specified String.
static Font | createFont(int fontFormat, InputStream fontStream) Returns a new Font with the specified font type and input data.
GlyphVector | createGlyphVector(FontRenderContext frc, char[] chars) Returns a new GlyphVector object created with the specified array of characters and the specified FontRenderContext.
GlyphVector | createGlyphVector(FontRenderContext frc, CharacterIterator ci) Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.
GlyphVector | createGlyphVector(FontRenderContext frc, int[] glyphCodes) Returns a new GlyphVector object created with the specified integer array and the specified FontRenderContext.
GlyphVector | createGlyphVector(FontRenderContext frc, String str) Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
static Font | decode(String str) Returns the Font that the str argument describes.
Font | deriveFont(AffineTransform trans) Creates a new Font object by replicating the current Font object and applying a new transform to it.
Font | deriveFont(float size) Creates a new Font object by replicating the current Font object and applying a new size to it.
Font | deriveFont(int style) Creates a new Font object by replicating the current Font object and applying a new style to it.
Font | deriveFont(int style, AffineTransform trans) Creates a new Font object by replicating this Font object and applying a new style and transform.
Font | deriveFont(int style, float size) Creates a new Font object by replicating this Font object and applying a new style and size.
Font | deriveFont(Map attributes) Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
boolean | equals(Object obj) Compares this Font object to the specified Object.
protected void | finalize() Disposes the native Font object.
Map | getAttributes() Returns a map of font attributes available in this Font.
AttributedCharacterIterator.Attribute[] | getAvailableAttributes() Returns the keys of all the attributes supported by this Font.
byte | getBaselineFor(char c) Returns the baseline appropriate for displaying this character.
String | getFamily() Returns the family name of this Font.
String | getFamily(Locale l) Returns the family name of this Font, localized for the specified locale.
static Font | getFont(Map attributes) Returns a Font appropriate to this attribute set.
static Font | getFont(String nm) Returns a Font object from the system properties list.
static Font | getFont(String nm, Font font) Gets the specified Font from the system properties list.
String | getFontName() Returns the font face name of this Font.
String | getFontName(Locale l) Returns the font face name of the Font, localized for the specified locale.
float | getItalicAngle() Returns the italic angle of this Font.
LineMetrics | getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | getLineMetrics(String str, FontRenderContext frc) Returns a LineMetrics object created with the specified String and FontRenderContext.
LineMetrics | getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
Rectangle2D | getMaxCharBounds(FontRenderContext frc) Returns the bounds for the character with the maximum bounds as defined in the specified FontRenderContext.
int | getMissingGlyphCode() Returns the glyphCode which is used when this Font does not have a glyph for a specified unicode.
String | getName() Returns the logical name of this Font.
int | getNumGlyphs() Returns the number of glyphs in this Font.
java.awt.peer.FontPeer | getPeer() Deprecated. Font rendering is now platform independent.
String | getPSName() Returns the postscript name of this Font.
int | getSize() Returns the point size of this Font, rounded to an integer.
float | getSize2D() Returns the point size of this Font in float value.
Rectangle2D | getStringBounds(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified array of characters in the specified FontRenderContext.
Rectangle2D | getStringBounds(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
Rectangle2D | getStringBounds(String str, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
Rectangle2D | getStringBounds(String str, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
int | getStyle() Returns the style of this Font.
AffineTransform | getTransform() Returns a copy of the transform associated with this Font.
int | hashCode() Returns a hashcode for this Font.
boolean | hasUniformLineMetrics() Checks whether or not this Font has uniform line metrics.
boolean | isBold() Indicates whether or not this Font object's style is BOLD.
boolean | isItalic() Indicates whether or not this Font object's style is ITALIC.
boolean | isPlain() Indicates whether or not this Font object's style is PLAIN.
String | toString() Converts this Font object to a String representation.
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Field Detail

PLAIN

public static final int PLAIN
The plain style constant.

BOLD

public static final int BOLD
The bold style constant. This can be combined with the other style constants (except PLAIN) for mixed styles.

ITALIC

public static final int ITALIC
The italicized style constant. This can be combined with the other style constants (except PLAIN) for mixed styles.

ROMAN_BASELINE

public static final int ROMAN_BASELINE
The baseline used in most Roman scripts when laying out text

CENTER_BASELINE

public static final int CENTER_BASELINE
The baseline used in ideographic scripts like Chinese, Japanese, and Korean when laying out text

HANGING_BASELINE

public static final int HANGING_BASELINE
The baseline used in Devanigiri and similar scripts when laying out text

TRUETYPE_FONT

public static final int TRUETYPE_FONT
Create a Font of type TRUETYPE. In future other types may be added to support other font types.

name

protected String name
The logical name of this Font, as passed to the constructor.
See Also:
getName()
Since:
JDK1.0

style

protected int style
The style of this Font, as passed to the constructor. This style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
See Also:
getStyle()
Since:
JDK1.0

size

protected int size
The point size of this Font, rounded to integer.
See Also:
getSize()
Since:
JDK1.0

pointSize

protected float pointSize
The point size of this Font in float.
See Also:
getSize(), getSize2D()
Constructor Detail

Font

public Font(String name,
            int style,
            int size)
Creates a new Font from the specified name, style and point size.
Parameters:
name - the font name. This can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol. If name is null, the name of the new Font is set to Default.
style - the style constant for the Font The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). Any other bits set in the style parameter are ignored. If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.
size - the point size of the Font
Since:
JDK1.0
See Also:
GraphicsEnvironment.getAllFonts(), GraphicsEnvironment.getAvailableFontFamilyNames()

Font

public Font(Map attributes)
Creates a new Font with the specified attributes. This Font only recognizes keys defined in TextAttribute as attributes. If attributes is null, a new Font is initialized with default attributes.
Parameters:
attributes - the attributes to assign to the new Font, or null
Method Detail

getPeer

public java.awt.peer.FontPeer getPeer()
Deprecated. Font rendering is now platform independent.

Gets the peer of this Font.
Returns:
the peer of the Font.
Since:
JDK1.1

getFont

public static Font getFont(Map attributes)
Returns a Font appropriate to this attribute set.
Parameters:
attributes - the attributes to assign to the new Font
Returns:
a new Font created with the specified attributes.
Since:
1.2

createFont

public static Font createFont(int fontFormat,
                              InputStream fontStream)
                       throws FontFormatException,
                              IOException
Returns a new Font with the specified font type and input data. The new Font is created with a point size of 1 and style PLAIN. This base font can then be used with the deriveFont methods in this class to derive new Font objects with varying sizes, styles, transforms and font features. This method does not close the InputStream.
Parameters:
fontType - the type of the Font, which is TRUETYPE_FONT if a TrueType is desired. Other types might be provided in the future.
fontStream - an InputStream object representing the input data for the font.
Returns:
a new Font created with the specified font type.
Throws:
IllegalArgumentException - if fontType is not TRUETYPE_FONT
FontFormatException - if the fontStream data does not contain the required Truetype font tables.
IOException - if the fontStream cannot be completely read.
Since:
1.3

getTransform

public AffineTransform getTransform()
Returns a copy of the transform associated with this Font.
Parameters:
an - AffineTransform object representing the transform attribute of this Font object.

getFamily

public String getFamily()
Returns the family name of this Font. For example, Helvetica could be returned as a family name for the font face name of Helvetica Bold. Use getName to get the logical name of the font. Use getFontName to get the font face name of the font.
Returns:
a String that is the family name of this Font.
Since:
JDK1.1
See Also:
getName(), getFontName()

getFamily

public String getFamily(Locale l)
Returns the family name of this Font, localized for the specified locale. For example, Helvetica could be returned as a family name for the font face name of Helvetica Bold. Use getFontName to get the font face name of the font.
Parameters:
l - locale for which to get the family name
Returns:
a String representing the family name of the font, localized for the specified locale.
Since:
1.2
See Also:
getFontName(), Locale

getPSName

public String getPSName()
Returns the postscript name of this Font. Use getFamily to get the family name of the font. Use getFontName to get the font face name of the font.
Returns:
a String representing the postscript name of this Font.
Since:
1.2

getName

public String getName()
Returns the logical name of this Font. Use getFamily to get the family name of the font. Use getFontName to get the font face name of the font.
Returns:
a String representing the logical name of this Font.
Since:
JDK1.0
See Also:
getFamily(), getFontName()

getFontName

public String getFontName()
Returns the font face name of this Font. For example, Helvetica Bold could be returned as a font face name. Use getFamily to get the family name of the font. Use getName to get the logical name of the font.
Returns:
a String representing the font face name of this Font.
Since:
1.2
See Also:
getFamily(), getName()

getFontName

public String getFontName(Locale l)
Returns the font face name of the Font, localized for the specified locale. For example, Helvetica Fett could be returned as the font face name. Use getFamily to get the family name of the font.
Parameters:
l - a locale for which to get the font face name
Returns:
a String representing the font face name, localized for the specified locale.
See Also:
getFamily(), Locale

getStyle

public int getStyle()
Returns the style of this Font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
Returns:
the style of this Font
Since:
JDK1.0
See Also:
isPlain(),
isBold(),
isItalic()

getSize

public int getSize()
Returns the point size of this Font, rounded to an integer. Most users are familiar with the idea of using point size to specify the size of glyphs in a font. This point size defines a measurement between the baseline of one line to the baseline of the following line in a single spaced text document. The point size is based on typographic points, approximately 1/72 of an inch.

The Java(tm)2D API adopts the convention that one point is equivalent to one unit in user coordinates. When using a normalized transform for converting user space coordinates to device space coordinates 72 user space units equal 1 inch in device space. In this case one point is 1/72 of an inch.

Returns:
the point size of this Font in 1/72 of an inch units.
Since:
JDK1.0
See Also:
getSize2D(),
GraphicsConfiguration.getDefaultTransform(),
GraphicsConfiguration.getNormalizingTransform()

getSize2D

public float getSize2D()
Returns the point size of this Font in float value.
Returns:
the point size of this Font as a float value.
Since:
1.2
See Also:
getSize()

isPlain

public boolean isPlain()
Indicates whether or not this Font object's style is PLAIN.
Returns:
true if this Font has a PLAIN sytle; false otherwise.
Since:
JDK1.0
See Also:
getStyle()

isBold

public boolean isBold()
Indicates whether or not this Font object's style is BOLD.
Returns:
true if this Font object's style is BOLD; false otherwise.
Since:
JDK1.0
See Also:
getStyle()

isItalic

public boolean isItalic()
Indicates whether or not this Font object's style is ITALIC.
Returns:
true if this Font object's style is ITALIC; false otherwise.
Since:
JDK1.0
See Also:
getStyle()

getFont

public static Font getFont(String nm)
Returns a Font object from the system properties list.
Parameters:
nm - the property name
Returns:
a Font object that the property name describes.
Since:
1.2

decode

public static Font decode(String str)
Returns the Font that the str argument describes. To ensure that this method returns the desired Font, format the str parameter in one of two ways:

"fontfamilyname-style-pointsize" or
"fontfamilyname style pointsize"

in which style is one of the three case-insensitive strings: "BOLD", "BOLDITALIC", or "ITALIC", and pointsize is a decimal representation of the point size. For example, if you want a font that is Arial, bold, and a point size of 18, you would call this method with: "Arial-BOLD-18".

The default size is 12 and the default style is PLAIN. If you don't specify a valid size, the returned Font has a size of 12. If you don't specify a valid style, the returned Font has a style of PLAIN. If you do not provide a valid font family name in the str argument, this method still returns a valid font with a family name of "dialog". To determine what font family names are available on your system, use the GraphicsEnvironment.getAvailableFontFamilyNames() method. If str is null, a new Font is returned with the family name "dialog", a size of 12 and a PLAIN style.

Parameters:
str - the name of the font, or null
Returns:
the Font object that str describes, or a new default Font if str is null.
Since:
JDK1.1
See Also:
getFamily()

getFont

public static Font getFont(String nm,
                           Font font)
Gets the specified Font from the system properties list. As in the getProperty method of System, the first argument is treated as the name of a system property to be obtained. The String value of this property is then interpreted as a Font object.

The property value should be one of the following forms:

  • fontname-style-pointsize
  • fontname-pointsize
  • fontname-style
  • fontname
where style is one of the three case-insensitive strings "BOLD", "BOLDITALIC", or "ITALIC", and point size is a decimal representation of the point size.

The default style is PLAIN. The default point size is 12.

If the specified property is not found, the font argument is returned instead.

Parameters:
nm - the case-insensitive property name
font - a default Font to return if property nm is not defined
Returns:
the Font value of the property.
See Also:
decode(String)

hashCode

public int hashCode()
Returns a hashcode for this Font.
Overrides:
hashCode in class Object
Returns:
a hashcode value for this Font.
Since:
JDK1.0

equals

public boolean equals(Object obj)
Compares this Font object to the specified Object.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare.
Returns:
true if the objects are the same; false otherwise.
Since:
JDK1.0

toString

public String toString()
Converts this Font object to a String representation.
Overrides:
toString in class Object
Returns:
a String representation of this Font object.
Since:
JDK1.0

getNumGlyphs

public int getNumGlyphs()
Returns the number of glyphs in this Font. Glyph codes for this Font range from 0 to getNumGlyphs() - 1.
Returns:
the number of glyphs in this Font.
Since:
1.2

getMissingGlyphCode

public int getMissingGlyphCode()
Returns the glyphCode which is used when this Font does not have a glyph for a specified unicode.
Returns:
the glyphCode of this Font.
Since:
1.2

getBaselineFor

public byte getBaselineFor(char c)
Returns the baseline appropriate for displaying this character.

Large fonts can support different writing systems, and each system can use a different baseline. The character argument determines the writing system to use. Clients should not assume all characters use the same baseline.

Parameters:
c - a character used to identify the writing system
Returns:
the baseline appropriate for the specified character.
Since:
1.2
See Also:
LineMetrics.getBaselineOffsets(), ROMAN_BASELINE, CENTER_BASELINE, HANGING_BASELINE

getAttributes

public Map getAttributes()
Returns a map of font attributes available in this Font. Attributes include things like ligatures and glyph substitution.
Returns:
the attributes map of this Font.

getAvailableAttributes

public AttributedCharacterIterator.Attribute[] getAvailableAttributes()
Returns the keys of all the attributes supported by this Font. These attributes can be used to derive other fonts.
Returns:
an array containing the keys of all the attributes supported by this Font.
Since:
1.2

deriveFont

public Font deriveFont(int style,
                       float size)
Creates a new Font object by replicating this Font object and applying a new style and size.
Parameters:
style - the style for the new Font
size - the size for the new Font
Returns:
a new Font object.
Since:
1.2

deriveFont

public Font deriveFont(int style,
                       AffineTransform trans)
Creates a new Font object by replicating this Font object and applying a new style and transform.
Parameters:
style - the style for the new Font
trans - the AffineTransform associated with the new Font
Returns:
a new Font object.
Throws:
IllegalArgumentException - if trans is null
Since:
1.2

deriveFont

public Font deriveFont(float size)
Creates a new Font object by replicating the current Font object and applying a new size to it.
Parameters:
size - the size for the new Font.
Returns:
a new Font object.
Since:
1.2

deriveFont

public Font deriveFont(AffineTransform trans)
Creates a new Font object by replicating the current Font object and applying a new transform to it.
Parameters:
trans - the AffineTransform associated with the new Font
Returns:
a new Font object.
Throws:
IllegalArgumentException - if trans is null
Since:
1.2

deriveFont

public Font deriveFont(int style)
Creates a new Font object by replicating the current Font object and applying a new style to it.
Parameters:
style - the style for the new Font
Returns:
a new Font object.
Since:
1.2

deriveFont

public Font deriveFont(Map attributes)
Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
Parameters:
attributes - a map of attributes enabled for the new Font
Returns:
a new Font object.
Since:
1.2

canDisplay

public boolean canDisplay(char c)
Checks if this Font has a glyph for the specified character.
Parameters:
c - a unicode character code
Returns:
true if this Font can display the character; false otherwise.
Since:
1.2

canDisplayUpTo

public int canDisplayUpTo(String str)
Indicates whether or not this Font can display a specified String. For strings with Unicode encoding, it is important to know if a particular font can display the string. This method returns an offset into the String str which is the first character this Font cannot display without using the missing glyph code. If the Font can display all characters, -1 is returned.
Parameters:
str - a String object
Returns:
an offset into str that points to the first character in str that this Font cannot display; or -1 if this Font can display all characters in str.
Since:
1.2

canDisplayUpTo

public int canDisplayUpTo(char[] text,
                          int start,
                          int limit)
Indicates whether or not this Font can display the characters in the specified text starting at start and ending at limit. This method is a convenience overload.
Parameters:
text - the specified array of characters
start - the specified starting offset into the specified array of characters
limit - the specified ending offset into the specified array of characters
Since:
1.2

canDisplayUpTo

public int canDisplayUpTo(CharacterIterator iter,
                          int start,
                          int limit)
Indicates whether or not this Font can display the specified String. For strings with Unicode encoding, it is important to know if a particular font can display the string. This method returns an offset into the String str which is the first character this Font cannot display without using the missing glyph code . If this Font can display all characters, -1 is returned.
Parameters:
text - a CharacterIterator object
start - the specified starting offset into the specified array of characters
limit - the specified ending offset into the specified array of characters
Returns:
an offset into the String object that can be displayed by this Font.
Since:
1.2

getItalicAngle

public float getItalicAngle()
Returns the italic angle of this Font. The italic angle is the inverse slope of the caret which best matches the posture of this Font.
Returns:
the angle of the ITALIC style of this Font.
See Also:
TextAttribute.POSTURE

hasUniformLineMetrics

public boolean hasUniformLineMetrics()
Checks whether or not this Font has uniform line metrics. A logical Font might be a composite font, which means that it is composed of different physical fonts to cover different code ranges. Each of these fonts might have different LineMetrics. If the logical Font is a single font then the metrics would be uniform.
Returns:
true if this Font has uniform line metrics; false otherwise.

getLineMetrics

public LineMetrics getLineMetrics(String str,
                                  FontRenderContext frc)
Returns a LineMetrics object created with the specified String and FontRenderContext.
Parameters:
str - the specified String
frc - the specified FontRenderContext
Returns:
a LineMetrics object created with the specified String and FontRenderContext.

getLineMetrics

public LineMetrics getLineMetrics(String str,
                                  int beginIndex,
                                  int limit,
                                  FontRenderContext frc)
Returns a LineMetrics object created with the specified arguments.
Parameters:
str - the specified String
beginIndex - the initial offset of str
limit - the end offset of str
frc - the specified FontRenderContext
Returns:
a LineMetrics object created with the specified arguments.

getLineMetrics

public LineMetrics getLineMetrics(char[] chars,
                                  int beginIndex,
                                  int limit,
                                  FontRenderContext frc)
Returns a LineMetrics object created with the specified arguments.
Parameters:
chars - an array of characters
beginIndex - the initial offset of chars
limit - the end offset of chars
frc - the specified FontRenderContext
Returns:
a LineMetrics object created with the specified arguments.

getLineMetrics

public LineMetrics getLineMetrics(CharacterIterator ci,
                                  int beginIndex,
                                  int limit,
                                  FontRenderContext frc)
Returns a LineMetrics object created with the specified arguments.
Parameters:
ci - the specified CharacterIterator
beginIndex - the initial offset in ci
limit - the end offset of ci
frc - the specified FontRenderContext
Returns:
a LineMetrics object created with the specified arguments.

getStringBounds

public Rectangle2D getStringBounds(String str,
                                   FontRenderContext frc)
Returns the bounds of the specified String in the specified FontRenderContext. The bounds is used to layout the String.
Parameters:
str - the specified String
frc - the specified FontRenderContext
Returns:
a Rectangle2D that is the bounding box of the specified String in the specified FontRenderContext.
Since:
1.2
See Also:
FontRenderContext, createGlyphVector(java.awt.font.FontRenderContext, java.lang.String)

getStringBounds

public Rectangle2D getStringBounds(String str,
                                   int beginIndex,
                                   int limit,
                                   FontRenderContext frc)
Returns the bounds of the specified String in the specified FontRenderContext. The bounds is used to layout the String.
Parameters:
str - the specified String
beginIndex - the initial offset of str
limit - the end offset of str
frc - the specified FontRenderContext
Returns:
a Rectangle2D that is the bounding box of the specified String in the specified FontRenderContext.
Throws:
IndexOutOfBoundsException - if beginIndex is less than zero, or limit is greater than the length of str, or beginIndex is greater than limit.
Since:
1.2
See Also:
FontRenderContext, createGlyphVector(java.awt.font.FontRenderContext, java.lang.String)

getStringBounds

public Rectangle2D getStringBounds(char[] chars,
                                   int beginIndex,
                                   int limit,
                                   FontRenderContext frc)
Returns the bounds of the specified array of characters in the specified FontRenderContext. The bounds is used to layout the String created with the specified array of characters, beginIndex and limit.
Parameters:
chars - an array of characters
beginIndex - the initial offset in the array of characters
limit - the end offset in the array of characters
frc - the specified FontRenderContext
Returns:
a Rectangle2D that is the bounding box of the specified array of characters in the specified FontRenderContext.
Throws:
IndexOutOfBoundsException - if beginIndex is less than zero, or limit is greater than the length of chars, or beginIndex is greater than limit.
Since:
1.2
See Also:
FontRenderContext, createGlyphVector(java.awt.font.FontRenderContext, java.lang.String)

getStringBounds

public Rectangle2D getStringBounds(CharacterIterator ci,
                                   int beginIndex,
                                   int limit,
                                   FontRenderContext frc)
Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext. The bounds is used to layout the String.
Parameters:
ci - the specified CharacterIterator
beginIndex - the initial offset in ci
limit - the end offset in ci
frc - the specified FontRenderContext
Returns:
a Rectangle2D that is the bounding box of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
Throws:
IndexOutOfBoundsException - if beginIndex is less than the start index of ci, or limit is greater than the end index of ci, or beginIndex is greater than limit
Since:
1.2
See Also:
FontRenderContext, createGlyphVector(java.awt.font.FontRenderContext, java.lang.String)

getMaxCharBounds

public Rectangle2D getMaxCharBounds(FontRenderContext frc)
Returns the bounds for the character with the maximum bounds as defined in the specified FontRenderContext.
Parameters:
frc - the specified FontRenderContext
Returns:
a Rectangle2D that is the bounding box for the character with the maximum bounds.

createGlyphVector

public GlyphVector createGlyphVector(FontRenderContext frc,
                                     String str)
Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
Parameters:
frc - the specified FontRenderContext
str - the specified String
Returns:
a new GlyphVector created with the specified String and the specified FontRenderContext.

createGlyphVector

public GlyphVector createGlyphVector(FontRenderContext frc,
                                     char[] chars)
Returns a new GlyphVector object created with the specified array of characters and the specified FontRenderContext.
Parameters:
frc - the specified FontRenderContext
chars - the specified array of characters
Returns:
a new GlyphVector created with the specified array of characters and the specified FontRenderContext.

createGlyphVector

public GlyphVector createGlyphVector(FontRenderContext frc,
                                     CharacterIterator ci)
Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.
Parameters:
frc - the specified FontRenderContext
ci - the specified CharacterIterator
Returns:
a new GlyphVector created with the specified CharacterIterator and the specified FontRenderContext.

createGlyphVector

public GlyphVector createGlyphVector(FontRenderContext frc,
                                     int[] glyphCodes)
Returns a new GlyphVector object created with the specified integer array and the specified FontRenderContext.
Parameters:
frc - the specified FontRenderContext
glyphcodes - the specified integer array
Returns:
a new GlyphVector created with the specified integer array and the specified FontRenderContext.

finalize

protected void finalize()
                 throws Throwable
Disposes the native Font object.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.font Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.font

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.text.AttributedCharacterIterator.Attribute (implements java.io.Serializable)
      • class java.awt.font.TextAttribute
    • class java.awt.font.FontRenderContext
    • class java.awt.font.GlyphJustificationInfo
    • class java.awt.font.GlyphMetrics
    • class java.awt.font.GlyphVector (implements java.lang.Cloneable)
    • class java.awt.font.GraphicAttribute
      • class java.awt.font.ImageGraphicAttribute
      • class java.awt.font.ShapeGraphicAttribute
    • class java.awt.font.LineBreakMeasurer
    • class java.awt.font.LineMetrics
    • class java.awt.font.TextHitInfo
    • class java.awt.font.TextLayout (implements java.lang.Cloneable)
    • class java.awt.font.TextLayout.CaretPolicy
    • class java.awt.font.TextMeasurer
    • class java.awt.font.TransformAttribute (implements java.io.Serializable)

Interface Hierarchy

  • interface java.awt.font.MultipleMaster
  • interface java.awt.font.OpenType
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.font

Provides classes and interface relating to fonts.

See:
Description

Interface Summary
MultipleMaster | The MultipleMaster interface represents Type 1 Multiple Master fonts.
OpenType | The OpenType interface represents OpenType and TrueType fonts.

Class Summary
FontRenderContext | The FontRenderContext class is a container for the information needed to correctly measure text.
GlyphJustificationInfo | The GlyphJustificationInfo class represents information about the justification properties of a glyph.
GlyphMetrics | The GlyphMetrics class represents infomation for a single glyph.
GlyphVector | A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
GraphicAttribute | This class is used with the CHAR_REPLACEMENT attribute.
ImageGraphicAttribute | The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.
LineBreakMeasurer | The LineBreakMeasurer class allows styled text to be broken into lines (or segments) that fit within a particular visual advance.
LineMetrics | The LineMetrics class allows access to the metrics needed to layout characters along a line and to layout of a set of lines.
ShapeGraphicAttribute | The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.
TextAttribute | The TextAttribute class defines attribute keys and attribute values used for text rendering.
TextHitInfo | The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.
TextLayout | TextLayout is an immutable graphical representation of styled character data.
TextLayout.CaretPolicy | Defines a policy for determining the strong caret location.
TextMeasurer | TextMeasurer provides the primitive operations needed for line break: measuring up to a given advance, determining the advance of a range of characters, and generating a TextLayout for a range of characters.
TransformAttribute | The TransformAttribute class provides an immutable wrapper for a transform so that it is safe to use as an attribute.

Package java.awt.font Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.font

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.font

Packages that use java.awt.font
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Classes in java.awt.font used by java.awt
FontRenderContext
The FontRenderContext class is a container for the information needed to correctly measure text.
GlyphVector
A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
LineMetrics
The LineMetrics class allows access to the metrics needed to layout characters along a line and to layout of a set of lines.

Classes in java.awt.font used by java.awt.event
TextHitInfo
The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.

Classes in java.awt.font used by java.awt.font
FontRenderContext
The FontRenderContext class is a container for the information needed to correctly measure text.
GlyphJustificationInfo
The GlyphJustificationInfo class represents information about the justification properties of a glyph.
GlyphMetrics
The GlyphMetrics class represents infomation for a single glyph.
GlyphVector
A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
GraphicAttribute
This class is used with the CHAR_REPLACEMENT attribute.
ImageGraphicAttribute
The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.
ShapeGraphicAttribute
The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.
TextAttribute
The TextAttribute class defines attribute keys and attribute values used for text rendering.
TextHitInfo
The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.
TextLayout
TextLayout is an immutable graphical representation of styled character data.
TextLayout.CaretPolicy
Defines a policy for determining the strong caret location.

Classes in java.awt.font used by java.awt.im
TextHitInfo
The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.

Classes in java.awt.font used by java.awt.im.spi
TextHitInfo
The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CaretPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TextLayout.CaretPolicy

java.lang.Object
  |
  +--java.awt.font.TextLayout.CaretPolicy
Enclosing class:
TextLayout
public static class TextLayout.CaretPolicy
extends Object

Defines a policy for determining the strong caret location. This class contains one method, getStrongCaret, which is used to specify the policy that determines the strong caret in dual-caret text. The strong caret is used to move the caret to the left or right. Instances of this class can be passed to getCaretShapes, getNextLeftHit and getNextRightHit to customize strong caret selection.

To specify alternate caret policies, subclass CaretPolicy and override getStrongCaret. getStrongCaret should inspect the two TextHitInfo arguments and choose one of them as the strong caret.

Most clients do not need to use this class.

Constructor Summary
TextLayout.CaretPolicy()
Constructs a CaretPolicy.
Method Summary
 TextHitInfo getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout)
Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextLayout.CaretPolicy

public TextLayout.CaretPolicy()
Constructs a CaretPolicy.
Method Detail

getStrongCaret

public TextHitInfo getStrongCaret(TextHitInfo hit1,
                                  TextHitInfo hit2,
                                  TextLayout layout)
Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.
Parameters:
hit1 - a valid hit in layout
hit2 - a valid hit in layout
layout - the TextLayout in which hit1 and hit2 are used
Returns:
hit1 or hit2 (or an equivalent TextHitInfo), indicating the strong caret.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.font.LineBreakMeasurer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.LineBreakMeasurer

No usage of java.awt.font.LineBreakMeasurer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TextMeasurer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TextMeasurer

No usage of java.awt.font.TextMeasurer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TransformAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TransformAttribute

No usage of java.awt.font.TransformAttribute

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.font.MultipleMaster

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.font.MultipleMaster

No usage of java.awt.font.MultipleMaster

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.font.OpenType

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.font.OpenType

No usage of java.awt.font.OpenType

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.FontRenderContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.FontRenderContext

Packages that use FontRenderContext
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.

Uses of FontRenderContext in java.awt

Methods in java.awt that return FontRenderContext
abstract  FontRenderContext Graphics2D.getFontRenderContext()
Get the rendering context of the Font within this Graphics2D context.

Methods in java.awt with parameters of type FontRenderContext
LineMetrics | Font.getLineMetrics(String str, FontRenderContext frc) Returns a LineMetrics object created with the specified String and FontRenderContext.
LineMetrics | Font.getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | Font.getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | Font.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
Rectangle2D | Font.getStringBounds(String str, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(String str, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified array of characters in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
Rectangle2D | Font.getMaxCharBounds(FontRenderContext frc) Returns the bounds for the character with the maximum bounds as defined in the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, String str) Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, char[] chars) Returns a new GlyphVector object created with the specified array of characters and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, CharacterIterator ci) Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, int[] glyphCodes) Returns a new GlyphVector object created with the specified integer array and the specified FontRenderContext.

Uses of FontRenderContext in java.awt.font

Methods in java.awt.font that return FontRenderContext
abstract  FontRenderContext GlyphVector.getFontRenderContext()
Returns the FontRenderContext associated with this GlyphVector.

Constructors in java.awt.font with parameters of type FontRenderContext
TextLayout(String string, Font font, FontRenderContext frc)
Constructs a TextLayout from a String and a Font.
TextLayout(String string, Map attributes, FontRenderContext frc)
Constructs a TextLayout from a String and an attribute set.
TextLayout(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextLayout from an iterator over styled text.
LineBreakMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
LineBreakMeasurer(AttributedCharacterIterator text, BreakIterator breakIter, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
TextMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextMeasurer from the source text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.GlyphJustificationInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.GlyphJustificationInfo

Packages that use GlyphJustificationInfo
java.awt.font Provides classes and interface relating to fonts.

Uses of GlyphJustificationInfo in java.awt.font

Methods in java.awt.font that return GlyphJustificationInfo
abstract GlyphJustificationInfo | GlyphVector.getGlyphJustificationInfo(int glyphIndex) Returns the justification information for the glyph at the specified index into this GlyphVector.
GlyphJustificationInfo | GraphicAttribute.getJustificationInfo() Returns the justification information for this GraphicAttribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.GlyphMetrics

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.GlyphMetrics

Packages that use GlyphMetrics
java.awt.font Provides classes and interface relating to fonts.

Uses of GlyphMetrics in java.awt.font

Methods in java.awt.font that return GlyphMetrics
abstract  GlyphMetrics GlyphVector.getGlyphMetrics(int glyphIndex)
Returns the metrics of the glyph at the specified index into this GlyphVector.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.GlyphVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.GlyphVector

Packages that use GlyphVector
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.

Uses of GlyphVector in java.awt

Methods in java.awt that return GlyphVector
GlyphVector | Font.createGlyphVector(FontRenderContext frc, String str) Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, char[] chars) Returns a new GlyphVector object created with the specified array of characters and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, CharacterIterator ci) Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, int[] glyphCodes) Returns a new GlyphVector object created with the specified integer array and the specified FontRenderContext.

Methods in java.awt with parameters of type GlyphVector
abstract  void Graphics2D.drawGlyphVector(GlyphVector g, float x, float y)
Renders the text of the specified GlyphVector using the Graphics2D context's rendering attributes.

Uses of GlyphVector in java.awt.font

Methods in java.awt.font with parameters of type GlyphVector
abstract  boolean GlyphVector.equals(GlyphVector set)
Tests if the specified GlyphVector exactly equals this GlyphVector.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.GraphicAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.GraphicAttribute

Packages that use GraphicAttribute
java.awt.font Provides classes and interface relating to fonts.

Uses of GraphicAttribute in java.awt.font

Subclasses of GraphicAttribute in java.awt.font
class | ImageGraphicAttribute The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.
class | ShapeGraphicAttribute The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.ImageGraphicAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.ImageGraphicAttribute

Packages that use ImageGraphicAttribute
java.awt.font Provides classes and interface relating to fonts.

Uses of ImageGraphicAttribute in java.awt.font

Methods in java.awt.font with parameters of type ImageGraphicAttribute
 boolean ImageGraphicAttribute.equals(ImageGraphicAttribute rhs)
Compares this ImageGraphicAttribute to the specified ImageGraphicAttribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.LineMetrics

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.LineMetrics

Packages that use LineMetrics
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of LineMetrics in java.awt

Methods in java.awt that return LineMetrics
LineMetrics | FontMetrics.getLineMetrics(String str, Graphics context) Returns the LineMetrics object for the specified String in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(String str, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified String in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified character array in the specified Graphics context.
LineMetrics | FontMetrics.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
LineMetrics | Font.getLineMetrics(String str, FontRenderContext frc) Returns a LineMetrics object created with the specified String and FontRenderContext.
LineMetrics | Font.getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | Font.getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
LineMetrics | Font.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.ShapeGraphicAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.ShapeGraphicAttribute

Packages that use ShapeGraphicAttribute
java.awt.font Provides classes and interface relating to fonts.

Uses of ShapeGraphicAttribute in java.awt.font

Methods in java.awt.font with parameters of type ShapeGraphicAttribute
 boolean ShapeGraphicAttribute.equals(ShapeGraphicAttribute rhs)
Compares this ShapeGraphicAttribute to the specified ShapeGraphicAttribute.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TextAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TextAttribute

Packages that use TextAttribute
java.awt.font Provides classes and interface relating to fonts.

Uses of TextAttribute in java.awt.font

Fields in java.awt.font declared as TextAttribute
static TextAttribute | TextAttribute.FAMILY Attribute key for the unlocalized font family name.
static TextAttribute | TextAttribute.WEIGHT Attribute key for the weight of a font.
static TextAttribute | TextAttribute.WIDTH Attribute key for the width of a font.
static TextAttribute | TextAttribute.POSTURE Attribute key for the posture of a font.
static TextAttribute | TextAttribute.SIZE Attribute key for the font size.
static TextAttribute | TextAttribute.TRANSFORM Attribute key for the transform of a font.
static TextAttribute | TextAttribute.SUPERSCRIPT Attribute key for super and subscripting.
static TextAttribute | TextAttribute.FONT Attribute key for the font to use to render text.
static TextAttribute | TextAttribute.CHAR_REPLACEMENT Attribute key for a user_defined glyph to display in the text in lieu of a character.
static TextAttribute | TextAttribute.FOREGROUND Attribute key for the foreground paint adornment.
static TextAttribute | TextAttribute.BACKGROUND Attribute key for the background Paint adornment.
static TextAttribute | TextAttribute.UNDERLINE Attribute key for underline adornments.
static TextAttribute | TextAttribute.STRIKETHROUGH Attribute key for the strikethrough adornment.
static TextAttribute | TextAttribute.RUN_DIRECTION Attribute key for the run direction of the line.
static TextAttribute | TextAttribute.BIDI_EMBEDDING Attribute key for the embedding level for nested bidirectional runs.
static TextAttribute | TextAttribute.JUSTIFICATION Attribute key for the justification of a paragraph.
static TextAttribute | TextAttribute.INPUT_METHOD_HIGHLIGHT Attribute key for input method highlight styles.
static TextAttribute | TextAttribute.INPUT_METHOD_UNDERLINE Attribute key for input method underline adornments.
static TextAttribute | TextAttribute.SWAP_COLORS Attribute key for swapping foreground and background Paints (or Colors).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TextHitInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TextHitInfo

Packages that use TextHitInfo
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Uses of TextHitInfo in java.awt.event

Methods in java.awt.event that return TextHitInfo
TextHitInfo | InputMethodEvent.getCaret() Gets the caret.
TextHitInfo | InputMethodEvent.getVisiblePosition() Gets the position that's most important to be visible.

Constructors in java.awt.event with parameters of type TextHitInfo
InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.
InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition.

Uses of TextHitInfo in java.awt.font

Methods in java.awt.font that return TextHitInfo
TextHitInfo | TextLayout.getNextRightHit(TextHitInfo hit) Returns the hit for the next caret to the right (bottom); if there is no such hit, returns null.
TextHitInfo | TextLayout.getNextRightHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
TextHitInfo | TextLayout.getNextRightHit(int offset) Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
TextHitInfo | TextLayout.getNextLeftHit(TextHitInfo hit) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | TextLayout.getNextLeftHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | TextLayout.getNextLeftHit(int offset) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | TextLayout.getVisualOtherHit(TextHitInfo hit) Returns the hit on the opposite side of the specified hit's caret.
TextHitInfo | TextLayout.hitTestChar(float x, float y, Rectangle2D bounds) Returns a TextHitInfo corresponding to the specified point.
TextHitInfo | TextLayout.hitTestChar(float x, float y) Returns a TextHitInfo corresponding to the specified point.
TextHitInfo | TextLayout.CaretPolicy.getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout) Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.
static TextHitInfo | TextHitInfo.leading(int charIndex) Creates a TextHitInfo on the leading edge of the character at the specified charIndex.
static TextHitInfo | TextHitInfo.trailing(int charIndex) Creates a hit on the trailing edge of the character at the specified charIndex.
static TextHitInfo | TextHitInfo.beforeOffset(int offset) Creates a TextHitInfo at the specified offset, associated with the character before the offset.
static TextHitInfo | TextHitInfo.afterOffset(int offset) Creates a TextHitInfo at the specified offset, associated with the character after the offset.
TextHitInfo | TextHitInfo.getOtherHit() Creates a TextHitInfo on the other side of the insertion point.
TextHitInfo | TextHitInfo.getOffsetHit(int delta) Creates a TextHitInfo whose character index is offset by delta from the charIndex of this TextHitInfo.

Methods in java.awt.font with parameters of type TextHitInfo
float[] | TextLayout.getCaretInfo(TextHitInfo hit, Rectangle2D bounds) Returns information about the caret corresponding to hit.
float[] | TextLayout.getCaretInfo(TextHitInfo hit) Returns information about the caret corresponding to hit.
TextHitInfo | TextLayout.getNextRightHit(TextHitInfo hit) Returns the hit for the next caret to the right (bottom); if there is no such hit, returns null.
TextHitInfo | TextLayout.getNextLeftHit(TextHitInfo hit) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | TextLayout.getVisualOtherHit(TextHitInfo hit) Returns the hit on the opposite side of the specified hit's caret.
Shape | TextLayout.getCaretShape(TextHitInfo hit, Rectangle2D bounds) Returns a Shape representing the caret at the specified hit inside the specified bounds.
Shape | TextLayout.getCaretShape(TextHitInfo hit) Returns a Shape representing the caret at the specified hit inside the natural bounds of this TextLayout.
int[] | TextLayout.getLogicalRangesForVisualSelection(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) Returns the logical ranges of text corresponding to a visual selection.
Shape | TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) Returns a path enclosing the visual selection in the specified range, extended to bounds.
Shape | TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) Returns a Shape enclosing the visual selection in the specified range, extended to the bounds.
TextHitInfo | TextLayout.CaretPolicy.getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout) Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.
boolean | TextHitInfo.equals(TextHitInfo hitInfo) Returns true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo.

Uses of TextHitInfo in java.awt.im

Methods in java.awt.im that return TextHitInfo
 TextHitInfo InputMethodRequests.getLocationOffset(int x, int y)
Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.

Methods in java.awt.im with parameters of type TextHitInfo
 Rectangle InputMethodRequests.getTextLocation(TextHitInfo offset)
Gets the location of a specified offset in the current composed text, or of the selection in committed text.

Uses of TextHitInfo in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type TextHitInfo
 void InputMethodContext.dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Creates an input method event from the arguments given and dispatches it to the client component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TextLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TextLayout

Packages that use TextLayout
java.awt.font Provides classes and interface relating to fonts.

Uses of TextLayout in java.awt.font

Methods in java.awt.font that return TextLayout
TextLayout | TextLayout.getJustifiedLayout(float justificationWidth) Creates a copy of this TextLayout justified to the specified width.
TextLayout | LineBreakMeasurer.nextLayout(float wrappingWidth) Returns the next layout, and updates the current position.
TextLayout | LineBreakMeasurer.nextLayout(float wrappingWidth, int offsetLimit, boolean requireNextWord) Returns the next layout, and updates the current position.
TextLayout | TextMeasurer.getLayout(int start, int limit) Returns a TextLayout on the given character range.

Methods in java.awt.font with parameters of type TextLayout
boolean | TextLayout.equals(TextLayout rhs) Returns true if the two layouts are equal.
TextHitInfo | TextLayout.CaretPolicy.getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout) Chooses one of the specified TextHitInfo instances as a strong caret in the specified TextLayout.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.font.TextLayout.CaretPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.font.TextLayout.CaretPolicy

Packages that use TextLayout.CaretPolicy
java.awt.font Provides classes and interface relating to fonts.

Uses of TextLayout.CaretPolicy in java.awt.font

Fields in java.awt.font declared as TextLayout.CaretPolicy
static TextLayout.CaretPolicy TextLayout.DEFAULT_CARET_POLICY
This CaretPolicy is used when a policy is not specified by the client.

Methods in java.awt.font with parameters of type TextLayout.CaretPolicy
TextHitInfo | TextLayout.getNextRightHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
TextHitInfo | TextLayout.getNextLeftHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the left (top); if no such hit, returns null.
Shape[] | TextLayout.getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) Returns two paths corresponding to the strong and weak caret.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


FontRenderContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class FontRenderContext

java.lang.Object
  |
  +--java.awt.font.FontRenderContext
public class FontRenderContext
extends Object

The FontRenderContext class is a container for the information needed to correctly measure text. The measurement of text can vary because of rules that map outlines to pixels, and rendering hints provided by an application.

One such piece of information is a transform that scales typographical points to pixels. (A point is defined to be exactly 1/72 of an inch, which is slightly different than the traditional mechanical measurement of a point.) A character that is rendered at 12pt on a 600dpi device might have a different size than the same character rendered at 12pt on a 72dpi device because of such factors as rounding to pixel boundaries and hints that the font designer may have specified.

Anti-aliasing and Fractional-metrics specified by an application can also affect the size of a character because of rounding to pixel boundaries.

Typically, instances of FontRenderContext are obtained from a Graphics2D object. A FontRenderContext which is directly constructed will most likely not represent any actual graphics device, and may lead to unexpected or incorrect results.

See Also:
RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.KEY_FRACTIONALMETRICS, Graphics2D.getFontRenderContext(), LineMetrics

Constructor Summary
protected | FontRenderContext() Constructs a new FontRenderContext object.
 | FontRenderContext(AffineTransform tx, boolean isAntiAliased, boolean usesFractionalMetrics) Constructs a FontRenderContext object from an optional AffineTransform and two boolean values that determine if the newly constructed object has anti-aliasing or fractional metrics.
Method Summary
AffineTransform | getTransform() Gets the transform that is used to scale typographical points to pixels in this FontRenderContext.
boolean | isAntiAliased() Gets the text anti-aliasing mode used in this FontRenderContext.
boolean | usesFractionalMetrics() Gets the text fractional metrics mode requested by the application for use in this FontRenderContext.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FontRenderContext

protected FontRenderContext()
Constructs a new FontRenderContext object.

FontRenderContext

public FontRenderContext(AffineTransform tx,
                         boolean isAntiAliased,
                         boolean usesFractionalMetrics)
Constructs a FontRenderContext object from an optional AffineTransform and two boolean values that determine if the newly constructed object has anti-aliasing or fractional metrics.
Parameters:
tx - the transform which is used to scale typographical points to pixels in this FontRenderContext. If null, an identity tranform is used.
isAntiAliased - determines if the newly contructed object has anti-aliasing
usesFractionalMetrics - determines if the newly constructed object uses fractional metrics
Method Detail

getTransform

public AffineTransform getTransform()
Gets the transform that is used to scale typographical points to pixels in this FontRenderContext.
See Also:
AffineTransform

isAntiAliased

public boolean isAntiAliased()
Gets the text anti-aliasing mode used in this FontRenderContext.
See Also:
RenderingHints.KEY_TEXT_ANTIALIASING

usesFractionalMetrics

public boolean usesFractionalMetrics()
Gets the text fractional metrics mode requested by the application for use in this FontRenderContext.
See Also:
RenderingHints.KEY_FRACTIONALMETRICS
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


GlyphJustificationInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class GlyphJustificationInfo

java.lang.Object
  |
  +--java.awt.font.GlyphJustificationInfo
public final class GlyphJustificationInfo
extends Object

The GlyphJustificationInfo class represents information about the justification properties of a glyph. A glyph is the visual representation of one or more characters. Many different glyphs can be used to represent a single character or combination of characters. The four justification properties represented by GlyphJustificationInfo are weight, priority, absorb and limit.

Weight is the overall 'weight' of the glyph in the line. Generally it is proportional to the size of the font. Glyphs with larger weight are allocated a correspondingly larger amount of the change in space.

Priority determines the justification phase in which this glyph is used. All glyphs of the same priority are examined before glyphs of the next priority. If all the change in space can be allocated to these glyphs without exceeding their limits, then glyphs of the next priority are not examined. There are four priorities, kashida, whitespace, interchar, and none. KASHIDA is the first priority examined. NONE is the last priority examined.

Absorb determines whether a glyph absorbs all change in space. Within a given priority, some glyphs may absorb all the change in space. If any of these glyphs are present, no glyphs of later priority are examined.

Limit determines the maximum or minimum amount by which the glyph can change. Left and right sides of the glyph can have different limits.

Each GlyphJustificationInfo represents two sets of metrics, which are growing and shrinking. Growing metrics are used when the glyphs on a line are to be spread apart to fit a larger width. Shrinking metrics are used when the glyphs are to be moved together to fit a smaller width.

Field Summary
boolean | growAbsorb If true, this glyph absorbs all extra space at this and lower priority levels when it grows.
float | growLeftLimit The maximum amount by which the left side of this glyph can grow.
int | growPriority The priority level of this glyph as it is growing.
float | growRightLimit The maximum amount by which the right side of this glyph can grow.
static int | PRIORITY_INTERCHAR The second lowest justification priority.
static int | PRIORITY_KASHIDA The highest justification priority.
static int | PRIORITY_NONE The lowest justification priority.
static int | PRIORITY_WHITESPACE The second highest justification priority.
boolean | shrinkAbsorb If true,this glyph absorbs all remaining shrinkage at this and lower priority levels as it shrinks.
float | shrinkLeftLimit The maximum amount by which the left side of this glyph can shrink (a positive number).
int | shrinkPriority The priority level of this glyph as it is shrinking.
float | shrinkRightLimit The maximum amount by which the right side of this glyph can shrink (a positive number).
float | weight The weight of this glyph.
Constructor Summary
GlyphJustificationInfo(float weight, boolean growAbsorb, int growPriority, float growLeftLimit, float growRightLimit, boolean shrinkAbsorb, int shrinkPriority, float shrinkLeftLimit, float shrinkRightLimit)
Constructs information about the justification properties of a glyph.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PRIORITY_KASHIDA

public static final int PRIORITY_KASHIDA
The highest justification priority.

PRIORITY_WHITESPACE

public static final int PRIORITY_WHITESPACE
The second highest justification priority.

PRIORITY_INTERCHAR

public static final int PRIORITY_INTERCHAR
The second lowest justification priority.

PRIORITY_NONE

public static final int PRIORITY_NONE
The lowest justification priority.

weight

public final float weight
The weight of this glyph.

growPriority

public final int growPriority
The priority level of this glyph as it is growing.

growAbsorb

public final boolean growAbsorb
If true, this glyph absorbs all extra space at this and lower priority levels when it grows.

growLeftLimit

public final float growLeftLimit
The maximum amount by which the left side of this glyph can grow.

growRightLimit

public final float growRightLimit
The maximum amount by which the right side of this glyph can grow.

shrinkPriority

public final int shrinkPriority
The priority level of this glyph as it is shrinking.

shrinkAbsorb

public final boolean shrinkAbsorb
If true,this glyph absorbs all remaining shrinkage at this and lower priority levels as it shrinks.

shrinkLeftLimit

public final float shrinkLeftLimit
The maximum amount by which the left side of this glyph can shrink (a positive number).

shrinkRightLimit

public final float shrinkRightLimit
The maximum amount by which the right side of this glyph can shrink (a positive number).
Constructor Detail

GlyphJustificationInfo

public GlyphJustificationInfo(float weight,
                              boolean growAbsorb,
                              int growPriority,
                              float growLeftLimit,
                              float growRightLimit,
                              boolean shrinkAbsorb,
                              int shrinkPriority,
                              float shrinkLeftLimit,
                              float shrinkRightLimit)
Constructs information about the justification properties of a glyph.
Parameters:
weight - the weight of this glyph when allocating space. Must be non-negative.
growAbsorb - if true this glyph absorbs all extra space at this priority and lower priority levels when it grows
growPriority - the priority level of this glyph when it grows
growLeftLimit - the maximum amount by which the left side of this glyph can grow. Must be non-negative.
growRightLimit - the maximum amount by which the right side of this glyph can grow. Must be non-negative.
shrinkAbsorb - if true, this glyph absorbs all remaining shrinkage at this and lower priority levels when it shrinks
shrinkPriority - the priority level of this glyph when it shrinks
shrinkLeftLimit - the maximum amount by which the left side of this glyph can shrink. Must be non-negative.
shrinkRightLimit - the maximum amount by which the right side of this glyph can shrink. Must be non-negative.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GlyphMetrics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class GlyphMetrics

java.lang.Object
  |
  +--java.awt.font.GlyphMetrics
public final class GlyphMetrics
extends Object

The GlyphMetrics class represents infomation for a single glyph. A glyph is the visual representation of one or more characters. Many different glyphs can be used to represent a single character or combination of characters. GlyphMetrics instances are produced by Font and are applicable to a specific glyph in a particular Font.

Glyphs are either STANDARD, LIGATURE, COMBINING, or COMPONENT.

  • STANDARD glyphs are commonly used to represent single characters.
  • LIGATURE glyphs are used to represent sequences of characters.
  • COMPONENT glyphs in a GlyphVector do not correspond to a particular character in a text model. Instead, COMPONENT glyphs are added for typographical reasons, such as Arabic justification.
  • COMBINING glyphs embellish STANDARD or LIGATURE glyphs, such as accent marks. Carets do not appear before COMBINING glyphs.

Other metrics available through GlyphMetrics are the advance, bounds, and left and right side bearings.

The advance of a glyph is the distance from the glyph's origin to the origin of the next glyph. Note that, in a GlyphVector, the distance from a glyph to its following glyph might not be the glyph's advance.

The bounds is the smallest rectangle that completely contains the visible portion of the glyph. The bounds rectangle is relative to the glyph's origin. The left-side bearing is the distance from the glyph origin to the left of its bounds rectangle. If the left-side bearing is negative, part of the glyph is drawn to the left of its origin. The right-side bearing is the distance from the right side of the bounds rectangle to the next glyph origin (the origin plus the advance). If negative, part of the glyph is drawn to the right of the next glyph's origin.

Although instances of GlyphMetrics can be directly constructed, they are almost always obtained from a GlyphVector. Once constructed, GlyphMetrics objects are immutable.

Example:

Querying a Font for glyph information

 Font font = ...;
 int glyphIndex = ...;
 GlyphMetrics metrics = GlyphVector.getGlyphMetrics(glyphIndex);
 int isStandard = metrics.isStandard();
 float glyphAdvance = metrics.getAdvance();

See Also:
Font, GlyphVector

Field Summary
static byte | COMBINING Indicates a glyph that represents a combining character, such as an umlaut.
static byte | COMPONENT Indicates a glyph with no corresponding character in the backing store.
static byte | LIGATURE Indicates a glyph that represents multiple characters as a ligature, for example 'fi' or 'ffi'.
static byte | STANDARD Indicates a glyph that represents a single standard character.
static byte | WHITESPACE Indicates a glyph with no visual representation.
Constructor Summary
GlyphMetrics(float advance, Rectangle2D bounds, byte glyphType)
Constructs a GlyphMetrics object.
Method Summary
float | getAdvance() Returns the advance width or height of the glyph.
Rectangle2D | getBounds2D() Returns the black box bounds of the glyph.
float | getLSB() Returns the left (top) side bearing of the glyph.
float | getRSB() Returns the right (bottom) side bearing of the glyph.
int | getType() Returns the raw glyph type code.
boolean | isCombining() Returns true if this is a combining glyph.
boolean | isComponent() Returns true if this is a component glyph.
boolean | isLigature() Returns true if this is a ligature glyph.
boolean | isStandard() Returns true if this is a standard glyph.
boolean | isWhitespace() Returns true if this is a whitespace glyph.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

STANDARD

public static final byte STANDARD
Indicates a glyph that represents a single standard character.

LIGATURE

public static final byte LIGATURE
Indicates a glyph that represents multiple characters as a ligature, for example 'fi' or 'ffi'. It is followed by filler glyphs for the remaining characters. Filler and combining glyphs can be intermixed to control positioning of accent marks on the logically preceeding ligature.

COMBINING

public static final byte COMBINING
Indicates a glyph that represents a combining character, such as an umlaut. There is no caret position between this glyph and the preceeding glyph.

COMPONENT

public static final byte COMPONENT
Indicates a glyph with no corresponding character in the backing store. The glyph is associated with the character represented by the logicaly preceeding non-component glyph. This is used for kashida justification or other visual modifications to existing glyphs. There is no caret position between this glyph and the preceeding glyph.

WHITESPACE

public static final byte WHITESPACE
Indicates a glyph with no visual representation. It can be added to the other code values to indicate an invisible glyph.
Constructor Detail

GlyphMetrics

public GlyphMetrics(float advance,
                    Rectangle2D bounds,
                    byte glyphType)
Constructs a GlyphMetrics object.
Parameters:
advance - the advance width or height of the glyph
bounds - the black box bounds of the glyph
glyphType - the type of the glyph
Method Detail

getAdvance

public float getAdvance()
Returns the advance width or height of the glyph.
Returns:
the advance of the glyph.

getBounds2D

public Rectangle2D getBounds2D()
Returns the black box bounds of the glyph.
Returns:
a Rectangle2D that is the bounds of the glyph.

getLSB

public float getLSB()
Returns the left (top) side bearing of the glyph.

This is the distance from 0, 0 to the left (top) of the glyph bounds. If the bounds of the glyph is to the left of (above) the origin, the LSB is negative.

Returns:
the left side bearing of the glyph.

getRSB

public float getRSB()
Returns the right (bottom) side bearing of the glyph.

This is the distance from the right (bottom) of the glyph bounds to the advance. If the bounds of the glyph is to the right of (below) the advance, the RSB is negative.

Returns:
the right side bearing of the glyph.

getType

public int getType()
Returns the raw glyph type code.
Returns:
the raw glyph type code.

isStandard

public boolean isStandard()
Returns true if this is a standard glyph.
Returns:
true if this is a standard glyph; false otherwise.

isLigature

public boolean isLigature()
Returns true if this is a ligature glyph.
Returns:
true if this is a ligature glyph; false otherwise.

isCombining

public boolean isCombining()
Returns true if this is a combining glyph.
Returns:
true if this is a combining glyph; false otherwise.

isComponent

public boolean isComponent()
Returns true if this is a component glyph.
Returns:
true if this is a component glyph; false otherwise.

isWhitespace

public boolean isWhitespace()
Returns true if this is a whitespace glyph.
Returns:
true if this is a whitespace glyph; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GlyphVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class GlyphVector

java.lang.Object
  |
  +--java.awt.font.GlyphVector
All Implemented Interfaces:
Cloneable
public abstract class GlyphVector
extends Object
implements Cloneable

A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.

The GlyphVector does not attempt any interpretation of the sequence of glyphs it contains. Relationships between adjacent glyphs in sequence are solely used to determine the placement of the glyphs in the visual coordinate space.

Instances of GlyphVector are created by a Font.

In a text processing application that can cache intermediate representations of text, creation and subsequent caching of a GlyphVector for use during rendering is the fastest method to present the visual representation of characters to a user.

A GlyphVector is associated with exactly one Font, and can provide data useful only in relation to this Font. In addition, metrics obtained from a GlyphVector are not generally geometrically scaleable since the pixelization and spacing are dependent on grid-fitting algorithms within a Font. To facilitate accurate measurement of a GlyphVector and its component glyphs, you must specify a scaling transform, anti-alias mode, and fractional metrics mode when creating the GlyphVector. These characteristics can be derived from the destination device.

For each glyph in the GlyphVector, you can obtain:

  • the position of the glyph
  • the transform associated with the glyph
  • the metrics of the glyph in the context of the GlyphVector. The metrics of the glyph may be different under different transforms, application specified rendering hints, and the specific instance of the glyph within the GlyphVector.

Altering the data used to create the GlyphVector does not alter the state of the GlyphVector.

Methods are provided to create new GlyphVector objects which are the result of editing operations on the GlyphVector, such as glyph insertion and deletion. These methods are most appropriate for applications that are forming combinations such as ligatures from existing glyphs or are breaking such combinations into their component parts for visual presentation.

Methods are provided to create new GlyphVector objects that are the result of specifying new positions for the glyphs within the GlyphVector. These methods are most appropriate for applications that are performing justification operations for the presentation of the glyphs.

Methods are provided to return both the visual and logical bounds of the entire GlyphVector or of individual glyphs within the GlyphVector.

Methods are provided to return a Shape for the GlyphVector, and for individual glyphs within the GlyphVector.

See Also:
Font, GlyphMetrics, TextLayout

Constructor Summary
GlyphVector()
Method Summary
abstract boolean | equals(GlyphVector set) Tests if the specified GlyphVector exactly equals this GlyphVector.
abstract Font | getFont() Returns the Font associated with this GlyphVector.
abstract FontRenderContext | getFontRenderContext() Returns the FontRenderContext associated with this GlyphVector.
abstract int | getGlyphCode(int glyphIndex) Returns the glyphcode of the specified glyph.
abstract int[] | getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn) Returns an array of glyphcodes for the specified glyphs.
abstract GlyphJustificationInfo | getGlyphJustificationInfo(int glyphIndex) Returns the justification information for the glyph at the specified index into this GlyphVector.
abstract Shape | getGlyphLogicalBounds(int glyphIndex) Returns the logical bounds of the specified glyph within this GlyphVector.
abstract GlyphMetrics | getGlyphMetrics(int glyphIndex) Returns the metrics of the glyph at the specified index into this GlyphVector.
abstract Shape | getGlyphOutline(int glyphIndex) Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
abstract Point2D | getGlyphPosition(int glyphIndex) Returns the position of the specified glyph within this GlyphVector.
abstract float[] | getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn) Returns an array of glyph positions for the specified glyphs.
abstract AffineTransform | getGlyphTransform(int glyphIndex) Gets the transform of the specified glyph within this GlyphVector.
abstract Shape | getGlyphVisualBounds(int glyphIndex) Returns the visual bounds of the specified glyph within the GlyphVector.
abstract Rectangle2D | getLogicalBounds() Returns the logical bounds of this GlyphVector.
abstract int | getNumGlyphs() Returns the number of glyphs in this GlyphVector.
abstract Shape | getOutline() Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
abstract Shape | getOutline(float x, float y) Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.
abstract Rectangle2D | getVisualBounds() Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector.
abstract void | performDefaultLayout() Assigns default positions to each glyph in this GlyphVector.
abstract void | setGlyphPosition(int glyphIndex, Point2D newPos) Sets the position of the specified glyph within this GlyphVector.
abstract void | setGlyphTransform(int glyphIndex, AffineTransform newTX) Sets the transform of the specified glyph within this GlyphVector.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GlyphVector

public GlyphVector()
Method Detail

getFont

public abstract Font getFont()
Returns the Font associated with this GlyphVector.
See Also:
Font

getFontRenderContext

public abstract FontRenderContext getFontRenderContext()
Returns the FontRenderContext associated with this GlyphVector.
Returns:
FontRenderContext used to create this GlyphVector.
See Also:
FontRenderContext, Font

performDefaultLayout

public abstract void performDefaultLayout()
Assigns default positions to each glyph in this GlyphVector. No shaping, reordering, or contextual substitution is performed.

getNumGlyphs

public abstract int getNumGlyphs()
Returns the number of glyphs in this GlyphVector. This information is used to create arrays that are to be filled with results of other information retrieval operations.
Returns:
number of glyphs in this GlyphVector.

getGlyphCode

public abstract int getGlyphCode(int glyphIndex)
Returns the glyphcode of the specified glyph. This return value is meaningless to anything other than a Font object and can be used to ask the Font object about the existence of ligatures and other context sensitive information.
Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve the glyphcode.
Returns:
the glyphcode of the glyph corresponding the the specified glyphIndex.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphCodes

public abstract int[] getGlyphCodes(int beginGlyphIndex,
                                    int numEntries,
                                    int[] codeReturn)
Returns an array of glyphcodes for the specified glyphs. The contents of this return value are meaningless to anything other than a Font and can be used to ask the Font about the existence of ligatures and other context sensitive information. This method is used for convenience and performance when processing glyphcodes. If no array is passed in, an array is created.
Parameters:
beginGlyphIndex - the index into this GlyphVector at which to start retrieving glyphcodes for the corresponding glyphs
numEntries - the number of glyphs to retrieve
codeReturn - the array that receives the glyphcodes and is then returned
Returns:
an array of glyphcodes for the specified glyphs.
Throws:
IllegalArgumentException - if numEntries is less than 0
IndexOutOfBoundsException - if beginGlyphIndex is less than 0
IndexOutOfBoundsException - if the sum of beginGlyphIndex and numEntries is greater than the number of glyphs in this GlyphVector

getLogicalBounds

public abstract Rectangle2D getLogicalBounds()
Returns the logical bounds of this GlyphVector. This method is used when positioning this GlyphVector in relation to visually adjacent GlyphVector objects.
Returns:
a Rectangle2D that is the logical bounds of this GlyphVector.

getVisualBounds

public abstract Rectangle2D getVisualBounds()
Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector.
Returns:
a Rectangle2D that is the tightest bounds of this GlyphVector.

getOutline

public abstract Shape getOutline()
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
Returns:
a Shape that is the outline of this GlyphVector.

getOutline

public abstract Shape getOutline(float x,
                                 float y)
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.
Parameters:
x, y - the coordinates of the location of the outline Shape
Returns:
a Shape that is the outline of this GlyphVector, offset to the specified coordinates.

getGlyphOutline

public abstract Shape getGlyphOutline(int glyphIndex)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
Parameters:
glyphIndex - the index into this GlyphVector
Returns:
a Shape that is the outline of the glyph at the specified glyphIndex of this GlyphVector.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphPosition

public abstract Point2D getGlyphPosition(int glyphIndex)
Returns the position of the specified glyph within this GlyphVector. This position corresponds to the leading edge of the baseline for the glyph. If glyphIndex equals the number of of glyphs in this GlyphVector, this method gets the position after the last glyph and this position is used to define the advance of the entire GlyphVector.
Parameters:
glyphIndex - the index into this GlyphVector
Returns:
a Point2D object that is the position of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than the number of glyphs in this GlyphVector

setGlyphPosition

public abstract void setGlyphPosition(int glyphIndex,
                                      Point2D newPos)
Sets the position of the specified glyph within this GlyphVector. This position corresponds to the leading edge of the baseline for the glyph. If glyphIndex equals the number of of glyphs in this GlyphVector, this method sets the position after the last glyph and this position is used to define the advance of the entire GlyphVector.
Parameters:
glyphIndex - the index into this GlyphVector
newPos - the Point2D at which to position the glyph at the specified glyphIndex
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than the number of glyphs in this GlyphVector

getGlyphTransform

public abstract AffineTransform getGlyphTransform(int glyphIndex)
Gets the transform of the specified glyph within this GlyphVector. The transform is relative to the glyph position. If no special transform has been applied, null can be returned. Such a transform would be an identity transform.
Parameters:
glyphIndex - the index into this GlyphVector
Returns:
an AffineTransform that is the transform of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

setGlyphTransform

public abstract void setGlyphTransform(int glyphIndex,
                                       AffineTransform newTX)
Sets the transform of the specified glyph within this GlyphVector. The transform is relative to the glyph position. A null argument for newTX indicates that no special transform is applied for the specified glyph. This method can be used to rotate, mirror, translate and scale the glyph. Adding a transform can result in signifant performance changes.
Parameters:
glyphIndex - the index into this GlyphVector
newTx - the specified transform that the transform of the glyph at the specified glyphIndex is set to
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphPositions

public abstract float[] getGlyphPositions(int beginGlyphIndex,
                                          int numEntries,
                                          float[] positionReturn)
Returns an array of glyph positions for the specified glyphs. The position of each glyph corresponds to the leading edge of the baseline for that glyph. This method is used for convenience and performance when processing glyph positions. If no array is passed in, a new array is created. Even numbered array entries beginning with position zero are the X coordinates of the glyph numbered beginGlyphIndex + position/2. Odd numbered array entries beginning with position one are the Y coordinates of the glyph numbered beginGlyphIndex + (position-1)/2. If beginGlyphIndex equals the number of of glyphs in this GlyphVector, this method gets the position after the last glyph and this position is used to define the advance of the entire GlyphVector.
Parameters:
beginGlyphIndex - the index at which to begin retrieving glyph positions
numEntries - the number of glyphs to retrieve
positionReturn - the array that receives the glyph positions and is then returned.
Returns:
an array of glyph positions specified by beginGlyphIndex and numEntries.
Throws:
IllegalArgumentException - if numEntries is less than 0
IndexOutOfBoundsException - if beginGlyphIndex is less than 0
IndexOutOfBoundsException - if the sum of beginGlyphIndex and numEntries is greater than the number of glyphs in this GlyphVector plus one

getGlyphLogicalBounds

public abstract Shape getGlyphLogicalBounds(int glyphIndex)
Returns the logical bounds of the specified glyph within this GlyphVector. These logical bounds have a total of four edges, with two edges parallel to the baseline under the glyph's transform and the other two edges are shared with adjacent glyphs if they are present. This method is useful for hit-testing of the specified glyph, positioning of a caret at the leading or trailing edge of a glyph, and for drawing a highlight region around the specified glyph.
Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve its logical bounds
Returns:
a Shape that is the logical bounds of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector
See Also:
getGlyphVisualBounds(int)

getGlyphVisualBounds

public abstract Shape getGlyphVisualBounds(int glyphIndex)
Returns the visual bounds of the specified glyph within the GlyphVector. These visual bounds have a total of four edges, representing the tightest polygon enclosing non-background pixels in the rendered representation of the glyph whose edges are parallel to the edges of the logical bounds. Useful for hit-testing of the specified glyph.
Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve its visual bounds
Returns:
a Shape that is the visual bounds of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector
See Also:
getGlyphLogicalBounds(int)

getGlyphMetrics

public abstract GlyphMetrics getGlyphMetrics(int glyphIndex)
Returns the metrics of the glyph at the specified index into this GlyphVector.
Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve its metrics
Returns:
a GlyphMetrics object that represents the metrics of the glyph at the specified glyphIndex into this GlyphVector.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphJustificationInfo

public abstract GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
Returns the justification information for the glyph at the specified index into this GlyphVector.
Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve its justification properties
Returns:
a GlyphJustificationInfo object that represents the justification properties of the glyph at the specified glyphIndex into this GlyphVector.
Throws:
IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

equals

public abstract boolean equals(GlyphVector set)
Tests if the specified GlyphVector exactly equals this GlyphVector.
Parameters:
set - the specified GlyphVector to test
Returns:
true if the specified GlyphVector equals this GlyphVector; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GraphicAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class GraphicAttribute

java.lang.Object
  |
  +--java.awt.font.GraphicAttribute
Direct Known Subclasses:
ImageGraphicAttribute, ShapeGraphicAttribute
public abstract class GraphicAttribute
extends Object

This class is used with the CHAR_REPLACEMENT attribute.

The GraphicAttribute class represents a graphic embedded in text. Clients subclass this class to implement their own char replacement graphics. Clients wishing to embed shapes and images in text need not subclass this class. Instead, clients can use the ShapeGraphicAttribute and ImageGraphicAttribute classes.

Subclasses must ensure that their objects are immutable once they are constructed. Mutating a GraphicAttribute that is used in a TextLayout results in undefined behavior from the TextLayout.

Field Summary
static int | BOTTOM_ALIGNMENT Aligns bottom of graphic to bottom of line.
static int | CENTER_BASELINE Aligns origin of graphic to center baseline of line.
static int | HANGING_BASELINE Aligns origin of graphic to hanging baseline of line.
static int | ROMAN_BASELINE Aligns origin of graphic to roman baseline of line.
static int | TOP_ALIGNMENT Aligns top of graphic to top of line.
Constructor Summary
protected GraphicAttribute(int alignment)
Constructs a GraphicAttribute.
Method Summary
abstract void | draw(Graphics2D graphics, float x, float y) Renders this GraphicAttribute at the specified location.
abstract float | getAdvance() Returns the advance of this GraphicAttribute.
int | getAlignment() Returns the alignment of this GraphicAttribute.
abstract float | getAscent() Returns the ascent of this GraphicAttribute.
Rectangle2D | getBounds() Returns a Rectangle2D that encloses all of the bits drawn by this GraphicAttribute relative to the rendering position.
abstract float | getDescent() Returns the descent of this GraphicAttribute.
GlyphJustificationInfo | getJustificationInfo() Returns the justification information for this GraphicAttribute.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TOP_ALIGNMENT

public static final int TOP_ALIGNMENT
Aligns top of graphic to top of line.

BOTTOM_ALIGNMENT

public static final int BOTTOM_ALIGNMENT
Aligns bottom of graphic to bottom of line.

ROMAN_BASELINE

public static final int ROMAN_BASELINE
Aligns origin of graphic to roman baseline of line.

CENTER_BASELINE

public static final int CENTER_BASELINE
Aligns origin of graphic to center baseline of line.

HANGING_BASELINE

public static final int HANGING_BASELINE
Aligns origin of graphic to hanging baseline of line.
Constructor Detail

GraphicAttribute

protected GraphicAttribute(int alignment)
Constructs a GraphicAttribute. Subclasses use this to define the alignment of the graphic.
Method Detail

getAscent

public abstract float getAscent()
Returns the ascent of this GraphicAttribute. A graphic can be rendered above its ascent.
Returns:
the ascent of this GraphicAttribute.
See Also:
getBounds()

getDescent

public abstract float getDescent()
Returns the descent of this GraphicAttribute. A graphic can be rendered below its descent.
Returns:
the descent of this GraphicAttribute.
See Also:
getBounds()

getAdvance

public abstract float getAdvance()
Returns the advance of this GraphicAttribute. The GraphicAttribute object's advance is the distance from the point at which the graphic is rendered and the point where the next character or graphic is rendered. A graphic can be rendered beyond its advance
Returns:
the advance of this GraphicAttribute.
See Also:
getBounds()

getBounds

public Rectangle2D getBounds()
Returns a Rectangle2D that encloses all of the bits drawn by this GraphicAttribute relative to the rendering position. A graphic may be rendered beyond its origin, ascent, descent, or advance; but if it is, this method's implementation must indicate where the graphic is rendered. Default bounds is the rectangle (0, -ascent, advance, ascent+descent).
Returns:
a Rectangle2D that encloses all of the bits rendered by this GraphicAttribute.

draw

public abstract void draw(Graphics2D graphics,
                          float x,
                          float y)
Renders this GraphicAttribute at the specified location.
Parameters:
graphics - the Graphics2D into which to render the graphic
x, y - the user-space coordinates where the graphic is rendered

getAlignment

public final int getAlignment()
Returns the alignment of this GraphicAttribute. Alignment can be to a particular baseline, or to the absolute top or bottom of a line.
Returns:
the alignment of this GraphicAttribute.

getJustificationInfo

public GlyphJustificationInfo getJustificationInfo()
Returns the justification information for this GraphicAttribute. Subclasses can override this method to provide different justification information.
Returns:
a GlyphJustificationInfo object that contains the justification information for this GraphicAttribute.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageGraphicAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class ImageGraphicAttribute

java.lang.Object
  |
  +--java.awt.font.GraphicAttribute
        |
        +--java.awt.font.ImageGraphicAttribute
public final class ImageGraphicAttribute
extends GraphicAttribute

The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.

See Also:
GraphicAttribute

Fields inherited from class java.awt.font.GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
Constructor Summary
ImageGraphicAttribute(Image image, int alignment)
Constucts an ImageGraphicAttribute from the specified Image.
ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
Constructs an ImageGraphicAttribute from the specified Image.
Method Summary
void | draw(Graphics2D graphics, float x, float y) Renders the graphic at the specified location.
boolean | equals(ImageGraphicAttribute rhs) Compares this ImageGraphicAttribute to the specified ImageGraphicAttribute.
boolean | equals(Object rhs) Compares this ImageGraphicAttribute to the specified Object.
float | getAdvance() Returns the advance of this ImageGraphicAttribute.
float | getAscent() Returns the ascent of this ImageGraphicAttribute.
Rectangle2D | getBounds() Returns a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute, relative to the rendering position.
float | getDescent() Returns the descent of this ImageGraphicAttribute
int | hashCode() Returns a hashcode for this ImageGraphicAttribute.
Methods inherited from class java.awt.font.GraphicAttribute
getAlignment, getJustificationInfo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ImageGraphicAttribute

public ImageGraphicAttribute(Image image,
                             int alignment)
Constucts an ImageGraphicAttribute from the specified Image. The origin is at (0, 0).
Parameters:
image - the Image rendered by this ImageGraphicAttribute. This object keeps a reference to image.
alignment - one of the alignments from this ImageGraphicAttribute

ImageGraphicAttribute

public ImageGraphicAttribute(Image image,
                             int alignment,
                             float originX,
                             float originY)
Constructs an ImageGraphicAttribute from the specified Image. The point (originX, originY) in the Image appears at the origin of the ImageGraphicAttribute within the text.
Parameters:
image - the Image rendered by this ImageGraphicAttribute. This object keeps a reference to image.
alignment - one of the alignments from this ImageGraphicAttribute
originX, originY - the coordinates of the point within the Image that appears at the origin of the ImageGraphicAttribute in the text line.
Method Detail

getAscent

public float getAscent()
Returns the ascent of this ImageGraphicAttribute. The ascent of an ImageGraphicAttribute is the distance from the top of the image to the origin.
Overrides:
getAscent in class GraphicAttribute
Returns:
the ascent of this ImageGraphicAttribute.

getDescent

public float getDescent()
Returns the descent of this ImageGraphicAttributeImageGraphicAttribute is the distance from the origin to the bottom of the image.
Overrides:
getDescent in class GraphicAttribute
Returns:
the descent of this ImageGraphicAttribute.

getAdvance

public float getAdvance()
Returns the advance of this ImageGraphicAttribute. The advance of an ImageGraphicAttribute is the distance from the origin to the right edge of the image.
Overrides:
getAdvance in class GraphicAttribute
Returns:
the advance of this ImageGraphicAttribute.

getBounds

public Rectangle2D getBounds()
Returns a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute, relative to the rendering position. A graphic can be rendered beyond its origin, ascent, descent, or advance; but if it is, this method's implementation must indicate where the graphic is rendered.
Overrides:
getBounds in class GraphicAttribute
Returns:
a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute.

draw

public void draw(Graphics2D graphics,
                 float x,
                 float y)
Renders the graphic at the specified location.
Overrides:
draw in class GraphicAttribute
Parameters:
graphics - the Graphics2D into which to render the graphic
x - the user-space coordinates where the graphic is rendered

hashCode

public int hashCode()
Returns a hashcode for this ImageGraphicAttribute.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object rhs)
Compares this ImageGraphicAttribute to the specified Object.
Overrides:
equals in class Object
Parameters:
rhs - the Object to compare for equality
Returns:
true if this ImageGraphicAttribute equals rhs; false otherwise.

equals

public boolean equals(ImageGraphicAttribute rhs)
Compares this ImageGraphicAttribute to the specified ImageGraphicAttribute.
Parameters:
rhs - the ImageGraphicAttribute to compare for equality
Returns:
true if this ImageGraphicAttribute equals rhs; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineBreakMeasurer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class LineBreakMeasurer

java.lang.Object
  |
  +--java.awt.font.LineBreakMeasurer
public final class LineBreakMeasurer
extends Object

The LineBreakMeasurer class allows styled text to be broken into lines (or segments) that fit within a particular visual advance. This is useful for clients who wish to display a paragraph of text that fits within a specific width, called the wrapping width.

LineBreakMeasurer is constructed with an iterator over styled text. The iterator's range should be a single paragraph in the text. LineBreakMeasurer maintains a position in the text for the start of the next text segment. Initially, this position is the start of text. Paragraphs are assigned an overall direction (either left-to-right or right-to-left) according to the bidirectional formatting rules. All segments obtained from a paragraph have the same direction as the paragraph.

Segments of text are obtained by calling the method nextLayout, which returns a TextLayout representing the text that fits within the wrapping width. The nextLayout method moves the current position to the end of the layout returned from nextLayout.

LineBreakMeasurer implements the most commonly used line-breaking policy: Every word that fits within the wrapping width is placed on the line. If the first word does not fit, then all of the characters that fit within the wrapping width are placed on the line. At least one character is placed on each line.

The TextLayout instances returned by LineBreakMeasurer treat tabs like 0-width spaces. Clients who wish to obtain tab-delimited segments for positioning should use the overload of nextLayout which takes a limiting offset in the text. The limiting offset should be the first character after the tab. The TextLayout objects returned from this method end at the limit provided (or before, if the text between the current position and the limit won't fit entirely within the wrapping width).

Clients who are laying out tab-delimited text need a slightly different line-breaking policy after the first segment has been placed on a line. Instead of fitting partial words in the remaining space, they should place words which don't fit in the remaining space entirely on the next line. This change of policy can be requested in the overload of nextLayout which takes a boolean parameter. If this parameter is true, nextLayout returns null if the first word won't fit in the given space. See the tab sample below.

In general, if the text used to construct the LineBreakMeasurer changes, a new LineBreakMeasurer must be constructed to reflect the change. (The old LineBreakMeasurer continues to function properly, but it won't be aware of the text change.) Nevertheless, if the text change is the insertion or deletion of a single character, an existing LineBreakMeasurer can be 'updated' by calling insertChar or deleteChar. Updating an existing LineBreakMeasurer is much faster than creating a new one. Clients who modify text based on user typing should take advantage of these methods.

Examples:

Rendering a paragraph in a component

 public void paint(Graphics graphics) {

     Point2D pen = new Point2D(10, 20);

     // let styledText be an AttributedCharacterIterator containing at least
     // one character

     LineBreakMeasurer measurer = new LineBreakMeasurer(styledText);
     float wrappingWidth = getSize().width - 15;

     while (measurer.getPosition()

Rendering text with tabs. For simplicity, the overall text direction is assumed to be left-to-right

 public void paint(Graphics graphics) {

     float leftMargin = 10, rightMargin = 310;
     float[] tabStops = { 100, 250 };

     // assume styledText is an AttributedCharacterIterator, and the number
     // of tabs in styledText is tabCount

     int[] tabLocations = new int[tabCount+1];

     int i = 0;
     for (char c = styledText.first(); c != styledText.DONE; c = styledText.next()) {
         if (c == '\t') {
             tabLocations[i++] = styledText.getIndex();
         }
     }
     tabLocations[tabCount] = styledText.getEndIndex() - 1;

     // Now tabLocations has an entry for every tab's offset in
     // the text.  For convenience, the last entry is tabLocations
     // is the offset of the last character in the text.

     LineBreakMeasurer measurer = new LineBreakMeasurer(styledText);
     int currentTab = 0;
     float verticalPos = 20;

     while (measurer.getPosition() = tabStops[tabStops.length-1])
                 lineComplete = true;

             if (!lineComplete) {
                 // move to next tab stop
                 int j;
                 for (j=0; horizontalPos >= tabStops[j]; j++) {}
                 horizontalPos = tabStops[j];
             }
         }

         verticalPos += maxAscent;

         Enumeration layoutEnum = layouts.elements();
         Enumeration positionEnum = penPositions.elements();

         // now iterate through layouts and draw them
         while (layoutEnum.hasMoreElements()) {
             TextLayout nextLayout = (TextLayout) layoutEnum.nextElement();
             Float nextPosition = (Float) positionEnum.nextElement();
             nextLayout.draw(graphics, nextPosition.floatValue(), verticalPos);
         }

         verticalPos += maxDescent;
     }
 }

See Also:
TextLayout

Constructor Summary
LineBreakMeasurer(AttributedCharacterIterator text, BreakIterator breakIter, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
LineBreakMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
Method Summary
void | deleteChar(AttributedCharacterIterator newParagraph, int deletePos) Updates this LineBreakMeasurer after a single character is deleted from the text, and sets the current position to the beginning of the paragraph.
int | getPosition() Returns the current position of this LineBreakMeasurer.
void | insertChar(AttributedCharacterIterator newParagraph, int insertPos) Updates this LineBreakMeasurer after a single character is inserted into the text, and sets the current position to the beginning of the paragraph.
TextLayout | nextLayout(float wrappingWidth) Returns the next layout, and updates the current position.
TextLayout | nextLayout(float wrappingWidth, int offsetLimit, boolean requireNextWord) Returns the next layout, and updates the current position.
int | nextOffset(float wrappingWidth) Returns the position at the end of the next layout.
int | nextOffset(float wrappingWidth, int offsetLimit, boolean requireNextWord) Returns the position at the end of the next layout.
void | setPosition(int newPosition) Sets the current position of this LineBreakMeasurer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineBreakMeasurer

public LineBreakMeasurer(AttributedCharacterIterator text,
                         FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
Parameters:
text - the text for which this LineBreakMeasurer produces TextLayout objects. The text must contain at least one character. If the text available through iter changes, further calls to this LineBreakMeasurer instance are undefined (except, in some cases, when insertChar or deleteChar are invoked afterward - see below).
frc - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the LineBreakMeasurer and user space.
See Also:
insertChar(java.text.AttributedCharacterIterator, int), deleteChar(java.text.AttributedCharacterIterator, int)

LineBreakMeasurer

public LineBreakMeasurer(AttributedCharacterIterator text,
                         BreakIterator breakIter,
                         FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
Parameters:
text - the text for which this LineBreakMeasurer produces TextLayout objects. The text must contain at least one character. If the text available through iter changes, further calls to this LineBreakMeasurer instance are undefined (except, in some cases, when insertChar or deleteChar are invoked afterward - see below).
breakIter - the BreakIterator which defines line breaks
frc - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the LineBreakMeasurer and user space.
See Also:
insertChar(java.text.AttributedCharacterIterator, int), deleteChar(java.text.AttributedCharacterIterator, int)
Method Detail

nextOffset

public int nextOffset(float wrappingWidth)
Returns the position at the end of the next layout. Does NOT update the current position of this LineBreakMeasurer.
Parameters:
wrappingWidth - the maximum visible advance permitted for the text in the next layout
Returns:
an offset in the text representing the limit of the next TextLayout.

nextOffset

public int nextOffset(float wrappingWidth,
                      int offsetLimit,
                      boolean requireNextWord)
Returns the position at the end of the next layout. Does NOT update the current position of this LineBreakMeasurer.
Parameters:
wrappingWidth - the maximum visible advance permitted for the text in the next layout
offsetLimit - the first character that can not be included in the next layout, even if the text after the limit would fit within the wrapping width. offsetLimit must be greater than the current position.
requireNextWord - if true, the current position that is returned if the entire next word does not fit within wrappingWidth. If false, the offset returned is at least one greater than the current position.
Returns:
an offset in the text representing the limit of the next TextLayout.

nextLayout

public TextLayout nextLayout(float wrappingWidth)
Returns the next layout, and updates the current position.
Parameters:
wrappingWidth - the maximum visible advance permitted for the text in the next layout
Returns:
a TextLayout, beginning at the current position, which represents the next line fitting within wrappingWidth.

nextLayout

public TextLayout nextLayout(float wrappingWidth,
                             int offsetLimit,
                             boolean requireNextWord)
Returns the next layout, and updates the current position.
Parameters:
wrappingWidth - the maximum visible advance permitted for the text in the next layout
offsetLimit - the first character that can not be included in the next layout, even if the text after the limit would fit within the wrapping width. offsetLimit must be greater than the current position.
requireNextWord - if true, and if the entire word at the current position does not fit within the wrapping width, null is returned. If false, a valid layout is returned that includes at least the character at the current position.
Returns:
a TextLayout, beginning at the current position, that represents the next line fitting within wrappingWidth. If the current position is at the end of the text used by this LineBreakMeasurer, null is returned.

getPosition

public int getPosition()
Returns the current position of this LineBreakMeasurer.
Returns:
the current position of this LineBreakMeasurer.
See Also:
setPosition(int)

setPosition

public void setPosition(int newPosition)
Sets the current position of this LineBreakMeasurer.
Parameters:
newPosition - the current position of this LineBreakMeasurer. The position should be within the text used to construct this LineBreakMeasurer (or in the text most recently passed to insertChar or deleteChar.
See Also:
getPosition()

insertChar

public void insertChar(AttributedCharacterIterator newParagraph,
                       int insertPos)
Updates this LineBreakMeasurer after a single character is inserted into the text, and sets the current position to the beginning of the paragraph.
Parameters:
newParagraph - the text after the insertion
insertPos - the position in the text at which the character is inserted
See Also:
deleteChar(java.text.AttributedCharacterIterator, int)

deleteChar

public void deleteChar(AttributedCharacterIterator newParagraph,
                       int deletePos)
Updates this LineBreakMeasurer after a single character is deleted from the text, and sets the current position to the beginning of the paragraph.
Parameters:
newParagraph - the text after the deletion
deletePos - the position in the text at which the character is deleted
See Also:
insertChar(java.text.AttributedCharacterIterator, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineMetrics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class LineMetrics

java.lang.Object
  |
  +--java.awt.font.LineMetrics
public abstract class LineMetrics
extends Object

The LineMetrics class allows access to the metrics needed to layout characters along a line and to layout of a set of lines. A LineMetrics object encapsulates the measurement information associated with a run of text.

Fonts can have different metrics for different ranges of characters. The getLineMetrics methods of Font take some text as an argument and return a LineMetrics object describing the metrics of the initial number of characters in that text, as returned by getNumChars().

Constructor Summary
LineMetrics()
Method Summary
abstract float | getAscent() Returns the ascent of the text.
abstract int | getBaselineIndex() Returns the baseline index of the text.
abstract float[] | getBaselineOffsets() Returns the baseline offsets of the text, relative to the baseline of the text.
abstract float | getDescent() Returns the descent of the text.
abstract float | getHeight() Returns the height of the text.
abstract float | getLeading() Returns the leading of the text.
abstract int | getNumChars() Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics object.
abstract float | getStrikethroughOffset() Returns the position of the strike-through line relative to the baseline.
abstract float | getStrikethroughThickness() Returns the thickness of the strike-through line.
abstract float | getUnderlineOffset() Returns the position of the underline relative to the baseline.
abstract float | getUnderlineThickness() Returns the thickness of the underline.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineMetrics

public LineMetrics()
Method Detail

getNumChars

public abstract int getNumChars()
Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics object.
Returns:
the number of characters in the text with which this LineMetrics was created.

getAscent

public abstract float getAscent()
Returns the ascent of the text. The ascent is the distance from the baseline to the ascender line. The ascent usually represents the the height of the capital letters of the text. Some characters can extend above the ascender line.
Returns:
the ascent of the text.

getDescent

public abstract float getDescent()
Returns the descent of the text. The descent is the distance from the baseline to the descender line. The descent usually represents the distance to the bottom of lower case letters like 'p'. Some characters can extend below the descender line.
Returns:
the descent of the text.

getLeading

public abstract float getLeading()
Returns the leading of the text. The leading is the recommended distance from the bottom of the descender line to the top of the next line.
Returns:
the leading of the text.

getHeight

public abstract float getHeight()
Returns the height of the text. The height is equal to the sum of the ascent, the descent and the leading.
Returns:
the height of the text.

getBaselineIndex

public abstract int getBaselineIndex()
Returns the baseline index of the text. The index is one of ROMAN_BASELINE, CENTER_BASELINE, HANGING_BASELINE.
Returns:
the baseline of the text.

getBaselineOffsets

public abstract float[] getBaselineOffsets()
Returns the baseline offsets of the text, relative to the baseline of the text. The offsets are indexed by baseline index. For example, if the baseline index is CENTER_BASELINE then offsets[HANGING_BASELINE] is usually negative, offsets[CENTER_BASELINE] is zero, and offsets[ROMAN_BASELINE] is usually positive.
Returns:
the baseline offsets of the text.

getStrikethroughOffset

public abstract float getStrikethroughOffset()
Returns the position of the strike-through line relative to the baseline.
Returns:
the position of the strike-through line.

getStrikethroughThickness

public abstract float getStrikethroughThickness()
Returns the thickness of the strike-through line.
Returns:
the thickness of the strike-through line.

getUnderlineOffset

public abstract float getUnderlineOffset()
Returns the position of the underline relative to the baseline.
Returns:
the position of the underline.

getUnderlineThickness

public abstract float getUnderlineThickness()
Returns the thickness of the underline.
Returns:
the thickness of the underline.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultipleMaster

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Interface MultipleMaster

public interface MultipleMaster

The MultipleMaster interface represents Type 1 Multiple Master fonts. A particular Font object can implement this interface.

Method Summary
 Font deriveMMFont(float[] axes)
Creates a new instance of a multiple master font based on the design axis values contained in the specified array.
 Font deriveMMFont(float[] glyphWidths, float avgStemWidth, float typicalCapHeight, float typicalXHeight, float italicAngle)
Creates a new instance of a multiple master font based on detailed metric information.
 float[] getDesignAxisDefaults()
Returns an array of default design values for each axis.
 String[] getDesignAxisNames()
Returns the name for each design axis.
 float[] getDesignAxisRanges()
Returns an array of design limits interleaved in the form [from->to] for each axis.
 int getNumDesignAxes()
Returns the number of multiple master design controls.

Method Detail

getNumDesignAxes

public int getNumDesignAxes()
Returns the number of multiple master design controls. Design axes include things like width, weight and optical scaling.
Returns:
the number of multiple master design controls

getDesignAxisRanges

public float[] getDesignAxisRanges()
Returns an array of design limits interleaved in the form [from->to] for each axis. For example, design limits for weight could be from 0.1 to 1.0. The values are returned in the same order returned by getDesignAxisNames.
Returns:
an array of design limits for each axis.

getDesignAxisDefaults

public float[] getDesignAxisDefaults()
Returns an array of default design values for each axis. For example, the default value for weight could be 1.6. The values are returned in the same order returned by getDesignAxisNames.
Returns:
an array of default design values for each axis.

getDesignAxisNames

public String[] getDesignAxisNames()
Returns the name for each design axis. This also determines the order in which the values for each axis are returned.
Returns:
an array containing the names of each design axis.

deriveMMFont

public Font deriveMMFont(float[] axes)
Creates a new instance of a multiple master font based on the design axis values contained in the specified array. The size of the array must correspond to the value returned from getNumDesignAxes and the values of the array elements must fall within limits specified by getDesignAxesLimits. In case of an error, null is returned.
Parameters:
axes - an array containing axis values
Returns:
a Font object that is an instance of MultipleMaster and is based on the design axis values provided by axes.

deriveMMFont

public Font deriveMMFont(float[] glyphWidths,
                         float avgStemWidth,
                         float typicalCapHeight,
                         float typicalXHeight,
                         float italicAngle)
Creates a new instance of a multiple master font based on detailed metric information. In case of an error, null is returned.
Parameters:
glyphWidths - an array of floats representing the desired width of each glyph in font space
avgStemWidth - the average stem width for the overall font in font space
typicalCapHeight - the height of a typical upper case char
typicalXHeight - the height of a typical lower case char
italicAngle - the angle at which the italics lean, in degrees counterclockwise from vertical
Returns:
a Font object that is an instance of MultipleMaster and is based on the specified metric information.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


OpenType

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Interface OpenType

public interface OpenType

The OpenType interface represents OpenType and TrueType fonts. This interface makes it possible to obtain sfnt tables from the font. A particular Font object can implement this interface.

For more information on TrueType fonts, see the Apple TrueType Reference Manual ( http://fonts.apple.com/TTRefMan/index.html ).

Field Summary
static int | TAG_ACNT Accent attachment.
static int | TAG_AVAR Axis variaiton.
static int | TAG_BASE Baseline data.
static int | TAG_BDAT Bitmap data.
static int | TAG_BLOC Bitmap location.
static int | TAG_BSLN Baseline table.
static int | TAG_CFF Compact font format (Type1 font).
static int | TAG_CMAP Character to glyph mapping.
static int | TAG_CVAR CVT variation.
static int | TAG_CVT Control value table.
static int | TAG_DSIG Digital signature.
static int | TAG_EBDT Embedded bitmap data.
static int | TAG_EBLC Embedded bitmap location.
static int | TAG_EBSC Embedded bitmap scaling.
static int | TAG_FDSC Font descriptors.
static int | TAG_FEAT Feature name.
static int | TAG_FMTX Font metrics.
static int | TAG_FPGM Font program.
static int | TAG_FVAR Font variation.
static int | TAG_GASP Grid-fitting and scan conversion procedure.
static int | TAG_GDEF Glyph definition.
static int | TAG_GLYF Glyph data.
static int | TAG_GPOS Glyph positioning.
static int | TAG_GSUB Glyph substitution.
static int | TAG_GVAR Glyph variation.
static int | TAG_HDMX Horizontal device metrics.
static int | TAG_HEAD Font header.
static int | TAG_HHEA Horizontal metrics header.
static int | TAG_HMTX Horizontal metrics.
static int | TAG_JSTF Justification.
static int | TAG_JUST Justification.
static int | TAG_KERN Kerning.
static int | TAG_LCAR Ligature caret.
static int | TAG_LOCA Index to location.
static int | TAG_LTSH Linear threshold.
static int | TAG_MAXP Maximum profile.
static int | TAG_MMFX Multiple master font metrics.
static int | TAG_MMSD Multiple master supplementary data.
static int | TAG_MORT Glyph metamorphosis.
static int | TAG_NAME Naming table.
static int | TAG_OPBD Optical bounds.
static int | TAG_OS2 OS/2 and Windows specific metrics.
static int | TAG_PCLT PCL 5 data.
static int | TAG_POST PostScript Information.
static int | TAG_PREP CVT preprogram.
static int | TAG_PROP Glyph properties.
static int | TAG_TRAK Tracking.
static int | TAG_TYP1 Adobe Type 1 font data.
static int | TAG_VDMX Vertical device metrics.
static int | TAG_VHEA Vertical metrics header.
static int | TAG_VMTX Vertical metrics.
Method Summary
byte[] | getFontTable(int sfntTag) Returns the table as an array of bytes for a specified tag.
byte[] | getFontTable(int sfntTag, int offset, int count) Returns a subset of the table as an array of bytes for a specified tag.
byte[] | getFontTable(String strSfntTag) Returns the table as an array of bytes for a specified tag.
byte[] | getFontTable(String strSfntTag, int offset, int count) Returns a subset of the table as an array of bytes for a specified tag.
int | getFontTableSize(int sfntTag) Returns the size of the table for a specified tag.
int | getFontTableSize(String strSfntTag) Returns the size of the table for a specified tag.
int | getVersion() Returns the version of the OpenType font.

Field Detail

TAG_CMAP

public static final int TAG_CMAP
Character to glyph mapping. Table tag "cmap" in the Open Type Specification.

TAG_HEAD

public static final int TAG_HEAD
Font header. Table tag "head" in the Open Type Specification.

TAG_NAME

public static final int TAG_NAME
Naming table. Table tag "name" in the Open Type Specification.

TAG_GLYF

public static final int TAG_GLYF
Glyph data. Table tag "glyf" in the Open Type Specification.

TAG_MAXP

public static final int TAG_MAXP
Maximum profile. Table tag "maxp" in the Open Type Specification.

TAG_PREP

public static final int TAG_PREP
CVT preprogram. Table tag "prep" in the Open Type Specification.

TAG_HMTX

public static final int TAG_HMTX
Horizontal metrics. Table tag "hmtx" in the Open Type Specification.

TAG_KERN

public static final int TAG_KERN
Kerning. Table tag "kern" in the Open Type Specification.

TAG_HDMX

public static final int TAG_HDMX
Horizontal device metrics. Table tag "hdmx" in the Open Type Specification.

TAG_LOCA

public static final int TAG_LOCA
Index to location. Table tag "loca" in the Open Type Specification.

TAG_POST

public static final int TAG_POST
PostScript Information. Table tag "post" in the Open Type Specification.

TAG_OS2

public static final int TAG_OS2
OS/2 and Windows specific metrics. Table tag "OS/2" in the Open Type Specification.

TAG_CVT

public static final int TAG_CVT
Control value table. Table tag "cvt " in the Open Type Specification.

TAG_GASP

public static final int TAG_GASP
Grid-fitting and scan conversion procedure. Table tag "gasp" in the Open Type Specification.

TAG_VDMX

public static final int TAG_VDMX
Vertical device metrics. Table tag "VDMX" in the Open Type Specification.

TAG_VMTX

public static final int TAG_VMTX
Vertical metrics. Table tag "vmtx" in the Open Type Specification.

TAG_VHEA

public static final int TAG_VHEA
Vertical metrics header. Table tag "vhea" in the Open Type Specification.

TAG_HHEA

public static final int TAG_HHEA
Horizontal metrics header. Table tag "hhea" in the Open Type Specification.

TAG_TYP1

public static final int TAG_TYP1
Adobe Type 1 font data. Table tag "typ1" in the Open Type Specification.

TAG_BSLN

public static final int TAG_BSLN
Baseline table. Table tag "bsln" in the Open Type Specification.

TAG_GSUB

public static final int TAG_GSUB
Glyph substitution. Table tag "GSUB" in the Open Type Specification.

TAG_DSIG

public static final int TAG_DSIG
Digital signature. Table tag "DSIG" in the Open Type Specification.

TAG_FPGM

public static final int TAG_FPGM
Font program. Table tag "fpgm" in the Open Type Specification.

TAG_FVAR

public static final int TAG_FVAR
Font variation. Table tag "fvar" in the Open Type Specification.

TAG_GVAR

public static final int TAG_GVAR
Glyph variation. Table tag "gvar" in the Open Type Specification.

TAG_CFF

public static final int TAG_CFF
Compact font format (Type1 font). Table tag "CFF " in the Open Type Specification.

TAG_MMSD

public static final int TAG_MMSD
Multiple master supplementary data. Table tag "MMSD" in the Open Type Specification.

TAG_MMFX

public static final int TAG_MMFX
Multiple master font metrics. Table tag "MMFX" in the Open Type Specification.

TAG_BASE

public static final int TAG_BASE
Baseline data. Table tag "BASE" in the Open Type Specification.

TAG_GDEF

public static final int TAG_GDEF
Glyph definition. Table tag "GDEF" in the Open Type Specification.

TAG_GPOS

public static final int TAG_GPOS
Glyph positioning. Table tag "GPOS" in the Open Type Specification.

TAG_JSTF

public static final int TAG_JSTF
Justification. Table tag "JSTF" in the Open Type Specification.

TAG_EBDT

public static final int TAG_EBDT
Embedded bitmap data. Table tag "EBDT" in the Open Type Specification.

TAG_EBLC

public static final int TAG_EBLC
Embedded bitmap location. Table tag "EBLC" in the Open Type Specification.

TAG_EBSC

public static final int TAG_EBSC
Embedded bitmap scaling. Table tag "EBSC" in the Open Type Specification.

TAG_LTSH

public static final int TAG_LTSH
Linear threshold. Table tag "LTSH" in the Open Type Specification.

TAG_PCLT

public static final int TAG_PCLT
PCL 5 data. Table tag "PCLT" in the Open Type Specification.

TAG_ACNT

public static final int TAG_ACNT
Accent attachment. Table tag "acnt" in the Open Type Specification.

TAG_AVAR

public static final int TAG_AVAR
Axis variaiton. Table tag "avar" in the Open Type Specification.

TAG_BDAT

public static final int TAG_BDAT
Bitmap data. Table tag "bdat" in the Open Type Specification.

TAG_BLOC

public static final int TAG_BLOC
Bitmap location. Table tag "bloc" in the Open Type Specification.

TAG_CVAR

public static final int TAG_CVAR
CVT variation. Table tag "cvar" in the Open Type Specification.

TAG_FEAT

public static final int TAG_FEAT
Feature name. Table tag "feat" in the Open Type Specification.

TAG_FDSC

public static final int TAG_FDSC
Font descriptors. Table tag "fdsc" in the Open Type Specification.

TAG_FMTX

public static final int TAG_FMTX
Font metrics. Table tag "fmtx" in the Open Type Specification.

TAG_JUST

public static final int TAG_JUST
Justification. Table tag "just" in the Open Type Specification.

TAG_LCAR

public static final int TAG_LCAR
Ligature caret. Table tag "lcar" in the Open Type Specification.

TAG_MORT

public static final int TAG_MORT
Glyph metamorphosis. Table tag "mort" in the Open Type Specification.

TAG_OPBD

public static final int TAG_OPBD
Optical bounds. Table tag "opbd" in the Open Type Specification.

TAG_PROP

public static final int TAG_PROP
Glyph properties. Table tag "prop" in the Open Type Specification.

TAG_TRAK

public static final int TAG_TRAK
Tracking. Table tag "trak" in the Open Type Specification.
Method Detail

getVersion

public int getVersion()
Returns the version of the OpenType font. 1.0 is represented as 0x00010000.
Returns:
the version of the OpenType font.

getFontTable

public byte[] getFontTable(int sfntTag)
Returns the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.
Parameters:
sfntTag - a four-character code as a 32-bit integer
Returns:
a byte array that is the table that contains the font data corresponding to the specified tag.

getFontTable

public byte[] getFontTable(String strSfntTag)
Returns the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.
Parameters:
sfntTag - a four-character code as a String
Returns:
a byte array that is the table that contains the font data corresponding to the specified tag.

getFontTable

public byte[] getFontTable(int sfntTag,
                           int offset,
                           int count)
Returns a subset of the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.
Parameters:
sfntTag - a four-character code as a 32-bit integer
offset - index of first byte to return from table
count - number of bytes to return from table
Returns:
a subset of the table corresponding to sfntTag and containing the bytes starting at offset byte and including count bytes.

getFontTable

public byte[] getFontTable(String strSfntTag,
                           int offset,
                           int count)
Returns a subset of the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.
Parameters:
sfntTag - a four-character code as a String
offset - index of first byte to return from table
count - number of bytes to return from table
Returns:
a subset of the table corresponding to strSfntTag and containing the bytes starting at offset byte and including count bytes.

getFontTableSize

public int getFontTableSize(int sfntTag)
Returns the size of the table for a specified tag. Tags for sfnt tables include items like cmap, name and head.
Parameters:
sfntTag - a four-character code as a 32-bit integer
Returns:
the size of the table corresponding to the specified tag.

getFontTableSize

public int getFontTableSize(String strSfntTag)
Returns the size of the table for a specified tag. Tags for sfnt tables include items like cmap, name and head.
Parameters:
strSfntTag - a four-character code as a String
Returns:
the size of the table corresponding to the specified tag.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ShapeGraphicAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class ShapeGraphicAttribute

java.lang.Object
  |
  +--java.awt.font.GraphicAttribute
        |
        +--java.awt.font.ShapeGraphicAttribute
public final class ShapeGraphicAttribute
extends GraphicAttribute

The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.

See Also:
GraphicAttribute

Field Summary
static boolean | FILL A key indicating the shape should be filled.
static boolean | STROKE A key indicating the shape should be stroked with a 1-pixel wide stroke.
Fields inherited from class java.awt.font.GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
Constructor Summary
ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
Constructs a ShapeGraphicAttribute for the specified Shape.
Method Summary
void | draw(Graphics2D graphics, float x, float y) Draws the graphic at the given location.
boolean | equals(Object rhs) Compares this ShapeGraphicAttribute to the specified Object.
boolean | equals(ShapeGraphicAttribute rhs) Compares this ShapeGraphicAttribute to the specified ShapeGraphicAttribute.
float | getAdvance() Returns the advance of this ShapeGraphicAttribute.
float | getAscent() Returns the ascent of this ShapeGraphicAttribute.
Rectangle2D | getBounds() Returns a Rectangle2D that encloses all of the bits drawn by this ShapeGraphicAttribute relative to the rendering position.
float | getDescent() Returns the descent of this ShapeGraphicAttribute.
int | hashCode() Returns a hashcode for this ShapeGraphicAttribute.
Methods inherited from class java.awt.font.GraphicAttribute
getAlignment, getJustificationInfo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

STROKE

public static final boolean STROKE
A key indicating the shape should be stroked with a 1-pixel wide stroke.

FILL

public static final boolean FILL
A key indicating the shape should be filled.
Constructor Detail

ShapeGraphicAttribute

public ShapeGraphicAttribute(Shape shape,
                             int alignment,
                             boolean stroke)
Constructs a ShapeGraphicAttribute for the specified Shape.
Parameters:
shape - the Shape to render. The Shape is rendered with its origin at the origin of this ShapeGraphicAttribute in the host TextLayout. This object maintains a reference to shape.
alignment - one of the alignments from this ShapeGraphicAttribute.
stroke - true if the Shape should be stroked; false if the Shape should be filled.
Method Detail

getAscent

public float getAscent()
Returns the ascent of this ShapeGraphicAttribute. The ascent of a ShapeGraphicAttribute is the positive distance from the origin of its Shape to the top of bounds of its Shape.
Overrides:
getAscent in class GraphicAttribute
Returns:
the ascent of this ShapeGraphicAttribute.

getDescent

public float getDescent()
Returns the descent of this ShapeGraphicAttribute. The descent of a ShapeGraphicAttribute is the distance from the origin of its Shape to the bottom of the bounds of its Shape.
Overrides:
getDescent in class GraphicAttribute
Returns:
the descent of this ShapeGraphicAttribute.

getAdvance

public float getAdvance()
Returns the advance of this ShapeGraphicAttribute. The advance of a ShapeGraphicAttribute is the distance from the origin of its Shape to the right side of the bounds of its Shape.
Overrides:
getAdvance in class GraphicAttribute
Returns:
the advance of this ShapeGraphicAttribute.

draw

public void draw(Graphics2D graphics,
                 float x,
                 float y)
Draws the graphic at the given location. The Shape is drawn with its origin at (x, y).
Overrides:
draw in class GraphicAttribute
Parameters:
graphics - the Graphics2D into which to draw the graphic
x, y - the user space coordinates where the graphic is drawn

getBounds

public Rectangle2D getBounds()
Returns a Rectangle2D that encloses all of the bits drawn by this ShapeGraphicAttribute relative to the rendering position. A graphic can be rendered beyond its origin, ascent, descent, or advance; but if it does, this method's implementation should indicate where the graphic is rendered.
Overrides:
getBounds in class GraphicAttribute
Returns:
a Rectangle2D that encloses all of the bits rendered by this ShapeGraphicAttribute.

hashCode

public int hashCode()
Returns a hashcode for this ShapeGraphicAttribute.
Overrides:
hashCode in class Object
Returns:
a hash code value for this ShapeGraphicAttribute.

equals

public boolean equals(Object rhs)
Compares this ShapeGraphicAttribute to the specified Object.
Overrides:
equals in class Object
Parameters:
rhs - the Object to compare for equality
Returns:
true if this ShapeGraphicAttribute equals rhs; false otherwise.

equals

public boolean equals(ShapeGraphicAttribute rhs)
Compares this ShapeGraphicAttribute to the specified ShapeGraphicAttribute.
Parameters:
rhs - the ShapeGraphicAttribute to compare for equality
Returns:
true if this ShapeGraphicAttribute equals rhs; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TextAttribute

java.lang.Object
  |
  +--java.text.AttributedCharacterIterator.Attribute
        |
        +--java.awt.font.TextAttribute
All Implemented Interfaces:
Serializable
public final class TextAttribute
extends AttributedCharacterIterator.Attribute

The TextAttribute class defines attribute keys and attribute values used for text rendering.

TextAttribute instances are used as attribute keys to identify attributes in AttributedCharacterIterator, Font, and other classes handling text attributes. Other constants defined in this class are used as attribute values.

For each text attribute, the documentation describes:

  • the type of their values,
  • the valid values if there are limitations
  • relevant constants
  • the default effect if the attribute is absent (or has a null value).
  • a description of the effect.
  • the fallback behavior if the exact attribute requested is not available.

Types of Values

  • The values of attributes must always be immutable.
  • Where a list of limitations is given, any value outside of that set is reserved for future use, and ignored at present.
  • If the value is null or not of the proper type then it has the default effect. The effect of a particular value can be interpolated, especially in the case of multiple master fonts. This interpolation is done based on the nearest defined constants above and below the request:
    interpolation = (request - below)/(above - below);

Interpolation

  • Fonts should interpolate values in certain circumstances. For example, when the WEIGHT value is 2.13. If the nearest surrounding values in the font are WEIGHT_BOLD = 2.0 and WEIGHT_HEAVY = 2.25 then font would then interpret the WEIGHT request as being 52% of the way between what it considers BOLD and what it considers HEAVY. If the nearest surrounding values are WEIGHT_SEMIBOLD = 1.25 and WEIGHT_ULTRABOLD = 2.75 then the WEIGHT request is interpreted as being 58.67% of the way between SEMIBOLD and ULTRABOLD.
  • Where a font does not have enough capability to handle a given request, such as superscript, then it should simulate it to the best of its ability. To determine if simulation is being performed, the client should query the font to see what actual attributes were used.

See Also:
AttributedCharacterIterator, Font, Serialized Form

Field Summary
static TextAttribute | BACKGROUND Attribute key for the background Paint adornment.
static TextAttribute | BIDI_EMBEDDING Attribute key for the embedding level for nested bidirectional runs.
static TextAttribute | CHAR_REPLACEMENT Attribute key for a user_defined glyph to display in the text in lieu of a character.
static TextAttribute | FAMILY Attribute key for the unlocalized font family name.
static TextAttribute | FONT Attribute key for the font to use to render text.
static TextAttribute | FOREGROUND Attribute key for the foreground paint adornment.
static TextAttribute | INPUT_METHOD_HIGHLIGHT Attribute key for input method highlight styles.
static TextAttribute | INPUT_METHOD_UNDERLINE Attribute key for input method underline adornments.
static TextAttribute | JUSTIFICATION Attribute key for the justification of a paragraph.
static Float | JUSTIFICATION_FULL Justify the line to the full requested width.
static Float | JUSTIFICATION_NONE Do not allow the line to be justified.
static TextAttribute | POSTURE Attribute key for the posture of a font.
static Float | POSTURE_OBLIQUE The standard italic posture.
static Float | POSTURE_REGULAR The standard posture, upright.
static TextAttribute | RUN_DIRECTION Attribute key for the run direction of the line.
static Boolean | RUN_DIRECTION_LTR Left-to-right run direction.
static Boolean | RUN_DIRECTION_RTL Right-to-left run direction.
static TextAttribute | SIZE Attribute key for the font size.
static TextAttribute | STRIKETHROUGH Attribute key for the strikethrough adornment.
static Boolean | STRIKETHROUGH_ON A single strikethrough.
static TextAttribute | SUPERSCRIPT Attribute key for super and subscripting.
static Integer | SUPERSCRIPT_SUB Standard subscript.
static Integer | SUPERSCRIPT_SUPER Standard superscript.
static TextAttribute | SWAP_COLORS Attribute key for swapping foreground and background Paints (or Colors).
static Boolean | SWAP_COLORS_ON Swap foreground and background.
static TextAttribute | TRANSFORM Attribute key for the transform of a font.
static TextAttribute | UNDERLINE Attribute key for underline adornments.
static Integer | UNDERLINE_LOW_DASHED Single pixel dashed low underline.
static Integer | UNDERLINE_LOW_DOTTED Single pixel dotted low underline.
static Integer | UNDERLINE_LOW_GRAY Double pixel gray low underline.
static Integer | UNDERLINE_LOW_ONE_PIXEL Single pixel solid low underline.
static Integer | UNDERLINE_LOW_TWO_PIXEL Double pixel solid low underline.
static Integer | UNDERLINE_ON Standard underline at the roman baseline for roman text, and below the decenders for other text.
static TextAttribute | WEIGHT Attribute key for the weight of a font.
static Float | WEIGHT_BOLD The standard bold weight.
static Float | WEIGHT_DEMIBOLD A moderately lighter weight than BOLD.
static Float | WEIGHT_DEMILIGHT An intermediate weight between LIGHT and STANDARD.
static Float | WEIGHT_EXTRA_LIGHT The lightest predefined weight.
static Float | WEIGHT_EXTRABOLD An extra heavy weight.
static Float | WEIGHT_HEAVY A moderately heavier weight than BOLD.
static Float | WEIGHT_LIGHT The standard light weight.
static Float | WEIGHT_MEDIUM An intermediate weight between the REGULAR and BOLD weights.
static Float | WEIGHT_REGULAR The standard weight.
static Float | WEIGHT_SEMIBOLD A moderately heavier weight than REGULAR.
static Float | WEIGHT_ULTRABOLD The heaviest predefined weight.
static TextAttribute | WIDTH Attribute key for the width of a font.
static Float | WIDTH_CONDENSED The most condensed predefined width.
static Float | WIDTH_EXTENDED The most extended predefined width.
static Float | WIDTH_REGULAR The standard width.
static Float | WIDTH_SEMI_CONDENSED A moderately condensed width.
static Float | WIDTH_SEMI_EXTENDED A moderately extended width.
Fields inherited from class java.text.AttributedCharacterIterator.Attribute
INPUT_METHOD_SEGMENT, LANGUAGE, READING
Constructor Summary
protected TextAttribute(String name)
Constructs a TextAttribute with the specified name.
Method Summary
protected  Object readResolve()
Resolves instances being deserialized to the predefined constants.
Methods inherited from class java.text.AttributedCharacterIterator.Attribute
equals, getName, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

FAMILY

public static final TextAttribute FAMILY
Attribute key for the unlocalized font family name.

Key

FAMILY

Value

String

Constants

"Serif", "SansSerif"

Default

Host default;

Description

The name of the font family. If the family name is not found, the default font is used. The name should not be the full font name or specify other attributes (such as the name "Helvetica Bold"). Such names might result in the default font if the name does not match a known family name.

WEIGHT

public static final TextAttribute WEIGHT
Attribute key for the weight of a font.

Key

WEIGHT

Value

Float

Constants

WEIGHT_ULTRA_LIGHT = 0.25,
WEIGHT_EXTRA_LIGHT = 0.5,
WEIGHT_LIGHT = 0.75,
WEIGHT_DEMILIGHT = 0.875,
WEIGHT_REGULAR = 1.0,
WEIGHT_SEMIBOLD = 1.25,
WEIGHT_MEDIUM = 1.5,
WEIGHT_DEMIBOLD = 1.75,
WEIGHT_BOLD = 2.0,
WEIGHT_HEAVY = 2.25,
WEIGHT_EXTRABOLD = 2.5,
WEIGHT_ULTRABOLD = 2.75

Default

WEIGHT_REGULAR

Description

The value is roughly the ratio of the stem width to that of the regular weight. If the font has a different value for specific constants, then the value is interpolated as described in the class description.

Fallback

Currently none. However, in the future, shape manipulations might be
available to simulate weight variations for fonts that don't have them.

WEIGHT_EXTRA_LIGHT

public static final Float WEIGHT_EXTRA_LIGHT
The lightest predefined weight.
See Also:
WEIGHT

WEIGHT_LIGHT

public static final Float WEIGHT_LIGHT
The standard light weight.
See Also:
WEIGHT

WEIGHT_DEMILIGHT

public static final Float WEIGHT_DEMILIGHT
An intermediate weight between LIGHT and STANDARD.
See Also:
WEIGHT

WEIGHT_REGULAR

public static final Float WEIGHT_REGULAR
The standard weight. This weight is used if WEIGHT is unspecified.
See Also:
WEIGHT

WEIGHT_SEMIBOLD

public static final Float WEIGHT_SEMIBOLD
A moderately heavier weight than REGULAR.
See Also:
WEIGHT

WEIGHT_MEDIUM

public static final Float WEIGHT_MEDIUM
An intermediate weight between the REGULAR and BOLD weights.
See Also:
WEIGHT

WEIGHT_DEMIBOLD

public static final Float WEIGHT_DEMIBOLD
A moderately lighter weight than BOLD.
See Also:
WEIGHT

WEIGHT_BOLD

public static final Float WEIGHT_BOLD
The standard bold weight.
See Also:
WEIGHT

WEIGHT_HEAVY

public static final Float WEIGHT_HEAVY
A moderately heavier weight than BOLD.
See Also:
WEIGHT

WEIGHT_EXTRABOLD

public static final Float WEIGHT_EXTRABOLD
An extra heavy weight.
See Also:
WEIGHT

WEIGHT_ULTRABOLD

public static final Float WEIGHT_ULTRABOLD
The heaviest predefined weight.
See Also:
WEIGHT

WIDTH

public static final TextAttribute WIDTH
Attribute key for the width of a font.

Key

WIDTH

Value

Float

Constants

WIDTH_CONDENSED = 0.75,
WIDTH_SEMI_CONDENSED = 0.875,
WIDTH_REGULAR = 1.0,
WIDTH_SEMI_EXTENDED = 1.25,
WIDTH_EXTENDED = 1.5

Default

WIDTH_REGULAR

Description

The value is roughly the ratio of the advance width to that of the regular width. If the font has a different value for specific constants, then the value is interpolated as described in the class description.

Fallback

If a Narrow font is available and matches, use that. Otherwise scale with a transform based on the value.

WIDTH_CONDENSED

public static final Float WIDTH_CONDENSED
The most condensed predefined width.
See Also:
WIDTH

WIDTH_SEMI_CONDENSED

public static final Float WIDTH_SEMI_CONDENSED
A moderately condensed width.
See Also:
WIDTH

WIDTH_REGULAR

public static final Float WIDTH_REGULAR
The standard width. This width is used if WIDTH is unspecified.
See Also:
WIDTH

WIDTH_SEMI_EXTENDED

public static final Float WIDTH_SEMI_EXTENDED
A moderately extended width.
See Also:
WIDTH

WIDTH_EXTENDED

public static final Float WIDTH_EXTENDED
The most extended predefined width.
See Also:
WIDTH

POSTURE

public static final TextAttribute POSTURE
Attribute key for the posture of a font.

Key

POSTURE

Value

Float

Constants

POSTURE_REGULAR = 0,
POSTURE_OBLIQUE = 0.20

Default

POSTURE_REGULAR

Description

The value is interpreted generally as a skew slope, positive leans to the right. If the font has a different value for specific constants, then the value is interpolated as described in the class description. With fonts that have italic faces, not only the skew of the character changes, but also the letter shapes might change.
Notes:
To set the value by angle, use:
value = new Float(Math.tan(Math.PI*degrees/180.0)
To determine the angle from the value, use:
angle = Math.atan(value.floatValue())*180/Math.PI

Fallback

If an Oblique font is available and matches, use that. Otherwise skew with a transform using the posture value interpreted as run/rise.

See Also:
Font.getItalicAngle()

POSTURE_REGULAR

public static final Float POSTURE_REGULAR
The standard posture, upright.
See Also:
POSTURE

POSTURE_OBLIQUE

public static final Float POSTURE_OBLIQUE
The standard italic posture.
See Also:
POSTURE

SIZE

public static final TextAttribute SIZE
Attribute key for the font size.

Key

SIZE

Value

Float

Default

from System Properties

Description

Represents point size. Note that the appearance and metrics of a 12pt font with a 2X transform might be different than that of a 24 point font with no transform.

Fallback

Scale to provided size.

TRANSFORM

public static final TextAttribute TRANSFORM
Attribute key for the transform of a font.

Key

TRANSFORM

Value

TransformAttribute

Default

Identity transform

Description

Used to transform glyphs rendered by this font. The primary intent is to support scaling, skewing, and translation. In general, large rotations do not produce very useful results. The transform modifies both the glyph and the advance. The translations in the transform are interpreted as a ratio of the point size. That is, with a point size of 12, a translation of 0.5 results in a movement of 6 points.

The advance point of the transformed glyph is the transform of the advance point projected onto the baseline. If the advance ends up to the left (top) of the glyph origin, the two points are swapped.

Example one: The point size is 20, the original advance is 10.0, and the transform is a 60 degree counterclockwise rotation plus an offset up and to the right of 0.1, -0.1. The translation results in an offset of <2.0, -2.0>. The original advance point is <10.0, 0.0>; after the rotation it is <6.0, -8.0>; when adding the offset this becomes <8.0,-10.0>, when projecting on the (horizontal) baseline this becomes the new advance point: <8.0, 0.0>. The advance width is the distance from the origin to the advance point: 8.0. The rotated glyph is rendered two points up and to the right of its origin and rotated. This does not affect the baseline for subsequent glyphs.

SUPERSCRIPT

public static final TextAttribute SUPERSCRIPT
Attribute key for super and subscripting.

Key

SUPERSCRIPT

Value

Integer

Constants

SUPERSCRIPT_NONE = 0,
SUPERSCRIPT_SUPER = 1,
SUPERSCRIPT_SUB = -1

Default

SUPERSCRIPT_NONE

Description

Requests that the font display the characters with glyphs at a particular superscript level: 0 = none, 1 = superscript, 2 = superscript of superscript,...-1 = subscript, -2 = subscript of subscript,... Requests that the font display text using default superscript (or subscript) glyphs and/or scaling.

Fallback

Use transform with translation of +/-1/2 and scale of 2/3, progressively for each level. That is, for the transform at level N (with N != 0):
offset = sign(N)*1/2*(2/3)^(abs(N)-1)
scale = (2/3)^abs(N)

SUPERSCRIPT_SUPER

public static final Integer SUPERSCRIPT_SUPER
Standard superscript.
See Also:
SUPERSCRIPT

SUPERSCRIPT_SUB

public static final Integer SUPERSCRIPT_SUB
Standard subscript.
See Also:
SUPERSCRIPT

FONT

public static final TextAttribute FONT
Attribute key for the font to use to render text.

Key

FONT

Value

Font

Default

None, perform default resolution

Description

A way for users to override the resolution of font attributes into a Font, or force use of a particular Font instance. This also allows users to specify subclasses of Font in cases where a Font can be subclassed.

CHAR_REPLACEMENT

public static final TextAttribute CHAR_REPLACEMENT
Attribute key for a user_defined glyph to display in the text in lieu of a character.

Key

CHAR_REPLACEMENT

Value

GraphicAttribute

Description

Allows the user to specify an empty position plus metric information. This method is used to reserve space for a graphic or other embedded component. Required for correct BIDI position of 'inline' components within a line. An optional convenience method allows drawing for simple cases. Follows the Microsoft model: the character that this is applied to should be ?.

FOREGROUND

public static final TextAttribute FOREGROUND
Attribute key for the foreground paint adornment.

Key

FOREGROUND

Value

Paint

Default

Color.black

Description

Specify the foreground Paint (or Color) of the text.

BACKGROUND

public static final TextAttribute BACKGROUND
Attribute key for the background Paint adornment.

Key

BACKGROUND

Value

Paint

Default

null

Description

Specify the background Paint (or Color) of the text.

UNDERLINE

public static final TextAttribute UNDERLINE
Attribute key for underline adornments.

Key

UNDERLINE

Value

Integer

Constants

UNDERLINE_ON = 0

Default

none

Description

An embellishment added to the glyphs rendered by a font.

Fallback

UNDERLINE_ON

public static final Integer UNDERLINE_ON
Standard underline at the roman baseline for roman text, and below the decenders for other text.
See Also:
UNDERLINE

STRIKETHROUGH

public static final TextAttribute STRIKETHROUGH
Attribute key for the strikethrough adornment.

Key

STRIKETHROUGH

Value

Boolean

Constants

true = on, false = off

Default

off

Description

An embellishment added to the glyphs rendered by a font.

STRIKETHROUGH_ON

public static final Boolean STRIKETHROUGH_ON
A single strikethrough.
See Also:
STRIKETHROUGH

RUN_DIRECTION

public static final TextAttribute RUN_DIRECTION
Attribute key for the run direction of the line.

Key

RUN_DIRECTION

Value

Boolean

Constants

RUN_DIRECTION_LTR = true, RUN_DIRECTION_RTL = false

Default

Use the default Unicode base direction from the BIDI algorithm.

Description

Specifies which base run direction to use when positioning mixed directional runs within a paragraph. If this value is RUN_DIRECTION_DEFAULT, TextLayout uses the default Unicode base direction from the BIDI algorithm.

This attribute should have the same value over the whole paragraph.

RUN_DIRECTION_LTR

public static final Boolean RUN_DIRECTION_LTR
Left-to-right run direction.
See Also:
RUN_DIRECTION

RUN_DIRECTION_RTL

public static final Boolean RUN_DIRECTION_RTL
Right-to-left run direction.
See Also:
RUN_DIRECTION

BIDI_EMBEDDING

public static final TextAttribute BIDI_EMBEDDING
Attribute key for the embedding level for nested bidirectional runs.

Key

BIDI_EMBEDDING

Value

Integer

Limits

Positive values 1 through 15 are embedding levels, negative values
through -15 are override levels

Default

Use standard BIDI to compute levels from formatting characters in the text.

Description

Specifies the bidi embedding level of the character. When this attribute is present anywhere in a paragraph, then the Unicode characters RLO, LRO, RLE, LRE, PDF are disregarded in the BIDI analysis of that paragraph. See the Unicode Standard v. 2.0, section 3-11.

JUSTIFICATION

public static final TextAttribute JUSTIFICATION
Attribute key for the justification of a paragraph.

Key

JUSTIFICATION

Value

Float

Limits

0.0 through1.0

Default

1.0

Description

Specifies which fraction of the extra space to use when justification is requested. For example, if the line is 50 points wide and the margins are 70 points apart, a value of 0.5 means that the line is padded to reach a width of 60 points.

This attribute should have the same value over the whole paragraph.

JUSTIFICATION_FULL

public static final Float JUSTIFICATION_FULL
Justify the line to the full requested width.
See Also:
JUSTIFICATION

JUSTIFICATION_NONE

public static final Float JUSTIFICATION_NONE
Do not allow the line to be justified.
See Also:
JUSTIFICATION

INPUT_METHOD_HIGHLIGHT

public static final TextAttribute INPUT_METHOD_HIGHLIGHT
Attribute key for input method highlight styles.

Values are instances of InputMethodHighlight. These instances should be wrapped in Annotation instances if segments need to be highlighted separately.

Input method highlights are used while text is being composed using an input method. Text editing components should retain them even if they generally only deal with unstyled text, and make them available to the drawing routines.

See Also:
InputMethodHighlight

INPUT_METHOD_UNDERLINE

public static final TextAttribute INPUT_METHOD_UNDERLINE
Attribute key for input method underline adornments.

Key

INPUT_METHOD_UNDERLINE

Value

Integer

Constants

UNDERLINE_LOW_ONE_PIXEL, UNDERLINE_LOW_TWO_PIXEL, UNDERLINE_LOW_DOTTED, UNDERLINE_LOW_GRAY, UNDERLINE_LOW_DASHED

Default

no underline

Since:
1.3

UNDERLINE_LOW_ONE_PIXEL

public static final Integer UNDERLINE_LOW_ONE_PIXEL
Single pixel solid low underline.
See Also:
INPUT_METHOD_UNDERLINE
Since:
1.3

UNDERLINE_LOW_TWO_PIXEL

public static final Integer UNDERLINE_LOW_TWO_PIXEL
Double pixel solid low underline.
See Also:
INPUT_METHOD_UNDERLINE
Since:
1.3

UNDERLINE_LOW_DOTTED

public static final Integer UNDERLINE_LOW_DOTTED
Single pixel dotted low underline.
See Also:
INPUT_METHOD_UNDERLINE
Since:
1.3

UNDERLINE_LOW_GRAY

public static final Integer UNDERLINE_LOW_GRAY
Double pixel gray low underline.
See Also:
INPUT_METHOD_UNDERLINE
Since:
1.3

UNDERLINE_LOW_DASHED

public static final Integer UNDERLINE_LOW_DASHED
Single pixel dashed low underline.
See Also:
INPUT_METHOD_UNDERLINE
Since:
1.3

SWAP_COLORS

public static final TextAttribute SWAP_COLORS
Attribute key for swapping foreground and background Paints (or Colors).

Values are instances of Boolean. The default is not to swap the foreground and background. If the foreground and background attributes are both defined, this causes them to be swapped when rendering text. If either is defaulted, the exact effect is undefined--generally it will produce an 'inverted' appearance.

SWAP_COLORS_ON

public static final Boolean SWAP_COLORS_ON
Swap foreground and background.
Constructor Detail

TextAttribute

protected TextAttribute(String name)
Constructs a TextAttribute with the specified name.
Parameters:
name - the attribute name to assign to this TextAttribute
Method Detail

readResolve

protected Object readResolve()
                      throws InvalidObjectException
Resolves instances being deserialized to the predefined constants.
Overrides:
readResolve in class AttributedCharacterIterator.Attribute
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextHitInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TextHitInfo

java.lang.Object
  |
  +--java.awt.font.TextHitInfo
public final class TextHitInfo
extends Object

The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character. Biases are either leading (the left edge, for a left-to-right character) or trailing (the right edge, for a left-to-right character). Instances of TextHitInfo are used to specify caret and insertion positions within text.

For example, consider the text "abc". TextHitInfo.trailing(1) corresponds to the right side of the 'b' in the text.

TextHitInfo is used primarily by TextLayout and clients of TextLayout. Clients of TextLayout query TextHitInfo instances for an insertion offset, where new text is inserted into the text model. The insertion offset is equal to the character position in the TextHitInfo if the bias is leading, and one character after if the bias is trailing. The insertion offset for TextHitInfo.trailing(1) is 2.

Sometimes it is convenient to construct a TextHitInfo with the same insertion offset as an existing one, but on the opposite character. The getOtherHit method constructs a new TextHitInfo with the same insertion offset as an existing one, with a hit on the character on the other side of the insertion offset. Calling getOtherHit on trailing(1) would return leading(2). In general, getOtherHit for trailing(n) returns leading(n+1) and getOtherHit for leading(n) returns trailing(n-1).

Example:

Converting a graphical point to an insertion point within a text model

 TextLayout layout = ...;
 Point2D.Float hitPoint = ...;
 TextHitInfo hitInfo = layout.hitTestChar(hitPoint.x, hitPoint.y);
 int insPoint = hitInfo.getInsertionIndex();
 // insPoint is relative to layout;  may need to adjust for use
 // in a text model

See Also:
TextLayout

Method Summary
static TextHitInfo | afterOffset(int offset) Creates a TextHitInfo at the specified offset, associated with the character after the offset.
static TextHitInfo | beforeOffset(int offset) Creates a TextHitInfo at the specified offset, associated with the character before the offset.
boolean | equals(Object obj) Returns true if the specified Object is a TextHitInfo and equals this TextHitInfo.
boolean | equals(TextHitInfo hitInfo) Returns true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo.
int | getCharIndex() Returns the index of the character hit.
int | getInsertionIndex() Returns the insertion index.
TextHitInfo | getOffsetHit(int delta) Creates a TextHitInfo whose character index is offset by delta from the charIndex of this TextHitInfo.
TextHitInfo | getOtherHit() Creates a TextHitInfo on the other side of the insertion point.
int | hashCode() Returns the hash code.
boolean | isLeadingEdge() Returns true if the leading edge of the character was hit.
static TextHitInfo | leading(int charIndex) Creates a TextHitInfo on the leading edge of the character at the specified charIndex.
String | toString() Returns a String representing the hit for debugging use only.
static TextHitInfo | trailing(int charIndex) Creates a hit on the trailing edge of the character at the specified charIndex.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getCharIndex

public int getCharIndex()
Returns the index of the character hit.
Returns:
the index of the character hit.

isLeadingEdge

public boolean isLeadingEdge()
Returns true if the leading edge of the character was hit.
Returns:
true if the leading edge of the character was hit; false otherwise.

getInsertionIndex

public int getInsertionIndex()
Returns the insertion index. This is the character index if the leading edge of the character was hit, and one greater than the character index if the trailing edge was hit.
Returns:
the insertion index.

hashCode

public int hashCode()
Returns the hash code.
Overrides:
hashCode in class Object
Returns:
the hash code of this TextHitInfo, which is also the charIndex of this TextHitInfo.

equals

public boolean equals(Object obj)
Returns true if the specified Object is a TextHitInfo and equals this TextHitInfo.
Overrides:
equals in class Object
Parameters:
obj - the Object to test for equality
Returns:
true if the specified Object equals this TextHitInfo; false otherwise.

equals

public boolean equals(TextHitInfo hitInfo)
Returns true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo. This is not the same as having the same insertion offset.
Parameters:
hitInfo - a specified TextHitInfo
Returns:
true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo.

toString

public String toString()
Returns a String representing the hit for debugging use only.
Overrides:
toString in class Object
Returns:
a String representing this TextHitInfo.

leading

public static TextHitInfo leading(int charIndex)
Creates a TextHitInfo on the leading edge of the character at the specified charIndex.
Parameters:
charIndex - the index of the character hit
Returns:
a TextHitInfo on the leading edge of the character at the specified charIndex.

trailing

public static TextHitInfo trailing(int charIndex)
Creates a hit on the trailing edge of the character at the specified charIndex.
Parameters:
charIndex - the index of the character hit
Returns:
a TextHitInfo on the trailing edge of the character at the specified charIndex.

beforeOffset

public static TextHitInfo beforeOffset(int offset)
Creates a TextHitInfo at the specified offset, associated with the character before the offset.
Parameters:
offset - an offset associated with the character before the offset
Returns:
a TextHitInfo at the specified offset.

afterOffset

public static TextHitInfo afterOffset(int offset)
Creates a TextHitInfo at the specified offset, associated with the character after the offset.
Parameters:
offset - an offset associated with the character after the offset
Returns:
a TextHitInfo at the specified offset.

getOtherHit

public TextHitInfo getOtherHit()
Creates a TextHitInfo on the other side of the insertion point. This TextHitInfo remains unchanged.
Returns:
a TextHitInfo on the other side of the insertion point.

getOffsetHit

public TextHitInfo getOffsetHit(int delta)
Creates a TextHitInfo whose character index is offset by delta from the charIndex of this TextHitInfo. This TextHitInfo remains unchanged.
Parameters:
delta - the value to offset this charIndex
Returns:
a TextHitInfo whose charIndex is offset by delta from the charIndex of this TextHitInfo.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TextLayout

java.lang.Object
  |
  +--java.awt.font.TextLayout
All Implemented Interfaces:
Cloneable
public final class TextLayout
extends Object
implements Cloneable

TextLayout is an immutable graphical representation of styled character data.

It provides the following capabilities:

  • implicit bidirectional analysis and reordering,
  • cursor positioning and movement, including split cursors for mixed directional text,
  • highlighting, including both logical and visual highlighting for mixed directional text,
  • multiple baselines (roman, hanging, and centered),
  • hit testing,
  • justification,
  • default font substitution,
  • metric information such as ascent, descent, and advance, and
  • rendering

A TextLayout object can be rendered using its draw method.

TextLayout can be constructed either directly or through the use of a LineBreakMeasurer. When constructed directly, the source text represents a single paragraph. LineBreakMeasurer allows styled text to be broken into lines that fit within a particular width. See the LineBreakMeasurer documentation for more information.

TextLayout construction logically proceeds as follows:

  • paragraph attributes are extracted and examined,
  • text is analyzed for bidirectional reordering, and reordering information is computed if needed,
  • text is segmented into style runs
  • fonts are chosen for style runs, first by using a font if the attribute TextAttribute.FONT is present, otherwise by computing a default font using the attributes that have been defined
  • if text is on multiple baselines, the runs or subruns are further broken into subruns sharing a common baseline,
  • glyphvectors are generated for each run using the chosen font,
  • final bidirectional reordering is performed on the glyphvectors

All graphical information returned from a TextLayout object's methods is relative to the origin of the TextLayout, which is the intersection of the TextLayout object's baseline with its left edge. Also, coordinates passed into a TextLayout object's methods are assumed to be relative to the TextLayout object's origin. Clients usually need to translate between a TextLayout object's coordinate system and the coordinate system in another object (such as a Graphics object).

TextLayout objects are constructed from styled text, but they do not retain a reference to their source text. Thus, changes in the text previously used to generate a TextLayout do not affect the TextLayout.

Three methods on a TextLayout object (getNextRightHit, getNextLeftHit, and hitTestChar) return instances of TextHitInfo. The offsets contained in these TextHitInfo objects are relative to the start of the TextLayout, not to the text used to create the TextLayout. Similarly, TextLayout methods that accept TextHitInfo instances as parameters expect the TextHitInfo object's offsets to be relative to the TextLayout, not to any underlying text storage model.

Examples:

Constructing and drawing a TextLayout and its bounding rectangle:

   Graphics2D g = ...;
   Point2D loc = ...;
   Font font = Font.getFont("Helvetica-bold-italic");
   FontRenderContext frc = g.getFontRenderContext();
   TextLayout layout = new TextLayout("This is a string", font, frc);
   layout.draw(g, loc.getX(), loc.getY());

   Rectangle2D bounds = layout.getBounds();
   bounds.setRect(bounds.getX()+loc.getX(),
                  bounds.getY()+loc.getY(),
                  bounds.getWidth(),
                  bounds.getHeight())
   g.draw(bounds);

Hit-testing a TextLayout (determining which character is at a particular graphical location):

   Point2D click = ...;
   TextHitInfo hit = layout.hitTestChar(
                         (float) (click.getX() - loc.getX()),
                         (float) (click.getY() - loc.getY()));

Responding to a right-arrow key press:

   int insertionIndex = ...;
   TextHitInfo next = layout.getNextRightHit(insertionIndex);
   if (next != null) {
       // translate graphics to origin of layout on screen
       g.translate(loc.getX(), loc.getY());
       Shape[] carets = layout.getCaretShapes(next.getInsertionIndex());
       g.draw(carets[0]);
       if (carets[1] != null) {
           g.draw(carets[1]);
       }
   }

Drawing a selection range corresponding to a substring in the source text. The selected area may not be visually contiguous:

   // selStart, selLimit should be relative to the layout,
   // not to the source text

   int selStart = ..., selLimit = ...;
   Color selectionColor = ...;
   Shape selection = layout.getLogicalHighlightShape(selStart, selLimit);
   // selection may consist of disjoint areas
   // graphics is assumed to be tranlated to origin of layout
   g.setColor(selectionColor);
   g.fill(selection);

Drawing a visually contiguous selection range. The selection range may correspond to more than one substring in the source text. The ranges of the corresponding source text substrings can be obtained with getLogicalRangesForVisualSelection():

   TextHitInfo selStart = ..., selLimit = ...;
   Shape selection = layout.getVisualHighlightShape(selStart, selLimit);
   g.setColor(selectionColor);
   g.fill(selection);
   int[] ranges = getLogicalRangesForVisualSelection(selStart, selLimit);
   // ranges[0], ranges[1] is the first selection range,
   // ranges[2], ranges[3] is the second selection range, etc.

See Also:
LineBreakMeasurer, TextAttribute, TextHitInfo

Inner Class Summary
static class TextLayout.CaretPolicy
Defines a policy for determining the strong caret location.
Field Summary
static TextLayout.CaretPolicy DEFAULT_CARET_POLICY
This CaretPolicy is used when a policy is not specified by the client.
Constructor Summary
TextLayout(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextLayout from an iterator over styled text.
TextLayout(String string, Font font, FontRenderContext frc)
Constructs a TextLayout from a String and a Font.
TextLayout(String string, Map attributes, FontRenderContext frc)
Constructs a TextLayout from a String and an attribute set.
Method Summary
protected Object | clone() Creates a copy of this TextLayout.
void | draw(Graphics2D g2, float x, float y) Renders this TextLayout at the specified location in the specified Graphics2D context.
boolean | equals(Object obj) Returns true if the specified Object is a TextLayout object and if the specified Object equals this TextLayout.
boolean | equals(TextLayout rhs) Returns true if the two layouts are equal.
float | getAdvance() Returns the advance of this TextLayout.
float | getAscent() Returns the ascent of this TextLayout.
byte | getBaseline() Returns the baseline for this TextLayout.
float[] | getBaselineOffsets() Returns the offsets array for the baselines used for this TextLayout.
Shape | getBlackBoxBounds(int firstEndpoint, int secondEndpoint) Returns the black box bounds of the characters in the specified range.
Rectangle2D | getBounds() Returns the bounds of this TextLayout.
float[] | getCaretInfo(TextHitInfo hit) Returns information about the caret corresponding to hit.
float[] | getCaretInfo(TextHitInfo hit, Rectangle2D bounds) Returns information about the caret corresponding to hit.
Shape | getCaretShape(TextHitInfo hit) Returns a Shape representing the caret at the specified hit inside the natural bounds of this TextLayout.
Shape | getCaretShape(TextHitInfo hit, Rectangle2D bounds) Returns a Shape representing the caret at the specified hit inside the specified bounds.
Shape[] | getCaretShapes(int offset) Returns two paths corresponding to the strong and weak caret.
Shape[] | getCaretShapes(int offset, Rectangle2D bounds) Returns two paths corresponding to the strong and weak caret.
Shape[] | getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) Returns two paths corresponding to the strong and weak caret.
int | getCharacterCount() Returns the number of characters represented by this TextLayout.
byte | getCharacterLevel(int index) Returns the level of the character at index.
float | getDescent() Returns the descent of this TextLayout.
TextLayout | getJustifiedLayout(float justificationWidth) Creates a copy of this TextLayout justified to the specified width.
float | getLeading() Returns the leading of the TextLayout.
Shape | getLogicalHighlightShape(int firstEndpoint, int secondEndpoint) Returns a Shape enclosing the logical selection in the specified range, extended to the natural bounds of this TextLayout.
Shape | getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds) Returns a Shape enclosing the logical selection in the specified range, extended to the specified bounds.
int[] | getLogicalRangesForVisualSelection(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) Returns the logical ranges of text corresponding to a visual selection.
TextHitInfo | getNextLeftHit(int offset) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | getNextLeftHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | getNextLeftHit(TextHitInfo hit) Returns the hit for the next caret to the left (top); if no such hit, returns null.
TextHitInfo | getNextRightHit(int offset) Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
TextHitInfo | getNextRightHit(int offset, TextLayout.CaretPolicy policy) Returns the hit for the next caret to the right (bottom); if no such hit, returns null.
TextHitInfo | getNextRightHit(TextHitInfo hit) Returns the hit for the next caret to the right (bottom); if there is no such hit, returns null.
Shape | getOutline(AffineTransform tx) Returns a Shape representing the outline of this TextLayout.
float | getVisibleAdvance() Returns the advance of this TextLayout, minus trailing whitespace.
Shape | getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) Returns a Shape enclosing the visual selection in the specified range, extended to the bounds.
Shape | getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) Returns a path enclosing the visual selection in the specified range, extended to bounds.
TextHitInfo | getVisualOtherHit(TextHitInfo hit) Returns the hit on the opposite side of the specified hit's caret.
protected void | handleJustify(float justificationWidth) Justify this layout.
int | hashCode() Returns the hash code of this TextLayout.
TextHitInfo | hitTestChar(float x, float y) Returns a TextHitInfo corresponding to the specified point.
TextHitInfo | hitTestChar(float x, float y, Rectangle2D bounds) Returns a TextHitInfo corresponding to the specified point.
boolean | isLeftToRight() Returns true if this TextLayout has a left-to-right base direction or false if it has a right-to-left base direction.
boolean | isVertical() Returns true if this TextLayout is vertical.
String | toString() Returns debugging information for this TextLayout.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_CARET_POLICY

public static final TextLayout.CaretPolicy DEFAULT_CARET_POLICY
This CaretPolicy is used when a policy is not specified by the client. With this policy, a hit on a character whose direction is the same as the line direction is stronger than a hit on a counterdirectional character. If the characters' directions are the same, a hit on the leading edge of a character is stronger than a hit on the trailing edge of a character.
Constructor Detail

TextLayout

public TextLayout(String string,
                  Font font,
                  FontRenderContext frc)
Constructs a TextLayout from a String and a Font. All the text is styled using the specified Font.

The String must specify a single paragraph of text, because an entire paragraph is required for the bidirectional algorithm.

Parameters:
str - the text to display
font - a Font used to style the text
frc - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.

TextLayout

public TextLayout(String string,
                  Map attributes,
                  FontRenderContext frc)
Constructs a TextLayout from a String and an attribute set.

All the text is styled using the provided attributes.

string must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm.

Parameters:
str - the text to display
attributes - the attributes used to style the text
frc - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.

TextLayout

public TextLayout(AttributedCharacterIterator text,
                  FontRenderContext frc)
Constructs a TextLayout from an iterator over styled text.

The iterator must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm.

Parameters:
text - the styled text to display
frc - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.
Method Detail

clone

protected Object clone()
Creates a copy of this TextLayout.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

getJustifiedLayout

public TextLayout getJustifiedLayout(float justificationWidth)
Creates a copy of this TextLayout justified to the specified width.

If this TextLayout has already been justified, an exception is thrown. If this TextLayout object's justification ratio is zero, a TextLayout identical to this TextLayout is returned.

Parameters:
justificationWidth - the width to use when justifying the line. For best results, it should not be too different from the current advance of the line.
Returns:
a TextLayout justified to the specified width.
Throws:
Error - if this layout has already been justified, an Error is thrown.

handleJustify

protected void handleJustify(float justificationWidth)
Justify this layout. Overridden by subclassers to control justification (if there were subclassers, that is...) The layout will only justify if the paragraph attributes (from the source text, possibly defaulted by the layout attributes) indicate a non-zero justification ratio. The text will be justified to the indicated width. The current implementation also adjusts hanging punctuation and trailing whitespace to overhang the justification width. Once justified, the layout may not be rejustified.

Some code may rely on immutablity of layouts. Subclassers should not call this directly, but instead should call getJustifiedLayout, which will call this method on a clone of this layout, preserving the original.

Parameters:
justificationWidth - the width to use when justifying the line. For best results, it should not be too different from the current advance of the line.
See Also:
getJustifiedLayout(float)

getBaseline

public byte getBaseline()
Returns the baseline for this TextLayout. The baseline is one of the values defined in Font, which are roman, centered and hanging. Ascent and descent are relative to this baseline. The baselineOffsets are also relative to this baseline.
Returns:
the baseline of this TextLayout.
See Also:
getBaselineOffsets(), Font

getBaselineOffsets

public float[] getBaselineOffsets()
Returns the offsets array for the baselines used for this TextLayout.

The array is indexed by one of the values defined in Font, which are roman, centered and hanging. The values are relative to this TextLayout object's baseline, so that getBaselineOffsets[getBaseline()] == 0. Offsets are added to the position of the TextLayout object's baseline to get the position for the new baseline.

Returns:
the offsets array containing the baselines used for this TextLayout.
See Also:
getBaseline(), Font

getAdvance

public float getAdvance()
Returns the advance of this TextLayout. The advance is the distance from the origin to the advance of the rightmost (bottommost) character measuring in the line direction.
Returns:
the advance of this TextLayout.

getVisibleAdvance

public float getVisibleAdvance()
Returns the advance of this TextLayout, minus trailing whitespace.
Returns:
the advance of this TextLayout without the trailing whitespace.
See Also:
getAdvance()

getAscent

public float getAscent()
Returns the ascent of this TextLayout. The ascent is the distance from the top (right) of the TextLayout to the baseline. It is always either positive or zero. The ascent is sufficient to accomodate superscripted text and is the maximum of the sum of the ascent, offset, and baseline of each glyph.
Returns:
the ascent of this TextLayout.

getDescent

public float getDescent()
Returns the descent of this TextLayout. The descent is the distance from the baseline to the bottom (left) of the TextLayout. It is always either positive or zero. The descent is sufficient to accomodate subscripted text and is the maximum of the sum of the descent, offset, and baseline of each glyph.
Returns:
the descent of this TextLayout.

getLeading

public float getLeading()
Returns the leading of the TextLayout. The leading is the suggested interline spacing for this TextLayout.

The leading is computed from the leading, descent, and baseline of all glyphvectors in the TextLayout. The algorithm is roughly as follows:

 maxD = 0;
 maxDL = 0;
 for (GlyphVector g in all glyphvectors) {
    maxD = max(maxD, g.getDescent() + offsets[g.getBaseline()]);
    maxDL = max(maxDL, g.getDescent() + g.getLeading() +
                       offsets[g.getBaseline()]);
 }
 return maxDL - maxD;
Returns:
the leading of this TextLayout.

getBounds

public Rectangle2D getBounds()
Returns the bounds of this TextLayout. The bounds contains all of the pixels the TextLayout can draw. It might not coincide exactly with the ascent, descent, origin or advance of the TextLayout.
Returns:
a Rectangle2D that is the bounds of this TextLayout.

isLeftToRight

public boolean isLeftToRight()
Returns true if this TextLayout has a left-to-right base direction or false if it has a right-to-left base direction. The TextLayout has a base direction of either left-to-right (LTR) or right-to-left (RTL). The base direction is independent of the actual direction of text on the line, which may be either LTR, RTL, or mixed. Left-to-right layouts by default should position flush left. If the layout is on a tabbed line, the tabs run left to right, so that logically successive layouts position left to right. The opposite is true for RTL layouts. By default they should position flush left, and tabs run right-to-left.
Returns:
true if the base direction of this TextLayout is left-to-right; false otherwise.

isVertical

public boolean isVertical()
Returns true if this TextLayout is vertical.
Returns:
true if this TextLayout is vertical; false otherwise.

getCharacterCount

public int getCharacterCount()
Returns the number of characters represented by this TextLayout.
Returns:
the number of characters in this TextLayout.

getCaretInfo

public float[] getCaretInfo(TextHitInfo hit,
                            Rectangle2D bounds)
Returns information about the caret corresponding to hit. The first element of the array is the intersection of the caret with the baseline. The second element of the array is the inverse slope (run/rise) of the caret.

This method is meant for informational use. To display carets, it is better to use getCaretShapes.

Parameters:
hit - a hit on a character in this TextLayout
bounds - the bounds to which the caret info is constructed
Returns:
a two-element array containing the position and slope of the caret.
See Also:
getCaretShapes(int, Rectangle2D, TextLayout.CaretPolicy), Font.getItalicAngle()

getCaretInfo

public float[] getCaretInfo(TextHitInfo hit)
Returns information about the caret corresponding to hit. This method is a convenience overload of getCaretInfo and uses the natural bounds of this TextLayout.
Parameters:
hit - a hit on a character in this TextLayout
Returns:
the information about a caret corresponding to a hit.

getNextRightHit

public TextHitInfo getNextRightHit(TextHitInfo hit)
Returns the hit for the next caret to the right (bottom); if there is no such hit, returns null. If the hit character index is out of bounds, an IllegalArgumentException is thrown.
Parameters:
hit - a hit on a character in this layout
Returns:
a hit whose caret appears at the next position to the right (bottom) of the caret of the provided hit or null.

getNextRightHit

public TextHitInfo getNextRightHit(int offset,
                                   TextLayout.CaretPolicy policy)
Returns the hit for the next caret to the right (bottom); if no such hit, returns null. The hit is to the right of the strong caret at the specified offset, as determined by the specified policy. The returned hit is the stronger of the two possible hits, as determined by the specified policy.
Parameters:
offset - an insertion offset in this TextLayout. Cannot be less than 0 or greater than this TextLayout object's character count.
policy - the policy used to select the strong caret
Returns:
a hit whose caret appears at the next position to the right (bottom) of the caret of the provided hit, or null.

getNextRightHit

public TextHitInfo getNextRightHit(int offset)
Returns the hit for the next caret to the right (bottom); if no such hit, returns null. The hit is to the right of the strong caret at the specified offset, as determined by the default policy. The returned hit is the stronger of the two possible hits, as determined by the default policy.
Parameters:
offset - an insertion offset in this TextLayout. Cannot be less than 0 or greater than the TextLayout object's character count.
Returns:
a hit whose caret appears at the next position to the right (bottom) of the caret of the provided hit, or null.

getNextLeftHit

public TextHitInfo getNextLeftHit(TextHitInfo hit)
Returns the hit for the next caret to the left (top); if no such hit, returns null. If the hit character index is out of bounds, an IllegalArgumentException is thrown.
Parameters:
hit - a hit on a character in this TextLayout.
Returns:
a hit whose caret appears at the next position to the left (top) of the caret of the provided hit, or null.

getNextLeftHit

public TextHitInfo getNextLeftHit(int offset,
                                  TextLayout.CaretPolicy policy)
Returns the hit for the next caret to the left (top); if no such hit, returns null. The hit is to the left of the strong caret at the specified offset, as determined by the specified policy. The returned hit is the stronger of the two possible hits, as determined by the specified policy.
Parameters:
offset - an insertion offset in this TextLayout. Cannot be less than 0 or greater than this TextLayout object's character count.
policy - the policy used to select the strong caret
Returns:
a hit whose caret appears at the next position to the left (top) of the caret of the provided hit, or null.

getNextLeftHit

public TextHitInfo getNextLeftHit(int offset)
Returns the hit for the next caret to the left (top); if no such hit, returns null. The hit is to the left of the strong caret at the specified offset, as determined by the default policy. The returned hit is the stronger of the two possible hits, as determined by the default policy.
Parameters:
offset - an insertion offset in this TextLayout. Cannot be less than 0 or greater than this TextLayout object's character count.
Returns:
a hit whose caret appears at the next position to the left (top) of the caret of the provided hit, or null.

getVisualOtherHit

public TextHitInfo getVisualOtherHit(TextHitInfo hit)
Returns the hit on the opposite side of the specified hit's caret.
Parameters:
hit - the specified hit
Returns:
a hit that is on the opposite side of the specified hit's caret.

getCaretShape

public Shape getCaretShape(TextHitInfo hit,
                           Rectangle2D bounds)
Returns a Shape representing the caret at the specified hit inside the specified bounds.
Parameters:
hit - the hit at which to generate the caret
bounds - the bounds of the TextLayout to use in generating the caret.
Returns:
a Shape representing the caret.

getCaretShape

public Shape getCaretShape(TextHitInfo hit)
Returns a Shape representing the caret at the specified hit inside the natural bounds of this TextLayout.
Parameters:
hit - the hit at which to generate the caret
Returns:
a Shape representing the caret.

getCharacterLevel

public byte getCharacterLevel(int index)
Returns the level of the character at index. Indices -1 and characterCount are assigned the base level of this TextLayout.
Parameters:
index - the index of the character from which to get the level
Returns:
the level of the character at the specified index.

getCaretShapes

public Shape[] getCaretShapes(int offset,
                              Rectangle2D bounds,
                              TextLayout.CaretPolicy policy)
Returns two paths corresponding to the strong and weak caret.
Parameters:
offset - an offset in this TextLayout
bounds - the bounds to which to extend the carets
policy - the specified CaretPolicy
Returns:
an array of two paths. Element zero is the strong caret. If there are two carets, element one is the weak caret, otherwise it is null.

getCaretShapes

public Shape[] getCaretShapes(int offset,
                              Rectangle2D bounds)
Returns two paths corresponding to the strong and weak caret. This method is a convenience overload of getCaretShapes that uses the default caret policy.
Parameters:
offset - an offset in this TextLayout
bounds - the bounds to which to extend the carets
Returns:
two paths corresponding to the strong and weak caret as defined by the DEFAULT_CARET_POLICY

getCaretShapes

public Shape[] getCaretShapes(int offset)
Returns two paths corresponding to the strong and weak caret. This method is a convenience overload of getCaretShapes that uses the default caret policy and this TextLayout object's natural bounds.
Parameters:
offset - an offset in this TextLayout
bounds - the bounds to which to extend the carets
Returns:
two paths corresponding to the strong and weak caret as defined by the DEFAULT_CARET_POLICY

getLogicalRangesForVisualSelection

public int[] getLogicalRangesForVisualSelection(TextHitInfo firstEndpoint,
                                                TextHitInfo secondEndpoint)
Returns the logical ranges of text corresponding to a visual selection.
Parameters:
firstEndpoint - an endpoint of the visual range
secondEndpoint - the other endpoint of the visual range. This endpoint can be less than firstEndpoint.
Returns:
an array of integers representing start/limit pairs for the selected ranges.
See Also:
getVisualHighlightShape(TextHitInfo, TextHitInfo, Rectangle2D)

getVisualHighlightShape

public Shape getVisualHighlightShape(TextHitInfo firstEndpoint,
                                     TextHitInfo secondEndpoint,
                                     Rectangle2D bounds)
Returns a path enclosing the visual selection in the specified range, extended to bounds.

If the selection includes the leftmost (topmost) position, the selection is extended to the left (top) of bounds. If the selection includes the rightmost (bottommost) position, the selection is extended to the right (bottom) of the bounds. The height (width on vertical lines) of the selection is always extended to bounds.

Although the selection is always contiguous, the logically selected text can be discontiguous on lines with mixed-direction text. The logical ranges of text selected can be retrieved using getLogicalRangesForVisualSelection. For example, consider the text 'ABCdef' where capital letters indicate right-to-left text, rendered on a right-to-left line, with a visual selection from 0L (the leading edge of 'A') to 3T (the trailing edge of 'd'). The text appears as follows, with bold underlined areas representing the selection:

    defCBA
The logical selection ranges are 0-3, 4-6 (ABC, ef) because the visually contiguous text is logically discontiguous. Also note that since the rightmost position on the layout (to the right of 'A') is selected, the selection is extended to the right of the bounds.
Parameters:
firstEndpoint - one end of the visual selection
secondEndpoint - the other end of the visual selection
bounds - the bounding rectangle to which to extend the selection
Returns:
a Shape enclosing the selection.
See Also:
getLogicalRangesForVisualSelection(TextHitInfo, TextHitInfo), getLogicalHighlightShape(int, int, Rectangle2D)

getVisualHighlightShape

public Shape getVisualHighlightShape(TextHitInfo firstEndpoint,
                                     TextHitInfo secondEndpoint)
Returns a Shape enclosing the visual selection in the specified range, extended to the bounds. This method is a convenience overload of getVisualHighlightShape that uses the natural bounds of this TextLayout.
Parameters:
firstEndpoint - one end of the visual selection
secondEndpoint - the other end of the visual selection
Returns:
a Shape enclosing the selection.

getLogicalHighlightShape

public Shape getLogicalHighlightShape(int firstEndpoint,
                                      int secondEndpoint,
                                      Rectangle2D bounds)
Returns a Shape enclosing the logical selection in the specified range, extended to the specified bounds.

If the selection range includes the first logical character, the selection is extended to the portion of bounds before the start of this TextLayout. If the range includes the last logical character, the selection is extended to the portion of bounds after the end of this TextLayout. The height (width on vertical lines) of the selection is always extended to bounds.

The selection can be discontiguous on lines with mixed-direction text. Only those characters in the logical range between start and limit appear selected. For example, consider the text 'ABCdef' where capital letters indicate right-to-left text, rendered on a right-to-left line, with a logical selection from 0 to 4 ('ABCd'). The text appears as follows, with bold standing in for the selection, and underlining for the extension:

    defCBA
The selection is discontiguous because the selected characters are visually discontiguous. Also note that since the range includes the first logical character (A), the selection is extended to the portion of the bounds before the start of the layout, which in this case (a right-to-left line) is the right portion of the bounds.
Parameters:
firstEndpoint - an endpoint in the range of characters to select
secondEndpoint - the other endpoint of the range of characters to select. Can be less than firstEndpoint. The range includes the character at min(firstEndpoint, secondEndpoint), but excludes max(firstEndpoint, secondEndpoint).
bounds - the bounding rectangle to which to extend the selection
Returns:
an area enclosing the selection.
See Also:
getVisualHighlightShape(TextHitInfo, TextHitInfo, Rectangle2D)

getLogicalHighlightShape

public Shape getLogicalHighlightShape(int firstEndpoint,
                                      int secondEndpoint)
Returns a Shape enclosing the logical selection in the specified range, extended to the natural bounds of this TextLayout. This method is a convenience overload of getLogicalHighlightShape that uses the natural bounds of this TextLayout.
Parameters:
firstEndpoint - an endpoint in the range of characters to select
secondEndpoint - the other endpoint of the range of characters to select. Can be less than firstEndpoint. The range includes the character at min(firstEndpoint, secondEndpoint), but excludes max(firstEndpoint, secondEndpoint).
Returns:
a Shape enclosing the selection.

getBlackBoxBounds

public Shape getBlackBoxBounds(int firstEndpoint,
                               int secondEndpoint)
Returns the black box bounds of the characters in the specified range. The black box bounds is an area consisting of the union of the bounding boxes of all the glyphs corresponding to the characters between start and limit. This path may be disjoint.
Parameters:
firstEndpoint - one end of the character range
secondEndpoint - the other end of the character range. Can be less than firstEndpoint.
Returns:
a path enclosing the black box bounds.

hitTestChar

public TextHitInfo hitTestChar(float x,
                               float y,
                               Rectangle2D bounds)
Returns a TextHitInfo corresponding to the specified point. Coordinates outside the bounds of the TextLayout map to hits on the leading edge of the first logical character, or the trailing edge of the last logical character, as appropriate, regardless of the position of that character in the line. Only the direction along the baseline is used to make this evaluation.
Parameters:
x - the x offset from the origin of this TextLayout
y - the y offset from the origin of this TextLayout
bounds - the bounds of the TextLayout
Returns:
a hit describing the character and edge (leading or trailing) under the specified point.

hitTestChar

public TextHitInfo hitTestChar(float x,
                               float y)
Returns a TextHitInfo corresponding to the specified point. This method is a convenience overload of hitTestChar that uses the natural bounds of this TextLayout.
Parameters:
x - the x offset from the origin of this TextLayout
y - the y offset from the origin of this TextLayout
Returns:
a hit describing the character and edge (leading or trailing) under the specified point.

hashCode

public int hashCode()
Returns the hash code of this TextLayout.
Overrides:
hashCode in class Object
Returns:
the hash code of this TextLayout.

equals

public boolean equals(Object obj)
Returns true if the specified Object is a TextLayout object and if the specified Object equals this TextLayout.
Overrides:
equals in class Object
Parameters:
obj - an Object to test for equality
Returns:
true if the specified Object equals this TextLayout; false otherwise.

equals

public boolean equals(TextLayout rhs)
Returns true if the two layouts are equal. Two layouts are equal if they contain equal glyphvectors in the same order.
Parameters:
rhs - the TextLayout to compare to this TextLayout
Returns:
true if the specified TextLayout equals this TextLayout.

toString

public String toString()
Returns debugging information for this TextLayout.
Overrides:
toString in class Object
Returns:
the textLine of this TextLayout as a String.

draw

public void draw(Graphics2D g2,
                 float x,
                 float y)
Renders this TextLayout at the specified location in the specified Graphics2D context. The origin of the layout is placed at x, y. Rendering may touch any point within getBounds() of this position. This leaves the g2 unchanged.
Parameters:
g2 - the Graphics2D context into which to render the layout
x, y - the coordinates of the origin of this TextLayout
See Also:
getBounds()

getOutline

public Shape getOutline(AffineTransform tx)
Returns a Shape representing the outline of this TextLayout.
Parameters:
tx - an optional AffineTransform to apply to the outline of this TextLayout.
Returns:
a Shape that is the outline of this TextLayout.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextMeasurer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TextMeasurer

java.lang.Object
  |
  +--java.awt.font.TextMeasurer
public final class TextMeasurer
extends Object

TextMeasurer provides the primitive operations needed for line break: measuring up to a given advance, determining the advance of a range of characters, and generating a TextLayout for a range of characters. It also provides methods for incremental editing of paragraphs.

Most clients will use the more convenient LineBreakMeasurer, which implements the standard line break policy (placing as many words as will fit on each line).

Since:
1.3
See Also:
LineBreakMeasurer

Constructor Summary
TextMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextMeasurer from the source text.
Method Summary
void | deleteChar(AttributedCharacterIterator newParagraph, int deletePos) Updates the TextMeasurer after a single character has been deleted from the paragraph currently represented by this TextMeasurer.
float | getAdvanceBetween(int start, int limit) Returns the graphical width of a line beginning at start and including characters up to limit.
TextLayout | getLayout(int start, int limit) Returns a TextLayout on the given character range.
int | getLineBreakIndex(int start, float maxAdvance) Returns the index of the first character which will not fit on on a line which begins at start and may be up to maxAdvance in graphical width.
void | insertChar(AttributedCharacterIterator newParagraph, int insertPos) Updates the TextMeasurer after a single character has been inserted into the paragraph currently represented by this TextMeasurer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextMeasurer

public TextMeasurer(AttributedCharacterIterator text,
                    FontRenderContext frc)
Constructs a TextMeasurer from the source text. The source text should be a single entire paragraph.
Parameters:
text - the source paragraph. Cannot be null.
frc - the information about a graphics device which is needed to measure the text correctly. Cannot be null.
Method Detail

getLineBreakIndex

public int getLineBreakIndex(int start,
                             float maxAdvance)
Returns the index of the first character which will not fit on on a line which begins at start and may be up to maxAdvance in graphical width.
Parameters:
start - the character index at which to start measuring. start is an absolute index, not relative to the start of the paragraph
maxAdvance - the graphical width in which the line must fit
Returns:
the index after the last character which will fit on a line beginning at start, which is not longer than maxAdvance in graphical width

getAdvanceBetween

public float getAdvanceBetween(int start,
                               int limit)
Returns the graphical width of a line beginning at start and including characters up to limit. start and limit are absolute indices, not relative to the start of the paragraph.
Parameters:
start - the character index at which to start measuring
limit - the character index at which to stop measuring
Returns:
the graphical width of a line beginning at start and including characters up to limit

getLayout

public TextLayout getLayout(int start,
                            int limit)
Returns a TextLayout on the given character range.
Parameters:
start - the index of the first character
limit - the index after the last character. Must be greater than start
Returns:
a TextLayout for the characters beginning at start up to (but not including) limit

insertChar

public void insertChar(AttributedCharacterIterator newParagraph,
                       int insertPos)
Updates the TextMeasurer after a single character has been inserted into the paragraph currently represented by this TextMeasurer. After this call, this TextMeasurer is equivalent to a new TextMeasurer created from the text; however, it will usually be more efficient to update an existing TextMeasurer than to create a new one from scratch.
Parameters:
newParagraph - the text of the paragraph after performing the insertion. Cannot be null.
insertPos - the position in the text where the character was inserted. Must not be less than the start of newParagraph, and must be less than the end of newParagraph.

deleteChar

public void deleteChar(AttributedCharacterIterator newParagraph,
                       int deletePos)
Updates the TextMeasurer after a single character has been deleted from the paragraph currently represented by this TextMeasurer. After this call, this TextMeasurer is equivalent to a new TextMeasurer created from the text; however, it will usually be more efficient to update an existing TextMeasurer than to create a new one from scratch.
Parameters:
newParagraph - the text of the paragraph after performing the deletion. Cannot be null.
deletePos - the position in the text where the character was removed. Must not be less than the start of newParagraph, and must not be greater than the end of newParagraph.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TransformAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.font
Class TransformAttribute

java.lang.Object
  |
  +--java.awt.font.TransformAttribute
All Implemented Interfaces:
Serializable
public final class TransformAttribute
extends Object
implements Serializable

The TransformAttribute class provides an immutable wrapper for a transform so that it is safe to use as an attribute.

See Also:
Serialized Form

Constructor Summary
TransformAttribute(AffineTransform transform)
Wraps the specified transform.
Method Summary
 AffineTransform getTransform()
Returns a copy of the wrapped transform.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TransformAttribute

public TransformAttribute(AffineTransform transform)
Wraps the specified transform. The transform is cloned and a reference to the clone is kept. The original transform is unchanged.
Parameters:
transform - the specified AffineTransform to be wrapped
Method Detail

getTransform

public AffineTransform getTransform()
Returns a copy of the wrapped transform.
Returns:
a AffineTransform that is a copy of the wrapped transform of this TransformAttribute.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FontFormatException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class FontFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.FontFormatException
All Implemented Interfaces:
Serializable
public class FontFormatException
extends Exception

Thrown by method createFont in the Font class to indicate that the specified font is bad.

Since:
1.3
See Also:
Font, Serialized Form

Constructor Summary
FontFormatException(String reason)
Report a FontFormatException for the reason specified.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FontFormatException

public FontFormatException(String reason)
Report a FontFormatException for the reason specified.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontMetrics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class FontMetrics

java.lang.Object
  |
  +--java.awt.FontMetrics
All Implemented Interfaces:
Serializable
public abstract class FontMetrics
extends Object
implements Serializable

The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.

Note to subclassers: Since many of these methods form closed, mutually recursive loops, you must take care that you implement at least one of the methods in each such loop to prevent infinite recursion when your subclass is used. In particular, the following is the minimal suggested set of methods to override in order to ensure correctness and prevent infinite recursion (though other subsets are equally feasible):

  • getAscent()
  • getLeading()
  • getMaxAdvance()
  • charWidth(char)
  • charsWidth(char[], int, int)

Note that the implementations of these methods are inefficient, so they are usually overridden with more efficient toolkit-specific implementations.

When an application asks AWT to place a character at the position (x, y), the character is placed so that its reference point (shown as the dot in the accompanying image) is put at that position. The reference point specifies a horizontal line called the baseline of the character. In normal printing, the baselines of characters should align.

In addition, every character in a font has an ascent, a descent, and an advance width. The ascent is the amount by which the character ascends above the baseline. The descent is the amount by which the character descends below the baseline. The advance width indicates the position at which AWT should place the next character.

An array of characters or a string can also have an ascent, a descent, and an advance width. The ascent of the array is the maximum ascent of any character in the array. The descent is the maximum descent of any character in the array. The advance width is the sum of the advance widths of each of the characters in the character array. The advance of a String is the distance along the baseline of the String. This distance is the width that should be used for centering or right-aligning the String. Note that the advance of a String is not necessarily the sum of the advances of its characters measured in isolation because the width of a character can vary depending on its context. For example, in Arabic text, the shape of a character can change in order to connect to other characters. Also, in some scripts, certain character sequences can be represented by a single shape, called a ligature. Measuring characters individually does not account for these transformations.

Since:
JDK1.0
See Also:
Font, Serialized Form

Field Summary
protected  Font font
The actual Font from which the font metrics are created.
Constructor Summary
protected FontMetrics(Font font)
Creates a new FontMetrics object for finding out height and width information about the specified Font and specific character glyphs in that Font.
Method Summary
 int bytesWidth(byte[] data, int off, int len)
Returns the total advance width for showing the specified array of bytes in this Font.
 int charsWidth(char[] data, int off, int len)
Returns the total advance width for showing the specified array of characters in this Font.
 int charWidth(char ch)
Returns the advance width of the specified character in this Font.
 int charWidth(int ch)
Returns the advance width of the specified character in this Font.
 int getAscent()
Determines the font ascent of the Font described by this FontMetrics object.
 int getDescent()
Determines the font descent of the Font described by this FontMetrics object.
 Font getFont()
Gets the Font described by this FontMetrics object.
 int getHeight()
Gets the standard height of a line of text in this font.
 int getLeading()
Determines the standard leading of the Font described by this FontMetrics object.
 LineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)
Returns the LineMetrics object for the specified character array in the specified Graphics context.
 LineMetrics getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)
Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
 LineMetrics getLineMetrics(String str, Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
 LineMetrics getLineMetrics(String str, int beginIndex, int limit, Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
 int getMaxAdvance()
Gets the maximum advance width of any character in this Font.
 int getMaxAscent()
Determines the maximum ascent of the Font described by this FontMetrics object.
 Rectangle2D getMaxCharBounds(Graphics context)
Returns the bounds for the character with the maximum bounds in the specified Graphics context.
 int getMaxDecent()
Deprecated. As of JDK version 1.1.1, replaced by getMaxDescent().
 int getMaxDescent()
Determines the maximum descent of the Font described by this FontMetrics object.
 Rectangle2D getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
Returns the bounds of the specified array of characters in the specified Graphics context.
 Rectangle2D getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
 Rectangle2D getStringBounds(String str, Graphics context)
Returns the bounds of the specified String in the specified Graphics context.
 Rectangle2D getStringBounds(String str, int beginIndex, int limit, Graphics context)
Returns the bounds of the specified String in the specified Graphics context.
 int[] getWidths()
Gets the advance widths of the first 256 characters in the Font.
 boolean hasUniformLineMetrics()
Checks to see if the Font has uniform line metrics.
 int stringWidth(String str)
Returns the total advance width for showing the specified String in this Font.
 String toString()
Returns a representation of this FontMetrics object's values as a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

font

protected Font font
The actual Font from which the font metrics are created. This cannot be null.
See Also:
getFont()
Constructor Detail

FontMetrics

protected FontMetrics(Font font)
Creates a new FontMetrics object for finding out height and width information about the specified Font and specific character glyphs in that Font.
Parameters:
font - the Font
See Also:
Font
Method Detail

getFont

public Font getFont()
Gets the Font described by this FontMetrics object.
Returns:
the Font described by this FontMetrics object.

getLeading

public int getLeading()
Determines the standard leading of the Font described by this FontMetrics object. The standard leading, or interline spacing, is the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line. The height metric is calculated to include this extra space.
Returns:
the standard leading of the Font.
See Also:
getHeight(),
getAscent(),
getDescent()

getAscent

public int getAscent()
Determines the font ascent of the Font described by this FontMetrics object. The font ascent is the distance from the font's baseline to the top of most alphanumeric characters. Some characters in the Font might extend above the font ascent line.
Returns:
the font ascent of the Font.
See Also:
getMaxAscent()

getDescent

public int getDescent()
Determines the font descent of the Font described by this FontMetrics object. The font descent is the distance from the font's baseline to the bottom of most alphanumeric characters with descenders. Some characters in the Font might extend below the font descent line.
Returns:
the font descent of the Font.
See Also:
getMaxDescent()

getHeight

public int getHeight()
Gets the standard height of a line of text in this font. This is the distance between the baseline of adjacent lines of text. It is the sum of the leading + ascent + descent. There is no guarantee that lines of text spaced at this distance are disjoint; such lines may overlap if some characters overshoot either the standard ascent or the standard descent metric.
Returns:
the standard height of the font.
See Also:
getLeading(),
getAscent(),
getDescent()

getMaxAscent

public int getMaxAscent()
Determines the maximum ascent of the Font described by this FontMetrics object. No character extends further above the font's baseline than this height.
Returns:
the maximum ascent of any character in the Font.
See Also:
getAscent()

getMaxDescent

public int getMaxDescent()
Determines the maximum descent of the Font described by this FontMetrics object. No character extends further below the font's baseline than this height.
Returns:
the maximum descent of any character in the Font.
See Also:
getDescent()

getMaxDecent

public int getMaxDecent()
Deprecated. As of JDK version 1.1.1, replaced by getMaxDescent().

For backward compatibility only.
See Also:
getMaxDescent()

getMaxAdvance

public int getMaxAdvance()
Gets the maximum advance width of any character in this Font. The advance is the distance from the leftmost point to the rightmost point on the string's baseline. The advance of a String is not necessarily the sum of the advances of its characters.
Returns:
the maximum advance width of any character in the Font, or -1 if the maximum advance width is not known.

charWidth

public int charWidth(int ch)
Returns the advance width of the specified character in this Font. The advance is the distance from the leftmost point to the rightmost point on the character's baseline. Note that the advance of a String is not necessarily the sum of the advances of its characters.
Parameters:
ch - the character to be measured
Returns:
the advance width of the specified char in the Font described by this FontMetrics object.
See Also:
charsWidth(char[], int, int), stringWidth(String)

charWidth

public int charWidth(char ch)
Returns the advance width of the specified character in this Font. The advance is the distance from the leftmost point to the rightmost point on the character's baseline. Note that the advance of a String is not necessarily the sum of the advances of its characters.
Returns:
the advance width of the specified char in the Font described by this FontMetrics object.
See Also:
charsWidth(char[], int, int), stringWidth(String)

stringWidth

public int stringWidth(String str)
Returns the total advance width for showing the specified String in this Font. The advance is the distance from the leftmost point to the rightmost point on the string's baseline.

Note that the total advance width returned from this method does not take into account the rendering context. Therefore, the anti-aliasing and fractional metrics hints can affect the value of the advance. When enabling the anti-aliasing and fractional metrics hints, use getStringBounds(String, Graphics) instead of this method. The advance of a String is not necessarily the sum of the advances of its characters.

Parameters:
str - the String to be measured
Returns:
the advance width of the specified String in the Font described by this FontMetrics.
See Also:
bytesWidth(byte[], int, int),
charsWidth(char[], int, int),
getStringBounds(String, Graphics)

charsWidth

public int charsWidth(char[] data,
                      int off,
                      int len)
Returns the total advance width for showing the specified array of characters in this Font. The advance is the distance from the leftmost point to the rightmost point on the string's baseline. The advance of a String is not necessarily the sum of the advances of its characters. This is equivalent to measuring a String of the characters in the specified range.
Parameters:
data - the array of characters to be measured
off - the start offset of the characters in the array
len - the number of characters to be measured from the array
Returns:
the advance width of the subarray of the specified char array in the font described by this FontMetrics object.
See Also:
charWidth(int), charWidth(char), bytesWidth(byte[], int, int), stringWidth(String)

bytesWidth

public int bytesWidth(byte[] data,
                      int off,
                      int len)
Returns the total advance width for showing the specified array of bytes in this Font. The advance is the distance from the leftmost point to the rightmost point on the string's baseline. The advance of a String is not necessarily the sum of the advances of its characters. This is equivalent to measuring a String of the characters in the specified range.
Parameters:
data - the array of bytes to be measured
off - the start offset of the bytes in the array
len - the number of bytes to be measured from the array
Returns:
the advance width of the subarray of the specified byte array in the Font described by this FontMetrics object.
See Also:
charsWidth(char[], int, int), stringWidth(String)

getWidths

public int[] getWidths()
Gets the advance widths of the first 256 characters in the Font. The advance is the distance from the leftmost point to the rightmost point on the character's baseline. Note that the advance of a String is not necessarily the sum of the advances of its characters.
Returns:
an array storing the advance widths of the characters in the Font described by this FontMetrics object.

hasUniformLineMetrics

public boolean hasUniformLineMetrics()
Checks to see if the Font has uniform line metrics. A composite font may consist of several different fonts to cover various character sets. In such cases, the FontLineMetrics objects are not uniform. Different fonts may have a different ascent, descent, metrics and so on. This information is sometimes necessary for line measuring and line breaking.
Returns:
true if the font has uniform line metrics; false otherwise.
See Also:
Font.hasUniformLineMetrics()

getLineMetrics

public LineMetrics getLineMetrics(String str,
                                  Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
Parameters:
str - the specified String
context - the specified Graphics context
Returns:
a LineMetrics object created with the specified String and Graphics context.
See Also:
Font.getLineMetrics(String, FontRenderContext)

getLineMetrics

public LineMetrics getLineMetrics(String str,
                                  int beginIndex,
                                  int limit,
                                  Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
Parameters:
str - the specified String
beginIndex - the initial offset of str
limit - the length of str
context - the specified Graphics context
Returns:
a LineMetrics object created with the specified String and Graphics context.
See Also:
Font.getLineMetrics(String, int, int, FontRenderContext)

getLineMetrics

public LineMetrics getLineMetrics(char[] chars,
                                  int beginIndex,
                                  int limit,
                                  Graphics context)
Returns the LineMetrics object for the specified character array in the specified Graphics context.
Parameters:
chars - the specified character array
beginIndex - the initial offset of chars
limit - the length of chars
context - the specified Graphics context
Returns:
a LineMetrics object created with the specified character array and Graphics context.
See Also:
Font.getLineMetrics(char[], int, int, FontRenderContext)

getLineMetrics

public LineMetrics getLineMetrics(CharacterIterator ci,
                                  int beginIndex,
                                  int limit,
                                  Graphics context)
Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
Parameters:
ci - the specified CharacterIterator
beginIndex - the initial offset in ci
limit - the end index of ci
context - the specified Graphics context
Returns:
a LineMetrics object created with the specified arguments.
See Also:
Font.getLineMetrics(CharacterIterator, int, int, FontRenderContext)

getStringBounds

public Rectangle2D getStringBounds(String str,
                                   Graphics context)
Returns the bounds of the specified String in the specified Graphics context. The bounds is used to layout the String.
Parameters:
str - the specified String
context - the specified Graphics context
Returns:
a Rectangle2D that is the bounding box of the specified String in the specified Graphics context.
See Also:
Font.getStringBounds(String, FontRenderContext)

getStringBounds

public Rectangle2D getStringBounds(String str,
                                   int beginIndex,
                                   int limit,
                                   Graphics context)
Returns the bounds of the specified String in the specified Graphics context. The bounds is used to layout the String.
Parameters:
str - the specified String
beginIndex - the offset of the beginning of str
limit - the length of str
context - the specified Graphics context
Returns:
a Rectangle2D that is the bounding box of the specified String in the specified Graphics context.
See Also:
Font.getStringBounds(String, int, int, FontRenderContext)

getStringBounds

public Rectangle2D getStringBounds(char[] chars,
                                   int beginIndex,
                                   int limit,
                                   Graphics context)
Returns the bounds of the specified array of characters in the specified Graphics context. The bounds is used to layout the String created with the specified array of characters, beginIndex and limit.
Parameters:
chars - an array of characters
beginIndex - the initial offset of the array of characters
limit - the length of the array of characters
context - the specified Graphics context
Returns:
a Rectangle2D that is the bounding box of the specified character array in the specified Graphics context.
See Also:
Font.getStringBounds(char[], int, int, FontRenderContext)

getStringBounds

public Rectangle2D getStringBounds(CharacterIterator ci,
                                   int beginIndex,
                                   int limit,
                                   Graphics context)
Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
Parameters:
ci - the specified CharacterIterator
beginIndex - the initial offset in ci
limit - the end index of ci
context - the specified Graphics context
Returns:
a Rectangle2D that is the bounding box of the characters indexed in the specified CharacterIterator in the specified Graphics context.
See Also:
Font.getStringBounds(CharacterIterator, int, int, FontRenderContext)

getMaxCharBounds

public Rectangle2D getMaxCharBounds(Graphics context)
Returns the bounds for the character with the maximum bounds in the specified Graphics context.
Parameters:
context - the specified Graphics context
Returns:
a Rectangle2D that is the bounding box for the character with the maximum bounds.
See Also:
Font.getMaxCharBounds(FontRenderContext)

toString

public String toString()
Returns a representation of this FontMetrics object's values as a String.
Overrides:
toString in class Object
Returns:
a String representation of this FontMetrics object.
Since:
JDK1.0.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Frame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Frame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JFrame
public class Frame
extends Window
implements MenuContainer

A Frame is a top-level window with a title and a border.

The size of the frame includes any area designated for the border. The dimensions of the border area can be obtained using the getInsets method, however, since these dimensions are platform-dependent, a valid insets value cannot be obtained until the frame is made displayable by either calling pack or show. Since the border area is included in the overall size of the frame, the border effectively obscures a portion of the frame, constraining the area available for rendering and/or displaying subcomponents to the rectangle which has an upper-left corner location of (insets.left, insets.top), and has a size of width - (insets.left + insets.right) by height - (insets.top + insets.bottom).

The default layout for a frame is BorderLayout.

In a multi-screen environment, you can create a Frame on a different screen device by constructing the Frame with Frame(GraphicsConfiguration) or Frame(String title, GraphicsConfiguration). The GraphicsConfiguration object is one of the GraphicsConfiguration objects of the target screen device.

In a virtual device multi-screen environment in which the desktop area could span multiple physical screen devices, the bounds of all configurations are relative to the virtual-coordinate system. The origin of the virtual-coordinate system is at the upper left-hand corner of the primary physical screen. Depending on the location of the primary screen in the virtual device, negative coordinates are possible, as shown in the following figure.

ALIGN=center HSPACE=10 VSPACE=7>

In such an environment, when calling setLocation, you must pass a virtual coordinate to this method. Similarly, calling getLocationOnScreen on a Frame returns virtual device coordinates. Call the getBounds method of a GraphicsConfiguration to find its origin in the virtual coordinate system.

The following code sets the location of the Frame at (10, 10) relative to the origin of the physical screen of the corresponding GraphicsConfiguration. If the bounds of the GraphicsConfiguration is not taken into account, the Frame location would be set at (10, 10) relative to the virtual-coordinate system and would appear on the primary physical screen, which might be different from the physical screen of the specified GraphicsConfiguration.

      Frame f = new Frame(GraphicsConfiguration gc);
      Rectangle bounds = gc.getBounds();
      f.setLocation(10 + bounds.x, 10 + bounds.y);

Frames are capable of generating the following types of window events: WindowOpened, WindowClosing, WindowClosed, WindowIconified, WindowDeiconified, WindowActivated, WindowDeactivated.

Since:
JDK1.0
See Also:
WindowEvent, Window.addWindowListener(java.awt.event.WindowListener), Serialized Form

Inner Class Summary
protected  class Frame.AccessibleAWTFrame
This class implements accessibility support for the Frame class.
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | CROSSHAIR_CURSOR Deprecated. replaced by Cursor.CROSSHAIR_CURSOR.
static int | DEFAULT_CURSOR Deprecated. replaced by Cursor.DEFAULT_CURSOR.
static int | E_RESIZE_CURSOR Deprecated. replaced by Cursor.E_RESIZE_CURSOR.
static int | HAND_CURSOR Deprecated. replaced by Cursor.HAND_CURSOR.
static int | ICONIFIED
static int | MOVE_CURSOR Deprecated. replaced by Cursor.MOVE_CURSOR.
static int | N_RESIZE_CURSOR Deprecated. replaced by Cursor.N_RESIZE_CURSOR.
static int | NE_RESIZE_CURSOR Deprecated. replaced by Cursor.NE_RESIZE_CURSOR.
static int | NORMAL
static int | NW_RESIZE_CURSOR Deprecated. replaced by Cursor.NW_RESIZE_CURSOR.
static int | S_RESIZE_CURSOR Deprecated. replaced by Cursor.S_RESIZE_CURSOR.
static int | SE_RESIZE_CURSOR Deprecated. replaced by Cursor.SE_RESIZE_CURSOR.
static int | SW_RESIZE_CURSOR Deprecated. replaced by Cursor.SW_RESIZE_CURSOR.
static int | TEXT_CURSOR Deprecated. replaced by Cursor.TEXT_CURSOR.
static int | W_RESIZE_CURSOR Deprecated. replaced by Cursor.W_RESIZE_CURSOR.
static int | WAIT_CURSOR Deprecated. replaced by Cursor.WAIT_CURSOR.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Frame()
Constructs a new instance of Frame that is initially invisible.
Frame(GraphicsConfiguration gc)
Create a Frame with the specified GraphicsConfiguration of a screen device.
Frame(String title)
Constructs a new, initially invisible Frame object with the specified title.
Frame(String title, GraphicsConfiguration gc)
Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.
Method Summary
 void addNotify()
Makes this Frame displayable by connecting it to a native screen resource.
protected  void finalize()
We have to remove the (hard) reference to weakThis in the Vector, otherwise the WeakReference instance will never get garbage collected.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Frame.
 int getCursorType()
Deprecated. As of JDK version 1.1, replaced by Component.getCursor().
static Frame[] getFrames()
Returns an array containing all Frames created by the application.
 Image getIconImage()
Gets the image to be displayed in the minimized icon for this frame.
 MenuBar getMenuBar()
Gets the menu bar for this frame.
 int getState()
Gets the state of this frame.
 String getTitle()
Gets the title of the frame.
 boolean isResizable()
Indicates whether this frame is resizable by the user.
protected  String paramString()
Returns the parameter String of this Frame.
 void remove(MenuComponent m)
Removes the specified menu bar from this frame.
 void removeNotify()
Makes this Frame undisplayable by removing its connection to its native screen resource.
 void setCursor(int cursorType)
Deprecated. As of JDK version 1.1, replaced by Component.setCursor(Cursor).
 void setIconImage(Image image)
Sets the image to displayed in the minimized icon for this frame.
 void setMenuBar(MenuBar mb)
Sets the menu bar for this frame to the specified menu bar.
 void setResizable(boolean resizable)
Sets whether this frame is resizable by the user.
 void setState(int state)
Sets the state of this frame.
 void setTitle(String title)
Sets the title for this frame to the specified string.
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Field Detail

DEFAULT_CURSOR

public static final int DEFAULT_CURSOR
Deprecated. replaced by Cursor.DEFAULT_CURSOR.

CROSSHAIR_CURSOR

public static final int CROSSHAIR_CURSOR
Deprecated. replaced by Cursor.CROSSHAIR_CURSOR.

TEXT_CURSOR

public static final int TEXT_CURSOR
Deprecated. replaced by Cursor.TEXT_CURSOR.

WAIT_CURSOR

public static final int WAIT_CURSOR
Deprecated. replaced by Cursor.WAIT_CURSOR.

SW_RESIZE_CURSOR

public static final int SW_RESIZE_CURSOR
Deprecated. replaced by Cursor.SW_RESIZE_CURSOR.

SE_RESIZE_CURSOR

public static final int SE_RESIZE_CURSOR
Deprecated. replaced by Cursor.SE_RESIZE_CURSOR.

NW_RESIZE_CURSOR

public static final int NW_RESIZE_CURSOR
Deprecated. replaced by Cursor.NW_RESIZE_CURSOR.

NE_RESIZE_CURSOR

public static final int NE_RESIZE_CURSOR
Deprecated. replaced by Cursor.NE_RESIZE_CURSOR.

N_RESIZE_CURSOR

public static final int N_RESIZE_CURSOR
Deprecated. replaced by Cursor.N_RESIZE_CURSOR.

S_RESIZE_CURSOR

public static final int S_RESIZE_CURSOR
Deprecated. replaced by Cursor.S_RESIZE_CURSOR.

W_RESIZE_CURSOR

public static final int W_RESIZE_CURSOR
Deprecated. replaced by Cursor.W_RESIZE_CURSOR.

E_RESIZE_CURSOR

public static final int E_RESIZE_CURSOR
Deprecated. replaced by Cursor.E_RESIZE_CURSOR.

HAND_CURSOR

public static final int HAND_CURSOR
Deprecated. replaced by Cursor.HAND_CURSOR.

MOVE_CURSOR

public static final int MOVE_CURSOR
Deprecated. replaced by Cursor.MOVE_CURSOR.

NORMAL

public static final int NORMAL

ICONIFIED

public static final int ICONIFIED
Constructor Detail

Frame

public Frame()
Constructs a new instance of Frame that is initially invisible. The title of the Frame is empty.
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

Frame

public Frame(GraphicsConfiguration gc)
Create a Frame with the specified GraphicsConfiguration of a screen device.
Parameters:
gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
Throws:
IllegalArgumentException - if gc is not from a screen device.
Since:
1.3

Frame

public Frame(String title)
Constructs a new, initially invisible Frame object with the specified title.
Parameters:
title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
Throws:
IllegalArgumentException - if gc is not from a screen device.
See Also:
Component.setSize(int, int),
Component.setVisible(boolean),
GraphicsConfiguration.getBounds()

Frame

public Frame(String title,
             GraphicsConfiguration gc)
Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.
Parameters:
title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
Throws:
IllegalArgumentException - if gc is not from a screen device.
See Also:
Component.setSize(int, int),
Component.setVisible(boolean),
GraphicsConfiguration.getBounds()
Method Detail

finalize

protected void finalize()
                 throws Throwable
We have to remove the (hard) reference to weakThis in the Vector, otherwise the WeakReference instance will never get garbage collected.
Overrides:
finalize in class Window
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

addNotify

public void addNotify()
Makes this Frame displayable by connecting it to a native screen resource. Making a frame displayable will cause any of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs.
Overrides:
addNotify in class Window
See Also:
Component.isDisplayable(), removeNotify()

getTitle

public String getTitle()
Gets the title of the frame. The title is displayed in the frame's border.
Returns:
the title of this frame, or an empty string ("") if this frame doesn't have a title.
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(String title)
Sets the title for this frame to the specified string.
Parameters:
title - the title to be displayed in the frame's border
title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
See Also:
getTitle()

getIconImage

public Image getIconImage()
Gets the image to be displayed in the minimized icon for this frame.
Returns:
the icon image for this frame, or null if this frame doesn't have an icon image.
See Also:
setIconImage(java.awt.Image)

setIconImage

public void setIconImage(Image image)
Sets the image to displayed in the minimized icon for this frame. Not all platforms support the concept of minimizing a window.
Parameters:
image - the icon image to be displayed. If this parameter is null then the icon image is set to the default image, which may vary with platform.
See Also:
getIconImage()

getMenuBar

public MenuBar getMenuBar()
Gets the menu bar for this frame.
Returns:
the menu bar for this frame, or null if this frame doesn't have a menu bar.
See Also:
setMenuBar(java.awt.MenuBar)

setMenuBar

public void setMenuBar(MenuBar mb)
Sets the menu bar for this frame to the specified menu bar.
Parameters:
mb - the menu bar being set. If this parameter is null then any existing menu bar on this frame is removed.
See Also:
getMenuBar()

isResizable

public boolean isResizable()
Indicates whether this frame is resizable by the user. By default, all frames are initially resizable.
Returns:
true if the user can resize this frame; false otherwise.
See Also:
setResizable(boolean)

setResizable

public void setResizable(boolean resizable)
Sets whether this frame is resizable by the user.
Parameters:
resizable - true if this frame is resizable; false otherwise.
See Also:
isResizable()

setState

public void setState(int state)
Sets the state of this frame.
Parameters:
state - Frame.ICONIFIED if this frame is in iconic state; Frame.NORMAL if this frame is in normal state.
See Also:
getState()

getState

public int getState()
Gets the state of this frame.
Returns:
Frame.ICONIFIED if frame in iconic state; Frame.NORMAL if frame is in normal state.
See Also:
setState(int)

remove

public void remove(MenuComponent m)
Removes the specified menu bar from this frame.
Specified by:
remove in interface MenuContainer
Overrides:
remove in class Component
Parameters:
m - the menu component to remove. If this parameter is null then a NullPointerException is thrown and no action is taken.

removeNotify

public void removeNotify()
Makes this Frame undisplayable by removing its connection to its native screen resource. Making a Frame undisplayable will cause any of its children to be made undisplayable. This method is called by the toolkit internally and should not be called directly by programs.
Overrides:
removeNotify in class Container
See Also:
Component.isDisplayable(), addNotify()

paramString

protected String paramString()
Returns the parameter String of this Frame.
Overrides:
paramString in class Container
Following copied from class: java.awt.Container
Returns:
the parameter string of this container.

setCursor

public void setCursor(int cursorType)
Deprecated. As of JDK version 1.1, replaced by Component.setCursor(Cursor).

getCursorType

public int getCursorType()
Deprecated. As of JDK version 1.1, replaced by Component.getCursor().

getFrames

public static Frame[] getFrames()
Returns an array containing all Frames created by the application. If called from an applet, the array will only include the Frames accessible by that applet.
Since:
1.2

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Frame. For frames, the AccessibleContext takes the form of an AccessibleAWTFrame. A new AccessibleAWTFrame instance is created if necessary.
Overrides:
getAccessibleContext in class Window
Returns:
an AccessibleAWTFrame that serves as the AccessibleContext of this Frame
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.geom Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.geom

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.geom.AffineTransform (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.geom.Area (implements java.lang.Cloneable, java.awt.Shape)
    • class java.awt.geom.CubicCurve2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.CubicCurve2D.Double
      • class java.awt.geom.CubicCurve2D.Float
    • class java.awt.geom.Dimension2D (implements java.lang.Cloneable)
    • class java.awt.geom.FlatteningPathIterator (implements java.awt.geom.PathIterator)
    • class java.awt.geom.GeneralPath (implements java.lang.Cloneable, java.awt.Shape)
    • class java.awt.geom.Line2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Line2D.Double
      • class java.awt.geom.Line2D.Float
    • class java.awt.geom.Point2D (implements java.lang.Cloneable)
      • class java.awt.geom.Point2D.Double
      • class java.awt.geom.Point2D.Float
    • class java.awt.geom.QuadCurve2D (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.QuadCurve2D.Double
      • class java.awt.geom.QuadCurve2D.Float
    • class java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Arc2D
        • class java.awt.geom.Arc2D.Double
        • class java.awt.geom.Arc2D.Float
      • class java.awt.geom.Ellipse2D
        • class java.awt.geom.Ellipse2D.Double
        • class java.awt.geom.Ellipse2D.Float
      • class java.awt.geom.Rectangle2D
        • class java.awt.geom.Rectangle2D.Double
        • class java.awt.geom.Rectangle2D.Float
      • class java.awt.geom.RoundRectangle2D
        • class java.awt.geom.RoundRectangle2D.Double
        • class java.awt.geom.RoundRectangle2D.Float
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.awt.geom.NoninvertibleTransformException
        • class java.lang.RuntimeException
          • class java.awt.geom.IllegalPathStateException

Interface Hierarchy

  • interface java.awt.geom.PathIterator
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.geom

Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

See:
Description

Interface Summary
PathIterator The PathIterator interface provides the mechanism for objects that implement the Shape interface to return the geometry of their boundary by allowing a caller to retrieve the path of that boundary a segment at a time.

Class Summary
AffineTransform | The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Arc2D | Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
Arc2D.Double | An arc specified in double precision,
Arc2D.Float | An arc specified in float precision,
Area | The Area class is a device-independent specification of an arbitrarily-shaped area.
CubicCurve2D | The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
CubicCurve2D.Double | A cubic parametric curve segment specified with double coordinates.
CubicCurve2D.Float | A cubic parametric curve segment specified with float coordinates.
Dimension2D | The Dimension2D class is to encapsulate a width and a height dimension.
Ellipse2D | The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
Ellipse2D.Double | The Double class defines an ellipse specified in double precision.
Ellipse2D.Float | The Float class defines an ellipse specified in float precision.
FlatteningPathIterator | The FlatteningPathIterator class returns a flattened view of another PathIterator object.
GeneralPath | The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves.
Line2D | This Line2D class represents a line segment in (x, y) coordinate space.
Line2D.Double | A line segment specified with double coordinates.
Line2D.Float | A line segment specified with float coordinates.
Point2D | The Point2D class defines a point representing a location in (x, y) coordinate space.
Point2D.Double | The Double class defines a point specified in double precision.
Point2D.Float | The Float class defines a point specified in float precision.
QuadCurve2D | The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
QuadCurve2D.Double | A quadratic parametric curve segment specified with double coordinates.
QuadCurve2D.Float | A quadratic parametric curve segment specified with float coordinates.
Rectangle2D | The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
Rectangle2D.Double | The Double class defines a rectangle specified in double coordinates.
Rectangle2D.Float | The Float class defines a rectangle specified in float coordinates.
RectangularShape | RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
RoundRectangle2D | The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
RoundRectangle2D.Double | The Double class defines a rectangle with rounded corners all specified in double coordinates.
RoundRectangle2D.Float | The Float class defines a rectangle with rounded corners all specified in float coordinates.

Exception Summary
IllegalPathStateException | The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
NoninvertibleTransformException | The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.

Package java.awt.geom Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.geom

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.geom

Packages that use java.awt.geom
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Classes in java.awt.geom used by java.awt
AffineTransform
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Dimension2D
The Dimension2D class is to encapsulate a width and a height dimension.
PathIterator
The PathIterator interface provides the mechanism for objects that implement the Shape interface to return the geometry of their boundary by allowing a caller to retrieve the path of that boundary a segment at a time.
Point2D
The Point2D class defines a point representing a location in (x, y) coordinate space.
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
RectangularShape
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.

Classes in java.awt.geom used by java.awt.font
AffineTransform
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Point2D
The Point2D class defines a point representing a location in (x, y) coordinate space.
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).

Classes in java.awt.geom used by java.awt.geom
AffineTransform
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Arc2D
Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
Area
The Area class is a device-independent specification of an arbitrarily-shaped area.
CubicCurve2D
The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
Dimension2D
The Dimension2D class is to encapsulate a width and a height dimension.
Ellipse2D
The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
Line2D
This Line2D class represents a line segment in (x, y) coordinate space.
NoninvertibleTransformException
The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.
PathIterator
The PathIterator interface provides the mechanism for objects that implement the Shape interface to return the geometry of their boundary by allowing a caller to retrieve the path of that boundary a segment at a time.
Point2D
The Point2D class defines a point representing a location in (x, y) coordinate space.
QuadCurve2D
The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
RectangularShape
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
RoundRectangle2D
The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.

Classes in java.awt.geom used by java.awt.image
AffineTransform
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Point2D
The Point2D class defines a point representing a location in (x, y) coordinate space.
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).

Classes in java.awt.geom used by java.awt.image.renderable
AffineTransform
The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).

Classes in java.awt.geom used by javax.swing.plaf
Dimension2D
The Dimension2D class is to encapsulate a width and a height dimension.

Classes in java.awt.geom used by javax.swing.plaf.basic
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
RectangularShape
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.

Classes in java.awt.geom used by javax.swing.text
Rectangle2D
The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
RectangularShape
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AffineTransform

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class AffineTransform

java.lang.Object
  |
  +--java.awt.geom.AffineTransform
All Implemented Interfaces:
Cloneable, Serializable
public class AffineTransform
extends Object
implements Cloneable, Serializable

The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines. Affine transformations can be constructed using sequences of translations, scales, flips, rotations, and shears.

Such a coordinate transformation can be represented by a 3 row by 3 column matrix with an implied last row of [ 0 0 1 ]. This matrix transforms source coordinates (x, y) into destination coordinates (x', y') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:

    [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
    [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
    [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]

See Also:
Serialized Form

Field Summary
static int | TYPE_FLIP This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits.
static int | TYPE_GENERAL_ROTATION This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits.
static int | TYPE_GENERAL_SCALE This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits.
static int | TYPE_GENERAL_TRANSFORM This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates.
static int | TYPE_IDENTITY This constant indicates that the transform defined by this object is an identity transform.
static int | TYPE_MASK_ROTATION This constant is a bit mask for any of the rotation flag bits.
static int | TYPE_MASK_SCALE This constant is a bit mask for any of the scale flag bits.
static int | TYPE_QUADRANT_ROTATION This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits.
static int | TYPE_TRANSLATION This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits.
static int | TYPE_UNIFORM_SCALE This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits.
Constructor Summary
AffineTransform()
Constructs a new AffineTransform representing the Identity transformation.
AffineTransform(AffineTransform Tx)
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
AffineTransform(double[] flatmatrix)
Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)
Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(float[] flatmatrix)
Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix.
AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)
Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix.
Method Summary
Object | clone() Returns a copy of this AffineTransform object.
void | concatenate(AffineTransform Tx) Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx.
AffineTransform | createInverse() Returns an AffineTransform object representing the inverse transformation.
Shape | createTransformedShape(Shape pSrc) Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.
void | deltaTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms an array of relative distance vectors by this transform.
Point2D | deltaTransform(Point2D ptSrc, Point2D ptDst) Transforms the relative distance vector specified by ptSrc and stores the result in ptDst.
boolean | equals(Object obj) Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
double | getDeterminant() Returns the determinant of the matrix representation of the transform.
void | getMatrix(double[] flatmatrix) Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values.
static AffineTransform | getRotateInstance(double theta) Returns a transform representing a rotation transformation.
static AffineTransform | getRotateInstance(double theta, double x, double y) Returns a transform that rotates coordinates around an anchor point.
static AffineTransform | getScaleInstance(double sx, double sy) Returns a transform representing a scaling transformation.
double | getScaleX() Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix.
double | getScaleY() Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix.
static AffineTransform | getShearInstance(double shx, double shy) Returns a transform representing a shearing transformation.
double | getShearX() Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix.
double | getShearY() Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix.
static AffineTransform | getTranslateInstance(double tx, double ty) Returns a transform representing a translation transformation.
double | getTranslateX() Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix.
double | getTranslateY() Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix.
int | getType() Retrieves the flag bits describing the conversion properties of this transform.
int | hashCode() Returns the hashcode for this transform.
void | inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms an array of double precision coordinates by this transform.
Point2D | inverseTransform(Point2D ptSrc, Point2D ptDst) Inverse transforms the specified ptSrc and stores the result in ptDst.
boolean | isIdentity() Returns true if this AffineTransform is an identity transform.
void | preConcatenate(AffineTransform Tx) Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space.
void | rotate(double theta) Concatenates this transform with a rotation transformation.
void | rotate(double theta, double x, double y) Concatenates this transform with a transform that rotates coordinates around an anchor point.
void | scale(double sx, double sy) Concatenates this transform with a scaling transformation.
void | setToIdentity() Resets this transform to the Identity transform.
void | setToRotation(double theta) Sets this transform to a rotation transformation.
void | setToRotation(double theta, double x, double y) Sets this transform to a translated rotation transformation.
void | setToScale(double sx, double sy) Sets this transform to a scaling transformation.
void | setToShear(double shx, double shy) Sets this transform to a shearing transformation.
void | setToTranslation(double tx, double ty) Sets this transform to a translation transformation.
void | setTransform(AffineTransform Tx) Sets this transform to a copy of the transform in the specified AffineTransform object.
void | setTransform(double m00, double m10, double m01, double m11, double m02, double m12) Sets this transform to the matrix specified by the 6 double precision values.
void | shear(double shx, double shy) Concatenates this transform with a shearing transformation.
String | toString() Returns a String that represents the value of this Object.
void | transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms an array of double precision coordinates by this transform.
void | transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms an array of double precision coordinates by this transform and stores the results into an array of floats.
void | transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles.
void | transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms an array of floating point coordinates by this transform.
void | transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts) Transforms an array of point objects by this transform.
Point2D | transform(Point2D ptSrc, Point2D ptDst) Transforms the specified ptSrc and stores the result in ptDst.
void | translate(double tx, double ty) Concatenates this transform with a translation transformation.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

TYPE_IDENTITY

public static final int TYPE_IDENTITY
This constant indicates that the transform defined by this object is an identity transform. An identity transform is one in which the output coordinates are always the same as the input coordinates. If this transform is anything other than the identity transform, the type will either be the constant GENERAL_TRANSFORM or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
See Also:
TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_TRANSLATION

public static final int TYPE_TRANSLATION
This flag bit indicates that the transform defined by this object performs a translation in addition to the conversions indicated by other flag bits. A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors.
See Also:
TYPE_IDENTITY, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_UNIFORM_SCALE

public static final int TYPE_UNIFORM_SCALE
This flag bit indicates that the transform defined by this object performs a uniform scale in addition to the conversions indicated by other flag bits. A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. This flag bit is mutually exclusive with the TYPE_GENERAL_SCALE flag.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_GENERAL_SCALE

public static final int TYPE_GENERAL_SCALE
This flag bit indicates that the transform defined by this object performs a general scale in addition to the conversions indicated by other flag bits. A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. This flag bit is mutually exclusive with the TYPE_UNIFORM_SCALE flag.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_MASK_SCALE

public static final int TYPE_MASK_SCALE
This constant is a bit mask for any of the scale flag bits.
See Also:
TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE

TYPE_FLIP

public static final int TYPE_FLIP
This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. A right handed coordinate system is one where the positive X axis rotates counterclockwise to overlay the positive Y axis similar to the direction that the fingers on your right hand curl when you stare end on at your thumb. A left handed coordinate system is one where the positive X axis rotates clockwise to overlay the positive Y axis similar to the direction that the fingers on your left hand curl. There is no mathematical way to determine the angle of the original flipping or mirroring transformation since all angles of flip are identical given an appropriate adjusting rotation.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_QUADRANT_ROTATION

public static final int TYPE_QUADRANT_ROTATION
This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_GENERAL_ROTATION flag.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_GENERAL_ROTATION

public static final int TYPE_GENERAL_ROTATION
This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TYPE_QUADRANT_ROTATION flag.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_TRANSFORM, getType()

TYPE_MASK_ROTATION

public static final int TYPE_MASK_ROTATION
This constant is a bit mask for any of the rotation flag bits.
See Also:
TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION

TYPE_GENERAL_TRANSFORM

public static final int TYPE_GENERAL_TRANSFORM
This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. If this transform can be classified by any of the above constants, the type will either be the constant TYPE_IDENTITY or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_FLIP, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, getType()
Constructor Detail

AffineTransform

public AffineTransform()
Constructs a new AffineTransform representing the Identity transformation.

AffineTransform

public AffineTransform(AffineTransform Tx)
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.
Parameters:
Tx - the AffineTransform object to copy

AffineTransform

public AffineTransform(float m00,
                       float m10,
                       float m01,
                       float m11,
                       float m02,
                       float m12)
Constructs a new AffineTransform from 6 floating point values representing the 6 specifiable entries of the 3x3 transformation matrix.
Parameters:
m00, m01, m02, m10, m11, m12 - the 6 floating point values that compose the 3x3 transformation matrix

AffineTransform

public AffineTransform(float[] flatmatrix)
Constructs a new AffineTransform from an array of floating point values representing either the 4 non-translation enries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters:
flatmatrix - the float array containing the values to be set in the new AffineTransform object. The length of the array is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length of the array is greater than 6, the first 6 values are taken.

AffineTransform

public AffineTransform(double m00,
                       double m10,
                       double m01,
                       double m11,
                       double m02,
                       double m12)
Constructs a new AffineTransform from 6 double precision values representing the 6 specifiable entries of the 3x3 transformation matrix.
Parameters:
m00, m01, m02, m10, m11, m12 - the 6 floating point values that compose the 3x3 transformation matrix

AffineTransform

public AffineTransform(double[] flatmatrix)
Constructs a new AffineTransform from an array of double precision values representing either the 4 non-translation entries or the 6 specifiable entries of the 3x3 transformation matrix. The values are retrieved from the array as { m00 m10 m01 m11 [m02 m12]}.
Parameters:
flatmatrix - the double array containing the values to be set in the new AffineTransform object. The length of the array is assumed to be at least 4. If the length of the array is less than 6, only the first 4 values are taken. If the length of the array is greater than 6, the first 6 values are taken.
Method Detail

getTranslateInstance

public static AffineTransform getTranslateInstance(double tx,
                                                   double ty)
Returns a transform representing a translation transformation. The matrix representing the returned transform is:
        [   1    0    tx  ]
        [   0    1    ty  ]
        [   0    0    1   ]
Parameters:
tx - the distance by which coordinates are translated in the X axis direction
ty - the distance by which coordinates are translated in the Y axis direction
Returns:
an AffineTransform object that represents a translation transformation, created with the specified vector.

getRotateInstance

public static AffineTransform getRotateInstance(double theta)
Returns a transform representing a rotation transformation. The matrix representing the returned transform is:
        [   cos(theta)    -sin(theta)    0   ]
        [   sin(theta)     cos(theta)    0   ]
        [       0              0         1   ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians
Returns:
an AffineTransform object that is a rotation transformation, created with the specified angle of rotation.

getRotateInstance

public static AffineTransform getRotateInstance(double theta,
                                                double x,
                                                double y)
Returns a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

        AffineTransform Tx = new AffineTransform();
        Tx.setToTranslation(x, y);	// S3: final translation
        Tx.rotate(theta);		// S2: rotate around anchor
        Tx.translate(-x, -y);	// S1: translate anchor to origin
The matrix representing the returned transform is:
        [   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
        [   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
        [       0              0               1        ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians
x, y - the coordinates of the anchor point of the rotation
Returns:
an AffineTransform object that rotates coordinates around the specified point by the specified angle of rotation.

getScaleInstance

public static AffineTransform getScaleInstance(double sx,
                                               double sy)
Returns a transform representing a scaling transformation. The matrix representing the returned transform is:
        [   sx   0    0   ]
        [   0    sy   0   ]
        [   0    0    1   ]
Parameters:
sx - the factor by which coordinates are scaled along the X axis direction
sy - the factor by which coordinates are scaled along the Y axis direction
Returns:
an AffineTransform object that scales coordinates by the specified factors.

getShearInstance

public static AffineTransform getShearInstance(double shx,
                                               double shy)
Returns a transform representing a shearing transformation. The matrix representing the returned transform is:
        [   1   shx   0   ]
        [  shy   1    0   ]
        [   0    0    1   ]
Parameters:
shx - the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shy - the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate
Returns:
an AffineTransform object that shears coordinates by the specified multipliers.

getType

public int getType()
Retrieves the flag bits describing the conversion properties of this transform. The return value is either one of the constants TYPE_IDENTITY or TYPE_GENERAL_TRANSFORM, or a combination of the appriopriate flag bits. A valid combination of flag bits is an exclusive OR operation that can combine the TYPE_TRANSLATION flag bit in addition to either of the TYPE_UNIFORM_SCALE or TYPE_GENERAL_SCALE flag bits as well as either of the TYPE_QUADRANT_ROTATION or TYPE_GENERAL_ROTATION flag bits.
Returns:
the OR combination of any of the indicated flags that apply to this transform
See Also:
TYPE_IDENTITY, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_GENERAL_SCALE, TYPE_QUADRANT_ROTATION, TYPE_GENERAL_ROTATION, TYPE_GENERAL_TRANSFORM

getDeterminant

public double getDeterminant()
Returns the determinant of the matrix representation of the transform. The determinant is useful both to determine if the transform can be inverted and to get a single value representing the combined X and Y scaling of the transform.

If the determinant is non-zero, then this transform is invertible and the various methods that depend on the inverse transform do not need to throw a NoninvertibleTransformException. If the determinant is zero then this transform can not be inverted since the transform maps all input coordinates onto a line or a point. If the determinant is near enough to zero then inverse transform operations might not carry enough precision to produce meaningful results.

If this transform represents a uniform scale, as indicated by the getType method then the determinant also represents the square of the uniform scale factor by which all of the points are expanded from or contracted towards the origin. If this transform represents a non-uniform scale or more general transform then the determinant is not likely to represent a value useful for any purpose other than determining if inverse transforms are possible.

Mathematically, the determinant is calculated using the formula:

        |  m00  m01  m02  |
        |  m10  m11  m12  |  =  m00 * m11 - m01 * m10
        |   0    0    1   |
Returns:
the determinant of the matrix used to transform the coordinates.
See Also:
getType(),
createInverse(),
inverseTransform(java.awt.geom.Point2D, java.awt.geom.Point2D),
TYPE_UNIFORM_SCALE

getMatrix

public void getMatrix(double[] flatmatrix)
Retrieves the 6 specifiable values in the 3x3 affine transformation matrix and places them into an array of double precisions values. The values are stored in the array as { m00 m10 m01 m11 m02 m12 }. An array of 4 doubles can also be specified, in which case only the first four elements representing the non-transform parts of the array are retrieved and the values are stored into the array as { m00 m10 m01 m11 }
Parameters:
flatmatrix - the double array used to store the returned values.
See Also:
getScaleX(),
getScaleY(),
getShearX(),
getShearY(),
getTranslateX(),
getTranslateY()

getScaleX

public double getScaleX()
Returns the X coordinate scaling element (m00) of the 3x3 affine transformation matrix.
Returns:
a double value that is the X coordinate of the scaling element of the affine transformation matrix.
See Also:
getMatrix(double[])

getScaleY

public double getScaleY()
Returns the Y coordinate scaling element (m11) of the 3x3 affine transformation matrix.
Returns:
a double value that is the Y coordinate of the scaling element of the affine transformation matrix.
See Also:
getMatrix(double[])

getShearX

public double getShearX()
Returns the X coordinate shearing element (m01) of the 3x3 affine transformation matrix.
Returns:
a double value that is the X coordinate of the shearing element of the affine transformation matrix.
See Also:
getMatrix(double[])

getShearY

public double getShearY()
Returns the Y coordinate shearing element (m10) of the 3x3 affine transformation matrix.
Returns:
a double value that is the Y coordinate of the shearing element of the affine transformation matrix.
See Also:
getMatrix(double[])

getTranslateX

public double getTranslateX()
Returns the X coordinate of the translation element (m02) of the 3x3 affine transformation matrix.
Returns:
a double value that is the X coordinate of the translation element of the affine transformation matrix.
See Also:
getMatrix(double[])

getTranslateY

public double getTranslateY()
Returns the Y coordinate of the translation element (m12) of the 3x3 affine transformation matrix.
Returns:
a double value that is the Y coordinate of the translation element of the affine transformation matrix.
See Also:
getMatrix(double[])

translate

public void translate(double tx,
                      double ty)
Concatenates this transform with a translation transformation. This is equivalent to calling concatenate(T), where T is an AffineTransform represented by the following matrix:
        [   1    0    tx  ]
        [   0    1    ty  ]
        [   0    0    1   ]
Parameters:
tx - the distance by which coordinates are translated in the X axis direction
ty - the distance by which coordinates are translated in the Y axis direction

rotate

public void rotate(double theta)
Concatenates this transform with a rotation transformation. This is equivalent to calling concatenate(R), where R is an AffineTransform represented by the following matrix:
        [   cos(theta)    -sin(theta)    0   ]
        [   sin(theta)     cos(theta)    0   ]
        [       0              0         1   ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians

rotate

public void rotate(double theta,
                   double x,
                   double y)
Concatenates this transform with a transform that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

        translate(x, y);	// S3: final translation
        rotate(theta);		// S2: rotate around anchor
        translate(-x, -y);	// S1: translate anchor to origin
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians
x, y - the coordinates of the anchor point of the rotation

scale

public void scale(double sx,
                  double sy)
Concatenates this transform with a scaling transformation. This is equivalent to calling concatenate(S), where S is an AffineTransform represented by the following matrix:
        [   sx   0    0   ]
        [   0    sy   0   ]
        [   0    0    1   ]
Parameters:
sx - the factor by which coordinates are scaled along the X axis direction
sy - the factor by which coordinates are scaled along the Y axis direction

shear

public void shear(double shx,
                  double shy)
Concatenates this transform with a shearing transformation. This is equivalent to calling concatenate(SH), where SH is an AffineTransform represented by the following matrix:
        [   1   shx   0   ]
        [  shy   1    0   ]
        [   0    0    1   ]
Parameters:
shx - the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shy - the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate

setToIdentity

public void setToIdentity()
Resets this transform to the Identity transform.

setToTranslation

public void setToTranslation(double tx,
                             double ty)
Sets this transform to a translation transformation. The matrix representing this transform becomes:
        [   1    0    tx  ]
        [   0    1    ty  ]
        [   0    0    1   ]
Parameters:
tx - the distance by which coordinates are translated in the X axis direction
ty - the distance by which coordinates are translated in the Y axis direction

setToRotation

public void setToRotation(double theta)
Sets this transform to a rotation transformation. The matrix representing this transform becomes:
        [   cos(theta)    -sin(theta)    0   ]
        [   sin(theta)     cos(theta)    0   ]
        [       0              0         1   ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians

setToRotation

public void setToRotation(double theta,
                          double x,
                          double y)
Sets this transform to a translated rotation transformation. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3).

This operation is equivalent to the following sequence of calls:

        setToTranslation(x, y);	// S3: final translation
        rotate(theta);		// S2: rotate around anchor
        translate(-x, -y);		// S1: translate anchor to origin
The matrix representing this transform becomes:
        [   cos(theta)    -sin(theta)    x-x*cos+y*sin  ]
        [   sin(theta)     cos(theta)    y-x*sin-y*cos  ]
        [       0              0               1        ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians
x, y - the coordinates of the anchor point of the rotation

setToScale

public void setToScale(double sx,
                       double sy)
Sets this transform to a scaling transformation. The matrix representing this transform becomes:
        [   sx   0    0   ]
        [   0    sy   0   ]
        [   0    0    1   ]
Parameters:
sx - the factor by which coordinates are scaled along the X axis direction
sy - the factor by which coordinates are scaled along the Y axis direction

setToShear

public void setToShear(double shx,
                       double shy)
Sets this transform to a shearing transformation. The matrix representing this transform becomes:
        [   1   shx   0   ]
        [  shy   1    0   ]
        [   0    0    1   ]
Parameters:
shx - the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate
shy - the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate

setTransform

public void setTransform(AffineTransform Tx)
Sets this transform to a copy of the transform in the specified AffineTransform object.
Parameters:
Tx - the AffineTransform object from which to copy the transform

setTransform

public void setTransform(double m00,
                         double m10,
                         double m01,
                         double m11,
                         double m02,
                         double m12)
Sets this transform to the matrix specified by the 6 double precision values.
Parameters:
m00, m01, m02, m10, m11, m12 - the 6 floating point values that compose the 3x3 transformation matrix

concatenate

public void concatenate(AffineTransform Tx)
Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by Tx and then transforming the result by the original transform Cx like this: Cx'(p) = Cx(Tx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
        [this] = [this] x [Tx]
Parameters:
Tx - the AffineTransform object to be concatenated with this AffineTransform object.
See Also:
preConcatenate(java.awt.geom.AffineTransform)

preConcatenate

public void preConcatenate(AffineTransform Tx)
Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space. Cx is updated to perform the combined transformation. Transforming a point p by the updated transform Cx' is equivalent to first transforming p by the original transform Cx and then transforming the result by Tx like this: Cx'(p) = Tx(Cx(p)) In matrix notation, if this transform Cx is represented by the matrix [this] and Tx is represented by the matrix [Tx] then this method does the following:
        [this] = [Tx] x [this]
Parameters:
Tx - the AffineTransform object to be concatenated with this AffineTransform object.
See Also:
concatenate(java.awt.geom.AffineTransform)

createInverse

public AffineTransform createInverse()
                              throws NoninvertibleTransformException
Returns an AffineTransform object representing the inverse transformation. The inverse transform Tx' of this transform Tx maps coordinates transformed by Tx back to their original coordinates. In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)).

If this transform maps all coordinates onto a point or a line then it will not have an inverse, since coordinates that do not lie on the destination point or line will not have an inverse mapping. The getDeterminant method can be used to determine if this transform has no inverse, in which case an exception will be thrown if the createInverse method is called.

Returns:
a new AffineTransform object representing the inverse transformation.
Throws:
NoninvertibleTransformException - if the matrix cannot be inverted.
See Also:
getDeterminant()

transform

public Point2D transform(Point2D ptSrc,
                         Point2D ptDst)
Transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transformation is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
ptSrc - the specified Point2D to be transformed
ptDst - the specified Point2D that stores the result of transforming ptSrc
Returns:
the ptDst after transforming ptSrc and stroring the result in ptDst.

transform

public void transform(Point2D[] ptSrc,
                      int srcOff,
                      Point2D[] ptDst,
                      int dstOff,
                      int numPts)
Transforms an array of point objects by this transform. If any element of the ptDst array is null, a new Point2D object is allocated and stored into that element before storing the results of the transformation.

Note that this method does not take any precautions to avoid problems caused by storing results into Point2D objects that will be used as the source for calculations further down the source array. This method does guarantee that if a specified Point2D object is both the source and destination for the same single point transform operation then the results will not be stored until the calculations are complete to avoid storing the results on top of the operands. If, however, the destination Point2D object for one operation is the same object as the source Point2D object for another operation further down the source array then the original coordinates in that point are overwritten before they can be converted.

Parameters:
ptSrc - the array containing the source point objects
ptDst - the array into which the transform point objects are returned
srcOff - the offset to the first point object to be transformed in the source array
dstOff - the offset to the location of the first transformed point object that is stored in the destination array
numPts - the number of point objects to be transformed

transform

public void transform(float[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
Transforms an array of floating point coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
ptSrc - the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
ptDst - the array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOff - the offset to the first point to be transformed in the source array
dstOff - the offset to the location of the first transformed point that is stored in the destination array
numPts - the number of points to be transformed

transform

public void transform(double[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
Transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
srcPts - the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPts - the array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOff - the offset to the first point to be transformed in the source array
dstOff - the offset to the location of the first transformed point that is stored in the destination array
numPts - the number of point objects to be transformed

transform

public void transform(float[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
Transforms an array of floating point coordinates by this transform and stores the results into an array of doubles. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
ptSrc - the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
ptDst - the array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOff - the offset to the first point to be transformed in the source array
dstOff - the offset to the location of the first transformed point that is stored in the destination array
numPts - the number of points to be transformed

transform

public void transform(double[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
Transforms an array of double precision coordinates by this transform and stores the results into an array of floats. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
srcPts - the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPts - the array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOff - the offset to the first point to be transformed in the source array
dstOff - the offset to the location of the first transformed point that is stored in the destination array
numPts - the number of point objects to be transformed

inverseTransform

public Point2D inverseTransform(Point2D ptSrc,
                                Point2D ptDst)
                         throws NoninvertibleTransformException
Inverse transforms the specified ptSrc and stores the result in ptDst. If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
ptSrc - the point to be inverse transformed
ptDst - the resulting transformed point
Returns:
ptDst, which contains the result of the inverse transform.
Throws:
NoninvertibleTransformException - if the matrix cannot be inverted.

inverseTransform

public void inverseTransform(double[] srcPts,
                             int srcOff,
                             double[] dstPts,
                             int dstOff,
                             int numPts)
                      throws NoninvertibleTransformException
Inverse transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
srcPts - the array containing the source point coordinates. Each point is stored as a pair of x, y coordinates.
dstPts - the array into which the transformed point coordinates are returned. Each point is stored as a pair of x, y coordinates.
srcOff - the offset to the first point to be transformed in the source array
dstOff - the offset to the location of the first transformed point that is stored in the destination array
numPts - the number of point objects to be transformed
Throws:
NoninvertibleTransformException - if the matrix cannot be inverted.

deltaTransform

public Point2D deltaTransform(Point2D ptSrc,
                              Point2D ptDst)
Transforms the relative distance vector specified by ptSrc and stores the result in ptDst. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
    [  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
    [  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
    [ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
If ptDst is null, a new Point2D object is allocated and then the result of the transform is stored in this object. In either case, ptDst, which contains the transformed point, is returned for convenience. If ptSrc and ptDst are the same object, the input point is correctly overwritten with the transformed point.
Parameters:
ptSrc - the distance vector to be delta transformed
ptDst - the resulting transformed distance vector
Returns:
ptDst, which contains the result of the transformation.

deltaTransform

public void deltaTransform(double[] srcPts,
                           int srcOff,
                           double[] dstPts,
                           int dstOff,
                           int numPts)
Transforms an array of relative distance vectors by this transform. A relative distance vector is transformed without applying the translation components of the affine transformation matrix using the following equations:
    [  x' ]   [  m00  m01 (m02) ] [  x  ]   [ m00x + m01y ]
    [  y' ] = [  m10  m11 (m12) ] [  y  ] = [ m10x + m11y ]
    [ (1) ]   [  (0)  (0) ( 1 ) ] [ (1) ]   [     (1)     ]
The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn].
Parameters:
srcPts - the array containing the source distance vectors. Each vector is stored as a pair of relative x, y coordinates.
dstPts - the array into which the transformed distance vectors are returned. Each vector is stored as a pair of relative x, y coordinates.
srcOff - the offset to the first vector to be transformed in the source array
dstOff - the offset to the location of the first transformed vector that is stored in the destination array
numPts - the number of vector coordinate pairs to be transformed

createTransformedShape

public Shape createTransformedShape(Shape pSrc)
Returns a new Shape object defined by the geometry of the specified Shape after it has been transformed by this transform.
Parameters:
pSrc - the specified Shape object to be transformed by this transform.
Returns:
a new Shape object that defines the geometry of the transformed Shape.

toString

public String toString()
Returns a String that represents the value of this Object.
Overrides:
toString in class Object
Returns:
a String representing the value of this Object.

isIdentity

public boolean isIdentity()
Returns true if this AffineTransform is an identity transform.
Returns:
true if this AffineTransform is an identity transform; false otherwise.

clone

public Object clone()
Returns a copy of this AffineTransform object.
Overrides:
clone in class Object
Returns:
an Object that is a copy of this AffineTransform object.

hashCode

public int hashCode()
Returns the hashcode for this transform.
Overrides:
hashCode in class Object
Returns:
a hash code for this transform.

equals

public boolean equals(Object obj)
Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.
Overrides:
equals in class Object
Parameters:
obj - the Object to test for equality with this AffineTransform
Returns:
true if obj equals this AffineTransform object; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Arc2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Arc2D

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Arc2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
Arc2D.Double, Arc2D.Float
public abstract class Arc2D
extends RectangularShape

Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).

The bounding rectangle defines the outer boundary of the full ellipse of which this arc is a partial section. The angles are specified relative to the non-square extents of the bounding rectangle such that 45 degrees always falls on the line from the center of the ellipse to the upper right corner of the bounding rectangle. As a result, if the bounding rectangle is noticeably longer along one axis than the other, the angles to the start and end of the arc segment will be skewed farther along the longer axis of the bounds.

The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,
Field Summary
static int | CHORD The closure type for an arc closed by drawing a straight line segment from the start of the arc segment to the end of the arc segment.
static int | OPEN The closure type for an open arc with no path segments connecting the two ends of the arc segment.
static int | PIE The closure type for an arc closed by drawing straight line segments from the start of the arc segment to the center of the full ellipse and from that point to the end of the arc segment.
Constructor Summary
protected Arc2D(int type)
This is an abstract class that cannot be instantiated directly.
Method Summary
boolean | contains(double x, double y) Determines whether or not the specified point is inside the boundary of the arc.
boolean | contains(double x, double y, double w, double h) Determine whether or not the interior of the arc entirely contains the specified rectangle.
boolean | contains(Rectangle2D r) Determine whether or not the interior of the arc entirely contains the specified rectangle.
boolean | containsAngle(double angle) Determines whether or not the specified angle is within the angular extents of the arc.
abstract double | getAngleExtent() Returns the angular extent of the arc.
abstract double | getAngleStart() Returns the starting angle of the arc.
int | getArcType() Returns the arc closure type of the arc: OPEN, CHORD, or PIE.
Rectangle2D | getBounds2D() Returns the high-precision bounding box of the arc.
Point2D | getEndPoint() Returns the ending point of the arc.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the arc.
Point2D | getStartPoint() Returns the starting point of the arc.
boolean | intersects(double x, double y, double w, double h) Determines whether or not the interior of the arc intersects the interior of the specified rectangle.
protected abstract Rectangle2D | makeBounds(double x, double y, double w, double h) Constructs a Rectangle2D of the appropriate precision to hold the parameters calculated to be the bounding box of this arc.
abstract void | setAngleExtent(double angExt) Sets the angular extent of this arc to the specified double value.
void | setAngles(double x1, double y1, double x2, double y2) Sets the starting angle and angular extent of this arc using two sets of coordinates.
void | setAngles(Point2D p1, Point2D p2) Sets the starting angle and angular extent of this arc using two points.
abstract void | setAngleStart(double angSt) Sets the starting angle of this arc to the specified double value.
void | setAngleStart(Point2D p) Sets the starting angle of this arc to the angle that the specified point defines relative to the center of this arc.
void | setArc(Arc2D a) Sets this arc to be the same as the specified arc.
abstract void | setArc(double x, double y, double w, double h, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified double values.
void | setArc(Point2D loc, Dimension2D size, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.
void | setArc(Rectangle2D rect, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.
void | setArcByCenter(double x, double y, double radius, double angSt, double angExt, int closure) Sets the position, bounds, angular extents, and closure type of this arc to the specified values.
void | setArcByTangent(Point2D p1, Point2D p2, Point2D p3, double radius) Sets the position, bounds, and angular extents of this arc to the specified value.
void | setArcType(int type) Sets the closure type of this arc to the specified value: OPEN, CHORD, or PIE.
void | setFrame(double x, double y, double w, double h) Sets the location and size of the outer bounds of this arc to the specified values.
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OPEN

public static final int OPEN
The closure type for an open arc with no path segments connecting the two ends of the arc segment.

CHORD

public static final int CHORD
The closure type for an arc closed by drawing a straight line segment from the start of the arc segment to the end of the arc segment.

PIE

public static final int PIE
The closure type for an arc closed by drawing straight line segments from the start of the arc segment to the center of the full ellipse and from that point to the end of the arc segment.
Constructor Detail

Arc2D

protected Arc2D(int type)
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
Parameters:
type - The closure type of this arc: OPEN, CHORD, or PIE.
See Also:
Arc2D.Float, Arc2D.Double
Method Detail

getAngleStart

public abstract double getAngleStart()
Returns the starting angle of the arc.
Returns:
A double value that represents the starting angle of the arc in degrees.

getAngleExtent

public abstract double getAngleExtent()
Returns the angular extent of the arc.
Returns:
A double value that represents the angular extent of the arc in degrees.

getArcType

public int getArcType()
Returns the arc closure type of the arc: OPEN, CHORD, or PIE.
Returns:
One of the integer constant closure types defined in this class.

getStartPoint

public Point2D getStartPoint()
Returns the starting point of the arc. This point is the intersection of the ray from the center defined by the starting angle and the elliptical boundary of the arc.
Returns:
A Point2D object representing the x,y coordinates of the starting point of the arc.

getEndPoint

public Point2D getEndPoint()
Returns the ending point of the arc. This point is the intersection of the ray from the center defined by the starting angle plus the angular extent of the arc and the elliptical boundary of the arc.
Returns:
A Point2D object representing the x,y coordinates of the ending point of the arc.

setArc

public abstract void setArc(double x,
                            double y,
                            double w,
                            double h,
                            double angSt,
                            double angExt,
                            int closure)
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
Parameters:
x, y - The coordinates of the upper left corner of the arc.
w - The overall width of the full ellipse of which this arc is a partial section.
h - The overall height of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees.
angExt - The angular extent of the arc in degrees.
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setArc

public void setArc(Point2D loc,
                   Dimension2D size,
                   double angSt,
                   double angExt,
                   int closure)
Sets the location, size, angular extents, and closure type of this arc to the specified values.
Parameters:
loc - The Point2D representing the coordinates of the upper left corner of the arc.
size - The Dimension2D representing the width and height of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees. (Specified in double precision.)
angExt - The angular extent of the arc in degrees. (Specified in double precision.)
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setArc

public void setArc(Rectangle2D rect,
                   double angSt,
                   double angExt,
                   int closure)
Sets the location, size, angular extents, and closure type of this arc to the specified values.
Parameters:
rect - The bounding rectangle that defines the outer boundary of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees. (Specified in double precision.)
angExt - The angular extent of the arc in degrees. (Specified in double precision.)
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setArc

public void setArc(Arc2D a)
Sets this arc to be the same as the specified arc.
Parameters:
a - The Arc2D to use to set the arc's values.

setArcByCenter

public void setArcByCenter(double x,
                           double y,
                           double radius,
                           double angSt,
                           double angExt,
                           int closure)
Sets the position, bounds, angular extents, and closure type of this arc to the specified values. The arc is defined by a center point and a radius rather than a bounding box for the full ellipse.
Parameters:
x, y - The coordinates of the center of the arc. (Specified in double precision.)
r - The radius of the arc. (Specified in double precision.)
angSt - The starting angle of the arc in degrees. (Specified in double precision.)
angExt - The angular extent of the arc in degrees. (Specified in double precision.)
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setArcByTangent

public void setArcByTangent(Point2D p1,
                            Point2D p2,
                            Point2D p3,
                            double radius)
Sets the position, bounds, and angular extents of this arc to the specified value. The starting angle of the arc is tangent to the line specified by points (p1, p2), the ending angle is tangent to the line specified by points (p2, p3), and the arc has the specified radius.
Parameters:
p1 - The first point that defines the arc. The starting angle of the arc is tangent to the line specified by points (p1, p2).
p2 - The second point that defines the arc. The starting angle of the arc is tangent to the line specified by points (p1, p2). The ending angle of the arc is tangent to the line specified by points (p2, p3).
p3 - The third point that defines the arc. The ending angle of the arc is tangent to the line specified by points (p2, p3).
radius - The radius of the arc. (Specified in double precision.)

setAngleStart

public abstract void setAngleStart(double angSt)
Sets the starting angle of this arc to the specified double value.
Parameters:
angSt - The starting angle of the arc in degrees.

setAngleExtent

public abstract void setAngleExtent(double angExt)
Sets the angular extent of this arc to the specified double value.
Parameters:
angExt - The angular extent of the arc in degrees.

setAngleStart

public void setAngleStart(Point2D p)
Sets the starting angle of this arc to the angle that the specified point defines relative to the center of this arc. The angular extent of the arc will remain the same.
Parameters:
p - The Point2D that defines the starting angle.

setAngles

public void setAngles(double x1,
                      double y1,
                      double x2,
                      double y2)
Sets the starting angle and angular extent of this arc using two sets of coordinates. The first set of coordinates is used to determine the angle of the starting point relative to the arc's center. The second set of coordinates is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.
Parameters:
x1, y1 - The coordinates of the arc's starting point.
x2, y2 - The coordinates of the arc's ending point.

setAngles

public void setAngles(Point2D p1,
                      Point2D p2)
Sets the starting angle and angular extent of this arc using two points. The first point is used to determine the angle of the starting point relative to the arc's center. The second point is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.
Parameters:
p1 - The Point2D that defines the arc's starting point.
p2 - The Point2D that defines the arc's ending point.

setArcType

public void setArcType(int type)
Sets the closure type of this arc to the specified value: OPEN, CHORD, or PIE.
Parameters:
type - The integer constant that represents the closure type of this arc: OPEN, CHORD, or PIE.
Throws:
IllegalArgumentException - if type is not 0, 1, or 2.+

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of the outer bounds of this arc to the specified values.
Overrides:
setFrame in class RectangularShape
Parameters:
x, y - The coordinates of the upper left corner of the arc's bounding box. (Specified in double precision.)
w - The width of the arc's bounding box. (Specified in double precision.)
h - The height of the arc's bounding box. (Specified in double precision.)

getBounds2D

public Rectangle2D getBounds2D()
Returns the high-precision bounding box of the arc. The bounding box contains only the part of this Arc2D that is in between the starting and ending angles and contains the pie wedge, if this Arc2D has a PIE closure type.

This method differs from the getBounds in that the getBounds method only returns the bounds of the enclosing ellipse of this Arc2D without considering the starting and ending angles of this Arc2D.

Returns:
the Rectangle2D that represents the arc's bounding box.

makeBounds

protected abstract Rectangle2D makeBounds(double x,
                                          double y,
                                          double w,
                                          double h)
Constructs a Rectangle2D of the appropriate precision to hold the parameters calculated to be the bounding box of this arc.
Parameters:
x, y - The coordinates of the upper left corner of the bounding box. (Specified in double precision.)
w - The width of the bounding box. (Specified in double precision.)
h - The height of the bounding box. (Specified in double precision.)

containsAngle

public boolean containsAngle(double angle)
Determines whether or not the specified angle is within the angular extents of the arc.
Parameters:
angle - The angle to test. (Specified in double precision.)
Returns:
true if the arc contains the angle, false if the arc doesn't contain the angle.

contains

public boolean contains(double x,
                        double y)
Determines whether or not the specified point is inside the boundary of the arc.
Parameters:
x, y - The coordinates of the point to test. (Specified in double precision.)
Returns:
true if the point lies within the bound of the arc, false if the point lies outside of the arc's bounds.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Determines whether or not the interior of the arc intersects the interior of the specified rectangle.
Parameters:
x, y - The coordinates of the rectangle's upper left corner. (Specified in double precision.)
w - The width of the rectangle. (Specified in double precision.)
h - The height of the rectangle. (Specified in double precision.)
Returns:
true if the arc intersects the rectangle, false if the arc doesn't intersect the rectangle.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Determine whether or not the interior of the arc entirely contains the specified rectangle.
Parameters:
x, y - The coordinates of the rectangle's upper left corner. (Specified in double precision.)
w - The width of the rectangle. (Specified in double precision.)
h - The height of the rectangle. (Specified in double precision.)
Returns:
true if the arc contains the rectangle, false if the arc doesn't contain the rectangle.

contains

public boolean contains(Rectangle2D r)
Determine whether or not the interior of the arc entirely contains the specified rectangle.
Overrides:
contains in class RectangularShape
Parameters:
r - The Rectangle2D to test.
Returns:
true if the arc contains the rectangle, false if the arc doesn't contain the rectangle.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the arc. This iterator is multithread safe. Arc2D guarantees that modifications to the geometry of the arc do not affect any iterations of that geometry that are already in process.
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if the untransformed coordinates are desired.
Returns:
A PathIterator that defines the arc's boundary.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Area

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Area

java.lang.Object
  |
  +--java.awt.geom.Area
All Implemented Interfaces:
Cloneable, Shape
public class Area
extends Object
implements Shape, Cloneable

The Area class is a device-independent specification of an arbitrarily-shaped area. The Area object is defined as an object that performs certain binary CAG (Constructive Area Geometry) operations on other area-enclosing geometries, such as rectangles, ellipses, and polygons. The CAG operations are Add(union), Subtract, Intersect, and ExclusiveOR. For example, an Area can be made up of the area of a rectangle minus the area of an ellipse.

Constructor Summary
Area()
Default constructor which creates an empty area.
Area(Shape s)
The Area class creates an area geometry from the specified Shape object.
Method Summary
void | add(Area rhs) Adds the shape of the specified Area to the shape of this Area.
Object | clone() Returns an exact copy of this Area object.
boolean | contains(double x, double y) Tests if a specifed point lies inside the boundary of this Area object.
boolean | contains(double x, double y, double w, double h) Tests whether or not the interior of this Area object completely contains the specified rectangular area.
boolean | contains(Point2D p) Tests if a specified Point2D lies inside the boundary of the this Area object.
boolean | contains(Rectangle2D p) Tests whether or not the interior of this Area object completely contains the specified Rectangle2D.
Area | createTransformedArea(AffineTransform t) Creates a new Area object that contains the same geometry as this Area transformed by the specified AffineTransform.
boolean | equals(Area other) Tests whether the geometries of the two Area objects are equal.
void | exclusiveOr(Area rhs) Sets the shape of this Area to be the combined area of its current shape and the shape of the specified Area, minus their intersection.
Rectangle | getBounds() Returns a bounding Rectangle that completely encloses this Area.
Rectangle2D | getBounds2D() Returns a high precision bounding Rectangle2D that completely encloses this Area.
PathIterator | getPathIterator(AffineTransform at) Creates a PathIterator for the outline of this Area object.
PathIterator | getPathIterator(AffineTransform at, double flatness) Creates a PathIterator for the flattened outline of this Area object.
void | intersect(Area rhs) Sets the shape of this Area to the intersection of its current shape and the shape of the specified Area.
boolean | intersects(double x, double y, double w, double h) Tests whether the interior of this Area object intersects the interior of the specified rectangular area.
boolean | intersects(Rectangle2D p) Tests whether the interior of this Area object intersects the interior of the specified Rectangle2D.
boolean | isEmpty() Tests whether this Area object encloses any area.
boolean | isPolygonal() Tests whether this Area consists entirely of straight edged polygonal geometry.
boolean | isRectangular() Tests whether this Area is rectangular in shape.
boolean | isSingular() Tests whether this Area is comprised of a single closed subpath.
void | reset() Removes all of the geometry from this Area and restores it to an empty area.
void | subtract(Area rhs) Subtracts the shape of the specified Area from the shape of this Area.
void | transform(AffineTransform t) Transforms the geometry of this Area using the specified AffineTransform.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Area

public Area()
Default constructor which creates an empty area.

Area

public Area(Shape s)
The Area class creates an area geometry from the specified Shape object. The geometry is explicitly closed, if the Shape is not already closed. The fill rule (even-odd or winding) specified by the geometry of the Shape is used to determine the resulting enclosed area.
Parameters:
s - the Shape from which the area is constructed
Method Detail

add

public void add(Area rhs)
Adds the shape of the specified Area to the shape of this Area. Addition is achieved through union.
Parameters:
rhs - the Area to be added to the current shape

subtract

public void subtract(Area rhs)
Subtracts the shape of the specified Area from the shape of this Area.
Parameters:
rhs - the Area to be subtracted from the current shape

intersect

public void intersect(Area rhs)
Sets the shape of this Area to the intersection of its current shape and the shape of the specified Area.
Parameters:
rhs - the Area to be intersected with this Area

exclusiveOr

public void exclusiveOr(Area rhs)
Sets the shape of this Area to be the combined area of its current shape and the shape of the specified Area, minus their intersection.
Parameters:
rhs - the Area to be exclusive ORed with this Area.

reset

public void reset()
Removes all of the geometry from this Area and restores it to an empty area.

isEmpty

public boolean isEmpty()
Tests whether this Area object encloses any area.
Returns:
true if this Area object represents an empty area; false otherwise.

isPolygonal

public boolean isPolygonal()
Tests whether this Area consists entirely of straight edged polygonal geometry.
Returns:
true if the geometry of this Area consists entirely of line segments; false otherwise.

isRectangular

public boolean isRectangular()
Tests whether this Area is rectangular in shape.
Returns:
true if the geometry of this Area is rectangular in shape; false otherwise.

isSingular

public boolean isSingular()
Tests whether this Area is comprised of a single closed subpath. This method returns true if the path contains 0 or 1 subpaths, or false if the path contains more than 1 subpath. The subpaths are counted by the number of SEG_MOVETO segments that appear in the path.
Returns:
true if the Area is comprised of a single basic geometry; false otherwise.

getBounds2D

public Rectangle2D getBounds2D()
Returns a high precision bounding Rectangle2D that completely encloses this Area.

The Area class will attempt to return the tightest bounding box possible for the Shape. The bounding box will not be padded to include the control points of curves in the outline of the Shape, but should tightly fit the actual geometry of the outline itself.

Specified by:
getBounds2D in interface Shape
Returns:
the bounding Rectangle2D for the Area.

getBounds

public Rectangle getBounds()
Returns a bounding Rectangle that completely encloses this Area.

The Area class will attempt to return the tightest bounding box possible for the Shape. The bounding box will not be padded to include the control points of curves in the outline of the Shape, but should tightly fit the actual geometry of the outline itself. Since the returned object represents the bounding box with integers, the bounding box can only be as tight as the nearest integer coordinates that encompass the geometry of the Shape.

Specified by:
getBounds in interface Shape
Returns:
the bounding Rectangle for the Area.

clone

public Object clone()
Returns an exact copy of this Area object.
Overrides:
clone in class Object
Returns:
Created clone object

equals

public boolean equals(Area other)
Tests whether the geometries of the two Area objects are equal.
Parameters:
rhs - the Area to be compared to this Area
Returns:
true if the two geometries are equal; false otherwise.

transform

public void transform(AffineTransform t)
Transforms the geometry of this Area using the specified AffineTransform. The geometry is transformed in place, which permanently changes the enclosed area defined by this object.
Parameters:
t - the transformation used to transform the area

createTransformedArea

public Area createTransformedArea(AffineTransform t)
Creates a new Area object that contains the same geometry as this Area transformed by the specified AffineTransform. This Area object is unchanged.
Parameters:
t - the specified AffineTransform used to transform the new Area
Returns:
a new Area object representing the transformed geometry.

contains

public boolean contains(double x,
                        double y)
Tests if a specifed point lies inside the boundary of this Area object.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified point
Returns:
true if the point lies completely within the interior of the Area; false otherwise.

contains

public boolean contains(Point2D p)
Tests if a specified Point2D lies inside the boundary of the this Area object.
Specified by:
contains in interface Shape
Parameters:
p - the Point2D to test
Returns:
true if the specified Point2D lies completely within the interior of the Area; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests whether or not the interior of this Area object completely contains the specified rectangular area.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the specified rectangular area lies completely within the interior of the Area; false otherwise.

contains

public boolean contains(Rectangle2D p)
Tests whether or not the interior of this Area object completely contains the specified Rectangle2D.
Specified by:
contains in interface Shape
Parameters:
r - the Rectangle2D to test
Returns:
true if the Rectangle2D lies completely within the interior of the Area; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests whether the interior of this Area object intersects the interior of the specified rectangular area.
Specified by:
intersects in interface Shape
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of teh specified rectangular area
Returns:
true if the interior intersects the specified rectangular area; false otherwise;

intersects

public boolean intersects(Rectangle2D p)
Tests whether the interior of this Area object intersects the interior of the specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the Rectangle2D to test for intersection
Returns:
true if the interior intersects the specified Rectangle2D; false otherwise.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Creates a PathIterator for the outline of this Area object. This Area object is unchanged.
Specified by:
getPathIterator in interface Shape
Parameters:
t - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
the PathIterator object that returns the geometry of the outline of this Area, one segment at a time.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Creates a PathIterator for the flattened outline of this Area object. Only uncurved path segments represented by the SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator. This Area object is unchanged.
Specified by:
getPathIterator in interface Shape
Parameters:
t - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
flatness - the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the endpoints
Returns:
the PathIterator object that returns the geometry of the outline of this Area, one segment at a time.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.geom.Arc2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Arc2D.Double

No usage of java.awt.geom.Arc2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Arc2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Arc2D.Float

No usage of java.awt.geom.Arc2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.CubicCurve2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.CubicCurve2D.Double

No usage of java.awt.geom.CubicCurve2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.CubicCurve2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.CubicCurve2D.Float

No usage of java.awt.geom.CubicCurve2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Ellipse2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Ellipse2D.Double

No usage of java.awt.geom.Ellipse2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Ellipse2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Ellipse2D.Float

No usage of java.awt.geom.Ellipse2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.FlatteningPathIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.FlatteningPathIterator

No usage of java.awt.geom.FlatteningPathIterator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.GeneralPath

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.GeneralPath

No usage of java.awt.geom.GeneralPath

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.IllegalPathStateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.IllegalPathStateException

No usage of java.awt.geom.IllegalPathStateException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Line2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Line2D.Double

No usage of java.awt.geom.Line2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Line2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Line2D.Float

No usage of java.awt.geom.Line2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Point2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Point2D.Double

No usage of java.awt.geom.Point2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Point2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Point2D.Float

No usage of java.awt.geom.Point2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.QuadCurve2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.QuadCurve2D.Double

No usage of java.awt.geom.QuadCurve2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.QuadCurve2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.QuadCurve2D.Float

No usage of java.awt.geom.QuadCurve2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Rectangle2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Rectangle2D.Double

No usage of java.awt.geom.Rectangle2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Rectangle2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Rectangle2D.Float

No usage of java.awt.geom.Rectangle2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.RoundRectangle2D.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.RoundRectangle2D.Double

No usage of java.awt.geom.RoundRectangle2D.Double

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.RoundRectangle2D.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.RoundRectangle2D.Float

No usage of java.awt.geom.RoundRectangle2D.Float

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.AffineTransform

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.AffineTransform

Packages that use AffineTransform
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Uses of AffineTransform in java.awt

Methods in java.awt that return AffineTransform
abstract AffineTransform | GraphicsConfiguration.getDefaultTransform() Returns the default AffineTransform for this GraphicsConfiguration.
abstract AffineTransform | GraphicsConfiguration.getNormalizingTransform() Returns a AffineTransform that can be concatenated with the default AffineTransform of a GraphicsConfiguration so that 72 units in user space equals 1 inch in device space.
abstract AffineTransform | Graphics2D.getTransform() Returns a copy of the current Transform in the Graphics2D context.
AffineTransform | Font.getTransform() Returns a copy of the transform associated with this Font.

Methods in java.awt with parameters of type AffineTransform
PathIterator | Polygon.getPathIterator(AffineTransform at) Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon.
PathIterator | Polygon.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape.
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
abstract boolean | Graphics2D.drawImage(Image img, AffineTransform xform, ImageObserver obs) Renders an image, applying a transform from image space into user space before drawing.
abstract void | Graphics2D.drawRenderedImage(RenderedImage img, AffineTransform xform) Renders a RenderedImage, applying a transform from image space into user space before drawing.
abstract void | Graphics2D.drawRenderableImage(RenderableImage img, AffineTransform xform) Renders a RenderableImage, applying a transform from image space into user space before drawing.
abstract void | Graphics2D.transform(AffineTransform Tx) Composes an AffineTransform object with the Transform in this Graphics2D according to the rule last-specified-first-applied.
abstract void | Graphics2D.setTransform(AffineTransform Tx) Sets the Transform in the Graphics2D context.
PathIterator | Shape.getPathIterator(AffineTransform at) Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
PathIterator | Shape.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.
Font | Font.deriveFont(int style, AffineTransform trans) Creates a new Font object by replicating this Font object and applying a new style and transform.
Font | Font.deriveFont(AffineTransform trans) Creates a new Font object by replicating the current Font object and applying a new transform to it.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.

Uses of AffineTransform in java.awt.font

Methods in java.awt.font that return AffineTransform
abstract AffineTransform | GlyphVector.getGlyphTransform(int glyphIndex) Gets the transform of the specified glyph within this GlyphVector.
AffineTransform | TransformAttribute.getTransform() Returns a copy of the wrapped transform.
AffineTransform | FontRenderContext.getTransform() Gets the transform that is used to scale typographical points to pixels in this FontRenderContext.

Methods in java.awt.font with parameters of type AffineTransform
abstract void | GlyphVector.setGlyphTransform(int glyphIndex, AffineTransform newTX) Sets the transform of the specified glyph within this GlyphVector.
Shape | TextLayout.getOutline(AffineTransform tx) Returns a Shape representing the outline of this TextLayout.

Constructors in java.awt.font with parameters of type AffineTransform
TransformAttribute(AffineTransform transform)
Wraps the specified transform.
FontRenderContext(AffineTransform tx, boolean isAntiAliased, boolean usesFractionalMetrics)
Constructs a FontRenderContext object from an optional AffineTransform and two boolean values that determine if the newly constructed object has anti-aliasing or fractional metrics.

Uses of AffineTransform in java.awt.geom

Methods in java.awt.geom that return AffineTransform
static AffineTransform | AffineTransform.getTranslateInstance(double tx, double ty) Returns a transform representing a translation transformation.
static AffineTransform | AffineTransform.getRotateInstance(double theta) Returns a transform representing a rotation transformation.
static AffineTransform | AffineTransform.getRotateInstance(double theta, double x, double y) Returns a transform that rotates coordinates around an anchor point.
static AffineTransform | AffineTransform.getScaleInstance(double sx, double sy) Returns a transform representing a scaling transformation.
static AffineTransform | AffineTransform.getShearInstance(double shx, double shy) Returns a transform representing a shearing transformation.
AffineTransform | AffineTransform.createInverse() Returns an AffineTransform object representing the inverse transformation.

Methods in java.awt.geom with parameters of type AffineTransform
PathIterator | RectangularShape.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
PathIterator | Rectangle2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Rectangle2D.
PathIterator | Rectangle2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened Rectangle2D.
PathIterator | RoundRectangle2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this RoundRectangle2D.
void | Area.transform(AffineTransform t) Transforms the geometry of this Area using the specified AffineTransform.
Area | Area.createTransformedArea(AffineTransform t) Creates a new Area object that contains the same geometry as this Area transformed by the specified AffineTransform.
PathIterator | Area.getPathIterator(AffineTransform at) Creates a PathIterator for the outline of this Area object.
PathIterator | Area.getPathIterator(AffineTransform at, double flatness) Creates a PathIterator for the flattened outline of this Area object.
PathIterator | Line2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Line2D.
PathIterator | Line2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of this flattened Line2D.
PathIterator | Arc2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the arc.
PathIterator | Ellipse2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Ellipse2D.
void | GeneralPath.transform(AffineTransform at) Transforms the geometry of this path using the specified AffineTransform.
Shape | GeneralPath.createTransformedShape(AffineTransform at) Returns a new transformed Shape.
PathIterator | GeneralPath.getPathIterator(AffineTransform at) Returns a PathIterator object that iterates along the boundary of this Shape and provides access to the geometry of the outline of this Shape.
PathIterator | GeneralPath.getPathIterator(AffineTransform at, double flatness) Returns a PathIterator object that iterates along the boundary of the flattened Shape and provides access to the geometry of the outline of the Shape.
PathIterator | QuadCurve2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape of this QuadCurve2D.
PathIterator | QuadCurve2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D.
void | AffineTransform.setTransform(AffineTransform Tx) Sets this transform to a copy of the transform in the specified AffineTransform object.
void | AffineTransform.concatenate(AffineTransform Tx) Concatenates an AffineTransform Tx to this AffineTransform Cx in the most commonly useful way to provide a new user space that is mapped to the former user space by Tx.
void | AffineTransform.preConcatenate(AffineTransform Tx) Concatenates an AffineTransform Tx to this AffineTransform Cx in a less commonly used way such that Tx modifies the coordinate transformation relative to the absolute pixel space rather than relative to the existing user space.
PathIterator | CubicCurve2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape.
PathIterator | CubicCurve2D.getPathIterator(AffineTransform at, double flatness) Return an iteration object that defines the boundary of the flattened shape.

Constructors in java.awt.geom with parameters of type AffineTransform
AffineTransform(AffineTransform Tx)
Constructs a new AffineTransform that is a copy of the specified AffineTransform object.

Uses of AffineTransform in java.awt.image

Methods in java.awt.image that return AffineTransform
 AffineTransform AffineTransformOp.getTransform()
Returns the affine transform used by this transform operation.

Constructors in java.awt.image with parameters of type AffineTransform
AffineTransformOp(AffineTransform xform, RenderingHints hints)
Constructs an AffineTransformOp given an affine transform.
AffineTransformOp(AffineTransform xform, int interpolationType)
Constructs an AffineTransformOp given an affine transform and the interpolation type.

Uses of AffineTransform in java.awt.image.renderable

Methods in java.awt.image.renderable that return AffineTransform
 AffineTransform RenderContext.getTransform()
Gets the current user-to-device AffineTransform.

Methods in java.awt.image.renderable with parameters of type AffineTransform
void | RenderContext.setTransform(AffineTransform newTransform) Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.
void | RenderContext.preConcatenateTransform(AffineTransform modTransform) Modifies the current user-to-device transform by prepending another transform.
void | RenderContext.preConcetenateTransform(AffineTransform modTransform) Deprecated. replaced by preConcatenateTransform(AffineTransform).
void | RenderContext.concatenateTransform(AffineTransform modTransform) Modifies the current user-to-device transform by appending another transform.
void | RenderContext.concetenateTransform(AffineTransform modTransform) Deprecated. replaced by concatenateTransform(AffineTransform).

Constructors in java.awt.image.renderable with parameters of type AffineTransform
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev, RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints.
RenderContext(AffineTransform usr2dev, Shape aoi)
Constructs a RenderContext with a given transform and area of interest.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Arc2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Arc2D

Packages that use Arc2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of Arc2D in java.awt.geom

Subclasses of Arc2D in java.awt.geom
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,

Methods in java.awt.geom with parameters of type Arc2D
 void Arc2D.setArc(Arc2D a)
Sets this arc to be the same as the specified arc.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Area

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Area

Packages that use Area
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of Area in java.awt.geom

Methods in java.awt.geom that return Area
 Area Area.createTransformedArea(AffineTransform t)
Creates a new Area object that contains the same geometry as this Area transformed by the specified AffineTransform.

Methods in java.awt.geom with parameters of type Area
void | Area.add(Area rhs) Adds the shape of the specified Area to the shape of this Area.
void | Area.subtract(Area rhs) Subtracts the shape of the specified Area from the shape of this Area.
void | Area.intersect(Area rhs) Sets the shape of this Area to the intersection of its current shape and the shape of the specified Area.
void | Area.exclusiveOr(Area rhs) Sets the shape of this Area to be the combined area of its current shape and the shape of the specified Area, minus their intersection.
boolean | Area.equals(Area other) Tests whether the geometries of the two Area objects are equal.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.CubicCurve2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.CubicCurve2D

Packages that use CubicCurve2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of CubicCurve2D in java.awt.geom

Subclasses of CubicCurve2D in java.awt.geom
static class | CubicCurve2D.Double A cubic parametric curve segment specified with double coordinates.
static class | CubicCurve2D.Float A cubic parametric curve segment specified with float coordinates.

Methods in java.awt.geom with parameters of type CubicCurve2D
void | CubicCurve2D.setCurve(CubicCurve2D c) Sets the location of the endpoints and controlpoints of this curve to the same as those in the specified CubicCurve2D.
void | CubicCurve2D.subdivide(CubicCurve2D left, CubicCurve2D right) Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters.
static void | CubicCurve2D.subdivide(CubicCurve2D src, CubicCurve2D left, CubicCurve2D right) Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Dimension2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Dimension2D

Packages that use Dimension2D
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of Dimension2D in java.awt

Subclasses of Dimension2D in java.awt
 class Dimension
The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.

Uses of Dimension2D in java.awt.geom

Methods in java.awt.geom with parameters of type Dimension2D
void | Dimension2D.setSize(Dimension2D d) Sets the size of this Dimension2D object to match the specified size.
void | RectangularShape.setFrame(Point2D loc, Dimension2D size) Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
void | Arc2D.setArc(Point2D loc, Dimension2D size, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.

Uses of Dimension2D in javax.swing.plaf

Subclasses of Dimension2D in javax.swing.plaf
 class DimensionUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Ellipse2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Ellipse2D

Packages that use Ellipse2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of Ellipse2D in java.awt.geom

Subclasses of Ellipse2D in java.awt.geom
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Line2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Line2D

Packages that use Line2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of Line2D in java.awt.geom

Subclasses of Line2D in java.awt.geom
static class | Line2D.Double A line segment specified with double coordinates.
static class | Line2D.Float A line segment specified with float coordinates.

Methods in java.awt.geom with parameters of type Line2D
boolean | Rectangle2D.intersectsLine(Line2D l) Tests if the specified line segment intersects the interior of this Rectangle2D.
void | Line2D.setLine(Line2D l) Sets the location of the endpoints of this Line2D to the same as those endpoints of the specified Line2D.
boolean | Line2D.intersectsLine(Line2D l) Tests if the specified line segment intersects this line segment.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.NoninvertibleTransformException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.NoninvertibleTransformException

Packages that use NoninvertibleTransformException
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of NoninvertibleTransformException in java.awt.geom

Methods in java.awt.geom that throw NoninvertibleTransformException
AffineTransform | AffineTransform.createInverse() Returns an AffineTransform object representing the inverse transformation.
Point2D | AffineTransform.inverseTransform(Point2D ptSrc, Point2D ptDst) Inverse transforms the specified ptSrc and stores the result in ptDst.
void | AffineTransform.inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms an array of double precision coordinates by this transform.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Point2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Point2D

Packages that use Point2D
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.

Uses of Point2D in java.awt

Subclasses of Point2D in java.awt
 class Point
A point representing a location in (x, y) coordinate space, specified in integer precision.

Methods in java.awt that return Point2D
Point2D | GradientPaint.getPoint1() Returns a copy of the point P1 that anchors the first color.
Point2D | GradientPaint.getPoint2() Returns a copy of the point P2 which anchors the second color.

Methods in java.awt with parameters of type Point2D
boolean | Polygon.contains(Point2D p) Tests if a specified Point2D is inside the boundary of this Polygon.
boolean | Shape.contains(Point2D p) Tests if a specified Point2D is inside the boundary of the Shape.

Constructors in java.awt with parameters of type Point2D
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
Constructs a simple acyclic GradientPaint object.
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.

Uses of Point2D in java.awt.font

Methods in java.awt.font that return Point2D
abstract  Point2D GlyphVector.getGlyphPosition(int glyphIndex)
Returns the position of the specified glyph within this GlyphVector.

Methods in java.awt.font with parameters of type Point2D
abstract  void GlyphVector.setGlyphPosition(int glyphIndex, Point2D newPos)
Sets the position of the specified glyph within this GlyphVector.

Uses of Point2D in java.awt.geom

Subclasses of Point2D in java.awt.geom
static class | Point2D.Double The Double class defines a point specified in double precision.
static class | Point2D.Float The Float class defines a point specified in float precision.

Methods in java.awt.geom that return Point2D
abstract Point2D | Line2D.getP1() Returns the starting Point2D of this Line2D.
abstract Point2D | Line2D.getP2() Returns the end Point2D of this Line2D.
Point2D | Line2D.Float.getP1() Returns the start point.
Point2D | Line2D.Float.getP2() Returns the end point.
Point2D | Line2D.Double.getP1() Returns the starting Point2D of this Line2D.
Point2D | Line2D.Double.getP2() Returns the end Point2D of this Line2D.
Point2D | Arc2D.getStartPoint() Returns the starting point of the arc.
Point2D | Arc2D.getEndPoint() Returns the ending point of the arc.
Point2D | GeneralPath.getCurrentPoint() Returns the coordinates most recently added to the end of the path as a Point2D object.
abstract Point2D | QuadCurve2D.getP1() Returns the start point.
abstract Point2D | QuadCurve2D.getCtrlPt() Returns the control point.
abstract Point2D | QuadCurve2D.getP2() Returns the end point.
Point2D | QuadCurve2D.Float.getP1() Returns the start point.
Point2D | QuadCurve2D.Float.getCtrlPt() Returns the control point.
Point2D | QuadCurve2D.Float.getP2() Returns the end point.
Point2D | QuadCurve2D.Double.getP1() Returns the start point.
Point2D | QuadCurve2D.Double.getCtrlPt() Returns the control point.
Point2D | QuadCurve2D.Double.getP2() Returns the end point.
Point2D | AffineTransform.transform(Point2D ptSrc, Point2D ptDst) Transforms the specified ptSrc and stores the result in ptDst.
Point2D | AffineTransform.inverseTransform(Point2D ptSrc, Point2D ptDst) Inverse transforms the specified ptSrc and stores the result in ptDst.
Point2D | AffineTransform.deltaTransform(Point2D ptSrc, Point2D ptDst) Transforms the relative distance vector specified by ptSrc and stores the result in ptDst.
abstract Point2D | CubicCurve2D.getP1() Returns the start point.
abstract Point2D | CubicCurve2D.getCtrlP1() Returns the first control point.
abstract Point2D | CubicCurve2D.getCtrlP2() Returns the second control point.
abstract Point2D | CubicCurve2D.getP2() Returns the end point.
Point2D | CubicCurve2D.Float.getP1() Returns the start point.
Point2D | CubicCurve2D.Float.getCtrlP1() Returns the first control point.
Point2D | CubicCurve2D.Float.getCtrlP2() Returns the second control point.
Point2D | CubicCurve2D.Float.getP2() Returns the end point.
Point2D | CubicCurve2D.Double.getP1() Returns the start point.
Point2D | CubicCurve2D.Double.getCtrlP1() Returns the first control point.
Point2D | CubicCurve2D.Double.getCtrlP2() Returns the second control point.
Point2D | CubicCurve2D.Double.getP2() Returns the end point.

Methods in java.awt.geom with parameters of type Point2D
void | Point2D.setLocation(Point2D p) Sets the location of this Point2D to the same coordinates as the specified Point2D object.
double | Point2D.distanceSq(Point2D pt) Returns the square of the distance from this Point2D to a specified Point2D.
double | Point2D.distance(Point2D pt) Returns the distance from this Point2D to a specified Point2D.
void | RectangularShape.setFrame(Point2D loc, Dimension2D size) Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
void | RectangularShape.setFrameFromDiagonal(Point2D p1, Point2D p2) Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
void | RectangularShape.setFrameFromCenter(Point2D center, Point2D corner) Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
boolean | RectangularShape.contains(Point2D p) Tests if a specified Point2D is inside the boundary of the Shape.
int | Rectangle2D.outcode(Point2D p) Determines where the specified Point2D lies with respect to this Rectangle2D.
void | Rectangle2D.add(Point2D pt) Adds the Point2D object pt to this Rectangle2D.
boolean | Area.contains(Point2D p) Tests if a specified Point2D lies inside the boundary of the this Area object.
void | Line2D.setLine(Point2D p1, Point2D p2) Sets the location of the endpoints of this Line2D to the specified Point2D coordinates.
int | Line2D.relativeCCW(Point2D p) Returns an indicator of where the specified Point2D lies with respect to this line segment.
double | Line2D.ptSegDistSq(Point2D pt) Returns the square of the distance from a Point2D to this line segment.
double | Line2D.ptSegDist(Point2D pt) Returns the distance from a Point2D to this line segment.
double | Line2D.ptLineDistSq(Point2D pt) Returns the square of the distance from a specified Point2D to this line.
double | Line2D.ptLineDist(Point2D pt) Returns the distance from a Point2D to this line.
boolean | Line2D.contains(Point2D p) Tests if a given Point2D is inside the boundary of this Line2D.
void | Arc2D.setArc(Point2D loc, Dimension2D size, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.
void | Arc2D.setArcByTangent(Point2D p1, Point2D p2, Point2D p3, double radius) Sets the position, bounds, and angular extents of this arc to the specified value.
void | Arc2D.setAngleStart(Point2D p) Sets the starting angle of this arc to the angle that the specified point defines relative to the center of this arc.
void | Arc2D.setAngles(Point2D p1, Point2D p2) Sets the starting angle and angular extent of this arc using two points.
boolean | GeneralPath.contains(Point2D p) Tests if the specified Point2D is inside the boundary of this Shape.
void | QuadCurve2D.setCurve(Point2D p1, Point2D cp, Point2D p2) Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified Point2D coordinates.
void | QuadCurve2D.setCurve(Point2D[] pts, int offset) Sets the location of the endpoints and controlpoints of this QuadCurve2D to the coordinates of the Point2D objects at the specified offset in the specified array.
boolean | QuadCurve2D.contains(Point2D p) Tests if a specified Point2D is inside the boundary of the shape of this QuadCurve2D.
Point2D | AffineTransform.transform(Point2D ptSrc, Point2D ptDst) Transforms the specified ptSrc and stores the result in ptDst.
void | AffineTransform.transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts) Transforms an array of point objects by this transform.
Point2D | AffineTransform.inverseTransform(Point2D ptSrc, Point2D ptDst) Inverse transforms the specified ptSrc and stores the result in ptDst.
Point2D | AffineTransform.deltaTransform(Point2D ptSrc, Point2D ptDst) Transforms the relative distance vector specified by ptSrc and stores the result in ptDst.
void | CubicCurve2D.setCurve(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) Sets the location of the endpoints and controlpoints of this curve to the specified Point2D coordinates.
void | CubicCurve2D.setCurve(Point2D[] pts, int offset) Sets the location of the endpoints and controlpoints of this curve to the coordinates of the Point2D objects at the specified offset in the specified array.
boolean | CubicCurve2D.contains(Point2D p) Tests if a specified Point2D is inside the boundary of the shape.

Constructors in java.awt.geom with parameters of type Point2D
Line2D.Float(Point2D p1, Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.
Line2D.Double(Point2D p1, Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.

Uses of Point2D in java.awt.image

Methods in java.awt.image that return Point2D
Point2D | LookupOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | BufferedImageOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source image.
Point2D | ConvolveOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | BandCombineOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source Raster.
Point2D | AffineTransformOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source.
Point2D | RasterOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source Raster.
Point2D | ColorConvertOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | RescaleOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.

Methods in java.awt.image with parameters of type Point2D
Point2D | LookupOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | BufferedImageOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source image.
Point2D | ConvolveOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | BandCombineOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source Raster.
Point2D | AffineTransformOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source.
Point2D | RasterOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source Raster.
Point2D | ColorConvertOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
Point2D | RescaleOp.getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.QuadCurve2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.QuadCurve2D

Packages that use QuadCurve2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of QuadCurve2D in java.awt.geom

Subclasses of QuadCurve2D in java.awt.geom
static class | QuadCurve2D.Double A quadratic parametric curve segment specified with double coordinates.
static class | QuadCurve2D.Float A quadratic parametric curve segment specified with float coordinates.

Methods in java.awt.geom with parameters of type QuadCurve2D
void | QuadCurve2D.setCurve(QuadCurve2D c) Sets the location of the endpoints and controlpoint of this QuadCurve2D to the same as those in the specified QuadCurve2D.
void | QuadCurve2D.subdivide(QuadCurve2D left, QuadCurve2D right) Subdivides this QuadCurve2D and stores the resulting two subdivided curves into the left and right curve parameters.
static void | QuadCurve2D.subdivide(QuadCurve2D src, QuadCurve2D left, QuadCurve2D right) Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.Rectangle2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.Rectangle2D

Packages that use Rectangle2D
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Rectangle2D in java.awt

Subclasses of Rectangle2D in java.awt
 class Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Methods in java.awt that return Rectangle2D
Rectangle2D | Polygon.getBounds2D() Returns the high precision bounding box of the Shape.
Rectangle2D | TexturePaint.getAnchorRect() Returns a copy of the anchor rectangle which positions and sizes the textured image.
Rectangle2D | FontMetrics.getStringBounds(String str, Graphics context) Returns the bounds of the specified String in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context) Returns the bounds of the specified String in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context) Returns the bounds of the specified array of characters in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
Rectangle2D | FontMetrics.getMaxCharBounds(Graphics context) Returns the bounds for the character with the maximum bounds in the specified Graphics context.
Rectangle2D | Shape.getBounds2D() Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
Rectangle2D | Font.getStringBounds(String str, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(String str, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified String in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the specified array of characters in the specified FontRenderContext.
Rectangle2D | Font.getStringBounds(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
Rectangle2D | Font.getMaxCharBounds(FontRenderContext frc) Returns the bounds for the character with the maximum bounds as defined in the specified FontRenderContext.
Rectangle2D | Rectangle.getBounds2D() Return the high precision bounding box of this rectangle.
Rectangle2D | Rectangle.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle with the specified Rectangle2D.
Rectangle2D | Rectangle.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle with the specified Rectangle2D.

Methods in java.awt with parameters of type Rectangle2D
boolean | Polygon.intersects(Rectangle2D r) Tests if the interior of this Polygon intersects the interior of a specified Rectangle2D.
boolean | Polygon.contains(Rectangle2D r) Tests if the interior of this Polygon entirely contains the specified Rectangle2D.
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
boolean | Shape.intersects(Rectangle2D r) Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
boolean | Shape.contains(Rectangle2D r) Tests if the interior of the Shape entirely contains the specified Rectangle2D.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
Rectangle2D | Rectangle.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle with the specified Rectangle2D.
Rectangle2D | Rectangle.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle with the specified Rectangle2D.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.

Constructors in java.awt with parameters of type Rectangle2D
TexturePaint(BufferedImage txtr, Rectangle2D anchor)
Constructs a TexturePaint object.

Uses of Rectangle2D in java.awt.font

Methods in java.awt.font that return Rectangle2D
Rectangle2D | GlyphMetrics.getBounds2D() Returns the black box bounds of the glyph.
abstract Rectangle2D | GlyphVector.getLogicalBounds() Returns the logical bounds of this GlyphVector.
abstract Rectangle2D | GlyphVector.getVisualBounds() Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector.
Rectangle2D | TextLayout.getBounds() Returns the bounds of this TextLayout.
Rectangle2D | GraphicAttribute.getBounds() Returns a Rectangle2D that encloses all of the bits drawn by this GraphicAttribute relative to the rendering position.
Rectangle2D | ImageGraphicAttribute.getBounds() Returns a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute, relative to the rendering position.
Rectangle2D | ShapeGraphicAttribute.getBounds() Returns a Rectangle2D that encloses all of the bits drawn by this ShapeGraphicAttribute relative to the rendering position.

Methods in java.awt.font with parameters of type Rectangle2D
float[] | TextLayout.getCaretInfo(TextHitInfo hit, Rectangle2D bounds) Returns information about the caret corresponding to hit.
Shape | TextLayout.getCaretShape(TextHitInfo hit, Rectangle2D bounds) Returns a Shape representing the caret at the specified hit inside the specified bounds.
Shape[] | TextLayout.getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) Returns two paths corresponding to the strong and weak caret.
Shape[] | TextLayout.getCaretShapes(int offset, Rectangle2D bounds) Returns two paths corresponding to the strong and weak caret.
Shape | TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) Returns a path enclosing the visual selection in the specified range, extended to bounds.
Shape | TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds) Returns a Shape enclosing the logical selection in the specified range, extended to the specified bounds.
TextHitInfo | TextLayout.hitTestChar(float x, float y, Rectangle2D bounds) Returns a TextHitInfo corresponding to the specified point.

Constructors in java.awt.font with parameters of type Rectangle2D
GlyphMetrics(float advance, Rectangle2D bounds, byte glyphType)
Constructs a GlyphMetrics object.

Uses of Rectangle2D in java.awt.geom

Subclasses of Rectangle2D in java.awt.geom
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.

Methods in java.awt.geom that return Rectangle2D
Rectangle2D | RectangularShape.getFrame() Returns the framing Rectangle2D that defines the overall shape of this object.
Rectangle2D | Rectangle2D.getBounds2D() Returns the high precision bounding box of this Rectangle2D.
abstract Rectangle2D | Rectangle2D.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
abstract Rectangle2D | Rectangle2D.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | RoundRectangle2D.Float.getBounds2D() Returns the high precision bounding box of this RoundRectangle2D.
Rectangle2D | RoundRectangle2D.Double.getBounds2D() Returns the high precision bounding box of this RoundRectangle2D.
Rectangle2D | Area.getBounds2D() Returns a high precision bounding Rectangle2D that completely encloses this Area.
Rectangle2D | Rectangle2D.Float.getBounds2D() Returns the high precision bounding box of this Rectangle2D.
Rectangle2D | Rectangle2D.Float.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Rectangle2D.Float.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Rectangle2D.Double.getBounds2D() Returns the high precision bounding box of this Rectangle2D.
Rectangle2D | Rectangle2D.Double.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Rectangle2D.Double.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Line2D.Float.getBounds2D() Returns the high-precision bounding box of this Line2D.
Rectangle2D | Line2D.Double.getBounds2D() Returns the high-precision bounding box of this Line2D.
Rectangle2D | Arc2D.getBounds2D() Returns the high-precision bounding box of the arc.
protected abstract Rectangle2D | Arc2D.makeBounds(double x, double y, double w, double h) Constructs a Rectangle2D of the appropriate precision to hold the parameters calculated to be the bounding box of this arc.
protected Rectangle2D | Arc2D.Float.makeBounds(double x, double y, double w, double h) Return the high-precision bounding box of the arc.
protected Rectangle2D | Arc2D.Double.makeBounds(double x, double y, double w, double h) Returns the high-precision bounding box of the arc.
Rectangle2D | Ellipse2D.Float.getBounds2D() Returns the high precision bounding box of this Ellipse2D.
Rectangle2D | Ellipse2D.Double.getBounds2D() Returns the high precision bounding box of this Ellipse2D.
Rectangle2D | GeneralPath.getBounds2D() Returns the bounding box of the path.
Rectangle2D | QuadCurve2D.Float.getBounds2D() Returns the bounding box of this QuadCurve2D.
Rectangle2D | QuadCurve2D.Double.getBounds2D() Returns the bounding box of this QuadCurve2D.
Rectangle2D | CubicCurve2D.Float.getBounds2D() Returns the bounding box of the shape.
Rectangle2D | CubicCurve2D.Double.getBounds2D() Returns the bounding box of the shape.

Methods in java.awt.geom with parameters of type Rectangle2D
void | RectangularShape.setFrame(Rectangle2D r) Sets the framing rectangle of this Shape to be the specified Rectangle2D.
boolean | RectangularShape.intersects(Rectangle2D r) Tests if the interior of theShape intersects the interior of a specified Rectangle2D.
boolean | RectangularShape.contains(Rectangle2D r) Tests if the interior of the Shape entirely contains the specified Rectangle2D.
void | Rectangle2D.setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
abstract Rectangle2D | Rectangle2D.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
static void | Rectangle2D.intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
abstract Rectangle2D | Rectangle2D.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
static void | Rectangle2D.union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
void | Rectangle2D.add(Rectangle2D r) Adds a Rectangle2D object to this Rectangle2D.
boolean | Area.contains(Rectangle2D p) Tests whether or not the interior of this Area object completely contains the specified Rectangle2D.
boolean | Area.intersects(Rectangle2D p) Tests whether the interior of this Area object intersects the interior of the specified Rectangle2D.
void | Rectangle2D.Float.setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
Rectangle2D | Rectangle2D.Float.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Rectangle2D.Float.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
void | Rectangle2D.Double.setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
Rectangle2D | Rectangle2D.Double.createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | Rectangle2D.Double.createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
boolean | Line2D.intersects(Rectangle2D r) Tests if this Line2D intersects the interior of a specified Rectangle2D.
boolean | Line2D.contains(Rectangle2D r) Tests if the interior of this Line2D entirely contains the specified Rectangle2D.
void | Arc2D.setArc(Rectangle2D rect, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.
boolean | Arc2D.contains(Rectangle2D r) Determine whether or not the interior of the arc entirely contains the specified rectangle.
boolean | GeneralPath.contains(Rectangle2D r) Tests if the specified Rectangle2D is inside the boundary of this Shape.
boolean | GeneralPath.intersects(Rectangle2D r) Tests if the interior of this Shape intersects the interior of a specified Rectangle2D.
boolean | QuadCurve2D.intersects(Rectangle2D r) Tests if the shape of this QuadCurve2D intersects the interior of a specified Rectangle2D.
boolean | QuadCurve2D.contains(Rectangle2D r) Tests if the interior of the shape of this QuadCurve2D entirely contains the specified Rectangle2D.
boolean | CubicCurve2D.intersects(Rectangle2D r) Tests if the shape intersects the interior of a specified Rectangle2D.
boolean | CubicCurve2D.contains(Rectangle2D r) Tests if the interior of the shape entirely contains the specified Rectangle2D.

Constructors in java.awt.geom with parameters of type Rectangle2D
Arc2D.Float(Rectangle2D ellipseBounds, float start, float extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Double(Rectangle2D ellipseBounds, double start, double extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.

Uses of Rectangle2D in java.awt.image

Methods in java.awt.image that return Rectangle2D
Rectangle2D | LookupOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Rectangle2D | LookupOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
Rectangle2D | BufferedImageOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Rectangle2D | ConvolveOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Rectangle2D | ConvolveOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
Rectangle2D | BandCombineOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.
Rectangle2D | AffineTransformOp.getBounds2D(BufferedImage src) Returns the bounding box of the transformed destination.
Rectangle2D | AffineTransformOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.
Rectangle2D | RasterOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
Rectangle2D | ColorConvertOp.getBounds2D(BufferedImage src) Returns the bounding box of the destination, given this source.
Rectangle2D | ColorConvertOp.getBounds2D(Raster src) Returns the bounding box of the destination, given this source.
Rectangle2D | RescaleOp.getBounds2D(BufferedImage src) Returns the bounding box of the rescaled destination image.
Rectangle2D | RescaleOp.getBounds2D(Raster src) Returns the bounding box of the rescaled destination Raster.

Uses of Rectangle2D in java.awt.image.renderable

Methods in java.awt.image.renderable that return Rectangle2D
 Rectangle2D ContextualRenderedImageFactory.getBounds2D(ParameterBlock paramBlock)
Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space.

Uses of Rectangle2D in javax.swing.plaf.basic

Subclasses of Rectangle2D in javax.swing.plaf.basic
static class BasicTextUI.BasicCaret

Uses of Rectangle2D in javax.swing.text

Subclasses of Rectangle2D in javax.swing.text
 class DefaultCaret
A default implementation of Caret.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.RectangularShape

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.RectangularShape

Packages that use RectangularShape
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of RectangularShape in java.awt

Subclasses of RectangularShape in java.awt
 class Rectangle
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Uses of RectangularShape in java.awt.geom

Subclasses of RectangularShape in java.awt.geom
class | Arc2D Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,
class | Ellipse2D The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.
class | Rectangle2D The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.
class | RoundRectangle2D The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.

Uses of RectangularShape in javax.swing.plaf.basic

Subclasses of RectangularShape in javax.swing.plaf.basic
static class BasicTextUI.BasicCaret

Uses of RectangularShape in javax.swing.text

Subclasses of RectangularShape in javax.swing.text
 class DefaultCaret
A default implementation of Caret.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.geom.RoundRectangle2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.geom.RoundRectangle2D

Packages that use RoundRectangle2D
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of RoundRectangle2D in java.awt.geom

Subclasses of RoundRectangle2D in java.awt.geom
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.

Methods in java.awt.geom with parameters of type RoundRectangle2D
void | RoundRectangle2D.setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
void | RoundRectangle2D.Float.setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
void | RoundRectangle2D.Double.setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.geom.PathIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.geom.PathIterator

Packages that use PathIterator
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Uses of PathIterator in java.awt

Methods in java.awt that return PathIterator
PathIterator | Polygon.getPathIterator(AffineTransform at) Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon.
PathIterator | Polygon.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape.
PathIterator | Shape.getPathIterator(AffineTransform at) Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
PathIterator | Shape.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

Uses of PathIterator in java.awt.geom

Classes in java.awt.geom that implement PathIterator
 class FlatteningPathIterator
The FlatteningPathIterator class returns a flattened view of another PathIterator object.

Methods in java.awt.geom that return PathIterator
PathIterator | RectangularShape.getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
PathIterator | Rectangle2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Rectangle2D.
PathIterator | Rectangle2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened Rectangle2D.
PathIterator | RoundRectangle2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this RoundRectangle2D.
PathIterator | Area.getPathIterator(AffineTransform at) Creates a PathIterator for the outline of this Area object.
PathIterator | Area.getPathIterator(AffineTransform at, double flatness) Creates a PathIterator for the flattened outline of this Area object.
PathIterator | Line2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Line2D.
PathIterator | Line2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of this flattened Line2D.
PathIterator | Arc2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the arc.
PathIterator | Ellipse2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Ellipse2D.
PathIterator | GeneralPath.getPathIterator(AffineTransform at) Returns a PathIterator object that iterates along the boundary of this Shape and provides access to the geometry of the outline of this Shape.
PathIterator | GeneralPath.getPathIterator(AffineTransform at, double flatness) Returns a PathIterator object that iterates along the boundary of the flattened Shape and provides access to the geometry of the outline of the Shape.
PathIterator | QuadCurve2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape of this QuadCurve2D.
PathIterator | QuadCurve2D.getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D.
PathIterator | CubicCurve2D.getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape.
PathIterator | CubicCurve2D.getPathIterator(AffineTransform at, double flatness) Return an iteration object that defines the boundary of the flattened shape.

Methods in java.awt.geom with parameters of type PathIterator
 void GeneralPath.append(PathIterator pi, boolean connect)
Appends the geometry of the specified PathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment.

Constructors in java.awt.geom with parameters of type PathIterator
FlatteningPathIterator(PathIterator src, double flatness)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
FlatteningPathIterator(PathIterator src, double flatness, int limit)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CubicCurve2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class CubicCurve2D

java.lang.Object
  |
  +--java.awt.geom.CubicCurve2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
CubicCurve2D.Double, CubicCurve2D.Float
public abstract class CubicCurve2D
extends Object
implements Shape, Cloneable

The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.

This class is only the abstract superclass for all objects which store a 2D cubic curve segment. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | CubicCurve2D.Double A cubic parametric curve segment specified with double coordinates.
static class | CubicCurve2D.Float A cubic parametric curve segment specified with float coordinates.
Constructor Summary
protected CubicCurve2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class as this object.
boolean | contains(double x, double y) Tests if a specified coordinate is inside the boundary of the shape.
boolean | contains(double x, double y, double w, double h) Tests if the interior of the shape entirely contains the specified set of rectangular coordinates.
boolean | contains(Point2D p) Tests if a specified Point2D is inside the boundary of the shape.
boolean | contains(Rectangle2D r) Tests if the interior of the shape entirely contains the specified Rectangle2D.
Rectangle | getBounds() Returns the bounding box of the shape.
abstract Point2D | getCtrlP1() Returns the first control point.
abstract Point2D | getCtrlP2() Returns the second control point.
abstract double | getCtrlX1() Returns the X coordinate of the first control point in double precision.
abstract double | getCtrlX2() Returns the X coordinate of the second control point in double precision.
abstract double | getCtrlY1() Returns the Y coordinate of the first control point in double precision.
abstract double | getCtrlY2() Returns the Y coordinate of the second control point in double precision.
double | getFlatness() Returns the flatness of this curve.
static double | getFlatness(double[] coords, int offset) Returns the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index.
static double | getFlatness(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) Returns the flatness of the cubic curve specified by the indicated controlpoints.
double | getFlatnessSq() Returns the square of the flatness of this curve.
static double | getFlatnessSq(double[] coords, int offset) Returns the square of the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index.
static double | getFlatnessSq(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) Returns the square of the flatness of the cubic curve specified by the indicated controlpoints.
abstract Point2D | getP1() Returns the start point.
abstract Point2D | getP2() Returns the end point.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape.
PathIterator | getPathIterator(AffineTransform at, double flatness) Return an iteration object that defines the boundary of the flattened shape.
abstract double | getX1() Returns the X coordinate of the start point in double precision.
abstract double | getX2() Returns the X coordinate of the end point in double precision.
abstract double | getY1() Returns the Y coordinate of the start point in double precision.
abstract double | getY2() Returns the Y coordinate of the end point in double precision.
boolean | intersects(double x, double y, double w, double h) Tests if the shape intersects the interior of a specified set of rectangular coordinates.
boolean | intersects(Rectangle2D r) Tests if the shape intersects the interior of a specified Rectangle2D.
void | setCurve(CubicCurve2D c) Sets the location of the endpoints and controlpoints of this curve to the same as those in the specified CubicCurve2D.
void | setCurve(double[] coords, int offset) Sets the location of the endpoints and controlpoints of this curve to the double coordinates at the specified offset in the specified array.
abstract void | setCurve(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
void | setCurve(Point2D[] pts, int offset) Sets the location of the endpoints and controlpoints of this curve to the coordinates of the Point2D objects at the specified offset in the specified array.
void | setCurve(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) Sets the location of the endpoints and controlpoints of this curve to the specified Point2D coordinates.
static int | solveCubic(double[] eqn) Solves the cubic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots.
static int | solveCubic(double[] eqn, double[] res) Solve the cubic whose coefficients are in the eqn array and place the non-complex roots into the res array, returning the number of roots.
void | subdivide(CubicCurve2D left, CubicCurve2D right) Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters.
static void | subdivide(CubicCurve2D src, CubicCurve2D left, CubicCurve2D right) Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.
static void | subdivide(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff) Subdivides the cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
getBounds2D

Constructor Detail

CubicCurve2D

protected CubicCurve2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
CubicCurve2D.Float, CubicCurve2D.Double
Method Detail

getX1

public abstract double getX1()
Returns the X coordinate of the start point in double precision.
Returns:
the X coordinate of the start point of the CubicCurve2D.

getY1

public abstract double getY1()
Returns the Y coordinate of the start point in double precision.
Returns:
the Y coordinate of the start point of the CubicCurve2D.

getP1

public abstract Point2D getP1()
Returns the start point.
Returns:
a Point2D that is the start point of the CubicCurve2D.

getCtrlX1

public abstract double getCtrlX1()
Returns the X coordinate of the first control point in double precision.
Returns:
the X coordinate of the first control point of the CubicCurve2D.

getCtrlY1

public abstract double getCtrlY1()
Returns the Y coordinate of the first control point in double precision.
Returns:
the Y coordinate of the first control point of the CubicCurve2D.

getCtrlP1

public abstract Point2D getCtrlP1()
Returns the first control point.
Returns:
a Point2D that is the first control point of the CubicCurve2D.

getCtrlX2

public abstract double getCtrlX2()
Returns the X coordinate of the second control point in double precision.
Returns:
the X coordinate of the second control point of the CubicCurve2D.

getCtrlY2

public abstract double getCtrlY2()
Returns the Y coordinate of the second control point in double precision.
Returns:
the Y coordinate of the second control point of the CubicCurve2D.

getCtrlP2

public abstract Point2D getCtrlP2()
Returns the second control point.
Returns:
a Point2D that is the second control point of the CubicCurve2D.

getX2

public abstract double getX2()
Returns the X coordinate of the end point in double precision.
Returns:
the X coordinate of the end point of the CubicCurve2D.

getY2

public abstract double getY2()
Returns the Y coordinate of the end point in double precision.
Returns:
the Y coordinate of the end point of the CubicCurve2D.

getP2

public abstract Point2D getP2()
Returns the end point.
Returns:
a Point2D that is the end point of the CubicCurve2D.

setCurve

public abstract void setCurve(double x1,
                              double y1,
                              double ctrlx1,
                              double ctrly1,
                              double ctrlx2,
                              double ctrly2,
                              double x2,
                              double y2)
Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
Parameters:
x1, y1 - the first specified coordinates used to set the start point of this CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates used to set the first control point of this CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates used to set the second control point of this CubicCurve2D
x2, y2 - the fourth specified coordinates used to set the end point of this CubicCurve2D

setCurve

public void setCurve(double[] coords,
                     int offset)
Sets the location of the endpoints and controlpoints of this curve to the double coordinates at the specified offset in the specified array.
Parameters:
coords - a double array containing coordinates
offset - the index of coords at which to begin setting the endpoints and controlpoints of this curve to the coordinates contained in coords

setCurve

public void setCurve(Point2D p1,
                     Point2D cp1,
                     Point2D cp2,
                     Point2D p2)
Sets the location of the endpoints and controlpoints of this curve to the specified Point2D coordinates.
Parameters:
p1 - the first specified Point2D used to set the start point of this curve
p2 - the second specified Point2D used to set the first control point of this curve
p3 - the third specified Point2D used to set the second control point of this curve
p4 - the fourth specified Point2D used to set the end point of this curve

setCurve

public void setCurve(Point2D[] pts,
                     int offset)
Sets the location of the endpoints and controlpoints of this curve to the coordinates of the Point2D objects at the specified offset in the specified array.
Parameters:
pts - an array of Point2D objects
offset - the index of pts at which to begin setting the endpoints and controlpoints of this curve to the points contained in pts

setCurve

public void setCurve(CubicCurve2D c)
Sets the location of the endpoints and controlpoints of this curve to the same as those in the specified CubicCurve2D.
Parameters:
c - the specified CubicCurve2D

getFlatnessSq

public static double getFlatnessSq(double x1,
                                   double y1,
                                   double ctrlx1,
                                   double ctrly1,
                                   double ctrlx2,
                                   double ctrly2,
                                   double x2,
                                   double y2)
Returns the square of the flatness of the cubic curve specified by the indicated controlpoints. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Parameters:
x1, y1 - the first specified coordinates that specify the start point of a CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates that specify the first control point of a CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates that specify the second control point of a CubicCurve2D
x2, y2 - the fourth specified coordinates that specify the end point of a CubicCurve2D
Returns:
the square of the flatness of the CubicCurve2D represented by the specified coordinates.

getFlatness

public static double getFlatness(double x1,
                                 double y1,
                                 double ctrlx1,
                                 double ctrly1,
                                 double ctrlx2,
                                 double ctrly2,
                                 double x2,
                                 double y2)
Returns the flatness of the cubic curve specified by the indicated controlpoints. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Parameters:
x1, y1 - the first specified coordinates that specify the start point of a CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates that specify the first control point of a CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates that specify the second control point of a CubicCurve2D
x2, y2 - the fourth specified coordinates that specify the end point of a CubicCurve2D
Returns:
the flatness of the CubicCurve2D represented by the specified coordinates.

getFlatnessSq

public static double getFlatnessSq(double[] coords,
                                   int offset)
Returns the square of the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Parameters:
coords - an array containing coordinates
offset - the index of coords at which to begin setting the endpoints and controlpoints of this curve to the coordinates contained in coords
Returns:
the square of the flatness of the CubicCurve2D specified by the coordinates in coords at the specified offset.

getFlatness

public static double getFlatness(double[] coords,
                                 int offset)
Returns the flatness of the cubic curve specified by the controlpoints stored in the indicated array at the indicated index. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Parameters:
coords - an array containing coordinates
offset - the index of coords at which to begin setting the endpoints and controlpoints of this curve to the coordinates contained in coords
Returns:
the flatness of the CubicCurve2D specified by the coordinates in coords at the specified offset.

getFlatnessSq

public double getFlatnessSq()
Returns the square of the flatness of this curve. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Returns:
the square of the flatness of this curve.

getFlatness

public double getFlatness()
Returns the flatness of this curve. The flatness is the maximum distance of a controlpoint from the line connecting the endpoints.
Returns:
the flatness of this curve.

subdivide

public void subdivide(CubicCurve2D left,
                      CubicCurve2D right)
Subdivides this cubic curve and stores the resulting two subdivided curves into the left and right curve parameters. Either or both of the left and right objects may be the same as this object or null.
Parameters:
left - the cubic curve object for storing for the left or first half of the subdivided curve
right - the cubic curve object for storing for the right or second half of the subdivided curve

subdivide

public static void subdivide(CubicCurve2D src,
                             CubicCurve2D left,
                             CubicCurve2D right)
Subdivides the cubic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters. Either or both of the left and right objects may be the same as the src object or null.
Parameters:
src - the cubic curve to be subdivided
left - the cubic curve object for storing the left or first half of the subdivided curve
right - the cubic curve object for storing the right or second half of the subdivided curve

subdivide

public static void subdivide(double[] src,
                             int srcoff,
                             double[] left,
                             int leftoff,
                             double[] right,
                             int rightoff)
Subdivides the cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices. Either or both of the left and right arrays may be null or a reference to the same array as the src array. Note that the last point in the first subdivided curve is the same as the first point in the second subdivided curve. Thus, it is possible to pass the same array for left and right and to use offsets, such as rightoff equals (leftoff + 6), in order to avoid allocating extra storage for this common point.
Parameters:
src - the array holding the coordinates for the source curve
srcoff - the offset into the array of the beginning of the the 6 source coordinates
left - the array for storing the coordinates for the first half of the subdivided curve
leftoff - the offset into the array of the beginning of the the 6 left coordinates
right - the array for storing the coordinates for the second half of the subdivided curve
rightoff - the offset into the array of the beginning of the the 6 right coordinates

solveCubic

public static int solveCubic(double[] eqn)
Solves the cubic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots. The solved cubic is represented by the equation:
     eqn = {c, b, a, d}
     dx^3 + ax^2 + bx + c = 0
A return value of -1 is used to distinguish a constant equation that might be always 0 or never 0 from an equation that has no zeroes.
Parameters:
eqn - an array containing coefficients for a cubic
Returns:
the number of roots, or -1 if the equation is a constant.

solveCubic

public static int solveCubic(double[] eqn,
                             double[] res)
Solve the cubic whose coefficients are in the eqn array and place the non-complex roots into the res array, returning the number of roots. The cubic solved is represented by the equation: eqn = {c, b, a, d} dx^3 + ax^2 + bx + c = 0 A return value of -1 is used to distinguish a constant equation, which may be always 0 or never 0, from an equation which has no zeroes.
Returns:
the number of roots, or -1 if the equation is a constant

contains

public boolean contains(double x,
                        double y)
Tests if a specified coordinate is inside the boundary of the shape.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified coordinate to be tested
Returns:
true if the coordinate is inside the boundary of the shape; false otherwise.

contains

public boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of the shape.
Specified by:
contains in interface Shape
Parameters:
p - the specified Point2D to be tested
Returns:
true if the p is inside the boundary of the shape; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the shape intersects the interior of a specified set of rectangular coordinates.
Specified by:
intersects in interface Shape
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the shape intersects the interior of the specified rectangular area; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if the shape intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the specified Rectangle2D to be tested
Returns:
true if the shape intersects the interior of the specified Rectangle2D; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of the shape entirely contains the specified set of rectangular coordinates.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular shape
w - the width of the specified rectangular shape
h - the height of the specified rectangular shape
Returns:
true if the shape entirely contains the specified set of rectangular coordinates; false otherwise.

contains

public boolean contains(Rectangle2D r)
Tests if the interior of the shape entirely contains the specified Rectangle2D.
Specified by:
contains in interface Shape
Parameters:
r - the specified Rectangle2D to be tested
Returns:
true if the shape entirely contains the specified Rectangle2D; false otherwise.

getBounds

public Rectangle getBounds()
Returns the bounding box of the shape.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle that is the bounding box of the shape.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the shape. The iterator for this class is not multi-threaded safe, which means that this CubicCurve2D class does not guarantee that modifications to the geometry of this CubicCurve2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
the PathIterator object that returns the geometry of the outline of this CubicCurve2D, one segment at a time.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Return an iteration object that defines the boundary of the flattened shape. The iterator for this class is not multi-threaded safe, which means that this CubicCurve2D class does not guarantee that modifications to the geometry of this CubicCurve2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
flatness - the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the endpoints
Returns:
the PathIterator object that returns the geometry of the outline of this CubicCurve2D, one segment at a time.

clone

public Object clone()
Creates a new object of the same class as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Dimension2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Dimension2D

java.lang.Object
  |
  +--java.awt.geom.Dimension2D
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Dimension
public abstract class Dimension2D
extends Object
implements Cloneable

The Dimension2D class is to encapsulate a width and a height dimension.

This class is only the abstract superclass for all objects that store a 2D dimension. The actual storage representation of the sizes is left to the subclass.

Constructor Summary
protected Dimension2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class as this object.
abstract double | getHeight() Returns the height of this Dimension in double precision.
abstract double | getWidth() Returns the width of this Dimension in double precision.
void | setSize(Dimension2D d) Sets the size of this Dimension2D object to match the specified size.
abstract void | setSize(double width, double height) Sets the size of this Dimension object to the specified width and height.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Dimension2D

protected Dimension2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
Dimension
Method Detail

getWidth

public abstract double getWidth()
Returns the width of this Dimension in double precision.
Returns:
the width of this Dimension.

getHeight

public abstract double getHeight()
Returns the height of this Dimension in double precision.
Returns:
the height of this Dimension.

setSize

public abstract void setSize(double width,
                             double height)
Sets the size of this Dimension object to the specified width and height. This method is included for completeness, to parallel the getSize method of Component.
Parameters:
width - the new width for the Dimension object
height - the new height for the Dimension object

setSize

public void setSize(Dimension2D d)
Sets the size of this Dimension2D object to match the specified size. This method is included for completeness, to parallel the getSize method of Component.
Parameters:
d - the new size for the Dimension2D object

clone

public Object clone()
Creates a new object of the same class as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Ellipse2D.Double

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Ellipse2D
              |
              +--java.awt.geom.Ellipse2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Ellipse2D
public static class Ellipse2D.Double
extends Ellipse2D

The Double class defines an ellipse specified in double precision.

Inner classes inherited from class java.awt.geom.Ellipse2D
Ellipse2D.Double, Ellipse2D.Float
Field Summary
double | height The overall height of the Ellipse2D.
double | width The overall width of this Ellipse2D.
double | x The x coordinate of the upper left corner of this Ellipse2D.
double | y The y coordinate of the upper left corner of this Ellipse2D.
Constructor Summary
Ellipse2D.Double()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Ellipse2D.Double(double x, double y, double w, double h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the high precision bounding box of this Ellipse2D.
double | getHeight() Returns the overall height of this Ellipse2D in double precision.
double | getWidth() Returns the overall width of this Ellipse2D in double precision.
double | getX() Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
double | getY() Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
boolean | isEmpty() Determines whether or not the bounding box of this Ellipse2D is empty.
void | setFrame(double x, double y, double w, double h) Sets the location and size of this Ellipse2D to the specified double values.
Methods inherited from class java.awt.geom.Ellipse2D
contains, contains, getPathIterator, intersects
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public double x
The x coordinate of the upper left corner of this Ellipse2D.

y

public double y
The y coordinate of the upper left corner of this Ellipse2D.

width

public double width
The overall width of this Ellipse2D.

height

public double height
The overall height of the Ellipse2D.
Constructor Detail

Ellipse2D.Double

public Ellipse2D.Double()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).

Ellipse2D.Double

public Ellipse2D.Double(double x,
                        double y,
                        double w,
                        double h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Parameters:
x, y - the coordinates of the bounding rectangle
w - the width of the rectangle
h - the height of the rectangle
Method Detail

getX

public double getX()
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of the upper left corner of the bounding box of this Ellipse2D.

getY

public double getY()
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of the upper left corner of the bounding box of this Ellipse2D.

getWidth

public double getWidth()
Returns the overall width of this Ellipse2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this Ellipse2D.

getHeight

public double getHeight()
Returns the overall height of this Ellipse2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this Ellipse2D.

isEmpty

public boolean isEmpty()
Determines whether or not the bounding box of this Ellipse2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if the bounding box of this Ellipse2D is empty; false otherwise.

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of this Ellipse2D to the specified double values.
Overrides:
setFrame in class RectangularShape
Parameters:
x, y - the specified coordinates to which to set the location of the bounding box of this Ellipse2D
w - the width to which to set the width of this Ellipse2D
h - the height to which to set the height of this Ellipse2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Ellipse2D.
Returns:
a Rectangle2D that is the bounding box of this Ellipse2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class CubicCurve2D.Double

java.lang.Object
  |
  +--java.awt.geom.CubicCurve2D
        |
        +--java.awt.geom.CubicCurve2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
CubicCurve2D
public static class CubicCurve2D.Double
extends CubicCurve2D

A cubic parametric curve segment specified with double coordinates.

Inner classes inherited from class java.awt.geom.CubicCurve2D
CubicCurve2D.Double, CubicCurve2D.Float
Field Summary
double | ctrlx1 The X coordinate of the first control point of the cubic curve segment.
double | ctrlx2 The X coordinate of the second control point of the cubic curve segment.
double | ctrly1 The Y coordinate of the first control point of the cubic curve segment.
double | ctrly2 The Y coordinate of the second control point of the cubic curve segment.
double | x1 The X coordinate of the start point of the cubic curve segment.
double | x2 The X coordinate of the end point of the cubic curve segment.
double | y1 The Y coordinate of the start point of the cubic curve segment.
double | y2 The Y coordinate of the end point of the cubic curve segment.
Constructor Summary
CubicCurve2D.Double()
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).
CubicCurve2D.Double(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2)
Constructs and initializes a CubicCurve2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the bounding box of the shape.
Point2D | getCtrlP1() Returns the first control point.
Point2D | getCtrlP2() Returns the second control point.
double | getCtrlX1() Returns the X coordinate of the first control point in double precision.
double | getCtrlX2() Returns the X coordinate of the second control point in double precision.
double | getCtrlY1() Returns the Y coordinate of the first control point in double precision.
double | getCtrlY2() Returns the Y coordinate of the second control point in double precision.
Point2D | getP1() Returns the start point.
Point2D | getP2() Returns the end point.
double | getX1() Returns the X coordinate of the start point in double precision.
double | getX2() Returns the X coordinate of the end point in double precision.
double | getY1() Returns the Y coordinate of the start point in double precision.
double | getY2() Returns the Y coordinate of the end point in double precision.
void | setCurve(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
Methods inherited from class java.awt.geom.CubicCurve2D
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveCubic, solveCubic, subdivide, subdivide, subdivide
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public double x1
The X coordinate of the start point of the cubic curve segment.

y1

public double y1
The Y coordinate of the start point of the cubic curve segment.

ctrlx1

public double ctrlx1
The X coordinate of the first control point of the cubic curve segment.

ctrly1

public double ctrly1
The Y coordinate of the first control point of the cubic curve segment.

ctrlx2

public double ctrlx2
The X coordinate of the second control point of the cubic curve segment.

ctrly2

public double ctrly2
The Y coordinate of the second control point of the cubic curve segment.

x2

public double x2
The X coordinate of the end point of the cubic curve segment.

y2

public double y2
The Y coordinate of the end point of the cubic curve segment.
Constructor Detail

CubicCurve2D.Double

public CubicCurve2D.Double()
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).

CubicCurve2D.Double

public CubicCurve2D.Double(double x1,
                           double y1,
                           double ctrlx1,
                           double ctrly1,
                           double ctrlx2,
                           double ctrly2,
                           double x2,
                           double y2)
Constructs and initializes a CubicCurve2D from the specified coordinates.
Parameters:
x1, y1 - the first specified coordinates for the start point of the resulting CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates for the first control point of the resulting CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates for the second control point of the resulting CubicCurve2D
x2, y2 - the fourth specified coordinates for the end point of the resulting CubicCurve2D
Method Detail

getX1

public double getX1()
Returns the X coordinate of the start point in double precision.
Overrides:
getX1 in class CubicCurve2D
Returns:
the X coordinate of the first control point of the CubicCurve2D.

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.
Overrides:
getY1 in class CubicCurve2D
Returns:
the Y coordinate of the start point of the CubicCurve2D.

getP1

public Point2D getP1()
Returns the start point.
Overrides:
getP1 in class CubicCurve2D
Returns:
a Point2D that is the start point of the CubicCurve2D.

getCtrlX1

public double getCtrlX1()
Returns the X coordinate of the first control point in double precision.
Overrides:
getCtrlX1 in class CubicCurve2D
Returns:
the X coordinate of the first control point of the CubicCurve2D.

getCtrlY1

public double getCtrlY1()
Returns the Y coordinate of the first control point in double precision.
Overrides:
getCtrlY1 in class CubicCurve2D
Returns:
the Y coordinate of the first control point of the CubicCurve2D.

getCtrlP1

public Point2D getCtrlP1()
Returns the first control point.
Overrides:
getCtrlP1 in class CubicCurve2D
Returns:
a Point2D that is the first control point of the CubicCurve2D.

getCtrlX2

public double getCtrlX2()
Returns the X coordinate of the second control point in double precision.
Overrides:
getCtrlX2 in class CubicCurve2D
Returns:
the X coordinate of the second control point of the CubicCurve2D.

getCtrlY2

public double getCtrlY2()
Returns the Y coordinate of the second control point in double precision.
Overrides:
getCtrlY2 in class CubicCurve2D
Returns:
the Y coordinate of the second control point of the CubicCurve2D.

getCtrlP2

public Point2D getCtrlP2()
Returns the second control point.
Overrides:
getCtrlP2 in class CubicCurve2D
Returns:
a Point2D that is the second control point of the CubicCurve2D.

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.
Overrides:
getX2 in class CubicCurve2D
Returns:
the X coordinate of the end point of the CubicCurve2D.

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.
Overrides:
getY2 in class CubicCurve2D
Returns:
the Y coordinate of the end point of the CubicCurve2D.

getP2

public Point2D getP2()
Returns the end point.
Overrides:
getP2 in class CubicCurve2D
Returns:
a Point2D that is the end point of the CubicCurve2D.

setCurve

public void setCurve(double x1,
                     double y1,
                     double ctrlx1,
                     double ctrly1,
                     double ctrlx2,
                     double ctrly2,
                     double x2,
                     double y2)
Sets the location of the endpoints and controlpoints of this curve to the specified double coordinates.
Overrides:
setCurve in class CubicCurve2D
Parameters:
x1, y1 - the first specified coordinates used to set the start point of this CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates used to set the first control point of this CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates used to set the second control point of this CubicCurve2D
x2, y2 - the fourth specified coordinates used to set the end point of this CubicCurve2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding box of the shape.
Returns:
a Rectangle2D that is the bounding box of the shape.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class QuadCurve2D.Double

java.lang.Object
  |
  +--java.awt.geom.QuadCurve2D
        |
        +--java.awt.geom.QuadCurve2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
QuadCurve2D
public static class QuadCurve2D.Double
extends QuadCurve2D

A quadratic parametric curve segment specified with double coordinates.

Inner classes inherited from class java.awt.geom.QuadCurve2D
QuadCurve2D.Double, QuadCurve2D.Float
Field Summary
double | ctrlx The x coordinate of the control point of the quadratic curve segment.
double | ctrly The y coordinate of the control point of the quadratic curve segment.
double | x1 The x coordinate of the start point of the quadratic curve segment.
double | x2 The x coordinate of the end point of the quadratic curve segment.
double | y1 The x coordinate of the start point of the quadratic curve segment.
double | y2 The y coordinate of the end point of the quadratic curve segment.
Constructor Summary
QuadCurve2D.Double()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
QuadCurve2D.Double(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Constructs and initializes a QuadCurve2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the bounding box of this QuadCurve2D.
Point2D | getCtrlPt() Returns the control point.
double | getCtrlX() Returns the x coordinate of the control point in double precision.
double | getCtrlY() Returns the y coordinate of the control point in double precision.
Point2D | getP1() Returns the start point.
Point2D | getP2() Returns the end point.
double | getX1() Returns the x coordinate of the start point in double precision.
double | getX2() Returns the x coordinate of the end point in double precision.
double | getY1() Returns the y coordinate of the start point in double precision.
double | getY2() Returns the y coordinate of the end point in double precision.
void | setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
Methods inherited from class java.awt.geom.QuadCurve2D
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdivide
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public double x1
The x coordinate of the start point of the quadratic curve segment.

y1

public double y1
The x coordinate of the start point of the quadratic curve segment.

ctrlx

public double ctrlx
The x coordinate of the control point of the quadratic curve segment.

ctrly

public double ctrly
The y coordinate of the control point of the quadratic curve segment.

x2

public double x2
The x coordinate of the end point of the quadratic curve segment.

y2

public double y2
The y coordinate of the end point of the quadratic curve segment.
Constructor Detail

QuadCurve2D.Double

public QuadCurve2D.Double()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).

QuadCurve2D.Double

public QuadCurve2D.Double(double x1,
                          double y1,
                          double ctrlx,
                          double ctrly,
                          double x2,
                          double y2)
Constructs and initializes a QuadCurve2D from the specified coordinates.
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y1 - the coordinates of the ending point
Method Detail

getX1

public double getX1()
Returns the x coordinate of the start point in double precision.
Overrides:
getX1 in class QuadCurve2D
Returns:
the x coordinate of the starting point.

getY1

public double getY1()
Returns the y coordinate of the start point in double precision.
Overrides:
getY1 in class QuadCurve2D
Returns:
the y coordiante of the starting point.

getP1

public Point2D getP1()
Returns the start point.
Overrides:
getP1 in class QuadCurve2D
Returns:
a Point2D that is the starting point of this QuadCurve2D.

getCtrlX

public double getCtrlX()
Returns the x coordinate of the control point in double precision.
Overrides:
getCtrlX in class QuadCurve2D
Returns:
the x coordinate of the control point.

getCtrlY

public double getCtrlY()
Returns the y coordinate of the control point in double precision.
Overrides:
getCtrlY in class QuadCurve2D
Returns:
the y coordiante of the control point.

getCtrlPt

public Point2D getCtrlPt()
Returns the control point.
Overrides:
getCtrlPt in class QuadCurve2D
Returns:
a Point2D object that is the control point of this QuadCurve2D.

getX2

public double getX2()
Returns the x coordinate of the end point in double precision.
Overrides:
getX2 in class QuadCurve2D
Returns:
the x coordiante of the end point.

getY2

public double getY2()
Returns the y coordinate of the end point in double precision.
Overrides:
getY2 in class QuadCurve2D
Returns:
the y coordiante of the end point.

getP2

public Point2D getP2()
Returns the end point.
Overrides:
getP2 in class QuadCurve2D
Returns:
a Point2D that is the end point of this QuadCurve2D.

setCurve

public void setCurve(double x1,
                     double y1,
                     double ctrlx,
                     double ctrly,
                     double x2,
                     double y2)
Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
Overrides:
setCurve in class QuadCurve2D
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y1 - the coordinates of the ending point

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding box of this QuadCurve2D.
Returns:
a Rectangle2D that is the bounding box of the shape of this QuadCurve2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Line2D.Double

java.lang.Object
  |
  +--java.awt.geom.Line2D
        |
        +--java.awt.geom.Line2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Line2D
public static class Line2D.Double
extends Line2D

A line segment specified with double coordinates.

Inner classes inherited from class java.awt.geom.Line2D
Line2D.Double, Line2D.Float
Field Summary
double | x1 The X coordinate of the start point of the line segment.
double | x2 The X coordinate of the end point of the line segment.
double | y1 The Y coordinate of the start point of the line segment.
double | y2 The Y coordinate of the end point of the line segment.
Constructor Summary
Line2D.Double()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Double(double X1, double Y1, double X2, double Y2)
Constructs and initializes a Line2D from the specified coordinates.
Line2D.Double(Point2D p1, Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.
Method Summary
Rectangle2D | getBounds2D() Returns the high-precision bounding box of this Line2D.
Point2D | getP1() Returns the starting Point2D of this Line2D.
Point2D | getP2() Returns the end Point2D of this Line2D.
double | getX1() Returns the X coordinate of the start point in double precision.
double | getX2() Returns the X coordinate of the end point in double precision.
double | getY1() Returns the Y coordinate of the start point in double precision.
double | getY2() Returns the Y coordinate of the end point in double precision.
void | setLine(double X1, double Y1, double X2, double Y2) Sets the location of the endpoints of this Line2D to the specified double coordinates.
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public double x1
The X coordinate of the start point of the line segment.

y1

public double y1
The Y coordinate of the start point of the line segment.

x2

public double x2
The X coordinate of the end point of the line segment.

y2

public double y2
The Y coordinate of the end point of the line segment.
Constructor Detail

Line2D.Double

public Line2D.Double()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).

Line2D.Double

public Line2D.Double(double X1,
                     double Y1,
                     double X2,
                     double Y2)
Constructs and initializes a Line2D from the specified coordinates.
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

Line2D.Double

public Line2D.Double(Point2D p1,
                     Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.
Parameters:
p1, p2 - the specified Point2D objects
Method Detail

getX1

public double getX1()
Returns the X coordinate of the start point in double precision.
Overrides:
getX1 in class Line2D
Returns:
the X coordinate of this Line2D object's starting point.

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.
Overrides:
getY1 in class Line2D
Returns:
the X coordinate of this Line2D object's starting point.

getP1

public Point2D getP1()
Returns the starting Point2D of this Line2D.
Overrides:
getP1 in class Line2D
Returns:
the starting Point2D of this Line2D

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.
Overrides:
getX2 in class Line2D
Returns:
the X coordinate of this Line2D object's ending point.

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.
Overrides:
getY2 in class Line2D
Returns:
the Y coordinate of this Line2D object's starting point.

getP2

public Point2D getP2()
Returns the end Point2D of this Line2D.
Overrides:
getP2 in class Line2D
Returns:
the ending Point2D of this Line2D.

setLine

public void setLine(double X1,
                    double Y1,
                    double X2,
                    double Y2)
Sets the location of the endpoints of this Line2D to the specified double coordinates.
Overrides:
setLine in class Line2D
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

getBounds2D

public Rectangle2D getBounds2D()
Returns the high-precision bounding box of this Line2D.
Returns:
a Rectangle2D that is the high-precision bounding box of this Line2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Rectangle2D.Double

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.geom.Rectangle2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Rectangle2D
public static class Rectangle2D.Double
extends Rectangle2D

The Double class defines a rectangle specified in double coordinates.

Since:
1.2

Inner classes inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
Field Summary
double | height The height of this Rectangle2D.
double | width The width of this Rectangle2D.
double | x The x coordinate of this Rectangle2D.
double | y The y coordinate of this Rectangle2D.
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor Summary
Rectangle2D.Double()
Constructs a new Rectangle2D, initialized to location (0, 0) and size (0, 0).
Rectangle2D.Double(double x, double y, double w, double h)
Constructs and initializes a Rectangle2D from the specified double coordinates.
Method Summary
Rectangle2D | createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | getBounds2D() Returns the high precision bounding box of this Rectangle2D.
double | getHeight() Returns the height of this Rectangle2D in double precision.
double | getWidth() Returns the width of this Rectangle2D in double precision.
double | getX() Returns the X coordinate of this Rectangle2D in double precision.
double | getY() Returns the Y coordinate of this Rectangle2D in double precision.
boolean | isEmpty() Determines whether or not this Rectangle2D is empty.
int | outcode(double x, double y) Determines where the specified double coordinates lie with respect to this Rectangle2D.
void | setRect(double x, double y, double w, double h) Sets the location and size of this Rectangle2D to the specified double values.
void | setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
String | toString() Returns the String representation of this Rectangle2D.
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

x

public double x
The x coordinate of this Rectangle2D.
Since:
1.2

y

public double y
The y coordinate of this Rectangle2D.
Since:
1.2

width

public double width
The width of this Rectangle2D.
Since:
1.2

height

public double height
The height of this Rectangle2D.
Since:
1.2
Constructor Detail

Rectangle2D.Double

public Rectangle2D.Double()
Constructs a new Rectangle2D, initialized to location (0, 0) and size (0, 0).
Since:
1.2

Rectangle2D.Double

public Rectangle2D.Double(double x,
                          double y,
                          double w,
                          double h)
Constructs and initializes a Rectangle2D from the specified double coordinates.
Parameters:
x, y - the coordinates of the upper left corner of the newly constructed Rectangle2D
width - the width of the newly constructed Rectangle2D
height - the height of the newly constructed Rectangle2D
Since:
1.2
Method Detail

getX

public double getX()
Returns the X coordinate of this Rectangle2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of this Rectangle2D.
Since:
1.2

getY

public double getY()
Returns the Y coordinate of this Rectangle2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of this Rectangle2D.
Since:
1.2

getWidth

public double getWidth()
Returns the width of this Rectangle2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this Rectangle2D.
Since:
1.2

getHeight

public double getHeight()
Returns the height of this Rectangle2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this Rectangle2D.
Since:
1.2

isEmpty

public boolean isEmpty()
Determines whether or not this Rectangle2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if this Rectangle2D is empty; false otherwise.
Since:
1.2

setRect

public void setRect(double x,
                    double y,
                    double w,
                    double h)
Sets the location and size of this Rectangle2D to the specified double values.
Overrides:
setRect in class Rectangle2D
Parameters:
x, y - the coordinates to which to set the upper left corner of this Rectangle2D
w - the value to use to set the width of this Rectangle2D
h - the value to use to set the height of this Rectangle2D
Since:
1.2

setRect

public void setRect(Rectangle2D r)
Sets this Rectangle2D to be the same as the specified Rectangle2D.
Overrides:
setRect in class Rectangle2D
Parameters:
r - the specified Rectangle2D
Since:
1.2

outcode

public int outcode(double x,
                   double y)
Determines where the specified double coordinates lie with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle2D.
Overrides:
outcode in class Rectangle2D
Parameters:
x, y - the specified coordinates
Returns:
the logical OR of all appropriate out codes.
Since:
1.2
See Also:
Rectangle2D.OUT_LEFT, Rectangle2D.OUT_TOP, Rectangle2D.OUT_RIGHT, Rectangle2D.OUT_BOTTOM

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Rectangle2D.
Overrides:
getBounds2D in class Rectangle2D
Returns:
the bounding box of this Rectangle2D.
Since:
1.2

createIntersection

public Rectangle2D createIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Overrides:
createIntersection in class Rectangle2D
Parameters:
r - the Rectangle2D to be intersected with this Rectangle2D
Returns:
the largest Rectangle2D contained in both the specified Rectangle2D and in this Rectangle2D.
Since:
1.2

createUnion

public Rectangle2D createUnion(Rectangle2D r)
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Overrides:
createUnion in class Rectangle2D
Parameters:
r - the Rectangle2D to be combined with this Rectangle2D
Returns:
the smallest Rectangle2D containing both the specified Rectangle2D and this Rectangle2D.
Since:
1.2

toString

public String toString()
Returns the String representation of this Rectangle2D.
Overrides:
toString in class Object
Returns:
a String representing this Rectangle2D.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class RoundRectangle2D.Double

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.RoundRectangle2D
              |
              +--java.awt.geom.RoundRectangle2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
RoundRectangle2D
public static class RoundRectangle2D.Double
extends RoundRectangle2D

The Double class defines a rectangle with rounded corners all specified in double coordinates.

Inner classes inherited from class java.awt.geom.RoundRectangle2D
RoundRectangle2D.Double, RoundRectangle2D.Float
Field Summary
double | archeight The height of the arc that rounds off the corners.
double | arcwidth The width of the arc that rounds off the corners.
double | height The height of this RoundRectangle2D.
double | width The width of this RoundRectangle2D.
double | x The X coordinate of this RoundRectangle2D.
double | y The Y coordinate of this RoundRectangle2D.
Constructor Summary
RoundRectangle2D.Double()
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.
RoundRectangle2D.Double(double x, double y, double w, double h, double arcw, double arch)
Constructs and initializes a RoundRectangle2D from the specified coordinates.
Method Summary
double | getArcHeight() Returns the height of the arc that rounds off the corners.
double | getArcWidth() Returns the width of the arc that rounds off the corners.
Rectangle2D | getBounds2D() Returns the high precision bounding box of this RoundRectangle2D.
double | getHeight() Returns the height of this RoundRectangle2D in double precision.
double | getWidth() Returns the width of this RoundRectangle2D in double precision.
double | getX() Returns the X coordinate of this RoundRectangle2D in double precision.
double | getY() Returns the Y coordinate of this RoundRectangle2D in double precision.
boolean | isEmpty() Determines whether or not this RoundRectangle2D is empty.
void | setRoundRect(double x, double y, double w, double h, double arcw, double arch) Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
void | setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Methods inherited from class java.awt.geom.RoundRectangle2D
contains, contains, getPathIterator, intersects, setFrame
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public double x
The X coordinate of this RoundRectangle2D.

y

public double y
The Y coordinate of this RoundRectangle2D.

width

public double width
The width of this RoundRectangle2D.

height

public double height
The height of this RoundRectangle2D.

arcwidth

public double arcwidth
The width of the arc that rounds off the corners.

archeight

public double archeight
The height of the arc that rounds off the corners.
Constructor Detail

RoundRectangle2D.Double

public RoundRectangle2D.Double()
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.

RoundRectangle2D.Double

public RoundRectangle2D.Double(double x,
                               double y,
                               double w,
                               double h,
                               double arcw,
                               double arch)
Constructs and initializes a RoundRectangle2D from the specified coordinates.
Parameters:
x,  - the coordinates to which to set the newly constructed RoundRectangle2D
w - the width to which to set the newly constructed RoundRectangle2D
h - the height to which to set the newly constructed RoundRectangle2D
arcw - the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arch - the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D
Method Detail

getX

public double getX()
Returns the X coordinate of this RoundRectangle2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of this RoundRectangle2D.

getY

public double getY()
Returns the Y coordinate of this RoundRectangle2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of this RoundRectangle2D.

getWidth

public double getWidth()
Returns the width of this RoundRectangle2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this RoundRectangle2D.

getHeight

public double getHeight()
Returns the height of this RoundRectangle2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this RoundRectangle2D.

getArcWidth

public double getArcWidth()
Returns the width of the arc that rounds off the corners.
Overrides:
getArcWidth in class RoundRectangle2D
Returns:
the width of the arc that rounds off the corners of this RoundRectangle2D.

getArcHeight

public double getArcHeight()
Returns the height of the arc that rounds off the corners.
Overrides:
getArcHeight in class RoundRectangle2D
Returns:
the height of the arc that rounds off the corners of this RoundRectangle2D.

isEmpty

public boolean isEmpty()
Determines whether or not this RoundRectangle2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if this RoundRectangle2D is empty; false othwerwise.

setRoundRect

public void setRoundRect(double x,
                         double y,
                         double w,
                         double h,
                         double arcw,
                         double arch)
Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
Overrides:
setRoundRect in class RoundRectangle2D
Parameters:
x, y - the coordinates to which to set the location of this RoundRectangle2D
w - the width to which to set this RoundRectangle2D
h - the height to which to set this RoundRectangle2D
arcw - the width to which to set the arc of this RoundRectangle2D
arch - the height to which to set the arc of this RoundRectangle2D

setRoundRect

public void setRoundRect(RoundRectangle2D rr)
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Overrides:
setRoundRect in class RoundRectangle2D
Parameters:
rr - the specified RoundRectangle2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this RoundRectangle2D.
Returns:
a Rectangle2D that is the bounding box of this RoundRectangle2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Point2D.Double

java.lang.Object
  |
  +--java.awt.geom.Point2D
        |
        +--java.awt.geom.Point2D.Double
All Implemented Interfaces:
Cloneable
Enclosing class:
Point2D
public static class Point2D.Double
extends Point2D

The Double class defines a point specified in double precision.

Inner classes inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
Field Summary
double | x The X coordinate of this Point2D.
double | y The Y coordinate of this Point2D.
Constructor Summary
Point2D.Double()
Constructs and initializes a Point2D with coordinates (0, 0).
Point2D.Double(double x, double y)
Constructs and initializes a Point2D with the specified coordinates.
Method Summary
double | getX() Returns the X coordinate of this Point2D in double precision.
double | getY() Returns the Y coordinate of this Point2D in double precision.
void | setLocation(double x, double y) Sets the location of this Point2D to the specified double coordinates.
String | toString() Returns a String that represents the value of this Point2D.
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

x

public double x
The X coordinate of this Point2D.
Since:
1.2

y

public double y
The Y coordinate of this Point2D.
Since:
1.2
Constructor Detail

Point2D.Double

public Point2D.Double()
Constructs and initializes a Point2D with coordinates (0, 0).
Since:
1.2

Point2D.Double

public Point2D.Double(double x,
                      double y)
Constructs and initializes a Point2D with the specified coordinates.
Parameters:
x, y - the coordinates to which to set the newly constructed Point2D
Since:
1.2
Method Detail

getX

public double getX()
Returns the X coordinate of this Point2D in double precision.
Overrides:
getX in class Point2D
Returns:
the X coordinate of this Point2D.
Since:
1.2

getY

public double getY()
Returns the Y coordinate of this Point2D in double precision.
Overrides:
getY in class Point2D
Returns:
the Y coordinate of this Point2D.
Since:
1.2

setLocation

public void setLocation(double x,
                        double y)
Sets the location of this Point2D to the specified double coordinates.
Overrides:
setLocation in class Point2D
Parameters:
x, y - the coordinates to which to set this Point2D
Since:
1.2

toString

public String toString()
Returns a String that represents the value of this Point2D.
Overrides:
toString in class Object
Returns:
a string representation of this Point2D.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Arc2D.Double

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Arc2D
              |
              +--java.awt.geom.Arc2D.Double
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Arc2D
public static class Arc2D.Double
extends Arc2D

An arc specified in double precision,

Inner classes inherited from class java.awt.geom.Arc2D
Arc2D.Double, Arc2D.Float
Field Summary
double | extent The angular extent of the arc in degrees.
double | height The overall height of the full ellipse (not considering the angular extents).
double | start The starting angle of the arc in degrees.
double | width The overall width of the full ellipse (not considering the angular extents).
double | x The x coordinate of the upper left corner of the arc.
double | y The y coordinate of the upper left corner of the arc.
Fields inherited from class java.awt.geom.Arc2D
CHORD, OPEN, PIE
Constructor Summary
Arc2D.Double()
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).
Arc2D.Double(double x, double y, double w, double h, double start, double extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Double(int type)
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Arc2D.Double(Rectangle2D ellipseBounds, double start, double extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Method Summary
double | getAngleExtent() Returns the angular extent of the arc.
double | getAngleStart() Returns the starting angle of the arc.
double | getHeight() Returns the height of the ellipse of which this arc is a partial section
double | getWidth() Returns the width of the ellipse of which this arc is a partial section
double | getX() Returns the x coordinate of the upper left corner of the arc.
double | getY() Returns the y coordinate of the upper left corner of the arc.
boolean | isEmpty() Determines whether the arc is empty.
protected Rectangle2D | makeBounds(double x, double y, double w, double h) Returns the high-precision bounding box of the arc.
void | setAngleExtent(double angExt) Sets the angular extent of this arc to the specified double value.
void | setAngleStart(double angSt) Sets the starting angle of this arc to the specified double value.
void | setArc(double x, double y, double w, double h, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified double values.
Methods inherited from class java.awt.geom.Arc2D
contains, contains, contains, containsAngle, getArcType, getBounds2D, getEndPoint, getPathIterator, getStartPoint, intersects, setAngles, setAngles, setAngleStart, setArc, setArc, setArc, setArcByCenter, setArcByTangent, setArcType, setFrame
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public double x
The x coordinate of the upper left corner of the arc.

y

public double y
The y coordinate of the upper left corner of the arc.

width

public double width
The overall width of the full ellipse (not considering the angular extents).

height

public double height
The overall height of the full ellipse (not considering the angular extents).

start

public double start
The starting angle of the arc in degrees.

extent

public double extent
The angular extent of the arc in degrees.
Constructor Detail

Arc2D.Double

public Arc2D.Double()
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).

Arc2D.Double

public Arc2D.Double(int type)
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Parameters:
type - The closure type for the arc: OPEN, CHORD, or PIE.

Arc2D.Double

public Arc2D.Double(double x,
                    double y,
                    double w,
                    double h,
                    double start,
                    double extent,
                    int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Parameters:
x, y - The coordinates of the upper left corner of the arc. (Specified in double precision.)
w - The overall width of the full ellipse of which this arc is a partial section. (Specified in double precision.)
h - The overall height of the full ellipse of which this arc is a partial section. (Specified in double precision.)
angSt - The starting angle of the arc in degrees. (Specified in double precision.)
angExt - The angular extent of the arc in degrees. (Specified in double precision.)
closure - The closure type for the arc: OPEN, CHORD, or PIE.

Arc2D.Double

public Arc2D.Double(Rectangle2D ellipseBounds,
                    double start,
                    double extent,
                    int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Parameters:
ellipseBounds - The bounding rectangle that defines the outer boundary of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees. (Specified in double precision.)
angExt - The angular extent of the arc in degrees. (Specified in double precision.)
closure - The closure type for the arc: OPEN, CHORD, or PIE.
Method Detail

getX

public double getX()
Returns the x coordinate of the upper left corner of the arc.
Overrides:
getX in class RectangularShape
Returns:
The x coordinate of arc's upper left coordinate in double precision.

getY

public double getY()
Returns the y coordinate of the upper left corner of the arc.
Overrides:
getY in class RectangularShape
Returns:
The y coordinate of arc's upper left coordinate in double precision.

getWidth

public double getWidth()
Returns the width of the ellipse of which this arc is a partial section
Overrides:
getWidth in class RectangularShape
Returns:
A double value that represents the width of the full ellipse of which this arc is a partial section.

getHeight

public double getHeight()
Returns the height of the ellipse of which this arc is a partial section
Overrides:
getHeight in class RectangularShape
Returns:
A double value that represents the height of the full ellipse of which this arc is a partial section.

getAngleStart

public double getAngleStart()
Returns the starting angle of the arc.
Overrides:
getAngleStart in class Arc2D
Returns:
A double value that represents the starting angle of the arc in degrees.

getAngleExtent

public double getAngleExtent()
Returns the angular extent of the arc.
Overrides:
getAngleExtent in class Arc2D
Returns:
A double value that represents the angular extent of the arc in degrees.

isEmpty

public boolean isEmpty()
Determines whether the arc is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if the arc is empty, false if it not.

setArc

public void setArc(double x,
                   double y,
                   double w,
                   double h,
                   double angSt,
                   double angExt,
                   int closure)
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
Overrides:
setArc in class Arc2D
Parameters:
x, y - The coordinates of the upper left corner of the arc.
w - The overall width of the full ellipse of which this arc is a partial section.
h - The overall height of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees.
angExt - The angular extent of the arc in degrees.
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setAngleStart

public void setAngleStart(double angSt)
Sets the starting angle of this arc to the specified double value.
Overrides:
setAngleStart in class Arc2D
Parameters:
angSt - The starting angle of the arc in degrees.

setAngleExtent

public void setAngleExtent(double angExt)
Sets the angular extent of this arc to the specified double value.
Overrides:
setAngleExtent in class Arc2D
Parameters:
angExt - The angular extent of the arc in degrees.

makeBounds

protected Rectangle2D makeBounds(double x,
                                 double y,
                                 double w,
                                 double h)
Returns the high-precision bounding box of the arc.
Overrides:
makeBounds in class Arc2D
Parameters:
x, y - The coordinates of the upper left corner of the arc.
w - The overall width of the full ellipse of which this arc is a partial section.
h - The overall height of the full ellipse of which this arc is a partial section.
Returns:
The bounding box as a Rectangle2D object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Ellipse2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Ellipse2D

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Ellipse2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
Ellipse2D.Double, Ellipse2D.Float
public abstract class Ellipse2D
extends RectangularShape

The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.

This class is only the abstract superclass for all objects which store a 2D ellipse. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.
Constructor Summary
protected Ellipse2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
boolean | contains(double x, double y) Tests if a specified point is inside the boundary of this Ellipse2D.
boolean | contains(double x, double y, double w, double h) Tests if the interior of this Ellipse2D entirely contains the specified rectangular area.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Ellipse2D.
boolean | intersects(double x, double y, double w, double h) Tests if the interior of this Ellipse2D intersects the interior of a specified rectangular area.
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
getBounds2D

Constructor Detail

Ellipse2D

protected Ellipse2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
Ellipse2D.Float, Ellipse2D.Double
Method Detail

contains

public boolean contains(double x,
                        double y)
Tests if a specified point is inside the boundary of this Ellipse2D.
Parameters:
x, y - the coordinates to test
Returns:
true if the specified point is contained in this ellipse; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of this Ellipse2D intersects the interior of a specified rectangular area.
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangluar area
Returns:
true if this Ellipse2D contains the specified rectangular area; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of this Ellipse2D entirely contains the specified rectangular area.
Parameters:
x, y - the coordinates of the upper left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if this Ellipse2D contains the specified rectangular area; false otherwise.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of this Ellipse2D. The iterator for this class is multi-threaded safe, which means that this Ellipse2D class guarantees that modifications to the geometry of this Ellipse2D object do not affect any iterations of that geometry that are already in process.
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
the PathIterator object that returns the geometry of the outline of this Ellipse2D, one segment at a time.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlatteningPathIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class FlatteningPathIterator

java.lang.Object
  |
  +--java.awt.geom.FlatteningPathIterator
All Implemented Interfaces:
PathIterator
public class FlatteningPathIterator
extends Object
implements PathIterator

The FlatteningPathIterator class returns a flattened view of another PathIterator object. Other Shape classes can use this class to provide flattening behavior for their paths without having to perform the interpolation calculations themselves.

Fields inherited from interface java.awt.geom.PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
Constructor Summary
FlatteningPathIterator(PathIterator src, double flatness)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
FlatteningPathIterator(PathIterator src, double flatness, int limit)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it.
Method Summary
int | currentSegment(double[] coords) Returns the coordinates and type of the current path segment in the iteration.
int | currentSegment(float[] coords) Returns the coordinates and type of the current path segment in the iteration.
double | getFlatness() Returns the flatness of this iterator.
int | getRecursionLimit() Returns the recursion limit of this iterator.
int | getWindingRule() Returns the winding rule for determining the interior of the path.
boolean | isDone() Tests if the iteration is complete.
void | next() Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FlatteningPathIterator

public FlatteningPathIterator(PathIterator src,
                              double flatness)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it. The iterator does not subdivide any curve read from the source iterator to more than 10 levels of subdivision which yields a maximum of 1024 line segments per curve.
Parameters:
src - the original unflattened path being iterated over
flatness - the maximum allowable distance between the control points and the flattened curve

FlatteningPathIterator

public FlatteningPathIterator(PathIterator src,
                              double flatness,
                              int limit)
Constructs a new FlatteningPathIterator object that flattens a path as it iterates over it. The limit parameter allows you to control the maximum number of recursive subdivisions that the iterator can make before it assumes that the curve is flat enough without measuring against the flatness parameter. The flattened iteration therefore never generates more than a maximum of (2^limit) line segments per curve.
Parameters:
src - the original unflattened path being iterated over
flatness - the maximum allowable distance between the control points and the flattened curve
limit - the maximum number of recursive subdivisions allowed for any curved segment
Throws:
IllegalArgumentException - if flatness or limit is less than zero
Method Detail

getFlatness

public double getFlatness()
Returns the flatness of this iterator.
Returns:
the flatness of this FlatteningPathIterator.

getRecursionLimit

public int getRecursionLimit()
Returns the recursion limit of this iterator.
Returns:
the recursion limit of this FlatteningPathIterator.

getWindingRule

public int getWindingRule()
Returns the winding rule for determining the interior of the path.
Specified by:
getWindingRule in interface PathIterator
Returns:
the winding rule of the original unflattened path being iterated over.
See Also:
PathIterator.WIND_EVEN_ODD, PathIterator.WIND_NON_ZERO

isDone

public boolean isDone()
Tests if the iteration is complete.
Specified by:
isDone in interface PathIterator
Returns:
true if all the segments have been read; false otherwise.

next

public void next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
Specified by:
next in interface PathIterator

currentSegment

public int currentSegment(float[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, or SEG_CLOSE. A float array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates. SEG_MOVETO and SEG_LINETO types return one point, and SEG_CLOSE does not return any points.
Specified by:
currentSegment in interface PathIterator
Parameters:
coords - an array that holds the data returned from this method
Returns:
the path segment type of the current path segment.
Throws:
NoSuchElementException - if there are no more elements in the flattening path to be returned.
See Also:
PathIterator.SEG_MOVETO, PathIterator.SEG_LINETO, PathIterator.SEG_CLOSE

currentSegment

public int currentSegment(double[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, or SEG_CLOSE. A double array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of double x,y coordinates. SEG_MOVETO and SEG_LINETO types return one point, and SEG_CLOSE does not return any points.
Specified by:
currentSegment in interface PathIterator
Parameters:
coords - an array that holds the data returned from this method
Returns:
the path segment type of the current path segment.
Throws:
NoSuchElementException - if there are no more elements in the flattening path to be returned.
See Also:
PathIterator.SEG_MOVETO, PathIterator.SEG_LINETO, PathIterator.SEG_CLOSE
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class CubicCurve2D.Float

java.lang.Object
  |
  +--java.awt.geom.CubicCurve2D
        |
        +--java.awt.geom.CubicCurve2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
CubicCurve2D
public static class CubicCurve2D.Float
extends CubicCurve2D

A cubic parametric curve segment specified with float coordinates.

Inner classes inherited from class java.awt.geom.CubicCurve2D
CubicCurve2D.Double, CubicCurve2D.Float
Field Summary
float | ctrlx1 The X coordinate of the first control point of the cubic curve segment.
float | ctrlx2 The X coordinate of the second control point of the cubic curve segment.
float | ctrly1 The Y coordinate of the first control point of the cubic curve segment.
float | ctrly2 The Y coordinate of the second control point of the cubic curve segment.
float | x1 The X coordinate of the start point of the cubic curve segment.
float | x2 The X coordinate of the end point of the cubic curve segment.
float | y1 The Y coordinate of the start point of the cubic curve segment.
float | y2 The Y coordinate of the end point of the cubic curve segment.
Constructor Summary
CubicCurve2D.Float()
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).
CubicCurve2D.Float(float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2, float ctrly2, float x2, float y2)
Constructs and initializes a CubicCurve2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the bounding box of the shape.
Point2D | getCtrlP1() Returns the first control point.
Point2D | getCtrlP2() Returns the second control point.
double | getCtrlX1() Returns the X coordinate of the first control point in double precision.
double | getCtrlX2() Returns the X coordinate of the second control point in double precision.
double | getCtrlY1() Returns the Y coordinate of the first control point in double precision.
double | getCtrlY2() Returns the Y coordinate of the second control point in double precision.
Point2D | getP1() Returns the start point.
Point2D | getP2() Returns the end point.
double | getX1() Returns the X coordinate of the start point in double precision.
double | getX2() Returns the X coordinate of the end point in double precision.
double | getY1() Returns the Y coordinate of the start point in double precision.
double | getY2() Returns the Y coordinate of the end point in double precision.
void | setCurve(double x1, double y1, double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) Sets the location of the endpoints and controlpoints of this CubicCurve2D to the specified double coordinates.
void | setCurve(float x1, float y1, float ctrlx1, float ctrly1, float ctrlx2, float ctrly2, float x2, float y2) Sets the location of the endpoints and controlpoints of this curve to the specified float coordinates.
Methods inherited from class java.awt.geom.CubicCurve2D
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveCubic, solveCubic, subdivide, subdivide, subdivide
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public float x1
The X coordinate of the start point of the cubic curve segment.

y1

public float y1
The Y coordinate of the start point of the cubic curve segment.

ctrlx1

public float ctrlx1
The X coordinate of the first control point of the cubic curve segment.

ctrly1

public float ctrly1
The Y coordinate of the first control point of the cubic curve segment.

ctrlx2

public float ctrlx2
The X coordinate of the second control point of the cubic curve segment.

ctrly2

public float ctrly2
The Y coordinate of the second control point of the cubic curve segment.

x2

public float x2
The X coordinate of the end point of the cubic curve segment.

y2

public float y2
The Y coordinate of the end point of the cubic curve segment.
Constructor Detail

CubicCurve2D.Float

public CubicCurve2D.Float()
Constructs and initializes a CubicCurve with coordinates (0, 0, 0, 0, 0, 0).

CubicCurve2D.Float

public CubicCurve2D.Float(float x1,
                          float y1,
                          float ctrlx1,
                          float ctrly1,
                          float ctrlx2,
                          float ctrly2,
                          float x2,
                          float y2)
Constructs and initializes a CubicCurve2D from the specified coordinates.
Parameters:
x1, y1 - the first specified coordinates for the start point of the resulting CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates for the first control point of the resulting CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates for the second control point of the resulting CubicCurve2D
x2, y2 - the fourth specified coordinates for the end point of the resulting CubicCurve2D
Method Detail

getX1

public double getX1()
Returns the X coordinate of the start point in double precision.
Overrides:
getX1 in class CubicCurve2D
Returns:
the X coordinate of the start point of the CubicCurve2D.

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.
Overrides:
getY1 in class CubicCurve2D
Returns:
the Y coordinate of the start point of the CubicCurve2D.

getP1

public Point2D getP1()
Returns the start point.
Overrides:
getP1 in class CubicCurve2D
Returns:
a Point2D that is the start point of the CubicCurve2D.

getCtrlX1

public double getCtrlX1()
Returns the X coordinate of the first control point in double precision.
Overrides:
getCtrlX1 in class CubicCurve2D
Returns:
the X coordinate of the first control point of the CubicCurve2D.

getCtrlY1

public double getCtrlY1()
Returns the Y coordinate of the first control point in double precision.
Overrides:
getCtrlY1 in class CubicCurve2D
Returns:
the Y coordinate of the first control point of the CubicCurve2D.

getCtrlP1

public Point2D getCtrlP1()
Returns the first control point.
Overrides:
getCtrlP1 in class CubicCurve2D
Returns:
a Point2D that is the first control point of the CubicCurve2D.

getCtrlX2

public double getCtrlX2()
Returns the X coordinate of the second control point in double precision.
Overrides:
getCtrlX2 in class CubicCurve2D
Returns:
the X coordinate of the second control point of the CubicCurve2D.

getCtrlY2

public double getCtrlY2()
Returns the Y coordinate of the second control point in double precision.
Overrides:
getCtrlY2 in class CubicCurve2D
Returns:
the Y coordinate of the second control point of the CubicCurve2D.

getCtrlP2

public Point2D getCtrlP2()
Returns the second control point.
Overrides:
getCtrlP2 in class CubicCurve2D
Returns:
a Point2D that is the second control point of the CubicCurve2D.

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.
Overrides:
getX2 in class CubicCurve2D
Returns:
the X coordinate of the end point of the CubicCurve2D.

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.
Overrides:
getY2 in class CubicCurve2D
Returns:
the Y coordinate of the end point of the CubicCurve2D.

getP2

public Point2D getP2()
Returns the end point.
Overrides:
getP2 in class CubicCurve2D
Returns:
a Point2D that is the end point of the CubicCurve2D.

setCurve

public void setCurve(double x1,
                     double y1,
                     double ctrlx1,
                     double ctrly1,
                     double ctrlx2,
                     double ctrly2,
                     double x2,
                     double y2)
Sets the location of the endpoints and controlpoints of this CubicCurve2D to the specified double coordinates.
Overrides:
setCurve in class CubicCurve2D
Parameters:
x1, y1 - the first specified coordinates used to set the start point of this CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates used to set the first control point of this CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates used to set the second control point of this CubicCurve2D
x2, y2 - the fourth specified coordinates used to set the end point of this CubicCurve2D

setCurve

public void setCurve(float x1,
                     float y1,
                     float ctrlx1,
                     float ctrly1,
                     float ctrlx2,
                     float ctrly2,
                     float x2,
                     float y2)
Sets the location of the endpoints and controlpoints of this curve to the specified float coordinates.
Parameters:
x1, y1 - the first specified coordinates used to set the start point of this CubicCurve2D
ctrlx1, ctrly1 - the second specified coordinates used to set the first control point of this CubicCurve2D
ctrlx2, ctrly2 - the third specified coordinates used to set the second control point of this CubicCurve2D
x2, y2 - the fourth specified coordinates used to set the end point of this CubicCurve2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding box of the shape.
Returns:
a Rectangle2D that is the bounding box of the shape.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class RoundRectangle2D.Float

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.RoundRectangle2D
              |
              +--java.awt.geom.RoundRectangle2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
RoundRectangle2D
public static class RoundRectangle2D.Float
extends RoundRectangle2D

The Float class defines a rectangle with rounded corners all specified in float coordinates.

Inner classes inherited from class java.awt.geom.RoundRectangle2D
RoundRectangle2D.Double, RoundRectangle2D.Float
Field Summary
float | archeight The height of the arc that rounds off the corners.
float | arcwidth The width of the arc that rounds off the corners.
float | height The height of this RoundRectangle2D.
float | width The width of this RoundRectangle2D.
float | x The X coordinate of this RoundRectangle2D.
float | y The Y coordinate of this RoundRectangle2D.
Constructor Summary
RoundRectangle2D.Float()
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.
RoundRectangle2D.Float(float x, float y, float w, float h, float arcw, float arch)
Constructs and initializes a RoundRectangle2D from the specified coordinates.
Method Summary
double | getArcHeight() Returns the height of the arc that rounds off the corners.
double | getArcWidth() Returns the width of the arc that rounds off the corners.
Rectangle2D | getBounds2D() Returns the high precision bounding box of this RoundRectangle2D.
double | getHeight() Returns the height of this RoundRectangle2D in double precision.
double | getWidth() Returns the width of this RoundRectangle2D in double precision.
double | getX() Returns the X coordinate of this RoundRectangle2D in double precision.
double | getY() Returns the Y coordinate of this RoundRectangle2D in double precision.
boolean | isEmpty() Determines whether or not this RoundRectangle2D is empty.
void | setRoundRect(double x, double y, double w, double h, double arcw, double arch) Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
void | setRoundRect(float x, float y, float w, float h, float arcw, float arch) Sets the location, size, and arc radii of this RoundRectangle2D to the specified float values.
void | setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Methods inherited from class java.awt.geom.RoundRectangle2D
contains, contains, getPathIterator, intersects, setFrame
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public float x
The X coordinate of this RoundRectangle2D.

y

public float y
The Y coordinate of this RoundRectangle2D.

width

public float width
The width of this RoundRectangle2D.

height

public float height
The height of this RoundRectangle2D.

arcwidth

public float arcwidth
The width of the arc that rounds off the corners.

archeight

public float archeight
The height of the arc that rounds off the corners.
Constructor Detail

RoundRectangle2D.Float

public RoundRectangle2D.Float()
Constructs a new RoundRectangle2D, initialized to location (0.0, 0), size (0.0, 0.0), and corner arcs of radius 0.0.

RoundRectangle2D.Float

public RoundRectangle2D.Float(float x,
                              float y,
                              float w,
                              float h,
                              float arcw,
                              float arch)
Constructs and initializes a RoundRectangle2D from the specified coordinates.
Parameters:
x,  - the coordinates to which to set the newly constructed RoundRectangle2D
w - the width to which to set the newly constructed RoundRectangle2D
h - the height to which to set the newly constructed RoundRectangle2D
arcw - the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arch - the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D
Method Detail

getX

public double getX()
Returns the X coordinate of this RoundRectangle2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of this RoundRectangle2D.

getY

public double getY()
Returns the Y coordinate of this RoundRectangle2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of this RoundRectangle2D.

getWidth

public double getWidth()
Returns the width of this RoundRectangle2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this RoundRectangle2D.

getHeight

public double getHeight()
Returns the height of this RoundRectangle2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this RoundRectangle2D.

getArcWidth

public double getArcWidth()
Returns the width of the arc that rounds off the corners.
Overrides:
getArcWidth in class RoundRectangle2D
Returns:
the width of the arc that rounds off the corners of this RoundRectangle2D.

getArcHeight

public double getArcHeight()
Returns the height of the arc that rounds off the corners.
Overrides:
getArcHeight in class RoundRectangle2D
Returns:
the height of the arc that rounds off the corners of this RoundRectangle2D.

isEmpty

public boolean isEmpty()
Determines whether or not this RoundRectangle2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if this RoundRectangle2D is empty; false othwerwise.

setRoundRect

public void setRoundRect(float x,
                         float y,
                         float w,
                         float h,
                         float arcw,
                         float arch)
Sets the location, size, and arc radii of this RoundRectangle2D to the specified float values.
Parameters:
x, y - the coordinates to which to set the location of this RoundRectangle2D
w - the width to which to set this RoundRectangle2D
h - the height to which to set this RoundRectangle2D
arcw - the width to which to set the arc of this RoundRectangle2D
arch - the height to which to set the arc of this RoundRectangle2D

setRoundRect

public void setRoundRect(double x,
                         double y,
                         double w,
                         double h,
                         double arcw,
                         double arch)
Sets the location, size, and arc radii of this RoundRectangle2D to the specified double values.
Overrides:
setRoundRect in class RoundRectangle2D
Parameters:
x, y - the coordinates to which to set the location of this RoundRectangle2D
w - the width to which to set this RoundRectangle2D
h - the height to which to set this RoundRectangle2D
arcw - the width to which to set the arc of this RoundRectangle2D
arch - the height to which to set the arc of this RoundRectangle2D

setRoundRect

public void setRoundRect(RoundRectangle2D rr)
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Overrides:
setRoundRect in class RoundRectangle2D
Parameters:
rr - the specified RoundRectangle2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this RoundRectangle2D.
Returns:
a Rectangle2D that is the bounding box of this RoundRectangle2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class QuadCurve2D.Float

java.lang.Object
  |
  +--java.awt.geom.QuadCurve2D
        |
        +--java.awt.geom.QuadCurve2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
QuadCurve2D
public static class QuadCurve2D.Float
extends QuadCurve2D

A quadratic parametric curve segment specified with float coordinates.

Inner classes inherited from class java.awt.geom.QuadCurve2D
QuadCurve2D.Double, QuadCurve2D.Float
Field Summary
float | ctrlx The x coordinate of the control point of the quadratic curve segment.
float | ctrly The y coordinate of the control point of the quadratic curve segment.
float | x1 The x coordinate of the start point of the quadratic curve segment.
float | x2 The x coordinate of the end point of the quadratic curve segment.
float | y1 The y coordinate of the start point of the quadratic curve segment.
float | y2 The y coordinate of the end point of the quadratic curve segment.
Constructor Summary
QuadCurve2D.Float()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
QuadCurve2D.Float(float x1, float y1, float ctrlx, float ctrly, float x2, float y2)
Constructs and initializes a QuadCurve2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the bounding box of this QuadCurve2D.
Point2D | getCtrlPt() Returns the control point.
double | getCtrlX() Returns the x coordinate of the control point in double precision.
double | getCtrlY() Returns the y coordinate of the control point in double precision.
Point2D | getP1() Returns the start point.
Point2D | getP2() Returns the end point.
double | getX1() Returns the x coordinate of the start point in double precision.
double | getX2() Returns the x coordinate of the end point in double precision.
double | getY1() Returns the y coordinate of the start point in double precision.
double | getY2() Returns the y coordinate of the end point in double precision.
void | setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified double coordinates.
void | setCurve(float x1, float y1, float ctrlx, float ctrly, float x2, float y2) Sets the location of the endpoints and controlpoint of this curve to the specified float coordinates.
Methods inherited from class java.awt.geom.QuadCurve2D
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdivide
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public float x1
The x coordinate of the start point of the quadratic curve segment.

y1

public float y1
The y coordinate of the start point of the quadratic curve segment.

ctrlx

public float ctrlx
The x coordinate of the control point of the quadratic curve segment.

ctrly

public float ctrly
The y coordinate of the control point of the quadratic curve segment.

x2

public float x2
The x coordinate of the end point of the quadratic curve segment.

y2

public float y2
The y coordinate of the end point of the quadratic curve segment.
Constructor Detail

QuadCurve2D.Float

public QuadCurve2D.Float()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).

QuadCurve2D.Float

public QuadCurve2D.Float(float x1,
                         float y1,
                         float ctrlx,
                         float ctrly,
                         float x2,
                         float y2)
Constructs and initializes a QuadCurve2D from the specified coordinates.
Parameters:
x1, y1 - the starting point coordinates
ctrlx, ctrly - the coordinates of the control point
x2, y2 - the ending point coordinates
Method Detail

getX1

public double getX1()
Returns the x coordinate of the start point in double precision.
Overrides:
getX1 in class QuadCurve2D
Returns:
the x coordinate of the starting point.

getY1

public double getY1()
Returns the y coordinate of the start point in double precision.
Overrides:
getY1 in class QuadCurve2D
Returns:
the y coordinate of the starting point.

getP1

public Point2D getP1()
Returns the start point.
Overrides:
getP1 in class QuadCurve2D
Returns:
a Point2D object that is the starting point of this QuadCurve2D.

getCtrlX

public double getCtrlX()
Returns the x coordinate of the control point in double precision.
Overrides:
getCtrlX in class QuadCurve2D
Returns:
the x coordinate of the control point.

getCtrlY

public double getCtrlY()
Returns the y coordinate of the control point in double precision.
Overrides:
getCtrlY in class QuadCurve2D
Returns:
the y coordiante of the control point.

getCtrlPt

public Point2D getCtrlPt()
Returns the control point.
Overrides:
getCtrlPt in class QuadCurve2D
Returns:
a Point2D that is the control point of this QuadCurve2D.

getX2

public double getX2()
Returns the x coordinate of the end point in double precision.
Overrides:
getX2 in class QuadCurve2D
Returns:
the x coordinate of the end point.

getY2

public double getY2()
Returns the y coordinate of the end point in double precision.
Overrides:
getY2 in class QuadCurve2D
Returns:
the y coordiante of the end point.

getP2

public Point2D getP2()
Returns the end point.
Overrides:
getP2 in class QuadCurve2D
Returns:
a Point2D that is the end point of this QuadCurve2D.

setCurve

public void setCurve(double x1,
                     double y1,
                     double ctrlx,
                     double ctrly,
                     double x2,
                     double y2)
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified double coordinates.
Overrides:
setCurve in class QuadCurve2D
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2 y2 - the coordinates of the ending point

setCurve

public void setCurve(float x1,
                     float y1,
                     float ctrlx,
                     float ctrly,
                     float x2,
                     float y2)
Sets the location of the endpoints and controlpoint of this curve to the specified float coordinates.
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y2 - the coordinates of the ending point

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding box of this QuadCurve2D.
Returns:
a Rectangle2D that is the bounding box of the shape of this QuadCurve2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Line2D.Float

java.lang.Object
  |
  +--java.awt.geom.Line2D
        |
        +--java.awt.geom.Line2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Line2D
public static class Line2D.Float
extends Line2D

A line segment specified with float coordinates.

Inner classes inherited from class java.awt.geom.Line2D
Line2D.Double, Line2D.Float
Field Summary
float | x1 The X coordinate of the start point of the line segment.
float | x2 The X coordinate of the end point of the line segment.
float | y1 The Y coordinate of the start point of the line segment.
float | y2 The Y coordinate of the end point of the line segment.
Constructor Summary
Line2D.Float()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Float(float X1, float Y1, float X2, float Y2)
Constructs and initializes a Line from the specified coordinates.
Line2D.Float(Point2D p1, Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.
Method Summary
Rectangle2D | getBounds2D() Returns the high-precision bounding box of this Line2D.
Point2D | getP1() Returns the start point.
Point2D | getP2() Returns the end point.
double | getX1() Returns the X coordinate of the start point in double precision.
double | getX2() Returns the X coordinate of the end point in double precision.
double | getY1() Returns the Y coordinate of the start point in double precision.
double | getY2() Returns the Y coordinate of the end point in double precision.
void | setLine(double X1, double Y1, double X2, double Y2) Sets the location of the endpoints of this Line2D to the specified double coordinates.
void | setLine(float X1, float Y1, float X2, float Y2) Sets the location of the endpoints of this Line2D to the specified float coordinates.
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x1

public float x1
The X coordinate of the start point of the line segment.

y1

public float y1
The Y coordinate of the start point of the line segment.

x2

public float x2
The X coordinate of the end point of the line segment.

y2

public float y2
The Y coordinate of the end point of the line segment.
Constructor Detail

Line2D.Float

public Line2D.Float()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).

Line2D.Float

public Line2D.Float(float X1,
                    float Y1,
                    float X2,
                    float Y2)
Constructs and initializes a Line from the specified coordinates.
Parameters:
X1, Y1 - the first specified coordinates
X2, Y2 - the second specified coordinates

Line2D.Float

public Line2D.Float(Point2D p1,
                    Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.
Parameters:
p1 - the first specified Point2D
p2 - the second specified Point2D
Method Detail

getX1

public double getX1()
Returns the X coordinate of the start point in double precision.
Overrides:
getX1 in class Line2D
Returns:
the x coordinate of this Line2D object's starting point in double precision.

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.
Overrides:
getY1 in class Line2D
Returns:
the x coordinate of this Line2D object's starting point in double precision.

getP1

public Point2D getP1()
Returns the start point.
Overrides:
getP1 in class Line2D
Returns:
the starting Point2D object of this Line2D.

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.
Overrides:
getX2 in class Line2D
Returns:
the x coordinate of this Line2D object's ending point in double precision.

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.
Overrides:
getY2 in class Line2D
Returns:
the Y coordinate of this Line2D object's ending point in double precision.

getP2

public Point2D getP2()
Returns the end point.
Overrides:
getP2 in class Line2D
Returns:
the ending Point2D object of this Line2D.

setLine

public void setLine(double X1,
                    double Y1,
                    double X2,
                    double Y2)
Sets the location of the endpoints of this Line2D to the specified double coordinates.
Overrides:
setLine in class Line2D
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

setLine

public void setLine(float X1,
                    float Y1,
                    float X2,
                    float Y2)
Sets the location of the endpoints of this Line2D to the specified float coordinates.
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

getBounds2D

public Rectangle2D getBounds2D()
Returns the high-precision bounding box of this Line2D.
Returns:
a Rectangle2D that is the high-precision bounding box of this Line2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Arc2D.Float

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Arc2D
              |
              +--java.awt.geom.Arc2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Arc2D
public static class Arc2D.Float
extends Arc2D

An arc specified in float precision,

Inner classes inherited from class java.awt.geom.Arc2D
Arc2D.Double, Arc2D.Float
Field Summary
float | extent The angular extent of the arc in degrees.
float | height The overall height of the full ellipse of which this arc is a partial section (not considering the angular extents).
float | start The starting angle of the arc in degrees.
float | width The overall width of the full ellipse of which this arc is a partial section (not considering the angular extents).
float | x The x coordinate of the upper left corner of the arc.
float | y The y coordinate of the upper left corner of the arc.
Fields inherited from class java.awt.geom.Arc2D
CHORD, OPEN, PIE
Constructor Summary
Arc2D.Float()
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).
Arc2D.Float(float x, float y, float w, float h, float start, float extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Arc2D.Float(int type)
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Arc2D.Float(Rectangle2D ellipseBounds, float start, float extent, int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Method Summary
double | getAngleExtent() Returns the angular extent of the arc.
double | getAngleStart() Returns the starting angle of the arc.
double | getHeight() Returns the height of the ellipse of which this arc is a partial section
double | getWidth() Returns the width of the ellipse of which this arc is a partial section
double | getX() Returns the x coordinate of the upper left corner of the arc.
double | getY() Returns the y coordinate of the upper left corner of the arc.
boolean | isEmpty() Determines whether the arc is empty.
protected Rectangle2D | makeBounds(double x, double y, double w, double h) Return the high-precision bounding box of the arc.
void | setAngleExtent(double angExt) Sets the angular extent of this arc to the specified double value.
void | setAngleStart(double angSt) Sets the starting angle of this arc to the specified double value.
void | setArc(double x, double y, double w, double h, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified double values.
Methods inherited from class java.awt.geom.Arc2D
contains, contains, contains, containsAngle, getArcType, getBounds2D, getEndPoint, getPathIterator, getStartPoint, intersects, setAngles, setAngles, setAngleStart, setArc, setArc, setArc, setArcByCenter, setArcByTangent, setArcType, setFrame
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public float x
The x coordinate of the upper left corner of the arc.

y

public float y
The y coordinate of the upper left corner of the arc.

width

public float width
The overall width of the full ellipse of which this arc is a partial section (not considering the angular extents).

height

public float height
The overall height of the full ellipse of which this arc is a partial section (not considering the angular extents).

start

public float start
The starting angle of the arc in degrees.

extent

public float extent
The angular extent of the arc in degrees.
Constructor Detail

Arc2D.Float

public Arc2D.Float()
Constructs a new OPEN arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0).

Arc2D.Float

public Arc2D.Float(int type)
Constructs a new arc, initialized to location (0, 0), size (0, 0), angular extents (start = 0, extent = 0), and the specified closure type.
Parameters:
type - The closure type for the arc: OPEN, CHORD, or PIE.

Arc2D.Float

public Arc2D.Float(float x,
                   float y,
                   float w,
                   float h,
                   float start,
                   float extent,
                   int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Parameters:
x, y - The coordinates of the upper left corner of the arc. (Specified in float precision.)
w - The overall width of the full ellipse of which this arc is a partial section. (Specified in float precision.)
h - The overall height of the full ellipse of which this arc is a partial section. (Specified in float precision.)
start - The starting angle of the arc in degrees. (Specified in float precision.)
extent - The angular extent of the arc in degrees. (Specified in float precision.)
type - The closure type for the arc: OPEN, CHORD, or PIE.

Arc2D.Float

public Arc2D.Float(Rectangle2D ellipseBounds,
                   float start,
                   float extent,
                   int type)
Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.
Parameters:
ellipseBounds - The bounding rectangle that defines the outer boundary of the full ellipse of which this arc is a partial section.
start - The starting angle of the arc in degrees. (Specified in float precision.)
extent - The angular extent of the arc in degrees. (Specified in float precision.)
type - The closure type for the arc: OPEN, CHORD, or PIE.
Method Detail

getX

public double getX()
Returns the x coordinate of the upper left corner of the arc.
Overrides:
getX in class RectangularShape
Returns:
The x coordinate of arc's upper left coordinate in double precision.

getY

public double getY()
Returns the y coordinate of the upper left corner of the arc.
Overrides:
getY in class RectangularShape
Returns:
The y coordinate of arc's upper left coordinate in double precision.

getWidth

public double getWidth()
Returns the width of the ellipse of which this arc is a partial section
Overrides:
getWidth in class RectangularShape
Returns:
A double value that represents the width of the full ellipse of which this arc is a partial section.

getHeight

public double getHeight()
Returns the height of the ellipse of which this arc is a partial section
Overrides:
getHeight in class RectangularShape
Returns:
A double value that represents the height of the full ellipse of which this arc is a partial section.

getAngleStart

public double getAngleStart()
Returns the starting angle of the arc.
Overrides:
getAngleStart in class Arc2D
Returns:
A double value that represents the starting angle of the arc in degrees.

getAngleExtent

public double getAngleExtent()
Returns the angular extent of the arc.
Overrides:
getAngleExtent in class Arc2D
Returns:
A double value that represents the angular extent of the arc in degrees.

isEmpty

public boolean isEmpty()
Determines whether the arc is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if the arc is empty, false if it is not.

setArc

public void setArc(double x,
                   double y,
                   double w,
                   double h,
                   double angSt,
                   double angExt,
                   int closure)
Sets the location, size, angular extents, and closure type of this arc to the specified double values.
Overrides:
setArc in class Arc2D
Parameters:
x, y - The coordinates of the upper left corner of the arc.
w - The overall width of the full ellipse of which this arc is a partial section.
h - The overall height of the full ellipse of which this arc is a partial section.
angSt - The starting angle of the arc in degrees.
angExt - The angular extent of the arc in degrees.
closure - The closure type for the arc: OPEN, CHORD, or PIE.

setAngleStart

public void setAngleStart(double angSt)
Sets the starting angle of this arc to the specified double value.
Overrides:
setAngleStart in class Arc2D
Parameters:
angSt - The starting angle of the arc in degrees.

setAngleExtent

public void setAngleExtent(double angExt)
Sets the angular extent of this arc to the specified double value.
Overrides:
setAngleExtent in class Arc2D
Parameters:
angExt - The angular extent of the arc in degrees.

makeBounds

protected Rectangle2D makeBounds(double x,
                                 double y,
                                 double w,
                                 double h)
Return the high-precision bounding box of the arc.
Overrides:
makeBounds in class Arc2D
Parameters:
x, y - The coordinates of the upper left corner of the arc.
w - The overall width of the full ellipse of which this arc is a partial section.
h - The overall height of the full ellipse of which this arc is a partial section.
Returns:
The bounding box as a Rectangle2D object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Ellipse2D.Float

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Ellipse2D
              |
              +--java.awt.geom.Ellipse2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Ellipse2D
public static class Ellipse2D.Float
extends Ellipse2D

The Float class defines an ellipse specified in float precision.

Inner classes inherited from class java.awt.geom.Ellipse2D
Ellipse2D.Double, Ellipse2D.Float
Field Summary
float | height The overall height of this Ellipse2D.
float | width The overall width of this Ellipse2D.
float | x The x coordinate of the upper left corner of this Ellipse2D.
float | y The y coordinate of the upper left corner of this Ellipse2D.
Constructor Summary
Ellipse2D.Float()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Ellipse2D.Float(float x, float y, float w, float h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Method Summary
Rectangle2D | getBounds2D() Returns the high precision bounding box of this Ellipse2D.
double | getHeight() Returns the overall height of this Ellipse2D in double precision.
double | getWidth() Returns the overall width of this Ellipse2D in double precision.
double | getX() Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
double | getY() Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
boolean | isEmpty() Determines whether or not the bounding box of this Ellipse2D is empty.
void | setFrame(double x, double y, double w, double h) Sets the location and size of this Ellipse2D to the specified double values.
void | setFrame(float x, float y, float w, float h) Sets the location and size of this Ellipse2D to the specified float values.
Methods inherited from class java.awt.geom.Ellipse2D
contains, contains, getPathIterator, intersects
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

x

public float x
The x coordinate of the upper left corner of this Ellipse2D.

y

public float y
The y coordinate of the upper left corner of this Ellipse2D.

width

public float width
The overall width of this Ellipse2D.

height

public float height
The overall height of this Ellipse2D.
Constructor Detail

Ellipse2D.Float

public Ellipse2D.Float()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).

Ellipse2D.Float

public Ellipse2D.Float(float x,
                       float y,
                       float w,
                       float h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Parameters:
x, y - the coordinates of the bounding rectangle
w - the width of the bounding rectangle
h - the height of the bounding rectangle
Method Detail

getX

public double getX()
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of the upper left corner of the bounding rectangle of this Ellipse2D.

getY

public double getY()
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of the upper left corner of the bounding rectangle of this Ellipse2D.

getWidth

public double getWidth()
Returns the overall width of this Ellipse2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this Ellipse2D.

getHeight

public double getHeight()
Returns the overall height of this Ellipse2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this Ellipse2D.

isEmpty

public boolean isEmpty()
Determines whether or not the bounding box of this Ellipse2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if the bounding rectangle of this Ellipse2D is empty; false otherwise.

setFrame

public void setFrame(float x,
                     float y,
                     float w,
                     float h)
Sets the location and size of this Ellipse2D to the specified float values.
Parameters:
x, y - the specified coordinates to which to set the location of the bounding box of this Ellipse2D
w - the specified width to which to set the width of this Ellipse2D
h - the specified height to which to set the height of the Ellipse2D

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of this Ellipse2D to the specified double values.
Overrides:
setFrame in class RectangularShape
Parameters:
x, y - the specified coordinates to which to set the location of the bounding box of this Ellipse2D
w - the specified width to which to set the width of this Ellipse2D
h - the specified height to which to set the height of this Ellipse2D

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Ellipse2D.
Returns:
a Rectangle2D that is the bounding box of this Ellipse2D.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Rectangle2D.Float

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.geom.Rectangle2D.Float
All Implemented Interfaces:
Cloneable, Shape
Enclosing class:
Rectangle2D
public static class Rectangle2D.Float
extends Rectangle2D

The Float class defines a rectangle specified in float coordinates.

Since:
1.2

Inner classes inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
Field Summary
float | height The height of this Rectangle2D.
float | width The width of this Rectangle2D.
float | x The x coordinate of this Rectangle2D.
float | y The y coordinate of this Rectangle2D.
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor Summary
Rectangle2D.Float()
Constructs a new Rectangle2D, initialized to location (0.0, 0.0) and size (0.0, 0.0).
Rectangle2D.Float(float x, float y, float w, float h)
Constructs and initializes a Rectangle2D from the specified float coordinates.
Method Summary
Rectangle2D | createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Rectangle2D | getBounds2D() Returns the high precision bounding box of this Rectangle2D.
double | getHeight() Returns the height of this Rectangle2D in double precision.
double | getWidth() Returns the width of this Rectangle2D in double precision.
double | getX() Returns the X coordinate of this Rectangle2D in double precision.
double | getY() Returns the Y coordinate of this Rectangle2D in double precision.
boolean | isEmpty() Determines whether or not this Rectangle2D is empty.
int | outcode(double x, double y) Determines where the specified float coordinates lie with respect to this Rectangle2D.
void | setRect(double x, double y, double w, double h) Sets the location and size of this Rectangle2D to the specified double values.
void | setRect(float x, float y, float w, float h) Sets the location and size of this Rectangle2D to the specified float values.
void | setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
String | toString() Returns the String representation of this Rectangle2D.
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

x

public float x
The x coordinate of this Rectangle2D.
Since:
1.2

y

public float y
The y coordinate of this Rectangle2D.
Since:
1.2

width

public float width
The width of this Rectangle2D.
Since:
1.2

height

public float height
The height of this Rectangle2D.
Since:
1.2
Constructor Detail

Rectangle2D.Float

public Rectangle2D.Float()
Constructs a new Rectangle2D, initialized to location (0.0, 0.0) and size (0.0, 0.0).
Since:
1.2

Rectangle2D.Float

public Rectangle2D.Float(float x,
                         float y,
                         float w,
                         float h)
Constructs and initializes a Rectangle2D from the specified float coordinates.
Parameters:
x, y - the coordinates of the upper left corner of the newly constructed Rectangle2D
w - the width of the newly constructed Rectangle2D
h - the height of the newly constructed Rectangle2D
Since:
1.2
Method Detail

getX

public double getX()
Returns the X coordinate of this Rectangle2D in double precision.
Overrides:
getX in class RectangularShape
Returns:
the X coordinate of this Rectangle2D.
Since:
1.2

getY

public double getY()
Returns the Y coordinate of this Rectangle2D in double precision.
Overrides:
getY in class RectangularShape
Returns:
the Y coordinate of this Rectangle2D.
Since:
1.2

getWidth

public double getWidth()
Returns the width of this Rectangle2D in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of this Rectangle2D.
Since:
1.2

getHeight

public double getHeight()
Returns the height of this Rectangle2D in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of this Rectangle2D.
Since:
1.2

isEmpty

public boolean isEmpty()
Determines whether or not this Rectangle2D is empty.
Overrides:
isEmpty in class RectangularShape
Returns:
true if this Rectangle2D is empty; false otherwise.
Since:
1.2

setRect

public void setRect(float x,
                    float y,
                    float w,
                    float h)
Sets the location and size of this Rectangle2D to the specified float values.
Parameters:
x, y - the coordinates to which to set the location of the upper left corner of this Rectangle2D
w - the value to use to set the width of this Rectangle2D
h - the value to use to set the height of this Rectangle2D
Since:
1.2

setRect

public void setRect(double x,
                    double y,
                    double w,
                    double h)
Sets the location and size of this Rectangle2D to the specified double values.
Overrides:
setRect in class Rectangle2D
Parameters:
x, y - the coordinates to which to set the location of the upper left corner of this Rectangle2D
w - the value to use to set the width of this Rectangle2D
h - the value to use to set the height of this Rectangle2D
Since:
1.2

setRect

public void setRect(Rectangle2D r)
Sets this Rectangle2D to be the same as the specified Rectangle2D.
Overrides:
setRect in class Rectangle2D
Parameters:
r - the specified Rectangle2D
Since:
1.2

outcode

public int outcode(double x,
                   double y)
Determines where the specified float coordinates lie with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle2D.
Overrides:
outcode in class Rectangle2D
Parameters:
x, y - the specified coordinates
Returns:
the logical OR of all appropriate out codes.
Since:
1.2
See Also:
Rectangle2D.OUT_LEFT, Rectangle2D.OUT_TOP, Rectangle2D.OUT_RIGHT, Rectangle2D.OUT_BOTTOM

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Rectangle2D.
Overrides:
getBounds2D in class Rectangle2D
Returns:
the bounding box of this Rectangle2D.
Since:
1.2

createIntersection

public Rectangle2D createIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Overrides:
createIntersection in class Rectangle2D
Parameters:
r - the Rectangle2D that is intersected with this Rectangle2D
Returns:
the largest Rectangle2D contained in both the specified Rectangle2D and in this Rectangle2D.
Since:
1.2

createUnion

public Rectangle2D createUnion(Rectangle2D r)
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Overrides:
createUnion in class Rectangle2D
Parameters:
r - the Rectangle2D to be combined with this Rectangle2D
Returns:
the smallest Rectangle2D containing both the specified Rectangle2D and this Rectangle2D.
Since:
1.2

toString

public String toString()
Returns the String representation of this Rectangle2D.
Overrides:
toString in class Object
Returns:
a String representing this Rectangle2D.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Point2D.Float

java.lang.Object
  |
  +--java.awt.geom.Point2D
        |
        +--java.awt.geom.Point2D.Float
All Implemented Interfaces:
Cloneable
Enclosing class:
Point2D
public static class Point2D.Float
extends Point2D

The Float class defines a point specified in float precision.

Inner classes inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
Field Summary
float | x The X coordinate of this Point2D.
float | y The Y coordinate of this Point2D.
Constructor Summary
Point2D.Float()
Constructs and initializes a Point2D with coordinates (0, 0).
Point2D.Float(float x, float y)
Constructs and initializes a Point2D with the specified coordinates.
Method Summary
double | getX() Returns the X coordinate of this Point2D in double precision.
double | getY() Returns the Y coordinate of this Point2D in double precision.
void | setLocation(double x, double y) Sets the location of this Point2D to the specified double coordinates.
void | setLocation(float x, float y) Sets the location of this Point2D to the specified float coordinates.
String | toString() Returns a String that represents the value of this Point2D.
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

x

public float x
The X coordinate of this Point2D.
Since:
1.2

y

public float y
The Y coordinate of this Point2D.
Since:
1.2
Constructor Detail

Point2D.Float

public Point2D.Float()
Constructs and initializes a Point2D with coordinates (0, 0).
Since:
1.2

Point2D.Float

public Point2D.Float(float x,
                     float y)
Constructs and initializes a Point2D with the specified coordinates.
Parameters:
x, y - the coordinates to which to set the newly constructed Point2D
Since:
1.2
Method Detail

getX

public double getX()
Returns the X coordinate of this Point2D in double precision.
Overrides:
getX in class Point2D
Returns:
the X coordinate of this Point2D.
Since:
1.2

getY

public double getY()
Returns the Y coordinate of this Point2D in double precision.
Overrides:
getY in class Point2D
Returns:
the Y coordinate of this Point2D.
Since:
1.2

setLocation

public void setLocation(double x,
                        double y)
Sets the location of this Point2D to the specified double coordinates.
Overrides:
setLocation in class Point2D
Parameters:
x, y - the coordinates to which to set this Point2D
Since:
1.2

setLocation

public void setLocation(float x,
                        float y)
Sets the location of this Point2D to the specified float coordinates.
Parameters:
x, y - the coordinates to which to set this Point2D
Since:
1.2

toString

public String toString()
Returns a String that represents the value of this Point2D.
Overrides:
toString in class Object
Returns:
a string representation of this Point2D.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GeneralPath

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class GeneralPath

java.lang.Object
  |
  +--java.awt.geom.GeneralPath
All Implemented Interfaces:
Cloneable, Shape
public final class GeneralPath
extends Object
implements Shape, Cloneable

The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves. It can contain multiple subpaths.

The winding rule specifies how the interior of a path is determined. There are two types of winding rules: EVEN_ODD and NON_ZERO.

An EVEN_ODD winding rule means that enclosed regions of the path alternate between interior and exterior areas as traversed from the outside of the path towards a point inside the region.

A NON_ZERO winding rule means that if a ray is drawn in any direction from a given point to infinity and the places where the path intersects the ray are examined, the point is inside of the path if and only if the number of times that the path crosses the ray from left to right does not equal the number of times that the path crosses the ray from right to left.

Field Summary
static int | WIND_EVEN_ODD An even-odd winding rule for determining the interior of a path.
static int | WIND_NON_ZERO A non-zero winding rule for determining the interior of a path.
Constructor Summary
GeneralPath()
Constructs a new GeneralPath object.
GeneralPath(int rule)
Constructs a new GeneralPath object with the specified winding rule to control operations that require the interior of the path to be defined.
GeneralPath(int rule, int initialCapacity)
Constructs a new GeneralPath object with the specified winding rule and the specified initial capacity to store path coordinates.
GeneralPath(Shape s)
Constructs a new GeneralPath object from an arbitrary Shape object.
Method Summary
void | append(PathIterator pi, boolean connect) Appends the geometry of the specified PathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
void | append(Shape s, boolean connect) Appends the geometry of the specified Shape object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
Object | clone() Creates a new object of the same class as this object.
void | closePath() Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo.
boolean | contains(double x, double y) Tests if the specified coordinates are inside the boundary of this Shape.
boolean | contains(double x, double y, double w, double h) Tests if the specified rectangular area is inside the boundary of this Shape.
boolean | contains(Point2D p) Tests if the specified Point2D is inside the boundary of this Shape.
boolean | contains(Rectangle2D r) Tests if the specified Rectangle2D is inside the boundary of this Shape.
Shape | createTransformedShape(AffineTransform at) Returns a new transformed Shape.
void | curveTo(float x1, float y1, float x2, float y2, float x3, float y3) Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the coordinates (x3, y3), using the specified points (x1, y1) and (x2, y2) as Bézier control points.
Rectangle | getBounds() Return the bounding box of the path.
Rectangle2D | getBounds2D() Returns the bounding box of the path.
Point2D | getCurrentPoint() Returns the coordinates most recently added to the end of the path as a Point2D object.
PathIterator | getPathIterator(AffineTransform at) Returns a PathIterator object that iterates along the boundary of this Shape and provides access to the geometry of the outline of this Shape.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns a PathIterator object that iterates along the boundary of the flattened Shape and provides access to the geometry of the outline of the Shape.
int | getWindingRule() Returns the fill style winding rule.
boolean | intersects(double x, double y, double w, double h) Tests if the interior of this Shape intersects the interior of a specified set of rectangular coordinates.
boolean | intersects(Rectangle2D r) Tests if the interior of this Shape intersects the interior of a specified Rectangle2D.
void | lineTo(float x, float y) Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates.
void | moveTo(float x, float y) Adds a point to the path by moving to the specified coordinates.
void | quadTo(float x1, float y1, float x2, float y2) Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the coordinates (x2, y2), using the specified point (x1, y1) as a quadratic parametric control point.
void | reset() Resets the path to empty.
void | setWindingRule(int rule) Sets the winding rule for this path to the specified value.
void | transform(AffineTransform at) Transforms the geometry of this path using the specified AffineTransform.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WIND_EVEN_ODD

public static final int WIND_EVEN_ODD
An even-odd winding rule for determining the interior of a path.

WIND_NON_ZERO

public static final int WIND_NON_ZERO
A non-zero winding rule for determining the interior of a path.
Constructor Detail

GeneralPath

public GeneralPath()
Constructs a new GeneralPath object. If an operation performed on this path requires the interior of the path to be defined then the default NON_ZERO winding rule is used.
See Also:
WIND_NON_ZERO

GeneralPath

public GeneralPath(int rule)
Constructs a new GeneralPath object with the specified winding rule to control operations that require the interior of the path to be defined.
Parameters:
rule - the winding rule
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

GeneralPath

public GeneralPath(int rule,
                   int initialCapacity)
Constructs a new GeneralPath object with the specified winding rule and the specified initial capacity to store path coordinates. This number is an initial guess as to how many path segments are in the path, but the storage is expanded as needed to store whatever path segments are added to this path.
Parameters:
rule - the winding rule
initialCapacity - the estimate for the number of path segments in the path
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

GeneralPath

public GeneralPath(Shape s)
Constructs a new GeneralPath object from an arbitrary Shape object. All of the initial geometry and the winding rule for this path are taken from the specified Shape object.
Parameters:
s - the specified Shape object
Method Detail

moveTo

public void moveTo(float x,
                   float y)
Adds a point to the path by moving to the specified coordinates.
Parameters:
x, y - the specified coordinates

lineTo

public void lineTo(float x,
                   float y)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates.
Parameters:
x, y - the specified coordinates

quadTo

public void quadTo(float x1,
                   float y1,
                   float x2,
                   float y2)
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the coordinates (x2, y2), using the specified point (x1, y1) as a quadratic parametric control point.
Parameters:
x1, y1 - the coordinates of the first quadratic control point
x2, y2 - the coordinates of the final endpoint

curveTo

public void curveTo(float x1,
                    float y1,
                    float x2,
                    float y2,
                    float x3,
                    float y3)
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the coordinates (x3, y3), using the specified points (x1, y1) and (x2, y2) as Bézier control points.
Parameters:
x1, y1 - the coordinates of the first Béezier control point
x2, y2 - the coordinates of the second Bézier control point
x3, y3 - the coordinates of the final endpoint

closePath

public void closePath()
Closes the current subpath by drawing a straight line back to the coordinates of the last moveTo. If the path is already closed then this method has no effect.

append

public void append(Shape s,
                   boolean connect)
Appends the geometry of the specified Shape object to the path, possibly connecting the new geometry to the existing path segments with a line segment. If the connect parameter is true and the path is not empty then any initial moveTo in the geometry of the appended Shape is turned into a lineTo segment. If the destination coordinates of such a connecting lineTo segment match the ending coordinates of a currently open subpath then the segment is omitted as superfluous. The winding rule of the specified Shape is ignored and the appended geometry is governed by the winding rule specified for this path.
Parameters:
s - the Shape whose geometry is appended to this path
connect - a boolean to control whether or not to turn an initial moveTo segment into a lineTo segment to connect the new geometry to the existing path

append

public void append(PathIterator pi,
                   boolean connect)
Appends the geometry of the specified PathIterator object to the path, possibly connecting the new geometry to the existing path segments with a line segment. If the connect parameter is true and the path is not empty then any initial moveTo in the geometry of the appended Shape is turned into a lineTo segment. If the destination coordinates of such a connecting lineTo segment match the ending coordinates of a currently open subpath then the segment is omitted as superfluous. The winding rule of the specified Shape is ignored and the appended geometry is governed by the winding rule specified for this path.
Parameters:
pi - the PathIterator whose geometry is appended to this path
connect - a boolean to control whether or not to turn an initial moveTo segment into a lineTo segment to connect the new geometry to the existing path

getWindingRule

public int getWindingRule()
Returns the fill style winding rule.
Returns:
an integer representing the current winding rule.
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

setWindingRule

public void setWindingRule(int rule)
Sets the winding rule for this path to the specified value.
Parameters:
rule - an integer representing the specified winding rule
Throws:
IllegalArgumentException - if rule is not either WIND_EVEN_ODD or WIND_NON_ZERO
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

getCurrentPoint

public Point2D getCurrentPoint()
Returns the coordinates most recently added to the end of the path as a Point2D object.
Returns:
a Point2D object containing the ending coordinates of the path or null if there are no points in the path.

reset

public void reset()
Resets the path to empty. The append position is set back to the beginning of the path and all coordinates and point types are forgotten.

transform

public void transform(AffineTransform at)
Transforms the geometry of this path using the specified AffineTransform. The geometry is transformed in place, which permanently changes the boundary defined by this object.
Parameters:
at - the AffineTransform used to transform the area

createTransformedShape

public Shape createTransformedShape(AffineTransform at)
Returns a new transformed Shape.
Parameters:
at - the AffineTransform used to transform a new Shape.
Returns:
a new Shape, transformed with the specified AffineTransform.

getBounds

public Rectangle getBounds()
Return the bounding box of the path.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle object that bounds the current path.

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding box of the path.
Specified by:
getBounds2D in interface Shape
Returns:
a Rectangle2D object that bounds the current path.

contains

public boolean contains(double x,
                        double y)
Tests if the specified coordinates are inside the boundary of this Shape.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified coordinates
Returns:
true if the specified coordinates are inside this Shape; false otherwise

contains

public boolean contains(Point2D p)
Tests if the specified Point2D is inside the boundary of this Shape.
Specified by:
contains in interface Shape
Parameters:
p - the specified Point2D
Returns:
true if this Shape contains the specified Point2D, false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the specified rectangular area is inside the boundary of this Shape.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified coordinates
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if this Shape contains the specified rectangluar area; false otherwise.

contains

public boolean contains(Rectangle2D r)
Tests if the specified Rectangle2D is inside the boundary of this Shape.
Specified by:
contains in interface Shape
Parameters:
r - a specified Rectangle2D
Returns:
true if this Shape bounds the specified Rectangle2D; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of this Shape intersects the interior of a specified set of rectangular coordinates.
Specified by:
intersects in interface Shape
Parameters:
x, y - the specified coordinates
w - the width of the specified rectangular coordinates
h - the height of the specified rectangular coordinates
Returns:
true if this Shape and the interior of the specified set of rectangular coordinates intersect each other; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if the interior of this Shape intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if this Shape and the interior of the specified Rectangle2D intersect each other; false otherwise.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns a PathIterator object that iterates along the boundary of this Shape and provides access to the geometry of the outline of this Shape. The iterator for this class is not multi-threaded safe, which means that this GeneralPath class does not guarantee that modifications to the geometry of this GeneralPath object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an AffineTransform
Returns:
a new PathIterator that iterates along the boundary of this Shape and provides access to the geometry of this Shape's outline

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns a PathIterator object that iterates along the boundary of the flattened Shape and provides access to the geometry of the outline of the Shape. The iterator for this class is not multi-threaded safe, which means that this GeneralPath class does not guarantee that modifications to the geometry of this GeneralPath object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an AffineTransform
flatness - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve
Returns:
a new PathIterator that iterates along the flattened Shape boundary.

clone

public Object clone()
Creates a new object of the same class as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalPathStateException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class IllegalPathStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.awt.geom.IllegalPathStateException
All Implemented Interfaces:
Serializable
public class IllegalPathStateException
extends RuntimeException

The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.

See Also:
Serialized Form

Constructor Summary
IllegalPathStateException()
Constructs an IllegalPathStateException with no detail message.
IllegalPathStateException(String s)
Constructs an IllegalPathStateException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalPathStateException

public IllegalPathStateException()
Constructs an IllegalPathStateException with no detail message.
Since:
1.2

IllegalPathStateException

public IllegalPathStateException(String s)
Constructs an IllegalPathStateException with the specified detail message.
Parameters:
s - the detail message
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Line2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Line2D

java.lang.Object
  |
  +--java.awt.geom.Line2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
Line2D.Double, Line2D.Float
public abstract class Line2D
extends Object
implements Shape, Cloneable

This Line2D class represents a line segment in (x, y) coordinate space. This class, like all of the Java 2D API, uses a default coordinate system called user space in which the y-axis values increase downward and x-axis values increase to the right. For more information on the user space coordinate system, see the Coordinate Systems section of the Java 2D Programmer's Guide.

This class is only the abstract superclass for all objects that store a 2D line segment. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | Line2D.Double A line segment specified with double coordinates.
static class | Line2D.Float A line segment specified with float coordinates.
Constructor Summary
protected Line2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class as this object.
boolean | contains(double x, double y) Tests if a specified coordinate is inside the boundary of this Line2D.
boolean | contains(double x, double y, double w, double h) Tests if the interior of this Line2D entirely contains the specified set of rectangular coordinates.
boolean | contains(Point2D p) Tests if a given Point2D is inside the boundary of this Line2D.
boolean | contains(Rectangle2D r) Tests if the interior of this Line2D entirely contains the specified Rectangle2D.
Rectangle | getBounds() Returns the bounding box of this Line2D.
abstract Point2D | getP1() Returns the starting Point2D of this Line2D.
abstract Point2D | getP2() Returns the end Point2D of this Line2D.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Line2D.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of this flattened Line2D.
abstract double | getX1() Returns the X coordinate of the start point in double precision.
abstract double | getX2() Returns the X coordinate of the end point in double precision.
abstract double | getY1() Returns the Y coordinate of the start point in double precision.
abstract double | getY2() Returns the Y coordinate of the end point in double precision.
boolean | intersects(double x, double y, double w, double h) Tests if this Line2D intersects the interior of a specified set of rectangular coordinates.
boolean | intersects(Rectangle2D r) Tests if this Line2D intersects the interior of a specified Rectangle2D.
boolean | intersectsLine(double X1, double Y1, double X2, double Y2) Tests if the line segment from (X1, Y1) to (X2, Y2) intersects this line segment.
boolean | intersectsLine(Line2D l) Tests if the specified line segment intersects this line segment.
static boolean | linesIntersect(double X1, double Y1, double X2, double Y2, double X3, double Y3, double X4, double Y4) Tests if the line segment from (X1, Y1) to (X2, Y2) intersects the line segment from (X3, Y3) to (X4, Y4).
double | ptLineDist(double PX, double PY) Returns the distance from a point to this line.
static double | ptLineDist(double X1, double Y1, double X2, double Y2, double PX, double PY) Returns the distance from a point to a line.
double | ptLineDist(Point2D pt) Returns the distance from a Point2D to this line.
double | ptLineDistSq(double PX, double PY) Returns the square of the distance from a point to this line.
static double | ptLineDistSq(double X1, double Y1, double X2, double Y2, double PX, double PY) Returns the square of the distance from a point to a line.
double | ptLineDistSq(Point2D pt) Returns the square of the distance from a specified Point2D to this line.
double | ptSegDist(double PX, double PY) Returns the distance from a point to this line segment.
static double | ptSegDist(double X1, double Y1, double X2, double Y2, double PX, double PY) Returns the distance from a point to a line segment.
double | ptSegDist(Point2D pt) Returns the distance from a Point2D to this line segment.
double | ptSegDistSq(double PX, double PY) Returns the square of the distance from a point to this line segment.
static double | ptSegDistSq(double X1, double Y1, double X2, double Y2, double PX, double PY) Returns the square of the distance from a point to a line segment.
double | ptSegDistSq(Point2D pt) Returns the square of the distance from a Point2D to this line segment.
int | relativeCCW(double PX, double PY) Returns an indicator of where the specified point (PX, PY) lies with respect to this line segment.
static int | relativeCCW(double X1, double Y1, double X2, double Y2, double PX, double PY) Returns an indicator of where the specified point (PX, PY) lies with respect to the line segment from (X1, Y1) to (X2, Y2).
int | relativeCCW(Point2D p) Returns an indicator of where the specified Point2D lies with respect to this line segment.
abstract void | setLine(double X1, double Y1, double X2, double Y2) Sets the location of the endpoints of this Line2D to the specified double coordinates.
void | setLine(Line2D l) Sets the location of the endpoints of this Line2D to the same as those endpoints of the specified Line2D.
void | setLine(Point2D p1, Point2D p2) Sets the location of the endpoints of this Line2D to the specified Point2D coordinates.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
getBounds2D

Constructor Detail

Line2D

protected Line2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessory methods below.
See Also:
Line2D.Float, Line2D.Double
Method Detail

getX1

public abstract double getX1()
Returns the X coordinate of the start point in double precision.
Returns:
the X coordinate of this Line2D object's starting point.

getY1

public abstract double getY1()
Returns the Y coordinate of the start point in double precision.
Returns:
the Y coordinate of this Line2D object's starting point.

getP1

public abstract Point2D getP1()
Returns the starting Point2D of this Line2D.
Returns:
the starting Point2D of this Line2D.

getX2

public abstract double getX2()
Returns the X coordinate of the end point in double precision.
Returns:
the X coordinate of this Line2D object's starting point.

getY2

public abstract double getY2()
Returns the Y coordinate of the end point in double precision.
Returns:
the Y coordinate of this Line2D object's starting point.

getP2

public abstract Point2D getP2()
Returns the end Point2D of this Line2D.
Returns:
a Point2D that is the endpoint of this Line2D.

setLine

public abstract void setLine(double X1,
                             double Y1,
                             double X2,
                             double Y2)
Sets the location of the endpoints of this Line2D to the specified double coordinates.
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

setLine

public void setLine(Point2D p1,
                    Point2D p2)
Sets the location of the endpoints of this Line2D to the specified Point2D coordinates.
Parameters:
p1, p2 - the specified Point2D objects

setLine

public void setLine(Line2D l)
Sets the location of the endpoints of this Line2D to the same as those endpoints of the specified Line2D.
Parameters:
l - the specified Line2D

relativeCCW

public static int relativeCCW(double X1,
                              double Y1,
                              double X2,
                              double Y2,
                              double PX,
                              double PY)
Returns an indicator of where the specified point (PX, PY) lies with respect to the line segment from (X1, Y1) to (X2, Y2). The return value can be either 1, -1, or 0 and indicates in which direction the specified line must pivot around its first endpoint, (X1, Y1), in order to point at the specified point (PX, PY).

A return value of 1 indicates that the line segment must turn in the direction that takes the positive X axis towards the negative Y axis. In the default coordinate system used by Java 2D, this direction is counterclockwise.

A return value of -1 indicates that the line segment must turn in the direction that takes the positive X axis towards the positive Y axis. In the default coordinate system, this direction is clockwise.

A return value of 0 indicates that the point lies exactly on the line segment. Note that an indicator value of 0 is rare and not useful for determining colinearity because of floating point rounding issues.

If the point is colinear with the line segment, but not between the endpoints, then the value will be -1 if the point lies "beyond (X1, Y1)" or 1 if the point lies "beyond (X2, Y2)".

Parameters:
X1, Y1 - the coordinates of the beginning of the specified line segment
X2, Y2 - the coordinates of the end of the specified line segment
PX, PY - the coordinates of the specified point to be compared with the specified line segment
Returns:
an integer that indicates the position of the third specified coordinates with respect to the line segment formed by the first two specified coordinates.

relativeCCW

public int relativeCCW(double PX,
                       double PY)
Returns an indicator of where the specified point (PX, PY) lies with respect to this line segment. See the method comments of relativeCCW(double, double, double, double, double, double) to interpret the return value.
Parameters:
PX, PY - the coordinates of the specified point to be compared with the current line segment
Returns:
an integer that indicates the position of the specified coordinates with respect to the current line segment.
See Also:
relativeCCW(double, double, double, double, double, double)

relativeCCW

public int relativeCCW(Point2D p)
Returns an indicator of where the specified Point2D lies with respect to this line segment. See the method comments of relativeCCW(double, double, double, double, double, double) to interpret the return value.
Parameters:
p - the specified Point2D to be compared with the current line segment
Returns:
an integer that indicates the position of the Point2D with respect to the current line segment.
See Also:
relativeCCW(double, double, double, double, double, double)

linesIntersect

public static boolean linesIntersect(double X1,
                                     double Y1,
                                     double X2,
                                     double Y2,
                                     double X3,
                                     double Y3,
                                     double X4,
                                     double Y4)
Tests if the line segment from (X1, Y1) to (X2, Y2) intersects the line segment from (X3, Y3) to (X4, Y4).
Parameters:
X1, Y1 - the coordinates of the beginning of the first specified line segment
X2, Y2 - the coordinates of the end of the first specified line segment
X3, Y3 - the coordinates of the beginning of the second specified line segment
X4, Y4 - the coordinates of the end of the second specified line segment
Returns:
true if the first specified line segment and the second specified line segment intersect each other; false otherwise.

intersectsLine

public boolean intersectsLine(double X1,
                              double Y1,
                              double X2,
                              double Y2)
Tests if the line segment from (X1, Y1) to (X2, Y2) intersects this line segment.
Parameters:
X1, Y1 - the coordinates of the beginning of the specified line segment
X2, Y2 - the coordinates of the end of the specified line segment
Returns:
if this line segment and the specified line segment intersect each other; false otherwise.

intersectsLine

public boolean intersectsLine(Line2D l)
Tests if the specified line segment intersects this line segment.
Parameters:
l - the specified Line2D
Returns:
true if this line segment and the specified line segment intersect each other; false otherwise.

ptSegDistSq

public static double ptSegDistSq(double X1,
                                 double Y1,
                                 double X2,
                                 double Y2,
                                 double PX,
                                 double PY)
Returns the square of the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
X1, Y1 - the coordinates of the beginning of the specified line segment
X2, Y2 - the coordinates of the end of the specified line segment
PX, PY - the coordinates of the specified point being measured against the specified line segment
Returns:
a double value that is the square of the distance from the specified point to the specified line segment.
See Also:
ptLineDistSq(double, double, double, double, double, double)

ptSegDist

public static double ptSegDist(double X1,
                               double Y1,
                               double X2,
                               double Y2,
                               double PX,
                               double PY)
Returns the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
X1, Y1 - the coordinates of the beginning of the specified line segment
X2, Y2 - the coordinates of the end of the specified line segment
PX, PY - the coordinates of the specified point being measured against the specified line segment
Returns:
a double value that is the distance from the specified point to the specified line segment.
See Also:
ptLineDist(double, double, double, double, double, double)

ptSegDistSq

public double ptSegDistSq(double PX,
                          double PY)
Returns the square of the distance from a point to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
PX, PY - the coordinates of the specified point being measured against this line segment
Returns:
a double value that is the square of the distance from the specified point to the current line segment.
See Also:
ptLineDistSq(double, double)

ptSegDistSq

public double ptSegDistSq(Point2D pt)
Returns the square of the distance from a Point2D to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
pt - the specified Point2D being measured against this line segment.
Returns:
a double value that is the square of the distance from the specified Point2D to the current line segment.
See Also:
ptLineDistSq(Point2D)

ptSegDist

public double ptSegDist(double PX,
                        double PY)
Returns the distance from a point to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
PX, PY - the coordinates of the specified point being measured against this line segment
Returns:
a double value that is the distance from the specified point to the current line segment.
See Also:
ptLineDist(double, double)

ptSegDist

public double ptSegDist(Point2D pt)
Returns the distance from a Point2D to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's endpoints. If the specified point intersects the line segment in between the endpoints, this method returns 0.0.
Parameters:
pt - the specified Point2D being measured against this line segment
Returns:
a double value that is the distance from the specified Point2D to the current line segment.
See Also:
ptLineDist(Point2D)

ptLineDistSq

public static double ptLineDistSq(double X1,
                                  double Y1,
                                  double X2,
                                  double Y2,
                                  double PX,
                                  double PY)
Returns the square of the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.
Parameters:
X1, Y1 - the coordinates of one point on the specified line
X2, Y2 - the coordinates of another point on the specified line
PX, PY - the coordinates of the specified point being measured against the specified line
Returns:
a double value that is the square of the distance from the specified point to the specified line.
See Also:
ptSegDistSq(double, double, double, double, double, double)

ptLineDist

public static double ptLineDist(double X1,
                                double Y1,
                                double X2,
                                double Y2,
                                double PX,
                                double PY)
Returns the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.
Parameters:
X1, Y1 - the coordinates of one point on the specified line
X2, Y2 - the coordinates of another point on the specified line
PX, PY - the coordinates of the specified point being measured against the specified line
Returns:
a double value that is the distance from the specified point to the specified line.
See Also:
ptSegDist(double, double, double, double, double, double)

ptLineDistSq

public double ptLineDistSq(double PX,
                           double PY)
Returns the square of the distance from a point to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by this Line2D. If the specified point intersects the line, this method returns 0.0.
Parameters:
PX, PY - the coordinates of the specified point being measured against this line
Returns:
a double value that is the square of the distance from a specified point to the current line.
See Also:
ptSegDistSq(double, double)

ptLineDistSq

public double ptLineDistSq(Point2D pt)
Returns the square of the distance from a specified Point2D to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by this Line2D. If the specified point intersects the line, this method returns 0.0.
Parameters:
pt - the specified Point2D being measured against this line
Returns:
a double value that is the square of the distance from a specified Point2D to the current line.
See Also:
ptSegDistSq(Point2D)

ptLineDist

public double ptLineDist(double PX,
                         double PY)
Returns the distance from a point to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by this Line2D. If the specified point intersects the line, this method returns 0.0.
Parameters:
PX, PY - the coordinates of the specified point being measured against this line
Returns:
a double value that is the distance from a specified point to the current line.
See Also:
ptSegDist(double, double)

ptLineDist

public double ptLineDist(Point2D pt)
Returns the distance from a Point2D to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by this Line2D. If the specified point intersects the line, this method returns 0.0.
Parameters:
pt - the specified Point2D being measured
Returns:
a double value that is the distance from a specified Point2D to the current line.
See Also:
ptSegDist(Point2D)

contains

public boolean contains(double x,
                        double y)
Tests if a specified coordinate is inside the boundary of this Line2D. This method is required to implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no area.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinates of the specified point
Returns:
false because a Line2D contains no area.

contains

public boolean contains(Point2D p)
Tests if a given Point2D is inside the boundary of this Line2D. This method is required to implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no area.
Specified by:
contains in interface Shape
Parameters:
p - the specified Point2D to be tested
Returns:
false because a Line2D contains no area.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if this Line2D intersects the interior of a specified set of rectangular coordinates.
Specified by:
intersects in interface Shape
Parameters:
x, y - the coordinates of the top-left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if this Line2D intersects the interior of the specified set of rectangular coordinates; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if this Line2D intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the specified Rectangle2D to be tested
Returns:
true if this Line2D intersects the interior of the specified Rectangle2D; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of this Line2D entirely contains the specified set of rectangular coordinates. This method is required to implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no area.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinates of the top-left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
false because a Line2D contains no area.

contains

public boolean contains(Rectangle2D r)
Tests if the interior of this Line2D entirely contains the specified Rectangle2D. This method is required to implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no area.
Specified by:
contains in interface Shape
Parameters:
r - the specified Rectangle2D to be tested
Returns:
false because a Line2D contains no area.

getBounds

public Rectangle getBounds()
Returns the bounding box of this Line2D.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle that is the bounding box of the Line2D.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of this Line2D. The iterator for this class is not multi-threaded safe, which means that this Line2D class does not guarantee that modifications to the geometry of this Line2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - the specified AffineTransform
Returns:
a PathIterator that defines the boundary of this Line2D.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iteration object that defines the boundary of this flattened Line2D. The iterator for this class is not multi-threaded safe, which means that this Line2D class does not guarantee that modifications to the geometry of this Line2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - the specified AffineTransform
flatness - the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the endpoints. Since a Line2D object is always flat, this parameter is ignored.
Returns:
a PathIterator that defines the boundary of the flattened Line2D

clone

public Object clone()
Creates a new object of the same class as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoninvertibleTransformException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class NoninvertibleTransformException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.geom.NoninvertibleTransformException
All Implemented Interfaces:
Serializable
public class NoninvertibleTransformException
extends Exception

The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.

See Also:
Serialized Form

Constructor Summary
NoninvertibleTransformException(String s)
Constructs an instance of NoninvertibleTransformException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoninvertibleTransformException

public NoninvertibleTransformException(String s)
Constructs an instance of NoninvertibleTransformException with the specified detail message.
Parameters:
s - the detail message
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PathIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Interface PathIterator

All Known Implementing Classes:
FlatteningPathIterator
public interface PathIterator

The PathIterator interface provides the mechanism for objects that implement the Shape interface to return the geometry of their boundary by allowing a caller to retrieve the path of that boundary a segment at a time. This interface allows these objects to retrieve the path of their boundary a segment at a time by using 1st through 3rd order Bézier curves, which are lines and quadratic or cubic Bézier splines.

Multiple subpaths can be expressed by using a "MOVETO" segment to create a discontinuity in the geometry to move from the end of one subpath to the beginning of the next.

Each subpath can be closed manually by ending the last segment in the subpath on the same coordinate as the beginning "MOVETO" segment for that subpath or by using a "CLOSE" segment to append a line segment from the last point back to the first. Be aware that manually closing an outline as opposed to using a "CLOSE" segment to close the path might result in different line style decorations being used at the end points of the subpath. For example, the BasicStroke object uses a line "JOIN" decoration to connect the first and last points if a "CLOSE" segment is encountered, whereas simply ending the path on the same coordinate as the beginning coordinate results in line "CAP" decorations being used at the ends.

See Also:
Shape, BasicStroke

Field Summary
static int | SEG_CLOSE The segment type constant that specifies that the preceding subpath should be closed by appending a line segment back to the point corresponding to the most recent SEG_MOVETO.
static int | SEG_CUBICTO The segment type constant for the set of 3 points that specify a cubic parametric curve to be drawn from the most recently specified point.
static int | SEG_LINETO The segment type constant for a point that specifies the end point of a line to be drawn from the most recently specified point.
static int | SEG_MOVETO The segment type constant for a point that specifies the starting location for a new subpath.
static int | SEG_QUADTO The segment type constant for the pair of points that specify a quadratic parametric curve to be drawn from the most recently specified point.
static int | WIND_EVEN_ODD The winding rule constant for specifying an even-odd rule for determining the interior of a path.
static int | WIND_NON_ZERO The winding rule constant for specifying a non-zero rule for determining the interior of a path.
Method Summary
int | currentSegment(double[] coords) Returns the coordinates and type of the current path segment in the iteration.
int | currentSegment(float[] coords) Returns the coordinates and type of the current path segment in the iteration.
int | getWindingRule() Returns the winding rule for determining the interior of the path.
boolean | isDone() Tests if the iteration is complete.
void | next() Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.

Field Detail

WIND_EVEN_ODD

public static final int WIND_EVEN_ODD
The winding rule constant for specifying an even-odd rule for determining the interior of a path. The even-odd rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments an odd number of times.

WIND_NON_ZERO

public static final int WIND_NON_ZERO
The winding rule constant for specifying a non-zero rule for determining the interior of a path. The non-zero rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments a different number of times in the counter-clockwise direction than the clockwise direction.

SEG_MOVETO

public static final int SEG_MOVETO
The segment type constant for a point that specifies the starting location for a new subpath.

SEG_LINETO

public static final int SEG_LINETO
The segment type constant for a point that specifies the end point of a line to be drawn from the most recently specified point.

SEG_QUADTO

public static final int SEG_QUADTO
The segment type constant for the pair of points that specify a quadratic parametric curve to be drawn from the most recently specified point. The curve is interpolated by solving the parametric control equation in the range (t=[0..1]) using the most recently specified (current) point (CP), the first control point (P1), and the final interpolated control point (P2). The parametric control equation for this curve is:
          P(t) = B(2,0)*CP + B(2,1)*P1 + B(2,2)*P2
          0 <= t <= 1

        B(n,m) = mth coefficient of nth degree Bernstein polynomial
               = C(n,m) * t^(m) * (1 - t)^(n-m)
        C(n,m) = Combinations of n things, taken m at a time
               = n! / (m! * (n-m)!)

SEG_CUBICTO

public static final int SEG_CUBICTO
The segment type constant for the set of 3 points that specify a cubic parametric curve to be drawn from the most recently specified point. The curve is interpolated by solving the parametric control equation in the range (t=[0..1]) using the most recently specified (current) point (CP), the first control point (P1), the second control point (P2), and the final interpolated control point (P3). The parametric control equation for this curve is:
          P(t) = B(3,0)*CP + B(3,1)*P1 + B(3,2)*P2 + B(3,3)*P3
          0 <= t <= 1

        B(n,m) = mth coefficient of nth degree Bernstein polynomial
               = C(n,m) * t^(m) * (1 - t)^(n-m)
        C(n,m) = Combinations of n things, taken m at a time
               = n! / (m! * (n-m)!)
This form of curve is commonly known as a Bézier curve.

SEG_CLOSE

public static final int SEG_CLOSE
The segment type constant that specifies that the preceding subpath should be closed by appending a line segment back to the point corresponding to the most recent SEG_MOVETO.
Method Detail

getWindingRule

public int getWindingRule()
Returns the winding rule for determining the interior of the path.
Returns:
the winding rule.
See Also:
WIND_EVEN_ODD, WIND_NON_ZERO

isDone

public boolean isDone()
Tests if the iteration is complete.
Returns:
true if all the segments have been read; false otherwise.

next

public void next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.

currentSegment

public int currentSegment(float[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, or SEG_CLOSE. A float array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates. SEG_MOVETO and SEG_LINETO types returns one point, SEG_QUADTO returns two points, SEG_CUBICTO returns 3 points and SEG_CLOSE does not return any points.
Parameters:
coords - an array that holds the data returned from this method
Returns:
the path segment type of the current path segment.
See Also:
SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, SEG_CLOSE

currentSegment

public int currentSegment(double[] coords)
Returns the coordinates and type of the current path segment in the iteration. The return value is the path segment type: SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, or SEG_CLOSE. A double array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of double x,y coordinates. SEG_MOVETO and SEG_LINETO types returns one point, SEG_QUADTO returns two points, SEG_CUBICTO returns 3 points and SEG_CLOSE does not return any points.
Parameters:
coords - an array that holds the data returned from this method
See Also:
SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, SEG_CLOSE
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Point2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Point2D

java.lang.Object
  |
  +--java.awt.geom.Point2D
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Point, Point2D.Double, Point2D.Float
public abstract class Point2D
extends Object
implements Cloneable

The Point2D class defines a point representing a location in (x, y) coordinate space.

This class is only the abstract superclass for all objects that store a 2D coordinate. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | Point2D.Double The Double class defines a point specified in double precision.
static class | Point2D.Float The Float class defines a point specified in float precision.
Constructor Summary
protected Point2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
double | distance(double PX, double PY) Returns the distance from this Point2D to a specified point.
static double | distance(double X1, double Y1, double X2, double Y2) Returns the distance between two points.
double | distance(Point2D pt) Returns the distance from this Point2D to a specified Point2D.
double | distanceSq(double PX, double PY) Returns the square of the distance from this Point2D to a specified point.
static double | distanceSq(double X1, double Y1, double X2, double Y2) Returns the square of the distance between two points.
double | distanceSq(Point2D pt) Returns the square of the distance from this Point2D to a specified Point2D.
boolean | equals(Object obj) Determines whether or not two points are equal.
abstract double | getX() Returns the X coordinate of this Point2D in double precision.
abstract double | getY() Returns the Y coordinate of this Point2D in double precision.
int | hashCode() Returns the hashcode for this Point2D.
abstract void | setLocation(double x, double y) Sets the location of this Point2D to the specified float coordinates.
void | setLocation(Point2D p) Sets the location of this Point2D to the same coordinates as the specified Point2D object.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Point2D

protected Point2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
Point2D.Float, Point2D.Double, Point
Method Detail

getX

public abstract double getX()
Returns the X coordinate of this Point2D in double precision.
Returns:
the X coordinate of this Point2D.
Since:
1.2

getY

public abstract double getY()
Returns the Y coordinate of this Point2D in double precision.
Returns:
the Y coordinate of this Point2D.
Since:
1.2

setLocation

public abstract void setLocation(double x,
                                 double y)
Sets the location of this Point2D to the specified float coordinates.
Parameters:
x, y - the coordinates of this Point2D
Since:
1.2

setLocation

public void setLocation(Point2D p)
Sets the location of this Point2D to the same coordinates as the specified Point2D object.
Parameters:
p - the specified Point2D the which to set this Point2D
Since:
1.2

distanceSq

public static double distanceSq(double X1,
                                double Y1,
                                double X2,
                                double Y2)
Returns the square of the distance between two points.
Parameters:
X1, Y1 - the coordinates of the first point
X2, Y2 - the coordinates of the second point
Returns:
the square of the distance between the two sets of specified coordinates.

distance

public static double distance(double X1,
                              double Y1,
                              double X2,
                              double Y2)
Returns the distance between two points.
Parameters:
X1, Y1 - the coordinates of the first point
X2, Y2 - the coordinates of the second point
Returns:
the distance between the two sets of specified coordinates.

distanceSq

public double distanceSq(double PX,
                         double PY)
Returns the square of the distance from this Point2D to a specified point.
Parameters:
PX, PY - the coordinates of the other point
Returns:
the square of the distance between this Point2D and the specified point.

distanceSq

public double distanceSq(Point2D pt)
Returns the square of the distance from this Point2D to a specified Point2D.
Parameters:
pt - the specified Point2D
Returns:
the square of the distance between this Point2D to a specified Point2D.

distance

public double distance(double PX,
                       double PY)
Returns the distance from this Point2D to a specified point.
Parameters:
PX, PY - the coordinates of the specified Point2D
Returns:
the distance between this Point2D and a specified point.

distance

public double distance(Point2D pt)
Returns the distance from this Point2D to a specified Point2D.
Parameters:
pt - the specified Point2D
Returns:
the distance between this Point2D and the specified Point2D.

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable

hashCode

public int hashCode()
Returns the hashcode for this Point2D.
Overrides:
hashCode in class Object
Returns:
a hash code for this Point2D.

equals

public boolean equals(Object obj)
Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
Overrides:
equals in class Object
Parameters:
obj - an object to be compared with this Point2D
Returns:
true if the object to be compared is an instance of Point2D and has the same values; false otherwise.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QuadCurve2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class QuadCurve2D

java.lang.Object
  |
  +--java.awt.geom.QuadCurve2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
QuadCurve2D.Double, QuadCurve2D.Float
public abstract class QuadCurve2D
extends Object
implements Shape, Cloneable

The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.

This class is only the abstract superclass for all objects that store a 2D quadratic curve segment. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | QuadCurve2D.Double A quadratic parametric curve segment specified with double coordinates.
static class | QuadCurve2D.Float A quadratic parametric curve segment specified with float coordinates.
Constructor Summary
protected QuadCurve2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
boolean | contains(double x, double y) Tests if a specified coordinate is inside the boundary of the shape of this QuadCurve2D.
boolean | contains(double x, double y, double w, double h) Tests if the interior of the shape of this QuadCurve2D entirely contains the specified set of rectangular coordinates.
boolean | contains(Point2D p) Tests if a specified Point2D is inside the boundary of the shape of this QuadCurve2D.
boolean | contains(Rectangle2D r) Tests if the interior of the shape of this QuadCurve2D entirely contains the specified Rectangle2D.
Rectangle | getBounds() Returns the bounding box of this QuadCurve2D.
abstract Point2D | getCtrlPt() Returns the control point.
abstract double | getCtrlX() Returns the x coordinate of the control point in double precision.
abstract double | getCtrlY() Returns the y coordinate of the control point in double precision.
double | getFlatness() Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
static double | getFlatness(double[] coords, int offset) Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
static double | getFlatness(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
double | getFlatnessSq() Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
static double | getFlatnessSq(double[] coords, int offset) Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
static double | getFlatnessSq(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
abstract Point2D | getP1() Returns the start point.
abstract Point2D | getP2() Returns the end point.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of the shape of this QuadCurve2D.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D.
abstract double | getX1() Returns the x coordinate of the start point in double in precision.
abstract double | getX2() Returns the x coordinate of the end point in double precision.
abstract double | getY1() Returns the y coordinate of the start point in double precision.
abstract double | getY2() Returns the y coordinate of the end point in double precision.
boolean | intersects(double x, double y, double w, double h) Tests if the shape of this QuadCurve2D intersects the interior of a specified set of rectangular coordinates.
boolean | intersects(Rectangle2D r) Tests if the shape of this QuadCurve2D intersects the interior of a specified Rectangle2D.
void | setCurve(double[] coords, int offset) Sets the location of the endpoints and controlpoints of this QuadCurve2D to the double coordinates at the specified offset in the specified array.
abstract void | setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
void | setCurve(Point2D[] pts, int offset) Sets the location of the endpoints and controlpoints of this QuadCurve2D to the coordinates of the Point2D objects at the specified offset in the specified array.
void | setCurve(Point2D p1, Point2D cp, Point2D p2) Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified Point2D coordinates.
void | setCurve(QuadCurve2D c) Sets the location of the endpoints and controlpoint of this QuadCurve2D to the same as those in the specified QuadCurve2D.
static int | solveQuadratic(double[] eqn) Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots.
static int | solveQuadratic(double[] eqn, double[] res) Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots into the res array, returning the number of roots.
static void | subdivide(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff) Subdivides the quadratic curve specified by the coordinates stored in the src array at indices srcoff through srcoff + 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
void | subdivide(QuadCurve2D left, QuadCurve2D right) Subdivides this QuadCurve2D and stores the resulting two subdivided curves into the left and right curve parameters.
static void | subdivide(QuadCurve2D src, QuadCurve2D left, QuadCurve2D right) Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
getBounds2D

Constructor Detail

QuadCurve2D

protected QuadCurve2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
QuadCurve2D.Float, QuadCurve2D.Double
Method Detail

getX1

public abstract double getX1()
Returns the x coordinate of the start point in double in precision.
Returns:
the x coordinate of the start point.

getY1

public abstract double getY1()
Returns the y coordinate of the start point in double precision.
Returns:
the y coordinate of the start point.

getP1

public abstract Point2D getP1()
Returns the start point.
Returns:
a Point2D that is the start point of this QuadCurve2D.

getCtrlX

public abstract double getCtrlX()
Returns the x coordinate of the control point in double precision.
Returns:
x coordinate the control point

getCtrlY

public abstract double getCtrlY()
Returns the y coordinate of the control point in double precision.
Returns:
the y coordinate of the control point.

getCtrlPt

public abstract Point2D getCtrlPt()
Returns the control point.
Returns:
a Point2D that is the control point of this Point2D.

getX2

public abstract double getX2()
Returns the x coordinate of the end point in double precision.
Returns:
the x coordiante of the end point.

getY2

public abstract double getY2()
Returns the y coordinate of the end point in double precision.
Returns:
the y coordinate of the end point.

getP2

public abstract Point2D getP2()
Returns the end point.
Returns:
a Point object that is the end point of this Point2D.

setCurve

public abstract void setCurve(double x1,
                              double y1,
                              double ctrlx,
                              double ctrly,
                              double x2,
                              double y2)
Sets the location of the endpoints and controlpoint of this curve to the specified double coordinates.
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y1 - the coordinates of the ending point

setCurve

public void setCurve(double[] coords,
                     int offset)
Sets the location of the endpoints and controlpoints of this QuadCurve2D to the double coordinates at the specified offset in the specified array.
Parameters:
coords - the array containing coordinate values
offset - the index into the array from which to start getting the coordinate values and assigning them to this QuadCurve2D

setCurve

public void setCurve(Point2D p1,
                     Point2D cp,
                     Point2D p2)
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the specified Point2D coordinates.
Parameters:
p1 - the starting point
cp - the control point
p2 - the ending point

setCurve

public void setCurve(Point2D[] pts,
                     int offset)
Sets the location of the endpoints and controlpoints of this QuadCurve2D to the coordinates of the Point2D objects at the specified offset in the specified array.
Parameters:
pts - an array containing Point2D that define coordinate values
offset - the index into pts at which to start getting the coordinate values and assigning them to this QuadCurve2D

setCurve

public void setCurve(QuadCurve2D c)
Sets the location of the endpoints and controlpoint of this QuadCurve2D to the same as those in the specified QuadCurve2D.
Parameters:
c - the specified QuadCurve2D

getFlatnessSq

public static double getFlatnessSq(double x1,
                                   double y1,
                                   double ctrlx,
                                   double ctrly,
                                   double x2,
                                   double y2)
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y1 - the coordinates of the ending point
Returns:
the square of the flatness of the quadratic curve defined by the specified coordinates.

getFlatness

public static double getFlatness(double x1,
                                 double y1,
                                 double ctrlx,
                                 double ctrly,
                                 double x2,
                                 double y2)
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the indicated controlpoints.
Parameters:
x1, y1 - the coordinates of the starting point
ctrlx, ctrly - the coordinates of the control point
x2, y1 - the coordinates of the ending point
Returns:
the flatness of the quadratic curve defined by the specified coordinates.

getFlatnessSq

public static double getFlatnessSq(double[] coords,
                                   int offset)
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
Parameters:
coords - an array containing coordinate values
offset - the index into coords at which to to start getting the values from the array and assigning them to a quadratic curve
Returns:
the flatness of the quadratic curve that is defined by the values in the specified array at the specified index.

getFlatness

public static double getFlatness(double[] coords,
                                 int offset)
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of the quadratic curve specified by the controlpoints stored in the indicated array at the indicated index.
Parameters:
coords - an array containing coordinate values
offset - the index into coords at which to start getting the coordinate values and assigning them to a quadratic curve
Returns:
the flatness of a quadratic curve defined by the specified array at the specified offset.

getFlatnessSq

public double getFlatnessSq()
Returns the square of the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
Returns:
the square of the flatness of this QuadCurve2D.

getFlatness

public double getFlatness()
Returns the flatness, or maximum distance of a controlpoint from the line connecting the endpoints, of this QuadCurve2D.
Returns:
the flatness of this QuadCurve2D.

subdivide

public void subdivide(QuadCurve2D left,
                      QuadCurve2D right)
Subdivides this QuadCurve2D and stores the resulting two subdivided curves into the left and right curve parameters. Either or both of the left and right objects can be the same as this QuadCurve2D or null.
Parameters:
left - the QuadCurve2D object for storing the left or first half of the subdivided curve
right - the QuadCurve2D object for storing the right or second half of the subdivided curve

subdivide

public static void subdivide(QuadCurve2D src,
                             QuadCurve2D left,
                             QuadCurve2D right)
Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters. Either or both of the left and right objects can be the same as the src object or null.
Parameters:
src - the quadratic curve to be subdivided
left - the QuadCurve2D object for storing the left or first half of the subdivided curve
right - the QuadCurve2D object for storing the right or second half of the subdivided curve

subdivide

public static void subdivide(double[] src,
                             int srcoff,
                             double[] left,
                             int leftoff,
                             double[] right,
                             int rightoff)
Subdivides the quadratic curve specified by the coordinates stored in the src array at indices srcoff through srcoff + 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices. Either or both of the left and right arrays can be null or a reference to the same array and offset as the src array. Note that the last point in the first subdivided curve is the same as the first point in the second subdivided curve. Thus, it is possible to pass the same array for left and right and to use offsets such that rightoff equals leftoff + 4 in order to avoid allocating extra storage for this common point.
Parameters:
src - the array holding the coordinates for the source curve
srcoff - the offset into the array of the beginning of the the 6 source coordinates
left - the array for storing the coordinates for the first half of the subdivided curve
leftoff - the offset into the array of the beginning of the the 6 left coordinates
right - the array for storing the coordinates for the second half of the subdivided curve
rightoff - the offset into the array of the beginning of the the 6 right coordinates

solveQuadratic

public static int solveQuadratic(double[] eqn)
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots. The quadratic solved is represented by the equation:
     eqn = {C, B, A};
     ax^2 + bx + c = 0
A return value of -1 is used to distinguish a constant equation, which might be always 0 or never 0, from an equation that has no zeroes.
Parameters:
equ - the array that contains the quadratic coefficients
Returns:
the number of roots, or -1 if the equation is a constant

solveQuadratic

public static int solveQuadratic(double[] eqn,
                                 double[] res)
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots into the res array, returning the number of roots. The quadratic solved is represented by the equation:
     eqn = {C, B, A};
     ax^2 + bx + c = 0
A return value of -1 is used to distinguish a constant equation, which might be always 0 or never 0, from an equation that has no zeroes.
Returns:
the number of roots, or -1 if the equation is a constant.

contains

public boolean contains(double x,
                        double y)
Tests if a specified coordinate is inside the boundary of the shape of this QuadCurve2D.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified coordinates
Returns:
true if the specified coordinate is inside the boundary of the shape of this QuadCurve2D; false otherwise.

contains

public boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of the shape of this QuadCurve2D.
Specified by:
contains in interface Shape
Parameters:
p - the specified Point2D
Returns:
true if the specified Point2D is inside the boundary of the shape of this QuadCurve2D.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the shape of this QuadCurve2D intersects the interior of a specified set of rectangular coordinates.
Specified by:
intersects in interface Shape
Parameters:
x, y - the coordinates of the upper-left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the shape of this QuadCurve2D intersects the interior of the specified set of rectangular coordinates; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if the shape of this QuadCurve2D intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the shape of this QuadCurve2D intersects the interior of the specified Rectangle2D; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of the shape of this QuadCurve2D entirely contains the specified set of rectangular coordinates.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinates of the upper-left corner of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the interior of the shape of this QuadCurve2D entirely contains the specified rectangluar area; false otherwise.

contains

public boolean contains(Rectangle2D r)
Tests if the interior of the shape of this QuadCurve2D entirely contains the specified Rectangle2D.
Specified by:
contains in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the interior of the shape of this QuadCurve2D entirely contains the specified Rectangle2D; false otherwise.

getBounds

public Rectangle getBounds()
Returns the bounding box of this QuadCurve2D.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle that is the bounding box of the shape of this QuadCurve2D.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the shape of this QuadCurve2D. The iterator for this class is not multi-threaded safe, which means that this QuadCurve2D class does not guarantee that modifications to the geometry of this QuadCurve2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to apply to the shape boundary
Returns:
a PathIterator object that defines the boundary of the shape.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D. The iterator for this class is not multi-threaded safe, which means that this QuadCurve2D class does not guarantee that modifications to the geometry of this QuadCurve2D object do not affect any iterations of that geometry that are already in process.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to apply to the boundary of the shape
flatness - the maximum distance that the control points for a subdivided curve can be with respect to a line connecting the endpoints of this curve before this curve is replaced by a straight line connecting the endpoints.
Returns:
a PathIterator object that defines the flattened boundary of the shape.

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Rectangle2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class Rectangle2D

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
Rectangle, Rectangle2D.Double, Rectangle2D.Float
public abstract class Rectangle2D
extends RectangularShape

The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).

This class is only the abstract superclass for all objects that store a 2D rectangle. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.
Field Summary
static int | OUT_BOTTOM The bitmask that indicates that a point lies below this Rectangle2D.
static int | OUT_LEFT The bitmask that indicates that a point lies to the left of this Rectangle2D.
static int | OUT_RIGHT The bitmask that indicates that a point lies to the right of this Rectangle2D.
static int | OUT_TOP The bitmask that indicates that a point lies above this Rectangle2D.
Constructor Summary
protected Rectangle2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
void | add(double newx, double newy) Adds a point, specified by the double precision arguments newx and newy, to this Rectangle2D.
void | add(Point2D pt) Adds the Point2D object pt to this Rectangle2D.
void | add(Rectangle2D r) Adds a Rectangle2D object to this Rectangle2D.
boolean | contains(double x, double y) Tests if a specified coordinate is inside the boundary of this Rectangle2D.
boolean | contains(double x, double y, double w, double h) Tests if the interior of this Rectangle2D entirely contains the specified set of rectangular coordinates.
abstract Rectangle2D | createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
abstract Rectangle2D | createUnion(Rectangle2D r) Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
boolean | equals(Object obj) Determines whether or not the specified Object is equal to this Rectangle2D.
Rectangle2D | getBounds2D() Returns the high precision bounding box of this Rectangle2D.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this Rectangle2D.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of the flattened Rectangle2D.
int | hashCode() Returns the hashcode for this Rectangle2D.
static void | intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
boolean | intersects(double x, double y, double w, double h) Tests if the interior of this Rectangle2D intersects the interior of a specified set of rectangular coordinates.
boolean | intersectsLine(double x1, double y1, double x2, double y2) Tests if the specified line segment intersects the interior of this Rectangle2D.
boolean | intersectsLine(Line2D l) Tests if the specified line segment intersects the interior of this Rectangle2D.
abstract int | outcode(double x, double y) Determines where the specified coordinates lie with respect to this Rectangle2D.
int | outcode(Point2D p) Determines where the specified Point2D lies with respect to this Rectangle2D.
void | setFrame(double x, double y, double w, double h) Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values.
abstract void | setRect(double x, double y, double w, double h) Sets the location and size of this Rectangle2D to the specified double values.
void | setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D.
static void | union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

OUT_LEFT

public static final int OUT_LEFT
The bitmask that indicates that a point lies to the left of this Rectangle2D.
Since:
1.2

OUT_TOP

public static final int OUT_TOP
The bitmask that indicates that a point lies above this Rectangle2D.
Since:
1.2

OUT_RIGHT

public static final int OUT_RIGHT
The bitmask that indicates that a point lies to the right of this Rectangle2D.
Since:
1.2

OUT_BOTTOM

public static final int OUT_BOTTOM
The bitmask that indicates that a point lies below this Rectangle2D.
Since:
1.2
Constructor Detail

Rectangle2D

protected Rectangle2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
Rectangle2D.Float, Rectangle2D.Double, Rectangle
Method Detail

setRect

public abstract void setRect(double x,
                             double y,
                             double w,
                             double h)
Sets the location and size of this Rectangle2D to the specified double values.
Parameters:
x, y - the coordinates to which to set the location of the upper left corner of this Rectangle2D
w - the value to use to set the width of this Rectangle2D
h - the value to use to set the height of this Rectangle2D
Since:
1.2

setRect

public void setRect(Rectangle2D r)
Sets this Rectangle2D to be the same as the specified Rectangle2D.
Parameters:
r - the specified Rectangle2D
Since:
1.2

intersectsLine

public boolean intersectsLine(double x1,
                              double y1,
                              double x2,
                              double y2)
Tests if the specified line segment intersects the interior of this Rectangle2D.
Parameters:
x1, y1 - the first endpoint of the specified line segment
x2, y2 - the second endpoint of the specified line segment
Returns:
true if the specified line segment intersects the interior of this Rectangle2D; false otherwise.
Since:
1.2

intersectsLine

public boolean intersectsLine(Line2D l)
Tests if the specified line segment intersects the interior of this Rectangle2D.
Parameters:
l - the specified Line2D to test for intersection with the interior of this Rectangle2D
Returns:
true if the specified Line2D intersects the interior of this Rectangle2D; false otherwise.
Since:
1.2

outcode

public abstract int outcode(double x,
                            double y)
Determines where the specified coordinates lie with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle2D.
Parameters:
x, y - the specified coordinates
Returns:
the logical OR of all appropriate out codes.
Since:
1.2
See Also:
OUT_LEFT, OUT_TOP, OUT_RIGHT, OUT_BOTTOM

outcode

public int outcode(Point2D p)
Determines where the specified Point2D lies with respect to this Rectangle2D. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle2D, whether or not the specified Point2D is on the same side of the edge as the rest of this Rectangle2D.
Parameters:
p - the specified Point2D
Returns:
the logical OR of all appropriate out codes.
Since:
1.2
See Also:
OUT_LEFT, OUT_TOP, OUT_RIGHT, OUT_BOTTOM

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values.
Overrides:
setFrame in class RectangularShape
Parameters:
x, y - the coordinates to which to set the location of the upper left corner of the outer bounds of this Rectangle2D
w - the value to use to set the width of the outer bounds of this Rectangle2D
h - the value to use to set the height of the outer bounds of this Rectangle2D
Since:
1.2

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Rectangle2D.
Returns:
the bounding box of this Rectangle2D.
Since:
1.2

contains

public boolean contains(double x,
                        double y)
Tests if a specified coordinate is inside the boundary of this Rectangle2D.
Parameters:
x, y - the coordinates to test
Returns:
true if the specified coordinates are inside the boundary of this Rectangle2D; false otherwise.
Since:
1.2

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of this Rectangle2D intersects the interior of a specified set of rectangular coordinates.
Parameters:
x, y - the coordinates of the upper left corner of the specified set of rectangular coordinates
w - the width of the specified set of rectangular coordinates
h - the height of the specified set of rectangular coordinates
Returns:
true if this Rectangle2D intersects the interior of a specified set of rectangular coordinates; false otherwise.
Since:
1.2

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of this Rectangle2D entirely contains the specified set of rectangular coordinates.
Parameters:
x, y - the coordinates of the upper left corner of the specified set of rectangular coordinates
w - the width of the specified set of rectangular coordinates
h - the height of the specified set of rectangular coordinates
Returns:
true if this Rectangle2D entirely contains specified set of rectangular coordinates; false otherwise.
Since:
1.2

createIntersection

public abstract Rectangle2D createIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
Parameters:
r - the Rectangle2D to be intersected with this Rectangle2D
Returns:
the largest Rectangle2D contained in both the specified Rectangle2D and in this Rectangle2D.
Since:
1.2

intersect

public static void intersect(Rectangle2D src1,
                             Rectangle2D src2,
                             Rectangle2D dest)
Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
Parameters:
src1 - the first of a pair of Rectangle2D objects to be intersected with each other
src2 - the second of a pair of Rectangle2D objects to be intersected with each other
dest - the Rectangle2D that holds the results of the intersection of src1 and src2
Since:
1.2

createUnion

public abstract Rectangle2D createUnion(Rectangle2D r)
Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
Parameters:
r - the Rectangle2D to be combined with this Rectangle2D
Returns:
the smallest Rectangle2D containing both the specified Rectangle2D and this Rectangle2D.
Since:
1.2

union

public static void union(Rectangle2D src1,
                         Rectangle2D src2,
                         Rectangle2D dest)
Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
Parameters:
src1 - the first of a pair of Rectangle2D objects to be combined with each other
src2 - the second of a pair of Rectangle2D objects to be combined with each other
dest - the Rectangle2D that holds the results of the union of src1 and src2
Since:
1.2

add

public void add(double newx,
                double newy)
Adds a point, specified by the double precision arguments newx and newy, to this Rectangle2D. The resulting Rectangle2D is the smallest Rectangle2D that contains both the original Rectangle2D and the specified point.

After adding a point, a call to contains with the added point as an argument does not necessarily return true. The contains method does not return true for points on the right or bottom edges of a rectangle. Therefore, if the added point falls on the left or bottom edge of the enlarged rectangle, contains returns false for that point.

Parameters:
newx, newy - the coordinates of the new point
Since:
JDK1.0

add

public void add(Point2D pt)
Adds the Point2D object pt to this Rectangle2D. The resulting Rectangle2D is the smallest Rectangle2D that contains both the original Rectangle2D and the specified Point2D.

After adding a point, a call to contains with the added point as an argument does not necessarily return true. The contains method does not return true for points on the right or bottom edges of a rectangle. Therefore, if the added point falls on the left or bottom edge of the enlarged rectangle, contains returns false for that point.

Parameters:
pt - the new Point2D to add to this Rectangle2D.
Since:
JDK1.0

add

public void add(Rectangle2D r)
Adds a Rectangle2D object to this Rectangle2D. The resulting Rectangle2D is the union of the two Rectangle2D objects.
Parameters:
r - the Rectangle2D to add to this Rectangle2D.
Since:
JDK1.0

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of this Rectangle2D. The iterator for this class is multi-threaded safe, which means that this Rectangle2D class guarantees that modifications to the geometry of this Rectangle2D object do not affect any iterations of that geometry that are already in process.
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
the PathIterator object that returns the geometry of the outline of this Rectangle2D, one segment at a time.
Since:
1.2

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iteration object that defines the boundary of the flattened Rectangle2D. Since rectangles are already flat, the flatness parameter is ignored. The iterator for this class is multi-threaded safe, which means that this Rectangle2D class guarantees that modifications to the geometry of this Rectangle2D object do not affect any iterations of that geometry that are already in process.
Overrides:
getPathIterator in class RectangularShape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
flatness - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve. Since rectangles are already flat, the flatness parameter is ignored.
Returns:
the PathIterator object that returns the geometry of the outline of this Rectangle2D, one segment at a time.
Since:
1.2

hashCode

public int hashCode()
Returns the hashcode for this Rectangle2D.
Overrides:
hashCode in class Object
Returns:
the hashcode for this Rectangle2D.

equals

public boolean equals(Object obj)
Determines whether or not the specified Object is equal to this Rectangle2D. The specified Object is equal to this Rectangle2D if it is an instance of Rectangle2D and if its location and size are the same as this Rectangle2D.
Overrides:
equals in class Object
Parameters:
obj - an Object to be compared with this Rectangle2D.
Returns:
true if obj is an instance of Rectangle2D and has the same values; false otherwise.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RectangularShape

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class RectangularShape

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
Arc2D, Ellipse2D, Rectangle2D, RoundRectangle2D
public abstract class RectangularShape
extends Object
implements Shape, Cloneable

RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame. This class does not directly specify any specific geometry by itself, but merely provides manipulation methods inherited by a whole category of Shape objects. The manipulation methods provided by this class can be used to query and modify the rectangular frame, which provides a reference for the subclasses to define their geometry.

Constructor Summary
protected RectangularShape()
This is an abstract class that cannot be instantiated directly.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
boolean | contains(Point2D p) Tests if a specified Point2D is inside the boundary of the Shape.
boolean | contains(Rectangle2D r) Tests if the interior of the Shape entirely contains the specified Rectangle2D.
Rectangle | getBounds() Returns the bounding box of the Shape.
double | getCenterX() Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
double | getCenterY() Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
Rectangle2D | getFrame() Returns the framing Rectangle2D that defines the overall shape of this object.
abstract double | getHeight() Returns the height of the framing rectangle in double precision.
double | getMaxX() Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
double | getMaxY() Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
double | getMinX() Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
double | getMinY() Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
abstract double | getWidth() Returns the width of the framing rectangle in double precision.
abstract double | getX() Returns the X coordinate of the upper left corner of the framing rectangle in double precision.
abstract double | getY() Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.
boolean | intersects(Rectangle2D r) Tests if the interior of theShape intersects the interior of a specified Rectangle2D.
abstract boolean | isEmpty() Determines whether the RectangularShape is empty.
abstract void | setFrame(double x, double y, double w, double h) Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
void | setFrame(Point2D loc, Dimension2D size) Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
void | setFrame(Rectangle2D r) Sets the framing rectangle of this Shape to be the specified Rectangle2D.
void | setFrameFromCenter(double centerX, double centerY, double cornerX, double cornerY) Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
void | setFrameFromCenter(Point2D center, Point2D corner) Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
void | setFrameFromDiagonal(double x1, double y1, double x2, double y2) Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
void | setFrameFromDiagonal(Point2D p1, Point2D p2) Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
contains, contains, getBounds2D, getPathIterator, intersects

Constructor Detail

RectangularShape

protected RectangularShape()
This is an abstract class that cannot be instantiated directly.
See Also:
Arc2D, Ellipse2D, Rectangle2D, RoundRectangle2D
Method Detail

getX

public abstract double getX()
Returns the X coordinate of the upper left corner of the framing rectangle in double precision.
Returns:
the x coordinate of the upper left corner of the framing rectangle.

getY

public abstract double getY()
Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.
Returns:
the y coordinate of the upper left corner of the framing rectangle.

getWidth

public abstract double getWidth()
Returns the width of the framing rectangle in double precision.
Returns:
the width of the framing rectangle.

getHeight

public abstract double getHeight()
Returns the height of the framing rectangle in double precision.
Returns:
the height of the framing rectangle.

getMinX

public double getMinX()
Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
Returns:
the smallest x coordinate of the framing rectangle of the Shape.

getMinY

public double getMinY()
Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
Returns:
the smallest y coordinate of the framing rectangle of the Shape.

getMaxX

public double getMaxX()
Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
Returns:
the largest x coordinate of the framing rectangle of the Shape.

getMaxY

public double getMaxY()
Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
Returns:
the largest y coordinate of the framing rectangle of the Shape.

getCenterX

public double getCenterX()
Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
Returns:
the x coordinate of the framing rectangle of the Shape object's center.

getCenterY

public double getCenterY()
Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
Returns:
the y coordinate of the framing rectangle of the Shape object's center.

getFrame

public Rectangle2D getFrame()
Returns the framing Rectangle2D that defines the overall shape of this object.
Returns:
a Rectangle2D, specified in double coordinates.

isEmpty

public abstract boolean isEmpty()
Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area.
Returns:
true if the RectangularShape is empty; false otherwise.

setFrame

public abstract void setFrame(double x,
                              double y,
                              double w,
                              double h)
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
x, y - the coordinates of the upper-left corner of the specified rectangular shape
w - the width of the specified rectangular shape
h - the height of the specified rectangular shape

setFrame

public void setFrame(Point2D loc,
                     Dimension2D size)
Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
loc - the specified Point2D
size - the specified Dimension2D

setFrame

public void setFrame(Rectangle2D r)
Sets the framing rectangle of this Shape to be the specified Rectangle2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
r - the specified Rectangle2D

setFrameFromDiagonal

public void setFrameFromDiagonal(double x1,
                                 double y1,
                                 double x2,
                                 double y2)
Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
x1, y1 - the first specified coordinates
x2, y2 - the second specified coordinates

setFrameFromDiagonal

public void setFrameFromDiagonal(Point2D p1,
                                 Point2D p2)
Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
p1, p2 - the two specified Point2D objects

setFrameFromCenter

public void setFrameFromCenter(double centerX,
                               double centerY,
                               double cornerX,
                               double cornerY)
Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
centerX, centerY - the center point coordinates
cornerX, cornerY - the corner point coordinates

setFrameFromCenter

public void setFrameFromCenter(Point2D center,
                               Point2D corner)
Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
center - the specified center Point2D
corner - the specified corner Point2D

contains

public boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of the Shape.
Specified by:
contains in interface Shape
Parameters:
p - the specified Point2D
Returns:
true if the Point2D is inside the Shape object's boundary; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if the interior of theShape intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the Shape and the specified Rectangle2D intersect each other; false otherwise.

contains

public boolean contains(Rectangle2D r)
Tests if the interior of the Shape entirely contains the specified Rectangle2D.
Specified by:
contains in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the Shape entirely contains the specified Rectangle2D; false otherwise.

getBounds

public Rectangle getBounds()
Returns the bounding box of the Shape.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle object that bounds the Shape.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.

Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types will be returned by the iterator.

The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. An optional AffineTransform can be specified so that the coordinates returned in the iteration are transformed accordingly.

Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired.
flatness - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve
Returns:
a PathIterator object that provides access to the Shape object's flattened geometry.

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RoundRectangle2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.geom
Class RoundRectangle2D

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.RoundRectangle2D
All Implemented Interfaces:
Cloneable, Shape
Direct Known Subclasses:
RoundRectangle2D.Double, RoundRectangle2D.Float
public abstract class RoundRectangle2D
extends RectangularShape

The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.

This class is the abstract superclass for all objects that store a 2D rounded rectangle. The actual storage representation of the coordinates is left to the subclass.

Inner Class Summary
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.
Constructor Summary
protected RoundRectangle2D()
This is an abstract class that cannot be instantiated directly.
Method Summary
boolean | contains(double x, double y) Tests if the specified coordinates are inside the boundary of this RoundRectangle2D.
boolean | contains(double x, double y, double w, double h) Tests if the interior of this RoundRectangle2D entirely contains the specified set of rectangular coordinates.
abstract double | getArcHeight() Gets the height of the arc that rounds off the corners.
abstract double | getArcWidth() Gets the width of the arc that rounds off the corners.
PathIterator | getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of this RoundRectangle2D.
boolean | intersects(double x, double y, double w, double h) Tests if the interior of this RoundRectangle2D intersects the interior of a specified set of rectangular coordinates.
void | setFrame(double x, double y, double w, double h) Sets the location and size of the outer bounds of this RoundRectangle2D to the specified rectangular values.
abstract void | setRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight) Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.
void | setRoundRect(RoundRectangle2D rr) Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.Shape
getBounds2D

Constructor Detail

RoundRectangle2D

protected RoundRectangle2D()
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
See Also:
RoundRectangle2D.Float, RoundRectangle2D.Double
Method Detail

getArcWidth

public abstract double getArcWidth()
Gets the width of the arc that rounds off the corners.
Returns:
the width of the arc that rounds off the corners of this RoundRectangle2D.

getArcHeight

public abstract double getArcHeight()
Gets the height of the arc that rounds off the corners.
Returns:
the height of the arc that rounds off the corners of this RoundRectangle2D.

setRoundRect

public abstract void setRoundRect(double x,
                                  double y,
                                  double w,
                                  double h,
                                  double arcWidth,
                                  double arcHeight)
Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.
Parameters:
x, y - the coordinates to which to set the location of this RoundRectangle2D
w - the width to which to set this RoundRectangle2D
h - the height to which to set this RoundRectangle2D
arcWidth - the width to which to set the arc of this RoundRectangle2D
arcHeight - the height to which to set the arc of this RoundRectangle2D

setRoundRect

public void setRoundRect(RoundRectangle2D rr)
Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.
Parameters:
rr - the specified RoundRectangle2D

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of the outer bounds of this RoundRectangle2D to the specified rectangular values.
Overrides:
setFrame in class RectangularShape
Parameters:
x, y - the coordinates to which to set the location of this RoundRectangle2D
w - the width to which to set this RoundRectangle2D
h - the height to which to set this RoundRectangle2D

contains

public boolean contains(double x,
                        double y)
Tests if the specified coordinates are inside the boundary of this RoundRectangle2D.
Parameters:
x, y - the coordinates to test
Returns:
true if the specified coordinates are inside the boundary of this RoundRectangle2D; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of this RoundRectangle2D intersects the interior of a specified set of rectangular coordinates.
Parameters:
x, y - the coordinates of the upper left corner of the specified set of rectangular coordinates
w - the width of the specified set of rectangular coordinates
h - the height of the specified set of rectangular coordinates
Returns:
true if the interior of this RoundRectangle2D intersects the interior of the specified set of rectangular coordinates.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of this RoundRectangle2D entirely contains the specified set of rectangular coordinates.
Parameters:
x, y - the coordinates of the specified set of rectangular coordinates
w - the width of the specified set of rectangular coordinates
h - the height of the specified set of rectangular coordinates
Returns:
true if the interior of this RoundRectangle2D entirely contains the specified set of rectangular coordinates; false otherwise.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of this RoundRectangle2D. The iterator for this class is multi-threaded safe, which means that this RoundRectangle2D class guarantees that modifications to the geometry of this RoundRectangle2D object do not affect any iterations of that geometry that are already in process.
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
the PathIterator object that returns the geometry of the outline of this RoundRectangle2D, one segment at a time.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GradientPaint

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GradientPaint

java.lang.Object
  |
  +--java.awt.GradientPaint
All Implemented Interfaces:
Paint, Transparency
public class GradientPaint
extends Object
implements Paint

The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern. If Point P1 with Color C1 and Point P2 with Color C2 are specified in user space, the Color on the P1, P2 connecting line is proportionally changed from C1 to C2. Any point P not on the extended P1, P2 connecting line has the color of the point P' that is the perpendicular projection of P on the extended P1, P2 connecting line. Points on the extended line outside of the P1, P2 segment can be colored in one of two ways.

  • If the gradient is cyclic then the points on the extended P1, P2 connecting line cycle back and forth between the colors C1 and C2.
  • If the gradient is acyclic then points on the P1 side of the segment have the constant Color C1 while points on the P2 side have the constant Color C2.

See Also:
Paint, Graphics2D.setPaint(java.awt.Paint)

Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
Constructs a simple acyclic GradientPaint object.
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
Constructs a simple acyclic GradientPaint object.
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
Method Summary
PaintContext | createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
Color | getColor1() Returns the color C1 anchored by the point P1.
Color | getColor2() Returns the color C2 anchored by the point P2.
Point2D | getPoint1() Returns a copy of the point P1 that anchors the first color.
Point2D | getPoint2() Returns a copy of the point P2 which anchors the second color.
int | getTransparency() Returns the transparency mode for this GradientPaint.
boolean | isCyclic() Returns true if the gradient cycles repeatedly between the two colors C1 and C2.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GradientPaint

public GradientPaint(float x1,
                     float y1,
                     Color color1,
                     float x2,
                     float y2,
                     Color color2)
Constructs a simple acyclic GradientPaint object.
Parameters:
x1, y1 - coordinates of the first specified Point in user space
color1 - Color at the first specified Point
x2, y2 - coordinates of the second specified Point in user space
color2 - Color at the second specified Point

GradientPaint

public GradientPaint(Point2D pt1,
                     Color color1,
                     Point2D pt2,
                     Color color2)
Constructs a simple acyclic GradientPaint object.
Parameters:
pt1 - the first specified Point in user space
color1 - Color at the first specified Point
pt2 - the second specified Point in user space
color2 - Color at the second specified Point

GradientPaint

public GradientPaint(float x1,
                     float y1,
                     Color color1,
                     float x2,
                     float y2,
                     Color color2,
                     boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
Parameters:
x1, y1 - coordinates of the first specified Point in user space
color1 - Color at the first specified Point
x2, y2 - coordinates of the second specified Point in user space
color2 - Color at the second specified Point
cyclic - true if the gradient pattern should cycle repeatedly between the two colors; false otherwise

GradientPaint

public GradientPaint(Point2D pt1,
                     Color color1,
                     Point2D pt2,
                     Color color2,
                     boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
Parameters:
pt1 - the first specified Point in user space
color1 - Color at the first specified Point
pt2 - the second specified Point in user space
color2 - Color at the second specified Point
cyclic - true if the gradient pattern should cycle repeatedly between the two colors; false otherwise
Method Detail

getPoint1

public Point2D getPoint1()
Returns a copy of the point P1 that anchors the first color.
Returns:
a Point2D object that is a copy of the point that anchors the first color of this GradientPaint.

getColor1

public Color getColor1()
Returns the color C1 anchored by the point P1.
Returns:
a Color object that is the color anchored by P1.

getPoint2

public Point2D getPoint2()
Returns a copy of the point P2 which anchors the second color.
Returns:
a Point2D object that is a copy of the point that anchors the second color of this GradientPaint.

getColor2

public Color getColor2()
Returns the color C2 anchored by the point P2.
Returns:
a Color object that is the color anchored by P2.

isCyclic

public boolean isCyclic()
Returns true if the gradient cycles repeatedly between the two colors C1 and C2.
Returns:
true if the gradient cycles repeatedly between the two colors; false otherwise.

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform xform,
                                  RenderingHints hints)
Creates and returns a context used to generate the color pattern.
Specified by:
createContext in interface Paint
Parameters:
cm - ColorModel that receives the Paint data. This is used only as a hint.
deviceBounds - the device space bounding box of the graphics primitive being rendered
userBounds - the user space bounding box of the graphics primitive being rendered
xform - the AffineTransform from user space into device space
hints - the hints that the context object uses to choose between rendering alternatives
Returns:
the PaintContext that generates color patterns.
See Also:
PaintContext

getTransparency

public int getTransparency()
Returns the transparency mode for this GradientPaint.
Specified by:
getTransparency in interface Transparency
Returns:
an integer value representing this GradientPaint object's transparency mode.
See Also:
Transparency
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Graphics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Graphics

java.lang.Object
  |
  +--java.awt.Graphics
Direct Known Subclasses:
DebugGraphics, Graphics2D
public abstract class Graphics
extends Object

The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.

A Graphics object encapsulates state information needed for the basic rendering operations that Java supports. This state information includes the following properties:

  • The Component object on which to draw.
  • A translation origin for rendering and clipping coordinates.
  • The current clip.
  • The current color.
  • The current font.
  • The current logical pixel operation function (XOR or Paint).
  • The current XOR alternation color (see setXORMode(java.awt.Color)).

Coordinates are infinitely thin and lie between the pixels of the output device. Operations that draw the outline of a figure operate by traversing an infinitely thin path between pixels with a pixel-sized pen that hangs down and to the right of the anchor point on the path. Operations that fill a figure operate by filling the interior of that infinitely thin path. Operations that render horizontal text render the ascending portion of character glyphs entirely above the baseline coordinate.

The graphics pen hangs down and to the right from the path it traverses. This has the following implications:

  • If you draw a figure that covers a given rectangle, that figure occupies one extra row of pixels on the right and bottom edges as compared to filling a figure that is bounded by that same rectangle.
  • If you draw a horizontal line along the same y coordinate as the baseline of a line of text, that line is drawn entirely below the text, except for any descenders.

All coordinates that appear as arguments to the methods of this Graphics object are considered relative to the translation origin of this Graphics object prior to the invocation of the method.

All rendering operations modify only pixels which lie within the area bounded by the current clip, which is specified by a Shape in user space and is controlled by the program using the Graphics object. This user clip is transformed into device space and combined with the device clip, which is defined by the visibility of windows and device extents. The combination of the user clip and device clip defines the composite clip, which determines the final clipping region. The user clip cannot be modified by the rendering system to reflect the resulting composite clip. The user clip can only be changed through the setClip or clipRect methods. All drawing or writing is done in the current color, using the current paint mode, and in the current font.

Since:
JDK1.0
See Also:
Component,
clipRect(int, int, int, int),
setColor(java.awt.Color),
setPaintMode(),
setXORMode(java.awt.Color),
setFont(java.awt.Font)

Constructor Summary
protected Graphics()
Constructs a new Graphics object.
Method Summary
abstract  void clearRect(int x, int y, int width, int height)
Clears the specified rectangle by filling it with the background color of the current drawing surface.
abstract  void clipRect(int x, int y, int width, int height)
Intersects the current clip with the specified rectangle.
abstract  void copyArea(int x, int y, int width, int height, int dx, int dy)
Copies an area of the component by a distance specified by dx and dy.
abstract  Graphics create()
Creates a new Graphics object that is a copy of this Graphics object.
 Graphics create(int x, int y, int width, int height)
Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
abstract  void dispose()
Disposes of this graphics context and releases any system resources that it is using.
 void draw3DRect(int x, int y, int width, int height, boolean raised)
Draws a 3-D highlighted outline of the specified rectangle.
abstract  void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Draws the outline of a circular or elliptical arc covering the specified rectangle.
 void drawBytes(byte[] data, int offset, int length, int x, int y)
Draws the text given by the specified byte array, using this graphics context's current font and color.
 void drawChars(char[] data, int offset, int length, int x, int y)
Draws the text given by the specified character array, using this graphics context's current font and color.
abstract  boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
Draws as much of the specified image as is currently available.
abstract  boolean drawImage(Image img, int x, int y, ImageObserver observer)
Draws as much of the specified image as is currently available.
abstract  boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract  boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract  boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract  boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract  void drawLine(int x1, int y1, int x2, int y2)
Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
abstract  void drawOval(int x, int y, int width, int height)
Draws the outline of an oval.
abstract  void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
Draws a closed polygon defined by arrays of x and y coordinates.
 void drawPolygon(Polygon p)
Draws the outline of a polygon defined by the specified Polygon object.
abstract  void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
Draws a sequence of connected lines defined by arrays of x and y coordinates.
 void drawRect(int x, int y, int width, int height)
Draws the outline of the specified rectangle.
abstract  void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Draws an outlined round-cornered rectangle using this graphics context's current color.
abstract  void drawString(AttributedCharacterIterator iterator, int x, int y)
Draws the text given by the specified iterator, using this graphics context's current color.
abstract  void drawString(String str, int x, int y)
Draws the text given by the specified string, using this graphics context's current font and color.
 void fill3DRect(int x, int y, int width, int height, boolean raised)
Paints a 3-D highlighted rectangle filled with the current color.
abstract  void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle.
abstract  void fillOval(int x, int y, int width, int height)
Fills an oval bounded by the specified rectangle with the current color.
abstract  void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates.
 void fillPolygon(Polygon p)
Fills the polygon defined by the specified Polygon object with the graphics context's current color.
abstract  void fillRect(int x, int y, int width, int height)
Fills the specified rectangle.
abstract  void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Fills the specified rounded corner rectangle with the current color.
 void finalize()
Disposes of this graphics context once it is no longer referenced.
abstract  Shape getClip()
Gets the current clipping area.
abstract  Rectangle getClipBounds()
Returns the bounding rectangle of the current clipping area.
 Rectangle getClipBounds(Rectangle r)
Returns the bounding rectangle of the current clipping area.
 Rectangle getClipRect()
Deprecated. As of JDK version 1.1, replaced by getClipBounds().
abstract  Color getColor()
Gets this graphics context's current color.
abstract  Font getFont()
Gets the current font.
 FontMetrics getFontMetrics()
Gets the font metrics of the current font.
abstract  FontMetrics getFontMetrics(Font f)
Gets the font metrics for the specified font.
 boolean hitClip(int x, int y, int width, int height)
Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area.
abstract  void setClip(int x, int y, int width, int height)
Sets the current clip to the rectangle specified by the given coordinates.
abstract  void setClip(Shape clip)
Sets the current clipping area to an arbitrary clip shape.
abstract  void setColor(Color c)
Sets this graphics context's current color to the specified color.
abstract  void setFont(Font font)
Sets this graphics context's font to the specified font.
abstract  void setPaintMode()
Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color.
abstract  void setXORMode(Color c1)
Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.
 String toString()
Returns a String object representing this Graphics object's value.
abstract  void translate(int x, int y)
Translates the origin of the graphics context to the point (x, y) in the current coordinate system.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Graphics

protected Graphics()
Constructs a new Graphics object. This constructor is the default contructor for a graphics context.

Since Graphics is an abstract class, applications cannot call this constructor directly. Graphics contexts are obtained from other graphics contexts or are created by calling getGraphics on a component.

See Also:
create(), Component.getGraphics()
Method Detail

create

public abstract Graphics create()
Creates a new Graphics object that is a copy of this Graphics object.
Returns:
a new graphics context that is a copy of this graphics context.

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Creates a new Graphics object based on this Graphics object, but with a new translation and clip area. The new Graphics object has its origin translated to the specified point (x, y). Its clip area is determined by the intersection of the original clip area with the specified rectangle. The arguments are all interpreted in the coordinate system of the original Graphics object. The new graphics context is identical to the original, except in two respects:

  • The new graphics context is translated by (x, y). That is to say, the point (0, 0) in the new graphics context is the same as (x, y) in the original graphics context.
  • The new graphics context has an additional clipping rectangle, in addition to whatever (translated) clipping rectangle it inherited from the original graphics context. The origin of the new clipping rectangle is at (0, 0), and its size is specified by the width and height arguments.

Parameters:
x - the x coordinate.
y - the y coordinate.
width - the width of the clipping rectangle.
height - the height of the clipping rectangle.
Returns:
a new graphics context.
See Also:
translate(int, int), clipRect(int, int, int, int)

translate

public abstract void translate(int x,
                               int y)
Translates the origin of the graphics context to the point (x, y) in the current coordinate system. Modifies this graphics context so that its new origin corresponds to the point (x, y) in this graphics context's original coordinate system. All coordinates used in subsequent rendering operations on this graphics context will be relative to this new origin.
Parameters:
x - the x coordinate.
y - the y coordinate.

getColor

public abstract Color getColor()
Gets this graphics context's current color.
Returns:
this graphics context's current color.
See Also:
Color, setColor(java.awt.Color)

setColor

public abstract void setColor(Color c)
Sets this graphics context's current color to the specified color. All subsequent graphics operations using this graphics context use this specified color.
Parameters:
c - the new rendering color.
See Also:
Color, getColor()

setPaintMode

public abstract void setPaintMode()
Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. This sets the logical pixel operation function to the paint or overwrite mode. All subsequent rendering operations will overwrite the destination with the current color.

setXORMode

public abstract void setXORMode(Color c1)
Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. This specifies that logical pixel operations are performed in the XOR mode, which alternates pixels between the current color and a specified XOR color.

When drawing operations are performed, pixels which are the current color are changed to the specified color, and vice versa.

Pixels that are of colors other than those two colors are changed in an unpredictable but reversible manner; if the same figure is drawn twice, then all pixels are restored to their original values.

Parameters:
c1 - the XOR alternation color

getFont

public abstract Font getFont()
Gets the current font.
Returns:
this graphics context's current font.
See Also:
Font, setFont(java.awt.Font)

setFont

public abstract void setFont(Font font)
Sets this graphics context's font to the specified font. All subsequent text operations using this graphics context use this font.
Parameters:
font - the font.
See Also:
getFont(),
drawString(java.lang.String, int, int),
drawBytes(byte[], int, int, int, int),
drawChars(char[], int, int, int, int)

getFontMetrics

public FontMetrics getFontMetrics()
Gets the font metrics of the current font.
Returns:
the font metrics of this graphics context's current font.
See Also:
getFont(), FontMetrics, getFontMetrics(Font)

getFontMetrics

public abstract FontMetrics getFontMetrics(Font f)
Gets the font metrics for the specified font.
Parameters:
f - the specified font
Returns:
the font metrics for the specified font.
See Also:
getFont(), FontMetrics, getFontMetrics()

getClipBounds

public abstract Rectangle getClipBounds()
Returns the bounding rectangle of the current clipping area. This method refers to the user clip, which is independent of the clipping associated with device bounds and window visibility. If no clip has previously been set, or if the clip has been cleared using setClip(null), this method returns null. The coordinates in the rectangle are relative to the coordinate system origin of this graphics context.
Returns:
the bounding rectangle of the current clipping area, or null if no clip is set.
Since:
JDK1.1
See Also:
getClip(),
clipRect(int, int, int, int),
setClip(int, int, int, int),
setClip(Shape)

clipRect

public abstract void clipRect(int x,
                              int y,
                              int width,
                              int height)
Intersects the current clip with the specified rectangle. The resulting clipping area is the intersection of the current clipping area and the specified rectangle. If there is no current clipping area, either because the clip has never been set, or the clip has been cleared using setClip(null), the specified rectangle becomes the new clip. This method sets the user clip, which is independent of the clipping associated with device bounds and window visibility. This method can only be used to make the current clip smaller. To set the current clip larger, use any of the setClip methods. Rendering operations have no effect outside of the clipping area.
Parameters:
x - the x coordinate of the rectangle to intersect the clip with
y - the y coordinate of the rectangle to intersect the clip with
width - the width of the rectangle to intersect the clip with
height - the height of the rectangle to intersect the clip with
See Also:
setClip(int, int, int, int), setClip(Shape)

setClip

public abstract void setClip(int x,
                             int y,
                             int width,
                             int height)
Sets the current clip to the rectangle specified by the given coordinates. This method sets the user clip, which is independent of the clipping associated with device bounds and window visibility. Rendering operations have no effect outside of the clipping area.
Parameters:
x - the x coordinate of the new clip rectangle.
y - the y coordinate of the new clip rectangle.
width - the width of the new clip rectangle.
height - the height of the new clip rectangle.
Since:
JDK1.1
See Also:
clipRect(int, int, int, int), setClip(Shape)

getClip

public abstract Shape getClip()
Gets the current clipping area. This method returns the user clip, which is independent of the clipping associated with device bounds and window visibility. If no clip has previously been set, or if the clip has been cleared using setClip(null), this method returns null.
Returns:
a Shape object representing the current clipping area, or null if no clip is set.
Since:
JDK1.1
See Also:
getClipBounds(),
clipRect(int, int, int, int),
setClip(int, int, int, int),
setClip(Shape)

setClip

public abstract void setClip(Shape clip)
Sets the current clipping area to an arbitrary clip shape. Not all objects that implement the Shape interface can be used to set the clip. The only Shape objects that are guaranteed to be supported are Shape objects that are obtained via the getClip method and via Rectangle objects. This method sets the user clip, which is independent of the clipping associated with device bounds and window visibility.
Parameters:
clip - the Shape to use to set the clip
Since:
JDK1.1
See Also:
getClip(),
clipRect(int, int, int, int),
setClip(int, int, int, int)

copyArea

public abstract void copyArea(int x,
                              int y,
                              int width,
                              int height,
                              int dx,
                              int dy)
Copies an area of the component by a distance specified by dx and dy. From the point specified by x and y, this method copies downwards and to the right. To copy an area of the component to the left or upwards, specify a negative value for dx or dy. If a portion of the source rectangle lies outside the bounds of the component, or is obscured by another window or component, copyArea will be unable to copy the associated pixels. The area that is omitted can be refreshed by calling the component's paint method.
Parameters:
x - the x coordinate of the source rectangle.
y - the y coordinate of the source rectangle.
width - the width of the source rectangle.
height - the height of the source rectangle.
dx - the horizontal distance to copy the pixels.
dy - the vertical distance to copy the pixels.

drawLine

public abstract void drawLine(int x1,
                              int y1,
                              int x2,
                              int y2)
Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.

fillRect

public abstract void fillRect(int x,
                              int y,
                              int width,
                              int height)
Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height pixels tall. The rectangle is filled using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
See Also:
clearRect(int, int, int, int), drawRect(int, int, int, int)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
See Also:
fillRect(int, int, int, int), clearRect(int, int, int, int)

clearRect

public abstract void clearRect(int x,
                               int y,
                               int width,
                               int height)
Clears the specified rectangle by filling it with the background color of the current drawing surface. This operation does not use the current paint mode.

Beginning with Java 1.1, the background color of offscreen images may be system dependent. Applications should use setColor followed by fillRect to ensure that an offscreen image is cleared to a specific color.

Parameters:
x - the x coordinate of the rectangle to clear.
y - the y coordinate of the rectangle to clear.
width - the width of the rectangle to clear.
height - the height of the rectangle to clear.
See Also:
fillRect(int, int, int, int),
drawRect(int, int, int, int),
setColor(java.awt.Color),
setPaintMode(),
setXORMode(java.awt.Color)

drawRoundRect

public abstract void drawRoundRect(int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight)
Draws an outlined round-cornered rectangle using this graphics context's current color. The left and right edges of the rectangle are at x and x + width, respectively. The top and bottom edges of the rectangle are at y and y + height.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
fillRoundRect(int, int, int, int, int, int)

fillRoundRect

public abstract void fillRoundRect(int x,
                                   int y,
                                   int width,
                                   int height,
                                   int arcWidth,
                                   int arcHeight)
Fills the specified rounded corner rectangle with the current color. The left and right edges of the rectangle are at x and x + width - 1, respectively. The top and bottom edges of the rectangle are at y and y + height - 1.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
drawRoundRect(int, int, int, int, int, int)

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Draws a 3-D highlighted outline of the specified rectangle. The edges of the rectangle are highlighted so that they appear to be beveled and lit from the upper left corner.

The colors used for the highlighting effect are determined based on the current color. The resulting rectangle covers an area that is width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
See Also:
fill3DRect(int, int, int, int, boolean)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Paints a 3-D highlighted rectangle filled with the current color. The edges of the rectangle will be highlighted so that it appears as if the edges were beveled and lit from the upper left corner. The colors used for the highlighting effect will be determined from the current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
See Also:
draw3DRect(int, int, int, int, boolean)

drawOval

public abstract void drawOval(int x,
                              int y,
                              int width,
                              int height)
Draws the outline of an oval. The result is a circle or ellipse that fits within the rectangle specified by the x, y, width, and height arguments.

The oval covers an area that is width + 1 pixels wide and height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
See Also:
fillOval(int, int, int, int)

fillOval

public abstract void fillOval(int x,
                              int y,
                              int width,
                              int height)
Fills an oval bounded by the specified rectangle with the current color.
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
See Also:
drawOval(int, int, int, int)

drawArc

public abstract void drawArc(int x,
                             int y,
                             int width,
                             int height,
                             int startAngle,
                             int arcAngle)
Draws the outline of a circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (x, y) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

The angles are specified relative to the non-square extents of the bounding rectangle such that 45 degrees always falls on the line from the center of the ellipse to the upper right corner of the bounding rectangle. As a result, if the bounding rectangle is noticeably longer in one axis than the other, the angles to the start and end of the arc segment will be skewed farther along the longer axis of the bounds.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
fillArc(int, int, int, int, int, int)

fillArc

public abstract void fillArc(int x,
                             int y,
                             int width,
                             int height,
                             int startAngle,
                             int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (x, y) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

The angles are specified relative to the non-square extents of the bounding rectangle such that 45 degrees always falls on the line from the center of the ellipse to the upper right corner of the bounding rectangle. As a result, if the bounding rectangle is noticeably longer in one axis than the other, the angles to the start and end of the arc segment will be skewed farther along the longer axis of the bounds.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be filled.
y - the y coordinate of the upper-left corner of the arc to be filled.
width - the width of the arc to be filled.
height - the height of the arc to be filled.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
drawArc(int, int, int, int, int, int)

drawPolyline

public abstract void drawPolyline(int[] xPoints,
                                  int[] yPoints,
                                  int nPoints)
Draws a sequence of connected lines defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point. The figure is not closed if the first point differs from the last point.
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
Since:
JDK1.1
See Also:
drawPolygon(int[], int[], int)

drawPolygon

public abstract void drawPolygon(int[] xPoints,
                                 int[] yPoints,
                                 int nPoints)
Draws a closed polygon defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point.

This method draws the polygon defined by nPoint line segments, where the first nPoint - 1 line segments are line segments from (xPoints[i - 1], yPoints[i - 1]) to (xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.

Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
fillPolygon(int[], int[], int), drawPolyline(int[], int[], int)

drawPolygon

public void drawPolygon(Polygon p)
Draws the outline of a polygon defined by the specified Polygon object.
Parameters:
p - the polygon to draw.
See Also:
fillPolygon(int[], int[], int), drawPolyline(int[], int[], int)

fillPolygon

public abstract void fillPolygon(int[] xPoints,
                                 int[] yPoints,
                                 int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates.

This method draws the polygon defined by nPoint line segments, where the first nPoint - 1 line segments are line segments from (xPoints[i - 1], yPoints[i - 1]) to (xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.

The area inside the polygon is defined using an even-odd fill rule, also known as the alternating rule.

Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
drawPolygon(int[], int[], int)

fillPolygon

public void fillPolygon(Polygon p)
Fills the polygon defined by the specified Polygon object with the graphics context's current color.

The area inside the polygon is defined using an even-odd fill rule, also known as the alternating rule.

Parameters:
p - the polygon to fill.
See Also:
drawPolygon(int[], int[], int)

drawString

public abstract void drawString(String str,
                                int x,
                                int y)
Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the leftmost character is at position (x, y) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
See Also:
drawBytes(byte[], int, int, int, int), drawChars(char[], int, int, int, int)

drawString

public abstract void drawString(AttributedCharacterIterator iterator,
                                int x,
                                int y)
Draws the text given by the specified iterator, using this graphics context's current color. The iterator has to specify a font for each character. The baseline of the leftmost character is at position (x, y) in this graphics context's coordinate system.
Parameters:
iterator - the iterator whose text is to be drawn
x - the x coordinate.
y - the y coordinate.
See Also:
drawBytes(byte[], int, int, int, int), drawChars(char[], int, int, int, int)

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Draws the text given by the specified character array, using this graphics context's current font and color. The baseline of the first character is at position (x, y) in this graphics context's coordinate system.
Parameters:
data - the array of characters to be drawn
offset - the start offset in the data
length - the number of characters to be drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
drawBytes(byte[], int, int, int, int), drawString(java.lang.String, int, int)

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Draws the text given by the specified byte array, using this graphics context's current font and color. The baseline of the first character is at position (x, y) in this graphics context's coordinate system.
Parameters:
data - the data to be drawn
offset - the start offset in the data
length - the number of bytes that are drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
drawChars(char[], int, int, int, int), drawString(java.lang.String, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int x,
                                  int y,
                                  ImageObserver observer)
Draws as much of the specified image as is currently available. The image is drawn with its top-left corner at (x, y) in this graphics context's coordinate space. Transparent pixels in the image do not affect whatever pixels are already there.

This method returns immediately in all cases, even if the complete image has not yet been loaded, and it has not been dithered and converted for the current output device.

If the image has not yet been completely loaded, then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the specified image observer.

Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.

The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels do not affect whatever pixels are already there.

This method returns immediately in all cases, even if the entire image has not yet been scaled, dithered, and converted for the current output device. If the current output representation is not yet complete, then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the image observer by calling its imageUpdate method.

A scaled version of an image will not necessarily be available immediately just because an unscaled version of the image has been constructed for this output device. Each size of the image may be cached separately and generated from the original data in a separate image production sequence.

Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int x,
                                  int y,
                                  Color bgcolor,
                                  ImageObserver observer)
Draws as much of the specified image as is currently available. The image is drawn with its top-left corner at (x, y) in this graphics context's coordinate space. Transparent pixels are drawn in the specified background color.

This operation is equivalent to filling a rectangle of the width and height of the specified image with the given color and then drawing the image on top of it, but possibly more efficient.

This method returns immediately in all cases, even if the complete image has not yet been loaded, and it has not been dithered and converted for the current output device.

If the image has not yet been completely loaded, then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the specified image observer.

Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  Color bgcolor,
                                  ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.

The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels are drawn in the specified background color. This operation is equivalent to filling a rectangle of the width and height of the specified image with the given color and then drawing the image on top of it, but possibly more efficient.

This method returns immediately in all cases, even if the entire image has not yet been scaled, dithered, and converted for the current output device. If the current output representation is not yet complete then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the specified image observer.

A scaled version of an image will not necessarily be available immediately just because an unscaled version of the image has been constructed for this output device. Each size of the image may be cached separately and generated from the original data in a separate image production sequence.

Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int dx1,
                                  int dy1,
                                  int dx2,
                                  int dy2,
                                  int sx1,
                                  int sy1,
                                  int sx2,
                                  int sy2,
                                  ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface. Transparent pixels do not affect whatever pixels are already there.

This method returns immediately in all cases, even if the image area to be drawn has not yet been scaled, dithered, and converted for the current output device. If the current output representation is not yet complete then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the specified image observer.

This method always uses the unscaled version of the image to render the scaled rectangle and performs the required scaling on the fly. It does not use a cached, scaled version of the image for this operation. Scaling of the image from source to destination is performed such that the first coordinate of the source rectangle is mapped to the first coordinate of the destination rectangle, and the second source coordinate is mapped to the second destination coordinate. The subimage is scaled and flipped as needed to preserve those mappings.

Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
observer - object to be notified as more of the image is scaled and converted.
Since:
JDK1.1
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public abstract boolean drawImage(Image img,
                                  int dx1,
                                  int dy1,
                                  int dx2,
                                  int dy2,
                                  int sx1,
                                  int sy1,
                                  int sx2,
                                  int sy2,
                                  Color bgcolor,
                                  ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.

Transparent pixels are drawn in the specified background color. This operation is equivalent to filling a rectangle of the width and height of the specified image with the given color and then drawing the image on top of it, but possibly more efficient.

This method returns immediately in all cases, even if the image area to be drawn has not yet been scaled, dithered, and converted for the current output device. If the current output representation is not yet complete then drawImage returns false. As more of the image becomes available, the process that draws the image notifies the specified image observer.

This method always uses the unscaled version of the image to render the scaled rectangle and performs the required scaling on the fly. It does not use a cached, scaled version of the image for this operation. Scaling of the image from source to destination is performed such that the first coordinate of the source rectangle is mapped to the first coordinate of the destination rectangle, and the second source coordinate is mapped to the second destination coordinate. The subimage is scaled and flipped as needed to preserve those mappings.

Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is scaled and converted.
Since:
JDK1.1
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

dispose

public abstract void dispose()
Disposes of this graphics context and releases any system resources that it is using. A Graphics object cannot be used after disposehas been called.

When a Java program runs, a large number of Graphics objects can be created within a short time frame. Although the finalization process of the garbage collector also disposes of the same system resources, it is preferable to manually free the associated resources by calling this method rather than to rely on a finalization process which may not run to completion for a long period of time.

Graphics objects which are provided as arguments to the paint and update methods of components are automatically released by the system when those methods return. For efficiency, programmers should call dispose when finished using a Graphics object only if it was created directly from a component or another Graphics object.

See Also:
finalize(),
Component.paint(java.awt.Graphics),
Component.update(java.awt.Graphics),
Component.getGraphics(),
create()

finalize

public void finalize()
Disposes of this graphics context once it is no longer referenced.
Overrides:
finalize in class Object
See Also:
dispose()

toString

public String toString()
Returns a String object representing this Graphics object's value.
Overrides:
toString in class Object
Returns:
a string representation of this graphics context.

getClipRect

public Rectangle getClipRect()
Deprecated. As of JDK version 1.1, replaced by getClipBounds().

hitClip

public boolean hitClip(int x,
                       int y,
                       int width,
                       int height)
Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area. The coordinates in the rectangle are relative to the coordinate system origin of this graphics context.
Parameters:
x - the x coordinate of the rectangle to test against the clip
y - the y coordinate of the rectangle to test against the clip
width - the width of the rectangle to test against the clip
height - the height of the rectangle to test against the clip

getClipBounds

public Rectangle getClipBounds(Rectangle r)
Returns the bounding rectangle of the current clipping area. The coordinates in the rectangle are relative to the coordinate system origin of this graphics context. This method differs from getClipBounds in that an existing rectangle is used instead of allocating a new one. This method refers to the user clip, which is independent of the clipping associated with device bounds and window visibility. If no clip has previously been set, or if the clip has been cleared using setClip(null), this method returns the specified Rectangle.
Parameters:
r - the rectangle where the current clipping area is copied to. Any current values in this rectangle are overwritten.
Returns:
the bounding rectangle of the current clipping area.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Graphics2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Graphics2D

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--java.awt.Graphics2D
public abstract class Graphics2D
extends Graphics

This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout. This is the fundamental class for rendering 2-dimensional shapes, text and images on the Java(tm) platform.

Coordinate Spaces

All coordinates passed to a Graphics2D object are specified in a device-independent coordinate system called User Space, which is used by applications. The Graphics2D object contains an AffineTransform object as part of its rendering state that defines how to convert coordinates from user space to device-dependent coordinates in Device Space.

Coordinates in device space usually refer to individual device pixels and are aligned on the infinitely thin gaps between these pixels. Some Graphics2D objects can be used to capture rendering operations for storage into a graphics metafile for playback on a concrete device of unknown physical resolution at a later time. Since the resolution might not be known when the rendering operations are captured, the Graphics2D Transform is set up to transform user coordinates to a virtual device space that approximates the expected resolution of the target device. Further transformations might need to be applied at playback time if the estimate is incorrect.

Some of the operations performed by the rendering attribute objects occur in the device space, but all Graphics2D methods take user space coordinates.

Every Graphics2D object is associated with a target that defines where rendering takes place. A GraphicsConfiguration object defines the characteristics of the rendering target, such as pixel format and resolution. The same rendering target is used throughout the life of a Graphics2D object.

When creating a Graphics2D object, the GraphicsConfiguration specifies the default transform for the target of the Graphics2D (a Component or Image). This default transform maps the user space coordinate system to screen and printer device coordinates such that the origin maps to the upper left hand corner of the target region of the device with increasing X coordinates extending to the right and increasing Y coordinates extending downward. The scaling of the default transform is set to identity for those devices that are close to 72 dpi, such as screen devices. The scaling of the default transform is set to approximately 72 user space coordinates per square inch for high resolution devices, such as printers. For image buffers, the default transform is the Identity transform.

Rendering Process

The Rendering Process can be broken down into four phases that are controlled by the Graphics2D rendering attributes. The renderer can optimize many of these steps, either by caching the results for future calls, by collapsing multiple virtual steps into a single operation, or by recognizing various attributes as common simple cases that can be eliminated by modifying other parts of the operation.

The steps in the rendering process are:

  1. Determine what to render.
  2. Constrain the rendering operation to the current Clip. The Clip is specified by a Shape in user space and is controlled by the program using the various clip manipulation methods of Graphics and Graphics2D. This user clip is transformed into device space by the current Transform and combined with the device clip, which is defined by the visibility of windows and device extents. The combination of the user clip and device clip defines the composite clip, which determines the final clipping region. The user clip is not modified by the rendering system to reflect the resulting composite clip.
  3. Determine what colors to render.
  4. Apply the colors to the destination drawing surface using the current Composite attribute in the Graphics2D context.

The three types of rendering operations, along with details of each of their particular rendering processes are:
  1. Shape operations
    1. If the operation is a draw(Shape) operation, then the createStrokedShape method on the current Stroke attribute in the Graphics2D context is used to construct a new Shape object that contains the outline of the specified Shape.
    2. The Shape is transformed from user space to device space using the current Transform in the Graphics2D context.
    3. The outline of the Shape is extracted using the getPathIterator method of Shape, which returns a PathIterator object that iterates along the boundary of the Shape.
    4. If the Graphics2D object cannot handle the curved segments that the PathIterator object returns then it can call the alternate getPathIterator method of Shape, which flattens the Shape.
    5. The current Paint in the Graphics2D context is queried for a PaintContext, which specifies the colors to render in device space.
  2. Text operations
    1. The following steps are used to determine the set of glyphs required to render the indicated String:
      1. If the argument is a String, then the current Font in the Graphics2D context is asked to convert the Unicode characters in the String into a set of glyphs for presentation with whatever basic layout and shaping algorithms the font implements.
      2. If the argument is an AttributedCharacterIterator, the iterator is asked to convert itself to a TextLayout using its embedded font attributes. The TextLayout implements more sophisticated glyph layout algorithms that perform Unicode bi-directional layout adjustments automatically for multiple fonts of differing writing directions.
      3. If the argument is a GlyphVector, then the GlyphVector object already contains the appropriate font-specific glyph codes with explicit coordinates for the position of each glyph.
    2. The current Font is queried to obtain outlines for the indicated glyphs. These outlines are treated as shapes in user space relative to the position of each glyph that was determined in step 1.
    3. The character outlines are filled as indicated above under Shape operations.
    4. The current Paint is queried for a PaintContext, which specifies the colors to render in device space.
  3. Image Operations
    1. The region of interest is defined by the bounding box of the source Image. This bounding box is specified in Image Space, which is the Image object's local coordinate system.
    2. If an AffineTransform is passed to drawImage(Image, AffineTransform, ImageObserver), the AffineTransform is used to transform the bounding box from image space to user space. If no AffineTransform is supplied, the bounding box is treated as if it is already in user space.
    3. The bounding box of the source Image is transformed from user space into device space using the current Transform. Note that the result of transforming the bounding box does not necessarily result in a rectangular region in device space.
    4. The Image object determines what colors to render, sampled according to the source to destination coordinate mapping specified by the current Transform and the optional image transform.

Default Rendering Attributes

The default values for the Graphics2D rendering attributes are:
Paint
The color of the Component.
Font
The Font of the Component.
Stroke
A square pen with a linewidth of 1, no dashing, miter segment joins and square end caps.
Transform
The getDefaultTransform for the GraphicsConfiguration of the Component.
Composite
The AlphaComposite.SRC_OVER rule.
Clip
No rendering Clip, the output is clipped to the Component.

Rendering Compatibility Issues

The JDK(tm) 1.1 rendering model is based on a pixelization model that specifies that coordinates are infinitely thin, lying between the pixels. Drawing operations are performed using a one-pixel wide pen that fills the pixel below and to the right of the anchor point on the path. The JDK 1.1 rendering model is consistent with the capabilities of most of the existing class of platform renderers that need to resolve integer coordinates to a discrete pen that must fall completely on a specified number of pixels.

The Java 2D(tm) (Java(tm) 2 platform) API supports antialiasing renderers. A pen with a width of one pixel does not need to fall completely on pixel N as opposed to pixel N+1. The pen can fall partially on both pixels. It is not necessary to choose a bias direction for a wide pen since the blending that occurs along the pen traversal edges makes the sub-pixel position of the pen visible to the user. On the other hand, when antialiasing is turned off by setting the KEY_ANTIALIASING hint key to the VALUE_ANTIALIAS_OFF hint value, the renderer might need to apply a bias to determine which pixel to modify when the pen is straddling a pixel boundary, such as when it is drawn along an integer coordinate in device space. While the capabilities of an antialiasing renderer make it no longer necessary for the rendering model to specify a bias for the pen, it is desirable for the antialiasing and non-antialiasing renderers to perform similarly for the common cases of drawing one-pixel wide horizontal and vertical lines on the screen. To ensure that turning on antialiasing by setting the KEY_ANTIALIASING hint key to VALUE_ANTIALIAS_ON does not cause such lines to suddenly become twice as wide and half as opaque, it is desirable to have the model specify a path for such lines so that they completely cover a particular set of pixels to help increase their crispness.

Java 2D API maintains compatibility with JDK 1.1 rendering behavior, such that legacy operations and existing renderer behavior is unchanged under Java 2D API. Legacy methods that map onto general draw and fill methods are defined, which clearly indicates how Graphics2D extends Graphics based on settings of Stroke and Transform attributes and rendering hints. The definition performs identically under default attribute settings. For example, the default Stroke is a BasicStroke with a width of 1 and no dashing and the default Transform for screen drawing is an Identity transform.

The following two rules provide predictable rendering behavior whether aliasing or antialiasing is being used.

  • Device coordinates are defined to be between device pixels which avoids any inconsistent results between aliased and antaliased rendering. If coordinates were defined to be at a pixel's center, some of the pixels covered by a shape, such as a rectangle, would only be half covered. With aliased rendering, the half covered pixels would either be rendered inside the shape or outside the shape. With anti-aliased rendering, the pixels on the entire edge of the shape would be half covered. On the other hand, since coordinates are defined to be between pixels, a shape like a rectangle would have no half covered pixels, whether or not it is rendered using antialiasing.
  • Lines and paths stroked using the BasicStroke object may be "normalized" to provide consistent rendering of the outlines when positioned at various points on the drawable and whether drawn with aliased or antialiased rendering. This normalization process is controlled by the KEY_STROKE_CONTROL hint. The exact normalization algorithm is not specified, but the goals of this normalization are to ensure that lines are rendered with consistent visual appearance regardless of how they fall on the pixel grid and to promote more solid horizontal and vertical lines in antialiased mode so that they resemble their non-antialiased counterparts more closely. A typical normalization step might promote antialiased line endpoints to pixel centers to reduce the amount of blending or adjust the subpixel positioning of non-antialiased lines so that the floating point line widths round to even or odd pixel counts with equal likelihood. This process can move endpoints by up to half a pixel (usually towards positive infinity along both axes) to promote these consistent results.

The following definitions of general legacy methods perform identically to previously specified behavior under default attribute settings:

  • For fill operations, including fillRect, fillRoundRect, fillOval, fillArc, fillPolygon, and clearRect, fill can now be called with the desired Shape. For example, when filling a rectangle:
     fill(new Rectangle(x, y, w, h));
    is called.

  • Similarly, for draw operations, including drawLine, drawRect, drawRoundRect, drawOval, drawArc, drawPolyline, and drawPolygon, draw can now be called with the desired Shape. For example, when drawing a rectangle:
     draw(new Rectangle(x, y, w, h));
    is called.

  • The draw3DRect and fill3DRect methods were implemented in terms of the drawLine and fillRect methods in the Graphics class which would predicate their behavior upon the current Stroke and Paint objects in a Graphics2D context. This class overrides those implementations with versions that use the current Color exclusively, overriding the current Paint and which uses fillRect to describe the exact same behavior as the preexisting methods regardless of the setting of the current Stroke.
The Graphics class defines only the setColor method to control the color to be painted. Since the Java 2D API extends the Color object to implement the new Paint interface, the existing setColor method is now a convenience method for setting the current Paint attribute to a Color object. setColor(c) is equivalent to setPaint(c).

The Graphics class defines two methods for controlling how colors are applied to the destination.

  1. The setPaintMode method is implemented as a convenience method to set the default Composite, equivalent to setComposite(new AlphaComposite.SrcOver).
  2. The setXORMode(Color xorcolor) method is implemented as a convenience method to set a special Composite object that ignores the Alpha components of source colors and sets the destination color to the value:
     dstpixel = (PixelOf(srccolor) ^ PixelOf(xorcolor) ^ dstpixel);

See Also:
RenderingHints

Constructor Summary
protected Graphics2D()
Constructs a new Graphics2D object.
Method Summary
abstract void | addRenderingHints(Map hints) Sets the values of an arbitrary number of preferences for the rendering algorithms.
abstract void | clip(Shape s) Intersects the current Clip with the interior of the specified Shape and sets the Clip to the resulting intersection.
abstract void | draw(Shape s) Strokes the outline of a Shape using the settings of the current Graphics2D context.
void | draw3DRect(int x, int y, int width, int height, boolean raised) Draws a 3-D highlighted outline of the specified rectangle.
abstract void | drawGlyphVector(GlyphVector g, float x, float y) Renders the text of the specified GlyphVector using the Graphics2D context's rendering attributes.
abstract void | drawImage(BufferedImage img, BufferedImageOp op, int x, int y) Renders a BufferedImage that is filtered with a BufferedImageOp.
abstract boolean | drawImage(Image img, AffineTransform xform, ImageObserver obs) Renders an image, applying a transform from image space into user space before drawing.
abstract void | drawRenderableImage(RenderableImage img, AffineTransform xform) Renders a RenderableImage, applying a transform from image space into user space before drawing.
abstract void | drawRenderedImage(RenderedImage img, AffineTransform xform) Renders a RenderedImage, applying a transform from image space into user space before drawing.
abstract void | drawString(AttributedCharacterIterator iterator, float x, float y) Renders the text of the specified iterator, using the Graphics2D context's current Paint.
abstract void | drawString(AttributedCharacterIterator iterator, int x, int y) Renders the text of the specified iterator, using the Graphics2D context's current Paint.
abstract void | drawString(String s, float x, float y) Renders the text specified by the specified String, using the current Font and Paint attributes in the Graphics2D context.
abstract void | drawString(String str, int x, int y) Renders the text of the specified String, using the current Font and Paint attributes in the Graphics2D context.
abstract void | fill(Shape s) Fills the interior of a Shape using the settings of the Graphics2D context.
void | fill3DRect(int x, int y, int width, int height, boolean raised) Paints a 3-D highlighted rectangle filled with the current color.
abstract Color | getBackground() Returns the background color used for clearing a region.
abstract Composite | getComposite() Returns the current Composite in the Graphics2D context.
abstract GraphicsConfiguration | getDeviceConfiguration() Returns the device configuration associated with this Graphics2D.
abstract FontRenderContext | getFontRenderContext() Get the rendering context of the Font within this Graphics2D context.
abstract Paint | getPaint() Returns the current Paint of the Graphics2D context.
abstract Object | getRenderingHint(RenderingHints.Key hintKey) Returns the value of a single preference for the rendering algorithms.
abstract RenderingHints | getRenderingHints() Gets the preferences for the rendering algorithms.
abstract Stroke | getStroke() Returns the current Stroke in the Graphics2D context.
abstract AffineTransform | getTransform() Returns a copy of the current Transform in the Graphics2D context.
abstract boolean | hit(Rectangle rect, Shape s, boolean onStroke) Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space.
abstract void | rotate(double theta) Concatenates the current Graphics2D Transform with a rotation transform.
abstract void | rotate(double theta, double x, double y) Concatenates the current Graphics2D Transform with a translated rotation transform.
abstract void | scale(double sx, double sy) Concatenates the current Graphics2D Transform with a scaling transformation Subsequent rendering is resized according to the specified scaling factors relative to the previous scaling.
abstract void | setBackground(Color color) Sets the background color for the Graphics2D context.
abstract void | setComposite(Composite comp) Sets the Composite for the Graphics2D context.
abstract void | setPaint(Paint paint) Sets the Paint attribute for the Graphics2D context.
abstract void | setRenderingHint(RenderingHints.Key hintKey, Object hintValue) Sets the value of a single preference for the rendering algorithms.
abstract void | setRenderingHints(Map hints) Replaces the values of all preferences for the rendering algorithms with the specified hints.
abstract void | setStroke(Stroke s) Sets the Stroke for the Graphics2D context.
abstract void | setTransform(AffineTransform Tx) Sets the Transform in the Graphics2D context.
abstract void | shear(double shx, double shy) Concatenates the current Graphics2D Transform with a shearing transform.
abstract void | transform(AffineTransform Tx) Composes an AffineTransform object with the Transform in this Graphics2D according to the rule last-specified-first-applied.
abstract void | translate(double tx, double ty) Concatenates the current Graphics2D Transform with a translation transform.
abstract void | translate(int x, int y) Translates the origin of the Graphics2D context to the point (x, y) in the current coordinate system.
Methods inherited from class java.awt.Graphics
clearRect, clipRect, copyArea, create, create, dispose, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Graphics2D

protected Graphics2D()
Constructs a new Graphics2D object. Since Graphics2D is an abstract class, and since it must be customized by subclasses for different output devices, Graphics2D objects cannot be created directly. Instead, Graphics2D objects must be obtained from another Graphics2D object, created by a Component, or obtained from images such as BufferedImage objects.
See Also:
Component.getGraphics(), Graphics.create()
Method Detail

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Draws a 3-D highlighted outline of the specified rectangle. The edges of the rectangle are highlighted so that they appear to be beveled and lit from the upper left corner.

The colors used for the highlighting effect are determined based on the current color. The resulting rectangle covers an area that is width + 1 pixels wide by height + 1 pixels tall. This method uses the current Color exclusively and ignores the current Paint.

Overrides:
draw3DRect in class Graphics
Parameters:
x, y - the coordinates of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
See Also:
Graphics.fill3DRect(int, int, int, int, boolean)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Paints a 3-D highlighted rectangle filled with the current color. The edges of the rectangle are highlighted so that it appears as if the edges were beveled and lit from the upper left corner. The colors used for the highlighting effect and for filling are determined from the current Color. This method uses the current Color exclusively and ignores the current Paint.
Overrides:
fill3DRect in class Graphics
Parameters:
x, y - the coordinates of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
See Also:
Graphics.draw3DRect(int, int, int, int, boolean)

draw

public abstract void draw(Shape s)
Strokes the outline of a Shape using the settings of the current Graphics2D context. The rendering attributes applied include the Clip, Transform, Paint, Composite and Stroke attributes.
Parameters:
s - the Shape to be rendered
See Also:
setStroke(java.awt.Stroke),
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int),
setComposite(java.awt.Composite)

drawImage

public abstract boolean drawImage(Image img,
                                  AffineTransform xform,
                                  ImageObserver obs)
Renders an image, applying a transform from image space into user space before drawing. The transformation from user space into device space is done with the current Transform in the Graphics2D. The specified transformation is applied to the image before the transform attribute in the Graphics2D context is applied. The rendering attributes applied include the Clip, Transform, and Composite attributes. Note that no rendering is done if the specified transform is noninvertible.
Parameters:
img - the Image to be rendered
xform - the transformation from image space into user space
obs - the ImageObserver to be notified as more of the Image is converted
Returns:
true if the Image is fully loaded and completely rendered; false if the Image is still being loaded.
See Also:
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int)

drawImage

public abstract void drawImage(BufferedImage img,
                               BufferedImageOp op,
                               int x,
                               int y)
Renders a BufferedImage that is filtered with a BufferedImageOp. The rendering attributes applied include the Clip, Transform and Composite attributes. This is equivalent to:
 img1 = op.filter(img, null);
 drawImage(img1, new AffineTransform(1f,0f,0f,1f,x,y), null);
Parameters:
op - the filter to be applied to the image before rendering
img - the BufferedImage to be rendered
x, y - the location in user space where the upper left corner of the image is rendered
See Also:
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int)

drawRenderedImage

public abstract void drawRenderedImage(RenderedImage img,
                                       AffineTransform xform)
Renders a RenderedImage, applying a transform from image space into user space before drawing. The transformation from user space into device space is done with the current Transform in the Graphics2D. The specified transformation is applied to the image before the transform attribute in the Graphics2D context is applied. The rendering attributes applied include the Clip, Transform, and Composite attributes. Note that no rendering is done if the specified transform is noninvertible.
Parameters:
img - the image to be rendered
xform - the transformation from image space into user space
See Also:
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int)

drawRenderableImage

public abstract void drawRenderableImage(RenderableImage img,
                                         AffineTransform xform)
Renders a RenderableImage, applying a transform from image space into user space before drawing. The transformation from user space into device space is done with the current Transform in the Graphics2D. The specified transformation is applied to the image before the transform attribute in the Graphics2D context is applied. The rendering attributes applied include the Clip, Transform, and Composite attributes. Note that no rendering is done if the specified transform is noninvertible.

Rendering hints set on the Graphics2D object might be used in rendering the RenderableImage. If explicit control is required over specific hints recognized by a specific RenderableImage, or if knowledge of which hints are used is required, then a RenderedImage should be obtained directly from the RenderableImage and rendered using drawRenderedImage.

Parameters:
img - the image to be rendered
xform - the transformation from image space into user space
See Also:
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int),
drawRenderedImage(java.awt.image.RenderedImage, java.awt.geom.AffineTransform)

drawString

public abstract void drawString(String str,
                                int x,
                                int y)
Renders the text of the specified String, using the current Font and Paint attributes in the Graphics2D context. The baseline of the first character is at position (x, y) in the User Space. The rendering attributes applied include the Clip, Transform, Paint, Font and Composite attributes. For characters in script systems such as Hebrew and Arabic, the glyphs can be rendered from right to left, in which case the coordinate supplied is the location of the leftmost character on the baseline.
Overrides:
drawString in class Graphics
Parameters:
str - the string to be rendered
x, y - the coordinates where the String should be rendered
Throws:
NullPointerException - if str is null
Since:
JDK1.0
See Also:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

drawString

public abstract void drawString(String s,
                                float x,
                                float y)
Renders the text specified by the specified String, using the current Font and Paint attributes in the Graphics2D context. The baseline of the first character is at position (x, y) in the User Space. The rendering attributes applied include the Clip, Transform, Paint, Font and Composite attributes. For characters in script systems such as Hebrew and Arabic, the glyphs can be rendered from right to left, in which case the coordinate supplied is the location of the leftmost character on the baseline.
Parameters:
s - the String to be rendered
x, y - the coordinates where the String should be rendered
Throws:
NullPointerException - if str is null
See Also:
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
Graphics.setFont(java.awt.Font),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
Graphics.setClip(int, int, int, int)

drawString

public abstract void drawString(AttributedCharacterIterator iterator,
                                int x,
                                int y)
Renders the text of the specified iterator, using the Graphics2D context's current Paint. The iterator has to specify a font for each character. The baseline of the first character is at position (x, y) in the User Space. The rendering attributes applied include the Clip, Transform, Paint, and Composite attributes. For characters in script systems such as Hebrew and Arabic, the glyphs can be rendered from right to left, in which case the coordinate supplied is the location of the leftmost character on the baseline.
Overrides:
drawString in class Graphics
Parameters:
iterator - the iterator whose text is to be rendered
x, y - the coordinates where the iterator's text is to be rendered
See Also:
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
Graphics.setClip(int, int, int, int)

drawString

public abstract void drawString(AttributedCharacterIterator iterator,
                                float x,
                                float y)
Renders the text of the specified iterator, using the Graphics2D context's current Paint. The iterator must specify a font for each character. The baseline of the first character is at position (x, y) in the User Space. The rendering attributes applied include the Clip, Transform, Paint, and Composite attributes. For characters in script systems such as Hebrew and Arabic, the glyphs can be rendered from right to left, in which case the coordinate supplied is the location of the leftmost character on the baseline.
Parameters:
iterator - the iterator whose text is to be rendered
x, y - the coordinates where the iterator's text is to be rendered
See Also:
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
Graphics.setClip(int, int, int, int)

drawGlyphVector

public abstract void drawGlyphVector(GlyphVector g,
                                     float x,
                                     float y)
Renders the text of the specified GlyphVector using the Graphics2D context's rendering attributes. The rendering attributes applied include the Clip, Transform, Paint, and Composite attributes. The GlyphVector specifies individual glyphs from a Font. The GlyphVector can also contain the glyph positions. This is the fastest way to render a set of characters to the screen.
Parameters:
g - the GlyphVector to be rendered
x, y - the position in User Space where the glyphs should be rendered
See Also:
java.awt.font,
GlyphVector,
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
Graphics.setClip(int, int, int, int)

fill

public abstract void fill(Shape s)
Fills the interior of a Shape using the settings of the Graphics2D context. The rendering attributes applied include the Clip, Transform, Paint, and Composite.
Parameters:
s - the Shape to be filled
See Also:
setPaint(java.awt.Paint),
Graphics.setColor(java.awt.Color),
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
setComposite(java.awt.Composite),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int)

hit

public abstract boolean hit(Rectangle rect,
                            Shape s,
                            boolean onStroke)
Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space. If onStroke is false, this method checks whether or not the interior of the specified Shape intersects the specified Rectangle. If onStroke is true, this method checks whether or not the Stroke of the specified Shape outline intersects the specified Rectangle. The rendering attributes taken into account include the Clip, Transform, and Stroke attributes.
Parameters:
rect - the area in device space to check for a hit
s - the Shape to check for a hit
onStroke - flag used to choose between testing the stroked or the filled shape. If the flag is true, the Stroke oultine is tested. If the flag is false, the filled Shape is tested.
Returns:
true if there is a hit; false otherwise.
See Also:
setStroke(java.awt.Stroke),
fill(java.awt.Shape),
draw(java.awt.Shape),
transform(java.awt.geom.AffineTransform),
setTransform(java.awt.geom.AffineTransform),
clip(java.awt.Shape),
Graphics.setClip(int, int, int, int)

getDeviceConfiguration

public abstract GraphicsConfiguration getDeviceConfiguration()
Returns the device configuration associated with this Graphics2D.

setComposite

public abstract void setComposite(Composite comp)
Sets the Composite for the Graphics2D context. The Composite is used in all drawing methods such as drawImage, drawString, draw, and fill. It specifies how new pixels are to be combined with the existing pixels on the graphics device during the rendering process.

If this Graphics2D context is drawing to a Component on the display screen and the Composite is a custom object rather than an instance of the AlphaComposite class, and if there is a security manager, its checkPermission method is called with an AWTPermission("readDisplayPixels") permission.

Parameters:
comp - the Composite object to be used for rendering
Throws:
SecurityException - if a custom Composite object is being used to render to the screen and a security manager is set and its checkPermission method does not allow the operation.
See Also:
Graphics.setXORMode(java.awt.Color), Graphics.setPaintMode(), AlphaComposite, SecurityManager.checkPermission(java.security.Permission), AWTPermission

setPaint

public abstract void setPaint(Paint paint)
Sets the Paint attribute for the Graphics2D context. Calling this method with a null Paint object does not have any effect on the current Paint attribute of this Graphics2D.
Parameters:
paint - the Paint object to be used to generate color during the rendering process, or null
See Also:
Graphics.setColor(java.awt.Color), GradientPaint, TexturePaint

setStroke

public abstract void setStroke(Stroke s)
Sets the Stroke for the Graphics2D context.
Parameters:
s - the Stroke object to be used to stroke a Shape during the rendering process
See Also:
BasicStroke

setRenderingHint

public abstract void setRenderingHint(RenderingHints.Key hintKey,
                                      Object hintValue)
Sets the value of a single preference for the rendering algorithms. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Refer to the RenderingHints class for definitions of some common keys and values.
Parameters:
hintKey - the key of the hint to be set.
hintValue - the value indicating preferences for the specified hint category.
See Also:
RenderingHints

getRenderingHint

public abstract Object getRenderingHint(RenderingHints.Key hintKey)
Returns the value of a single preference for the rendering algorithms. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Refer to the RenderingHints class for definitions of some common keys and values.
Parameters:
hintKey - the key corresponding to the hint to get.
Returns:
an object representing the value for the specified hint key. Some of the keys and their associated values are defined in the RenderingHints class.
See Also:
RenderingHints

setRenderingHints

public abstract void setRenderingHints(Map hints)
Replaces the values of all preferences for the rendering algorithms with the specified hints. The existing values for all rendering hints are discarded and the new set of known hints and values are initialized from the specified Map object. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Refer to the RenderingHints class for definitions of some common keys and values.
Parameters:
hints - the rendering hints to be set
See Also:
RenderingHints

addRenderingHints

public abstract void addRenderingHints(Map hints)
Sets the values of an arbitrary number of preferences for the rendering algorithms. Only values for the rendering hints that are present in the specified Map object are modified. All other preferences not present in the specified object are left unmodified. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Refer to the RenderingHints class for definitions of some common keys and values.
Parameters:
hints - the rendering hints to be set
See Also:
RenderingHints

getRenderingHints

public abstract RenderingHints getRenderingHints()
Gets the preferences for the rendering algorithms. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Returns all of the hint key/value pairs that were ever specified in one operation. Refer to the RenderingHints class for definitions of some common keys and values.
Returns:
a reference to an instance of RenderingHints that contains the current preferences.
See Also:
RenderingHints

translate

public abstract void translate(int x,
                               int y)
Translates the origin of the Graphics2D context to the point (x, y) in the current coordinate system. Modifies the Graphics2D context so that its new origin corresponds to the point (x, y) in the Graphics2D context's former coordinate system. All coordinates used in subsequent rendering operations on this graphics context are relative to this new origin.
Overrides:
translate in class Graphics
Parameters:
x, y - the specified coordinates
Since:
JDK1.0

translate

public abstract void translate(double tx,
                               double ty)
Concatenates the current Graphics2D Transform with a translation transform. Subsequent rendering is translated by the specified distance relative to the previous position. This is equivalent to calling transform(T), where T is an AffineTransform represented by the following matrix:
        [   1    0    tx  ]
        [   0    1    ty  ]
        [   0    0    1   ]
Parameters:
tx - the distance to translate along the x-axis
ty - the distance to translate along the y-axis

rotate

public abstract void rotate(double theta)
Concatenates the current Graphics2D Transform with a rotation transform. Subsequent rendering is rotated by the specified radians relative to the previous origin. This is equivalent to calling transform(R), where R is an AffineTransform represented by the following matrix:
        [   cos(theta)    -sin(theta)    0   ]
        [   sin(theta)     cos(theta)    0   ]
        [       0              0         1   ]
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians

rotate

public abstract void rotate(double theta,
                            double x,
                            double y)
Concatenates the current Graphics2D Transform with a translated rotation transform. Subsequent rendering is transformed by a transform which is constructed by translating to the specified location, rotating by the specified radians, and translating back by the same amount as the original translation. This is equivalent to the following sequence of calls:
        translate(x, y);
        rotate(theta);
        translate(-x, -y);
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians
x, y - coordinates of the origin of the rotation

scale

public abstract void scale(double sx,
                           double sy)
Concatenates the current Graphics2D Transform with a scaling transformation Subsequent rendering is resized according to the specified scaling factors relative to the previous scaling. This is equivalent to calling transform(S), where S is an AffineTransform represented by the following matrix:
        [   sx   0    0   ]
        [   0    sy   0   ]
        [   0    0    1   ]
Parameters:
sx - the amount by which X coordinates in subsequent rendering operations are multiplied relative to previous rendering operations.
sy - the amount by which Y coordinates in subsequent rendering operations are multiplied relative to previous rendering operations.

shear

public abstract void shear(double shx,
                           double shy)
Concatenates the current Graphics2D Transform with a shearing transform. Subsequent renderings are sheared by the specified multiplier relative to the previous position. This is equivalent to calling transform(SH), where SH is an AffineTransform represented by the following matrix:
        [   1   shx   0   ]
        [  shy   1    0   ]
        [   0    0    1   ]
Parameters:
shx - the multiplier by which coordinates are shifted in the positive X axis direction as a function of their Y coordinate
shy - the multiplier by which coordinates are shifted in the positive Y axis direction as a function of their X coordinate

transform

public abstract void transform(AffineTransform Tx)
Composes an AffineTransform object with the Transform in this Graphics2D according to the rule last-specified-first-applied. If the current Transform is Cx, the result of composition with Tx is a new Transform Cx'. Cx' becomes the current Transform for this Graphics2D. Transforming a point p by the updated Transform Cx' is equivalent to first transforming p by Tx and then transforming the result by the original Transform Cx. In other words, Cx'(p) = Cx(Tx(p)). A copy of the Tx is made, if necessary, so further modifications to Tx do not affect rendering.
Parameters:
Tx - the AffineTransform object to be composed with the current Transform
See Also:
setTransform(java.awt.geom.AffineTransform), AffineTransform

setTransform

public abstract void setTransform(AffineTransform Tx)
Sets the Transform in the Graphics2D context.
Parameters:
Tx - the AffineTransform object to be used in the rendering process
See Also:
transform(java.awt.geom.AffineTransform), AffineTransform

getTransform

public abstract AffineTransform getTransform()
Returns a copy of the current Transform in the Graphics2D context.
Returns:
the current AffineTransform in the Graphics2D context.
See Also:
transform(java.awt.geom.AffineTransform), setTransform(java.awt.geom.AffineTransform)

getPaint

public abstract Paint getPaint()
Returns the current Paint of the Graphics2D context.
Returns:
the current Graphics2D Paint, which defines a color or pattern.
See Also:
setPaint(java.awt.Paint), Graphics.setColor(java.awt.Color)

getComposite

public abstract Composite getComposite()
Returns the current Composite in the Graphics2D context.
Returns:
the current Graphics2D Composite, which defines a compositing style.
See Also:
setComposite(java.awt.Composite)

setBackground

public abstract void setBackground(Color color)
Sets the background color for the Graphics2D context. The background color is used for clearing a region. When a Graphics2D is constructed for a Component, the background color is inherited from the Component. Setting the background color in the Graphics2D context only affects the subsequent clearRect calls and not the background color of the Component. To change the background of the Component, use appropriate methods of the Component.
Parameters:
color - the background color that isused in subsequent calls to clearRect
See Also:
getBackground(), Graphics.clearRect(int, int, int, int)

getBackground

public abstract Color getBackground()
Returns the background color used for clearing a region.
Returns:
the current Graphics2D Color, which defines the background color.
See Also:
setBackground(java.awt.Color)

getStroke

public abstract Stroke getStroke()
Returns the current Stroke in the Graphics2D context.
Returns:
the current Graphics2D Stroke, which defines the line style.
See Also:
setStroke(java.awt.Stroke)

clip

public abstract void clip(Shape s)
Intersects the current Clip with the interior of the specified Shape and sets the Clip to the resulting intersection. The specified Shape is transformed with the current Graphics2D Transform before being intersected with the current Clip. This method is used to make the current Clip smaller. To make the Clip larger, use setClip. The user clip modified by this method is independent of the clipping associated with device bounds and visibility. If no clip has previously been set, or if the clip has been cleared using setClip with a null argument, the specified Shape becomes the new user clip.
Parameters:
s - the Shape to be intersected with the current Clip. If s is null, this method clears the current Clip.

getFontRenderContext

public abstract FontRenderContext getFontRenderContext()
Get the rendering context of the Font within this Graphics2D context. The FontRenderContext encapsulates application hints such as anti-aliasing and fractional metrics, as well as target device specific information such as dots-per-inch. This information should be provided by the application when using objects that perform typographical formatting, such as Font and TextLayout. This information should also be provided by applications that perform their own layout and need accurate measurements of various characteristics of glyphs such as advance and line height when various rendering hints have been applied to the text rendering.
Returns:
a reference to an instance of FontRenderContext.
Since:
1.2
See Also:
FontRenderContext, Font.createGlyphVector(java.awt.font.FontRenderContext, java.lang.String), TextLayout
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GraphicsConfigTemplate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GraphicsConfigTemplate

java.lang.Object
  |
  +--java.awt.GraphicsConfigTemplate
All Implemented Interfaces:
Serializable
public abstract class GraphicsConfigTemplate
extends Object
implements Serializable

The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration. A user instantiates one of these objects and then sets all non-default attributes as desired. The GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate) method found in the GraphicsDevice class is then called with this GraphicsConfigTemplate. A valid GraphicsConfiguration is returned that meets or exceeds what was requested in the GraphicsConfigTemplate.

Since:
1.2
See Also:
GraphicsDevice, GraphicsConfiguration, Serialized Form

Field Summary
static int | PREFERRED Value used for "Enum" (Integer) type.
static int | REQUIRED Value used for "Enum" (Integer) type.
static int | UNNECESSARY Value used for "Enum" (Integer) type.
Constructor Summary
GraphicsConfigTemplate()
This class is an abstract class so only subclasses can be instantiated.
Method Summary
abstract GraphicsConfiguration | getBestConfiguration(GraphicsConfiguration[] gc) Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
abstract boolean | isGraphicsConfigSupported(GraphicsConfiguration gc) Returns a boolean indicating whether or not the specified GraphicsConfiguration can be used to create a drawing surface that supports the indicated features.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

REQUIRED

public static final int REQUIRED
Value used for "Enum" (Integer) type. States that this feature is required for the GraphicsConfiguration object. If this feature is not available, do not select the GraphicsConfiguration object.

PREFERRED

public static final int PREFERRED
Value used for "Enum" (Integer) type. States that this feature is desired for the GraphicsConfiguration object. A selection with this feature is preferred over a selection that does not include this feature, although both selections can be considered valid matches.

UNNECESSARY

public static final int UNNECESSARY
Value used for "Enum" (Integer) type. States that this feature is not necessary for the selection of the GraphicsConfiguration object. A selection without this feature is preferred over a selection that includes this feature since it is not used.
Constructor Detail

GraphicsConfigTemplate

public GraphicsConfigTemplate()
This class is an abstract class so only subclasses can be instantiated.
Method Detail

getBestConfiguration

public abstract GraphicsConfiguration getBestConfiguration(GraphicsConfiguration[] gc)
Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
Parameters:
gc - the array of GraphicsConfiguration objects to choose from.
Returns:
a GraphicsConfiguration object that is the best configuration possible.
See Also:
GraphicsConfiguration

isGraphicsConfigSupported

public abstract boolean isGraphicsConfigSupported(GraphicsConfiguration gc)
Returns a boolean indicating whether or not the specified GraphicsConfiguration can be used to create a drawing surface that supports the indicated features.
Parameters:
gc - the GraphicsConfiguration object to test
Returns:
true if this GraphicsConfiguration object can be used to create surfaces that support the indicated features; false if the GraphicsConfiguration can not be used to create a drawing surface usable by this Java(tm) API.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GraphicsConfiguration

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GraphicsConfiguration

java.lang.Object
  |
  +--java.awt.GraphicsConfiguration
public abstract class GraphicsConfiguration
extends Object

The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor. There can be many GraphicsConfiguration objects associated with a single graphics device, representing different drawing modes or capabilities. The corresponding native structure will vary from platform to platform. For example, on X11 windowing systems, each visual is a different GraphicsConfiguration. On win32, GraphicsConfigurations represent PixelFormats available in the current resolution and color depth.

In a virtual device multi-screen environment in which the desktop area could span multiple physical screen devices, the bounds of the GraphicsConfiguration objects are relative to the virtual coordinate system. When setting the location of a component, use getBounds to get the bounds of the desired GraphicsConfiguration and offset the location with the coordinates of the GraphicsConfiguration, as the following code sample illustrates:

      Frame f = new Frame(GraphicsConfiguration gc);
      Rectangle bounds = gc.getBounds();
      f.setLocation(10 + bounds.x, 10 + bounds.y);
To determine if your environment is a virtual device environment, call getBounds on all of the GraphicsConfiguration objects in your system. If any of the origins of the returned bounds are not (0, 0), your environment is a virtual device environment.

You can also use getBounds to determine the bounds of the virtual device. Call getBounds on all of the GraphicsConfiguration objects in your system. Then, calculate the union of all of the bounds returned from the calls to getBounds. The union is the bounds of the virtual device. The following code sample calculates the bounds of the virtual device.

    Rectangle virtualBounds = new Rectangle();
      GraphicsEnvironment ge = GraphicsEnvironment.
        getLocalGraphicsEnvironment();
    GraphicsDevice[] gs =
        ge.getScreenDevices();
    for (int j = 0; j

See Also:
Window,
Frame,
GraphicsEnvironment,
GraphicsDevice

Constructor Summary

protected
GraphicsConfiguration()

          This is an abstract class that cannot be instantiated directly.

Method Summary
abstract BufferedImage | createCompatibleImage(int width, int height) Returns a BufferedImage with a data layout and color model compatible with this GraphicsConfiguration.
abstract BufferedImage | createCompatibleImage(int width, int height, int transparency) Returns a BufferedImage that supports the specified transparency and has a data layout and color model compatible with this GraphicsConfiguration.
abstract Rectangle | getBounds() Returns the bounds of the GraphicsConfiguration in the device coordinates.
abstract ColorModel | getColorModel() Returns the ColorModel associated with this GraphicsConfiguration.
abstract ColorModel | getColorModel(int transparency) Returns the ColorModel associated with this GraphicsConfiguration that supports the specified transparency.
abstract AffineTransform | getDefaultTransform() Returns the default AffineTransform for this GraphicsConfiguration.
abstract GraphicsDevice | getDevice() Returns the GraphicsDevice associated with this GraphicsConfiguration.
abstract AffineTransform | getNormalizingTransform() Returns a AffineTransform that can be concatenated with the default AffineTransform of a GraphicsConfiguration so that 72 units in user space equals 1 inch in device space.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GraphicsConfiguration

protected GraphicsConfiguration()

This is an abstract class that cannot be instantiated directly.
 Instances must be obtained from a suitable factory or query method.

See Also:
GraphicsDevice.getConfigurations(),
GraphicsDevice.getDefaultConfiguration(),
GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate),
Graphics2D.getDeviceConfiguration()

Method Detail

getDevice

public abstract GraphicsDevice getDevice()

Returns the GraphicsDevice associated with this
 GraphicsConfiguration.

Returns:
a GraphicsDevice object that is
 associated with this GraphicsConfiguration.

createCompatibleImage

public abstract BufferedImage createCompatibleImage(int width,
                                                    int height)

Returns a BufferedImage with a data layout and color model
 compatible with this GraphicsConfiguration.  This
 method has nothing to do with memory-mapping
 a device.  The returned BufferedImage has
 a layout and color model that is closest to this native device
 configuration and can therefore be optimally blitted to this
 device.

Parameters:
width - the width of the returned BufferedImage
height - the height of the returned BufferedImage
Returns:
a BufferedImage whose data layout and color
 model is compatible with this GraphicsConfiguration.

createCompatibleImage

public abstract BufferedImage createCompatibleImage(int width,
                                                    int height,
                                                    int transparency)

Returns a BufferedImage that supports the specified
 transparency and has a data layout and color model
 compatible with this GraphicsConfiguration.  This
 method has nothing to do with memory-mapping
 a device. The returned BufferedImage has a layout and
 color model that can be optimally blitted to a device
 with this GraphicsConfiguration.

Parameters:
width - the width of the returned BufferedImage
height - the height of the returned BufferedImage
transparency - the specified transparency mode
Returns:
a BufferedImage whose data layout and color
 model is compatible with this GraphicsConfiguration
 and also supports the specified transparency.
See Also:
Transparency.OPAQUE,
Transparency.BITMASK,
Transparency.TRANSLUCENT

getColorModel

public abstract ColorModel getColorModel()

Returns the ColorModel associated with this
 GraphicsConfiguration.

Returns:
a ColorModel object that is associated with
 this GraphicsConfiguration.

getColorModel

public abstract ColorModel getColorModel(int transparency)

Returns the ColorModel associated with this
 GraphicsConfiguration that supports the specified
 transparency.

Parameters:
transparency - the specified transparency mode
Returns:
a ColorModel object that is associated with
 this GraphicsConfiguration and supports the
 specified transparency.

getDefaultTransform

public abstract AffineTransform getDefaultTransform()

Returns the default AffineTransform for this
 GraphicsConfiguration. This
 AffineTransform is typically the Identity transform
 for most normal screens.  The default AffineTransform
 maps coordinates onto the device such that 72 user space
 coordinate units measure approximately 1 inch in device
 space.  The normalizing transform can be used to make
 this mapping more exact.  Coordinates in the coordinate space
 defined by the default AffineTransform for screen and
 printer devices have the origin in the upper left-hand corner of
 the target region of the device, with X coordinates
 increasing to the right and Y coordinates increasing downwards.
 For image buffers not associated with a device, such as those not
 created by createCompatibleImage,
 this AffineTransform is the Identity transform.

Returns:
the default AffineTransform for this
 GraphicsConfiguration.

getNormalizingTransform

public abstract AffineTransform getNormalizingTransform()

Returns a AffineTransform that can be concatenated
 with the default AffineTransform
 of a GraphicsConfiguration so that 72 units in user
 space equals 1 inch in device space.

 For a particular Graphics2D, g, one
 can reset the transformation to create
 such a mapping by using the following pseudocode:

      GraphicsConfiguration gc = g.getGraphicsConfiguration();

      g.setTransform(gc.getDefaultTransform());
      g.transform(gc.getNormalizingTransform());

 Note that sometimes this AffineTransform is identity,
 such as for printers or metafile output, and that this
 AffineTransform is only as accurate as the information
 supplied by the underlying system.  For image buffers not
 associated with a device, such as those not created by
 createCompatibleImage, this
 AffineTransform is the Identity transform
 since there is no valid distance measurement.

Returns:
an AffineTransform to concatenate to the
 default AffineTransform so that 72 units in user
 space is mapped to 1 inch in device space.

getBounds

public abstract Rectangle getBounds()

Returns the bounds of the GraphicsConfiguration
 in the device coordinates. In a multi-screen environment
 with a virtual device, the bounds can have negative X
 or Y origins.

Returns:
the bounds of the area covered by this
 GraphicsConfiguration.
Since:
1.3

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


GraphicsDevice

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GraphicsDevice

java.lang.Object
  |
  +--java.awt.GraphicsDevice
public abstract class GraphicsDevice
extends Object

The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment. These include screen and printer devices. Note that there can be many screens and many printers in an instance of GraphicsEnvironment. Each graphics device has one or more GraphicsConfiguration objects associated with it. These objects specify the different configurations in which the GraphicsDevice can be used.

In a multi-screen environment, the GraphicsConfiguration objects can be used to render components on multiple screens. The following code sample demonstrates how to create a JFrame object for each GraphicsConfiguration on each screen device in the GraphicsEnvironment:

   GraphicsEnvironment ge = GraphicsEnvironment.
   getLocalGraphicsEnvironment();
   GraphicsDevice[] gs = ge.getScreenDevices();
   for (int j = 0; j

See Also:
GraphicsEnvironment,
GraphicsConfiguration

Field Summary
static int | TYPE_IMAGE_BUFFER Device is an image buffer.
static int | TYPE_PRINTER Device is a printer.
static int | TYPE_RASTER_SCREEN Device is a raster screen.

Constructor Summary

protected
GraphicsDevice()

          This is an abstract class that cannot be instantiated directly.

Method Summary
GraphicsConfiguration | getBestConfiguration(GraphicsConfigTemplate gct) Returns the "best" configuration possible that passes the criteria defined in the GraphicsConfigTemplate.
abstract GraphicsConfiguration[] | getConfigurations() Returns all of the GraphicsConfiguration objects associated with this GraphicsDevice.
abstract GraphicsConfiguration | getDefaultConfiguration() Returns the default GraphicsConfiguration associated with this GraphicsDevice.
abstract String | getIDstring() Returns the identification string associated with this GraphicsDevice.
abstract int | getType() Returns the type of this GraphicsDevice.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE_RASTER_SCREEN

public static final int TYPE_RASTER_SCREEN

Device is a raster screen.

TYPE_PRINTER

public static final int TYPE_PRINTER

Device is a printer.

TYPE_IMAGE_BUFFER

public static final int TYPE_IMAGE_BUFFER

Device is an image buffer.  This buffer can reside in device
 or system memory but it is not physically viewable by the user.

Constructor Detail

GraphicsDevice

protected GraphicsDevice()

This is an abstract class that cannot be instantiated directly.
 Instances must be obtained from a suitable factory or query method.

See Also:
GraphicsEnvironment.getScreenDevices(),
GraphicsEnvironment.getDefaultScreenDevice(),
GraphicsConfiguration.getDevice()

Method Detail

getType

public abstract int getType()

Returns the type of this GraphicsDevice.

Returns:
the type of this GraphicsDevice, which can
 either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
See Also:
TYPE_RASTER_SCREEN,
TYPE_PRINTER,
TYPE_IMAGE_BUFFER

getIDstring

public abstract String getIDstring()

Returns the identification string associated with this
 GraphicsDevice.

 A particular program might use more than one
 GraphicsDevice in a GraphicsEnvironment.
 This method returns a String identifying a
 particular GraphicsDevice in the local
 GraphicsEnvironment.  Although there is
 no public method to set this String, a programmer can
 use the String for debugging purposes.  Vendors of
 the JavaTM Runtime Environment can
 format the return value of the String.  To determine
 how to interpret the value of the String, contact the
 vendor of your Java Runtime.  To find out who the vendor is, from
 your program, call the
 getProperty method of the
 System class with "java.vendor".

Returns:
a String that is the identification
 of this GraphicsDevice.

getConfigurations

public abstract GraphicsConfiguration[] getConfigurations()

Returns all of the GraphicsConfiguration
 objects associated with this GraphicsDevice.

Returns:
an array of GraphicsConfiguration
 objects that are associated with this
 GraphicsDevice.

getDefaultConfiguration

public abstract GraphicsConfiguration getDefaultConfiguration()

Returns the default GraphicsConfiguration
 associated with this GraphicsDevice.

Returns:
the default GraphicsConfiguration
 of this GraphicsDevice.

getBestConfiguration

public GraphicsConfiguration getBestConfiguration(GraphicsConfigTemplate gct)

Returns the "best" configuration possible that passes the
 criteria defined in the GraphicsConfigTemplate.

Parameters:
gct - the GraphicsConfigTemplate object
 used to obtain a valid GraphicsConfiguration
Returns:
a GraphicsConfiguration that passes
 the criteria defined in the specified
 GraphicsConfigTemplate.
See Also:
GraphicsConfigTemplate

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


GraphicsEnvironment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GraphicsEnvironment

java.lang.Object
  |
  +--java.awt.GraphicsEnvironment
public abstract class GraphicsEnvironment
extends Object

The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform. The resources in this GraphicsEnvironment might be local or on a remote machine. GraphicsDevice objects can be screens, printers or image buffers and are the destination of Graphics2D drawing methods. Each GraphicsDevice has a number of GraphicsConfiguration objects associated with it. These objects specify the different configurations in which the GraphicsDevice can be used.

See Also:
GraphicsDevice, GraphicsConfiguration

Constructor Summary
protected GraphicsEnvironment()
This is an abstract class and cannot be instantiated directly.
Method Summary
abstract Graphics2D | createGraphics(BufferedImage img) Returns a Graphics2D object for rendering into the specified BufferedImage.
abstract Font[] | getAllFonts() Returns an array containing a one-point size instance of all fonts available in this GraphicsEnvironment.
abstract String[] | getAvailableFontFamilyNames() Returns an array containing the names of all font families available in this GraphicsEnvironment.
abstract String[] | getAvailableFontFamilyNames(Locale l) Returns an array containing the localized names of all font families available in this GraphicsEnvironment.
abstract GraphicsDevice | getDefaultScreenDevice() Returns the default screen GraphicsDevice.
static GraphicsEnvironment | getLocalGraphicsEnvironment() Returns the local GraphicsEnvironment.
abstract GraphicsDevice[] | getScreenDevices() Returns an array of all of the screen GraphicsDevice objects.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GraphicsEnvironment

protected GraphicsEnvironment()
This is an abstract class and cannot be instantiated directly. Instances must be obtained from a suitable factory or query method.
Method Detail

getLocalGraphicsEnvironment

public static GraphicsEnvironment getLocalGraphicsEnvironment()
Returns the local GraphicsEnvironment.
Returns:
this GraphicsEnvironment.

getScreenDevices

public abstract GraphicsDevice[] getScreenDevices()
Returns an array of all of the screen GraphicsDevice objects.
Returns:
an array containing all the GraphicsDevice objects that represent screen devices.

getDefaultScreenDevice

public abstract GraphicsDevice getDefaultScreenDevice()
Returns the default screen GraphicsDevice.
Returns:
the GraphicsDevice that represents the default screen device.

createGraphics

public abstract Graphics2D createGraphics(BufferedImage img)
Returns a Graphics2D object for rendering into the specified BufferedImage.
Parameters:
img - the specified BufferedImage
Returns:
a Graphics2D to be used for rendering into the specified BufferedImage.

getAllFonts

public abstract Font[] getAllFonts()
Returns an array containing a one-point size instance of all fonts available in this GraphicsEnvironment. Typical usage would be to allow a user to select a particular font. Then, the application can size the font and set various font attributes by calling the deriveFont method on the choosen instance.

This method provides for the application the most precise control over which Font instance is used to render text. If a font in this GraphicsEnvironment has multiple programmable variations, only one instance of that Font is returned in the array, and other variations must be derived by the application.

If a font in this environment has multiple programmable variations, such as Multiple-Master fonts, only one instance of that font is returned in the Font array. The other variations must be derived by the application.

Returns:
an array of Font objects.
Since:
1.2
See Also:
getAvailableFontFamilyNames(), Font, Font.deriveFont(int, float), Font.getFontName()

getAvailableFontFamilyNames

public abstract String[] getAvailableFontFamilyNames()
Returns an array containing the names of all font families available in this GraphicsEnvironment. Typical usage would be to allow a user to select a particular family name and allow the application to choose related variants of the same family when the user specifies style attributes such as Bold or Italic.

This method provides for the application some control over which Font instance is used to render text, but allows the Font object more flexibility in choosing its own best match among multiple fonts in the same font family.

Returns:
an array of String containing names of font families.
Since:
1.2
See Also:
getAllFonts(), Font, Font.getFamily()

getAvailableFontFamilyNames

public abstract String[] getAvailableFontFamilyNames(Locale l)
Returns an array containing the localized names of all font families available in this GraphicsEnvironment. Typical usage would be to allow a user to select a particular family name and allow the application to choose related variants of the same family when the user specifies style attributes such as Bold or Italic.

This method provides for the application some control over which Font instance used to render text, but allows the Font object more flexibility in choosing its own best match among multiple fonts in the same font family. If l is null, this method returns an array containing all font family names available in this GraphicsEnvironment.

Parameters:
l - a Locale object that represents a particular geographical, political, or cultural region
Returns:
an array of String objects containing names of font families specific to the specified Locale.
Since:
1.2
See Also:
getAllFonts(), Font, Font.getFamily()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GridBagConstraints

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GridBagConstraints

java.lang.Object
  |
  +--java.awt.GridBagConstraints
All Implemented Interfaces:
Cloneable, Serializable
public class GridBagConstraints
extends Object
implements Cloneable, Serializable

The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.

Since:
JDK1.0
See Also:
GridBagLayout, Serialized Form

Field Summary
int | anchor This field is used when the component is smaller than its display area.
static int | BOTH Resize the component both horizontally and vertically.
static int | CENTER Put the component in the center of its display area.
static int | EAST Put the component on the right side of its display area, centered vertically.
int | fill This field is used when the component's display area is larger than the component's requested size.
int | gridheight Specifies the number of cells in a column for the component's display area.
int | gridwidth Specifies the number of cells in a row for the component's display area.
int | gridx Specifies the cell at the left of the component's display area, where the leftmost cell has gridx=0.
int | gridy Specifies the cell at the top of the component's display area, where the topmost cell has gridy=0.
static int | HORIZONTAL Resize the component horizontally but not vertically.
Insets | insets This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.
int | ipadx This field specifies the internal padding of the component, how much space to add to the minimum width of the component.
int | ipady This field specifies the internal padding, that is, how much space to add to the minimum height of the component.
static int | NONE Do not resize the component.
static int | NORTH Put the component at the top of its display area, centered horizontally.
static int | NORTHEAST Put the component at the top-right corner of its display area.
static int | NORTHWEST Put the component at the top-left corner of its display area.
static int | RELATIVE Specify that this component is the next-to-last component in its column or row (gridwidth, gridheight), or that this component be placed next to the previously added component (gridx, gridy).
static int | REMAINDER Specify that this component is the last component in its column or row.
static int | SOUTH Put the component at the bottom of its display area, centered horizontally.
static int | SOUTHEAST Put the component at the bottom-right corner of its display area.
static int | SOUTHWEST Put the component at the bottom-left corner of its display area.
static int | VERTICAL Resize the component vertically but not horizontally.
double | weightx Specifies how to distribute extra horizontal space.
double | weighty Specifies how to distribute extra vertical space.
static int | WEST Put the component on the left side of its display area, centered vertically.
Constructor Summary
GridBagConstraints()
Creates a GridBagConstraint object with all of its fields set to their default value.
GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
Creates a GridBagConstraints object with all of its fields set to the passed-in arguments.
Method Summary
 Object clone()
Creates a copy of this grid bag constraint.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RELATIVE

public static final int RELATIVE
Specify that this component is the next-to-last component in its column or row (gridwidth, gridheight), or that this component be placed next to the previously added component (gridx, gridy).
See Also:
gridwidth, gridheight, gridx, gridy

REMAINDER

public static final int REMAINDER
Specify that this component is the last component in its column or row.

NONE

public static final int NONE
Do not resize the component.

BOTH

public static final int BOTH
Resize the component both horizontally and vertically.

HORIZONTAL

public static final int HORIZONTAL
Resize the component horizontally but not vertically.

VERTICAL

public static final int VERTICAL
Resize the component vertically but not horizontally.

CENTER

public static final int CENTER
Put the component in the center of its display area.

NORTH

public static final int NORTH
Put the component at the top of its display area, centered horizontally.

NORTHEAST

public static final int NORTHEAST
Put the component at the top-right corner of its display area.

EAST

public static final int EAST
Put the component on the right side of its display area, centered vertically.

SOUTHEAST

public static final int SOUTHEAST
Put the component at the bottom-right corner of its display area.

SOUTH

public static final int SOUTH
Put the component at the bottom of its display area, centered horizontally.

SOUTHWEST

public static final int SOUTHWEST
Put the component at the bottom-left corner of its display area.

WEST

public static final int WEST
Put the component on the left side of its display area, centered vertically.

NORTHWEST

public static final int NORTHWEST
Put the component at the top-left corner of its display area.

gridx

public int gridx
Specifies the cell at the left of the component's display area, where the leftmost cell has gridx=0. The value RELATIVE specifies that the component be placed just to the right of the component that was added to the container just before this component was added.

The default value is RELATIVE. gridx should be a non-negative value.

See Also:
clone(), gridy

gridy

public int gridy
Specifies the cell at the top of the component's display area, where the topmost cell has gridy=0. The value RELATIVE specifies that the component be placed just below the component that was added to the container just before this component was added.

The default value is RELATIVE. gridy should be a non-negative value.

See Also:
clone(), gridx

gridwidth

public int gridwidth
Specifies the number of cells in a row for the component's display area.

Use REMAINDER to specify that the component be the last one in its row. Use RELATIVE to specify that the component be the next-to-last one in its row.

gridwidth should be non-negative and the default value is 1.

See Also:
clone(), gridheight

gridheight

public int gridheight
Specifies the number of cells in a column for the component's display area.

Use REMAINDER to specify that the component be the last one in its column. Use RELATIVE to specify that the component be the next-to-last one in its column.

gridheight should be a non-negative value and the default value is 1.

See Also:
clone(), gridwidth

weightx

public double weightx
Specifies how to distribute extra horizontal space.

The grid bag layout manager calculates the weight of a column to be the maximum weightx of all the components in a column. If the resulting layout is smaller horizontally than the area it needs to fill, the extra space is distributed to each column in proportion to its weight. A column that has a weight of zero receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the left and right edges.

The default value of this field is 0. weightx should be a non-negative value.

See Also:
clone(), weighty

weighty

public double weighty
Specifies how to distribute extra vertical space.

The grid bag layout manager calculates the weight of a row to be the maximum weighty of all the components in a row. If the resulting layout is smaller vertically than the area it needs to fill, the extra space is distributed to each row in proportion to its weight. A row that has a weight of zero receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the top and bottom edges.

The default value of this field is 0. weighty should be a non-negative value.

See Also:
clone(), weightx

anchor

public int anchor
This field is used when the component is smaller than its display area. It determines where, within the display area, to place the component. Possible values are CENTER, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, and NORTHWEST. The default value is CENTER.
See Also:
clone()

fill

public int fill
This field is used when the component's display area is larger than the component's requested size. It determines whether to resize the component, and if so, how.

The following values are valid for fill:

  • NONE: Do not resize the component.
  • HORIZONTAL: Make the component wide enough to fill its display area horizontally, but do not change its height.
  • VERTICAL: Make the component tall enough to fill its display area vertically, but do not change its width.
  • BOTH: Make the component fill its display area entirely.

The default value is NONE.

See Also:
clone()

insets

public Insets insets
This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.

The default value is new Insets(0, 0, 0, 0).

See Also:
clone()

ipadx

public int ipadx
This field specifies the internal padding of the component, how much space to add to the minimum width of the component. The width of the component is at least its minimum width plus (ipadx * 2) pixels.

The default value is 0.

See Also:
clone(), ipady

ipady

public int ipady
This field specifies the internal padding, that is, how much space to add to the minimum height of the component. The height of the component is at least its minimum height plus (ipady * 2) pixels.

The default value is 0.

See Also:
clone(), ipadx
Constructor Detail

GridBagConstraints

public GridBagConstraints()
Creates a GridBagConstraint object with all of its fields set to their default value.

GridBagConstraints

public GridBagConstraints(int gridx,
                          int gridy,
                          int gridwidth,
                          int gridheight,
                          double weightx,
                          double weighty,
                          int anchor,
                          int fill,
                          Insets insets,
                          int ipadx,
                          int ipady)
Creates a GridBagConstraints object with all of its fields set to the passed-in arguments. Note: Because the use of this constructor hinders readability of source code, this constructor should only be used by automatic source code generation tools.
Parameters:
gridx - The initial gridx value.
gridy - The initial gridy value.
gridwidth - The initial gridwidth value.
gridheight - The initial gridheight value.
weightx - The initial weightx value.
weighty - The initial weighty value.
anchor - The initial anchor value.
fill - The initial fill value.
insets - The initial insets value.
ipadx - The initial ipadx value.
ipady - The initial ipady value.
Since:
1.2
See Also:
gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, insets, ipadx, ipady
Method Detail

clone

public Object clone()
Creates a copy of this grid bag constraint.
Overrides:
clone in class Object
Returns:
a copy of this grid bag constraint
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GridBagLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GridBagLayout

java.lang.Object
  |
  +--java.awt.GridBagLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
public class GridBagLayout
extends Object
implements LayoutManager2, Serializable

The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size. Each GridBagLayout object maintains a dynamic rectangular grid of cells, with each component occupying one or more cells, called its display area.

Each component managed by a grid bag layout is associated with an instance of GridBagConstraints that specifies how the component is laid out within its display area.

How a GridBagLayout object places a set of components depends on the GridBagConstraints object associated with each component, and on the minimum size and the preferred size of the components' containers.

To use a grid bag layout effectively, you must customize one or more of the GridBagConstraints objects that are associated with its components. You customize a GridBagConstraints object by setting one or more of its instance variables:

GridBagConstraints.gridx, GridBagConstraints.gridy
Specifies the cell at the upper left of the component's display area, where the upper-left-most cell has address gridx = 0, gridy = 0. Use GridBagConstraints.RELATIVE (the default value) to specify that the component be just placed just to the right of (for gridx) or just below (for gridy) the component that was added to the container just before this component was added.
GridBagConstraints.gridwidth, GridBagConstraints.gridheight
Specifies the number of cells in a row (for gridwidth) or column (for gridheight) in the component's display area. The default value is 1. Use GridBagConstraints.REMAINDER to specify that the component be the last one in its row (for gridwidth) or column (for gridheight). Use GridBagConstraints.RELATIVE to specify that the component be the next to last one in its row (for gridwidth) or column (for gridheight).
GridBagConstraints.fill
Used when the component's display area is larger than the component's requested size to determine whether (and how) to resize the component. Possible values are GridBagConstraints.NONE (the default), GridBagConstraints.HORIZONTAL (make the component wide enough to fill its display area horizontally, but don't change its height), GridBagConstraints.VERTICAL (make the component tall enough to fill its display area vertically, but don't change its width), and GridBagConstraints.BOTH (make the component fill its display area entirely).
GridBagConstraints.ipadx, GridBagConstraints.ipady
Specifies the component's internal padding within the layout, how much to add to the minimum size of the component. The width of the component will be at least its minimum width plus (ipadx * 2) pixels (since the padding applies to both sides of the component). Similarly, the height of the component will be at least the minimum height plus (ipady * 2) pixels.
GridBagConstraints.insets
Specifies the component's external padding, the minimum amount of space between the component and the edges of its display area.
GridBagConstraints.anchor
Used when the component is smaller than its display area to determine where (within the display area) to place the component. Valid values are GridBagConstraints.CENTER (the default), GridBagConstraints.NORTH, GridBagConstraints.NORTHEAST, GridBagConstraints.EAST, GridBagConstraints.SOUTHEAST, GridBagConstraints.SOUTH, GridBagConstraints.SOUTHWEST, GridBagConstraints.WEST, and GridBagConstraints.NORTHWEST.
GridBagConstraints.weightx, GridBagConstraints.weighty
Used to determine how to distribute space, which is important for specifying resizing behavior. Unless you specify a weight for at least one component in a row (weightx) and column (weighty), all the components clump together in the center of their container. This is because when the weight is zero (the default), the GridBagLayout object puts any extra space between its grid of cells and the edges of the container.

The following figure shows ten components (all buttons) managed by a grid bag layout:

Each of the ten components has the fill field of its associated GridBagConstraints object set to GridBagConstraints.BOTH. In addition, the components have the following non-default constraints:

  • Button1, Button2, Button3: weightx = 1.0
  • Button4: weightx = 1.0, gridwidth = GridBagConstraints.REMAINDER
  • Button5: gridwidth = GridBagConstraints.REMAINDER
  • Button6: gridwidth = GridBagConstraints.RELATIVE
  • Button7: gridwidth = GridBagConstraints.REMAINDER
  • Button8: gridheight = 2, weighty = 1.0
  • Button9, Button 10: gridwidth = GridBagConstraints.REMAINDER

Here is the code that implements the example shown above:

 import java.awt.*;
 import java.util.*;
 import java.applet.Applet;

 public class GridBagEx1 extends Applet {

     protected void makebutton(String name,
                               GridBagLayout gridbag,
                               GridBagConstraints c) {
         Button button = new Button(name);
         gridbag.setConstraints(button, c);
         add(button);
     }

     public void init() {
         GridBagLayout gridbag = new GridBagLayout();
         GridBagConstraints c = new GridBagConstraints();

         setFont(new Font("Helvetica", Font.PLAIN, 14));
         setLayout(gridbag);

         c.fill = GridBagConstraints.BOTH;
         c.weightx = 1.0;
         makebutton("Button1", gridbag, c);
         makebutton("Button2", gridbag, c);
         makebutton("Button3", gridbag, c);

            c.gridwidth = GridBagConstraints.REMAINDER; //end row
         makebutton("Button4", gridbag, c);

         c.weightx = 0.0;		   //reset to the default
         makebutton("Button5", gridbag, c); //another row

        c.gridwidth = GridBagConstraints.RELATIVE; //next-to-last in row
         makebutton("Button6", gridbag, c);

        c.gridwidth = GridBagConstraints.REMAINDER; //end row
         makebutton("Button7", gridbag, c);

        c.gridwidth = 1;	   	   //reset to the default
        c.gridheight = 2;
         c.weighty = 1.0;
         makebutton("Button8", gridbag, c);

         c.weighty = 0.0;		   //reset to the default
        c.gridwidth = GridBagConstraints.REMAINDER; //end row
        c.gridheight = 1;		   //reset to the default
         makebutton("Button9", gridbag, c);
         makebutton("Button10", gridbag, c);

         setSize(300, 100);
     }

     public static void main(String args[]) {
        Frame f = new Frame("GridBag Layout Example");
        GridBagEx1 ex1 = new GridBagEx1();

        ex1.init();

        f.add("Center", ex1);
        f.pack();
        f.setSize(f.getPreferredSize());
        f.show();
     }
 }

Since:
JDK1.0
See Also:
GridBagConstraints, Serialized Form

Field Summary
double[] | columnWeights This field holds the overrides to the column weights.
int[] | columnWidths This field holds the overrides to the column minimum width.
protected Hashtable | comptable This hashtable maintains the association between a component and its gridbag constraints.
protected GridBagConstraints | defaultConstraints This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the defaultConstraints.
protected java.awt.GridBagLayoutInfo | layoutInfo This field holds tha layout information for the gridbag.
protected static int | MAXGRIDSIZE The maximum number of grid positions (both horizontally and vertically) that can be laid out by the grid bag layout.
protected static int | MINSIZE The smallest grid that can be laid out by the grid bag layout.
protected static int | PREFERREDSIZE
int[] | rowHeights This field holds the overrides to the row minimum heights.
double[] | rowWeights This field holds the overrides to the row weights.
Constructor Summary
GridBagLayout()
Creates a grid bag layout manager.
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
protected void | AdjustForGravity(GridBagConstraints constraints, Rectangle r)
protected void | ArrangeGrid(Container parent)
GridBagConstraints | getConstraints(Component comp) Gets the constraints for the specified component.
float | getLayoutAlignmentX(Container parent) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container parent) Returns the alignment along the y axis.
int[][] | getLayoutDimensions() Determines column widths and row heights for the layout grid.
protected java.awt.GridBagLayoutInfo | GetLayoutInfo(Container parent, int sizeflag) Print the layout constraints.
Point | getLayoutOrigin() Determines the origin of the layout grid.
double[][] | getLayoutWeights() Determines the weights of the layout grid's columns and rows.
protected Dimension | GetMinSize(Container parent, java.awt.GridBagLayoutInfo info)
void | invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | layoutContainer(Container parent) Lays out the specified container using this grid bag layout.
Point | location(int x, int y) Determines which cell in the layout grid contains the point specified by (x, y).
protected GridBagConstraints | lookupConstraints(Component comp) Retrieves the constraints for the specified component.
Dimension | maximumLayoutSize(Container target) Returns the maximum dimensions for this layout given the components in the specified target container.
Dimension | minimumLayoutSize(Container parent) Determines the minimum size of the target container using this grid bag layout.
Dimension | preferredLayoutSize(Container parent) Determines the preferred size of the target container using this grid bag layout.
void | removeLayoutComponent(Component comp) Removes the specified component from this layout.
void | setConstraints(Component comp, GridBagConstraints constraints) Sets the constraints for the specified component in this layout.
String | toString() Returns a string representation of this grid bag layout's values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

MAXGRIDSIZE

protected static final int MAXGRIDSIZE
The maximum number of grid positions (both horizontally and vertically) that can be laid out by the grid bag layout.

MINSIZE

protected static final int MINSIZE
The smallest grid that can be laid out by the grid bag layout.

PREFERREDSIZE

protected static final int PREFERREDSIZE

comptable

protected Hashtable comptable
This hashtable maintains the association between a component and its gridbag constraints. The Keys in comptable are the components and the values are the instances of GridBagConstraints.
See Also:
GridBagConstraints

defaultConstraints

protected GridBagConstraints defaultConstraints
This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the defaultConstraints.
See Also:
getConstraints(Component), setConstraints(Component, GridBagConstraints), lookupConstraints(Component)

layoutInfo

protected java.awt.GridBagLayoutInfo layoutInfo
This field holds tha layout information for the gridbag. The information in this field is based on the most recent validation of the gridbag. If layoutInfo is null this indicates that there are no components in the gridbag or if there are components, they have not yet been validated.
See Also:
GetLayoutInfo(Container, int)

columnWidths

public int[] columnWidths
This field holds the overrides to the column minimum width. If this field is non-null the values are applied to the gridbag after all of the minimum columns widths have been calculated. If columnWidths has more elements than the number of columns, columns are added to the gridbag to match the number of elements in columnWidth.
See Also:
getLayoutDimensions()

rowHeights

public int[] rowHeights
This field holds the overrides to the row minimum heights. If this field is non-null the values are applied to the gridbag after all of the minimum row heights have been calculated. If rowHeights has more elements than the number of rows, rowa are added to the gridbag to match the number of elements in rowHeights.
See Also:
getLayoutDimensions()

columnWeights

public double[] columnWeights
This field holds the overrides to the column weights. If this field is non-null the values are applied to the gridbag after all of the columns weights have been calculated. If columnWeights[i] > weight for column i, then column i is assigned the weight in columnWeights[i]. If columnWeights has more elements than the number of columns, the excess elements are ignored - they do not cause more columns to be created.

rowWeights

public double[] rowWeights
This field holds the overrides to the row weights. If this field is non-null the values are applied to the gridbag after all of the rows weights have been calculated. If rowWeights[i] > weight for row i, then row i is assigned the weight in rowWeights[i]. If rowWeights has more elements than the number of rows, the excess elements are ignored - they do not cause more rows to be created.
Constructor Detail

GridBagLayout

public GridBagLayout()
Creates a grid bag layout manager.
Method Detail

setConstraints

public void setConstraints(Component comp,
                           GridBagConstraints constraints)
Sets the constraints for the specified component in this layout.
Parameters:
comp - the component to be modified.
constraints - the constraints to be applied.

getConstraints

public GridBagConstraints getConstraints(Component comp)
Gets the constraints for the specified component. A copy of the actual GridBagConstraints object is returned.
Parameters:
comp - the component to be queried.
Returns:
the constraint for the specified component in this grid bag layout; a copy of the actual constraint object is returned.

lookupConstraints

protected GridBagConstraints lookupConstraints(Component comp)
Retrieves the constraints for the specified component. The return value is not a copy, but is the actual GridBagConstraints object used by the layout mechanism.
Parameters:
comp - the component to be queried
Returns:
the contraints for the specified component.

getLayoutOrigin

public Point getLayoutOrigin()
Determines the origin of the layout grid. Most applications do not call this method directly.
Returns:
the origin of the cell in the top-left corner of the layout grid.
Since:
JDK1.1

getLayoutDimensions

public int[][] getLayoutDimensions()
Determines column widths and row heights for the layout grid.

Most applications do not call this method directly.

Returns:
an array of two arrays, containing the widths of the layout columns and the heights of the layout rows.
Since:
JDK1.1

getLayoutWeights

public double[][] getLayoutWeights()
Determines the weights of the layout grid's columns and rows. Weights are used to calculate how much a given column or row stretches beyond its preferred size, if the layout has extra room to fill.

Most applications do not call this method directly.

Returns:
an array of two arrays, representing the horizontal weights of the layout columns and the vertical weights of the layout rows.
Since:
JDK1.1

location

public Point location(int x,
                      int y)
Determines which cell in the layout grid contains the point specified by (x, y). Each cell is identified by its column index (ranging from 0 to the number of columns minus 1) and its row index (ranging from 0 to the number of rows minus 1).

If the (x, y) point lies outside the grid, the following rules are used. The column index is returned as zero if x lies to the left of the layout, and as the number of columns if x lies to the right of the layout. The row index is returned as zero if y lies above the layout, and as the number of rows if y lies below the layout.

Parameters:
x - the x coordinate of a point.
y - the y coordinate of a point.
Returns:
an ordered pair of indexes that indicate which cell in the layout grid contains the point (x, y).
Since:
JDK1.1

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component.
comp - the component to be added.

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to the layout, using the specified constraint object.
Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component to be added.
constraints - an object that determines how the component is added to the layout.

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from this layout.

Most applications do not call this method directly.

Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed.
See Also:
Container.remove(java.awt.Component), Container.removeAll()

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Determines the preferred size of the target container using this grid bag layout.

Most applications do not call this method directly.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
See Also:
Container.getPreferredSize()

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Determines the minimum size of the target container using this grid bag layout.

Most applications do not call this method directly.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
See Also:
Container.doLayout()

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container.
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the component which needs to be laid out
See Also:
Container, minimumLayoutSize(Container), preferredLayoutSize(Container)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container parent)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container parent)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Specified by:
invalidateLayout in interface LayoutManager2

layoutContainer

public void layoutContainer(Container parent)
Lays out the specified container using this grid bag layout. This method reshapes components in the specified container in order to satisfy the contraints of this GridBagLayout object.

Most applications do not call this method directly.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the container in which to do the layout.
See Also:
Container, Container.doLayout()

toString

public String toString()
Returns a string representation of this grid bag layout's values.
Overrides:
toString in class Object
Returns:
a string representation of this grid bag layout.

GetLayoutInfo

protected java.awt.GridBagLayoutInfo GetLayoutInfo(Container parent,
                                                   int sizeflag)
Print the layout constraints. Useful for debugging.

AdjustForGravity

protected void AdjustForGravity(GridBagConstraints constraints,
                                Rectangle r)

GetMinSize

protected Dimension GetMinSize(Container parent,
                               java.awt.GridBagLayoutInfo info)

ArrangeGrid

protected void ArrangeGrid(Container parent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GridLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class GridLayout

java.lang.Object
  |
  +--java.awt.GridLayout
All Implemented Interfaces:
LayoutManager, Serializable
public class GridLayout
extends Object
implements LayoutManager, Serializable

The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.

The container is divided into equal-sized rectangles, and one component is placed in each rectangle.

For example, the following is an applet that lays out six buttons into three rows and two columns:

 import java.awt.*;
 import java.applet.Applet;
 public class ButtonGrid extends Applet {
     public void init() {
         setLayout(new GridLayout(3,2));
         add(new Button("1"));
         add(new Button("2"));
         add(new Button("3"));
         add(new Button("4"));
         add(new Button("5"));
         add(new Button("6"));
     }
 }

It produces the following output:

When both the number of rows and the number of columns have been set to non-zero values, either by a constructor or by the setRows and setColumns methods, the number of columns specified is ignored. Instead, the number of columns is determined from the specified number or rows and the total number of components in the layout. So, for example, if three rows and two columns have been specified and nine components are added to the layout, then they will be displayed as three rows of three columns. Specifying the number of columns affects the layout only when the number of rows is set to zero.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
GridLayout()
Creates a grid layout with a default of one column per component, in a single row.
GridLayout(int rows, int cols)
Creates a grid layout with the specified number of rows and columns.
GridLayout(int rows, int cols, int hgap, int vgap)
Creates a grid layout with the specified number of rows and columns.
Method Summary
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
int | getColumns() Gets the number of columns in this layout.
int | getHgap() Gets the horizontal gap between components.
int | getRows() Gets the number of rows in this layout.
int | getVgap() Gets the vertical gap between components.
void | layoutContainer(Container parent) Lays out the specified container using this layout.
Dimension | minimumLayoutSize(Container parent) Determines the minimum size of the container argument using this grid layout.
Dimension | preferredLayoutSize(Container parent) Determines the preferred size of the container argument using this grid layout.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
void | setColumns(int cols) Sets the number of columns in this layout to the specified value.
void | setHgap(int hgap) Sets the horizontal gap between components to the specified value.
void | setRows(int rows) Sets the number of rows in this layout to the specified value.
void | setVgap(int vgap) Sets the vertical gap between components to the specified value.
String | toString() Returns the string representation of this grid layout's values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

GridLayout

public GridLayout()
Creates a grid layout with a default of one column per component, in a single row.
Since:
JDK1.1

GridLayout

public GridLayout(int rows,
                  int cols)
Creates a grid layout with the specified number of rows and columns. All components in the layout are given equal size.

One, but not both, of rows and cols can be zero, which means that any number of objects can be placed in a row or in a column.

Parameters:
rows - the rows, with the value zero meaning any number of rows.
cols - the columns, with the value zero meaning any number of columns.

GridLayout

public GridLayout(int rows,
                  int cols,
                  int hgap,
                  int vgap)
Creates a grid layout with the specified number of rows and columns. All components in the layout are given equal size.

In addition, the horizontal and vertical gaps are set to the specified values. Horizontal gaps are placed at the left and right edges, and between each of the columns. Vertical gaps are placed at the top and bottom edges, and between each of the rows.

One, but not both, of rows and cols can be zero, which means that any number of objects can be placed in a row or in a column.

Parameters:
rows - the rows, with the value zero meaning any number of rows.
cols - the columns, with the value zero meaning any number of columns.
hgap - the horizontal gap.
vgap - the vertical gap.
Throws:
IllegalArgumentException - if the of rows or cols is invalid.
Method Detail

getRows

public int getRows()
Gets the number of rows in this layout.
Returns:
the number of rows in this layout.
Since:
JDK1.1

setRows

public void setRows(int rows)
Sets the number of rows in this layout to the specified value.
Parameters:
rows - the number of rows in this layout.
Throws:
IllegalArgumentException - if the value of both rows and cols is set to zero.
Since:
JDK1.1

getColumns

public int getColumns()
Gets the number of columns in this layout.
Returns:
the number of columns in this layout.
Since:
JDK1.1

setColumns

public void setColumns(int cols)
Sets the number of columns in this layout to the specified value. Setting the number of columns has no affect on the layout if the number of rows specified by a constructor or by the setRows method is non-zero. In that case, the number of columns displayed in the layout is determined by the total number of components and the number of rows specified.
Parameters:
cols - the number of columns in this layout.
Throws:
IllegalArgumentException - if the value of both rows and cols is set to zero.
Since:
JDK1.1

getHgap

public int getHgap()
Gets the horizontal gap between components.
Returns:
the horizontal gap between components.
Since:
JDK1.1

setHgap

public void setHgap(int hgap)
Sets the horizontal gap between components to the specified value.
Parameters:
hgap - the horizontal gap between components.
Since:
JDK1.1

getVgap

public int getVgap()
Gets the vertical gap between components.
Returns:
the vertical gap between components.
Since:
JDK1.1

setVgap

public void setVgap(int vgap)
Sets the vertical gap between components to the specified value.
Parameters:
vgap - the vertical gap between components.
Since:
JDK1.1

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component.
comp - the component to be added.

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed.

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Determines the preferred size of the container argument using this grid layout.

The preferred width of a grid layout is the largest preferred width of any of the widths in the container times the number of columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.

The preferred height of a grid layout is the largest preferred height of any of the heights in the container times the number of rows, plus the vertical padding times the number of rows plus one, plus the top and bottom insets of the target container.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
Returns:
the preferred dimensions to lay out the subcomponents of the specified container.
See Also:
minimumLayoutSize(java.awt.Container), Container.getPreferredSize()

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Determines the minimum size of the container argument using this grid layout.

The minimum width of a grid layout is the largest minimum width of any of the widths in the container times the number of columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.

The minimum height of a grid layout is the largest minimum height of any of the heights in the container times the number of rows, plus the vertical padding times the number of rows plus one, plus the top and bottom insets of the target container.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the container in which to do the layout.
Returns:
the minimum dimensions needed to lay out the subcomponents of the specified container.
See Also:
preferredLayoutSize(java.awt.Container), Container.doLayout()

layoutContainer

public void layoutContainer(Container parent)
Lays out the specified container using this layout.

This method reshapes the components in the specified target container in order to satisfy the constraints of the GridLayout object.

The grid layout manager determines the size of individual components by dividing the free space in the container into equal-sized portions according to the number of rows and columns in the layout. The container's free space equals the container's size minus any insets and any specified horizontal or vertical gap. All components in a grid layout are given the same size.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
target - the container in which to do the layout.
See Also:
Container, Container.doLayout()

toString

public String toString()
Returns the string representation of this grid layout's values.
Overrides:
toString in class Object
Returns:
a string representation of this grid layout.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalComponentStateException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Class IllegalComponentStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalStateException
                          |
                          +--java.awt.IllegalComponentStateException
All Implemented Interfaces:
Serializable
public class IllegalComponentStateException
extends IllegalStateException

Signals that an AWT component is not in an appropriate state for the requested operation.

See Also:
Serialized Form

Constructor Summary
IllegalComponentStateException()
Constructs an IllegalComponentStateException with no detail message.
IllegalComponentStateException(String s)
Constructs an IllegalComponentStateException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalComponentStateException

public IllegalComponentStateException()
Constructs an IllegalComponentStateException with no detail message. A detail message is a String that describes this particular exception.

IllegalComponentStateException

public IllegalComponentStateException(String s)
Constructs an IllegalComponentStateException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
s - the String that contains a detailed message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.awt.im Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.im

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Character.Subset
      • class java.awt.im.InputSubset
    • class java.awt.im.InputContext
    • class java.awt.im.InputMethodHighlight

Interface Hierarchy

  • interface java.awt.im.InputMethodRequests
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.im

Provides classes and interfaces for the input method framework.

See:
Description

Interface Summary
InputMethodRequests InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods.

Class Summary
InputContext | An InputContext object manages the communication between text editing components and input methods.
InputMethodHighlight | An InputMethodHighlight is used to describe the highlight attributes of text being composed.
InputSubset | Defines additional Unicode subsets for use by input methods.

Package java.awt.im Description

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

  • Input Method Framework Specification
  • Input Method Client API Reference

Related Documentation

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

  • Input Method Framework Overview
  • Input Method Client API Tutorial

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.im

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.im

Packages that use java.awt.im
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Classes in java.awt.im used by java.awt
InputContext
An InputContext object manages the communication between text editing components and input methods.
InputMethodHighlight
An InputMethodHighlight is used to describe the highlight attributes of text being composed.
InputMethodRequests
InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods.

Classes in java.awt.im used by java.awt.im
InputContext
An InputContext object manages the communication between text editing components and input methods.
InputMethodHighlight
An InputMethodHighlight is used to describe the highlight attributes of text being composed.
InputSubset
Defines additional Unicode subsets for use by input methods.

Classes in java.awt.im used by java.awt.im.spi
InputMethodRequests
InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods.

Classes in java.awt.im used by javax.swing.text
InputMethodRequests
InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.im.InputContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.im.InputContext

Packages that use InputContext
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im | Provides classes and interfaces for the input method framework.

Uses of InputContext in java.awt

Methods in java.awt that return InputContext
InputContext | Component.getInputContext() Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
InputContext | Window.getInputContext() Gets the input context for this window.

Uses of InputContext in java.awt.im

Methods in java.awt.im that return InputContext
static InputContext InputContext.getInstance()
Returns a new InputContext instance.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.im.InputMethodHighlight

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.im.InputMethodHighlight

Packages that use InputMethodHighlight
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im | Provides classes and interfaces for the input method framework.

Uses of InputMethodHighlight in java.awt

Methods in java.awt with parameters of type InputMethodHighlight
abstract  Map Toolkit.mapInputMethodHighlight(InputMethodHighlight highlight)
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.

Uses of InputMethodHighlight in java.awt.im

Fields in java.awt.im declared as InputMethodHighlight
static InputMethodHighlight | InputMethodHighlight.UNSELECTED_RAW_TEXT_HIGHLIGHT Constant for the default highlight for unselected raw text.
static InputMethodHighlight | InputMethodHighlight.SELECTED_RAW_TEXT_HIGHLIGHT Constant for the default highlight for selected raw text.
static InputMethodHighlight | InputMethodHighlight.UNSELECTED_CONVERTED_TEXT_HIGHLIGHT Constant for the default highlight for unselected converted text.
static InputMethodHighlight | InputMethodHighlight.SELECTED_CONVERTED_TEXT_HIGHLIGHT Constant for the default highlight for selected converted text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.im.InputSubset

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.im.InputSubset

Packages that use InputSubset
java.awt.im Provides classes and interfaces for the input method framework.

Uses of InputSubset in java.awt.im

Fields in java.awt.im declared as InputSubset
static InputSubset | InputSubset.LATIN Constant for all Latin characters, including the characters in the BASIC_LATIN, LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B Unicode character blocks.
static InputSubset | InputSubset.LATIN_DIGITS Constant for the digits included in the BASIC_LATIN Unicode character block.
static InputSubset | InputSubset.TRADITIONAL_HANZI Constant for all Han characters used in writing Traditional Chinese, including a subset of the CJK unified ideographs as well as Traditional Chinese Han characters that may be defined as surrogate characters.
static InputSubset | InputSubset.SIMPLIFIED_HANZI Constant for all Han characters used in writing Simplified Chinese, including a subset of the CJK unified ideographs as well as Simplified Chinese Han characters that may be defined as surrogate characters.
static InputSubset | InputSubset.KANJI Constant for all Han characters used in writing Japanese, including a subset of the CJK unified ideographs as well as Japanese Han characters that may be defined as surrogate characters.
static InputSubset | InputSubset.HANJA Constant for all Han characters used in writing Korean, including a subset of the CJK unified ideographs as well as Korean Han characters that may be defined as surrogate characters.
static InputSubset | InputSubset.HALFWIDTH_KATAKANA Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms character block.
static InputSubset | InputSubset.FULLWIDTH_LATIN Constant for the fullwidth ASCII variants subset of the Unicode halfwidth and fullwidth forms character block.
static InputSubset | InputSubset.FULLWIDTH_DIGITS Constant for the fullwidth digits included in the Unicode halfwidth and fullwidth forms character block.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.im.InputMethodRequests

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.im.InputMethodRequests

Packages that use InputMethodRequests
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of InputMethodRequests in java.awt

Methods in java.awt that return InputMethodRequests
 InputMethodRequests Component.getInputMethodRequests()
Gets the input method request handler which supports requests from input methods for this component.

Uses of InputMethodRequests in java.awt.im.spi

Subinterfaces of InputMethodRequests in java.awt.im.spi
 interface InputMethodContext
Provides methods that input methods can use to communicate with their client components or to request other services.

Uses of InputMethodRequests in javax.swing.text

Methods in javax.swing.text that return InputMethodRequests
 InputMethodRequests JTextComponent.getInputMethodRequests()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


InputContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.im
Class InputContext

java.lang.Object
  |
  +--java.awt.im.InputContext
public class InputContext
extends Object

An InputContext object manages the communication between text editing components and input methods. It dispatches events between them, and forwards requests for information from the input method to the text editing component. It also lets text editing components select input methods by locale.

By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's container hierarchy. However, this means that only one text input operation is possible at any one time within a window, and that the text needs to be committed when moving the focus from one text component to another. If this is not desired, text components can create their own input context instances.

The Java 2 platform supports input methods that have been developed in the Java programming language, using the interfaces in the java.awt.im.spi package, and installed into a Java 2 runtime environment as extensions. Implementations may also support using the native input methods of the platforms they run on; however, not all platforms and locales provide input methods.

Input methods are unavailable if (a) no input method written in the Java programming language has been installed and (b) the Java 2 implementation or the underlying platform does not support native input methods. In this case, input contexts can still be created and used; their behavior is specified with the individual methods below.

Since:
1.2
See Also:
Component.getInputContext(), Component.enableInputMethods(boolean)

Constructor Summary
protected InputContext()
Constructs an InputContext.
Method Summary
void | dispatchEvent(AWTEvent event) Dispatches an event to the active input method.
void | dispose() Disposes of the input context and release the resources used by it.
void | endComposition() Ends any input composition that may currently be going on in this context.
Object | getInputMethodControlObject() Returns a control object from the current input method, or null.
static InputContext | getInstance() Returns a new InputContext instance.
Locale | getLocale() Returns the current locale of the current input method.
boolean | isCompositionEnabled() Determines whether the current input method is enabled for composition.
void | reconvert() Asks the current input method to reconvert text from the current client component.
void | removeNotify(Component client) Notifies the input context that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.
boolean | selectInputMethod(Locale locale) Selects an input method that supports the given locale.
void | setCharacterSubsets(Character.Subset[] subsets) Sets the subsets of the Unicode character set that input methods of this input context should be allowed to input.
void | setCompositionEnabled(boolean enable) Enables or disables the current input method for composition, depending on the value of the parameter enable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputContext

protected InputContext()
Constructs an InputContext. This method is protected so clients cannot instantiate InputContext directly. Input contexts are obtained by calling getInstance().
Method Detail

getInstance

public static InputContext getInstance()
Returns a new InputContext instance.

selectInputMethod

public boolean selectInputMethod(Locale locale)
Selects an input method that supports the given locale. If the currently selected input method supports the desired locale or if there's no input method available that supports the desired locale, the current input method remains active. Otherwise, an input method is selected that supports text input for the desired locale. Before switching to a different input method, any currently uncommitted text is committed. If no input method supporting the desired locale is available, then false is returned.

A text editing component may call this method, for example, when the user changes the insertion point, so that the user can immediately continue typing in the language of the surrounding text.

Parameters:
locale - The desired new locale.
Returns:
Whether the input method that's active after this call supports the desired locale.
Throws:
NullPointerException - if locale is null

getLocale

public Locale getLocale()
Returns the current locale of the current input method. Returns null if the input context does not have a current input method or the input method's InputMethod.getLocale() returns null.
Returns:
the current locale of the current input method
Since:
1.3

setCharacterSubsets

public void setCharacterSubsets(Character.Subset[] subsets)
Sets the subsets of the Unicode character set that input methods of this input context should be allowed to input. Null may be passed in to indicate that all characters are allowed. The initial value is null. The setting applies to the current input method as well as input methods selected after this call is made. However, applications cannot rely on this call having the desired effect, since this setting cannot be passed on to all host input methods - applications still need to apply their own character validation. If no input methods are available, then this method has no effect.
Parameters:
subsets - The subsets of the Unicode character set from which characters may be input

setCompositionEnabled

public void setCompositionEnabled(boolean enable)
Enables or disables the current input method for composition, depending on the value of the parameter enable.

An input method that is enabled for composition interprets incoming events for both composition and control purposes, while a disabled input method does not interpret events for composition. Note however that events are passed on to the input method regardless whether it is enabled or not, and that an input method that is disabled for composition may still interpret events for control purposes, including to enable or disable itself for composition.

Parameters:
enable - whether to enable the current input method for composition
Throws:
UnsupportedOperationException - if there is no current input method available or the current input method does not support the enabling/disabling operation
Since:
1.3
See Also:
isCompositionEnabled()

isCompositionEnabled

public boolean isCompositionEnabled()
Determines whether the current input method is enabled for composition. An input method that is enabled for composition interprets incoming events for both composition and control purposes, while a disabled input method does not interpret events for composition.
Returns:
true if the current input method is enabled for composition; false otherwise
Throws:
UnsupportedOperationException - if there is no current input method available or the current input method does not support checking whether it is enabled for composition
Since:
1.3
See Also:
setCompositionEnabled(boolean)

reconvert

public void reconvert()
Asks the current input method to reconvert text from the current client component. The input method obtains the text to be reconverted from the client component using the InputMethodRequests.getSelectedText method. The other InputMethodRequests methods must be prepared to deal with further information requests by the input method. The composed and/or committed text will be sent to the client component as a sequence of InputMethodEvents. If the input method cannot reconvert the given text, the text is returned as committed text in an InputMethodEvent.
Throws:
UnsupportedOperationException - if there is no current input method available or the current input method does not support the reconversion operation.
Since:
1.3

dispatchEvent

public void dispatchEvent(AWTEvent event)
Dispatches an event to the active input method. Called by AWT. If no input method is available, then the event will never be consumed.
Parameters:
event - The event
Throws:
NullPointerException - if event is null

removeNotify

public void removeNotify(Component client)
Notifies the input context that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component. This method is usually called from the client component's Component.removeNotify method. Potentially pending input from input methods for this component is discarded. If no input methods are available, then this method has no effect.
Parameters:
client - Client component
Throws:
NullPointerException - if client is null

endComposition

public void endComposition()
Ends any input composition that may currently be going on in this context. Depending on the platform and possibly user preferences, this may commit or delete uncommitted text. Any changes to the text are communicated to the active component using an input method event. If no input methods are available, then this method has no effect.

A text editing component may call this in a variety of situations, for example, when the user moves the insertion point within the text (but outside the composed text), or when the component's text is saved to a file or copied to the clipboard.

dispose

public void dispose()
Disposes of the input context and release the resources used by it. Called by AWT for the default input context of each Window. If no input methods are available, then this method has no effect.

getInputMethodControlObject

public Object getInputMethodControlObject()
Returns a control object from the current input method, or null. A control object provides methods that control the behavior of the input method or obtain information from the input method. The type of the object is an input method specific class. Clients have to compare the result against known input method control object classes and cast to the appropriate class to invoke the methods provided.

If no input methods are available or the current input method does not provide an input method control object, then null is returned.

Returns:
A control object from the current input method, or null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InputMethodHighlight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.im
Class InputMethodHighlight

java.lang.Object
  |
  +--java.awt.im.InputMethodHighlight
public class InputMethodHighlight
extends Object

An InputMethodHighlight is used to describe the highlight attributes of text being composed. The description can be at two levels: at the abstract level it specifies the conversion state and whether the text is selected; at the concrete level it specifies style attributes used to render the highlight. An InputMethodHighlight must provide the description at the abstract level; it may or may not provide the description at the concrete level. If no concrete style is provided, a renderer should use Toolkit.mapInputMethodHighlight(java.awt.im.InputMethodHighlight) to map to a concrete style.

The abstract description consists of three fields: selected, state, and variation. selected indicates whether the text range is the one that the input method is currently working on, for example, the segment for which conversion candidates are currently shown in a menu. state represents the conversion state. State values are defined by the input method framework and should be distinguished in all mappings from abstract to concrete styles. Currently defined state values are raw (unconverted) and converted. These state values are recommended for use before and after the main conversion step of text composition, say, before and after kana->kanji or pinyin->hanzi conversion. The variation field allows input methods to express additional information about the conversion results.

InputMethodHighlight instances are typically used as attribute values returned from AttributedCharacterIterator for the INPUT_METHOD_HIGHLIGHT attribute. They may be wrapped into Annotation instances to indicate separate text segments.

Since:
1.2
See Also:
AttributedCharacterIterator

Field Summary
static int | CONVERTED_TEXT Constant for the converted text state.
static int | RAW_TEXT Constant for the raw text state.
static InputMethodHighlight | SELECTED_CONVERTED_TEXT_HIGHLIGHT Constant for the default highlight for selected converted text.
static InputMethodHighlight | SELECTED_RAW_TEXT_HIGHLIGHT Constant for the default highlight for selected raw text.
static InputMethodHighlight | UNSELECTED_CONVERTED_TEXT_HIGHLIGHT Constant for the default highlight for unselected converted text.
static InputMethodHighlight | UNSELECTED_RAW_TEXT_HIGHLIGHT Constant for the default highlight for unselected raw text.
Constructor Summary
InputMethodHighlight(boolean selected, int state)
Constructs an input method highlight record.
InputMethodHighlight(boolean selected, int state, int variation)
Constructs an input method highlight record.
InputMethodHighlight(boolean selected, int state, int variation, Map style)
Constructs an input method highlight record.
Method Summary
int | getState() Returns the conversion state of the text range.
Map | getStyle() Returns the rendering style attributes for the text range, or null.
int | getVariation() Returns the variation of the text range.
boolean | isSelected() Returns whether the text range is selected.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RAW_TEXT

public static final int RAW_TEXT
Constant for the raw text state.

CONVERTED_TEXT

public static final int CONVERTED_TEXT
Constant for the converted text state.

UNSELECTED_RAW_TEXT_HIGHLIGHT

public static final InputMethodHighlight UNSELECTED_RAW_TEXT_HIGHLIGHT
Constant for the default highlight for unselected raw text.

SELECTED_RAW_TEXT_HIGHLIGHT

public static final InputMethodHighlight SELECTED_RAW_TEXT_HIGHLIGHT
Constant for the default highlight for selected raw text.

UNSELECTED_CONVERTED_TEXT_HIGHLIGHT

public static final InputMethodHighlight UNSELECTED_CONVERTED_TEXT_HIGHLIGHT
Constant for the default highlight for unselected converted text.

SELECTED_CONVERTED_TEXT_HIGHLIGHT

public static final InputMethodHighlight SELECTED_CONVERTED_TEXT_HIGHLIGHT
Constant for the default highlight for selected converted text.
Constructor Detail

InputMethodHighlight

public InputMethodHighlight(boolean selected,
                            int state)
Constructs an input method highlight record. The variation is set to 0, the style to null.
Parameters:
selected - Whether the text range is selected
state - The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
See Also:
RAW_TEXT, CONVERTED_TEXT

InputMethodHighlight

public InputMethodHighlight(boolean selected,
                            int state,
                            int variation)
Constructs an input method highlight record. The style is set to null.
Parameters:
selected - Whether the text range is selected
state - The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
variation - The style variation for the text range
Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
See Also:
RAW_TEXT, CONVERTED_TEXT

InputMethodHighlight

public InputMethodHighlight(boolean selected,
                            int state,
                            int variation,
                            Map style)
Constructs an input method highlight record. The style attributes map provided must be unmodifiable.
Parameters:
selected - whether the text range is selected
state - the conversion state for the text range - RAW_TEXT or CONVERTED_TEXT
variation - the variation for the text range
style - the rendering style attributes for the text range, or null
Throws:
IllegalArgumentException - if a state other than RAW_TEXT or CONVERTED_TEXT is given
Since:
1.3
See Also:
RAW_TEXT, CONVERTED_TEXT
Method Detail

isSelected

public boolean isSelected()
Returns whether the text range is selected.

getState

public int getState()
Returns the conversion state of the text range.
Returns:
The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT.
See Also:
RAW_TEXT, CONVERTED_TEXT

getVariation

public int getVariation()
Returns the variation of the text range.

getStyle

public Map getStyle()
Returns the rendering style attributes for the text range, or null.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMethodRequests

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.im
Interface InputMethodRequests

All Known Subinterfaces:
InputMethodContext
public interface InputMethodRequests

InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods. The component can implement this interface itself or use a separate object that implements it. The object implementing this interface must be returned from the component's getInputMethodRequests method.

The text editing component also has to provide an input method event listener.

The interface is designed to support one of two input user interfaces:

  • on-the-spot input, where the composed text is displayed as part of the text component's text body.
  • below-the-spot input, where the composed text is displayed in a separate composition window just below the insertion point where the text will be inserted when it is committed. Note that, if text is selected within the component's text body, this text will be replaced by the committed text upon commitment; therefore it is not considered part of the context that the text is input into.

Since:
1.2
See Also:
Component.getInputMethodRequests(), InputMethodListener

Method Summary
AttributedCharacterIterator | cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes) Gets the latest committed text from the text editing component and removes it from the component's text body.
AttributedCharacterIterator | getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes) Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
int | getCommittedTextLength() Gets the length of the entire text contained in the text editing component except for uncommitted (composed) text.
int | getInsertPositionOffset() Gets the offset of the insert position in the committed text contained in the text editing component.
TextHitInfo | getLocationOffset(int x, int y) Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.
AttributedCharacterIterator | getSelectedText(AttributedCharacterIterator.Attribute[] attributes) Gets the currently selected text from the text editing component.
Rectangle | getTextLocation(TextHitInfo offset) Gets the location of a specified offset in the current composed text, or of the selection in committed text.

Method Detail

getTextLocation

public Rectangle getTextLocation(TextHitInfo offset)
Gets the location of a specified offset in the current composed text, or of the selection in committed text. This information is, for example, used to position the candidate window near the composed text, or a composition window near the location where committed text will be inserted.

If the component has composed text (because the most recent InputMethodEvent sent to it contained composed text), then the offset is relative to the composed text - offset 0 indicates the first character in the composed text. The location returned should be for this character.

If the component doesn't have composed text, the offset should be ignored, and the location returned should reflect the beginning (in line direction) of the highlight in the last line containing selected text. For example, for horizontal left-to-right text (such as English), the location to the left of the left-most character on the last line containing selected text is returned. For vertical top-to-bottom text, with lines proceding from right to left, the location to the top of the left-most line containing selected text is returned.

The location is represented as a 0-thickness caret, that is, it has 0 width if the text is drawn horizontally, and 0 height if the text is drawn vertically. Other text orientations need to be mapped to horizontal or vertical orientation. The rectangle uses absolute screen coordinates.

Parameters:
offset - the offset within the composed text, if there is composed text; null otherwise
Returns:
a rectangle representing the screen location of the offset

getLocationOffset

public TextHitInfo getLocationOffset(int x,
                                     int y)
Gets the offset within the composed text for the specified absolute x and y coordinates on the screen. This information is used, for example to handle mouse clicks and the mouse cursor. The offset is relative to the composed text, so offset 0 indicates the beginning of the composed text.

Return null if the location is outside the area occupied by the composed text.

Parameters:
x - the absolute x coordinate on screen
y - the absolute y coordinate on screen
Returns:
a text hit info describing the offset in the composed text.

getInsertPositionOffset

public int getInsertPositionOffset()
Gets the offset of the insert position in the committed text contained in the text editing component. This is the offset at which characters entered through an input method are inserted. This information is used by an input method, for example, to examine the text surrounding the insert position.
Returns:
the offset of the insert position

getCommittedText

public AttributedCharacterIterator getCommittedText(int beginIndex,
                                                    int endIndex,
                                                    AttributedCharacterIterator.Attribute[] attributes)
Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text. Uncommitted (composed) text should be ignored for index calculations and should not be made accessible through the iterator.

The input method may provide a list of attributes that it is interested in. In that case, information about other attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.

Parameters:
beginIndex - the index of the first character
endIndex - the index of the character following the last character
attributes - a list of attributes that the input method is interested in
Returns:
an iterator providing access to the text and its attributes

getCommittedTextLength

public int getCommittedTextLength()
Gets the length of the entire text contained in the text editing component except for uncommitted (composed) text.
Returns:
the length of the text except for uncommitted text

cancelLatestCommittedText

public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
Gets the latest committed text from the text editing component and removes it from the component's text body. This is used for the "Undo Commit" feature in some input methods, where the committed text reverts to its previous composed state. The composed text will be sent to the component using an InputMethodEvent.

Generally, this feature should only be supported immediately after the text was committed, not after the user performed other operations on the text. When the feature is not supported, return null.

The input method may provide a list of attributes that it is interested in. In that case, information about other attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.

Parameters:
attributes - a list of attributes that the input method is interested in
Returns:
the latest committed text, or null when the "Undo Commit" feature is not supported

getSelectedText

public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
Gets the currently selected text from the text editing component. This may be used for a variety of purposes. One of them is the "Reconvert" feature in some input methods. In this case, the input method will typically send an input method event to replace the selected text with composed text. Depending on the input method's capabilities, this may be the original composed text for the selected text, the latest composed text entered anywhere in the text, or a version of the text that's converted back from the selected text.

The input method may provide a list of attributes that it is interested in. In that case, information about other attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.

Parameters:
attributes - a list of attributes that the input method is interested in
Returns:
the currently selected text
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InputSubset

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.im
Class InputSubset

java.lang.Object
  |
  +--java.lang.Character.Subset
        |
        +--java.awt.im.InputSubset
public final class InputSubset
extends Character.Subset

Defines additional Unicode subsets for use by input methods. Unlike the UnicodeBlock subsets defined in the Character.UnicodeBlock class, these constants do not directly correspond to Unicode code blocks.

Since:
1.2

Field Summary
static InputSubset | FULLWIDTH_DIGITS Constant for the fullwidth digits included in the Unicode halfwidth and fullwidth forms character block.
static InputSubset | FULLWIDTH_LATIN Constant for the fullwidth ASCII variants subset of the Unicode halfwidth and fullwidth forms character block.
static InputSubset | HALFWIDTH_KATAKANA Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms character block.
static InputSubset | HANJA Constant for all Han characters used in writing Korean, including a subset of the CJK unified ideographs as well as Korean Han characters that may be defined as surrogate characters.
static InputSubset | KANJI Constant for all Han characters used in writing Japanese, including a subset of the CJK unified ideographs as well as Japanese Han characters that may be defined as surrogate characters.
static InputSubset | LATIN Constant for all Latin characters, including the characters in the BASIC_LATIN, LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B Unicode character blocks.
static InputSubset | LATIN_DIGITS Constant for the digits included in the BASIC_LATIN Unicode character block.
static InputSubset | SIMPLIFIED_HANZI Constant for all Han characters used in writing Simplified Chinese, including a subset of the CJK unified ideographs as well as Simplified Chinese Han characters that may be defined as surrogate characters.
static InputSubset | TRADITIONAL_HANZI Constant for all Han characters used in writing Traditional Chinese, including a subset of the CJK unified ideographs as well as Traditional Chinese Han characters that may be defined as surrogate characters.
Methods inherited from class java.lang.Character.Subset
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

LATIN

public static final InputSubset LATIN
Constant for all Latin characters, including the characters in the BASIC_LATIN, LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B Unicode character blocks.

LATIN_DIGITS

public static final InputSubset LATIN_DIGITS
Constant for the digits included in the BASIC_LATIN Unicode character block.

TRADITIONAL_HANZI

public static final InputSubset TRADITIONAL_HANZI
Constant for all Han characters used in writing Traditional Chinese, including a subset of the CJK unified ideographs as well as Traditional Chinese Han characters that may be defined as surrogate characters.

SIMPLIFIED_HANZI

public static final InputSubset SIMPLIFIED_HANZI
Constant for all Han characters used in writing Simplified Chinese, including a subset of the CJK unified ideographs as well as Simplified Chinese Han characters that may be defined as surrogate characters.

KANJI

public static final InputSubset KANJI
Constant for all Han characters used in writing Japanese, including a subset of the CJK unified ideographs as well as Japanese Han characters that may be defined as surrogate characters.

HANJA

public static final InputSubset HANJA
Constant for all Han characters used in writing Korean, including a subset of the CJK unified ideographs as well as Korean Han characters that may be defined as surrogate characters.

HALFWIDTH_KATAKANA

public static final InputSubset HALFWIDTH_KATAKANA
Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms character block.

FULLWIDTH_LATIN

public static final InputSubset FULLWIDTH_LATIN
Constant for the fullwidth ASCII variants subset of the Unicode halfwidth and fullwidth forms character block.
Since:
1.3

FULLWIDTH_DIGITS

public static final InputSubset FULLWIDTH_DIGITS
Constant for the fullwidth digits included in the Unicode halfwidth and fullwidth forms character block.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.awt.im.spi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.im.spi

Package Hierarchies:
All Packages

Interface Hierarchy

  • interface java.awt.im.spi.InputMethod
  • interface java.awt.im.spi.InputMethodDescriptor
  • interface java.awt.im.InputMethodRequests
    • interface java.awt.im.spi.InputMethodContext
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package java.awt.im.spi

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.im.spi

Packages that use java.awt.im.spi
java.awt.im.spi Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Classes in java.awt.im.spi used by java.awt.im.spi
InputMethod
Defines the interface for an input method that supports complex text input.
InputMethodContext
Provides methods that input methods can use to communicate with their client components or to request other services.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.im.spi.InputMethodDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.im.spi.InputMethodDescriptor

No usage of java.awt.im.spi.InputMethodDescriptor

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.im.spi.InputMethod

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.im.spi.InputMethod

Packages that use InputMethod
java.awt.im.spi Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Uses of InputMethod in java.awt.im.spi

Methods in java.awt.im.spi that return InputMethod
 InputMethod InputMethodDescriptor.createInputMethod()
Creates a new instance of the corresponding input method.

Methods in java.awt.im.spi with parameters of type InputMethod
 void InputMethodContext.enableClientWindowNotification(InputMethod inputMethod, boolean enable)
Enables or disables notification of the current client window's location and state for the specified input method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.im.spi.InputMethodContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.im.spi.InputMethodContext

Packages that use InputMethodContext
java.awt.im.spi Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

Uses of InputMethodContext in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type InputMethodContext
 void InputMethod.setInputMethodContext(InputMethodContext context)
Sets the input method context, which is used to dispatch input method events to the client component and to request information from the client component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


InputMethod

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.im.spi
Interface InputMethod

public interface InputMethod

Defines the interface for an input method that supports complex text input. Input methods traditionally support text input for languages that have more characters than can be represented on a standard-size keyboard, such as Chinese, Japanese, and Korean. However, they may also be used to support phonetic text input for English or character reordering for Thai.

Subclasses of InputMethod can be loaded by the input method framework; they can then be selected either through the API (InputContext.selectInputMethod) or the user interface (the input method selection menu).

Since:
1.3

Method Summary
void | activate() Activates the input method for immediate input processing.
void | deactivate(boolean isTemporary) Deactivates the input method.
void | dispatchEvent(AWTEvent event) Dispatches the event to the input method.
void | dispose() Disposes of the input method and releases the resources used by it.
void | endComposition() Ends any input composition that may currently be going on in this context.
Object | getControlObject() Returns a control object from this input method, or null.
Locale | getLocale() Returns the current input locale.
void | hideWindows() Closes or hides all windows opened by this input method instance or its class.
boolean | isCompositionEnabled() Determines whether this input method is enabled.
void | notifyClientWindowChange(Rectangle bounds) Notifies this input method of changes in the client window location or state.
void | reconvert() Starts the reconversion operation.
void | removeNotify() Notifies the input method that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.
void | setCharacterSubsets(Character.Subset[] subsets) Sets the subsets of the Unicode character set that this input method is allowed to input.
void | setCompositionEnabled(boolean enable) Enables or disables this input method for composition, depending on the value of the parameter enable.
void | setInputMethodContext(InputMethodContext context) Sets the input method context, which is used to dispatch input method events to the client component and to request information from the client component.
boolean | setLocale(Locale locale) Attempts to set the input locale.

Method Detail

setInputMethodContext

public void setInputMethodContext(InputMethodContext context)
Sets the input method context, which is used to dispatch input method events to the client component and to request information from the client component.

This method is called once immediately after instantiating this input method.

Parameters:
context - the input method context for this input method
Throws:
NullPointerException - if context is null

setLocale

public boolean setLocale(Locale locale)
Attempts to set the input locale. If the input method supports the desired locale, it changes its behavior to support input for the locale and returns true. Otherwise, it returns false and does not change its behavior.

This method is called

  • by InputContext.selectInputMethod,
  • when switching to this input method through the user interface if the user specified a locale or if the previously selected input method's getLocale method returns a non-null value.
Parameters:
locale - locale to input
Returns:
whether the specified locale is supported
Throws:
NullPointerException - if locale is null

getLocale

public Locale getLocale()
Returns the current input locale. Might return null in exceptional cases.

This method is called

  • by InputContext.getLocale and
  • when switching from this input method to a different one through the user interface.
Returns:
the current input locale, or null

setCharacterSubsets

public void setCharacterSubsets(Character.Subset[] subsets)
Sets the subsets of the Unicode character set that this input method is allowed to input. Null may be passed in to indicate that all characters are allowed.

This method is called

  • immediately after instantiating this input method,
  • when switching to this input method from a different one, and
  • by InputContext.setCharacterSubsets.
Parameters:
subsets - the subsets of the Unicode character set from which characters may be input

setCompositionEnabled

public void setCompositionEnabled(boolean enable)
Enables or disables this input method for composition, depending on the value of the parameter enable.

An input method that is enabled for composition interprets incoming events for both composition and control purposes, while a disabled input method does not interpret events for composition. Note however that events are passed on to the input method regardless whether it is enabled or not, and that an input method that is disabled for composition may still interpret events for control purposes, including to enable or disable itself for composition.

This method is called

  • by InputContext.setCompositionEnabled,
  • when switching to this input method from a different one using the user interface or InputContext.selectInputMethod, if the previously selected input method's isCompositionEnabled method returns without throwing an exception.
Parameters:
enable - whether to enable the input method for composition
Throws:
UnsupportedOperationException - if this input method does not support the enabling/disabling operation
See Also:
isCompositionEnabled()

isCompositionEnabled

public boolean isCompositionEnabled()
Determines whether this input method is enabled. An input method that is enabled for composition interprets incoming events for both composition and control purposes, while a disabled input method does not interpret events for composition.

This method is called

  • by InputContext.isCompositionEnabled and
  • when switching from this input method to a different one using the user interface or InputContext.selectInputMethod.
Returns:
true if this input method is enabled for composition; false otherwise.
Throws:
UnsupportedOperationException - if this input method does not support checking whether it is enabled for composition
See Also:
setCompositionEnabled(boolean)

reconvert

public void reconvert()
Starts the reconversion operation. The input method obtains the text to be reconverted from the current client component using the InputMethodRequests.getSelectedText method. It can use other InputMethodRequests methods to request additional information required for the reconversion operation. The composed and committed text produced by the operation is sent to the client component as a sequence of InputMethodEvents. If the given text cannot be reconverted, the same text should be sent to the client component as committed text.

This method is called by InputContext.reconvert.

Throws:
UnsupportedOperationException - if the input method does not support the reconversion operation.

dispatchEvent

public void dispatchEvent(AWTEvent event)
Dispatches the event to the input method. If input method support is enabled for the focussed component, incoming events of certain types are dispatched to the current input method for this component before they are dispatched to the component's methods or event listeners. The input method decides whether it needs to handle the event. If it does, it also calls the event's consume method; this causes the event to not get dispatched to the component's event processing methods or event listeners.

Events are dispatched if they are instances of InputEvent or its subclasses. This includes instances of the AWT classes KeyEvent and MouseEvent.

This method is called by InputContext.dispatchEvent.

Parameters:
event - the event being dispatched to the input method
Throws:
NullPointerException - if event is null

notifyClientWindowChange

public void notifyClientWindowChange(Rectangle bounds)
Notifies this input method of changes in the client window location or state. This method is called while this input method is the current input method of its input context and notifications for it are enabled (see InputMethodContext.enableClientWindowNotification). Calls to this method are temporarily suspended if the input context's removeNotify method is called, and resume when the input method is activated for a new client component. It is called in the following situations:
  • when the window containing the current client component changes in location, size, visibility, iconification state, or when the window is closed.
  • from enableClientWindowNotification(inputMethod, true) if the current client component exists,
  • when activating the input method for the first time after it called enableClientWindowNotification(inputMethod, true) if during the call no current client component was available,
  • when activating the input method for a new client component after the input context's removeNotify method has been called.
Parameters:
bounds - client window's bounds on the screen; or null if the client window is iconified or invisible

activate

public void activate()
Activates the input method for immediate input processing.

If an input method provides its own windows, it should make sure at this point that all necessary windows are open and visible.

This method is called

  • by InputContext.dispatchEvent when a client component receives a FOCUS_GAINED event,
  • when switching to this input method from a different one using the user interface or InputContext.selectInputMethod.
The method is only called when the input method is inactive. A newly instantiated input method is assumed to be inactive.

deactivate

public void deactivate(boolean isTemporary)
Deactivates the input method. The isTemporary argument has the same meaning as in FocusEvent.isTemporary.

If an input method provides its own windows, only windows that relate to the current composition (such as a lookup choice window) should be closed at this point. It is possible that the input method will be immediately activated again for a different client component, and closing and reopening more persistent windows (such as a control panel) would create unnecessary screen flicker. Before an instance of a different input method class is activated, hideWindows() is called on the current input method.

This method is called

  • by InputContext.dispatchEvent when a client component receives a FOCUS_LOST event,
  • when switching from this input method to a different one using the user interface or InputContext.selectInputMethod,
  • before removeNotify if the current client component is removed.
The method is only called when the input method is active.
Parameters:
isTemporary - whether the focus change is temporary

hideWindows

public void hideWindows()
Closes or hides all windows opened by this input method instance or its class.

This method is called

  • before calling activate on an instance of a different input method class,
  • before calling dispose on this input method.
The method is only called when the input method is inactive.

removeNotify

public void removeNotify()
Notifies the input method that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component.

This method is called by InputContext.removeNotify.

The method is only called when the input method is inactive.

endComposition

public void endComposition()
Ends any input composition that may currently be going on in this context. Depending on the platform and possibly user preferences, this may commit or delete uncommitted text. Any changes to the text are communicated to the active component using an input method event.

A text editing component may call this in a variety of situations, for example, when the user moves the insertion point within the text (but outside the composed text), or when the component's text is saved to a file or copied to the clipboard.

This method is called

  • by InputContext.endComposition,
  • by InputContext.dispatchEvent when switching to a different client component
  • when switching from this input method to a different one using the user interface or InputContext.selectInputMethod.

dispose

public void dispose()
Disposes of the input method and releases the resources used by it. In particular, the input method should dispose windows and close files that are no longer needed.

This method is called by InputContext.dispose.

The method is only called when the input method is inactive. No method of this interface is called on this instance after dispose.

getControlObject

public Object getControlObject()
Returns a control object from this input method, or null. A control object provides methods that control the behavior of the input method or obtain information from the input method. The type of the object is an input method specific class. Clients have to compare the result against known input method control object classes and cast to the appropriate class to invoke the methods provided.

This method is called by InputContext.getInputMethodControlObject.

Returns:
a control object from this input method, or null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InputMethodContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.im.spi
Interface InputMethodContext

All Superinterfaces:
InputMethodRequests
public interface InputMethodContext
extends InputMethodRequests

Provides methods that input methods can use to communicate with their client components or to request other services.

Since:
1.3

Method Summary
Window | createInputMethodWindow(String title, boolean attachToInputContext) Creates a top-level window for use by the input method.
void | dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition) Creates an input method event from the arguments given and dispatches it to the client component.
void | enableClientWindowNotification(InputMethod inputMethod, boolean enable) Enables or disables notification of the current client window's location and state for the specified input method.
Methods inherited from interface java.awt.im.InputMethodRequests
cancelLatestCommittedText, getCommittedText, getCommittedTextLength, getInsertPositionOffset, getLocationOffset, getSelectedText, getTextLocation

Method Detail

dispatchInputMethodEvent

public void dispatchInputMethodEvent(int id,
                                     AttributedCharacterIterator text,
                                     int committedCharacterCount,
                                     TextHitInfo caret,
                                     TextHitInfo visiblePosition)
Creates an input method event from the arguments given and dispatches it to the client component. For arguments, see InputMethodEvent.InputMethodEvent(java.awt.Component, int, java.text.AttributedCharacterIterator, int, java.awt.font.TextHitInfo, java.awt.font.TextHitInfo).

createInputMethodWindow

public Window createInputMethodWindow(String title,
                                      boolean attachToInputContext)
Creates a top-level window for use by the input method. The intended behavior of this window is:
  • it floats above all document windows and dialogs
  • it and all components that it contains do not receive the focus
  • it has lightweight decorations, such as a reduced drag region without title
However, the actual behavior with respect to these three items is platform dependent.

The title may or may not be displayed, depending on the actual type of window created.

If attachToInputContext is true, the new window will share the input context that corresponds to this input method context, so that events for components in the window are automatically dispatched to the input method. Also, when the window is opened using setVisible(true), the input context will prevent deactivate and activate calls to the input method that might otherwise be caused.

Parameters:
title - the title to be displayed in the window's title bar, if there is such a title bar. A null value is treated as an empty string, "".
attachToInputContext - whether this window should share the input context that corresponds to this input method context
Returns:
a window with special characteristics for use by input methods

enableClientWindowNotification

public void enableClientWindowNotification(InputMethod inputMethod,
                                           boolean enable)
Enables or disables notification of the current client window's location and state for the specified input method. When notification is enabled, the input method's notifyClientWindowChange method is called as described in that method's specification. Notification is automatically disabled when the input method is disposed.
Parameters:
inputMethod - the input method for which notifications are enabled or disabled
enable - true to enable, false to disable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMethodDescriptor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.im.spi
Interface InputMethodDescriptor

public interface InputMethodDescriptor

Defines methods that provide sufficient information about an input method to enable selection and loading of that input method. The input method itself is only loaded when it is actually used.

Since:
1.3

Method Summary
InputMethod | createInputMethod() Creates a new instance of the corresponding input method.
Locale[] | getAvailableLocales() Returns the locales supported by the corresponding input method.
String | getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.
Image | getInputMethodIcon(Locale inputLocale) Returns an icon for the corresponding input method.
boolean | hasDynamicLocaleList() Returns whether the list of available locales can change at runtime.

Method Detail

getAvailableLocales

public Locale[] getAvailableLocales()
                             throws AWTException
Returns the locales supported by the corresponding input method. The locale may describe just the language, or may also include country and variant information if needed. The information is used to select input methods by locale (InputContext.selectInputMethod(Locale)). It may also be used to sort input methods by locale in a user-visible list of input methods.

Only the input method's primary locales should be returned. For example, if a Japanese input method also has a pass-through mode for Roman characters, typically still only Japanese would be returned. Thus, the list of locales returned is typically a subset of the locales for which the corresponding input method's implementation of InputMethod.setLocale(java.util.Locale) returns true.

If hasDynamicLocaleList() returns true, this method is called each time the information is needed. This gives input methods that depend on network resources the chance to add or remove locales as resources become available or unavailable.

Returns:
the locales supported by the input method
Throws:
AWTException - if it can be determined that the input method is inoperable, for example, because of incomplete installation.

hasDynamicLocaleList

public boolean hasDynamicLocaleList()
Returns whether the list of available locales can change at runtime. This may be the case, for example, for adapters that access real input methods over the network.

getInputMethodDisplayName

public String getInputMethodDisplayName(Locale inputLocale,
                                        Locale displayLanguage)
Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.

The inputLocale parameter specifies the locale for which text is input. This parameter can only take values obtained from this descriptor's getAvailableLocales() method or null. If it is null, an input locale independent name for the input method should be returned.

If a name for the desired display language is not available, the method may fall back to some other language.

Parameters:
inputLocale - the locale for which text input is supported, or null
displayLanguage - the language in which the name will be displayed

getInputMethodIcon

public Image getInputMethodIcon(Locale inputLocale)
Returns an icon for the corresponding input method. The icon may be used by a user interface for selecting input methods.

The inputLocale parameter specifies the locale for which text is input. This parameter can only take values obtained from this descriptor's getAvailableLocales() method or null. If it is null, an input locale independent icon for the input method should be returned.

The icon's size should be 16×16 pixels.

Parameters:
inputLocale - the locale for which text input is supported, or null
Returns:
an icon for the corresponding input method, or null

createInputMethod

public InputMethod createInputMethod()
                              throws Exception
Creates a new instance of the corresponding input method.
Returns:
a new instance of the corresponding input method
Throws:
Exception - any exception that may occur while creating the input method instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package java.awt.im.spi

Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.

See:
Description

Interface Summary
InputMethod | Defines the interface for an input method that supports complex text input.
InputMethodContext | Provides methods that input methods can use to communicate with their client components or to request other services.
InputMethodDescriptor | Defines methods that provide sufficient information about an input method to enable selection and loading of that input method.

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

  • Input Method Framework Specification
  • Input Method Engine SPI Reference

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 2 runtime environments, this combination is supported on Windows, but not on Solaris.

Related Documentation

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

  • Input Method Framework Overview
  • Input Method Engine SPI Tutorial

Since:
JDK1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Image

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Image

java.lang.Object
  |
  +--java.awt.Image
Direct Known Subclasses:
BufferedImage
public abstract class Image
extends Object

The abstract class Image is the superclass of all classes that represent graphical images. The image must be obtained in a platform-specific manner.

Since:
JDK1.0

Field Summary
static int | SCALE_AREA_AVERAGING Use the Area Averaging image scaling algorithm.
static int | SCALE_DEFAULT Use the default image-scaling algorithm.
static int | SCALE_FAST Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.
static int | SCALE_REPLICATE Use the image scaling algorithm embodied in the ReplicateScaleFilter class.
static int | SCALE_SMOOTH Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.
static Object | UndefinedProperty The UndefinedProperty object should be returned whenever a property which was not defined for a particular image is fetched.
Constructor Summary
Image()
Method Summary
abstract void | flush() Flushes all resources being used by this Image object.
abstract Graphics | getGraphics() Creates a graphics context for drawing to an off-screen image.
abstract int | getHeight(ImageObserver observer) Determines the height of the image.
abstract Object | getProperty(String name, ImageObserver observer) Gets a property of this image by name.
Image | getScaledInstance(int width, int height, int hints) Creates a scaled version of this image.
abstract ImageProducer | getSource() Gets the object that produces the pixels for the image.
abstract int | getWidth(ImageObserver observer) Determines the width of the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

UndefinedProperty

public static final Object UndefinedProperty
The UndefinedProperty object should be returned whenever a property which was not defined for a particular image is fetched.

SCALE_DEFAULT

public static final int SCALE_DEFAULT
Use the default image-scaling algorithm.
Since:
JDK1.1

SCALE_FAST

public static final int SCALE_FAST
Choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.
Since:
JDK1.1

SCALE_SMOOTH

public static final int SCALE_SMOOTH
Choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.
Since:
JDK1.1

SCALE_REPLICATE

public static final int SCALE_REPLICATE
Use the image scaling algorithm embodied in the ReplicateScaleFilter class. The Image object is free to substitute a different filter that performs the same algorithm yet integrates more efficiently into the imaging infrastructure supplied by the toolkit.
See Also:
ReplicateScaleFilter
Since:
JDK1.1

SCALE_AREA_AVERAGING

public static final int SCALE_AREA_AVERAGING
Use the Area Averaging image scaling algorithm. The image object is free to substitute a different filter that performs the same algorithm yet integrates more efficiently into the image infrastructure supplied by the toolkit.
See Also:
AreaAveragingScaleFilter
Since:
JDK1.1
Constructor Detail

Image

public Image()
Method Detail

getWidth

public abstract int getWidth(ImageObserver observer)
Determines the width of the image. If the width is not yet known, this method returns -1 and the specified ImageObserver object is notified later.
Parameters:
observer - an object waiting for the image to be loaded.
Returns:
the width of this image, or -1 if the width is not yet known.
See Also:
getHeight(java.awt.image.ImageObserver), ImageObserver

getHeight

public abstract int getHeight(ImageObserver observer)
Determines the height of the image. If the height is not yet known, this method returns -1 and the specified ImageObserver object is notified later.
Parameters:
observer - an object waiting for the image to be loaded.
Returns:
the height of this image, or -1 if the height is not yet known.
See Also:
getWidth(java.awt.image.ImageObserver), ImageObserver

getSource

public abstract ImageProducer getSource()
Gets the object that produces the pixels for the image. This method is called by the image filtering classes and by methods that perform image conversion and scaling.
Returns:
the image producer that produces the pixels for this image.
See Also:
ImageProducer

getGraphics

public abstract Graphics getGraphics()
Creates a graphics context for drawing to an off-screen image. This method can only be called for off-screen images.
Returns:
a graphics context to draw to the off-screen image.
See Also:
Graphics, Component.createImage(int, int)

getProperty

public abstract Object getProperty(String name,
                                   ImageObserver observer)
Gets a property of this image by name.

Individual property names are defined by the various image formats. If a property is not defined for a particular image, this method returns the UndefinedProperty object.

If the properties for this image are not yet known, this method returns null, and the ImageObserver object is notified later.

The property name "comment" should be used to store an optional comment which can be presented to the application as a description of the image, its source, or its author.

Parameters:
name - a property name.
observer - an object waiting for this image to be loaded.
Returns:
the value of the named property.
See Also:
ImageObserver, UndefinedProperty

getScaledInstance

public Image getScaledInstance(int width,
                               int height,
                               int hints)
Creates a scaled version of this image. A new Image object is returned which will render the image at the specified width and height by default. The new Image object may be loaded asynchronously even if the original source image has already been loaded completely. If either the width or height is a negative number then a value is substituted to maintain the aspect ratio of the original image dimensions.
Parameters:
width - the width to which to scale the image.
height - the height to which to scale the image.
hints - flags to indicate the type of algorithm to use for image resampling.
Returns:
a scaled version of the image.
Since:
JDK1.1
See Also:
SCALE_DEFAULT, SCALE_FAST, SCALE_SMOOTH, SCALE_REPLICATE, SCALE_AREA_AVERAGING

flush

public abstract void flush()
Flushes all resources being used by this Image object. This includes any pixel data that is being cached for rendering to the screen as well as any system resources that are being used to store data or pixels for the image. The image is reset to a state similar to when it was first created so that if it is again rendered, the image data will have to be recreated or fetched again from its source.

This method always leaves the image in a state such that it can be reconstructed. This means the method applies only to cached or other secondary representations of images such as those that have been generated from an ImageProducer (read from a file, for example). It does nothing for off-screen images that have only one copy of their data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.image Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.image

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.image.AffineTransformOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.BandCombineOp (implements java.awt.image.RasterOp)
    • class java.awt.image.ColorConvertOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.ColorModel (implements java.awt.Transparency)
      • class java.awt.image.ComponentColorModel
      • class java.awt.image.IndexColorModel
      • class java.awt.image.PackedColorModel
        • class java.awt.image.DirectColorModel
    • class java.awt.image.ConvolveOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.DataBuffer
      • class java.awt.image.DataBufferByte
      • class java.awt.image.DataBufferInt
      • class java.awt.image.DataBufferShort
      • class java.awt.image.DataBufferUShort
    • class java.awt.image.FilteredImageSource (implements java.awt.image.ImageProducer)
    • class java.awt.Image
      • class java.awt.image.BufferedImage (implements java.awt.image.WritableRenderedImage)
    • class java.awt.image.ImageFilter (implements java.lang.Cloneable, java.awt.image.ImageConsumer)
      • class java.awt.image.BufferedImageFilter (implements java.lang.Cloneable)
      • class java.awt.image.CropImageFilter
      • class java.awt.image.ReplicateScaleFilter
        • class java.awt.image.AreaAveragingScaleFilter
      • class java.awt.image.RGBImageFilter
    • class java.awt.image.Kernel (implements java.lang.Cloneable)
    • class java.awt.image.LookupOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.LookupTable
      • class java.awt.image.ByteLookupTable
      • class java.awt.image.ShortLookupTable
    • class java.awt.image.MemoryImageSource (implements java.awt.image.ImageProducer)
    • class java.awt.image.PixelGrabber (implements java.awt.image.ImageConsumer)
    • class java.awt.image.Raster
      • class java.awt.image.WritableRaster
    • class java.awt.image.RescaleOp (implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp)
    • class java.awt.image.SampleModel
      • class java.awt.image.ComponentSampleModel
        • class java.awt.image.BandedSampleModel
        • class java.awt.image.PixelInterleavedSampleModel
      • class java.awt.image.MultiPixelPackedSampleModel
      • class java.awt.image.SinglePixelPackedSampleModel
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class java.awt.image.ImagingOpException
          • class java.awt.image.RasterFormatException

Interface Hierarchy

  • interface java.awt.image.BufferedImageOp
  • interface java.awt.image.ImageConsumer
  • interface java.awt.image.ImageObserver
  • interface java.awt.image.ImageProducer
  • interface java.awt.image.RasterOp
  • interface java.awt.image.RenderedImage
    • interface java.awt.image.WritableRenderedImage
  • interface java.awt.image.TileObserver
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.image

Provides classes for creating and modifying images.

See:
Description

Interface Summary
BufferedImageOp | This interface describes single-input/single-output operations performed on BufferedImage objects.
ImageConsumer | The interface for objects expressing interest in image data through the ImageProducer interfaces.
ImageObserver | An asynchronous update interface for receiving notifications about Image information as the Image is constructed.
ImageProducer | The interface for objects which can produce the image data for Images.
RasterOp | This interface describes single-input/single-output operations performed on Raster objects.
RenderedImage | RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.
TileObserver | An interface for objects that wish to be informed when tiles of a WritableRenderedImage become modifiable by some writer via a call to getWritableTile, and when they become unmodifiable via the last call to releaseWritableTile.
WritableRenderedImage | WriteableRenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters and which can be modified and/or written over.

Class Summary
AffineTransformOp | This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster.
AreaAveragingScaleFilter | An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
BandCombineOp | This class performs an arbitrary linear combination of the bands in a Raster, using a specified matrix.
BandedSampleModel | This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
BufferedImage | The BufferedImage subclass describes an Image with an accessible buffer of image data.
BufferedImageFilter | The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
ByteLookupTable | This class defines a lookup table object.
ColorConvertOp | This class performs a pixel-by-pixel color conversion of the data in the source image.
ColorModel | The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
ComponentColorModel | A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element.
ComponentSampleModel | This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer.
ConvolveOp | This class implements a convolution from the source to the destination.
CropImageFilter | An ImageFilter class for cropping images.
DataBuffer | This class exists to wrap one or more data arrays.
DataBufferByte | This class extends DataBuffer and stores data internally as bytes.
DataBufferInt | This class extends DataBuffer and stores data internally as integers.
DataBufferShort | This class extends DataBuffer and stores data internally as shorts.
DataBufferUShort | This class extends DataBuffer and stores data internally as shorts.
DirectColorModel | The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
FilteredImageSource | This class is an implementation of the ImageProducer interface which takes an existing image and a filter object and uses them to produce image data for a new filtered version of the original image.
ImageFilter | This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
IndexColorModel | The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
Kernel | The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation.
LookupOp | This class implements a lookup operation from the source to the destination.
LookupTable | This abstract class defines a lookup table object.
MemoryImageSource | This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image.
MultiPixelPackedSampleModel | The MultiPixelPackedSampleModel class represents one-banded images and can pack multiple one-sample pixels into one data element.
PackedColorModel | The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.
PixelGrabber | The PixelGrabber class implements an ImageConsumer which can be attached to an Image or ImageProducer object to retrieve a subset of the pixels in that image.
PixelInterleavedSampleModel | This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
Raster | A class representing a rectangular array of pixels.
ReplicateScaleFilter | An ImageFilter class for scaling images using the simplest algorithm.
RescaleOp | This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset.
RGBImageFilter | This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.
SampleModel | This abstract class defines an interface for extracting samples of pixels in an image.
ShortLookupTable | This class defines a lookup table object.
SinglePixelPackedSampleModel | This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel.
WritableRaster | This class extends Raster to provide pixel writing capabilities.

Exception Summary
ImagingOpException | The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
RasterFormatException | The RasterFormatException is thrown if there is invalid layout information in the Raster.

Package java.awt.image Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.image

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.image

Packages that use java.awt.image
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in java.awt.image used by java.applet
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by java.awt
BufferedImage
The BufferedImage subclass describes an Image with an accessible buffer of image data.
BufferedImageOp
This interface describes single-input/single-output operations performed on BufferedImage objects.
ColorModel
The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.
ImageProducer
The interface for objects which can produce the image data for Images.
Raster
A class representing a rectangular array of pixels.
RenderedImage
RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.
WritableRaster
This class extends Raster to provide pixel writing capabilities.

Classes in java.awt.image used by java.awt.image
BufferedImage
The BufferedImage subclass describes an Image with an accessible buffer of image data.
BufferedImageOp
This interface describes single-input/single-output operations performed on BufferedImage objects.
ColorModel
The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
ComponentSampleModel
This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer.
DataBuffer
This class exists to wrap one or more data arrays.
ImageConsumer
The interface for objects expressing interest in image data through the ImageProducer interfaces.
ImageFilter
This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.
ImageProducer
The interface for objects which can produce the image data for Images.
IndexColorModel
The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
Kernel
The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation.
LookupTable
This abstract class defines a lookup table object.
PackedColorModel
The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.
Raster
A class representing a rectangular array of pixels.
RasterOp
This interface describes single-input/single-output operations performed on Raster objects.
RenderedImage
RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.
ReplicateScaleFilter
An ImageFilter class for scaling images using the simplest algorithm.
SampleModel
This abstract class defines an interface for extracting samples of pixels in an image.
TileObserver
An interface for objects that wish to be informed when tiles of a WritableRenderedImage become modifiable by some writer via a call to getWritableTile, and when they become unmodifiable via the last call to releaseWritableTile.
WritableRaster
This class extends Raster to provide pixel writing capabilities.
WritableRenderedImage
WriteableRenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters and which can be modified and/or written over.

Classes in java.awt.image used by java.awt.image.renderable
ImageConsumer
The interface for objects expressing interest in image data through the ImageProducer interfaces.
ImageProducer
The interface for objects which can produce the image data for Images.
RenderedImage
RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters.

Classes in java.awt.image used by javax.swing
ImageConsumer
The interface for objects expressing interest in image data through the ImageProducer interfaces.
ImageFilter
This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.
RGBImageFilter
This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.

Classes in java.awt.image used by javax.swing.colorchooser
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by javax.swing.plaf.basic
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by javax.swing.plaf.metal
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by javax.swing.table
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by javax.swing.text
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Classes in java.awt.image used by javax.swing.tree
ImageObserver
An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AffineTransformOp

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class AffineTransformOp

java.lang.Object
  |
  +--java.awt.image.AffineTransformOp
All Implemented Interfaces:
BufferedImageOp, RasterOp
public class AffineTransformOp
extends Object
implements BufferedImageOp, RasterOp

This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster. The type of interpolation that is used is specified through a constructor, either by a RenderingHints object or by one of the integer interpolation types defined in this class.

If a RenderingHints object is specified in the constructor, the interpolation hint and the rendering quality hint are used to set the interpolation type for this operation. The color rendering hint and the dithering hint can be used when color conversion is required.

Note that the following constraints have to be met:

  • The source and destination must be different.
  • For Raster objects, the number of bands in the source must be equal to the number of bands in the destination.

See Also:
AffineTransform, BufferedImageFilter, RenderingHints.KEY_INTERPOLATION, RenderingHints.KEY_RENDERING, RenderingHints.KEY_COLOR_RENDERING, RenderingHints.KEY_DITHERING

Field Summary
static int | TYPE_BILINEAR Bilinear interpolation type.
static int | TYPE_NEAREST_NEIGHBOR Nearest-neighbor interpolation type.
Constructor Summary
AffineTransformOp(AffineTransform xform, int interpolationType)
Constructs an AffineTransformOp given an affine transform and the interpolation type.
AffineTransformOp(AffineTransform xform, RenderingHints hints)
Constructs an AffineTransformOp given an affine transform.
Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
BufferedImage | filter(BufferedImage src, BufferedImage dst) Transforms the source BufferedImage and stores the results in the destination BufferedImage.
WritableRaster | filter(Raster src, WritableRaster dst) Transforms the source Raster and stores the results in the destination Raster.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the transformed destination.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the transformed destination.
int | getInterpolationType() Returns the interpolation type used by this op.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source.
RenderingHints | getRenderingHints() Returns the rendering hints used by this transform operation.
AffineTransform | getTransform() Returns the affine transform used by this transform operation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE_NEAREST_NEIGHBOR

public static final int TYPE_NEAREST_NEIGHBOR
Nearest-neighbor interpolation type.

TYPE_BILINEAR

public static final int TYPE_BILINEAR
Bilinear interpolation type.
Constructor Detail

AffineTransformOp

public AffineTransformOp(AffineTransform xform,
                         RenderingHints hints)
Constructs an AffineTransformOp given an affine transform. The interpolation type is determined from the RenderingHints object. If the interpolation hint is defined, it will be used. Otherwise, if the rendering quality hint is defined, the interpolation type is determined from its value. If no hints are specified (hints is null), the interpolation type is TYPE_NEAREST_NEIGHBOR.
Parameters:
xform - The AffineTransform to use for the operation.
hints - The RenderingHints object used to specify the interpolation type for the operation.
See Also:
RenderingHints.KEY_INTERPOLATION, RenderingHints.KEY_RENDERING

AffineTransformOp

public AffineTransformOp(AffineTransform xform,
                         int interpolationType)
Constructs an AffineTransformOp given an affine transform and the interpolation type.
Parameters:
xform - The AffineTransform to use for the operation.
interpolationType - One of the integer interpolation type constants defined by this class: TYPE_NEAREST_NEIGHBOR, TYPE_BILINEAR.
Method Detail

getInterpolationType

public final int getInterpolationType()
Returns the interpolation type used by this op.
See Also:
TYPE_NEAREST_NEIGHBOR, TYPE_BILINEAR

filter

public final BufferedImage filter(BufferedImage src,
                                  BufferedImage dst)
Transforms the source BufferedImage and stores the results in the destination BufferedImage. If the color models for the two images do not match, a color conversion into the destination color model is performed. If the destination image is null, a BufferedImage is created with the source ColorModel.

The coordinates of the rectangle returned by getBounds2D(BufferedImage) are not necessarily the same as the coordinates of the BufferedImage returned by this method. If the upper-left corner coordinates of the rectangle are negative then this part of the rectangle is not drawn. If the upper-left corner coordinates of the rectangle are positive then the filtered image is drawn at that position in the destination BufferedImage.

An IllegalArgumentException is thrown if the source is the same as the destination.

Specified by:
filter in interface BufferedImageOp
Parameters:
src - The BufferedImage to transform.
dst - The BufferedImage in which to store the results of the transformation.
Returns:
The filtered BufferedImage.
Throws:
IllegalArgumentException - if src and dst are the same
ImagingOpException - if the image cannot be transformed because of a data-processing error that might be caused by an invalid image format, tile format, or image-processing operation, or any other unsupported operation.

filter

public final WritableRaster filter(Raster src,
                                   WritableRaster dst)
Transforms the source Raster and stores the results in the destination Raster. This operation performs the transform band by band.

If the destination Raster is null, a new Raster is created. An IllegalArgumentException may be thrown if the source is the same as the destination or if the number of bands in the source is not equal to the number of bands in the destination.

The coordinates of the rectangle returned by getBounds2D(Raster) are not necessarily the same as the coordinates of the WritableRaster returned by this method. If the upper-left corner coordinates of rectangle are negative then this part of the rectangle is not drawn. If the coordinates of the rectangle are positive then the filtered image is drawn at that position in the destination Raster.

Specified by:
filter in interface RasterOp
Parameters:
src - The Raster to transform.
dst - The Raster in which to store the results of the transformation.
Returns:
The transformed Raster.
Throws:
ImagingOpException - if the raster cannot be transformed because of a data-processing error that might be caused by an invalid image format, tile format, or image-processing operation, or any other unsupported operation.

getBounds2D

public final Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the transformed destination. The rectangle returned is the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
Specified by:
getBounds2D in interface BufferedImageOp
Parameters:
src - The BufferedImage to be transformed.
Returns:
The Rectangle2D representing the destination's bounding box.

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the transformed destination. The rectangle returned will be the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
Specified by:
getBounds2D in interface RasterOp
Parameters:
src - The Raster to be transformed.
Returns:
The Rectangle2D representing the destination's bounding box.

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands. A RasterFormatException may be thrown if the transformed width or height is equal to 0.

If destCM is null, an appropriate ColorModel is used; this ColorModel may have an alpha channel even if the source ColorModel is opaque.

Specified by:
createCompatibleDestImage in interface BufferedImageOp
Parameters:
src - The BufferedImage to be transformed.
destCM - ColorModel of the destination. If null, an appropriate ColorModel is used.
Returns:
The zeroed destination image.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands. A RasterFormatException may be thrown if the transformed width or height is equal to 0.
Specified by:
createCompatibleDestRaster in interface RasterOp
Parameters:
src - The Raster to be transformed.
Returns:
The zeroed destination Raster.

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the corresponding destination point given a point in the source. If dstPt is specified, it is used to hold the return value.
Specified by:
getPoint2D in interface BufferedImageOp
Parameters:
dstPt - The Point2D in which to store the result.
Returns:
The Point2D in the destination that corresponds to the specified point in the source.

getTransform

public final AffineTransform getTransform()
Returns the affine transform used by this transform operation.
Returns:
The AffineTransform associated with this op.

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints used by this transform operation.
Specified by:
getRenderingHints in interface BufferedImageOp
Returns:
The RenderingHints object associated with this op.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AreaAveragingScaleFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class AreaAveragingScaleFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.ReplicateScaleFilter
              |
              +--java.awt.image.AreaAveragingScaleFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
public class AreaAveragingScaleFilter
extends ReplicateScaleFilter

An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm. This class extends the basic ImageFilter Class to scale an existing image and provide a source for a new image containing the resampled image. The pixels in the source image are blended to produce pixels for an image of the specified size. The blending process is analogous to scaling up the source image to a multiple of the destination size using pixel replication and then scaling it back down to the destination size by simply averaging all the pixels in the supersized image that fall within a given pixel of the destination image. If the data from the source is not delivered in TopDownLeftRight order then the filter will back off to a simple pixel replication behavior and utilize the requestTopDownLeftRightResend() method to refilter the pixels in a better way at the end. It is meant to be used in conjunction with a FilteredImageSource object to produce scaled versions of existing images.

See Also:
FilteredImageSource, ReplicateScaleFilter, ImageFilter

Fields inherited from class java.awt.image.ReplicateScaleFilter
destHeight, destWidth, outpixbuf, srccols, srcHeight, srcrows, srcWidth
Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
AreaAveragingScaleFilter(int width, int height)
Constructs an AreaAveragingScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
Method Summary
void | setHints(int hints) Detect if the data is being delivered with the necessary hints to allow the averaging algorithm to do its work.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Combine the components for the delivered byte pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Combine the components for the delivered int pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.
Methods inherited from class java.awt.image.ReplicateScaleFilter
setDimensions, setProperties
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AreaAveragingScaleFilter

public AreaAveragingScaleFilter(int width,
                                int height)
Constructs an AreaAveragingScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
Parameters:
width - the target width to scale the image
height - the target height to scale the image
Method Detail

setHints

public void setHints(int hints)
Detect if the data is being delivered with the necessary hints to allow the averaging algorithm to do its work.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setHints in class ImageFilter
See Also:
ImageConsumer.setHints(int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Combine the components for the delivered byte pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete. If the correct hints were not specified in the setHints call then relay the work to our superclass which is capable of scaling pixels regardless of the delivery hints.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ReplicateScaleFilter
See Also:
ReplicateScaleFilter

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Combine the components for the delivered int pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete. If the correct hints were not specified in the setHints call then relay the work to our superclass which is capable of scaling pixels regardless of the delivery hints.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ReplicateScaleFilter
See Also:
ReplicateScaleFilter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BandCombineOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class BandCombineOp

java.lang.Object
  |
  +--java.awt.image.BandCombineOp
All Implemented Interfaces:
RasterOp
public class BandCombineOp
extends Object
implements RasterOp

This class performs an arbitrary linear combination of the bands in a Raster, using a specified matrix.

The width of the matrix must be equal to the number of bands in the source Raster, optionally plus one. If there is one more column in the matrix than the number of bands, there is an implied 1 at the end of the vector of band samples representing a pixel. The height of the matrix must be equal to the number of bands in the destination.

For example, a 3-banded Raster might have the following transformation applied to each pixel in order to invert the second band of the Raster.

   [ 1.0   0.0   0.0    0.0  ]     [ b1 ]
   [ 0.0  -1.0   0.0  255.0  ]  x  [ b2 ]
   [ 0.0   0.0   1.0    0.0  ]     [ b3 ]
                                   [ 1 ]

Note that the source and destination can be the same object.

Constructor Summary
BandCombineOp(float[][] matrix, RenderingHints hints)
Constructs a BandCombineOp with the specified matrix.
Method Summary
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | filter(Raster src, WritableRaster dst) Transforms the Raster using the matrix specified in the constructor.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the transformed destination.
float[][] | getMatrix() Returns the matrix.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the corresponding destination point given a point in the source Raster.
RenderingHints | getRenderingHints() Returns the rendering hints for this operation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BandCombineOp

public BandCombineOp(float[][] matrix,
                     RenderingHints hints)
Constructs a BandCombineOp with the specified matrix. The width of the matrix must be equal to the number of bands in the source Raster, optionally plus one. If there is one more column in the matrix than the number of bands, there is an implied 1 at the end of the vector of band samples representing a pixel. The height of the matrix must be equal to the number of bands in the destination.

The first subscript is the row index and the second is the column index. This operation uses none of the currently defined rendering hints; the RenderingHints argument can be null.

Parameters:
matrix - The matrix to use for the band combine operation.
hints - The RenderingHints object for this operation. Not currently used so it can be null.
Method Detail

getMatrix

public final float[][] getMatrix()
Returns the matrix.
Returns:
The matrix associated with this band combine operation.

filter

public WritableRaster filter(Raster src,
                             WritableRaster dst)
Transforms the Raster using the matrix specified in the constructor. An IllegalArgumentException may be thrown if the number of bands in the source or destination is incompatible with the matrix. See the class comments for more details.

If the destination is null, it will be created with a number of bands equalling the number of rows in the matrix. No exception is thrown if the operation causes a data overflow.

Specified by:
filter in interface RasterOp
Parameters:
src - The Raster to be filtered.
dest - The Raster in which to store the results of the filter operation.
Returns:
The filtered Raster.
Throws:
IllegalArgumentException - If the number of bands in the source or destination is incompatible with the matrix.

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the transformed destination. Since this is not a geometric operation, the bounding box is the same for the source and destination. An IllegalArgumentException may be thrown if the number of bands in the source is incompatible with the matrix. See the class comments for more details.
Specified by:
getBounds2D in interface RasterOp
Parameters:
src - The Raster to be filtered.
Returns:
The Rectangle2D representing the destination image's bounding box.
Throws:
IllegalArgumentException - If the number of bands in the source is incompatible with the matrix.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands. An IllegalArgumentException may be thrown if the number of bands in the source is incompatible with the matrix. See the class comments for more details.
Specified by:
createCompatibleDestRaster in interface RasterOp
Parameters:
src - The Raster to be filtered.
Returns:
The zeroed destination Raster.

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the corresponding destination point given a point in the source Raster. If dstPt is specified, it is used to hold the return value. Since this is not a geometric operation, the point returned is the same as the specified srcPt.
Specified by:
getPoint2D in interface RasterOp
Parameters:
dstPt - The Point2D in which to store the result.
Returns:
The Point2D in the destination image that corresponds to the specified point in the source image.

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints for this operation.
Specified by:
getRenderingHints in interface RasterOp
Returns:
The RenderingHints object associated with this operation. Returns null if no hints have been set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BandedSampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class BandedSampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
        |
        +--java.awt.image.ComponentSampleModel
              |
              +--java.awt.image.BandedSampleModel
public final class BandedSampleModel
extends ComponentSampleModel

This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer. It subclasses ComponentSampleModel but provides a more efficent implementation for accessing band interleaved image data than is provided by ComponentSampleModel. This class should typically be used when working with images which store sample data for each band in a different bank of the DataBuffer. Accessor methods are provided so that image data can be manipulated directly. Pixel stride is the number of data array elements between two samples for the same band on the same scanline. The pixel stride for a BandedSampleModel is one. Scanline stride is the number of data array elements between a given sample and the corresponding sample in the same column of the next scanline. Band offsets denote the number of data array elements from the first data array element of the bank of the DataBuffer holding each band to the first sample of the band. The bands are numbered from 0 to N-1. Bank indices denote the correspondence between a bank of the data buffer and a band of image data. This class supports TYPE_BYTE, TYPE_USHORT, TYPE_SHORT, TYPE_INT datatypes

Fields inherited from class java.awt.image.ComponentSampleModel
bandOffsets, bankIndices, numBands, numBanks, pixelStride, scanlineStride
Fields inherited from class java.awt.image.SampleModel
dataType, height, width
Constructor Summary
BandedSampleModel(int dataType, int w, int h, int numBands)
Constructs a BandedSampleModel with the specified parameters.
BandedSampleModel(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets)
Constructs a BandedSampleModel with the specified parameters.
Method Summary
SampleModel | createCompatibleSampleModel(int w, int h) Creates a new BandedSampleModel with the specified width and height.
DataBuffer | createDataBuffer() Creates a DataBuffer that corresponds to this BandedSampleModel, The DataBuffer's data type, number of banks, and size will be consistent with this BandedSampleModel.
SampleModel | createSubsetSampleModel(int[] bands) Creates a new BandedSampleModel with a subset of the bands of this BandedSampleModel.
Object | getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int[] | getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples for the specified pixel in an int array.
int[] | getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per data array element.
int | getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
double | getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
float | getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
int[] | getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
void | setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
Methods inherited from class java.awt.image.ComponentSampleModel
getBandOffsets, getBankIndices, getNumDataElements, getOffset, getOffset, getPixelStride, getSampleSize, getSampleSize, getScanlineStride
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixels, getPixels, getSamples, getSamples, getTransferType, getWidth, setDataElements, setPixel, setPixel, setPixels, setPixels, setSamples, setSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BandedSampleModel

public BandedSampleModel(int dataType,
                         int w,
                         int h,
                         int numBands)
Constructs a BandedSampleModel with the specified parameters. The pixel stride will be one data element. The scanline stride will be the same as the width. Each band will be stored in a separate bank and all band offsets will be zero.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
numBands - The number of bands for the image data.
Throws:
IllegalArgumentException - if dataType is not one of the supported data types

BandedSampleModel

public BandedSampleModel(int dataType,
                         int w,
                         int h,
                         int scanlineStride,
                         int[] bankIndices,
                         int[] bandOffsets)
Constructs a BandedSampleModel with the specified parameters. The number of bands will be inferred from the lengths of the bandOffsets bankIndices arrays, which must be equal. The pixel stride will be one data element.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
numBands - The number of bands for the image data.
scanlineStride - The line stride of the of the image data.
bankIndices - The bank index for each band.
bandOffsets - The band offset for each band.
Throws:
IllegalArgumentException - if dataType is not one of the supported data types
Method Detail

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a new BandedSampleModel with the specified width and height. The new BandedSampleModel will have the same number of bands, storage data type, and bank indices as this BandedSampleModel. The band offsets will be compressed such that the offset between bands will be w*pixelStride and the minimum of all of the band offsets is zero.
Overrides:
createCompatibleSampleModel in class ComponentSampleModel
Parameters:
w - the width of the resulting BandedSampleModel
h - the height of the resulting BandedSampleModel
Returns:
a new BandedSampleModel with the specified width and height.
Throws:
IllegalArgumentException - if w or h equals either Integer.MAX_VALUE or Integer.MIN_VALUE
IllegalArgumentException - if dataType is not one of the supported data types

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
Creates a new BandedSampleModel with a subset of the bands of this BandedSampleModel. The new BandedSampleModel can be used with any DataBuffer that the existing BandedSampleModel can be used with. The new BandedSampleModel/DataBuffer combination will represent an image with a subset of the bands of the original BandedSampleModel/DataBuffer combination.
Overrides:
createSubsetSampleModel in class ComponentSampleModel
Throws:
RasterFormatException - if the number of bands is greater than the number of banks in this sample model.
IllegalArgumentException - if dataType is not one of the supported data types

createDataBuffer

public DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this BandedSampleModel, The DataBuffer's data type, number of banks, and size will be consistent with this BandedSampleModel.
Overrides:
createDataBuffer in class ComponentSampleModel
Throws:
IllegalArgumentException - if dataType is not either DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_SHORT, or DataBuffer.TYPE_INT

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object obj,
                              DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. For a BandedSampleModel, this will be the same as the data type, and samples will be returned one per array element. Generally, obj should be passed in as null, so that the Object will be created automatically and will be of the right primitive data type.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by BandedSampleModel bsm1, to DataBuffer db2, whose storage layout is described by BandedSampleModel bsm2. The transfer will generally be more efficient than using getPixel/setPixel.

          BandedSampleModel bsm1, bsm2;
         DataBufferInt db1, db2;
          bsm2.setDataElements(x, y, bsm1.getDataElements(x, y, null, db1),
                            db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.

Overrides:
getDataElements in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - If non-null, a primitive array in which to return the pixel data.
data - The DataBuffer containing the image data.

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray,
                      DataBuffer data)
Returns all samples for the specified pixel in an int array. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixel in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray,
                       DataBuffer data)
Returns all samples for the specified rectangle of pixels in an int array, one sample per data array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixels in class ComponentSampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSample

public int getSample(int x,
                     int y,
                     int b,
                     DataBuffer data)
Returns as int the sample in a specified band for the pixel located at (x,y). ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSample in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b,
                            DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as a float. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSampleFloat in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b,
                              DataBuffer data)
Returns the sample in a specified band for a pixel located at (x,y) as a double. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSampleDouble in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray,
                        DataBuffer data)
Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSamples in class ComponentSampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

setDataElements

public void setDataElements(int x,
                            int y,
                            Object obj,
                            DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. For a BandedSampleModel, this will be the same as the data type, and samples are transferred one per array element.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by BandedSampleModel bsm1, to DataBuffer db2, whose storage layout is described by BandedSampleModel bsm2. The transfer will generally be more efficient than using getPixel/setPixel.

          BandedSampleModel bsm1, bsm2;
         DataBufferInt db1, db2;
          bsm2.setDataElements(x, y, bsm1.getDataElements(x, y, null, db1),
                            db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Overrides:
setDataElements in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - If non-null, returns the primitive array in this object.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixel in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      int[] iArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixels in class ComponentSampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as an int.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      float s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a float.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      double s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class ComponentSampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a double.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       int[] iArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSamples in class ComponentSampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
iArray - The input sample array.
data - The DataBuffer containing the image data.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedImage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class BufferedImage

java.lang.Object
  |
  +--java.awt.Image
        |
        +--java.awt.image.BufferedImage
All Implemented Interfaces:
RenderedImage, WritableRenderedImage
public class BufferedImage
extends Image
implements WritableRenderedImage

The BufferedImage subclass describes an Image with an accessible buffer of image data. A BufferedImage is comprised of a ColorModel and a Raster of image data. The number and types of bands in the SampleModel of the Raster must match the number and types required by the ColorModel to represent its color and alpha components. All BufferedImage objects have an upper left corner coordinate of (0, 0). Any Raster used to construct a BufferedImage must therefore have minX=0 and minY=0.

See Also:
ColorModel, Raster, WritableRaster

Field Summary
static int | TYPE_3BYTE_BGR Represents an image with 8-bit RGB color components, corresponding to a Windows-style BGR color model) with the colors Blue, Green, and Red stored in 3 bytes.
static int | TYPE_4BYTE_ABGR Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
static int | TYPE_4BYTE_ABGR_PRE Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.
static int | TYPE_BYTE_BINARY Represents an opaque byte-packed binary image.
static int | TYPE_BYTE_GRAY Represents a unsigned byte grayscale image, non-indexed.
static int | TYPE_BYTE_INDEXED Represents an indexed byte image.
static int | TYPE_CUSTOM Image type is not recognized so it must be a customized image.
static int | TYPE_INT_ARGB Represents an image with 8-bit RGBA color components packed into integer pixels.
static int | TYPE_INT_ARGB_PRE Represents an image with 8-bit RGBA color components packed into integer pixels.
static int | TYPE_INT_BGR Represents an image with 8-bit RGB color components, corresponding to a Windows- or Solaris- style BGR color model, with the colors Blue, Green, and Red packed into integer pixels.
static int | TYPE_INT_RGB Represents an image with 8-bit RGB color components packed into integer pixels.
static int | TYPE_USHORT_555_RGB Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha.
static int | TYPE_USHORT_565_RGB Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha.
static int | TYPE_USHORT_GRAY Represents an unsigned short grayscale image, non-indexed).
Fields inherited from class java.awt.Image
SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
Constructor Summary
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster.
BufferedImage(int width, int height, int imageType)
Constructs a BufferedImage of one of the predefined image types.
BufferedImage(int width, int height, int imageType, IndexColorModel cm)
Constructs a BufferedImage of one of the predefined image types: TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED
Method Summary
void | addTileObserver(TileObserver to) Adds a tile observer.
void | coerceData(boolean isAlphaPremultiplied) Forces the data to match the state specified in the isAlphaPremultiplied variable.
WritableRaster | copyData(WritableRaster outRaster) Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster.
Graphics2D | createGraphics() Creates a Graphics2D, which can be used to draw into this BufferedImage.
void | flush() Flushes all resources being used to cache optimization information.
WritableRaster | getAlphaRaster() Returns a WritableRaster representing the alpha channel for BufferedImage objects with ColorModel objects that support a separate spatial alpha channel, such as ComponentColorModel and DirectColorModel.
ColorModel | getColorModel() Returns the ColorModel.
Raster | getData() Returns the image as one large tile.
Raster | getData(Rectangle rect) Computes and returns an arbitrary region of the BufferedImage.
Graphics | getGraphics() This method returns a Graphics2D, but is here for backwards compatibility.
int | getHeight() Returns the height of the BufferedImage.
int | getHeight(ImageObserver observer) Returns the actual height of the image.
int | getMinTileX() Returns the minimum tile index in the x direction.
int | getMinTileY() Returns the minimum tile index in the y direction.
int | getMinX() Returns the minimum x coordinate of this BufferedImage.
int | getMinY() Returns the minimum y coordinate of this BufferedImage.
int | getNumXTiles() Returns the number of tiles in the x direction.
int | getNumYTiles() Returns the number of tiles in the y direction.
Object | getProperty(String name) Returns a property of the image by name.
Object | getProperty(String name, ImageObserver observer) Returns a property of the image by name.
String[] | getPropertyNames() Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
WritableRaster | getRaster() Returns the WritableRaster.
int | getRGB(int x, int y) Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
int[] | getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data.
SampleModel | getSampleModel() Returns the SampleModel associated with this BufferedImage.
ImageProducer | getSource() Returns the object that produces the pixels for the image.
Vector | getSources() Returns a Vector of RenderedImage objects that are the immediate sources, not the sources of these immediate sources, of image data for this BufferedImage.
BufferedImage | getSubimage(int x, int y, int w, int h) Returns a subimage defined by a specified rectangular region.
Raster | getTile(int tileX, int tileY) Returns tile (tileX, tileY).
int | getTileGridXOffset() Returns the x offset of the tile grid relative to the origin, For example, the x coordinate of the location of tile (0, 0).
int | getTileGridYOffset() Returns the y offset of the tile grid relative to the origin, For example, the y coordinate of the location of tile (0, 0).
int | getTileHeight() Returns the tile height in pixels.
int | getTileWidth() Returns the tile width in pixels.
int | getType() Returns the image type.
int | getWidth() Returns the width of the BufferedImage.
int | getWidth(ImageObserver observer) Returns the actual width of the image.
WritableRaster | getWritableTile(int tileX, int tileY) Checks out a tile for writing.
Point[] | getWritableTileIndices() Returns an array of Point objects indicating which tiles are checked out for writing.
boolean | hasTileWriters() Returns whether or not any tile is checked out for writing.
boolean | isAlphaPremultiplied() Returns whether or not the alpha has been premultiplied.
boolean | isTileWritable(int tileX, int tileY) Returns whether or not a tile is currently checked out for writing.
void | releaseWritableTile(int tileX, int tileY) Relinquishes permission to write to a tile.
void | removeTileObserver(TileObserver to) Removes a tile observer.
void | setData(Raster r) Sets a rectangular region of the image to the contents of the specified Raster r, which is assumed to be in the same coordinate space as the BufferedImage.
void | setRGB(int x, int y, int rgb) Sets a pixel in this BufferedImage to the specified RGB value.
void | setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data.
String | toString() Returns a String representation of this BufferedImage object and its values.
Methods inherited from class java.awt.Image
getScaledInstance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

TYPE_CUSTOM

public static final int TYPE_CUSTOM
Image type is not recognized so it must be a customized image. This type is only used as a return value for the getType() method.

TYPE_INT_RGB

public static final int TYPE_INT_RGB
Represents an image with 8-bit RGB color components packed into integer pixels. The image has a DirectColorModel without alpha.

TYPE_INT_ARGB

public static final int TYPE_INT_ARGB
Represents an image with 8-bit RGBA color components packed into integer pixels. The image has a DirectColorModel with alpha. The color data in this image is considered not to be premultiplied with alpha. When this type is used as the imageType argument to a BufferedImage constructor, the created image is consistent with images created in the JDK1.1 and earlier releases.

TYPE_INT_ARGB_PRE

public static final int TYPE_INT_ARGB_PRE
Represents an image with 8-bit RGBA color components packed into integer pixels. The image has a DirectColorModel with alpha. The color data in this image is considered to be premultiplied with alpha.

TYPE_INT_BGR

public static final int TYPE_INT_BGR
Represents an image with 8-bit RGB color components, corresponding to a Windows- or Solaris- style BGR color model, with the colors Blue, Green, and Red packed into integer pixels. There is no alpha. The image has a ComponentColorModel.

TYPE_3BYTE_BGR

public static final int TYPE_3BYTE_BGR
Represents an image with 8-bit RGB color components, corresponding to a Windows-style BGR color model) with the colors Blue, Green, and Red stored in 3 bytes. There is no alpha. The image has a ComponentColorModel.

TYPE_4BYTE_ABGR

public static final int TYPE_4BYTE_ABGR
Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The image has a ComponentColorModel with alpha. The color data in this image is considered not to be premultiplied with alpha. The byte data is interleaved in a single byte array in the order A, B, G, R from lower to higher byte addresses within each pixel.

TYPE_4BYTE_ABGR_PRE

public static final int TYPE_4BYTE_ABGR_PRE
Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The image has a ComponentColorModel with alpha. The color data in this image is considered to be premultiplied with alpha. The byte data is interleaved in a single byte array in the order A, B, G, R from lower to higher byte addresses within each pixel.

TYPE_USHORT_565_RGB

public static final int TYPE_USHORT_565_RGB
Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha. This image has a DirectColorModel.

TYPE_USHORT_555_RGB

public static final int TYPE_USHORT_555_RGB
Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha. This image has a DirectColorModel.

TYPE_BYTE_GRAY

public static final int TYPE_BYTE_GRAY
Represents a unsigned byte grayscale image, non-indexed. This image has a ComponentColorModel with a CS_GRAY ColorSpace.

TYPE_USHORT_GRAY

public static final int TYPE_USHORT_GRAY
Represents an unsigned short grayscale image, non-indexed). This image has a ComponentColorModel with a CS_GRAY ColorSpace.

TYPE_BYTE_BINARY

public static final int TYPE_BYTE_BINARY
Represents an opaque byte-packed binary image. The image has an IndexColorModel without alpha. When this type is used as the imageType argument to the BufferedImage constructor that takes an imageType argument but no ColorModel argument, an IndexColorModel is created with two colors in the default sRGB ColorSpace: {0, 0, 0} and {255, 255, 255}.

TYPE_BYTE_INDEXED

public static final int TYPE_BYTE_INDEXED
Represents an indexed byte image. When this type is used as the imageType argument to the BufferedImage constructor that takes an imageType argument but no ColorModel argument, an IndexColorModel is created with a 256-color 6/6/6 color cube palette with the rest of the colors from 216-255 populated by grayscale values in the default sRGB ColorSpace.
Constructor Detail

BufferedImage

public BufferedImage(int width,
                     int height,
                     int imageType)
Constructs a BufferedImage of one of the predefined image types. The ColorSpace for the image is the default sRGB space.
Parameters:
width - width of the created image
height - height of the created image
imageType - type of the created image
See Also:
ColorSpace, TYPE_INT_RGB, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_GRAY, TYPE_USHORT_GRAY, TYPE_BYTE_BINARY, TYPE_BYTE_INDEXED, TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB

BufferedImage

public BufferedImage(int width,
                     int height,
                     int imageType,
                     IndexColorModel cm)
Constructs a BufferedImage of one of the predefined image types: TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED
Parameters:
width - width of the created image
height - height of the created image
imageType - type of the created image
cm - IndexColorModel of the created image
Throws:
IllegalArgumentException - if the imageType is not TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED
See Also:
TYPE_BYTE_BINARY, TYPE_BYTE_INDEXED

BufferedImage

public BufferedImage(ColorModel cm,
                     WritableRaster raster,
                     boolean isRasterPremultiplied,
                     Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster. If the number and types of bands in the SampleModel of the Raster do not match the number and types required by the ColorModel to represent its color and alpha components, a RasterFormatException is thrown. This method can multiply or divide the color Raster data by alpha to match the alphaPremultiplied state in the ColorModel. Properties for this BufferedImage can be established by passing in a Hashtable of String/Object pairs.
Parameters:
ColorModel - ColorModel for the new image
raster - Raster for the image data
isRasterPremultiplied - if true, the data in the raster has been premultiplied with alpha.
properties - Hashtable of String/Object pairs.
Throws:
RasterFormatException - if the number and types of bands in the SampleModel of the Raster do not match the number and types required by the ColorModel to represent its color and alpha components.
IllegalArgumentException - if raster is incompatible with cm
See Also:
ColorModel, Raster, WritableRaster
Method Detail

getType

public int getType()
Returns the image type. If it is not one of the known types, TYPE_CUSTOM is returned.
Returns:
the image type of this BufferedImage.
See Also:
TYPE_INT_RGB, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_GRAY, TYPE_BYTE_BINARY, TYPE_BYTE_INDEXED, TYPE_USHORT_GRAY, TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB, TYPE_CUSTOM

getColorModel

public ColorModel getColorModel()
Returns the ColorModel.
Specified by:
getColorModel in interface RenderedImage
Returns:
the ColorModel of this BufferedImage.

getRaster

public WritableRaster getRaster()
Returns the WritableRaster.
Returns:
the WriteableRaster of this BufferedImage.

getAlphaRaster

public WritableRaster getAlphaRaster()
Returns a WritableRaster representing the alpha channel for BufferedImage objects with ColorModel objects that support a separate spatial alpha channel, such as ComponentColorModel and DirectColorModel. Returns null if there is no alpha channel associated with the ColorModel in this image. This method assumes that for all ColorModel objects other than IndexColorModel, if the ColorModel supports alpha, there is a separate alpha channel which is stored as the last band of image data. If the image uses an IndexColorModel that has alpha in the lookup table, this method returns null since there is no spatially discrete alpha channel. This method creates a new WritableRaster, but shares the data array.
Returns:
a WritableRaster or null if this BufferedImage has no alpha channel associated with its ColorModel.

getRGB

public int getRGB(int x,
                  int y)
Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace. Color conversion takes place if this default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method.
Parameters:
x, y - the coordinates of the pixel from which to get the pixel in the default RGB color model and sRGB color space
Returns:
an integer pixel in the default RGB color model and default sRGB colorspace.

getRGB

public int[] getRGB(int startX,
                    int startY,
                    int w,
                    int h,
                    int[] rgbArray,
                    int offset,
                    int scansize)
Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method. With a specified coordinate (x, y) in the image, the ARGB pixel can be accessed in this way:
    pixel   = rgbArray[offset + (y-startY)*scansize + (x-startX)];
Parameters:
startX,  - startY the starting coordinates
w - width of region
h - height of region
rgbArray - if not null, the rgb pixels are written here
offset - offset into the rgbArray
scansize - scanline stride for the rgbArray
Returns:
array of RGB pixels.
Throws:
IllegalArgumentException - if an unknown datatype is specified

setRGB

public void setRGB(int x,
                   int y,
                   int rgb)
Sets a pixel in this BufferedImage to the specified RGB value. The pixel is assumed to be in the default RGB color model, TYPE_INT_ARGB, and default sRGB color space. For images with an IndexColorModel, the index with the nearest color is chosen.
Parameters:
x, y - the coordinates of the pixel to set
rgb - the RGB value

setRGB

public void setRGB(int startX,
                   int startY,
                   int w,
                   int h,
                   int[] rgbArray,
                   int offset,
                   int scansize)
Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method. With a specified coordinate (x, y) in the this image, the ARGB pixel can be accessed in this way:
    pixel   = rgbArray[offset + (y-startY)*scansize + (x-startX)];
WARNING: No dithering takes place.
Parameters:
startX, startY - the starting coordinates
w - width of the region
h - height of the region
rgbArray - the rgb pixels
offset - offset into the rgbArray
scansize - scanline stride for the rgbArray

getWidth

public int getWidth()
Returns the width of the BufferedImage.
Specified by:
getWidth in interface RenderedImage
Returns:
the width of this BufferedImage.

getHeight

public int getHeight()
Returns the height of the BufferedImage.
Specified by:
getHeight in interface RenderedImage
Returns:
the height of this BufferedImage.

getWidth

public int getWidth(ImageObserver observer)
Returns the actual width of the image. If the width is not known yet then the ImageObserver is notified later and -1 is returned.
Overrides:
getWidth in class Image
Parameters:
observer - the ImageObserver that receives information about the image
Returns:
the width of the image or -1 if the width is not yet known.
See Also:
Image.getHeight(ImageObserver), ImageObserver

getHeight

public int getHeight(ImageObserver observer)
Returns the actual height of the image. If the height is not known yet then the ImageObserver is notified later and -1 is returned.
Overrides:
getHeight in class Image
Parameters:
observer - the ImageObserver that receives information about the image
Returns:
the height of the image or -1 if the height is not yet known.
See Also:
Image.getWidth(ImageObserver), ImageObserver

getSource

public ImageProducer getSource()
Returns the object that produces the pixels for the image.
Overrides:
getSource in class Image
Returns:
the ImageProducer that is used to produce the pixels for this image.
See Also:
ImageProducer

getProperty

public Object getProperty(String name,
                          ImageObserver observer)
Returns a property of the image by name. Individual property names are defined by the various image formats. If a property is not defined for a particular image, this method returns the UndefinedProperty field. If the properties for this image are not yet known, then this method returns null and the ImageObserver object is notified later. The property name "comment" should be used to store an optional comment that can be presented to the user as a description of the image, its source, or its author.
Overrides:
getProperty in class Image
Parameters:
name - the property name
observer - the ImageObserver that receives notification regarding image information
Returns:
an Object that is the property referred to by the specified name or null if the properties of this image are not yet known.
See Also:
ImageObserver, Image.UndefinedProperty

getProperty

public Object getProperty(String name)
Returns a property of the image by name.
Specified by:
getProperty in interface RenderedImage
Parameters:
name - the property name
Returns:
an Object that is the property referred to by the specified name.

flush

public void flush()
Flushes all resources being used to cache optimization information. The underlying pixel data is unaffected.
Overrides:
flush in class Image

getGraphics

public Graphics getGraphics()
This method returns a Graphics2D, but is here for backwards compatibility. createGraphics is more convenient, since it is declared to return a Graphics2D.
Overrides:
getGraphics in class Image
Returns:
a Graphics2D, which can be used to draw into this image.

createGraphics

public Graphics2D createGraphics()
Creates a Graphics2D, which can be used to draw into this BufferedImage.
Returns:
a Graphics2D, used for drawing into this image.

getSubimage

public BufferedImage getSubimage(int x,
                                 int y,
                                 int w,
                                 int h)
Returns a subimage defined by a specified rectangular region. The returned BufferedImage shares the same data array as the original image.
Parameters:
x, y - the coordinates of the upper-left corner of the specified rectangular region
w - the width of the specified rectangular region
h - the height of the specified rectangular region
Returns:
a BufferedImage that is the subimage of this BufferedImage.
Throws:
RasterFormatException - if the specified area is not contained within this BufferedImage.

isAlphaPremultiplied

public boolean isAlphaPremultiplied()
Returns whether or not the alpha has been premultiplied. It returns true if there is no alpha since the default alpha is OPAQUE.
Returns:
true if the alpha has been premultiplied; false otherwise.

coerceData

public void coerceData(boolean isAlphaPremultiplied)
Forces the data to match the state specified in the isAlphaPremultiplied variable. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state.
Parameters:
isAlphaPremultiplied - true if the alpha has been premultiplied; false otherwise.

toString

public String toString()
Returns a String representation of this BufferedImage object and its values.
Overrides:
toString in class Object
Returns:
a String representing this BufferedImage.

getSources

public Vector getSources()
Returns a Vector of RenderedImage objects that are the immediate sources, not the sources of these immediate sources, of image data for this BufferedImage. This method returns null if the BufferedImage has no information about its immediate sources. It returns an empty Vector if the BufferedImage has no immediate sources.
Specified by:
getSources in interface RenderedImage
Returns:
a Vector containing immediate sources of this BufferedImage object's image date, or null if this BufferedImage has no information about its immediate sources, or an empty Vector if this BufferedImage has no immediate sources.

getPropertyNames

public String[] getPropertyNames()
Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
Specified by:
getPropertyNames in interface RenderedImage
Returns:
a String array containing all of the property names that getProperty(String) recognizes; or null if no property names are recognized.

getMinX

public int getMinX()
Returns the minimum x coordinate of this BufferedImage. This is always zero.
Specified by:
getMinX in interface RenderedImage
Returns:
the minimum x coordinate of this BufferedImage.

getMinY

public int getMinY()
Returns the minimum y coordinate of this BufferedImage. This is always zero.
Specified by:
getMinY in interface RenderedImage
Returns:
the minimum y coordinate of this BufferedImage.

getSampleModel

public SampleModel getSampleModel()
Returns the SampleModel associated with this BufferedImage.
Specified by:
getSampleModel in interface RenderedImage
Returns:
the SampleModel of this BufferedImage.

getNumXTiles

public int getNumXTiles()
Returns the number of tiles in the x direction. This is always one.
Specified by:
getNumXTiles in interface RenderedImage
Returns:
the number of tiles in the x direction.

getNumYTiles

public int getNumYTiles()
Returns the number of tiles in the y direction. This is always one.
Specified by:
getNumYTiles in interface RenderedImage
Returns:
the number of tiles in the y direction.

getMinTileX

public int getMinTileX()
Returns the minimum tile index in the x direction. This is always zero.
Specified by:
getMinTileX in interface RenderedImage
Returns:
the minimum tile index in the x direction.

getMinTileY

public int getMinTileY()
Returns the minimum tile index in the y direction. This is always zero.
Specified by:
getMinTileY in interface RenderedImage
Returns:
the mininum tile index in the y direction.

getTileWidth

public int getTileWidth()
Returns the tile width in pixels.
Specified by:
getTileWidth in interface RenderedImage
Returns:
the tile width in pixels.

getTileHeight

public int getTileHeight()
Returns the tile height in pixels.
Specified by:
getTileHeight in interface RenderedImage
Returns:
the tile height in pixels.

getTileGridXOffset

public int getTileGridXOffset()
Returns the x offset of the tile grid relative to the origin, For example, the x coordinate of the location of tile (0, 0). This is always zero.
Specified by:
getTileGridXOffset in interface RenderedImage
Returns:
the x offset of the tile grid.

getTileGridYOffset

public int getTileGridYOffset()
Returns the y offset of the tile grid relative to the origin, For example, the y coordinate of the location of tile (0, 0). This is always zero.
Specified by:
getTileGridYOffset in interface RenderedImage
Returns:
the y offset of the tile grid.

getTile

public Raster getTile(int tileX,
                      int tileY)
Returns tile (tileX, tileY). Note that tileX and tileY are indices into the tile array, not pixel locations. The Raster that is returned is live, which means that it is updated if the image is changed.
Specified by:
getTile in interface RenderedImage
Parameters:
tileX - the x index of the requested tile in the tile array
tileY - the y index of the requested tile in the tile array
Returns:
a Raster that is the tile defined by the arguments tileX and tileY.
Throws:
ArrayIndexOutOfBoundsException - if both tileX and tileY are not equal to 0

getData

public Raster getData()
Returns the image as one large tile. The Raster returned is a copy of the image data is not updated if the image is changed.
Specified by:
getData in interface RenderedImage
Returns:
a Raster that is a copy of the image data.

getData

public Raster getData(Rectangle rect)
Computes and returns an arbitrary region of the BufferedImage. The Raster returned is a copy of the image data and is not updated if the image is changed.
Specified by:
getData in interface RenderedImage
Parameters:
rect - the region of the BufferedImage to be returned.
Returns:
a Raster that is a copy of the image data of the specified region of the BufferedImage

copyData

public WritableRaster copyData(WritableRaster outRaster)
Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster. The region to be computed is determined from the bounds of the specified WritableRaster. The specified WritableRaster must have a SampleModel that is compatible with this image. If outRaster is null, an appropriate WritableRaster is created.
Specified by:
copyData in interface RenderedImage
Parameters:
outRaster - a WritableRaster to hold the returned part of the image, or null
Returns:
a reference to the supplied or created WritableRaster.

setData

public void setData(Raster r)
Sets a rectangular region of the image to the contents of the specified Raster r, which is assumed to be in the same coordinate space as the BufferedImage. The operation is clipped to the bounds of the BufferedImage.
Specified by:
setData in interface WritableRenderedImage
Parameters:
r - the specified Raster

addTileObserver

public void addTileObserver(TileObserver to)
Adds a tile observer. If the observer is already present, it receives multiple notifications.
Specified by:
addTileObserver in interface WritableRenderedImage
Parameters:
to - the specified TileObserver

removeTileObserver

public void removeTileObserver(TileObserver to)
Removes a tile observer. If the observer was not registered, nothing happens. If the observer was registered for multiple notifications, it is now registered for one fewer notification.
Specified by:
removeTileObserver in interface WritableRenderedImage
Parameters:
to - the specified TileObserver.

isTileWritable

public boolean isTileWritable(int tileX,
                              int tileY)
Returns whether or not a tile is currently checked out for writing.
Specified by:
isTileWritable in interface WritableRenderedImage
Parameters:
tileX - the x index of the tile.
tileY - the y index of the tile.
Returns:
true if the tile specified by the specified indices is checked out for writing; false otherwise.
Throws:
ArrayIndexOutOfBoundsException - if both tileX and tileY are not equal to 0

getWritableTileIndices

public Point[] getWritableTileIndices()
Returns an array of Point objects indicating which tiles are checked out for writing. Returns null if none are checked out.
Specified by:
getWritableTileIndices in interface WritableRenderedImage
Returns:
a Point array that indicates the tiles that are checked out for writing, or null if no tiles are checked out for writing.

hasTileWriters

public boolean hasTileWriters()
Returns whether or not any tile is checked out for writing. Semantically equivalent to
 (getWritableTileIndices() != null).
Specified by:
hasTileWriters in interface WritableRenderedImage
Returns:
true if any tile is checked out for writing; false otherwise.

getWritableTile

public WritableRaster getWritableTile(int tileX,
                                      int tileY)
Checks out a tile for writing. All registered TileObservers are notified when a tile goes from having no writers to having one writer.
Specified by:
getWritableTile in interface WritableRenderedImage
Parameters:
tileX - the x index of the tile
tileY - the y index of the tile
Returns:
a WritableRaster that is the tile, indicated by the specified indices, to be checked out for writing.

releaseWritableTile

public void releaseWritableTile(int tileX,
                                int tileY)
Relinquishes permission to write to a tile. If the caller continues to write to the tile, the results are undefined. Calls to this method should only appear in matching pairs with calls to getWritableTile(int, int). Any other leads to undefined results. All registered TileObservers are notified when a tile goes from having one writer to having no writers.
Specified by:
releaseWritableTile in interface WritableRenderedImage
Parameters:
tileX - the x index of the tile
tileY - the y index of the tile
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedImageFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class BufferedImageFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.BufferedImageFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
public class BufferedImageFilter
extends ImageFilter
implements Cloneable

The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm. Examples of these image operators are: ConvolveOp, AffineTransformOp and LookupOp.

See Also:
ImageFilter, BufferedImage, BufferedImageOp

Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
BufferedImageFilter(BufferedImageOp op)
Constructs a BufferedImageFilter with the specified single-source/single-destination operator.
Method Summary
BufferedImageOp | getBufferedImageOp() Returns the BufferedImageOp.
void | imageComplete(int status) Filters the information provided in the imageComplete method of the ImageConsumer interface.
void | setColorModel(ColorModel model) Filters the information provided in the setColorModel method of the ImageConsumer interface.
void | setDimensions(int width, int height) Filters the information provided in the setDimensions method of the ImageConsumer interface.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, resendTopDownLeftRight, setHints, setProperties
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BufferedImageFilter

public BufferedImageFilter(BufferedImageOp op)
Constructs a BufferedImageFilter with the specified single-source/single-destination operator.
Parameters:
op - the specified BufferedImageOp to use to filter a BufferedImage
Method Detail

getBufferedImageOp

public BufferedImageOp getBufferedImageOp()
Returns the BufferedImageOp.
Returns:
the operator of this BufferedImageFilter.

setDimensions

public void setDimensions(int width,
                          int height)
Filters the information provided in the setDimensions method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Overrides:
setDimensions in class ImageFilter
Parameters:
width - the width to which to set the width of this BufferedImageFilter
height - the height to which to set the height of this BufferedImageFilter
See Also:
ImageConsumer.setDimensions(int, int)

setColorModel

public void setColorModel(ColorModel model)
Filters the information provided in the setColorModel method of the ImageConsumer interface.

If model is null, this method clears the current ColorModel of this BufferedImageFilter.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Overrides:
setColorModel in class ImageFilter
Parameters:
model - the ColorModel to which to set the ColorModel of this BufferedImageFilter
See Also:
ImageConsumer.setColorModel(java.awt.image.ColorModel)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Overrides:
setPixels in class ImageFilter
Throws:
IllegalArgumentException - if width or height are less than zero.
See Also:
ImageConsumer.setPixels(int, int, int, int, ColorModel, byte[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Overrides:
setPixels in class ImageFilter
Throws:
IllegalArgumentException - if width or height are less than zero.
See Also:
ImageConsumer.setPixels(int, int, int, int, ColorModel, int[], int, int)

imageComplete

public void imageComplete(int status)
Filters the information provided in the imageComplete method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Overrides:
imageComplete in class ImageFilter
Parameters:
status - the status of image loading
Throws:
ImagingOpException - if there was a problem calling the filter method of the BufferedImageOp associated with this instance.
See Also:
ImageConsumer.imageComplete(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedImageOp

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface BufferedImageOp

All Known Implementing Classes:
LookupOp, ConvolveOp, AffineTransformOp, ColorConvertOp, RescaleOp
public interface BufferedImageOp

This interface describes single-input/single-output operations performed on BufferedImage objects. It is implemented by such classes as AffineTransformOp, ConvolveOp, BandCombineOp, and LookupOp. These objects can be passed into a BufferedImageFilter to operate on a BufferedImage in the ImageProducer-ImageFilter-ImageConsumer paradigm. This interface cannot be used to describe more sophisticated Ops such as ones that take multiple sources. Each class implementing this interface will specify whether or not it will allow an in-place filtering operation (i.e. source object equal to the destination object). Note that the restriction to single-input operations means that the values of destination pixels prior to the operation are not used as input to the filter operation.

See Also:
BufferedImage, BufferedImageFilter, AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, RescaleOp

Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | filter(BufferedImage src, BufferedImage dest) Performs a single-input/single-output operation on a BufferedImage.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source image.
RenderingHints | getRenderingHints() Returns the rendering hints for this BufferedImageOp.

Method Detail

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dest)
Performs a single-input/single-output operation on a BufferedImage. If the color models for the two images do not match, a color conversion into the destination color model will be performed. If the destination image is null, a BufferedImage with an appropriate ColorModel will be created. The IllegalArgumentException may be thrown if the source and/or destination image is incompatible with the types of images allowed by the class implementing this filter.

getBounds2D

public Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the filtered destination image. The IllegalArgumentException may be thrown if the source image is incompatible with the types of images allowed by the class implementing this filter.

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands. The IllegalArgumentException may be thrown if the source image is incompatible with the types of images allowed by the class implementing this filter.
Parameters:
src - Source image for the filter operation.
destCM - ColorModel of the destination. If null, the ColorModel of the source will be used.

getPoint2D

public Point2D getPoint2D(Point2D srcPt,
                          Point2D dstPt)
Returns the location of the destination point given a point in the source image. If dstPt is non-null, it will be used to hold the return value.

getRenderingHints

public RenderingHints getRenderingHints()
Returns the rendering hints for this BufferedImageOp. Returns null if no hints have been set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ByteLookupTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ByteLookupTable

java.lang.Object
  |
  +--java.awt.image.LookupTable
        |
        +--java.awt.image.ByteLookupTable
public class ByteLookupTable
extends LookupTable

This class defines a lookup table object. The output of a lookup operation using an object of this class is interpreted as an unsigned byte quantity. The lookup table contains byte data arrays for one or more bands (or components) of an image, and it contains an offset which will be subtracted from the input values before indexing the arrays. This allows an array smaller than the native data size to be provided for a constrained input. If there is only one array in the lookup table, it will be applied to all bands.

See Also:
ShortLookupTable, LookupOp

Constructor Summary
ByteLookupTable(int offset, byte[] data)
Constructs a ByteLookupTable object from an array of bytes representing a lookup table to be applied to all bands.
ByteLookupTable(int offset, byte[][] data)
Constructs a ByteLookupTable object from an array of byte arrays representing a lookup table for each band.
Method Summary
byte[][] | getTable() Returns the lookup table data by reference.
byte[] | lookupPixel(byte[] src, byte[] dst) Returns an array of samples of a pixel, translated with the lookup table.
int[] | lookupPixel(int[] src, int[] dst) Returns an array of samples of a pixel, translated with the lookup table.
Methods inherited from class java.awt.image.LookupTable
getNumComponents, getOffset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteLookupTable

public ByteLookupTable(int offset,
                       byte[][] data)
Constructs a ByteLookupTable object from an array of byte arrays representing a lookup table for each band. The offset will be subtracted from input values before indexing into the arrays. The number of bands is the length of the data argument. The data array for each band is stored as a reference.
Parameters:
offset - the value subtracted from the input values before indexing into the arrays
data - an array of byte arrays representing a lookup table for each band
Throws:
IllegalArgumentException - if offset is is less than 0 or if the length of data is less than 1

ByteLookupTable

public ByteLookupTable(int offset,
                       byte[] data)
Constructs a ByteLookupTable object from an array of bytes representing a lookup table to be applied to all bands. The offset will be subtracted from input values before indexing into the array. The data array is stored as a reference.
Parameters:
offset - the value subtracted from the input values before indexing into the array
data - an array of bytes
Throws:
IllegalArgumentException - if offset is is less than 0 or if the length of data is less than 1
Method Detail

getTable

public final byte[][] getTable()
Returns the lookup table data by reference. If this ByteLookupTable was constructed using a single byte array, the length of the returned array is one.
Returns:
the data array of this ByteLookupTable.

lookupPixel

public int[] lookupPixel(int[] src,
                         int[] dst)
Returns an array of samples of a pixel, translated with the lookup table. The source and destination array can be the same array. Array dst is returned.
Overrides:
lookupPixel in class LookupTable
Parameters:
src - the source array.
dst - the destination array. This array must be at least as long as src. If dst is null, a new array will be allocated having the same length as src.
Returns:
the array dst, an int array of samples.
Throws:
ArrayIndexOutOfBoundsException - if src is longer than dst or if for any element i of src, src[i]-offset is either less than zero or greater than or equal to the length of the lookup table for any band.

lookupPixel

public byte[] lookupPixel(byte[] src,
                          byte[] dst)
Returns an array of samples of a pixel, translated with the lookup table. The source and destination array can be the same array. Array dst is returned.
Parameters:
src - the source array.
dst - the destination array. This array must be at least as long as src. If dst is null, a new array will be allocated having the same length as src.
Returns:
the array dst, an int array of samples.
Throws:
ArrayIndexOutOfBoundsException - if src is longer than dst or if for any element i of src, (src[i]&0xff)-offset is either less than zero or greater than or equal to the length of the lookup table for any band.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.image.AffineTransformOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.AffineTransformOp

No usage of java.awt.image.AffineTransformOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.AreaAveragingScaleFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.AreaAveragingScaleFilter

No usage of java.awt.image.AreaAveragingScaleFilter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.BandCombineOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.BandCombineOp

No usage of java.awt.image.BandCombineOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.BandedSampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.BandedSampleModel

No usage of java.awt.image.BandedSampleModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.BufferedImageFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.BufferedImageFilter

No usage of java.awt.image.BufferedImageFilter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ByteLookupTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ByteLookupTable

No usage of java.awt.image.ByteLookupTable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ColorConvertOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ColorConvertOp

No usage of java.awt.image.ColorConvertOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ComponentColorModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ComponentColorModel

No usage of java.awt.image.ComponentColorModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ConvolveOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ConvolveOp

No usage of java.awt.image.ConvolveOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.CropImageFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.CropImageFilter

No usage of java.awt.image.CropImageFilter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DataBufferByte

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DataBufferByte

No usage of java.awt.image.DataBufferByte

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DataBufferInt

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DataBufferInt

No usage of java.awt.image.DataBufferInt

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DataBufferShort

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DataBufferShort

No usage of java.awt.image.DataBufferShort

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DataBufferUShort

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DataBufferUShort

No usage of java.awt.image.DataBufferUShort

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DirectColorModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DirectColorModel

No usage of java.awt.image.DirectColorModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.FilteredImageSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.FilteredImageSource

No usage of java.awt.image.FilteredImageSource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ImagingOpException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ImagingOpException

No usage of java.awt.image.ImagingOpException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.LookupOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.LookupOp

No usage of java.awt.image.LookupOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.MemoryImageSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.MemoryImageSource

No usage of java.awt.image.MemoryImageSource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.MultiPixelPackedSampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.MultiPixelPackedSampleModel

No usage of java.awt.image.MultiPixelPackedSampleModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.PixelGrabber

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.PixelGrabber

No usage of java.awt.image.PixelGrabber

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.PixelInterleavedSampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.PixelInterleavedSampleModel

No usage of java.awt.image.PixelInterleavedSampleModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.RasterFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.RasterFormatException

No usage of java.awt.image.RasterFormatException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.RescaleOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.RescaleOp

No usage of java.awt.image.RescaleOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ShortLookupTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ShortLookupTable

No usage of java.awt.image.ShortLookupTable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.SinglePixelPackedSampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.SinglePixelPackedSampleModel

No usage of java.awt.image.SinglePixelPackedSampleModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.BufferedImage

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.BufferedImage

Packages that use BufferedImage
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.

Uses of BufferedImage in java.awt

Methods in java.awt that return BufferedImage
abstract BufferedImage | GraphicsConfiguration.createCompatibleImage(int width, int height) Returns a BufferedImage with a data layout and color model compatible with this GraphicsConfiguration.
abstract BufferedImage | GraphicsConfiguration.createCompatibleImage(int width, int height, int transparency) Returns a BufferedImage that supports the specified transparency and has a data layout and color model compatible with this GraphicsConfiguration.
BufferedImage | TexturePaint.getImage() Returns the BufferedImage texture used to fill the shapes.
BufferedImage | Robot.createScreenCapture(Rectangle screenRect) Creates an image containing pixels read from the screen.

Methods in java.awt with parameters of type BufferedImage
abstract Graphics2D | GraphicsEnvironment.createGraphics(BufferedImage img) Returns a Graphics2D object for rendering into the specified BufferedImage.
abstract void | Graphics2D.drawImage(BufferedImage img, BufferedImageOp op, int x, int y) Renders a BufferedImage that is filtered with a BufferedImageOp.

Constructors in java.awt with parameters of type BufferedImage
TexturePaint(BufferedImage txtr, Rectangle2D anchor)
Constructs a TexturePaint object.

Uses of BufferedImage in java.awt.image

Methods in java.awt.image that return BufferedImage
BufferedImage | LookupOp.filter(BufferedImage src, BufferedImage dst) Performs a lookup operation on a BufferedImage.
BufferedImage | LookupOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | BufferedImageOp.filter(BufferedImage src, BufferedImage dest) Performs a single-input/single-output operation on a BufferedImage.
BufferedImage | BufferedImageOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | BufferedImage.getSubimage(int x, int y, int w, int h) Returns a subimage defined by a specified rectangular region.
BufferedImage | ConvolveOp.filter(BufferedImage src, BufferedImage dst) Performs a convolution on BufferedImages.
BufferedImage | ConvolveOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | AffineTransformOp.filter(BufferedImage src, BufferedImage dst) Transforms the source BufferedImage and stores the results in the destination BufferedImage.
BufferedImage | AffineTransformOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | ColorConvertOp.filter(BufferedImage src, BufferedImage dest) ColorConverts the source BufferedImage.
BufferedImage | ColorConvertOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands, given this source.
BufferedImage | RescaleOp.filter(BufferedImage src, BufferedImage dst) Rescales the source BufferedImage.
BufferedImage | RescaleOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | IndexColorModel.convertToIntDiscrete(Raster raster, boolean forceARGB) Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel.

Methods in java.awt.image with parameters of type BufferedImage
BufferedImage | LookupOp.filter(BufferedImage src, BufferedImage dst) Performs a lookup operation on a BufferedImage.
Rectangle2D | LookupOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
BufferedImage | LookupOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | BufferedImageOp.filter(BufferedImage src, BufferedImage dest) Performs a single-input/single-output operation on a BufferedImage.
Rectangle2D | BufferedImageOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
BufferedImage | BufferedImageOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | ConvolveOp.filter(BufferedImage src, BufferedImage dst) Performs a convolution on BufferedImages.
BufferedImage | ConvolveOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
Rectangle2D | ConvolveOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
BufferedImage | AffineTransformOp.filter(BufferedImage src, BufferedImage dst) Transforms the source BufferedImage and stores the results in the destination BufferedImage.
Rectangle2D | AffineTransformOp.getBounds2D(BufferedImage src) Returns the bounding box of the transformed destination.
BufferedImage | AffineTransformOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | ColorConvertOp.filter(BufferedImage src, BufferedImage dest) ColorConverts the source BufferedImage.
Rectangle2D | ColorConvertOp.getBounds2D(BufferedImage src) Returns the bounding box of the destination, given this source.
BufferedImage | ColorConvertOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands, given this source.
BufferedImage | RescaleOp.filter(BufferedImage src, BufferedImage dst) Rescales the source BufferedImage.
Rectangle2D | RescaleOp.getBounds2D(BufferedImage src) Returns the bounding box of the rescaled destination image.
BufferedImage | RescaleOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ColorModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ColorModel

Packages that use ColorModel
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.

Uses of ColorModel in java.awt

Methods in java.awt that return ColorModel
ColorModel | Component.getColorModel() Gets the instance of ColorModel used to display the component on the output device.
abstract ColorModel | GraphicsConfiguration.getColorModel() Returns the ColorModel associated with this GraphicsConfiguration.
abstract ColorModel | GraphicsConfiguration.getColorModel(int transparency) Returns the ColorModel associated with this GraphicsConfiguration that supports the specified transparency.
ColorModel | PaintContext.getColorModel() Returns the ColorModel of the output.
abstract ColorModel | Toolkit.getColorModel() Determines the color model of this toolkit's screen.

Methods in java.awt with parameters of type ColorModel
PaintContext | TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
PaintContext | Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate a solid color pattern.
CompositeContext | AlphaComposite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context for the compositing operation.
CompositeContext | Composite.createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) Creates a context containing state that is used to perform the compositing operation.
PaintContext | Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a PaintContext used to generate the color pattern.
PaintContext | SystemColor.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.

Uses of ColorModel in java.awt.image

Subclasses of ColorModel in java.awt.image
class | ComponentColorModel A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element.
class | DirectColorModel The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
class | IndexColorModel The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
class | PackedColorModel The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.

Fields in java.awt.image declared as ColorModel
protected ColorModel | RGBImageFilter.origmodel The ColorModel to be replaced by newmodel when the user calls substituteColorModel.
protected ColorModel | RGBImageFilter.newmodel The ColorModel with which to replace origmodel when the user calls substituteColorModel.

Methods in java.awt.image that return ColorModel
ColorModel | PixelGrabber.getColorModel() Get the ColorModel for the pixels stored in the array.
ColorModel | RenderedImage.getColorModel() Returns the ColorModel associated with this image.
ColorModel | BufferedImage.getColorModel() Returns the ColorModel.
static ColorModel | ColorModel.getRGBdefault() Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.
ColorModel | ColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
ColorModel | ComponentColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
ColorModel | DirectColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.

Methods in java.awt.image with parameters of type ColorModel
void | ImageFilter.setColorModel(ColorModel model) Filter the information provided in the setColorModel method of the ImageConsumer interface.
void | ImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
void | ImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
void | ReplicateScaleFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Choose which rows and columns of the delivered byte pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
void | ReplicateScaleFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Choose which rows and columns of the delivered int pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
void | PixelGrabber.setColorModel(ColorModel model) The setColorModel method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | PixelGrabber.setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOff, int srcScan) The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | PixelGrabber.setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, int[] pixels, int srcOff, int srcScan) The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | RGBImageFilter.setColorModel(ColorModel model) If the ColorModel is an IndexColorModel, and the subclass has set the canFilterIndexColorModel flag to true, we substitute a filtered version of the color model here and wherever that original ColorModel object appears in the setPixels methods.
void | RGBImageFilter.substituteColorModel(ColorModel oldcm, ColorModel newcm) Registers two ColorModel objects for substitution.
void | RGBImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel.
void | RGBImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel, otherwise converts the buffer of integer pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method to be converted one by one.
BufferedImage | LookupOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | BufferedImageOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
BufferedImage | ConvolveOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
void | ImageConsumer.setColorModel(ColorModel model) The ColorModel object used for the majority of the pixels reported using the setPixels method calls.
void | ImageConsumer.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) The pixels of the image are delivered using one or more calls to the setPixels method.
void | ImageConsumer.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) The pixels of the image are delivered using one or more calls to the setPixels method.
void | CropImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Determine whether the delivered byte pixels intersect the region to be extracted and passes through only that subset of pixels that appear in the output region.
void | CropImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Determine if the delivered int pixels intersect the region to be extracted and pass through only that subset of pixels that appear in the output region.
BufferedImage | AffineTransformOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
void | BufferedImageFilter.setColorModel(ColorModel model) Filters the information provided in the setColorModel method of the ImageConsumer interface.
void | BufferedImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
void | BufferedImageFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
void | MemoryImageSource.newPixels(byte[] newpix, ColorModel newmodel, int offset, int scansize) Change to a new byte array to hold the pixels for this image.
void | MemoryImageSource.newPixels(int[] newpix, ColorModel newmodel, int offset, int scansize) Change to a new int array to hold the pixels for this image.
BufferedImage | ColorConvertOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands, given this source.
BufferedImage | RescaleOp.createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
void | AreaAveragingScaleFilter.setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Combine the components for the delivered byte pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.
void | AreaAveragingScaleFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Combine the components for the delivered int pixels into the accumulation arrays and send on any averaged data for rows of pixels that are complete.

Constructors in java.awt.image with parameters of type ColorModel
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster.
MemoryImageSource(int w, int h, ColorModel cm, byte[] pix, int off, int scan)
Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
MemoryImageSource(int w, int h, ColorModel cm, byte[] pix, int off, int scan, Hashtable props)
Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
MemoryImageSource(int w, int h, ColorModel cm, int[] pix, int off, int scan)
Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
MemoryImageSource(int w, int h, ColorModel cm, int[] pix, int off, int scan, Hashtable props)
Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ComponentSampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ComponentSampleModel

Packages that use ComponentSampleModel
java.awt.image Provides classes for creating and modifying images.

Uses of ComponentSampleModel in java.awt.image

Subclasses of ComponentSampleModel in java.awt.image
class | BandedSampleModel This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
class | PixelInterleavedSampleModel This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.DataBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.DataBuffer

Packages that use DataBuffer
java.awt.image Provides classes for creating and modifying images.

Uses of DataBuffer in java.awt.image

Subclasses of DataBuffer in java.awt.image
class | DataBufferByte This class extends DataBuffer and stores data internally as bytes.
class | DataBufferInt This class extends DataBuffer and stores data internally as integers.
class | DataBufferShort This class extends DataBuffer and stores data internally as shorts.
class | DataBufferUShort This class extends DataBuffer and stores data internally as shorts.

Fields in java.awt.image declared as DataBuffer
protected  DataBuffer Raster.dataBuffer
The DataBuffer that stores the image data.

Methods in java.awt.image that return DataBuffer
abstract DataBuffer | SampleModel.createDataBuffer() Creates a DataBuffer that corresponds to this SampleModel.
DataBuffer | ComponentSampleModel.createDataBuffer() Creates a DataBuffer that corresponds to this ComponentSampleModel.
DataBuffer | BandedSampleModel.createDataBuffer() Creates a DataBuffer that corresponds to this BandedSampleModel, The DataBuffer's data type, number of banks, and size will be consistent with this BandedSampleModel.
DataBuffer | Raster.getDataBuffer() Returns the DataBuffer associated with this Raster.
DataBuffer | MultiPixelPackedSampleModel.createDataBuffer() Creates a DataBuffer that corresponds to this MultiPixelPackedSampleModel.
DataBuffer | SinglePixelPackedSampleModel.createDataBuffer() Creates a DataBuffer that corresponds to this SinglePixelPackedSampleModel.

Methods in java.awt.image with parameters of type DataBuffer
int[] | SampleModel.getPixel(int x, int y, int[] iArray, DataBuffer data) Returns the samples for a specified pixel in an int array, one sample per array element.
abstract Object | SampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | SampleModel.getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
abstract void | SampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | SampleModel.setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType.
float[] | SampleModel.getPixel(int x, int y, float[] fArray, DataBuffer data) Returns the samples for the specified pixel in an array of float.
double[] | SampleModel.getPixel(int x, int y, double[] dArray, DataBuffer data) Returns the samples for the specified pixel in an array of double.
int[] | SampleModel.getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for a rectangle of pixels in an int array, one sample per array element.
float[] | SampleModel.getPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data) Returns all samples for a rectangle of pixels in a float array, one sample per array element.
double[] | SampleModel.getPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data) Returns all samples for a rectangle of pixels in a double array, one sample per array element.
abstract int | SampleModel.getSample(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as an int.
float | SampleModel.getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
double | SampleModel.getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
int[] | SampleModel.getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
float[] | SampleModel.getSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.
double[] | SampleModel.getSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data) Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.
void | SampleModel.setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | SampleModel.setPixel(int x, int y, float[] fArray, DataBuffer data) Sets a pixel in the DataBuffer using a float array of samples for input.
void | SampleModel.setPixel(int x, int y, double[] dArray, DataBuffer data) Sets a pixel in the DataBuffer using a double array of samples for input.
void | SampleModel.setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | SampleModel.setPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data) Sets all samples for a rectangle of pixels from a float array containing one sample per array element.
void | SampleModel.setPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data) Sets all samples for a rectangle of pixels from a double array containing one sample per array element.
abstract void | SampleModel.setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | SampleModel.setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | SampleModel.setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | SampleModel.setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
void | SampleModel.setSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element.
void | SampleModel.setSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element.
Object | ComponentSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int[] | ComponentSampleModel.getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples for the specified pixel in an int array, one sample per array element.
int[] | ComponentSampleModel.getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
int | ComponentSampleModel.getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
float | ComponentSampleModel.getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
double | ComponentSampleModel.getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
int[] | ComponentSampleModel.getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
void | ComponentSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | ComponentSampleModel.setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | ComponentSampleModel.setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | ComponentSampleModel.setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | ComponentSampleModel.setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | ComponentSampleModel.setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | ComponentSampleModel.setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
Object | BandedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int[] | BandedSampleModel.getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples for the specified pixel in an int array.
int[] | BandedSampleModel.getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per data array element.
int | BandedSampleModel.getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
float | BandedSampleModel.getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
double | BandedSampleModel.getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
int[] | BandedSampleModel.getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
void | BandedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | BandedSampleModel.setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | BandedSampleModel.setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | BandedSampleModel.setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | BandedSampleModel.setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | BandedSampleModel.setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | BandedSampleModel.setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
static WritableRaster | Raster.createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | Raster.createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location) Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.
static Raster | Raster.createRaster(SampleModel sm, DataBuffer db, Point location) Creates a Raster with the specified SampleModel and DataBuffer.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, DataBuffer db, Point location) Creates a WritableRaster with the specified SampleModel and DataBuffer.
int | MultiPixelPackedSampleModel.getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x, y).
void | MultiPixelPackedSampleModel.setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x, y) in the DataBuffer using an int for input.
Object | MultiPixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int[] | MultiPixelPackedSampleModel.getPixel(int x, int y, int[] iArray, DataBuffer data) Returns the specified single band pixel in the first element of an int array.
void | MultiPixelPackedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | MultiPixelPackedSampleModel.setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array for input.
Object | SinglePixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int[] | SinglePixelPackedSampleModel.getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples in for the specified pixel in an int array.
int[] | SinglePixelPackedSampleModel.getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
int | SinglePixelPackedSampleModel.getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
int[] | SinglePixelPackedSampleModel.getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
void | SinglePixelPackedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | SinglePixelPackedSampleModel.setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | SinglePixelPackedSampleModel.setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | SinglePixelPackedSampleModel.setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | SinglePixelPackedSampleModel.setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.

Constructors in java.awt.image with parameters of type DataBuffer
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a Raster with the given SampleModel and DataBuffer.
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a WritableRaster with the given SampleModel and DataBuffer.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ImageFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ImageFilter

Packages that use ImageFilter
java.awt.image | Provides classes for creating and modifying images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ImageFilter in java.awt.image

Subclasses of ImageFilter in java.awt.image
class | AreaAveragingScaleFilter An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
class | BufferedImageFilter The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
class | CropImageFilter An ImageFilter class for cropping images.
class | ReplicateScaleFilter An ImageFilter class for scaling images using the simplest algorithm.
class | RGBImageFilter This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.

Methods in java.awt.image that return ImageFilter
 ImageFilter ImageFilter.getFilterInstance(ImageConsumer ic)
Returns a unique instance of an ImageFilter object which will actually perform the filtering for the specified ImageConsumer.

Constructors in java.awt.image with parameters of type ImageFilter
FilteredImageSource(ImageProducer orig, ImageFilter imgf)
Constructs an ImageProducer object from an existing ImageProducer and a filter object.

Uses of ImageFilter in javax.swing

Subclasses of ImageFilter in javax.swing
 class GrayFilter
An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.IndexColorModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.IndexColorModel

Packages that use IndexColorModel
java.awt.image Provides classes for creating and modifying images.

Uses of IndexColorModel in java.awt.image

Methods in java.awt.image that return IndexColorModel
 IndexColorModel RGBImageFilter.filterIndexColorModel(IndexColorModel icm)
Filters an IndexColorModel object by running each entry in its color tables through the filterRGB function that RGBImageFilter subclasses must provide.

Methods in java.awt.image with parameters of type IndexColorModel
 IndexColorModel RGBImageFilter.filterIndexColorModel(IndexColorModel icm)
Filters an IndexColorModel object by running each entry in its color tables through the filterRGB function that RGBImageFilter subclasses must provide.

Constructors in java.awt.image with parameters of type IndexColorModel
BufferedImage(int width, int height, int imageType, IndexColorModel cm)
Constructs a BufferedImage of one of the predefined image types: TYPE_BYTE_BINARY or TYPE_BYTE_INDEXED

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.Kernel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.Kernel

Packages that use Kernel
java.awt.image Provides classes for creating and modifying images.

Uses of Kernel in java.awt.image

Methods in java.awt.image that return Kernel
 Kernel ConvolveOp.getKernel()
Returns the Kernel.

Constructors in java.awt.image with parameters of type Kernel
ConvolveOp(Kernel kernel, int edgeCondition, RenderingHints hints)
Constructs a ConvolveOp given a Kernel, an edge condition, and a RenderingHints object (which may be null).
ConvolveOp(Kernel kernel)
Constructs a ConvolveOp given a Kernel.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.LookupTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.LookupTable

Packages that use LookupTable
java.awt.image Provides classes for creating and modifying images.

Uses of LookupTable in java.awt.image

Subclasses of LookupTable in java.awt.image
class | ByteLookupTable This class defines a lookup table object.
class | ShortLookupTable This class defines a lookup table object.

Methods in java.awt.image that return LookupTable
 LookupTable LookupOp.getTable()
Returns the LookupTable.

Constructors in java.awt.image with parameters of type LookupTable
LookupOp(LookupTable lookup, RenderingHints hints)
Constructs a LookupOp object given the lookup table and a RenderingHints object (which may be null).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.PackedColorModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.PackedColorModel

Packages that use PackedColorModel
java.awt.image Provides classes for creating and modifying images.

Uses of PackedColorModel in java.awt.image

Subclasses of PackedColorModel in java.awt.image
 class DirectColorModel
The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.Raster

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.Raster

Packages that use Raster
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.

Uses of Raster in java.awt

Methods in java.awt that return Raster
 Raster PaintContext.getRaster(int x, int y, int w, int h)
Returns a Raster containing the colors generated for the graphics operation.

Methods in java.awt with parameters of type Raster
 void CompositeContext.compose(Raster src, Raster dstIn, WritableRaster dstOut)
Composes the two source Raster objects and places the result in the destination WritableRaster.

Uses of Raster in java.awt.image

Subclasses of Raster in java.awt.image
 class WritableRaster
This class extends Raster to provide pixel writing capabilities.

Fields in java.awt.image declared as Raster
protected  Raster Raster.parent
The parent of this Raster, or null.

Methods in java.awt.image that return Raster
Raster | RenderedImage.getTile(int tileX, int tileY) Returns tile (tileX, tileY).
Raster | RenderedImage.getData() Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).
Raster | RenderedImage.getData(Rectangle rect) Computes and returns an arbitrary region of the RenderedImage.
Raster | BufferedImage.getTile(int tileX, int tileY) Returns tile (tileX, tileY).
Raster | BufferedImage.getData() Returns the image as one large tile.
Raster | BufferedImage.getData(Rectangle rect) Computes and returns an arbitrary region of the BufferedImage.
static Raster | Raster.createRaster(SampleModel sm, DataBuffer db, Point location) Creates a Raster with the specified SampleModel and DataBuffer.
Raster | Raster.getParent() Returns the parent Raster (if any) of this Raster, or else null.
Raster | Raster.createTranslatedChild(int childMinX, int childMinY) Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location.
Raster | Raster.createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList) Returns a new Raster which shares all or part of this Raster's DataBuffer.

Methods in java.awt.image with parameters of type Raster
WritableRaster | LookupOp.filter(Raster src, WritableRaster dst) Performs a lookup operation on a Raster.
Rectangle2D | LookupOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
WritableRaster | LookupOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
void | BufferedImage.setData(Raster r) Sets a rectangular region of the image to the contents of the specified Raster r, which is assumed to be in the same coordinate space as the BufferedImage.
WritableRaster | ConvolveOp.filter(Raster src, WritableRaster dst) Performs a convolution on Rasters.
WritableRaster | ConvolveOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
Rectangle2D | ConvolveOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
boolean | ColorModel.isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not.
void | WritableRaster.setDataElements(int x, int y, Raster inRaster) Sets the data for a rectangle of pixels from an input Raster.
void | WritableRaster.setRect(Raster srcRaster) Copies pixels from Raster srcRaster to this WritableRaster.
void | WritableRaster.setRect(int dx, int dy, Raster srcRaster) Copies pixels from Raster srcRaster to this WritableRaster.
boolean | ComponentColorModel.isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel; false if it is not.
WritableRaster | BandCombineOp.filter(Raster src, WritableRaster dst) Transforms the Raster using the matrix specified in the constructor.
Rectangle2D | BandCombineOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.
WritableRaster | BandCombineOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
boolean | DirectColorModel.isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not.
void | WritableRenderedImage.setData(Raster r) Sets a rect of the image to the contents of the Raster r, which is assumed to be in the same coordinate space as the WritableRenderedImage.
WritableRaster | AffineTransformOp.filter(Raster src, WritableRaster dst) Transforms the source Raster and stores the results in the destination Raster.
Rectangle2D | AffineTransformOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.
WritableRaster | AffineTransformOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | RasterOp.filter(Raster src, WritableRaster dest) Performs a single-input/single-output operation from a source Raster to a destination Raster.
Rectangle2D | RasterOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
WritableRaster | RasterOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | ColorConvertOp.filter(Raster src, WritableRaster dest) ColorConverts the image data in the source Raster.
Rectangle2D | ColorConvertOp.getBounds2D(Raster src) Returns the bounding box of the destination, given this source.
WritableRaster | ColorConvertOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
WritableRaster | RescaleOp.filter(Raster src, WritableRaster dst) Rescales the pixel data in the source Raster.
Rectangle2D | RescaleOp.getBounds2D(Raster src) Returns the bounding box of the rescaled destination Raster.
WritableRaster | RescaleOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
boolean | IndexColorModel.isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel or false if it is not compatible with this ColorModel.
BufferedImage | IndexColorModel.convertToIntDiscrete(Raster raster, boolean forceARGB) Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel.

Constructors in java.awt.image with parameters of type Raster
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.ReplicateScaleFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.ReplicateScaleFilter

Packages that use ReplicateScaleFilter
java.awt.image Provides classes for creating and modifying images.

Uses of ReplicateScaleFilter in java.awt.image

Subclasses of ReplicateScaleFilter in java.awt.image
 class AreaAveragingScaleFilter
An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.RGBImageFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.RGBImageFilter

Packages that use RGBImageFilter
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of RGBImageFilter in javax.swing

Subclasses of RGBImageFilter in javax.swing
 class GrayFilter
An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.SampleModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.SampleModel

Packages that use SampleModel
java.awt.image Provides classes for creating and modifying images.

Uses of SampleModel in java.awt.image

Subclasses of SampleModel in java.awt.image
class | BandedSampleModel This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
class | ComponentSampleModel This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer.
class | MultiPixelPackedSampleModel The MultiPixelPackedSampleModel class represents one-banded images and can pack multiple one-sample pixels into one data element.
class | PixelInterleavedSampleModel This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
class | SinglePixelPackedSampleModel This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel.

Fields in java.awt.image declared as SampleModel
protected  SampleModel Raster.sampleModel
The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.

Methods in java.awt.image that return SampleModel
abstract SampleModel | SampleModel.createCompatibleSampleModel(int w, int h) Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height.
abstract SampleModel | SampleModel.createSubsetSampleModel(int[] bands) Creates a new SampleModel with a subset of the bands of this SampleModel.
SampleModel | ComponentSampleModel.createCompatibleSampleModel(int w, int h) Creates a new ComponentSampleModel with the specified width and height.
SampleModel | ComponentSampleModel.createSubsetSampleModel(int[] bands) This creates a new ComponentSampleModel with a subset of the bands of this ComponentSampleModel.
SampleModel | PixelInterleavedSampleModel.createCompatibleSampleModel(int w, int h) Creates a new PixelInterleavedSampleModel with the specified width and height.
SampleModel | PixelInterleavedSampleModel.createSubsetSampleModel(int[] bands) Creates a new PixelInterleavedSampleModel with a subset of the bands of this PixelInterleavedSampleModel.
SampleModel | BandedSampleModel.createCompatibleSampleModel(int w, int h) Creates a new BandedSampleModel with the specified width and height.
SampleModel | BandedSampleModel.createSubsetSampleModel(int[] bands) Creates a new BandedSampleModel with a subset of the bands of this BandedSampleModel.
SampleModel | RenderedImage.getSampleModel() Returns the SampleModel associated with this image.
SampleModel | BufferedImage.getSampleModel() Returns the SampleModel associated with this BufferedImage.
SampleModel | Raster.getSampleModel() Returns the SampleModel that describes the layout of the image data.
SampleModel | ColorModel.createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
SampleModel | PackedColorModel.createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
SampleModel | ComponentColorModel.createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height, that has a data layout compatible with this ColorModel.
SampleModel | MultiPixelPackedSampleModel.createCompatibleSampleModel(int w, int h) Creates a new MultiPixelPackedSampleModel with the specified width and height.
SampleModel | MultiPixelPackedSampleModel.createSubsetSampleModel(int[] bands) Creates a new MultiPixelPackedSampleModel with a subset of the bands of this MultiPixelPackedSampleModel.
SampleModel | SinglePixelPackedSampleModel.createCompatibleSampleModel(int w, int h) This creates a new SinglePixelPackedSampleModel with the specified width and height.
SampleModel | SinglePixelPackedSampleModel.createSubsetSampleModel(int[] bands) This creates a new SinglePixelPackedSampleModel with a subset of the bands of this SinglePixelPackedSampleModel.
SampleModel | IndexColorModel.createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.

Methods in java.awt.image with parameters of type SampleModel
static Raster | Raster.createRaster(SampleModel sm, DataBuffer db, Point location) Creates a Raster with the specified SampleModel and DataBuffer.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, Point location) Creates a WritableRaster with the specified SampleModel.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, DataBuffer db, Point location) Creates a WritableRaster with the specified SampleModel and DataBuffer.
boolean | ColorModel.isCompatibleSampleModel(SampleModel sm) Checks if the SampleModel is compatible with this ColorModel.
boolean | PackedColorModel.isCompatibleSampleModel(SampleModel sm) Checks if the specified SampleModel is compatible with this ColorModel.
boolean | ComponentColorModel.isCompatibleSampleModel(SampleModel sm) Checks whether or not the specified SampleModel is compatible with this ColorModel.
boolean | IndexColorModel.isCompatibleSampleModel(SampleModel sm) Checks if the specified SampleModel is compatible with this ColorModel.

Constructors in java.awt.image with parameters of type SampleModel
Raster(SampleModel sampleModel, Point origin)
Constructs a Raster with the given SampleModel.
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a Raster with the given SampleModel and DataBuffer.
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent.
WritableRaster(SampleModel sampleModel, Point origin)
Constructs a WritableRaster with the given SampleModel.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Constructs a WritableRaster with the given SampleModel and DataBuffer.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.WritableRaster

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.WritableRaster

Packages that use WritableRaster
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.

Uses of WritableRaster in java.awt

Methods in java.awt with parameters of type WritableRaster
 void CompositeContext.compose(Raster src, Raster dstIn, WritableRaster dstOut)
Composes the two source Raster objects and places the result in the destination WritableRaster.

Uses of WritableRaster in java.awt.image

Methods in java.awt.image that return WritableRaster
WritableRaster | RenderedImage.copyData(WritableRaster raster) Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.
WritableRaster | LookupOp.filter(Raster src, WritableRaster dst) Performs a lookup operation on a Raster.
WritableRaster | LookupOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
WritableRaster | BufferedImage.getRaster() Returns the WritableRaster.
WritableRaster | BufferedImage.getAlphaRaster() Returns a WritableRaster representing the alpha channel for BufferedImage objects with ColorModel objects that support a separate spatial alpha channel, such as ComponentColorModel and DirectColorModel.
WritableRaster | BufferedImage.copyData(WritableRaster outRaster) Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster.
WritableRaster | BufferedImage.getWritableTile(int tileX, int tileY) Checks out a tile for writing.
static WritableRaster | Raster.createInterleavedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.
static WritableRaster | Raster.createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | Raster.createBandedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.
static WritableRaster | Raster.createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.
static WritableRaster | Raster.createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.
static WritableRaster | Raster.createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location) Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.
static WritableRaster | Raster.createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | Raster.createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
static WritableRaster | Raster.createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location) Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, Point location) Creates a WritableRaster with the specified SampleModel.
static WritableRaster | Raster.createWritableRaster(SampleModel sm, DataBuffer db, Point location) Creates a WritableRaster with the specified SampleModel and DataBuffer.
WritableRaster | Raster.createCompatibleWritableRaster() Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.
WritableRaster | Raster.createCompatibleWritableRaster(int w, int h) Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.
WritableRaster | Raster.createCompatibleWritableRaster(Rectangle rect) Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.
WritableRaster | Raster.createCompatibleWritableRaster(int x, int y, int w, int h) Create a compatible WritableRaster with the specified location (minX, minY) and size (width, height), a new SampleModel, and a new initialized DataBuffer.
WritableRaster | ConvolveOp.filter(Raster src, WritableRaster dst) Performs a convolution on Rasters.
WritableRaster | ConvolveOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
WritableRaster | ColorModel.createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
WritableRaster | ColorModel.getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g.
WritableRaster | PackedColorModel.getAlphaRaster(WritableRaster raster) Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster.
WritableRaster | WritableRaster.getWritableParent() Returns the parent WritableRaster (if any) of this WritableRaster, or else null.
WritableRaster | WritableRaster.createWritableTranslatedChild(int childMinX, int childMinY) Create a WritableRaster with the same size, SampleModel and DataBuffer as this one, but with a different location.
WritableRaster | WritableRaster.createWritableChild(int parentX, int parentY, int w, int h, int childMinX, int childMinY, int[] bandList) Returns a new WritableRaster which shares all or part of this WritableRaster's DataBuffer.
WritableRaster | ComponentColorModel.createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height, that has a data layout (SampleModel) compatible with this ColorModel.
WritableRaster | ComponentColorModel.getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster.
WritableRaster | BandCombineOp.filter(Raster src, WritableRaster dst) Transforms the Raster using the matrix specified in the constructor.
WritableRaster | BandCombineOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | DirectColorModel.createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
WritableRaster | WritableRenderedImage.getWritableTile(int tileX, int tileY) Checks out a tile for writing.
WritableRaster | AffineTransformOp.filter(Raster src, WritableRaster dst) Transforms the source Raster and stores the results in the destination Raster.
WritableRaster | AffineTransformOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | RasterOp.filter(Raster src, WritableRaster dest) Performs a single-input/single-output operation from a source Raster to a destination Raster.
WritableRaster | RasterOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | ColorConvertOp.filter(Raster src, WritableRaster dest) ColorConverts the image data in the source Raster.
WritableRaster | ColorConvertOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
WritableRaster | RescaleOp.filter(Raster src, WritableRaster dst) Rescales the pixel data in the source Raster.
WritableRaster | RescaleOp.createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
WritableRaster | IndexColorModel.createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.

Methods in java.awt.image with parameters of type WritableRaster
WritableRaster | RenderedImage.copyData(WritableRaster raster) Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.
WritableRaster | LookupOp.filter(Raster src, WritableRaster dst) Performs a lookup operation on a Raster.
WritableRaster | BufferedImage.copyData(WritableRaster outRaster) Computes an arbitrary rectangular region of the BufferedImage and copies it into a specified WritableRaster.
WritableRaster | ConvolveOp.filter(Raster src, WritableRaster dst) Performs a convolution on Rasters.
ColorModel | ColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
WritableRaster | ColorModel.getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g.
WritableRaster | PackedColorModel.getAlphaRaster(WritableRaster raster) Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster.
ColorModel | ComponentColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
WritableRaster | ComponentColorModel.getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster.
WritableRaster | BandCombineOp.filter(Raster src, WritableRaster dst) Transforms the Raster using the matrix specified in the constructor.
ColorModel | DirectColorModel.coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
WritableRaster | AffineTransformOp.filter(Raster src, WritableRaster dst) Transforms the source Raster and stores the results in the destination Raster.
WritableRaster | RasterOp.filter(Raster src, WritableRaster dest) Performs a single-input/single-output operation from a source Raster to a destination Raster.
WritableRaster | ColorConvertOp.filter(Raster src, WritableRaster dest) ColorConverts the image data in the source Raster.
WritableRaster | RescaleOp.filter(Raster src, WritableRaster dst) Rescales the pixel data in the source Raster.

Constructors in java.awt.image with parameters of type WritableRaster
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster.
WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.BufferedImageOp

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.BufferedImageOp

Packages that use BufferedImageOp
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.

Uses of BufferedImageOp in java.awt

Methods in java.awt with parameters of type BufferedImageOp
abstract  void Graphics2D.drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
Renders a BufferedImage that is filtered with a BufferedImageOp.

Uses of BufferedImageOp in java.awt.image

Classes in java.awt.image that implement BufferedImageOp
class | AffineTransformOp This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster.
class | ColorConvertOp This class performs a pixel-by-pixel color conversion of the data in the source image.
class | ConvolveOp This class implements a convolution from the source to the destination.
class | LookupOp This class implements a lookup operation from the source to the destination.
class | RescaleOp This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset.

Methods in java.awt.image that return BufferedImageOp
 BufferedImageOp BufferedImageFilter.getBufferedImageOp()
Returns the BufferedImageOp.

Constructors in java.awt.image with parameters of type BufferedImageOp
BufferedImageFilter(BufferedImageOp op)
Constructs a BufferedImageFilter with the specified single-source/single-destination operator.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.ImageConsumer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.ImageConsumer

Packages that use ImageConsumer
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ImageConsumer in java.awt.image

Classes in java.awt.image that implement ImageConsumer
class | AreaAveragingScaleFilter An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
class | BufferedImageFilter The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
class | CropImageFilter An ImageFilter class for cropping images.
class | ImageFilter This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
class | PixelGrabber The PixelGrabber class implements an ImageConsumer which can be attached to an Image or ImageProducer object to retrieve a subset of the pixels in that image.
class | ReplicateScaleFilter An ImageFilter class for scaling images using the simplest algorithm.
class | RGBImageFilter This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.

Fields in java.awt.image declared as ImageConsumer
protected  ImageConsumer ImageFilter.consumer
The consumer of the particular image data stream for which this instance of the ImageFilter is filtering data.

Methods in java.awt.image with parameters of type ImageConsumer
ImageFilter | ImageFilter.getFilterInstance(ImageConsumer ic) Returns a unique instance of an ImageFilter object which will actually perform the filtering for the specified ImageConsumer.
void | FilteredImageSource.addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | FilteredImageSource.isConsumer(ImageConsumer ic) Determines whether an ImageConsumer is on the list of consumers currently interested in data for this image.
void | FilteredImageSource.removeConsumer(ImageConsumer ic) Removes an ImageConsumer from the list of consumers interested in data for this image.
void | FilteredImageSource.startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
void | FilteredImageSource.requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
void | ImageProducer.addConsumer(ImageConsumer ic) This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.
boolean | ImageProducer.isConsumer(ImageConsumer ic) This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
void | ImageProducer.removeConsumer(ImageConsumer ic) This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data.
void | ImageProducer.startProduction(ImageConsumer ic) This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer.
void | ImageProducer.requestTopDownLeftRightResend(ImageConsumer ic) This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.
void | MemoryImageSource.addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | MemoryImageSource.isConsumer(ImageConsumer ic) Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
void | MemoryImageSource.removeConsumer(ImageConsumer ic) Remove an ImageConsumer from the list of consumers interested in data for this image.
void | MemoryImageSource.startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately start delivery of the image data through the ImageConsumer interface.
void | MemoryImageSource.requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.

Uses of ImageConsumer in java.awt.image.renderable

Methods in java.awt.image.renderable with parameters of type ImageConsumer
void | RenderableImageProducer.addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | RenderableImageProducer.isConsumer(ImageConsumer ic) Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
void | RenderableImageProducer.removeConsumer(ImageConsumer ic) Remove an ImageConsumer from the list of consumers interested in data for this image.
void | RenderableImageProducer.startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
void | RenderableImageProducer.requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.

Uses of ImageConsumer in javax.swing

Classes in javax.swing that implement ImageConsumer
 class GrayFilter
An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.ImageObserver

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.ImageObserver

Packages that use ImageObserver
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of ImageObserver in java.applet

Classes in java.applet that implement ImageObserver
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of ImageObserver in java.awt

Classes in java.awt that implement ImageObserver
class | Button This class creates a labeled button.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
class | Choice The Choice class presents a pop-up menu of choices.
class | Component A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
class | Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.
class | Label A Label object is a component for placing text in a container.
class | List The List component presents the user with a scrolling list of text items.
class | Panel Panel is the simplest container class.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
class | TextArea A TextArea object is a multi-line region that displays text.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
class | Window A Window object is a top-level window with no borders and no menubar.

Methods in java.awt with parameters of type ImageObserver
boolean | Component.prepareImage(Image image, ImageObserver observer) Prepares an image for rendering on this component.
boolean | Component.prepareImage(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering on this component at the specified width and height.
int | Component.checkImage(Image image, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.
int | Component.checkImage(Image image, int width, int height, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.
abstract boolean | Graphics.drawImage(Image img, int x, int y, ImageObserver observer) Draws as much of the specified image as is currently available.
abstract boolean | Graphics.drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract boolean | Graphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.
abstract boolean | Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstract boolean | Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract boolean | Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract boolean | Graphics2D.drawImage(Image img, AffineTransform xform, ImageObserver obs) Renders an image, applying a transform from image space into user space before drawing.
abstract boolean | Toolkit.prepareImage(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering.
abstract int | Toolkit.checkImage(Image image, int width, int height, ImageObserver observer) Indicates the construction status of a specified image that is being prepared for display.
abstract int | Image.getWidth(ImageObserver observer) Determines the width of the image.
abstract int | Image.getHeight(ImageObserver observer) Determines the height of the image.
abstract Object | Image.getProperty(String name, ImageObserver observer) Gets a property of this image by name.

Uses of ImageObserver in java.awt.image

Methods in java.awt.image with parameters of type ImageObserver
int | BufferedImage.getWidth(ImageObserver observer) Returns the actual width of the image.
int | BufferedImage.getHeight(ImageObserver observer) Returns the actual height of the image.
Object | BufferedImage.getProperty(String name, ImageObserver observer) Returns a property of the image by name.

Uses of ImageObserver in javax.swing

Classes in javax.swing that implement ImageObserver
class | AbstractButton Defines common behaviors for buttons and menu items.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JComponent The base class for all Swing components except top-level containers.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JDialog The main class for creating a dialog window.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Methods in javax.swing that return ImageObserver
 ImageObserver ImageIcon.getImageObserver()
Returns the image observer for the image.

Methods in javax.swing with parameters of type ImageObserver
void | ImageIcon.setImageObserver(ImageObserver observer) Sets the image observer for the image.
boolean | DebugGraphics.drawImage(Image img, int x, int y, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Overrides Graphics.drawImage.
boolean | DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.

Uses of ImageObserver in javax.swing.colorchooser

Classes in javax.swing.colorchooser that implement ImageObserver
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of ImageObserver in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ImageObserver
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicToolBarUI.DragWindow

Uses of ImageObserver in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ImageObserver
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Uses of ImageObserver in javax.swing.table

Classes in javax.swing.table that implement ImageObserver
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.

Uses of ImageObserver in javax.swing.text

Classes in javax.swing.text that implement ImageObserver
 class JTextComponent
JTextComponent is the base class for swing text components.

Uses of ImageObserver in javax.swing.tree

Classes in javax.swing.tree that implement ImageObserver
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.ImageProducer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.ImageProducer

Packages that use ImageProducer
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Uses of ImageProducer in java.awt

Methods in java.awt that return ImageProducer
abstract  ImageProducer Image.getSource()
Gets the object that produces the pixels for the image.

Methods in java.awt with parameters of type ImageProducer
Image | Component.createImage(ImageProducer producer) Creates an image from the specified image producer.
abstract Image | Toolkit.createImage(ImageProducer producer) Creates an image with the specified image producer.

Uses of ImageProducer in java.awt.image

Classes in java.awt.image that implement ImageProducer
class | FilteredImageSource This class is an implementation of the ImageProducer interface which takes an existing image and a filter object and uses them to produce image data for a new filtered version of the original image.
class | MemoryImageSource This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image.

Methods in java.awt.image that return ImageProducer
 ImageProducer BufferedImage.getSource()
Returns the object that produces the pixels for the image.

Methods in java.awt.image with parameters of type ImageProducer
 void ImageFilter.resendTopDownLeftRight(ImageProducer ip)
Responds to a request for a TopDownLeftRight (TDLR) ordered resend of the pixel data from an ImageConsumer.

Constructors in java.awt.image with parameters of type ImageProducer
PixelGrabber(ImageProducer ip, int x, int y, int w, int h, int[] pix, int off, int scansize)
Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the image produced by the specified ImageProducer into the given array.
FilteredImageSource(ImageProducer orig, ImageFilter imgf)
Constructs an ImageProducer object from an existing ImageProducer and a filter object.

Uses of ImageProducer in java.awt.image.renderable

Classes in java.awt.image.renderable that implement ImageProducer
 class RenderableImageProducer
An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.RasterOp

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.RasterOp

Packages that use RasterOp
java.awt.image Provides classes for creating and modifying images.

Uses of RasterOp in java.awt.image

Classes in java.awt.image that implement RasterOp
class | AffineTransformOp This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster.
class | BandCombineOp This class performs an arbitrary linear combination of the bands in a Raster, using a specified matrix.
class | ColorConvertOp This class performs a pixel-by-pixel color conversion of the data in the source image.
class | ConvolveOp This class implements a convolution from the source to the destination.
class | LookupOp This class implements a lookup operation from the source to the destination.
class | RescaleOp This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.RenderedImage

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.RenderedImage

Packages that use RenderedImage
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Uses of RenderedImage in java.awt

Methods in java.awt with parameters of type RenderedImage
abstract  void Graphics2D.drawRenderedImage(RenderedImage img, AffineTransform xform)
Renders a RenderedImage, applying a transform from image space into user space before drawing.

Uses of RenderedImage in java.awt.image

Subinterfaces of RenderedImage in java.awt.image
 interface WritableRenderedImage
WriteableRenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters and which can be modified and/or written over.

Classes in java.awt.image that implement RenderedImage
 class BufferedImage
The BufferedImage subclass describes an Image with an accessible buffer of image data.

Uses of RenderedImage in java.awt.image.renderable

Methods in java.awt.image.renderable that return RenderedImage
RenderedImage | ContextualRenderedImageFactory.create(RenderContext renderContext, ParameterBlock paramBlock) Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
RenderedImage | RenderedImageFactory.create(ParameterBlock paramBlock, RenderingHints hints) Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints.
RenderedImage | RenderableImageOp.createScaledRendering(int w, int h, RenderingHints hints) Creates a RenderedImage instance of this image with width w, and height h in pixels.
RenderedImage | RenderableImageOp.createDefaultRendering() Gets a RenderedImage instance of this image with a default width and height in pixels.
RenderedImage | RenderableImageOp.createRendering(RenderContext renderContext) Creates a RenderedImage which represents this RenderableImageOp (including its Renderable sources) rendered according to the given RenderContext.
RenderedImage | RenderableImage.createScaledRendering(int w, int h, RenderingHints hints) Creates a RenderedImage instance of this image with width w, and height h in pixels.
RenderedImage | RenderableImage.createDefaultRendering() Returnd a RenderedImage instance of this image with a default width and height in pixels.
RenderedImage | RenderableImage.createRendering(RenderContext renderContext) Creates a RenderedImage that represented a rendering of this image using a given RenderContext.
RenderedImage | ParameterBlock.getRenderedSource(int index) A convenience method to return a source as a RenderedImage.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.TileObserver

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.TileObserver

Packages that use TileObserver
java.awt.image Provides classes for creating and modifying images.

Uses of TileObserver in java.awt.image

Methods in java.awt.image with parameters of type TileObserver
void | BufferedImage.addTileObserver(TileObserver to) Adds a tile observer.
void | BufferedImage.removeTileObserver(TileObserver to) Removes a tile observer.
void | WritableRenderedImage.addTileObserver(TileObserver to) Adds an observer.
void | WritableRenderedImage.removeTileObserver(TileObserver to) Removes an observer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.WritableRenderedImage

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.WritableRenderedImage

Packages that use WritableRenderedImage
java.awt.image Provides classes for creating and modifying images.

Uses of WritableRenderedImage in java.awt.image

Classes in java.awt.image that implement WritableRenderedImage
 class BufferedImage
The BufferedImage subclass describes an Image with an accessible buffer of image data.

Methods in java.awt.image with parameters of type WritableRenderedImage
 void TileObserver.tileUpdate(WritableRenderedImage source, int tileX, int tileY, boolean willBeWritable)
A tile is about to be updated (it is either about to be grabbed for writing, or it is being released from writing).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ColorConvertOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ColorConvertOp

java.lang.Object
  |
  +--java.awt.image.ColorConvertOp
All Implemented Interfaces:
BufferedImageOp, RasterOp
public class ColorConvertOp
extends Object
implements BufferedImageOp, RasterOp

This class performs a pixel-by-pixel color conversion of the data in the source image. The resulting color values are scaled to the precision of the destination image. Color conversion can be specified via an array of ColorSpace objects or an array of ICC_Profile objects.

If the source is a BufferedImage with premultiplied alpha, the color components are divided by the alpha component before color conversion. If the destination is a BufferedImage with premultiplied alpha, the color components are multiplied by the alpha component after conversion. Rasters are treated as having no alpha channel, i.e. all bands are color bands.

If a RenderingHints object is specified in the constructor, the color rendering hint and the dithering hint may be used to control color conversion.

Note that Source and Destination may be the same object.

See Also:
RenderingHints.KEY_COLOR_RENDERING, RenderingHints.KEY_DITHERING

Constructor Summary
ColorConvertOp(ColorSpace srcCspace, ColorSpace dstCspace, RenderingHints hints)
Constructs a new ColorConvertOp from two ColorSpace objects.
ColorConvertOp(ColorSpace cspace, RenderingHints hints)
Constructs a new ColorConvertOp from a ColorSpace object.
ColorConvertOp(ICC_Profile[] profiles, RenderingHints hints)
Constructs a new ColorConvertOp from an array of ICC_Profiles.
ColorConvertOp(RenderingHints hints)
Constructs a new ColorConvertOp which will convert from a source color space to a destination color space.
Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands, given this source.
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
BufferedImage | filter(BufferedImage src, BufferedImage dest) ColorConverts the source BufferedImage.
WritableRaster | filter(Raster src, WritableRaster dest) ColorConverts the image data in the source Raster.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the destination, given this source.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the destination, given this source.
ICC_Profile[] | getICC_Profiles() Returns the array of ICC_Profiles used to construct this ColorConvertOp.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
RenderingHints | getRenderingHints() Returns the rendering hints used by this op.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ColorConvertOp

public ColorConvertOp(RenderingHints hints)
Constructs a new ColorConvertOp which will convert from a source color space to a destination color space. The RenderingHints argument may be null. This Op can be used only with BufferedImages, and will convert directly from the ColorSpace of the source image to that of the destination. The destination argument of the filter method cannot be specified as null.
Parameters:
hints - the RenderingHints object used to control the color conversion, or null

ColorConvertOp

public ColorConvertOp(ColorSpace cspace,
                      RenderingHints hints)
Constructs a new ColorConvertOp from a ColorSpace object. The RenderingHints argument may be null. This Op can be used only with BufferedImages, and is primarily useful when the filter method is invoked with a destination argument of null. In that case, the ColorSpace defines the destination color space for the destination created by the filter method. Otherwise, the ColorSpace defines an intermediate space to which the source is converted before being converted to the destination space.
Parameters:
cspace - defines the destination ColorSpace or an intermediate ColorSpace
hints - the RenderingHints object used to control the color conversion, or null

ColorConvertOp

public ColorConvertOp(ColorSpace srcCspace,
                      ColorSpace dstCspace,
                      RenderingHints hints)
Constructs a new ColorConvertOp from two ColorSpace objects. The RenderingHints argument may be null. This Op is primarily useful for calling the filter method on Rasters, in which case the two ColorSpaces define the operation to be performed on the Rasters. In that case, the number of bands in the source Raster must match the number of components in srcCspace, and the number of bands in the destination Raster must match the number of components in dstCspace. For BufferedImages, the two ColorSpaces define intermediate spaces through which the source is converted before being converted to the destination space.
Parameters:
srcCspace - the source ColorSpace
dstCspace - the destination ColorSpace
hints - the RenderingHints object used to control the color conversion, or null

ColorConvertOp

public ColorConvertOp(ICC_Profile[] profiles,
                      RenderingHints hints)
Constructs a new ColorConvertOp from an array of ICC_Profiles. The RenderingHints argument may be null. The sequence of profiles may include profiles that represent color spaces, profiles that represent effects, etc. If the whole sequence does not represent a well-defined color conversion, an exception is thrown.

For BufferedImages, if the ColorSpace of the source BufferedImage does not match the requirements of the first profile in the array, the first conversion is to an appropriate ColorSpace. If the requirements of the last profile in the array are not met by the ColorSpace of the destination BufferedImage, the last conversion is to the destination's ColorSpace.

For Rasters, the number of bands in the source Raster must match the requirements of the first profile in the array, and the number of bands in the destination Raster must match the requirements of the last profile in the array. The array must have at least two elements or calling the filter method for Rasters will throw an IllegalArgumentException.

Parameters:
profiles - the array of ICC_Profile objects
hints - the RenderingHints object used to control the color conversion, or null
Throws:
IllegalArgumentException - when the profile sequence does not specify a well-defined color conversion
Method Detail

getICC_Profiles

public final ICC_Profile[] getICC_Profiles()
Returns the array of ICC_Profiles used to construct this ColorConvertOp. Returns null if the ColorConvertOp was not constructed from such an array.
Returns:
the array of ICC_Profile objects of this ColorConvertOp, or null if this ColorConvertOp was not constructed with an array of ICC_Profile objects.

filter

public final BufferedImage filter(BufferedImage src,
                                  BufferedImage dest)
ColorConverts the source BufferedImage. If the destination image is null, a BufferedImage will be created with an appropriate ColorModel.
Specified by:
filter in interface BufferedImageOp
Parameters:
src - the source BufferedImage to be converted
dest - the destination BufferedImage, or null
Returns:
dest color converted from src or a new, converted BufferedImage if dest is null
Throws:
IllegalArgumentException - if dest is null and this op was constructed using the constructor which takes only a RenderingHints argument, since the operation is ill defined.

filter

public final WritableRaster filter(Raster src,
                                   WritableRaster dest)
ColorConverts the image data in the source Raster. If the destination Raster is null, a new Raster will be created. The number of bands in the source and destination Rasters must meet the requirements explained above. The constructor used to create this ColorConvertOp must have provided enough information to define both source and destination color spaces. See above. Otherwise, an exception is thrown.
Specified by:
filter in interface RasterOp
Parameters:
src - the source Raster to be converted
dest - the destination WritableRaster, or null
Returns:
dest color converted from src or a new, converted WritableRaster if dest is null
Throws:
IllegalArgumentException - if the number of source or destination bands is incorrect, the source or destination color spaces are undefined, or this op was constructed with one of the constructors that applies only to operations on BufferedImages.

getBounds2D

public final Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the destination, given this source. Note that this will be the same as the the bounding box of the source.
Specified by:
getBounds2D in interface BufferedImageOp
Parameters:
src - the source BufferedImage
Returns:
a Rectangle2D that is the bounding box of the destination, given the specified src

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the destination, given this source. Note that this will be the same as the the bounding box of the source.
Specified by:
getBounds2D in interface RasterOp
Parameters:
src - the source Raster
Returns:
a Rectangle2D that is the bounding box of the destination, given the specified src

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands, given this source.
Specified by:
createCompatibleDestImage in interface BufferedImageOp
Parameters:
src - Source image for the filter operation.
destCM - ColorModel of the destination. If null, an appropriate ColorModel will be used.
Throws:
IllegalArgumentException - if destCM is null and this ColorConvertOp was created without any ICC_Profile or ColorSpace defined for the destination

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
Specified by:
createCompatibleDestRaster in interface RasterOp
Parameters:
src - the specified Raster
Returns:
a WritableRaster with the correct size and number of bands from the specified src
Throws:
IllegalArgumentException - if this ColorConvertOp was created without sufficient information to define the dst and src color spaces

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the destination point given a point in the source. If dstPt is non-null, it will be used to hold the return value. Note that for this class, the destination point will be the same as the source point.
Specified by:
getPoint2D in interface BufferedImageOp
Parameters:
srcPt - the specified source Point2D
dstPt - the destination Point2D
Returns:
dstPt after setting its location to be the same as srcPt

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints used by this op.
Specified by:
getRenderingHints in interface BufferedImageOp
Returns:
the RenderingHints object of this ColorConvertOp
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ColorModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
All Implemented Interfaces:
Transparency
Direct Known Subclasses:
ComponentColorModel, IndexColorModel, PackedColorModel
public abstract class ColorModel
extends Object
implements Transparency

The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component. In order to render an image to the screen, a printer, or another image, pixel values must be converted to color and alpha components. As arguments to or return values from methods of this class, pixels are represented as 32-bit ints or as arrays of primitive types. The number, order, and interpretation of color components for a ColorModel is specified by its ColorSpace. A ColorModel used with pixel data that does not include alpha information treats all pixels as opaque, which is an alpha value of 1.0.

This ColorModel class supports two representations of pixel values. A pixel value can be a single 32-bit int or an array of primitive types. The Java(tm) Platform 1.0 and 1.1 APIs represented pixels as single byte or single int values. For purposes of the ColorModel class, pixel value arguments were passed as ints. The Java(tm) 2 Platform API introduced additional classes for representing images. With BufferedImage or RenderedImage objects, based on Raster and SampleModel classes, pixel values might not be conveniently representable as a single int. Consequently, ColorModel now has methods that accept pixel values represented as arrays of primitive types. The primitive type used by a particular ColorModel object is called its transfer type.

ColorModel objects used with images for which pixel values are not conveniently representable as a single int throw an IllegalArgumentException when methods taking a single int pixel argument are called. Subclasses of ColorModel must specify the conditions under which this occurs. This does not occur with DirectColorModel or IndexColorModel objects.

Currently, the transfer types supported by the Java 2D(tm) API are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, and DataBuffer.TYPE_INT. The transfer type for a particular ColorModel object is specified when the object is created, either explicitly or by default. All subclasses of ColorModel must specify what the possible transfer types are and how the number of elements in the primitive arrays representing pixels is determined.

For BufferedImages, the transfer type of its Raster and of the Raster object's SampleModel (available from the getTransferType methods of these classes) must match that of the ColorModel. The number of elements in an array representing a pixel for the Raster and SampleModel (available from the getNumDataElements methods of these classes) must match that of the ColorModel.

The algorithm used to convert from pixel values to color and alpha components varies by subclass. For example, there is not necessarily a one-to-one correspondence between samples obtained from the SampleModel of a BufferedImage object's Raster and color/alpha components. Even when there is such a correspondence, the number of bits in a sample is not necessarily the same as the number of bits in the corresponding color/alpha component. Each subclass must specify how the translation from pixel values to color/alpha components is done.

Methods in the ColorModel class use two different representations of color and alpha components. In the unnormalized form, each component is an unsigned integral value between 0 and 2n - 1, where n is the number of significant bits for a particular component. If pixel values for a particular ColorModel represent color samples premultiplied by the alpha sample, unnormalized color component values are also premultiplied. In the normalized form, each component is a float value between 0.0 and 1.0. Normalized color component values are not premultiplied.

See Also:
IndexColorModel, ComponentColorModel, PackedColorModel, DirectColorModel, Image, BufferedImage, RenderedImage, ColorSpace, SampleModel, Raster, DataBuffer

Field Summary
protected int | pixel_bits The total number of bits in the pixel.
protected int | transferType Data type of the array used to represent pixel values.
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
 | ColorModel(int bits) Constructs a ColorModel that translates pixels of the specified number of bits to color/alpha components.
protected | ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) Constructs a ColorModel that translates pixel values to color/alpha components.
Method Summary
ColorModel | coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
SampleModel | createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
WritableRaster | createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
boolean | equals(Object obj) Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.
void | finalize() Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
abstract int | getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
WritableRaster | getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g.
abstract int | getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
ColorSpace | getColorSpace() Returns the ColorSpace associated with this ColorModel.
int[] | getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int[] | getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int[] | getComponentSize() Returns an array of the number of bits per color/alpha component.
int | getComponentSize(int componentIdx) Returns the number of bits for the specified color/alpha component.
int | getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
abstract int | getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
float[] | getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset) Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array.
int | getNumColorComponents() Returns the number of color components in this ColorModel.
int | getNumComponents() Returns the number of components, including alpha, in this ColorModel.
int | getPixelSize() Returns the number of bits per pixel described by this ColorModel.
abstract int | getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format.
int | getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
static ColorModel | getRGBdefault() Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.
int | getTransferType() Returns the transfer type of this ColorModel.
int | getTransparency() Returns the transparency.
int[] | getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset) Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array.
boolean | hasAlpha() Returns whether or not alpha is supported in this ColorModel.
int | hashCode() Returns the hash code for this ColorModel.
boolean | isAlphaPremultiplied() Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel.
boolean | isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not.
boolean | isCompatibleSampleModel(SampleModel sm) Checks if the SampleModel is compatible with this ColorModel.
String | toString() Returns the String representation of the contents of this ColorModelobject.
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Field Detail

pixel_bits

protected int pixel_bits
The total number of bits in the pixel.

transferType

protected int transferType
Data type of the array used to represent pixel values.
Constructor Detail

ColorModel

public ColorModel(int bits)
Constructs a ColorModel that translates pixels of the specified number of bits to color/alpha components. The color space is the default RGB ColorSpace, which is sRGB. Pixel values are assumed to include alpha information. If color and alpha information are represented in the pixel value as separate spatial bands, the color bands are assumed not to be premultiplied with the alpha value. The transparency type is java.awt.Transparency.TRANSLUCENT. The transfer type will be the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel (or DataBuffer.TYPE_UNDEFINED if bits is greater than 32). Since this constructor has no information about the number of bits per color and alpha component, any subclass calling this constructor should override any method that requires this information.
Parameters:
bits - the number of bits of a pixel
Throws:
IllegalArgumentException - if the number of bits in bits is less than 1

ColorModel

protected ColorModel(int pixel_bits,
                     int[] bits,
                     ColorSpace cspace,
                     boolean hasAlpha,
                     boolean isAlphaPremultiplied,
                     int transparency,
                     int transferType)
Constructs a ColorModel that translates pixel values to color/alpha components. Color components will be in the specified ColorSpace. pixel_bits is the number of bits in the pixel values. The bits array specifies the number of significant bits per color and alpha component. Its length should be the number of components in the ColorSpace if there is no alpha information in the pixel values, or one more than this number if there is alpha information. hasAlpha indicates whether or not alpha information is present. The boolean isAlphaPremultiplied specifies how to interpret pixel values in which color and alpha information are represented as separate spatial bands. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values. Note that the bits array contains the number of significant bits per color/alpha component after the translation from pixel values. For example, for an IndexColorModel with pixel_bits equal to 16, the bits array might have four elements with each element set to 8.
Parameters:
pixel_bits - the number of bits in the pixel values
bits - array that specifies the number of significant bits per color and alpha component
cspace - the specified ColorSpace
hasAlpha - true if alpha information is present; false otherwise
isAlphaPremultiplied - true if color samples are assumed to be premultiplied by the alpha samples; false otherwise
transparency - what alpha values can be represented by this color model
transferType - the type of the array used to represent pixel values
Throws:
IllegalArgumentException - if the length of the bit array is less than the number of color or alpha components in this ColorModel, or if the transparency is not a valid value.
See Also:
Transparency
Method Detail

getRGBdefault

public static ColorModel getRGBdefault()
Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer. The color space is the default ColorSpace, sRGB. The format for the RGB values is an integer with 8 bits each of alpha, red, green, and blue color components ordered correspondingly from the most significant byte to the least significant byte, as in: 0xAARRGGBB. Color components are not premultiplied by the alpha component. This format does not necessarily represent the native or the most efficient ColorModel for a particular device or for all images. It is merely used as a common color model format.
Returns:
a DirectColorModelobject describing default RGB values.

hasAlpha

public final boolean hasAlpha()
Returns whether or not alpha is supported in this ColorModel.
Returns:
true if alpha is supported in this ColorModel; false otherwise.

isAlphaPremultiplied

public final boolean isAlphaPremultiplied()
Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel. If the boolean is true, this ColorModel is to be used to interpret pixel values in which color and alpha information are represented as separate spatial bands, and color samples are assumed to have been multiplied by the alpha sample.
Returns:
true if the alpha values are premultiplied in the pixel values to be translated by this ColorModel; false otherwise.

getTransferType

public final int getTransferType()
Returns the transfer type of this ColorModel. The transfer type is the type of primitive array used to represent pixel values as arrays.
Returns:
the transfer type.

getPixelSize

public int getPixelSize()
Returns the number of bits per pixel described by this ColorModel.
Returns:
the number of bits per pixel.

getComponentSize

public int getComponentSize(int componentIdx)
Returns the number of bits for the specified color/alpha component. Color components are indexed in the order specified by the ColorSpace. Typically, this order reflects the name of the color space type. For example, for TYPE_RGB, index 0 corresponds to red, index 1 to green, and index 2 to blue. If this ColorModel supports alpha, the alpha component corresponds to the index following the last color component.
Parameters:
componentIdx - the index of the color/alpha component
Returns:
the number of bits for the color/alpha component at the specified index.
Throws:
ArrayIndexOutOfBoundsException - if componentIdx is greater than the number of components or less than zero
NullPointerException - if the number of bits array is null

getComponentSize

public int[] getComponentSize()
Returns an array of the number of bits per color/alpha component. The array contains the color components in the order specified by the ColorSpace, followed by the alpha component, if present.
Returns:
an array of the number of bits per color/alpha component

getTransparency

public int getTransparency()
Returns the transparency. Returns either OPAQUE, BITMASK, or TRANSLUCENT.
Specified by:
getTransparency in interface Transparency
Returns:
the transparency of this ColorModel.
See Also:
Transparency.OPAQUE, Transparency.BITMASK, Transparency.TRANSLUCENT

getNumComponents

public int getNumComponents()
Returns the number of components, including alpha, in this ColorModel. This is equal to the number of color components, optionally plus one, if there is an alpha component.
Returns:
the number of components in this ColorModel

getNumColorComponents

public int getNumColorComponents()
Returns the number of color components in this ColorModel. This is the number of components returned by ColorSpace.getNumComponents().
Returns:
the number of color components in this ColorModel.
See Also:
ColorSpace.getNumComponents()

getRed

public abstract int getRed(int pixel)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is not a pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the red value is 0.
Parameters:
pixel - a specified pixel
Returns:
the value of the red component of the specified pixel.

getGreen

public abstract int getGreen(int pixel)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the green value is 0.
Parameters:
pixel - the specified pixel
Returns:
the value of the green component of the specified pixel.

getBlue

public abstract int getBlue(int pixel)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is a non pre-multiplied value, for example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the blue value is 0.
Parameters:
pixel - the specified pixel
Returns:
the value of the blue component of the specified pixel.

getAlpha

public abstract int getAlpha(int pixel)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int.
Parameters:
pixel - the specified pixel
Returns:
the value of alpha component of the specified pixel.

getRGB

public int getRGB(int pixel)
Returns the color/alpha components of the pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is in a non pre-multiplied format. For example, if the alpha is premultiplied, this method divides it out of the color components. If the alpha value is 0, the color values are 0.
Parameters:
pixel - the specified pixel
Returns:
the RGB value of the color/alpha components of the specified pixel.
See Also:
getRGBdefault()

getRed

public int getRed(Object inData)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. For example, if alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the red value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
inData - an array of pixel values
Returns:
the value of the red component of the specified pixel.
Throws:
ClassCastException - if inData is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this tranferType is not supported by this ColorModel

getGreen

public int getGreen(Object inData)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value will be a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the green value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
inData - an array of pixel values
Returns:
the value of the green component of the specified pixel.
Throws:
ClassCastException - if inData is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this tranferType is not supported by this ColorModel

getBlue

public int getBlue(Object inData)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the blue value will be 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
inData - an array of pixel values
Returns:
the value of the blue component of the specified pixel.
Throws:
ClassCastException - if inData is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this tranferType is not supported by this ColorModel

getAlpha

public int getAlpha(Object inData)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
inData - the specified pixel
Returns:
the alpha component of the specified pixel, scaled from 0 to 255.
Throws:
ClassCastException - if inData is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this tranferType is not supported by this ColorModel

getRGB

public int getRGB(Object inData)
Returns the color/alpha components for the specified pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. The returned value will be in a non pre-multiplied format, i.e. if the alpha is premultiplied, this method will divide it out of the color components (if the alpha value is 0, the color values will be 0).
Parameters:
inData - the specified pixel
Returns:
the color and alpha components of the specified pixel.
See Also:
getRGBdefault()

getDataElements

public Object getDataElements(int rgb,
                              Object pixel)
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the WritableRaster.setDataElements(int, int, java.lang.Object) method of a WritableRaster object. If the pixel variable is null, a new array will be allocated. If pixel is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. The pixel array is returned. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
rgb - the integer pixel representation in the default RGB color model
pixel - the specified pixel
Returns:
an array representation of the specified pixel in this ColorModel.
Throws:
ClassCastException - if pixel is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this method is not supported by this ColorModel
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getComponents

public int[] getComponents(int pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified as an int. An IllegalArgumentException will be thrown if pixel values for this ColorModel are not conveniently representable as a single int. For example, this method can be used to retrieve the components for a specific pixel value in a DirectColorModel. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
pixel - the specified pixel
components - the array to receive the color and alpha components of the specified pixel
offset - the offset into the components array at which to start storing the color and alpha components
Returns:
an array containing the color and alpha components of the specified pixel starting at the specified offset.
Throws:
UnsupportedOperationException - if this method is not supported by this ColorModel

getComponents

public int[] getComponents(Object pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If pixel is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. This method can be used to retrieve the components for a specific pixel value in any ColorModel. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
pixel - the specified pixel
components - an array that receives the color and alpha components of the specified pixel
offset - the index into the components array at which to begin storing the color and alpha components of the specified pixel
Returns:
an array containing the color and alpha components of the specified pixel starting at the specified offset.
Throws:
UnsupportedOperationException - if this method is not supported by this ColorModel

getUnnormalizedComponents

public int[] getUnnormalizedComponents(float[] normComponents,
                                       int normOffset,
                                       int[] components,
                                       int offset)
Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array. Unnormalized components are unsigned integral values between 0 and 2n - 1, where n is the number of bits for a particular component. Normalized components are float values between 0.0 and 1.0. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). An IllegalArgumentException is thrown if the normComponents array is not large enough to hold all the color and alpha components starting at normOffset.
Parameters:
normComponents - an array containing normalized components
normOffset - the offset into the normComponents array at which to start retrieving normalized components
components - an array that receives the components from normComponents
offset - the index into components at which to begin storing normalized components from normComponents
Returns:
an array containing unnormalized color and alpha components.
Throws:
IllegalArgumentException - if the length of normComponents minus normOffset is less than numComponents
UnsupportedOperationException - if the constructor of this ColorModel called the super(bits) constructor, but did not override this method. See the constructor, ColorModel(int).

getNormalizedComponents

public float[] getNormalizedComponents(int[] components,
                                       int offset,
                                       float[] normComponents,
                                       int normOffset)
Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array. Unnormalized components are unsigned integral values between 0 and 2n - 1, where n is the number of bits for a particular component. Normalized components are float values between 0.0 and 1.0. If the normComponents array is null, a new array will be allocated. The normComponents array will be returned. Color/alpha components are stored in the normComponents array starting at normOffset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset). An IllegalArgumentException is thrown if the components array is not large enough to hold all the color and alpha components starting at offset.
Parameters:
components - an array containing unnormalized components
offset - the offset into the components array at which to start retrieving unnormalized components
normComponents - an array that receives the components from components
normOffset - the index into normComponents at which to begin storing unnormalized components from components
Returns:
an array containing normalized color and alpha components.
Throws:
UnsupportedOperationException - if the constructor of this ColorModel called the super(bits) constructor, but did not override this method. See the constructor, ColorModel(int).
UnsupportedOperationException - if this method is unable to determine the number of bits per component

getDataElement

public int getDataElement(int[] components,
                          int offset)
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components. This method will throw an IllegalArgumentException if pixel values for this ColorModel are not conveniently representable as a single int. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving the color and alpha components
Returns:
an int pixel value in this ColorModel corresponding to the specified components.
Throws:
IllegalArgumentException - if pixel values for this ColorModel are not conveniently representable as a single int
ArrayIndexOutOfBoundsException - if the components array is not large enough to hold all of the color and alpha components starting at offset
UnsupportedOperationException - if this method is not supported by this ColorModel

getDataElements

public Object getDataElements(int[] components,
                              int offset,
                              Object obj)
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components (starting at offset). If the obj variable is null, a new array will be allocated. If obj is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if obj is not large enough to hold a pixel value for this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving color and alpha components
obj - the Object representing an array of color and alpha components
Returns:
an Object representing an array of color and alpha components.
Throws:
ClassCastException - if obj is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if obj is not large enough to hold a pixel value for this ColorModel or the components array is not large enough to hold all of the color and alpha components starting at offset
UnsupportedOperationException - if this method is not supported by this ColorModel
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

equals

public boolean equals(Object obj)
Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.
Overrides:
equals in class Object
Parameters:
obj - the Object to test for equality
Returns:
true if the specified Object is an instance of ColorModel and equals this ColorModel; false otherwise.

hashCode

public int hashCode()
Returns the hash code for this ColorModel.
Overrides:
hashCode in class Object
Returns:
a hash code for this ColorModel.

getColorSpace

public final ColorSpace getColorSpace()
Returns the ColorSpace associated with this ColorModel.
Returns:
the ColorSpace of this ColorModel.

coerceData

public ColorModel coerceData(WritableRaster raster,
                             boolean isAlphaPremultiplied)
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state. If the data needs to be coerced, this method will also return an instance of this ColorModel with the isAlphaPremultiplied flag set appropriately. This method will throw a UnsupportedOperationException if it is not supported by this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
raster - the WritableRaster data
isAlphaPremultiplied - true if the alpha is premultiplied; false otherwise
Returns:
a ColorModel object that represents the coerced data.

isCompatibleRaster

public boolean isCompatibleRaster(Raster raster)
Returns true if raster is compatible with this ColorModel and false if it is not. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
raster - the Raster object to test for compatibility
Returns:
true if raster is compatible with this ColorModel.
Throws:
UnsupportedOperationException - if this method has not been implemented for this ColorModel

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
w - the width to apply to the new WritableRaster
h - the height to apply to the new WritableRaster
Returns:
a WritableRaster object with the specified width and height.
Throws:
UnsupportedOperationException - if this method is not supported by this ColorModel
See Also:
WritableRaster, SampleModel

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
w - the width to apply to the new SampleModel
h - the height to apply to the new SampleModel
Returns:
a SampleModel object with the specified width and height.
Throws:
UnsupportedOperationException - if this method is not supported by this ColorModel
See Also:
SampleModel

isCompatibleSampleModel

public boolean isCompatibleSampleModel(SampleModel sm)
Checks if the SampleModel is compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException.
Parameters:
sm - the specified SampleModel
Returns:
true if the specified SampleModel is compatible with this ColorModel; false otherwise.
Throws:
UnsupportedOperationException - if this method is not supported by this ColorModel
See Also:
SampleModel

finalize

public void finalize()
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

getAlphaRaster

public WritableRaster getAlphaRaster(WritableRaster raster)
Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g. ComponentColorModel and DirectColorModel). This method assumes that Raster objects associated with such a ColorModel store the alpha band, if present, as the last band of image data. Returns null if there is no separate spatial alpha channel associated with this ColorModel. If this is an IndexColorModel which has alpha in the lookup table, this method will return null since there is no spatially discrete alpha channel. This method will create a new Raster (but will share the data array). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method to get any behavior other than returning null because the implementation in this abstract class returns null.
Parameters:
raster - the specified Raster
Returns:
a Raster representing the alpha channel of an image, obtained from the specified Raster.

toString

public String toString()
Returns the String representation of the contents of this ColorModelobject.
Overrides:
toString in class Object
Returns:
a String representing the contents of this ColorModel object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentColorModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ComponentColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
        |
        +--java.awt.image.ComponentColorModel
All Implemented Interfaces:
Transparency
public class ComponentColorModel
extends ColorModel

A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element. This class can be used with an arbitrary ColorSpace. The number of color samples in the pixel values must be same as the number of color components in the ColorSpace. There may be a single alpha sample.

For those methods that use a primitive array pixel representation of type transferType, the array length is the same as the number of color and alpha samples. Color samples are stored first in the array followed by the alpha sample, if present. The order of the color samples is specified by the ColorSpace. Typically, this order reflects the name of the color space type. For example, for TYPE_RGB, index 0 corresponds to red, index 1 to green, and index 2 to blue. The transfer types supported are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, and DataBuffer.TYPE_INT.

The translation from pixel values to color/alpha components for display or processing purposes is a one-to-one correspondence of samples to components. The number of bits in a color or alpha sample of a pixel value might not be the same as the number of bits for the corresponding color or alpha component passed to the ComponentColorModel constructor. This class assumes that the least significant n bits of a sample value hold the component value, where n is the number of significant bits for the component passed to the constructor. It also assumes that any higher-order bits in a sample value are zero.

Methods that use a single int pixel representation throw an IllegalArgumentException, unless the number of components for the ComponentColorModel is one--in other words, a single color component and no alpha.

A ComponentColorModel can be used in conjunction with a ComponentSampleModel, a BandedSampleModel, or a PixelInterleavedSampleModel to construct a BufferedImage.

See Also:
ColorModel, ColorSpace, ComponentSampleModel, BandedSampleModel, PixelInterleavedSampleModel, BufferedImage

Fields inherited from class java.awt.image.ColorModel
pixel_bits, transferType
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
ComponentColorModel(ColorSpace colorSpace, int[] bits, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
Constructs a ComponentColorModel from the specified parameters.
Method Summary
ColorModel | coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
SampleModel | createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height, that has a data layout compatible with this ColorModel.
WritableRaster | createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height, that has a data layout (SampleModel) compatible with this ColorModel.
boolean | equals(Object obj) Compares this color model with another for equality.
int | getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
WritableRaster | getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster.
int | getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int[] | getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int[] | getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int | getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int | getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format.
int | getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
boolean | isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel; false if it is not.
boolean | isCompatibleSampleModel(SampleModel sm) Checks whether or not the specified SampleModel is compatible with this ColorModel.
Methods inherited from class java.awt.image.ColorModel
finalize, getColorSpace, getComponentSize, getComponentSize, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, toString
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ComponentColorModel

public ComponentColorModel(ColorSpace colorSpace,
                           int[] bits,
                           boolean hasAlpha,
                           boolean isAlphaPremultiplied,
                           int transparency,
                           int transferType)
Constructs a ComponentColorModel from the specified parameters. Color components will be in the specified ColorSpace. The bits array specifies the number of significant bits per color and alpha component. Its length should be the number of components in the ColorSpace if there is no alpha information in the pixel values, or one more than this number if there is alpha information. An IllegalArgumentException is thrown if the length of the array does not match the number of components. hasAlpha indicates whether alpha information is present. If hasAlpha is true, then the boolean isAlphaPremultiplied specifies how to interpret color and alpha samples in pixel values. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency specifies what alpha values can be represented by this color model. The acceptable transparency values are OPAQUE, BITMASK or TRANSLUCENT. The transferType is the type of primitive array used to represent pixel values. Note that the bits array contains the number of significant bits per color/alpha component after the translation from pixel values.
Parameters:
colorSpace - The ColorSpace associated with this color model.
bits - The number of significant bits per component.
hasAlpha - If true, this color model supports alpha.
isAlphaPremultiplied - If true, alpha is premultiplied.
transparency - Specifies what alpha values can be represented by this color model.
transferType - Specifies the type of primitive array used to represent pixel values.
Throws:
IllegalArgumentException - If the length of the bits array does not match the number of components.
See Also:
ColorSpace, Transparency
Method Detail

getRed

public int getRed(int pixel)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value will be a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the red value will be 0).
Overrides:
getRed in class ColorModel
Parameters:
pixel - The pixel from which you want to get the red color component.
Returns:
The red color component for the specified pixel, as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getGreen

public int getGreen(int pixel)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value will be a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the green value will be 0).
Overrides:
getGreen in class ColorModel
Parameters:
pixel - The pixel from which you want to get the green color component.
Returns:
The green color component for the specified pixel, as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getBlue

public int getBlue(int pixel)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value will be a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the blue value will be 0).
Overrides:
getBlue in class ColorModel
Parameters:
pixel - The pixel from which you want to get the blue color component.
Returns:
The blue color component for the specified pixel, as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getAlpha

public int getAlpha(int pixel)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified as an int.
Overrides:
getAlpha in class ColorModel
Parameters:
pixel - The pixel from which you want to get the alpha component.
Returns:
The alpha component for the specified pixel, as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getRGB

public int getRGB(int pixel)
Returns the color/alpha components of the pixel in the default RGB color model format. A color conversion is done if necessary. The returned value will be in a non pre-multiplied format. If the alpha is premultiplied, this method divides it out of the color components (if the alpha value is 0, the color values will be 0).
Overrides:
getRGB in class ColorModel
Parameters:
pixel - The pixel from which you want to get the color/alpha components.
Returns:
The color/alpha components for the specified pixel, as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getRed

public int getRed(Object inData)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value will be a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the red value will be 0). Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getRed in class ColorModel
Parameters:
inData - The pixel from which you want to get the red color component, specified by an array of data elements of type transferType.
Returns:
The red color component for the specified pixel, as an int.
Throws:
ClassCastException - If inData is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.

getGreen

public int getGreen(Object inData)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the green value will be 0). Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getGreen in class ColorModel
Parameters:
inData - The pixel from which you want to get the green color component, specified by an array of data elements of type transferType.
Returns:
The green color component for the specified pixel, as an int.
Throws:
ClassCastException - If inData is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.

getBlue

public int getBlue(Object inData)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. If the alpha is premultiplied, this method divides it out before returning the value (if the alpha value is 0, the blue value will be 0). Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getBlue in class ColorModel
Parameters:
inData - The pixel from which you want to get the blue color component, specified by an array of data elements of type transferType.
Returns:
The blue color component for the specified pixel, as an int.
Throws:
ClassCastException - If inData is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.

getAlpha

public int getAlpha(Object inData)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getAlpha in class ColorModel
Parameters:
inData - The pixel from which you want to get the alpha component, specified by an array of data elements of type transferType.
Returns:
The alpha component for the specified pixel, as an int.
Throws:
ClassCastException - If inData is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.

getRGB

public int getRGB(Object inData)
Returns the color/alpha components for the specified pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is in a non pre-multiplied format. If the alpha is premultiplied, this method divides it out of the color components (if the alpha value is 0, the color values will be 0). Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getRGB in class ColorModel
Parameters:
inData - The pixel from which you want to get the color/alpha components, specified by an array of data elements of type transferType.
Returns:
The color/alpha components for the specified pixel, as an int.
Throws:
ClassCastException - If inData is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
See Also:
ColorModel.getRGBdefault()

getDataElements

public Object getDataElements(int rgb,
                              Object pixel)
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the setDataElements method of a WritableRaster object. If the pixel parameter is null, a new array is allocated. Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getDataElements in class ColorModel
Parameters:
rgb -
pixel - The integer representation of the pixel.
Throws:
ClassCastException - If pixel is not null and is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - If pixel is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getComponents

public int[] getComponents(int pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method).
Overrides:
getComponents in class ColorModel
Parameters:
pixel - The pixel value specified as an integer.
components - An integer array in which to store the unnormalized color/alpha components. If the components array is null, a new array is allocated.
offset - An offset into the components array.
Returns:
The components array.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.
ArrayIndexOutOfBoundsException - If the components array is not null and is not large enough to hold all the color and alpha components (starting at offset).

getComponents

public int[] getComponents(Object pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then this method might throw an exception if they use an unsupported transferType.
Overrides:
getComponents in class ColorModel
Parameters:
pixel - A pixel value specified by an array of data elements of type transferType.
components - An integer array in which to store the unnormalized color/alpha components. If the components array is null, a new array is allocated.
offset - An offset into the components array.
Returns:
The components array.
Throws:
UnsupportedOperationException - in some cases iff the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
ClassCastException - If pixel is not a primitive array of type transferType.
IllegalArgumentException - If the components array is not null and is not large enough to hold all the color and alpha components (starting at offset), or if pixel is not large enough to hold a pixel value for this ColorModel.

getDataElement

public int getDataElement(int[] components,
                          int offset)
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
Overrides:
getDataElement in class ColorModel
Parameters:
components - An array of unnormalized color/alpha components.
offset - An offset into the components array.
Returns:
A pixel value represented as an int.
Throws:
IllegalArgumentException - If there is more than one component in this ColorModel.

getDataElements

public Object getDataElements(int[] components,
                              int offset,
                              Object obj)
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object.
Overrides:
getDataElements in class ColorModel
Parameters:
components - An array of unnormalized color/alpha components.
offset - The integer offset into the components array.
obj - The object in which to store the data element array representation of the pixel. If obj variable is null, a new array is allocated. If obj is not null, it must be a primitive array of type transferType. An ArrayIndexOutOfBoundsException is thrown if obj is not large enough to hold a pixel value for this ColorModel. Since ComponentColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Returns:
The data element array representation of a pixel in this ColorModel.
Throws:
IllegalArgumentException - If the components array is not large enough to hold all the color and alpha components (starting at offset).
ClassCastException - If obj is not null and is not a primitive array of type transferType.
ArrayIndexOutOfBoundsException - If obj is not large enough to hold a pixel value for this ColorModel.
UnsupportedOperationException - If the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

coerceData

public ColorModel coerceData(WritableRaster raster,
                             boolean isAlphaPremultiplied)
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state. If the data needs to be coerced, this method also returns an instance of this ColorModel with the isAlphaPremultiplied flag set appropriately. Since ColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
coerceData in class ColorModel
Throws:
NullPointerException - if raster is null and data coercion is required.
UnsupportedOperationException - if the transfer type of this ComponentColorModel is not one of the supported transfer types: DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.

isCompatibleRaster

public boolean isCompatibleRaster(Raster raster)
Returns true if raster is compatible with this ColorModel; false if it is not.
Overrides:
isCompatibleRaster in class ColorModel
Parameters:
raster - The Raster object to test for compatibility.
Returns:
true if raster is compatible with this ColorModel, false if it is not.

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
Creates a WritableRaster with the specified width and height, that has a data layout (SampleModel) compatible with this ColorModel.
Overrides:
createCompatibleWritableRaster in class ColorModel
Parameters:
w - The width of the WritableRaster you want to create.
h - The height of the WritableRaster you want to create.
Returns:
A WritableRaster that is compatible with this ColorModel.
See Also:
WritableRaster, SampleModel

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a SampleModel with the specified width and height, that has a data layout compatible with this ColorModel.
Overrides:
createCompatibleSampleModel in class ColorModel
Parameters:
w - The width of the SampleModel you want to create.
h - The height of the SampleModel you want to create.
Returns:
A SampleModel that is compatible with this ColorModel.
See Also:
SampleModel

isCompatibleSampleModel

public boolean isCompatibleSampleModel(SampleModel sm)
Checks whether or not the specified SampleModel is compatible with this ColorModel.
Overrides:
isCompatibleSampleModel in class ColorModel
Parameters:
sm - The SampleModel to test for compatibility.
Returns:
true if the SampleModel is compatible with this ColorModel, false if it is not.
See Also:
SampleModel

getAlphaRaster

public WritableRaster getAlphaRaster(WritableRaster raster)
Returns a Raster representing the alpha channel of an image, extracted from the input Raster. This method assumes that Raster objects associated with this ColorModel store the alpha band, if present, as the last band of image data. Returns null if there is no separate spatial alpha channel associated with this ColorModel. This method creates a new Raster, but will share the data array.
Overrides:
getAlphaRaster in class ColorModel
Parameters:
raster - The WritableRaster from which to extract the alpha channel.
Returns:
A WritableRaster containing the image's alpha channel.

equals

public boolean equals(Object obj)
Compares this color model with another for equality.
Overrides:
equals in class ColorModel
Parameters:
obj - The object to compare with this color model.
Returns:
true if the color model objects are equal, false if they are not.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentSampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ComponentSampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
        |
        +--java.awt.image.ComponentSampleModel
Direct Known Subclasses:
BandedSampleModel, PixelInterleavedSampleModel
public class ComponentSampleModel
extends SampleModel

This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer. It stores the N samples which make up a pixel in N separate data array elements. Different bands may be in different banks of the DataBuffer. Accessor methods are provided so that image data can be manipulated directly. This class can support different kinds of interleaving, e.g. band interleaving, scanline interleaving, and pixel interleaving. Pixel stride is the number of data array elements between two samples for the same band on the same scanline. Scanline stride is the number of data array elements between a given sample and the corresponding sample in the same column of the next scanline. Band offsets denote the number of data array elements from the first data array element of the bank of the DataBuffer holding each band to the first sample of the band. The bands are numbered from 0 to N-1. This class can represent image data for which each sample is an integral number which can be stored in 8, 16, or 32 bits (all samples of a given ComponentSampleModel are stored with the same precision). All strides and offsets must be non-negative. This class supports TYPE_BYTE, TYPE_USHORT, TYPE_SHORT, TYPE_INT,

See Also:
PixelInterleavedSampleModel, BandedSampleModel

Field Summary
protected int[] | bandOffsets Offsets for all bands in data array elements.
protected int[] | bankIndices Index for each bank storing a band of image data.
protected int | numBands The number of bands in this ComponentSampleModel.
protected int | numBanks The number of banks in this ComponentSampleModel.
protected int | pixelStride Pixel stride (in data array elements) of the region of image data described by this ComponentSampleModel.
protected int | scanlineStride Line stride (in data array elements) of the region of image data described by this ComponentSampleModel.
Fields inherited from class java.awt.image.SampleModel
dataType, height, width
Constructor Summary
ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride, int[] bandOffsets)
Constructs a ComponentSampleModel with the specified parameters.
ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride, int[] bankIndices, int[] bandOffsets)
Constructs a ComponentSampleModel with the specified parameters.
Method Summary
SampleModel | createCompatibleSampleModel(int w, int h) Creates a new ComponentSampleModel with the specified width and height.
DataBuffer | createDataBuffer() Creates a DataBuffer that corresponds to this ComponentSampleModel.
SampleModel | createSubsetSampleModel(int[] bands) This creates a new ComponentSampleModel with a subset of the bands of this ComponentSampleModel.
int[] | getBandOffsets() Returns the band offset for all bands.
int[] | getBankIndices() Returns the bank indices for all bands.
Object | getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int | getNumDataElements() Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods.
int | getOffset(int x, int y) Gets the offset for the first band of pixel (x,y).
int | getOffset(int x, int y, int b) Gets the offset for band b of pixel (x,y).
int[] | getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples for the specified pixel in an int array, one sample per array element.
int[] | getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
int | getPixelStride() Returns the pixel stride of this ComponentSampleModel.
int | getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
double | getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
float | getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
int[] | getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element.
int[] | getSampleSize() Returns the number of bits per sample for all bands.
int | getSampleSize(int band) Returns the number of bits per sample for the specified band.
int | getScanlineStride() Returns the scanline stride of this ComponentSampleModel.
void | setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element.
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixels, getPixels, getSamples, getSamples, getTransferType, getWidth, setDataElements, setPixel, setPixel, setPixels, setPixels, setSamples, setSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

bandOffsets

protected int[] bandOffsets
Offsets for all bands in data array elements.

bankIndices

protected int[] bankIndices
Index for each bank storing a band of image data.

numBands

protected int numBands
The number of bands in this ComponentSampleModel.

numBanks

protected int numBanks
The number of banks in this ComponentSampleModel.

scanlineStride

protected int scanlineStride
Line stride (in data array elements) of the region of image data described by this ComponentSampleModel.

pixelStride

protected int pixelStride
Pixel stride (in data array elements) of the region of image data described by this ComponentSampleModel.
Constructor Detail

ComponentSampleModel

public ComponentSampleModel(int dataType,
                            int w,
                            int h,
                            int pixelStride,
                            int scanlineStride,
                            int[] bandOffsets)
Constructs a ComponentSampleModel with the specified parameters. The number of bands will be given by the length of the bandOffsets array. All bands will be stored in the first bank of the DataBuffer.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
pixelStride - The pixel stride of the region of image data described.
scanlineStride - The line stride of the region of image data described.
bandOffsets - The offsets of all bands.
Throws:
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if pixelStride is less than 0
IllegalArgumentException - if scanlineStride is less than 0
IllegalArgumentException - if numBands is less than 1
IllegalArgumentException - if the product of w and h is greater than Integer.MAX_VALUE
IllegalArgumentException - if dataType is not one of the supported data types

ComponentSampleModel

public ComponentSampleModel(int dataType,
                            int w,
                            int h,
                            int pixelStride,
                            int scanlineStride,
                            int[] bankIndices,
                            int[] bandOffsets)
Constructs a ComponentSampleModel with the specified parameters. The number of bands will be given by the length of the bandOffsets array. Different bands may be stored in different banks of the DataBuffer.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
pixelStride - The pixel stride of the region of image data described.
scanlineStride - The line stride of the region of image data described.
bandIndices - The bank indices of all bands.
bandOffsets - The band offsets of all bands.
Throws:
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if pixelStride is less than 0
IllegalArgumentException - if scanlineStride is less than 0
IllegalArgumentException - if the length of bankIndices does not equal the length of bankOffsets
IllegalArgumentException - if any of the bank indices of bandIndices is less than 0
Method Detail

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a new ComponentSampleModel with the specified width and height. The new SampleModel will have the same number of bands, storage data type, interleaving scheme, and pixel stride as this SampleModel.
Overrides:
createCompatibleSampleModel in class SampleModel
Parameters:
w - the width of the resulting SampleModel
h - the height of the resulting SampleModel
Throws:
IllegalArgumentException - if w or h is not greater than 0

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
This creates a new ComponentSampleModel with a subset of the bands of this ComponentSampleModel. The new ComponentSampleModel can be used with any DataBuffer that the existing ComponentSampleModel can be used with. The new ComponentSampleModel/DataBuffer combination will represent an image with a subset of the bands of the original ComponentSampleModel/DataBuffer combination.
Overrides:
createSubsetSampleModel in class SampleModel

createDataBuffer

public DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this ComponentSampleModel. The DataBuffer's data type, number of banks, and size will be consistent with this ComponentSampleModel.
Overrides:
createDataBuffer in class SampleModel

getOffset

public int getOffset(int x,
                     int y)
Gets the offset for the first band of pixel (x,y). A sample of the first band can be retrieved from a DataBuffer data with a ComponentSampleModel csm as
        data.getElem(csm.getOffset(x, y));

getOffset

public int getOffset(int x,
                     int y,
                     int b)
Gets the offset for band b of pixel (x,y). A sample of band b can be retrieved from a DataBuffer data with a ComponentSampleModel csm as
       data.getElem(csm.getOffset(x, y, b));

getSampleSize

public final int[] getSampleSize()
Returns the number of bits per sample for all bands.
Overrides:
getSampleSize in class SampleModel

getSampleSize

public final int getSampleSize(int band)
Returns the number of bits per sample for the specified band.
Overrides:
getSampleSize in class SampleModel

getBankIndices

public final int[] getBankIndices()
Returns the bank indices for all bands.

getBandOffsets

public final int[] getBandOffsets()
Returns the band offset for all bands.

getScanlineStride

public final int getScanlineStride()
Returns the scanline stride of this ComponentSampleModel.

getPixelStride

public final int getPixelStride()
Returns the pixel stride of this ComponentSampleModel.

getNumDataElements

public final int getNumDataElements()
Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods. For a ComponentSampleModel this is identical to the number of bands.
Overrides:
getNumDataElements in class SampleModel
See Also:
SampleModel.getNumDataElements()

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object obj,
                              DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. For a ComponentSampleModel, this will be the same as the data type, and samples will be returned one per array element. Generally, obj should be passed in as null, so that the Object will be created automatically and will be of the right primitive data type.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by ComponentSampleModel csm1, to DataBuffer db2, whose storage layout is described by ComponentSampleModel csm2. The transfer will generally be more efficient than using getPixel/setPixel.

          ComponentSampleModel csm1, csm2;
         DataBufferInt db1, db2;
          csm2.setDataElements(x, y,
                            csm1.getDataElements(x, y, null, db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.

Overrides:
getDataElements in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - If non-null, a primitive array in which to return the pixel data.
data - The DataBuffer containing the image data.

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray,
                      DataBuffer data)
Returns all samples for the specified pixel in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixel in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray,
                       DataBuffer data)
Returns all samples for the specified rectangle of pixels in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixels in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSample

public int getSample(int x,
                     int y,
                     int b,
                     DataBuffer data)
Returns as int the sample in a specified band for the pixel located at (x,y). ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b,
                            DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as a float. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSampleFloat in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b,
                              DataBuffer data)
Returns the sample in a specified band for a pixel located at (x,y) as a double. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSampleDouble in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray,
                        DataBuffer data)
Returns the samples in a specified band for the specified rectangle of pixels in an int array, one sample per data array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSamples in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

setDataElements

public void setDataElements(int x,
                            int y,
                            Object obj,
                            DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. For a ComponentSampleModel, this will be the same as the data type, and samples are transferred one per array element.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by ComponentSampleModel csm1, to DataBuffer db2, whose storage layout is described by ComponentSampleModel csm2. The transfer will generally be more efficient than using getPixel/setPixel.

          ComponentSampleModel csm1, csm2;
         DataBufferInt db1, db2;
          csm2.setDataElements(x, y, csm1.getDataElements(x, y, null, db1),
                            db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Overrides:
setDataElements in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - A primitive array containing pixel data.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixel in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      int[] iArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixels in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as an int.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      float s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a float.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      double s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a double.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       int[] iArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per data array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSamples in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConvolveOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ConvolveOp

java.lang.Object
  |
  +--java.awt.image.ConvolveOp
All Implemented Interfaces:
BufferedImageOp, RasterOp
public class ConvolveOp
extends Object
implements BufferedImageOp, RasterOp

This class implements a convolution from the source to the destination. Convolution using a convolution kernel is a spatial operation that computes the output pixel from an input pixel by multiplying the kernel with the surround of the input pixel. This allows the output pixel to be affected by the immediate neighborhood in a way that can be mathematically specified with a kernel.

This class operates with BufferedImage data in which color components are premultiplied with the alpha component. If the Source BufferedImage has an alpha component, and the color components are not premultiplied with the alpha component, then the data are premultiplied before being convolved. If the Destination has color components which are not premultiplied, then alpha is divided out before storing into the Destination (if alpha is 0, the color components are set to 0). If the Destination has no alpha component, then the resulting alpha is discarded after first dividing it out of the color components.

Rasters are treated as having no alpha channel. If the above treatment of the alpha channel in BufferedImages is not desired, it may be avoided by getting the Raster of a source BufferedImage and using the filter method of this class which works with Rasters.

If a RenderingHints object is specified in the constructor, the color rendering hint and the dithering hint may be used when color conversion is required.

Note that the Source and the Destination may not be the same object.

See Also:
Kernel, RenderingHints.KEY_COLOR_RENDERING, RenderingHints.KEY_DITHERING

Field Summary
static int | EDGE_NO_OP Pixels at the edge of the source image are copied to the corresponding pixels in the destination without modification.
static int | EDGE_ZERO_FILL Pixels at the edge of the destination image are set to zero.
Constructor Summary
ConvolveOp(Kernel kernel)
Constructs a ConvolveOp given a Kernel.
ConvolveOp(Kernel kernel, int edgeCondition, RenderingHints hints)
Constructs a ConvolveOp given a Kernel, an edge condition, and a RenderingHints object (which may be null).
Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
BufferedImage | filter(BufferedImage src, BufferedImage dst) Performs a convolution on BufferedImages.
WritableRaster | filter(Raster src, WritableRaster dst) Performs a convolution on Rasters.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
int | getEdgeCondition() Returns the edge condition.
Kernel | getKernel() Returns the Kernel.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
RenderingHints | getRenderingHints() Returns the rendering hints for this op.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EDGE_ZERO_FILL

public static final int EDGE_ZERO_FILL
Pixels at the edge of the destination image are set to zero. This is the default.

EDGE_NO_OP

public static final int EDGE_NO_OP
Pixels at the edge of the source image are copied to the corresponding pixels in the destination without modification.
Constructor Detail

ConvolveOp

public ConvolveOp(Kernel kernel,
                  int edgeCondition,
                  RenderingHints hints)
Constructs a ConvolveOp given a Kernel, an edge condition, and a RenderingHints object (which may be null).
See Also:
Kernel, EDGE_NO_OP, EDGE_ZERO_FILL, RenderingHints

ConvolveOp

public ConvolveOp(Kernel kernel)
Constructs a ConvolveOp given a Kernel. The edge condition will be EDGE_ZERO_FILL.
See Also:
Kernel, EDGE_ZERO_FILL
Method Detail

getEdgeCondition

public int getEdgeCondition()
Returns the edge condition.
See Also:
EDGE_NO_OP, EDGE_ZERO_FILL

getKernel

public final Kernel getKernel()
Returns the Kernel.

filter

public final BufferedImage filter(BufferedImage src,
                                  BufferedImage dst)
Performs a convolution on BufferedImages. Each component of the source image will be convolved (including the alpha component, if present). If the color model in the source image is not the same as that in the destination image, the pixels will be converted in the destination. If the destination image is null, a BufferedImage will be created with the source ColorModel. The IllegalArgumentException may be thrown if the source is the same as the destination.
Specified by:
filter in interface BufferedImageOp
Parameters:
src - the source BufferedImage to filter
dst - the destination BufferedImage for the filtered src
Returns:
the filtered BufferedImage
Throws:
NullPointerException - if src is null
IllegalArgumentException - if src equals dst
ImagingOpException - if src cannot be filtered

filter

public final WritableRaster filter(Raster src,
                                   WritableRaster dst)
Performs a convolution on Rasters. Each band of the source Raster will be convolved. The source and destination must have the same number of bands. If the destination Raster is null, a new Raster will be created. The IllegalArgumentException may be thrown if the source is the same as the destination.
Specified by:
filter in interface RasterOp
Parameters:
src - the source Raster to filter
dst - the destination WritableRaster for the filtered src
Returns:
the filtered WritableRaster
Throws:
NullPointerException - if src is null
ImagingOpException - if src and dst do not have the same number of bands
ImagingOpException - if src cannot be filtered
IllegalArgumentException - if src equals dst

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands. If destCM is null, an appropriate ColorModel will be used.
Specified by:
createCompatibleDestImage in interface BufferedImageOp
Parameters:
src - Source image for the filter operation.
destCM - ColorModel of the destination. Can be null.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
Specified by:
createCompatibleDestRaster in interface RasterOp

getBounds2D

public final Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the filtered destination image. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface BufferedImageOp

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the filtered destination Raster. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface RasterOp

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the destination point given a point in the source. If dstPt is non-null, it will be used to hold the return value. Since this is not a geometric operation, the srcPt will equal the dstPt.
Specified by:
getPoint2D in interface BufferedImageOp

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints for this op.
Specified by:
getRenderingHints in interface BufferedImageOp
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CropImageFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class CropImageFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.CropImageFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
public class CropImageFilter
extends ImageFilter

An ImageFilter class for cropping images. This class extends the basic ImageFilter Class to extract a given rectangular region of an existing Image and provide a source for a new image containing just the extracted region. It is meant to be used in conjunction with a FilteredImageSource object to produce cropped versions of existing images.

See Also:
FilteredImageSource, ImageFilter

Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
CropImageFilter(int x, int y, int w, int h)
Constructs a CropImageFilter that extracts the absolute rectangular region of pixels from its source Image as specified by the x, y, w, and h parameters.
Method Summary
void | setDimensions(int w, int h) Override the source image's dimensions and pass the dimensions of the rectangular cropped region to the ImageConsumer.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Determine whether the delivered byte pixels intersect the region to be extracted and passes through only that subset of pixels that appear in the output region.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Determine if the delivered int pixels intersect the region to be extracted and pass through only that subset of pixels that appear in the output region.
void | setProperties(Hashtable props) Passes along the properties from the source object after adding a property indicating the cropped region.
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel, setHints
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CropImageFilter

public CropImageFilter(int x,
                       int y,
                       int w,
                       int h)
Constructs a CropImageFilter that extracts the absolute rectangular region of pixels from its source Image as specified by the x, y, w, and h parameters.
Parameters:
x - the x location of the top of the rectangle to be extracted
y - the y location of the top of the rectangle to be extracted
w - the width of the rectangle to be extracted
h - the height of the rectangle to be extracted
Method Detail

setProperties

public void setProperties(Hashtable props)
Passes along the properties from the source object after adding a property indicating the cropped region.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setProperties in class ImageFilter

setDimensions

public void setDimensions(int w,
                          int h)
Override the source image's dimensions and pass the dimensions of the rectangular cropped region to the ImageConsumer.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setDimensions in class ImageFilter
See Also:
ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Determine whether the delivered byte pixels intersect the region to be extracted and passes through only that subset of pixels that appear in the output region.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
Following copied from class: java.awt.image.ImageFilter
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Determine if the delivered int pixels intersect the region to be extracted and pass through only that subset of pixels that appear in the output region.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
Following copied from class: java.awt.image.ImageFilter
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DataBuffer

java.lang.Object
  |
  +--java.awt.image.DataBuffer
Direct Known Subclasses:
DataBufferByte, DataBufferInt, DataBufferShort, DataBufferUShort
public abstract class DataBuffer
extends Object

This class exists to wrap one or more data arrays. Each data array in the DataBuffer is referred to as a bank. Accessor methods for getting and setting elements of the DataBuffer's banks exist with and without a bank specifier. The methods without a bank specifier use the default 0th bank. The DataBuffer can optionally take an offset per bank, so that data in an existing array can be used even if the interesting data doesn't start at array location zero. Getting or setting the 0th element of a bank, uses the (0+offset)th element of the array. The size field specifies how much of the data array is available for use. Size + offset for a given bank should never be greater than the length of the associated data array. The data type of a data buffer indicates the type of the data array(s) and may also indicate additional semantics, e.g. storing unsigned 8-bit data in elements of a byte array. The data type may be TYPE_UNDEFINED or one of the types defined below. Other types may be added in the future. Generally, an object of class DataBuffer will be cast down to one of its data type specific subclasses to access data type specific methods for improved performance. Currently, the Java 2D(tm) API image classes use only TYPE_BYTE, TYPE_USHORT, and TYPE_INT DataBuffers to store image data.

See Also:
Raster, SampleModel

Field Summary
protected int | banks The number of banks in this DataBuffer.
protected int | dataType The data type of this DataBuffer.
protected int | offset Offset into default (first) bank from which to get the first element.
protected int[] | offsets Offsets into all banks.
protected int | size Usable size of all banks.
static int | TYPE_BYTE Tag for unsigned byte data.
static int | TYPE_DOUBLE Tag for double data.
static int | TYPE_FLOAT Tag for float data.
static int | TYPE_INT Tag for int data.
static int | TYPE_SHORT Tag for signed short data.
static int | TYPE_UNDEFINED Tag for undefined data
static int | TYPE_USHORT Tag for unsigned short data.
Constructor Summary
protected | DataBuffer(int dataType, int size) Constructs a DataBuffer containing one bank of the specified data type and size.
protected | DataBuffer(int dataType, int size, int numBanks) Constructs a DataBuffer containing the specified number of banks.
protected | DataBuffer(int dataType, int size, int numBanks, int offset) Constructs a DataBuffer that contains the specified number of banks.
protected | DataBuffer(int dataType, int size, int numBanks, int[] offsets) Constructs a DataBuffer which contains the specified number of banks.
Method Summary
int | getDataType() Returns the data type of this DataBuffer.
static int | getDataTypeSize(int type) Returns the size (in bits) of the data type, given a datatype tag.
int | getElem(int i) Returns the requested data array element from the first (default) bank as an integer.
abstract int | getElem(int bank, int i) Returns the requested data array element from the specified bank as an integer.
double | getElemDouble(int i) Returns the requested data array element from the first (default) bank as a double.
double | getElemDouble(int bank, int i) Returns the requested data array element from the specified bank as a double.
float | getElemFloat(int i) Returns the requested data array element from the first (default) bank as a float.
float | getElemFloat(int bank, int i) Returns the requested data array element from the specified bank as a float.
int | getNumBanks() Returns the number of banks in this DataBuffer.
int | getOffset() Returns the offset of the default bank in array elements.
int[] | getOffsets() Returns the offsets (in array elements) of all the banks.
int | getSize() Returns the size (in array elements) of all banks.
void | setElem(int i, int val) Sets the requested data array element in the first (default) bank from the given integer.
abstract void | setElem(int bank, int i, int val) Sets the requested data array element in the specified bank from the given integer.
void | setElemDouble(int i, double val) Sets the requested data array element in the first (default) bank from the given double.
void | setElemDouble(int bank, int i, double val) Sets the requested data array element in the specified bank from the given double.
void | setElemFloat(int i, float val) Sets the requested data array element in the first (default) bank from the given float.
void | setElemFloat(int bank, int i, float val) Sets the requested data array element in the specified bank from the given float.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE_BYTE

public static final int TYPE_BYTE
Tag for unsigned byte data.

TYPE_USHORT

public static final int TYPE_USHORT
Tag for unsigned short data.

TYPE_SHORT

public static final int TYPE_SHORT
Tag for signed short data. Placeholder for future use.

TYPE_INT

public static final int TYPE_INT
Tag for int data.

TYPE_FLOAT

public static final int TYPE_FLOAT
Tag for float data. Placeholder for future use.

TYPE_DOUBLE

public static final int TYPE_DOUBLE
Tag for double data. Placeholder for future use.

TYPE_UNDEFINED

public static final int TYPE_UNDEFINED
Tag for undefined data

dataType

protected int dataType
The data type of this DataBuffer.

banks

protected int banks
The number of banks in this DataBuffer.

offset

protected int offset
Offset into default (first) bank from which to get the first element.

size

protected int size
Usable size of all banks.

offsets

protected int[] offsets
Offsets into all banks.
Constructor Detail

DataBuffer

protected DataBuffer(int dataType,
                     int size)
Constructs a DataBuffer containing one bank of the specified data type and size.
Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks

DataBuffer

protected DataBuffer(int dataType,
                     int size,
                     int numBanks)
Constructs a DataBuffer containing the specified number of banks. Each bank has the specified size and an offset of 0.
Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer

DataBuffer

protected DataBuffer(int dataType,
                     int size,
                     int numBanks,
                     int offset)
Constructs a DataBuffer that contains the specified number of banks. Each bank has the specified datatype, size and offset.
Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer
offset - the offset for each bank

DataBuffer

protected DataBuffer(int dataType,
                     int size,
                     int numBanks,
                     int[] offsets)
Constructs a DataBuffer which contains the specified number of banks. Each bank has the specified datatype and size. The offset for each bank is specified by its respective entry in the offsets array.
Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer
offsets - an array containing an offset for each bank.
Throws:
ArrayIndexOutOfBoundsException - if numBanks does not equal the length of offsets
Method Detail

getDataTypeSize

public static int getDataTypeSize(int type)
Returns the size (in bits) of the data type, given a datatype tag.
Parameters:
type - the value of one of the defined datatype tags
Returns:
the size of the data type
Throws:
IllegalArgumentException - if type is less than zero or greater than TYPE_DOUBLE

getDataType

public int getDataType()
Returns the data type of this DataBuffer.

getSize

public int getSize()
Returns the size (in array elements) of all banks.

getOffset

public int getOffset()
Returns the offset of the default bank in array elements.

getOffsets

public int[] getOffsets()
Returns the offsets (in array elements) of all the banks.

getNumBanks

public int getNumBanks()
Returns the number of banks in this DataBuffer.

getElem

public int getElem(int i)
Returns the requested data array element from the first (default) bank as an integer.

getElem

public abstract int getElem(int bank,
                            int i)
Returns the requested data array element from the specified bank as an integer.

setElem

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank from the given integer.

setElem

public abstract void setElem(int bank,
                             int i,
                             int val)
Sets the requested data array element in the specified bank from the given integer.

getElemFloat

public float getElemFloat(int i)
Returns the requested data array element from the first (default) bank as a float. The implementation in this class is to cast getElem(i) to a float. Subclasses may override this method if another implementation is needed.

getElemFloat

public float getElemFloat(int bank,
                          int i)
Returns the requested data array element from the specified bank as a float. The implementation in this class is to cast getElem(bank, i) to a float. Subclasses may override this method if another implementation is needed.

setElemFloat

public void setElemFloat(int i,
                         float val)
Sets the requested data array element in the first (default) bank from the given float. The implementation in this class is to cast val to an int and call setElem. Subclasses may override this method if another implementation is needed.

setElemFloat

public void setElemFloat(int bank,
                         int i,
                         float val)
Sets the requested data array element in the specified bank from the given float. The implementation in this class is to cast * val to an int and call setElem. Subclasses may override this method if another implementation is needed.

getElemDouble

public double getElemDouble(int i)
Returns the requested data array element from the first (default) bank as a double. The implementation in this class is to cast getElem(i) to a double. Subclasses may override this method if another implementation is needed.

getElemDouble

public double getElemDouble(int bank,
                            int i)
Returns the requested data array element from the specified bank as a double. The implementation in this class is to cast getElem(bank, i) to a double. Subclasses may override this method if another implementation is needed.

setElemDouble

public void setElemDouble(int i,
                          double val)
Sets the requested data array element in the first (default) bank from the given double. The implementation in this class is to cast val to an int and call setElem. Subclasses may override this method if another implementation is needed.

setElemDouble

public void setElemDouble(int bank,
                          int i,
                          double val)
Sets the requested data array element in the specified bank from the given double. The implementation in this class is to cast val to an int and call setElem. Subclasses may override this method if another implementation is needed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataBufferByte

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DataBufferByte

java.lang.Object
  |
  +--java.awt.image.DataBuffer
        |
        +--java.awt.image.DataBufferByte
public final class DataBufferByte
extends DataBuffer

This class extends DataBuffer and stores data internally as bytes. Values stored in the byte array(s) of this DataBuffer are treated as unsigned values.

Fields inherited from class java.awt.image.DataBuffer
banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
Constructor Summary
DataBufferByte(byte[][] dataArray, int size)
Constructs a byte-based DataBuffer with the specified arrays.
DataBufferByte(byte[][] dataArray, int size, int[] offsets)
Constructs a byte-based DataBuffer with the specified arrays, size, and offsets.
DataBufferByte(byte[] dataArray, int size)
Constructs a byte-based DataBuffer with a single bank using the specified array.
DataBufferByte(byte[] dataArray, int size, int offset)
Constructs a byte-based DataBuffer with a single bank using the specified array, size, and offset.
DataBufferByte(int size)
Constructs a byte-based DataBuffer with a single bank and the specified size.
DataBufferByte(int size, int numBanks)
Constructs a byte based DataBuffer with the specified number of banks all of which are the specified size.
Method Summary
byte[][] | getBankData() Returns the data arrays for all banks.
byte[] | getData() Returns the default (first) byte data array.
byte[] | getData(int bank) Returns the data array for the specified bank.
int | getElem(int i) Returns the requested data array element from the first (default) bank.
int | getElem(int bank, int i) Returns the requested data array element from the specified bank
void | setElem(int i, int val) Sets the requested data array element in the first (default) bank to the specified value.
void | setElem(int bank, int i, int val) Sets the requested data array element in the specified bank from the given integer.
Methods inherited from class java.awt.image.DataBuffer
getDataType, getDataTypeSize, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElemDouble, setElemDouble, setElemFloat, setElemFloat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataBufferByte

public DataBufferByte(int size)
Constructs a byte-based DataBuffer with a single bank and the specified size.
Parameters:
size - The size of the DataBuffer.

DataBufferByte

public DataBufferByte(int size,
                      int numBanks)
Constructs a byte based DataBuffer with the specified number of banks all of which are the specified size.
Parameters:
size - The size of the banks in the DataBuffer.
numBanks - The number of banks in the aDataBuffer.

DataBufferByte

public DataBufferByte(byte[] dataArray,
                      int size)
Constructs a byte-based DataBuffer with a single bank using the specified array. Only the first size elements should be used by accessors of this DataBuffer. dataArray must be large enough to hold size elements.
Parameters:
dataArray - The byte array for the DataBuffer.
size - The size of the DataBuffer bank.

DataBufferByte

public DataBufferByte(byte[] dataArray,
                      int size,
                      int offset)
Constructs a byte-based DataBuffer with a single bank using the specified array, size, and offset. dataArray must have at least offset + size elements. Only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The byte array for the DataBuffer.
size - The size of the DataBuffer bank.
offset - The offset into the dataArray. dataArray must have at least offset + size elements.

DataBufferByte

public DataBufferByte(byte[][] dataArray,
                      int size)
Constructs a byte-based DataBuffer with the specified arrays. The number of banks is equal to dataArray.length. Only the first size elements of each array should be used by accessors of this DataBuffer.
Parameters:
dataArray - The byte arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.

DataBufferByte

public DataBufferByte(byte[][] dataArray,
                      int size,
                      int[] offsets)
Constructs a byte-based DataBuffer with the specified arrays, size, and offsets. The number of banks is equal to dataArray.length. Each array must be at least as large as size + the corresponding offset. There must be an entry in the offset array for each dataArray entry. For each bank, only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The byte arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.
offsets - The offsets into each array.
Method Detail

getData

public byte[] getData()
Returns the default (first) byte data array.
Returns:
The first byte data array.

getData

public byte[] getData(int bank)
Returns the data array for the specified bank.
Parameters:
bank - The bank whose data array you want to get.
Returns:
The data array for the specified bank.

getBankData

public byte[][] getBankData()
Returns the data arrays for all banks.
Returns:
All of the data arrays.

getElem

public int getElem(int i)
Returns the requested data array element from the first (default) bank.
Overrides:
getElem in class DataBuffer
Parameters:
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

getElem

public int getElem(int bank,
                   int i)
Returns the requested data array element from the specified bank
Overrides:
getElem in class DataBuffer
Parameters:
bank - The bank from which you want to get a data array element.
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

setElem

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank to the specified value.
Overrides:
setElem in class DataBuffer
Parameters:
i - The data array element you want to set.
val - The integer value to which you want to set the data array element.

setElem

public void setElem(int bank,
                    int i,
                    int val)
Sets the requested data array element in the specified bank from the given integer.
Overrides:
setElem in class DataBuffer
Parameters:
bank - The bank in which you want to set the data array element.
i - The data array element you want to set.
val - The integer value to which you want to set the specified data array element.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataBufferInt

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DataBufferInt

java.lang.Object
  |
  +--java.awt.image.DataBuffer
        |
        +--java.awt.image.DataBufferInt
public final class DataBufferInt
extends DataBuffer

This class extends DataBuffer and stores data internally as integers.

Fields inherited from class java.awt.image.DataBuffer
banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
Constructor Summary
DataBufferInt(int size)
Constructs an integer-based DataBuffer with a single bank and the specified size.
DataBufferInt(int[][] dataArray, int size)
Constructs an integer-based DataBuffer with the specified arrays.
DataBufferInt(int[][] dataArray, int size, int[] offsets)
Constructs an integer-based DataBuffer with the specified arrays, size, and offsets.
DataBufferInt(int[] dataArray, int size)
Constructs an integer-based DataBuffer with a single bank using the specified array.
DataBufferInt(int[] dataArray, int size, int offset)
Constructs an integer-based DataBuffer with a single bank using the specified array, size, and offset.
DataBufferInt(int size, int numBanks)
Constructs an integer-based DataBuffer with the specified number of banks, all of which are the specified size.
Method Summary
int[][] | getBankData() Returns the data arrays for all banks.
int[] | getData() Returns the default (first) int data array in DataBuffer.
int[] | getData(int bank) Returns the data array for the specified bank.
int | getElem(int i) Returns the requested data array element from the first (default) bank.
int | getElem(int bank, int i) Returns the requested data array element from the specified bank
void | setElem(int i, int val) Sets the requested data array element in the first (default) bank to the specified value.
void | setElem(int bank, int i, int val) Sets the requested data array element in the specified bank to the integer value i.
Methods inherited from class java.awt.image.DataBuffer
getDataType, getDataTypeSize, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElemDouble, setElemDouble, setElemFloat, setElemFloat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataBufferInt

public DataBufferInt(int size)
Constructs an integer-based DataBuffer with a single bank and the specified size.
Parameters:
size - The size of the DataBuffer.

DataBufferInt

public DataBufferInt(int size,
                     int numBanks)
Constructs an integer-based DataBuffer with the specified number of banks, all of which are the specified size.
Parameters:
size - The size of the banks in the DataBuffer.
numBanks - The number of banks in the aDataBuffer.

DataBufferInt

public DataBufferInt(int[] dataArray,
                     int size)
Constructs an integer-based DataBuffer with a single bank using the specified array. Only the first size elements should be used by accessors of this DataBuffer. dataArray must be large enough to hold size elements.
Parameters:
dataArray - The integer array for the DataBuffer.
size - The size of the DataBuffer bank.

DataBufferInt

public DataBufferInt(int[] dataArray,
                     int size,
                     int offset)
Constructs an integer-based DataBuffer with a single bank using the specified array, size, and offset. dataArray must have at least offset + size elements. Only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The integer array for the DataBuffer.
size - The size of the DataBuffer bank.
offset - The offset into the dataArray.

DataBufferInt

public DataBufferInt(int[][] dataArray,
                     int size)
Constructs an integer-based DataBuffer with the specified arrays. The number of banks will be equal to dataArray.length. Only the first size elements of each array should be used by accessors of this DataBuffer.
Parameters:
dataArray - The integer arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.

DataBufferInt

public DataBufferInt(int[][] dataArray,
                     int size,
                     int[] offsets)
Constructs an integer-based DataBuffer with the specified arrays, size, and offsets. The number of banks is equal to dataArray.length. Each array must be at least as large as size + the corresponding offset. There must be an entry in the offset array for each dataArray entry. For each bank, only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The integer arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.
offsets - The offsets into each array.
Method Detail

getData

public int[] getData()
Returns the default (first) int data array in DataBuffer.
Returns:
The first integer data array.

getData

public int[] getData(int bank)
Returns the data array for the specified bank.
Parameters:
bank - The bank whose data array you want to get.
Returns:
The data array for the specified bank.

getBankData

public int[][] getBankData()
Returns the data arrays for all banks.
Returns:
All of the data arrays.

getElem

public int getElem(int i)
Returns the requested data array element from the first (default) bank.
Overrides:
getElem in class DataBuffer
Parameters:
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

getElem

public int getElem(int bank,
                   int i)
Returns the requested data array element from the specified bank
Overrides:
getElem in class DataBuffer
Parameters:
bank - The bank from which you want to get a data array element.
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

setElem

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank to the specified value.
Overrides:
setElem in class DataBuffer
Parameters:
i - The data array element you want to set.
val - The integer value to which you want to set the data array element.

setElem

public void setElem(int bank,
                    int i,
                    int val)
Sets the requested data array element in the specified bank to the integer value i.
Overrides:
setElem in class DataBuffer
Parameters:
bank - The bank in which you want to set the data array element.
i - The data array element you want to set.
val - The integer value to which you want to set the specified data array element.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataBufferShort

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DataBufferShort

java.lang.Object
  |
  +--java.awt.image.DataBuffer
        |
        +--java.awt.image.DataBufferShort
public final class DataBufferShort
extends DataBuffer

This class extends DataBuffer and stores data internally as shorts.

Fields inherited from class java.awt.image.DataBuffer
banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
Constructor Summary
DataBufferShort(int size)
Constructs a short-based DataBuffer with a single bank and the specified size.
DataBufferShort(int size, int numBanks)
Constructs a short-based DataBuffer with the specified number of banks all of which are the specified size.
DataBufferShort(short[][] dataArray, int size)
Constructs a short-based DataBuffer with the specified arrays.
DataBufferShort(short[][] dataArray, int size, int[] offsets)
Constructs a short-based DataBuffer with the specified arrays, size, and offsets.
DataBufferShort(short[] dataArray, int size)
Constructs a short-based DataBuffer with a single bank using the specified array.
DataBufferShort(short[] dataArray, int size, int offset)
Constructs a short-based DataBuffer with a single bank using the specified array, size, and offset.
Method Summary
short[][] | getBankData() Returns the data arrays for all banks.
short[] | getData() Returns the default (first) byte data array.
short[] | getData(int bank) Returns the data array for the specified bank.
int | getElem(int i) Returns the requested data array element from the first (default) bank.
int | getElem(int bank, int i) Returns the requested data array element from the specified bank
void | setElem(int i, int val) Sets the requested data array element in the first (default) bank to the specified value.
void | setElem(int bank, int i, int val) Sets the requested data array element in the specified bank from the given integer.
Methods inherited from class java.awt.image.DataBuffer
getDataType, getDataTypeSize, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElemDouble, setElemDouble, setElemFloat, setElemFloat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataBufferShort

public DataBufferShort(int size)
Constructs a short-based DataBuffer with a single bank and the specified size.
Parameters:
size - The size of the DataBuffer.

DataBufferShort

public DataBufferShort(int size,
                       int numBanks)
Constructs a short-based DataBuffer with the specified number of banks all of which are the specified size.
Parameters:
size - The size of the banks in the DataBuffer.
numBanks - The number of banks in the aDataBuffer.

DataBufferShort

public DataBufferShort(short[] dataArray,
                       int size)
Constructs a short-based DataBuffer with a single bank using the specified array. Only the first size elements should be used by accessors of this DataBuffer. dataArray must be large enough to hold size elements.
Parameters:
dataArray - The short array for the DataBuffer.
size - The size of the DataBuffer bank.

DataBufferShort

public DataBufferShort(short[] dataArray,
                       int size,
                       int offset)
Constructs a short-based DataBuffer with a single bank using the specified array, size, and offset. dataArray must have at least offset + size elements. Only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The short array for the DataBuffer.
size - The size of the DataBuffer bank.
offset - The offset into the dataArray.

DataBufferShort

public DataBufferShort(short[][] dataArray,
                       int size)
Constructs a short-based DataBuffer with the specified arrays. The number of banks will be equal to dataArray.length. Only the first size elements of each array should be used by accessors of this DataBuffer.
Parameters:
dataArray - The short arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.

DataBufferShort

public DataBufferShort(short[][] dataArray,
                       int size,
                       int[] offsets)
Constructs a short-based DataBuffer with the specified arrays, size, and offsets. The number of banks is equal to dataArray.length. Each array must be at least as large as size + the corresponding offset. There must be an entry in the offset array for each dataArray entry. For each bank, only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The short arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.
offsets - The offsets into each array.
Method Detail

getData

public short[] getData()
Returns the default (first) byte data array.
Returns:
The first short data array.

getData

public short[] getData(int bank)
Returns the data array for the specified bank.
Parameters:
bank - The bank whose data array you want to get.
Returns:
The data array for the specified bank.

getBankData

public short[][] getBankData()
Returns the data arrays for all banks.
Returns:
All of the data arrays.

getElem

public int getElem(int i)
Returns the requested data array element from the first (default) bank.
Overrides:
getElem in class DataBuffer
Parameters:
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

getElem

public int getElem(int bank,
                   int i)
Returns the requested data array element from the specified bank
Overrides:
getElem in class DataBuffer
Parameters:
bank - The bank from which you want to get a data array element.
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

setElem

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank to the specified value.
Overrides:
setElem in class DataBuffer
Parameters:
i - The data array element you want to set.
val - The integer value to which you want to set the data array element.

setElem

public void setElem(int bank,
                    int i,
                    int val)
Sets the requested data array element in the specified bank from the given integer.
Overrides:
setElem in class DataBuffer
Parameters:
bank - The bank in which you want to set the data array element.
i - The data array element you want to set.
val - The integer value to which you want to set the specified data array element.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataBufferUShort

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DataBufferUShort

java.lang.Object
  |
  +--java.awt.image.DataBuffer
        |
        +--java.awt.image.DataBufferUShort
public final class DataBufferUShort
extends DataBuffer

This class extends DataBuffer and stores data internally as shorts. Values stored in the short array(s) of this DataBuffer are treated as unsigned values.

Fields inherited from class java.awt.image.DataBuffer
banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
Constructor Summary
DataBufferUShort(int size)
Constructs an unsigned-short based DataBuffer with a single bank and the specified size.
DataBufferUShort(int size, int numBanks)
Constructs an unsigned-short based DataBuffer with the specified number of banks, all of which are the specified size.
DataBufferUShort(short[][] dataArray, int size)
Constructs an unsigned-short based DataBuffer with the specified arrays.
DataBufferUShort(short[][] dataArray, int size, int[] offsets)
Constructs an unsigned-short based DataBuffer with specified arrays, size, and offsets.
DataBufferUShort(short[] dataArray, int size)
Constructs an unsigned-short based DataBuffer with a single bank using the specified array.
DataBufferUShort(short[] dataArray, int size, int offset)
Constructs an unsigned-short based DataBuffer with a single bank using the specified array, size, and offset.
Method Summary
short[][] | getBankData() Returns the data arrays for all banks.
short[] | getData() Returns the default (first) unsigned-short data array.
short[] | getData(int bank) Returns the data array for the specified bank.
int | getElem(int i) Returns the requested data array element from the first (default) bank.
int | getElem(int bank, int i) Returns the requested data array element from the specified bank
void | setElem(int i, int val) Sets the requested data array element in the first (default) bank to the specified value.
void | setElem(int bank, int i, int val) Sets the requested data array element in the specified bank from the given integer.
Methods inherited from class java.awt.image.DataBuffer
getDataType, getDataTypeSize, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElemDouble, setElemDouble, setElemFloat, setElemFloat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataBufferUShort

public DataBufferUShort(int size)
Constructs an unsigned-short based DataBuffer with a single bank and the specified size.
Parameters:
size - The size of the DataBuffer.

DataBufferUShort

public DataBufferUShort(int size,
                        int numBanks)
Constructs an unsigned-short based DataBuffer with the specified number of banks, all of which are the specified size.
Parameters:
size - The size of the banks in the DataBuffer.
numBanks - The number of banks in the aDataBuffer.

DataBufferUShort

public DataBufferUShort(short[] dataArray,
                        int size)
Constructs an unsigned-short based DataBuffer with a single bank using the specified array. Only the first size elements should be used by accessors of this DataBuffer. dataArray must be large enough to hold size elements.
Parameters:
dataArray - The unsigned-short array for the DataBuffer.
size - The size of the DataBuffer bank.

DataBufferUShort

public DataBufferUShort(short[] dataArray,
                        int size,
                        int offset)
Constructs an unsigned-short based DataBuffer with a single bank using the specified array, size, and offset. dataArray must have at least offset + size elements. Only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The unsigned-short array for the DataBuffer.
size - The size of the DataBuffer bank.
offset - The offset into the dataArray.

DataBufferUShort

public DataBufferUShort(short[][] dataArray,
                        int size)
Constructs an unsigned-short based DataBuffer with the specified arrays. The number of banks will be equal to dataArray.length. Only the first size elements of each array should be used by accessors of this DataBuffer.
Parameters:
dataArray - The unsigned-short arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.

DataBufferUShort

public DataBufferUShort(short[][] dataArray,
                        int size,
                        int[] offsets)
Constructs an unsigned-short based DataBuffer with specified arrays, size, and offsets. The number of banks is equal to dataArray.length. Each array must be at least as large as size + the corresponding offset. There must be an entry in the offset array for each dataArray entry. For each bank, only elements offset through offset + size - 1 should be used by accessors of this DataBuffer.
Parameters:
dataArray - The unsigned-short arrays for the DataBuffer.
size - The size of the banks in the DataBuffer.
offsets - The offsets into each array.
Method Detail

getData

public short[] getData()
Returns the default (first) unsigned-short data array.
Returns:
The first unsigned-short data array.

getData

public short[] getData(int bank)
Returns the data array for the specified bank.
Parameters:
bank - The bank whose data array you want to get.
Returns:
The data array for the specified bank.

getBankData

public short[][] getBankData()
Returns the data arrays for all banks.
Returns:
All of the data arrays.

getElem

public int getElem(int i)
Returns the requested data array element from the first (default) bank.
Overrides:
getElem in class DataBuffer
Parameters:
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

getElem

public int getElem(int bank,
                   int i)
Returns the requested data array element from the specified bank
Overrides:
getElem in class DataBuffer
Parameters:
bank - The bank from which you want to get a data array element.
i - The data array element you want to get.
Returns:
The requested data array element as an integer.

setElem

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank to the specified value.
Overrides:
setElem in class DataBuffer
Parameters:
i - The data array element you want to set.
val - The integer value to which you want to set the data array element.

setElem

public void setElem(int bank,
                    int i,
                    int val)
Sets the requested data array element in the specified bank from the given integer.
Overrides:
setElem in class DataBuffer
Parameters:
bank - The bank in which you want to set the data array element.
i - The data array element you want to set.
val - The integer value to which you want to set the specified data array element.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectColorModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class DirectColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
        |
        +--java.awt.image.PackedColorModel
              |
              +--java.awt.image.DirectColorModel
All Implemented Interfaces:
Transparency
public class DirectColorModel
extends PackedColorModel

The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity. This class can be used only with ColorSpaces of type ColorSpace.TYPE_RGB. There must be three color samples in the pixel values and there can be a single alpha sample. For those methods that use a primitive array pixel representation of type transferType, the array length is always one. The transfer types supported are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, and DataBuffer.TYPE_INT. Color and alpha samples are stored in the single element of the array in bits indicated by bit masks. Each bit mask must be contiguous and masks must not overlap. The same masks apply to the single int pixel representation used by other methods. The correspondence of masks and color/alpha samples is as follows:

  • Masks are identified by indices running from 0 through 2 if no alpha is present, or 3 if an alpha is present.
  • The first three indices refer to color samples; index 0 corresponds to red, index 1 to green, and index 2 to blue.
  • Index 3 corresponds to the alpha sample, if present.

The translation from pixel values to color/alpha components for display or processing purposes is a one-to-one correspondence of samples to components. A DirectColorModel is typically used with image data which uses masks to define packed samples. For example, a DirectColorModel can be used in conjunction with a SinglePixelPackedSampleModel to construct a BufferedImage. Normally the masks used by the SampleModel and the ColorModel would be the same. However, if they are different, the color interpretation of pixel data will be done according to the masks of the ColorModel.

A single int pixel representation is valid for all objects of this class, since it is always possible to represent pixel values used with this class in a single int. Therefore, methods which use this representation will not throw an IllegalArgumentException due to an invalid pixel value.

This color model is similar to an X11 TrueColor visual. The default RGB ColorModel specified by the getRGBdefault method is a DirectColorModel with the following parameters:

 Number of bits:        32
 Red mask:              0x00ff0000
 Green mask:            0x0000ff00
 Blue mask:             0x000000ff
 Alpha mask:            0xff000000
 Color space:           sRGB
 isAlphaPremultiplied:  False
 Transparency:          Transparency.TRANSLUCENT
 transferType:          DataBuffer.TYPE_INT

Many of the methods in this class are final. This is because the underlying native graphics code makes assumptions about the layout and operation of this class and those assumptions are reflected in the implementations of the methods here that are marked final. You can subclass this class for other reasons, but you cannot override or modify the behavior of those methods.

See Also:
ColorModel, ColorSpace, SinglePixelPackedSampleModel, BufferedImage, ColorModel.getRGBdefault()

Fields inherited from class java.awt.image.ColorModel
pixel_bits, transferType
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
DirectColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
Constructs a DirectColorModel from the specified parameters.
DirectColorModel(int bits, int rmask, int gmask, int bmask)
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples.
DirectColorModel(int bits, int rmask, int gmask, int bmask, int amask)
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present.
Method Summary
ColorModel | coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
WritableRaster | createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
int | getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | getAlphaMask() Returns the mask indicating which bits in an int pixel representation contain the alpha component.
int | getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getBlueMask() Returns the mask indicating which bits in an int pixel representation contain the blue color component.
int[] | getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int[] | getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
int | getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int | getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getGreenMask() Returns the mask indicating which bits in an int pixel representation contain the green color component.
int | getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | getRedMask() Returns the mask indicating which bits in an int pixel representation contain the red color component.
int | getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format.
int | getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
boolean | isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not.
String | toString() Returns a String that represents this DirectColorModel.
Methods inherited from class java.awt.image.PackedColorModel
createCompatibleSampleModel, equals, getAlphaRaster, getMask, getMasks, isCompatibleSampleModel
Methods inherited from class java.awt.image.ColorModel
finalize, getColorSpace, getComponentSize, getComponentSize, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DirectColorModel

public DirectColorModel(int bits,
                        int rmask,
                        int gmask,
                        int bmask)
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples. As pixel values do not contain alpha information, all pixels are treated as opaque, which means that alpha = 1.0. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. The ColorSpace is the default sRGB space. The transparency value is Transparency.OPAQUE. The transfer type is the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel.
Parameters:
bits - the number of bits in the pixel values; for example, the sum of the number of bits in the masks.
rmask - specifies a mask indicating which bits in an integer pixel contain the red component
gmask - specifies a mask indicating which bits in an integer pixel contain the green component
bmask - specifies a mask indicating which bits in an integer pixel contain the blue component

DirectColorModel

public DirectColorModel(int bits,
                        int rmask,
                        int gmask,
                        int bmask,
                        int amask)
Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present. If amask is 0, pixel values do not contain alpha information and all pixels are treated as opaque, which means that alpha = 1.0. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. Alpha, if present, is not premultiplied. The ColorSpace is the default sRGB space. The transparency value is Transparency.OPAQUE if no alpha is present, or Transparency.TRANSLUCENT otherwise. The transfer type is the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel.
Parameters:
bits - the number of bits in the pixel values; for example, the sum of the number of bits in the masks.
rmask - specifies a mask indicating which bits in an integer pixel contain the red component
gmask - specifies a mask indicating which bits in an integer pixel contain the green component
bmask - specifies a mask indicating which bits in an integer pixel contain the blue component
amask - specifies a mask indicating which bits in an integer pixel contain the alpha component

DirectColorModel

public DirectColorModel(ColorSpace space,
                        int bits,
                        int rmask,
                        int gmask,
                        int bmask,
                        int amask,
                        boolean isAlphaPremultiplied,
                        int transferType)
Constructs a DirectColorModel from the specified parameters. Color components are in the specified ColorSpace, which must be of type ColorSpace.TYPE_RGB. The masks specify which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present. If amask is 0, pixel values do not contain alpha information and all pixels are treated as opaque, which means that alpha = 1.0. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. If there is alpha, the boolean isAlphaPremultiplied specifies how to interpret color and alpha samples in pixel values. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency value is Transparency.OPAQUE, if no alpha is present, or Transparency.TRANSLUCENT otherwise. The transfer type is the type of primitive array used to represent pixel values and must be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Parameters:
space - the specified ColorSpace
bits - the number of bits in the pixel values; for example, the sum of the number of bits in the masks.
rmask - specifies a mask indicating which bits in an integer pixel contain the red component
gmask - specifies a mask indicating which bits in an integer pixel contain the green component
bmask - specifies a mask indicating which bits in an integer pixel contain the blue component
amask - specifies a mask indicating which bits in an integer pixel contain the alpha component
isAlphaPremultiplied - true if color samples are premultiplied by the alpha sample; false otherwise
transferType - the type of array used to represent pixel values
Method Detail

getRedMask

public final int getRedMask()
Returns the mask indicating which bits in an int pixel representation contain the red color component.
Returns:
the mask, which indicates which bits of the int pixel representation contain the red color sample.

getGreenMask

public final int getGreenMask()
Returns the mask indicating which bits in an int pixel representation contain the green color component.
Returns:
the mask, which indicates which bits of the int pixel representation contain the green color sample.

getBlueMask

public final int getBlueMask()
Returns the mask indicating which bits in an int pixel representation contain the blue color component.
Returns:
the mask, which indicates which bits of the int pixel representation contain the blue color sample.

getAlphaMask

public final int getAlphaMask()
Returns the mask indicating which bits in an int pixel representation contain the alpha component.
Returns:
the mask, which indicates which bits of the int pixel representation contain the alpha sample.

getRed

public final int getRed(int pixel)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the red value is 0.
Overrides:
getRed in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the red color component for the specified pixel, from 0 to 255 in the sRGB ColorSpace.

getGreen

public final int getGreen(int pixel)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the green value is 0.
Overrides:
getGreen in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the green color component for the specified pixel, from 0 to 255 in the sRGB ColorSpace.

getBlue

public final int getBlue(int pixel)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the blue value is 0.
Overrides:
getBlue in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the blue color component for the specified pixel, from 0 to 255 in the sRGB ColorSpace.

getAlpha

public final int getAlpha(int pixel)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified as an int.
Overrides:
getAlpha in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the value of the alpha component of pixel from 0 to 255.

getRGB

public final int getRGB(int pixel)
Returns the color/alpha components of the pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified as an int. The returned value is in a non pre-multiplied format. Thus, if the alpha is premultiplied, this method divides it out of the color components. If the alpha value is 0, for example, the color values are each 0.
Overrides:
getRGB in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the RGB value of the color/alpha components of the specified pixel.
See Also:
ColorModel.getRGBdefault()

getRed

public int getRed(Object inData)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the red value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType. An UnsupportedOperationException is thrown if this transferType is not supported by this ColorModel.
Overrides:
getRed in class ColorModel
Parameters:
inData - the array containing the pixel value
Returns:
the value of the red component of the specified pixel.
Throws:
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this color model
ClassCastException - if inData is not a primitive array of type transferType
UnsupportedOperationException - if this transferType is not supported by this color model

getGreen

public int getGreen(Object inData)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the green value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType. An UnsupportedOperationException is thrown if this transferType is not supported by this ColorModel.
Overrides:
getGreen in class ColorModel
Parameters:
inData - the array containing the pixel value
Returns:
the value of the green component of the specified pixel.
Throws:
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this color model
ClassCastException - if inData is not a primitive array of type transferType
UnsupportedOperationException - if this transferType is not supported by this color model

getBlue

public int getBlue(Object inData)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. Thus, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, for example, the blue value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType. An UnsupportedOperationException is thrown if this transferType is not supported by this ColorModel.
Overrides:
getBlue in class ColorModel
Parameters:
inData - the array containing the pixel value
Returns:
the value of the blue component of the specified pixel.
Throws:
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this color model
ClassCastException - if inData is not a primitive array of type transferType
UnsupportedOperationException - if this transferType is not supported by this color model

getAlpha

public int getAlpha(Object inData)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType. If this transferType is not supported, an UnsupportedOperationException is thrown.
Overrides:
getAlpha in class ColorModel
Parameters:
inData - the specified pixel
Returns:
the alpha component of the specified pixel, scaled from 0 to 255.
Throws:
ClassCastException - if inData is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this tranferType is not supported by this ColorModel

getRGB

public int getRGB(Object inData)
Returns the color/alpha components for the specified pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. The returned value is in a non pre-multiplied format. Thus, if the alpha is premultiplied, this method divides it out of the color components. If the alpha value is 0, for example, the color values is 0. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getRGB in class ColorModel
Parameters:
inData - the specified pixel
Returns:
the color and alpha components of the specified pixel.
Throws:
UnsupportedOperationException - if this transferType is not supported by this ColorModel
See Also:
ColorModel.getRGBdefault()

getDataElements

public Object getDataElements(int rgb,
                              Object pixel)
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the setDataElements method of a WritableRaster object. If the pixel variable is null, a new array is allocated. If pixel is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. The pixel array is returned. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getDataElements in class ColorModel
Parameters:
rgb - the integer pixel representation in the default RGB color model
pixel - the specified pixel
Returns:
an array representation of the specified pixel in this ColorModel
Throws:
ClassCastException - if pixel is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if this transferType is not supported by this ColorModel
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getComponents

public final int[] getComponents(int pixel,
                                 int[] components,
                                 int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified as an int. If the components array is null, a new array is allocated. The components array is returned. Color/alpha components are stored in the components array starting at offset, even if the array is allocated by this method. An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components, starting at offset.
Overrides:
getComponents in class ColorModel
Parameters:
pixel - the specified pixel
components - the array to receive the color and alpha components of the specified pixel
offset - the offset into the components array at which to start storing the color and alpha components
Returns:
an array containing the color and alpha components of the specified pixel starting at the specified offset.

getComponents

public final int[] getComponents(Object pixel,
                                 int[] components,
                                 int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If pixel is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. If the components array is null, a new array is allocated. The components array is returned. Color/alpha components are stored in the components array starting at offset, even if the array is allocated by this method. An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components, starting at offset. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getComponents in class ColorModel
Parameters:
pixel - the specified pixel
components - the array to receive the color and alpha components of the specified pixel
offset - the offset into the components array at which to start storing the color and alpha components
Throws:
ClassCastException - if pixel is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel, or if components is not null and is not large enough to hold all the color and alpha components, starting at offset
UnsupportedOperationException - if this transferType is not supported by this color model

createCompatibleWritableRaster

public final WritableRaster createCompatibleWritableRaster(int w,
                                                           int h)
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
Overrides:
createCompatibleWritableRaster in class ColorModel
Parameters:
w - the width to apply to the new WritableRaster
h - the height to apply to the new WritableRaster
Returns:
a WritableRaster object with the specified width and height.
Throws:
IllegalArgumentException - if w or h is less than or equal to zero
See Also:
WritableRaster, SampleModel

getDataElement

public int getDataElement(int[] components,
                          int offset)
Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components, starting at offset.
Overrides:
getDataElement in class ColorModel
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving the color and alpha components
Returns:
an int pixel value in this ColorModel corresponding to the specified components.
Throws:
ArrayIndexOutOfBoundsException - if the components array is not large enough to hold all of the color and alpha components starting at offset

getDataElements

public Object getDataElements(int[] components,
                              int offset,
                              Object obj)
Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components, starting at offset. If the obj variable is null, a new array is allocated. If obj is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if obj is not large enough to hold a pixel value for this ColorModel. Since DirectColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getDataElements in class ColorModel
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving color and alpha components
obj - the Object representing an array of color and alpha components
Returns:
an Object representing an array of color and alpha components.
Throws:
ClassCastException - if obj is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if obj is not large enough to hold a pixel value for this ColorModel or the components array is not large enough to hold all of the color and alpha components starting at offset
UnsupportedOperationException - if this transferType is not supported by this color model
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

coerceData

public final ColorModel coerceData(WritableRaster raster,
                                   boolean isAlphaPremultiplied)
Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state. If the data needs to be coerced, this method will also return an instance of this ColorModel with the isAlphaPremultiplied flag set appropriately. This method will throw a UnsupportedOperationException if this transferType is not supported by this ColorModel. Since ColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
coerceData in class ColorModel
Parameters:
raster - the WritableRaster data
isAlphaPremultiplied - true if the alpha is premultiplied; false otherwise
Returns:
a ColorModel object that represents the coerced data.
Throws:
UnsupportedOperationException - if this transferType is not supported by this color model

isCompatibleRaster

public boolean isCompatibleRaster(Raster raster)
Returns true if raster is compatible with this ColorModel and false if it is not.
Overrides:
isCompatibleRaster in class ColorModel
Parameters:
raster - the Raster object to test for compatibility
Returns:
true if raster is compatible with this ColorModel; false otherwise.

toString

public String toString()
Returns a String that represents this DirectColorModel.
Overrides:
toString in class ColorModel
Returns:
a String representing this DirectColorModel.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredImageSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class FilteredImageSource

java.lang.Object
  |
  +--java.awt.image.FilteredImageSource
All Implemented Interfaces:
ImageProducer
public class FilteredImageSource
extends Object
implements ImageProducer

This class is an implementation of the ImageProducer interface which takes an existing image and a filter object and uses them to produce image data for a new filtered version of the original image. Here is an example which filters an image by swapping the red and blue compents:

    Image src = getImage("doc:///demo/images/duke/T1.gif");
    ImageFilter colorfilter = new RedBlueSwapFilter();
    Image img = createImage(new FilteredImageSource(src.getSource(),
                            colorfilter));

See Also:
ImageProducer

Constructor Summary
FilteredImageSource(ImageProducer orig, ImageFilter imgf)
Constructs an ImageProducer object from an existing ImageProducer and a filter object.
Method Summary
void | addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | isConsumer(ImageConsumer ic) Determines whether an ImageConsumer is on the list of consumers currently interested in data for this image.
void | removeConsumer(ImageConsumer ic) Removes an ImageConsumer from the list of consumers interested in data for this image.
void | requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
void | startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilteredImageSource

public FilteredImageSource(ImageProducer orig,
                           ImageFilter imgf)
Constructs an ImageProducer object from an existing ImageProducer and a filter object.
See Also:
ImageFilter, Component.createImage(java.awt.image.ImageProducer)
Method Detail

addConsumer

public void addConsumer(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image.
Specified by:
addConsumer in interface ImageProducer
See Also:
ImageConsumer

isConsumer

public boolean isConsumer(ImageConsumer ic)
Determines whether an ImageConsumer is on the list of consumers currently interested in data for this image.
Specified by:
isConsumer in interface ImageProducer
Returns:
true if the ImageConsumer is on the list; false otherwise
See Also:
ImageConsumer

removeConsumer

public void removeConsumer(ImageConsumer ic)
Removes an ImageConsumer from the list of consumers interested in data for this image.
Specified by:
removeConsumer in interface ImageProducer
See Also:
ImageConsumer

startProduction

public void startProduction(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
Specified by:
startProduction in interface ImageProducer
See Also:
ImageConsumer

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer ic)
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order. The request is handed to the ImageFilter for further processing, since the ability to preserve the pixel ordering depends on the filter.
Specified by:
requestTopDownLeftRightResend in interface ImageProducer
See Also:
ImageConsumer
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageConsumer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface ImageConsumer

All Known Implementing Classes:
ImageFilter, PixelGrabber
public interface ImageConsumer

The interface for objects expressing interest in image data through the ImageProducer interfaces. When a consumer is added to an image producer, the producer delivers all of the data about the image using the method calls defined in this interface.

See Also:
ImageProducer

Field Summary
static int | COMPLETESCANLINES The pixels will be delivered in (multiples of) complete scanlines at a time.
static int | IMAGEABORTED The image creation process was deliberately aborted.
static int | IMAGEERROR An error was encountered while producing the image.
static int | RANDOMPIXELORDER The pixels will be delivered in a random order.
static int | SINGLEFRAME The image contain a single static image.
static int | SINGLEFRAMEDONE One frame of the image is complete but there are more frames to be delivered.
static int | SINGLEPASS The pixels will be delivered in a single pass.
static int | STATICIMAGEDONE The image is complete and there are no more pixels or frames to be delivered.
static int | TOPDOWNLEFTRIGHT The pixels will be delivered in top-down, left-to-right order.
Method Summary
void | imageComplete(int status) The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occured.
void | setColorModel(ColorModel model) The ColorModel object used for the majority of the pixels reported using the setPixels method calls.
void | setDimensions(int width, int height) The dimensions of the source image are reported using the setDimensions method call.
void | setHints(int hintflags) The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) The pixels of the image are delivered using one or more calls to the setPixels method.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) The pixels of the image are delivered using one or more calls to the setPixels method.
void | setProperties(Hashtable props) Sets the extensible list of properties associated with this image.

Field Detail

RANDOMPIXELORDER

public static final int RANDOMPIXELORDER
The pixels will be delivered in a random order. This tells the ImageConsumer not to use any optimizations that depend on the order of pixel delivery, which should be the default assumption in the absence of any call to the setHints method.
See Also:
setHints(int)

TOPDOWNLEFTRIGHT

public static final int TOPDOWNLEFTRIGHT
The pixels will be delivered in top-down, left-to-right order.
See Also:
setHints(int)

COMPLETESCANLINES

public static final int COMPLETESCANLINES
The pixels will be delivered in (multiples of) complete scanlines at a time.
See Also:
setHints(int)

SINGLEPASS

public static final int SINGLEPASS
The pixels will be delivered in a single pass. Each pixel will appear in only one call to any of the setPixels methods. An example of an image format which does not meet this criterion is a progressive JPEG image which defines pixels in multiple passes, each more refined than the previous.
See Also:
setHints(int)

SINGLEFRAME

public static final int SINGLEFRAME
The image contain a single static image. The pixels will be defined in calls to the setPixels methods and then the imageComplete method will be called with the STATICIMAGEDONE flag after which no more image data will be delivered. An example of an image type which would not meet these criteria would be the output of a video feed, or the representation of a 3D rendering being manipulated by the user. The end of each frame in those types of images will be indicated by calling imageComplete with the SINGLEFRAMEDONE flag.
See Also:
setHints(int), imageComplete(int)

IMAGEERROR

public static final int IMAGEERROR
An error was encountered while producing the image.
See Also:
imageComplete(int)

SINGLEFRAMEDONE

public static final int SINGLEFRAMEDONE
One frame of the image is complete but there are more frames to be delivered.
See Also:
imageComplete(int)

STATICIMAGEDONE

public static final int STATICIMAGEDONE
The image is complete and there are no more pixels or frames to be delivered.
See Also:
imageComplete(int)

IMAGEABORTED

public static final int IMAGEABORTED
The image creation process was deliberately aborted.
See Also:
imageComplete(int)
Method Detail

setDimensions

public void setDimensions(int width,
                          int height)
The dimensions of the source image are reported using the setDimensions method call.

setProperties

public void setProperties(Hashtable props)
Sets the extensible list of properties associated with this image.

setColorModel

public void setColorModel(ColorModel model)
The ColorModel object used for the majority of the pixels reported using the setPixels method calls. Note that each set of pixels delivered using setPixels contains its own ColorModel object, so no assumption should be made that this model will be the only one used in delivering pixel values. A notable case where multiple ColorModel objects may be seen is a filtered image when for each set of pixels that it filters, the filter determines whether the pixels can be sent on untouched, using the original ColorModel, or whether the pixels should be modified (filtered) and passed on using a ColorModel more convenient for the filtering process.
See Also:
ColorModel

setHints

public void setHints(int hintflags)
The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front. The setHints method should be called before any calls to any of the setPixels methods with a bit mask of hints about the manner in which the pixels will be delivered. If the ImageProducer does not follow the guidelines for the indicated hint, the results are undefined.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as bytes.
See Also:
ColorModel

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as ints.
See Also:
ColorModel

imageComplete

public void imageComplete(int status)
The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occured. The ImageConsumer should remove itself from the list of consumers registered with the ImageProducer at this time, unless it is interested in successive frames.
See Also:
ImageProducer.removeConsumer(java.awt.image.ImageConsumer)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ImageFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
Direct Known Subclasses:
BufferedImageFilter, CropImageFilter, ReplicateScaleFilter, RGBImageFilter
public class ImageFilter
extends Object
implements ImageConsumer, Cloneable

This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer. It is meant to be used in conjunction with a FilteredImageSource object to produce filtered versions of existing images. It is a base class that provides the calls needed to implement a "Null filter" which has no effect on the data being passed through. Filters should subclass this class and override the methods which deal with the data that needs to be filtered and modify it as necessary.

See Also:
FilteredImageSource, ImageConsumer

Field Summary
protected  ImageConsumer consumer
The consumer of the particular image data stream for which this instance of the ImageFilter is filtering data.
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
ImageFilter()
Method Summary
Object | clone() Clones this object.
ImageFilter | getFilterInstance(ImageConsumer ic) Returns a unique instance of an ImageFilter object which will actually perform the filtering for the specified ImageConsumer.
void | imageComplete(int status) Filters the information provided in the imageComplete method of the ImageConsumer interface.
void | resendTopDownLeftRight(ImageProducer ip) Responds to a request for a TopDownLeftRight (TDLR) ordered resend of the pixel data from an ImageConsumer.
void | setColorModel(ColorModel model) Filter the information provided in the setColorModel method of the ImageConsumer interface.
void | setDimensions(int width, int height) Filters the information provided in the setDimensions method of the ImageConsumer interface.
void | setHints(int hints) Filters the information provided in the setHints method of the ImageConsumer interface.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
void | setProperties(Hashtable props) Passes the properties from the source object along after adding a property indicating the stream of filters it has been run through.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

consumer

protected ImageConsumer consumer
The consumer of the particular image data stream for which this instance of the ImageFilter is filtering data. It is not initialized during the constructor, but rather during the getFilterInstance() method call when the FilteredImageSource is creating a unique instance of this object for a particular image data stream.
See Also:
getFilterInstance(java.awt.image.ImageConsumer), ImageConsumer
Constructor Detail

ImageFilter

public ImageFilter()
Method Detail

getFilterInstance

public ImageFilter getFilterInstance(ImageConsumer ic)
Returns a unique instance of an ImageFilter object which will actually perform the filtering for the specified ImageConsumer. The default implementation just clones this object.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

setDimensions

public void setDimensions(int width,
                          int height)
Filters the information provided in the setDimensions method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setDimensions in interface ImageConsumer
See Also:
ImageConsumer.setDimensions(int, int)

setProperties

public void setProperties(Hashtable props)
Passes the properties from the source object along after adding a property indicating the stream of filters it has been run through.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setProperties in interface ImageConsumer

setColorModel

public void setColorModel(ColorModel model)
Filter the information provided in the setColorModel method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setColorModel in interface ImageConsumer
See Also:
ImageConsumer.setColorModel(java.awt.image.ColorModel)

setHints

public void setHints(int hints)
Filters the information provided in the setHints method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setHints in interface ImageConsumer
See Also:
ImageConsumer.setHints(int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setPixels in interface ImageConsumer
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
setPixels in interface ImageConsumer
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

imageComplete

public void imageComplete(int status)
Filters the information provided in the imageComplete method of the ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Specified by:
imageComplete in interface ImageConsumer
See Also:
ImageConsumer.imageComplete(int)

resendTopDownLeftRight

public void resendTopDownLeftRight(ImageProducer ip)
Responds to a request for a TopDownLeftRight (TDLR) ordered resend of the pixel data from an ImageConsumer. The ImageFilter can respond to this request in one of three ways.
  1. If the filter can determine that it will forward the pixels in TDLR order if its upstream producer object sends them in TDLR order, then the request is automatically forwarded by default to the indicated ImageProducer using this filter as the requesting ImageConsumer, so no override is necessary.
  2. If the filter can resend the pixels in the right order on its own (presumably because the generated pixels have been saved in some sort of buffer), then it can override this method and simply resend the pixels in TDLR order as specified in the ImageProducer API.
  3. If the filter simply returns from this method then the request will be ignored and no resend will occur.
Parameters:
ip - The ImageProducer that is feeding this instance of the filter - also the ImageProducer that the request should be forwarded to if necessary.
See Also:
ImageProducer.requestTopDownLeftRightResend(java.awt.image.ImageConsumer)

clone

public Object clone()
Clones this object.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageObserver

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface ImageObserver

All Known Implementing Classes:
Component
public interface ImageObserver

An asynchronous update interface for receiving notifications about Image information as the Image is constructed.

Field Summary
static int | ABORT This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
static int | ALLBITS This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form.
static int | ERROR This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
static int | FRAMEBITS This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again.
static int | HEIGHT This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
static int | PROPERTIES This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
static int | SOMEBITS This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
static int | WIDTH This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
Method Summary
 boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
This method is called when information about an image which was previously requested using an asynchronous interface becomes available.

Field Detail

WIDTH

public static final int WIDTH
This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
See Also:
Image.getWidth(java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

HEIGHT

public static final int HEIGHT
This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
See Also:
Image.getHeight(java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

PROPERTIES

public static final int PROPERTIES
This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
See Also:
Image.getProperty(java.lang.String, java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

SOMEBITS

public static final int SOMEBITS
This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available. The bounding box of the new pixels can be taken from the x, y, width, and height arguments to the imageUpdate callback method.
See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

FRAMEBITS

public static final int FRAMEBITS
This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.
See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

ALLBITS

public static final int ALLBITS
This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.
See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), imageUpdate(java.awt.Image, int, int, int, int, int)

ERROR

public static final int ERROR
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error. No further information will become available and drawing the image will fail. As a convenience, the ABORT flag will be indicated at the same time to indicate that the image production was aborted.
See Also:
imageUpdate(java.awt.Image, int, int, int, int, int)

ABORT

public static final int ABORT
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete. No more information will become available without further action to trigger another image production sequence. If the ERROR flag was not also set in this image update, then accessing any of the data in the image will restart the production again, probably from the beginning.
See Also:
imageUpdate(java.awt.Image, int, int, int, int, int)
Method Detail

imageUpdate

public boolean imageUpdate(Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
This method is called when information about an image which was previously requested using an asynchronous interface becomes available. Asynchronous interfaces are method calls such as getWidth(ImageObserver) and drawImage(img, x, y, ImageObserver) which take an ImageObserver object as an argument. Those methods register the caller as interested either in information about the overall image itself (in the case of getWidth(ImageObserver)) or about an output version of an image (in the case of the drawImage(img, x, y, [w, h,] ImageObserver) call).

This method should return true if further updates are needed or false if the required information has been acquired. The image which was being tracked is passed in using the img argument. Various constants are combined to form the infoflags argument which indicates what information about the image is now available. The interpretation of the x, y, width, and height arguments depends on the contents of the infoflags argument.

The infoflags argument should be the bitwise inclusive OR of the following flags: WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT.

Parameters:
img - the image being observed.
infoflags - the bitwise inclusive OR of the following flags: WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT.
x - the x coordinate.
y - the y coordinate.
width - the width.
height - the height.
Returns:
false if the infoflags indicate that the image is completely loaded; true otherwise.
See Also:
WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT, Image.getWidth(java.awt.image.ImageObserver), Image.getHeight(java.awt.image.ImageObserver), Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageProducer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface ImageProducer

All Known Implementing Classes:
FilteredImageSource, MemoryImageSource, RenderableImageProducer
public interface ImageProducer

The interface for objects which can produce the image data for Images. Each image contains an ImageProducer which is used to reconstruct the image whenever it is needed, for example, when a new size of the Image is scaled, or when the width or height of the Image is being requested.

See Also:
ImageConsumer

Method Summary
void | addConsumer(ImageConsumer ic) This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.
boolean | isConsumer(ImageConsumer ic) This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
void | removeConsumer(ImageConsumer ic) This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data.
void | requestTopDownLeftRightResend(ImageConsumer ic) This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.
void | startProduction(ImageConsumer ic) This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer.

Method Detail

addConsumer

public void addConsumer(ImageConsumer ic)
This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image. The ImageProducer may, at its discretion, start delivering the image data to the consumer using the ImageConsumer interface immediately, or when the next available image reconstruction is triggered by a call to the startProduction method.
See Also:
startProduction(java.awt.image.ImageConsumer)

isConsumer

public boolean isConsumer(ImageConsumer ic)
This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.

removeConsumer

public void removeConsumer(ImageConsumer ic)
This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data. It is not considered an error to remove a consumer that is not currently registered. The ImageProducer should stop sending data to this consumer as soon as is feasible.

startProduction

public void startProduction(ImageConsumer ic)
This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer. This method differs from the addConsumer method in that a reproduction of the image data should be triggered as soon as possible.
See Also:
addConsumer(java.awt.image.ImageConsumer)

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer ic)
This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image. The ImageProducer is free to ignore this call if it cannot resend the data in that order. If the data can be resent, then the ImageProducer should respond by executing the following minimum set of ImageConsumer method calls:
    ic.setHints(TOPDOWNLEFTRIGHT | );
    ic.setPixels(...);	// As many times as needed
    ic.imageComplete();
See Also:
ImageConsumer.setHints(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImagingOpException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ImagingOpException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.awt.image.ImagingOpException
All Implemented Interfaces:
Serializable
public class ImagingOpException
extends RuntimeException

The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.

See Also:
Serialized Form

Constructor Summary
ImagingOpException(String s)
Constructs an ImagingOpException object with the specified message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ImagingOpException

public ImagingOpException(String s)
Constructs an ImagingOpException object with the specified message.
Parameters:
s - the message to generate when a ImagingOpException is thrown
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IndexColorModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class IndexColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
        |
        +--java.awt.image.IndexColorModel
All Implemented Interfaces:
Transparency
public class IndexColorModel
extends ColorModel

The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace. The colormap specifies red, green, blue, and optional alpha components corresponding to each index. All components are represented in the colormap as 8-bit unsigned integral values. If alpha is not present, an opaque alpha component (alpha = 1.0) is assumed for each entry. An optional transparent pixel value can be supplied that indicates a completely transparent pixel, regardless of any alpha component recorded for that pixel value. Note that alpha values in IndexColorModel objects are never premultiplied. This color model is similar to an X11 PseudoColor visual.

The index represented by a pixel value is stored in the least significant n bits of the pixel representations passed to the methods of this class, where n is the pixel size specified to the constructor for a particular IndexColorModel object and n must be between 1 and 16. Higher order bits in pixel representations are assumed to be zero. For those methods that use a primitive array pixel representation of type transferType, the array length is always one. The transfer types supported are DataBuffer.TYPE_BYTE and DataBuffer.TYPE_USHORT. A single int pixel representation is valid for all objects of this class, since it is always possible to represent pixel values used with this class in a single int. Therefore, methods that use this representation do not throw an IllegalArgumentException due to an invalid pixel value.

Many of the methods in this class are final. The reason for this is that the underlying native graphics code makes assumptions about the layout and operation of this class and those assumptions are reflected in the implementations of the methods here that are marked final. You can subclass this class for other reaons, but you cannot override or modify the behaviour of those methods.

See Also:
ColorModel, ColorSpace, DataBuffer

Fields inherited from class java.awt.image.ColorModel
pixel_bits, transferType
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b)
Constructs an IndexColorModel from the specified arrays of red, green, and blue components.
IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b, byte[] a)
Constructs an IndexColorModel from the given arrays of red, green, blue and alpha components.
IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b, int trans)
Constructs an IndexColorModel from the given arrays of red, green, and blue components.
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasalpha)
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasalpha, int trans)
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
IndexColorModel(int bits, int size, int[] cmap, int start, boolean hasalpha, int trans, int transferType)
Constructs an IndexColorModel from an array of ints where each int is comprised of red, green, blue, and optional alpha components in the default RGB color model format.
IndexColorModel(int bits, int size, int[] cmap, int start, int transferType, BigInteger validBits)
Constructs an IndexColorModel from an int array where each int is comprised of red, green, blue, and alpha components in the default RGB color model format.
Method Summary
BufferedImage | convertToIntDiscrete(Raster raster, boolean forceARGB) Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel.
SampleModel | createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
WritableRaster | createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
void | finalize() Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
int | getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255.
void | getAlphas(byte[] a) Copies the array of alpha transparency components into the specified array.
int | getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
void | getBlues(byte[] b) Copies the array of blue color components into the specified array.
int[] | getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
int[] | getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
int[] | getComponentSize() Returns an array of the number of bits for each color/alpha component.
int | getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel given an array of unnormalized color/alpha components.
Object | getDataElements(int[] components, int offset, Object pixel) Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components.
Object | getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int | getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
void | getGreens(byte[] g) Copies the array of green color components into the specified array.
int | getMapSize() Returns the size of the color/alpha component arrays in this IndexColorModel.
int | getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
void | getReds(byte[] r) Copies the array of red color components into the specified array.
int | getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format.
void | getRGBs(int[] rgb) Converts data for each index from the color and alpha component arrays to an int in the default RGB ColorModel format and copies the resulting 32-bit ARGB values into the specified array.
int | getTransparency() Returns the transparency.
int | getTransparentPixel() Returns the index of the transparent pixel in this IndexColorModel or -1 if there is no transparent pixel.
BigInteger | getValidPixels() Returns a BigInteger that indicates the valid/invalid pixels in the colormap.
boolean | isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel or false if it is not compatible with this ColorModel.
boolean | isCompatibleSampleModel(SampleModel sm) Checks if the specified SampleModel is compatible with this ColorModel.
boolean | isValid() Returns whether or not all of the pixels are valid.
boolean | isValid(int pixel) Returns whether or not the pixel is valid.
String | toString() Returns the String representation of the contents of this ColorModelobject.
Methods inherited from class java.awt.image.ColorModel
coerceData, equals, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponentSize, getGreen, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGBdefault, getTransferType, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       byte[] r,
                       byte[] g,
                       byte[] b)
Constructs an IndexColorModel from the specified arrays of red, green, and blue components. Pixels described by this color model all have alpha components of 255 unnormalized (1.0 normalized), which means they are fully opaque. All of the arrays specifying the color components must have at least the specified number of entries. The ColorSpace is the default sRGB space. The transparency value is Transparency.OPAQUE. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
r - the array of red color components
g - the array of green color components
b - the array of blue color components
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       byte[] r,
                       byte[] g,
                       byte[] b,
                       int trans)
Constructs an IndexColorModel from the given arrays of red, green, and blue components. Pixels described by this color model all have alpha components of 255 unnormalized (1.0 normalized), which means they are fully opaque, except for the indicated transparent pixel. All of the arrays specifying the color components must have at least the specified number of entries. The ColorSpace is the default sRGB space. The transparency value is Transparency.BITMASK. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
r - the array of red color components
g - the array of green color components
b - the array of blue color components
trans - the index of the transparent pixel
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       byte[] r,
                       byte[] g,
                       byte[] b,
                       byte[] a)
Constructs an IndexColorModel from the given arrays of red, green, blue and alpha components. All of the arrays specifying the components must have at least the specified number of entries. The ColorSpace is the default sRGB space. The transparency value is Transparency.TRANSLUCENT. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
r - the array of red color components
g - the array of green color components
b - the array of blue color components
a - the array of alpha value components
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       byte[] cmap,
                       int start,
                       boolean hasalpha)
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components. The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space. The transparency value is Transparency.TRANSLUCENT if hasAlpha is true, Transparency.OPAQUE otherwise. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
cmap - the array of color components
start - the starting offset of the first color component
hasalpha - indicates whether alpha values are contained in the cmap array
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       byte[] cmap,
                       int start,
                       boolean hasalpha,
                       int trans)
Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components. The specified transparent index represents a pixel that is considered entirely transparent regardless of any alpha value specified for it. The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space. The transparency value is Transparency.TRANSLUCENT if hasAlpha is true; otherwise it is Transparency.BITMASK if trans is a valid index into the colormap (between 0 and size - 1) or Transparency.OPAQUE if trans is not a valid index. The transfer type is the smallest of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT that can hold a single pixel.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
cmap - the array of color components
start - the starting offset of the first color component
hasalpha - indicates whether alpha values are contained in the cmap array
trans - the index of the fully transparent pixel
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       int[] cmap,
                       int start,
                       boolean hasalpha,
                       int trans,
                       int transferType)
Constructs an IndexColorModel from an array of ints where each int is comprised of red, green, blue, and optional alpha components in the default RGB color model format. The specified transparent index represents a pixel that is considered entirely transparent regardless of any alpha value specified for it. The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space. The transparency value is Transparency.TRANSLUCENT if hasAlpha is true; otherwise it is Transparency.BITMASK if trans is a valid index into the colormap (between 0 and size - 1) or Transparency.OPAQUE if trans is not a valid index.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component arrays
cmap - the array of color components
start - the starting offset of the first color component
hasalpha - indicates whether alpha values are contained in the cmap array
trans - the index of the fully transparent pixel
transferType - the data type of the array used to represent pixel values. The data type must be either DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT.
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 16
IllegalArgumentException - if size is less than 1

IndexColorModel

public IndexColorModel(int bits,
                       int size,
                       int[] cmap,
                       int start,
                       int transferType,
                       BigInteger validBits)
Constructs an IndexColorModel from an int array where each int is comprised of red, green, blue, and alpha components in the default RGB color model format. The array must have enough values in it to fill all of the needed component arrays of the specified size. The ColorSpace is the default sRGB space. The transfer type is the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel. The BigInteger object specifies the valid/invalid pixels in the cmap array. A pixel is valid if the BigInteger value at that index is set, and is invalid if the BigInteger bit at that index is not set.
Parameters:
bits - the number of bits each pixel occupies
size - the size of the color component array
cmap - the array of color components
start - the starting offset of the first color component
transferType - the specified data type
validBits - a BigInteger object. If a bit is set in the BigInteger, the pixel at that index is valid. If a bit is not set, the pixel at that index is considered invalid. If null, all pixels are valid. Only bits from 0 to map_size will be considered.
Method Detail

getTransparency

public int getTransparency()
Returns the transparency. Returns either OPAQUE, BITMASK, or TRANSLUCENT
Overrides:
getTransparency in class ColorModel
Returns:
the transparency of this IndexColorModel
See Also:
Transparency.OPAQUE, Transparency.BITMASK, Transparency.TRANSLUCENT

getComponentSize

public int[] getComponentSize()
Returns an array of the number of bits for each color/alpha component. The array contains the color components in the order red, green, blue, followed by the alpha component, if present.
Overrides:
getComponentSize in class ColorModel
Returns:
an array containing the number of bits of each color and alpha component of this IndexColorModel

getMapSize

public final int getMapSize()
Returns the size of the color/alpha component arrays in this IndexColorModel.
Returns:
the size of the color and alpha component arrays.

getTransparentPixel

public final int getTransparentPixel()
Returns the index of the transparent pixel in this IndexColorModel or -1 if there is no transparent pixel.
Returns:
the index of this IndexColorModel object's transparent pixel, or -1 if there is no such pixel.

getReds

public final void getReds(byte[] r)
Copies the array of red color components into the specified array. Only the initial entries of the array as specified by getMapSize are written.
Parameters:
r - the specified array into which the elements of the array of red color components are copied

getGreens

public final void getGreens(byte[] g)
Copies the array of green color components into the specified array. Only the initial entries of the array as specified by getMapSize are written.
Parameters:
g - the specified array into which the elements of the array of green color components are copied

getBlues

public final void getBlues(byte[] b)
Copies the array of blue color components into the specified array. Only the initial entries of the array as specified by getMapSize are written.
Parameters:
b - the specified array into which the elements of the array of blue color components are copied

getAlphas

public final void getAlphas(byte[] a)
Copies the array of alpha transparency components into the specified array. Only the initial entries of the array as specified by getMapSize are written.
Parameters:
a - the specified array into which the elements of the array of alpha components are copied

getRGBs

public final void getRGBs(int[] rgb)
Converts data for each index from the color and alpha component arrays to an int in the default RGB ColorModel format and copies the resulting 32-bit ARGB values into the specified array. Only the initial entries of the array as specified by getMapSize are written.
Parameters:
rgb - the specified array into which the converted ARGB values from this array of color and alpha components are copied.

getRed

public final int getRed(int pixel)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. The pixel value is specified as an int. The returned value is a non pre-multiplied value.
Overrides:
getRed in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the value of the red color component for the specified pixel

getGreen

public final int getGreen(int pixel)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. The pixel value is specified as an int. The returned value is a non pre-multiplied value.
Overrides:
getGreen in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the value of the green color component for the specified pixel

getBlue

public final int getBlue(int pixel)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. The pixel value is specified as an int. The returned value is a non pre-multiplied value.
Overrides:
getBlue in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the value of the blue color component for the specified pixel

getAlpha

public final int getAlpha(int pixel)
Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified as an int.
Overrides:
getAlpha in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the value of the alpha component for the specified pixel

getRGB

public final int getRGB(int pixel)
Returns the color/alpha components of the pixel in the default RGB color model format. The pixel value is specified as an int. The returned value is in a non pre-multiplied format.
Overrides:
getRGB in class ColorModel
Parameters:
pixel - the specified pixel
Returns:
the color and alpha components of the specified pixel
See Also:
ColorModel.getRGBdefault()

getDataElements

public Object getDataElements(int rgb,
                              Object pixel)
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the setDataElements method of a WritableRaster object. If the pixel variable is null, a new array is allocated. If pixel is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. The pixel array is returned.

Since IndexColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.

Overrides:
getDataElements in class ColorModel
Parameters:
rgb - the integer pixel representation in the default RGB color model
pixel - the specified pixel
Returns:
an array representation of the specified pixel in this IndexColorModel.
Throws:
ClassCastException - if pixel is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel
UnsupportedOperationException - if transferType is invalid
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getComponents

public int[] getComponents(int pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel. The pixel value is specified as an int. If the components array is null, a new array is allocated. The components array is returned. Color/alpha components are stored in the components array starting at offset even if the array is allocated by this method. An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components starting at offset.
Overrides:
getComponents in class ColorModel
Parameters:
pixel - the specified pixel
components - the array to receive the color and alpha components of the specified pixel
offset - the offset into the components array at which to start storing the color and alpha components
Returns:
an array containing the color and alpha components of the specified pixel starting at the specified offset.

getComponents

public int[] getComponents(Object pixel,
                           int[] components,
                           int offset)
Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If pixel is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. If the components array is null, a new array is allocated. The components array is returned. Color/alpha components are stored in the components array starting at offset even if the array is allocated by this method. An ArrayIndexOutOfBoundsException is also thrown if the components array is not null and is not large enough to hold all the color and alpha components starting at offset.

Since IndexColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.

Overrides:
getComponents in class ColorModel
Parameters:
pixel - the specified pixel
components - an array that receives the color and alpha components of the specified pixel
offset - the index into the components array at which to begin storing the color and alpha components of the specified pixel
Returns:
an array containing the color and alpha components of the specified pixel starting at the specified offset.
Throws:
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel or if the components array is not null and is not large enough to hold all the color and alpha components starting at offset
ClassCastException - if pixel is not a primitive array of type transferType
UnsupportedOperationException - if transferType is not one of the supported transer types

getDataElement

public int getDataElement(int[] components,
                          int offset)
Returns a pixel value represented as an int in this ColorModel given an array of unnormalized color/alpha components. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all of the color and alpha components starting at offset. Since ColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType.
Overrides:
getDataElement in class ColorModel
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving the color and alpha components
Returns:
an int pixel value in this ColorModel corresponding to the specified components.
Throws:
ArrayIndexOutOfBoundsException - if the components array is not large enough to hold all of the color and alpha components starting at offset
UnsupportedOperationException - if transferType is invalid

getDataElements

public Object getDataElements(int[] components,
                              int offset,
                              Object pixel)
Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all of the color and alpha components starting at offset. If the pixel variable is null, a new array is allocated. If pixel is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel.

Since IndexColorModel can be subclassed, subclasses inherit the implementation of this method and if they don't override it then they throw an exception if they use an unsupported transferType

Overrides:
getDataElements in class ColorModel
Parameters:
components - an array of unnormalized color and alpha components
offset - the index into components at which to begin retrieving color and alpha components
pixel - the Object representing an array of color and alpha components
Returns:
an Object representing an array of color and alpha components.
Throws:
ClassCastException - if pixel is not a primitive array of type transferType
ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel or the components array is not large enough to hold all of the color and alpha components starting at offset
UnsupportedOperationException - if transferType is not one of the supported transer types
See Also:
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel. This method only works for color models with 16 or fewer bits per pixel.

Since IndexColorModel can be subclassed, any subclass that supports greater than 16 bits per pixel must override this method.

Overrides:
createCompatibleWritableRaster in class ColorModel
Parameters:
w - the width to apply to the new WritableRaster
h - the height to apply to the new WritableRaster
Returns:
a WritableRaster object with the specified width and height.
Throws:
UnsupportedOperationException - if the number of bits in a pixel is greater than 16
See Also:
WritableRaster, SampleModel

isCompatibleRaster

public boolean isCompatibleRaster(Raster raster)
Returns true if raster is compatible with this ColorModel or false if it is not compatible with this ColorModel.
Overrides:
isCompatibleRaster in class ColorModel
Parameters:
raster - the Raster object to test for compatibility
Returns:
true if raster is compatible with this ColorModel; false otherwise.

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
Overrides:
createCompatibleSampleModel in class ColorModel
Parameters:
w - the width to apply to the new SampleModel
h - the height to apply to the new SampleModel
Returns:
a SampleModel object with the specified width and height.
Throws:
IllegalArgumentException - if w or h is not greater than 0
See Also:
SampleModel

isCompatibleSampleModel

public boolean isCompatibleSampleModel(SampleModel sm)
Checks if the specified SampleModel is compatible with this ColorModel. If sm is null, this method returns false.
Overrides:
isCompatibleSampleModel in class ColorModel
Parameters:
sm - the specified SampleModel, or null
Returns:
true if the specified SampleModel is compatible with this ColorModel; false otherwise.
See Also:
SampleModel

convertToIntDiscrete

public BufferedImage convertToIntDiscrete(Raster raster,
                                          boolean forceARGB)
Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel. If forceARGB is true, a TYPE_INT_ARGB image is returned regardless of whether or not this ColorModel has an alpha component array or a transparent pixel.
Parameters:
raster - the specified Raster
forceARGB - if true, the returned BufferedImage is TYPE_INT_ARGB; otherwise it is TYPE_INT_RGB
Returns:
a BufferedImage created with the specified Raster

isValid

public boolean isValid(int pixel)
Returns whether or not the pixel is valid.
Parameters:
pixel - the specified pixel value
Returns:
true if pixel is valid; false otherwise.

isValid

public boolean isValid()
Returns whether or not all of the pixels are valid.
Returns:
true if all pixels are valid; false otherwise.

getValidPixels

public BigInteger getValidPixels()
Returns a BigInteger that indicates the valid/invalid pixels in the colormap. A bit is valid if the BigInteger value at that index is set, and is invalid if the BigInteger value at that index is not set. The only valid ranges to query in the BigInteger are between 0 and map_size.
Returns:
a BigInteger indicating the valid/invalid pixels.

finalize

public void finalize()
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
Overrides:
finalize in class ColorModel
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

toString

public String toString()
Returns the String representation of the contents of this ColorModelobject.
Overrides:
toString in class ColorModel
Returns:
a String representing the contents of this ColorModel object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Kernel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class Kernel

java.lang.Object
  |
  +--java.awt.image.Kernel
All Implemented Interfaces:
Cloneable
public class Kernel
extends Object
implements Cloneable

The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation. The X origin and Y origin indicate the kernel matrix element that corresponds to the pixel position for which an output value is being computed.

See Also:
ConvolveOp

Constructor Summary
Kernel(int width, int height, float[] data)
Constructs a Kernel object from an array of floats.
Method Summary
Object | clone() Clones this object.
int | getHeight() Returns the height of this Kernel.
float[] | getKernelData(float[] data) Returns the kernel data in row major order.
int | getWidth() Returns the width of this Kernel.
int | getXOrigin() Returns the X origin of this Kernel.
int | getYOrigin() Returns the Y origin of this Kernel.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Kernel

public Kernel(int width,
              int height,
              float[] data)
Constructs a Kernel object from an array of floats. The first width*height elements of the data array are copied. If the length of the data array is less than width*height, an IllegalArgumentException is thrown. The X origin is (width-1)/2 and the Y origin is (height-1)/2.
Parameters:
width - width of the kernel
height - height of the kernel
data - kernel data in row major order
Throws:
IllegalArgumentException - if the length of data is less than the product of width and height
Method Detail

getXOrigin

public final int getXOrigin()
Returns the X origin of this Kernel.
Returns:
the X origin.

getYOrigin

public final int getYOrigin()
Returns the Y origin of this Kernel.
Returns:
the Y origin.

getWidth

public final int getWidth()
Returns the width of this Kernel.
Returns:
the width of this Kernel.

getHeight

public final int getHeight()
Returns the height of this Kernel.
Returns:
the height of this Kernel.

getKernelData

public final float[] getKernelData(float[] data)
Returns the kernel data in row major order. The data array is returned. If data is null, a new array is allocated.
Parameters:
data - if non-null, contains the returned kernel data
Returns:
the data array containing the kernel data in row major order or, if data is null, a newly allocated array containing the kernel data in row major order
Throws:
IllegalArgumentException - if data is less than the size of this Kernel

clone

public Object clone()
Clones this object.
Overrides:
clone in class Object
Returns:
a clone of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookupOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class LookupOp

java.lang.Object
  |
  +--java.awt.image.LookupOp
All Implemented Interfaces:
BufferedImageOp, RasterOp
public class LookupOp
extends Object
implements BufferedImageOp, RasterOp

This class implements a lookup operation from the source to the destination. The LookupTable object may contain a single array or multiple arrays, subject to the restrictions below.

For Rasters, the lookup operates on bands. The number of lookup arrays may be one, in which case the same array is applied to all bands, or it must equal the number of Source Raster bands.

For BufferedImages, the lookup operates on color and alpha components. The number of lookup arrays may be one, in which case the same array is applied to all color (but not alpha) components. Otherwise, the number of lookup arrays may equal the number of Source color components, in which case no lookup of the alpha component (if present) is performed. If neither of these cases apply, the number of lookup arrays must equal the number of Source color components plus alpha components, in which case lookup is performed for all color and alpha components. This allows non-uniform rescaling of multi-band BufferedImages.

BufferedImage sources with premultiplied alpha data are treated in the same manner as non-premultiplied images for purposes of the lookup. That is, the lookup is done per band on the raw data of the BufferedImage source without regard to whether the data is premultiplied. If a color conversion is required to the destination ColorModel, the premultiplied state of both source and destination will be taken into account for this step.

Images with an IndexColorModel cannot be used.

If a RenderingHints object is specified in the constructor, the color rendering hint and the dithering hint may be used when color conversion is required.

This class allows the Source to be the same as the Destination.

See Also:
LookupTable, RenderingHints.KEY_COLOR_RENDERING, RenderingHints.KEY_DITHERING

Constructor Summary
LookupOp(LookupTable lookup, RenderingHints hints)
Constructs a LookupOp object given the lookup table and a RenderingHints object (which may be null).
Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
BufferedImage | filter(BufferedImage src, BufferedImage dst) Performs a lookup operation on a BufferedImage.
WritableRaster | filter(Raster src, WritableRaster dst) Performs a lookup operation on a Raster.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
RenderingHints | getRenderingHints() Returns the rendering hints for this op.
LookupTable | getTable() Returns the LookupTable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LookupOp

public LookupOp(LookupTable lookup,
                RenderingHints hints)
Constructs a LookupOp object given the lookup table and a RenderingHints object (which may be null).
Method Detail

getTable

public final LookupTable getTable()
Returns the LookupTable.

filter

public final BufferedImage filter(BufferedImage src,
                                  BufferedImage dst)
Performs a lookup operation on a BufferedImage. If the color model in the source image is not the same as that in the destination image, the pixels will be converted in the destination. If the destination image is null, a BufferedImage will be created with an appropriate ColorModel. An IllegalArgumentException may be thrown if the number of arrays in the LookupTable does not meet the restrictions stated in the class comment above, or if the source image has an IndexColorModel.
Specified by:
filter in interface BufferedImageOp

filter

public final WritableRaster filter(Raster src,
                                   WritableRaster dst)
Performs a lookup operation on a Raster. If the destination Raster is null, a new Raster will be created. The IllegalArgumentException may be thrown if the source and destination Rasters have different numbers of bands or if the number of arrays in the LookupTable does not meet the restrictions stated in the class comment above.
Specified by:
filter in interface RasterOp

getBounds2D

public final Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the filtered destination image. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface BufferedImageOp

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the filtered destination Raster. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface RasterOp

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands. If destCM is null, an appropriate ColorModel will be used.
Specified by:
createCompatibleDestImage in interface BufferedImageOp
Parameters:
src - Source image for the filter operation.
destCM - ColorModel of the destination. Can be null.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
Specified by:
createCompatibleDestRaster in interface RasterOp

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the destination point given a point in the source. If dstPt is non-null, it will be used to hold the return value. Since this is not a geometric operation, the srcPt will equal the dstPt.
Specified by:
getPoint2D in interface BufferedImageOp

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints for this op.
Specified by:
getRenderingHints in interface BufferedImageOp
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookupTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class LookupTable

java.lang.Object
  |
  +--java.awt.image.LookupTable
Direct Known Subclasses:
ByteLookupTable, ShortLookupTable
public abstract class LookupTable
extends Object

This abstract class defines a lookup table object. ByteLookupTable and ShortLookupTable are subclasses, which contain byte and short data, respectively. A lookup table contains data arrays for one or more bands (or components) of an image (for example, separate arrays for R, G, and B), and it contains an offset which will be subtracted from the input values before indexing into the arrays. This allows an array smaller than the native data size to be provided for a constrained input. If there is only one array in the lookup table, it will be applied to all bands. All arrays must be the same size.

See Also:
ByteLookupTable, ShortLookupTable, LookupOp

Constructor Summary
protected LookupTable(int offset, int numComponents)
Constructs a new LookupTable from the number of components and an offset into the lookup table.
Method Summary
int | getNumComponents() Returns the number of components in the lookup table.
int | getOffset() Returns the offset.
abstract int[] | lookupPixel(int[] src, int[] dest) Returns an int array of components for one pixel.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LookupTable

protected LookupTable(int offset,
                      int numComponents)
Constructs a new LookupTable from the number of components and an offset into the lookup table.
Parameters:
offset - the offset to subtract from input values before indexing into the data arrays for this LookupTable
numComponents - the number of data arrays in this LookupTable
Throws:
IllegalArgumentException - if offset is less than 0 or if numComponents is less than 1
Method Detail

getNumComponents

public int getNumComponents()
Returns the number of components in the lookup table.

getOffset

public int getOffset()
Returns the offset.

lookupPixel

public abstract int[] lookupPixel(int[] src,
                                  int[] dest)
Returns an int array of components for one pixel. Source and destination may be equal. The dest array is returned. If dest is null, a new array will be allocated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MemoryImageSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class MemoryImageSource

java.lang.Object
  |
  +--java.awt.image.MemoryImageSource
All Implemented Interfaces:
ImageProducer
public class MemoryImageSource
extends Object
implements ImageProducer

This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image. Here is an example which calculates a 100x100 image representing a fade from black to blue along the X axis and a fade from black to red along the Y axis:

    int w = 100;
    int h = 100;
    int pix[] = new int[w * h];
    int index = 0;
    for (int y = 0; y
 The MemoryImageSource is also capable of managing a memory image which
 varies over time to allow animation or custom rendering.  Here is an
 example showing how to set up the animation source and signal changes
 in the data (adapted from the MemoryAnimationSourceDemo by Garth Dickie):

    int pixels[];
    MemoryImageSource source;

    public void init() {
        int width = 50;
        int height = 50;
        int size = width * height;
        pixels = new int[size];

        int value = getBackground().getRGB();
        for (int i = 0; i

See Also:
ImageProducer

Constructor Summary

MemoryImageSource(int w,
                  int h,
                  ColorModel cm,
                  byte[] pix,
                  int off,
                  int scan)

          Constructs an ImageProducer object which uses an array of bytes
 to produce data for an Image object.

MemoryImageSource(int w,
                  int h,
                  ColorModel cm,
                  byte[] pix,
                  int off,
                  int scan,
                  Hashtable props)

          Constructs an ImageProducer object which uses an array of bytes
 to produce data for an Image object.

MemoryImageSource(int w,
                  int h,
                  ColorModel cm,
                  int[] pix,
                  int off,
                  int scan)

          Constructs an ImageProducer object which uses an array of integers
 to produce data for an Image object.

MemoryImageSource(int w,
                  int h,
                  ColorModel cm,
                  int[] pix,
                  int off,
                  int scan,
                  Hashtable props)

          Constructs an ImageProducer object which uses an array of integers
 to produce data for an Image object.

MemoryImageSource(int w,
                  int h,
                  int[] pix,
                  int off,
                  int scan)

          Constructs an ImageProducer object which uses an array of integers
 in the default RGB ColorModel to produce data for an Image object.

MemoryImageSource(int w,
                  int h,
                  int[] pix,
                  int off,
                  int scan,
                  Hashtable props)

          Constructs an ImageProducer object which uses an array of integers
 in the default RGB ColorModel to produce data for an Image object.

Method Summary
void | addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | isConsumer(ImageConsumer ic) Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
void | newPixels() Send a whole new buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
void | newPixels(byte[] newpix, ColorModel newmodel, int offset, int scansize) Change to a new byte array to hold the pixels for this image.
void | newPixels(int[] newpix, ColorModel newmodel, int offset, int scansize) Change to a new int array to hold the pixels for this image.
void | newPixels(int x, int y, int w, int h) Send a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
void | newPixels(int x, int y, int w, int h, boolean framenotify) Send a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image.
void | removeConsumer(ImageConsumer ic) Remove an ImageConsumer from the list of consumers interested in data for this image.
void | requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
void | setAnimated(boolean animated) Change this memory image into a multi-frame animation or a single-frame static image depending on the animated parameter.
void | setFullBufferUpdates(boolean fullbuffers) Specify whether this animated memory image should always be updated by sending the complete buffer of pixels whenever there is a change.
void | startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately start delivery of the image data through the ImageConsumer interface.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         ColorModel cm,
                         byte[] pix,
                         int off,
                         int scan)

Constructs an ImageProducer object which uses an array of bytes
 to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer)

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         ColorModel cm,
                         byte[] pix,
                         int off,
                         int scan,
                         Hashtable props)

Constructs an ImageProducer object which uses an array of bytes
 to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer)

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         ColorModel cm,
                         int[] pix,
                         int off,
                         int scan)

Constructs an ImageProducer object which uses an array of integers
 to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer)

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         ColorModel cm,
                         int[] pix,
                         int off,
                         int scan,
                         Hashtable props)

Constructs an ImageProducer object which uses an array of integers
 to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer)

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         int[] pix,
                         int off,
                         int scan)

Constructs an ImageProducer object which uses an array of integers
 in the default RGB ColorModel to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer),
ColorModel.getRGBdefault()

MemoryImageSource

public MemoryImageSource(int w,
                         int h,
                         int[] pix,
                         int off,
                         int scan,
                         Hashtable props)

Constructs an ImageProducer object which uses an array of integers
 in the default RGB ColorModel to produce data for an Image object.

See Also:
Component.createImage(java.awt.image.ImageProducer),
ColorModel.getRGBdefault()

Method Detail

addConsumer

public void addConsumer(ImageConsumer ic)

Adds an ImageConsumer to the list of consumers interested in
 data for this image.

Specified by:
addConsumer in interface ImageProducer

See Also:
ImageConsumer

isConsumer

public boolean isConsumer(ImageConsumer ic)

Determine if an ImageConsumer is on the list of consumers currently
 interested in data for this image.

Specified by:
isConsumer in interface ImageProducer

Returns:
true if the ImageConsumer is on the list; false otherwise
See Also:
ImageConsumer

removeConsumer

public void removeConsumer(ImageConsumer ic)

Remove an ImageConsumer from the list of consumers interested in
 data for this image.

Specified by:
removeConsumer in interface ImageProducer

See Also:
ImageConsumer

startProduction

public void startProduction(ImageConsumer ic)

Adds an ImageConsumer to the list of consumers interested in
 data for this image, and immediately start delivery of the
 image data through the ImageConsumer interface.

Specified by:
startProduction in interface ImageProducer

See Also:
ImageConsumer

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer ic)

Requests that a given ImageConsumer have the image data delivered
 one more time in top-down, left-right order.

Specified by:
requestTopDownLeftRightResend in interface ImageProducer

See Also:
ImageConsumer

setAnimated

public void setAnimated(boolean animated)

Change this memory image into a multi-frame animation or a
 single-frame static image depending on the animated parameter.

This method should be called immediately after the
 MemoryImageSource is constructed and before an image is
 created with it to ensure that all ImageConsumers will
 receive the correct multi-frame data.  If an ImageConsumer
 is added to this ImageProducer before this flag is set then
 that ImageConsumer will see only a snapshot of the pixel
 data that was available when it connected.

Parameters:
animated - true if the image is a multi-frame animation

setFullBufferUpdates

public void setFullBufferUpdates(boolean fullbuffers)

Specify whether this animated memory image should always be
 updated by sending the complete buffer of pixels whenever
 there is a change.
 This flag is ignored if the animation flag is not turned on
 through the setAnimated() method.

This method should be called immediately after the
 MemoryImageSource is constructed and before an image is
 created with it to ensure that all ImageConsumers will
 receive the correct pixel delivery hints.

Parameters:
fullbuffers - true if the complete pixel buffer should always
 be sent
See Also:
setAnimated(boolean)

newPixels

public void newPixels()

Send a whole new buffer of pixels to any ImageConsumers that
 are currently interested in the data for this image and notify
 them that an animation frame is complete.
 This method only has effect if the animation flag has been
 turned on through the setAnimated() method.

See Also:
ImageConsumer,
setAnimated(boolean)

newPixels

public void newPixels(int x,
                      int y,
                      int w,
                      int h)

Send a rectangular region of the buffer of pixels to any
 ImageConsumers that are currently interested in the data for
 this image and notify them that an animation frame is complete.
 This method only has effect if the animation flag has been
 turned on through the setAnimated() method.
 If the full buffer update flag was turned on with the
 setFullBufferUpdates() method then the rectangle parameters
 will be ignored and the entire buffer will always be sent.

Parameters:
x - the x coordinate of the upper left corner of the rectangle
 of pixels to be sent
y - the y coordinate of the upper left corner of the rectangle
 of pixels to be sent
w - the width of the rectangle of pixels to be sent
h - the height of the rectangle of pixels to be sent
See Also:
ImageConsumer,
setAnimated(boolean),
setFullBufferUpdates(boolean)

newPixels

public void newPixels(int x,
                      int y,
                      int w,
                      int h,
                      boolean framenotify)

Send a rectangular region of the buffer of pixels to any
 ImageConsumers that are currently interested in the data for
 this image.
 If the framenotify parameter is true then the consumers are
 also notified that an animation frame is complete.
 This method only has effect if the animation flag has been
 turned on through the setAnimated() method.
 If the full buffer update flag was turned on with the
 setFullBufferUpdates() method then the rectangle parameters
 will be ignored and the entire buffer will always be sent.

Parameters:
x - the x coordinate of the upper left corner of the rectangle
 of pixels to be sent
y - the y coordinate of the upper left corner of the rectangle
 of pixels to be sent
w - the width of the rectangle of pixels to be sent
h - the height of the rectangle of pixels to be sent
framenotify - true if the consumers should be sent a
 SINGLEFRAMEDONE notification
See Also:
ImageConsumer,
setAnimated(boolean),
setFullBufferUpdates(boolean)

newPixels

public void newPixels(byte[] newpix,
                      ColorModel newmodel,
                      int offset,
                      int scansize)

Change to a new byte array to hold the pixels for this image.
 If the animation flag has been turned on through the setAnimated()
 method, then the new pixels will be immediately delivered to any
 ImageConsumers that are currently interested in the data for
 this image.

See Also:
setAnimated(boolean)

newPixels

public void newPixels(int[] newpix,
                      ColorModel newmodel,
                      int offset,
                      int scansize)

Change to a new int array to hold the pixels for this image.
 If the animation flag has been turned on through the setAnimated()
 method, then the new pixels will be immediately delivered to any
 ImageConsumers that are currently interested in the data for
 this image.

See Also:
setAnimated(boolean)

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


MultiPixelPackedSampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class MultiPixelPackedSampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
        |
        +--java.awt.image.MultiPixelPackedSampleModel
public class MultiPixelPackedSampleModel
extends SampleModel

The MultiPixelPackedSampleModel class represents one-banded images and can pack multiple one-sample pixels into one data element. Pixels are not allowed to span data elements. The data type can be DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Each pixel must be a power of 2 number of bits and a power of 2 number of pixels must fit exactly in one data element. Pixel bit stride is equal to the number of bits per pixel. Scanline stride is in data elements and the last several data elements might be padded with unused pixels. Data bit offset is the offset in bits from the beginning of the DataBuffer to the first pixel and must be a multiple of pixel bit stride.

The following code illustrates extracting the bits for pixel x, y from DataBuffer data and storing the pixel data in data elements of type dataType:

      int dataElementSize = DataBuffer.getDataTypeSize(dataType);
      int bitnum = dataBitOffset + x*pixelBitStride;
      int element = data.getElem(y*scanlineStride + bitnum/dataElementSize);
      int shift = dataElementSize - (bitnum & (dataElementSize-1))
                  - pixelBitStride;
      int pixel = (element >> shift) & ((1 << pixelBitStride) - 1);

Fields inherited from class java.awt.image.SampleModel
dataType, height, numBands, width
Constructor Summary
MultiPixelPackedSampleModel(int dataType, int w, int h, int numberOfBits)
Constructs a MultiPixelPackedSampleModel with the specified data type, width, height and number of bits per pixel.
MultiPixelPackedSampleModel(int dataType, int w, int h, int numberOfBits, int scanlineStride, int dataBitOffset)
Constructs a MultiPixelPackedSampleModel with specified data type, width, height, number of bits per pixel, scanline stride and data bit offset.
Method Summary
 SampleModel createCompatibleSampleModel(int w, int h)
Creates a new MultiPixelPackedSampleModel with the specified width and height.
 DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this MultiPixelPackedSampleModel.
 SampleModel createSubsetSampleModel(int[] bands)
Creates a new MultiPixelPackedSampleModel with a subset of the bands of this MultiPixelPackedSampleModel.
 int getBitOffset(int x)
Returns the offset, in bits, into the data element in which it is stored for the xth pixel of a scanline.
 int getDataBitOffset()
Returns the data bit offset in bits.
 Object getDataElements(int x, int y, Object obj, DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType.
 int getNumDataElements()
Returns the number of data elements needed to transfer one pixel via the getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) and setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) methods.
 int getOffset(int x, int y)
Returns the offset of pixel (x, y) in data array elements.
 int[] getPixel(int x, int y, int[] iArray, DataBuffer data)
Returns the specified single band pixel in the first element of an int array.
 int getPixelBitStride()
Returns the pixel bit stride in bits.
 int getSample(int x, int y, int b, DataBuffer data)
Returns as int the sample in a specified band for the pixel located at (x, y).
 int[] getSampleSize()
Returns the number of bits per sample for all bands.
 int getSampleSize(int band)
Returns the number of bits per sample for the specified band.
 int getScanlineStride()
Returns the scanline stride.
 int getTransferType()
Returns the TransferType used to transfer pixels by way of the getDataElements and setDataElements methods.
 void setDataElements(int x, int y, Object obj, DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
 void setPixel(int x, int y, int[] iArray, DataBuffer data)
Sets a pixel in the DataBuffer using an int array for input.
 void setSample(int x, int y, int b, int s, DataBuffer data)
Sets a sample in the specified band for the pixel located at (x, y) in the DataBuffer using an int for input.
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixels, getPixels, getPixels, getSampleDouble, getSampleFloat, getSamples, getSamples, getSamples, getWidth, setDataElements, setPixel, setPixel, setPixels, setPixels, setPixels, setSample, setSample, setSamples, setSamples, setSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiPixelPackedSampleModel

public MultiPixelPackedSampleModel(int dataType,
                                   int w,
                                   int h,
                                   int numberOfBits)
Constructs a MultiPixelPackedSampleModel with the specified data type, width, height and number of bits per pixel.
Parameters:
dataType - the data type for storing samples
w - the width, in pixels, of the region of image data described
h - the height, in pixels, of the region of image data described
numberOfBits - the number of bits per pixel
Throws:
IllegalArgumentException - if dataType is not either DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT

MultiPixelPackedSampleModel

public MultiPixelPackedSampleModel(int dataType,
                                   int w,
                                   int h,
                                   int numberOfBits,
                                   int scanlineStride,
                                   int dataBitOffset)
Constructs a MultiPixelPackedSampleModel with specified data type, width, height, number of bits per pixel, scanline stride and data bit offset.
Parameters:
dataType - the data type for storing samples
w - the width, in pixels, of the region of image data described
h - the height, in pixels, of the region of image data described
numberOfBits - the number of bits per pixel
scanlineStride - the line stride of the image data
dataBitOffset - the data bit offset for the region of image data described
Throws:
RasterFormatException - if the number of bits per pixel is not a power of 2 or if a power of 2 number of pixels do not fit in one data element.
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if dataType is not either DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT
Method Detail

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a new MultiPixelPackedSampleModel with the specified width and height. The new MultiPixelPackedSampleModel has the same storage data type and number of bits per pixel as this MultiPixelPackedSampleModel.
Overrides:
createCompatibleSampleModel in class SampleModel
Parameters:
w - the specified width
h - the specified height
Returns:
a SampleModel with the specified width and height and with the same storage data type and number of bits per pixel as this MultiPixelPackedSampleModel.
Throws:
IllegalArgumentException - if w or h is not greater than 0

createDataBuffer

public DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this MultiPixelPackedSampleModel. The DataBuffer object's data type and size is consistent with this MultiPixelPackedSampleModel. The DataBuffer has a single bank.
Overrides:
createDataBuffer in class SampleModel
Returns:
a DataBuffer with the same data type and size as this MultiPixelPackedSampleModel.

getNumDataElements

public int getNumDataElements()
Returns the number of data elements needed to transfer one pixel via the getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) and setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) methods. For a MultiPixelPackedSampleModel, this is one.
Overrides:
getNumDataElements in class SampleModel
Returns:
the number of data elements.

getSampleSize

public int[] getSampleSize()
Returns the number of bits per sample for all bands.
Overrides:
getSampleSize in class SampleModel
Returns:
the number of bits per sample.

getSampleSize

public int getSampleSize(int band)
Returns the number of bits per sample for the specified band.
Overrides:
getSampleSize in class SampleModel
Parameters:
band - the specified band
Returns:
the number of bits per sample for the specified band.

getOffset

public int getOffset(int x,
                     int y)
Returns the offset of pixel (x, y) in data array elements.
Parameters:
x, y - the specified pixel
Returns:
the offset of the specified pixel.

getBitOffset

public int getBitOffset(int x)
Returns the offset, in bits, into the data element in which it is stored for the xth pixel of a scanline. This offset is the same for all scanlines.
Parameters:
x - the specified pixel
Returns:
the bit offset of the specified pixel.

getScanlineStride

public int getScanlineStride()
Returns the scanline stride.
Returns:
the scanline stride of this MultiPixelPackedSampleModel.

getPixelBitStride

public int getPixelBitStride()
Returns the pixel bit stride in bits. This value is the same as the number of bits per pixel.
Returns:
the pixelBitStride of this MultiPixelPackedSampleModel.

getDataBitOffset

public int getDataBitOffset()
Returns the data bit offset in bits.
Returns:
the dataBitOffset of this MultiPixelPackedSampleModel.

getTransferType

public int getTransferType()
Returns the TransferType used to transfer pixels by way of the getDataElements and setDataElements methods. The TransferType might or might not be the same as the storage DataType. The TransferType is one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT.
Overrides:
getTransferType in class SampleModel
Returns:
the transfertype.

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
Creates a new MultiPixelPackedSampleModel with a subset of the bands of this MultiPixelPackedSampleModel. Since a MultiPixelPackedSampleModel only has one band, the bands argument must have a length of one and indicate the zeroth band.
Overrides:
createSubsetSampleModel in class SampleModel
Parameters:
bands - the specified bands
Returns:
a new SampleModel with a subset of bands of this MultiPixelPackedSampleModel.
Throws:
RasterFormatException - if the number of bands requested is not one.
IllegalArgumentException - if w or h is not greater than 0

getSample

public int getSample(int x,
                     int y,
                     int b,
                     DataBuffer data)
Returns as int the sample in a specified band for the pixel located at (x, y). An ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds.
Overrides:
getSample in class SampleModel
Parameters:
x, y - the coordinates of the specified pixel
b - the band to return, which is assumed to be 0
data - the DataBuffer containing the image data
Returns:
the specified band containing the sample of the specified pixel.
Throws:
ArrayIndexOutOfBoundException - if the specified coordinates are not in bounds.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x, y) in the DataBuffer using an int for input. An ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds.
Overrides:
setSample in class SampleModel
Parameters:
x, y - the coordinates of the specified pixel
b - the band to return, which is assumed to be 0
s - the input sample as an int
data - the DataBuffer where image data is stored
Throws:
ArrayIndexOutOfBoundsException - if the coordinates are not in bounds.

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object obj,
                              DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. For a MultiPixelPackedSampleModel, the array has one element, and the type is the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel. Generally, obj should be passed in as null, so that the Object is created automatically and is the correct primitive data type.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by MultiPixelPackedSampleModel mppsm1, to DataBuffer db2, whose storage layout is described by MultiPixelPackedSampleModel mppsm2. The transfer is generally more efficient than using getPixel or setPixel.

          MultiPixelPackedSampleModel mppsm1, mppsm2;
         DataBufferInt db1, db2;
          mppsm2.setDataElements(x, y, mppsm1.getDataElements(x, y, null,
                              db1), db2);
Using getDataElements or setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is not null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds, or if obj is not null and is not large enough to hold the pixel data.

Overrides:
getDataElements in class SampleModel
Parameters:
x, y - coordinates of the pixel location.
obj - a primitive array in which to return the pixel data or null.
data - the DataBuffer containing the image data.
Returns:
an Object containing data for the specified pixel.
Throws:
ClassCastException - if obj is not a primitive array of type TransferType or is not null
ArrayIndexOutOfBoundsException - if the coordinates are not in bounds, or if obj is not null or not large enough to hold the pixel data

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray,
                      DataBuffer data)
Returns the specified single band pixel in the first element of an int array. ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds.
Overrides:
getPixel in class SampleModel
Parameters:
x, y - the coordinates of the pixel location
iArray - the array containing the pixel to be returned or null
data - the DataBuffer where image data is stored
Returns:
an array containing the specified pixel.
Throws:
ArrayIndexOutOfBoundsException - if the coordinates are not in bounds

setDataElements

public void setDataElements(int x,
                            int y,
                            Object obj,
                            DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. For a MultiPixelPackedSampleModel, only the first element of the array holds valid data, and the type must be the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by MultiPixelPackedSampleModel mppsm1, to DataBuffer db2, whose storage layout is described by MultiPixelPackedSampleModel mppsm2. The transfer is generally more efficient than using getPixel or setPixel.

          MultiPixelPackedSampleModel mppsm1, mppsm2;
         DataBufferInt db1, db2;
          mppsm2.setDataElements(x, y, mppsm1.getDataElements(x, y, null,
                              db1), db2);
Using getDataElements or setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModel objects have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Overrides:
setDataElements in class SampleModel
Parameters:
x, y - the coordinates of the pixel location
obj - a primitive array containing pixel data
data - the DataBuffer containing the image data

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using an int array for input. ArrayIndexOutOfBoundsException is thrown if the coordinates are not in bounds.
Overrides:
setPixel in class SampleModel
Parameters:
x, y - the coordinates of the pixel location
iArray - the input pixel in an int array
data - the DataBuffer containing the image data
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackedColorModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class PackedColorModel

java.lang.Object
  |
  +--java.awt.image.ColorModel
        |
        +--java.awt.image.PackedColorModel
All Implemented Interfaces:
Transparency
Direct Known Subclasses:
DirectColorModel
public abstract class PackedColorModel
extends ColorModel

The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity. This class can be used with an arbitrary ColorSpace. The number of color samples in the pixel values must be the same as the number of color components in the ColorSpace. There can be a single alpha sample. The array length is always 1 for those methods that use a primitive array pixel representation of type transferType. The transfer types supported are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, and DataBuffer.TYPE_INT. Color and alpha samples are stored in the single element of the array in bits indicated by bit masks. Each bit mask must be contiguous and masks must not overlap. The same masks apply to the single int pixel representation used by other methods. The correspondence of masks and color/alpha samples is as follows:

  • Masks are identified by indices running from 0 through getNumComponents - 1.
  • The first getNumColorComponents indices refer to color samples.
  • If an alpha sample is present, it corresponds the last index.
  • The order of the color indices is specified by the ColorSpace. Typically, this reflects the name of the color space type (for example, TYPE_RGB), index 0 corresponds to red, index 1 to green, and index 2 to blue.

The translation from pixel values to color/alpha components for display or processing purposes is a one-to-one correspondence of samples to components. A PackedColorModel is typically used with image data that uses masks to define packed samples. For example, a PackedColorModel can be used in conjunction with a SinglePixelPackedSampleModel to construct a BufferedImage. Normally the masks used by the SampleModel and the ColorModel would be the same. However, if they are different, the color interpretation of pixel data is done according to the masks of the ColorModel.

A single int pixel representation is valid for all objects of this class since it is always possible to represent pixel values used with this class in a single int. Therefore, methods that use this representation do not throw an IllegalArgumentException due to an invalid pixel value.

A subclass of PackedColorModel is DirectColorModel, which is similar to an X11 TrueColor visual.

See Also:
DirectColorModel, SinglePixelPackedSampleModel, BufferedImage

Fields inherited from class java.awt.image.ColorModel
pixel_bits, transferType
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
PackedColorModel(ColorSpace space, int bits, int[] colorMaskArray, int alphaMask, boolean isAlphaPremultiplied, int trans, int transferType)
Constructs a PackedColorModel from a color mask array, which specifies which bits in an int pixel representation contain each of the color samples, and an alpha mask.
PackedColorModel(ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int trans, int transferType)
Constructs a PackedColorModel from the specified masks which indicate which bits in an int pixel representation contain the alpha, red, green and blue color samples.
Method Summary
SampleModel | createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
boolean | equals(Object obj) Tests if the specified Object is an instance of PackedColorModel and equals this PackedColorModel.
WritableRaster | getAlphaRaster(WritableRaster raster) Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster.
int | getMask(int index) Returns the mask indicating which bits in a pixel contain the specified color/alpha sample.
int[] | getMasks() Returns a mask array indicating which bits in a pixel contain the color and alpha samples.
boolean | isCompatibleSampleModel(SampleModel sm) Checks if the specified SampleModel is compatible with this ColorModel.
Methods inherited from class java.awt.image.ColorModel
coerceData, createCompatibleWritableRaster, finalize, getAlpha, getAlpha, getBlue, getBlue, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElements, getDataElements, getGreen, getGreen, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRed, getRGB, getRGB, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, isCompatibleRaster, toString
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PackedColorModel

public PackedColorModel(ColorSpace space,
                        int bits,
                        int[] colorMaskArray,
                        int alphaMask,
                        boolean isAlphaPremultiplied,
                        int trans,
                        int transferType)
Constructs a PackedColorModel from a color mask array, which specifies which bits in an int pixel representation contain each of the color samples, and an alpha mask. Color components are in the specified ColorSpace. The length of colorMaskArray should be the number of components in the ColorSpace. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. If the alphaMask is 0, there is no alpha. If there is alpha, the boolean isAlphaPremultiplied specifies how to interpret color and alpha samples in pixel values. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency, trans, specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values.
Parameters:
space - the specified ColorSpace
bits - the number of bits in the pixel values
colorMaskArray - array that specifies the masks representing the bits of the pixel values that represent the color components
alphaMask - specifies the mask representing the bits of the pixel values that represent the alpha component
isAlphaPremultiplied - true if color samples are premultiplied by the alpha sample; false otherwise
trans - specifies the alpha value that can be represented by this color model
transferType - the type of array used to represent pixel values
Throws:
IllegalArgumentException - if bits is less than 1 or greater than 32

PackedColorModel

public PackedColorModel(ColorSpace space,
                        int bits,
                        int rmask,
                        int gmask,
                        int bmask,
                        int amask,
                        boolean isAlphaPremultiplied,
                        int trans,
                        int transferType)
Constructs a PackedColorModel from the specified masks which indicate which bits in an int pixel representation contain the alpha, red, green and blue color samples. Color components are in the specified ColorSpace, which must be of type ColorSpace.TYPE_RGB. All of the bits in each mask must be contiguous and fit in the specified number of least significant bits of an int pixel representation. If amask is 0, there is no alpha. If there is alpha, the boolean isAlphaPremultiplied specifies how to interpret color and alpha samples in pixel values. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency, trans, specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values.
Parameters:
space - the specified ColorSpace
bits - the number of bits in the pixel values
rmask - specifies the mask representing the bits of the pixel values that represent the red color component
gmask - specifies the mask representing the bits of the pixel values that represent the green color component
bmask - specifies the mask representing the bits of the pixel values that represent the blue color component
amask - specifies the mask representing the bits of the pixel values that represent the alpha component
isAlphaPremultiplied - true if color samples are premultiplied by the alpha sample; false otherwise
trans - specifies the alpha value that can be represented by this color model
transferType - the type of array used to represent pixel values
Throws:
IllegalArgumentException - if space is not a TYPE_RGB space
See Also:
ColorSpace
Method Detail

getMask

public final int getMask(int index)
Returns the mask indicating which bits in a pixel contain the specified color/alpha sample. For color samples, index corresponds to the placement of color sample names in the color space. Thus, an index equal to 0 for a CMYK ColorSpace would correspond to Cyan and an index equal to 1 would correspond to Magenta. If there is alpha, the alpha index would be:
      alphaIndex = numComponents() - 1;
Parameters:
index - the specified color or alpha sample
Returns:
the mask, which indicates which bits of the int pixel representation contain the color or alpha sample specified by index.
Throws:
ArrayIndexOutOfBoundsException - if index is greater than the number of components minus 1 in this PackedColorModel or if index is less than zero

getMasks

public final int[] getMasks()
Returns a mask array indicating which bits in a pixel contain the color and alpha samples.
Returns:
the mask array , which indicates which bits of the int pixel representation contain the color or alpha samples.

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
Overrides:
createCompatibleSampleModel in class ColorModel
Parameters:
w - the width (in pixels) of the region of the image data described
h - the height (in pixels) of the region of the image data described
Returns:
the newly created SampleModel.
Throws:
IllegalArgumentException - if w or h is not greater than 0
See Also:
SampleModel

isCompatibleSampleModel

public boolean isCompatibleSampleModel(SampleModel sm)
Checks if the specified SampleModel is compatible with this ColorModel. If sm is null, this method returns false.
Overrides:
isCompatibleSampleModel in class ColorModel
Parameters:
sm - the specified SampleModel, or null
Returns:
true if the specified SampleModel is compatible with this ColorModel; false otherwise.
See Also:
SampleModel

getAlphaRaster

public WritableRaster getAlphaRaster(WritableRaster raster)
Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster. This method assumes that WritableRaster objects associated with this ColorModel store the alpha band, if present, as the last band of image data. Returns null if there is no separate spatial alpha channel associated with this ColorModel. This method creates a new WritableRaster, but shares the data array.
Overrides:
getAlphaRaster in class ColorModel
Parameters:
raster - a WritableRaster containing an image
Returns:
a WritableRaster that represents the alpha channel of the image contained in raster.

equals

public boolean equals(Object obj)
Tests if the specified Object is an instance of PackedColorModel and equals this PackedColorModel.
Overrides:
equals in class ColorModel
Parameters:
obj - the Object to test for equality
Returns:
true if the specified Object is an instance of PackedColorModel and equals this PackedColorModel; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PixelGrabber

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class PixelGrabber

java.lang.Object
  |
  +--java.awt.image.PixelGrabber
All Implemented Interfaces:
ImageConsumer
public class PixelGrabber
extends Object
implements ImageConsumer

The PixelGrabber class implements an ImageConsumer which can be attached to an Image or ImageProducer object to retrieve a subset of the pixels in that image. Here is an example:

 public void handlesinglepixel(int x, int y, int pixel) {
    int alpha = (pixel >> 24) & 0xff;
    int red   = (pixel >> 16) & 0xff;
    int green = (pixel >>  8) & 0xff;
    int blue  = (pixel      ) & 0xff;
    // Deal with the pixel as necessary...
 }

 public void handlepixels(Image img, int x, int y, int w, int h) {
    int[] pixels = new int[w * h];
    PixelGrabber pg = new PixelGrabber(img, x, y, w, h, pixels, 0, w);
    try {
        pg.grabPixels();
    } catch (InterruptedException e) {
        System.err.println("interrupted waiting for pixels!");
        return;
    }
    if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
        System.err.println("image fetch aborted or errored");
        return;
    }
    for (int j = 0; j

See Also:
ColorModel.getRGBdefault()

Fields inherited from interface java.awt.image.ImageConsumer

COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT

Constructor Summary

PixelGrabber(Image img,
             int x,
             int y,
             int w,
             int h,
             boolean forceRGB)

          Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the specified image.

PixelGrabber(Image img,
             int x,
             int y,
             int w,
             int h,
             int[] pix,
             int off,
             int scansize)

          Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the specified image into the given array.

PixelGrabber(ImageProducer ip,
             int x,
             int y,
             int w,
             int h,
             int[] pix,
             int off,
             int scansize)

          Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the image produced by the specified
 ImageProducer into the given array.

Method Summary
void | abortGrabbing() Request the PixelGrabber to abort the image fetch.
ColorModel | getColorModel() Get the ColorModel for the pixels stored in the array.
int | getHeight() Get the height of the pixel buffer (after adjusting for image height).
Object | getPixels() Get the pixel buffer.
int | getStatus() Return the status of the pixels.
int | getWidth() Get the width of the pixel buffer (after adjusting for image width).
boolean | grabPixels() Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered.
boolean | grabPixels(long ms) Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered or until the specified timeout has elapsed.
void | imageComplete(int status) The imageComplete method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setColorModel(ColorModel model) The setColorModel method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setDimensions(int width, int height) The setDimensions method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setHints(int hints) The setHints method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOff, int srcScan) The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, int[] pixels, int srcOff, int srcScan) The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | setProperties(Hashtable props) The setProperties method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | startGrabbing() Request the PixelGrabber to start fetching the pixels.
int | status() Returns the status of the pixels.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PixelGrabber

public PixelGrabber(Image img,
                    int x,
                    int y,
                    int w,
                    int h,
                    int[] pix,
                    int off,
                    int scansize)

Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the specified image into the given array.
 The pixels are stored into the array in the default RGB ColorModel.
 The RGB data for pixel (i, j) where (i, j) is inside the rectangle
 (x, y, w, h) is stored in the array at
 pix[(j - y) * scansize + (i - x) + off].

Parameters:
img - the image to retrieve pixels from
x - the x coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image, relative to the default
 (unscaled) size of the image
y - the y coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image
w - the width of the rectangle of pixels to retrieve
h - the height of the rectangle of pixels to retrieve
pix - the array of integers which are to be used to hold the
 RGB pixels retrieved from the image
off - the offset into the array of where to store the first pixel
scansize - the distance from one row of pixels to the next in
 the array
See Also:
ColorModel.getRGBdefault()

PixelGrabber

public PixelGrabber(ImageProducer ip,
                    int x,
                    int y,
                    int w,
                    int h,
                    int[] pix,
                    int off,
                    int scansize)

Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the image produced by the specified
 ImageProducer into the given array.
 The pixels are stored into the array in the default RGB ColorModel.
 The RGB data for pixel (i, j) where (i, j) is inside the rectangle
 (x, y, w, h) is stored in the array at
 pix[(j - y) * scansize + (i - x) + off].

Parameters:
img - the image to retrieve pixels from
x - the x coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image, relative to the default
 (unscaled) size of the image
y - the y coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image
w - the width of the rectangle of pixels to retrieve
h - the height of the rectangle of pixels to retrieve
pix - the array of integers which are to be used to hold the
 RGB pixels retrieved from the image
off - the offset into the array of where to store the first pixel
scansize - the distance from one row of pixels to the next in
 the array
See Also:
ColorModel.getRGBdefault()

PixelGrabber

public PixelGrabber(Image img,
                    int x,
                    int y,
                    int w,
                    int h,
                    boolean forceRGB)

Create a PixelGrabber object to grab the (x, y, w, h) rectangular
 section of pixels from the specified image.  The pixels are
 accumulated in the original ColorModel if the same ColorModel
 is used for every call to setPixels, otherwise the pixels are
 accumulated in the default RGB ColorModel.  If the forceRGB
 parameter is true, then the pixels will be accumulated in the
 default RGB ColorModel anyway.  A buffer is allocated by the
 PixelGrabber to hold the pixels in either case.  If (w <0) or="or" (h="(h" <="<" 0),="0)," then="then" they="they" will="will" default="default" to="to" the="the" remaining="remaining" width="width" and="and" height="height" of="of" the="the" source="source" data="data" when="when" that="that" information="information" is="is" delivered.

Parameters:
img - the image to retrieve the image data from
x - the x coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image, relative to the default
 (unscaled) size of the image
y - the y coordinate of the upper left corner of the rectangle
 of pixels to retrieve from the image
w - the width of the rectangle of pixels to retrieve
h - the height of the rectangle of pixels to retrieve
forceRGB - true if the pixels should always be converted to
 the default RGB ColorModel

Method Detail

startGrabbing

public void startGrabbing()

Request the PixelGrabber to start fetching the pixels.

abortGrabbing

public void abortGrabbing()

Request the PixelGrabber to abort the image fetch.

grabPixels

public boolean grabPixels()
                   throws InterruptedException

Request the Image or ImageProducer to start delivering pixels and
 wait for all of the pixels in the rectangle of interest to be
 delivered.

Returns:
true if the pixels were successfully grabbed, false on
 abort, error or timeout
Throws:
InterruptedException - Another thread has interrupted this thread.

grabPixels

public boolean grabPixels(long ms)
                   throws InterruptedException

Request the Image or ImageProducer to start delivering pixels and
 wait for all of the pixels in the rectangle of interest to be
 delivered or until the specified timeout has elapsed.  This method
 behaves in the following ways, depending on the value of
 ms:

  •  If ms == 0, waits until all pixels are delivered

  •  If ms > 0, waits until all pixels are delivered
 as timeout expires.

  •  If ms <0, returns="returns" true if all pixels
 are grabbed, false otherwise and does not wait.

Parameters:
ms - the number of milliseconds to wait for the image pixels
 to arrive before timing out
Returns:
true if the pixels were successfully grabbed, false on
 abort, error or timeout
Throws:
InterruptedException - Another thread has interrupted this thread.

getStatus

public int getStatus()

Return the status of the pixels.  The ImageObserver flags
 representing the available pixel information are returned.

Returns:
the bitwise OR of all relevant ImageObserver flags
See Also:
ImageObserver

getWidth

public int getWidth()

Get the width of the pixel buffer (after adjusting for image width).
 If no width was specified for the rectangle of pixels to grab then
 then this information will only be available after the image has
 delivered the dimensions.

Returns:
the final width used for the pixel buffer or -1 if the width
 is not yet known
See Also:
getStatus()

getHeight

public int getHeight()

Get the height of the pixel buffer (after adjusting for image height).
 If no width was specified for the rectangle of pixels to grab then
 then this information will only be available after the image has
 delivered the dimensions.

Returns:
the final height used for the pixel buffer or -1 if the height
 is not yet known
See Also:
getStatus()

getPixels

public Object getPixels()

Get the pixel buffer.  If the PixelGrabber was not constructed
 with an explicit pixel buffer to hold the pixels then this method
 will return null until the size and format of the image data is
 known.
 Since the PixelGrabber may fall back on accumulating the data
 in the default RGB ColorModel at any time if the source image
 uses more than one ColorModel to deliver the data, the array
 object returned by this method may change over time until the
 image grab is complete.

Returns:
either a byte array or an int array
See Also:
getStatus()

getColorModel

public ColorModel getColorModel()

Get the ColorModel for the pixels stored in the array.  If the
 PixelGrabber was constructed with an explicit pixel buffer then
 this method will always return the default RGB ColorModel,
 otherwise it may return null until the ColorModel used by the
 ImageProducer is known.
 Since the PixelGrabber may fall back on accumulating the data
 in the default RGB ColorModel at any time if the source image
 uses more than one ColorModel to deliver the data, the ColorModel
 object returned by this method may change over time until the
 image grab is complete and may not reflect any of the ColorModel
 objects that was used by the ImageProducer to deliver the pixels.

Returns:
the ColorModel object used for storing the pixels
See Also:
getStatus(),
ColorModel.getRGBdefault()

setDimensions

public void setDimensions(int width,
                          int height)

The setDimensions method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setDimensions in interface ImageConsumer

setHints

public void setHints(int hints)

The setHints method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setHints in interface ImageConsumer

setProperties

public void setProperties(Hashtable props)

The setProperties method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setProperties in interface ImageConsumer

setColorModel

public void setColorModel(ColorModel model)

The setColorModel method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setColorModel in interface ImageConsumer

Following copied from interface: java.awt.image.ImageConsumer

See Also:
ColorModel

setPixels

public void setPixels(int srcX,
                      int srcY,
                      int srcW,
                      int srcH,
                      ColorModel model,
                      byte[] pixels,
                      int srcOff,
                      int srcScan)

The setPixels method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setPixels in interface ImageConsumer

Following copied from interface: java.awt.image.ImageConsumer

See Also:
ColorModel

setPixels

public void setPixels(int srcX,
                      int srcY,
                      int srcW,
                      int srcH,
                      ColorModel model,
                      int[] pixels,
                      int srcOff,
                      int srcScan)

The setPixels method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
setPixels in interface ImageConsumer

Following copied from interface: java.awt.image.ImageConsumer

See Also:
ColorModel

imageComplete

public void imageComplete(int status)

The imageComplete method is part of the ImageConsumer API which
 this class must implement to retrieve the pixels.

 Note: This method is intended to be called by the ImageProducer
 of the Image whose pixels are being grabbed.  Developers using
 this class to retrieve pixels from an image should avoid calling
 this method directly since that operation could result in problems
 with retrieving the requested pixels.

Specified by:
imageComplete in interface ImageConsumer

Following copied from interface: java.awt.image.ImageConsumer

See Also:
ImageProducer.removeConsumer(java.awt.image.ImageConsumer)

status

public int status()

Returns the status of the pixels.  The ImageObserver flags
 representing the available pixel information are returned.
 This method and getStatus have the
 same implementation, but getStatus is the
 preferred method because it conforms to the convention of
 naming information-retrieval methods with the form
 "getXXX".

Returns:
the bitwise OR of all relevant ImageObserver flags
See Also:
ImageObserver,
getStatus()

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


PixelInterleavedSampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class PixelInterleavedSampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
        |
        +--java.awt.image.ComponentSampleModel
              |
              +--java.awt.image.PixelInterleavedSampleModel
public class PixelInterleavedSampleModel
extends ComponentSampleModel

This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer. It subclasses ComponentSampleModel but provides a more efficent implementation for accessing pixel interleaved image data than is provided by ComponentSampleModel. This class stores sample data for all bands in a single bank of the DataBuffer. Accessor methods are provided so that image data can be manipulated directly. Pixel stride is the number of data array elements between two samples for the same band on the same scanline. Scanline stride is the number of data array elements between a given sample and the corresponding sample in the same column of the next scanline. Band offsets denote the number of data array elements from the first data array element of the bank of the DataBuffer holding each band to the first sample of the band. The bands are numbered from 0 to N-1. Bank indices denote the correspondence between a bank of the data buffer and a band of image data. This class supports TYPE_BYTE, TYPE_USHORT, TYPE_SHORT, TYPE_INT, TYPE_FLOAT and TYPE_DOUBLE datatypes.

Fields inherited from class java.awt.image.ComponentSampleModel
bandOffsets, bankIndices, numBands, numBanks, pixelStride, scanlineStride
Fields inherited from class java.awt.image.SampleModel
dataType, height, width
Constructor Summary
PixelInterleavedSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride, int[] bandOffsets)
Constructs a PixelInterleavedSampleModel with the specified parameters.
Method Summary
SampleModel | createCompatibleSampleModel(int w, int h) Creates a new PixelInterleavedSampleModel with the specified width and height.
SampleModel | createSubsetSampleModel(int[] bands) Creates a new PixelInterleavedSampleModel with a subset of the bands of this PixelInterleavedSampleModel.
Methods inherited from class java.awt.image.ComponentSampleModel
createDataBuffer, getBandOffsets, getBankIndices, getDataElements, getNumDataElements, getOffset, getOffset, getPixel, getPixels, getPixelStride, getSample, getSampleDouble, getSampleFloat, getSamples, getSampleSize, getSampleSize, getScanlineStride, setDataElements, setPixel, setPixels, setSample, setSample, setSample, setSamples
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixels, getPixels, getSamples, getSamples, getTransferType, getWidth, setDataElements, setPixel, setPixel, setPixels, setPixels, setSamples, setSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PixelInterleavedSampleModel

public PixelInterleavedSampleModel(int dataType,
                                   int w,
                                   int h,
                                   int pixelStride,
                                   int scanlineStride,
                                   int[] bandOffsets)
Constructs a PixelInterleavedSampleModel with the specified parameters. The number of bands will be given by the length of the bandOffsets array.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
pixelStride - The pixel stride of the image data.
scanlineStride - The line stride of the image data.
bandOffsets - The offsets of all bands.
Throws:
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if any offset between bands is greater than the scanline stride
IllegalArgumentException - if the product of pixelStride and w is greater than scanlineStride
IllegalArgumentException - if pixelStride is less than any offset between bands
IllegalArgumentException - if dataType is not one of the supported data types
Method Detail

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
Creates a new PixelInterleavedSampleModel with the specified width and height. The new PixelInterleavedSampleModel will have the same number of bands, storage data type, and pixel stride as this PixelInterleavedSampleModel. The band offsets may be compressed such that the minimum of all of the band offsets is zero.
Overrides:
createCompatibleSampleModel in class ComponentSampleModel
Parameters:
w - the width of the resulting SampleModel
h - the height of the resulting SampleModel
Throws:
IllegalArgumentException - if w or h is not greater than 0

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
Creates a new PixelInterleavedSampleModel with a subset of the bands of this PixelInterleavedSampleModel. The new PixelInterleavedSampleModel can be used with any DataBuffer that the existing PixelInterleavedSampleModel can be used with. The new PixelInterleavedSampleModel/DataBuffer combination will represent an image with a subset of the bands of the original PixelInterleavedSampleModel/DataBuffer combination.
Overrides:
createSubsetSampleModel in class ComponentSampleModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Raster

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class Raster

java.lang.Object
  |
  +--java.awt.image.Raster
Direct Known Subclasses:
WritableRaster
public class Raster
extends Object

A class representing a rectangular array of pixels. A Raster encapsulates a DataBuffer that stores the sample values and a SampleModel that describes how to locate a given sample value in a DataBuffer.

A Raster defines values for pixels occupying a particular rectangular area of the plane, not necessarily including (0, 0). The rectangle, known as the Raster's bounding rectangle and available by means of the getBounds method, is defined by minX, minY, width, and height values. The minX and minY values define the coordinate of the upper left corner of the Raster. References to pixels outside of the bounding rectangle may result in an exception being thrown, or may result in references to unintended elements of the Raster's associated DataBuffer. It is the user's responsibility to avoid accessing such pixels.

A SampleModel describes how samples of a Raster are stored in the primitive array elements of a DataBuffer. Samples may be stored one per data element, as in a PixelInterleavedSampleModel or BandedSampleModel, or packed several to an element, as in a SinglePixelPackedSampleModel or MultiPixelPackedSampleModel. The SampleModel is also controls whether samples are sign extended, allowing unsigned data to be stored in signed Java data types such as byte, short, and int.

Although a Raster may live anywhere in the plane, a SampleModel makes use of a simple coordinate system that starts at (0, 0). A Raster therefore contains a translation factor that allows pixel locations to be mapped between the Raster's coordinate system and that of the SampleModel. The translation from the SampleModel coordinate system to that of the Raster may be obtained by the getSampleModelTranslateX and getSampleModelTranslateY methods.

A Raster may share a DataBuffer with another Raster either by explicit construction or by the use of the createChild and createTranslatedChild methods. Rasters created by these methods can return a reference to the Raster they were created from by means of the getParent method. For a Raster that was not constructed by means of a call to createTranslatedChild or createChild, getParent will return null.

The createTranslatedChild method returns a new Raster that shares all of the data of the current Raster, but occupies a bounding rectangle of the same width and height but with a different starting point. For example, if the parent Raster occupied the region (10, 10) to (100, 100), and the translated Raster was defined to start at (50, 50), then pixel (20, 20) of the parent and pixel (60, 60) of the child occupy the same location in the DataBuffer shared by the two Rasters. In the first case, (-10, -10) should be added to a pixel coordinate to obtain the corresponding SampleModel coordinate, and in the second case (-50, -50) should be added.

The translation between a parent and child Raster may be determined by subtracting the child's sampleModelTranslateX and sampleModelTranslateY values from those of the parent.

The createChild method may be used to create a new Raster occupying only a subset of its parent's bounding rectangle (with the same or a translated coordinate system) or with a subset of the bands of its parent.

All constructors are protected. The correct way to create a Raster is to use one of the static create methods defined in this class. These methods create instances of Raster that use the standard Interleaved, Banded, and Packed SampleModels and that may be processed more efficiently than a Raster created by combining an externally generated SampleModel and DataBuffer.

See Also:
DataBuffer, SampleModel, PixelInterleavedSampleModel, BandedSampleModel, SinglePixelPackedSampleModel, MultiPixelPackedSampleModel

Field Summary
protected DataBuffer | dataBuffer The DataBuffer that stores the image data.
protected int | height The height of this Raster.
protected int | minX The X coordinate of the upper-left pixel of this Raster.
protected int | minY The Y coordinate of the upper-left pixel of this Raster.
protected int | numBands The number of bands in the Raster.
protected int | numDataElements The number of DataBuffer data elements per pixel.
protected Raster | parent The parent of this Raster, or null.
protected SampleModel | sampleModel The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.
protected int | sampleModelTranslateX The X translation from the coordinate space of the Raster's SampleModel to that of the Raster.
protected int | sampleModelTranslateY The Y translation from the coordinate space of the Raster's SampleModel to that of the Raster.
protected int | width The width of this Raster.
Constructor Summary
protected | Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin) Constructs a Raster with the given SampleModel and DataBuffer.
protected | Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent) Constructs a Raster with the given SampleModel, DataBuffer, and parent.
protected | Raster(SampleModel sampleModel, Point origin) Constructs a Raster with the given SampleModel.
Method Summary
static WritableRaster | createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
static WritableRaster | createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.
static WritableRaster | createBandedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.
Raster | createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList) Returns a new Raster which shares all or part of this Raster's DataBuffer.
WritableRaster | createCompatibleWritableRaster() Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.
WritableRaster | createCompatibleWritableRaster(int w, int h) Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.
WritableRaster | createCompatibleWritableRaster(int x, int y, int w, int h) Create a compatible WritableRaster with the specified location (minX, minY) and size (width, height), a new SampleModel, and a new initialized DataBuffer.
WritableRaster | createCompatibleWritableRaster(Rectangle rect) Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.
static WritableRaster | createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.
static WritableRaster | createInterleavedRaster(int dataType, int w, int h, int bands, Point location) Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.
static WritableRaster | createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
static WritableRaster | createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location) Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.
static WritableRaster | createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location) Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.
static WritableRaster | createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location) Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.
static Raster | createRaster(SampleModel sm, DataBuffer db, Point location) Creates a Raster with the specified SampleModel and DataBuffer.
Raster | createTranslatedChild(int childMinX, int childMinY) Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location.
static WritableRaster | createWritableRaster(SampleModel sm, DataBuffer db, Point location) Creates a WritableRaster with the specified SampleModel and DataBuffer.
static WritableRaster | createWritableRaster(SampleModel sm, Point location) Creates a WritableRaster with the specified SampleModel.
Rectangle | getBounds() Returns the bounding Rectangle of this Raster.
DataBuffer | getDataBuffer() Returns the DataBuffer associated with this Raster.
Object | getDataElements(int x, int y, int w, int h, Object outData) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
Object | getDataElements(int x, int y, Object outData) Returns data for a single pixel in a primitive array of type TransferType.
int | getHeight() Returns the height in pixels of the Raster.
int | getMinX() Returns the minimum valid X coordinate of the Raster.
int | getMinY() Returns the minimum valid Y coordinate of the Raster.
int | getNumBands() Returns the number of bands (samples per pixel) in this Raster.
int | getNumDataElements() Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.
Raster | getParent() Returns the parent Raster (if any) of this Raster, or else null.
double[] | getPixel(int x, int y, double[] dArray) Returns the samples in an array of double for the specified pixel.
float[] | getPixel(int x, int y, float[] fArray) Returns the samples in an array of float for the specified pixel.
int[] | getPixel(int x, int y, int[] iArray) Returns the samples in an array of int for the specified pixel.
double[] | getPixels(int x, int y, int w, int h, double[] dArray) Returns a double array containing all samples for a rectangle of pixels, one sample per array element.
float[] | getPixels(int x, int y, int w, int h, float[] fArray) Returns a float array containing all samples for a rectangle of pixels, one sample per array element.
int[] | getPixels(int x, int y, int w, int h, int[] iArray) Returns an int array containing all samples for a rectangle of pixels, one sample per array element.
int | getSample(int x, int y, int b) Returns the sample in a specified band for the pixel located at (x,y) as an int.
double | getSampleDouble(int x, int y, int b) Returns the sample in a specified band for a pixel located at (x,y) as a double.
float | getSampleFloat(int x, int y, int b) Returns the sample in a specified band for the pixel located at (x,y) as a float.
SampleModel | getSampleModel() Returns the SampleModel that describes the layout of the image data.
int | getSampleModelTranslateX() Returns the X translation from the coordinate system of the SampleModel to that of the Raster.
int | getSampleModelTranslateY() Returns the Y translation from the coordinate system of the SampleModel to that of the Raster.
double[] | getSamples(int x, int y, int w, int h, int b, double[] dArray) Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.
float[] | getSamples(int x, int y, int w, int h, int b, float[] fArray) Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.
int[] | getSamples(int x, int y, int w, int h, int b, int[] iArray) Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
int | getTransferType() Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
int | getWidth() Returns the width in pixels of the Raster.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

sampleModel

protected SampleModel sampleModel
The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.

dataBuffer

protected DataBuffer dataBuffer
The DataBuffer that stores the image data.

minX

protected int minX
The X coordinate of the upper-left pixel of this Raster.

minY

protected int minY
The Y coordinate of the upper-left pixel of this Raster.

width

protected int width
The width of this Raster.

height

protected int height
The height of this Raster.

sampleModelTranslateX

protected int sampleModelTranslateX
The X translation from the coordinate space of the Raster's SampleModel to that of the Raster.

sampleModelTranslateY

protected int sampleModelTranslateY
The Y translation from the coordinate space of the Raster's SampleModel to that of the Raster.

numBands

protected int numBands
The number of bands in the Raster.

numDataElements

protected int numDataElements
The number of DataBuffer data elements per pixel.

parent

protected Raster parent
The parent of this Raster, or null.
Constructor Detail

Raster

protected Raster(SampleModel sampleModel,
                 Point origin)
Constructs a Raster with the given SampleModel. The Raster's upper left corner is origin and it is the same size as the SampleModel. A DataBuffer large enough to describe the Raster is automatically created.
Parameters:
sampleModel - The SampleModel that specifies the layout.
origin - The Point that specified the origin.

Raster

protected Raster(SampleModel sampleModel,
                 DataBuffer dataBuffer,
                 Point origin)
Constructs a Raster with the given SampleModel and DataBuffer. The Raster's upper left corner is origin and it is the same size as the SampleModel. The DataBuffer is not initialized and must be compatible with SampleModel.
Parameters:
sampleModel - The SampleModel that specifies the layout.
dataBuffer - The DataBuffer that contains the image data.
origin - The Point that specifies the origin.

Raster

protected Raster(SampleModel sampleModel,
                 DataBuffer dataBuffer,
                 Rectangle aRegion,
                 Point sampleModelTranslate,
                 Raster parent)
Constructs a Raster with the given SampleModel, DataBuffer, and parent. aRegion specifies the bounding rectangle of the new Raster. When translated into the base Raster's coordinate system, aRegion must be contained by the base Raster. (The base Raster is the Raster's ancestor which has no parent.) sampleModelTranslate specifies the sampleModelTranslateX and sampleModelTranslateY values of the new Raster. Note that this constructor should generally be called by other constructors or create methods, it should not be used directly.
Parameters:
sampleModel - The SampleModel that specifies the layout.
dataBuffer - The DataBuffer that contains the image data.
aRegion - The Rectangle that specifies the image area.
sampleModelTranslate - The Point that specifies the translation from SampleModel to Raster coordinates.
parent - The parent (if any) of this raster.
Method Detail

createInterleavedRaster

public static WritableRaster createInterleavedRaster(int dataType,
                                                     int w,
                                                     int h,
                                                     int bands,
                                                     Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.

The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

Note that interleaved DataBuffer.TYPE_INT Rasters are not supported. To create a 1-band Raster of type DataBuffer.TYPE_INT, use Raster.createPackedRaster().

The only dataTypes supported currently are TYPE_BYTE and TYPE_USHORT.

createInterleavedRaster

public static WritableRaster createInterleavedRaster(int dataType,
                                                     int w,
                                                     int h,
                                                     int scanlineStride,
                                                     int pixelStride,
                                                     int[] bandOffsets,
                                                     Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets. The number of bands is inferred from bandOffsets.length.

The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

Note that interleaved DataBuffer.TYPE_INT Rasters are not supported. To create a 1-band Raster of type DataBuffer.TYPE_INT, use Raster.createPackedRaster().

The only dataTypes supported currently are TYPE_BYTE and TYPE_USHORT.

Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT

createBandedRaster

public static WritableRaster createBandedRaster(int dataType,
                                                int w,
                                                int h,
                                                int bands,
                                                Point location)
Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.

The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

Throws:
ArrayIndexOutOfBoundsException - if bands is less than 1

createBandedRaster

public static WritableRaster createBandedRaster(int dataType,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bankIndices,
                                                int[] bandOffsets,
                                                Point location)
Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets. The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same.

The upper left corner of the Raster is given by the location argument. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT
ArrayIndexOutOfBoundsException - if bankIndices or bandOffsets is null

createPackedRaster

public static WritableRaster createPackedRaster(int dataType,
                                                int w,
                                                int h,
                                                int[] bandMasks,
                                                Point location)
Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks. The number of bands is inferred from bandMasks.length.

The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT

createPackedRaster

public static WritableRaster createPackedRaster(int dataType,
                                                int w,
                                                int h,
                                                int bands,
                                                int bitsPerBand,
                                                Point location)
Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band. If the number of bands is one, the SampleModel will be a MultiPixelPackedSampleModel.

If the number of bands is more than one, the SampleModel will be a SinglePixelPackedSampleModel, with each band having bitsPerBand bits. In either case, the requirements on dataType and bitsPerBand imposed by the corresponding SampleModel must be met.

The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

Throws:
IllegalArgumentException - if the product of bitsPerBand and bands is greater than the number of bits held by dataType
IllegalArgumentException - if bitsPerBand or bands is not greater than zero
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT

createInterleavedRaster

public static WritableRaster createInterleavedRaster(DataBuffer dataBuffer,
                                                     int w,
                                                     int h,
                                                     int scanlineStride,
                                                     int pixelStride,
                                                     int[] bandOffsets,
                                                     Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets. The number of bands is inferred from bandOffsets.length. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.

Note that interleaved DataBuffer.TYPE_INT Rasters are not supported. To create a 1-band Raster of type DataBuffer.TYPE_INT, use Raster.createPackedRaster().

Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT
RasterFormatException - if dataBuffer has more than one bank.

createBandedRaster

public static WritableRaster createBandedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bankIndices,
                                                int[] bandOffsets,
                                                Point location)
Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets. The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.
Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT

createPackedRaster

public static WritableRaster createPackedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bandMasks,
                                                Point location)
Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks. The number of bands is inferred from bandMasks.length. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.
Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT
RasterFormatException - if dataBuffer has more than one bank.

createPackedRaster

public static WritableRaster createPackedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int bitsPerPixel,
                                                Point location)
Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.
Throws:
IllegalArgumentException - if dataType is not one of the supported data types, which are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT
RasterFormatException - if dataBuffer has more than one bank.

createRaster

public static Raster createRaster(SampleModel sm,
                                  DataBuffer db,
                                  Point location)
Creates a Raster with the specified SampleModel and DataBuffer. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.
Throws:
RasterFormatException - if dataBuffer has more than one bank and the sampleModel is PixelInterleavedSampleModel, SinglePixelPackedSampleModel, or MultiPixelPackedSampleModel.

createWritableRaster

public static WritableRaster createWritableRaster(SampleModel sm,
                                                  Point location)
Creates a WritableRaster with the specified SampleModel. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

createWritableRaster

public static WritableRaster createWritableRaster(SampleModel sm,
                                                  DataBuffer db,
                                                  Point location)
Creates a WritableRaster with the specified SampleModel and DataBuffer. The upper left corner of the Raster is given by the location argument. If location is null, (0, 0) will be used.

The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.

Throws:
RasterFormatException - if dataBuffer has more than one bank and the sampleModel is PixelInterleavedSampleModel, SinglePixelPackedSampleModel, or MultiPixelPackedSampleModel.

getParent

public Raster getParent()
Returns the parent Raster (if any) of this Raster, or else null.

getSampleModelTranslateX

public final int getSampleModelTranslateX()
Returns the X translation from the coordinate system of the SampleModel to that of the Raster. To convert a pixel's X coordinate from the Raster coordinate system to the SampleModel coordinate system, this value must be subtracted.

getSampleModelTranslateY

public final int getSampleModelTranslateY()
Returns the Y translation from the coordinate system of the SampleModel to that of the Raster. To convert a pixel's Y coordinate from the Raster coordinate system to the SampleModel coordinate system, this value must be subtracted.

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster()
Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.
Throws:
RasterFormatException - if the width or height is less than or equal to zero.

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(Rectangle rect)
Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int x,
                                                     int y,
                                                     int w,
                                                     int h)
Create a compatible WritableRaster with the specified location (minX, minY) and size (width, height), a new SampleModel, and a new initialized DataBuffer.

createTranslatedChild

public Raster createTranslatedChild(int childMinX,
                                    int childMinY)
Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location. The new Raster will possess a reference to the current Raster, accessible through its getParent() method.
Parameters:
childMinX - X coord of the upper left corner of the new Raster.
childMinY - Y coord of the upper left corner of the new Raster.

createChild

public Raster createChild(int parentX,
                          int parentY,
                          int width,
                          int height,
                          int childMinX,
                          int childMinY,
                          int[] bandList)
Returns a new Raster which shares all or part of this Raster's DataBuffer. The new Raster will possess a reference to the current Raster, accessible through its getParent() method.

The parentX, parentY, width and height parameters form a Rectangle in this Raster's coordinate space, indicating the area of pixels to be shared. An error will be thrown if this Rectangle is not contained with the bounds of the current Raster.

The new Raster may additionally be translated to a different coordinate system for the plane than that used by the current Raster. The childMinX and childMinY parameters give the new (x, y) coordinate of the upper-left pixel of the returned Raster; the coordinate (childMinX, childMinY) in the new Raster will map to the same pixel as the coordinate (parentX, parentY) in the current Raster.

The new Raster may be defined to contain only a subset of the bands of the current Raster, possibly reordered, by means of the bandList parameter. If bandList is null, it is taken to include all of the bands of the current Raster in their current order.

To create a new Raster that contains a subregion of the current Raster, but shares its coordinate system and bands, this method should be called with childMinX equal to parentX, childMinY equal to parentY, and bandList equal to null.

Parameters:
parentX - X coordinate of the upper left corner in this Raster's coordinates.
parentY - Y coordinate of the upper left corner in this Raster's coordinates.
width - Width of the region starting at (parentX, parentY).
height - Height of the region starting at (parentX, parentY).
childMinX - X coordinate of the upper left corner of the returned Raster.
childMinY - Y coordinate of the upper left corner of the returned Raster.
bandList - Array of band indices, or null to use all bands.
Throws:
RasterFormatException - if the specified subregion is outside of the raster bounds.

getBounds

public Rectangle getBounds()
Returns the bounding Rectangle of this Raster. This function returns the same information as getMinX/MinY/Width/Height.

getMinX

public final int getMinX()
Returns the minimum valid X coordinate of the Raster.

getMinY

public final int getMinY()
Returns the minimum valid Y coordinate of the Raster.

getWidth

public final int getWidth()
Returns the width in pixels of the Raster.

getHeight

public final int getHeight()
Returns the height in pixels of the Raster.

getNumBands

public final int getNumBands()
Returns the number of bands (samples per pixel) in this Raster.

getNumDataElements

public final int getNumDataElements()
Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods. When pixels are transferred via these methods, they may be transferred in a packed or unpacked format, depending on the implementation of the underlying SampleModel. Using these methods, pixels are transferred as an array of getNumDataElements() elements of a primitive type given by getTransferType(). The TransferType may or may not be the same as the storage data type of the DataBuffer.

getTransferType

public final int getTransferType()
Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods. When pixels are transferred via these methods, they may be transferred in a packed or unpacked format, depending on the implementation of the underlying SampleModel. Using these methods, pixels are transferred as an array of getNumDataElements() elements of a primitive type given by getTransferType(). The TransferType may or may not be the same as the storage data type of the DataBuffer. The TransferType will be one of the types defined in DataBuffer.

getDataBuffer

public DataBuffer getDataBuffer()
Returns the DataBuffer associated with this Raster.

getSampleModel

public SampleModel getSampleModel()
Returns the SampleModel that describes the layout of the image data.

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object outData)
Returns data for a single pixel in a primitive array of type TransferType. For image data supported by the Java 2D(tm) API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data may be returned in a packed format, thus increasing efficiency for data transfers. There will be no explicit bounds checking on the parameters. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds. A ClassCastException will be thrown if the input object is non null and references anything other than an array of TransferType.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
outData - An object reference to an array of type defined by getTransferType() and length getNumDataElements(). If null, an array of appropriate type and size will be allocated.
Returns:
An object reference to an array of type defined by getTransferType() with the requested pixel data.
See Also:
SampleModel.getDataElements(int, int, Object, DataBuffer)

getDataElements

public Object getDataElements(int x,
                              int y,
                              int w,
                              int h,
                              Object outData)
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data may be returned in a packed format, thus increasing efficiency for data transfers. There will be no explicit bounds checking on the parameters. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds. A ClassCastException will be thrown if the input object is non null and references anything other than an array of TransferType.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
width - Width of the pixel rectangle.
height - Height of the pixel rectangle.
outData - An object reference to an array of type defined by getTransferType() and length w*h*getNumDataElements(). If null, an array of appropriate type and size will be allocated.
Returns:
An object reference to an array of type defined by getTransferType() with the requested pixel data.
See Also:
SampleModel.getDataElements(int, int, int, int, Object, DataBuffer)

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray)
Returns the samples in an array of int for the specified pixel. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - An optionally preallocated int array.

getPixel

public float[] getPixel(int x,
                        int y,
                        float[] fArray)
Returns the samples in an array of float for the specified pixel. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
fArray - An optionally preallocated float array.

getPixel

public double[] getPixel(int x,
                         int y,
                         double[] dArray)
Returns the samples in an array of double for the specified pixel. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
dArray - An optionally preallocated double array.

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray)
Returns an int array containing all samples for a rectangle of pixels, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
iArray - An optionally pre-allocated int array.

getPixels

public float[] getPixels(int x,
                         int y,
                         int w,
                         int h,
                         float[] fArray)
Returns a float array containing all samples for a rectangle of pixels, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
fArray - An optionally pre-allocated float array.

getPixels

public double[] getPixels(int x,
                          int y,
                          int w,
                          int h,
                          double[] dArray)
Returns a double array containing all samples for a rectangle of pixels, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
dArray - An optionally pre-allocated double array.

getSample

public int getSample(int x,
                     int y,
                     int b)
Returns the sample in a specified band for the pixel located at (x,y) as an int. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b)
Returns the sample in a specified band for the pixel located at (x,y) as a float. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b)
Returns the sample in a specified band for a pixel located at (x,y) as a double. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray)
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to return.
iArray - An optionally pre-allocated int array.

getSamples

public float[] getSamples(int x,
                          int y,
                          int w,
                          int h,
                          int b,
                          float[] fArray)
Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to return.
fArray - An optionally pre-allocated float array.

getSamples

public double[] getSamples(int x,
                           int y,
                           int w,
                           int h,
                           int b,
                           double[] dArray)
Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to return.
dArray - An optionally pre-allocated double array.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RasterFormatException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class RasterFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.awt.image.RasterFormatException
All Implemented Interfaces:
Serializable
public class RasterFormatException
extends RuntimeException

The RasterFormatException is thrown if there is invalid layout information in the Raster.

See Also:
Serialized Form

Constructor Summary
RasterFormatException(String s)
Constructs a new RasterFormatException with the specified message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RasterFormatException

public RasterFormatException(String s)
Constructs a new RasterFormatException with the specified message.
Parameters:
s - the message to generate when a RasterFormatException is thrown
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RasterOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface RasterOp

All Known Implementing Classes:
AffineTransformOp, BandCombineOp, ConvolveOp, LookupOp, ColorConvertOp, RescaleOp
public interface RasterOp

This interface describes single-input/single-output operations performed on Raster objects. It is implemented by such classes as AffineTransformOp, ConvolveOp, and LookupOp. The Source and Destination objects must contain the appropriate number of bands for the particular classes implementing this interface. Otherwise, an exception is thrown. This interface cannot be used to describe more sophisticated Ops such as ones that take multiple sources. Each class implementing this interface will specify whether or not it will allow an in-place filtering operation (i.e. source object equal to the destination object). Note that the restriction to single-input operations means that the values of destination pixels prior to the operation are not used as input to the filter operation.

See Also:
AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, RescaleOp

Method Summary
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands.
WritableRaster | filter(Raster src, WritableRaster dest) Performs a single-input/single-output operation from a source Raster to a destination Raster.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source Raster.
RenderingHints | getRenderingHints() Returns the rendering hints for this RasterOp.

Method Detail

filter

public WritableRaster filter(Raster src,
                             WritableRaster dest)
Performs a single-input/single-output operation from a source Raster to a destination Raster. If the destination Raster is null, a new Raster will be created. The IllegalArgumentException may be thrown if the source and/or destination Raster is incompatible with the types of Rasters allowed by the class implementing this filter.

getBounds2D

public Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the filtered destination Raster. The IllegalArgumentException may be thrown if the source Raster is incompatible with the types of Rasters allowed by the class implementing this filter.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands. The IllegalArgumentException may be thrown if the source Raster is incompatible with the types of Rasters allowed by the class implementing this filter.

getPoint2D

public Point2D getPoint2D(Point2D srcPt,
                          Point2D dstPt)
Returns the location of the destination point given a point in the source Raster. If dstPt is non-null, it will be used to hold the return value.

getRenderingHints

public RenderingHints getRenderingHints()
Returns the rendering hints for this RasterOp. Returns null if no hints have been set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.image.renderable Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.image.renderable

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.image.renderable.ParameterBlock (implements java.lang.Cloneable, java.io.Serializable)
    • class java.awt.image.renderable.RenderableImageOp (implements java.awt.image.renderable.RenderableImage)
    • class java.awt.image.renderable.RenderableImageProducer (implements java.awt.image.ImageProducer, java.lang.Runnable)
    • class java.awt.image.renderable.RenderContext (implements java.lang.Cloneable)

Interface Hierarchy

  • interface java.awt.image.renderable.RenderableImage
  • interface java.awt.image.renderable.RenderedImageFactory
    • interface java.awt.image.renderable.ContextualRenderedImageFactory
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.image.renderable

Provides classes and interfaces for producing rendering-independent images.

See:
Description

Interface Summary
ContextualRenderedImageFactory | ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp.
RenderableImage | A RenderableImage is a common interface for rendering-independent images (a notion which subsumes resolution independence).
RenderedImageFactory | The RenderedImageFactory interface (often abbreviated RIF) is intended to be implemented by classes that wish to act as factories to produce different renderings, for example by executing a series of BufferedImageOps on a set of sources, depending on a specific set of parameters, properties, and rendering hints.

Class Summary
ParameterBlock | A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.
RenderableImageOp | This class handles the renderable aspects of an operation with help from its associated instance of a ContextualRenderedImageFactory.
RenderableImageProducer | An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage.
RenderContext | A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage.

Package java.awt.image.renderable Description

Provides classes and interfaces for producing rendering-independent images.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.image.renderable

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.image.renderable

Packages that use java.awt.image.renderable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Classes in java.awt.image.renderable used by java.awt
RenderableImage
A RenderableImage is a common interface for rendering-independent images (a notion which subsumes resolution independence).

Classes in java.awt.image.renderable used by java.awt.image.renderable
ContextualRenderedImageFactory
ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp.
ParameterBlock
A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.
RenderableImage
A RenderableImage is a common interface for rendering-independent images (a notion which subsumes resolution independence).
RenderContext
A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage.
RenderedImageFactory
The RenderedImageFactory interface (often abbreviated RIF) is intended to be implemented by classes that wish to act as factories to produce different renderings, for example by executing a series of BufferedImageOps on a set of sources, depending on a specific set of parameters, properties, and rendering hints.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.renderable.RenderableImageOp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.renderable.RenderableImageOp

No usage of java.awt.image.renderable.RenderableImageOp

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.renderable.RenderableImageProducer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.renderable.RenderableImageProducer

No usage of java.awt.image.renderable.RenderableImageProducer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.renderable.ParameterBlock

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.renderable.ParameterBlock

Packages that use ParameterBlock
java.awt.image.renderable Provides classes and interfaces for producing rendering-independent images.

Uses of ParameterBlock in java.awt.image.renderable

Methods in java.awt.image.renderable that return ParameterBlock
ParameterBlock | RenderableImageOp.setParameterBlock(ParameterBlock paramBlock) Change the current ParameterBlock of the operation, allowing editing of image rendering chains.
ParameterBlock | RenderableImageOp.getParameterBlock() Returns a reference to the current parameter block.
ParameterBlock | ParameterBlock.addSource(Object source) Adds an image to end of the list of sources.
ParameterBlock | ParameterBlock.setSource(Object source, int index) Replaces an entry in the list of source with a new source.
ParameterBlock | ParameterBlock.add(Object obj) Adds an object to the list of parameters.
ParameterBlock | ParameterBlock.add(byte b) Adds a Byte to the list of parameters.
ParameterBlock | ParameterBlock.add(char c) Adds a Character to the list of parameters.
ParameterBlock | ParameterBlock.add(short s) Adds a Short to the list of parameters.
ParameterBlock | ParameterBlock.add(int i) Adds a Integer to the list of parameters.
ParameterBlock | ParameterBlock.add(long l) Adds a Long to the list of parameters.
ParameterBlock | ParameterBlock.add(float f) Adds a Float to the list of parameters.
ParameterBlock | ParameterBlock.add(double d) Adds a Double to the list of parameters.
ParameterBlock | ParameterBlock.set(Object obj, int index) Replaces an Object in the list of parameters.
ParameterBlock | ParameterBlock.set(byte b, int index) Replaces an Object in the list of parameters with a Byte.
ParameterBlock | ParameterBlock.set(char c, int index) Replaces an Object in the list of parameters with a Character.
ParameterBlock | ParameterBlock.set(short s, int index) Replaces an Object in the list of parameters with a Short.
ParameterBlock | ParameterBlock.set(int i, int index) Replaces an Object in the list of parameters with an Integer.
ParameterBlock | ParameterBlock.set(long l, int index) Replaces an Object in the list of parameters with a Long.
ParameterBlock | ParameterBlock.set(float f, int index) Replaces an Object in the list of parameters with a Float.
ParameterBlock | ParameterBlock.set(double d, int index) Replaces an Object in the list of parameters with a Double.

Methods in java.awt.image.renderable with parameters of type ParameterBlock
RenderContext | ContextualRenderedImageFactory.mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImage image) Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.
RenderedImage | ContextualRenderedImageFactory.create(RenderContext renderContext, ParameterBlock paramBlock) Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
Rectangle2D | ContextualRenderedImageFactory.getBounds2D(ParameterBlock paramBlock) Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space.
Object | ContextualRenderedImageFactory.getProperty(ParameterBlock paramBlock, String name) Gets the appropriate instance of the property specified by the name parameter.
RenderedImage | RenderedImageFactory.create(ParameterBlock paramBlock, RenderingHints hints) Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints.
ParameterBlock | RenderableImageOp.setParameterBlock(ParameterBlock paramBlock) Change the current ParameterBlock of the operation, allowing editing of image rendering chains.

Constructors in java.awt.image.renderable with parameters of type ParameterBlock
RenderableImageOp(ContextualRenderedImageFactory CRIF, ParameterBlock paramBlock)
Constructs a RenderedImageOp given a ContextualRenderedImageFactory object, and a ParameterBlock containing RenderableImage sources and other parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.image.renderable.RenderContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.image.renderable.RenderContext

Packages that use RenderContext
java.awt.image.renderable Provides classes and interfaces for producing rendering-independent images.

Uses of RenderContext in java.awt.image.renderable

Methods in java.awt.image.renderable that return RenderContext
 RenderContext ContextualRenderedImageFactory.mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImage image)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.

Methods in java.awt.image.renderable with parameters of type RenderContext
 RenderContext ContextualRenderedImageFactory.mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImage image)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.
 RenderedImage ContextualRenderedImageFactory.create(RenderContext renderContext, ParameterBlock paramBlock)
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
 void RenderableImageProducer.setRenderContext(RenderContext rc)
Sets a new RenderContext to use for the next startProduction() call.
 RenderedImage RenderableImageOp.createRendering(RenderContext renderContext)
Creates a RenderedImage which represents this RenderableImageOp (including its Renderable sources) rendered according to the given RenderContext.
 RenderedImage RenderableImage.createRendering(RenderContext renderContext)
Creates a RenderedImage that represented a rendering of this image using a given RenderContext.

Constructors in java.awt.image.renderable with parameters of type RenderContext
RenderableImageProducer(RenderableImage rdblImage, RenderContext rc)
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.renderable.ContextualRenderedImageFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.renderable.ContextualRenderedImageFactory

Packages that use ContextualRenderedImageFactory
java.awt.image.renderable Provides classes and interfaces for producing rendering-independent images.

Uses of ContextualRenderedImageFactory in java.awt.image.renderable

Constructors in java.awt.image.renderable with parameters of type ContextualRenderedImageFactory
RenderableImageOp(ContextualRenderedImageFactory CRIF, ParameterBlock paramBlock)
Constructs a RenderedImageOp given a ContextualRenderedImageFactory object, and a ParameterBlock containing RenderableImage sources and other parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.renderable.RenderableImage

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.renderable.RenderableImage

Packages that use RenderableImage
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.

Uses of RenderableImage in java.awt

Methods in java.awt with parameters of type RenderableImage
abstract  void Graphics2D.drawRenderableImage(RenderableImage img, AffineTransform xform)
Renders a RenderableImage, applying a transform from image space into user space before drawing.

Uses of RenderableImage in java.awt.image.renderable

Classes in java.awt.image.renderable that implement RenderableImage
 class RenderableImageOp
This class handles the renderable aspects of an operation with help from its associated instance of a ContextualRenderedImageFactory.

Methods in java.awt.image.renderable that return RenderableImage
 RenderableImage ParameterBlock.getRenderableSource(int index)
A convenience method to return a source as a RenderableImage.

Methods in java.awt.image.renderable with parameters of type RenderableImage
 RenderContext ContextualRenderedImageFactory.mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImage image)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.

Constructors in java.awt.image.renderable with parameters of type RenderableImage
RenderableImageProducer(RenderableImage rdblImage, RenderContext rc)
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.image.renderable.RenderedImageFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.image.renderable.RenderedImageFactory

Packages that use RenderedImageFactory
java.awt.image.renderable Provides classes and interfaces for producing rendering-independent images.

Uses of RenderedImageFactory in java.awt.image.renderable

Subinterfaces of RenderedImageFactory in java.awt.image.renderable
 interface ContextualRenderedImageFactory
ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ContextualRenderedImageFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Interface ContextualRenderedImageFactory

All Superinterfaces:
RenderedImageFactory
public interface ContextualRenderedImageFactory
extends RenderedImageFactory

ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp. Thus different operations on RenderableImages may be performed by a single class such as RenderedImageOp through the use of multiple instances of ContextualRenderedImageFactory. The name ContextualRenderedImageFactory is commonly shortened to "CRIF."

All operations that are to be used in a rendering-independent chain must implement ContextualRenderedImageFactory.

Classes that implement this interface must provide a constructor with no arguments.

Method Summary
 RenderedImage create(RenderContext renderContext, ParameterBlock paramBlock)
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
 Rectangle2D getBounds2D(ParameterBlock paramBlock)
Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space.
 Object getProperty(ParameterBlock paramBlock, String name)
Gets the appropriate instance of the property specified by the name parameter.
 String[] getPropertyNames()
Returns a list of names recognized by getProperty.
 boolean isDynamic()
Returns true if successive renderings (that is, calls to create(RenderContext, ParameterBlock)) with the same arguments may produce different results.
 RenderContext mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImage image)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.
Methods inherited from interface java.awt.image.renderable.RenderedImageFactory
create

Method Detail

mapRenderContext

public RenderContext mapRenderContext(int i,
                                      RenderContext renderContext,
                                      ParameterBlock paramBlock,
                                      RenderableImage image)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources. This is useful for operations that can be expressed in whole or in part simply as alterations in the RenderContext, such as an affine mapping, or operations that wish to obtain lower quality renderings of their sources in order to save processing effort or transmission bandwith. Some operations, such as blur, can also use this mechanism to avoid obtaining sources of higher quality than necessary.
Parameters:
i - the index of the source image.
renderContext - the RenderContext being applied to the operation.
paramBlock - a ParameterBlock containing the operation's sources and parameters.
image - the RenderableImage being rendered.

create

public RenderedImage create(RenderContext renderContext,
                            ParameterBlock paramBlock)
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters. The output is a RenderedImage that takes the RenderContext into account to determine its dimensions and placement on the image plane. This method houses the "intelligence" that allows a rendering-independent operation to adapt to a specific RenderContext.
Parameters:
renderContext - The RenderContext specifying the rendering.
paramBlock - a ParameterBlock containing the operation's sources and parameters.

getBounds2D

public Rectangle2D getBounds2D(ParameterBlock paramBlock)
Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space. The bounds are returned as a Rectangle2D, that is, an axis-aligned rectangle with floating-point corner coordinates.
Parameters:
paramBlock - a ParameterBlock containing the operation's sources and parameters.
Returns:
a Rectangle2D specifying the rendering-independent bounding box of the output.

getProperty

public Object getProperty(ParameterBlock paramBlock,
                          String name)
Gets the appropriate instance of the property specified by the name parameter. This method must determine which instance of a property to return when there are multiple sources that each specify the property.
Parameters:
paramBlock - a ParameterBlock containing the operation's sources and parameters.
name - a String naming the desired property.
Returns:
an object reference to the value of the property requested.

getPropertyNames

public String[] getPropertyNames()
Returns a list of names recognized by getProperty.

isDynamic

public boolean isDynamic()
Returns true if successive renderings (that is, calls to create(RenderContext, ParameterBlock)) with the same arguments may produce different results. This method may be used to determine whether an existing rendering may be cached and reused. It is always safe to return true.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ParameterBlock

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Class ParameterBlock

java.lang.Object
  |
  +--java.awt.image.renderable.ParameterBlock
All Implemented Interfaces:
Cloneable, Serializable
public class ParameterBlock
extends Object
implements Cloneable, Serializable

A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.

Although it is possible to place arbitrary objects in the source Vector, users of this class may impose semantic constraints such as requiring all sources to be RenderedImages or RenderableImage. ParameterBlock itself is merely a container and performs no checking on source or parameter types.

All parameters in a ParameterBlock are objects; convenience add and set methods are available that take arguments of base type and construct the appropriate subclass of Number (such as Integer or Float). Corresponding get methods perform a downward cast and have return values of base type; an exception will be thrown if the stored values do not have the correct type. There is no way to distinguish between the results of "short s; add(s)" and "add(new Short(s))".

Note that the get and set methods operate on references. Therefore, one must be careful not to share references between ParameterBlocks when this is inappropriate. For example, to create a new ParameterBlock that is equal to an old one except for an added source, one might be tempted to write:

 ParameterBlock addSource(ParameterBlock pb, RenderableImage im) {
     ParameterBlock pb1 = new ParameterBlock(pb.getSources());
     pb1.addSource(im);
     return pb1;
 }

This code will have the side effect of altering the original ParameterBlock, since the getSources operation returned a reference to its source Vector. Both pb and pb1 share their source Vector, and a change in either is visible to both.

A correct way to write the addSource function is to clone the source Vector:

 ParameterBlock addSource (ParameterBlock pb, RenderableImage im) {
     ParameterBlock pb1 = new ParameterBlock(pb.getSources().clone());
     pb1.addSource(im);
     return pb1;
 }

The clone method of ParameterBlock has been defined to perform a clone of both the source and parameter Vectors for this reason. A standard, shallow clone is available as shallowClone.

The addSource, setSource, add, and set methods are defined to return 'this' after adding their argument. This allows use of syntax like:

 ParameterBlock pb = new ParameterBlock();
 op = new RenderableImageOp("operation", pb.add(arg1).add(arg2));

See Also:
Serialized Form

Field Summary
protected Vector | parameters A Vector of non-source parameters, stored as arbitrary Objects.
protected Vector | sources A Vector of sources, stored as arbitrary Objects.
Constructor Summary
ParameterBlock()
A dummy constructor.
ParameterBlock(Vector sources)
Constructs a ParameterBlock with a given Vector of sources.
ParameterBlock(Vector sources, Vector parameters)
Constructs a ParameterBlock with a given Vector of sources and Vector of parameters.
Method Summary
ParameterBlock | add(byte b) Adds a Byte to the list of parameters.
ParameterBlock | add(char c) Adds a Character to the list of parameters.
ParameterBlock | add(double d) Adds a Double to the list of parameters.
ParameterBlock | add(float f) Adds a Float to the list of parameters.
ParameterBlock | add(int i) Adds a Integer to the list of parameters.
ParameterBlock | add(long l) Adds a Long to the list of parameters.
ParameterBlock | add(Object obj) Adds an object to the list of parameters.
ParameterBlock | add(short s) Adds a Short to the list of parameters.
ParameterBlock | addSource(Object source) Adds an image to end of the list of sources.
Object | clone() Creates a copy of a ParameterBlock.
byte | getByteParameter(int index) A convenience method to return a parameter as a byte.
char | getCharParameter(int index) A convenience method to return a parameter as a char.
double | getDoubleParameter(int index) A convenience method to return a parameter as a double.
float | getFloatParameter(int index) A convenience method to return a parameter as a float.
int | getIntParameter(int index) A convenience method to return a parameter as an int.
long | getLongParameter(int index) A convenience method to return a parameter as a long.
int | getNumParameters() Returns the number of parameters (not including source images).
int | getNumSources() Returns the number of source images.
Object | getObjectParameter(int index) Gets a parameter as an object.
Class[] | getParamClasses() Returns an array of Class objects describing the types of the parameters.
Vector | getParameters() Returns the entire Vector of parameters.
RenderableImage | getRenderableSource(int index) A convenience method to return a source as a RenderableImage.
RenderedImage | getRenderedSource(int index) A convenience method to return a source as a RenderedImage.
short | getShortParameter(int index) A convenience method to return a parameter as a short.
Object | getSource(int index) Returns a source as a general Object.
Vector | getSources() Returns the entire Vector of sources.
void | removeParameters() Clears the list of parameters.
void | removeSources() Clears the list of source images.
ParameterBlock | set(byte b, int index) Replaces an Object in the list of parameters with a Byte.
ParameterBlock | set(char c, int index) Replaces an Object in the list of parameters with a Character.
ParameterBlock | set(double d, int index) Replaces an Object in the list of parameters with a Double.
ParameterBlock | set(float f, int index) Replaces an Object in the list of parameters with a Float.
ParameterBlock | set(int i, int index) Replaces an Object in the list of parameters with an Integer.
ParameterBlock | set(long l, int index) Replaces an Object in the list of parameters with a Long.
ParameterBlock | set(Object obj, int index) Replaces an Object in the list of parameters.
ParameterBlock | set(short s, int index) Replaces an Object in the list of parameters with a Short.
void | setParameters(Vector parameters) Sets the entire Vector of parameters to a given Vector.
ParameterBlock | setSource(Object source, int index) Replaces an entry in the list of source with a new source.
void | setSources(Vector sources) Sets the entire Vector of sources to a given Vector.
Object | shallowClone() Creates a shallow copy of a ParameterBlock.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

sources

protected Vector sources
A Vector of sources, stored as arbitrary Objects.

parameters

protected Vector parameters
A Vector of non-source parameters, stored as arbitrary Objects.
Constructor Detail

ParameterBlock

public ParameterBlock()
A dummy constructor.

ParameterBlock

public ParameterBlock(Vector sources)
Constructs a ParameterBlock with a given Vector of sources.

ParameterBlock

public ParameterBlock(Vector sources,
                      Vector parameters)
Constructs a ParameterBlock with a given Vector of sources and Vector of parameters.
Method Detail

shallowClone

public Object shallowClone()
Creates a shallow copy of a ParameterBlock. The source and parameter Vectors are copied by reference -- additions or changes will be visible to both versions.
Returns:
an Object clone of the ParameterBlock.

clone

public Object clone()
Creates a copy of a ParameterBlock. The source and parameter Vectors are cloned, but the actual sources and parameters are copied by reference. This allows modifications to the order and number of sources and parameters in the clone to be invisible to the original ParameterBlock. Changes to the shared sources or parameters themselves will still be visible.
Overrides:
clone in class Object
Returns:
an Object clone of the ParameterBlock.

addSource

public ParameterBlock addSource(Object source)
Adds an image to end of the list of sources. The image is stored as an object in order to allow new node types in the future.
Parameters:
source - an image object to be stored in the source list.

getSource

public Object getSource(int index)
Returns a source as a general Object. The caller must cast it into an appropriate type.
Parameters:
index - the index of the source to be returned.

setSource

public ParameterBlock setSource(Object source,
                                int index)
Replaces an entry in the list of source with a new source. If the index lies beyond the current source list, the list is extended with nulls as needed.

getRenderedSource

public RenderedImage getRenderedSource(int index)
A convenience method to return a source as a RenderedImage. An exception will be thrown if the sources is not a RenderedImage.
Parameters:
index - the index of the source to be returned.

getRenderableSource

public RenderableImage getRenderableSource(int index)
A convenience method to return a source as a RenderableImage. An exception will be thrown if the sources is not a RenderableImage.
Parameters:
index - the index of the source to be returned.

getNumSources

public int getNumSources()
Returns the number of source images.

getSources

public Vector getSources()
Returns the entire Vector of sources.

setSources

public void setSources(Vector sources)
Sets the entire Vector of sources to a given Vector.

removeSources

public void removeSources()
Clears the list of source images.

getNumParameters

public int getNumParameters()
Returns the number of parameters (not including source images).

getParameters

public Vector getParameters()
Returns the entire Vector of parameters.

setParameters

public void setParameters(Vector parameters)
Sets the entire Vector of parameters to a given Vector.

removeParameters

public void removeParameters()
Clears the list of parameters.

add

public ParameterBlock add(Object obj)
Adds an object to the list of parameters.

add

public ParameterBlock add(byte b)
Adds a Byte to the list of parameters.

add

public ParameterBlock add(char c)
Adds a Character to the list of parameters.

add

public ParameterBlock add(short s)
Adds a Short to the list of parameters.

add

public ParameterBlock add(int i)
Adds a Integer to the list of parameters.

add

public ParameterBlock add(long l)
Adds a Long to the list of parameters.

add

public ParameterBlock add(float f)
Adds a Float to the list of parameters.

add

public ParameterBlock add(double d)
Adds a Double to the list of parameters.

set

public ParameterBlock set(Object obj,
                          int index)
Replaces an Object in the list of parameters. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(byte b,
                          int index)
Replaces an Object in the list of parameters with a Byte. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(char c,
                          int index)
Replaces an Object in the list of parameters with a Character. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(short s,
                          int index)
Replaces an Object in the list of parameters with a Short. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(int i,
                          int index)
Replaces an Object in the list of parameters with an Integer. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(long l,
                          int index)
Replaces an Object in the list of parameters with a Long. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(float f,
                          int index)
Replaces an Object in the list of parameters with a Float. If the index lies beyond the current source list, the list is extended with nulls as needed.

set

public ParameterBlock set(double d,
                          int index)
Replaces an Object in the list of parameters with a Double. If the index lies beyond the current source list, the list is extended with nulls as needed.

getObjectParameter

public Object getObjectParameter(int index)
Gets a parameter as an object.

getByteParameter

public byte getByteParameter(int index)
A convenience method to return a parameter as a byte. An exception is thrown if the parameter is null or not a Byte.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a byte value.
Throws:
ClassCastException - if the parameter at the specified index is not a Byte
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getCharParameter

public char getCharParameter(int index)
A convenience method to return a parameter as a char. An exception is thrown if the parameter is null or not a Character.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a char value.
Throws:
ClassCastException - if the parameter at the specified index is not a Character
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getShortParameter

public short getShortParameter(int index)
A convenience method to return a parameter as a short. An exception is thrown if the parameter is null or not a Short.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a short value.
Throws:
ClassCastException - if the parameter at the specified index is not a Short
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getIntParameter

public int getIntParameter(int index)
A convenience method to return a parameter as an int. An exception is thrown if the parameter is null or not an Integer.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a int value.
Throws:
ClassCastException - if the parameter at the specified index is not a Integer
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getLongParameter

public long getLongParameter(int index)
A convenience method to return a parameter as a long. An exception is thrown if the parameter is null or not a Long.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a long value.
Throws:
ClassCastException - if the parameter at the specified index is not a Long
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getFloatParameter

public float getFloatParameter(int index)
A convenience method to return a parameter as a float. An exception is thrown if the parameter is null or not a Float.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a float value.
Throws:
ClassCastException - if the parameter at the specified index is not a Float
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getDoubleParameter

public double getDoubleParameter(int index)
A convenience method to return a parameter as a double. An exception is thrown if the parameter is null or not a Double.
Parameters:
index - the index of the parameter to be returned.
Returns:
the parameter at the specified index as a double value.
Throws:
ClassCastException - if the parameter at the specified index is not a Double
NullPointerException - if the parameter at the specified index is null
ArrayIndexOutOfBoundsException - if index is negative or not less than the current size of this ParameterBlock object

getParamClasses

public Class[] getParamClasses()
Returns an array of Class objects describing the types of the parameters.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RenderableImage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Interface RenderableImage

All Known Implementing Classes:
RenderableImageOp
public interface RenderableImage

A RenderableImage is a common interface for rendering-independent images (a notion which subsumes resolution independence). That is, images which are described and have operations applied to them independent of any specific rendering of the image. For example, a RenderableImage can be rotated and cropped in resolution-independent terms. Then, it can be rendered for various specific contexts, such as a draft preview, a high-quality screen display, or a printer, each in an optimal fashion.

A RenderedImage is returned from a RenderableImage via the createRendering() method, which takes a RenderContext. The RenderContext specifies how the RenderedImage should be constructed. Note that it is not possible to extract pixels directly from a RenderableImage.

The createDefaultRendering() and createScaledRendering() methods are convenience methods that construct an appropriate RenderContext internally. All of the rendering methods may return a reference to a previously produced rendering.

Field Summary
static String HINTS_OBSERVED
String constant that can be used to identify a property on a RenderedImage obtained via the createRendering or createScaledRendering methods.
Method Summary
 RenderedImage createDefaultRendering()
Returnd a RenderedImage instance of this image with a default width and height in pixels.
 RenderedImage createRendering(RenderContext renderContext)
Creates a RenderedImage that represented a rendering of this image using a given RenderContext.
 RenderedImage createScaledRendering(int w, int h, RenderingHints hints)
Creates a RenderedImage instance of this image with width w, and height h in pixels.
 float getHeight()
Gets the height in user coordinate space.
 float getMinX()
Gets the minimum X coordinate of the rendering-independent image data.
 float getMinY()
Gets the minimum Y coordinate of the rendering-independent image data.
 Object getProperty(String name)
Gets a property from the property set of this image.
 String[] getPropertyNames()
Returns a list of names recognized by getProperty.
 Vector getSources()
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
 float getWidth()
Gets the width in user coordinate space.
 boolean isDynamic()
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results.

Field Detail

HINTS_OBSERVED

public static final String HINTS_OBSERVED
String constant that can be used to identify a property on a RenderedImage obtained via the createRendering or createScaledRendering methods. If such a property exists, the value of the propoery will be a RenderingHints object specifying which hints were observed in creating the rendering.
Method Detail

getSources

public Vector getSources()
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage. Note that this method may return an empty vector, to indicate that the image has no sources, or null, to indicate that no information is available.
Returns:
a (possibly empty) Vector of RenderableImages, or null.

getProperty

public Object getProperty(String name)
Gets a property from the property set of this image. If the property name is not recognized, java.awt.Image.UndefinedProperty will be returned.
Parameters:
name - the name of the property to get, as a String.
Returns:
a reference to the property Object, or the value java.awt.Image.UndefinedProperty.

getPropertyNames

public String[] getPropertyNames()
Returns a list of names recognized by getProperty.

isDynamic

public boolean isDynamic()
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results. This method may be used to determine whether an existing rendering may be cached and reused. It is always safe to return true.

getWidth

public float getWidth()
Gets the width in user coordinate space. By convention, the usual width of a RenderableImage is equal to the image's aspect ratio (width divided by height).
Returns:
the width of the image in user coordinates.

getHeight

public float getHeight()
Gets the height in user coordinate space. By convention, the usual height of a RenderedImage is equal to 1.0F.
Returns:
the height of the image in user coordinates.

getMinX

public float getMinX()
Gets the minimum X coordinate of the rendering-independent image data.

getMinY

public float getMinY()
Gets the minimum Y coordinate of the rendering-independent image data.

createScaledRendering

public RenderedImage createScaledRendering(int w,
                                           int h,
                                           RenderingHints hints)
Creates a RenderedImage instance of this image with width w, and height h in pixels. The RenderContext is built automatically with an appropriate usr2dev transform and an area of interest of the full image. All the rendering hints come from hints passed in.

If w == 0, it will be taken to equal Math.round(h*(getWidth()/getHeight())). Similarly, if h == 0, it will be taken to equal Math.round(w*(getHeight()/getWidth())). One of w or h must be non-zero or else an IllegalArgumentException will be thrown.

The created RenderedImage may have a property identified by the String HINTS_OBSERVED to indicate which RenderingHints were used to create the image. In addition any RenderedImages that are obtained via the getSources() method on the created RenderedImage may have such a property.

Parameters:
w - the width of rendered image in pixels, or 0.
h - the height of rendered image in pixels, or 0.
hints - a RenderingHints object containg hints.
Returns:
a RenderedImage containing the rendered data.

createDefaultRendering

public RenderedImage createDefaultRendering()
Returnd a RenderedImage instance of this image with a default width and height in pixels. The RenderContext is built automatically with an appropriate usr2dev transform and an area of interest of the full image. The rendering hints are empty. createDefaultRendering may make use of a stored rendering for speed.
Returns:
a RenderedImage containing the rendered data.

createRendering

public RenderedImage createRendering(RenderContext renderContext)
Creates a RenderedImage that represented a rendering of this image using a given RenderContext. This is the most general way to obtain a rendering of a RenderableImage.

The created RenderedImage may have a property identified by the String HINTS_OBSERVED to indicate which RenderingHints (from the RenderContext) were used to create the image. In addition any RenderedImages that are obtained via the getSources() method on the created RenderedImage may have such a property.

Parameters:
renderContext - the RenderContext to use to produce the rendering.
Returns:
a RenderedImage containing the rendered data.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RenderableImageOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Class RenderableImageOp

java.lang.Object
  |
  +--java.awt.image.renderable.RenderableImageOp
All Implemented Interfaces:
RenderableImage
public class RenderableImageOp
extends Object
implements RenderableImage

This class handles the renderable aspects of an operation with help from its associated instance of a ContextualRenderedImageFactory.

Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
Constructor Summary
RenderableImageOp(ContextualRenderedImageFactory CRIF, ParameterBlock paramBlock)
Constructs a RenderedImageOp given a ContextualRenderedImageFactory object, and a ParameterBlock containing RenderableImage sources and other parameters.
Method Summary
 RenderedImage createDefaultRendering()
Gets a RenderedImage instance of this image with a default width and height in pixels.
 RenderedImage createRendering(RenderContext renderContext)
Creates a RenderedImage which represents this RenderableImageOp (including its Renderable sources) rendered according to the given RenderContext.
 RenderedImage createScaledRendering(int w, int h, RenderingHints hints)
Creates a RenderedImage instance of this image with width w, and height h in pixels.
 float getHeight()
Gets the height in user coordinate space.
 float getMinX()
Gets the minimum X coordinate of the rendering-independent image data.
 float getMinY()
Gets the minimum Y coordinate of the rendering-independent image data.
 ParameterBlock getParameterBlock()
Returns a reference to the current parameter block.
 Object getProperty(String name)
Gets a property from the property set of this image.
 String[] getPropertyNames()
Return a list of names recognized by getProperty.
 Vector getSources()
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
 float getWidth()
Gets the width in user coordinate space.
 boolean isDynamic()
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results.
 ParameterBlock setParameterBlock(ParameterBlock paramBlock)
Change the current ParameterBlock of the operation, allowing editing of image rendering chains.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RenderableImageOp

public RenderableImageOp(ContextualRenderedImageFactory CRIF,
                         ParameterBlock paramBlock)
Constructs a RenderedImageOp given a ContextualRenderedImageFactory object, and a ParameterBlock containing RenderableImage sources and other parameters. Any RenderedImage sources referenced by the ParameterBlock will be ignored.
Parameters:
CRIF - a ContextualRenderedImageFactory object
paramBlock - a ParameterBlock containing this operation's source images and other parameters necessary for the operation to run.
Method Detail

getSources

public Vector getSources()
Returns a vector of RenderableImages that are the sources of image data for this RenderableImage. Note that this method may return an empty vector, to indicate that the image has no sources, or null, to indicate that no information is available.
Specified by:
getSources in interface RenderableImage
Returns:
a (possibly empty) Vector of RenderableImages, or null.

getProperty

public Object getProperty(String name)
Gets a property from the property set of this image. If the property name is not recognized, java.awt.Image.UndefinedProperty will be returned.
Specified by:
getProperty in interface RenderableImage
Parameters:
name - the name of the property to get, as a String.
Returns:
a reference to the property Object, or the value java.awt.Image.UndefinedProperty.

getPropertyNames

public String[] getPropertyNames()
Return a list of names recognized by getProperty.
Specified by:
getPropertyNames in interface RenderableImage

isDynamic

public boolean isDynamic()
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results. This method may be used to determine whether an existing rendering may be cached and reused. The CRIF's isDynamic method will be called.
Specified by:
isDynamic in interface RenderableImage

getWidth

public float getWidth()
Gets the width in user coordinate space. By convention, the usual width of a RenderableImage is equal to the image's aspect ratio (width divided by height).
Specified by:
getWidth in interface RenderableImage
Returns:
the width of the image in user coordinates.

getHeight

public float getHeight()
Gets the height in user coordinate space. By convention, the usual height of a RenderedImage is equal to 1.0F.
Specified by:
getHeight in interface RenderableImage
Returns:
the height of the image in user coordinates.

getMinX

public float getMinX()
Gets the minimum X coordinate of the rendering-independent image data.
Specified by:
getMinX in interface RenderableImage

getMinY

public float getMinY()
Gets the minimum Y coordinate of the rendering-independent image data.
Specified by:
getMinY in interface RenderableImage

setParameterBlock

public ParameterBlock setParameterBlock(ParameterBlock paramBlock)
Change the current ParameterBlock of the operation, allowing editing of image rendering chains. The effects of such a change will be visible when a new rendering is created from this RenderableImageOp or any dependent RenderableImageOp.
Parameters:
paramBlock - the new ParameterBlock.
Returns:
the old ParameterBlock.

getParameterBlock

public ParameterBlock getParameterBlock()
Returns a reference to the current parameter block.

createScaledRendering

public RenderedImage createScaledRendering(int w,
                                           int h,
                                           RenderingHints hints)
Creates a RenderedImage instance of this image with width w, and height h in pixels. The RenderContext is built automatically with an appropriate usr2dev transform and an area of interest of the full image. All the rendering hints come from hints passed in.

If w == 0, it will be taken to equal Math.round(h*(getWidth()/getHeight())). Similarly, if h == 0, it will be taken to equal Math.round(w*(getHeight()/getWidth())). One of w or h must be non-zero or else an IllegalArgumentException will be thrown.

The created RenderedImage may have a property identified by the String HINTS_OBSERVED to indicate which RenderingHints were used to create the image. In addition any RenderedImages that are obtained via the getSources() method on the created RenderedImage may have such a property.

Specified by:
createScaledRendering in interface RenderableImage
Parameters:
w - the width of rendered image in pixels, or 0.
h - the height of rendered image in pixels, or 0.
hints - a RenderingHints object containg hints.
Returns:
a RenderedImage containing the rendered data.

createDefaultRendering

public RenderedImage createDefaultRendering()
Gets a RenderedImage instance of this image with a default width and height in pixels. The RenderContext is built automatically with an appropriate usr2dev transform and an area of interest of the full image. All the rendering hints come from hints passed in. Implementors of this interface must be sure that there is a defined default width and height.
Specified by:
createDefaultRendering in interface RenderableImage
Returns:
a RenderedImage containing the rendered data.

createRendering

public RenderedImage createRendering(RenderContext renderContext)
Creates a RenderedImage which represents this RenderableImageOp (including its Renderable sources) rendered according to the given RenderContext.

This method supports chaining of either Renderable or RenderedImage operations. If sources in the ParameterBlock used to construct the RenderableImageOp are RenderableImages, then a three step process is followed:

  1. mapRenderContext() is called on the associated CRIF for each RenderableImage source;
  2. createRendering() is called on each of the RenderableImage sources using the backwards-mapped RenderContexts obtained in step 1, resulting in a rendering of each source;
  3. ContextualRenderedImageFactory.create() is called with a new ParameterBlock containing the parameters of the RenderableImageOp and the RenderedImages that were created by the createRendering() calls.

If the elements of the source Vector of the ParameterBlock used to construct the RenderableImageOp are instances of RenderedImage, then the CRIF.create() method is called immediately using the original ParameterBlock. This provides a basis case for the recursion.

The created RenderedImage may have a property identified by the String HINTS_OBSERVED to indicate which RenderingHints (from the RenderContext) were used to create the image. In addition any RenderedImages that are obtained via the getSources() method on the created RenderedImage may have such a property.

Specified by:
createRendering in interface RenderableImage
Parameters:
renderContext - The RenderContext to use to perform the rendering.
Returns:
a RenderedImage containing the desired output image.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RenderableImageProducer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Class RenderableImageProducer

java.lang.Object
  |
  +--java.awt.image.renderable.RenderableImageProducer
All Implemented Interfaces:
ImageProducer, Runnable
public class RenderableImageProducer
extends Object
implements ImageProducer, Runnable

An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage. The size of the ImageConsumer is determined by the scale factor of the usr2dev transform in the RenderContext. If the RenderContext is null, the default rendering of the RenderableImage is used. This class implements an asynchronous production that produces the image in one thread at one resolution. This class may be subclassed to implement versions that will render the image using several threads. These threads could render either the same image at progressively better quality, or different sections of the image at a single resolution.

Constructor Summary
RenderableImageProducer(RenderableImage rdblImage, RenderContext rc)
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.
Method Summary
void | addConsumer(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image.
boolean | isConsumer(ImageConsumer ic) Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
void | removeConsumer(ImageConsumer ic) Remove an ImageConsumer from the list of consumers interested in data for this image.
void | requestTopDownLeftRightResend(ImageConsumer ic) Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
void | run() The runnable method for this class.
void | setRenderContext(RenderContext rc) Sets a new RenderContext to use for the next startProduction() call.
void | startProduction(ImageConsumer ic) Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RenderableImageProducer

public RenderableImageProducer(RenderableImage rdblImage,
                               RenderContext rc)
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.
Parameters:
rdblImage - the RenderableImage to be rendered.
rc - the RenderContext to use for producing the pixels.
Method Detail

setRenderContext

public void setRenderContext(RenderContext rc)
Sets a new RenderContext to use for the next startProduction() call.
Parameters:
rc - the new RenderContext.

addConsumer

public void addConsumer(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image.
Specified by:
addConsumer in interface ImageProducer
Parameters:
ic - an ImageConsumer to be added to the interest list.

isConsumer

public boolean isConsumer(ImageConsumer ic)
Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
Specified by:
isConsumer in interface ImageProducer
Parameters:
ic - the ImageConsumer to be checked.
Returns:
true if the ImageConsumer is on the list; false otherwise.

removeConsumer

public void removeConsumer(ImageConsumer ic)
Remove an ImageConsumer from the list of consumers interested in data for this image.
Specified by:
removeConsumer in interface ImageProducer
Parameters:
ic - the ImageConsumer to be removed.

startProduction

public void startProduction(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
Specified by:
startProduction in interface ImageProducer
Parameters:
ic - the ImageConsumer to be added to the list of consumers.

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer ic)
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
Specified by:
requestTopDownLeftRightResend in interface ImageProducer
Parameters:
ic - the ImageConsumer requesting the resend.

run

public void run()
The runnable method for this class. This will produce an image using the current RenderableImage and RenderContext and send it to all the ImageConsumer currently registered with this class.
Specified by:
run in interface Runnable
Following copied from interface: java.lang.Runnable
See Also:
Thread.run()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RenderContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Class RenderContext

java.lang.Object
  |
  +--java.awt.image.renderable.RenderContext
All Implemented Interfaces:
Cloneable
public class RenderContext
extends Object
implements Cloneable

A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage. It contains the area to be rendered specified in rendering-independent terms, the resolution at which the rendering is to be performed, and hints used to control the rendering process.

Users create RenderContexts and pass them to the RenderableImage via the createRendering method. Most of the methods of RenderContexts are not meant to be used directly by applications, but by the RenderableImage and operator classes to which it is passed.

The AffineTransform parameter passed into and out of this class are cloned. The RenderingHints and Shape parameters are not necessarily cloneable and are therefore only reference copied. Altering RenderingHints or Shape instances that are in use by instances of RenderContext may have undesired side effects.

Constructor Summary
RenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev, RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints.
RenderContext(AffineTransform usr2dev, Shape aoi)
Constructs a RenderContext with a given transform and area of interest.
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Constructs a RenderContext with a given transform.
Method Summary
Object | clone() Makes a copy of a RenderContext.
void | concatenateTransform(AffineTransform modTransform) Modifies the current user-to-device transform by appending another transform.
void | concetenateTransform(AffineTransform modTransform) Deprecated. replaced by concatenateTransform(AffineTransform).
Shape | getAreaOfInterest() Gets the ares of interest currently contained in the RenderContext.
RenderingHints | getRenderingHints() Gets the rendering hints of this RenderContext.
AffineTransform | getTransform() Gets the current user-to-device AffineTransform.
void | preConcatenateTransform(AffineTransform modTransform) Modifies the current user-to-device transform by prepending another transform.
void | preConcetenateTransform(AffineTransform modTransform) Deprecated. replaced by preConcatenateTransform(AffineTransform).
void | setAreaOfInterest(Shape newAoi) Sets the current area of interest.
void | setRenderingHints(RenderingHints hints) Sets the rendering hints of this RenderContext.
void | setTransform(AffineTransform newTransform) Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RenderContext

public RenderContext(AffineTransform usr2dev,
                     Shape aoi,
                     RenderingHints hints)
Constructs a RenderContext with a given transform. The area of interest is supplied as a Shape, and the rendering hints are supplied as a RenderingHints object.
Parameters:
usr2dev - an AffineTransform.
aoi - a Shape representing the area of interest.
hints - a RenderingHints object containing rendering hints.

RenderContext

public RenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform. The area of interest is taken to be the entire renderable area. No rendering hints are used.
Parameters:
usr2dev - an AffineTransform.

RenderContext

public RenderContext(AffineTransform usr2dev,
                     RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints. The area of interest is taken to be the entire renderable area.
Parameters:
usr2dev - an AffineTransform.
hints - a RenderingHints object containing rendering hints.

RenderContext

public RenderContext(AffineTransform usr2dev,
                     Shape aoi)
Constructs a RenderContext with a given transform and area of interest. The area of interest is supplied as a Shape. No rendering hints are used.
Parameters:
usr2dev - an AffineTransform.
aoi - a Shape representing the area of interest.
Method Detail

getRenderingHints

public RenderingHints getRenderingHints()
Gets the rendering hints of this RenderContext.
Returns:
a RenderingHints object that represents the rendering hints of this RenderContext.

setRenderingHints

public void setRenderingHints(RenderingHints hints)
Sets the rendering hints of this RenderContext.
Parameters:
hints - a RenderingHints object that represents the rendering hints to assign to this RenderContext.

setTransform

public void setTransform(AffineTransform newTransform)
Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.
Parameters:
newTransform - the new AffineTransform.

preConcatenateTransform

public void preConcatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by prepending another transform. In matrix notation the operation is:
 [this] = [modTransform] x [this]
Parameters:
modTransform - the AffineTransform to prepend to the current usr2dev transform.

preConcetenateTransform

public void preConcetenateTransform(AffineTransform modTransform)
Deprecated. replaced by preConcatenateTransform(AffineTransform).

Modifies the current user-to-device transform by prepending another transform. In matrix notation the operation is:
 [this] = [modTransform] x [this]
This method does the same thing as the preConcatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.
Parameters:
modTransform - the AffineTransform to prepend to the current usr2dev transform.

concatenateTransform

public void concatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by appending another transform. In matrix notation the operation is:
 [this] = [this] x [modTransform]
Parameters:
modTransform - the AffineTransform to append to the current usr2dev transform.

concetenateTransform

public void concetenateTransform(AffineTransform modTransform)
Deprecated. replaced by concatenateTransform(AffineTransform).

Modifies the current user-to-device transform by appending another transform. In matrix notation the operation is:
 [this] = [this] x [modTransform]
This method does the same thing as the concatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.
Parameters:
modTransform - the AffineTransform to append to the current usr2dev transform.

getTransform

public AffineTransform getTransform()
Gets the current user-to-device AffineTransform.
Returns:
a reference to the current AffineTransform.

setAreaOfInterest

public void setAreaOfInterest(Shape newAoi)
Sets the current area of interest. The old area is discarded.
Parameters:
newAoi - The new area of interest.

getAreaOfInterest

public Shape getAreaOfInterest()
Gets the ares of interest currently contained in the RenderContext.
Returns:
a reference to the area of interest of the RenderContext, or null if none is specified.

clone

public Object clone()
Makes a copy of a RenderContext. The area of interest is copied by reference. The usr2dev AffineTransform and hints are cloned, while the area of interest is copied by reference.
Overrides:
clone in class Object
Returns:
the new cloned RenderContext.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RenderedImageFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image.renderable
Interface RenderedImageFactory

All Known Subinterfaces:
ContextualRenderedImageFactory
public interface RenderedImageFactory

The RenderedImageFactory interface (often abbreviated RIF) is intended to be implemented by classes that wish to act as factories to produce different renderings, for example by executing a series of BufferedImageOps on a set of sources, depending on a specific set of parameters, properties, and rendering hints.

Method Summary
 RenderedImage create(ParameterBlock paramBlock, RenderingHints hints)
Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints.

Method Detail

create

public RenderedImage create(ParameterBlock paramBlock,
                            RenderingHints hints)
Creates a RenderedImage representing the results of an imaging operation (or chain of operations) for a given ParameterBlock and RenderingHints. The RIF may also query any source images referenced by the ParameterBlock for their dimensions, SampleModels, properties, etc., as necessary.

The create() method can return null if the RenderedImageFactory is not capable of producing output for the given set of source images and parameters. For example, if a RenderedImageFactory is only capable of performing a 3x3 convolution on single-banded image data, and the source image has multiple bands or the convolution Kernel is 5x5, null should be returned.

Hints should be taken into account, but can be ignored. The created RenderedImage may have a property identified by the String HINTS_OBSERVED to indicate which RenderingHints were used to create the image. In addition any RenderedImages that are obtained via the getSources() method on the created RenderedImage may have such a property.

Parameters:
paramBlock - a ParameterBlock containing sources and parameters for the RenderedImage to be created.
hints - a RenderingHints object containing hints.
Returns:
A RenderedImage containing the desired output.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RenderedImage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface RenderedImage

All Known Subinterfaces:
WritableRenderedImage
public interface RenderedImage

RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters. The image data may be stored/produced as a single tile or a regular array of tiles.

Method Summary
WritableRaster | copyData(WritableRaster raster) Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.
ColorModel | getColorModel() Returns the ColorModel associated with this image.
Raster | getData() Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).
Raster | getData(Rectangle rect) Computes and returns an arbitrary region of the RenderedImage.
int | getHeight() Returns the height of the RenderedImage.
int | getMinTileX() Returns the minimum tile index in the X direction.
int | getMinTileY() Returns the minimum tile index in the Y direction.
int | getMinX() Returns the minimum X coordinate (inclusive) of the RenderedImage.
int | getMinY() Returns the minimum Y coordinate (inclusive) of the RenderedImage.
int | getNumXTiles() Returns the number of tiles in the X direction.
int | getNumYTiles() Returns the number of tiles in the Y direction.
Object | getProperty(String name) Gets a property from the property set of this image.
String[] | getPropertyNames() Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
SampleModel | getSampleModel() Returns the SampleModel associated with this image.
Vector | getSources() Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage.
Raster | getTile(int tileX, int tileY) Returns tile (tileX, tileY).
int | getTileGridXOffset() Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).
int | getTileGridYOffset() Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).
int | getTileHeight() Returns the tile height in pixels.
int | getTileWidth() Returns the tile width in pixels.
int | getWidth() Returns the width of the RenderedImage.

Method Detail

getSources

public Vector getSources()
Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage. This method returns null if the RenderedImage object has no information about its immediate sources. It returns an empty Vector if the RenderedImage object has no immediate sources.

getProperty

public Object getProperty(String name)
Gets a property from the property set of this image. The set of properties and whether it is immutable is determined by the implementing class. This method returns java.awt.Image.UndefinedProperty if the specified property is not defined for this RenderedImage.
See Also:
Image.UndefinedProperty

getPropertyNames

public String[] getPropertyNames()
Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
Returns:
a String array containing all of the property names that getProperty(String) recognizes; or null if no property names are recognized.

getColorModel

public ColorModel getColorModel()
Returns the ColorModel associated with this image. All Rasters returned from this image will have this as their ColorModel. This can return null.

getSampleModel

public SampleModel getSampleModel()
Returns the SampleModel associated with this image. All Rasters returned from this image will have this as their SampleModel.

getWidth

public int getWidth()
Returns the width of the RenderedImage.

getHeight

public int getHeight()
Returns the height of the RenderedImage.

getMinX

public int getMinX()
Returns the minimum X coordinate (inclusive) of the RenderedImage.

getMinY

public int getMinY()
Returns the minimum Y coordinate (inclusive) of the RenderedImage.

getNumXTiles

public int getNumXTiles()
Returns the number of tiles in the X direction.

getNumYTiles

public int getNumYTiles()
Returns the number of tiles in the Y direction.

getMinTileX

public int getMinTileX()
Returns the minimum tile index in the X direction.

getMinTileY

public int getMinTileY()
Returns the minimum tile index in the Y direction.

getTileWidth

public int getTileWidth()
Returns the tile width in pixels. All tiles must have the same width.

getTileHeight

public int getTileHeight()
Returns the tile height in pixels. All tiles must have the same height.

getTileGridXOffset

public int getTileGridXOffset()
Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

getTileGridYOffset

public int getTileGridYOffset()
Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

getTile

public Raster getTile(int tileX,
                      int tileY)
Returns tile (tileX, tileY). Note that tileX and tileY are indices into the tile array, not pixel locations. The Raster that is returned is live and will be updated if the image is changed.
Parameters:
tileX - the X index of the requested tile in the tile array.
tileY - the Y index of the requested tile in the tile array.

getData

public Raster getData()
Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over). The Raster returned is a copy of the image data and will not be updated if the image is changed.

getData

public Raster getData(Rectangle rect)
Computes and returns an arbitrary region of the RenderedImage. The Raster returned is a copy of the image data and will not be updated if the image is changed.
Parameters:
rect - the region of the RenderedImage to be returned.

copyData

public WritableRaster copyData(WritableRaster raster)
Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster. The region to be computed is determined from the bounds of the supplied WritableRaster. The supplied WritableRaster must have a SampleModel that is compatible with this image. If raster is null, an appropriate WritableRaster is created.
Parameters:
raster - a WritableRaster to hold the returned portion of the image, or null.
Returns:
a reference to the supplied or created WritableRaster.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReplicateScaleFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ReplicateScaleFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.ReplicateScaleFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
Direct Known Subclasses:
AreaAveragingScaleFilter
public class ReplicateScaleFilter
extends ImageFilter

An ImageFilter class for scaling images using the simplest algorithm. This class extends the basic ImageFilter Class to scale an existing image and provide a source for a new image containing the resampled image. The pixels in the source image are sampled to produce pixels for an image of the specified size by replicating rows and columns of pixels to scale up or omitting rows and columns of pixels to scale down. It is meant to be used in conjunction with a FilteredImageSource object to produce scaled versions of existing images.

See Also:
FilteredImageSource, ImageFilter

Field Summary
protected int | destHeight The target height to scale the image.
protected int | destWidth The target width to scale the image.
protected Object | outpixbuf A byte array initialized with a size of destWidth and used to deliver a row of pixel data to the ImageConsumer.
protected int[] | srccols An int array containing information about a column of pixels.
protected int | srcHeight The height of the source image.
protected int[] | srcrows An int array containing information about a row of pixels.
protected int | srcWidth The width of the source image.
Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
ReplicateScaleFilter(int width, int height)
Constructs a ReplicateScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
Method Summary
void | setDimensions(int w, int h) Override the dimensions of the source image and pass the dimensions of the new scaled size to the ImageConsumer.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) Choose which rows and columns of the delivered byte pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) Choose which rows and columns of the delivered int pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.
void | setProperties(Hashtable props) Passes along the properties from the source object after adding a property indicating the scale applied.
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel, setHints
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

srcWidth

protected int srcWidth
The width of the source image.

srcHeight

protected int srcHeight
The height of the source image.

destWidth

protected int destWidth
The target width to scale the image.

destHeight

protected int destHeight
The target height to scale the image.

srcrows

protected int[] srcrows
An int array containing information about a row of pixels.

srccols

protected int[] srccols
An int array containing information about a column of pixels.

outpixbuf

protected Object outpixbuf
A byte array initialized with a size of destWidth and used to deliver a row of pixel data to the ImageConsumer.
Constructor Detail

ReplicateScaleFilter

public ReplicateScaleFilter(int width,
                            int height)
Constructs a ReplicateScaleFilter that scales the pixels from its source Image as specified by the width and height parameters.
Parameters:
width - the target width to scale the image
height - the target height to scale the image
Throws:
IllegalArgumentException - if width equals zero or height equals zero
Method Detail

setProperties

public void setProperties(Hashtable props)
Passes along the properties from the source object after adding a property indicating the scale applied.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setProperties in class ImageFilter

setDimensions

public void setDimensions(int w,
                          int h)
Override the dimensions of the source image and pass the dimensions of the new scaled size to the ImageConsumer.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setDimensions in class ImageFilter
See Also:
ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Choose which rows and columns of the delivered byte pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
Following copied from class: java.awt.image.ImageFilter
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Choose which rows and columns of the delivered int pixels are needed for the destination scaled image and pass through just those rows and columns that are needed, replicated as necessary.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
Following copied from class: java.awt.image.ImageFilter
See Also:
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RescaleOp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class RescaleOp

java.lang.Object
  |
  +--java.awt.image.RescaleOp
All Implemented Interfaces:
BufferedImageOp, RasterOp
public class RescaleOp
extends Object
implements BufferedImageOp, RasterOp

This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset. The scaled sample values are clipped to the minimum/maximum representable in the destination image.

The pseudo code for the rescaling operation is as follows:

for each pixel from Source object {
    for each band/component of the pixel {
        dstElement = (srcElement*scaleFactor) + offset
    }
}

For Rasters, rescaling operates on bands. The number of sets of scaling constants may be one, in which case the same constants are applied to all bands, or it must equal the number of Source Raster bands.

For BufferedImages, rescaling operates on color and alpha components. The number of sets of scaling constants may be one, in which case the same constants are applied to all color (but not alpha) components. Otherwise, the number of sets of scaling constants may equal the number of Source color components, in which case no rescaling of the alpha component (if present) is performed. If neither of these cases apply, the number of sets of scaling constants must equal the number of Source color components plus alpha components, in which case all color and alpha components are rescaled.

BufferedImage sources with premultiplied alpha data are treated in the same manner as non-premultiplied images for purposes of rescaling. That is, the rescaling is done per band on the raw data of the BufferedImage source without regard to whether the data is premultiplied. If a color conversion is required to the destination ColorModel, the premultiplied state of both source and destination will be taken into account for this step.

Images with an IndexColorModel cannot be rescaled.

If a RenderingHints object is specified in the constructor, the color rendering hint and the dithering hint may be used when color conversion is required.

Note that in-place operation is allowed (i.e. the source and destination can be the same object).

See Also:
RenderingHints.KEY_COLOR_RENDERING, RenderingHints.KEY_DITHERING

Constructor Summary
RescaleOp(float[] scaleFactors, float[] offsets, RenderingHints hints)
Constructs a new RescaleOp with the desired scale factors and offsets.
RescaleOp(float scaleFactor, float offset, RenderingHints hints)
Constructs a new RescaleOp with the desired scale factor and offset.
Method Summary
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel destCM) Creates a zeroed destination image with the correct size and number of bands.
WritableRaster | createCompatibleDestRaster(Raster src) Creates a zeroed destination Raster with the correct size and number of bands, given this source.
BufferedImage | filter(BufferedImage src, BufferedImage dst) Rescales the source BufferedImage.
WritableRaster | filter(Raster src, WritableRaster dst) Rescales the pixel data in the source Raster.
Rectangle2D | getBounds2D(BufferedImage src) Returns the bounding box of the rescaled destination image.
Rectangle2D | getBounds2D(Raster src) Returns the bounding box of the rescaled destination Raster.
int | getNumFactors() Returns the number of scaling factors and offsets used in this RescaleOp.
float[] | getOffsets(float[] offsets) Returns the offsets in the given array.
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt) Returns the location of the destination point given a point in the source.
RenderingHints | getRenderingHints() Returns the rendering hints for this op.
float[] | getScaleFactors(float[] scaleFactors) Returns the scale factors in the given array.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RescaleOp

public RescaleOp(float[] scaleFactors,
                 float[] offsets,
                 RenderingHints hints)
Constructs a new RescaleOp with the desired scale factors and offsets. The length of the scaleFactor and offset arrays must meet the restrictions stated in the class comments above. The RenderingHints argument may be null.

RescaleOp

public RescaleOp(float scaleFactor,
                 float offset,
                 RenderingHints hints)
Constructs a new RescaleOp with the desired scale factor and offset. The scaleFactor and offset will be applied to all bands in a source Raster and to all color (but not alpha) components in a BufferedImage. The RenderingHints argument may be null.
Method Detail

getScaleFactors

public final float[] getScaleFactors(float[] scaleFactors)
Returns the scale factors in the given array. The array is also returned for convenience. If scaleFactors is null, a new array will be allocated.

getOffsets

public final float[] getOffsets(float[] offsets)
Returns the offsets in the given array. The array is also returned for convenience. If offsets is null, a new array will be allocated.

getNumFactors

public final int getNumFactors()
Returns the number of scaling factors and offsets used in this RescaleOp.

filter

public final BufferedImage filter(BufferedImage src,
                                  BufferedImage dst)
Rescales the source BufferedImage. If the color model in the source image is not the same as that in the destination image, the pixels will be converted in the destination. If the destination image is null, a BufferedImage will be created with the source ColorModel. An IllegalArgumentException may be thrown if the number of scaling factors/offsets in this object does not meet the restrictions stated in the class comments above, or if the source image has an IndexColorModel.
Specified by:
filter in interface BufferedImageOp

filter

public final WritableRaster filter(Raster src,
                                   WritableRaster dst)
Rescales the pixel data in the source Raster. If the destination Raster is null, a new Raster will be created. The source and destination must have the same number of bands. Otherwise, an IllegalArgumentException is thrown. Note that the number of scaling factors/offsets in this object must meet the restrictions stated in the class comments above. Otherwise, an IllegalArgumentException is thrown.
Specified by:
filter in interface RasterOp

getBounds2D

public final Rectangle2D getBounds2D(BufferedImage src)
Returns the bounding box of the rescaled destination image. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface BufferedImageOp

getBounds2D

public final Rectangle2D getBounds2D(Raster src)
Returns the bounding box of the rescaled destination Raster. Since this is not a geometric operation, the bounding box does not change.
Specified by:
getBounds2D in interface RasterOp

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel destCM)
Creates a zeroed destination image with the correct size and number of bands.
Specified by:
createCompatibleDestImage in interface BufferedImageOp
Parameters:
src - Source image for the filter operation.
destCM - ColorModel of the destination. If null, the ColorModel of the source will be used.

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands, given this source.
Specified by:
createCompatibleDestRaster in interface RasterOp

getPoint2D

public final Point2D getPoint2D(Point2D srcPt,
                                Point2D dstPt)
Returns the location of the destination point given a point in the source. If dstPt is non-null, it will be used to hold the return value. Since this is not a geometric operation, the srcPt will equal the dstPt.
Specified by:
getPoint2D in interface BufferedImageOp

getRenderingHints

public final RenderingHints getRenderingHints()
Returns the rendering hints for this op.
Specified by:
getRenderingHints in interface BufferedImageOp
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RGBImageFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class RGBImageFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.RGBImageFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
Direct Known Subclasses:
GrayFilter
public abstract class RGBImageFilter
extends ImageFilter

This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel. It is meant to be used in conjunction with a FilteredImageSource object to produce filtered versions of existing images. It is an abstract class that provides the calls needed to channel all of the pixel data through a single method which converts pixels one at a time in the default RGB ColorModel regardless of the ColorModel being used by the ImageProducer. The only method which needs to be defined to create a useable image filter is the filterRGB method. Here is an example of a definition of a filter which swaps the red and blue components of an image:

    class RedBlueSwapFilter extends RGBImageFilter {
        public RedBlueSwapFilter() {
        // The filter's operation does not depend on the
        // pixel's location, so IndexColorModels can be
        // filtered directly.
        canFilterIndexColorModel = true;
        }

        public int filterRGB(int x, int y, int rgb) {
        return ((rgb & 0xff00ff00)
            | ((rgb & 0xff0000) >> 16)
            | ((rgb & 0xff) << 16));
        }
    }

See Also:
FilteredImageSource, ImageFilter, ColorModel.getRGBdefault()

Field Summary
protected boolean | canFilterIndexColorModel This boolean indicates whether or not it is acceptable to apply the color filtering of the filterRGB method to the color table entries of an IndexColorModel object in lieu of pixel by pixel filtering.
protected ColorModel | newmodel The ColorModel with which to replace origmodel when the user calls substituteColorModel.
protected ColorModel | origmodel The ColorModel to be replaced by newmodel when the user calls substituteColorModel.
Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
RGBImageFilter()
Method Summary
IndexColorModel | filterIndexColorModel(IndexColorModel icm) Filters an IndexColorModel object by running each entry in its color tables through the filterRGB function that RGBImageFilter subclasses must provide.
abstract int | filterRGB(int x, int y, int rgb) Subclasses must specify a method to convert a single input pixel in the default RGB ColorModel to a single output pixel.
void | filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize) Filters a buffer of pixels in the default RGB ColorModel by passing them one by one through the filterRGB method.
void | setColorModel(ColorModel model) If the ColorModel is an IndexColorModel, and the subclass has set the canFilterIndexColorModel flag to true, we substitute a filtered version of the color model here and wherever that original ColorModel object appears in the setPixels methods.
void | setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel.
void | setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel, otherwise converts the buffer of integer pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method to be converted one by one.
void | substituteColorModel(ColorModel oldcm, ColorModel newcm) Registers two ColorModel objects for substitution.
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

origmodel

protected ColorModel origmodel
The ColorModel to be replaced by newmodel when the user calls substituteColorModel.

newmodel

protected ColorModel newmodel
The ColorModel with which to replace origmodel when the user calls substituteColorModel.

canFilterIndexColorModel

protected boolean canFilterIndexColorModel
This boolean indicates whether or not it is acceptable to apply the color filtering of the filterRGB method to the color table entries of an IndexColorModel object in lieu of pixel by pixel filtering. Subclasses should set this variable to true in their constructor if their filterRGB method does not depend on the coordinate of the pixel being filtered.
See Also:
substituteColorModel(java.awt.image.ColorModel, java.awt.image.ColorModel), filterRGB(int, int, int), IndexColorModel
Constructor Detail

RGBImageFilter

public RGBImageFilter()
Method Detail

setColorModel

public void setColorModel(ColorModel model)
If the ColorModel is an IndexColorModel, and the subclass has set the canFilterIndexColorModel flag to true, we substitute a filtered version of the color model here and wherever that original ColorModel object appears in the setPixels methods. Otherwise overrides the default ColorModel used by the ImageProducer and specifies the default RGB ColorModel instead.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setColorModel in class ImageFilter
See Also:
ImageConsumer, ColorModel.getRGBdefault()

substituteColorModel

public void substituteColorModel(ColorModel oldcm,
                                 ColorModel newcm)
Registers two ColorModel objects for substitution. If the oldcm is encountered during any of the setPixels methods, the newcm is substituted and the pixels passed through untouched (but with the new ColorModel object).
Parameters:
oldcm - the ColorModel object to be replaced on the fly
newcm - the ColorModel object to replace oldcm on the fly

filterIndexColorModel

public IndexColorModel filterIndexColorModel(IndexColorModel icm)
Filters an IndexColorModel object by running each entry in its color tables through the filterRGB function that RGBImageFilter subclasses must provide. Uses coordinates of -1 to indicate that a color table entry is being filtered rather than an actual pixel value.
Parameters:
icm - the IndexColorModel object to be filtered
Returns:
a new IndexColorModel representing the filtered colors

filterRGBPixels

public void filterRGBPixels(int x,
                            int y,
                            int w,
                            int h,
                            int[] pixels,
                            int off,
                            int scansize)
Filters a buffer of pixels in the default RGB ColorModel by passing them one by one through the filterRGB method.
See Also:
ColorModel.getRGBdefault(), filterRGB(int, int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel. Otherwise converts the buffer of byte pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method to be converted one by one.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
See Also:
ColorModel.getRGBdefault(), filterRGBPixels(int, int, int, int, int[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
If the ColorModel object is the same one that has already been converted, then simply passes the pixels through with the converted ColorModel, otherwise converts the buffer of integer pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method to be converted one by one. Converts a buffer of integer pixels to the default RGB ColorModel and passes the converted buffer to the filterRGBPixels method.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to filter pixels from an image should avoid calling this method directly since that operation could interfere with the filtering operation.

Overrides:
setPixels in class ImageFilter
See Also:
ColorModel.getRGBdefault(), filterRGBPixels(int, int, int, int, int[], int, int)

filterRGB

public abstract int filterRGB(int x,
                              int y,
                              int rgb)
Subclasses must specify a method to convert a single input pixel in the default RGB ColorModel to a single output pixel.
See Also:
ColorModel.getRGBdefault(), filterRGBPixels(int, int, int, int, int[], int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class SampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
Direct Known Subclasses:
ComponentSampleModel, MultiPixelPackedSampleModel, SinglePixelPackedSampleModel
public abstract class SampleModel
extends Object

This abstract class defines an interface for extracting samples of pixels in an image. All image data is expressed as a collection of pixels. Each pixel consists of a number of samples. A sample is a datum for one band of an image and a band consists of all samples of a particular type in an image. For example, a pixel might contain three samples representing its red, green and blue components. There are three bands in the image containing this pixel. One band consists of all the red samples from all pixels in the image. The second band consists of all the green samples and the remaining band consists of all of the blue samples. The pixel can be stored in various formats. For example, all samples from a particular band can be stored contiguously or all samples from a single pixel can be stored contiguously. In the Java 2D(tm) API, all built-in image processing and display operators process samples which represent unsigned integral values.

A collection of pixels is represented as a Raster, which consists of a DataBuffer and a SampleModel. The SampleModel allows access to samples in the DataBuffer and may provide low-level information that a programmer can use to directly manipulate samples and pixels in the DataBuffer.

This class is generally a fall back method for dealing with images. More efficient code will cast the SampleModel to the appropriate subclass and extract the information needed to directly manipulate pixels in the DataBuffer.

See Also:
DataBuffer, Raster, ComponentSampleModel, PixelInterleavedSampleModel, BandedSampleModel, MultiPixelPackedSampleModel, SinglePixelPackedSampleModel

Field Summary
protected int | dataType Data type of the DataBuffer storing the pixel data.
protected int | height Height in pixels of the region of image data that this SampleModel describes.
protected int | numBands Number of bands of the image data that this SampleModel describes.
protected int | width Width in pixels of the region of image data that this SampleModel describes.
Constructor Summary
SampleModel(int dataType, int w, int h, int numBands)
Constructs a SampleModel with the specified parameters.
Method Summary
abstract SampleModel | createCompatibleSampleModel(int w, int h) Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height.
abstract DataBuffer | createDataBuffer() Creates a DataBuffer that corresponds to this SampleModel.
abstract SampleModel | createSubsetSampleModel(int[] bands) Creates a new SampleModel with a subset of the bands of this SampleModel.
Object | getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
abstract Object | getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int | getDataType() Returns the data type of the DataBuffer storing the pixel data.
int | getHeight() Returns the height in pixels.
int | getNumBands() Returns the total number of bands of image data.
abstract int | getNumDataElements() Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods.
double[] | getPixel(int x, int y, double[] dArray, DataBuffer data) Returns the samples for the specified pixel in an array of double.
float[] | getPixel(int x, int y, float[] fArray, DataBuffer data) Returns the samples for the specified pixel in an array of float.
int[] | getPixel(int x, int y, int[] iArray, DataBuffer data) Returns the samples for a specified pixel in an int array, one sample per array element.
double[] | getPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data) Returns all samples for a rectangle of pixels in a double array, one sample per array element.
float[] | getPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data) Returns all samples for a rectangle of pixels in a float array, one sample per array element.
int[] | getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for a rectangle of pixels in an int array, one sample per array element.
abstract int | getSample(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as an int.
double | getSampleDouble(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for a pixel located at (x,y) as a double.
float | getSampleFloat(int x, int y, int b, DataBuffer data) Returns the sample in a specified band for the pixel located at (x,y) as a float.
double[] | getSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data) Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.
float[] | getSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.
int[] | getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
abstract int[] | getSampleSize() Returns the size in bits of samples for all bands.
abstract int | getSampleSize(int band) Returns the size in bits of samples for the specified band.
int | getTransferType() Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
int | getWidth() Returns the width in pixels.
void | setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType.
abstract void | setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | setPixel(int x, int y, double[] dArray, DataBuffer data) Sets a pixel in the DataBuffer using a double array of samples for input.
void | setPixel(int x, int y, float[] fArray, DataBuffer data) Sets a pixel in the DataBuffer using a float array of samples for input.
void | setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | setPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data) Sets all samples for a rectangle of pixels from a double array containing one sample per array element.
void | setPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data) Sets all samples for a rectangle of pixels from a float array containing one sample per array element.
void | setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | setSample(int x, int y, int b, double s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | setSample(int x, int y, int b, float s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
abstract void | setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | setSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element.
void | setSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element.
void | setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

width

protected int width
Width in pixels of the region of image data that this SampleModel describes.

height

protected int height
Height in pixels of the region of image data that this SampleModel describes.

numBands

protected int numBands
Number of bands of the image data that this SampleModel describes.

dataType

protected int dataType
Data type of the DataBuffer storing the pixel data.
See Also:
DataBuffer
Constructor Detail

SampleModel

public SampleModel(int dataType,
                   int w,
                   int h,
                   int numBands)
Constructs a SampleModel with the specified parameters.
Parameters:
dataType - The data type of the DataBuffer storing the pixel data.
w - The width (in pixels) of the region of image data.
h - The height (in pixels) of the region of image data.
numBands - The number of bands of the image data.
Throws:
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if the product of w and h is greater than Integer.MAX_VALUE
IllegalArgumentException - if dataType is not one of the supported data types
Method Detail

getWidth

public final int getWidth()
Returns the width in pixels.

getHeight

public final int getHeight()
Returns the height in pixels.

getNumBands

public final int getNumBands()
Returns the total number of bands of image data.

getNumDataElements

public abstract int getNumDataElements()
Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods. When pixels are transferred via these methods, they may be transferred in a packed or unpacked format, depending on the implementation of the SampleModel. Using these methods, pixels are transferred as an array of getNumDataElements() elements of a primitive type given by getTransferType(). The TransferType may or may not be the same as the storage DataType.
See Also:
getDataElements(int, int, Object, DataBuffer),
getDataElements(int, int, int, int, Object, DataBuffer),
setDataElements(int, int, Object, DataBuffer),
setDataElements(int, int, int, int, Object, DataBuffer),
getTransferType()

getDataType

public final int getDataType()
Returns the data type of the DataBuffer storing the pixel data.

getTransferType

public int getTransferType()
Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods. When pixels are transferred via these methods, they may be transferred in a packed or unpacked format, depending on the implementation of the SampleModel. Using these methods, pixels are transferred as an array of getNumDataElements() elements of a primitive type given by getTransferType(). The TransferType may or may not be the same as the storage DataType. The TransferType will be one of the types defined in DataBuffer.
See Also:
getDataElements(int, int, Object, DataBuffer),
getDataElements(int, int, int, int, Object, DataBuffer),
setDataElements(int, int, Object, DataBuffer),
setDataElements(int, int, int, int, Object, DataBuffer),
getNumDataElements(),
DataBuffer

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray,
                      DataBuffer data)
Returns the samples for a specified pixel in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getDataElements

public abstract Object getDataElements(int x,
                                       int y,
                                       Object obj,
                                       DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data may be returned in a packed format, thus increasing efficiency for data transfers. Generally, obj should be passed in as null, so that the Object will be created automatically and will be of the right primitive data type.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by SampleModel sm1, to DataBuffer db2, whose storage layout is described by SampleModel sm2. The transfer will generally be more efficient than using getPixel/setPixel.

          SampleModel sm1, sm2;
         DataBuffer db1, db2;
          sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.

Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - If non-null, a primitive array in which to return the pixel data.
data - The DataBuffer containing the image data.
See Also:
getNumDataElements(), getTransferType(), DataBuffer

getDataElements

public Object getDataElements(int x,
                              int y,
                              int w,
                              int h,
                              Object obj,
                              DataBuffer data)
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data may be returned in a packed format, thus increasing efficiency for data transfers. Generally, obj should be passed in as null, so that the Object will be created automatically and will be of the right primitive data type.

The following code illustrates transferring data for a rectangular region of pixels from DataBuffer db1, whose storage layout is described by SampleModel sm1, to DataBuffer db2, whose storage layout is described by SampleModel sm2. The transfer will generally be more efficient than using getPixels/setPixels.

          SampleModel sm1, sm2;
         DataBuffer db1, db2;
          sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w,
                           h, null, db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.

Parameters:
x - The minimum X coordinate of the pixel rectangle.
y - The minimum Y coordinate of the pixel rectangle.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
obj - If non-null, a primitive array in which to return the pixel data.
data - The DataBuffer containing the image data.
See Also:
getNumDataElements(), getTransferType(), DataBuffer

setDataElements

public abstract void setDataElements(int x,
                                     int y,
                                     Object obj,
                                     DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data in the array may be in a packed format, thus increasing efficiency for data transfers.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by SampleModel sm1, to DataBuffer db2, whose storage layout is described by SampleModel sm2. The transfer will generally be more efficient than using getPixel/setPixel.

          SampleModel sm1, sm2;
         DataBuffer db1, db2;
          sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1),
                           db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - A primitive array containing pixel data.
data - The DataBuffer containing the image data.
See Also:
getNumDataElements(), getTransferType(), DataBuffer

setDataElements

public void setDataElements(int x,
                            int y,
                            int w,
                            int h,
                            Object obj,
                            DataBuffer data)
Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data in the array may be in a packed format, thus increasing efficiency for data transfers.

The following code illustrates transferring data for a rectangular region of pixels from DataBuffer db1, whose storage layout is described by SampleModel sm1, to DataBuffer db2, whose storage layout is described by SampleModel sm2. The transfer will generally be more efficient than using getPixels/setPixels.

          SampleModel sm1, sm2;
         DataBuffer db1, db2;
          sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w, h,
                           null, db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Parameters:
x - The minimum X coordinate of the pixel rectangle.
y - The minimum Y coordinate of the pixel rectangle.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
obj - A primitive array containing pixel data.
data - The DataBuffer containing the image data.
See Also:
getNumDataElements(), getTransferType(), DataBuffer

getPixel

public float[] getPixel(int x,
                        int y,
                        float[] fArray,
                        DataBuffer data)
Returns the samples for the specified pixel in an array of float. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
fArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixel

public double[] getPixel(int x,
                         int y,
                         double[] dArray,
                         DataBuffer data)
Returns the samples for the specified pixel in an array of double. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
dArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray,
                       DataBuffer data)
Returns all samples for a rectangle of pixels in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixels

public float[] getPixels(int x,
                         int y,
                         int w,
                         int h,
                         float[] fArray,
                         DataBuffer data)
Returns all samples for a rectangle of pixels in a float array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
fArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getPixels

public double[] getPixels(int x,
                          int y,
                          int w,
                          int h,
                          double[] dArray,
                          DataBuffer data)
Returns all samples for a rectangle of pixels in a double array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
dArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSample

public abstract int getSample(int x,
                              int y,
                              int b,
                              DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as an int. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b,
                            DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as a float. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b,
                              DataBuffer data)
Returns the sample in a specified band for a pixel located at (x,y) as a double. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray,
                        DataBuffer data)
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSamples

public float[] getSamples(int x,
                          int y,
                          int w,
                          int h,
                          int b,
                          float[] fArray,
                          DataBuffer data)
Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
fArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSamples

public double[] getSamples(int x,
                           int y,
                           int w,
                           int h,
                           int b,
                           double[] dArray,
                           DataBuffer data)
Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
dArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     float[] fArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using a float array of samples for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
fArray - The input samples in a float array.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     double[] dArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using a double array of samples for input.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
dArray - The input samples in a double array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      int[] iArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      float[] fArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from a float array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
fArray - The input samples in a float array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      double[] dArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from a double array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
dArray - The input samples in a double array.
data - The DataBuffer containing the image data.

setSample

public abstract void setSample(int x,
                               int y,
                               int b,
                               int s,
                               DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as an int.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      float s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a float.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      double s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a double.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       int[] iArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       float[] fArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
fArray - The input samples in a float array.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       double[] dArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
dArray - The input samples in a double array.
data - The DataBuffer containing the image data.

createCompatibleSampleModel

public abstract SampleModel createCompatibleSampleModel(int w,
                                                        int h)
Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height.

createSubsetSampleModel

public abstract SampleModel createSubsetSampleModel(int[] bands)
Creates a new SampleModel with a subset of the bands of this SampleModel.

createDataBuffer

public abstract DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this SampleModel. The DataBuffer's width and height will match this SampleModel's.

getSampleSize

public abstract int[] getSampleSize()
Returns the size in bits of samples for all bands.

getSampleSize

public abstract int getSampleSize(int band)
Returns the size in bits of samples for the specified band.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortLookupTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class ShortLookupTable

java.lang.Object
  |
  +--java.awt.image.LookupTable
        |
        +--java.awt.image.ShortLookupTable
public class ShortLookupTable
extends LookupTable

This class defines a lookup table object. The output of a lookup operation using an object of this class is interpreted as an unsigned short quantity. The lookup table contains short data arrays for one or more bands (or components) of an image, and it contains an offset which will be subtracted from the input values before indexing the arrays. This allows an array smaller than the native data size to be provided for a constrained input. If there is only one array in the lookup table, it will be applied to all bands.

See Also:
ByteLookupTable, LookupOp

Constructor Summary
ShortLookupTable(int offset, short[] data)
Constructs a ShortLookupTable object from an array of shorts representing a lookup table for each band.
ShortLookupTable(int offset, short[][] data)
Constructs a ShortLookupTable object from an array of short arrays representing a lookup table for each band.
Method Summary
short[][] | getTable() Returns the lookup table data by reference.
int[] | lookupPixel(int[] src, int[] dst) Returns an array of samples of a pixel, translated with the lookup table.
short[] | lookupPixel(short[] src, short[] dst) Returns an array of samples of a pixel, translated with the lookup table.
Methods inherited from class java.awt.image.LookupTable
getNumComponents, getOffset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShortLookupTable

public ShortLookupTable(int offset,
                        short[][] data)
Constructs a ShortLookupTable object from an array of short arrays representing a lookup table for each band. The offset will be subtracted from the input values before indexing into the arrays. The number of bands is the length of the data argument. The data array for each band is stored as a reference.

ShortLookupTable

public ShortLookupTable(int offset,
                        short[] data)
Constructs a ShortLookupTable object from an array of shorts representing a lookup table for each band. The offset will be subtracted from the input values before indexing into the array. The data array is stored as a reference.
Method Detail

getTable

public final short[][] getTable()
Returns the lookup table data by reference. If this ShortLookupTable was constructed using a single short array, the length of the returned array is one.
Returns:
ShortLookupTable data array.

lookupPixel

public int[] lookupPixel(int[] src,
                         int[] dst)
Returns an array of samples of a pixel, translated with the lookup table. The source and destination array can be the same array. Array dst is returned.
Overrides:
lookupPixel in class LookupTable
Parameters:
src - the source array.
dst - the destination array. This array must be at least as long as src. If dst is null, a new array will be allocated having the same length as src.
Returns:
the array dst, an int array of samples.
Throws:
ArrayIndexOutOfBoundsException - if src is longer than dst or if for any element i of src, (src[i]&0xffff)-offset is either less than zero or greater than or equal to the length of the lookup table for any band.

lookupPixel

public short[] lookupPixel(short[] src,
                           short[] dst)
Returns an array of samples of a pixel, translated with the lookup table. The source and destination array can be the same array. Array dst is returned.
Parameters:
src - the source array.
dst - the destination array. This array must be at least as long as src. If dst is null, a new array will be allocated having the same length as src.
Returns:
the array dst, an int array of samples.
Throws:
ArrayIndexOutOfBoundsException - if src is longer than dst or if for any element i of src, (src[i]&0xffff)-offset is either less than zero or greater than or equal to the length of the lookup table for any band.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SinglePixelPackedSampleModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class SinglePixelPackedSampleModel

java.lang.Object
  |
  +--java.awt.image.SampleModel
        |
        +--java.awt.image.SinglePixelPackedSampleModel
public class SinglePixelPackedSampleModel
extends SampleModel

This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel. This class supports TYPE_BYTE, TYPE_USHORT, TYPE_INT data types. All data array elements reside in the first bank of a DataBuffer. Accessor methods are provided so that the image data can be manipulated directly. Scanline stride is the number of data array elements between a given sample and the corresponding sample in the same column of the next scanline. Bit masks are the masks required to extract the samples representing the bands of the pixel. Bit offsets are the offsets in bits into the data array element of the samples representing the bands of the pixel.

The following code illustrates extracting the bits of the sample representing band b for pixel x,y from DataBuffer data:

      int sample = data.getElem(y * scanlineStride + x);
      sample = (sample & bitMasks[b]) >>> bitOffsets[b];

Fields inherited from class java.awt.image.SampleModel
dataType, height, numBands, width
Constructor Summary
SinglePixelPackedSampleModel(int dataType, int w, int h, int[] bitMasks)
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands.
SinglePixelPackedSampleModel(int dataType, int w, int h, int scanlineStride, int[] bitMasks)
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands and a scanline stride equal to scanlineStride data array elements.
Method Summary
SampleModel | createCompatibleSampleModel(int w, int h) This creates a new SinglePixelPackedSampleModel with the specified width and height.
DataBuffer | createDataBuffer() Creates a DataBuffer that corresponds to this SinglePixelPackedSampleModel.
SampleModel | createSubsetSampleModel(int[] bands) This creates a new SinglePixelPackedSampleModel with a subset of the bands of this SinglePixelPackedSampleModel.
int[] | getBitMasks() Returns the bit masks for all bands.
int[] | getBitOffsets() Returns the bit offsets into the data array element representing a pixel for all bands.
Object | getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
int | getNumDataElements() Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.
int | getOffset(int x, int y) Returns the offset (in data array elements) of pixel (x,y).
int[] | getPixel(int x, int y, int[] iArray, DataBuffer data) Returns all samples in for the specified pixel in an int array.
int[] | getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Returns all samples for the specified rectangle of pixels in an int array, one sample per array element.
int | getSample(int x, int y, int b, DataBuffer data) Returns as int the sample in a specified band for the pixel located at (x,y).
int[] | getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.
int[] | getSampleSize() Returns the number of bits per sample for all bands.
int | getSampleSize(int band) Returns the number of bits per sample for the specified band.
int | getScanlineStride() Returns the scanline stride of this SinglePixelPackedSampleModel.
void | setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | setPixel(int x, int y, int[] iArray, DataBuffer data) Sets a pixel in the DataBuffer using an int array of samples for input.
void | setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | setSample(int x, int y, int b, int s, DataBuffer data) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
Methods inherited from class java.awt.image.SampleModel
getDataElements, getDataType, getHeight, getNumBands, getPixel, getPixel, getPixels, getPixels, getSampleDouble, getSampleFloat, getSamples, getSamples, getTransferType, getWidth, setDataElements, setPixel, setPixel, setPixels, setPixels, setSample, setSample, setSamples, setSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SinglePixelPackedSampleModel

public SinglePixelPackedSampleModel(int dataType,
                                    int w,
                                    int h,
                                    int[] bitMasks)
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands. Each sample is stored in a data array element in the position of its corresponding bit mask. Each bit mask must be contiguous and masks must not overlap.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of the image data described.
h - The height (in pixels) of the region of the image data described.
bitMasks - The bit masks for all bands.
Throws:
IllegalArgumentException - if dataType is not either DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT

SinglePixelPackedSampleModel

public SinglePixelPackedSampleModel(int dataType,
                                    int w,
                                    int h,
                                    int scanlineStride,
                                    int[] bitMasks)
Constructs a SinglePixelPackedSampleModel with bitMasks.length bands and a scanline stride equal to scanlineStride data array elements. Each sample is stored in a data array element in the position of its corresponding bit mask. Each bit mask must be contiguous and masks must not overlap.
Parameters:
dataType - The data type for storing samples.
w - The width (in pixels) of the region of image data described.
h - The height (in pixels) of the region of image data described.
scanlineStride - The line stride of the image data.
bitMasks - The bit masks for all bands.
Throws:
IllegalArgumentException - if w or h is not greater than 0
IllegalArgumentException - if any mask in bitMask is not contiguous
IllegalArgumentException - if dataType is not either DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT
Method Detail

getNumDataElements

public int getNumDataElements()
Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods. For a SinglePixelPackedSampleModel, this is one.
Overrides:
getNumDataElements in class SampleModel
Following copied from class: java.awt.image.SampleModel
See Also:
SampleModel.getDataElements(int, int, Object, DataBuffer),
SampleModel.getDataElements(int, int, int, int, Object, DataBuffer),
SampleModel.setDataElements(int, int, Object, DataBuffer),
SampleModel.setDataElements(int, int, int, int, Object, DataBuffer),
SampleModel.getTransferType()

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
This creates a new SinglePixelPackedSampleModel with the specified width and height. The new SinglePixelPackedSampleModel will have the same storage data type and bit masks as this SinglePixelPackedSampleModel.
Overrides:
createCompatibleSampleModel in class SampleModel
Parameters:
w - the width of the resulting SampleModel
h - the height of the resulting SampleModel
Throws:
IllegalArgumentException - if w or h is not greater than 0

createDataBuffer

public DataBuffer createDataBuffer()
Creates a DataBuffer that corresponds to this SinglePixelPackedSampleModel. The DataBuffer's data type and size will be consistent with this SinglePixelPackedSampleModel. The DataBuffer will have a single bank.
Overrides:
createDataBuffer in class SampleModel

getSampleSize

public int[] getSampleSize()
Returns the number of bits per sample for all bands.
Overrides:
getSampleSize in class SampleModel

getSampleSize

public int getSampleSize(int band)
Returns the number of bits per sample for the specified band.
Overrides:
getSampleSize in class SampleModel

getOffset

public int getOffset(int x,
                     int y)
Returns the offset (in data array elements) of pixel (x,y). The data element containing pixel x,y can be retrieved from a DataBuffer data with a SinglePixelPackedSampleModel sppsm as:
        data.getElem(sppsm.getOffset(x, y));

getBitOffsets

public int[] getBitOffsets()
Returns the bit offsets into the data array element representing a pixel for all bands.

getBitMasks

public int[] getBitMasks()
Returns the bit masks for all bands.

getScanlineStride

public int getScanlineStride()
Returns the scanline stride of this SinglePixelPackedSampleModel.

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
This creates a new SinglePixelPackedSampleModel with a subset of the bands of this SinglePixelPackedSampleModel. The new SinglePixelPackedSampleModel can be used with any DataBuffer that the existing SinglePixelPackedSampleModel can be used with. The new SinglePixelPackedSampleModel/DataBuffer combination will represent an image with a subset of the bands of the original SinglePixelPackedSampleModel/DataBuffer combination.
Overrides:
createSubsetSampleModel in class SampleModel
Throws:
RasterFormatException - if the length of the bands argument is greater than the number of bands in the sample model.

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object obj,
                              DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. For a SinglePixelPackedSampleModel, the array will have one element, and the type will be the same as the storage data type. Generally, obj should be passed in as null, so that the Object will be created automatically and will be of the right primitive data type.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by SinglePixelPackedSampleModel sppsm1, to DataBuffer db2, whose storage layout is described by SinglePixelPackedSampleModel sppsm2. The transfer will generally be more efficient than using getPixel/setPixel.

          SinglePixelPackedSampleModel sppsm1, sppsm2;
         DataBufferInt db1, db2;
          sppsm2.setDataElements(x, y, sppsm1.getDataElements(x, y, null,
                              db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.

Overrides:
getDataElements in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - If non-null, a primitive array in which to return the pixel data.
data - The DataBuffer containing the image data.

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray,
                      DataBuffer data)
Returns all samples in for the specified pixel in an int array. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixel in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - If non-null, returns the samples in this array
data - The DataBuffer containing the image data.

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray,
                       DataBuffer data)
Returns all samples for the specified rectangle of pixels in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getPixels in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

getSample

public int getSample(int x,
                     int y,
                     int b,
                     DataBuffer data)
Returns as int the sample in a specified band for the pixel located at (x,y). ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to return.
data - The DataBuffer containing the image data.

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray,
                        DataBuffer data)
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
getSamples in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to return.
iArray - If non-null, returns the samples in this array.
data - The DataBuffer containing the image data.

setDataElements

public void setDataElements(int x,
                            int y,
                            Object obj,
                            DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. For a SinglePixelPackedSampleModel, only the first element of the array will hold valid data, and the type of the array must be the same as the storage data type of the SinglePixelPackedSampleModel.

The following code illustrates transferring data for one pixel from DataBuffer db1, whose storage layout is described by SinglePixelPackedSampleModel sppsm1, to DataBuffer db2, whose storage layout is described by SinglePixelPackedSampleModel sppsm2. The transfer will generally be more efficient than using getPixel/setPixel.

          SinglePixelPackedSampleModel sppsm1, sppsm2;
         DataBufferInt db1, db2;
          sppsm2.setDataElements(x, y, sppsm1.getDataElements(x, y, null,
                              db1), db2);
Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.

obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.

Overrides:
setDataElements in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
obj - A primitive array containing pixel data.
data - The DataBuffer containing the image data.

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray,
                     DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixel in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      int[] iArray,
                      DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setPixels in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s,
                      DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSample in class SampleModel
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as an int.
data - The DataBuffer containing the image data.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       int[] iArray,
                       DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element. ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Overrides:
setSamples in class SampleModel
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - The width of the pixel rectangle.
h - The height of the pixel rectangle.
b - The band to set.
iArray - The input samples in an int array.
data - The DataBuffer containing the image data.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TileObserver

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface TileObserver

public interface TileObserver

An interface for objects that wish to be informed when tiles of a WritableRenderedImage become modifiable by some writer via a call to getWritableTile, and when they become unmodifiable via the last call to releaseWritableTile.

See Also:
WritableRenderedImage

Method Summary
 void tileUpdate(WritableRenderedImage source, int tileX, int tileY, boolean willBeWritable)
A tile is about to be updated (it is either about to be grabbed for writing, or it is being released from writing).

Method Detail

tileUpdate

public void tileUpdate(WritableRenderedImage source,
                       int tileX,
                       int tileY,
                       boolean willBeWritable)
A tile is about to be updated (it is either about to be grabbed for writing, or it is being released from writing).
Parameters:
source - the image that owns the tile.
tileX - the X index of the tile that is being updated.
tileY - the Y index of the tile that is being updated.
willBeWritable - If true, the tile will be grabbed for writing; otherwise it is being released.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WritableRaster

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Class WritableRaster

java.lang.Object
  |
  +--java.awt.image.Raster
        |
        +--java.awt.image.WritableRaster
public class WritableRaster
extends Raster

This class extends Raster to provide pixel writing capabilities. Refer to the class comment for Raster for descriptions of how a Raster stores pixels.

The constructors of this class are protected. To instantiate a WritableRaster, use one of the createWritableRaster factory methods in the Raster class.

Fields inherited from class java.awt.image.Raster
dataBuffer, height, minX, minY, numBands, numDataElements, parent, sampleModel, sampleModelTranslateX, sampleModelTranslateY, width
Constructor Summary
protected | WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin) Constructs a WritableRaster with the given SampleModel and DataBuffer.
protected | WritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, WritableRaster parent) Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent.
protected | WritableRaster(SampleModel sampleModel, Point origin) Constructs a WritableRaster with the given SampleModel.
Method Summary
WritableRaster | createWritableChild(int parentX, int parentY, int w, int h, int childMinX, int childMinY, int[] bandList) Returns a new WritableRaster which shares all or part of this WritableRaster's DataBuffer.
WritableRaster | createWritableTranslatedChild(int childMinX, int childMinY) Create a WritableRaster with the same size, SampleModel and DataBuffer as this one, but with a different location.
WritableRaster | getWritableParent() Returns the parent WritableRaster (if any) of this WritableRaster, or else null.
void | setDataElements(int x, int y, int w, int h, Object inData) Sets the data for a rectangle of pixels from a primitive array of type TransferType.
void | setDataElements(int x, int y, Object inData) Sets the data for a single pixel from a primitive array of type TransferType.
void | setDataElements(int x, int y, Raster inRaster) Sets the data for a rectangle of pixels from an input Raster.
void | setPixel(int x, int y, double[] dArray) Sets a pixel in the DataBuffer using a double array of samples for input.
void | setPixel(int x, int y, float[] fArray) Sets a pixel in the DataBuffer using a float array of samples for input.
void | setPixel(int x, int y, int[] iArray) Sets a pixel in the DataBuffer using an int array of samples for input.
void | setPixels(int x, int y, int w, int h, double[] dArray) Sets all samples for a rectangle of pixels from a double array containing one sample per array element.
void | setPixels(int x, int y, int w, int h, float[] fArray) Sets all samples for a rectangle of pixels from a float array containing one sample per array element.
void | setPixels(int x, int y, int w, int h, int[] iArray) Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
void | setRect(int dx, int dy, Raster srcRaster) Copies pixels from Raster srcRaster to this WritableRaster.
void | setRect(Raster srcRaster) Copies pixels from Raster srcRaster to this WritableRaster.
void | setSample(int x, int y, int b, double s) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input.
void | setSample(int x, int y, int b, float s) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input.
void | setSample(int x, int y, int b, int s) Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input.
void | setSamples(int x, int y, int w, int h, int b, double[] dArray) Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element.
void | setSamples(int x, int y, int w, int h, int b, float[] fArray) Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element.
void | setSamples(int x, int y, int w, int h, int b, int[] iArray) Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element.
Methods inherited from class java.awt.image.Raster
createBandedRaster, createBandedRaster, createBandedRaster, createChild, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createInterleavedRaster, createInterleavedRaster, createInterleavedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createRaster, createTranslatedChild, createWritableRaster, createWritableRaster, getBounds, getDataBuffer, getDataElements, getDataElements, getHeight, getMinX, getMinY, getNumBands, getNumDataElements, getParent, getPixel, getPixel, getPixel, getPixels, getPixels, getPixels, getSample, getSampleDouble, getSampleFloat, getSampleModel, getSampleModelTranslateX, getSampleModelTranslateY, getSamples, getSamples, getSamples, getTransferType, getWidth
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WritableRaster

protected WritableRaster(SampleModel sampleModel,
                         Point origin)
Constructs a WritableRaster with the given SampleModel. The WritableRaster's upper left corner is origin and it is the same size as the SampleModel. A DataBuffer large enough to describe the WritableRaster is automatically created.
Parameters:
sampleModel - The SampleModel that specifies the layout.
origin - The Point that specifies the origin.

WritableRaster

protected WritableRaster(SampleModel sampleModel,
                         DataBuffer dataBuffer,
                         Point origin)
Constructs a WritableRaster with the given SampleModel and DataBuffer. The WritableRaster's upper left corner is origin and it is the same size as the SampleModel. The DataBuffer is not initialized and must be compatible with SampleModel.
Parameters:
sampleModel - The SampleModel that specifies the layout.
dataBuffer - The DataBuffer that contains the image data.
origin - The Point that specifies the origin.

WritableRaster

protected WritableRaster(SampleModel sampleModel,
                         DataBuffer dataBuffer,
                         Rectangle aRegion,
                         Point sampleModelTranslate,
                         WritableRaster parent)
Constructs a WritableRaster with the given SampleModel, DataBuffer, and parent. aRegion specifies the bounding rectangle of the new Raster. When translated into the base Raster's coordinate system, aRegion must be contained by the base Raster. (The base Raster is the Raster's ancestor which has no parent.) sampleModelTranslate specifies the sampleModelTranslateX and sampleModelTranslateY values of the new Raster. Note that this constructor should generally be called by other constructors or create methods, it should not be used directly.
Parameters:
sampleModel - The SampleModel that specifies the layout.
dataBuffer - The DataBuffer that contains the image data.
aRegion - The Rectangle that specifies the image area.
sampleModelTranslate - The Point that specifies the translation from SampleModel to Raster coordinates.
parent - The parent (if any) of this raster.
Method Detail

getWritableParent

public WritableRaster getWritableParent()
Returns the parent WritableRaster (if any) of this WritableRaster, or else null.

createWritableTranslatedChild

public WritableRaster createWritableTranslatedChild(int childMinX,
                                                    int childMinY)
Create a WritableRaster with the same size, SampleModel and DataBuffer as this one, but with a different location. The new WritableRaster will possess a reference to the current WritableRaster, accessible through its getParent() and getWritableParent() methods.
Parameters:
childMinX - X coord of the upper left corner of the new Raster.
childMinY - Y coord of the upper left corner of the new Raster.

createWritableChild

public WritableRaster createWritableChild(int parentX,
                                          int parentY,
                                          int w,
                                          int h,
                                          int childMinX,
                                          int childMinY,
                                          int[] bandList)
Returns a new WritableRaster which shares all or part of this WritableRaster's DataBuffer. The new WritableRaster will possess a reference to the current WritableRaster, accessible through its getParent() and getWritableParent() methods.

The parentX, parentY, width and height parameters form a Rectangle in this WritableRaster's coordinate space, indicating the area of pixels to be shared. An error will be thrown if this Rectangle is not contained with the bounds of the current WritableRaster.

The new WritableRaster may additionally be translated to a different coordinate system for the plane than that used by the current WritableRaster. The childMinX and childMinY parameters give the new (x, y) coordinate of the upper-left pixel of the returned WritableRaster; the coordinate (childMinX, childMinY) in the new WritableRaster will map to the same pixel as the coordinate (parentX, parentY) in the current WritableRaster.

The new WritableRaster may be defined to contain only a subset of the bands of the current WritableRaster, possibly reordered, by means of the bandList parameter. If bandList is null, it is taken to include all of the bands of the current WritableRaster in their current order.

To create a new WritableRaster that contains a subregion of the current WritableRaster, but shares its coordinate system and bands, this method should be called with childMinX equal to parentX, childMinY equal to parentY, and bandList equal to null.

Parameters:
parentX - X coordinate of the upper left corner in this WritableRaster's coordinates.
parentY - Y coordinate of the upper left corner in this WritableRaster's coordinates.
width - Width of the region starting at (parentX, parentY).
height - Height of the region starting at (parentX, parentY).
childMinX - X coordinate of the upper left corner of the returned WritableRaster.
childMinY - Y coordinate of the upper left corner of the returned WritableRaster.
bandList - Array of band indices, or null to use all bands.
Throws:
RasterFormatException - if the subregion is outside of the raster bounds.

setDataElements

public void setDataElements(int x,
                            int y,
                            Object inData)
Sets the data for a single pixel from a primitive array of type TransferType. For image data supported by the Java 2D(tm) API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data in the array may be in a packed format, thus increasing efficiency for data transfers. There will be no explicit bounds checking on the parameters. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if inData is not large enough to hold the pixel data. A ClassCastException will be thrown if the input object is not null and references anything other than an array of TransferType.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
inData - An object reference to an array of type defined by getTransferType() and length getNumDataElements() containing the pixel data to place at x,y.
See Also:
SampleModel.setDataElements(int, int, Object, DataBuffer)

setDataElements

public void setDataElements(int x,
                            int y,
                            Raster inRaster)
Sets the data for a rectangle of pixels from an input Raster. The input Raster must be compatible with this WritableRaster in that they must have the same number of bands, corresponding bands must have the same number of bits per sample, the TransferTypes and NumDataElements must be the same, and the packing used by the getDataElements/setDataElements must be identical. There will be no explicit bounds checking on the parameters. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
inRaster - Raster containing data to place at x,y.

setDataElements

public void setDataElements(int x,
                            int y,
                            int w,
                            int h,
                            Object inData)
Sets the data for a rectangle of pixels from a primitive array of type TransferType. For image data supported by the Java 2D API, this will be one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Data in the array may be in a packed format, thus increasing efficiency for data transfers. There will be no explicit bounds checking on the parameters. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if inData is not large enough to hold the pixel data. A ClassCastException will be thrown if the input object is not null and references anything other than an array of TransferType.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
inData - An object reference to an array of type defined by getTransferType() and length w*h*getNumDataElements() containing the pixel data to place between x,y and x+w-1, y+h-1.
See Also:
SampleModel.setDataElements(int, int, int, int, Object, DataBuffer)

setRect

public void setRect(Raster srcRaster)
Copies pixels from Raster srcRaster to this WritableRaster. Each pixel in srcRaster is copied to the same x,y address in this raster, unless the address falls outside the bounds of this raster. srcRaster must have the same number of bands as this WritableRaster. The copy is a simple copy of source samples to the corresponding destination samples.

If all samples of both source and destination Rasters are of integral type and less than or equal to 32 bits in size, then calling this method is equivalent to executing the following code for all x,y addresses valid in both Rasters.

       Raster srcRaster;
       WritableRaster dstRaster;
       for (int b = 0; b
 Thus, if the source sample size is greater than the destination
 sample size for a particular band, the high order bits of the source
 sample are truncated.  If the source sample size is less than the
 destination size for a particular band, the high order bits of the
 destination are zero-extended or sign-extended depending on whether
 srcRaster's SampleModel treats the sample as a signed or unsigned
 quantity.

Parameters:
srcRaster - The  Raster from which to copy pixels.

setRect

public void setRect(int dx,
                    int dy,
                    Raster srcRaster)
Copies pixels from Raster srcRaster to this WritableRaster. For each (x, y) address in srcRaster, the corresponding pixel is copied to address (x+dx, y+dy) in this WritableRaster, unless (x+dx, y+dy) falls outside the bounds of this raster. srcRaster must have the same number of bands as this WritableRaster. The copy is a simple copy of source samples to the corresponding destination samples. For details, see setRect(Raster).
Parameters:
dx - The X translation factor from src space to dst space of the copy.
dy - The Y translation factor from src space to dst space of the copy.
srcRaster - The Raster from which to copy pixels.

setPixel

public void setPixel(int x,
                     int y,
                     int[] iArray)
Sets a pixel in the DataBuffer using an int array of samples for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
iArray - The input samples in a int array.

setPixel

public void setPixel(int x,
                     int y,
                     float[] fArray)
Sets a pixel in the DataBuffer using a float array of samples for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
fArray - The input samples in a float array.

setPixel

public void setPixel(int x,
                     int y,
                     double[] dArray)
Sets a pixel in the DataBuffer using a double array of samples for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
dArray - The input samples in a double array.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      int[] iArray)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
iArray - The input int pixel array.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      float[] fArray)
Sets all samples for a rectangle of pixels from a float array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
fArray - The input float pixel array.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      double[] dArray)
Sets all samples for a rectangle of pixels from a double array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
dArray - The input double pixel array.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      int s)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      float s)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a float.

setSample

public void setSample(int x,
                      int y,
                      int b,
                      double s)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the pixel location.
y - The Y coordinate of the pixel location.
b - The band to set.
s - The input sample as a double.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       int[] iArray)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to set.
iArray - The input int sample array.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       float[] fArray)
Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to set.
fArray - The input float sample array.

setSamples

public void setSamples(int x,
                       int y,
                       int w,
                       int h,
                       int b,
                       double[] dArray)
Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds.
Parameters:
x - The X coordinate of the upper left pixel location.
y - The Y coordinate of the upper left pixel location.
w - Width of the pixel rectangle.
h - Height of the pixel rectangle.
b - The band to set.
dArray - The input double sample array.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WritableRenderedImage

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.image
Interface WritableRenderedImage

All Superinterfaces:
RenderedImage
All Known Implementing Classes:
BufferedImage
public interface WritableRenderedImage
extends RenderedImage

WriteableRenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters and which can be modified and/or written over. The image data may be stored/produced as a single tile or a regular array of tiles.

WritableRenderedImage provides notification to other interested objects when a tile is checked out for writing (via the getWritableTile method) and when the last writer of a particular tile relinquishes its access (via a call to releaseWritableTile). Additionally, it allows any caller to determine whether any tiles are currently checked out (via hasTileWriters), and to obtain a list of such tiles (via getWritableTileIndices, in the form of a Vector of Point objects).

Objects wishing to be notified of changes in tile writability must implement the TileObserver interface, and are added by a call to addTileObserver. Multiple calls to addTileObserver for the same object will result in multiple notifications. An existing observer may reduce its notifications by calling removeTileObserver; if the observer had no notifications the operation is a no-op.

It is necessary for a WritableRenderedImage to ensure that notifications occur only when the first writer acquires a tile and the last writer releases it.

Method Summary
void | addTileObserver(TileObserver to) Adds an observer.
WritableRaster | getWritableTile(int tileX, int tileY) Checks out a tile for writing.
Point[] | getWritableTileIndices() Returns an array of Point objects indicating which tiles are checked out for writing.
boolean | hasTileWriters() Returns whether any tile is checked out for writing.
boolean | isTileWritable(int tileX, int tileY) Returns whether a tile is currently checked out for writing.
void | releaseWritableTile(int tileX, int tileY) Relinquishes the right to write to a tile.
void | removeTileObserver(TileObserver to) Removes an observer.
void | setData(Raster r) Sets a rect of the image to the contents of the Raster r, which is assumed to be in the same coordinate space as the WritableRenderedImage.
Methods inherited from interface java.awt.image.RenderedImage
copyData, getColorModel, getData, getData, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth

Method Detail

addTileObserver

public void addTileObserver(TileObserver to)
Adds an observer. If the observer is already present, it will receive multiple notifications.

removeTileObserver

public void removeTileObserver(TileObserver to)
Removes an observer. If the observer was not registered, nothing happens. If the observer was registered for multiple notifications, it will now be registered for one fewer.

getWritableTile

public WritableRaster getWritableTile(int tileX,
                                      int tileY)
Checks out a tile for writing. The WritableRenderedImage is responsible for notifying all of its TileObservers when a tile goes from having no writers to having one writer.
Parameters:
tileX - the X index of the tile.
tileY - the Y index of the tile.

releaseWritableTile

public void releaseWritableTile(int tileX,
                                int tileY)
Relinquishes the right to write to a tile. If the caller continues to write to the tile, the results are undefined. Calls to this method should only appear in matching pairs with calls to getWritableTile; any other use will lead to undefined results. The WritableRenderedImage is responsible for notifying all of its TileObservers when a tile goes from having one writer to having no writers.
Parameters:
tileX - the X index of the tile.
tileY - the Y index of the tile.

isTileWritable

public boolean isTileWritable(int tileX,
                              int tileY)
Returns whether a tile is currently checked out for writing.
Parameters:
tileX - the X index of the tile.
tileY - the Y index of the tile.

getWritableTileIndices

public Point[] getWritableTileIndices()
Returns an array of Point objects indicating which tiles are checked out for writing. Returns null if none are checked out.

hasTileWriters

public boolean hasTileWriters()
Returns whether any tile is checked out for writing. Semantically equivalent to (getWritableTileIndices() != null).

setData

public void setData(Raster r)
Sets a rect of the image to the contents of the Raster r, which is assumed to be in the same coordinate space as the WritableRenderedImage. The operation is clipped to the bounds of the WritableRenderedImage.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Insets

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Insets

java.lang.Object
  |
  +--java.awt.Insets
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
InsetsUIResource
public class Insets
extends Object
implements Cloneable, Serializable

An Insets object is a representation of the borders of a container. It specifies the space that a container must leave at each of its edges. The space can be a border, a blank space, or a title.

Since:
JDK1.0
See Also:
LayoutManager, Container, Serialized Form

Field Summary
int | bottom The inset from the bottom.
int | left The inset from the left.
int | right The inset from the right.
int | top The inset from the top.
Constructor Summary
Insets(int top, int left, int bottom, int right)
Creates and initializes a new Insets object with the specified top, left, bottom, and right insets.
Method Summary
Object | clone() Create a copy of this object.
boolean | equals(Object obj) Checks whether two insets objects are equal.
int | hashCode() Returns the hash code for this Insets.
String | toString() Returns a string representation of this Insets object.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

top

public int top
The inset from the top. This value is added to the Top of the rectangle to yield a new location for the Top.
See Also:
clone()

left

public int left
The inset from the left. This value is added to the Left of the rectangle to yield a new location for the Left edge.
See Also:
clone()

bottom

public int bottom
The inset from the bottom. This value is subtracted from the Bottom of the rectangle to yield a new location for the Bottom.
See Also:
clone()

right

public int right
The inset from the right. This value is subtracted from the Right of the rectangle to yield a new location for the Right edge.
See Also:
clone()
Constructor Detail

Insets

public Insets(int top,
              int left,
              int bottom,
              int right)
Creates and initializes a new Insets object with the specified top, left, bottom, and right insets.
Parameters:
top - the inset from the top.
left - the inset from the left.
bottom - the inset from the bottom.
right - the inset from the right.
Method Detail

equals

public boolean equals(Object obj)
Checks whether two insets objects are equal. Two instances of Insets are equal if the four integer values of the fields top, left, bottom, and right are all equal.
Overrides:
equals in class Object
Returns:
true if the two insets are equal; otherwise false.
Since:
JDK1.1

hashCode

public int hashCode()
Returns the hash code for this Insets.
Overrides:
hashCode in class Object
Returns:
a hash code for this Insets.

toString

public String toString()
Returns a string representation of this Insets object. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
toString in class Object
Returns:
a string representation of this Insets object.

clone

public Object clone()
Create a copy of this object.
Overrides:
clone in class Object
Returns:
a copy of this Insets object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItemSelectable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface ItemSelectable

All Known Subinterfaces:
ButtonModel
All Known Implementing Classes:
Checkbox, Choice, List, CheckboxMenuItem, AbstractButton, JComboBox
public interface ItemSelectable

The interface for objects which contain a set of items for which zero or more can be selected.

Method Summary
void | addItemListener(ItemListener l) Add a listener to recieve item events when the state of an item changes.
Object[] | getSelectedObjects() Returns the selected items or null if no items are selected.
void | removeItemListener(ItemListener l) Removes an item listener.

Method Detail

getSelectedObjects

public Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.

addItemListener

public void addItemListener(ItemListener l)
Add a listener to recieve item events when the state of an item changes. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the listener to recieve events
See Also:
ItemEvent

removeItemListener

public void removeItemListener(ItemListener l)
Removes an item listener. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the listener being removed
See Also:
ItemEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JobAttributes

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes

java.lang.Object
  |
  +--java.awt.JobAttributes
All Implemented Interfaces:
Cloneable
public final class JobAttributes
extends Object
implements Cloneable

A set of attributes which control a print job.

Instances of this class control the number of copies, default selection, destination, print dialog, file and printer names, page ranges, multiple document handling (including collation), and multi-page imposition (such as duplex) of every print job which uses the instance. Attribute names are compliant with the Internet Printing Protocol (IPP) 1.1 where possible. Attribute values are partially compliant where possible.

To use a method which takes an inner class type, pass a reference to one of the constant fields of the inner class. Client code cannot create new instances of the inner class types because none of those classes has a public constructor. For example, to set the print dialog type to the cross-platform, pure Java print dialog, use the following code:

 import java.awt.JobAttributes;

 public class PureJavaPrintDialogExample {
     public void setPureJavaPrintDialog(JobAttributes jobAttributes) {
         jobAttributes.setDialog(JobAttributes.DialogType.COMMON);
     }
 }

Every IPP attribute which supports an attributeName-default value has a corresponding setattributeNameToDefault method. Default value fields are not provided.

Inner Class Summary
static class | JobAttributes.DefaultSelectionType A type-safe enumeration of possible default selection states.
static class | JobAttributes.DestinationType A type-safe enumeration of possible job destinations.
static class | JobAttributes.DialogType A type-safe enumeration of possible dialogs to display to the user.
static class | JobAttributes.MultipleDocumentHandlingType A type-safe enumeration of possible multiple document handling states.
static class | JobAttributes.SidesType A type-safe enumeration of possible multi-page impositions.
Constructor Summary
JobAttributes()
Constructs a JobAttributes instance with default values for every attribute.
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.
JobAttributes(JobAttributes obj)
Constructs a JobAttributes instance which is a copy of the supplied JobAttributes.
Method Summary
Object | clone() Creates and returns a copy of this JobAttributes.
boolean | equals(Object obj) Determines whether two JobAttributes are equal to each other.
int | getCopies() Returns the number of copies the application should render for jobs using these attributes.
JobAttributes.DefaultSelectionType | getDefaultSelection() Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.
JobAttributes.DestinationType | getDestination() Specifies whether output will be to a printer or a file for jobs using these attributes.
JobAttributes.DialogType | getDialog() Returns whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.
String | getFileName() Specifies the file name for the output file for jobs using these attributes.
int | getFromPage() Returns, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed.
int | getMaxPage() Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes.
int | getMinPage() Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes.
JobAttributes.MultipleDocumentHandlingType | getMultipleDocumentHandling() Specifies the handling of multiple documents, including collation, for jobs using these attributes.
int[][] | getPageRanges() Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed.
String | getPrinter() Returns the destination printer for jobs using these attributes.
JobAttributes.SidesType | getSides() Returns how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.
int | getToPage() Returns, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed.
int | hashCode() Returns a hash code value for this JobAttributes.
void | set(JobAttributes obj) Sets all of the attributes of this JobAttributes to the same values as the attributes of obj.
void | setCopies(int copies) Specifies the number of copies the application should render for jobs using these attributes.
void | setCopiesToDefault() Sets the number of copies the application should render for jobs using these attributes to the default.
void | setDefaultSelection(JobAttributes.DefaultSelectionType defaultSelection) Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection.
void | setDestination(JobAttributes.DestinationType destination) Specifies whether output will be to a printer or a file for jobs using these attributes.
void | setDialog(JobAttributes.DialogType dialog) Specifies whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed.
void | setFileName(String fileName) Specifies the file name for the output file for jobs using these attributes.
void | setFromPage(int fromPage) Specifies, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed.
void | setMaxPage(int maxPage) Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes.
void | setMinPage(int minPage) Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes.
void | setMultipleDocumentHandling(JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling) Specifies the handling of multiple documents, including collation, for jobs using these attributes.
void | setMultipleDocumentHandlingToDefault() Sets the handling of multiple documents, including collation, for jobs using these attributes to the default.
void | setPageRanges(int[][] pageRanges) Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed.
void | setPrinter(String printer) Specifies the destination printer for jobs using these attributes.
void | setSides(JobAttributes.SidesType sides) Specifies how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes.
void | setSidesToDefault() Sets how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes to the default.
void | setToPage(int toPage) Specifies, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed.
String | toString() Returns a string representation of this JobAttributes.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

JobAttributes

public JobAttributes()
Constructs a JobAttributes instance with default values for every attribute.

JobAttributes

public JobAttributes(JobAttributes obj)
Constructs a JobAttributes instance which is a copy of the supplied JobAttributes.
Parameters:
obj - the JobAttributes to copy.

JobAttributes

public JobAttributes(int copies,
                     JobAttributes.DefaultSelectionType defaultSelection,
                     JobAttributes.DestinationType destination,
                     JobAttributes.DialogType dialog,
                     String fileName,
                     int maxPage,
                     int minPage,
                     JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling,
                     int[][] pageRanges,
                     String printer,
                     JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.
Parameters:
copies - an integer greater than 0.
defaultSelection - DefaultSelectionType.ALL, DefaultSelectionType.RANGE, or DefaultSelectionType.SELECTION.
destination - DesintationType.FILE or DesintationType.PRINTER.
dialog - DialogType.COMMON, DialogType.NATIVE, or DialogType.NONE.
fileName - the possibly null file name.
maxPage - an integer greater than zero and greater than or equal to minPage.
minPage - an integer greater than zero and less than or equal to maxPage.
multipleDocumentHandling - MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES or MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.
pageRanges - an array of integer arrays of 2 elements. An array is interpreted as a range spanning all pages including and between the specified pages. Ranges must be in ascending order and must not overlap. Specified page numbers cannot be less than minPage nor greater than maxPage. For example: (new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 }, new int[] { 15, 19 } }), specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19. Note that (new int[][] { new int[] { 1, 1 }, new int[] { 1, 2 } }), is an invalid set of page ranges because the two ranges overlap.
printer - the possibly null printer name.
sides - SidesType.ONE_SIDED, SidesType.TWO_SIDED_LONG_EDGE, or SidesType.TWO_SIDED_SHORT_EDGE.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.
Method Detail

clone

public Object clone()
Creates and returns a copy of this JobAttributes.
Overrides:
clone in class Object
Returns:
the newly created copy. It is safe to cast this Object into a JobAttributes.

set

public void set(JobAttributes obj)
Sets all of the attributes of this JobAttributes to the same values as the attributes of obj.
Parameters:
obj - the JobAttributes to copy.

getCopies

public int getCopies()
Returns the number of copies the application should render for jobs using these attributes. This attribute is updated to the value chosen by the user.
Returns:
an integer greater than 0.

setCopies

public void setCopies(int copies)
Specifies the number of copies the application should render for jobs using these attributes. Not specifying this attribute is equivalent to specifying 1.
Parameters:
copies - an integer greater than 0.
Throws:
IllegalArgumentException - if copies is less than or equal to 0.

setCopiesToDefault

public void setCopiesToDefault()
Sets the number of copies the application should render for jobs using these attributes to the default. The default number of copies is 1.

getDefaultSelection

public JobAttributes.DefaultSelectionType getDefaultSelection()
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection. This attribute is updated to the value chosen by the user.
Returns:
DefaultSelectionType.ALL, DefaultSelectionType.RANGE, or DefaultSelectionType.SELECTION.

setDefaultSelection

public void setDefaultSelection(JobAttributes.DefaultSelectionType defaultSelection)
Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges, or the current selection. Not specifying this attribute is equivalent to specifying DefaultSelectionType.ALL.
Parameters:
defaultSelection - DefaultSelectionType.ALL, DefaultSelectionType.RANGE, or DefaultSelectionType.SELECTION.
Throws:
IllegalArgumentException - if defaultSelection is null.

getDestination

public JobAttributes.DestinationType getDestination()
Specifies whether output will be to a printer or a file for jobs using these attributes. This attribute is updated to the value chosen by the user.
Returns:
DesintationType.FILE or DesintationType.PRINTER.

setDestination

public void setDestination(JobAttributes.DestinationType destination)
Specifies whether output will be to a printer or a file for jobs using these attributes. Not specifying this attribute is equivalent to specifying DesintationType.PRINTER.
Parameters:
destination - DesintationType.FILE or DesintationType.PRINTER.
Throws:
IllegalArgumentException - if destination is null.

getDialog

public JobAttributes.DialogType getDialog()
Returns whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed. DialogType.COMMON denotes a cross- platform, pure Java print dialog. DialogType.NATIVE denotes the platform's native print dialog. If a platform does not support a native print dialog, the pure Java print dialog is displayed instead. DialogType.NONE specifies no print dialog (i.e., background printing). This attribute cannot be modified by, and is not subject to any limitations of, the implementation or the target printer.
Returns:
DialogType.COMMON, DialogType.NATIVE, or DialogType.NONE.

setDialog

public void setDialog(JobAttributes.DialogType dialog)
Specifies whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed. DialogType.COMMON denotes a cross- platform, pure Java print dialog. DialogType.NATIVE denotes the platform's native print dialog. If a platform does not support a native print dialog, the pure Java print dialog is displayed instead. DialogType.NONE specifies no print dialog (i.e., background printing). Not specifying this attribute is equivalent to specifying DialogType.NATIVE.
Parameters:
dialog - DialogType.COMMON, DialogType.NATIVE, or DialogType.NONE.
Throws:
IllegalArgumentException - if dialog is null.

getFileName

public String getFileName()
Specifies the file name for the output file for jobs using these attributes. This attribute is updated to the value chosen by the user.
Returns:
the possibly null file name.

setFileName

public void setFileName(String fileName)
Specifies the file name for the output file for jobs using these attributes. Default is platform-dependent and implementation-defined.
Parameters:
fileName - the possibly null file name.

getFromPage

public int getFromPage()
Returns, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed. This attribute is updated to the value chosen by the user. An application should ignore this attribute on output, unless the return value of the getDefaultSelection method is DefaultSelectionType.RANGE. An application should honor the return value of getPageRanges over the return value of this method, if possible.
Returns:
an integer greater than zero and less than or equal to toPage and greater than or equal to minPage and less than or equal to maxPage.

setFromPage

public void setFromPage(int fromPage)
Specifies, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed. If this attribute is not specified, then the values from the pageRanges attribute are used. If pageRanges and either or both of fromPage and toPage are specified, pageRanges takes precedence. Specifying none of pageRanges, fromPage, or toPage is equivalent to calling setPageRanges(new int[][] { new int[] { minPage } });
Parameters:
fromPage - an integer greater than zero and less than or equal to toPage and greater than or equal to minPage and less than or equal to maxPage.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

getMaxPage

public int getMaxPage()
Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes. This attribute cannot be modified by, and is not subject to any limitations of, the implementation or the target printer.
Returns:
an integer greater than zero and greater than or equal to minPage.

setMaxPage

public void setMaxPage(int maxPage)
Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes. Not specifying this attribute is equivalent to specifying Integer.MAX_VALUE.
Parameters:
maxPage - an integer greater than zero and greater than or equal to minPage.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

getMinPage

public int getMinPage()
Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes. This attribute cannot be modified by, and is not subject to any limitations of, the implementation or the target printer.
Returns:
an integer greater than zero and less than or equal to maxPage.

setMinPage

public void setMinPage(int minPage)
Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes. Not specifying this attribute is equivalent to specifying 1.
Parameters:
minPage - an integer greater than zero and less than or equal to maxPage.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

getMultipleDocumentHandling

public JobAttributes.MultipleDocumentHandlingType getMultipleDocumentHandling()
Specifies the handling of multiple documents, including collation, for jobs using these attributes. This attribute is updated to the value chosen by the user.
Returns:
MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES or MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.

setMultipleDocumentHandling

public void setMultipleDocumentHandling(JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling)
Specifies the handling of multiple documents, including collation, for jobs using these attributes. Not specifying this attribute is equivalent to specifying MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.
Parameters:
multipleDocumentHandling - MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES or MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.
Throws:
IllegalArgumentException - if multipleDocumentHandling is null.

setMultipleDocumentHandlingToDefault

public void setMultipleDocumentHandlingToDefault()
Sets the handling of multiple documents, including collation, for jobs using these attributes to the default. The default handling is MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.

getPageRanges

public int[][] getPageRanges()
Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed. All range numbers are inclusive. This attribute is updated to the value chosen by the user. An application should ignore this attribute on output, unless the return value of the getDefaultSelection method is DefaultSelectionType.RANGE.
Returns:
an array of integer arrays of 2 elements. An array is interpreted as a range spanning all pages including and between the specified pages. Ranges must be in ascending order and must not overlap. Specified page numbers cannot be less than minPage nor greater than maxPage. For example: (new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 }, new int[] { 15, 19 } }), specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19.

setPageRanges

public void setPageRanges(int[][] pageRanges)
Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed. All range numbers are inclusive. If this attribute is not specified, then the values from the fromPage and toPages attributes are used. If pageRanges and either or both of fromPage and toPage are specified, pageRanges takes precedence. Specifying none of pageRanges, fromPage, or toPage is equivalent to calling setPageRanges(new int[][] { new int[] { minPage, minPage } });
Parameters:
pageRanges - an array of integer arrays of 2 elements. An array is interpreted as a range spanning all pages including and between the specified pages. Ranges must be in ascending order and must not overlap. Specified page numbers cannot be less than minPage nor greater than maxPage. For example: (new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 }, new int[] { 15, 19 } }), specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19. Note that (new int[][] { new int[] { 1, 1 }, new int[] { 1, 2 } }), is an invalid set of page ranges because the two ranges overlap.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

getPrinter

public String getPrinter()
Returns the destination printer for jobs using these attributes. This attribute is updated to the value chosen by the user.
Returns:
the possibly null printer name.

setPrinter

public void setPrinter(String printer)
Specifies the destination printer for jobs using these attributes. Default is platform-dependent and implementation-defined.
Parameters:
printer - the possibly null printer name.

getSides

public JobAttributes.SidesType getSides()
Returns how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes. SidesType.ONE_SIDED imposes each consecutive page upon the same side of consecutive media sheets. This imposition is sometimes called simplex. SidesType.TWO_SIDED_LONG_EDGE imposes each consecutive pair of pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge. This imposition is sometimes called duplex. SidesType.TWO_SIDED_SHORT_EDGE imposes each consecutive pair of pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge. This imposition is sometimes called tumble. This attribute is updated to the value chosen by the user.
Returns:
SidesType.ONE_SIDED, SidesType.TWO_SIDED_LONG_EDGE, or SidesType.TWO_SIDED_SHORT_EDGE.

setSides

public void setSides(JobAttributes.SidesType sides)
Specifies how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes. SidesType.ONE_SIDED imposes each consecutive page upon the same side of consecutive media sheets. This imposition is sometimes called simplex. SidesType.TWO_SIDED_LONG_EDGE imposes each consecutive pair of pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge. This imposition is sometimes called duplex. SidesType.TWO_SIDED_SHORT_EDGE imposes each consecutive pair of pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge. This imposition is sometimes called tumble. Not specifying this attribute is equivalent to specifying SidesType.ONE_SIDED.
Parameters:
sides - SidesType.ONE_SIDED, SidesType.TWO_SIDED_LONG_EDGE, or SidesType.TWO_SIDED_SHORT_EDGE.
Throws:
IllegalArgumentException - if sides is null.

setSidesToDefault

public void setSidesToDefault()
Sets how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes to the default. The default imposition is SidesType.ONE_SIDED.

getToPage

public int getToPage()
Returns, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed. This attribute is updated to the value chosen by the user. An application should ignore this attribute on output, unless the return value of the getDefaultSelection method is DefaultSelectionType.RANGE. An application should honor the return value of getPageRanges over the return value of this method, if possible.
Returns:
an integer greater than zero and greater than or equal to toPage and greater than or equal to minPage and less than or equal to maxPage.

setToPage

public void setToPage(int toPage)
Specifies, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed. If this attribute is not specified, then the values from the pageRanges attribute are used. If pageRanges and either or both of fromPage and toPage are specified, pageRanges takes precedence. Specifying none of pageRanges, fromPage, or toPage is equivalent to calling setPageRanges(new int[][] { new int[] { minPage } });
Parameters:
toPage - an integer greater than zero and greater than or equal to fromPage and greater than or equal to minPage and less than or equal to maxPage.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

equals

public boolean equals(Object obj)
Determines whether two JobAttributes are equal to each other.

Two JobAttributes are equal if and only if each of their attributes are equal. Attributes of enumeration type are equal if and only if the fields refer to the same unique enumeration object. A set of page ranges is equal if and only if the sets are of equal length, each range enumerates the same pages, and the ranges are in the same order.

Overrides:
equals in class Object
Parameters:
obj - the object whose equality will be checked.
Returns:
whether obj is equal to this JobAttribute according to the above criteria.

hashCode

public int hashCode()
Returns a hash code value for this JobAttributes.
Overrides:
hashCode in class Object
Returns:
the hash code.

toString

public String toString()
Returns a string representation of this JobAttributes.
Overrides:
toString in class Object
Returns:
the string representation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Key

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class RenderingHints.Key

java.lang.Object
  |
  +--java.awt.RenderingHints.Key
Enclosing class:
RenderingHints
public abstract static class RenderingHints.Key
extends Object

Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines. Instances of this class are immutable and unique which means that tests for matches can be made using the == operator instead of the more expensive equals() method.

Constructor Summary
protected RenderingHints.Key(int privatekey)
Construct a key using the indicated private key.
Method Summary
 boolean equals(Object o)
The equals method for all Key objects will return the same result as the equality operator '=='.
 int hashCode()
The hash code for all Key objects will be the same as the system identity code of the object as defined by the System.identityHashCode() method.
protected  int intKey()
Returns the private integer key that the subclass instantiated this Key with.
abstract  boolean isCompatibleValue(Object val)
Returns true if the specified object is a valid value for this Key.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RenderingHints.Key

protected RenderingHints.Key(int privatekey)
Construct a key using the indicated private key. Each subclass of Key maintains its own unique domain of integer keys. No two objects with the same integer key and of the same specific subclass can be constructed. An exception will be thrown if an attempt is made to construct another object of a given class with the same integer key as a pre-existing instance of that subclass of Key.
Method Detail

isCompatibleValue

public abstract boolean isCompatibleValue(Object val)
Returns true if the specified object is a valid value for this Key.

intKey

protected final int intKey()
Returns the private integer key that the subclass instantiated this Key with.

hashCode

public final int hashCode()
The hash code for all Key objects will be the same as the system identity code of the object as defined by the System.identityHashCode() method.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public final boolean equals(Object o)
The equals method for all Key objects will return the same result as the equality operator '=='.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Label

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Label

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Label
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class Label
extends Component
implements Accessible

A Label object is a component for placing text in a container. A label displays a single line of read-only text. The text can be changed by the application, but a user cannot edit it directly.

For example, the code . . .

 setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
 add(new Label("Hi There!"));
 add(new Label("Another Label"));

produces the following label:

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class Label.AccessibleAWTLabel
This class implements accessibility support for the Label class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | CENTER Indicates that the label should be centered.
static int | LEFT Indicates that the label should be left justified.
static int | RIGHT Indicates that the label should be right justified.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Label()
Constructs an empty label.
Label(String text)
Constructs a new label with the specified string of text, left justified.
Label(String text, int alignment)
Constructs a new label that presents the specified string of text with the specified alignment.
Method Summary
void | addNotify() Creates the peer for this label.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Label.
int | getAlignment() Gets the current alignment of this label.
String | getText() Gets the text of this label.
protected String | paramString() Returns the parameter string representing the state of this label.
void | setAlignment(int alignment) Sets the alignment for this label to the specified alignment.
void | setText(String text) Sets the text for this label to the specified text.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LEFT

public static final int LEFT
Indicates that the label should be left justified.

CENTER

public static final int CENTER
Indicates that the label should be centered.

RIGHT

public static final int RIGHT
Indicates that the label should be right justified.
Since:
JDK1.0t.
Constructor Detail

Label

public Label()
Constructs an empty label. The text of the label is the empty string "".

Label

public Label(String text)
Constructs a new label with the specified string of text, left justified.
Parameters:
text - the string that the label presents. A null value will be accepted without causing a NullPointerException to be thrown.

Label

public Label(String text,
             int alignment)
Constructs a new label that presents the specified string of text with the specified alignment. Possible values for alignment are Label.LEFT, Label.RIGHT, and Label.CENTER.
Parameters:
text - the string that the label presents. A null value will be accepted without causing a NullPointerException to be thrown.
alignment - the alignment value.
Method Detail

addNotify

public void addNotify()
Creates the peer for this label. The peer allows us to modify the appearance of the label without changing its functionality.
Overrides:
addNotify in class Component
Following copied from class: java.awt.Component
See Also:
Component.isDisplayable(), Component.removeNotify()

getAlignment

public int getAlignment()
Gets the current alignment of this label. Possible values are Label.LEFT, Label.RIGHT, and Label.CENTER.
See Also:
setAlignment(int)

setAlignment

public void setAlignment(int alignment)
Sets the alignment for this label to the specified alignment. Possible values are Label.LEFT, Label.RIGHT, and Label.CENTER.
Parameters:
alignment - the alignment to be set.
Throws:
IllegalArgumentException - if an improper value for alignment is given.
See Also:
getAlignment()

getText

public String getText()
Gets the text of this label.
Returns:
the text of this label, or null if the text has been set to null.
See Also:
setText(java.lang.String)

setText

public void setText(String text)
Sets the text for this label to the specified text.
Parameters:
text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "".
See Also:
getText()

paramString

protected String paramString()
Returns the parameter string representing the state of this label. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this label.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Label. For labels, the AccessibleContext takes the form of an AccessibleAWTLabel. A new AccessibleAWTLabel instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTLabel that serves as the AccessibleContext of this Label
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LayoutManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface LayoutManager

All Known Subinterfaces:
LayoutManager2
All Known Implementing Classes:
GridLayout, FlowLayout, ViewportLayout, ScrollPaneLayout, BasicOptionPaneUI.ButtonAreaLayout, BasicTabbedPaneUI.TabbedPaneLayout, BasicInternalFrameTitlePane.TitlePaneLayout, BasicScrollBarUI, BasicInternalFrameUI.InternalFrameLayout, BasicComboBoxUI.ComboBoxLayoutManager, BasicSplitPaneDivider.DividerLayout
public interface LayoutManager

Defines the interface for classes that know how to layout Containers.

See Also:
Container

Method Summary
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
void | layoutContainer(Container parent) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.

Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component with the specified name to the layout.
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Parameters:
parent - the component to be laid out
See Also:
minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(Container parent)
Lays out the container in the specified panel.
Parameters:
parent - the component which needs to be laid out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LayoutManager2

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface LayoutManager2

All Superinterfaces:
LayoutManager
All Known Implementing Classes:
CardLayout, BorderLayout, GridBagLayout, BoxLayout, OverlayLayout, JRootPane.RootLayout, BasicSplitPaneUI.BasicHorizontalLayoutManager
public interface LayoutManager2
extends LayoutManager

Defines an interface for classes that know how to layout Containers based on a layout constraints object. This interface extends the LayoutManager interface to deal with layouts explicitly in terms of constraint objects that specify how and where components should be added to the layout.

This minimal extension to LayoutManager is intended for tool providers who wish to the creation of constraint-based layouts. It does not yet provide full, general support for custom constraint-based layout managers.

See Also:
LayoutManager, Container

Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
float | getLayoutAlignmentX(Container target) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container target) Returns the alignment along the y axis.
void | invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Dimension | maximumLayoutSize(Container target) Returns the maximum size of this component.
Methods inherited from interface java.awt.LayoutManager
addLayoutComponent, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent

Method Detail

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to the layout, using the specified constraint object.
Parameters:
comp - the component to be added
constraints - where/how the component is added to the layout.

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum size of this component.
See Also:
Component.getMinimumSize(), Component.getPreferredSize(), LayoutManager

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

invalidateLayout

public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


List

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class List

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.List
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable
public class List
extends Component
implements ItemSelectable, Accessible

The List component presents the user with a scrolling list of text items. The list can be set up so that the user can choose either one item or multiple items.

For example, the code . . .

 List lst = new List(4, false);
 lst.add("Mercury");
 lst.add("Venus");
 lst.add("Earth");
 lst.add("JavaSoft");
 lst.add("Mars");
 lst.add("Jupiter");
 lst.add("Saturn");
 lst.add("Uranus");
 lst.add("Neptune");
 lst.add("Pluto");
 cnt.add(lst);

where cnt is a container, produces the following scrolling list:

Clicking on an item that isn't selected selects it. Clicking on an item that is already selected deselects it. In the preceding example, only one item from the scrolling list can be selected at a time, since the second argument when creating the new scrolling list is false. Selecting an item causes any other selected item to be automatically deselected.

Beginning with Java 1.1, the Abstract Window Toolkit sends the List object all mouse, keyboard, and focus events that occur over it. (The old AWT event model is being maintained only for backwards compatibility, and its use is discouraged.)

When an item is selected or deselected, AWT sends an instance of ItemEvent to the list. When the user double-clicks on an item in a scrolling list, AWT sends an instance of ActionEvent to the list following the item event. AWT also generates an action event when the user presses the return key while an item in the list is selected.

If an application wants to perform some action based on an item in this list being selected or activated, it should implement ItemListener or ActionListener as appropriate and register the new listener to receive events from this list.

For multiple-selection scrolling lists, it is considered a better user interface to use an external gesture (such as clicking on a button) to trigger the action.

Since:
JDK1.0
See Also:
ItemEvent, ItemListener, ActionEvent, ActionListener, Serialized Form

Inner Class Summary
protected  class List.AccessibleAWTList
This class implements accessibility support for the List class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
List()
Creates a new scrolling list.
List(int rows)
Creates a new scrolling list initialized with the specified number of visible lines.
List(int rows, boolean multipleMode)
Creates a new scrolling list initialized to display the specified number of rows.
Method Summary
 void add(String item)
Adds the specified item to the end of scrolling list.
 void add(String item, int index)
Adds the specified item to the the scrolling list at the position indicated by the index.
 void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this list.
 void addItem(String item)
Deprecated. replaced by add(String).
 void addItem(String item, int index)
Deprecated. replaced by add(String, int).
 void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this list.
 void addNotify()
Creates the peer for the list.
 boolean allowsMultipleSelections()
Deprecated. As of JDK version 1.1, replaced by isMultipleMode().
 void clear()
Deprecated. As of JDK version 1.1, replaced by removeAll().
 int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().
 void delItem(int position)
Deprecated. replaced by remove(String) and remove(int).
 void delItems(int start, int end)
Deprecated. As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.
 void deselect(int index)
Deselects the item at the specified index.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this List.
 String getItem(int index)
Gets the item associated with the specified index.
 int getItemCount()
Gets the number of items in the list.
 String[] getItems()
Gets the items in the list.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the listenerType argument.
 Dimension getMinimumSize()
Determines the minimum size of this scrolling list.
 Dimension getMinimumSize(int rows)
Gets the minumum dimensions for a list with the specified number of rows.
 Dimension getPreferredSize()
Gets the preferred size of this scrolling list.
 Dimension getPreferredSize(int rows)
Gets the preferred dimensions for a list with the specified number of rows.
 int getRows()
Get the number of visible lines in this list.
 int getSelectedIndex()
Gets the index of the selected item on the list,
 int[] getSelectedIndexes()
Gets the selected indexes on the list.
 String getSelectedItem()
Get the selected item on this scrolling list.
 String[] getSelectedItems()
Get the selected items on this scrolling list.
 Object[] getSelectedObjects()
Returns the selected items on the list in an array of Objects.
 int getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.
 boolean isIndexSelected(int index)
Determines if the specified item in this scrolling list is selected.
 boolean isMultipleMode()
Determines whether this list allows multiple selections.
 boolean isSelected(int index)
Deprecated. As of JDK version 1.1, replaced by isIndexSelected(int).
 void makeVisible(int index)
Makes the item at the specified index visible.
 Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension minimumSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
protected  String paramString()
Returns the parameter string representing the state of this scrolling list.
 Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension preferredSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
protected  void processActionEvent(ActionEvent e)
Processes action events occurring on this component by dispatching them to any registered ActionListener objects.
protected  void processEvent(AWTEvent e)
Processes events on this scrolling list.
protected  void processItemEvent(ItemEvent e)
Processes item events occurring on this list by dispatching them to any registered ItemListener objects.
 void remove(int position)
Remove the item at the specified position from this scrolling list.
 void remove(String item)
Removes the first occurrence of an item from the list.
 void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this list.
 void removeAll()
Removes all items from this list.
 void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this list.
 void removeNotify()
Removes the peer for this list.
 void replaceItem(String newValue, int index)
Replaces the item at the specified index in the scrolling list with the new string.
 void select(int index)
Selects the item at the specified index in the scrolling list.
 void setMultipleMode(boolean b)
Sets the flag that determines whether this list allows multiple selections.
 void setMultipleSelections(boolean b)
Deprecated. As of JDK version 1.1, replaced by setMultipleMode(boolean).
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

List

public List()
Creates a new scrolling list. By default, there are four visible lines and multiple selections are not allowed.

List

public List(int rows)
Creates a new scrolling list initialized with the specified number of visible lines. By default, multiple selections are not allowed.
Parameters:
rows - the number of items to show.
Since:
JDK1.1

List

public List(int rows,
            boolean multipleMode)
Creates a new scrolling list initialized to display the specified number of rows. If the value of multipleMode is true, then the user can select multiple items from the list. If it is false, only one item at a time can be selected.
Parameters:
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be selected at a time.
Method Detail

addNotify

public void addNotify()
Creates the peer for the list. The peer allows us to modify the list's appearance without changing its functionality.
Overrides:
addNotify in class Component
Following copied from class: java.awt.Component
See Also:
Component.isDisplayable(), Component.removeNotify()

removeNotify

public void removeNotify()
Removes the peer for this list. The peer allows us to modify the list's appearance without changing its functionality.
Overrides:
removeNotify in class Component
Following copied from class: java.awt.Component
See Also:
Component.isDisplayable(), Component.addNotify()

getItemCount

public int getItemCount()
Gets the number of items in the list.
Returns:
the number of items in the list.
Since:
JDK1.1
See Also:
getItem(int)

countItems

public int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().

getItem

public String getItem(int index)
Gets the item associated with the specified index.
Parameters:
index - the position of the item.
Returns:
an item that is associated with the specified index.
See Also:
getItemCount()

getItems

public String[] getItems()
Gets the items in the list.
Returns:
a string array containing items of the list.
Since:
JDK1.1
See Also:
select(int), deselect(int), isIndexSelected(int)

add

public void add(String item)
Adds the specified item to the end of scrolling list.
Parameters:
item - the item to be added.
Since:
JDK1.1

addItem

public void addItem(String item)
Deprecated. replaced by add(String).

add

public void add(String item,
                int index)
Adds the specified item to the the scrolling list at the position indicated by the index. The index is zero-based. If the value of the index is less than zero, or if the value of the index is greater than or equal to the number of items in the list, then the item is added to the end of the list.
Parameters:
item - the item to be added. If this parameter is null then the item is treated as an empty string, "".
index - the position at which to add the item.
Since:
JDK1.1

addItem

public void addItem(String item,
                    int index)
Deprecated. replaced by add(String, int).

replaceItem

public void replaceItem(String newValue,
                        int index)
Replaces the item at the specified index in the scrolling list with the new string.
Parameters:
newValue - a new string to replace an existing item.
index - the position of the item to replace.

removeAll

public void removeAll()
Removes all items from this list.
Since:
JDK1.1
See Also:
remove(java.lang.String), delItems(int, int)

clear

public void clear()
Deprecated. As of JDK version 1.1, replaced by removeAll().

remove

public void remove(String item)
Removes the first occurrence of an item from the list.
Parameters:
item - the item to remove from the list.
Throws:
IllegalArgumentException - if the item doesn't exist in the list.
Since:
JDK1.1

remove

public void remove(int position)
Remove the item at the specified position from this scrolling list.
Parameters:
position - the index of the item to delete.
Throws:
ArrayIndexOutOfBoundsException - if the position is less than 0 or greater than getItemCount()-1
Since:
JDK1.1
See Also:
add(String, int)

delItem

public void delItem(int position)
Deprecated. replaced by remove(String) and remove(int).

getSelectedIndex

public int getSelectedIndex()
Gets the index of the selected item on the list,
Returns:
the index of the selected item, or -1 if no item is selected, or if more that one item is selected.
See Also:
select(int), deselect(int), isIndexSelected(int)

getSelectedIndexes

public int[] getSelectedIndexes()
Gets the selected indexes on the list.
Returns:
an array of the selected indexes of this scrolling list. If no items are selected, a zero-length array is returned.
See Also:
select(int), deselect(int), isIndexSelected(int)

getSelectedItem

public String getSelectedItem()
Get the selected item on this scrolling list.
Returns:
the selected item on the list, or null if no item is selected.
See Also:
select(int), deselect(int), isIndexSelected(int)

getSelectedItems

public String[] getSelectedItems()
Get the selected items on this scrolling list.
Returns:
an array of the selected items on this scrolling list.
See Also:
select(int), deselect(int), isIndexSelected(int)

getSelectedObjects

public Object[] getSelectedObjects()
Returns the selected items on the list in an array of Objects.
Specified by:
getSelectedObjects in interface ItemSelectable
See Also:
ItemSelectable

select

public void select(int index)
Selects the item at the specified index in the scrolling list.
Parameters:
index - the position of the item to select.
See Also:
getSelectedItem(), deselect(int), isIndexSelected(int)

deselect

public void deselect(int index)
Deselects the item at the specified index.

If the item at the specified index is not selected, or if the index is out of range, then the operation is ignored.

Parameters:
index - the position of the item to deselect.
See Also:
select(int), getSelectedItem(), isIndexSelected(int)

isIndexSelected

public boolean isIndexSelected(int index)
Determines if the specified item in this scrolling list is selected.
Parameters:
index - the item to be checked.
Returns:
true if the specified item has been selected; false otherwise.
Since:
JDK1.1
See Also:
select(int), deselect(int)

isSelected

public boolean isSelected(int index)
Deprecated. As of JDK version 1.1, replaced by isIndexSelected(int).

getRows

public int getRows()
Get the number of visible lines in this list.
Returns:
the number of visible lines in this scrolling list.

isMultipleMode

public boolean isMultipleMode()
Determines whether this list allows multiple selections.
Returns:
true if this list allows multiple selections; otherwise, false.
Since:
JDK1.1
See Also:
setMultipleMode(boolean)

allowsMultipleSelections

public boolean allowsMultipleSelections()
Deprecated. As of JDK version 1.1, replaced by isMultipleMode().

setMultipleMode

public void setMultipleMode(boolean b)
Sets the flag that determines whether this list allows multiple selections.
Parameters:
b - if true then multiple selections are allowed; otherwise, only one item from the list can be selected at once.
Since:
JDK1.1
See Also:
isMultipleMode()

setMultipleSelections

public void setMultipleSelections(boolean b)
Deprecated. As of JDK version 1.1, replaced by setMultipleMode(boolean).

getVisibleIndex

public int getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.
Returns:
the index of the item that was last made visible.
See Also:
makeVisible(int)

makeVisible

public void makeVisible(int index)
Makes the item at the specified index visible.
Parameters:
index - the position of the item.
See Also:
getVisibleIndex()

getPreferredSize

public Dimension getPreferredSize(int rows)
Gets the preferred dimensions for a list with the specified number of rows.
Parameters:
rows - number of rows in the list.
Returns:
the preferred dimensions for displaying this scrolling list given that the specified number of rows must be visible.
Since:
JDK1.1
See Also:
Component.getPreferredSize()

preferredSize

public Dimension preferredSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this scrolling list.
Overrides:
getPreferredSize in class Component
Returns:
the preferred dimensions for displaying this scrolling list.
Since:
JDK1.1
See Also:
Component.getPreferredSize()

preferredSize

public Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize in class Component

getMinimumSize

public Dimension getMinimumSize(int rows)
Gets the minumum dimensions for a list with the specified number of rows.
Parameters:
rows - number of rows in the list.
Returns:
the minimum dimensions for displaying this scrolling list given that the specified number of rows must be visible.
Since:
JDK1.1
See Also:
Component.getMinimumSize()

minimumSize

public Dimension minimumSize(int rows)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).

getMinimumSize

public Dimension getMinimumSize()
Determines the minimum size of this scrolling list.
Overrides:
getMinimumSize in class Component
Returns:
the minimum dimensions needed to display this scrolling list.
Since:
JDK1.1
See Also:
Component.getMinimumSize()

minimumSize

public Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize in class Component

addItemListener

public void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this list. If l is null, no exception is thrown and no action is performed.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the item listener.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, removeItemListener(java.awt.event.ItemListener)

removeItemListener

public void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this list. If l is null, no exception is thrown and no action is performed.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the item listener.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener)

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this list. Action events occur when a user double-clicks on a list item. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, removeActionListener(java.awt.event.ActionListener)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this list. Action events occur when a user double-clicks on a list item. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, addActionListener(java.awt.event.ActionListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ItemListener(s) for the given List l, one would write:
 ItemListener[] ils = (ItemListener[])(l.getListeners(ItemListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this list
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this scrolling list. If an event is an instance of ItemEvent, it invokes the processItemEvent method. Else, if the event is an instance of ActionEvent, it invokes processActionEvent. If the event is not an item event or an action event, it invokes processEvent on the superclass.
Overrides:
processEvent in class Component
Parameters:
e - the event.
Since:
JDK1.1
See Also:
ActionEvent, ItemEvent, processActionEvent(java.awt.event.ActionEvent), processItemEvent(java.awt.event.ItemEvent)

processItemEvent

protected void processItemEvent(ItemEvent e)
Processes item events occurring on this list by dispatching them to any registered ItemListener objects.

This method is not called unless item events are enabled for this component. Item events are enabled when one of the following occurs:

  • An ItemListener object is registered via addItemListener.
  • Item events are enabled via enableEvents.
Parameters:
e - the item event.
Since:
JDK1.1
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener), Component.enableEvents(long)

processActionEvent

protected void processActionEvent(ActionEvent e)
Processes action events occurring on this component by dispatching them to any registered ActionListener objects.

This method is not called unless action events are enabled for this component. Action events are enabled when one of the following occurs:

  • An ActionListener object is registered via addActionListener.
  • Action events are enabled via enableEvents.
Parameters:
e - the action event.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, addActionListener(java.awt.event.ActionListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this scrolling list. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this scrolling list.

delItems

public void delItems(int start,
                     int end)
Deprecated. As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this List. For lists, the AccessibleContext takes the form of an AccessibleAWTList. A new AccessibleAWTList instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTList that serves as the AccessibleContext of this List
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MediaTracker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MediaTracker

java.lang.Object
  |
  +--java.awt.MediaTracker
All Implemented Interfaces:
Serializable
public class MediaTracker
extends Object
implements Serializable

The MediaTracker class is a utility class to track the status of a number of media objects. Media objects could include audio clips as well as images, though currently only images are supported.

To use a media tracker, create an instance of MediaTracker and call its addImage method for each image to be tracked. In addition, each image can be assigned a unique identifier. This identifier controls the priority order in which the images are fetched. It can also be used to identify unique subsets of the images that can be waited on independently. Images with a lower ID are loaded in preference to those with a higher ID number.

Here is an example:

 import java.applet.Applet;
 import java.awt.Color;
 import java.awt.Image;
 import java.awt.Graphics;
 import java.awt.MediaTracker;

 public class ImageBlaster extends Applet implements Runnable {
    MediaTracker tracker;
    Image bg;
    Image anim[] = new Image[5];
    int index;
    Thread animator;

    // Get the images for the background (id == 0)
    // and the animation frames (id == 1)
      // and add them to the MediaTracker
    public void init() {
        tracker = new MediaTracker(this);
        bg = getImage(getDocumentBase(),
                  "images/background.gif");
        tracker.addImage(bg, 0);
        for (int i = 0; i <5; i++)="i++)" {="{" anim[i]="getImage(getDocumentBase()," "images/anim"=""images/anim"" +i+".gif");="+i+".gif");" tracker.addImage(anim[i],="tracker.addImage(anim[i]," 1);="1);" }="}" }="}" //="//" Start="Start" the="the" animation="animation" thread.="thread." public="public" void="void" start()="start()" {="{" animator="new" Thread(this);="Thread(this);" animator.start();="animator.start();" }="}" //="//" Stop="Stop" the="the" animation="animation" thread.="thread." public="public" void="void" stop()="stop()" {="{" animator="null;" }="}" //="//" Run="Run" the="the" animation="animation" thread.="thread." //="//" First="First" wait="wait" for="for" the="the" background="background" image="image" to="to" fully="fully" load="load" //="//" and="and" paint.="paint." Then="Then" wait="wait" for="for" all="all" of="of" the="the" animation="animation" //="//" frames="frames" to="to" finish="finish" loading.="loading." Finally,="Finally," loop="loop" and="and" //="//" increment="increment" the="the" animation="animation" frame="frame" index.="index." public="public" void="void" run()="run()" {="{" try="try" {="{" tracker.waitForID(0);="tracker.waitForID(0);" tracker.waitForID(1);="tracker.waitForID(1);" }="}" catch="catch" (InterruptedException="(InterruptedException" e)="e)" {="{" return;="return;" }="}" Thread="Thread" me="Thread.currentThread();" while="while" (animator="=" me)="me)" {="{" try="try" {="{" Thread.sleep(100);="Thread.sleep(100);" }="}" catch="catch" (InterruptedException="(InterruptedException" e)="e)" {="{" break;="break;" }="}" synchronized="synchronized" (this)="(this)" {="{" index++;="index++;" if="if" (index="(index">= anim.length) {
            index = 0;
            }
        }
        repaint();
        }
    }

    // The background image fills the frame so we
    // don't need to clear the applet on repaints.
      // Just call the paint method.
    public void update(Graphics g) {
        paint(g);
    }

    // Paint a large red rectangle if there are any errors
    // loading the images.  Otherwise always paint the
    // background so that it appears incrementally as it
      // is loading.  Finally, only paint the current animation
    // frame if all of the frames (id == 1) are done loading,
    // so that we don't get partial animations.
    public void paint(Graphics g) {
        if ((tracker.statusAll(false) & MediaTracker.ERRORED) != 0) {
        g.setColor(Color.red);
        g.fillRect(0, 0, size().width, size().height);
        return;
        }
        g.drawImage(bg, 0, 0, this);
        if (tracker.statusID(1, false) == MediaTracker.COMPLETE) {
        g.drawImage(anim[index], 10, 10, this);
        }
    }
 }

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static int | ABORTED Flag indicating that the downloading of some media was aborted.
static int | COMPLETE Flag indicating that the downloading of media was completed successfully.
static int | ERRORED Flag indicating that the downloading of some media encountered an error.
static int | LOADING Flag indicating some media is currently being loaded.
Constructor Summary
MediaTracker(Component comp)
Creates a media tracker to track images for a given component.
Method Summary
void | addImage(Image image, int id) Adds an image to the list of images being tracked by this media tracker.
void | addImage(Image image, int id, int w, int h) Adds a scaled image to the list of images being tracked by this media tracker.
boolean | checkAll() Checks to see if all images being tracked by this media tracker have finished loading.
boolean | checkAll(boolean load) Checks to see if all images being tracked by this media tracker have finished loading.
boolean | checkID(int id) Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
boolean | checkID(int id, boolean load) Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
Object[] | getErrorsAny() Returns a list of all media that have encountered an error.
Object[] | getErrorsID(int id) Returns a list of media with the specified ID that have encountered an error.
boolean | isErrorAny() Checks the error status of all of the images.
boolean | isErrorID(int id) Checks the error status of all of the images tracked by this media tracker with the specified identifier.
void | removeImage(Image image) Remove the specified image from this media tracker.
void | removeImage(Image image, int id) Remove the specified image from the specified tracking ID of this media tracker.
void | removeImage(Image image, int id, int width, int height) Remove the specified image with the specified width, height, and ID from this media tracker.
int | statusAll(boolean load) Calculates and returns the bitwise inclusive OR of the status of all media that are tracked by this media tracker.
int | statusID(int id, boolean load) Calculates and returns the bitwise inclusive OR of the status of all media with the specified identifier that are tracked by this media tracker.
void | waitForAll() Starts loading all images tracked by this media tracker.
boolean | waitForAll(long ms) Starts loading all images tracked by this media tracker.
void | waitForID(int id) Starts loading all images tracked by this media tracker with the specified identifier.
boolean | waitForID(int id, long ms) Starts loading all images tracked by this media tracker with the specified identifier.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LOADING

public static final int LOADING
Flag indicating some media is currently being loaded.
See Also:
statusAll(boolean), statusID(int, boolean)

ABORTED

public static final int ABORTED
Flag indicating that the downloading of some media was aborted.
See Also:
statusAll(boolean), statusID(int, boolean)

ERRORED

public static final int ERRORED
Flag indicating that the downloading of some media encountered an error.
See Also:
statusAll(boolean), statusID(int, boolean)

COMPLETE

public static final int COMPLETE
Flag indicating that the downloading of media was completed successfully.
See Also:
statusAll(boolean), statusID(int, boolean)
Constructor Detail

MediaTracker

public MediaTracker(Component comp)
Creates a media tracker to track images for a given component.
Parameters:
comp - the component on which the images will eventually be drawn.
Method Detail

addImage

public void addImage(Image image,
                     int id)
Adds an image to the list of images being tracked by this media tracker. The image will eventually be rendered at its default (unscaled) size.
Parameters:
image - the image to be tracked.
id - an identifier used to track this image.

addImage

public void addImage(Image image,
                     int id,
                     int w,
                     int h)
Adds a scaled image to the list of images being tracked by this media tracker. The image will eventually be rendered at the indicated width and height.
Parameters:
image - the image to be tracked.
id - an identifier that can be used to track this image.
w - the width at which the image is rendered.
h - the height at which the image is rendered.

checkAll

public boolean checkAll()
Checks to see if all images being tracked by this media tracker have finished loading.

This method does not start loading the images if they are not already loading.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny or isErrorID methods to check for errors.

Returns:
true if all images have finished loading, have been aborted, or have encountered an error; false otherwise.
See Also:
checkAll(boolean), checkID(int), isErrorAny(), isErrorID(int)

checkAll

public boolean checkAll(boolean load)
Checks to see if all images being tracked by this media tracker have finished loading.

If the value of the load flag is true, then this method starts loading any images that are not yet being loaded.

If there is an error while loading or scaling an image, that image is considered to have finished loading. Use the isErrorAny and isErrorID methods to check for errors.

Parameters:
load - if true, start loading any images that are not yet being loaded.
Returns:
true if all images have finished loading, have been aborted, or have encountered an error; false otherwise.
See Also:
checkID(int),
checkAll(),
isErrorAny(),
isErrorID(int)

isErrorAny

public boolean isErrorAny()
Checks the error status of all of the images.
Returns:
true if any of the images tracked by this media tracker had an error during loading; false otherwise.
See Also:
isErrorID(int), getErrorsAny()

getErrorsAny

public Object[] getErrorsAny()
Returns a list of all media that have encountered an error.
Returns:
an array of media objects tracked by this media tracker that have encountered an error, or null if there are none with errors.
See Also:
isErrorAny(), getErrorsID(int)

waitForAll

public void waitForAll()
                throws InterruptedException
Starts loading all images tracked by this media tracker. This method waits until all the images being tracked have finished loading.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny or isErrorID methods to check for errors.

Throws:
InterruptedException - if another thread has interrupted this thread.
See Also:
waitForID(int), waitForAll(long), isErrorAny(), isErrorID(int)

waitForAll

public boolean waitForAll(long ms)
                   throws InterruptedException
Starts loading all images tracked by this media tracker. This method waits until all the images being tracked have finished loading, or until the length of time specified in milliseconds by the ms argument has passed.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny or isErrorID methods to check for errors.

Parameters:
ms - the number of milliseconds to wait for the loading to complete.
Returns:
true if all images were successfully loaded; false otherwise.
Throws:
InterruptedException - if another thread has interrupted this thread.
See Also:
waitForID(int), waitForAll(long), isErrorAny(), isErrorID(int)

statusAll

public int statusAll(boolean load)
Calculates and returns the bitwise inclusive OR of the status of all media that are tracked by this media tracker.

Possible flags defined by the MediaTracker class are LOADING, ABORTED, ERRORED, and COMPLETE. An image that hasn't started loading has zero as its status.

If the value of load is true, then this method starts loading any images that are not yet being loaded.

Parameters:
load - if true, start loading any images that are not yet being loaded.
Returns:
the bitwise inclusive OR of the status of all of the media being tracked.
See Also:
statusID(int, boolean), LOADING, ABORTED, ERRORED, COMPLETE

checkID

public boolean checkID(int id)
Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.

This method does not start loading the images if they are not already loading.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny or isErrorID methods to check for errors.

Parameters:
id - the identifier of the images to check.
Returns:
true if all images have finished loading, have been aborted, or have encountered an error; false otherwise.
See Also:
checkID(int, boolean),
checkAll(),
isErrorAny(),
isErrorID(int)

checkID

public boolean checkID(int id,
                       boolean load)
Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.

If the value of the load flag is true, then this method starts loading any images that are not yet being loaded.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny or isErrorID methods to check for errors.

Parameters:
id - the identifier of the images to check.
load - if true, start loading any images that are not yet being loaded.
Returns:
true if all images have finished loading, have been aborted, or have encountered an error; false otherwise.
See Also:
checkID(int, boolean),
checkAll(),
isErrorAny(),
isErrorID(int)

isErrorID

public boolean isErrorID(int id)
Checks the error status of all of the images tracked by this media tracker with the specified identifier.
Parameters:
id - the identifier of the images to check.
Returns:
true if any of the images with the specified identifier had an error during loading; false otherwise.
See Also:
isErrorAny(), getErrorsID(int)

getErrorsID

public Object[] getErrorsID(int id)
Returns a list of media with the specified ID that have encountered an error.
Parameters:
id - the identifier of the images to check.
Returns:
an array of media objects tracked by this media tracker with the specified identifier that have encountered an error, or null if there are none with errors.
See Also:
isErrorID(int), isErrorAny(), getErrorsAny()

waitForID

public void waitForID(int id)
               throws InterruptedException
Starts loading all images tracked by this media tracker with the specified identifier. This method waits until all the images with the specified identifier have finished loading.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny and isErrorID methods to check for errors.

Parameters:
id - the identifier of the images to check.
Throws:
InterruptedException - if another thread has interrupted this thread.
See Also:
waitForAll(),
isErrorAny(),
isErrorID(int)

waitForID

public boolean waitForID(int id,
                         long ms)
                  throws InterruptedException
Starts loading all images tracked by this media tracker with the specified identifier. This method waits until all the images with the specified identifier have finished loading, or until the length of time specified in milliseconds by the ms argument has passed.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the statusID, isErrorID, and isErrorAny methods to check for errors.

Parameters:
id - the identifier of the images to check.
ms - the length of time, in milliseconds, to wait for the loading to complete.
Throws:
InterruptedException - if another thread has interrupted this thread.
See Also:
waitForAll(),
waitForID(int),
statusID(int, boolean),
isErrorAny(),
isErrorID(int)

statusID

public int statusID(int id,
                    boolean load)
Calculates and returns the bitwise inclusive OR of the status of all media with the specified identifier that are tracked by this media tracker.

Possible flags defined by the MediaTracker class are LOADING, ABORTED, ERRORED, and COMPLETE. An image that hasn't started loading has zero as its status.

If the value of load is true, then this method starts loading any images that are not yet being loaded.

Parameters:
id - the identifier of the images to check.
load - if true, start loading any images that are not yet being loaded.
Returns:
the bitwise inclusive OR of the status of all of the media with the specified identifier that are being tracked.
See Also:
statusAll(boolean), LOADING, ABORTED, ERRORED, COMPLETE

removeImage

public void removeImage(Image image)
Remove the specified image from this media tracker. All instances of the specified image are removed, regardless of scale or ID.
Parameters:
image - the image to be removed
Since:
JDK1.1
See Also:
removeImage(java.awt.Image, int), removeImage(java.awt.Image, int, int, int)

removeImage

public void removeImage(Image image,
                        int id)
Remove the specified image from the specified tracking ID of this media tracker. All instances of Image being tracked under the specified ID are removed regardless of scale.
Parameters:
image - the image to be removed.
id - the tracking ID frrom which to remove the image.
Since:
JDK1.1
See Also:
removeImage(java.awt.Image), removeImage(java.awt.Image, int, int, int)

removeImage

public void removeImage(Image image,
                        int id,
                        int width,
                        int height)
Remove the specified image with the specified width, height, and ID from this media tracker. Only the specified instance (with any duplicates) is removed.
Parameters:
image - the image to be removed
id - the tracking ID from which to remove the image.
width - the width to remove (-1 for unscaled).
height - the height to remove (-1 for unscaled).
Since:
JDK1.1
See Also:
removeImage(java.awt.Image), removeImage(java.awt.Image, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MediaType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes.MediaType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.PageAttributes.MediaType
Enclosing class:
PageAttributes
public static final class PageAttributes.MediaType
extends java.awt.AttributeValue

A type-safe enumeration of possible paper sizes. These sizes are in compliance with IPP 1.1.

Field Summary
static PageAttributes.MediaType | A The MediaType instance for Engineering A, 8 1/2 x 11 in.
static PageAttributes.MediaType | A0 An alias for ISO_A0.
static PageAttributes.MediaType | A1 An alias for ISO_A1.
static PageAttributes.MediaType | A10 An alias for ISO_A10.
static PageAttributes.MediaType | A2 An alias for ISO_A2.
static PageAttributes.MediaType | A3 An alias for ISO_A3.
static PageAttributes.MediaType | A4 An alias for ISO_A4.
static PageAttributes.MediaType | A5 An alias for ISO_A5.
static PageAttributes.MediaType | A6 An alias for ISO_A6.
static PageAttributes.MediaType | A7 An alias for ISO_A7.
static PageAttributes.MediaType | A8 An alias for ISO_A8.
static PageAttributes.MediaType | A9 An alias for ISO_A9.
static PageAttributes.MediaType | B The MediaType instance for Engineering B, 11 x 17 in.
static PageAttributes.MediaType | B0 An alias for ISO_B0.
static PageAttributes.MediaType | B1 An alias for ISO_B1.
static PageAttributes.MediaType | B10 An alias for ISO_B10.
static PageAttributes.MediaType | B2 An alias for ISO_B2.
static PageAttributes.MediaType | B3 An alias for ISO_B3.
static PageAttributes.MediaType | B4 An alias for ISO_B4.
static PageAttributes.MediaType | B5 An alias for ISO_B5.
static PageAttributes.MediaType | B6 An alias for ISO_B6.
static PageAttributes.MediaType | B7 An alias for ISO_B7.
static PageAttributes.MediaType | B8 An alias for ISO_B8.
static PageAttributes.MediaType | B9 An alias for ISO_B9.
static PageAttributes.MediaType | C The MediaType instance for Engineering C, 17 x 22 in.
static PageAttributes.MediaType | C0 An alias for ISO_C0.
static PageAttributes.MediaType | C1 An alias for ISO_C1.
static PageAttributes.MediaType | C10 An alias for ISO_C10.
static PageAttributes.MediaType | C2 An alias for ISO_C2.
static PageAttributes.MediaType | C3 An alias for ISO_C3.
static PageAttributes.MediaType | C4 An alias for ISO_C4.
static PageAttributes.MediaType | C5 An alias for ISO_C5.
static PageAttributes.MediaType | C6 An alias for ISO_C6.
static PageAttributes.MediaType | C7 An alias for ISO_C7.
static PageAttributes.MediaType | C8 An alias for ISO_C8.
static PageAttributes.MediaType | C9 An alias for ISO_C9.
static PageAttributes.MediaType | D The MediaType instance for Engineering D, 22 x 34 in.
static PageAttributes.MediaType | E The MediaType instance for Engineering E, 34 x 44 in.
static PageAttributes.MediaType | ENV_10 An alias for NA_NUMBER_10_ENVELOPE.
static PageAttributes.MediaType | ENV_10X13 An alias for NA_10X13_ENVELOPE.
static PageAttributes.MediaType | ENV_10X14 An alias for NA_10X14_ENVELOPE.
static PageAttributes.MediaType | ENV_10X15 An alias for NA_10X15_ENVELOPE.
static PageAttributes.MediaType | ENV_11 An alias for NA_NUMBER_11_ENVELOPE.
static PageAttributes.MediaType | ENV_12 An alias for NA_NUMBER_12_ENVELOPE.
static PageAttributes.MediaType | ENV_14 An alias for NA_NUMBER_14_ENVELOPE.
static PageAttributes.MediaType | ENV_6X9 An alias for NA_6X9_ENVELOPE.
static PageAttributes.MediaType | ENV_7X9 An alias for NA_7X9_ENVELOPE.
static PageAttributes.MediaType | ENV_9 An alias for NA_NUMBER_9_ENVELOPE.
static PageAttributes.MediaType | ENV_9X11 An alias for NA_9X11_ENVELOPE.
static PageAttributes.MediaType | ENV_9X12 An alias for NA_9X12_ENVELOPE.
static PageAttributes.MediaType | ENV_INVITE An alias for INVITE_ENVELOPE.
static PageAttributes.MediaType | ENV_ITALY An alias for ITALY_ENVELOPE.
static PageAttributes.MediaType | ENV_MONARCH An alias for MONARCH_ENVELOPE.
static PageAttributes.MediaType | ENV_PERSONAL An alias for PERSONAL_ENVELOPE.
static PageAttributes.MediaType | EXECUTIVE The MediaType instance for Executive, 7 1/4 x 10 1/2 in.
static PageAttributes.MediaType | FOLIO The MediaType instance for Folio, 8 1/2 x 13 in.
static PageAttributes.MediaType | INVITE An alias for INVITE_ENVELOPE.
static PageAttributes.MediaType | INVITE_ENVELOPE The MediaType instance for Invitation Envelope, 220 x 220 mm.
static PageAttributes.MediaType | INVOICE The MediaType instance for Invoice, 5 1/2 x 8 1/2 in.
static PageAttributes.MediaType | ISO_2A0 The MediaType instance for ISO/DIN & JIS 2A0, 1189 x 1682 mm.
static PageAttributes.MediaType | ISO_4A0 The MediaType instance for ISO/DIN & JIS 4A0, 1682 x 2378 mm.
static PageAttributes.MediaType | ISO_A0 The MediaType instance for ISO/DIN & JIS A0, 841 x 1189 mm.
static PageAttributes.MediaType | ISO_A1 The MediaType instance for ISO/DIN & JIS A1, 594 x 841 mm.
static PageAttributes.MediaType | ISO_A10 The MediaType instance for ISO/DIN & JIS A10, 26 x 37 mm.
static PageAttributes.MediaType | ISO_A2 The MediaType instance for ISO/DIN & JIS A2, 420 x 594 mm.
static PageAttributes.MediaType | ISO_A3 The MediaType instance for ISO/DIN & JIS A3, 297 x 420 mm.
static PageAttributes.MediaType | ISO_A4 The MediaType instance for ISO/DIN & JIS A4, 210 x 297 mm.
static PageAttributes.MediaType | ISO_A5 The MediaType instance for ISO/DIN & JIS A5, 148 x 210 mm.
static PageAttributes.MediaType | ISO_A6 The MediaType instance for ISO/DIN & JIS A6, 105 x 148 mm.
static PageAttributes.MediaType | ISO_A7 The MediaType instance for ISO/DIN & JIS A7, 74 x 105 mm.
static PageAttributes.MediaType | ISO_A8 The MediaType instance for ISO/DIN & JIS A8, 52 x 74 mm.
static PageAttributes.MediaType | ISO_A9 The MediaType instance for ISO/DIN & JIS A9, 37 x 52 mm.
static PageAttributes.MediaType | ISO_B0 The MediaType instance for ISO/DIN B0, 1000 x 1414 mm.
static PageAttributes.MediaType | ISO_B1 The MediaType instance for ISO/DIN B1, 707 x 1000 mm.
static PageAttributes.MediaType | ISO_B10 The MediaType instance for ISO/DIN B10, 31 x 44 mm.
static PageAttributes.MediaType | ISO_B2 The MediaType instance for ISO/DIN B2, 500 x 707 mm.
static PageAttributes.MediaType | ISO_B3 The MediaType instance for ISO/DIN B3, 353 x 500 mm.
static PageAttributes.MediaType | ISO_B4 The MediaType instance for ISO/DIN B4, 250 x 353 mm.
static PageAttributes.MediaType | ISO_B4_ENVELOPE An alias for ISO_B4.
static PageAttributes.MediaType | ISO_B5 The MediaType instance for ISO/DIN B5, 176 x 250 mm.
static PageAttributes.MediaType | ISO_B5_ENVELOPE An alias for ISO_B5.
static PageAttributes.MediaType | ISO_B6 The MediaType instance for ISO/DIN B6, 125 x 176 mm.
static PageAttributes.MediaType | ISO_B7 The MediaType instance for ISO/DIN B7, 88 x 125 mm.
static PageAttributes.MediaType | ISO_B8 The MediaType instance for ISO/DIN B8, 62 x 88 mm.
static PageAttributes.MediaType | ISO_B9 The MediaType instance for ISO/DIN B9, 44 x 62 mm.
static PageAttributes.MediaType | ISO_C0 The MediaType instance for ISO/DIN C0, 917 x 1297 mm.
static PageAttributes.MediaType | ISO_C0_ENVELOPE An alias for ISO_C0.
static PageAttributes.MediaType | ISO_C1 The MediaType instance for ISO/DIN C1, 648 x 917 mm.
static PageAttributes.MediaType | ISO_C1_ENVELOPE An alias for ISO_C1.
static PageAttributes.MediaType | ISO_C10 The MediaType instance for ISO/DIN C10, 28 x 40 mm.
static PageAttributes.MediaType | ISO_C10_ENVELOPE An alias for ISO_C10.
static PageAttributes.MediaType | ISO_C2 The MediaType instance for ISO/DIN C2, 458 x 648 mm.
static PageAttributes.MediaType | ISO_C2_ENVELOPE An alias for ISO_C2.
static PageAttributes.MediaType | ISO_C3 The MediaType instance for ISO/DIN C3, 324 x 458 mm.
static PageAttributes.MediaType | ISO_C3_ENVELOPE An alias for ISO_C3.
static PageAttributes.MediaType | ISO_C4 The MediaType instance for ISO/DIN C4, 229 x 324 mm.
static PageAttributes.MediaType | ISO_C4_ENVELOPE An alias for ISO_C4.
static PageAttributes.MediaType | ISO_C5 The MediaType instance for ISO/DIN C5, 162 x 229 mm.
static PageAttributes.MediaType | ISO_C5_ENVELOPE An alias for ISO_C5.
static PageAttributes.MediaType | ISO_C6 The MediaType instance for ISO/DIN C6, 114 x 162 mm.
static PageAttributes.MediaType | ISO_C6_ENVELOPE An alias for ISO_C6.
static PageAttributes.MediaType | ISO_C7 The MediaType instance for ISO/DIN C7, 81 x 114 mm.
static PageAttributes.MediaType | ISO_C7_ENVELOPE An alias for ISO_C7.
static PageAttributes.MediaType | ISO_C8 The MediaType instance for ISO/DIN C8, 57 x 81 mm.
static PageAttributes.MediaType | ISO_C8_ENVELOPE An alias for ISO_C8.
static PageAttributes.MediaType | ISO_C9 The MediaType instance for ISO/DIN C9, 40 x 57 mm.
static PageAttributes.MediaType | ISO_C9_ENVELOPE An alias for ISO_C9.
static PageAttributes.MediaType | ISO_DESIGNATED_LONG The MediaType instance for ISO Designated Long, 110 x 220 mm.
static PageAttributes.MediaType | ISO_DESIGNATED_LONG_ENVELOPE An alias for ISO_DESIGNATED_LONG.
static PageAttributes.MediaType | ITALY An alias for ITALY_ENVELOPE.
static PageAttributes.MediaType | ITALY_ENVELOPE The MediaType instance for Italy Envelope, 110 x 230 mm.
static PageAttributes.MediaType | JIS_B0 The MediaType instance for JIS B0, 1030 x 1456 mm.
static PageAttributes.MediaType | JIS_B1 The MediaType instance for JIS B1, 728 x 1030 mm.
static PageAttributes.MediaType | JIS_B10 The MediaType instance for JIS B10, 32 x 45 mm.
static PageAttributes.MediaType | JIS_B2 The MediaType instance for JIS B2, 515 x 728 mm.
static PageAttributes.MediaType | JIS_B3 The MediaType instance for JIS B3, 364 x 515 mm.
static PageAttributes.MediaType | JIS_B4 The MediaType instance for JIS B4, 257 x 364 mm.
static PageAttributes.MediaType | JIS_B5 The MediaType instance for JIS B5, 182 x 257 mm.
static PageAttributes.MediaType | JIS_B6 The MediaType instance for JIS B6, 128 x 182 mm.
static PageAttributes.MediaType | JIS_B7 The MediaType instance for JIS B7, 91 x 128 mm.
static PageAttributes.MediaType | JIS_B8 The MediaType instance for JIS B8, 64 x 91 mm.
static PageAttributes.MediaType | JIS_B9 The MediaType instance for JIS B9, 45 x 64 mm.
static PageAttributes.MediaType | LEDGER The MediaType instance for Ledger, 11 x 17 in.
static PageAttributes.MediaType | LEGAL An alias for NA_LEGAL.
static PageAttributes.MediaType | LETTER An alias for NA_LETTER.
static PageAttributes.MediaType | MONARCH An alias for MONARCH_ENVELOPE.
static PageAttributes.MediaType | MONARCH_ENVELOPE The MediaType instance for Monarch Envelope, 3 7/8 x 7 1/2 in.
static PageAttributes.MediaType | NA_10X13_ENVELOPE The MediaType instance for North American 10 x 13 in.
static PageAttributes.MediaType | NA_10X14_ENVELOPE The MediaType instance for North American 10 x 14 in.
static PageAttributes.MediaType | NA_10X15_ENVELOPE The MediaType instance for North American 10 x 15 in.
static PageAttributes.MediaType | NA_6X9_ENVELOPE The MediaType instance for North American 6 x 9 in.
static PageAttributes.MediaType | NA_7X9_ENVELOPE The MediaType instance for North American 7 x 9 in.
static PageAttributes.MediaType | NA_9X11_ENVELOPE The MediaType instance for North American 9 x 11 in.
static PageAttributes.MediaType | NA_9X12_ENVELOPE The MediaType instance for North American 9 x 12 in.
static PageAttributes.MediaType | NA_LEGAL The MediaType instance for North American Legal, 8 1/2 x 14 in.
static PageAttributes.MediaType | NA_LETTER The MediaType instance for North American Letter, 8 1/2 x 11 in.
static PageAttributes.MediaType | NA_NUMBER_10_ENVELOPE The MediaType instance for North American #10 Business Envelope, 4 1/8 x 9 1/2 in.
static PageAttributes.MediaType | NA_NUMBER_11_ENVELOPE The MediaType instance for North American #11 Business Envelope, 4 1/2 x 10 3/8 in.
static PageAttributes.MediaType | NA_NUMBER_12_ENVELOPE The MediaType instance for North American #12 Business Envelope, 4 3/4 x 11 in.
static PageAttributes.MediaType | NA_NUMBER_14_ENVELOPE The MediaType instance for North American #14 Business Envelope, 5 x 11 1/2 in.
static PageAttributes.MediaType | NA_NUMBER_9_ENVELOPE The MediaType instance for North American #9 Business Envelope, 3 7/8 x 8 7/8 in.
static PageAttributes.MediaType | NOTE An alias for NA_LETTER.
static PageAttributes.MediaType | PERSONAL An alias for PERSONAL_ENVELOPE.
static PageAttributes.MediaType | PERSONAL_ENVELOPE The MediaType instance for 6 3/4 envelope, 3 5/8 x 6 1/2 in.
static PageAttributes.MediaType | QUARTO The MediaType instance for Quarto, 215 x 275 mm.
static PageAttributes.MediaType | STATEMENT An alias for INVOICE.
static PageAttributes.MediaType | TABLOID An alias for LEDGER.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ISO_4A0

public static final PageAttributes.MediaType ISO_4A0
The MediaType instance for ISO/DIN & JIS 4A0, 1682 x 2378 mm.

ISO_2A0

public static final PageAttributes.MediaType ISO_2A0
The MediaType instance for ISO/DIN & JIS 2A0, 1189 x 1682 mm.

ISO_A0

public static final PageAttributes.MediaType ISO_A0
The MediaType instance for ISO/DIN & JIS A0, 841 x 1189 mm.

ISO_A1

public static final PageAttributes.MediaType ISO_A1
The MediaType instance for ISO/DIN & JIS A1, 594 x 841 mm.

ISO_A2

public static final PageAttributes.MediaType ISO_A2
The MediaType instance for ISO/DIN & JIS A2, 420 x 594 mm.

ISO_A3

public static final PageAttributes.MediaType ISO_A3
The MediaType instance for ISO/DIN & JIS A3, 297 x 420 mm.

ISO_A4

public static final PageAttributes.MediaType ISO_A4
The MediaType instance for ISO/DIN & JIS A4, 210 x 297 mm.

ISO_A5

public static final PageAttributes.MediaType ISO_A5
The MediaType instance for ISO/DIN & JIS A5, 148 x 210 mm.

ISO_A6

public static final PageAttributes.MediaType ISO_A6
The MediaType instance for ISO/DIN & JIS A6, 105 x 148 mm.

ISO_A7

public static final PageAttributes.MediaType ISO_A7
The MediaType instance for ISO/DIN & JIS A7, 74 x 105 mm.

ISO_A8

public static final PageAttributes.MediaType ISO_A8
The MediaType instance for ISO/DIN & JIS A8, 52 x 74 mm.

ISO_A9

public static final PageAttributes.MediaType ISO_A9
The MediaType instance for ISO/DIN & JIS A9, 37 x 52 mm.

ISO_A10

public static final PageAttributes.MediaType ISO_A10
The MediaType instance for ISO/DIN & JIS A10, 26 x 37 mm.

ISO_B0

public static final PageAttributes.MediaType ISO_B0
The MediaType instance for ISO/DIN B0, 1000 x 1414 mm.

ISO_B1

public static final PageAttributes.MediaType ISO_B1
The MediaType instance for ISO/DIN B1, 707 x 1000 mm.

ISO_B2

public static final PageAttributes.MediaType ISO_B2
The MediaType instance for ISO/DIN B2, 500 x 707 mm.

ISO_B3

public static final PageAttributes.MediaType ISO_B3
The MediaType instance for ISO/DIN B3, 353 x 500 mm.

ISO_B4

public static final PageAttributes.MediaType ISO_B4
The MediaType instance for ISO/DIN B4, 250 x 353 mm.

ISO_B5

public static final PageAttributes.MediaType ISO_B5
The MediaType instance for ISO/DIN B5, 176 x 250 mm.

ISO_B6

public static final PageAttributes.MediaType ISO_B6
The MediaType instance for ISO/DIN B6, 125 x 176 mm.

ISO_B7

public static final PageAttributes.MediaType ISO_B7
The MediaType instance for ISO/DIN B7, 88 x 125 mm.

ISO_B8

public static final PageAttributes.MediaType ISO_B8
The MediaType instance for ISO/DIN B8, 62 x 88 mm.

ISO_B9

public static final PageAttributes.MediaType ISO_B9
The MediaType instance for ISO/DIN B9, 44 x 62 mm.

ISO_B10

public static final PageAttributes.MediaType ISO_B10
The MediaType instance for ISO/DIN B10, 31 x 44 mm.

JIS_B0

public static final PageAttributes.MediaType JIS_B0
The MediaType instance for JIS B0, 1030 x 1456 mm.

JIS_B1

public static final PageAttributes.MediaType JIS_B1
The MediaType instance for JIS B1, 728 x 1030 mm.

JIS_B2

public static final PageAttributes.MediaType JIS_B2
The MediaType instance for JIS B2, 515 x 728 mm.

JIS_B3

public static final PageAttributes.MediaType JIS_B3
The MediaType instance for JIS B3, 364 x 515 mm.

JIS_B4

public static final PageAttributes.MediaType JIS_B4
The MediaType instance for JIS B4, 257 x 364 mm.

JIS_B5

public static final PageAttributes.MediaType JIS_B5
The MediaType instance for JIS B5, 182 x 257 mm.

JIS_B6

public static final PageAttributes.MediaType JIS_B6
The MediaType instance for JIS B6, 128 x 182 mm.

JIS_B7

public static final PageAttributes.MediaType JIS_B7
The MediaType instance for JIS B7, 91 x 128 mm.

JIS_B8

public static final PageAttributes.MediaType JIS_B8
The MediaType instance for JIS B8, 64 x 91 mm.

JIS_B9

public static final PageAttributes.MediaType JIS_B9
The MediaType instance for JIS B9, 45 x 64 mm.

JIS_B10

public static final PageAttributes.MediaType JIS_B10
The MediaType instance for JIS B10, 32 x 45 mm.

ISO_C0

public static final PageAttributes.MediaType ISO_C0
The MediaType instance for ISO/DIN C0, 917 x 1297 mm.

ISO_C1

public static final PageAttributes.MediaType ISO_C1
The MediaType instance for ISO/DIN C1, 648 x 917 mm.

ISO_C2

public static final PageAttributes.MediaType ISO_C2
The MediaType instance for ISO/DIN C2, 458 x 648 mm.

ISO_C3

public static final PageAttributes.MediaType ISO_C3
The MediaType instance for ISO/DIN C3, 324 x 458 mm.

ISO_C4

public static final PageAttributes.MediaType ISO_C4
The MediaType instance for ISO/DIN C4, 229 x 324 mm.

ISO_C5

public static final PageAttributes.MediaType ISO_C5
The MediaType instance for ISO/DIN C5, 162 x 229 mm.

ISO_C6

public static final PageAttributes.MediaType ISO_C6
The MediaType instance for ISO/DIN C6, 114 x 162 mm.

ISO_C7

public static final PageAttributes.MediaType ISO_C7
The MediaType instance for ISO/DIN C7, 81 x 114 mm.

ISO_C8

public static final PageAttributes.MediaType ISO_C8
The MediaType instance for ISO/DIN C8, 57 x 81 mm.

ISO_C9

public static final PageAttributes.MediaType ISO_C9
The MediaType instance for ISO/DIN C9, 40 x 57 mm.

ISO_C10

public static final PageAttributes.MediaType ISO_C10
The MediaType instance for ISO/DIN C10, 28 x 40 mm.

ISO_DESIGNATED_LONG

public static final PageAttributes.MediaType ISO_DESIGNATED_LONG
The MediaType instance for ISO Designated Long, 110 x 220 mm.

EXECUTIVE

public static final PageAttributes.MediaType EXECUTIVE
The MediaType instance for Executive, 7 1/4 x 10 1/2 in.

FOLIO

public static final PageAttributes.MediaType FOLIO
The MediaType instance for Folio, 8 1/2 x 13 in.

INVOICE

public static final PageAttributes.MediaType INVOICE
The MediaType instance for Invoice, 5 1/2 x 8 1/2 in.

LEDGER

public static final PageAttributes.MediaType LEDGER
The MediaType instance for Ledger, 11 x 17 in.

NA_LETTER

public static final PageAttributes.MediaType NA_LETTER
The MediaType instance for North American Letter, 8 1/2 x 11 in.

NA_LEGAL

public static final PageAttributes.MediaType NA_LEGAL
The MediaType instance for North American Legal, 8 1/2 x 14 in.

QUARTO

public static final PageAttributes.MediaType QUARTO
The MediaType instance for Quarto, 215 x 275 mm.

A

public static final PageAttributes.MediaType A
The MediaType instance for Engineering A, 8 1/2 x 11 in.

B

public static final PageAttributes.MediaType B
The MediaType instance for Engineering B, 11 x 17 in.

C

public static final PageAttributes.MediaType C
The MediaType instance for Engineering C, 17 x 22 in.

D

public static final PageAttributes.MediaType D
The MediaType instance for Engineering D, 22 x 34 in.

E

public static final PageAttributes.MediaType E
The MediaType instance for Engineering E, 34 x 44 in.

NA_10X15_ENVELOPE

public static final PageAttributes.MediaType NA_10X15_ENVELOPE
The MediaType instance for North American 10 x 15 in.

NA_10X14_ENVELOPE

public static final PageAttributes.MediaType NA_10X14_ENVELOPE
The MediaType instance for North American 10 x 14 in.

NA_10X13_ENVELOPE

public static final PageAttributes.MediaType NA_10X13_ENVELOPE
The MediaType instance for North American 10 x 13 in.

NA_9X12_ENVELOPE

public static final PageAttributes.MediaType NA_9X12_ENVELOPE
The MediaType instance for North American 9 x 12 in.

NA_9X11_ENVELOPE

public static final PageAttributes.MediaType NA_9X11_ENVELOPE
The MediaType instance for North American 9 x 11 in.

NA_7X9_ENVELOPE

public static final PageAttributes.MediaType NA_7X9_ENVELOPE
The MediaType instance for North American 7 x 9 in.

NA_6X9_ENVELOPE

public static final PageAttributes.MediaType NA_6X9_ENVELOPE
The MediaType instance for North American 6 x 9 in.

NA_NUMBER_9_ENVELOPE

public static final PageAttributes.MediaType NA_NUMBER_9_ENVELOPE
The MediaType instance for North American #9 Business Envelope, 3 7/8 x 8 7/8 in.

NA_NUMBER_10_ENVELOPE

public static final PageAttributes.MediaType NA_NUMBER_10_ENVELOPE
The MediaType instance for North American #10 Business Envelope, 4 1/8 x 9 1/2 in.

NA_NUMBER_11_ENVELOPE

public static final PageAttributes.MediaType NA_NUMBER_11_ENVELOPE
The MediaType instance for North American #11 Business Envelope, 4 1/2 x 10 3/8 in.

NA_NUMBER_12_ENVELOPE

public static final PageAttributes.MediaType NA_NUMBER_12_ENVELOPE
The MediaType instance for North American #12 Business Envelope, 4 3/4 x 11 in.

NA_NUMBER_14_ENVELOPE

public static final PageAttributes.MediaType NA_NUMBER_14_ENVELOPE
The MediaType instance for North American #14 Business Envelope, 5 x 11 1/2 in.

INVITE_ENVELOPE

public static final PageAttributes.MediaType INVITE_ENVELOPE
The MediaType instance for Invitation Envelope, 220 x 220 mm.

ITALY_ENVELOPE

public static final PageAttributes.MediaType ITALY_ENVELOPE
The MediaType instance for Italy Envelope, 110 x 230 mm.

MONARCH_ENVELOPE

public static final PageAttributes.MediaType MONARCH_ENVELOPE
The MediaType instance for Monarch Envelope, 3 7/8 x 7 1/2 in.

PERSONAL_ENVELOPE

public static final PageAttributes.MediaType PERSONAL_ENVELOPE
The MediaType instance for 6 3/4 envelope, 3 5/8 x 6 1/2 in.

A0

public static final PageAttributes.MediaType A0
An alias for ISO_A0.

A1

public static final PageAttributes.MediaType A1
An alias for ISO_A1.

A2

public static final PageAttributes.MediaType A2
An alias for ISO_A2.

A3

public static final PageAttributes.MediaType A3
An alias for ISO_A3.

A4

public static final PageAttributes.MediaType A4
An alias for ISO_A4.

A5

public static final PageAttributes.MediaType A5
An alias for ISO_A5.

A6

public static final PageAttributes.MediaType A6
An alias for ISO_A6.

A7

public static final PageAttributes.MediaType A7
An alias for ISO_A7.

A8

public static final PageAttributes.MediaType A8
An alias for ISO_A8.

A9

public static final PageAttributes.MediaType A9
An alias for ISO_A9.

A10

public static final PageAttributes.MediaType A10
An alias for ISO_A10.

B0

public static final PageAttributes.MediaType B0
An alias for ISO_B0.

B1

public static final PageAttributes.MediaType B1
An alias for ISO_B1.

B2

public static final PageAttributes.MediaType B2
An alias for ISO_B2.

B3

public static final PageAttributes.MediaType B3
An alias for ISO_B3.

B4

public static final PageAttributes.MediaType B4
An alias for ISO_B4.

ISO_B4_ENVELOPE

public static final PageAttributes.MediaType ISO_B4_ENVELOPE
An alias for ISO_B4.

B5

public static final PageAttributes.MediaType B5
An alias for ISO_B5.

ISO_B5_ENVELOPE

public static final PageAttributes.MediaType ISO_B5_ENVELOPE
An alias for ISO_B5.

B6

public static final PageAttributes.MediaType B6
An alias for ISO_B6.

B7

public static final PageAttributes.MediaType B7
An alias for ISO_B7.

B8

public static final PageAttributes.MediaType B8
An alias for ISO_B8.

B9

public static final PageAttributes.MediaType B9
An alias for ISO_B9.

B10

public static final PageAttributes.MediaType B10
An alias for ISO_B10.

C0

public static final PageAttributes.MediaType C0
An alias for ISO_C0.

ISO_C0_ENVELOPE

public static final PageAttributes.MediaType ISO_C0_ENVELOPE
An alias for ISO_C0.

C1

public static final PageAttributes.MediaType C1
An alias for ISO_C1.

ISO_C1_ENVELOPE

public static final PageAttributes.MediaType ISO_C1_ENVELOPE
An alias for ISO_C1.

C2

public static final PageAttributes.MediaType C2
An alias for ISO_C2.

ISO_C2_ENVELOPE

public static final PageAttributes.MediaType ISO_C2_ENVELOPE
An alias for ISO_C2.

C3

public static final PageAttributes.MediaType C3
An alias for ISO_C3.

ISO_C3_ENVELOPE

public static final PageAttributes.MediaType ISO_C3_ENVELOPE
An alias for ISO_C3.

C4

public static final PageAttributes.MediaType C4
An alias for ISO_C4.

ISO_C4_ENVELOPE

public static final PageAttributes.MediaType ISO_C4_ENVELOPE
An alias for ISO_C4.

C5

public static final PageAttributes.MediaType C5
An alias for ISO_C5.

ISO_C5_ENVELOPE

public static final PageAttributes.MediaType ISO_C5_ENVELOPE
An alias for ISO_C5.

C6

public static final PageAttributes.MediaType C6
An alias for ISO_C6.

ISO_C6_ENVELOPE

public static final PageAttributes.MediaType ISO_C6_ENVELOPE
An alias for ISO_C6.

C7

public static final PageAttributes.MediaType C7
An alias for ISO_C7.

ISO_C7_ENVELOPE

public static final PageAttributes.MediaType ISO_C7_ENVELOPE
An alias for ISO_C7.

C8

public static final PageAttributes.MediaType C8
An alias for ISO_C8.

ISO_C8_ENVELOPE

public static final PageAttributes.MediaType ISO_C8_ENVELOPE
An alias for ISO_C8.

C9

public static final PageAttributes.MediaType C9
An alias for ISO_C9.

ISO_C9_ENVELOPE

public static final PageAttributes.MediaType ISO_C9_ENVELOPE
An alias for ISO_C9.

C10

public static final PageAttributes.MediaType C10
An alias for ISO_C10.

ISO_C10_ENVELOPE

public static final PageAttributes.MediaType ISO_C10_ENVELOPE
An alias for ISO_C10.

ISO_DESIGNATED_LONG_ENVELOPE

public static final PageAttributes.MediaType ISO_DESIGNATED_LONG_ENVELOPE
An alias for ISO_DESIGNATED_LONG.

STATEMENT

public static final PageAttributes.MediaType STATEMENT
An alias for INVOICE.

TABLOID

public static final PageAttributes.MediaType TABLOID
An alias for LEDGER.

LETTER

public static final PageAttributes.MediaType LETTER
An alias for NA_LETTER.

NOTE

public static final PageAttributes.MediaType NOTE
An alias for NA_LETTER.

LEGAL

public static final PageAttributes.MediaType LEGAL
An alias for NA_LEGAL.

ENV_10X15

public static final PageAttributes.MediaType ENV_10X15
An alias for NA_10X15_ENVELOPE.

ENV_10X14

public static final PageAttributes.MediaType ENV_10X14
An alias for NA_10X14_ENVELOPE.

ENV_10X13

public static final PageAttributes.MediaType ENV_10X13
An alias for NA_10X13_ENVELOPE.

ENV_9X12

public static final PageAttributes.MediaType ENV_9X12
An alias for NA_9X12_ENVELOPE.

ENV_9X11

public static final PageAttributes.MediaType ENV_9X11
An alias for NA_9X11_ENVELOPE.

ENV_7X9

public static final PageAttributes.MediaType ENV_7X9
An alias for NA_7X9_ENVELOPE.

ENV_6X9

public static final PageAttributes.MediaType ENV_6X9
An alias for NA_6X9_ENVELOPE.

ENV_9

public static final PageAttributes.MediaType ENV_9
An alias for NA_NUMBER_9_ENVELOPE.

ENV_10

public static final PageAttributes.MediaType ENV_10
An alias for NA_NUMBER_10_ENVELOPE.

ENV_11

public static final PageAttributes.MediaType ENV_11
An alias for NA_NUMBER_11_ENVELOPE.

ENV_12

public static final PageAttributes.MediaType ENV_12
An alias for NA_NUMBER_12_ENVELOPE.

ENV_14

public static final PageAttributes.MediaType ENV_14
An alias for NA_NUMBER_14_ENVELOPE.

ENV_INVITE

public static final PageAttributes.MediaType ENV_INVITE
An alias for INVITE_ENVELOPE.

ENV_ITALY

public static final PageAttributes.MediaType ENV_ITALY
An alias for ITALY_ENVELOPE.

ENV_MONARCH

public static final PageAttributes.MediaType ENV_MONARCH
An alias for MONARCH_ENVELOPE.

ENV_PERSONAL

public static final PageAttributes.MediaType ENV_PERSONAL
An alias for PERSONAL_ENVELOPE.

INVITE

public static final PageAttributes.MediaType INVITE
An alias for INVITE_ENVELOPE.

ITALY

public static final PageAttributes.MediaType ITALY
An alias for ITALY_ENVELOPE.

MONARCH

public static final PageAttributes.MediaType MONARCH
An alias for MONARCH_ENVELOPE.

PERSONAL

public static final PageAttributes.MediaType PERSONAL
An alias for PERSONAL_ENVELOPE.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Menu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Menu

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuItem
              |
              +--java.awt.Menu
All Implemented Interfaces:
Accessible, MenuContainer, Serializable
Direct Known Subclasses:
PopupMenu
public class Menu
extends MenuItem
implements MenuContainer, Accessible

A Menu object is a pull-down menu component that is deployed from a menu bar.

A menu can optionally be a tear-off menu. A tear-off menu can be opened and dragged away from its parent menu bar or menu. It remains on the screen after the mouse button has been released. The mechanism for tearing off a menu is platform dependent, since the look and feel of the tear-off menu is determined by its peer. On platforms that do not support tear-off menus, the tear-off property is ignored.

Each item in a menu must belong to the MenuItem class. It can be an instance of MenuItem, a submenu (an instance of Menu), or a check box (an instance of CheckboxMenuItem).

Since:
JDK1.0
See Also:
MenuItem, CheckboxMenuItem, Serialized Form

Inner Class Summary
protected  class Menu.AccessibleAWTMenu
Inner class of Menu used to provide default support for accessibility.
Inner classes inherited from class java.awt.MenuItem
MenuItem.AccessibleAWTMenuItem
Inner classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
Constructor Summary
Menu()
Constructs a new menu with an empty label.
Menu(String label)
Constructs a new menu with the specified label.
Menu(String label, boolean tearOff)
Constructs a new menu with the specified label, indicating whether the menu can be torn off.
Method Summary
 MenuItem add(MenuItem mi)
Adds the specified menu item to this menu.
 void add(String label)
Adds an item with the specified label to this menu.
 void addNotify()
Creates the menu's peer.
 void addSeparator()
Adds a separator line, or a hypen, to the menu at the current position.
 int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Menu.
 MenuItem getItem(int index)
Gets the item located at the specified index of this menu.
 int getItemCount()
Get the number of items in this menu.
 void insert(MenuItem menuitem, int index)
Inserts a menu item into this menu at the specified position.
 void insert(String label, int index)
Inserts a menu item with the specified label into this menu at the specified position.
 void insertSeparator(int index)
Inserts a separator at the specified position.
 boolean isTearOff()
Indicates whether this menu is a tear-off menu.
 String paramString()
Gets the parameter string representing the state of this menu.
 void remove(int index)
Removes the menu item at the specified index from this menu.
 void remove(MenuComponent item)
Removes the specified menu item from this menu.
 void removeAll()
Removes all items from this menu.
 void removeNotify()
Removes the menu's peer.
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Constructor Detail

Menu

public Menu()
Constructs a new menu with an empty label. This menu is not a tear-off menu.
Since:
JDK1.1

Menu

public Menu(String label)
Constructs a new menu with the specified label. This menu is not a tear-off menu.
Parameters:
label - the menu's label in the menu bar, or in another menu of which this menu is a submenu.

Menu

public Menu(String label,
            boolean tearOff)
Constructs a new menu with the specified label, indicating whether the menu can be torn off.

Tear-off functionality may not be supported by all implementations of AWT. If a particular implementation doesn't support tear-off menus, this value is silently ignored.

Parameters:
label - the menu's label in the menu bar, or in another menu of which this menu is a submenu.
tearOff - if true, the menu is a tear-off menu.
Since:
JDK1.0.
Method Detail

addNotify

public void addNotify()
Creates the menu's peer. The peer allows us to modify the appearance of the menu without changing its functionality.
Overrides:
addNotify in class MenuItem

removeNotify

public void removeNotify()
Removes the menu's peer. The peer allows us to modify the appearance of the menu without changing its functionality.
Overrides:
removeNotify in class MenuComponent

isTearOff

public boolean isTearOff()
Indicates whether this menu is a tear-off menu.

Tear-off functionality may not be supported by all implementations of AWT. If a particular implementation doesn't support tear-off menus, this value is silently ignored.

Returns:
true if this is a tear-off menu; false otherwise.

getItemCount

public int getItemCount()
Get the number of items in this menu.
Returns:
the number of items in this menu.
Since:
JDK1.1

countItems

public int countItems()
Deprecated. As of JDK version 1.1, replaced by getItemCount().

getItem

public MenuItem getItem(int index)
Gets the item located at the specified index of this menu.
Parameters:
index - the position of the item to be returned.
Returns:
the item located at the specified index.

add

public MenuItem add(MenuItem mi)
Adds the specified menu item to this menu. If the menu item has been part of another menu, remove it from that menu.
Parameters:
mi - the menu item to be added.
Returns:
the menu item added.
See Also:
insert(java.lang.String, int), insert(java.awt.MenuItem, int)

add

public void add(String label)
Adds an item with the specified label to this menu.
Parameters:
label - the text on the item.
See Also:
insert(java.lang.String, int), insert(java.awt.MenuItem, int)

insert

public void insert(MenuItem menuitem,
                   int index)
Inserts a menu item into this menu at the specified position.
Parameters:
menuitem - the menu item to be inserted.
index - the position at which the menu item should be inserted.
Throws:
IllegalArgumentException - if the value of index is less than zero.
Since:
JDK1.1
See Also:
add(java.lang.String), add(java.awt.MenuItem)

insert

public void insert(String label,
                   int index)
Inserts a menu item with the specified label into this menu at the specified position.
Parameters:
label - the text on the item.
index - the position at which the menu item should be inserted.
Since:
JDK1.1
See Also:
add(java.lang.String), add(java.awt.MenuItem)

addSeparator

public void addSeparator()
Adds a separator line, or a hypen, to the menu at the current position.
See Also:
insertSeparator(int)

insertSeparator

public void insertSeparator(int index)
Inserts a separator at the specified position.
Parameters:
index - the position at which the menu separator should be inserted.
Throws:
IllegalArgumentException - if the value of index is less than 0.
Since:
JDK1.1
See Also:
addSeparator()

remove

public void remove(int index)
Removes the menu item at the specified index from this menu.
Parameters:
index - the position of the item to be removed.

remove

public void remove(MenuComponent item)
Removes the specified menu item from this menu.
Specified by:
remove in interface MenuContainer
Parameters:
item - the item to be removed from the menu. If item is null or is not in this menu, this method does nothing.

removeAll

public void removeAll()
Removes all items from this menu.
Since:
JDK1.0.

paramString

public String paramString()
Gets the parameter string representing the state of this menu. This string is useful for debugging.
Overrides:
paramString in class MenuItem
Since:
JDK1.0nu.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Menu. For menus, the AccessibleContext takes the form of an AccessibleAWTMenu. A new AccessibleAWTMenu instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class MenuItem
Returns:
an AccessibleAWTMenu that serves as the AccessibleContext of this Menu
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuBar

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuBar
All Implemented Interfaces:
Accessible, MenuContainer, Serializable
public class MenuBar
extends MenuComponent
implements MenuContainer, Accessible

The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame. In order to associate the menu bar with a Frame object, call the frame's setMenuBar method.

This is what a menu bar might look like:

A menu bar handles keyboard shortcuts for menu items, passing them along to its child menus. (Keyboard shortcuts, which are optional, provide the user with an alternative to the mouse for invoking a menu item and the action that is associated with it.) Each menu item can maintain an instance of MenuShortcut. The MenuBar class defines several methods, shortcuts() and getShortcutMenuItem(java.awt.MenuShortcut) that retrieve information about the shortcuts a given menu bar is managing.

Since:
JDK1.0
See Also:
Frame, Frame.setMenuBar(java.awt.MenuBar), Menu, MenuItem, MenuShortcut, Serialized Form

Inner Class Summary
protected  class MenuBar.AccessibleAWTMenuBar
Inner class of MenuBar used to provide default support for accessibility.
Inner classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
Constructor Summary
MenuBar()
Creates a new menu bar.
Method Summary
 Menu add(Menu m)
Adds the specified menu to the menu bar.
 void addNotify()
Creates the menu bar's peer.
 int countMenus()
Deprecated. As of JDK version 1.1, replaced by getMenuCount().
 void deleteShortcut(MenuShortcut s)
Deletes the specified menu shortcut.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this MenuBar.
 Menu getHelpMenu()
Gets the help menu on the menu bar.
 Menu getMenu(int i)
Gets the specified menu.
 int getMenuCount()
Gets the number of menus on the menu bar.
 MenuItem getShortcutMenuItem(MenuShortcut s)
Gets the instance of MenuItem associated with the specified MenuShortcut object, or null if none of the menu items being managed by this menu bar is associated with the specified menu shortcut.
 void remove(int index)
Removes the menu located at the specified index from this menu bar.
 void remove(MenuComponent m)
Removes the specified menu component from this menu bar.
 void removeNotify()
Removes the menu bar's peer.
 void setHelpMenu(Menu m)
Sets the specified menu to be this menu bar's help menu.
 Enumeration shortcuts()
Gets an enumeration of all menu shortcuts this menu bar is managing.
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, paramString, postEvent, processEvent, setFont, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Constructor Detail

MenuBar

public MenuBar()
Creates a new menu bar.
Method Detail

addNotify

public void addNotify()
Creates the menu bar's peer. The peer allows us to change the appearance of the menu bar without changing any of the menu bar's functionality.

removeNotify

public void removeNotify()
Removes the menu bar's peer. The peer allows us to change the appearance of the menu bar without changing any of the menu bar's functionality.
Overrides:
removeNotify in class MenuComponent

getHelpMenu

public Menu getHelpMenu()
Gets the help menu on the menu bar.
Returns:
the help menu on this menu bar.

setHelpMenu

public void setHelpMenu(Menu m)
Sets the specified menu to be this menu bar's help menu. If this menu bar has an existing help menu, the old help menu is removed from the menu bar, and replaced with the specified menu.
Parameters:
m - the menu to be set as the help menu

add

public Menu add(Menu m)
Adds the specified menu to the menu bar.
Parameters:
m - the menu to be added.
Returns:
the menu added.
See Also:
remove(int), remove(java.awt.MenuComponent)

remove

public void remove(int index)
Removes the menu located at the specified index from this menu bar.
Parameters:
index - the position of the menu to be removed.
See Also:
add(java.awt.Menu)

remove

public void remove(MenuComponent m)
Removes the specified menu component from this menu bar.
Specified by:
remove in interface MenuContainer
Parameters:
m - the menu component to be removed.
See Also:
add(java.awt.Menu)

getMenuCount

public int getMenuCount()
Gets the number of menus on the menu bar.
Returns:
the number of menus on the menu bar.
Since:
JDK1.1

countMenus

public int countMenus()
Deprecated. As of JDK version 1.1, replaced by getMenuCount().

getMenu

public Menu getMenu(int i)
Gets the specified menu.
Parameters:
i - the index position of the menu to be returned.
Returns:
the menu at the specified index of this menu bar.

shortcuts

public Enumeration shortcuts()
Gets an enumeration of all menu shortcuts this menu bar is managing.
Returns:
an enumeration of menu shortcuts that this menu bar is managing.
Since:
JDK1.1
See Also:
MenuShortcut

getShortcutMenuItem

public MenuItem getShortcutMenuItem(MenuShortcut s)
Gets the instance of MenuItem associated with the specified MenuShortcut object, or null if none of the menu items being managed by this menu bar is associated with the specified menu shortcut.
Parameters:
s - the specified menu shortcut.
Since:
JDK1.1
See Also:
MenuItem, MenuShortcut

deleteShortcut

public void deleteShortcut(MenuShortcut s)
Deletes the specified menu shortcut.
Parameters:
s - the menu shortcut to delete.
Since:
JDK1.1

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this MenuBar. For menu bars, the AccessibleContext takes the form of an AccessibleAWTMenuBar. A new AccessibleAWTMenuBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class MenuComponent
Returns:
an AccessibleAWTMenuBar that serves as the AccessibleContext of this MenuBar
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuComponent

java.lang.Object
  |
  +--java.awt.MenuComponent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MenuBar, MenuItem
public abstract class MenuComponent
extends Object
implements Serializable

The abstract class MenuComponent is the superclass of all menu-related components. In this respect, the class MenuComponent is analogous to the abstract superclass Component for AWT components.

Menu components receive and process AWT events, just as components do, through the method processEvent.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class MenuComponent.AccessibleAWTMenuComponent
Inner class of MenuComponent used to provide default support for accessibility.
Constructor Summary
MenuComponent()
Constructor for MenuComponent.
Method Summary
void | dispatchEvent(AWTEvent e)
AccessibleContext | getAccessibleContext() Get the AccessibleContext associated with this MenuComponent
Font | getFont() Gets the font used for this menu component.
String | getName() Gets the name of the menu component.
MenuContainer | getParent() Returns the parent container for this menu component.
java.awt.peer.MenuComponentPeer | getPeer() Deprecated. As of JDK version 1.1, programs should not directly manipulate peers.
protected Object | getTreeLock() Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
protected String | paramString() Returns the parameter string representing the state of this menu component.
boolean | postEvent(Event evt) Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
protected void | processEvent(AWTEvent e) Processes events occurring on this menu component.
void | removeNotify() Removes the menu component's peer.
void | setFont(Font f) Sets the font to be used for this menu component to the specified font.
void | setName(String name) Sets the name of the component to the specified string.
String | toString() Returns a representation of this menu component as a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuComponent

public MenuComponent()
Constructor for MenuComponent.
Method Detail

getName

public String getName()
Gets the name of the menu component.
Returns:
the name of the menu component.
Since:
JDK1.1
See Also:
setName(java.lang.String)

setName

public void setName(String name)
Sets the name of the component to the specified string.
Parameters:
name - the name of the menu component.
Since:
JDK1.1
See Also:
getName()

getParent

public MenuContainer getParent()
Returns the parent container for this menu component.
Returns:
the menu component containing this menu component, or null if this menu component is the outermost component, the menu bar itself.

getPeer

public java.awt.peer.MenuComponentPeer getPeer()
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers.

getFont

public Font getFont()
Gets the font used for this menu component.
Returns:
the font used in this menu component, if there is one; null otherwise.
See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font f)
Sets the font to be used for this menu component to the specified font. This font is also used by all subcomponents of this menu component, unless those subcomponents specify a different font.
Parameters:
f - the font to be set.
See Also:
getFont()

removeNotify

public void removeNotify()
Removes the menu component's peer. The peer allows us to modify the appearance of the menu component without changing the functionality of the menu component.

postEvent

public boolean postEvent(Event evt)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).

Posts the specified event to the menu. This method is part of the Java 1.0 event system and it is maintained only for backwards compatibility. Its use is discouraged, and it may not be supported in the future.
Parameters:
evt - the event which is to take place

dispatchEvent

public final void dispatchEvent(AWTEvent e)

processEvent

protected void processEvent(AWTEvent e)
Processes events occurring on this menu component.
Parameters:
e - the event
Since:
JDK1.1

paramString

protected String paramString()
Returns the parameter string representing the state of this menu component. This string is useful for debugging.
Returns:
the parameter string of this menu component.

toString

public String toString()
Returns a representation of this menu component as a string.
Overrides:
toString in class Object
Returns:
a string representation of this menu component.

getTreeLock

protected final Object getTreeLock()
Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
Returns:
This component's locking object.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this MenuComponent
Returns:
the AccessibleContext of this MenuComponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuContainer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface MenuContainer

All Known Implementing Classes:
Component, Menu, MenuBar, Frame
public interface MenuContainer

The super class of all menu related containers.

Method Summary
Font | getFont()
boolean | postEvent(Event evt) Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
void | remove(MenuComponent comp)

Method Detail

getFont

public Font getFont()

remove

public void remove(MenuComponent comp)

postEvent

public boolean postEvent(Event evt)
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuItem

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuItem
All Implemented Interfaces:
Accessible, Serializable
Direct Known Subclasses:
CheckboxMenuItem, Menu
public class MenuItem
extends MenuComponent
implements Accessible

All items in a menu must belong to the class MenuItem, or one of its subclasses.

The default MenuItem object embodies a simple labeled menu item.

This picture of a menu bar shows five menu items:
The first two items are simple menu items, labeled "Basic" and "Simple". Following these two items is a separator, which is itself a menu item, created with the label "-". Next is an instance of CheckboxMenuItem labeled "Check". The final menu item is a submenu labeled "More Examples", and this submenu is an instance of Menu.

When a menu item is selected, AWT sends an action event to the menu item. Since the event is an instance of ActionEvent, the processEvent method examines the event and passes it along to processActionEvent. The latter method redirects the event to any ActionListener objects that have registered an interest in action events generated by this menu item.

Note that the subclass Menu overrides this behavior and does not send any event to the frame until one of its subitems is selected.

See Also:
Serialized Form

Inner Class Summary
protected  class MenuItem.AccessibleAWTMenuItem
Inner class of MenuItem used to provide default support for accessibility.
Inner classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
Constructor Summary
MenuItem()
Constructs a new MenuItem with an empty label and no keyboard shortcut.
MenuItem(String label)
Constructs a new MenuItem with the specified label and no keyboard shortcut.
MenuItem(String label, MenuShortcut s)
Create a menu item with an associated keyboard shortcut.
Method Summary
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this menu item.
void | addNotify() Creates the menu item's peer.
void | deleteShortcut() Delete any MenuShortcut object associated with this menu item.
void | disable() Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
protected void | disableEvents(long eventsToDisable) Disables event delivery to this menu item for events defined by the specified event mask parameter.
void | enable() Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
void | enable(boolean b) Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
protected void | enableEvents(long eventsToEnable) Enables event delivery to this menu item for events to be defined by the specified event mask parameter
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this MenuItem.
String | getActionCommand() Gets the command name of the action event that is fired by this menu item.
String | getLabel() Gets the label for this menu item.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the MenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
MenuShortcut | getShortcut() Get the MenuShortcut object associated with this menu item,
boolean | isEnabled() Checks whether this menu item is enabled.
String | paramString() Returns the parameter string representing the state of this menu item.
protected void | processActionEvent(ActionEvent e) Processes action events occurring on this menu item, by dispatching them to any registered ActionListener objects.
protected void | processEvent(AWTEvent e) Processes events on this menu item.
void | removeActionListener(ActionListener l) Removes the specified action listener so it no longer receives action events from this menu item.
void | setActionCommand(String command) Sets the command name of the action event that is fired by this menu item.
void | setEnabled(boolean b) Sets whether or not this menu item can be chosen.
void | setLabel(String label) Sets the label for this menu item to the specified label.
void | setShortcut(MenuShortcut s) Set the MenuShortcut object associated with this menu item.
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, removeNotify, setFont, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuItem

public MenuItem()
Constructs a new MenuItem with an empty label and no keyboard shortcut.
Since:
JDK1.1

MenuItem

public MenuItem(String label)
Constructs a new MenuItem with the specified label and no keyboard shortcut. Note that use of "-" in a label is reserved to indicate a separator between menu items. By default, all menu items except for separators are enabled.
Parameters:
label - the label for this menu item.
Since:
JDK1.0

MenuItem

public MenuItem(String label,
                MenuShortcut s)
Create a menu item with an associated keyboard shortcut. Note that use of "-" in a label is reserved to indicate a separator between menu items. By default, all menu items except for separators are enabled.
Parameters:
label - the label for this menu item.
s - the instance of MenuShortcut associated with this menu item.
Since:
JDK1.1
Method Detail

addNotify

public void addNotify()
Creates the menu item's peer. The peer allows us to modify the appearance of the menu item without changing its functionality.

getLabel

public String getLabel()
Gets the label for this menu item.
Returns:
the label of this menu item, or null if this menu item has no label.
Since:
JDK1.0
See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String label)
Sets the label for this menu item to the specified label.
Parameters:
label - the new label, or null for no label.
Since:
JDK1.0
See Also:
getLabel()

isEnabled

public boolean isEnabled()
Checks whether this menu item is enabled.
Since:
JDK1.0
See Also:
setEnabled(boolean)

setEnabled

public void setEnabled(boolean b)
Sets whether or not this menu item can be chosen.
Parameters:
b - if true, enables this menu item; if false, disables it.
Since:
JDK1.1
See Also:
isEnabled()

enable

public void enable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

enable

public void enable(boolean b)
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

disable

public void disable()
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

getShortcut

public MenuShortcut getShortcut()
Get the MenuShortcut object associated with this menu item,
Returns:
the menu shortcut associated with this menu item, or null if none has been specified.
Since:
JDK1.1
See Also:
setShortcut(java.awt.MenuShortcut)

setShortcut

public void setShortcut(MenuShortcut s)
Set the MenuShortcut object associated with this menu item. If a menu shortcut is already associated with this menu item, it is replaced.
Parameters:
s - the menu shortcut to associate with this menu item.
Since:
JDK1.1
See Also:
getShortcut()

deleteShortcut

public void deleteShortcut()
Delete any MenuShortcut object associated with this menu item.
Since:
JDK1.1

enableEvents

protected final void enableEvents(long eventsToEnable)
Enables event delivery to this menu item for events to be defined by the specified event mask parameter

Since event types are automatically enabled when a listener for that type is added to the menu item, this method only needs to be invoked by subclasses of MenuItem which desire to have the specified event types delivered to processEvent regardless of whether a listener is registered.

Parameters:
eventsToEnable - the event mask defining the event types.
Since:
JDK1.1
See Also:
processEvent(java.awt.AWTEvent), disableEvents(long), Component.enableEvents(long)

disableEvents

protected final void disableEvents(long eventsToDisable)
Disables event delivery to this menu item for events defined by the specified event mask parameter.
Parameters:
eventsToDisable - the event mask defining the event types.
Since:
JDK1.1
See Also:
processEvent(java.awt.AWTEvent), enableEvents(long), Component.disableEvents(long)

setActionCommand

public void setActionCommand(String command)
Sets the command name of the action event that is fired by this menu item.

By default, the action command is set to the label of the menu item.

Parameters:
command - the action command to be set for this menu item.
Since:
JDK1.1
See Also:
getActionCommand()

getActionCommand

public String getActionCommand()
Gets the command name of the action event that is fired by this menu item.
Since:
JDK1.1
See Also:
setActionCommand(java.lang.String)

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this menu item. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, removeActionListener(java.awt.event.ActionListener)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so it no longer receives action events from this menu item. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, addActionListener(java.awt.event.ActionListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the MenuItem with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ActionListener(s) for the given MenuItem m, one would write:
 ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class))
If no such listener list exists, then an empty array is returned.
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this menu item
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this menu item. If the event is an instance of ActionEvent, it invokes processActionEvent, another method defined by MenuItem.

Currently, menu items only support action events.

Overrides:
processEvent in class MenuComponent
Parameters:
e - the event.
Since:
JDK1.1
See Also:
processActionEvent(java.awt.event.ActionEvent)

processActionEvent

protected void processActionEvent(ActionEvent e)
Processes action events occurring on this menu item, by dispatching them to any registered ActionListener objects. This method is not called unless action events are enabled for this component. Action events are enabled when one of the following occurs:

  • An ActionListener object is registered via addActionListener.
  • Action events are enabled via enableEvents.
Parameters:
e - the action event.
Since:
JDK1.1
See Also:
ActionEvent, ActionListener, enableEvents(long)

paramString

public String paramString()
Returns the parameter string representing the state of this menu item. This string is useful for debugging.
Overrides:
paramString in class MenuComponent
Returns:
the parameter string of this menu item.
Since:
JDK1.0

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this MenuItem. For menu items, the AccessibleContext takes the form of an AccessibleAWTMenuItem. A new AccessibleAWTMenuItem instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class MenuComponent
Returns:
an AccessibleAWTMenuItem that serves as the AccessibleContext of this MenuItem
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuShortcut

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class MenuShortcut

java.lang.Object
  |
  +--java.awt.MenuShortcut
All Implemented Interfaces:
Serializable
public class MenuShortcut
extends Object
implements Serializable

A class which represents a keyboard accelerator for a MenuItem.

See Also:
Serialized Form

Constructor Summary
MenuShortcut(int key)
Constructs a new MenuShortcut for the specified key.
MenuShortcut(int key, boolean useShiftModifier)
Constructs a new MenuShortcut for the specified key.
Method Summary
boolean | equals(MenuShortcut s) Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
boolean | equals(Object obj) Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
int | getKey() Return the raw keycode of this MenuShortcut.
int | hashCode() Returns the hashcode for this MenuShortcut.
protected String | paramString()
String | toString() Returns an internationalized description of the MenuShortcut.
boolean | usesShiftModifier() Return whether this MenuShortcut must be invoked using the SHIFT key.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuShortcut

public MenuShortcut(int key)
Constructs a new MenuShortcut for the specified key.
Parameters:
key - the raw keycode for this MenuShortcut, as would be returned in the keyCode field of a KeyEvent if this key were pressed.

MenuShortcut

public MenuShortcut(int key,
                    boolean useShiftModifier)
Constructs a new MenuShortcut for the specified key.
Parameters:
key - the raw keycode for this MenuShortcut, as would be returned in the keyCode field of a KeyEvent if this key were pressed.
useShiftModifier - indicates whether this MenuShortcut is invoked with the SHIFT key down.
Method Detail

getKey

public int getKey()
Return the raw keycode of this MenuShortcut.

usesShiftModifier

public boolean usesShiftModifier()
Return whether this MenuShortcut must be invoked using the SHIFT key.

equals

public boolean equals(MenuShortcut s)
Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
Parameters:
s - the MenuShortcut to compare with this.

equals

public boolean equals(Object obj)
Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with this.

hashCode

public int hashCode()
Returns the hashcode for this MenuShortcut.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns an internationalized description of the MenuShortcut.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

paramString

protected String paramString()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultipleDocumentHandlingType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes.MultipleDocumentHandlingType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.JobAttributes.MultipleDocumentHandlingType
Enclosing class:
JobAttributes
public static final class JobAttributes.MultipleDocumentHandlingType
extends java.awt.AttributeValue

A type-safe enumeration of possible multiple document handling states. These states are in partial compliance with IPP 1.1.

Field Summary
static JobAttributes.MultipleDocumentHandlingType | SEPARATE_DOCUMENTS_COLLATED_COPIES The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, collated documents.
static JobAttributes.MultipleDocumentHandlingType | SEPARATE_DOCUMENTS_UNCOLLATED_COPIES The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, uncollated documents.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

SEPARATE_DOCUMENTS_COLLATED_COPIES

public static final JobAttributes.MultipleDocumentHandlingType SEPARATE_DOCUMENTS_COLLATED_COPIES
The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, collated documents.

SEPARATE_DOCUMENTS_UNCOLLATED_COPIES

public static final JobAttributes.MultipleDocumentHandlingType SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
The MultipleDocumentHandlingType instance to use for specifying that the job should be divided into separate, uncollated documents.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrientationRequestedType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes.OrientationRequestedType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.PageAttributes.OrientationRequestedType
Enclosing class:
PageAttributes
public static final class PageAttributes.OrientationRequestedType
extends java.awt.AttributeValue

A type-safe enumeration of possible orientations. These orientations are in partial compliance with IPP 1.1.

Field Summary
static PageAttributes.OrientationRequestedType | LANDSCAPE The OrientationRequestedType instance to use for specifying a landscape orientation.
static PageAttributes.OrientationRequestedType | PORTRAIT The OrientationRequestedType instance to use for specifying a portrait orientation.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

PORTRAIT

public static final PageAttributes.OrientationRequestedType PORTRAIT
The OrientationRequestedType instance to use for specifying a portrait orientation.

LANDSCAPE

public static final PageAttributes.OrientationRequestedType LANDSCAPE
The OrientationRequestedType instance to use for specifying a landscape orientation.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OriginType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes.OriginType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.PageAttributes.OriginType
Enclosing class:
PageAttributes
public static final class PageAttributes.OriginType
extends java.awt.AttributeValue

A type-safe enumeration of possible origins.

Field Summary
static PageAttributes.OriginType | PHYSICAL The OriginType instance to use for specifying a physical origin.
static PageAttributes.OriginType | PRINTABLE The OriginType instance to use for specifying a printable origin.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

PHYSICAL

public static final PageAttributes.OriginType PHYSICAL
The OriginType instance to use for specifying a physical origin.

PRINTABLE

public static final PageAttributes.OriginType PRINTABLE
The OriginType instance to use for specifying a printable origin.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PageAttributes

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes

java.lang.Object
  |
  +--java.awt.PageAttributes
All Implemented Interfaces:
Cloneable
public final class PageAttributes
extends Object
implements Cloneable

A set of attributes which control the output of a printed page.

Instances of this class control the color state, paper size (media type), orientation, logical origin, print quality, and resolution of every page which uses the instance. Attribute names are compliant with the Internet Printing Protocol (IPP) 1.1 where possible. Attribute values are partially compliant where possible.

To use a method which takes an inner class type, pass a reference to one of the constant fields of the inner class. Client code cannot create new instances of the inner class types because none of those classes has a public constructor. For example, to set the color state to monochrome, use the following code:

 import java.awt.PageAttributes;

 public class MonochromeExample {
     public void setMonochrome(PageAttributes pageAttributes) {
         pageAttributes.setColor(PageAttributes.ColorType.MONOCHROME);
     }
 }

Every IPP attribute which supports an attributeName-default value has a corresponding setattributeNameToDefault method. Default value fields are not provided.

Inner Class Summary
static class | PageAttributes.ColorType A type-safe enumeration of possible color states.
static class | PageAttributes.MediaType A type-safe enumeration of possible paper sizes.
static class | PageAttributes.OrientationRequestedType A type-safe enumeration of possible orientations.
static class | PageAttributes.OriginType A type-safe enumeration of possible origins.
static class | PageAttributes.PrintQualityType A type-safe enumeration of possible print qualities.
Constructor Summary
PageAttributes()
Constructs a PageAttributes instance with default values for every attribute.
PageAttributes(PageAttributes.ColorType color, PageAttributes.MediaType media, PageAttributes.OrientationRequestedType orientationRequested, PageAttributes.OriginType origin, PageAttributes.PrintQualityType printQuality, int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.
PageAttributes(PageAttributes obj)
Constructs a PageAttributes instance which is a copy of the supplied PageAttributes.
Method Summary
Object | clone() Creates and returns a copy of this PageAttributes.
boolean | equals(Object obj) Determines whether two PageAttributes are equal to each other.
PageAttributes.ColorType | getColor() Returns whether pages using these attributes will be rendered in color or monochrome.
PageAttributes.MediaType | getMedia() Returns the paper size for pages using these attributes.
PageAttributes.OrientationRequestedType | getOrientationRequested() Returns the print orientation for pages using these attributes.
PageAttributes.OriginType | getOrigin() Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.
int[] | getPrinterResolution() Returns the print resolution for pages using these attributes.
PageAttributes.PrintQualityType | getPrintQuality() Returns the print quality for pages using these attributes.
int | hashCode() Returns a hash code value for this PageAttributes.
void | set(PageAttributes obj) Sets all of the attributes of this PageAttributes to the same values as the attributes of obj.
void | setColor(PageAttributes.ColorType color) Specifies whether pages using these attributes will be rendered in color or monochrome.
void | setMedia(PageAttributes.MediaType media) Specifies the desired paper size for pages using these attributes.
void | setMediaToDefault() Sets the paper size for pages using these attributes to the default size for the default locale.
void | setOrientationRequested(int orientationRequested) Specifies the print orientation for pages using these attributes.
void | setOrientationRequested(PageAttributes.OrientationRequestedType orientationRequested) Specifies the print orientation for pages using these attributes.
void | setOrientationRequestedToDefault() Sets the print orientation for pages using these attributes to the default.
void | setOrigin(PageAttributes.OriginType origin) Specifies whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.
void | setPrinterResolution(int printerResolution) Specifies the desired cross feed and feed print resolutions in dots per inch for pages using these attributes.
void | setPrinterResolution(int[] printerResolution) Specifies the desired print resolution for pages using these attributes.
void | setPrinterResolutionToDefault() Sets the printer resolution for pages using these attributes to the default.
void | setPrintQuality(int printQuality) Specifies the print quality for pages using these attributes.
void | setPrintQuality(PageAttributes.PrintQualityType printQuality) Specifies the print quality for pages using these attributes.
void | setPrintQualityToDefault() Sets the print quality for pages using these attributes to the default.
String | toString() Returns a string representation of this PageAttributes.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PageAttributes

public PageAttributes()
Constructs a PageAttributes instance with default values for every attribute.

PageAttributes

public PageAttributes(PageAttributes obj)
Constructs a PageAttributes instance which is a copy of the supplied PageAttributes.
Parameters:
obj - the PageAttributes to copy.

PageAttributes

public PageAttributes(PageAttributes.ColorType color,
                      PageAttributes.MediaType media,
                      PageAttributes.OrientationRequestedType orientationRequested,
                      PageAttributes.OriginType origin,
                      PageAttributes.PrintQualityType printQuality,
                      int[] printerResolution)
Constructs a PageAttributes instance with the specified values for every attribute.
Parameters:
color - ColorType.COLOR or ColorType.MONOCHROME.
media - one of the constant fields of the MediaType class.
orientationRequested - OrientationRequestedType.PORTRAIT or OrientationRequestedType.LANDSCAPE.
origin - OriginType.PHYSICAL or OriginType.PRINTABLE
printQuality - PrintQualityType.DRAFT, PrintQualityType.NORMAL, or PrintQualityType.HIGH
printerResolution - an integer array of 3 elements. The first element must be greater than 0. The second element must be must be greater than 0. The third element must be either 3 or 4.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.
Method Detail

clone

public Object clone()
Creates and returns a copy of this PageAttributes.
Overrides:
clone in class Object
Returns:
the newly created copy. It is safe to cast this Object into a PageAttributes.

set

public void set(PageAttributes obj)
Sets all of the attributes of this PageAttributes to the same values as the attributes of obj.
Parameters:
obj - the PageAttributes to copy.

getColor

public PageAttributes.ColorType getColor()
Returns whether pages using these attributes will be rendered in color or monochrome. This attribute is updated to the value chosen by the user.
Returns:
ColorType.COLOR or ColorType.MONOCHROME.

setColor

public void setColor(PageAttributes.ColorType color)
Specifies whether pages using these attributes will be rendered in color or monochrome. Not specifying this attribute is equivalent to specifying ColorType.MONOCHROME.
Parameters:
color - ColorType.COLOR or ColorType.MONOCHROME.
Throws:
IllegalArgumentException - if color is null.

getMedia

public PageAttributes.MediaType getMedia()
Returns the paper size for pages using these attributes. This attribute is updated to the value chosen by the user.
Returns:
one of the constant fields of the MediaType class.

setMedia

public void setMedia(PageAttributes.MediaType media)
Specifies the desired paper size for pages using these attributes. The actual paper size will be determined by the limitations of the target printer. If an exact match cannot be found, an implementation will choose the closest possible match. Not specifying this attribute is equivalent to specifying the default size for the default locale. The default size for locales in the United States and Canada is MediaType.NA_LETTER. The default size for all other locales is MediaType.ISO_A4.
Parameters:
media - one of the constant fields of the MediaType class.
Throws:
IllegalArgumentException - if media is null.

setMediaToDefault

public void setMediaToDefault()
Sets the paper size for pages using these attributes to the default size for the default locale. The default size for locales in the United States and Canada is MediaType.NA_LETTER. The default size for all other locales is MediaType.ISO_A4.

getOrientationRequested

public PageAttributes.OrientationRequestedType getOrientationRequested()
Returns the print orientation for pages using these attributes. This attribute is updated to the value chosen by the user.
Returns:
OrientationRequestedType.PORTRAIT or OrientationRequestedType.LANDSCAPE.

setOrientationRequested

public void setOrientationRequested(PageAttributes.OrientationRequestedType orientationRequested)
Specifies the print orientation for pages using these attributes. Not specifying the property is equivalent to specifying OrientationRequestedType.PORTRAIT.
Parameters:
orientationRequested - OrientationRequestedType.PORTRAIT or OrientationRequestedType.LANDSCAPE.
Throws:
IllegalArgumentException - if orientationRequested is null.

setOrientationRequested

public void setOrientationRequested(int orientationRequested)
Specifies the print orientation for pages using these attributes. Specifying 3 denotes portrait. Specifying 4 denotes landscape. Specifying any other value will generate an IllegalArgumentException. Not specifying the property is equivalent to calling setOrientationRequested(OrientationRequestedType.PORTRAIT).
Parameters:
orientationRequested - 3 or 4
Throws:
IllegalArgumentException - if orientationRequested is not 3 or 4

setOrientationRequestedToDefault

public void setOrientationRequestedToDefault()
Sets the print orientation for pages using these attributes to the default. The default orientation is portrait.

getOrigin

public PageAttributes.OriginType getOrigin()
Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area. (Note that these locations could be equivalent.) This attribute cannot be modified by, and is not subject to any limitations of, the implementation or the target printer.
Returns:
OriginType.PHYSICAL or OriginType.PRINTABLE

setOrigin

public void setOrigin(PageAttributes.OriginType origin)
Specifies whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area. (Note that these locations could be equivalent.) Not specifying the property is equivalent to specifying OriginType.PHYSICAL.
Parameters:
origin - OriginType.PHYSICAL or OriginType.PRINTABLE
Throws:
IllegalArgumentException - if origin is null.

getPrintQuality

public PageAttributes.PrintQualityType getPrintQuality()
Returns the print quality for pages using these attributes. This attribute is updated to the value chosen by the user.
Returns:
PrintQualityType.DRAFT, PrintQualityType.NORMAL, or PrintQualityType.HIGH

setPrintQuality

public void setPrintQuality(PageAttributes.PrintQualityType printQuality)
Specifies the print quality for pages using these attributes. Not specifying the property is equivalent to specifying PrintQualityType.NORMAL.
Parameters:
printQuality - PrintQualityType.DRAFT, PrintQualityType.NORMAL, or PrintQualityType.HIGH
Throws:
IllegalArgumentException - if printQuality is null.

setPrintQuality

public void setPrintQuality(int printQuality)
Specifies the print quality for pages using these attributes. Specifying 3 denotes draft. Specifying 4 denotes normal. Specifying 5 denotes high. Specifying any other value will generate an IllegalArgumentException. Not specifying the property is equivalent to calling setPrintQuality(PrintQualityType.NORMAL).
Parameters:
printQuality - 3, 4, or 5
Throws:
IllegalArgumentException - if printQuality is not 3 , 4, or 5

setPrintQualityToDefault

public void setPrintQualityToDefault()
Sets the print quality for pages using these attributes to the default. The default print quality is normal.

getPrinterResolution

public int[] getPrinterResolution()
Returns the print resolution for pages using these attributes. Index 0 of the array specifies the cross feed direction resolution (typically the horizontal resolution). Index 1 of the array specifies the feed direction resolution (typically the vertical resolution). Index 2 of the array specifies whether the resolutions are in dots per inch or dots per centimeter. 3 denotes dots per inch. 4 denotes dots per centimeter.
Returns:
an integer array of 3 elements. The first element must be greater than 0. The second element must be must be greater than 0. The third element must be either 3 or 4.

setPrinterResolution

public void setPrinterResolution(int[] printerResolution)
Specifies the desired print resolution for pages using these attributes. The actual resolution will be determined by the limitations of the implementation and the target printer. Index 0 of the array specifies the cross feed direction resolution (typically the horizontal resolution). Index 1 of the array specifies the feed direction resolution (typically the vertical resolution). Index 2 of the array specifies whether the resolutions are in dots per inch or dots per centimeter. 3 denotes dots per inch. 4 denotes dots per centimeter. Note that the 1.1 printing implementation (Toolkit.getPrintJob) requires that the feed and cross feed resolutions be the same. Not specifying the property is equivalent to calling setPrinterResolution(72).
Parameters:
printerResolution - an integer array of 3 elements. The first element must be greater than 0. The second element must be must be greater than 0. The third element must be either 3 or 4.
Throws:
IllegalArgumentException - if one or more of the above conditions is violated.

setPrinterResolution

public void setPrinterResolution(int printerResolution)
Specifies the desired cross feed and feed print resolutions in dots per inch for pages using these attributes. The same value is used for both resolutions. The actual resolutions will be determined by the limitations of the implementation and the target printer. Not specifying the property is equivalent to specifying 72.
Parameters:
printerResolution - an integer greater than 0.
Throws:
IllegalArgumentException - if printerResolution is less than or equal to 0.

setPrinterResolutionToDefault

public void setPrinterResolutionToDefault()
Sets the printer resolution for pages using these attributes to the default. The default is 72 dpi for both the feed and cross feed resolutions.

equals

public boolean equals(Object obj)
Determines whether two PageAttributes are equal to each other.

Two PageAttributes are equal if and only if each of their attributes are equal. Attributes of enumeration type are equal if and only if the fields refer to the same unique enumeration object. This means that an aliased media is equal to its underlying unique media. Printer resolutions are equal if and only if the feed resolution, cross feed resolution, and units are equal.

Overrides:
equals in class Object
Parameters:
obj - the object whose equality will be checked.
Returns:
whether obj is equal to this PageAttribute according to the above criteria.

hashCode

public int hashCode()
Returns a hash code value for this PageAttributes.
Overrides:
hashCode in class Object
Returns:
the hash code.

toString

public String toString()
Returns a string representation of this PageAttributes.
Overrides:
toString in class Object
Returns:
the string representation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Paint

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Paint

All Superinterfaces:
Transparency
All Known Implementing Classes:
Color, GradientPaint, TexturePaint
public interface Paint
extends Transparency

This Paint interface defines how color patterns can be generated for Graphics2D operations. A class implementing the Paint interface is added to the Graphics2D context in order to define the color pattern used by the draw and fill methods.

Instances of classes implementing Paint must be read-only because the Graphics2D does not clone these objects when they are set as an attribute with the setPaint method or when the Graphics2D object is itself cloned.

See Also:
PaintContext, Color, GradientPaint, TexturePaint, Graphics2D.setPaint(java.awt.Paint)

Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Method Summary
 PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns a PaintContext used to generate the color pattern.
Methods inherited from interface java.awt.Transparency
getTransparency

Method Detail

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform xform,
                                  RenderingHints hints)
Creates and returns a PaintContext used to generate the color pattern.
Parameters:
cm - the ColorModel that receives the Paint data. This is used only as a hint.
deviceBounds - the device space bounding box of the graphics primitive being rendered
userBounds - the user space bounding box of the graphics primitive being rendered
xform - the AffineTransform from user space into device space
hints - the hint that the context object uses to choose between rendering alternatives
Returns:
the PaintContext for generating color patterns
See Also:
PaintContext
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PaintContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface PaintContext

public interface PaintContext

The PaintContext interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on a Graphics2D. The PaintContext provides the necessary colors for Graphics2D operations in the form of a Raster associated with a ColorModel. The PaintContext maintains state for a particular paint operation. In a multi-threaded environment, several contexts can exist simultaneously for a single Paint object.

See Also:
Paint

Method Summary
void | dispose() Releases the resources allocated for the operation.
ColorModel | getColorModel() Returns the ColorModel of the output.
Raster | getRaster(int x, int y, int w, int h) Returns a Raster containing the colors generated for the graphics operation.

Method Detail

dispose

public void dispose()
Releases the resources allocated for the operation.

getColorModel

public ColorModel getColorModel()
Returns the ColorModel of the output. Note that this ColorModel might be different from the hint specified in the createContext method of Paint. Not all PaintContext objects are capable of generating color patterns in an arbitrary ColorModel.
Returns:
the ColorModel of the output.

getRaster

public Raster getRaster(int x,
                        int y,
                        int w,
                        int h)
Returns a Raster containing the colors generated for the graphics operation.
Parameters:
x, y - the coordinates of the area in device space for which colors are generated.
w - the width of the area in device space
h - the height of the area in device space
Returns:
a Raster representing the specified rectangular area and containing the colors generated for the graphics operation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Panel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Panel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Applet
public class Panel
extends Container
implements Accessible

Panel is the simplest container class. A panel provides space in which an application can attach any other component, including other panels.

The default layout manager for a panel is the FlowLayout layout manager.

Since:
JDK1.0
See Also:
FlowLayout, Serialized Form

Inner Class Summary
protected  class Panel.AccessibleAWTPanel
This class implements accessibility support for the Panel class.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Panel()
Creates a new panel using the default layout manager.
Panel(LayoutManager layout)
Creates a new panel with the specified layout manager.
Method Summary
void | addNotify() Creates the Panel's peer.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Panel.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Panel

public Panel()
Creates a new panel using the default layout manager. The default layout manager for all panels is the FlowLayout class.

Panel

public Panel(LayoutManager layout)
Creates a new panel with the specified layout manager.
Parameters:
layout - the layout manager for this panel.
Since:
JDK1.1
Method Detail

addNotify

public void addNotify()
Creates the Panel's peer. The peer allows you to modify the appearance of the panel without changing its functionality.
Overrides:
addNotify in class Container
Following copied from class: java.awt.Container
See Also:
Component.isDisplayable(), Container.removeNotify()

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Panel. For panels, the AccessibleContext takes the form of an AccessibleAWTPanel. A new AccessibleAWTPanel instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTPanel that serves as the AccessibleContext of this Panel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Point

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Point

java.lang.Object
  |
  +--java.awt.geom.Point2D
        |
        +--java.awt.Point
All Implemented Interfaces:
Cloneable, Serializable
public class Point
extends Point2D
implements Serializable

A point representing a location in (x, y) coordinate space, specified in integer precision.

Since:
JDK1.0
See Also:
Serialized Form

Inner classes inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
Field Summary
int | x The x coordinate.
int | y The y coordinate.
Constructor Summary
Point()
Constructs and initializes a point at the origin (0, 0) of the coordinate space.
Point(int x, int y)
Constructs and initializes a point at the specified (x, y) location in the coordinate space.
Point(Point p)
Constructs and initializes a point with the same location as the specified Point object.
Method Summary
boolean | equals(Object obj) Determines whether an instance of Point2D is equal to this point.
Point | getLocation() Returns the location of this point.
double | getX() Returns the X coordinate of the point in double precision.
double | getY() Returns the Y coordinate of the point in double precision.
void | move(int x, int y) Moves this point to the specificed location in the (x, y) coordinate plane.
void | setLocation(double x, double y) Sets the location of this point to the specified float coordinates.
void | setLocation(int x, int y) Changes the point to have the specificed location.
void | setLocation(Point p) Sets the location of the point to the specificed location.
String | toString() Returns a string representation of this point and its location in the (x, y) coordinate space.
void | translate(int x, int y) Translates this point, at location (x, y), by dx along the x axis and dy along the y axis so that it now represents the point (x + dx, y + dy).
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

x

public int x
The x coordinate. If no x coordinate is set it will default to '0'.
See Also:
getLocation(), move(int, int)

y

public int y
The y coordinate. If no y coordinate is set it will default to '0'.
See Also:
getLocation(), move(int, int)
Constructor Detail

Point

public Point()
Constructs and initializes a point at the origin (0, 0) of the coordinate space.
Since:
JDK1.1

Point

public Point(Point p)
Constructs and initializes a point with the same location as the specified Point object.
Parameters:
p - a point.
Since:
JDK1.1

Point

public Point(int x,
             int y)
Constructs and initializes a point at the specified (x, y) location in the coordinate space.
Parameters:
x - the x coordinate.
y - the y coordinate.
Method Detail

getX

public double getX()
Returns the X coordinate of the point in double precision.
Overrides:
getX in class Point2D
Following copied from class: java.awt.geom.Point2D
Returns:
the X coordinate of this Point2D.

getY

public double getY()
Returns the Y coordinate of the point in double precision.
Overrides:
getY in class Point2D
Following copied from class: java.awt.geom.Point2D
Returns:
the Y coordinate of this Point2D.

getLocation

public Point getLocation()
Returns the location of this point. This method is included for completeness, to parallel the getLocation method of Component.
Returns:
a copy of this point, at the same location.
Since:
JDK1.1
See Also:
Component.getLocation(),
setLocation(java.awt.Point),
setLocation(int, int)

setLocation

public void setLocation(Point p)
Sets the location of the point to the specificed location. This method is included for completeness, to parallel the setLocation method of Component.
Parameters:
p - a point, the new location for this point.
Since:
JDK1.1
See Also:
Component.setLocation(java.awt.Point), getLocation()

setLocation

public void setLocation(int x,
                        int y)
Changes the point to have the specificed location.

This method is included for completeness, to parallel the setLocation method of Component. Its behavior is identical with move(int, int).

Parameters:
x - the x coordinate of the new location.
y - the y coordinate of the new location.
Since:
JDK1.1
See Also:
Component.setLocation(int, int),
getLocation(),
move(int, int)

setLocation

public void setLocation(double x,
                        double y)
Sets the location of this point to the specified float coordinates.
Overrides:
setLocation in class Point2D
Following copied from class: java.awt.geom.Point2D
Parameters:
x, y - the coordinates of this Point2D

move

public void move(int x,
                 int y)
Moves this point to the specificed location in the (x, y) coordinate plane. This method is identical with setLocation(int, int).
Parameters:
x - the x coordinate of the new location.
y - the y coordinate of the new location.
See Also:
Component.setLocation(int, int)

translate

public void translate(int x,
                      int y)
Translates this point, at location (x, y), by dx along the x axis and dy along the y axis so that it now represents the point (x + dx, y + dy).
Parameters:
x - the distance to move this point along the x axis.
y - the distance to move this point along the y axis.

equals

public boolean equals(Object obj)
Determines whether an instance of Point2D is equal to this point. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
Overrides:
equals in class Point2D
Parameters:
obj - an object to be compared with this point.
Returns:
true if the object to be compared is an instance of Point2D and has the same values; false otherwise.

toString

public String toString()
Returns a string representation of this point and its location in the (x, y) coordinate space. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
toString in class Object
Returns:
a string representation of this point.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Polygon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Polygon

java.lang.Object
  |
  +--java.awt.Polygon
All Implemented Interfaces:
Serializable, Shape
public class Polygon
extends Object
implements Shape, Serializable

The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space. This region is bounded by an arbitrary number of line segments, each of which is one side of the polygon. Internally, a polygon comprises of a list of (x, y) coordinate pairs, where each pair defines a vertex of the polygon, and two successive pairs are the endpoints of a line that is a side of the polygon. The first and final pairs of (x, y) points are joined by a line segment that closes the polygon. This Polygon is defined with an even-odd winding rule. See WIND_EVEN_ODD for a definition of the even-odd winding rule. This class's hit-testing methods, which include the contains, intersects and inside methods, use the insideness definition described in the Shape class comments.

Since:
JDK1.0
See Also:
Shape, Serialized Form

Field Summary
protected Rectangle | bounds Bounds of the polygon.
int | npoints The total number of points.
int[] | xpoints The array of x coordinates.
int[] | ypoints The array of y coordinates.
Constructor Summary
Polygon()
Creates an empty polygon.
Polygon(int[] xpoints, int[] ypoints, int npoints)
Constructs and initializes a Polygon from the specified parameters.
Method Summary
 void addPoint(int x, int y)
Appends the specified coordinates to this Polygon.
 boolean contains(double x, double y)
Determines whether the specified coordinates are inside this Polygon.
 boolean contains(double x, double y, double w, double h)
Tests if the interior of this Polygon entirely contains the specified set of rectangular coordinates.
 boolean contains(int x, int y)
Determines whether the specified coordinates are inside this Polygon.
 boolean contains(Point p)
Determines whether the specified Point is inside this Polygon.
 boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of this Polygon.
 boolean contains(Rectangle2D r)
Tests if the interior of this Polygon entirely contains the specified Rectangle2D.
 Rectangle getBoundingBox()
Deprecated. As of JDK version 1.1, replaced by getBounds().
 Rectangle getBounds()
Gets the bounding box of this Polygon.
 Rectangle2D getBounds2D()
Returns the high precision bounding box of the Shape.
 PathIterator getPathIterator(AffineTransform at)
Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon.
 PathIterator getPathIterator(AffineTransform at, double flatness)
Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape.
 boolean inside(int x, int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
 boolean intersects(double x, double y, double w, double h)
Tests if the interior of this Polygon intersects the interior of a specified set of rectangular coordinates.
 boolean intersects(Rectangle2D r)
Tests if the interior of this Polygon intersects the interior of a specified Rectangle2D.
 void translate(int deltaX, int deltaY)
Translates the vertices of the Polygon by deltaX along the x axis and by deltaY along the y axis.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

npoints

public int npoints
The total number of points. This value can be NULL.
See Also:
addPoint(int, int)

xpoints

public int[] xpoints
The array of x coordinates.
See Also:
addPoint(int, int)

ypoints

public int[] ypoints
The array of y coordinates.
See Also:
addPoint(int, int)

bounds

protected Rectangle bounds
Bounds of the polygon. This value can be NULL. Please see the javadoc comments getBounds().
See Also:
getBoundingBox(), getBounds()
Constructor Detail

Polygon

public Polygon()
Creates an empty polygon.

Polygon

public Polygon(int[] xpoints,
               int[] ypoints,
               int npoints)
Constructs and initializes a Polygon from the specified parameters.
Parameters:
xpoints - an array of x coordinates
ypoints - an array of y coordinates
npoints - the total number of points in the Polygon
Throws:
NegativeArraySizeException - if the value of npoints is negative.
IndexOutOfBoundsException - if npoints is greater than the length of xpoints or the length of ypoints.
NullPointerException - if xpoints or ypoints is null.
Method Detail

translate

public void translate(int deltaX,
                      int deltaY)
Translates the vertices of the Polygon by deltaX along the x axis and by deltaY along the y axis.
Parameters:
deltaX - the amount to translate along the x axis
deltaY - the amount to translate along the y axis
Since:
JDK1.1

addPoint

public void addPoint(int x,
                     int y)
Appends the specified coordinates to this Polygon.

If an operation that calculates the bounding box of this Polygon has already been performed, such as getBounds or contains, then this method updates the bounding box.

Parameters:
x, y - the specified coordinates
See Also:
getBounds(), contains(java.awt.Point)

getBounds

public Rectangle getBounds()
Gets the bounding box of this Polygon. The bounding box is the smallest Rectangle whose sides are parallel to the x and y axes of the coordinate space, and can completely contain the Polygon.
Specified by:
getBounds in interface Shape
Returns:
a Rectangle that defines the bounds of this Polygon.
Since:
JDK1.1

getBoundingBox

public Rectangle getBoundingBox()
Deprecated. As of JDK version 1.1, replaced by getBounds().

Returns the bounds of this Polygon.
Returns:
the bounds of this Polygon.

contains

public boolean contains(Point p)
Determines whether the specified Point is inside this Polygon.
Parameters:
p - the specified Point to be tested
Returns:
true if the Polygon contains the Point; false otherwise.
See Also:
contains(double, double)

contains

public boolean contains(int x,
                        int y)
Determines whether the specified coordinates are inside this Polygon.

Parameters:
x, y - the specified coordinates to be tested
Returns:
true if this Polygon contains the specified coordinates, (x, y); false otherwise.
Since:
JDK1.1
See Also:
contains(double, double)

inside

public boolean inside(int x,
                      int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).

Determines whether the specified coordinates are contained in this Polygon.
Parameters:
x, y - the specified coordinates to be tested
Returns:
true if this Polygon contains the specified coordinates, (x, y); false otherwise.
See Also:
contains(double, double)

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of the Shape.
Specified by:
getBounds2D in interface Shape
Returns:
a Rectangle2D that precisely bounds the Shape.

contains

public boolean contains(double x,
                        double y)
Determines whether the specified coordinates are inside this Polygon. For the definition of insideness, see the class comments of Shape.
Specified by:
contains in interface Shape
Parameters:
x, y - the specified coordinates
Returns:
true if this Polygon contains the specified coordinates; false otherwise.

contains

public boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of this Polygon.
Specified by:
contains in interface Shape
Parameters:
p - a specified Point2D
Returns:
true if this Polygon contains the specified Point2D; false otherwise.
See Also:
contains(double, double)

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of this Polygon intersects the interior of a specified set of rectangular coordinates.
Specified by:
intersects in interface Shape
Parameters:
x, y - the coordinates of the specified rectangular shape's top-left corner
w - the width of the specified rectangular shape
h - the height of the specified rectangular shape
Returns:
true if the interior of this Polygon and the interior of the specified set of rectangular coordinates intersect each other; false otherwise.

intersects

public boolean intersects(Rectangle2D r)
Tests if the interior of this Polygon intersects the interior of a specified Rectangle2D.
Specified by:
intersects in interface Shape
Parameters:
r - a specified Rectangle2D
Returns:
true if this Polygon and the interior of the specified Rectangle2D intersect each other; false otherwise.

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of this Polygon entirely contains the specified set of rectangular coordinates.
Specified by:
contains in interface Shape
Parameters:
x, y - the coordinate of the top-left corner of the specified set of rectangular coordinates
w - the width of the set of rectangular coordinates
h - the height of the set of rectangular coordinates
Returns:
true if this Polygon entirely contains the specified set of rectangular coordinates; false otherwise.

contains

public boolean contains(Rectangle2D r)
Tests if the interior of this Polygon entirely contains the specified Rectangle2D.
Specified by:
contains in interface Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if this Polygon entirely contains the specified Rectangle2D; false otherwise.
See Also:
contains(double, double, double, double)

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon. An optional AffineTransform can be specified so that the coordinates returned in the iteration are transformed accordingly.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
a PathIterator object that provides access to the geometry of this Polygon.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iterator object that iterates along the boundary of the Shape and provides access to the geometry of the outline of the Shape. Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator. Since polygons are already flat, the flatness parameter is ignored. An optional AffineTransform can be specified in which case the coordinates returned in the iteration are transformed accordingly.
Specified by:
getPathIterator in interface Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
flatness - the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the endpoints. Since polygons are already flat the flatness parameter is ignored.
Returns:
a PathIterator object that provides access to the Shape object's geometry.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PopupMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PopupMenu

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuItem
              |
              +--java.awt.Menu
                    |
                    +--java.awt.PopupMenu
All Implemented Interfaces:
Accessible, MenuContainer, Serializable
public class PopupMenu
extends Menu

A class that implements a menu which can be dynamically popped up at a specified position within a component.

As the inheritance hierarchy implies, a PopupMenu can be used anywhere a Menu can be used. However, if you use a PopupMenu like a Menu (e.g., you add it to a MenuBar), then you cannot call show on that PopupMenu.

See Also:
Serialized Form

Inner Class Summary
protected  class PopupMenu.AccessibleAWTPopupMenu
Inner class of PopupMenu used to provide default support for accessibility.
Inner classes inherited from class java.awt.Menu
Menu.AccessibleAWTMenu
Inner classes inherited from class java.awt.MenuItem
MenuItem.AccessibleAWTMenuItem
Inner classes inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
Constructor Summary
PopupMenu()
Creates a new popup menu.
PopupMenu(String label)
Creates a new popup menu with the specified name.
Method Summary
void | addNotify() Creates the popup menu's peer.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this PopupMenu.
void | show(Component origin, int x, int y) Shows the popup menu at the x, y position relative to an origin component.
Methods inherited from class java.awt.Menu
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Constructor Detail

PopupMenu

public PopupMenu()
Creates a new popup menu.

PopupMenu

public PopupMenu(String label)
Creates a new popup menu with the specified name.
Parameters:
label - a non-null string specifying the popup menu's label
Method Detail

addNotify

public void addNotify()
Creates the popup menu's peer. The peer allows us to change the appearance of the popup menu without changing any of the popup menu's functionality.
Overrides:
addNotify in class Menu

show

public void show(Component origin,
                 int x,
                 int y)
Shows the popup menu at the x, y position relative to an origin component. The origin component must be contained within the component hierarchy of the popup menu's parent. Both the origin and the parent must be showing on the screen for this method to be valid.

If this PopupMenu is being used as a Menu (i.e., it has a non-Component parent), then you cannot call this method on the PopupMenu.

Parameters:
origin - the component which defines the coordinate space
x - the x coordinate position to popup the menu
y - the y coordinate position to popup the menu
Throws:
IllegalArgumentException - if this PopupMenu has a non- Component parent

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this PopupMenu. For popup menus, the AccessibleContext takes the form of an AccessibleAWTPopupMenu. A new AccessibleAWTPopupMenu instance is created if necessary.
Overrides:
getAccessibleContext in class Menu
Returns:
an AccessibleAWTPopupMenu that serves as the AccessibleContext of this PopupMenu
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.awt.print Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.awt.print

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.print.Book (implements java.awt.print.Pageable)
    • class java.awt.print.PageFormat (implements java.lang.Cloneable)
    • class java.awt.print.Paper (implements java.lang.Cloneable)
    • class java.awt.print.PrinterJob
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.awt.print.PrinterException
          • class java.awt.print.PrinterAbortException
          • class java.awt.print.PrinterIOException

Interface Hierarchy

  • interface java.awt.print.Pageable
  • interface java.awt.print.Printable
  • interface java.awt.print.PrinterGraphics
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.awt.print

Provides classes and interfaces for a general printing API.

See:
Description

Interface Summary
Pageable | The Pageable implementation represents a set of pages to be printed.
Printable | The Printable interface is implemented by the print methods of the current page painter, which is called by the printing system to render a page.
PrinterGraphics | The PrinterGraphics interface is implemented by Graphics objects that are passed to Printable objects to render a page.

Class Summary
Book | The Book class provides a representation of a document in which pages may have different page formats and page painters.
PageFormat | The PageFormat class describes the size and orientation of a page to be printed.
Paper | The Paper class describes the physical characteristics of a piece of paper.
PrinterJob | The PrinterJob class is the principal class that controls printing.

Exception Summary
PrinterAbortException | The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
PrinterException | The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
PrinterIOException | The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

Package java.awt.print Description

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
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.awt.print

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.awt.print

Packages that use java.awt.print
java.awt.print Provides classes and interfaces for a general printing API.

Classes in java.awt.print used by java.awt.print
Pageable
The Pageable implementation represents a set of pages to be printed.
PageFormat
The PageFormat class describes the size and orientation of a page to be printed.
Paper
The Paper class describes the physical characteristics of a piece of paper.
Printable
The Printable interface is implemented by the print methods of the current page painter, which is called by the printing system to render a page.
PrinterException
The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
PrinterJob
The PrinterJob class is the principal class that controls printing.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Book

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class Book

java.lang.Object
  |
  +--java.awt.print.Book
All Implemented Interfaces:
Pageable
public class Book
extends Object
implements Pageable

The Book class provides a representation of a document in which pages may have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob.

See Also:
Pageable, PrinterJob

Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
Constructor Summary
Book()
Creates a new, empty Book.
Method Summary
void | append(Printable painter, PageFormat page) Appends a single page to the end of this Book.
void | append(Printable painter, PageFormat page, int numPages) Appends numPages pages to the end of this Book.
int | getNumberOfPages() Returns the number of pages in this Book.
PageFormat | getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
Printable | getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.
void | setPage(int pageIndex, Printable painter, PageFormat page) Sets the PageFormat and the Painter for a specified page number.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Book

public Book()
Creates a new, empty Book.
Method Detail

getNumberOfPages

public int getNumberOfPages()
Returns the number of pages in this Book.
Specified by:
getNumberOfPages in interface Pageable
Returns:
the number of pages this Book contains.

getPageFormat

public PageFormat getPageFormat(int pageIndex)
                         throws IndexOutOfBoundsException
Returns the PageFormat of the page specified by pageIndex.
Specified by:
getPageFormat in interface Pageable
Parameters:
pageIndex - the zero based index of the page whose PageFormat is being requested
Returns:
the PageFormat describing the size and orientation of the page.
Throws:
IndexOutOfBoundsException - The Pageable does not contain the requested page

getPrintable

public Printable getPrintable(int pageIndex)
                       throws IndexOutOfBoundsException
Returns the Printable instance responsible for rendering the page specified by pageIndex.
Specified by:
getPrintable in interface Pageable
Parameters:
pageIndex - the zero based index of the page whose Printable is being requested
Returns:
the Printable that renders the page.
Throws:
IndexOutOfBoundsException - the Pageable does not contain the requested page.

setPage

public void setPage(int pageIndex,
                    Printable painter,
                    PageFormat page)
             throws IndexOutOfBoundsException
Sets the PageFormat and the Painter for a specified page number.
Parameters:
pageIndex - the zero based index of the page whose painter and format is altered
painter - the Printable instance that renders the page
page - the size and orientation of the page
Throws:
IndexOutOfBoundsException - If the specified page is not already in this Book
NullPointerException - If the painter or page argument is null

append

public void append(Printable painter,
                   PageFormat page)
Appends a single page to the end of this Book.
Parameters:
painter - the Printable instance that renders the page
page - the size and orientation of the page
Throws:
NullPointerException - If the painter or page argument is null

append

public void append(Printable painter,
                   PageFormat page,
                   int numPages)
Appends numPages pages to the end of this Book. Each of the pages is associated with page.
Parameters:
painter - the Printable instance that renders the page
page - the size and orientation of the page
numPages - the number of pages to be added to the this Book.
Throws:
NullPointerException - If the painter or page argument is null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.awt.print.Book

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.Book

No usage of java.awt.print.Book

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.PrinterAbortException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.PrinterAbortException

No usage of java.awt.print.PrinterAbortException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.PrinterIOException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.PrinterIOException

No usage of java.awt.print.PrinterIOException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.print.PrinterGraphics

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.print.PrinterGraphics

No usage of java.awt.print.PrinterGraphics

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.PageFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.PageFormat

Packages that use PageFormat
java.awt.print Provides classes and interfaces for a general printing API.

Uses of PageFormat in java.awt.print

Methods in java.awt.print that return PageFormat
PageFormat | Book.getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
PageFormat | Pageable.getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
abstract PageFormat | PrinterJob.pageDialog(PageFormat page) Displays a dialog that allows modification of a PageFormat instance.
abstract PageFormat | PrinterJob.defaultPage(PageFormat page) Clones the PageFormat argument and alters the clone to describe a default page size and orientation.
PageFormat | PrinterJob.defaultPage() Creates a new PageFormat instance and sets it to a default size and orientation.
abstract PageFormat | PrinterJob.validatePage(PageFormat page) Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob.

Methods in java.awt.print with parameters of type PageFormat
void | Book.setPage(int pageIndex, Printable painter, PageFormat page) Sets the PageFormat and the Painter for a specified page number.
void | Book.append(Printable painter, PageFormat page) Appends a single page to the end of this Book.
void | Book.append(Printable painter, PageFormat page, int numPages) Appends numPages pages to the end of this Book.
int | Printable.print(Graphics graphics, PageFormat pageFormat, int pageIndex) Prints the page at the specified index into the specified Graphics context in the specified format.
abstract void | PrinterJob.setPrintable(Printable painter, PageFormat format) Calls painter to render the pages in the specified format.
abstract PageFormat | PrinterJob.pageDialog(PageFormat page) Displays a dialog that allows modification of a PageFormat instance.
abstract PageFormat | PrinterJob.defaultPage(PageFormat page) Clones the PageFormat argument and alters the clone to describe a default page size and orientation.
abstract PageFormat | PrinterJob.validatePage(PageFormat page) Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.Paper

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.Paper

Packages that use Paper
java.awt.print Provides classes and interfaces for a general printing API.

Uses of Paper in java.awt.print

Methods in java.awt.print that return Paper
 Paper PageFormat.getPaper()
Returns a copy of the Paper object associated with this PageFormat.

Methods in java.awt.print with parameters of type Paper
 void PageFormat.setPaper(Paper paper)
Sets the Paper object for this PageFormat.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.PrinterException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.PrinterException

Packages that use PrinterException
java.awt.print Provides classes and interfaces for a general printing API.

Uses of PrinterException in java.awt.print

Subclasses of PrinterException in java.awt.print
class | PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
class | PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

Methods in java.awt.print that throw PrinterException
int | Printable.print(Graphics graphics, PageFormat pageFormat, int pageIndex) Prints the page at the specified index into the specified Graphics context in the specified format.
abstract void | PrinterJob.print() Prints a set of pages.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.awt.print.PrinterJob

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.awt.print.PrinterJob

Packages that use PrinterJob
java.awt.print Provides classes and interfaces for a general printing API.

Uses of PrinterJob in java.awt.print

Methods in java.awt.print that return PrinterJob
PrinterJob | PrinterGraphics.getPrinterJob() Returns the PrinterJob that is controlling the current rendering request.
static PrinterJob | PrinterJob.getPrinterJob() Creates and returns a PrinterJob.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.print.Pageable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.print.Pageable

Packages that use Pageable
java.awt.print Provides classes and interfaces for a general printing API.

Uses of Pageable in java.awt.print

Classes in java.awt.print that implement Pageable
 class Book
The Book class provides a representation of a document in which pages may have different page formats and page painters.

Methods in java.awt.print with parameters of type Pageable
abstract  void PrinterJob.setPageable(Pageable document)
Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.awt.print.Printable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.awt.print.Printable

Packages that use Printable
java.awt.print Provides classes and interfaces for a general printing API.

Uses of Printable in java.awt.print

Methods in java.awt.print that return Printable
Printable | Book.getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.
Printable | Pageable.getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.

Methods in java.awt.print with parameters of type Printable
void | Book.setPage(int pageIndex, Printable painter, PageFormat page) Sets the PageFormat and the Painter for a specified page number.
void | Book.append(Printable painter, PageFormat page) Appends a single page to the end of this Book.
void | Book.append(Printable painter, PageFormat page, int numPages) Appends numPages pages to the end of this Book.
abstract void | PrinterJob.setPrintable(Printable painter) Calls painter to render the pages.
abstract void | PrinterJob.setPrintable(Printable painter, PageFormat format) Calls painter to render the pages in the specified format.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Pageable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Interface Pageable

All Known Implementing Classes:
Book
public interface Pageable

The Pageable implementation represents a set of pages to be printed. The Pageable object returns the total number of pages in the set as well as the PageFormat and Printable for a specified page.

See Also:
PageFormat, Printable

Field Summary
static int UNKNOWN_NUMBER_OF_PAGES
This constant is returned from the getNumberOfPages method if a Pageable implementation does not know the number of pages in its set
Method Summary
int | getNumberOfPages() Returns the number of pages in the set.
PageFormat | getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
Printable | getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.

Field Detail

UNKNOWN_NUMBER_OF_PAGES

public static final int UNKNOWN_NUMBER_OF_PAGES
This constant is returned from the getNumberOfPages method if a Pageable implementation does not know the number of pages in its set
Method Detail

getNumberOfPages

public int getNumberOfPages()
Returns the number of pages in the set. To enable advanced printing features, it is recommended that Pageable implementations return the true number of pages rather than the UNKNOWN_NUMBER_OF_PAGES constant.
Returns:
the number of pages in this Pageable.

getPageFormat

public PageFormat getPageFormat(int pageIndex)
                         throws IndexOutOfBoundsException
Returns the PageFormat of the page specified by pageIndex.
Parameters:
pageIndex - the zero based index of the page whose PageFormat is being requested
Returns:
the PageFormat describing the size and orientation.
Throws:
IndexOutOfBoundsException - the Pageable does not contain the requested page.

getPrintable

public Printable getPrintable(int pageIndex)
                       throws IndexOutOfBoundsException
Returns the Printable instance responsible for rendering the page specified by pageIndex.
Parameters:
pageIndex - the zero based index of the page whose Printable is being requested
Returns:
the Printable that renders the page.
Throws:
IndexOutOfBoundsException - the Pageable does not contain the requested page.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PageFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class PageFormat

java.lang.Object
  |
  +--java.awt.print.PageFormat
All Implemented Interfaces:
Cloneable
public class PageFormat
extends Object
implements Cloneable

The PageFormat class describes the size and orientation of a page to be printed.

Field Summary
static int | LANDSCAPE The origin is at the bottom left of the paper with x running bottom to top and y running left to right.
static int | PORTRAIT The origin is at the top left of the paper with x running to the right and y running down the paper.
static int | REVERSE_LANDSCAPE The origin is at the top right of the paper with x running top to bottom and y running right to left.
Constructor Summary
PageFormat()
Creates a default, portrait-oriented PageFormat.
Method Summary
Object | clone() Makes a copy of this PageFormat with the same contents as this PageFormat.
double | getHeight() Returns the height, in 1/72nds of an inch, of the page.
double | getImageableHeight() Return the height, in 1/72nds of an inch, of the imageable area of the page.
double | getImageableWidth() Returns the width, in 1/72nds of an inch, of the imageable area of the page.
double | getImageableX() Returns the x coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.
double | getImageableY() Returns the y coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.
double[] | getMatrix() Returns a transformation matrix that translates user space rendering to the requested orientation of the page.
int | getOrientation() Returns the orientation of this PageFormat.
Paper | getPaper() Returns a copy of the Paper object associated with this PageFormat.
double | getWidth() Returns the width, in 1/72nds of an inch, of the page.
void | setOrientation(int orientation) Sets the page orientation.
void | setPaper(Paper paper) Sets the Paper object for this PageFormat.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LANDSCAPE

public static final int LANDSCAPE
The origin is at the bottom left of the paper with x running bottom to top and y running left to right. Note that this is not the Macintosh landscape but is the Window's and PostScript landscape.

PORTRAIT

public static final int PORTRAIT
The origin is at the top left of the paper with x running to the right and y running down the paper.

REVERSE_LANDSCAPE

public static final int REVERSE_LANDSCAPE
The origin is at the top right of the paper with x running top to bottom and y running right to left. Note that this is the Macintosh landscape.
Constructor Detail

PageFormat

public PageFormat()
Creates a default, portrait-oriented PageFormat.
Method Detail

clone

public Object clone()
Makes a copy of this PageFormat with the same contents as this PageFormat.
Overrides:
clone in class Object
Returns:
a copy of this PageFormat.

getWidth

public double getWidth()
Returns the width, in 1/72nds of an inch, of the page. This method takes into account the orientation of the page when determining the width.
Returns:
the width of the page.

getHeight

public double getHeight()
Returns the height, in 1/72nds of an inch, of the page. This method takes into account the orientation of the page when determining the height.
Returns:
the height of the page.

getImageableX

public double getImageableX()
Returns the x coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat. This method takes into account the orientation of the page.
Returns:
the x coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.

getImageableY

public double getImageableY()
Returns the y coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat. This method takes into account the orientation of the page.
Returns:
the y coordinate of the upper left point of the imageable area of the Paper object associated with this PageFormat.

getImageableWidth

public double getImageableWidth()
Returns the width, in 1/72nds of an inch, of the imageable area of the page. This method takes into account the orientation of the page.
Returns:
the width of the page.

getImageableHeight

public double getImageableHeight()
Return the height, in 1/72nds of an inch, of the imageable area of the page. This method takes into account the orientation of the page.
Returns:
the height of the page.

getPaper

public Paper getPaper()
Returns a copy of the Paper object associated with this PageFormat. Changes made to the Paper object returned from this method do not affect the Paper object of this PageFormat. To update the Paper object of this PageFormat, create a new Paper object and set it into this PageFormat by using the setPaper(Paper) method.
Returns:
a copy of the Paper object associated with this PageFormat.

setPaper

public void setPaper(Paper paper)
Sets the Paper object for this PageFormat.
Parameters:
paper - the Paper object to which to set the Paper object for this PageFormat.
Throws:
NullPointerException - a null paper instance was passed as a parameter.

setOrientation

public void setOrientation(int orientation)
                    throws IllegalArgumentException
Sets the page orientation. orientation must be one of the constants: PORTRAIT, LANDSCAPE, or REVERSE_LANDSCAPE.
Parameters:
orientation - the new orientation for the page
Throws:
IllegalArgumentException - an unknown orientation was requested

getOrientation

public int getOrientation()
Returns the orientation of this PageFormat.
Returns:
this PageFormat object's orientation.

getMatrix

public double[] getMatrix()
Returns a transformation matrix that translates user space rendering to the requested orientation of the page. The values are placed into the array as { m00, m10, m01, m11, m02, m12} in the form required by the AffineTransform constructor.
Returns:
the matrix used to translate user space rendering to the orientation of the page.
See Also:
AffineTransform
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Paper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class Paper

java.lang.Object
  |
  +--java.awt.print.Paper
All Implemented Interfaces:
Cloneable
public class Paper
extends Object
implements Cloneable

The Paper class describes the physical characteristics of a piece of paper.

When creating a Paper object, it is the application's responsibility to ensure that the paper size and the imageable area are compatible. For example, if the paper size is changed from 11 x 17 to 8.5 x 11, the application might need to reduce the imageable area so that whatever is printed fits on the page.

See Also:
setSize(double, double), setImageableArea(double, double, double, double)

Constructor Summary
Paper()
Creates a letter sized piece of paper with one inch margins.
Method Summary
Object | clone() Creates a copy of this Paper with the same contents as this Paper.
double | getHeight() Returns the height of the page in 1/72nds of an inch.
double | getImageableHeight() Returns the height of this Paper object's imageable area.
double | getImageableWidth() Returns the width of this Paper object's imageable area.
double | getImageableX() Returns the x coordinate of the upper-left corner of this Paper object's imageable area.
double | getImageableY() Returns the y coordinate of the upper-left corner of this Paper object's imageable area.
double | getWidth() Returns the width of the page in 1/72nds of an inch.
void | setImageableArea(double x, double y, double width, double height) Sets the imageable area of this Paper.
void | setSize(double width, double height) Sets the width and height of this Paper object, which represents the properties of the page onto which printing occurs.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Paper

public Paper()
Creates a letter sized piece of paper with one inch margins.
Method Detail

clone

public Object clone()
Creates a copy of this Paper with the same contents as this Paper.
Overrides:
clone in class Object
Returns:
a copy of this Paper.

getHeight

public double getHeight()
Returns the height of the page in 1/72nds of an inch.
Returns:
the height of the page described by this Paper.

setSize

public void setSize(double width,
                    double height)
Sets the width and height of this Paper object, which represents the properties of the page onto which printing occurs. The dimensions are supplied in 1/72nds of an inch.
Parameters:
width - the value to which to set this Paper object's width
height - the value to which to set this Paper object's height

getWidth

public double getWidth()
Returns the width of the page in 1/72nds of an inch.
Returns:
the width of the page described by this Paper.

setImageableArea

public void setImageableArea(double x,
                             double y,
                             double width,
                             double height)
Sets the imageable area of this Paper. The imageable area is the area on the page in which printing occurs.
Parameters:
x, y - the coordinates to which to set the upper-left corner of the imageable area of this Paper
width - the value to which to set the width of the imageable area of this Paper
height - the value to which to set the height of the imageable area of this Paper

getImageableX

public double getImageableX()
Returns the x coordinate of the upper-left corner of this Paper object's imageable area.
Returns:
the x coordinate of the imageable area.

getImageableY

public double getImageableY()
Returns the y coordinate of the upper-left corner of this Paper object's imageable area.
Returns:
the y coordinate of the imageable area.

getImageableWidth

public double getImageableWidth()
Returns the width of this Paper object's imageable area.
Returns:
the width of the imageable area.

getImageableHeight

public double getImageableHeight()
Returns the height of this Paper object's imageable area.
Returns:
the height of the imageable area.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Printable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Interface Printable

public interface Printable

The Printable interface is implemented by the print methods of the current page painter, which is called by the printing system to render a page. When building a Pageable, pairs of PageFormat instances and instances that implement this interface are used to describe each page. The instance implementing Printable is called to print the page's graphics.

See Also:
Pageable, PageFormat, PrinterJob

Field Summary
static int | NO_SUCH_PAGE Returned from print to signify that the pageIndex is too large and that the requested page does not exist.
static int | PAGE_EXISTS Returned from print(Graphics, PageFormat, int) to signify that the requested page was rendered.
Method Summary
 int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
Prints the page at the specified index into the specified Graphics context in the specified format.

Field Detail

PAGE_EXISTS

public static final int PAGE_EXISTS
Returned from print(Graphics, PageFormat, int) to signify that the requested page was rendered.

NO_SUCH_PAGE

public static final int NO_SUCH_PAGE
Returned from print to signify that the pageIndex is too large and that the requested page does not exist.
Method Detail

print

public int print(Graphics graphics,
                 PageFormat pageFormat,
                 int pageIndex)
          throws PrinterException
Prints the page at the specified index into the specified Graphics context in the specified format. A PrinterJob calls the Printable interface to request that a page be rendered into the context specified by graphics. The format of the page to be drawn is specified by pageFormat. The zero based index of the requested page is specified by pageIndex. If the requested page does not exist then this method returns NO_SUCH_PAGE; otherwise PAGE_EXISTS is returned. The Graphics class or subclass implements the PrinterGraphics interface to provide additional information. If the Printable object aborts the print job then it throws a PrinterException.
Parameters:
graphics - the context into which the page is drawn
pageFormat - the size and orientation of the page being drawn
pageIndex - the zero based index of the page to be drawn
Returns:
PAGE_EXISTS if the page is rendered successfully or NO_SUCH_PAGE if pageIndex specifies a non-existent page.
Throws:
PrinterException - thrown when the print job is terminated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrinterAbortException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class PrinterAbortException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.print.PrinterException
                    |
                    +--java.awt.print.PrinterAbortException
All Implemented Interfaces:
Serializable
public class PrinterAbortException
extends PrinterException

The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.

See Also:
Serialized Form

Constructor Summary
PrinterAbortException()
Constructs a new PrinterAbortException with no detail message.
PrinterAbortException(String msg)
Constructs a new PrinterAbortException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrinterAbortException

public PrinterAbortException()
Constructs a new PrinterAbortException with no detail message.

PrinterAbortException

public PrinterAbortException(String msg)
Constructs a new PrinterAbortException with the specified detail message.
Parameters:
msg - the message to be generated when a PrinterAbortException is thrown
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PrinterException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class PrinterException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.print.PrinterException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PrinterAbortException, PrinterIOException
public class PrinterException
extends Exception

The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.

See Also:
Serialized Form

Constructor Summary
PrinterException()
Constructs a new PrinterException object without a detail message.
PrinterException(String msg)
Constructs a new PrinterException object with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrinterException

public PrinterException()
Constructs a new PrinterException object without a detail message.

PrinterException

public PrinterException(String msg)
Constructs a new PrinterException object with the specified detail message.
Parameters:
msg - the message to generate when a PrinterException is thrown
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrinterGraphics

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Interface PrinterGraphics

public interface PrinterGraphics

The PrinterGraphics interface is implemented by Graphics objects that are passed to Printable objects to render a page. It allows an application to find the PrinterJob object that is controlling the printing.

Method Summary
 PrinterJob getPrinterJob()
Returns the PrinterJob that is controlling the current rendering request.

Method Detail

getPrinterJob

public PrinterJob getPrinterJob()
Returns the PrinterJob that is controlling the current rendering request.
Returns:
the PrinterJob controlling the current rendering request.
See Also:
Printable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PrinterIOException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class PrinterIOException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.awt.print.PrinterException
                    |
                    +--java.awt.print.PrinterIOException
All Implemented Interfaces:
Serializable
public class PrinterIOException
extends PrinterException

The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

See Also:
Serialized Form

Constructor Summary
PrinterIOException(IOException exception)
Constructs a new PrinterIOException with the string representation of the specified IOException.
Method Summary
 IOException getIOException()
Returns the IOException that terminated the print job.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrinterIOException

public PrinterIOException(IOException exception)
Constructs a new PrinterIOException with the string representation of the specified IOException.
Parameters:
exception - the specified IOException
Method Detail

getIOException

public IOException getIOException()
Returns the IOException that terminated the print job.
Returns:
the IOException that terminated the print job.
See Also:
IOException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PrinterJob

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt.print
Class PrinterJob

java.lang.Object
  |
  +--java.awt.print.PrinterJob
public abstract class PrinterJob
extends Object

The PrinterJob class is the principal class that controls printing. An application calls methods in this class to set up a job, optionally to invoke a print dialog with the user, and then to print the pages of the job.

Constructor Summary
PrinterJob()
A PrinterJob object should be created using the static getPrinterJob method.
Method Summary
abstract void | cancel() Cancels a print job that is in progress.
PageFormat | defaultPage() Creates a new PageFormat instance and sets it to a default size and orientation.
abstract PageFormat | defaultPage(PageFormat page) Clones the PageFormat argument and alters the clone to describe a default page size and orientation.
abstract int | getCopies() Gets the number of copies to be printed.
abstract String | getJobName() Gets the name of the document to be printed.
static PrinterJob | getPrinterJob() Creates and returns a PrinterJob.
abstract String | getUserName() Gets the name of the printing user.
abstract boolean | isCancelled() Returns true if a print job is in progress, but is going to be cancelled at the next opportunity; otherwise returns false.
abstract PageFormat | pageDialog(PageFormat page) Displays a dialog that allows modification of a PageFormat instance.
abstract void | print() Prints a set of pages.
abstract boolean | printDialog() Presents a dialog to the user for changing the properties of the print job.
abstract void | setCopies(int copies) Sets the number of copies to be printed.
abstract void | setJobName(String jobName) Sets the name of the document to be printed.
abstract void | setPageable(Pageable document) Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.
abstract void | setPrintable(Printable painter) Calls painter to render the pages.
abstract void | setPrintable(Printable painter, PageFormat format) Calls painter to render the pages in the specified format.
abstract PageFormat | validatePage(PageFormat page) Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PrinterJob

public PrinterJob()
A PrinterJob object should be created using the static getPrinterJob method.
Method Detail

getPrinterJob

public static PrinterJob getPrinterJob()
Creates and returns a PrinterJob.
Returns:
a new PrinterJob.

setPrintable

public abstract void setPrintable(Printable painter)
Calls painter to render the pages. The pages in the document to be printed by this PrinterJob are rendered by the Printable object, painter. The PageFormat for each page is the default page format.
Parameters:
painter - the Printable that renders each page of the document.

setPrintable

public abstract void setPrintable(Printable painter,
                                  PageFormat format)
Calls painter to render the pages in the specified format. The pages in the document to be printed by this PrinterJob are rendered by the Printable object, painter. The PageFormat of each page is format.
Parameters:
painter - the Printable called to render each page of the document
format - the size and orientation of each page to be printed

setPageable

public abstract void setPageable(Pageable document)
                          throws NullPointerException
Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.
Parameters:
document - the pages to be printed. It can not be null.
Throws:
NullPointerException - the Pageable passed in was null.
See Also:
PageFormat, Printable

printDialog

public abstract boolean printDialog()
Presents a dialog to the user for changing the properties of the print job.
Returns:
true if the user does not cancel the dialog; false otherwise.

pageDialog

public abstract PageFormat pageDialog(PageFormat page)
Displays a dialog that allows modification of a PageFormat instance. The page argument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the original page object unmodified. If the user okays the dialog then this method returns a new PageFormat object with the indicated changes. In either case, the original page object is not modified.
Parameters:
page - the default PageFormat presented to the user for modification
Returns:
the original page object if the dialog is cancelled; a new PageFormat object containing the format indicated by the user if the dialog is acknowledged.
Since:
1.2

defaultPage

public abstract PageFormat defaultPage(PageFormat page)
Clones the PageFormat argument and alters the clone to describe a default page size and orientation.
Parameters:
page - the PageFormat to be cloned and altered
Returns:
clone of page, altered to describe a default PageFormat.

defaultPage

public PageFormat defaultPage()
Creates a new PageFormat instance and sets it to a default size and orientation.
Returns:
a PageFormat set to a default size and orientation.

validatePage

public abstract PageFormat validatePage(PageFormat page)
Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob. For example, the returned PageFormat could have its imageable area adjusted to fit within the physical area of the paper that is used by the current printer.
Parameters:
page - the PageFormat that is cloned and whose settings are changed to be compatible with the current printer
Returns:
a PageFormat that is cloned from page and whose settings are changed to conform with this PrinterJob.

print

public abstract void print()
                    throws PrinterException
Prints a set of pages.
Throws:
PrinterException - an error in the print system caused the job to be aborted.
See Also:
Book, Pageable, Printable

setCopies

public abstract void setCopies(int copies)
Sets the number of copies to be printed.
Parameters:
copies - the number of copies to be printed

getCopies

public abstract int getCopies()
Gets the number of copies to be printed.
Returns:
the number of copies to be printed.

getUserName

public abstract String getUserName()
Gets the name of the printing user.
Returns:
the name of the printing user

setJobName

public abstract void setJobName(String jobName)
Sets the name of the document to be printed. The document name can not be null.
Parameters:
jobName - the name of the document to be printed

getJobName

public abstract String getJobName()
Gets the name of the document to be printed.
Returns:
the name of the document to be printed.

cancel

public abstract void cancel()
Cancels a print job that is in progress. If print has been called but has not returned then this method signals that the job should be cancelled at the next chance. If there is no print job in progress then this call does nothing.

isCancelled

public abstract boolean isCancelled()
Returns true if a print job is in progress, but is going to be cancelled at the next opportunity; otherwise returns false.
Returns:
true if the job in progress is going to be cancelled; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PrintGraphics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface PrintGraphics

public interface PrintGraphics

An abstract class which provides a print graphics context for a page.

Method Summary
 PrintJob getPrintJob()
Returns the PrintJob object from which this PrintGraphics object originated.

Method Detail

getPrintJob

public PrintJob getPrintJob()
Returns the PrintJob object from which this PrintGraphics object originated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrintJob

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PrintJob

java.lang.Object
  |
  +--java.awt.PrintJob
public abstract class PrintJob
extends Object

An abstract class which initiates and executes a print job. It provides access to a print graphics object which renders to an appropriate print device.

See Also:
Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties)

Constructor Summary
PrintJob()
Method Summary
abstract void | end() Ends the print job and does any necessary cleanup.
void | finalize() Ends this print job once it is no longer referenced.
abstract Graphics | getGraphics() Gets a Graphics object that will draw to the next page.
abstract Dimension | getPageDimension() Returns the dimensions of the page in pixels.
abstract int | getPageResolution() Returns the resolution of the page in pixels per inch.
abstract boolean | lastPageFirst() Returns true if the last page will be printed first.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PrintJob

public PrintJob()
Method Detail

getGraphics

public abstract Graphics getGraphics()
Gets a Graphics object that will draw to the next page. The page is sent to the printer when the graphics object is disposed. This graphics object will also implement the PrintGraphics interface.
See Also:
PrintGraphics

getPageDimension

public abstract Dimension getPageDimension()
Returns the dimensions of the page in pixels. The resolution of the page is chosen so that it is similar to the screen resolution.

getPageResolution

public abstract int getPageResolution()
Returns the resolution of the page in pixels per inch. Note that this doesn't have to correspond to the physical resolution of the printer.

lastPageFirst

public abstract boolean lastPageFirst()
Returns true if the last page will be printed first.

end

public abstract void end()
Ends the print job and does any necessary cleanup.

finalize

public void finalize()
Ends this print job once it is no longer referenced.
Overrides:
finalize in class Object
See Also:
end()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrintQualityType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class PageAttributes.PrintQualityType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.PageAttributes.PrintQualityType
Enclosing class:
PageAttributes
public static final class PageAttributes.PrintQualityType
extends java.awt.AttributeValue

A type-safe enumeration of possible print qualities. These print qualities are in compliance with IPP 1.1.

Field Summary
static PageAttributes.PrintQualityType | DRAFT The PrintQualityType instance to use for specifying a draft print quality.
static PageAttributes.PrintQualityType | HIGH The PrintQualityType instance to use for specifying a high print quality.
static PageAttributes.PrintQualityType | NORMAL The PrintQualityType instance to use for specifying a normal print quality.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

HIGH

public static final PageAttributes.PrintQualityType HIGH
The PrintQualityType instance to use for specifying a high print quality.

NORMAL

public static final PageAttributes.PrintQualityType NORMAL
The PrintQualityType instance to use for specifying a normal print quality.

DRAFT

public static final PageAttributes.PrintQualityType DRAFT
The PrintQualityType instance to use for specifying a draft print quality.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Rectangle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Rectangle

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.Rectangle
All Implemented Interfaces:
Cloneable, Serializable, Shape
Direct Known Subclasses:
DefaultCaret
public class Rectangle
extends Rectangle2D
implements Shape, Serializable

A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

A Rectangle object's width and height are public fields. The constructors that create a Rectangle, and the methods that can modify one, do not prevent setting a negative value for width or height.

A Rectangle whose width or height is negative is considered empty. If the Rectangle is empty, then the isEmpty method returns true. No point can be contained by or inside an empty Rectangle. The values of width and height, however, are still valid. An empty Rectangle still has a location in the coordinate space, and methods that change its size or location remain valid. The behavior of methods that operate on more than one Rectangle is undefined if any of the participating Rectangle objects has a negative width or height. These methods include intersects, intersection, and union.

Since:
JDK1.0
See Also:
Serialized Form

Inner classes inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
Field Summary
int | height The height of the Rectangle.
int | width The width of the Rectangle.
int | x The x coordinate of the Rectangle.
int | y The y coordinate of the Rectangle.
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor Summary
Rectangle()
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are both zero.
Rectangle(Dimension d)
Constructs a new Rectangle whose top left corner is (0, 0) and whose width and height are specified by the Dimension argument.
Rectangle(int width, int height)
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are specified by the arguments of the same name.
Rectangle(int x, int y, int width, int height)
Constructs a new Rectangle whose top-left corner is specified as (x, y) and whose width and height are specified by the arguments of the same name.
Rectangle(Point p)
Constructs a new Rectangle whose top-left corner is the specified Point, and whose width and height are both zero.
Rectangle(Point p, Dimension d)
Constructs a new Rectangle whose top-left corner is specified by the Point argument, and whose width and height are specified by the Dimension argument.
Rectangle(Rectangle r)
Constructs a new Rectangle, initialized to match the values of the specificed Rectangle.
Method Summary
 void add(int newx, int newy)
Adds a point, specified by the integer arguments newx and newy, to this Rectangle.
 void add(Point pt)
Adds the specified Point to this Rectangle.
 void add(Rectangle r)
Adds a Rectangle to this Rectangle.
 boolean contains(int x, int y)
Checks whether or not this Rectangle contains the point at the specified location (x, y).
 boolean contains(int X, int Y, int W, int H)
Checks whether this Rectangle entirely contains the Rectangle at the specified location (X, Y) with the specified dimensions (W, H).
 boolean contains(Point p)
Checks whether or not this Rectangle contains the specified Point.
 boolean contains(Rectangle r)
Checks whether or not this Rectangle entirely contains the specified Rectangle.
 Rectangle2D createIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle with the specified Rectangle2D.
 Rectangle2D createUnion(Rectangle2D r)
Returns a new Rectangle2D object representing the union of this Rectangle with the specified Rectangle2D.
 boolean equals(Object obj)
Checks whether two rectangles are equal.
 Rectangle getBounds()
Gets the bounding Rectangle of this Rectangle.
 Rectangle2D getBounds2D()
Return the high precision bounding box of this rectangle.
 double getHeight()
Returns the height of the bounding Rectangle in double precision.
 Point getLocation()
Returns the location of this Rectangle.
 Dimension getSize()
Gets the size of this Rectangle, represented by the returned Dimension.
 double getWidth()
Returns the width of the bounding Rectangle in double precision.
 double getX()
Returns the X coordinate of the bounding Rectangle in double precision.
 double getY()
Returns the Y coordinate of the bounding Rectangle in double precision.
 void grow(int h, int v)
Resizes the Rectangle both horizontally and vertically.
 boolean inside(int x, int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).
 Rectangle intersection(Rectangle r)
Computes the intersection of this Rectangle with the specified Rectangle.
 boolean intersects(Rectangle r)
Determines whether or not this Rectangle and the specified Rectangle intersect.
 boolean isEmpty()
Determines whether or not this Rectangle is empty.
 void move(int x, int y)
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
 int outcode(double x, double y)
Determines where the specified coordinates lie with respect to this Rectangle.
 void reshape(int x, int y, int width, int height)
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
 void resize(int width, int height)
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
 void setBounds(int x, int y, int width, int height)
Sets the bounding Rectangle of this Rectangle to the specified x, y, width, and height.
 void setBounds(Rectangle r)
Sets the bounding Rectangle of this Rectangle to match the specified Rectangle.
 void setLocation(int x, int y)
Moves this Rectangle to the specified location.
 void setLocation(Point p)
Moves this Rectangle to the specified location.
 void setRect(double x, double y, double width, double height)
Sets the bounds of this Rectangle to the specified x, y, width, and height.
 void setSize(Dimension d)
Sets the size of this Rectangle to match the specified Dimension.
 void setSize(int width, int height)
Sets the size of this Rectangle to the specified width and height.
 String toString()
Returns a String representing this Rectangle and its values.
 void translate(int x, int y)
Translates this Rectangle the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.
 Rectangle union(Rectangle r)
Computes the union of this Rectangle with the specified Rectangle.
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects

Field Detail

x

public int x
The x coordinate of the Rectangle.
See Also:
setLocation(int, int), getLocation()

y

public int y
The y coordinate of the Rectangle.
See Also:
setLocation(int, int), getLocation()

width

public int width
The width of the Rectangle.
See Also:
setSize(int, int), getSize()
Since:
JDK1.0.

height

public int height
The height of the Rectangle.
See Also:
setSize(int, int), getSize()
Constructor Detail

Rectangle

public Rectangle()
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are both zero.

Rectangle

public Rectangle(Rectangle r)
Constructs a new Rectangle, initialized to match the values of the specificed Rectangle.
Parameters:
r - the Rectangle from which to copy initial values to a newly constructed Rectangle
Since:
JDK1.1

Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)
Constructs a new Rectangle whose top-left corner is specified as (x, y) and whose width and height are specified by the arguments of the same name.
Parameters:
x, y - the specified coordinates
width - the width of the Rectangle
height - the height of the Rectangle

Rectangle

public Rectangle(int width,
                 int height)
Constructs a new Rectangle whose top-left corner is at (0, 0) in the coordinate space, and whose width and height are specified by the arguments of the same name.
Parameters:
width - the width of the Rectangle
height - the height of the Rectangle

Rectangle

public Rectangle(Point p,
                 Dimension d)
Constructs a new Rectangle whose top-left corner is specified by the Point argument, and whose width and height are specified by the Dimension argument.
Parameters:
p - a Point that is the top-left corner of the Rectangle
d - a Dimension, representing the width and height of the Rectangle

Rectangle

public Rectangle(Point p)
Constructs a new Rectangle whose top-left corner is the specified Point, and whose width and height are both zero.
Parameters:
p - a Point that is the top left corner of the Rectangle

Rectangle

public Rectangle(Dimension d)
Constructs a new Rectangle whose top left corner is (0, 0) and whose width and height are specified by the Dimension argument.
Parameters:
d - a Dimension, specifying width and height
Method Detail

getX

public double getX()
Returns the X coordinate of the bounding Rectangle in double precision.
Overrides:
getX in class RectangularShape
Returns:
the x coordinate of the bounding Rectangle.

getY

public double getY()
Returns the Y coordinate of the bounding Rectangle in double precision.
Overrides:
getY in class RectangularShape
Returns:
the y coordinate of the bounding Rectangle.

getWidth

public double getWidth()
Returns the width of the bounding Rectangle in double precision.
Overrides:
getWidth in class RectangularShape
Returns:
the width of the bounding Rectangle.

getHeight

public double getHeight()
Returns the height of the bounding Rectangle in double precision.
Overrides:
getHeight in class RectangularShape
Returns:
the height of the bounding Rectangle.

getBounds

public Rectangle getBounds()
Gets the bounding Rectangle of this Rectangle.

This method is included for completeness, to parallel the getBounds method of Component.

Specified by:
getBounds in interface Shape
Overrides:
getBounds in class RectangularShape
Returns:
a new Rectangle, equal to the bounding Rectangle for this Rectangle.
Since:
JDK1.1
See Also:
Component.getBounds()

getBounds2D

public Rectangle2D getBounds2D()
Return the high precision bounding box of this rectangle.
Specified by:
getBounds2D in interface Shape
Overrides:
getBounds2D in class Rectangle2D
Since:
1.2

setBounds

public void setBounds(Rectangle r)
Sets the bounding Rectangle of this Rectangle to match the specified Rectangle.

This method is included for completeness, to parallel the setBounds method of Component.

Parameters:
r - the specified Rectangle
Since:
JDK1.1
See Also:
Component.setBounds(java.awt.Rectangle)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets the bounding Rectangle of this Rectangle to the specified x, y, width, and height.

This method is included for completeness, to parallel the setBounds method of Component.

Parameters:
x, y - the new coordinates for the top-left corner of this Rectangle
width - the new width for this Rectangle
height - the new height for this Rectangle
Since:
JDK1.1
See Also:
Component.setBounds(int, int, int, int)

setRect

public void setRect(double x,
                    double y,
                    double width,
                    double height)
Sets the bounds of this Rectangle to the specified x, y, width, and height. This method is included for completeness, to parallel the setBounds method of Component.
Overrides:
setRect in class Rectangle2D
Parameters:
width - the new width for the Dimension object
height - the new height for the Dimension object

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).

getLocation

public Point getLocation()
Returns the location of this Rectangle.

This method is included for completeness, to parallel the getLocation method of Component.

Returns:
the Point that is the top-left corner of this Rectangle.
Since:
JDK1.1
See Also:
Component.getLocation()

setLocation

public void setLocation(Point p)
Moves this Rectangle to the specified location.

This method is included for completeness, to parallel the setLocation method of Component.

Parameters:
p - the Point specifying the new location for this Rectangle
Since:
JDK1.1
See Also:
Component.setLocation(java.awt.Point)

setLocation

public void setLocation(int x,
                        int y)
Moves this Rectangle to the specified location.

This method is included for completeness, to parallel the setLocation method of Component.

Parameters:
x, y - the coordinates of the new location
Since:
JDK1.1
See Also:
Component.setLocation(int, int)

move

public void move(int x,
                 int y)
Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).

translate

public void translate(int x,
                      int y)
Translates this Rectangle the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.
Parameters:
dx - the distance to move this Rectangle along the x axis
dy - the distance to move this Rectangle along the y axis
See Also:
setLocation(int, int), setLocation(java.awt.Point)

getSize

public Dimension getSize()
Gets the size of this Rectangle, represented by the returned Dimension.

This method is included for completeness, to parallel the getSize method of Component.

Returns:
a Dimension, representing the size of this Rectangle.
Since:
JDK1.1
See Also:
Component.getSize()

setSize

public void setSize(Dimension d)
Sets the size of this Rectangle to match the specified Dimension.

This method is included for completeness, to parallel the setSize method of Component.

Parameters:
d - the new size for the Dimension object
Since:
JDK1.1
See Also:
Component.setSize(java.awt.Dimension)

setSize

public void setSize(int width,
                    int height)
Sets the size of this Rectangle to the specified width and height.

This method is included for completeness, to parallel the setSize method of Component.

Parameters:
width - the new width for this Rectangle
height - the new height for this Rectangle
Since:
JDK1.1
See Also:
Component.setSize(int, int)

resize

public void resize(int width,
                   int height)
Deprecated. As of JDK version 1.1, replaced by setSize(int, int).

contains

public boolean contains(Point p)
Checks whether or not this Rectangle contains the specified Point.
Parameters:
p - the Point to test
Returns:
true if the Point (x, y) is inside this Rectangle; false otherwise.
Since:
JDK1.1

contains

public boolean contains(int x,
                        int y)
Checks whether or not this Rectangle contains the point at the specified location (x, y).
Parameters:
x, y - the specified coordinates
Returns:
true if the point (x, y) is inside this Rectangle; false otherwise.
Since:
JDK1.1

contains

public boolean contains(Rectangle r)
Checks whether or not this Rectangle entirely contains the specified Rectangle.
Parameters:
r - the specified Rectangle
Returns:
true if the Rectangle is contained entirely inside this Rectangle; false otherwise.
Since:
JDK1.1

contains

public boolean contains(int X,
                        int Y,
                        int W,
                        int H)
Checks whether this Rectangle entirely contains the Rectangle at the specified location (X, Y) with the specified dimensions (W, H).
Parameters:
x, y - the specified coordinates
W - the width of the Rectangle
H - the height of the Rectangle
Returns:
true if the Rectangle specified by (X, Y, W, H) is entirely enclosed inside this Rectangle; false otherwise.
Since:
JDK1.1

inside

public boolean inside(int x,
                      int y)
Deprecated. As of JDK version 1.1, replaced by contains(int, int).

intersects

public boolean intersects(Rectangle r)
Determines whether or not this Rectangle and the specified Rectangle intersect. Two rectangles intersect if their intersection is nonempty.
Parameters:
r - the specified Rectangle
Returns:
true if the specified Rectangle and this Rectangle insersect; false otherwise.

intersection

public Rectangle intersection(Rectangle r)
Computes the intersection of this Rectangle with the specified Rectangle. Returns a new Rectangle that represents the intersection of the two rectangles.
Parameters:
r - the specified Rectangle
Returns:
the largest Rectangle contained in both the specified Rectangle and in thisRectangle.

union

public Rectangle union(Rectangle r)
Computes the union of this Rectangle with the specified Rectangle. Returns a new Rectangle that represents the union of the two rectangles
Parameters:
r - the specified Rectangle
Returns:
the smallest Rectangle containing both the specified Rectangle and this Rectangle.

add

public void add(int newx,
                int newy)
Adds a point, specified by the integer arguments newx and newy, to this Rectangle. The resulting Rectangle is the smallest Rectangle that contains both the original Rectangle and the specified point.

After adding a point, a call to contains with the added point as an argument does not necessarily return true. The contains method does not return true for points on the right or bottom edges of a Rectangle. Therefore, if the added point falls on the right or bottom edge of the enlarged Rectangle, contains returns false for that point.

Parameters:
newx, newy - the coordinates of the new point

add

public void add(Point pt)
Adds the specified Point to this Rectangle. The resulting Rectangle is the smallest Rectangle that contains both the original Rectangle and the specified Point.

After adding a Point, a call to contains with the added Point as an argument does not necessarily return true. The contains method does not return true for points on the right or bottom edges of a Rectangle. Therefore if the added Point falls on the right or bottom edge of the enlarged Rectangle, contains returns false for that Point.

Parameters:
pt - the new Point to add to this Rectangle

add

public void add(Rectangle r)
Adds a Rectangle to this Rectangle. The resulting Rectangle is the union of the two rectangles.
Parameters:
r - the specified Rectangle

grow

public void grow(int h,
                 int v)
Resizes the Rectangle both horizontally and vertically.

This method modifies the Rectangle so that it is h units larger on both the left and right side, and v units larger at both the top and bottom.

The new Rectangle has (x - h, y - v) as its top-left corner, a width of width + 2h, and a height of height + 2v.

If negative values are supplied for h and v, the size of the Rectangle decreases accordingly. The grow method does not check whether the resulting values of width and height are non-negative.

Parameters:
h - the horizontal expansion
v - the vertical expansion

isEmpty

public boolean isEmpty()
Determines whether or not this Rectangle is empty. A Rectangle is empty if its width or its height is less than or equal to zero.
Overrides:
isEmpty in class RectangularShape
Returns:
true if this Rectangle is empty; false otherwise.

outcode

public int outcode(double x,
                   double y)
Determines where the specified coordinates lie with respect to this Rectangle. This method computes a binary OR of the appropriate mask values indicating, for each side of this Rectangle, whether or not the specified coordinates are on the same side of the edge as the rest of this Rectangle.
Overrides:
outcode in class Rectangle2D
Parameters:
x, y - the specified coordinates
Returns:
the logical OR of all appropriate out codes.
Since:
1.2
See Also:
Rectangle2D.OUT_LEFT, Rectangle2D.OUT_TOP, Rectangle2D.OUT_RIGHT, Rectangle2D.OUT_BOTTOM

createIntersection

public Rectangle2D createIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle with the specified Rectangle2D.
Overrides:
createIntersection in class Rectangle2D
Parameters:
r - the Rectangle2D to be intersected with this Rectangle
Returns:
the largest Rectangle2D contained in both the specified Rectangle2D and in this Rectangle.
Since:
1.2

createUnion

public Rectangle2D createUnion(Rectangle2D r)
Returns a new Rectangle2D object representing the union of this Rectangle with the specified Rectangle2D.
Overrides:
createUnion in class Rectangle2D
Parameters:
r - the Rectangle2D to be combined with this Rectangle
Returns:
the smallest Rectangle2D containing both the specified Rectangle2D and this Rectangle.
Since:
1.2

equals

public boolean equals(Object obj)
Checks whether two rectangles are equal.

The result is true if and only if the argument is not null and is a Rectangle object that has the same top-left corner, width, and height as this Rectangle.

Overrides:
equals in class Rectangle2D
Parameters:
obj - the Object to compare with this Rectangle
Returns:
true if the objects are equal; false otherwise.

toString

public String toString()
Returns a String representing this Rectangle and its values.
Overrides:
toString in class Object
Returns:
a String representing this Rectangle object's coordinate and size values.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RenderingHints

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class RenderingHints

java.lang.Object
  |
  +--java.awt.RenderingHints
All Implemented Interfaces:
Cloneable, Map
public class RenderingHints
extends Object
implements Map, Cloneable

The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.

Inner Class Summary
static class RenderingHints.Key
Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
Inner classes inherited from class java.util.Map
Map.Entry
Field Summary
static RenderingHints.Key | KEY_ALPHA_INTERPOLATION Alpha interpolation hint key
static RenderingHints.Key | KEY_ANTIALIASING Antialiasing hint key
static RenderingHints.Key | KEY_COLOR_RENDERING Color rendering hint key
static RenderingHints.Key | KEY_DITHERING Dithering hint key
static RenderingHints.Key | KEY_FRACTIONALMETRICS Font fractional metrics hint key
static RenderingHints.Key | KEY_INTERPOLATION Interpolation hint key
static RenderingHints.Key | KEY_RENDERING Rendering hint key
static RenderingHints.Key | KEY_STROKE_CONTROL Stroke normalization control hint key
static RenderingHints.Key | KEY_TEXT_ANTIALIASING Text antialiasing hint key
static Object | VALUE_ALPHA_INTERPOLATION_DEFAULT Alpha interpolation hint value -- ALPHA_INTERPOLATION_DEFAULT
static Object | VALUE_ALPHA_INTERPOLATION_QUALITY Alpha interpolation hint value -- ALPHA_INTERPOLATION_QUALITY
static Object | VALUE_ALPHA_INTERPOLATION_SPEED Alpha interpolation hint value -- ALPHA_INTERPOLATION_SPEED
static Object | VALUE_ANTIALIAS_DEFAULT Antialiasing hint values -- rendering is done with the platform default antialiasing mode.
static Object | VALUE_ANTIALIAS_OFF Antialiasing hint values -- rendering is done without antialiasing
static Object | VALUE_ANTIALIAS_ON Antialiasing hint values -- rendering is done with antialiasing
static Object | VALUE_COLOR_RENDER_DEFAULT Color rendering hint value -- COLOR_RENDER_DEFAULT
static Object | VALUE_COLOR_RENDER_QUALITY Color rendering hint value -- COLOR_RENDER_QUALITY
static Object | VALUE_COLOR_RENDER_SPEED Color rendering hint value -- COLOR_RENDER_SPEED
static Object | VALUE_DITHER_DEFAULT Dithering hint values -- use the platform default for dithering
static Object | VALUE_DITHER_DISABLE Dithering hint values -- do not dither when rendering
static Object | VALUE_DITHER_ENABLE Dithering hint values -- dither when rendering, if needed
static Object | VALUE_FRACTIONALMETRICS_DEFAULT Font fractional metrics hint values -- use the platform default for fractional metrics
static Object | VALUE_FRACTIONALMETRICS_OFF Font fractional metrics hint values -- fractional metrics disabled
static Object | VALUE_FRACTIONALMETRICS_ON Font fractional metrics hint values -- fractional metrics enabled
static Object | VALUE_INTERPOLATION_BICUBIC Interpolation hint value -- INTERPOLATION_BICUBIC
static Object | VALUE_INTERPOLATION_BILINEAR Interpolation hint value -- INTERPOLATION_BILINEAR
static Object | VALUE_INTERPOLATION_NEAREST_NEIGHBOR Interpolation hint value -- INTERPOLATION_NEAREST_NEIGHBOR
static Object | VALUE_RENDER_DEFAULT Rendering hint values -- The platform default rendering algorithms are chosen.
static Object | VALUE_RENDER_QUALITY Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output quality.
static Object | VALUE_RENDER_SPEED Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output speed.
static Object | VALUE_STROKE_DEFAULT Stroke normalization control hint value -- STROKE_DEFAULT
static Object | VALUE_STROKE_NORMALIZE Stroke normalization control hint value -- STROKE_NORMALIZE
static Object | VALUE_STROKE_PURE Stroke normalization control hint value -- STROKE_PURE
static Object | VALUE_TEXT_ANTIALIAS_DEFAULT Text antialiasing hint value -- text rendering is done using the platform default text antialiasing mode.
static Object | VALUE_TEXT_ANTIALIAS_OFF Text antialiasing hint value -- text rendering is done without antialiasing
static Object | VALUE_TEXT_ANTIALIAS_ON Text antialiasing hint value -- text rendering is done with antialiasing
Constructor Summary
RenderingHints(Map init)
Constructs a new object with keys and values initialized from the specified Map object (which may be null).
RenderingHints(RenderingHints.Key key, Object value)
Constructs a new object with the specified key/value pair.
Method Summary
void | add(RenderingHints hints) Adds all of the keys and corresponding values from the specified RenderingHints object to this RenderingHints object.
void | clear() Clears this RenderingHints object of all key/value pairs.
Object | clone() Creates a clone of this RenderingHints object that has the same contents as this RenderingHints object.
boolean | containsKey(Object key) Returns true if this RenderingHints contains a mapping for the specified key.
boolean | containsValue(Object value) Returns true if this RenderingHints maps one or more keys to the specified value.
Set | entrySet() Returns a Set view of the mappings contained in this RenderingHints.
boolean | equals(Object o) Compares the specified Object with this RenderingHints for equality.
Object | get(Object key) Returns the value to which the specified key is mapped.
int | hashCode() Returns the hash code value for this RenderingHints.
boolean | isEmpty() Returns true if this RenderingHints contains no key-value mappings.
Set | keySet() Returns a Set view of the Keys contained in this RenderingHints.
Object | put(Object key, Object value) Maps the specified key to the specified value in this RenderingHints object.
void | putAll(Map m) Copies all of the mappings from the specified Map to this RenderingHints.
Object | remove(Object key) Removes the key and its corresponding value from this RenderingHints object.
int | size() Returns the number of key-value mappings in this RenderingHints.
String | toString() Returns a rather long string representation of the hashmap which contains the mappings of keys to values for this RenderingHints object.
Collection | values() Returns a Collection view of the values contained in this RenderinHints.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

KEY_ANTIALIASING

public static final RenderingHints.Key KEY_ANTIALIASING
Antialiasing hint key

VALUE_ANTIALIAS_ON

public static final Object VALUE_ANTIALIAS_ON
Antialiasing hint values -- rendering is done with antialiasing

VALUE_ANTIALIAS_OFF

public static final Object VALUE_ANTIALIAS_OFF
Antialiasing hint values -- rendering is done without antialiasing

VALUE_ANTIALIAS_DEFAULT

public static final Object VALUE_ANTIALIAS_DEFAULT
Antialiasing hint values -- rendering is done with the platform default antialiasing mode.

KEY_RENDERING

public static final RenderingHints.Key KEY_RENDERING
Rendering hint key

VALUE_RENDER_SPEED

public static final Object VALUE_RENDER_SPEED
Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output speed.

VALUE_RENDER_QUALITY

public static final Object VALUE_RENDER_QUALITY
Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output quality.

VALUE_RENDER_DEFAULT

public static final Object VALUE_RENDER_DEFAULT
Rendering hint values -- The platform default rendering algorithms are chosen.

KEY_DITHERING

public static final RenderingHints.Key KEY_DITHERING
Dithering hint key

VALUE_DITHER_DISABLE

public static final Object VALUE_DITHER_DISABLE
Dithering hint values -- do not dither when rendering

VALUE_DITHER_ENABLE

public static final Object VALUE_DITHER_ENABLE
Dithering hint values -- dither when rendering, if needed

VALUE_DITHER_DEFAULT

public static final Object VALUE_DITHER_DEFAULT
Dithering hint values -- use the platform default for dithering

KEY_TEXT_ANTIALIASING

public static final RenderingHints.Key KEY_TEXT_ANTIALIASING
Text antialiasing hint key

VALUE_TEXT_ANTIALIAS_ON

public static final Object VALUE_TEXT_ANTIALIAS_ON
Text antialiasing hint value -- text rendering is done with antialiasing

VALUE_TEXT_ANTIALIAS_OFF

public static final Object VALUE_TEXT_ANTIALIAS_OFF
Text antialiasing hint value -- text rendering is done without antialiasing

VALUE_TEXT_ANTIALIAS_DEFAULT

public static final Object VALUE_TEXT_ANTIALIAS_DEFAULT
Text antialiasing hint value -- text rendering is done using the platform default text antialiasing mode.

KEY_FRACTIONALMETRICS

public static final RenderingHints.Key KEY_FRACTIONALMETRICS
Font fractional metrics hint key

VALUE_FRACTIONALMETRICS_OFF

public static final Object VALUE_FRACTIONALMETRICS_OFF
Font fractional metrics hint values -- fractional metrics disabled

VALUE_FRACTIONALMETRICS_ON

public static final Object VALUE_FRACTIONALMETRICS_ON
Font fractional metrics hint values -- fractional metrics enabled

VALUE_FRACTIONALMETRICS_DEFAULT

public static final Object VALUE_FRACTIONALMETRICS_DEFAULT
Font fractional metrics hint values -- use the platform default for fractional metrics

KEY_INTERPOLATION

public static final RenderingHints.Key KEY_INTERPOLATION
Interpolation hint key

VALUE_INTERPOLATION_NEAREST_NEIGHBOR

public static final Object VALUE_INTERPOLATION_NEAREST_NEIGHBOR
Interpolation hint value -- INTERPOLATION_NEAREST_NEIGHBOR

VALUE_INTERPOLATION_BILINEAR

public static final Object VALUE_INTERPOLATION_BILINEAR
Interpolation hint value -- INTERPOLATION_BILINEAR

VALUE_INTERPOLATION_BICUBIC

public static final Object VALUE_INTERPOLATION_BICUBIC
Interpolation hint value -- INTERPOLATION_BICUBIC

KEY_ALPHA_INTERPOLATION

public static final RenderingHints.Key KEY_ALPHA_INTERPOLATION
Alpha interpolation hint key

VALUE_ALPHA_INTERPOLATION_SPEED

public static final Object VALUE_ALPHA_INTERPOLATION_SPEED
Alpha interpolation hint value -- ALPHA_INTERPOLATION_SPEED

VALUE_ALPHA_INTERPOLATION_QUALITY

public static final Object VALUE_ALPHA_INTERPOLATION_QUALITY
Alpha interpolation hint value -- ALPHA_INTERPOLATION_QUALITY

VALUE_ALPHA_INTERPOLATION_DEFAULT

public static final Object VALUE_ALPHA_INTERPOLATION_DEFAULT
Alpha interpolation hint value -- ALPHA_INTERPOLATION_DEFAULT

KEY_COLOR_RENDERING

public static final RenderingHints.Key KEY_COLOR_RENDERING
Color rendering hint key

VALUE_COLOR_RENDER_SPEED

public static final Object VALUE_COLOR_RENDER_SPEED
Color rendering hint value -- COLOR_RENDER_SPEED

VALUE_COLOR_RENDER_QUALITY

public static final Object VALUE_COLOR_RENDER_QUALITY
Color rendering hint value -- COLOR_RENDER_QUALITY

VALUE_COLOR_RENDER_DEFAULT

public static final Object VALUE_COLOR_RENDER_DEFAULT
Color rendering hint value -- COLOR_RENDER_DEFAULT

KEY_STROKE_CONTROL

public static final RenderingHints.Key KEY_STROKE_CONTROL
Stroke normalization control hint key

VALUE_STROKE_DEFAULT

public static final Object VALUE_STROKE_DEFAULT
Stroke normalization control hint value -- STROKE_DEFAULT

VALUE_STROKE_NORMALIZE

public static final Object VALUE_STROKE_NORMALIZE
Stroke normalization control hint value -- STROKE_NORMALIZE

VALUE_STROKE_PURE

public static final Object VALUE_STROKE_PURE
Stroke normalization control hint value -- STROKE_PURE
Constructor Detail

RenderingHints

public RenderingHints(Map init)
Constructs a new object with keys and values initialized from the specified Map object (which may be null).
Parameters:
init - a map of key/value pairs to initialize the hints or null if the object should be empty

RenderingHints

public RenderingHints(RenderingHints.Key key,
                      Object value)
Constructs a new object with the specified key/value pair.
Parameters:
key - the key of the particular hint property
value - the value of the hint property specified with key
Method Detail

size

public int size()
Returns the number of key-value mappings in this RenderingHints.
Specified by:
size in interface Map
Returns:
the number of key-value mappings in this RenderingHints.

isEmpty

public boolean isEmpty()
Returns true if this RenderingHints contains no key-value mappings.
Specified by:
isEmpty in interface Map
Returns:
true if this RenderingHints contains no key-value mappings.

containsKey

public boolean containsKey(Object key)
Returns true if this RenderingHints contains a mapping for the specified key.
Specified by:
containsKey in interface Map
Parameters:
key - key whose presence in this RenderingHints is to be tested.
Returns:
true if this RenderingHints contains a mapping for the specified key.
Throws:
ClassCastException - key is not of type RenderingHints.Key
NullPointerException - key is null

containsValue

public boolean containsValue(Object value)
Returns true if this RenderingHints maps one or more keys to the specified value. More formally, returns true if and only if this RenderingHints contains at least one mapping to a value v such that
 (value==null ? v==null : value.equals(v))
. This operation will probably require time linear in the RenderingHints size for most implementations of RenderingHints.
Specified by:
containsValue in interface Map
Parameters:
value - value whose presence in this RenderingHints is to be tested.
Returns:
true if this RenderingHints maps one or more keys to the specified value.

get

public Object get(Object key)
Returns the value to which the specified key is mapped.
Specified by:
get in interface Map
Parameters:
key - a rendering hint key
Returns:
the value to which the key is mapped in this object or null if the key is not mapped to any value in this object.
Throws:
ClassCastException - key is not of type RenderingHints.Key.
See Also:
put(Object, Object)

put

public Object put(Object key,
                  Object value)
Maps the specified key to the specified value in this RenderingHints object. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
Specified by:
put in interface Map
Parameters:
key - the rendering hint key.
value - the rendering hint value.
Returns:
the previous value of the specified key in this object or null if it did not have one.
Throws:
NullPointerException - if the key or value is null.
ClassCastException - key is not of type RenderingHints.Key.
IllegalArgumentException - value is not appropriate for the specified key.
See Also:
get(Object)

add

public void add(RenderingHints hints)
Adds all of the keys and corresponding values from the specified RenderingHints object to this RenderingHints object. Keys that are present in this RenderingHints object, but not in the specified RenderingHints object are not affected.
Parameters:
hints - the set of key/value pairs to be added to this RenderingHints object

clear

public void clear()
Clears this RenderingHints object of all key/value pairs.
Specified by:
clear in interface Map
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

remove

public Object remove(Object key)
Removes the key and its corresponding value from this RenderingHints object. This method does nothing if the key is not in this RenderingHints object.
Specified by:
remove in interface Map
Parameters:
key - the rendering hints key that needs to be removed
Returns:
the value to which the key had previously been mapped in this RenderingHints object, or null if the key did not have a mapping.
Throws:
ClassCastException - key is not of type RenderingHints.Key.

putAll

public void putAll(Map m)
Copies all of the mappings from the specified Map to this RenderingHints. These mappings replace any mappings that this RenderingHints had for any of the keys currently in the specified Map.
Specified by:
putAll in interface Map
Parameters:
t - mappings to be stored in this RenderingHints.
Throws:
ClassCastException - class of a key or value in the specified Map prevents it from being stored in this RenderingHints.
IllegalArgumentException - some aspect of a key or value in the specified Map prevents it from being stored in this RenderingHints.

keySet

public Set keySet()
Returns a Set view of the Keys contained in this RenderingHints. The Set is backed by the RenderingHints, so changes to the RenderingHints are reflected in the Set, and vice-versa. If the RenderingHints is modified while an iteration over the Set is in progress, the results of the iteration are undefined. The Set supports element removal, which removes the corresponding mapping from the RenderingHints, via the Iterator.remove, Set.remove, removeAll retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
keySet in interface Map
Returns:
a Set view of the keys contained in this RenderingHints.

values

public Collection values()
Returns a Collection view of the values contained in this RenderinHints. The Collection is backed by the RenderingHints, so changes to the RenderingHints are reflected in the Collection, and vice-versa. If the RenderingHints is modified while an iteration over the Collection is in progress, the results of the iteration are undefined. The Collection supports element removal, which removes the corresponding mapping from the RenderingHints, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Specified by:
values in interface Map
Returns:
a Collection view of the values contained in this RenderingHints.

entrySet

public Set entrySet()
Returns a Set view of the mappings contained in this RenderingHints. Each element in the returned Set is a Map.Entry. The Set is backed by the RenderingHints, so changes to the RenderingHints are reflected in the Set, and vice-versa. If the RenderingHints is modified while while an iteration over the Set is in progress, the results of the iteration are undefined.

The entrySet returned from a RenderingHints object is not modifiable.

Specified by:
entrySet in interface Map
Returns:
a Set view of the mappings contained in this RenderingHints.

equals

public boolean equals(Object o)
Compares the specified Object with this RenderingHints for equality. Returns true if the specified object is also a Map and the two Map objects represent the same mappings. More formally, two Map objects t1 and t2 represent the same mappings if t1.keySet().equals(t2.keySet()) and for every key k in t1.keySet(),
 (t1.get(k)==null ? t2.get(k)==null : t1.get(k).equals(t2.get(k)))
. This ensures that the equals method works properly across different implementations of the Map interface.
Specified by:
equals in interface Map
Overrides:
equals in class Object
Parameters:
o - Object to be compared for equality with this RenderingHints.
Returns:
true if the specified Object is equal to this RenderingHints.

hashCode

public int hashCode()
Returns the hash code value for this RenderingHints. The hash code of a RenderingHints is defined to be the sum of the hashCodes of each Entry in the RenderingHints object's entrySet view. This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two Map objects t1 and t2, as required by the general contract of Object.hashCode.
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object
Returns:
the hash code value for this RenderingHints.
See Also:
Map.Entry.hashCode(),
Object.hashCode(),
Object.equals(Object),
equals(Object)

clone

public Object clone()
Creates a clone of this RenderingHints object that has the same contents as this RenderingHints object.
Overrides:
clone in class Object
Returns:
a clone of this instance.

toString

public String toString()
Returns a rather long string representation of the hashmap which contains the mappings of keys to values for this RenderingHints object.
Overrides:
toString in class Object
Returns:
a string representation of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Robot

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Robot

java.lang.Object
  |
  +--java.awt.Robot
public class Robot
extends Object

This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.

Using the class to generate input events differs from posting events to the AWT event queue or AWT components in that the events are generated in the platform's native input queue. For example, Robot.mouseMove will actually move the mouse cursor instead of just generating mouse move events.

Note that some platforms require special privileges or extensions to access low-level input control. If the current platform configuration does not allow input control, an AWTException will be thrown when trying to construct Robot objects. For example, X-Window systems will throw the exception if the XTEST 2.2 standard extension is not supported (or not enabled) by the X server.

Applications that use Robot for purposes other than self-testing should handle these error conditions gracefully.

Since:
1.3

Constructor Summary
Robot()
Constructs a Robot object in the coordinate system of the primary screen.
Robot(GraphicsDevice screen)
Creates a Robot for the given screen device.
Method Summary
BufferedImage | createScreenCapture(Rectangle screenRect) Creates an image containing pixels read from the screen.
void | delay(int ms) Sleeps for the specified time.
int | getAutoDelay() Returns the number of milliseconds this Robot sleeps after generating an event.
Color | getPixelColor(int x, int y) Returns the color of a pixel at the given screen coordinates.
boolean | isAutoWaitForIdle() Returns whether this Robot automatically invokes waitForIdle after generating an event.
void | keyPress(int keycode) Presses a given key.
void | keyRelease(int keycode) Releases a given key.
void | mouseMove(int x, int y) Moves mouse pointer to given screen coordinates.
void | mousePress(int buttons) Presses one or more mouse buttons.
void | mouseRelease(int buttons) Releases one or more mouse buttons.
void | setAutoDelay(int ms) Sets the number of milliseconds this Robot sleeps after generating an event.
void | setAutoWaitForIdle(boolean isOn) Sets whether this Robot automatically invokes waitForIdle after generating an event.
String | toString() Returns a string representation of this Robot.
void | waitForIdle() Waits until all events currently on the event queue have been processed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Robot

public Robot()
      throws AWTException
Constructs a Robot object in the coordinate system of the primary screen.

Throws:
AWTException - if the platform configuration does not allow low-level input control
SecurityException - if createRobot permission is not granted
See Also:
SecurityManager.checkPermission(java.security.Permission), AWTPermission

Robot

public Robot(GraphicsDevice screen)
      throws AWTException
Creates a Robot for the given screen device. Coordinates passed to Robot method calls like mouseMove and createScreenCapture will be interpreted as being in the same coordinate system as the specified screen. Note that depending on the platform configuration, multiple screens may either:
  • share the same coordinate system to form a combined virtual screen
  • use different coordinate systems to act as independent screens
This constructor is meant for the latter case.

If screen devices are reconfigured such that the coordinate system is affected, the behavior of existing Robot objects is undefined.

Parameters:
screen - A screen GraphicsDevice indicating the coordinate system the Robot will operate in.
Throws:
AWTException - if the platform configuration does not allow low-level input control
IllegalArgumentException - if screen is not a screen GraphicsDevice.
SecurityException - if createRobot permission is not granted
See Also:
GraphicsDevice, SecurityManager.checkPermission(java.security.Permission), AWTPermission
Method Detail

mouseMove

public void mouseMove(int x,
                      int y)
Moves mouse pointer to given screen coordinates.
Parameters:
x - X position
y - Y position

mousePress

public void mousePress(int buttons)
Presses one or more mouse buttons.
Parameters:
buttons - Button mask (combination of InputEvent.BUTTON1/2/3_MASK)
Throws:
IllegalArgumentException - if the button mask is not a valid combination

mouseRelease

public void mouseRelease(int buttons)
Releases one or more mouse buttons.
Parameters:
buttons - Button mask (combination of InputEvent.BUTTON1/2/3_MASK)
Throws:
IllegalArgumentException - if the button mask is not a valid combination

keyPress

public void keyPress(int keycode)
Presses a given key.

Key codes that have more than one physical key associated with them (e.g. KeyEvent.VK_SHIFT could mean either the left or right shift key) will map to the left key.

Parameters:
keyCode - Key to press (e.g. KeyEvent.VK_A)
Throws:
IllegalArgumentException - if keycode is not a valid key

keyRelease

public void keyRelease(int keycode)
Releases a given key.

Key codes that have more than one physical key associated with them (e.g. KeyEvent.VK_SHIFT could mean either the left or right shift key) will map to the left key.

Parameters:
keyCode - Key to release (e.g. KeyEvent.VK_A)
Throws:
IllegalArgumentException - if keycode is not a valid key

getPixelColor

public Color getPixelColor(int x,
                           int y)
Returns the color of a pixel at the given screen coordinates.
Parameters:
x - X position of pixel
y - Y position of pixel
Returns:
Color of the pixel

createScreenCapture

public BufferedImage createScreenCapture(Rectangle screenRect)
Creates an image containing pixels read from the screen.
Parameters:
screenRect - Rect to capture in screen coordinates
Returns:
The captured image
Throws:
IllegalArgumentException - if screenRect width and height are not greater than zero
SecurityException - if readDisplayPixels permission is not granted
See Also:
SecurityManager.checkPermission(java.security.Permission), AWTPermission

isAutoWaitForIdle

public boolean isAutoWaitForIdle()
Returns whether this Robot automatically invokes waitForIdle after generating an event.
Returns:
Whether waitForIdle is automatically called

setAutoWaitForIdle

public void setAutoWaitForIdle(boolean isOn)
Sets whether this Robot automatically invokes waitForIdle after generating an event.
Parameters:
isOn - Whether waitForIdle is automatically invoked

getAutoDelay

public int getAutoDelay()
Returns the number of milliseconds this Robot sleeps after generating an event.

setAutoDelay

public void setAutoDelay(int ms)
Sets the number of milliseconds this Robot sleeps after generating an event.
Throws:
IllegalArgumentException - If ms is not between 0 and 60,000 milliseconds inclusive

delay

public void delay(int ms)
Sleeps for the specified time.
Parameters:
ms - Time to sleep in milliseconds
Throws:
IllegalArgumentException - If ms is not between 0 and 60,000 milliseconds inclusive

waitForIdle

public void waitForIdle()
Waits until all events currently on the event queue have been processed.
Throws:
IllegalThreadStateException - if called on the AWT event dispatching thread

toString

public String toString()
Returns a string representation of this Robot.
Overrides:
toString in class Object
Returns:
the string representation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Scrollbar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Scrollbar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Scrollbar
All Implemented Interfaces:
Accessible, Adjustable, ImageObserver, MenuContainer, Serializable
public class Scrollbar
extends Component
implements Adjustable, Accessible

The Scrollbar class embodies a scroll bar, a familiar user-interface object. A scroll bar provides a convenient means for allowing a user to select from a range of values. The following three vertical scroll bars could be used as slider controls to pick the red, green, and blue components of a color:

Each scroll bar in this example could be created with code similar to the following:

 redSlider=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
 add(redSlider);

Alternatively, a scroll bar can represent a range of values. For example, if a scroll bar is used for scrolling through text, the width of the "bubble" or "thumb" can represent the amount of text that is visible. Here is an example of a scroll bar that represents a range:

The value range represented by the bubble is the visible range of the scroll bar. The horizontal scroll bar in this example could be created with code like the following:

 ranger = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300);
 add(ranger);

Note that the actual maximum value of the scroll bar is the maximum minus the visible. In the previous example, because the maximum is 300 and the visible is 60, the actual maximum value is 240. The range of the scrollbar track is 0 - 300. The left side of the bubble indicates the value of the scroll bar.

Normally, the user changes the value of the scroll bar by making a gesture with the mouse. For example, the user can drag the scroll bar's bubble up and down, or click in the scroll bar's unit increment or block increment areas. Keyboard gestures can also be mapped to the scroll bar. By convention, the Page Up and Page Down keys are equivalent to clicking in the scroll bar's block increment and block decrement areas.

When the user changes the value of the scroll bar, the scroll bar receives an instance of AdjustmentEvent. The scroll bar processes this event, passing it along to any registered listeners.

Any object that wishes to be notified of changes to the scroll bar's value should implement AdjustmentListener, an interface defined in the package java.awt.event. Listeners can be added and removed dynamically by calling the methods addAdjustmentListener and removeAdjustmentListener.

The AdjustmentEvent class defines five types of adjustment event, listed here:

  • AdjustmentEvent.TRACK is sent out when the user drags the scroll bar's bubble.
  • AdjustmentEvent.UNIT_INCREMENT is sent out when the user clicks in the left arrow of a horizontal scroll bar, or the top arrow of a vertical scroll bar, or makes the equivalent gesture from the keyboard.
  • AdjustmentEvent.UNIT_DECREMENT is sent out when the user clicks in the right arrow of a horizontal scroll bar, or the bottom arrow of a vertical scroll bar, or makes the equivalent gesture from the keyboard.
  • AdjustmentEvent.BLOCK_INCREMENT is sent out when the user clicks in the track, to the left of the bubble on a horizontal scroll bar, or above the bubble on a vertical scroll bar. By convention, the Page Up key is equivalent, if the user is using a keyboard that defines a Page Up key.
  • AdjustmentEvent.BLOCK_DECREMENT is sent out when the user clicks in the track, to the right of the bubble on a horizontal scroll bar, or below the bubble on a vertical scroll bar. By convention, the Page Down key is equivalent, if the user is using a keyboard that defines a Page Down key.

The JDK 1.0 event system is supported for backwards compatibility, but its use with newer versions of the platform is discouraged. The fives types of adjustment event introduced with JDK 1.1 correspond to the five event types that are associated with scroll bars in previous platform versions. The following list gives the adjustment event type, and the corresponding JDK 1.0 event type it replaces.

  • AdjustmentEvent.TRACK replaces Event.SCROLL_ABSOLUTE
  • AdjustmentEvent.UNIT_INCREMENT replaces Event.SCROLL_LINE_UP
  • AdjustmentEvent.UNIT_DECREMENT replaces Event.SCROLL_LINE_DOWN
  • AdjustmentEvent.BLOCK_INCREMENT replaces Event.SCROLL_PAGE_UP
  • AdjustmentEvent.BLOCK_DECREMENT replaces Event.SCROLL_PAGE_DOWN

Since:
JDK1.0
See Also:
AdjustmentEvent, AdjustmentListener, Serialized Form

Inner Class Summary
protected  class Scrollbar.AccessibleAWTScrollBar
This class implements accessibility support for the Scrollbar class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | HORIZONTAL A constant that indicates a horizontal scroll bar.
static int | VERTICAL A constant that indicates a vertical scroll bar.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Scrollbar()
Constructs a new vertical scroll bar.
Scrollbar(int orientation)
Constructs a new scroll bar with the specified orientation.
Scrollbar(int orientation, int value, int visible, int minimum, int maximum)
Constructs a new scroll bar with the specified orientation, initial value, page size, and minimum and maximum values.
Method Summary
 void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive instances of AdjustmentEvent from this scroll bar.
 void addNotify()
Creates the Scrollbar's peer.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Scrollbar.
 int getBlockIncrement()
Gets the block increment of this scroll bar.
 int getLineIncrement()
Deprecated. As of JDK version 1.1, replaced by getUnitIncrement().
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Scrollbar with addXXXListener(), where XXX is the name of the listenerType argument.
 int getMaximum()
Gets the maximum value of this scroll bar.
 int getMinimum()
Gets the minimum value of this scroll bar.
 int getOrientation()
Determines the orientation of this scroll bar.
 int getPageIncrement()
Deprecated. As of JDK version 1.1, replaced by getBlockIncrement().
 int getUnitIncrement()
Gets the unit increment for this scrollbar.
 int getValue()
Gets the current value of this scroll bar.
 int getVisible()
Deprecated. As of JDK version 1.1, replaced by getVisibleAmount().
 int getVisibleAmount()
Gets the visible amount of this scroll bar.
protected  String paramString()
Returns the parameter string representing the state of this scroll bar.
protected  void processAdjustmentEvent(AdjustmentEvent e)
Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects.
protected  void processEvent(AWTEvent e)
Processes events on this scroll bar.
 void removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives instances of AdjustmentEvent from this scroll bar.
 void setBlockIncrement(int v)
Sets the block increment for this scroll bar.
 void setLineIncrement(int v)
Deprecated. As of JDK version 1.1, replaced by setUnitIncrement(int).
 void setMaximum(int newMaximum)
Sets the maximum value of this scroll bar.
 void setMinimum(int newMinimum)
Sets the minimum value of this scroll bar.
 void setOrientation(int orientation)
Sets the orientation for this scroll bar.
 void setPageIncrement(int v)
Deprecated. As of JDK version 1.1, replaced by setBlockIncrement().
 void setUnitIncrement(int v)
Sets the unit increment for this scroll bar.
 void setValue(int newValue)
Sets the value of this scroll bar to the specified value.
 void setValues(int value, int visible, int minimum, int maximum)
Sets the values of four properties for this scroll bar.
 void setVisibleAmount(int newAmount)
Sets the visible amount of this scroll bar.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

HORIZONTAL

public static final int HORIZONTAL
A constant that indicates a horizontal scroll bar.

VERTICAL

public static final int VERTICAL
A constant that indicates a vertical scroll bar.
Constructor Detail

Scrollbar

public Scrollbar()
Constructs a new vertical scroll bar. The default properties of the scroll bar are listed in the following table:

Property | Description | Default Value
orientation | indicates if the scroll bar is vertical or horizontal | Scrollbar.VERTICAL
value value which controls the location
of the scroll bar bubble 		0
minimum | minimum value of the scroll bar | 0
maximum | maximum value of the scroll bar | 100
unit increment amount the value changes when the
Line Up or Line Down key is pressed,
or when the end arrows of the scrollbar
are clicked 		1
block increment amount the value changes when the
Page Up or Page Down key is pressed,
or when the scrollbar track is clicked
on either side of the bubble 		10

Scrollbar

public Scrollbar(int orientation)
Constructs a new scroll bar with the specified orientation.

The orientation argument must take one of the two values Scrollbar.HORIZONTAL, or Scrollbar.VERTICAL, indicating a horizontal or vertical scroll bar, respectively.

Parameters:
orientation - indicates the orientation of the scroll bar.
Throws:
IllegalArgumentException - when an illegal value for the orientation argument is supplied.

Scrollbar

public Scrollbar(int orientation,
                 int value,
                 int visible,
                 int minimum,
                 int maximum)
Constructs a new scroll bar with the specified orientation, initial value, page size, and minimum and maximum values.

The orientation argument must take one of the two values Scrollbar.HORIZONTAL, or Scrollbar.VERTICAL, indicating a horizontal or vertical scroll bar, respectively.

If the specified maximum value is less than the minimum value, it is changed to be the same as the minimum value. If the initial value is lower than the minimum value, it is changed to be the minimum value; if it is greater than the maximum value, it is changed to be the maximum value.

Parameters:
orientation - indicates the orientation of the scroll bar.
value - the initial value of the scroll bar.
visible - the size of the scroll bar's bubble, representing the visible portion; the scroll bar uses this value when paging up or down by a page.
minimum - the minimum value of the scroll bar.
maximum - the maximum value of the scroll bar.
Method Detail

addNotify

public void addNotify()
Creates the Scrollbar's peer. The peer allows you to modify the appearance of the Scrollbar without changing any of its functionality.
Overrides:
addNotify in class Component
Following copied from class: java.awt.Component
See Also:
Component.isDisplayable(), Component.removeNotify()

getOrientation

public int getOrientation()
Determines the orientation of this scroll bar.
Specified by:
getOrientation in interface Adjustable
Returns:
the orientation of this scroll bar, either Scrollbar.HORIZONTAL or Scrollbar.VERTICAL.
See Also:
setOrientation(int)

setOrientation

public void setOrientation(int orientation)
Sets the orientation for this scroll bar.
Parameters:
the - orientation of this scroll bar, either Scrollbar.HORIZONTAL or Scrollbar.VERTICAL.
Throws:
IllegalArgumentException - if the value supplied for orientation is not a legal value.
Since:
JDK1.1
See Also:
getOrientation()

getValue

public int getValue()
Gets the current value of this scroll bar.
Specified by:
getValue in interface Adjustable
Returns:
the current value of this scroll bar.
See Also:
getMinimum(), getMaximum()

setValue

public void setValue(int newValue)
Sets the value of this scroll bar to the specified value.

If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.

Normally, a program should change a scroll bar's value only by calling setValues. The setValues method simultaneously and synchronously sets the minimum, maximum, visible amount, and value properties of a scroll bar, so that they are mutually consistent.

Specified by:
setValue in interface Adjustable
Parameters:
newValue - the new value of the scroll bar.
See Also:
setValues(int, int, int, int),
getValue(),
getMinimum(),
getMaximum()

getMinimum

public int getMinimum()
Gets the minimum value of this scroll bar.
Specified by:
getMinimum in interface Adjustable
Returns:
the minimum value of this scroll bar.
See Also:
getValue(), getMaximum()

setMinimum

public void setMinimum(int newMinimum)
Sets the minimum value of this scroll bar.

Normally, a program should change a scroll bar's minimum value only by calling setValues. The setValues method simultaneously and synchronously sets the minimum, maximum, visible amount, and value properties of a scroll bar, so that they are mutually consistent.

Specified by:
setMinimum in interface Adjustable
Parameters:
newMinimum - the new minimum value for this scroll bar.
Since:
JDK1.1
See Also:
setValues(int, int, int, int), setMaximum(int)

getMaximum

public int getMaximum()
Gets the maximum value of this scroll bar.
Specified by:
getMaximum in interface Adjustable
Returns:
the maximum value of this scroll bar.
See Also:
getValue(), getMinimum()

setMaximum

public void setMaximum(int newMaximum)
Sets the maximum value of this scroll bar.

Normally, a program should change a scroll bar's maximum value only by calling setValues. The setValues method simultaneously and synchronously sets the minimum, maximum, visible amount, and value properties of a scroll bar, so that they are mutually consistent.

Specified by:
setMaximum in interface Adjustable
Parameters:
newMaximum - the new maximum value for this scroll bar.
Since:
JDK1.1
See Also:
setValues(int, int, int, int), setMinimum(int)

getVisibleAmount

public int getVisibleAmount()
Gets the visible amount of this scroll bar.

The visible amount of a scroll bar is the range of values represented by the width of the scroll bar's bubble. It is used to determine the scroll bar's block increment.

Specified by:
getVisibleAmount in interface Adjustable
Returns:
the visible amount of this scroll bar.
Since:
JDK1.1
See Also:
setVisibleAmount(int)

getVisible

public int getVisible()
Deprecated. As of JDK version 1.1, replaced by getVisibleAmount().

setVisibleAmount

public void setVisibleAmount(int newAmount)
Sets the visible amount of this scroll bar.

The visible amount of a scroll bar is the range of values represented by the width of the scroll bar's bubble. It is used to determine the scroll bar's block increment.

Normally, a program should change a scroll bar's value only by calling setValues. The setValues method simultaneously and synchronously sets the minimum, maximum, visible amount, and value properties of a scroll bar, so that they are mutually consistent.

Specified by:
setVisibleAmount in interface Adjustable
Parameters:
newAmount - the amount visible per page.
Since:
JDK1.1
See Also:
getVisibleAmount(), setValues(int, int, int, int)

setUnitIncrement

public void setUnitIncrement(int v)
Sets the unit increment for this scroll bar.

The unit increment is the value that is added (subtracted) when the user activates the unit increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.

Specified by:
setUnitIncrement in interface Adjustable
Parameters:
v - the amount by which to increment or decrement the scroll bar's value.
Since:
JDK1.1
See Also:
getUnitIncrement()

setLineIncrement

public void setLineIncrement(int v)
Deprecated. As of JDK version 1.1, replaced by setUnitIncrement(int).

getUnitIncrement

public int getUnitIncrement()
Gets the unit increment for this scrollbar.

The unit increment is the value that is added (subtracted) when the user activates the unit increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.

Specified by:
getUnitIncrement in interface Adjustable
Returns:
the unit increment of this scroll bar.
Since:
JDK1.1
See Also:
setUnitIncrement(int)

getLineIncrement

public int getLineIncrement()
Deprecated. As of JDK version 1.1, replaced by getUnitIncrement().

setBlockIncrement

public void setBlockIncrement(int v)
Sets the block increment for this scroll bar.

The block increment is the value that is added (subtracted) when the user activates the block increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.

Specified by:
setBlockIncrement in interface Adjustable
Parameters:
v - the amount by which to increment or decrement the scroll bar's value.
Since:
JDK1.1
See Also:
getBlockIncrement()

setPageIncrement

public void setPageIncrement(int v)
Deprecated. As of JDK version 1.1, replaced by setBlockIncrement().

getBlockIncrement

public int getBlockIncrement()
Gets the block increment of this scroll bar.

The block increment is the value that is added (subtracted) when the user activates the block increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.

Specified by:
getBlockIncrement in interface Adjustable
Returns:
the block increment of this scroll bar.
Since:
JDK1.1
See Also:
setBlockIncrement(int)

getPageIncrement

public int getPageIncrement()
Deprecated. As of JDK version 1.1, replaced by getBlockIncrement().

setValues

public void setValues(int value,
                      int visible,
                      int minimum,
                      int maximum)
Sets the values of four properties for this scroll bar.

This method simultaneously and synchronously sets the values of four scroll bar properties, assuring that the values of these properties are mutually consistent. It enforces the constraints that maximum cannot be less than minimum, and that value cannot be less than the minimum or greater than the maximum.

Parameters:
value - is the position in the current window.
visible - is the amount visible per page.
minimum - is the minimum value of the scroll bar.
maximum - is the maximum value of the scroll bar.

addAdjustmentListener

public void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive instances of AdjustmentEvent from this scroll bar. If l is null, no exception is thrown and no action is performed.
Specified by:
addAdjustmentListener in interface Adjustable
Parameters:
l - the adjustment listener.
Since:
JDK1.1
See Also:
AdjustmentEvent, AdjustmentListener, removeAdjustmentListener(java.awt.event.AdjustmentListener)

removeAdjustmentListener

public void removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives instances of AdjustmentEvent from this scroll bar. If l is null, no exception is thrown and no action is performed.
Specified by:
removeAdjustmentListener in interface Adjustable
Parameters:
l - the adjustment listener.
Since:
JDK1.1
See Also:
AdjustmentEvent, AdjustmentListener, addAdjustmentListener(java.awt.event.AdjustmentListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Scrollbar with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the AdjustmentListener(s) for the given Scrollbar s, one would write:
 AdjustmentListener[] als = (AdjustmentListener[])(s.getListeners(AdjustmentListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this scrollbar
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this scroll bar. If the event is an instance of AdjustmentEvent, it invokes the processAdjustmentEvent method. Otherwise, it invokes its superclass's processEvent method.
Overrides:
processEvent in class Component
Parameters:
e - the event.
Since:
JDK1.1
See Also:
AdjustmentEvent, processAdjustmentEvent(java.awt.event.AdjustmentEvent)

processAdjustmentEvent

protected void processAdjustmentEvent(AdjustmentEvent e)
Processes adjustment events occurring on this scrollbar by dispatching them to any registered AdjustmentListener objects.

This method is not called unless adjustment events are enabled for this component. Adjustment events are enabled when one of the following occurs:

  • An AdjustmentListener object is registered via addAdjustmentListener.
  • Adjustment events are enabled via enableEvents.

Parameters:
e - the adjustment event.
Since:
JDK1.1
See Also:
AdjustmentEvent, AdjustmentListener, addAdjustmentListener(java.awt.event.AdjustmentListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this scroll bar. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this scroll bar.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Scrollbar. For scrollbars, the AccessibleContext takes the form of an AccessibleAWTScrollBar. A new AccessibleAWTScrollBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTScrollBar that serves as the AccessibleContext of this ScrollBar
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class ScrollPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.ScrollPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class ScrollPane
extends Container
implements Accessible

A container class which implements automatic horizontal and/or vertical scrolling for a single child component. The display policy for the scrollbars can be set to:

  1. as needed: scrollbars created and shown only when needed by scrollpane
  2. always: scrollbars created and always shown by the scrollpane
  3. never: scrollbars never created or shown by the scrollpane

The state of the horizontal and vertical scrollbars is represented by two objects (one for each dimension) which implement the Adjustable interface. The API provides methods to access those objects such that the attributes on the Adjustable object (such as unitIncrement, value, etc.) can be manipulated.

Certain adjustable properties (minimum, maximum, blockIncrement, and visibleAmount) are set internally by the scrollpane in accordance with the geometry of the scrollpane and its child and these should not be set by programs using the scrollpane.

If the scrollbar display policy is defined as "never", then the scrollpane can still be programmatically scrolled using the setScrollPosition() method and the scrollpane will move and clip the child's contents appropriately. This policy is useful if the program needs to create and manage its own adjustable controls.

The placement of the scrollbars is controlled by platform-specific properties set by the user outside of the program.

The initial size of this container is set to 100x100, but can be reset using setSize().

Insets are used to define any space used by scrollbars and any borders created by the scroll pane. getInsets() can be used to get the current value for the insets. If the value of scrollbarsAlwaysVisible is false, then the value of the insets will change dynamically depending on whether the scrollbars are currently visible or not.

See Also:
Serialized Form

Inner Class Summary
protected  class ScrollPane.AccessibleAWTScrollPane
This class implements accessibility support for the ScrollPane class.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | SCROLLBARS_ALWAYS Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.
static int | SCROLLBARS_AS_NEEDED Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension.
static int | SCROLLBARS_NEVER Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
ScrollPane()
Create a new scrollpane container with a scrollbar display policy of "as needed".
ScrollPane(int scrollbarDisplayPolicy)
Create a new scrollpane container.
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
Adds the specified component to this scroll pane container.
 void addNotify()
Creates the scroll pane's peer.
 void doLayout()
Lays out this container by resizing its child to its preferred size.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this ScrollPane.
 Adjustable getHAdjustable()
Returns the Adjustable object which represents the state of the horizontal scrollbar.
 int getHScrollbarHeight()
Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
 int getScrollbarDisplayPolicy()
Returns the display policy for the scrollbars.
 Point getScrollPosition()
Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port.
 Adjustable getVAdjustable()
Returns the Adjustable object which represents the state of the vertical scrollbar.
 Dimension getViewportSize()
Returns the current size of the scroll pane's view port.
 int getVScrollbarWidth()
Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
 void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().
 String paramString()
Returns the parameter string representing the state of this container.
 void printComponents(Graphics g)
Prints the component in this scroll pane.
 void setLayout(LayoutManager mgr)
Sets the layout manager for this container.
 void setScrollPosition(int x, int y)
Scrolls to the specified position within the child component.
 void setScrollPosition(Point p)
Scrolls to the specified position within the child component.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SCROLLBARS_AS_NEEDED

public static final int SCROLLBARS_AS_NEEDED
Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension.

SCROLLBARS_ALWAYS

public static final int SCROLLBARS_ALWAYS
Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child.

SCROLLBARS_NEVER

public static final int SCROLLBARS_NEVER
Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child.
Constructor Detail

ScrollPane

public ScrollPane()
Create a new scrollpane container with a scrollbar display policy of "as needed".

ScrollPane

public ScrollPane(int scrollbarDisplayPolicy)
Create a new scrollpane container.
Parameters:
scrollbarDisplayPolicy - policy for when scrollbars should be shown
Method Detail

addImpl

protected final void addImpl(Component comp,
                             Object constraints,
                             int index)
Adds the specified component to this scroll pane container. If the scroll pane has an existing child component, that component is removed and the new one is added.
Overrides:
addImpl in class Container
Parameters:
comp - the component to be added
constraints - not applicable
index - position of child component (must be <= 0)

getScrollbarDisplayPolicy

public int getScrollbarDisplayPolicy()
Returns the display policy for the scrollbars.
Returns:
the display policy for the scrollbars

getViewportSize

public Dimension getViewportSize()
Returns the current size of the scroll pane's view port.
Returns:
the size of the view port in pixels

getHScrollbarHeight

public int getHScrollbarHeight()
Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
Returns:
the height of a horizontal scrollbar in pixels

getVScrollbarWidth

public int getVScrollbarWidth()
Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not.
Returns:
the width of a vertical scrollbar in pixels

getVAdjustable

public Adjustable getVAdjustable()
Returns the Adjustable object which represents the state of the vertical scrollbar.

getHAdjustable

public Adjustable getHAdjustable()
Returns the Adjustable object which represents the state of the horizontal scrollbar.

setScrollPosition

public void setScrollPosition(int x,
                              int y)
Scrolls to the specified position within the child component. A call to this method is only valid if the scroll pane contains a child. Specifying a position outside of the legal scrolling bounds of the child will scroll to the closest legal position. Legal bounds are defined to be the rectangle: x = 0, y = 0, width = (child width - view port width), height = (child height - view port height). This is a convenience method which interfaces with the Adjustable objects which represent the state of the scrollbars.
Parameters:
x - the x position to scroll to
y - the y position to scroll to

setScrollPosition

public void setScrollPosition(Point p)
Scrolls to the specified position within the child component. A call to this method is only valid if the scroll pane contains a child and the specified position is within legal scrolling bounds of the child. Specifying a position outside of the legal scrolling bounds of the child will scroll to the closest legal position. Legal bounds are defined to be the rectangle: x = 0, y = 0, width = (child width - view port width), height = (child height - view port height). This is a convenience method which interfaces with the Adjustable objects which represent the state of the scrollbars.
Parameters:
p - the Point representing the position to scroll to

getScrollPosition

public Point getScrollPosition()
Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port. This is a convenience method which interfaces with the adjustable objects which represent the state of the scrollbars.
Returns:
the coordinate position for the current scroll position

setLayout

public final void setLayout(LayoutManager mgr)
Sets the layout manager for this container. This method is overridden to prevent the layout mgr from being set.
Overrides:
setLayout in class Container
Parameters:
mgr - the specified layout manager

doLayout

public void doLayout()
Lays out this container by resizing its child to its preferred size. If the new preferred size of the child causes the current scroll position to be invalid, the scroll position is set to the closest valid position.
Overrides:
doLayout in class Container
See Also:
Component.validate()

layout

public void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().

Overrides:
layout in class Container

printComponents

public void printComponents(Graphics g)
Prints the component in this scroll pane.
Overrides:
printComponents in class Container
Parameters:
g - the specified Graphics window
See Also:
Component.print(java.awt.Graphics), Component.printAll(java.awt.Graphics)

addNotify

public void addNotify()
Creates the scroll pane's peer.
Overrides:
addNotify in class Container
Following copied from class: java.awt.Container
See Also:
Component.isDisplayable(), Container.removeNotify()

paramString

public String paramString()
Description copied from class: Container
Returns the parameter string representing the state of this container. This string is useful for debugging.
Overrides:
paramString in class Container
Following copied from class: java.awt.Container
Returns:
the parameter string of this container.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this ScrollPane. For scroll panes, the AccessibleContext takes the form of an AccessibleAWTScrollPane. A new AccessibleAWTScrollPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTScrollPane that serves as the AccessibleContext of this ScrollPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Shape

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Shape

All Known Implementing Classes:
Polygon, RectangularShape, Rectangle, Area, Line2D, GeneralPath, QuadCurve2D, CubicCurve2D
public interface Shape

The Shape interface provides definitions for objects that represent some form of geometric shape. The Shape is described by a PathIterator object, which can express the outline of the Shape as well as a rule for determining how the outline divides the 2D plane into interior and exterior points. Each Shape object provides callbacks to get the bounding box of the geometry, determine whether points or rectangles lie partly or entirely within the interior of the Shape, and retrieve a PathIterator object that describes the trajectory path of the Shape outline.

Definition of insideness: A point is considered to lie inside a Shape if and only if:

  • it lies completely inside theShape boundary or
  • it lies exactly on the Shape boundary and the space immediately adjacent to the point in the increasing X direction is entirely inside the boundary or
  • it lies exactly on a horizontal boundary segment and the space immediately adjacent to the point in the increasing Y direction is inside the boundary.

See Also:
PathIterator, AffineTransform, FlatteningPathIterator, GeneralPath

Method Summary
boolean | contains(double x, double y) Tests if the specified coordinates are inside the boundary of the Shape.
boolean | contains(double x, double y, double w, double h) Tests if the interior of the Shape entirely contains the specified rectangular area.
boolean | contains(Point2D p) Tests if a specified Point2D is inside the boundary of the Shape.
boolean | contains(Rectangle2D r) Tests if the interior of the Shape entirely contains the specified Rectangle2D.
Rectangle | getBounds() Returns an integer Rectangle that completely encloses the Shape.
Rectangle2D | getBounds2D() Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
PathIterator | getPathIterator(AffineTransform at) Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.
PathIterator | getPathIterator(AffineTransform at, double flatness) Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.
boolean | intersects(double x, double y, double w, double h) Tests if the interior of the Shape intersects the interior of a specified rectangular area.
boolean | intersects(Rectangle2D r) Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.

Method Detail

getBounds

public Rectangle getBounds()
Returns an integer Rectangle that completely encloses the Shape. Note that there is no guarantee that the returned Rectangle is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle. The returned Rectangle might also fail to completely enclose the Shape if the Shape overflows the limited range of the integer data type. The getBounds2D method generally returns a tighter bounding box due to its greater flexibility in representation.
Returns:
an integer Rectangle that completely encloses the Shape.
See Also:
getBounds2D()

getBounds2D

public Rectangle2D getBounds2D()
Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.
Returns:
an instance of Rectangle2D that is a high-precision bounding box of the Shape.
See Also:
getBounds()

contains

public boolean contains(double x,
                        double y)
Tests if the specified coordinates are inside the boundary of the Shape.
Parameters:
x, y - the specified coordinates
Returns:
true if the specified coordinates are inside the Shape boundary; false otherwise.

contains

public boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of the Shape.
Parameters:
p - a specified Point2D
Returns:
true if the specified Point2D is inside the boundary of the Shape; false otherwise.

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Tests if the interior of the Shape intersects the interior of a specified rectangular area. The rectangular area is considered to intersect the Shape if any point is contained in both the interior of the Shape and the specified rectangular area.

This method might conservatively return true when:

  • there is a high probability that the rectangular area and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that this method might return true even though the rectangular area does not intersect the Shape. The Area class can be used to perform more accurate computations of geometric intersection for any Shape object if a more precise answer is required.
Parameters:
x, y - the coordinates of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the interior of the Shape and the interior of the rectangular area intersect, or are both highly likely to intersect and intersection calculations would be too expensive to perform; false otherwise.
See Also:
Area

intersects

public boolean intersects(Rectangle2D r)
Tests if the interior of the Shape intersects the interior of a specified Rectangle2D. This method might conservatively return true when:
  • there is a high probability that the Rectangle2D and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that this method might return true even though the Rectangle2D does not intersect the Shape.
Parameters:
r - the specified Rectangle2D
Returns:
true if the interior of the Shape and the interior of the specified Rectangle2D intersect, or are both highly likely to intersect and intersection calculations would be too expensive to perform; false otherwise.
See Also:
intersects(double, double, double, double)

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Tests if the interior of the Shape entirely contains the specified rectangular area. All coordinates that lie inside the rectangular area must lie within the Shape for the entire rectanglar area to be considered contained within the Shape.

This method might conservatively return false when:

  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the rectangular area are prohibitively expensive.
This means that this method might return false even though the Shape contains the rectangular area. The Area class can be used to perform more accurate computations of geometric intersection for any Shape object if a more precise answer is required.
Parameters:
x, y - the coordinates of the specified rectangular area
w - the width of the specified rectangular area
h - the height of the specified rectangular area
Returns:
true if the interior of the Shape entirely contains the specified rectangular area; false otherwise or, if the Shape contains the rectangular area and the intersects method returns true and the containment calculations would be too expensive to perform.
See Also:
Area, intersects(double, double, double, double)

contains

public boolean contains(Rectangle2D r)
Tests if the interior of the Shape entirely contains the specified Rectangle2D. This method might conservatively return false when:
  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the Rectangle2D are prohibitively expensive.
This means that this method might return false even though the Shape contains the Rectangle2D. The Area class can be used to perform more accurate computations of geometric intersection for any Shape object if a more precise answer is required.
Parameters:
r - The specified Rectangle2D
Returns:
true if the interior of the Shape entirely contains the Rectangle2D; false otherwise or, if the Shape contains the Rectangle2D and the intersects method returns true and the containment calculations would be too expensive to perform.
See Also:
contains(double, double, double, double)

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline. If an optional AffineTransform is specified, the coordinates returned in the iteration are transformed accordingly.

Each call to this method returns a fresh PathIterator object that traverses the geometry of the Shape object independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Before using a particular implementation of the Shape interface in more than one thread simultaneously, refer to its documentation to verify that it guarantees that iterations are isolated from modifications.

Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
Returns:
a new PathIterator object, which independently traverses the geometry of the Shape.

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator.

If an optional AffineTransform is specified, the coordinates returned in the iteration are transformed accordingly.

The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. Note that a limit on the accuracy of the flattened path might be silently imposed, causing very small flattening parameters to be treated as larger values. This limit, if there is one, is defined by the particular implementation that is used.

Each call to this method returns a fresh PathIterator object that traverses the Shape object geometry independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Before using a particular implementation of this interface in more than one thread simultaneously, refer to its documentation to verify that it guarantees that iterations are isolated from modifications.

Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
flatness - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve
Returns:
a new PathIterator that independently traverses the Shape geometry.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SidesType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class JobAttributes.SidesType

java.lang.Object
  |
  +--java.awt.AttributeValue
        |
        +--java.awt.JobAttributes.SidesType
Enclosing class:
JobAttributes
public static final class JobAttributes.SidesType
extends java.awt.AttributeValue

A type-safe enumeration of possible multi-page impositions. These impositions are in compliance with IPP 1.1.

Field Summary
static JobAttributes.SidesType | ONE_SIDED The SidesType instance to use for specifying that consecutive job pages should be printed upon the same side of consecutive media sheets.
static JobAttributes.SidesType | TWO_SIDED_LONG_EDGE The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge.
static JobAttributes.SidesType | TWO_SIDED_SHORT_EDGE The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge.
Method Summary
int | hashCode() Returns a hash code value for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ONE_SIDED

public static final JobAttributes.SidesType ONE_SIDED
The SidesType instance to use for specifying that consecutive job pages should be printed upon the same side of consecutive media sheets.

TWO_SIDED_LONG_EDGE

public static final JobAttributes.SidesType TWO_SIDED_LONG_EDGE
The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the long edge.

TWO_SIDED_SHORT_EDGE

public static final JobAttributes.SidesType TWO_SIDED_SHORT_EDGE
The SidesType instance to use for specifying that consecutive job pages should be printed upon front and back sides of consecutive media sheets, such that the orientation of each pair of pages on the medium would be correct for the reader as if for binding on the short edge.
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Stroke

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Stroke

All Known Implementing Classes:
BasicStroke
public interface Stroke

The Stroke interface allows a Graphics2D object to obtain a Shape that is the decorated outline, or stylistic representation of the outline, of the specified Shape. Stroking a Shape is like tracing its outline with a marking pen of the appropriate size and shape. The area where the pen would place ink is the area enclosed by the outline Shape.

The methods of the Graphics2D interface that use the outline Shape returned by a Stroke object include draw and any other methods that are implemented in terms of that method, such as drawLine, drawRect, drawRoundRect, drawOval, drawArc, drawPolyline, and drawPolygon.

The objects of the classes implementing Stroke must be read-only because Graphics2D does not clone these objects either when they are set as an attribute with the setStroke method or when the Graphics2D object is itself cloned. If a Stroke object is modified after it is set in the Graphics2D context then the behavior of subsequent rendering would be undefined.

See Also:
BasicStroke, Graphics2D.setStroke(java.awt.Stroke)

Method Summary
 Shape createStrokedShape(Shape p)
Returns an outline Shape which encloses the area that should be painted when the Shape is stroked according to the rules defined by the object implementing the Stroke interface.

Method Detail

createStrokedShape

public Shape createStrokedShape(Shape p)
Returns an outline Shape which encloses the area that should be painted when the Shape is stroked according to the rules defined by the object implementing the Stroke interface.
Parameters:
p - a Shape to be stroked
Returns:
the stroked outline Shape.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemColor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class SystemColor

java.lang.Object
  |
  +--java.awt.Color
        |
        +--java.awt.SystemColor
All Implemented Interfaces:
Paint, Serializable, Transparency
public final class SystemColor
extends Color
implements Serializable

A class to encapsulate symbolic colors representing the color of GUI objects on a system. For systems which support the dynamic update of the system colors (when the user changes the colors) the actual RGB values of these symbolic colors will also change dynamically. In order to compare the "current" RGB value of a SystemColor object with a non-symbolic Color object, getRGB() should be used rather than equals().

See Also:
Serialized Form

Field Summary
static int | ACTIVE_CAPTION The array index for the active caption background color.
static int | ACTIVE_CAPTION_BORDER The array index for the active caption border color.
static int | ACTIVE_CAPTION_TEXT The array index for the action caption text color.
static SystemColor | activeCaption The background color for captions in window borders.
static SystemColor | activeCaptionBorder The border color for captions in window borders.
static SystemColor | activeCaptionText The text color for captions in window borders.
static SystemColor | control The background color for control objects.
static int | CONTROL The array index for the control background color.
static int | CONTROL_DK_SHADOW The array index for the control dark shadow color.
static int | CONTROL_HIGHLIGHT The array index for the control highlight color.
static int | CONTROL_LT_HIGHLIGHT The array index for the control light highlight color.
static int | CONTROL_SHADOW The array index for the control shadow color.
static int | CONTROL_TEXT The array index for the control text color.
static SystemColor | controlDkShadow The dark shadow color for control objects.
static SystemColor | controlHighlight The regular highlight color for control objects.
static SystemColor | controlLtHighlight The light highlight color for control objects.
static SystemColor | controlShadow The regular shadow color for control objects.
static SystemColor | controlText The text color for control objects.
static SystemColor | desktop The color of the desktop background.
static int | DESKTOP The array index for the desktop background color.
static int | INACTIVE_CAPTION The array index for the inactive caption background color.
static int | INACTIVE_CAPTION_BORDER The array index for the inactive caption border color.
static int | INACTIVE_CAPTION_TEXT The array index for the inactive caption text color.
static SystemColor | inactiveCaption The background color for inactive captions in window borders.
static SystemColor | inactiveCaptionBorder The border color for inactive captios in window borders.
static SystemColor | inactiveCaptionText The text color for inactive captions in window borders.
static SystemColor | info The background color for info(help) text.
static int | INFO The array index for the info background color.
static int | INFO_TEXT The array index for the info text color.
static SystemColor | infoText The text color for info(help) text.
static SystemColor | menu The background color for menus.
static int | MENU The array index for the menu background color.
static int | MENU_TEXT The array index for the menu text color.
static SystemColor | menuText The text color for menus.
static int | NUM_COLORS The number of system colors in the array.
static SystemColor | scrollbar The background color for scrollbars.
static int | SCROLLBAR The array index for the scrollbar background color.
static SystemColor | text The background color for text components.
static int | TEXT The array index for the text background color.
static int | TEXT_HIGHLIGHT The array index for the text highlight color.
static int | TEXT_HIGHLIGHT_TEXT The array index for the text highlight text color.
static int | TEXT_INACTIVE_TEXT The array index for the text inactive text color.
static int | TEXT_TEXT The array index for the text text color.
static SystemColor | textHighlight The background color for highlighted text.
static SystemColor | textHighlightText The text color for highlighted text.
static SystemColor | textInactiveText The text color for inactive text.
static SystemColor | textText The text color for text components.
static SystemColor | window The background color for windows.
static int | WINDOW The array index for the window background color.
static int | WINDOW_BORDER The array index for the window border color.
static int | WINDOW_TEXT The array index for the window text color.
static SystemColor | windowBorder The border color for windows.
static SystemColor | windowText The text color for windows.
Fields inherited from class java.awt.Color
black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Method Summary
PaintContext | createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Create and return a PaintContext used to generate a solid color pattern.
int | getRGB() Gets the "current" RGB value representing the symbolic color.
String | toString() Returns the String representation of this Color's values.
Methods inherited from class java.awt.Color
brighter, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DESKTOP

public static final int DESKTOP
The array index for the desktop background color.

ACTIVE_CAPTION

public static final int ACTIVE_CAPTION
The array index for the active caption background color.

ACTIVE_CAPTION_TEXT

public static final int ACTIVE_CAPTION_TEXT
The array index for the action caption text color.

ACTIVE_CAPTION_BORDER

public static final int ACTIVE_CAPTION_BORDER
The array index for the active caption border color.

INACTIVE_CAPTION

public static final int INACTIVE_CAPTION
The array index for the inactive caption background color.

INACTIVE_CAPTION_TEXT

public static final int INACTIVE_CAPTION_TEXT
The array index for the inactive caption text color.

INACTIVE_CAPTION_BORDER

public static final int INACTIVE_CAPTION_BORDER
The array index for the inactive caption border color.

WINDOW

public static final int WINDOW
The array index for the window background color.

WINDOW_BORDER

public static final int WINDOW_BORDER
The array index for the window border color.

WINDOW_TEXT

public static final int WINDOW_TEXT
The array index for the window text color.

MENU

public static final int MENU
The array index for the menu background color.

MENU_TEXT

public static final int MENU_TEXT
The array index for the menu text color.

TEXT

public static final int TEXT
The array index for the text background color.

TEXT_TEXT

public static final int TEXT_TEXT
The array index for the text text color.

TEXT_HIGHLIGHT

public static final int TEXT_HIGHLIGHT
The array index for the text highlight color.

TEXT_HIGHLIGHT_TEXT

public static final int TEXT_HIGHLIGHT_TEXT
The array index for the text highlight text color.

TEXT_INACTIVE_TEXT

public static final int TEXT_INACTIVE_TEXT
The array index for the text inactive text color.

CONTROL

public static final int CONTROL
The array index for the control background color.

CONTROL_TEXT

public static final int CONTROL_TEXT
The array index for the control text color.

CONTROL_HIGHLIGHT

public static final int CONTROL_HIGHLIGHT
The array index for the control highlight color.

CONTROL_LT_HIGHLIGHT

public static final int CONTROL_LT_HIGHLIGHT
The array index for the control light highlight color.

CONTROL_SHADOW

public static final int CONTROL_SHADOW
The array index for the control shadow color.

CONTROL_DK_SHADOW

public static final int CONTROL_DK_SHADOW
The array index for the control dark shadow color.

SCROLLBAR

public static final int SCROLLBAR
The array index for the scrollbar background color.

INFO

public static final int INFO
The array index for the info background color.

INFO_TEXT

public static final int INFO_TEXT
The array index for the info text color.

NUM_COLORS

public static final int NUM_COLORS
The number of system colors in the array.

desktop

public static final SystemColor desktop
The color of the desktop background.

activeCaption

public static final SystemColor activeCaption
The background color for captions in window borders.

activeCaptionText

public static final SystemColor activeCaptionText
The text color for captions in window borders.

activeCaptionBorder

public static final SystemColor activeCaptionBorder
The border color for captions in window borders.

inactiveCaption

public static final SystemColor inactiveCaption
The background color for inactive captions in window borders.

inactiveCaptionText

public static final SystemColor inactiveCaptionText
The text color for inactive captions in window borders.

inactiveCaptionBorder

public static final SystemColor inactiveCaptionBorder
The border color for inactive captios in window borders.

window

public static final SystemColor window
The background color for windows.

windowBorder

public static final SystemColor windowBorder
The border color for windows.

windowText

public static final SystemColor windowText
The text color for windows.

menu

public static final SystemColor menu
The background color for menus.

menuText

public static final SystemColor menuText
The text color for menus.

text

public static final SystemColor text
The background color for text components.

textText

public static final SystemColor textText
The text color for text components.

textHighlight

public static final SystemColor textHighlight
The background color for highlighted text.

textHighlightText

public static final SystemColor textHighlightText
The text color for highlighted text.

textInactiveText

public static final SystemColor textInactiveText
The text color for inactive text.

control

public static final SystemColor control
The background color for control objects.

controlText

public static final SystemColor controlText
The text color for control objects.

controlHighlight

public static final SystemColor controlHighlight
The regular highlight color for control objects.

controlLtHighlight

public static final SystemColor controlLtHighlight
The light highlight color for control objects.

controlShadow

public static final SystemColor controlShadow
The regular shadow color for control objects.

controlDkShadow

public static final SystemColor controlDkShadow
The dark shadow color for control objects.

scrollbar

public static final SystemColor scrollbar
The background color for scrollbars.

info

public static final SystemColor info
The background color for info(help) text.

infoText

public static final SystemColor infoText
The text color for info(help) text.
Method Detail

getRGB

public int getRGB()
Gets the "current" RGB value representing the symbolic color. (Bits 24-31 are 0xff, 16-23 are red, 8-15 are green, 0-7 are blue).
Overrides:
getRGB in class Color
See Also:
ColorModel.getRGBdefault(),
Color.getBlue(),
Color.getGreen(),
Color.getRed()

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle r,
                                  Rectangle2D r2d,
                                  AffineTransform xform,
                                  RenderingHints hints)
Create and return a PaintContext used to generate a solid color pattern. This enables a Color object to be used as an argument to any method requiring an object implementing the Paint interface.
Overrides:
createContext in class Color
See Also:
Paint, PaintContext, Graphics2D.setPaint(java.awt.Paint)

toString

public String toString()
Returns the String representation of this Color's values.
Overrides:
toString in class Color
Following copied from class: java.awt.Color
Returns:
a string representation of this Color.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextArea

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextArea
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class TextArea
extends TextComponent

A TextArea object is a multi-line region that displays text. It can be set to allow editing or to be read-only.

The following image shows the appearance of a text area:

This text area could be created by the following line of code:

 new TextArea("Hello", 5, 40);

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class TextArea.AccessibleAWTTextArea
This class implements accessibility support for the TextArea class.
Inner classes inherited from class java.awt.TextComponent
TextComponent.AccessibleAWTTextComponent
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | SCROLLBARS_BOTH Create and display both vertical and horizontal scrollbars.
static int | SCROLLBARS_HORIZONTAL_ONLY Create and display horizontal scrollbar only.
static int | SCROLLBARS_NONE Do not create or display any scrollbars for the text area.
static int | SCROLLBARS_VERTICAL_ONLY Create and display vertical scrollbar only.
Fields inherited from class java.awt.TextComponent
textListener
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
TextArea()
Constructs a new text area.
TextArea(int rows, int columns)
Constructs a new empty text area with the specified number of rows and columns.
TextArea(String text)
Constructs a new text area with the specified text.
TextArea(String text, int rows, int columns)
Constructs a new text area with the specified text, and with the specified number of rows and columns.
TextArea(String text, int rows, int columns, int scrollbars)
Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified.
Method Summary
 void addNotify()
Creates the TextArea's peer.
 void append(String str)
Appends the given text to the text area's current text.
 void appendText(String str)
Deprecated. As of JDK version 1.1, replaced by append(String).
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this TextArea.
 int getColumns()
Gets the number of columns in this text area.
 Dimension getMinimumSize()
Determines the minimum size of this text area.
 Dimension getMinimumSize(int rows, int columns)
Determines the minimum size of a text area with the specified number of rows and columns.
 Dimension getPreferredSize()
Determines the preferred size of this text area.
 Dimension getPreferredSize(int rows, int columns)
Determines the preferred size of a text area with the specified number of rows and columns.
 int getRows()
Gets the number of rows in the text area.
 int getScrollbarVisibility()
Gets an enumerated value that indicates which scroll bars the text area uses.
 void insert(String str, int pos)
Inserts the specified text at the specified position in this text area.
 void insertText(String str, int pos)
Deprecated. As of JDK version 1.1, replaced by insert(String, int).
 Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension minimumSize(int rows, int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).
protected  String paramString()
Returns the parameter string representing the state of this text area.
 Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension preferredSize(int rows, int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).
 void replaceRange(String str, int start, int end)
Replaces text between the indicated start and end positions with the specified replacement text.
 void replaceText(String str, int start, int end)
Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).
 void setColumns(int columns)
Sets the number of columns for this text area.
 void setRows(int rows)
Sets the number of rows for this text area.
Methods inherited from class java.awt.TextComponent
addTextListener, enableInputMethods, getBackground, getCaretPosition, getListeners, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, processEvent, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SCROLLBARS_BOTH

public static final int SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.
Since:
JDK1.1

SCROLLBARS_VERTICAL_ONLY

public static final int SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.
Since:
JDK1.1

SCROLLBARS_HORIZONTAL_ONLY

public static final int SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.
Since:
JDK1.1

SCROLLBARS_NONE

public static final int SCROLLBARS_NONE
Do not create or display any scrollbars for the text area.
Since:
JDK1.1
Constructor Detail

TextArea

public TextArea()
Constructs a new text area. This text area is created with scrollbar visibility equal to SCROLLBARS_BOTH, so both vertical and horizontal scrollbars will be visible for this text area.

TextArea

public TextArea(String text)
Constructs a new text area with the specified text. This text area is created with scrollbar visibility equal to SCROLLBARS_BOTH, so both vertical and horizontal scrollbars will be visible for this text area.
Parameters:
text - the text to be displayed.

TextArea

public TextArea(int rows,
                int columns)
Constructs a new empty text area with the specified number of rows and columns. A column is an approximate average character width that is platform-dependent. The text area is created with scrollbar visibility equal to SCROLLBARS_BOTH, so both vertical and horizontal scrollbars will be visible for this text area.
Parameters:
rows - the number of rows
columns - the number of columns

TextArea

public TextArea(String text,
                int rows,
                int columns)
Constructs a new text area with the specified text, and with the specified number of rows and columns. A column is an approximate average character width that is platform-dependent. The text area is created with scrollbar visibility equal to SCROLLBARS_BOTH, so both vertical and horizontal scrollbars will be visible for this text area.
Parameters:
text - the text to be displayed.
rows - the number of rows.
columns - the number of columns.

TextArea

public TextArea(String text,
                int rows,
                int columns,
                int scrollbars)
Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified.

The TextArea class defines several constants that can be supplied as values for the scrollbars argument: SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, and SCROLLBARS_NONE. Any other value for the scrollbars argument is invalid and will result in this text area being created with scrollbar visibility equal to the default value of SCROLLBARS_BOTH.

Parameters:
text - the text to be displayed. If text is null, the empty string "" will be displayed.
rows - the number of rows. If rows is less than 0, rows is set to 0.
columns - the number of columns. If columns is less than 0, columns is set to 0.
scrollbars - a constant that determines what scrollbars are created to view the text area.
Since:
JDK1.1
Method Detail

addNotify

public void addNotify()
Creates the TextArea's peer. The peer allows us to modify the appearance of the TextArea without changing any of its functionality.
Overrides:
addNotify in class TextComponent
Following copied from class: java.awt.TextComponent
See Also:
TextComponent.removeNotify()

insert

public void insert(String str,
                   int pos)
Inserts the specified text at the specified position in this text area.
Parameters:
str - the text to insert.
pos - the position at which to insert.
Since:
JDK1.1
See Also:
TextComponent.setText(java.lang.String),
replaceRange(java.lang.String, int, int),
append(java.lang.String)

insertText

public void insertText(String str,
                       int pos)
Deprecated. As of JDK version 1.1, replaced by insert(String, int).

append

public void append(String str)
Appends the given text to the text area's current text.
Parameters:
str - the text to append.
See Also:
insert(java.lang.String, int)

appendText

public void appendText(String str)
Deprecated. As of JDK version 1.1, replaced by append(String).

replaceRange

public void replaceRange(String str,
                         int start,
                         int end)
Replaces text between the indicated start and end positions with the specified replacement text.
Parameters:
str - the text to use as the replacement.
start - the start position.
end - the end position.
Since:
JDK1.1
See Also:
insert(java.lang.String, int)

replaceText

public void replaceText(String str,
                        int start,
                        int end)
Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).

getRows

public int getRows()
Gets the number of rows in the text area.
Returns:
the number of rows in the text area.
Since:
JDK1
See Also:
setRows(int), getColumns()

setRows

public void setRows(int rows)
Sets the number of rows for this text area.
Parameters:
rows - the number of rows.
Throws:
IllegalArgumentException - if the value supplied for rows is less than 0.
Since:
JDK1.1
See Also:
getRows(), setColumns(int)

getColumns

public int getColumns()
Gets the number of columns in this text area.
Returns:
the number of columns in the text area.
See Also:
setColumns(int), getRows()

setColumns

public void setColumns(int columns)
Sets the number of columns for this text area.
Parameters:
columns - the number of columns.
Throws:
IllegalArgumentException - if the value supplied for columns is less than 0.
Since:
JDK1.1
See Also:
getColumns(), setRows(int)

getScrollbarVisibility

public int getScrollbarVisibility()
Gets an enumerated value that indicates which scroll bars the text area uses.

The TextArea class defines four integer constants that are used to specify which scroll bars are available. TextArea has one constructor that gives the application discretion over scroll bars.

Returns:
an integer that indicates which scroll bars are used.
Since:
JDK1.1
See Also:
SCROLLBARS_BOTH, SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, TextArea(java.lang.String, int, int, int)

getPreferredSize

public Dimension getPreferredSize(int rows,
                                  int columns)
Determines the preferred size of a text area with the specified number of rows and columns.
Parameters:
rows - the number of rows.
cols - the number of columns.
Returns:
the preferred dimensions required to display the text area with the specified number of rows and columns.
Since:
JDK1.1
See Also:
Component.getPreferredSize()

preferredSize

public Dimension preferredSize(int rows,
                               int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).

getPreferredSize

public Dimension getPreferredSize()
Determines the preferred size of this text area.
Overrides:
getPreferredSize in class Component
Returns:
the preferred dimensions needed for this text area.
Since:
JDK1.1
See Also:
Component.getPreferredSize()

preferredSize

public Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize in class Component

getMinimumSize

public Dimension getMinimumSize(int rows,
                                int columns)
Determines the minimum size of a text area with the specified number of rows and columns.
Parameters:
rows - the number of rows.
cols - the number of columns.
Returns:
the minimum dimensions required to display the text area with the specified number of rows and columns.
Since:
JDK1.1
See Also:
Component.getMinimumSize()

minimumSize

public Dimension minimumSize(int rows,
                             int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).

getMinimumSize

public Dimension getMinimumSize()
Determines the minimum size of this text area.
Overrides:
getMinimumSize in class Component
Returns:
the preferred dimensions needed for this text area.
Since:
JDK1.1
See Also:
Component.getPreferredSize()

minimumSize

public Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize in class Component

paramString

protected String paramString()
Returns the parameter string representing the state of this text area. This string is useful for debugging.
Overrides:
paramString in class TextComponent
Returns:
the parameter string of this text area.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this TextArea. For text areas, the AccessibleContext takes the form of an AccessibleAWTTextArea. A new AccessibleAWTTextArea instance is created if necessary.
Overrides:
getAccessibleContext in class TextComponent
Returns:
an AccessibleAWTTextArea that serves as the AccessibleContext of this TextArea
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextComponent

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
TextArea, TextField
public class TextComponent
extends Component
implements Accessible

The TextComponent class is the superclass of any component that allows the editing of some text.

A text component embodies a string of text. The TextComponent class defines a set of methods that determine whether or not this text is editable. If the component is editable, it defines another set of methods that supports a text insertion caret.

In addition, the class defines methods that are used to maintain a current selection from the text. The text selection, a substring of the component's text, is the target of editing operations. It is also referred to as the selected text.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
protected  class TextComponent.AccessibleAWTTextComponent
This class implements accessibility support for the TextComponent class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  TextListener textListener
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Method Summary
void | addNotify() Makes this Component displayable by connecting it to a native screen resource.
void | addTextListener(TextListener l) Adds the specified text event listener to receive text events from this text component.
void | enableInputMethods(boolean enable) Enables or disables input method support for this component.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this TextComponent.
Color | getBackground() Gets the background color of this text component.
int | getCaretPosition() Gets the position of the text insertion caret for this text component.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the TextComponent with addXXXListener(), where XXX is the name of the listenerType argument.
String | getSelectedText() Gets the selected text from the text that is presented by this text component.
int | getSelectionEnd() Gets the end position of the selected text in this text component.
int | getSelectionStart() Gets the start position of the selected text in this text component.
String | getText() Gets the text that is presented by this text component.
boolean | isEditable() Indicates whether or not this text component is editable.
protected String | paramString() Returns the parameter string representing the state of this text component.
protected void | processEvent(AWTEvent e) Processes events on this text component.
protected void | processTextEvent(TextEvent e) Processes text events occurring on this text component by dispatching them to any registered TextListener objects.
void | removeNotify() Removes the TextComponent's peer.
void | removeTextListener(TextListener l) Removes the specified text event listener so that it no longer receives text events from this text component If l is null, no exception is thrown and no action is performed.
void | select(int selectionStart, int selectionEnd) Selects the text between the specified start and end positions.
void | selectAll() Selects all the text in this text component.
void | setBackground(Color c) Sets the background color of this text component.
void | setCaretPosition(int position) Sets the position of the text insertion caret for this text component.
void | setEditable(boolean b) Sets the flag that determines whether or not this text component is editable.
void | setSelectionEnd(int selectionEnd) Sets the selection end for this text component to the specified position.
void | setSelectionStart(int selectionStart) Sets the selection start for this text component to the specified position.
void | setText(String t) Sets the text that is presented by this text component to be the specified text.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

textListener

protected transient TextListener textListener
Method Detail

enableInputMethods

public void enableInputMethods(boolean enable)
Description copied from class: Component
Enables or disables input method support for this component. If input method support is enabled and the component also processes key events, incoming events are offered to the current input method and will only be processed by the component or dispatched to its listeners if the input method does not consume them. By default, input method support is enabled.
Overrides:
enableInputMethods in class Component
Following copied from class: java.awt.Component
Parameters:
enable - true to enable, false to disable.
See Also:
Component.processKeyEvent(java.awt.event.KeyEvent)

addNotify

public void addNotify()
Makes this Component displayable by connecting it to a native screen resource. This method is called internally by the toolkit and should not be called directly by programs.
Overrides:
addNotify in class Component
See Also:
removeNotify()

removeNotify

public void removeNotify()
Removes the TextComponent's peer. The peer allows us to modify the appearance of the TextComponent without changing its functionality.
Overrides:
removeNotify in class Component
Following copied from class: java.awt.Component
See Also:
Component.isDisplayable(), Component.addNotify()

setText

public void setText(String t)
Sets the text that is presented by this text component to be the specified text.
Parameters:
t - the new text. If this parameter is null then the text is set to the empty string "".
See Also:
getText()

getText

public String getText()
Gets the text that is presented by this text component.
See Also:
setText(java.lang.String)

getSelectedText

public String getSelectedText()
Gets the selected text from the text that is presented by this text component.
Returns:
the selected text of this text component.
See Also:
select(int, int)

isEditable

public boolean isEditable()
Indicates whether or not this text component is editable.
Returns:
true if this text component is editable; false otherwise.
Since:
JDK1.0
See Also:
setEditable(boolean)

setEditable

public void setEditable(boolean b)
Sets the flag that determines whether or not this text component is editable.

If the flag is set to true, this text component becomes user editable. If the flag is set to false, the user cannot change the text of this text component. By default, non-editable text components have a background color of SystemColor.control. This default can be overridden by calling setBackground.

Parameters:
b - a flag indicating whether this text component is user editable.
Since:
JDK1.0
See Also:
isEditable()

getBackground

public Color getBackground()
Gets the background color of this text component. By default, non-editable text components have a background color of SystemColor.control. This default can be overridden by calling setBackground.
Overrides:
getBackground in class Component
Returns:
This text component's background color. If this text component does not have a background color, the background color of its parent is returned.
Since:
JDK1.0
See Also:
setBackground

setBackground

public void setBackground(Color c)
Sets the background color of this text component.
Overrides:
setBackground in class Component
Parameters:
c - The color to become this text component's color. If this parameter is null then this text component will inherit the background color of its parent.
Since:
JDK1.0
See Also:
getBackground()

getSelectionStart

public int getSelectionStart()
Gets the start position of the selected text in this text component.
Returns:
the start position of the selected text.
See Also:
setSelectionStart(int), getSelectionEnd()

setSelectionStart

public void setSelectionStart(int selectionStart)
Sets the selection start for this text component to the specified position. The new start point is constrained to be at or before the current selection end. It also cannot be set to less than zero, the beginning of the component's text. If the caller supplies a value for selectionStart that is out of bounds, the method enforces these constraints silently, and without failure.
Parameters:
selectionStart - the start position of the selected text.
Since:
JDK1.1
See Also:
getSelectionStart(), setSelectionEnd(int)

getSelectionEnd

public int getSelectionEnd()
Gets the end position of the selected text in this text component.
Returns:
the end position of the selected text.
See Also:
setSelectionEnd(int), getSelectionStart()

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Sets the selection end for this text component to the specified position. The new end point is constrained to be at or after the current selection start. It also cannot be set beyond the end of the component's text. If the caller supplies a value for selectionEnd that is out of bounds, the method enforces these constraints silently, and without failure.
Parameters:
selectionEnd - the end position of the selected text.
Since:
JDK1.1
See Also:
getSelectionEnd(), setSelectionStart(int)

select

public void select(int selectionStart,
                   int selectionEnd)
Selects the text between the specified start and end positions.

This method sets the start and end positions of the selected text, enforcing the restriction that the start position must be greater than or equal to zero. The end position must be greater than or equal to the start position, and less than or equal to the length of the text component's text. The character positions are indexed starting with zero. The length of the selection is endPosition-startPosition, so the character at endPosition is not selected. If the start and end positions of the selected text are equal, all text is deselected.

If the caller supplies values that are inconsistent or out of bounds, the method enforces these constraints silently, and without failure. Specifically, if the start position or end position is greater than the length of the text, it is reset to equal the text length. If the start position is less than zero, it is reset to zero, and if the end position is less than the start position, it is reset to the start position.

Parameters:
selectionStart - the zero-based index of the first character to be selected.
selectionEnd - the zero-based end position of the text to be selected. The character at selectionEnd is not selected.
See Also:
setSelectionStart(int), setSelectionEnd(int), selectAll()

selectAll

public void selectAll()
Selects all the text in this text component.
See Also:
select(int, int)

setCaretPosition

public void setCaretPosition(int position)
Sets the position of the text insertion caret for this text component. The caret position is constrained to be at or before the current selection end. If the caller supplies a value for position that is greater than the end of the component's text, the caret position is set to the end of the component's text. This happens silently and without failure. The caret position also cannot be set to less than zero, the beginning of the component's text. If the caller supplies a value for position that is less than zero, an IllegalArgumentException is thrown.
Parameters:
position - the position of the text insertion caret.
Throws:
IllegalArgumentException - if the value supplied for position is less than zero.
Since:
JDK1.1

getCaretPosition

public int getCaretPosition()
Gets the position of the text insertion caret for this text component.
Returns:
the position of the text insertion caret.
Since:
JDK1.1

addTextListener

public void addTextListener(TextListener l)
Adds the specified text event listener to receive text events from this text component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the text event listener

removeTextListener

public void removeTextListener(TextListener l)
Removes the specified text event listener so that it no longer receives text events from this text component If l is null, no exception is thrown and no action is performed.
Parameters:
l - the text listener.
Since:
JDK1.1
See Also:
TextListener, addTextListener(java.awt.event.TextListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextComponent with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the TextListeners for the given TextComponent t, one would write:
 TextListener[] tls = (TextListener[])(t.getListeners(TextListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Component
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this text component
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this text component. If the event is a TextEvent, it invokes the processTextEvent method, else it invokes its superclass's processEvent.
Overrides:
processEvent in class Component
Parameters:
e - the event

processTextEvent

protected void processTextEvent(TextEvent e)
Processes text events occurring on this text component by dispatching them to any registered TextListener objects. NOTE: This method will not be called unless text events are enabled for this component. This happens when one of the following occurs: a) A TextListener object is registered via addTextListener() b) Text events are enabled via enableEvents()
Parameters:
e - the text event
See Also:
Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this text component. This string is useful for debugging.
Overrides:
paramString in class Component
Returns:
the parameter string of this text component.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this TextComponent. For text components, the AccessibleContext takes the form of an AccessibleAWTTextComponent. A new AccessibleAWTTextComponent instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTTextComponent that serves as the AccessibleContext of this TextComponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TextField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextField
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class TextField
extends TextComponent

A TextField object is a text component that allows for the editing of a single line of text.

For example, the following image depicts a frame with four text fields of varying widths. Two of these text fields display the predefined text "Hello".

Here is the code that produces these four text fields:

 TextField tf1, tf2, tf3, tf4;
 // a blank text field
 tf1 = new TextField();
 // blank field of 20 columns
 tf2 = new TextField("", 20);
 // predefined text displayed
 tf3 = new TextField("Hello!");
 // predefined text in 30 columns
 tf4 = new TextField("Hello", 30);

Every time the user types a key in the text field, one or more key events are sent to the text field. A KeyEvent may be one of three types: keyPressed, keyReleased, or keyTyped. The properties of a key event indicate which of these types it is, as well as additional information about the event, such as what modifiers are applied to the key event and the time at which the event occurred.

The key event is passed to every KeyListener or KeyAdapter object which registered to receive such events using the component's addKeyListener method. (KeyAdapter objects implement the KeyListener interface.)

It is also possible to fire an ActionEvent. If action events are enabled for the text field, they may be fired by pressing the Return key.

The TextField class's processEvent method examines the action event and passes it along to processActionEvent. The latter method redirects the event to any ActionListener objects that have registered to receive action events generated by this text field.

Since:
JDK1.0
See Also:
KeyEvent, KeyAdapter, KeyListener, ActionEvent, Component.addKeyListener(java.awt.event.KeyListener), processEvent(java.awt.AWTEvent), processActionEvent(java.awt.event.ActionEvent), addActionListener(java.awt.event.ActionListener), Serialized Form

Inner Class Summary
protected  class TextField.AccessibleAWTTextField
This class implements accessibility support for the TextField class.
Inner classes inherited from class java.awt.TextComponent
TextComponent.AccessibleAWTTextComponent
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.TextComponent
textListener
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
TextField()
Constructs a new text field.
TextField(int columns)
Constructs a new empty text field with the specified number of columns.
TextField(String text)
Constructs a new text field initialized with the specified text.
TextField(String text, int columns)
Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns.
Method Summary
 void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this text field.
 void addNotify()
Creates the TextField's peer.
 boolean echoCharIsSet()
Indicates whether or not this text field has a character set for echoing.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this TextField.
 int getColumns()
Gets the number of columns in this text field.
 char getEchoChar()
Gets the character that is to be used for echoing.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the listenerType argument.
 Dimension getMinimumSize()
Gets the minumum dimensions for this text field.
 Dimension getMinimumSize(int columns)
Gets the minumum dimensions for a text field with the specified number of columns.
 Dimension getPreferredSize()
Gets the preferred size of this text field.
 Dimension getPreferredSize(int columns)
Gets the preferred size of this text field with the specified number of columns.
 Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension minimumSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).
protected  String paramString()
Returns the parameter string representing the state of this text field.
 Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension preferredSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).
protected  void processActionEvent(ActionEvent e)
Processes action events occurring on this text field by dispatching them to any registered ActionListener objects.
protected  void processEvent(AWTEvent e)
Processes events on this text field.
 void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this text field.
 void setColumns(int columns)
Sets the number of columns in this text field.
 void setEchoChar(char c)
Sets the echo character for this text field.
 void setEchoCharacter(char c)
Deprecated. As of JDK version 1.1, replaced by setEchoChar(char).
 void setText(String t)
Sets the text that is presented by this text component to be the specified text.
Methods inherited from class java.awt.TextComponent
addTextListener, enableInputMethods, getBackground, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TextField

public TextField()
Constructs a new text field.

TextField

public TextField(String text)
Constructs a new text field initialized with the specified text.
Parameters:
text - the text to be displayed. If text is null, the empty string "" will be displayed.

TextField

public TextField(int columns)
Constructs a new empty text field with the specified number of columns. A column is an approximate average character width that is platform-dependent.
Parameters:
columns - the number of columns. If columns is less than 0, columns is set to 0.

TextField

public TextField(String text,
                 int columns)
Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns. A column is an approximate average character width that is platform-dependent.
Parameters:
text - the text to be displayed. If text is null, the empty string "" will be displayed.
columns - the number of columns. If columns is less than 0, columns is set to 0.
Method Detail

addNotify

public void addNotify()
Creates the TextField's peer. The peer allows us to modify the appearance of the TextField without changing its functionality.
Overrides:
addNotify in class TextComponent
Following copied from class: java.awt.TextComponent
See Also:
TextComponent.removeNotify()

getEchoChar

public char getEchoChar()
Gets the character that is to be used for echoing.

An echo character is useful for text fields where user input should not be echoed to the screen, as in the case of a text field for entering a password. If echoChar = 0, user input is echoed to the screen unchanged.

Returns:
the echo character for this text field.
See Also:
echoCharIsSet(), setEchoChar(char)

setEchoChar

public void setEchoChar(char c)
Sets the echo character for this text field.

An echo character is useful for text fields where user input should not be echoed to the screen, as in the case of a text field for entering a password. Setting echoChar = 0 allows user input to be echoed to the screen again.

Parameters:
c - the echo character for this text field.
Since:
JDK1.1
See Also:
echoCharIsSet(), getEchoChar()

setEchoCharacter

public void setEchoCharacter(char c)
Deprecated. As of JDK version 1.1, replaced by setEchoChar(char).

setText

public void setText(String t)
Sets the text that is presented by this text component to be the specified text.
Overrides:
setText in class TextComponent
Parameters:
t - the new text.
See Also:
TextComponent.getText()

echoCharIsSet

public boolean echoCharIsSet()
Indicates whether or not this text field has a character set for echoing.

An echo character is useful for text fields where user input should not be echoed to the screen, as in the case of a text field for entering a password.

Returns:
true if this text field has a character set for echoing; false otherwise.
See Also:
setEchoChar(char), getEchoChar()

getColumns

public int getColumns()
Gets the number of columns in this text field. A column is an approximate average character width that is platform-dependent.
Returns:
the number of columns.
Since:
JDK1.1
See Also:
setColumns(int)

setColumns

public void setColumns(int columns)
Sets the number of columns in this text field. A column is an approximate average character width that is platform-dependent.
Parameters:
columns - the number of columns.
Throws:
IllegalArgumentException - if the value supplied for columns is less than 0.
Since:
JDK1.1
See Also:
getColumns()

getPreferredSize

public Dimension getPreferredSize(int columns)
Gets the preferred size of this text field with the specified number of columns.
Parameters:
columns - the number of columns in this text field.
Returns:
the preferred dimensions for displaying this text field.
Since:
JDK1.1

preferredSize

public Dimension preferredSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this text field.
Overrides:
getPreferredSize in class Component
Returns:
the preferred dimensions for displaying this text field.
Since:
JDK1.1

preferredSize

public Dimension preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize in class Component

getMinimumSize

public Dimension getMinimumSize(int columns)
Gets the minumum dimensions for a text field with the specified number of columns.
Parameters:
columns - the number of columns in this text field.
Since:
JDK1.1

minimumSize

public Dimension minimumSize(int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).

getMinimumSize

public Dimension getMinimumSize()
Gets the minumum dimensions for this text field.
Overrides:
getMinimumSize in class Component
Returns:
the minimum dimensions for displaying this text field.
Since:
JDK1.1

minimumSize

public Dimension minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize in class Component

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this text field. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
java.awt.event, removeActionListener(java.awt.event.ActionListener)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this text field. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the action listener.
Since:
JDK1.1
See Also:
java.awt.event, addActionListener(java.awt.event.ActionListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the ActionListener(s) for the given TextField t, one would write:
 ActionListener[] als = (ActionListener[])(t.getListeners(ActionListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class TextComponent
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this text field
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this text field. If the event is an instance of ActionEvent, it invokes the processActionEvent method. Otherwise, it invokes processEvent on the superclass.
Overrides:
processEvent in class TextComponent
Parameters:
e - the event.
Since:
JDK1.1
See Also:
ActionEvent, processActionEvent(java.awt.event.ActionEvent)

processActionEvent

protected void processActionEvent(ActionEvent e)
Processes action events occurring on this text field by dispatching them to any registered ActionListener objects.

This method is not called unless action events are enabled for this component. Action events are enabled when one of the following occurs:

  • An ActionListener object is registered via addActionListener.
  • Action events are enabled via enableEvents.
Parameters:
e - the action event.
Since:
JDK1.1
See Also:
ActionListener, addActionListener(java.awt.event.ActionListener), Component.enableEvents(long)

paramString

protected String paramString()
Returns the parameter string representing the state of this text field. This string is useful for debugging.
Overrides:
paramString in class TextComponent
Returns:
the parameter string of this text field.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this TextField. For text fields, the AccessibleContext takes the form of an AccessibleAWTTextField. A new AccessibleAWTTextField instance is created if necessary.
Overrides:
getAccessibleContext in class TextComponent
Returns:
an AccessibleAWTTextField that serves as the AccessibleContext of this TextField
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TexturePaint

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class TexturePaint

java.lang.Object
  |
  +--java.awt.TexturePaint
All Implemented Interfaces:
Paint, Transparency
public class TexturePaint
extends Object
implements Paint

The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage. The size of the BufferedImage object should be small because the BufferedImage data is copied by the TexturePaint object. At construction time, the texture is anchored to the upper left corner of a Rectangle2D that is specified in user space. Texture is computed for locations in the device space by conceptually replicating the specified Rectangle2D infinitely in all directions in user space and mapping the BufferedImage to each replicated Rectangle2D.

See Also:
Paint, Graphics2D.setPaint(java.awt.Paint)

Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
TexturePaint(BufferedImage txtr, Rectangle2D anchor)
Constructs a TexturePaint object.
Method Summary
PaintContext | createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the color pattern.
Rectangle2D | getAnchorRect() Returns a copy of the anchor rectangle which positions and sizes the textured image.
BufferedImage | getImage() Returns the BufferedImage texture used to fill the shapes.
int | getTransparency() Returns the transparency mode for this TexturePaint.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TexturePaint

public TexturePaint(BufferedImage txtr,
                    Rectangle2D anchor)
Constructs a TexturePaint object.
Parameters:
txtr - the BufferedImage object with the texture used for painting
anchor - the Rectangle2D in user space used to anchor and replicate the texture
Method Detail

getImage

public BufferedImage getImage()
Returns the BufferedImage texture used to fill the shapes.
Returns:
a BufferedImage.

getAnchorRect

public Rectangle2D getAnchorRect()
Returns a copy of the anchor rectangle which positions and sizes the textured image.
Returns:
the Rectangle2D used to anchor and size this TexturePaint.

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform xform,
                                  RenderingHints hints)
Creates and returns a context used to generate the color pattern.
Specified by:
createContext in interface Paint
Parameters:
cm - the ColorModel that receives the Paint data. This is used only as a hint.
deviceBounds - the device space bounding box of the graphics primitive being rendered
userBounds - the user space bounding box of the graphics primitive being rendered
xform - the AffineTransform from user space into device space
hints - a RenderingHints object that can be used to specify how the pattern is ultimately rendered
Returns:
the PaintContext used for generating color patterns.
See Also:
PaintContext

getTransparency

public int getTransparency()
Returns the transparency mode for this TexturePaint.
Specified by:
getTransparency in interface Transparency
Returns:
the transparency mode for this TexturePaint as an integer value.
See Also:
Transparency
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Toolkit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Toolkit

java.lang.Object
  |
  +--java.awt.Toolkit
public abstract class Toolkit
extends Object

This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit. Subclasses of Toolkit are used to bind the various components to particular native toolkit implementations.

Most applications should not call any of the methods in this class directly. The methods defined by Toolkit are the "glue" that joins the platform-independent classes in the java.awt package with their counterparts in java.awt.peer. Some methods defined by Toolkit query the native operating system directly.

Since:
JDK1.0

Field Summary
protected Map | desktopProperties
protected PropertyChangeSupport | desktopPropsSupport
Constructor Summary
Toolkit()
Method Summary
 void addAWTEventListener(AWTEventListener listener, long eventMask)
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.
 void addPropertyChangeListener(String name, PropertyChangeListener pcl)
add the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
abstract  void beep()
Emits an audio beep.
abstract  int checkImage(Image image, int width, int height, ImageObserver observer)
Indicates the construction status of a specified image that is being prepared for display.
protected abstract  java.awt.peer.ButtonPeer createButton(Button target)
Creates this toolkit's implementation of Button using the specified peer interface.
protected abstract  java.awt.peer.CanvasPeer createCanvas(Canvas target)
Creates this toolkit's implementation of Canvas using the specified peer interface.
protected abstract  java.awt.peer.CheckboxPeer createCheckbox(Checkbox target)
Creates this toolkit's implementation of Checkbox using the specified peer interface.
protected abstract  java.awt.peer.CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.
protected abstract  java.awt.peer.ChoicePeer createChoice(Choice target)
Creates this toolkit's implementation of Choice using the specified peer interface.
protected  java.awt.peer.LightweightPeer createComponent(Component target)
Creates a peer for a component or container.
 Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
Creates a new custom cursor object.
protected abstract  java.awt.peer.DialogPeer createDialog(Dialog target)
Creates this toolkit's implementation of Dialog using the specified peer interface.
 DragGestureRecognizer createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation
abstract  java.awt.dnd.peer.DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)
create the peer for a DragSourceContext
protected abstract  java.awt.peer.FileDialogPeer createFileDialog(FileDialog target)
Creates this toolkit's implementation of FileDialog using the specified peer interface.
protected abstract  java.awt.peer.FramePeer createFrame(Frame target)
Creates this toolkit's implementation of Frame using the specified peer interface.
 Image createImage(byte[] imagedata)
Creates an image which decodes the image stored in the specified byte array.
abstract  Image createImage(byte[] imagedata, int imageoffset, int imagelength)
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
abstract  Image createImage(ImageProducer producer)
Creates an image with the specified image producer.
abstract  Image createImage(String filename)
Returns an image which gets pixel data from the specified file.
abstract  Image createImage(URL url)
Returns an image which gets pixel data from the specified URL.
protected abstract  java.awt.peer.LabelPeer createLabel(Label target)
Creates this toolkit's implementation of Label using the specified peer interface.
protected abstract  java.awt.peer.ListPeer createList(List target)
Creates this toolkit's implementation of List using the specified peer interface.
protected abstract  java.awt.peer.MenuPeer createMenu(Menu target)
Creates this toolkit's implementation of Menu using the specified peer interface.
protected abstract  java.awt.peer.MenuBarPeer createMenuBar(MenuBar target)
Creates this toolkit's implementation of MenuBar using the specified peer interface.
protected abstract  java.awt.peer.MenuItemPeer createMenuItem(MenuItem target)
Creates this toolkit's implementation of MenuItem using the specified peer interface.
protected abstract  java.awt.peer.PanelPeer createPanel(Panel target)
Creates this toolkit's implementation of Panel using the specified peer interface.
protected abstract  java.awt.peer.PopupMenuPeer createPopupMenu(PopupMenu target)
Creates this toolkit's implementation of PopupMenu using the specified peer interface.
protected abstract  java.awt.peer.ScrollbarPeer createScrollbar(Scrollbar target)
Creates this toolkit's implementation of Scrollbar using the specified peer interface.
protected abstract  java.awt.peer.ScrollPanePeer createScrollPane(ScrollPane target)
Creates this toolkit's implementation of ScrollPane using the specified peer interface.
protected abstract  java.awt.peer.TextAreaPeer createTextArea(TextArea target)
Creates this toolkit's implementation of TextArea using the specified peer interface.
protected abstract  java.awt.peer.TextFieldPeer createTextField(TextField target)
Creates this toolkit's implementation of TextField using the specified peer interface.
protected abstract  java.awt.peer.WindowPeer createWindow(Window target)
Creates this toolkit's implementation of Window using the specified peer interface.
 Dimension getBestCursorSize(int preferredWidth, int preferredHeight)
Returns the supported cursor dimension which is closest to the desired sizes.
abstract  ColorModel getColorModel()
Determines the color model of this toolkit's screen.
static Toolkit getDefaultToolkit()
Gets the default toolkit.
 Object getDesktopProperty(String propertyName)
obtain a value for the specified desktop property.
abstract  String[] getFontList()
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames()
abstract  FontMetrics getFontMetrics(Font font)
Deprecated. This returns integer metrics for the default screen.
protected abstract  java.awt.peer.FontPeer getFontPeer(String name, int style)
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts
abstract  Image getImage(String filename)
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
abstract  Image getImage(URL url)
Returns an image which gets pixel data from the specified URL.
 boolean getLockingKeyState(int keyCode)
Returns whether the given locking key on the keyboard is currently in its "on" state.
 int getMaximumCursorColors()
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
 int getMenuShortcutKeyMask()
Determines which modifier key is the appropriate accelerator key for menu shortcuts.
protected static Container getNativeContainer(Component c)
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
 PrintJob getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
abstract  PrintJob getPrintJob(Frame frame, String jobtitle, Properties props)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
static String getProperty(String key, String defaultValue)
Gets a property with the specified key and default.
abstract  int getScreenResolution()
Returns the screen resolution in dots-per-inch.
abstract  Dimension getScreenSize()
Gets the size of the screen.
abstract  Clipboard getSystemClipboard()
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.
 EventQueue getSystemEventQueue()
Get the application's or applet's EventQueue instance.
protected abstract  EventQueue getSystemEventQueueImpl()
protected  void initializeDesktopProperties()
initializeDesktopProperties
protected  Object lazilyLoadDesktopProperty(String name)
an opportunity to lazily evaluate desktop property values.
protected  void loadSystemColors(int[] systemColors)
Fills in the integer array that is supplied as an argument with the current system color values.
abstract  Map mapInputMethodHighlight(InputMethodHighlight highlight)
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.
abstract  boolean prepareImage(Image image, int width, int height, ImageObserver observer)
Prepares an image for rendering.
 void removeAWTEventListener(AWTEventListener listener)
Removes an AWTEventListener from receiving dispatched AWTEvents.
 void removePropertyChangeListener(String name, PropertyChangeListener pcl)
remove the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
protected  void setDesktopProperty(String name, Object newValue)
set the named desktop property to the specified value and fire a property change event to notify any listeners that the value has changed
 void setLockingKeyState(int keyCode, boolean on)
Sets the state of the given locking key on the keyboard.
abstract  void sync()
Synchronizes this toolkit's graphics state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

desktopProperties

protected final Map desktopProperties

desktopPropsSupport

protected final PropertyChangeSupport desktopPropsSupport
Constructor Detail

Toolkit

public Toolkit()
Method Detail

createButton

protected abstract java.awt.peer.ButtonPeer createButton(Button target)
Creates this toolkit's implementation of Button using the specified peer interface.
Parameters:
target - the button to be implemented.
Returns:
this toolkit's implementation of Button.
See Also:
Button, ButtonPeer

createTextField

protected abstract java.awt.peer.TextFieldPeer createTextField(TextField target)
Creates this toolkit's implementation of TextField using the specified peer interface.
Parameters:
target - the text field to be implemented.
Returns:
this toolkit's implementation of TextField.
See Also:
TextField, TextFieldPeer

createLabel

protected abstract java.awt.peer.LabelPeer createLabel(Label target)
Creates this toolkit's implementation of Label using the specified peer interface.
Parameters:
target - the label to be implemented.
Returns:
this toolkit's implementation of Label.
See Also:
Label, LabelPeer

createList

protected abstract java.awt.peer.ListPeer createList(List target)
Creates this toolkit's implementation of List using the specified peer interface.
Parameters:
target - the list to be implemented.
Returns:
this toolkit's implementation of List.
See Also:
List, ListPeer

createCheckbox

protected abstract java.awt.peer.CheckboxPeer createCheckbox(Checkbox target)
Creates this toolkit's implementation of Checkbox using the specified peer interface.
Parameters:
target - the check box to be implemented.
Returns:
this toolkit's implementation of Checkbox.
See Also:
Checkbox, CheckboxPeer

createScrollbar

protected abstract java.awt.peer.ScrollbarPeer createScrollbar(Scrollbar target)
Creates this toolkit's implementation of Scrollbar using the specified peer interface.
Parameters:
target - the scroll bar to be implemented.
Returns:
this toolkit's implementation of Scrollbar.
See Also:
Scrollbar, ScrollbarPeer

createScrollPane

protected abstract java.awt.peer.ScrollPanePeer createScrollPane(ScrollPane target)
Creates this toolkit's implementation of ScrollPane using the specified peer interface.
Parameters:
target - the scroll pane to be implemented.
Returns:
this toolkit's implementation of ScrollPane.
Since:
JDK1.1
See Also:
ScrollPane, ScrollPanePeer

createTextArea

protected abstract java.awt.peer.TextAreaPeer createTextArea(TextArea target)
Creates this toolkit's implementation of TextArea using the specified peer interface.
Parameters:
target - the text area to be implemented.
Returns:
this toolkit's implementation of TextArea.
See Also:
TextArea, TextAreaPeer

createChoice

protected abstract java.awt.peer.ChoicePeer createChoice(Choice target)
Creates this toolkit's implementation of Choice using the specified peer interface.
Parameters:
target - the choice to be implemented.
Returns:
this toolkit's implementation of Choice.
See Also:
Choice, ChoicePeer

createFrame

protected abstract java.awt.peer.FramePeer createFrame(Frame target)
Creates this toolkit's implementation of Frame using the specified peer interface.
Parameters:
target - the frame to be implemented.
Returns:
this toolkit's implementation of Frame.
See Also:
Frame, FramePeer

createCanvas

protected abstract java.awt.peer.CanvasPeer createCanvas(Canvas target)
Creates this toolkit's implementation of Canvas using the specified peer interface.
Parameters:
target - the canvas to be implemented.
Returns:
this toolkit's implementation of Canvas.
See Also:
Canvas, CanvasPeer

createPanel

protected abstract java.awt.peer.PanelPeer createPanel(Panel target)
Creates this toolkit's implementation of Panel using the specified peer interface.
Parameters:
target - the panel to be implemented.
Returns:
this toolkit's implementation of Panel.
See Also:
Panel, PanelPeer

createWindow

protected abstract java.awt.peer.WindowPeer createWindow(Window target)
Creates this toolkit's implementation of Window using the specified peer interface.
Parameters:
target - the window to be implemented.
Returns:
this toolkit's implementation of Window.
See Also:
Window, WindowPeer

createDialog

protected abstract java.awt.peer.DialogPeer createDialog(Dialog target)
Creates this toolkit's implementation of Dialog using the specified peer interface.
Parameters:
target - the dialog to be implemented.
Returns:
this toolkit's implementation of Dialog.
See Also:
Dialog, DialogPeer

createMenuBar

protected abstract java.awt.peer.MenuBarPeer createMenuBar(MenuBar target)
Creates this toolkit's implementation of MenuBar using the specified peer interface.
Parameters:
target - the menu bar to be implemented.
Returns:
this toolkit's implementation of MenuBar.
See Also:
MenuBar, MenuBarPeer

createMenu

protected abstract java.awt.peer.MenuPeer createMenu(Menu target)
Creates this toolkit's implementation of Menu using the specified peer interface.
Parameters:
target - the menu to be implemented.
Returns:
this toolkit's implementation of Menu.
See Also:
Menu, MenuPeer

createPopupMenu

protected abstract java.awt.peer.PopupMenuPeer createPopupMenu(PopupMenu target)
Creates this toolkit's implementation of PopupMenu using the specified peer interface.
Parameters:
target - the popup menu to be implemented.
Returns:
this toolkit's implementation of PopupMenu.
Since:
JDK1.1
See Also:
PopupMenu, PopupMenuPeer

createMenuItem

protected abstract java.awt.peer.MenuItemPeer createMenuItem(MenuItem target)
Creates this toolkit's implementation of MenuItem using the specified peer interface.
Parameters:
target - the menu item to be implemented.
Returns:
this toolkit's implementation of MenuItem.
See Also:
MenuItem, MenuItemPeer

createFileDialog

protected abstract java.awt.peer.FileDialogPeer createFileDialog(FileDialog target)
Creates this toolkit's implementation of FileDialog using the specified peer interface.
Parameters:
target - the file dialog to be implemented.
Returns:
this toolkit's implementation of FileDialog.
See Also:
FileDialog, FileDialogPeer

createCheckboxMenuItem

protected abstract java.awt.peer.CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.
Parameters:
target - the checkbox menu item to be implemented.
Returns:
this toolkit's implementation of CheckboxMenuItem.
See Also:
CheckboxMenuItem, CheckboxMenuItemPeer

createComponent

protected java.awt.peer.LightweightPeer createComponent(Component target)
Creates a peer for a component or container. This peer is windowless and allows the Component and Container classes to be extended directly to create windowless components that are defined entirely in java.
Parameters:
target - The Component to be created.

getFontPeer

protected abstract java.awt.peer.FontPeer getFontPeer(String name,
                                                      int style)
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts

Creates this toolkit's implementation of Font using the specified peer interface.
Parameters:
target - the font to be implemented.
Returns:
this toolkit's implementation of Font.
See Also:
Font, FontPeer, GraphicsEnvironment.getAllFonts()

loadSystemColors

protected void loadSystemColors(int[] systemColors)
Fills in the integer array that is supplied as an argument with the current system color values.
Parameters:
an - integer array.
Since:
JDK1.1

getScreenSize

public abstract Dimension getScreenSize()
Gets the size of the screen.
Returns:
the size of this toolkit's screen, in pixels.

getScreenResolution

public abstract int getScreenResolution()
Returns the screen resolution in dots-per-inch.
Returns:
this toolkit's screen resolution, in dots-per-inch.

getColorModel

public abstract ColorModel getColorModel()
Determines the color model of this toolkit's screen.

ColorModel is an abstract class that encapsulates the ability to translate between the pixel values of an image and its red, green, blue, and alpha components.

This toolkit method is called by the getColorModel method of the Component class.

Returns:
the color model of this toolkit's screen.
See Also:
ColorModel, Component.getColorModel()

getFontList

public abstract String[] getFontList()
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames()

Returns the names of the available fonts in this toolkit.

For 1.1, the following font names are deprecated (the replacement name follows):

  • TimesRoman (use Serif)
  • Helvetica (use SansSerif)
  • Courier (use Monospaced)

The ZapfDingbats fontname is also deprecated in 1.1 but the characters are defined in Unicode starting at 0x2700, and as of 1.1 Java supports those characters.

Returns:
the names of the available fonts in this toolkit.
See Also:
GraphicsEnvironment.getAvailableFontFamilyNames()

getFontMetrics

public abstract FontMetrics getFontMetrics(Font font)
Deprecated. This returns integer metrics for the default screen.

Gets the screen device metrics for rendering of the font.
Parameters:
font - a font.
Returns:
the screen metrics of the specified font in this toolkit.
See Also:
LineMetrics, Font.getLineMetrics(java.lang.String, java.awt.font.FontRenderContext), GraphicsEnvironment.getScreenDevices()

sync

public abstract void sync()
Synchronizes this toolkit's graphics state. Some window systems may do buffering of graphics events.

This method ensures that the display is up-to-date. It is useful for animation.

getDefaultToolkit

public static Toolkit getDefaultToolkit()
Gets the default toolkit.

If there is a system property named "awt.toolkit", that property is treated as the name of a class that is a subclass of Toolkit.

If the system property does not exist, then the default toolkit used is the class named "sun.awt.motif.MToolkit", which is a motif implementation of the Abstract Window Toolkit.

Also loads additional classes into the VM, using the property 'assistive_technologies' specified in the Sun reference implementation by a line in the 'accessibility.properties' file. The form is "assistive_technologies=..." where the "..." is a comma-separated list of assistive technology classes to load. Each class is loaded in the order given and a single instance of each is created using Class.forName(class).newInstance(). This is done just after the AWT toolkit is created. All errors are handled via an AWTError exception.

Returns:
the default toolkit.
Throws:
AWTError - if a toolkit could not be found, or if one could not be accessed or instantiated.

getImage

public abstract Image getImage(String filename)
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image. Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinate period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available.
Parameters:
filename - the name of a file containing pixel data in a recognized file format.
Returns:
an image which gets its pixel data from the specified file.
See Also:
createImage(java.lang.String)

getImage

public abstract Image getImage(URL url)
Returns an image which gets pixel data from the specified URL. The pixel data referenced by the specified URL must be in one of the following formats: GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same URL to the same returned Image. Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinate period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available.
Parameters:
url - the URL to use in fetching the pixel data.
Returns:
an image which gets its pixel data from the specified URL.
See Also:
createImage(java.net.URL)

createImage

public abstract Image createImage(String filename)
Returns an image which gets pixel data from the specified file. The returned Image is a new object which will not be shared with any other caller of this method or its getImage variant.
Parameters:
filename - the name of a file containing pixel data in a recognized file format.
Returns:
an image which gets its pixel data from the specified file.
See Also:
getImage(java.lang.String)

createImage

public abstract Image createImage(URL url)
Returns an image which gets pixel data from the specified URL. The returned Image is a new object which will not be shared with any other caller of this method or its getImage variant.
Parameters:
url - the URL to use in fetching the pixel data.
Returns:
an image which gets its pixel data from the specified URL.
See Also:
getImage(java.net.URL)

prepareImage

public abstract boolean prepareImage(Image image,
                                     int width,
                                     int height,
                                     ImageObserver observer)
Prepares an image for rendering.

If the values of the width and height arguments are both -1, this method prepares the image for rendering on the default screen; otherwise, this method prepares an image for rendering on the default screen at the specified width and height.

The image data is downloaded asynchronously in another thread, and an appropriately scaled screen representation of the image is generated.

This method is called by components prepareImage methods.

Information on the flags returned by this method can be found with the definition of the ImageObserver interface.

Parameters:
image - the image for which to prepare a screen representation.
width - the width of the desired screen representation, or -1.
height - the height of the desired screen representation, or -1.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
true if the image has already been fully prepared; false otherwise.
See Also:
Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver), Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver

checkImage

public abstract int checkImage(Image image,
                               int width,
                               int height,
                               ImageObserver observer)
Indicates the construction status of a specified image that is being prepared for display.

If the values of the width and height arguments are both -1, this method returns the construction status of a screen representation of the specified image in this toolkit. Otherwise, this method returns the construction status of a scaled representation of the image at the specified width and height.

This method does not cause the image to begin loading. An application must call prepareImage to force the loading of an image.

This method is called by the component's checkImage methods.

Information on the flags returned by this method can be found with the definition of the ImageObserver interface.

Parameters:
image - the image whose status is being checked.
width - the width of the scaled version whose status is being checked, or -1.
height - the height of the scaled version whose status is being checked, or -1.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of the ImageObserver flags for the image data that is currently available.
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Component.checkImage(java.awt.Image, java.awt.image.ImageObserver), Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver

createImage

public abstract Image createImage(ImageProducer producer)
Creates an image with the specified image producer.
Parameters:
producer - the image producer to be used.
Returns:
an image with the specified image producer.
See Also:
Image, ImageProducer, Component.createImage(java.awt.image.ImageProducer)

createImage

public Image createImage(byte[] imagedata)
Creates an image which decodes the image stored in the specified byte array.

The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.

Parameters:
imagedata - an array of bytes, representing image data in a supported image format.
Returns:
an image.
Since:
JDK1.1

createImage

public abstract Image createImage(byte[] imagedata,
                                  int imageoffset,
                                  int imagelength)
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length. The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.
Parameters:
imagedata - an array of bytes, representing image data in a supported image format.
imageoffset - the offset of the beginning of the data in the array.
imagelength - the length of the data in the array.
Returns:
an image.
Since:
JDK1.1

getPrintJob

public abstract PrintJob getPrintJob(Frame frame,
                                     String jobtitle,
                                     Properties props)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a RuntimePermission("queuePrintJob") permission.

Parameters:
frame - the parent of the print dialog. May not be null.
jobtitle - the title of the PrintJob. A null title is equivalent to "".
props - a Properties object containing zero or more properties. Properties are not standardized and are not consistent across implementations. Because of this, PrintJobs which require job and page control should use the version of this function which takes JobAttributes and PageAttributes objects. This object may be updated to reflect the user's job choices on exit. May be null.
Returns:
a PrintJob object, or null if the user cancelled the print job.
Throws:
NullPointerException - if frame is null
SecurityException - if this thread is not allowed to initiate a print job request
Since:
JDK1.1
See Also:
PrintJob, RuntimePermission

getPrintJob

public PrintJob getPrintJob(Frame frame,
                            String jobtitle,
                            JobAttributes jobAttributes,
                            PageAttributes pageAttributes)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a RuntimePermission("queuePrintJob") permission.

Parameters:
frame - the parent of the print dialog. May be null if and only if jobAttributes is not null and jobAttributes.getDialog() returns JobAttributes.DialogType.NONE or JobAttributes.DialogType.COMMON.
jobtitle - the title of the PrintJob. A null title is equivalent to "".
jobAttributes - a set of job attributes which will control the PrintJob. The attributes will be updated to reflect the user's choices as outlined in the JobAttributes documentation. May be null.
pageAttributes - a set of page attributes which will control the PrintJob. The attributes will be applied to every page in the job. The attributes will be updated to reflect the user's choices as outlined in the PageAttributes documentation. May be null.
Returns:
a PrintJob object, or null if the user cancelled the print job.
Throws:
NullPointerException - if frame is null and either jobAttributes is null or jobAttributes.getDialog() returns JobAttributes.DialogType.NATIVE.
IllegalArgumentException - if pageAttributes specifies differing cross feed and feed resolutions
SecurityException - if this thread is not allowed to initiate a print job request, or if jobAttributes specifies print to file, and this thread is not allowed to access the file system
Since:
1.3
See Also:
PrintJob, RuntimePermission, JobAttributes, PageAttributes

beep

public abstract void beep()
Emits an audio beep.
Since:
JDK1.1

getSystemClipboard

public abstract Clipboard getSystemClipboard()
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform. This clipboard enables data transfer between Java programs and native applications which use native clipboard facilities.

In addition to any and all formats specified in the flavormap.properties file, or other file specified by the AWT.DnD.flavorMapFileURL Toolkit property, text returned by the system Clipboard's getTransferData() method is available in the following flavors:

  • DataFlavor.stringFlavor
  • DataFlavor.plainTextFlavor (deprecated)
As with java.awt.datatransfer.StringSelection, if the requested flavor is DataFlavor.plainTextFlavor, or an equivalent flavor, a Reader is returned. Note: The behavior of the system Clipboard's getTransferData() method for DataFlavor.plainTextFlavor, and equivalent DataFlavors, is inconsistent with the definition of DataFlavor.plainTextFlavor . Because of this, support for DataFlavor.plainTextFlavor, and equivalent flavors, is deprecated.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkSystemClipboardAccess method to ensure it's ok to to access the system clipboard. If the default implementation of checkSystemClipboardAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with an AWTPermission("accessClipboard") permission.

Returns:
the system Clipboard
Since:
JDK1.1
See Also:
Clipboard, StringSelection, java.awt.datatransfer.DataFlavor.stringFlavor, java.awt.datatransfer.DataFlavor.plainTextFlavor, Reader, AWTPermission

getMenuShortcutKeyMask

public int getMenuShortcutKeyMask()
Determines which modifier key is the appropriate accelerator key for menu shortcuts.

Menu shortcuts, which are embodied in the MenuShortcut class, are handled by the MenuBar class.

By default, this method returns Event.CTRL_MASK. Toolkit implementations should override this method if the Control key isn't the correct key for accelerators.

Returns:
the modifier mask on the Event class that is used for menu shortcuts on this toolkit.
Since:
JDK1.1
See Also:
MenuBar, MenuShortcut

getLockingKeyState

public boolean getLockingKeyState(int keyCode)
Returns whether the given locking key on the keyboard is currently in its "on" state. Valid key codes are VK_CAPS_LOCK, VK_NUM_LOCK, VK_SCROLL_LOCK, and VK_KANA_LOCK.
Throws:
IllegalArgumentException - if keyCode is not one of the valid key codes
UnsupportedOperationException - if the host system doesn't allow getting the state of this key programmatically, or if the keyboard doesn't have this key
Since:
1.3

setLockingKeyState

public void setLockingKeyState(int keyCode,
                               boolean on)
Sets the state of the given locking key on the keyboard. Valid key codes are VK_CAPS_LOCK, VK_NUM_LOCK, VK_SCROLL_LOCK, and VK_KANA_LOCK.

Depending on the platform, setting the state of a locking key may involve event processing and therefore may not be immediately observable through getLockingKeyState.

Throws:
IllegalArgumentException - if keyCode is not one of the valid key codes
UnsupportedOperationException - if the host system doesn't allow setting the state of this key programmatically, or if the keyboard doesn't have this key
Since:
1.3

getNativeContainer

protected static Container getNativeContainer(Component c)
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).

createCustomCursor

public Cursor createCustomCursor(Image cursor,
                                 Point hotSpot,
                                 String name)
                          throws IndexOutOfBoundsException
Creates a new custom cursor object. If the image to display is invalid, the cursor will be hidden (made completely transparent), and the hotspot will be set to (0, 0).
Parameters:
image - the image to display when the cursor is active.
hotSpot - the X and Y of the large cursor's hot spot. The hotSpot values must be less than the Dimension returned by getBestCursorSize().
name - a localized description of the cursor, for Java Accessibility use.
Throws:
IndexOutOfBoundsException - if the hotSpot values are outside the bounds of the cursor.
Since:
1.2

getBestCursorSize

public Dimension getBestCursorSize(int preferredWidth,
                                   int preferredHeight)
Returns the supported cursor dimension which is closest to the desired sizes. Systems which only support a single cursor size will return that size regardless of the desired sizes. Systems which don't support custom cursors will return a dimension of 0, 0.

Note: if an image is used whose dimensions don't match a supported size (as returned by this method), the Toolkit implementation will attempt to resize the image to a supported size. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which isn't a supported size. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.

Parameters:
desiredWidth - the preferred cursor width the component would like to use.
desiredHeight - the preferred cursor height the component would like to use.
Returns:
the closest matching supported cursor size, or a dimension of 0,0 if the Toolkit implementation doesn't support custom cursors.
Since:
1.2

getMaximumCursorColors

public int getMaximumCursorColors()
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.

Note: if an image is used which has more colors in its palette than the supported maximum, the Toolkit implementation will attempt to flatten the palette to the maximum. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which has more colors than the system supports. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.

Returns:
the maximum number of colors, or zero if custom cursors are not supported by this Toolkit implementation.
Since:
1.2

getProperty

public static String getProperty(String key,
                                 String defaultValue)
Gets a property with the specified key and default. This method returns defaultValue if the property is not found.

getSystemEventQueue

public final EventQueue getSystemEventQueue()
Get the application's or applet's EventQueue instance. Depending on the Toolkit implementation, different EventQueues may be returned for different applets. Applets should therefore not assume that the EventQueue instance returned by this method will be shared by other applets or the system.

First, if there is a security manager, its checkAwtEventQueueAccess method is called. If the default implementation of checkAwtEventQueueAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with an AWTPermission("accessEventQueue") permission.

Returns:
the EventQueue object.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkAwtEventQueueAccess() method denies access to the EventQueue.
See Also:
AWTPermission

getSystemEventQueueImpl

protected abstract EventQueue getSystemEventQueueImpl()

createDragSourceContextPeer

public abstract java.awt.dnd.peer.DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)
                                                                             throws InvalidDnDOperationException
create the peer for a DragSourceContext

createDragGestureRecognizer

public DragGestureRecognizer createDragGestureRecognizer(Class abstractRecognizerClass,
                                                         DragSource ds,
                                                         Component c,
                                                         int srcActions,
                                                         DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation
Parameters:
abstractRecognizerClass - The abstract class of the required recognizer
ds - The DragSource
c - The Component target for the DragGestureRecognizer
srcActions - The actions permitted for the gesture
dgl - The DragGestureListener

getDesktopProperty

public final Object getDesktopProperty(String propertyName)
obtain a value for the specified desktop property. A desktop property is a uniquely named value for a resource that is Toolkit global in nature. Usually it also is an abstract representation for an underlying platform dependent desktop setting.

setDesktopProperty

protected final void setDesktopProperty(String name,
                                        Object newValue)
set the named desktop property to the specified value and fire a property change event to notify any listeners that the value has changed

lazilyLoadDesktopProperty

protected Object lazilyLoadDesktopProperty(String name)
an opportunity to lazily evaluate desktop property values.

initializeDesktopProperties

protected void initializeDesktopProperties()
initializeDesktopProperties

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
add the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
Parameters:
name - The name of the property to listen for
pcl - The property change listener

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
remove the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.

addAWTEventListener

public void addAWTEventListener(AWTEventListener listener,
                                long eventMask)
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.

First, if there is a security manager, its checkPermission method is called with an AWTPermission("listenToAllAWTEvents") permission. This may result in a SecurityException.

eventMask is a bitmask of event types to receive. It is constructed by bitwise OR-ing together the event masks defined in AWTEvent.

Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the event listener.
eventMask - the bitmask of event types to receive
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.2
See Also:
AWTEventListener, addAWTEventListener(java.awt.event.AWTEventListener, long), AWTEvent, SecurityManager.checkPermission(java.security.Permission), AWTPermission

removeAWTEventListener

public void removeAWTEventListener(AWTEventListener listener)
Removes an AWTEventListener from receiving dispatched AWTEvents.

First, if there is a security manager, its checkPermission method is called with an AWTPermission("listenToAllAWTEvents") permission. This may result in a SecurityException.

Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the event listener.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.2
See Also:
AWTEventListener, addAWTEventListener(java.awt.event.AWTEventListener, long), AWTEvent, SecurityManager.checkPermission(java.security.Permission), AWTPermission

mapInputMethodHighlight

public abstract Map mapInputMethodHighlight(InputMethodHighlight highlight)
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found. The style field of the input method highlight is ignored. The map returned is unmodifiable.
Parameters:
highlight - input method highlight
Returns:
style attribute map, or null
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Transparency

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.awt
Interface Transparency

All Known Subinterfaces:
Paint
All Known Implementing Classes:
ColorModel
public interface Transparency

The Transparency interface defines the common transparency modes for implementing classes.

Field Summary
static int | BITMASK Represents image data that is guaranteed to be either completely opaque, with an alpha value of 1.0, or completely transparent, with an alpha value of 0.0.
static int | OPAQUE Represents image data that is guaranteed to be completely opaque, meaning that all pixels have an alpha value of 1.0.
static int | TRANSLUCENT Represents image data that contains or might contain arbitrary alpha values between and including 0.0 and 1.0.
Method Summary
 int getTransparency()
Returns the type of this Transparency.

Field Detail

OPAQUE

public static final int OPAQUE
Represents image data that is guaranteed to be completely opaque, meaning that all pixels have an alpha value of 1.0.

BITMASK

public static final int BITMASK
Represents image data that is guaranteed to be either completely opaque, with an alpha value of 1.0, or completely transparent, with an alpha value of 0.0.

TRANSLUCENT

public static final int TRANSLUCENT
Represents image data that contains or might contain arbitrary alpha values between and including 0.0 and 1.0.
Method Detail

getTransparency

public int getTransparency()
Returns the type of this Transparency.
Returns:
the field type of this Transparency, which is either OPAQUE, BITMASK or TRANSLUCENT.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Window

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.awt
Class Window

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
BasicToolBarUI.DragWindow, Dialog, Frame, JWindow
public class Window
extends Container
implements Accessible

A Window object is a top-level window with no borders and no menubar. The default layout for a window is BorderLayout.

A window must have either a frame, dialog, or another window defined as its owner when it's constructed.

In a multi-screen environment, you can create a Window on a different screen device by constructing the Window with Window(Window, GraphicsConfiguration). The GraphicsConfiguration object is one of the GraphicsConfiguration objects of the target screen device.

In a virtual device multi-screen environment in which the desktop area could span multiple physical screen devices, the bounds of all configurations are relative to the virtual device coordinate system. The origin of the virtual-coordinate system is at the upper left-hand corner of the primary physical screen. Depending on the location of the primary screen in the virtual device, negative coordinates are possible, as shown in the following figure.

In such an environment, when calling setLocation, you must pass a virtual coordinate to this method. Similarly, calling getLocationOnScreen on a Window returns virtual device coordinates. Call the getBounds method of a GraphicsConfiguration to find its origin in the virtual coordinate system.

The following code sets the location of a Window at (10, 10) relative to the origin of the physical screen of the corresponding GraphicsConfiguration. If the bounds of the GraphicsConfiguration is not taken into account, the Window location would be set at (10, 10) relative to the virtual-coordinate system and would appear on the primary physical screen, which might be different from the physical screen of the specified GraphicsConfiguration.

    Window w = new Window(Window owner, GraphicsConfiguration gc);
    Rectangle bounds = gc.getBounds();
    w.setLocation(10 + bounds.x, 10 + bounds.y);

Windows are capable of generating the following window events: WindowOpened, WindowClosed.

Since:
JDK1.0
See Also:
WindowEvent, addWindowListener(java.awt.event.WindowListener), BorderLayout, Serialized Form

Inner Class Summary
protected  class Window.AccessibleAWTWindow
This class implements accessibility support for the Window class.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Window(Frame owner)
Constructs a new invisible window with the specified Frame as its owner.
Window(Window owner)
Constructs a new invisible window with the specified Window as its owner.
Window(Window owner, GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
Method Summary
void | addNotify() Makes this Window displayable by creating the connection to its native screen resource.
void | addWindowListener(WindowListener l) Adds the specified window listener to receive window events from this window.
void | applyResourceBundle(ResourceBundle rb) Apply the settings in the given ResourceBundle to this Window.
void | applyResourceBundle(String rbName) Load the ResourceBundle with the given name using the default locale and apply its settings to this window.
void | dispose() Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children.
protected void | finalize() Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Window.
Component | getFocusOwner() Returns the child component of this Window which has focus if and only if this Window is active.
GraphicsConfiguration | getGraphicsConfiguration() This method returns the GraphicsConfiguration used by this Window.
InputContext | getInputContext() Gets the input context for this window.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the listenerType argument.
Locale | getLocale() Gets the Locale object that is associated with this window, if the locale has been set.
Window[] | getOwnedWindows() Return an array containing all the windows this window currently owns.
Window | getOwner() Returns the owner of this window.
Toolkit | getToolkit() Returns the toolkit of this frame.
String | getWarningString() Gets the warning string that is displayed with this window.
void | hide() Hide this Window, its subcomponents, and all of its owned children.
boolean | isShowing() Checks if this Window is showing on screen.
void | pack() Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
boolean | postEvent(Event e) Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
protected void | processEvent(AWTEvent e) Processes events on this window.
protected void | processWindowEvent(WindowEvent e) Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
void | removeWindowListener(WindowListener l) Removes the specified window listener so that it no longer receives window events from this window.
void | setCursor(Cursor cursor) Set the cursor image to a specified cursor.
void | show() Makes the Window visible.
void | toBack() Sends this window to the back.
void | toFront() Brings this window to the front.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Window

public Window(Frame owner)
Constructs a new invisible window with the specified Frame as its owner.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the Frame to act as owner
Throws:
IllegalArgumentException - if gc is not from a screen device.
IllegalArgumentException - if owner is null
See Also:
SecurityManager.checkTopLevelWindow(java.lang.Object)

Window

public Window(Window owner)
Constructs a new invisible window with the specified Window as its owner.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the Window to act as owner
Throws:
IllegalArgumentException - if owner is null
Since:
1.2
See Also:
SecurityManager.checkTopLevelWindow(java.lang.Object)

Window

public Window(Window owner,
              GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the window to act as owner
gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
Throws:
IllegalArgumentException - if owner is null.
IllegalArgumentException - if gc is not from a screen device.
Since:
1.3
See Also:
SecurityManager.checkTopLevelWindow(java.lang.Object), GraphicsConfiguration.getBounds()
Method Detail

finalize

protected void finalize()
                 throws Throwable
Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

addNotify

public void addNotify()
Makes this Window displayable by creating the connection to its native screen resource. This method is called internally by the toolkit and should not be called directly by programs.
Overrides:
addNotify in class Container
Since:
JDK1.0
See Also:
Component.isDisplayable(), Container.removeNotify()

pack

public void pack()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated after the preferredSize is calculated.
See Also:
Component.isDisplayable()

show

public void show()
Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front.
Overrides:
show in class Component
See Also:
Component.isDisplayable(),
toFront(),
Component.setVisible(boolean)

hide

public void hide()
Hide this Window, its subcomponents, and all of its owned children. The Window and its subcomponents can be made visible again with a call to show.

Overrides:
hide in class Component
See Also:
show(), dispose()

dispose

public void dispose()
Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.

The Window and its subcomponents can be made displayable again by rebuilding the native resources with a subsequent call to pack or show. The states of the recreated Window and its subcomponents will be identical to the states of these objects at the point where the Window was disposed (not accounting for additional modifcations between those actions).

See Also:
Component.isDisplayable(),
pack(),
show()

toFront

public void toFront()
Brings this window to the front. Places this window at the top of the stacking order and shows it in front of any other windows.
See Also:
toBack()

toBack

public void toBack()
Sends this window to the back. Places this window at the bottom of the stacking order and makes the corresponding adjustment to other visible windows.
See Also:
toFront()

getToolkit

public Toolkit getToolkit()
Returns the toolkit of this frame.
Overrides:
getToolkit in class Component
Returns:
the toolkit of this window.
See Also:
Toolkit, Toolkit.getDefaultToolkit(), Component.getToolkit()

getWarningString

public final String getWarningString()
Gets the warning string that is displayed with this window. If this window is insecure, the warning string is displayed somewhere in the visible area of the window. A window is insecure if there is a security manager, and the security manager's checkTopLevelWindow method returns false when this window is passed to it as an argument.

If the window is secure, then getWarningString returns null. If the window is insecure, this method checks for the system property awt.appletWarning and returns the string value of that property.

Returns:
the warning string for this window.
See Also:
SecurityManager.checkTopLevelWindow(java.lang.Object)

getLocale

public Locale getLocale()
Gets the Locale object that is associated with this window, if the locale has been set. If no locale has been set, then the default locale is returned.
Overrides:
getLocale in class Component
Returns:
the locale that is set for this window.
Since:
JDK1.1
See Also:
Locale

getInputContext

public InputContext getInputContext()
Gets the input context for this window. A window always has an input context, which is shared by subcomponents unless they create and set their own.
Overrides:
getInputContext in class Component
Since:
1.2
See Also:
Component.getInputContext()

setCursor

public void setCursor(Cursor cursor)
Set the cursor image to a specified cursor.
Overrides:
setCursor in class Component
Parameters:
cursor - One of the constants defined by the Cursor class. If this parameter is null then the cursor for this window will be set to the type Cursor.DEFAULT_CURSOR.
Since:
JDK1.1
See Also:
Component.getCursor(), Cursor

getOwner

public Window getOwner()
Returns the owner of this window.

getOwnedWindows

public Window[] getOwnedWindows()
Return an array containing all the windows this window currently owns.
Since:
1.2

addWindowListener

public void addWindowListener(WindowListener l)
Adds the specified window listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the window listener

removeWindowListener

public void removeWindowListener(WindowListener l)
Removes the specified window listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the window listener

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the WindowListener(s) for the given Window w, one would write:
 WindowListener[] wls = (WindowListener[])(w.getListeners(WindowListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Container
Parameters:
listenerType - Type of listeners requested
Returns:
all of the listeners of the specified type supported by this text field
Since:
1.3

processEvent

protected void processEvent(AWTEvent e)
Processes events on this window. If the event is an WindowEvent, it invokes the processWindowEvent method, else it invokes its superclass's processEvent.
Overrides:
processEvent in class Container
Parameters:
e - the event

processWindowEvent

protected void processWindowEvent(WindowEvent e)
Processes window events occurring on this window by dispatching them to any registered WindowListener objects. NOTE: This method will not be called unless window events are enabled for this component; this happens when one of the following occurs: a) A WindowListener object is registered via addWindowListener() b) Window events are enabled via enableEvents()
Parameters:
e - the window event
See Also:
Component.enableEvents(long)

getFocusOwner

public Component getFocusOwner()
Returns the child component of this Window which has focus if and only if this Window is active.
Returns:
the component with focus, or null if no children have focus assigned to them.

postEvent

public boolean postEvent(Event e)
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).

Overrides:
postEvent in class Component

isShowing

public boolean isShowing()
Checks if this Window is showing on screen.
Overrides:
isShowing in class Component
See Also:
Component.setVisible(boolean)

applyResourceBundle

public void applyResourceBundle(ResourceBundle rb)
Apply the settings in the given ResourceBundle to this Window. Currently, this applies the ResourceBundle's ComponentOrientation to this Window and all components contained within it.
Since:
1.2
See Also:
ComponentOrientation

applyResourceBundle

public void applyResourceBundle(String rbName)
Load the ResourceBundle with the given name using the default locale and apply its settings to this window. Currently, this applies the ResourceBundle's ComponentOrientation to this Window and all components contained within it.
Since:
1.2
See Also:
ComponentOrientation

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Window. For windows, the AccessibleContext takes the form of an AccessibleAWTWindow. A new AccessibleAWTWindow instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTWindow that serves as the AccessibleContext of this Window

getGraphicsConfiguration

public GraphicsConfiguration getGraphicsConfiguration()
This method returns the GraphicsConfiguration used by this Window.
Overrides:
getGraphicsConfiguration in class Component
Following copied from class: java.awt.Component
Returns:
the GraphicsConfiguration used by this Component or null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.beans Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.beans

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.beans.Beans
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.beans.PropertyChangeEvent
    • class java.beans.FeatureDescriptor
      • class java.beans.BeanDescriptor
      • class java.beans.EventSetDescriptor
      • class java.beans.MethodDescriptor
      • class java.beans.ParameterDescriptor
      • class java.beans.PropertyDescriptor
        • class java.beans.IndexedPropertyDescriptor
    • class java.beans.Introspector
    • class java.beans.PropertyChangeSupport (implements java.io.Serializable)
    • class java.beans.PropertyEditorManager
    • class java.beans.PropertyEditorSupport (implements java.beans.PropertyEditor)
    • class java.beans.SimpleBeanInfo (implements java.beans.BeanInfo)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.beans.IntrospectionException
        • class java.beans.PropertyVetoException
    • class java.beans.VetoableChangeSupport (implements java.io.Serializable)

Interface Hierarchy

  • interface java.beans.AppletInitializer
  • interface java.beans.BeanInfo
  • interface java.beans.Customizer
  • interface java.beans.DesignMode
  • interface java.util.EventListener
    • interface java.beans.PropertyChangeListener
    • interface java.beans.VetoableChangeListener
  • interface java.beans.PropertyEditor
  • interface java.beans.Visibility
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.beans

Contains classes related to Java Beans development.

See:
Description

Interface Summary
AppletInitializer | This interface is designed to work in collusion with java.beans.Beans.instantiate.
BeanInfo | A bean implementor who wishes to provide explicit information about their bean may provide a BeanInfo class that implements this BeanInfo interface and provides explicit information about the methods, properties, events, etc, of their bean.
Customizer | A customizer class provides a complete custom GUI for customizing a target Java Bean.
DesignMode | This interface is intended to be implemented by, or delegated from, instances of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.
PropertyChangeListener | A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyEditor | A PropertyEditor class provides support for GUIs that want to allow users to edit a property value of a given type.
VetoableChangeListener | A VetoableChange event gets fired whenever a bean changes a "constrained" property.
Visibility | Under some circumstances a bean may be run on servers where a GUI is not available.

Class Summary
BeanDescriptor | A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.
Beans | This class provides some general purpose beans control methods.
EventSetDescriptor | An EventSetDescriptor describes a group of events that a given Java bean fires.
FeatureDescriptor | The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.
IndexedPropertyDescriptor | An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.
Introspector | The Introspector class provides a standard way for tools to learn about the properties, events, and methods supported by a target Java Bean.
MethodDescriptor | A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.
ParameterDescriptor | The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.
PropertyChangeEvent | A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeSupport | This is a utility class that can be used by beans that support bound properties.
PropertyDescriptor | A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.
PropertyEditorManager | The PropertyEditorManager can be used to locate a property editor for any given type name.
PropertyEditorSupport | This is a support class to help build property editors.
SimpleBeanInfo | This is a support class to make it easier for people to provide BeanInfo classes.
VetoableChangeSupport | This is a utility class that can be used by beans that support constrained properties.

Exception Summary
IntrospectionException | Thrown when an exception happens during Introspection.
PropertyVetoException | A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.

Package java.beans Description

Contains classes related to Java Beans development. A few of the classes are used by beans while they run in an application. For example, the event classes are used by beans that fire property and vetoable change events (see PropertyChangeEvent). However, most of the classes in this package are meant to be used by a bean editor (that is, a development environment for customizing and putting together beans to create an application). In particular, these classes help the bean editor create a user interface that the user can use to customize the bean. For example, a bean may contain a property of a special type that a bean editor may not know how to handle. By using the PropertyEditor interface, a bean developer can provide an editor for this special type.

To minimize the resources used by a bean, the classes used by bean editors are loaded only when the bean is being edited. They are not needed while the bean is running in an application and therefore not loaded. This information is kept in what's called a bean-info (see BeanInfo).

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.beans

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.beans

Packages that use java.beans
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in java.beans used by java.awt
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyChangeSupport
This is a utility class that can be used by beans that support bound properties.

Classes in java.beans used by java.beans
AppletInitializer
This interface is designed to work in collusion with java.beans.Beans.instantiate.
BeanDescriptor
A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.
BeanInfo
A bean implementor who wishes to provide explicit information about their bean may provide a BeanInfo class that implements this BeanInfo interface and provides explicit information about the methods, properties, events, etc, of their bean.
EventSetDescriptor
An EventSetDescriptor describes a group of events that a given Java bean fires.
FeatureDescriptor
The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.
IntrospectionException
Thrown when an exception happens during Introspection.
MethodDescriptor
A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.
ParameterDescriptor
The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyDescriptor
A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.
PropertyEditor
A PropertyEditor class provides support for GUIs that want to allow users to edit a property value of a given type.
PropertyVetoException
A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
VetoableChangeListener
A VetoableChange event gets fired whenever a bean changes a "constrained" property.

Classes in java.beans used by java.beans.beancontext
BeanInfo
A bean implementor who wishes to provide explicit information about their bean may provide a BeanInfo class that implements this BeanInfo interface and provides explicit information about the methods, properties, events, etc, of their bean.
DesignMode
This interface is intended to be implemented by, or delegated from, instances of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyChangeSupport
This is a utility class that can be used by beans that support bound properties.
PropertyVetoException
A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
VetoableChangeListener
A VetoableChange event gets fired whenever a bean changes a "constrained" property.
VetoableChangeSupport
This is a utility class that can be used by beans that support constrained properties.
Visibility
Under some circumstances a bean may be run on servers where a GUI is not available.

Classes in java.beans used by javax.accessibility
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.

Classes in java.beans used by javax.swing
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyVetoException
A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
VetoableChangeListener
A VetoableChange event gets fired whenever a bean changes a "constrained" property.

Classes in java.beans used by javax.swing.event
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
PropertyChangeSupport
This is a utility class that can be used by beans that support bound properties.

Classes in java.beans used by javax.swing.plaf.basic
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.

Classes in java.beans used by javax.swing.plaf.metal
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.

Classes in java.beans used by javax.swing.table
PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.

Classes in java.beans used by javax.swing.tree
PropertyChangeListener
A "PropertyChange" event gets fired whenever a bean changes a "bound" property.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AppletInitializer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface AppletInitializer

public interface AppletInitializer

This interface is designed to work in collusion with java.beans.Beans.instantiate. The interafce is intended to provide mechanism to allow the proper initialization of JavaBeans that are also Applets, during their instantiation by java.beans.Beans.instantiate().

Since:
1.2
See Also:
Beans.instantiate(java.lang.ClassLoader, java.lang.String)

Method Summary
void | activate(Applet newApplet) Activate, and/or mark Applet active.
void | initialize(Applet newAppletBean, BeanContext bCtxt) If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container.

Method Detail

initialize

public void initialize(Applet newAppletBean,
                       BeanContext bCtxt)

If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container.

Conformant implementations shall:

  1. Associate the newly instantiated Applet with the appropriate AppletContext.
  2. Instantiate an AppletStub() and associate that AppletStub with the Applet via an invocation of setStub().
  3. If BeanContext parameter is null, then it shall associate the Applet with its appropriate Container by adding that Applet to its Container via an invocation of add(). If the BeanContext parameter is non-null, then it is the responsibility of the BeanContext to associate the Applet with its Container during the subsequent invocation of its addChildren() method.

Parameters:
The - newly instantiated JavaBean
The - BeanContext intended for this Applet, or null.

activate

public void activate(Applet newApplet)

Activate, and/or mark Applet active. Implementors of this interface shall mark this Applet as active, and optionally invoke its start() method.

Parameters:
The - newly instantiated JavaBean
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BCSChild

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextSupport.BCSChild

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextSupport.BCSChild
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanContextServicesSupport.BCSSChild
Enclosing class:
BeanContextSupport
protected class BeanContextSupport.BCSChild
extends Object
implements Serializable

See Also:
Serialized Form

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BCSSChild

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServicesSupport.BCSSChild

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextSupport.BCSChild
        |
        +--java.beans.beancontext.BeanContextServicesSupport.BCSSChild
All Implemented Interfaces:
Serializable
Enclosing class:
BeanContextServicesSupport
protected class BeanContextServicesSupport.BCSSChild
extends BeanContextSupport.BCSChild

See Also:
Serialized Form

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.beans.beancontext Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.beans.beancontext

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.beans.beancontext.BeanContextChildSupport (implements java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServicesListener, java.io.Serializable)
      • class java.beans.beancontext.BeanContextSupport (implements java.beans.beancontext.BeanContext, java.beans.PropertyChangeListener, java.io.Serializable, java.beans.VetoableChangeListener)
        • class java.beans.beancontext.BeanContextServicesSupport (implements java.beans.beancontext.BeanContextServices)
    • class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider (implements java.beans.beancontext.BeanContextServiceProvider, java.beans.beancontext.BeanContextServiceRevokedListener)
    • class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider (implements java.io.Serializable)
    • class java.beans.beancontext.BeanContextSupport.BCSChild (implements java.io.Serializable)
      • class java.beans.beancontext.BeanContextServicesSupport.BCSSChild
    • class java.beans.beancontext.BeanContextSupport.BCSIterator (implements java.util.Iterator)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.beans.beancontext.BeanContextEvent
        • class java.beans.beancontext.BeanContextMembershipEvent
        • class java.beans.beancontext.BeanContextServiceAvailableEvent
        • class java.beans.beancontext.BeanContextServiceRevokedEvent

Interface Hierarchy

  • interface java.beans.beancontext.BeanContextChild
    • interface java.beans.beancontext.BeanContext (also extends java.util.Collection, java.beans.DesignMode, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface java.beans.beancontext.BeanContextChildComponentProxy
  • interface java.beans.beancontext.BeanContextContainerProxy
  • interface java.beans.beancontext.BeanContextProxy
  • interface java.beans.beancontext.BeanContextServiceProvider
  • interface java.beans.BeanInfo
    • interface java.beans.beancontext.BeanContextServiceProviderBeanInfo
  • interface java.util.Collection
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.beans.DesignMode, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface java.beans.DesignMode
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.util.Collection, java.beans.Visibility)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
  • interface java.util.EventListener
    • interface java.beans.beancontext.BeanContextMembershipListener
    • interface java.beans.beancontext.BeanContextServiceRevokedListener
      • interface java.beans.beancontext.BeanContextServicesListener
        • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContext)
  • interface java.beans.Visibility
    • interface java.beans.beancontext.BeanContext (also extends java.beans.beancontext.BeanContextChild, java.util.Collection, java.beans.DesignMode)
      • interface java.beans.beancontext.BeanContextServices (also extends java.beans.beancontext.BeanContextServicesListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.beans.beancontext

Provides classes and interfaces relating to bean context.

See:
Description

Interface Summary
BeanContext | The BeanContext acts a logical hierarchical container for JavaBeans.
BeanContextChild | JavaBeans wishing to be nested within, and obtain a reference to their execution environment, or context, as defined by the BeanContext sub-interface shall implement this interface.
BeanContextChildComponentProxy | This interface is implemented by BeanContextChildren that have an AWT Component associated with them.
BeanContextContainerProxy | This interface is implemented by BeanContexts' that have an AWT Container associated with them.
BeanContextMembershipListener | Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.
BeanContextProxy | This interface is implemented by a JavaBean that does not directly have a BeanContext(Child) associated with it (via implementing that interface or a subinterface thereof), but has a public BeanContext(Child) delegated from it.
BeanContextServiceProvider | One of the primary functions of a BeanContext is to act a as rendezvous between JavaBeans, and BeanContextServiceProviders.
BeanContextServiceProviderBeanInfo | A BeanContextServiceProvider implementor who wishes to provide explicit information about the services their bean may provide shall implement a BeanInfo class that implements this BeanInfo subinterface and provides explicit information about the methods, properties, events, etc, of their services.
BeanContextServiceRevokedListener | The listener interface for receiving BeanContextServiceRevokedEvent objects.
BeanContextServices | The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.
BeanContextServicesListener | The listener interface for receiving BeanContextServiceAvailableEvent objects.

Class Summary
BeanContextChildSupport | This is a general support class to provide support for implementing the BeanContextChild protocol.
BeanContextEvent | BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
BeanContextMembershipEvent | A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
BeanContextServiceAvailableEvent | This event type is used by the BeanContextServicesListener in order to identify the service being registered.
BeanContextServiceRevokedEvent | This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.
BeanContextServicesSupport | This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
BeanContextServicesSupport.BCSSServiceProvider | subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
BeanContextSupport | This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
BeanContextSupport.BCSIterator | protected final subclass that encapsulates an iterator but implements a noop remove() method.

Package java.beans.beancontext Description

Provides classes and interfaces relating to bean context. A bean context is a container for beans and defines the execution environment for the beans it contains. There can be several beans in a single bean context, and a bean context can be nested within another bean context. This package also contains events and listener interface for beans being added and removed from a bean context.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.beans.beancontext

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.beans.beancontext

Packages that use java.beans.beancontext
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.

Classes in java.beans.beancontext used by java.beans
BeanContext
The BeanContext acts a logical hierarchical container for JavaBeans.

Classes in java.beans.beancontext used by java.beans.beancontext
BeanContext
The BeanContext acts a logical hierarchical container for JavaBeans.
BeanContextChild
JavaBeans wishing to be nested within, and obtain a reference to their execution environment, or context, as defined by the BeanContext sub-interface shall implement this interface.
BeanContextChildSupport
This is a general support class to provide support for implementing the BeanContextChild protocol.
BeanContextEvent
BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
BeanContextMembershipEvent
A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
BeanContextMembershipListener
Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.
BeanContextServiceAvailableEvent
This event type is used by the BeanContextServicesListener in order to identify the service being registered.
BeanContextServiceProvider
One of the primary functions of a BeanContext is to act a as rendezvous between JavaBeans, and BeanContextServiceProviders.
BeanContextServiceRevokedEvent
This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.
BeanContextServiceRevokedListener
The listener interface for receiving BeanContextServiceRevokedEvent objects.
BeanContextServices
The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.
BeanContextServicesListener
The listener interface for receiving BeanContextServiceAvailableEvent objects.
BeanContextServicesSupport.BCSSProxyServiceProvider
BeanContextServicesSupport.BCSSServiceProvider
subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
BeanContextSupport
This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
BeanContextSupport.BCSChild

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


BCSIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextSupport.BCSIterator

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextSupport.BCSIterator
All Implemented Interfaces:
Iterator
Enclosing class:
BeanContextSupport
protected static final class BeanContextSupport.BCSIterator
extends Object
implements Iterator

protected final subclass that encapsulates an iterator but implements a noop remove() method.

Method Summary
boolean | hasNext() Returns true if the iteration has more elements.
Object | next() Returns the next element in the interation.
void | remove() Removes from the underlying collection the last element returned by the iterator (optional operation).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

hasNext

public boolean hasNext()
Description copied from interface: Iterator
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
Specified by:
hasNext in interface Iterator
Following copied from interface: java.util.Iterator
Returns:
true if the iterator has more elements.

next

public Object next()
Description copied from interface: Iterator
Returns the next element in the interation.
Specified by:
next in interface Iterator
Following copied from interface: java.util.Iterator
Returns:
the next element in the iteration.
Throws:
NoSuchElementException - iteration has no more elements.

remove

public void remove()
Description copied from interface: Iterator
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
Specified by:
remove in interface Iterator
Following copied from interface: java.util.Iterator
Throws:
UnsupportedOperationException - if the remove operation is not supported by this Iterator.
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BCSSProxyServiceProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServicesSupport.BCSSProxyServiceProvider

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
All Implemented Interfaces:
BeanContextServiceProvider, BeanContextServiceRevokedListener, EventListener
Enclosing class:
BeanContextServicesSupport
protected class BeanContextServicesSupport.BCSSProxyServiceProvider
extends Object
implements BeanContextServiceProvider, BeanContextServiceRevokedListener

Method Summary
Iterator | getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) Invoked by BeanContextServices, this method gets the current service selectors for the specified service.
Object | getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
void | releaseService(BeanContextServices bcs, Object requestor, Object service) Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
void | serviceRevoked(BeanContextServiceRevokedEvent bcsre) The service named has been revoked.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getService

public Object getService(BeanContextServices bcs,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector)
Description copied from interface: BeanContextServiceProvider
Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
Specified by:
getService in interface BeanContextServiceProvider
Following copied from interface: java.beans.beancontext.BeanContextServiceProvider
Parameters:
bcs - The BeanContextServices associated with this particular request. This parameter enables the BeanContextServiceProvider to distinguish service requests from multiple sources.
requestor - The object requesting the service
serviceClass - The service requested
serviceSelector - the service dependent parameter for a particular service, or null if not applicable.
Returns:
a reference to the requested service

releaseService

public void releaseService(BeanContextServices bcs,
                           Object requestor,
                           Object service)
Description copied from interface: BeanContextServiceProvider
Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
Specified by:
releaseService in interface BeanContextServiceProvider
Following copied from interface: java.beans.beancontext.BeanContextServiceProvider
Parameters:
bcs - the BeanContextServices associated with this particular release request
requestor - the object requesting the service to be released
service - the service that is to be released

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
                                           Class serviceClass)
Description copied from interface: BeanContextServiceProvider
Invoked by BeanContextServices, this method gets the current service selectors for the specified service. A service selector is a service specific parameter, typical examples of which could include: a parameter to a constructor for the service implementation class, a value for a particular service's property, or a key into a map of existing implementations.
Specified by:
getCurrentServiceSelectors in interface BeanContextServiceProvider
Following copied from interface: java.beans.beancontext.BeanContextServiceProvider
Parameters:
bcs - the BeanContextServices for this request
service - the specified service
Returns:
the current service selectors for the specified serviceClass

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
Description copied from interface: BeanContextServiceRevokedListener
The service named has been revoked. getService requests for this service will no longer be satisifed.
Specified by:
serviceRevoked in interface BeanContextServiceRevokedListener
Following copied from interface: java.beans.beancontext.BeanContextServiceRevokedListener
Parameters:
bcsre - the BeanContextServiceRevokedEvent received by this listener.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BCSSServiceProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServicesSupport.BCSSServiceProvider

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
All Implemented Interfaces:
Serializable
Enclosing class:
BeanContextServicesSupport
protected static class BeanContextServicesSupport.BCSSServiceProvider
extends Object
implements Serializable

subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.

See Also:
Serialized Form

Field Summary
protected  BeanContextServiceProvider serviceProvider
Method Summary
protected  BeanContextServiceProvider getServiceProvider()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

serviceProvider

protected BeanContextServiceProvider serviceProvider
Method Detail

getServiceProvider

protected BeanContextServiceProvider getServiceProvider()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContext

All Superinterfaces:
BeanContextChild, Collection, DesignMode, Visibility
All Known Subinterfaces:
BeanContextServices
All Known Implementing Classes:
BeanContextSupport
public interface BeanContext
extends BeanContextChild, Collection, DesignMode, Visibility

The BeanContext acts a logical hierarchical container for JavaBeans.

Since:
1.2

Field Summary
static Object globalHierarchyLock
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
Method Summary
 void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).
 URL getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 InputStream getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 Object instantiateChild(String beanName)
Instantiate the javaBean named as a child of this BeanContext.
 void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui

Field Detail

globalHierarchyLock

public static final Object globalHierarchyLock
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
Method Detail

instantiateChild

public Object instantiateChild(String beanName)
                        throws IOException,
                               ClassNotFoundException
Instantiate the javaBean named as a child of this BeanContext. The implementation of the JavaBean is derived from the value of the beanName parameter, and is defined by the java.beans.Beans.instantiate() method.
Parameters:
beanName - The name of the JavaBean to instantiate as a child of this BeanContext
Throws:
IOException -
ClassNotFoundException - if the class identified by the beanName parameter is not found

getResourceAsStream

public InputStream getResourceAsStream(String name,
                                       BeanContextChild bcc)
                                throws IllegalArgumentException
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
Parameters:
name - the resource name
bcc - the specified child
Returns:
an InputStream for reading the resource, or null if the resource could not be found.
Throws:
IllegalArgumentException - if the resource is not valid

getResource

public URL getResource(String name,
                       BeanContextChild bcc)
                throws IllegalArgumentException
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
Parameters:
name - the resource name
bcc - the specified child
Returns:
a URL for the named resource for the specified child
Throws:
IllegalArgumentException - if the resource is not valid

addBeanContextMembershipListener

public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).
Parameters:
bcml - the BeanContextMembershipListener to be added

removeBeanContextMembershipListener

public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.
Parameters:
bcml - the BeanContextMembershipListener to be removed
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BeanContextChild

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextChild

All Known Subinterfaces:
BeanContext, BeanContextServices
All Known Implementing Classes:
BeanContextChildSupport
public interface BeanContextChild

JavaBeans wishing to be nested within, and obtain a reference to their execution environment, or context, as defined by the BeanContext sub-interface shall implement this interface.

Conformant BeanContexts shall as a side effect of adding a BeanContextChild object shall pass a reference to itself via the setBeanContext() method of this interface.

Note that a BeanContextChild may refuse a change in state by throwing PropertyVetoedException in response.

In order for persistence mechanisms to function properly on BeanContextChild instances across a broad variety of scenarios, implementing classes of this interface are required to define as transient, any or all fields, or instance variables, that may contain, or represent, references to the nesting BeanContext instance or other resources obtained from the BeanContext via any unspecified mechanisms.

Since:
1.2

Method Summary
void | addPropertyChangeListener(String name, PropertyChangeListener pcl) Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
void | addVetoableChangeListener(String name, VetoableChangeListener vcl) Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
BeanContext | getBeanContext() Gets the BeanContext associated with this BeanContextChild.
void | removePropertyChangeListener(String name, PropertyChangeListener pcl) Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
void | removeVetoableChangeListener(String name, VetoableChangeListener vcl) Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
void | setBeanContext(BeanContext bc) Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters: propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).

Method Detail

setBeanContext

public void setBeanContext(BeanContext bc)
                    throws PropertyVetoException

Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters: propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).

A change in the value of the nesting BeanContext property of this BeanContextChild may be vetoed by throwing the appropriate exception.

Parameters:
bc - The BeanContext with which to associate this BeanContextChild.
Throws:
PropertyVetoException - if the addition of the specified BeanContext is refused.

getBeanContext

public BeanContext getBeanContext()
Gets the BeanContext associated with this BeanContextChild.
Returns:
the BeanContext associated with this BeanContextChild.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
Parameters:
name - the name of the property to listen on
pcl - the PropertyChangeListener to add

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
Parameters:
name - the name of the property that was listened on
pcl - the PropertyChangeListener to remove

addVetoableChangeListener

public void addVetoableChangeListener(String name,
                                      VetoableChangeListener vcl)
Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
Parameters:
name - the name of the property to listen on
vcl - the VetoableChangeListener to add

removeVetoableChangeListener

public void removeVetoableChangeListener(String name,
                                         VetoableChangeListener vcl)
Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
Parameters:
name - the name of the property that was listened on.
vcl - the VetoableChangeListener to remove.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextChildComponentProxy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextChildComponentProxy

public interface BeanContextChildComponentProxy

This interface is implemented by BeanContextChildren that have an AWT Component associated with them.

Since:
1.2

Method Summary
 Component getComponent()
Gets the java.awt.Component associated with this BeanContextChild.

Method Detail

getComponent

public Component getComponent()
Gets the java.awt.Component associated with this BeanContextChild.
Returns:
the AWT Component associated with this BeanContextChild
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextChildSupport

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextChildSupport

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
All Implemented Interfaces:
BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, EventListener, Serializable
Direct Known Subclasses:
BeanContextSupport
public class BeanContextChildSupport
extends Object
implements BeanContextChild, BeanContextServicesListener, Serializable

This is a general support class to provide support for implementing the BeanContextChild protocol. This class may either be directly subclassed, or encapsulated and delegated to in order to implement this interface for a given component.

Since:
1.2
See Also:
Serialized Form

Field Summary
protected BeanContext | beanContext
BeanContextChild | beanContextChildPeer The BeanContext in which this BeanContextChild is nested.
protected PropertyChangeSupport | pcSupport The PropertyChangeSupport associated with this BeanContextChildSupport.
protected boolean | rejectedSetBCOnce A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation.
protected VetoableChangeSupport | vcSupport The VetoableChangeSupport associated with this BeanContextChildSupport.
Constructor Summary
BeanContextChildSupport()
construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself.
BeanContextChildSupport(BeanContextChild bcc)
construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation
Method Summary
void | addPropertyChangeListener(String name, PropertyChangeListener pcl) Adds a property change listener.
void | addVetoableChangeListener(String name, VetoableChangeListener vcl) Adds a VetoableChangeListener.
void | firePropertyChange(String name, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
void | fireVetoableChange(String name, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
BeanContext | getBeanContext() Gets the nesting BeanContext for this BeanContextChildSupport.
BeanContextChild | getBeanContextChildPeer() Gets the BeanContextChild associated with this BeanContextChildSupport.
protected void | initializeBeanContextResources() This method may be overridden by subclasses to provide their own initialization behaviors.
boolean | isDelegated() Reports whether or not this class is a delegate of another.
protected void | releaseBeanContextResources() This method may be overridden by subclasses to provide their own release behaviors.
void | removePropertyChangeListener(String name, PropertyChangeListener pcl) Remove a property change listener.
void | removeVetoableChangeListener(String name, VetoableChangeListener vcl) Removes a VetoableChangeListener.
void | serviceAvailable(BeanContextServiceAvailableEvent bcsae) A new service is available from the nesting BeanContext.
void | serviceRevoked(BeanContextServiceRevokedEvent bcsre) A service provided by the nesting BeanContext has been revoked.
void | setBeanContext(BeanContext bc) Sets the BeanContext for this BeanContextChildSupport.
boolean | validatePendingSetBeanContext(BeanContext newValue) Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

beanContextChildPeer

public BeanContextChild beanContextChildPeer
The BeanContext in which this BeanContextChild is nested.

pcSupport

protected PropertyChangeSupport pcSupport
The PropertyChangeSupport associated with this BeanContextChildSupport.

vcSupport

protected VetoableChangeSupport vcSupport
The VetoableChangeSupport associated with this BeanContextChildSupport.

beanContext

protected transient BeanContext beanContext

rejectedSetBCOnce

protected transient boolean rejectedSetBCOnce
A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation.
Constructor Detail

BeanContextChildSupport

public BeanContextChildSupport()
construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself.

BeanContextChildSupport

public BeanContextChildSupport(BeanContextChild bcc)
construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation
Method Detail

setBeanContext

public void setBeanContext(BeanContext bc)
                    throws PropertyVetoException
Sets the BeanContext for this BeanContextChildSupport.
Specified by:
setBeanContext in interface BeanContextChild
Parameters:
bc - the new value to be assigned to the BeanContext property
Throws:
PropertyVetoException - if the change is rejected

getBeanContext

public BeanContext getBeanContext()
Gets the nesting BeanContext for this BeanContextChildSupport.
Specified by:
getBeanContext in interface BeanContextChild
Returns:
the nesting BeanContext for this BeanContextChildSupport.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
Adds a property change listener.
Specified by:
addPropertyChangeListener in interface BeanContextChild
Parameters:
name - The name of the property to listen on
pcl - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
Remove a property change listener.
Specified by:
removePropertyChangeListener in interface BeanContextChild
Parameters:
name - The name of the property that was listened on
pcl - The PropertyChangeListener to be removed

addVetoableChangeListener

public void addVetoableChangeListener(String name,
                                      VetoableChangeListener vcl)
Adds a VetoableChangeListener.
Specified by:
addVetoableChangeListener in interface BeanContextChild
Parameters:
name - The name of the property to listen on
vcl - The VetoableChangeListener to be added

removeVetoableChangeListener

public void removeVetoableChangeListener(String name,
                                         VetoableChangeListener vcl)
Removes a VetoableChangeListener.
Specified by:
removeVetoableChangeListener in interface BeanContextChild
Parameters:
name - The name of the property that was listened on
vcl - The VetoableChangeListener to be removed

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
A service provided by the nesting BeanContext has been revoked. Subclasses may override this method in order to implement their own behaviors.
Specified by:
serviceRevoked in interface BeanContextServiceRevokedListener
Parameters:
bcsre - The BeanContextServiceRevokedEvent fired as a result of a service being revoked

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
A new service is available from the nesting BeanContext. Subclasses may override this method in order to implement their own behaviors
Specified by:
serviceAvailable in interface BeanContextServicesListener
Parameters:
bcsae - The BeanContextServiceAvailableEvent fired as a result of a service becoming available

getBeanContextChildPeer

public BeanContextChild getBeanContextChildPeer()
Gets the BeanContextChild associated with this BeanContextChildSupport.
Returns:
the BeanContextChild peer of this class

isDelegated

public boolean isDelegated()
Reports whether or not this class is a delegate of another.
Returns:
true if this class is a delegate of another

firePropertyChange

public void firePropertyChange(String name,
                               Object oldValue,
                               Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
Parameters:
name - The programmatic name of the property that was changed
oldValue - The old value of the property
newValue - The new value of the property

fireVetoableChange

public void fireVetoableChange(String name,
                               Object oldValue,
                               Object newValue)
                        throws PropertyVetoException
Report a vetoable property update to any registered listeners. If anyone vetos the change, then fire a new event reverting everyone to the old value and then rethrow the PropertyVetoException.

No event is fired if old and new are equal and non-null.

Parameters:
name - The programmatic name of the property that is about to change
oldValue - The old value of the property
newValue - - The new value of the property
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

validatePendingSetBeanContext

public boolean validatePendingSetBeanContext(BeanContext newValue)
Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value. Returning false will cause setBeanContext to throw PropertyVetoException.
Parameters:
newValue - the new value that has been requested for the BeanContext property
Returns:
true if the change operation is to be vetoed

releaseBeanContextResources

protected void releaseBeanContextResources()
This method may be overridden by subclasses to provide their own release behaviors. When invoked any resources held by this instance obtained from its current BeanContext property should be released since the object is no longer nested within that BeanContext.

initializeBeanContextResources

protected void initializeBeanContextResources()
This method may be overridden by subclasses to provide their own initialization behaviors. When invoked any resources requried by the BeanContextChild should be obtained from the current BeanContext.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BeanContextContainerProxy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextContainerProxy

public interface BeanContextContainerProxy

This interface is implemented by BeanContexts' that have an AWT Container associated with them.

Since:
1.2

Method Summary
 Container getContainer()
Gets the java.awt.Container associated with this BeanContext.

Method Detail

getContainer

public Container getContainer()
Gets the java.awt.Container associated with this BeanContext.
Returns:
the java.awt.Container associated with this BeanContext.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.beancontext.BeanContextEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanContextMembershipEvent, BeanContextServiceAvailableEvent, BeanContextServiceRevokedEvent
public abstract class BeanContextEvent
extends EventObject

BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext. This class introduces a mechanism to allow the propagation of BeanContextEvent subclasses through a heirarchy of BeanContexts. The setPropagatedFrom() and getPropagatedFrom() methods allow a BeanContext to identify itself as the source of a propagated event.

Since:
1.2
See Also:
BeanContext, Serialized Form

Field Summary
protected  BeanContext propagatedFrom
The BeanContext from which this event was propagated
Fields inherited from class java.util.EventObject
source
Constructor Summary
protected BeanContextEvent(BeanContext bc)
Contruct a BeanContextEvent
Method Summary
BeanContext | getBeanContext() Gets the BeanContext associated with this event.
BeanContext | getPropagatedFrom() Gets the BeanContext from which this event was propagated.
boolean | isPropagated() Reports whether or not this event is propagated from some other BeanContext.
void | setPropagatedFrom(BeanContext bc) Sets the BeanContext from which this event was propagated.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

propagatedFrom

protected BeanContext propagatedFrom
The BeanContext from which this event was propagated
Constructor Detail

BeanContextEvent

protected BeanContextEvent(BeanContext bc)
Contruct a BeanContextEvent
Parameters:
bc - The BeanContext source
Method Detail

getBeanContext

public BeanContext getBeanContext()
Gets the BeanContext associated with this event.
Returns:
the BeanContext associated with this event.

setPropagatedFrom

public void setPropagatedFrom(BeanContext bc)
Sets the BeanContext from which this event was propagated.
Parameters:
bc - the BeanContext from which this event was propagated

getPropagatedFrom

public BeanContext getPropagatedFrom()
Gets the BeanContext from which this event was propagated.
Parameters:
bc - The BeanContext that last propagated this BeanContextEvent
Returns:
the BeanContext from which this event was propagated

isPropagated

public boolean isPropagated()
Reports whether or not this event is propagated from some other BeanContext.
Returns:
true if propagated, false if not
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextMembershipEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextMembershipEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.beancontext.BeanContextEvent
              |
              +--java.beans.beancontext.BeanContextMembershipEvent
All Implemented Interfaces:
Serializable
public class BeanContextMembershipEvent
extends BeanContextEvent

A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext. An instance of this event is fired whenever a successful add(), remove(), retainAll(), removeAll(), or clear() is invoked on a given BeanContext instance. Objects interested in receiving events of this type must implement the BeanContextMembershipListener interface, and must register their intent via the BeanContext's addBeanContextMembershipListener(BeanContextMembershipListener bcml) method.

Since:
1.2
See Also:
BeanContext, BeanContextEvent, BeanContextMembershipListener, Serialized Form

Field Summary
protected  Collection children
The list of children affected by this event notification.
Fields inherited from class java.beans.beancontext.BeanContextEvent
propagatedFrom
Fields inherited from class java.util.EventObject
source
Constructor Summary
BeanContextMembershipEvent(BeanContext bc, Collection changes)
Contruct a BeanContextMembershipEvent
BeanContextMembershipEvent(BeanContext bc, Object[] changes)
Contruct a BeanContextMembershipEvent
Method Summary
boolean | contains(Object child) Is the child specified affected by the event?
Iterator | iterator() Gets the array of children affected by this event.
int | size() Gets the number of children affected by the notification.
Object[] | toArray() Gets the array of children affected by this event.
Methods inherited from class java.beans.beancontext.BeanContextEvent
getBeanContext, getPropagatedFrom, isPropagated, setPropagatedFrom
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

children

protected Collection children
The list of children affected by this event notification.
Constructor Detail

BeanContextMembershipEvent

public BeanContextMembershipEvent(BeanContext bc,
                                  Collection changes)
Contruct a BeanContextMembershipEvent
Parameters:
bc - The BeanContext source
changes - The Children affected

BeanContextMembershipEvent

public BeanContextMembershipEvent(BeanContext bc,
                                  Object[] changes)
Contruct a BeanContextMembershipEvent
Parameters:
bc - The BeanContext source
changes - The Children effected
Throws:
NullPointerException - if changes associated with this event are null.
Method Detail

size

public int size()
Gets the number of children affected by the notification.
Returns:
the number of children affected by the notification

contains

public boolean contains(Object child)
Is the child specified affected by the event?
Returns:
true if affected, false if not

toArray

public Object[] toArray()
Gets the array of children affected by this event.
Returns:
the array of children affected

iterator

public Iterator iterator()
Gets the array of children affected by this event.
Returns:
the array of children effected
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextMembershipListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextMembershipListener

All Superinterfaces:
EventListener
public interface BeanContextMembershipListener
extends EventListener

Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.

Since:
1.2
See Also:
BeanContext

Method Summary
void | childrenAdded(BeanContextMembershipEvent bcme) Called when a child or list of children is added to a BeanContext that this listener is registered with.
void | childrenRemoved(BeanContextMembershipEvent bcme) Called when a child or list of children is removed from a BeanContext that this listener is registered with.

Method Detail

childrenAdded

public void childrenAdded(BeanContextMembershipEvent bcme)
Called when a child or list of children is added to a BeanContext that this listener is registered with.
Parameters:
bcme - The BeanContextMembershipEvent describing the change that occurred.

childrenRemoved

public void childrenRemoved(BeanContextMembershipEvent bcme)
Called when a child or list of children is removed from a BeanContext that this listener is registered with.
Parameters:
bcme - The BeanContextMembershipEvent describing the change that occurred.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextProxy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextProxy

public interface BeanContextProxy

This interface is implemented by a JavaBean that does not directly have a BeanContext(Child) associated with it (via implementing that interface or a subinterface thereof), but has a public BeanContext(Child) delegated from it. For example, a subclass of java.awt.Container may have a BeanContext associated with it that all Component children of that Container shall be contained within.

An Object may not implement this interface and the BeanContextChild interface (or any subinterfaces thereof) they are mutually exclusive.

Callers of this interface shall examine the return type in order to
obtain a particular subinterface of BeanContextChild as follows:

BeanContextChild bcc = o.getBeanContextProxy();

if (bcc instanceof BeanContext) {
    // ...
}

or

BeanContextChild bcc = o.getBeanContextProxy();
BeanContext      bc  = null;

try {
    bc = (BeanContext)bcc;
} catch (ClassCastException cce) {
    // cast failed, bcc is not an instanceof BeanContext
}

The return value is a constant for the lifetime of the implementing instance

Since:
1.2

Method Summary
 BeanContextChild getBeanContextProxy()
Gets the BeanContextChild (or subinterface) associated with this object.

Method Detail

getBeanContextProxy

public BeanContextChild getBeanContextProxy()
Gets the BeanContextChild (or subinterface) associated with this object.
Returns:
the BeanContextChild (or subinterface) associated with this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServiceAvailableEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServiceAvailableEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.beancontext.BeanContextEvent
              |
              +--java.beans.beancontext.BeanContextServiceAvailableEvent
All Implemented Interfaces:
Serializable
public class BeanContextServiceAvailableEvent
extends BeanContextEvent

This event type is used by the BeanContextServicesListener in order to identify the service being registered.

See Also:
Serialized Form

Field Summary
protected  Class serviceClass
A Class reference to the newly available service
Fields inherited from class java.beans.beancontext.BeanContextEvent
propagatedFrom
Fields inherited from class java.util.EventObject
source
Constructor Summary
BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc)
Construct a BeanContextAvailableServiceEvent.
Method Summary
Iterator | getCurrentServiceSelectors() Gets the list of service dependent selectors.
Class | getServiceClass() Gets the service class that is the subject of this notification.
BeanContextServices | getSourceAsBeanContextServices() Gets the source as a reference of type BeanContextServices.
Methods inherited from class java.beans.beancontext.BeanContextEvent
getBeanContext, getPropagatedFrom, isPropagated, setPropagatedFrom
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

serviceClass

protected Class serviceClass
A Class reference to the newly available service
Constructor Detail

BeanContextServiceAvailableEvent

public BeanContextServiceAvailableEvent(BeanContextServices bcs,
                                        Class sc)
Construct a BeanContextAvailableServiceEvent.
Parameters:
bcs - The context in which the service has become available
sc - A Class reference to the newly available service
Method Detail

getSourceAsBeanContextServices

public BeanContextServices getSourceAsBeanContextServices()
Gets the source as a reference of type BeanContextServices.
Returns:
The context in which the service has become available

getServiceClass

public Class getServiceClass()
Gets the service class that is the subject of this notification.
Returns:
A Class reference to the newly available service

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors()
Gets the list of service dependent selectors.
Returns:
the current selectors available from the service
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServiceProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextServiceProvider

All Known Implementing Classes:
BeanContextServicesSupport.BCSSProxyServiceProvider
public interface BeanContextServiceProvider

One of the primary functions of a BeanContext is to act a as rendezvous between JavaBeans, and BeanContextServiceProviders.

A JavaBean nested within a BeanContext, may ask that BeanContext to provide an instance of a "service", based upon a reference to a Java Class object that represents that service.

If such a service has been registered with the context, or one of its nesting context's, in the case where a context delegate to its context to satisfy a service request, then the BeanContextServiceProvider associated with the service is asked to provide an instance of that service.

The ServcieProvider may always return the same instance, or it may construct a new instance for each request.

Method Summary
Iterator | getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) Invoked by BeanContextServices, this method gets the current service selectors for the specified service.
Object | getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
void | releaseService(BeanContextServices bcs, Object requestor, Object service) Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.

Method Detail

getService

public Object getService(BeanContextServices bcs,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector)
Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
Parameters:
bcs - The BeanContextServices associated with this particular request. This parameter enables the BeanContextServiceProvider to distinguish service requests from multiple sources.
requestor - The object requesting the service
serviceClass - The service requested
serviceSelector - the service dependent parameter for a particular service, or null if not applicable.
Returns:
a reference to the requested service

releaseService

public void releaseService(BeanContextServices bcs,
                           Object requestor,
                           Object service)
Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
Parameters:
bcs - the BeanContextServices associated with this particular release request
requestor - the object requesting the service to be released
service - the service that is to be released

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
                                           Class serviceClass)
Invoked by BeanContextServices, this method gets the current service selectors for the specified service. A service selector is a service specific parameter, typical examples of which could include: a parameter to a constructor for the service implementation class, a value for a particular service's property, or a key into a map of existing implementations.
Parameters:
bcs - the BeanContextServices for this request
service - the specified service
Returns:
the current service selectors for the specified serviceClass
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServiceProviderBeanInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextServiceProviderBeanInfo

All Superinterfaces:
BeanInfo
public interface BeanContextServiceProviderBeanInfo
extends BeanInfo

A BeanContextServiceProvider implementor who wishes to provide explicit information about the services their bean may provide shall implement a BeanInfo class that implements this BeanInfo subinterface and provides explicit information about the methods, properties, events, etc, of their services.

Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
Method Summary
 BeanInfo[] getServicesBeanInfo()
Gets a BeanInfo array, one for each service class or interface statically available from this ServiceProvider.
Methods inherited from interface java.beans.BeanInfo
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors

Method Detail

getServicesBeanInfo

public BeanInfo[] getServicesBeanInfo()
Gets a BeanInfo array, one for each service class or interface statically available from this ServiceProvider.
Returns:
the BeanInfo array
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServiceRevokedEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServiceRevokedEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.beancontext.BeanContextEvent
              |
              +--java.beans.beancontext.BeanContextServiceRevokedEvent
All Implemented Interfaces:
Serializable
public class BeanContextServiceRevokedEvent
extends BeanContextEvent

This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.

See Also:
Serialized Form

Field Summary
protected  Class serviceClass
A Class reference to the service that is being revoked.
Fields inherited from class java.beans.beancontext.BeanContextEvent
propagatedFrom
Fields inherited from class java.util.EventObject
source
Constructor Summary
BeanContextServiceRevokedEvent(BeanContextServices bcs, Class sc, boolean invalidate)
Construct a BeanContextServiceEvent.
Method Summary
Class | getServiceClass() Gets the service class that is the subject of this notification
BeanContextServices | getSourceAsBeanContextServices() Gets the source as a reference of type BeanContextServices
boolean | isCurrentServiceInvalidNow() Reports if the current service is being forcibly revoked, in which case the references are now invalidated and unusable.
boolean | isServiceClass(Class service) Checks this event to determine whether or not the service being revoked is of a particular class.
Methods inherited from class java.beans.beancontext.BeanContextEvent
getBeanContext, getPropagatedFrom, isPropagated, setPropagatedFrom
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

serviceClass

protected Class serviceClass
A Class reference to the service that is being revoked.
Constructor Detail

BeanContextServiceRevokedEvent

public BeanContextServiceRevokedEvent(BeanContextServices bcs,
                                      Class sc,
                                      boolean invalidate)
Construct a BeanContextServiceEvent.
Parameters:
bcs - the BeanContextServices from which this service is being revoked
sc - the service that is being revoked
invalidate - true for immediate revocation
Method Detail

getSourceAsBeanContextServices

public BeanContextServices getSourceAsBeanContextServices()
Gets the source as a reference of type BeanContextServices
Returns:
the BeanContextServices from which this service is being revoked

getServiceClass

public Class getServiceClass()
Gets the service class that is the subject of this notification
Returns:
A Class reference to the service that is being revoked

isServiceClass

public boolean isServiceClass(Class service)
Checks this event to determine whether or not the service being revoked is of a particular class.
Parameters:
service - the service of interest
Returns:
true if the service being revoked is of the same class as the specified service

isCurrentServiceInvalidNow

public boolean isCurrentServiceInvalidNow()
Reports if the current service is being forcibly revoked, in which case the references are now invalidated and unusable.
Returns:
true if current service is being forcibly revoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServiceRevokedListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextServiceRevokedListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
BeanContextServices, BeanContextServicesListener
All Known Implementing Classes:
BeanContextServicesSupport.BCSSProxyServiceProvider
public interface BeanContextServiceRevokedListener
extends EventListener

The listener interface for receiving BeanContextServiceRevokedEvent objects. A class that is interested in processing a BeanContextServiceRevokedEvent implements this interface.

Method Summary
 void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
The service named has been revoked.

Method Detail

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
The service named has been revoked. getService requests for this service will no longer be satisifed.
Parameters:
bcsre - the BeanContextServiceRevokedEvent received by this listener.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServices

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextServices

All Superinterfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Collection, DesignMode, EventListener, Visibility
All Known Implementing Classes:
BeanContextServicesSupport
public interface BeanContextServices
extends BeanContext, BeanContextServicesListener

The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
Method Summary
 void addBeanContextServicesListener(BeanContextServicesListener bcsl)
Adds a BeanContextServicesListener to this BeanContext
 boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider)
Adds a service to this BeanContext.
 Iterator getCurrentServiceClasses()
Gets the currently available services for this context.
 Iterator getCurrentServiceSelectors(Class serviceClass)
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.
 Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
 boolean hasService(Class serviceClass)
Reports whether or not a given service is currently available from this context.
 void releaseService(BeanContextChild child, Object requestor, Object service)
Releases a BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service by calling releaseService() on the underlying BeanContextServiceProvider.
 void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
Removes a BeanContextServicesListener from this BeanContext
 void revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method.
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui
Methods inherited from interface java.beans.beancontext.BeanContextServicesListener
serviceAvailable
Methods inherited from interface java.beans.beancontext.BeanContextServiceRevokedListener
serviceRevoked

Method Detail

addService

public boolean addService(Class serviceClass,
                          BeanContextServiceProvider serviceProvider)
Adds a service to this BeanContext. BeanContextServiceProviders call this method to register a particular service with this context. If the service has not previously been added, the BeanContextServices associates the service with the BeanContextServiceProvider and fires a BeanContextServiceAvailableEvent to all currently registered BeanContextServicesListeners. The method then returns true, indicating that the addition of the service was successful. If the given service has already been added, this method simply returns false.
Parameters:
serviceClass - the service to add
serviceProvider - the BeanContextServiceProvider associated with the service

revokeService

public void revokeService(Class serviceClass,
                          BeanContextServiceProvider serviceProvider,
                          boolean revokeCurrentServicesNow)
BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method. Upon revocation of the service, the BeanContextServices fires a BeanContextServiceRevokedEvent to its list of currently registered BeanContextServiceRevokedListeners and BeanContextServicesListeners.
Parameters:
serviceClass - the service to revoke from this BeanContextServices
serviceProvider - the BeanContextServiceProvider associated with this particular service that is being revoked
revokeCurrentServicesNow - a value of true indicates an exceptional circumstance where the BeanContextServiceProvider or BeanContextServices wishes to immediately terminate service to all currently outstanding references to the specified service.

hasService

public boolean hasService(Class serviceClass)
Reports whether or not a given service is currently available from this context.
Parameters:
serviceClass - the service in question
Returns:
true if the service is available

getService

public Object getService(BeanContextChild child,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector,
                         BeanContextServiceRevokedListener bcsrl)
                  throws TooManyListenersException
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method. When invoked, this method gets the service by calling the getService() method on the underlying BeanContextServiceProvider.
Parameters:
child - the BeanContextChild associated with this request
requestor - the object requesting the service
serviceClass - class of the requested service
serviceSelector - the service dependent parameter
bcsrl - the BeanContextServiceRevokedListener to notify if the service should later become revoked
Returns:
a reference to this context's named Service as requested or null
Throws:
TooManyListenersException -

releaseService

public void releaseService(BeanContextChild child,
                           Object requestor,
                           Object service)
Releases a BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service by calling releaseService() on the underlying BeanContextServiceProvider.
Parameters:
child - the BeanContextChild
requestor - the requestor
service - the service

getCurrentServiceClasses

public Iterator getCurrentServiceClasses()
Gets the currently available services for this context.
Returns:
an Iterator consisting of the currently available services

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(Class serviceClass)
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.
Parameters:
serviceClass - the specified service
Returns:
the currently available service selectors for the named serviceClass

addBeanContextServicesListener

public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
Adds a BeanContextServicesListener to this BeanContext
Parameters:
bcsl - the BeanContextServicesListener to add

removeBeanContextServicesListener

public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
Removes a BeanContextServicesListener from this BeanContext
Parameters:
bcsl - the BeanContextServicesListener to remove from this context
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextServicesListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Interface BeanContextServicesListener

All Superinterfaces:
BeanContextServiceRevokedListener, EventListener
All Known Subinterfaces:
BeanContextServices
All Known Implementing Classes:
BeanContextChildSupport
public interface BeanContextServicesListener
extends BeanContextServiceRevokedListener

The listener interface for receiving BeanContextServiceAvailableEvent objects. A class that is interested in processing a BeanContextServiceAvailableEvent implements this interface.

Method Summary
 void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
The service named has been registered.
Methods inherited from interface java.beans.beancontext.BeanContextServiceRevokedListener
serviceRevoked

Method Detail

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
The service named has been registered. getService requests for this service may now be made.
Parameters:
bcsae - the BeanContextServiceAvailableEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BeanContextServicesSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextServicesSupport

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
              |
              +--java.beans.beancontext.BeanContextServicesSupport
All Implemented Interfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServices, BeanContextServicesListener, Collection, DesignMode, EventListener, PropertyChangeListener, Serializable, VetoableChangeListener, Visibility
public class BeanContextServicesSupport
extends BeanContextSupport
implements BeanContextServices

This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.

Since this class directly implements the BeanContextServices interface, the class can, and is intended to be used either by subclassing this implementation, or via delegation of an instance of this class from another through the BeanContextProxy interface.

Since:
1.2
See Also:
Serialized Form

Inner Class Summary
protected class | BeanContextServicesSupport.BCSSChild
protected class | BeanContextServicesSupport.BCSSProxyServiceProvider
protected static class | BeanContextServicesSupport.BCSSServiceProvider subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
Inner classes inherited from class java.beans.beancontext.BeanContextSupport
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator
Field Summary
protected ArrayList | bcsListeners List of BeanContextServicesListener objects.
protected BeanContextServicesSupport.BCSSProxyServiceProvider | proxy Delegate for the BeanContextServiceProvider.
protected int | serializable The number of instances of a serializable BeanContextServceProvider.
protected HashMap | services all accesses to the protected transient HashMap services field should be synchronized on that object
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
Constructor Summary
BeanContextServicesSupport()
Create an instance that is not a delegate of another object
BeanContextServicesSupport(BeanContextServices peer)
Create an instance with a peer
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
Create an instance using the specified locale
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextServicesSupport instance
Method Summary
 void addBeanContextServicesListener(BeanContextServicesListener bcsl)
add a BeanContextServicesListener
 boolean addService(Class serviceClass, BeanContextServiceProvider bcsp)
add a service
protected  boolean addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
add a service
protected  void bcsPreDeserializationHook(ObjectInputStream ois)
called from BeanContextSupport readObject before it deserializes the children ...
protected  void bcsPreSerializationHook(ObjectOutputStream oos)
called from BeanContextSupport writeObject before it serializes the children ...
protected  void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
called from superclass child removal operations after a child has been successfully removed.
protected  BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
protected  BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.
protected  void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
Fires a BeanContextServiceAvailableEvent indicating that a new service has become available.
protected  void fireServiceAdded(Class serviceClass)
Fires a BeanContextServiceEvent notifying of a new service.
protected  void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
Fires a BeanContextServiceEvent notifying of a service being revoked.
protected  void fireServiceRevoked(Class serviceClass, boolean revokeNow)
Fires a BeanContextServiceRevokedEvent indicating that a particular service is no longer available.
 BeanContextServices getBeanContextServicesPeer()
Gets the BeanContextServices associated with this BeanContextServicesSupport.
protected static BeanContextServicesListener getChildBeanContextServicesListener(Object child)
Gets the BeanContextServicesListener (if any) of the specified child.
 Iterator getCurrentServiceClasses()
Gets the currently available services for this context.
 Iterator getCurrentServiceSelectors(Class serviceClass)
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.
 Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
obtain a service which may be delegated
 boolean hasService(Class serviceClass)
has a service, which may be delegated
 void initialize()
called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state.
protected  void initializeBeanContextResources()
called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext.
protected  void releaseBeanContextResources()
called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext.
 void releaseService(BeanContextChild child, Object requestor, Object service)
release a service
 void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
remove a BeanContextServicesListener
 void revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
remove a service
 void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
 void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
Methods inherited from class java.beans.beancontext.BeanContextSupport
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui

Field Detail

services

protected transient HashMap services
all accesses to the protected transient HashMap services field should be synchronized on that object

serializable

protected transient int serializable
The number of instances of a serializable BeanContextServceProvider.

proxy

protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy
Delegate for the BeanContextServiceProvider.

bcsListeners

protected transient ArrayList bcsListeners
List of BeanContextServicesListener objects.
Constructor Detail

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dTime,
                                  boolean visible)

Construct a BeanContextServicesSupport instance

Parameters:
peer - The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle - The current Locale for this BeanContext.
dtime - The initial state, true if in design mode, false if runtime.
visible - The initial visibility.

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dtime)
Create an instance using the specified Locale and design mode.
Parameters:
peer - The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle - The current Locale for this BeanContext.
dtime - The initial state, true if in design mode, false if runtime.

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle)
Create an instance using the specified locale
Parameters:
peer - The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle - The current Locale for this BeanContext.

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer)
Create an instance with a peer
Parameters:
peer - The peer BeanContext we are supplying an implementation for, if null the this object is its own peer

BeanContextServicesSupport

public BeanContextServicesSupport()
Create an instance that is not a delegate of another object
Method Detail

initialize

public void initialize()
called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state. subclasses may envelope this method, but should not override it or call it directly.
Overrides:
initialize in class BeanContextSupport

getBeanContextServicesPeer

public BeanContextServices getBeanContextServicesPeer()
Gets the BeanContextServices associated with this BeanContextServicesSupport.
Returns:
the instance of BeanContext this object is providing the implementation for.

createBCSChild

protected BeanContextSupport.BCSChild createBCSChild(Object targetChild,
                                                     Object peer)

Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.

Overrides:
createBCSChild in class BeanContextSupport
Parameters:
targetChild - the child to create the Child on behalf of
peer - the peer if the targetChild and peer are related by BeanContextProxy

createBCSSServiceProvider

protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc,
                                                                                BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.

addBeanContextServicesListener

public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
add a BeanContextServicesListener
Specified by:
addBeanContextServicesListener in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
bcsl - the BeanContextServicesListener to add

removeBeanContextServicesListener

public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
remove a BeanContextServicesListener
Specified by:
removeBeanContextServicesListener in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
bcsl - the BeanContextServicesListener to remove from this context

addService

public boolean addService(Class serviceClass,
                          BeanContextServiceProvider bcsp)
add a service
Specified by:
addService in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
serviceClass - the service to add
serviceProvider - the BeanContextServiceProvider associated with the service

addService

protected boolean addService(Class serviceClass,
                             BeanContextServiceProvider bcsp,
                             boolean fireEvent)
add a service

revokeService

public void revokeService(Class serviceClass,
                          BeanContextServiceProvider bcsp,
                          boolean revokeCurrentServicesNow)
remove a service
Specified by:
revokeService in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
serviceClass - the service to revoke from this BeanContextServices
serviceProvider - the BeanContextServiceProvider associated with this particular service that is being revoked
revokeCurrentServicesNow - a value of true indicates an exceptional circumstance where the BeanContextServiceProvider or BeanContextServices wishes to immediately terminate service to all currently outstanding references to the specified service.

hasService

public boolean hasService(Class serviceClass)
has a service, which may be delegated
Specified by:
hasService in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
serviceClass - the service in question
Returns:
true if the service is available

getService

public Object getService(BeanContextChild child,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector,
                         BeanContextServiceRevokedListener bcsrl)
                  throws TooManyListenersException
obtain a service which may be delegated
Specified by:
getService in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
child - the BeanContextChild associated with this request
requestor - the object requesting the service
serviceClass - class of the requested service
serviceSelector - the service dependent parameter
bcsrl - the BeanContextServiceRevokedListener to notify if the service should later become revoked
Returns:
a reference to this context's named Service as requested or null
Throws:
TooManyListenersException -

releaseService

public void releaseService(BeanContextChild child,
                           Object requestor,
                           Object service)
release a service
Specified by:
releaseService in interface BeanContextServices
Following copied from interface: java.beans.beancontext.BeanContextServices
Parameters:
child - the BeanContextChild
requestor - the requestor
service - the service

getCurrentServiceClasses

public Iterator getCurrentServiceClasses()
Description copied from interface: BeanContextServices
Gets the currently available services for this context.
Specified by:
getCurrentServiceClasses in interface BeanContextServices
Returns:
an iterator for all the currently registered service classes.

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(Class serviceClass)
Description copied from interface: BeanContextServices
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.
Specified by:
getCurrentServiceSelectors in interface BeanContextServices
Returns:
an iterator for all the currently available service selectors (if any) available for the specified service.

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself. subclasses may override or envelope this method to implement their own propagation semantics.
Specified by:
serviceAvailable in interface BeanContextServicesListener
Overrides:
serviceAvailable in class BeanContextChildSupport
Following copied from interface: java.beans.beancontext.BeanContextServicesListener
Parameters:
bcsae - the BeanContextServiceAvailableEvent

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself. subclasses may override or envelope this method to implement their own propagation semantics.
Specified by:
serviceRevoked in interface BeanContextServiceRevokedListener
Overrides:
serviceRevoked in class BeanContextChildSupport
Following copied from interface: java.beans.beancontext.BeanContextServiceRevokedListener
Parameters:
bcsre - the BeanContextServiceRevokedEvent received by this listener.

getChildBeanContextServicesListener

protected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
Gets the BeanContextServicesListener (if any) of the specified child.
Parameters:
child - the specified child
Returns:
the BeanContextServicesListener (if any) of the specified child

childJustRemovedHook

protected void childJustRemovedHook(Object child,
                                    BeanContextSupport.BCSChild bcsc)
called from superclass child removal operations after a child has been successfully removed. called with child synchronized. This subclass uses this hook to immediately revoke any services being used by this child if it is a BeanContextChild. subclasses may envelope this method in order to implement their own child removal side-effects.
Overrides:
childJustRemovedHook in class BeanContextSupport

releaseBeanContextResources

protected void releaseBeanContextResources()
called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext. This method revokes any services obtained from its parent. subclasses may envelope this method to implement their own semantics.
Overrides:
releaseBeanContextResources in class BeanContextChildSupport

initializeBeanContextResources

protected void initializeBeanContextResources()
called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext. subclasses may envelope this method to implement their own semantics.
Overrides:
initializeBeanContextResources in class BeanContextChildSupport

fireServiceAdded

protected final void fireServiceAdded(Class serviceClass)
Fires a BeanContextServiceEvent notifying of a new service.

fireServiceAdded

protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
Fires a BeanContextServiceAvailableEvent indicating that a new service has become available.
Parameters:
bcssae - the BeanContextServiceAvailableEvent

fireServiceRevoked

protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
Fires a BeanContextServiceEvent notifying of a service being revoked.
Parameters:
bcsre - the BeanContextServiceRevokedEvent

fireServiceRevoked

protected final void fireServiceRevoked(Class serviceClass,
                                        boolean revokeNow)
Fires a BeanContextServiceRevokedEvent indicating that a particular service is no longer available.

bcsPreSerializationHook

protected void bcsPreSerializationHook(ObjectOutputStream oos)
                                throws IOException
called from BeanContextSupport writeObject before it serializes the children ... This class will serialize any Serializable BeanContextServiceProviders herein. subclasses may envelope this method to insert their own serialization processing that has to occur prior to serialization of the children
Overrides:
bcsPreSerializationHook in class BeanContextSupport

bcsPreDeserializationHook

protected void bcsPreDeserializationHook(ObjectInputStream ois)
                                  throws IOException,
                                         ClassNotFoundException
called from BeanContextSupport readObject before it deserializes the children ... This class will deserialize any Serializable BeanContextServiceProviders serialized earlier thus making them available to the children when they deserialized. subclasses may envelope this method to insert their own serialization processing that has to occur prior to serialization of the children
Overrides:
bcsPreDeserializationHook in class BeanContextSupport
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BeanContextSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans.beancontext
Class BeanContextSupport

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
All Implemented Interfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Collection, DesignMode, EventListener, PropertyChangeListener, Serializable, VetoableChangeListener, Visibility
Direct Known Subclasses:
BeanContextServicesSupport
public class BeanContextSupport
extends BeanContextChildSupport
implements BeanContext, Serializable, PropertyChangeListener, VetoableChangeListener

This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Since this class directly implements the BeanContext interface, the class can, and is intended to be used either by subclassing this implementation, or via ad-hoc delegation of an instance of this class from another.

Since:
1.2
See Also:
Serialized Form

Inner Class Summary
protected class | BeanContextSupport.BCSChild
protected static class | BeanContextSupport.BCSIterator protected final subclass that encapsulates an iterator but implements a noop remove() method.
Field Summary
protected ArrayList | bcmListeners all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
protected HashMap | children all accesses to the protected HashMap children field shall be synchronized on that object.
protected boolean | designTime A boolean indicating whether or not this object is currently in design time mode.
protected Locale | locale The current locale of this BeanContext.
protected boolean | okToUseGui A boolean indicating if this instance may now render a GUI.
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
Constructor Summary
BeanContextSupport()
Create an instance that is not a delegate of another object
BeanContextSupport(BeanContext peer)
Create an instance using with a default locale
BeanContextSupport(BeanContext peer, Locale lcle)
Create an instance using the specified locale
BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextSupport instance
Method Summary
 boolean add(Object targetChild)
Adds/nests a child within this BeanContext.
 boolean addAll(Collection c)
add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
 void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
Adds a BeanContextMembershipListener
 boolean avoidingGui()
Used to determine if the BeanContext child is avoiding using its GUI.
protected  Iterator bcsChildren()
Returns an iterator of all children of this BeanContext.
protected  void bcsPreDeserializationHook(ObjectInputStream ois)
called by readObject after defaultReadObject() but prior to deserialization of any children.
protected  void bcsPreSerializationHook(ObjectOutputStream oos)
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
protected  void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
Called by readObject with the newly deserialized child and BCSChild.
protected  void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
protected  void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
protected static boolean classEquals(Class first, Class second)
Tests to see if two class objects, or their names are equal.
 void clear()
clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
 boolean contains(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
 boolean containsAll(Collection c)
Tests to see if all objects in the specified Collection are children of this BeanContext.
 boolean containsKey(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
protected  Object[] copyChildren()
Gets a copy of the this BeanContext's children.
protected  BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
protected  void deserialize(ObjectInputStream ois, Collection coll)
used by readObject to deserialize a collection.
 void dontUseGui()
notify this instance that it may no longer render a GUI.
protected  void fireChildrenAdded(BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
protected  void fireChildrenRemoved(BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
 BeanContext getBeanContextPeer()
Gets the instance of BeanContext that this object is providing the implementation for.
protected static BeanContextChild getChildBeanContextChild(Object child)
Gets the BeanContextChild (if any) of the specified child
protected static BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
Gets the BeanContextMembershipListener (if any) of the specified child
protected static PropertyChangeListener getChildPropertyChangeListener(Object child)
Gets the PropertyChangeListener (if any) of the specified child
protected static Serializable getChildSerializable(Object child)
Gets the Serializable (if any) associated with the specified Child
protected static VetoableChangeListener getChildVetoableChangeListener(Object child)
Gets the VetoableChangeListener (if any) of the specified child
protected static Visibility getChildVisibility(Object child)
Gets the Component (if any) associated with the specified child.
 Locale getLocale()
Gets the locale for this BeanContext.
 URL getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 InputStream getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
protected  void initialize()
protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.
 Object instantiateChild(String beanName)
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
 boolean isDesignTime()
Reports whether or not this object is in currently in design time mode.
 boolean isEmpty()
Reports whether or not this BeanContext is empty.
 boolean isSerializing()
Is this BeanContext in the process of being serialized?
 Iterator iterator()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
 boolean needsGui()
This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
 void okToUseGui()
Notify this instance that it may now render a GUI
 void propertyChange(PropertyChangeEvent pce)
subclasses may envelope to monitor child property changes.
 void readChildren(ObjectInputStream ois)
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
 boolean remove(Object targetChild)
Removes a child from this BeanContext.
protected  boolean remove(Object targetChild, boolean callChildSetBC)
internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
 boolean removeAll(Collection c)
remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
 void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
Removes a BeanContextMembershipListener
 boolean retainAll(Collection c)
retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
protected  void serialize(ObjectOutputStream oos, Collection coll)
Used by writeObject to serialize a Collection.
 void setDesignTime(boolean dTime)
Sets the new design time value for this BeanContext.
 void setLocale(Locale newLocale)
Sets the locale of this BeanContext.
 int size()
Gets the number of children currently nested in this BeanContext.
 Object[] toArray()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
 Object[] toArray(Object[] arry)
Gets an array containing all children of this BeanContext that match the types contained in arry.
protected  boolean validatePendingAdd(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.
protected  boolean validatePendingRemove(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.
 void vetoableChange(PropertyChangeEvent pce)
subclasses may envelope to monitor veto child property changes.
 void writeChildren(ObjectOutputStream oos)
Used to serialize all children of this BeanContext.
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
Methods inherited from interface java.util.Collection
equals, hashCode

Field Detail

children

protected transient HashMap children
all accesses to the protected HashMap children field shall be synchronized on that object.

bcmListeners

protected transient ArrayList bcmListeners
all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.

locale

protected Locale locale
The current locale of this BeanContext.

okToUseGui

protected boolean okToUseGui
A boolean indicating if this instance may now render a GUI.

designTime

protected boolean designTime
A boolean indicating whether or not this object is currently in design time mode.
Constructor Detail

BeanContextSupport

public BeanContextSupport(BeanContext peer,
                          Locale lcle,
                          boolean dTime,
                          boolean visible)
Construct a BeanContextSupport instance
Parameters:
peer - The peer BeanContext we are supplying an implementation for, or null if this object is its own peer
lcle - The current Locale for this BeanContext. If lcle is null, the default locale is assigned to the BeanContext instance.
dtime - The initial state, true if in design mode, false if runtime.
visible - The initial visibility.
See Also:
Locale.getDefault(), Locale.setDefault(java.util.Locale)

BeanContextSupport

public BeanContextSupport(BeanContext peer,
                          Locale lcle,
                          boolean dtime)
Create an instance using the specified Locale and design mode.
Parameters:
peer - The peer BeanContext we are supplying an implementation for, or null if this object is its own peer
lcle - The current Locale for this BeanContext. If lcle is null, the default locale is assigned to the BeanContext instance.
dtime - The initial state, true if in design mode, false if runtime.
See Also:
Locale.getDefault(), Locale.setDefault(java.util.Locale)

BeanContextSupport

public BeanContextSupport(BeanContext peer,
                          Locale lcle)
Create an instance using the specified locale
Parameters:
peer - The peer BeanContext we are supplying an implementation for, or null if this object is its own peer
lcle - The current Locale for this BeanContext. If lcle is null, the default locale is assigned to the BeanContext instance.
See Also:
Locale.getDefault(), Locale.setDefault(java.util.Locale)

BeanContextSupport

public BeanContextSupport(BeanContext peer)
Create an instance using with a default locale
Parameters:
peer - The peer BeanContext we are supplying an implementation for, or null if this object is its own peer

BeanContextSupport

public BeanContextSupport()
Create an instance that is not a delegate of another object
Method Detail

getBeanContextPeer

public BeanContext getBeanContextPeer()
Gets the instance of BeanContext that this object is providing the implementation for.
Returns:
the BeanContext instance

instantiateChild

public Object instantiateChild(String beanName)
                        throws IOException,
                               ClassNotFoundException

The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.

The semantics of the beanName parameter are defined by java.beans.Beans.instantate.

Specified by:
instantiateChild in interface BeanContext
Parameters:
beanName - the name of the Bean to instantiate within this BeanContext
Returns:
the new object
Throws:
IOException - if there is an I/O error when the bean is being deserialized
ClassNotFoundException - if the class identified by the beanName parameter is not found

size

public int size()
Gets the number of children currently nested in this BeanContext.
Specified by:
size in interface Collection
Returns:
number of children

isEmpty

public boolean isEmpty()
Reports whether or not this BeanContext is empty. A BeanContext is considered empty when it contains zero nested children.
Specified by:
isEmpty in interface Collection
Returns:
if there are not children

contains

public boolean contains(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
Specified by:
contains in interface Collection
Parameters:
o - the Object in question
Returns:
if this object is a child

containsKey

public boolean containsKey(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
Parameters:
o - the Object in question
Returns:
if this object is a child

iterator

public Iterator iterator()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
Specified by:
iterator in interface Collection
Returns:
an Iterator of the nested children

toArray

public Object[] toArray()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
Specified by:
toArray in interface Collection
Following copied from interface: java.util.Collection
Returns:
an array containing all of the elements in this collection

toArray

public Object[] toArray(Object[] arry)
Gets an array containing all children of this BeanContext that match the types contained in arry.
Specified by:
toArray in interface Collection
Parameters:
arry - The array of object types that are of interest.
Returns:
an array of children

createBCSChild

protected BeanContextSupport.BCSChild createBCSChild(Object targetChild,
                                                     Object peer)

Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.

Parameters:
targetChild - the child to create the Child on behalf of
peer - the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy

add

public boolean add(Object targetChild)
Adds/nests a child within this BeanContext.

Invoked as a side effect of java.beans.Beans.instantiate().

Specified by:
add in interface Collection
Parameters:
targetChild - The child objects to nest within this BeanContext
Returns:
true if the child was added successfully.

remove

public boolean remove(Object targetChild)
Removes a child from this BeanContext.
Specified by:
remove in interface Collection
Parameters:
targetChild - The child objects to remove

remove

protected boolean remove(Object targetChild,
                         boolean callChildSetBC)
internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
Parameters:
targetChild - the JavaBean, BeanContext, or Object to be removed
callChildSetBC - used to indicate that the child should be notified that it is no longer nested in this BeanContext.

containsAll

public boolean containsAll(Collection c)
Tests to see if all objects in the specified Collection are children of this BeanContext.
Specified by:
containsAll in interface Collection
Parameters:
c - the specified Collection
Returns:
true if all objects in the collection are children of this BeanContext, false if not.

addAll

public boolean addAll(Collection c)
add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
Specified by:
addAll in interface Collection
Throws:
UnsupportedOperationException -

removeAll

public boolean removeAll(Collection c)
remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
Specified by:
removeAll in interface Collection
Throws:
UnsupportedOperationException -

retainAll

public boolean retainAll(Collection c)
retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
Specified by:
retainAll in interface Collection
Throws:
UnsupportedOperationException -

clear

public void clear()
clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
Specified by:
clear in interface Collection
Throws:
UnsupportedOperationException -

addBeanContextMembershipListener

public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
Adds a BeanContextMembershipListener
Specified by:
addBeanContextMembershipListener in interface BeanContext
Parameters:
bcml - the BeanContextMembershipListener to add

removeBeanContextMembershipListener

public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
Removes a BeanContextMembershipListener
Specified by:
removeBeanContextMembershipListener in interface BeanContext
Parameters:
bcml - the BeanContextMembershipListener to remove

getResourceAsStream

public InputStream getResourceAsStream(String name,
                                       BeanContextChild bcc)
Description copied from interface: BeanContext
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
Specified by:
getResourceAsStream in interface BeanContext
Parameters:
name - the name of the resource requested.
child - the child object making the request.
Returns:
the requested resource as an InputStream

getResource

public URL getResource(String name,
                       BeanContextChild bcc)
Description copied from interface: BeanContext
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
Specified by:
getResource in interface BeanContext
Parameters:
name - the name of the resource requested.
child - the child object making the request.
Returns:
the requested resource as an InputStream

setDesignTime

public void setDesignTime(boolean dTime)
Sets the new design time value for this BeanContext.
Specified by:
setDesignTime in interface DesignMode
Parameters:
dTime - the new designTime value

isDesignTime

public boolean isDesignTime()
Reports whether or not this object is in currently in design time mode.
Specified by:
isDesignTime in interface DesignMode
Returns:
true if in design time mode, false if not

setLocale

public void setLocale(Locale newLocale)
               throws PropertyVetoException
Sets the locale of this BeanContext.
Parameters:
newLocale - the new locale
Throws:
PropertyVetoException - if the new value is rejected

getLocale

public Locale getLocale()
Gets the locale for this BeanContext.
Returns:
the current Locale of the BeanContext

needsGui

public boolean needsGui()

This method is typically called from the environment in order to determine if the implementor "needs" a GUI.

The algorithm used herein tests the BeanContextPeer, and its current children to determine if they are either Containers, Components, or if they implement Visibility and return needsGui() == true.

Specified by:
needsGui in interface Visibility
Returns:
true if the implementor needs a GUI

dontUseGui

public void dontUseGui()
notify this instance that it may no longer render a GUI.
Specified by:
dontUseGui in interface Visibility

okToUseGui

public void okToUseGui()
Notify this instance that it may now render a GUI
Specified by:
okToUseGui in interface Visibility

avoidingGui

public boolean avoidingGui()
Used to determine if the BeanContext child is avoiding using its GUI.
Specified by:
avoidingGui in interface Visibility
Returns:
is this instance avoiding using its GUI?
See Also:
Visibility

isSerializing

public boolean isSerializing()
Is this BeanContext in the process of being serialized?
Returns:
if this BeanContext is currently being serialized

bcsChildren

protected Iterator bcsChildren()
Returns an iterator of all children of this BeanContext.
Returns:
an iterator for all the current BCSChild values

bcsPreSerializationHook

protected void bcsPreSerializationHook(ObjectOutputStream oos)
                                throws IOException
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children. This method may be overridden by subclasses to perform custom serialization of their state prior to this superclass serializing the children. This method should not however be used by subclasses to replace their own implementation (if any) of writeObject().

bcsPreDeserializationHook

protected void bcsPreDeserializationHook(ObjectInputStream ois)
                                  throws IOException,
                                         ClassNotFoundException
called by readObject after defaultReadObject() but prior to deserialization of any children. This method may be overridden by subclasses to perform custom deserialization of their state prior to this superclass deserializing the children. This method should not however be used by subclasses to replace their own implementation (if any) of readObject().

childDeserializedHook

protected void childDeserializedHook(Object child,
                                     BeanContextSupport.BCSChild bcsc)
Called by readObject with the newly deserialized child and BCSChild.
Parameters:
child - the newly deserialized child
bcsc - the newly deserialized BCSChild

serialize

protected final void serialize(ObjectOutputStream oos,
                               Collection coll)
                        throws IOException
Used by writeObject to serialize a Collection.
Parameters:
oos - the ObjectOutputStream to use during serialization
coll - the Collection to serialize
Throws:
IOException - if serialization failed

deserialize

protected final void deserialize(ObjectInputStream ois,
                                 Collection coll)
                          throws IOException,
                                 ClassNotFoundException
used by readObject to deserialize a collection.
Parameters:
ois - the ObjectInputStream to use
coll - the Collection

writeChildren

public final void writeChildren(ObjectOutputStream oos)
                         throws IOException
Used to serialize all children of this BeanContext.
Parameters:
oos - the ObjectOutputStream to use during serialization
Throws:
IOException - if serialization failed

readChildren

public final void readChildren(ObjectInputStream ois)
                        throws IOException,
                               ClassNotFoundException
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization

vetoableChange

public void vetoableChange(PropertyChangeEvent pce)
                    throws PropertyVetoException
subclasses may envelope to monitor veto child property changes.
Specified by:
vetoableChange in interface VetoableChangeListener
Following copied from interface: java.beans.VetoableChangeListener
Parameters:
evt - a PropertyChangeEvent object describing the event source and the property that has changed.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

propertyChange

public void propertyChange(PropertyChangeEvent pce)
subclasses may envelope to monitor child property changes.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

validatePendingAdd

protected boolean validatePendingAdd(Object targetChild)

Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.

validatePendingRemove

protected boolean validatePendingRemove(Object targetChild)

Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.

childJustAddedHook

protected void childJustAddedHook(Object child,
                                  BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred. The method is called with the child synchronized.

childJustRemovedHook

protected void childJustRemovedHook(Object child,
                                    BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred. The method is called with the child synchronized.

getChildVisibility

protected static final Visibility getChildVisibility(Object child)
Gets the Component (if any) associated with the specified child.
Parameters:
child - the specified child
Returns:
the Component (if any) associated with the specified child.

getChildSerializable

protected static final Serializable getChildSerializable(Object child)
Gets the Serializable (if any) associated with the specified Child
Parameters:
child - the specified child
Returns:
the Serializable (if any) associated with the specified Child

getChildPropertyChangeListener

protected static final PropertyChangeListener getChildPropertyChangeListener(Object child)
Gets the PropertyChangeListener (if any) of the specified child
Parameters:
child - the specified child
Returns:
the PropertyChangeListener (if any) of the specified child

getChildVetoableChangeListener

protected static final VetoableChangeListener getChildVetoableChangeListener(Object child)
Gets the VetoableChangeListener (if any) of the specified child
Parameters:
child - the specified child
Returns:
the VetoableChangeListener (if any) of the specified child

getChildBeanContextMembershipListener

protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
Gets the BeanContextMembershipListener (if any) of the specified child
Parameters:
child - the specified child
Returns:
the BeanContextMembershipListener (if any) of the specified child

getChildBeanContextChild

protected static final BeanContextChild getChildBeanContextChild(Object child)
Gets the BeanContextChild (if any) of the specified child
Parameters:
child - the specified child
Returns:
the BeanContextChild (if any) of the specified child

fireChildrenAdded

protected final void fireChildrenAdded(BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

fireChildrenRemoved

protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

initialize

protected void initialize()
protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance. This class uses this method to instantiate inner class listeners used to monitor PropertyChange and VetoableChange events on children. subclasses may envelope this method to add their own initialization behavior

copyChildren

protected final Object[] copyChildren()
Gets a copy of the this BeanContext's children.

classEquals

protected static final boolean classEquals(Class first,
                                           Class second)
Tests to see if two class objects, or their names are equal.
Parameters:
first - the first object
second - the second object
Returns:
true if equal, false if not
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.beans.beancontext.BeanContextServicesSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServicesSupport

No usage of java.beans.beancontext.BeanContextServicesSupport

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextServicesSupport.BCSSChild

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServicesSupport.BCSSChild

No usage of java.beans.beancontext.BeanContextServicesSupport.BCSSChild

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextSupport.BCSIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextSupport.BCSIterator

No usage of java.beans.beancontext.BeanContextSupport.BCSIterator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextChildComponentProxy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextChildComponentProxy

No usage of java.beans.beancontext.BeanContextChildComponentProxy

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextContainerProxy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextContainerProxy

No usage of java.beans.beancontext.BeanContextContainerProxy

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextProxy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextProxy

No usage of java.beans.beancontext.BeanContextProxy

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextServiceProviderBeanInfo

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextServiceProviderBeanInfo

No usage of java.beans.beancontext.BeanContextServiceProviderBeanInfo

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextChildSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextChildSupport

Packages that use BeanContextChildSupport
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextChildSupport in java.beans.beancontext

Subclasses of BeanContextChildSupport in java.beans.beancontext
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextEvent

Packages that use BeanContextEvent
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextEvent in java.beans.beancontext

Subclasses of BeanContextEvent in java.beans.beancontext
class | BeanContextMembershipEvent A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
class | BeanContextServiceAvailableEvent This event type is used by the BeanContextServicesListener in order to identify the service being registered.
class | BeanContextServiceRevokedEvent This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextMembershipEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextMembershipEvent

Packages that use BeanContextMembershipEvent
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextMembershipEvent in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type BeanContextMembershipEvent
void | BeanContextMembershipListener.childrenAdded(BeanContextMembershipEvent bcme) Called when a child or list of children is added to a BeanContext that this listener is registered with.
void | BeanContextMembershipListener.childrenRemoved(BeanContextMembershipEvent bcme) Called when a child or list of children is removed from a BeanContext that this listener is registered with.
protected void | BeanContextSupport.fireChildrenAdded(BeanContextMembershipEvent bcme) Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
protected void | BeanContextSupport.fireChildrenRemoved(BeanContextMembershipEvent bcme) Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextServiceAvailableEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServiceAvailableEvent

Packages that use BeanContextServiceAvailableEvent
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServiceAvailableEvent in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type BeanContextServiceAvailableEvent
void | BeanContextChildSupport.serviceAvailable(BeanContextServiceAvailableEvent bcsae) A new service is available from the nesting BeanContext.
void | BeanContextServicesSupport.serviceAvailable(BeanContextServiceAvailableEvent bcssae) BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
protected void | BeanContextServicesSupport.fireServiceAdded(BeanContextServiceAvailableEvent bcssae) Fires a BeanContextServiceAvailableEvent indicating that a new service has become available.
void | BeanContextServicesListener.serviceAvailable(BeanContextServiceAvailableEvent bcsae) The service named has been registered.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextServiceRevokedEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServiceRevokedEvent

Packages that use BeanContextServiceRevokedEvent
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServiceRevokedEvent in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type BeanContextServiceRevokedEvent
void | BeanContextChildSupport.serviceRevoked(BeanContextServiceRevokedEvent bcsre) A service provided by the nesting BeanContext has been revoked.
void | BeanContextServicesSupport.serviceRevoked(BeanContextServiceRevokedEvent bcssre) BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
protected void | BeanContextServicesSupport.fireServiceRevoked(BeanContextServiceRevokedEvent bcsre) Fires a BeanContextServiceEvent notifying of a service being revoked.
void | BeanContextServicesSupport.BCSSProxyServiceProvider.serviceRevoked(BeanContextServiceRevokedEvent bcsre)
void | BeanContextServiceRevokedListener.serviceRevoked(BeanContextServiceRevokedEvent bcsre) The service named has been revoked.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider

Packages that use BeanContextServicesSupport.BCSSProxyServiceProvider
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServicesSupport.BCSSProxyServiceProvider in java.beans.beancontext

Fields in java.beans.beancontext declared as BeanContextServicesSupport.BCSSProxyServiceProvider
protected  BeanContextServicesSupport.BCSSProxyServiceProvider BeanContextServicesSupport.proxy
Delegate for the BeanContextServiceProvider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider

Packages that use BeanContextServicesSupport.BCSSServiceProvider
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServicesSupport.BCSSServiceProvider in java.beans.beancontext

Methods in java.beans.beancontext that return BeanContextServicesSupport.BCSSServiceProvider
protected  BeanContextServicesSupport.BCSSServiceProvider BeanContextServicesSupport.createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextSupport

Packages that use BeanContextSupport
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextSupport in java.beans.beancontext

Subclasses of BeanContextSupport in java.beans.beancontext
 class BeanContextServicesSupport
This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.beancontext.BeanContextSupport.BCSChild

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.beancontext.BeanContextSupport.BCSChild

Packages that use BeanContextSupport.BCSChild
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextSupport.BCSChild in java.beans.beancontext

Subclasses of BeanContextSupport.BCSChild in java.beans.beancontext
protected  class BeanContextServicesSupport.BCSSChild

Methods in java.beans.beancontext that return BeanContextSupport.BCSChild
protected  BeanContextSupport.BCSChild BeanContextSupport.createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
protected  BeanContextSupport.BCSChild BeanContextServicesSupport.createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.

Methods in java.beans.beancontext with parameters of type BeanContextSupport.BCSChild
protected  void BeanContextSupport.childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
Called by readObject with the newly deserialized child and BCSChild.
protected  void BeanContextSupport.childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
protected  void BeanContextSupport.childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
protected  void BeanContextServicesSupport.childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
called from superclass child removal operations after a child has been successfully removed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContext

Packages that use BeanContext
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.

Uses of BeanContext in java.beans

Methods in java.beans with parameters of type BeanContext
void | AppletInitializer.initialize(Applet newAppletBean, BeanContext bCtxt) If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.

Uses of BeanContext in java.beans.beancontext

Subinterfaces of BeanContext in java.beans.beancontext
 interface BeanContextServices
The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement BeanContext
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Fields in java.beans.beancontext declared as BeanContext
protected BeanContext | BeanContextEvent.propagatedFrom The BeanContext from which this event was propagated
protected BeanContext | BeanContextChildSupport.beanContext

Methods in java.beans.beancontext that return BeanContext
BeanContext | BeanContextEvent.getBeanContext() Gets the BeanContext associated with this event.
BeanContext | BeanContextEvent.getPropagatedFrom() Gets the BeanContext from which this event was propagated.
BeanContext | BeanContextChild.getBeanContext() Gets the BeanContext associated with this BeanContextChild.
BeanContext | BeanContextChildSupport.getBeanContext() Gets the nesting BeanContext for this BeanContextChildSupport.
BeanContext | BeanContextSupport.getBeanContextPeer() Gets the instance of BeanContext that this object is providing the implementation for.

Methods in java.beans.beancontext with parameters of type BeanContext
void | BeanContextEvent.setPropagatedFrom(BeanContext bc) Sets the BeanContext from which this event was propagated.
void | BeanContextChild.setBeanContext(BeanContext bc) Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters: propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).
void | BeanContextChildSupport.setBeanContext(BeanContext bc) Sets the BeanContext for this BeanContextChildSupport.
boolean | BeanContextChildSupport.validatePendingSetBeanContext(BeanContext newValue) Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.

Constructors in java.beans.beancontext with parameters of type BeanContext
BeanContextEvent(BeanContext bc)
Contruct a BeanContextEvent
BeanContextMembershipEvent(BeanContext bc, Collection changes)
Contruct a BeanContextMembershipEvent
BeanContextMembershipEvent(BeanContext bc, Object[] changes)
Contruct a BeanContextMembershipEvent
BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextSupport instance
BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextSupport(BeanContext peer, Locale lcle)
Create an instance using the specified locale
BeanContextSupport(BeanContext peer)
Create an instance using with a default locale

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextChild

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextChild

Packages that use BeanContextChild
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextChild in java.beans.beancontext

Subinterfaces of BeanContextChild in java.beans.beancontext
interface | BeanContext The BeanContext acts a logical hierarchical container for JavaBeans.
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement BeanContextChild
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Fields in java.beans.beancontext declared as BeanContextChild
 BeanContextChild BeanContextChildSupport.beanContextChildPeer
The BeanContext in which this BeanContextChild is nested.

Methods in java.beans.beancontext that return BeanContextChild
BeanContextChild | BeanContextChildSupport.getBeanContextChildPeer() Gets the BeanContextChild associated with this BeanContextChildSupport.
protected static BeanContextChild | BeanContextSupport.getChildBeanContextChild(Object child) Gets the BeanContextChild (if any) of the specified child
BeanContextChild | BeanContextProxy.getBeanContextProxy() Gets the BeanContextChild (or subinterface) associated with this object.

Methods in java.beans.beancontext with parameters of type BeanContextChild
 InputStream BeanContextSupport.getResourceAsStream(String name, BeanContextChild bcc)
 URL BeanContextSupport.getResource(String name, BeanContextChild bcc)
 Object BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
obtain a service which may be delegated
 void BeanContextServicesSupport.releaseService(BeanContextChild child, Object requestor, Object service)
release a service
 InputStream BeanContext.getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 URL BeanContext.getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 Object BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
 void BeanContextServices.releaseService(BeanContextChild child, Object requestor, Object service)
Releases a BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service by calling releaseService() on the underlying BeanContextServiceProvider.

Constructors in java.beans.beancontext with parameters of type BeanContextChild
BeanContextChildSupport(BeanContextChild bcc)
construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextMembershipListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextMembershipListener

Packages that use BeanContextMembershipListener
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextMembershipListener in java.beans.beancontext

Methods in java.beans.beancontext that return BeanContextMembershipListener
protected static BeanContextMembershipListener BeanContextSupport.getChildBeanContextMembershipListener(Object child)
Gets the BeanContextMembershipListener (if any) of the specified child

Methods in java.beans.beancontext with parameters of type BeanContextMembershipListener
void | BeanContextSupport.addBeanContextMembershipListener(BeanContextMembershipListener bcml) Adds a BeanContextMembershipListener
void | BeanContextSupport.removeBeanContextMembershipListener(BeanContextMembershipListener bcml) Removes a BeanContextMembershipListener
void | BeanContext.addBeanContextMembershipListener(BeanContextMembershipListener bcml) Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).
void | BeanContext.removeBeanContextMembershipListener(BeanContextMembershipListener bcml) Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextServiceProvider

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextServiceProvider

Packages that use BeanContextServiceProvider
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServiceProvider in java.beans.beancontext

Classes in java.beans.beancontext that implement BeanContextServiceProvider
protected  class BeanContextServicesSupport.BCSSProxyServiceProvider

Fields in java.beans.beancontext declared as BeanContextServiceProvider
protected  BeanContextServiceProvider BeanContextServicesSupport.BCSSServiceProvider.serviceProvider

Methods in java.beans.beancontext that return BeanContextServiceProvider
protected  BeanContextServiceProvider BeanContextServicesSupport.BCSSServiceProvider.getServiceProvider()

Methods in java.beans.beancontext with parameters of type BeanContextServiceProvider
protected  BeanContextServicesSupport.BCSSServiceProvider BeanContextServicesSupport.createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.
 boolean BeanContextServicesSupport.addService(Class serviceClass, BeanContextServiceProvider bcsp)
add a service
protected  boolean BeanContextServicesSupport.addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
add a service
 void BeanContextServicesSupport.revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
remove a service
 boolean BeanContextServices.addService(Class serviceClass, BeanContextServiceProvider serviceProvider)
Adds a service to this BeanContext.
 void BeanContextServices.revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextServiceRevokedListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextServiceRevokedListener

Packages that use BeanContextServiceRevokedListener
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServiceRevokedListener in java.beans.beancontext

Subinterfaces of BeanContextServiceRevokedListener in java.beans.beancontext
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.
interface | BeanContextServicesListener The listener interface for receiving BeanContextServiceAvailableEvent objects.

Classes in java.beans.beancontext that implement BeanContextServiceRevokedListener
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
protected class | BeanContextServicesSupport.BCSSProxyServiceProvider
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Methods in java.beans.beancontext with parameters of type BeanContextServiceRevokedListener
Object | BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) obtain a service which may be delegated
Object | BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextServices

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextServices

Packages that use BeanContextServices
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServices in java.beans.beancontext

Classes in java.beans.beancontext that implement BeanContextServices
 class BeanContextServicesSupport
This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.

Methods in java.beans.beancontext that return BeanContextServices
BeanContextServices | BeanContextServiceAvailableEvent.getSourceAsBeanContextServices() Gets the source as a reference of type BeanContextServices.
BeanContextServices | BeanContextServiceRevokedEvent.getSourceAsBeanContextServices() Gets the source as a reference of type BeanContextServices
BeanContextServices | BeanContextServicesSupport.getBeanContextServicesPeer() Gets the BeanContextServices associated with this BeanContextServicesSupport.

Methods in java.beans.beancontext with parameters of type BeanContextServices
Object | BeanContextServicesSupport.BCSSProxyServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
void | BeanContextServicesSupport.BCSSProxyServiceProvider.releaseService(BeanContextServices bcs, Object requestor, Object service)
Iterator | BeanContextServicesSupport.BCSSProxyServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
Object | BeanContextServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
void | BeanContextServiceProvider.releaseService(BeanContextServices bcs, Object requestor, Object service) Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
Iterator | BeanContextServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) Invoked by BeanContextServices, this method gets the current service selectors for the specified service.

Constructors in java.beans.beancontext with parameters of type BeanContextServices
BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc)
Construct a BeanContextAvailableServiceEvent.
BeanContextServiceRevokedEvent(BeanContextServices bcs, Class sc, boolean invalidate)
Construct a BeanContextServiceEvent.
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextServicesSupport instance
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
Create an instance using the specified locale
BeanContextServicesSupport(BeanContextServices peer)
Create an instance with a peer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.beancontext.BeanContextServicesListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.beancontext.BeanContextServicesListener

Packages that use BeanContextServicesListener
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of BeanContextServicesListener in java.beans.beancontext

Subinterfaces of BeanContextServicesListener in java.beans.beancontext
 interface BeanContextServices
The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement BeanContextServicesListener
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Methods in java.beans.beancontext that return BeanContextServicesListener
protected static BeanContextServicesListener BeanContextServicesSupport.getChildBeanContextServicesListener(Object child)
Gets the BeanContextServicesListener (if any) of the specified child.

Methods in java.beans.beancontext with parameters of type BeanContextServicesListener
void | BeanContextServicesSupport.addBeanContextServicesListener(BeanContextServicesListener bcsl) add a BeanContextServicesListener
void | BeanContextServicesSupport.removeBeanContextServicesListener(BeanContextServicesListener bcsl) remove a BeanContextServicesListener
void | BeanContextServices.addBeanContextServicesListener(BeanContextServicesListener bcsl) Adds a BeanContextServicesListener to this BeanContext
void | BeanContextServices.removeBeanContextServicesListener(BeanContextServicesListener bcsl) Removes a BeanContextServicesListener from this BeanContext

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


BeanDescriptor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Class BeanDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.BeanDescriptor
public class BeanDescriptor
extends FeatureDescriptor

A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.

This is one of the kinds of descriptor returned by a BeanInfo object, which also returns descriptors for properties, method, and events.

Constructor Summary
BeanDescriptor(Class beanClass)
Create a BeanDescriptor for a bean that doesn't have a customizer.
BeanDescriptor(Class beanClass, Class customizerClass)
Create a BeanDescriptor for a bean that has a customizer.
Method Summary
Class | getBeanClass() Gets the bean's Class object.
Class | getCustomizerClass() Gets the Class object for the bean's customizer.
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BeanDescriptor

public BeanDescriptor(Class beanClass)
Create a BeanDescriptor for a bean that doesn't have a customizer.
Parameters:
beanClass - The Class object of the Java class that implements the bean. For example sun.beans.OurButton.class.

BeanDescriptor

public BeanDescriptor(Class beanClass,
                      Class customizerClass)
Create a BeanDescriptor for a bean that has a customizer.
Parameters:
beanClass - The Class object of the Java class that implements the bean. For example sun.beans.OurButton.class.
customizerClass - The Class object of the Java class that implements the bean's Customizer. For example sun.beans.OurButtonCustomizer.class.
Method Detail

getBeanClass

public Class getBeanClass()
Gets the bean's Class object.
Returns:
The Class object for the bean.

getCustomizerClass

public Class getCustomizerClass()
Gets the Class object for the bean's customizer.
Returns:
The Class object for the bean's customizer. This may be null if the bean doesn't have a customizer.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BeanInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface BeanInfo

All Known Subinterfaces:
BeanContextServiceProviderBeanInfo
All Known Implementing Classes:
SimpleBeanInfo
public interface BeanInfo

A bean implementor who wishes to provide explicit information about their bean may provide a BeanInfo class that implements this BeanInfo interface and provides explicit information about the methods, properties, events, etc, of their bean.

A bean implementor doesn't need to provide a complete set of explicit information. You can pick and choose which information you want to provide and the rest will be obtained by automatic analysis using low-level reflection of the bean classes' methods and applying standard design patterns.

You get the opportunity to provide lots and lots of different information as part of the various XyZDescriptor classes. But don't panic, you only really need to provide the minimal core information required by the various constructors.

See also the SimpleBeanInfo class which provides a convenient "noop" base class for BeanInfo classes, which you can override for those specific places where you want to return explicit info.

To learn about all the behaviour of a bean see the Introspector class.

Field Summary
static int | ICON_COLOR_16x16 Constant to indicate a 16 x 16 color icon.
static int | ICON_COLOR_32x32 Constant to indicate a 32 x 32 color icon.
static int | ICON_MONO_16x16 Constant to indicate a 16 x 16 monochrome icon.
static int | ICON_MONO_32x32 Constant to indicate a 32 x 32 monochrome icon.
Method Summary
BeanInfo[] | getAdditionalBeanInfo() This method allows a BeanInfo object to return an arbitrary collection of other BeanInfo objects that provide additional information on the current bean.
BeanDescriptor | getBeanDescriptor() Gets the beans BeanDescriptor.
int | getDefaultEventIndex() A bean may have a "default" event that is the event that will mostly commonly be used by humans when using the bean.
int | getDefaultPropertyIndex() A bean may have a "default" property that is the property that will mostly commonly be initially chosen for update by human's who are customizing the bean.
EventSetDescriptor[] | getEventSetDescriptors() Gets the beans EventSetDescriptors.
Image | getIcon(int iconKind) This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc.
MethodDescriptor[] | getMethodDescriptors() Gets the beans MethodDescriptors.
PropertyDescriptor[] | getPropertyDescriptors() Gets the beans PropertyDescriptors.

Field Detail

ICON_COLOR_16x16

public static final int ICON_COLOR_16x16
Constant to indicate a 16 x 16 color icon.

ICON_COLOR_32x32

public static final int ICON_COLOR_32x32
Constant to indicate a 32 x 32 color icon.

ICON_MONO_16x16

public static final int ICON_MONO_16x16
Constant to indicate a 16 x 16 monochrome icon.

ICON_MONO_32x32

public static final int ICON_MONO_32x32
Constant to indicate a 32 x 32 monochrome icon.
Method Detail

getBeanDescriptor

public BeanDescriptor getBeanDescriptor()
Gets the beans BeanDescriptor.
Returns:
A BeanDescriptor providing overall information about the bean, such as its displayName, its customizer, etc. May return null if the information should be obtained by automatic analysis.

getEventSetDescriptors

public EventSetDescriptor[] getEventSetDescriptors()
Gets the beans EventSetDescriptors.
Returns:
An array of EventSetDescriptors describing the kinds of events fired by this bean. May return null if the information should be obtained by automatic analysis.

getDefaultEventIndex

public int getDefaultEventIndex()
A bean may have a "default" event that is the event that will mostly commonly be used by humans when using the bean.
Returns:
Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

Returns -1 if there is no default event.

getPropertyDescriptors

public PropertyDescriptor[] getPropertyDescriptors()
Gets the beans PropertyDescriptors.
Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

If a property is indexed, then its entry in the result array will belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of getPropertyDescriptors can use "instanceof" to check if a given PropertyDescriptor is an IndexedPropertyDescriptor.

getDefaultPropertyIndex

public int getDefaultPropertyIndex()
A bean may have a "default" property that is the property that will mostly commonly be initially chosen for update by human's who are customizing the bean.
Returns:
Index of default property in the PropertyDescriptor array returned by getPropertyDescriptors.

Returns -1 if there is no default property.

getMethodDescriptors

public MethodDescriptor[] getMethodDescriptors()
Gets the beans MethodDescriptors.
Returns:
An array of MethodDescriptors describing the externally visible methods supported by this bean. May return null if the information should be obtained by automatic analysis.

getAdditionalBeanInfo

public BeanInfo[] getAdditionalBeanInfo()
This method allows a BeanInfo object to return an arbitrary collection of other BeanInfo objects that provide additional information on the current bean.

If there are conflicts or overlaps between the information provided by different BeanInfo objects, then the current BeanInfo takes precedence over the getAdditionalBeanInfo objects, and later elements in the array take precedence over earlier ones.

Returns:
an array of BeanInfo objects. May return null.

getIcon

public Image getIcon(int iconKind)
This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc. Icon images will typically be GIFs, but may in future include other formats.

Beans aren't required to provide icons and may return null from this method.

There are four possible flavors of icons (16x16 color, 32x32 color, 16x16 mono, 32x32 mono). If a bean choses to only support a single icon we recommend supporting 16x16 color.

We recommend that icons have a "transparent" background so they can be rendered onto an existing background.

Parameters:
iconKind - The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32.
Returns:
An image object representing the requested icon. May return null if no suitable icon is available.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Beans

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class Beans

java.lang.Object
  |
  +--java.beans.Beans
public class Beans
extends Object

This class provides some general purpose beans control methods.

Constructor Summary
Beans()
Method Summary
static Object | getInstanceOf(Object bean, Class targetType) From a given bean, obtain an object representing a specified type view of that source object.
static Object | instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.
static boolean | isDesignTime() Test if we are in design-mode.
static boolean | isGuiAvailable() Determines whether beans can assume a GUI is available.
static boolean | isInstanceOf(Object bean, Class targetType) Check if a bean can be viewed as a given target type.
static void | setDesignTime(boolean isDesignTime) Used to indicate whether of not we are running in an application builder environment.
static void | setGuiAvailable(boolean isGuiAvailable) Used to indicate whether of not we are running in an environment where GUI interaction is available.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Beans

public Beans()
Method Detail

instantiate

public static Object instantiate(ClassLoader cls,
                                 String beanName)
                          throws IOException,
                                 ClassNotFoundException

Instantiate a JavaBean.

Parameters:
classLoader - the class-loader from which we should create the bean. If this is null, then the system class-loader is used.
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.

instantiate

public static Object instantiate(ClassLoader cls,
                                 String beanName,
                                 BeanContext beanContext)
                          throws IOException,
                                 ClassNotFoundException

Instantiate a JavaBean.

Parameters:
classLoader - the class-loader from which we should create the bean. If this is null, then the system class-loader is used.
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
beanContext - The BeanContext in which to nest the new bean
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.

instantiate

public static Object instantiate(ClassLoader cls,
                                 String beanName,
                                 BeanContext beanContext,
                                 AppletInitializer initializer)
                          throws IOException,
                                 ClassNotFoundException
Instantiate a bean.

The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as "a.b.c".

In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name.

When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing ".ser" suffix. We then try to load a serialized object from that resource.

For example, given a beanName of "x.y", Beans.instantiate would first try to read a serialized object from the resource "x/y.ser" and if that failed it would try to load the class "x.y" and create an instance of that class.

If the bean is a subtype of java.applet.Applet, then it is given some special initialization. First, it is supplied with a default AppletStub and AppletContext. Second, if it was instantiated from a classname the applet's "init" method is called. (If the bean was deserialized this step is skipped.)

Note that for beans which are applets, it is the caller's responsiblity to call "start" on the applet. For correct behaviour, this should be done after the applet has been added into a visible AWT container.

Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular, bean applets have no access to "parameters", so they may wish to provide property get/set methods to set parameter values. We advise bean-applet developers to test their bean-applets against both the SDK appletviewer (for a reference browser environment) and the BDK BeanBox (for a reference bean container).

Parameters:
classLoader - the class-loader from which we should create the bean. If this is null, then the system class-loader is used.
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
beanContext - The BeanContext in which to nest the new bean
initializer - The AppletInitializer for the new bean
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.

getInstanceOf

public static Object getInstanceOf(Object bean,
                                   Class targetType)
From a given bean, obtain an object representing a specified type view of that source object.

The result may be the same object or a different object. If the requested target view isn't available then the given bean is returned.

This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.

Parameters:
obj - Object from which we want to obtain a view.
targetType - The type of view we'd like to get.

isInstanceOf

public static boolean isInstanceOf(Object bean,
                                   Class targetType)
Check if a bean can be viewed as a given target type. The result will be true if the Beans.getInstanceof method can be used on the given bean to obtain an object that represents the specified targetType type view.
Parameters:
bean - Bean from which we want to obtain a view.
targetType - The type of view we'd like to get.
Returns:
"true" if the given bean supports the given targetType.

isDesignTime

public static boolean isDesignTime()
Test if we are in design-mode.
Returns:
True if we are running in an application construction environment.
See Also:
DesignMode

isGuiAvailable

public static boolean isGuiAvailable()
Determines whether beans can assume a GUI is available.
Returns:
True if we are running in an environment where beans can assume that an interactive GUI is available, so they can pop up dialog boxes, etc. This will normally return true in a windowing environment, and will normally return false in a server environment or if an application is running as part of a batch job.
See Also:
Visibility

setDesignTime

public static void setDesignTime(boolean isDesignTime)
                          throws SecurityException
Used to indicate whether of not we are running in an application builder environment.

Note that this method is security checked and is not available to (for example) untrusted applets. More specifically, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.

Parameters:
isDesignTime - True if we're in an application builder tool.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow setting of system properties.
See Also:
SecurityManager.checkPropertiesAccess()

setGuiAvailable

public static void setGuiAvailable(boolean isGuiAvailable)
                            throws SecurityException
Used to indicate whether of not we are running in an environment where GUI interaction is available.

Note that this method is security checked and is not available to (for example) untrusted applets. More specifically, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.

Parameters:
isGuiAvailable - True if GUI interaction is available.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow setting of system properties.
See Also:
SecurityManager.checkPropertiesAccess()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.beans.Beans

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.Beans

No usage of java.beans.Beans

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.IndexedPropertyDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.IndexedPropertyDescriptor

No usage of java.beans.IndexedPropertyDescriptor

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.Introspector

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.Introspector

No usage of java.beans.Introspector

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyEditorManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyEditorManager

No usage of java.beans.PropertyEditorManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyEditorSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyEditorSupport

No usage of java.beans.PropertyEditorSupport

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.SimpleBeanInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.SimpleBeanInfo

No usage of java.beans.SimpleBeanInfo

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.Customizer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.Customizer

No usage of java.beans.Customizer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.BeanDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.BeanDescriptor

Packages that use BeanDescriptor
java.beans Contains classes related to Java Beans development.

Uses of BeanDescriptor in java.beans

Methods in java.beans that return BeanDescriptor
BeanDescriptor | BeanInfo.getBeanDescriptor() Gets the beans BeanDescriptor.
BeanDescriptor | SimpleBeanInfo.getBeanDescriptor() Deny knowledge about the class and customizer of the bean.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.EventSetDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.EventSetDescriptor

Packages that use EventSetDescriptor
java.beans Contains classes related to Java Beans development.

Uses of EventSetDescriptor in java.beans

Methods in java.beans that return EventSetDescriptor
EventSetDescriptor[] | BeanInfo.getEventSetDescriptors() Gets the beans EventSetDescriptors.
EventSetDescriptor[] | SimpleBeanInfo.getEventSetDescriptors() Deny knowledge of event sets.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.FeatureDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.FeatureDescriptor

Packages that use FeatureDescriptor
java.beans Contains classes related to Java Beans development.

Uses of FeatureDescriptor in java.beans

Subclasses of FeatureDescriptor in java.beans
class | BeanDescriptor A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.
class | EventSetDescriptor An EventSetDescriptor describes a group of events that a given Java bean fires.
class | IndexedPropertyDescriptor An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.
class | MethodDescriptor A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.
class | ParameterDescriptor The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.
class | PropertyDescriptor A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.IntrospectionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.IntrospectionException

Packages that use IntrospectionException
java.beans Contains classes related to Java Beans development.

Uses of IntrospectionException in java.beans

Methods in java.beans that throw IntrospectionException
void | PropertyDescriptor.setReadMethod(Method getter) Sets the method that should be used to read the property value.
void | PropertyDescriptor.setWriteMethod(Method setter) Sets the method that should be used to write the property value.
void | IndexedPropertyDescriptor.setIndexedReadMethod(Method getter) Sets the method that should be used to read an indexed property value.
void | IndexedPropertyDescriptor.setIndexedWriteMethod(Method setter) Sets the method that should be used to write an indexed property value.
static BeanInfo | Introspector.getBeanInfo(Class beanClass) Introspect on a Java bean and learn about all its properties, exposed methods, and events.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, int flags) Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, Class stopClass) Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.

Constructors in java.beans that throw IntrospectionException
PropertyDescriptor(String propertyName, Class beanClass)
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.
PropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName)
This constructor takes the name of a simple property, and method names for reading and writing the property.
PropertyDescriptor(String propertyName, Method getter, Method setter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
IndexedPropertyDescriptor(String propertyName, Class beanClass)
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.
IndexedPropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName, String indexedGetterName, String indexedSetterName)
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
IndexedPropertyDescriptor(String propertyName, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String listenerMethodName)
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName)
This constructor creates an EventSetDescriptor from scratch using string names.
EventSetDescriptor(String eventSetName, Class listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.MethodDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.MethodDescriptor

Packages that use MethodDescriptor
java.beans Contains classes related to Java Beans development.

Uses of MethodDescriptor in java.beans

Methods in java.beans that return MethodDescriptor
MethodDescriptor[] | BeanInfo.getMethodDescriptors() Gets the beans MethodDescriptors.
MethodDescriptor[] | EventSetDescriptor.getListenerMethodDescriptors() Gets the MethodDescriptors of the target listener interface.
MethodDescriptor[] | SimpleBeanInfo.getMethodDescriptors() Deny knowledge of methods.

Constructors in java.beans with parameters of type MethodDescriptor
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.ParameterDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.ParameterDescriptor

Packages that use ParameterDescriptor
java.beans Contains classes related to Java Beans development.

Uses of ParameterDescriptor in java.beans

Methods in java.beans that return ParameterDescriptor
 ParameterDescriptor[] MethodDescriptor.getParameterDescriptors()
Gets the ParameterDescriptor for each of this MethodDescriptor's method's parameters.

Constructors in java.beans with parameters of type ParameterDescriptor
MethodDescriptor(Method method, ParameterDescriptor[] parameterDescriptors)
Constructs a MethodDescriptor from a Method providing descriptive information for each of the method's parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyChangeEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyChangeEvent

Packages that use PropertyChangeEvent
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of PropertyChangeEvent in java.beans

Methods in java.beans that return PropertyChangeEvent
 PropertyChangeEvent PropertyVetoException.getPropertyChangeEvent()
Gets the vetoed PropertyChangeEvent.

Methods in java.beans with parameters of type PropertyChangeEvent
void | PropertyChangeSupport.firePropertyChange(PropertyChangeEvent evt) Fire an existing PropertyChangeEvent to any registered listeners.
void | VetoableChangeListener.vetoableChange(PropertyChangeEvent evt) This method gets called when a constrained property is changed.
void | VetoableChangeSupport.fireVetoableChange(PropertyChangeEvent evt) Fire a vetoable property update to any registered listeners.
void | PropertyChangeListener.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed.

Constructors in java.beans with parameters of type PropertyChangeEvent
PropertyVetoException(String mess, PropertyChangeEvent evt)
Constructs a PropertyVetoException with a detailed message.

Uses of PropertyChangeEvent in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type PropertyChangeEvent
void | BeanContextSupport.vetoableChange(PropertyChangeEvent pce) subclasses may envelope to monitor veto child property changes.
void | BeanContextSupport.propertyChange(PropertyChangeEvent pce) subclasses may envelope to monitor child property changes.

Uses of PropertyChangeEvent in javax.swing

Methods in javax.swing with parameters of type PropertyChangeEvent
void | JList.AccessibleJList.propertyChange(PropertyChangeEvent e) Property Change Listener change method.
void | JTable.AccessibleJTable.propertyChange(PropertyChangeEvent e) Track changes to selection model, column model, etc.

Uses of PropertyChangeEvent in javax.swing.event

Methods in javax.swing.event with parameters of type PropertyChangeEvent
 void SwingPropertyChangeSupport.firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners.

Uses of PropertyChangeEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type PropertyChangeEvent
protected void | BasicTextUI.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
protected void | BasicEditorPaneUI.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
protected void | BasicTextPaneUI.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
void | BasicComboPopup.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicOptionPaneUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e) If the source of the PropertyChangeEvent e equals the optionPane and is one of the ICON_PROPERTY, MESSAGE_PROPERTY, OPTIONS_PROPERTY or INITIAL_VALUE_PROPERTY, validateComponent is invoked.
void | BasicTabbedPaneUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicInternalFrameTitlePane.PropertyChangeHandler.propertyChange(PropertyChangeEvent evt)
protected void | BasicTextFieldUI.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
void | BasicScrollBarUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicToolBarUI.PropertyListener.propertyChange(PropertyChangeEvent e)
void | BasicButtonListener.propertyChange(PropertyChangeEvent e)
void | BasicInternalFrameUI.InternalFramePropertyChangeListener.propertyChange(PropertyChangeEvent evt) Detects changes in state from the JInternalFrame and handles actions.
void | BasicListUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicLabelUI.propertyChange(PropertyChangeEvent e)
void | BasicComboBoxUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicDirectoryModel.propertyChange(PropertyChangeEvent e)
void | BasicColorChooserUI.PropertyHandler.propertyChange(PropertyChangeEvent e)
void | BasicTreeUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent event)
void | BasicTreeUI.SelectionModelPropertyChangeHandler.propertyChange(PropertyChangeEvent event)
void | BasicSplitPaneUI.PropertyHandler.propertyChange(PropertyChangeEvent e) Messaged from the JSplitPane the reciever is contained in.
void | BasicSplitPaneDivider.propertyChange(PropertyChangeEvent e) Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
protected void | BasicScrollPaneUI.updateScrollBarDisplayPolicy(PropertyChangeEvent e)
protected void | BasicScrollPaneUI.updateViewport(PropertyChangeEvent e)
protected void | BasicScrollPaneUI.updateRowHeader(PropertyChangeEvent e)
protected void | BasicScrollPaneUI.updateColumnHeader(PropertyChangeEvent e)
void | BasicScrollPaneUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)
void | BasicRootPaneUI.propertyChange(PropertyChangeEvent e) Invoked when a property changes on the root pane.
protected void | BasicTextAreaUI.propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
void | BasicSliderUI.PropertyChangeHandler.propertyChange(PropertyChangeEvent e)

Uses of PropertyChangeEvent in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type PropertyChangeEvent
void | MetalTextFieldUI.propertyChange(PropertyChangeEvent e)
void | MetalFileChooserUI.FilterComboBoxModel.propertyChange(PropertyChangeEvent e)
protected void | MetalComboBoxUI.editablePropertyChanged(PropertyChangeEvent e)
void | MetalComboBoxUI.MetalPropertyChangeListener.propertyChange(PropertyChangeEvent e)
void | MetalSliderUI.MetalPropertyListener.propertyChange(PropertyChangeEvent e)
void | MetalToolBarUI.MetalRolloverListener.propertyChange(PropertyChangeEvent e)

Uses of PropertyChangeEvent in javax.swing.table

Methods in javax.swing.table with parameters of type PropertyChangeEvent
 void DefaultTableColumnModel.propertyChange(PropertyChangeEvent evt)
Property Change Listener change method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyChangeSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyChangeSupport

Packages that use PropertyChangeSupport
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing.event | Provides for events fired by Swing components.

Uses of PropertyChangeSupport in java.awt

Fields in java.awt declared as PropertyChangeSupport
protected  PropertyChangeSupport Toolkit.desktopPropsSupport

Uses of PropertyChangeSupport in java.beans.beancontext

Fields in java.beans.beancontext declared as PropertyChangeSupport
protected  PropertyChangeSupport BeanContextChildSupport.pcSupport
The PropertyChangeSupport associated with this BeanContextChildSupport.

Uses of PropertyChangeSupport in javax.swing.event

Subclasses of PropertyChangeSupport in javax.swing.event
 class SwingPropertyChangeSupport
This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyDescriptor

Packages that use PropertyDescriptor
java.beans Contains classes related to Java Beans development.

Uses of PropertyDescriptor in java.beans

Subclasses of PropertyDescriptor in java.beans
 class IndexedPropertyDescriptor
An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.

Methods in java.beans that return PropertyDescriptor
PropertyDescriptor[] | BeanInfo.getPropertyDescriptors() Gets the beans PropertyDescriptors.
PropertyDescriptor[] | SimpleBeanInfo.getPropertyDescriptors() Deny knowledge of properties.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.PropertyVetoException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.PropertyVetoException

Packages that use PropertyVetoException
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of PropertyVetoException in java.beans

Methods in java.beans that throw PropertyVetoException
void | VetoableChangeListener.vetoableChange(PropertyChangeEvent evt) This method gets called when a constrained property is changed.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, int oldValue, int newValue) Report a int vetoable property update to any registered listeners.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, boolean oldValue, boolean newValue) Report a boolean vetoable property update to any registered listeners.
void | VetoableChangeSupport.fireVetoableChange(PropertyChangeEvent evt) Fire a vetoable property update to any registered listeners.

Uses of PropertyVetoException in java.beans.beancontext

Methods in java.beans.beancontext that throw PropertyVetoException
void | BeanContextChild.setBeanContext(BeanContext bc) Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters: propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).
void | BeanContextChildSupport.setBeanContext(BeanContext bc) Sets the BeanContext for this BeanContextChildSupport.
void | BeanContextChildSupport.fireVetoableChange(String name, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
void | BeanContextSupport.setLocale(Locale newLocale) Sets the locale of this BeanContext.
void | BeanContextSupport.vetoableChange(PropertyChangeEvent pce) subclasses may envelope to monitor veto child property changes.

Uses of PropertyVetoException in javax.swing

Methods in javax.swing that throw PropertyVetoException
protected void | JComponent.fireVetoableChange(String propertyName, Object oldValue, Object newValue) Supports reporting constrained property changes.
void | JInternalFrame.setClosed(boolean b) Calling this method with a value of true to close the frame.
void | JInternalFrame.setIcon(boolean b) Iconizes and de-iconizes the frame.
void | JInternalFrame.setMaximum(boolean b) Maximizes and restores the frame.
void | JInternalFrame.setSelected(boolean selected) Selects and deselects the JInternalFrame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.beans.VetoableChangeSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.beans.VetoableChangeSupport

Packages that use VetoableChangeSupport
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of VetoableChangeSupport in java.beans.beancontext

Fields in java.beans.beancontext declared as VetoableChangeSupport
protected  VetoableChangeSupport BeanContextChildSupport.vcSupport
The VetoableChangeSupport associated with this BeanContextChildSupport.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.AppletInitializer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.AppletInitializer

Packages that use AppletInitializer
java.beans Contains classes related to Java Beans development.

Uses of AppletInitializer in java.beans

Methods in java.beans with parameters of type AppletInitializer
static Object Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer)
Instantiate a bean.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.BeanInfo

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.BeanInfo

Packages that use BeanInfo
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.

Uses of BeanInfo in java.beans

Classes in java.beans that implement BeanInfo
 class SimpleBeanInfo
This is a support class to make it easier for people to provide BeanInfo classes.

Methods in java.beans that return BeanInfo
BeanInfo[] | BeanInfo.getAdditionalBeanInfo() This method allows a BeanInfo object to return an arbitrary collection of other BeanInfo objects that provide additional information on the current bean.
BeanInfo[] | SimpleBeanInfo.getAdditionalBeanInfo() Claim there are no other relevant BeanInfo objects.
static BeanInfo | Introspector.getBeanInfo(Class beanClass) Introspect on a Java bean and learn about all its properties, exposed methods, and events.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, int flags) Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, Class stopClass) Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.

Uses of BeanInfo in java.beans.beancontext

Subinterfaces of BeanInfo in java.beans.beancontext
 interface BeanContextServiceProviderBeanInfo
A BeanContextServiceProvider implementor who wishes to provide explicit information about the services their bean may provide shall implement a BeanInfo class that implements this BeanInfo subinterface and provides explicit information about the methods, properties, events, etc, of their services.

Methods in java.beans.beancontext that return BeanInfo
 BeanInfo[] BeanContextServiceProviderBeanInfo.getServicesBeanInfo()
Gets a BeanInfo array, one for each service class or interface statically available from this ServiceProvider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.DesignMode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.DesignMode

Packages that use DesignMode
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of DesignMode in java.beans.beancontext

Subinterfaces of DesignMode in java.beans.beancontext
interface | BeanContext The BeanContext acts a logical hierarchical container for JavaBeans.
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement DesignMode
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.PropertyChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.PropertyChangeListener

Packages that use PropertyChangeListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of PropertyChangeListener in java.awt

Methods in java.awt with parameters of type PropertyChangeListener
void | Component.addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | Component.removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | Component.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | Component.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
void | Component.AccessibleAWTComponent.addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | Component.AccessibleAWTComponent.removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | Toolkit.addPropertyChangeListener(String name, PropertyChangeListener pcl) add the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
void | Toolkit.removePropertyChangeListener(String name, PropertyChangeListener pcl) remove the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.

Uses of PropertyChangeListener in java.beans

Methods in java.beans with parameters of type PropertyChangeListener
void | PropertyEditor.addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
void | PropertyEditor.removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.
void | PropertyChangeSupport.addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | PropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | PropertyChangeSupport.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | PropertyChangeSupport.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
void | Customizer.addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
void | Customizer.removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.
void | PropertyEditorSupport.addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
void | PropertyEditorSupport.removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.

Uses of PropertyChangeListener in java.beans.beancontext

Classes in java.beans.beancontext that implement PropertyChangeListener
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Methods in java.beans.beancontext that return PropertyChangeListener
protected static PropertyChangeListener BeanContextSupport.getChildPropertyChangeListener(Object child)
Gets the PropertyChangeListener (if any) of the specified child

Methods in java.beans.beancontext with parameters of type PropertyChangeListener
void | BeanContextChild.addPropertyChangeListener(String name, PropertyChangeListener pcl) Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
void | BeanContextChild.removePropertyChangeListener(String name, PropertyChangeListener pcl) Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
void | BeanContextChildSupport.addPropertyChangeListener(String name, PropertyChangeListener pcl) Adds a property change listener.
void | BeanContextChildSupport.removePropertyChangeListener(String name, PropertyChangeListener pcl) Remove a property change listener.

Uses of PropertyChangeListener in javax.accessibility

Methods in javax.accessibility with parameters of type PropertyChangeListener
void | AccessibleContext.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | AccessibleContext.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.

Uses of PropertyChangeListener in javax.swing

Classes in javax.swing that implement PropertyChangeListener
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.

Methods in javax.swing that return PropertyChangeListener
protected PropertyChangeListener | AbstractButton.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JMenuItem.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JCheckBox.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JTextField.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JMenu.createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
protected PropertyChangeListener | JPopupMenu.createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
protected PropertyChangeListener | JComboBox.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JRadioButton.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected PropertyChangeListener | JToolBar.createActionChangeListener(JButton b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.

Methods in javax.swing with parameters of type PropertyChangeListener
void | JComponent.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | JComponent.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener for a specific property.
void | JComponent.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | JComponent.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a PropertyChangeListener for a specific property.
void | JComponent.AccessibleJComponent.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | JComponent.AccessibleJComponent.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | Action.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChange listener.
void | Action.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChange listener.
void | JList.AccessibleJList.AccessibleJListChild.addPropertyChangeListener(PropertyChangeListener l)
void | JList.AccessibleJList.AccessibleJListChild.removePropertyChangeListener(PropertyChangeListener l)
void | UIDefaults.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | UIDefaults.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | JTree.AccessibleJTree.AccessibleJTreeNode.addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list.
void | JTree.AccessibleJTree.AccessibleJTreeNode.removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list.
void | AbstractAction.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | AbstractAction.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | JTable.AccessibleJTable.AccessibleJTableCell.addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list.
void | JTable.AccessibleJTable.AccessibleJTableCell.removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list.
static void | UIManager.addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
static void | UIManager.removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.

Uses of PropertyChangeListener in javax.swing.event

Methods in javax.swing.event with parameters of type PropertyChangeListener
void | SwingPropertyChangeSupport.addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | SwingPropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | SwingPropertyChangeSupport.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | SwingPropertyChangeSupport.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.

Uses of PropertyChangeListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement PropertyChangeListener
class | BasicButtonListener Button Listener
class | BasicColorChooserUI.PropertyHandler This inner class is marked "public" due to a compiler bug.
class | BasicComboBoxUI.PropertyChangeHandler This listener watches for bound properties that have changed in the JComboBox.
protected class | BasicComboPopup.PropertyChangeHandler This listener watches for bound property changes in JComboBox.
class | BasicDirectoryModel Basic implementation of a file list.
class | BasicInternalFrameTitlePane.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameUI.InternalFramePropertyChangeListener
class | BasicLabelUI A Windows L&F implementation of LabelUI.
class | BasicListUI.PropertyChangeHandler The PropertyChangeListener that's added to the JList at installUI time.
class | BasicOptionPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicRootPaneUI Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
class | BasicScrollBarUI.PropertyChangeHandler
class | BasicScrollPaneUI.PropertyChangeHandler
class | BasicSliderUI.PropertyChangeHandler
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
class | BasicSplitPaneUI.PropertyHandler Implementation of the PropertyChangeListener that the JSplitPane UI uses.
class | BasicTabbedPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
protected class | BasicToolBarUI.PropertyListener
class | BasicTreeUI.PropertyChangeHandler PropertyChangeListener for the tree.
class | BasicTreeUI.SelectionModelPropertyChangeHandler Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.

Fields in javax.swing.plaf.basic declared as PropertyChangeListener
protected PropertyChangeListener | BasicComboPopup.propertyChangeListener
protected PropertyChangeListener | BasicMenuUI.propertyChangeListener
protected PropertyChangeListener | BasicOptionPaneUI.propertyChangeListener
protected PropertyChangeListener | BasicTabbedPaneUI.propertyChangeListener
protected PropertyChangeListener | BasicInternalFrameTitlePane.propertyChangeListener
protected PropertyChangeListener | BasicScrollBarUI.propertyChangeListener
protected PropertyChangeListener | BasicToolBarUI.propertyListener
protected PropertyChangeListener | BasicInternalFrameUI.propertyChangeListener
protected PropertyChangeListener | BasicListUI.propertyChangeListener
protected PropertyChangeListener | BasicComboBoxUI.propertyChangeListener
protected PropertyChangeListener | BasicColorChooserUI.propertyChangeListener
protected PropertyChangeListener | BasicSplitPaneUI.propertyChangeListener Instance of the PropertyChangeListener for this JSplitPane.
protected PropertyChangeListener | BasicScrollPaneUI.spPropertyChangeListener
protected PropertyChangeListener | BasicSliderUI.propertyChangeListener

Methods in javax.swing.plaf.basic that return PropertyChangeListener
protected  PropertyChangeListener BasicComboPopup.createPropertyChangeListener()
Creates a property change listener that watches for changes in the bound properties in the JComboBox.
protected  PropertyChangeListener BasicMenuUI.createPropertyChangeListener(JComponent c)
protected  PropertyChangeListener BasicOptionPaneUI.createPropertyChangeListener()
protected  PropertyChangeListener BasicTabbedPaneUI.createPropertyChangeListener()
protected  PropertyChangeListener BasicInternalFrameTitlePane.createPropertyChangeListener()
protected  PropertyChangeListener BasicScrollBarUI.createPropertyChangeListener()
protected  PropertyChangeListener BasicToolBarUI.createPropertyListener()
 PropertyChangeListener BasicFileChooserUI.createPropertyChangeListener(JFileChooser fc)
protected  PropertyChangeListener BasicInternalFrameUI.createPropertyChangeListener()
protected  PropertyChangeListener BasicListUI.createPropertyChangeListener()
Creates an instance of PropertyChangeHandler that's added to the JList by installUI().
protected  PropertyChangeListener BasicComboBoxUI.createPropertyChangeListener()
Creates the list data listener that is used for caching the preferred sizes.
protected  PropertyChangeListener BasicColorChooserUI.createPropertyChangeListener()
protected  PropertyChangeListener BasicTreeUI.createPropertyChangeListener()
Creates a listener that is responsible that updates the UI based on how the tree changes.
protected  PropertyChangeListener BasicTreeUI.createSelectionModelPropertyChangeListener()
Creates the listener responsible for getting property change events from the selection model.
protected  PropertyChangeListener BasicSplitPaneUI.createPropertyChangeListener()
Creates a PropertyChangeListener for the JSplitPane UI.
protected  PropertyChangeListener BasicScrollPaneUI.createPropertyChangeListener()
Creates an instance of PropertyChangeListener that's added to the JScrollPane by installUI().
protected  PropertyChangeListener BasicSliderUI.createPropertyChangeListener(JSlider slider)

Uses of PropertyChangeListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement PropertyChangeListener
class | MetalComboBoxUI.MetalPropertyChangeListener This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.
class | MetalLabelUI A Windows L&F implementation of LabelUI.
protected class | MetalSliderUI.MetalPropertyListener
protected class | MetalToolBarUI.MetalRolloverListener

Fields in javax.swing.plaf.metal declared as PropertyChangeListener
protected  PropertyChangeListener MetalToolBarUI.rolloverListener

Methods in javax.swing.plaf.metal that return PropertyChangeListener
PropertyChangeListener | MetalFileChooserUI.createPropertyChangeListener(JFileChooser fc)
protected PropertyChangeListener | MetalInternalFrameTitlePane.createPropertyChangeListener()
PropertyChangeListener | MetalComboBoxUI.createPropertyChangeListener()
protected PropertyChangeListener | MetalSliderUI.createPropertyChangeListener(JSlider slider)
protected PropertyChangeListener | MetalScrollBarUI.createPropertyChangeListener()
protected PropertyChangeListener | MetalToolBarUI.createRolloverListener()
protected PropertyChangeListener | MetalScrollPaneUI.createScrollBarSwapListener()

Uses of PropertyChangeListener in javax.swing.table

Classes in javax.swing.table that implement PropertyChangeListener
 class DefaultTableColumnModel
The standard column-handler for a JTable.

Methods in javax.swing.table with parameters of type PropertyChangeListener
void | TableColumn.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | TableColumn.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.addPropertyChangeListener(PropertyChangeListener l)
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.removePropertyChangeListener(PropertyChangeListener l)

Uses of PropertyChangeListener in javax.swing.tree

Methods in javax.swing.tree with parameters of type PropertyChangeListener
void | DefaultTreeSelectionModel.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | DefaultTreeSelectionModel.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | TreeSelectionModel.addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | TreeSelectionModel.removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.PropertyEditor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.PropertyEditor

Packages that use PropertyEditor
java.beans Contains classes related to Java Beans development.

Uses of PropertyEditor in java.beans

Classes in java.beans that implement PropertyEditor
 class PropertyEditorSupport
This is a support class to help build property editors.

Methods in java.beans that return PropertyEditor
static PropertyEditor PropertyEditorManager.findEditor(Class targetType)
Locate a value editor for a given target type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.VetoableChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.VetoableChangeListener

Packages that use VetoableChangeListener
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of VetoableChangeListener in java.beans

Methods in java.beans with parameters of type VetoableChangeListener
void | VetoableChangeSupport.addVetoableChangeListener(VetoableChangeListener listener) Add a VetoableListener to the listener list.
void | VetoableChangeSupport.removeVetoableChangeListener(VetoableChangeListener listener) Remove a VetoableChangeListener from the listener list.
void | VetoableChangeSupport.addVetoableChangeListener(String propertyName, VetoableChangeListener listener) Add a VetoableChangeListener for a specific property.
void | VetoableChangeSupport.removeVetoableChangeListener(String propertyName, VetoableChangeListener listener) Remove a VetoableChangeListener for a specific property.

Uses of VetoableChangeListener in java.beans.beancontext

Classes in java.beans.beancontext that implement VetoableChangeListener
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Methods in java.beans.beancontext that return VetoableChangeListener
protected static VetoableChangeListener BeanContextSupport.getChildVetoableChangeListener(Object child)
Gets the VetoableChangeListener (if any) of the specified child

Methods in java.beans.beancontext with parameters of type VetoableChangeListener
void | BeanContextChild.addVetoableChangeListener(String name, VetoableChangeListener vcl) Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
void | BeanContextChild.removeVetoableChangeListener(String name, VetoableChangeListener vcl) Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
void | BeanContextChildSupport.addVetoableChangeListener(String name, VetoableChangeListener vcl) Adds a VetoableChangeListener.
void | BeanContextChildSupport.removeVetoableChangeListener(String name, VetoableChangeListener vcl) Removes a VetoableChangeListener.

Uses of VetoableChangeListener in javax.swing

Methods in javax.swing with parameters of type VetoableChangeListener
void | JComponent.addVetoableChangeListener(VetoableChangeListener listener) Adds a VetoableChangeListener to the listener list.
void | JComponent.removeVetoableChangeListener(VetoableChangeListener listener) Removes a VetoableChangeListener from the listener list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.beans.Visibility

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.beans.Visibility

Packages that use Visibility
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of Visibility in java.beans.beancontext

Subinterfaces of Visibility in java.beans.beancontext
interface | BeanContext The BeanContext acts a logical hierarchical container for JavaBeans.
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement Visibility
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Methods in java.beans.beancontext that return Visibility
protected static Visibility BeanContextSupport.getChildVisibility(Object child)
Gets the Component (if any) associated with the specified child.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Customizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface Customizer

public interface Customizer

A customizer class provides a complete custom GUI for customizing a target Java Bean.

Each customizer should inherit from the java.awt.Component class so it can be instantiated inside an AWT dialog or panel.

Each customizer should have a null constructor.

Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.
void | setObject(Object bean) Set the object to be customized.

Method Detail

setObject

public void setObject(Object bean)
Set the object to be customized. This method should be called only once, before the Customizer has been added to any parent AWT container.
Parameters:
bean - The object to be customized.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for the PropertyChange event. The customizer should fire a PropertyChange event whenever it changes the target bean in a way that might require the displayed properties to be refreshed.
Parameters:
listener - An object to be invoked when a PropertyChange event is fired.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.
Parameters:
listener - The PropertyChange listener to be removed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DesignMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface DesignMode

All Known Subinterfaces:
BeanContext, BeanContextServices
public interface DesignMode

This interface is intended to be implemented by, or delegated from, instances of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.

The JavaBeans specification defines the notion of design time as is a mode in which JavaBeans instances should function during their composition and customization in a interactive design, composition or construction tool, as opposed to runtime when the JavaBean is part of an applet, application, or other live Java executable abstraction.

Since:
1.2
See Also:
BeanContext, BeanContextChild, BeanContextMembershipListener, PropertyChangeEvent

Field Summary
static String PROPERTYNAME
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.
Method Summary
boolean | isDesignTime() A value of true denotes that JavaBeans should behave in design time mode, a value of false denotes runtime behavior.
void | setDesignTime(boolean designTime) Sets the "value" of the "designTime" property.

Field Detail

PROPERTYNAME

public static final String PROPERTYNAME
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.
Method Detail

setDesignTime

public void setDesignTime(boolean designTime)
Sets the "value" of the "designTime" property.

If the implementing object is an instance of java.beans.beancontext.BeanContext, or a subinterface thereof, then that BeanContext should fire a PropertyChangeEvent, to its registered BeanContextMembershipListeners, with parameters:

  • propertyName - java.beans.DesignMode.PROPERTYNAME
  • oldValue - previous value of "designTime"
  • newValue - current value of "designTime"
Note it is illegal for a BeanContextChild to invoke this method associated with a BeanContext that it is nested within.
Parameters:
designTime - the current "value" of the "designTime" property
See Also:
BeanContext, BeanContextMembershipListener, PropertyChangeEvent

isDesignTime

public boolean isDesignTime()
A value of true denotes that JavaBeans should behave in design time mode, a value of false denotes runtime behavior.
Returns:
the current "value" of the "designTime" property.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventSetDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class EventSetDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.EventSetDescriptor
public class EventSetDescriptor
extends FeatureDescriptor

An EventSetDescriptor describes a group of events that a given Java bean fires.

The given group of events are all delivered as method calls on a single event listener interface, and an event listener object can be registered via a call on a registration method supplied by the event source.

Constructor Summary
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String listenerMethodName)
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName)
This constructor creates an EventSetDescriptor from scratch using string names.
EventSetDescriptor(String eventSetName, Class listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
Method Summary
Method | getAddListenerMethod() Gets the method used to add event listeners.
MethodDescriptor[] | getListenerMethodDescriptors() Gets the MethodDescriptors of the target listener interface.
Method[] | getListenerMethods() Gets the methods of the target listener interface.
Class | getListenerType() Gets the Class object for the target interface.
Method | getRemoveListenerMethod() Gets the method used to remove event listeners.
boolean | isInDefaultEventSet() Report if an event set is in the "default set".
boolean | isUnicast() Normally event sources are multicast.
void | setInDefaultEventSet(boolean inDefaultEventSet) Mark an event set as being in the "default" set (or not).
void | setUnicast(boolean unicast) Mark an event set as unicast (or not).
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EventSetDescriptor

public EventSetDescriptor(Class sourceClass,
                          String eventSetName,
                          Class listenerType,
                          String listenerMethodName)
                   throws IntrospectionException
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
Parameters:
sourceClass - The class firing the event.
eventSetName - The programmatic name of the event. E.g. "fred". Note that this should normally start with a lower-case character.
listenerType - The target interface that events will get delivered to.
listenerMethodName - The method that will get called when the event gets delivered to its target listener interface.
Throws:
IntrospectionException - if an exception occurs during introspection.

EventSetDescriptor

public EventSetDescriptor(Class sourceClass,
                          String eventSetName,
                          Class listenerType,
                          String[] listenerMethodNames,
                          String addListenerMethodName,
                          String removeListenerMethodName)
                   throws IntrospectionException
This constructor creates an EventSetDescriptor from scratch using string names.
Parameters:
sourceClass - The class firing the event.
eventSetName - The programmatic name of the event set. Note that this should normally start with a lower-case character.
listenerType - The Class of the target interface that events will get delivered to.
listenerMethodNames - The names of the methods that will get called when the event gets delivered to its target listener interface.
addListenerMethodName - The name of the method on the event source that can be used to register an event listener object.
removeListenerMethodName - The name of the method on the event source that can be used to de-register an event listener object.
Throws:
IntrospectionException - if an exception occurs during introspection.

EventSetDescriptor

public EventSetDescriptor(String eventSetName,
                          Class listenerType,
                          Method[] listenerMethods,
                          Method addListenerMethod,
                          Method removeListenerMethod)
                   throws IntrospectionException
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
Parameters:
eventSetName - The programmatic name of the event set.
listenerType - The Class for the listener interface.
listenerMethods - An array of Method objects describing each of the event handling methods in the target listener.
addListenerMethod - The method on the event source that can be used to register an event listener object.
removeListenerMethod - The method on the event source that can be used to de-register an event listener object.
Throws:
IntrospectionException - if an exception occurs during introspection.

EventSetDescriptor

public EventSetDescriptor(String eventSetName,
                          Class listenerType,
                          MethodDescriptor[] listenerMethodDescriptors,
                          Method addListenerMethod,
                          Method removeListenerMethod)
                   throws IntrospectionException
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
Parameters:
eventSetName - The programmatic name of the event set.
listenerType - The Class for the listener interface.
listenerMethodDescriptors - An array of MethodDescriptor objects describing each of the event handling methods in the target listener.
addListenerMethod - The method on the event source that can be used to register an event listener object.
removeListenerMethod - The method on the event source that can be used to de-register an event listener object.
Throws:
IntrospectionException - if an exception occurs during introspection.
Method Detail

getListenerType

public Class getListenerType()
Gets the Class object for the target interface.
Returns:
The Class object for the target interface that will get invoked when the event is fired.

getListenerMethods

public Method[] getListenerMethods()
Gets the methods of the target listener interface.
Returns:
An array of Method objects for the target methods within the target listener interface that will get called when events are fired.

getListenerMethodDescriptors

public MethodDescriptor[] getListenerMethodDescriptors()
Gets the MethodDescriptors of the target listener interface.
Returns:
An array of MethodDescriptor objects for the target methods within the target listener interface that will get called when events are fired.

getAddListenerMethod

public Method getAddListenerMethod()
Gets the method used to add event listeners.
Returns:
The method used to register a listener at the event source.

getRemoveListenerMethod

public Method getRemoveListenerMethod()
Gets the method used to remove event listeners.
Returns:
The method used to remove a listener at the event source.

setUnicast

public void setUnicast(boolean unicast)
Mark an event set as unicast (or not).
Parameters:
unicast - True if the event set is unicast.

isUnicast

public boolean isUnicast()
Normally event sources are multicast. However there are some exceptions that are strictly unicast.
Returns:
True if the event set is unicast. Defaults to "false".

setInDefaultEventSet

public void setInDefaultEventSet(boolean inDefaultEventSet)
Mark an event set as being in the "default" set (or not). By default this is true.
Parameters:
unicast - True if the event set is unicast.

isInDefaultEventSet

public boolean isInDefaultEventSet()
Report if an event set is in the "default set".
Returns:
True if the event set is in the "default set". Defaults to "true".
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FeatureDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class FeatureDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
Direct Known Subclasses:
BeanDescriptor, EventSetDescriptor, MethodDescriptor, ParameterDescriptor, PropertyDescriptor
public class FeatureDescriptor
extends Object

The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.

It supports some common information that can be set and retrieved for any of the introspection descriptors.

In addition it provides an extension mechanism so that arbitrary attribute/value pairs can be associated with a design feature.

Constructor Summary
FeatureDescriptor()
Constructs a FeatureDescriptor.
Method Summary
Enumeration | attributeNames() Gets an enumeration of the locale-independent names of this feature.
String | getDisplayName() Gets the localized display name of this feature.
String | getName() Gets the programmatic name of this feature.
String | getShortDescription() Gets the short description of this feature.
Object | getValue(String attributeName) Retrieve a named attribute with this feature.
boolean | isExpert() The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.
boolean | isHidden() The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
boolean | isPreferred() The "preferred" flag is used to identify features that are particularly important for presenting to humans.
void | setDisplayName(String displayName) Sets the localized display name of this feature.
void | setExpert(boolean expert) The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.
void | setHidden(boolean hidden) The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
void | setName(String name) Sets the programmatic name of this feature.
void | setPreferred(boolean preferred) The "preferred" flag is used to identify features that are particularly important for presenting to humans.
void | setShortDescription(String text) You can associate a short descriptive string with a feature.
void | setValue(String attributeName, Object value) Associate a named attribute with this feature.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FeatureDescriptor

public FeatureDescriptor()
Constructs a FeatureDescriptor.
Method Detail

getName

public String getName()
Gets the programmatic name of this feature.
Returns:
The programmatic name of the property/method/event

setName

public void setName(String name)
Sets the programmatic name of this feature.
Parameters:
name - The programmatic name of the property/method/event

getDisplayName

public String getDisplayName()
Gets the localized display name of this feature.
Returns:
The localized display name for the property/method/event. This defaults to the same as its programmatic name from getName.

setDisplayName

public void setDisplayName(String displayName)
Sets the localized display name of this feature.
Parameters:
displayName - The localized display name for the property/method/event.

isExpert

public boolean isExpert()
The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.
Returns:
True if this feature is intended for use by experts only.

setExpert

public void setExpert(boolean expert)
The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.
Parameters:
expert - True if this feature is intended for use by experts only.

isHidden

public boolean isHidden()
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
Returns:
True if this feature should be hidden from human users.

setHidden

public void setHidden(boolean hidden)
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
Parameters:
hidden - True if this feature should be hidden from human users.

isPreferred

public boolean isPreferred()
The "preferred" flag is used to identify features that are particularly important for presenting to humans.
Returns:
True if this feature should be preferentially shown to human users.

setPreferred

public void setPreferred(boolean preferred)
The "preferred" flag is used to identify features that are particularly important for presenting to humans.
Parameters:
preferred - True if this feature should be preferentially shown to human users.

getShortDescription

public String getShortDescription()
Gets the short description of this feature.
Returns:
A localized short description associated with this property/method/event. This defaults to be the display name.

setShortDescription

public void setShortDescription(String text)
You can associate a short descriptive string with a feature. Normally these descriptive strings should be less than about 40 characters.
Parameters:
text - A (localized) short description to be associated with this property/method/event.

setValue

public void setValue(String attributeName,
                     Object value)
Associate a named attribute with this feature.
Parameters:
attributeName - The locale-independent name of the attribute
value - The value.

getValue

public Object getValue(String attributeName)
Retrieve a named attribute with this feature.
Parameters:
attributeName - The locale-independent name of the attribute
Returns:
The value of the attribute. May be null if the attribute is unknown.

attributeNames

public Enumeration attributeNames()
Gets an enumeration of the locale-independent names of this feature.
Returns:
An enumeration of the locale-independent names of any attributes that have been registered with setValue.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexedPropertyDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class IndexedPropertyDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.PropertyDescriptor
              |
              +--java.beans.IndexedPropertyDescriptor
public class IndexedPropertyDescriptor
extends PropertyDescriptor

An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.

An indexed property may also provide simple non-indexed read and write methods. If these are present, they read and write arrays of the type returned by the indexed read method.

Constructor Summary
IndexedPropertyDescriptor(String propertyName, Class beanClass)
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.
IndexedPropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName, String indexedGetterName, String indexedSetterName)
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
IndexedPropertyDescriptor(String propertyName, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
Method Summary
Class | getIndexedPropertyType() Gets the Class object of the indexed properties' type.
Method | getIndexedReadMethod() Gets the method that should be used to read an indexed property value.
Method | getIndexedWriteMethod() Gets the method that should be used to write an indexed property value.
void | setIndexedReadMethod(Method getter) Sets the method that should be used to read an indexed property value.
void | setIndexedWriteMethod(Method setter) Sets the method that should be used to write an indexed property value.
Methods inherited from class java.beans.PropertyDescriptor
getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexedPropertyDescriptor

public IndexedPropertyDescriptor(String propertyName,
                                 Class beanClass)
                          throws IntrospectionException
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.

Thus if the argument name is "fred", it will assume that there is an indexed reader method "getFred", a non-indexed (array) reader method also called "getFred", an indexed writer method "setFred", and finally a non-indexed writer method "setFred".

Parameters:
propertyName - The programmatic name of the property.
beanClass - The Class object for the target bean.
Throws:
IntrospectionException - if an exception occurs during introspection.

IndexedPropertyDescriptor

public IndexedPropertyDescriptor(String propertyName,
                                 Class beanClass,
                                 String getterName,
                                 String setterName,
                                 String indexedGetterName,
                                 String indexedSetterName)
                          throws IntrospectionException
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
Parameters:
propertyName - The programmatic name of the property.
beanClass - The Class object for the target bean.
getterName - The name of the method used for reading the property values as an array. May be null if the property is write-only or must be indexed.
setterName - The name of the method used for writing the property values as an array. May be null if the property is read-only or must be indexed.
indexedGetterName - The name of the method used for reading an indexed property value. May be null if the property is write-only.
indexedSetterName - The name of the method used for writing an indexed property value. May be null if the property is read-only.
Throws:
IntrospectionException - if an exception occurs during introspection.

IndexedPropertyDescriptor

public IndexedPropertyDescriptor(String propertyName,
                                 Method getter,
                                 Method setter,
                                 Method indexedGetter,
                                 Method indexedSetter)
                          throws IntrospectionException
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
Parameters:
propertyName - The programmatic name of the property.
getter - The method used for reading the property values as an array. May be null if the property is write-only or must be indexed.
setter - The method used for writing the property values as an array. May be null if the property is read-only or must be indexed.
indexedGetter - The method used for reading an indexed property value. May be null if the property is write-only.
indexedSetter - The method used for writing an indexed property value. May be null if the property is read-only.
Throws:
IntrospectionException - if an exception occurs during introspection.
Method Detail

getIndexedReadMethod

public Method getIndexedReadMethod()
Gets the method that should be used to read an indexed property value.
Returns:
The method that should be used to read an indexed property value. May return null if the property isn't indexed or is write-only.

setIndexedReadMethod

public void setIndexedReadMethod(Method getter)
                          throws IntrospectionException
Sets the method that should be used to read an indexed property value.
Parameters:
getter - The new indexed getter method.

getIndexedWriteMethod

public Method getIndexedWriteMethod()
Gets the method that should be used to write an indexed property value.
Returns:
The method that should be used to write an indexed property value. May return null if the property isn't indexed or is read-only.

setIndexedWriteMethod

public void setIndexedWriteMethod(Method setter)
                           throws IntrospectionException
Sets the method that should be used to write an indexed property value.
Parameters:
getter - The new indexed setter method.

getIndexedPropertyType

public Class getIndexedPropertyType()
Gets the Class object of the indexed properties' type. This is the type that will be returned by the indexedReadMethod.
Returns:
The Java Class for the indexed properties type. Note that the Class may describe a primitive Java type such as "int".
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntrospectionException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Class IntrospectionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.beans.IntrospectionException
All Implemented Interfaces:
Serializable
public class IntrospectionException
extends Exception

Thrown when an exception happens during Introspection.

Typical causes include not being able to map a string class name to a Class object, not being able to resolve a string method name, or specifying a method name that has the wrong type signature for its intended use.

See Also:
Serialized Form

Constructor Summary
IntrospectionException(String mess)
Constructs an IntrospectionException with a detailed message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IntrospectionException

public IntrospectionException(String mess)
Constructs an IntrospectionException with a detailed message.
Parameters:
mess - Descriptive message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Introspector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class Introspector

java.lang.Object
  |
  +--java.beans.Introspector
public class Introspector
extends Object

The Introspector class provides a standard way for tools to learn about the properties, events, and methods supported by a target Java Bean.

For each of those three kinds of information, the Introspector will separately analyze the bean's class and superclasses looking for either explicit or implicit information and use that information to build a BeanInfo object that comprehensively describes the target bean.

For each class "Foo", explicit information may be available if there exists a corresponding "FooBeanInfo" class that provides a non-null value when queried for the information. We first look for the BeanInfo class by taking the full package-qualified name of the target bean class and appending "BeanInfo" to form a new class name. If this fails, then we take the final classname component of this name, and look for that class in each of the packages specified in the BeanInfo package search path.

Thus for a class such as "sun.xyz.OurButton" we would first look for a BeanInfo class called "sun.xyz.OurButtonBeanInfo" and if that failed we'd look in each package in the BeanInfo search path for an OurButtonBeanInfo class. With the default search path, this would mean looking for "sun.beans.infos.OurButtonBeanInfo".

If a class provides explicit BeanInfo about itself then we add that to the BeanInfo information we obtained from analyzing any derived classes, but we regard the explicit information as being definitive for the current class and its base classes, and do not proceed any further up the superclass chain.

If we don't find explicit BeanInfo on a class, we use low-level reflection to study the methods of the class and apply standard design patterns to identify property accessors, event sources, or public methods. We then proceed to analyze the class's superclass and add in the information from it (and possibly on up the superclass chain).

For more information about introspection and design patterns, please consult the JavaBeans specification.

Field Summary
static int | IGNORE_ALL_BEANINFO
static int | IGNORE_IMMEDIATE_BEANINFO
static int | USE_ALL_BEANINFO
Method Summary
static String | decapitalize(String name) Utility method to take a string and convert it to normal Java variable name capitalization.
static void | flushCaches() Flush all of the Introspector's internal caches.
static void | flushFromCaches(Class clz) Flush the Introspector's internal cached information for a given class.
static BeanInfo | getBeanInfo(Class beanClass) Introspect on a Java bean and learn about all its properties, exposed methods, and events.
static BeanInfo | getBeanInfo(Class beanClass, Class stopClass) Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.
static BeanInfo | getBeanInfo(Class beanClass, int flags) Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
static String[] | getBeanInfoSearchPath() Gets the list of package names that will be used for finding BeanInfo classes.
static void | setBeanInfoSearchPath(String[] path) Change the list of package names that will be used for finding BeanInfo classes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

USE_ALL_BEANINFO

public static final int USE_ALL_BEANINFO

IGNORE_IMMEDIATE_BEANINFO

public static final int IGNORE_IMMEDIATE_BEANINFO

IGNORE_ALL_BEANINFO

public static final int IGNORE_ALL_BEANINFO
Method Detail

getBeanInfo

public static BeanInfo getBeanInfo(Class beanClass)
                            throws IntrospectionException
Introspect on a Java bean and learn about all its properties, exposed methods, and events.
Parameters:
beanClass - The bean class to be analyzed.
Returns:
A BeanInfo object describing the target bean.
Throws:
IntrospectionException - if an exception occurs during introspection.

getBeanInfo

public static BeanInfo getBeanInfo(Class beanClass,
                                   int flags)
                            throws IntrospectionException
Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
Parameters:
beanClass - The bean class to be analyzed.
flags - Flags to control the introspection. If flags == USE_ALL_BEANINFO then we use all of the BeanInfo classes we can discover. If flags == IGNORE_IMMEDIATE_BEANINFO then we ignore any BeanInfo associated with the specified beanClass. If flags == IGNORE_ALL_BEANINFO then we ignore all BeanInfo associated with the specified beanClass or any of its parent classes.
Returns:
A BeanInfo object describing the target bean.
Throws:
IntrospectionException - if an exception occurs during introspection.

getBeanInfo

public static BeanInfo getBeanInfo(Class beanClass,
                                   Class stopClass)
                            throws IntrospectionException
Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.
Parameters:
bean - The bean class to be analyzed.
stopClass - The baseclass at which to stop the analysis. Any methods/properties/events in the stopClass or in its baseclasses will be ignored in the analysis.
Throws:
IntrospectionException - if an exception occurs during introspection.

decapitalize

public static String decapitalize(String name)
Utility method to take a string and convert it to normal Java variable name capitalization. This normally means converting the first character from upper case to lower case, but in the (unusual) special case when there is more than one character and both the first and second characters are upper case, we leave it alone.

Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays as "URL".

Parameters:
name - The string to be decapitalized.
Returns:
The decapitalized version of the string.

getBeanInfoSearchPath

public static String[] getBeanInfoSearchPath()
Gets the list of package names that will be used for finding BeanInfo classes.
Returns:
The array of package names that will be searched in order to find BeanInfo classes.

This is initially set to {"sun.beans.infos"}.

setBeanInfoSearchPath

public static void setBeanInfoSearchPath(String[] path)
Change the list of package names that will be used for finding BeanInfo classes.

First, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.

Parameters:
path - Array of package names.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow setting of system properties.
See Also:
SecurityManager.checkPropertiesAccess()

flushCaches

public static void flushCaches()
Flush all of the Introspector's internal caches. This method is not normally required. It is normally only needed by advanced tools that update existing "Class" objects in-place and need to make the Introspector re-analyze existing Class objects.

flushFromCaches

public static void flushFromCaches(Class clz)
Flush the Introspector's internal cached information for a given class. This method is not normally required. It is normally only needed by advanced tools that update existing "Class" objects in-place and need to make the Introspector re-analyze an existing Class object. Note that only the direct state associated with the target Class object is flushed. We do not flush state for other Class objects with the same name, nor do we flush state for any related Class objects (such as subclasses), even though their state may include information indirectly obtained from the target Class object.
Parameters:
clz - Class object to be flushed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MethodDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class MethodDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.MethodDescriptor
public class MethodDescriptor
extends FeatureDescriptor

A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.

Constructor Summary
MethodDescriptor(Method method)
Constructs a MethodDescriptor from a Method.
MethodDescriptor(Method method, ParameterDescriptor[] parameterDescriptors)
Constructs a MethodDescriptor from a Method providing descriptive information for each of the method's parameters.
Method Summary
Method | getMethod() Gets the method that this MethodDescriptor encapsualtes.
ParameterDescriptor[] | getParameterDescriptors() Gets the ParameterDescriptor for each of this MethodDescriptor's method's parameters.
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MethodDescriptor

public MethodDescriptor(Method method)
Constructs a MethodDescriptor from a Method.
Parameters:
method - The low-level method information.

MethodDescriptor

public MethodDescriptor(Method method,
                        ParameterDescriptor[] parameterDescriptors)
Constructs a MethodDescriptor from a Method providing descriptive information for each of the method's parameters.
Parameters:
method - The low-level method information.
parameterDescriptors - Descriptive information for each of the method's parameters.
Method Detail

getMethod

public Method getMethod()
Gets the method that this MethodDescriptor encapsualtes.
Returns:
The low-level description of the method

getParameterDescriptors

public ParameterDescriptor[] getParameterDescriptors()
Gets the ParameterDescriptor for each of this MethodDescriptor's method's parameters.
Returns:
The locale-independent names of the parameters. May return a null array if the parameter names aren't known.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParameterDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class ParameterDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.ParameterDescriptor
public class ParameterDescriptor
extends FeatureDescriptor

The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.

Currently all our state comes from the FeatureDescriptor base class.

Constructor Summary
ParameterDescriptor()
Public default constructor.
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParameterDescriptor

public ParameterDescriptor()
Public default constructor.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.beans.PropertyChangeEvent
All Implemented Interfaces:
Serializable
public class PropertyChangeEvent
extends EventObject

A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property. A PropertyChangeEvent object is sent as an argument to the PropertyChangeListener and VetoableChangeListener methods.

Normally PropertyChangeEvents are accompanied by the name and the old and new value of the changed property. If the new value is a primitive type (such as int or boolean) it must be wrapped as the corresponding java.lang.* Object type (such as Integer or Boolean).

Null values may be provided for the old and the new values if their true values are not known.

An event source may send a null object as the name to indicate that an arbitrary set of if its properties have changed. In this case the old and new values should also be null.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
PropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue)
Constructs a new PropertyChangeEvent.
Method Summary
Object | getNewValue() Sets the new value for the property, expressed as an Object.
Object | getOldValue() Gets the old value for the property, expressed as an Object.
Object | getPropagationId() The "propagationId" field is reserved for future use.
String | getPropertyName() Gets the programmatic name of the property that was changed.
void | setPropagationId(Object propagationId) Sets the propagationId object for the event.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PropertyChangeEvent

public PropertyChangeEvent(Object source,
                           String propertyName,
                           Object oldValue,
                           Object newValue)
Constructs a new PropertyChangeEvent.
Parameters:
source - The bean that fired the event.
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.
Method Detail

getPropertyName

public String getPropertyName()
Gets the programmatic name of the property that was changed.
Returns:
The programmatic name of the property that was changed. May be null if multiple properties have changed.

getNewValue

public Object getNewValue()
Sets the new value for the property, expressed as an Object.
Returns:
The new value for the property, expressed as an Object. May be null if multiple properties have changed.

getOldValue

public Object getOldValue()
Gets the old value for the property, expressed as an Object.
Returns:
The old value for the property, expressed as an Object. May be null if multiple properties have changed.

setPropagationId

public void setPropagationId(Object propagationId)
Sets the propagationId object for the event.
Parameters:
propagationId - The propagationId object for the event.

getPropagationId

public Object getPropagationId()
The "propagationId" field is reserved for future use. In Beans 1.0 the sole requirement is that if a listener catches a PropertyChangeEvent and then fires a PropertyChangeEvent of its own, then it should make sure that it propagates the propagationId field from its incoming event to its outgoing event.
Returns:
the propagationId object associated with a bound/constrained property update.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface PropertyChangeListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
BeanContextSupport, JList.AccessibleJList, JTable.AccessibleJTable, DefaultTableColumnModel, BasicComboPopup.PropertyChangeHandler, BasicOptionPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicInternalFrameTitlePane.PropertyChangeHandler, BasicScrollBarUI.PropertyChangeHandler, BasicToolBarUI.PropertyListener, BasicButtonListener, BasicInternalFrameUI.InternalFramePropertyChangeListener, BasicListUI.PropertyChangeHandler, BasicLabelUI, BasicComboBoxUI.PropertyChangeHandler, BasicDirectoryModel, BasicColorChooserUI.PropertyHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicSplitPaneUI.PropertyHandler, BasicSplitPaneDivider, BasicScrollPaneUI.PropertyChangeHandler, BasicRootPaneUI, BasicSliderUI.PropertyChangeHandler, MetalFileChooserUI.FilterComboBoxModel, MetalToolBarUI.MetalRolloverListener
public interface PropertyChangeListener
extends EventListener

A "PropertyChange" event gets fired whenever a bean changes a "bound" property. You can register a PropertyChangeListener with a source bean so as to be notified of any bound property updates.

Method Summary
 void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyChangeSupport

java.lang.Object
  |
  +--java.beans.PropertyChangeSupport
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SwingPropertyChangeSupport
public class PropertyChangeSupport
extends Object
implements Serializable

This is a utility class that can be used by beans that support bound properties. You can use an instance of this class as a member field of your bean and delegate various work to it. This class is serializable. When it is serialized it will save (and restore) any listeners that are themselves serializable. Any non-serializable listeners will be skipped during serialization.

See Also:
Serialized Form

Constructor Summary
PropertyChangeSupport(Object sourceBean)
Constructs a PropertyChangeSupport object.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | firePropertyChange(PropertyChangeEvent evt) Fire an existing PropertyChangeEvent to any registered listeners.
void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Report a boolean bound property update to any registered listeners.
void | firePropertyChange(String propertyName, int oldValue, int newValue) Report an int bound property update to any registered listeners.
void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
boolean | hasListeners(String propertyName) Check if there are any listeners for a specific property.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PropertyChangeSupport

public PropertyChangeSupport(Object sourceBean)
Constructs a PropertyChangeSupport object.
Parameters:
sourceBean - The bean to be given as the source for any events.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - The PropertyChangeListener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(String propertyName,
                               int oldValue,
                               int newValue)
Report an int bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
Report a boolean bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.
Parameters:
evt - The PropertyChangeEvent object.

hasListeners

public boolean hasListeners(String propertyName)
Check if there are any listeners for a specific property.
Parameters:
propertyName - the property name.
Returns:
true if there are ore or more listeners for the given property
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyDescriptor

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--java.beans.PropertyDescriptor
Direct Known Subclasses:
IndexedPropertyDescriptor
public class PropertyDescriptor
extends FeatureDescriptor

A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.

Constructor Summary
PropertyDescriptor(String propertyName, Class beanClass)
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.
PropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName)
This constructor takes the name of a simple property, and method names for reading and writing the property.
PropertyDescriptor(String propertyName, Method getter, Method setter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
Method Summary
Class | getPropertyEditorClass() Gets any explicit PropertyEditor Class that has been registered for this property.
Class | getPropertyType() Gets the Class object for the property.
Method | getReadMethod() Gets the method that should be used to read the property value.
Method | getWriteMethod() Gets the method that should be used to write the property value.
boolean | isBound() Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
boolean | isConstrained() Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
void | setBound(boolean bound) Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
void | setConstrained(boolean constrained) Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
void | setPropertyEditorClass(Class propertyEditorClass) Normally PropertyEditors will be found using the PropertyEditorManager.
void | setReadMethod(Method getter) Sets the method that should be used to read the property value.
void | setWriteMethod(Method setter) Sets the method that should be used to write the property value.
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PropertyDescriptor

public PropertyDescriptor(String propertyName,
                          Class beanClass)
                   throws IntrospectionException
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods. Thus if the argument name is "fred", it will assume that the writer method is "setFred" and the reader method is "getFred" (or "isFred" for a boolean property). Note that the property name should start with a lower case character, which will be capitalized in the method names.
Parameters:
propertyName - The programmatic name of the property.
beanClass - The Class object for the target bean. For example sun.beans.OurButton.class.
Throws:
IntrospectionException - if an exception occurs during introspection.

PropertyDescriptor

public PropertyDescriptor(String propertyName,
                          Class beanClass,
                          String getterName,
                          String setterName)
                   throws IntrospectionException
This constructor takes the name of a simple property, and method names for reading and writing the property.
Parameters:
propertyName - The programmatic name of the property.
beanClass - The Class object for the target bean. For example sun.beans.OurButton.class.
getterName - The name of the method used for reading the property value. May be null if the property is write-only.
setterName - The name of the method used for writing the property value. May be null if the property is read-only.
Throws:
IntrospectionException - if an exception occurs during introspection.

PropertyDescriptor

public PropertyDescriptor(String propertyName,
                          Method getter,
                          Method setter)
                   throws IntrospectionException
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
Parameters:
propertyName - The programmatic name of the property.
getter - The method used for reading the property value. May be null if the property is write-only.
setter - The method used for writing the property value. May be null if the property is read-only.
Throws:
IntrospectionException - if an exception occurs during introspection.
Method Detail

getPropertyType

public Class getPropertyType()
Gets the Class object for the property.
Returns:
The Java type info for the property. Note that the "Class" object may describe a built-in Java type such as "int". The result may be "null" if this is an indexed property that does not support non-indexed access.

This is the type that will be returned by the ReadMethod.

getReadMethod

public Method getReadMethod()
Gets the method that should be used to read the property value.
Returns:
The method that should be used to read the property value. May return null if the property can't be read.

setReadMethod

public void setReadMethod(Method getter)
                   throws IntrospectionException
Sets the method that should be used to read the property value.
Parameters:
getter - The new getter method.

getWriteMethod

public Method getWriteMethod()
Gets the method that should be used to write the property value.
Returns:
The method that should be used to write the property value. May return null if the property can't be written.

setWriteMethod

public void setWriteMethod(Method setter)
                    throws IntrospectionException
Sets the method that should be used to write the property value.
Parameters:
setter - The new setter method.

isBound

public boolean isBound()
Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
Returns:
True if this is a bound property.

setBound

public void setBound(boolean bound)
Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed.
Parameters:
bound - True if this is a bound property.

isConstrained

public boolean isConstrained()
Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
Returns:
True if this is a constrained property.

setConstrained

public void setConstrained(boolean constrained)
Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed.
Parameters:
constrained - True if this is a constrained property.

setPropertyEditorClass

public void setPropertyEditorClass(Class propertyEditorClass)
Normally PropertyEditors will be found using the PropertyEditorManager. However if for some reason you want to associate a particular PropertyEditor with a given property, then you can do it with this method.
Parameters:
propertyEditorClass - The Class for the desired PropertyEditor.

getPropertyEditorClass

public Class getPropertyEditorClass()
Gets any explicit PropertyEditor Class that has been registered for this property.
Returns:
Any explicit PropertyEditor Class that has been registered for this property. Normally this will return "null", indicating that no special editor has been registered, so the PropertyEditorManager should be used to locate a suitable PropertyEditor.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface PropertyEditor

All Known Implementing Classes:
PropertyEditorSupport
public interface PropertyEditor

A PropertyEditor class provides support for GUIs that want to allow users to edit a property value of a given type.

PropertyEditor supports a variety of different kinds of ways of displaying and updating property values. Most PropertyEditors will only need to support a subset of the different options available in this API.

Simple PropertyEditors may only support the getAsText and setAsText methods and need not support (say) paintValue or getCustomEditor. More complex types may be unable to support getAsText and setAsText but will instead support paintValue and getCustomEditor.

Every propertyEditor must support one or more of the three simple display styles. Thus it can either (1) support isPaintable or (2) both return a non-null String[] from getTags() and return a non-null value from getAsText or (3) simply return a non-null String from getAsText().

Every property editor must support a call on setValue when the argument object is of the type for which this is the corresponding propertyEditor. In addition, each property editor must either support a custom editor, or support setAsText.

Each PropertyEditor should have a null constructor.

Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
String | getAsText() Gets the property value as text.
Component | getCustomEditor() A PropertyEditor may choose to make available a full custom Component that edits its property value.
String | getJavaInitializationString() This method is intended for use when generating Java code to set the value of the property.
String[] | getTags() If the property value must be one of a set of known tagged values, then this method should return an array of the tags.
Object | getValue() Gets the property value.
boolean | isPaintable() Determines whether this property editor is paintable.
void | paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.
void | setAsText(String text) Set the property value by parsing a given String.
void | setValue(Object value) Set (or change) the object that is to be edited.
boolean | supportsCustomEditor() Determines whether this property editor supports a custom editor.

Method Detail

setValue

public void setValue(Object value)
Set (or change) the object that is to be edited. Primitive types such as "int" must be wrapped as the corresponding object type such as "java.lang.Integer".
Parameters:
value - The new target object to be edited. Note that this object should not be modified by the PropertyEditor, rather the PropertyEditor should create a new object to hold any modified value.

getValue

public Object getValue()
Gets the property value.
Returns:
The value of the property. Primitive types such as "int" will be wrapped as the corresponding object type such as "java.lang.Integer".

isPaintable

public boolean isPaintable()
Determines whether this property editor is paintable.
Returns:
True if the class will honor the paintValue method.

paintValue

public void paintValue(Graphics gfx,
                       Rectangle box)
Paint a representation of the value into a given area of screen real estate. Note that the propertyEditor is responsible for doing its own clipping so that it fits into the given rectangle.

If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop.

The given Graphics object will have the default font, color, etc of the parent container. The PropertyEditor may change graphics attributes such as font and color and doesn't need to restore the old values.

Parameters:
gfx - Graphics object to paint into.
box - Rectangle within graphics object into which we should paint.

getJavaInitializationString

public String getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property. It should return a fragment of Java code that can be used to initialize a variable with the current property value.

Example results are "2", "new Color(127,127,34)", "Color.orange", etc.

Returns:
A fragment of Java code representing an initializer for the current value.

getAsText

public String getAsText()
Gets the property value as text.
Returns:
The property value as a human editable string.

Returns null if the value can't be expressed as an editable string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Set the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.
Parameters:
text - The string to be parsed.

getTags

public String[] getTags()
If the property value must be one of a set of known tagged values, then this method should return an array of the tags. This can be used to represent (for example) enum values. If a PropertyEditor supports tags, then it should support the use of setAsText with a tag value as a way of setting the value and the use of getAsText to identify the current value.
Returns:
The tag values for this property. May be null if this property cannot be represented as a tagged value.

getCustomEditor

public Component getCustomEditor()
A PropertyEditor may choose to make available a full custom Component that edits its property value. It is the responsibility of the PropertyEditor to hook itself up to its editor Component itself and to report property value changes by firing a PropertyChange event.

The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ...

Returns:
A java.awt.Component that will allow a human to directly edit the current property value. May be null if this is not supported.

supportsCustomEditor

public boolean supportsCustomEditor()
Determines whether this property editor supports a custom editor.
Returns:
True if the propertyEditor can provide a custom editor.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for the PropertyChange event. When a PropertyEditor changes its value it should fire a PropertyChange event on all registered PropertyChangeListeners, specifying the null value for the property name and itself as the source.
Parameters:
listener - An object to be invoked when a PropertyChange event is fired.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.
Parameters:
listener - The PropertyChange listener to be removed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyEditorManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyEditorManager

java.lang.Object
  |
  +--java.beans.PropertyEditorManager
public class PropertyEditorManager
extends Object

The PropertyEditorManager can be used to locate a property editor for any given type name. This property editor must support the java.beans.PropertyEditor interface for editing a given object.

The PropertyEditorManager uses three techniques for locating an editor for a given type. First, it provides a registerEditor method to allow an editor to be specifically registered for a given type. Second it tries to locate a suitable class by adding "Editor" to the full qualified classname of the given type (e.g. "foo.bah.FozEditor"). Finally it takes the simple classname (without the package name) adds "Editor" to it and looks in a search-path of packages for a matching class.

So for an input class foo.bah.Fred, the PropertyEditorManager would first look in its tables to see if an editor had been registered for foo.bah.Fred and if so use that. Then it will look for a foo.bah.FredEditor class. Then it will look for (say) standardEditorsPackage.FredEditor class.

Default PropertyEditors will be provided for the Java primitive types "boolean", "byte", "short", "int", "long", "float", and "double"; and for the classes java.lang.String. java.awt.Color, and java.awt.Font.

Constructor Summary
PropertyEditorManager()
Method Summary
static PropertyEditor | findEditor(Class targetType) Locate a value editor for a given target type.
static String[] | getEditorSearchPath() Gets the package names that will be searched for property editors.
static void | registerEditor(Class targetType, Class editorClass) Register an editor class to be used to editor values of a given target class.
static void | setEditorSearchPath(String[] path) Change the list of package names that will be used for finding property editors.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PropertyEditorManager

public PropertyEditorManager()
Method Detail

registerEditor

public static void registerEditor(Class targetType,
                                  Class editorClass)
Register an editor class to be used to editor values of a given target class.

First, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.

Parameters:
targetType - the Class object of the type to be edited
editorClass - the Class object of the editor class. If this is null, then any existing definition will be removed.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow setting of system properties.
See Also:
SecurityManager.checkPropertiesAccess()

findEditor

public static PropertyEditor findEditor(Class targetType)
Locate a value editor for a given target type.
Parameters:
targetType - The Class object for the type to be edited
Returns:
An editor object for the given target class. The result is null if no suitable editor can be found.

getEditorSearchPath

public static String[] getEditorSearchPath()
Gets the package names that will be searched for property editors.
Returns:
The array of package names that will be searched in order to find property editors.

This is initially set to {"sun.beans.editors"}.

setEditorSearchPath

public static void setEditorSearchPath(String[] path)
Change the list of package names that will be used for finding property editors.

First, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.

Parameters:
path - Array of package names.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow setting of system properties.
See Also:
SecurityManager.checkPropertiesAccess()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyEditorSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyEditorSupport

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
All Implemented Interfaces:
PropertyEditor
public class PropertyEditorSupport
extends Object
implements PropertyEditor

This is a support class to help build property editors.

It can be used either as a base class or as a delagatee.

Constructor Summary
protected | PropertyEditorSupport() Constructor for use by derived PropertyEditor classes.
protected | PropertyEditorSupport(Object source) Constructor for use when a PropertyEditor is delegating to us.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Register a listener for the PropertyChange event.
void | firePropertyChange() Report that we have been modified to any interested listeners.
String | getAsText() Gets the property value as a string suitable for presentation to a human to edit.
Component | getCustomEditor() A PropertyEditor may chose to make available a full custom Component that edits its property value.
String | getJavaInitializationString() This method is intended for use when generating Java code to set the value of the property.
String[] | getTags() If the property value must be one of a set of known tagged values, then this method should return an array of the tag values.
Object | getValue() Gets the value of the property.
boolean | isPaintable() Determines whether the class will honor the painValue method.
void | paintValue(Graphics gfx, Rectangle box) Paint a representation of the value into a given area of screen real estate.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a listener for the PropertyChange event.
void | setAsText(String text) Sets the property value by parsing a given String.
void | setValue(Object value) Set (or change) the object that is to be edited.
boolean | supportsCustomEditor() Determines whether the propertyEditor can provide a custom editor.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PropertyEditorSupport

protected PropertyEditorSupport()
Constructor for use by derived PropertyEditor classes.

PropertyEditorSupport

protected PropertyEditorSupport(Object source)
Constructor for use when a PropertyEditor is delegating to us.
Parameters:
source - The source to use for any events we fire.
Method Detail

setValue

public void setValue(Object value)
Set (or change) the object that is to be edited.
Specified by:
setValue in interface PropertyEditor
Parameters:
value - The new target object to be edited. Note that this object should not be modified by the PropertyEditor, rather the PropertyEditor should create a new object to hold any modified value.

getValue

public Object getValue()
Gets the value of the property.
Specified by:
getValue in interface PropertyEditor
Returns:
The value of the property.

isPaintable

public boolean isPaintable()
Determines whether the class will honor the painValue method.
Specified by:
isPaintable in interface PropertyEditor
Returns:
True if the class will honor the paintValue method.

paintValue

public void paintValue(Graphics gfx,
                       Rectangle box)
Paint a representation of the value into a given area of screen real estate. Note that the propertyEditor is responsible for doing its own clipping so that it fits into the given rectangle.

If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop.

Specified by:
paintValue in interface PropertyEditor
Parameters:
gfx - Graphics object to paint into.
box - Rectangle within graphics object into which we should paint.

getJavaInitializationString

public String getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property. It should return a fragment of Java code that can be used to initialize a variable with the current property value.

Example results are "2", "new Color(127,127,34)", "Color.orange", etc.

Specified by:
getJavaInitializationString in interface PropertyEditor
Returns:
A fragment of Java code representing an initializer for the current value.

getAsText

public String getAsText()
Gets the property value as a string suitable for presentation to a human to edit.
Specified by:
getAsText in interface PropertyEditor
Returns:
The property value as a string suitable for presentation to a human to edit.

Returns "null" is the value can't be expressed as a string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.
Specified by:
setAsText in interface PropertyEditor
Parameters:
text - The string to be parsed.

getTags

public String[] getTags()
If the property value must be one of a set of known tagged values, then this method should return an array of the tag values. This can be used to represent (for example) enum values. If a PropertyEditor supports tags, then it should support the use of setAsText with a tag value as a way of setting the value.
Specified by:
getTags in interface PropertyEditor
Returns:
The tag values for this property. May be null if this property cannot be represented as a tagged value.

getCustomEditor

public Component getCustomEditor()
A PropertyEditor may chose to make available a full custom Component that edits its property value. It is the responsibility of the PropertyEditor to hook itself up to its editor Component itself and to report property value changes by firing a PropertyChange event.

The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ...

Specified by:
getCustomEditor in interface PropertyEditor
Returns:
A java.awt.Component that will allow a human to directly edit the current property value. May be null if this is not supported.

supportsCustomEditor

public boolean supportsCustomEditor()
Determines whether the propertyEditor can provide a custom editor.
Specified by:
supportsCustomEditor in interface PropertyEditor
Returns:
True if the propertyEditor can provide a custom editor.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for the PropertyChange event. The class will fire a PropertyChange value whenever the value is updated.
Specified by:
addPropertyChangeListener in interface PropertyEditor
Parameters:
listener - An object to be invoked when a PropertyChange event is fired.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.
Specified by:
removePropertyChangeListener in interface PropertyEditor
Parameters:
listener - The PropertyChange listener to be removed.

firePropertyChange

public void firePropertyChange()
Report that we have been modified to any interested listeners.
Parameters:
source - The PropertyEditor that caused the event.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyVetoException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Class PropertyVetoException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.beans.PropertyVetoException
All Implemented Interfaces:
Serializable
public class PropertyVetoException
extends Exception

A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.

See Also:
Serialized Form

Constructor Summary
PropertyVetoException(String mess, PropertyChangeEvent evt)
Constructs a PropertyVetoException with a detailed message.
Method Summary
 PropertyChangeEvent getPropertyChangeEvent()
Gets the vetoed PropertyChangeEvent.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PropertyVetoException

public PropertyVetoException(String mess,
                             PropertyChangeEvent evt)
Constructs a PropertyVetoException with a detailed message.
Parameters:
mess - Descriptive message
evt - A PropertyChangeEvent describing the vetoed change.
Method Detail

getPropertyChangeEvent

public PropertyChangeEvent getPropertyChangeEvent()
Gets the vetoed PropertyChangeEvent.
Returns:
A PropertyChangeEvent describing the vetoed change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SimpleBeanInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Class SimpleBeanInfo

java.lang.Object
  |
  +--java.beans.SimpleBeanInfo
All Implemented Interfaces:
BeanInfo
public class SimpleBeanInfo
extends Object
implements BeanInfo

This is a support class to make it easier for people to provide BeanInfo classes.

It defaults to providing "noop" information, and can be selectively overriden to provide more explicit information on chosen topics. When the introspector sees the "noop" values, it will apply low level introspection and design patterns to automatically analyze the target bean.

Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
Constructor Summary
SimpleBeanInfo()
Method Summary
BeanInfo[] | getAdditionalBeanInfo() Claim there are no other relevant BeanInfo objects.
BeanDescriptor | getBeanDescriptor() Deny knowledge about the class and customizer of the bean.
int | getDefaultEventIndex() Deny knowledge of a default event.
int | getDefaultPropertyIndex() Deny knowledge of a default property.
EventSetDescriptor[] | getEventSetDescriptors() Deny knowledge of event sets.
Image | getIcon(int iconKind) Claim there are no icons available.
MethodDescriptor[] | getMethodDescriptors() Deny knowledge of methods.
PropertyDescriptor[] | getPropertyDescriptors() Deny knowledge of properties.
Image | loadImage(String resourceName) This is a utility method to help in loading icon images.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleBeanInfo

public SimpleBeanInfo()
Method Detail

getBeanDescriptor

public BeanDescriptor getBeanDescriptor()
Deny knowledge about the class and customizer of the bean. You can override this if you wish to provide explicit info.
Specified by:
getBeanDescriptor in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
A BeanDescriptor providing overall information about the bean, such as its displayName, its customizer, etc. May return null if the information should be obtained by automatic analysis.

getPropertyDescriptors

public PropertyDescriptor[] getPropertyDescriptors()
Deny knowledge of properties. You can override this if you wish to provide explicit property info.
Specified by:
getPropertyDescriptors in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

If a property is indexed, then its entry in the result array will belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of getPropertyDescriptors can use "instanceof" to check if a given PropertyDescriptor is an IndexedPropertyDescriptor.

getDefaultPropertyIndex

public int getDefaultPropertyIndex()
Deny knowledge of a default property. You can override this if you wish to define a default property for the bean.
Specified by:
getDefaultPropertyIndex in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
Index of default property in the PropertyDescriptor array returned by getPropertyDescriptors.

Returns -1 if there is no default property.

getEventSetDescriptors

public EventSetDescriptor[] getEventSetDescriptors()
Deny knowledge of event sets. You can override this if you wish to provide explicit event set info.
Specified by:
getEventSetDescriptors in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
An array of EventSetDescriptors describing the kinds of events fired by this bean. May return null if the information should be obtained by automatic analysis.

getDefaultEventIndex

public int getDefaultEventIndex()
Deny knowledge of a default event. You can override this if you wish to define a default event for the bean.
Specified by:
getDefaultEventIndex in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

Returns -1 if there is no default event.

getMethodDescriptors

public MethodDescriptor[] getMethodDescriptors()
Deny knowledge of methods. You can override this if you wish to provide explicit method info.
Specified by:
getMethodDescriptors in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
An array of MethodDescriptors describing the externally visible methods supported by this bean. May return null if the information should be obtained by automatic analysis.

getAdditionalBeanInfo

public BeanInfo[] getAdditionalBeanInfo()
Claim there are no other relevant BeanInfo objects. You may override this if you want to (for example) return a BeanInfo for a base class.
Specified by:
getAdditionalBeanInfo in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Returns:
an array of BeanInfo objects. May return null.

getIcon

public Image getIcon(int iconKind)
Claim there are no icons available. You can override this if you want to provide icons for your bean.
Specified by:
getIcon in interface BeanInfo
Following copied from interface: java.beans.BeanInfo
Parameters:
iconKind - The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32.
Returns:
An image object representing the requested icon. May return null if no suitable icon is available.

loadImage

public Image loadImage(String resourceName)
This is a utility method to help in loading icon images. It takes the name of a resource file associated with the current object's class file and loads an image object from that file. Typically images will be GIFs.

Parameters:
resourceName - A pathname relative to the directory holding the class file of the current class. For example, "wombat.gif".
Returns:
an image object. May be null if the load failed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VetoableChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface VetoableChangeListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
BeanContextSupport
public interface VetoableChangeListener
extends EventListener

A VetoableChange event gets fired whenever a bean changes a "constrained" property. You can register a VetoableChangeListener with a source bean so as to be notified of any constrained property updates.

Method Summary
 void vetoableChange(PropertyChangeEvent evt)
This method gets called when a constrained property is changed.

Method Detail

vetoableChange

public void vetoableChange(PropertyChangeEvent evt)
                    throws PropertyVetoException
This method gets called when a constrained property is changed.
Parameters:
evt - a PropertyChangeEvent object describing the event source and the property that has changed.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VetoableChangeSupport

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Class VetoableChangeSupport

java.lang.Object
  |
  +--java.beans.VetoableChangeSupport
All Implemented Interfaces:
Serializable
public class VetoableChangeSupport
extends Object
implements Serializable

This is a utility class that can be used by beans that support constrained properties. You can use an instance of this class as a member field of your bean and delegate various work to it. This class is serializable. When it is serialized it will save (and restore) any listeners that are themselves serializable. Any non-serializable listeners will be skipped during serialization.

See Also:
Serialized Form

Constructor Summary
VetoableChangeSupport(Object sourceBean)
Constructs a VetoableChangeSupport object.
Method Summary
void | addVetoableChangeListener(String propertyName, VetoableChangeListener listener) Add a VetoableChangeListener for a specific property.
void | addVetoableChangeListener(VetoableChangeListener listener) Add a VetoableListener to the listener list.
void | fireVetoableChange(PropertyChangeEvent evt) Fire a vetoable property update to any registered listeners.
void | fireVetoableChange(String propertyName, boolean oldValue, boolean newValue) Report a boolean vetoable property update to any registered listeners.
void | fireVetoableChange(String propertyName, int oldValue, int newValue) Report a int vetoable property update to any registered listeners.
void | fireVetoableChange(String propertyName, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
boolean | hasListeners(String propertyName) Check if there are any listeners for a specific property.
void | removeVetoableChangeListener(String propertyName, VetoableChangeListener listener) Remove a VetoableChangeListener for a specific property.
void | removeVetoableChangeListener(VetoableChangeListener listener) Remove a VetoableChangeListener from the listener list.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VetoableChangeSupport

public VetoableChangeSupport(Object sourceBean)
Constructs a VetoableChangeSupport object.
Parameters:
sourceBean - The bean to be given as the source for any events.
Method Detail

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Add a VetoableListener to the listener list. The listener is registered for all properties.
Parameters:
listener - The VetoableChangeListener to be added

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - The VetoableChangeListener to be removed

addVetoableChangeListener

public void addVetoableChangeListener(String propertyName,
                                      VetoableChangeListener listener)
Add a VetoableChangeListener for a specific property. The listener will be invoked only when a call on fireVetoableChange names that specific property.
Parameters:
propertyName - The name of the property to listen on.
listener - The VetoableChangeListener to be added

removeVetoableChangeListener

public void removeVetoableChangeListener(String propertyName,
                                         VetoableChangeListener listener)
Remove a VetoableChangeListener for a specific property.
Parameters:
propertyName - The name of the property that was listened on.
listener - The VetoableChangeListener to be removed

fireVetoableChange

public void fireVetoableChange(String propertyName,
                               Object oldValue,
                               Object newValue)
                        throws PropertyVetoException
Report a vetoable property update to any registered listeners. If anyone vetos the change, then fire a new event reverting everyone to the old value and then rethrow the PropertyVetoException.

No event is fired if old and new are equal and non-null.

Parameters:
propertyName - The programmatic name of the property that is about to change..
oldValue - The old value of the property.
newValue - The new value of the property.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

fireVetoableChange

public void fireVetoableChange(String propertyName,
                               int oldValue,
                               int newValue)
                        throws PropertyVetoException
Report a int vetoable property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general fireVetoableChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that is about to change.
oldValue - The old value of the property.
newValue - The new value of the property.

fireVetoableChange

public void fireVetoableChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
                        throws PropertyVetoException
Report a boolean vetoable property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general fireVetoableChange method that takes Object values.

Parameters:
propertyName - The programmatic name of the property that is about to change.
oldValue - The old value of the property.
newValue - The new value of the property.

fireVetoableChange

public void fireVetoableChange(PropertyChangeEvent evt)
                        throws PropertyVetoException
Fire a vetoable property update to any registered listeners. If anyone vetos the change, then fire a new event reverting everyone to the old value and then rethrow the PropertyVetoException.

No event is fired if old and new are equal and non-null.

Parameters:
evt - The PropertyChangeEvent to be fired.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

hasListeners

public boolean hasListeners(String propertyName)
Check if there are any listeners for a specific property.
Parameters:
propertyName - the property name.
Returns:
true if there are one or more listeners for the given property
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Visibility

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.beans
Interface Visibility

All Known Subinterfaces:
BeanContext, BeanContextServices
public interface Visibility

Under some circumstances a bean may be run on servers where a GUI is not available. This interface can be used to query a bean to determine whether it absolutely needs a gui, and to advise the bean whether a GUI is available.

This interface is for expert developers, and is not needed for normal simple beans. To avoid confusing end-users we avoid using getXXX setXXX design patterns for these methods.

Method Summary
boolean | avoidingGui() Determines whether this bean is avoiding using a GUI.
void | dontUseGui() This method instructs the bean that it should not use the Gui.
boolean | needsGui() Determines whether this bean needs a GUI.
void | okToUseGui() This method instructs the bean that it is OK to use the Gui.

Method Detail

needsGui

public boolean needsGui()
Determines whether this bean needs a GUI.
Returns:
True if the bean absolutely needs a GUI available in order to get its work done.

dontUseGui

public void dontUseGui()
This method instructs the bean that it should not use the Gui.

okToUseGui

public void okToUseGui()
This method instructs the bean that it is OK to use the Gui.

avoidingGui

public boolean avoidingGui()
Determines whether this bean is avoiding using a GUI.
Returns:
true if the bean is currently avoiding use of the Gui. e.g. due to a call on dontUseGui().
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.io Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.io

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.io.File (implements java.lang.Comparable, java.io.Serializable)
    • class java.io.FileDescriptor
    • class java.io.InputStream
      • class java.io.ByteArrayInputStream
      • class java.io.FileInputStream
      • class java.io.FilterInputStream
        • class java.io.BufferedInputStream
        • class java.io.DataInputStream (implements java.io.DataInput)
        • class java.io.LineNumberInputStream
        • class java.io.PushbackInputStream
      • class java.io.ObjectInputStream (implements java.io.ObjectInput, java.io.ObjectStreamConstants)
      • class java.io.PipedInputStream
      • class java.io.SequenceInputStream
      • class java.io.StringBufferInputStream
    • class java.io.ObjectInputStream.GetField
    • class java.io.ObjectOutputStream.PutField
    • class java.io.ObjectStreamClass (implements java.io.Serializable)
    • class java.io.ObjectStreamField (implements java.lang.Comparable)
    • class java.io.OutputStream
      • class java.io.ByteArrayOutputStream
      • class java.io.FileOutputStream
      • class java.io.FilterOutputStream
        • class java.io.BufferedOutputStream
        • class java.io.DataOutputStream (implements java.io.DataOutput)
        • class java.io.PrintStream
      • class java.io.ObjectOutputStream (implements java.io.ObjectOutput, java.io.ObjectStreamConstants)
      • class java.io.PipedOutputStream
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.io.SerializablePermission
      • class java.io.FilePermission (implements java.io.Serializable)
    • class java.io.RandomAccessFile (implements java.io.DataInput, java.io.DataOutput)
    • class java.io.Reader
      • class java.io.BufferedReader
        • class java.io.LineNumberReader
      • class java.io.CharArrayReader
      • class java.io.FilterReader
        • class java.io.PushbackReader
      • class java.io.InputStreamReader
        • class java.io.FileReader
      • class java.io.PipedReader
      • class java.io.StringReader
    • class java.io.StreamTokenizer
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.io.IOException
          • class java.io.CharConversionException
          • class java.io.EOFException
          • class java.io.FileNotFoundException
          • class java.io.InterruptedIOException
          • class java.io.ObjectStreamException
            • class java.io.InvalidClassException
            • class java.io.InvalidObjectException
            • class java.io.NotActiveException
            • class java.io.NotSerializableException
            • class java.io.OptionalDataException
            • class java.io.StreamCorruptedException
            • class java.io.WriteAbortedException
          • class java.io.SyncFailedException
          • class java.io.UnsupportedEncodingException
          • class java.io.UTFDataFormatException
    • class java.io.Writer
      • class java.io.BufferedWriter
      • class java.io.CharArrayWriter
      • class java.io.FilterWriter
      • class java.io.OutputStreamWriter
        • class java.io.FileWriter
      • class java.io.PipedWriter
      • class java.io.PrintWriter
      • class java.io.StringWriter

Interface Hierarchy

  • interface java.io.DataInput
    • interface java.io.ObjectInput
  • interface java.io.DataOutput
    • interface java.io.ObjectOutput
  • interface java.io.FileFilter
  • interface java.io.FilenameFilter
  • interface java.io.ObjectInputValidation
  • interface java.io.ObjectStreamConstants
  • interface java.io.Serializable
    • interface java.io.Externalizable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.io

Provides for system input and output through data streams, serialization and the file system.

See:
Description

Interface Summary
DataInput | The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
DataOutput | The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
Externalizable | Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
FileFilter | A filter for abstract pathnames.
FilenameFilter | Instances of classes that implement this interface are used to filter filenames.
ObjectInput | ObjectInput extends the DataInput interface to include the reading of objects.
ObjectInputValidation | Callback interface to allow validation of objects within a graph.
ObjectOutput | ObjectOutput extends the DataOutput interface to include writing of objects.
ObjectStreamConstants | Constants written into the Object Serialization Stream.
Serializable | Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Class Summary
BufferedInputStream | A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
BufferedOutputStream | The class implements a buffered output stream.
BufferedReader | Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
BufferedWriter | Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
ByteArrayInputStream | A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
ByteArrayOutputStream | This class implements an output stream in which the data is written into a byte array.
CharArrayReader | This class implements a character buffer that can be used as a character-input stream.
CharArrayWriter | This class implements a character buffer that can be used as an Writer.
DataInputStream | A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
DataOutputStream | A data input stream lets an application write primitive Java data types to an output stream in a portable way.
File | An abstract representation of file and directory pathnames.
FileDescriptor | Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
FileInputStream | A FileInputStream obtains input bytes from a file in a file system.
FileOutputStream | A file output stream is an output stream for writing data to a File or to a FileDescriptor.
FilePermission | This class represents access to a file or directory.
FileReader | Convenience class for reading character files.
FileWriter | Convenience class for writing character files.
FilterInputStream | A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream | This class is the superclass of all classes that filter output streams.
FilterReader | Abstract class for reading filtered character streams.
FilterWriter | Abstract class for writing filtered character streams.
InputStream | This abstract class is the superclass of all classes representing an input stream of bytes.
InputStreamReader | An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding.
LineNumberInputStream | Deprecated. This class incorrectly assumes that bytes adequately represent characters.
LineNumberReader | A buffered character-input stream that keeps track of line numbers.
ObjectInputStream | An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectInputStream.GetField | Provide access to the persistent fields read from the input stream.
ObjectOutputStream | An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
ObjectOutputStream.PutField | Provide programatic access to the persistent fields to be written to ObjectOutput.
ObjectStreamClass | Serialization's descriptor for classes.
ObjectStreamField | A description of a Serializable field from a Serializable class.
OutputStream | This abstract class is the superclass of all classes representing an output stream of bytes.
OutputStreamWriter | An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding.
PipedInputStream | A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
PipedOutputStream | A piped output stream can be connected to a piped input stream to create a communications pipe.
PipedReader | Piped character-input streams.
PipedWriter | Piped character-output streams.
PrintStream | A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter | Print formatted representations of objects to a text-output stream.
PushbackInputStream | A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
PushbackReader | A character-stream reader that allows characters to be pushed back into the stream.
RandomAccessFile | Instances of this class support both reading and writing to a random access file.
Reader | Abstract class for reading character streams.
SequenceInputStream | A SequenceInputStream represents the logical concatenation of other input streams.
SerializablePermission | This class is for Serializable permissions.
StreamTokenizer | The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
StringBufferInputStream | Deprecated. This class does not properly convert characters into bytes.
StringReader | A character stream whose source is a string.
StringWriter | A character stream that collects its output in a string buffer, which can then be used to construct a string.
Writer | Abstract class for writing to character streams.

Exception Summary
CharConversionException | Base class for character conversion exceptions.
EOFException | Signals that an end of file or end of stream has been reached unexpectedly during input.
FileNotFoundException | Signals that an attempt to open the file denoted by a specified pathname has failed.
InterruptedIOException | Signals that an I/O operation has been interrupted.
InvalidClassException | Thrown when the Serialization runtime detects one of the following problems with a Class.
InvalidObjectException | Indicates that one or more deserialized objects failed validation tests.
IOException | Signals that an I/O exception of some sort has occurred.
NotActiveException | Thrown when serialization or deserialization is not active.
NotSerializableException | Thrown when an instance is required to have a Serializable interface.
ObjectStreamException | Superclass of all exceptions specific to Object Stream classes.
OptionalDataException | Unexpected data appeared in an ObjectInputStream trying to read an Object.
StreamCorruptedException | Thrown when control information that was read from an object stream violates internal consistency checks.
SyncFailedException | Signals that a sync operation has failed.
UnsupportedEncodingException | The Character Encoding is not supported.
UTFDataFormatException | Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
WriteAbortedException | Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Package java.io Description

Provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Package Specification

  • Java Object Serialization Specification

Related Documentation

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

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Serializable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Interface Serializable

All Known Subinterfaces:
Attribute, Attributes, BindingIterator, Control, Current, CustomValue, DataInputStream, DataOutputStream, DomainManager, DSAPrivateKey, DSAPublicKey, ExtendedRequest, ExtendedResponse, Externalizable, IDLEntity, IDLType, IRObject, Key, Name, NamingContext, Policy, PrivateKey, PublicKey, RemoteRef, Repository, RSAPrivateCrtKey, RSAPrivateKey, RSAPublicKey, RunTime, ServerRef, StreamableValue, UnsolicitedNotification, ValueBase
public interface Serializable

Serializability of a class is enabled by the class implementing the java.io.Serializable interface. Classes that do not implement this interface will not have any of their state serialized or deserialized. All subtypes of a serializable class are themselves serializable. The serialization interface has no methods or fields and serves only to identify the semantics of being serializable.

To allow subtypes of non-serializable classes to be serialized, the subtype may assume responsibility for saving and restoring the state of the supertype's public, protected, and (if accessible) package fields. The subtype may assume this responsibility only if the class it extends has an accessible no-arg constructor to initialize the class's state. It is an error to declare a class Serializable in this case. The error will be detected at runtime.

During deserialization, the fields of non-serializable classes will be initialized using the public or protected no-arg constructor of the class. A no-arg constructor must be accessible to the subclass that is serializable. The fields of serializable subclasses will be restored from the stream.

When traversing a graph, an object may be encountered that does not support the Serializable interface. In this case the NotSerializableException will be thrown and will identify the class of the non-serializable object.

Classes that require special handling during the serialization and deserialization process must implement special methods with these exact signatures:

 private void writeObject(java.io.ObjectOutputStream out)
     throws IOException
 private void readObject(java.io.ObjectInputStream in)
     throws IOException, ClassNotFoundException;

The writeObject method is responsible for writing the state of the object for its particular class so that the corresponding readObject method can restore it. The default mechanism for saving the Object's fields can be invoked by calling out.defaultWriteObject. The method does not need to concern itself with the state belonging to its superclasses or subclasses. State is saved by writing the individual fields to the ObjectOutputStream using the writeObject method or by using the methods for primitive data types supported by DataOutput.

The readObject method is responsible for reading from the stream and restoring the classes fields. It may call in.defaultReadObject to invoke the default mechanism for restoring the object's non-static and non-transient fields. The defaultReadObject method uses information in the stream to assign the fields of the object saved in the stream with the correspondingly named fields in the current object. This handles the case when the class has evolved to add new fields. The method does not need to concern itself with the state belonging to its superclasses or subclasses. State is saved by writing the individual fields to the ObjectOutputStream using the writeObject method or by using the methods for primitive data types supported by DataOutput.

Serializable classes that need to designate an alternative object to be used when writing an object to the stream should implement this special method with the exact signature:

 ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;

This writeReplace method is invoked by serialization if the method exists and it would be accessible from a method defined within the class of the object being serialized. Thus, the method can have private, protected and package-private access. Subclass access to this method follows java accessibility rules.

Classes that need to designate a replacement when an instance of it is read from the stream should implement this special method with the exact signatute.

 ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;

This readResolve method follows the same invocation rules and accessibility rules as writeReplace.

Since:
JDK1.1
See Also:
ObjectOutputStream, ObjectInputStream, ObjectOutput, ObjectInput, Externalizable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Package java.io

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.io

Packages that use java.io
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in java.io used by java.applet
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt
FilenameFilter
Instances of classes that implement this interface are used to filter filenames.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.color
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectStreamException
Superclass of all exceptions specific to Object Stream classes.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.datatransfer
Externalizable
Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectInput
ObjectInput extends the DataInput interface to include the reading of objects.
ObjectOutput
ObjectOutput extends the DataOutput interface to include writing of objects.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.dnd
IOException
Signals that an I/O exception of some sort has occurred.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.event
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.font
InvalidObjectException
Indicates that one or more deserialized objects failed validation tests.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.geom
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.image
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.image.renderable
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.awt.print
IOException
Signals that an I/O exception of some sort has occurred.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.beans
IOException
Signals that an I/O exception of some sort has occurred.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.beans.beancontext
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectInputStream
An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.io
BufferedReader
Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
DataInput
The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
DataOutput
The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
File
An abstract representation of file and directory pathnames.
FileDescriptor
Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
FileFilter
A filter for abstract pathnames.
FilenameFilter
Instances of classes that implement this interface are used to filter filenames.
FileNotFoundException
Signals that an attempt to open the file denoted by a specified pathname has failed.
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
FilterReader
Abstract class for reading filtered character streams.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding.
InvalidObjectException
Indicates that one or more deserialized objects failed validation tests.
IOException
Signals that an I/O exception of some sort has occurred.
NotActiveException
Thrown when serialization or deserialization is not active.
ObjectInput
ObjectInput extends the DataInput interface to include the reading of objects.
ObjectInputStream.GetField
Provide access to the persistent fields read from the input stream.
ObjectInputValidation
Callback interface to allow validation of objects within a graph.
ObjectOutput
ObjectOutput extends the DataOutput interface to include writing of objects.
ObjectOutputStream.PutField
Provide programatic access to the persistent fields to be written to ObjectOutput.
ObjectStreamClass
Serialization's descriptor for classes.
ObjectStreamConstants
Constants written into the Object Serialization Stream.
ObjectStreamException
Superclass of all exceptions specific to Object Stream classes.
ObjectStreamField
A description of a Serializable field from a Serializable class.
OptionalDataException
Unexpected data appeared in an ObjectInputStream trying to read an Object.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
OutputStreamWriter
An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding.
PipedInputStream
A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
PipedOutputStream
A piped output stream can be connected to a piped input stream to create a communications pipe.
PipedReader
Piped character-input streams.
PipedWriter
Piped character-output streams.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
SerializablePermission
This class is for Serializable permissions.
StreamCorruptedException
Thrown when control information that was read from an object stream violates internal consistency checks.
SyncFailedException
Signals that a sync operation has failed.
UnsupportedEncodingException
The Character Encoding is not supported.
Writer
Abstract class for writing to character streams.

Classes in java.io used by java.lang
File
An abstract representation of file and directory pathnames.
FileDescriptor
Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
UnsupportedEncodingException
The Character Encoding is not supported.

Classes in java.io used by java.lang.reflect
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.math
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.net
FileDescriptor
Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.rmi
IOException
Signals that an I/O exception of some sort has occurred.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.rmi.activation
IOException
Signals that an I/O exception of some sort has occurred.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.rmi.dgc
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.rmi.server
DataInput
The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
DataOutput
The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
Externalizable
Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectInput
ObjectInput extends the DataInput interface to include the reading of objects.
ObjectOutput
ObjectOutput extends the DataOutput interface to include writing of objects.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
StreamCorruptedException
Thrown when control information that was read from an object stream violates internal consistency checks.

Classes in java.io used by java.security
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.security.acl
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.security.cert
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
ObjectStreamException
Superclass of all exceptions specific to Object Stream classes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.security.interfaces
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.security.spec
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.sql
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.text
InvalidObjectException
Indicates that one or more deserialized objects failed validation tests.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.util
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.util.jar
File
An abstract representation of file and directory pathnames.
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by java.util.zip
File
An abstract representation of file and directory pathnames.
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.naming
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter
Print formatted representations of objects to a text-output stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.naming.directory
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.naming.event
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.naming.ldap
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.naming.spi
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.rmi.CORBA
IOException
Signals that an I/O exception of some sort has occurred.
ObjectInputStream
An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.sound.midi
File
An abstract representation of file and directory pathnames.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.sound.midi.spi
File
An abstract representation of file and directory pathnames.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.

Classes in java.io used by javax.sound.sampled
File
An abstract representation of file and directory pathnames.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.sound.sampled.spi
File
An abstract representation of file and directory pathnames.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.

Classes in java.io used by javax.swing
File
An abstract representation of file and directory pathnames.
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.border
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.colorchooser
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.event
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.filechooser
File
An abstract representation of file and directory pathnames.
IOException
Signals that an I/O exception of some sort has occurred.

Classes in java.io used by javax.swing.plaf
File
An abstract representation of file and directory pathnames.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.plaf.basic
File
An abstract representation of file and directory pathnames.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.plaf.metal
File
An abstract representation of file and directory pathnames.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.plaf.multi
File
An abstract representation of file and directory pathnames.

Classes in java.io used by javax.swing.table
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.text
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
ObjectInputStream
An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
Writer
Abstract class for writing to character streams.

Classes in java.io used by javax.swing.text.html
IOException
Signals that an I/O exception of some sort has occurred.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
Writer
Abstract class for writing to character streams.

Classes in java.io used by javax.swing.text.html.parser
DataInputStream
A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
IOException
Signals that an I/O exception of some sort has occurred.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.text.rtf
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
IOException
Signals that an I/O exception of some sort has occurred.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Reader
Abstract class for reading character streams.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
Writer
Abstract class for writing to character streams.

Classes in java.io used by javax.swing.tree
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.swing.undo
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by javax.transaction
IOException
Signals that an I/O exception of some sort has occurred.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA_2_3.portable
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA.DynAnyPackage
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA.ORBPackage
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA.portable
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
OutputStream
This abstract class is the superclass of all classes representing an output stream of bytes.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CORBA.TypeCodePackage
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CosNaming
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.CosNaming.NamingContextPackage
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.SendingContext
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Classes in java.io used by org.omg.stub.java.rmi
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


BufferedInputStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Class BufferedInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.io.BufferedInputStream
public class BufferedInputStream
extends FilterInputStream

A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods. When the BufferedInputStream is created, an internal buffer array is created. As bytes from the stream are read or skipped, the internal buffer is refilled as necessary from the contained input stream, many bytes at a time. The mark operation remembers a point in the input stream and the reset operation causes all the bytes read since the most recent mark operation to be reread before new bytes are taken from the contained input stream.

Since:
JDK1.0

Field Summary
protected byte[] | buf The internal buffer array where the data is stored.
protected int | count The index one greater than the index of the last valid byte in the buffer.
protected int | marklimit The maximum read ahead allowed after a call to the mark method before subsequent calls to the reset method fail.
protected int | markpos The value of the pos field at the time the last mark method was called.
protected int | pos The current position in the buffer.
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
BufferedInputStream(InputStream in)
Creates a BufferedInputStream and saves its argument, the input stream in, for later use.
BufferedInputStream(InputStream in, int size)
Creates a BufferedInputStream with the specified buffer size, and saves its argument, the input stream in, for later use.
Method Summary
int | available() Returns the number of bytes that can be read from this input stream without blocking.
void | close() Closes this input stream and releases any system resources associated with the stream.
void | mark(int readlimit) See the general contract of the mark method of InputStream.
boolean | markSupported() Tests if this input stream supports the mark and reset methods.
int | read() See the general contract of the read method of InputStream.
int | read(byte[] b, int off, int len) Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.
void | reset() See the general contract of the reset method of InputStream.
long | skip(long n) See the general contract of the skip method of InputStream.
Methods inherited from class java.io.FilterInputStream
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buf

protected byte[] buf
The internal buffer array where the data is stored. When necessary, it may be replaced by another array of a different size.

count

protected int count
The index one greater than the index of the last valid byte in the buffer. This value is always in the range 0 through buf.length; elements buf[0] through buf[count-1] contain buffered input data obtained from the underlying input stream.

pos

protected int pos
The current position in the buffer. This is the index of the next character to be read from the buf array.

This value is always in the range 0 through count. If it is less than count, then buf[pos] is the next byte to be supplied as input; if it is equal to count, then the next read or skip operation will require more bytes to be read from the contained input stream.

See Also:
buf

markpos

protected int markpos
The value of the pos field at the time the last mark method was called.

This value is always in the range -1 through pos. If there is no marked position in the input stream, this field is -1. If there is a marked position in the input stream, then buf[markpos] is the first byte to be supplied as input after a reset operation. If markpos is not -1, then all bytes from positions buf[markpos] through buf[pos-1] must remain in the buffer array (though they may be moved to another place in the buffer array, with suitable adjustments to the values of count, pos, and markpos); they may not be discarded unless and until the difference between pos and markpos exceeds marklimit.

See Also:
mark(int), pos

marklimit

protected int marklimit
The maximum read ahead allowed after a call to the mark method before subsequent calls to the reset method fail. Whenever the difference between pos and markpos exceeds marklimit, then the mark may be dropped by setting markpos to -1.
See Also:
mark(int), reset()
Constructor Detail

BufferedInputStream

public BufferedInputStream(InputStream in)
Creates a BufferedInputStream and saves its argument, the input stream in, for later use. An internal buffer array is created and stored in buf.
Parameters:
in - the underlying input stream.

BufferedInputStream

public BufferedInputStream(InputStream in,
                           int size)
Creates a BufferedInputStream with the specified buffer size, and saves its argument, the input stream in, for later use. An internal buffer array of length size is created and stored in buf.
Parameters:
in - the underlying input stream.
size - the buffer size.
Throws:
IllegalArgumentException - if size <= 0.
Method Detail

read

public int read()
         throws IOException
See the general contract of the read method of InputStream.
Overrides:
read in class FilterInputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.

This method implements the general contract of the corresponding read method of the InputStream class. As an additional convenience, it attempts to read as many bytes as possible by repeatedly invoking the read method of the underlying stream. This iterated read continues until one of the following conditions becomes true:

  • The specified number of bytes have been read,
  • The read method of the underlying stream returns -1, indicating end-of-file, or
  • The available method of the underlying stream returns zero, indicating that further input requests would block.
If the first read on the underlying stream returns -1 to indicate end-of-file then this method returns -1. Otherwise this method returns the number of bytes actually read.

Subclasses of this class are encouraged, but not required, to attempt to read as many bytes as possible in the same fashion.

Overrides:
read in class FilterInputStream
Parameters:
b - destination buffer.
off - offset at which to start storing bytes.
len - maximum number of bytes to read.
Returns:
the number of bytes read, or -1 if the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.

skip

public long skip(long n)
          throws IOException
See the general contract of the skip method of InputStream.
Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Returns the number of bytes that can be read from this input stream without blocking.

The available method of BufferedInputStream returns the sum of the the number of bytes remaining to be read in the buffer (count - pos) and the result of calling the available method of the underlying input stream.

Overrides:
available in class FilterInputStream
Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

mark

public void mark(int readlimit)
See the general contract of the mark method of InputStream.
Overrides:
mark in class FilterInputStream
Parameters:
readlimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
See Also:
reset()

reset

public void reset()
           throws IOException
See the general contract of the reset method of InputStream.

If markpos is -1 (no mark has been set or the mark has been invalidated), an IOException is thrown. Otherwise, pos is set equal to markpos.

Overrides:
reset in class FilterInputStream
Throws:
IOException - if this stream has not been marked or if the mark has been invalidated.
See Also:
mark(int)

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods. The markSupported method of BufferedInputStream returns true.
Overrides:
markSupported in class FilterInputStream
Returns:
a boolean indicating if this stream type supports the mark and reset methods.
See Also:
InputStream.mark(int), InputStream.reset()

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream.
Overrides:
close in class FilterInputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BufferedOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class BufferedOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.BufferedOutputStream
public class BufferedOutputStream
extends FilterOutputStream

The class implements a buffered output stream. By setting up such an output stream, an application can write bytes to the underlying output stream without necessarily causing a call to the underlying system for each byte written. The data is written into an internal buffer, and then written to the underlying stream if the buffer reaches its capacity, the buffer output stream is closed, or the buffer output stream is explicitly flushed.

Since:
JDK1.0

Field Summary
protected byte[] | buf The internal buffer where data is stored.
protected int | count The number of valid bytes in the buffer.
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
BufferedOutputStream(OutputStream out)
Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
BufferedOutputStream(OutputStream out, int size)
Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
Method Summary
void | flush() Flushes this buffered output stream.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this buffered output stream.
void | write(int b) Writes the specified byte to this buffered output stream.
Methods inherited from class java.io.FilterOutputStream
close, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buf

protected byte[] buf
The internal buffer where data is stored.

count

protected int count
The number of valid bytes in the buffer. This value is always in the range 0 through buf.length; elements buf[0] through buf[count-1] contain valid byte data.
Constructor Detail

BufferedOutputStream

public BufferedOutputStream(OutputStream out)
Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
Parameters:
out - the underlying output stream.

BufferedOutputStream

public BufferedOutputStream(OutputStream out,
                            int size)
Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
Parameters:
out - the underlying output stream.
size - the buffer size.
Throws:
IllegalArgumentException - if size <= 0.
Method Detail

write

public void write(int b)
           throws IOException
Writes the specified byte to this buffered output stream.
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this buffered output stream.

Ordinarily this method stores bytes from the given array into this stream's buffer, flushing the buffer to the underlying output stream as needed. If the requested length is at least as large as this stream's buffer, however, then this method will flush the buffer and write the bytes directly to the underlying output stream. Thus redundant BufferedOutputStreams will not copy data unnecessarily.

Overrides:
write in class FilterOutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.

flush

public void flush()
           throws IOException
Flushes this buffered output stream. This forces any buffered output bytes to be written out to the underlying output stream.
Overrides:
flush in class FilterOutputStream
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class BufferedReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.BufferedReader
Direct Known Subclasses:
LineNumberReader
public class BufferedReader
extends Reader

Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.

The buffer size may be specified, or the default size may be used. The default is large enough for most purposes.

In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,

 BufferedReader in
   = new BufferedReader(new FileReader("foo.in"));
will buffer the input from the specified file. Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.

Programs that use DataInputStreams for textual input can be localized by replacing each DataInputStream with an appropriate BufferedReader.

Since:
JDK1.1
See Also:
FileReader, InputStreamReader

Fields inherited from class java.io.Reader
lock
Constructor Summary
BufferedReader(Reader in)
Create a buffering character-input stream that uses a default-sized input buffer.
BufferedReader(Reader in, int sz)
Create a buffering character-input stream that uses an input buffer of the specified size.
Method Summary
 void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
 int read()
Read a single character.
 int read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 String readLine()
Read a line of text.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream to the most recent mark.
 long skip(long n)
Skip characters.
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BufferedReader

public BufferedReader(Reader in,
                      int sz)
Create a buffering character-input stream that uses an input buffer of the specified size.
Parameters:
in - A Reader
sz - Input-buffer size
Throws:
IllegalArgumentException - If sz is <= 0

BufferedReader

public BufferedReader(Reader in)
Create a buffering character-input stream that uses a default-sized input buffer.
Parameters:
in - A Reader
Method Detail

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class Reader
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.

This method implements the general contract of the corresponding read method of the Reader class. As an additional convenience, it attempts to read as many characters as possible by repeatedly invoking the read method of the underlying stream. This iterated read continues until one of the following conditions becomes true:

  • The specified number of characters have been read,
  • The read method of the underlying stream returns -1, indicating end-of-file, or
  • The ready method of the underlying stream returns false, indicating that further input requests would block.
If the first read on the underlying stream returns -1 to indicate end-of-file then this method returns -1. Otherwise this method returns the number of characters actually read.

Subclasses of this class are encouraged, but not required, to attempt to read as many characters as possible in the same fashion.

Ordinarily this method takes characters from this stream's character buffer, filling it from the underlying stream as necessary. If, however, the buffer is empty, the mark is not valid, and the requested length is at least as large as the buffer, then this method will read characters directly from the underlying stream into the given array. Thus redundant BufferedReaders will not copy data unnecessarily.

Overrides:
read in class Reader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

readLine

public String readLine()
                throws IOException
Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
Returns:
A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip

public long skip(long n)
          throws IOException
Skip characters.
Overrides:
skip in class Reader
Parameters:
n - The number of characters to skip
Returns:
The number of characters actually skipped
Throws:
IllegalArgumentException - If n is negative.
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read. A buffered character stream is ready if the buffer is not empty, or if the underlying character stream is ready.
Overrides:
ready in class Reader
Throws:
IOException - If an I/O error occurs

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
Overrides:
markSupported in class Reader
Following copied from class: java.io.Reader
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point.
Overrides:
mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail. A limit value larger than the size of the input buffer will cause a new buffer to be allocated whose size is no smaller than limit. Therefore large values should be used with care.
Throws:
IllegalArgumentException - If readAheadLimit is <0
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream to the most recent mark.
Overrides:
reset in class Reader
Throws:
IOException - If the stream has never been marked, or if the mark has been invalidated

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Reader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class BufferedWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.BufferedWriter
public class BufferedWriter
extends Writer

Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.

The buffer size may be specified, or the default size may be accepted. The default is large enough for most purposes.

A newLine() method is provided, which uses the platform's own notion of line separator as defined by the system property line.separator. Not all platforms use the newline character ('\n') to terminate lines. Calling this method to terminate each output line is therefore preferred to writing a newline character directly.

In general, a Writer sends its output immediately to the underlying character or byte stream. Unless prompt output is required, it is advisable to wrap a BufferedWriter around any Writer whose write() operations may be costly, such as FileWriters and OutputStreamWriters. For example,

 PrintWriter out
   = new PrintWriter(new BufferedWriter(new FileWriter("foo.out")));
will buffer the PrintWriter's output to the file. Without buffering, each invocation of a print() method would cause characters to be converted into bytes that would then be written immediately to the file, which can be very inefficient.

Since:
JDK1.1
See Also:
PrintWriter, FileWriter, OutputStreamWriter

Fields inherited from class java.io.Writer
lock
Constructor Summary
BufferedWriter(Writer out)
Create a buffered character-output stream that uses a default-sized output buffer.
BufferedWriter(Writer out, int sz)
Create a new buffered character-output stream that uses an output buffer of the given size.
Method Summary
void | close() Close the stream.
void | flush() Flush the stream.
void | newLine() Write a line separator.
void | write(char[] cbuf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String s, int off, int len) Write a portion of a String.
Methods inherited from class java.io.Writer
write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BufferedWriter

public BufferedWriter(Writer out)
Create a buffered character-output stream that uses a default-sized output buffer.
Parameters:
out - A Writer

BufferedWriter

public BufferedWriter(Writer out,
                      int sz)
Create a new buffered character-output stream that uses an output buffer of the given size.
Parameters:
out - A Writer
sz - Output-buffer size, a positive integer
Throws:
IllegalArgumentException - If sz is <= 0
Method Detail

write

public void write(int c)
           throws IOException
Write a single character.
Overrides:
write in class Writer
Throws:
IOException - If an I/O error occurs

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Write a portion of an array of characters.

Ordinarily this method stores characters from the given array into this stream's buffer, flushing the buffer to the underlying stream as needed. If the requested length is at least as large as the buffer, however, then this method will flush the buffer and write the characters directly to the underlying stream. Thus redundant BufferedWriters will not copy data unnecessarily.

Overrides:
write in class Writer
Parameters:
cbuf - A character array
off - Offset from which to start reading characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

write

public void write(String s,
                  int off,
                  int len)
           throws IOException
Write a portion of a String.
Overrides:
write in class Writer
Parameters:
s - String to be written
off - Offset from which to start reading characters
len - Number of characters to be written
Throws:
IOException - If an I/O error occurs

newLine

public void newLine()
             throws IOException
Write a line separator. The line separator string is defined by the system property line.separator, and is not necessarily a single newline ('\n') character.
Throws:
IOException - If an I/O error occurs

flush

public void flush()
           throws IOException
Flush the stream.
Overrides:
flush in class Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Writer
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteArrayInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ByteArrayInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.ByteArrayInputStream
public class ByteArrayInputStream
extends InputStream

A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.

Since:
JDK1.0
See Also:
StringBufferInputStream

Field Summary
protected byte[] | buf An array of bytes that was provided by the creator of the stream.
protected int | count The index one greater than the last valid character in the input stream buffer.
protected int | mark The currently marked position in the stream.
protected int | pos The index of the next character to read from the input stream buffer.
Constructor Summary
ByteArrayInputStream(byte[] buf)
Creates a ByteArrayInputStream so that it uses buf as its buffer array.
ByteArrayInputStream(byte[] buf, int offset, int length)
Creates ByteArrayInputStream that uses buf as its buffer array.
Method Summary
int | available() Returns the number of bytes that can be read from this input stream without blocking.
void | close() Closes this input stream and releases any system resources associated with the stream.
void | mark(int readAheadLimit) Set the current marked position in the stream.
boolean | markSupported() Tests if ByteArrayInputStream supports mark/reset.
int | read() Reads the next byte of data from this input stream.
int | read(byte[] b, int off, int len) Reads up to len bytes of data into an array of bytes from this input stream.
void | reset() Resets the buffer to the marked position.
long | skip(long n) Skips n bytes of input from this input stream.
Methods inherited from class java.io.InputStream
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buf

protected byte[] buf
An array of bytes that was provided by the creator of the stream. Elements buf[0] through buf[count-1] are the only bytes that can ever be read from the stream; element buf[pos] is the next byte to be read.

pos

protected int pos
The index of the next character to read from the input stream buffer. This value should always be nonnegative and not larger than the value of count. The next byte to be read from the input stream buffer will be buf[pos].

mark

protected int mark
The currently marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by the mark() method. The current buffer position is set to this point by the reset() method.
Since:
JDK1.1

count

protected int count
The index one greater than the last valid character in the input stream buffer. This value should always be nonnegative and not larger than the length of buf. It is one greater than the position of the last byte within buf that can ever be read from the input stream buffer.
Constructor Detail

ByteArrayInputStream

public ByteArrayInputStream(byte[] buf)
Creates a ByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied. The initial value of pos is 0 and the initial value of count is the length of buf.
Parameters:
buf - the input buffer.

ByteArrayInputStream

public ByteArrayInputStream(byte[] buf,
                            int offset,
                            int length)
Creates ByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is offset+len. The buffer array is not copied.

Note that if bytes are simply read from the resulting input stream, elements buf[pos] through buf[pos+len-1] will be read; however, if a reset operation is performed, then bytes buf[0] through buf[pos-1] will then become available for input.

Parameters:
buf - the input buffer.
offset - the offset in the buffer of the first byte to read.
length - the maximum number of bytes to read from the buffer.
Method Detail

read

public int read()
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned.

This read method cannot block.

Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream has been reached.

read

public int read(byte[] b,
                int off,
                int len)
Reads up to len bytes of data into an array of bytes from this input stream. If pos equals count, then -1 is returned to indicate end of file. Otherwise, the number k of bytes read is equal to the smaller of len and count-pos. If k is positive, then bytes buf[pos] through buf[pos+k-1] are copied into b[off] through b[off+k-1] in the manner performed by System.arraycopy. The value k is added into pos and k is returned.

This read method cannot block.

Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

skip

public long skip(long n)
Skips n bytes of input from this input stream. Fewer bytes might be skipped if the end of the input stream is reached. The actual number k of bytes to be skipped is equal to the smaller of n and count-pos. The value k is added into pos and k is returned.
Overrides:
skip in class InputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.

available

public int available()
Returns the number of bytes that can be read from this input stream without blocking. The value returned is count - pos, which is the number of bytes remaining to be read from the input buffer.
Overrides:
available in class InputStream
Returns:
the number of bytes that can be read from the input stream without blocking.

markSupported

public boolean markSupported()
Tests if ByteArrayInputStream supports mark/reset.
Overrides:
markSupported in class InputStream
Since:
JDK1.1

mark

public void mark(int readAheadLimit)
Set the current marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by this method.
Overrides:
mark in class InputStream
Since:
JDK1.1

reset

public void reset()
Resets the buffer to the marked position. The marked position is the beginning unless another position was marked. The value of pos is set to 0.
Overrides:
reset in class InputStream
Following copied from class: java.io.InputStream
Throws:
IOException - if this stream has not been marked or if the mark has been invalidated.
See Also:
InputStream.mark(int), IOException

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream.

Overrides:
close in class InputStream
Following copied from class: java.io.InputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteArrayOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ByteArrayOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.ByteArrayOutputStream
public class ByteArrayOutputStream
extends OutputStream

This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().

Since:
JDK1.0

Field Summary
protected byte[] | buf The buffer where data is stored.
protected int | count The number of valid bytes in the buffer.
Constructor Summary
ByteArrayOutputStream()
Creates a new byte array output stream.
ByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
Method Summary
void | close() Closes this output stream and releases any system resources associated with this stream.
void | reset() Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the ouput stream is discarded.
int | size() Returns the current size of the buffer.
byte[] | toByteArray() Creates a newly allocated byte array.
String | toString() Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
String | toString(int hibyte) Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding.
String | toString(String enc) Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
void | write(int b) Writes the specified byte to this byte array output stream.
void | writeTo(OutputStream out) Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count).
Methods inherited from class java.io.OutputStream
flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

buf

protected byte[] buf
The buffer where data is stored.

count

protected int count
The number of valid bytes in the buffer.
Constructor Detail

ByteArrayOutputStream

public ByteArrayOutputStream()
Creates a new byte array output stream. The buffer capacity is initially 32 bytes, though its size increases if necessary.

ByteArrayOutputStream

public ByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
Parameters:
size - the initial size.
Throws:
IllegalArgumentException - if size is negative.
Method Detail

write

public void write(int b)
Writes the specified byte to this byte array output stream.
Overrides:
write in class OutputStream
Parameters:
b - the byte to be written.

write

public void write(byte[] b,
                  int off,
                  int len)
Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
Overrides:
write in class OutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.

writeTo

public void writeTo(OutputStream out)
             throws IOException
Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count).
Parameters:
out - the output stream to which to write the data.
Throws:
IOException - if an I/O error occurs.

reset

public void reset()
Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the ouput stream is discarded. The output stream can be used again, reusing the already allocated buffer space.
See Also:
ByteArrayInputStream.count

toByteArray

public byte[] toByteArray()
Creates a newly allocated byte array. Its size is the current size of this output stream and the valid contents of the buffer have been copied into it.
Returns:
the current contents of this output stream, as a byte array.
See Also:
size()

size

public int size()
Returns the current size of the buffer.
Returns:
the value of the count field, which is the number of valid bytes in this output stream.
See Also:
count

toString

public String toString()
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
Overrides:
toString in class Object
Returns:
String translated from the buffer's contents.
Since:
JDK1.1

toString

public String toString(String enc)
                throws UnsupportedEncodingException
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
Parameters:
enc - a character-encoding name.
Returns:
String translated from the buffer's contents.
Throws:
UnsupportedEncodingException - If the named encoding is not supported.
Since:
JDK1.1

toString

public String toString(int hibyte)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding.

Creates a newly allocated string. Its size is the current size of the output stream and the valid contents of the buffer have been copied into it. Each character c in the resulting string is constructed from the corresponding element b in the byte array such that:
     c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
Parameters:
hibyte - the high byte of each resulting Unicode character.
Returns:
the current contents of the output stream, as a string.
See Also:
size(), toString(String), toString()

close

public void close()
           throws IOException
Closes this output stream and releases any system resources associated with this stream. A closed stream cannot perform output operations and cannot be reopened.

Overrides:
close in class OutputStream
Following copied from class: java.io.OutputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArrayReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class CharArrayReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.CharArrayReader
public class CharArrayReader
extends Reader

This class implements a character buffer that can be used as a character-input stream.

Since:
JDK1.1

Field Summary
protected char[] | buf The character buffer.
protected int | count The number of valid characters in the buffer.
protected int | markedPos The position of mark in buffer.
protected int | pos The current buffer position.
Fields inherited from class java.io.Reader
lock
Constructor Summary
CharArrayReader(char[] buf)
Create an CharArrayReader from the specified array of chars.
CharArrayReader(char[] buf, int offset, int length)
Create an CharArrayReader from the specified array of chars.
Method Summary
 void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
 int read()
Read a single character.
 int read(char[] b, int off, int len)
Read characters into a portion of an array.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream to the most recent mark, or to the beginning if it has never been marked.
 long skip(long n)
Skip characters.
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buf

protected char[] buf
The character buffer.

pos

protected int pos
The current buffer position.

markedPos

protected int markedPos
The position of mark in buffer.

count

protected int count
The number of valid characters in the buffer.
Constructor Detail

CharArrayReader

public CharArrayReader(char[] buf)
Create an CharArrayReader from the specified array of chars.
Parameters:
buf - Input buffer (not copied)

CharArrayReader

public CharArrayReader(char[] buf,
                       int offset,
                       int length)
Create an CharArrayReader from the specified array of chars.
Parameters:
buf - Input buffer (not copied)
offset - Offset of the first char to read
length - Number of chars to read
Method Detail

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class Reader
Throws:
IOException - If an I/O error occurs

read

public int read(char[] b,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class Reader
Parameters:
b - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The actual number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip

public long skip(long n)
          throws IOException
Skip characters.
Overrides:
skip in class Reader
Parameters:
n - The number of characters to skip
Returns:
The number of characters actually skipped
Throws:
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read. Character-array readers are always ready to be read.
Overrides:
ready in class Reader
Throws:
IOException - If an I/O error occurs

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
Overrides:
markSupported in class Reader
Following copied from class: java.io.Reader
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.
Overrides:
mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. Because the stream's input comes from a character array, there is no actual limit; hence this argument is ignored.
Throws:
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream to the most recent mark, or to the beginning if it has never been marked.
Overrides:
reset in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
Close the stream.
Overrides:
close in class Reader
Following copied from class: java.io.Reader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArrayWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class CharArrayWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.CharArrayWriter
public class CharArrayWriter
extends Writer

This class implements a character buffer that can be used as an Writer. The buffer automatically grows when data is written to the stream. The data can be retrieved using toCharArray() and toString().

Since:
JDK1.1

Field Summary
protected char[] | buf The buffer where data is stored.
protected int | count The number of chars in the buffer.
Fields inherited from class java.io.Writer
lock
Constructor Summary
CharArrayWriter()
Creates a new CharArrayWriter.
CharArrayWriter(int initialSize)
Creates a new CharArrayWriter with the specified initial size.
Method Summary
void | close() Close the stream.
void | flush() Flush the stream.
void | reset() Resets the buffer so that you can use it again without throwing away the already allocated buffer.
int | size() Returns the current size of the buffer.
char[] | toCharArray() Returns a copy of the input data.
String | toString() Converts input data to a string.
void | write(char[] c, int off, int len) Writes characters to the buffer.
void | write(int c) Writes a character to the buffer.
void | write(String str, int off, int len) Write a portion of a string to the buffer.
void | writeTo(Writer out) Writes the contents of the buffer to another character stream.
Methods inherited from class java.io.Writer
write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

buf

protected char[] buf
The buffer where data is stored.

count

protected int count
The number of chars in the buffer.
Constructor Detail

CharArrayWriter

public CharArrayWriter()
Creates a new CharArrayWriter.

CharArrayWriter

public CharArrayWriter(int initialSize)
Creates a new CharArrayWriter with the specified initial size.
Parameters:
initialSize - an int specifying the initial buffer size.
Throws:
IllegalArgumentException - if initialSize is negative
Method Detail

write

public void write(int c)
Writes a character to the buffer.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
c - int specifying a character to be written.
Throws:
IOException - If an I/O error occurs

write

public void write(char[] c,
                  int off,
                  int len)
Writes characters to the buffer.
Overrides:
write in class Writer
Parameters:
c - the data to be written
off - the start offset in the data
len - the number of chars that are written

write

public void write(String str,
                  int off,
                  int len)
Write a portion of a string to the buffer.
Overrides:
write in class Writer
Parameters:
str - String to be written from
off - Offset from which to start reading characters
len - Number of characters to be written

writeTo

public void writeTo(Writer out)
             throws IOException
Writes the contents of the buffer to another character stream.
Parameters:
out - the output stream to write to
Throws:
IOException - If an I/O error occurs.

reset

public void reset()
Resets the buffer so that you can use it again without throwing away the already allocated buffer.

toCharArray

public char[] toCharArray()
Returns a copy of the input data.
Returns:
an array of chars copied from the input data.

size

public int size()
Returns the current size of the buffer.
Returns:
an int representing the current size of the buffer.

toString

public String toString()
Converts input data to a string.
Overrides:
toString in class Object
Returns:
the string.

flush

public void flush()
Flush the stream.
Overrides:
flush in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
Close the stream. This method does not release the buffer, since its contents might still be required.
Overrides:
close in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharConversionException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Class CharConversionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.CharConversionException
All Implemented Interfaces:
Serializable
public class CharConversionException
extends IOException

Base class for character conversion exceptions.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
CharConversionException()
This provides no detailed message.
CharConversionException(String s)
This provides a detailed message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CharConversionException

public CharConversionException()
This provides no detailed message.

CharConversionException

public CharConversionException(String s)
This provides a detailed message.
Parameters:
s - the detailed message associated with the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.io.BufferedInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.BufferedInputStream

No usage of java.io.BufferedInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.BufferedOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.BufferedOutputStream

No usage of java.io.BufferedOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.BufferedWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.BufferedWriter

No usage of java.io.BufferedWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ByteArrayInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ByteArrayInputStream

No usage of java.io.ByteArrayInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ByteArrayOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ByteArrayOutputStream

No usage of java.io.ByteArrayOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.CharArrayReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.CharArrayReader

No usage of java.io.CharArrayReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.CharArrayWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.CharArrayWriter

No usage of java.io.CharArrayWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.CharConversionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.CharConversionException

No usage of java.io.CharConversionException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.DataOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.DataOutputStream

No usage of java.io.DataOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.EOFException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.EOFException

No usage of java.io.EOFException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileInputStream

No usage of java.io.FileInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileOutputStream

No usage of java.io.FileOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FilePermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FilePermission

No usage of java.io.FilePermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileReader

No usage of java.io.FileReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileWriter

No usage of java.io.FileWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FilterWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FilterWriter

No usage of java.io.FilterWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.InterruptedIOException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.InterruptedIOException

No usage of java.io.InterruptedIOException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.InvalidClassException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.InvalidClassException

No usage of java.io.InvalidClassException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.LineNumberInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.LineNumberInputStream

No usage of java.io.LineNumberInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.LineNumberReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.LineNumberReader

No usage of java.io.LineNumberReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.NotSerializableException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.NotSerializableException

No usage of java.io.NotSerializableException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PushbackInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PushbackInputStream

No usage of java.io.PushbackInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PushbackReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PushbackReader

No usage of java.io.PushbackReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.RandomAccessFile

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.RandomAccessFile

No usage of java.io.RandomAccessFile

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.SequenceInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.SequenceInputStream

No usage of java.io.SequenceInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.StreamTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.StreamTokenizer

No usage of java.io.StreamTokenizer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.StringBufferInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.StringBufferInputStream

No usage of java.io.StringBufferInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.StringReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.StringReader

No usage of java.io.StringReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.StringWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.StringWriter

No usage of java.io.StringWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.UTFDataFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.UTFDataFormatException

No usage of java.io.UTFDataFormatException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.WriteAbortedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.WriteAbortedException

No usage of java.io.WriteAbortedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.BufferedReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.BufferedReader

Packages that use BufferedReader
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of BufferedReader in java.io

Subclasses of BufferedReader in java.io
 class LineNumberReader
A buffered character-input stream that keeps track of line numbers.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.DataInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.DataInputStream

Packages that use DataInputStream
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of DataInputStream in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser with parameters of type DataInputStream
 void DTD.read(DataInputStream in)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.File

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.File

Packages that use File
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of File in java.io

Methods in java.io that return File
File | File.getParentFile() Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.
File | File.getAbsoluteFile() Returns the absolute form of this abstract pathname.
File | File.getCanonicalFile() Returns the canonical form of this abstract pathname.
File[] | File.listFiles() Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
File[] | File.listFiles(FilenameFilter filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
File[] | File.listFiles(FileFilter filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
static File[] | File.listRoots() List the available filesystem roots.
static File | File.createTempFile(String prefix, String suffix, File directory) Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
static File | File.createTempFile(String prefix, String suffix) Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.

Methods in java.io with parameters of type File
boolean | FileFilter.accept(File pathname) Tests whether or not the specified abstract pathname should be included in a pathname list.
boolean | File.renameTo(File dest) Renames the file denoted by this abstract pathname.
static File | File.createTempFile(String prefix, String suffix, File directory) Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
int | File.compareTo(File pathname) Compares two abstract pathnames lexicographically.
boolean | FilenameFilter.accept(File dir, String name) Tests if a specified file should be included in a file list.

Constructors in java.io with parameters of type File
FileOutputStream(File file)
Creates a file output stream to write to the file represented by the specified File object.
File(File parent, String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.
FileReader(File file)
Creates a new FileReader, given the File to read from.
FileWriter(File file)
Constructs a FileWriter object given a File object.
RandomAccessFile(File file, String mode)
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
FileInputStream(File file)
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.

Uses of File in java.lang

Methods in java.lang with parameters of type File
Process | Runtime.exec(String command, String[] envp, File dir) Executes the specified string command in a separate process with the specified environment and working directory.
Process | Runtime.exec(String[] cmdarray, String[] envp, File dir) Executes the specified command and arguments in a separate process with the specified environment and working directory.

Uses of File in java.util.jar

Constructors in java.util.jar with parameters of type File
JarFile(File file)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify, int mode)
Creates a new JarFile to read from the specified File object in the specified mode.

Uses of File in java.util.zip

Constructors in java.util.zip with parameters of type File
ZipFile(File file, int mode)
Opens a new ZipFile to read from the specified File object in the specified mode.
ZipFile(File file)
Opens a ZIP file for reading given the specified File object.

Uses of File in javax.sound.midi

Methods in javax.sound.midi with parameters of type File
static Soundbank | MidiSystem.getSoundbank(File file) Constructs a Soundbank by reading it from the specified File.
static MidiFileFormat | MidiSystem.getMidiFileFormat(File file) Obtains the MIDI file format of the specified File.
static Sequence | MidiSystem.getSequence(File file) Obtains a MIDI sequence from the specified File.
static int | MidiSystem.write(Sequence in, int type, File out) Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.

Uses of File in javax.sound.midi.spi

Methods in javax.sound.midi.spi with parameters of type File
abstract Soundbank | SoundbankReader.getSoundbank(File file) Obtains a soundbank object from the File provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(File file) Obtains the MIDI file format of the File provided.
abstract Sequence | MidiFileReader.getSequence(File file) Obtains a MIDI sequence from the File provided.
abstract int | MidiFileWriter.write(Sequence in, int fileType, File out) Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.

Uses of File in javax.sound.sampled

Methods in javax.sound.sampled with parameters of type File
static AudioFileFormat | AudioSystem.getAudioFileFormat(File file) Obtains the audio file format of the specified File.
static AudioInputStream | AudioSystem.getAudioInputStream(File file) Obtains an audio input stream from the provided File.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the specified file type to the external file provided.

Uses of File in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi with parameters of type File
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(File file) Obtains the audio file format of the File provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(File file) Obtains an audio input stream from the File provided.

Uses of File in javax.swing

Methods in javax.swing that return File
File | JFileChooser.getSelectedFile() Returns the selected file.
File[] | JFileChooser.getSelectedFiles() Returns a list of selected files if the file chooser is set to allow multiple selection.
File | JFileChooser.getCurrentDirectory() Returns the current directory.

Methods in javax.swing with parameters of type File
void | JFileChooser.setSelectedFile(File file) Sets the selected file.
void | JFileChooser.setSelectedFiles(File[] selectedFiles) Sets the list of selected files if the file chooser is set to allow multiple selection.
void | JFileChooser.setCurrentDirectory(File dir) Sets the current directory.
void | JFileChooser.ensureFileIsVisible(File f) Makes sure that the specified file is viewable, and not hidden.
String | JFileChooser.getName(File f) Returns the filename.
String | JFileChooser.getDescription(File f) Returns the file description.
String | JFileChooser.getTypeDescription(File f) Returns the file type.
Icon | JFileChooser.getIcon(File f) Returns the icon for this file or type of file, depending on the system.
boolean | JFileChooser.isTraversable(File f) Returns true if the file (directory) can be visited.
boolean | JFileChooser.accept(File f) Returns true if the file should be displayed.

Constructors in javax.swing with parameters of type File
JFileChooser(File currentDirectory)
Constructs a JFileChooser using the given File as the path.
JFileChooser(File currentDirectory, FileSystemView fsv)
Constructs a JFileChooser using the given current directory and FileSystemView.

Uses of File in javax.swing.filechooser

Methods in javax.swing.filechooser that return File
abstract File | FileSystemView.createNewFolder(File containingDir) creates a new folder with a default folder name.
abstract File[] | FileSystemView.getRoots() Returns all root partitians on this system.
File | FileSystemView.getHomeDirectory()
File | FileSystemView.createFileObject(File dir, String filename) Returns a File object constructed in dir from the given filename.
File | FileSystemView.createFileObject(String path) Returns a File object constructed from the given path string.
File[] | FileSystemView.getFiles(File dir, boolean useFileHiding) gets the list of shown (i.e.
File | FileSystemView.getParentDirectory(File dir) Returns the parent directory of dir.

Methods in javax.swing.filechooser with parameters of type File
String | FileView.getName(File f) The name of the file.
String | FileView.getDescription(File f) A human readable description of the file.
String | FileView.getTypeDescription(File f) A human readable description of the type of the file.
Icon | FileView.getIcon(File f) The icon that represents this file in the JFileChooser.
Boolean | FileView.isTraversable(File f) Whether the directory is traversable or not.
abstract boolean | FileSystemView.isRoot(File f) Determines if the given file is a root partition or drive.
abstract File | FileSystemView.createNewFolder(File containingDir) creates a new folder with a default folder name.
abstract boolean | FileSystemView.isHiddenFile(File f) Returns whether a file is hidden or not.
File | FileSystemView.createFileObject(File dir, String filename) Returns a File object constructed in dir from the given filename.
File[] | FileSystemView.getFiles(File dir, boolean useFileHiding) gets the list of shown (i.e.
File | FileSystemView.getParentDirectory(File dir) Returns the parent directory of dir.
abstract boolean | FileFilter.accept(File f) Whether the given file is accepted by this filter.

Uses of File in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type File
abstract  void FileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)

Uses of File in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type File
void | BasicFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
boolean | BasicFileChooserUI.AcceptAllFileFilter.accept(File f)
String | BasicFileChooserUI.BasicFileView.getName(File f)
String | BasicFileChooserUI.BasicFileView.getDescription(File f)
String | BasicFileChooserUI.BasicFileView.getTypeDescription(File f)
Icon | BasicFileChooserUI.BasicFileView.getCachedIcon(File f)
void | BasicFileChooserUI.BasicFileView.cacheIcon(File f, Icon i)
Icon | BasicFileChooserUI.BasicFileView.getIcon(File f)
Boolean | BasicFileChooserUI.BasicFileView.isTraversable(File f)
Boolean | BasicFileChooserUI.BasicFileView.isHidden(File f)
protected boolean | BasicDirectoryModel.lt(File a, File b)

Uses of File in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type File
 void MetalFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)

Uses of File in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type File
 void MultiFileChooserUI.ensureFileIsVisible(JFileChooser a, File b)
Call ensureFileIsVisible on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileDescriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileDescriptor

Packages that use FileDescriptor
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.

Uses of FileDescriptor in java.io

Fields in java.io declared as FileDescriptor
static FileDescriptor | FileDescriptor.in A handle to the standard input stream.
static FileDescriptor | FileDescriptor.out A handle to the standard output stream.
static FileDescriptor | FileDescriptor.err A handle to the standard error stream.

Methods in java.io that return FileDescriptor
FileDescriptor | FileOutputStream.getFD() Returns the file descriptor associated with this stream.
FileDescriptor | RandomAccessFile.getFD() Returns the opaque file descriptor object associated with this stream.
FileDescriptor | FileInputStream.getFD() Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.

Constructors in java.io with parameters of type FileDescriptor
FileOutputStream(FileDescriptor fdObj)
Creates an output file stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.
FileReader(FileDescriptor fd)
Creates a new FileReader, given the FileDescriptor to read from.
FileWriter(FileDescriptor fd)
Constructs a FileWriter object associated with a file descriptor.
FileInputStream(FileDescriptor fdObj)
Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.

Uses of FileDescriptor in java.lang

Methods in java.lang with parameters of type FileDescriptor
void | SecurityManager.checkRead(FileDescriptor fd) Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.
void | SecurityManager.checkWrite(FileDescriptor fd) Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.

Uses of FileDescriptor in java.net

Fields in java.net declared as FileDescriptor
protected FileDescriptor | SocketImpl.fd The file descriptor object for this socket.
protected FileDescriptor | DatagramSocketImpl.fd The file descriptor object.

Methods in java.net that return FileDescriptor
protected FileDescriptor | SocketImpl.getFileDescriptor() Returns the value of this socket's fd field.
protected FileDescriptor | DatagramSocketImpl.getFileDescriptor() Gets the datagram socket file descriptor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FileNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FileNotFoundException

Packages that use FileNotFoundException
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of FileNotFoundException in java.io

Constructors in java.io that throw FileNotFoundException
FileOutputStream(String name)
Creates an output file stream to write to the file with the specified name.
FileOutputStream(String name, boolean append)
Creates an output file stream to write to the file with the specified name.
FileOutputStream(File file)
Creates a file output stream to write to the file represented by the specified File object.
FileReader(String fileName)
Creates a new FileReader, given the name of the file to read from.
FileReader(File file)
Creates a new FileReader, given the File to read from.
RandomAccessFile(String name, String mode)
Creates a random access file stream to read from, and optionally to write to, a file with the specified name.
RandomAccessFile(File file, String mode)
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
FileInputStream(String name)
Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.
FileInputStream(File file)
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FilterInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FilterInputStream

Packages that use FilterInputStream
java.io | Provides for system input and output through data streams, serialization and the file system.
java.security | Provides the classes and interfaces for the security framework.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of FilterInputStream in java.io

Subclasses of FilterInputStream in java.io
class | BufferedInputStream A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
class | DataInputStream A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
class | LineNumberInputStream Deprecated. This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.
class | PushbackInputStream A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.

Uses of FilterInputStream in java.security

Subclasses of FilterInputStream in java.security
 class DigestInputStream
A transparent stream that updates the associated message digest using the bits going through the stream.

Uses of FilterInputStream in java.util.jar

Subclasses of FilterInputStream in java.util.jar
 class JarInputStream
The JarInputStream class is used to read the contents of a JAR file from any input stream.

Uses of FilterInputStream in java.util.zip

Subclasses of FilterInputStream in java.util.zip
class | CheckedInputStream An input stream that also maintains a checksum of the data being read.
class | GZIPInputStream This class implements a stream filter for reading compressed data in the GZIP format.
class | InflaterInputStream This class implements a stream filter for uncompressing data in the "deflate" compression format.
class | ZipInputStream This class implements an input stream filter for reading files in the ZIP file format.

Uses of FilterInputStream in javax.swing

Subclasses of FilterInputStream in javax.swing
 class ProgressMonitorInputStream
Monitors the progress of reading from some InputStream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FilterOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FilterOutputStream

Packages that use FilterOutputStream
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of FilterOutputStream in java.io

Subclasses of FilterOutputStream in java.io
class | BufferedOutputStream The class implements a buffered output stream.
class | DataOutputStream A data input stream lets an application write primitive Java data types to an output stream in a portable way.
class | PrintStream A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.

Uses of FilterOutputStream in java.rmi.server

Subclasses of FilterOutputStream in java.rmi.server
 class LogStream
Deprecated. no replacement

Uses of FilterOutputStream in java.security

Subclasses of FilterOutputStream in java.security
 class DigestOutputStream
A transparent stream that updates the associated message digest using the bits going through the stream.

Uses of FilterOutputStream in java.util.jar

Subclasses of FilterOutputStream in java.util.jar
 class JarOutputStream
The JarOutputStream class is used to write the contents of a JAR file to any output stream.

Uses of FilterOutputStream in java.util.zip

Subclasses of FilterOutputStream in java.util.zip
class | CheckedOutputStream An output stream that also maintains a checksum of the data being written.
class | DeflaterOutputStream This class implements an output stream filter for compressing data in the "deflate" compression format.
class | GZIPOutputStream This class implements a stream filter for writing compressed data in the GZIP file format.
class | ZipOutputStream This class implements an output stream filter for writing files in the ZIP file format.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.FilterReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.FilterReader

Packages that use FilterReader
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of FilterReader in java.io

Subclasses of FilterReader in java.io
 class PushbackReader
A character-stream reader that allows characters to be pushed back into the stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.InputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.InputStream

Packages that use InputStream
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of InputStream in java.awt

Methods in java.awt with parameters of type InputStream
static Font Font.createFont(int fontFormat, InputStream fontStream)
Returns a new Font with the specified font type and input data.

Uses of InputStream in java.awt.color

Methods in java.awt.color with parameters of type InputStream
static ICC_Profile ICC_Profile.getInstance(InputStream s)
Constructs an ICC_Profile corresponding to the data in an InputStream.

Uses of InputStream in java.beans.beancontext

Methods in java.beans.beancontext that return InputStream
 InputStream BeanContextSupport.getResourceAsStream(String name, BeanContextChild bcc)
 InputStream BeanContext.getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Uses of InputStream in java.io

Subclasses of InputStream in java.io
class | BufferedInputStream A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
class | ByteArrayInputStream A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
class | DataInputStream A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
class | FileInputStream A FileInputStream obtains input bytes from a file in a file system.
class | FilterInputStream A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
class | LineNumberInputStream Deprecated. This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.
class | ObjectInputStream An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
class | PipedInputStream A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
class | PushbackInputStream A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
class | SequenceInputStream A SequenceInputStream represents the logical concatenation of other input streams.
class | StringBufferInputStream Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.

Fields in java.io declared as InputStream
protected  InputStream FilterInputStream.in
The input stream to be filtered.

Constructors in java.io with parameters of type InputStream
FilterInputStream(InputStream in)
Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
StreamTokenizer(InputStream is)
Deprecated. As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
ObjectInputStream(InputStream in)
Create an ObjectInputStream that reads from the specified InputStream.
InputStreamReader(InputStream in)
Create an InputStreamReader that uses the default character encoding.
InputStreamReader(InputStream in, String enc)
Create an InputStreamReader that uses the named character encoding.
PushbackInputStream(InputStream in, int size)
Creates a PushbackInputStream with a pushback buffer of the specified size, and saves its argument, the input stream in, for later use.
PushbackInputStream(InputStream in)
Creates a PushbackInputStream and saves its argument, the input stream in, for later use.
BufferedInputStream(InputStream in)
Creates a BufferedInputStream and saves its argument, the input stream in, for later use.
BufferedInputStream(InputStream in, int size)
Creates a BufferedInputStream with the specified buffer size, and saves its argument, the input stream in, for later use.
SequenceInputStream(InputStream s1, InputStream s2)
Initializes a newly created SequenceInputStream by remembering the two arguments, which will be read in order, first s1 and then s2, to provide the bytes to be read from this SequenceInputStream.
DataInputStream(InputStream in)
Creates a FilterInputStream and saves its argument, the input stream in, for later use.
LineNumberInputStream(InputStream in)
Deprecated. Constructs a newline number input stream that reads its input from the specified input stream.

Uses of InputStream in java.lang

Fields in java.lang declared as InputStream
static InputStream System.in
The "standard" input stream.

Methods in java.lang that return InputStream
InputStream | Runtime.getLocalizedInputStream(InputStream in) Deprecated. As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.
abstract InputStream | Process.getInputStream() Gets the input stream of the subprocess.
abstract InputStream | Process.getErrorStream() Gets the error stream of the subprocess.
InputStream | ClassLoader.getResourceAsStream(String name) Returns an input stream for reading the specified resource.
static InputStream | ClassLoader.getSystemResourceAsStream(String name) Open for reading, a resource of the specified name from the search path used to load classes.
InputStream | Class.getResourceAsStream(String name) Finds a resource with a given name.

Methods in java.lang with parameters of type InputStream
static void | System.setIn(InputStream in) Reassigns the "standard" input stream.
InputStream | Runtime.getLocalizedInputStream(InputStream in) Deprecated. As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.

Uses of InputStream in java.net

Methods in java.net that return InputStream
InputStream | URLConnection.getInputStream() Returns an input stream that reads from this open connection.
protected abstract InputStream | SocketImpl.getInputStream() Returns an input stream for this socket.
InputStream | Socket.getInputStream() Returns an input stream for this socket.
InputStream | URL.openStream() Opens a connection to this URL and returns an InputStream for reading from that connection.
InputStream | HttpURLConnection.getErrorStream() Returns the error stream if the connection failed but the server sent useful data nonetheless.

Methods in java.net with parameters of type InputStream
static String URLConnection.guessContentTypeFromStream(InputStream is)
Tries to determine the type of an input stream based on the characters at the beginning of the input stream.

Uses of InputStream in java.security

Subclasses of InputStream in java.security
 class DigestInputStream
A transparent stream that updates the associated message digest using the bits going through the stream.

Methods in java.security with parameters of type InputStream
void | Provider.load(InputStream inStream) Reads a property list (key and element pairs) from the input stream.
void | Certificate.decode(InputStream stream) Deprecated. Decodes a certificate from an input stream.
void | KeyStore.load(InputStream stream, char[] password) Loads this KeyStore from the given input stream.
abstract void | KeyStoreSpi.engineLoad(InputStream stream, char[] password) Loads the keystore from the given input stream.

Constructors in java.security with parameters of type InputStream
DigestInputStream(InputStream stream, MessageDigest digest)
Creates a digest input stream, using the specified input stream and message digest.

Uses of InputStream in java.security.cert

Methods in java.security.cert with parameters of type InputStream
Certificate | CertificateFactory.generateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
Collection | CertificateFactory.generateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
CRL | CertificateFactory.generateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
Collection | CertificateFactory.generateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
abstract Certificate | CertificateFactorySpi.engineGenerateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
abstract CRL | CertificateFactorySpi.engineGenerateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.

Uses of InputStream in java.sql

Methods in java.sql that return InputStream
InputStream | Blob.getBinaryStream() Retrieves the BLOB designated by this Blob instance as a stream.
InputStream | SQLInput.readAsciiStream() Returns the next attribute in the stream as a stream of ASCII characters.
InputStream | SQLInput.readBinaryStream() Returns the next attribute in the stream as a stream of uninterpreted bytes.
InputStream | ResultSet.getAsciiStream(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
InputStream | ResultSet.getUnicodeStream(int columnIndex) Deprecated. use getCharacterStream in place of getUnicodeStream
InputStream | ResultSet.getBinaryStream(int columnIndex) Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
InputStream | ResultSet.getAsciiStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
InputStream | ResultSet.getUnicodeStream(String columnName) Deprecated.
InputStream | ResultSet.getBinaryStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
InputStream | Clob.getAsciiStream() Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.

Methods in java.sql with parameters of type InputStream
void | PreparedStatement.setAsciiStream(int parameterIndex, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | PreparedStatement.setUnicodeStream(int parameterIndex, InputStream x, int length) Deprecated.
void | PreparedStatement.setBinaryStream(int parameterIndex, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | SQLOutput.writeAsciiStream(InputStream x) Writes the next attribute to the stream as a stream of ASCII characters.
void | SQLOutput.writeBinaryStream(InputStream x) Writes the next attribute to the stream as a stream of uninterpreted bytes.
void | ResultSet.updateAsciiStream(int columnIndex, InputStream x, int length) Updates the designated column with an ascii stream value.
void | ResultSet.updateBinaryStream(int columnIndex, InputStream x, int length) Updates the designated column with a binary stream value.
void | ResultSet.updateAsciiStream(String columnName, InputStream x, int length) Updates the designated column with an ascii stream value.
void | ResultSet.updateBinaryStream(String columnName, InputStream x, int length) Updates the designated column with a binary stream value.

Uses of InputStream in java.util

Methods in java.util with parameters of type InputStream
 void Properties.load(InputStream inStream)
Reads a property list (key and element pairs) from the input stream.

Constructors in java.util with parameters of type InputStream
PropertyResourceBundle(InputStream stream)
Creates a property resource

Uses of InputStream in java.util.jar

Subclasses of InputStream in java.util.jar
 class JarInputStream
The JarInputStream class is used to read the contents of a JAR file from any input stream.

Methods in java.util.jar that return InputStream
 InputStream JarFile.getInputStream(ZipEntry ze)
Returns an input stream for reading the contents of the specified ZIP file entry.

Methods in java.util.jar with parameters of type InputStream
 void Manifest.read(InputStream is)
Reads the Manifest from the specified InputStream.

Constructors in java.util.jar with parameters of type InputStream
JarInputStream(InputStream in)
Creates a new JarInputStream and reads the optional manifest.
JarInputStream(InputStream in, boolean verify)
Creates a new JarInputStream and reads the optional manifest.
Manifest(InputStream is)
Constructs a new Manifest from the specified input stream.

Uses of InputStream in java.util.zip

Subclasses of InputStream in java.util.zip
class | CheckedInputStream An input stream that also maintains a checksum of the data being read.
class | GZIPInputStream This class implements a stream filter for reading compressed data in the GZIP format.
class | InflaterInputStream This class implements a stream filter for uncompressing data in the "deflate" compression format.
class | ZipInputStream This class implements an input stream filter for reading files in the ZIP file format.

Methods in java.util.zip that return InputStream
 InputStream ZipFile.getInputStream(ZipEntry entry)
Returns an input stream for reading the contents of the specified zip file entry.

Constructors in java.util.zip with parameters of type InputStream
InflaterInputStream(InputStream in, Inflater inf, int size)
Creates a new input stream with the specified decompressor and buffer size.
InflaterInputStream(InputStream in, Inflater inf)
Creates a new input stream with the specified decompressor and a default buffer size.
InflaterInputStream(InputStream in)
Creates a new input stream with a default decompressor and buffer size.
ZipInputStream(InputStream in)
Creates a new ZIP input stream.
CheckedInputStream(InputStream in, Checksum cksum)
Creates an input stream using the specified Checksum.
GZIPInputStream(InputStream in, int size)
Creates a new input stream with the specified buffer size.
GZIPInputStream(InputStream in)
Creates a new input stream with a default buffer size.

Uses of InputStream in javax.sound.midi

Methods in javax.sound.midi with parameters of type InputStream
static Soundbank | MidiSystem.getSoundbank(InputStream stream) Constructs a MIDI sound bank by reading it from the specified stream.
static MidiFileFormat | MidiSystem.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the data in the specified input stream.
static Sequence | MidiSystem.getSequence(InputStream stream) Obtains a MIDI sequence from the specified input stream.
void | Sequencer.setSequence(InputStream stream) Sets the current sequence on which the sequencer operates.

Uses of InputStream in javax.sound.midi.spi

Methods in javax.sound.midi.spi with parameters of type InputStream
abstract Soundbank | SoundbankReader.getSoundbank(InputStream stream) Obtains a soundbank object from the InputStream provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the input stream provided.
abstract Sequence | MidiFileReader.getSequence(InputStream stream) Obtains a MIDI sequence from the input stream provided.

Uses of InputStream in javax.sound.sampled

Subclasses of InputStream in javax.sound.sampled
 class AudioInputStream
An audio input stream is an input stream with a specified audio format and length.

Methods in javax.sound.sampled with parameters of type InputStream
static AudioFileFormat | AudioSystem.getAudioFileFormat(InputStream stream) Obtains the audio file format of the provided input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(InputStream stream) Obtains an audio input stream from the provided input stream.

Constructors in javax.sound.sampled with parameters of type InputStream
AudioInputStream(InputStream stream, AudioFormat format, long length)
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.

Uses of InputStream in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi with parameters of type InputStream
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(InputStream stream) Obtains the audio file format of the input stream provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(InputStream stream) Obtains an audio input stream from the input stream provided.

Uses of InputStream in javax.swing

Subclasses of InputStream in javax.swing
 class ProgressMonitorInputStream
Monitors the progress of reading from some InputStream.

Methods in javax.swing that return InputStream
protected  InputStream JEditorPane.getStream(URL page)
Fetches a stream for the given URL, which is about to be loaded by the setPage method.

Methods in javax.swing with parameters of type InputStream
 void JEditorPane.read(InputStream in, Object desc)
This method initializes from a stream.

Constructors in javax.swing with parameters of type InputStream
ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
Constructs an object to monitor the progress of an input stream.

Uses of InputStream in javax.swing.text

Methods in javax.swing.text with parameters of type InputStream
abstract void | EditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.

Uses of InputStream in javax.swing.text.rtf

Methods in javax.swing.text.rtf with parameters of type InputStream
 void RTFEditorKit.read(InputStream in, Document doc, int pos)
Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.

Uses of InputStream in org.omg.CORBA.portable

Subclasses of InputStream in org.omg.CORBA.portable
 class InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.InputStreamReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.InputStreamReader

Packages that use InputStreamReader
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of InputStreamReader in java.io

Subclasses of InputStreamReader in java.io
 class FileReader
Convenience class for reading character files.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.InvalidObjectException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.InvalidObjectException

Packages that use InvalidObjectException
java.awt.font | Provides classes and interface relating to fonts.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of InvalidObjectException in java.awt.font

Methods in java.awt.font that throw InvalidObjectException
protected  Object TextAttribute.readResolve()
Resolves instances being deserialized to the predefined constants.

Uses of InvalidObjectException in java.io

Methods in java.io that throw InvalidObjectException
void | ObjectInputStream.registerValidation(ObjectInputValidation obj, int prio) Register an object to be validated before the graph is returned.
void | ObjectInputValidation.validateObject() Validates the object.

Uses of InvalidObjectException in java.text

Methods in java.text that throw InvalidObjectException
protected  Object AttributedCharacterIterator.Attribute.readResolve()
Resolves instances being deserialized to the predefined constants.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.IOException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.IOException

Packages that use IOException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of IOException in java.awt

Methods in java.awt that throw IOException
protected void | AWTEventMulticaster.saveInternal(ObjectOutputStream s, String k)
protected static void | AWTEventMulticaster.save(ObjectOutputStream s, String k, EventListener l)
static Font | Font.createFont(int fontFormat, InputStream fontStream) Returns a new Font with the specified font type and input data.

Uses of IOException in java.awt.color

Methods in java.awt.color that throw IOException
static ICC_Profile | ICC_Profile.getInstance(String fileName) Constructs an ICC_Profile corresponding to the data in a file.
static ICC_Profile | ICC_Profile.getInstance(InputStream s) Constructs an ICC_Profile corresponding to the data in an InputStream.
void | ICC_Profile.write(String fileName) Write this ICC_Profile to a file.
void | ICC_Profile.write(OutputStream s) Write this ICC_Profile to an OutputStream.

Uses of IOException in java.awt.datatransfer

Methods in java.awt.datatransfer that throw IOException
Object | Transferable.getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.
Object | StringSelection.getTransferData(DataFlavor flavor) Returns the Transferable's data in the requested DataFlavor if possible.
Reader | DataFlavor.getReaderForText(Transferable transferable) Gets a reader for an input stream, decoded for the expected charset (encoding).
void | DataFlavor.writeExternal(ObjectOutput os) Serialize this DataFlavor
void | DataFlavor.readExternal(ObjectInput is) restore this DataFlavor from an Serialized state

Uses of IOException in java.awt.dnd

Methods in java.awt.dnd that throw IOException
 Object DropTargetContext.TransferableProxy.getTransferData(DataFlavor df)
get the transfer data

Uses of IOException in java.awt.print

Methods in java.awt.print that return IOException
 IOException PrinterIOException.getIOException()
Returns the IOException that terminated the print job.

Constructors in java.awt.print with parameters of type IOException
PrinterIOException(IOException exception)
Constructs a new PrinterIOException with the string representation of the specified IOException.

Uses of IOException in java.beans

Methods in java.beans that throw IOException
static Object | Beans.instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.

Uses of IOException in java.beans.beancontext

Methods in java.beans.beancontext that throw IOException
 Object BeanContextSupport.instantiateChild(String beanName)
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
protected  void BeanContextSupport.bcsPreSerializationHook(ObjectOutputStream oos)
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
protected  void BeanContextSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called by readObject after defaultReadObject() but prior to deserialization of any children.
protected  void BeanContextSupport.serialize(ObjectOutputStream oos, Collection coll)
Used by writeObject to serialize a Collection.
protected  void BeanContextSupport.deserialize(ObjectInputStream ois, Collection coll)
used by readObject to deserialize a collection.
 void BeanContextSupport.writeChildren(ObjectOutputStream oos)
Used to serialize all children of this BeanContext.
 void BeanContextSupport.readChildren(ObjectInputStream ois)
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
protected  void BeanContextServicesSupport.bcsPreSerializationHook(ObjectOutputStream oos)
called from BeanContextSupport writeObject before it serializes the children ...
protected  void BeanContextServicesSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called from BeanContextSupport readObject before it deserializes the children ...
 Object BeanContext.instantiateChild(String beanName)
Instantiate the javaBean named as a child of this BeanContext.

Uses of IOException in java.io

Subclasses of IOException in java.io
class | CharConversionException Base class for character conversion exceptions.
class | EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
class | FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
class | InterruptedIOException Signals that an I/O operation has been interrupted.
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | SyncFailedException Signals that a sync operation has failed.
class | UnsupportedEncodingException The Character Encoding is not supported.
class | UTFDataFormatException Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Methods in java.io that throw IOException
 int Reader.read()
Read a single character.
 int Reader.read(char[] cbuf)
Read characters into an array.
abstract  int Reader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 long Reader.skip(long n)
Skip characters.
 boolean Reader.ready()
Tell whether this stream is ready to be read.
 void Reader.mark(int readAheadLimit)
Mark the present position in the stream.
 void Reader.reset()
Reset the stream.
abstract  void Reader.close()
Close the stream.
 int FilterReader.read()
Read a single character.
 int FilterReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 long FilterReader.skip(long n)
Skip characters.
 boolean FilterReader.ready()
Tell whether this stream is ready to be read.
 void FilterReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void FilterReader.reset()
Reset the stream.
 void FilterReader.close()
Close the stream.
 void Writer.write(int c)
Write a single character.
 void Writer.write(char[] cbuf)
Write an array of characters.
abstract  void Writer.write(char[] cbuf, int off, int len)
Write a portion of an array of characters.
 void Writer.write(String str)
Write a string.
 void Writer.write(String str, int off, int len)
Write a portion of a string.
abstract  void Writer.flush()
Flush the stream.
abstract  void Writer.close()
Close the stream, flushing it first.
 void FilterWriter.write(int c)
Write a single character.
 void FilterWriter.write(char[] cbuf, int off, int len)
Write a portion of an array of characters.
 void FilterWriter.write(String str, int off, int len)
Write a portion of a string.
 void FilterWriter.flush()
Flush the stream.
 void FilterWriter.close()
Close the stream.
abstract  int InputStream.read()
Reads the next byte of data from the input stream.
 int InputStream.read(byte[] b)
Reads some number of bytes from the input stream and stores them into the buffer array b.
 int InputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from the input stream into an array of bytes.
 long InputStream.skip(long n)
Skips over and discards n bytes of data from this input stream.
 int InputStream.available()
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
 void InputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 void InputStream.reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
 int FilterInputStream.read()
Reads the next byte of data from this input stream.
 int FilterInputStream.read(byte[] b)
Reads up to byte.length bytes of data from this input stream into an array of bytes.
 int FilterInputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.
 long FilterInputStream.skip(long n)
Skips over and discards n bytes of data from the input stream.
 int FilterInputStream.available()
Returns the number of bytes that can be read from this input stream without blocking.
 void FilterInputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 void FilterInputStream.reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
abstract  void OutputStream.write(int b)
Writes the specified byte to this output stream.
 void OutputStream.write(byte[] b)
Writes b.length bytes from the specified byte array to this output stream.
 void OutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this output stream.
 void OutputStream.flush()
Flushes this output stream and forces any buffered output bytes to be written out.
 void OutputStream.close()
Closes this output stream and releases any system resources associated with this stream.
 void FilterOutputStream.write(int b)
Writes the specified byte to this output stream.
 void FilterOutputStream.write(byte[] b)
Writes b.length bytes to this output stream.
 void FilterOutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this output stream.
 void FilterOutputStream.flush()
Flushes this output stream and forces any buffered output bytes to be written out to the stream.
 void FilterOutputStream.close()
Closes this output stream and releases any system resources associated with the stream.
 void PipedReader.connect(PipedWriter src)
Causes this piped reader to be connected to the piped writer src.
 int PipedReader.read()
Reads the next character of data from this piped stream.
 int PipedReader.read(char[] cbuf, int off, int len)
Reads up to len characters of data from this piped stream into an array of characters.
 boolean PipedReader.ready()
Tell whether this stream is ready to be read.
 void PipedReader.close()
Closes this piped stream and releases any system resources associated with the stream.
 void PipedWriter.connect(PipedReader snk)
Connects this piped writer to a receiver.
 void PipedWriter.write(int c)
Writes the specified char to the piped output stream.
 void PipedWriter.write(char[] cbuf, int off, int len)
Writes len characters from the specified character array starting at offset off to this piped output stream.
 void PipedWriter.flush()
Flushes this output stream and forces any buffered output characters to be written out.
 void PipedWriter.close()
Closes this piped output stream and releases any system resources associated with this stream.
 void Externalizable.writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
 void Externalizable.readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
 int PushbackReader.read()
Read a single character.
 int PushbackReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 void PushbackReader.unread(int c)
Push back a single character.
 void PushbackReader.unread(char[] cbuf, int off, int len)
Push back a portion of an array of characters by copying it to the front of the pushback buffer.
 void PushbackReader.unread(char[] cbuf)
Push back an array of characters by copying it to the front of the pushback buffer.
 boolean PushbackReader.ready()
Tell whether this stream is ready to be read.
 void PushbackReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void PushbackReader.reset()
Reset the stream.
 void PushbackReader.close()
Close the stream.
 void DataOutputStream.write(int b)
Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
 void DataOutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
 void DataOutputStream.flush()
Flushes this data output stream.
 void DataOutputStream.writeBoolean(boolean v)
Writes a boolean to the underlying output stream as a 1-byte value.
 void DataOutputStream.writeByte(int v)
Writes out a byte to the underlying output stream as a 1-byte value.
 void DataOutputStream.writeShort(int v)
Writes a short to the underlying output stream as two bytes, high byte first.
 void DataOutputStream.writeChar(int v)
Writes a char to the underlying output stream as a 2-byte value, high byte first.
 void DataOutputStream.writeInt(int v)
Writes an int to the underlying output stream as four bytes, high byte first.
 void DataOutputStream.writeLong(long v)
Writes a long to the underlying output stream as eight bytes, high byte first.
 void DataOutputStream.writeFloat(float v)
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
 void DataOutputStream.writeDouble(double v)
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
 void DataOutputStream.writeBytes(String s)
Writes out the string to the underlying output stream as a sequence of bytes.
 void DataOutputStream.writeChars(String s)
Writes a string to the underlying output stream as a sequence of characters.
 void DataOutputStream.writeUTF(String str)
Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
 int BufferedReader.read()
Read a single character.
 int BufferedReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 String BufferedReader.readLine()
Read a line of text.
 long BufferedReader.skip(long n)
Skip characters.
 boolean BufferedReader.ready()
Tell whether this stream is ready to be read.
 void BufferedReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void BufferedReader.reset()
Reset the stream to the most recent mark.
 void BufferedReader.close()
Close the stream.
 int LineNumberReader.read()
Read a single character.
 int LineNumberReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 String LineNumberReader.readLine()
Read a line of text.
 long LineNumberReader.skip(long n)
Skip characters.
 void LineNumberReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void LineNumberReader.reset()
Reset the stream to the most recent mark.
 void FileOutputStream.write(int b)
Writes the specified byte to this file output stream.
 void FileOutputStream.write(byte[] b)
Writes b.length bytes from the specified byte array to this file output stream.
 void FileOutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this file output stream.
 void FileOutputStream.close()
Closes this file output stream and releases any system resources associated with this stream.
 FileDescriptor FileOutputStream.getFD()
Returns the file descriptor associated with this stream.
protected  void FileOutputStream.finalize()
Cleans up the connection to the file, and ensures that the close method of this file output stream is called when there are no more references to this stream.
 Object ObjectInput.readObject()
Read and return an object.
 int ObjectInput.read()
Reads a byte of data.
 int ObjectInput.read(byte[] b)
Reads into an array of bytes.
 int ObjectInput.read(byte[] b, int off, int len)
Reads into an array of bytes.
 long ObjectInput.skip(long n)
Skips n bytes of input.
 int ObjectInput.available()
Returns the number of bytes that can be read without blocking.
 void ObjectInput.close()
Closes the input stream.
 int StringReader.read()
Read a single character.
 int StringReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 long StringReader.skip(long ns)
Skip characters.
 boolean StringReader.ready()
Tell whether this stream is ready to be read.
 void StringReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void StringReader.reset()
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked.
 int StreamTokenizer.nextToken()
Parses the next token from the input stream of this tokenizer.
 Object ObjectInputStream.readObject()
Read an object from the ObjectInputStream.
protected  Object ObjectInputStream.readObjectOverride()
This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.
 void ObjectInputStream.defaultReadObject()
Read the non-static and non-transient fields of the current class from this stream.
 ObjectInputStream.GetField ObjectInputStream.readFields()
Reads the persistent fields from the stream and makes them available by name.
protected  Class ObjectInputStream.resolveClass(ObjectStreamClass v)
Load the local class equivalent of the specified stream class description.
protected  Class ObjectInputStream.resolveProxyClass(String[] interfaces)
Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
protected  Object ObjectInputStream.resolveObject(Object obj)
This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
protected  void ObjectInputStream.readStreamHeader()
The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.
protected  ObjectStreamClass ObjectInputStream.readClassDescriptor()
Read a class descriptor from the serialization stream.
 int ObjectInputStream.read()
Reads a byte of data.
 int ObjectInputStream.read(byte[] b, int off, int len)
Reads into an array of bytes.
 int ObjectInputStream.available()
Returns the number of bytes that can be read without blocking.
 void ObjectInputStream.close()
Closes the input stream.
 boolean ObjectInputStream.readBoolean()
Reads in a boolean.
 byte ObjectInputStream.readByte()
Reads an 8 bit byte.
 int ObjectInputStream.readUnsignedByte()
Reads an unsigned 8 bit byte.
 short ObjectInputStream.readShort()
Reads a 16 bit short.
 int ObjectInputStream.readUnsignedShort()
Reads an unsigned 16 bit short.
 char ObjectInputStream.readChar()
Reads a 16 bit char.
 int ObjectInputStream.readInt()
Reads a 32 bit int.
 long ObjectInputStream.readLong()
Reads a 64 bit long.
 float ObjectInputStream.readFloat()
Reads a 32 bit float.
 double ObjectInputStream.readDouble()
Reads a 64 bit double.
 void ObjectInputStream.readFully(byte[] data)
Reads bytes, blocking until all bytes are read.
 void ObjectInputStream.readFully(byte[] data, int offset, int size)
Reads bytes, blocking until all bytes are read.
 int ObjectInputStream.skipBytes(int len)
Skips bytes, block until all bytes are skipped.
 String ObjectInputStream.readLine()
Deprecated. This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.
 String ObjectInputStream.readUTF()
Reads a UTF format String.
abstract  boolean ObjectInputStream.GetField.defaulted(String name)
Return true if the named field is defaulted and has no value in this stream.
abstract  boolean ObjectInputStream.GetField.get(String name, boolean defvalue)
Get the value of the named boolean field from the persistent field.
abstract  char ObjectInputStream.GetField.get(String name, char defvalue)
Get the value of the named char field from the persistent fields.
abstract  byte ObjectInputStream.GetField.get(String name, byte defvalue)
Get the value of the named byte field from the persistent fields.
abstract  short ObjectInputStream.GetField.get(String name, short defvalue)
Get the value of the named short field from the persistent fields.
abstract  int ObjectInputStream.GetField.get(String name, int defvalue)
Get the value of the named int field from the persistent fields.
abstract  long ObjectInputStream.GetField.get(String name, long defvalue)
Get the value of the named long field from the persistent fields.
abstract  float ObjectInputStream.GetField.get(String name, float defvalue)
Get the value of the named float field from the persistent fields.
abstract  double ObjectInputStream.GetField.get(String name, double defvalue)
Get the value of the named double field from the persistent field.
abstract  Object ObjectInputStream.GetField.get(String name, Object defvalue)
Get the value of the named Object field from the persistent field.
 void PipedInputStream.connect(PipedOutputStream src)
Causes this piped input stream to be connected to the piped output stream src.
protected  void PipedInputStream.receive(int b)
Receives a byte of data.
 int PipedInputStream.read()
Reads the next byte of data from this piped input stream.
 int PipedInputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from this piped input stream into an array of bytes.
 int PipedInputStream.available()
Returns the number of bytes that can be read from this input stream without blocking.
 void PipedInputStream.close()
Closes this piped input stream and releases any system resources associated with the stream.
 int InputStreamReader.read()
Read a single character.
 int InputStreamReader.read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 boolean InputStreamReader.ready()
Tell whether this stream is ready to be read.
 void InputStreamReader.close()
Close the stream.
 int PushbackInputStream.read()
Reads the next byte of data from this input stream.
 int PushbackInputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.
 void PushbackInputStream.unread(int b)
Pushes back a byte by copying it to the front of the pushback buffer.
 void PushbackInputStream.unread(byte[] b, int off, int len)
Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer.
 void PushbackInputStream.unread(byte[] b)
Pushes back an array of bytes by copying it to the front of the pushback buffer.
 int PushbackInputStream.available()
Returns the number of bytes that can be read from this input stream without blocking.
 long PushbackInputStream.skip(long n)
Skips over and discards n bytes of data from this input stream.
 void PushbackInputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 void ObjectOutput.writeObject(Object obj)
Write an object to the underlying storage or stream.
 void ObjectOutput.write(int b)
Writes a byte.
 void ObjectOutput.write(byte[] b)
Writes an array of bytes.
 void ObjectOutput.write(byte[] b, int off, int len)
Writes a sub array of bytes.
 void ObjectOutput.flush()
Flushes the stream.
 void ObjectOutput.close()
Closes the stream.
 String File.getCanonicalPath()
Returns the canonical pathname string of this abstract pathname.
 File File.getCanonicalFile()
Returns the canonical form of this abstract pathname.
 boolean File.createNewFile()
Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist.
static File File.createTempFile(String prefix, String suffix, File directory)
Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
static File File.createTempFile(String prefix, String suffix)
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
 void DataOutput.write(int b)
Writes to the output stream the eight low-order bits of the argument b.
 void DataOutput.write(byte[] b)
Writes to the output stream all the bytes in array b.
 void DataOutput.write(byte[] b, int off, int len)
Writes len bytes from array b, in order, to the output stream.
 void DataOutput.writeBoolean(boolean v)
Writes a boolean value to this output stream.
 void DataOutput.writeByte(int v)
Writes to the output stream the eight low- order bits of the argument v.
 void DataOutput.writeShort(int v)
Writes two bytes to the output stream to represent the value of the argument.
 void DataOutput.writeChar(int v)
Writes a char value, wich is comprised of two bytes, to the output stream.
 void DataOutput.writeInt(int v)
Writes an int value, which is comprised of four bytes, to the output stream.
 void DataOutput.writeLong(long v)
Writes an long value, which is comprised of four bytes, to the output stream.
 void DataOutput.writeFloat(float v)
Writes a float value, which is comprised of four bytes, to the output stream.
 void DataOutput.writeDouble(double v)
Writes a double value, which is comprised of eight bytes, to the output stream.
 void DataOutput.writeBytes(String s)
Writes a string to the output stream.
 void DataOutput.writeChars(String s)
Writes every character in the string s, to the output stream, in order, two bytes per character.
 void DataOutput.writeUTF(String str)
Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s.
 void StringWriter.close()
Close the stream.
 void OutputStreamWriter.write(int c)
Write a single character.
 void OutputStreamWriter.write(char[] cbuf, int off, int len)
Write a portion of an array of characters.
 void OutputStreamWriter.write(String str, int off, int len)
Write a portion of a string.
 void OutputStreamWriter.flush()
Flush the stream.
 void OutputStreamWriter.close()
Close the stream.
 void DataInput.readFully(byte[] b)
Reads some bytes from an input stream and stores them into the buffer array b.
 void DataInput.readFully(byte[] b, int off, int len)
Reads len bytes from an input stream.
 int DataInput.skipBytes(int n)
Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.
 boolean DataInput.readBoolean()
Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
 byte DataInput.readByte()
Reads and returns one input byte.
 int DataInput.readUnsignedByte()
Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
 short DataInput.readShort()
Reads two input bytes and returns a short value.
 int DataInput.readUnsignedShort()
Reads two input bytes and returns an int value in the range 0 through 65535.
 char DataInput.readChar()
Reads an input char and returns the char value.
 int DataInput.readInt()
Reads four input bytes and returns an int value.
 long DataInput.readLong()
Reads eight input bytes and returns a long value.
 float DataInput.readFloat()
Reads four input bytes and returns a float value.
 double DataInput.readDouble()
Reads eight input bytes and returns a double value.
 String DataInput.readLine()
Reads the next line of text from the input stream.
 String DataInput.readUTF()
Reads in a string that has been encoded using a modified UTF-8 format.
protected  void ObjectOutputStream.writeObjectOverride(Object obj)
Method used by subclasses to override the default writeObject method.
 void ObjectOutputStream.useProtocolVersion(int version)
Specify stream protocol version to use when writing the stream.
 void ObjectOutputStream.writeObject(Object obj)
Write the specified object to the ObjectOutputStream.
 void ObjectOutputStream.defaultWriteObject()
Write the non-static and non-transient fields of the current class to this stream.
 ObjectOutputStream.PutField ObjectOutputStream.putFields()
Retrieve the object used to buffer persistent fields to be written to the stream.
 void ObjectOutputStream.writeFields()
Write the buffered fields to the stream.
 void ObjectOutputStream.reset()
Reset will disregard the state of any objects already written to the stream.
protected  void ObjectOutputStream.annotateClass(Class cl)
Subclasses may implement this method to allow class data to be stored in the stream.
protected  void ObjectOutputStream.annotateProxyClass(Class cl)
Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.
protected  Object ObjectOutputStream.replaceObject(Object obj)
This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization.
protected  void ObjectOutputStream.writeStreamHeader()
The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream.
protected  void ObjectOutputStream.writeClassDescriptor(ObjectStreamClass classdesc)
Write the specified class descriptor to the ObjectOutputStream.
 void ObjectOutputStream.write(int data)
Writes a byte.
 void ObjectOutputStream.write(byte[] b)
Writes an array of bytes.
 void ObjectOutputStream.write(byte[] b, int off, int len)
Writes a sub array of bytes.
 void ObjectOutputStream.flush()
Flushes the stream.
protected  void ObjectOutputStream.drain()
Drain any buffered data in ObjectOutputStream.
 void ObjectOutputStream.close()
Closes the stream.
 void ObjectOutputStream.writeBoolean(boolean data)
Writes a boolean.
 void ObjectOutputStream.writeByte(int data)
Writes an 8 bit byte.
 void ObjectOutputStream.writeShort(int data)
Writes a 16 bit short.
 void ObjectOutputStream.writeChar(int data)
Writes a 16 bit char.
 void ObjectOutputStream.writeInt(int data)
Writes a 32 bit int.
 void ObjectOutputStream.writeLong(long data)
Writes a 64 bit long.
 void ObjectOutputStream.writeFloat(float data)
Writes a 32 bit float.
 void ObjectOutputStream.writeDouble(double data)
Writes a 64 bit double.
 void ObjectOutputStream.writeBytes(String data)
Writes a String as a sequence of bytes.
 void ObjectOutputStream.writeChars(String data)
Writes a String as a sequence of chars.
 void ObjectOutputStream.writeUTF(String s)
Primitive data write of this String in UTF format.
abstract  void ObjectOutputStream.PutField.write(ObjectOutput out)
Write the data and fields to the specified ObjectOutput stream.
 int BufferedInputStream.read()
See the general contract of the read method of InputStream.
 int BufferedInputStream.read(byte[] b, int off, int len)
Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.
 long BufferedInputStream.skip(long n)
See the general contract of the skip method of InputStream.
 int BufferedInputStream.available()
Returns the number of bytes that can be read from this input stream without blocking.
 void BufferedInputStream.reset()
See the general contract of the reset method of InputStream.
 void BufferedInputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 void BufferedOutputStream.write(int b)
Writes the specified byte to this buffered output stream.
 void BufferedOutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this buffered output stream.
 void BufferedOutputStream.flush()
Flushes this buffered output stream.
 void ByteArrayInputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 int CharArrayReader.read()
Read a single character.
 int CharArrayReader.read(char[] b, int off, int len)
Read characters into a portion of an array.
 long CharArrayReader.skip(long n)
Skip characters.
 boolean CharArrayReader.ready()
Tell whether this stream is ready to be read.
 void CharArrayReader.mark(int readAheadLimit)
Mark the present position in the stream.
 void CharArrayReader.reset()
Reset the stream to the most recent mark, or to the beginning if it has never been marked.
 void CharArrayWriter.writeTo(Writer out)
Writes the contents of the buffer to another character stream.
 FileDescriptor RandomAccessFile.getFD()
Returns the opaque file descriptor object associated with this stream.
 int RandomAccessFile.read()
Reads a byte of data from this file.
 int RandomAccessFile.read(byte[] b, int off, int len)
Reads up to len bytes of data from this file into an array of bytes.
 int RandomAccessFile.read(byte[] b)
Reads up to b.length bytes of data from this file into an array of bytes.
 void RandomAccessFile.readFully(byte[] b)
Reads b.length bytes from this file into the byte array, starting at the current file pointer.
 void RandomAccessFile.readFully(byte[] b, int off, int len)
Reads exactly len bytes from this file into the byte array, starting at the current file pointer.
 int RandomAccessFile.skipBytes(int n)
Attempts to skip over n bytes of input discarding the skipped bytes.
 void RandomAccessFile.write(int b)
Writes the specified byte to this file.
 void RandomAccessFile.write(byte[] b)
Writes b.length bytes from the specified byte array to this file, starting at the current file pointer.
 void RandomAccessFile.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this file.
 long RandomAccessFile.getFilePointer()
Returns the current offset in this file.
 void RandomAccessFile.seek(long pos)
Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs.
 long RandomAccessFile.length()
Returns the length of this file.
 void RandomAccessFile.setLength(long newLength)
Sets the length of this file.
 void RandomAccessFile.close()
Closes this random access file stream and releases any system resources associated with the stream.
 boolean RandomAccessFile.readBoolean()
Reads a boolean from this file.
 byte RandomAccessFile.readByte()
Reads a signed eight-bit value from this file.
 int RandomAccessFile.readUnsignedByte()
Reads an unsigned eight-bit number from this file.
 short RandomAccessFile.readShort()
Reads a signed 16-bit number from this file.
 int RandomAccessFile.readUnsignedShort()
Reads an unsigned 16-bit number from this file.
 char RandomAccessFile.readChar()
Reads a Unicode character from this file.
 int RandomAccessFile.readInt()
Reads a signed 32-bit integer from this file.
 long RandomAccessFile.readLong()
Reads a signed 64-bit integer from this file.
 float RandomAccessFile.readFloat()
Reads a float from this file.
 double RandomAccessFile.readDouble()
Reads a double from this file.
 String RandomAccessFile.readLine()
Reads the next line of text from this file.
 String RandomAccessFile.readUTF()
Reads in a string from this file.
 void RandomAccessFile.writeBoolean(boolean v)
Writes a boolean to the file as a one-byte value.
 void RandomAccessFile.writeByte(int v)
Writes a byte to the file as a one-byte value.
 void RandomAccessFile.writeShort(int v)
Writes a short to the file as two bytes, high byte first.
 void RandomAccessFile.writeChar(int v)
Writes a char to the file as a two-byte value, high byte first.
 void RandomAccessFile.writeInt(int v)
Writes an int to the file as four bytes, high byte first.
 void RandomAccessFile.writeLong(long v)
Writes a long to the file as eight bytes, high byte first.
 void RandomAccessFile.writeFloat(float v)
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the file as a four-byte quantity, high byte first.
 void RandomAccessFile.writeDouble(double v)
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the file as an eight-byte quantity, high byte first.
 void RandomAccessFile.writeBytes(String s)
Writes the string to the file as a sequence of bytes.
 void RandomAccessFile.writeChars(String s)
Writes a string to the file as a sequence of characters.
 void RandomAccessFile.writeUTF(String str)
Writes a string to the file using UTF-8 encoding in a machine-independent manner.
 void PipedOutputStream.connect(PipedInputStream snk)
Connects this piped output stream to a receiver.
 void PipedOutputStream.write(int b)
Writes the specified byte to the piped output stream.
 void PipedOutputStream.write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this piped output stream.
 void PipedOutputStream.flush()
Flushes this output stream and forces any buffered output bytes to be written out.
 void PipedOutputStream.close()
Closes this piped output stream and releases any system resources associated with this stream.
 void ByteArrayOutputStream.writeTo(OutputStream out)
Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count).
 void ByteArrayOutputStream.close()
Closes this output stream and releases any system resources associated with this stream.
 int SequenceInputStream.available()
Returns the number of bytes available on the current stream.
 int SequenceInputStream.read()
Reads the next byte of data from this input stream.
 int SequenceInputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.
 void SequenceInputStream.close()
Closes this input stream and releases any system resources associated with the stream.
 int DataInputStream.read(byte[] b)
See the general contract of the read method of DataInput.
 int DataInputStream.read(byte[] b, int off, int len)
See the general contract of the read method of DataInput.
 void DataInputStream.readFully(byte[] b)
See the general contract of the readFully method of DataInput.
 void DataInputStream.readFully(byte[] b, int off, int len)
See the general contract of the readFully method of DataInput.
 int DataInputStream.skipBytes(int n)
See the general contract of the skipBytes method of DataInput.
 boolean DataInputStream.readBoolean()
See the general contract of the readBoolean method of DataInput.
 byte DataInputStream.readByte()
See the general contract of the readByte method of DataInput.
 int DataInputStream.readUnsignedByte()
See the general contract of the readUnsignedByte method of DataInput.
 short DataInputStream.readShort()
See the general contract of the readShort method of DataInput.
 int DataInputStream.readUnsignedShort()
See the general contract of the readUnsignedShort method of DataInput.
 char DataInputStream.readChar()
See the general contract of the readChar method of DataInput.
 int DataInputStream.readInt()
See the general contract of the readInt method of DataInput.
 long DataInputStream.readLong()
See the general contract of the readLong method of DataInput.
 float DataInputStream.readFloat()
See the general contract of the readFloat method of DataInput.
 double DataInputStream.readDouble()
See the general contract of the readDouble method of DataInput.
 String DataInputStream.readLine()
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 String DataInputStream.readUTF()
See the general contract of the readUTF method of DataInput.
static String DataInputStream.readUTF(DataInput in)
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
 int LineNumberInputStream.read()
Deprecated. Reads the next byte of data from this input stream.
 int LineNumberInputStream.read(byte[] b, int off, int len)
Deprecated. Reads up to len bytes of data from this input stream into an array of bytes.
 long LineNumberInputStream.skip(long n)
Deprecated. Skips over and discards n bytes of data from this input stream.
 int LineNumberInputStream.available()
Deprecated. Returns the number of bytes that can be read from this input stream without blocking.
 void LineNumberInputStream.reset()
Deprecated. Repositions this stream to the position at the time the mark method was last called on this input stream.
 void BufferedWriter.write(int c)
Write a single character.
 void BufferedWriter.write(char[] cbuf, int off, int len)
Write a portion of an array of characters.
 void BufferedWriter.write(String s, int off, int len)
Write a portion of a String.
 void BufferedWriter.newLine()
Write a line separator.
 void BufferedWriter.flush()
Flush the stream.
 void BufferedWriter.close()
Close the stream.
 int FileInputStream.read()
Reads a byte of data from this input stream.
 int FileInputStream.read(byte[] b)
Reads up to b.length bytes of data from this input stream into an array of bytes.
 int FileInputStream.read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.
 long FileInputStream.skip(long n)
Skips over and discards n bytes of data from the input stream.
 int FileInputStream.available()
Returns the number of bytes that can be read from this file input stream without blocking.
 void FileInputStream.close()
Closes this file input stream and releases any system resources associated with the stream.
 FileDescriptor FileInputStream.getFD()
Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.
protected  void FileInputStream.finalize()
Ensures that the close method of this file input stream is called when there are no more references to it.

Constructors in java.io that throw IOException
PipedReader(PipedWriter src)
Creates a PipedReader so that it is connected to the piped writer src.
PipedWriter(PipedReader snk)
Creates a piped writer connected to the specified piped reader.
ObjectInputStream(InputStream in)
Create an ObjectInputStream that reads from the specified InputStream.
ObjectInputStream()
Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.
PipedInputStream(PipedOutputStream src)
Creates a PipedInputStream so that it is connected to the piped output stream src.
FileWriter(String fileName)
Constructs a FileWriter object given a file name.
FileWriter(String fileName, boolean append)
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
FileWriter(File file)
Constructs a FileWriter object given a File object.
ObjectOutputStream(OutputStream out)
Creates an ObjectOutputStream that writes to the specified OutputStream.
ObjectOutputStream()
Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.
PipedOutputStream(PipedInputStream snk)
Creates a piped output stream connected to the specified piped input stream.

Uses of IOException in java.lang

Methods in java.lang that throw IOException
Process | Runtime.exec(String command) Executes the specified string command in a separate process.
Process | Runtime.exec(String cmd, String[] envp) Executes the specified string command in a separate process with the specified environment.
Process | Runtime.exec(String command, String[] envp, File dir) Executes the specified string command in a separate process with the specified environment and working directory.
Process | Runtime.exec(String[] cmdarray) Executes the specified command and arguments in a separate process.
Process | Runtime.exec(String[] cmdarray, String[] envp) Executes the specified command and arguments in a separate process with the specified environment.
Process | Runtime.exec(String[] cmdarray, String[] envp, File dir) Executes the specified command and arguments in a separate process with the specified environment and working directory.
Enumeration | ClassLoader.getResources(String name) Finds all the resources with the given name.
protected Enumeration | ClassLoader.findResources(String name) Returns an Enumeration of URLs representing all the resources with the given name.
static Enumeration | ClassLoader.getSystemResources(String name) Finds all resources of the specified name from the search path used to load classes.

Uses of IOException in java.net

Subclasses of IOException in java.net
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | MalformedURLException Thrown to indicate that a malformed URL has occurred.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | ProtocolException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | UnknownHostException Thrown to indicate that the IP address of a host could not be determined.
class | UnknownServiceException Thrown to indicate that an unknown service exception has occurred.

Methods in java.net that throw IOException
 Enumeration URLClassLoader.findResources(String name)
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
 void DatagramSocket.send(DatagramPacket p)
Sends a datagram packet from this socket.
 void DatagramSocket.receive(DatagramPacket p)
Receives a datagram packet from this socket.
static void DatagramSocket.setDatagramSocketImplFactory(DatagramSocketImplFactory fac)
Sets the datagram socket implementation factory for the application.
abstract  void URLConnection.connect()
Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
 Object URLConnection.getContent()
Retrieves the contents of this URL connection.
 Object URLConnection.getContent(Class[] classes)
Retrieves the contents of this URL connection.
 Permission URLConnection.getPermission()
Returns a permission object representing the permission necessary to make the connection represented by this object.
 InputStream URLConnection.getInputStream()
Returns an input stream that reads from this open connection.
 OutputStream URLConnection.getOutputStream()
Returns an output stream that writes to this connection.
static String URLConnection.guessContentTypeFromStream(InputStream is)
Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
abstract  JarFile JarURLConnection.getJarFile()
Return the JAR file for this connection.
 Manifest JarURLConnection.getManifest()
Returns the Manifest for this connection, or null if none.
 JarEntry JarURLConnection.getJarEntry()
Return the JAR entry object for this connection, if any.
 Attributes JarURLConnection.getAttributes()
Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
 Attributes JarURLConnection.getMainAttributes()
Returns the main Attributes for the JAR file for this connection.
 Certificate[] JarURLConnection.getCertificates()
Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.
protected abstract  void SocketImpl.create(boolean stream)
Creates either a stream or a datagram socket.
protected abstract  void SocketImpl.connect(String host, int port)
Connects this socket to the specified port on the named host.
protected abstract  void SocketImpl.connect(InetAddress address, int port)
Connects this socket to the specified port number on the specified host.
protected abstract  void SocketImpl.bind(InetAddress host, int port)
Binds this socket to the specified port number on the specified host.
protected abstract  void SocketImpl.listen(int backlog)
Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.
protected abstract  void SocketImpl.accept(SocketImpl s)
Accepts a connection.
protected abstract  InputStream SocketImpl.getInputStream()
Returns an input stream for this socket.
protected abstract  OutputStream SocketImpl.getOutputStream()
Returns an output stream for this socket.
protected abstract  int SocketImpl.available()
Returns the number of bytes that can be read from this socket without blocking.
protected abstract  void SocketImpl.close()
Closes this socket.
protected  void SocketImpl.shutdownInput()
Places the input stream for this socket at "end of stream".
protected  void SocketImpl.shutdownOutput()
Disables the output stream for this socket.
 InputStream Socket.getInputStream()
Returns an input stream for this socket.
 OutputStream Socket.getOutputStream()
Returns an output stream for this socket.
 void Socket.close()
Closes this socket.
 void Socket.shutdownInput()
Places the input stream for this socket at "end of stream".
 void Socket.shutdownOutput()
Disables the output stream for this socket.
static void Socket.setSocketImplFactory(SocketImplFactory fac)
Sets the client socket implementation factory for the application.
 void MulticastSocket.setTTL(byte ttl)
Deprecated. use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.
 void MulticastSocket.setTimeToLive(int ttl)
Set the default time-to-live for multicast packets sent out on this socket.
 byte MulticastSocket.getTTL()
Deprecated. use the getTimeToLive method instead, which returns an int instead of a byte.
 int MulticastSocket.getTimeToLive()
Get the default time-to-live for multicast packets sent out on the socket.
 void MulticastSocket.joinGroup(InetAddress mcastaddr)
Joins a multicast group.Its behavior may be affected by setInterface.
 void MulticastSocket.leaveGroup(InetAddress mcastaddr)
Leave a multicast group.
 void MulticastSocket.send(DatagramPacket p, byte ttl)
Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket.
 URLConnection URL.openConnection()
Returns a URLConnection object that represents a connection to the remote object referred to by the URL.
 InputStream URL.openStream()
Opens a connection to this URL and returns an InputStream for reading from that connection.
 Object URL.getContent()
Returns the contents of this URL.
 Object URL.getContent(Class[] classes)
Returns the contents of this URL.
 int HttpURLConnection.getResponseCode()
Gets HTTP response status from responses like:
 String HttpURLConnection.getResponseMessage()
Gets the HTTP response message, if any, returned along with the response code from a server.
 Permission HttpURLConnection.getPermission()
 Socket ServerSocket.accept()
Listens for a connection to be made to this socket and accepts it.
protected  void ServerSocket.implAccept(Socket s)
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.
 void ServerSocket.close()
Closes this socket.
 int ServerSocket.getSoTimeout()
Retrive setting for SO_TIMEOUT.
static void ServerSocket.setSocketFactory(SocketImplFactory fac)
Sets the server socket implementation factory for the application.
protected abstract  void DatagramSocketImpl.send(DatagramPacket p)
Sends a datagram packet.
protected abstract  int DatagramSocketImpl.peek(InetAddress i)
Peek at the packet to see who it is from.
protected abstract  void DatagramSocketImpl.receive(DatagramPacket p)
Receive the datagram packet.
protected abstract  void DatagramSocketImpl.setTTL(byte ttl)
Deprecated. use setTimeToLive instead.
protected abstract  byte DatagramSocketImpl.getTTL()
Deprecated. use getTimeToLive instead.
protected abstract  void DatagramSocketImpl.setTimeToLive(int ttl)
Set the TTL (time-to-live) option.
protected abstract  int DatagramSocketImpl.getTimeToLive()
Retrieve the TTL (time-to-live) option.
protected abstract  void DatagramSocketImpl.join(InetAddress inetaddr)
Join the multicast group.
protected abstract  void DatagramSocketImpl.leave(InetAddress inetaddr)
Leave the multicast group.
protected abstract  URLConnection URLStreamHandler.openConnection(URL u)
Opens a connection to the object referenced by the URL argument.
abstract  Object ContentHandler.getContent(URLConnection urlc)
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
 Object ContentHandler.getContent(URLConnection urlc, Class[] classes)
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

Constructors in java.net that throw IOException
Socket(String host, int port)
Creates a stream socket and connects it to the specified port number on the named host.
Socket(InetAddress address, int port)
Creates a stream socket and connects it to the specified port number at the specified IP address.
Socket(String host, int port, InetAddress localAddr, int localPort)
Creates a socket and connects it to the specified remote host on the specified remote port.
Socket(InetAddress address, int port, InetAddress localAddr, int localPort)
Creates a socket and connects it to the specified remote address on the specified remote port.
Socket(String host, int port, boolean stream)
Deprecated. Use DatagramSocket instead for UDP transport.
Socket(InetAddress host, int port, boolean stream)
Deprecated. Use DatagramSocket instead for UDP transport.
MulticastSocket()
Create a multicast socket.
MulticastSocket(int port)
Create a multicast socket and bind it to a specific port.
ServerSocket(int port)
Creates a server socket on a specified port.
ServerSocket(int port, int backlog)
Creates a server socket and binds it to the specified local port number, with the specified backlog.
ServerSocket(int port, int backlog, InetAddress bindAddr)
Create a server with the specified port, listen backlog, and local IP address to bind to.

Uses of IOException in java.rmi

Subclasses of IOException in java.rmi
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | RemoteException A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Methods in java.rmi that throw IOException
 Object MarshalledObject.get()
Returns a new copy of the contained marshalledobject.

Constructors in java.rmi that throw IOException
MarshalledObject(Object obj)
Creates a new MarshalledObject that contains the serialized representation of the current state of the supplied object.

Uses of IOException in java.rmi.activation

Subclasses of IOException in java.rmi.activation
 class ActivateFailedException
This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.

Uses of IOException in java.rmi.server

Subclasses of IOException in java.rmi.server
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Methods in java.rmi.server that throw IOException
void | UID.write(DataOutput out) Write the UID to output stream, out.
static UID | UID.read(DataInput in) Reads the UID from the input stream.
ObjectOutput | RemoteCall.getOutputStream() Deprecated. no replacement
void | RemoteCall.releaseOutputStream() Deprecated. no replacement
ObjectInput | RemoteCall.getInputStream() Deprecated. no replacement
void | RemoteCall.releaseInputStream() Deprecated. no replacement
ObjectOutput | RemoteCall.getResultStream(boolean success) Deprecated. no replacement
void | RemoteCall.done() Deprecated. no replacement
ServerSocket | RMIServerSocketFactory.createServerSocket(int port) Create a server socket on the specified port (port 0 indicates an anonymous port).
Socket | RMIClientSocketFactory.createSocket(String host, int port) Create a client socket connected to the specified host and port.
void | ObjID.write(ObjectOutput out) Marshals object id to output stream.
static ObjID | ObjID.read(ObjectInput in) Constructs an object id whose contents is read from the specified input stream.
abstract Socket | RMISocketFactory.createSocket(String host, int port) Creates a client socket connected to the specified host and port.
abstract ServerSocket | RMISocketFactory.createServerSocket(int port) Create a server socket on the specified port (port 0 indicates an anonymous port).
static void | RMISocketFactory.setSocketFactory(RMISocketFactory fac) Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory).

Uses of IOException in java.security

Methods in java.security that throw IOException
void | Provider.load(InputStream inStream) Reads a property list (key and element pairs) from the input stream.
void | Certificate.encode(OutputStream stream) Deprecated. Encodes the certificate to an output stream in a format that can be decoded by the decode method.
void | Certificate.decode(InputStream stream) Deprecated. Decodes a certificate from an input stream.
void | AlgorithmParameters.init(byte[] params) Imports the specified parameters and decodes them according to the primary decoding format for parameters.
void | AlgorithmParameters.init(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding scheme.
byte[] | AlgorithmParameters.getEncoded() Returns the parameters in their primary encoding format.
byte[] | AlgorithmParameters.getEncoded(String format) Returns the parameters encoded in the specified scheme.
void | KeyStore.store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
void | KeyStore.load(InputStream stream, char[] password) Loads this KeyStore from the given input stream.
abstract void | KeyStoreSpi.engineStore(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
abstract void | KeyStoreSpi.engineLoad(InputStream stream, char[] password) Loads the keystore from the given input stream.
Object | SignedObject.getObject() Retrieves the encapsulated object.
void | DigestOutputStream.write(int b) Updates the message digest (if the digest function is on) using the specified byte, and in any case writes the byte to the output stream.
void | DigestOutputStream.write(byte[] b, int off, int len) Updates the message digest (if the digest function is on) using the specified subarray, and in any case writes the subarray to the output stream.
int | DigestInputStream.read() Reads a byte, and updates the message digest (if the digest function is on).
int | DigestInputStream.read(byte[] b, int off, int len) Reads into a byte array, and updates the message digest (if the digest function is on).
protected abstract void | AlgorithmParametersSpi.engineInit(byte[] params) Imports the specified parameters and decodes them according to the primary decoding format for parameters.
protected abstract void | AlgorithmParametersSpi.engineInit(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding format.
protected abstract byte[] | AlgorithmParametersSpi.engineGetEncoded() Returns the parameters in their primary encoding format.
protected abstract byte[] | AlgorithmParametersSpi.engineGetEncoded(String format) Returns the parameters encoded in the specified format.

Constructors in java.security that throw IOException
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Uses of IOException in java.util

Methods in java.util that throw IOException
void | Properties.load(InputStream inStream) Reads a property list (key and element pairs) from the input stream.
void | Properties.store(OutputStream out, String header) Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.

Constructors in java.util that throw IOException
PropertyResourceBundle(InputStream stream)
Creates a property resource

Uses of IOException in java.util.jar

Subclasses of IOException in java.util.jar
 class JarException
Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Methods in java.util.jar that throw IOException
ZipEntry | JarInputStream.getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
JarEntry | JarInputStream.getNextJarEntry() Reads the next JAR file entry and positions the stream at the beginning of the entry data.
int | JarInputStream.read(byte[] b, int off, int len) Reads from the current JAR file entry into an array of bytes.
void | Manifest.write(OutputStream out) Writes the Manifest to the specified OutputStream.
void | Manifest.read(InputStream is) Reads the Manifest from the specified InputStream.
Manifest | JarFile.getManifest() Returns the JAR file manifest, or null if none.
InputStream | JarFile.getInputStream(ZipEntry ze) Returns an input stream for reading the contents of the specified ZIP file entry.
Attributes | JarEntry.getAttributes() Returns the Manifest Attributes for this entry, or null if none.
void | JarOutputStream.putNextEntry(ZipEntry ze) Begins writing a new JAR file entry and positions the stream to the start of the entry data.

Constructors in java.util.jar that throw IOException
JarInputStream(InputStream in)
Creates a new JarInputStream and reads the optional manifest.
JarInputStream(InputStream in, boolean verify)
Creates a new JarInputStream and reads the optional manifest.
Manifest(InputStream is)
Constructs a new Manifest from the specified input stream.
JarFile(String name)
Creates a new JarFile to read from the specified file name.
JarFile(String name, boolean verify)
Creates a new JarFile to read from the specified file name.
JarFile(File file)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify, int mode)
Creates a new JarFile to read from the specified File object in the specified mode.
JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with the specified Manifest.
JarOutputStream(OutputStream out)
Creates a new JarOutputStream with no manifest.

Uses of IOException in java.util.zip

Subclasses of IOException in java.util.zip
 class ZipException
Signals that a Zip exception of some sort has occurred.

Methods in java.util.zip that throw IOException
int | InflaterInputStream.read() Reads a byte of uncompressed data.
int | InflaterInputStream.read(byte[] b, int off, int len) Reads uncompressed data into an array of bytes.
int | InflaterInputStream.available() Returns 0 after EOF has reached, otherwise always return 1.
long | InflaterInputStream.skip(long n) Skips specified number of bytes of uncompressed data.
void | InflaterInputStream.close() Closes the input stream.
protected void | InflaterInputStream.fill() Fills input buffer with more data to decompress.
ZipEntry | ZipInputStream.getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
void | ZipInputStream.closeEntry() Closes the current ZIP entry and positions the stream for reading the next entry.
int | ZipInputStream.available() Returns 0 after EOF has reached for the current entry data, otherwise always return 1.
int | ZipInputStream.read(byte[] b, int off, int len) Reads from the current ZIP entry into an array of bytes.
long | ZipInputStream.skip(long n) Skips specified number of bytes in the current ZIP entry.
void | ZipInputStream.close() Closes the ZIP input stream.
InputStream | ZipFile.getInputStream(ZipEntry entry) Returns an input stream for reading the contents of the specified zip file entry.
void | ZipFile.close() Closes the ZIP file.
protected void | ZipFile.finalize() Ensures that the close method of this ZIP file is called when there are no more references to it.
void | DeflaterOutputStream.write(int b) Writes a byte to the compressed output stream.
void | DeflaterOutputStream.write(byte[] b, int off, int len) Writes an array of bytes to the compressed output stream.
void | DeflaterOutputStream.finish() Finishes writing compressed data to the output stream without closing the underlying stream.
void | DeflaterOutputStream.close() Writes remaining compressed data to the output stream and closes the underlying stream.
protected void | DeflaterOutputStream.deflate() Writes next block of compressed data to the output stream.
void | ZipOutputStream.putNextEntry(ZipEntry e) Begins writing a new ZIP file entry and positions the stream to the start of the entry data.
void | ZipOutputStream.closeEntry() Closes the current ZIP entry and positions the stream for writing the next entry.
void | ZipOutputStream.write(byte[] b, int off, int len) Writes an array of bytes to the current ZIP entry data.
void | ZipOutputStream.finish() Finishes writing the contents of the ZIP output stream without closing the underlying stream.
void | ZipOutputStream.close() Closes the ZIP output stream as well as the stream being filtered.
int | CheckedInputStream.read() Reads a byte.
int | CheckedInputStream.read(byte[] buf, int off, int len) Reads into an array of bytes.
long | CheckedInputStream.skip(long n) Skips specified number of bytes of input.
void | GZIPOutputStream.write(byte[] buf, int off, int len) Writes array of bytes to the compressed output stream.
void | GZIPOutputStream.finish() Finishes writing compressed data to the output stream without closing the underlying stream.
void | GZIPOutputStream.close() Writes remaining compressed data to the output stream and closes the underlying stream.
int | GZIPInputStream.read(byte[] buf, int off, int len) Reads uncompressed data into an array of bytes.
void | GZIPInputStream.close() Closes the input stream.
void | CheckedOutputStream.write(int b) Writes a byte.
void | CheckedOutputStream.write(byte[] b, int off, int len) Writes an array of bytes.

Constructors in java.util.zip that throw IOException
ZipFile(String name)
Opens a zip file for reading.
ZipFile(File file, int mode)
Opens a new ZipFile to read from the specified File object in the specified mode.
ZipFile(File file)
Opens a ZIP file for reading given the specified File object.
GZIPOutputStream(OutputStream out, int size)
Creates a new output stream with the specified buffer size.
GZIPOutputStream(OutputStream out)
Creates a new output stream with a default buffer size.
GZIPInputStream(InputStream in, int size)
Creates a new input stream with the specified buffer size.
GZIPInputStream(InputStream in)
Creates a new input stream with a default buffer size.

Uses of IOException in javax.rmi.CORBA

Methods in javax.rmi.CORBA that throw IOException
 void StubDelegate.readObject(Stub self, ObjectInputStream s)
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.
 void StubDelegate.writeObject(Stub self, ObjectOutputStream s)
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.

Uses of IOException in javax.sound.midi

Methods in javax.sound.midi that throw IOException
static Soundbank | MidiSystem.getSoundbank(InputStream stream) Constructs a MIDI sound bank by reading it from the specified stream.
static Soundbank | MidiSystem.getSoundbank(URL url) Constructs a Soundbank by reading it from the specified URL.
static Soundbank | MidiSystem.getSoundbank(File file) Constructs a Soundbank by reading it from the specified File.
static MidiFileFormat | MidiSystem.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the data in the specified input stream.
static MidiFileFormat | MidiSystem.getMidiFileFormat(URL url) Obtains the MIDI file format of the data in the specified URL.
static MidiFileFormat | MidiSystem.getMidiFileFormat(File file) Obtains the MIDI file format of the specified File.
static Sequence | MidiSystem.getSequence(InputStream stream) Obtains a MIDI sequence from the specified input stream.
static Sequence | MidiSystem.getSequence(URL url) Obtains a MIDI sequence from the specified URL.
static Sequence | MidiSystem.getSequence(File file) Obtains a MIDI sequence from the specified File.
static int | MidiSystem.write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.
static int | MidiSystem.write(Sequence in, int type, File out) Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
void | Sequencer.setSequence(InputStream stream) Sets the current sequence on which the sequencer operates.

Uses of IOException in javax.sound.midi.spi

Methods in javax.sound.midi.spi that throw IOException
abstract Soundbank | SoundbankReader.getSoundbank(URL url) Obtains a soundbank object from the URL provided.
abstract Soundbank | SoundbankReader.getSoundbank(InputStream stream) Obtains a soundbank object from the InputStream provided.
abstract Soundbank | SoundbankReader.getSoundbank(File file) Obtains a soundbank object from the File provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the input stream provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(URL url) Obtains the MIDI file format of the URL provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(File file) Obtains the MIDI file format of the File provided.
abstract Sequence | MidiFileReader.getSequence(InputStream stream) Obtains a MIDI sequence from the input stream provided.
abstract Sequence | MidiFileReader.getSequence(URL url) Obtains a MIDI sequence from the URL provided.
abstract Sequence | MidiFileReader.getSequence(File file) Obtains a MIDI sequence from the File provided.
abstract int | MidiFileWriter.write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
abstract int | MidiFileWriter.write(Sequence in, int fileType, File out) Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.

Uses of IOException in javax.sound.sampled

Methods in javax.sound.sampled that throw IOException
int | AudioInputStream.read() Reads the next byte of data from the audio input stream.
int | AudioInputStream.read(byte[] b) Reads some number of bytes from the audio input stream and stores them into the buffer array b.
int | AudioInputStream.read(byte[] b, int off, int len) Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.
long | AudioInputStream.skip(long n) Skips over and discards a specified number of bytes from this audio input stream.
int | AudioInputStream.available() Returns the maximum number of bytes that can be read (or skipped over) from this audio input stream without blocking.
void | AudioInputStream.close() Closes this audio input stream and releases any system resources associated with the stream.
void | AudioInputStream.reset() Repositions this audio input stream to the position it had at the time its mark method was last invoked.
static AudioFileFormat | AudioSystem.getAudioFileFormat(InputStream stream) Obtains the audio file format of the provided input stream.
static AudioFileFormat | AudioSystem.getAudioFileFormat(URL url) Obtains the audio file format of the specified URL.
static AudioFileFormat | AudioSystem.getAudioFileFormat(File file) Obtains the audio file format of the specified File.
static AudioInputStream | AudioSystem.getAudioInputStream(InputStream stream) Obtains an audio input stream from the provided input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
static AudioInputStream | AudioSystem.getAudioInputStream(File file) Obtains an audio input stream from the provided File.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
void | Clip.open(AudioInputStream stream) Opens the clip with the format and audio data present in the provided audio input stream.

Uses of IOException in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that throw IOException
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(InputStream stream) Obtains the audio file format of the input stream provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(URL url) Obtains the audio file format of the URL provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(File file) Obtains the audio file format of the File provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(InputStream stream) Obtains an audio input stream from the input stream provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(File file) Obtains an audio input stream from the File provided.

Uses of IOException in javax.swing

Methods in javax.swing that throw IOException
void | JEditorPane.setPage(URL page) Sets the current URL being displayed.
void | JEditorPane.read(InputStream in, Object desc) This method initializes from a stream.
protected InputStream | JEditorPane.getStream(URL page) Fetches a stream for the given URL, which is about to be loaded by the setPage method.
void | JEditorPane.setPage(String url) Sets the current URL being displayed.
int | ProgressMonitorInputStream.read() Overrides FilterInputStream.read to update the progress monitor after the read.
int | ProgressMonitorInputStream.read(byte[] b) Overrides FilterInputStream.read to update the progress monitor after the read.
int | ProgressMonitorInputStream.read(byte[] b, int off, int len) Overrides FilterInputStream.read to update the progress monitor after the read.
long | ProgressMonitorInputStream.skip(long n) Overrides FilterInputStream.skip to update the progress monitor after the skip.
void | ProgressMonitorInputStream.close() Overrides FilterInputStream.close to close the progress monitor as well as the stream.
void | ProgressMonitorInputStream.reset() Overrides FilterInputStream.reset to reset the progress monitor as well as the stream.

Constructors in javax.swing that throw IOException
JEditorPane(URL initialPage)
Creates a JEditorPane based on a specified URL for input.
JEditorPane(String url)
Creates a JEditorPane based on a string containing a URL specification.

Uses of IOException in javax.swing.filechooser

Methods in javax.swing.filechooser that throw IOException
abstract  File FileSystemView.createNewFolder(File containingDir)
creates a new folder with a default folder name.

Uses of IOException in javax.swing.text

Subclasses of IOException in javax.swing.text
 class ChangedCharSetException
ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.

Methods in javax.swing.text that throw IOException
void | JTextComponent.read(Reader in, Object desc) Initializes from a stream.
void | JTextComponent.write(Writer out) Stores the contents of the model into the given stream.
void | StyleContext.writeAttributes(ObjectOutputStream out, AttributeSet a) Context-specific handling of writing out attributes
void | StyleContext.readAttributes(ObjectInputStream in, MutableAttributeSet a) Context-specific handling of reading in attributes
static void | StyleContext.writeAttributeSet(ObjectOutputStream out, AttributeSet a) Writes a set of attributes to the given object stream for the purpose of serialization.
static void | StyleContext.readAttributeSet(ObjectInputStream in, MutableAttributeSet a) Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.
abstract void | EditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
abstract void | EditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
protected abstract void | AbstractWriter.write() This abstract method needs to be implemented by subclasses.
protected void | AbstractWriter.text(Element elem) Writes out text.
protected void | AbstractWriter.indent() Does indentation.
protected void | AbstractWriter.write(char ch) Writes out a character.
protected void | AbstractWriter.write(String content) Writes out a string.
protected void | AbstractWriter.writeLineSeparator() Writes the line separator.
protected void | AbstractWriter.write(char[] chars, int startIndex, int length) All write methods call into this one.
protected void | AbstractWriter.writeAttributes(AttributeSet attr) Writes out the set of attributes as " =" pairs.
protected void | AbstractWriter.output(char[] content, int start, int length) The last stop in writing out content.
void | DefaultEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream, which will be treated as plain text.
void | DefaultEditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream as plain text.

Uses of IOException in javax.swing.text.html

Methods in javax.swing.text.html that throw IOException
 void StyleSheet.loadRules(Reader in, URL ref)
Loads a set of rules that have been specified in terms of CSS1 grammar.
 void HTMLDocument.setInnerHTML(Element elem, String htmlText)
Replaces the children of the given element with the contents specified as an HTML string.
 void HTMLDocument.setOuterHTML(Element elem, String htmlText)
Replaces the given element in the parent with the contents specified as an HTML string.
 void HTMLDocument.insertAfterStart(Element elem, String htmlText)
Inserts the HTML specified as a string at the start of the element.
 void HTMLDocument.insertBeforeEnd(Element elem, String htmlText)
Inserts the HTML specified as a string at the end of the element.
 void HTMLDocument.insertBeforeStart(Element elem, String htmlText)
Inserts the HTML specified as string before the start of the given element.
 void HTMLDocument.insertAfterEnd(Element elem, String htmlText)
Inserts the HTML specified as a string after the the end of the given element.
 void HTMLEditorKit.read(Reader in, Document doc, int pos)
Inserts content from the given stream.
 void HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag)
Inserts HTML into an existing document.
 void HTMLEditorKit.write(Writer out, Document doc, int pos, int len)
Write content from a document to the given stream in a format appropriate for this kind of content handler.
 void HTMLWriter.write()
Iterates over the Element tree and controls the writing out of all the tags and its attributes.
protected  void HTMLWriter.writeAttributes(AttributeSet attr)
Writes out the attribute set.
protected  void HTMLWriter.emptyTag(Element elem)
Writes out all empty elements (all tags that have no corresponding end tag).
protected  void HTMLWriter.startTag(Element elem)
Writes out a start tag for the element.
protected  void HTMLWriter.textAreaContent(AttributeSet attr)
Writes out text that is contained in a TEXTAREA form element.
protected  void HTMLWriter.text(Element elem)
Writes out text.
protected  void HTMLWriter.selectContent(AttributeSet attr)
Writes out the content of the SELECT form element.
protected  void HTMLWriter.writeOption(Option option)
Writes out the content of the Option form element.
protected  void HTMLWriter.endTag(Element elem)
Writes out an end tag for the element.
protected  void HTMLWriter.comment(Element elem)
Writes out comments.
protected  void HTMLWriter.writeEmbeddedTags(AttributeSet attr)
Searches for embedded tags in the AttributeSet and writes them out.
protected  void HTMLWriter.closeOutUnwantedEmbeddedTags(AttributeSet attr)
Searches the attribute set and for each tag that is stored in the tag vector.
protected  void HTMLWriter.writeLineSeparator()
Writes the line separator.
protected  void HTMLWriter.output(char[] chars, int start, int length)
This method is overriden to map any character entities, such as < to &lt;.
 void MinimalHTMLWriter.write()
Generates HTML output from a StyledDocument.
protected  void MinimalHTMLWriter.writeAttributes(AttributeSet attr)
Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.
protected  void MinimalHTMLWriter.text(Element elem)
Writes out text.
protected  void MinimalHTMLWriter.writeStartTag(String tag)
Writes out a start tag appropriately indented.
protected  void MinimalHTMLWriter.writeEndTag(String endTag)
Writes out an end tag appropriately indented.
protected  void MinimalHTMLWriter.writeHeader()
Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag.
protected  void MinimalHTMLWriter.writeStyles()
Writes out all the named styles as the content of the <style> tag.
protected  void MinimalHTMLWriter.writeBody()
Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
protected  void MinimalHTMLWriter.writeEndParagraph()
Emits an end tag for a <p> tag.
protected  void MinimalHTMLWriter.writeStartParagraph(Element elem)
Emits the start tag for a paragraph.
protected  void MinimalHTMLWriter.writeLeaf(Element elem)
Responsible for writing out other non-text leaf elements.
protected  void MinimalHTMLWriter.writeImage(Element elem)
Responsible for handling Icon Elements; deliberately unimplemented.
protected  void MinimalHTMLWriter.writeComponent(Element elem)
Responsible for handling Component Elements; deliberately unimplemented.
protected  void MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting)
Writes out the attribute set in an HTML-compliant manner.
protected  void MinimalHTMLWriter.writeHTMLTags(AttributeSet attr)
Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
protected  void MinimalHTMLWriter.writeNonHTMLAttributes(AttributeSet attr)
Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.
protected  void MinimalHTMLWriter.endFontTag()
This is no longer used, instead <span> will be written out.
protected  void MinimalHTMLWriter.startFontTag(String style)
This is no longer used, instead <span> will be written out.
abstract  void HTMLEditorKit.Parser.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
Parse the given stream and drive the given callback with the results of the parse.

Uses of IOException in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that throw IOException
String | Parser.parseDTDMarkup() Parses th Document Declaration Type markup declaration.
protected boolean | Parser.parseMarkupDeclarations(StringBuffer strBuff) Parse markup declarations.
void | Parser.parse(Reader in) Parse an HTML stream, given a DTD.
static DTD | DTD.getDTD(String name) Get a DTD.
void | DTD.read(DataInputStream in)
void | ParserDelegator.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
void | DocumentParser.parse(Reader in, HTMLEditorKit.ParserCallback callback, boolean ignoreCharSet)

Uses of IOException in javax.swing.text.rtf

Methods in javax.swing.text.rtf that throw IOException
void | RTFEditorKit.read(InputStream in, Document doc, int pos) Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | RTFEditorKit.write(OutputStream out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
void | RTFEditorKit.read(Reader in, Document doc, int pos) Insert content from the given stream, which will be treated as plain text.
void | RTFEditorKit.write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream as plain text.

Uses of IOException in javax.transaction

Subclasses of IOException in javax.transaction
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Uses of IOException in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that throw IOException
void | OutputStream.write(int b) Writes an integer (length of arrays) onto this stream.
int | InputStream.read()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.NotActiveException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.NotActiveException

Packages that use NotActiveException
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of NotActiveException in java.io

Methods in java.io that throw NotActiveException
void | ObjectInputStream.defaultReadObject() Read the non-static and non-transient fields of the current class from this stream.
ObjectInputStream.GetField | ObjectInputStream.readFields() Reads the persistent fields from the stream and makes them available by name.
void | ObjectInputStream.registerValidation(ObjectInputValidation obj, int prio) Register an object to be validated before the graph is returned.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectInputStream

Packages that use ObjectInputStream
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ObjectInputStream in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type ObjectInputStream
protected  void BeanContextSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called by readObject after defaultReadObject() but prior to deserialization of any children.
protected  void BeanContextSupport.deserialize(ObjectInputStream ois, Collection coll)
used by readObject to deserialize a collection.
 void BeanContextSupport.readChildren(ObjectInputStream ois)
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
protected  void BeanContextServicesSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called from BeanContextSupport readObject before it deserializes the children ...

Uses of ObjectInputStream in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type ObjectInputStream
 void StubDelegate.readObject(Stub self, ObjectInputStream s)
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.

Uses of ObjectInputStream in javax.swing.text

Methods in javax.swing.text with parameters of type ObjectInputStream
void | StyleContext.readAttributes(ObjectInputStream in, MutableAttributeSet a) Context-specific handling of reading in attributes
static void | StyleContext.readAttributeSet(ObjectInputStream in, MutableAttributeSet a) Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectInputStream.GetField

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectInputStream.GetField

Packages that use ObjectInputStream.GetField
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectInputStream.GetField in java.io

Methods in java.io that return ObjectInputStream.GetField
 ObjectInputStream.GetField ObjectInputStream.readFields()
Reads the persistent fields from the stream and makes them available by name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectOutputStream

Packages that use ObjectOutputStream
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ObjectOutputStream in java.awt

Methods in java.awt with parameters of type ObjectOutputStream
protected void | AWTEventMulticaster.saveInternal(ObjectOutputStream s, String k)
protected static void | AWTEventMulticaster.save(ObjectOutputStream s, String k, EventListener l)

Uses of ObjectOutputStream in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type ObjectOutputStream
protected  void BeanContextSupport.bcsPreSerializationHook(ObjectOutputStream oos)
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
protected  void BeanContextSupport.serialize(ObjectOutputStream oos, Collection coll)
Used by writeObject to serialize a Collection.
 void BeanContextSupport.writeChildren(ObjectOutputStream oos)
Used to serialize all children of this BeanContext.
protected  void BeanContextServicesSupport.bcsPreSerializationHook(ObjectOutputStream oos)
called from BeanContextSupport writeObject before it serializes the children ...

Uses of ObjectOutputStream in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type ObjectOutputStream
 void StubDelegate.writeObject(Stub self, ObjectOutputStream s)
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.

Uses of ObjectOutputStream in javax.swing.text

Methods in javax.swing.text with parameters of type ObjectOutputStream
void | StyleContext.writeAttributes(ObjectOutputStream out, AttributeSet a) Context-specific handling of writing out attributes
static void | StyleContext.writeAttributeSet(ObjectOutputStream out, AttributeSet a) Writes a set of attributes to the given object stream for the purpose of serialization.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectOutputStream.PutField

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectOutputStream.PutField

Packages that use ObjectOutputStream.PutField
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectOutputStream.PutField in java.io

Methods in java.io that return ObjectOutputStream.PutField
 ObjectOutputStream.PutField ObjectOutputStream.putFields()
Retrieve the object used to buffer persistent fields to be written to the stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectStreamClass

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectStreamClass

Packages that use ObjectStreamClass
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectStreamClass in java.io

Methods in java.io that return ObjectStreamClass
protected ObjectStreamClass | ObjectInputStream.readClassDescriptor() Read a class descriptor from the serialization stream.
abstract ObjectStreamClass | ObjectInputStream.GetField.getObjectStreamClass() Get the ObjectStreamClass that describes the fields in the stream.
static ObjectStreamClass | ObjectStreamClass.lookup(Class cl) Find the descriptor for a class that can be serialized.

Methods in java.io with parameters of type ObjectStreamClass
protected Class | ObjectInputStream.resolveClass(ObjectStreamClass v) Load the local class equivalent of the specified stream class description.
protected void | ObjectOutputStream.writeClassDescriptor(ObjectStreamClass classdesc) Write the specified class descriptor to the ObjectOutputStream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectStreamException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectStreamException

Packages that use ObjectStreamException
java.awt.color | Provides classes for color spaces.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of ObjectStreamException in java.awt.color

Methods in java.awt.color that throw ObjectStreamException
protected  Object ICC_Profile.readResolve()
Resolves instances being deserialized into instances registered with CMM.

Uses of ObjectStreamException in java.io

Subclasses of ObjectStreamException in java.io
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Uses of ObjectStreamException in java.security.cert

Methods in java.security.cert that throw ObjectStreamException
protected Object | Certificate.writeReplace() Replace the Certificate to be serialized.
protected Object | Certificate.CertificateRep.readResolve() Resolve the Certificate Object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.ObjectStreamField

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.ObjectStreamField

Packages that use ObjectStreamField
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectStreamField in java.io

Fields in java.io declared as ObjectStreamField
static ObjectStreamField[] ObjectStreamClass.NO_FIELDS
Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields.

Methods in java.io that return ObjectStreamField
ObjectStreamField[] | ObjectStreamClass.getFields() Return an array of the fields of this serializable class.
ObjectStreamField | ObjectStreamClass.getField(String name) Get the field of this class by name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.OptionalDataException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.OptionalDataException

Packages that use OptionalDataException
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of OptionalDataException in java.io

Methods in java.io that throw OptionalDataException
Object | ObjectInputStream.readObject() Read an object from the ObjectInputStream.
protected Object | ObjectInputStream.readObjectOverride() This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.OutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.OutputStream

Packages that use OutputStream
java.awt.color | Provides classes for color spaces.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of OutputStream in java.awt.color

Methods in java.awt.color with parameters of type OutputStream
 void ICC_Profile.write(OutputStream s)
Write this ICC_Profile to an OutputStream.

Uses of OutputStream in java.io

Subclasses of OutputStream in java.io
class | BufferedOutputStream The class implements a buffered output stream.
class | ByteArrayOutputStream This class implements an output stream in which the data is written into a byte array.
class | DataOutputStream A data input stream lets an application write primitive Java data types to an output stream in a portable way.
class | FileOutputStream A file output stream is an output stream for writing data to a File or to a FileDescriptor.
class | FilterOutputStream This class is the superclass of all classes that filter output streams.
class | ObjectOutputStream An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
class | PipedOutputStream A piped output stream can be connected to a piped input stream to create a communications pipe.
class | PrintStream A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.

Fields in java.io declared as OutputStream
protected  OutputStream FilterOutputStream.out
The underlying output stream to be filtered.

Methods in java.io with parameters of type OutputStream
 void ByteArrayOutputStream.writeTo(OutputStream out)
Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count).

Constructors in java.io with parameters of type OutputStream
FilterOutputStream(OutputStream out)
Creates an output stream filter built on top of the specified underlying output stream.
PrintStream(OutputStream out)
Create a new print stream.
PrintStream(OutputStream out, boolean autoFlush)
Create a new print stream.
DataOutputStream(OutputStream out)
Creates a new data output stream to write data to the specified underlying output stream.
OutputStreamWriter(OutputStream out, String enc)
Create an OutputStreamWriter that uses the named character encoding.
OutputStreamWriter(OutputStream out)
Create an OutputStreamWriter that uses the default character encoding.
PrintWriter(OutputStream out)
Create a new PrintWriter, without automatic line flushing, from an existing OutputStream.
PrintWriter(OutputStream out, boolean autoFlush)
Create a new PrintWriter from an existing OutputStream.
ObjectOutputStream(OutputStream out)
Creates an ObjectOutputStream that writes to the specified OutputStream.
BufferedOutputStream(OutputStream out)
Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
BufferedOutputStream(OutputStream out, int size)
Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.

Uses of OutputStream in java.lang

Methods in java.lang that return OutputStream
OutputStream | Runtime.getLocalizedOutputStream(OutputStream out) Deprecated. As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.
abstract OutputStream | Process.getOutputStream() Gets the output stream of the subprocess.

Methods in java.lang with parameters of type OutputStream
 OutputStream Runtime.getLocalizedOutputStream(OutputStream out)
Deprecated. As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.

Uses of OutputStream in java.net

Methods in java.net that return OutputStream
OutputStream | URLConnection.getOutputStream() Returns an output stream that writes to this connection.
protected abstract OutputStream | SocketImpl.getOutputStream() Returns an output stream for this socket.
OutputStream | Socket.getOutputStream() Returns an output stream for this socket.

Uses of OutputStream in java.rmi.server

Subclasses of OutputStream in java.rmi.server
 class LogStream
Deprecated. no replacement

Methods in java.rmi.server that return OutputStream
 OutputStream LogStream.getOutputStream()
Deprecated. no replacement

Methods in java.rmi.server with parameters of type OutputStream
static void | RemoteServer.setLog(OutputStream out) Log RMI calls to the output stream out.
void | LogStream.setOutputStream(OutputStream out) Deprecated. no replacement

Uses of OutputStream in java.security

Subclasses of OutputStream in java.security
 class DigestOutputStream
A transparent stream that updates the associated message digest using the bits going through the stream.

Methods in java.security with parameters of type OutputStream
void | Certificate.encode(OutputStream stream) Deprecated. Encodes the certificate to an output stream in a format that can be decoded by the decode method.
void | KeyStore.store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
abstract void | KeyStoreSpi.engineStore(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.

Constructors in java.security with parameters of type OutputStream
DigestOutputStream(OutputStream stream, MessageDigest digest)
Creates a digest output stream, using the specified output stream and message digest.

Uses of OutputStream in java.util

Methods in java.util with parameters of type OutputStream
 void Properties.save(OutputStream out, String header)
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.
 void Properties.store(OutputStream out, String header)
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.

Uses of OutputStream in java.util.jar

Subclasses of OutputStream in java.util.jar
 class JarOutputStream
The JarOutputStream class is used to write the contents of a JAR file to any output stream.

Methods in java.util.jar with parameters of type OutputStream
 void Manifest.write(OutputStream out)
Writes the Manifest to the specified OutputStream.

Constructors in java.util.jar with parameters of type OutputStream
JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with the specified Manifest.
JarOutputStream(OutputStream out)
Creates a new JarOutputStream with no manifest.

Uses of OutputStream in java.util.zip

Subclasses of OutputStream in java.util.zip
class | CheckedOutputStream An output stream that also maintains a checksum of the data being written.
class | DeflaterOutputStream This class implements an output stream filter for compressing data in the "deflate" compression format.
class | GZIPOutputStream This class implements a stream filter for writing compressed data in the GZIP file format.
class | ZipOutputStream This class implements an output stream filter for writing files in the ZIP file format.

Constructors in java.util.zip with parameters of type OutputStream
DeflaterOutputStream(OutputStream out, Deflater def, int size)
Creates a new output stream with the specified compressor and buffer size.
DeflaterOutputStream(OutputStream out, Deflater def)
Creates a new output stream with the specified compressor and a default buffer size.
DeflaterOutputStream(OutputStream out)
Creates a new output stream with a defaul compressor and buffer size.
ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.
GZIPOutputStream(OutputStream out, int size)
Creates a new output stream with the specified buffer size.
GZIPOutputStream(OutputStream out)
Creates a new output stream with a default buffer size.
CheckedOutputStream(OutputStream out, Checksum cksum)
Creates an output stream with the specified Checksum.

Uses of OutputStream in javax.sound.midi

Methods in javax.sound.midi with parameters of type OutputStream
static int MidiSystem.write(Sequence in, int fileType, OutputStream out)
Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.

Uses of OutputStream in javax.sound.midi.spi

Methods in javax.sound.midi.spi with parameters of type OutputStream
abstract  int MidiFileWriter.write(Sequence in, int fileType, OutputStream out)
Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.

Uses of OutputStream in javax.sound.sampled

Methods in javax.sound.sampled with parameters of type OutputStream
static int AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out)
Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.

Uses of OutputStream in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi with parameters of type OutputStream
abstract  int AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out)
Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.

Uses of OutputStream in javax.swing.text

Methods in javax.swing.text with parameters of type OutputStream
abstract void | EditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.

Uses of OutputStream in javax.swing.text.rtf

Methods in javax.swing.text.rtf with parameters of type OutputStream
 void RTFEditorKit.write(OutputStream out, Document doc, int pos, int len)
Write content from a document to the given stream in a format appropriate for this kind of content handler.

Uses of OutputStream in org.omg.CORBA.portable

Subclasses of OutputStream in org.omg.CORBA.portable
 class OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.OutputStreamWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.OutputStreamWriter

Packages that use OutputStreamWriter
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of OutputStreamWriter in java.io

Subclasses of OutputStreamWriter in java.io
 class FileWriter
Convenience class for writing character files.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PipedInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PipedInputStream

Packages that use PipedInputStream
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of PipedInputStream in java.io

Methods in java.io with parameters of type PipedInputStream
 void PipedOutputStream.connect(PipedInputStream snk)
Connects this piped output stream to a receiver.

Constructors in java.io with parameters of type PipedInputStream
PipedOutputStream(PipedInputStream snk)
Creates a piped output stream connected to the specified piped input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PipedOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PipedOutputStream

Packages that use PipedOutputStream
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of PipedOutputStream in java.io

Methods in java.io with parameters of type PipedOutputStream
 void PipedInputStream.connect(PipedOutputStream src)
Causes this piped input stream to be connected to the piped output stream src.

Constructors in java.io with parameters of type PipedOutputStream
PipedInputStream(PipedOutputStream src)
Creates a PipedInputStream so that it is connected to the piped output stream src.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PipedReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PipedReader

Packages that use PipedReader
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of PipedReader in java.io

Methods in java.io with parameters of type PipedReader
 void PipedWriter.connect(PipedReader snk)
Connects this piped writer to a receiver.

Constructors in java.io with parameters of type PipedReader
PipedWriter(PipedReader snk)
Creates a piped writer connected to the specified piped reader.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PipedWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PipedWriter

Packages that use PipedWriter
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of PipedWriter in java.io

Methods in java.io with parameters of type PipedWriter
 void PipedReader.connect(PipedWriter src)
Causes this piped reader to be connected to the piped writer src.

Constructors in java.io with parameters of type PipedWriter
PipedReader(PipedWriter src)
Creates a PipedReader so that it is connected to the piped writer src.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PrintStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PrintStream

Packages that use PrintStream
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of PrintStream in java.awt

Methods in java.awt with parameters of type PrintStream
void | Component.list(PrintStream out) Prints a listing of this component to the specified output stream.
void | Component.list(PrintStream out, int indent) Prints out a list, starting at the specified indention, to the specified print stream.
void | Container.list(PrintStream out, int indent) Prints a listing of this container to the specified output stream.

Uses of PrintStream in java.lang

Fields in java.lang declared as PrintStream
static PrintStream | System.out The "standard" output stream.
static PrintStream | System.err The "standard" error output stream.

Methods in java.lang with parameters of type PrintStream
void | Throwable.printStackTrace(PrintStream s) Prints this Throwable and its backtrace to the specified print stream.
static void | System.setOut(PrintStream out) Reassigns the "standard" output stream.
static void | System.setErr(PrintStream err) Reassigns the "standard" error output stream.
void | ExceptionInInitializerError.printStackTrace(PrintStream ps) Prints the stack trace of the exception that occurred to the specified print stream.
void | ClassNotFoundException.printStackTrace(PrintStream ps) Prints the stack backtrace to the specified print stream.

Uses of PrintStream in java.lang.reflect

Methods in java.lang.reflect with parameters of type PrintStream
void | InvocationTargetException.printStackTrace(PrintStream ps) Prints the stack trace of the thrown target exception to the specified print stream.
void | UndeclaredThrowableException.printStackTrace(PrintStream ps) Prints this UndeclaredThrowableException and its backtrace to the specified PrintStream.

Uses of PrintStream in java.rmi

Methods in java.rmi with parameters of type PrintStream
 void RemoteException.printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.

Uses of PrintStream in java.rmi.activation

Methods in java.rmi.activation with parameters of type PrintStream
 void ActivationException.printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.

Uses of PrintStream in java.rmi.server

Subclasses of PrintStream in java.rmi.server
 class LogStream
Deprecated. no replacement

Methods in java.rmi.server that return PrintStream
static PrintStream | RemoteServer.getLog() Returns stream for the RMI call log.
static PrintStream | LogStream.getDefaultStream() Deprecated. no replacement

Methods in java.rmi.server with parameters of type PrintStream
static void | LogStream.setDefaultStream(PrintStream newDefault) Deprecated. no replacement
void | ServerCloneException.printStackTrace(PrintStream ps) Prints the composite message and the embedded stack trace to the specified stream ps.

Uses of PrintStream in java.security

Methods in java.security with parameters of type PrintStream
 void PrivilegedActionException.printStackTrace(PrintStream ps)
Prints the stack trace of the exception that occurred to the specified print stream.

Uses of PrintStream in java.sql

Methods in java.sql that return PrintStream
static PrintStream DriverManager.getLogStream()
Deprecated.

Methods in java.sql with parameters of type PrintStream
static void DriverManager.setLogStream(PrintStream out)
Deprecated.

Uses of PrintStream in java.util

Methods in java.util with parameters of type PrintStream
 void Properties.list(PrintStream out)
Prints this property list out to the specified output stream.

Uses of PrintStream in javax.naming

Methods in javax.naming with parameters of type PrintStream
 void NamingException.printStackTrace(PrintStream ps)
Prints this exception's stack trace to a print stream.

Uses of PrintStream in javax.swing

Methods in javax.swing that return PrintStream
static PrintStream DebugGraphics.logStream()
Returns the stream to which the DebugGraphics logs drawing operations.

Methods in javax.swing with parameters of type PrintStream
static void DebugGraphics.setLogStream(PrintStream stream)
Sets the stream to which the DebugGraphics logs drawing operations.

Uses of PrintStream in javax.swing.text

Methods in javax.swing.text with parameters of type PrintStream
void | AbstractDocument.dump(PrintStream out) Gives a diagnostic dump.
void | AbstractDocument.AbstractElement.dump(PrintStream psOut, int indentAmount) Dumps a debugging representation of the element hierarchy.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.PrintWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.PrintWriter

Packages that use PrintWriter
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.naming | Provides the classes and interfaces for accessing naming services.

Uses of PrintWriter in java.awt

Methods in java.awt with parameters of type PrintWriter
void | Component.list(PrintWriter out) Prints a listing to the specified print writer.
void | Component.list(PrintWriter out, int indent) Prints out a list, starting at the specified indention, to the specified print writer.
void | Container.list(PrintWriter out, int indent) Prints out a list, starting at the specified indention, to the specified print writer.

Uses of PrintWriter in java.lang

Methods in java.lang with parameters of type PrintWriter
void | Throwable.printStackTrace(PrintWriter s) Prints this Throwable and its backtrace to the specified print writer.
void | ExceptionInInitializerError.printStackTrace(PrintWriter pw) Prints the stack trace of the exception that occurred to the specified print writer.
void | ClassNotFoundException.printStackTrace(PrintWriter pw) Prints the stack backtrace to the specified print writer.

Uses of PrintWriter in java.lang.reflect

Methods in java.lang.reflect with parameters of type PrintWriter
void | InvocationTargetException.printStackTrace(PrintWriter pw) Prints the stack trace of the thrown target exception to the specified print writer.
void | UndeclaredThrowableException.printStackTrace(PrintWriter pw) Prints this UndeclaredThrowableException and its backtrace to the specified PrintWriter.

Uses of PrintWriter in java.rmi

Methods in java.rmi with parameters of type PrintWriter
 void RemoteException.printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.

Uses of PrintWriter in java.rmi.activation

Methods in java.rmi.activation with parameters of type PrintWriter
 void ActivationException.printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.

Uses of PrintWriter in java.rmi.server

Methods in java.rmi.server with parameters of type PrintWriter
 void ServerCloneException.printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified writer pw.

Uses of PrintWriter in java.security

Methods in java.security with parameters of type PrintWriter
 void PrivilegedActionException.printStackTrace(PrintWriter pw)
Prints the stack trace of the exception that occurred to the specified print writer.

Uses of PrintWriter in java.sql

Methods in java.sql that return PrintWriter
static PrintWriter DriverManager.getLogWriter()
Gets the log writer.

Methods in java.sql with parameters of type PrintWriter
static void DriverManager.setLogWriter(PrintWriter out)
Sets the logging/tracing PrintWriter object that is used by the DriverManager and all drivers.

Uses of PrintWriter in java.util

Methods in java.util with parameters of type PrintWriter
 void Properties.list(PrintWriter out)
Prints this property list out to the specified output stream.

Uses of PrintWriter in javax.naming

Methods in javax.naming with parameters of type PrintWriter
 void NamingException.printStackTrace(PrintWriter pw)
Prints this exception's stack trace to a print writer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.Reader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.Reader

Packages that use Reader
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of Reader in java.awt.datatransfer

Methods in java.awt.datatransfer that return Reader
 Reader DataFlavor.getReaderForText(Transferable transferable)
Gets a reader for an input stream, decoded for the expected charset (encoding).

Uses of Reader in java.io

Subclasses of Reader in java.io
class | BufferedReader Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
class | CharArrayReader This class implements a character buffer that can be used as a character-input stream.
class | FileReader Convenience class for reading character files.
class | FilterReader Abstract class for reading filtered character streams.
class | InputStreamReader An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding.
class | LineNumberReader A buffered character-input stream that keeps track of line numbers.
class | PipedReader Piped character-input streams.
class | PushbackReader A character-stream reader that allows characters to be pushed back into the stream.
class | StringReader A character stream whose source is a string.

Fields in java.io declared as Reader
protected  Reader FilterReader.in
The underlying character-input stream, or null if the stream has been closed.

Constructors in java.io with parameters of type Reader
FilterReader(Reader in)
Create a new filtered reader.
PushbackReader(Reader in, int size)
Create a new pushback reader with a pushback buffer of the given size.
PushbackReader(Reader in)
Create a new pushback reader with a one-character pushback buffer.
BufferedReader(Reader in, int sz)
Create a buffering character-input stream that uses an input buffer of the specified size.
BufferedReader(Reader in)
Create a buffering character-input stream that uses a default-sized input buffer.
LineNumberReader(Reader in)
Create a new line-numbering reader, using the default input-buffer size.
LineNumberReader(Reader in, int sz)
Create a new line-numbering reader, reading characters into a buffer of the given size.
StreamTokenizer(Reader r)
Create a tokenizer that parses the given character stream.

Uses of Reader in java.sql

Methods in java.sql that return Reader
Reader | SQLInput.readCharacterStream() Returns the next attribute in the stream as a stream of Unicode characters.
Reader | ResultSet.getCharacterStream(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Reader | ResultSet.getCharacterStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Reader | Clob.getCharacterStream() Gets the CLOB value designated by this Clob object as a Unicode stream.

Methods in java.sql with parameters of type Reader
void | PreparedStatement.setCharacterStream(int parameterIndex, Reader reader, int length) Sets the designated parameter to the given Reader object, which is the given number of characters long.
void | SQLOutput.writeCharacterStream(Reader x) Writes the next attribute to the stream as a stream of Unicode characters.
void | ResultSet.updateCharacterStream(int columnIndex, Reader x, int length) Updates the designated column with a character stream value.
void | ResultSet.updateCharacterStream(String columnName, Reader reader, int length) Updates the designated column with a character stream value.

Uses of Reader in javax.swing.text

Methods in javax.swing.text with parameters of type Reader
void | JTextComponent.read(Reader in, Object desc) Initializes from a stream.
abstract void | EditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream, which will be treated as plain text.

Uses of Reader in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Reader
void | StyleSheet.loadRules(Reader in, URL ref) Loads a set of rules that have been specified in terms of CSS1 grammar.
void | HTMLEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream.
abstract void | HTMLEditorKit.Parser.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet) Parse the given stream and drive the given callback with the results of the parse.

Uses of Reader in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser with parameters of type Reader
void | Parser.parse(Reader in) Parse an HTML stream, given a DTD.
void | ParserDelegator.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
void | DocumentParser.parse(Reader in, HTMLEditorKit.ParserCallback callback, boolean ignoreCharSet)

Uses of Reader in javax.swing.text.rtf

Methods in javax.swing.text.rtf with parameters of type Reader
 void RTFEditorKit.read(Reader in, Document doc, int pos)
Insert content from the given stream, which will be treated as plain text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.SerializablePermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.SerializablePermission

Packages that use SerializablePermission
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of SerializablePermission in java.io

Fields in java.io declared as SerializablePermission
static SerializablePermission | ObjectStreamConstants.SUBSTITUTION_PERMISSION Enable substitution of one object for another during serialization/deserialization.
static SerializablePermission | ObjectStreamConstants.SUBCLASS_IMPLEMENTATION_PERMISSION Enable overriding of readObject and writeObject.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.StreamCorruptedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.StreamCorruptedException

Packages that use StreamCorruptedException
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of StreamCorruptedException in java.io

Methods in java.io that throw StreamCorruptedException
protected  void ObjectInputStream.readStreamHeader()
The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.

Constructors in java.io that throw StreamCorruptedException
ObjectInputStream(InputStream in)
Create an ObjectInputStream that reads from the specified InputStream.

Uses of StreamCorruptedException in java.rmi.server

Methods in java.rmi.server that throw StreamCorruptedException
 ObjectOutput RemoteCall.getResultStream(boolean success)
Deprecated. no replacement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.SyncFailedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.SyncFailedException

Packages that use SyncFailedException
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of SyncFailedException in java.io

Methods in java.io that throw SyncFailedException
 void FileDescriptor.sync()
Force all system buffers to synchronize with the underlying device.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.UnsupportedEncodingException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.UnsupportedEncodingException

Packages that use UnsupportedEncodingException
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.

Uses of UnsupportedEncodingException in java.io

Methods in java.io that throw UnsupportedEncodingException
 String ByteArrayOutputStream.toString(String enc)
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.

Constructors in java.io that throw UnsupportedEncodingException
InputStreamReader(InputStream in, String enc)
Create an InputStreamReader that uses the named character encoding.
OutputStreamWriter(OutputStream out, String enc)
Create an OutputStreamWriter that uses the named character encoding.

Uses of UnsupportedEncodingException in java.lang

Methods in java.lang that throw UnsupportedEncodingException
 byte[] String.getBytes(String enc)
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.

Constructors in java.lang that throw UnsupportedEncodingException
String(byte[] bytes, int offset, int length, String enc)
Construct a new String by converting the specified subarray of bytes using the specified character encoding.
String(byte[] bytes, String enc)
Construct a new String by converting the specified array of bytes using the specified character encoding.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.io.Writer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.io.Writer

Packages that use Writer
java.io | Provides for system input and output through data streams, serialization and the file system.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of Writer in java.io

Subclasses of Writer in java.io
class | BufferedWriter Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
class | CharArrayWriter This class implements a character buffer that can be used as an Writer.
class | FileWriter Convenience class for writing character files.
class | FilterWriter Abstract class for writing filtered character streams.
class | OutputStreamWriter An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding.
class | PipedWriter Piped character-output streams.
class | PrintWriter Print formatted representations of objects to a text-output stream.
class | StringWriter A character stream that collects its output in a string buffer, which can then be used to construct a string.

Fields in java.io declared as Writer
protected Writer | FilterWriter.out The underlying character-output stream.
protected Writer | PrintWriter.out The underlying character-output stream of this PrintWriter.

Methods in java.io with parameters of type Writer
 void CharArrayWriter.writeTo(Writer out)
Writes the contents of the buffer to another character stream.

Constructors in java.io with parameters of type Writer
FilterWriter(Writer out)
Create a new filtered writer.
PrintWriter(Writer out)
Create a new PrintWriter, without automatic line flushing.
PrintWriter(Writer out, boolean autoFlush)
Create a new PrintWriter.
BufferedWriter(Writer out)
Create a buffered character-output stream that uses a default-sized output buffer.
BufferedWriter(Writer out, int sz)
Create a new buffered character-output stream that uses an output buffer of the given size.

Uses of Writer in javax.swing.text

Methods in javax.swing.text that return Writer
protected  Writer AbstractWriter.getWriter()
Returns the Writer that is used to output the content.

Methods in javax.swing.text with parameters of type Writer
void | JTextComponent.write(Writer out) Stores the contents of the model into the given stream.
abstract void | EditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream as plain text.

Constructors in javax.swing.text with parameters of type Writer
AbstractWriter(Writer w, Document doc)
Creates a new AbstractWriter.
AbstractWriter(Writer w, Document doc, int pos, int len)
Creates a new AbstractWriter.
AbstractWriter(Writer w, Element root)
Creates a new AbstractWriter.
AbstractWriter(Writer w, Element root, int pos, int len)
Creates a new AbstractWriter.

Uses of Writer in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Writer
 void HTMLEditorKit.write(Writer out, Document doc, int pos, int len)
Write content from a document to the given stream in a format appropriate for this kind of content handler.

Constructors in javax.swing.text.html with parameters of type Writer
HTMLWriter(Writer w, HTMLDocument doc)
Creates a new HTMLWriter.
HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)
Creates a new HTMLWriter.
MinimalHTMLWriter(Writer w, StyledDocument doc)
Creates a new MinimalHTMLWriter.
MinimalHTMLWriter(Writer w, StyledDocument doc, int pos, int len)
Creates a new MinimalHTMLWriter.

Uses of Writer in javax.swing.text.rtf

Methods in javax.swing.text.rtf with parameters of type Writer
 void RTFEditorKit.write(Writer out, Document doc, int pos, int len)
Write content from a document to the given stream as plain text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.DataInput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.DataInput

Packages that use DataInput
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of DataInput in java.io

Subinterfaces of DataInput in java.io
 interface ObjectInput
ObjectInput extends the DataInput interface to include the reading of objects.

Classes in java.io that implement DataInput
class | DataInputStream A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
class | ObjectInputStream An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
class | RandomAccessFile Instances of this class support both reading and writing to a random access file.

Methods in java.io with parameters of type DataInput
static String DataInputStream.readUTF(DataInput in)
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.

Uses of DataInput in java.rmi.server

Methods in java.rmi.server with parameters of type DataInput
static UID UID.read(DataInput in)
Reads the UID from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.DataOutput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.DataOutput

Packages that use DataOutput
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of DataOutput in java.io

Subinterfaces of DataOutput in java.io
 interface ObjectOutput
ObjectOutput extends the DataOutput interface to include writing of objects.

Classes in java.io that implement DataOutput
class | DataOutputStream A data input stream lets an application write primitive Java data types to an output stream in a portable way.
class | ObjectOutputStream An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
class | RandomAccessFile Instances of this class support both reading and writing to a random access file.

Uses of DataOutput in java.rmi.server

Methods in java.rmi.server with parameters of type DataOutput
 void UID.write(DataOutput out)
Write the UID to output stream, out.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.Externalizable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.Externalizable

Packages that use Externalizable
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of Externalizable in java.awt.datatransfer

Classes in java.awt.datatransfer that implement Externalizable
 class DataFlavor
Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.

Uses of Externalizable in java.rmi.server

Subinterfaces of Externalizable in java.rmi.server
interface | RemoteRef RemoteRef represents the handle for a remote object.
interface | ServerRef A ServerRef represents the server-side handle for a remote object implementation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.FileFilter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.FileFilter

Packages that use FileFilter
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of FileFilter in java.io

Methods in java.io with parameters of type FileFilter
 File[] File.listFiles(FileFilter filter)
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.FilenameFilter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.FilenameFilter

Packages that use FilenameFilter
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.io | Provides for system input and output through data streams, serialization and the file system.

Uses of FilenameFilter in java.awt

Methods in java.awt that return FilenameFilter
 FilenameFilter FileDialog.getFilenameFilter()
Determines this file dialog's filename filter.

Methods in java.awt with parameters of type FilenameFilter
 void FileDialog.setFilenameFilter(FilenameFilter filter)
Sets the filename filter for this file dialog window to the specified filter.

Uses of FilenameFilter in java.io

Methods in java.io with parameters of type FilenameFilter
String[] | File.list(FilenameFilter filter) Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
File[] | File.listFiles(FilenameFilter filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.ObjectInput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.ObjectInput

Packages that use ObjectInput
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of ObjectInput in java.awt.datatransfer

Methods in java.awt.datatransfer with parameters of type ObjectInput
 void DataFlavor.readExternal(ObjectInput is)
restore this DataFlavor from an Serialized state

Uses of ObjectInput in java.io

Classes in java.io that implement ObjectInput
 class ObjectInputStream
An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.

Methods in java.io with parameters of type ObjectInput
 void Externalizable.readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

Uses of ObjectInput in java.rmi.server

Methods in java.rmi.server that return ObjectInput
 ObjectInput RemoteCall.getInputStream()
Deprecated. no replacement

Methods in java.rmi.server with parameters of type ObjectInput
static ObjID ObjID.read(ObjectInput in)
Constructs an object id whose contents is read from the specified input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.ObjectInputValidation

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.ObjectInputValidation

Packages that use ObjectInputValidation
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectInputValidation in java.io

Methods in java.io with parameters of type ObjectInputValidation
 void ObjectInputStream.registerValidation(ObjectInputValidation obj, int prio)
Register an object to be validated before the graph is returned.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.ObjectOutput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.ObjectOutput

Packages that use ObjectOutput
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of ObjectOutput in java.awt.datatransfer

Methods in java.awt.datatransfer with parameters of type ObjectOutput
 void DataFlavor.writeExternal(ObjectOutput os)
Serialize this DataFlavor

Uses of ObjectOutput in java.io

Classes in java.io that implement ObjectOutput
 class ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.

Methods in java.io with parameters of type ObjectOutput
void | Externalizable.writeExternal(ObjectOutput out) The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
abstract void | ObjectOutputStream.PutField.write(ObjectOutput out) Write the data and fields to the specified ObjectOutput stream.

Uses of ObjectOutput in java.rmi.server

Methods in java.rmi.server that return ObjectOutput
ObjectOutput | RemoteCall.getOutputStream() Deprecated. no replacement
ObjectOutput | RemoteCall.getResultStream(boolean success) Deprecated. no replacement

Methods in java.rmi.server with parameters of type ObjectOutput
String | RemoteRef.getRefClass(ObjectOutput out) Returns the class name of the ref type to be serialized onto the stream 'out'.
void | ObjID.write(ObjectOutput out) Marshals object id to output stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.ObjectStreamConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.ObjectStreamConstants

Packages that use ObjectStreamConstants
java.io Provides for system input and output through data streams, serialization and the file system.

Uses of ObjectStreamConstants in java.io

Classes in java.io that implement ObjectStreamConstants
class | ObjectInputStream An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
class | ObjectOutputStream An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.io.Serializable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.io.Serializable

Packages that use Serializable
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of Serializable in java.applet

Classes in java.applet that implement Serializable
class | Applet An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
protected class | Applet.AccessibleApplet This class implements accessibility support for the Applet class.

Uses of Serializable in java.awt

Classes in java.awt that implement Serializable
class | AWTError Thrown when a serious Abstract Window Toolkit error has occurred.
class | AWTEvent The root event class for all AWT events.
class | AWTException Signals that an Absract Window Toolkit exception has occurred.
class | AWTPermission This class is for AWT permissions.
class | BorderLayout A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
class | Button This class creates a labeled button.
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
protected class | Canvas.AccessibleAWTCanvas This class implements accessibility support for the Canvas class.
class | CardLayout A CardLayout object is a layout manager for a container.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
class | CheckboxGroup The CheckboxGroup class is used to group together a set of Checkbox buttons.
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
class | Choice The Choice class presents a pop-up menu of choices.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
class | Color The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
class | Component A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
protected class | Component.AccessibleAWTComponent Inner class of Component used to provide default support for accessibility.
class | ComponentOrientation The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
class | Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
protected class | Container.AccessibleAWTContainer Inner class of Container used to provide default support for accessibility.
class | Cursor A class to encapsulate the bitmap representation of the mouse cursor.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
class | Dimension The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
class | Event Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | FlowLayout A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph.
class | Font The Font class represents fonts.
class | FontFormatException Thrown by method createFont in the Font class to indicate that the specified font is bad.
class | FontMetrics The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
class | Frame A Frame is a top-level window with a title and a border.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
class | GraphicsConfigTemplate The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration.
class | GridBagConstraints The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
class | GridBagLayout The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
class | GridLayout The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
class | IllegalComponentStateException Signals that an AWT component is not in an appropriate state for the requested operation.
class | Insets An Insets object is a representation of the borders of a container.
class | Label A Label object is a component for placing text in a container.
protected class | Label.AccessibleAWTLabel This class implements accessibility support for the Label class.
class | List The List component presents the user with a scrolling list of text items.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
class | MediaTracker The MediaTracker class is a utility class to track the status of a number of media objects.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
class | MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
class | MenuComponent The abstract class MenuComponent is the superclass of all menu-related components.
protected class | MenuComponent.AccessibleAWTMenuComponent Inner class of MenuComponent used to provide default support for accessibility.
class | MenuItem All items in a menu must belong to the class MenuItem, or one of its subclasses.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
class | MenuShortcut A class which represents a keyboard accelerator for a MenuItem.
class | Panel Panel is the simplest container class.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
class | Point A point representing a location in (x, y) coordinate space, specified in integer precision.
class | Polygon The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.
class | Rectangle A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
class | SystemColor A class to encapsulate symbolic colors representing the color of GUI objects on a system.
class | TextArea A TextArea object is a multi-line region that displays text.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.
class | Window A Window object is a top-level window with no borders and no menubar.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Uses of Serializable in java.awt.color

Classes in java.awt.color that implement Serializable
class | CMMException This exception is thrown if the native CMM returns an error.
class | ColorSpace This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
class | ICC_ColorSpace An implementation of the abstract ColorSpace class.
class | ICC_Profile A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).
class | ICC_ProfileGray A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
class | ICC_ProfileRGB A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags.
class | ProfileDataException This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Uses of Serializable in java.awt.datatransfer

Classes in java.awt.datatransfer that implement Serializable
class | DataFlavor Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
class | MimeTypeParseException A class to encapsulate MimeType parsing related exceptions
class | UnsupportedFlavorException Signals that the requested data is not supported in this flavor.

Uses of Serializable in java.awt.dnd

Classes in java.awt.dnd that implement Serializable
class | DragGestureEvent A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
class | DragSourceDragEvent The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
class | DragSourceDropEvent The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
class | DragSourceEvent This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
class | DropTarget The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
class | DropTargetDragEvent The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
class | DropTargetDropEvent The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
class | DropTargetEvent The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.
class | InvalidDnDOperationException This exception is thrown by various methods in the java.awt.dnd package.

Uses of Serializable in java.awt.event

Classes in java.awt.event that implement Serializable
class | ActionEvent A semantic event which indicates that a component-defined action occured.
class | AdjustmentEvent The adjustment event emitted by Adjustable objects.
class | ComponentEvent A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
class | ContainerEvent A low-level event which indicates that a container's contents changed because a component was added or removed.
class | FocusEvent A low-level event which indicates that a component has gained or lost the keyboard focus.
class | HierarchyEvent An event which indicates a change to the Component hierarchy to which a Component belongs.
class | InputEvent The root event class for all component-level input events.
class | InputMethodEvent Input method events contain information about text that is being composed using an input method.
class | InvocationEvent An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
class | ItemEvent A semantic event which indicates that an item was selected or deselected.
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.
class | PaintEvent The component-level paint event.
class | TextEvent A semantic event which indicates that an object's text changed.
class | WindowEvent A low-level event which indicates that a window has changed its status.

Uses of Serializable in java.awt.font

Classes in java.awt.font that implement Serializable
class | TextAttribute The TextAttribute class defines attribute keys and attribute values used for text rendering.
class | TransformAttribute The TransformAttribute class provides an immutable wrapper for a transform so that it is safe to use as an attribute.

Uses of Serializable in java.awt.geom

Classes in java.awt.geom that implement Serializable
class | AffineTransform The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
class | IllegalPathStateException The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
class | NoninvertibleTransformException The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.

Uses of Serializable in java.awt.image

Classes in java.awt.image that implement Serializable
class | ImagingOpException The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
class | RasterFormatException The RasterFormatException is thrown if there is invalid layout information in the Raster.

Uses of Serializable in java.awt.image.renderable

Classes in java.awt.image.renderable that implement Serializable
 class ParameterBlock
A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.

Uses of Serializable in java.awt.print

Classes in java.awt.print that implement Serializable
class | PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
class | PrinterException The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
class | PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

Uses of Serializable in java.beans

Classes in java.beans that implement Serializable
class | IntrospectionException Thrown when an exception happens during Introspection.
class | PropertyChangeEvent A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
class | PropertyChangeSupport This is a utility class that can be used by beans that support bound properties.
class | PropertyVetoException A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
class | VetoableChangeSupport This is a utility class that can be used by beans that support constrained properties.

Uses of Serializable in java.beans.beancontext

Classes in java.beans.beancontext that implement Serializable
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextEvent BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
class | BeanContextMembershipEvent A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
class | BeanContextServiceAvailableEvent This event type is used by the BeanContextServicesListener in order to identify the service being registered.
class | BeanContextServiceRevokedEvent This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
protected class | BeanContextServicesSupport.BCSSChild
protected static class | BeanContextServicesSupport.BCSSServiceProvider subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
protected class | BeanContextSupport.BCSChild

Methods in java.beans.beancontext that return Serializable
protected static Serializable BeanContextSupport.getChildSerializable(Object child)
Gets the Serializable (if any) associated with the specified Child

Uses of Serializable in java.io

Subinterfaces of Serializable in java.io
 interface Externalizable
Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.

Classes in java.io that implement Serializable
class | CharConversionException Base class for character conversion exceptions.
class | EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
class | File An abstract representation of file and directory pathnames.
class | FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
class | FilePermission This class represents access to a file or directory.
class | InterruptedIOException Signals that an I/O operation has been interrupted.
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | IOException Signals that an I/O exception of some sort has occurred.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | ObjectStreamClass Serialization's descriptor for classes.
class | ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | SerializablePermission This class is for Serializable permissions.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | SyncFailedException Signals that a sync operation has failed.
class | UnsupportedEncodingException The Character Encoding is not supported.
class | UTFDataFormatException Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Uses of Serializable in java.lang

Classes in java.lang that implement Serializable
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | ArithmeticException Thrown when an exceptional arithmetic condition has occurred.
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | ArrayStoreException Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
class | Boolean The Boolean class wraps a value of the primitive type boolean in an object.
class | Byte The Byte class is the standard wrapper for byte values.
class | Character The Character class wraps a value of the primitive type char in an object.
class | Class Instances of the class Class represent classes and interfaces in a running Java application.
class | ClassCastException Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
class | ClassCircularityError Thrown when a circularity has been detected while initializing a class.
class | ClassFormatError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
class | ClassNotFoundException Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
class | CloneNotSupportedException Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
class | Double The Double class wraps a value of the primitive type double in an object.
class | Error An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
class | Exception The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
class | ExceptionInInitializerError Signals that an unexpected exception has occurred in a static initializer.
class | Float The Float class wraps a value of primitive type float in an object.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | IllegalAccessException Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
class | IllegalArgumentException Thrown to indicate that a method has been passed an illegal or inappropriate argument.
class | IllegalMonitorStateException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
class | IllegalStateException Signals that a method has been invoked at an illegal or inappropriate time.
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | IncompatibleClassChangeError Thrown when an incompatible class change has occurred to some class definition.
class | IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | InstantiationException Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
class | Integer The Integer class wraps a value of the primitive type int in an object.
class | InternalError Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
class | InterruptedException Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
class | LinkageError Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
class | Long The Long class wraps a value of the primitive type long in an object.
class | NegativeArraySizeException Thrown if an application tries to create an array with negative size.
class | NoClassDefFoundError Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchFieldException Signals that the class doesn't have a field of a specified name.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
class | NoSuchMethodException Thrown when a particular method cannot be found.
class | NullPointerException Thrown when an application attempts to use null in a case where an object is required.
class | Number The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
class | OutOfMemoryError Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
class | RuntimeException RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
class | RuntimePermission This class is for runtime permissions.
class | SecurityException Thrown by the security manager to indicate a security violation.
class | Short The Short class is the standard wrapper for short values.
class | StackOverflowError Thrown when a stack overflow occurs because an application recurses too deeply.
class | String The String class represents character strings.
class | StringBuffer A string buffer implements a mutable sequence of characters.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
class | ThreadDeath An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
class | Throwable The Throwable class is the superclass of all errors and exceptions in the Java language.
class | UnknownError Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
class | UnsatisfiedLinkError Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
class | UnsupportedClassVersionError Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
class | UnsupportedOperationException Thrown to indicate that the requested operation is not supported.
class | VerifyError Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
class | VirtualMachineError Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Uses of Serializable in java.lang.reflect

Classes in java.lang.reflect that implement Serializable
class | InvocationTargetException InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
class | Proxy Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
class | ReflectPermission The Permission class for reflective operations.
class | UndeclaredThrowableException Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Uses of Serializable in java.math

Classes in java.math that implement Serializable
class | BigDecimal Immutable, arbitrary-precision signed decimal numbers.
class | BigInteger Immutable arbitrary-precision integers.

Uses of Serializable in java.net

Classes in java.net that implement Serializable
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | InetAddress This class represents an Internet Protocol (IP) address.
class | MalformedURLException Thrown to indicate that a malformed URL has occurred.
class | NetPermission This class is for various network permissions.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | ProtocolException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketPermission This class represents access to a network via sockets.
class | UnknownHostException Thrown to indicate that the IP address of a host could not be determined.
class | UnknownServiceException Thrown to indicate that an unknown service exception has occurred.
class | URL Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Uses of Serializable in java.rmi

Classes in java.rmi that implement Serializable
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | AlreadyBoundException An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | MarshalledObject A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | NotBoundException A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
class | RemoteException A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
class | RMISecurityException Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Uses of Serializable in java.rmi.activation

Classes in java.rmi.activation that implement Serializable
class | Activatable The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
class | ActivateFailedException This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
class | ActivationDesc An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
class | ActivationException General exception used by the activation interfaces.
class | ActivationGroup An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
class | ActivationGroupDesc An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
static class | ActivationGroupDesc.CommandEnvironment Startup options for ActivationGroup implementations.
class | ActivationGroupID The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
class | ActivationID Activation makes use of special identifiers to denote remote objects that can be activated over time.
class | UnknownGroupException An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
class | UnknownObjectException An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Uses of Serializable in java.rmi.dgc

Classes in java.rmi.dgc that implement Serializable
class | Lease A lease contains a unique VM identifier and a lease duration.
class | VMID A VMID is a identifier that is unique across all Java virtual machines.

Uses of Serializable in java.rmi.server

Subinterfaces of Serializable in java.rmi.server
interface | RemoteRef RemoteRef represents the handle for a remote object.
interface | ServerRef A ServerRef represents the server-side handle for a remote object implementation.

Classes in java.rmi.server that implement Serializable
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | ObjID An ObjID is used to identify remote objects uniquely in a VM over time.
class | RemoteObject The RemoteObject class implements the java.lang.Object behavior for remote objects.
class | RemoteServer The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
class | RemoteStub The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
class | ServerCloneException A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
class | ServerNotActiveException An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.
class | UID Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.
class | UnicastRemoteObject The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Uses of Serializable in java.security

Subinterfaces of Serializable in java.security
interface | Key The Key interface is the top-level interface for all keys.
interface | PrivateKey A private key.
interface | PublicKey A public key.

Classes in java.security that implement Serializable
class | AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
class | AllPermission The AllPermission is a permission that implies all other permissions.
class | BasicPermission The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
class | CodeSource This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
class | DigestException This is the generic Message Digest exception.
class | GeneralSecurityException This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
class | GuardedObject A GuardedObject is an object that is used to protect access to another object.
class | Identity Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | IdentityScope Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | InvalidParameterException This exception is thrown when an invalid parameter is passed to a method.
class | KeyException This is the basic key exception.
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.
class | KeyPair This class is a simple holder for a key pair (a public key and a private key).
class | KeyStoreException This is the generic KeyStore exception.
class | NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
class | NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
class | Permission Abstract class for representing access to a system resource.
class | PermissionCollection Abstract class representing a collection of Permission objects.
class | Permissions This class represents a heterogeneous collection of Permissions.
class | PrivilegedActionException This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
class | Provider This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
class | ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
class | SecureRandom This class provides a cryptographically strong pseudo-random number generator (PRNG).
class | SecureRandomSpi This class defines the Service Provider Interface (SPI) for the SecureRandom class.
class | SecurityPermission This class is for security permissions.
class | SignatureException This is the generic Signature exception.
class | SignedObject SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
class | Signer Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.
class | UnresolvedPermission The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.

Constructors in java.security with parameters of type Serializable
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Uses of Serializable in java.security.acl

Classes in java.security.acl that implement Serializable
class | AclNotFoundException This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
class | LastOwnerException This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
class | NotOwnerException This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Uses of Serializable in java.security.cert

Classes in java.security.cert that implement Serializable
class | Certificate Abstract class for managing a variety of identity certificates.
protected static class | Certificate.CertificateRep Alternate Certificate class for serialization.
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateException This exception indicates one of a variety of certificate problems.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.
class | CRLException CRL (Certificate Revocation List) Exception
class | X509Certificate Abstract class for X.509 certificates.

Uses of Serializable in java.security.interfaces

Subinterfaces of Serializable in java.security.interfaces
interface | DSAPrivateKey The standard interface to a DSA private key.
interface | DSAPublicKey The interface to a DSA public key.
interface | RSAPrivateCrtKey The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
interface | RSAPrivateKey The interface to an RSA private key.
interface | RSAPublicKey The interface to an RSA public key.

Uses of Serializable in java.security.spec

Classes in java.security.spec that implement Serializable
class | InvalidKeySpecException This is the exception for invalid key specifications.
class | InvalidParameterSpecException This is the exception for invalid parameter specifications.

Uses of Serializable in java.sql

Classes in java.sql that implement Serializable
class | BatchUpdateException An exception thrown when an error occurs during a batch update operation.
class | DataTruncation An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
class | SQLException An exception that provides information on a database access error or other errors.
class | SQLPermission The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.
class | SQLWarning An exception that provides information on database access warnings.
class | Time A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
class | Timestamp A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.

Uses of Serializable in java.text

Classes in java.text that implement Serializable
static class | AttributedCharacterIterator.Attribute Defines attribute keys that are used to identify text attributes.
class | ChoiceFormat A ChoiceFormat allows you to attach a format to a range of numbers.
class | DateFormat DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
class | DateFormatSymbols DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
class | DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
class | DecimalFormatSymbols This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
class | Format Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
class | MessageFormat MessageFormat provides a means to produce concatenated messages in language-neutral way.
class | NumberFormat NumberFormat is the abstract base class for all number formats.
class | ParseException Signals that an error has been reached unexpectedly while parsing.
class | SimpleDateFormat SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.

Uses of Serializable in java.util

Classes in java.util that implement Serializable
class | ArrayList Resizable-array implementation of the List interface.
class | BitSet This class implements a vector of bits that grows as needed.
class | Calendar Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
class | ConcurrentModificationException This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
class | Date The class Date represents a specific instant in time, with millisecond precision.
class | EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.
class | EventObject The root class from which all event state objects shall be derived.
class | GregorianCalendar GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.
class | HashMap Hash table based implementation of the Map interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | Hashtable This class implements a hashtable, which maps keys to values.
class | LinkedList Linked list implementation of the List interface.
class | Locale A Locale object represents a specific geographical, political, or cultural region.
class | MissingResourceException Signals that a resource is missing.
class | NoSuchElementException Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
class | Properties The Properties class represents a persistent set of properties.
class | PropertyPermission This class is for property permissions.
class | Random An instance of this class is used to generate a stream of pseudorandom numbers.
class | SimpleTimeZone SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | TimeZone TimeZone represents a time zone offset, and also figures out daylight savings.
class | TooManyListenersException The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
class | TreeMap Red-Black tree based implementation of the SortedMap interface.
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.
class | Vector The Vector class implements a growable array of objects.

Uses of Serializable in java.util.jar

Classes in java.util.jar that implement Serializable
 class JarException
Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Uses of Serializable in java.util.zip

Classes in java.util.zip that implement Serializable
class | DataFormatException Signals that a data format error has occurred.
class | ZipException Signals that a Zip exception of some sort has occurred.

Uses of Serializable in javax.naming

Subinterfaces of Serializable in javax.naming
 interface Name
The Name interface represents a generic name -- an ordered sequence of components.

Classes in javax.naming that implement Serializable
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | BinaryRefAddr This class represents the binary form of the address of a communications end-point.
class | Binding This class represents a name-to-object binding found in a context.
class | CannotProceedException This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
class | CommunicationException This exception is thrown when the client is unable to communicate with the directory or naming service.
class | CompositeName This class represents a composite name -- a sequence of component names spanning multiple namespaces.
class | CompoundName This class represents a compound name -- a name from a hierarchical name space.
class | ConfigurationException This exception is thrown when there is a configuration problem.
class | ContextNotEmptyException This exception is thrown when attempting to destroy a context that is not empty.
class | InsufficientResourcesException This exception is thrown when resources are not available to complete the requested operation.
class | InterruptedNamingException This exception is thrown when the naming operation being invoked has been interrupted.
class | InvalidNameException This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
class | LimitExceededException This exception is thrown when a method terminates abnormally due to a user or system specified limit.
class | LinkException This exception is used to describe problems encounter while resolving links.
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | LinkRef This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.
class | NameAlreadyBoundException This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
class | NameClassPair This class represents the object name and class name pair of a binding found in a context.
class | NameNotFoundException This exception is thrown when a component of the name cannot be resolved because it is not bound.
class | NamingException This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
class | NamingSecurityException This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
class | NoInitialContextException This exception is thrown when no initial context implementation can be created.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.
class | NotContextException This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
class | OperationNotSupportedException This exception is thrown when a context implementation does not support the operation being invoked.
class | PartialResultException This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
class | RefAddr This class represents the address of a communications end-point.
class | Reference This class represents a reference to an object that is found outside of the naming/directory system.
class | ReferralException This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
class | ServiceUnavailableException This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | StringRefAddr This class represents the string form of the address of a communications end-point.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Uses of Serializable in javax.naming.directory

Subinterfaces of Serializable in javax.naming.directory
interface | Attribute This interface represents an attribute associated with a named object.
interface | Attributes This interface represents a collection of attributes.

Classes in javax.naming.directory that implement Serializable
class | AttributeInUseException This exception is thrown when an operation attempts to add an attribute that already exists.
class | AttributeModificationException This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
class | BasicAttribute This class provides a basic implementation of the Attribute interface.
class | BasicAttributes This class provides a basic implementation of the Attributes interface.
class | InvalidAttributeIdentifierException This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
class | InvalidAttributesException This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
class | InvalidAttributeValueException This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
class | InvalidSearchControlsException This exception is thrown when the specification of the SearchControls for a search operation is invalid.
class | InvalidSearchFilterException This exception is thrown when the specification of a search filter is invalid.
class | ModificationItem This class represents a modification item.
class | NoSuchAttributeException This exception is thrown when attempting to access an attribute that does not exist.
class | SchemaViolationException This exception is thrown when a method in some ways violates the schema.
class | SearchControls This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
class | SearchResult This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

Uses of Serializable in javax.naming.event

Classes in javax.naming.event that implement Serializable
class | NamingEvent This class represents an event fired by a naming/directory service.
class | NamingExceptionEvent This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.

Uses of Serializable in javax.naming.ldap

Subinterfaces of Serializable in javax.naming.ldap
interface | Control This interface represents an LDAPv3 control as defined in RFC 2251.
interface | ExtendedRequest This interface represents an LDAPv3 extended operation request as defined in RFC 2251.
interface | ExtendedResponse This interface represents an LDAP extended operation response as defined in RFC 2251.
interface | UnsolicitedNotification This interface represents an unsolicited notification as defined in RFC 2251.

Classes in javax.naming.ldap that implement Serializable
class | LdapReferralException This abstract class is used to represent an LDAP referral exception.
class | UnsolicitedNotificationEvent This class represents an event fired in response to an unsolicited notification sent by the LDAP server.

Uses of Serializable in javax.naming.spi

Classes in javax.naming.spi that implement Serializable
 class ResolveResult
This class represents the result of resolution of a name.

Uses of Serializable in javax.rmi.CORBA

Classes in javax.rmi.CORBA that implement Serializable
class | ClassDesc This class is used to marshal java.lang.Class objects over IIOP.
class | Stub Base class from which all RMI-IIOP stubs must inherit.

Methods in javax.rmi.CORBA that return Serializable
Serializable | ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender) Reads a value from the stream using Java semantics.
Serializable | ValueHandler.writeReplace(Serializable value) If the value contains a writeReplace method then the result is returned.

Methods in javax.rmi.CORBA with parameters of type Serializable
void | ValueHandler.writeValue(OutputStream out, Serializable value) Writes a value to the stream using Java semantics.
Serializable | ValueHandler.writeReplace(Serializable value) If the value contains a writeReplace method then the result is returned.

Uses of Serializable in javax.sound.midi

Classes in javax.sound.midi that implement Serializable
class | InvalidMidiDataException An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
class | MidiUnavailableException A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.

Uses of Serializable in javax.sound.sampled

Classes in javax.sound.sampled that implement Serializable
class | AudioPermission The AudioPermission class represents access rights to the audio system resources.
class | LineEvent The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.
class | LineUnavailableException A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
class | UnsupportedAudioFileException An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Uses of Serializable in javax.swing

Classes in javax.swing that implement Serializable
class | AbstractAction This class provides default implementations for the JFC Action interface.
class | AbstractButton Defines common behaviors for buttons and menu items.
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | AbstractButton.ButtonChangeListener Extends ChangeListener to be serializable.
class | AbstractCellEditor
class | AbstractListModel The Abstract definition for the data model the provides a List with its contents.
class | ActionMap ActionMap provides mappings from Objects (called keys or Action names) to Actions.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
protected class | Box.Filler.AccessibleBoxFiller This class implements accessibility support for the Box.Filler class.
class | BoxLayout A layout manager that allows multiple components to be layed out either vertically or horizontally.
class | ButtonGroup This class is used to create a multiple-exclusion scope for a set of buttons.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
class | ComponentInputMap A ComponentInputMap is an InputMap associated with a particular JComponent.
class | DefaultBoundedRangeModel A generic implementation of BoundedRangeModel.
class | DefaultButtonModel The default implementation of a Button component's data model.
class | DefaultCellEditor The default editor for table and tree cells.
protected class | DefaultCellEditor.EditorDelegate
class | DefaultComboBoxModel The default model for combo boxes.
class | DefaultDesktopManager This is an implementaion of the DesktopManager.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | DefaultListModel This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.
class | DefaultListSelectionModel Default data model for list selections.
class | DefaultSingleSelectionModel A generic implementation of SingleSelectionModel.
class | ImageIcon An implementation of the Icon interface that paints Icons from Images.
protected class | ImageIcon.AccessibleImageIcon This class implements accessibility support for the ImageIcon class.
class | InputMap InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
class | JButton An implementation of a "push" button.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
class | JComboBox A component that combines a button or text field and a drop-down list.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent The base class for all Swing components except top-level containers.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
class | JDialog The main class for creating a dialog window.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
class | JEditorPane A text component to edit various kinds of content.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
class | JLabel A display area for a short text string or an image, or both.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
class | JList A component that allows the user to select one or more objects from a list.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenu.WinListener A listener class that watches for a popup window closing.
class | JMenuBar An implementation of a menu bar.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
class | JMenuItem An implementation of an item in a menu.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
class | JPanel JPanel is a generic lightweight container.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JRootPane.RootLayout A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
class | JScrollBar An implementation of a scrollbar.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTabbedPane.ModelListener We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
class | JTextArea A TextArea is a multi-line area that displays plain text.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
static class | JToggleButton.ToggleButtonModel The ToggleButton model
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
class | JTree A control that displays a set of hierarchical data as an outline.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
static class | JTree.DynamicUtilTreeNode DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
protected static class | JTree.EmptySelectionModel EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
protected class | JTree.TreeSelectionRedirector Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JViewport.ViewListener A listener for the view.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.
class | KeyStroke A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
class | OverlayLayout A layout manager to arrange components over the top of each other.
class | ScrollPaneLayout The layout manager used by JScrollPane.
static class | ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.
class | SizeRequirements For the convenience of layout managers, calculates information about the size and position of components.
class | Timer Causes an action to occur at a predefined rate.
class | UIDefaults A table of defaults for Swing components.
class | UIManager This class keeps track of the current look and feel and its defaults.
class | UnsupportedLookAndFeelException An exception that indicates the request look & feel management classes are not present on the user's system.
class | ViewportLayout The default layout manager for JViewport.

Uses of Serializable in javax.swing.border

Classes in javax.swing.border that implement Serializable
class | AbstractBorder A class that implements an empty border with no size.
class | BevelBorder A class which implements a simple 2 line bevel border.
class | CompoundBorder A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
class | EmptyBorder A class which provides an empty, transparent border which takes up space but does no drawing.
class | EtchedBorder A class which implements a simple etched border which can either be etched-in or etched-out.
class | LineBorder A class which implements a line border of arbitrary thickness and of a single color.
class | MatteBorder A class which provides a matte-like border of either a solid color or a tiled icon.
class | SoftBevelBorder A class which implements a raised or lowered bevel with softened corners.
class | TitledBorder A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Uses of Serializable in javax.swing.colorchooser

Classes in javax.swing.colorchooser that implement Serializable
class | AbstractColorChooserPanel This is the abstract superclass for color choosers.
class | DefaultColorSelectionModel A generic implementation of ColorSelectionModel.

Uses of Serializable in javax.swing.event

Classes in javax.swing.event that implement Serializable
class | AncestorEvent An event reported to a child component that originated from an ancestor in the component hierarchy.
class | CaretEvent CaretEvent is used to notify interested parties that the text caret has changed in the event source.
class | ChangeEvent ChangeEvent is used to notify interested parties that state has changed in the event source.
class | EventListenerList A class that holds a list of EventListeners.
class | HyperlinkEvent HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
class | InternalFrameEvent InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
class | ListDataEvent Defines an event that encapsulates changes to a list.
class | ListSelectionEvent An event that characterizes a change in the current selection.
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuEvent MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
class | PopupMenuEvent PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
class | SwingPropertyChangeSupport This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
class | TableColumnModelEvent TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
class | TableModelEvent TableModelEvent is used to notify listeners that a table model has changed.
class | TreeExpansionEvent An event used to identify a single path in a tree.
class | TreeModelEvent Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
class | TreeSelectionEvent An event that characterizes a change in the current selection.
class | UndoableEditEvent An event indicating that an operation which can be undone has occurred.

Uses of Serializable in javax.swing.plaf

Classes in javax.swing.plaf that implement Serializable
class | ActionMapUIResource A subclass of javax.swing.ActionMap that implements UIResource.
class | BorderUIResource
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource
class | ColorUIResource
class | ComponentInputMapUIResource A subclass of javax.swing.ComponentInputMap that implements UIResource.
class | DimensionUIResource
class | FontUIResource A subclass of java.awt.Font that implements UIResource.
class | IconUIResource
class | InputMapUIResource A subclass of javax.swing.InputMap that implements UIResource.
class | InsetsUIResource

Uses of Serializable in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Serializable
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.ToggleButtonBorder
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
class | BasicDirectoryModel Basic implementation of a file list.
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicIconFactory Factory object that can vend Icons appropriate for the basic L & F.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicLookAndFeel Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
static class | BasicTextUI.BasicCaret
protected class | BasicToolBarUI.DragWindow
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.
class | DefaultMenuLayout The default layout manager for Popup menus and menubars.

Uses of Serializable in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Serializable
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TableHeaderBorder Border for a Table Header
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder
class | MetalCheckBoxIcon CheckboxIcon implementation for OrganicCheckBoxUI
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxIcon This utility class draws the horizontal bars which indicate a MetalComboBox
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.DirectoryComboBoxAction Acts when DirectoryComboBox has changed the selected item.
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FileRenderer
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalIconFactory Factory object that can vend Icons appropriate for Metal.
static class | MetalIconFactory.FileIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.FolderIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.PaletteCloseIcon Defines an icon for Palette close
static class | MetalIconFactory.TreeControlIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeFolderIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeLeafIcon
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalLookAndFeel Implements The Metal Look and Feel.
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Uses of Serializable in javax.swing.table

Classes in javax.swing.table that implement Serializable
class | AbstractTableModel This abstract class provides default implementations for most of the methods in the TableModel interface.
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | DefaultTableColumnModel The standard column-handler for a JTable.
class | DefaultTableModel This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.
class | JTableHeader This is the object which manages the header of the JTable.
protected class | JTableHeader.AccessibleJTableHeader This class implements accessibility support for the JTableHeader class.
class | TableColumn A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.

Uses of Serializable in javax.swing.text

Classes in javax.swing.text that implement Serializable
class | AbstractDocument An implementation of the document interface to serve as a basis for implementing various kinds of documents.
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.DefaultDocumentEvent Stores document changes as the document is being modified.
static class | AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
class | BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
class | ChangedCharSetException ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.
class | DefaultCaret A default implementation of Caret.
class | DefaultEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
class | DefaultStyledDocument A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
static class | DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.
class | DefaultStyledDocument.ElementBuffer Class to manage changes to the element hierarchy.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...
class | EditorKit Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
class | GapContent An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
(package private) class | javax.swing.text.GapVector An implementation of a gapped buffer similar to that used by emacs.
class | JTextComponent JTextComponent is the base class for swing text components.
class | JTextComponent.AccessibleJTextComponent This class implements accessibility support for the JTextComponent class.
class | PlainDocument A plain document that maintains no character attributes.
class | SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
class | StringContent An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
class | StyleContext A pool of styles and their associated resources.
class | StyleContext.NamedStyle A collection of attributes, typically used to represent character and paragraph styles.
class | StyledEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TabSet A TabSet is comprised of many TabStops.
class | TabStop This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Uses of Serializable in javax.swing.text.html

Classes in javax.swing.text.html that implement Serializable
class | CSS Defines a set of CSS attributes as a typesafe enumeration.
static class | HTML.UnknownTag
class | HTMLDocument A document that models HTML.
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.
class | HTMLEditorKit The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.
class | HTMLFrameHyperlinkEvent HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.
class | StyleSheet Support for defining the visual characteristics of HTML views being rendered.
static class | StyleSheet.BoxPainter Class to carry out some of the duties of CSS formatting.
static class | StyleSheet.ListPainter Class to carry out some of the duties of CSS list formatting.

Uses of Serializable in javax.swing.text.html.parser

Classes in javax.swing.text.html.parser that implement Serializable
class | AttributeList This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
class | ContentModel A representation of a content model.
class | Element An element as described in a DTD using the ELEMENT construct.
class | ParserDelegator Responsible for starting up a new DocumentParser each time its parse method is invoked.

Uses of Serializable in javax.swing.text.rtf

Classes in javax.swing.text.rtf that implement Serializable
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Uses of Serializable in javax.swing.tree

Classes in javax.swing.tree that implement Serializable
class | DefaultMutableTreeNode A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.
class | DefaultTreeModel A simple tree data model that uses TreeNodes.
class | DefaultTreeSelectionModel Default implementation of TreeSelectionModel.
class | ExpandVetoException Exception used to stop and expand/collapse from happening.
class | TreePath Represents a path to a node.

Uses of Serializable in javax.swing.undo

Classes in javax.swing.undo that implement Serializable
class | AbstractUndoableEdit An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
class | CannotRedoException Thrown when an UndoableEdit is told to redo() and can't.
class | CannotUndoException Thrown when an UndoableEdit is told to undo() and can't.
class | CompoundEdit A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
class | StateEdit StateEdit is a general edit for objects that change state.
class | UndoManager Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Uses of Serializable in javax.transaction

Classes in javax.transaction that implement Serializable
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Uses of Serializable in org.omg.CORBA

Subinterfaces of Serializable in org.omg.CORBA
interface | Current org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
interface | DataInputStream Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
interface | DataOutputStream Defines the methods used to write primitive data types to output streams for marshalling custom value types.
interface | DomainManager The DomainManager has associated with it the policy objects for a particular domain.
interface | IDLType An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
interface | IRObject An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
interface | Policy org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
interface | Repository This is the interface which defines the interface repository.

Classes in org.omg.CORBA that implement Serializable
class | _IDLTypeStub org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
class | _PolicyStub org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
class | Any Serves as a container for any data that can be described in IDL or for any IDL primitive type.
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | CompletionStatus An object that indicates whether a method had completed running when a SystemException was thrown.
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | DefinitionKind The class that provides the constants used to identify the type of an Interface Repository object.
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | Initializer This is the mapping for an IDL structure which specifies an initializer for a value type.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NameValuePair The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | ServiceDetail An object that represents an ORB service.
class | ServiceInformation ServiceInformation is an IDL struct in the CORBA module.
class | SetOverrideType The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
class | StructMember A description of a member of an IDL struct.
class | SystemException The root class for all CORBA standard exceptions.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | TypeCode A container for information about a specific CORBA data type.
class | UnionMember A description in the Interface Repository of a member of an IDL union.
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
class | UnknownUserException A class that contains user exceptions returned by the server.
class | UserException The root class for CORBA IDL-defined user exceptions.
class | ValueMember A description in the Interface Repository of a member of a value object.
class | WrongTransaction The CORBA WrongTransaction user-defined exception.

Fields in org.omg.CORBA declared as Serializable
 Serializable ValueBaseHolder.value
The java.io.Serializable value held by this ValueBaseHolder object.

Methods in org.omg.CORBA that return Serializable
Serializable | DynAny.get_val() Retrieves the java.io.Serializable object contained in this DynAny object.
Serializable | Any.extract_Value() Extracts the java.io.Serializable object in this Any object's value field.
Serializable | StringValueHelper.read_value(InputStream istream)
Serializable | DataInputStream.read_Value() Reads an IDL value type from the input stream.
Serializable | WStringValueHelper.read_value(InputStream istream)
static Serializable | ValueBaseHelper.extract(Any a)
static Serializable | ValueBaseHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type Serializable
void | DynAny.insert_val(Serializable value) Inserts the given java.io.Serializable object as the value for this DynAny object.
void | Any.insert_Value(Serializable v) Inserts the given java.io.Serializable object into this Any object's value field.
void | Any.insert_Value(Serializable v, TypeCode t) Inserts the given java.io.Serializable object into this Any object's value field.
void | StringValueHelper.write_value(OutputStream ostream, Serializable value)
void | DataOutputStream.write_Value(Serializable value) Writes the IDL value type value to the output stream.
void | WStringValueHelper.write_value(OutputStream ostream, Serializable value)
static void | ValueBaseHelper.insert(Any a, Serializable that)
static void | ValueBaseHelper.write(OutputStream ostream, Serializable value)

Constructors in org.omg.CORBA with parameters of type Serializable
ValueBaseHolder(Serializable initial)
Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.

Uses of Serializable in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable that return Serializable
Serializable | InputStream.read_value() unmarshalls a value type from the input stream.
Serializable | InputStream.read_value(Class clz) unmarshalls a value type from the input stream.
Serializable | InputStream.read_value(BoxedValueHelper factory) unmarshalls a value type from the input stream.
Serializable | InputStream.read_value(String rep_id) unmarshalls a value type from the input stream.
Serializable | InputStream.read_value(Serializable value) unmarshalls a value type from the input stream.

Methods in org.omg.CORBA_2_3.portable with parameters of type Serializable
void | OutputStream.write_value(Serializable value) marshals a value type to the output stream.
void | OutputStream.write_value(Serializable value, Class clz) marshals a value type to the output stream.
void | OutputStream.write_value(Serializable value, String repository_id) marshals a value type to the output stream.
void | OutputStream.write_value(Serializable value, BoxedValueHelper factory) marshals a value type to the output stream.
Serializable | InputStream.read_value(Serializable value) unmarshalls a value type from the input stream.

Uses of Serializable in org.omg.CORBA.DynAnyPackage

Classes in org.omg.CORBA.DynAnyPackage that implement Serializable
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of Serializable in org.omg.CORBA.ORBPackage

Classes in org.omg.CORBA.ORBPackage that implement Serializable
class | InconsistentTypeCode InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
class | InvalidName The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Uses of Serializable in org.omg.CORBA.portable

Subinterfaces of Serializable in org.omg.CORBA.portable
interface | CustomValue
interface | IDLEntity An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
interface | StreamableValue Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
interface | ValueBase The generated Java classes corresponding to valuetype IDL types implement this interface.

Classes in org.omg.CORBA.portable that implement Serializable
class | ApplicationException This class is used for reporting application level exceptions between ORBs and stubs.
class | IndirectionException The Indirection exception is a Java specific system exception.
class | RemarshalException This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Methods in org.omg.CORBA.portable that return Serializable
Serializable | ValueFactory.read_value(InputStream is) Is called by the ORB runtime while in the process of unmarshaling a value type.
Serializable | BoxedValueHelper.read_value(InputStream is)

Methods in org.omg.CORBA.portable with parameters of type Serializable
 void BoxedValueHelper.write_value(OutputStream os, Serializable value)

Uses of Serializable in org.omg.CORBA.TypeCodePackage

Classes in org.omg.CORBA.TypeCodePackage that implement Serializable
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of Serializable in org.omg.CosNaming

Subinterfaces of Serializable in org.omg.CosNaming
interface | BindingIterator The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
interface | NamingContext A naming context is an object that contains a set of name bindings in which each name is unique.

Classes in org.omg.CosNaming that implement Serializable
class | _BindingIteratorImplBase
class | _BindingIteratorStub
class | _NamingContextImplBase
class | _NamingContextStub
class | BindingType
class | NameComponent

Uses of Serializable in org.omg.CosNaming.NamingContextPackage

Classes in org.omg.CosNaming.NamingContextPackage that implement Serializable
class | AlreadyBound
class | CannotProceed
class | NotEmpty
class | NotFound
class | NotFoundReason

Uses of Serializable in org.omg.SendingContext

Subinterfaces of Serializable in org.omg.SendingContext
 interface RunTime
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Uses of Serializable in org.omg.stub.java.rmi

Classes in org.omg.stub.java.rmi that implement Serializable
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DataInput

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Interface DataInput

All Known Subinterfaces:
ObjectInput
All Known Implementing Classes:
RandomAccessFile, DataInputStream
public interface DataInput

The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types. There is also a facility for reconstructing a String from data in Java modified UTF-8 format.

It is generally true of all the reading routines in this interface that if end of file is reached before the desired number of bytes has been read, an EOFException (which is a kind of IOException) is thrown. If any byte cannot be read for any reason other than end of file, an IOException other than EOFException is thrown. In particular, an IOException may be thrown if the input stream has been closed.

Since:
JDK1.0
See Also:
DataInputStream, DataOutput

Method Summary
boolean | readBoolean() Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
byte | readByte() Reads and returns one input byte.
char | readChar() Reads an input char and returns the char value.
double | readDouble() Reads eight input bytes and returns a double value.
float | readFloat() Reads four input bytes and returns a float value.
void | readFully(byte[] b) Reads some bytes from an input stream and stores them into the buffer array b.
void | readFully(byte[] b, int off, int len) Reads len bytes from an input stream.
int | readInt() Reads four input bytes and returns an int value.
String | readLine() Reads the next line of text from the input stream.
long | readLong() Reads eight input bytes and returns a long value.
short | readShort() Reads two input bytes and returns a short value.
int | readUnsignedByte() Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
int | readUnsignedShort() Reads two input bytes and returns an int value in the range 0 through 65535.
String | readUTF() Reads in a string that has been encoded using a modified UTF-8 format.
int | skipBytes(int n) Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.

Method Detail

readFully

public void readFully(byte[] b)
               throws IOException
Reads some bytes from an input stream and stores them into the buffer array b. The number of bytes read is equal to the length of b.

This method blocks until one of the following conditions occurs:

  • b.length bytes of input data are available, in which case a normal return is made.
  • End of file is detected, in which case an EOFException is thrown.
  • An I/O error occurs, in which case an IOException other than EOFException is thrown.

If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[0], the next one into b[1], and so on. If an exception is thrown from this method, then it may be that some but not all bytes of b have been updated with data from the input stream.

Parameters:
b - the buffer into which the data is read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
Reads len bytes from an input stream.

This method blocks until one of the following conditions occurs:

  • len bytes of input data are available, in which case a normal return is made.
  • End of file is detected, in which case an EOFException is thrown.
  • An I/O error occurs, in which case an IOException other than EOFException is thrown.

If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len.

Parameters:
b - the buffer into which the data is read.
off - an int specifying the offset into the data.
len - an int specifying the number of bytes to read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

skipBytes

public int skipBytes(int n)
              throws IOException
Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes. However, it may skip over some smaller number of bytes, possibly zero. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. This method never throws an EOFException. The actual number of bytes skipped is returned.
Parameters:
n - the number of bytes to be skipped.
Returns:
the number of bytes skipped, which is always n.
Throws:
EOFException - if this stream reaches the end before skipping all the bytes.
IOException - if an I/O error occurs.

readBoolean

public boolean readBoolean()
                    throws IOException
Reads one input byte and returns true if that byte is nonzero, false if that byte is zero. This method is suitable for reading the byte written by the writeBoolean method of interface DataOutput.
Returns:
the boolean value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readByte

public byte readByte()
              throws IOException
Reads and returns one input byte. The byte is treated as a signed value in the range -128 through 127, inclusive. This method is suitable for reading the byte written by the writeByte method of interface DataOutput.
Returns:
the 8-bit value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255. This method is suitable for reading the byte written by the writeByte method of interface DataOutput if the argument to writeByte was intended to be a value in the range 0 through 255.
Returns:
the unsigned 8-bit value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readShort

public short readShort()
                throws IOException
Reads two input bytes and returns a short value. Let a be the first byte read and b be the second byte. The value returned is:

(short)((a << 8) * | (b & 0xff))
This method is suitable for reading the bytes written by the writeShort method of interface DataOutput.
Returns:
the 16-bit value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Reads two input bytes and returns an int value in the range 0 through 65535. Let a be the first byte read and b be the second byte. The value returned is:

(((a & 0xff) << 8) | (b & 0xff))
This method is suitable for reading the bytes written by the writeShort method of interface DataOutput if the argument to writeShort was intended to be a value in the range 0 through 65535.
Returns:
the unsigned 16-bit value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readChar

public char readChar()
              throws IOException
Reads an input char and returns the char value. A Unicode char is made up of two bytes. Let a be the first byte read and b be the second byte. The value returned is:

(char)((a << 8) | (b & 0xff))
This method is suitable for reading bytes written by the writeChar method of interface DataOutput.
Returns:
the Unicode char read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readInt

public int readInt()
            throws IOException
Reads four input bytes and returns an int value. Let a be the first byte read, b be the second byte, c be the third byte, and d be the fourth byte. The value returned is:

 (((a & 0xff) << 24) | ((b & 0xff) << 16) |
  ((c & 0xff) << 8) | (d & 0xff))
This method is suitable for reading bytes written by the writeInt method of interface DataOutput.
Returns:
the int value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readLong

public long readLong()
              throws IOException
Reads eight input bytes and returns a long value. Let a be the first byte read, b be the second byte, c be the third byte, d be the fourth byte, e be the fifth byte, f be the sixth byte, g be the seventh byte, and h be the eighth byte. The value returned is:

 (((long)(a & 0xff) << 56) |
  ((long)(b & 0xff) << 48) |
  ((long)(c & 0xff) << 40) |
  ((long)(d & 0xff) << 32) |
  ((long)(e & 0xff) << 24) |
  ((long)(f & 0xff) << 16) |
  ((long)(g & 0xff) <<  8) |
  ((long)(h & 0xff)))

This method is suitable for reading bytes written by the writeLong method of interface DataOutput.

Returns:
the long value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readFloat

public float readFloat()
                throws IOException
Reads four input bytes and returns a float value. It does this by first constructing an int value in exactly the manner of the readInt method, then converting this int value to a float in exactly the manner of the method Float.intBitsToFloat. This method is suitable for reading bytes written by the writeFloat method of interface DataOutput.
Returns:
the float value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readDouble

public double readDouble()
                  throws IOException
Reads eight input bytes and returns a double value. It does this by first constructing a long value in exactly the manner of the readlong method, then converting this long value to a double in exactly the manner of the method Double.longBitsToDouble. This method is suitable for reading bytes written by the writeDouble method of interface DataOutput.
Returns:
the double value read.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readLine

public String readLine()
                throws IOException
Reads the next line of text from the input stream. It reads successive bytes, converting each byte separately into a character, until it encounters a line terminator or end of file; the characters read are then returned as a String. Note that because this method processes bytes, it does not support input of the full Unicode character set.

If end of file is encountered before even one byte can be read, then null is returned. Otherwise, each byte that is read is converted to type char by zero-extension. If the character '\n' is encountered, it is discarded and reading ceases. If the character '\r' is encountered, it is discarded and, if the following byte converts to the character '\n', then that is discarded also; reading then ceases. If end of file is encountered before either of the characters '\n' and '\r' is encountered, reading ceases. Once reading has ceased, a String is returned that contains all the characters read and not discarded, taken in order. Note that every character in this string will have a value less than \u0100, that is, (char)256.

Returns:
if this stream reaches the end before reading all the bytes.
Throws:
IOException - if an I/O error occurs.

readUTF

public String readUTF()
               throws IOException
Reads in a string that has been encoded using a modified UTF-8 format. The general contract of readUTF is that it reads a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.

First, two bytes are read and used to construct an unsigned 16-bit integer in exactly the manner of the readUnsignedShort method . This integer value is called the UTF length and specifies the number of additional bytes to be read. These bytes are then converted to characters by considering them in groups. The length of each group is computed from the value of the first byte of the group. The byte following a group, if any, is the first byte of the next group.

If the first byte of a group matches the bit pattern 0xxxxxxx (where x means "may be 0 or 1"), then the group consists of just that byte. The byte is zero-extended to form a character.

If the first byte of a group matches the bit pattern 110xxxxx, then the group consists of that byte a and a second byte b. If there is no byte b (because byte a was the last of the bytes to be read), or if byte b does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:

(char)(((a& 0x1F) << 6) | (b & 0x3F))
If the first byte of a group matches the bit pattern 1110xxxx, then the group consists of that byte a and two more bytes b and c. If there is no byte c (because byte a was one of the last two of the bytes to be read), or either byte b or byte c does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:

 (char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F))
If the first byte of a group matches the pattern 1111xxxx or the pattern 10xxxxxx, then a UTFDataFormatException is thrown.

If end of file is encountered at any time during this entire process, then an EOFException is thrown.

After every group has been converted to a character by this process, the characters are gathered, in the same order in which their corresponding groups were read from the input stream, to form a String, which is returned.

The writeUTF method of interface DataOutput may be used to write data that is suitable for reading by this method.

Returns:
a Unicode string.
Throws:
EOFException - if this stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.
UTFDataFormatException - if the bytes do not represent a valid UTF-8 encoding of a string.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DataInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class DataInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.io.DataInputStream
All Implemented Interfaces:
DataInput
public class DataInputStream
extends FilterInputStream
implements DataInput

A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.

Data input streams and data output streams represent Unicode strings in a format that is a slight modification of UTF-8. (For more information, see X/Open Company Ltd., "File System Safe UCS Transformation Format (FSS_UTF)", X/Open Preliminary Specification, Document Number: P316. This information also appears in ISO/IEC 10646, Annex P.)

All characters in the range '\u0001' to '\u007F' are represented by a single byte:

0 bits 0-7

The null character '\u0000' and characters in the range '\u0080' to '\u07FF' are represented by a pair of bytes:

1 | 1 | 0 | bits 6-10
1 | 0 | bits 0-5

Characters in the range '\u0800' to '\uFFFF' are represented by three bytes:
1 | 1 | 1 | 0 | bits 12-15
1 | 0 | bits 6-11
1 | 0 | bits 0-5

The two differences between this format and the "standard" UTF-8 format are the following:

  • The null byte '\u0000' is encoded in 2-byte format rather than 1-byte, so that the encoded strings never have embedded nulls.
  • Only the 1-byte, 2-byte, and 3-byte formats are used.

Since:
JDK1.0
See Also:
DataOutputStream

Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
DataInputStream(InputStream in)
Creates a FilterInputStream and saves its argument, the input stream in, for later use.
Method Summary
 int read(byte[] b)
See the general contract of the read method of DataInput.
 int read(byte[] b, int off, int len)
See the general contract of the read method of DataInput.
 boolean readBoolean()
See the general contract of the readBoolean method of DataInput.
 byte readByte()
See the general contract of the readByte method of DataInput.
 char readChar()
See the general contract of the readChar method of DataInput.
 double readDouble()
See the general contract of the readDouble method of DataInput.
 float readFloat()
See the general contract of the readFloat method of DataInput.
 void readFully(byte[] b)
See the general contract of the readFully method of DataInput.
 void readFully(byte[] b, int off, int len)
See the general contract of the readFully method of DataInput.
 int readInt()
See the general contract of the readInt method of DataInput.
 String readLine()
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 long readLong()
See the general contract of the readLong method of DataInput.
 short readShort()
See the general contract of the readShort method of DataInput.
 int readUnsignedByte()
See the general contract of the readUnsignedByte method of DataInput.
 int readUnsignedShort()
See the general contract of the readUnsignedShort method of DataInput.
 String readUTF()
See the general contract of the readUTF method of DataInput.
static String readUTF(DataInput in)
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
 int skipBytes(int n)
See the general contract of the skipBytes method of DataInput.
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataInputStream

public DataInputStream(InputStream in)
Creates a FilterInputStream and saves its argument, the input stream in, for later use. An internal
Parameters:
in - the input stream.
Method Detail

read

public final int read(byte[] b)
               throws IOException
See the general contract of the read method of DataInput.

Bytes for this operation are read from the contained input stream.

Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in, InputStream.read(byte[], int, int)

read

public final int read(byte[] b,
                      int off,
                      int len)
               throws IOException
See the general contract of the read method of DataInput.

Bytes for this operation are read from the contained input stream.

Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in, InputStream.read(byte[], int, int)

readFully

public final void readFully(byte[] b)
                     throws IOException
See the general contract of the readFully method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFully in interface DataInput
Parameters:
b - the buffer into which the data is read.
Throws:
EOFException - if this input stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readFully

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws IOException
See the general contract of the readFully method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFully in interface DataInput
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the number of bytes to read.
Throws:
EOFException - if this input stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

skipBytes

public final int skipBytes(int n)
                    throws IOException
See the general contract of the skipBytes method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
skipBytes in interface DataInput
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

readBoolean

public final boolean readBoolean()
                          throws IOException
See the general contract of the readBoolean method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readBoolean in interface DataInput
Returns:
the boolean value read.
Throws:
EOFException - if this input stream has reached the end.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readByte

public final byte readByte()
                    throws IOException
See the general contract of the readByte method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readByte in interface DataInput
Returns:
the next byte of this input stream as a signed 8-bit byte.
Throws:
EOFException - if this input stream has reached the end.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readUnsignedByte

public final int readUnsignedByte()
                           throws IOException
See the general contract of the readUnsignedByte method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUnsignedByte in interface DataInput
Returns:
the next byte of this input stream, interpreted as an unsigned 8-bit number.
Throws:
EOFException - if this input stream has reached the end.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readShort

public final short readShort()
                      throws IOException
See the general contract of the readShort method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readShort in interface DataInput
Returns:
the next two bytes of this input stream, interpreted as a signed 16-bit number.
Throws:
EOFException - if this input stream reaches the end before reading two bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readUnsignedShort

public final int readUnsignedShort()
                            throws IOException
See the general contract of the readUnsignedShort method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUnsignedShort in interface DataInput
Returns:
the next two bytes of this input stream, interpreted as an unsigned 16-bit integer.
Throws:
EOFException - if this input stream reaches the end before reading two bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readChar

public final char readChar()
                    throws IOException
See the general contract of the readChar method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readChar in interface DataInput
Returns:
the next two bytes of this input stream as a Unicode character.
Throws:
EOFException - if this input stream reaches the end before reading two bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readInt

public final int readInt()
                  throws IOException
See the general contract of the readInt method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readInt in interface DataInput
Returns:
the next four bytes of this input stream, interpreted as an int.
Throws:
EOFException - if this input stream reaches the end before reading four bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readLong

public final long readLong()
                    throws IOException
See the general contract of the readLong method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readLong in interface DataInput
Returns:
the next eight bytes of this input stream, interpreted as a long.
Throws:
EOFException - if this input stream reaches the end before reading eight bytes.
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readFloat

public final float readFloat()
                      throws IOException
See the general contract of the readFloat method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFloat in interface DataInput
Returns:
the next four bytes of this input stream, interpreted as a float.
Throws:
EOFException - if this input stream reaches the end before reading four bytes.
IOException - if an I/O error occurs.
See Also:
readInt(), Float.intBitsToFloat(int)

readDouble

public final double readDouble()
                        throws IOException
See the general contract of the readDouble method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readDouble in interface DataInput
Returns:
the next eight bytes of this input stream, interpreted as a double.
Throws:
EOFException - if this input stream reaches the end before reading eight bytes.
IOException - if an I/O error occurs.
See Also:
readLong(), Double.longBitsToDouble(long)

readLine

public final String readLine()
                      throws IOException
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));

See the general contract of the readLine method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readLine in interface DataInput
Returns:
the next line of text from this input stream.
Throws:
IOException - if an I/O error occurs.
See Also:
BufferedReader.readLine(), FilterInputStream.in

readUTF

public final String readUTF()
                     throws IOException
See the general contract of the readUTF method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUTF in interface DataInput
Returns:
a Unicode string.
Throws:
EOFException - if this input stream reaches the end before reading all the bytes.
IOException - if an I/O error occurs.
See Also:
readUTF(java.io.DataInput)

readUTF

public static final String readUTF(DataInput in)
                            throws IOException
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String. The details of the modified UTF-8 representation are exactly the same as for the readUTF method of DataInput.
Parameters:
in - a data input stream.
Returns:
a Unicode string.
Throws:
EOFException - if the input stream reaches the end before all the bytes.
IOException - if an I/O error occurs.
UTFDataFormatException - if the bytes do not represent a valid UTF-8 encoding of a Unicode string.
See Also:
readUnsignedShort()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface DataOutput

All Known Subinterfaces:
ObjectOutput
All Known Implementing Classes:
DataOutputStream, RandomAccessFile
public interface DataOutput

The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream. There is also a facility for converting a String into Java modified UTF-8 format and writing the resulting series of bytes.

For all the methods in this interface that write bytes, it is generally true that if a byte cannot be written for any reason, an IOException is thrown.

Since:
JDK1.0
See Also:
DataInput, DataOutputStream

Method Summary
void | write(byte[] b) Writes to the output stream all the bytes in array b.
void | write(byte[] b, int off, int len) Writes len bytes from array b, in order, to the output stream.
void | write(int b) Writes to the output stream the eight low-order bits of the argument b.
void | writeBoolean(boolean v) Writes a boolean value to this output stream.
void | writeByte(int v) Writes to the output stream the eight low- order bits of the argument v.
void | writeBytes(String s) Writes a string to the output stream.
void | writeChar(int v) Writes a char value, wich is comprised of two bytes, to the output stream.
void | writeChars(String s) Writes every character in the string s, to the output stream, in order, two bytes per character.
void | writeDouble(double v) Writes a double value, which is comprised of eight bytes, to the output stream.
void | writeFloat(float v) Writes a float value, which is comprised of four bytes, to the output stream.
void | writeInt(int v) Writes an int value, which is comprised of four bytes, to the output stream.
void | writeLong(long v) Writes an long value, which is comprised of four bytes, to the output stream.
void | writeShort(int v) Writes two bytes to the output stream to represent the value of the argument.
void | writeUTF(String str) Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s.

Method Detail

write

public void write(int b)
           throws IOException
Writes to the output stream the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b)
           throws IOException
Writes to the output stream all the bytes in array b. If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are written. Otherwise, the byte b[0] is written first, then b[1], and so on; the last byte written is b[b.length-1].
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from array b, in order, to the output stream. If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are written. Otherwise, the byte b[off] is written first, then b[off+1], and so on; the last byte written is b[off+len-1].
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.

writeBoolean

public void writeBoolean(boolean v)
                  throws IOException
Writes a boolean value to this output stream. If the argument v is true, the value (byte)1 is written; if v is false, the value (byte)0 is written. The byte written by this method may be read by the readBoolean method of interface DataInput, which will then return a boolean equal to v.
Parameters:
v - the boolean to be written.
Throws:
IOException - if an I/O error occurs.

writeByte

public void writeByte(int v)
               throws IOException
Writes to the output stream the eight low- order bits of the argument v. The 24 high-order bits of v are ignored. (This means that writeByte does exactly the same thing as write for an integer argument.) The byte written by this method may be read by the readByte method of interface DataInput, which will then return a byte equal to (byte)v.
Parameters:
v - the byte value to be written.
Throws:
IOException - if an I/O error occurs.

writeShort

public void writeShort(int v)
                throws IOException
Writes two bytes to the output stream to represent the value of the argument. The byte values to be written, in the order shown, are:

 (byte)(0xff & (v >> 8))
 (byte)(0xff & v)

The bytes written by this method may be read by the readShort method of interface DataInput , which will then return a short equal to (short)v.

Parameters:
v - the short value to be written.
Throws:
IOException - if an I/O error occurs.

writeChar

public void writeChar(int v)
               throws IOException
Writes a char value, wich is comprised of two bytes, to the output stream. The byte values to be written, in the order shown, are:

 (byte)(0xff & (v >> 8))
 (byte)(0xff & v)

The bytes written by this method may be read by the readChar method of interface DataInput , which will then return a char equal to (char)v.

Parameters:
v - the char value to be written.
Throws:
IOException - if an I/O error occurs.

writeInt

public void writeInt(int v)
              throws IOException
Writes an int value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:

 (byte)(0xff & (v >> 24))
 (byte)(0xff & (v >> 16))
 (byte)(0xff & (v >>    8))
 (byte)(0xff & v)

The bytes written by this method may be read by the readInt method of interface DataInput , which will then return an int equal to v.

Parameters:
v - the int value to be written.
Throws:
IOException - if an I/O error occurs.

writeLong

public void writeLong(long v)
               throws IOException
Writes an long value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:

 (byte)(0xff & (v >> 48))
 (byte)(0xff & (v >> 40))
 (byte)(0xff & (v >> 32))
 (byte)(0xff & (v >> 24))
 (byte)(0xff & (v >> 16))
 (byte)(0xff & (v >>  8))
 (byte)(0xff & v)

The bytes written by this method may be read by the readLong method of interface DataInput , which will then return a long equal to v.

Parameters:
v - the long value to be written.
Throws:
IOException - if an I/O error occurs.

writeFloat

public void writeFloat(float v)
                throws IOException
Writes a float value, which is comprised of four bytes, to the output stream. It does this as if it first converts this float value to an int in exactly the manner of the Float.floatToIntBits method and then writes the int value in exactly the manner of the writeInt method. The bytes written by this method may be read by the readFloat method of interface DataInput, which will then return a float equal to v.
Parameters:
v - the float value to be written.
Throws:
IOException - if an I/O error occurs.

writeDouble

public void writeDouble(double v)
                 throws IOException
Writes a double value, which is comprised of eight bytes, to the output stream. It does this as if it first converts this double value to a long in exactly the manner of the Double.doubleToLongBits method and then writes the long value in exactly the manner of the writeLong method. The bytes written by this method may be read by the readDouble method of interface DataInput, which will then return a double equal to v.
Parameters:
v - the double value to be written.
Throws:
IOException - if an I/O error occurs.

writeBytes

public void writeBytes(String s)
                throws IOException
Writes a string to the output stream. For every character in the string s, taken in order, one byte is written to the output stream. If s is null, a NullPointerException is thrown.

If s.length is zero, then no bytes are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, one byte is written, the low-order byte, in exactly the manner of the writeByte method . The high-order eight bits of each character in the string are ignored.

Parameters:
s - the string of bytes to be written.
Throws:
IOException - if an I/O error occurs.

writeChars

public void writeChars(String s)
                throws IOException
Writes every character in the string s, to the output stream, in order, two bytes per character. If s is null, a NullPointerException is thrown. If s.length is zero, then no characters are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, two bytes are actually written, high-order byte first, in exactly the manner of the writeChar method.
Parameters:
s - the string value to be written.
Throws:
IOException - if an I/O error occurs.

writeUTF

public void writeUTF(String str)
              throws IOException
Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s. If s is null, a NullPointerException is thrown. Each character in the string s is converted to a group of one, two, or three bytes, depending on the value of the character.

If a character c is in the range \u0001 through \u007f, it is represented by one byte:

(byte)c

If a character c is \u0000 or is in the range \u0080 through \u07ff, then it is represented by two bytes, to be written in the order shown:

 (byte)(0xc0 | (0x1f & (c >> 6)))
 (byte)(0x80 | (0x3f & c))

If a character c is in the range \u0800 through uffff, then it is represented by three bytes, to be written in the order shown:

 (byte)(0xe0 | (0x0f & (c >> 12)))
 (byte)(0x80 | (0x3f & (c >>  6)))
 (byte)(0x80 | (0x3f & c))

First, the total number of bytes needed to represent all the characters of s is calculated. If this number is larger than 65535, then a UTFDataFormatError is thrown. Otherwise, this length is written to the output stream in exactly the manner of the writeShort method; after this, the one-, two-, or three-byte representation of each character in the string s is written.

The bytes written by this method may be read by the readUTF method of interface DataInput , which will then return a String equal to s.

Parameters:
str - the string value to be written.
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class DataOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.DataOutputStream
All Implemented Interfaces:
DataOutput
public class DataOutputStream
extends FilterOutputStream
implements DataOutput

A data input stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in.

Since:
JDK1.0
See Also:
DataInputStream

Field Summary
protected  int written
The number of bytes written to the data output stream so far.
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
DataOutputStream(OutputStream out)
Creates a new data output stream to write data to the specified underlying output stream.
Method Summary
void | flush() Flushes this data output stream.
int | size() Returns the current value of the counter written, the number of bytes written to this data output stream so far.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
void | write(int b) Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
void | writeBoolean(boolean v) Writes a boolean to the underlying output stream as a 1-byte value.
void | writeByte(int v) Writes out a byte to the underlying output stream as a 1-byte value.
void | writeBytes(String s) Writes out the string to the underlying output stream as a sequence of bytes.
void | writeChar(int v) Writes a char to the underlying output stream as a 2-byte value, high byte first.
void | writeChars(String s) Writes a string to the underlying output stream as a sequence of characters.
void | writeDouble(double v) Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
void | writeFloat(float v) Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
void | writeInt(int v) Writes an int to the underlying output stream as four bytes, high byte first.
void | writeLong(long v) Writes a long to the underlying output stream as eight bytes, high byte first.
void | writeShort(int v) Writes a short to the underlying output stream as two bytes, high byte first.
void | writeUTF(String str) Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
Methods inherited from class java.io.FilterOutputStream
close, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.DataOutput
write

Field Detail

written

protected int written
The number of bytes written to the data output stream so far. If this counter overflows, it will be wrapped to Integer.MAX_VALUE.
Constructor Detail

DataOutputStream

public DataOutputStream(OutputStream out)
Creates a new data output stream to write data to the specified underlying output stream. The counter written is set to zero.
Parameters:
out - the underlying output stream, to be saved for later use.
See Also:
FilterOutputStream.out
Method Detail

write

public void write(int b)
           throws IOException
Writes the specified byte (the low eight bits of the argument b) to the underlying output stream. If no exception is thrown, the counter written is incremented by 1.

Implements the write method of OutputStream.

Specified by:
write in interface DataOutput
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to the underlying output stream. If no exception is thrown, the counter written is incremented by len.
Specified by:
write in interface DataOutput
Overrides:
write in class FilterOutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

flush

public void flush()
           throws IOException
Flushes this data output stream. This forces any buffered output bytes to be written out to the stream.

The flush method of DataOuputStream calls the flush method of its underlying output stream.

Overrides:
flush in class FilterOutputStream
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out, OutputStream.flush()

writeBoolean

public final void writeBoolean(boolean v)
                        throws IOException
Writes a boolean to the underlying output stream as a 1-byte value. The value true is written out as the value (byte)1; the value false is written out as the value (byte)0. If no exception is thrown, the counter written is incremented by 1.
Specified by:
writeBoolean in interface DataOutput
Parameters:
v - a boolean value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeByte

public final void writeByte(int v)
                     throws IOException
Writes out a byte to the underlying output stream as a 1-byte value. If no exception is thrown, the counter written is incremented by 1.
Specified by:
writeByte in interface DataOutput
Parameters:
v - a byte value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeShort

public final void writeShort(int v)
                      throws IOException
Writes a short to the underlying output stream as two bytes, high byte first. If no exception is thrown, the counter written is incremented by 2.
Specified by:
writeShort in interface DataOutput
Parameters:
v - a short to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeChar

public final void writeChar(int v)
                     throws IOException
Writes a char to the underlying output stream as a 2-byte value, high byte first. If no exception is thrown, the counter written is incremented by 2.
Specified by:
writeChar in interface DataOutput
Parameters:
v - a char value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeInt

public final void writeInt(int v)
                    throws IOException
Writes an int to the underlying output stream as four bytes, high byte first. If no exception is thrown, the counter written is incremented by 4.
Specified by:
writeInt in interface DataOutput
Parameters:
v - an int to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeLong

public final void writeLong(long v)
                     throws IOException
Writes a long to the underlying output stream as eight bytes, high byte first. In no exception is thrown, the counter written is incremented by 8.
Specified by:
writeLong in interface DataOutput
Parameters:
v - a long to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeFloat

public final void writeFloat(float v)
                      throws IOException
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first. If no exception is thrown, the counter written is incremented by 4.
Specified by:
writeFloat in interface DataOutput
Parameters:
v - a float value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out, Float.floatToIntBits(float)

writeDouble

public final void writeDouble(double v)
                       throws IOException
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first. If no exception is thrown, the counter written is incremented by 8.
Specified by:
writeDouble in interface DataOutput
Parameters:
v - a double value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out, Double.doubleToLongBits(double)

writeBytes

public final void writeBytes(String s)
                      throws IOException
Writes out the string to the underlying output stream as a sequence of bytes. Each character in the string is written out, in sequence, by discarding its high eight bits. If no exception is thrown, the counter written is incremented by the length of s.
Specified by:
writeBytes in interface DataOutput
Parameters:
s - a string of bytes to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterOutputStream.out

writeChars

public final void writeChars(String s)
                      throws IOException
Writes a string to the underlying output stream as a sequence of characters. Each character is written to the data output stream as if by the writeChar method. If no exception is thrown, the counter written is incremented by twice the length of s.
Specified by:
writeChars in interface DataOutput
Parameters:
s - a String value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
writeChar(int), FilterOutputStream.out

writeUTF

public final void writeUTF(String str)
                    throws IOException
Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.

First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for the character. If no exception is thrown, the counter written is incremented by the total number of bytes written to the output stream. This will be at least two plus the length of str, and at most two plus thrice the length of str.

Specified by:
writeUTF in interface DataOutput
Parameters:
str - a string to be written.
Throws:
IOException - if an I/O error occurs.

size

public final int size()
Returns the current value of the counter written, the number of bytes written to this data output stream so far. If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
Returns:
the value of the written field.
See Also:
written
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EOFException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class EOFException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.EOFException
All Implemented Interfaces:
Serializable
public class EOFException
extends IOException

Signals that an end of file or end of stream has been reached unexpectedly during input.

This exception is mainly used by data input streams, which generally expect a binary file in a specific format, and for which an end of stream is an unusual condition. Most other input streams return a special value on end of stream.

Note that some input operations react to end-of-file by returning a distinguished value (such as -1) rather than by throwing an exception.

Since:
JDK1.0
See Also:
DataInputStream, IOException, Serialized Form

Constructor Summary
EOFException()
Constructs an EOFException with null as its error detail message.
EOFException(String s)
Constructs an EOFException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

EOFException

public EOFException()
Constructs an EOFException with null as its error detail message.

EOFException

public EOFException(String s)
Constructs an EOFException with the specified detail message. The string s may later be retrieved by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Externalizable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface Externalizable

All Superinterfaces:
Serializable
All Known Subinterfaces:
RemoteRef, ServerRef
All Known Implementing Classes:
DataFlavor
public interface Externalizable
extends Serializable

Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances. The writeExternal and readExternal methods of the Externalizable interface are implemented by a class to give the class complete control over the format and contents of the stream for an object and its supertypes. These methods must explicitly coordinate with the supertype to save its state. These methods supercede customized implementations of writeObject and readObject methods.
Object Serialization uses the Serializable and Externalizable interfaces. Object persistence mechanisms can use them as well. Each object to be stored is tested for the Externalizable interface. If the object supports Externalizable, the writeExternal method is called. If the object does not support Externalizable and does implement Serializable, the object is saved using ObjectOutputStream.
When an Externalizable object is reconstructed, an instance is created using the public no-arg constructor, then the readExternal method called. Serializable objects are restored by reading them from an ObjectInputStream.
An Externalizable instance can designate a substitution object via the writeReplace and readResolve methods documented in the Serializable interface.

Since:
JDK1.1
See Also:
ObjectOutputStream, ObjectInputStream, ObjectOutput, ObjectInput, Serializable

Method Summary
void | readExternal(ObjectInput in) The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
void | writeExternal(ObjectOutput out) The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Method Detail

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
Parameters:
out - the stream to write the object to
Throws:
IOException - Includes any I/O exceptions that may occur

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
Parameters:
in - the stream to read data from in order to restore the object
Throws:
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored cannot be found.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


File

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class File

java.lang.Object
  |
  +--java.io.File
All Implemented Interfaces:
Comparable, Serializable
public class File
extends Object
implements Serializable, Comparable

An abstract representation of file and directory pathnames.

User interfaces and operating systems use system-dependent pathname strings to name files and directories. This class presents an abstract, system-independent view of hierarchical pathnames. An abstract pathname has two components:

  1. An optional system-dependent prefix string,
    such as a disk-drive specifier, "/" for the UNIX root directory, or "\\" for a Win32 UNC pathname, and
  2. A sequence of zero or more string names.
Each name in an abstract pathname except for the last denotes a directory; the last name may denote either a directory or a file. The empty abstract pathname has no prefix and an empty name sequence.

The conversion of a pathname string to or from an abstract pathname is inherently system-dependent. When an abstract pathname is converted into a pathname string, each name is separated from the next by a single copy of the default separator character. The default name-separator character is defined by the system property file.separator, and is made available in the public static fields separator and separatorChar of this class. When a pathname string is converted into an abstract pathname, the names within it may be separated by the default name-separator character or by any other name-separator character that is supported by the underlying system.

A pathname, whether abstract or in string form, may be either absolute or relative. An absolute pathname is complete in that no other information is required in order to locate the file that it denotes. A relative pathname, in contrast, must be interpreted in terms of information taken from some other pathname. By default the classes in the java.io package always resolve relative pathnames against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked.

The prefix concept is used to handle root directories on UNIX platforms, and drive specifiers, root directories and UNC pathnames on Win32 platforms, as follows:

  • For UNIX platforms, the prefix of an absolute pathname is always "/". Relative pathnames have no prefix. The abstract pathname denoting the root directory has the prefix "/" and an empty name sequence.
  • For Win32 platforms, the prefix of a pathname that contains a drive specifier consists of the drive letter followed by ":" and possibly followed by "\" if the pathname is absolute. The prefix of a UNC pathname is "\\"; the hostname and the share name are the first two names in the name sequence. A relative pathname that does not specify a drive has no prefix.

Instances of the File class are immutable; that is, once created, the abstract pathname represented by a File object will never change.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static String | pathSeparator The system-dependent path-separator character, represented as a string for convenience.
static char | pathSeparatorChar The system-dependent path-separator character.
static String | separator The system-dependent default name-separator character, represented as a string for convenience.
static char | separatorChar The system-dependent default name-separator character.
Constructor Summary
File(File parent, String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.
File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname.
File(String parent, String child)
Creates a new File instance from a parent pathname string and a child pathname string.
Method Summary
boolean | canRead() Tests whether the application can read the file denoted by this abstract pathname.
boolean | canWrite() Tests whether the application can modify to the file denoted by this abstract pathname.
int | compareTo(File pathname) Compares two abstract pathnames lexicographically.
int | compareTo(Object o) Compares this abstract pathname to another object.
boolean | createNewFile() Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist.
static File | createTempFile(String prefix, String suffix) Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
static File | createTempFile(String prefix, String suffix, File directory) Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
boolean | delete() Deletes the file or directory denoted by this abstract pathname.
void | deleteOnExit() Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates.
boolean | equals(Object obj) Tests this abstract pathname for equality with the given object.
boolean | exists() Tests whether the file denoted by this abstract pathname exists.
File | getAbsoluteFile() Returns the absolute form of this abstract pathname.
String | getAbsolutePath() Returns the absolute pathname string of this abstract pathname.
File | getCanonicalFile() Returns the canonical form of this abstract pathname.
String | getCanonicalPath() Returns the canonical pathname string of this abstract pathname.
String | getName() Returns the name of the file or directory denoted by this abstract pathname.
String | getParent() Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.
File | getParentFile() Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.
String | getPath() Converts this abstract pathname into a pathname string.
int | hashCode() Computes a hash code for this abstract pathname.
boolean | isAbsolute() Tests whether this abstract pathname is absolute.
boolean | isDirectory() Tests whether the file denoted by this abstract pathname is a directory.
boolean | isFile() Tests whether the file denoted by this abstract pathname is a normal file.
boolean | isHidden() Tests whether the file named by this abstract pathname is a hidden file.
long | lastModified() Returns the time that the file denoted by this abstract pathname was last modified.
long | length() Returns the length of the file denoted by this abstract pathname.
String[] | list() Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.
String[] | list(FilenameFilter filter) Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
File[] | listFiles() Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
File[] | listFiles(FileFilter filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
File[] | listFiles(FilenameFilter filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
static File[] | listRoots() List the available filesystem roots.
boolean | mkdir() Creates the directory named by this abstract pathname.
boolean | mkdirs() Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.
boolean | renameTo(File dest) Renames the file denoted by this abstract pathname.
boolean | setLastModified(long time) Sets the last-modified time of the file or directory named by this abstract pathname.
boolean | setReadOnly() Marks the file or directory named by this abstract pathname so that only read operations are allowed.
String | toString() Returns the pathname string of this abstract pathname.
URL | toURL() Converts this abstract pathname into a file: URL.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

separatorChar

public static final char separatorChar
The system-dependent default name-separator character. This field is initialized to contain the first character of the value of the system property file.separator. On UNIX systems the value of this field is '/'; on Win32 systems it is '\'.
See Also:
System.getProperty(java.lang.String)

separator

public static final String separator
The system-dependent default name-separator character, represented as a string for convenience. This string contains a single character, namely separatorChar.

pathSeparatorChar

public static final char pathSeparatorChar
The system-dependent path-separator character. This field is initialized to contain the first character of the value of the system property path.separator. This character is used to separate filenames in a sequence of files given as a path list. On UNIX systems, this character is ':'; on Win32 systems it is ';'.
See Also:
System.getProperty(java.lang.String)

pathSeparator

public static final String pathSeparator
The system-dependent path-separator character, represented as a string for convenience. This string contains a single character, namely pathSeparatorChar.
Constructor Detail

File

public File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname. If the given string is the empty string, then the result is the empty abstract pathname.
Parameters:
pathname - A pathname string
Throws:
NullPointerException - If the pathname argument is null

File

public File(String parent,
            String child)
Creates a new File instance from a parent pathname string and a child pathname string.

If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.

Otherwise the parent pathname string is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty string then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.

Parameters:
parent - The parent pathname string
child - The child pathname string
Throws:
NullPointerException - If child is null

File

public File(File parent,
            String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.

If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.

Otherwise the parent abstract pathname is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty abstract pathname then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.

Parameters:
parent - The parent abstract pathname
child - The child pathname string
Throws:
NullPointerException - If child is null
Method Detail

getName

public String getName()
Returns the name of the file or directory denoted by this abstract pathname. This is just the last name in the pathname's name sequence. If the pathname's name sequence is empty, then the empty string is returned.
Returns:
The name of the file or directory denoted by this abstract pathname, or the empty string if this pathname's name sequence is empty

getParent

public String getParent()
Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.

The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.

Returns:
The pathname string of the parent directory named by this abstract pathname, or null if this pathname does not name a parent

getParentFile

public File getParentFile()
Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.

The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.

Returns:
The abstract pathname of the parent directory named by this abstract pathname, or null if this pathname does not name a parent
Since:
1.2

getPath

public String getPath()
Converts this abstract pathname into a pathname string. The resulting string uses the default name-separator character to separate the names in the name sequence.
Returns:
The string form of this abstract pathname

isAbsolute

public boolean isAbsolute()
Tests whether this abstract pathname is absolute. The definition of absolute pathname is system dependent. On UNIX systems, a pathname is absolute if its prefix is "/". On Win32 systems, a pathname is absolute if its prefix is a drive specifier followed by "\\", or if its prefix is "\\".
Returns:
true if this abstract pathname is absolute, false otherwise

getAbsolutePath

public String getAbsolutePath()
Returns the absolute pathname string of this abstract pathname.

If this abstract pathname is already absolute, then the pathname string is simply returned as if by the getPath() method. If this abstract pathname is the empty abstract pathname then the pathname string of the current user directory, which is named by the system property user.dir, is returned. Otherwise this pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Win32 systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory.

Returns:
The absolute pathname string denoting the same file or directory as this abstract pathname
See Also:
isAbsolute()

getAbsoluteFile

public File getAbsoluteFile()
Returns the absolute form of this abstract pathname. Equivalent to new File(this.getAbsolutePath()()).
Returns:
The absolute abstract pathname denoting the same file or directory as this abstract pathname
Since:
1.2

getCanonicalPath

public String getCanonicalPath()
                        throws IOException
Returns the canonical pathname string of this abstract pathname.

A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent. This method first converts this pathname to absolute form if necessary, as if by invoking the getAbsolutePath() method, and then maps it to its unique form in a system-dependent way. This typically involves removing redundant names such as "." and ".." from the pathname, resolving symbolic links (on UNIX platforms), and converting drive letters to a standard case (on Win32 platforms).

Every pathname that denotes an existing file or directory has a unique canonical form. Every pathname that denotes a nonexistent file or directory also has a unique canonical form. The canonical form of the pathname of a nonexistent file or directory may be different from the canonical form of the same pathname after the file or directory is created. Similarly, the canonical form of the pathname of an existing file or directory may be different from the canonical form of the same pathname after the file or directory is deleted.

Returns:
The canonical pathname string denoting the same file or directory as this abstract pathname
Throws:
IOException - If an I/O error occurs, which is possible because the construction of the canonical pathname may require filesystem queries
Since:
JDK1.1

getCanonicalFile

public File getCanonicalFile()
                      throws IOException
Returns the canonical form of this abstract pathname. Equivalent to new File(this.getCanonicalPath()()).
Returns:
The canonical pathname string denoting the same file or directory as this abstract pathname
Throws:
IOException - If an I/O error occurs, which is possible because the construction of the canonical pathname may require filesystem queries
Since:
1.2

toURL

public URL toURL()
          throws MalformedURLException
Converts this abstract pathname into a file: URL. The exact form of the URL is system-dependent. If it can be determined that the file denoted by this abstract pathname is a directory, then the resulting URL will end with a slash.
Returns:
a URL object representing the equivalent file URL.
Throws:
MalformedURLException - if the path cannot be parsed as a URL.
Since:
1.2
See Also:
URL

canRead

public boolean canRead()
Tests whether the application can read the file denoted by this abstract pathname.
Returns:
true if and only if the file specified by this abstract pathname exists and can be read by the application; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

canWrite

public boolean canWrite()
Tests whether the application can modify to the file denoted by this abstract pathname.
Returns:
true if and only if the file system actually contains a file denoted by this abstract pathname and the application is allowed to write to the file; false otherwise.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method denies write access to the file

exists

public boolean exists()
Tests whether the file denoted by this abstract pathname exists.
Returns:
true if and only if the file denoted by this abstract pathname exists; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

isDirectory

public boolean isDirectory()
Tests whether the file denoted by this abstract pathname is a directory.
Returns:
true if and only if the file denoted by this abstract pathname exists and is a directory; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

isFile

public boolean isFile()
Tests whether the file denoted by this abstract pathname is a normal file. A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria. Any non-directory file created by a Java application is guaranteed to be a normal file.
Returns:
true if and only if the file denoted by this abstract pathname exists and is a normal file; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

isHidden

public boolean isHidden()
Tests whether the file named by this abstract pathname is a hidden file. The exact definition of hidden is system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ('.'). On Win32 systems, a file is considered to be hidden if it has been marked as such in the filesystem.
Returns:
true if and only if the file denoted by this abstract pathname is hidden according to the conventions of the underlying platform
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file
Since:
1.2

lastModified

public long lastModified()
Returns the time that the file denoted by this abstract pathname was last modified.
Returns:
A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

length

public long length()
Returns the length of the file denoted by this abstract pathname.
Returns:
The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file

createNewFile

public boolean createNewFile()
                      throws IOException
Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file. This method, in combination with the deleteOnExit() method, can therefore serve as the basis for a simple but reliable cooperative file-locking protocol.
Returns:
true if the named file does not exist and was successfully created; false if the named file already exists
Throws:
IOException - If an I/O error occurred
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method denies write access to the file
Since:
1.2

delete

public boolean delete()
Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted.
Returns:
true if and only if the file or directory is successfully deleted; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the file

deleteOnExit

public void deleteOnExit()
Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates. Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification (12.9).

Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used with care.

Throws:
SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the file
Since:
1.2
See Also:
delete()

list

public String[] list()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.

If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of strings is returned, one for each file or directory in the directory. Names denoting the directory itself and the directory's parent directory are not included in the result. Each string is a file name rather than a complete path.

There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

Returns:
An array of strings naming the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the directory

list

public String[] list(FilenameFilter filter)
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the list() method, except that the strings in the returned array must satisfy the filter. If the given filter is null then all names are accepted. Otherwise, a name satisfies the filter if and only if the value true results when the FilenameFilter.accept(java.io.File, java.lang.String) method of the filter is invoked on this abstract pathname and the name of a file or directory in the directory that it denotes.
Parameters:
filter - A filename filter
Returns:
An array of strings naming the files and directories in the directory denoted by this abstract pathname that were accepted by the given filter. The array will be empty if the directory is empty or if no names were accepted by the filter. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the directory

listFiles

public File[] listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.

If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of File objects is returned, one for each file or directory in the directory. Pathnames denoting the directory itself and the directory's parent directory are not included in the result. Each resulting abstract pathname is constructed from this abstract pathname using the File(File, String) constructor. Therefore if this pathname is absolute then each resulting pathname is absolute; if this pathname is relative then each resulting pathname will be relative to the same directory.

There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

Returns:
An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the directory
Since:
1.2

listFiles

public File[] listFiles(FilenameFilter filter)
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the listFiles() method, except that the pathnames in the returned array must satisfy the filter. If the given filter is null then all pathnames are accepted. Otherwise, a pathname satisfies the filter if and only if the value true results when the FilenameFilter.accept(java.io.File, java.lang.String) method of the filter is invoked on this abstract pathname and the name of a file or directory in the directory that it denotes.
Parameters:
filter - A filename filter
Returns:
An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the directory
Since:
1.2

listFiles

public File[] listFiles(FileFilter filter)
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the listFiles() method, except that the pathnames in the returned array must satisfy the filter. If the given filter is null then all pathnames are accepted. Otherwise, a pathname satisfies the filter if and only if the value true results when the FilenameFilter.accept(java.io.File, java.lang.String) method of the filter is invoked on the pathname.
Parameters:
filter - A filename filter
Returns:
An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the directory
Since:
1.2

mkdir

public boolean mkdir()
Creates the directory named by this abstract pathname.
Returns:
true if and only if the directory was created; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method does not permit the named directory to be created

mkdirs

public boolean mkdirs()
Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.
Returns:
true if and only if the directory was created, along with all necessary parent directories; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method does not permit the named directory and all necessary parent directories and to be created

renameTo

public boolean renameTo(File dest)
Renames the file denoted by this abstract pathname.
Parameters:
dest - The new abstract pathname for the named file
Returns:
true if and only if the renaming succeeded; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method denies write access to either the old or new pathnames
NullPointerException - If parameter dest is null

setLastModified

public boolean setLastModified(long time)
Sets the last-modified time of the file or directory named by this abstract pathname.

All platforms support file-modification times to the nearest second, but some provide more precision. The argument will be truncated to fit the supported precision. If the operation succeeds and no intervening operations on the file take place, then the next invocation of the lastModified() method will return the (possibly truncated) time argument that was passed to this method.

Parameters:
time - The new last-modified time, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
Returns:
true if and only if the operation succeeded; false otherwise
Throws:
IllegalArgumentException - If the argument is negative
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method denies write access to the named file
Since:
1.2

setReadOnly

public boolean setReadOnly()
Marks the file or directory named by this abstract pathname so that only read operations are allowed. After invoking this method the file or directory is guaranteed not to change until it is either deleted or marked to allow write access. Whether or not a read-only file or directory may be deleted depends upon the underlying system.
Returns:
true if and only if the operation succeeded; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method denies write access to the named file
Since:
1.2

listRoots

public static File[] listRoots()
List the available filesystem roots.

A particular Java platform may support zero or more hierarchically-organized file systems. Each file system has a root directory from which all other files in that file system can be reached. Windows platforms, for example, have a root directory for each active drive; UNIX platforms have a single root directory, namely "/". The set of available filesystem roots is affected by various system-level operations such the insertion or ejection of removable media and the disconnecting or unmounting of physical or virtual disk drives.

This method returns an array of File objects that denote the root directories of the available filesystem roots. It is guaranteed that the canonical pathname of any file physically present on the local machine will begin with one of the roots returned by this method.

The canonical pathname of a file that resides on some other machine and is accessed via a remote-filesystem protocol such as SMB or NFS may or may not begin with one of the roots returned by this method. If the pathname of a remote file is syntactically indistinguishable from the pathname of a local file then it will begin with one of the roots returned by this method. Thus, for example, File objects denoting the root directories of the mapped network drives of a Windows platform will be returned by this method, while File objects containing UNC pathnames will not be returned by this method.

Unlike most methods in this class, this method does not throw security exceptions. If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to a particular root directory, then that directory will not appear in the result.

Returns:
An array of File objects denoting the available filesystem roots, or null if the set of roots could not be determined. The array will be empty if there are no filesystem roots.
Since:
1.2

createTempFile

public static File createTempFile(String prefix,
                                  String suffix,
                                  File directory)
                           throws IOException

Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. If this method returns successfully then it is guaranteed that:

  1. The file denoted by the returned abstract pathname did not exist before this method was invoked, and
  2. Neither this method nor any of its variants will return the same abstract pathname again in the current invocation of the virtual machine.
This method provides only part of a temporary-file facility. To arrange for a file created by this method to be deleted automatically, use the deleteOnExit() method.

The prefix argument must be at least three characters long. It is recommended that the prefix be a short, meaningful string such as "hjb" or "mail". The suffix argument may be null, in which case the suffix ".tmp" will be used.

To create the new file, the prefix and the suffix may first be adjusted to fit the limitations of the underlying platform. If the prefix is too long then it will be truncated, but its first three characters will always be preserved. If the suffix is too long then it too will be truncated, but if it begins with a period character ('.') then the period and the first three characters following it will always be preserved. Once these adjustments have been made the name of the new file will be generated by concatenating the prefix, five or more internally-generated characters, and the suffix.

If the directory argument is null then the system-dependent default temporary-file directory will be used. The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Win32 systems it is typically "c:\\temp".

Parameters:
prefix - The prefix string to be used in generating the file's name; must be at least three characters long
suffix - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used
directory - The directory in which the file is to be created, or null if the default temporary-file directory is to be used
Returns:
An abstract pathname denoting a newly-created empty file
Throws:
IllegalArgumentException - If the prefix argument contains fewer than three characters
IOException - If a file could not be created
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method does not allow a file to be created
Since:
1.2

createTempFile

public static File createTempFile(String prefix,
                                  String suffix)
                           throws IOException
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. Invoking this method is equivalent to invoking createTempFile(prefix, suffix, null).
Parameters:
prefix - The prefix string to be used in generating the file's name; must be at least three characters long
suffix - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used
Returns:
An abstract pathname denoting a newly-created empty file
Throws:
IllegalArgumentException - If the prefix argument contains fewer than three characters
IOException - If a file could not be created
SecurityException - If a security manager exists and its SecurityManager.checkWrite(java.io.FileDescriptor) method does not allow a file to be created
Since:
1.2

compareTo

public int compareTo(File pathname)
Compares two abstract pathnames lexicographically. The ordering defined by this method depends upon the underlying system. On UNIX systems, alphabetic case is significant in comparing pathnames; on Win32 systems it is not.
Parameters:
pathname - The abstract pathname to be compared to this abstract pathname
Returns:
Zero if the argument is equal to this abstract pathname, a value less than zero if this abstract pathname is lexicographically less than the argument, or a value greater than zero if this abstract pathname is lexicographically greater than the argument
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this abstract pathname to another object. If the other object is an abstract pathname, then this function behaves like compareTo(File). Otherwise, it throws a ClassCastException, since abstract pathnames can only be compared to abstract pathnames.
Specified by:
compareTo in interface Comparable
Parameters:
o - The Object to be compared to this abstract pathname
Returns:
If the argument is an abstract pathname, returns zero if the argument is equal to this abstract pathname, a value less than zero if this abstract pathname is lexicographically less than the argument, or a value greater than zero if this abstract pathname is lexicographically greater than the argument
Throws:
ClassCastException - if the argument is not an abstract pathname
Since:
1.2
See Also:
Comparable

equals

public boolean equals(Object obj)
Tests this abstract pathname for equality with the given object. Returns true if and only if the argument is not null and is an abstract pathname that denotes the same file or directory as this abstract pathname. Whether or not two abstract pathnames are equal depends upon the underlying system. On UNIX systems, alphabetic case is significant in comparing pathnames; on Win32 systems it is not.
Overrides:
equals in class Object
Parameters:
obj - The object to be compared with this abstract pathname
Returns:
true if and only if the objects are the same; false otherwise

hashCode

public int hashCode()
Computes a hash code for this abstract pathname. Because equality of abstract pathnames is inherently system-dependent, so is the computation of their hash codes. On UNIX systems, the hash code of an abstract pathname is equal to the exclusive or of its pathname string and the decimal value 1234321. On Win32 systems, the hash code is equal to the exclusive or of its pathname string, convered to lower case, and the decimal value 1234321.
Overrides:
hashCode in class Object
Returns:
A hash code for this abstract pathname

toString

public String toString()
Returns the pathname string of this abstract pathname. This is just the string returned by the getPath() method.
Overrides:
toString in class Object
Returns:
The string form of this abstract pathname
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileDescriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileDescriptor

java.lang.Object
  |
  +--java.io.FileDescriptor
public final class FileDescriptor
extends Object

Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes. The main practical use for a file descriptor is to create a FileInputStream or FileOutputStream to contain it.

Applications should not create their own file descriptors.

Since:
JDK1.0
See Also:
FileInputStream, FileOutputStream

Field Summary
static FileDescriptor | err A handle to the standard error stream.
static FileDescriptor | in A handle to the standard input stream.
static FileDescriptor | out A handle to the standard output stream.
Constructor Summary
FileDescriptor()
Constructs an (invalid) FileDescriptor object.
Method Summary
void | sync() Force all system buffers to synchronize with the underlying device.
boolean | valid() Tests if this file descriptor object is valid.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

public static final FileDescriptor in
A handle to the standard input stream. Usually, this file descriptor is not used directly, but rather via the input stream known as System.in.
See Also:
System.in

out

public static final FileDescriptor out
A handle to the standard output stream. Usually, this file descriptor is not used directly, but rather via the output stream known as System.out.
See Also:
System.out

err

public static final FileDescriptor err
A handle to the standard error stream. Usually, this file descriptor is not used directly, but rather via the output stream known as System.err.
See Also:
System.err
Constructor Detail

FileDescriptor

public FileDescriptor()
Constructs an (invalid) FileDescriptor object.
Method Detail

valid

public boolean valid()
Tests if this file descriptor object is valid.
Returns:
true if the file descriptor object represents a valid, open file, socket, or other active I/O connection; false otherwise.

sync

public void sync()
          throws SyncFailedException
Force all system buffers to synchronize with the underlying device. This method returns after all modified data and attributes of this FileDescriptor have been written to the relevant device(s). In particular, if this FileDescriptor refers to a physical storage medium, such as a file in a file system, sync will not return until all in-memory modified copies of buffers associated with this FileDesecriptor have been written to the physical medium. sync is meant to be used by code that requires physical storage (such as a file) to be in a known state For example, a class that provided a simple transaction facility might use sync to ensure that all changes to a file caused by a given transaction were recorded on a storage medium. sync only affects buffers downstream of this FileDescriptor. If any in-memory buffering is being done by the application (for example, by a BufferedOutputStream object), those buffers must be flushed into the FileDescriptor (for example, by invoking OutputStream.flush) before that data will be affected by sync.
Throws:
SyncFailedException - Thrown when the buffers cannot be flushed, or because the system cannot guarantee that all the buffers have been synchronized with physical media.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface FileFilter

public interface FileFilter

A filter for abstract pathnames.

Instances of this interface may be passed to the listFiles(FileFilter) method of the FileFilter class.

Since:
1.2

Method Summary
 boolean accept(File pathname)
Tests whether or not the specified abstract pathname should be included in a pathname list.

Method Detail

accept

public boolean accept(File pathname)
Tests whether or not the specified abstract pathname should be included in a pathname list.
Parameters:
pathname - The abstract pathname to be tested
Returns:
true if and only if pathname should be included
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FileInputStream
public class FileInputStream
extends InputStream

A FileInputStream obtains input bytes from a file in a file system. What files are available depends on the host environment.

Since:
JDK1.0
See Also:
File, FileDescriptor, FileOutputStream

Constructor Summary
FileInputStream(File file)
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.
FileInputStream(FileDescriptor fdObj)
Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.
FileInputStream(String name)
Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.
Method Summary
int | available() Returns the number of bytes that can be read from this file input stream without blocking.
void | close() Closes this file input stream and releases any system resources associated with the stream.
protected void | finalize() Ensures that the close method of this file input stream is called when there are no more references to it.
FileDescriptor | getFD() Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.
int | read() Reads a byte of data from this input stream.
int | read(byte[] b) Reads up to b.length bytes of data from this input stream into an array of bytes.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this input stream into an array of bytes.
long | skip(long n) Skips over and discards n bytes of data from the input stream.
Methods inherited from class java.io.InputStream
mark, markSupported, reset
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileInputStream

public FileInputStream(String name)
                throws FileNotFoundException
Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkRead method is called with the name argument as its argument.

If the named file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a FileNotFoundException is thrown.

Parameters:
name - the system-dependent file name.
Throws:
FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
SecurityException - if a security manager exists and its checkRead method denies read access to the file.
See Also:
SecurityManager.checkRead(java.lang.String)

FileInputStream

public FileInputStream(File file)
                throws FileNotFoundException
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkRead method is called with the path represented by the file argument as its argument.

If the named file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a FileNotFoundException is thrown.

Parameters:
file - the file to be opened for reading.
Throws:
FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
SecurityException - if a security manager exists and its checkRead method denies read access to the file.
See Also:
File.getPath(), SecurityManager.checkRead(java.lang.String)

FileInputStream

public FileInputStream(FileDescriptor fdObj)
Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.

If there is a security manager, its checkRead method is called with the file descriptor fdObj as its argument to see if it's ok to read the file descriptor. If read access is denied to the file descriptor a SecurityException is thrown.

If fdObj is null then a NullPointerException is thrown.

Parameters:
fdObj - the file descriptor to be opened for reading.
Throws:
SecurityException - if a security manager exists and its checkRead method denies read access to the file descriptor.
See Also:
SecurityManager.checkRead(java.io.FileDescriptor)
Method Detail

read

public int read()
         throws IOException
Reads a byte of data from this input stream. This method blocks if no input is yet available.
Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the file is reached.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b)
         throws IOException
Reads up to b.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
IOException - if an I/O error occurs.

skip

public long skip(long n)
          throws IOException
Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.
Overrides:
skip in class InputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Returns the number of bytes that can be read from this file input stream without blocking.
Overrides:
available in class InputStream
Returns:
the number of bytes that can be read from this file input stream without blocking.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this file input stream and releases any system resources associated with the stream.
Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.

getFD

public final FileDescriptor getFD()
                           throws IOException
Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.
Returns:
the file descriptor object associated with this stream.
Throws:
IOException - if an I/O error occurs.
See Also:
FileDescriptor

finalize

protected void finalize()
                 throws IOException
Ensures that the close method of this file input stream is called when there are no more references to it.
Overrides:
finalize in class Object
Throws:
IOException - if an I/O error occurs.
See Also:
close()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilenameFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface FilenameFilter

public interface FilenameFilter

Instances of classes that implement this interface are used to filter filenames. These instances are used to filter directory listings in the list method of class File, and by the Abstract Window Toolkit's file dialog component.

Since:
JDK1.0
See Also:
FileDialog.setFilenameFilter(java.io.FilenameFilter), File, File.list(java.io.FilenameFilter)

Method Summary
 boolean accept(File dir, String name)
Tests if a specified file should be included in a file list.

Method Detail

accept

public boolean accept(File dir,
                      String name)
Tests if a specified file should be included in a file list.
Parameters:
dir - the directory in which the file was found.
name - the name of the file.
Returns:
true if and only if the name should be included in the file list; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.FileNotFoundException
All Implemented Interfaces:
Serializable
public class FileNotFoundException
extends IOException

Signals that an attempt to open the file denoted by a specified pathname has failed.

This exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
FileNotFoundException()
Constructs a FileNotFoundException with null as its error detail message.
FileNotFoundException(String s)
Constructs a FileNotFoundException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FileNotFoundException

public FileNotFoundException()
Constructs a FileNotFoundException with null as its error detail message.

FileNotFoundException

public FileNotFoundException(String s)
Constructs a FileNotFoundException with the specified detail message. The string s can be retrieved later by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FileOutputStream
public class FileOutputStream
extends OutputStream

A file output stream is an output stream for writing data to a File or to a FileDescriptor. Whether or not a file is available or may be created depends upon the underlying platform. Some platforms, in particular, allow a file to be opened for writing by only one FileOutputStream (or other file-writing object) at a time. In such situations the constructors in this class will fail if the file involved is already open.

Since:
JDK1.0
See Also:
File, FileDescriptor, FileInputStream

Constructor Summary
FileOutputStream(File file)
Creates a file output stream to write to the file represented by the specified File object.
FileOutputStream(FileDescriptor fdObj)
Creates an output file stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.
FileOutputStream(String name)
Creates an output file stream to write to the file with the specified name.
FileOutputStream(String name, boolean append)
Creates an output file stream to write to the file with the specified name.
Method Summary
void | close() Closes this file output stream and releases any system resources associated with this stream.
protected void | finalize() Cleans up the connection to the file, and ensures that the close method of this file output stream is called when there are no more references to this stream.
FileDescriptor | getFD() Returns the file descriptor associated with this stream.
void | write(byte[] b) Writes b.length bytes from the specified byte array to this file output stream.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this file output stream.
void | write(int b) Writes the specified byte to this file output stream.
Methods inherited from class java.io.OutputStream
flush
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileOutputStream

public FileOutputStream(String name)
                 throws FileNotFoundException
Creates an output file stream to write to the file with the specified name. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkWrite method is called with name as its argument.

If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.

Parameters:
name - the system-dependent filename
Throws:
FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
SecurityException - if a security manager exists and its checkWrite method denies write access to the file.
See Also:
SecurityManager.checkWrite(java.lang.String)

FileOutputStream

public FileOutputStream(String name,
                        boolean append)
                 throws FileNotFoundException
Creates an output file stream to write to the file with the specified name. If the second argument is true, then bytes will be written to the end of the file rather than the beginning. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkWrite method is called with name as its argument.

If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.

Parameters:
name - the system-dependent file name
append - if true, then bytes will be written to the end of the file rather than the beginning
Throws:
FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason.
SecurityException - if a security manager exists and its checkWrite method denies write access to the file.
Since:
JDK1.1
See Also:
SecurityManager.checkWrite(java.lang.String)

FileOutputStream

public FileOutputStream(File file)
                 throws FileNotFoundException
Creates a file output stream to write to the file represented by the specified File object. A new FileDescriptor object is created to represent this file connection.

First, if there is a security manager, its checkWrite method is called with the path represented by the file argument as its argument.

If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.

Parameters:
file - the file to be opened for writing.
Throws:
FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
SecurityException - if a security manager exists and its checkWrite method denies write access to the file.
See Also:
File.getPath(), SecurityException, SecurityManager.checkWrite(java.lang.String)

FileOutputStream

public FileOutputStream(FileDescriptor fdObj)
Creates an output file stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.

First, if there is a security manager, its checkWrite method is called with the file descriptor fdObj argument as its argument.

Parameters:
fdObj - the file descriptor to be opened for writing.
Throws:
SecurityException - if a security manager exists and its checkWrite method denies write access to the file descriptor.
See Also:
SecurityManager.checkWrite(java.io.FileDescriptor)
Method Detail

write

public void write(int b)
           throws IOException
Writes the specified byte to this file output stream. Implements the write method of OutputStream.
Overrides:
write in class OutputStream
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes from the specified byte array to this file output stream.
Overrides:
write in class OutputStream
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this file output stream.
Overrides:
write in class OutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this file output stream and releases any system resources associated with this stream. This file output stream may no longer be used for writing bytes.
Overrides:
close in class OutputStream
Throws:
IOException - if an I/O error occurs.

getFD

public final FileDescriptor getFD()
                           throws IOException
Returns the file descriptor associated with this stream.
Returns:
the FileDescriptor object that represents the connection to the file in the file system being used by this FileOutputStream object.
Throws:
IOException - if an I/O error occurs.
See Also:
FileDescriptor

finalize

protected void finalize()
                 throws IOException
Cleans up the connection to the file, and ensures that the close method of this file output stream is called when there are no more references to this stream.
Overrides:
finalize in class Object
Throws:
IOException - if an I/O error occurs.
See Also:
FileInputStream.close()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilePermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FilePermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.io.FilePermission
All Implemented Interfaces:
Guard, Serializable
public final class FilePermission
extends Permission
implements Serializable

This class represents access to a file or directory. A FilePermission consists of a pathname and a set of actions valid for that pathname.

Pathname is the pathname of the file or directory granted the specified actions. A pathname that ends in "/*" (where "/" is the file separator character, File.separatorChar) indicates all the files and directories contained in that directory. A pathname that ends with "/-" indicates (recursively) all files and subdirectories contained in that directory. A pathname consisting of the special token "<<ALL FILES>>" matches any file.

Note: A pathname consisting of a single "*" indicates all the files in the current directory, while a pathname consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

The actions to be granted are passed to the constructor in a string containing a list of one or more comma-separated keywords. The possible keywords are "read", "write", "execute", and "delete". Their meaning is defined as follows:

read
read permission
write
write permission
execute
execute permission. Allows Runtime.exec to be called. Corresponds to SecurityManager.checkExec.
delete
delete permission. Allows File.delete to be called. Corresponds to SecurityManager.checkDelete.

The actions string is converted to lowercase before processing.

Be careful when granting FilePermissions. Think about the implications of granting read and especially write access to various files and directories. The "<<ALL FILES>>" permission with write action is especially dangerous. This grants permission to write to the entire file system. One thing this effectively allows is replacement of the system binary, including the JVM runtime environment.

Please note: Code can always read a file from the same directory it's in (or a subdirectory of that directory); it does not need explicit permission to do so.

Since:
1.2
See Also:
Permission, Permissions, PermissionCollection, Serialized Form

Constructor Summary
FilePermission(String path, String actions)
Creates a new FilePermission object with the specified actions.
Method Summary
boolean | equals(Object obj) Checks two FilePermission objects for equality.
String | getActions() Returns the "canonical string representation" of the actions.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) Checks if this FilePermission object "implies" the specified permission.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing FilePermission objects.
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FilePermission

public FilePermission(String path,
                      String actions)
Creates a new FilePermission object with the specified actions. path is the pathname of a file or directory, and actions contains a comma-separated list of the desired actions granted on the file or directory. Possible actions are "read", "write", "execute", and "delete".

A pathname that ends in "/*" (where "/" is the file separator character, File.separatorChar) indicates a directory and all the files contained in that directory. A pathname that ends with "/-" indicates a directory and (recursively) all files and subdirectories contained in that directory. The special pathname "<<ALL FILES>>" matches all files.

A pathname consisting of a single "*" indicates all the files in the current directory, while a pathname consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

Parameters:
path - the pathname of the file/directory.
actions - the action string.
Method Detail

implies

public boolean implies(Permission p)
Checks if this FilePermission object "implies" the specified permission.

More specifically, this method returns true if:

  • p is an instanceof FilePermission,

  • p's actions are a proper subset of this object's actions, and

  • p's pathname is implied by this object's pathname. For example, "/tmp/*" implies "/tmp/foo", since "/tmp/*" encompasses the "/tmp" directory and all files in that directory, including the one named "foo".
Overrides:
implies in class Permission
Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(Object obj)
Checks two FilePermission objects for equality. Checks that obj is a FilePermission, and has the same pathname and actions as this object.

Overrides:
equals in class Permission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a FilePermission, and has the same pathname and actions as this FilePermission object.

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Permission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the "canonical string representation" of the actions. That is, this method always returns present actions in the following order: read, write, execute, delete. For example, if this FilePermission object allows both write and read actions, a call to getActions will return the string "read,write".
Overrides:
getActions in class Permission
Returns:
the canonical string representation of the actions.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing FilePermission objects.

FilePermission objects must be stored in a manner that allows them to be inserted into the collection in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.

For example, if you have two FilePermissions:

  1. "/tmp/-", "read"
  2. "/tmp/scratch/foo", "write"

and you are calling the implies method with the FilePermission:

   "/tmp/scratch/foo", "read,write",
then the implies function must take into account both the "/tmp/-" and "/tmp/scratch/foo" permissions, so the effective permission is "read,write", and implies returns true. The "implies" semantics for FilePermissions are handled properly by the PermissionCollection object returned by this newPermissionCollection method.
Overrides:
newPermissionCollection in class Permission
Returns:
a new PermissionCollection object suitable for storing FilePermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.InputStreamReader
              |
              +--java.io.FileReader
public class FileReader
extends InputStreamReader

Convenience class for reading character files. The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream.

Since:
JDK1.1
See Also:
InputStreamReader, FileInputStream

Fields inherited from class java.io.Reader
lock
Constructor Summary
FileReader(File file)
Creates a new FileReader, given the File to read from.
FileReader(FileDescriptor fd)
Creates a new FileReader, given the FileDescriptor to read from.
FileReader(String fileName)
Creates a new FileReader, given the name of the file to read from.
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, ready
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileReader

public FileReader(String fileName)
           throws FileNotFoundException
Creates a new FileReader, given the name of the file to read from.
Parameters:
fileName - the name of the file to read from
Throws:
FileNotFoundException - if the specified file is not found

FileReader

public FileReader(File file)
           throws FileNotFoundException
Creates a new FileReader, given the File to read from.
Parameters:
file - the File to read from
Throws:
FileNotFoundException - if the specified file is not found

FileReader

public FileReader(FileDescriptor fd)
Creates a new FileReader, given the FileDescriptor to read from.
Parameters:
fd - the FileDescriptor to read from
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FileWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.OutputStreamWriter
              |
              +--java.io.FileWriter
public class FileWriter
extends OutputStreamWriter

Convenience class for writing character files. The constructors of this class assume that the default character encoding and the default byte-buffer size are acceptable. To specify these values yourself, construct an OutputStreamWriter on a FileOutputStream.

Since:
JDK1.1
See Also:
OutputStreamWriter, FileOutputStream

Fields inherited from class java.io.Writer
lock
Constructor Summary
FileWriter(File file)
Constructs a FileWriter object given a File object.
FileWriter(FileDescriptor fd)
Constructs a FileWriter object associated with a file descriptor.
FileWriter(String fileName)
Constructs a FileWriter object given a file name.
FileWriter(String fileName, boolean append)
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
Methods inherited from class java.io.OutputStreamWriter
close, flush, getEncoding, write, write, write
Methods inherited from class java.io.Writer
write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileWriter

public FileWriter(String fileName)
           throws IOException
Constructs a FileWriter object given a file name.
Parameters:
fileName - String The system-dependent filename.
Throws:
IOException - if the specified file is not found or if some other I/O error occurs.

FileWriter

public FileWriter(String fileName,
                  boolean append)
           throws IOException
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
Parameters:
fileName - String The system-dependent filename.
append - boolean if true, then data will be written to the end of the file rather than the beginning.
Throws:
IOException - if the specified file is not found or if some other I/O error occurs.

FileWriter

public FileWriter(File file)
           throws IOException
Constructs a FileWriter object given a File object.
Parameters:
file - a File object to write to.
Throws:
IOException - if the specified file is not found or if some other I/O error occurs.

FileWriter

public FileWriter(FileDescriptor fd)
Constructs a FileWriter object associated with a file descriptor.
Parameters:
fd - FileDescriptor object to write to.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FilterInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
Direct Known Subclasses:
BufferedInputStream, CheckedInputStream, DataInputStream, DigestInputStream, InflaterInputStream, LineNumberInputStream, ProgressMonitorInputStream, PushbackInputStream
public class FilterInputStream
extends InputStream

A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterInputStream itself simply overrides all methods of InputStream with versions that pass all requests to the contained input stream. Subclasses of FilterInputStream may further override some of these methods and may also provide additional methods and fields.

Since:
JDK1.0

Field Summary
protected  InputStream in
The input stream to be filtered.
Constructor Summary
protected FilterInputStream(InputStream in)
Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
Method Summary
int | available() Returns the number of bytes that can be read from this input stream without blocking.
void | close() Closes this input stream and releases any system resources associated with the stream.
void | mark(int readlimit) Marks the current position in this input stream.
boolean | markSupported() Tests if this input stream supports the mark and reset methods.
int | read() Reads the next byte of data from this input stream.
int | read(byte[] b) Reads up to byte.length bytes of data from this input stream into an array of bytes.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this input stream into an array of bytes.
void | reset() Repositions this stream to the position at the time the mark method was last called on this input stream.
long | skip(long n) Skips over and discards n bytes of data from the input stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

protected InputStream in
The input stream to be filtered.
Constructor Detail

FilterInputStream

protected FilterInputStream(InputStream in)
Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
Parameters:
in - the underlying input stream, or null if this instance is to be created without an underlying stream.
Method Detail

read

public int read()
         throws IOException
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

This method simply performs in.read() and returns the result.

Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
See Also:
in

read

public int read(byte[] b)
         throws IOException
Reads up to byte.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

This method simply performs the call read(b, 0, b.length) and returns the result. It is important that it does not do in.read(b) instead; certain subclasses of FilterInputStream depend on the implementation strategy actually used.

Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
read(byte[], int, int)

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

This method simply performs in.read(b, off, len) and returns the result.

Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
in

skip

public long skip(long n)
          throws IOException
Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.

This method simply performs in.skip(n).

Overrides:
skip in class InputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Returns the number of bytes that can be read from this input stream without blocking.

This method simply performs in.available(n) and returns the result.

Overrides:
available in class InputStream
Returns:
the number of bytes that can be read from the input stream without blocking.
Throws:
IOException - if an I/O error occurs.
See Also:
in

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close().
Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.
See Also:
in

mark

public void mark(int readlimit)
Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The readlimit argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

This method simply performs in.mark(readlimit).

Overrides:
mark in class InputStream
Parameters:
readlimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
See Also:
in, reset()

reset

public void reset()
           throws IOException
Repositions this stream to the position at the time the mark method was last called on this input stream.

This method simply performs in.reset().

Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.

Overrides:
reset in class InputStream
Throws:
IOException - if the stream has not been marked or if the mark has been invalidated.
See Also:
in, mark(int)

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods. This method simply performs in.markSupported().
Overrides:
markSupported in class InputStream
Returns:
true if this stream type supports the mark and reset method; false otherwise.
See Also:
in, InputStream.mark(int), InputStream.reset()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FilterOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
Direct Known Subclasses:
BufferedOutputStream, CheckedOutputStream, DataOutputStream, DeflaterOutputStream, DigestOutputStream, PrintStream
public class FilterOutputStream
extends OutputStream

This class is the superclass of all classes that filter output streams. These streams sit on top of an already existing output stream (the underlying output stream) which it uses as its basic sink of data, but possibly transforming the data along the way or providing additional functionality.

The class FilterOutputStream itself simply overrides all methods of OutputStream with versions that pass all requests to the underlying output stream. Subclasses of FilterOutputStream may further override some of these methods as well as provide additional methods and fields.

Since:
JDK1.0

Field Summary
protected  OutputStream out
The underlying output stream to be filtered.
Constructor Summary
FilterOutputStream(OutputStream out)
Creates an output stream filter built on top of the specified underlying output stream.
Method Summary
void | close() Closes this output stream and releases any system resources associated with the stream.
void | flush() Flushes this output stream and forces any buffered output bytes to be written out to the stream.
void | write(byte[] b) Writes b.length bytes to this output stream.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this output stream.
void | write(int b) Writes the specified byte to this output stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected OutputStream out
The underlying output stream to be filtered.
Constructor Detail

FilterOutputStream

public FilterOutputStream(OutputStream out)
Creates an output stream filter built on top of the specified underlying output stream.
Parameters:
out - the underlying output stream to be assigned to the field this.out for later use, or null if this instance is to be created without an underlying stream.
Method Detail

write

public void write(int b)
           throws IOException
Writes the specified byte to this output stream.

The write method of FilterOutputStream calls the write method of its underlying output stream, that is, it performs out.write(b).

Implements the abstract write method of OutputStream.

Overrides:
write in class OutputStream
Parameters:
b - the byte.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes to this output stream.

The write method of FilterOutputStream calls its write method of three arguments with the arguments b, 0, and b.length.

Note that this method does not call the one-argument write method of its underlying stream with the single argument b.

Overrides:
write in class OutputStream
Parameters:
b - the data to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
write(byte[], int, int)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.

The write method of FilterOutputStream calls the write method of one argument on each byte to output.

Note that this method does not call the write method of its underlying input stream with the same arguments. Subclasses of FilterOutputStream should provide a more efficient implementation of this method.

Overrides:
write in class OutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.
See Also:
write(int)

flush

public void flush()
           throws IOException
Flushes this output stream and forces any buffered output bytes to be written out to the stream.

The flush method of FilterOutputStream calls the flush method of its underlying output stream.

Overrides:
flush in class OutputStream
Throws:
IOException - if an I/O error occurs.
See Also:
out

close

public void close()
           throws IOException
Closes this output stream and releases any system resources associated with the stream.

The close method of FilterOutputStream calls its flush method, and then calls the close method of its underlying output stream.

Overrides:
close in class OutputStream
Throws:
IOException - if an I/O error occurs.
See Also:
flush(), out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FilterReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.FilterReader
Direct Known Subclasses:
PushbackReader
public abstract class FilterReader
extends Reader

Abstract class for reading filtered character streams.

Since:
JDK1.1

Field Summary
protected  Reader in
The underlying character-input stream, or null if the stream has been closed.
Fields inherited from class java.io.Reader
lock
Constructor Summary
protected FilterReader(Reader in)
Create a new filtered reader.
Method Summary
 void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation.
 int read()
Read a single character.
 int read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream.
 long skip(long n)
Skip characters.
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

protected Reader in
The underlying character-input stream, or null if the stream has been closed.
Constructor Detail

FilterReader

protected FilterReader(Reader in)
Create a new filtered reader.
Parameters:
in - a Reader object providing the underlying stream.
Method Detail

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class Reader
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class Reader
Throws:
IOException - If an I/O error occurs

skip

public long skip(long n)
          throws IOException
Skip characters.
Overrides:
skip in class Reader
Throws:
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read.
Overrides:
ready in class Reader
Throws:
IOException - If an I/O error occurs

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation.
Overrides:
markSupported in class Reader
Following copied from class: java.io.Reader
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream.
Overrides:
mark in class Reader
Throws:
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream.
Overrides:
reset in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Reader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class FilterWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.FilterWriter
public abstract class FilterWriter
extends Writer

Abstract class for writing filtered character streams.

Since:
JDK1.1

Field Summary
protected  Writer out
The underlying character-output stream.
Fields inherited from class java.io.Writer
lock
Constructor Summary
protected FilterWriter(Writer out)
Create a new filtered writer.
Method Summary
void | close() Close the stream.
void | flush() Flush the stream.
void | write(char[] cbuf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String str, int off, int len) Write a portion of a string.
Methods inherited from class java.io.Writer
write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected Writer out
The underlying character-output stream.
Constructor Detail

FilterWriter

protected FilterWriter(Writer out)
Create a new filtered writer.
Parameters:
out - a Writer object to provide the underlying stream.
Method Detail

write

public void write(int c)
           throws IOException
Write a single character.
Overrides:
write in class Writer
Throws:
IOException - If an I/O error occurs

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Write a portion of an array of characters.
Overrides:
write in class Writer
Parameters:
cbuf - Buffer of characters to be written
off - Offset from which to start reading characters
len - Number of characters to be written
Throws:
IOException - If an I/O error occurs

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Write a portion of a string.
Overrides:
write in class Writer
Parameters:
str - String to be written
off - Offset from which to start reading characters
len - Number of characters to be written
Throws:
IOException - If an I/O error occurs

flush

public void flush()
           throws IOException
Flush the stream.
Overrides:
flush in class Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Writer
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GetField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectInputStream.GetField

java.lang.Object
  |
  +--java.io.ObjectInputStream.GetField
Enclosing class:
ObjectInputStream
public abstract static class ObjectInputStream.GetField
extends Object

Provide access to the persistent fields read from the input stream.

Constructor Summary
ObjectInputStream.GetField()
Method Summary
abstract boolean | defaulted(String name) Return true if the named field is defaulted and has no value in this stream.
abstract boolean | get(String name, boolean defvalue) Get the value of the named boolean field from the persistent field.
abstract byte | get(String name, byte defvalue) Get the value of the named byte field from the persistent fields.
abstract char | get(String name, char defvalue) Get the value of the named char field from the persistent fields.
abstract double | get(String name, double defvalue) Get the value of the named double field from the persistent field.
abstract float | get(String name, float defvalue) Get the value of the named float field from the persistent fields.
abstract int | get(String name, int defvalue) Get the value of the named int field from the persistent fields.
abstract long | get(String name, long defvalue) Get the value of the named long field from the persistent fields.
abstract Object | get(String name, Object defvalue) Get the value of the named Object field from the persistent field.
abstract short | get(String name, short defvalue) Get the value of the named short field from the persistent fields.
abstract ObjectStreamClass | getObjectStreamClass() Get the ObjectStreamClass that describes the fields in the stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ObjectInputStream.GetField

public ObjectInputStream.GetField()
Method Detail

getObjectStreamClass

public abstract ObjectStreamClass getObjectStreamClass()
Get the ObjectStreamClass that describes the fields in the stream.
Returns:
the descriptor class that describes the serializable fields

defaulted

public abstract boolean defaulted(String name)
                           throws IOException,
                                  IllegalArgumentException
Return true if the named field is defaulted and has no value in this stream.
Parameters:
name - the name of the field
Returns:
true, if and only if the named field is defaulted
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if name does not correspond to a serializable field

get

public abstract boolean get(String name,
                            boolean defvalue)
                     throws IOException,
                            IllegalArgumentException
Get the value of the named boolean field from the persistent field.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named boolean field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract char get(String name,
                         char defvalue)
                  throws IOException,
                         IllegalArgumentException
Get the value of the named char field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named char field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract byte get(String name,
                         byte defvalue)
                  throws IOException,
                         IllegalArgumentException
Get the value of the named byte field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named byte field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract short get(String name,
                          short defvalue)
                   throws IOException,
                          IllegalArgumentException
Get the value of the named short field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named short field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract int get(String name,
                        int defvalue)
                 throws IOException,
                        IllegalArgumentException
Get the value of the named int field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named int field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract long get(String name,
                         long defvalue)
                  throws IOException,
                         IllegalArgumentException
Get the value of the named long field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named long field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract float get(String name,
                          float defvalue)
                   throws IOException,
                          IllegalArgumentException
Get the value of the named float field from the persistent fields.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named float field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract double get(String name,
                           double defvalue)
                    throws IOException,
                           IllegalArgumentException
Get the value of the named double field from the persistent field.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named double field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect

get

public abstract Object get(String name,
                           Object defvalue)
                    throws IOException,
                           IllegalArgumentException
Get the value of the named Object field from the persistent field.
Parameters:
name - the name of the field
defvalue - the default value to use if name does not have a value
Returns:
the value of the named Object field
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
IllegalArgumentException - if type of name is not serializable or if the field type is incorrect
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class InputStream

java.lang.Object
  |
  +--java.io.InputStream
Direct Known Subclasses:
AudioInputStream, ByteArrayInputStream, FileInputStream, FilterInputStream, InputStream, ObjectInputStream, PipedInputStream, SequenceInputStream, StringBufferInputStream
public abstract class InputStream
extends Object

This abstract class is the superclass of all classes representing an input stream of bytes.

Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.

Since:
JDK1.0
See Also:
BufferedInputStream, ByteArrayInputStream, DataInputStream, FilterInputStream, read(), OutputStream, PushbackInputStream

Constructor Summary
InputStream()
Method Summary
int | available() Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
void | close() Closes this input stream and releases any system resources associated with the stream.
void | mark(int readlimit) Marks the current position in this input stream.
boolean | markSupported() Tests if this input stream supports the mark and reset methods.
abstract int | read() Reads the next byte of data from the input stream.
int | read(byte[] b) Reads some number of bytes from the input stream and stores them into the buffer array b.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from the input stream into an array of bytes.
void | reset() Repositions this stream to the position at the time the mark method was last called on this input stream.
long | skip(long n) Skips over and discards n bytes of data from this input stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputStream

public InputStream()
Method Detail

read

public abstract int read()
                  throws IOException
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

A subclass must provide an implementation of this method.

Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b)
         throws IOException
Reads some number of bytes from the input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

The read(b) method for class InputStream has the same effect as:

 read(b, 0, b.length)
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
read(byte[], int, int)

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.

This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len. Let k be the number of bytes actually read; these bytes will be stored in elements b[off] through b[off+k-1], leaving elements b[off+k] through b[off+len-1] unaffected.

In every case, elements b[0] through b[off] and elements b[off+len] through b[b.length-1] are unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

The read(b, off, len) method for class InputStream simply calls the method read() repeatedly. If the first such call results in an IOException, that exception is returned from the call to the read(b, off, len) method. If any subsequent call to read() results in a IOException, the exception is caught and treated as if it were end of file; the bytes read up to that point are stored into b and the number of bytes read before the exception occurred is returned. Subclasses are encouraged to provide a more efficient implementation of this method.

Parameters:
b - the buffer into which the data is read.
off - the start offset in array b at which the data is written.
len - the maximum number of bytes to read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
read()

skip

public long skip(long n)
          throws IOException
Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.

The skip method of InputStream creates a byte array and then repeatedly reads into it until n bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.

Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or or another thread.

The available method for class InputStream always returns 0.

This method should be overridden by subclasses.

Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream.

The close method of InputStream does nothing.

Throws:
IOException - if an I/O error occurs.

mark

public void mark(int readlimit)
Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.

The mark method of InputStream does nothing.

Parameters:
readlimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
See Also:
reset()

reset

public void reset()
           throws IOException
Repositions this stream to the position at the time the mark method was last called on this input stream.

The general contract of reset is:

  • If the method markSupported returns true, then:
    • If the method mark has not been called since the stream was created, or the number of bytes read from the stream since mark was last called is larger than the argument to mark at that last call, then an IOException might be thrown.
    • If such an IOException is not thrown, then the stream is reset to a state such that all the bytes read since the most recent call to mark (or since the start of the file, if mark has not been called) will be resupplied to subsequent callers of the read method, followed by any bytes that otherwise would have been the next input data as of the time of the call to reset.
  • If the method markSupported returns false, then:
    • The call to reset may throw an IOException.
    • If an IOException is not thrown, then the stream is reset to a fixed state that depends on the particular type of the input stream and how it was created. The bytes that will be supplied to subsequent callers of the read method depend on the particular type of the input stream.

The method reset for class InputStream does nothing and always throws an IOException.

Throws:
IOException - if this stream has not been marked or if the mark has been invalidated.
See Also:
mark(int), IOException

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods. The markSupported method of InputStream returns false.
Returns:
true if this true type supports the mark and reset method; false otherwise.
See Also:
mark(int), reset()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputStreamReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class InputStreamReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.InputStreamReader
Direct Known Subclasses:
FileReader
public class InputStreamReader
extends Reader

An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.

Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.

For top efficiency, consider wrapping an InputStreamReader within a BufferedReader. For example:

 BufferedReader in
   = new BufferedReader(new InputStreamReader(System.in));

Since:
JDK1.1
See Also:
BufferedReader, InputStream, Character encodings

Fields inherited from class java.io.Reader
lock
Constructor Summary
InputStreamReader(InputStream in)
Create an InputStreamReader that uses the default character encoding.
InputStreamReader(InputStream in, String enc)
Create an InputStreamReader that uses the named character encoding.
Method Summary
void | close() Close the stream.
String | getEncoding() Returns the canonical name of the character encoding being used by this stream.
int | read() Read a single character.
int | read(char[] cbuf, int off, int len) Read characters into a portion of an array.
boolean | ready() Tell whether this stream is ready to be read.
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputStreamReader

public InputStreamReader(InputStream in)
Create an InputStreamReader that uses the default character encoding.
Parameters:
in - An InputStream

InputStreamReader

public InputStreamReader(InputStream in,
                         String enc)
                  throws UnsupportedEncodingException
Create an InputStreamReader that uses the named character encoding.
Parameters:
in - An InputStream
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
Method Detail

getEncoding

public String getEncoding()
Returns the canonical name of the character encoding being used by this stream. If this InputStreamReader was created with the InputStreamReader(InputStream, String) constructor then the returned encoding name, being canonical, may differ from the encoding name passed to the constructor. May return null if the stream has been closed.
Returns:
a String representing the encoding name, or possibly null if the stream has been closed
See Also:
Character encodings

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class Reader
Returns:
The character read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class Reader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read. An InputStreamReader is ready if its input buffer is not empty, or if bytes are available to be read from the underlying byte stream.
Overrides:
ready in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Reader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InterruptedIOException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class InterruptedIOException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.InterruptedIOException
All Implemented Interfaces:
Serializable
public class InterruptedIOException
extends IOException

Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was terminated. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.

Since:
JDK1.0
See Also:
InputStream, OutputStream, Thread.interrupt(), Serialized Form

Field Summary
 int bytesTransferred
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Constructor Summary
InterruptedIOException()
Constructs an InterruptedIOException with null as its error detail message.
InterruptedIOException(String s)
Constructs an InterruptedIOException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

bytesTransferred

public int bytesTransferred
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Constructor Detail

InterruptedIOException

public InterruptedIOException()
Constructs an InterruptedIOException with null as its error detail message.

InterruptedIOException

public InterruptedIOException(String s)
Constructs an InterruptedIOException with the specified detail message. The string s can be retrieved later by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidClassException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class InvalidClassException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.InvalidClassException
All Implemented Interfaces:
Serializable
public class InvalidClassException
extends ObjectStreamException

Thrown when the Serialization runtime detects one of the following problems with a Class.

  • The serial version of the class does not match that of the class descriptor read from the stream
  • The class contains unknown datatypes
  • The class does not have an accessible no-arg constructor

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
 String classname
Name of the invalid class.
Constructor Summary
InvalidClassException(String reason)
Report a InvalidClassException for the reason specified.
InvalidClassException(String cname, String reason)
Constructs an InvalidClassException object.
Method Summary
 String getMessage()
Produce the message and include the classname, if present.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

classname

public String classname
Name of the invalid class.
Constructor Detail

InvalidClassException

public InvalidClassException(String reason)
Report a InvalidClassException for the reason specified.
Parameters:
reason - String describing the reason for the exception.

InvalidClassException

public InvalidClassException(String cname,
                             String reason)
Constructs an InvalidClassException object.
Parameters:
cname - a String naming the invalid class.
reason - a String describing the reason for the exception.
Method Detail

getMessage

public String getMessage()
Produce the message and include the classname, if present.
Overrides:
getMessage in class Throwable
Following copied from class: java.lang.Throwable
Returns:
the error message string of this Throwable object if it was created with an error message string; or null if it was created with no error message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidObjectException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class InvalidObjectException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.InvalidObjectException
All Implemented Interfaces:
Serializable
public class InvalidObjectException
extends ObjectStreamException

Indicates that one or more deserialized objects failed validation tests. The argument should provide the reason for the failure.

Since:
JDK1.1
See Also:
ObjectInputValidation, Serialized Form

Constructor Summary
InvalidObjectException(String reason)
Constructs an InvalidObjectException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidObjectException

public InvalidObjectException(String reason)
Constructs an InvalidObjectException.
Parameters:
reason - Detailed message explaing the reason for the failure.
See Also:
ObjectInputValidation
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IOException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class IOException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChangedCharSetException, CharConversionException, EOFException, FileNotFoundException, InterruptedIOException, MalformedURLException, ObjectStreamException, ProtocolException, RemoteException, SocketException, SyncFailedException, UnknownHostException, UnknownServiceException, UnsupportedEncodingException, UTFDataFormatException, ZipException
public class IOException
extends Exception

Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.

Since:
JDK1.0
See Also:
InputStream, OutputStream, Serialized Form

Constructor Summary
IOException()
Constructs an IOException with null as its error detail message.
IOException(String s)
Constructs an IOException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IOException

public IOException()
Constructs an IOException with null as its error detail message.

IOException

public IOException(String s)
Constructs an IOException with the specified detail message. The error message string s can later be retrieved by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineNumberInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class LineNumberInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.io.LineNumberInputStream
Deprecated. This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.

public class LineNumberInputStream
extends FilterInputStream

This class is an input stream filter that provides the added functionality of keeping track of the current line number.

A line is a sequence of bytes ending with a carriage return character ('\r'), a newline character ('\n'), or a carriage return character followed immediately by a linefeed character. In all three cases, the line terminating character(s) are returned as a single newline character.

The line number begins at 0, and is incremented by 1 when a read returns a newline character.

Since:
JDK1.0
See Also:
LineNumberReader

Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
LineNumberInputStream(InputStream in)
Deprecated. Constructs a newline number input stream that reads its input from the specified input stream.
Method Summary
int | available() Deprecated. Returns the number of bytes that can be read from this input stream without blocking.
int | getLineNumber() Deprecated. Returns the current line number.
void | mark(int readlimit) Deprecated. Marks the current position in this input stream.
int | read() Deprecated. Reads the next byte of data from this input stream.
int | read(byte[] b, int off, int len) Deprecated. Reads up to len bytes of data from this input stream into an array of bytes.
void | reset() Deprecated. Repositions this stream to the position at the time the mark method was last called on this input stream.
void | setLineNumber(int lineNumber) Deprecated. Sets the line number to the specified argument.
long | skip(long n) Deprecated. Skips over and discards n bytes of data from this input stream.
Methods inherited from class java.io.FilterInputStream
close, markSupported, read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineNumberInputStream

public LineNumberInputStream(InputStream in)
Deprecated.
Constructs a newline number input stream that reads its input from the specified input stream.
Parameters:
in - the underlying input stream.
Method Detail

read

public int read()
         throws IOException
Deprecated.
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

The read method of LineNumberInputStream calls the read method of the underlying input stream. It checks for carriage returns and newline characters in the input, and modifies the current line number as appropriate. A carriage-return character or a carriage return followed by a newline character are both converted into a single newline character.

Overrides:
read in class FilterInputStream
Returns:
the next byte of data, or -1 if the end of this stream is reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in, getLineNumber()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Deprecated.
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

The read method of LineNumberInputStream repeatedly calls the read method of zero arguments to fill in the byte array.

Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of this stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
read()

skip

public long skip(long n)
          throws IOException
Deprecated.
Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.

The skip method of LineNumberInputStream creates a byte array and then repeatedly reads into it until n bytes have been read or the end of the stream has been reached.

Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

setLineNumber

public void setLineNumber(int lineNumber)
Deprecated.
Sets the line number to the specified argument.
Parameters:
lineNumber - the new line number.
See Also:
getLineNumber()

getLineNumber

public int getLineNumber()
Deprecated.
Returns the current line number.
Returns:
the current line number.
See Also:
setLineNumber(int)

available

public int available()
              throws IOException
Deprecated.
Returns the number of bytes that can be read from this input stream without blocking.

Note that if the underlying input stream is able to supply k input characters without blocking, the LineNumberInputStream can guarantee only to provide k/2 characters without blocking, because the k characters from the underlyhing input stream might consist of k/2 pairs of '\r' and '\n', which are converted to just k/2 '\n' characters.

Overrides:
available in class FilterInputStream
Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

mark

public void mark(int readlimit)
Deprecated.
Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The mark method of LineNumberInputStream remembers the current line number in a private variable, and then calls the mark method of the underlying input stream.

Overrides:
mark in class FilterInputStream
Parameters:
readlimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
See Also:
FilterInputStream.in, reset()

reset

public void reset()
           throws IOException
Deprecated.
Repositions this stream to the position at the time the mark method was last called on this input stream.

The reset method of LineNumberInputStream resets the line number to be the line number at the time the mark method was called, and then calls the reset method of the underlying input stream.

Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parser, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails, which, if it happens within readlimit bytes, allows the outer code to reset the stream and try another parser.

Overrides:
reset in class FilterInputStream
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in, mark(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineNumberReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class LineNumberReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.BufferedReader
              |
              +--java.io.LineNumberReader
public class LineNumberReader
extends BufferedReader

A buffered character-input stream that keeps track of line numbers. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.

Since:
JDK1.1

Fields inherited from class java.io.Reader
lock
Constructor Summary
LineNumberReader(Reader in)
Create a new line-numbering reader, using the default input-buffer size.
LineNumberReader(Reader in, int sz)
Create a new line-numbering reader, reading characters into a buffer of the given size.
Method Summary
int | getLineNumber() Get the current line number.
void | mark(int readAheadLimit) Mark the present position in the stream.
int | read() Read a single character.
int | read(char[] cbuf, int off, int len) Read characters into a portion of an array.
String | readLine() Read a line of text.
void | reset() Reset the stream to the most recent mark.
void | setLineNumber(int lineNumber) Set the current line number.
long | skip(long n) Skip characters.
Methods inherited from class java.io.BufferedReader
close, markSupported, ready
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineNumberReader

public LineNumberReader(Reader in)
Create a new line-numbering reader, using the default input-buffer size.
Parameters:
in - a Reader object to provide the underlying stream.

LineNumberReader

public LineNumberReader(Reader in,
                        int sz)
Create a new line-numbering reader, reading characters into a buffer of the given size.
Parameters:
in - a Reader object to provide the underlying stream.
sz - an int specifying the size of the buffer.
Method Detail

setLineNumber

public void setLineNumber(int lineNumber)
Set the current line number.
Parameters:
lineNumber - an int specifying the line number.
See Also:
getLineNumber()

getLineNumber

public int getLineNumber()
Get the current line number.
Returns:
The current line number.
See Also:
setLineNumber(int)

read

public int read()
         throws IOException
Read a single character. Line terminators are compressed into single newline ('\n') characters.
Overrides:
read in class BufferedReader
Returns:
The character read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class BufferedReader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of bytes read, or -1 if the end of the stream has already been reached
Throws:
IOException - If an I/O error occurs

readLine

public String readLine()
                throws IOException
Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
Overrides:
readLine in class BufferedReader
Returns:
A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip

public long skip(long n)
          throws IOException
Skip characters.
Overrides:
skip in class BufferedReader
Parameters:
n - The number of characters to skip
Returns:
The number of characters actually skipped
Throws:
IOException - If an I/O error occurs

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point, and will also reset the line number appropriately.
Overrides:
mark in class BufferedReader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.
Throws:
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream to the most recent mark.
Overrides:
reset in class BufferedReader
Throws:
IOException - If the stream has not been marked, or if the mark has been invalidated
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotActiveException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class NotActiveException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.NotActiveException
All Implemented Interfaces:
Serializable
public class NotActiveException
extends ObjectStreamException

Thrown when serialization or deserialization is not active.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
NotActiveException()
Constructor to create a new NotActiveException without a reason.
NotActiveException(String reason)
Constructor to create a new NotActiveException with the reason given.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotActiveException

public NotActiveException(String reason)
Constructor to create a new NotActiveException with the reason given.
Parameters:
reason - a String describing the reason for the exception.

NotActiveException

public NotActiveException()
Constructor to create a new NotActiveException without a reason.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotSerializableException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class NotSerializableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.NotSerializableException
All Implemented Interfaces:
Serializable
public class NotSerializableException
extends ObjectStreamException

Thrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
NotSerializableException()
Constructs a NotSerializableException object.
NotSerializableException(String classname)
Constructs a NotSerializableException object with message string.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotSerializableException

public NotSerializableException(String classname)
Constructs a NotSerializableException object with message string.
Parameters:
classname - Class of the instance being serialized/deserialized.

NotSerializableException

public NotSerializableException()
Constructs a NotSerializableException object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface ObjectInput

All Superinterfaces:
DataInput
All Known Implementing Classes:
ObjectInputStream
public interface ObjectInput
extends DataInput

ObjectInput extends the DataInput interface to include the reading of objects. DataInput includes methods for the input of primitive types, ObjectInput extends that interface to include objects, arrays, and Strings.

Since:
JDK1.1
See Also:
InputStream, ObjectOutputStream, ObjectInputStream

Method Summary
int | available() Returns the number of bytes that can be read without blocking.
void | close() Closes the input stream.
int | read() Reads a byte of data.
int | read(byte[] b) Reads into an array of bytes.
int | read(byte[] b, int off, int len) Reads into an array of bytes.
Object | readObject() Read and return an object.
long | skip(long n) Skips n bytes of input.
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes

Method Detail

readObject

public Object readObject()
                  throws ClassNotFoundException,
                         IOException
Read and return an object. The class that implements this interface defines where the object is "read" from.
Returns:
the object read from the stream
Throws:
ClassNotFoundException - If the class of a serialized object cannot be found.
IOException - If any of the usual Input/Output related exceptions occur.

read

public int read()
         throws IOException
Reads a byte of data. This method will block if no input is available.
Returns:
the byte read, or -1 if the end of the stream is reached.
Throws:
IOException - If an I/O error has occurred.

read

public int read(byte[] b)
         throws IOException
Reads into an array of bytes. This method will block until some input is available.
Parameters:
b - the buffer into which the data is read
Returns:
the actual number of bytes read, -1 is returned when the end of the stream is reached.
Throws:
IOException - If an I/O error has occurred.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads into an array of bytes. This method will block until some input is available.
Parameters:
b - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, -1 is returned when the end of the stream is reached.
Throws:
IOException - If an I/O error has occurred.

skip

public long skip(long n)
          throws IOException
Skips n bytes of input.
Parameters:
n - the number of bytes to be skipped
Returns:
the actual number of bytes skipped.
Throws:
IOException - If an I/O error has occurred.

available

public int available()
              throws IOException
Returns the number of bytes that can be read without blocking.
Returns:
the number of available bytes.
Throws:
IOException - If an I/O error has occurred.

close

public void close()
           throws IOException
Closes the input stream. Must be called to release any resources associated with the stream.
Throws:
IOException - If an I/O error has occurred.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.ObjectInputStream
All Implemented Interfaces:
DataInput, ObjectInput, ObjectStreamConstants
public class ObjectInputStream
extends InputStream
implements ObjectInput, ObjectStreamConstants

An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream. ObjectOutputStream and ObjectInputStream can provide an application with persistent storage for graphs of objects when used with a FileOutputStream and FileInputStream respectively. ObjectInputStream is used to recover those objects previously serialized. Other uses include passing objects between hosts using a socket stream or for marshaling and unmarshaling arguments and parameters in a remote communication system.

ObjectInputStream ensures that the types of all objects in the graph created from the stream match the classes present in the Java Virtual Machine. Classes are loaded as required using the standard mechanisms.

Only objects that support the java.io.Serializable or java.io.Externalizable interface can be read from streams. The method readObject is used to read an object from the stream. Java's safe casting should be used to get the desired type. In Java, strings and arrays are objects and are treated as objects during serialization. When read they need to be cast to the expected type.

Primitive data types can be read from the stream using the appropriate method on DataInput.

The default deserialization mechanism for objects restores the contents of each field to the value and type it had when it was written. Fields declared as transient or static are ignored by the deserialization process. References to other objects cause those objects to be read from the stream as necessary. Graphs of objects are restored correctly using a reference sharing mechanism. New objects are always allocated when deserializing, which prevents existing objects from being overwritten.

Reading an object is analogous to running the constructors of a new object. Memory is allocated for the object and initialized to zero (NULL). No-arg constructors are invoked for the non-serializable classes and then the fields of the serializable classes are restored from the stream starting with the serializable class closest to java.lang.object and finishing with the object's most specifiec class.

For example to read from a stream as written by the example in ObjectOutputStream:

    FileInputStream istream = new FileInputStream("t.tmp");
    ObjectInputStream p = new ObjectInputStream(istream);

    int i = p.readInt();
    String today = (String)p.readObject();
    Date date = (Date)p.readObject();

    istream.close();
Classes control how they are serialized by implementing either the java.io.Serializable or java.io.Externalizable interfaces.

Implementing the Serializable interface allows object serialization to save and restore the entire state of the object and it allows classes to evolve between the time the stream is written and the time it is read. It automatically traverses references between objects, saving and restoring entire graphs. Serializable classes that require special handling during the serialization and deserialization process should implement both of these methods:

 private void writeObject(java.io.ObjectOutputStream stream)
     throws IOException;
 private void readObject(java.io.ObjectInputStream stream)
     throws IOException, ClassNotFoundException;

The readObject method is responsible for reading and restoring the state of the object for its particular class using data written to the stream by the corresponding writeObject method. The method does not need to concern itself with the state belonging to its superclasses or subclasses. State is restored by reading data from the ObjectInputStream for the individual fields and making assignments to the appropriate fields of the object. Reading primitive data types is supported by DataInput.

Serialization does not read or assign values to the fields of any object that does not implement the java.io.Serializable interface. Subclasses of Objects that are not serializable can be serializable. In this case the non-serializable class must have a no-arg constructor to allow its fields to be initialized. In this case it is the responsibility of the subclass to save and restore the state of the non-serializable class. It is frequently the case that the fields of that class are accessible (public, package, or protected) or that there are get and set methods that can be used to restore the state.

Any exception that occurs while deserializing an object will be caught by the ObjectInputStream and abort the reading process.

Implementing the Externalizable interface allows the object to assume complete control over the contents and format of the object's serialized form. The methods of the Externalizable interface, writeExternal and readExternal, are called to save and restore the objects state. When implemented by a class they can write and read their own state using all of the methods of ObjectOutput and ObjectInput. It is the responsibility of the objects to handle any versioning that occurs.

Since:
JDK1.1
See Also:
DataInput, ObjectOutputStream, Serializable, Object Serialization Specification, Section 3, Object Input Classes

Inner Class Summary
static class ObjectInputStream.GetField
Provide access to the persistent fields read from the input stream.
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Constructor Summary
protected | ObjectInputStream() Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.
 | ObjectInputStream(InputStream in) Create an ObjectInputStream that reads from the specified InputStream.
Method Summary
int | available() Returns the number of bytes that can be read without blocking.
void | close() Closes the input stream.
void | defaultReadObject() Read the non-static and non-transient fields of the current class from this stream.
protected boolean | enableResolveObject(boolean enable) Enable the stream to allow objects read from the stream to be replaced.
int | read() Reads a byte of data.
int | read(byte[] b, int off, int len) Reads into an array of bytes.
boolean | readBoolean() Reads in a boolean.
byte | readByte() Reads an 8 bit byte.
char | readChar() Reads a 16 bit char.
protected ObjectStreamClass | readClassDescriptor() Read a class descriptor from the serialization stream.
double | readDouble() Reads a 64 bit double.
ObjectInputStream.GetField | readFields() Reads the persistent fields from the stream and makes them available by name.
float | readFloat() Reads a 32 bit float.
void | readFully(byte[] data) Reads bytes, blocking until all bytes are read.
void | readFully(byte[] data, int offset, int size) Reads bytes, blocking until all bytes are read.
int | readInt() Reads a 32 bit int.
String | readLine() Deprecated. This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.
long | readLong() Reads a 64 bit long.
Object | readObject() Read an object from the ObjectInputStream.
protected Object | readObjectOverride() This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.
short | readShort() Reads a 16 bit short.
protected void | readStreamHeader() The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.
int | readUnsignedByte() Reads an unsigned 8 bit byte.
int | readUnsignedShort() Reads an unsigned 16 bit short.
String | readUTF() Reads a UTF format String.
void | registerValidation(ObjectInputValidation obj, int prio) Register an object to be validated before the graph is returned.
protected Class | resolveClass(ObjectStreamClass v) Load the local class equivalent of the specified stream class description.
protected Object | resolveObject(Object obj) This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
protected Class | resolveProxyClass(String[] interfaces) Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
int | skipBytes(int len) Skips bytes, block until all bytes are skipped.
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.ObjectInput
read, skip

Constructor Detail

ObjectInputStream

public ObjectInputStream(InputStream in)
                  throws IOException,
                         StreamCorruptedException
Create an ObjectInputStream that reads from the specified InputStream. The stream header containing the magic number and version number are read from the stream and verified. This method will block until the corresponding ObjectOutputStream has written and flushed the header.
Parameters:
in - the underlying InputStream from which to read
Throws:
StreamCorruptedException - The version or magic number are incorrect.
IOException - An exception occurred in the underlying stream.

ObjectInputStream

protected ObjectInputStream()
                     throws IOException,
                            SecurityException
Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.

If there is a security manager installed, this method first calls the security manager's checkPermission method with the SerializablePermission("enableSubclassImplementation") permission to ensure it's ok to enable subclassing.

Throws:
IOException - Thrown if not called by a subclass.
SecurityException - if a security manager exists and its checkPermission method denies enabling subclassing.
See Also:
SecurityManager.checkPermission(java.security.Permission), SerializablePermission
Method Detail

readObject

public final Object readObject()
                        throws OptionalDataException,
                               ClassNotFoundException,
                               IOException
Read an object from the ObjectInputStream. The class of the object, the signature of the class, and the values of the non-transient and non-static fields of the class and all of its supertypes are read. Default deserializing for a class can be overriden using the writeObject and readObject methods. Objects referenced by this object are read transitively so that a complete equivalent graph of objects is reconstructed by readObject.

The root object is completly restored when all of its fields and the objects it references are completely restored. At this point the object validation callbacks are executed in order based on their registered priorities. The callbacks are registered by objects (in the readObject special methods) as they are individually restored. Exceptions are thrown for problems with the InputStream and for classes that should not be deserialized. All exceptions are fatal to the InputStream and leave it in an indeterminate state; it is up to the caller to ignore or recover the stream state.

Specified by:
readObject in interface ObjectInput
Throws:
ClassNotFoundException - Class of a serialized object cannot be found.
InvalidClassException - Something is wrong with a class used by serialization.
StreamCorruptedException - Control information in the stream is inconsistent.
OptionalDataException - Primitive data was found in the stream instead of objects.
IOException - Any of the usual Input/Output related exceptions.

readObjectOverride

protected Object readObjectOverride()
                             throws OptionalDataException,
                                    ClassNotFoundException,
                                    IOException
This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor. The subclass is expected to provide an override method with the modifier "final".
Returns:
the Object read from the stream.
Throws:
ClassNotFoundException - Class definition of a serialized object cannot be found.
OptionalDataException - Primitive data was found in the stream instead of objects.
IOException - if I/O errors occurred while reading from the underlying stream
Since:
1.2
See Also:
ObjectInputStream(), readObject()

defaultReadObject

public void defaultReadObject()
                       throws IOException,
                              ClassNotFoundException,
                              NotActiveException
Read the non-static and non-transient fields of the current class from this stream. This may only be called from the readObject method of the class being deserialized. It will throw the NotActiveException if it is called otherwise.
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.
NotActiveException - if the stream is not currently reading objects.

readFields

public ObjectInputStream.GetField readFields()
                                      throws IOException,
                                             ClassNotFoundException,
                                             NotActiveException
Reads the persistent fields from the stream and makes them available by name.
Returns:
the GetField object representing the persistent fields of the object being deserialized
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.
NotActiveException - if the stream is not currently reading objects.
Since:
1.2

registerValidation

public void registerValidation(ObjectInputValidation obj,
                               int prio)
                        throws NotActiveException,
                               InvalidObjectException
Register an object to be validated before the graph is returned. While similar to resolveObject these validations are called after the entire graph has been reconstituted. Typically, a readObject method will register the object with the stream so that when all of the objects are restored a final set of validations can be performed.
Parameters:
obj - the object to receive the validation callback.
prio - controls the order of callbacks;zero is a good default. Use higher numbers to be called back earlier, lower numbers for later callbacks. Within a priority, callbacks are processed in no particular order.
Throws:
NotActiveException - The stream is not currently reading objects so it is invalid to register a callback.
InvalidObjectException - The validation object is null.

resolveClass

protected Class resolveClass(ObjectStreamClass v)
                      throws IOException,
                             ClassNotFoundException
Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in ObjectOutputStream is annotateClass. This method will be invoked only once for each unique class in the stream. This method can be implemented by subclasses to use an alternate loading mechanism but must return a Class object. Once returned, the serialVersionUID of the class is compared to the serialVersionUID of the serialized class. If there is a mismatch, the deserialization fails and an exception is raised.

By default the class name is resolved relative to the class that called readObject.

Parameters:
v - an instance of class ObjectStreamClass
Returns:
a Class object corresponding to v
Throws:
IOException - Any of the usual Input/Output exceptions.
ClassNotFoundException - If class of a serialized object cannot be found.

resolveProxyClass

protected Class resolveProxyClass(String[] interfaces)
                           throws IOException,
                                  ClassNotFoundException
Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.

This method is called exactly once for each unique proxy class descriptor in the stream.

The corresponding method in ObjectOutputStream is annotateProxyClass. For a given subclass of ObjectInputStream that overrides this method, the annotateProxyClass method in the corresponding subclass of ObjectOutputStream must write any data or objects read by this method.

The default implementation of this method in ObjectInputStream returns the result of calling Proxy.getProxyClass with the list of Class objects for the interfaces that are named in the interfaces parameter. The Class object for each interface name i is the value returned by calling

     Class.forName(i, false, loader)
where loader is that of the first non-null class loader up the execution stack, or null if no non-null class loaders are on the stack (the same class loader choice used by the resolveClass method). This same value of loader is also the class loader passed to Proxy.getProxyClass. If Proxy.getProxyClass throws an IllegalArgumentException, resolveProxyClass will throw a ClassNotFoundException containing the IllegalArgumentException.
Parameters:
interfaces - the list of interface names that were deserialized in the proxy class descriptor
Returns:
a proxy class for the specified interfaces
Throws:
IOException - any exception thrown by the underlying InputStream
ClassNotFoundException - if the proxy class or any of the named interfaces could not be found
Since:
1.3
See Also:
ObjectOutputStream.annotateProxyClass(Class)

resolveObject

protected Object resolveObject(Object obj)
                        throws IOException
This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization. Replacing objects is disabled until enableResolveObject is called. The enableResolveObject method checks that the stream requesting to resolve object can be trusted. Every reference to serializable objects is passed to resolveObject. To insure that the private state of objects is not unintentionally exposed only trusted streams may use resolveObject.

This method is called after an object has been read but before it is returned from readObject. The default resolveObject method just returns the same object.

When a subclass is replacing objects it must insure that the substituted object is compatible with every field where the reference will be stored. Objects whose type is not a subclass of the type of the field or array element abort the serialization by raising an exception and the object is not be stored.

This method is called only once when each object is first encountered. All subsequent references to the object will be redirected to the new object.

Parameters:
obj - object to be substituted
Returns:
the substituted object
Throws:
IOException - Any of the usual Input/Output exceptions.

enableResolveObject

protected boolean enableResolveObject(boolean enable)
                               throws SecurityException
Enable the stream to allow objects read from the stream to be replaced. When enabled, the resolveObject method is called for every object being deserialized. If enable is true, and there is a security manager installed, this method first calls the security manager's checkPermission method with the SerializablePermission("enableSubstitution") permission to ensure it's ok to enable the stream to allow objects read from the stream to be replaced.
Parameters:
enable - true for enabling use of resolveObject for every object being deserialized
Returns:
the previous setting before this method was invoked
Throws:
SecurityException - if a security manager exists and its checkPermission method denies enabling the stream to allow objects read from the stream to be replaced.
See Also:
SecurityManager.checkPermission(java.security.Permission), SerializablePermission

readStreamHeader

protected void readStreamHeader()
                         throws IOException,
                                StreamCorruptedException
The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers. It reads and verifies the magic number and version number.
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
StreamCorruptedException - if control information in the stream is inconsistent

readClassDescriptor

protected ObjectStreamClass readClassDescriptor()
                                         throws IOException,
                                                ClassNotFoundException
Read a class descriptor from the serialization stream. This method is called when the ObjectInputStream expects a class descriptor as the next item in the serialization stream. Subclasses of ObjectInputStream may override this method to read in class descriptors that have been written in non-standard formats (by subclasses of ObjectOutputStream which have overridden the writeClassDescriptor method). By default, this method reads class descriptors according to the format defined in the Object Serialization specification.

Returns:
the class descriptor read
Throws:
IOException - If an I/O error has occurred.
ClassNotFoundException - If the Class of a serialized object used in the class descriptor representation cannot be found
Since:
1.3
See Also:
ObjectOutputStream.writeClassDescriptor(java.io.ObjectStreamClass)

read

public int read()
         throws IOException
Reads a byte of data. This method will block if no input is available.
Specified by:
read in interface ObjectInput
Overrides:
read in class InputStream
Returns:
the byte read, or -1 if the end of the stream is reached.
Throws:
IOException - If an I/O error has occurred.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads into an array of bytes. This method will block until some input is available. Consider using java.io.DataInputStream.readFully to read exactly 'length' bytes.
Specified by:
read in interface ObjectInput
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, -1 is returned when the end of the stream is reached.
Throws:
IOException - If an I/O error has occurred.
See Also:
DataInputStream.readFully(byte[],int,int)

available

public int available()
              throws IOException
Returns the number of bytes that can be read without blocking.
Specified by:
available in interface ObjectInput
Overrides:
available in class InputStream
Returns:
the number of available bytes.
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream

close

public void close()
           throws IOException
Closes the input stream. Must be called to release any resources associated with the stream.
Specified by:
close in interface ObjectInput
Overrides:
close in class InputStream
Throws:
IOException - If an I/O error has occurred.

readBoolean

public boolean readBoolean()
                    throws IOException
Reads in a boolean.
Specified by:
readBoolean in interface DataInput
Returns:
the boolean read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readByte

public byte readByte()
              throws IOException
Reads an 8 bit byte.
Specified by:
readByte in interface DataInput
Returns:
the 8 bit byte read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Reads an unsigned 8 bit byte.
Specified by:
readUnsignedByte in interface DataInput
Returns:
the 8 bit byte read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readShort

public short readShort()
                throws IOException
Reads a 16 bit short.
Specified by:
readShort in interface DataInput
Returns:
the 16 bit short read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Reads an unsigned 16 bit short.
Specified by:
readUnsignedShort in interface DataInput
Returns:
the 16 bit short read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readChar

public char readChar()
              throws IOException
Reads a 16 bit char.
Specified by:
readChar in interface DataInput
Returns:
the 16 bit char read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readInt

public int readInt()
            throws IOException
Reads a 32 bit int.
Specified by:
readInt in interface DataInput
Returns:
the 32 bit integer read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readLong

public long readLong()
              throws IOException
Reads a 64 bit long.
Specified by:
readLong in interface DataInput
Returns:
the read 64 bit long.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readFloat

public float readFloat()
                throws IOException
Reads a 32 bit float.
Specified by:
readFloat in interface DataInput
Returns:
the 32 bit float read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readDouble

public double readDouble()
                  throws IOException
Reads a 64 bit double.
Specified by:
readDouble in interface DataInput
Returns:
the 64 bit double read.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readFully

public void readFully(byte[] data)
               throws IOException
Reads bytes, blocking until all bytes are read.
Specified by:
readFully in interface DataInput
Parameters:
data - the buffer into which the data is read
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readFully

public void readFully(byte[] data,
                      int offset,
                      int size)
               throws IOException
Reads bytes, blocking until all bytes are read.
Specified by:
readFully in interface DataInput
Parameters:
data - the buffer into which the data is read
offset - the start offset of the data
size - the maximum number of bytes to read
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

skipBytes

public int skipBytes(int len)
              throws IOException
Skips bytes, block until all bytes are skipped.
Specified by:
skipBytes in interface DataInput
Parameters:
len - the number of bytes to be skipped
Returns:
the actual number of bytes skipped.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

readLine

public String readLine()
                throws IOException
Deprecated. This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.

Reads in a line that has been terminated by a \n, \r, \r\n or EOF.
Specified by:
readLine in interface DataInput
Returns:
a String copy of the line.
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream

readUTF

public String readUTF()
               throws IOException
Reads a UTF format String.
Specified by:
readUTF in interface DataInput
Returns:
the String.
Throws:
IOException - if there are I/O errors while reading from the underlying InputStream
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectInputValidation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface ObjectInputValidation

public interface ObjectInputValidation

Callback interface to allow validation of objects within a graph. Allows an object to be called when a complete graph of objects has been deserialized.

Since:
JDK1.1
See Also:
ObjectInputStream, ObjectInputStream.registerValidation(java.io.ObjectInputValidation, int)

Method Summary
 void validateObject()
Validates the object.

Method Detail

validateObject

public void validateObject()
                    throws InvalidObjectException
Validates the object.
Throws:
InvalidObjectException - If the object cannot validate itself.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface ObjectOutput

All Superinterfaces:
DataOutput
All Known Implementing Classes:
ObjectOutputStream
public interface ObjectOutput
extends DataOutput

ObjectOutput extends the DataOutput interface to include writing of objects. DataOutput includes methods for output of primitive types, ObjectOutput extends that interface to include objects, arrays, and Strings.

Since:
JDK1.1
See Also:
InputStream, ObjectOutputStream, ObjectInputStream

Method Summary
void | close() Closes the stream.
void | flush() Flushes the stream.
void | write(byte[] b) Writes an array of bytes.
void | write(byte[] b, int off, int len) Writes a sub array of bytes.
void | write(int b) Writes a byte.
void | writeObject(Object obj) Write an object to the underlying storage or stream.
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF

Method Detail

writeObject

public void writeObject(Object obj)
                 throws IOException
Write an object to the underlying storage or stream. The class that implements this interface defines how the object is written.
Parameters:
obj - the object to be written
Throws:
IOException - Any of the usual Input/Output related exceptions.

write

public void write(int b)
           throws IOException
Writes a byte. This method will block until the byte is actually written.
Specified by:
write in interface DataOutput
Parameters:
b - the byte
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b)
           throws IOException
Writes an array of bytes. This method will block until the bytes are actually written.
Specified by:
write in interface DataOutput
Parameters:
b - the data to be written
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes a sub array of bytes.
Specified by:
write in interface DataOutput
Parameters:
b - the data to be written
off - the start offset in the data
len - the number of bytes that are written
Throws:
IOException - If an I/O error has occurred.

flush

public void flush()
           throws IOException
Flushes the stream. This will write any buffered output bytes.
Throws:
IOException - If an I/O error has occurred.

close

public void close()
           throws IOException
Closes the stream. This method must be called to release any resources associated with the stream.
Throws:
IOException - If an I/O error has occurred.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.ObjectOutputStream
All Implemented Interfaces:
DataOutput, ObjectOutput, ObjectStreamConstants
public class ObjectOutputStream
extends OutputStream
implements ObjectOutput, ObjectStreamConstants

An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream. The objects can be read (reconstituted) using an ObjectInputStream. Persistent storage of objects can be accomplished by using a file for the stream. If the stream is a network socket stream, the objects can be reconsituted on another host or in another process.

Only objects that support the java.io.Serializable interface can be written to streams. The class of each serializable object is encoded including the class name and signature of the class, the values of the object's fields and arrays, and the closure of any other objects referenced from the initial objects.

The method writeObject is used to write an object to the stream. Any object, including Strings and arrays, is written with writeObject. Multiple objects or primitives can be written to the stream. The objects must be read back from the corresponding ObjectInputstream with the same types and in the same order as they were written.

Primitive data types can also be written to the stream using the appropriate methods from DataOutput. Strings can also be written using the writeUTF method.

The default serialization mechanism for an object writes the class of the object, the class signature, and the values of all non-transient and non-static fields. References to other objects (except in transient or static fields) cause those objects to be written also. Multiple references to a single object are encoded using a reference sharing mechanism so that graphs of objects can be restored to the same shape as when the original was written.

For example to write an object that can be read by the example in ObjectInputStream:

    FileOutputStream ostream = new FileOutputStream("t.tmp");
    ObjectOutputStream p = new ObjectOutputStream(ostream);

    p.writeInt(12345);
    p.writeObject("Today");
    p.writeObject(new Date());

    p.flush();
    ostream.close();
Classes that require special handling during the serialization and deserialization process must implement special methods with these exact signatures:

 private void readObject(java.io.ObjectInputStream stream)
     throws IOException, ClassNotFoundException;
 private void writeObject(java.io.ObjectOutputStream stream)
     throws IOException

The writeObject method is responsible for writing the state of the object for its particular class so that the corresponding readObject method can restore it. The method does not need to concern itself with the state belonging to the object's superclasses or subclasses. State is saved by writing the individual fields to the ObjectOutputStream using the writeObject method or by using the methods for primitive data types supported by DataOutput.

Serialization does not write out the fields of any object that does not implement the java.io.Serializable interface. Subclasses of Objects that are not serializable can be serializable. In this case the non-serializable class must have a no-arg constructor to allow its fields to be initialized. In this case it is the responsibility of the subclass to save and restore the state of the non-serializable class. It is frequently the case that the fields of that class are accessible (public, package, or protected) or that there are get and set methods that can be used to restore the state.

Serialization of an object can be prevented by implementing writeObject and readObject methods that throw the NotSerializableException. The exception will be caught by the ObjectOutputStream and abort the serialization process. Implementing the Externalizable interface allows the object to assume complete control over the contents and format of the object's serialized form. The methods of the Externalizable interface, writeExternal and readExternal, are called to save and restore the objects state. When implemented by a class they can write and read their own state using all of the methods of ObjectOutput and ObjectInput. It is the responsibility of the objects to handle any versioning that occurs. Primitive data, excluding serializable fields and externalizable data, is written to the ObjectOutputStream in block-data records. A block data record is composed of a header and data. The block data header consists of a marker and the number of bytes to follow the header. Consecutive primitive data writes are merged into one block-data record. (*) The blocking factor used for a block-data record will be 1024 bytes. (*) Each block-data record will be filled up to 1024 bytes, or be written whenever there is a termination of block-data mode. Calls to the ObjectOutputStream methods writeObject, defaultWriteObject and writeFields initially terminate any existing block-data record.

Since:
JDK1.1
See Also:
DataOutput, ObjectInputStream, Serializable, Externalizable, Object Serialization Specification, Section 2, Object Output Classes

Inner Class Summary
static class ObjectOutputStream.PutField
Provide programatic access to the persistent fields to be written to ObjectOutput.
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Constructor Summary
protected | ObjectOutputStream() Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.
 | ObjectOutputStream(OutputStream out) Creates an ObjectOutputStream that writes to the specified OutputStream.
Method Summary
protected void | annotateClass(Class cl) Subclasses may implement this method to allow class data to be stored in the stream.
protected void | annotateProxyClass(Class cl) Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.
void | close() Closes the stream.
void | defaultWriteObject() Write the non-static and non-transient fields of the current class to this stream.
protected void | drain() Drain any buffered data in ObjectOutputStream.
protected boolean | enableReplaceObject(boolean enable) Enable the stream to do replacement of objects in the stream.
void | flush() Flushes the stream.
ObjectOutputStream.PutField | putFields() Retrieve the object used to buffer persistent fields to be written to the stream.
protected Object | replaceObject(Object obj) This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization.
void | reset() Reset will disregard the state of any objects already written to the stream.
void | useProtocolVersion(int version) Specify stream protocol version to use when writing the stream.
void | write(byte[] b) Writes an array of bytes.
void | write(byte[] b, int off, int len) Writes a sub array of bytes.
void | write(int data) Writes a byte.
void | writeBoolean(boolean data) Writes a boolean.
void | writeByte(int data) Writes an 8 bit byte.
void | writeBytes(String data) Writes a String as a sequence of bytes.
void | writeChar(int data) Writes a 16 bit char.
void | writeChars(String data) Writes a String as a sequence of chars.
protected void | writeClassDescriptor(ObjectStreamClass classdesc) Write the specified class descriptor to the ObjectOutputStream.
void | writeDouble(double data) Writes a 64 bit double.
void | writeFields() Write the buffered fields to the stream.
void | writeFloat(float data) Writes a 32 bit float.
void | writeInt(int data) Writes a 32 bit int.
void | writeLong(long data) Writes a 64 bit long.
void | writeObject(Object obj) Write the specified object to the ObjectOutputStream.
protected void | writeObjectOverride(Object obj) Method used by subclasses to override the default writeObject method.
void | writeShort(int data) Writes a 16 bit short.
protected void | writeStreamHeader() The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream.
void | writeUTF(String s) Primitive data write of this String in UTF format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ObjectOutputStream

public ObjectOutputStream(OutputStream out)
                   throws IOException
Creates an ObjectOutputStream that writes to the specified OutputStream. The stream header is written to the stream. The caller may want to call flush immediately so that the corresponding ObjectInputStream can read the header immediately.
Parameters:
out - OutputStream to read from
Throws:
IOException - Any exception thrown by the underlying OutputStream.

ObjectOutputStream

protected ObjectOutputStream()
                      throws IOException,
                             SecurityException
Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.

If there is a security manager installed, this method first calls the security manager's checkPermission method with a SerializablePermission("enableSubclassImplementation") permission to ensure it's ok to enable subclassing.

Throws:
IOException - Thrown if not called by a subclass.
SecurityException - if a security manager exists and its checkPermission method denies enabling subclassing.
See Also:
SecurityManager.checkPermission(java.security.Permission), SerializablePermission
Method Detail

writeObjectOverride

protected void writeObjectOverride(Object obj)
                            throws IOException
Method used by subclasses to override the default writeObject method. This method is called by trusted subclasses of ObjectInputStream that constructed ObjectInputStream using the protected no-arg constructor. The subclass is expected to provide an override method with the modifier "final".
Parameters:
obj - object to be written to the underlying stream
Throws:
IOException - if there are I/O errors while writing to the underlying stream
Since:
1.2
See Also:
ObjectOutputStream(), writeObject(Object)

useProtocolVersion

public void useProtocolVersion(int version)
                        throws IOException
Specify stream protocol version to use when writing the stream.

This routine provides a hook to enable the current version of Serialization to write in a format that is backwards compatible to a previous version of the stream format.

Every effort will be made to avoid introducing additional backwards incompatibilities; however, sometimes there is no other alternative.

Parameters:
version - use ProtocolVersion from java.io.ObjectStreamConstants.
Throws:
IllegalStateException - Thrown if called after any objects have been serialized.
IllegalArgumentException - if invalid version is passed in.
IOException - if I/O errors occur
Since:
1.2
See Also:
ObjectStreamConstants.PROTOCOL_VERSION_1, ObjectStreamConstants.PROTOCOL_VERSION_2

writeObject

public final void writeObject(Object obj)
                       throws IOException
Write the specified object to the ObjectOutputStream. The class of the object, the signature of the class, and the values of the non-transient and non-static fields of the class and all of its supertypes are written. Default serialization for a class can be overridden using the writeObject and the readObject methods. Objects referenced by this object are written transitively so that a complete equivalent graph of objects can be reconstructed by an ObjectInputStream.

Exceptions are thrown for problems with the OutputStream and for classes that should not be serialized. All exceptions are fatal to the OutputStream, which is left in an indeterminate state, and it is up to the caller to ignore or recover the stream state.

Specified by:
writeObject in interface ObjectOutput
Throws:
InvalidClassException - Something is wrong with a class used by serialization.
NotSerializableException - Some object to be serialized does not implement the java.io.Serializable interface.
IOException - Any exception thrown by the underlying OutputStream.

defaultWriteObject

public void defaultWriteObject()
                        throws IOException
Write the non-static and non-transient fields of the current class to this stream. This may only be called from the writeObject method of the class being serialized. It will throw the NotActiveException if it is called otherwise.
Throws:
IOException - if I/O errors occur while writing to the underlying OutputStream

putFields

public ObjectOutputStream.PutField putFields()
                                      throws IOException
Retrieve the object used to buffer persistent fields to be written to the stream. The fields will be written to the stream when writeFields method is called.
Returns:
an instance of the class Putfield that holds the serializable fields
Throws:
IOException - if I/O errors occur
Since:
1.2

writeFields

public void writeFields()
                 throws IOException
Write the buffered fields to the stream.
Throws:
IOException - if I/O errors occur while writing to the underlying stream
NotActiveException - Called when a classes writeObject method was not called to write the state of the object.
Since:
1.2

reset

public void reset()
           throws IOException
Reset will disregard the state of any objects already written to the stream. The state is reset to be the same as a new ObjectOutputStream. The current point in the stream is marked as reset so the corresponding ObjectInputStream will be reset at the same point. Objects previously written to the stream will not be refered to as already being in the stream. They will be written to the stream again.
Throws:
IOException - if reset() is invoked while serializing an object.

annotateClass

protected void annotateClass(Class cl)
                      throws IOException
Subclasses may implement this method to allow class data to be stored in the stream. By default this method does nothing. The corresponding method in ObjectInputStream is resolveClass. This method is called exactly once for each unique class in the stream. The class name and signature will have already been written to the stream. This method may make free use of the ObjectOutputStream to save any representation of the class it deems suitable (for example, the bytes of the class file). The resolveClass method in the corresponding subclass of ObjectInputStream must read and use any data or objects written by annotateClass.
Parameters:
cl - the class to annotate custom data for
Throws:
IOException - Any exception thrown by the underlying OutputStream.

annotateProxyClass

protected void annotateProxyClass(Class cl)
                           throws IOException
Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.

This method is called exactly once for each unique proxy class descriptor in the stream. The default implementation of this method in ObjectOutputStream does nothing.

The corresponding method in ObjectInputStream is resolveProxyClass. For a given subclass of ObjectOutputStream that overrides this method, the resolveProxyClass method in the corresponding subclass of ObjectInputStream must read any data or objects writtem by annotateProxyClass.

Parameters:
cl - the proxy class to annotate custom data for
Throws:
IOException - any exception thrown by the underlying OutputStream
Since:
1.3
See Also:
ObjectInputStream.resolveProxyClass(String[])

replaceObject

protected Object replaceObject(Object obj)
                        throws IOException
This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization. Replacing objects is disabled until enableReplaceObject is called. The enableReplaceObject method checks that the stream requesting to do replacment can be trusted. The first occurrence of each object written into the serialization stream is passed to replaceObject. Subsequent references to the object are replaced by the object returned by the original call to replaceObject. To ensure that the private state of objects is not unintentionally exposed, only trusted streams may use replaceObject.

The ObjectOutputStream.writeObject method takes a parameter of type Object (as opposed to type Serializable) to allow for cases where non-serializable objects are replaced by serializable ones. When a subclass is replacing objects it must insure that either a complementary substitution must be made during deserialization or that the substituted object is compatible with every field where the reference will be stored. Objects whose type is not a subclass of the type of the field or array element abort the serialization by raising an exception and the object is not be stored.

This method is called only once when each object is first encountered. All subsequent references to the object will be redirected to the new object. This method should return the object to be substituted or the original object.

Null can be returned as the object to be substituted, but may cause NullReferenceException in classes that contain references to the original object since they may be expecting an object instead of null.

Parameters:
obj - the object to be replaced
Returns:
the alternate object that replaced the specified one
Throws:
IOException - Any exception thrown by the underlying OutputStream.

enableReplaceObject

protected boolean enableReplaceObject(boolean enable)
                               throws SecurityException
Enable the stream to do replacement of objects in the stream.

When enabled, the replaceObject method is called for every object being serialized.

If enable is true, and there is a security manager installed, this method first calls the security manager's checkPermission method with a SerializablePermission("enableSubstitution") permission to ensure it's ok to enable the stream to do replacement of objects in the stream.

Parameters:
enable - boolean parameter to enable replacement of objects
Returns:
the previous setting before this method was invoked
Throws:
SecurityException - if a security manager exists and its checkPermission method denies enabling the stream to do replacement of objects in the stream.
See Also:
SecurityManager.checkPermission(java.security.Permission), SerializablePermission

writeStreamHeader

protected void writeStreamHeader()
                          throws IOException
The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream. It writes the magic number and version to the stream.
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeClassDescriptor

protected void writeClassDescriptor(ObjectStreamClass classdesc)
                             throws IOException
Write the specified class descriptor to the ObjectOutputStream. Class descriptors are used to identify the classes of objects written to the stream. Subclasses of ObjectOutputStream may override this method to customize the way in which class descriptors are written to the serialization stream. The corresponding method in ObjectInputStream, readClassDescriptor, should then be overridden to reconstitute the class descriptor from its custom stream representation. By default, this method writes class descriptors according to the format defined in the Object Serialization specification.

Note that this method will only be called if the ObjectOutputStream is not using the old serialization stream format (set by calling ObjectOutputStream's useProtocolVersion method). If this serialization stream is using the old format (PROTOCOL_VERSION_1), the class descriptor will be written internally in a manner that cannot be overridden or customized.

Parameters:
classdesc - class descriptor to write to the stream
Throws:
IOException - If an I/O error has occurred.
Since:
1.3
See Also:
ObjectInputStream.readClassDescriptor(), useProtocolVersion(int), ObjectStreamConstants.PROTOCOL_VERSION_1

write

public void write(int data)
           throws IOException
Writes a byte. This method will block until the byte is actually written.
Specified by:
write in interface ObjectOutput
Overrides:
write in class OutputStream
Parameters:
data - the byte to be written to the stream
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b)
           throws IOException
Writes an array of bytes. This method will block until the bytes are actually written.
Specified by:
write in interface ObjectOutput
Overrides:
write in class OutputStream
Parameters:
b - the data to be written
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes a sub array of bytes.
Specified by:
write in interface ObjectOutput
Overrides:
write in class OutputStream
Parameters:
b - the data to be written
off - the start offset in the data
len - the number of bytes that are written
Throws:
IOException - If an I/O error has occurred.

flush

public void flush()
           throws IOException
Flushes the stream. This will write any buffered output bytes and flush through to the underlying stream.
Specified by:
flush in interface ObjectOutput
Overrides:
flush in class OutputStream
Throws:
IOException - If an I/O error has occurred.

drain

protected void drain()
              throws IOException
Drain any buffered data in ObjectOutputStream. Similar to flush but does not propagate the flush to the underlaying stream.
Throws:
IOException - if I/O errors occur while writing to the underlying stream

close

public void close()
           throws IOException
Closes the stream. This method must be called to release any resources associated with the stream.
Specified by:
close in interface ObjectOutput
Overrides:
close in class OutputStream
Throws:
IOException - If an I/O error has occurred.

writeBoolean

public void writeBoolean(boolean data)
                  throws IOException
Writes a boolean.
Specified by:
writeBoolean in interface DataOutput
Parameters:
data - the boolean to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeByte

public void writeByte(int data)
               throws IOException
Writes an 8 bit byte.
Specified by:
writeByte in interface DataOutput
Parameters:
data - the byte value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeShort

public void writeShort(int data)
                throws IOException
Writes a 16 bit short.
Specified by:
writeShort in interface DataOutput
Parameters:
data - the short value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeChar

public void writeChar(int data)
               throws IOException
Writes a 16 bit char.
Specified by:
writeChar in interface DataOutput
Parameters:
data - the char value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeInt

public void writeInt(int data)
              throws IOException
Writes a 32 bit int.
Specified by:
writeInt in interface DataOutput
Parameters:
data - the integer value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeLong

public void writeLong(long data)
               throws IOException
Writes a 64 bit long.
Specified by:
writeLong in interface DataOutput
Parameters:
data - the long value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeFloat

public void writeFloat(float data)
                throws IOException
Writes a 32 bit float.
Specified by:
writeFloat in interface DataOutput
Parameters:
data - the float value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeDouble

public void writeDouble(double data)
                 throws IOException
Writes a 64 bit double.
Specified by:
writeDouble in interface DataOutput
Parameters:
data - the double value to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeBytes

public void writeBytes(String data)
                throws IOException
Writes a String as a sequence of bytes.
Specified by:
writeBytes in interface DataOutput
Parameters:
data - the String of bytes to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeChars

public void writeChars(String data)
                throws IOException
Writes a String as a sequence of chars.
Specified by:
writeChars in interface DataOutput
Parameters:
data - the String of chars to be written
Throws:
IOException - if I/O errors occur while writing to the underlying stream

writeUTF

public void writeUTF(String s)
              throws IOException
Primitive data write of this String in UTF format. Note that there is a significant difference between writing a String into the stream as primitive data or as an Object. A String instance written by writeObject is written into the stream as a String initially. Future writeObject() calls write references to the string into the stream.
Specified by:
writeUTF in interface DataOutput
Parameters:
s - the String in UTF format
Throws:
IOException - if I/O errors occur while writing to the underlying stream
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectStreamClass

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectStreamClass

java.lang.Object
  |
  +--java.io.ObjectStreamClass
All Implemented Interfaces:
Serializable
public class ObjectStreamClass
extends Object
implements Serializable

Serialization's descriptor for classes. It contains the name and serialVersionUID of the class.
The ObjectStreamClass for a specific class loaded in this Java VM can be found/created using the lookup method.

The algorithm to compute the SerialVersionUID is described in Object Serialization Specification, Section 4.4, Stream Unique Identifiers.

Since:
JDK1.1
See Also:
ObjectStreamField, Object Serialization Specification, Section 4, Class Descriptors, Serialized Form

Field Summary
static ObjectStreamField[] NO_FIELDS
Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields.
Method Summary
Class | forClass() Return the class in the local VM that this version is mapped to.
ObjectStreamField | getField(String name) Get the field of this class by name.
ObjectStreamField[] | getFields() Return an array of the fields of this serializable class.
String | getName() The name of the class described by this descriptor.
long | getSerialVersionUID() Return the serialVersionUID for this class.
static ObjectStreamClass | lookup(Class cl) Find the descriptor for a class that can be serialized.
String | toString() Return a string describing this ObjectStreamClass.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

NO_FIELDS

public static final ObjectStreamField[] NO_FIELDS
Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields.
Method Detail

lookup

public static ObjectStreamClass lookup(Class cl)
Find the descriptor for a class that can be serialized. Creates an ObjectStreamClass instance if one does not exist yet for class. Null is returned if the specified class does not implement java.io.Serializable or java.io.Externalizable.
Parameters:
cl - class for which to get the descriptor
Returns:
the class descriptor for the specified class

getName

public String getName()
The name of the class described by this descriptor.
Returns:
a String representing the fully qualified name of the class

getSerialVersionUID

public long getSerialVersionUID()
Return the serialVersionUID for this class. The serialVersionUID defines a set of classes all with the same name that have evolved from a common root class and agree to be serialized and deserialized using a common format. NonSerializable classes have a serialVersionUID of 0L.
Returns:
the SUID of the class described by this descriptor

forClass

public Class forClass()
Return the class in the local VM that this version is mapped to. Null is returned if there is no corresponding local class.
Returns:
the Class instance that this descriptor represents

getFields

public ObjectStreamField[] getFields()
Return an array of the fields of this serializable class.
Returns:
an array containing an element for each persistent field of this class. Returns an array of length zero if there are no fields.
Since:
1.2

getField

public ObjectStreamField getField(String name)
Get the field of this class by name.
Parameters:
name - the name of the data field to look for
Returns:
The ObjectStreamField object of the named field or null if there is no such named field.

toString

public String toString()
Return a string describing this ObjectStreamClass.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectStreamConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Interface ObjectStreamConstants

All Known Implementing Classes:
ObjectInputStream, ObjectOutputStream
public interface ObjectStreamConstants

Constants written into the Object Serialization Stream.

Since:
JDK 1.1

Field Summary
static int | baseWireHandle First wire handle to be assigned.
static int | PROTOCOL_VERSION_1 A Stream Protocol Version.
static int | PROTOCOL_VERSION_2 A Stream Protocol Version.
static byte | SC_BLOCK_DATA Bit mask for ObejctStreamClass flag.
static byte | SC_EXTERNALIZABLE Bit mask for ObjectStreamClass flag.
static byte | SC_SERIALIZABLE Bit mask for ObjectStreamClass flag.
static byte | SC_WRITE_METHOD Bit mask for ObjectStreamClass flag.
static short | STREAM_MAGIC Magic number that is written to the stream header.
static short | STREAM_VERSION Version number that is written to the stream header.
static SerializablePermission | SUBCLASS_IMPLEMENTATION_PERMISSION Enable overriding of readObject and writeObject.
static SerializablePermission | SUBSTITUTION_PERMISSION Enable substitution of one object for another during serialization/deserialization.
static byte | TC_ARRAY new Array.
static byte | TC_BASE First tag value.
static byte | TC_BLOCKDATA Block of optional data.
static byte | TC_BLOCKDATALONG long Block data.
static byte | TC_CLASS Reference to Class.
static byte | TC_CLASSDESC new Class Descriptor.
static byte | TC_ENDBLOCKDATA End of optional block data blocks for an object.
static byte | TC_EXCEPTION Exception during write.
static byte | TC_LONGSTRING Long string.
static byte | TC_MAX Last tag value.
static byte | TC_NULL Null object reference.
static byte | TC_OBJECT new Object.
static byte | TC_PROXYCLASSDESC new Proxy Class Descriptor.
static byte | TC_REFERENCE Reference to an object already written into the stream.
static byte | TC_RESET Reset stream context.
static byte | TC_STRING new String.

Field Detail

STREAM_MAGIC

public static final short STREAM_MAGIC
Magic number that is written to the stream header.

STREAM_VERSION

public static final short STREAM_VERSION
Version number that is written to the stream header.

TC_BASE

public static final byte TC_BASE
First tag value.

TC_NULL

public static final byte TC_NULL
Null object reference.

TC_REFERENCE

public static final byte TC_REFERENCE
Reference to an object already written into the stream.

TC_CLASSDESC

public static final byte TC_CLASSDESC
new Class Descriptor.

TC_OBJECT

public static final byte TC_OBJECT
new Object.

TC_STRING

public static final byte TC_STRING
new String.

TC_ARRAY

public static final byte TC_ARRAY
new Array.

TC_CLASS

public static final byte TC_CLASS
Reference to Class.

TC_BLOCKDATA

public static final byte TC_BLOCKDATA
Block of optional data. Byte following tag indicates number of bytes in this block data.

TC_ENDBLOCKDATA

public static final byte TC_ENDBLOCKDATA
End of optional block data blocks for an object.

TC_RESET

public static final byte TC_RESET
Reset stream context. All handles written into stream are reset.

TC_BLOCKDATALONG

public static final byte TC_BLOCKDATALONG
long Block data. The long following the tag indicates the number of bytes in this block data.

TC_EXCEPTION

public static final byte TC_EXCEPTION
Exception during write.

TC_LONGSTRING

public static final byte TC_LONGSTRING
Long string.

TC_PROXYCLASSDESC

public static final byte TC_PROXYCLASSDESC
new Proxy Class Descriptor.

TC_MAX

public static final byte TC_MAX
Last tag value.

baseWireHandle

public static final int baseWireHandle
First wire handle to be assigned.

SC_WRITE_METHOD

public static final byte SC_WRITE_METHOD
Bit mask for ObjectStreamClass flag. Indicates a Serializable class defines its own writeObject method.

SC_BLOCK_DATA

public static final byte SC_BLOCK_DATA
Bit mask for ObejctStreamClass flag. Indicates Externalizable data written in Block Data mode. Added for PROTOCOL_VERSION_2.
See Also:
PROTOCOL_VERSION_2
Since:
1.2

SC_SERIALIZABLE

public static final byte SC_SERIALIZABLE
Bit mask for ObjectStreamClass flag. Indicates class is Serializable.

SC_EXTERNALIZABLE

public static final byte SC_EXTERNALIZABLE
Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.

SUBSTITUTION_PERMISSION

public static final SerializablePermission SUBSTITUTION_PERMISSION
Enable substitution of one object for another during serialization/deserialization.
See Also:
ObjectOutputStream.enableReplaceObject(boolean), ObjectInputStream.enableResolveObject(boolean)
Since:
1.2

SUBCLASS_IMPLEMENTATION_PERMISSION

public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
Enable overriding of readObject and writeObject.
See Also:
ObjectOutputStream.writeObjectOverride(Object), ObjectInputStream.readObjectOverride()
Since:
1.2

PROTOCOL_VERSION_1

public static final int PROTOCOL_VERSION_1
A Stream Protocol Version.

All externalizable data is written in JDK 1.1 external data format after calling this method. This version is needed to write streams containing Externalizable data that can be read by pre-JDK 1.1.6 JVMs.

See Also:
ObjectOutputStream.useProtocolVersion(int)
Since:
1.2

PROTOCOL_VERSION_2

public static final int PROTOCOL_VERSION_2
A Stream Protocol Version.

This protocol is written by JVM 1.2. Externalizable data is written in block data mode and is terminated with TC_ENDBLOCKDATA. Externalizable classdescriptor flags has SC_BLOCK_DATA enabled. JVM 1.1.6 and greater can read this format change. Enables writing a nonSerializable class descriptor into the stream. The serialVersionUID of a nonSerializable class is set to 0L.

See Also:
ObjectOutputStream.useProtocolVersion(int), SC_BLOCK_DATA
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectStreamException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectStreamException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidClassException, InvalidObjectException, NotActiveException, NotSerializableException, OptionalDataException, StreamCorruptedException, WriteAbortedException
public abstract class ObjectStreamException
extends IOException

Superclass of all exceptions specific to Object Stream classes.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
protected | ObjectStreamException() Create an ObjectStreamException.
protected | ObjectStreamException(String classname) Create an ObjectStreamException with the specified argument.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectStreamException

protected ObjectStreamException(String classname)
Create an ObjectStreamException with the specified argument.
Parameters:
classname - the detailed message for the exception

ObjectStreamException

protected ObjectStreamException()
Create an ObjectStreamException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectStreamField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectStreamField

java.lang.Object
  |
  +--java.io.ObjectStreamField
All Implemented Interfaces:
Comparable
public class ObjectStreamField
extends Object
implements Comparable

A description of a Serializable field from a Serializable class. An array of ObjectStreamFields is used to declare the Serializable fields of a class.

Since:
1.2
See Also:
ObjectStreamClass

Constructor Summary
ObjectStreamField(String n, Class clazz)
Create a Serializable field with the specified type.
Method Summary
int | compareTo(Object o) Compare this field with another ObjectStreamField.
String | getName() Get the name of this field.
int | getOffset() Offset of field within instance data.
Class | getType() Get the type of the field.
char | getTypeCode() Returns character encoding of field type.
String | getTypeString() Return the JVM type signature.
boolean | isPrimitive() Return true if this field has a primitive type.
protected void | setOffset(int offset) Offset within instance data.
String | toString() Return a string that describes this field.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectStreamField

public ObjectStreamField(String n,
                         Class clazz)
Create a Serializable field with the specified type. This field should be documented with a serialField tag.
Parameters:
n - the name of the serializable field
clazz - the Class object of the serializable field
Method Detail

getName

public String getName()
Get the name of this field.
Returns:
a String representing the name of the serializable field

getType

public Class getType()
Get the type of the field.
Returns:
the Class object of the serializable field

getTypeCode

public char getTypeCode()
Returns character encoding of field type. The encoding is as follows:
 B            byte
 C            char
 D            double
 F            float
 I            int
 J            long
 L            class or interface
 S            short
 Z            boolean
 [            array
Returns:
the typecode of the serializable field

getTypeString

public String getTypeString()
Return the JVM type signature.
Returns:
null if this field has a primitive type.

getOffset

public int getOffset()
Offset of field within instance data.
Returns:
the offset of this field
See Also:
setOffset(int)

setOffset

protected void setOffset(int offset)
Offset within instance data.
Parameters:
offset - the offset of the field
See Also:
getOffset()

isPrimitive

public boolean isPrimitive()
Return true if this field has a primitive type.
Returns:
true if and only if this field corresponds to a primitive type

compareTo

public int compareTo(Object o)
Compare this field with another ObjectStreamField. Return -1 if this is smaller, 0 if equal, 1 if greater. Types that are primitives are "smaller" than object types. If equal, the field names are compared.
Specified by:
compareTo in interface Comparable
Following copied from interface: java.lang.Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.

toString

public String toString()
Return a string that describes this field.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OptionalDataException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class OptionalDataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.OptionalDataException
All Implemented Interfaces:
Serializable
public class OptionalDataException
extends ObjectStreamException

Unexpected data appeared in an ObjectInputStream trying to read an Object. Occurs when the stream contains primitive data instead of the object that is expected by readObject. The EOF flag in the exception is true indicating that no more primitive data is available. The count field contains the number of bytes available to read.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
boolean | eof True if there is no more data in the buffered part of the stream.
int | length The number of bytes of primitive data available to be read in the current buffer.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

length

public int length
The number of bytes of primitive data available to be read in the current buffer.

eof

public boolean eof
True if there is no more data in the buffered part of the stream.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class OutputStream

java.lang.Object
  |
  +--java.io.OutputStream
Direct Known Subclasses:
ByteArrayOutputStream, FileOutputStream, FilterOutputStream, ObjectOutputStream, OutputStream, PipedOutputStream
public abstract class OutputStream
extends Object

This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.

Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output.

Since:
JDK1.0
See Also:
BufferedOutputStream, ByteArrayOutputStream, DataOutputStream, FilterOutputStream, InputStream, write(int)

Constructor Summary
OutputStream()
Method Summary
void | close() Closes this output stream and releases any system resources associated with this stream.
void | flush() Flushes this output stream and forces any buffered output bytes to be written out.
void | write(byte[] b) Writes b.length bytes from the specified byte array to this output stream.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this output stream.
abstract void | write(int b) Writes the specified byte to this output stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OutputStream

public OutputStream()
Method Detail

write

public abstract void write(int b)
                    throws IOException
Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Subclasses of OutputStream must provide an implementation for this method.

Parameters:
b - the byte.
Throws:
IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.
See Also:
write(byte[], int, int)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.

The write method of OutputStream calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.

flush

public void flush()
           throws IOException
Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

The flush method of OutputStream does nothing.

Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.

The close method of OutputStream does nothing.

Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutputStreamWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class OutputStreamWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.OutputStreamWriter
Direct Known Subclasses:
FileWriter
public class OutputStreamWriter
extends Writer

An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.

Each invocation of a write() method causes the encoding converter to be invoked on the given character(s). The resulting bytes are accumulated in a buffer before being written to the underlying output stream. The size of this buffer may be specified, but by default it is large enough for most purposes. Note that the characters passed to the write() methods are not buffered.

For top efficiency, consider wrapping an OutputStreamWriter within a BufferedWriter so as to avoid frequent converter invocations. For example:

 Writer out
   = new BufferedWriter(new OutputStreamWriter(System.out));

Since:
JDK1.1
See Also:
BufferedWriter, OutputStream, Character encodings

Fields inherited from class java.io.Writer
lock
Constructor Summary
OutputStreamWriter(OutputStream out)
Create an OutputStreamWriter that uses the default character encoding.
OutputStreamWriter(OutputStream out, String enc)
Create an OutputStreamWriter that uses the named character encoding.
Method Summary
void | close() Close the stream.
void | flush() Flush the stream.
String | getEncoding() Returns the canonical name of the character encoding being used by this stream.
void | write(char[] cbuf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String str, int off, int len) Write a portion of a string.
Methods inherited from class java.io.Writer
write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OutputStreamWriter

public OutputStreamWriter(OutputStream out,
                          String enc)
                   throws UnsupportedEncodingException
Create an OutputStreamWriter that uses the named character encoding.
Parameters:
out - An OutputStream
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported

OutputStreamWriter

public OutputStreamWriter(OutputStream out)
Create an OutputStreamWriter that uses the default character encoding.
Parameters:
out - An OutputStream
Method Detail

getEncoding

public String getEncoding()
Returns the canonical name of the character encoding being used by this stream. If this OutputStreamWriter was created with the OutputStreamWriter(OutputStream, String) constructor then the returned encoding name, being canonical, may differ from the encoding name passed to the constructor. May return null if the stream has been closed.
Returns:
a String representing the encoding name, or possibly null if the stream has been closed
See Also:
Character encodings

write

public void write(int c)
           throws IOException
Write a single character.
Overrides:
write in class Writer
Throws:
IOException - If an I/O error occurs

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Write a portion of an array of characters.
Overrides:
write in class Writer
Parameters:
cbuf - Buffer of characters
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Write a portion of a string.
Overrides:
write in class Writer
Parameters:
str - A String
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

flush

public void flush()
           throws IOException
Flush the stream.
Overrides:
flush in class Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class Writer
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PipedInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PipedInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.PipedInputStream
public class PipedInputStream
extends InputStream

A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream. Typically, data is read from a PipedInputStream object by one thread and data is written to the corresponding PipedOutputStream by some other thread. Attempting to use both objects from a single thread is not recommended, as it may deadlock the thread. The piped input stream contains a buffer, decoupling read operations from write operations, within limits.

Since:
JDK1.0
See Also:
PipedOutputStream

Field Summary
protected byte[] | buffer The circular buffer into which incoming data is placed.
protected int | in The index of the position in the circular buffer at which the next byte of data will be stored when received from the connected piped output stream.
protected int | out The index of the position in the circular buffer at which the next byte of data will be read by this piped input stream.
protected static int | PIPE_SIZE The size of the pipe's circular input buffer.
Constructor Summary
PipedInputStream()
Creates a PipedInputStream so that it is not yet connected.
PipedInputStream(PipedOutputStream src)
Creates a PipedInputStream so that it is connected to the piped output stream src.
Method Summary
int | available() Returns the number of bytes that can be read from this input stream without blocking.
void | close() Closes this piped input stream and releases any system resources associated with the stream.
void | connect(PipedOutputStream src) Causes this piped input stream to be connected to the piped output stream src.
int | read() Reads the next byte of data from this piped input stream.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this piped input stream into an array of bytes.
protected void | receive(int b) Receives a byte of data.
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PIPE_SIZE

protected static final int PIPE_SIZE
The size of the pipe's circular input buffer.
Since:
JDK1.1

buffer

protected byte[] buffer
The circular buffer into which incoming data is placed.
Since:
JDK1.1

in

protected int in
The index of the position in the circular buffer at which the next byte of data will be stored when received from the connected piped output stream. in<0 implies the buffer is empty, in==out implies the buffer is full
Since:
JDK1.1

out

protected int out
The index of the position in the circular buffer at which the next byte of data will be read by this piped input stream.
Since:
JDK1.1
Constructor Detail

PipedInputStream

public PipedInputStream(PipedOutputStream src)
                 throws IOException
Creates a PipedInputStream so that it is connected to the piped output stream src. Data bytes written to src will then be available as input from this stream.
Parameters:
src - the stream to connect to.
Throws:
IOException - if an I/O error occurs.

PipedInputStream

public PipedInputStream()
Creates a PipedInputStream so that it is not yet connected. It must be connected to a PipedOutputStream before being used.
See Also:
connect(java.io.PipedOutputStream), PipedOutputStream.connect(java.io.PipedInputStream)
Method Detail

connect

public void connect(PipedOutputStream src)
             throws IOException
Causes this piped input stream to be connected to the piped output stream src. If this object is already connected to some other piped output stream, an IOException is thrown.

If src is an unconnected piped output stream and snk is an unconnected piped input stream, they may be connected by either the call:

snk.connect(src)

or the call:

src.connect(snk)

The two calls have the same effect.

Parameters:
src - The piped output stream to connect to.
Throws:
IOException - if an I/O error occurs.

receive

protected void receive(int b)
                throws IOException
Receives a byte of data. This method will block if no input is available.
Parameters:
b - the byte being received
Throws:
IOException - If the pipe is broken.
Since:
JDK1.1

read

public int read()
         throws IOException
Reads the next byte of data from this piped input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. If a thread was providing data bytes to the connected piped output stream, but the thread is no longer alive, then an IOException is thrown.
Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if the pipe is broken.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this piped input stream into an array of bytes. Less than len bytes will be read if the end of the data stream is reached. This method blocks until at least one byte of input is available. If a thread was providing data bytes to the connected piped output stream, but the thread is no longer alive, then an IOException is thrown.
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Returns the number of bytes that can be read from this input stream without blocking. This method overrides the available method of the parent class.
Overrides:
available in class InputStream
Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.0.2

close

public void close()
           throws IOException
Closes this piped input stream and releases any system resources associated with the stream.
Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PipedOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PipedOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.PipedOutputStream
public class PipedOutputStream
extends OutputStream

A piped output stream can be connected to a piped input stream to create a communications pipe. The piped output stream is the sending end of the pipe. Typically, data is written to a PipedOutputStream object by one thread and data is read from the connected PipedInputStream by some other thread. Attempting to use both objects from a single thread is not recommended as it may deadlock the thread.

Since:
JDK1.0
See Also:
PipedInputStream

Constructor Summary
PipedOutputStream()
Creates a piped output stream that is not yet connected to a piped input stream.
PipedOutputStream(PipedInputStream snk)
Creates a piped output stream connected to the specified piped input stream.
Method Summary
void | close() Closes this piped output stream and releases any system resources associated with this stream.
void | connect(PipedInputStream snk) Connects this piped output stream to a receiver.
void | flush() Flushes this output stream and forces any buffered output bytes to be written out.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this piped output stream.
void | write(int b) Writes the specified byte to the piped output stream.
Methods inherited from class java.io.OutputStream
write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PipedOutputStream

public PipedOutputStream(PipedInputStream snk)
                  throws IOException
Creates a piped output stream connected to the specified piped input stream. Data bytes written to this stream will then be available as input from snk.
Parameters:
snk - The piped input stream to connect to.
Throws:
IOException - if an I/O error occurs.

PipedOutputStream

public PipedOutputStream()
Creates a piped output stream that is not yet connected to a piped input stream. It must be connected to a piped input stream, either by the receiver or the sender, before being used.
See Also:
PipedInputStream.connect(java.io.PipedOutputStream), connect(java.io.PipedInputStream)
Method Detail

connect

public void connect(PipedInputStream snk)
             throws IOException
Connects this piped output stream to a receiver. If this object is already connected to some other piped input stream, an IOException is thrown.

If snk is an unconnected piped input stream and src is an unconnected piped output stream, they may be connected by either the call:

 src.connect(snk)
or the call:
 snk.connect(src)
The two calls have the same effect.
Parameters:
snk - the piped input stream to connect to.
Throws:
IOException - if an I/O error occurs.

write

public void write(int b)
           throws IOException
Writes the specified byte to the piped output stream. If a thread was reading data bytes from the connected piped input stream, but the thread is no longer alive, then an IOException is thrown.

Implements the write method of OutputStream.

Overrides:
write in class OutputStream
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this piped output stream. If a thread was reading data bytes from the connected piped input stream, but the thread is no longer alive, then an IOException is thrown.
Overrides:
write in class OutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.

flush

public void flush()
           throws IOException
Flushes this output stream and forces any buffered output bytes to be written out. This will notify any readers that bytes are waiting in the pipe.
Overrides:
flush in class OutputStream
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this piped output stream and releases any system resources associated with this stream. This stream may no longer be used for writing bytes.
Overrides:
close in class OutputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PipedReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PipedReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.PipedReader
public class PipedReader
extends Reader

Piped character-input streams.

Since:
JDK1.1

Fields inherited from class java.io.Reader
lock
Constructor Summary
PipedReader()
Creates a PipedReader so that it is not yet connected.
PipedReader(PipedWriter src)
Creates a PipedReader so that it is connected to the piped writer src.
Method Summary
void | close() Closes this piped stream and releases any system resources associated with the stream.
void | connect(PipedWriter src) Causes this piped reader to be connected to the piped writer src.
int | read() Reads the next character of data from this piped stream.
int | read(char[] cbuf, int off, int len) Reads up to len characters of data from this piped stream into an array of characters.
boolean | ready() Tell whether this stream is ready to be read.
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PipedReader

public PipedReader(PipedWriter src)
            throws IOException
Creates a PipedReader so that it is connected to the piped writer src. Data written to src will then be available as input from this stream.
Parameters:
src - the stream to connect to.
Throws:
IOException - if an I/O error occurs.

PipedReader

public PipedReader()
Creates a PipedReader so that it is not yet connected. It must be connected to a PipedWriter before being used.
See Also:
connect(java.io.PipedWriter), PipedWriter.connect(java.io.PipedReader)
Method Detail

connect

public void connect(PipedWriter src)
             throws IOException
Causes this piped reader to be connected to the piped writer src. If this object is already connected to some other piped writer, an IOException is thrown.

If src is an unconnected piped writer and snk is an unconnected piped reader, they may be connected by either the call:

snk.connect(src)

or the call:

src.connect(snk)

The two calls have the same effect.

Parameters:
src - The piped writer to connect to.
Throws:
IOException - if an I/O error occurs.

read

public int read()
         throws IOException
Reads the next character of data from this piped stream. If no character is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. If a thread was providing data characters to the connected piped writer, but the thread is no longer alive, then an IOException is thrown.
Overrides:
read in class Reader
Returns:
the next character of data, or -1 if the end of the stream is reached.
Throws:
IOException - if the pipe is broken.

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Reads up to len characters of data from this piped stream into an array of characters. Less than len characters will be read if the end of the data stream is reached. This method blocks until at least one character of input is available. If a thread was providing data characters to the connected piped output, but the thread is no longer alive, then an IOException is thrown.
Overrides:
read in class Reader
Parameters:
cbuf - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of characters read.
Returns:
the total number of characters read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read. A piped character stream is ready if the circular buffer is not empty.
Overrides:
ready in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Closes this piped stream and releases any system resources associated with the stream.
Overrides:
close in class Reader
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PipedWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PipedWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PipedWriter
public class PipedWriter
extends Writer

Piped character-output streams.

Since:
JDK1.1

Fields inherited from class java.io.Writer
lock
Constructor Summary
PipedWriter()
Creates a piped writer that is not yet connected to a piped reader.
PipedWriter(PipedReader snk)
Creates a piped writer connected to the specified piped reader.
Method Summary
void | close() Closes this piped output stream and releases any system resources associated with this stream.
void | connect(PipedReader snk) Connects this piped writer to a receiver.
void | flush() Flushes this output stream and forces any buffered output characters to be written out.
void | write(char[] cbuf, int off, int len) Writes len characters from the specified character array starting at offset off to this piped output stream.
void | write(int c) Writes the specified char to the piped output stream.
Methods inherited from class java.io.Writer
write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PipedWriter

public PipedWriter(PipedReader snk)
            throws IOException
Creates a piped writer connected to the specified piped reader. Data characters written to this stream will then be available as input from snk.
Parameters:
snk - The piped reader to connect to.
Throws:
IOException - if an I/O error occurs.

PipedWriter

public PipedWriter()
Creates a piped writer that is not yet connected to a piped reader. It must be connected to a piped reader, either by the receiver or the sender, before being used.
See Also:
PipedReader.connect(java.io.PipedWriter), connect(java.io.PipedReader)
Method Detail

connect

public void connect(PipedReader snk)
             throws IOException
Connects this piped writer to a receiver. If this object is already connected to some other piped reader, an IOException is thrown.

If snk is an unconnected piped reader and src is an unconnected piped writer, they may be connected by either the call:

 src.connect(snk)
or the call:
 snk.connect(src)
The two calls have the same effect.
Parameters:
snk - the piped reader to connect to.
Throws:
IOException - if an I/O error occurs.

write

public void write(int c)
           throws IOException
Writes the specified char to the piped output stream. If a thread was reading data characters from the connected piped input stream, but the thread is no longer alive, then an IOException is thrown.

Implements the write method of Writer.

Overrides:
write in class Writer
Parameters:
c - the char to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Writes len characters from the specified character array starting at offset off to this piped output stream. If a thread was reading data characters from the connected piped input stream, but the thread is no longer alive, then an IOException is thrown.
Overrides:
write in class Writer
Parameters:
cbuf - the data.
off - the start offset in the data.
len - the number of characters to write.
Throws:
IOException - if an I/O error occurs.

flush

public void flush()
           throws IOException
Flushes this output stream and forces any buffered output characters to be written out. This will notify any readers that characters are waiting in the pipe.
Overrides:
flush in class Writer
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this piped output stream and releases any system resources associated with this stream. This stream may no longer be used for writing characters.
Overrides:
close in class Writer
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrintStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PrintStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.PrintStream
Direct Known Subclasses:
LogStream
public class PrintStream
extends FilterOutputStream

A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently. Two other features are provided as well. Unlike other output streams, a PrintStream never throws an IOException; instead, exceptional situations merely set an internal flag that can be tested via the checkError method. Optionally, a PrintStream can be created so as to flush automatically; this means that the flush method is automatically invoked after a byte array is written, one of the println methods is invoked, or a newline character or byte ('\n') is written.

All characters printed by a PrintStream are converted into bytes using the platform's default character encoding. The PrintWriter class should be used in situations that require writing characters rather than bytes.

Since:
JDK1.0

Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
PrintStream(OutputStream out)
Create a new print stream.
PrintStream(OutputStream out, boolean autoFlush)
Create a new print stream.
Method Summary
boolean | checkError() Flush the stream and check its error state.
void | close() Close the stream.
void | flush() Flush the stream.
void | print(boolean b) Print a boolean value.
void | print(char c) Print a character.
void | print(char[] s) Print an array of characters.
void | print(double d) Print a double-precision floating-point number.
void | print(float f) Print a floating-point number.
void | print(int i) Print an integer.
void | print(long l) Print a long integer.
void | print(Object obj) Print an object.
void | print(String s) Print a string.
void | println() Terminate the current line by writing the line separator string.
void | println(boolean x) Print a boolean and then terminate the line.
void | println(char x) Print a character and then terminate the line.
void | println(char[] x) Print an array of characters and then terminate the line.
void | println(double x) Print a double and then terminate the line.
void | println(float x) Print a float and then terminate the line.
void | println(int x) Print an integer and then terminate the line.
void | println(long x) Print a long and then terminate the line.
void | println(Object x) Print an Object and then terminate the line.
void | println(String x) Print a String and then terminate the line.
protected void | setError() Set the error state of the stream to true.
void | write(byte[] buf, int off, int len) Write len bytes from the specified byte array starting at offset off to this stream.
void | write(int b) Write the specified byte to this stream.
Methods inherited from class java.io.FilterOutputStream
write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PrintStream

public PrintStream(OutputStream out)
Create a new print stream. This stream will not flush automatically.
Parameters:
out - The output stream to which values and objects will be printed
See Also:
PrintWriter.PrintWriter(java.io.OutputStream)

PrintStream

public PrintStream(OutputStream out,
                   boolean autoFlush)
Create a new print stream.
Parameters:
out - The output stream to which values and objects will be printed
autoFlush - A boolean; if true, the output buffer will be flushed whenever a byte array is written, one of the println methods is invoked, or a newline character or byte ('\n') is written
See Also:
PrintWriter.PrintWriter(java.io.OutputStream, boolean)
Method Detail

flush

public void flush()
Flush the stream. This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.
Overrides:
flush in class FilterOutputStream
See Also:
OutputStream.flush()

close

public void close()
Close the stream. This is done by flushing the stream and then closing the underlying output stream.
Overrides:
close in class FilterOutputStream
See Also:
OutputStream.close()

checkError

public boolean checkError()
Flush the stream and check its error state. The internal error state is set to true when the underlying output stream throws an IOException other than InterruptedIOException, and when the setError method is invoked. If an operation on the underlying output stream throws an InterruptedIOException, then the PrintStream converts the exception back into an interrupt by doing:
     Thread.currentThread().interrupt();
or the equivalent.
Returns:
True if and only if this stream has encountered an IOException other than InterruptedIOException, or the setError method has been invoked

setError

protected void setError()
Set the error state of the stream to true.
Since:
JDK1.1

write

public void write(int b)
Write the specified byte to this stream. If the byte is a newline and automatic flushing is enabled then the flush method will be invoked.

Note that the byte is written as given; to write a character that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.

Overrides:
write in class FilterOutputStream
Parameters:
b - The byte to be written
See Also:
print(char), println(char)

write

public void write(byte[] buf,
                  int off,
                  int len)
Write len bytes from the specified byte array starting at offset off to this stream. If automatic flushing is enabled then the flush method will be invoked.

Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.

Overrides:
write in class FilterOutputStream
Parameters:
buf - A byte array
off - Offset from which to start taking bytes
len - Number of bytes to write

print

public void print(boolean b)
Print a boolean value. The string produced by String.valueOf(boolean) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
b - The boolean to be printed

print

public void print(char c)
Print a character. The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
c - The char to be printed

print

public void print(int i)
Print an integer. The string produced by String.valueOf(int) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
i - The int to be printed
See Also:
Integer.toString(int)

print

public void print(long l)
Print a long integer. The string produced by String.valueOf(long) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
l - The long to be printed
See Also:
Long.toString(long)

print

public void print(float f)
Print a floating-point number. The string produced by String.valueOf(float) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
f - The float to be printed
See Also:
Float.toString(float)

print

public void print(double d)
Print a double-precision floating-point number. The string produced by String.valueOf(double) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
d - The double to be printed
See Also:
Double.toString(double)

print

public void print(char[] s)
Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
s - The array of chars to be printed
Throws:
NullPointerException - If s is null

print

public void print(String s)
Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
s - The String to be printed

print

public void print(Object obj)
Print an object. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
obj - The Object to be printed
See Also:
Object.toString()

println

public void println()
Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').

println

public void println(boolean x)
Print a boolean and then terminate the line. This method behaves as though it invokes print(boolean) and then println().
Parameters:
x - The boolean to be printed

println

public void println(char x)
Print a character and then terminate the line. This method behaves as though it invokes print(char) and then println().
Parameters:
x - The char to be printed.

println

public void println(int x)
Print an integer and then terminate the line. This method behaves as though it invokes print(int) and then println().
Parameters:
x - The int to be printed.

println

public void println(long x)
Print a long and then terminate the line. This method behaves as though it invokes print(long) and then println().
Parameters:
x - a The long to be printed.

println

public void println(float x)
Print a float and then terminate the line. This method behaves as though it invokes print(float) and then println().
Parameters:
x - The float to be printed.

println

public void println(double x)
Print a double and then terminate the line. This method behaves as though it invokes print(double) and then println().
Parameters:
x - The double to be printed.

println

public void println(char[] x)
Print an array of characters and then terminate the line. This method behaves as though it invokes print(char[]) and then println().
Parameters:
x - an array of chars to print.

println

public void println(String x)
Print a String and then terminate the line. This method behaves as though it invokes print(String) and then println().
Parameters:
x - The String to be printed.

println

public void println(Object x)
Print an Object and then terminate the line. This method behaves as though it invokes print(Object) and then println().
Parameters:
x - The Object to be printed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrintWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PrintWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
public class PrintWriter
extends Writer

Print formatted representations of objects to a text-output stream. This class implements all of the print methods found in PrintStream. It does not contain methods for writing raw bytes, for which a program should use unencoded byte streams.

Unlike the PrintStream class, if automatic flushing is enabled it will be done only when one of the println() methods is invoked, rather than whenever a newline character happens to be output. The println() methods use the platform's own notion of line separator rather than the newline character.

Methods in this class never throw I/O exceptions. The client may inquire as to whether any errors have occurred by invoking checkError().

Since:
JDK1.1

Field Summary
protected  Writer out
The underlying character-output stream of this PrintWriter.
Fields inherited from class java.io.Writer
lock
Constructor Summary
PrintWriter(OutputStream out)
Create a new PrintWriter, without automatic line flushing, from an existing OutputStream.
PrintWriter(OutputStream out, boolean autoFlush)
Create a new PrintWriter from an existing OutputStream.
PrintWriter(Writer out)
Create a new PrintWriter, without automatic line flushing.
PrintWriter(Writer out, boolean autoFlush)
Create a new PrintWriter.
Method Summary
boolean | checkError() Flush the stream and check its error state.
void | close() Close the stream.
void | flush() Flush the stream.
void | print(boolean b) Print a boolean value.
void | print(char c) Print a character.
void | print(char[] s) Print an array of characters.
void | print(double d) Print a double-precision floating-point number.
void | print(float f) Print a floating-point number.
void | print(int i) Print an integer.
void | print(long l) Print a long integer.
void | print(Object obj) Print an object.
void | print(String s) Print a string.
void | println() Terminate the current line by writing the line separator string.
void | println(boolean x) Print a boolean value and then terminate the line.
void | println(char x) Print a character and then terminate the line.
void | println(char[] x) Print an array of characters and then terminate the line.
void | println(double x) Print a double-precision floating-point number and then terminate the line.
void | println(float x) Print a floating-point number and then terminate the line.
void | println(int x) Print an integer and then terminate the line.
void | println(long x) Print a long integer and then terminate the line.
void | println(Object x) Print an Object and then terminate the line.
void | println(String x) Print a String and then terminate the line.
protected void | setError() Indicate that an error has occurred.
void | write(char[] buf) Write an array of characters.
void | write(char[] buf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String s) Write a string.
void | write(String s, int off, int len) Write a portion of a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected Writer out
The underlying character-output stream of this PrintWriter.
Since:
1.2
Constructor Detail

PrintWriter

public PrintWriter(Writer out)
Create a new PrintWriter, without automatic line flushing.
Parameters:
out - A character-output stream

PrintWriter

public PrintWriter(Writer out,
                   boolean autoFlush)
Create a new PrintWriter.
Parameters:
out - A character-output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer

PrintWriter

public PrintWriter(OutputStream out)
Create a new PrintWriter, without automatic line flushing, from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.
Parameters:
out - An output stream
See Also:
OutputStreamWriter.OutputStreamWriter(java.io.OutputStream)

PrintWriter

public PrintWriter(OutputStream out,
                   boolean autoFlush)
Create a new PrintWriter from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.
Parameters:
out - An output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer
See Also:
OutputStreamWriter.OutputStreamWriter(java.io.OutputStream)
Method Detail

flush

public void flush()
Flush the stream.
Overrides:
flush in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
Close the stream.
Overrides:
close in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs

checkError

public boolean checkError()
Flush the stream and check its error state. Errors are cumulative; once the stream encounters an error, this routine will return true on all successive calls.
Returns:
True if the print stream has encountered an error, either on the underlying output stream or during a format conversion.

setError

protected void setError()
Indicate that an error has occurred.

write

public void write(int c)
Write a single character.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
c - int specifying a character to be written.
Throws:
IOException - If an I/O error occurs

write

public void write(char[] buf,
                  int off,
                  int len)
Write a portion of an array of characters.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
cbuf - Array of characters
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

write

public void write(char[] buf)
Write an array of characters. This method cannot be inherited from the Writer class because it must suppress I/O exceptions.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
cbuf - Array of characters to be written
Throws:
IOException - If an I/O error occurs

write

public void write(String s,
                  int off,
                  int len)
Write a portion of a string.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
str - A String
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

write

public void write(String s)
Write a string. This method cannot be inherited from the Writer class because it must suppress I/O exceptions.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
str - String to be written
Throws:
IOException - If an I/O error occurs

print

public void print(boolean b)
Print a boolean value. The string produced by String.valueOf(boolean) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
b - The boolean to be printed

print

public void print(char c)
Print a character. The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
c - The char to be printed

print

public void print(int i)
Print an integer. The string produced by String.valueOf(int) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
i - The int to be printed
See Also:
Integer.toString(int)

print

public void print(long l)
Print a long integer. The string produced by String.valueOf(long) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
l - The long to be printed
See Also:
Long.toString(long)

print

public void print(float f)
Print a floating-point number. The string produced by String.valueOf(float) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
f - The float to be printed
See Also:
Float.toString(float)

print

public void print(double d)
Print a double-precision floating-point number. The string produced by String.valueOf(double) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
d - The double to be printed
See Also:
Double.toString(double)

print

public void print(char[] s)
Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
s - The array of chars to be printed
Throws:
NullPointerException - If s is null

print

public void print(String s)
Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
s - The String to be printed

print

public void print(Object obj)
Print an object. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
Parameters:
obj - The Object to be printed
See Also:
Object.toString()

println

public void println()
Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').

println

public void println(boolean x)
Print a boolean value and then terminate the line. This method behaves as though it invokes print(boolean) and then println().
Parameters:
x - the boolean value to be printed

println

public void println(char x)
Print a character and then terminate the line. This method behaves as though it invokes print(char) and then println().
Parameters:
x - the char value to be printed

println

public void println(int x)
Print an integer and then terminate the line. This method behaves as though it invokes print(int) and then println().
Parameters:
x - the int value to be printed

println

public void println(long x)
Print a long integer and then terminate the line. This method behaves as though it invokes print(long) and then println().
Parameters:
x - the long value to be printed

println

public void println(float x)
Print a floating-point number and then terminate the line. This method behaves as though it invokes print(float) and then println().
Parameters:
x - the float value to be printed

println

public void println(double x)
Print a double-precision floating-point number and then terminate the line. This method behaves as though it invokes print(double) and then println().
Parameters:
x - the double value to be printed

println

public void println(char[] x)
Print an array of characters and then terminate the line. This method behaves as though it invokes print(char[]) and then println().
Parameters:
x - the array of char values to be printed

println

public void println(String x)
Print a String and then terminate the line. This method behaves as though it invokes print(String) and then println().
Parameters:
x - the String value to be printed

println

public void println(Object x)
Print an Object and then terminate the line. This method behaves as though it invokes print(Object) and then println().
Parameters:
x - the Object value to be printed
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PushbackInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PushbackInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.io.PushbackInputStream
public class PushbackInputStream
extends FilterInputStream

A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte. This is useful in situations where it is convenient for a fragment of code to read an indefinite number of data bytes that are delimited by a particular byte value; after reading the terminating byte, the code fragment can "unread" it, so that the next read operation on the input stream will reread the byte that was pushed back. For example, bytes representing the characters constituting an identifier might be terminated by a byte representing an operator character; a method whose job is to read just an identifier can read until it sees the operator and then push the operator back to be re-read.

Since:
JDK1.0

Field Summary
protected byte[] | buf The pushback buffer.
protected int | pos The position within the pushback buffer from which the next byte will be read.
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
PushbackInputStream(InputStream in)
Creates a PushbackInputStream and saves its argument, the input stream in, for later use.
PushbackInputStream(InputStream in, int size)
Creates a PushbackInputStream with a pushback buffer of the specified size, and saves its argument, the input stream in, for later use.
Method Summary
int | available() Returns the number of bytes that can be read from this input stream without blocking.
void | close() Closes this input stream and releases any system resources associated with the stream.
boolean | markSupported() Tests if this input stream supports the mark and reset methods, which it does not.
int | read() Reads the next byte of data from this input stream.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this input stream into an array of bytes.
long | skip(long n) Skips over and discards n bytes of data from this input stream.
void | unread(byte[] b) Pushes back an array of bytes by copying it to the front of the pushback buffer.
void | unread(byte[] b, int off, int len) Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer.
void | unread(int b) Pushes back a byte by copying it to the front of the pushback buffer.
Methods inherited from class java.io.FilterInputStream
mark, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buf

protected byte[] buf
The pushback buffer.
Since:
JDK1.1

pos

protected int pos
The position within the pushback buffer from which the next byte will be read. When the buffer is empty, pos is equal to buf.length; when the buffer is full, pos is equal to zero.
Since:
JDK1.1
Constructor Detail

PushbackInputStream

public PushbackInputStream(InputStream in,
                           int size)
Creates a PushbackInputStream with a pushback buffer of the specified size, and saves its argument, the input stream in, for later use. Initially, there is no pushed-back byte (the field pushBack is initialized to -1).
Parameters:
in - the input stream from which bytes will be read.
size - the size of the pushback buffer.
Throws:
IllegalArgumentException - if size is <= 0Since:
JDK1.1

PushbackInputStream

public PushbackInputStream(InputStream in)
Creates a PushbackInputStream and saves its argument, the input stream in, for later use. Initially, there is no pushed-back byte (the field pushBack is initialized to -1).
Parameters:
in - the input stream from which bytes will be read.
Method Detail

read

public int read()
         throws IOException
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

This method returns the most recently pushed-back byte, if there is one, and otherwise calls the read method of its underlying input stream and returns whatever value that method returns.

Overrides:
read in class FilterInputStream
Returns:
the next byte of data, or -1 if the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method first reads any pushed-back bytes; after that, if fewer than than len bytes have been read then it reads from the underlying input stream. This method blocks until at least 1 byte of input is available.
Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
InputStream.read(byte[], int, int)

unread

public void unread(int b)
            throws IOException
Pushes back a byte by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value (byte)b.
Parameters:
b - the int value whose low-order byte is to be pushed back.
Throws:
IOException - If there is not enough room in the pushback buffer for the byte.

unread

public void unread(byte[] b,
                   int off,
                   int len)
            throws IOException
Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value b[off], the byte after that will have the value b[off+1], and so forth.
Parameters:
b - the byte array to push back.
off - the start offset of the data.
len - the number of bytes to push back.
Throws:
IOException - If there is not enough room in the pushback buffer for the specified number of bytes.
Since:
JDK1.1

unread

public void unread(byte[] b)
            throws IOException
Pushes back an array of bytes by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value b[0], the byte after that will have the value b[1], and so forth.
Parameters:
b - the byte array to push back
Throws:
IOException - If there is not enough room in the pushback buffer for the specified number of bytes.
Since:
JDK1.1

available

public int available()
              throws IOException
Returns the number of bytes that can be read from this input stream without blocking. This method calls the available method of the underlying input stream; it returns that value plus the number of bytes that have been pushed back.
Overrides:
available in class FilterInputStream
Returns:
the number of bytes that can be read from the input stream without blocking.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in, InputStream.available()

skip

public long skip(long n)
          throws IOException
Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly zero. If n is negative, no bytes are skipped.

The skip method of PushbackInputStream first skips over the bytes in the pushback buffer, if any. It then calls the skip method of the underlying input stream if more bytes need to be skipped. The actual number of bytes skipped is returned.

Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.
Since:
1.2
See Also:
FilterInputStream.in, InputStream.skip(long n)

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods, which it does not.
Overrides:
markSupported in class FilterInputStream
Returns:
false, since this class does not support the mark and reset methods.
See Also:
InputStream.mark(int), InputStream.reset()

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream.
Overrides:
close in class FilterInputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PushbackReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class PushbackReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.FilterReader
              |
              +--java.io.PushbackReader
public class PushbackReader
extends FilterReader

A character-stream reader that allows characters to be pushed back into the stream.

Since:
JDK1.1

Fields inherited from class java.io.FilterReader
in
Fields inherited from class java.io.Reader
lock
Constructor Summary
PushbackReader(Reader in)
Create a new pushback reader with a one-character pushback buffer.
PushbackReader(Reader in, int size)
Create a new pushback reader with a pushback buffer of the given size.
Method Summary
 void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation, which it does not.
 int read()
Read a single character.
 int read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream.
 void unread(char[] cbuf)
Push back an array of characters by copying it to the front of the pushback buffer.
 void unread(char[] cbuf, int off, int len)
Push back a portion of an array of characters by copying it to the front of the pushback buffer.
 void unread(int c)
Push back a single character.
Methods inherited from class java.io.FilterReader
skip
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PushbackReader

public PushbackReader(Reader in,
                      int size)
Create a new pushback reader with a pushback buffer of the given size.
Parameters:
in - The reader from which characters will be read
size - The size of the pushback buffer
Throws:
IllegalArgumentException - if size is <= 0

PushbackReader

public PushbackReader(Reader in)
Create a new pushback reader with a one-character pushback buffer.
Parameters:
in - The reader from which characters will be read
Method Detail

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class FilterReader
Returns:
The character read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class FilterReader
Parameters:
cbuf - Destination buffer
off - Offset at which to start writing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

unread

public void unread(int c)
            throws IOException
Push back a single character.
Parameters:
c - The character to push back
Throws:
IOException - If the pushback buffer is full, or if some other I/O error occurs

unread

public void unread(char[] cbuf,
                   int off,
                   int len)
            throws IOException
Push back a portion of an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value cbuf[off], the character after that will have the value cbuf[off+1], and so forth.
Parameters:
cbuf - Character array
off - Offset of first character to push back
len - Number of characters to push back
Throws:
IOException - If there is insufficient room in the pushback buffer, or if some other I/O error occurs

unread

public void unread(char[] cbuf)
            throws IOException
Push back an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value cbuf[0], the character after that will have the value cbuf[1], and so forth.
Parameters:
cbuf - Character array to push back
Throws:
IOException - If there is insufficient room in the pushback buffer, or if some other I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read.
Overrides:
ready in class FilterReader
Throws:
IOException - If an I/O error occurs

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. The mark for class PushbackReader always throws an exception.
Overrides:
mark in class FilterReader
Throws:
IOException - Always, since mark is not supported

reset

public void reset()
           throws IOException
Reset the stream. The reset method of PushbackReader always throws an exception.
Overrides:
reset in class FilterReader
Throws:
IOException - Always, since reset is not supported

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation, which it does not.
Overrides:
markSupported in class FilterReader
Following copied from class: java.io.Reader
Returns:
true if and only if this stream supports the mark operation.

close

public void close()
           throws IOException
Close the stream.
Overrides:
close in class FilterReader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PutField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class ObjectOutputStream.PutField

java.lang.Object
  |
  +--java.io.ObjectOutputStream.PutField
Enclosing class:
ObjectOutputStream
public abstract static class ObjectOutputStream.PutField
extends Object

Provide programatic access to the persistent fields to be written to ObjectOutput.

Since:
1.2

Constructor Summary
ObjectOutputStream.PutField()
Method Summary
abstract void | put(String name, boolean value) Put the value of the named boolean field into the persistent field.
abstract void | put(String name, byte value) Put the value of the named byte field into the persistent fields.
abstract void | put(String name, char value) Put the value of the named char field into the persistent fields.
abstract void | put(String name, double value) Put the value of the named double field into the persistent field.
abstract void | put(String name, float value) Put the value of the named float field into the persistent fields.
abstract void | put(String name, int value) Put the value of the named int field into the persistent fields.
abstract void | put(String name, long value) Put the value of the named long field into the persistent fields.
abstract void | put(String name, Object value) Put the value of the named Object field into the persistent field.
abstract void | put(String name, short value) Put the value of the named short field into the persistent fields.
abstract void | write(ObjectOutput out) Write the data and fields to the specified ObjectOutput stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ObjectOutputStream.PutField

public ObjectOutputStream.PutField()
Method Detail

put

public abstract void put(String name,
                         boolean value)
Put the value of the named boolean field into the persistent field.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         char value)
Put the value of the named char field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         byte value)
Put the value of the named byte field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         short value)
Put the value of the named short field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         int value)
Put the value of the named int field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         long value)
Put the value of the named long field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         float value)
Put the value of the named float field into the persistent fields.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         double value)
Put the value of the named double field into the persistent field.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

put

public abstract void put(String name,
                         Object value)
Put the value of the named Object field into the persistent field.
Parameters:
name - the name of the serializable field
value - the value to assign to the field

write

public abstract void write(ObjectOutput out)
                    throws IOException
Write the data and fields to the specified ObjectOutput stream.
Parameters:
out - the stream to write the data and fields to
Throws:
IOException - if I/O errors occur while writing to the underlying stream
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RandomAccessFile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class RandomAccessFile

java.lang.Object
  |
  +--java.io.RandomAccessFile
All Implemented Interfaces:
DataInput, DataOutput
public class RandomAccessFile
extends Object
implements DataOutput, DataInput

Instances of this class support both reading and writing to a random access file. A random access file behaves like a large array of bytes stored in the file system. There is a kind of cursor, or index into the implied array, called the file pointer; input operations read bytes starting at the file pointer and advance the file pointer past the bytes read. If the random access file is created in read/write mode, then output operations are also available; output operations write bytes starting at the file pointer and advance the file pointer past the bytes written. Output operations that write past the current end of the implied array cause the array to be extended. The file pointer can be read by the getFilePointer method and set by the seek method.

It is generally true of all the reading routines in this class that if end-of-file is reached before the desired number of bytes has been read, an EOFException (which is a kind of IOException) is thrown. If any byte cannot be read for any reason other than end-of-file, an IOException other than EOFException is thrown. In particular, an IOException may be thrown if the stream has been closed.

Since:
JDK1.0

Constructor Summary
RandomAccessFile(File file, String mode)
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
RandomAccessFile(String name, String mode)
Creates a random access file stream to read from, and optionally to write to, a file with the specified name.
Method Summary
void | close() Closes this random access file stream and releases any system resources associated with the stream.
FileDescriptor | getFD() Returns the opaque file descriptor object associated with this stream.
long | getFilePointer() Returns the current offset in this file.
long | length() Returns the length of this file.
int | read() Reads a byte of data from this file.
int | read(byte[] b) Reads up to b.length bytes of data from this file into an array of bytes.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this file into an array of bytes.
boolean | readBoolean() Reads a boolean from this file.
byte | readByte() Reads a signed eight-bit value from this file.
char | readChar() Reads a Unicode character from this file.
double | readDouble() Reads a double from this file.
float | readFloat() Reads a float from this file.
void | readFully(byte[] b) Reads b.length bytes from this file into the byte array, starting at the current file pointer.
void | readFully(byte[] b, int off, int len) Reads exactly len bytes from this file into the byte array, starting at the current file pointer.
int | readInt() Reads a signed 32-bit integer from this file.
String | readLine() Reads the next line of text from this file.
long | readLong() Reads a signed 64-bit integer from this file.
short | readShort() Reads a signed 16-bit number from this file.
int | readUnsignedByte() Reads an unsigned eight-bit number from this file.
int | readUnsignedShort() Reads an unsigned 16-bit number from this file.
String | readUTF() Reads in a string from this file.
void | seek(long pos) Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs.
void | setLength(long newLength) Sets the length of this file.
int | skipBytes(int n) Attempts to skip over n bytes of input discarding the skipped bytes.
void | write(byte[] b) Writes b.length bytes from the specified byte array to this file, starting at the current file pointer.
void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this file.
void | write(int b) Writes the specified byte to this file.
void | writeBoolean(boolean v) Writes a boolean to the file as a one-byte value.
void | writeByte(int v) Writes a byte to the file as a one-byte value.
void | writeBytes(String s) Writes the string to the file as a sequence of bytes.
void | writeChar(int v) Writes a char to the file as a two-byte value, high byte first.
void | writeChars(String s) Writes a string to the file as a sequence of characters.
void | writeDouble(double v) Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the file as an eight-byte quantity, high byte first.
void | writeFloat(float v) Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the file as a four-byte quantity, high byte first.
void | writeInt(int v) Writes an int to the file as four bytes, high byte first.
void | writeLong(long v) Writes a long to the file as eight bytes, high byte first.
void | writeShort(int v) Writes a short to the file as two bytes, high byte first.
void | writeUTF(String str) Writes a string to the file using UTF-8 encoding in a machine-independent manner.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RandomAccessFile

public RandomAccessFile(String name,
                        String mode)
                 throws FileNotFoundException
Creates a random access file stream to read from, and optionally to write to, a file with the specified name. A new FileDescriptor object is created to represent the connection to the file.

The mode argument must either be equal to "r" or "rw", indicating that the file is to be opened for input only or for both input and output, respectively. The write methods on this object will always throw an IOException if the file is opened with a mode of "r". If the mode is "rw" and the file does not exist, then an attempt is made to create it. An IOException is thrown if the name argument refers to a directory.

If there is a security manager, its checkRead method is called with the name argument as its argument to see if read access to the file is allowed. If the mode is "rw", the security manager's checkWrite method is also called with the name argument as its argument to see if write access to the file is allowed.

Parameters:
name - the system-dependent filename.
mode - the access mode.
Throws:
IllegalArgumentException - if the mode argument is not equal to "r" or to "rw".
FileNotFoundException - if the file exists but is a directory rather than a regular file, or cannot be opened or created for any other reason
SecurityException - if a security manager exists and its checkRead method denies read access to the file or the mode is "rw" and the security manager's checkWrite method denies write access to the file.
See Also:
SecurityException, SecurityManager.checkRead(java.lang.String), SecurityManager.checkWrite(java.lang.String)

RandomAccessFile

public RandomAccessFile(File file,
                        String mode)
                 throws FileNotFoundException
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument. A new FileDescriptor object is created to represent this file connection.

The mode argument must either be equal to "r" or "rw", indicating that the file is to be opened for input only or for both input and output, respectively. The write methods on this object will always throw an IOException if the file is opened with a mode of "r". If the mode is "rw" and the file does not exist, then an attempt is made to create it. An IOException is thrown if the file argument refers to a directory.

If there is a security manager, its checkRead method is called with the pathname of the file argument as its argument to see if read access to the file is allowed. If the mode is "rw", the security manager's checkWrite method is also called with the path argument to see if write access to the file is allowed.

Parameters:
file - the file object.
mode - the access mode.
Throws:
IllegalArgumentException - if the mode argument is not equal to "r" or to "rw".
FileNotFoundException - if the file exists but is a directory rather than a regular file, or cannot be opened or created for any other reason
SecurityException - if a security manager exists and its checkRead method denies read access to the file or the mode is "rw" and the security manager's checkWrite method denies write access to the file.
See Also:
File.getPath(),
SecurityManager.checkRead(java.lang.String),
SecurityManager.checkWrite(java.lang.String)
Method Detail

getFD

public final FileDescriptor getFD()
                           throws IOException
Returns the opaque file descriptor object associated with this stream.
Returns:
the file descriptor object associated with this stream.
Throws:
IOException - if an I/O error occurs.
See Also:
FileDescriptor

read

public int read()
         throws IOException
Reads a byte of data from this file. The byte is returned as an integer in the range 0 to 255 (0x00-0x0ff). This method blocks if no input is yet available.

Although RandomAccessFile is not a subclass of InputStream, this method behaves in exactly the same way as the InputStream.read() method of InputStream.

Returns:
the next byte of data, or -1 if the end of the file has been reached.
Throws:
IOException - if an I/O error occurs. Not thrown if end-of-file has been reached.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.

Although RandomAccessFile is not a subclass of InputStream, this method behaves in the exactly the same way as the InputStream.read(byte[], int, int) method of InputStream.

Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b)
         throws IOException
Reads up to b.length bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.

Although RandomAccessFile is not a subclass of InputStream, this method behaves in the exactly the same way as the InputStream.read(byte[]) method of InputStream.

Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of this file has been reached.
Throws:
IOException - if an I/O error occurs.

readFully

public final void readFully(byte[] b)
                     throws IOException
Reads b.length bytes from this file into the byte array, starting at the current file pointer. This method reads repeatedly from the file until the requested number of bytes are read. This method blocks until the requested number of bytes are read, the end of the stream is detected, or an exception is thrown.
Specified by:
readFully in interface DataInput
Parameters:
b - the buffer into which the data is read.
Throws:
EOFException - if this file reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

readFully

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws IOException
Reads exactly len bytes from this file into the byte array, starting at the current file pointer. This method reads repeatedly from the file until the requested number of bytes are read. This method blocks until the requested number of bytes are read, the end of the stream is detected, or an exception is thrown.
Specified by:
readFully in interface DataInput
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the number of bytes to read.
Throws:
EOFException - if this file reaches the end before reading all the bytes.
IOException - if an I/O error occurs.

skipBytes

public int skipBytes(int n)
              throws IOException
Attempts to skip over n bytes of input discarding the skipped bytes.

This method may skip over some smaller number of bytes, possibly zero. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. This method never throws an EOFException. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.

Specified by:
skipBytes in interface DataInput
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

write

public void write(int b)
           throws IOException
Writes the specified byte to this file. The write starts at the current file pointer.
Specified by:
write in interface DataOutput
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes from the specified byte array to this file, starting at the current file pointer.
Specified by:
write in interface DataOutput
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this file.
Specified by:
write in interface DataOutput
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.

getFilePointer

public long getFilePointer()
                    throws IOException
Returns the current offset in this file.
Returns:
the offset from the beginning of the file, in bytes, at which the next read or write occurs.
Throws:
IOException - if an I/O error occurs.

seek

public void seek(long pos)
          throws IOException
Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs. The offset may be set beyond the end of the file. Setting the offset beyond the end of the file does not change the file length. The file length will change only by writing after the offset has been set beyond the end of the file.
Parameters:
pos - the offset position, measured in bytes from the beginning of the file, at which to set the file pointer.
Throws:
IOException - if pos is less than 0 or if an I/O error occurs.

length

public long length()
            throws IOException
Returns the length of this file.
Returns:
the length of this file, measured in bytes.
Throws:
IOException - if an I/O error occurs.

setLength

public void setLength(long newLength)
               throws IOException
Sets the length of this file.

If the present length of the file as returned by the length method is greater than the newLength argument then the file will be truncated. In this case, if the file offset as returned by the getFilePointer method is greater then newLength then after this method returns the offset will be equal to newLength.

If the present length of the file as returned by the length method is smaller than the newLength argument then the file will be extended. In this case, the contents of the extended portion of the file are not defined.

Parameters:
newLength - The desired length of the file
Throws:
IOException - If an I/O error occurs
Since:
1.2

close

public void close()
           throws IOException
Closes this random access file stream and releases any system resources associated with the stream. A closed random access file cannot perform input or output operations and cannot be reopened.
Throws:
IOException - if an I/O error occurs.

readBoolean

public final boolean readBoolean()
                          throws IOException
Reads a boolean from this file. This method reads a single byte from the file, starting at the current file pointer. A value of 0 represents false. Any other value represents true. This method blocks until the byte is read, the end of the stream is detected, or an exception is thrown.
Specified by:
readBoolean in interface DataInput
Returns:
the boolean value read.
Throws:
EOFException - if this file has reached the end.
IOException - if an I/O error occurs.

readByte

public final byte readByte()
                    throws IOException
Reads a signed eight-bit value from this file. This method reads a byte from the file, starting from the current file pointer. If the byte read is b, where 0 <= b <= 255, then the result is:
     (byte)(b)

This method blocks until the byte is read, the end of the stream is detected, or an exception is thrown.

Specified by:
readByte in interface DataInput
Returns:
the next byte of this file as a signed eight-bit byte.
Throws:
EOFException - if this file has reached the end.
IOException - if an I/O error occurs.

readUnsignedByte

public final int readUnsignedByte()
                           throws IOException
Reads an unsigned eight-bit number from this file. This method reads a byte from this file, starting at the current file pointer, and returns that byte.

This method blocks until the byte is read, the end of the stream is detected, or an exception is thrown.

Specified by:
readUnsignedByte in interface DataInput
Returns:
the next byte of this file, interpreted as an unsigned eight-bit number.
Throws:
EOFException - if this file has reached the end.
IOException - if an I/O error occurs.

readShort

public final short readShort()
                      throws IOException
Reads a signed 16-bit number from this file. The method reads two bytes from this file, starting at the current file pointer. If the two bytes read, in order, are b1 and b2, where each of the two values is between 0 and 255, inclusive, then the result is equal to:
     (short)((b1 << 8) | b2)

This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readShort in interface DataInput
Returns:
the next two bytes of this file, interpreted as a signed 16-bit number.
Throws:
EOFException - if this file reaches the end before reading two bytes.
IOException - if an I/O error occurs.

readUnsignedShort

public final int readUnsignedShort()
                            throws IOException
Reads an unsigned 16-bit number from this file. This method reads two bytes from the file, starting at the current file pointer. If the bytes read, in order, are b1 and b2, where 0 <= b1, b2 <= 255, then the result is equal to:
     (b1 << 8) | b2

This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readUnsignedShort in interface DataInput
Returns:
the next two bytes of this file, interpreted as an unsigned 16-bit integer.
Throws:
EOFException - if this file reaches the end before reading two bytes.
IOException - if an I/O error occurs.

readChar

public final char readChar()
                    throws IOException
Reads a Unicode character from this file. This method reads two bytes from the file, starting at the current file pointer. If the bytes read, in order, are b1 and b2, where 0 <= b1, b2 <= 255, then the result is equal to:
     (char)((b1 << 8) | b2)

This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readChar in interface DataInput
Returns:
the next two bytes of this file as a Unicode character.
Throws:
EOFException - if this file reaches the end before reading two bytes.
IOException - if an I/O error occurs.

readInt

public final int readInt()
                  throws IOException
Reads a signed 32-bit integer from this file. This method reads 4 bytes from the file, starting at the current file pointer. If the bytes read, in order, are b1, b2, b3, and b4, where 0 <= b1, b2, b3, b4 <= 255, then the result is equal to:
     (b1 << 24) | (b2 << 16) + (b3 << 8) + b4

This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readInt in interface DataInput
Returns:
the next four bytes of this file, interpreted as an int.
Throws:
EOFException - if this file reaches the end before reading four bytes.
IOException - if an I/O error occurs.

readLong

public final long readLong()
                    throws IOException
Reads a signed 64-bit integer from this file. This method reads eight bytes from the file, starting at the current file pointer. If the bytes read, in order, are b1, b2, b3, b4, b5, b6, b7, and b8, where:
     0 <= b1, b2, b3, b4, b5, b6, b7, b8 <=255,

then the result is equal to:

     ((long)b1 << 56) + ((long)b2 << 48)
     + ((long)b3 << 40) + ((long)b4 << 32)
     + ((long)b5 << 24) + ((long)b6 << 16)
     + ((long)b7 << 8) + b8

This method blocks until the eight bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readLong in interface DataInput
Returns:
the next eight bytes of this file, interpreted as a long.
Throws:
EOFException - if this file reaches the end before reading eight bytes.
IOException - if an I/O error occurs.

readFloat

public final float readFloat()
                      throws IOException
Reads a float from this file. This method reads an int value, starting at the current file pointer, as if by the readInt method and then converts that int to a float using the intBitsToFloat method in class Float.

This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readFloat in interface DataInput
Returns:
the next four bytes of this file, interpreted as a float.
Throws:
EOFException - if this file reaches the end before reading four bytes.
IOException - if an I/O error occurs.
See Also:
readInt(), Float.intBitsToFloat(int)

readDouble

public final double readDouble()
                        throws IOException
Reads a double from this file. This method reads a long value, starting at the current file pointer, as if by the readLong method and then converts that long to a double using the longBitsToDouble method in class Double.

This method blocks until the eight bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readDouble in interface DataInput
Returns:
the next eight bytes of this file, interpreted as a double.
Throws:
EOFException - if this file reaches the end before reading eight bytes.
IOException - if an I/O error occurs.
See Also:
readLong(), Double.longBitsToDouble(long)

readLine

public final String readLine()
                      throws IOException
Reads the next line of text from this file. This method successively reads bytes from the file, starting at the current file pointer, until it reaches a line terminator or the end of the file. Each byte is converted into a character by taking the byte's value for the lower eight bits of the character and setting the high eight bits of the character to zero. This method does not, therefore, support the full Unicode character set.

A line of text is terminated by a carriage-return character ('\r'), a newline character ('\n'), a carriage-return character immediately followed by a newline character, or the end of the file. Line-terminating characters are discarded and are not included as part of the string returned.

This method blocks until a newline character is read, a carriage return and the byte following it are read (to see if it is a newline), the end of the file is reached, or an exception is thrown.

Specified by:
readLine in interface DataInput
Returns:
the next line of text from this file, or null if end of file is encountered before even one byte is read.
Throws:
IOException - if an I/O error occurs.

readUTF

public final String readUTF()
                     throws IOException
Reads in a string from this file. The string has been encoded using a modified UTF-8 format.

The first two bytes are read, starting from the current file pointer, as if by readUnsignedShort. This value gives the number of following bytes that are in the encoded string, not the length of the resulting string. The following bytes are then interpreted as bytes encoding characters in the UTF-8 format and are converted into characters.

This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.

Specified by:
readUTF in interface DataInput
Returns:
a Unicode string.
Throws:
EOFException - if this file reaches the end before reading all the bytes.
IOException - if an I/O error occurs.
UTFDataFormatException - if the bytes do not represent valid UTF-8 encoding of a Unicode string.
See Also:
readUnsignedShort()

writeBoolean

public final void writeBoolean(boolean v)
                        throws IOException
Writes a boolean to the file as a one-byte value. The value true is written out as the value (byte)1; the value false is written out as the value (byte)0. The write starts at the current position of the file pointer.
Specified by:
writeBoolean in interface DataOutput
Parameters:
v - a boolean value to be written.
Throws:
IOException - if an I/O error occurs.

writeByte

public final void writeByte(int v)
                     throws IOException
Writes a byte to the file as a one-byte value. The write starts at the current position of the file pointer.
Specified by:
writeByte in interface DataOutput
Parameters:
v - a byte value to be written.
Throws:
IOException - if an I/O error occurs.

writeShort

public final void writeShort(int v)
                      throws IOException
Writes a short to the file as two bytes, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeShort in interface DataOutput
Parameters:
v - a short to be written.
Throws:
IOException - if an I/O error occurs.

writeChar

public final void writeChar(int v)
                     throws IOException
Writes a char to the file as a two-byte value, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeChar in interface DataOutput
Parameters:
v - a char value to be written.
Throws:
IOException - if an I/O error occurs.

writeInt

public final void writeInt(int v)
                    throws IOException
Writes an int to the file as four bytes, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeInt in interface DataOutput
Parameters:
v - an int to be written.
Throws:
IOException - if an I/O error occurs.

writeLong

public final void writeLong(long v)
                     throws IOException
Writes a long to the file as eight bytes, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeLong in interface DataOutput
Parameters:
v - a long to be written.
Throws:
IOException - if an I/O error occurs.

writeFloat

public final void writeFloat(float v)
                      throws IOException
Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the file as a four-byte quantity, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeFloat in interface DataOutput
Parameters:
v - a float value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
Float.floatToIntBits(float)

writeDouble

public final void writeDouble(double v)
                       throws IOException
Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the file as an eight-byte quantity, high byte first. The write starts at the current position of the file pointer.
Specified by:
writeDouble in interface DataOutput
Parameters:
v - a double value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
Double.doubleToLongBits(double)

writeBytes

public final void writeBytes(String s)
                      throws IOException
Writes the string to the file as a sequence of bytes. Each character in the string is written out, in sequence, by discarding its high eight bits. The write starts at the current position of the file pointer.
Specified by:
writeBytes in interface DataOutput
Parameters:
s - a string of bytes to be written.
Throws:
IOException - if an I/O error occurs.

writeChars

public final void writeChars(String s)
                      throws IOException
Writes a string to the file as a sequence of characters. Each character is written to the data output stream as if by the writeChar method. The write starts at the current position of the file pointer.
Specified by:
writeChars in interface DataOutput
Parameters:
s - a String value to be written.
Throws:
IOException - if an I/O error occurs.
See Also:
writeChar(int)

writeUTF

public final void writeUTF(String str)
                    throws IOException
Writes a string to the file using UTF-8 encoding in a machine-independent manner.

First, two bytes are written to the file, starting at the current file pointer, as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for each character.

Specified by:
writeUTF in interface DataOutput
Parameters:
str - a string to be written.
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Reader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class Reader

java.lang.Object
  |
  +--java.io.Reader
Direct Known Subclasses:
BufferedReader, CharArrayReader, FilterReader, InputStreamReader, PipedReader, StringReader
public abstract class Reader
extends Object

Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.

Since:
JDK1.1
See Also:
BufferedReader, LineNumberReader, CharArrayReader, InputStreamReader, FileReader, FilterReader, PushbackReader, PipedReader, StringReader, Writer

Field Summary
protected  Object lock
The object used to synchronize operations on this stream.
Constructor Summary
protected | Reader() Create a new character-stream reader whose critical sections will synchronize on the reader itself.
protected | Reader(Object lock) Create a new character-stream reader whose critical sections will synchronize on the given object.
Method Summary
abstract  void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation.
 int read()
Read a single character.
 int read(char[] cbuf)
Read characters into an array.
abstract  int read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream.
 long skip(long n)
Skip characters.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lock

protected Object lock
The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
Constructor Detail

Reader

protected Reader()
Create a new character-stream reader whose critical sections will synchronize on the reader itself.

Reader

protected Reader(Object lock)
Create a new character-stream reader whose critical sections will synchronize on the given object.
Parameters:
lock - The Object to synchronize on.
Method Detail

read

public int read()
         throws IOException
Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

Returns:
The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf)
         throws IOException
Read characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
Parameters:
cbuf - Destination buffer
Returns:
The number of bytes read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public abstract int read(char[] cbuf,
                         int off,
                         int len)
                  throws IOException
Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip

public long skip(long n)
          throws IOException
Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.
Parameters:
n - The number of characters to skip
Returns:
The number of characters actually skipped
Throws:
IllegalArgumentException - If n is negative.
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read.
Returns:
True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.
Throws:
IOException - If an I/O error occurs

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation. The default implementation always returns false. Subclasses should override this method.
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.
Throws:
IOException - If the stream does not support mark(), or if some other I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
Throws:
IOException - If the stream has not been marked, or if the mark has been invalidated, or if the stream does not support reset(), or if some other I/O error occurs

close

public abstract void close()
                    throws IOException
Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SequenceInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class SequenceInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.SequenceInputStream
public class SequenceInputStream
extends InputStream

A SequenceInputStream represents the logical concatenation of other input streams. It starts out with an ordered collection of input streams and reads from the first one until end of file is reached, whereupon it reads from the second one, and so on, until end of file is reached on the last of the contained input streams.

Since:
JDK1.0

Constructor Summary
SequenceInputStream(Enumeration e)
Initializes a newly created SequenceInputStream by remembering the argument, which must be an Enumeration that produces objects whose run-time type is InputStream.
SequenceInputStream(InputStream s1, InputStream s2)
Initializes a newly created SequenceInputStream by remembering the two arguments, which will be read in order, first s1 and then s2, to provide the bytes to be read from this SequenceInputStream.
Method Summary
int | available() Returns the number of bytes available on the current stream.
void | close() Closes this input stream and releases any system resources associated with the stream.
int | read() Reads the next byte of data from this input stream.
int | read(byte[] b, int off, int len) Reads up to len bytes of data from this input stream into an array of bytes.
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SequenceInputStream

public SequenceInputStream(Enumeration e)
Initializes a newly created SequenceInputStream by remembering the argument, which must be an Enumeration that produces objects whose run-time type is InputStream. The input streams that are produced by the enumeration will be read, in order, to provide the bytes to be read from this SequenceInputStream. After each input stream from the enumeration is exhausted, it is closed by calling its close method.
Parameters:
e - an enumeration of input streams.
See Also:
Enumeration

SequenceInputStream

public SequenceInputStream(InputStream s1,
                           InputStream s2)
Initializes a newly created SequenceInputStream by remembering the two arguments, which will be read in order, first s1 and then s2, to provide the bytes to be read from this SequenceInputStream.
Parameters:
s1 - the first input stream to read.
s2 - the second input stream to read.
Method Detail

available

public int available()
              throws IOException
Returns the number of bytes available on the current stream.
Overrides:
available in class InputStream
Since:
JDK1.1

read

public int read()
         throws IOException
Reads the next byte of data from this input stream. The byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

This method tries to read one character from the current substream. If it reaches the end of the stream, it calls the close method of the current substream and begins reading from the next substream.

Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until at least 1 byte of input is available. If the first argument is null, up to len bytes are read and discarded.

The read method of SequenceInputStream tries to read the data from the current substream. If it fails to read any characters because the substream has reached the end of the stream, it calls the close method of the current substream and begins reading from the next substream.

Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
int the number of bytes read.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream. A closed SequenceInputStream cannot perform input operations and cannot be reopened.

If this stream was created from an enumeration, all remaining elements are requested from the enumeration and closed before the close method returns. of InputStream .

Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SerializablePermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class SerializablePermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.io.SerializablePermission
All Implemented Interfaces:
Guard, Serializable
public final class SerializablePermission
extends BasicPermission

This class is for Serializable permissions. A SerializablePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the Serializable permission (see below).

The following table lists all the possible SerializablePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
enableSubclassImplementation | Subclass implementation of ObjectOutputStream or ObjectInputStream to override the default serialization or deserialization, respectively, of objects | Code can use this to serialize or deserialize classes in a purposefully malfeasant manner. For example, during serialization, malicious code can use this to purposefully store confidential private field data in a way easily accessible to attackers. Or, during deserializaiton it could, for example, deserialize a class with all its private fields zeroed out.
enableSubstitution | Substitution of one object for another during serialization or deserialization | This is dangerous because malicious code can replace the actual object with one which has incorrect or malignant data.

Since:
1.2
See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
SerializablePermission(String name)
Creates a new SerializablePermission with the specified name.
SerializablePermission(String name, String actions)
Creates a new SerializablePermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SerializablePermission

public SerializablePermission(String name)
Creates a new SerializablePermission with the specified name. The name is the symbolic name of the SerializablePermission, such as "enableSubstitution", etc.
Parameters:
name - the name of the SerializablePermission.

SerializablePermission

public SerializablePermission(String name,
                              String actions)
Creates a new SerializablePermission object with the specified name. The name is the symbolic name of the SerializablePermission, and the actions String is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the SerializablePermission.
actions - currently unused and must be set to null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StreamCorruptedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class StreamCorruptedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.StreamCorruptedException
All Implemented Interfaces:
Serializable
public class StreamCorruptedException
extends ObjectStreamException

Thrown when control information that was read from an object stream violates internal consistency checks.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
StreamCorruptedException()
Create a StreamCorruptedException and list no reason why thrown.
StreamCorruptedException(String reason)
Create a StreamCorruptedException and list a reason why thrown.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StreamCorruptedException

public StreamCorruptedException(String reason)
Create a StreamCorruptedException and list a reason why thrown.
Parameters:
reason - String describing the reason for the exception.

StreamCorruptedException

public StreamCorruptedException()
Create a StreamCorruptedException and list no reason why thrown.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StreamTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class StreamTokenizer

java.lang.Object
  |
  +--java.io.StreamTokenizer
public class StreamTokenizer
extends Object

The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time. The parsing process is controlled by a table and a number of flags that can be set to various states. The stream tokenizer can recognize identifiers, numbers, quoted strings, and various comment styles.

Each byte read from the input stream is regarded as a character in the range '\u0000' through '\u00FF'. The character value is used to look up five possible attributes of the character: white space, alphabetic, numeric, string quote, and comment character. Each character can have zero or more of these attributes.

In addition, an instance has four flags. These flags indicate:

  • Whether line terminators are to be returned as tokens or treated as white space that merely separates tokens.
  • Whether C-style comments are to be recognized and skipped.
  • Whether C++-style comments are to be recognized and skipped.
  • Whether the characters of identifiers are converted to lowercase.

A typical application first constructs an instance of this class, sets up the syntax tables, and then repeatedly loops calling the nextToken method in each iteration of the loop until it returns the value TT_EOF.

Since:
JDK1.0
See Also:
nextToken(), TT_EOF

Field Summary
double | nval If the current token is a number, this field contains the value of that number.
String | sval If the current token is a word token, this field contains a string giving the characters of the word token.
static int | TT_EOF A constant indicating that the end of the stream has been read.
static int | TT_EOL A constant indicating that the end of the line has been read.
static int | TT_NUMBER A constant indicating that a number token has been read.
static int | TT_WORD A constant indicating that a word token has been read.
int | ttype After a call to the nextToken method, this field contains the type of the token just read.
Constructor Summary
StreamTokenizer(InputStream is)
Deprecated. As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
StreamTokenizer(Reader r)
Create a tokenizer that parses the given character stream.
Method Summary
void | commentChar(int ch) Specified that the character argument starts a single-line comment.
void | eolIsSignificant(boolean flag) Determines whether or not ends of line are treated as tokens.
int | lineno() Return the current line number.
void | lowerCaseMode(boolean fl) Determines whether or not word token are automatically lowercased.
int | nextToken() Parses the next token from the input stream of this tokenizer.
void | ordinaryChar(int ch) Specifies that the character argument is "ordinary" in this tokenizer.
void | ordinaryChars(int low, int hi) Specifies that all characters c in the range low <= c <= high are "ordinary" in this tokenizer.
void | parseNumbers() Specifies that numbers should be parsed by this tokenizer.
void | pushBack() Causes the next call to the nextToken method of this tokenizer to return the current value in the ttype field, and not to modify the value in the nval or sval field.
void | quoteChar(int ch) Specifies that matching pairs of this character delimit string constants in this tokenizer.
void | resetSyntax() Resets this tokenizer's syntax table so that all characters are "ordinary." See the ordinaryChar method for more information on a character being ordinary.
void | slashSlashComments(boolean flag) Determines whether or not the tokenizer recognizes C++-style comments.
void | slashStarComments(boolean flag) Determines whether or not the tokenizer recognizes C-style comments.
String | toString() Returns the string representation of the current stream token.
void | whitespaceChars(int low, int hi) Specifies that all characters c in the range low <= c <= high are white space characters.
void | wordChars(int low, int hi) Specifies that all characters c in the range low <= c <= high are word constituents.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ttype

public int ttype
After a call to the nextToken method, this field contains the type of the token just read. For a single character token, its value is the single character, converted to an integer. For a quoted string token (see , its value is the quote character. Otherwise, its value is one of the following:
  • TT_WORD indicates that the token is a word.
  • TT_NUMBER indicates that the token is a number.
  • TT_EOL indicates that the end of line has been read. The field can only have this value if the eolIsSignificant method has been called with the argument true.
  • TT_EOF indicates that the end of the input stream has been reached.

The initial value of this field is -4.

See Also:
eolIsSignificant(boolean), nextToken(), quoteChar(int), TT_EOF, TT_EOL, TT_NUMBER, TT_WORD

TT_EOF

public static final int TT_EOF
A constant indicating that the end of the stream has been read.

TT_EOL

public static final int TT_EOL
A constant indicating that the end of the line has been read.

TT_NUMBER

public static final int TT_NUMBER
A constant indicating that a number token has been read.

TT_WORD

public static final int TT_WORD
A constant indicating that a word token has been read.

sval

public String sval
If the current token is a word token, this field contains a string giving the characters of the word token. When the current token is a quoted string token, this field contains the body of the string.

The current token is a word when the value of the ttype field is TT_WORD. The current token is a quoted string token when the value of the ttype field is a quote character.

The initial value of this field is null.

See Also:
quoteChar(int), TT_WORD, ttype

nval

public double nval
If the current token is a number, this field contains the value of that number. The current token is a number when the value of the ttype field is TT_NUMBER.

The initial value of this field is 0.0.

See Also:
TT_NUMBER, ttype
Constructor Detail

StreamTokenizer

public StreamTokenizer(InputStream is)
Deprecated. As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);

Creates a stream tokenizer that parses the specified input stream. The stream tokenizer is initialized to the following default state:
  • All byte values 'A' through 'Z', 'a' through 'z', and '\u00A0' through '\u00FF' are considered to be alphabetic.
  • All byte values '\u0000' through '\u0020' are considered to be white space.
  • '/' is a comment character.
  • Single quote '\'' and double quote '"' are string quote characters.
  • Numbers are parsed.
  • Ends of lines are treated as white space, not as separate tokens.
  • C-style and C++-style comments are not recognized.
Parameters:
is - an input stream.
See Also:
BufferedReader, InputStreamReader, StreamTokenizer(java.io.Reader)

StreamTokenizer

public StreamTokenizer(Reader r)
Create a tokenizer that parses the given character stream.
Parameters:
r - a Reader object providing the input stream.
Since:
JDK1.1
Method Detail

resetSyntax

public void resetSyntax()
Resets this tokenizer's syntax table so that all characters are "ordinary." See the ordinaryChar method for more information on a character being ordinary.
See Also:
ordinaryChar(int)

wordChars

public void wordChars(int low,
                      int hi)
Specifies that all characters c in the range low <= c <= high are word constituents. A word token consists of a word constituent followed by zero or more word constituents or number constituents.
Parameters:
low - the low end of the range.
hi - the high end of the range.

whitespaceChars

public void whitespaceChars(int low,
                            int hi)
Specifies that all characters c in the range low <= c <= high are white space characters. White space characters serve only to separate tokens in the input stream.
Parameters:
low - the low end of the range.
hi - the high end of the range.

ordinaryChars

public void ordinaryChars(int low,
                          int hi)
Specifies that all characters c in the range low <= c <= high are "ordinary" in this tokenizer. See the ordinaryChar method for more information on a character being ordinary.
Parameters:
low - the low end of the range.
hi - the high end of the range.
See Also:
ordinaryChar(int)

ordinaryChar

public void ordinaryChar(int ch)
Specifies that the character argument is "ordinary" in this tokenizer. It removes any special significance the character has as a comment character, word component, string delimiter, white space, or number character. When such a character is encountered by the parser, the parser treates it as a single-character token and sets ttype field to the character value.
Parameters:
ch - the character.
See Also:
ttype

commentChar

public void commentChar(int ch)
Specified that the character argument starts a single-line comment. All characters from the comment character to the end of the line are ignored by this stream tokenizer.
Parameters:
ch - the character.

quoteChar

public void quoteChar(int ch)
Specifies that matching pairs of this character delimit string constants in this tokenizer.

When the nextToken method encounters a string constant, the ttype field is set to the string delimiter and the sval field is set to the body of the string.

If a string quote character is encountered, then a string is recognized, consisting of all characters after (but not including) the string quote character, up to (but not including) the next occurrence of that same string quote character, or a line terminator, or end of file. The usual escape sequences such as "\n" and "\t" are recognized and converted to single characters as the string is parsed.

Parameters:
ch - the character.
See Also:
nextToken(), sval, ttype

parseNumbers

public void parseNumbers()
Specifies that numbers should be parsed by this tokenizer. The syntax table of this tokenizer is modified so that each of the twelve characters:
      0 1 2 3 4 5 6 7 8 9 . -

has the "numeric" attribute.

When the parser encounters a word token that has the format of a double precision floating-point number, it treats the token as a number rather than a word, by setting the the ttype field to the value TT_NUMBER and putting the numeric value of the token into the nval field.

See Also:
nval, TT_NUMBER, ttype

eolIsSignificant

public void eolIsSignificant(boolean flag)
Determines whether or not ends of line are treated as tokens. If the flag argument is true, this tokenizer treats end of lines as tokens; the nextToken method returns TT_EOL and also sets the ttype field to this value when an end of line is read.

A line is a sequence of characters ending with either a carriage-return character ('\r') or a newline character ('\n'). In addition, a carriage-return character followed immediately by a newline character is treated as a single end-of-line token.

If the flag is false, end-of-line characters are treated as white space and serve only to separate tokens.

Parameters:
flag - true indicates that end-of-line characters are separate tokens; false indicates that end-of-line characters are white space.
See Also:
nextToken(), ttype, TT_EOL

slashStarComments

public void slashStarComments(boolean flag)
Determines whether or not the tokenizer recognizes C-style comments. If the flag argument is true, this stream tokenizer recognizes C-style comments. All text between successive occurrences of /* and */ are discarded.

If the flag argument is false, then C-style comments are not treated specially.

Parameters:
flag - true indicates to recognize and ignore C-style comments.

slashSlashComments

public void slashSlashComments(boolean flag)
Determines whether or not the tokenizer recognizes C++-style comments. If the flag argument is true, this stream tokenizer recognizes C++-style comments. Any occurrence of two consecutive slash characters ('/') is treated as the beginning of a comment that extends to the end of the line.

If the flag argument is false, then C++-style comments are not treated specially.

Parameters:
flag - true indicates to recognize and ignore C++-style comments.

lowerCaseMode

public void lowerCaseMode(boolean fl)
Determines whether or not word token are automatically lowercased. If the flag argument is true, then the value in the sval field is lowercased whenever a word token is returned (the ttype field has the value TT_WORD by the nextToken method of this tokenizer.

If the flag argument is false, then the sval field is not modified.

Parameters:
fl - true indicates that all word tokens should be lowercased.
See Also:
nextToken(), ttype, TT_WORD

nextToken

public int nextToken()
              throws IOException
Parses the next token from the input stream of this tokenizer. The type of the next token is returned in the ttype field. Additional information about the token may be in the nval field or the sval field of this tokenizer.

Typical clients of this class first set up the syntax tables and then sit in a loop calling nextToken to parse successive tokens until TT_EOF is returned.

Returns:
the value of the ttype field.
Throws:
IOException - if an I/O error occurs.
See Also:
nval, sval, ttype

pushBack

public void pushBack()
Causes the next call to the nextToken method of this tokenizer to return the current value in the ttype field, and not to modify the value in the nval or sval field.
See Also:
nextToken(), nval, sval, ttype

lineno

public int lineno()
Return the current line number.
Returns:
the current line number of this stream tokenizer.

toString

public String toString()
Returns the string representation of the current stream token.
Overrides:
toString in class Object
Returns:
a string representation of the token specified by the ttype, nval, and sval fields.
See Also:
nval, sval, ttype
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringBufferInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class StringBufferInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.StringBufferInputStream
Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.

public class StringBufferInputStream
extends InputStream

This class allows an application to create an input stream in which the bytes read are supplied by the contents of a string. Applications can also read bytes from a byte array by using a ByteArrayInputStream.

Only the low eight bits of each character in the string are used by this class.

Since:
JDK1.0
See Also:
ByteArrayInputStream, StringReader

Field Summary
protected String | buffer Deprecated. The string from which bytes are read.
protected int | count Deprecated. The number of valid characters in the input stream buffer.
protected int | pos Deprecated. The index of the next character to read from the input stream buffer.
Constructor Summary
StringBufferInputStream(String s)
Deprecated. Creates a string input stream to read data from the specified string.
Method Summary
int | available() Deprecated. Returns the number of bytes that can be read from the input stream without blocking.
int | read() Deprecated. Reads the next byte of data from this input stream.
int | read(byte[] b, int off, int len) Deprecated. Reads up to len bytes of data from this input stream into an array of bytes.
void | reset() Deprecated. Resets the input stream to begin reading from the first character of this input stream's underlying buffer.
long | skip(long n) Deprecated. Skips n bytes of input from this input stream.
Methods inherited from class java.io.InputStream
close, mark, markSupported, read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buffer

protected String buffer
Deprecated.
The string from which bytes are read.

pos

protected int pos
Deprecated.
The index of the next character to read from the input stream buffer.
See Also:
buffer

count

protected int count
Deprecated.
The number of valid characters in the input stream buffer.
See Also:
buffer
Constructor Detail

StringBufferInputStream

public StringBufferInputStream(String s)
Deprecated.
Creates a string input stream to read data from the specified string.
Parameters:
s - the underlying input buffer.
Method Detail

read

public int read()
Deprecated.
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned.

The read method of StringBufferInputStream cannot block. It returns the low eight bits of the next character in this input stream's buffer.

Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.

read

public int read(byte[] b,
                int off,
                int len)
Deprecated.
Reads up to len bytes of data from this input stream into an array of bytes.

The read method of StringBufferInputStream cannot block. It copies the low eight bits from the characters in this input stream's buffer into the byte array argument.

Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

skip

public long skip(long n)
Deprecated.
Skips n bytes of input from this input stream. Fewer bytes might be skipped if the end of the input stream is reached.
Overrides:
skip in class InputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.

available

public int available()
Deprecated.
Returns the number of bytes that can be read from the input stream without blocking.
Overrides:
available in class InputStream
Returns:
the value of count - pos, which is the number of bytes remaining to be read from the input buffer.

reset

public void reset()
Deprecated.
Resets the input stream to begin reading from the first character of this input stream's underlying buffer.
Overrides:
reset in class InputStream
Following copied from class: java.io.InputStream
Throws:
IOException - if this stream has not been marked or if the mark has been invalidated.
See Also:
InputStream.mark(int), IOException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class StringReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.StringReader
public class StringReader
extends Reader

A character stream whose source is a string.

Since:
JDK1.1

Fields inherited from class java.io.Reader
lock
Constructor Summary
StringReader(String s)
Create a new string reader.
Method Summary
 void close()
Close the stream.
 void mark(int readAheadLimit)
Mark the present position in the stream.
 boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
 int read()
Read a single character.
 int read(char[] cbuf, int off, int len)
Read characters into a portion of an array.
 boolean ready()
Tell whether this stream is ready to be read.
 void reset()
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked.
 long skip(long ns)
Skip characters.
Methods inherited from class java.io.Reader
read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringReader

public StringReader(String s)
Create a new string reader.
Parameters:
s - String providing the character stream.
Method Detail

read

public int read()
         throws IOException
Read a single character.
Overrides:
read in class Reader
Returns:
The character read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Read characters into a portion of an array.
Overrides:
read in class Reader
Parameters:
cbuf - Destination buffer
off - Offset at which to start writing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip

public long skip(long ns)
          throws IOException
Skip characters.
Overrides:
skip in class Reader
Throws:
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Tell whether this stream is ready to be read.
Overrides:
ready in class Reader
Returns:
True if the next read() is guaranteed not to block for input
Throws:
IOException - If the stream is closed

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation, which it does.
Overrides:
markSupported in class Reader
Following copied from class: java.io.Reader
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.
Overrides:
mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. Because the stream's input comes from a string, there is no actual limit, so this argument must not be negative, but is otherwise ignored.
Throws:
IllegalArgumentException - If readAheadLimit is <0
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked.
Overrides:
reset in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
Close the stream.
Overrides:
close in class Reader
Following copied from class: java.io.Reader
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class StringWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.StringWriter
public class StringWriter
extends Writer

A character stream that collects its output in a string buffer, which can then be used to construct a string.

Since:
JDK1.1

Fields inherited from class java.io.Writer
lock
Constructor Summary
StringWriter()
Create a new string writer, using the default initial string-buffer size.
StringWriter(int initialSize)
Create a new string writer, using the specified initial string-buffer size.
Method Summary
void | close() Close the stream.
void | flush() Flush the stream.
StringBuffer | getBuffer() Return the string buffer itself.
String | toString() Return the buffer's current value as a string.
void | write(char[] cbuf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String str) Write a string.
void | write(String str, int off, int len) Write a portion of a string.
Methods inherited from class java.io.Writer
write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StringWriter

public StringWriter()
Create a new string writer, using the default initial string-buffer size.

StringWriter

public StringWriter(int initialSize)
Create a new string writer, using the specified initial string-buffer size.
Parameters:
initialSize - an int specifying the initial size of the buffer.
Method Detail

write

public void write(int c)
Write a single character.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
c - int specifying a character to be written.
Throws:
IOException - If an I/O error occurs

write

public void write(char[] cbuf,
                  int off,
                  int len)
Write a portion of an array of characters.
Overrides:
write in class Writer
Parameters:
cbuf - Array of characters
off - Offset from which to start writing characters
len - Number of characters to write

write

public void write(String str)
Write a string.
Overrides:
write in class Writer
Following copied from class: java.io.Writer
Parameters:
str - String to be written
Throws:
IOException - If an I/O error occurs

write

public void write(String str,
                  int off,
                  int len)
Write a portion of a string.
Overrides:
write in class Writer
Parameters:
str - String to be written
off - Offset from which to start writing characters
len - Number of characters to write

toString

public String toString()
Return the buffer's current value as a string.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

getBuffer

public StringBuffer getBuffer()
Return the string buffer itself.
Returns:
StringBuffer holding the current buffer value.

flush

public void flush()
Flush the stream.
Overrides:
flush in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream. This method does not release the buffer, since its contents might still be required.
Overrides:
close in class Writer
Following copied from class: java.io.Writer
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SyncFailedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class SyncFailedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.SyncFailedException
All Implemented Interfaces:
Serializable
public class SyncFailedException
extends IOException

Signals that a sync operation has failed.

Since:
JDK1.1
See Also:
FileDescriptor.sync(), IOException, Serialized Form

Constructor Summary
SyncFailedException(String desc)
Constructs an SyncFailedException with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SyncFailedException

public SyncFailedException(String desc)
Constructs an SyncFailedException with a detail message. A detail message is a String that describes this particular exception.
Parameters:
desc - a String describing the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsupportedEncodingException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class UnsupportedEncodingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.UnsupportedEncodingException
All Implemented Interfaces:
Serializable
public class UnsupportedEncodingException
extends IOException

The Character Encoding is not supported.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
UnsupportedEncodingException()
Constructs an UnsupportedEncodingException without a detail message.
UnsupportedEncodingException(String s)
Constructs an UnsupportedEncodingException with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedEncodingException

public UnsupportedEncodingException()
Constructs an UnsupportedEncodingException without a detail message.

UnsupportedEncodingException

public UnsupportedEncodingException(String s)
Constructs an UnsupportedEncodingException with a detail message.
Parameters:
s - Describes the reason for the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UTFDataFormatException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.io
Class UTFDataFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.UTFDataFormatException
All Implemented Interfaces:
Serializable
public class UTFDataFormatException
extends IOException

Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface. See the writeUTF method for the format in which UTF-8 strings are read and written.

Since:
JDK1.0
See Also:
DataInput, DataInputStream.readUTF(java.io.DataInput), IOException, Serialized Form

Constructor Summary
UTFDataFormatException()
Constructs a UTFDataFormatException with null as its error detail message.
UTFDataFormatException(String s)
Constructs a UTFDataFormatException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UTFDataFormatException

public UTFDataFormatException()
Constructs a UTFDataFormatException with null as its error detail message.

UTFDataFormatException

public UTFDataFormatException(String s)
Constructs a UTFDataFormatException with the specified detail message. The string s can be retrieved later by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WriteAbortedException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Class WriteAbortedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.io.ObjectStreamException
                          |
                          +--java.io.WriteAbortedException
All Implemented Interfaces:
Serializable
public class WriteAbortedException
extends ObjectStreamException

Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
 Exception detail
Exception that was caught while writing the ObjectStream.
Constructor Summary
WriteAbortedException(String s, Exception ex)
Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation.
Method Summary
 String getMessage()
Produce the message and include the message from the nested exception, if there is one.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

detail

public Exception detail
Exception that was caught while writing the ObjectStream.
Constructor Detail

WriteAbortedException

public WriteAbortedException(String s,
                             Exception ex)
Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation. The exception that terminated the write can be found in the detail field. The stream is reset to it's initial state andd all references to objects already deserialized are discarded.
Parameters:
s - String describing the exception.
ex - Exception causing the abort.
Method Detail

getMessage

public String getMessage()
Produce the message and include the message from the nested exception, if there is one.
Overrides:
getMessage in class Throwable
Following copied from class: java.lang.Throwable
Returns:
the error message string of this Throwable object if it was created with an error message string; or null if it was created with no error message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Writer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.io
Class Writer

java.lang.Object
  |
  +--java.io.Writer
Direct Known Subclasses:
BufferedWriter, CharArrayWriter, FilterWriter, OutputStreamWriter, PipedWriter, PrintWriter, StringWriter
public abstract class Writer
extends Object

Abstract class for writing to character streams. The only methods that a subclass must implement are write(char[], int, int), flush(), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.

Since:
JDK1.1
See Also:
Writer, BufferedWriter, CharArrayWriter, FilterWriter, OutputStreamWriter, FileWriter, PipedWriter, PrintWriter, StringWriter, Reader

Field Summary
protected  Object lock
The object used to synchronize operations on this stream.
Constructor Summary
protected | Writer() Create a new character-stream writer whose critical sections will synchronize on the writer itself.
protected | Writer(Object lock) Create a new character-stream writer whose critical sections will synchronize on the given object.
Method Summary
abstract void | close() Close the stream, flushing it first.
abstract void | flush() Flush the stream.
void | write(char[] cbuf) Write an array of characters.
abstract void | write(char[] cbuf, int off, int len) Write a portion of an array of characters.
void | write(int c) Write a single character.
void | write(String str) Write a string.
void | write(String str, int off, int len) Write a portion of a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lock

protected Object lock
The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
Constructor Detail

Writer

protected Writer()
Create a new character-stream writer whose critical sections will synchronize on the writer itself.

Writer

protected Writer(Object lock)
Create a new character-stream writer whose critical sections will synchronize on the given object.
Parameters:
lock - Object to synchronize on.
Method Detail

write

public void write(int c)
           throws IOException
Write a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.

Subclasses that intend to support efficient single-character output should override this method.

Parameters:
c - int specifying a character to be written.
Throws:
IOException - If an I/O error occurs

write

public void write(char[] cbuf)
           throws IOException
Write an array of characters.
Parameters:
cbuf - Array of characters to be written
Throws:
IOException - If an I/O error occurs

write

public abstract void write(char[] cbuf,
                           int off,
                           int len)
                    throws IOException
Write a portion of an array of characters.
Parameters:
cbuf - Array of characters
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

write

public void write(String str)
           throws IOException
Write a string.
Parameters:
str - String to be written
Throws:
IOException - If an I/O error occurs

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Write a portion of a string.
Parameters:
str - A String
off - Offset from which to start writing characters
len - Number of characters to write
Throws:
IOException - If an I/O error occurs

flush

public abstract void flush()
                    throws IOException
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
Throws:
IOException - If an I/O error occurs

close

public abstract void close()
                    throws IOException
Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.
Throws:
IOException - If an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Cloneable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Interface Cloneable

All Known Subinterfaces:
AclEntry, Attribute, AttributedCharacterIterator, Attributes, CharacterIterator, Name
public interface Cloneable

A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.

Attempts to clone instances that do not implement the Cloneable interface result in the exception CloneNotSupportedException being thrown.

The interface Cloneable declares no methods.

Since:
JDK1.0
See Also:
CloneNotSupportedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.lang Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.lang

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Boolean (implements java.io.Serializable)
    • class java.lang.Character (implements java.lang.Comparable, java.io.Serializable)
    • class java.lang.Character.Subset
      • class java.lang.Character.UnicodeBlock
    • class java.lang.Class (implements java.io.Serializable)
    • class java.lang.ClassLoader
    • class java.lang.Compiler
    • class java.lang.Math
    • class java.lang.Number (implements java.io.Serializable)
      • class java.lang.Byte (implements java.lang.Comparable)
      • class java.lang.Double (implements java.lang.Comparable)
      • class java.lang.Float (implements java.lang.Comparable)
      • class java.lang.Integer (implements java.lang.Comparable)
      • class java.lang.Long (implements java.lang.Comparable)
      • class java.lang.Short (implements java.lang.Comparable)
    • class java.lang.Package
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.lang.RuntimePermission
    • class java.lang.Process
    • class java.lang.Runtime
    • class java.lang.SecurityManager
    • class java.lang.StrictMath
    • class java.lang.String (implements java.lang.Comparable, java.io.Serializable)
    • class java.lang.StringBuffer (implements java.io.Serializable)
    • class java.lang.System
    • class java.lang.Thread (implements java.lang.Runnable)
    • class java.lang.ThreadGroup
    • class java.lang.ThreadLocal
      • class java.lang.InheritableThreadLocal
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Error
        • class java.lang.LinkageError
          • class java.lang.ClassCircularityError
          • class java.lang.ClassFormatError
            • class java.lang.UnsupportedClassVersionError
          • class java.lang.ExceptionInInitializerError
          • class java.lang.IncompatibleClassChangeError
            • class java.lang.AbstractMethodError
            • class java.lang.IllegalAccessError
            • class java.lang.InstantiationError
            • class java.lang.NoSuchFieldError
            • class java.lang.NoSuchMethodError
          • class java.lang.NoClassDefFoundError
          • class java.lang.UnsatisfiedLinkError
          • class java.lang.VerifyError
        • class java.lang.ThreadDeath
        • class java.lang.VirtualMachineError
          • class java.lang.InternalError
          • class java.lang.OutOfMemoryError
          • class java.lang.StackOverflowError
          • class java.lang.UnknownError
      • class java.lang.Exception
        • class java.lang.ClassNotFoundException
        • class java.lang.CloneNotSupportedException
        • class java.lang.IllegalAccessException
        • class java.lang.InstantiationException
        • class java.lang.InterruptedException
        • class java.lang.NoSuchFieldException
        • class java.lang.NoSuchMethodException
        • class java.lang.RuntimeException
          • class java.lang.ArithmeticException
          • class java.lang.ArrayStoreException
          • class java.lang.ClassCastException
          • class java.lang.IllegalArgumentException
            • class java.lang.IllegalThreadStateException
            • class java.lang.NumberFormatException
          • class java.lang.IllegalMonitorStateException
          • class java.lang.IllegalStateException
          • class java.lang.IndexOutOfBoundsException
            • class java.lang.ArrayIndexOutOfBoundsException
            • class java.lang.StringIndexOutOfBoundsException
          • class java.lang.NegativeArraySizeException
          • class java.lang.NullPointerException
          • class java.lang.SecurityException
          • class java.lang.UnsupportedOperationException
    • class java.lang.Void

Interface Hierarchy

  • interface java.lang.Cloneable
  • interface java.lang.Comparable
  • interface java.lang.Runnable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package java.lang

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.lang

Packages that use java.lang
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref | Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in java.lang used by java.applet
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.awt
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Error
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalStateException
Signals that a method has been invoked at an illegal or inappropriate time.
IndexOutOfBoundsException
Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
NumberFormatException
Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.color
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.datatransfer
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.dnd
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalStateException
Signals that a method has been invoked at an illegal or inappropriate time.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.event
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
String
The String class represents character strings.

Classes in java.lang used by java.awt.font
Boolean
The Boolean class wraps a value of the primitive type boolean in an object.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Float
The Float class wraps a value of primitive type float in an object.
Integer
The Integer class wraps a value of the primitive type int in an object.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.awt.geom
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.im
Character.Subset
Instances of this class represent particular subsets of the Unicode character set.
Object
Class Object is the root of the class hierarchy.

Classes in java.lang used by java.awt.im.spi
Character.Subset
Instances of this class represent particular subsets of the Unicode character set.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.awt.image
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.awt.image.renderable
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
String
The String class represents character strings.

Classes in java.lang used by java.awt.print
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
IndexOutOfBoundsException
Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
NullPointerException
Thrown when an application attempts to use null in a case where an object is required.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.beans
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Object
Class Object is the root of the class hierarchy.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.beans.beancontext
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.io
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Object
Class Object is the root of the class hierarchy.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
StringBuffer
A string buffer implements a mutable sequence of characters.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.lang
Boolean
The Boolean class wraps a value of the primitive type boolean in an object.
Byte
The Byte class is the standard wrapper for byte values.
Character
The Character class wraps a value of the primitive type char in an object.
Character.Subset
Instances of this class represent particular subsets of the Unicode character set.
Character.UnicodeBlock
A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassFormatError
Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Double
The Double class wraps a value of the primitive type double in an object.
Error
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Float
The Float class wraps a value of primitive type float in an object.
IllegalAccessException
Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
IncompatibleClassChangeError
Thrown when an incompatible class change has occurred to some class definition.
IndexOutOfBoundsException
Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
InstantiationException
Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
Integer
The Integer class wraps a value of the primitive type int in an object.
InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
LinkageError
Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
Long
The Long class wraps a value of the primitive type long in an object.
NoSuchFieldException
Signals that the class doesn't have a field of a specified name.
NoSuchMethodException
Thrown when a particular method cannot be found.
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
NumberFormatException
Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
Object
Class Object is the root of the class hierarchy.
Package
Package objects contain version information about the implementation and specification of a Java package.
Process
The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
Runtime
Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
SecurityException
Thrown by the security manager to indicate a security violation.
SecurityManager
The security manager is a class that allows applications to implement a security policy.
Short
The Short class is the standard wrapper for short values.
String
The String class represents character strings.
StringBuffer
A string buffer implements a mutable sequence of characters.
Thread
A thread is a thread of execution in a program.
ThreadGroup
A thread group represents a set of threads.
ThreadLocal
This class provides ThreadLocal variables.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.
VirtualMachineError
Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Classes in java.lang used by java.lang.ref
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
Object
Class Object is the root of the class hierarchy.

Classes in java.lang used by java.lang.reflect
ArrayIndexOutOfBoundsException
Thrown to indicate that an array has been accessed with an illegal index.
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalAccessException
Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
InstantiationException
Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
NegativeArraySizeException
Thrown if an application tries to create an array with negative size.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.math
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.net
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Object
Class Object is the root of the class hierarchy.
Package
Package objects contain version information about the implementation and specification of a Java package.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.rmi
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Error
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
SecurityException
Thrown by the security manager to indicate a security violation.
SecurityManager
The security manager is a class that allows applications to implement a security policy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.rmi.activation
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.rmi.dgc
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.rmi.registry
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by java.rmi.server
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.security
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.security.acl
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.security.cert
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.security.spec
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.sql
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.text
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
StringBuffer
A string buffer implements a mutable sequence of characters.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.util
ClassLoader
The class ClassLoader is an abstract class.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Comparable
This interface imposes a total ordering on the objects of each class that implements it.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.util.jar
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by java.util.zip
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.accessibility
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.naming
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.naming.directory
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.naming.event
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.naming.ldap
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.naming.spi
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.rmi
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassCastException
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
Object
Class Object is the root of the class hierarchy.

Classes in java.lang used by javax.rmi.CORBA
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassCastException
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.sound.midi
ArrayIndexOutOfBoundsException
Thrown to indicate that an array has been accessed with an illegal index.
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.sound.midi.spi
Object
Class Object is the root of the class hierarchy.

Classes in java.lang used by javax.sound.sampled
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.sound.sampled.spi
Object
Class Object is the root of the class hierarchy.

Classes in java.lang used by javax.swing
Boolean
The Boolean class wraps a value of the primitive type boolean in an object.
Character
The Character class wraps a value of the primitive type char in an object.
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader
The class ClassLoader is an abstract class.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalAccessException
Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
InstantiationException
Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
Integer
The Integer class wraps a value of the primitive type int in an object.
InterruptedException
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
Number
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
SecurityException
Thrown by the security manager to indicate a security violation.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.swing.border
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.colorchooser
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.event
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.filechooser
Boolean
The Boolean class wraps a value of the primitive type boolean in an object.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.plaf
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.plaf.basic
Boolean
The Boolean class wraps a value of the primitive type boolean in an object.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.plaf.metal
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.plaf.multi
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.table
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.text
Class
Instances of the class Class represent classes and interfaces in a running Java application.
ClassNotFoundException
Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
String
The String class represents character strings.
Thread
A thread is a thread of execution in a program.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.swing.text.html
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.text.html.parser
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
StringBuffer
A string buffer implements a mutable sequence of characters.

Classes in java.lang used by javax.swing.text.rtf
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by javax.swing.tree
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Cloneable
A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
CloneNotSupportedException
Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.swing.undo
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by javax.transaction
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CORBA
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CORBA_2_3.portable
Class
Instances of the class Class represent classes and interfaces in a running Java application.

Classes in java.lang used by org.omg.CORBA.DynAnyPackage
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CORBA.ORBPackage
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CORBA.portable
Class
Instances of the class Class represent classes and interfaces in a running Java application.
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
RuntimeException
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CORBA.TypeCodePackage
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.CosNaming
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Classes in java.lang used by org.omg.CosNaming.NamingContextPackage
Exception
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.
Throwable
The Throwable class is the superclass of all errors and exceptions in the Java language.

Classes in java.lang used by org.omg.stub.java.rmi
Object
Class Object is the root of the class hierarchy.
String
The String class represents character strings.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractMethodError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class AbstractMethodError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
                          |
                          +--java.lang.AbstractMethodError
All Implemented Interfaces:
Serializable
public class AbstractMethodError
extends IncompatibleClassChangeError

Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
AbstractMethodError()
Constructs an AbstractMethodError with no detail message.
AbstractMethodError(String s)
Constructs an AbstractMethodError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractMethodError

public AbstractMethodError()
Constructs an AbstractMethodError with no detail message.

AbstractMethodError

public AbstractMethodError(String s)
Constructs an AbstractMethodError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArithmeticException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ArithmeticException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.ArithmeticException
All Implemented Interfaces:
Serializable
public class ArithmeticException
extends RuntimeException

Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ArithmeticException()
Constructs an ArithmeticException with no detail message.
ArithmeticException(String s)
Constructs an ArithmeticException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ArithmeticException

public ArithmeticException()
Constructs an ArithmeticException with no detail message.

ArithmeticException

public ArithmeticException(String s)
Constructs an ArithmeticException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArrayIndexOutOfBoundsException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ArrayIndexOutOfBoundsException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IndexOutOfBoundsException
                          |
                          +--java.lang.ArrayIndexOutOfBoundsException
All Implemented Interfaces:
Serializable
public class ArrayIndexOutOfBoundsException
extends IndexOutOfBoundsException

Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ArrayIndexOutOfBoundsException()
Constructs an ArrayIndexOutOfBoundsException with no detail message.
ArrayIndexOutOfBoundsException(int index)
Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
ArrayIndexOutOfBoundsException(String s)
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException()
Constructs an ArrayIndexOutOfBoundsException with no detail message.

ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException(int index)
Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
Parameters:
index - the illegal index.

ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException(String s)
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArrayStoreException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ArrayStoreException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.ArrayStoreException
All Implemented Interfaces:
Serializable
public class ArrayStoreException
extends RuntimeException

Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. For example, the following code generates an ArrayStoreException:

     Object x[] = new String[3];
     x[0] = new Integer(0);

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ArrayStoreException()
Constructs an ArrayStoreException with no detail message.
ArrayStoreException(String s)
Constructs an ArrayStoreException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ArrayStoreException

public ArrayStoreException()
Constructs an ArrayStoreException with no detail message.

ArrayStoreException

public ArrayStoreException(String s)
Constructs an ArrayStoreException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Boolean

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Boolean

java.lang.Object
  |
  +--java.lang.Boolean
All Implemented Interfaces:
Serializable
public final class Boolean
extends Object
implements Serializable

The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean.

In addition, this class provides many methods for converting a boolean to a String and a String to a boolean, as well as other constants and methods useful when dealing with a boolean.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static Boolean | FALSE The Boolean object corresponding to the primitive value false.
static Boolean | TRUE The Boolean object corresponding to the primitive value true.
static Class | TYPE The Class object representing the primitive type boolean.
Constructor Summary
Boolean(boolean value)
Allocates a Boolean object representing the value argument.
Boolean(String s)
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".
Method Summary
boolean | booleanValue() Returns the value of this Boolean object as a boolean primitive.
boolean | equals(Object obj) Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
static boolean | getBoolean(String name) Returns true if and only if the system property named by the argument exists and is equal to the string "true".
int | hashCode() Returns a hash code for this Boolean object.
String | toString() Returns a String object representing this Boolean's value.
static Boolean | valueOf(String s) Returns a Boolean with a value represented by the specified String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

TRUE

public static final Boolean TRUE
The Boolean object corresponding to the primitive value true.

FALSE

public static final Boolean FALSE
The Boolean object corresponding to the primitive value false.

TYPE

public static final Class TYPE
The Class object representing the primitive type boolean.
Since:
JDK1.1
Constructor Detail

Boolean

public Boolean(boolean value)
Allocates a Boolean object representing the value argument.
Parameters:
value - the value of the Boolean.

Boolean

public Boolean(String s)
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true". Otherwise, allocate a Boolean object representing the value false. Examples:

new Boolean("True") produces a Boolean object that represents true.
new Boolean("yes") produces a Boolean object that represents false.

Parameters:
s - the string to be converted to a Boolean.
Method Detail

booleanValue

public boolean booleanValue()
Returns the value of this Boolean object as a boolean primitive.
Returns:
the primitive boolean value of this object.

valueOf

public static Boolean valueOf(String s)
Returns a Boolean with a value represented by the specified String. The Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".

Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.

Parameters:
s - a string.
Returns:
the Boolean value represented by the string.

toString

public String toString()
Returns a String object representing this Boolean's value. If this object represents the value true, a string equal to "true" is returned. Otherwise, a string equal to "false" is returned.
Overrides:
toString in class Object
Returns:
a string representation of this object.

hashCode

public int hashCode()
Returns a hash code for this Boolean object.
Overrides:
hashCode in class Object
Returns:
the integer 1231 if this object represents true; returns the integer 1237 if this object represents false.

equals

public boolean equals(Object obj)
Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the Boolean objects represent the same value; false otherwise.

getBoolean

public static boolean getBoolean(String name)
Returns true if and only if the system property named by the argument exists and is equal to the string "true". (Beginning with version 1.0.2 of the JavaTM platform, the test of this string is case insensitive.) A system property is accessible through getProperty, a method defined by the System class.

If there is no property with the specified name, or if the specified name is empty or null, then false is returned.

Parameters:
name - the system property name.
Returns:
the boolean value of the system property.
See Also:
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Byte

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Byte

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Byte
All Implemented Interfaces:
Comparable, Serializable
public final class Byte
extends Number
implements Comparable

The Byte class is the standard wrapper for byte values.

Since:
JDK1.1
See Also:
Number, Serialized Form

Field Summary
static byte | MAX_VALUE The maximum value a Byte can have.
static byte | MIN_VALUE The minimum value a Byte can have.
static Class | TYPE The Class object representing the primitive type byte.
Constructor Summary
Byte(byte value)
Constructs a Byte object initialized to the specified byte value.
Byte(String s)
Constructs a Byte object initialized to the value specified by the String parameter.
Method Summary
byte | byteValue() Returns the value of this Byte as a byte.
int | compareTo(Byte anotherByte) Compares two Bytes numerically.
int | compareTo(Object o) Compares this Byte to another Object.
static Byte | decode(String nm) Decodes a String into a Byte.
double | doubleValue() Returns the value of this Byte as a double.
boolean | equals(Object obj) Compares this object to the specified object.
float | floatValue() Returns the value of this Byte as a float.
int | hashCode() Returns a hashcode for this Byte.
int | intValue() Returns the value of this Byte as an int.
long | longValue() Returns the value of this Byte as a long.
static byte | parseByte(String s) Assuming the specified String represents a byte, returns that byte's value.
static byte | parseByte(String s, int radix) Assuming the specified String represents a byte, returns that byte's value.
short | shortValue() Returns the value of this Byte as a short.
String | toString() Returns a String object representing this Byte's value.
static String | toString(byte b) Returns a new String object representing the specified Byte.
static Byte | valueOf(String s) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte | valueOf(String s, int radix) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MIN_VALUE

public static final byte MIN_VALUE
The minimum value a Byte can have.

MAX_VALUE

public static final byte MAX_VALUE
The maximum value a Byte can have.

TYPE

public static final Class TYPE
The Class object representing the primitive type byte.
Constructor Detail

Byte

public Byte(byte value)
Constructs a Byte object initialized to the specified byte value.
Parameters:
value - the initial value of the Byte

Byte

public Byte(String s)
     throws NumberFormatException
Constructs a Byte object initialized to the value specified by the String parameter. The radix is assumed to be 10.
Parameters:
s - the String to be converted to a Byte
Throws:
NumberFormatException - If the String does not contain a parsable byte.
Method Detail

toString

public static String toString(byte b)
Returns a new String object representing the specified Byte. The radix is assumed to be 10.
Parameters:
b - the byte to be converted
Returns:
the string representation of the specified byte

parseByte

public static byte parseByte(String s)
                      throws NumberFormatException
Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.
Parameters:
s - the String containing the byte
Returns:
the parsed value of the byte
Throws:
NumberFormatException - If the string does not contain a parsable byte.

parseByte

public static byte parseByte(String s,
                             int radix)
                      throws NumberFormatException
Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte.
Parameters:
s - the String containing the byte
radix - the radix to be used
Returns:
the parsed value of the byte
Throws:
NumberFormatException - If the String does not contain a parsable byte.

valueOf

public static Byte valueOf(String s,
                           int radix)
                    throws NumberFormatException
Assuming the specified String represents a byte, returns a new Byte object initialized to that value. Throws an exception if the String cannot be parsed as a byte.
Parameters:
s - the String containing the integer
radix - the radix to be used
Returns:
the Byte instance representing the parsed byte value
Throws:
NumberFormatException - If the String does not contain a parsable byte.

valueOf

public static Byte valueOf(String s)
                    throws NumberFormatException
Assuming the specified String represents a byte, returns a new Byte object initialized to that value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.
Parameters:
s - the String containing the integer
Returns:
the Byte instance representing the parsed byte value
Throws:
NumberFormatException - If the String does not contain a parsable byte.

decode

public static Byte decode(String nm)
                   throws NumberFormatException
Decodes a String into a Byte. Accepts decimal, hexadecimal, and octal numbers, in the following formats:
     [-]       decimal constant
     [-] 0x    hex constant
     [-] #     hex constant
     [-] 0     octal constant
The constant following an (optional) negative sign and/or "radix specifier" is parsed as by the Byte.parseByte method with the specified radix (10, 8 or 16). This constant must be positive or a NumberFormatException will result. The result is made negative if first character of the specified String is the negative sign. No whitespace characters are permitted in the String.
Parameters:
nm - the String to decode.
Returns:
the Byte represented by the specified string.
Throws:
NumberFormatException - if the String does not contain a parsable byte.
See Also:
parseByte(String, int)

byteValue

public byte byteValue()
Returns the value of this Byte as a byte.
Overrides:
byteValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type byte.

shortValue

public short shortValue()
Returns the value of this Byte as a short.
Overrides:
shortValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type short.

intValue

public int intValue()
Returns the value of this Byte as an int.
Overrides:
intValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type int.

longValue

public long longValue()
Returns the value of this Byte as a long.
Overrides:
longValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public float floatValue()
Returns the value of this Byte as a float.
Overrides:
floatValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public double doubleValue()
Returns the value of this Byte as a double.
Overrides:
doubleValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type double.

toString

public String toString()
Returns a String object representing this Byte's value.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

hashCode

public int hashCode()
Returns a hashcode for this Byte.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compares this object to the specified object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with
Returns:
true if the objects are the same; false otherwise.

compareTo

public int compareTo(Byte anotherByte)
Compares two Bytes numerically.
Parameters:
anotherByte - the Byte to be compared.
Returns:
the value 0 if the argument Byte is equal to this Byte; a value less than 0 if this Byte is numerically less than the Byte argument; and a value greater than 0 if this Byte is numerically greater than the Byte argument (signed comparison).
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Byte to another Object. If the Object is a Byte, this function behaves like compareTo(Byte). Otherwise, it throws a ClassCastException (as Bytes are comparable only to other Bytes).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Byte numerically equal to this Byte; a value less than 0 if the argument is a Byte numerically greater than this Byte; and a value greater than 0 if the argument is a Byte numerically less than this Byte.
Throws:
ClassCastException - if the argument is not a Byte.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Character

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Character

java.lang.Object
  |
  +--java.lang.Character
All Implemented Interfaces:
Comparable, Serializable
public final class Character
extends Object
implements Serializable, Comparable

The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field whose type is char.

In addition, this class provides several methods for determining the type of a character and converting characters from uppercase to lowercase and vice versa.

Many of the methods of class Character are defined in terms of a "Unicode attribute table" that specifies a name for every defined Unicode code point. The table also includes other attributes, such as a decimal value, an uppercase equivalent, a lowercase equivalent, and/or a titlecase equivalent. The character attribute tables for specific versions of Unicode are available on the World Wide Web in various subdirectories of:

   ftp://ftp.unicode.org/Public/

For a more detailed specification of the Character class, one that encompasses the exact behavior of methods such as isDigit, isLetter, isLowerCase, and isUpperCase over the full range of Unicode values, see Gosling, Joy, and Steele, The Java Language Specification.

Since:
JDK1.0
See Also:
Serialized Form

Inner Class Summary
static class | Character.Subset Instances of this class represent particular subsets of the Unicode character set.
static class | Character.UnicodeBlock A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.
Field Summary
static byte | COMBINING_SPACING_MARK Public data for enumerated Unicode general category types.
static byte | CONNECTOR_PUNCTUATION Public data for enumerated Unicode general category types.
static byte | CONTROL Public data for enumerated Unicode general category types.
static byte | CURRENCY_SYMBOL Public data for enumerated Unicode general category types.
static byte | DASH_PUNCTUATION Public data for enumerated Unicode general category types.
static byte | DECIMAL_DIGIT_NUMBER Public data for enumerated Unicode general category types.
static byte | ENCLOSING_MARK Public data for enumerated Unicode general category types.
static byte | END_PUNCTUATION Public data for enumerated Unicode general category types.
static byte | FORMAT Public data for enumerated Unicode general category types.
static byte | LETTER_NUMBER Public data for enumerated Unicode general category types.
static byte | LINE_SEPARATOR Public data for enumerated Unicode general category types.
static byte | LOWERCASE_LETTER Public data for enumerated Unicode general category types.
static byte | MATH_SYMBOL Public data for enumerated Unicode general category types.
static int | MAX_RADIX The maximum radix available for conversion to and from Strings.
static char | MAX_VALUE The constant value of this field is the largest value of type char.
static int | MIN_RADIX The minimum radix available for conversion to and from Strings.
static char | MIN_VALUE The constant value of this field is the smallest value of type char.
static byte | MODIFIER_LETTER Public data for enumerated Unicode general category types.
static byte | MODIFIER_SYMBOL Public data for enumerated Unicode general category types.
static byte | NON_SPACING_MARK Public data for enumerated Unicode general category types.
static byte | OTHER_LETTER Public data for enumerated Unicode general category types.
static byte | OTHER_NUMBER Public data for enumerated Unicode general category types.
static byte | OTHER_PUNCTUATION Public data for enumerated Unicode general category types.
static byte | OTHER_SYMBOL Public data for enumerated Unicode general category types.
static byte | PARAGRAPH_SEPARATOR Public data for enumerated Unicode general category types.
static byte | PRIVATE_USE Public data for enumerated Unicode general category types.
static byte | SPACE_SEPARATOR Public data for enumerated Unicode general category types.
static byte | START_PUNCTUATION Public data for enumerated Unicode general category types.
static byte | SURROGATE Public data for enumerated Unicode general category types.
static byte | TITLECASE_LETTER Public data for enumerated Unicode general category types.
static Class | TYPE The Class object representing the primitive type char.
static byte | UNASSIGNED Public data for enumerated Unicode general category types.
static byte | UPPERCASE_LETTER Public data for enumerated Unicode general category types.
Constructor Summary
Character(char value)
Constructs a Character object and initializes it so that it represents the primitive value argument.
Method Summary
char | charValue() Returns the value of this Character object.
int | compareTo(Character anotherCharacter) Compares two Characters numerically.
int | compareTo(Object o) Compares this Character to another Object.
static int | digit(char ch, int radix) Returns the numeric value of the character ch in the specified radix.
boolean | equals(Object obj) Compares this object against the specified object.
static char | forDigit(int digit, int radix) Determines the character representation for a specific digit in the specified radix.
static int | getNumericValue(char ch) Returns the Unicode numeric value of the character as a nonnegative integer.
static int | getType(char ch) Returns a value indicating a character category.
int | hashCode() Returns a hash code for this Character.
static boolean | isDefined(char ch) Determines if a character has a defined meaning in Unicode.
static boolean | isDigit(char ch) Determines if the specified character is a digit.
static boolean | isIdentifierIgnorable(char ch) Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
static boolean | isISOControl(char ch) Determines if the specified character is an ISO control character.
static boolean | isJavaIdentifierPart(char ch) Determines if the specified character may be part of a Java identifier as other than the first character.
static boolean | isJavaIdentifierStart(char ch) Determines if the specified character is permissible as the first character in a Java identifier.
static boolean | isJavaLetter(char ch) Deprecated. Replaced by isJavaIdentifierStart(char).
static boolean | isJavaLetterOrDigit(char ch) Deprecated. Replaced by isJavaIdentifierPart(char).
static boolean | isLetter(char ch) Determines if the specified character is a letter.
static boolean | isLetterOrDigit(char ch) Determines if the specified character is a letter or digit.
static boolean | isLowerCase(char ch) Determines if the specified character is a lowercase character.
static boolean | isSpace(char ch) Deprecated. Replaced by isWhitespace(char).
static boolean | isSpaceChar(char ch) Determines if the specified character is a Unicode space character.
static boolean | isTitleCase(char ch) Determines if the specified character is a titlecase character.
static boolean | isUnicodeIdentifierPart(char ch) Determines if the specified character may be part of a Unicode identifier as other than the first character.
static boolean | isUnicodeIdentifierStart(char ch) Determines if the specified character is permissible as the first character in a Unicode identifier.
static boolean | isUpperCase(char ch) Determines if the specified character is an uppercase character.
static boolean | isWhitespace(char ch) Determines if the specified character is white space according to Java.
static char | toLowerCase(char ch) The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned.
String | toString() Returns a String object representing this character's value.
static char | toTitleCase(char ch) Converts the character argument to titlecase.
static char | toUpperCase(char ch) Converts the character argument to uppercase.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MIN_RADIX

public static final int MIN_RADIX
The minimum radix available for conversion to and from Strings. The constant value of this field is the smallest value permitted for the radix argument in radix-conversion methods such as the digit method, the forDigit method, and the toString method of class Integer.
See Also:
digit(char, int),
forDigit(int, int),
Integer.toString(int, int),
Integer.valueOf(java.lang.String)

MAX_RADIX

public static final int MAX_RADIX
The maximum radix available for conversion to and from Strings. The constant value of this field is the largest value permitted for the radix argument in radix-conversion methods such as the digit method, the forDigit method, and the toString method of class Integer.
See Also:
digit(char, int),
forDigit(int, int),
Integer.toString(int, int),
Integer.valueOf(java.lang.String)

MIN_VALUE

public static final char MIN_VALUE
The constant value of this field is the smallest value of type char.
Since:
JDK1.0.2

MAX_VALUE

public static final char MAX_VALUE
The constant value of this field is the largest value of type char.
Since:
JDK1.0.2

TYPE

public static final Class TYPE
The Class object representing the primitive type char.
Since:
JDK1.1

UNASSIGNED

public static final byte UNASSIGNED
Public data for enumerated Unicode general category types.
Since:
JDK1.1

UPPERCASE_LETTER

public static final byte UPPERCASE_LETTER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

LOWERCASE_LETTER

public static final byte LOWERCASE_LETTER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

TITLECASE_LETTER

public static final byte TITLECASE_LETTER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

MODIFIER_LETTER

public static final byte MODIFIER_LETTER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

OTHER_LETTER

public static final byte OTHER_LETTER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

NON_SPACING_MARK

public static final byte NON_SPACING_MARK
Public data for enumerated Unicode general category types.
Since:
JDK1.1

ENCLOSING_MARK

public static final byte ENCLOSING_MARK
Public data for enumerated Unicode general category types.
Since:
JDK1.1

COMBINING_SPACING_MARK

public static final byte COMBINING_SPACING_MARK
Public data for enumerated Unicode general category types.
Since:
JDK1.1

DECIMAL_DIGIT_NUMBER

public static final byte DECIMAL_DIGIT_NUMBER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

LETTER_NUMBER

public static final byte LETTER_NUMBER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

OTHER_NUMBER

public static final byte OTHER_NUMBER
Public data for enumerated Unicode general category types.
Since:
JDK1.1

SPACE_SEPARATOR

public static final byte SPACE_SEPARATOR
Public data for enumerated Unicode general category types.
Since:
JDK1.1

LINE_SEPARATOR

public static final byte LINE_SEPARATOR
Public data for enumerated Unicode general category types.
Since:
JDK1.1

PARAGRAPH_SEPARATOR

public static final byte PARAGRAPH_SEPARATOR
Public data for enumerated Unicode general category types.
Since:
JDK1.1

CONTROL

public static final byte CONTROL
Public data for enumerated Unicode general category types.
Since:
JDK1.1

FORMAT

public static final byte FORMAT
Public data for enumerated Unicode general category types.
Since:
JDK1.1

PRIVATE_USE

public static final byte PRIVATE_USE
Public data for enumerated Unicode general category types.
Since:
JDK1.1

SURROGATE

public static final byte SURROGATE
Public data for enumerated Unicode general category types.
Since:
JDK1.1

DASH_PUNCTUATION

public static final byte DASH_PUNCTUATION
Public data for enumerated Unicode general category types.
Since:
JDK1.1

START_PUNCTUATION

public static final byte START_PUNCTUATION
Public data for enumerated Unicode general category types.
Since:
JDK1.1

END_PUNCTUATION

public static final byte END_PUNCTUATION
Public data for enumerated Unicode general category types.
Since:
JDK1.1

CONNECTOR_PUNCTUATION

public static final byte CONNECTOR_PUNCTUATION
Public data for enumerated Unicode general category types.
Since:
JDK1.1

OTHER_PUNCTUATION

public static final byte OTHER_PUNCTUATION
Public data for enumerated Unicode general category types.
Since:
JDK1.1

MATH_SYMBOL

public static final byte MATH_SYMBOL
Public data for enumerated Unicode general category types.
Since:
JDK1.1

CURRENCY_SYMBOL

public static final byte CURRENCY_SYMBOL
Public data for enumerated Unicode general category types.
Since:
JDK1.1

MODIFIER_SYMBOL

public static final byte MODIFIER_SYMBOL
Public data for enumerated Unicode general category types.
Since:
JDK1.1

OTHER_SYMBOL

public static final byte OTHER_SYMBOL
Public data for enumerated Unicode general category types.
Since:
JDK1.1
Constructor Detail

Character

public Character(char value)
Constructs a Character object and initializes it so that it represents the primitive value argument.
Parameters:
value - value for the new Character object.
Method Detail

charValue

public char charValue()
Returns the value of this Character object.
Returns:
the primitive char value represented by this object.

hashCode

public int hashCode()
Returns a hash code for this Character.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Character object that represents the same char value as this object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

toString

public String toString()
Returns a String object representing this character's value. Converts this Character object to a string. The result is a string whose length is 1. The string's sole component is the primitive char value represented by this object.
Overrides:
toString in class Object
Returns:
a string representation of this object.

isLowerCase

public static boolean isLowerCase(char ch)
Determines if the specified character is a lowercase character. A character is lowercase if it is not in the range '\u2000' through '\u2FFF', the Unicode attribute table does not specify a mapping to lowercase for the character, and at least one of the following is true:
  • The attribute table specifies a mapping to uppercase for the character.
  • The name for the character contains the words "SMALL LETTER".
  • The name for the character contains the words "SMALL LIGATURE".

A character is considered to be lowercase if and only if it is specified to be lowercase by the Unicode 2.0 standard (category "Ll" in the Unicode specification data file).

Of the ISO-LATIN-1 characters (character codes 0x0000 through 0x00FF), the following are lowercase:

 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
 \u00DF \u00E0 \u00E1 \u00E2 \u00E3 \u00E4 \u00E5 \u00E6 \u00E7
 \u00E8 \u00E9 \u00EA \u00EB \u00EC \u00ED \u00EE \u00EF \u00F0
 \u00F1 \u00F2 \u00F3 \u00F4 \u00F5 \u00F6 \u00F8 \u00F9 \u00FA
 \u00FB \u00FC \u00FD \u00FE \u00FF

Many other Unicode characters are lowercase, too.

Parameters:
ch - the character to be tested.
Returns:
true if the character is lowercase; false otherwise.
See Also:
isLowerCase(char), isTitleCase(char), toLowerCase(char)

isUpperCase

public static boolean isUpperCase(char ch)
Determines if the specified character is an uppercase character. A character is uppercase if it is not in the range '\u2000' through '\u2FFF', the Unicode attribute table does not specify a mapping to uppercase for the character, and at least one of the following is true:
  • The attribute table specifies a mapping to lowercase for the character.
  • The name for the character contains the words "CAPITAL LETTER".
  • The name for the character contains the words "CAPITAL LIGATURE".

Of the ISO-LATIN-1 characters (character codes 0x0000 through 0x00FF), the following are uppercase:

 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
 \u00C0 \u00C1 \u00C2 \u00C3 \u00C4 \u00C5 \u00C6 \u00C7
 \u00C8 \u00C9 \u00CA \u00CB \u00CC \u00CD \u00CE \u00CF \u00D0
 \u00D1 \u00D2 \u00D3 \u00D4 \u00D5 \u00D6 \u00D8 \u00D9 \u00DA
 \u00DB \u00DC \u00DD \u00DE

Many other Unicode characters are uppercase, too.

Parameters:
ch - the character to be tested.
Returns:
true if the character is uppercase; false otherwise.
Since:
1.0
See Also:
isLowerCase(char), isTitleCase(char), toUpperCase(char)

isTitleCase

public static boolean isTitleCase(char ch)
Determines if the specified character is a titlecase character. A character is considered to be titlecase if and only if it is specified to be titlecase by the Unicode 2.0 standard (category "Lt" in the Unicode specification data file).

The printed representations of four Unicode characters look like pairs of Latin letters. For example, there is an uppercase letter that looks like "LJ" and has a corresponding lowercase letter that looks like "lj". A third form, which looks like "Lj", is the appropriate form to use when rendering a word in lowercase with initial capitals, as for a book title.

These are the Unicode characters for which this method returns true:

  • LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
  • LATIN CAPITAL LETTER L WITH SMALL LETTER J
  • LATIN CAPITAL LETTER N WITH SMALL LETTER J
  • LATIN CAPITAL LETTER D WITH SMALL LETTER Z
Parameters:
ch - the character to be tested.
Returns:
true if the character is titlecase; false otherwise.
Since:
JDK1.0.2
See Also:
isLowerCase(char), isUpperCase(char), toTitleCase(char)

isDigit

public static boolean isDigit(char ch)
Determines if the specified character is a digit. A character is considered to be a digit if it is not in the range '\u2000' <= ch <= '\u2FFF' and its Unicode name contains the word "DIGIT". For a more complete specification that encompasses all Unicode characters that are defined as digits, see Gosling, Joy, and Steele, The Java Language Specification.

These are the ranges of Unicode characters that are considered digits:
0x0030 through 0x0039 | ISO-LATIN-1 digits ('0' through '9')
0x0660 through 0x0669 | Arabic-Indic digits
0x06F0 through 0x06F9 | Extended Arabic-Indic digits
0x0966 through 0x096F | Devanagari digits
0x09E6 through 0x09EF | Bengali digits
0x0A66 through 0x0A6F | Gurmukhi digits
0x0AE6 through 0x0AEF | Gujarati digits
0x0B66 through 0x0B6F | Oriya digits
0x0BE7 through 0x0BEF | Tamil digits
0x0C66 through 0x0C6F | Telugu digits
0x0CE6 through 0x0CEF | Kannada digits
0x0D66 through 0x0D6F | Malayalam digits
0x0E50 through 0x0E59 | Thai digits
0x0ED0 through 0x0ED9 | Lao digits
0x0F20 through 0x0F29 | Tibetan digits
0xFF10 through 0xFF19 | Fullwidth digits

Parameters:
ch - the character to be tested.
Returns:
true if the character is a digit; false otherwise.
See Also:
digit(char, int), forDigit(int, int)

isDefined

public static boolean isDefined(char ch)
Determines if a character has a defined meaning in Unicode. A character is defined if at least one of the following is true:
  • It has an entry in the Unicode attribute table.
  • Its value is in the range '\u3040' <= ch <= '\u9FA5'.
  • Its value is in the range '\uF900' <= ch <= '\uFA2D'.
Parameters:
ch - the character to be tested
Returns:
true if the character has a defined meaning in Unicode; false otherwise.
Since:
JDK1.0.2
See Also:
isDigit(char), isLetter(char), isLetterOrDigit(char), isLowerCase(char), isTitleCase(char), isUpperCase(char)

isLetter

public static boolean isLetter(char ch)
Determines if the specified character is a letter. For a more complete specification that encompasses all Unicode characters, see Gosling, Joy, and Steele, The Java Language Specification.

A character is considered to be a letter if and only if it is specified to be a letter by the Unicode 2.0 standard (category "Lu", "Ll", "Lt", "Lm", or "Lo" in the Unicode specification data file).

Note that most ideographic characters are considered to be letters (category "Lo") for this purpose.

Note also that not all letters have case: many Unicode characters are letters but are neither uppercase nor lowercase nor titlecase.

Parameters:
ch - the character to be tested.
Returns:
true if the character is a letter; false otherwise.
See Also:
isDigit(char), isJavaIdentifierStart(char), isJavaLetter(char), isJavaLetterOrDigit(char), isLetterOrDigit(char), isLowerCase(char), isTitleCase(char), isUnicodeIdentifierStart(char), isUpperCase(char)

isLetterOrDigit

public static boolean isLetterOrDigit(char ch)
Determines if the specified character is a letter or digit. For a more complete specification that encompasses all Unicode characters, see Gosling, Joy, and Steele, The Java Language Specification.

A character is considered to be a letter if and only if it is specified to be a letter or a digit by the Unicode 2.0 standard (category "Lu", "Ll", "Lt", "Lm", "Lo", or "Nd" in the Unicode specification data file). In other words, isLetterOrDigit is true of a character if and only if either isLetter is true of the character or isDigit is true of the character.

Parameters:
ch - the character to be tested.
Returns:
true if the character is a letter or digit; false otherwise.
Since:
JDK1.0.2
See Also:
isDigit(char), isJavaIdentifierPart(char), isJavaLetter(char), isJavaLetterOrDigit(char), isLetter(char), isUnicodeIdentifierPart(char)

isJavaLetter

public static boolean isJavaLetter(char ch)
Deprecated. Replaced by isJavaIdentifierStart(char).

Determines if the specified character is a "Java" letter, that is, the character is permissible as the first character in an identifier in the Java language.

A character is considered to be a Java letter if and only if it is a letter, the ASCII dollar sign character '$', or the underscore character '_'.

Parameters:
ch - the character to be tested.
Returns:
true if the character is a Java letter; false otherwise.
Since:
JDK1.0.2
See Also:
isJavaIdentifierStart(char), isJavaLetterOrDigit(char), isLetter(char), isLetterOrDigit(char), isUnicodeIdentifierStart(char)

isJavaLetterOrDigit

public static boolean isJavaLetterOrDigit(char ch)
Deprecated. Replaced by isJavaIdentifierPart(char).

Determines if the specified character is a "Java" letter or digit, that is, the character is permissible as a non-initial character in an identifier in the Java language.

A character is considered to be a Java letter or digit if and only if it is a letter, a digit, the ASCII dollar sign character '$', or the underscore character '_'.

Parameters:
ch - the character to be tested.
Returns:
true if the character is a Java letter or digit; false otherwise.
Since:
JDK1.0.2
See Also:
isJavaIdentifierPart(char), isJavaLetter(char), isLetter(char), isLetterOrDigit(char), isUnicodeIdentifierPart(char)

isJavaIdentifierStart

public static boolean isJavaIdentifierStart(char ch)
Determines if the specified character is permissible as the first character in a Java identifier. A character may start a Java identifier if and only if it is one of the following:
  • a letter
  • a currency symbol (such as "$")
  • a connecting punctuation character (such as "_").
Parameters:
ch - the character to be tested.
Returns:
true if the character may start a Java identifier; false otherwise.
Since:
JDK1.1
See Also:
isJavaIdentifierPart(char), isLetter(char), isUnicodeIdentifierStart(char)

isJavaIdentifierPart

public static boolean isJavaIdentifierPart(char ch)
Determines if the specified character may be part of a Java identifier as other than the first character. A character may be part of a Java identifier if and only if it is one of the following:
  • a letter
  • a currency symbol (such as "$")
  • a connecting punctuation character (such as "_").
  • a digit
  • a numeric letter (such as a Roman numeral character)
  • a combining mark
  • a non-spacing mark
  • an ignorable control character
Parameters:
ch - the character to be tested.
Returns:
true if the character may be part of a Unicode identifier; false otherwise.
Since:
JDK1.1
See Also:
isIdentifierIgnorable(char), isJavaIdentifierStart(char), isLetterOrDigit(char), isUnicodeIdentifierPart(char)

isUnicodeIdentifierStart

public static boolean isUnicodeIdentifierStart(char ch)
Determines if the specified character is permissible as the first character in a Unicode identifier. A character may start a Unicode identifier if and only if it is a letter.
Parameters:
ch - the character to be tested.
Returns:
true if the character may start a Unicode identifier; false otherwise.
Since:
JDK1.1
See Also:
isJavaIdentifierStart(char), isLetter(char), isUnicodeIdentifierPart(char)

isUnicodeIdentifierPart

public static boolean isUnicodeIdentifierPart(char ch)
Determines if the specified character may be part of a Unicode identifier as other than the first character. A character may be part of a Unicode identifier if and only if it is one of the following:
  • a letter
  • a connecting punctuation character (such as "_").
  • a digit
  • a numeric letter (such as a Roman numeral character)
  • a combining mark
  • a non-spacing mark
  • an ignorable control character
Parameters:
ch - the character to be tested.
Returns:
true if the character may be part of a Unicode identifier; false otherwise.
Since:
JDK1.1
See Also:
isIdentifierIgnorable(char), isJavaIdentifierPart(char), isLetterOrDigit(char), isUnicodeIdentifierStart(char)

isIdentifierIgnorable

public static boolean isIdentifierIgnorable(char ch)
Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. The following Unicode characters are ignorable in a Java identifier or a Unicode identifier:
0x0000 through 0x0008, | ISO control characters that
0x000E through 0x001B, | are not whitespace
and 0x007F through 0x009F
0x200C through 0x200F | join controls
0x200A through 0x200E | bidirectional controls
0x206A through 0x206F | format controls
0xFEFF | zero-width no-break space
Parameters:
ch - the character to be tested.
Returns:
true if the character may be part of a Unicode identifier; false otherwise.
Since:
JDK1.1
See Also:
isJavaIdentifierPart(char), isUnicodeIdentifierPart(char)

toLowerCase

public static char toLowerCase(char ch)
The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned.

A character has a lowercase equivalent if and only if a lowercase mapping is specified for the character in the Unicode attribute table.

Note that some Unicode characters in the range '\u2000' to '\u2FFF' have lowercase mappings; this method does map such characters to their lowercase equivalents even though the method isUpperCase does not return true for such characters.

Parameters:
ch - the character to be converted.
Returns:
the lowercase equivalent of the character, if any; otherwise the character itself.
See Also:
isLowerCase(char), isUpperCase(char), toTitleCase(char), toUpperCase(char)

toUpperCase

public static char toUpperCase(char ch)
Converts the character argument to uppercase. A character has an uppercase equivalent if and only if an uppercase mapping is specified for the character in the Unicode attribute table.

Note that some Unicode characters in the range '\u2000' to '\u2000FFF' have uppercase mappings; this method does map such characters to their titlecase equivalents even though the method isLowerCase does not return true for such characters.

Parameters:
ch - the character to be converted.
Returns:
the uppercase equivalent of the character, if any; otherwise the character itself.
See Also:
isLowerCase(char), isUpperCase(char), toLowerCase(char), toTitleCase(char)

toTitleCase

public static char toTitleCase(char ch)
Converts the character argument to titlecase. A character has a titlecase equivalent if and only if a titlecase mapping is specified for the character in the Unicode attribute table.

Note that some Unicode characters in the range '\u2000' through '\u2FFF' have titlecase mappings; this method does map such characters to their titlecase equivalents even though the method isTitleCase does not return true for such characters.

There are only four Unicode characters that are truly titlecase forms that are distinct from uppercase forms. As a rule, if a character has no true titlecase equivalent but does have an uppercase mapping, then the Unicode 2.0 attribute table specifies a titlecase mapping that is the same as the uppercase mapping.

Parameters:
ch - the character to be converted.
Returns:
the titlecase equivalent of the character, if any; otherwise the character itself.
Since:
JDK1.0.2
See Also:
isTitleCase(char), toLowerCase(char), toUpperCase(char)

digit

public static int digit(char ch,
                        int radix)
Returns the numeric value of the character ch in the specified radix.

If the radix is not in the range MIN_RADIX <= radix <= MAX_RADIX or if the value of ch is not a valid digit in the specified radix, -1 is returned. A character is a valid digit if at least one of the following is true:

  • The method isDigit is true of the character and the Unicode decimal digit value of the character (or its single-character decomposition) is less than the specified radix. In this case the decimal digit value is returned.
  • The character is one of the uppercase Latin letters 'A' through 'Z' and its code is less than radix + 'A' - 10. In this case, ch - 'A' + 10 is returned.
  • The character is one of the lowercase Latin letters 'a' through 'z' and its code is less than radix + 'a' - 10. In this case, ch - 'a' + 10 is returned.
Parameters:
ch - the character to be converted.
radix - the radix.
Returns:
the numeric value represented by the character in the specified radix.
See Also:
forDigit(int, int), isDigit(char)

getNumericValue

public static int getNumericValue(char ch)
Returns the Unicode numeric value of the character as a nonnegative integer. If the character does not have a numeric value, then -1 is returned. If the character has a numeric value that cannot be represented as a nonnegative integer (for example, a fractional value), then -2 is returned.
Parameters:
ch - the character to be converted.
Returns:
the numeric value of the character, as a nonnegative int value; -2 if the character has a numeric value that is not a nonnegative integer; -1 if the character has no numeric value.
Since:
JDK1.1
See Also:
forDigit(int, int), isDigit(char)

isSpace

public static boolean isSpace(char ch)
Deprecated. Replaced by isWhitespace(char).

Determines if the specified character is ISO-LATIN-1 white space. This method returns true for the following five characters only:
'\t' | \u0009 | HORIZONTAL TABULATION
'\n' | \u000A | NEW LINE
'\f' | \u000C | FORM FEED
'\r' | \u000D | CARRIAGE RETURN
' ' \u0020 SPACE
Parameters:
ch - the character to be tested.
Returns:
true if the character is ISO-LATIN-1 white space; false otherwise.
See Also:
isSpaceChar(char), isWhitespace(char)

isSpaceChar

public static boolean isSpaceChar(char ch)
Determines if the specified character is a Unicode space character. A character is considered to be a space character if and only if it is specified to be a space character by the Unicode 2.0 standard (category "Zs", "Zl, or "Zp" in the Unicode specification data file).
Parameters:
ch - the character to be tested.
Returns:
true if the character is a space character; false otherwise.
Since:
JDK1.1
See Also:
isWhitespace(char)

isWhitespace

public static boolean isWhitespace(char ch)
Determines if the specified character is white space according to Java. A character is considered to be a Java whitespace character if and only if it satisfies one of the following criteria:
  • It is a Unicode space separator (category "Zs"), but is not a no-break space (\u00A0 or \uFEFF).
  • It is a Unicode line separator (category "Zl").
  • It is a Unicode paragraph separator (category "Zp").
  • It is \u0009, HORIZONTAL TABULATION.
  • It is \u000A, LINE FEED.
  • It is \u000B, VERTICAL TABULATION.
  • It is \u000C, FORM FEED.
  • It is \u000D, CARRIAGE RETURN.
  • It is \u001C, FILE SEPARATOR.
  • It is \u001D, GROUP SEPARATOR.
  • It is \u001E, RECORD SEPARATOR.
  • It is \u001F, UNIT SEPARATOR.
Parameters:
ch - the character to be tested.
Returns:
true if the character is a Java whitespace character; false otherwise.
Since:
JDK1.1
See Also:
isSpaceChar(char)

isISOControl

public static boolean isISOControl(char ch)
Determines if the specified character is an ISO control character. A character is considered to be an ISO control character if its code is in the range \u0000 through \u001F or in the range \u007F through \u009F.
Parameters:
ch - the character to be tested.
Returns:
true if the character is an ISO control character; false otherwise.
Since:
JDK1.1
See Also:
isSpaceChar(char), isWhitespace(char)

getType

public static int getType(char ch)
Returns a value indicating a character category.
Parameters:
ch - the character to be tested.
Returns:
a value of type int, the character category.
Since:
JDK1.1
See Also:
COMBINING_SPACING_MARK, CONNECTOR_PUNCTUATION, CONTROL, CURRENCY_SYMBOL, DASH_PUNCTUATION, DECIMAL_DIGIT_NUMBER, ENCLOSING_MARK, END_PUNCTUATION, FORMAT, LETTER_NUMBER, LINE_SEPARATOR, LOWERCASE_LETTER, MATH_SYMBOL, MODIFIER_LETTER, MODIFIER_SYMBOL, NON_SPACING_MARK, OTHER_LETTER, OTHER_NUMBER, OTHER_PUNCTUATION, OTHER_SYMBOL, PARAGRAPH_SEPARATOR, PRIVATE_USE, SPACE_SEPARATOR, START_PUNCTUATION, SURROGATE, TITLECASE_LETTER, UNASSIGNED, UPPERCASE_LETTER

forDigit

public static char forDigit(int digit,
                            int radix)
Determines the character representation for a specific digit in the specified radix. If the value of radix is not a valid radix, or the value of digit is not a valid digit in the specified radix, the null character ('\u0000') is returned.

The radix argument is valid if it is greater than or equal to MIN_RADIX and less than or equal to MAX_RADIX. The digit argument is valid if 0 <= digit <= radix.

If the digit is less than 10, then '0' + digit is returned. Otherwise, the value 'a' + digit - 10 is returned.

Parameters:
digit - the number to convert to a character.
radix - the radix.
Returns:
the char representation of the specified digit in the specified radix.
See Also:
MIN_RADIX, MAX_RADIX, digit(char, int)

compareTo

public int compareTo(Character anotherCharacter)
Compares two Characters numerically.
Parameters:
anotherCharacter - the Character to be compared.
Returns:
the value 0 if the argument Character is equal to this Character; a value less than 0 if this Character is numerically less than the Character argument; and a value greater than 0 if this Character is numerically greater than the Character argument (unsigned comparison). Note that this is strictly a numerical comparison; it is not locale-dependent.
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Character to another Object. If the Object is a Character, this function behaves like compareTo(Character). Otherwise, it throws a ClassCastException (as Characters are comparable only to other Characters).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Character numerically equal to this Character; a value less than 0 if the argument is a Character numerically greater than this Character; and a value greater than 0 if the argument is a Character numerically less than this Character.
Throws:
ClassCastException - if the argument is not a Character.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Class

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Class

java.lang.Object
  |
  +--java.lang.Class
All Implemented Interfaces:
Serializable
public final class Class
extends Object
implements Serializable

Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects.

Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded and by calls to the defineClass method in the class loader.

The following example uses a Class object to print the class name of an object:

     void printClassName(Object obj) {
         System.out.println("The class of " + obj +
                            " is " + obj.getClass().getName());
     }

Since:
JDK1.0
See Also:
ClassLoader.defineClass(byte[], int, int), Serialized Form

Method Summary
static Class | forName(String className) Returns the Class object associated with the class or interface with the given string name.
static Class | forName(String name, boolean initialize, ClassLoader loader) Returns the Class object associated with the class or interface with the given string name, using the given class loader.
Class[] | getClasses() Returns an array containing Class objects representing all the public classes and interfaces that are members of the class represented by this Class object.
ClassLoader | getClassLoader() Returns the class loader for the class.
Class | getComponentType() Returns the Class representing the component type of an array.
Constructor | getConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
Constructor[] | getConstructors() Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object.
Class[] | getDeclaredClasses() Returns an array of Class objects reflecting all the classes and interfaces declared as members of the class represented by this Class object.
Constructor | getDeclaredConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.
Constructor[] | getDeclaredConstructors() Returns an array of Constructor objects reflecting all the constructors declared by the class represented by this Class object.
Field | getDeclaredField(String name) Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.
Field[] | getDeclaredFields() Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object.
Method | getDeclaredMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
Method[] | getDeclaredMethods() Returns an array of Method objects reflecting all the methods declared by the class or interface represented by this Class object.
Class | getDeclaringClass() If the class or interface represented by this Class object is a member of another class, returns the Class object representing the class in which it was declared.
Field | getField(String name) Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
Field[] | getFields() Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.
Class[] | getInterfaces() Determines the interfaces implemented by the class or interface represented by this object.
Method | getMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
Method[] | getMethods() Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces.
int | getModifiers() Returns the Java language modifiers for this class or interface, encoded in an integer.
String | getName() Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.
Package | getPackage() Gets the package for this class.
ProtectionDomain | getProtectionDomain() Returns the ProtectionDomain of this class.
URL | getResource(String name) Finds a resource with a given name.
InputStream | getResourceAsStream(String name) Finds a resource with a given name.
Object[] | getSigners() Gets the signers of this class.
Class | getSuperclass() Returns the Class representing the superclass of the entity (class, interface, primitive type or void) represented by this Class.
boolean | isArray() Determines if this Class object represents an array class.
boolean | isAssignableFrom(Class cls) Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter.
boolean | isInstance(Object obj) Determines if the specified Object is assignment-compatible with the object represented by this Class.
boolean | isInterface() Determines if the specified Class object represents an interface type.
boolean | isPrimitive() Determines if the specified Class object represents a primitive type.
Object | newInstance() Creates a new instance of the class represented by this Class object.
String | toString() Converts the object to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

toString

public String toString()
Converts the object to a string. The string representation is the string "class" or "interface", followed by a space, and then by the fully qualified name of the class in the format returned by getName. If this Class object represents a primitive type, this method returns the name of the primitive type. If this Class object represents void this method returns "void".
Overrides:
toString in class Object
Returns:
a string representation of this class object.

forName

public static Class forName(String className)
                     throws ClassNotFoundException
Returns the Class object associated with the class or interface with the given string name. Invoking this method is equivalent to:
  Class.forName(className, true, currentLoader)
where currentLoader denotes the defining class loader of the current class.

For example, the following code fragment returns the runtime Class descriptor for the class named java.lang.Thread:

   Class t = Class.forName("java.lang.Thread")

A call to forName("X") causes the class named X to be initialized.

Parameters:
className - the fully qualified name of the desired class.
Returns:
the Class object for the class with the specified name.
Throws:
LinkageError - if the linkage fails
ExceptionInInitializerError - if the initialization provoked by this method fails
ClassNotFoundException - if the class cannot be located

forName

public static Class forName(String name,
                            boolean initialize,
                            ClassLoader loader)
                     throws ClassNotFoundException
Returns the Class object associated with the class or interface with the given string name, using the given class loader. Given the fully qualified name for a class or interface (in the same format returned by getName) this method attempts to locate, load, and link the class or interface. The specified class loader is used to load the class or interface. If the parameter loader is null, the class is loaded through the bootstrap class loader. The class is initialized only if the initialize parameter is true and if it has not been initialized earlier.

If name denotes a primitive type or void, an attempt will be made to locate a user-defined class in the unnamed package whose name is name. Therefore, this method cannot be used to obtain any of the Class objects representing primitive types or void.

If name denotes an array class, the component type of the array class is loaded but not initialized.

For example, in an instance method the expression:

  Class.forName("Foo")
is equivalent to:
  Class.forName("Foo", true, this.getClass().getClassLoader())
Note that this method throws errors related to loading, linking or initializing as specified in Sections 12.2, 12.3 and 12.4 of The Java Language Specification.

If the loader is null, and a security manager is present, and the caller's class loader is not null, then this method calls the security manager's checkPermission method with a RuntimePermission("getClassLoader") permission to ensure it's ok to access the bootstrap class loader.

Parameters:
name - fully qualified name of the desired class
initialize - whether the class must be initialized
loader - class loader from which the class must be loaded
Returns:
class object representing the desired class
Throws:
LinkageError - if the linkage fails
ExceptionInInitializerError - if the initialization provoked by this method fails
ClassNotFoundException - if the class cannot be located by the specified class loader
Since:
1.2
See Also:
forName(String), ClassLoader

newInstance

public Object newInstance()
                   throws InstantiationException,
                          IllegalAccessException
Creates a new instance of the class represented by this Class object. The class is instantiatied as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
a newly allocated instance of the class represented by this object.
Throws:
IllegalAccessException - if the class or initializer is not accessible.
InstantiationException - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the instantiation fails for some other reason.
ExceptionInInitializerError - if the initialization provoked by this method fails.
SecurityException - if there is no permission to create a new instance.

isInstance

public boolean isInstance(Object obj)
Determines if the specified Object is assignment-compatible with the object represented by this Class. This method is the dynamic equivalent of the Java language instanceof operator. The method returns true if the specified Object argument is non-null and can be cast to the reference type represented by this Class object without raising a ClassCastException. It returns false otherwise.

Specifically, if this Class object represents a declared class, this method returns true if the specified Object argument is an instance of the represented class (or of any of its subclasses); it returns false otherwise. If this Class object represents an array class, this method returns true if the specified Object argument can be converted to an object of the array class by an identity conversion or by a widening reference conversion; it returns false otherwise. If this Class object represents an interface, this method returns true if the class or any superclass of the specified Object argument implements this interface; it returns false otherwise. If this Class object represents a primitive type, this method returns false.

Parameters:
obj - the object to check
Returns:
true if obj is an instance of this class
Since:
JDK1.1

isAssignableFrom

public boolean isAssignableFrom(Class cls)
Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter. It returns true if so; otherwise it returns false. If this Class object represents a primitive type, this method returns true if the specified Class parameter is exactly this Class object; otherwise it returns false.

Specifically, this method tests whether the type represented by the specified Class parameter can be converted to the type represented by this Class object via an identity conversion or via a widening reference conversion. See The Java Language Specification, sections 5.1.1 and 5.1.4 , for details.

Parameters:
cls - the Class object to be checked
Returns:
the boolean value indicating whether objects of the type cls can be assigned to objects of this class
Throws:
NullPointerException - if the specified Class parameter is null.
Since:
JDK1.1

isInterface

public boolean isInterface()
Determines if the specified Class object represents an interface type.
Returns:
true if this object represents an interface; false otherwise.

isArray

public boolean isArray()
Determines if this Class object represents an array class.
Returns:
true if this object represents an array class; false otherwise.
Since:
JDK1.1

isPrimitive

public boolean isPrimitive()
Determines if the specified Class object represents a primitive type.

There are nine predefined Class objects to represent the eight primitive types and void. These are created by the Java Virtual Machine, and have the same names as the primitive types that they represent, namely boolean, byte, char, short, int, long, float, and double.

These objects may only be accessed via the following public static final variables, and are the only Class objects for which this method returns true.

Returns:
true if and only if this class represents a primitive type
Since:
JDK1.1
See Also:
Boolean.TYPE, Character.TYPE, Byte.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE, Void.TYPE

getName

public String getName()
Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.

If this Class object represents a class of arrays, then the internal form of the name consists of the name of the element type in Java signature format, preceded by one or more "[" characters representing the depth of array nesting. Thus:

 (new Object[3]).getClass().getName()
returns "[Ljava.lang.Object;" and:
 (new int[3][4][5][6][7][8][9]).getClass().getName()
returns "[[[[[[[I". The encoding of element type names is as follows:
 B            byte
 C            char
 D            double
 F            float
 I            int
 J            long
 Lclassname;  class or interface
 S            short
 Z            boolean
The class or interface name classname is given in fully qualified form as shown in the example above.
Returns:
the fully qualified name of the class or interface represented by this object.

getClassLoader

public ClassLoader getClassLoader()
Returns the class loader for the class. Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader.

If a security manager is present, and the caller's class loader is not null and the caller's class loader is not the same as or an ancestor of the class loader for the class whose class loader is requested, then this method calls the security manager's checkPermission method with a RuntimePermission("getClassLoader") permission to ensure it's ok to access the class loader for the class.

If this object represents a primitive type or void, null is returned.

Returns:
the class loader that loaded the class or interface represented by this object.
Throws:
SecurityException - if a security manager exists and its checkPermission method denies access to the class loader for the class.
See Also:
ClassLoader, SecurityManager.checkPermission(java.security.Permission), RuntimePermission

getSuperclass

public Class getSuperclass()
Returns the Class representing the superclass of the entity (class, interface, primitive type or void) represented by this Class. If this Class represents either the Object class, an interface, a primitive type, or void, then null is returned. If this object represents an array class then the Class object representing the Object class is returned.
Returns:
the superclass of the class represented by this object.

getPackage

public Package getPackage()
Gets the package for this class. The class loader of this class is used to find the package. If the class was loaded by the bootstrap class loader the set of packages loaded from CLASSPATH is searched to find the package of the class. Null is returned if no package object was created by the class loader of this class.

Packages have attributes for versions and specifications only if the information was defined in the manifests that accompany the classes, and if the class loader created the package instance with the attributes from the manifest.

Returns:
the package of the class, or null if no package information is available from the archive or codebase.

getInterfaces

public Class[] getInterfaces()
Determines the interfaces implemented by the class or interface represented by this object.

If this object represents a class, the return value is an array containing objects representing all interfaces implemented by the class. The order of the interface objects in the array corresponds to the order of the interface names in the implements clause of the declaration of the class represented by this object. For example, given the declaration:

 class Shimmer implements FloorWax, DessertTopping { ... }
suppose the value of s is an instance of Shimmer; the value of the expression:
 s.getClass().getInterfaces()[0]
is the Class object that represents interface FloorWax; and the value of:
 s.getClass().getInterfaces()[1]
is the Class object that represents interface DessertTopping.

If this object represents an interface, the array contains objects representing all interfaces extended by the interface. The order of the interface objects in the array corresponds to the order of the interface names in the extends clause of the declaration of the interface represented by this object.

If this object represents a class or interface that implements no interfaces, the method returns an array of length 0.

If this object represents a primitive type or void, the method returns an array of length 0.

Returns:
an array of interfaces implemented by this class.

getComponentType

public Class getComponentType()
Returns the Class representing the component type of an array. If this class does not represent an array class this method returns null.
Returns:
the Class representing the component type of this class if this class is an array
Since:
JDK1.1
See Also:
Array

getModifiers

public int getModifiers()
Returns the Java language modifiers for this class or interface, encoded in an integer. The modifiers consist of the Java Virtual Machine's constants for public, protected, private, final, static, abstract and interface; they should be decoded using the methods of class Modifier.

If the underlying class is an array class, then its public, private and protected modifiers are the same as those of its component type. If this Class represents a primitive type or void, its public modifier is always true, and its protected and private modifers are always false. If this object represents an array class, a primitive type or void, then its final modifier is always true and its interface modifer is always false. The values of its other modifiers are not determined by this specification.

The modifier encodings are defined in The Java Virtual Machine Specification, table 4.1.

Returns:
the int representing the modifiers for this class
Since:
JDK1.1
See Also:
Modifier

getSigners

public Object[] getSigners()
Gets the signers of this class.
Returns:
the signers of this class, or null if there are no signers. In particular, this method returns null if this object represents a primitive type or void.
Since:
JDK1.1

getDeclaringClass

public Class getDeclaringClass()
If the class or interface represented by this Class object is a member of another class, returns the Class object representing the class in which it was declared. This method returns null if this class or interface is not a member of any other class. If this Class object represents an array class, a primitive type, or void,then this method returns null.
Returns:
the declaring class for this class
Since:
JDK1.1

getClasses

public Class[] getClasses()
Returns an array containing Class objects representing all the public classes and interfaces that are members of the class represented by this Class object. This includes public class and interface members inherited from superclasses and public class and interface members declared by the class. This method returns an array of length 0 if this Class object has no public member classes or interfaces. This method also returns an array of length 0 if this Class object represents a primitive type, an array class, or void.

For this class and each of its superclasses, the following security checks are performed: If there is a security manager, the security manager's checkMemberAccess method is called with this and Member.PUBLIC as its arguments, where this is this class or the superclass whose members are being determined. If the class is in a package, then the security manager's checkPackageAccess method is also called with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array of Class objects representing the public members of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getFields

public Field[] getFields()
                  throws SecurityException
Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the class or interface has no accessible public fields, or if it represents an array class, a primitive type, or void.

Specifically, if this Class object represents a class, this method returns the public fields of this class and of all its superclasses. If this Class object represents an interface, this method returns the fields of this interface and of all its superinterfaces.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

The implicit length field for array classs is not reflected by this method. User code should use the methods of class Array to manipulate arrays.

See The Java Language Specification, sections 8.2 and 8.3.

Returns:
the array of Field objects representing the public fields
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Field, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getMethods

public Method[] getMethods()
                    throws SecurityException
Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if this Class object represents a class or interface that has no public member methods, or if this Class object represents an array class, primitive type, or void.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

The class initialization method <clinit> is not included in the returned array. If the class declares multiple public member methods with the same parameter types, they are all included in the returned array.

See The Java Language Specification, sections 8.2 and 8.4.

Returns:
the array of Method objects representing the public methods of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Method, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getConstructors

public Constructor[] getConstructors()
                              throws SecurityException
Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object. An array of length 0 is returned if the class has no public constructors, or if the class is an array class, or if the class reflects a primitive type or void.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array containing Method objects for all the declared public constructors of this class matches the specified parameterTypes
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Constructor, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getField

public Field getField(String name)
               throws NoSuchFieldException,
                      SecurityException
Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object. The name parameter is a String specifying the simple name of the desired field.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

The field to be reflected is determined by the algorithm that follows. Let C be the class represented by this object:

  1. If C declares a public field with the name specified, that is the field to be reflected.
  2. If no field was found in step 1 above, this algorithm is applied recursively to each direct superinterface of C. The direct superinterfaces are searched in the order they were declared.
  3. If no field was found in steps 1 and 2 above, and C has a superclass S, then this algorithm is invoked recursively upon S. If C has no superclass, then a NoSuchFieldException is thrown.

See The Java Language Specification, sections 8.2 and 8.3.

Parameters:
name - the field name
Returns:
the Field object of this class specified by name
Throws:
NoSuchFieldException - if a field with the specified name is not found.
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Field, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getMethod

public Method getMethod(String name,
                        Class[] parameterTypes)
                 throws NoSuchMethodException,
                        SecurityException
Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object. The name parameter is a String specifying the simple name the desired method. The parameterTypes parameter is an array of Class objects that identify the method's formal parameter types, in declared order. If parameterTypes is null, it is treated as if it were an empty array.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

If the name is "<init>"or "<clinit>" a NoSuchMethodException is raised. Otherwise, the method to be reflected is determined by the algorithm that follows. Let C be the class represented by this object:

  1. C is searched for any matching methods. If no matching method is found, the algorithm of step 1 is invoked recursively on the superclass of C.
  2. If no method was found in step 1 above, the superinterfaces of C are searched for a matching method. If any such method is found, it is reflected.
To find a matching method in a class C: If C declares exactly one public method with the specified name and exactly the same formal parameter types, that is the method reflected. If more than one such method is found in C, and one of these methods has a return type that is more specific than any of the others, that method is reflected; otherwise one of the methods is chosen arbitrarily.

See The Java Language Specification, sections 8.2 and 8.4.

Parameters:
name - the name of the method
parameterTypes - the list of parameters
Returns:
the Method object that matches the specified name and parameterTypes
Throws:
NoSuchMethodException - if a matching method is not found or if then name is "<init>"or "<clinit>".
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Method, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getConstructor

public Constructor getConstructor(Class[] parameterTypes)
                           throws NoSuchMethodException,
                                  SecurityException
Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object. The parameterTypes parameter is an array of Class objects that identify the constructor's formal parameter types, in declared order.

The constructor to reflect is the public constructor of the class represented by this Class object whose formal parameter types match those specified by parameterTypes.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.PUBLIC as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Parameters:
parameterTypes - the parameter array
Returns:
the Method object of the public constructor that matches the specified parameterTypes
Throws:
NoSuchMethodException - if a matching method is not found.
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Constructor, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredClasses

public Class[] getDeclaredClasses()
                           throws SecurityException
Returns an array of Class objects reflecting all the classes and interfaces declared as members of the class represented by this Class object. This includes public, protected, default (package) access, and private classes and interfaces declared by the class, but excludes inherited classes and interfaces. This method returns an array of length 0 if the class declares no classes or interfaces as members, or if this Class object represents a primitive type, an array class, or void.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array of Class objects representing all the declared members of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredFields

public Field[] getDeclaredFields()
                          throws SecurityException
Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object. This includes public, protected, default (package) access, and private fields, but excludes inherited fields. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the class or interface declares no fields, or if this Class object represents a primitive type, an array class, or void.

See The Java Language Specification, sections 8.2 and 8.3.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array of Field objects representing all the declared fields of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Field, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredMethods

public Method[] getDeclaredMethods()
                            throws SecurityException
Returns an array of Method objects reflecting all the methods declared by the class or interface represented by this Class object. This includes public, protected, default (package) access, and private methods, but excludes inherited methods. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the class or interface declares no methods, or if this Class object represents a primitive type, an array class, or void. The class initialization method <clinit> is not included in the returned array. If the class declares multiple public member methods with the same parameter types, they are all included in the returned array.

See The Java Language Specification, section 8.2.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array of Method objects representing all the declared methods of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Method, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredConstructors

public Constructor[] getDeclaredConstructors()
                                      throws SecurityException
Returns an array of Constructor objects reflecting all the constructors declared by the class represented by this Class object. These are public, protected, default (package) access, and private constructors. The elements in the array returned are not sorted and are not in any particular order. If the class has a default constructor, it is included in the returned array. This method returns an array of length 0 if this Class object represents an interface, a primitive type, an array class, or void.

See The Java Language Specification, section 8.2.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Returns:
the array of Method objects representing all the declared constructors of this class
Throws:
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Constructor, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredField

public Field getDeclaredField(String name)
                       throws NoSuchFieldException,
                              SecurityException
Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object. The name parameter is a String that specifies the simple name of the desired field. Note that this method will not reflect the length field of an array class.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Parameters:
name - the name of the field
Returns:
the Field object for the specified field in this class
Throws:
NoSuchFieldException - if a field with the specified name is not found.
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Field, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredMethod

public Method getDeclaredMethod(String name,
                                Class[] parameterTypes)
                         throws NoSuchMethodException,
                                SecurityException
Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object. The name parameter is a String that specifies the simple name of the desired method, and the parameterTypes parameter is an array of Class objects that identify the method's formal parameter types, in declared order. If more than one method with the same parameter types is declared in a class, and one of these methods has a return type that is more specific than any of the others, that method is returned; otherwise one of the methods is chosen arbitrarily. If the name is "<init>"or "<clinit>" a NoSuchMethodException is raised.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Parameters:
name - the name of the method
parameterTypes - the parameter array
Returns:
the Method object for the method of this class matching the specified name and parameters
Throws:
NoSuchMethodException - if a matching method is not found.
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Method, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getDeclaredConstructor

public Constructor getDeclaredConstructor(Class[] parameterTypes)
                                   throws NoSuchMethodException,
                                          SecurityException
Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object. The parameterTypes parameter is an array of Class objects that identify the constructor's formal parameter types, in declared order.

If there is a security manager, this method first calls the security manager's checkMemberAccess method with this and Member.DECLARED as its arguments. If the class is in a package, then this method also calls the security manager's checkPackageAccess method with the package name as its argument. Either of these calls could result in a SecurityException.

Parameters:
parameterTypes - the parameter array
Returns:
The Method object for the constructor with the specified parameter list
Throws:
NoSuchMethodException - if a matching method is not found.
SecurityException - if access to the information is denied.
Since:
JDK1.1
See Also:
Constructor, SecurityManager.checkMemberAccess(Class, int), SecurityManager.checkPackageAccess(String)

getResourceAsStream

public InputStream getResourceAsStream(String name)
Finds a resource with a given name. This method returns null if no resource with this name is found. The rules for searching resources associated with a given class are implemented by the defining class loader of the class.

This method delegates the call to its class loader, after making these changes to the resource name: if the resource name starts with "/", it is unchanged; otherwise, the package name is prepended to the resource name after converting "." to "/". If this object was loaded by the bootstrap loader, the call is delegated to ClassLoader.getSystemResourceAsStream.

Parameters:
name - name of the desired resource
Returns:
a java.io.InputStream object.
Since:
JDK1.1
See Also:
ClassLoader

getResource

public URL getResource(String name)
Finds a resource with a given name. This method returns null if no resource with this name is found. The rules for searching resources associated with a given class are implemented by the * defining class loader of the class.

This method delegates the call to its class loader, after making these changes to the resource name: if the resource name starts with "/", it is unchanged; otherwise, the package name is prepended to the resource name after converting "." to "/". If this object was loaded by the bootstrap loader, the call is delegated to ClassLoader.getSystemResource.

Parameters:
name - name of the desired resource
Returns:
a java.net.URL object.
Since:
JDK1.1
See Also:
ClassLoader

getProtectionDomain

public ProtectionDomain getProtectionDomain()
Returns the ProtectionDomain of this class. If there is a security manager installed, this method first calls the security manager's checkPermission method with a RuntimePermission("getProtectionDomain") permission to ensure it's ok to get the ProtectionDomain.
Returns:
the ProtectionDomain of this class
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow geting the ProtectionDomain.
Since:
1.2
See Also:
ProtectionDomain, SecurityManager.checkPermission(java.security.Permission), RuntimePermission
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.lang.AbstractMethodError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.AbstractMethodError

No usage of java.lang.AbstractMethodError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ArithmeticException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ArithmeticException

No usage of java.lang.ArithmeticException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ArrayStoreException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ArrayStoreException

No usage of java.lang.ArrayStoreException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ClassCircularityError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ClassCircularityError

No usage of java.lang.ClassCircularityError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Compiler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Compiler

No usage of java.lang.Compiler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ExceptionInInitializerError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ExceptionInInitializerError

No usage of java.lang.ExceptionInInitializerError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalAccessError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalAccessError

No usage of java.lang.IllegalAccessError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalMonitorStateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalMonitorStateException

No usage of java.lang.IllegalMonitorStateException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalThreadStateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalThreadStateException

No usage of java.lang.IllegalThreadStateException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.InheritableThreadLocal

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.InheritableThreadLocal

No usage of java.lang.InheritableThreadLocal

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.InstantiationError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.InstantiationError

No usage of java.lang.InstantiationError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.InternalError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.InternalError

No usage of java.lang.InternalError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Math

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Math

No usage of java.lang.Math

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NoClassDefFoundError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NoClassDefFoundError

No usage of java.lang.NoClassDefFoundError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NoSuchFieldError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NoSuchFieldError

No usage of java.lang.NoSuchFieldError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NoSuchMethodError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NoSuchMethodError

No usage of java.lang.NoSuchMethodError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.OutOfMemoryError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.OutOfMemoryError

No usage of java.lang.OutOfMemoryError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.RuntimePermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.RuntimePermission

No usage of java.lang.RuntimePermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.StackOverflowError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.StackOverflowError

No usage of java.lang.StackOverflowError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.StrictMath

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.StrictMath

No usage of java.lang.StrictMath

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.StringIndexOutOfBoundsException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.StringIndexOutOfBoundsException

No usage of java.lang.StringIndexOutOfBoundsException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.System

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.System

No usage of java.lang.System

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ThreadDeath

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ThreadDeath

No usage of java.lang.ThreadDeath

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.UnknownError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.UnknownError

No usage of java.lang.UnknownError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.UnsatisfiedLinkError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.UnsatisfiedLinkError

No usage of java.lang.UnsatisfiedLinkError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.UnsupportedClassVersionError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.UnsupportedClassVersionError

No usage of java.lang.UnsupportedClassVersionError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.UnsupportedOperationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.UnsupportedOperationException

No usage of java.lang.UnsupportedOperationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.VerifyError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.VerifyError

No usage of java.lang.VerifyError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Void

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Void

No usage of java.lang.Void

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ArrayIndexOutOfBoundsException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ArrayIndexOutOfBoundsException

Packages that use ArrayIndexOutOfBoundsException
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of ArrayIndexOutOfBoundsException in java.lang.reflect

Methods in java.lang.reflect that throw ArrayIndexOutOfBoundsException
static Object | Array.get(Object array, int index) Returns the value of the indexed component in the specified array object.
static boolean | Array.getBoolean(Object array, int index) Returns the value of the indexed component in the specified array object, as a boolean.
static byte | Array.getByte(Object array, int index) Returns the value of the indexed component in the specified array object, as a byte.
static char | Array.getChar(Object array, int index) Returns the value of the indexed component in the specified array object, as a char.
static short | Array.getShort(Object array, int index) Returns the value of the indexed component in the specified array object, as a short.
static int | Array.getInt(Object array, int index) Returns the value of the indexed component in the specified array object, as an int.
static long | Array.getLong(Object array, int index) Returns the value of the indexed component in the specified array object, as a long.
static float | Array.getFloat(Object array, int index) Returns the value of the indexed component in the specified array object, as a float.
static double | Array.getDouble(Object array, int index) Returns the value of the indexed component in the specified array object, as a double.
static void | Array.set(Object array, int index, Object value) Sets the value of the indexed component of the specified array object to the specified new value.
static void | Array.setBoolean(Object array, int index, boolean z) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setByte(Object array, int index, byte b) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setChar(Object array, int index, char c) Sets the value of the indexed component of the specified array object to the specified byte value.
static void | Array.setShort(Object array, int index, short s) Sets the value of the indexed component of the specified array object to the specified short value.
static void | Array.setInt(Object array, int index, int i) Sets the value of the indexed component of the specified array object to the specified int value.
static void | Array.setLong(Object array, int index, long l) Sets the value of the indexed component of the specified array object to the specified long value.
static void | Array.setFloat(Object array, int index, float f) Sets the value of the indexed component of the specified array object to the specified float value.
static void | Array.setDouble(Object array, int index, double d) Sets the value of the indexed component of the specified array object to the specified double value.

Uses of ArrayIndexOutOfBoundsException in javax.sound.midi

Methods in javax.sound.midi that throw ArrayIndexOutOfBoundsException
 MidiEvent Track.get(int index)
Obtains the event at the specified index.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Boolean

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Boolean

Packages that use Boolean
java.awt.font | Provides classes and interface relating to fonts.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of Boolean in java.awt.font

Fields in java.awt.font declared as Boolean
static Boolean | TextAttribute.STRIKETHROUGH_ON A single strikethrough.
static Boolean | TextAttribute.RUN_DIRECTION_LTR Left-to-right run direction.
static Boolean | TextAttribute.RUN_DIRECTION_RTL Right-to-left run direction.
static Boolean | TextAttribute.SWAP_COLORS_ON Swap foreground and background.

Uses of Boolean in java.lang

Fields in java.lang declared as Boolean
static Boolean | Boolean.TRUE The Boolean object corresponding to the primitive value true.
static Boolean | Boolean.FALSE The Boolean object corresponding to the primitive value false.

Methods in java.lang that return Boolean
static Boolean Boolean.valueOf(String s)
Returns a Boolean with a value represented by the specified String.

Uses of Boolean in javax.swing

Methods in javax.swing with parameters of type Boolean
protected  void DefaultDesktopManager.setWasIcon(JInternalFrame f, Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.

Uses of Boolean in javax.swing.filechooser

Methods in javax.swing.filechooser that return Boolean
 Boolean FileView.isTraversable(File f)
Whether the directory is traversable or not.

Uses of Boolean in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return Boolean
Boolean | BasicFileChooserUI.BasicFileView.isTraversable(File f)
Boolean | BasicFileChooserUI.BasicFileView.isHidden(File f)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Byte

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Byte

Packages that use Byte
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Byte in java.lang

Methods in java.lang that return Byte
static Byte | Byte.valueOf(String s, int radix) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte | Byte.valueOf(String s) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte | Byte.decode(String nm) Decodes a String into a Byte.

Methods in java.lang with parameters of type Byte
 int Byte.compareTo(Byte anotherByte)
Compares two Bytes numerically.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Character

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Character

Packages that use Character
java.lang | Provides classes that are fundamental to the design of the Java programming language.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Character in java.lang

Methods in java.lang with parameters of type Character
 int Character.compareTo(Character anotherCharacter)
Compares two Characters numerically.

Uses of Character in javax.swing

Methods in javax.swing with parameters of type Character
static KeyStroke KeyStroke.getKeyStroke(Character keyChar, int modifiers)
Return a shared instance of a key stroke, given a character object and a set of modifiers.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Character.Subset

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Character.Subset

Packages that use Character.Subset
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.lang | Provides classes that are fundamental to the design of the Java programming language.

Uses of Character.Subset in java.awt.im

Subclasses of Character.Subset in java.awt.im
 class InputSubset
Defines additional Unicode subsets for use by input methods.

Methods in java.awt.im with parameters of type Character.Subset
 void InputContext.setCharacterSubsets(Character.Subset[] subsets)
Sets the subsets of the Unicode character set that input methods of this input context should be allowed to input.

Uses of Character.Subset in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type Character.Subset
 void InputMethod.setCharacterSubsets(Character.Subset[] subsets)
Sets the subsets of the Unicode character set that this input method is allowed to input.

Uses of Character.Subset in java.lang

Subclasses of Character.Subset in java.lang
static class Character.UnicodeBlock
A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Character.UnicodeBlock

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Character.UnicodeBlock

Packages that use Character.UnicodeBlock
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Character.UnicodeBlock in java.lang

Fields in java.lang declared as Character.UnicodeBlock
static Character.UnicodeBlock | Character.UnicodeBlock.BASIC_LATIN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LATIN_1_SUPPLEMENT Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LATIN_EXTENDED_A Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LATIN_EXTENDED_B Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.IPA_EXTENSIONS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.SPACING_MODIFIER_LETTERS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.COMBINING_DIACRITICAL_MARKS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GREEK Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CYRILLIC Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ARMENIAN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HEBREW Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ARABIC Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.DEVANAGARI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.BENGALI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GURMUKHI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GUJARATI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ORIYA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.TAMIL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.TELUGU Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.KANNADA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.MALAYALAM Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.THAI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LAO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.TIBETAN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GEORGIAN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HANGUL_JAMO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LATIN_EXTENDED_ADDITIONAL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GREEK_EXTENDED Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GENERAL_PUNCTUATION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.SUPERSCRIPTS_AND_SUBSCRIPTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CURRENCY_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.COMBINING_MARKS_FOR_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.LETTERLIKE_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.NUMBER_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ARROWS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.MATHEMATICAL_OPERATORS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.MISCELLANEOUS_TECHNICAL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CONTROL_PICTURES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.OPTICAL_CHARACTER_RECOGNITION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ENCLOSED_ALPHANUMERICS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.BOX_DRAWING Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.BLOCK_ELEMENTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.GEOMETRIC_SHAPES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.MISCELLANEOUS_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.DINGBATS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HIRAGANA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.KATAKANA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.BOPOMOFO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HANGUL_COMPATIBILITY_JAMO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.KANBUN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ENCLOSED_CJK_LETTERS_AND_MONTHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CJK_COMPATIBILITY Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HANGUL_SYLLABLES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.SURROGATES_AREA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.PRIVATE_USE_AREA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ALPHABETIC_PRESENTATION_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ARABIC_PRESENTATION_FORMS_A Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.COMBINING_HALF_MARKS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.CJK_COMPATIBILITY_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.SMALL_FORM_VARIANTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.ARABIC_PRESENTATION_FORMS_B Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | Character.UnicodeBlock.SPECIALS Constant for the Unicode character block of the same name.

Methods in java.lang that return Character.UnicodeBlock
static Character.UnicodeBlock Character.UnicodeBlock.of(char c)
Returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Class

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Class

Packages that use Class
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of Class in java.awt

Methods in java.awt with parameters of type Class
 EventListener[] Component.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Container.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Scrollbar.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Scrollbar with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] MenuItem.getListeners(Class listenerType)
Return an array of all the listeners that were added to the MenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Checkbox.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Checkbox with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Window.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the listenerType argument.
 DragGestureRecognizer Toolkit.createDragGestureRecognizer(Class abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
create a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associate it with the DragSource, Component and DragGestureListener specified subclasses should override this to provide their own implementation
 EventListener[] List.getListeners(Class listenerType)
Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] TextComponent.getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextComponent with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Choice.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Choice with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] TextField.getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Button.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Button with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] CheckboxMenuItem.getListeners(Class listenerType)
Return an array of all the listeners that were added to the CheckboxMenuItem with addXXXListener(), where XXX is the name of the listenerType argument.

Uses of Class in java.awt.datatransfer

Methods in java.awt.datatransfer that return Class
protected static Class | DataFlavor.tryToLoadClass(String className, ClassLoader fallback) tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
Class | DataFlavor.getRepresentationClass() Returns the Class which objects supporting this DataFlavor will return when this DataFlavor is requested.
Class | DataFlavor.getDefaultRepresentationClass()

Constructors in java.awt.datatransfer with parameters of type Class
DataFlavor(Class representationClass, String humanPresentableName)
Construct a DataFlavor that represents a Java class

Uses of Class in java.awt.dnd

Methods in java.awt.dnd with parameters of type Class
 DragGestureRecognizer DragSource.createDragGestureRecognizer(Class recognizerAbstractClass, Component c, int actions, DragGestureListener dgl)
Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.

Uses of Class in java.awt.image.renderable

Methods in java.awt.image.renderable that return Class
 Class[] ParameterBlock.getParamClasses()
Returns an array of Class objects describing the types of the parameters.

Uses of Class in java.beans

Methods in java.beans that return Class
Class | PropertyDescriptor.getPropertyType() Gets the Class object for the property.
Class | PropertyDescriptor.getPropertyEditorClass() Gets any explicit PropertyEditor Class that has been registered for this property.
Class | IndexedPropertyDescriptor.getIndexedPropertyType() Gets the Class object of the indexed properties' type.
Class | EventSetDescriptor.getListenerType() Gets the Class object for the target interface.
Class | BeanDescriptor.getBeanClass() Gets the bean's Class object.
Class | BeanDescriptor.getCustomizerClass() Gets the Class object for the bean's customizer.

Methods in java.beans with parameters of type Class
void | PropertyDescriptor.setPropertyEditorClass(Class propertyEditorClass) Normally PropertyEditors will be found using the PropertyEditorManager.
static Object | Beans.getInstanceOf(Object bean, Class targetType) From a given bean, obtain an object representing a specified type view of that source object.
static boolean | Beans.isInstanceOf(Object bean, Class targetType) Check if a bean can be viewed as a given target type.
static BeanInfo | Introspector.getBeanInfo(Class beanClass) Introspect on a Java bean and learn about all its properties, exposed methods, and events.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, int flags) Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.
static BeanInfo | Introspector.getBeanInfo(Class beanClass, Class stopClass) Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.
static void | Introspector.flushFromCaches(Class clz) Flush the Introspector's internal cached information for a given class.
static void | PropertyEditorManager.registerEditor(Class targetType, Class editorClass) Register an editor class to be used to editor values of a given target class.
static PropertyEditor | PropertyEditorManager.findEditor(Class targetType) Locate a value editor for a given target type.

Constructors in java.beans with parameters of type Class
PropertyDescriptor(String propertyName, Class beanClass)
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.
PropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName)
This constructor takes the name of a simple property, and method names for reading and writing the property.
IndexedPropertyDescriptor(String propertyName, Class beanClass)
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.
IndexedPropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName, String indexedGetterName, String indexedSetterName)
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String listenerMethodName)
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName)
This constructor creates an EventSetDescriptor from scratch using string names.
EventSetDescriptor(String eventSetName, Class listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
BeanDescriptor(Class beanClass)
Create a BeanDescriptor for a bean that doesn't have a customizer.
BeanDescriptor(Class beanClass, Class customizerClass)
Create a BeanDescriptor for a bean that has a customizer.

Uses of Class in java.beans.beancontext

Fields in java.beans.beancontext declared as Class
protected Class | BeanContextServiceAvailableEvent.serviceClass A Class reference to the newly available service
protected Class | BeanContextServiceRevokedEvent.serviceClass A Class reference to the service that is being revoked.

Methods in java.beans.beancontext that return Class
Class | BeanContextServiceAvailableEvent.getServiceClass() Gets the service class that is the subject of this notification.
Class | BeanContextServiceRevokedEvent.getServiceClass() Gets the service class that is the subject of this notification

Methods in java.beans.beancontext with parameters of type Class
 boolean BeanContextServiceRevokedEvent.isServiceClass(Class service)
Checks this event to determine whether or not the service being revoked is of a particular class.
protected static boolean BeanContextSupport.classEquals(Class first, Class second)
Tests to see if two class objects, or their names are equal.
protected  BeanContextServicesSupport.BCSSServiceProvider BeanContextServicesSupport.createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.
 boolean BeanContextServicesSupport.addService(Class serviceClass, BeanContextServiceProvider bcsp)
add a service
protected  boolean BeanContextServicesSupport.addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
add a service
 void BeanContextServicesSupport.revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
remove a service
 boolean BeanContextServicesSupport.hasService(Class serviceClass)
has a service, which may be delegated
 Object BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
obtain a service which may be delegated
 Iterator BeanContextServicesSupport.getCurrentServiceSelectors(Class serviceClass)
protected  void BeanContextServicesSupport.fireServiceAdded(Class serviceClass)
Fires a BeanContextServiceEvent notifying of a new service.
protected  void BeanContextServicesSupport.fireServiceRevoked(Class serviceClass, boolean revokeNow)
Fires a BeanContextServiceRevokedEvent indicating that a particular service is no longer available.
 Object BeanContextServicesSupport.BCSSProxyServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
 Iterator BeanContextServicesSupport.BCSSProxyServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
 Object BeanContextServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
 Iterator BeanContextServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
Invoked by BeanContextServices, this method gets the current service selectors for the specified service.
 boolean BeanContextServices.addService(Class serviceClass, BeanContextServiceProvider serviceProvider)
Adds a service to this BeanContext.
 void BeanContextServices.revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method.
 boolean BeanContextServices.hasService(Class serviceClass)
Reports whether or not a given service is currently available from this context.
 Object BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
 Iterator BeanContextServices.getCurrentServiceSelectors(Class serviceClass)
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.

Constructors in java.beans.beancontext with parameters of type Class
BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc)
Construct a BeanContextAvailableServiceEvent.
BeanContextServiceRevokedEvent(BeanContextServices bcs, Class sc, boolean invalidate)
Construct a BeanContextServiceEvent.

Uses of Class in java.io

Methods in java.io that return Class
protected Class | ObjectInputStream.resolveClass(ObjectStreamClass v) Load the local class equivalent of the specified stream class description.
protected Class | ObjectInputStream.resolveProxyClass(String[] interfaces) Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
Class | ObjectStreamClass.forClass() Return the class in the local VM that this version is mapped to.
Class | ObjectStreamField.getType() Get the type of the field.

Methods in java.io with parameters of type Class
protected void | ObjectOutputStream.annotateClass(Class cl) Subclasses may implement this method to allow class data to be stored in the stream.
protected void | ObjectOutputStream.annotateProxyClass(Class cl) Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.
static ObjectStreamClass | ObjectStreamClass.lookup(Class cl) Find the descriptor for a class that can be serialized.

Constructors in java.io with parameters of type Class
ObjectStreamField(String n, Class clazz)
Create a Serializable field with the specified type.

Uses of Class in java.lang

Fields in java.lang declared as Class
static Class | Character.TYPE The Class object representing the primitive type char.
static Class | Long.TYPE The Class object representing the primitive type long.
static Class | Void.TYPE The Class object representing the primitive Java type void.
static Class | Short.TYPE The Class object representing the primitive type short.
static Class | Float.TYPE The Class object representing the primitive type float.
static Class | Integer.TYPE The Class object representing the primitive type int.
static Class | Byte.TYPE The Class object representing the primitive type byte.
static Class | Double.TYPE The Class object representing the primitive type double.
static Class | Boolean.TYPE The Class object representing the primitive type boolean.

Methods in java.lang that return Class
 Class Object.getClass()
Returns the runtime class of an object.
protected  Class[] SecurityManager.getClassContext()
Returns the current execution stack as an array of classes.
protected  Class SecurityManager.currentLoadedClass()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
 Class ClassLoader.loadClass(String name)
Loads the class with the specified name.
protected  Class ClassLoader.loadClass(String name, boolean resolve)
Loads the class with the specified name.
protected  Class ClassLoader.findClass(String name)
Finds the specified class.
protected  Class ClassLoader.defineClass(byte[] b, int off, int len)
Deprecated. Replaced by defineClass(java.lang.String, byte[], int, int)
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len)
Converts an array of bytes into an instance of class Class.
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
protected  Class ClassLoader.findSystemClass(String name)
Finds a class with the specified name, loading it if necessary.
protected  Class ClassLoader.findLoadedClass(String name)
Finds the class with the given name if it had been previously loaded through this class loader.
static Class Class.forName(String className)
Returns the Class object associated with the class or interface with the given string name.
static Class Class.forName(String name, boolean initialize, ClassLoader loader)
Returns the Class object associated with the class or interface with the given string name, using the given class loader.
 Class Class.getSuperclass()
Returns the Class representing the superclass of the entity (class, interface, primitive type or void) represented by this Class.
 Class[] Class.getInterfaces()
Determines the interfaces implemented by the class or interface represented by this object.
 Class Class.getComponentType()
Returns the Class representing the component type of an array.
 Class Class.getDeclaringClass()
If the class or interface represented by this Class object is a member of another class, returns the Class object representing the class in which it was declared.
 Class[] Class.getClasses()
Returns an array containing Class objects representing all the public classes and interfaces that are members of the class represented by this Class object.
 Class[] Class.getDeclaredClasses()
Returns an array of Class objects reflecting all the classes and interfaces declared as members of the class represented by this Class object.

Methods in java.lang with parameters of type Class
static boolean | Compiler.compileClass(Class clazz) Compiles the specified class.
void | SecurityManager.checkMemberAccess(Class clazz, int which) Throws a SecurityException if the calling thread is not allowed to access members.
protected void | ClassLoader.resolveClass(Class c) Links the specified class.
protected void | ClassLoader.setSigners(Class c, Object[] signers) Sets the signers of a class.
boolean | Class.isAssignableFrom(Class cls) Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter.
Method | Class.getMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
Constructor | Class.getConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
Method | Class.getDeclaredMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
Constructor | Class.getDeclaredConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.

Uses of Class in java.lang.reflect

Methods in java.lang.reflect that return Class
Class | Member.getDeclaringClass() Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.
Class | Method.getDeclaringClass() Returns the Class object representing the class or interface that declares the method represented by this Method object.
Class | Method.getReturnType() Returns a Class object that represents the formal return type of the method represented by this Method object.
Class[] | Method.getParameterTypes() Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.
Class[] | Method.getExceptionTypes() Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this Method object.
Class | Field.getDeclaringClass() Returns the Class object representing the class or interface that declares the field represented by this Field object.
Class | Field.getType() Returns a Class object that identifies the declared type for the field represented by this Field object.
static Class | Proxy.getProxyClass(ClassLoader loader, Class[] interfaces) Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
Class | Constructor.getDeclaringClass() Returns the Class object representing the class that declares the constructor represented by this Constructor object.
Class[] | Constructor.getParameterTypes() Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor represented by this Constructor object.
Class[] | Constructor.getExceptionTypes() Returns an array of Class objects that represent the types of of exceptions declared to be thrown by the underlying constructor represented by this Constructor object.

Methods in java.lang.reflect with parameters of type Class
static Object | Array.newInstance(Class componentType, int length) Creates a new array with the specified component type and length.
static Object | Array.newInstance(Class componentType, int[] dimensions) Creates a new array with the specified component type and dimensions.
static Class | Proxy.getProxyClass(ClassLoader loader, Class[] interfaces) Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
static Object | Proxy.newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
static boolean | Proxy.isProxyClass(Class cl) Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.

Uses of Class in java.net

Methods in java.net that return Class
protected  Class URLClassLoader.findClass(String name)
Finds and loads the class with the specified name from the URL search path.

Methods in java.net with parameters of type Class
Object | URLConnection.getContent(Class[] classes) Retrieves the contents of this URL connection.
Object | URL.getContent(Class[] classes) Returns the contents of this URL.
Object | ContentHandler.getContent(URLConnection urlc, Class[] classes) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

Uses of Class in java.rmi.server

Methods in java.rmi.server that return Class
static Class RMIClassLoader.loadClass(String name)
Deprecated. replaced by loadClass(String,String) method
static Class RMIClassLoader.loadClass(URL codebase, String name)
Loads a class from a codebase URL.
static Class RMIClassLoader.loadClass(String codebase, String name)
Loads a class from a codebase URL path.
 Class LoaderHandler.loadClass(String name)
Deprecated. no replacement
 Class LoaderHandler.loadClass(URL codebase, String name)
Deprecated. no replacement

Methods in java.rmi.server with parameters of type Class
static String RMIClassLoader.getClassAnnotation(Class cl)
Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.

Uses of Class in java.security

Methods in java.security that return Class
protected  Class SecureClassLoader.defineClass(String name, byte[] b, int off, int len, CodeSource cs)
Converts an array of bytes into an instance of class Class, with an optional CodeSource.

Methods in java.security with parameters of type Class
KeySpec | KeyFactory.getKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
AlgorithmParameterSpec | AlgorithmParameters.getParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameter object.
protected abstract KeySpec | KeyFactorySpi.engineGetKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
protected abstract AlgorithmParameterSpec | AlgorithmParametersSpi.engineGetParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameters object.

Uses of Class in javax.naming.spi

Methods in javax.naming.spi with parameters of type Class
ResolveResult | Resolver.resolveToClass(Name name, Class contextType) Partially resolves a name.
ResolveResult | Resolver.resolveToClass(String name, Class contextType) Partially resolves a name.

Uses of Class in javax.rmi

Methods in javax.rmi with parameters of type Class
static Object PortableRemoteObject.narrow(Object narrowFrom, Class narrowTo)
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.

Uses of Class in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return Class
static Class Util.loadClass(String className, String remoteCodebase, ClassLoader loader)
Returns a class instance for the specified class.
 Class UtilDelegate.loadClass(String className, String remoteCodebase, ClassLoader loader)
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).

Methods in javax.rmi.CORBA with parameters of type Class
static String Util.getCodebase(Class clz)
Returns the codebase, if any, for the given class.
 Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
Reads a value from the stream using Java semantics.
 String ValueHandler.getRMIRepositoryID(Class clz)
Returns the CORBA RepositoryId for the given Java class.
 boolean ValueHandler.isCustomMarshaled(Class clz)
Indicates whether the given class performs custom or default marshaling.
 Object PortableRemoteObjectDelegate.narrow(Object narrowFrom, Class narrowTo)
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).
 String UtilDelegate.getCodebase(Class clz)
Delegation call for Util.getCodebase(java.lang.Class).

Uses of Class in javax.sound.midi

Methods in javax.sound.midi that return Class
 Class SoundbankResource.getDataClass()
Obtains the class used by this sample to represent its data.

Constructors in javax.sound.midi with parameters of type Class
SoundbankResource(Soundbank soundBank, String name, Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index.
Instrument(Soundbank soundbank, Patch patch, String name, Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.

Uses of Class in javax.sound.sampled

Methods in javax.sound.sampled that return Class
 Class Line.Info.getLineClass()
Obtains the class of the line that this Line.Info object describes.

Constructors in javax.sound.sampled with parameters of type Class
Line.Info(Class lineClass)
Constructs an info object that describes a line of the specified class.
DataLine.Info(Class lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.
DataLine.Info(Class lineClass, AudioFormat format, int bufferSize)
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.
DataLine.Info(Class lineClass, AudioFormat format)
Constructs a data line's info object from the specified information, which includes a single audio format.
Port.Info(Class lineClass, String name, boolean isSource)
Constructs a port's info object from the information given.

Uses of Class in javax.swing

Methods in javax.swing that return Class
Class | UIDefaults.getUIClass(String uiClassID, ClassLoader uiClassLoader) The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
Class | UIDefaults.getUIClass(String uiClassID) Returns the L&F class that renders this component.
Class | JTable.getColumnClass(int column) Returns the type of the column appearing in the view at column position column.

Methods in javax.swing with parameters of type Class
 EventListener[] DefaultSingleSelectionModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 EventListener[] JComponent.getListeners(Class listenerType)
Return an array of all the listeners that were added to this JComponent with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] DefaultBoundedRangeModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 EventListener[] AbstractListModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
static Object LookAndFeel.makeIcon(Class baseClass, String gifFile)
Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.
 EventListener[] DefaultListSelectionModel.getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
static Container SwingUtilities.getAncestorOfClass(Class c, Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds.
 EventListener[] Timer.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this timer.
 EventListener[] DefaultButtonModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 void JTable.setDefaultRenderer(Class columnClass, TableCellRenderer renderer)
Sets a default cell renderer to be used if no renderer has been set in a TableColumn.
 TableCellRenderer JTable.getDefaultRenderer(Class columnClass)
Returns the cell renderer to be used when no renderer has been set in a TableColumn.
 void JTable.setDefaultEditor(Class columnClass, TableCellEditor editor)
Sets a default cell editor to be used if no editor has been set in a TableColumn.
 TableCellEditor JTable.getDefaultEditor(Class columnClass)
Returns the editor to be used when no editor has been set in a TableColumn.

Uses of Class in javax.swing.event

Methods in javax.swing.event with parameters of type Class
EventListener[] | EventListenerList.getListeners(Class t) Return an array of all the listeners of the given type.
int | EventListenerList.getListenerCount(Class t) Returns the total number of listeners of the supplied type for this listener list.
void | EventListenerList.add(Class t, EventListener l) Adds the listener as a listener of the specified type.
void | EventListenerList.remove(Class t, EventListener l) Removes the listener as a listener of the specified type.

Uses of Class in javax.swing.table

Methods in javax.swing.table that return Class
Class | AbstractTableModel.getColumnClass(int columnIndex) Returns Object.class regardless of columnIndex.
Class | TableModel.getColumnClass(int columnIndex) Returns the most specific superclass for all the cell values in the column.

Methods in javax.swing.table with parameters of type Class
EventListener[] | AbstractTableModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultTableColumnModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.

Uses of Class in javax.swing.text

Methods in javax.swing.text with parameters of type Class
EventListener[] | StyleContext.NamedStyle.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
EventListener[] | AbstractDocument.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultCaret.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.

Uses of Class in javax.swing.tree

Methods in javax.swing.tree with parameters of type Class
EventListener[] | DefaultTreeSelectionModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultTreeModel.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.

Uses of Class in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable with parameters of type Class
void | OutputStream.write_value(Serializable value, Class clz) marshals a value type to the output stream.
Serializable | InputStream.read_value(Class clz) unmarshalls a value type from the input stream.
Object | InputStream.read_abstract_interface(Class clz) unmarshal the class object or the stub class corresponding to the passed type.

Uses of Class in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type Class
ServantObject | ObjectImpl._servant_preinvoke(String operation, Class expectedType) Returns a Java reference to the local servant that should be used for sending a request for the method specified.
Object | InputStream.read_Object(Class clz) read_Object unmarshals an object and returns a CORBA Object which is an instance of the class passed as its argument.
ServantObject | Delegate.servant_preinvoke(Object self, String operation, Class expectedType) Returns a Java reference to the servant which should be used for this request.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ClassCastException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ClassCastException

Packages that use ClassCastException
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.

Uses of ClassCastException in javax.rmi

Methods in javax.rmi that throw ClassCastException
static Object PortableRemoteObject.narrow(Object narrowFrom, Class narrowTo)
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.

Uses of ClassCastException in javax.rmi.CORBA

Methods in javax.rmi.CORBA that throw ClassCastException
 Object PortableRemoteObjectDelegate.narrow(Object narrowFrom, Class narrowTo)
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ClassFormatError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ClassFormatError

Packages that use ClassFormatError
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of ClassFormatError in java.lang

Subclasses of ClassFormatError in java.lang
 class UnsupportedClassVersionError
Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

Methods in java.lang that throw ClassFormatError
protected  Class ClassLoader.defineClass(byte[] b, int off, int len)
Deprecated. Replaced by defineClass(java.lang.String, byte[], int, int)
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len)
Converts an array of bytes into an instance of class Class.
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ClassLoader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ClassLoader

Packages that use ClassLoader
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.beans | Contains classes related to Java Beans development.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ClassLoader in java.awt.datatransfer

Methods in java.awt.datatransfer with parameters of type ClassLoader
protected static Class DataFlavor.tryToLoadClass(String className, ClassLoader fallback)
tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified

Constructors in java.awt.datatransfer with parameters of type ClassLoader
DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader)
Construct a DataFlavor that represents a MimeType

Uses of ClassLoader in java.beans

Methods in java.beans with parameters of type ClassLoader
static Object | Beans.instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.

Uses of ClassLoader in java.lang

Methods in java.lang that return ClassLoader
ClassLoader | Thread.getContextClassLoader() Returns the context ClassLoader for this Thread.
protected ClassLoader | SecurityManager.currentClassLoader() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
ClassLoader | ClassLoader.getParent() Returns the parent class loader for delegation.
static ClassLoader | ClassLoader.getSystemClassLoader() Returns the system class loader for delegation.
ClassLoader | Class.getClassLoader() Returns the class loader for the class.

Methods in java.lang with parameters of type ClassLoader
void | Thread.setContextClassLoader(ClassLoader cl) Sets the context ClassLoader for this Thread.
static Class | Class.forName(String name, boolean initialize, ClassLoader loader) Returns the Class object associated with the class or interface with the given string name, using the given class loader.

Constructors in java.lang with parameters of type ClassLoader
ClassLoader(ClassLoader parent)
Creates a new class loader using the specified parent class loader for delegation.

Uses of ClassLoader in java.lang.reflect

Methods in java.lang.reflect with parameters of type ClassLoader
static Class | Proxy.getProxyClass(ClassLoader loader, Class[] interfaces) Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
static Object | Proxy.newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.

Uses of ClassLoader in java.net

Subclasses of ClassLoader in java.net
 class URLClassLoader
This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.

Methods in java.net with parameters of type ClassLoader
static URLClassLoader URLClassLoader.newInstance(URL[] urls, ClassLoader parent)
Creates a new instance of URLClassLoader for the specified URLs and parent class loader.

Constructors in java.net with parameters of type ClassLoader
URLClassLoader(URL[] urls, ClassLoader parent)
Constructs a new URLClassLoader for the given URLs.
URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.

Uses of ClassLoader in java.rmi.server

Methods in java.rmi.server that return ClassLoader
static ClassLoader RMIClassLoader.getClassLoader(String codebase)
Returns a class loader that loads classes from the given codebase URL path.

Methods in java.rmi.server with parameters of type ClassLoader
static Object | RMIClassLoader.getSecurityContext(ClassLoader loader) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.
Object | LoaderHandler.getSecurityContext(ClassLoader loader) Deprecated. no replacement

Uses of ClassLoader in java.security

Subclasses of ClassLoader in java.security
 class SecureClassLoader
This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.

Constructors in java.security with parameters of type ClassLoader
SecureClassLoader(ClassLoader parent)
Creates a new SecureClassLoader using the specified parent class loader for delegation.

Uses of ClassLoader in java.util

Methods in java.util with parameters of type ClassLoader
static ResourceBundle ResourceBundle.getBundle(String baseName, Locale locale, ClassLoader loader)
Get the appropriate ResourceBundle subclass.

Uses of ClassLoader in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type ClassLoader
static Class Util.loadClass(String className, String remoteCodebase, ClassLoader loader)
Returns a class instance for the specified class.
 Class UtilDelegate.loadClass(String className, String remoteCodebase, ClassLoader loader)
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).

Uses of ClassLoader in javax.swing

Methods in javax.swing with parameters of type ClassLoader
static void | JEditorPane.registerEditorKitForContentType(String type, String classname, ClassLoader loader) Establishes the default bindings of type to classname.
Class | UIDefaults.getUIClass(String uiClassID, ClassLoader uiClassLoader) The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ClassNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ClassNotFoundException

Packages that use ClassNotFoundException
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ClassNotFoundException in java.awt.datatransfer

Methods in java.awt.datatransfer that throw ClassNotFoundException
static DataFlavor | SystemFlavorMap.decodeDataFlavor(String atom)
protected static Class | DataFlavor.tryToLoadClass(String className, ClassLoader fallback) tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
void | DataFlavor.readExternal(ObjectInput is) restore this DataFlavor from an Serialized state

Constructors in java.awt.datatransfer that throw ClassNotFoundException
DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader)
Construct a DataFlavor that represents a MimeType
DataFlavor(String mimeType)
Construct a DataFlavor from a Mime Type string.

Uses of ClassNotFoundException in java.beans

Methods in java.beans that throw ClassNotFoundException
static Object | Beans.instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.

Uses of ClassNotFoundException in java.beans.beancontext

Methods in java.beans.beancontext that throw ClassNotFoundException
 Object BeanContextSupport.instantiateChild(String beanName)
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
protected  void BeanContextSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called by readObject after defaultReadObject() but prior to deserialization of any children.
protected  void BeanContextSupport.deserialize(ObjectInputStream ois, Collection coll)
used by readObject to deserialize a collection.
 void BeanContextSupport.readChildren(ObjectInputStream ois)
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
protected  void BeanContextServicesSupport.bcsPreDeserializationHook(ObjectInputStream ois)
called from BeanContextSupport readObject before it deserializes the children ...
 Object BeanContext.instantiateChild(String beanName)
Instantiate the javaBean named as a child of this BeanContext.

Uses of ClassNotFoundException in java.io

Methods in java.io that throw ClassNotFoundException
void | Externalizable.readExternal(ObjectInput in) The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
Object | ObjectInput.readObject() Read and return an object.
Object | ObjectInputStream.readObject() Read an object from the ObjectInputStream.
protected Object | ObjectInputStream.readObjectOverride() This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.
void | ObjectInputStream.defaultReadObject() Read the non-static and non-transient fields of the current class from this stream.
ObjectInputStream.GetField | ObjectInputStream.readFields() Reads the persistent fields from the stream and makes them available by name.
protected Class | ObjectInputStream.resolveClass(ObjectStreamClass v) Load the local class equivalent of the specified stream class description.
protected Class | ObjectInputStream.resolveProxyClass(String[] interfaces) Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
protected ObjectStreamClass | ObjectInputStream.readClassDescriptor() Read a class descriptor from the serialization stream.

Uses of ClassNotFoundException in java.lang

Methods in java.lang that throw ClassNotFoundException
Class | ClassLoader.loadClass(String name) Loads the class with the specified name.
protected Class | ClassLoader.loadClass(String name, boolean resolve) Loads the class with the specified name.
protected Class | ClassLoader.findClass(String name) Finds the specified class.
protected Class | ClassLoader.findSystemClass(String name) Finds a class with the specified name, loading it if necessary.
static Class | Class.forName(String className) Returns the Class object associated with the class or interface with the given string name.
static Class | Class.forName(String name, boolean initialize, ClassLoader loader) Returns the Class object associated with the class or interface with the given string name, using the given class loader.

Uses of ClassNotFoundException in java.net

Methods in java.net that throw ClassNotFoundException
protected  Class URLClassLoader.findClass(String name)
Finds and loads the class with the specified name from the URL search path.

Uses of ClassNotFoundException in java.rmi

Methods in java.rmi that throw ClassNotFoundException
 Object MarshalledObject.get()
Returns a new copy of the contained marshalledobject.

Uses of ClassNotFoundException in java.rmi.server

Methods in java.rmi.server that throw ClassNotFoundException
static Class RMIClassLoader.loadClass(String name)
Deprecated. replaced by loadClass(String,String) method
static Class RMIClassLoader.loadClass(URL codebase, String name)
Loads a class from a codebase URL.
static Class RMIClassLoader.loadClass(String codebase, String name)
Loads a class from a codebase URL path.
 Class LoaderHandler.loadClass(String name)
Deprecated. no replacement
 Class LoaderHandler.loadClass(URL codebase, String name)
Deprecated. no replacement

Uses of ClassNotFoundException in java.security

Methods in java.security that throw ClassNotFoundException
 Object SignedObject.getObject()
Retrieves the encapsulated object.

Uses of ClassNotFoundException in javax.rmi.CORBA

Methods in javax.rmi.CORBA that throw ClassNotFoundException
static Class Util.loadClass(String className, String remoteCodebase, ClassLoader loader)
Returns a class instance for the specified class.
 void StubDelegate.readObject(Stub self, ObjectInputStream s)
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.
 Class UtilDelegate.loadClass(String className, String remoteCodebase, ClassLoader loader)
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).

Uses of ClassNotFoundException in javax.swing

Methods in javax.swing that throw ClassNotFoundException
static void UIManager.setLookAndFeel(String className)
Set the current default look and feel using a class name.

Uses of ClassNotFoundException in javax.swing.text

Methods in javax.swing.text that throw ClassNotFoundException
void | StyleContext.readAttributes(ObjectInputStream in, MutableAttributeSet a) Context-specific handling of reading in attributes
static void | StyleContext.readAttributeSet(ObjectInputStream in, MutableAttributeSet a) Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.CloneNotSupportedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.CloneNotSupportedException

Packages that use CloneNotSupportedException
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of CloneNotSupportedException in java.awt.datatransfer

Methods in java.awt.datatransfer that throw CloneNotSupportedException
 Object DataFlavor.clone()

Uses of CloneNotSupportedException in java.lang

Methods in java.lang that throw CloneNotSupportedException
protected  Object Object.clone()
Creates and returns a copy of this object.

Uses of CloneNotSupportedException in java.rmi.server

Subclasses of CloneNotSupportedException in java.rmi.server
 class ServerCloneException
A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.

Methods in java.rmi.server that throw CloneNotSupportedException
 Object UnicastRemoteObject.clone()
Returns a clone of the remote object that is distinct from the original.

Uses of CloneNotSupportedException in java.security

Methods in java.security that throw CloneNotSupportedException
Object | MessageDigestSpi.clone() Returns a clone if the implementation is cloneable.
Object | SignatureSpi.clone() Returns a clone if the implementation is cloneable.
Object | MessageDigest.clone() Returns a clone if the implementation is cloneable.
Object | Signature.clone() Returns a clone if the implementation is cloneable.

Uses of CloneNotSupportedException in javax.swing

Methods in javax.swing that throw CloneNotSupportedException
Object | DefaultListSelectionModel.clone() Returns a clone of this selection model with the same selection.
protected Object | AbstractAction.clone() Clones the abstract action.

Uses of CloneNotSupportedException in javax.swing.tree

Methods in javax.swing.tree that throw CloneNotSupportedException
 Object DefaultTreeSelectionModel.clone()
Returns a clone of this object with the same selection.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Double

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Double

Packages that use Double
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Double in java.lang

Methods in java.lang that return Double
static Double Double.valueOf(String s)
Returns a new Double object initialized to the value represented by the specified string.

Methods in java.lang with parameters of type Double
 int Double.compareTo(Double anotherDouble)
Compares two Doubles numerically.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Error

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Error

Packages that use Error
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.rmi | Provides the RMI package.

Uses of Error in java.awt

Subclasses of Error in java.awt
 class AWTError
Thrown when a serious Abstract Window Toolkit error has occurred.

Uses of Error in java.lang

Subclasses of Error in java.lang
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | ClassCircularityError Thrown when a circularity has been detected while initializing a class.
class | ClassFormatError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
class | ExceptionInInitializerError Signals that an unexpected exception has occurred in a static initializer.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | IncompatibleClassChangeError Thrown when an incompatible class change has occurred to some class definition.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | InternalError Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
class | LinkageError Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
class | NoClassDefFoundError Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
class | OutOfMemoryError Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
class | StackOverflowError Thrown when a stack overflow occurs because an application recurses too deeply.
class | ThreadDeath An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
class | UnknownError Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
class | UnsatisfiedLinkError Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
class | UnsupportedClassVersionError Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
class | VerifyError Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
class | VirtualMachineError Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Uses of Error in java.rmi

Constructors in java.rmi with parameters of type Error
ServerError(String s, Error err)
Constructs a ServerError with the specified detail message and nested error.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Exception

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Exception

Packages that use Exception
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of Exception in java.awt

Subclasses of Exception in java.awt
class | AWTException Signals that an Absract Window Toolkit exception has occurred.
class | FontFormatException Thrown by method createFont in the Font class to indicate that the specified font is bad.
class | IllegalComponentStateException Signals that an AWT component is not in an appropriate state for the requested operation.

Uses of Exception in java.awt.color

Subclasses of Exception in java.awt.color
class | CMMException This exception is thrown if the native CMM returns an error.
class | ProfileDataException This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Uses of Exception in java.awt.datatransfer

Subclasses of Exception in java.awt.datatransfer
class | MimeTypeParseException A class to encapsulate MimeType parsing related exceptions
class | UnsupportedFlavorException Signals that the requested data is not supported in this flavor.

Uses of Exception in java.awt.dnd

Subclasses of Exception in java.awt.dnd
 class InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Uses of Exception in java.awt.event

Methods in java.awt.event that return Exception
 Exception InvocationEvent.getException()
Returns any Exception caught while executing the Runnable's run() method.

Uses of Exception in java.awt.geom

Subclasses of Exception in java.awt.geom
class | IllegalPathStateException The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
class | NoninvertibleTransformException The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.

Uses of Exception in java.awt.im.spi

Methods in java.awt.im.spi that throw Exception
 InputMethod InputMethodDescriptor.createInputMethod()
Creates a new instance of the corresponding input method.

Uses of Exception in java.awt.image

Subclasses of Exception in java.awt.image
class | ImagingOpException The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
class | RasterFormatException The RasterFormatException is thrown if there is invalid layout information in the Raster.

Uses of Exception in java.awt.print

Subclasses of Exception in java.awt.print
class | PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
class | PrinterException The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
class | PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

Uses of Exception in java.beans

Subclasses of Exception in java.beans
class | IntrospectionException Thrown when an exception happens during Introspection.
class | PropertyVetoException A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.

Uses of Exception in java.io

Subclasses of Exception in java.io
class | CharConversionException Base class for character conversion exceptions.
class | EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
class | FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
class | InterruptedIOException Signals that an I/O operation has been interrupted.
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | IOException Signals that an I/O exception of some sort has occurred.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | SyncFailedException Signals that a sync operation has failed.
class | UnsupportedEncodingException The Character Encoding is not supported.
class | UTFDataFormatException Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Fields in java.io declared as Exception
 Exception WriteAbortedException.detail
Exception that was caught while writing the ObjectStream.

Constructors in java.io with parameters of type Exception
WriteAbortedException(String s, Exception ex)
Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation.

Uses of Exception in java.lang

Subclasses of Exception in java.lang
class | ArithmeticException Thrown when an exceptional arithmetic condition has occurred.
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | ArrayStoreException Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
class | ClassCastException Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
class | ClassNotFoundException Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
class | CloneNotSupportedException Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
class | IllegalAccessException Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
class | IllegalArgumentException Thrown to indicate that a method has been passed an illegal or inappropriate argument.
class | IllegalMonitorStateException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
class | IllegalStateException Signals that a method has been invoked at an illegal or inappropriate time.
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
class | InstantiationException Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
class | InterruptedException Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
class | NegativeArraySizeException Thrown if an application tries to create an array with negative size.
class | NoSuchFieldException Signals that the class doesn't have a field of a specified name.
class | NoSuchMethodException Thrown when a particular method cannot be found.
class | NullPointerException Thrown when an application attempts to use null in a case where an object is required.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
class | RuntimeException RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
class | SecurityException Thrown by the security manager to indicate a security violation.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
class | UnsupportedOperationException Thrown to indicate that the requested operation is not supported.

Uses of Exception in java.lang.reflect

Subclasses of Exception in java.lang.reflect
class | InvocationTargetException InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
class | UndeclaredThrowableException Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Uses of Exception in java.net

Subclasses of Exception in java.net
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | MalformedURLException Thrown to indicate that a malformed URL has occurred.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | ProtocolException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | UnknownHostException Thrown to indicate that the IP address of a host could not be determined.
class | UnknownServiceException Thrown to indicate that an unknown service exception has occurred.

Uses of Exception in java.rmi

Subclasses of Exception in java.rmi
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | AlreadyBoundException An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | NotBoundException A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
class | RemoteException A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
class | RMISecurityException Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Constructors in java.rmi with parameters of type Exception
ConnectException(String s, Exception ex)
Constructs a ConnectException with the specified detail message and nested exception.
ConnectIOException(String s, Exception ex)
Constructs a ConnectIOException with the specified detail message and nested exception.
UnmarshalException(String s, Exception ex)
Constructs an UnmarshalException with the specified detail message and nested exception.
UnexpectedException(String s, Exception ex)
Constructs a UnexpectedException with the specified detail message and nested exception.
AccessException(String s, Exception ex)
Constructs an AccessException with the specified detail message and nested exception.
StubNotFoundException(String s, Exception ex)
Constructs a StubNotFoundException with the specified detail message and nested exception.
ServerException(String s, Exception ex)
Constructs a ServerException with the specified detail message and nested exception.
UnknownHostException(String s, Exception ex)
Constructs an UnknownHostException with the specified detail message and nested exception.
ServerRuntimeException(String s, Exception ex)
Deprecated. no replacement
MarshalException(String s, Exception ex)
Constructs a MarshalException with the specified detail message and nested exception.

Uses of Exception in java.rmi.activation

Subclasses of Exception in java.rmi.activation
class | ActivateFailedException This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
class | ActivationException General exception used by the activation interfaces.
class | UnknownGroupException An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
class | UnknownObjectException An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Constructors in java.rmi.activation with parameters of type Exception
ActivateFailedException(String s, Exception ex)
Constructs an ActivateFailedException with the specified detail message and nested exception.

Uses of Exception in java.rmi.server

Subclasses of Exception in java.rmi.server
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | ServerCloneException A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
class | ServerNotActiveException An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Fields in java.rmi.server declared as Exception
 Exception ServerCloneException.detail
Nested exception for ServerCloneException.

Methods in java.rmi.server with parameters of type Exception
 boolean RMIFailureHandler.failure(Exception ex)
The failure callback is invoked when the RMI runtime is unable to create a ServerSocket via the RMISocketFactory.

Methods in java.rmi.server that throw Exception
Object | RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum) Invoke a method.
void | RemoteRef.invoke(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
void | RemoteCall.executeCall() Deprecated. no replacement
void | Skeleton.dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) Deprecated. no replacement

Constructors in java.rmi.server with parameters of type Exception
ExportException(String s, Exception ex)
Constructs an ExportException with the specified detail message and nested exception.
SocketSecurityException(String s, Exception ex)
Constructs an SocketSecurityException with the specified detail message and nested exception.
ServerCloneException(String s, Exception ex)
Constructs an ServerCloneException with the specified detail message and nested exception.
SkeletonNotFoundException(String s, Exception ex)
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message and nested exception.

Uses of Exception in java.security

Subclasses of Exception in java.security
class | AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
class | DigestException This is the generic Message Digest exception.
class | GeneralSecurityException This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
class | InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | InvalidParameterException This exception is thrown when an invalid parameter is passed to a method.
class | KeyException This is the basic key exception.
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.
class | KeyStoreException This is the generic KeyStore exception.
class | NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
class | NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
class | PrivilegedActionException This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
class | ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
class | SignatureException This is the generic Signature exception.
class | UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.

Methods in java.security that return Exception
 Exception PrivilegedActionException.getException()
Returns the exception thrown by the privileged computation that resulted in this PrivilegedActionException.

Methods in java.security that throw Exception
 Object PrivilegedExceptionAction.run()
Performs the computation.

Constructors in java.security with parameters of type Exception
PrivilegedActionException(Exception exception)
Constructs a new PrivilegedActionException "wrapping" the specific Exception.

Uses of Exception in java.security.acl

Subclasses of Exception in java.security.acl
class | AclNotFoundException This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
class | LastOwnerException This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
class | NotOwnerException This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Uses of Exception in java.security.cert

Subclasses of Exception in java.security.cert
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateException This exception indicates one of a variety of certificate problems.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.
class | CRLException CRL (Certificate Revocation List) Exception

Uses of Exception in java.security.spec

Subclasses of Exception in java.security.spec
class | InvalidKeySpecException This is the exception for invalid key specifications.
class | InvalidParameterSpecException This is the exception for invalid parameter specifications.

Uses of Exception in java.sql

Subclasses of Exception in java.sql
class | BatchUpdateException An exception thrown when an error occurs during a batch update operation.
class | DataTruncation An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
class | SQLException An exception that provides information on a database access error or other errors.
class | SQLWarning An exception that provides information on database access warnings.

Uses of Exception in java.text

Subclasses of Exception in java.text
 class ParseException
Signals that an error has been reached unexpectedly while parsing.

Uses of Exception in java.util

Subclasses of Exception in java.util
class | ConcurrentModificationException This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
class | EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.
class | MissingResourceException Signals that a resource is missing.
class | NoSuchElementException Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
class | TooManyListenersException The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

Uses of Exception in java.util.jar

Subclasses of Exception in java.util.jar
 class JarException
Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Uses of Exception in java.util.zip

Subclasses of Exception in java.util.zip
class | DataFormatException Signals that a data format error has occurred.
class | ZipException Signals that a Zip exception of some sort has occurred.

Uses of Exception in javax.naming

Subclasses of Exception in javax.naming
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | CannotProceedException This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
class | CommunicationException This exception is thrown when the client is unable to communicate with the directory or naming service.
class | ConfigurationException This exception is thrown when there is a configuration problem.
class | ContextNotEmptyException This exception is thrown when attempting to destroy a context that is not empty.
class | InsufficientResourcesException This exception is thrown when resources are not available to complete the requested operation.
class | InterruptedNamingException This exception is thrown when the naming operation being invoked has been interrupted.
class | InvalidNameException This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
class | LimitExceededException This exception is thrown when a method terminates abnormally due to a user or system specified limit.
class | LinkException This exception is used to describe problems encounter while resolving links.
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.
class | NameAlreadyBoundException This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
class | NameNotFoundException This exception is thrown when a component of the name cannot be resolved because it is not bound.
class | NamingException This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
class | NamingSecurityException This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
class | NoInitialContextException This exception is thrown when no initial context implementation can be created.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.
class | NotContextException This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
class | OperationNotSupportedException This exception is thrown when a context implementation does not support the operation being invoked.
class | PartialResultException This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
class | ReferralException This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
class | ServiceUnavailableException This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Uses of Exception in javax.naming.directory

Subclasses of Exception in javax.naming.directory
class | AttributeInUseException This exception is thrown when an operation attempts to add an attribute that already exists.
class | AttributeModificationException This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
class | InvalidAttributeIdentifierException This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
class | InvalidAttributesException This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
class | InvalidAttributeValueException This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
class | InvalidSearchControlsException This exception is thrown when the specification of the SearchControls for a search operation is invalid.
class | InvalidSearchFilterException This exception is thrown when the specification of a search filter is invalid.
class | NoSuchAttributeException This exception is thrown when attempting to access an attribute that does not exist.
class | SchemaViolationException This exception is thrown when a method in some ways violates the schema.

Uses of Exception in javax.naming.ldap

Subclasses of Exception in javax.naming.ldap
 class LdapReferralException
This abstract class is used to represent an LDAP referral exception.

Uses of Exception in javax.naming.spi

Methods in javax.naming.spi that throw Exception
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Uses of Exception in javax.sound.midi

Subclasses of Exception in javax.sound.midi
class | InvalidMidiDataException An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
class | MidiUnavailableException A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.

Uses of Exception in javax.sound.sampled

Subclasses of Exception in javax.sound.sampled
class | LineUnavailableException A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
class | UnsupportedAudioFileException An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Uses of Exception in javax.swing

Subclasses of Exception in javax.swing
 class UnsupportedLookAndFeelException
An exception that indicates the request look & feel management classes are not present on the user's system.

Uses of Exception in javax.swing.text

Subclasses of Exception in javax.swing.text
class | BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
class | ChangedCharSetException ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.

Uses of Exception in javax.swing.tree

Subclasses of Exception in javax.swing.tree
 class ExpandVetoException
Exception used to stop and expand/collapse from happening.

Uses of Exception in javax.swing.undo

Subclasses of Exception in javax.swing.undo
class | CannotRedoException Thrown when an UndoableEdit is told to redo() and can't.
class | CannotUndoException Thrown when an UndoableEdit is told to undo() and can't.

Uses of Exception in javax.transaction

Subclasses of Exception in javax.transaction
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Uses of Exception in org.omg.CORBA

Subclasses of Exception in org.omg.CORBA
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | SystemException The root class for all CORBA standard exceptions.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
class | UnknownUserException A class that contains user exceptions returned by the server.
class | UserException The root class for CORBA IDL-defined user exceptions.
class | WrongTransaction The CORBA WrongTransaction user-defined exception.

Methods in org.omg.CORBA that return Exception
abstract  Exception Environment.exception()
Retrieves the exception in this Environment object.

Methods in org.omg.CORBA with parameters of type Exception
abstract  void Environment.exception(Exception except)
Inserts the given exception into this Environment object.

Uses of Exception in org.omg.CORBA.DynAnyPackage

Subclasses of Exception in org.omg.CORBA.DynAnyPackage
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of Exception in org.omg.CORBA.ORBPackage

Subclasses of Exception in org.omg.CORBA.ORBPackage
class | InconsistentTypeCode InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
class | InvalidName The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Uses of Exception in org.omg.CORBA.portable

Subclasses of Exception in org.omg.CORBA.portable
class | ApplicationException This class is used for reporting application level exceptions between ORBs and stubs.
class | IndirectionException The Indirection exception is a Java specific system exception.
class | RemarshalException This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Uses of Exception in org.omg.CORBA.TypeCodePackage

Subclasses of Exception in org.omg.CORBA.TypeCodePackage
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of Exception in org.omg.CosNaming.NamingContextPackage

Subclasses of Exception in org.omg.CosNaming.NamingContextPackage
class | AlreadyBound
class | CannotProceed
class | NotEmpty
class | NotFound

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Float

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Float

Packages that use Float
java.awt.font | Provides classes and interface relating to fonts.
java.lang | Provides classes that are fundamental to the design of the Java programming language.

Uses of Float in java.awt.font

Fields in java.awt.font declared as Float
static Float | TextAttribute.WEIGHT_EXTRA_LIGHT The lightest predefined weight.
static Float | TextAttribute.WEIGHT_LIGHT The standard light weight.
static Float | TextAttribute.WEIGHT_DEMILIGHT An intermediate weight between LIGHT and STANDARD.
static Float | TextAttribute.WEIGHT_REGULAR The standard weight.
static Float | TextAttribute.WEIGHT_SEMIBOLD A moderately heavier weight than REGULAR.
static Float | TextAttribute.WEIGHT_MEDIUM An intermediate weight between the REGULAR and BOLD weights.
static Float | TextAttribute.WEIGHT_DEMIBOLD A moderately lighter weight than BOLD.
static Float | TextAttribute.WEIGHT_BOLD The standard bold weight.
static Float | TextAttribute.WEIGHT_HEAVY A moderately heavier weight than BOLD.
static Float | TextAttribute.WEIGHT_EXTRABOLD An extra heavy weight.
static Float | TextAttribute.WEIGHT_ULTRABOLD The heaviest predefined weight.
static Float | TextAttribute.WIDTH_CONDENSED The most condensed predefined width.
static Float | TextAttribute.WIDTH_SEMI_CONDENSED A moderately condensed width.
static Float | TextAttribute.WIDTH_REGULAR The standard width.
static Float | TextAttribute.WIDTH_SEMI_EXTENDED A moderately extended width.
static Float | TextAttribute.WIDTH_EXTENDED The most extended predefined width.
static Float | TextAttribute.POSTURE_REGULAR The standard posture, upright.
static Float | TextAttribute.POSTURE_OBLIQUE The standard italic posture.
static Float | TextAttribute.JUSTIFICATION_FULL Justify the line to the full requested width.
static Float | TextAttribute.JUSTIFICATION_NONE Do not allow the line to be justified.

Uses of Float in java.lang

Methods in java.lang that return Float
static Float Float.valueOf(String s)
Returns the floating point value represented by the specified String.

Methods in java.lang with parameters of type Float
 int Float.compareTo(Float anotherFloat)
Compares two Floats numerically.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalAccessException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalAccessException

Packages that use IllegalAccessException
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of IllegalAccessException in java.lang

Methods in java.lang that throw IllegalAccessException
 Object Class.newInstance()
Creates a new instance of the class represented by this Class object.

Uses of IllegalAccessException in java.lang.reflect

Methods in java.lang.reflect that throw IllegalAccessException
Object | Method.invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
Object | Field.get(Object obj) Returns the value of the field represented by this Field, on the specified object.
boolean | Field.getBoolean(Object obj) Gets the value of a field as a boolean on the specified object.
byte | Field.getByte(Object obj) Gets the value of a field as a byte on the specified object.
char | Field.getChar(Object obj) Gets the value of a field as a char on the specified object.
short | Field.getShort(Object obj) Gets the value of a field as a short on the specified object.
int | Field.getInt(Object obj) Gets the value of a field as an int on the specified object.
long | Field.getLong(Object obj) Gets the value of a field as a long on the specified object.
float | Field.getFloat(Object obj) Gets the value of a field as a float on the specified object.
double | Field.getDouble(Object obj) Gets the value of a field as a double on the specified object.
void | Field.set(Object obj, Object value) Sets the field represented by this Field object on the specified object argument to the specified new value.
void | Field.setBoolean(Object obj, boolean z) Sets the value of a field as a boolean on the specified object.
void | Field.setByte(Object obj, byte b) Sets the value of a field as a byte on the specified object.
void | Field.setChar(Object obj, char c) Sets the value of a field as a char on the specified object.
void | Field.setShort(Object obj, short s) Sets the value of a field as a short on the specified object.
void | Field.setInt(Object obj, int i) Sets the value of a field as an int on the specified object.
void | Field.setLong(Object obj, long l) Sets the value of a field as a long on the specified object.
void | Field.setFloat(Object obj, float f) Sets the value of a field as a float on the specified object.
void | Field.setDouble(Object obj, double d) Sets the value of a field as a double on the specified object.
Object | Constructor.newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Uses of IllegalAccessException in javax.swing

Methods in javax.swing that throw IllegalAccessException
static void UIManager.setLookAndFeel(String className)
Set the current default look and feel using a class name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalArgumentException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalArgumentException

Packages that use IllegalArgumentException
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref | Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.

Uses of IllegalArgumentException in java.awt.print

Methods in java.awt.print that throw IllegalArgumentException
 void PageFormat.setOrientation(int orientation)
Sets the page orientation.

Uses of IllegalArgumentException in java.beans

Methods in java.beans that throw IllegalArgumentException
void | PropertyEditor.setAsText(String text) Set the property value by parsing a given String.
void | PropertyEditorSupport.setAsText(String text) Sets the property value by parsing a given String.

Uses of IllegalArgumentException in java.beans.beancontext

Methods in java.beans.beancontext that throw IllegalArgumentException
 InputStream BeanContext.getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 URL BeanContext.getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Uses of IllegalArgumentException in java.io

Methods in java.io that throw IllegalArgumentException
abstract boolean | ObjectInputStream.GetField.defaulted(String name) Return true if the named field is defaulted and has no value in this stream.
abstract boolean | ObjectInputStream.GetField.get(String name, boolean defvalue) Get the value of the named boolean field from the persistent field.
abstract char | ObjectInputStream.GetField.get(String name, char defvalue) Get the value of the named char field from the persistent fields.
abstract byte | ObjectInputStream.GetField.get(String name, byte defvalue) Get the value of the named byte field from the persistent fields.
abstract short | ObjectInputStream.GetField.get(String name, short defvalue) Get the value of the named short field from the persistent fields.
abstract int | ObjectInputStream.GetField.get(String name, int defvalue) Get the value of the named int field from the persistent fields.
abstract long | ObjectInputStream.GetField.get(String name, long defvalue) Get the value of the named long field from the persistent fields.
abstract float | ObjectInputStream.GetField.get(String name, float defvalue) Get the value of the named float field from the persistent fields.
abstract double | ObjectInputStream.GetField.get(String name, double defvalue) Get the value of the named double field from the persistent field.
abstract Object | ObjectInputStream.GetField.get(String name, Object defvalue) Get the value of the named Object field from the persistent field.

Uses of IllegalArgumentException in java.lang

Subclasses of IllegalArgumentException in java.lang
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.

Methods in java.lang that throw IllegalArgumentException
protected  Package ClassLoader.definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase)
Defines a package by name in this ClassLoader.

Uses of IllegalArgumentException in java.lang.ref

Methods in java.lang.ref that throw IllegalArgumentException
 Reference ReferenceQueue.remove(long timeout)
Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.

Uses of IllegalArgumentException in java.lang.reflect

Methods in java.lang.reflect that throw IllegalArgumentException
Object | Method.invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
static Object | Array.newInstance(Class componentType, int[] dimensions) Creates a new array with the specified component type and dimensions.
static int | Array.getLength(Object array) Returns the length of the specified array object, as an int.
static Object | Array.get(Object array, int index) Returns the value of the indexed component in the specified array object.
static boolean | Array.getBoolean(Object array, int index) Returns the value of the indexed component in the specified array object, as a boolean.
static byte | Array.getByte(Object array, int index) Returns the value of the indexed component in the specified array object, as a byte.
static char | Array.getChar(Object array, int index) Returns the value of the indexed component in the specified array object, as a char.
static short | Array.getShort(Object array, int index) Returns the value of the indexed component in the specified array object, as a short.
static int | Array.getInt(Object array, int index) Returns the value of the indexed component in the specified array object, as an int.
static long | Array.getLong(Object array, int index) Returns the value of the indexed component in the specified array object, as a long.
static float | Array.getFloat(Object array, int index) Returns the value of the indexed component in the specified array object, as a float.
static double | Array.getDouble(Object array, int index) Returns the value of the indexed component in the specified array object, as a double.
static void | Array.set(Object array, int index, Object value) Sets the value of the indexed component of the specified array object to the specified new value.
static void | Array.setBoolean(Object array, int index, boolean z) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setByte(Object array, int index, byte b) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setChar(Object array, int index, char c) Sets the value of the indexed component of the specified array object to the specified byte value.
static void | Array.setShort(Object array, int index, short s) Sets the value of the indexed component of the specified array object to the specified short value.
static void | Array.setInt(Object array, int index, int i) Sets the value of the indexed component of the specified array object to the specified int value.
static void | Array.setLong(Object array, int index, long l) Sets the value of the indexed component of the specified array object to the specified long value.
static void | Array.setFloat(Object array, int index, float f) Sets the value of the indexed component of the specified array object to the specified float value.
static void | Array.setDouble(Object array, int index, double d) Sets the value of the indexed component of the specified array object to the specified double value.
Object | Field.get(Object obj) Returns the value of the field represented by this Field, on the specified object.
boolean | Field.getBoolean(Object obj) Gets the value of a field as a boolean on the specified object.
byte | Field.getByte(Object obj) Gets the value of a field as a byte on the specified object.
char | Field.getChar(Object obj) Gets the value of a field as a char on the specified object.
short | Field.getShort(Object obj) Gets the value of a field as a short on the specified object.
int | Field.getInt(Object obj) Gets the value of a field as an int on the specified object.
long | Field.getLong(Object obj) Gets the value of a field as a long on the specified object.
float | Field.getFloat(Object obj) Gets the value of a field as a float on the specified object.
double | Field.getDouble(Object obj) Gets the value of a field as a double on the specified object.
void | Field.set(Object obj, Object value) Sets the field represented by this Field object on the specified object argument to the specified new value.
void | Field.setBoolean(Object obj, boolean z) Sets the value of a field as a boolean on the specified object.
void | Field.setByte(Object obj, byte b) Sets the value of a field as a byte on the specified object.
void | Field.setChar(Object obj, char c) Sets the value of a field as a char on the specified object.
void | Field.setShort(Object obj, short s) Sets the value of a field as a short on the specified object.
void | Field.setInt(Object obj, int i) Sets the value of a field as an int on the specified object.
void | Field.setLong(Object obj, long l) Sets the value of a field as a long on the specified object.
void | Field.setFloat(Object obj, float f) Sets the value of a field as a float on the specified object.
void | Field.setDouble(Object obj, double d) Sets the value of a field as a double on the specified object.
static Class | Proxy.getProxyClass(ClassLoader loader, Class[] interfaces) Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
static Object | Proxy.newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
static InvocationHandler | Proxy.getInvocationHandler(Object proxy) Returns the invocation handler for the specified proxy instance.
Object | Constructor.newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Uses of IllegalArgumentException in java.net

Methods in java.net that throw IllegalArgumentException
protected  Package URLClassLoader.definePackage(String name, Manifest man, URL url)
Defines a new package by name in this ClassLoader.

Uses of IllegalArgumentException in java.security

Subclasses of IllegalArgumentException in java.security
 class InvalidParameterException
This exception is thrown when an invalid parameter is passed to a method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IllegalStateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IllegalStateException

Packages that use IllegalStateException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.

Uses of IllegalStateException in java.awt

Subclasses of IllegalStateException in java.awt
 class IllegalComponentStateException
Signals that an AWT component is not in an appropriate state for the requested operation.

Uses of IllegalStateException in java.awt.dnd

Subclasses of IllegalStateException in java.awt.dnd
 class InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IncompatibleClassChangeError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IncompatibleClassChangeError

Packages that use IncompatibleClassChangeError
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of IncompatibleClassChangeError in java.lang

Subclasses of IncompatibleClassChangeError in java.lang
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.IndexOutOfBoundsException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.IndexOutOfBoundsException

Packages that use IndexOutOfBoundsException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.lang | Provides classes that are fundamental to the design of the Java programming language.

Uses of IndexOutOfBoundsException in java.awt

Methods in java.awt that throw IndexOutOfBoundsException
 Cursor Toolkit.createCustomCursor(Image cursor, Point hotSpot, String name)
Creates a new custom cursor object.

Uses of IndexOutOfBoundsException in java.awt.print

Methods in java.awt.print that throw IndexOutOfBoundsException
PageFormat | Book.getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
Printable | Book.getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.
void | Book.setPage(int pageIndex, Printable painter, PageFormat page) Sets the PageFormat and the Painter for a specified page number.
PageFormat | Pageable.getPageFormat(int pageIndex) Returns the PageFormat of the page specified by pageIndex.
Printable | Pageable.getPrintable(int pageIndex) Returns the Printable instance responsible for rendering the page specified by pageIndex.

Uses of IndexOutOfBoundsException in java.lang

Subclasses of IndexOutOfBoundsException in java.lang
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.InstantiationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.InstantiationException

Packages that use InstantiationException
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of InstantiationException in java.lang

Methods in java.lang that throw InstantiationException
 Object Class.newInstance()
Creates a new instance of the class represented by this Class object.

Uses of InstantiationException in java.lang.reflect

Methods in java.lang.reflect that throw InstantiationException
 Object Constructor.newInstance(Object[] initargs)
Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Uses of InstantiationException in javax.swing

Methods in javax.swing that throw InstantiationException
static void UIManager.setLookAndFeel(String className)
Set the current default look and feel using a class name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Integer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Integer

Packages that use Integer
java.awt.font | Provides classes and interface relating to fonts.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Integer in java.awt.font

Fields in java.awt.font declared as Integer
static Integer | TextAttribute.SUPERSCRIPT_SUPER Standard superscript.
static Integer | TextAttribute.SUPERSCRIPT_SUB Standard subscript.
static Integer | TextAttribute.UNDERLINE_ON Standard underline at the roman baseline for roman text, and below the decenders for other text.
static Integer | TextAttribute.UNDERLINE_LOW_ONE_PIXEL Single pixel solid low underline.
static Integer | TextAttribute.UNDERLINE_LOW_TWO_PIXEL Double pixel solid low underline.
static Integer | TextAttribute.UNDERLINE_LOW_DOTTED Single pixel dotted low underline.
static Integer | TextAttribute.UNDERLINE_LOW_GRAY Double pixel gray low underline.
static Integer | TextAttribute.UNDERLINE_LOW_DASHED Single pixel dashed low underline.

Uses of Integer in java.lang

Methods in java.lang that return Integer
static Integer | Integer.valueOf(String s, int radix) Returns a new Integer object initialized to the value of the specified String.
static Integer | Integer.valueOf(String s) Returns a new Integer object initialized to the value of the specified String.
static Integer | Integer.getInteger(String nm) Determines the integer value of the system property with the specified name.
static Integer | Integer.getInteger(String nm, int val) Determines the integer value of the system property with the specified name.
static Integer | Integer.getInteger(String nm, Integer val) Returns the integer value of the system property with the specified name.
static Integer | Integer.decode(String nm) Decodes a String into an Integer.

Methods in java.lang with parameters of type Integer
static Integer | Integer.getInteger(String nm, Integer val) Returns the integer value of the system property with the specified name.
int | Integer.compareTo(Integer anotherInteger) Compares two Integers numerically.

Uses of Integer in javax.swing

Fields in javax.swing declared as Integer
static Integer | JLayeredPane.DEFAULT_LAYER Convenience object defining the Default layer.
static Integer | JLayeredPane.PALETTE_LAYER Convenience object defining the Palette layer.
static Integer | JLayeredPane.MODAL_LAYER Convenience object defining the Modal layer.
static Integer | JLayeredPane.POPUP_LAYER Convenience object defining the Popup layer.
static Integer | JLayeredPane.DRAG_LAYER Convenience object defining the Drag layer.
static Integer | JLayeredPane.FRAME_CONTENT_LAYER Convenience object defining the Frame Content layer.

Methods in javax.swing that return Integer
protected  Integer JLayeredPane.getObjectForLayer(int layer)
Returns the Integer object associated with a specified layer.

Methods in javax.swing with parameters of type Integer
 void JInternalFrame.setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.InterruptedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.InterruptedException

Packages that use InterruptedException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref | Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of InterruptedException in java.awt

Methods in java.awt that throw InterruptedException
 void MediaTracker.waitForAll()
Starts loading all images tracked by this media tracker.
 boolean MediaTracker.waitForAll(long ms)
Starts loading all images tracked by this media tracker.
 void MediaTracker.waitForID(int id)
Starts loading all images tracked by this media tracker with the specified identifier.
 boolean MediaTracker.waitForID(int id, long ms)
Starts loading all images tracked by this media tracker with the specified identifier.
 AWTEvent EventQueue.getNextEvent()
Remove an event from the EventQueue and return it.
static void EventQueue.invokeAndWait(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.

Uses of InterruptedException in java.awt.image

Methods in java.awt.image that throw InterruptedException
boolean | PixelGrabber.grabPixels() Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered.
boolean | PixelGrabber.grabPixels(long ms) Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered or until the specified timeout has elapsed.

Uses of InterruptedException in java.lang

Methods in java.lang that throw InterruptedException
 void Object.wait(long timeout)
Causes current thread to wait until either another thread invokes the Object.notify() method or the Object.notifyAll() method for this object, or a specified amount of time has elapsed.
 void Object.wait(long timeout, int nanos)
Causes current thread to wait until another thread invokes the Object.notify() method or the Object.notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
 void Object.wait()
Causes current thread to wait until another thread invokes the Object.notify() method or the Object.notifyAll() method for this object.
static void Thread.sleep(long millis)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds.
static void Thread.sleep(long millis, int nanos)
Causes the currently executing thread to sleep (cease execution) for the specified number of milliseconds plus the specified number of nanoseconds.
 void Thread.join(long millis)
Waits at most millis milliseconds for this thread to die.
 void Thread.join(long millis, int nanos)
Waits at most millis milliseconds plus nanos nanoseconds for this thread to die.
 void Thread.join()
Waits for this thread to die.
abstract  int Process.waitFor()
causes the current thread to wait, if necessary, until the process represented by this Process object has terminated.

Uses of InterruptedException in java.lang.ref

Methods in java.lang.ref that throw InterruptedException
Reference | ReferenceQueue.remove(long timeout) Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
Reference | ReferenceQueue.remove() Removes the next reference object in this queue, blocking until one becomes available.

Uses of InterruptedException in javax.swing

Methods in javax.swing that throw InterruptedException
static void SwingUtilities.invokeAndWait(Runnable doRun)
Causes doRun.run() to be executed synchronously on the AWT event dispatching thread.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.LinkageError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.LinkageError

Packages that use LinkageError
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of LinkageError in java.lang

Subclasses of LinkageError in java.lang
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | ClassCircularityError Thrown when a circularity has been detected while initializing a class.
class | ClassFormatError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
class | ExceptionInInitializerError Signals that an unexpected exception has occurred in a static initializer.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | IncompatibleClassChangeError Thrown when an incompatible class change has occurred to some class definition.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | NoClassDefFoundError Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
class | UnsatisfiedLinkError Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
class | UnsupportedClassVersionError Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
class | VerifyError Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Long

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Long

Packages that use Long
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Long in java.lang

Methods in java.lang that return Long
static Long | Long.valueOf(String s, int radix) Returns a new long object initialized to the value of the specified String.
static Long | Long.valueOf(String s) Returns a new long object initialized to the value of the specified String.
static Long | Long.decode(String nm) Decodes a String into a Long.
static Long | Long.getLong(String nm) Determines the long value of the system property with the specified name.
static Long | Long.getLong(String nm, long val) Determines the long value of the system property with the specified name.
static Long | Long.getLong(String nm, Long val) Returns the long value of the system property with the specified name.

Methods in java.lang with parameters of type Long
static Long | Long.getLong(String nm, Long val) Returns the long value of the system property with the specified name.
int | Long.compareTo(Long anotherLong) Compares two Longs numerically.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NegativeArraySizeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NegativeArraySizeException

Packages that use NegativeArraySizeException
java.lang.reflect Provides classes and interfaces for obtaining reflective information about classes and objects.

Uses of NegativeArraySizeException in java.lang.reflect

Methods in java.lang.reflect that throw NegativeArraySizeException
static Object | Array.newInstance(Class componentType, int length) Creates a new array with the specified component type and length.
static Object | Array.newInstance(Class componentType, int[] dimensions) Creates a new array with the specified component type and dimensions.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NoSuchFieldException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NoSuchFieldException

Packages that use NoSuchFieldException
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of NoSuchFieldException in java.lang

Methods in java.lang that throw NoSuchFieldException
Field | Class.getField(String name) Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
Field | Class.getDeclaredField(String name) Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NoSuchMethodException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NoSuchMethodException

Packages that use NoSuchMethodException
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of NoSuchMethodException in java.lang

Methods in java.lang that throw NoSuchMethodException
Method | Class.getMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
Constructor | Class.getConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
Method | Class.getDeclaredMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
Constructor | Class.getDeclaredConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NullPointerException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NullPointerException

Packages that use NullPointerException
java.awt.print Provides classes and interfaces for a general printing API.

Uses of NullPointerException in java.awt.print

Methods in java.awt.print that throw NullPointerException
abstract  void PrinterJob.setPageable(Pageable document)
Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Number

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Number

Packages that use Number
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Number in java.awt

Methods in java.awt that return Number
Number | Scrollbar.AccessibleAWTScrollBar.getCurrentAccessibleValue() Get the accessible value of this object.
Number | Scrollbar.AccessibleAWTScrollBar.getMinimumAccessibleValue() Get the minimum accessible value of this object.
Number | Scrollbar.AccessibleAWTScrollBar.getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | MenuItem.AccessibleAWTMenuItem.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | MenuItem.AccessibleAWTMenuItem.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | MenuItem.AccessibleAWTMenuItem.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | Checkbox.AccessibleAWTCheckbox.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | Checkbox.AccessibleAWTCheckbox.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | Checkbox.AccessibleAWTCheckbox.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | Button.AccessibleAWTButton.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | Button.AccessibleAWTButton.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | Button.AccessibleAWTButton.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getMaximumAccessibleValue() Get the maximum value of this object as a Number.

Methods in java.awt with parameters of type Number
boolean | Scrollbar.AccessibleAWTScrollBar.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | MenuItem.AccessibleAWTMenuItem.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | Checkbox.AccessibleAWTCheckbox.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | Button.AccessibleAWTButton.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.

Uses of Number in java.lang

Subclasses of Number in java.lang
class | Byte The Byte class is the standard wrapper for byte values.
class | Double The Double class wraps a value of the primitive type double in an object.
class | Float The Float class wraps a value of primitive type float in an object.
class | Integer The Integer class wraps a value of the primitive type int in an object.
class | Long The Long class wraps a value of the primitive type long in an object.
class | Short The Short class is the standard wrapper for short values.

Uses of Number in java.math

Subclasses of Number in java.math
class | BigDecimal Immutable, arbitrary-precision signed decimal numbers.
class | BigInteger Immutable arbitrary-precision integers.

Uses of Number in java.text

Methods in java.text that return Number
abstract Number | NumberFormat.parse(String text, ParsePosition parsePosition) Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
Number | NumberFormat.parse(String text) Convenience method.
Number | ChoiceFormat.parse(String text, ParsePosition status) Parses a Number from the input text.
Number | DecimalFormat.parse(String text, ParsePosition parsePosition) Returns an instance of Number with a value matching the given string.

Uses of Number in javax.accessibility

Methods in javax.accessibility that return Number
Number | AccessibleValue.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | AccessibleValue.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | AccessibleValue.getMaximumAccessibleValue() Get the maximum value of this object as a Number.

Methods in javax.accessibility with parameters of type Number
 boolean AccessibleValue.setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.

Uses of Number in javax.swing

Methods in javax.swing that return Number
Number | AbstractButton.AccessibleAbstractButton.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | AbstractButton.AccessibleAbstractButton.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | AbstractButton.AccessibleAbstractButton.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | JInternalFrame.AccessibleJInternalFrame.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | JInternalFrame.AccessibleJInternalFrame.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | JInternalFrame.AccessibleJInternalFrame.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getCurrentAccessibleValue() Get the value of this object as a Number.
Number | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getMinimumAccessibleValue() Get the minimum value of this object as a Number.
Number | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | JSplitPane.AccessibleJSplitPane.getCurrentAccessibleValue() Gets the accessible value of this object.
Number | JSplitPane.AccessibleJSplitPane.getMinimumAccessibleValue() Gets the minimum accessible value of this object.
Number | JSplitPane.AccessibleJSplitPane.getMaximumAccessibleValue() Gets the maximum accessible value of this object.
Number | JScrollBar.AccessibleJScrollBar.getCurrentAccessibleValue() Get the accessible value of this object.
Number | JScrollBar.AccessibleJScrollBar.getMinimumAccessibleValue() Get the minimum accessible value of this object.
Number | JScrollBar.AccessibleJScrollBar.getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | JProgressBar.AccessibleJProgressBar.getCurrentAccessibleValue() Get the accessible value of this object.
Number | JProgressBar.AccessibleJProgressBar.getMinimumAccessibleValue() Get the minimum accessible value of this object.
Number | JProgressBar.AccessibleJProgressBar.getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | JSlider.AccessibleJSlider.getCurrentAccessibleValue() Get the accessible value of this object.
Number | JSlider.AccessibleJSlider.getMinimumAccessibleValue() Get the minimum accessible value of this object.
Number | JSlider.AccessibleJSlider.getMaximumAccessibleValue() Get the maximum accessible value of this object.

Methods in javax.swing with parameters of type Number
boolean | AbstractButton.AccessibleAbstractButton.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | JInternalFrame.AccessibleJInternalFrame.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | JSplitPane.AccessibleJSplitPane.setCurrentAccessibleValue(Number n) Sets the value of this object as a Number.
boolean | JScrollBar.AccessibleJScrollBar.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | JProgressBar.AccessibleJProgressBar.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
boolean | JSlider.AccessibleJSlider.setCurrentAccessibleValue(Number n) Set the value of this object as a Number.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.NumberFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.NumberFormatException

Packages that use NumberFormatException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.

Uses of NumberFormatException in java.awt

Methods in java.awt that throw NumberFormatException
static Color Color.decode(String nm)
Converts a String to an integer and returns the specified opaque Color.

Uses of NumberFormatException in java.lang

Methods in java.lang that throw NumberFormatException
static long | Long.parseLong(String s, int radix) Parses the string argument as a signed long in the radix specified by the second argument.
static long | Long.parseLong(String s) Parses the string argument as a signed decimal long.
static Long | Long.valueOf(String s, int radix) Returns a new long object initialized to the value of the specified String.
static Long | Long.valueOf(String s) Returns a new long object initialized to the value of the specified String.
static Long | Long.decode(String nm) Decodes a String into a Long.
static short | Short.parseShort(String s) Assuming the specified String represents a short, returns that short's value.
static short | Short.parseShort(String s, int radix) Assuming the specified String represents a short, returns that short's value.
static Short | Short.valueOf(String s, int radix) Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short | Short.valueOf(String s) Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short | Short.decode(String nm) Decodes a String into a Short.
static Float | Float.valueOf(String s) Returns the floating point value represented by the specified String.
static float | Float.parseFloat(String s) Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
static int | Integer.parseInt(String s, int radix) Parses the string argument as a signed integer in the radix specified by the second argument.
static int | Integer.parseInt(String s) Parses the string argument as a signed decimal integer.
static Integer | Integer.valueOf(String s, int radix) Returns a new Integer object initialized to the value of the specified String.
static Integer | Integer.valueOf(String s) Returns a new Integer object initialized to the value of the specified String.
static Integer | Integer.decode(String nm) Decodes a String into an Integer.
boolean | Package.isCompatibleWith(String desired) Compare this package's specification version with a desired version.
static byte | Byte.parseByte(String s) Assuming the specified String represents a byte, returns that byte's value.
static byte | Byte.parseByte(String s, int radix) Assuming the specified String represents a byte, returns that byte's value.
static Byte | Byte.valueOf(String s, int radix) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte | Byte.valueOf(String s) Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte | Byte.decode(String nm) Decodes a String into a Byte.
static Double | Double.valueOf(String s) Returns a new Double object initialized to the value represented by the specified string.
static double | Double.parseDouble(String s) Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.

Constructors in java.lang that throw NumberFormatException
Long(String s)
Constructs a newly allocated Long object that represents the value represented by the string in decimal form.
Short(String s)
Constructs a Short object initialized to the value specified by the String parameter.
Float(String s)
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.
Integer(String s)
Constructs a newly allocated Integer object that represents the value represented by the string.
Byte(String s)
Constructs a Byte object initialized to the value specified by the String parameter.
Double(String s)
Constructs a newly allocated Double object that represents the floating- point value of type double represented by the string.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Object

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Object

Packages that use Object
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.ref | Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of Object in java.applet

Subclasses of Object in java.applet
class | Applet An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
protected class | Applet.AccessibleApplet This class implements accessibility support for the Applet class.

Uses of Object in java.awt

Subclasses of Object in java.awt
class | AlphaComposite This AlphaComposite class implements the basic alpha compositing rules for combining source and destination pixels to achieve blending and transparency effects with graphics and images.
(package private) class | java.awt.AttributeValue
class | AWTError Thrown when a serious Abstract Window Toolkit error has occurred.
class | AWTEvent The root event class for all AWT events.
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
class | AWTException Signals that an Absract Window Toolkit exception has occurred.
class | AWTPermission This class is for AWT permissions.
class | BasicStroke The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke.
class | BorderLayout A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
class | Button This class creates a labeled button.
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
protected class | Canvas.AccessibleAWTCanvas This class implements accessibility support for the Canvas class.
class | CardLayout A CardLayout object is a layout manager for a container.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
class | CheckboxGroup The CheckboxGroup class is used to group together a set of Checkbox buttons.
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
class | Choice The Choice class presents a pop-up menu of choices.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
class | Color The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace.
class | Component A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
protected class | Component.AccessibleAWTComponent Inner class of Component used to provide default support for accessibility.
protected class | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler Fire PropertyChange listener, if one is registered, when shown/hidden..
protected class | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
class | ComponentOrientation The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.
class | Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
protected class | Container.AccessibleAWTContainer Inner class of Container used to provide default support for accessibility.
protected class | Container.AccessibleAWTContainer.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.
class | Cursor A class to encapsulate the bitmap representation of the mouse cursor.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
class | Dimension The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
class | Event Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model.
class | EventQueue EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | FlowLayout A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph.
class | Font The Font class represents fonts.
class | FontFormatException Thrown by method createFont in the Font class to indicate that the specified font is bad.
class | FontMetrics The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
class | Frame A Frame is a top-level window with a title and a border.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
class | GradientPaint The GradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
class | Graphics The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.
class | Graphics2D This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
class | GraphicsConfigTemplate The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration.
class | GraphicsConfiguration The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
class | GraphicsDevice The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment.
class | GraphicsEnvironment The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform.
class | GridBagConstraints The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
class | GridBagLayout The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
class | GridLayout The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
class | IllegalComponentStateException Signals that an AWT component is not in an appropriate state for the requested operation.
class | Image The abstract class Image is the superclass of all classes that represent graphical images.
class | Insets An Insets object is a representation of the borders of a container.
class | JobAttributes A set of attributes which control a print job.
static class | JobAttributes.DefaultSelectionType A type-safe enumeration of possible default selection states.
static class | JobAttributes.DestinationType A type-safe enumeration of possible job destinations.
static class | JobAttributes.DialogType A type-safe enumeration of possible dialogs to display to the user.
static class | JobAttributes.MultipleDocumentHandlingType A type-safe enumeration of possible multiple document handling states.
static class | JobAttributes.SidesType A type-safe enumeration of possible multi-page impositions.
class | Label A Label object is a component for placing text in a container.
protected class | Label.AccessibleAWTLabel This class implements accessibility support for the Label class.
class | List The List component presents the user with a scrolling list of text items.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
class | MediaTracker The MediaTracker class is a utility class to track the status of a number of media objects.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
class | MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
class | MenuComponent The abstract class MenuComponent is the superclass of all menu-related components.
protected class | MenuComponent.AccessibleAWTMenuComponent Inner class of MenuComponent used to provide default support for accessibility.
class | MenuItem All items in a menu must belong to the class MenuItem, or one of its subclasses.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
class | MenuShortcut A class which represents a keyboard accelerator for a MenuItem.
class | PageAttributes A set of attributes which control the output of a printed page.
static class | PageAttributes.ColorType A type-safe enumeration of possible color states.
static class | PageAttributes.MediaType A type-safe enumeration of possible paper sizes.
static class | PageAttributes.OrientationRequestedType A type-safe enumeration of possible orientations.
static class | PageAttributes.OriginType A type-safe enumeration of possible origins.
static class | PageAttributes.PrintQualityType A type-safe enumeration of possible print qualities.
class | Panel Panel is the simplest container class.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
class | Point A point representing a location in (x, y) coordinate space, specified in integer precision.
class | Polygon The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.
class | PrintJob An abstract class which initiates and executes a print job.
class | Rectangle A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
class | RenderingHints The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.
static class | RenderingHints.Key Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
class | Robot This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
class | SystemColor A class to encapsulate symbolic colors representing the color of GUI objects on a system.
class | TextArea A TextArea object is a multi-line region that displays text.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.
class | TexturePaint The TexturePaint class provides a way to fill a Shape with a texture that is specified as a BufferedImage.
class | Toolkit This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.
class | Window A Window object is a top-level window with no borders and no menubar.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Fields in java.awt declared as Object
Object | Event.target The target component.
Object | Event.arg An arbitrary argument of the event.
static Object | RenderingHints.VALUE_ANTIALIAS_ON Antialiasing hint values -- rendering is done with antialiasing
static Object | RenderingHints.VALUE_ANTIALIAS_OFF Antialiasing hint values -- rendering is done without antialiasing
static Object | RenderingHints.VALUE_ANTIALIAS_DEFAULT Antialiasing hint values -- rendering is done with the platform default antialiasing mode.
static Object | RenderingHints.VALUE_RENDER_SPEED Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output speed.
static Object | RenderingHints.VALUE_RENDER_QUALITY Rendering hint values -- Appropriate rendering algorithms are chosen with a preference for output quality.
static Object | RenderingHints.VALUE_RENDER_DEFAULT Rendering hint values -- The platform default rendering algorithms are chosen.
static Object | RenderingHints.VALUE_DITHER_DISABLE Dithering hint values -- do not dither when rendering
static Object | RenderingHints.VALUE_DITHER_ENABLE Dithering hint values -- dither when rendering, if needed
static Object | RenderingHints.VALUE_DITHER_DEFAULT Dithering hint values -- use the platform default for dithering
static Object | RenderingHints.VALUE_TEXT_ANTIALIAS_ON Text antialiasing hint value -- text rendering is done with antialiasing
static Object | RenderingHints.VALUE_TEXT_ANTIALIAS_OFF Text antialiasing hint value -- text rendering is done without antialiasing
static Object | RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT Text antialiasing hint value -- text rendering is done using the platform default text antialiasing mode.
static Object | RenderingHints.VALUE_FRACTIONALMETRICS_OFF Font fractional metrics hint values -- fractional metrics disabled
static Object | RenderingHints.VALUE_FRACTIONALMETRICS_ON Font fractional metrics hint values -- fractional metrics enabled
static Object | RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT Font fractional metrics hint values -- use the platform default for fractional metrics
static Object | RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR Interpolation hint value -- INTERPOLATION_NEAREST_NEIGHBOR
static Object | RenderingHints.VALUE_INTERPOLATION_BILINEAR Interpolation hint value -- INTERPOLATION_BILINEAR
static Object | RenderingHints.VALUE_INTERPOLATION_BICUBIC Interpolation hint value -- INTERPOLATION_BICUBIC
static Object | RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED Alpha interpolation hint value -- ALPHA_INTERPOLATION_SPEED
static Object | RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY Alpha interpolation hint value -- ALPHA_INTERPOLATION_QUALITY
static Object | RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT Alpha interpolation hint value -- ALPHA_INTERPOLATION_DEFAULT
static Object | RenderingHints.VALUE_COLOR_RENDER_SPEED Color rendering hint value -- COLOR_RENDER_SPEED
static Object | RenderingHints.VALUE_COLOR_RENDER_QUALITY Color rendering hint value -- COLOR_RENDER_QUALITY
static Object | RenderingHints.VALUE_COLOR_RENDER_DEFAULT Color rendering hint value -- COLOR_RENDER_DEFAULT
static Object | RenderingHints.VALUE_STROKE_DEFAULT Stroke normalization control hint value -- STROKE_DEFAULT
static Object | RenderingHints.VALUE_STROKE_NORMALIZE Stroke normalization control hint value -- STROKE_NORMALIZE
static Object | RenderingHints.VALUE_STROKE_PURE Stroke normalization control hint value -- STROKE_PURE
static Object | Image.UndefinedProperty The UndefinedProperty object should be returned whenever a property which was not defined for a particular image is fetched.

Methods in java.awt that return Object
Object | Component.getTreeLock() Gets the locking object for AWT component-tree and layout Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
protected Object | MenuComponent.getTreeLock() Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
Object[] | Checkbox.getSelectedObjects() Returns an array (length 1) containing the checkbox label or null if the checkbox is not selected.
abstract Object | Graphics2D.getRenderingHint(RenderingHints.Key hintKey) Returns the value of a single preference for the rendering algorithms.
Object | Insets.clone() Create a copy of this object.
Object | RenderingHints.get(Object key) Returns the value to which the specified key is mapped.
Object | RenderingHints.put(Object key, Object value) Maps the specified key to the specified value in this RenderingHints object.
Object | RenderingHints.remove(Object key) Removes the key and its corresponding value from this RenderingHints object.
Object | RenderingHints.clone() Creates a clone of this RenderingHints object that has the same contents as this RenderingHints object.
Object | Toolkit.getDesktopProperty(String propertyName) obtain a value for the specified desktop property.
protected Object | Toolkit.lazilyLoadDesktopProperty(String name) an opportunity to lazily evaluate desktop property values.
Object[] | List.getSelectedObjects() Returns the selected items on the list in an array of Objects.
Object[] | Choice.getSelectedObjects() Returns an array (length 1) containing the currently selected item.
Object | PageAttributes.clone() Creates and returns a copy of this PageAttributes.
Object | JobAttributes.clone() Creates and returns a copy of this JobAttributes.
Object[] | ItemSelectable.getSelectedObjects() Returns the selected items or null if no items are selected.
Object | GridBagConstraints.clone() Creates a copy of this grid bag constraint.
Object[] | MediaTracker.getErrorsAny() Returns a list of all media that have encountered an error.
Object[] | MediaTracker.getErrorsID(int id) Returns a list of media with the specified ID that have encountered an error.
Object[] | CheckboxMenuItem.getSelectedObjects() Returns the an array (length 1) containing the checkbox menu item label or null if the checkbox is not selected.
abstract Object | Image.getProperty(String name, ImageObserver observer) Gets a property of this image by name.

Methods in java.awt with parameters of type Object
boolean | Component.action(Event evt, Object what) Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
boolean | Component.gotFocus(Event evt, Object what) Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
boolean | Component.lostFocus(Event evt, Object what) Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
protected void | Component.firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
void | Container.add(Component comp, Object constraints) Adds the specified component to the end of this container.
void | Container.add(Component comp, Object constraints, int index) Adds the specified component to this container with the specified constraints at the specified index.
protected void | Container.addImpl(Component comp, Object constraints, int index) Adds the specified component to this container at the specified index.
void | LayoutManager2.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | CardLayout.addLayoutComponent(Component comp, Object constraints) Adds the specified component to this card layout's internal table of names.
protected void | ScrollPane.addImpl(Component comp, Object constraints, int index) Adds the specified component to this scroll pane container.
abstract void | Graphics2D.setRenderingHint(RenderingHints.Key hintKey, Object hintValue) Sets the value of a single preference for the rendering algorithms.
boolean | MenuShortcut.equals(Object obj) Returns whether this MenuShortcut is the same as another: equality is defined to mean that both MenuShortcuts use the same key and both either use or don't use the SHIFT key.
void | BorderLayout.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
boolean | Insets.equals(Object obj) Checks whether two insets objects are equal.
boolean | Font.equals(Object obj) Compares this Font object to the specified Object.
boolean | RenderingHints.containsKey(Object key) Returns true if this RenderingHints contains a mapping for the specified key.
boolean | RenderingHints.containsValue(Object value) Returns true if this RenderingHints maps one or more keys to the specified value.
Object | RenderingHints.get(Object key) Returns the value to which the specified key is mapped.
Object | RenderingHints.put(Object key, Object value) Maps the specified key to the specified value in this RenderingHints object.
Object | RenderingHints.remove(Object key) Removes the key and its corresponding value from this RenderingHints object.
boolean | RenderingHints.equals(Object o) Compares the specified Object with this RenderingHints for equality.
abstract boolean | RenderingHints.Key.isCompatibleValue(Object val) Returns true if the specified object is a valid value for this Key.
boolean | RenderingHints.Key.equals(Object o) The equals method for all Key objects will return the same result as the equality operator '=='.
protected void | Toolkit.setDesktopProperty(String name, Object newValue) set the named desktop property to the specified value and fire a property change event to notify any listeners that the value has changed
boolean | Point.equals(Object obj) Determines whether an instance of Point2D is equal to this point.
boolean | Color.equals(Object obj) Determines whether another object is equal to this Color.
boolean | Dimension.equals(Object obj) Checks whether two dimension objects have equal values.
boolean | BasicStroke.equals(Object obj) Tests if a specified object is equal to this BasicStroke by first testing if it is a BasicStroke and then comparing its width, join, cap, miter limit, dash, and dash phase attributes with those of this BasicStroke.
void | GridBagLayout.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
boolean | PageAttributes.equals(Object obj) Determines whether two PageAttributes are equal to each other.
boolean | JobAttributes.equals(Object obj) Determines whether two JobAttributes are equal to each other.
boolean | AlphaComposite.equals(Object obj) Tests if the specified Object is equal to this AlphaComposite object.
boolean | Rectangle.equals(Object obj) Checks whether two rectangles are equal.

Constructors in java.awt with parameters of type Object
Event(Object target, long when, int id, int x, int y, int key, int modifiers, Object arg)
Creates an instance of Event with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and argument.
Event(Object target, long when, int id, int x, int y, int key, int modifiers)
Creates an instance of Event, with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and an argument set to null.
Event(Object target, int id, Object arg)
Creates an instance of Event with the specified target component, event type, and argument.
RenderingHints(RenderingHints.Key key, Object value)
Constructs a new object with the specified key/value pair.
AWTEvent(Object source, int id)
Constructs an AWTEvent object with the specified source object and type.

Uses of Object in java.awt.color

Subclasses of Object in java.awt.color
class | CMMException This exception is thrown if the native CMM returns an error.
class | ColorSpace This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.
class | ICC_ColorSpace An implementation of the abstract ColorSpace class.
class | ICC_Profile A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).
class | ICC_ProfileGray A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
class | ICC_ProfileRGB A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags.
class | ProfileDataException This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Methods in java.awt.color that return Object
protected  Object ICC_Profile.readResolve()
Resolves instances being deserialized into instances registered with CMM.

Uses of Object in java.awt.datatransfer

Subclasses of Object in java.awt.datatransfer
class | Clipboard A class which implements a mechanism to transfer data using cut/copy/paste operations.
class | DataFlavor Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.
class | MimeTypeParseException A class to encapsulate MimeType parsing related exceptions
class | StringSelection A Transferable which implements the capability required to transfer a String.
class | SystemFlavorMap The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.
class | UnsupportedFlavorException Signals that the requested data is not supported in this flavor.

Methods in java.awt.datatransfer that return Object
Object | Transferable.getTransferData(DataFlavor flavor) Returns an object which represents the data to be transferred.
Object | StringSelection.getTransferData(DataFlavor flavor) Returns the Transferable's data in the requested DataFlavor if possible.
Object | DataFlavor.clone()

Methods in java.awt.datatransfer with parameters of type Object
Transferable | Clipboard.getContents(Object requestor) Returns a transferable object representing the current contents of the clipboard.
boolean | DataFlavor.equals(Object o) If the object is an instance of DataFlavor, representationClass and MIME type will be compared.

Uses of Object in java.awt.dnd

Subclasses of Object in java.awt.dnd
class | DnDConstants This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation.
class | DragGestureEvent A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
class | DragGestureRecognizer The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.
class | DragSource The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
class | DragSourceContext The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
class | DragSourceDragEvent The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
class | DragSourceDropEvent The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
class | DragSourceEvent This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
class | DropTarget The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
protected static class | DropTarget.DropTargetAutoScroller this protected nested class implements autoscrolling
class | DropTargetContext A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget.
protected class | DropTargetContext.TransferableProxy The TransferableProxy is a nested helper class that supports the DropTargetContext in managing the transfer of data.
class | DropTargetDragEvent The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
class | DropTargetDropEvent The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
class | DropTargetEvent The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.
class | InvalidDnDOperationException This exception is thrown by various methods in the java.awt.dnd package.
class | MouseDragGestureRecognizer This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Methods in java.awt.dnd that return Object
Object | DropTargetContext.TransferableProxy.getTransferData(DataFlavor df) get the transfer data
Object[] | DragGestureEvent.toArray() This method returns an Object array of the events comprising the drag gesture.
Object[] | DragGestureEvent.toArray(Object[] array) This method returns an array of the events comprising the drag gesture.

Methods in java.awt.dnd with parameters of type Object
 Object[] DragGestureEvent.toArray(Object[] array)
This method returns an array of the events comprising the drag gesture.

Uses of Object in java.awt.event

Subclasses of Object in java.awt.event
class | ActionEvent A semantic event which indicates that a component-defined action occured.
class | AdjustmentEvent The adjustment event emitted by Adjustable objects.
class | ComponentAdapter An abstract adapter class for receiving component events.
class | ComponentEvent A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
class | ContainerAdapter An abstract adapter class for receiving container events.
class | ContainerEvent A low-level event which indicates that a container's contents changed because a component was added or removed.
class | FocusAdapter An abstract adapter class for receiving keyboard focus events.
class | FocusEvent A low-level event which indicates that a component has gained or lost the keyboard focus.
class | HierarchyBoundsAdapter An abstract adapter class for receiving ancestor moved and resized events.
class | HierarchyEvent An event which indicates a change to the Component hierarchy to which a Component belongs.
class | InputEvent The root event class for all component-level input events.
class | InputMethodEvent Input method events contain information about text that is being composed using an input method.
class | InvocationEvent An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
class | ItemEvent A semantic event which indicates that an item was selected or deselected.
class | KeyAdapter An abstract adapter class for receiving keyboard events.
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseAdapter An abstract adapter class for receiving mouse events.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.
class | MouseMotionAdapter An abstract adapter class for receiving mouse motion events.
class | PaintEvent The component-level paint event.
class | TextEvent A semantic event which indicates that an object's text changed.
class | WindowAdapter An abstract adapter class for receiving window events.
class | WindowEvent A low-level event which indicates that a window has changed its status.

Fields in java.awt.event declared as Object
protected  Object InvocationEvent.notifier
The (potentially null) Object whose notifyAll() method will be called immediately after the Runnable.run() method returns.

Methods in java.awt.event that return Object
 Object ItemEvent.getItem()
Returns the item affected by the event.

Methods in java.awt.event with parameters of type Object
 void KeyEvent.setSource(Object newSource)
Set the source of this KeyEvent.

Constructors in java.awt.event with parameters of type Object
ActionEvent(Object source, int id, String command)
Constructs an ActionEvent object.
ActionEvent(Object source, int id, String command, int modifiers)
Constructs an ActionEvent object with modifier keys.
TextEvent(Object source, int id)
Constructs a TextEvent object.
ItemEvent(ItemSelectable source, int id, Object item, int stateChange)
Constructs an ItemEvent object.
InvocationEvent(Object source, Runnable runnable)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationEvent(Object source, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationEvent(Object source, int id, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source and ID which will execute the runnable's run() method when dispatched.

Uses of Object in java.awt.font

Subclasses of Object in java.awt.font
class | FontRenderContext The FontRenderContext class is a container for the information needed to correctly measure text.
class | GlyphJustificationInfo The GlyphJustificationInfo class represents information about the justification properties of a glyph.
class | GlyphMetrics The GlyphMetrics class represents infomation for a single glyph.
class | GlyphVector A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
class | GraphicAttribute This class is used with the CHAR_REPLACEMENT attribute.
class | ImageGraphicAttribute The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout.
class | LineBreakMeasurer The LineBreakMeasurer class allows styled text to be broken into lines (or segments) that fit within a particular visual advance.
class | LineMetrics The LineMetrics class allows access to the metrics needed to layout characters along a line and to layout of a set of lines.
class | ShapeGraphicAttribute The ShapeGraphicAttribute class is an implementation of GraphicAttribute that draws shapes in a TextLayout.
class | TextAttribute The TextAttribute class defines attribute keys and attribute values used for text rendering.
class | TextHitInfo The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.
class | TextLayout TextLayout is an immutable graphical representation of styled character data.
static class | TextLayout.CaretPolicy Defines a policy for determining the strong caret location.
class | TextMeasurer TextMeasurer provides the primitive operations needed for line break: measuring up to a given advance, determining the advance of a range of characters, and generating a TextLayout for a range of characters.
class | TransformAttribute The TransformAttribute class provides an immutable wrapper for a transform so that it is safe to use as an attribute.

Methods in java.awt.font that return Object
protected Object | TextLayout.clone() Creates a copy of this TextLayout.
protected Object | TextAttribute.readResolve() Resolves instances being deserialized to the predefined constants.

Methods in java.awt.font with parameters of type Object
boolean | TextLayout.equals(Object obj) Returns true if the specified Object is a TextLayout object and if the specified Object equals this TextLayout.
boolean | ImageGraphicAttribute.equals(Object rhs) Compares this ImageGraphicAttribute to the specified Object.
boolean | TextHitInfo.equals(Object obj) Returns true if the specified Object is a TextHitInfo and equals this TextHitInfo.
boolean | ShapeGraphicAttribute.equals(Object rhs) Compares this ShapeGraphicAttribute to the specified Object.

Uses of Object in java.awt.geom

Subclasses of Object in java.awt.geom
class | AffineTransform The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
class | Arc2D Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,
class | Area The Area class is a device-independent specification of an arbitrarily-shaped area.
class | CubicCurve2D The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
static class | CubicCurve2D.Double A cubic parametric curve segment specified with double coordinates.
static class | CubicCurve2D.Float A cubic parametric curve segment specified with float coordinates.
class | Dimension2D The Dimension2D class is to encapsulate a width and a height dimension.
class | Ellipse2D The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.
class | FlatteningPathIterator The FlatteningPathIterator class returns a flattened view of another PathIterator object.
class | GeneralPath The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves.
class | IllegalPathStateException The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
class | Line2D This Line2D class represents a line segment in (x, y) coordinate space.
static class | Line2D.Double A line segment specified with double coordinates.
static class | Line2D.Float A line segment specified with float coordinates.
class | NoninvertibleTransformException The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.
class | Point2D The Point2D class defines a point representing a location in (x, y) coordinate space.
static class | Point2D.Double The Double class defines a point specified in double precision.
static class | Point2D.Float The Float class defines a point specified in float precision.
class | QuadCurve2D The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
static class | QuadCurve2D.Double A quadratic parametric curve segment specified with double coordinates.
static class | QuadCurve2D.Float A quadratic parametric curve segment specified with float coordinates.
class | Rectangle2D The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.
class | RectangularShape RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
class | RoundRectangle2D The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.

Methods in java.awt.geom that return Object
Object | Point2D.clone() Creates a new object of the same class and with the same contents as this object.
Object | Dimension2D.clone() Creates a new object of the same class as this object.
Object | RectangularShape.clone() Creates a new object of the same class and with the same contents as this object.
Object | Area.clone() Returns an exact copy of this Area object.
Object | Line2D.clone() Creates a new object of the same class as this object.
Object | GeneralPath.clone() Creates a new object of the same class as this object.
Object | QuadCurve2D.clone() Creates a new object of the same class and with the same contents as this object.
Object | AffineTransform.clone() Returns a copy of this AffineTransform object.
Object | CubicCurve2D.clone() Creates a new object of the same class as this object.

Methods in java.awt.geom with parameters of type Object
boolean | Point2D.equals(Object obj) Determines whether or not two points are equal.
boolean | Rectangle2D.equals(Object obj) Determines whether or not the specified Object is equal to this Rectangle2D.
boolean | AffineTransform.equals(Object obj) Returns true if this AffineTransform represents the same affine coordinate transform as the specified argument.

Uses of Object in java.awt.im

Subclasses of Object in java.awt.im
class | InputContext An InputContext object manages the communication between text editing components and input methods.
class | InputMethodHighlight An InputMethodHighlight is used to describe the highlight attributes of text being composed.
class | InputSubset Defines additional Unicode subsets for use by input methods.

Methods in java.awt.im that return Object
 Object InputContext.getInputMethodControlObject()
Returns a control object from the current input method, or null.

Uses of Object in java.awt.im.spi

Methods in java.awt.im.spi that return Object
 Object InputMethod.getControlObject()
Returns a control object from this input method, or null.

Uses of Object in java.awt.image

Subclasses of Object in java.awt.image
class | AffineTransformOp This class uses an affine transform to perform a linear mapping from 2D coordinates in the source image or Raster to 2D coordinates in the destination image or Raster.
class | AreaAveragingScaleFilter An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
class | BandCombineOp This class performs an arbitrary linear combination of the bands in a Raster, using a specified matrix.
class | BandedSampleModel This class represents image data which is stored in a band interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
class | BufferedImage The BufferedImage subclass describes an Image with an accessible buffer of image data.
class | BufferedImageFilter The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
class | ByteLookupTable This class defines a lookup table object.
class | ColorConvertOp This class performs a pixel-by-pixel color conversion of the data in the source image.
class | ColorModel The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component.
class | ComponentColorModel A ColorModel class that works with pixel values that represent color and alpha information as separate samples and that store each sample in a separate data element.
class | ComponentSampleModel This class represents image data which is stored such that each sample of a pixel occupies one data element of the DataBuffer.
class | ConvolveOp This class implements a convolution from the source to the destination.
class | CropImageFilter An ImageFilter class for cropping images.
class | DataBuffer This class exists to wrap one or more data arrays.
class | DataBufferByte This class extends DataBuffer and stores data internally as bytes.
class | DataBufferInt This class extends DataBuffer and stores data internally as integers.
class | DataBufferShort This class extends DataBuffer and stores data internally as shorts.
class | DataBufferUShort This class extends DataBuffer and stores data internally as shorts.
class | DirectColorModel The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
class | FilteredImageSource This class is an implementation of the ImageProducer interface which takes an existing image and a filter object and uses them to produce image data for a new filtered version of the original image.
class | ImageFilter This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
class | ImagingOpException The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
class | IndexColorModel The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample which is an index into a fixed colormap in the default sRGB ColorSpace.
class | Kernel The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation.
class | LookupOp This class implements a lookup operation from the source to the destination.
class | LookupTable This abstract class defines a lookup table object.
class | MemoryImageSource This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image.
class | MultiPixelPackedSampleModel The MultiPixelPackedSampleModel class represents one-banded images and can pack multiple one-sample pixels into one data element.
class | PackedColorModel The PackedColorModel class is an abstract ColorModel class that works with pixel values which represent color and alpha information as separate samples and which pack all samples for a single pixel into a single int, short, or byte quantity.
class | PixelGrabber The PixelGrabber class implements an ImageConsumer which can be attached to an Image or ImageProducer object to retrieve a subset of the pixels in that image.
class | PixelInterleavedSampleModel This class represents image data which is stored in a pixel interleaved fashion and for which each sample of a pixel occupies one data element of the DataBuffer.
class | Raster A class representing a rectangular array of pixels.
class | RasterFormatException The RasterFormatException is thrown if there is invalid layout information in the Raster.
class | ReplicateScaleFilter An ImageFilter class for scaling images using the simplest algorithm.
class | RescaleOp This class performs a pixel-by-pixel rescaling of the data in the source image by multiplying the sample values for each pixel by a scale factor and then adding an offset.
class | RGBImageFilter This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.
class | SampleModel This abstract class defines an interface for extracting samples of pixels in an image.
class | ShortLookupTable This class defines a lookup table object.
class | SinglePixelPackedSampleModel This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel.
class | WritableRaster This class extends Raster to provide pixel writing capabilities.

Fields in java.awt.image declared as Object
protected  Object ReplicateScaleFilter.outpixbuf
A byte array initialized with a size of ReplicateScaleFilter.destWidth and used to deliver a row of pixel data to the ImageConsumer.

Methods in java.awt.image that return Object
abstract Object | SampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | SampleModel.getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
Object | ComponentSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | ImageFilter.clone() Clones this object.
Object | Kernel.clone() Clones this object.
Object | BandedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | PixelGrabber.getPixels() Get the pixel buffer.
Object | RenderedImage.getProperty(String name) Gets a property from the property set of this image.
Object | BufferedImage.getProperty(String name, ImageObserver observer) Returns a property of the image by name.
Object | BufferedImage.getProperty(String name) Returns a property of the image by name.
Object | Raster.getDataElements(int x, int y, Object outData) Returns data for a single pixel in a primitive array of type TransferType.
Object | Raster.getDataElements(int x, int y, int w, int h, Object outData) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
Object | ColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
Object | ColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | ComponentColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
Object | ComponentColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | MultiPixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | DirectColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
Object | DirectColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | SinglePixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | IndexColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
Object | IndexColorModel.getDataElements(int[] components, int offset, Object pixel) Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components.

Methods in java.awt.image with parameters of type Object
abstract Object | SampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
Object | SampleModel.getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
abstract void | SampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
void | SampleModel.setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType.
Object | ComponentSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
void | ComponentSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
Object | BandedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
void | BandedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
Object | Raster.getDataElements(int x, int y, Object outData) Returns data for a single pixel in a primitive array of type TransferType.
Object | Raster.getDataElements(int x, int y, int w, int h, Object outData) Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.
int | ColorModel.getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ColorModel.getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ColorModel.getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ColorModel.getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | ColorModel.getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
Object | ColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int[] | ColorModel.getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
Object | ColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
boolean | ColorModel.equals(Object obj) Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.
boolean | PackedColorModel.equals(Object obj) Tests if the specified Object is an instance of PackedColorModel and equals this PackedColorModel.
void | WritableRaster.setDataElements(int x, int y, Object inData) Sets the data for a single pixel from a primitive array of type TransferType.
void | WritableRaster.setDataElements(int x, int y, int w, int h, Object inData) Sets the data for a rectangle of pixels from a primitive array of type TransferType.
int | ComponentColorModel.getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ComponentColorModel.getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ComponentColorModel.getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | ComponentColorModel.getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | ComponentColorModel.getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
Object | ComponentColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int[] | ComponentColorModel.getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
Object | ComponentColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
boolean | ComponentColorModel.equals(Object obj) Compares this color model with another for equality.
Object | MultiPixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
void | MultiPixelPackedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
int | DirectColorModel.getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | DirectColorModel.getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | DirectColorModel.getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
int | DirectColorModel.getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255.
int | DirectColorModel.getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format.
Object | DirectColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int[] | DirectColorModel.getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
Object | DirectColorModel.getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
Object | SinglePixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data) Returns data for a single pixel in a primitive array of type TransferType.
void | SinglePixelPackedSampleModel.setDataElements(int x, int y, Object obj, DataBuffer data) Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType.
Object | IndexColorModel.getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
int[] | IndexColorModel.getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
Object | IndexColorModel.getDataElements(int[] components, int offset, Object pixel) Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components.

Uses of Object in java.awt.image.renderable

Subclasses of Object in java.awt.image.renderable
class | ParameterBlock A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.
class | RenderableImageOp This class handles the renderable aspects of an operation with help from its associated instance of a ContextualRenderedImageFactory.
class | RenderableImageProducer An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage.
class | RenderContext A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage.

Methods in java.awt.image.renderable that return Object
Object | ContextualRenderedImageFactory.getProperty(ParameterBlock paramBlock, String name) Gets the appropriate instance of the property specified by the name parameter.
Object | RenderContext.clone() Makes a copy of a RenderContext.
Object | RenderableImageOp.getProperty(String name) Gets a property from the property set of this image.
Object | RenderableImage.getProperty(String name) Gets a property from the property set of this image.
Object | ParameterBlock.shallowClone() Creates a shallow copy of a ParameterBlock.
Object | ParameterBlock.clone() Creates a copy of a ParameterBlock.
Object | ParameterBlock.getSource(int index) Returns a source as a general Object.
Object | ParameterBlock.getObjectParameter(int index) Gets a parameter as an object.

Methods in java.awt.image.renderable with parameters of type Object
ParameterBlock | ParameterBlock.addSource(Object source) Adds an image to end of the list of sources.
ParameterBlock | ParameterBlock.setSource(Object source, int index) Replaces an entry in the list of source with a new source.
ParameterBlock | ParameterBlock.add(Object obj) Adds an object to the list of parameters.
ParameterBlock | ParameterBlock.set(Object obj, int index) Replaces an Object in the list of parameters.

Uses of Object in java.awt.print

Subclasses of Object in java.awt.print
class | Book The Book class provides a representation of a document in which pages may have different page formats and page painters.
class | PageFormat The PageFormat class describes the size and orientation of a page to be printed.
class | Paper The Paper class describes the physical characteristics of a piece of paper.
class | PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
class | PrinterException The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
class | PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.
class | PrinterJob The PrinterJob class is the principal class that controls printing.

Methods in java.awt.print that return Object
Object | Paper.clone() Creates a copy of this Paper with the same contents as this Paper.
Object | PageFormat.clone() Makes a copy of this PageFormat with the same contents as this PageFormat.

Uses of Object in java.beans

Subclasses of Object in java.beans
class | BeanDescriptor A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.
class | Beans This class provides some general purpose beans control methods.
class | EventSetDescriptor An EventSetDescriptor describes a group of events that a given Java bean fires.
class | FeatureDescriptor The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.
class | IndexedPropertyDescriptor An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array.
class | IntrospectionException Thrown when an exception happens during Introspection.
class | Introspector The Introspector class provides a standard way for tools to learn about the properties, events, and methods supported by a target Java Bean.
class | MethodDescriptor A MethodDescriptor describes a particular method that a Java Bean supports for external access from other components.
class | ParameterDescriptor The ParameterDescriptor class allows bean implementors to provide additional information on each of their parameters, beyond the low level type information provided by the java.lang.reflect.Method class.
class | PropertyChangeEvent A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.
class | PropertyChangeSupport This is a utility class that can be used by beans that support bound properties.
class | PropertyDescriptor A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.
class | PropertyEditorManager The PropertyEditorManager can be used to locate a property editor for any given type name.
class | PropertyEditorSupport This is a support class to help build property editors.
class | PropertyVetoException A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.
class | SimpleBeanInfo This is a support class to make it easier for people to provide BeanInfo classes.
class | VetoableChangeSupport This is a utility class that can be used by beans that support constrained properties.

Methods in java.beans that return Object
Object | FeatureDescriptor.getValue(String attributeName) Retrieve a named attribute with this feature.
Object | PropertyEditor.getValue() Gets the property value.
static Object | Beans.instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.
static Object | Beans.getInstanceOf(Object bean, Class targetType) From a given bean, obtain an object representing a specified type view of that source object.
Object | PropertyEditorSupport.getValue() Gets the value of the property.
Object | PropertyChangeEvent.getNewValue() Sets the new value for the property, expressed as an Object.
Object | PropertyChangeEvent.getOldValue() Gets the old value for the property, expressed as an Object.
Object | PropertyChangeEvent.getPropagationId() The "propagationId" field is reserved for future use.

Methods in java.beans with parameters of type Object
void | FeatureDescriptor.setValue(String attributeName, Object value) Associate a named attribute with this feature.
void | PropertyEditor.setValue(Object value) Set (or change) the object that is to be edited.
void | PropertyChangeSupport.firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
static Object | Beans.getInstanceOf(Object bean, Class targetType) From a given bean, obtain an object representing a specified type view of that source object.
static boolean | Beans.isInstanceOf(Object bean, Class targetType) Check if a bean can be viewed as a given target type.
void | Customizer.setObject(Object bean) Set the object to be customized.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
void | PropertyEditorSupport.setValue(Object value) Set (or change) the object that is to be edited.
void | PropertyChangeEvent.setPropagationId(Object propagationId) Sets the propagationId object for the event.

Constructors in java.beans with parameters of type Object
PropertyChangeSupport(Object sourceBean)
Constructs a PropertyChangeSupport object.
VetoableChangeSupport(Object sourceBean)
Constructs a VetoableChangeSupport object.
PropertyEditorSupport(Object source)
Constructor for use when a PropertyEditor is delegating to us.
PropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue)
Constructs a new PropertyChangeEvent.

Uses of Object in java.beans.beancontext

Subclasses of Object in java.beans.beancontext
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextEvent BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
class | BeanContextMembershipEvent A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
class | BeanContextServiceAvailableEvent This event type is used by the BeanContextServicesListener in order to identify the service being registered.
class | BeanContextServiceRevokedEvent This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
protected class | BeanContextServicesSupport.BCSSChild
protected class | BeanContextServicesSupport.BCSSProxyServiceProvider
protected static class | BeanContextServicesSupport.BCSSServiceProvider subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
protected class | BeanContextSupport.BCSChild
protected static class | BeanContextSupport.BCSIterator protected final subclass that encapsulates an iterator but implements a noop remove() method.

Fields in java.beans.beancontext declared as Object
static Object BeanContext.globalHierarchyLock
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.

Methods in java.beans.beancontext that return Object
Object[] | BeanContextMembershipEvent.toArray() Gets the array of children affected by this event.
Object | BeanContextSupport.instantiateChild(String beanName) The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
Object[] | BeanContextSupport.toArray() Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
Object[] | BeanContextSupport.toArray(Object[] arry) Gets an array containing all children of this BeanContext that match the types contained in arry.
protected Object[] | BeanContextSupport.copyChildren() Gets a copy of the this BeanContext's children.
Object | BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) obtain a service which may be delegated
Object | BeanContextServicesSupport.BCSSProxyServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
Object | BeanContext.instantiateChild(String beanName) Instantiate the javaBean named as a child of this BeanContext.
Object | BeanContextServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
Object | BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
Object | BeanContextSupport.BCSIterator.next()

Methods in java.beans.beancontext with parameters of type Object
 boolean BeanContextMembershipEvent.contains(Object child)
Is the child specified affected by the event?
 void BeanContextChildSupport.firePropertyChange(String name, Object oldValue, Object newValue)
Report a bound property update to any registered listeners.
 void BeanContextChildSupport.fireVetoableChange(String name, Object oldValue, Object newValue)
Report a vetoable property update to any registered listeners.
 boolean BeanContextSupport.contains(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
 boolean BeanContextSupport.containsKey(Object o)
Determines whether or not the specified object is currently a child of this BeanContext.
 Object[] BeanContextSupport.toArray(Object[] arry)
Gets an array containing all children of this BeanContext that match the types contained in arry.
protected  BeanContextSupport.BCSChild BeanContextSupport.createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
 boolean BeanContextSupport.add(Object targetChild)
Adds/nests a child within this BeanContext.
 boolean BeanContextSupport.remove(Object targetChild)
Removes a child from this BeanContext.
protected  boolean BeanContextSupport.remove(Object targetChild, boolean callChildSetBC)
internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
protected  void BeanContextSupport.childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
Called by readObject with the newly deserialized child and BCSChild.
protected  boolean BeanContextSupport.validatePendingAdd(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.
protected  boolean BeanContextSupport.validatePendingRemove(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.
protected  void BeanContextSupport.childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
protected  void BeanContextSupport.childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
protected static Visibility BeanContextSupport.getChildVisibility(Object child)
Gets the Component (if any) associated with the specified child.
protected static Serializable BeanContextSupport.getChildSerializable(Object child)
Gets the Serializable (if any) associated with the specified Child
protected static PropertyChangeListener BeanContextSupport.getChildPropertyChangeListener(Object child)
Gets the PropertyChangeListener (if any) of the specified child
protected static VetoableChangeListener BeanContextSupport.getChildVetoableChangeListener(Object child)
Gets the VetoableChangeListener (if any) of the specified child
protected static BeanContextMembershipListener BeanContextSupport.getChildBeanContextMembershipListener(Object child)
Gets the BeanContextMembershipListener (if any) of the specified child
protected static BeanContextChild BeanContextSupport.getChildBeanContextChild(Object child)
Gets the BeanContextChild (if any) of the specified child
protected  BeanContextSupport.BCSChild BeanContextServicesSupport.createBCSChild(Object targetChild, Object peer)
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
 Object BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
obtain a service which may be delegated
 void BeanContextServicesSupport.releaseService(BeanContextChild child, Object requestor, Object service)
release a service
protected static BeanContextServicesListener BeanContextServicesSupport.getChildBeanContextServicesListener(Object child)
Gets the BeanContextServicesListener (if any) of the specified child.
protected  void BeanContextServicesSupport.childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
called from superclass child removal operations after a child has been successfully removed.
 Object BeanContextServicesSupport.BCSSProxyServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
 void BeanContextServicesSupport.BCSSProxyServiceProvider.releaseService(BeanContextServices bcs, Object requestor, Object service)
 Object BeanContextServiceProvider.getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
Invoked by BeanContextServices, this method requests an instance of a service from this BeanContextServiceProvider.
 void BeanContextServiceProvider.releaseService(BeanContextServices bcs, Object requestor, Object service)
Invoked by BeanContextServices, this method releases a nested BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service.
 Object BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.
 void BeanContextServices.releaseService(BeanContextChild child, Object requestor, Object service)
Releases a BeanContextChild's (or any arbitrary object associated with a BeanContextChild) reference to the specified service by calling releaseService() on the underlying BeanContextServiceProvider.

Constructors in java.beans.beancontext with parameters of type Object
BeanContextMembershipEvent(BeanContext bc, Object[] changes)
Contruct a BeanContextMembershipEvent

Uses of Object in java.io

Subclasses of Object in java.io
class | BufferedInputStream A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
class | BufferedOutputStream The class implements a buffered output stream.
class | BufferedReader Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
class | BufferedWriter Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
class | ByteArrayInputStream A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
class | ByteArrayOutputStream This class implements an output stream in which the data is written into a byte array.
class | CharArrayReader This class implements a character buffer that can be used as a character-input stream.
class | CharArrayWriter This class implements a character buffer that can be used as an Writer.
class | CharConversionException Base class for character conversion exceptions.
class | DataInputStream A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
class | DataOutputStream A data input stream lets an application write primitive Java data types to an output stream in a portable way.
class | EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
class | File An abstract representation of file and directory pathnames.
class | FileDescriptor Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
class | FileInputStream A FileInputStream obtains input bytes from a file in a file system.
class | FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
class | FileOutputStream A file output stream is an output stream for writing data to a File or to a FileDescriptor.
class | FilePermission This class represents access to a file or directory.
class | FileReader Convenience class for reading character files.
class | FileWriter Convenience class for writing character files.
class | FilterInputStream A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
class | FilterOutputStream This class is the superclass of all classes that filter output streams.
class | FilterReader Abstract class for reading filtered character streams.
class | FilterWriter Abstract class for writing filtered character streams.
class | InputStream This abstract class is the superclass of all classes representing an input stream of bytes.
class | InputStreamReader An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters according to a specified character encoding.
class | InterruptedIOException Signals that an I/O operation has been interrupted.
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | IOException Signals that an I/O exception of some sort has occurred.
class | LineNumberInputStream Deprecated. This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.
class | LineNumberReader A buffered character-input stream that keeps track of line numbers.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | ObjectInputStream An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
static class | ObjectInputStream.GetField Provide access to the persistent fields read from the input stream.
class | ObjectOutputStream An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
static class | ObjectOutputStream.PutField Provide programatic access to the persistent fields to be written to ObjectOutput.
class | ObjectStreamClass Serialization's descriptor for classes.
class | ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
class | ObjectStreamField A description of a Serializable field from a Serializable class.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | OutputStream This abstract class is the superclass of all classes representing an output stream of bytes.
class | OutputStreamWriter An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes according to a specified character encoding.
class | PipedInputStream A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
class | PipedOutputStream A piped output stream can be connected to a piped input stream to create a communications pipe.
class | PipedReader Piped character-input streams.
class | PipedWriter Piped character-output streams.
class | PrintStream A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
class | PrintWriter Print formatted representations of objects to a text-output stream.
class | PushbackInputStream A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
class | PushbackReader A character-stream reader that allows characters to be pushed back into the stream.
class | RandomAccessFile Instances of this class support both reading and writing to a random access file.
class | Reader Abstract class for reading character streams.
class | SequenceInputStream A SequenceInputStream represents the logical concatenation of other input streams.
class | SerializablePermission This class is for Serializable permissions.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | StreamTokenizer The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
class | StringBufferInputStream Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
class | StringReader A character stream whose source is a string.
class | StringWriter A character stream that collects its output in a string buffer, which can then be used to construct a string.
class | SyncFailedException Signals that a sync operation has failed.
class | UnsupportedEncodingException The Character Encoding is not supported.
class | UTFDataFormatException Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.
class | Writer Abstract class for writing to character streams.

Fields in java.io declared as Object
protected Object | Reader.lock The object used to synchronize operations on this stream.
protected Object | Writer.lock The object used to synchronize operations on this stream.

Methods in java.io that return Object
Object | ObjectInput.readObject() Read and return an object.
Object | ObjectInputStream.readObject() Read an object from the ObjectInputStream.
protected Object | ObjectInputStream.readObjectOverride() This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.
protected Object | ObjectInputStream.resolveObject(Object obj) This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
abstract Object | ObjectInputStream.GetField.get(String name, Object defvalue) Get the value of the named Object field from the persistent field.
protected Object | ObjectOutputStream.replaceObject(Object obj) This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization.

Methods in java.io with parameters of type Object
void | PrintStream.print(Object obj) Print an object.
void | PrintStream.println(Object x) Print an Object and then terminate the line.
boolean | FilePermission.equals(Object obj) Checks two FilePermission objects for equality.
protected Object | ObjectInputStream.resolveObject(Object obj) This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
abstract Object | ObjectInputStream.GetField.get(String name, Object defvalue) Get the value of the named Object field from the persistent field.
void | ObjectOutput.writeObject(Object obj) Write an object to the underlying storage or stream.
int | File.compareTo(Object o) Compares this abstract pathname to another object.
boolean | File.equals(Object obj) Tests this abstract pathname for equality with the given object.
void | PrintWriter.print(Object obj) Print an object.
void | PrintWriter.println(Object x) Print an Object and then terminate the line.
protected void | ObjectOutputStream.writeObjectOverride(Object obj) Method used by subclasses to override the default writeObject method.
void | ObjectOutputStream.writeObject(Object obj) Write the specified object to the ObjectOutputStream.
protected Object | ObjectOutputStream.replaceObject(Object obj) This method will allow trusted subclasses of ObjectOutputStream to substitute one object for another during serialization.
abstract void | ObjectOutputStream.PutField.put(String name, Object value) Put the value of the named Object field into the persistent field.
int | ObjectStreamField.compareTo(Object o) Compare this field with another ObjectStreamField.

Constructors in java.io with parameters of type Object
Reader(Object lock)
Create a new character-stream reader whose critical sections will synchronize on the given object.
Writer(Object lock)
Create a new character-stream writer whose critical sections will synchronize on the given object.

Uses of Object in java.lang

Subclasses of Object in java.lang
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | ArithmeticException Thrown when an exceptional arithmetic condition has occurred.
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | ArrayStoreException Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
class | Boolean The Boolean class wraps a value of the primitive type boolean in an object.
class | Byte The Byte class is the standard wrapper for byte values.
class | Character The Character class wraps a value of the primitive type char in an object.
static class | Character.Subset Instances of this class represent particular subsets of the Unicode character set.
static class | Character.UnicodeBlock A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.
class | Class Instances of the class Class represent classes and interfaces in a running Java application.
class | ClassCastException Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
class | ClassCircularityError Thrown when a circularity has been detected while initializing a class.
class | ClassFormatError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
class | ClassLoader The class ClassLoader is an abstract class.
class | ClassNotFoundException Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
class | CloneNotSupportedException Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
class | Compiler The Compiler class is provided to support Java-to-native-code compilers and related services.
class | Double The Double class wraps a value of the primitive type double in an object.
class | Error An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
class | Exception The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
class | ExceptionInInitializerError Signals that an unexpected exception has occurred in a static initializer.
class | Float The Float class wraps a value of primitive type float in an object.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | IllegalAccessException Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
class | IllegalArgumentException Thrown to indicate that a method has been passed an illegal or inappropriate argument.
class | IllegalMonitorStateException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
class | IllegalStateException Signals that a method has been invoked at an illegal or inappropriate time.
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | IncompatibleClassChangeError Thrown when an incompatible class change has occurred to some class definition.
class | IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
class | InheritableThreadLocal This class extends ThreadLocal to provide inheritance of values from parent Thread to child Thread: when a child thread is created, the child receives initial values for all InheritableThreadLocals for which the parent has values.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | InstantiationException Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
class | Integer The Integer class wraps a value of the primitive type int in an object.
class | InternalError Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
class | InterruptedException Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
class | LinkageError Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
class | Long The Long class wraps a value of the primitive type long in an object.
class | Math The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
class | NegativeArraySizeException Thrown if an application tries to create an array with negative size.
class | NoClassDefFoundError Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchFieldException Signals that the class doesn't have a field of a specified name.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
class | NoSuchMethodException Thrown when a particular method cannot be found.
class | NullPointerException Thrown when an application attempts to use null in a case where an object is required.
class | Number The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
class | OutOfMemoryError Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
class | Package Package objects contain version information about the implementation and specification of a Java package.
class | Process The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
class | Runtime Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
class | RuntimeException RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
class | RuntimePermission This class is for runtime permissions.
class | SecurityException Thrown by the security manager to indicate a security violation.
class | SecurityManager The security manager is a class that allows applications to implement a security policy.
class | Short The Short class is the standard wrapper for short values.
class | StackOverflowError Thrown when a stack overflow occurs because an application recurses too deeply.
class | StrictMath The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
class | String The String class represents character strings.
class | StringBuffer A string buffer implements a mutable sequence of characters.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
class | System The System class contains several useful class fields and methods.
class | Thread A thread is a thread of execution in a program.
class | ThreadDeath An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
class | ThreadGroup A thread group represents a set of threads.
class | ThreadLocal This class provides ThreadLocal variables.
class | Throwable The Throwable class is the superclass of all errors and exceptions in the Java language.
class | UnknownError Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
class | UnsatisfiedLinkError Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
class | UnsupportedClassVersionError Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
class | UnsupportedOperationException Thrown to indicate that the requested operation is not supported.
class | VerifyError Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
class | VirtualMachineError Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
class | Void The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.

Methods in java.lang that return Object
protected Object | Object.clone() Creates and returns a copy of this object.
static Object | Compiler.command(Object any) Examines the argument type and its fields and perform some documented operation.
Object | SecurityManager.getSecurityContext() Creates an object that encapsulates the current execution environment.
protected Object | ThreadLocal.initialValue() Returns the calling thread's initial value for this ThreadLocal variable.
Object | ThreadLocal.get() Returns the value in the calling thread's copy of this ThreadLocal variable.
Object | InheritableThreadLocal.get() Returns the value in the calling thread's copy of this ThreadLocal variable.
protected Object | InheritableThreadLocal.childValue(Object parentValue) Computes the child's initial value for this InheritableThreadLocal as a function of the parent's value at the time the child Thread is created.
Object | Class.newInstance() Creates a new instance of the class represented by this Class object.
Object[] | Class.getSigners() Gets the signers of this class.

Methods in java.lang with parameters of type Object
 boolean Object.equals(Object obj)
Indicates whether some other object is "equal to" this one.
 boolean Character.equals(Object obj)
Compares this object against the specified object.
 int Character.compareTo(Object o)
Compares this Character to another Object.
 boolean Character.Subset.equals(Object obj)
Compares two Subset objects for equality.
 boolean Long.equals(Object obj)
Compares this object against the specified object.
 int Long.compareTo(Object o)
Compares this Long to another Object.
static void System.arraycopy(Object src, int src_position, Object dst, int dst_position, int length)
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
static int System.identityHashCode(Object x)
Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().
 int Comparable.compareTo(Object o)
Compares this object with the specified object for order.
static Object Compiler.command(Object any)
Examines the argument type and its fields and perform some documented operation.
 boolean Short.equals(Object obj)
Compares this object to the specified object.
 int Short.compareTo(Object o)
Compares this Short to another Object.
 boolean String.equals(Object anObject)
Compares this string to the specified object.
 int String.compareTo(Object o)
Compares this String to another Object.
static String String.valueOf(Object obj)
Returns the string representation of the Object argument.
 boolean Float.equals(Object obj)
Compares this object against some other object.
 int Float.compareTo(Object o)
Compares this Float to another Object.
 void SecurityManager.checkPermission(Permission perm, Object context)
Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission.
 void SecurityManager.checkRead(String file, Object context)
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
 void SecurityManager.checkConnect(String host, int port, Object context)
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
 boolean SecurityManager.checkTopLevelWindow(Object window)
Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.
 boolean Integer.equals(Object obj)
Compares this object to the specified object.
 int Integer.compareTo(Object o)
Compares this Integer to another Object.
 void ThreadLocal.set(Object value)
Sets the calling thread's instance of this ThreadLocal variable to the given value.
 void InheritableThreadLocal.set(Object value)
Sets the calling thread's instance of this ThreadLocal variable to the given value.
protected  Object InheritableThreadLocal.childValue(Object parentValue)
Computes the child's initial value for this InheritableThreadLocal as a function of the parent's value at the time the child Thread is created.
 StringBuffer StringBuffer.append(Object obj)
Appends the string representation of the Object argument to this string buffer.
 StringBuffer StringBuffer.insert(int offset, Object obj)
Inserts the string representation of the Object argument into this string buffer.
 boolean Byte.equals(Object obj)
Compares this object to the specified object.
 int Byte.compareTo(Object o)
Compares this Byte to another Object.
protected  void ClassLoader.setSigners(Class c, Object[] signers)
Sets the signers of a class.
 boolean Class.isInstance(Object obj)
Determines if the specified Object is assignment-compatible with the object represented by this Class.
 boolean Double.equals(Object obj)
Compares this object against the specified object.
 int Double.compareTo(Object o)
Compares this Double to another Object.
 boolean Boolean.equals(Object obj)
Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.

Uses of Object in java.lang.ref

Subclasses of Object in java.lang.ref
class | PhantomReference Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
class | Reference Abstract base class for reference objects.
class | ReferenceQueue Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
class | SoftReference Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
class | WeakReference Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Methods in java.lang.ref that return Object
Object | Reference.get() Returns this reference object's referent.
Object | PhantomReference.get() Returns this reference object's referent.
Object | SoftReference.get() Returns this reference object's referent.

Constructors in java.lang.ref with parameters of type Object
PhantomReference(Object referent, ReferenceQueue q)
Creates a new phantom reference that refers to the given object and is registered with the given queue.
WeakReference(Object referent)
Creates a new weak reference that refers to the given object.
WeakReference(Object referent, ReferenceQueue q)
Creates a new weak reference that refers to the given object and is registered with the given queue.
SoftReference(Object referent)
Creates a new soft reference that refers to the given object.
SoftReference(Object referent, ReferenceQueue q)
Creates a new soft reference that refers to the given object and is registered with the given queue.

Uses of Object in java.lang.reflect

Subclasses of Object in java.lang.reflect
class | AccessibleObject The AccessibleObject class is the base class for Field, Method and Constructor objects.
class | Array The Array class provides static methods to dynamically create and access Java arrays.
class | Constructor Constructor provides information about, and access to, a single constructor for a class.
class | Field A Field provides information about, and dynamic access to, a single field of a class or an interface.
class | InvocationTargetException InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
class | Method A Method provides information about, and access to, a single method on a class or interface.
class | Modifier The Modifier class provides static methods and constants to decode class and member access modifiers.
class | Proxy Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
class | ReflectPermission The Permission class for reflective operations.
class | UndeclaredThrowableException Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Methods in java.lang.reflect that return Object
Object | Method.invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
static Object | Array.newInstance(Class componentType, int length) Creates a new array with the specified component type and length.
static Object | Array.newInstance(Class componentType, int[] dimensions) Creates a new array with the specified component type and dimensions.
static Object | Array.get(Object array, int index) Returns the value of the indexed component in the specified array object.
Object | Field.get(Object obj) Returns the value of the field represented by this Field, on the specified object.
static Object | Proxy.newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
Object | InvocationHandler.invoke(Object proxy, Method method, Object[] args) Processes a method invocation on a proxy instance and returns the result.
Object | Constructor.newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Methods in java.lang.reflect with parameters of type Object
boolean | Method.equals(Object obj) Compares this Method against the specified object.
Object | Method.invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
static int | Array.getLength(Object array) Returns the length of the specified array object, as an int.
static Object | Array.get(Object array, int index) Returns the value of the indexed component in the specified array object.
static boolean | Array.getBoolean(Object array, int index) Returns the value of the indexed component in the specified array object, as a boolean.
static byte | Array.getByte(Object array, int index) Returns the value of the indexed component in the specified array object, as a byte.
static char | Array.getChar(Object array, int index) Returns the value of the indexed component in the specified array object, as a char.
static short | Array.getShort(Object array, int index) Returns the value of the indexed component in the specified array object, as a short.
static int | Array.getInt(Object array, int index) Returns the value of the indexed component in the specified array object, as an int.
static long | Array.getLong(Object array, int index) Returns the value of the indexed component in the specified array object, as a long.
static float | Array.getFloat(Object array, int index) Returns the value of the indexed component in the specified array object, as a float.
static double | Array.getDouble(Object array, int index) Returns the value of the indexed component in the specified array object, as a double.
static void | Array.set(Object array, int index, Object value) Sets the value of the indexed component of the specified array object to the specified new value.
static void | Array.setBoolean(Object array, int index, boolean z) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setByte(Object array, int index, byte b) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | Array.setChar(Object array, int index, char c) Sets the value of the indexed component of the specified array object to the specified byte value.
static void | Array.setShort(Object array, int index, short s) Sets the value of the indexed component of the specified array object to the specified short value.
static void | Array.setInt(Object array, int index, int i) Sets the value of the indexed component of the specified array object to the specified int value.
static void | Array.setLong(Object array, int index, long l) Sets the value of the indexed component of the specified array object to the specified long value.
static void | Array.setFloat(Object array, int index, float f) Sets the value of the indexed component of the specified array object to the specified float value.
static void | Array.setDouble(Object array, int index, double d) Sets the value of the indexed component of the specified array object to the specified double value.
boolean | Field.equals(Object obj) Compares this Field against the specified object.
Object | Field.get(Object obj) Returns the value of the field represented by this Field, on the specified object.
boolean | Field.getBoolean(Object obj) Gets the value of a field as a boolean on the specified object.
byte | Field.getByte(Object obj) Gets the value of a field as a byte on the specified object.
char | Field.getChar(Object obj) Gets the value of a field as a char on the specified object.
short | Field.getShort(Object obj) Gets the value of a field as a short on the specified object.
int | Field.getInt(Object obj) Gets the value of a field as an int on the specified object.
long | Field.getLong(Object obj) Gets the value of a field as a long on the specified object.
float | Field.getFloat(Object obj) Gets the value of a field as a float on the specified object.
double | Field.getDouble(Object obj) Gets the value of a field as a double on the specified object.
void | Field.set(Object obj, Object value) Sets the field represented by this Field object on the specified object argument to the specified new value.
void | Field.setBoolean(Object obj, boolean z) Sets the value of a field as a boolean on the specified object.
void | Field.setByte(Object obj, byte b) Sets the value of a field as a byte on the specified object.
void | Field.setChar(Object obj, char c) Sets the value of a field as a char on the specified object.
void | Field.setShort(Object obj, short s) Sets the value of a field as a short on the specified object.
void | Field.setInt(Object obj, int i) Sets the value of a field as an int on the specified object.
void | Field.setLong(Object obj, long l) Sets the value of a field as a long on the specified object.
void | Field.setFloat(Object obj, float f) Sets the value of a field as a float on the specified object.
void | Field.setDouble(Object obj, double d) Sets the value of a field as a double on the specified object.
static InvocationHandler | Proxy.getInvocationHandler(Object proxy) Returns the invocation handler for the specified proxy instance.
Object | InvocationHandler.invoke(Object proxy, Method method, Object[] args) Processes a method invocation on a proxy instance and returns the result.
boolean | Constructor.equals(Object obj) Compares this Constructor against the specified object.
Object | Constructor.newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Uses of Object in java.math

Subclasses of Object in java.math
class | BigDecimal Immutable, arbitrary-precision signed decimal numbers.
class | BigInteger Immutable arbitrary-precision integers.

Methods in java.math with parameters of type Object
int | BigInteger.compareTo(Object o) Compares this BigInteger with the specified Object.
boolean | BigInteger.equals(Object x) Compares this BigInteger with the specified Object for equality.
int | BigDecimal.compareTo(Object o) Compares this BigDecimal with the specified Object.
boolean | BigDecimal.equals(Object x) Compares this BigDecimal with the specified Object for equality.

Uses of Object in java.net

Subclasses of Object in java.net
class | Authenticator The class Authenticator represents an object that knows how to obtain authentication for a network connection.
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | ContentHandler The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
class | DatagramPacket This class represents a datagram packet.
class | DatagramSocket This class represents a socket for sending and receiving datagram packets.
class | DatagramSocketImpl Abstract datagram and multicast socket implementation base class.
class | HttpURLConnection A URLConnection with support for HTTP-specific features.
class | InetAddress This class represents an Internet Protocol (IP) address.
class | JarURLConnection A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
class | MalformedURLException Thrown to indicate that a malformed URL has occurred.
class | MulticastSocket The multicast datagram socket class is useful for sending and receiving IP multicast packets.
class | NetPermission This class is for various network permissions.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | PasswordAuthentication The class PasswordAuthentication is a data holder that is used by Authenticator.
class | ProtocolException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | ServerSocket This class implements server sockets.
class | Socket This class implements client sockets (also called just "sockets").
class | SocketException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketImpl The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
class | SocketPermission This class represents access to a network via sockets.
class | UnknownHostException Thrown to indicate that the IP address of a host could not be determined.
class | UnknownServiceException Thrown to indicate that an unknown service exception has occurred.
class | URL Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
class | URLClassLoader This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
class | URLConnection The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
class | URLDecoder The class contains a utility method for converting from a MIME format called "x-www-form-urlencoded" to a String
class | URLEncoder The class contains a utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.
class | URLStreamHandler The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.

Methods in java.net that return Object
Object | URLConnection.getContent() Retrieves the contents of this URL connection.
Object | URLConnection.getContent(Class[] classes) Retrieves the contents of this URL connection.
Object | URL.getContent() Returns the contents of this URL.
Object | URL.getContent(Class[] classes) Returns the contents of this URL.
abstract Object | ContentHandler.getContent(URLConnection urlc) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
Object | ContentHandler.getContent(URLConnection urlc, Class[] classes) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.
Object | SocketOptions.getOption(int optID) Fetch the value of an option.

Methods in java.net with parameters of type Object
boolean | URL.equals(Object obj) Compares two URLs.
boolean | SocketPermission.equals(Object obj) Checks two SocketPermission objects for equality.
boolean | InetAddress.equals(Object obj) Compares this object against the specified object.
void | SocketOptions.setOption(int optID, Object value) Enable/disable the option specified by optID.

Uses of Object in java.rmi

Subclasses of Object in java.rmi
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | AlreadyBoundException An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | MarshalledObject A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
class | Naming The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | NotBoundException A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
class | RemoteException A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
class | RMISecurityException Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
class | RMISecurityManager RMISecurityManager provides an example security manager for use by RMI applications that use downloaded code.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Methods in java.rmi that return Object
 Object MarshalledObject.get()
Returns a new copy of the contained marshalledobject.

Methods in java.rmi with parameters of type Object
 boolean MarshalledObject.equals(Object obj)
Compares this MarshalledObject to another object.

Constructors in java.rmi with parameters of type Object
MarshalledObject(Object obj)
Creates a new MarshalledObject that contains the serialized representation of the current state of the supplied object.

Uses of Object in java.rmi.activation

Subclasses of Object in java.rmi.activation
class | Activatable The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
class | ActivateFailedException This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
class | ActivationDesc An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
class | ActivationException General exception used by the activation interfaces.
class | ActivationGroup An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
class | ActivationGroupDesc An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
static class | ActivationGroupDesc.CommandEnvironment Startup options for ActivationGroup implementations.
class | ActivationGroupID The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
class | ActivationID Activation makes use of special identifiers to denote remote objects that can be activated over time.
class | UnknownGroupException An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
class | UnknownObjectException An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Methods in java.rmi.activation with parameters of type Object
boolean | ActivationGroupDesc.equals(Object obj) Compares two activation group descriptors for content equality.
boolean | ActivationGroupDesc.CommandEnvironment.equals(Object obj) Compares two command environments for content equality.
boolean | ActivationDesc.equals(Object obj) Compares two activation descriptors for content equality.
boolean | ActivationGroupID.equals(Object obj) Compares two group identifiers for content equality.
boolean | ActivationID.equals(Object obj) Compares two activation ids for content equality.

Uses of Object in java.rmi.dgc

Subclasses of Object in java.rmi.dgc
class | Lease A lease contains a unique VM identifier and a lease duration.
class | VMID A VMID is a identifier that is unique across all Java virtual machines.

Methods in java.rmi.dgc with parameters of type Object
 boolean VMID.equals(Object obj)
Compare this VMID to another, and return true if they are the same identifier.

Uses of Object in java.rmi.registry

Subclasses of Object in java.rmi.registry
 class LocateRegistry
LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

Uses of Object in java.rmi.server

Subclasses of Object in java.rmi.server
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | LogStream Deprecated. no replacement
class | ObjID An ObjID is used to identify remote objects uniquely in a VM over time.
class | Operation Deprecated. no replacement
class | RemoteObject The RemoteObject class implements the java.lang.Object behavior for remote objects.
class | RemoteServer The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
class | RemoteStub The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
class | RMIClassLoader RMIClassLoader provides static methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class can be loaded.
class | RMISocketFactory An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
class | ServerCloneException A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
class | ServerNotActiveException An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.
class | UID Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.
class | UnicastRemoteObject The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Methods in java.rmi.server that return Object
Object | UnicastRemoteObject.clone() Returns a clone of the remote object that is distinct from the original.
Object | RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum) Invoke a method.
static Object | RMIClassLoader.getSecurityContext(ClassLoader loader) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.
Object | LoaderHandler.getSecurityContext(ClassLoader loader) Deprecated. no replacement

Methods in java.rmi.server with parameters of type Object
boolean | RemoteObject.equals(Object obj) Compares two remote objects for equality.
Object | RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum) Invoke a method.
boolean | UID.equals(Object obj) Compares two UIDs for content equality.
boolean | ObjID.equals(Object obj) Two object identifiers are considered equal if they have the same contents.
RemoteStub | ServerRef.exportObject(Remote obj, Object data) Creates a client stub object for the supplied Remote object.

Uses of Object in java.security

Subclasses of Object in java.security
class | AccessControlContext An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
class | AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
class | AccessController The AccessController class is used for three purposes: to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,
class | AlgorithmParameterGenerator The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
class | AlgorithmParameterGeneratorSpi This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
class | AlgorithmParameters This class is used as an opaque representation of cryptographic parameters.
class | AlgorithmParametersSpi This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
class | AllPermission The AllPermission is a permission that implies all other permissions.
class | BasicPermission The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
class | CodeSource This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
class | DigestException This is the generic Message Digest exception.
class | DigestInputStream A transparent stream that updates the associated message digest using the bits going through the stream.
class | DigestOutputStream A transparent stream that updates the associated message digest using the bits going through the stream.
class | GeneralSecurityException This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
class | GuardedObject A GuardedObject is an object that is used to protect access to another object.
class | Identity Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | IdentityScope Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | InvalidParameterException This exception is thrown when an invalid parameter is passed to a method.
class | KeyException This is the basic key exception.
class | KeyFactory Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
class | KeyFactorySpi This class defines the Service Provider Interface (SPI) for the KeyFactory class.
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.
class | KeyPair This class is a simple holder for a key pair (a public key and a private key).
class | KeyPairGenerator The KeyPairGenerator class is used to generate pairs of public and private keys.
class | KeyPairGeneratorSpi This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
class | KeyStore This class represents an in-memory collection of keys and certificates.
class | KeyStoreException This is the generic KeyStore exception.
class | KeyStoreSpi This class defines the Service Provider Interface (SPI) for the KeyStore class.
class | MessageDigest This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
class | MessageDigestSpi This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
class | NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
class | NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
class | Permission Abstract class for representing access to a system resource.
class | PermissionCollection Abstract class representing a collection of Permission objects.
class | Permissions This class represents a heterogeneous collection of Permissions.
class | Policy This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).
class | PrivilegedActionException This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
class | ProtectionDomain This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.
class | Provider This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
class | ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
class | SecureClassLoader This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
class | SecureRandom This class provides a cryptographically strong pseudo-random number generator (PRNG).
class | SecureRandomSpi This class defines the Service Provider Interface (SPI) for the SecureRandom class.
class | Security This class centralizes all security properties and common security methods.
class | SecurityPermission This class is for security permissions.
class | Signature This Signature class is used to provide applications the functionality of a digital signature algorithm.
class | SignatureException This is the generic Signature exception.
class | SignatureSpi This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
class | SignedObject SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
class | Signer Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.
class | UnresolvedPermission The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.

Methods in java.security that return Object
Object | Provider.put(Object key, Object value) Sets the key property to have the specified value.
Object | Provider.remove(Object key) Removes the key property (and its corresponding value).
Object | MessageDigestSpi.clone() Returns a clone if the implementation is cloneable.
static Object | AccessController.doPrivileged(PrivilegedAction action) Performs the specified PrivilegedAction with privileges enabled.
static Object | AccessController.doPrivileged(PrivilegedAction action, AccessControlContext context) Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext.
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action) Performs the specified PrivilegedExceptionAction with privileges enabled.
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.
protected abstract Object | SignatureSpi.engineGetParameter(String param) Deprecated.
Object | SignatureSpi.clone() Returns a clone if the implementation is cloneable.
Object | PrivilegedExceptionAction.run() Performs the computation.
Object | PrivilegedAction.run() Performs the computation.
Object | GuardedObject.getObject() Retrieves the guarded object, or throws an exception if access to the guarded object is denied by the guard.
Object | SignedObject.getObject() Retrieves the encapsulated object.
Object | MessageDigest.clone() Returns a clone if the implementation is cloneable.
Object | Signature.getParameter(String param) Deprecated.
Object | Signature.clone() Returns a clone if the implementation is cloneable.

Methods in java.security with parameters of type Object
void | Permission.checkGuard(Object object) Implements the guard interface for a permission.
abstract boolean | Permission.equals(Object obj) Checks two Permission objects for equality.
boolean | BasicPermission.equals(Object obj) Checks two BasicPermission objects for equality.
Object | Provider.put(Object key, Object value) Sets the key property to have the specified value.
Object | Provider.remove(Object key) Removes the key property (and its corresponding value).
boolean | CodeSource.equals(Object obj) Tests for equality between the specified object and this object.
boolean | UnresolvedPermission.equals(Object obj) Checks two UnresolvedPermission objects for equality.
boolean | Identity.equals(Object identity) Deprecated. Tests for equality between the specified object and this identity.
boolean | AccessControlContext.equals(Object obj) Checks two AccessControlContext objects for equality.
protected abstract void | SignatureSpi.engineSetParameter(String param, Object value) Deprecated. Replaced by engineSetParameter.
boolean | AllPermission.equals(Object obj) Checks two AllPermission objects for equality.
void | Guard.checkGuard(Object object) Determines whether or not to allow access to the guarded object object.
void | Signature.setParameter(String param, Object value) Deprecated. Use setParameter.
boolean | Principal.equals(Object another) Compares this principal to the specified object.

Constructors in java.security with parameters of type Object
GuardedObject(Object object, Guard guard)
Constructs a GuardedObject using the specified object and guard.

Uses of Object in java.security.acl

Subclasses of Object in java.security.acl
class | AclNotFoundException This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
class | LastOwnerException This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
class | NotOwnerException This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Methods in java.security.acl that return Object
 Object AclEntry.clone()
Clones this ACL entry.

Methods in java.security.acl with parameters of type Object
 boolean Permission.equals(Object another)
Returns true if the object passed matches the permission represented in this interface.

Uses of Object in java.security.cert

Subclasses of Object in java.security.cert
class | Certificate Abstract class for managing a variety of identity certificates.
protected static class | Certificate.CertificateRep Alternate Certificate class for serialization.
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateException This exception indicates one of a variety of certificate problems.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateFactory This class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.
class | CertificateFactorySpi This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.
class | CRL This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
class | CRLException CRL (Certificate Revocation List) Exception
class | X509Certificate Abstract class for X.509 certificates.
class | X509CRL Abstract class for an X.509 Certificate Revocation List (CRL).
class | X509CRLEntry Abstract class for a revoked certificate in a CRL (Certificate Revocation List).

Methods in java.security.cert that return Object
protected Object | Certificate.writeReplace() Replace the Certificate to be serialized.
protected Object | Certificate.CertificateRep.readResolve() Resolve the Certificate Object.

Methods in java.security.cert with parameters of type Object
boolean | Certificate.equals(Object other) Compares this certificate for equality with the specified object.
boolean | X509CRLEntry.equals(Object other) Compares this CRL entry for equality with the given object.
boolean | X509CRL.equals(Object other) Compares this CRL for equality with the given object.

Uses of Object in java.security.spec

Subclasses of Object in java.security.spec
class | DSAParameterSpec This class specifies the set of parameters used with the DSA algorithm.
class | DSAPrivateKeySpec This class specifies a DSA private key with its associated parameters.
class | DSAPublicKeySpec This class specifies a DSA public key with its associated parameters.
class | EncodedKeySpec This class represents a public or private key in encoded format.
class | InvalidKeySpecException This is the exception for invalid key specifications.
class | InvalidParameterSpecException This is the exception for invalid parameter specifications.
class | PKCS8EncodedKeySpec This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:
class | RSAKeyGenParameterSpec This class specifies the set of parameters used to generate an RSA key pair.
class | RSAPrivateCrtKeySpec This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
class | RSAPrivateKeySpec This class specifies an RSA private key.
class | RSAPublicKeySpec This class specifies an RSA public key.
class | X509EncodedKeySpec This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:

Uses of Object in java.sql

Subclasses of Object in java.sql
class | BatchUpdateException An exception thrown when an error occurs during a batch update operation.
class | DataTruncation An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
class | DriverManager The basic service for managing a set of JDBC drivers. NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
class | DriverPropertyInfo Driver properties for making a connection.
class | SQLException An exception that provides information on a database access error or other errors.
class | SQLPermission The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.
class | SQLWarning An exception that provides information on database access warnings.
class | Time A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
class | Timestamp A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
class | Types The class that defines the constants that are used to identify generic SQL types, called JDBC types.

Methods in java.sql that return Object
Object | CallableStatement.getObject(int parameterIndex) Gets the value of a parameter as an Object in the Java programming language.
Object | CallableStatement.getObject(int i, Map map) Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
Object[] | Struct.getAttributes() Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
Object[] | Struct.getAttributes(Map map) Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
Object | Array.getArray() Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
Object | Array.getArray(Map map) Retrieves the contents of the SQL array designated by this Array object.
Object | Array.getArray(long index, int count) Returns an array containing a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Object | Array.getArray(long index, int count, Map map) Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Object | SQLInput.readObject() Returns the datum at the head of the stream as an Object in the Java programming language.
Object | ResultSet.getObject(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | ResultSet.getObject(String columnName) Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | ResultSet.getObject(int i, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | ResultSet.getObject(String colName, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

Methods in java.sql with parameters of type Object
void | PreparedStatement.setObject(int parameterIndex, Object x, int targetSqlType, int scale) Sets the value of the designated parameter with the given object.
void | PreparedStatement.setObject(int parameterIndex, Object x, int targetSqlType) Sets the value of the designated parameter with the given object.
void | PreparedStatement.setObject(int parameterIndex, Object x) Sets the value of the designated parameter using the given object.
boolean | Timestamp.equals(Object ts) Tests to see if this Timestamp object is equal to the given object.
void | ResultSet.updateObject(int columnIndex, Object x, int scale) Updates the designated column with an Object value.
void | ResultSet.updateObject(int columnIndex, Object x) Updates the designated column with an Object value.
void | ResultSet.updateObject(String columnName, Object x, int scale) Updates the designated column with an Object value.
void | ResultSet.updateObject(String columnName, Object x) Updates the designated column with an Object value.

Uses of Object in java.text

Subclasses of Object in java.text
class | Annotation An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
static class | AttributedCharacterIterator.Attribute Defines attribute keys that are used to identify text attributes.
class | AttributedString An AttributedString holds text and related attribute information.
class | BreakIterator The BreakIterator class implements methods for finding the location of boundaries in text.
class | ChoiceFormat A ChoiceFormat allows you to attach a format to a range of numbers.
class | CollationElementIterator The CollationElementIterator class is used as an iterator to walk through each character of an international string.
class | CollationKey A CollationKey represents a String under the rules of a specific Collator object.
class | Collator The Collator class performs locale-sensitive String comparison.
class | DateFormat DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
class | DateFormatSymbols DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
class | DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
class | DecimalFormatSymbols This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
class | FieldPosition FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
class | Format Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
class | MessageFormat MessageFormat provides a means to produce concatenated messages in language-neutral way.
class | NumberFormat NumberFormat is the abstract base class for all number formats.
class | ParseException Signals that an error has been reached unexpectedly while parsing.
class | ParsePosition ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
class | RuleBasedCollator The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
class | SimpleDateFormat SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
class | StringCharacterIterator StringCharacterIterator implements the CharacterIterater protocol for a String.

Methods in java.text that return Object
Object | AttributedCharacterIterator.getAttribute(AttributedCharacterIterator.Attribute attribute) Returns the value of the named attribute for the current character.
protected Object | AttributedCharacterIterator.Attribute.readResolve() Resolves instances being deserialized to the predefined constants.
abstract Object | Format.parseObject(String source, ParsePosition status) Parses a string to produce an object.
Object | Format.parseObject(String source) Parses a string to produce an object.
Object | Format.clone() Overrides Cloneable
Object | NumberFormat.parseObject(String source, ParsePosition parsePosition) Parses a string to produce an object.
Object | NumberFormat.clone() Overrides Cloneable
Object[] | ChoiceFormat.getFormats() Get the formats passed in the constructor.
Object | ChoiceFormat.clone() Overrides Cloneable
Object | Collator.clone() Overrides Cloneable
Object | RuleBasedCollator.clone() Standard override; no change in semantics.
Object | CharacterIterator.clone() Create a copy of this iterator
Object | DateFormat.parseObject(String source, ParsePosition pos) Parse a date/time string into an Object.
Object | DateFormat.clone() Overrides Cloneable
Object | StringCharacterIterator.clone() Creates a copy of this iterator.
Object | SimpleDateFormat.clone() Overrides Cloneable
Object | DateFormatSymbols.clone() Overrides Cloneable
Object | BreakIterator.clone() Create a copy of this iterator
Object | DecimalFormat.clone() Standard override; no change in semantics.
Object | Annotation.getValue() Returns the value of the attribute, which may be null.
Object | DecimalFormatSymbols.clone() Standard override.
Object[] | MessageFormat.parse(String source, ParsePosition status) Parses the string.
Object[] | MessageFormat.parse(String source) Parses the string.
Object | MessageFormat.parseObject(String text, ParsePosition status) Parses the string.
Object | MessageFormat.clone() Overrides Cloneable

Methods in java.text with parameters of type Object
boolean | AttributedCharacterIterator.Attribute.equals(Object obj) Compares two objects for equality.
String | Format.format(Object obj) Formats an object to produce a string.
abstract StringBuffer | Format.format(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
StringBuffer | NumberFormat.format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
boolean | NumberFormat.equals(Object obj) Overrides equals
boolean | ChoiceFormat.equals(Object obj) Equality comparision between two
boolean | ParsePosition.equals(Object obj) Overrides equals
int | Collator.compare(Object o1, Object o2) Compares its two arguments for order.
boolean | Collator.equals(Object that) Compares the equality of two Collators.
boolean | RuleBasedCollator.equals(Object obj) Compares the equality of two collation objects.
StringBuffer | DateFormat.format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Overrides Format.
boolean | DateFormat.equals(Object obj) Overrides equals
int | CollationKey.compareTo(Object o) Compares this CollationKey with the specified Object for order.
boolean | CollationKey.equals(Object target) Compare this CollationKey and the target CollationKey for equality.
boolean | StringCharacterIterator.equals(Object obj) Compares the equality of two StringCharacterIterator objects.
boolean | SimpleDateFormat.equals(Object obj) Override equals.
boolean | FieldPosition.equals(Object obj) Overrides equals
void | AttributedString.addAttribute(AttributedCharacterIterator.Attribute attribute, Object value) Adds an attribute to the entire string.
void | AttributedString.addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex) Adds an attribute to a subrange of the string.
boolean | DateFormatSymbols.equals(Object obj) Override equals
boolean | DecimalFormat.equals(Object obj) Overrides equals
boolean | DecimalFormatSymbols.equals(Object obj) Override equals.
StringBuffer | MessageFormat.format(Object[] source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
static String | MessageFormat.format(String pattern, Object[] arguments) Convenience routine.
StringBuffer | MessageFormat.format(Object source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
boolean | MessageFormat.equals(Object obj) Equality comparision between two message format objects

Constructors in java.text with parameters of type Object
Annotation(Object value)
Constructs an annotation record with the given value, which may be null.

Uses of Object in java.util

Subclasses of Object in java.util
class | AbstractCollection This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
class | AbstractList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
class | AbstractMap This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
class | AbstractSequentialList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
class | AbstractSet This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
class | ArrayList Resizable-array implementation of the List interface.
class | Arrays This class contains various methods for manipulating arrays (such as sorting and searching).
class | BitSet This class implements a vector of bits that grows as needed.
class | Calendar Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
class | Collections This class consists exclusively of static methods that operate on or return collections.
class | ConcurrentModificationException This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
class | Date The class Date represents a specific instant in time, with millisecond precision.
class | Dictionary The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
class | EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.
class | EventObject The root class from which all event state objects shall be derived.
class | GregorianCalendar GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.
class | HashMap Hash table based implementation of the Map interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | Hashtable This class implements a hashtable, which maps keys to values.
class | LinkedList Linked list implementation of the List interface.
class | ListResourceBundle ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
class | Locale A Locale object represents a specific geographical, political, or cultural region.
class | MissingResourceException Signals that a resource is missing.
class | NoSuchElementException Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
class | Observable This class represents an observable object, or "data" in the model-view paradigm.
class | Properties The Properties class represents a persistent set of properties.
class | PropertyPermission This class is for property permissions.
class | PropertyResourceBundle PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
class | Random An instance of this class is used to generate a stream of pseudorandom numbers.
class | ResourceBundle Resource bundles contain locale-specific objects.
class | SimpleTimeZone SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | StringTokenizer The string tokenizer class allows an application to break a string into tokens.
class | Timer A facility for threads to schedule tasks for future execution in a background thread.
class | TimerTask A task that can be scheduled for one-time or repeated execution by a Timer.
class | TimeZone TimeZone represents a time zone offset, and also figures out daylight savings.
class | TooManyListenersException The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.
class | TreeMap Red-Black tree based implementation of the SortedMap interface.
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.
class | Vector The Vector class implements a growable array of objects.
class | WeakHashMap A hashtable-based Map implementation with weak keys.

Fields in java.util declared as Object
protected Object | EventObject.source The object on which the Event initially occurred.
protected Object[] | Vector.elementData The array buffer into which the components of the vector are stored.

Methods in java.util that return Object
Object | EventObject.getSource() The object on which the Event initially occurred.
abstract Object | Dictionary.get(Object key) Returns the value to which the key is mapped in this dictionary.
abstract Object | Dictionary.put(Object key, Object value) Maps the specified key to the specified value in this dictionary.
abstract Object | Dictionary.remove(Object key) Removes the key (and its corresponding value) from this dictionary.
Object | Hashtable.get(Object key) Returns the value to which the specified key is mapped in this hashtable.
Object | Hashtable.put(Object key, Object value) Maps the specified key to the specified value in this hashtable.
Object | Hashtable.remove(Object key) Removes the key (and its corresponding value) from this hashtable.
Object | Hashtable.clone() Creates a shallow copy of this hashtable.
Object | Properties.setProperty(String key, String value) Calls the hashtable method put.
Object | Date.clone() Return a copy of this object.
Object | BitSet.clone() Cloning this BitSet produces a new BitSet that is equal to it.
Object[] | AbstractCollection.toArray() Returns an array containing all of the elements in this collection.
Object[] | AbstractCollection.toArray(Object[] a) Returns an array with a runtime type is that of the specified array and that contains all of the elements in this collection.
Object | TreeSet.first() Returns the first (lowest) element currently in this sorted set.
Object | TreeSet.last() Returns the last (highest) element currently in this sorted set.
Object | TreeSet.clone() Returns a shallow copy of this TreeSet instance.
Object | Enumeration.nextElement() Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
Object | AbstractMap.get(Object key) Returns the value to which this map maps the specified key.
Object | AbstractMap.put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
Object | AbstractMap.remove(Object key) Removes the mapping for this key from this map if present (optional operation).
abstract Object | AbstractList.get(int index) Returns the element at the specified position in this list.
Object | AbstractList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
Object | AbstractList.remove(int index) Removes the element at the specified position in this list (optional operation).
Object | Vector.elementAt(int index) Returns the component at the specified index.
Object | Vector.firstElement() Returns the first component (the item at index 0) of this vector.
Object | Vector.lastElement() Returns the last component of the vector.
Object | Vector.clone() Returns a clone of this vector.
Object[] | Vector.toArray() Returns an array containing all of the elements in this Vector in the correct order.
Object[] | Vector.toArray(Object[] a) Returns an array containing all of the elements in this Vector in the correct order.
Object | Vector.get(int index) Returns the element at the specified position in this Vector.
Object | Vector.set(int index, Object element) Replaces the element at the specified position in this Vector with the specified element.
Object | Vector.remove(int index) Removes the element at the specified position in this Vector.
Object[] | Collection.toArray() Returns an array containing all of the elements in this collection.
Object[] | Collection.toArray(Object[] a) Returns an array containing all of the elements in this collection whose runtime type is that of the specified array.
Object | ResourceBundle.getObject(String key) Get an object from a ResourceBundle.
protected abstract Object | ResourceBundle.handleGetObject(String key) Get an object from a ResourceBundle.
Object | PropertyResourceBundle.handleGetObject(String key) Override of ResourceBundle, same semantics
static Object | Collections.min(Collection coll) Returns the minimum element of the given collection, according to the natural ordering of its elements.
static Object | Collections.min(Collection coll, Comparator comp) Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static Object | Collections.max(Collection coll) Returns the maximum element of the given collection, according to the natural ordering of its elements.
static Object | Collections.max(Collection coll, Comparator comp) Returns the maximum element of the given collection, according to the order induced by the specified comparator.
Object | WeakHashMap.get(Object key) Returns the value to which this map maps the specified key.
Object | WeakHashMap.put(Object key, Object value) Updates this map so that the given key maps to the given value.
Object | WeakHashMap.remove(Object key) Removes the mapping for the given key from this map, if present.
Object | TimeZone.clone() Overrides Cloneable
Object | SimpleTimeZone.clone() Overrides Cloneable
Object | AbstractSequentialList.get(int index) Returns the element at the specified position in this list.
Object | AbstractSequentialList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
Object | AbstractSequentialList.remove(int index) Removes the element at the specified position in this list.
Object | ListIterator.next() Returns the next element in the list.
Object | ListIterator.previous() Returns the previous element in the list.
Object | Calendar.clone() Overrides Cloneable
Object | Iterator.next() Returns the next element in the interation.
Object | HashSet.clone() Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
Object[] | Set.toArray() Returns an array containing all of the elements in this set.
Object[] | Set.toArray(Object[] a) Returns an array containing all of the elements in this set whose runtime type is that of the specified array.
Object | SortedSet.first() Returns the first (lowest) element currently in this sorted set.
Object | SortedSet.last() Returns the last (highest) element currently in this sorted set.
Object | LinkedList.getFirst() Returns the first element in this list.
Object | LinkedList.getLast() Returns the last element in this list.
Object | LinkedList.removeFirst() Removes and returns the first element from this list.
Object | LinkedList.removeLast() Removes and returns the last element from this list.
Object | LinkedList.get(int index) Returns the element at the specified position in this list.
Object | LinkedList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
Object | LinkedList.remove(int index) Removes the element at the specified position in this list.
Object | LinkedList.clone() Returns a shallow copy of this LinkedList.
Object[] | LinkedList.toArray() Returns an array containing all of the elements in this list in the correct order.
Object[] | LinkedList.toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
Object | TreeMap.get(Object key) Returns the value to which this map maps the specified key.
Object | TreeMap.firstKey() Returns the first (lowest) key currently in this sorted map.
Object | TreeMap.lastKey() Returns the last (highest) key currently in this sorted map.
Object | TreeMap.put(Object key, Object value) Associates the specified value with the specified key in this map.
Object | TreeMap.remove(Object key) Removes the mapping for this key from this TreeMap if present.
Object | TreeMap.clone() Returns a shallow copy of this TreeMap instance.
Object | StringTokenizer.nextElement() Returns the same value as the nextToken method, except that its declared return value is Object rather than String.
Object[] | List.toArray() Returns an array containing all of the elements in this list in proper sequence.
Object[] | List.toArray(Object[] a) Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.
Object | List.get(int index) Returns the element at the specified position in this list.
Object | List.set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
Object | List.remove(int index) Removes the element at the specified position in this list (optional operation).
Object | Locale.clone() Overrides Cloneable
Object | Stack.push(Object item) Pushes an item onto the top of this stack.
Object | Stack.pop() Removes the object at the top of this stack and returns that object as the value of this function.
Object | Stack.peek() Looks at the object at the top of this stack without removing it from the stack.
Object | ListResourceBundle.handleGetObject(String key) Override of ResourceBundle, same semantics
protected abstract Object[][] | ListResourceBundle.getContents() See class description.
Object | ArrayList.clone() Returns a shallow copy of this ArrayList instance.
Object[] | ArrayList.toArray() Returns an array containing all of the elements in this list in the correct order.
Object[] | ArrayList.toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
Object | ArrayList.get(int index) Returns the element at the specified position in this list.
Object | ArrayList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
Object | ArrayList.remove(int index) Removes the element at the specified position in this list.
Object | HashMap.get(Object key) Returns the value to which this map maps the specified key.
Object | HashMap.put(Object key, Object value) Associates the specified value with the specified key in this map.
Object | HashMap.remove(Object key) Removes the mapping for this key from this map if present.
Object | HashMap.clone() Returns a shallow copy of this HashMap instance: the keys and values themselves are not cloned.
Object | Map.get(Object key) Returns the value to which this map maps the specified key.
Object | Map.put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
Object | Map.remove(Object key) Removes the mapping for this key from this map if present (optional operation).
Object | Map.Entry.getKey() Returns the key corresponding to this entry.
Object | Map.Entry.getValue() Returns the value corresponding to this entry.
Object | Map.Entry.setValue(Object value) Replaces the value corresponding to this entry with the specified value (optional operation).
Object | SortedMap.firstKey() Returns the first (lowest) key currently in this sorted map.
Object | SortedMap.lastKey() Returns the last (highest) key currently in this sorted map.

Methods in java.util with parameters of type Object
abstract Object | Dictionary.get(Object key) Returns the value to which the key is mapped in this dictionary.
abstract Object | Dictionary.put(Object key, Object value) Maps the specified key to the specified value in this dictionary.
abstract Object | Dictionary.remove(Object key) Removes the key (and its corresponding value) from this dictionary.
boolean | Hashtable.contains(Object value) Tests if some key maps into the specified value in this hashtable.
boolean | Hashtable.containsValue(Object value) Returns true if this Hashtable maps one or more keys to this value.
boolean | Hashtable.containsKey(Object key) Tests if the specified object is a key in this hashtable.
Object | Hashtable.get(Object key) Returns the value to which the specified key is mapped in this hashtable.
Object | Hashtable.put(Object key, Object value) Maps the specified key to the specified value in this hashtable.
Object | Hashtable.remove(Object key) Removes the key (and its corresponding value) from this hashtable.
boolean | Hashtable.equals(Object o) Compares the specified Object with this Map for equality, as per the definition in the Map interface.
boolean | Date.equals(Object obj) Compares two dates for equality.
int | Date.compareTo(Object o) Compares this Date to another Object.
boolean | BitSet.equals(Object obj) Compares this object against the specified object.
boolean | AbstractCollection.contains(Object o) Returns true if this collection contains the specified element.
Object[] | AbstractCollection.toArray(Object[] a) Returns an array with a runtime type is that of the specified array and that contains all of the elements in this collection.
boolean | AbstractCollection.add(Object o) Ensures that this collection contains the specified element (optional operation).
boolean | AbstractCollection.remove(Object o) Removes a single instance of the specified element from this collection, if it is present (optional operation).
boolean | AbstractSet.equals(Object o) Compares the specified object with this set for equality.
boolean | TreeSet.contains(Object o) Returns true if this set contains the specified element.
boolean | TreeSet.add(Object o) Adds the specified element to this set if it is not already present.
boolean | TreeSet.remove(Object o) Removes the given element from this set if it is present.
SortedSet | TreeSet.subSet(Object fromElement, Object toElement) Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | TreeSet.headSet(Object toElement) Returns a view of the portion of this set whose elements are strictly less than toElement.
SortedSet | TreeSet.tailSet(Object fromElement) Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
static void | Arrays.sort(Object[] a) Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.
static void | Arrays.sort(Object[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.
static void | Arrays.sort(Object[] a, Comparator c) Sorts the specified array of objects according to the order induced by the specified comparator.
static void | Arrays.sort(Object[] a, int fromIndex, int toIndex, Comparator c) Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static int | Arrays.binarySearch(Object[] a, Object key) Searches the specified array for the specified object using the binary search algorithm.
static int | Arrays.binarySearch(Object[] a, Object key, Comparator c) Searches the specified array for the specified object using the binary search algorithm.
static boolean | Arrays.equals(Object[] a, Object[] a2) Returns true if the two specified arrays of Objects are equal to one another.
static void | Arrays.fill(Object[] a, Object val) Assigns the specified Object reference to each element of the specified array of Objects.
static void | Arrays.fill(Object[] a, int fromIndex, int toIndex, Object val) Assigns the specified Object reference to each element of the specified range of the specified array of Objects.
static List | Arrays.asList(Object[] a) Returns a fixed-size list backed by the specified array.
boolean | AbstractMap.containsValue(Object value) Returns true if this map maps one or more keys to this value.
boolean | AbstractMap.containsKey(Object key) Returns true if this map contains a mapping for the specified key.
Object | AbstractMap.get(Object key) Returns the value to which this map maps the specified key.
Object | AbstractMap.put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
Object | AbstractMap.remove(Object key) Removes the mapping for this key from this map if present (optional operation).
boolean | AbstractMap.equals(Object o) Compares the specified object with this map for equality.
boolean | AbstractList.add(Object o) Appends the specified element to the end of this List (optional operation).
Object | AbstractList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
void | AbstractList.add(int index, Object element) Inserts the specified element at the specified position in this list (optional operation).
int | AbstractList.indexOf(Object o) Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.
int | AbstractList.lastIndexOf(Object o) Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.
boolean | AbstractList.equals(Object o) Compares the specified object with this list for equality.
void | Vector.copyInto(Object[] anArray) Copies the components of this vector into the specified array.
boolean | Vector.contains(Object elem) Tests if the specified object is a component in this vector.
int | Vector.indexOf(Object elem) Searches for the first occurence of the given argument, testing for equality using the equals method.
int | Vector.indexOf(Object elem, int index) Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
int | Vector.lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this vector.
int | Vector.lastIndexOf(Object elem, int index) Searches backwards for the specified object, starting from the specified index, and returns an index to it.
void | Vector.setElementAt(Object obj, int index) Sets the component at the specified index of this vector to be the specified object.
void | Vector.insertElementAt(Object obj, int index) Inserts the specified object as a component in this vector at the specified index.
void | Vector.addElement(Object obj) Adds the specified component to the end of this vector, increasing its size by one.
boolean | Vector.removeElement(Object obj) Removes the first (lowest-indexed) occurrence of the argument from this vector.
Object[] | Vector.toArray(Object[] a) Returns an array containing all of the elements in this Vector in the correct order.
Object | Vector.set(int index, Object element) Replaces the element at the specified position in this Vector with the specified element.
boolean | Vector.add(Object o) Appends the specified element to the end of this Vector.
boolean | Vector.remove(Object o) Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
void | Vector.add(int index, Object element) Inserts the specified element at the specified position in this Vector.
boolean | Vector.equals(Object o) Compares the specified Object with this Vector for equality.
boolean | PropertyPermission.equals(Object obj) Checks two PropertyPermission objects for equality.
boolean | Collection.contains(Object o) Returns true if this collection contains the specified element.
Object[] | Collection.toArray(Object[] a) Returns an array containing all of the elements in this collection whose runtime type is that of the specified array.
boolean | Collection.add(Object o) Ensures that this collection contains the specified element (optional operation).
boolean | Collection.remove(Object o) Removes a single instance of the specified element from this collection, if it is present (optional operation).
boolean | Collection.equals(Object o) Compares the specified object with this collection for equality.
static int | Collections.binarySearch(List list, Object key) Searches the specified list for the specified object using the binary search algorithm.
static int | Collections.binarySearch(List list, Object key, Comparator c) Searches the specified list for the specified object using the binary search algorithm.
static void | Collections.fill(List list, Object o) Replaces all of the elements of the specified list with the specified element.
static Set | Collections.singleton(Object o) Returns an immutable set containing only the specified object.
static List | Collections.singletonList(Object o) Returns an immutable list containing only the specified object.
static Map | Collections.singletonMap(Object key, Object value) Returns an immutable map, mapping only the specified key to the specified value.
static List | Collections.nCopies(int n, Object o) Returns an immutable list consisting of n copies of the specified object.
boolean | WeakHashMap.containsKey(Object key) Returns true if this map contains a mapping for the specified key.
Object | WeakHashMap.get(Object key) Returns the value to which this map maps the specified key.
Object | WeakHashMap.put(Object key, Object value) Updates this map so that the given key maps to the given value.
Object | WeakHashMap.remove(Object key) Removes the mapping for the given key from this map, if present.
boolean | SimpleTimeZone.equals(Object obj) Compares the equality of two SimpleTimeZone objects.
Object | AbstractSequentialList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
void | AbstractSequentialList.add(int index, Object element) Inserts the specified element at the specified position in this list.
void | ListIterator.set(Object o) Replaces the last element returned by next or previous with the specified element (optional operation).
void | ListIterator.add(Object o) Inserts the specified element into the list (optional operation).
int | Comparator.compare(Object o1, Object o2) Compares its two arguments for order.
boolean | Comparator.equals(Object obj) Indicates whether some other object is "equal to" this Comparator.
boolean | Calendar.equals(Object obj) Compares this calendar to the specified object.
boolean | Calendar.before(Object when) Compares the time field records.
boolean | Calendar.after(Object when) Compares the time field records.
boolean | GregorianCalendar.equals(Object obj) Compares this GregorianCalendar to an object reference.
boolean | HashSet.contains(Object o) Returns true if this set contains the specified element.
boolean | HashSet.add(Object o) Adds the specified element to this set if it is not already present.
boolean | HashSet.remove(Object o) Removes the given element from this set if it is present.
boolean | Set.contains(Object o) Returns true if this set contains the specified element.
Object[] | Set.toArray(Object[] a) Returns an array containing all of the elements in this set whose runtime type is that of the specified array.
boolean | Set.add(Object o) Adds the specified element to this set if it is not already present (optional operation).
boolean | Set.remove(Object o) Removes the specified element from this set if it is present (optional operation).
boolean | Set.equals(Object o) Compares the specified object with this set for equality.
SortedSet | SortedSet.subSet(Object fromElement, Object toElement) Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | SortedSet.headSet(Object toElement) Returns a view of the portion of this sorted set whose elements are strictly less than toElement.
SortedSet | SortedSet.tailSet(Object fromElement) Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.
void | LinkedList.addFirst(Object o) Inserts the given element at the beginning of this list.
void | LinkedList.addLast(Object o) Appends the given element to the end of this list.
boolean | LinkedList.contains(Object o) Returns true if this list contains the specified element.
boolean | LinkedList.add(Object o) Appends the specified element to the end of this list.
boolean | LinkedList.remove(Object o) Removes the first occurrence of the specified element in this list.
Object | LinkedList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
void | LinkedList.add(int index, Object element) Inserts the specified element at the specified position in this list.
int | LinkedList.indexOf(Object o) Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element.
int | LinkedList.lastIndexOf(Object o) Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.
Object[] | LinkedList.toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
boolean | TreeMap.containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | TreeMap.containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
Object | TreeMap.get(Object key) Returns the value to which this map maps the specified key.
Object | TreeMap.put(Object key, Object value) Associates the specified value with the specified key in this map.
Object | TreeMap.remove(Object key) Removes the mapping for this key from this TreeMap if present.
SortedMap | TreeMap.subMap(Object fromKey, Object toKey) Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | TreeMap.headMap(Object toKey) Returns a view of the portion of this map whose keys are strictly less than toKey.
SortedMap | TreeMap.tailMap(Object fromKey) Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
void | Observable.notifyObservers(Object arg) If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
boolean | List.contains(Object o) Returns true if this list contains the specified element.
Object[] | List.toArray(Object[] a) Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.
boolean | List.add(Object o) Appends the specified element to the end of this list (optional operation).
boolean | List.remove(Object o) Removes the first occurrence in this list of the specified element (optional operation).
boolean | List.equals(Object o) Compares the specified object with this list for equality.
Object | List.set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
void | List.add(int index, Object element) Inserts the specified element at the specified position in this list (optional operation).
int | List.indexOf(Object o) Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
int | List.lastIndexOf(Object o) Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
boolean | Locale.equals(Object obj) Returns true if this Locale is equal to another object.
void | Observer.update(Observable o, Object arg) This method is called whenever the observed object is changed.
Object | Stack.push(Object item) Pushes an item onto the top of this stack.
int | Stack.search(Object o) Returns the 1-based position where an object is on this stack.
boolean | ArrayList.contains(Object elem) Returns true if this list contains the specified element.
int | ArrayList.indexOf(Object elem) Searches for the first occurence of the given argument, testing for equality using the equals method.
int | ArrayList.lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this list.
Object[] | ArrayList.toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
Object | ArrayList.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
boolean | ArrayList.add(Object o) Appends the specified element to the end of this list.
void | ArrayList.add(int index, Object element) Inserts the specified element at the specified position in this list.
boolean | HashMap.containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
boolean | HashMap.containsKey(Object key) Returns true if this map contains a mapping for the specified key.
Object | HashMap.get(Object key) Returns the value to which this map maps the specified key.
Object | HashMap.put(Object key, Object value) Associates the specified value with the specified key in this map.
Object | HashMap.remove(Object key) Removes the mapping for this key from this map if present.
boolean | Map.containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | Map.containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
Object | Map.get(Object key) Returns the value to which this map maps the specified key.
Object | Map.put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
Object | Map.remove(Object key) Removes the mapping for this key from this map if present (optional operation).
boolean | Map.equals(Object o) Compares the specified object with this map for equality.
Object | Map.Entry.setValue(Object value) Replaces the value corresponding to this entry with the specified value (optional operation).
boolean | Map.Entry.equals(Object o) Compares the specified object with this entry for equality.
SortedMap | SortedMap.subMap(Object fromKey, Object toKey) Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | SortedMap.headMap(Object toKey) Returns a view of the portion of this sorted map whose keys are strictly less than toKey.
SortedMap | SortedMap.tailMap(Object fromKey) Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.

Constructors in java.util with parameters of type Object
EventObject(Object source)
Constructs a prototypical Event.

Uses of Object in java.util.jar

Subclasses of Object in java.util.jar
class | Attributes The Attributes class maps Manifest attribute names to associated string values.
static class | Attributes.Name The Attributes.Name class represents an attribute name stored in this Map.
class | JarEntry This class is used to represent a JAR file entry.
class | JarException Signals that an error of some sort has occurred while reading from or writing to a JAR file.
class | JarFile The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile.
class | JarInputStream The JarInputStream class is used to read the contents of a JAR file from any input stream.
class | JarOutputStream The JarOutputStream class is used to write the contents of a JAR file to any output stream.
class | Manifest The Manifest class is used to maintain Manifest entry names and their associated Attributes.

Methods in java.util.jar that return Object
Object | Attributes.get(Object name) Returns the value of the specified attribute name, or null if the attribute name was not found.
Object | Attributes.put(Object name, Object value) Associates the specified value with the specified attribute name (key) in this Map.
Object | Attributes.remove(Object name) Removes the attribute with the specified name (key) from this Map.
Object | Attributes.clone() Returns a copy of the Attributes, implemented as follows:
Object | Manifest.clone() Returns a shallow copy of this Manifest, implemented as follows:

Methods in java.util.jar with parameters of type Object
Object | Attributes.get(Object name) Returns the value of the specified attribute name, or null if the attribute name was not found.
Object | Attributes.put(Object name, Object value) Associates the specified value with the specified attribute name (key) in this Map.
Object | Attributes.remove(Object name) Removes the attribute with the specified name (key) from this Map.
boolean | Attributes.containsValue(Object value) Returns true if this Map maps one or more attribute names (keys) to the specified value.
boolean | Attributes.containsKey(Object name) Returns true if this Map contains the specified attribute name (key).
boolean | Attributes.equals(Object o) Compares the specified Attributes object with this Map for equality.
boolean | Attributes.Name.equals(Object o) Compares this attribute name to another for equality.
boolean | Manifest.equals(Object o) Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.

Uses of Object in java.util.zip

Subclasses of Object in java.util.zip
class | Adler32 A class that can be used to compute the Adler-32 checksum of a data stream.
class | CheckedInputStream An input stream that also maintains a checksum of the data being read.
class | CheckedOutputStream An output stream that also maintains a checksum of the data being written.
class | CRC32 A class that can be used to compute the CRC-32 of a data stream.
class | DataFormatException Signals that a data format error has occurred.
class | Deflater This class provides support for general purpose compression using the popular ZLIB compression library.
class | DeflaterOutputStream This class implements an output stream filter for compressing data in the "deflate" compression format.
class | GZIPInputStream This class implements a stream filter for reading compressed data in the GZIP format.
class | GZIPOutputStream This class implements a stream filter for writing compressed data in the GZIP file format.
class | Inflater This class provides support for general purpose decompression using popular ZLIB compression library.
class | InflaterInputStream This class implements a stream filter for uncompressing data in the "deflate" compression format.
class | ZipEntry This class is used to represent a ZIP file entry.
class | ZipException Signals that a Zip exception of some sort has occurred.
class | ZipFile This class is used to read entries from a zip file.
class | ZipInputStream This class implements an input stream filter for reading files in the ZIP file format.
class | ZipOutputStream This class implements an output stream filter for writing files in the ZIP file format.

Methods in java.util.zip that return Object
 Object ZipEntry.clone()
Returns a copy of this entry.

Uses of Object in javax.accessibility

Subclasses of Object in javax.accessibility
class | AccessibleBundle Base class used to maintain a strongly typed enumeration.
class | AccessibleContext AccessibleContext represents the minimum information all accessible objects return.
class | AccessibleHyperlink Encapsulation of a link, or set of links (e.g.
class | AccessibleRelation Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
class | AccessibleRelationSet Class AccessibleRelationSet determines a component's relation set.
class | AccessibleResourceBundle Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.
class | AccessibleRole Class AccessibleRole determines the role of a component.
class | AccessibleState Class AccessibleState describes a component's particular state.
class | AccessibleStateSet Class AccessibleStateSet determines a component's state set.

Methods in javax.accessibility that return Object
Object[] | AccessibleRelation.getTarget() Returns the target objects for this relation
abstract Object | AccessibleHyperlink.getAccessibleActionObject(int i) Returns an object that represents the link action, as appropriate for that link.
abstract Object | AccessibleHyperlink.getAccessibleActionAnchor(int i) Returns an object that represents the link anchor, as appropriate for that link.
Object[][] | AccessibleResourceBundle.getContents() Deprecated. Returns the mapping between the programmatic keys and the localized display strings.

Methods in javax.accessibility with parameters of type Object
void | AccessibleContext.firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
void | AccessibleRelation.setTarget(Object target) Sets the target object for this relation
void | AccessibleRelation.setTarget(Object[] target) Sets the target objects for this relation

Constructors in javax.accessibility with parameters of type Object
AccessibleRelation(String key, Object target)
Creates a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String key, Object[] target)
Creates a new AccessibleRelation using the given locale independent key.

Uses of Object in javax.naming

Subclasses of Object in javax.naming
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | BinaryRefAddr This class represents the binary form of the address of a communications end-point.
class | CannotProceedException This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
class | CommunicationException This exception is thrown when the client is unable to communicate with the directory or naming service.
class | CompositeName This class represents a composite name -- a sequence of component names spanning multiple namespaces.
class | CompoundName This class represents a compound name -- a name from a hierarchical name space.
class | ConfigurationException This exception is thrown when there is a configuration problem.
class | ContextNotEmptyException This exception is thrown when attempting to destroy a context that is not empty.
class | InitialContext This class is the starting context for performing naming operations.
class | InsufficientResourcesException This exception is thrown when resources are not available to complete the requested operation.
class | InterruptedNamingException This exception is thrown when the naming operation being invoked has been interrupted.
class | InvalidNameException This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
class | LimitExceededException This exception is thrown when a method terminates abnormally due to a user or system specified limit.
class | LinkException This exception is used to describe problems encounter while resolving links.
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | LinkRef This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.
class | NameAlreadyBoundException This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
class | NameClassPair This class represents the object name and class name pair of a binding found in a context.
class | NameNotFoundException This exception is thrown when a component of the name cannot be resolved because it is not bound.
class | NamingException This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
class | NamingSecurityException This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
class | NoInitialContextException This exception is thrown when no initial context implementation can be created.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.
class | NotContextException This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
class | OperationNotSupportedException This exception is thrown when a context implementation does not support the operation being invoked.
class | PartialResultException This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
class | RefAddr This class represents the address of a communications end-point.
class | ReferralException This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
class | ServiceUnavailableException This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | StringRefAddr This class represents the string form of the address of a communications end-point.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Fields in javax.naming declared as Object
protected Object | NamingException.resolvedObj Contains the object to which resolution of the part of the name was successful.
protected Object | LinkException.linkResolvedObj Contains the object to which resolution of the part of the link was successful.

Methods in javax.naming that return Object
Object | Reference.remove(int posn) Deletes the address at index posn from the list of addresses.
Object | Reference.clone() Makes a copy of this reference using its class name list of addresses, class factory name and class factory location.
Object | NamingException.getResolvedObj() Retrieves the object to which resolution was successful.
abstract Object | RefAddr.getContent() Retrieves the contents of this address.
Object | LinkException.getLinkResolvedObj() Retrieves the object to which resolution was successful.
Object | Name.clone() Generates a new copy of this name.
Object | Name.remove(int posn) Removes a component from this name.
Object | BinaryRefAddr.getContent() Retrieves the contents of this address as an Object.
Object | Binding.getObject() Retrieves the object bound to the name of this binding.
Object | CompoundName.clone() Creates a copy of this compound name.
Object | CompoundName.remove(int posn) Deletes a component from this compound name.
Object | InitialContext.lookup(String name)
Object | InitialContext.lookup(Name name)
Object | InitialContext.lookupLink(String name)
Object | InitialContext.lookupLink(Name name)
Object | InitialContext.addToEnvironment(String propName, Object propVal)
Object | InitialContext.removeFromEnvironment(String propName)
Object | NamingEnumeration.next() Retrieves the next element in the enumeration.
Object | StringRefAddr.getContent() Retrieves the contents of this address.
Object | CompositeName.clone() Generates a copy of this composite name.
Object | CompositeName.remove(int posn) Deletes a component from this composite name.
abstract Object | ReferralException.getReferralInfo() Retrieves information (such as URLs) related to this referral.
Object | Context.lookup(Name name) Retrieves the named object.
Object | Context.lookup(String name) Retrieves the named object.
Object | Context.lookupLink(Name name) Retrieves the named object, following links except for the terminal atomic component of the name.
Object | Context.lookupLink(String name) Retrieves the named object, following links except for the terminal atomic component of the name.
Object | Context.addToEnvironment(String propName, Object propVal) Adds a new environment property to the environment of this context.
Object | Context.removeFromEnvironment(String propName) Removes an environment property from the environment of this context.

Methods in javax.naming with parameters of type Object
boolean | Reference.equals(Object obj) Determines whether obj is a reference with the same addresses (in same order) as this reference.
void | NamingException.setResolvedObj(Object obj) Sets the resolved object field of this exception.
boolean | RefAddr.equals(Object obj) Determines whether obj is equal to this RefAddr.
void | LinkException.setLinkResolvedObj(Object obj) Sets the link resolved object field of this exception.
int | Name.compareTo(Object obj) Compares this name with another name for order.
boolean | BinaryRefAddr.equals(Object obj) Determines whether obj is equal to this address.
void | Binding.setObject(Object obj) Sets the object associated with this binding.
boolean | CompoundName.equals(Object obj) Determines whether obj is syntactically equal to this compound name.
int | CompoundName.compareTo(Object obj) Compares this CompoundName with the specified Object for order.
void | InitialContext.bind(String name, Object obj)
void | InitialContext.bind(Name name, Object obj)
void | InitialContext.rebind(String name, Object obj)
void | InitialContext.rebind(Name name, Object obj)
Object | InitialContext.addToEnvironment(String propName, Object propVal)
boolean | CompositeName.equals(Object obj) Determines whether two composite names are equal.
int | CompositeName.compareTo(Object obj) Compares this CompositeName with the specified Object for order.
void | Context.bind(Name name, Object obj) Binds a name to an object.
void | Context.bind(String name, Object obj) Binds a name to an object.
void | Context.rebind(Name name, Object obj) Binds a name to an object, overwriting any existing binding.
void | Context.rebind(String name, Object obj) Binds a name to an object, overwriting any existing binding.
Object | Context.addToEnvironment(String propName, Object propVal) Adds a new environment property to the environment of this context.

Constructors in javax.naming with parameters of type Object
Binding(String name, Object obj)
Constructs an instance of a Binding given its name and object.
Binding(String name, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, object, and whether the name is relative.
Binding(String name, String className, Object obj)
Constructs an instance of a Binding given its name, class name, and object.
Binding(String name, String className, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.

Uses of Object in javax.naming.directory

Subclasses of Object in javax.naming.directory
class | AttributeInUseException This exception is thrown when an operation attempts to add an attribute that already exists.
class | AttributeModificationException This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
class | BasicAttribute This class provides a basic implementation of the Attribute interface.
class | BasicAttributes This class provides a basic implementation of the Attributes interface.
class | InitialDirContext This class is the starting context for performing directory operations.
class | InvalidAttributeIdentifierException This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
class | InvalidAttributesException This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
class | InvalidAttributeValueException This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
class | InvalidSearchControlsException This exception is thrown when the specification of the SearchControls for a search operation is invalid.
class | InvalidSearchFilterException This exception is thrown when the specification of a search filter is invalid.
class | ModificationItem This class represents a modification item.
class | NoSuchAttributeException This exception is thrown when attempting to access an attribute that does not exist.
class | SchemaViolationException This exception is thrown when a method in some ways violates the schema.
class | SearchControls This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
class | SearchResult This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

Methods in javax.naming.directory that return Object
Object | BasicAttribute.clone()
Object | BasicAttribute.get() Retrieves one of this attribute's values.
Object | BasicAttribute.get(int ix)
Object | BasicAttribute.remove(int ix)
Object | BasicAttribute.set(int ix, Object attrVal)
Object | Attributes.clone() Makes a copy of the attribute set.
Object | Attribute.get() Retrieves one of this attribute's values.
Object | Attribute.clone() Makes a copy of the attribute.
Object | Attribute.get(int ix) Retrieves the attribute value from the ordered list of attribute values.
Object | Attribute.remove(int ix) Removes an attribute value from the ordered list of attribute values.
Object | Attribute.set(int ix, Object attrVal) Sets an attribute value in the ordered list of attribute values.
Object | BasicAttributes.clone()

Methods in javax.naming.directory with parameters of type Object
void | DirContext.bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
void | DirContext.rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
boolean | BasicAttribute.equals(Object obj) Determines whether obj is equal to this attribute.
boolean | BasicAttribute.contains(Object attrVal) Determines whether a value is in this attribute.
boolean | BasicAttribute.add(Object attrVal) Adds a new value to this attribute.
boolean | BasicAttribute.remove(Object attrval) Removes a specified value from this attribute.
void | BasicAttribute.add(int ix, Object attrVal)
Object | BasicAttribute.set(int ix, Object attrVal)
Attribute | Attributes.put(String attrID, Object val) Adds a new attribute to the attribute set.
boolean | Attribute.contains(Object attrVal) Determines whether a value is in the attribute.
boolean | Attribute.add(Object attrVal) Adds a new value to the attribute.
boolean | Attribute.remove(Object attrval) Removes a specified value from the attribute.
void | Attribute.add(int ix, Object attrVal) Adds an attribute value to the ordered list of attribute values.
Object | Attribute.set(int ix, Object attrVal) Sets an attribute value in the ordered list of attribute values.
Attribute | BasicAttributes.put(String attrID, Object val)
boolean | BasicAttributes.equals(Object obj) Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes.
void | InitialDirContext.bind(String name, Object obj, Attributes attrs)
void | InitialDirContext.bind(Name name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(String name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(Name name, Object obj, Attributes attrs)
NamingEnumeration | InitialDirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Constructors in javax.naming.directory with parameters of type Object
BasicAttribute(String id, Object value)
Constructs a new instance of an unordered attribute with a single value.
BasicAttribute(String id, Object value, boolean ordered)
Constructs a new instance of a possibly ordered attribute with a single value.
SearchResult(String name, Object obj, Attributes attrs)
Constructs a search result using the result's name, its bound object, and its attributes.
SearchResult(String name, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
SearchResult(String name, String className, Object obj, Attributes attrs)
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
SearchResult(String name, String className, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
BasicAttributes(String attrID, Object val)
Constructs a new instance of Attributes with one attribute.
BasicAttributes(String attrID, Object val, boolean ignoreCase)
Constructs a new instance of Attributes with one attribute.

Uses of Object in javax.naming.event

Subclasses of Object in javax.naming.event
class | NamingEvent This class represents an event fired by a naming/directory service.
class | NamingExceptionEvent This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.

Fields in javax.naming.event declared as Object
protected  Object NamingEvent.changeInfo
Contains information about the change that generated this event.

Methods in javax.naming.event that return Object
 Object NamingEvent.getChangeInfo()
Retrieves the change information for this event.

Methods in javax.naming.event with parameters of type Object
void | EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | EventDirContext.addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.

Constructors in javax.naming.event with parameters of type Object
NamingEvent(EventContext source, int type, Binding newBd, Binding oldBd, Object changeInfo)
Constructs an instance of NamingEvent.

Uses of Object in javax.naming.ldap

Subclasses of Object in javax.naming.ldap
class | ControlFactory This abstract class represents a factory for creating LDAPv3 controls.
class | InitialLdapContext This class is the starting context for performing LDAPv3-style extended operations and controls.
class | LdapReferralException This abstract class is used to represent an LDAP referral exception.
class | UnsolicitedNotificationEvent This class represents an event fired in response to an unsolicited notification sent by the LDAP server.

Constructors in javax.naming.ldap with parameters of type Object
UnsolicitedNotificationEvent(Object src, UnsolicitedNotification notice)
Constructs a new instance of UnsolicitedNotificationEvent.

Uses of Object in javax.naming.spi

Subclasses of Object in javax.naming.spi
class | DirectoryManager This class contains methods for supporting DirContext implementations.
static class | DirStateFactory.Result An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
class | NamingManager This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.
class | ResolveResult This class represents the result of resolution of a name.

Fields in javax.naming.spi declared as Object
protected  Object ResolveResult.resolvedObj
Field containing the Object that was resolved to successfully.

Methods in javax.naming.spi that return Object
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
Object | ResolveResult.getResolvedObj() Retrieves the Object to which resolution was successful.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
Object | DirStateFactory.Result.getObject() Retrieves the object to be bound.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Methods in javax.naming.spi with parameters of type Object
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
void | ResolveResult.setResolvedObj(Object obj) Sets the resolved Object field of this result to obj.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
ObjectFactory | ObjectFactoryBuilder.createObjectFactory(Object obj, Hashtable environment) Creates a new object factory using the environment supplied.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Constructors in javax.naming.spi with parameters of type Object
ResolveResult(Object robj, String rcomp)
Constructs a new instance of ResolveResult consisting of the resolved object and the remaining unresolved component.
ResolveResult(Object robj, Name rname)
Constructs a new instance of ResolveResult consisting of the resolved Object and the remaining name.
DirStateFactory.Result(Object obj, Attributes outAttrs)
Constructs an instance of Result.

Uses of Object in javax.rmi

Subclasses of Object in javax.rmi
 class PortableRemoteObject
Server implementation objects may either inherit from javax.rmi.PortableRemoteObject or they may implement a remote interface and then use the exportObject method to register themselves as a server object.

Methods in javax.rmi that return Object
static Object PortableRemoteObject.narrow(Object narrowFrom, Class narrowTo)
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.

Methods in javax.rmi with parameters of type Object
static Object PortableRemoteObject.narrow(Object narrowFrom, Class narrowTo)
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.

Uses of Object in javax.rmi.CORBA

Subclasses of Object in javax.rmi.CORBA
class | ClassDesc This class is used to marshal java.lang.Class objects over IIOP.
class | Stub Base class from which all RMI-IIOP stubs must inherit.
class | Util Provides utility methods that can be used by stubs and ties to perform common operations.

Methods in javax.rmi.CORBA that return Object
static Object Util.readAny(InputStream in)
Reads a java.lang.Object as a CORBA any.
static Object[] Util.copyObjects(Object[] obj, ORB orb)
Copies or connects an array of objects.
static Object Util.copyObject(Object obj, ORB orb)
Copies or connects an object.
 Object PortableRemoteObjectDelegate.narrow(Object narrowFrom, Class narrowTo)
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).
 Object UtilDelegate.readAny(InputStream in)
Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).
 Object UtilDelegate.copyObject(Object obj, ORB orb)
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
 Object[] UtilDelegate.copyObjects(Object[] obj, ORB orb)
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).

Methods in javax.rmi.CORBA with parameters of type Object
static void Util.writeAny(OutputStream out, Object obj)
Writes any java.lang.Object as a CORBA any.
static void Util.writeRemoteObject(OutputStream out, Object obj)
Writes a java.lang.Object as a CORBA Object.
static void Util.writeAbstractObject(OutputStream out, Object obj)
Writes a java.lang.Object as either a value or a CORBA Object.
static Object[] Util.copyObjects(Object[] obj, ORB orb)
Copies or connects an array of objects.
static Object Util.copyObject(Object obj, ORB orb)
Copies or connects an object.
 boolean Stub.equals(Object obj)
Compares two stubs for equality.
 Object PortableRemoteObjectDelegate.narrow(Object narrowFrom, Class narrowTo)
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).
 boolean StubDelegate.equals(Stub self, Object obj)
Delegation call for Stub.equals(java.lang.Object).
 void UtilDelegate.writeAny(OutputStream out, Object obj)
Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void UtilDelegate.writeRemoteObject(OutputStream out, Object obj)
Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void UtilDelegate.writeAbstractObject(OutputStream out, Object obj)
Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 Object UtilDelegate.copyObject(Object obj, ORB orb)
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
 Object[] UtilDelegate.copyObjects(Object[] obj, ORB orb)
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).

Uses of Object in javax.sound.midi

Subclasses of Object in javax.sound.midi
class | Instrument An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect.
class | InvalidMidiDataException An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
class | MetaMessage A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
static class | MidiDevice.Info A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
class | MidiEvent MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a Sequence object.
class | MidiFileFormat A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.
class | MidiMessage MidiMessage is the base class for MIDI messages.
class | MidiSystem The MidiSystem class provides access to the installed MIDI system resources, including devices such as synthesizers, sequencers, and MIDI input and output ports.
class | MidiUnavailableException A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.
class | Patch A Patch object represents a location, on a MIDI synthesizer, into which a single instrument is stored (loaded).
class | Sequence A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object.
static class | Sequencer.SyncMode A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device.
class | ShortMessage A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
class | SoundbankResource A SoundbankResource represents any audio resource stored in a Soundbank.
class | SysexMessage A SysexMessage object represents a MIDI system exclusive message.
class | Track A MIDI track is an independent stream of MIDI events (time-stamped MIDI data) that can be stored along with other tracks in a standard MIDI file.
class | VoiceStatus A VoiceStatus object contains information about the current status of one of the voices produced by a Synthesizer.

Methods in javax.sound.midi that return Object
abstract Object | MidiMessage.clone() Creates a new object of the same class and with the same contents as this object.
Object | SysexMessage.clone() Creates a new object of the same class and with the same contents as this object.
Object | MetaMessage.clone() Creates a new object of the same class and with the same contents as this object.
abstract Object | SoundbankResource.getData() Obtains the sampled audio that is stored in this SoundbankResource.
Object | ShortMessage.clone() Creates a new object of the same class and with the same contents as this object.

Methods in javax.sound.midi with parameters of type Object
boolean | MidiDevice.Info.equals(Object obj) Reports whether two objects are equal.
boolean | Sequencer.SyncMode.equals(Object obj) Determines whether two objects are equal.

Uses of Object in javax.sound.midi.spi

Subclasses of Object in javax.sound.midi.spi
class | MidiDeviceProvider A MidiDeviceProvider is a factory or provider for a particular type of MIDI device.
class | MidiFileReader A MidiFileReader supplies MIDI file-reading services.
class | MidiFileWriter A MidiFileWriter supplies MIDI file-writing services.
class | SoundbankReader A SoundbankReader supplies soundbank file-reading services.

Uses of Object in javax.sound.sampled

Subclasses of Object in javax.sound.sampled
class | AudioFileFormat An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.
static class | AudioFileFormat.Type An instance of the Type class represents one of the standard types of audio file.
class | AudioFormat AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
static class | AudioFormat.Encoding The Encoding class names the specific type of data representation used for an audio stream.
class | AudioInputStream An audio input stream is an input stream with a specified audio format and length.
class | AudioPermission The AudioPermission class represents access rights to the audio system resources.
class | AudioSystem The AudioSystem class acts as the entry point to the sampled-audio system resources.
class | BooleanControl A BooleanControl provides the ability to switch between two possible settings that affect a line's audio.
static class | BooleanControl.Type An instance of the BooleanControl.Type class identifies one kind of boolean control.
class | CompoundControl A CompoundControl, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as a Control.
static class | CompoundControl.Type An instance of the CompoundControl.Type inner class identifies one kind of compound control.
class | Control Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line.
static class | Control.Type An instance of the Type class represents the type of the control.
static class | DataLine.Info Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines.
class | EnumControl A EnumControl provides control over a set of discrete possible values, each represented by an object.
static class | EnumControl.Type An instance of the EnumControl.Type inner class identifies one kind of enumerated control.
class | FloatControl A FloatControl object provides control over a range of floating-point values.
static class | FloatControl.Type An instance of the FloatControl.Type inner class identifies one kind of float control.
static class | Line.Info A Line.Info object contains information about a line.
class | LineEvent The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.
static class | LineEvent.Type The LineEvent.Type inner class identifies what kind of event occurred on a line.
class | LineUnavailableException A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
static class | Mixer.Info The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
static class | Port.Info The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.
class | ReverbType The ReverbType class provides methods for accessing various reverberation settings to be applied to an audio signal.
class | UnsupportedAudioFileException An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Methods in javax.sound.sampled that return Object
Object | EnumControl.getValue() Obtains this control's current value.
Object[] | EnumControl.getValues() Returns the set of possible values for this control.

Methods in javax.sound.sampled with parameters of type Object
boolean | Control.Type.equals(Object obj) Finalizes the equals method
boolean | Mixer.Info.equals(Object obj) Indicates whether two info objects are equal, returning true if they are identical.
boolean | AudioFileFormat.Type.equals(Object obj) Finalizes the equals method
void | EnumControl.setValue(Object value) Sets the current value for the control.
boolean | LineEvent.Type.equals(Object obj) Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
boolean | AudioFormat.Encoding.equals(Object obj) Finalizes the equals method
boolean | ReverbType.equals(Object obj) Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
boolean | Port.Info.equals(Object obj) Finalizes the equals method

Constructors in javax.sound.sampled with parameters of type Object
EnumControl(EnumControl.Type type, Object[] values, Object value)
Constructs a new enumerated control object with the given parameters.

Uses of Object in javax.sound.sampled.spi

Subclasses of Object in javax.sound.sampled.spi
class | AudioFileReader Provider for audio file reading services.
class | AudioFileWriter Provider for audio file writing services.
class | FormatConversionProvider A format conversion provider provides format conversion services from one or more input formats to one or more output formats.
class | MixerProvider A provider or factory for a particular mixer type.

Uses of Object in javax.swing

Subclasses of Object in javax.swing
class | AbstractAction This class provides default implementations for the JFC Action interface.
class | AbstractButton Defines common behaviors for buttons and menu items.
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | AbstractButton.ButtonChangeListener Extends ChangeListener to be serializable.
class | AbstractCellEditor
class | AbstractListModel The Abstract definition for the data model the provides a List with its contents.
class | ActionMap ActionMap provides mappings from Objects (called keys or Action names) to Actions.
class | BorderFactory Factory class for vending standard Border objects.
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
protected class | Box.Filler.AccessibleBoxFiller This class implements accessibility support for the Box.Filler class.
class | BoxLayout A layout manager that allows multiple components to be layed out either vertically or horizontally.
class | ButtonGroup This class is used to create a multiple-exclusion scope for a set of buttons.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
class | ComponentInputMap A ComponentInputMap is an InputMap associated with a particular JComponent.
class | DebugGraphics Graphics subclass supporting graphics debugging.
class | DefaultBoundedRangeModel A generic implementation of BoundedRangeModel.
class | DefaultButtonModel The default implementation of a Button component's data model.
class | DefaultCellEditor The default editor for table and tree cells.
protected class | DefaultCellEditor.EditorDelegate
class | DefaultComboBoxModel The default model for combo boxes.
class | DefaultDesktopManager This is an implementaion of the DesktopManager.
class | DefaultFocusManager Default swing focus manager implementation.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | DefaultListModel This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.
class | DefaultListSelectionModel Default data model for list selections.
class | DefaultSingleSelectionModel A generic implementation of SingleSelectionModel.
class | FocusManager Swing Focus Manager
class | GrayFilter An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.
class | ImageIcon An implementation of the Icon interface that paints Icons from Images.
protected class | ImageIcon.AccessibleImageIcon This class implements accessibility support for the ImageIcon class.
class | InputMap InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
class | InputVerifier The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
class | JButton An implementation of a "push" button.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
class | JComboBox A component that combines a button or text field and a drop-down list.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent The base class for all Swing components except top-level containers.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
protected class | JComponent.AccessibleJComponent.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.
protected class | JComponent.AccessibleJComponent.AccessibleFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
class | JDialog The main class for creating a dialog window.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
class | JEditorPane A text component to edit various kinds of content.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
class | JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
class | JLabel A display area for a short text string or an image, or both.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
class | JList A component that allows the user to select one or more objects from a list.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JList.AccessibleJList.AccessibleJListChild This class implements accessibility support appropriate for list children.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenu.WinListener A listener class that watches for a popup window closing.
class | JMenuBar An implementation of a menu bar.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
class | JMenuItem An implementation of an item in a menu.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
class | JPanel JPanel is a generic lightweight container.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JRootPane.RootLayout A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
class | JScrollBar An implementation of a scrollbar.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTabbedPane.ModelListener We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTable.AccessibleJTable.AccessibleJTableCell The class provides an implementation of the Java Accessibility API appropriate to table cells.
protected class | JTable.AccessibleJTable.AccessibleJTableModelChange
class | JTextArea A TextArea is a multi-line area that displays plain text.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
static class | JToggleButton.ToggleButtonModel The ToggleButton model
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
class | JTree A control that displays a set of hierarchical data as an outline.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.
static class | JTree.DynamicUtilTreeNode DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
protected static class | JTree.EmptySelectionModel EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
protected class | JTree.TreeModelHandler Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.
protected class | JTree.TreeSelectionRedirector Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JViewport.ViewListener A listener for the view.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.
class | KeyStroke A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
class | LookAndFeel Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
class | MenuSelectionManager A MenuSelectionManager owns the selection in menu hierarchy.
class | OverlayLayout A layout manager to arrange components over the top of each other.
class | ProgressMonitor A class to monitor the progress of some operation.
class | ProgressMonitorInputStream Monitors the progress of reading from some InputStream.
class | RepaintManager This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.
class | ScrollPaneLayout The layout manager used by JScrollPane.
static class | ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.
class | SizeRequirements For the convenience of layout managers, calculates information about the size and position of components.
class | SizeSequence A SizeSequence object efficiently maintains an ordered list of sizes and corresponding positions.
class | SwingUtilities A collection of utility methods for Swing.
class | ToolTipManager Manages all the ToolTips in the system.
protected class | ToolTipManager.insideTimerAction
protected class | ToolTipManager.outsideTimerAction
protected class | ToolTipManager.stillInsideTimerAction
class | UIDefaults A table of defaults for Swing components.
static class | UIDefaults.LazyInputMap LazyInputMap will create a InputMap in its createValue method.
static class | UIDefaults.ProxyLazyValue This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
class | UIManager This class keeps track of the current look and feel and its defaults.
static class | UIManager.LookAndFeelInfo Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
class | UnsupportedLookAndFeelException An exception that indicates the request look & feel management classes are not present on the user's system.
class | ViewportLayout The default layout manager for JViewport.

Fields in javax.swing declared as Object
static Object | JOptionPane.UNINITIALIZED_VALUE Indicates that the user has not yet selected a value.
protected Object | JOptionPane.message Message to display.
protected Object[] | JOptionPane.options Options to display to the user.
protected Object | JOptionPane.initialValue Value that should be initialy selected in options.
protected Object | JOptionPane.value Currently selected value, will be a valid option, or UNINITIALIZED_VALUE or null.
protected Object[] | JOptionPane.selectionValues Array of values the user can choose from.
protected Object | JOptionPane.inputValue Value the user has input.
protected Object | JOptionPane.initialSelectionValue Initial value to select in selectionValues.
protected Object | DefaultCellEditor.EditorDelegate.value
protected Object | JComboBox.selectedItemReminder
protected Object | JTree.DynamicUtilTreeNode.childValue Value to create children with.

Methods in javax.swing that return Object
Object | JComponent.getClientProperty(Object key) Returns the value of the property with the specified key.
Object | CellEditor.getCellEditorValue() Returns the value contained in the editor
Object[] | AbstractButton.getSelectedObjects() Returns an array (length 1) containing the label or null if the button is not selected.
Object[] | JCheckBoxMenuItem.getSelectedObjects() Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.
Object | ListModel.getElementAt(int index) Returns the value at the specified index.
Object | Action.getValue(String key) Gets one of this object's properties using the associated key.
static Object | JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static Object | JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
Object | JOptionPane.getMessage() Returns the message-object this pane displays.
Object | JOptionPane.getValue() Returns the value the user has selected.
Object[] | JOptionPane.getOptions() Returns the choices the user can make.
Object | JOptionPane.getInitialValue() Returns the initial value.
Object[] | JOptionPane.getSelectionValues() Returns the selection values.
Object | JOptionPane.getInitialSelectionValue() Returns the initial-selection value.
Object | JOptionPane.getInputValue() Returns the value the user has input, if wantsInput is true.
Object | InputMap.get(KeyStroke keyStroke) Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.
Object | DefaultComboBoxModel.getSelectedItem()
Object | DefaultComboBoxModel.getElementAt(int index)
static Object | LookAndFeel.makeIcon(Class baseClass, String gifFile) Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.
Object | DefaultCellEditor.getCellEditorValue()
Object | DefaultCellEditor.EditorDelegate.getCellEditorValue()
Object | DefaultListSelectionModel.clone() Returns a clone of this selection model with the same selection.
Object | JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionObject(int i) Returns a URL object that represents the link.
Object | JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionAnchor(int i) Return an object that represents the link anchor, as appropriate for that link.
Object | JComboBox.getSelectedItem() Returns the currently selected item.
Object[] | JComboBox.getSelectedObjects() Returns an array containing the selected item.
Object | JComboBox.getItemAt(int index) Returns the list item at the specified index.
Object | JList.getPrototypeCellValue() Returns the cell width of the "prototypical cell" -- a cell used for the calculation of cell widths, because it has the same value as all other list items.
Object[] | JList.getSelectedValues() Returns an array of the values for the selected cells.
Object | JList.getSelectedValue() Returns the first selected value, or null if the selection is empty.
Object[] | ActionMap.keys() Returns the Action names that are bound in this ActionMap.
Object[] | ActionMap.allKeys() Returns an array of the keys defined in this ActionMap and its parent.
Object | UIDefaults.get(Object key) Returns the value for key.
Object | UIDefaults.put(Object key, Object value) Sets the value of key to value.
Object | UIDefaults.LazyValue.createValue(UIDefaults table) Creates the actual value retrieved from the UIDefaults table.
Object | UIDefaults.ActiveValue.createValue(UIDefaults table) Creates the value retrieved from the UIDefaults table.
Object | UIDefaults.ProxyLazyValue.createValue(UIDefaults table) Creates the value retrieved from the UIDefaults table.
Object | UIDefaults.LazyInputMap.createValue(UIDefaults table) Creates an InputMap with the bindings that are passed in.
Object[] | DefaultButtonModel.getSelectedObjects() Overriden to return null
Object | ComboBoxModel.getSelectedItem() Return the selected item
Object | JTree.getLastSelectedPathComponent() Returns the last path component in the first node of the current selection.
Object | AbstractAction.getValue(String key) Gets the Object associated with the specified key.
Object[] | AbstractAction.getKeys() Returns an array of Objects which are keys for which values have been set for this AbstractAction, or null if no keys have values set.
protected Object | AbstractAction.clone() Clones the abstract action.
Object | ComboBoxEditor.getItem() Return the edited item
Object | JTable.getValueAt(int row, int column) Returns the cell value at row and column.
Object | DefaultListModel.getElementAt(int index) Returns the component at the specified index.
Object | DefaultListModel.elementAt(int index) Returns the component at the specified index.
Object | DefaultListModel.firstElement() Returns the first component of this list.
Object | DefaultListModel.lastElement() Returns the last component of the list.
Object[] | DefaultListModel.toArray() Returns an array containing all of the elements in this list in the correct order.
Object | DefaultListModel.get(int index) Returns the element at the specified position in this list.
Object | DefaultListModel.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
Object | DefaultListModel.remove(int index) Removes the element at the specified position in this list.
static Object | UIManager.get(Object key) Returns an object from the defaults table.
static Object | UIManager.put(Object key, Object value) Stores an object in the defaults table.

Methods in javax.swing with parameters of type Object
Object | JComponent.getClientProperty(Object key) Returns the value of the property with the specified key.
void | JComponent.putClientProperty(Object key, Object value) Adds an arbitrary key/value "client property" to this component.
protected void | JComponent.firePropertyChange(String propertyName, Object oldValue, Object newValue) Supports reporting bound property changes.
protected void | JComponent.fireVetoableChange(String propertyName, Object oldValue, Object newValue) Supports reporting constrained property changes.
void | JEditorPane.read(InputStream in, Object desc) This method initializes from a stream.
protected void | JViewport.addImpl(Component child, Object constraints, int index) Sets the JViewports one lightweight child, which can be null.
protected void | JViewport.firePropertyChange(String propertyName, Object oldValue, Object newValue) Notifies listeners of a property change.
void | JTabbedPane.add(Component component, Object constraints) Adds a component to the tabbed pane.
void | JTabbedPane.add(Component component, Object constraints, int index) Adds a component at the specified tab index.
boolean | KeyStroke.equals(Object anObject) Returns true if this object is identical to the specified object.
protected void | JLayeredPane.addImpl(Component comp, Object constraints, int index)
void | Action.putValue(String key, Object value) Sets one of this object's properties using the associated key.
static String | JOptionPane.showInputDialog(Object message) Shows a question-message dialog requesting input from the user.
static String | JOptionPane.showInputDialog(Component parentComponent, Object message) Shows a question-message dialog requesting input from the user parented to parentComponent.
static String | JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType) Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object | JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static void | JOptionPane.showMessageDialog(Component parentComponent, Object message) Brings up a modal information-message dialog titled "Message".
static void | JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType) Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
static void | JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) Brings up a dialog displaying a message, specifying all parameters.
static int | JOptionPane.showConfirmDialog(Component parentComponent, Object message) Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".
static int | JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType) Brings up a modal dialog where the number of choices is determined by the optionType parameter.
static int | JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) Brings up a modal dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int | JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static int | JOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static void | JOptionPane.showInternalMessageDialog(Component parentComponent, Object message) Brings up an internal confirmation dialog panel.
static void | JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType) Brings up an internal dialog panel that displays a message using a default icon determined by the messageType parameter.
static void | JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) Brings up an internal dialog panel displaying a message, specifying all parameters.
static int | JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message) Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, "Select an Option".
static int | JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType) Brings up a internal dialog panel where the number of choices is determined by the optionType parameter.
static int | JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) Brings up an internal dialog panel where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int | JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static int | JOptionPane.showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static String | JOptionPane.showInternalInputDialog(Component parentComponent, Object message) Shows an internal question-message dialog requesting input from the user parented to parentComponent.
static String | JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType) Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object | JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
void | JOptionPane.setMessage(Object newMessage) Sets the option pane's message-object.
void | JOptionPane.setValue(Object newValue) Sets the value the user has chosen.
void | JOptionPane.setOptions(Object[] newOptions) Sets the options this pane displays.
void | JOptionPane.setInitialValue(Object newInitialValue) Sets the initial value that is to be enabled -- the Component that has the focus when the pane is initially displayed.
void | JOptionPane.setSelectionValues(Object[] newValues) Sets the selection values for a pane that provides the user with a list of items to choose from.
void | JOptionPane.setInitialSelectionValue(Object newValue) Sets the initial selection value.
void | JOptionPane.setInputValue(Object newValue) Sets the user's input-value.
void | InputMap.put(KeyStroke keyStroke, Object actionMapKey) Adds a binding for keyStroke to actionMapKey.
void | ComponentInputMap.put(KeyStroke keyStroke, Object actionMapKey) Adds a binding for keyStroke to actionMapKey.
protected void | AbstractListModel.fireContentsChanged(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements of the list change.
protected void | AbstractListModel.fireIntervalAdded(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements are added to the model.
protected void | AbstractListModel.fireIntervalRemoved(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements are removed from the model.
void | DefaultComboBoxModel.setSelectedItem(Object anObject)
int | DefaultComboBoxModel.getIndexOf(Object anObject) Returns the index-position of the specified object in the list.
void | DefaultComboBoxModel.addElement(Object anObject)
void | DefaultComboBoxModel.insertElementAt(Object anObject, int index)
void | DefaultComboBoxModel.removeElement(Object anObject)
static JTextComponent.KeyBinding[] | LookAndFeel.makeKeyBindings(Object[] keyBindingList) Convenience method for building lists of KeyBindings.
static InputMap | LookAndFeel.makeInputMap(Object[] keys) Creates a InputMap from keys.
static ComponentInputMap | LookAndFeel.makeComponentInputMap(JComponent c, Object[] keys) Creates a ComponentInputMap from keys.
static void | LookAndFeel.loadKeyBindings(InputMap retMap, Object[] keys) Loads the bindings in keys into retMap.
Component | DefaultCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Component | DefaultCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
void | DefaultCellEditor.EditorDelegate.setValue(Object value)
protected void | JWindow.addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
protected void | JApplet.addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
static boolean | SwingUtilities.notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers) Invokes actionPerformed on action if action is enabled (and non null).
void | JComboBox.setSelectedItem(Object anObject) Sets the selected item in the JComboBox by specifying the object in the list.
void | JComboBox.addItem(Object anObject) Adds an item to the item list.
void | JComboBox.insertItemAt(Object anObject, int index) Inserts an item into the item list at a given index.
void | JComboBox.removeItem(Object anObject) Removes an item from the item list.
void | JComboBox.configureEditor(ComboBoxEditor anEditor, Object anItem) Initializes the editor with the specified item.
void | Renderer.setValue(Object aValue, boolean isSelected) Specifies the value to display and whether or not the value should be portrayed as "currently selected".
void | JList.setPrototypeCellValue(Object prototypeCellValue) Computes the fixedCellWidth and fixedCellHeight properties by configuring the cellRenderer to index equals zero for the specified value and then computing the renderer component's preferred size.
void | JList.setListData(Object[] listData) Constructs a ListModel from an array of objects and then applies setModel to it.
void | JList.setSelectedValue(Object anObject, boolean shouldScroll) Selects the specified object from the list.
void | ActionMap.put(Object key, Action action) Adds a binding for key to action.
Action | ActionMap.get(Object key) Returns the binding for key, messaging the parent ActionMap if the binding is not locally defined.
void | ActionMap.remove(Object key) Removes the binding for key from this ActionMap.
Object | UIDefaults.get(Object key) Returns the value for key.
Object | UIDefaults.put(Object key, Object value) Sets the value of key to value.
void | UIDefaults.putDefaults(Object[] keyValueList) Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent.
Font | UIDefaults.getFont(Object key) If the value of key is a Font return it, otherwise return null.
Color | UIDefaults.getColor(Object key) If the value of key is a Color return it, otherwise return null.
Icon | UIDefaults.getIcon(Object key) If the value of key is an Icon return it, otherwise return null.
Border | UIDefaults.getBorder(Object key) If the value of key is a Border return it, otherwise return null.
String | UIDefaults.getString(Object key) If the value of key is a String return it, otherwise return null.
int | UIDefaults.getInt(Object key) If the value of key is an Integer return its integer value, otherwise return 0.
Insets | UIDefaults.getInsets(Object key) If the value of key is an Insets return it, otherwise return null.
Dimension | UIDefaults.getDimension(Object key) If the value of key is a Dimension return it, otherwise return null.
protected void | UIDefaults.firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
void | BoxLayout.addLayoutComponent(Component comp, Object constraints) Not used by this class.
protected void | CellRendererPane.addImpl(Component x, Object constraints, int index) If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).<
protected void | JInternalFrame.addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
protected void | JFrame.addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to this component, they must be added to its contentPane instead.
protected void | JSplitPane.addImpl(Component comp, Object constraints, int index) Adds the specified component to this split pane.
void | ComboBoxModel.setSelectedItem(Object anItem) Set the selected item
protected static TreeModel | JTree.createTreeModel(Object value) Returns a TreeModel wrapping the specified object.
String | JTree.convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Called by the renderers to convert the specified value to text.
static void | JTree.DynamicUtilTreeNode.createChildren(DefaultMutableTreeNode parent, Object children) Adds to parent all the children in children.
void | AbstractAction.putValue(String key, Object newValue) Sets the Value associated with the specified key.
protected void | AbstractAction.firePropertyChange(String propertyName, Object oldValue, Object newValue) Supports reporting bound property changes.
void | ComboBoxEditor.setItem(Object anObject) Set the item that should be edited.
TableColumn | JTable.getColumn(Object identifier) Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
void | JTable.setValueAt(Object aValue, int row, int column) Sets the value for the cell in the table model at row and column.
Component | DefaultListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
protected void | DefaultListCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
void | DefaultListModel.copyInto(Object[] anArray) Copies the components of this list into the specified array.
boolean | DefaultListModel.contains(Object elem) Tests if the specified object is a component in this list.
int | DefaultListModel.indexOf(Object elem) Searches for the first occurence of the given argument.
int | DefaultListModel.indexOf(Object elem, int index) Searches for the first occurence of the given argument, beginning the search at index.
int | DefaultListModel.lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this list.
int | DefaultListModel.lastIndexOf(Object elem, int index) Searches backwards for the specified object, starting from the specified index, and returns an index to it.
void | DefaultListModel.setElementAt(Object obj, int index) Sets the component at the specified index of this list to be the specified object.
void | DefaultListModel.insertElementAt(Object obj, int index) Inserts the specified object as a component in this list at the specified index.
void | DefaultListModel.addElement(Object obj) Adds the specified component to the end of this list.
boolean | DefaultListModel.removeElement(Object obj) Removes the first (lowest-indexed) occurrence of the argument from this list.
Object | DefaultListModel.set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
void | DefaultListModel.add(int index, Object element) Inserts the specified element at the specified position in this list.
Component | ListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) Return a component that has been configured to display the specified value.
protected void | JToolBar.addImpl(Component comp, Object constraints, int index) If a JButton is being added, it is initially set to be disabled.
static Font | UIManager.getFont(Object key) Returns a drawing font from the defaults table.
static Color | UIManager.getColor(Object key) Returns a drawing color from the defaults table.
static Icon | UIManager.getIcon(Object key) Returns an Icon from the defaults table.
static Border | UIManager.getBorder(Object key) Returns a border from the defaults table.
static String | UIManager.getString(Object key) Returns a string from the defaults table.
static int | UIManager.getInt(Object key) Returns an int from the defaults table.
static Insets | UIManager.getInsets(Object key) Returns an Insets object from the defaults table.
static Dimension | UIManager.getDimension(Object key) Returns a dimension from the defaults table.
static Object | UIManager.get(Object key) Returns an object from the defaults table.
static Object | UIManager.put(Object key, Object value) Stores an object in the defaults table.
void | MutableComboBoxModel.addElement(Object obj) Adds an item to the end of the model.
void | MutableComboBoxModel.removeElement(Object obj) Removes an item from the model.
void | MutableComboBoxModel.insertElementAt(Object obj, int index) Adds an item at a specific index
void | OverlayLayout.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
protected void | JRootPane.addImpl(Component comp, Object constraints, int index) Overridden to enforce the position of the glass component as the zero child.
void | JRootPane.RootLayout.addLayoutComponent(Component comp, Object constraints)
protected void | JDialog.addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.

Constructors in javax.swing with parameters of type Object
JOptionPane(Object message)
Creates a instance of JOptionPane to display a message using the plain-message message type and the default options delivered by the UI.
JOptionPane(Object message, int messageType)
Creates an instance of JOptionPane to display a message with the specified message type and the default options,
JOptionPane(Object message, int messageType, int optionType)
Creates an instance of JOptionPane to display a message with the specified message type and options.
JOptionPane(Object message, int messageType, int optionType, Icon icon)
Creates an instance of JOptionPane to display a message with the specified message type, options, and icon.
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options)
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options.
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options, with the initially-selected option specified.
DefaultComboBoxModel(Object[] items)
Constructs a DefaultComboBoxModel object initialized with an array of objects.
JComboBox(Object[] items)
Creates a JComboBox that contains the elements in the specified array.
JList(Object[] listData)
Constructs a JList that displays the elements in the specified array.
UIDefaults(Object[] keyValueList)
Create a defaults table initialized with the specified key/value pairs.
UIDefaults.ProxyLazyValue(String c, Object[] o)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, String m, Object[] o)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.LazyInputMap(Object[] bindings)
JTree(Object[] value)
Returns a JTree with each element of the specified array as the child of a new root node which is not displayed.
JTree.DynamicUtilTreeNode(Object value, Object children)
Creates a node with the specified object as its value and with the specified children.
ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
JTable(Object[][] rowData, Object[] columnNames)
Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.
ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
Constructs an object to monitor the progress of an input stream.

Uses of Object in javax.swing.border

Subclasses of Object in javax.swing.border
class | AbstractBorder A class that implements an empty border with no size.
class | BevelBorder A class which implements a simple 2 line bevel border.
class | CompoundBorder A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
class | EmptyBorder A class which provides an empty, transparent border which takes up space but does no drawing.
class | EtchedBorder A class which implements a simple etched border which can either be etched-in or etched-out.
class | LineBorder A class which implements a line border of arbitrary thickness and of a single color.
class | MatteBorder A class which provides a matte-like border of either a solid color or a tiled icon.
class | SoftBevelBorder A class which implements a raised or lowered bevel with softened corners.
class | TitledBorder A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Uses of Object in javax.swing.colorchooser

Subclasses of Object in javax.swing.colorchooser
class | AbstractColorChooserPanel This is the abstract superclass for color choosers.
class | ColorChooserComponentFactory A class designed to produce preconfigured "accessory" objects to insert into color choosers.
class | DefaultColorSelectionModel A generic implementation of ColorSelectionModel.

Uses of Object in javax.swing.event

Subclasses of Object in javax.swing.event
class | AncestorEvent An event reported to a child component that originated from an ancestor in the component hierarchy.
class | CaretEvent CaretEvent is used to notify interested parties that the text caret has changed in the event source.
class | ChangeEvent ChangeEvent is used to notify interested parties that state has changed in the event source.
static class | DocumentEvent.EventType Enumeration for document event types
class | EventListenerList A class that holds a list of EventListeners.
class | HyperlinkEvent HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
static class | HyperlinkEvent.EventType Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
class | InternalFrameAdapter An abstract adapter class for receiving internal frame events.
class | InternalFrameEvent InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
class | ListDataEvent Defines an event that encapsulates changes to a list.
class | ListSelectionEvent An event that characterizes a change in the current selection.
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuEvent MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
class | MouseInputAdapter The adapter which receives mouse events and mouse motion events.
class | PopupMenuEvent PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
class | SwingPropertyChangeSupport This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
class | TableColumnModelEvent TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
class | TableModelEvent TableModelEvent is used to notify listeners that a table model has changed.
class | TreeExpansionEvent An event used to identify a single path in a tree.
class | TreeModelEvent Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
class | TreeSelectionEvent An event that characterizes a change in the current selection.
class | UndoableEditEvent An event indicating that an operation which can be undone has occurred.

Fields in javax.swing.event declared as Object
protected Object[] | EventListenerList.listenerList
protected Object[] | TreeModelEvent.children Children that have been removed.

Methods in javax.swing.event that return Object
Object | TreeSelectionEvent.cloneWithSource(Object newSource) Returns a copy of the receiver, but with the source being newSource.
Object[] | EventListenerList.getListenerList() Passes back the event listener list as an array of ListenerType-listener pairs.
Object[] | TreeModelEvent.getPath() Convenience method to get the array of objects from the TreePath instance that this event wraps.
Object[] | TreeModelEvent.getChildren() Returns the objects that are children of the node identified by getPath at the locations specified by getChildIndices.

Methods in javax.swing.event with parameters of type Object
Object | TreeSelectionEvent.cloneWithSource(Object newSource) Returns a copy of the receiver, but with the source being newSource.
void | SwingPropertyChangeSupport.firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.

Constructors in javax.swing.event with parameters of type Object
CaretEvent(Object source)
Creates a new CaretEvent object.
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u)
Creates a new object representing a hypertext link event.
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc)
Creates a new object representing a hypertext link event.
ChangeEvent(Object source)
Constructs a ChangeEvent object.
TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
UndoableEditEvent(Object source, UndoableEdit edit)
Constructs an UndoableEditEvent object.
SwingPropertyChangeSupport(Object sourceBean)
Constructs a SwingPropertyChangeSupport object.
PopupMenuEvent(Object source)
Constructs a PopupMenuEvent object.
MenuEvent(Object source)
Constructs a MenuEvent object.
ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
Represents a change in selection status between firstIndex and lastIndex inclusive (firstIndex is less than or equal to lastIndex).
ListDataEvent(Object source, int type, int index0, int index1)
Constructs a ListDataEvent object.
TreeExpansionEvent(Object source, TreePath path)
Constructs a TreeExpansionEvent object.
TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as an array of Objects.
TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
TreeModelEvent(Object source, Object[] path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of a modified subtree as an array of Objects.
TreeModelEvent(Object source, TreePath path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.

Uses of Object in javax.swing.filechooser

Subclasses of Object in javax.swing.filechooser
class | FileFilter FileFilter is an abstract class that has no default implemention.
class | FileSystemView FileSystemView is JFileChooser's gateway to the file system.
class | FileView FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Uses of Object in javax.swing.plaf

Subclasses of Object in javax.swing.plaf
class | ActionMapUIResource A subclass of javax.swing.ActionMap that implements UIResource.
class | BorderUIResource
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource
class | ButtonUI Pluggable look and feel interface for JButton.
class | ColorChooserUI Pluggable look and feel interface for JColorChooser.
class | ColorUIResource
class | ComboBoxUI Pluggable look and feel interface for JComboBox.
class | ComponentInputMapUIResource A subclass of javax.swing.ComponentInputMap that implements UIResource.
class | ComponentUI
class | DesktopIconUI Pluggable look and feel interface for JDesktopIcon.
class | DesktopPaneUI Pluggable look and feel interface for JDesktopPane.
class | DimensionUIResource
class | FileChooserUI Pluggable look and feel interface for JFileChooser
class | FontUIResource A subclass of java.awt.Font that implements UIResource.
class | IconUIResource
class | InputMapUIResource A subclass of javax.swing.InputMap that implements UIResource.
class | InsetsUIResource
class | InternalFrameUI Pluggable look and feel interface for JInternalFrame.
class | LabelUI Pluggable look and feel interface for JLabel.
class | ListUI The JList pluggable look and feel delegate.
class | MenuBarUI Pluggable look and feel interface for JMenuBar.
class | MenuItemUI Pluggable look and feel interface for JMenuItem.
class | OptionPaneUI Pluggable look and feel interface for JOptionPane.
class | PanelUI Pluggable look and feel interface for Panel.
class | PopupMenuUI Pluggable look and feel interface for JPopupMenu.
class | ProgressBarUI Pluggable look and feel interface for JProgressBar.
class | RootPaneUI Pluggable look and feel interface for JRootPane.
class | ScrollBarUI Pluggable look and feel interface for JScrollBar.
class | ScrollPaneUI Pluggable look and feel interface for JScrollPane.
class | SeparatorUI Pluggable look and feel interface for JSeparator.
class | SliderUI Pluggable look and feel interface for JSlider.
class | SplitPaneUI Pluggable look and feel interface for JSplitPane.
class | TabbedPaneUI Pluggable look and feel interface for JTabbedPane.
class | TableHeaderUI Pluggable look and feel interface for JTableHeader.
class | TableUI Pluggable look and feel interface for JTable.
class | TextUI Text editor user interface
class | ToolBarUI Pluggable look and feel interface for JToolBar.
class | ToolTipUI Pluggable look and feel interface for JToolTip.
class | TreeUI Pluggable look and feel interface for JTree.
class | ViewportUI Pluggable look and feel interface for JViewport.

Uses of Object in javax.swing.plaf.basic

Subclasses of Object in javax.swing.plaf.basic
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicBorders Factory object that can vend Borders appropriate for the basic L & F.
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.SplitPaneBorder Draws the border around the splitpane.
static class | BasicBorders.ToggleButtonBorder
class | BasicButtonListener Button Listener
class | BasicButtonUI BasicButton implementation
class | BasicCheckBoxMenuItemUI BasicCheckboxMenuItem implementation
class | BasicCheckBoxUI CheckboxUI implementation for BasicCheckboxUI
class | BasicColorChooserUI Provides the basic look and feel for a JColorChooser.
class | BasicColorChooserUI.PropertyHandler This inner class is marked "public" due to a compiler bug.
class | BasicComboBoxEditor The default editor for editable combo boxes
static class | BasicComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboBoxUI Basic UI for JComboBox.
class | BasicComboBoxUI.ComboBoxLayoutManager This layout manager handles the 'standard' layout of combo boxes.
class | BasicComboBoxUI.FocusHandler This listener hides the popup when the focus is lost.
class | BasicComboBoxUI.ItemHandler This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.
class | BasicComboBoxUI.KeyHandler This listener checks to see if the key event isn't a navigation key.
class | BasicComboBoxUI.ListDataHandler This listener watches for changes in the data and revalidates.
class | BasicComboBoxUI.PropertyChangeHandler This listener watches for bound properties that have changed in the JComboBox.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicComboPopup.InvocationKeyHandler This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
protected class | BasicComboPopup.InvocationMouseHandler This listener knows how and when to invoke this popup menu.
protected class | BasicComboPopup.InvocationMouseMotionHandler This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
protected class | BasicComboPopup.ItemHandler This listener watches for changes in the JComboBox's selection.
class | BasicComboPopup.ListDataHandler Keeps the selected index in the list in-sync with the combo box's selection.
protected class | BasicComboPopup.ListMouseHandler This listener hides the popup when the mouse is released in the list.
protected class | BasicComboPopup.ListMouseMotionHandler This listener changes the selected item as you move the mouse over the list.
protected class | BasicComboPopup.ListSelectionHandler This listener watches for changes in the list's selection and reports them to the combo box.
protected class | BasicComboPopup.PropertyChangeHandler This listener watches for bound property changes in JComboBox.
class | BasicDesktopIconUI Basic L&F for a minimized window on a desktop.
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
class | BasicDesktopPaneUI Basic L&F for a desktop.
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
class | BasicDirectoryModel Basic implementation of a file list.
class | BasicEditorPaneUI Provides the look and feel for a JEditorPane.
class | BasicFileChooserUI Basic L&F implementation of a FileChooser.
protected class | BasicFileChooserUI.AcceptAllFileFilter
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.BasicFileView
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.DoubleClickListener
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.SelectionListener
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicGraphicsUtils
class | BasicHTML Support for providing html views for the swing components.
class | BasicIconFactory Factory object that can vend Icons appropriate for the basic L & F.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.TitlePaneLayout This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameUI A basic L&F implementation of JInternalFrame.
protected class | BasicInternalFrameUI.BasicInternalFrameListener
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.ComponentHandler
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicInternalFrameUI.InternalFrameLayout
class | BasicInternalFrameUI.InternalFramePropertyChangeListener
class | BasicLabelUI A Windows L&F implementation of LabelUI.
class | BasicListUI A Windows L&F implementation of ListUI.
class | BasicListUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicListUI.ListDataHandler The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
class | BasicListUI.ListSelectionHandler The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
class | BasicListUI.PropertyChangeHandler The PropertyChangeListener that's added to the JList at installUI time.
class | BasicLookAndFeel Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.
class | BasicMenuBarUI A default L&F implementation of MenuBarUI.
class | BasicMenuItemUI BasicMenuItem implementation
protected class | BasicMenuItemUI.MouseInputHandler
class | BasicMenuUI A default L&F implementation of MenuUI.
class | BasicMenuUI.ChangeHandler
class | BasicOptionPaneUI Provides the basic look and feel for a JOptionPane.
class | BasicOptionPaneUI.ButtonActionListener This inner class is marked "public" due to a compiler bug.
static class | BasicOptionPaneUI.ButtonAreaLayout ButtonAreaLayout acts similiar to FlowLayout.
class | BasicOptionPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicPanelUI BasicPanel implementation
class | BasicPasswordFieldUI Provides the Windows look and feel for a password field.
class | BasicPopupMenuSeparatorUI A Basic L&F implementation of PopupMenuSeparatorUI.
class | BasicPopupMenuUI A Windows L&F implementation of PopupMenuUI.
class | BasicProgressBarUI A Basic L&F implementation of ProgressBarUI.
class | BasicProgressBarUI.ChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicRadioButtonMenuItemUI BasicRadioButtonMenuItem implementation
class | BasicRadioButtonUI RadioButtonUI implementation for BasicRadioButtonUI
class | BasicRootPaneUI Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
class | BasicScrollBarUI Implementation of ScrollBarUI for the Basic Look and Feel
protected class | BasicScrollBarUI.ArrowButtonListener Listener for cursor keys.
protected class | BasicScrollBarUI.ModelListener A listener to listen for model changes.
class | BasicScrollBarUI.PropertyChangeHandler
protected class | BasicScrollBarUI.ScrollListener Listener for scrolling events intiated in the ScrollPane.
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
class | BasicScrollPaneUI A default L&F implementation of ScrollPaneUI.
class | BasicScrollPaneUI.HSBChangeListener Horizontal scrollbar listener.
class | BasicScrollPaneUI.PropertyChangeHandler
class | BasicScrollPaneUI.ViewportChangeHandler Listener for viewport events.
class | BasicScrollPaneUI.VSBChangeListener Vertical scrollbar listener.
class | BasicSeparatorUI A Basic L&F implementation of SeparatorUI.
class | BasicSliderUI A Basic L&F implementation of SliderUI.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicSliderUI.ChangeHandler Data model listener.
class | BasicSliderUI.ComponentHandler Listener for resizing events.
class | BasicSliderUI.FocusHandler Focus-change listener.
class | BasicSliderUI.PropertyChangeHandler
class | BasicSliderUI.ScrollListener Scroll-event listener.
class | BasicSliderUI.TrackListener Track mouse movements.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicSplitPaneDivider.DividerLayout Used to layout a BasicSplitPaneDivider.
protected class | BasicSplitPaneDivider.DragController Handles the events during a dragging session for a HORIZONTAL_SPLIT orientated split pane.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
protected class | BasicSplitPaneDivider.VerticalDragController Handles the events during a dragging session for a VERTICAL_SPLIT orientated split pane.
class | BasicSplitPaneUI A Basic L&F implementation of the SplitPaneUI.
class | BasicSplitPaneUI.BasicHorizontalLayoutManager LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
class | BasicSplitPaneUI.BasicVerticalLayoutManager LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
class | BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses.
class | BasicSplitPaneUI.KeyboardDownRightHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardEndHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardHomeHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardResizeToggleHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardUpLeftHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.PropertyHandler Implementation of the PropertyChangeListener that the JSplitPane UI uses.
class | BasicTabbedPaneUI A Basic L&F implementation of TabbedPaneUI.
class | BasicTabbedPaneUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.MouseHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.TabbedPaneLayout This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.TabSelectionHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableHeaderUI BasicTableHeaderUI implementation
class | BasicTableHeaderUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI BasicTableUI implementation
class | BasicTableUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.KeyHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTextAreaUI Provides the look and feel for a plain text editor.
class | BasicTextFieldUI Basis of a look and feel for a JTextField.
class | BasicTextPaneUI Provides the look and feel for a styled text editor.
class | BasicTextUI Basis of a text components look-and-feel.
static class | BasicTextUI.BasicCaret
static class | BasicTextUI.BasicHighlighter
class | BasicToggleButtonUI BasicToggleButton implementation
class | BasicToolBarSeparatorUI A Basic L&F implementation of ToolBarSeparatorUI.
class | BasicToolBarUI A Basic L&F implementation of ToolBarUI.
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
protected class | BasicToolBarUI.DragWindow
protected class | BasicToolBarUI.FrameListener
protected class | BasicToolBarUI.PropertyListener
protected class | BasicToolBarUI.ToolBarContListener
protected class | BasicToolBarUI.ToolBarFocusListener
class | BasicToolTipUI Standard tool tip L&F.
class | BasicTreeUI The basic L&F for a hierarchical data structure.
class | BasicTreeUI.CellEditorHandler Listener responsible for getting cell editing events and updating the tree accordingly.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).
class | BasicTreeUI.FocusHandler Repaints the lead selection row when focus is lost/gained.
class | BasicTreeUI.KeyHandler This is used to get mutliple key down events to appropriately generate events.
class | BasicTreeUI.MouseHandler TreeMouseListener is responsible for updating the selection based on mouse events.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.
class | BasicTreeUI.NodeDimensionsHandler Class responsible for getting size of node, method is forwarded to BasicTreeUI method.
class | BasicTreeUI.PropertyChangeHandler PropertyChangeListener for the tree.
class | BasicTreeUI.SelectionModelPropertyChangeHandler Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeExpansionHandler Updates the TreeState in response to nodes expanding/collapsing.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreeModelHandler Forwards all TreeModel events to the TreeState.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeSelectionHandler Listens for changes in the selection model and updates the display accordingly.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.
class | BasicViewportUI BasicViewport implementation
class | DefaultMenuLayout The default layout manager for Popup menus and menubars.

Methods in javax.swing.plaf.basic that return Object
protected Object | BasicOptionPaneUI.getMessage() Returns the message to display from the JOptionPane the receiver is providing the look and feel for.
protected Object[] | BasicOptionPaneUI.getButtons() Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for.
Object | BasicDirectoryModel.getElementAt(int index)
Object | BasicComboBoxEditor.getItem()

Methods in javax.swing.plaf.basic with parameters of type Object
protected void | BasicOptionPaneUI.addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) Creates the appropriate object to represent msg and places it into container.
protected void | BasicOptionPaneUI.addButtonComponents(Container container, Object[] buttons, int initialIndex) Creates the appropriate object to represent each of the objects in buttons and adds it to container.
Component | BasicComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
boolean | BasicDirectoryModel.contains(Object o)
int | BasicDirectoryModel.indexOf(Object o)
Rectangle | BasicTreeUI.NodeDimensionsHandler.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) Responsible for getting the size of a particular node.
void | BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | BasicComboBoxEditor.setItem(Object anObject)

Uses of Object in javax.swing.plaf.metal

Subclasses of Object in javax.swing.plaf.metal
class | DefaultMetalTheme This class describes the default Metal Theme.
class | MetalBorders Factory object that can vend Borders appropriate for the metal L & F.
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TableHeaderBorder Border for a Table Header
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder
class | MetalButtonUI MetalButtonUI implementation
class | MetalCheckBoxIcon CheckboxIcon implementation for OrganicCheckBoxUI
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxEditor The default editor for Metal editable combo boxes
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
class | MetalComboBoxIcon This utility class draws the horizontal bars which indicate a MetalComboBox
class | MetalComboBoxUI Metal UI for JComboBox
class | MetalComboBoxUI.MetalComboBoxLayoutManager This inner class is marked "public" due to a compiler bug.
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
class | MetalComboBoxUI.MetalPropertyChangeListener This inner class is marked "public" due to a compiler bug.
class | MetalDesktopIconUI Metal desktop icon.
class | MetalFileChooserUI Metal L&F implementation of a FileChooser.
protected class | MetalFileChooserUI.DirectoryComboBoxAction Acts when DirectoryComboBox has changed the selected item.
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FileRenderer
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
protected class | MetalFileChooserUI.SingleClickListener
class | MetalIconFactory Factory object that can vend Icons appropriate for Metal.
static class | MetalIconFactory.FileIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.FolderIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.PaletteCloseIcon Defines an icon for Palette close
static class | MetalIconFactory.TreeControlIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeFolderIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeLeafIcon
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalInternalFrameUI Metal implementation of JInternalFrame.
class | MetalLabelUI A Windows L&F implementation of LabelUI.
class | MetalLookAndFeel Implements The Metal Look and Feel.
class | MetalPopupMenuSeparatorUI A Metal L&F implementation of PopupMenuSeparatorUI.
class | MetalProgressBarUI The Metal implementation of ProgressBarUI.
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI
class | MetalScrollBarUI Implementation of ScrollBarUI for the Metal Look and Feel
class | MetalScrollButton JButton object for Metal scrollbar arrows.
class | MetalScrollPaneUI A Metal L&F implementation of ScrollPaneUI.
class | MetalSeparatorUI A Metal L&F implementation of SeparatorUI.
class | MetalSliderUI A Java L&F implementation of SliderUI.
protected class | MetalSliderUI.MetalPropertyListener
class | MetalSplitPaneUI Metal split pane.
class | MetalTabbedPaneUI The Metal subclass of BasicTabbedPaneUI.
class | MetalTabbedPaneUI.TabbedPaneLayout This inner class is marked "public" due to a compiler bug.
class | MetalTextFieldUI Basis of a look and feel for a JTextField.
class | MetalTheme This interface acts as a generic way to describe the colors used by Metal.
class | MetalToggleButtonUI MetalToggleButton implementation
class | MetalToolBarUI A Metal Look and Feel implementation of ToolBarUI.
protected class | MetalToolBarUI.MetalContainerListener
protected class | MetalToolBarUI.MetalDockingListener
protected class | MetalToolBarUI.MetalRolloverListener
class | MetalToolTipUI A Metal L&F extension of BasicToolTipUI.
class | MetalTreeUI MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.

Methods in javax.swing.plaf.metal that return Object
Object | MetalFileChooserUI.DirectoryComboBoxModel.getSelectedItem()
Object | MetalFileChooserUI.DirectoryComboBoxModel.getElementAt(int index)
Object | MetalFileChooserUI.FilterComboBoxModel.getSelectedItem()
Object | MetalFileChooserUI.FilterComboBoxModel.getElementAt(int index)

Methods in javax.swing.plaf.metal with parameters of type Object
protected void | MetalTreeUI.decodeLineStyle(Object lineStyleFlag) this function converts between the string passed into the client property and the internal representation (currently and int)
Component | MetalFileChooserUI.FileRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
void | MetalFileChooserUI.DirectoryComboBoxModel.setSelectedItem(Object selectedDirectory)
Component | MetalFileChooserUI.FilterComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
void | MetalFileChooserUI.FilterComboBoxModel.setSelectedItem(Object filter)

Uses of Object in javax.swing.plaf.multi

Subclasses of Object in javax.swing.plaf.multi
class | MultiButtonUI MultiButtonUI implementation
class | MultiColorChooserUI MultiColorChooserUI implementation
class | MultiComboBoxUI MultiComboBoxUI implementation
class | MultiDesktopIconUI MultiDesktopIconUI implementation
class | MultiDesktopPaneUI MultiDesktopPaneUI implementation
class | MultiFileChooserUI MultiFileChooserUI implementation
class | MultiInternalFrameUI MultiInternalFrameUI implementation
class | MultiLabelUI MultiLabelUI implementation
class | MultiListUI MultiListUI implementation
class | MultiLookAndFeel A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.
class | MultiMenuBarUI MultiMenuBarUI implementation
class | MultiMenuItemUI MultiMenuItemUI implementation
class | MultiOptionPaneUI MultiOptionPaneUI implementation
class | MultiPanelUI MultiPanelUI implementation
class | MultiPopupMenuUI MultiPopupMenuUI implementation
class | MultiProgressBarUI MultiProgressBarUI implementation
class | MultiScrollBarUI MultiScrollBarUI implementation
class | MultiScrollPaneUI MultiScrollPaneUI implementation
class | MultiSeparatorUI MultiSeparatorUI implementation
class | MultiSliderUI MultiSliderUI implementation
class | MultiSplitPaneUI MultiSplitPaneUI implementation
class | MultiTabbedPaneUI MultiTabbedPaneUI implementation
class | MultiTableHeaderUI MultiTableHeaderUI implementation
class | MultiTableUI MultiTableUI implementation
class | MultiTextUI MultiTextUI implementation
class | MultiToolBarUI MultiToolBarUI implementation
class | MultiToolTipUI MultiToolTipUI implementation
class | MultiTreeUI MultiTreeUI implementation
class | MultiViewportUI MultiViewportUI implementation

Uses of Object in javax.swing.table

Subclasses of Object in javax.swing.table
class | AbstractTableModel This abstract class provides default implementations for most of the methods in the TableModel interface.
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | DefaultTableColumnModel The standard column-handler for a JTable.
class | DefaultTableModel This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.
class | JTableHeader This is the object which manages the header of the JTable.
protected class | JTableHeader.AccessibleJTableHeader This class implements accessibility support for the JTableHeader class.
protected class | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.
class | TableColumn A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.

Fields in javax.swing.table declared as Object
protected Object | TableColumn.identifier This object is not used internally by the drawing machinery of the JTable; identifiers may be set in the TableColumn as as an optional way to tag and locate table columns.
protected Object | TableColumn.headerValue The header value of the column.

Methods in javax.swing.table that return Object
Object | TableColumn.getIdentifier() Returns the identifier object for this column.
Object | TableColumn.getHeaderValue() Returns the Object used as the value for the header renderer.
Object | DefaultTableModel.getValueAt(int row, int column) Returns an attribute value for the cell at row and column.
Object | TableModel.getValueAt(int rowIndex, int columnIndex) Returns the value for the cell at columnIndex and rowIndex.

Methods in javax.swing.table with parameters of type Object
Component | TableCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Sets an initial value for the editor.
void | TableColumn.setIdentifier(Object identifier) Sets the TableColumn's identifier to anIdentifier.
void | TableColumn.setHeaderValue(Object headerValue) Sets the Object whose string representation will be used as the value for the headerRenderer.
Component | TableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the component used for drawing the cell.
void | AbstractTableModel.setValueAt(Object aValue, int rowIndex, int columnIndex) This empty implementation is provided so users don't have to implement this method if their data model is not editable.
void | DefaultTableModel.setDataVector(Object[][] newData, Object[] columnNames) Replaces the value in the dataVector instance variable with the values in the array newData.
void | DefaultTableModel.setColumnIdentifiers(Object[] newIdentifiers) Replaces the column identifiers in the model.
void | DefaultTableModel.addColumn(Object columnName) Adds a column to the model.
void | DefaultTableModel.addColumn(Object columnName, Vector columnData) Adds a column to the model.
void | DefaultTableModel.addColumn(Object columnName, Object[] columnData) Adds a column to the model.
void | DefaultTableModel.addRow(Object[] rowData) Adds a row to the end of the model.
void | DefaultTableModel.insertRow(int row, Object[] rowData) Inserts a row at row in the model.
void | DefaultTableModel.setValueAt(Object aValue, int row, int column) Sets the object value for the cell at column and row.
protected static Vector | DefaultTableModel.convertToVector(Object[] anArray) Returns a vector that contains the same objects as the array.
protected static Vector | DefaultTableModel.convertToVector(Object[][] anArray) Returns a vector of vectors that contains the same objects as the array.
int | DefaultTableColumnModel.getColumnIndex(Object identifier) Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.
Component | DefaultTableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the default table cell renderer.
protected void | DefaultTableCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
protected void | DefaultTableCellRenderer.setValue(Object value) Sets the string for the cell being rendered to value.
void | TableModel.setValueAt(Object aValue, int rowIndex, int columnIndex) Sets the value in the cell at columnIndex and rowIndex to aValue.
int | TableColumnModel.getColumnIndex(Object columnIdentifier) Returns the index of the first column in the table whose identifier is equal to identifier, when compared using equals.

Constructors in javax.swing.table with parameters of type Object
DefaultTableModel(Object[] columnNames, int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Object[][] data, Object[] columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.

Uses of Object in javax.swing.text

Subclasses of Object in javax.swing.text
class | AbstractDocument An implementation of the document interface to serve as a basis for implementing various kinds of documents.
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.DefaultDocumentEvent Stores document changes as the document is being modified.
static class | AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
class | AbstractWriter AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
class | AsyncBoxView A box that does layout asynchronously.
class | AsyncBoxView.ChildLocator A class to manage the effective position of the child views in a localized area while changes are being made around the localized area.
class | AsyncBoxView.ChildState A record representing the layout state of a child view.
class | BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
class | BoxView A view that arranges its children into a box shape by tiling it's children along an axis.
class | ChangedCharSetException ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.
class | ComponentView Component decorator that implements the view interface.
class | CompositeView A view that is composed of other views (has children).
class | DefaultCaret A default implementation of Caret.
class | DefaultEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
class | DefaultHighlighter Implements the Highlighter interfaces.
static class | DefaultHighlighter.DefaultHighlightPainter Simple highlight painter that fills a highlighted area with a solid color.
class | DefaultStyledDocument A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
static class | DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.
class | DefaultStyledDocument.ElementBuffer Class to manage changes to the element hierarchy.
static class | DefaultStyledDocument.ElementSpec Specification for building elements.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...
class | DefaultTextUI Deprecated.
class | EditorKit Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
class | ElementIterator ElementIterator, as the name suggests, iteratates over the Element tree.
class | FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
class | FlowView A View that tries to flow it's children into some partially constrained space.
static class | FlowView.FlowStrategy Strategy for maintaining the physical form of the flow.
class | GapContent An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
(package private) class | javax.swing.text.GapVector An implementation of a gapped buffer similar to that used by emacs.
class | GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
static class | GlyphView.GlyphPainter A class to perform rendering of the glyphs.
class | IconView Icon decorator that implements the view interface.
class | JTextComponent JTextComponent is the base class for swing text components.
class | JTextComponent.AccessibleJTextComponent This class implements accessibility support for the JTextComponent class.
static class | JTextComponent.KeyBinding Binding record for creating key bindings.
class | LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
class | LayeredHighlighter
static class | LayeredHighlighter.LayerPainter Layered highlight renderer.
class | LayoutQueue A queue of text layout tasks.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | PasswordView Implements a View suitable for use in JPasswordField UI implementations.
class | PlainDocument A plain document that maintains no character attributes.
class | PlainView Implements View interface for a simple multi-line text view that has text in one font and color.
static class | Position.Bias A typesafe enumeration to indicate bias to a position in the model.
class | Segment A segment of a character array representing a fragment of text.
class | SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
class | StringContent An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
class | StyleConstants A collection of well known or common attribute keys and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.
static class | StyleConstants.CharacterConstants This is a typesafe enumeration of the well-known attributes that contribute to a character style.
static class | StyleConstants.ColorConstants This is a typesafe enumeration of the well-known attributes that contribute to a color.
static class | StyleConstants.FontConstants This is a typesafe enumeration of the well-known attributes that contribute to a font.
static class | StyleConstants.ParagraphConstants This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
class | StyleContext A pool of styles and their associated resources.
class | StyleContext.NamedStyle A collection of attributes, typically used to represent character and paragraph styles.
class | StyleContext.SmallAttributeSet This class holds a small number of attributes in an array.
class | StyledEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TableView Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
class | TabSet A TabSet is comprised of many TabStops.
class | TabStop This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.
class | Utilities A collection of methods to deal with various text related activities.
class | View A very important part of the text package is the View class.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
class | ZoneView ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Fields in javax.swing.text declared as Object
static Object | StyleConstants.NameAttribute Attribute name used to name the collection of attributes.
static Object | StyleConstants.ResolveAttribute Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
static Object | StyleConstants.ModelAttribute Attribute used to identify the model for embedded objects that have a model view separation.
static Object | StyleConstants.BidiLevel Bidirectional level of a character as assigned by the Unicode bidi algorithm.
static Object | StyleConstants.FontFamily Name of the font family.
static Object | StyleConstants.FontSize Name of the font size.
static Object | StyleConstants.Bold Name of the bold attribute.
static Object | StyleConstants.Italic Name of the italic attribute.
static Object | StyleConstants.Underline Name of the underline attribute.
static Object | StyleConstants.StrikeThrough Name of the Strikethrough attribute.
static Object | StyleConstants.Superscript Name of the Superscript attribute.
static Object | StyleConstants.Subscript Name of the Subscript attribute.
static Object | StyleConstants.Foreground Name of the foreground color attribute.
static Object | StyleConstants.Background Name of the background color attribute.
static Object | StyleConstants.ComponentAttribute Name of the component attribute.
static Object | StyleConstants.IconAttribute Name of the icon attribute.
static Object | StyleConstants.ComposedTextAttribute Name of the input method composed text attribute.
static Object | StyleConstants.FirstLineIndent The amount of space to indent the first line of the paragraph.
static Object | StyleConstants.LeftIndent The amount to indent the left side of the paragraph.
static Object | StyleConstants.RightIndent The amount to indent the right side of the paragraph.
static Object | StyleConstants.LineSpacing The amount of space between lines of the paragraph.
static Object | StyleConstants.SpaceAbove The amount of space above the paragraph.
static Object | StyleConstants.SpaceBelow The amount of space below the paragraph.
static Object | StyleConstants.Alignment Alignment for the paragraph.
static Object | StyleConstants.TabSet TabSet for the paragraph, type is a TabSet containing TabStops.
static Object | StyleConstants.Orientation Orientation for a paragraph.
static Object | StyleConstants.ParagraphConstants.FirstLineIndent The amount of space to indent the first line of the paragraph.
static Object | StyleConstants.ParagraphConstants.LeftIndent The amount to indent the left side of the paragraph.
static Object | StyleConstants.ParagraphConstants.RightIndent The amount to indent the right side of the paragraph.
static Object | StyleConstants.ParagraphConstants.LineSpacing The amount of space between lines of the paragraph.
static Object | StyleConstants.ParagraphConstants.SpaceAbove The amount of space above the paragraph.
static Object | StyleConstants.ParagraphConstants.SpaceBelow The amount of space below the paragraph.
static Object | StyleConstants.ParagraphConstants.Alignment Alignment for the paragraph.
static Object | StyleConstants.ParagraphConstants.TabSet TabSet for the paragraph.
static Object | StyleConstants.ParagraphConstants.Orientation Orientation for the paragraph.
static Object | StyleConstants.CharacterConstants.Underline Name of the underline attribute.
static Object | StyleConstants.CharacterConstants.StrikeThrough Name of the strikethrough attribute.
static Object | StyleConstants.CharacterConstants.Superscript Name of the superscript attribute.
static Object | StyleConstants.CharacterConstants.Subscript Name of the subscript attribute.
static Object | StyleConstants.CharacterConstants.ComponentAttribute Name of the component attribute.
static Object | StyleConstants.CharacterConstants.IconAttribute Name of the icon attribute.
static Object | StyleConstants.CharacterConstants.BidiLevel Bidirectional level of a character as assigned by the Unicode bidi algorithm.
static Object | StyleConstants.CharacterConstants.Family Name of the font family.
static Object | StyleConstants.CharacterConstants.Size Name of the font size.
static Object | StyleConstants.CharacterConstants.Bold Name of the bold attribute.
static Object | StyleConstants.CharacterConstants.Italic Name of the italic attribute.
static Object | StyleConstants.CharacterConstants.Foreground Name of the foreground color attribute.
static Object | StyleConstants.CharacterConstants.Background Name of the background color attribute.
static Object | StyleConstants.ColorConstants.Foreground Name of the foreground color attribute.
static Object | StyleConstants.ColorConstants.Background Name of the background color attribute.
static Object | StyleConstants.FontConstants.Family Name of the font family.
static Object | StyleConstants.FontConstants.Size Name of the font size.
static Object | StyleConstants.FontConstants.Bold Name of the bold attribute.
static Object | StyleConstants.FontConstants.Italic Name of the italic attribute.
static Object | AttributeSet.NameAttribute Attribute name used to name the collection of attributes.
static Object | AttributeSet.ResolveAttribute Attribute name used to identifiy the resolving parent set of attributes, if one is defined.

Methods in javax.swing.text that return Object
Object | ElementIterator.clone() Clones the ElementIterator.
Object | Document.getProperty(Object key) Gets properties associated with the document.
Object | SimpleAttributeSet.getAttribute(Object name) Gets the value of an attribute.
Object | SimpleAttributeSet.clone() Clones a set of attributes.
static Object | StyleContext.getStaticAttribute(Object key) Returns the object previously registered with registerStaticAttributeKey.
static Object | StyleContext.getStaticAttributeKey(Object key) Returns the String that key will be registered with
Object | StyleContext.SmallAttributeSet.clone() Clones a set of attributes.
Object | StyleContext.SmallAttributeSet.getAttribute(Object key) Gets the value of an attribute.
Object | StyleContext.NamedStyle.getAttribute(Object attrName) Gets the value of an attribute.
protected Object | GlyphView.clone() Creates a shallow copy.
Object | EditorKit.clone() Creates a copy of the editor kit.
Object | Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
Object | AbstractDocument.getProperty(Object key) A convenience method for looking up a property value.
Object | AbstractDocument.AbstractElement.getAttribute(Object attrName) Gets the value of an attribute.
Object | DefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
Object | StyledEditorKit.clone() Create a copy of the editor kit.
protected Object | GapContent.allocateArray(int len) Allocate an array to store items of the type appropriate (which is determined by the subclass).
Object | AttributeSet.getAttribute(Object key) Fetches the value of the given attribute.
Object | Segment.clone() Creates a shallow copy.

Methods in javax.swing.text with parameters of type Object
void | JTextComponent.read(Reader in, Object desc) Initializes from a stream.
Object | Document.getProperty(Object key) Gets properties associated with the document.
void | Document.putProperty(Object key, Object value) Puts a new property on the list.
boolean | SimpleAttributeSet.isDefined(Object attrName) Tells whether a given attribute is defined.
Object | SimpleAttributeSet.getAttribute(Object name) Gets the value of an attribute.
boolean | SimpleAttributeSet.containsAttribute(Object name, Object value) Checks whether the attribute list contains a specified attribute name/value pair.
void | SimpleAttributeSet.addAttribute(Object name, Object value) Adds an attribute to the list.
void | SimpleAttributeSet.removeAttribute(Object name) Removes an attribute from the list.
boolean | SimpleAttributeSet.equals(Object obj) Compares this object to the specifed object.
AttributeSet | StyleContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
static void | StyleContext.registerStaticAttributeKey(Object key) Registers an object as a static object that is being used as a key in attribute sets.
static Object | StyleContext.getStaticAttribute(Object key) Returns the object previously registered with registerStaticAttributeKey.
static Object | StyleContext.getStaticAttributeKey(Object key) Returns the String that key will be registered with
boolean | StyleContext.SmallAttributeSet.equals(Object obj) Compares this object to the specifed object.
boolean | StyleContext.SmallAttributeSet.isDefined(Object key) Checks whether a given attribute is defined.
Object | StyleContext.SmallAttributeSet.getAttribute(Object key) Gets the value of an attribute.
boolean | StyleContext.SmallAttributeSet.containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
boolean | StyleContext.NamedStyle.isDefined(Object attrName) Checks whether a given attribute is defined.
Object | StyleContext.NamedStyle.getAttribute(Object attrName) Gets the value of an attribute.
boolean | StyleContext.NamedStyle.containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
void | StyleContext.NamedStyle.addAttribute(Object name, Object value) Adds an attribute.
void | StyleContext.NamedStyle.removeAttribute(Object name) Removes an attribute from the set.
void | Highlighter.removeHighlight(Object tag) Removes a highlight from the view.
void | Highlighter.changeHighlight(Object tag, int p0, int p1) Changes the given highlight to span a different portion of the document.
void | MutableAttributeSet.addAttribute(Object name, Object value) Creates a new attribute set similar to this one except that it contains an attribute with the given name and value.
void | MutableAttributeSet.removeAttribute(Object name) Creates a new attribute set similar to this one except that it contains no attribute with the given name.
Object | AbstractDocument.getProperty(Object key) A convenience method for looking up a property value.
void | AbstractDocument.putProperty(Object key, Object value) A convenience method for storing up a property value.
AttributeSet | AbstractDocument.AttributeContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | AbstractDocument.AttributeContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
boolean | AbstractDocument.AbstractElement.isDefined(Object attrName) Checks whether a given attribute is defined.
Object | AbstractDocument.AbstractElement.getAttribute(Object attrName) Gets the value of an attribute.
boolean | AbstractDocument.AbstractElement.containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
void | AbstractDocument.AbstractElement.addAttribute(Object name, Object value) Adds an attribute to the element.
void | AbstractDocument.AbstractElement.removeAttribute(Object name) Removes an attribute from the set.
void | DefaultHighlighter.removeHighlight(Object tag) Removes a highlight from the view.
void | DefaultHighlighter.changeHighlight(Object tag, int p0, int p1) Changes a highlight.
boolean | DefaultCaret.equals(Object obj) Compares this object to the specifed object.
boolean | TabStop.equals(Object other) Returns true if other equals the receiver.
boolean | AttributeSet.isDefined(Object attrName) Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
Object | AttributeSet.getAttribute(Object key) Fetches the value of the given attribute.
boolean | AttributeSet.containsAttribute(Object name, Object value) Returns true if this set contains this attribute with an equal value.

Constructors in javax.swing.text with parameters of type Object
StyleContext.SmallAttributeSet(Object[] attributes)

Uses of Object in javax.swing.text.html

Subclasses of Object in javax.swing.text.html
class | BlockView A view implementation to display a block (as a box) with CSS specifications.
class | CSS Defines a set of CSS attributes as a typesafe enumeration.
static class | CSS.Attribute Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
protected class | FormView.MouseEventListener MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
class | HTML Constants used in the HTMLDocument.
static class | HTML.Attribute Typesafe enumeration representing an html attribute.
static class | HTML.Tag Typesafe enumeration for an html tag.
static class | HTML.UnknownTag
class | HTMLDocument A document that models HTML.
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.HTMLReader An HTML reader to load an HTML document with an HTML element structure.
class | HTMLDocument.HTMLReader.BlockAction
class | HTMLDocument.HTMLReader.CharacterAction
class | HTMLDocument.HTMLReader.FormAction Action to support forms by building all of the elements used to represent form controls.
class | HTMLDocument.HTMLReader.HiddenAction
class | HTMLDocument.HTMLReader.IsindexAction
class | HTMLDocument.HTMLReader.ParagraphAction
class | HTMLDocument.HTMLReader.PreAction
class | HTMLDocument.HTMLReader.SpecialAction
class | HTMLDocument.HTMLReader.TagAction An action to be performed in response to parsing a tag.
static class | HTMLDocument.Iterator An iterator to iterate over a particular type of tag.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.
class | HTMLEditorKit The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
static class | HTMLEditorKit.HTMLFactory A factory to build views for HTML.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.
static class | HTMLEditorKit.Parser Interface to be supported by the parser.
static class | HTMLEditorKit.ParserCallback The result of parsing drives these callback methods.
class | HTMLFrameHyperlinkEvent HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.
class | HTMLWriter This is a writer for HTMLDocuments.
class | InlineView Displays the inline element styles based upon css attributes.
class | ListView A view implementation to display an html list
class | MinimalHTMLWriter MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit.
class | ObjectView Component decorator that implements the view interface for <object> elements.
class | Option Value for the ListModel used to represent <option> elements.
class | StyleSheet Support for defining the visual characteristics of HTML views being rendered.
static class | StyleSheet.BoxPainter Class to carry out some of the duties of CSS formatting.
static class | StyleSheet.ListPainter Class to carry out some of the duties of CSS list formatting.

Fields in javax.swing.text.html declared as Object
static Object HTMLEditorKit.ParserCallback.IMPLIED
This is passed as an attribute in the attributeset to indicate the element is implied eg, the string '<>foo<\t>' contains an implied html element and an implied body element.

Methods in javax.swing.text.html that return Object
 Object HTMLEditorKit.clone()
Create a copy of the editor kit.

Methods in javax.swing.text.html with parameters of type Object
AttributeSet | StyleSheet.addAttribute(AttributeSet old, Object key, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleSheet.removeAttribute(AttributeSet old, Object key) Removes an attribute from the set.
boolean | HTML.UnknownTag.equals(Object obj) Compares this object to the specifed object.
Element | HTMLDocument.getElement(Element e, Object attribute, Object value) Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found.

Constructors in javax.swing.text.html with parameters of type Object
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String targetFrame)
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.

Uses of Object in javax.swing.text.html.parser

Subclasses of Object in javax.swing.text.html.parser
class | AttributeList This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
class | ContentModel A representation of a content model.
class | DocumentParser A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing).
class | DTD The representation of an SGML DTD.
class | Element An element as described in a DTD using the ELEMENT construct.
class | Entity An entity in as described in a DTD using the ENTITY construct.
class | Parser A simple DTD-driven HTML parser.
class | ParserDelegator Responsible for starting up a new DocumentParser each time its parse method is invoked.
class | TagElement A generic HTML TagElement class.

Fields in javax.swing.text.html.parser declared as Object
Object | ContentModel.content The content.
Object | Element.data A field to store user data.

Methods in javax.swing.text.html.parser with parameters of type Object
protected ContentModel | DTD.defContentModel(int type, Object obj, ContentModel next) Define a content model
boolean | ContentModel.first(Object token) Return true if the token could potentially be the first token in the input stream.

Constructors in javax.swing.text.html.parser with parameters of type Object
ContentModel(int type, Object content, ContentModel next)
Create a content model of a particular type.

Uses of Object in javax.swing.text.rtf

Subclasses of Object in javax.swing.text.rtf
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Methods in javax.swing.text.rtf that return Object
 Object RTFEditorKit.clone()
Create a copy of the editor kit.

Uses of Object in javax.swing.tree

Subclasses of Object in javax.swing.tree
class | AbstractLayoutCache Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | AbstractLayoutCache.NodeDimensions Used by AbstractLayoutCache to determing the size and x origin of a particular node.
class | DefaultMutableTreeNode A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
class | DefaultTreeCellEditor A TreeCellEditor.
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
class | DefaultTreeCellRenderer Displays an entry in a tree.
class | DefaultTreeModel A simple tree data model that uses TreeNodes.
class | DefaultTreeSelectionModel Default implementation of TreeSelectionModel.
class | ExpandVetoException Exception used to stop and expand/collapse from happening.
class | FixedHeightLayoutCache NOTE: This will become more open in a future release.
class | TreePath Represents a path to a node.
class | VariableHeightLayoutCache NOTE: This will become more open in a future release.

Fields in javax.swing.tree declared as Object
protected  Object DefaultMutableTreeNode.userObject
optional user object

Methods in javax.swing.tree that return Object
Object | DefaultTreeSelectionModel.clone() Returns a clone of this object with the same selection.
Object | DefaultMutableTreeNode.getUserObject() Returns this node's user object.
Object[] | DefaultMutableTreeNode.getUserObjectPath() Returns the user object path, from the root, to get to this node.
Object | DefaultMutableTreeNode.clone() Overridden to make clone public.
Object | TreeModel.getRoot() Returns the root of the tree.
Object | TreeModel.getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
Object | DefaultTreeModel.getRoot() Returns the root of the tree.
Object | DefaultTreeModel.getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
Object | DefaultTreeCellEditor.getCellEditorValue() Returns the value currently being edited.
Object[] | TreePath.getPath() Returns an ordered array of Objects containing the components of this TreePath.
Object | TreePath.getLastPathComponent() Returns the last component of this path.
Object | TreePath.getPathComponent(int element) Returns the path component at the specified index.

Methods in javax.swing.tree with parameters of type Object
void | DefaultMutableTreeNode.setUserObject(Object userObject) Sets the user object for this node to userObject.
Component | DefaultTreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) Configures the renderer based on the passed in components.
protected void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
Component | TreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Sets the value of the current tree cell to value.
protected Rectangle | AbstractLayoutCache.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) Returns, by reference in size, the size needed to reprensent value.
void | MutableTreeNode.setUserObject(Object object) Resets the user object of the receiver to object.
abstract Rectangle | AbstractLayoutCache.NodeDimensions.getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds) Returns, by reference in bounds, the size and x origin to place value at.
Component | TreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Sets an initial value for the editor.
Object | TreeModel.getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
int | TreeModel.getChildCount(Object parent) Returns the number of children of parent.
boolean | TreeModel.isLeaf(Object node) Returns true if node is a leaf.
void | TreeModel.valueForPathChanged(TreePath path, Object newValue) Messaged when the user has altered the value for the item identified by path to newValue.
int | TreeModel.getIndexOfChild(Object parent, Object child) Returns the index of child in parent.
int | DefaultTreeModel.getIndexOfChild(Object parent, Object child) Returns the index of child in parent.
Object | DefaultTreeModel.getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
int | DefaultTreeModel.getChildCount(Object parent) Returns the number of children of parent.
boolean | DefaultTreeModel.isLeaf(Object node) Returns whether the specified node is a leaf node.
void | DefaultTreeModel.valueForPathChanged(TreePath path, Object newValue) This sets the user object of the TreeNode identified by path and posts a node changed.
void | DefaultTreeModel.nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren) Invoke this method after you've removed some TreeNodes from node.
protected void | DefaultTreeModel.fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | DefaultTreeModel.fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | DefaultTreeModel.fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | DefaultTreeModel.fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
Component | DefaultTreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Configures the editor.
protected void | DefaultTreeCellEditor.determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
boolean | TreePath.equals(Object o) Tests two TreePaths for equality by checking each element of the paths for equality.
TreePath | TreePath.pathByAddingChild(Object child) Returns a new path containing all the elements of this object plus child.

Constructors in javax.swing.tree with parameters of type Object
DefaultMutableTreeNode(Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
DefaultMutableTreeNode(Object userObject, boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
TreePath(Object[] path)
Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model.
TreePath(Object singlePath)
Constructs a TreePath containing only a single element.
TreePath(TreePath parent, Object lastElement)
Constructs a new TreePath, which is the path identified by parent ending in lastElement.
TreePath(Object[] path, int length)
Constructs a new TreePath with the identified path components of length length.

Uses of Object in javax.swing.undo

Subclasses of Object in javax.swing.undo
class | AbstractUndoableEdit An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
class | CannotRedoException Thrown when an UndoableEdit is told to redo() and can't.
class | CannotUndoException Thrown when an UndoableEdit is told to undo() and can't.
class | CompoundEdit A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
class | StateEdit StateEdit is a general edit for objects that change state.
class | UndoableEditSupport A support class used for managing UndoableEdit listeners.
class | UndoManager Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Fields in javax.swing.undo declared as Object
protected  Object UndoableEditSupport.realSource

Constructors in javax.swing.undo with parameters of type Object
UndoableEditSupport(Object r)
Constructs an UndoableEditSupport object.

Uses of Object in javax.transaction

Subclasses of Object in javax.transaction
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Uses of Object in org.omg.CORBA

Subclasses of Object in org.omg.CORBA
class | _IDLTypeStub org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
class | _PolicyStub org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
class | Any Serves as a container for any data that can be described in IDL or for any IDL primitive type.
class | AnyHolder A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods.
class | AnySeqHelper org/omg/CORBA/AnySeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | AnySeqHolder org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | BooleanHolder A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods.
class | BooleanSeqHelper org/omg/CORBA/BooleanSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | BooleanSeqHolder org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | ByteHolder A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods.
class | CharHolder A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods.
class | CharSeqHelper org/omg/CORBA/CharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | CharSeqHolder org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | CompletionStatus An object that indicates whether a method had completed running when a SystemException was thrown.
class | CompletionStatusHelper org/omg/CORBA/CompletionStatusHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
class | Context An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
class | ContextList An object containing a modifiable list of String objects that represent property names.
class | CurrentHelper org/omg/CORBA/CurrentHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | CurrentHolder org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | DefinitionKind The class that provides the constants used to identify the type of an Interface Repository object.
class | DefinitionKindHelper org/omg/CORBA/DefinitionKindHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
class | DoubleHolder A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods.
class | DoubleSeqHelper org/omg/CORBA/DoubleSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | DoubleSeqHolder org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | DynamicImplementation The base class for all object implementations using the DSI.
class | Environment A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
class | ExceptionList An object used in Request operations to describe the exceptions that can be thrown by a method.
class | FieldNameHelper org/omg/CORBA/FieldNameHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
class | FixedHolder FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal.
class | FloatHolder A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods.
class | FloatSeqHelper org/omg/CORBA/FloatSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | FloatSeqHolder org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IdentifierHelper org/omg/CORBA/IdentifierHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:42 o'clock GMT+00:00
class | IDLTypeHelper org/omg/CORBA/IDLTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | Initializer This is the mapping for an IDL structure which specifies an initializer for a value type.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | IntHolder A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | LongHolder A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods.
class | LongLongSeqHelper org/omg/CORBA/LongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | LongLongSeqHolder org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | LongSeqHelper org/omg/CORBA/LongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | LongSeqHolder org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NamedValue An object used in the DII and DSI to describe arguments and return values.
class | NameValuePair The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
class | NameValuePairHelper org/omg/CORBA/NameValuePairHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | NVList A modifiable list containing NamedValue objects.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | ObjectHelper
class | ObjectHolder A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object).
class | OctetSeqHelper org/omg/CORBA/OctetSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | OctetSeqHolder org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ORB A class providing APIs for the CORBA Object Request Broker features.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | PolicyHelper org/omg/CORBA/PolicyHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
class | PolicyHolder org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
class | PolicyListHelper org/omg/CORBA/PolicyListHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | PolicyListHolder org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | PolicyTypeHelper org/omg/CORBA/PolicyTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
class | Principal Deprecated. Deprecated by CORBA 2.2.
class | PrincipalHolder Deprecated. Deprecated by CORBA 2.2.
class | RepositoryIdHelper org/omg/CORBA/RepositoryIdHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
class | Request An object containing the information necessary for invoking a method.
class | ServerRequest An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
class | ServiceDetail An object that represents an ORB service.
class | ServiceDetailHelper
class | ServiceInformation ServiceInformation is an IDL struct in the CORBA module.
class | ServiceInformationHelper
class | ServiceInformationHolder A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods.
class | SetOverrideType The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
class | SetOverrideTypeHelper org/omg/CORBA/SetOverrideTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
class | ShortHolder A Holder class for a short that is used to store "out" and "inout" parameters in IDL operations.
class | ShortSeqHelper org/omg/CORBA/ShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ShortSeqHolder org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | StringHolder A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations.
class | StringValueHelper org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00
class | StructMember A description of a member of an IDL struct.
class | StructMemberHelper org/omg/CORBA/StructMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
class | SystemException The root class for all CORBA standard exceptions.
class | TCKind The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | TypeCode A container for information about a specific CORBA data type.
class | TypeCodeHolder A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations.
class | ULongLongSeqHelper org/omg/CORBA/ULongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | ULongLongSeqHolder org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | ULongSeqHelper org/omg/CORBA/ULongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ULongSeqHolder org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | UnionMember A description in the Interface Repository of a member of an IDL union.
class | UnionMemberHelper org/omg/CORBA/UnionMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
class | UnknownUserException A class that contains user exceptions returned by the server.
class | UserException The root class for CORBA IDL-defined user exceptions.
class | UShortSeqHelper org/omg/CORBA/UShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | UShortSeqHolder org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ValueBaseHelper
class | ValueBaseHolder A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods.
class | ValueMember A description in the Interface Repository of a member of a value object.
class | ValueMemberHelper org/omg/CORBA/ValueMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
class | VersionSpecHelper org/omg/CORBA/VersionSpecHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
class | VisibilityHelper org/omg/CORBA/VisibilityHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
class | WCharSeqHelper org/omg/CORBA/WCharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | WCharSeqHolder org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | WrongTransaction The CORBA WrongTransaction user-defined exception.
class | WStringValueHelper org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00

Methods in org.omg.CORBA that return Object
 Object DataInputStream.read_Abstract()
Reads an IDL Abstract interface from the input stream.

Methods in org.omg.CORBA with parameters of type Object
 void DataOutputStream.write_Abstract(Object value)
Writes the IDL Abstract interface type to the output stream.

Uses of Object in org.omg.CORBA_2_3

Methods in org.omg.CORBA_2_3 with parameters of type Object
 void ORB.set_delegate(Object wrapper)

Uses of Object in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable that return Object
Object | InputStream.read_abstract_interface() unmarshal the value object or a suitable stub object.
Object | InputStream.read_abstract_interface(Class clz) unmarshal the class object or the stub class corresponding to the passed type.

Methods in org.omg.CORBA_2_3.portable with parameters of type Object
 void OutputStream.write_abstract_interface(Object obj)
marshals a value object or a stub object.

Uses of Object in org.omg.CORBA.DynAnyPackage

Subclasses of Object in org.omg.CORBA.DynAnyPackage
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of Object in org.omg.CORBA.ORBPackage

Subclasses of Object in org.omg.CORBA.ORBPackage
class | InconsistentTypeCode InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
class | InvalidName The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Uses of Object in org.omg.CORBA.portable

Subclasses of Object in org.omg.CORBA.portable
class | ApplicationException This class is used for reporting application level exceptions between ORBs and stubs.
class | Delegate Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
class | IndirectionException The Indirection exception is a Java specific system exception.
class | ObjectImpl The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
class | RemarshalException This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
class | ServantObject This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Fields in org.omg.CORBA.portable declared as Object
 Object ServantObject.servant
The real servant.

Methods in org.omg.CORBA.portable with parameters of type Object
 boolean ObjectImpl.equals(Object obj)
Compares this ObjectImpl object with the given one for equality.
 boolean Delegate.equals(Object self, Object obj)
Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.

Uses of Object in org.omg.CORBA.TypeCodePackage

Subclasses of Object in org.omg.CORBA.TypeCodePackage
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of Object in org.omg.CosNaming

Subclasses of Object in org.omg.CosNaming
class | _BindingIteratorImplBase
class | _BindingIteratorStub
class | _NamingContextImplBase
class | _NamingContextStub
class | Binding
class | BindingHelper
class | BindingHolder
class | BindingIteratorHelper
class | BindingIteratorHolder
class | BindingListHelper
class | BindingListHolder
class | BindingType
class | BindingTypeHelper
class | BindingTypeHolder
class | IstringHelper
class | NameComponent
class | NameComponentHelper
class | NameComponentHolder
class | NameHelper
class | NameHolder
class | NamingContextHelper
class | NamingContextHolder

Uses of Object in org.omg.CosNaming.NamingContextPackage

Subclasses of Object in org.omg.CosNaming.NamingContextPackage
class | AlreadyBound
class | AlreadyBoundHelper
class | AlreadyBoundHolder
class | CannotProceed
class | CannotProceedHelper
class | CannotProceedHolder
class | InvalidNameHelper
class | InvalidNameHolder
class | NotEmpty
class | NotEmptyHelper
class | NotEmptyHolder
class | NotFound
class | NotFoundHelper
class | NotFoundHolder
class | NotFoundReason
class | NotFoundReasonHelper
class | NotFoundReasonHolder

Uses of Object in org.omg.stub.java.rmi

Subclasses of Object in org.omg.stub.java.rmi
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Package

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Package

Packages that use Package
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.

Uses of Package in java.lang

Methods in java.lang that return Package
static Package | Package.getPackage(String name) Find a package by name in the callers classloader.
static Package[] | Package.getPackages() Get all the packages currently known for the caller's class loader.
protected Package | ClassLoader.definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) Defines a package by name in this ClassLoader.
protected Package | ClassLoader.getPackage(String name) Returns a Package that has been defined by this class loader or any of its ancestors.
protected Package[] | ClassLoader.getPackages() Returns all of the Packages defined by this class loader and its ancestors.
Package | Class.getPackage() Gets the package for this class.

Uses of Package in java.net

Methods in java.net that return Package
protected  Package URLClassLoader.definePackage(String name, Manifest man, URL url)
Defines a new package by name in this ClassLoader.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Process

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Process

Packages that use Process
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Process in java.lang

Methods in java.lang that return Process
Process | Runtime.exec(String command) Executes the specified string command in a separate process.
Process | Runtime.exec(String cmd, String[] envp) Executes the specified string command in a separate process with the specified environment.
Process | Runtime.exec(String command, String[] envp, File dir) Executes the specified string command in a separate process with the specified environment and working directory.
Process | Runtime.exec(String[] cmdarray) Executes the specified command and arguments in a separate process.
Process | Runtime.exec(String[] cmdarray, String[] envp) Executes the specified command and arguments in a separate process with the specified environment.
Process | Runtime.exec(String[] cmdarray, String[] envp, File dir) Executes the specified command and arguments in a separate process with the specified environment and working directory.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Runtime

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Runtime

Packages that use Runtime
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Runtime in java.lang

Methods in java.lang that return Runtime
static Runtime Runtime.getRuntime()
Returns the runtime object associated with the current Java application.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.RuntimeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.RuntimeException

Packages that use RuntimeException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
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.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi | Provides the RMI package.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of RuntimeException in java.awt

Subclasses of RuntimeException in java.awt
 class IllegalComponentStateException
Signals that an AWT component is not in an appropriate state for the requested operation.

Uses of RuntimeException in java.awt.color

Subclasses of RuntimeException in java.awt.color
class | CMMException This exception is thrown if the native CMM returns an error.
class | ProfileDataException This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Uses of RuntimeException in java.awt.dnd

Subclasses of RuntimeException in java.awt.dnd
 class InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Uses of RuntimeException in java.awt.geom

Subclasses of RuntimeException in java.awt.geom
 class IllegalPathStateException
The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.

Uses of RuntimeException in java.awt.image

Subclasses of RuntimeException in java.awt.image
class | ImagingOpException The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
class | RasterFormatException The RasterFormatException is thrown if there is invalid layout information in the Raster.

Uses of RuntimeException in java.lang

Subclasses of RuntimeException in java.lang
class | ArithmeticException Thrown when an exceptional arithmetic condition has occurred.
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | ArrayStoreException Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
class | ClassCastException Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
class | IllegalArgumentException Thrown to indicate that a method has been passed an illegal or inappropriate argument.
class | IllegalMonitorStateException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
class | IllegalStateException Signals that a method has been invoked at an illegal or inappropriate time.
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
class | NegativeArraySizeException Thrown if an application tries to create an array with negative size.
class | NullPointerException Thrown when an application attempts to use null in a case where an object is required.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
class | SecurityException Thrown by the security manager to indicate a security violation.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
class | UnsupportedOperationException Thrown to indicate that the requested operation is not supported.

Uses of RuntimeException in java.lang.reflect

Subclasses of RuntimeException in java.lang.reflect
 class UndeclaredThrowableException
Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Uses of RuntimeException in java.rmi

Subclasses of RuntimeException in java.rmi
 class RMISecurityException
Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.

Uses of RuntimeException in java.security

Subclasses of RuntimeException in java.security
class | AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
class | InvalidParameterException This exception is thrown when an invalid parameter is passed to a method.
class | ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.

Uses of RuntimeException in java.util

Subclasses of RuntimeException in java.util
class | ConcurrentModificationException This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
class | EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.
class | MissingResourceException Signals that a resource is missing.
class | NoSuchElementException Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.

Uses of RuntimeException in javax.swing.undo

Subclasses of RuntimeException in javax.swing.undo
class | CannotRedoException Thrown when an UndoableEdit is told to redo() and can't.
class | CannotUndoException Thrown when an UndoableEdit is told to undo() and can't.

Uses of RuntimeException in org.omg.CORBA

Subclasses of RuntimeException in org.omg.CORBA
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | SystemException The root class for all CORBA standard exceptions.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.

Uses of RuntimeException in org.omg.CORBA.portable

Subclasses of RuntimeException in org.omg.CORBA.portable
class | IndirectionException The Indirection exception is a Java specific system exception.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.SecurityException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.SecurityException

Packages that use SecurityException
java.beans | Contains classes related to Java Beans development.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi | Provides the RMI package.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of SecurityException in java.beans

Methods in java.beans that throw SecurityException
static void | Beans.setDesignTime(boolean isDesignTime) Used to indicate whether of not we are running in an application builder environment.
static void | Beans.setGuiAvailable(boolean isGuiAvailable) Used to indicate whether of not we are running in an environment where GUI interaction is available.

Uses of SecurityException in java.io

Methods in java.io that throw SecurityException
protected boolean | ObjectInputStream.enableResolveObject(boolean enable) Enable the stream to allow objects read from the stream to be replaced.
protected boolean | ObjectOutputStream.enableReplaceObject(boolean enable) Enable the stream to do replacement of objects in the stream.

Constructors in java.io that throw SecurityException
ObjectInputStream()
Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.
ObjectOutputStream()
Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.

Uses of SecurityException in java.lang

Methods in java.lang that throw SecurityException
Field[] | Class.getFields() Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.
Method[] | Class.getMethods() Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces.
Constructor[] | Class.getConstructors() Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object.
Field | Class.getField(String name) Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
Method | Class.getMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
Constructor | Class.getConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
Class[] | Class.getDeclaredClasses() Returns an array of Class objects reflecting all the classes and interfaces declared as members of the class represented by this Class object.
Field[] | Class.getDeclaredFields() Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object.
Method[] | Class.getDeclaredMethods() Returns an array of Method objects reflecting all the methods declared by the class or interface represented by this Class object.
Constructor[] | Class.getDeclaredConstructors() Returns an array of Constructor objects reflecting all the constructors declared by the class represented by this Class object.
Field | Class.getDeclaredField(String name) Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.
Method | Class.getDeclaredMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
Constructor | Class.getDeclaredConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.

Uses of SecurityException in java.lang.reflect

Methods in java.lang.reflect that throw SecurityException
static void | AccessibleObject.setAccessible(AccessibleObject[] array, boolean flag) Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).
void | AccessibleObject.setAccessible(boolean flag) Set the accessible flag for this object to the indicated boolean value.

Uses of SecurityException in java.rmi

Subclasses of SecurityException in java.rmi
 class RMISecurityException
Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.

Uses of SecurityException in java.rmi.server

Methods in java.rmi.server that throw SecurityException
static ClassLoader RMIClassLoader.getClassLoader(String codebase)
Returns a class loader that loads classes from the given codebase URL path.

Uses of SecurityException in java.security

Subclasses of SecurityException in java.security
 class AccessControlException
This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.

Methods in java.security that throw SecurityException
void | Permission.checkGuard(Object object) Implements the guard interface for a permission.
Object | GuardedObject.getObject() Retrieves the guarded object, or throws an exception if access to the guarded object is denied by the guard.
void | Guard.checkGuard(Object object) Determines whether or not to allow access to the guarded object object.

Uses of SecurityException in javax.swing

Methods in javax.swing that throw SecurityException
static void UIManager.setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
Replaces the current array of installed LookAndFeelInfos.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.SecurityManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.SecurityManager

Packages that use SecurityManager
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.rmi | Provides the RMI package.

Uses of SecurityManager in java.lang

Methods in java.lang that return SecurityManager
static SecurityManager System.getSecurityManager()
Gets the system security interface.

Methods in java.lang with parameters of type SecurityManager
static void System.setSecurityManager(SecurityManager s)
Sets the System security.

Uses of SecurityManager in java.rmi

Subclasses of SecurityManager in java.rmi
 class RMISecurityManager
RMISecurityManager provides an example security manager for use by RMI applications that use downloaded code.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Short

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Short

Packages that use Short
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Short in java.lang

Methods in java.lang that return Short
static Short | Short.valueOf(String s, int radix) Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short | Short.valueOf(String s) Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short | Short.decode(String nm) Decodes a String into a Short.

Methods in java.lang with parameters of type Short
 int Short.compareTo(Short anotherShort)
Compares two Shorts numerically.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.String

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.String

Packages that use String
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of String in java.applet

Methods in java.applet that return String
String | Applet.getParameter(String name) Returns the value of the named parameter in the HTML tag.
String | Applet.getAppletInfo() Returns information about this applet.
String[][] | Applet.getParameterInfo() Returns information about the parameters than are understood by this applet.
String | AppletStub.getParameter(String name) Returns the value of the named parameter in the HTML tag.

Methods in java.applet with parameters of type String
Applet | AppletContext.getApplet(String name) Finds and returns the applet in the document represented by this applet context with the given name.
void | AppletContext.showDocument(URL url, String target) Requests that the browser or applet viewer show the Web page indicated by the url argument.
void | AppletContext.showStatus(String status) Requests that the argument string be displayed in the "status window".
String | Applet.getParameter(String name) Returns the value of the named parameter in the HTML tag.
void | Applet.showStatus(String msg) Requests that the argument string be displayed in the "status window".
Image | Applet.getImage(URL url, String name) Returns an Image object that can then be painted on the screen.
AudioClip | Applet.getAudioClip(URL url, String name) Returns the AudioClip object specified by the URL and name arguments.
void | Applet.play(URL url, String name) Plays the audio clip given the URL and a specifier that is relative to it.
String | AppletStub.getParameter(String name) Returns the value of the named parameter in the HTML tag.

Uses of String in java.awt

Fields in java.awt declared as String
static String | BorderLayout.NORTH The north layout constraint (top of container).
static String | BorderLayout.SOUTH The south layout constraint (bottom of container).
static String | BorderLayout.EAST The east layout constraint (right side of container).
static String | BorderLayout.WEST The west layout constraint (left side of container).
static String | BorderLayout.CENTER The center layout constraint (middle of container).
static String | BorderLayout.BEFORE_FIRST_LINE The component comes before the first line of the layout's content.
static String | BorderLayout.AFTER_LAST_LINE The component comes after the last line of the layout's content.
static String | BorderLayout.BEFORE_LINE_BEGINS The component goes at the beginning of the line direction for the layout.
static String | BorderLayout.AFTER_LINE_ENDS The component goes at the end of the line direction for the layout.
protected String | Font.name The logical name of this Font, as passed to the constructor.
protected String | Cursor.name The user-visible name of the cursor.

Methods in java.awt that return String
 String Component.getName()
Gets the name of the component.
protected  String Component.paramString()
Returns a string representing the state of this component.
 String Component.toString()
Returns a string representation of this component and its values.
protected  String Container.paramString()
Returns the parameter string representing the state of this container.
 String Component.AccessibleAWTComponent.getAccessibleName()
Get the accessible name of this object.
 String Component.AccessibleAWTComponent.getAccessibleDescription()
Get the accessible description of this object.
protected  String Event.paramString()
Returns the parameter string representing this event.
 String Event.toString()
Returns a representation of this event's values as a string.
 String CardLayout.toString()
Returns a string representation of the state of this card layout.
abstract  String[] GraphicsEnvironment.getAvailableFontFamilyNames()
Returns an array containing the names of all font families available in this GraphicsEnvironment.
abstract  String[] GraphicsEnvironment.getAvailableFontFamilyNames(Locale l)
Returns an array containing the localized names of all font families available in this GraphicsEnvironment.
 String ScrollPane.paramString()
protected  String Scrollbar.paramString()
Returns the parameter string representing the state of this scroll bar.
 String MenuComponent.getName()
Gets the name of the menu component.
protected  String MenuComponent.paramString()
Returns the parameter string representing the state of this menu component.
 String MenuComponent.toString()
Returns a representation of this menu component as a string.
 String MenuItem.getLabel()
Gets the label for this menu item.
 String MenuItem.getActionCommand()
Gets the command name of the action event that is fired by this menu item.
 String MenuItem.paramString()
Returns the parameter string representing the state of this menu item.
 String Menu.paramString()
Gets the parameter string representing the state of this menu.
 String MenuComponent.AccessibleAWTMenuComponent.getAccessibleName()
Get the accessible name of this object.
 String MenuComponent.AccessibleAWTMenuComponent.getAccessibleDescription()
Get the accessible description of this object.
 String MenuItem.AccessibleAWTMenuItem.getAccessibleName()
Get the accessible name of this object.
 String MenuItem.AccessibleAWTMenuItem.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
 String Checkbox.getLabel()
Gets the label of this check box.
protected  String Checkbox.paramString()
Returns the parameter string representing the state of this check box.
 String Checkbox.AccessibleAWTCheckbox.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
 String FontMetrics.toString()
Returns a representation of this FontMetrics object's values as a String.
 String Graphics.toString()
Returns a String object representing this Graphics object's value.
 String MenuShortcut.toString()
Returns an internationalized description of the MenuShortcut.
protected  String MenuShortcut.paramString()
abstract  String GraphicsDevice.getIDstring()
Returns the identification string associated with this GraphicsDevice.
 String GridLayout.toString()
Returns the string representation of this grid layout's values.
 String BorderLayout.toString()
Returns a string representation of the state of this border layout.
 String Insets.toString()
Returns a string representation of this Insets object.
 String Font.getFamily()
Returns the family name of this Font.
 String Font.getFamily(Locale l)
Returns the family name of this Font, localized for the specified locale.
 String Font.getPSName()
Returns the postscript name of this Font.
 String Font.getName()
Returns the logical name of this Font.
 String Font.getFontName()
Returns the font face name of this Font.
 String Font.getFontName(Locale l)
Returns the font face name of the Font, localized for the specified locale.
 String Font.toString()
Converts this Font object to a String representation.
 String Window.getWarningString()
Gets the warning string that is displayed with this window.
 String Dialog.getTitle()
Gets the title of the dialog.
protected  String Dialog.paramString()
Returns the parameter string representing the state of this dialog window.
 String FileDialog.getDirectory()
Gets the directory of this file dialog.
 String FileDialog.getFile()
Gets the selected file of this file dialog.
protected  String FileDialog.paramString()
Returns the parameter string representing the state of this file dialog window.
 String RenderingHints.toString()
Returns a rather long string representation of the hashmap which contains the mappings of keys to values for this RenderingHints object.
abstract  String[] Toolkit.getFontList()
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames()
static String Toolkit.getProperty(String key, String defaultValue)
Gets a property with the specified key and default.
 String Point.toString()
Returns a string representation of this point and its location in the (x, y) coordinate space.
 String Color.toString()
Returns a string representation of this Color.
 String List.getItem(int index)
Gets the item associated with the specified index.
 String[] List.getItems()
Gets the items in the list.
 String List.getSelectedItem()
Get the selected item on this scrolling list.
 String[] List.getSelectedItems()
Get the selected items on this scrolling list.
protected  String List.paramString()
Returns the parameter string representing the state of this scrolling list.
 String TextComponent.getText()
Gets the text that is presented by this text component.
 String TextComponent.getSelectedText()
Gets the selected text from the text that is presented by this text component.
protected  String TextComponent.paramString()
Returns the parameter string representing the state of this text component.
 String TextComponent.AccessibleAWTTextComponent.getSelectedText()
Returns the portion of the text that is selected.
 String TextComponent.AccessibleAWTTextComponent.getAtIndex(int part, int index)
Returns the String at a given index.
 String TextComponent.AccessibleAWTTextComponent.getAfterIndex(int part, int index)
Returns the String after a given index.
 String TextComponent.AccessibleAWTTextComponent.getBeforeIndex(int part, int index)
Returns the String before a given index.
 String CheckboxGroup.toString()
Returns a string representation of this check box group, including the value of its current selection.
 String Cursor.getName()
Returns the name of this cursor.
 String Cursor.toString()
Returns a string representation of this cursor.
 String Dimension.toString()
Returns a string representation of the values of this Dimension object's height and width fields.
 String Choice.getItem(int index)
Gets the string at the specified index in this Choice menu.
 String Choice.getSelectedItem()
Gets a representation of the current choice as a string.
protected  String Choice.paramString()
Returns the parameter string representing the state of this choice menu.
 String Choice.AccessibleAWTChoice.getAccessibleActionDescription(int i)
Returns a description of the specified action of the object.
 String GridBagLayout.toString()
Returns a string representation of this grid bag layout's values.
 String Frame.getTitle()
Gets the title of the frame.
protected  String Frame.paramString()
Returns the parameter String of this Frame.
 String PageAttributes.toString()
Returns a string representation of this PageAttributes.
 String JobAttributes.getFileName()
Specifies the file name for the output file for jobs using these attributes.
 String JobAttributes.getPrinter()
Returns the destination printer for jobs using these attributes.
 String JobAttributes.toString()
Returns a string representation of this JobAttributes.
 String AWTEvent.toString()
 String AWTEvent.paramString()
Returns a string representing the state of this event.
 String Label.getText()
Gets the text of this label.
protected  String Label.paramString()
Returns the parameter string representing the state of this label.
 String Label.AccessibleAWTLabel.getAccessibleName()
Get the accessible name of this object.
protected  String TextField.paramString()
Returns the parameter string representing the state of this text field.
 String Rectangle.toString()
Returns a String representing this Rectangle and its values.
 String FlowLayout.toString()
Returns a string representation of this FlowLayout object and its values.
 String SystemColor.toString()
Returns the String representation of this Color's values.
 String Button.getLabel()
Gets the label of this button.
 String Button.getActionCommand()
Returns the command name of the action event fired by this button.
protected  String Button.paramString()
Returns the parameter string representing the state of this button.
 String Button.AccessibleAWTButton.getAccessibleName()
Get the accessible name of this object.
 String Button.AccessibleAWTButton.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
 String CheckboxMenuItem.paramString()
Returns the parameter string representing the state of this check box menu item.
 String CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
protected  String TextArea.paramString()
Returns the parameter string representing the state of this text area.
 String Robot.toString()
Returns a string representation of this Robot.

Methods in java.awt with parameters of type String
 void Component.setName(String name)
Sets the name of the component to the specified string.
 void Component.addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.
 void Component.removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
protected  void Component.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Support for reporting bound property changes.
 Component Container.add(String name, Component comp)
Adds the specified component to this container.
 void CardLayout.addLayoutComponent(String name, Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).
 void CardLayout.show(Container parent, String name)
Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
 void MenuComponent.setName(String name)
Sets the name of the component to the specified string.
 void MenuItem.setLabel(String label)
Sets the label for this menu item to the specified label.
 void MenuItem.setActionCommand(String command)
Sets the command name of the action event that is fired by this menu item.
 void Menu.add(String label)
Adds an item with the specified label to this menu.
 void Menu.insert(String label, int index)
Inserts a menu item with the specified label into this menu at the specified position.
 void Checkbox.setLabel(String label)
Sets this check box's label to be the string argument.
 int FontMetrics.stringWidth(String str)
Returns the total advance width for showing the specified String in this Font.
 LineMetrics FontMetrics.getLineMetrics(String str, Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
 LineMetrics FontMetrics.getLineMetrics(String str, int beginIndex, int limit, Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(String str, Graphics context)
Returns the bounds of the specified String in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context)
Returns the bounds of the specified String in the specified Graphics context.
abstract  void Graphics.drawString(String str, int x, int y)
Draws the text given by the specified string, using this graphics context's current font and color.
abstract  void Graphics2D.drawString(String str, int x, int y)
Renders the text of the specified String, using the current Font and Paint attributes in the Graphics2D context.
abstract  void Graphics2D.drawString(String s, float x, float y)
Renders the text specified by the specified String, using the current Font and Paint attributes in the Graphics2D context.
protected  void AWTEventMulticaster.saveInternal(ObjectOutputStream s, String k)
protected static void AWTEventMulticaster.save(ObjectOutputStream s, String k, EventListener l)
 void GridLayout.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
 void BorderLayout.addLayoutComponent(String name, Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object).
static Font Font.getFont(String nm)
Returns a Font object from the system properties list.
static Font Font.decode(String str)
Returns the Font that the str argument describes.
static Font Font.getFont(String nm, Font font)
Gets the specified Font from the system properties list.
 int Font.canDisplayUpTo(String str)
Indicates whether or not this Font can display a specified String.
 LineMetrics Font.getLineMetrics(String str, FontRenderContext frc)
Returns a LineMetrics object created with the specified String and FontRenderContext.
 LineMetrics Font.getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc)
Returns a LineMetrics object created with the specified arguments.
 Rectangle2D Font.getStringBounds(String str, FontRenderContext frc)
Returns the bounds of the specified String in the specified FontRenderContext.
 Rectangle2D Font.getStringBounds(String str, int beginIndex, int limit, FontRenderContext frc)
Returns the bounds of the specified String in the specified FontRenderContext.
 GlyphVector Font.createGlyphVector(FontRenderContext frc, String str)
Returns a new GlyphVector object created with the specified String and the specified FontRenderContext.
 void Window.applyResourceBundle(String rbName)
Load the ResourceBundle with the given name using the default locale and apply its settings to this window.
 void Dialog.setTitle(String title)
Sets the title of the Dialog.
 void FileDialog.setDirectory(String dir)
Sets the directory of this file dialog window to be the specified directory.
 void FileDialog.setFile(String file)
Sets the selected file for this file dialog window to be the specified file.
 void LayoutManager.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
protected abstract  java.awt.peer.FontPeer Toolkit.getFontPeer(String name, int style)
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts
abstract  Image Toolkit.getImage(String filename)
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
abstract  Image Toolkit.createImage(String filename)
Returns an image which gets pixel data from the specified file.
abstract  PrintJob Toolkit.getPrintJob(Frame frame, String jobtitle, Properties props)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
 PrintJob Toolkit.getPrintJob(Frame frame, String jobtitle, JobAttributes jobAttributes, PageAttributes pageAttributes)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
 Cursor Toolkit.createCustomCursor(Image cursor, Point hotSpot, String name)
Creates a new custom cursor object.
static String Toolkit.getProperty(String key, String defaultValue)
Gets a property with the specified key and default.
 Object Toolkit.getDesktopProperty(String propertyName)
obtain a value for the specified desktop property.
protected  void Toolkit.setDesktopProperty(String name, Object newValue)
set the named desktop property to the specified value and fire a property change event to notify any listeners that the value has changed
protected  Object Toolkit.lazilyLoadDesktopProperty(String name)
an opportunity to lazily evaluate desktop property values.
 void Toolkit.addPropertyChangeListener(String name, PropertyChangeListener pcl)
add the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
 void Toolkit.removePropertyChangeListener(String name, PropertyChangeListener pcl)
remove the specified property change listener for the named desktop property If pcl is null, no exception is thrown and no action is performed.
static Color Color.decode(String nm)
Converts a String to an integer and returns the specified opaque Color.
static Color Color.getColor(String nm)
Finds a color in the system properties.
static Color Color.getColor(String nm, Color v)
Finds a color in the system properties.
static Color Color.getColor(String nm, int v)
Finds a color in the system properties.
 void List.add(String item)
Adds the specified item to the end of scrolling list.
 void List.addItem(String item)
Deprecated. replaced by add(String).
 void List.add(String item, int index)
Adds the specified item to the the scrolling list at the position indicated by the index.
 void List.addItem(String item, int index)
Deprecated. replaced by add(String, int).
 void List.replaceItem(String newValue, int index)
Replaces the item at the specified index in the scrolling list with the new string.
 void List.remove(String item)
Removes the first occurrence of an item from the list.
 void TextComponent.setText(String t)
Sets the text that is presented by this text component to be the specified text.
static Cursor Cursor.getSystemCustomCursor(String name)
 void Choice.add(String item)
Adds an item to this Choice menu.
 void Choice.addItem(String item)
Adds an item to this Choice.
 void Choice.insert(String item, int index)
Inserts the item into this choice at the specified position.
 void Choice.remove(String item)
Remove the first occurrence of item from the Choice menu.
 void Choice.select(String str)
Sets the selected item in this Choice menu to be the item whose name is equal to the specified string.
 void GridBagLayout.addLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
 void Frame.setTitle(String title)
Sets the title for this frame to the specified string.
 void JobAttributes.setFileName(String fileName)
Specifies the file name for the output file for jobs using these attributes.
 void JobAttributes.setPrinter(String printer)
Specifies the destination printer for jobs using these attributes.
 void Label.setText(String text)
Sets the text for this label to the specified text.
 void TextField.setText(String t)
Sets the text that is presented by this text component to be the specified text.
 void FlowLayout.addLayoutComponent(String name, Component comp)
Adds the specified component to the layout.
 void Button.setLabel(String label)
Sets the button's label to be the specified string.
 void Button.setActionCommand(String command)
Sets the command name for the action event fired by this button.
 void TextArea.insert(String str, int pos)
Inserts the specified text at the specified position in this text area.
 void TextArea.insertText(String str, int pos)
Deprecated. As of JDK version 1.1, replaced by insert(String, int).
 void TextArea.append(String str)
Appends the given text to the text area's current text.
 void TextArea.appendText(String str)
Deprecated. As of JDK version 1.1, replaced by append(String).
 void TextArea.replaceRange(String str, int start, int end)
Replaces text between the indicated start and end positions with the specified replacement text.
 void TextArea.replaceText(String str, int start, int end)
Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).
abstract  Object Image.getProperty(String name, ImageObserver observer)
Gets a property of this image by name.

Constructors in java.awt with parameters of type String
AWTPermission(String name)
Creates a new AWTPermission with the specified name.
AWTPermission(String name, String actions)
Creates a new AWTPermission object with the specified name.
MenuItem(String label)
Constructs a new MenuItem with the specified label and no keyboard shortcut.
MenuItem(String label, MenuShortcut s)
Create a menu item with an associated keyboard shortcut.
Menu(String label)
Constructs a new menu with the specified label.
Menu(String label, boolean tearOff)
Constructs a new menu with the specified label, indicating whether the menu can be torn off.
Checkbox(String label)
Creates a check box with the specified label.
Checkbox(String label, boolean state)
Creates a check box with the specified label and sets the specified state.
Checkbox(String label, boolean state, CheckboxGroup group)
Creates a check box with the specified label, in the specified check box group, and set to the specified state.
Checkbox(String label, CheckboxGroup group, boolean state)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.
FontFormatException(String reason)
Report a FontFormatException for the reason specified.
IllegalComponentStateException(String s)
Constructs an IllegalComponentStateException with the specified detail message.
Font(String name, int style, int size)
Creates a new Font from the specified name, style and point size.
Dialog(Frame owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner frame and title.
Dialog(Frame owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner frame, title, and modality.
Dialog(Dialog owner, String title)
Constructs an initially invisible, non-modal Dialog with the specified owner dialog and title.
Dialog(Dialog owner, String title, boolean modal)
Constructs an initially invisible Dialog with the specified owner dialog, title, and modality.
FileDialog(Frame parent, String title)
Creates a file dialog window with the specified title for loading a file.
FileDialog(Frame parent, String title, int mode)
Creates a file dialog window with the specified title for loading or saving a file.
AWTError(String msg)
Constructs an instance of AWTError with the specified detail message.
PopupMenu(String label)
Creates a new popup menu with the specified name.
Cursor(String name)
Creates a new custom cursor object with the specified name.
Frame(String title)
Constructs a new, initially invisible Frame object with the specified title.
Frame(String title, GraphicsConfiguration gc)
Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.
JobAttributes(int copies, JobAttributes.DefaultSelectionType defaultSelection, JobAttributes.DestinationType destination, JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, JobAttributes.SidesType sides)
Constructs a JobAttributes instance with the specified values for every attribute.
AWTException(String msg)
Constructs an instance of AWTException with the specified detail message.
Label(String text)
Constructs a new label with the specified string of text, left justified.
Label(String text, int alignment)
Constructs a new label that presents the specified string of text with the specified alignment.
TextField(String text)
Constructs a new text field initialized with the specified text.
TextField(String text, int columns)
Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns.
Button(String label)
Constructs a Button with the specified label.
CheckboxMenuItem(String label)
Create a check box menu item with the specified label.
CheckboxMenuItem(String label, boolean state)
Create a check box menu item with the specified label and state.
TextArea(String text)
Constructs a new text area with the specified text.
TextArea(String text, int rows, int columns)
Constructs a new text area with the specified text, and with the specified number of rows and columns.
TextArea(String text, int rows, int columns, int scrollbars)
Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified.

Uses of String in java.awt.color

Methods in java.awt.color that return String
 String ColorSpace.getName(int idx)
Returns the name of the component given the component index

Methods in java.awt.color with parameters of type String
static ICC_Profile | ICC_Profile.getInstance(String fileName) Constructs an ICC_Profile corresponding to the data in a file.
void | ICC_Profile.write(String fileName) Write this ICC_Profile to a file.

Constructors in java.awt.color with parameters of type String
CMMException(String s)
Constructs a CMMException with the specified detail message.
ProfileDataException(String s)
Constructs a ProfileDataException with the specified detail message.

Uses of String in java.awt.datatransfer

Fields in java.awt.datatransfer declared as String
static String | DataFlavor.javaSerializedObjectMimeType a MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent.
static String | DataFlavor.javaJVMLocalObjectMimeType to transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type, across a Transferable interface WITHIN THE SAME JVM, a DataFlavor with this type/subtype is used, with a representationClass equal to the type of the class/interface being passed across the Transferble.
static String | DataFlavor.javaRemoteObjectMimeType In order to pass a live link to a Remote object via a Drag and Drop ACTION_LINK operation a Mime Content Type of application/x-java-remote-object should be used, where the representation class of the DataFlavor represents the type of the Remote interface to be transferred.

Methods in java.awt.datatransfer that return String
String | Clipboard.getName() Returns the name of this clipboard object.
static String | SystemFlavorMap.encodeJavaMIMEType(String mimeType)
static String | SystemFlavorMap.encodeDataFlavor(DataFlavor df)
static String | SystemFlavorMap.decodeJavaMIMEType(String atom)
String | DataFlavor.toString() String representation of this DataFlavor and its parameters.
String | DataFlavor.getMimeType() Returns the MIME type string for this DataFlavor
String | DataFlavor.getHumanPresentableName() Returns the human presentable name for the data foramt that this DataFlavor represents.
String | DataFlavor.getPrimaryType()
String | DataFlavor.getSubType()
String | DataFlavor.getParameter(String paramName)
String | DataFlavor.getDefaultRepresentationClassAsString()
protected String | DataFlavor.normalizeMimeTypeParameter(String parameterName, String parameterValue) Deprecated.
protected String | DataFlavor.normalizeMimeType(String mimeType) Deprecated.

Methods in java.awt.datatransfer with parameters of type String
 Map SystemFlavorMap.getFlavorsForNatives(String[] natives)
map natives to corresponding flavors
static String SystemFlavorMap.encodeJavaMIMEType(String mimeType)
static boolean SystemFlavorMap.isJavaMIMEType(String atom)
static String SystemFlavorMap.decodeJavaMIMEType(String atom)
static DataFlavor SystemFlavorMap.decodeDataFlavor(String atom)
protected static Class DataFlavor.tryToLoadClass(String className, ClassLoader fallback)
tried to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified
 String DataFlavor.getParameter(String paramName)
 void DataFlavor.setHumanPresentableName(String humanPresentableName)
Sets the human presentable name for the data format that this DataFlavor represents.
 boolean DataFlavor.equals(String s)
Deprecated. As inconsistent with hashCode() contract, use isMimeTypeEqual(String) instead.
 boolean DataFlavor.isMimeTypeEqual(String mimeType)
Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of this DataFlavor.
protected  String DataFlavor.normalizeMimeTypeParameter(String parameterName, String parameterValue)
Deprecated.
protected  String DataFlavor.normalizeMimeType(String mimeType)
Deprecated.
 Map FlavorMap.getFlavorsForNatives(String[] natives)
map natives to corresponding flavors

Constructors in java.awt.datatransfer with parameters of type String
StringSelection(String data)
Creates a Transferable capable of transferring the specified String.
Clipboard(String name)
Creates a clipboard object.
DataFlavor(Class representationClass, String humanPresentableName)
Construct a DataFlavor that represents a Java class
DataFlavor(String mimeType, String humanPresentableName)
Construct a DataFlavor that represents a MimeType
DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader)
Construct a DataFlavor that represents a MimeType
DataFlavor(String mimeType)
Construct a DataFlavor from a Mime Type string.
MimeTypeParseException(String s)
Constructs a MimeTypeParseException with the specified detail message.

Uses of String in java.awt.dnd

Constructors in java.awt.dnd with parameters of type String
InvalidDnDOperationException(String msg)
Create an Exception with its own descriptive message

Uses of String in java.awt.event

Methods in java.awt.event that return String
String | InputMethodEvent.paramString() Returns a parameter string identifying this event.
String | HierarchyEvent.paramString() Returns a parameter string identifying this event.
String | ComponentEvent.paramString() Returns a parameter string identifying this event.
String | WindowEvent.paramString() Returns a parameter string identifying this event.
String | ContainerEvent.paramString() Returns a parameter string identifying this event.
String | ActionEvent.getActionCommand() Returns the command string associated with this action.
String | ActionEvent.paramString() Returns a parameter string identifying this action event.
String | MouseEvent.paramString() Returns a parameter string identifying this event.
String | TextEvent.paramString() Returns a parameter string identifying this text event.
String | PaintEvent.paramString()
String | AdjustmentEvent.paramString()
String | ItemEvent.paramString() Returns a parameter string identifying this item event.
String | FocusEvent.paramString() Returns a parameter string identifying this event.
String | InvocationEvent.paramString() Returns a parameter string identifying this event.
static String | KeyEvent.getKeyText(int keyCode) Returns a String describing the keyCode, such as "HOME", "F1" or "A".
static String | KeyEvent.getKeyModifiersText(int modifiers) Returns a String describing the modifier key(s), such as "Shift", or "Ctrl+Shift".
String | KeyEvent.paramString() Returns a parameter string identifying this event.

Constructors in java.awt.event with parameters of type String
ActionEvent(Object source, int id, String command)
Constructs an ActionEvent object.
ActionEvent(Object source, int id, String command, int modifiers)
Constructs an ActionEvent object with modifier keys.

Uses of String in java.awt.font

Methods in java.awt.font that return String
String | TextLayout.toString() Returns debugging information for this TextLayout.
String[] | MultipleMaster.getDesignAxisNames() Returns the name for each design axis.
String | TextHitInfo.toString() Returns a String representing the hit for debugging use only.

Methods in java.awt.font with parameters of type String
byte[] | OpenType.getFontTable(String strSfntTag) Returns the table as an array of bytes for a specified tag.
byte[] | OpenType.getFontTable(String strSfntTag, int offset, int count) Returns a subset of the table as an array of bytes for a specified tag.
int | OpenType.getFontTableSize(String strSfntTag) Returns the size of the table for a specified tag.

Constructors in java.awt.font with parameters of type String
TextLayout(String string, Font font, FontRenderContext frc)
Constructs a TextLayout from a String and a Font.
TextLayout(String string, Map attributes, FontRenderContext frc)
Constructs a TextLayout from a String and an attribute set.
TextAttribute(String name)
Constructs a TextAttribute with the specified name.

Uses of String in java.awt.geom

Methods in java.awt.geom that return String
String | Rectangle2D.Float.toString() Returns the String representation of this Rectangle2D.
String | Rectangle2D.Double.toString() Returns the String representation of this Rectangle2D.
String | Point2D.Float.toString() Returns a String that represents the value of this Point2D.
String | Point2D.Double.toString() Returns a String that represents the value of this Point2D.
String | AffineTransform.toString() Returns a String that represents the value of this Object.

Constructors in java.awt.geom with parameters of type String
NoninvertibleTransformException(String s)
Constructs an instance of NoninvertibleTransformException with the specified detail message.
IllegalPathStateException(String s)
Constructs an IllegalPathStateException with the specified detail message.

Uses of String in java.awt.im.spi

Methods in java.awt.im.spi that return String
 String InputMethodDescriptor.getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage)
Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.

Methods in java.awt.im.spi with parameters of type String
 Window InputMethodContext.createInputMethodWindow(String title, boolean attachToInputContext)
Creates a top-level window for use by the input method.

Uses of String in java.awt.image

Methods in java.awt.image that return String
String[] | RenderedImage.getPropertyNames() Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
String | BufferedImage.toString() Returns a String representation of this BufferedImage object and its values.
String[] | BufferedImage.getPropertyNames() Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
String | ColorModel.toString() Returns the String representation of the contents of this ColorModelobject.
String | DirectColorModel.toString() Returns a String that represents this DirectColorModel.
String | IndexColorModel.toString() Returns the String representation of the contents of this ColorModelobject.

Methods in java.awt.image with parameters of type String
Object | RenderedImage.getProperty(String name) Gets a property from the property set of this image.
Object | BufferedImage.getProperty(String name, ImageObserver observer) Returns a property of the image by name.
Object | BufferedImage.getProperty(String name) Returns a property of the image by name.

Constructors in java.awt.image with parameters of type String
RasterFormatException(String s)
Constructs a new RasterFormatException with the specified message.
ImagingOpException(String s)
Constructs an ImagingOpException object with the specified message.

Uses of String in java.awt.image.renderable

Fields in java.awt.image.renderable declared as String
static String RenderableImage.HINTS_OBSERVED
String constant that can be used to identify a property on a RenderedImage obtained via the createRendering or createScaledRendering methods.

Methods in java.awt.image.renderable that return String
String[] | ContextualRenderedImageFactory.getPropertyNames() Returns a list of names recognized by getProperty.
String[] | RenderableImageOp.getPropertyNames() Return a list of names recognized by getProperty.
String[] | RenderableImage.getPropertyNames() Returns a list of names recognized by getProperty.

Methods in java.awt.image.renderable with parameters of type String
Object | ContextualRenderedImageFactory.getProperty(ParameterBlock paramBlock, String name) Gets the appropriate instance of the property specified by the name parameter.
Object | RenderableImageOp.getProperty(String name) Gets a property from the property set of this image.
Object | RenderableImage.getProperty(String name) Gets a property from the property set of this image.

Uses of String in java.awt.print

Methods in java.awt.print that return String
abstract String | PrinterJob.getUserName() Gets the name of the printing user.
abstract String | PrinterJob.getJobName() Gets the name of the document to be printed.

Methods in java.awt.print with parameters of type String
abstract  void PrinterJob.setJobName(String jobName)
Sets the name of the document to be printed.

Constructors in java.awt.print with parameters of type String
PrinterException(String msg)
Constructs a new PrinterException object with the specified detail message.
PrinterAbortException(String msg)
Constructs a new PrinterAbortException with the specified detail message.

Uses of String in java.beans

Fields in java.beans declared as String
static String DesignMode.PROPERTYNAME
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.

Methods in java.beans that return String
String | FeatureDescriptor.getName() Gets the programmatic name of this feature.
String | FeatureDescriptor.getDisplayName() Gets the localized display name of this feature.
String | FeatureDescriptor.getShortDescription() Gets the short description of this feature.
String | PropertyEditor.getJavaInitializationString() This method is intended for use when generating Java code to set the value of the property.
String | PropertyEditor.getAsText() Gets the property value as text.
String[] | PropertyEditor.getTags() If the property value must be one of a set of known tagged values, then this method should return an array of the tags.
static String | Introspector.decapitalize(String name) Utility method to take a string and convert it to normal Java variable name capitalization.
static String[] | Introspector.getBeanInfoSearchPath() Gets the list of package names that will be used for finding BeanInfo classes.
static String[] | PropertyEditorManager.getEditorSearchPath() Gets the package names that will be searched for property editors.
String | PropertyEditorSupport.getJavaInitializationString() This method is intended for use when generating Java code to set the value of the property.
String | PropertyEditorSupport.getAsText() Gets the property value as a string suitable for presentation to a human to edit.
String[] | PropertyEditorSupport.getTags() If the property value must be one of a set of known tagged values, then this method should return an array of the tag values.
String | PropertyChangeEvent.getPropertyName() Gets the programmatic name of the property that was changed.

Methods in java.beans with parameters of type String
void | FeatureDescriptor.setName(String name) Sets the programmatic name of this feature.
void | FeatureDescriptor.setDisplayName(String displayName) Sets the localized display name of this feature.
void | FeatureDescriptor.setShortDescription(String text) You can associate a short descriptive string with a feature.
void | FeatureDescriptor.setValue(String attributeName, Object value) Associate a named attribute with this feature.
Object | FeatureDescriptor.getValue(String attributeName) Retrieve a named attribute with this feature.
void | PropertyEditor.setAsText(String text) Set the property value by parsing a given String.
Image | SimpleBeanInfo.loadImage(String resourceName) This is a utility method to help in loading icon images.
void | PropertyChangeSupport.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | PropertyChangeSupport.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
void | PropertyChangeSupport.firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
void | PropertyChangeSupport.firePropertyChange(String propertyName, int oldValue, int newValue) Report an int bound property update to any registered listeners.
void | PropertyChangeSupport.firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Report a boolean bound property update to any registered listeners.
boolean | PropertyChangeSupport.hasListeners(String propertyName) Check if there are any listeners for a specific property.
static Object | Beans.instantiate(ClassLoader cls, String beanName) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext) Instantiate a JavaBean.
static Object | Beans.instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) Instantiate a bean.
static String | Introspector.decapitalize(String name) Utility method to take a string and convert it to normal Java variable name capitalization.
static void | Introspector.setBeanInfoSearchPath(String[] path) Change the list of package names that will be used for finding BeanInfo classes.
static void | PropertyEditorManager.setEditorSearchPath(String[] path) Change the list of package names that will be used for finding property editors.
void | VetoableChangeSupport.addVetoableChangeListener(String propertyName, VetoableChangeListener listener) Add a VetoableChangeListener for a specific property.
void | VetoableChangeSupport.removeVetoableChangeListener(String propertyName, VetoableChangeListener listener) Remove a VetoableChangeListener for a specific property.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, Object oldValue, Object newValue) Report a vetoable property update to any registered listeners.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, int oldValue, int newValue) Report a int vetoable property update to any registered listeners.
void | VetoableChangeSupport.fireVetoableChange(String propertyName, boolean oldValue, boolean newValue) Report a boolean vetoable property update to any registered listeners.
boolean | VetoableChangeSupport.hasListeners(String propertyName) Check if there are any listeners for a specific property.
void | PropertyEditorSupport.setAsText(String text) Sets the property value by parsing a given String.

Constructors in java.beans with parameters of type String
PropertyDescriptor(String propertyName, Class beanClass)
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.
PropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName)
This constructor takes the name of a simple property, and method names for reading and writing the property.
PropertyDescriptor(String propertyName, Method getter, Method setter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
IndexedPropertyDescriptor(String propertyName, Class beanClass)
This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.
IndexedPropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName, String indexedGetterName, String indexedSetterName)
This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.
IndexedPropertyDescriptor(String propertyName, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
PropertyVetoException(String mess, PropertyChangeEvent evt)
Constructs a PropertyVetoException with a detailed message.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String listenerMethodName)
This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.
EventSetDescriptor(Class sourceClass, String eventSetName, Class listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName)
This constructor creates an EventSetDescriptor from scratch using string names.
EventSetDescriptor(String eventSetName, Class listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
IntrospectionException(String mess)
Constructs an IntrospectionException with a detailed message.
PropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue)
Constructs a new PropertyChangeEvent.

Uses of String in java.beans.beancontext

Methods in java.beans.beancontext with parameters of type String
 void BeanContextChild.addPropertyChangeListener(String name, PropertyChangeListener pcl)
Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
 void BeanContextChild.removePropertyChangeListener(String name, PropertyChangeListener pcl)
Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
 void BeanContextChild.addVetoableChangeListener(String name, VetoableChangeListener vcl)
Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
 void BeanContextChild.removeVetoableChangeListener(String name, VetoableChangeListener vcl)
Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
 void BeanContextChildSupport.addPropertyChangeListener(String name, PropertyChangeListener pcl)
Adds a property change listener.
 void BeanContextChildSupport.removePropertyChangeListener(String name, PropertyChangeListener pcl)
Remove a property change listener.
 void BeanContextChildSupport.addVetoableChangeListener(String name, VetoableChangeListener vcl)
Adds a VetoableChangeListener.
 void BeanContextChildSupport.removeVetoableChangeListener(String name, VetoableChangeListener vcl)
Removes a VetoableChangeListener.
 void BeanContextChildSupport.firePropertyChange(String name, Object oldValue, Object newValue)
Report a bound property update to any registered listeners.
 void BeanContextChildSupport.fireVetoableChange(String name, Object oldValue, Object newValue)
Report a vetoable property update to any registered listeners.
 Object BeanContextSupport.instantiateChild(String beanName)
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
 InputStream BeanContextSupport.getResourceAsStream(String name, BeanContextChild bcc)
 URL BeanContextSupport.getResource(String name, BeanContextChild bcc)
 Object BeanContext.instantiateChild(String beanName)
Instantiate the javaBean named as a child of this BeanContext.
 InputStream BeanContext.getResourceAsStream(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 URL BeanContext.getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Uses of String in java.io

Fields in java.io declared as String
String | StreamTokenizer.sval If the current token is a word token, this field contains a string giving the characters of the word token.
String | InvalidClassException.classname Name of the invalid class.
static String | File.separator The system-dependent default name-separator character, represented as a string for convenience.
static String | File.pathSeparator The system-dependent path-separator character, represented as a string for convenience.
protected String | StringBufferInputStream.buffer Deprecated. The string from which bytes are read.

Methods in java.io that return String
 String BufferedReader.readLine()
Read a line of text.
 String LineNumberReader.readLine()
Read a line of text.
 String StreamTokenizer.toString()
Returns the string representation of the current stream token.
 String InvalidClassException.getMessage()
Produce the message and include the classname, if present.
 String FilePermission.getActions()
Returns the "canonical string representation" of the actions.
 String ObjectInputStream.readLine()
Deprecated. This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.
 String ObjectInputStream.readUTF()
Reads a UTF format String.
 String InputStreamReader.getEncoding()
Returns the canonical name of the character encoding being used by this stream.
 String WriteAbortedException.getMessage()
Produce the message and include the message from the nested exception, if there is one.
 String File.getName()
Returns the name of the file or directory denoted by this abstract pathname.
 String File.getParent()
Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.
 String File.getPath()
Converts this abstract pathname into a pathname string.
 String File.getAbsolutePath()
Returns the absolute pathname string of this abstract pathname.
 String File.getCanonicalPath()
Returns the canonical pathname string of this abstract pathname.
 String[] File.list()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.
 String[] File.list(FilenameFilter filter)
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
 String File.toString()
Returns the pathname string of this abstract pathname.
 String StringWriter.toString()
Return the buffer's current value as a string.
 String OutputStreamWriter.getEncoding()
Returns the canonical name of the character encoding being used by this stream.
 String DataInput.readLine()
Reads the next line of text from the input stream.
 String DataInput.readUTF()
Reads in a string that has been encoded using a modified UTF-8 format.
 String ObjectStreamClass.getName()
The name of the class described by this descriptor.
 String ObjectStreamClass.toString()
Return a string describing this ObjectStreamClass.
 String ObjectStreamField.getName()
Get the name of this field.
 String ObjectStreamField.getTypeString()
Return the JVM type signature.
 String ObjectStreamField.toString()
Return a string that describes this field.
 String CharArrayWriter.toString()
Converts input data to a string.
 String RandomAccessFile.readLine()
Reads the next line of text from this file.
 String RandomAccessFile.readUTF()
Reads in a string from this file.
 String ByteArrayOutputStream.toString()
Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
 String ByteArrayOutputStream.toString(String enc)
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
 String ByteArrayOutputStream.toString(int hibyte)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding.
 String DataInputStream.readLine()
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 String DataInputStream.readUTF()
See the general contract of the readUTF method of DataInput.
static String DataInputStream.readUTF(DataInput in)
Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.

Methods in java.io with parameters of type String
void | Writer.write(String str) Write a string.
void | Writer.write(String str, int off, int len) Write a portion of a string.
void | FilterWriter.write(String str, int off, int len) Write a portion of a string.
void | PrintStream.print(String s) Print a string.
void | PrintStream.println(String x) Print a String and then terminate the line.
void | DataOutputStream.writeBytes(String s) Writes out the string to the underlying output stream as a sequence of bytes.
void | DataOutputStream.writeChars(String s) Writes a string to the underlying output stream as a sequence of characters.
void | DataOutputStream.writeUTF(String str) Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
protected Class | ObjectInputStream.resolveProxyClass(String[] interfaces) Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
abstract boolean | ObjectInputStream.GetField.defaulted(String name) Return true if the named field is defaulted and has no value in this stream.
abstract boolean | ObjectInputStream.GetField.get(String name, boolean defvalue) Get the value of the named boolean field from the persistent field.
abstract char | ObjectInputStream.GetField.get(String name, char defvalue) Get the value of the named char field from the persistent fields.
abstract byte | ObjectInputStream.GetField.get(String name, byte defvalue) Get the value of the named byte field from the persistent fields.
abstract short | ObjectInputStream.GetField.get(String name, short defvalue) Get the value of the named short field from the persistent fields.
abstract int | ObjectInputStream.GetField.get(String name, int defvalue) Get the value of the named int field from the persistent fields.
abstract long | ObjectInputStream.GetField.get(String name, long defvalue) Get the value of the named long field from the persistent fields.
abstract float | ObjectInputStream.GetField.get(String name, float defvalue) Get the value of the named float field from the persistent fields.
abstract double | ObjectInputStream.GetField.get(String name, double defvalue) Get the value of the named double field from the persistent field.
abstract Object | ObjectInputStream.GetField.get(String name, Object defvalue) Get the value of the named Object field from the persistent field.
static File | File.createTempFile(String prefix, String suffix, File directory) Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
static File | File.createTempFile(String prefix, String suffix) Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
void | DataOutput.writeBytes(String s) Writes a string to the output stream.
void | DataOutput.writeChars(String s) Writes every character in the string s, to the output stream, in order, two bytes per character.
void | DataOutput.writeUTF(String str) Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s.
void | StringWriter.write(String str) Write a string.
void | StringWriter.write(String str, int off, int len) Write a portion of a string.
void | OutputStreamWriter.write(String str, int off, int len) Write a portion of a string.
boolean | FilenameFilter.accept(File dir, String name) Tests if a specified file should be included in a file list.
void | PrintWriter.write(String s, int off, int len) Write a portion of a string.
void | PrintWriter.write(String s) Write a string.
void | PrintWriter.print(String s) Print a string.
void | PrintWriter.println(String x) Print a String and then terminate the line.
void | ObjectOutputStream.writeBytes(String data) Writes a String as a sequence of bytes.
void | ObjectOutputStream.writeChars(String data) Writes a String as a sequence of chars.
void | ObjectOutputStream.writeUTF(String s) Primitive data write of this String in UTF format.
abstract void | ObjectOutputStream.PutField.put(String name, boolean value) Put the value of the named boolean field into the persistent field.
abstract void | ObjectOutputStream.PutField.put(String name, char value) Put the value of the named char field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, byte value) Put the value of the named byte field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, short value) Put the value of the named short field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, int value) Put the value of the named int field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, long value) Put the value of the named long field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, float value) Put the value of the named float field into the persistent fields.
abstract void | ObjectOutputStream.PutField.put(String name, double value) Put the value of the named double field into the persistent field.
abstract void | ObjectOutputStream.PutField.put(String name, Object value) Put the value of the named Object field into the persistent field.
ObjectStreamField | ObjectStreamClass.getField(String name) Get the field of this class by name.
void | CharArrayWriter.write(String str, int off, int len) Write a portion of a string to the buffer.
void | RandomAccessFile.writeBytes(String s) Writes the string to the file as a sequence of bytes.
void | RandomAccessFile.writeChars(String s) Writes a string to the file as a sequence of characters.
void | RandomAccessFile.writeUTF(String str) Writes a string to the file using UTF-8 encoding in a machine-independent manner.
String | ByteArrayOutputStream.toString(String enc) Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.
void | BufferedWriter.write(String s, int off, int len) Write a portion of a String.

Constructors in java.io with parameters of type String
IOException(String s)
Constructs an IOException with the specified detail message.
ObjectStreamException(String classname)
Create an ObjectStreamException with the specified argument.
NotSerializableException(String classname)
Constructs a NotSerializableException object with message string.
FileOutputStream(String name)
Creates an output file stream to write to the file with the specified name.
FileOutputStream(String name, boolean append)
Creates an output file stream to write to the file with the specified name.
InterruptedIOException(String s)
Constructs an InterruptedIOException with the specified detail message.
StringReader(String s)
Create a new string reader.
InvalidClassException(String reason)
Report a InvalidClassException for the reason specified.
InvalidClassException(String cname, String reason)
Constructs an InvalidClassException object.
FilePermission(String path, String actions)
Creates a new FilePermission object with the specified actions.
InputStreamReader(InputStream in, String enc)
Create an InputStreamReader that uses the named character encoding.
WriteAbortedException(String s, Exception ex)
Thrown during a read operation when one of the ObjectStreamExceptions was thrown during a write operation.
NotActiveException(String reason)
Constructor to create a new NotActiveException with the reason given.
File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname.
File(String parent, String child)
Creates a new File instance from a parent pathname string and a child pathname string.
File(File parent, String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.
FileReader(String fileName)
Creates a new FileReader, given the name of the file to read from.
StringBufferInputStream(String s)
Deprecated. Creates a string input stream to read data from the specified string.
OutputStreamWriter(OutputStream out, String enc)
Create an OutputStreamWriter that uses the named character encoding.
UnsupportedEncodingException(String s)
Constructs an UnsupportedEncodingException with a detail message.
FileWriter(String fileName)
Constructs a FileWriter object given a file name.
FileWriter(String fileName, boolean append)
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
InvalidObjectException(String reason)
Constructs an InvalidObjectException.
UTFDataFormatException(String s)
Constructs a UTFDataFormatException with the specified detail message.
ObjectStreamField(String n, Class clazz)
Create a Serializable field with the specified type.
SyncFailedException(String desc)
Constructs an SyncFailedException with a detail message.
FileNotFoundException(String s)
Constructs a FileNotFoundException with the specified detail message.
StreamCorruptedException(String reason)
Create a StreamCorruptedException and list a reason why thrown.
RandomAccessFile(String name, String mode)
Creates a random access file stream to read from, and optionally to write to, a file with the specified name.
RandomAccessFile(File file, String mode)
Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
EOFException(String s)
Constructs an EOFException with the specified detail message.
CharConversionException(String s)
This provides a detailed message.
FileInputStream(String name)
Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.
SerializablePermission(String name)
Creates a new SerializablePermission with the specified name.
SerializablePermission(String name, String actions)
Creates a new SerializablePermission object with the specified name.

Uses of String in java.lang

Methods in java.lang that return String
 String Object.toString()
Returns a string representation of the object.
 String Throwable.getMessage()
Returns the error message string of this throwable object.
 String Throwable.getLocalizedMessage()
Creates a localized description of this Throwable.
 String Throwable.toString()
Returns a short description of this throwable object.
 String Character.toString()
Returns a String object representing this character's value.
 String Character.Subset.toString()
Returns the name of this subset.
static String Long.toString(long i, int radix)
Creates a string representation of the first argument in the radix specified by the second argument.
static String Long.toHexString(long i)
Creates a string representation of the long argument as an unsigned integer in base 16.
static String Long.toOctalString(long i)
Creates a string representation of the long argument as an unsigned integer in base 8.
static String Long.toBinaryString(long i)
Creates a string representation of the long argument as an unsigned integer in base 2.
static String Long.toString(long i)
Returns a new String object representing the specified integer.
 String Long.toString()
Returns a String object representing this Long's value.
static String System.getProperty(String key)
Gets the system property indicated by the specified key.
static String System.getProperty(String key, String def)
Gets the system property indicated by the specified key.
static String System.setProperty(String key, String value)
Sets the system property indicated by the specified key.
static String System.getenv(String name)
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding get TypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();
static String System.mapLibraryName(String libname)
Maps a library name into a platform-specific string representing a native library.
 String ThreadGroup.getName()
Returns the name of this thread group.
 String ThreadGroup.toString()
Returns a string representation of this Thread group.
 String Thread.getName()
Returns this thread's name.
 String Thread.toString()
Returns a string representation of this thread, including the thread's name, priority, and thread group.
static String Short.toString(short s)
Returns a new String object representing the specified Short.
 String Short.toString()
Returns a String object representing this Short's value.
 String String.substring(int beginIndex)
Returns a new string that is a substring of this string.
 String String.substring(int beginIndex, int endIndex)
Returns a new string that is a substring of this string.
 String String.concat(String str)
Concatenates the specified string to the end of this string.
 String String.replace(char oldChar, char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
 String String.toLowerCase(Locale locale)
Converts all of the characters in this String to lower case using the rules of the given Locale.
 String String.toLowerCase()
Converts all of the characters in this String to lower case using the rules of the default locale, which is returned by Locale.getDefault.
 String String.toUpperCase(Locale locale)
Converts all of the characters in this String to upper case using the rules of the given locale.
 String String.toUpperCase()
Converts all of the characters in this String to upper case using the rules of the default locale, which is returned by Locale.getDefault.
 String String.trim()
Removes white space from both ends of this string.
 String String.toString()
This object (which is already a string!) is itself returned.
static String String.valueOf(Object obj)
Returns the string representation of the Object argument.
static String String.valueOf(char[] data)
Returns the string representation of the char array argument.
static String String.valueOf(char[] data, int offset, int count)
Returns the string representation of a specific subarray of the char array argument.
static String String.copyValueOf(char[] data, int offset, int count)
Returns a String that is equivalent to the specified character array.
static String String.copyValueOf(char[] data)
Returns a String that is equivalent to the specified character array.
static String String.valueOf(boolean b)
Returns the string representation of the boolean argument.
static String String.valueOf(char c)
Returns the string representation of the char argument.
static String String.valueOf(int i)
Returns the string representation of the int argument.
static String String.valueOf(long l)
Returns the string representation of the long argument.
static String String.valueOf(float f)
Returns the string representation of the float argument.
static String String.valueOf(double d)
Returns the string representation of the double argument.
 String String.intern()
Returns a canonical representation for the string object.
static String Float.toString(float f)
Returns a String representation for the specified float value.
 String Float.toString()
Returns a String representation of this Float object.
static String Integer.toString(int i, int radix)
Creates a string representation of the first argument in the radix specified by the second argument.
static String Integer.toHexString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 16.
static String Integer.toOctalString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 8.
static String Integer.toBinaryString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 2.
static String Integer.toString(int i)
Returns a new String object representing the specified integer.
 String Integer.toString()
Returns a String object representing this Integer's value.
 String StringBuffer.substring(int start)
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.The substring begins at the specified index and extends to the end of the StringBuffer.
 String StringBuffer.substring(int start, int end)
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.
 String StringBuffer.toString()
Converts to a string representing the data in this string buffer.
 String Package.getName()
Return the name of this package.
 String Package.getSpecificationTitle()
Return the title of the specification that this package implements.
 String Package.getSpecificationVersion()
Returns the version number of the specification that this package implements.
 String Package.getSpecificationVendor()
Return the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package.
 String Package.getImplementationTitle()
Return the title of this package.
 String Package.getImplementationVersion()
Return the version of this implementation.
 String Package.getImplementationVendor()
Returns the name of the organization, vendor or company that provided this implementation.
 String Package.toString()
Returns the string representation of this Package.
static String Byte.toString(byte b)
Returns a new String object representing the specified Byte.
 String Byte.toString()
Returns a String object representing this Byte's value.
protected  String ClassLoader.findLibrary(String libname)
Returns the absolute path name of a native library.
 String Class.toString()
Converts the object to a string.
 String Class.getName()
Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.
static String Double.toString(double d)
Creates a string representation of the double argument.
 String Double.toString()
Returns a String representation of this Double object.
 String Boolean.toString()
Returns a String object representing this Boolean's value.

Methods in java.lang with parameters of type String
static long Long.parseLong(String s, int radix)
Parses the string argument as a signed long in the radix specified by the second argument.
static long Long.parseLong(String s)
Parses the string argument as a signed decimal long.
static Long Long.valueOf(String s, int radix)
Returns a new long object initialized to the value of the specified String.
static Long Long.valueOf(String s)
Returns a new long object initialized to the value of the specified String.
static Long Long.decode(String nm)
Decodes a String into a Long.
static Long Long.getLong(String nm)
Determines the long value of the system property with the specified name.
static Long Long.getLong(String nm, long val)
Determines the long value of the system property with the specified name.
static Long Long.getLong(String nm, Long val)
Returns the long value of the system property with the specified name.
static String System.getProperty(String key)
Gets the system property indicated by the specified key.
static String System.getProperty(String key, String def)
Gets the system property indicated by the specified key.
static String System.setProperty(String key, String value)
Sets the system property indicated by the specified key.
static String System.getenv(String name)
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding get TypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();
static void System.load(String filename)
Loads a code file with the specified filename from the local file system as a dynamic library.
static void System.loadLibrary(String libname)
Loads the system library specified by the libname argument.
static String System.mapLibraryName(String libname)
Maps a library name into a platform-specific string representing a native library.
static boolean Compiler.compileClasses(String string)
Compiles all classes whose name matches the specified string.
 void Thread.setName(String name)
Changes the name of this thread to be equal to the argument name.
static short Short.parseShort(String s)
Assuming the specified String represents a short, returns that short's value.
static short Short.parseShort(String s, int radix)
Assuming the specified String represents a short, returns that short's value.
static Short Short.valueOf(String s, int radix)
Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short Short.valueOf(String s)
Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short Short.decode(String nm)
Decodes a String into a Short.
 byte[] String.getBytes(String enc)
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
 boolean String.equalsIgnoreCase(String anotherString)
Compares this String to another String, ignoring case considerations.
 int String.compareTo(String anotherString)
Compares two strings lexicographically.
 int String.compareToIgnoreCase(String str)
Compares two strings lexicographically, ignoring case considerations.
 boolean String.regionMatches(int toffset, String other, int ooffset, int len)
Tests if two string regions are equal.
 boolean String.regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
Tests if two string regions are equal.
 boolean String.startsWith(String prefix, int toffset)
Tests if this string starts with the specified prefix beginning a specified index.
 boolean String.startsWith(String prefix)
Tests if this string starts with the specified prefix.
 boolean String.endsWith(String suffix)
Tests if this string ends with the specified suffix.
 int String.indexOf(String str)
Returns the index within this string of the first occurrence of the specified substring.
 int String.indexOf(String str, int fromIndex)
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
 int String.lastIndexOf(String str)
Returns the index within this string of the rightmost occurrence of the specified substring.
 int String.lastIndexOf(String str, int fromIndex)
Returns the index within this string of the last occurrence of the specified substring.
 String String.concat(String str)
Concatenates the specified string to the end of this string.
static Float Float.valueOf(String s)
Returns the floating point value represented by the specified String.
static float Float.parseFloat(String s)
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
protected  int SecurityManager.classDepth(String name)
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected  boolean SecurityManager.inClass(String name)
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
 void SecurityManager.checkExec(String cmd)
Throws a SecurityException if the calling thread is not allowed to create a subprocess.
 void SecurityManager.checkLink(String lib)
Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.
 void SecurityManager.checkRead(String file)
Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.
 void SecurityManager.checkRead(String file, Object context)
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
 void SecurityManager.checkWrite(String file)
Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.
 void SecurityManager.checkDelete(String file)
Throws a SecurityException if the calling thread is not allowed to delete the specified file.
 void SecurityManager.checkConnect(String host, int port)
Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.
 void SecurityManager.checkConnect(String host, int port, Object context)
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
 void SecurityManager.checkAccept(String host, int port)
Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.
 void SecurityManager.checkPropertyAccess(String key)
Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.
 void SecurityManager.checkPackageAccess(String pkg)
Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.
 void SecurityManager.checkPackageDefinition(String pkg)
Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.
 void SecurityManager.checkSecurityAccess(String target)
Determines whether the permission with the specified permission target name should be granted or denied.
static int Integer.parseInt(String s, int radix)
Parses the string argument as a signed integer in the radix specified by the second argument.
static int Integer.parseInt(String s)
Parses the string argument as a signed decimal integer.
static Integer Integer.valueOf(String s, int radix)
Returns a new Integer object initialized to the value of the specified String.
static Integer Integer.valueOf(String s)
Returns a new Integer object initialized to the value of the specified String.
static Integer Integer.getInteger(String nm)
Determines the integer value of the system property with the specified name.
static Integer Integer.getInteger(String nm, int val)
Determines the integer value of the system property with the specified name.
static Integer Integer.getInteger(String nm, Integer val)
Returns the integer value of the system property with the specified name.
static Integer Integer.decode(String nm)
Decodes a String into an Integer.
 StringBuffer StringBuffer.append(String str)
Appends the string to this string buffer.
 StringBuffer StringBuffer.replace(int start, int end, String str)
Replaces the characters in a substring of this StringBuffer with characters in the specified String.
 StringBuffer StringBuffer.insert(int offset, String str)
Inserts the string into this string buffer.
 boolean Package.isCompatibleWith(String desired)
Compare this package's specification version with a desired version.
static Package Package.getPackage(String name)
Find a package by name in the callers classloader.
 Process Runtime.exec(String command)
Executes the specified string command in a separate process.
 Process Runtime.exec(String cmd, String[] envp)
Executes the specified string command in a separate process with the specified environment.
 Process Runtime.exec(String command, String[] envp, File dir)
Executes the specified string command in a separate process with the specified environment and working directory.
 Process Runtime.exec(String[] cmdarray)
Executes the specified command and arguments in a separate process.
 Process Runtime.exec(String[] cmdarray, String[] envp)
Executes the specified command and arguments in a separate process with the specified environment.
 Process Runtime.exec(String[] cmdarray, String[] envp, File dir)
Executes the specified command and arguments in a separate process with the specified environment and working directory.
 void Runtime.load(String filename)
Loads the specified filename as a dynamic library.
 void Runtime.loadLibrary(String libname)
Loads the dynamic library with the specified library name.
static byte Byte.parseByte(String s)
Assuming the specified String represents a byte, returns that byte's value.
static byte Byte.parseByte(String s, int radix)
Assuming the specified String represents a byte, returns that byte's value.
static Byte Byte.valueOf(String s, int radix)
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte Byte.valueOf(String s)
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
static Byte Byte.decode(String nm)
Decodes a String into a Byte.
 Class ClassLoader.loadClass(String name)
Loads the class with the specified name.
protected  Class ClassLoader.loadClass(String name, boolean resolve)
Loads the class with the specified name.
protected  Class ClassLoader.findClass(String name)
Finds the specified class.
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len)
Converts an array of bytes into an instance of class Class.
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
protected  Class ClassLoader.findSystemClass(String name)
Finds a class with the specified name, loading it if necessary.
protected  Class ClassLoader.findLoadedClass(String name)
Finds the class with the given name if it had been previously loaded through this class loader.
 URL ClassLoader.getResource(String name)
Finds the resource with the given name.
 Enumeration ClassLoader.getResources(String name)
Finds all the resources with the given name.
protected  Enumeration ClassLoader.findResources(String name)
Returns an Enumeration of URLs representing all the resources with the given name.
protected  URL ClassLoader.findResource(String name)
Finds the resource with the given name.
static URL ClassLoader.getSystemResource(String name)
Find a resource of the specified name from the search path used to load classes.
static Enumeration ClassLoader.getSystemResources(String name)
Finds all resources of the specified name from the search path used to load classes.
 InputStream ClassLoader.getResourceAsStream(String name)
Returns an input stream for reading the specified resource.
static InputStream ClassLoader.getSystemResourceAsStream(String name)
Open for reading, a resource of the specified name from the search path used to load classes.
protected  Package ClassLoader.definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase)
Defines a package by name in this ClassLoader.
protected  Package ClassLoader.getPackage(String name)
Returns a Package that has been defined by this class loader or any of its ancestors.
protected  String ClassLoader.findLibrary(String libname)
Returns the absolute path name of a native library.
static Class Class.forName(String className)
Returns the Class object associated with the class or interface with the given string name.
static Class Class.forName(String name, boolean initialize, ClassLoader loader)
Returns the Class object associated with the class or interface with the given string name, using the given class loader.
 Field Class.getField(String name)
Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
 Method Class.getMethod(String name, Class[] parameterTypes)
Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
 Field Class.getDeclaredField(String name)
Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.
 Method Class.getDeclaredMethod(String name, Class[] parameterTypes)
Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.
 InputStream Class.getResourceAsStream(String name)
Finds a resource with a given name.
 URL Class.getResource(String name)
Finds a resource with a given name.
static Double Double.valueOf(String s)
Returns a new Double object initialized to the value represented by the specified string.
static double Double.parseDouble(String s)
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
static Boolean Boolean.valueOf(String s)
Returns a Boolean with a value represented by the specified String.
static boolean Boolean.getBoolean(String name)
Returns true if and only if the system property named by the argument exists and is equal to the string "true".

Constructors in java.lang with parameters of type String
Throwable(String message)
Constructs a new Throwable with the specified error message.
Exception(String s)
Constructs an Exception with the specified detail message.
RuntimeException(String s)
Constructs a RuntimeException with the specified detail message.
IllegalStateException(String s)
Constructs an IllegalStateException with the specified detail message.
Error(String s)
Constructs an Error with the specified detail message.
Character.Subset(String name)
Constructs a new Subset instance.
LinkageError(String s)
Constructs a LinkageError with the specified detail message.
VerifyError(String s)
Constructs an VerifyError with the specified detail message.
Long(String s)
Constructs a newly allocated Long object that represents the value represented by the string in decimal form.
ThreadGroup(String name)
Constructs a new thread group.
ThreadGroup(ThreadGroup parent, String name)
Creates a new thread group.
IncompatibleClassChangeError(String s)
Constructs an IncompatibleClassChangeError with the specified detail message.
IllegalAccessError(String s)
Constructs an IllegalAccessError with the specified detail message.
InstantiationException(String s)
Constructs an InstantiationException with the specified detail message.
IllegalArgumentException(String s)
Constructs an IllegalArgumentException with the specified detail message.
NumberFormatException(String s)
Constructs a NumberFormatException with the specified detail message.
ClassFormatError(String s)
Constructs a ClassFormatError with the specified detail message.
CloneNotSupportedException(String s)
Constructs a CloneNotSupportedException with the specified detail message.
UnsupportedClassVersionError(String s)
Constructs a UnsupportedClassVersionError with the specified detail message.
IllegalThreadStateException(String s)
Constructs an IllegalThreadStateException with the specified detail message.
Thread(String name)
Allocates a new Thread object.
Thread(ThreadGroup group, String name)
Allocates a new Thread object.
Thread(Runnable target, String name)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target, String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
Short(String s)
Constructs a Short object initialized to the value specified by the String parameter.
String(String original)
Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
String(byte[] bytes, int offset, int length, String enc)
Construct a new String by converting the specified subarray of bytes using the specified character encoding.
String(byte[] bytes, String enc)
Construct a new String by converting the specified array of bytes using the specified character encoding.
Float(String s)
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.
NoSuchFieldError(String s)
Constructs a NoSuchFieldException with the specified detail message.
InterruptedException(String s)
Constructs an InterruptedException with the specified detail message.
IndexOutOfBoundsException(String s)
Constructs an IndexOutOfBoundsException with the specified detail message.
ArrayStoreException(String s)
Constructs an ArrayStoreException with the specified detail message.
ExceptionInInitializerError(String s)
Constructs an ExceptionInInitializerError with the specified detail message string.
RuntimePermission(String name)
Creates a new RuntimePermission with the specified name.
RuntimePermission(String name, String actions)
Creates a new RuntimePermission object with the specified name.
SecurityException(String s)
Constructs a SecurityException with the specified detail message.
Integer(String s)
Constructs a newly allocated Integer object that represents the value represented by the string.
ClassCircularityError(String s)
Constructs a ClassCircularityError with the specified detail message.
VirtualMachineError(String s)
Constructs a VirtualMachineError with the specified detail message.
ArrayIndexOutOfBoundsException(String s)
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
UnknownError(String s)
Constructs an UnknownError with the specified detail message.
StringBuffer(String str)
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
NullPointerException(String s)
Constructs a NullPointerException with the specified detail message.
StringIndexOutOfBoundsException(String s)
Constructs a StringIndexOutOfBoundsException with the specified detail message.
IllegalAccessException(String s)
Constructs an IllegalAccessException with a detail message.
OutOfMemoryError(String s)
Constructs an OutOfMemoryError with the specified detail message.
Byte(String s)
Constructs a Byte object initialized to the value specified by the String parameter.
UnsatisfiedLinkError(String s)
Constructs an UnsatisfiedLinkError with the specified detail message.
ArithmeticException(String s)
Constructs an ArithmeticException with the specified detail message.
NoSuchMethodException(String s)
Constructs a NoSuchMethodException with a detail message.
ClassCastException(String s)
Constructs a ClassCastException with the specified detail message.
StackOverflowError(String s)
Constructs a StackOverflowError with the specified detail message.
NoSuchFieldException(String s)
Constructor with a detail message.
Double(String s)
Constructs a newly allocated Double object that represents the floating- point value of type double represented by the string.
NegativeArraySizeException(String s)
Constructs a NegativeArraySizeException with the specified detail message.
ClassNotFoundException(String s)
Constructs a ClassNotFoundException with the specified detail message.
ClassNotFoundException(String s, Throwable ex)
Constructs a ClassNotFoundException with the specified detail message and optional exception that was raised while loading the class.
NoClassDefFoundError(String s)
Constructs a NoClassDefFoundError with the specified detail message.
Boolean(String s)
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".
InstantiationError(String s)
Constructs an InstantiationError with the specified detail message.
IllegalMonitorStateException(String s)
Constructs an IllegalMonitorStateException with the specified detail message.
UnsupportedOperationException(String message)
Constructs an UnsupportedOperationException with the specified detail message.
InternalError(String s)
Constructs an InternalError with the specified detail message.
NoSuchMethodError(String s)
Constructs a NoSuchMethodError with the specified detail message.
AbstractMethodError(String s)
Constructs an AbstractMethodError with the specified detail message.

Uses of String in java.lang.reflect

Methods in java.lang.reflect that return String
String | Member.getName() Returns the simple name of the underlying member or constructor represented by this Member.
String | Method.getName() Returns the name of the method represented by this Method object, as a String.
String | Method.toString() Returns a string describing this Method.
static String | Modifier.toString(int mod) Return a string describing the access modifier flags in the specified modifier.
String | Field.getName() Returns the name of the field represented by this Field object.
String | Field.toString() Returns a string describing this Field.
String | Constructor.getName() Returns the name of this constructor, as a string.
String | Constructor.toString() Returns a string describing this Constructor.

Constructors in java.lang.reflect with parameters of type String
InvocationTargetException(Throwable target, String s)
Constructs a InvocationTargetException with a target exception and a detail message.
UndeclaredThrowableException(Throwable undeclaredThrowable, String s)
Constructs an UndeclaredThrowableException with the specified Throwable and a detail message.
ReflectPermission(String name)
Constructs a ReflectPermission with the specified name.
ReflectPermission(String name, String actions)
Constructs a ReflectPermission with the specified name and actions.

Uses of String in java.math

Methods in java.math that return String
String | BigInteger.toString(int radix) Returns the String representation of this BigInteger in the given radix.
String | BigInteger.toString() Returns the decimal String representation of this BigInteger.
String | BigDecimal.toString() Returns the string representation of this BigDecimal.

Constructors in java.math with parameters of type String
BigInteger(String val, int radix)
Translates the String representation of a BigInteger in the specified radix into a BigInteger.
BigInteger(String val)
Translates the decimal String representation of a BigInteger into a BigInteger.
BigDecimal(String val)
Translates the String representation of a BigDecmal into a BigDecimal.

Uses of String in java.net

Fields in java.net declared as String
protected String | HttpURLConnection.method The HTTP method (GET,POST,PUT,etc.).
protected String | HttpURLConnection.responseMessage The HTTP response message.

Methods in java.net that return String
String | FileNameMap.getContentTypeFor(String fileName) Gets the MIME type for the specified file name.
String | URLConnection.getContentType() Returns the value of the content-type header field.
String | URLConnection.getContentEncoding() Returns the value of the content-encoding header field.
String | URLConnection.getHeaderField(String name) Returns the name of the specified header field.
String | URLConnection.getHeaderFieldKey(int n) Returns the key for the nth header field.
String | URLConnection.getHeaderField(int n) Returns the value for the nth header field.
String | URLConnection.toString() Returns a String representation of this URL connection.
String | URLConnection.getRequestProperty(String key) Returns the value of the named general request property for this connection.
static String | URLConnection.getDefaultRequestProperty(String key) Deprecated. The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
protected static String | URLConnection.guessContentTypeFromName(String fname) Tries to determine the content type of an object, based on the specified "file" component of a URL.
static String | URLConnection.guessContentTypeFromStream(InputStream is) Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
String | JarURLConnection.getEntryName() Return the entry name for this connection.
static String | URLDecoder.decode(String s) Decodes a "x-www-form-urlencoded" to a String.
String | PasswordAuthentication.getUserName() Returns the user name.
String | SocketImpl.toString() Returns the address and port of this socket as a String.
String | Socket.toString() Converts this socket to a String.
String | URL.getQuery() Returns the query part of this URL.
String | URL.getPath() Returns the path part of this URL.
String | URL.getUserInfo() Returns the userInfo part of this URL.
String | URL.getAuthority() Returns the authority part of this URL.
String | URL.getProtocol() Returns the protocol name of this URL.
String | URL.getHost() Returns the host name of this URL, if applicable.
String | URL.getFile() Returns the file name of this URL.
String | URL.getRef() Returns the anchor (also known as the "reference") of this URL.
String | URL.toString() Constructs a string representation of this URL.
String | URL.toExternalForm() Constructs a string representation of this URL.
String | SocketPermission.getActions() Returns the canonical string representation of the actions.
String | HttpURLConnection.getRequestMethod() Get the request method.
String | HttpURLConnection.getResponseMessage() Gets the HTTP response message, if any, returned along with the response code from a server.
static String | URLEncoder.encode(String s) Translates a string into x-www-form-urlencoded format.
String | ServerSocket.toString() Returns the implementation address and implementation port of this socket as a String.
protected String | URLStreamHandler.toExternalForm(URL u) Converts a URL of a specific protocol to a String.
String | InetAddress.getHostName() Gets the host name for this IP address.
String | InetAddress.getHostAddress() Returns the IP address string "%d.%d.%d.%d".
String | InetAddress.toString() Converts this IP address to a String.
protected String | Authenticator.getRequestingProtocol() Give the protocol that's requesting the connection.
protected String | Authenticator.getRequestingPrompt() Gets the prompt string given by the requestor.
protected String | Authenticator.getRequestingScheme() Gets the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).

Methods in java.net with parameters of type String
 String FileNameMap.getContentTypeFor(String fileName)
Gets the MIME type for the specified file name.
protected  Class URLClassLoader.findClass(String name)
Finds and loads the class with the specified name from the URL search path.
protected  Package URLClassLoader.definePackage(String name, Manifest man, URL url)
Defines a new package by name in this ClassLoader.
 URL URLClassLoader.findResource(String name)
Finds the resource with the specified name on the URL search path.
 Enumeration URLClassLoader.findResources(String name)
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
 String URLConnection.getHeaderField(String name)
Returns the name of the specified header field.
 int URLConnection.getHeaderFieldInt(String name, int Default)
Returns the value of the named field parsed as a number.
 long URLConnection.getHeaderFieldDate(String name, long Default)
Returns the value of the named field parsed as date.
 void URLConnection.setRequestProperty(String key, String value)
Sets the general request property.
 String URLConnection.getRequestProperty(String key)
Returns the value of the named general request property for this connection.
static void URLConnection.setDefaultRequestProperty(String key, String value)
Deprecated. The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
static String URLConnection.getDefaultRequestProperty(String key)
Deprecated. The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
protected static String URLConnection.guessContentTypeFromName(String fname)
Tries to determine the content type of an object, based on the specified "file" component of a URL.
static String URLDecoder.decode(String s)
Decodes a "x-www-form-urlencoded" to a String.
protected abstract  void SocketImpl.connect(String host, int port)
Connects this socket to the specified port on the named host.
 URLStreamHandler URLStreamHandlerFactory.createURLStreamHandler(String protocol)
Creates a new URLStreamHandler instance with the specified protocol.
protected  void URL.set(String protocol, String host, int port, String file, String ref)
Sets the fields of the URL.
protected  void URL.set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)
Sets the specified 8 fields of the URL.
 ContentHandler ContentHandlerFactory.createContentHandler(String mimetype)
Creates a new ContentHandler to read an object from a URLStreamHandler.
 void HttpURLConnection.setRequestMethod(String method)
Set the method for the URL request, one of: GET POST HEAD OPTIONS PUT DELETE TRACE are legal, subject to protocol restrictions.
 long HttpURLConnection.getHeaderFieldDate(String name, long Default)
static String URLEncoder.encode(String s)
Translates a string into x-www-form-urlencoded format.
protected  void URLStreamHandler.parseURL(URL u, String spec, int start, int limit)
Parses the string representation of a URL into a URL object.
protected  void URLStreamHandler.setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)
Sets the fields of the URL argument to the indicated values.
protected  void URLStreamHandler.setURL(URL u, String protocol, String host, int port, String file, String ref)
Deprecated. Use setURL(URL, String, String, int, String, String, String, String);
static InetAddress InetAddress.getByName(String host)
Determines the IP address of a host, given the host's name.
static InetAddress[] InetAddress.getAllByName(String host)
Determines all the IP addresses of a host, given the host's name.
static PasswordAuthentication Authenticator.requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme)
Ask the authenticator that has been registered with the system for a password.

Constructors in java.net with parameters of type String
PasswordAuthentication(String userName, char[] password)
Creates a new PasswordAuthentication object from the given user name and password.
Socket(String host, int port)
Creates a stream socket and connects it to the specified port number on the named host.
Socket(String host, int port, InetAddress localAddr, int localPort)
Creates a socket and connects it to the specified remote host on the specified remote port.
Socket(String host, int port, boolean stream)
Deprecated. Use DatagramSocket instead for UDP transport.
SocketException(String msg)
Constructs a new SocketException with the specified detail message.
BindException(String msg)
Constructs a new BindException with the specified detail message as to why the bind error occurred.
MalformedURLException(String msg)
Constructs a MalformedURLException with the specified detail message.
URL(String protocol, String host, int port, String file)
Creates a URL object from the specified protocol, host, port number, and file.
URL(String protocol, String host, String file)
Creates a URL from the specified protocol name, host name, and file name.
URL(String protocol, String host, int port, String file, URLStreamHandler handler)
Creates a URL object from the specified protocol, host, port number, file, and handler.
URL(String spec)
Creates a URL object from the String representation.
URL(URL context, String spec)
Creates a URL by parsing the given spec within a specified context.
URL(URL context, String spec, URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.
NetPermission(String name)
Creates a new NetPermission with the specified name.
NetPermission(String name, String actions)
Creates a new NetPermission object with the specified name.
NoRouteToHostException(String msg)
Constructs a new NoRouteToHostException with the specified detail message as to why the remote host cannot be reached.
ProtocolException(String host)
Constructs a new ProtocolException with the specified detail message.
SocketPermission(String host, String action)
Creates a new SocketPermission object with the specified actions.
ConnectException(String msg)
Constructs a new ConnectException with the specified detail message as to why the connect error occurred.
UnknownHostException(String host)
Constructs a new UnknownHostException with the specified detail message.
UnknownServiceException(String msg)
Constructs a new UnknownServiceException with the specified detail message.

Uses of String in java.rmi

Methods in java.rmi that return String
String | RemoteException.getMessage() Returns the detail message, including the message from the nested exception if there is one.
static String[] | Naming.list(String name) Returns an array of the names bound in the registry.

Methods in java.rmi with parameters of type String
static Remote | Naming.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
static void | Naming.bind(String name, Remote obj) Binds the specified name to a remote object.
static void | Naming.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
static void | Naming.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
static String[] | Naming.list(String name) Returns an array of the names bound in the registry.

Constructors in java.rmi with parameters of type String
RemoteException(String s)
Constructs a RemoteException with the specified detail message.
RemoteException(String s, Throwable ex)
Constructs a RemoteException with the specified detail message and nested exception.
ServerError(String s, Error err)
Constructs a ServerError with the specified detail message and nested error.
NotBoundException(String s)
Constructs a NotBoundException with the specified detail message.
ConnectException(String s)
Constructs a ConnectException with the specified detail message.
ConnectException(String s, Exception ex)
Constructs a ConnectException with the specified detail message and nested exception.
AlreadyBoundException(String s)
Constructs an AlreadyBoundException with the specified detail message.
ConnectIOException(String s)
Constructs a ConnectIOException with the specified detail message.
ConnectIOException(String s, Exception ex)
Constructs a ConnectIOException with the specified detail message and nested exception.
UnmarshalException(String s)
Constructs an UnmarshalException with the specified detail message.
UnmarshalException(String s, Exception ex)
Constructs an UnmarshalException with the specified detail message and nested exception.
UnexpectedException(String s)
Constructs an UnexpectedException with the specified detail message.
UnexpectedException(String s, Exception ex)
Constructs a UnexpectedException with the specified detail message and nested exception.
AccessException(String s)
Constructs an AccessException with the specified detail message.
AccessException(String s, Exception ex)
Constructs an AccessException with the specified detail message and nested exception.
StubNotFoundException(String s)
Constructs a StubNotFoundException with the specified detail message and nested exception.
StubNotFoundException(String s, Exception ex)
Constructs a StubNotFoundException with the specified detail message and nested exception.
ServerException(String s)
Constructs a ServerException with the specified detail message.
ServerException(String s, Exception ex)
Constructs a ServerException with the specified detail message and nested exception.
RMISecurityException(String name)
Deprecated. no replacement
RMISecurityException(String name, String arg)
Deprecated. no replacement
UnknownHostException(String s)
Constructs an UnknownHostException with the specified detail message.
UnknownHostException(String s, Exception ex)
Constructs an UnknownHostException with the specified detail message and nested exception.
NoSuchObjectException(String s)
Constructs a NoSuchObjectException with the specified detail message.
ServerRuntimeException(String s, Exception ex)
Deprecated. no replacement
MarshalException(String s)
Constructs a MarshalException with the specified detail message.
MarshalException(String s, Exception ex)
Constructs a MarshalException with the specified detail message and nested exception.

Uses of String in java.rmi.activation

Methods in java.rmi.activation that return String
String | ActivationGroupDesc.getClassName() Returns the group's class name (possibly null).
String | ActivationGroupDesc.getLocation() Returns the group's code location.
String | ActivationGroupDesc.CommandEnvironment.getCommandPath() Fetch the configured path-qualified java command name.
String[] | ActivationGroupDesc.CommandEnvironment.getCommandOptions() Fetch the configured java command options.
String | ActivationException.getMessage() Produces the message, include the message from the nested exception if there is one.
String | ActivationDesc.getClassName() Returns the class name for the object specified by this descriptor.
String | ActivationDesc.getLocation() Returns the code location for the object specified by this descriptor.

Methods in java.rmi.activation with parameters of type String
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).

Constructors in java.rmi.activation with parameters of type String
Activatable(String location, MarshalledObject data, boolean restart, int port)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
ActivationGroupDesc.CommandEnvironment(String cmdpath, String[] argv)
Create a CommandEnvironment with all the necessary information.
ActivationException(String s)
Constructs an ActivationException with detail message, s.
ActivationException(String s, Throwable ex)
Constructs an ActivationException with detail message, s, and detail exception ex.
UnknownGroupException(String s)
Constructs an UnknownGroupException with the specified detail message.
ActivationDesc(String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
UnknownObjectException(String s)
Constructs an UnknownObjectException with the specified detail message.
ActivateFailedException(String s)
Constructs an ActivateFailedException with the specified detail message.
ActivateFailedException(String s, Exception ex)
Constructs an ActivateFailedException with the specified detail message and nested exception.

Uses of String in java.rmi.dgc

Methods in java.rmi.dgc that return String
 String VMID.toString()
Return string representation of this VMID.

Uses of String in java.rmi.registry

Methods in java.rmi.registry that return String
 String[] Registry.list()
Returns an array of the names bound in the registry.

Methods in java.rmi.registry with parameters of type String
Remote | Registry.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
void | Registry.bind(String name, Remote obj) Binds the specified name to a remote object.
void | Registry.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
void | Registry.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
Registry | RegistryHandler.registryStub(String host, int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.
static Registry | LocateRegistry.getRegistry(String host) Returns a reference to the remote object Registry on the specified host on the default registry port of 1099.
static Registry | LocateRegistry.getRegistry(String host, int port) Returns a reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.getRegistry(String host, int port, RMIClientSocketFactory csf) Returns a locally created remote reference to the remote object Registry on the specified host and port.

Uses of String in java.rmi.server

Fields in java.rmi.server declared as String
static String | RemoteRef.packagePrefix Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
static String | LoaderHandler.packagePrefix Deprecated. package of system LoaderHandler implementation.

Methods in java.rmi.server that return String
String | RemoteObject.toString() Returns a String that represents the value of this remote object.
static String | RemoteServer.getClientHost() Return the hostname of the current client.
String | RemoteRef.getRefClass(ObjectOutput out) Returns the class name of the ref type to be serialized onto the stream 'out'.
String | RemoteRef.remoteToString() Returns a String that represents the reference of this remote object.
String | UID.toString() Returns the string representation of the UID.
static String | RMIClassLoader.getClassAnnotation(Class cl) Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.
String | ObjID.toString() Returns a string containing the object id representation.
String | Operation.getOperation() Deprecated. no replacement
String | Operation.toString() Deprecated. no replacement
String | LogStream.toString() Deprecated. no replacement
String | ServerCloneException.getMessage() Obtains the message, include the message from the nested exception if there is one.
String | ServerRef.getClientHost() Returns the hostname of the current client.

Methods in java.rmi.server with parameters of type String
static Class RMIClassLoader.loadClass(String name)
Deprecated. replaced by loadClass(String,String) method
static Class RMIClassLoader.loadClass(URL codebase, String name)
Loads a class from a codebase URL.
static Class RMIClassLoader.loadClass(String codebase, String name)
Loads a class from a codebase URL path.
static ClassLoader RMIClassLoader.getClassLoader(String codebase)
Returns a class loader that loads classes from the given codebase URL path.
 Socket RMIClientSocketFactory.createSocket(String host, int port)
Create a client socket connected to the specified host and port.
 Class LoaderHandler.loadClass(String name)
Deprecated. no replacement
 Class LoaderHandler.loadClass(URL codebase, String name)
Deprecated. no replacement
static LogStream LogStream.log(String name)
Deprecated. no replacement
static int LogStream.parseLevel(String s)
Deprecated. no replacement
abstract  Socket RMISocketFactory.createSocket(String host, int port)
Creates a client socket connected to the specified host and port.

Constructors in java.rmi.server with parameters of type String
ExportException(String s)
Constructs an ExportException with the specified detail message.
ExportException(String s, Exception ex)
Constructs an ExportException with the specified detail message and nested exception.
SkeletonMismatchException(String s)
Deprecated. no replacement
SocketSecurityException(String s)
Constructs an SocketSecurityException with the specified detail message.
SocketSecurityException(String s, Exception ex)
Constructs an SocketSecurityException with the specified detail message and nested exception.
Operation(String op)
Deprecated. no replacement
ServerCloneException(String s)
Constructs an ServerCloneException with the specified detail message.
ServerCloneException(String s, Exception ex)
Constructs an ServerCloneException with the specified detail message and nested exception.
ServerNotActiveException(String s)
Constructs an ServerNotActiveException with the specified detail message.
SkeletonNotFoundException(String s)
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message.
SkeletonNotFoundException(String s, Exception ex)
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message and nested exception.

Uses of String in java.security

Methods in java.security that return String
String | Permission.getName() Returns the name of this Permission.
abstract String | Permission.getActions() Returns the actions as a String.
String | Permission.toString() Returns a string describing this Permission.
String | BasicPermission.getActions() Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a BasicPermission.
String | KeyFactory.getAlgorithm() Gets the name of the algorithm associated with this KeyFactory.
String | Provider.getName() Returns the name of this provider.
String | Provider.getInfo() Returns a human-readable description of the provider and its services.
String | Provider.toString() Returns a string with the name and the version number of this provider.
String | CodeSource.toString() Returns a string describing this CodeSource, telling its URL and certificates.
String | UnresolvedPermission.getActions() Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for an UnresolvedPermission.
String | UnresolvedPermission.toString() Returns a string describing this UnresolvedPermission.
String | Identity.getName() Deprecated. Returns this identity's name.
String | Identity.getInfo() Deprecated. Returns general information previously specified for this identity.
String | Identity.toString() Deprecated. Returns a short string describing this identity, telling its name and its scope (if any).
String | Identity.toString(boolean detailed) Deprecated. Returns a string representation of this identity, with optionally more details than that provided by the toString method without any arguments.
String | Signer.toString() Deprecated. Returns a string of information about the signer.
String | KeyPairGenerator.getAlgorithm() Returns the standard name of the algorithm for this key pair generator.
String | PrivilegedActionException.toString() Returns a string describing this exception, including a description of the exception it wraps.
String | Key.getAlgorithm() Returns the standard algorithm name for this key.
String | Key.getFormat() Returns the name of the primary encoding format of this key, or null if this key does not support encoding.
String | AllPermission.getActions() Returns the canonical string representation of the actions.
String | ProtectionDomain.toString() Convert a ProtectionDomain to a String.
String | Certificate.getFormat() Deprecated. Returns the name of the coding format.
String | Certificate.toString(boolean detailed) Deprecated. Returns a string that represents the contents of the certificate.
String | AlgorithmParameters.getAlgorithm() Returns the name of the algorithm associated with this parameter object.
String | AlgorithmParameters.toString() Returns a formatted string describing the parameters.
String | AlgorithmParameterGenerator.getAlgorithm() Returns the standard name of the algorithm this parameter generator is associated with.
String | KeyStore.getType() Returns the type of this keystore.
String | KeyStore.getCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
static String | KeyStore.getDefaultType() Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists.
abstract String | KeyStoreSpi.engineGetCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
String | PermissionCollection.toString() Returns a string describing this PermissionCollection object, providing information about all the permissions it contains.
static String | Security.getAlgorithmProperty(String algName, String propName) Deprecated. This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.
static String | Security.getProperty(String key) Gets a security property value.
String | SignedObject.getAlgorithm() Retrieves the name of the signature algorithm.
String | MessageDigest.toString() Returns a string representation of this message digest object.
String | MessageDigest.getAlgorithm() Returns a string that identifies the algorithm, independent of implementation details.
String | DigestOutputStream.toString() Prints a string representation of this digest output stream and its associated message digest object.
String | Signature.getAlgorithm() Returns the name of the algorithm for this signature object.
String | Signature.toString() Returns a string representation of this signature object, providing information that includes the state of the object and the name of the algorithm used.
String | DigestInputStream.toString() Prints a string representation of this digest input stream and its associated message digest object.
String | Principal.toString() Returns a string representation of this principal.
String | Principal.getName() Returns the name of this principal.
String | IdentityScope.toString() Deprecated. Returns a string representation of this identity scope, including its name, its scope name, and the number of identities in this identity scope.
protected abstract String | AlgorithmParametersSpi.engineToString() Returns a formatted string describing the parameters.

Methods in java.security with parameters of type String
protected Class | SecureClassLoader.defineClass(String name, byte[] b, int off, int len, CodeSource cs) Converts an array of bytes into an instance of class Class, with an optional CodeSource.
static KeyFactory | KeyFactory.getInstance(String algorithm) Generates a KeyFactory object that implements the specified digest algorithm.
static KeyFactory | KeyFactory.getInstance(String algorithm, String provider) Generates a KeyFactory object for the specified algorithm from the specified provider.
void | Identity.setInfo(String info) Deprecated. Specifies a general information string for this identity.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm) Generates a KeyPairGenerator object that implements the specified digest algorithm.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm, String provider) Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
protected abstract void | SignatureSpi.engineSetParameter(String param, Object value) Deprecated. Replaced by engineSetParameter.
protected abstract Object | SignatureSpi.engineGetParameter(String param) Deprecated.
static SecureRandom | SecureRandom.getInstance(String algorithm) Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm.
static SecureRandom | SecureRandom.getInstance(String algorithm, String provider) Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm) Generates a parameter object for the specified algorithm.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm, String provider) Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
void | AlgorithmParameters.init(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding scheme.
byte[] | AlgorithmParameters.getEncoded(String format) Returns the parameters encoded in the specified scheme.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm) Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm, String provider) Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
static KeyStore | KeyStore.getInstance(String type) Generates a keystore object of the given type.
static KeyStore | KeyStore.getInstance(String type, String provider) Generates a keystore object for the specified keystore type from the specified provider.
Key | KeyStore.getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
Certificate[] | KeyStore.getCertificateChain(String alias) Returns the certificate chain associated with the given alias.
Certificate | KeyStore.getCertificate(String alias) Returns the certificate associated with the given alias.
Date | KeyStore.getCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
void | KeyStore.setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
void | KeyStore.setKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
void | KeyStore.setCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
void | KeyStore.deleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.
boolean | KeyStore.containsAlias(String alias) Checks if the given alias exists in this keystore.
boolean | KeyStore.isKeyEntry(String alias) Returns true if the entry identified by the given alias is a key entry, and false otherwise.
boolean | KeyStore.isCertificateEntry(String alias) Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
abstract Key | KeyStoreSpi.engineGetKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
abstract Certificate[] | KeyStoreSpi.engineGetCertificateChain(String alias) Returns the certificate chain associated with the given alias.
abstract Certificate | KeyStoreSpi.engineGetCertificate(String alias) Returns the certificate associated with the given alias.
abstract Date | KeyStoreSpi.engineGetCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
abstract void | KeyStoreSpi.engineSetCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
abstract void | KeyStoreSpi.engineDeleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.
abstract boolean | KeyStoreSpi.engineContainsAlias(String alias) Checks if the given alias exists in this keystore.
abstract boolean | KeyStoreSpi.engineIsKeyEntry(String alias) Returns true if the entry identified by the given alias is a key entry, and false otherwise.
abstract boolean | KeyStoreSpi.engineIsCertificateEntry(String alias) Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
static String | Security.getAlgorithmProperty(String algName, String propName) Deprecated. This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.
static void | Security.removeProvider(String name) Removes the provider with the specified name.
static Provider | Security.getProvider(String name) Returns the provider installed with the specified name, if any.
static Provider[] | Security.getProviders(String filter) Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed.
static String | Security.getProperty(String key) Gets a security property value.
static void | Security.setProperty(String key, String datum) Sets a security property value.
static MessageDigest | MessageDigest.getInstance(String algorithm) Generates a MessageDigest object that implements the specified digest algorithm.
static MessageDigest | MessageDigest.getInstance(String algorithm, String provider) Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
static Signature | Signature.getInstance(String algorithm) Generates a Signature object that implements the specified digest algorithm.
static Signature | Signature.getInstance(String algorithm, String provider) Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
void | Signature.setParameter(String param, Object value) Deprecated. Use setParameter.
Object | Signature.getParameter(String param) Deprecated.
abstract Identity | IdentityScope.getIdentity(String name) Deprecated. Returns the identity in this scope with the specified name (if any).
protected abstract void | AlgorithmParametersSpi.engineInit(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding format.
protected abstract byte[] | AlgorithmParametersSpi.engineGetEncoded(String format) Returns the parameters encoded in the specified format.

Constructors in java.security with parameters of type String
Permission(String name)
Constructs a permission with the specified name.
BasicPermission(String name)
Creates a new BasicPermission with the specified name.
BasicPermission(String name, String actions)
Creates a new BasicPermission object with the specified name.
SecurityPermission(String name)
Creates a new SecurityPermission with the specified name.
SecurityPermission(String name, String actions)
Creates a new SecurityPermission object with the specified name.
AccessControlException(String s)
Constructs an AccessControlException with the specified, detailed message.
AccessControlException(String s, Permission p)
Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.
KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Creates a KeyFactory object.
GeneralSecurityException(String msg)
Constructs a GeneralSecurityException with the specified detail message.
UnrecoverableKeyException(String msg)
Constructs an UnrecoverableKeyException with the specified detail message, which provides more information about why this exception has been thrown.
Provider(String name, double version, String info)
Constructs a provider with the specified name, version number, and information.
InvalidParameterException(String msg)
Constructs an InvalidParameterException with the specified detail message.
UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Creates a new UnresolvedPermission containing the permission information needed later to actually create a Permission of the specified class, when the permission is resolved.
Identity(String name, IdentityScope scope)
Deprecated. Constructs an identity with the specified name and scope.
Identity(String name)
Deprecated. Constructs an identity with the specified name and no scope.
Signer(String name)
Deprecated. Creates a signer with the specified identity name.
Signer(String name, IdentityScope scope)
Deprecated. Creates a signer with the specified identity name and scope.
KeyPairGenerator(String algorithm)
Creates a KeyPairGenerator object for the specified algorithm.
KeyException(String msg)
Constructs a KeyException with the specified detail message.
InvalidKeyException(String msg)
Constructs an InvalidKeyException with the specified detail message.
ProviderException(String s)
Constructs a ProviderException with the specified detail message.
DigestException(String msg)
Constructs a DigestException with the specified detail message.
AllPermission(String name, String actions)
Creates a new AllPermission object.
AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm)
Creates an AlgorithmParameters object.
KeyStoreException(String msg)
Constructs a KeyStoreException with the specified detail message.
KeyManagementException(String msg)
Constructs a KeyManagementException with the specified detail message.
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, String algorithm)
Creates an AlgorithmParameterGenerator object.
KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.
NoSuchAlgorithmException(String msg)
Constructs a NoSuchAlgorithmException with the specified detail message.
SignatureException(String msg)
Constructs a SignatureException with the specified detail message.
MessageDigest(String algorithm)
Creates a message digest with the specified algorithm name.
InvalidAlgorithmParameterException(String msg)
Constructs an InvalidAlgorithmParameterException with the specified detail message.
Signature(String algorithm)
Creates a Signature object for the specified algorithm.
NoSuchProviderException(String msg)
Constructs a NoSuchProviderException with the specified detail message.
IdentityScope(String name)
Deprecated. Constructs a new identity scope with the specified name.
IdentityScope(String name, IdentityScope scope)
Deprecated. Constructs a new identity scope with the specified name and scope.

Uses of String in java.security.acl

Methods in java.security.acl that return String
String | AclEntry.toString() Returns a string representation of the contents of this ACL entry.
String | Permission.toString() Prints a string representation of this permission.
String | Acl.getName() Returns the name of this ACL.
String | Acl.toString() Returns a string representation of the ACL contents.

Methods in java.security.acl with parameters of type String
 void Acl.setName(Principal caller, String name)
Sets the name of this ACL.

Uses of String in java.security.cert

Methods in java.security.cert that return String
String | CertificateFactory.getType() Returns the name of the certificate type associated with this certificate factory.
String | Certificate.getType() Returns the type of this certificate.
abstract String | Certificate.toString() Returns a string representation of this certificate.
abstract String | X509Certificate.getSigAlgName() Gets the signature algorithm name for the certificate signature algorithm.
abstract String | X509Certificate.getSigAlgOID() Gets the signature algorithm OID string from the certificate.
String | CRL.getType() Returns the type of this CRL.
abstract String | CRL.toString() Returns a string representation of this CRL.
abstract String | X509CRLEntry.toString() Returns a string representation of this CRL entry.
abstract String | X509CRL.getSigAlgName() Gets the signature algorithm name for the CRL signature algorithm.
abstract String | X509CRL.getSigAlgOID() Gets the signature algorithm OID string from the CRL.

Methods in java.security.cert with parameters of type String
static CertificateFactory | CertificateFactory.getInstance(String type) Generates a certificate factory object that implements the specified certificate type.
static CertificateFactory | CertificateFactory.getInstance(String type, String provider) Generates a certificate factory object for the specified certificate type from the specified provider.
byte[] | X509Extension.getExtensionValue(String oid) Gets the DER-encoded OCTET string for the extension value (extnValue) identified by the passed-in oid String.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Constructors in java.security.cert with parameters of type String
CertificateException(String msg)
Constructs a certificate exception with the given detail message.
CertificateParsingException(String message)
Constructs a CertificateParsingException with the specified detail message.
CertificateNotYetValidException(String message)
Constructs a CertificateNotYetValidException with the specified detail message.
CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Certificate(String type)
Creates a certificate of the specified type.
CRL(String type)
Creates a CRL of the specified type.
Certificate.CertificateRep(String type, byte[] data)
Construct the alternate Certificate class with the Certificate type and Certificate encoding bytes.
CertificateExpiredException(String message)
Constructs a CertificateExpiredException with the specified detail message.
CertificateEncodingException(String message)
Constructs a CertificateEncodingException with the specified detail message.
CRLException(String message)
Constructs a CRLException with the specified detail message.

Uses of String in java.security.spec

Methods in java.security.spec that return String
abstract String | EncodedKeySpec.getFormat() Returns the name of the encoding format associated with this key specification.
String | PKCS8EncodedKeySpec.getFormat() Returns the name of the encoding format associated with this key specification.
String | X509EncodedKeySpec.getFormat() Returns the name of the encoding format associated with this key specification.

Constructors in java.security.spec with parameters of type String
InvalidParameterSpecException(String msg)
Constructs an InvalidParameterSpecException with the specified detail message.
InvalidKeySpecException(String msg)
Constructs an InvalidKeySpecException with the specified detail message.

Uses of String in java.sql

Fields in java.sql declared as String
String | DriverPropertyInfo.name The name of the property.
String | DriverPropertyInfo.description A brief description of the property, which may be null.
String | DriverPropertyInfo.value The value field specifies the current value of the property, based on a combination of the information supplied to the method getPropertyInfo, the Java environment, and the driver-supplied default values.
String[] | DriverPropertyInfo.choices An array of possible values if the value for the field DriverPropertyInfo.value may be selected from a particular set of values; otherwise null.

Methods in java.sql that return String
String | SQLException.getSQLState() Retrieves the SQLState for this SQLException object.
String | SQLData.getSQLTypeName() Returns the fully-qualified name of the SQL user-defined type that this object represents.
String | Timestamp.toString() Formats a timestamp in JDBC timestamp escape format.
String | Connection.nativeSQL(String sql) Converts the given SQL statement into the system's native SQL grammar.
String | Connection.getCatalog() Returns the Connection's current catalog name.
String | Date.toString() Formats a date in the date escape format yyyy-mm-dd.
String | CallableStatement.getString(int parameterIndex) Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
String | Time.toString() Formats a time in JDBC date escape format
String | Struct.getSQLTypeName() Retrieves the SQL type name of the SQL structured type that this Struct object represents.
String | DatabaseMetaData.getURL() What's the url for this database?
String | DatabaseMetaData.getUserName() What's our user name as known to the database?
String | DatabaseMetaData.getDatabaseProductName() What's the name of this database product?
String | DatabaseMetaData.getDatabaseProductVersion() What's the version of this database product?
String | DatabaseMetaData.getDriverName() What's the name of this JDBC driver?
String | DatabaseMetaData.getDriverVersion() What's the version of this JDBC driver?
String | DatabaseMetaData.getIdentifierQuoteString() What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported.
String | DatabaseMetaData.getSQLKeywords() Gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords.
String | DatabaseMetaData.getNumericFunctions() Gets a comma-separated list of math functions.
String | DatabaseMetaData.getStringFunctions() Gets a comma-separated list of string functions.
String | DatabaseMetaData.getSystemFunctions() Gets a comma-separated list of system functions.
String | DatabaseMetaData.getTimeDateFunctions() Gets a comma-separated list of time and date functions.
String | DatabaseMetaData.getSearchStringEscape() Gets the string that can be used to escape wildcard characters.
String | DatabaseMetaData.getExtraNameCharacters() Gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
String | DatabaseMetaData.getSchemaTerm() What's the database vendor's preferred term for "schema"?
String | DatabaseMetaData.getProcedureTerm() What's the database vendor's preferred term for "procedure"?
String | DatabaseMetaData.getCatalogTerm() What's the database vendor's preferred term for "catalog"?
String | DatabaseMetaData.getCatalogSeparator() What's the separator between catalog and table name?
String | Array.getBaseTypeName() Returns the SQL type name of the elements in the array designated by this Array object.
String | SQLInput.readString() Reads the next attribute in the stream as a String in the Java programming language.
String | ResultSet.getString(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
String | ResultSet.getString(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
String | ResultSet.getCursorName() Gets the name of the SQL cursor used by this ResultSet object.
String | ResultSetMetaData.getColumnLabel(int column) Gets the designated column's suggested title for use in printouts and displays.
String | ResultSetMetaData.getColumnName(int column) Get the designated column's name.
String | ResultSetMetaData.getSchemaName(int column) Get the designated column's table's schema.
String | ResultSetMetaData.getTableName(int column) Gets the designated column's table name.
String | ResultSetMetaData.getCatalogName(int column) Gets the designated column's table's catalog name.
String | ResultSetMetaData.getColumnTypeName(int column) Retrieves the designated column's database-specific type name.
String | ResultSetMetaData.getColumnClassName(int column) Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
String | Ref.getBaseTypeName() Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references.
String | Clob.getSubString(long pos, int length) Returns a copy of the specified substring in the CLOB value designated by this Clob object.

Methods in java.sql with parameters of type String
ResultSet | Statement.executeQuery(String sql) Executes an SQL statement that returns a single ResultSet object.
int | Statement.executeUpdate(String sql) Executes an SQL INSERT, UPDATE or DELETE statement.
void | Statement.setCursorName(String name) Defines the SQL cursor name that will be used by subsequent Statement object execute methods.
boolean | Statement.execute(String sql) Executes an SQL statement that may return multiple results.
void | Statement.addBatch(String sql) Adds an SQL command to the current batch of commmands for this Statement object.
void | PreparedStatement.setString(int parameterIndex, String x) Sets the designated parameter to a Java String value.
void | PreparedStatement.setNull(int paramIndex, int sqlType, String typeName) Sets the designated parameter to SQL NULL.
void | SQLData.readSQL(SQLInput stream, String typeName) Populates this object with data read from the database.
Connection | Driver.connect(String url, Properties info) Attempts to make a database connection to the given URL.
boolean | Driver.acceptsURL(String url) Returns true if the driver thinks that it can open a connection to the given URL.
DriverPropertyInfo[] | Driver.getPropertyInfo(String url, Properties info) Gets information about the possible properties for this driver.
static Timestamp | Timestamp.valueOf(String s) Converts a String object in JDBC timestamp escape format to a Timestamp value.
PreparedStatement | Connection.prepareStatement(String sql) Creates a PreparedStatement object for sending parameterized SQL statements to the database.
CallableStatement | Connection.prepareCall(String sql) Creates a CallableStatement object for calling database stored procedures.
String | Connection.nativeSQL(String sql) Converts the given SQL statement into the system's native SQL grammar.
void | Connection.setCatalog(String catalog) Sets a catalog name in order to select a subspace of this Connection's database in which to work.
PreparedStatement | Connection.prepareStatement(String sql, int resultSetType, int resultSetConcurrency) Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
CallableStatement | Connection.prepareCall(String sql, int resultSetType, int resultSetConcurrency) Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
void | SQLOutput.writeString(String x) Writes the next attribute to the stream as a String in the Java programming language.
static Connection | DriverManager.getConnection(String url, Properties info) Attempts to establish a connection to the given database URL.
static Connection | DriverManager.getConnection(String url, String user, String password) Attempts to establish a connection to the given database URL.
static Connection | DriverManager.getConnection(String url) Attempts to establish a connection to the given database URL.
static Driver | DriverManager.getDriver(String url) Attempts to locate a driver that understands the given URL.
static void | DriverManager.println(String message) Prints a message to the current JDBC log stream.
static Date | Date.valueOf(String s) Converts a string in JDBC date escape format to a Date value.
void | CallableStatement.registerOutParameter(int paramIndex, int sqlType, String typeName) Registers the designated output parameter.
static Time | Time.valueOf(String s) Converts a string in JDBC time escape format to a Time value.
ResultSet | DatabaseMetaData.getProcedures(String catalog, String schemaPattern, String procedureNamePattern) Gets a description of the stored procedures available in a catalog.
ResultSet | DatabaseMetaData.getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) Gets a description of a catalog's stored procedure parameters and result columns.
ResultSet | DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Gets a description of tables available in a catalog.
ResultSet | DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Gets a description of table columns available in the specified catalog.
ResultSet | DatabaseMetaData.getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) Gets a description of the access rights for a table's columns.
ResultSet | DatabaseMetaData.getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) Gets a description of the access rights for each table available in a catalog.
ResultSet | DatabaseMetaData.getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) Gets a description of a table's optimal set of columns that uniquely identifies a row.
ResultSet | DatabaseMetaData.getVersionColumns(String catalog, String schema, String table) Gets a description of a table's columns that are automatically updated when any value in a row is updated.
ResultSet | DatabaseMetaData.getPrimaryKeys(String catalog, String schema, String table) Gets a description of a table's primary key columns.
ResultSet | DatabaseMetaData.getImportedKeys(String catalog, String schema, String table) Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
ResultSet | DatabaseMetaData.getExportedKeys(String catalog, String schema, String table) Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).
ResultSet | DatabaseMetaData.getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
ResultSet | DatabaseMetaData.getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) Gets a description of a table's indices and statistics.
ResultSet | DatabaseMetaData.getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) Gets a description of the user-defined types defined in a particular schema.
String | ResultSet.getString(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
boolean | ResultSet.getBoolean(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
byte | ResultSet.getByte(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
short | ResultSet.getShort(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
int | ResultSet.getInt(String columnName) Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
long | ResultSet.getLong(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
float | ResultSet.getFloat(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
double | ResultSet.getDouble(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
BigDecimal | ResultSet.getBigDecimal(String columnName, int scale) Deprecated.
byte[] | ResultSet.getBytes(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
Date | ResultSet.getDate(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Time | ResultSet.getTime(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Timestamp | ResultSet.getTimestamp(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
InputStream | ResultSet.getAsciiStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
InputStream | ResultSet.getUnicodeStream(String columnName) Deprecated.
InputStream | ResultSet.getBinaryStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
Object | ResultSet.getObject(String columnName) Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
int | ResultSet.findColumn(String columnName) Maps the given ResultSet column name to its ResultSet column index.
Reader | ResultSet.getCharacterStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
BigDecimal | ResultSet.getBigDecimal(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
void | ResultSet.updateString(int columnIndex, String x) Updates the designated column with a String value.
void | ResultSet.updateNull(String columnName) Updates the designated column with a null value.
void | ResultSet.updateBoolean(String columnName, boolean x) Updates the designated column with a boolean value.
void | ResultSet.updateByte(String columnName, byte x) Updates the designated column with a byte value.
void | ResultSet.updateShort(String columnName, short x) Updates the designated column with a short value.
void | ResultSet.updateInt(String columnName, int x) Updates the designated column with an int value.
void | ResultSet.updateLong(String columnName, long x) Updates the designated column with a long value.
void | ResultSet.updateFloat(String columnName, float x) Updates the designated column with a float value.
void | ResultSet.updateDouble(String columnName, double x) Updates the designated column with a double value.
void | ResultSet.updateBigDecimal(String columnName, BigDecimal x) Updates the designated column with a java.sql.BigDecimal value.
void | ResultSet.updateString(String columnName, String x) Updates the designated column with a String value.
void | ResultSet.updateBytes(String columnName, byte[] x) Updates the designated column with a boolean value.
void | ResultSet.updateDate(String columnName, Date x) Updates the designated column with a java.sql.Date value.
void | ResultSet.updateTime(String columnName, Time x) Updates the designated column with a java.sql.Time value.
void | ResultSet.updateTimestamp(String columnName, Timestamp x) Updates the designated column with a java.sql.Timestamp value.
void | ResultSet.updateAsciiStream(String columnName, InputStream x, int length) Updates the designated column with an ascii stream value.
void | ResultSet.updateBinaryStream(String columnName, InputStream x, int length) Updates the designated column with a binary stream value.
void | ResultSet.updateCharacterStream(String columnName, Reader reader, int length) Updates the designated column with a character stream value.
void | ResultSet.updateObject(String columnName, Object x, int scale) Updates the designated column with an Object value.
void | ResultSet.updateObject(String columnName, Object x) Updates the designated column with an Object value.
Object | ResultSet.getObject(String colName, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Ref | ResultSet.getRef(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Blob | ResultSet.getBlob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Clob | ResultSet.getClob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Array | ResultSet.getArray(String colName) Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Date | ResultSet.getDate(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Time | ResultSet.getTime(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Timestamp | ResultSet.getTimestamp(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
long | Clob.position(String searchstr, long start) Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.

Constructors in java.sql with parameters of type String
SQLPermission(String name)
Creates a new SQLPermission object with the specified name.
SQLPermission(String name, String actions)
Creates a new SQLPermission object with the specified name.
SQLException(String reason, String SQLState, int vendorCode)
Constructs a fully-specified SQLException object.
SQLException(String reason, String SQLState)
Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.
SQLException(String reason)
Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.
BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts)
Constructs a fully-specified BatchUpdateException object, initializing it with the given values.
BatchUpdateException(String reason, String SQLState, int[] updateCounts)
Constructs a BatchUpdateException initialized with the given arguments (reason, SQLState, and updateCounts) and 0 for the vendor code.
BatchUpdateException(String reason, int[] updateCounts)
Constructs a BatchUpdateException initialized with reason, updateCounts and null for the SQLState and 0 for the vendorCode.
SQLWarning(String reason, String SQLstate, int vendorCode)
Constructs a fully-specified SQLWarning object initialized with the given values.
SQLWarning(String reason, String SQLstate)
Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.
SQLWarning(String reason)
Constructs an SQLWarning object with the given value for a reason; SQLState defaults to null, and vendorCode defaults to 0.
DriverPropertyInfo(String name, String value)
Constructs a DriverPropertyInfo object with a name and value; other members default to their initial values.

Uses of String in java.text

Methods in java.text that return String
String | AttributedCharacterIterator.Attribute.toString() Returns a string representation of the object.
protected String | AttributedCharacterIterator.Attribute.getName() Returns the name of the attribute.
String | Format.format(Object obj) Formats an object to produce a string.
String | NumberFormat.format(double number) Specialization of format.
String | NumberFormat.format(long number) Specialization of format.
String | ChoiceFormat.toPattern() Gets the pattern.
String | ParsePosition.toString() Return a string representation of this ParsePosition.
String | RuleBasedCollator.getRules() Gets the table-based rules for the collation object.
String | DateFormat.format(Date date) Formats a Date into a date/time string.
String | CollationKey.getSourceString() Returns the String that this CollationKey represents.
String | SimpleDateFormat.toPattern() Return a pattern string describing this date format.
String | SimpleDateFormat.toLocalizedPattern() Return a localized pattern string describing this date format.
String | FieldPosition.toString() Return a string representation of this FieldPosition.
String[] | DateFormatSymbols.getEras() Gets era strings.
String[] | DateFormatSymbols.getMonths() Gets month strings.
String[] | DateFormatSymbols.getShortMonths() Gets short month strings.
String[] | DateFormatSymbols.getWeekdays() Gets weekday strings.
String[] | DateFormatSymbols.getShortWeekdays() Gets short weekday strings.
String[] | DateFormatSymbols.getAmPmStrings() Gets ampm strings.
String[][] | DateFormatSymbols.getZoneStrings() Gets timezone strings.
String | DateFormatSymbols.getLocalPatternChars() Gets localized date-time pattern characters.
String | DecimalFormat.getPositivePrefix() Get the positive prefix.
String | DecimalFormat.getNegativePrefix() Get the negative prefix.
String | DecimalFormat.getPositiveSuffix() Get the positive suffix.
String | DecimalFormat.getNegativeSuffix() Get the negative suffix.
String | DecimalFormat.toPattern() Synthesizes a pattern string that represents the current state of this Format object.
String | DecimalFormat.toLocalizedPattern() Synthesizes a localized pattern string that represents the current state of this Format object.
String | Annotation.toString() Returns the String representation of this Annotation.
String | DecimalFormatSymbols.getInfinity() Gets the character used to represent infinity.
String | DecimalFormatSymbols.getNaN() Gets the character used to represent NaN.
String | DecimalFormatSymbols.getCurrencySymbol() Return the string denoting the local currency.
String | DecimalFormatSymbols.getInternationalCurrencySymbol() Return the international string denoting the local currency.
String | MessageFormat.toPattern() Gets the pattern.
static String | MessageFormat.format(String pattern, Object[] arguments) Convenience routine.

Methods in java.text with parameters of type String
void | CollationElementIterator.setText(String source) Set a new string over which to iterate.
abstract Object | Format.parseObject(String source, ParsePosition status) Parses a string to produce an object.
Object | Format.parseObject(String source) Parses a string to produce an object.
Object | NumberFormat.parseObject(String source, ParsePosition parsePosition) Parses a string to produce an object.
abstract Number | NumberFormat.parse(String text, ParsePosition parsePosition) Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
Number | NumberFormat.parse(String text) Convenience method.
void | ChoiceFormat.applyPattern(String newPattern) Sets the pattern.
void | ChoiceFormat.setChoices(double[] limits, String[] formats) Set the choices to be used in formatting.
Number | ChoiceFormat.parse(String text, ParsePosition status) Parses a Number from the input text.
abstract int | Collator.compare(String source, String target) Compares the source string to the target string according to the collation rules for this Collator.
abstract CollationKey | Collator.getCollationKey(String source) Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.
boolean | Collator.equals(String source, String target) Convenience method for comparing the equality of two strings based on this Collator's collation rules.
CollationElementIterator | RuleBasedCollator.getCollationElementIterator(String source) Return a CollationElementIterator for the given String.
int | RuleBasedCollator.compare(String source, String target) Compares the character data stored in two different strings based on the collation rules.
CollationKey | RuleBasedCollator.getCollationKey(String source) Transforms the string into a series of characters that can be compared with CollationKey.compareTo.
Date | DateFormat.parse(String text) Parse a date/time string.
abstract Date | DateFormat.parse(String text, ParsePosition pos) Parse a date/time string according to the given parse position.
Object | DateFormat.parseObject(String source, ParsePosition pos) Parse a date/time string into an Object.
void | StringCharacterIterator.setText(String text) Reset this iterator to point to a new string.
Date | SimpleDateFormat.parse(String text, ParsePosition pos) Overrides DateFormat
void | SimpleDateFormat.applyPattern(String pattern) Apply the given unlocalized pattern string to this date format.
void | SimpleDateFormat.applyLocalizedPattern(String pattern) Apply the given localized pattern string to this date format.
void | DateFormatSymbols.setEras(String[] newEras) Sets era strings.
void | DateFormatSymbols.setMonths(String[] newMonths) Sets month strings.
void | DateFormatSymbols.setShortMonths(String[] newShortMonths) Sets short month strings.
void | DateFormatSymbols.setWeekdays(String[] newWeekdays) Sets weekday strings.
void | DateFormatSymbols.setShortWeekdays(String[] newShortWeekdays) Sets short weekday strings.
void | DateFormatSymbols.setAmPmStrings(String[] newAmpms) Sets ampm strings.
void | DateFormatSymbols.setZoneStrings(String[][] newZoneStrings) Sets timezone strings.
void | DateFormatSymbols.setLocalPatternChars(String newLocalPatternChars) Sets localized date-time pattern characters.
void | BreakIterator.setText(String newText) Set a new text string to be scanned.
Number | DecimalFormat.parse(String text, ParsePosition parsePosition) Returns an instance of Number with a value matching the given string.
void | DecimalFormat.setPositivePrefix(String newValue) Set the positive prefix.
void | DecimalFormat.setNegativePrefix(String newValue) Set the negative prefix.
void | DecimalFormat.setPositiveSuffix(String newValue) Set the positive suffix.
void | DecimalFormat.setNegativeSuffix(String newValue) Set the positive suffix.
void | DecimalFormat.applyPattern(String pattern) Apply the given pattern to this Format object.
void | DecimalFormat.applyLocalizedPattern(String pattern) Apply the given pattern to this Format object.
void | DecimalFormatSymbols.setInfinity(String infinity) Set the character used to represent infinity.
void | DecimalFormatSymbols.setNaN(String NaN) Set the character used to represent NaN.
void | DecimalFormatSymbols.setCurrencySymbol(String currency) Set the string denoting the local currency.
void | DecimalFormatSymbols.setInternationalCurrencySymbol(String currency) Set the international string denoting the local currency.
void | MessageFormat.applyPattern(String newPattern) Sets the pattern.
static String | MessageFormat.format(String pattern, Object[] arguments) Convenience routine.
Object[] | MessageFormat.parse(String source, ParsePosition status) Parses the string.
Object[] | MessageFormat.parse(String source) Parses the string.
Object | MessageFormat.parseObject(String text, ParsePosition status) Parses the string.

Constructors in java.text with parameters of type String
AttributedCharacterIterator.Attribute(String name)
Constructs an Attribute with the given name.
ChoiceFormat(String newPattern)
Constructs with limits and corresponding formats based on the pattern.
ChoiceFormat(double[] limits, String[] formats)
Constructs with the limits and the corresponding formats.
RuleBasedCollator(String rules)
RuleBasedCollator constructor.
ParseException(String s, int errorOffset)
Constructs a ParseException with the specified detail message and offset.
StringCharacterIterator(String text)
Constructs an iterator with an initial index of 0.
StringCharacterIterator(String text, int pos)
Constructs an iterator with the specified initial index.
StringCharacterIterator(String text, int begin, int end, int pos)
Constructs an iterator over the given range of the given string, with the index set at the specified position.
SimpleDateFormat(String pattern)
Construct a SimpleDateFormat using the given pattern in the default locale.
SimpleDateFormat(String pattern, Locale loc)
Construct a SimpleDateFormat using the given pattern and locale.
SimpleDateFormat(String pattern, DateFormatSymbols formatData)
Construct a SimpleDateFormat using the given pattern and locale-specific symbol data.
AttributedString(String text)
Constructs an AttributedString instance with the given text.
AttributedString(String text, Map attributes)
Constructs an AttributedString instance with the given text and attributes.
DecimalFormat(String pattern)
Create a DecimalFormat from the given pattern and the symbols for the default locale.
DecimalFormat(String pattern, DecimalFormatSymbols symbols)
Create a DecimalFormat from the given pattern and symbols.
MessageFormat(String pattern)
Constructs with the specified pattern.

Uses of String in java.util

Methods in java.util that return String
 String EventObject.toString()
Returns a String representation of this EventObject.
 String Hashtable.toString()
Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space).
 String Properties.getProperty(String key)
Searches for the property with the specified key in this property list.
 String Properties.getProperty(String key, String defaultValue)
Searches for the property with the specified key in this property list.
 String Date.toString()
Converts this Date object to a String of the form:
 String Date.toLocaleString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date).
 String Date.toGMTString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.
 String BitSet.toString()
Returns a string representation of this bit set.
 String AbstractCollection.toString()
Returns a string representation of this collection.
 String AbstractMap.toString()
Returns a string representation of this map.
 String Vector.toString()
Returns a string representation of this Vector, containing the String representation of each element.
 String PropertyPermission.getActions()
Returns the "canonical string representation" of the actions.
 String ResourceBundle.getString(String key)
Get an object from a ResourceBundle.
 String[] ResourceBundle.getStringArray(String key)
Get an object from a ResourceBundle.
 String TimeZone.getID()
Gets the ID of this time zone.
 String TimeZone.getDisplayName()
Returns a name of this time zone suitable for presentation to the user in the default locale.
 String TimeZone.getDisplayName(Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale.
 String TimeZone.getDisplayName(boolean daylight, int style)
Returns a name of this time zone suitable for presentation to the user in the default locale.
 String TimeZone.getDisplayName(boolean daylight, int style, Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale.
static String[] TimeZone.getAvailableIDs(int rawOffset)
Gets the available IDs according to the given time zone offset.
static String[] TimeZone.getAvailableIDs()
Gets all the available IDs supported.
 String SimpleTimeZone.toString()
Return a string representation of this time zone.
 String Calendar.toString()
Return a string representation of this calendar.
 String MissingResourceException.getClassName()
Gets parameter passed by constructor.
 String MissingResourceException.getKey()
Gets parameter passed by constructor.
 String StringTokenizer.nextToken()
Returns the next token from this string tokenizer.
 String StringTokenizer.nextToken(String delim)
Returns the next token in this string tokenizer's string.
static String[] Locale.getISOCountries()
Returns a list of all 2-letter country codes defined in ISO 3166.
static String[] Locale.getISOLanguages()
Returns a list of all 2-letter language codes defined in ISO 639.
 String Locale.getLanguage()
Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.
 String Locale.getCountry()
Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
 String Locale.getVariant()
Returns the variant code for this locale.
 String Locale.toString()
Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars.
 String Locale.getISO3Language()
Returns a three-letter abbreviation for this locale's language.
 String Locale.getISO3Country()
Returns a three-letter abbreviation for this locale's country.
 String Locale.getDisplayLanguage()
Returns a name for the locale's language that is appropriate for display to the user.
 String Locale.getDisplayLanguage(Locale inLocale)
Returns a name for the locale's language that is appropriate for display to the user.
 String Locale.getDisplayCountry()
Returns a name for the locale's country that is appropriate for display to the user.
 String Locale.getDisplayCountry(Locale inLocale)
Returns a name for the locale's country that is appropriate for display to the user.
 String Locale.getDisplayVariant()
Returns a name for the locale's variant code that is appropriate for display to the user.
 String Locale.getDisplayVariant(Locale inLocale)
Returns a name for the locale's variant code that is appropriate for display to the user.
 String Locale.getDisplayName()
Returns a name for the locale that is appropriate for display to the user.
 String Locale.getDisplayName(Locale inLocale)
Returns a name for the locale that is appropriate for display to the user.

Methods in java.util with parameters of type String
 Object Properties.setProperty(String key, String value)
Calls the hashtable method put.
 void Properties.save(OutputStream out, String header)
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.
 void Properties.store(OutputStream out, String header)
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.
 String Properties.getProperty(String key)
Searches for the property with the specified key in this property list.
 String Properties.getProperty(String key, String defaultValue)
Searches for the property with the specified key in this property list.
static long Date.parse(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
 String ResourceBundle.getString(String key)
Get an object from a ResourceBundle.
 String[] ResourceBundle.getStringArray(String key)
Get an object from a ResourceBundle.
 Object ResourceBundle.getObject(String key)
Get an object from a ResourceBundle.
static ResourceBundle ResourceBundle.getBundle(String baseName)
Get the appropriate ResourceBundle subclass.
static ResourceBundle ResourceBundle.getBundle(String baseName, Locale locale)
Get the appropriate ResourceBundle subclass.
static ResourceBundle ResourceBundle.getBundle(String baseName, Locale locale, ClassLoader loader)
Get the appropriate ResourceBundle subclass.
protected abstract  Object ResourceBundle.handleGetObject(String key)
Get an object from a ResourceBundle.
 Object PropertyResourceBundle.handleGetObject(String key)
Override of ResourceBundle, same semantics
 void TimeZone.setID(String ID)
Sets the time zone ID.
static TimeZone TimeZone.getTimeZone(String ID)
Gets the TimeZone for the given ID.
 String StringTokenizer.nextToken(String delim)
Returns the next token in this string tokenizer's string.
 Object ListResourceBundle.handleGetObject(String key)
Override of ResourceBundle, same semantics

Constructors in java.util with parameters of type String
Date(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
NoSuchElementException(String s)
Constructs a NoSuchElementException, saving a reference to the error message string s for later retrieval by the getMessage method.
TooManyListenersException(String s)
Constructs a TooManyListenersException with the specified detail message.
PropertyPermission(String name, String actions)
Creates a new PropertyPermission object with the specified name.
ConcurrentModificationException(String message)
Constructs a ConcurrentModificationException with the specified detail message.
SimpleTimeZone(int rawOffset, String ID)
Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID.
SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)
Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time.
SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings)
Constructor.
MissingResourceException(String s, String className, String key)
Constructs a MissingResourceException with the specified information.
StringTokenizer(String str, String delim, boolean returnDelims)
Constructs a string tokenizer for the specified string.
StringTokenizer(String str, String delim)
Constructs a string tokenizer for the specified string.
StringTokenizer(String str)
Constructs a string tokenizer for the specified string.
Locale(String language, String country, String variant)
Construct a locale from language, country, variant.
Locale(String language, String country)
Construct a locale from language, country.

Uses of String in java.util.jar

Fields in java.util.jar declared as String
static String JarFile.MANIFEST_NAME
The JAR manifest file name.

Methods in java.util.jar that return String
String | Attributes.getValue(String name) Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.
String | Attributes.getValue(Attributes.Name name) Returns the value of the specified Attributes.Name, or null if the attribute was not found.
String | Attributes.putValue(String name, String value) Associates the specified value with the specified attribute name, specified as a String.
String | Attributes.Name.toString() Returns the attribute name as a String.

Methods in java.util.jar with parameters of type String
protected ZipEntry | JarInputStream.createZipEntry(String name) Creates a new JarEntry (ZipEntry) for the specified JAR file entry name.
String | Attributes.getValue(String name) Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.
String | Attributes.putValue(String name, String value) Associates the specified value with the specified attribute name, specified as a String.
Attributes | Manifest.getAttributes(String name) Returns the Attributes for the specified entry name.
JarEntry | JarFile.getJarEntry(String name) Returns the JarEntry for the given entry name or null if not found.
ZipEntry | JarFile.getEntry(String name) Returns the ZipEntry for the given entry name or null if not found.

Constructors in java.util.jar with parameters of type String
JarException(String s)
Constructs a JarException with the specified detail message.
Attributes.Name(String name)
Constructs a new attribute name using the given string name.
JarFile(String name)
Creates a new JarFile to read from the specified file name.
JarFile(String name, boolean verify)
Creates a new JarFile to read from the specified file name.
JarEntry(String name)
Creates a new JarEntry for the specified JAR file entry name.

Uses of String in java.util.zip

Methods in java.util.zip that return String
String | ZipFile.getName() Returns the path name of the ZIP file.
String | ZipEntry.getName() Returns the name of the entry.
String | ZipEntry.getComment() Returns the comment string for the entry, or null if none.
String | ZipEntry.toString() Returns a string representation of the ZIP entry.

Methods in java.util.zip with parameters of type String
protected ZipEntry | ZipInputStream.createZipEntry(String name) Creates a new ZipEntry object for the specified entry name.
ZipEntry | ZipFile.getEntry(String name) Returns the zip file entry for the specified name, or null if not found.
void | ZipEntry.setComment(String comment) Sets the optional comment string for the entry.
void | ZipOutputStream.setComment(String comment) Sets the ZIP file comment.

Constructors in java.util.zip with parameters of type String
ZipException(String s)
Constructs an ZipException with the specified detail message.
ZipFile(String name)
Opens a zip file for reading.
ZipEntry(String name)
Creates a new zip entry with the specified name.
DataFormatException(String s)
Constructs a DataFormatException with the specified detail message.

Uses of String in javax.accessibility

Fields in javax.accessibility declared as String
static String | AccessibleContext.ACCESSIBLE_NAME_PROPERTY Constant used to determine when the accessibleName property has changed.
static String | AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY Constant used to determine when the accessibleDescription property has changed.
static String | AccessibleContext.ACCESSIBLE_STATE_PROPERTY Constant used to determine when the accessibleStateSet property has changed.
static String | AccessibleContext.ACCESSIBLE_VALUE_PROPERTY Constant used to determine when the accessibleValue property has changed.
static String | AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY Constant used to determine when the accessibleSelection has changed.
static String | AccessibleContext.ACCESSIBLE_TEXT_PROPERTY Constant used to determine when the accessibleText has changed.
static String | AccessibleContext.ACCESSIBLE_CARET_PROPERTY Constant used to determine when the accessibleText caret has changed.
static String | AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY Constant used to determine when the visual appearance of the object has changed.
static String | AccessibleContext.ACCESSIBLE_CHILD_PROPERTY Constant used to determine when Accessible children are added/removed from the object.
static String | AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY Constant used to determine when the active descendant of a component has changed.
static String | AccessibleContext.ACCESSIBLE_TABLE_CAPTION_CHANGED Constant used to indicate that the table caption has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table caption and the new value will be an Accessible representing the new table caption.
static String | AccessibleContext.ACCESSIBLE_TABLE_SUMMARY_CHANGED Constant used to indicate that the table summary has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table summary and the new value will be an Accessible representing the new table summary.
static String | AccessibleContext.ACCESSIBLE_TABLE_MODEL_CHANGED Constant used to indicate that table data has changed.
static String | AccessibleContext.ACCESSIBLE_TABLE_ROW_HEADER_CHANGED Constant used to indicate that the row header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
static String | AccessibleContext.ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED Constant used to indicate that the row description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the row index.
static String | AccessibleContext.ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED Constant used to indicate that the column header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
static String | AccessibleContext.ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED Constant used to indicate that the column description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the column index.
static String | AccessibleContext.ACCESSIBLE_ACTION_PROPERTY Constant used to indicate that the supported set of actions has changed.
protected String | AccessibleContext.accessibleName A localized String containing the name of the object.
protected String | AccessibleContext.accessibleDescription A localized String containing the description of the object.
protected String | AccessibleBundle.key The locale independent name of the state.
static String | AccessibleRelation.LABEL_FOR Indicates an object is a label for one or more target objects.
static String | AccessibleRelation.LABELED_BY Indicates an object is labeled by one or more target objects.
static String | AccessibleRelation.MEMBER_OF Indicates an object is a member of a group of one or more target objects.
static String | AccessibleRelation.CONTROLLER_FOR Indicates an object is a controller for one or more target objects.
static String | AccessibleRelation.CONTROLLED_BY Indicates an object is controlled by one or more target objects.
static String | AccessibleRelation.LABEL_FOR_PROPERTY Identifies that the target group for a label has changed
static String | AccessibleRelation.LABELED_BY_PROPERTY Identifies that the objects that are doing the labeling have changed
static String | AccessibleRelation.MEMBER_OF_PROPERTY Identifies that group membership has changed.
static String | AccessibleRelation.CONTROLLER_FOR_PROPERTY Identifies that the controller for the target object has changed
static String | AccessibleRelation.CONTROLLED_BY_PROPERTY Identifies that the target object that is doing the controlling has changed

Methods in javax.accessibility that return String
String | AccessibleContext.getAccessibleName() Gets the accessibleName property of this object.
String | AccessibleContext.getAccessibleDescription() Gets the accessibleDescription property of this object.
String | AccessibleText.getAtIndex(int part, int index) Returns the String at a given index.
String | AccessibleText.getAfterIndex(int part, int index) Returns the String after a given index.
String | AccessibleText.getBeforeIndex(int part, int index) Returns the String before a given index.
String | AccessibleText.getSelectedText() Returns the portion of the text that is selected.
String | AccessibleIcon.getAccessibleIconDescription() Gets the description of the icon.
protected String | AccessibleBundle.toDisplayString(String resourceBundleName, Locale locale) Obtains the key as a localized string.
String | AccessibleBundle.toDisplayString(Locale locale) Obtains the key as a localized string.
String | AccessibleBundle.toDisplayString() Gets localized string describing the key using the default locale.
String | AccessibleBundle.toString() Gets localized string describing the key using the default locale.
String | AccessibleRelation.getKey() Returns the key for this relation
abstract String | AccessibleHyperlink.getAccessibleActionDescription(int i) Returns a String description of this particular link action.
String | AccessibleStateSet.toString() Creates a localized String representing all the states in the set using the default locale.
String | AccessibleAction.getAccessibleActionDescription(int i) Returns a description of the specified action of the object.
String | AccessibleRelationSet.toString() Creates a localized String representing all the relations in the set using the default locale.

Methods in javax.accessibility with parameters of type String
void | AccessibleContext.setAccessibleName(String s) Sets the localized accessible name of this object.
void | AccessibleContext.setAccessibleDescription(String s) Sets the accessible description of this object.
void | AccessibleContext.firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
void | AccessibleIcon.setAccessibleIconDescription(String description) Sets the description of the icon.
protected String | AccessibleBundle.toDisplayString(String resourceBundleName, Locale locale) Obtains the key as a localized string.
boolean | AccessibleRelationSet.contains(String key) Returns whether the relation set contains a relation that matches the specified key.
AccessibleRelation | AccessibleRelationSet.get(String key) Returns the relation that matches the specified key.

Constructors in javax.accessibility with parameters of type String
AccessibleRelation(String key)
Create a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String key, Object target)
Creates a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String key, Object[] target)
Creates a new AccessibleRelation using the given locale independent key.
AccessibleState(String key)
Creates a new AccessibleState using the given locale independent key.
AccessibleRole(String key)
Creates a new AccessibleRole using the given locale independent key.

Uses of String in javax.naming

Fields in javax.naming declared as String
protected String | Reference.className Contains the fully-qualified name of the class of the object to which this Reference refers.
protected String | Reference.classFactory Contains the name of the factory class for creating an instance of the object to which this Reference refers.
protected String | Reference.classFactoryLocation Contains the location of the factory class.
protected String | RefAddr.addrType Contains the type of this address.
protected String | LinkException.linkExplanation Contains the exception of why resolution of the link failed.
static String | Context.INITIAL_CONTEXT_FACTORY Constant that holds the name of the environment property for specifying the initial context factory to use.
static String | Context.OBJECT_FACTORIES Constant that holds the name of the environment property for specifying the list of object factories to use.
static String | Context.STATE_FACTORIES Constant that holds the name of the environment property for specifying the list of state factories to use.
static String | Context.URL_PKG_PREFIXES Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories.
static String | Context.PROVIDER_URL Constant that holds the name of the environment property for specifying configuration information for the service provider to use.
static String | Context.DNS_URL Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com").
static String | Context.AUTHORITATIVE Constant that holds the name of the environment property for specifying the authoritativeness of the service requested.
static String | Context.BATCHSIZE Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol.
static String | Context.REFERRAL Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
static String | Context.SECURITY_PROTOCOL Constant that holds the name of the environment property for specifying the security protocol to use.
static String | Context.SECURITY_AUTHENTICATION Constant that holds the name of the environment property for specifying the security level to use.
static String | Context.SECURITY_PRINCIPAL Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service.
static String | Context.SECURITY_CREDENTIALS Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service.
static String | Context.LANGUAGE Constant that holds the name of the environment property for specifying the preferred language to use with the service.
static String | Context.APPLET Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties.

Methods in javax.naming that return String
String | Reference.getClassName() Retrieves the class name of the object to which this reference refers.
String | Reference.getFactoryClassName() Retrieves the class name of the factory of the object to which this reference refers.
String | Reference.getFactoryClassLocation() Retrieves the location of the factory of the object to which this reference refers.
String | Reference.toString() Generates the string representation of this reference.
String | NamingException.getExplanation() Retrieves the explanation associated with this exception.
String | NamingException.toString() Generates the string representation of this exception.
String | NamingException.toString(boolean detail) Generates the string representation in more detail.
String | RefAddr.getType() Retrieves the address type of this address.
String | RefAddr.toString() Generates the string representation of this address.
String | LinkException.getLinkExplanation() Retrieves the explanation associated with the problem encounter when resolving a link.
String | LinkException.toString() Generates the string representation of this exception.
String | LinkException.toString(boolean detail) Generates the string representation of this exception.
String | Name.get(int posn) Retrieves a component of this name.
String | BinaryRefAddr.toString() Generates the string representation of this address.
String | NameClassPair.getClassName() Retrieves the class name of the object bound to the name of this binding.
String | NameClassPair.getName() Retrieves the name of this binding.
String | NameClassPair.toString() Generates the string representation of this name/class pair.
String | Binding.getClassName() Retrieves the class name of the object bound to the name of this binding.
String | Binding.toString() Generates the string representation of this binding.
String | LinkRef.getLinkName() Retrieves the name of this link.
String | CompoundName.toString() Generates the string representation of this compound name, using the syntax rules of the compound name.
String | CompoundName.get(int posn) Retrieves a component of this compound name.
String | InitialContext.composeName(String name, String prefix) Composes the name of this context with a name relative to this context.
String | InitialContext.getNameInNamespace()
String | CompositeName.toString() Generates the string representation of this composite name.
String | CompositeName.get(int posn) Retrieves a component of this composite name.
String | Context.composeName(String name, String prefix) Composes the name of this context with a name relative to this context.
String | Context.getNameInNamespace() Retrieves the full name of this context within its own namespace.

Methods in javax.naming with parameters of type String
RefAddr | Reference.get(String addrType) Retrieves the first address that has the address type 'addrType'.
void | NamingException.appendRemainingComponent(String name) Add name as the last component in remaining name.
void | LinkException.setLinkExplanation(String msg) Sets the explanation associated with the problem encounter when resolving a link.
Name | Name.add(String comp) Adds a single component to the end of this name.
Name | Name.add(int posn, String comp) Adds a single component at a specified position within this name.
Name | NameParser.parse(String name) Parses a name into its components.
void | NameClassPair.setName(String name) Sets the name of this binding.
void | NameClassPair.setClassName(String name) Sets the class name of this binding.
Name | CompoundName.add(String comp) Adds a single component to the end of this compound name.
Name | CompoundName.add(int posn, String comp) Adds a single component at a specified position within this compound name.
protected Context | InitialContext.getURLOrDefaultInitCtx(String name) Retrieves a context for resolving the string name name.
Object | InitialContext.lookup(String name)
void | InitialContext.bind(String name, Object obj)
void | InitialContext.rebind(String name, Object obj)
void | InitialContext.unbind(String name)
void | InitialContext.rename(String oldName, String newName)
NamingEnumeration | InitialContext.list(String name)
NamingEnumeration | InitialContext.listBindings(String name)
void | InitialContext.destroySubcontext(String name)
Context | InitialContext.createSubcontext(String name)
Object | InitialContext.lookupLink(String name)
NameParser | InitialContext.getNameParser(String name)
String | InitialContext.composeName(String name, String prefix) Composes the name of this context with a name relative to this context.
Object | InitialContext.addToEnvironment(String propName, Object propVal)
Object | InitialContext.removeFromEnvironment(String propName)
Name | CompositeName.add(String comp) Adds a single component to the end of this composite name.
Name | CompositeName.add(int posn, String comp) Adds a single component at a specified position within this composite name.
Object | Context.lookup(String name) Retrieves the named object.
void | Context.bind(String name, Object obj) Binds a name to an object.
void | Context.rebind(String name, Object obj) Binds a name to an object, overwriting any existing binding.
void | Context.unbind(String name) Unbinds the named object.
void | Context.rename(String oldName, String newName) Binds a new name to the object bound to an old name, and unbinds the old name.
NamingEnumeration | Context.list(String name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | Context.listBindings(String name) Enumerates the names bound in the named context, along with the objects bound to them.
void | Context.destroySubcontext(String name) Destroys the named context and removes it from the namespace.
Context | Context.createSubcontext(String name) Creates and binds a new context.
Object | Context.lookupLink(String name) Retrieves the named object, following links except for the terminal atomic component of the name.
NameParser | Context.getNameParser(String name) Retrieves the parser associated with the named context.
String | Context.composeName(String name, String prefix) Composes the name of this context with a name relative to this context.
Object | Context.addToEnvironment(String propName, Object propVal) Adds a new environment property to the environment of this context.
Object | Context.removeFromEnvironment(String propName) Removes an environment property from the environment of this context.

Constructors in javax.naming with parameters of type String
Reference(String className)
Constructs a new reference for an object with class name 'className'.
Reference(String className, RefAddr addr)
Constructs a new reference for an object with class name 'className' and an address.
Reference(String className, String factory, String factoryLocation)
Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.
Reference(String className, RefAddr addr, String factory, String factoryLocation)
Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.
NamingException(String explanation)
Constructs a new NamingException with an explanation.
OperationNotSupportedException(String explanation)
Constructs a new instance of OperationNotSupportedException using an explanation.
InsufficientResourcesException(String explanation)
Constructs a new instance of InsufficientResourcesException using an explanation.
ServiceUnavailableException(String explanation)
Constructs a new instance of ServiceUnavailableException using an explanation.
NoInitialContextException(String explanation)
Constructs an instance of NoInitialContextException with an explanation.
RefAddr(String addrType)
Constructs a new instance of RefAddr using its address type.
LinkException(String explanation)
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
LinkLoopException(String explanation)
Constructs a new instance of LinkLoopException with an explanation All the other fields are initialized to null.
InvalidNameException(String explanation)
Constructs an instance of InvalidNameException using an explanation of the problem.
LimitExceededException(String explanation)
Constructs a new instance of LimitExceededException using an explanation.
SizeLimitExceededException(String explanation)
Constructs a new instance of SizeLimitExceededException using an explanation.
NamingSecurityException(String explanation)
Constructs a new instance of NamingSecurityException using the explanation supplied.
AuthenticationException(String explanation)
Constructs a new instance of AuthenticationException using the explanation supplied.
CommunicationException(String explanation)
Constructs a new instance of CommunicationException using the arguments supplied.
NameNotFoundException(String explanation)
Constructs a new instance of NameNotFoundException using the explanation supplied.
InterruptedNamingException(String explanation)
Constructs an instance of InterruptedNamingException using an explanation of the problem.
BinaryRefAddr(String addrType, byte[] src)
Constructs a new instance of BinaryRefAddr using its address type and a byte array for contents.
BinaryRefAddr(String addrType, byte[] src, int offset, int count)
Constructs a new instance of BinaryRefAddr using its address type and a region of a byte array for contents.
NameClassPair(String name, String className)
Constructs an instance of a NameClassPair given its name and class name.
NameClassPair(String name, String className, boolean isRelative)
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
Binding(String name, Object obj)
Constructs an instance of a Binding given its name and object.
Binding(String name, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, object, and whether the name is relative.
Binding(String name, String className, Object obj)
Constructs an instance of a Binding given its name, class name, and object.
Binding(String name, String className, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.
LinkRef(String linkName)
Constructs a LinkRef for a string name.
CompoundName(String n, Properties syntax)
Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.
ConfigurationException(String explanation)
Constructs a new instance of ConfigurationException using an explanation.
NotContextException(String explanation)
Constructs a new instance of NotContextException using an explanation.
ContextNotEmptyException(String explanation)
Constructs a new instance of ContextNotEmptyException using an explanation.
TimeLimitExceededException(String explanation)
Constructs a new instance of TimeLimitExceededException using the argument supplied.
CannotProceedException(String explanation)
Constructs a new instance of CannotProceedException using an explanation.
StringRefAddr(String addrType, String addr)
Constructs a new instance of StringRefAddr using its address type and contents.
AuthenticationNotSupportedException(String explanation)
Constructs a new instance of AuthenticationNotSupportedException using an explanation.
CompositeName(String n)
Constructs a new composite name instance by parsing the string n using the composite name syntax (left-to-right, slash separated).
NameAlreadyBoundException(String explanation)
Constructs a new instance of NameAlreadyBoundException using the explanation supplied.
PartialResultException(String explanation)
Constructs a new instance of the exception using the explanation message specified.
ReferralException(String explanation)
Constructs a new instance of ReferralException using the explanation supplied.
MalformedLinkException(String explanation)
Constructs a new instance of MalformedLinkException with an explanation All the other fields are initialized to null.
NoPermissionException(String explanation)
Constructs a new instance of NoPermissionException using an explanation.

Uses of String in javax.naming.directory

Fields in javax.naming.directory declared as String
protected  String BasicAttribute.attrID
Holds the attribute's id.

Methods in javax.naming.directory that return String
String[] | SearchControls.getReturningAttributes() Retrieves the attributes that will be returned as part of the search.
String | AttributeModificationException.toString() The string representation of this exception consists of information about where the error occurred, and the first unexecuted modification.
String | BasicAttribute.toString() Generates the string representation of this attribute.
String | BasicAttribute.getID()
String | SearchResult.toString() Generates the string representation of this SearchResult.
String | Attribute.getID() Retrieves the id of this attribute.
String | BasicAttributes.toString() Generates the string representation of this attribute set.
String | ModificationItem.toString() Generates the string representation of this modification item, which consists of the modification operation and its related attribute.

Methods in javax.naming.directory with parameters of type String
void | SearchControls.setReturningAttributes(String[] attrs) Specifies the attributes that will be returned as part of the search.
Attributes | DirContext.getAttributes(String name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | DirContext.getAttributes(String name, String[] attrIds) Retrieves selected attributes associated with a named object.
void | DirContext.modifyAttributes(String name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.modifyAttributes(String name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | DirContext.bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
DirContext | DirContext.createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.getSchema(String name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchemaClassDefinition(String name) Retrieves a context containing the schema objects of the named object's class definitions.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
Attribute | Attributes.get(String attrID) Retrieves the attribute with the given attribute id from the attribute set.
Attribute | Attributes.put(String attrID, Object val) Adds a new attribute to the attribute set.
Attribute | Attributes.remove(String attrID) Removes the attribute with the attribute id 'attrID' from the attribute set.
Attribute | BasicAttributes.get(String attrID)
Attribute | BasicAttributes.put(String attrID, Object val)
Attribute | BasicAttributes.remove(String attrID)
Attributes | InitialDirContext.getAttributes(String name)
Attributes | InitialDirContext.getAttributes(String name, String[] attrIds)
Attributes | InitialDirContext.getAttributes(Name name, String[] attrIds)
void | InitialDirContext.modifyAttributes(String name, int mod_op, Attributes attrs)
void | InitialDirContext.modifyAttributes(String name, ModificationItem[] mods)
void | InitialDirContext.bind(String name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(String name, Object obj, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(String name, Attributes attrs)
DirContext | InitialDirContext.getSchema(String name)
DirContext | InitialDirContext.getSchemaClassDefinition(String name)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(String name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Constructors in javax.naming.directory with parameters of type String
SearchControls(int scope, long countlim, int timelim, String[] attrs, boolean retobj, boolean deref)
Constructs a search constraints using arguments.
InvalidAttributeIdentifierException(String explanation)
Constructs a new instance of InvalidAttributeIdentifierException using the explanation supplied.
InvalidAttributesException(String explanation)
Constructs a new instance of InvalidAttributesException using an explanation.
InvalidSearchControlsException(String msg)
Constructs a new instance of InvalidSearchControlsException with an explanation.
AttributeModificationException(String explanation)
Constructs a new instance of AttributeModificationException using an explanation.
BasicAttribute(String id)
Constructs a new instance of an unordered attribute with no value.
BasicAttribute(String id, Object value)
Constructs a new instance of an unordered attribute with a single value.
BasicAttribute(String id, boolean ordered)
Constructs a new instance of a possibly ordered attribute with no value.
BasicAttribute(String id, Object value, boolean ordered)
Constructs a new instance of a possibly ordered attribute with a single value.
InvalidAttributeValueException(String explanation)
Constructs a new instance of InvalidAttributeValueException using an explanation.
SearchResult(String name, Object obj, Attributes attrs)
Constructs a search result using the result's name, its bound object, and its attributes.
SearchResult(String name, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
SearchResult(String name, String className, Object obj, Attributes attrs)
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
SearchResult(String name, String className, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
AttributeInUseException(String explanation)
Constructs a new instance of AttributeInUseException with an explanation.
InvalidSearchFilterException(String msg)
Constructs a new instance of InvalidSearchFilterException with an explanation.
BasicAttributes(String attrID, Object val)
Constructs a new instance of Attributes with one attribute.
BasicAttributes(String attrID, Object val, boolean ignoreCase)
Constructs a new instance of Attributes with one attribute.
NoSuchAttributeException(String explanation)
Constructs a new instance of NoSuchAttributeException using an explanation.
SchemaViolationException(String explanation)
Constructs a new instance of SchemaViolationException using the explanation supplied.

Uses of String in javax.naming.event

Methods in javax.naming.event with parameters of type String
void | EventDirContext.addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
void | EventDirContext.addNamingListener(String target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
void | EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | EventDirContext.addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.
void | EventContext.addNamingListener(String target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.

Uses of String in javax.naming.ldap

Fields in javax.naming.ldap declared as String
static String LdapContext.CONTROL_FACTORIES
Constant that holds the name of the environment property for specifying the list of control factories to use.

Methods in javax.naming.ldap that return String
String | Control.getID() Retrieves the object identifier assigned for the LDAP control.
String | ExtendedRequest.getID() Retrieves the object identifier of the request.
String[] | UnsolicitedNotification.getReferrals() Retrieves the referral(s) sent by the server.
String | ExtendedResponse.getID() Retrieves the object identifier of the response.

Methods in javax.naming.ldap with parameters of type String
 ExtendedResponse ExtendedRequest.createExtendedResponse(String id, byte[] berValue, int offset, int length)
Creates the response object that corresponds to this request.

Constructors in javax.naming.ldap with parameters of type String
LdapReferralException(String explanation)
Constructs a new instance of LdapReferralException using the explanation supplied.

Uses of String in javax.naming.spi

Fields in javax.naming.spi declared as String
static String NamingManager.CPE
Constant that holds the name of the environment property into which getContinuationContext() stores the value of its CannotProceedException parameter.

Methods in javax.naming.spi with parameters of type String
ResolveResult | Resolver.resolveToClass(String name, Class contextType) Partially resolves a name.
void | ResolveResult.appendRemainingComponent(String name) Adds a single component to the end of remaining name.
static Context | NamingManager.getURLContext(String scheme, Hashtable environment) Creates a context for the given URL scheme id.

Constructors in javax.naming.spi with parameters of type String
ResolveResult(Object robj, String rcomp)
Constructs a new instance of ResolveResult consisting of the resolved object and the remaining unresolved component.

Uses of String in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return String
static String Util.getCodebase(Class clz)
Returns the codebase, if any, for the given class.
 String ValueHandler.getRMIRepositoryID(Class clz)
Returns the CORBA RepositoryId for the given Java class.
 String Stub.toString()
Returns a string representation of this stub.
 String StubDelegate.toString(Stub self)
Delegation call for Stub.toString().
 String UtilDelegate.getCodebase(Class clz)
Delegation call for Util.getCodebase(java.lang.Class).

Methods in javax.rmi.CORBA with parameters of type String
static Class Util.loadClass(String className, String remoteCodebase, ClassLoader loader)
Returns a class instance for the specified class.
 Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
Reads a value from the stream using Java semantics.
 Class UtilDelegate.loadClass(String className, String remoteCodebase, ClassLoader loader)
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).

Uses of String in javax.sound.midi

Methods in javax.sound.midi that return String
String | SoundbankResource.getName() Obtains the name of the resource.
String | Soundbank.getName() Obtains the name of the sound bank.
String | Soundbank.getVersion() Obtains the version string for the sound bank.
String | Soundbank.getVendor() Obtains a string naming the company that provides the sound bank
String | Soundbank.getDescription() Obtains a textual description of the sound bank, suitable for display.
String | MidiDevice.Info.getName() Obtains the name of the device.
String | MidiDevice.Info.getVendor() Obtains the name of the company who supplies the device.
String | MidiDevice.Info.getDescription() Obtains the description of the device.
String | MidiDevice.Info.getVersion() Obtains the version of the device.
String | MidiDevice.Info.toString() Provides a string representation of the device information.
String | Sequencer.SyncMode.toString() Provides this synchronization mode's name as the string representation of the mode.

Constructors in javax.sound.midi with parameters of type String
SoundbankResource(Soundbank soundBank, String name, Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index.
Instrument(Soundbank soundbank, Patch patch, String name, Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.
MidiDevice.Info(String name, String vendor, String description, String version)
Constructs a device info object.
InvalidMidiDataException(String message)
Constructs an InvalidMidiDataException with the specified detail message.
MidiUnavailableException(String message)
Constructs a MidiUnavailableException with the specified detail message.
Sequencer.SyncMode(String name)
Constructs a synchronization mode.

Uses of String in javax.sound.sampled

Methods in javax.sound.sampled that return String
String | Line.Info.toString() Obtains a textual description of the line info.
String | DataLine.Info.toString() Obtains a textual description of the data line info.
String | Control.toString() Obtains a String describing the control type and its current state.
String | Control.Type.toString() Provides the String representation of the control type.
String | Mixer.Info.getName() Obtains the name of the mixer.
String | Mixer.Info.getVendor() Obtains the vendor of the mixer.
String | Mixer.Info.getDescription() Obtains the description of the mixer.
String | Mixer.Info.getVersion() Obtains the version of the mixer.
String | Mixer.Info.toString() Provides a string representation of the mixer info.
String | AudioFileFormat.toString() Provides a string representation of the file format.
String | AudioFileFormat.Type.toString() Provides the file type's name as the String representation of the file type.
String | AudioFileFormat.Type.getExtension() Obtains the common file name extension for this file type.
String | EnumControl.toString() Provides a string representation of the control.
String | LineEvent.toString() Obtains a string representation of the event.
String | LineEvent.Type.toString() Returns the type name as the string representation.
String | AudioFormat.toString() Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data".
String | AudioFormat.Encoding.toString() Provides the String representation of the encoding.
String | FloatControl.getUnits() Obtains the label for the units in which the control's values are expressed, such as "dB" or "frames per second."
String | FloatControl.getMinLabel() Obtains the label for the minimum value, such as "Left" or "Off."
String | FloatControl.getMidLabel() Obtains the label for the mid-point value, such as "Center" or "Default."
String | FloatControl.getMaxLabel() Obtains the label for the maximum value, such as "Right" or "Full."
String | FloatControl.toString() Provides a string representation of the control
String | CompoundControl.toString() Provides a string representation of the control
String | ReverbType.toString() Provides a String representation of the reverb type, including its name and its parameter settings.
String | Port.Info.getName() Obtains the name of the port.
String | Port.Info.toString() Provides a String representation of the port.
String | BooleanControl.getStateLabel(boolean state) Obtains the label for the specified state.
String | BooleanControl.toString() Provides a string representation of the control

Constructors in javax.sound.sampled with parameters of type String
Control.Type(String name)
Constructs a new control type with the name specified.
Mixer.Info(String name, String vendor, String description, String version)
Constructs a mixer's info object, passing it the given textual information.
AudioFileFormat.Type(String name, String extension)
Constructs a file type.
EnumControl.Type(String name)
Constructs a new enumerated control type.
LineEvent.Type(String name)
Constructs a new event type.
UnsupportedAudioFileException(String message)
Constructs a UnsupportedAudioFileException that has the specified detail message.
AudioFormat.Encoding(String name)
Constructs a new encoding.
LineUnavailableException(String message)
Constructs a LineUnavailableException that has the specified detail message.
AudioPermission(String name)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
AudioPermission(String name, String actions)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)
Constructs a new float control object with the given parameters
FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)
Constructs a new float control object with the given parameters.
FloatControl.Type(String name)
Constructs a new float control type.
CompoundControl.Type(String name)
Constructs a new compound control type.
ReverbType(String name, int earlyReflectionDelay, float earlyReflectionIntensity, int lateReflectionDelay, float lateReflectionIntensity, int decayTime)
Constructs a new reverb type that has the specified reverberation parameter values.
Port.Info(Class lineClass, String name, boolean isSource)
Constructs a port's info object from the information given.
BooleanControl(BooleanControl.Type type, boolean initialValue, String trueStateLabel, String falseStateLabel)
Constructs a new boolean control object with the given parameters.
BooleanControl.Type(String name)
Constructs a new boolean control type.

Uses of String in javax.swing

Fields in javax.swing declared as String
static String | JComponent.TOOL_TIP_TEXT_KEY The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".
static String | AbstractButton.MODEL_CHANGED_PROPERTY Identifies a change in the button model.
static String | AbstractButton.TEXT_CHANGED_PROPERTY Identifies a change in the button's text.
static String | AbstractButton.MNEMONIC_CHANGED_PROPERTY Identifies a change to the button's mnemonic.
static String | AbstractButton.MARGIN_CHANGED_PROPERTY Identifies a change in the button's margins.
static String | AbstractButton.VERTICAL_ALIGNMENT_CHANGED_PROPERTY Identifies a change in the button's vertical alignment.
static String | AbstractButton.HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY Identifies a change in the button's horizontal alignment.
static String | AbstractButton.VERTICAL_TEXT_POSITION_CHANGED_PROPERTY Identifies a change in the button's vertical text position.
static String | AbstractButton.HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY Identifies a change in the button's horizontal text position.
static String | AbstractButton.BORDER_PAINTED_CHANGED_PROPERTY Identifies a change to having the border drawn, or having it not drawn.
static String | AbstractButton.FOCUS_PAINTED_CHANGED_PROPERTY Identifies a change to having the border highlighted when focused, or not.
static String | AbstractButton.ROLLOVER_ENABLED_CHANGED_PROPERTY Identifies a change in the button's
static String | AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY Identifies a change from rollover enabled to disabled or back to enabled.
static String | AbstractButton.ICON_CHANGED_PROPERTY Identifies a change to the icon that represents the button.
static String | AbstractButton.PRESSED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been pressed.
static String | AbstractButton.SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been selected.
static String | AbstractButton.ROLLOVER_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the cursor is over the button.
static String | AbstractButton.ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the cursor is over the button and it has been selected.
static String | AbstractButton.DISABLED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been disabled.
static String | AbstractButton.DISABLED_SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been disabled and selected.
static String | JLayeredPane.LAYER_PROPERTY Bound property
static String | JCheckBox.BORDER_PAINTED_FLAT_CHANGED_PROPERTY Identifies a change to the flat property.
static String | JTextField.notifyAction Name of the action to send notification that the contents of the field have been accepted.
static String | Action.DEFAULT Useful constants that can be used as the storage-retrieval key when setting or getting one of this object's properties (text or icon).
static String | Action.NAME The key used for storing the name for the action, used for a menu or button.
static String | Action.SHORT_DESCRIPTION The key used for storing a short description for the action, used for tooltip text.
static String | Action.LONG_DESCRIPTION The key used for storing a longer description for the action, could be used for context-sensitive help.
static String | Action.SMALL_ICON The key used for storing a small icon for the action, used for toolbar buttons.
static String | Action.ACTION_COMMAND_KEY The key used to determine the command string for the ActionEvent that will be created when an Action is going to be notified as the result of residing in a Keymap associated with a JComponent.
static String | Action.ACCELERATOR_KEY The key used for storing a KeyStroke to be used as the accelerator for the action.
static String | Action.MNEMONIC_KEY The key used for storing an int key code to be used as the mnemonic for the action.
static String | JOptionPane.ICON_PROPERTY Bound property name for icon.
static String | JOptionPane.MESSAGE_PROPERTY Bound property name for message.
static String | JOptionPane.VALUE_PROPERTY Bounds property name for value.
static String | JOptionPane.OPTIONS_PROPERTY Bounds property namer for option.
static String | JOptionPane.INITIAL_VALUE_PROPERTY Bounds property name for initialValue.
static String | JOptionPane.MESSAGE_TYPE_PROPERTY Bounds property name for type.
static String | JOptionPane.OPTION_TYPE_PROPERTY Bound property name for optionType.
static String | JOptionPane.SELECTION_VALUES_PROPERTY Bound property name for selectionValues.
static String | JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY Bound property name for initialSelectionValue.
static String | JOptionPane.INPUT_VALUE_PROPERTY Bound property name for inputValue.
static String | JOptionPane.WANTS_INPUT_PROPERTY Bound property name for wantsInput.
static String | JColorChooser.SELECTION_MODEL_PROPERTY The selection model property name.
static String | JColorChooser.PREVIEW_PANEL_PROPERTY The preview panel property name.
static String | JColorChooser.CHOOSER_PANELS_PROPERTY The chooserPanel array property name.
protected String | JComboBox.actionCommand
protected String | DefaultButtonModel.actionCommand
protected String | JInternalFrame.title The title displayed in the frame's title bar.
static String | JInternalFrame.CONTENT_PANE_PROPERTY Bound property name.
static String | JInternalFrame.MENU_BAR_PROPERTY Bound property name.
static String | JInternalFrame.TITLE_PROPERTY Bound property name.
static String | JInternalFrame.LAYERED_PANE_PROPERTY Bound property name.
static String | JInternalFrame.ROOT_PANE_PROPERTY Bound property name.
static String | JInternalFrame.GLASS_PANE_PROPERTY Bound property name.
static String | JInternalFrame.FRAME_ICON_PROPERTY Bound property name.
static String | JInternalFrame.IS_SELECTED_PROPERTY Constrained property name indicated that this frame has selected status.
static String | JInternalFrame.IS_CLOSED_PROPERTY Constrained property name indicating that the frame is closed.
static String | JInternalFrame.IS_MAXIMUM_PROPERTY Constrained property name indicating that the frame is maximized.
static String | JInternalFrame.IS_ICON_PROPERTY Constrained property name indicating that the frame is iconified.
static String | JSplitPane.LEFT Used to add a Component to the left of the other Component.
static String | JSplitPane.RIGHT Used to add a Component to the right of the other Component.
static String | JSplitPane.TOP Used to add a Component above the other Component.
static String | JSplitPane.BOTTOM Used to add a Component below the other Component.
static String | JSplitPane.DIVIDER Used to add a Component that will represent the divider.
static String | JSplitPane.ORIENTATION_PROPERTY Bound property name for orientation (horizontal or vertical).
static String | JSplitPane.CONTINUOUS_LAYOUT_PROPERTY Bound property name for continuousLayout.
static String | JSplitPane.DIVIDER_SIZE_PROPERTY Bound property name for border.
static String | JSplitPane.ONE_TOUCH_EXPANDABLE_PROPERTY Bound property for oneTouchExpandable.
static String | JSplitPane.LAST_DIVIDER_LOCATION_PROPERTY Bound property for lastLocation.
static String | JSplitPane.DIVIDER_LOCATION_PROPERTY Bound property for the dividerLocation.
static String | JSplitPane.RESIZE_WEIGHT_PROPERTY Bound property for weight.
static String | JTree.CELL_RENDERER_PROPERTY Bound property name for cellRenderer.
static String | JTree.TREE_MODEL_PROPERTY Bound property name for treeModel.
static String | JTree.ROOT_VISIBLE_PROPERTY Bound property name for rootVisible.
static String | JTree.SHOWS_ROOT_HANDLES_PROPERTY Bound property name for showsRootHandles.
static String | JTree.ROW_HEIGHT_PROPERTY Bound property name for rowHeight.
static String | JTree.CELL_EDITOR_PROPERTY Bound property name for cellEditor.
static String | JTree.EDITABLE_PROPERTY Bound property name for editable.
static String | JTree.LARGE_MODEL_PROPERTY Bound property name for largeModel.
static String | JTree.SELECTION_MODEL_PROPERTY Bound property name for selectionModel.
static String | JTree.VISIBLE_ROW_COUNT_PROPERTY Bound property name for visibleRowCount.
static String | JTree.INVOKES_STOP_CELL_EDITING_PROPERTY Bound property name for messagesStopCellEditing.
static String | JTree.SCROLLS_ON_EXPAND_PROPERTY Bound property name for scrollsOnExpand.
static String | JTree.TOGGLE_CLICK_COUNT_PROPERTY Bound property name for toggleClickCount.
static String | JTree.LEAD_SELECTION_PATH_PROPERTY Bound property name for leadSelectionPath.
static String | JTree.ANCHOR_SELECTION_PATH_PROPERTY Bound property name for anchor selection path.
static String | JTree.EXPANDS_SELECTED_PATHS_PROPERTY Bound property name for expands selected paths property
static String | FocusManager.FOCUS_MANAGER_CLASS_PROPERTY This property name is used to get the FocusManager implementation that should be used for a given UI
static String | JFileChooser.CANCEL_SELECTION Instruction to cancel the current selection.
static String | JFileChooser.APPROVE_SELECTION Instruction to approve the current selection (same as pressing yes or ok).
static String | JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY Identifies change in the text on the approve (yes, ok) button.
static String | JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY Identifies change in the tooltip text for the approve (yes, ok) button.
static String | JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY Identifies change in the mnemonic for the approve (yes, ok) button.
static String | JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY Instruction to display the control buttons.
static String | JFileChooser.DIRECTORY_CHANGED_PROPERTY Identifies user's directory change.
static String | JFileChooser.SELECTED_FILE_CHANGED_PROPERTY Identifies change in user's single-file selection.
static String | JFileChooser.SELECTED_FILES_CHANGED_PROPERTY Identifies change in user's multiple-file selection.
static String | JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY Enables multiple-file selections.
static String | JFileChooser.FILE_SYSTEM_VIEW_CHANGED_PROPERTY Says that a different object is being used to find available drives on the system.
static String | JFileChooser.FILE_VIEW_CHANGED_PROPERTY Says that a different object is being used to retrieve file information.
static String | JFileChooser.FILE_HIDING_CHANGED_PROPERTY Identifies a change in the display-hidden-files property.
static String | JFileChooser.FILE_FILTER_CHANGED_PROPERTY User changed the kind of files to display.
static String | JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY Identifies a change in the kind of selection (single, multiple, etc.).
static String | JFileChooser.ACCESSORY_CHANGED_PROPERTY Says that a different accessory component is in use (for example, to preview files).
static String | JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY Identifies whether a the AcceptAllFileFilter is used or not.
static String | JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY Identifies a change in the dialog title.
static String | JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY Identifies a change in the type of files displayed (files only, directories only, or both files and directories).
static String | JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY Identifies a change in the list of predefined file filters the user can choose from.
static String | ScrollPaneConstants.VIEWPORT Identifies a "viewport" or display area, within which scrolled contents are visible.
static String | ScrollPaneConstants.VERTICAL_SCROLLBAR Identifies a vertical scrollbar.
static String | ScrollPaneConstants.HORIZONTAL_SCROLLBAR Identifies a horizonal scrollbar.
static String | ScrollPaneConstants.ROW_HEADER Identifies the area along the left side of the viewport between the upper left corner and the lower left corner.
static String | ScrollPaneConstants.COLUMN_HEADER Identifies the area at the top the viewport between the upper left corner and the upper right corner.
static String | ScrollPaneConstants.LOWER_LEFT_CORNER Identifies the lower left corner of the viewport.
static String | ScrollPaneConstants.LOWER_RIGHT_CORNER Identifies the lower right corner of the viewport.
static String | ScrollPaneConstants.UPPER_LEFT_CORNER Identifies the upper left corner of the viewport.
static String | ScrollPaneConstants.UPPER_RIGHT_CORNER Identifies the upper right corner of the viewport.
static String | ScrollPaneConstants.LOWER_LEADING_CORNER Identifies the lower leading edge corner of the viewport.
static String | ScrollPaneConstants.LOWER_TRAILING_CORNER Identifies the lower trailing edge corner of the viewport.
static String | ScrollPaneConstants.UPPER_LEADING_CORNER Identifies the upper leading edge corner of the viewport.
static String | ScrollPaneConstants.UPPER_TRAILING_CORNER Identifies the upper trailing edge corner of the viewport.
static String | ScrollPaneConstants.VERTICAL_SCROLLBAR_POLICY Identifies the vertical scroll bar policy property.
static String | ScrollPaneConstants.HORIZONTAL_SCROLLBAR_POLICY Identifies the horizontal scroll bar policy property.
protected String | JProgressBar.progressString A optional String that can be displayed on the progress bar.

Methods in javax.swing that return String
 String JComponent.getUIClassID()
Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component.
 String JComponent.getToolTipText()
Returns the tooltip string that has been set with setToolTipText().
 String JComponent.getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event.
protected  String JComponent.paramString()
Returns a string representation of this JComponent.
 String JEditorPane.getUIClassID()
Gets the class ID for the UI.
 String JEditorPane.getContentType()
Gets the type of content that this editor is currently set to deal with.
static String JEditorPane.getEditorKitClassNameForContentType(String type)
Returns the currently registered EditorKit class name for the type type.
 String JEditorPane.getText()
Returns the text contained in this TextComponent in terms of the content type of this editor.
protected  String JEditorPane.paramString()
Returns a string representation of this JEditorPane.
 String JTextPane.getUIClassID()
Returns the class ID for the UI.
protected  String JTextPane.paramString()
Returns a string representation of this JTextPane.
 String JViewport.getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
protected  String JViewport.paramString()
Returns a string representation of this JViewport.
protected  String JComponent.AccessibleJComponent.getBorderTitle(Border b)
Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title.
 String JComponent.AccessibleJComponent.getAccessibleName()
Gets the accessible name of this object.
 String JComponent.AccessibleJComponent.getAccessibleDescription()
Gets the accessible description of this object.
 String JTabbedPane.getUIClassID()
Returns the name of the UI class that implements the L&F for this component.
 String JTabbedPane.getTitleAt(int index)
Returns the tab title at index.
 String JTabbedPane.getToolTipTextAt(int index)
Returns the tab tooltip text at index.
 String JTabbedPane.getToolTipText(MouseEvent event)
Returns the tooltip text for the component determined by the mouse event location.
protected  String JTabbedPane.paramString()
Returns a string representation of this JTabbedPane.
 String KeyStroke.toString()
Returns a string that displays and identifies this object's properties.
 String AbstractButton.getText()
Returns the button's text.
 String AbstractButton.getActionCommand()
Returns the action command for this button.
 String AbstractButton.getLabel()
Deprecated. - Replaced by getText
protected  String AbstractButton.paramString()
Returns a string representation of this AbstractButton.
 String JMenuItem.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JMenuItem.paramString()
Returns a string representation of this JMenuItem.
 String JCheckBoxMenuItem.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JCheckBoxMenuItem.paramString()
Returns a string representation of this JCheckBoxMenuItem.
 String AbstractButton.AccessibleAbstractButton.getAccessibleName()
Returns the accessible name of this object.
 String AbstractButton.AccessibleAbstractButton.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
 String AbstractButton.AccessibleAbstractButton.getAtIndex(int part, int index)
Returns the String at a given index.
 String AbstractButton.AccessibleAbstractButton.getAfterIndex(int part, int index)
Returns the String after a given index.
 String AbstractButton.AccessibleAbstractButton.getBeforeIndex(int part, int index)
Returns the String before a given index.
 String AbstractButton.AccessibleAbstractButton.getSelectedText()
Returns the portion of the text that is selected.
 String DefaultBoundedRangeModel.toString()
Returns a string that displays all of the BoundedRangeModel properties.
protected  String JLayeredPane.paramString()
Returns a string representation of this JLayeredPane.
 String JToggleButton.getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
protected  String JToggleButton.paramString()
Returns a string representation of this JToggleButton.
 String JCheckBox.getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
protected  String JCheckBox.paramString()
Returns a string representation of this JCheckBox.
 String JTextField.getUIClassID()
Gets the class ID for a UI.
protected  String JTextField.paramString()
Returns a string representation of this JTextField.
 String JPasswordField.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JPasswordField.getText()
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
 String JPasswordField.getText(int offs, int len)
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
protected  String JPasswordField.paramString()
Returns a string representation of this JPasswordField.
static String JOptionPane.showInputDialog(Object message)
Shows a question-message dialog requesting input from the user.
static String JOptionPane.showInputDialog(Component parentComponent, Object message)
Shows a question-message dialog requesting input from the user parented to parentComponent.
static String JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static String JOptionPane.showInternalInputDialog(Component parentComponent, Object message)
Shows an internal question-message dialog requesting input from the user parented to parentComponent.
static String JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
 String JOptionPane.getUIClassID()
Returns the name of the UI class that implements the L&F for this component.
protected  String JOptionPane.paramString()
Returns a string representation of this JOptionPane.
 String RepaintManager.toString()
Returns a string that displays and identifies this object's properties.
 String JMenu.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JMenu.paramString()
Returns a string representation of this JMenu.
abstract  String LookAndFeel.getName()
Return a short string that identifies this look and feel, e.g.
abstract  String LookAndFeel.getID()
Return a string that identifies this look and feel.
abstract  String LookAndFeel.getDescription()
Return a one line description of this look and feel implementation, e.g.
 String LookAndFeel.toString()
Returns a string that displays and identifies this object's properties.
 String DefaultListSelectionModel.toString()
Returns a string that displays and identifies this object's properties.
 String JColorChooser.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JColorChooser.paramString()
Returns a string representation of this JColorChooser.
 String JButton.getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
protected  String JButton.paramString()
Returns a string representation of this JButton.
 String JPopupMenu.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JPopupMenu.getLabel()
Returns the popup menu's label
protected  String JPopupMenu.paramString()
Returns a string representation of this JPopupMenu.
 String JSeparator.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JSeparator.paramString()
Returns a string representation of this JSeparator.
 String JPopupMenu.Separator.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JWindow.paramString()
Returns a string representation of this JWindow.
 String JEditorPane.AccessibleJEditorPane.getAccessibleDescription()
Gets the accessibleDescription property of this object.
 String JEditorPane.JEditorPaneAccessibleHypertextSupport.getLinkText(int linkIndex)
Returns the contiguous text within the document that is associated with this hyperlink.
 String JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink.getAccessibleActionDescription(int i)
Return a String description of this particular link action.
 String ButtonModel.getActionCommand()
Returns the action command for this button.
protected  String JApplet.paramString()
Returns a string representation of this JApplet.
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
 String JComboBox.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JComboBox.getActionCommand()
Returns the action command that is included in the event sent to action listeners.
protected  String JComboBox.paramString()
Returns a string representation of this JComboBox.
 String JComboBox.AccessibleJComboBox.getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
 String JList.getUIClassID()
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
protected  String JList.paramString()
Returns a string representation of this JList.
 String JList.AccessibleJList.AccessibleJListChild.getAccessibleName()
 String JList.AccessibleJList.AccessibleJListChild.getAccessibleDescription()
 String JToolTip.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JToolTip.getTipText()
Returns the text that is shown when the tool tip is displayed.
protected  String JToolTip.paramString()
Returns a string representation of this JToolTip.
 String JToolTip.AccessibleJToolTip.getAccessibleDescription()
Get the accessible description of this object.
 String UIDefaults.getString(Object key)
If the value of key is a String return it, otherwise return null.
 String DefaultButtonModel.getActionCommand()
Returns the action command for this button.
 String JInternalFrame.getUIClassID()
Returns the name of the L&F class which renders this component.
 String JInternalFrame.getTitle()
Returns the title of the JInternalFrame.
 String JInternalFrame.getWarningString()
Gets the warning string that is displayed with this window.
protected  String JInternalFrame.paramString()
Returns a string representation of this JInternalFrame.
 String JInternalFrame.AccessibleJInternalFrame.getAccessibleName()
Get the accessible name of this object.
 String JInternalFrame.JDesktopIcon.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JPanel.getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
protected  String JPanel.paramString()
Returns a string representation of this JPanel.
protected  String JFrame.paramString()
Returns a string representation of this JFrame.
 String JFrame.AccessibleJFrame.getAccessibleName()
Get the accessible name of this object.
 String JSplitPane.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JSplitPane.paramString()
Returns a string representation of this JSplitPane.
 String JTree.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JTree.getToolTipText(MouseEvent event)
Overrides JComponent's getToolTipText method in order to allow renderer's tips to be used if it has text set.
 String JTree.convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
Called by the renderers to convert the specified value to text.
protected  String JTree.paramString()
Returns a string representation of this JTree.
 String JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleName()
Get the accessible name of this object.
 String JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleDescription()
Get the accessible description of this object.
 String JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleActionDescription(int i)
Return a description of the specified action of the tree node.
 String ProgressMonitor.getNote()
Specifies the additional note that is displayed along with the progress message.
 String SizeRequirements.toString()
Returns a string describing the minimum, preferred, and maximum size requirements, along with the alignment.
 String JTable.getColumnName(int column)
Returns the name of the column appearing in the view at column position column.
 String JTable.getToolTipText(MouseEvent event)
Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.
 String JTable.getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.
protected  String JTable.paramString()
Returns a string representation of this table.
 String JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleName()
Gets the accessible name of this object.
 String JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleDescription()
Gets the accessible description of this object.
 String JLabel.getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
 String JLabel.getText()
Returns the text string that the label displays.
protected  String JLabel.paramString()
Returns a string representation of this JLabel.
 String DefaultListModel.toString()
Returns a string that displays and identifies this object's properties.
 String JFileChooser.getDialogTitle()
Gets the string that goes in the JFileChooser's titlebar.
 String JFileChooser.getApproveButtonToolTipText()
Returns the tooltip text used in the ApproveButton.
 String JFileChooser.getApproveButtonText()
Returns the text used in the ApproveButton in the FileChooserUI.
 String JFileChooser.getName(File f)
Returns the filename.
 String JFileChooser.getDescription(File f)
Returns the file description.
 String JFileChooser.getTypeDescription(File f)
Returns the file type.
 String JFileChooser.getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
protected  String JFileChooser.paramString()
Returns a string representation of this JFileChooser.
 String JDesktopPane.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JDesktopPane.paramString()
Returns a string representation of this JDesktopPane.
 String JRadioButton.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JRadioButton.paramString()
Returns a string representation of this JRadioButton.
 String JLabel.AccessibleJLabel.getAccessibleName()
Get the accessible name of this object.
 String JLabel.AccessibleJLabel.getAtIndex(int part, int index)
Returns the String at a given index.
 String JLabel.AccessibleJLabel.getAfterIndex(int part, int index)
Returns the String after a given index.
 String JLabel.AccessibleJLabel.getBeforeIndex(int part, int index)
Returns the String before a given index.
 String JLabel.AccessibleJLabel.getSelectedText()
Returns the portion of the text that is selected.
 String JToolBar.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JToolBar.paramString()
Returns a string representation of this JToolBar.
 String JToolBar.Separator.getUIClassID()
Returns the name of the L&F class that renders this component.
 String JMenuBar.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JMenuBar.paramString()
Returns a string representation of this JMenuBar.
 String ImageIcon.getDescription()
Gets the description of the image.
 String ImageIcon.toString()
Returns a string representation of this image.
 String ImageIcon.AccessibleImageIcon.getAccessibleIconDescription()
Gets the description of the icon.
static String UIManager.getSystemLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
static String UIManager.getCrossPlatformLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF).
static String UIManager.getString(Object key)
Returns a string from the defaults table.
 String UIManager.LookAndFeelInfo.getName()
Returns the name of the look and feel in a form suitable for a menu or other presentation
 String UIManager.LookAndFeelInfo.getClassName()
Returns the name of the class that implements this look and feel.
 String UIManager.LookAndFeelInfo.toString()
Returns a string that displays and identifies this object's properties.
 String JRadioButtonMenuItem.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JRadioButtonMenuItem.paramString()
Returns a string representation of this JRadioButtonMenuItem.
 String JTextArea.getUIClassID()
Returns the class ID for the UI.
protected  String JTextArea.paramString()
Returns a string representation of this JTextArea.
 String JScrollPane.getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.
protected  String JScrollPane.paramString()
Returns a string representation of this JScrollPane.
 String JScrollBar.getUIClassID()
Returns the name of the LookAndFeel class for this component.
protected  String JScrollBar.paramString()
Returns a string representation of this JScrollBar.
 String JProgressBar.getString()
Returns the current value of the Progress String.
 String JProgressBar.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JProgressBar.paramString()
Returns a string representation of this JProgressBar.
 String JRootPane.getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
protected  String JRootPane.paramString()
Returns a string representation of this JRootPane.
protected  String JDialog.paramString()
Returns a string representation of this JDialog.
 String JDialog.AccessibleJDialog.getAccessibleName()
Get the accessible name of this object.
 String JSlider.getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String JSlider.paramString()
Returns a string representation of this JSlider.

Methods in javax.swing with parameters of type String
 void JComponent.registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void JComponent.setToolTipText(String text)
Registers the text to display in a tool tip.
protected  void JComponent.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Supports reporting bound property changes.
 void JComponent.firePropertyChange(String propertyName, byte oldValue, byte newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, char oldValue, char newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, short oldValue, short newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, int oldValue, int newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, long oldValue, long newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, float oldValue, float newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, double oldValue, double newValue)
Reports a bound property change.
 void JComponent.firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
Reports a bound property change.
 void JComponent.addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property.
 void JComponent.removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property.
protected  void JComponent.fireVetoableChange(String propertyName, Object oldValue, Object newValue)
Supports reporting constrained property changes.
protected  void JEditorPane.scrollToReference(String reference)
Scrolls the view to the given reference location (that is, the value returned by the UL.getRef method for the URL being displayed).
 void JEditorPane.setPage(String url)
Sets the current URL being displayed.
 void JEditorPane.setContentType(String type)
Sets the type of content that this editor handles.
 EditorKit JEditorPane.getEditorKitForContentType(String type)
Fetches the editor kit to use for the given type of content.
 void JEditorPane.setEditorKitForContentType(String type, EditorKit k)
Directly sets the editor kit to use for the given type.
 void JEditorPane.replaceSelection(String content)
Replaces the currently selected content with new content represented by the given string.
static EditorKit JEditorPane.createEditorKitForContentType(String type)
Creates a handler for the given type from the default registry of editor kits.
static void JEditorPane.registerEditorKitForContentType(String type, String classname)
Establishes the default bindings of type to classname.
static void JEditorPane.registerEditorKitForContentType(String type, String classname, ClassLoader loader)
Establishes the default bindings of type to classname.
static String JEditorPane.getEditorKitClassNameForContentType(String type)
Returns the currently registered EditorKit class name for the type type.
 void JEditorPane.setText(String t)
Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor.
 void JTextPane.replaceSelection(String content)
Replaces the currently selected content with new content represented by the given string.
 Style JTextPane.addStyle(String nm, Style parent)
Adds a new style into the logical style hierarchy.
 void JTextPane.removeStyle(String nm)
Removes a named non-null style previously added to the document.
 Style JTextPane.getStyle(String nm)
Fetches a named non-null style previously added.
 void ViewportLayout.addLayoutComponent(String name, Component c)
Adds the specified component to the layout.
protected  void JViewport.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Notifies listeners of a property change.
 void JTabbedPane.insertTab(String title, Icon icon, Component component, String tip, int index)
Inserts a component, at index, represented by a title and/or icon, either of which may be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component, String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component)
Adds a component represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Component component)
Adds a component represented by a title and no icon.
 Component JTabbedPane.add(String title, Component component)
Adds a component with the specified tab title.
 void JTabbedPane.setTitleAt(int index, String title)
Sets the title at index to title which can be null.
 void JTabbedPane.setToolTipTextAt(int index, String toolTipText)
Sets the tooltip text at index to toolTipText which can be null.
 int JTabbedPane.indexOfTab(String title)
Returns the first tab index with a given title, or -1 if no tab has this title.
static KeyStroke KeyStroke.getKeyStroke(String s)
Parse a string and return a KeyStroke.
 void AbstractButton.setText(String text)
Sets the button's text.
protected  int AbstractButton.checkHorizontalKey(int key, String exception)
Verify that key is a legal value for the horizontalAlignment properties.
protected  int AbstractButton.checkVerticalKey(int key, String exception)
Ensures that the key is a valid.
 void AbstractButton.setActionCommand(String actionCommand)
Sets the action command for this button.
 void AbstractButton.setLabel(String label)
Deprecated. - Replaced by setText(text)
protected  void AbstractButton.init(String text, Icon icon)
protected  void JMenuItem.init(String text, Icon icon)
Initialize the menu item with the specified text and icon.
 void JTextField.setActionCommand(String command)
Sets the command string used for action events.
 Object Action.getValue(String key)
Gets one of this object's properties using the associated key.
 void Action.putValue(String key, Object value)
Sets one of this object's properties using the associated key.
static String JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static void JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType)
Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
static void JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up a dialog displaying a message, specifying all parameters.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType)
Brings up a modal dialog where the number of choices is determined by the optionType parameter.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
Brings up a modal dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
 JDialog JOptionPane.createDialog(Component parentComponent, String title)
Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType)
Brings up an internal dialog panel that displays a message using a default icon determined by the messageType parameter.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up an internal dialog panel displaying a message, specifying all parameters.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType)
Brings up a internal dialog panel where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
Brings up an internal dialog panel where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static String JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType)
Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
 JInternalFrame JOptionPane.createInternalFrame(Component parentComponent, String title)
Creates and returns an instance of JInternalFrame.
static TitledBorder BorderFactory.createTitledBorder(String title)
Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder BorderFactory.createTitledBorder(Border border, String title)
Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition)
Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
static TitledBorder BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
static TitledBorder BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
 JMenuItem JMenu.add(String s)
Creates a new menu item with the specified text and appends it to the end of this menu.
 void JMenu.insert(String s, int pos)
Inserts a new menu item with the specified text at a given position.
static void LookAndFeel.installColors(JComponent c, String defaultBgName, String defaultFgName)
Convenience method for initializing a component's foreground and background color properties with values from the current defaults table.
static void LookAndFeel.installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table.
static void LookAndFeel.installBorder(JComponent c, String defaultBorderName)
Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
static Object LookAndFeel.makeIcon(Class baseClass, String gifFile)
Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.
static Color JColorChooser.showDialog(Component component, String title, Color initialColor)
Shows a modal color-chooser dialog and blocks until the dialog is hidden.
static JDialog JColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.
 JMenuItem JPopupMenu.add(String s)
Creates a new menu item with the specified text and appends it to the end of this menu.
 void JPopupMenu.setLabel(String label)
Sets the popup menu's label.
 void ScrollPaneLayout.addLayoutComponent(String s, Component c)
Adds the specified component to the layout.
 Component ScrollPaneLayout.getCorner(String key)
Returns the Component at the specified corner.
 void ButtonModel.setActionCommand(String s)
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
static Container SwingUtilities.getAncestorNamed(String name, Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds.
static int SwingUtilities.computeStringWidth(FontMetrics fm, String str)
Compute the width of the string using a font with the specified "metrics" (sizes).
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
 void JComboBox.setActionCommand(String aCommand)
Sets the action commnand that should be included in the event sent to action listeners.
 void JList.AccessibleJList.AccessibleJListChild.setAccessibleName(String s)
 void JList.AccessibleJList.AccessibleJListChild.setAccessibleDescription(String s)
 void JToolTip.setTipText(String tipText)
Sets the text to show when the tool tip is displayed.
 Class UIDefaults.getUIClass(String uiClassID, ClassLoader uiClassLoader)
The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
 Class UIDefaults.getUIClass(String uiClassID)
Returns the L&F class that renders this component.
protected  void UIDefaults.getUIError(String msg)
If getUI() fails for any reason, it calls this method before returning null.
protected  void UIDefaults.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Support for reporting bound property changes.
 void DefaultButtonModel.setActionCommand(String actionCommand)
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
 void BoxLayout.addLayoutComponent(String name, Component comp)
Not used by this class.
 void JInternalFrame.setTitle(String title)
Sets the JInternalFrame title.
 void JTree.AccessibleJTree.AccessibleJTreeNode.setAccessibleName(String s)
Set the localized accessible name of this object.
 void JTree.AccessibleJTree.AccessibleJTreeNode.setAccessibleDescription(String s)
Set the accessible description of this object.
 Object AbstractAction.getValue(String key)
Gets the Object associated with the specified key.
 void AbstractAction.putValue(String key, Object newValue)
Sets the Value associated with the specified key.
protected  void AbstractAction.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Supports reporting bound property changes.
 void ProgressMonitor.setNote(String note)
Specifies the additional note that is displayed along with the progress message.
 void JTable.AccessibleJTable.AccessibleJTableCell.setAccessibleName(String s)
Sets the localized accessible name of this object.
 void JTable.AccessibleJTable.AccessibleJTableCell.setAccessibleDescription(String s)
Sets the accessible description of this object.
 void JLabel.setText(String text)
Defines the single line of text this component will display.
protected  int JLabel.checkHorizontalKey(int key, String message)
Verify that key is a legal value for the horizontalAlignment properties.
protected  int JLabel.checkVerticalKey(int key, String message)
Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.
protected  void DefaultListCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, byte oldValue, byte newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, char oldValue, char newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, short oldValue, short newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, int oldValue, int newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, long oldValue, long newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, float oldValue, float newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, double oldValue, double newValue)
Overridden for performance reasons.
 void DefaultListCellRenderer.firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
Overridden for performance reasons.
 int JFileChooser.showDialog(Component parent, String approveButtonText)
Pops a custom file chooser dialog with a custom approve button.
 void JFileChooser.setDialogTitle(String dialogTitle)
Sets the string that goes in the JFileChooser window's title bar.
 void JFileChooser.setApproveButtonToolTipText(String toolTipText)
Sets the tooltip text used in the ApproveButton.
 void JFileChooser.setApproveButtonText(String approveButtonText)
Sets the text used in the ApproveButton in the FileChooserUI.
protected  void JFileChooser.fireActionPerformed(String command)
Notifies all listeners that have registered interest for notification on this event type.
 void ImageIcon.setDescription(String description)
Sets the description of the image.
 void ImageIcon.AccessibleImageIcon.setAccessibleIconDescription(String description)
Sets the description of the icon.
static void UIManager.installLookAndFeel(String name, String className)
Creates a new look and feel and adds it to the current array.
static void UIManager.setLookAndFeel(String className)
Set the current default look and feel using a class name.
 void JTextArea.insert(String str, int pos)
Inserts the specified text at the specified position.
 void JTextArea.append(String str)
Appends the given text to the end of the document.
 void JTextArea.replaceRange(String str, int start, int end)
Replaces text from the indicated start to end position with the new text specified.
 Component JScrollPane.getCorner(String key)
Returns the component at the specified corner.
 void JScrollPane.setCorner(String key, Component corner)
Adds a child that will appear in one of the scroll panes corners, if there's room.
 void JProgressBar.setString(String s)
Sets the value of the Progress String.
 void OverlayLayout.addLayoutComponent(String name, Component comp)
Adds the specified component to the layout.
 void JRootPane.RootLayout.addLayoutComponent(String name, Component comp)
 void DebugGraphics.drawString(String aString, int x, int y)
Overrides Graphics.drawString.

Constructors in javax.swing with parameters of type String
JEditorPane(String url)
Creates a JEditorPane based on a string containing a URL specification.
JEditorPane(String type, String text)
Creates a JEditorPane that has been initialized to the given text.
JMenuItem(String text)
Creates a menuItem with text.
JMenuItem(String text, Icon icon)
Creates a menu item with the supplied text and icon.
JMenuItem(String text, int mnemonic)
Creates a menuItem with the specified text and keyboard mnemonic.
JCheckBoxMenuItem(String text)
Creates an initially unselected check box menu item with text.
JCheckBoxMenuItem(String text, Icon icon)
Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(String text, boolean b)
Creates a check box menu item with the specified text and selection state.
JCheckBoxMenuItem(String text, Icon icon, boolean b)
Creates a check box menu item with the specified text, icon, and selection state.
JToggleButton(String text)
Creates an unselected toggle button with the specified text.
JToggleButton(String text, boolean selected)
Creates a toggle button with the specified text and selection state.
JToggleButton(String text, Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected.
JToggleButton(String text, Icon icon, boolean selected)
Creates a toggle button with the specified text, image, and selection state.
JCheckBox(String text)
Creates an initially unselected check box with text.
JCheckBox(String text, boolean selected)
Creates a check box with text and specifies whether or not it is initially selected.
JCheckBox(String text, Icon icon)
Creates an initially unselected check box with the specified text and icon.
JCheckBox(String text, Icon icon, boolean selected)
Creates a check box with text and icon, and specifies whether or not it is initially selected.
JTextField(String text)
Constructs a new TextField initialized with the specified text.
JTextField(String text, int columns)
Constructs a new TextField initialized with the specified text and columns.
JTextField(Document doc, String text, int columns)
Constructs a new JTextField that uses the given text storage model and the given number of columns.
JPasswordField(String text)
Constructs a new JPasswordField initialized with the specified text.
JPasswordField(String text, int columns)
Constructs a new JPasswordField initialized with the specified text and columns.
JPasswordField(Document doc, String txt, int columns)
Constructs a new JPasswordField that uses the given text storage model and the given number of columns.
UnsupportedLookAndFeelException(String s)
Constructs an UnsupportedLookAndFeelException object.
JMenu(String s)
Constructs a new JMenu with the supplied string as its text.
JMenu(String s, boolean b)
Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.
JButton(String text)
Creates a button with text.
JButton(String text, Icon icon)
Creates a button with initial text and an icon.
JPopupMenu(String label)
Constructs a JPopupMenu with the specified title.
UIDefaults.ProxyLazyValue(String c)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, String m)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, Object[] o)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, String m, Object[] o)
Creates a LazyValue which will construct an instance when asked.
JInternalFrame(String title)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
JInternalFrame(String title, boolean resizable)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.
JInternalFrame(String title, boolean resizable, boolean closable)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified.
JFrame(String title)
Creates a new, initially invisible Frame with the specified title.
JFrame(String title, GraphicsConfiguration gc)
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.
AbstractAction(String name)
Defines an Action object with the specified description string and a default icon.
AbstractAction(String name, Icon icon)
Defines an Action object with the specified description string and a the specified icon.
ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
JLabel(String text, Icon icon, int horizontalAlignment)
Creates a JLabel instance with the specified text, image, and horizontal alignment.
JLabel(String text, int horizontalAlignment)
Creates a JLabel instance with the specified text and horizontal alignment.
JLabel(String text)
Creates a JLabel instance with the specified text.
JFileChooser(String currentDirectoryPath)
Constructs a JFileChooser using the given path.
JFileChooser(String currentDirectoryPath, FileSystemView fsv)
Constructs a JFileChooser using the given current directory path and FileSystemView.
JRadioButton(String text)
Creates an unselected radio button with the specified text.
JRadioButton(String text, boolean selected)
Creates a radio button with the specified text and selection state.
JRadioButton(String text, Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String text, Icon icon, boolean selected)
Creates a radio button that has the specified text, image, and selection state.
JToolBar(String name)
Creates a new toolbar with the specified name.
JToolBar(String name, int orientation)
Creates a new toolbar with a specified name and orientation.
ImageIcon(String filename, String description)
Creates an ImageIcon from the specified file.
ImageIcon(String filename)
Creates an ImageIcon from the specified file.
ImageIcon(URL location, String description)
Creates an ImageIcon from the specified URL.
ImageIcon(Image image, String description)
Creates an ImageIcon from the image.
ImageIcon(byte[] imageData, String description)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG.
UIManager.LookAndFeelInfo(String name, String className)
Constructs an UIManager$LookAndFeelInfo object.
JRadioButtonMenuItem(String text)
Creates a JRadioButtonMenuItem with text.
JRadioButtonMenuItem(String text, Icon icon)
Creates a radio button menu item with the specified text and Icon.
JRadioButtonMenuItem(String text, boolean selected)
Creates a radio button menu item with the specified text and selection state.
JRadioButtonMenuItem(String text, Icon icon, boolean selected)
Creates a radio button menu item that has the specified text, image, and selection state.
JTextArea(String text)
Constructs a new TextArea with the specified text displayed.
JTextArea(String text, int rows, int columns)
Constructs a new TextArea with the specified text and number of rows and columns.
JTextArea(Document doc, String text, int rows, int columns)
Constructs a new JTextArea with the specified number of rows and columns, and the given model.
JDialog(Frame owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner frame.
JDialog(Frame owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner Frame.
JDialog(Dialog owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog.
JDialog(Dialog owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.

Uses of String in javax.swing.border

Fields in javax.swing.border declared as String
protected  String TitledBorder.title

Methods in javax.swing.border that return String
 String TitledBorder.getTitle()
Returns the title of the titled border.

Methods in javax.swing.border with parameters of type String
 void TitledBorder.setTitle(String title)
Sets the title of the titled border.

Constructors in javax.swing.border with parameters of type String
TitledBorder(String title)
Creates a TitledBorder instance.
TitledBorder(Border border, String title)
Creates a TitledBorder instance with the specified border and title.
TitledBorder(Border border, String title, int titleJustification, int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.

Uses of String in javax.swing.colorchooser

Methods in javax.swing.colorchooser that return String
abstract  String AbstractColorChooserPanel.getDisplayName()
Returns a string containing the display name of the panel.

Uses of String in javax.swing.event

Methods in javax.swing.event that return String
String | HyperlinkEvent.getDescription() Get the description of the link as a string.
String | HyperlinkEvent.EventType.toString() Converts the type to a string.
String | DocumentEvent.EventType.toString() Converts the type to a string.
String | InternalFrameEvent.paramString() Returns a parameter string identifying this event.
String | EventListenerList.toString() Returns a string representation of the EventListenerList.
String | ListSelectionEvent.toString() Returns a string that displays and identifies this object's properties.
String | TreeModelEvent.toString() Returns a string that displays and identifies this object's properties.

Methods in javax.swing.event with parameters of type String
void | SwingPropertyChangeSupport.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | SwingPropertyChangeSupport.removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
void | SwingPropertyChangeSupport.firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
boolean | SwingPropertyChangeSupport.hasListeners(String propertyName) Check if there are any listeners for a specific property.

Constructors in javax.swing.event with parameters of type String
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc)
Creates a new object representing a hypertext link event.

Uses of String in javax.swing.filechooser

Methods in javax.swing.filechooser that return String
String | FileView.getName(File f) The name of the file.
String | FileView.getDescription(File f) A human readable description of the file.
String | FileView.getTypeDescription(File f) A human readable description of the type of the file.
abstract String | FileFilter.getDescription() The description of this filter.

Methods in javax.swing.filechooser with parameters of type String
File | FileSystemView.createFileObject(File dir, String filename) Returns a File object constructed in dir from the given filename.
File | FileSystemView.createFileObject(String path) Returns a File object constructed from the given path string.

Uses of String in javax.swing.plaf

Methods in javax.swing.plaf that return String
abstract String | FileChooserUI.getApproveButtonText(JFileChooser fc)
abstract String | FileChooserUI.getDialogTitle(JFileChooser fc)

Constructors in javax.swing.plaf with parameters of type String
FontUIResource(String name, int style, int size)
BorderUIResource.TitledBorderUIResource(String title)
BorderUIResource.TitledBorderUIResource(Border border, String title)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)

Uses of String in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as String
static String | BasicHTML.propertyKey Key to use for the html renderer when stored as a client property of a JComponent.
static String | BasicHTML.documentBaseKey Key stored as a client property to indicate the base that relative references are resolved against.
protected static String | BasicInternalFrameTitlePane.CLOSE_CMD
protected static String | BasicInternalFrameTitlePane.ICONIFY_CMD
protected static String | BasicInternalFrameTitlePane.RESTORE_CMD
protected static String | BasicInternalFrameTitlePane.MAXIMIZE_CMD
protected static String | BasicInternalFrameTitlePane.MOVE_CMD
protected static String | BasicInternalFrameTitlePane.SIZE_CMD
protected String | BasicFileChooserUI.saveButtonText
protected String | BasicFileChooserUI.openButtonText
protected String | BasicFileChooserUI.cancelButtonText
protected String | BasicFileChooserUI.updateButtonText
protected String | BasicFileChooserUI.helpButtonText
protected String | BasicFileChooserUI.saveButtonToolTipText
protected String | BasicFileChooserUI.openButtonToolTipText
protected String | BasicFileChooserUI.cancelButtonToolTipText
protected String | BasicFileChooserUI.updateButtonToolTipText
protected String | BasicFileChooserUI.helpButtonToolTipText
protected static String | BasicSplitPaneUI.NON_CONTINUOUS_DIVIDER The divider used for non-continuous layout is added to the split pane with this object.

Methods in javax.swing.plaf.basic that return String
protected  String BasicTextUI.getKeymapName()
Fetches the name of the keymap that will be installed/used by default for this UI.
protected abstract  String BasicTextUI.getPropertyPrefix()
Gets the name used as a key to look up properties through the UIManager.
protected  String BasicEditorPaneUI.getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager.
protected  String BasicTextPaneUI.getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager.
protected  String BasicMenuItemUI.getPropertyPrefix()
protected  String BasicRadioButtonMenuItemUI.getPropertyPrefix()
protected  String BasicButtonUI.getPropertyPrefix()
protected  String BasicToggleButtonUI.getPropertyPrefix()
protected  String BasicRadioButtonUI.getPropertyPrefix()
protected  String BasicMenuUI.getPropertyPrefix()
protected  String BasicCheckBoxMenuItemUI.getPropertyPrefix()
protected  String BasicTextFieldUI.getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager.
protected  String BasicPasswordFieldUI.getPropertyPrefix()
Fetches the name used as a key to look up properties through the UIManager.
 String BasicFileChooserUI.getFileName()
 String BasicFileChooserUI.getDirectoryName()
 String BasicFileChooserUI.getApproveButtonToolTipText(JFileChooser fc)
 String BasicFileChooserUI.getDialogTitle(JFileChooser fc)
Returns the title of this dialog
 String BasicFileChooserUI.getApproveButtonText(JFileChooser fc)
 String BasicFileChooserUI.AcceptAllFileFilter.getDescription()
 String BasicFileChooserUI.BasicFileView.getName(File f)
 String BasicFileChooserUI.BasicFileView.getDescription(File f)
 String BasicFileChooserUI.BasicFileView.getTypeDescription(File f)
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
 String BasicCheckBoxUI.getPropertyPrefix()
protected  String BasicTextAreaUI.getPropertyPrefix()
Fetches the name used as a key to look up properties through the UIManager.

Methods in javax.swing.plaf.basic with parameters of type String
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected  void BasicToggleButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
protected  Point BasicProgressBarUI.getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height)
Designate the place where the progress string will be drawn.
protected  void BasicOptionPaneUI.burstStringInto(Container c, String d, int maxll)
Recursively creates new JLabel instances to represent d.
 void BasicOptionPaneUI.ButtonAreaLayout.addLayoutComponent(String string, Component comp)
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
 void BasicTabbedPaneUI.TabbedPaneLayout.addLayoutComponent(String name, Component comp)
static void BasicGraphicsUtils.drawString(Graphics g, String text, int underlinedChar, int x, int y)
Draw a string with the graphics g at location (x,y) just like g.drawString() would.
static View BasicHTML.createHTMLView(JComponent c, String html)
Create an html renderer for the given component and string of html.
static boolean BasicHTML.isHTMLString(String s)
Check the given string to see if it should trigger the html rendering logic in a non-text component that supports html rendering.
static void BasicHTML.updateRenderer(JComponent c, String text)
Stash the HTML render for the given text into the client properties of the given JComponent.
 void BasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent(String name, Component c)
protected  void BasicLookAndFeel.loadSystemColors(UIDefaults table, String[] systemColors, boolean useNative)
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants.
 void BasicScrollBarUI.addLayoutComponent(String name, Component child)
 void BasicFileChooserUI.setFileName(String filename)
 void BasicFileChooserUI.setDirectoryName(String dirname)
 void BasicInternalFrameUI.InternalFrameLayout.addLayoutComponent(String name, Component c)
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
protected  void BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with the labels foreground color.
protected  void BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
 void BasicComboBoxUI.ComboBoxLayoutManager.addLayoutComponent(String name, Component comp)
 void BasicSplitPaneUI.BasicHorizontalLayoutManager.addLayoutComponent(String place, Component component)
Adds the component at place.
 void BasicSplitPaneDivider.DividerLayout.addLayoutComponent(String string, Component c)

Constructors in javax.swing.plaf.basic with parameters of type String
BasicTreeUI.TreeTraverseAction(int direction, String name)
BasicTreeUI.TreePageAction(int direction, String name)
BasicTreeUI.TreeIncrementAction(int direction, String name)
BasicTreeUI.TreeHomeAction(int direction, String name)
BasicTreeUI.TreeToggleAction(String name)
BasicTreeUI.TreeCancelEditingAction(String name)

Uses of String in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as String
protected static String | MetalInternalFrameUI.IS_PALETTE
protected String | MetalSliderUI.SLIDER_FILL
static String | MetalScrollBarUI.FREE_STANDING_PROP

Methods in javax.swing.plaf.metal that return String
String | MetalFileChooserUI.getFileName()
String | MetalFileChooserUI.getDirectoryName()
String | MetalLookAndFeel.getName()
String | MetalLookAndFeel.getID()
String | MetalLookAndFeel.getDescription()
String | MetalToolTipUI.getAcceleratorString()
String | MetalCheckBoxUI.getPropertyPrefix()
abstract String | MetalTheme.getName()
String | DefaultMetalTheme.getName()

Methods in javax.swing.plaf.metal with parameters of type String
void | MetalFileChooserUI.setFileName(String filename)
void | MetalFileChooserUI.setDirectoryName(String dirname)
protected void | MetalLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY) Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
protected void | MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void | MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)

Uses of String in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return String
String | MultiLookAndFeel.getName()
String | MultiLookAndFeel.getID()
String | MultiLookAndFeel.getDescription()
String | MultiFileChooserUI.getApproveButtonText(JFileChooser a) Call getApproveButtonText on each UI handled by this MultiUI.
String | MultiFileChooserUI.getDialogTitle(JFileChooser a) Call getDialogTitle on each UI handled by this MultiUI.

Uses of String in javax.swing.table

Fields in javax.swing.table declared as String
static String | TableColumn.COLUMN_WIDTH_PROPERTY Obsolete as of Java 2 platform v1.3.
static String | TableColumn.HEADER_VALUE_PROPERTY Obsolete as of Java 2 platform v1.3.
static String | TableColumn.HEADER_RENDERER_PROPERTY Obsolete as of Java 2 platform v1.3.
static String | TableColumn.CELL_RENDERER_PROPERTY Obsolete as of Java 2 platform v1.3.

Methods in javax.swing.table that return String
String | AbstractTableModel.getColumnName(int column) Returns a default name for the column using spreadsheet conventions: A, B, C, ...
String | DefaultTableModel.getColumnName(int column) Returns the column name.
String | JTableHeader.getToolTipText(MouseEvent event) Allows the renderer's tips to be used if there is text set.
String | JTableHeader.getUIClassID() Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
protected String | JTableHeader.paramString() Returns a string representation of this JTableHeader.
String | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleName()
String | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleDescription()
String | TableModel.getColumnName(int columnIndex) Returns the name of the column at columnIndex.

Methods in javax.swing.table with parameters of type String
int | AbstractTableModel.findColumn(String columnName) Returns a column given its name.
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setAccessibleName(String s)
void | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setAccessibleDescription(String s)
protected void | DefaultTableCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
void | DefaultTableCellRenderer.firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Overridden for performance reasons.

Uses of String in javax.swing.text

Fields in javax.swing.text declared as String
static String | JTextComponent.FOCUS_ACCELERATOR_KEY The bound property name for the focus accelerator.
static String | JTextComponent.DEFAULT_KEYMAP This is the name of the default keymap that will be shared by all JTextComponent instances unless they have had a different keymap set.
static String | Document.StreamDescriptionProperty The property name for the description of the stream used to initialize the document.
static String | Document.TitleProperty The property name for the title of the document, if there is one.
static String | StyleContext.DEFAULT_STYLE The name given to the default logical style attached to paragraphs.
static String | StyleConstants.ComponentElementName Name of elements used to represent components.
static String | StyleConstants.IconElementName Name of elements used to represent icons.
static String | DefaultEditorKit.EndOfLineStringProperty When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".
static String | DefaultEditorKit.insertContentAction Name of the action to place content into the associated document.
static String | DefaultEditorKit.insertBreakAction Name of the action to place a line/paragraph break into the document.
static String | DefaultEditorKit.insertTabAction Name of the action to place a tab character into the document.
static String | DefaultEditorKit.deletePrevCharAction Name of the action to delete the character of content that precedes the current caret position.
static String | DefaultEditorKit.deleteNextCharAction Name of the action to delete the character of content that follows the current caret position.
static String | DefaultEditorKit.readOnlyAction Name of the action to set the editor into read-only mode.
static String | DefaultEditorKit.writableAction Name of the action to set the editor into writeable mode.
static String | DefaultEditorKit.cutAction Name of the action to cut the selected region and place the contents into the system clipboard.
static String | DefaultEditorKit.copyAction Name of the action to copy the selected region and place the contents into the system clipboard.
static String | DefaultEditorKit.pasteAction Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static String | DefaultEditorKit.beepAction Name of the action to create a beep.
static String | DefaultEditorKit.pageUpAction Name of the action to page up vertically.
static String | DefaultEditorKit.pageDownAction Name of the action to page down vertically.
static String | DefaultEditorKit.forwardAction Name of the Action for moving the caret logically forward one position.
static String | DefaultEditorKit.backwardAction Name of the Action for moving the caret logically backward one position.
static String | DefaultEditorKit.selectionForwardAction Name of the Action for extending the selection by moving the caret logically forward one position.
static String | DefaultEditorKit.selectionBackwardAction Name of the Action for extending the selection by moving the caret logically backward one position.
static String | DefaultEditorKit.upAction Name of the Action for moving the caret logically upward one position.
static String | DefaultEditorKit.downAction Name of the Action for moving the caret logically downward one position.
static String | DefaultEditorKit.selectionUpAction Name of the Action for moving the caret logically upward one position, extending the selection.
static String | DefaultEditorKit.selectionDownAction Name of the Action for moving the caret logically downward one position, extending the selection.
static String | DefaultEditorKit.beginWordAction Name of the Action for moving the caret to the begining of a word.
static String | DefaultEditorKit.endWordAction Name of the Action for moving the caret to the end of a word.
static String | DefaultEditorKit.selectionBeginWordAction Name of the Action for moving the caret to the begining of a word, extending the selection.
static String | DefaultEditorKit.selectionEndWordAction Name of the Action for moving the caret to the end of a word, extending the selection.
static String | DefaultEditorKit.previousWordAction Name of the Action for moving the caret to the begining of the previous word.
static String | DefaultEditorKit.nextWordAction Name of the Action for moving the caret to the begining of the next word.
static String | DefaultEditorKit.selectionPreviousWordAction Name of the Action for moving the selection to the begining of the previous word, extending the selection.
static String | DefaultEditorKit.selectionNextWordAction Name of the Action for moving the selection to the begining of the next word, extending the selection.
static String | DefaultEditorKit.beginLineAction Name of the Action for moving the caret to the begining of a line.
static String | DefaultEditorKit.endLineAction Name of the Action for moving the caret to the end of a line.
static String | DefaultEditorKit.selectionBeginLineAction Name of the Action for moving the caret to the begining of a line, extending the selection.
static String | DefaultEditorKit.selectionEndLineAction Name of the Action for moving the caret to the end of a line, extending the selection.
static String | DefaultEditorKit.beginParagraphAction Name of the Action for moving the caret to the begining of a paragraph.
static String | DefaultEditorKit.endParagraphAction Name of the Action for moving the caret to the end of a paragraph.
static String | DefaultEditorKit.selectionBeginParagraphAction Name of the Action for moving the caret to the begining of a paragraph, extending the selection.
static String | DefaultEditorKit.selectionEndParagraphAction Name of the Action for moving the caret to the end of a paragraph, extending the selection.
static String | DefaultEditorKit.beginAction Name of the Action for moving the caret to the begining of the document.
static String | DefaultEditorKit.endAction Name of the Action for moving the caret to the end of the document.
static String | DefaultEditorKit.selectionBeginAction Name of the Action for moving the caret to the begining of the document.
static String | DefaultEditorKit.selectionEndAction Name of the Action for moving the caret to the end of the document.
static String | DefaultEditorKit.selectWordAction Name of the Action for selecting a word around the caret.
static String | DefaultEditorKit.selectLineAction Name of the Action for selecting a line around the caret.
static String | DefaultEditorKit.selectParagraphAction Name of the Action for selecting a paragraph around the caret.
static String | DefaultEditorKit.selectAllAction Name of the Action for selecting the entire document
static String | DefaultEditorKit.defaultKeyTypedAction Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
protected static String | AbstractDocument.BAD_LOCATION Error message to indicate a bad location.
static String | AbstractDocument.ParagraphElementName Name of elements used to represent paragraphs
static String | AbstractDocument.ContentElementName Name of elements used to represent content
static String | AbstractDocument.SectionElementName Name of elements used to hold sections (lines/paragraphs).
static String | AbstractDocument.BidiElementName Name of elements used to hold a unidirectional run
static String | AbstractDocument.ElementNameAttribute Name of the attribute used to specify element names.
String | JTextComponent.KeyBinding.actionName The name of the action for the key.
static String | PlainDocument.tabSizeAttribute Name of the attribute that specifies the tab size for tabs contained in the content.
static String | PlainDocument.lineLimitAttribute Name of the attribute that specifies the maximum length of a line, if there is a maximum length.

Methods in javax.swing.text that return String
String | JTextComponent.getText(int offs, int len) Fetches a portion of the text represented by the component.
String | JTextComponent.getText() Returns the text contained in this TextComponent.
String | JTextComponent.getSelectedText() Returns the selected text contained in this TextComponent.
protected String | JTextComponent.paramString() Returns a string representation of this JTextComponent.
String | JTextComponent.AccessibleJTextComponent.getSelectedText() Returns the portion of the text that is selected.
String | JTextComponent.AccessibleJTextComponent.getAtIndex(int part, int index) Returns the String at a given index.
String | JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) Returns the String after a given index.
String | JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) Returns the String before a given index.
String | Keymap.getName() Fetches the name of the set of key-bindings.
String | Element.getName() Fetches the name of the element.
String | Document.getText(int offset, int length) Fetches the text contained within the given portion of the document.
String | SimpleAttributeSet.toString() Converts the attribute set to a String.
String | ChangedCharSetException.getCharSetSpec()
String | Style.getName() Fetches the name of the style.
String | StyleContext.toString() Converts a StyleContext to a String.
String | StyleContext.SmallAttributeSet.toString() Returns a string showing the key/value pairs
String | StyleContext.NamedStyle.toString() Converts the style to a string.
String | StyleContext.NamedStyle.getName() Fetches the name of the style.
String | Position.Bias.toString() string representation
abstract String | EditorKit.getContentType() Gets the MIME type of the data that this kit represents support for.
String | StyleConstants.toString() Returns the string representation.
static String | StyleConstants.getFontFamily(AttributeSet a) Gets the font family setting from the attribute list.
protected String | AbstractWriter.getText(Element elem) Returns the text associated with the element.
String | AbstractWriter.getLineSeparator() Returns the string used to represent newlines.
String | TabSet.toString() Returns the string representation of the set of tabs.
String | DefaultEditorKit.getContentType() Gets the MIME type of the data that this kit represents support for.
String | AbstractDocument.getText(int offset, int length) Gets a sequence of text from the document.
String | AbstractDocument.Content.getString(int where, int len) Fetches a string of characters contained in the sequence.
String | AbstractDocument.AbstractElement.getName() Gets the name of the element.
String | AbstractDocument.BranchElement.toString() Converts the element to a string.
String | AbstractDocument.BranchElement.getName() Gets the element name.
String | AbstractDocument.LeafElement.toString() Converts the element to a string.
String | AbstractDocument.LeafElement.getName() Gets the element name.
String | AbstractDocument.DefaultDocumentEvent.toString() Returns a string description of the change event.
String | AbstractDocument.DefaultDocumentEvent.getPresentationName() Provides a localized, human readable description of this edit suitable for use in, say, a change log.
String | AbstractDocument.DefaultDocumentEvent.getUndoPresentationName() Provides a localized, human readable description of the undoable form of this edit, e.g.
String | AbstractDocument.DefaultDocumentEvent.getRedoPresentationName() Provides a localized, human readable description of the redoable form of this edit, e.g.
String | StringContent.getString(int where, int len) Retrieves a portion of the content.
String | GapContent.getString(int where, int len) Retrieves a portion of the content.
String | DefaultCaret.toString()
String | TabStop.toString()
String | Segment.toString() Converts a segment into a String.
String | DefaultStyledDocument.SectionElement.getName() Gets the name of the element.
String | DefaultStyledDocument.ElementSpec.toString() Converts the element to a string.

Methods in javax.swing.text with parameters of type String
static Keymap | JTextComponent.addKeymap(String nm, Keymap parent) Adds a new keymap into the keymap hierarchy.
static Keymap | JTextComponent.removeKeymap(String nm) Removes a named keymap previously added to the document.
static Keymap | JTextComponent.getKeymap(String nm) Fetches a named keymap previously added to the document.
void | JTextComponent.replaceSelection(String content) Replaces the currently selected content with new content represented by the given string.
void | JTextComponent.setText(String t) Sets the text of this TextComponent to the specified text.
void | Document.insertString(int offset, String str, AttributeSet a) Inserts a string of content.
Style | StyleContext.addStyle(String nm, Style parent) Adds a new style into the style hierarchy.
void | StyleContext.removeStyle(String nm) Removes a named style previously added to the document.
Style | StyleContext.getStyle(String nm) Fetches a named style previously added to the document
Font | StyleContext.getFont(String family, int style, int size) Gets a new font.
void | StyleContext.NamedStyle.setName(String name) Changes the name of the style.
static void | StyleConstants.setFontFamily(MutableAttributeSet a, String fam) Sets the font attribute.
void | AbstractWriter.setLineSeparator(String value) Sets the String used to reprsent newlines.
protected void | AbstractWriter.write(String content) Writes out a string.
void | AbstractDocument.insertString(int offs, String str, AttributeSet a) Inserts some content into the document.
UndoableEdit | AbstractDocument.Content.insertString(int where, String str) Inserts a string of characters into the sequence.
UndoableEdit | StringContent.insertString(int where, String str) Inserts a string into the content.
UndoableEdit | GapContent.insertString(int where, String str) Inserts a string into the content.
Style | StyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
void | StyledDocument.removeStyle(String nm) Removes a named style previously added to the document.
Style | StyledDocument.getStyle(String nm) Fetches a named style previously added.
Style | DefaultStyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
void | DefaultStyledDocument.removeStyle(String nm) Removes a named style previously added to the document.
Style | DefaultStyledDocument.getStyle(String nm) Fetches a named style previously added.

Constructors in javax.swing.text with parameters of type String
ChangedCharSetException(String charSetSpec, boolean charSetKey)
StyleContext.NamedStyle(String name, Style parent)
Creates a new named style.
TextAction(String name)
Creates a new JTextAction object.
BadLocationException(String s, int offs)
Creates a new BadLocationException object.
JTextComponent.KeyBinding(KeyStroke key, String actionName)
Creates a new key binding.
StyledEditorKit.StyledTextAction(String nm)
Creates a new StyledTextAction from a string action name.
StyledEditorKit.FontFamilyAction(String nm, String family)
Creates a new FontFamilyAction.
StyledEditorKit.FontSizeAction(String nm, int size)
Creates a new FontSizeAction.
StyledEditorKit.ForegroundAction(String nm, Color fg)
Creates a new ForegroundAction.
StyledEditorKit.AlignmentAction(String nm, int a)
Creates a new AlignmentAction.

Uses of String in javax.swing.text.html

Fields in javax.swing.text.html declared as String
static String | HTML.NULL_ATTRIBUTE_VALUE
static String | HTMLDocument.AdditionalComments Document property key value.
static String | HTMLEditorKit.DEFAULT_CSS Default Cascading Style Sheet file that sets up the tag views.
static String | HTMLEditorKit.BOLD_ACTION The bold action identifier
static String | HTMLEditorKit.ITALIC_ACTION The italic action identifier
static String | HTMLEditorKit.PARA_INDENT_LEFT The paragraph left indent action identifier
static String | HTMLEditorKit.PARA_INDENT_RIGHT The paragraph right indent action identifier
static String | HTMLEditorKit.FONT_CHANGE_BIGGER The font size increase to next value action identifier
static String | HTMLEditorKit.FONT_CHANGE_SMALLER The font size decrease to next value action identifier
static String | HTMLEditorKit.COLOR_ACTION The Color choice action identifier The color is passed as an argument
static String | HTMLEditorKit.LOGICAL_STYLE_ACTION The logical style choice action identifier The logical style is passed in as an argument
static String | HTMLEditorKit.IMG_ALIGN_TOP Align images at the top.
static String | HTMLEditorKit.IMG_ALIGN_MIDDLE Align images in the middle.
static String | HTMLEditorKit.IMG_ALIGN_BOTTOM Align images at the bottom.
static String | HTMLEditorKit.IMG_BORDER Align images at the border.
protected String | HTMLEditorKit.InsertHTMLTextAction.html HTML to insert.
static String | FormView.SUBMIT Deprecated. As of 1.3, value now comes from UIManager property FormView.submitButtonText
static String | FormView.RESET Deprecated. As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText

Methods in javax.swing.text.html that return String
String | Option.getLabel() Fetch the label associated with the option.
String | Option.toString() String representation is the label.
String | Option.getValue() Convenience method to return the string associated with the value attribute.
String | HTML.Tag.toString() Return the string representation of the tag.
String | HTML.Attribute.toString()
String | HTMLEditorKit.getContentType() Get the MIME type of the data that this kit represents support for.
String | HTMLDocument.RunElement.getName() Gets the name of the element.
String | HTMLDocument.BlockElement.getName() Gets the name of the element.
String | HTMLFrameHyperlinkEvent.getTarget() returns the target for the link.
String | CSS.Attribute.toString() The string representation of the attribute.
String | CSS.Attribute.getDefaultValue() Fetch the default value for the attribute.

Methods in javax.swing.text.html with parameters of type String
Style | StyleSheet.getRule(String selector) Fetches the rule that best matches the selector given in string form.
void | StyleSheet.addRule(String rule) Adds a set of rules to the sheet.
AttributeSet | StyleSheet.getDeclaration(String decl) Translates a CSS declaration to an AttributeSet that represents the CSS declaration.
void | StyleSheet.removeStyle(String nm) Removes a named style previously added to the document.
void | StyleSheet.addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
boolean | StyleSheet.addCSSAttributeFromHTML(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
void | StyleSheet.setBaseFontSize(String size)
float | StyleSheet.getPointSize(String size) Given a string such as "+2", "-2", or "2", returns a point size value.
Color | StyleSheet.stringToColor(String string) Converts a color string such as "RED" or "#NNNNNN" to a Color.
void | Option.setLabel(String label) Sets the label to be used for the option.
static HTML.Tag | HTML.getTag(String tagName) Fetch a tag constant for a well-known tag name (i.e.
static HTML.Attribute | HTML.getAttributeKey(String attName) Fetch an attribute constant for a well-known attribute name (i.e.
void | HTMLDocument.setInnerHTML(Element elem, String htmlText) Replaces the children of the given element with the contents specified as an HTML string.
void | HTMLDocument.setOuterHTML(Element elem, String htmlText) Replaces the given element in the parent with the contents specified as an HTML string.
void | HTMLDocument.insertAfterStart(Element elem, String htmlText) Inserts the HTML specified as a string at the start of the element.
void | HTMLDocument.insertBeforeEnd(Element elem, String htmlText) Inserts the HTML specified as a string at the end of the element.
void | HTMLDocument.insertBeforeStart(Element elem, String htmlText) Inserts the HTML specified as string before the start of the given element.
void | HTMLDocument.insertAfterEnd(Element elem, String htmlText) Inserts the HTML specified as a string after the the end of the given element.
Element | HTMLDocument.getElement(String id) Fetches the element that has the given id attribute.
void | HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.
void | HTMLEditorKit.ParserCallback.handleError(String errorMsg, int pos)
void | HTMLEditorKit.ParserCallback.handleEndOfLineString(String eol) This is invoked after the stream has been parsed, but before flush.
void | HTMLDocument.HTMLReader.handleEndOfLineString(String eol) This is invoked after the stream has been parsed, but before flush.
static CSS.Attribute | CSS.getAttribute(String name) Translate a string to a CSS.Attribute object.
protected void | MinimalHTMLWriter.writeStartTag(String tag) Writes out a start tag appropriately indented.
protected void | MinimalHTMLWriter.writeEndTag(String endTag) Writes out an end tag appropriately indented.
protected void | MinimalHTMLWriter.startFontTag(String style) This is no longer used, instead <span> will be written out.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) A cover for HTMLEditorKit.insertHTML.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary
protected void | FormView.submitData(String data) This method is responsible for submitting the form data.
protected void | FormView.imageSubmit(String imageData) This method is called to submit a form in response to a click on an image -- an <INPUT> form element of type "image".

Constructors in javax.swing.text.html with parameters of type String
HTML.Tag(String id)
HTML.Tag(String id, boolean causesBreak, boolean isBlock)
HTML.UnknownTag(String id)
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String targetFrame)
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLEditorKit.HTMLTextAction(String name)
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag)
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag, HTML.Tag alternateParentTag, HTML.Tag alternateAddTag)

Uses of String in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as String
String | AttributeList.name
String | AttributeList.value
String | DTD.name
String | Element.name
String | Entity.name

Methods in javax.swing.text.html.parser that return String
String | AttributeList.getName()
String | AttributeList.getValue()
String | AttributeList.toString()
static String | AttributeList.type2name(int tp)
String | Parser.parseDTDMarkup() Parses th Document Declaration Type markup declaration.
String | DTD.getName() Get the name of the DTD.
String | DTD.toString() Return a string representation.
String | ContentModel.toString() Convert to a string.
String | Element.getName() Get the name of the element.
String | Element.toString() Convert to a string.
String | Entity.getName() Get the name of the entity.
String | Entity.getString() Return the data as a string.

Methods in javax.swing.text.html.parser with parameters of type String
static int | AttributeList.name2type(String nm)
protected void | Parser.handleError(int ln, String msg) An error has occurred.
protected void | Parser.error(String err, String arg1, String arg2, String arg3) Invoke the error handler.
protected void | Parser.error(String err, String arg1, String arg2)
protected void | Parser.error(String err, String arg1)
protected void | Parser.error(String err)
Entity | DTD.getEntity(String name) Get an entity by name.
Element | DTD.getElement(String name) Get an element by name.
Entity | DTD.defineEntity(String name, int type, char[] data) Define an entity.
Element | DTD.defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Define an element.
void | DTD.defineAttributes(String name, AttributeList atts) Define the attributes of an element.
Entity | DTD.defEntity(String name, int type, int ch) Define a character entity.
protected Entity | DTD.defEntity(String name, int type, String str) Define an entity.
protected Element | DTD.defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Define an element.
protected AttributeList | DTD.defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) Define an attribute list
static void | DTD.putDTDHash(String name, DTD dtd)
static DTD | DTD.getDTD(String name) Get a DTD.
AttributeList | Element.getAttribute(String name) Get an attribute by name.
AttributeList | Element.getAttributeByValue(String name) Get an attribute by value.
static int | Element.name2type(String nm)
protected static DTD | ParserDelegator.createDTD(DTD dtd, String name)
static int | Entity.name2type(String nm)
protected void | DocumentParser.handleError(int ln, String errorMsg)

Constructors in javax.swing.text.html.parser with parameters of type String
AttributeList(String name)
Create an attribute list element.
AttributeList(String name, int type, int modifier, String value, Vector values, AttributeList next)
Create an attribute list element.
DTD(String name)
Create a new DTD.
Entity(String name, int type, char[] data)
Create an entity.

Uses of String in javax.swing.text.rtf

Methods in javax.swing.text.rtf that return String
 String RTFEditorKit.getContentType()
Get the MIME type of the data that this kit represents support for.

Uses of String in javax.swing.tree

Fields in javax.swing.tree declared as String
static String DefaultTreeSelectionModel.SELECTION_MODE_PROPERTY
Property name for selectionMode.

Methods in javax.swing.tree that return String
 String DefaultTreeSelectionModel.toString()
Returns a string that displays and identifies this object's properties.
 String DefaultMutableTreeNode.toString()
Returns the result of sending toString() to this node's user object, or null if this node has no user object.
 String TreePath.toString()
Returns a string that displays and identifies this object's properties.

Methods in javax.swing.tree with parameters of type String
protected void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, byte oldValue, byte newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, char oldValue, char newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, short oldValue, short newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, int oldValue, int newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, long oldValue, long newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, float oldValue, float newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, double oldValue, double newValue) Overridden for performance reasons.
void | DefaultTreeCellRenderer.firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Overridden for performance reasons.

Constructors in javax.swing.tree with parameters of type String
ExpandVetoException(TreeExpansionEvent event, String message)
Constructs an ExpandVetoException object with the specified message.

Uses of String in javax.swing.undo

Fields in javax.swing.undo declared as String
protected static String | AbstractUndoableEdit.UndoName String returned by getUndoPresentationName()
protected static String | AbstractUndoableEdit.RedoName String returned by getRedoPresentationName()
protected static String | StateEdit.RCSID
protected String | StateEdit.undoRedoName The undo/redo presentation name
static String | StateEditable.RCSID Resource ID for this class.

Methods in javax.swing.undo that return String
 String AbstractUndoableEdit.getPresentationName()
This default implementation returns "".
 String AbstractUndoableEdit.getUndoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName.
 String AbstractUndoableEdit.getRedoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName.
 String AbstractUndoableEdit.toString()
Returns a string that displays and identifies this object's properties.
 String CompoundEdit.getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits.
 String CompoundEdit.getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits.
 String CompoundEdit.getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits.
 String CompoundEdit.toString()
Returns a string that displays and identifies this object's properties.
 String UndoManager.getUndoOrRedoPresentationName()
Return the appropriate name for a command that toggles between undo and redo.
 String UndoManager.getUndoPresentationName()
If inProgress, returns getUndoPresentationName of the significant edit that will be undone when undo() is invoked.
 String UndoManager.getRedoPresentationName()
If inProgress, returns getRedoPresentationName of the significant edit that will be redone when redo() is invoked.
 String UndoManager.toString()
Returns a string that displays and identifies this object's properties.
 String UndoableEditSupport.toString()
Returns a string that displays and identifies this object's properties.
 String StateEdit.getPresentationName()
Gets the presentation name for this edit
 String UndoableEdit.getPresentationName()
Provide a localized, human readable description of this edit suitable for use in, say, a change log.
 String UndoableEdit.getUndoPresentationName()
Provide a localized, human readable description of the undoable form of this edit, e.g.
 String UndoableEdit.getRedoPresentationName()
Provide a localized, human readable description of the redoable form of this edit, e.g.

Methods in javax.swing.undo with parameters of type String
protected  void StateEdit.init(StateEditable anObject, String name)

Constructors in javax.swing.undo with parameters of type String
StateEdit(StateEditable anObject, String name)
Create and return a new StateEdit with a presentation name.

Uses of String in javax.transaction

Constructors in javax.transaction with parameters of type String
TransactionRequiredException(String msg)
InvalidTransactionException(String msg)
TransactionRolledbackException(String msg)

Uses of String in org.omg.CORBA

Fields in org.omg.CORBA declared as String
String | UnionMember.name The name of the union member described by this UnionMember object.
String | NameValuePair.id The name to be associated with a value by this NameValuePair object.
String | StringHolder.value The String value held by this StringHolder object.
String | StructMember.name The name of the struct member described by this StructMember object.
String | ValueMember.name The name of the value member described by this ValueMember object.
String | ValueMember.id The name of the value member described by this ValueMember object.
String | ValueMember.defined_in The name of the value member described by this ValueMember object.
String | ValueMember.version The name of the value member described by this ValueMember object.

Methods in org.omg.CORBA that return String
 String DynAny.get_string()
Retrieves the String contained in this DynAny object.
 String DynAny.get_wstring()
Retrieves the String contained in this DynAny object.
 String SystemException.toString()
Converts this exception to a representative string.
static String UnionMemberHelper.id()
static String ServiceInformationHelper.id()
static String PolicyListHelper.id()
abstract  String Any.extract_string()
Extracts the String object in this Any object's value field.
abstract  String Any.extract_wstring()
Extracts the String object in this Any object's value field.
static String NameValuePairHelper.id()
static String LongSeqHelper.id()
abstract  String NamedValue.name()
Retrieves the name for this NamedValue object.
 String DynStruct.current_member_name()
During a traversal, returns the name of the current member.
static String OctetSeqHelper.id()
static String IdentifierHelper.extract(Any a)
static String IdentifierHelper.id()
static String IdentifierHelper.read(InputStream istream)
 String DynUnion.member_name()
Allows for the inspection of the name of this union member without checking the value of the discriminator.
 String[] _PolicyStub._ids()
static String FloatSeqHelper.id()
abstract  String ContextList.item(int index)
Returns the String object at the given index.
static String ServiceDetailHelper.id()
static String BooleanSeqHelper.id()
static String VisibilityHelper.id()
static String ULongSeqHelper.id()
static String StringValueHelper.extract(Any a)
static String StringValueHelper.id()
static String StringValueHelper.read(InputStream istream)
 String StringValueHelper.get_id()
static String CharSeqHelper.id()
static String SetOverrideTypeHelper.id()
static String VersionSpecHelper.extract(Any a)
static String VersionSpecHelper.id()
static String VersionSpecHelper.read(InputStream istream)
static String DefinitionKindHelper.id()
static String StructMemberHelper.id()
static String IDLTypeHelper.id()
static String UShortSeqHelper.id()
static String WCharSeqHelper.id()
abstract  String TypeCode.id()
Retrieves the RepositoryId globally identifying the type of this TypeCode object.
abstract  String TypeCode.name()
Retrieves the simple name identifying this TypeCode object within its enclosing scope.
abstract  String TypeCode.member_name(int index)
Retrieves the simple name of the member identified by the given index.
 String DynValue.current_member_name()
Returns the name of the current member while traversing a DynAny object that represents a Value object.
static String DoubleSeqHelper.id()
 String DynEnum.value_as_string()
Return the value of the IDL enum stored in this DynEnum as a string.
 String DataInputStream.read_string()
Reads an IDL string from the input stream.
 String DataInputStream.read_wstring()
Reads an IDL wide string from the input stream.
static String WStringValueHelper.extract(Any a)
static String WStringValueHelper.id()
static String WStringValueHelper.read(InputStream istream)
 String WStringValueHelper.get_id()
static String PolicyTypeHelper.id()
 String ServerRequest.op_name()
Deprecated. use operation()
 String ServerRequest.operation()
Retrieves the name of the operation being invoked.
static String ULongLongSeqHelper.id()
abstract  String Request.operation()
Retrieves the name of the method to be invoked.
static String RepositoryIdHelper.extract(Any a)
static String RepositoryIdHelper.id()
static String RepositoryIdHelper.read(InputStream istream)
static String ShortSeqHelper.id()
abstract  String[] ORB.list_initial_services()
Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
abstract  String ORB.object_to_string(Object obj)
Converts the given CORBA object reference to a string.
static String ObjectHelper.id()
static String CurrentHelper.id()
static String LongLongSeqHelper.id()
 String[] _IDLTypeStub._ids()
abstract  String Context.context_name()
Retrieves the name of this Context object.
static String CompletionStatusHelper.id()
static String FieldNameHelper.extract(Any a)
static String FieldNameHelper.id()
static String FieldNameHelper.read(InputStream istream)
static String ValueBaseHelper.id()
static String PolicyHelper.id()
static String AnySeqHelper.id()
static String ValueMemberHelper.id()

Methods in org.omg.CORBA with parameters of type String
void | DynAny.insert_string(String value) Inserts the given String object as the value for this DynAny object.
void | DynAny.insert_wstring(String value) Inserts the given String as the value for this DynAny object.
boolean | Object._is_a(String repositoryIdentifier) Checks whether this object is an instance of a class that implements the given interface.
Request | Object._request(String operation) Creates a Request instance for use in the Dynamic Invocation Interface.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
abstract void | Any.insert_string(String s) Inserts the given String object into this Any object's value field.
abstract void | Any.insert_wstring(String s) Inserts the given String object into this Any object's value field.
static void | IdentifierHelper.insert(Any a, String that)
static void | IdentifierHelper.write(OutputStream ostream, String value)
void | DynUnion.member_name(String arg) Allows for the assignment of the name of this union member.
abstract void | ContextList.add(String ctx) Adds a String object to this ContextList object.
static void | StringValueHelper.insert(Any a, String that)
static void | StringValueHelper.write(OutputStream ostream, String value)
static void | VersionSpecHelper.insert(Any a, String that)
static void | VersionSpecHelper.write(OutputStream ostream, String value)
void | DataOutputStream.write_string(String value) Writes the IDL string value to the output stream.
void | DataOutputStream.write_wstring(String value) Writes the IDL wide string value (represented as a Java String) to the output stream.
void | DynEnum.value_as_string(String arg) Set a particular enum in this DynEnum.
static void | WStringValueHelper.insert(Any a, String that)
static void | WStringValueHelper.write(OutputStream ostream, String value)
abstract Any | Request.add_named_in_arg(String name) Creates an input argument with the given name and adds it to this Request object.
abstract Any | Request.add_named_inout_arg(String name) Adds an input/output argument with the given name to this Request object.
abstract Any | Request.add_named_out_arg(String name) Adds an output argument with the given name to this Request object.
static void | RepositoryIdHelper.insert(Any a, String that)
static void | RepositoryIdHelper.write(OutputStream ostream, String value)
static ORB | ORB.init(String[] args, Properties props) Creates a new ORB instance for a standalone application.
protected abstract void | ORB.set_parameters(String[] args, Properties props) Allows the ORB implementation to be initialized with the given parameters and properties.
abstract Object | ORB.resolve_initial_references(String object_name) Resolves a specific object reference from the set of available initial service names.
abstract Object | ORB.string_to_object(String str) Converts a string produced by the method object_to_string back to a CORBA object reference.
abstract NamedValue | ORB.create_named_value(String s, Any any, int flags) Creates a NamedValue object using the given name, value, and argument mode flags.
abstract TypeCode | ORB.create_struct_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL struct.
abstract TypeCode | ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Creates a TypeCode object representing an IDL union.
abstract TypeCode | ORB.create_enum_tc(String id, String name, String[] members) Creates a TypeCode object representing an IDL enum.
abstract TypeCode | ORB.create_alias_tc(String id, String name, TypeCode original_type) Creates a TypeCode object representing an IDL alias (typedef).
abstract TypeCode | ORB.create_exception_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL exception.
abstract TypeCode | ORB.create_interface_tc(String id, String name) Creates a TypeCode object representing an IDL interface.
TypeCode | ORB.create_native_tc(String id, String name) Create a TypeCode object for an IDL native type.
TypeCode | ORB.create_abstract_interface_tc(String id, String name) Create a TypeCode object for an IDL abstract interface.
TypeCode | ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create a TypeCode object for an IDL value type.
TypeCode | ORB.create_recursive_tc(String id) Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
TypeCode | ORB.create_value_box_tc(String id, String name, TypeCode boxed_type) Creates a TypeCode object for an IDL value box.
abstract Context | Context.create_child(String child_ctx_name) Creates a Context object with the given string as its name and with this Context object set as its parent.
abstract void | Context.set_one_value(String propname, Any propvalue) Creates a NamedValue object and adds it to this Context object.
abstract void | Context.delete_values(String propname) Deletes from this Context object the NamedValue object(s) whose name field matches the given property name.
abstract NVList | Context.get_values(String start_scope, int op_flags, String pattern) Retrieves the NamedValue objects whose name field matches the given name or name pattern.
abstract NamedValue | NVList.add_item(String item_name, int flags) Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
abstract NamedValue | NVList.add_value(String item_name, Any val, int flags) Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
static void | FieldNameHelper.insert(Any a, String that)
static void | FieldNameHelper.write(OutputStream ostream, String value)

Constructors in org.omg.CORBA with parameters of type String
SystemException(String reason, int minor, CompletionStatus completed)
Constructs a SystemException exception with the specified detail message, minor code, and completion status.
MARSHAL(String s)
Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
MARSHAL(String s, int minor, CompletionStatus completed)
Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
UNKNOWN(String s)
Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
UNKNOWN(String s, int minor, CompletionStatus completed)
Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
TRANSACTION_ROLLEDBACK(String s)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_ROLLEDBACK(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
OBJECT_NOT_EXIST(String s)
Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJECT_NOT_EXIST(String s, int minor, CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
IMP_LIMIT(String s)
Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
IMP_LIMIT(String s, int minor, CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.
UserException(String reason)
Constructs a UserException object with a detail message.
PolicyError(String reason_string, short __reason)
Constructs a PolicyError user exception initialized with the given reason detail message and reason code.
INV_OBJREF(String s)
Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_OBJREF(String s, int minor, CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.
INV_FLAG(String s)
Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_FLAG(String s, int minor, CompletionStatus completed)
Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.
INTERNAL(String s)
Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INTERNAL(String s, int minor, CompletionStatus completed)
Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.
TRANSIENT(String s)
Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSIENT(String s, int minor, CompletionStatus completed)
Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
INV_IDENT(String s)
Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_IDENT(String s, int minor, CompletionStatus completed)
Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.
BAD_PARAM(String s)
Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_PARAM(String s, int minor, CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.
UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
INTF_REPOS(String s)
Constructs an INTF_REPOS exception with the specified detail.
INTF_REPOS(String s, int minor, CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.
Bounds(String reason)
Constructs an Bounds with the specified detail message.
OBJ_ADAPTER(String s)
Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJ_ADAPTER(String s, int minor, CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
NO_PERMISSION(String s)
Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_PERMISSION(String s, int minor, CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
INV_POLICY(String s)
Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_POLICY(String s, int minor, CompletionStatus completed)
Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
NameValuePair(String __id, Any __value)
Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
INITIALIZE(String s)
Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
INITIALIZE(String s, int minor, CompletionStatus completed)
Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.
StringHolder(String initial)
Constructs a new StringHolder object with its value field initialized to the given String.
NO_IMPLEMENT(String s)
Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_IMPLEMENT(String s, int minor, CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
StructMember(String __name, TypeCode __type, IDLType __type_def)
Constructs a StructMember object initialized with the given values.
INVALID_TRANSACTION(String s)
Constructs an INVALID_TRANSACTION exception with the specified detail message.
INVALID_TRANSACTION(String s, int minor, CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.
WrongTransaction(String reason)
Constructs a WrongTransaction object with the given detail message.
DATA_CONVERSION(String s)
Constructs a DATA_CONVERSION exception with the specified detail.
DATA_CONVERSION(String s, int minor, CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.
BAD_OPERATION(String s)
Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_OPERATION(String s, int minor, CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.
NO_MEMORY(String s)
Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_MEMORY(String s, int minor, CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
PERSIST_STORE(String s)
Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
PERSIST_STORE(String s, int minor, CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
BAD_CONTEXT(String s)
Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
BAD_CONTEXT(String s, int minor, CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.
BAD_INV_ORDER(String s)
Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_INV_ORDER(String s, int minor, CompletionStatus completed)
Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.
FREE_MEM(String s)
Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
FREE_MEM(String s, int minor, CompletionStatus completed)
Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.
TRANSACTION_REQUIRED(String s)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_REQUIRED(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
Constructs a ValueMember object initialized with the given values.
NO_RESPONSE(String s)
Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESPONSE(String s, int minor, CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
BAD_TYPECODE(String s)
Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_TYPECODE(String s, int minor, CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.
NO_RESOURCES(String s)
Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESOURCES(String s, int minor, CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
COMM_FAILURE(String s)
Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
COMM_FAILURE(String s, int minor, CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.

Uses of String in org.omg.CORBA_2_3

Methods in org.omg.CORBA_2_3 with parameters of type String
ValueFactory | ORB.register_value_factory(String id, ValueFactory factory)
void | ORB.unregister_value_factory(String id)
ValueFactory | ORB.lookup_value_factory(String id)
Object | ORB.get_value_def(String repid)

Uses of String in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable that return String
String | ObjectImpl._get_codebase() Returns the codebase for this object reference.
String | Delegate.get_codebase(Object self) Returns the codebase for object reference provided.

Methods in org.omg.CORBA_2_3.portable with parameters of type String
void | OutputStream.write_value(Serializable value, String repository_id) marshals a value type to the output stream.
Serializable | InputStream.read_value(String rep_id) unmarshalls a value type from the input stream.

Uses of String in org.omg.CORBA.DynAnyPackage

Constructors in org.omg.CORBA.DynAnyPackage with parameters of type String
InvalidSeq(String reason)
Constructs an InvalidSeq object.
Invalid(String reason)
Constructs an Invalid object.
TypeMismatch(String reason)
Constructs a TypeMismatch object.
InvalidValue(String reason)
Constructs an InvalidValue object.

Uses of String in org.omg.CORBA.ORBPackage

Constructors in org.omg.CORBA.ORBPackage with parameters of type String
InconsistentTypeCode(String reason)
Constructs an InconsistentTypeCode user exception with the specified reason message.
InvalidName(String reason)
Constructs an InvalidName exception with the specified reason message.

Uses of String in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return String
abstract  String[] ObjectImpl._ids()
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
 String ObjectImpl.toString()
Returns a String object that represents this ObjectImpl object.
abstract  String InputStream.read_string()
Reads a string value from this input stream.
abstract  String InputStream.read_wstring()
Reads a wide string value from this input stream.
 String[] ValueBase._truncatable_ids()
Provides truncatable repository ids.
 String BoxedValueHelper.get_id()
 String Delegate.toString(Object self)
Provide the implementation to override the toString() method of the delegating CORBA object.
 String ApplicationException.getId()
Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.

Methods in org.omg.CORBA.portable with parameters of type String
boolean | ObjectImpl._is_a(String repository_id) Checks whether the object identified by the given repository identifier is an ObjectImpl object.
Request | ObjectImpl._request(String operation) Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
ServantObject | ObjectImpl._servant_preinvoke(String operation, Class expectedType) Returns a Java reference to the local servant that should be used for sending a request for the method specified.
OutputStream | ObjectImpl._request(String operation, boolean responseExpected) Returns an OutputStream object to use for marshalling the arguments of the given method.
abstract void | OutputStream.write_string(String value) Writes a string value to this stream.
abstract void | OutputStream.write_wstring(String value) Writes a wide string value to this stream.
abstract boolean | Delegate.is_a(Object obj, String repository_id) Checks if the object reference is an instance of the given interface.
abstract Request | Delegate.request(Object obj, String operation) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.
ServantObject | Delegate.servant_preinvoke(Object self, String operation, Class expectedType) Returns a Java reference to the servant which should be used for this request.
OutputStream | Delegate.request(Object self, String operation, boolean responseExpected) request is called by a stub to obtain an OutputStream for marshaling arguments.
OutputStream | InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler) Invoked by the ORB to dispatch a request to the servant.

Constructors in org.omg.CORBA.portable with parameters of type String
ApplicationException(String id, InputStream ins)
Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.

Uses of String in org.omg.CORBA.TypeCodePackage

Constructors in org.omg.CORBA.TypeCodePackage with parameters of type String
Bounds(String reason)
Constructs a Bounds exception with the specified reason message.
BadKind(String reason)
Constructs a BadKind exception with the specified reason message.

Uses of String in org.omg.CosNaming

Fields in org.omg.CosNaming declared as String
String | NameComponent.id
String | NameComponent.kind

Methods in org.omg.CosNaming that return String
String[] | _NamingContextStub._ids()
String[] | _BindingIteratorImplBase._ids()
static String | NameHelper.id()
static String | IstringHelper.read(InputStream in)
static String | IstringHelper.extract(Any a)
static String | IstringHelper.id()
static String | BindingListHelper.id()
String[] | _BindingIteratorStub._ids()
static String | BindingIteratorHelper.id()
String[] | _NamingContextImplBase._ids()
static String | NameComponentHelper.id()
static String | BindingTypeHelper.id()
static String | NamingContextHelper.id()
static String | BindingHelper.id()

Methods in org.omg.CosNaming with parameters of type String
static void | IstringHelper.write(OutputStream out, String that)
static void | IstringHelper.insert(Any a, String that)

Constructors in org.omg.CosNaming with parameters of type String
NameComponent(String __id, String __kind)

Uses of String in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage that return String
static String | AlreadyBoundHelper.id()
static String | NotFoundReasonHelper.id()
static String | NotFoundHelper.id()
static String | CannotProceedHelper.id()
static String | InvalidNameHelper.id()
static String | NotEmptyHelper.id()

Uses of String in org.omg.stub.java.rmi

Methods in org.omg.stub.java.rmi that return String
 String[] _Remote_Stub._ids()
Returns an array of repository ids that an object implements.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.StringBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.StringBuffer

Packages that use StringBuffer
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Uses of StringBuffer in java.io

Methods in java.io that return StringBuffer
 StringBuffer StringWriter.getBuffer()
Return the string buffer itself.

Uses of StringBuffer in java.lang

Methods in java.lang that return StringBuffer
StringBuffer | StringBuffer.append(Object obj) Appends the string representation of the Object argument to this string buffer.
StringBuffer | StringBuffer.append(String str) Appends the string to this string buffer.
StringBuffer | StringBuffer.append(char[] str) Appends the string representation of the char array argument to this string buffer.
StringBuffer | StringBuffer.append(char[] str, int offset, int len) Appends the string representation of a subarray of the char array argument to this string buffer.
StringBuffer | StringBuffer.append(boolean b) Appends the string representation of the boolean argument to the string buffer.
StringBuffer | StringBuffer.append(char c) Appends the string representation of the char argument to this string buffer.
StringBuffer | StringBuffer.append(int i) Appends the string representation of the int argument to this string buffer.
StringBuffer | StringBuffer.append(long l) Appends the string representation of the long argument to this string buffer.
StringBuffer | StringBuffer.append(float f) Appends the string representation of the float argument to this string buffer.
StringBuffer | StringBuffer.append(double d) Appends the string representation of the double argument to this string buffer.
StringBuffer | StringBuffer.delete(int start, int end) Removes the characters in a substring of this StringBuffer.
StringBuffer | StringBuffer.deleteCharAt(int index) Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
StringBuffer | StringBuffer.replace(int start, int end, String str) Replaces the characters in a substring of this StringBuffer with characters in the specified String.
StringBuffer | StringBuffer.insert(int index, char[] str, int offset, int len) Inserts the string representation of a subarray of the str array argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, Object obj) Inserts the string representation of the Object argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, String str) Inserts the string into this string buffer.
StringBuffer | StringBuffer.insert(int offset, char[] str) Inserts the string representation of the char array argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, boolean b) Inserts the string representation of the boolean argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, char c) Inserts the string representation of the char argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, int i) Inserts the string representation of the second int argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, long l) Inserts the string representation of the long argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, float f) Inserts the string representation of the float argument into this string buffer.
StringBuffer | StringBuffer.insert(int offset, double d) Inserts the string representation of the double argument into this string buffer.
StringBuffer | StringBuffer.reverse() The character sequence contained in this string buffer is replaced by the reverse of the sequence.

Constructors in java.lang with parameters of type StringBuffer
String(StringBuffer buffer)
Allocates a new string that contains the sequence of characters currently contained in the string buffer argument.

Uses of StringBuffer in java.text

Methods in java.text that return StringBuffer
abstract StringBuffer | Format.format(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
StringBuffer | NumberFormat.format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
abstract StringBuffer | NumberFormat.format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
abstract StringBuffer | NumberFormat.format(long number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
StringBuffer | ChoiceFormat.format(long number, StringBuffer toAppendTo, FieldPosition status) Specialization of format.
StringBuffer | ChoiceFormat.format(double number, StringBuffer toAppendTo, FieldPosition status) Returns pattern with formatted double.
StringBuffer | DateFormat.format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Overrides Format.
abstract StringBuffer | DateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats a Date into a date/time string.
StringBuffer | SimpleDateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition pos) Overrides DateFormat
StringBuffer | DecimalFormat.format(double number, StringBuffer result, FieldPosition fieldPosition) Formats a double to produce a string.
StringBuffer | DecimalFormat.format(long number, StringBuffer result, FieldPosition fieldPosition) Format a long to produce a string.
StringBuffer | MessageFormat.format(Object[] source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
StringBuffer | MessageFormat.format(Object source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.

Methods in java.text with parameters of type StringBuffer
abstract StringBuffer | Format.format(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
StringBuffer | NumberFormat.format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
abstract StringBuffer | NumberFormat.format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
abstract StringBuffer | NumberFormat.format(long number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
StringBuffer | ChoiceFormat.format(long number, StringBuffer toAppendTo, FieldPosition status) Specialization of format.
StringBuffer | ChoiceFormat.format(double number, StringBuffer toAppendTo, FieldPosition status) Returns pattern with formatted double.
StringBuffer | DateFormat.format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Overrides Format.
abstract StringBuffer | DateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats a Date into a date/time string.
StringBuffer | SimpleDateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition pos) Overrides DateFormat
StringBuffer | DecimalFormat.format(double number, StringBuffer result, FieldPosition fieldPosition) Formats a double to produce a string.
StringBuffer | DecimalFormat.format(long number, StringBuffer result, FieldPosition fieldPosition) Format a long to produce a string.
StringBuffer | MessageFormat.format(Object[] source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
StringBuffer | MessageFormat.format(Object source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.

Uses of StringBuffer in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser with parameters of type StringBuffer
protected  boolean Parser.parseMarkupDeclarations(StringBuffer strBuff)
Parse markup declarations.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Thread

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Thread

Packages that use Thread
java.lang | Provides classes that are fundamental to the design of the Java programming language.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Thread in java.lang

Methods in java.lang that return Thread
static Thread Thread.currentThread()
Returns a reference to the currently executing thread object.

Methods in java.lang with parameters of type Thread
int | ThreadGroup.enumerate(Thread[] list) Copies into the specified array every active thread in this thread group and its subgroups.
int | ThreadGroup.enumerate(Thread[] list, boolean recurse) Copies into the specified array every active thread in this thread group.
void | ThreadGroup.uncaughtException(Thread t, Throwable e) Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.
static int | Thread.enumerate(Thread[] tarray) Copies into the specified array every active thread in this thread's thread group and its subgroups.
void | SecurityManager.checkAccess(Thread t) Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
void | Runtime.addShutdownHook(Thread hook) Registers a new virtual-machine shutdown hook.
boolean | Runtime.removeShutdownHook(Thread hook) De-registers a previously-registered virtual-machine shutdown hook.

Uses of Thread in javax.swing.text

Methods in javax.swing.text that return Thread
protected  Thread AbstractDocument.getCurrentWriter()
Fetches the current writing thread if there is one.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ThreadGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ThreadGroup

Packages that use ThreadGroup
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of ThreadGroup in java.lang

Methods in java.lang that return ThreadGroup
ThreadGroup | ThreadGroup.getParent() Returns the parent of this thread group.
ThreadGroup | Thread.getThreadGroup() Returns the thread group to which this thread belongs.
ThreadGroup | SecurityManager.getThreadGroup() Returns the thread group into which to instantiate any new thread being created at the time this is being called.

Methods in java.lang with parameters of type ThreadGroup
boolean | ThreadGroup.parentOf(ThreadGroup g) Tests if this thread group is either the thread group argument or one of its ancestor thread groups.
int | ThreadGroup.enumerate(ThreadGroup[] list) Copies into the specified array references to every active subgroup in this thread group.
int | ThreadGroup.enumerate(ThreadGroup[] list, boolean recurse) Copies into the specified array references to every active subgroup in this thread group.
void | SecurityManager.checkAccess(ThreadGroup g) Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.

Constructors in java.lang with parameters of type ThreadGroup
ThreadGroup(ThreadGroup parent, String name)
Creates a new thread group.
Thread(ThreadGroup group, Runnable target)
Allocates a new Thread object.
Thread(ThreadGroup group, String name)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target, String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ThreadLocal

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ThreadLocal

Packages that use ThreadLocal
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of ThreadLocal in java.lang

Subclasses of ThreadLocal in java.lang
 class InheritableThreadLocal
This class extends ThreadLocal to provide inheritance of values from parent Thread to child Thread: when a child thread is created, the child receives initial values for all InheritableThreadLocals for which the parent has values.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.Throwable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.Throwable

Packages that use Throwable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.color | Provides classes for color spaces.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.beans | Contains classes related to Java Beans development.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of Throwable in java.awt

Subclasses of Throwable in java.awt
class | AWTError Thrown when a serious Abstract Window Toolkit error has occurred.
class | AWTException Signals that an Absract Window Toolkit exception has occurred.
class | FontFormatException Thrown by method createFont in the Font class to indicate that the specified font is bad.
class | IllegalComponentStateException Signals that an AWT component is not in an appropriate state for the requested operation.

Methods in java.awt that throw Throwable
protected void | Font.finalize() Disposes the native Font object.
protected void | Window.finalize() Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.
protected void | Cursor.finalize()
protected void | Frame.finalize() We have to remove the (hard) reference to weakThis in the Vector, otherwise the WeakReference instance will never get garbage collected.
protected void | AWTEvent.finalize()

Uses of Throwable in java.awt.color

Subclasses of Throwable in java.awt.color
class | CMMException This exception is thrown if the native CMM returns an error.
class | ProfileDataException This exception is thrown when an error occurs in accessing or processing an ICC_Profile object.

Uses of Throwable in java.awt.datatransfer

Subclasses of Throwable in java.awt.datatransfer
class | MimeTypeParseException A class to encapsulate MimeType parsing related exceptions
class | UnsupportedFlavorException Signals that the requested data is not supported in this flavor.

Uses of Throwable in java.awt.dnd

Subclasses of Throwable in java.awt.dnd
 class InvalidDnDOperationException
This exception is thrown by various methods in the java.awt.dnd package.

Uses of Throwable in java.awt.geom

Subclasses of Throwable in java.awt.geom
class | IllegalPathStateException The IllegalPathStateException represents an exception that is thrown if an operation is performed on a path that is in an illegal state with respect to the particular operation being performed, such as appending a path segment to a GeneralPath without an initial moveto.
class | NoninvertibleTransformException The NoninvertibleTransformException class represents an exception that is thrown if an operation is performed requiring the inverse of an AffineTransform object but the AffineTransform is in a non-invertible state.

Uses of Throwable in java.awt.image

Subclasses of Throwable in java.awt.image
class | ImagingOpException The ImagingOpException is thrown if one of the BufferedImageOp or RasterOp filter methods cannot process the image.
class | RasterFormatException The RasterFormatException is thrown if there is invalid layout information in the Raster.

Uses of Throwable in java.awt.print

Subclasses of Throwable in java.awt.print
class | PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
class | PrinterException The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
class | PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.

Uses of Throwable in java.beans

Subclasses of Throwable in java.beans
class | IntrospectionException Thrown when an exception happens during Introspection.
class | PropertyVetoException A PropertyVetoException is thrown when a proposed change to a property represents an unacceptable value.

Uses of Throwable in java.io

Subclasses of Throwable in java.io
class | CharConversionException Base class for character conversion exceptions.
class | EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
class | FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
class | InterruptedIOException Signals that an I/O operation has been interrupted.
class | InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
class | InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
class | IOException Signals that an I/O exception of some sort has occurred.
class | NotActiveException Thrown when serialization or deserialization is not active.
class | NotSerializableException Thrown when an instance is required to have a Serializable interface.
class | ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
class | OptionalDataException Unexpected data appeared in an ObjectInputStream trying to read an Object.
class | StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
class | SyncFailedException Signals that a sync operation has failed.
class | UnsupportedEncodingException The Character Encoding is not supported.
class | UTFDataFormatException Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface.
class | WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.

Uses of Throwable in java.lang

Subclasses of Throwable in java.lang
class | AbstractMethodError Thrown when an application tries to call an abstract method.
class | ArithmeticException Thrown when an exceptional arithmetic condition has occurred.
class | ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index.
class | ArrayStoreException Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
class | ClassCastException Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
class | ClassCircularityError Thrown when a circularity has been detected while initializing a class.
class | ClassFormatError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
class | ClassNotFoundException Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
class | CloneNotSupportedException Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
class | Error An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
class | Exception The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
class | ExceptionInInitializerError Signals that an unexpected exception has occurred in a static initializer.
class | IllegalAccessError Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
class | IllegalAccessException Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
class | IllegalArgumentException Thrown to indicate that a method has been passed an illegal or inappropriate argument.
class | IllegalMonitorStateException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
class | IllegalStateException Signals that a method has been invoked at an illegal or inappropriate time.
class | IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation.
class | IncompatibleClassChangeError Thrown when an incompatible class change has occurred to some class definition.
class | IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
class | InstantiationError Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
class | InstantiationException Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
class | InternalError Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
class | InterruptedException Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
class | LinkageError Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
class | NegativeArraySizeException Thrown if an application tries to create an array with negative size.
class | NoClassDefFoundError Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
class | NoSuchFieldError Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
class | NoSuchFieldException Signals that the class doesn't have a field of a specified name.
class | NoSuchMethodError Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
class | NoSuchMethodException Thrown when a particular method cannot be found.
class | NullPointerException Thrown when an application attempts to use null in a case where an object is required.
class | NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
class | OutOfMemoryError Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
class | RuntimeException RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
class | SecurityException Thrown by the security manager to indicate a security violation.
class | StackOverflowError Thrown when a stack overflow occurs because an application recurses too deeply.
class | StringIndexOutOfBoundsException Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
class | ThreadDeath An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
class | UnknownError Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
class | UnsatisfiedLinkError Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
class | UnsupportedClassVersionError Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
class | UnsupportedOperationException Thrown to indicate that the requested operation is not supported.
class | VerifyError Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
class | VirtualMachineError Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Methods in java.lang that return Throwable
Throwable | Throwable.fillInStackTrace() Fills in the execution stack trace.
Throwable | ExceptionInInitializerError.getException() Returns the exception that occurred during a static initialization that caused this Error to be created.
Throwable | ClassNotFoundException.getException() Returns the exception that was raised if an error occurred while attempting to load the class.

Methods in java.lang with parameters of type Throwable
void | ThreadGroup.uncaughtException(Thread t, Throwable e) Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.
void | Thread.stop(Throwable obj) Deprecated. This method is inherently unsafe. See Thread.stop() (with no arguments) for details. An additional danger of this method is that it may be used to generate exceptions that the target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Methods in java.lang that throw Throwable
protected  void Object.finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

Constructors in java.lang with parameters of type Throwable
ExceptionInInitializerError(Throwable thrown)
Constructs a new ExceptionInInitializerError class by saving a reference to the Throwable object thrown for later retrieval by the ExceptionInInitializerError.getException() method.
ClassNotFoundException(String s, Throwable ex)
Constructs a ClassNotFoundException with the specified detail message and optional exception that was raised while loading the class.

Uses of Throwable in java.lang.reflect

Subclasses of Throwable in java.lang.reflect
class | InvocationTargetException InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
class | UndeclaredThrowableException Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Methods in java.lang.reflect that return Throwable
Throwable | InvocationTargetException.getTargetException() Get the thrown target exception.
Throwable | UndeclaredThrowableException.getUndeclaredThrowable() Returns the Throwable instance wrapped in this UndeclaredThrowableException.

Methods in java.lang.reflect that throw Throwable
 Object InvocationHandler.invoke(Object proxy, Method method, Object[] args)
Processes a method invocation on a proxy instance and returns the result.

Constructors in java.lang.reflect with parameters of type Throwable
InvocationTargetException(Throwable target)
Constructs a InvocationTargetException with a target exception.
InvocationTargetException(Throwable target, String s)
Constructs a InvocationTargetException with a target exception and a detail message.
UndeclaredThrowableException(Throwable undeclaredThrowable)
Constructs an UndeclaredThrowableException with the specifed Throwable.
UndeclaredThrowableException(Throwable undeclaredThrowable, String s)
Constructs an UndeclaredThrowableException with the specified Throwable and a detail message.

Uses of Throwable in java.net

Subclasses of Throwable in java.net
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | MalformedURLException Thrown to indicate that a malformed URL has occurred.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | ProtocolException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | SocketException Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
class | UnknownHostException Thrown to indicate that the IP address of a host could not be determined.
class | UnknownServiceException Thrown to indicate that an unknown service exception has occurred.

Uses of Throwable in java.rmi

Subclasses of Throwable in java.rmi
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | AlreadyBoundException An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | NotBoundException A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
class | RemoteException A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
class | RMISecurityException Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Fields in java.rmi declared as Throwable
 Throwable RemoteException.detail
Nested Exception to hold wrapped remote exception.

Constructors in java.rmi with parameters of type Throwable
RemoteException(String s, Throwable ex)
Constructs a RemoteException with the specified detail message and nested exception.

Uses of Throwable in java.rmi.activation

Subclasses of Throwable in java.rmi.activation
class | ActivateFailedException This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
class | ActivationException General exception used by the activation interfaces.
class | UnknownGroupException An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
class | UnknownObjectException An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Fields in java.rmi.activation declared as Throwable
 Throwable ActivationException.detail
Nested Exception to hold wrapped remote exceptions.

Constructors in java.rmi.activation with parameters of type Throwable
ActivationException(String s, Throwable ex)
Constructs an ActivationException with detail message, s, and detail exception ex.

Uses of Throwable in java.rmi.server

Subclasses of Throwable in java.rmi.server
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | ServerCloneException A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
class | ServerNotActiveException An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Uses of Throwable in java.security

Subclasses of Throwable in java.security
class | AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
class | DigestException This is the generic Message Digest exception.
class | GeneralSecurityException This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
class | InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | InvalidParameterException This exception is thrown when an invalid parameter is passed to a method.
class | KeyException This is the basic key exception.
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.
class | KeyStoreException This is the generic KeyStore exception.
class | NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
class | NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
class | PrivilegedActionException This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
class | ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
class | SignatureException This is the generic Signature exception.
class | UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.

Uses of Throwable in java.security.acl

Subclasses of Throwable in java.security.acl
class | AclNotFoundException This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
class | LastOwnerException This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
class | NotOwnerException This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Uses of Throwable in java.security.cert

Subclasses of Throwable in java.security.cert
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateException This exception indicates one of a variety of certificate problems.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.
class | CRLException CRL (Certificate Revocation List) Exception

Uses of Throwable in java.security.spec

Subclasses of Throwable in java.security.spec
class | InvalidKeySpecException This is the exception for invalid key specifications.
class | InvalidParameterSpecException This is the exception for invalid parameter specifications.

Uses of Throwable in java.sql

Subclasses of Throwable in java.sql
class | BatchUpdateException An exception thrown when an error occurs during a batch update operation.
class | DataTruncation An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
class | SQLException An exception that provides information on a database access error or other errors.
class | SQLWarning An exception that provides information on database access warnings.

Uses of Throwable in java.text

Subclasses of Throwable in java.text
 class ParseException
Signals that an error has been reached unexpectedly while parsing.

Uses of Throwable in java.util

Subclasses of Throwable in java.util
class | ConcurrentModificationException This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
class | EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.
class | MissingResourceException Signals that a resource is missing.
class | NoSuchElementException Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
class | TooManyListenersException The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

Uses of Throwable in java.util.jar

Subclasses of Throwable in java.util.jar
 class JarException
Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Uses of Throwable in java.util.zip

Subclasses of Throwable in java.util.zip
class | DataFormatException Signals that a data format error has occurred.
class | ZipException Signals that a Zip exception of some sort has occurred.

Uses of Throwable in javax.naming

Subclasses of Throwable in javax.naming
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | CannotProceedException This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
class | CommunicationException This exception is thrown when the client is unable to communicate with the directory or naming service.
class | ConfigurationException This exception is thrown when there is a configuration problem.
class | ContextNotEmptyException This exception is thrown when attempting to destroy a context that is not empty.
class | InsufficientResourcesException This exception is thrown when resources are not available to complete the requested operation.
class | InterruptedNamingException This exception is thrown when the naming operation being invoked has been interrupted.
class | InvalidNameException This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
class | LimitExceededException This exception is thrown when a method terminates abnormally due to a user or system specified limit.
class | LinkException This exception is used to describe problems encounter while resolving links.
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.
class | NameAlreadyBoundException This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
class | NameNotFoundException This exception is thrown when a component of the name cannot be resolved because it is not bound.
class | NamingException This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
class | NamingSecurityException This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
class | NoInitialContextException This exception is thrown when no initial context implementation can be created.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.
class | NotContextException This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
class | OperationNotSupportedException This exception is thrown when a context implementation does not support the operation being invoked.
class | PartialResultException This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
class | ReferralException This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
class | ServiceUnavailableException This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Fields in javax.naming declared as Throwable
protected  Throwable NamingException.rootException
Contains the original exception that caused this NamingException to be thrown.

Methods in javax.naming that return Throwable
 Throwable NamingException.getRootCause()
Retrieves the root cause of this NamingException, if any.

Methods in javax.naming with parameters of type Throwable
 void NamingException.setRootCause(Throwable e)
Records that the root cause of this NamingException.

Uses of Throwable in javax.naming.directory

Subclasses of Throwable in javax.naming.directory
class | AttributeInUseException This exception is thrown when an operation attempts to add an attribute that already exists.
class | AttributeModificationException This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
class | InvalidAttributeIdentifierException This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
class | InvalidAttributesException This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
class | InvalidAttributeValueException This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
class | InvalidSearchControlsException This exception is thrown when the specification of the SearchControls for a search operation is invalid.
class | InvalidSearchFilterException This exception is thrown when the specification of a search filter is invalid.
class | NoSuchAttributeException This exception is thrown when attempting to access an attribute that does not exist.
class | SchemaViolationException This exception is thrown when a method in some ways violates the schema.

Uses of Throwable in javax.naming.ldap

Subclasses of Throwable in javax.naming.ldap
 class LdapReferralException
This abstract class is used to represent an LDAP referral exception.

Uses of Throwable in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type Throwable
static RemoteException Util.wrapException(Throwable orig)
Wraps an exception thrown by an implementation method.
 RemoteException UtilDelegate.wrapException(Throwable obj)
Delegation call for Util.wrapException(java.lang.Throwable).

Uses of Throwable in javax.sound.midi

Subclasses of Throwable in javax.sound.midi
class | InvalidMidiDataException An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
class | MidiUnavailableException A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.

Uses of Throwable in javax.sound.sampled

Subclasses of Throwable in javax.sound.sampled
class | LineUnavailableException A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
class | UnsupportedAudioFileException An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Uses of Throwable in javax.swing

Subclasses of Throwable in javax.swing
 class UnsupportedLookAndFeelException
An exception that indicates the request look & feel management classes are not present on the user's system.

Uses of Throwable in javax.swing.text

Subclasses of Throwable in javax.swing.text
class | BadLocationException This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
class | ChangedCharSetException ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.

Methods in javax.swing.text that throw Throwable
protected  void AbstractDocument.AbstractElement.finalize()
Finalizes an AbstractElement.

Uses of Throwable in javax.swing.tree

Subclasses of Throwable in javax.swing.tree
 class ExpandVetoException
Exception used to stop and expand/collapse from happening.

Uses of Throwable in javax.swing.undo

Subclasses of Throwable in javax.swing.undo
class | CannotRedoException Thrown when an UndoableEdit is told to redo() and can't.
class | CannotUndoException Thrown when an UndoableEdit is told to undo() and can't.

Uses of Throwable in javax.transaction

Subclasses of Throwable in javax.transaction
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Uses of Throwable in org.omg.CORBA

Subclasses of Throwable in org.omg.CORBA
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | SystemException The root class for all CORBA standard exceptions.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
class | UnknownUserException A class that contains user exceptions returned by the server.
class | UserException The root class for CORBA IDL-defined user exceptions.
class | WrongTransaction The CORBA WrongTransaction user-defined exception.

Uses of Throwable in org.omg.CORBA.DynAnyPackage

Subclasses of Throwable in org.omg.CORBA.DynAnyPackage
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of Throwable in org.omg.CORBA.ORBPackage

Subclasses of Throwable in org.omg.CORBA.ORBPackage
class | InconsistentTypeCode InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
class | InvalidName The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Uses of Throwable in org.omg.CORBA.portable

Subclasses of Throwable in org.omg.CORBA.portable
class | ApplicationException This class is used for reporting application level exceptions between ORBs and stubs.
class | IndirectionException The Indirection exception is a Java specific system exception.
class | RemarshalException This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Fields in org.omg.CORBA.portable declared as Throwable
 Throwable UnknownException.originalEx
A throwable--the original exception that was wrapped in a CORBA UnknownException.

Constructors in org.omg.CORBA.portable with parameters of type Throwable
UnknownException(Throwable ex)
Constructs an UnknownException object.

Uses of Throwable in org.omg.CORBA.TypeCodePackage

Subclasses of Throwable in org.omg.CORBA.TypeCodePackage
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of Throwable in org.omg.CosNaming.NamingContextPackage

Subclasses of Throwable in org.omg.CosNaming.NamingContextPackage
class | AlreadyBound
class | CannotProceed
class | NotEmpty
class | NotFound

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.VirtualMachineError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.VirtualMachineError

Packages that use VirtualMachineError
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of VirtualMachineError in java.lang

Subclasses of VirtualMachineError in java.lang
class | InternalError Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
class | OutOfMemoryError Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
class | StackOverflowError Thrown when a stack overflow occurs because an application recurses too deeply.
class | UnknownError Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.lang.Cloneable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.lang.Cloneable

Packages that use Cloneable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.geom | Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.awt.print | Provides classes and interfaces for a general printing API.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Cloneable in java.awt

Classes in java.awt that implement Cloneable
class | Dimension The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
class | GridBagConstraints The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
class | Insets An Insets object is a representation of the borders of a container.
class | JobAttributes A set of attributes which control a print job.
class | PageAttributes A set of attributes which control the output of a printed page.
class | Point A point representing a location in (x, y) coordinate space, specified in integer precision.
class | Rectangle A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.
class | RenderingHints The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.

Uses of Cloneable in java.awt.datatransfer

Classes in java.awt.datatransfer that implement Cloneable
 class DataFlavor
Each instance represents the opaque concept of a data format as would appear on a clipboard, during drag and drop, or in a file system.

Uses of Cloneable in java.awt.font

Classes in java.awt.font that implement Cloneable
class | GlyphVector A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.
class | TextLayout TextLayout is an immutable graphical representation of styled character data.

Uses of Cloneable in java.awt.geom

Classes in java.awt.geom that implement Cloneable
class | AffineTransform The AffineTransform class represents a 2D affine transform that performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines.
class | Arc2D Arc2D is the abstract superclass for all objects that store a 2D arc defined by a bounding rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
static class | Arc2D.Double An arc specified in double precision,
static class | Arc2D.Float An arc specified in float precision,
class | Area The Area class is a device-independent specification of an arbitrarily-shaped area.
class | CubicCurve2D The CubicCurve2D class defines a cubic parametric curve segment in (x, y) coordinate space.
static class | CubicCurve2D.Double A cubic parametric curve segment specified with double coordinates.
static class | CubicCurve2D.Float A cubic parametric curve segment specified with float coordinates.
class | Dimension2D The Dimension2D class is to encapsulate a width and a height dimension.
class | Ellipse2D The Ellipse2D class describes an ellipse that is defined by a bounding rectangle.
static class | Ellipse2D.Double The Double class defines an ellipse specified in double precision.
static class | Ellipse2D.Float The Float class defines an ellipse specified in float precision.
class | GeneralPath The GeneralPath class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves.
class | Line2D This Line2D class represents a line segment in (x, y) coordinate space.
static class | Line2D.Double A line segment specified with double coordinates.
static class | Line2D.Float A line segment specified with float coordinates.
class | Point2D The Point2D class defines a point representing a location in (x, y) coordinate space.
static class | Point2D.Double The Double class defines a point specified in double precision.
static class | Point2D.Float The Float class defines a point specified in float precision.
class | QuadCurve2D The QuadCurve2D class defines a quadratic parametric curve segment in (x, y) coordinate space.
static class | QuadCurve2D.Double A quadratic parametric curve segment specified with double coordinates.
static class | QuadCurve2D.Float A quadratic parametric curve segment specified with float coordinates.
class | Rectangle2D The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h).
static class | Rectangle2D.Double The Double class defines a rectangle specified in double coordinates.
static class | Rectangle2D.Float The Float class defines a rectangle specified in float coordinates.
class | RectangularShape RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.
class | RoundRectangle2D The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of an arc with which to round the corners.
static class | RoundRectangle2D.Double The Double class defines a rectangle with rounded corners all specified in double coordinates.
static class | RoundRectangle2D.Float The Float class defines a rectangle with rounded corners all specified in float coordinates.

Uses of Cloneable in java.awt.image

Classes in java.awt.image that implement Cloneable
class | AreaAveragingScaleFilter An ImageFilter class for scaling images using a simple area averaging algorithm that produces smoother results than the nearest neighbor algorithm.
class | BufferedImageFilter The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm.
class | CropImageFilter An ImageFilter class for cropping images.
class | ImageFilter This class implements a filter for the set of interface methods that are used to deliver data from an ImageProducer to an ImageConsumer.
class | Kernel The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation.
class | ReplicateScaleFilter An ImageFilter class for scaling images using the simplest algorithm.
class | RGBImageFilter This class provides an easy way to create an ImageFilter which modifies the pixels of an image in the default RGB ColorModel.

Uses of Cloneable in java.awt.image.renderable

Classes in java.awt.image.renderable that implement Cloneable
class | ParameterBlock A ParameterBlock encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images.
class | RenderContext A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage.

Uses of Cloneable in java.awt.print

Classes in java.awt.print that implement Cloneable
class | PageFormat The PageFormat class describes the size and orientation of a page to be printed.
class | Paper The Paper class describes the physical characteristics of a piece of paper.

Uses of Cloneable in java.security

Classes in java.security that implement Cloneable
 class Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).

Uses of Cloneable in java.security.acl

Subinterfaces of Cloneable in java.security.acl
 interface AclEntry
This is the interface used for representing one entry in an Access Control List (ACL).

Uses of Cloneable in java.sql

Classes in java.sql that implement Cloneable
class | Time A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
class | Timestamp A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.

Uses of Cloneable in java.text

Subinterfaces of Cloneable in java.text
interface | AttributedCharacterIterator An AttributedCharacterIterator allows iteration through both text and related attribute information.
interface | CharacterIterator This interface defines a protocol for bidirectional iteration over text.

Classes in java.text that implement Cloneable
class | BreakIterator The BreakIterator class implements methods for finding the location of boundaries in text.
class | ChoiceFormat A ChoiceFormat allows you to attach a format to a range of numbers.
class | Collator The Collator class performs locale-sensitive String comparison.
class | DateFormat DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
class | DateFormatSymbols DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
class | DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
class | DecimalFormatSymbols This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
class | Format Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
class | MessageFormat MessageFormat provides a means to produce concatenated messages in language-neutral way.
class | NumberFormat NumberFormat is the abstract base class for all number formats.
class | RuleBasedCollator The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
class | SimpleDateFormat SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
class | StringCharacterIterator StringCharacterIterator implements the CharacterIterater protocol for a String.

Uses of Cloneable in java.util

Classes in java.util that implement Cloneable
class | ArrayList Resizable-array implementation of the List interface.
class | BitSet This class implements a vector of bits that grows as needed.
class | Calendar Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
class | Date The class Date represents a specific instant in time, with millisecond precision.
class | GregorianCalendar GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.
class | HashMap Hash table based implementation of the Map interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | Hashtable This class implements a hashtable, which maps keys to values.
class | LinkedList Linked list implementation of the List interface.
class | Locale A Locale object represents a specific geographical, political, or cultural region.
class | Properties The Properties class represents a persistent set of properties.
class | SimpleTimeZone SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | TimeZone TimeZone represents a time zone offset, and also figures out daylight savings.
class | TreeMap Red-Black tree based implementation of the SortedMap interface.
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.
class | Vector The Vector class implements a growable array of objects.

Uses of Cloneable in java.util.jar

Classes in java.util.jar that implement Cloneable
class | Attributes The Attributes class maps Manifest attribute names to associated string values.
class | JarEntry This class is used to represent a JAR file entry.
class | Manifest The Manifest class is used to maintain Manifest entry names and their associated Attributes.

Uses of Cloneable in java.util.zip

Classes in java.util.zip that implement Cloneable
 class ZipEntry
This class is used to represent a ZIP file entry.

Uses of Cloneable in javax.naming

Subinterfaces of Cloneable in javax.naming
 interface Name
The Name interface represents a generic name -- an ordered sequence of components.

Classes in javax.naming that implement Cloneable
class | CompositeName This class represents a composite name -- a sequence of component names spanning multiple namespaces.
class | CompoundName This class represents a compound name -- a name from a hierarchical name space.
class | LinkRef This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
class | Reference This class represents a reference to an object that is found outside of the naming/directory system.

Uses of Cloneable in javax.naming.directory

Subinterfaces of Cloneable in javax.naming.directory
interface | Attribute This interface represents an attribute associated with a named object.
interface | Attributes This interface represents a collection of attributes.

Classes in javax.naming.directory that implement Cloneable
class | BasicAttribute This class provides a basic implementation of the Attribute interface.
class | BasicAttributes This class provides a basic implementation of the Attributes interface.

Uses of Cloneable in javax.sound.midi

Classes in javax.sound.midi that implement Cloneable
class | MetaMessage A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
class | MidiMessage MidiMessage is the base class for MIDI messages.
class | ShortMessage A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
class | SysexMessage A SysexMessage object represents a MIDI system exclusive message.

Uses of Cloneable in javax.swing

Classes in javax.swing that implement Cloneable
class | AbstractAction This class provides default implementations for the JFC Action interface.
class | DefaultListSelectionModel Default data model for list selections.
class | GrayFilter An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.
static class | JTree.DynamicUtilTreeNode DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
protected static class | JTree.EmptySelectionModel EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
class | UIDefaults A table of defaults for Swing components.

Uses of Cloneable in javax.swing.plaf

Classes in javax.swing.plaf that implement Cloneable
class | DimensionUIResource
class | InsetsUIResource

Uses of Cloneable in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Cloneable
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
static class | BasicTextUI.BasicCaret
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.

Uses of Cloneable in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Cloneable
protected  class MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item.

Uses of Cloneable in javax.swing.text

Classes in javax.swing.text that implement Cloneable
class | DefaultCaret A default implementation of Caret.
class | DefaultEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
class | EditorKit Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
class | ElementIterator ElementIterator, as the name suggests, iteratates over the Element tree.
class | GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
class | LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
class | Segment A segment of a character array representing a fragment of text.
class | SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
class | StyledEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Uses of Cloneable in javax.swing.text.html

Classes in javax.swing.text.html that implement Cloneable
class | HTMLEditorKit The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
class | InlineView Displays the inline element styles based upon css attributes.

Uses of Cloneable in javax.swing.text.rtf

Classes in javax.swing.text.rtf that implement Cloneable
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Uses of Cloneable in javax.swing.tree

Classes in javax.swing.tree that implement Cloneable
class | DefaultMutableTreeNode A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
class | DefaultTreeSelectionModel Default implementation of TreeSelectionModel.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.lang.Comparable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.lang.Comparable

Packages that use Comparable
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Comparable in java.io

Classes in java.io that implement Comparable
class | File An abstract representation of file and directory pathnames.
class | ObjectStreamField A description of a Serializable field from a Serializable class.

Uses of Comparable in java.lang

Classes in java.lang that implement Comparable
class | Byte The Byte class is the standard wrapper for byte values.
class | Character The Character class wraps a value of the primitive type char in an object.
class | Double The Double class wraps a value of the primitive type double in an object.
class | Float The Float class wraps a value of primitive type float in an object.
class | Integer The Integer class wraps a value of the primitive type int in an object.
class | Long The Long class wraps a value of the primitive type long in an object.
class | Short The Short class is the standard wrapper for short values.
class | String The String class represents character strings.

Uses of Comparable in java.math

Classes in java.math that implement Comparable
class | BigDecimal Immutable, arbitrary-precision signed decimal numbers.
class | BigInteger Immutable arbitrary-precision integers.

Uses of Comparable in java.sql

Classes in java.sql that implement Comparable
class | Time A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
class | Timestamp A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.

Uses of Comparable in java.text

Classes in java.text that implement Comparable
 class CollationKey
A CollationKey represents a String under the rules of a specific Collator object.

Uses of Comparable in java.util

Classes in java.util that implement Comparable
 class Date
The class Date represents a specific instant in time, with millisecond precision.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.lang.Runnable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.lang.Runnable

Packages that use Runnable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Runnable in java.awt

Methods in java.awt with parameters of type Runnable
static void EventQueue.invokeLater(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.
static void EventQueue.invokeAndWait(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.

Uses of Runnable in java.awt.event

Fields in java.awt.event declared as Runnable
protected  Runnable InvocationEvent.runnable
The Runnable whose run() method will be called.

Constructors in java.awt.event with parameters of type Runnable
InvocationEvent(Object source, Runnable runnable)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationEvent(Object source, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source which will execute the runnable's run() method when dispatched.
InvocationEvent(Object source, int id, Runnable runnable, Object notifier, boolean catchExceptions)
Constructs an InvocationEvent with the specified source and ID which will execute the runnable's run() method when dispatched.

Uses of Runnable in java.awt.image.renderable

Classes in java.awt.image.renderable that implement Runnable
 class RenderableImageProducer
An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage.

Uses of Runnable in java.lang

Classes in java.lang that implement Runnable
 class Thread
A thread is a thread of execution in a program.

Constructors in java.lang with parameters of type Runnable
Thread(Runnable target)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target)
Allocates a new Thread object.
Thread(Runnable target, String name)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target, String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.

Uses of Runnable in java.util

Classes in java.util that implement Runnable
 class TimerTask
A task that can be scheduled for one-time or repeated execution by a Timer.

Uses of Runnable in javax.swing

Methods in javax.swing with parameters of type Runnable
static void SwingUtilities.invokeLater(Runnable doRun)
Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread.
static void SwingUtilities.invokeAndWait(Runnable doRun)
Causes doRun.run() to be executed synchronously on the AWT event dispatching thread.

Uses of Runnable in javax.swing.text

Classes in javax.swing.text that implement Runnable
 class AsyncBoxView.ChildState
A record representing the layout state of a child view.

Methods in javax.swing.text that return Runnable
protected  Runnable LayoutQueue.waitForWork()
Used by the worker thread to get a new task to execute

Methods in javax.swing.text with parameters of type Runnable
void | LayoutQueue.addTask(Runnable task) Add a task that is not needed immediately because the results are not believed to be visible.
void | Document.render(Runnable r) This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.
void | AbstractDocument.render(Runnable r) This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ClassCastException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ClassCastException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.ClassCastException
All Implemented Interfaces:
Serializable
public class ClassCastException
extends RuntimeException

Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:

     Object x = new Integer(0);
     System.out.println((String)x);

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ClassCastException()
Constructs a ClassCastException with no detail message.
ClassCastException(String s)
Constructs a ClassCastException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassCastException

public ClassCastException()
Constructs a ClassCastException with no detail message.

ClassCastException

public ClassCastException(String s)
Constructs a ClassCastException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassCircularityError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ClassCircularityError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.ClassCircularityError
All Implemented Interfaces:
Serializable
public class ClassCircularityError
extends LinkageError

Thrown when a circularity has been detected while initializing a class.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ClassCircularityError()
Constructs a ClassCircularityError with no detail message.
ClassCircularityError(String s)
Constructs a ClassCircularityError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassCircularityError

public ClassCircularityError()
Constructs a ClassCircularityError with no detail message.

ClassCircularityError

public ClassCircularityError(String s)
Constructs a ClassCircularityError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassFormatError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ClassFormatError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.ClassFormatError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnsupportedClassVersionError
public class ClassFormatError
extends LinkageError

Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ClassFormatError()
Constructs a ClassFormatError with no detail message.
ClassFormatError(String s)
Constructs a ClassFormatError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassFormatError

public ClassFormatError()
Constructs a ClassFormatError with no detail message.

ClassFormatError

public ClassFormatError(String s)
Constructs a ClassFormatError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassLoader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
Direct Known Subclasses:
SecureClassLoader
public abstract class ClassLoader
extends Object

The class ClassLoader is an abstract class. A class loader is an object that is responsible for loading classes. Given the name of a class, it should attempt to locate or generate data that constitutes a definition for the class. A typical strategy is to transform the name into a file name and then read a "class file" of that name from a file system.

Every Class object contains a reference to the ClassLoader that defined it.

Class objects for array classes are not created by class loaders, but are created automatically as required by the Java runtime. The class loader for an array class, as returned by Class.getClassLoader() is the same as the class loader for its element type; if the element type is a primitive type, then the array class has no class loader.

Applications implement subclasses of ClassLoader in order to extend the manner in which the Java virtual machine dynamically loads classes.

Class loaders may typically be used by security managers to indicate security domains.

The ClassLoader class uses a delegation model to search for classes and resources. Each instance of ClassLoader has an associated parent class loader. When called upon to find a class or resource, a ClassLoader instance will delegate the search for the class or resource to its parent class loader before attempting to find the class or resource itself. The virtual machine's built-in class loader, called the bootstrap class loader, does not itself have a parent but may serve as the parent of a ClassLoader instance.

Normally, the Java virtual machine loads classes from the local file system in a platform-dependent manner. For example, on UNIX systems, the virtual machine loads classes from the directory defined by the CLASSPATH environment variable.

However, some classes may not originate from a file; they may originate from other sources, such as the network, or they could be constructed by an application. The method defineClass converts an array of bytes into an instance of class Class. Instances of this newly defined class can be created using the newInstance method in class Class.

The methods and constructors of objects created by a class loader may reference other classes. To determine the class(es) referred to, the Java virtual machine calls the loadClass method of the class loader that originally created the class.

For example, an application could create a network class loader to download class files from a server. Sample code might look like:

   ClassLoader loader = new NetworkClassLoader(host, port);
   Object main = loader.loadClass("Main", true).newInstance();
      . . .

The network class loader subclass must define the methods findClass and loadClassData to load a class from the network. Once it has downloaded the bytes that make up the class, it should use the method defineClass to create a class instance. A sample implementation is:

     class NetworkClassLoader extends ClassLoader {
         String host;
         int port;

         public Class findClass(String name) {
             byte[] b = loadClassData(name);
             return defineClass(name, b, 0, b.length);
         }

         private byte[] loadClassData(String name) {
             // load the class data from the connection
              . . .
         }
     }

Since:
JDK1.0
See Also:
Class,
Class.newInstance(),
defineClass(byte[], int, int),
loadClass(java.lang.String, boolean),
resolveClass(java.lang.Class)

Constructor Summary
protected ClassLoader()
Creates a new class loader using the ClassLoader returned by the method getSystemClassLoader() as the parent class loader.
protected ClassLoader(ClassLoader parent)
Creates a new class loader using the specified parent class loader for delegation.
Method Summary
protected  Class defineClass(byte[] b, int off, int len)
Deprecated. Replaced by defineClass(java.lang.String, byte[], int, int)
protected  Class defineClass(String name, byte[] b, int off, int len)
Converts an array of bytes into an instance of class Class.
protected  Class defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
protected  Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase)
Defines a package by name in this ClassLoader.
protected  Class findClass(String name)
Finds the specified class.
protected  String findLibrary(String libname)
Returns the absolute path name of a native library.
protected  Class findLoadedClass(String name)
Finds the class with the given name if it had been previously loaded through this class loader.
protected  URL findResource(String name)
Finds the resource with the given name.
protected  Enumeration findResources(String name)
Returns an Enumeration of URLs representing all the resources with the given name.
protected  Class findSystemClass(String name)
Finds a class with the specified name, loading it if necessary.
protected  Package getPackage(String name)
Returns a Package that has been defined by this class loader or any of its ancestors.
protected  Package[] getPackages()
Returns all of the Packages defined by this class loader and its ancestors.
 ClassLoader getParent()
Returns the parent class loader for delegation.
 URL getResource(String name)
Finds the resource with the given name.
 InputStream getResourceAsStream(String name)
Returns an input stream for reading the specified resource.
 Enumeration getResources(String name)
Finds all the resources with the given name.
static ClassLoader getSystemClassLoader()
Returns the system class loader for delegation.
static URL getSystemResource(String name)
Find a resource of the specified name from the search path used to load classes.
static InputStream getSystemResourceAsStream(String name)
Open for reading, a resource of the specified name from the search path used to load classes.
static Enumeration getSystemResources(String name)
Finds all resources of the specified name from the search path used to load classes.
 Class loadClass(String name)
Loads the class with the specified name.
protected  Class loadClass(String name, boolean resolve)
Loads the class with the specified name.
protected  void resolveClass(Class c)
Links the specified class.
protected  void setSigners(Class c, Object[] signers)
Sets the signers of a class.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ClassLoader

protected ClassLoader(ClassLoader parent)
Creates a new class loader using the specified parent class loader for delegation.

If there is a security manager, its checkCreateClassLoader method is called. This may result in a security exception.

Parameters:
parent - the parent class loader
Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a new class loader.
Since:
1.2
See Also:
SecurityException, SecurityManager.checkCreateClassLoader()

ClassLoader

protected ClassLoader()
Creates a new class loader using the ClassLoader returned by the method getSystemClassLoader() as the parent class loader.

This constructor is invoked for every newly created class loader. Because the class ClassLoader is abstract, it is not possible to create a new instance of the class ClassLoader itself; however, every constructor for a subclass of ClassLoader necessarily invokes this constructor, explicitly or implicitly, directly or indirectly.

If there is a security manager, its checkCreateClassLoader method is called. This may result in a security exception.

Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a new class loader.
See Also:
SecurityException, SecurityManager.checkCreateClassLoader()
Method Detail

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Loads the class with the specified name. This method searches for classes in the same manner as the loadClass(String, boolean) method. It is called by the Java virtual machine to resolve class references. Calling this method is equivalent to calling loadClass(name, false).
Parameters:
name - the name of the class
Returns:
the resulting Class object
Throws:
ClassNotFoundException - if the class was not found

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Loads the class with the specified name. The default implementation of this method searches for classes in the following order:

  1. Call findLoadedClass(String) to check if the class has already been loaded.

  2. Call the loadClass method on the parent class loader. If the parent is null the class loader built-in to the virtual machine is used, instead.

  3. Call the findClass(String) method to find the class.

If the class was found using the above steps, and the resolve flag is true, this method will then call the resolveClass(Class) method on the resulting class object.

From the Java 2 SDK, v1.2, subclasses of ClassLoader are encouraged to override findClass(String), rather than this method.

Parameters:
name - the name of the class
resolve - if true then resolve the class
Returns:
the resulting Class object
Throws:
ClassNotFoundException - if the class could not be found

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Finds the specified class. This method should be overridden by class loader implementations that follow the new delegation model for loading classes, and will be called by the loadClass method after checking the parent class loader for the requested class. The default implementation throws ClassNotFoundException.
Parameters:
name - the name of the class
Returns:
the resulting Class object
Throws:
ClassNotFoundException - if the class could not be found
Since:
1.2

defineClass

protected final Class defineClass(byte[] b,
                                  int off,
                                  int len)
                           throws ClassFormatError
Deprecated. Replaced by defineClass(java.lang.String, byte[], int, int)

Converts an array of bytes into an instance of class Class. Before the Class can be used it must be resolved. This method is deprecated in favor of the version that takes the class name as its first argument, and is more secure.
Parameters:
b - the bytes that make up the class data. The bytes in positions off through off+len-1 should have the format of a valid class file as defined by the Java Virtual Machine Specification.
off - the start offset of the class data
len - the length of the class data
Returns:
the Class object that was created from the specified class data
Throws:
ClassFormatError - if the data did not contain a valid class
See Also:
loadClass(java.lang.String, boolean), resolveClass(java.lang.Class)

defineClass

protected final Class defineClass(String name,
                                  byte[] b,
                                  int off,
                                  int len)
                           throws ClassFormatError
Converts an array of bytes into an instance of class Class. Before the Class can be used it must be resolved.

This method assigns a default ProtectionDomain to the newly defined class. The ProtectionDomain contains the set of permissions granted when a call to Policy.getPolicy().getPermissions() is made with a Codesource of null,null. The default domain is created on the first invocation of defineClass, and re-used on subsequent calls.

To assign a specific ProtectionDomain to the class, use the defineClass method that takes a ProtectionDomain as one of its arguments.

Parameters:
name - the expected name of the class, or null if not known, using '.' and not '/' as the separator and without a trailing ".class" suffix.
b - the bytes that make up the class data. The bytes in positions off through off+len-1 should have the format of a valid class file as defined by the Java Virtual Machine Specification.
off - the start offset of the class data
len - the length of the class data
Returns:
the Class object that was created from the specified class data
Throws:
ClassFormatError - if the data did not contain a valid class
IndexOutOfBoundsException - if either off or len is negative, or if off+len is greater than b.length.
SecurityException - if an attempt is made to add this class to a package that contains classes that were signed by a different set of certificates then this class, which is unsigned.
Since:
JDK1.1
See Also:
loadClass(java.lang.String, boolean), resolveClass(java.lang.Class), ProtectionDomain, Policy, CodeSource, SecureClassLoader

defineClass

protected final Class defineClass(String name,
                                  byte[] b,
                                  int off,
                                  int len,
                                  ProtectionDomain protectionDomain)
                           throws ClassFormatError
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain. If the domain is null, then a default domain will be assigned to the class as specified in the documentation for defineClass(String,byte[],int,int). Before the class can be used it must be resolved.

The first class defined in a package determines the exact set of certificates that all subsequent classes defined in that package must contain. The set of certificates for a class is obtained from the CodeSource within the ProtectionDomain of the class. Any classes added to that package must contain the same set of certificates or a SecurityException will be thrown. Note that if the name argument is null, this check is not performed. You should always pass in the name of the class you are defining as well as the bytes. This ensures that the class you are defining is indeed the class you think it is.

The specified class name cannot begin with "java.", since all classes in the java.* packages can only be defined by the bootstrap class loader.

Parameters:
name - the name of the class
b - the class bytes
off - the start offset of the class bytes
len - the length of the class bytes
protectionDomain - the ProtectionDomain of the class
Returns:
the Class object created from the data, and optional ProtectionDomain.
Throws:
ClassFormatError - if the data did not contain a valid class
IndexOutOfBoundsException - if either off or len is negative, or if off+len is greater than b.length.
SecurityException - if an attempt is made to add this class to a package that contains classes that were signed by a different set of certificates than this class, or if the class name begins with "java.".

resolveClass

protected final void resolveClass(Class c)
Links the specified class. This (misleadingly named) method may be used by a class loader to link a class. If the class c has already been linked, then this method simply returns. Otherwise, the class is linked as described in the "Execution" chapter of the Java Language Specification.
Parameters:
c - the class to link
Throws:
NullPointerException - if c is null.
See Also:
defineClass(java.lang.String,byte[],int,int)

findSystemClass

protected final Class findSystemClass(String name)
                               throws ClassNotFoundException
Finds a class with the specified name, loading it if necessary.

Prior to the Java 2 SDK, this method loads a class from the local file system in a platform-dependent manner, and returns a class object that has no associated class loader.

Since the Java 2 SDK v1.2, this method loads the class through the system class loader(see getSystemClassLoader()). Class objects returned might have ClassLoaders associated with them. Subclasses of ClassLoader need not usually call this method, because most class loaders need to override just findClass(String).

Parameters:
name - the name of the class that is to be found
Returns:
the Class object for the specified name
Throws:
ClassNotFoundException - if the class could not be found
See Also:
ClassLoader(ClassLoader), getParent()

getParent

public final ClassLoader getParent()
Returns the parent class loader for delegation. Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class loader's parent is the bootstrap class loader.

If a security manager is present, and the caller's class loader is not null and is not an ancestor of this class loader, then this method calls the security manager's checkPermission method with a RuntimePermission("getClassLoader") permission to ensure it's ok to access the parent class loader. If not, a SecurityException will be thrown.

Returns:
the parent ClassLoader
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow access to this class loader's parent class loader.
Since:
1.2
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setSigners

protected final void setSigners(Class c,
                                Object[] signers)
Sets the signers of a class. This should be called after defining a class.
Parameters:
c - the Class object
signers - the signers for the class
Since:
JDK1.1

findLoadedClass

protected final Class findLoadedClass(String name)
Finds the class with the given name if it had been previously loaded through this class loader.
Parameters:
name - the class name
Returns:
the Class object, or null if the class has not been loaded
Since:
JDK1.1

getResource

public URL getResource(String name)
Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a "/"-separated path name that identifies the resource.

This method will first search the parent class loader for the resource; if the parent is null the path of the class loader built-in to the virtual machine is searched. That failing, this method will call findResource to find the resource.

Parameters:
name - resource name
Returns:
a URL for reading the resource, or null if the resource could not be found or the caller doesn't have adequate privileges to get the resource.
Since:
JDK1.1
See Also:
findResource(String)

getResources

public final Enumeration getResources(String name)
                               throws IOException
Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a "/"-separated path name that identifies the resource.

The search order is described in the documentation for getResource(String).

Parameters:
name - resource name
Returns:
an enumeration of URL to the resource. If no resources could be found, the enumeration will be empty. Resources that the doesn't have access to will not be in the enumeration.
Throws:
IOException - if I/O errors occur
Since:
1.2
See Also:
getResource(java.lang.String), findResources(java.lang.String)

findResources

protected Enumeration findResources(String name)
                             throws IOException
Returns an Enumeration of URLs representing all the resources with the given name. Class loader implementations should override this method to specify where to load resources from.
Parameters:
name - the resource name
Returns:
an Enumeration of URLs for the resources
Throws:
IOException - if I/O errors occur
Since:
1.2

findResource

protected URL findResource(String name)
Finds the resource with the given name. Class loader implementations should override this method to specify where to find resources.
Parameters:
name - the resource name
Returns:
a URL for reading the resource, or null if the resource could not be found
Since:
1.2

getSystemResource

public static URL getSystemResource(String name)
Find a resource of the specified name from the search path used to load classes.

In JDK1.1, the search path used is that of the virtual machine's built-in class loader.

Since the Java 2 SDK v1.2, this method locates the resource through the system class loader (see getSystemClassLoader()).

Parameters:
name - the resource name
Returns:
a URL for reading the resource, or null if the resource could not be found
Since:
JDK1.1

getSystemResources

public static Enumeration getSystemResources(String name)
                                      throws IOException
Finds all resources of the specified name from the search path used to load classes. The resources thus found are returned as an Enumeration of URL objects.

The search order is described in the documentation for getSystemResource(String).

Parameters:
name - the resource name
Returns:
an enumeration of resource URLs
Throws:
IOException - if I/O errors occur
Since:
1.2

getResourceAsStream

public InputStream getResourceAsStream(String name)
Returns an input stream for reading the specified resource. The search order is described in the documentation for getResource(String).

Parameters:
name - the resource name
Returns:
an input stream for reading the resource, or null if the resource could not be found
Since:
JDK1.1

getSystemResourceAsStream

public static InputStream getSystemResourceAsStream(String name)
Open for reading, a resource of the specified name from the search path used to load classes.

The search order is described in the documentation for getSystemResource(String).

Parameters:
name - the resource name
Returns:
an input stream for reading the resource, or null if the resource could not be found
Since:
JDK1.1

getSystemClassLoader

public static ClassLoader getSystemClassLoader()
Returns the system class loader for delegation. This is the default delegation parent for new ClassLoader instances, and is typically the class loader used to start the application.

If a security manager is present, and the caller's class loader is not null and the caller's class loader is not the same as or an ancestor of the system class loader, then this method calls the security manager's checkPermission method with a RuntimePermission("getClassLoader") permission to ensure it's ok to access the system class loader. If not, a SecurityException will be thrown.

Returns:
the system ClassLoader for delegation, or null if none
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow access to the system class loader.
Since:
1.2
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

definePackage

protected Package definePackage(String name,
                                String specTitle,
                                String specVersion,
                                String specVendor,
                                String implTitle,
                                String implVersion,
                                String implVendor,
                                URL sealBase)
                         throws IllegalArgumentException
Defines a package by name in this ClassLoader. This allows class loaders to define the packages for their classes. Packages must be created before the class is defined, and package names must be unique within a class loader and cannot be redefined or changed once created.
Parameters:
name - the package name
specTitle - the specification title
specVersion - the specification version
specVendor - the specification vendor
implTitle - the implementation title
implVersion - the implementation version
implVendor - the implementation vendor
sealBase - If not null, then this package is sealed with respect to the given code source URL. Otherwise, the package is not sealed.
Returns:
the newly defined Package object
Throws:
IllegalArgumentException - if package name duplicates an existing package either in this class loader or one of its ancestors
Since:
1.2

getPackage

protected Package getPackage(String name)
Returns a Package that has been defined by this class loader or any of its ancestors.
Parameters:
name - the package name
Returns:
the Package corresponding to the given name, or null if not found
Since:
1.2

getPackages

protected Package[] getPackages()
Returns all of the Packages defined by this class loader and its ancestors.
Returns:
the array of Package objects defined by this ClassLoader
Since:
1.2

findLibrary

protected String findLibrary(String libname)
Returns the absolute path name of a native library. The VM invokes this method to locate the native libraries that belong to classes loaded with this class loader. If this method returns null, the VM searches the library along the path specified as the java.library.path property.
Parameters:
libname - the library name
Returns:
the absolute path of the native library
Since:
1.2
See Also:
System.loadLibrary(java.lang.String), System.mapLibraryName(java.lang.String)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ClassNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.ClassNotFoundException
All Implemented Interfaces:
Serializable
public class ClassNotFoundException
extends Exception

Thrown when an application tries to load in a class through its string name using:

  • The forName method in class Class.
  • The findSystemClass method in class ClassLoader .
  • The loadClass method in class ClassLoader.

but no definition for the class with the specifed name could be found.

Since:
JDK1.0
See Also:
Class.forName(java.lang.String),
ClassLoader.findSystemClass(java.lang.String),
ClassLoader.loadClass(java.lang.String, boolean), Serialized Form

Constructor Summary
ClassNotFoundException()
Constructs a ClassNotFoundException with no detail message.
ClassNotFoundException(String s)
Constructs a ClassNotFoundException with the specified detail message.
ClassNotFoundException(String s, Throwable ex)
Constructs a ClassNotFoundException with the specified detail message and optional exception that was raised while loading the class.
Method Summary
Throwable | getException() Returns the exception that was raised if an error occurred while attempting to load the class.
void | printStackTrace() Prints the stack backtrace.
void | printStackTrace(PrintStream ps) Prints the stack backtrace to the specified print stream.
void | printStackTrace(PrintWriter pw) Prints the stack backtrace to the specified print writer.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassNotFoundException

public ClassNotFoundException()
Constructs a ClassNotFoundException with no detail message.

ClassNotFoundException

public ClassNotFoundException(String s)
Constructs a ClassNotFoundException with the specified detail message.
Parameters:
s - the detail message.

ClassNotFoundException

public ClassNotFoundException(String s,
                              Throwable ex)
Constructs a ClassNotFoundException with the specified detail message and optional exception that was raised while loading the class.
Parameters:
s - the detail message
ex - the exception that was raised while loading the class
Since:
1.2
Method Detail

getException

public Throwable getException()
Returns the exception that was raised if an error occurred while attempting to load the class. Otherwise, returns null.
Returns:
the Exception that was raised while loading a class
Since:
1.2

printStackTrace

public void printStackTrace()
Prints the stack backtrace. If an exception occurred during class loading it prints that exception's stack trace, or else prints the stack backtrace of this exception.
Overrides:
printStackTrace in class Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the stack backtrace to the specified print stream. If an exception occurred during class loading it prints that exception's stack trace, or else prints the stack backtrace of this exception.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the stack backtrace to the specified print writer. If an exception occurred during class loading it prints that exception's stack trace, or else prints the stack backtrace of this exception.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintWriter to use for output
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloneNotSupportedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class CloneNotSupportedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.CloneNotSupportedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ServerCloneException
public class CloneNotSupportedException
extends Exception

Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.

Applications that override the clone method can also throw this exception to indicate that an object could not or should not be cloned.

Since:
JDK1.0
See Also:
Cloneable, Object.clone(), Serialized Form

Constructor Summary
CloneNotSupportedException()
Constructs a CloneNotSupportedException with no detail message.
CloneNotSupportedException(String s)
Constructs a CloneNotSupportedException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CloneNotSupportedException

public CloneNotSupportedException()
Constructs a CloneNotSupportedException with no detail message.

CloneNotSupportedException

public CloneNotSupportedException(String s)
Constructs a CloneNotSupportedException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Comparable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Interface Comparable

All Known Implementing Classes:
Character, File, Long, ObjectStreamField, Short, String, Float, Integer, Byte, Double, BigInteger, BigDecimal, Date, CollationKey
public interface Comparable

This interface imposes a total ordering on the objects of each class that implements it. This ordering is referred to as the class's natural ordering, and the class's compareTo method is referred to as its natural comparison method.

Lists (and arrays) of objects that implement this interface can be sorted automatically by Collections.sort (and Arrays.sort). Objects that implement this interface can be used as keys in a sorted map or elements in a sorted set, without the need to specify a comparator.

A class's natural ordering is said to be consistent with equals if and only if (e1.compareTo((Object)e2)==0) has the same boolean value as e1.equals((Object)e2) for every e1 and e2 of class C.

It is strongly recommended (though not required) that natural orderings be consistent with equals. This is so because sorted sets (and sorted maps) without explicit comparators behave "strangely" when they are used with elements (or keys) whose natural ordering is inconsistent with equals. In particular, such a sorted set (or sorted map) violates the general contract for set (or map), which is defined in terms of the equals operation.

For example, if one adds two keys a and b such that (a.equals((Object)b) && a.compareTo((Object)b) != 0) to a sorted set that does not use an explicit comparator, the second add operation returns false (and the size of the sorted set does not increase) because a and b are equivalent from the sorted set's perspective.

Virtually all Java core classes that implement comparable have natural orderings that are consistent with equals. One exception is java.math.BigDecimal, whose natural ordering equates BigDecimals with equal values and different precisions (such as 4.0 and 4.00).

For the mathematically inclined, the relation that defines the natural ordering on a given class C is:

       {(x, y) such that x.compareTo((Object)y) <= 0}.
The quotient for this total order is:
       {(x, y) such that x.compareTo((Object)y) == 0}.
It follows immediately from the contract for compareTo that the quotient is an equivalence relation on C, and that the natural ordering is a total order on C. When we say that a class's natural ordering is consistent with equals, we mean that the quotient for the natural ordering is the equivalence relation defined by the class's equals(Object) method:
     {(x, y) such that x.equals((Object)y)}.

Since:
1.2
See Also:
Comparator, Collections.sort(java.util.List), Arrays.sort(Object[]), SortedSet, SortedMap, TreeSet, TreeMap

Method Summary
 int compareTo(Object o)
Compares this object with the specified object for order.

Method Detail

compareTo

public int compareTo(Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.

Finally, the implementer must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Compiler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Compiler

java.lang.Object
  |
  +--java.lang.Compiler
public final class Compiler
extends Object

The Compiler class is provided to support Java-to-native-code compilers and related services. By design, the Compiler class does nothing; it serves as a placeholder for a JIT compiler implementation.

When the Java Virtual Machine first starts, it determines if the system property java.compiler exists. (System properties are accessible through getProperty and , a method defined by the System class.) If so, it is assumed to be the name of a library (with a platform-dependent exact location and type); the loadLibrary method in class System is called to load that library. If this loading succeeds, the function named java_lang_Compiler_start() in that library is called.

If no compiler is available, these methods do nothing.

Since:
JDK1.0
See Also:
System.getProperty(java.lang.String),
System.getProperty(java.lang.String, java.lang.String),
System.loadLibrary(java.lang.String)

Method Summary
static Object | command(Object any) Examines the argument type and its fields and perform some documented operation.
static boolean | compileClass(Class clazz) Compiles the specified class.
static boolean | compileClasses(String string) Compiles all classes whose name matches the specified string.
static void | disable() Cause the Compiler to cease operation.
static void | enable() Cause the Compiler to resume operation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compileClass

public static boolean compileClass(Class clazz)
Compiles the specified class.
Parameters:
clazz - a class.
Returns:
true if the compilation succeeded; false if the compilation failed or no compiler is available.

compileClasses

public static boolean compileClasses(String string)
Compiles all classes whose name matches the specified string.
Parameters:
string - the name of the classes to compile.
Returns:
true if the compilation succeeded; false if the compilation failed or no compiler is available.

command

public static Object command(Object any)
Examines the argument type and its fields and perform some documented operation. No specific operations are required.
Parameters:
any - an argument.
Returns:
a compiler-specific value, or null if no compiler is available.

enable

public static void enable()
Cause the Compiler to resume operation.

disable

public static void disable()
Cause the Compiler to cease operation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Double

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Double

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Double
All Implemented Interfaces:
Comparable, Serializable
public final class Double
extends Number
implements Comparable

The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.

In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static double | MAX_VALUE The largest positive finite value of type double.
static double | MIN_VALUE The smallest positive value of type double.
static double | NaN A Not-a-Number (NaN) value of type double.
static double | NEGATIVE_INFINITY The negative infinity of type double.
static double | POSITIVE_INFINITY The positive infinity of type double.
static Class | TYPE The Class object representing the primitive type double.
Constructor Summary
Double(double value)
Constructs a newly allocated Double object that represents the primitive double argument.
Double(String s)
Constructs a newly allocated Double object that represents the floating- point value of type double represented by the string.
Method Summary
byte | byteValue() Returns the value of this Double as a byte (by casting to a byte).
int | compareTo(Double anotherDouble) Compares two Doubles numerically.
int | compareTo(Object o) Compares this Double to another Object.
static long | doubleToLongBits(double value) Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
static long | doubleToRawLongBits(double value) Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
double | doubleValue() Returns the double value of this Double.
boolean | equals(Object obj) Compares this object against the specified object.
float | floatValue() Returns the float value of this Double.
int | hashCode() Returns a hashcode for this Double object.
int | intValue() Returns the integer value of this Double (by casting to an int).
boolean | isInfinite() Returns true if this Double value is infinitely large in magnitude.
static boolean | isInfinite(double v) Returns true if the specified number is infinitely large in magnitude.
boolean | isNaN() Returns true if this Double value is the special Not-a-Number (NaN) value.
static boolean | isNaN(double v) Returns true if the specified number is the special Not-a-Number (NaN) value.
static double | longBitsToDouble(long bits) Returns the double-float corresponding to a given bit represention.
long | longValue() Returns the long value of this Double (by casting to a long).
static double | parseDouble(String s) Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
short | shortValue() Returns the value of this Double as a short (by casting to a short).
String | toString() Returns a String representation of this Double object.
static String | toString(double d) Creates a string representation of the double argument.
static Double | valueOf(String s) Returns a new Double object initialized to the value represented by the specified string.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

POSITIVE_INFINITY

public static final double POSITIVE_INFINITY
The positive infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff0000000000000L).

NEGATIVE_INFINITY

public static final double NEGATIVE_INFINITY
The negative infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0xfff0000000000000L).

NaN

public static final double NaN
A Not-a-Number (NaN) value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff8000000000000L).

MAX_VALUE

public static final double MAX_VALUE
The largest positive finite value of type double. It is equal to the returned by:
 Double.longBitsToDouble(0x7fefffffffffffffL)

MIN_VALUE

public static final double MIN_VALUE
The smallest positive value of type double. It is equal to the value returned by Double.longBitsToDouble(0x1L).

TYPE

public static final Class TYPE
The Class object representing the primitive type double.
Since:
JDK1.1
Constructor Detail

Double

public Double(double value)
Constructs a newly allocated Double object that represents the primitive double argument.
Parameters:
value - the value to be represented by the Double.

Double

public Double(String s)
       throws NumberFormatException
Constructs a newly allocated Double object that represents the floating- point value of type double represented by the string. The string is converted to a double value as if by the valueOf method.
Parameters:
s - a string to be converted to a Double.
Throws:
NumberFormatException - if the string does not contain a parsable number.
See Also:
valueOf(java.lang.String)
Method Detail

toString

public static String toString(double d)
Creates a string representation of the double argument. All characters mentioned below are ASCII characters.
  • If the argument is NaN, the result is the string "NaN".
  • Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude m:
  • If m is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity".
  • If m is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0".
  • If m is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of m, in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of m.
  • If m is less than 10-3 or not less than 107, then it is represented in so-called "computerized scientific notation." Let n be the unique integer such that 10n<=m<10n+1; then let a be the mathematically exact quotient of m and 10n so that 1<=a<10. The magnitude is then represented as the integer part of a, as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of a, followed by the letter 'E' (E), followed by a representation of n as a decimal integer, as produced by the method Integer.toString(int).

How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type double. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument d. Then d must be the double value nearest to x; or if two double values are equally close to x, then d must be one of them and the least significant bit of the significand of d must be 0.

Parameters:
d - the double to be converted.
Returns:
a string representation of the argument.

valueOf

public static Double valueOf(String s)
                      throws NumberFormatException
Returns a new Double object initialized to the value represented by the specified string. The string s is interpreted as the representation of a floating-point value and a Double object representing that value is created and returned.

If s is null, then a NullPointerException is thrown.

Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical rule:

 FloatValue:

        Signopt FloatingPointLiteral
where Sign and FloatingPointLiteral are as defined in §3.10.2 of the Java Language Specification. If it does not have the form of a FloatValue, then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type double by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic. Finally, a new object of class Double is created to represent the double value.
Parameters:
s - the string to be parsed.
Returns:
a newly constructed Double initialized to the value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable number.

parseDouble

public static double parseDouble(String s)
                          throws NumberFormatException
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
Parameters:
s - the string to be parsed.
Returns:
the double value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable double.
Since:
1.2
See Also:
valueOf(String)

isNaN

public static boolean isNaN(double v)
Returns true if the specified number is the special Not-a-Number (NaN) value.
Parameters:
v - the value to be tested.
Returns:
true if the value of the argument is NaN; false otherwise.

isInfinite

public static boolean isInfinite(double v)
Returns true if the specified number is infinitely large in magnitude.
Parameters:
v - the value to be tested.
Returns:
true if the value of the argument is positive infinity or negative infinity; false otherwise.

isNaN

public boolean isNaN()
Returns true if this Double value is the special Not-a-Number (NaN) value.
Returns:
true if the value represented by this object is NaN; false otherwise.

isInfinite

public boolean isInfinite()
Returns true if this Double value is infinitely large in magnitude.
Returns:
true if the value represented by this object is positive infinity or negative infinity; false otherwise.

toString

public String toString()
Returns a String representation of this Double object. The primitive double value represented by this object is converted to a string exactly as if by the method toString of one argument.
Overrides:
toString in class Object
Returns:
a String representation of this object.
See Also:
toString(double)

byteValue

public byte byteValue()
Returns the value of this Double as a byte (by casting to a byte).
Overrides:
byteValue in class Number
Since:
JDK1.1

shortValue

public short shortValue()
Returns the value of this Double as a short (by casting to a short).
Overrides:
shortValue in class Number
Since:
JDK1.1

intValue

public int intValue()
Returns the integer value of this Double (by casting to an int).
Overrides:
intValue in class Number
Returns:
the double value represented by this object is converted to type int and the result of the conversion is returned.

longValue

public long longValue()
Returns the long value of this Double (by casting to a long).
Overrides:
longValue in class Number
Returns:
the double value represented by this object is converted to type long and the result of the conversion is returned.

floatValue

public float floatValue()
Returns the float value of this Double.
Overrides:
floatValue in class Number
Returns:
the double value represented by this object is converted to type float and the result of the conversion is returned.
Since:
JDK1.0

doubleValue

public double doubleValue()
Returns the double value of this Double.
Overrides:
doubleValue in class Number
Returns:
the double value represented by this object.

hashCode

public int hashCode()
Returns a hashcode for this Double object. The result is the exclusive OR of the two halves of the long integer bit representation, exactly as produced by the method doubleToLongBits(double), of the primitive double value represented by this Double object. That is, the hashcode is the value of the expression:
 (int)(v^(v>>>32))
where v is defined by:
 long v = Double.doubleToLongBits(this.doubleValue());
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Double object that represents a double that has the identical bit pattern to the bit pattern of the double represented by this object. For this purpose, two double values are considered to be the same if and only if the method doubleToLongBits(double) returns the same long value when applied to each.

Note that in most cases, for two instances of class Double, d1 and d2, the value of d1.equals(d2) is true if and only if

   d1.doubleValue() == d2.doubleValue()

also has the value true. However, there are two exceptions:

  • If d1 and d2 both represent Double.NaN, then the equals method returns true, even though Double.NaN==Double.NaN has the value false.
  • If d1 represents +0.0 while d2 represents -0.0, or vice versa, the equal test has the value false, even though +0.0==-0.0 has the value true. This allows hashtables to operate properly.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

doubleToLongBits

public static long doubleToLongBits(double value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

Bit 63 (the bit that is selected by the mask 0x8000000000000000L) represents the sign of the floating-point number. Bits 62-52 (the bits that are selected by the mask 0x7ff0000000000000L) represent the exponent. Bits 51-0 (the bits that are selected by the mask 0x000fffffffffffffL) represent the significand (sometimes called the mantissa) of the floating-point number.

If the argument is positive infinity, the result is 0x7ff0000000000000L.

If the argument is negative infinity, the result is 0xfff0000000000000L.

If the argument is NaN, the result is 0x7ff8000000000000L.

In all cases, the result is a long integer that, when given to the longBitsToDouble(long) method, will produce a floating-point value equal to the argument to doubleToLongBits.

Parameters:
value - a double precision floating-point number.
Returns:
the bits that represent the floating-point number.

doubleToRawLongBits

public static long doubleToRawLongBits(double value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

Bit 63 (the bit that is selected by the mask 0x8000000000000000L) represents the sign of the floating-point number. Bits 62-52 (the bits that are selected by the mask 0x7ff0000000000000L) represent the exponent. Bits 51-0 (the bits that are selected by the mask 0x000fffffffffffffL) represent the significand (sometimes called the mantissa) of the floating-point number.

If the argument is positive infinity, the result is 0x7ff0000000000000L.

If the argument is negative infinity, the result is 0xfff0000000000000L.

If the argument is NaN, the result is the long integer representing the actual NaN value. Unlike the doubleToLongBits method, doubleToRawLongBits does not collapse NaN values.

In all cases, the result is a long integer that, when given to the longBitsToDouble(long) method, will produce a floating-point value equal to the argument to doubleToRawLongBits.

Parameters:
value - a double precision floating-point number.
Returns:
the bits that represent the floating-point number.

longBitsToDouble

public static double longBitsToDouble(long bits)
Returns the double-float corresponding to a given bit represention. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "double precision" bit layout. That floating-point value is returned as the result.

If the argument is 0x7ff0000000000000L, the result is positive infinity.

If the argument is 0xfff0000000000000L, the result is negative infinity.

If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result is NaN. All IEEE 754 NaN values of type double are, in effect, lumped together by the Java programming language into a single value called NaN. Distinct values of NaN are only accessible by use of the Double.doubleToRawLongBits method.

In all other cases, let s, e, and m be three values that can be computed from the argument:

 int s = ((bits >> 63) == 0) ? 1 : -1;
 int e = (int)((bits >> 52) & 0x7ffL);
 long m = (e == 0) ?
                 (bits & 0xfffffffffffffL) << 1 :
                 (bits & 0xfffffffffffffL) | 0x10000000000000L;
Then the floating-point result equals the value of the mathematical expression s·m·2e-1075.
Parameters:
bits - any long integer.
Returns:
the double floating-point value with the same bit pattern.

compareTo

public int compareTo(Double anotherDouble)
Compares two Doubles numerically. There are two ways in which comparisons performed by this method differ from those performed by the Java language numerical comparison operators (<, <=, ==, >= >) when applied to primitive doubles:
  • Double.NaN is considered by this method to be equal to itself and greater than all other double values (including Double.POSITIVE_INFINITY).
  • 0.0d is considered by this method to be greater than -0.0d.
This ensures that Double.compareTo(Object) (which inherits its behavior from this method) obeys the general contract for Comparable.compareTo, and that the natural order on Doubles is total.
Parameters:
anotherDouble - the Double to be compared.
Returns:
the value 0 if anotherDouble is numerically equal to this Double; a value less than 0 if this Double is numerically less than anotherDouble; and a value greater than 0 if this Double is numerically greater than anotherDouble.
Since:
1.2
See Also:
Comparable.compareTo(Object)

compareTo

public int compareTo(Object o)
Compares this Double to another Object. If the Object is a Double, this function behaves like compareTo(Double). Otherwise, it throws a ClassCastException (as Doubles are comparable only to other Doubles).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Double numerically equal to this Double; a value less than 0 if the argument is a Double numerically greater than this Double; and a value greater than 0 if the argument is a Double numerically less than this Double.
Throws:
ClassCastException - if the argument is not a Double.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Error

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Error

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AWTError, LinkageError, ThreadDeath, VirtualMachineError
public class Error
extends Throwable

An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.

A method is not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method but not caught, since these errors are abnormal conditions that should never occur.

Since:
JDK1.0
See Also:
ThreadDeath, Serialized Form

Constructor Summary
Error()
Constructs an Error with no specified detail message.
Error(String s)
Constructs an Error with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Error

public Error()
Constructs an Error with no specified detail message.

Error

public Error(String s)
Constructs an Error with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Exception

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Exception

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AclNotFoundException, ActivationException, AlreadyBoundException, ApplicationException, AWTException, BadLocationException, ClassNotFoundException, CloneNotSupportedException, DataFormatException, ExpandVetoException, FontFormatException, GeneralSecurityException, IllegalAccessException, InstantiationException, InterruptedException, IntrospectionException, InvalidMidiDataException, InvocationTargetException, IOException, LastOwnerException, LineUnavailableException, MidiUnavailableException, MimeTypeParseException, NamingException, NoninvertibleTransformException, NoSuchFieldException, NoSuchMethodException, NotBoundException, NotOwnerException, ParseException, PrinterException, PrivilegedActionException, PropertyVetoException, RemarshalException, RuntimeException, ServerNotActiveException, SQLException, TooManyListenersException, UnsupportedAudioFileException, UnsupportedFlavorException, UnsupportedLookAndFeelException, UserException
public class Exception
extends Throwable

The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.

Since:
JDK1.0
See Also:
Error, Serialized Form

Constructor Summary
Exception()
Constructs an Exception with no specified detail message.
Exception(String s)
Constructs an Exception with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Exception

public Exception()
Constructs an Exception with no specified detail message.

Exception

public Exception(String s)
Constructs an Exception with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ExceptionInInitializerError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ExceptionInInitializerError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.ExceptionInInitializerError
All Implemented Interfaces:
Serializable
public class ExceptionInInitializerError
extends LinkageError

Signals that an unexpected exception has occurred in a static initializer. An ExceptionInInitializerError is thrown to indicate that an exception occurred during evaluation of a static initializer or the initializer for a static variable.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
ExceptionInInitializerError()
Constructs an ExceptionInInitializerError with null as its detail message string and with no saved thowable object.
ExceptionInInitializerError(String s)
Constructs an ExceptionInInitializerError with the specified detail message string.
ExceptionInInitializerError(Throwable thrown)
Constructs a new ExceptionInInitializerError class by saving a reference to the Throwable object thrown for later retrieval by the getException() method.
Method Summary
Throwable | getException() Returns the exception that occurred during a static initialization that caused this Error to be created.
void | printStackTrace() Prints the stack trace of the exception that occurred.
void | printStackTrace(PrintStream ps) Prints the stack trace of the exception that occurred to the specified print stream.
void | printStackTrace(PrintWriter pw) Prints the stack trace of the exception that occurred to the specified print writer.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ExceptionInInitializerError

public ExceptionInInitializerError()
Constructs an ExceptionInInitializerError with null as its detail message string and with no saved thowable object. A detail message is a String that describes this particular exception.

ExceptionInInitializerError

public ExceptionInInitializerError(Throwable thrown)
Constructs a new ExceptionInInitializerError class by saving a reference to the Throwable object thrown for later retrieval by the getException() method. The detail message string is set to null.
Parameters:
thrown - The exception thrown

ExceptionInInitializerError

public ExceptionInInitializerError(String s)
Constructs an ExceptionInInitializerError with the specified detail message string. A detail message is a String that describes this particular exception. The detail message string is saved for later retrieval by the Throwable.getMessage() method. There is no saved throwable object.
Parameters:
s - the detail message
Method Detail

getException

public Throwable getException()
Returns the exception that occurred during a static initialization that caused this Error to be created.
Returns:
the saved throwable object of this ExceptionInInitializerError, or null if this ExceptionInInitializerError has no saved throwable object.

printStackTrace

public void printStackTrace()
Prints the stack trace of the exception that occurred.
Overrides:
printStackTrace in class Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the stack trace of the exception that occurred to the specified print stream.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the stack trace of the exception that occurred to the specified print writer.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintWriter to use for output
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Float

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Float

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Float
All Implemented Interfaces:
Comparable, Serializable
public final class Float
extends Number
implements Comparable

The Float class wraps a value of primitive type float in an object. An object of type Float contains a single field whose type is float.

In addition, this class provides several methods for converting a float to a String and a String to a float, as well as other constants and methods useful when dealing with a float.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static float | MAX_VALUE The largest positive value of type float.
static float | MIN_VALUE The smallest positive value of type float.
static float | NaN The Not-a-Number (NaN) value of type float.
static float | NEGATIVE_INFINITY The negative infinity of type float.
static float | POSITIVE_INFINITY The positive infinity of type float.
static Class | TYPE The Class object representing the primitive type float.
Constructor Summary
Float(double value)
Constructs a newly allocated Floatobject that represents the argument converted to type float.
Float(float value)
Constructs a newly allocated Float object that represents the primitive float argument.
Float(String s)
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.
Method Summary
byte | byteValue() Returns the value of this Float as a byte (by casting to a byte).
int | compareTo(Float anotherFloat) Compares two Floats numerically.
int | compareTo(Object o) Compares this Float to another Object.
double | doubleValue() Returns the double value of this Float object.
boolean | equals(Object obj) Compares this object against some other object.
static int | floatToIntBits(float value) Returns the bit represention of a single-float value.
static int | floatToRawIntBits(float value) Returns the bit represention of a single-float value.
float | floatValue() Returns the float value of this Float object.
int | hashCode() Returns a hashcode for this Float object.
static float | intBitsToFloat(int bits) Returns the single-float corresponding to a given bit represention.
int | intValue() Returns the integer value of this Float (by casting to an int).
boolean | isInfinite() Returns true if this Float value is infinitely large in magnitude.
static boolean | isInfinite(float v) Returns true if the specified number is infinitely large in magnitude.
boolean | isNaN() Returns true if this Float value is Not-a-Number (NaN).
static boolean | isNaN(float v) Returns true if the specified number is the special Not-a-Number (NaN) value.
long | longValue() Returns the long value of this Float (by casting to a long).
static float | parseFloat(String s) Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
short | shortValue() Returns the value of this Float as a short (by casting to a short).
String | toString() Returns a String representation of this Float object.
static String | toString(float f) Returns a String representation for the specified float value.
static Float | valueOf(String s) Returns the floating point value represented by the specified String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

POSITIVE_INFINITY

public static final float POSITIVE_INFINITY
The positive infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f800000).

NEGATIVE_INFINITY

public static final float NEGATIVE_INFINITY
The negative infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0xff800000).

NaN

public static final float NaN
The Not-a-Number (NaN) value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7fc00000).

MAX_VALUE

public static final float MAX_VALUE
The largest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f7fffff).

MIN_VALUE

public static final float MIN_VALUE
The smallest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x1).

TYPE

public static final Class TYPE
The Class object representing the primitive type float.
Since:
JDK1.1
Constructor Detail

Float

public Float(float value)
Constructs a newly allocated Float object that represents the primitive float argument.
Parameters:
value - the value to be represented by the Float.

Float

public Float(double value)
Constructs a newly allocated Floatobject that represents the argument converted to type float.
Parameters:
value - the value to be represented by the Float.

Float

public Float(String s)
      throws NumberFormatException
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string. The string is converted to a float value as if by the valueOf method.
Parameters:
s - a string to be converted to a Float.
Throws:
NumberFormatException - if the string does not contain a parsable number.
See Also:
valueOf(java.lang.String)
Method Detail

toString

public static String toString(float f)
Returns a String representation for the specified float value. The argument is converted to a readable string format as follows. All characters and characters in strings mentioned below are ASCII characters.
  • If the argument is NaN, the result is the string "NaN".
  • Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude m:
    • If m is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity".
    • If m is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0".
    • If m is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of m, in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of m.
    • If m is less than 10-37, then it is represented in so-called "computerized scientific notation." Let n be the unique integer such that 10n<=m<1; then let a be the mathematically exact quotient of m and 10n so that 1<a<10. The magnitude is then represented as the integer part of a, as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of a, followed by the letter 'E' (E), followed by a representation of n as a decimal integer, as produced by the method Integer.toString(int) of one argument.
    How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type float. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument f. Then f must be the float value nearest to x; or, if two float values are equally close to xthen f must be one of them and the least significant bit of the significand of f must be 0.
    Parameters:
    f - the float to be converted.
    Returns:
    a string representation of the argument.

valueOf

public static Float valueOf(String s)
                     throws NumberFormatException
Returns the floating point value represented by the specified String. The string s is interpreted as the representation of a floating-point value and a Float object representing that value is created and returned.

If s is null, then a NullPointerException is thrown.

Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical syntax rules:

 FloatValue:

          Signopt FloatingPointLiteral
where Sign, FloatingPointLiteral are as defined in §3.10.2 of the Java Language Specification. If it does not have the form of a FloatValue, then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type float by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic.
Parameters:
s - the string to be parsed.
Returns:
a newly constructed Float initialized to the value represented by the String argument.
Throws:
NumberFormatException - if the string does not contain a parsable number.

parseFloat

public static float parseFloat(String s)
                        throws NumberFormatException
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
Parameters:
s - the string to be parsed.
Returns:
the float value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable float.
Since:
1.2
See Also:
Double.valueOf(String)

isNaN

public static boolean isNaN(float v)
Returns true if the specified number is the special Not-a-Number (NaN) value.
Parameters:
v - the value to be tested.
Returns:
true if the argument is NaN; false otherwise.

isInfinite

public static boolean isInfinite(float v)
Returns true if the specified number is infinitely large in magnitude.
Parameters:
v - the value to be tested.
Returns:
true if the argument is positive infinity or negative infinity; false otherwise.

isNaN

public boolean isNaN()
Returns true if this Float value is Not-a-Number (NaN).
Returns:
true if the value represented by this object is NaN; false otherwise.

isInfinite

public boolean isInfinite()
Returns true if this Float value is infinitely large in magnitude.
Returns:
true if the value represented by this object is positive infinity or negative infinity; false otherwise.

toString

public String toString()
Returns a String representation of this Float object. The primitive float value represented by this object is converted to a String exactly as if by the method toString of one argument.
Overrides:
toString in class Object
Returns:
a String representation of this object.
See Also:
toString(float)

byteValue

public byte byteValue()
Returns the value of this Float as a byte (by casting to a byte).
Overrides:
byteValue in class Number
Since:
JDK1.1

shortValue

public short shortValue()
Returns the value of this Float as a short (by casting to a short).
Overrides:
shortValue in class Number
Since:
JDK1.1

intValue

public int intValue()
Returns the integer value of this Float (by casting to an int).
Overrides:
intValue in class Number
Returns:
the float value represented by this object converted to type int and the result of the conversion is returned.

longValue

public long longValue()
Returns the long value of this Float (by casting to a long).
Overrides:
longValue in class Number
Returns:
the float value represented by this object is converted to type long and the result of the conversion is returned.

floatValue

public float floatValue()
Returns the float value of this Float object.
Overrides:
floatValue in class Number
Returns:
the float value represented by this object.

doubleValue

public double doubleValue()
Returns the double value of this Float object.
Overrides:
doubleValue in class Number
Returns:
the float value represented by this object is converted to type double and the result of the conversion is returned.

hashCode

public int hashCode()
Returns a hashcode for this Float object. The result is the integer bit representation, exactly as produced by the method floatToIntBits(float), of the primitive float value represented by this Float object.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Compares this object against some other object. The result is true if and only if the argument is not null and is a Float object that represents a float that has the identical bit pattern to the bit pattern of the float represented by this object. For this purpose, two float values are considered to be the same if and only if the method floatToIntBits(float) returns the same int value when applied to each.

Note that in most cases, for two instances of class Float, f1 and f2, the value of f1.equals(f2) is true if and only if

   f1.floatValue() == f2.floatValue()

also has the value true. However, there are two exceptions:

  • If f1 and f2 both represent Float.NaN, then the equals method returns true, even though Float.NaN==Float.NaN has the value false.
  • If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false, even though 0.0f==-0.0f has the value true.
This definition allows hashtables to operate properly.
Overrides:
equals in class Object
Parameters:
obj - the object to be compared
Returns:
true if the objects are the same; false otherwise.
See Also:
floatToIntBits(float)

floatToIntBits

public static int floatToIntBits(float value)
Returns the bit represention of a single-float value. The result is a representation of the floating-point argument according to the IEEE 754 floating-point "single precision" bit layout.
  • Bit 31 (the bit that is selected by the mask 0x80000000) represents the sign of the floating-point number.
  • Bits 30-23 (the bits that are selected by the mask 0x7f800000) represent the exponent.
  • Bits 22-0 (the bits that are selected by the mask 0x007fffff) represent the significand (sometimes called the mantissa) of the floating-point number.
  • If the argument is positive infinity, the result is 0x7f800000.
  • If the argument is negative infinity, the result is 0xff800000.
  • If the argument is NaN, the result is 0x7fc00000.
In all cases, the result is an integer that, when given to the intBitsToFloat(int) method, will produce a floating-point value equal to the argument to floatToIntBits.
Parameters:
value - a floating-point number.
Returns:
the bits that represent the floating-point number.

floatToRawIntBits

public static int floatToRawIntBits(float value)
Returns the bit represention of a single-float value. The result is a representation of the floating-point argument according to the IEEE 754 floating-point "single precision" bit layout.
  • Bit 31 (the bit that is selected by the mask 0x80000000) represents the sign of the floating-point number.
  • Bits 30-23 (the bits that are selected by the mask 0x7f800000) represent the exponent.
  • Bits 22-0 (the bits that are selected by the mask 0x007fffff) represent the significand (sometimes called the mantissa) of the floating-point number.
  • If the argument is positive infinity, the result is 0x7f800000.
  • If the argument is negative infinity, the result is 0xff800000.

    If the argument is NaN, the result is the integer representing the actual NaN value. Unlike the floatToIntBits method, intToRawIntBits does not collapse NaN values.

In all cases, the result is an integer that, when given to the intBitsToFloat(int) method, will produce a floating-point value equal to the argument to floatToRawIntBits.
Parameters:
value - a floating-point number.
Returns:
the bits that represent the floating-point number.

intBitsToFloat

public static float intBitsToFloat(int bits)
Returns the single-float corresponding to a given bit represention. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "single precision" bit layout.

If the argument is 0x7f800000, the result is positive infinity.

If the argument is 0xff800000, the result is negative infinity.

If the argument is any value in the range 0x7f800001 through 0x7fffffff or in the range 0xff800001 through 0xffffffff, the result is NaN. All IEEE 754 NaN values of type float are, in effect, lumped together by the Java programming language into a single float value called NaN. Distinct values of NaN are only accessible by use of the Float.floatToRawIntBits method.

In all other cases, let s, e, and m be three values that can be computed from the argument:

 int s = ((bits >> 31) == 0) ? 1 : -1;
 int e = ((bits >> 23) & 0xff);
 int m = (e == 0) ?
                 (bits & 0x7fffff) << 1 :
                 (bits & 0x7fffff) | 0x800000;
Then the floating-point result equals the value of the mathematical expression s·m·2e-150.
Parameters:
bits - an integer.
Returns:
the single-format floating-point value with the same bit pattern.

compareTo

public int compareTo(Float anotherFloat)
Compares two Floats numerically. There are two ways in which comparisons performed by this method differ from those performed by the Java language numerical comparison operators (<, <=, ==, >= >) when applied to primitive floats:
  • Float.NaN is considered by this method to be equal to itself and greater than all other float values (including Float.POSITIVE_INFINITY).
  • 0.0f is considered by this method to be greater than -0.0f.
This ensures that Float.compareTo(Object) (which inherits its behavior from this method) obeys the general contract for Comparable.compareTo, and that the natural order on Floats is total.
Parameters:
anotherFloat - the Float to be compared.
Returns:
the value 0 if anotherFloat is numerically equal to this Float; a value less than 0 if this Float is numerically less than anotherFloat; and a value greater than 0 if this Float is numerically greater than anotherFloat.
Since:
1.2
See Also:
Comparable.compareTo(Object)

compareTo

public int compareTo(Object o)
Compares this Float to another Object. If the Object is a Float, this function behaves like compareTo(Float). Otherwise, it throws a ClassCastException (as Floats are comparable only to other Floats).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Float numerically equal to this Float; a value less than 0 if the argument is a Float numerically greater than this Float; and a value greater than 0 if the argument is a Float numerically less than this Float.
Throws:
ClassCastException - if the argument is not a Float.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalAccessError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalAccessError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
                          |
                          +--java.lang.IllegalAccessError
All Implemented Interfaces:
Serializable
public class IllegalAccessError
extends IncompatibleClassChangeError

Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
IllegalAccessError()
Constructs an IllegalAccessError with no detail message.
IllegalAccessError(String s)
Constructs an IllegalAccessError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalAccessError

public IllegalAccessError()
Constructs an IllegalAccessError with no detail message.

IllegalAccessError

public IllegalAccessError(String s)
Constructs an IllegalAccessError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalAccessException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalAccessException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.IllegalAccessException
All Implemented Interfaces:
Serializable
public class IllegalAccessException
extends Exception

Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.

An instance of this class can also be thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the current method does not have access to the appropriate zero-argument constructor.

Since:
JDK1.0
See Also:
Class.forName(java.lang.String),
Class.newInstance(),
ClassLoader.findSystemClass(java.lang.String),
ClassLoader.loadClass(java.lang.String, boolean), Serialized Form

Constructor Summary
IllegalAccessException()
Constructs an IllegalAccessException without a detail message.
IllegalAccessException(String s)
Constructs an IllegalAccessException with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalAccessException

public IllegalAccessException()
Constructs an IllegalAccessException without a detail message.

IllegalAccessException

public IllegalAccessException(String s)
Constructs an IllegalAccessException with a detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalArgumentException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalArgumentException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalThreadStateException, InvalidParameterException, NumberFormatException
public class IllegalArgumentException
extends RuntimeException

Thrown to indicate that a method has been passed an illegal or inappropriate argument.

Since:
JDK1.0
See Also:
Thread.setPriority(int), Serialized Form

Constructor Summary
IllegalArgumentException()
Constructs an IllegalArgumentException with no detail message.
IllegalArgumentException(String s)
Constructs an IllegalArgumentException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalArgumentException

public IllegalArgumentException()
Constructs an IllegalArgumentException with no detail message.

IllegalArgumentException

public IllegalArgumentException(String s)
Constructs an IllegalArgumentException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalMonitorStateException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalMonitorStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalMonitorStateException
All Implemented Interfaces:
Serializable
public class IllegalMonitorStateException
extends RuntimeException

Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.

Since:
JDK1.0
See Also:
Object.notify(),
Object.notifyAll(),
Object.wait(),
Object.wait(long),
Object.wait(long, int), Serialized Form

Constructor Summary
IllegalMonitorStateException()
Constructs an IllegalMonitorStateException with no detail message.
IllegalMonitorStateException(String s)
Constructs an IllegalMonitorStateException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalMonitorStateException

public IllegalMonitorStateException()
Constructs an IllegalMonitorStateException with no detail message.

IllegalMonitorStateException

public IllegalMonitorStateException(String s)
Constructs an IllegalMonitorStateException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalStateException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalStateException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalComponentStateException, InvalidDnDOperationException
public class IllegalStateException
extends RuntimeException

Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
IllegalStateException()
Constructs an IllegalStateException with no detail message.
IllegalStateException(String s)
Constructs an IllegalStateException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalStateException

public IllegalStateException()
Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.

IllegalStateException

public IllegalStateException(String s)
Constructs an IllegalStateException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
s - the String that contains a detailed message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalThreadStateException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IllegalThreadStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
                          |
                          +--java.lang.IllegalThreadStateException
All Implemented Interfaces:
Serializable
public class IllegalThreadStateException
extends IllegalArgumentException

Thrown to indicate that a thread is not in an appropriate state for the requested operation. See, for example, the suspend and resume methods in class Thread.

Since:
JDK1.0
See Also:
Thread.resume(), Thread.suspend(), Serialized Form

Constructor Summary
IllegalThreadStateException()
Constructs an IllegalThreadStateException with no detail message.
IllegalThreadStateException(String s)
Constructs an IllegalThreadStateException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalThreadStateException

public IllegalThreadStateException()
Constructs an IllegalThreadStateException with no detail message.

IllegalThreadStateException

public IllegalThreadStateException(String s)
Constructs an IllegalThreadStateException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IncompatibleClassChangeError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IncompatibleClassChangeError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractMethodError, IllegalAccessError, InstantiationError, NoSuchFieldError, NoSuchMethodError
public class IncompatibleClassChangeError
extends LinkageError

Thrown when an incompatible class change has occurred to some class definition. The definition of some class, on which the currently executing method depends, has since changed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
IncompatibleClassChangeError()
Constructs an IncompatibleClassChangeError with no detail message.
IncompatibleClassChangeError(String s)
Constructs an IncompatibleClassChangeError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IncompatibleClassChangeError

public IncompatibleClassChangeError()
Constructs an IncompatibleClassChangeError with no detail message.

IncompatibleClassChangeError

public IncompatibleClassChangeError(String s)
Constructs an IncompatibleClassChangeError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexOutOfBoundsException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class IndexOutOfBoundsException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IndexOutOfBoundsException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArrayIndexOutOfBoundsException, StringIndexOutOfBoundsException
public class IndexOutOfBoundsException
extends RuntimeException

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.

Applications can subclass this class to indicate similar exceptions.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
IndexOutOfBoundsException()
Constructs an IndexOutOfBoundsException with no detail message.
IndexOutOfBoundsException(String s)
Constructs an IndexOutOfBoundsException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexOutOfBoundsException

public IndexOutOfBoundsException()
Constructs an IndexOutOfBoundsException with no detail message.

IndexOutOfBoundsException

public IndexOutOfBoundsException(String s)
Constructs an IndexOutOfBoundsException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InheritableThreadLocal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class InheritableThreadLocal

java.lang.Object
  |
  +--java.lang.ThreadLocal
        |
        +--java.lang.InheritableThreadLocal
public class InheritableThreadLocal
extends ThreadLocal

This class extends ThreadLocal to provide inheritance of values from parent Thread to child Thread: when a child thread is created, the child receives initial values for all InheritableThreadLocals for which the parent has values. Normally the child's values will be identical to the parent's; however, the child's value can be made an arbitrary function of the parent's by overriding the childValue method in this class.

InheritableThreadLocal variables are used in preference to ordinary ThreadLocal variables when the per-thread-attribute being maintained in the variable (e.g., User ID, Transaction ID) must be automatically transmitted to any child threads that are created.

Since:
1.2
See Also:
ThreadLocal

Constructor Summary
InheritableThreadLocal()
Creates an InheritableThreadLocal variable.
Method Summary
protected Object | childValue(Object parentValue) Computes the child's initial value for this InheritableThreadLocal as a function of the parent's value at the time the child Thread is created.
Object | get() Returns the value in the calling thread's copy of this ThreadLocal variable.
void | set(Object value) Sets the calling thread's instance of this ThreadLocal variable to the given value.
Methods inherited from class java.lang.ThreadLocal
initialValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InheritableThreadLocal

public InheritableThreadLocal()
Creates an InheritableThreadLocal variable.
Method Detail

get

public Object get()
Returns the value in the calling thread's copy of this ThreadLocal variable. Creates and initializes the copy if this is the first time the thread has called this method.
Overrides:
get in class ThreadLocal
Following copied from class: java.lang.ThreadLocal
Returns:
the value of this ThreadLocal

set

public void set(Object value)
Sets the calling thread's instance of this ThreadLocal variable to the given value. This is only used to change the value from the one assigned by the initialValue method, and many applications will have no need for this functionality.
Overrides:
set in class ThreadLocal
Parameters:
value - the value to be stored in the calling threads' copy of this ThreadLocal.

childValue

protected Object childValue(Object parentValue)
Computes the child's initial value for this InheritableThreadLocal as a function of the parent's value at the time the child Thread is created. This method is called from within the parent thread before the child is started.

This method merely returns its input argument, and should be overridden if a different behavior is desired.

Parameters:
parentValue - the parent thread's value
Returns:
the child thread's initial value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiationError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class InstantiationError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
                          |
                          +--java.lang.InstantiationError
All Implemented Interfaces:
Serializable
public class InstantiationError
extends IncompatibleClassChangeError

Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
InstantiationError()
Constructs an InstantiationError with no detail message.
InstantiationError(String s)
Constructs an InstantiationError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InstantiationError

public InstantiationError()
Constructs an InstantiationError with no detail message.

InstantiationError

public InstantiationError(String s)
Constructs an InstantiationError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class InstantiationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.InstantiationException
All Implemented Interfaces:
Serializable
public class InstantiationException
extends Exception

Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.

Since:
JDK1.0
See Also:
Class.newInstance(), Serialized Form

Constructor Summary
InstantiationException()
Constructs an InstantiationException with no detail message.
InstantiationException(String s)
Constructs an InstantiationException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InstantiationException

public InstantiationException()
Constructs an InstantiationException with no detail message.

InstantiationException

public InstantiationException(String s)
Constructs an InstantiationException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Integer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Integer

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Integer
All Implemented Interfaces:
Comparable, Serializable
public final class Integer
extends Number
implements Comparable

The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.

In addition, this class provides several methods for converting an int to a String and a String to an int, as well as other constants and methods useful when dealing with an int.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static int | MAX_VALUE The largest value of type int.
static int | MIN_VALUE The smallest value of type int.
static Class | TYPE The Class object representing the primitive type int.
Constructor Summary
Integer(int value)
Constructs a newly allocated Integer object that represents the primitive int argument.
Integer(String s)
Constructs a newly allocated Integer object that represents the value represented by the string.
Method Summary
byte | byteValue() Returns the value of this Integer as a byte.
int | compareTo(Integer anotherInteger) Compares two Integers numerically.
int | compareTo(Object o) Compares this Integer to another Object.
static Integer | decode(String nm) Decodes a String into an Integer.
double | doubleValue() Returns the value of this Integer as a double.
boolean | equals(Object obj) Compares this object to the specified object.
float | floatValue() Returns the value of this Integer as a float.
static Integer | getInteger(String nm) Determines the integer value of the system property with the specified name.
static Integer | getInteger(String nm, int val) Determines the integer value of the system property with the specified name.
static Integer | getInteger(String nm, Integer val) Returns the integer value of the system property with the specified name.
int | hashCode() Returns a hashcode for this Integer.
int | intValue() Returns the value of this Integer as an int.
long | longValue() Returns the value of this Integer as a long.
static int | parseInt(String s) Parses the string argument as a signed decimal integer.
static int | parseInt(String s, int radix) Parses the string argument as a signed integer in the radix specified by the second argument.
short | shortValue() Returns the value of this Integer as a short.
static String | toBinaryString(int i) Creates a string representation of the integer argument as an unsigned integer in base 2.
static String | toHexString(int i) Creates a string representation of the integer argument as an unsigned integer in base 16.
static String | toOctalString(int i) Creates a string representation of the integer argument as an unsigned integer in base 8.
String | toString() Returns a String object representing this Integer's value.
static String | toString(int i) Returns a new String object representing the specified integer.
static String | toString(int i, int radix) Creates a string representation of the first argument in the radix specified by the second argument.
static Integer | valueOf(String s) Returns a new Integer object initialized to the value of the specified String.
static Integer | valueOf(String s, int radix) Returns a new Integer object initialized to the value of the specified String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MIN_VALUE

public static final int MIN_VALUE
The smallest value of type int. The constant value of this field is -2147483648.

MAX_VALUE

public static final int MAX_VALUE
The largest value of type int. The constant value of this field is 2147483647.

TYPE

public static final Class TYPE
The Class object representing the primitive type int.
Since:
JDK1.1
Constructor Detail

Integer

public Integer(int value)
Constructs a newly allocated Integer object that represents the primitive int argument.
Parameters:
value - the value to be represented by the Integer.

Integer

public Integer(String s)
        throws NumberFormatException
Constructs a newly allocated Integer object that represents the value represented by the string. The string is converted to an int in exactly the manner used by the parseInt method for radix 10.
Parameters:
s - the String to be converted to an Integer.
Throws:
NumberFormatException - if the String does not contain a parsable integer.
See Also:
parseInt(java.lang.String, int)
Method Detail

toString

public static String toString(int i,
                              int radix)
Creates a string representation of the first argument in the radix specified by the second argument.

If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.

If the first argument is negative, the first element of the result is the ASCII minus character '-' ('\u002d'). If the first argument is not negative, no sign character appears in the result.

The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:

   0123456789abcdefghijklmnopqrstuvwxyz
These are '\u0030' through '\u0039' and '\u0061' through '\u007a'. If the radix is N, then the first N of these characters are used as radix-N digets in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef. If uppercase letters are desired, the String.toUpperCase() method may be called on the result:
 Integer.toString(n, 16).toUpperCase()
Parameters:
i - an integer.
radix - the radix.
Returns:
a string representation of the argument in the specified radix.
See Also:
Character.MAX_RADIX, Character.MIN_RADIX

toHexString

public static String toHexString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 16.

The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in hexadecimal (base 16) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as hexadecimal digits:

 0123456789abcdef
These are the characters '\u0030' through '\u0039' and 'u\0039' through '\u0066'. If the uppercase letters are desired, the String.toUpperCase() method may be called on the result:
 Long.toHexString(n).toUpperCase()
Parameters:
i - an integer.
Returns:
the string representation of the unsigned integer value represented by the argument in hexadecimal (base 16).
Since:
JDK1.0.2

toOctalString

public static String toOctalString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 8.

The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in octal (base 8) with no extra leading 0s.

If the unsigned magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The octal digits are:

 01234567
These are the characters '\u0030' through '\u0037'.
Parameters:
i - an integer
Returns:
the string representation of the unsigned integer value represented by the argument in octal (base 8).
Since:
JDK1.0.2

toBinaryString

public static String toBinaryString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 2.

The unsigned integer value is the argument plus 232if the argument is negative; otherwise it is equal to the argument. This value is converted to a string of ASCII digits in binary (base 2) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The characters '0' ('\u0030') and '1' ('\u0031') are used as binary digits.

Parameters:
i - an integer.
Returns:
the string representation of the unsigned integer value represented by the argument in binary (base 2).
Since:
JDK1.0.2

toString

public static String toString(int i)
Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and radix 10 were given as arguments to the toString(int, int) method.
Parameters:
i - an integer to be converted.
Returns:
a string representation of the argument in base 10.

parseInt

public static int parseInt(String s,
                           int radix)
                    throws NumberFormatException
Parses the string argument as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit(char, int) returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('\u002d') to indicate a negative value. The resulting integer value is returned.

An exception of type NumberFormatException is thrown if any of the following situations occurs:

  • The first argument is null or is a string of length zero.
  • The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX.
  • Any character of the string is not a digit of the specified radix, except that the first character may be a minus sign '-' ('\u002d') provided that the string is longer than length 1.
  • The integer value represented by the string is not a value of type int.

Examples:

 parseInt("0", 10) returns 0
 parseInt("473", 10) returns 473
 parseInt("-0", 10) returns 0
 parseInt("-FF", 16) returns -255
 parseInt("1100110", 2) returns 102
 parseInt("2147483647", 10) returns 2147483647
 parseInt("-2147483648", 10) returns -2147483648
 parseInt("2147483648", 10) throws a NumberFormatException
 parseInt("99", 8) throws a NumberFormatException
 parseInt("Kona", 10) throws a NumberFormatException
 parseInt("Kona", 27) returns 411787
Parameters:
s - the String containing the integer.
radix - the radix to be used.
Returns:
the integer represented by the string argument in the specified radix.
Throws:
NumberFormatException - if the string does not contain a parsable integer.

parseInt

public static int parseInt(String s)
                    throws NumberFormatException
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002d') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method.
Parameters:
s - a string.
Returns:
the integer represented by the argument in decimal.
Throws:
NumberFormatException - if the string does not contain a parsable integer.

valueOf

public static Integer valueOf(String s,
                              int radix)
                       throws NumberFormatException
Returns a new Integer object initialized to the value of the specified String. The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the parseInt(java.lang.String, int) method. The result is an Integer object that represents the integer value specified by the string.

In other words, this method returns an Integer object equal to the value of:

 new Integer(Integer.parseInt(s, radix))
Parameters:
s - the string to be parsed.
radix - the radix of the integer represented by string s
Returns:
a newly constructed Integer initialized to the value represented by the string argument in the specified radix.
Throws:
NumberFormatException - if the String cannot be parsed as an int.

valueOf

public static Integer valueOf(String s)
                       throws NumberFormatException
Returns a new Integer object initialized to the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseInt(java.lang.String) method. The result is an Integer object that represents the integer value specified by the string.

In other words, this method returns an Integer object equal to the value of:

 new Integer(Integer.parseInt(s))
Parameters:
s - the string to be parsed.
Returns:
a newly constructed Integer initialized to the value represented by the string argument.
Throws:
NumberFormatException - if the string cannot be parsed as an integer.

byteValue

public byte byteValue()
Returns the value of this Integer as a byte.
Overrides:
byteValue in class Number
Since:
JDK1.1

shortValue

public short shortValue()
Returns the value of this Integer as a short.
Overrides:
shortValue in class Number
Since:
JDK1.1

intValue

public int intValue()
Returns the value of this Integer as an int.
Overrides:
intValue in class Number
Returns:
the int value represented by this object.

longValue

public long longValue()
Returns the value of this Integer as a long.
Overrides:
longValue in class Number
Returns:
the int value represented by this object that is converted to type long and the result of the conversion is returned.

floatValue

public float floatValue()
Returns the value of this Integer as a float.
Overrides:
floatValue in class Number
Returns:
the int value represented by this object is converted to type float and the result of the conversion is returned.

doubleValue

public double doubleValue()
Returns the value of this Integer as a double.
Overrides:
doubleValue in class Number
Returns:
the int value represented by this object is converted to type double and the result of the conversion is returned.

toString

public String toString()
Returns a String object representing this Integer's value. The value is converted to signed decimal representation and returned as a string, exactly as if the integer value were given as an argument to the toString(int) method.
Overrides:
toString in class Object
Returns:
a string representation of the value of this object in base 10.

hashCode

public int hashCode()
Returns a hashcode for this Integer.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object, equal to the primitive int value represented by this Integer object.

equals

public boolean equals(Object obj)
Compares this object to the specified object. The result is true if and only if the argument is not null and is an Integer object that contains the same int value as this object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

getInteger

public static Integer getInteger(String nm)
Determines the integer value of the system property with the specified name.

The first argument is treated as the name of a system property. System properties are accessible through the System.getProperty(java.lang.String) method. The string value of this property is then interpreted as an integer value and an Integer object representing this value is returned. Details of possible numeric formats can be found with the definition of getProperty.

If there is no property with the specified name, if the specified name is empty or null, or if the property does not have the correct numeric format, then null is returned. In other words, this method returns an Integer object equal to the value of:

 getInteger(nm, null)
Parameters:
nm - property name.
Returns:
the Integer value of the property.
See Also:
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)

getInteger

public static Integer getInteger(String nm,
                                 int val)
Determines the integer value of the system property with the specified name.

The first argument is treated as the name of a system property. System properties are accessible through getProperty, a method defined by the System class. The string value of this property is then interpreted as an integer value and an Integer object representing this value is returned. Details of possible numeric formats can be found with the definition of getProperty.

The second argument is the default value. An Integer object that represents the value of the second argument is returned if there is no property of the specified name, if the property does not have the correct numeric format, or if the specified name is empty or null.

In other words, this method returns an Integer object equal to the value of:

 getInteger(nm, new Integer(val))
but in practice it may be implemented in a manner such as:
 Integer result = getInteger(nm, null);
 return (result == null) ? new Integer(val) : result;
to avoid the unnecessary allocation of an Integer object when the default value is not needed.
Parameters:
nm - property name.
val - default value.
Returns:
the Integer value of the property.
See Also:
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)

getInteger

public static Integer getInteger(String nm,
                                 Integer val)
Returns the integer value of the system property with the specified name. The first argument is treated as the name of a system property. System properties are accessible through getProperty, a method defined by the System class. The string value of this property is then interpreted as an integer value, as per the Integer.decode method, and an Integer object representing this value is returned.

  • If the property value begins with the two ASCII characters 0x or the ASCII character #, not followed by a minus sign, then the rest of it is parsed as a hexadecimal integer exactly as for the method valueOf(java.lang.String, int) with radix 16.
  • If the property value begins with the ASCII character 0 followed by another character, it is parsed as an octal integer exactly as for the method with radix 8.
  • Otherwise, the property value is parsed as a decimal integer exactly as for the method {@link #valueOf(java.lang.String, int) with radix 10.

The second argument is the default value. The default value is returned if there is no property of the specified name, if the property does not have the correct numeric format, or if the specified name is empty or null.

Parameters:
nm - property name.
val - default value.
Returns:
the Integer value of the property.
See Also:
System.getProperty(java.lang.String),
System.getProperty(java.lang.String, java.lang.String),
decode(java.lang.String)

decode

public static Integer decode(String nm)
                      throws NumberFormatException
Decodes a String into an Integer. Accepts decimal, hexadecimal, and octal numbers, in the following formats:
     [-]        decimal constant
     [-] 0x     hex constant
     [-] #      hex constant
     [-] 0      octal constant
The constant following an (optional) negative sign and/or "radix specifier" is parsed as by the Integer.parseInt method with the specified radix (10, 8 or 16). This constant must be positive or a NumberFormatException will result. The result is made negative if first character of the specified String is the negative sign. No whitespace characters are permitted in the String.
Parameters:
nm - the String to decode.
Returns:
the Integer represented by the specified string.
Throws:
NumberFormatException - if the String does not contain a parsable integer.
See Also:
parseInt(String, int)

compareTo

public int compareTo(Integer anotherInteger)
Compares two Integers numerically.
Parameters:
anotherInteger - the Integer to be compared.
Returns:
the value 0 if the argument Integer is equal to this Integer; a value less than 0 if this Integer is numerically less than the Integer argument; and a value greater than 0 if this Integer is numerically greater than the Integer argument (signed comparison).
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Integer to another Object. If the Object is a Integer, this function behaves like compareTo(Integer). Otherwise, it throws a ClassCastException (as Integers are comparable only to other Integers).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Integer numerically equal to this Integer; a value less than 0 if the argument is a Integer numerically greater than this Integer; and a value greater than 0 if the argument is a Integer numerically less than this Integer.
Throws:
ClassCastException - if the argument is not an Integer.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class InternalError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.VirtualMachineError
                    |
                    +--java.lang.InternalError
All Implemented Interfaces:
Serializable
public class InternalError
extends VirtualMachineError

Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
InternalError()
Constructs an InternalError with no detail message.
InternalError(String s)
Constructs an InternalError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InternalError

public InternalError()
Constructs an InternalError with no detail message.

InternalError

public InternalError(String s)
Constructs an InternalError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InterruptedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class InterruptedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.InterruptedException
All Implemented Interfaces:
Serializable
public class InterruptedException
extends Exception

Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.

Since:
JDK1.0
See Also:
Object.wait(),
Object.wait(long),
Object.wait(long, int),
Thread.sleep(long),
Thread.interrupt(),
Thread.interrupted(), Serialized Form

Constructor Summary
InterruptedException()
Constructs an InterruptedException with no detail message.
InterruptedException(String s)
Constructs an InterruptedException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InterruptedException

public InterruptedException()
Constructs an InterruptedException with no detail message.

InterruptedException

public InterruptedException(String s)
Constructs an InterruptedException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkageError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class LinkageError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClassCircularityError, ClassFormatError, ExceptionInInitializerError, IncompatibleClassChangeError, NoClassDefFoundError, UnsatisfiedLinkError, VerifyError
public class LinkageError
extends Error

Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
LinkageError()
Constructs a LinkageError with no detail message.
LinkageError(String s)
Constructs a LinkageError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LinkageError

public LinkageError()
Constructs a LinkageError with no detail message.

LinkageError

public LinkageError(String s)
Constructs a LinkageError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Long

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Long

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Long
All Implemented Interfaces:
Comparable, Serializable
public final class Long
extends Number
implements Comparable

The Long class wraps a value of the primitive type long in an object. An object of type Long contains a single field whose type is long.

In addition, this class provides several methods for converting a long to a String and a String to a long, as well as other constants and methods useful when dealing with a long.

Since:
JDK1.0
See Also:
Serialized Form

Field Summary
static long | MAX_VALUE The largest value of type long.
static long | MIN_VALUE The smallest value of type long.
static Class | TYPE The Class object representing the primitive type long.
Constructor Summary
Long(long value)
Constructs a newly allocated Long object that represents the primitive long argument.
Long(String s)
Constructs a newly allocated Long object that represents the value represented by the string in decimal form.
Method Summary
byte | byteValue() Returns the value of this Long as a byte.
int | compareTo(Long anotherLong) Compares two Longs numerically.
int | compareTo(Object o) Compares this Long to another Object.
static Long | decode(String nm) Decodes a String into a Long.
double | doubleValue() Returns the value of this Long as a double.
boolean | equals(Object obj) Compares this object against the specified object.
float | floatValue() Returns the value of this Long as a float.
static Long | getLong(String nm) Determines the long value of the system property with the specified name.
static Long | getLong(String nm, long val) Determines the long value of the system property with the specified name.
static Long | getLong(String nm, Long val) Returns the long value of the system property with the specified name.
int | hashCode() Computes a hashcode for this Long.
int | intValue() Returns the value of this Long as an int.
long | longValue() Returns the value of this Long as a long value.
static long | parseLong(String s) Parses the string argument as a signed decimal long.
static long | parseLong(String s, int radix) Parses the string argument as a signed long in the radix specified by the second argument.
short | shortValue() Returns the value of this Long as a short.
static String | toBinaryString(long i) Creates a string representation of the long argument as an unsigned integer in base 2.
static String | toHexString(long i) Creates a string representation of the long argument as an unsigned integer in base 16.
static String | toOctalString(long i) Creates a string representation of the long argument as an unsigned integer in base 8.
String | toString() Returns a String object representing this Long's value.
static String | toString(long i) Returns a new String object representing the specified integer.
static String | toString(long i, int radix) Creates a string representation of the first argument in the radix specified by the second argument.
static Long | valueOf(String s) Returns a new long object initialized to the value of the specified String.
static Long | valueOf(String s, int radix) Returns a new long object initialized to the value of the specified String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MIN_VALUE

public static final long MIN_VALUE
The smallest value of type long.

MAX_VALUE

public static final long MAX_VALUE
The largest value of type long.

TYPE

public static final Class TYPE
The Class object representing the primitive type long.
Since:
JDK1.1
Constructor Detail

Long

public Long(long value)
Constructs a newly allocated Long object that represents the primitive long argument.
Parameters:
value - the value to be represented by the Long object.

Long

public Long(String s)
     throws NumberFormatException
Constructs a newly allocated Long object that represents the value represented by the string in decimal form. The string is converted to an long value as if by the parseLong(java.lang.String, int) method for radix 10.
Parameters:
s - the string to be converted to a Long.
Throws:
NumberFormatException - if the String does not contain a parsable long integer.
See Also:
valueOf(java.lang.String)
Method Detail

toString

public static String toString(long i,
                              int radix)
Creates a string representation of the first argument in the radix specified by the second argument.

If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.

If the first argument is negative, the first element of the result is the ASCII minus sign '-' ('\u002d'. If the first argument is not negative, no sign character appears in the result.

The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:

   0123456789abcdefghijklmnopqrstuvwxyz
These are '\u0030' through '\u0039' and '\u0061' through '\u007a'. If the radix is N, then the first N of these characters are used as radix-N digits in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef. If uppercase letters are desired, the String.toUpperCase() method may be called on the result:
 Long.toString(n, 16).toUpperCase()
Parameters:
i - a long.
radix - the radix.
Returns:
a string representation of the argument in the specified radix.
See Also:
Character.MAX_RADIX, Character.MIN_RADIX

toHexString

public static String toHexString(long i)
Creates a string representation of the long argument as an unsigned integer in base 16.

The unsigned long value is the argument plus 264 if the argument is negative; otherwise, it is equal to the argument.

If the unsigned magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as hexadecimal digits:

 0123456789abcdef
These are the characters '\u0030' through '\u0039' and '\u0061' through '\u0066'. If uppercase letters are desired, the String.toUpperCase() method may be called on the result:
 Long.toHexString(n).toUpperCase()
Parameters:
i - a long.
Returns:
the string representation of the unsigned long value represented by the argument in hexadecimal (base 16).
Since:
JDK 1.0.2

toOctalString

public static String toOctalString(long i)
Creates a string representation of the long argument as an unsigned integer in base 8.

The unsigned long value is the argument plus 264 if the argument is negative; otherwise, it is equal to the argument.

If the unsigned magnitude is zero, it is represented by a single zero character '0' ('\u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as octal digits:

 01234567
These are the characters '\u0030' through '\u0037'.
Parameters:
i - a long.
Returns:
the string representation of the unsigned long value represented by the argument in octal (base 8).
Since:
JDK 1.0.2

toBinaryString

public static String toBinaryString(long i)
Creates a string representation of the long argument as an unsigned integer in base 2.

The unsigned long value is the argument plus 264 if the argument is negative; otherwise, it is equal to the argument.

If the unsigned magnitude is zero, it is represented by a single zero character '0' ('&392;u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The characters '0' ('\u0030') and '1' ('\u0031') are used as binary digits.

Parameters:
i - a long.
Returns:
the string representation of the unsigned long value represented by the argument in binary (base 2).
Since:
JDK 1.0.2

toString

public static String toString(long i)
Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and the radix 10 were given as arguments to the toString(long, int) method that takes two arguments.
Parameters:
i - a long to be converted.
Returns:
a string representation of the argument in base 10.

parseLong

public static long parseLong(String s,
                             int radix)
                      throws NumberFormatException
Parses the string argument as a signed long in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('\u002d' to indicate a negative value. The resulting long value is returned.

Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code - except that either L or l may appear as a digit for a radix greater than 22.

An exception of type NumberFormatException is thrown if any of the following situations occurs:

  • The first argument is null or is a string of length zero.
  • The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX.
  • The first character of the string is not a digit of the specified radix and is not a minus sign '-' ('\u002d').
  • The first character of the string is a minus sign and the string is of length 1.
  • Any character of the string after the first is not a digit of the specified radix.
  • The integer value represented by the string cannot be represented as a value of type long.

Examples:

 parseLong("0", 10) returns 0L
 parseLong("473", 10) returns 473L
 parseLong("-0", 10) returns 0L
 parseLong("-FF", 16) returns -255L
 parseLong("1100110", 2) returns 102L
 parseLong("99", 8) throws a NumberFormatException
 parseLong("Hazelnut", 10) throws a NumberFormatException
 parseLong("Hazelnut", 36) returns 1356099454469L
Parameters:
s - the String containing the long.
radix - the radix to be used.
Returns:
the long represented by the string argument in the specified radix.
Throws:
NumberFormatException - if the string does not contain a parsable integer.

parseLong

public static long parseLong(String s)
                      throws NumberFormatException
Parses the string argument as a signed decimal long. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' (\u002d') to indicate a negative value. The resulting long value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseLong(String, int) method that takes two arguments.

Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.

Parameters:
s - a string.
Returns:
the long represented by the argument in decimal.
Throws:
NumberFormatException - if the string does not contain a parsable long.

valueOf

public static Long valueOf(String s,
                           int radix)
                    throws NumberFormatException
Returns a new long object initialized to the value of the specified String. Throws an exception if the String cannot be parsed as a long.

The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the parseLong(java.lang.String, int) method that takes two arguments. The result is a Long object that represents the integer value specified by the string.

In other words, this method returns a Long object equal to the value of:

 new Long(Long.parseLong(s, radix))
Parameters:
s - the String containing the long.
radix - the radix to be used.
Returns:
a newly constructed Long initialized to the value represented by the string argument in the specified radix.
Throws:
NumberFormatException - If the String does not contain a parsable long.

valueOf

public static Long valueOf(String s)
                    throws NumberFormatException
Returns a new long object initialized to the value of the specified String. Throws an exception if the String cannot be parsed as a long. The radix is assumed to be 10.

The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseLong(java.lang.String) method that takes one argument). The result is a Long object that represents the integer value specified by the string.

In other words, this method returns a Long object equal to the value of:

 new Long(Long.parseLong(s))
Parameters:
s - the string to be parsed.
Returns:
a newly constructed Long initialized to the value represented by the string argument.
Throws:
NumberFormatException - If the String does not contain a parsable long.

decode

public static Long decode(String nm)
                   throws NumberFormatException
Decodes a String into a Long. Accepts decimal, hexadecimal, and octal numbers, in the following formats:
     [-]        decimal constant
     [-] 0x     hex constant
     [-] #      hex constant
     [-] 0      octal constant
The constant following an (optional) negative sign and/or "radix specifier" is parsed as by the Long.parseLong method with the specified radix (10, 8 or 16). This constant must be positive or a NumberFormatException will result. The result is made negative if first character of the specified String is the negative sign. No whitespace characters are permitted in the String.
Parameters:
nm - the String to decode.
Returns:
the Long represented by the specified string.
Throws:
NumberFormatException - if the String does not contain a parsable long.
See Also:
parseLong(String, int)

byteValue

public byte byteValue()
Returns the value of this Long as a byte.
Overrides:
byteValue in class Number
Since:
JDK1.1

shortValue

public short shortValue()
Returns the value of this Long as a short.
Overrides:
shortValue in class Number
Since:
JDK1.1

intValue

public int intValue()
Returns the value of this Long as an int.
Overrides:
intValue in class Number
Returns:
the long value represented by this object is converted to type int and the result of the conversion is returned.

longValue

public long longValue()
Returns the value of this Long as a long value.
Overrides:
longValue in class Number
Returns:
the long value represented by this object.

floatValue

public float floatValue()
Returns the value of this Long as a float.
Overrides:
floatValue in class Number
Returns:
the long value represented by this object is converted to type float and the result of the conversion is returned.

doubleValue

public double doubleValue()
Returns the value of this Long as a double.
Overrides:
doubleValue in class Number
Returns:
the long value represented by this object that is converted to type double and the result of the conversion is returned.

toString

public String toString()
Returns a String object representing this Long's value. The long integer value represented by this Long object is converted to signed decimal representation and returned as a string, exactly as if the long value were given as an argument to the toString(long) method that takes one argument.
Overrides:
toString in class Object
Returns:
a string representation of this object in base 10.

hashCode

public int hashCode()
Computes a hashcode for this Long. The result is the exclusive OR of the two halves of the primitive long value represented by this Long object. That is, the hashcode is the value of the expression:
 (int)(this.longValue()^(this.longValue()>>>32))
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Long object that contains the same long value as this object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

getLong

public static Long getLong(String nm)
Determines the long value of the system property with the specified name.

The first argument is treated as the name of a system property. System properties are accessible through the System.getProperty(java.lang.String) method. The string value of this property is then interpreted as a long value and a Long object representing this value is returned. Details of possible numeric formats can be found with the definition of getProperty.

If there is no property with the specified name, if the specified name is empty or null, or if the property does not have the correct numeric format, then null is returned.

In other words, this method returns a Long object equal to the value of:

 getLong(nm, null)
Parameters:
nm - property name.
Returns:
the Long value of the property.
See Also:
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)

getLong

public static Long getLong(String nm,
                           long val)
Determines the long value of the system property with the specified name.

The first argument is treated as the name of a system property. System properties are accessible through the System.getProperty(java.lang.String) method. The string value of this property is then interpreted as a long value and a Long object representing this value is returned. Details of possible numeric formats can be found with the definition of getProperty.

The second argument is the default value. A Long object that represents the value of the second argument is returned if there is no property of the specified name, if the property does not have the correct numeric format, or if the specified name is empty or null.

In other words, this method returns a Long object equal to the value of:

 getLong(nm, new Long(val))
but in practice it may be implemented in a manner such as:
 Long result = getLong(nm, null);
 return (result == null) ? new Long(val) : result;
to avoid the unnecessary allocation of a Long object when the default value is not needed.
Parameters:
nm - property name.
val - default value.
Returns:
the Long value of the property.
See Also:
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)

getLong

public static Long getLong(String nm,
                           Long val)
Returns the long value of the system property with the specified name. The first argument is treated as the name of a system property. System properties are accessible through the System.getProperty(java.lang.String) method. The string value of this property is then interpreted as a long value, as per the Long.decode method, and a Long object representing this value is returned.

  • If the property value begins with the two ASCII characters 0x or the ASCII character #, not followed by a minus sign, then the rest of it is parsed as a hexadecimal integer exactly as for the method valueOf(java.lang.String, int) with radix 16.
  • If the property value begins with the character 0 followed by another character, it is parsed as an octal integer exactly as for the method valueOf(java.lang.String, int) with radix 8.
  • Otherwise the property value is parsed as a decimal integer exactly as for the method valueOf(java.lang.String, int) with radix 10.

Note that, in every case, neither L nor l is permitted to appear at the end of the property value as a type indicator, as would be permitted in Java programming language source code.

The second argument is the default value. The default value is returned if there is no property of the specified name, if the property does not have the correct numeric format, or if the specified name is empty or null.

Parameters:
nm - property name.
val - default value.
Returns:
the Long value of the property.
See Also:
System.getProperty(java.lang.String),
System.getProperty(java.lang.String, java.lang.String),
decode(java.lang.String)

compareTo

public int compareTo(Long anotherLong)
Compares two Longs numerically.
Parameters:
anotherLong - the Long to be compared.
Returns:
the value 0 if the argument Long is equal to this Long; a value less than 0 if this Long is numerically less than the Long argument; and a value greater than 0 if this Long is numerically greater than the Long argument (signed comparison).
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Long to another Object. If the Object is a Long, this function behaves like compareTo(Long). Otherwise, it throws a ClassCastException (as Longs are comparable only to other Longs).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Long numerically equal to this Long; a value less than 0 if the argument is a Long numerically greater than this Long; and a value greater than 0 if the argument is a Long numerically less than this Long.
Throws:
ClassCastException - if the argument is not a Long.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Math

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Math

java.lang.Object
  |
  +--java.lang.Math
public final class Math
extends Object

The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.

Unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results. This relaxation permits better-performing implementations where strict reproducibility is not required.

By default many of the Math functions simply delegate to the equivalent functions in StrictMath for their implementations. Code generators are encouraged to use platform-specific native libraries or microprocessor instructions, where available, to provide higher-performance implementations of Math functions. Such higher-performance implementations still must conform to the specification for Math.

Since:
JDK1.0

Field Summary
static double | E The double value that is closer than any other to e, the base of the natural logarithms.
static double | PI The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Method Summary
static double | abs(double a) Returns the absolute value of a double value.
static float | abs(float a) Returns the absolute value of a float value.
static int | abs(int a) Returns the absolute value of an int value.
static long | abs(long a) Returns the absolute value of a long value.
static double | acos(double a) Returns the arc cosine of an angle, in the range of 0.0 through pi.
static double | asin(double a) Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
static double | atan(double a) Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
static double | atan2(double a, double b) Converts rectangular coordinates (b, a) to polar (r, theta).
static double | ceil(double a) Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.
static double | cos(double a) Returns the trigonometric cosine of an angle.
static double | exp(double a) Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.
static double | floor(double a) Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.
static double | IEEEremainder(double f1, double f2) Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
static double | log(double a) Returns the natural logarithm (base e) of a double value.
static double | max(double a, double b) Returns the greater of two double values.
static float | max(float a, float b) Returns the greater of two float values.
static int | max(int a, int b) Returns the greater of two int values.
static long | max(long a, long b) Returns the greater of two long values.
static double | min(double a, double b) Returns the smaller of two double values.
static float | min(float a, float b) Returns the smaller of two float values.
static int | min(int a, int b) Returns the smaller of two int values.
static long | min(long a, long b) Returns the smaller of two long values.
static double | pow(double a, double b) Returns of value of the first argument raised to the power of the second argument.
static double | random() Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
static double | rint(double a) Returns the double value that is closest in value to a and is equal to a mathematical integer.
static long | round(double a) Returns the closest long to the argument.
static int | round(float a) Returns the closest int to the argument.
static double | sin(double a) Returns the trigonometric sine of an angle.
static double | sqrt(double a) Returns the correctly rounded positive square root of a double value.
static double | tan(double a) Returns the trigonometric tangent of an angle.
static double | toDegrees(double angrad) Converts an angle measured in radians to the equivalent angle measured in degrees.
static double | toRadians(double angdeg) Converts an angle measured in degrees to the equivalent angle measured in radians.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

E

public static final double E
The double value that is closer than any other to e, the base of the natural logarithms.

PI

public static final double PI
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Method Detail

sin

public static double sin(double a)
Returns the trigonometric sine of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - an angle, in radians.
Returns:
the sine of the argument.

cos

public static double cos(double a)
Returns the trigonometric cosine of an angle. Special case:
  • If the argument is NaN or an infinity, then the result is NaN.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - an angle, in radians.
Returns:
the cosine of the argument.

tan

public static double tan(double a)
Returns the trigonometric tangent of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - an angle, in radians.
Returns:
the tangent of the argument.

asin

public static double asin(double a)
Returns the arc sine of an angle, in the range of -pi/2 through pi/2. Special cases:
  • If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - the double value whose arc sine is to be returned.
Returns:
the arc sine of the argument.

acos

public static double acos(double a)
Returns the arc cosine of an angle, in the range of 0.0 through pi. Special case:
  • If the argument is NaN or its absolute value is greater than 1, then the result is NaN.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - the double value whose arc cosine is to be returned.
Returns:
the arc cosine of the argument.

atan

public static double atan(double a)
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2. Special cases:
  • If the argument is NaN, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - the double value whose arc tangent is to be returned.
Returns:
the arc tangent of the argument.

toRadians

public static double toRadians(double angdeg)
Converts an angle measured in degrees to the equivalent angle measured in radians.
Parameters:
angdeg - an angle, in degrees
Returns:
the measurement of the angle angdeg in radians.
Since:
1.2

toDegrees

public static double toDegrees(double angrad)
Converts an angle measured in radians to the equivalent angle measured in degrees.
Parameters:
angrad - an angle, in radians
Returns:
the measurement of the angle angrad in degrees.
Since:
1.2

exp

public static double exp(double a)
Returns the exponential number e (i.e., 2.718...) raised to the power of a double value. Special cases:
  • If the argument is NaN, the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is negative infinity, then the result is positive zero.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - a double value.
Returns:
the value ea, where e is the base of the natural logarithms.

log

public static double log(double a)
Returns the natural logarithm (base e) of a double value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is negative infinity.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - a number greater than 0.0.
Returns:
the value ln a, the natural logarithm of a.

sqrt

public static double sqrt(double a)
Returns the correctly rounded positive square root of a double value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is the same as the argument.
Otherwise, the result is the double value closest to the true mathetmatical square root of the argument value.
Parameters:
a - a double value.
Returns:
the positive square root of a. If the argument is NaN or less than zero, the result is NaN.

IEEEremainder

public static double IEEEremainder(double f1,
                                   double f2)
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. The remainder value is mathematically equal to f1 - f2 × n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument. Special cases:
  • If either argument is NaN, or the first argument is infinite, or the second argument is positive zero or negative zero, then the result is NaN.
  • If the first argument is finite and the second argument is infinite, then the result is the same as the first argument.
Parameters:
f1 - the dividend.
f2 - the divisor.
Returns:
the remainder when f1 is divided by f2.

ceil

public static double ceil(double a)
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
  • If the argument value is less than zero but greater than -1.0, then the result is negative zero.
Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
Parameters:
a - a double value.
Returns:
the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.

floor

public static double floor(double a)
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
Parameters:
a - a double value.
Returns:
the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.

rint

public static double rint(double a)
Returns the double value that is closest in value to a and is equal to a mathematical integer. If two double values that are mathematical integers are equally close to the value of the argument, the result is the integer value that is even. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
Parameters:
a - a double value.
Returns:
the closest double value to a that is equal to a mathematical integer.

atan2

public static double atan2(double a,
                           double b)
Converts rectangular coordinates (b, a) to polar (r, theta). This method computes the phase theta by computing an arc tangent of a/b in the range of -pi to pi. Special cases:
  • If either argument is NaN, then the result is NaN.
  • If the first argument is positive zero and the second argument is positive, or the first argument is positive and finite and the second argument is positive infinity, then the result is positive zero.
  • If the first argument is negative zero and the second argument is positive, or the first argument is negative and finite and the second argument is positive infinity, then the result is negative zero.
  • If the first argument is positive zero and the second argument is negative, or the first argument is positive and finite and the second argument is negative infinity, then the result is the double value closest to pi.
  • If the first argument is negative zero and the second argument is negative, or the first argument is negative and finite and the second argument is negative infinity, then the result is the double value closest to -pi.
  • If the first argument is positive and the second argument is positive zero or negative zero, or the first argument is positive infinity and the second argument is finite, then the result is the double value closest to pi/2.
  • If the first argument is negative and the second argument is positive zero or negative zero, or the first argument is negative infinity and the second argument is finite, then the result is the double value closest to -pi/2.
  • If both arguments are positive infinity, then the result is the double value closest to pi/4.
  • If the first argument is positive infinity and the second argument is negative infinity, then the result is the double value closest to 3*pi/4.
  • If the first argument is negative infinity and the second argument is positive infinity, then the result is the double value closest to -pi/4.
  • If both arguments are negative infinity, then the result is the double value closest to -3*pi/4.

A result must be within 2 ulps of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - a double value.
b - a double value.
Returns:
the theta component of the point (r, theta) in polar coordinates that corresponds to the point (b, a) in Cartesian coordinates.

pow

public static double pow(double a,
                         double b)
Returns of value of the first argument raised to the power of the second argument. Special cases:
  • If the second argument is positive or negative zero, then the result is 1.0.
  • If the second argument is 1.0, then the result is the same as the first argument.
  • If the second argument is NaN, then the result is NaN.
  • If the first argument is NaN and the second argument is nonzero, then the result is NaN.
  • If the absolute value of the first argument is greater than 1 and the second argument is positive infinity, or the absolute value of the first argument is less than 1 and the second argument is negative infinity, then the result is positive infinity.
  • If the absolute value of the first argument is greater than 1 and the second argument is negative infinity, or the absolute value of the first argument is less than 1 and the second argument is positive infinity, then the result is positive zero.
  • If the absolute value of the first argument equals 1 and the second argument is infinite, then the result is NaN.
  • If the first argument is positive zero and the second argument is greater than zero, or the first argument is positive infinity and the second argument is less than zero, then the result is positive zero.
  • If the first argument is positive zero and the second argument is less than zero, or the first argument is positive infinity and the second argument is greater than zero, then the result is positive infinity.
  • If the first argument is negative zero and the second argument is greater than zero but not a finite odd integer, or the first argument is negative infinity and the second argument is less than zero but not a finite odd integer, then the result is positive zero.
  • If the first argument is negative zero and the second argument is a positive finite odd integer, or the first argument is negative infinity and the second argument is a negative finite odd integer, then the result is negative zero.
  • If the first argument is negative zero and the second argument is less than zero but not a finite odd integer, or the first argument is negative infinity and the second argument is greater than zero but not a finite odd integer, then the result is positive infinity.
  • If the first argument is negative zero and the second argument is a negative finite odd integer, or the first argument is negative infinity and the second argument is a positive finite odd integer, then the result is negative infinity.
  • If the first argument is less than zero and the second argument is a finite even integer, then the result is equal to the result of raising the absolute value of the first argument to the power of the second argument.
  • If the first argument is less than zero and the second argument is a finite odd integer, then the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument.
  • If the first argument is finite and less than zero and the second argument is finite and not an integer, then the result is NaN.
  • If both arguments are integers, then the result is exactly equal to the mathematical result of raising the first argument to the power of the second argument if that result can in fact be represented exactly as a double value.

(In the foregoing descriptions, a floating-point value is considered to be an integer if and only if it is a fixed point of the method ceil or, which is the same thing, a fixed point of the method floor. A value is a fixed point of a one-argument method if and only if the result of applying the method to the value is equal to the value.)

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters:
a - a double value.
b - a double value.
Returns:
the value ab.

round

public static int round(float a)
Returns the closest int to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. In other words, the result is equal to the value of the expression:

(int)Math.floor(a + 0.5f)

Special cases:

  • If the argument is NaN, the result is 0.
  • If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is equal to the value of Integer.MIN_VALUE.
  • If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is equal to the value of Integer.MAX_VALUE.
Parameters:
a - a float value.
Returns:
the value of the argument rounded to the nearest int value.
See Also:
Integer.MAX_VALUE, Integer.MIN_VALUE

round

public static long round(double a)
Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression:

(long)Math.floor(a + 0.5d)

Special cases:

  • If the argument is NaN, the result is 0.
  • If the argument is negative infinity or any value less than or equal to the value of Long.MIN_VALUE, the result is equal to the value of Long.MIN_VALUE.
  • If the argument is positive infinity or any value greater than or equal to the value of Long.MAX_VALUE, the result is equal to the value of Long.MAX_VALUE.
Parameters:
a - a double value.
Returns:
the value of the argument rounded to the nearest long value.
See Also:
Long.MAX_VALUE, Long.MIN_VALUE

random

public static double random()
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.

When this method is first called, it creates a single new pseudorandom-number generator, exactly as if by the expression

new java.util.Random
This new pseudorandom-number generator is used thereafter for all calls to this method and is used nowhere else.

This method is properly synchronized to allow correct use by more than one thread. However, if many threads need to generate pseudorandom numbers at a great rate, it may reduce contention for each thread to have its own pseudorandom-number generator.

Returns:
a pseudorandom double greater than or equal to 0.0 and less than 1.0.
See Also:
Random.nextDouble()

abs

public static int abs(int a)
Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.

Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.

Parameters:
a - an int value.
Returns:
the absolute value of the argument.
See Also:
Integer.MIN_VALUE

abs

public static long abs(long a)
Returns the absolute value of a long value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.

Note that if the argument is equal to the value of Long.MIN_VALUE, the most negative representable long value, the result is that same value, which is negative.

Parameters:
a - a long value.
Returns:
the absolute value of the argument.
See Also:
Long.MIN_VALUE

abs

public static float abs(float a)
Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
  • If the argument is infinite, the result is positive infinity.
  • If the argument is NaN, the result is NaN.
In other words, the result is equal to the value of the expression:

Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
Parameters:
a - a float value.
Returns:
the absolute value of the argument.

abs

public static double abs(double a)
Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
  • If the argument is infinite, the result is positive infinity.
  • If the argument is NaN, the result is NaN.
In other words, the result is equal to the value of the expression:

Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
Parameters:
a - a double value.
Returns:
the absolute value of the argument.

max

public static int max(int a,
                      int b)
Returns the greater of two int values. That is, the result is the argument closer to the value of Integer.MAX_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - an int value.
b - an int value.
Returns:
the larger of a and b.
See Also:
Long.MAX_VALUE

max

public static long max(long a,
                       long b)
Returns the greater of two long values. That is, the result is the argument closer to the value of Long.MAX_VALUE. If the argumens have the same value, the result is that same value.
Parameters:
a - a long value.
b - a long value.
Returns:
the larger of a and b.
See Also:
Long.MAX_VALUE

max

public static float max(float a,
                        float b)
Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Parameters:
a - a float value.
b - a float value.
Returns:
the larger of a and b.

max

public static double max(double a,
                         double b)
Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Parameters:
a - a double value.
b - a double value.
Returns:
the larger of a and b.

min

public static int min(int a,
                      int b)
Returns the smaller of two int values. That is, the result the argument closer to the value of Integer.MIN_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - an int value.
b - an int value.
Returns:
the smaller of a and b.
See Also:
Long.MIN_VALUE

min

public static long min(long a,
                       long b)
Returns the smaller of two long values. That is, the result is the argument closer to the value of Long.MIN_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - a long value.
b - a long value.
Returns:
the smaller of a and b.
See Also:
Long.MIN_VALUE

min

public static float min(float a,
                        float b)
Returns the smaller of two float values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Parameters:
a - a float value.
b - a float value.
Returns:
the smaller of a and b.

min

public static double min(double a,
                         double b)
Returns the smaller of two double values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Parameters:
a - a double value.
b - a double value.
Returns:
the smaller of a and b.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NegativeArraySizeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NegativeArraySizeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.NegativeArraySizeException
All Implemented Interfaces:
Serializable
public class NegativeArraySizeException
extends RuntimeException

Thrown if an application tries to create an array with negative size.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NegativeArraySizeException()
Constructs a NegativeArraySizeException with no detail message.
NegativeArraySizeException(String s)
Constructs a NegativeArraySizeException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NegativeArraySizeException

public NegativeArraySizeException()
Constructs a NegativeArraySizeException with no detail message.

NegativeArraySizeException

public NegativeArraySizeException(String s)
Constructs a NegativeArraySizeException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoClassDefFoundError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NoClassDefFoundError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.NoClassDefFoundError
All Implemented Interfaces:
Serializable
public class NoClassDefFoundError
extends LinkageError

Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NoClassDefFoundError()
Constructs a NoClassDefFoundError with no detail message.
NoClassDefFoundError(String s)
Constructs a NoClassDefFoundError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoClassDefFoundError

public NoClassDefFoundError()
Constructs a NoClassDefFoundError with no detail message.

NoClassDefFoundError

public NoClassDefFoundError(String s)
Constructs a NoClassDefFoundError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchFieldError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NoSuchFieldError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
                          |
                          +--java.lang.NoSuchFieldError
All Implemented Interfaces:
Serializable
public class NoSuchFieldError
extends IncompatibleClassChangeError

Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NoSuchFieldError()
Constructs a NoSuchFieldException with no detail message.
NoSuchFieldError(String s)
Constructs a NoSuchFieldException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchFieldError

public NoSuchFieldError()
Constructs a NoSuchFieldException with no detail message.

NoSuchFieldError

public NoSuchFieldError(String s)
Constructs a NoSuchFieldException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchFieldException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NoSuchFieldException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.NoSuchFieldException
All Implemented Interfaces:
Serializable
public class NoSuchFieldException
extends Exception

Signals that the class doesn't have a field of a specified name.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
NoSuchFieldException()
Constructor.
NoSuchFieldException(String s)
Constructor with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchFieldException

public NoSuchFieldException()
Constructor.

NoSuchFieldException

public NoSuchFieldException(String s)
Constructor with a detail message.
Parameters:
s - the detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchMethodError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NoSuchMethodError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.IncompatibleClassChangeError
                          |
                          +--java.lang.NoSuchMethodError
All Implemented Interfaces:
Serializable
public class NoSuchMethodError
extends IncompatibleClassChangeError

Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NoSuchMethodError()
Constructs a NoSuchMethodError with no detail message.
NoSuchMethodError(String s)
Constructs a NoSuchMethodError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchMethodError

public NoSuchMethodError()
Constructs a NoSuchMethodError with no detail message.

NoSuchMethodError

public NoSuchMethodError(String s)
Constructs a NoSuchMethodError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchMethodException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NoSuchMethodException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.NoSuchMethodException
All Implemented Interfaces:
Serializable
public class NoSuchMethodException
extends Exception

Thrown when a particular method cannot be found.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NoSuchMethodException()
Constructs a NoSuchMethodException without a detail message.
NoSuchMethodException(String s)
Constructs a NoSuchMethodException with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchMethodException

public NoSuchMethodException()
Constructs a NoSuchMethodException without a detail message.

NoSuchMethodException

public NoSuchMethodException(String s)
Constructs a NoSuchMethodException with a detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NullPointerException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NullPointerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.NullPointerException
All Implemented Interfaces:
Serializable
public class NullPointerException
extends RuntimeException

Thrown when an application attempts to use null in a case where an object is required. These include:

  • Calling the instance method of a null object.
  • Accessing or modifying the field of a null object.
  • Taking the length of null as if it were an array.
  • Accessing or modifying the slots of null as if it were an array.
  • Throwing null as if it were a Throwable value.

Applications should throw instances of this class to indicate other illegal uses of the null object.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
NullPointerException()
Constructs a NullPointerException with no detail message.
NullPointerException(String s)
Constructs a NullPointerException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NullPointerException

public NullPointerException()
Constructs a NullPointerException with no detail message.

NullPointerException

public NullPointerException(String s)
Constructs a NullPointerException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Number

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Number

java.lang.Object
  |
  +--java.lang.Number
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short
public abstract class Number
extends Object
implements Serializable

The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.

Subclasses of Number must provide methods to convert the represented numeric value to byte, double, float, int, long, and short.

Since:
JDK1.0
See Also:
Byte, Double, Float, Integer, Long, Short, Serialized Form

Constructor Summary
Number()
Method Summary
byte | byteValue() Returns the value of the specified number as a byte.
abstract double | doubleValue() Returns the value of the specified number as a double.
abstract float | floatValue() Returns the value of the specified number as a float.
abstract int | intValue() Returns the value of the specified number as an int.
abstract long | longValue() Returns the value of the specified number as a long.
short | shortValue() Returns the value of the specified number as a short.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Number

public Number()
Method Detail

intValue

public abstract int intValue()
Returns the value of the specified number as an int. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type int.

longValue

public abstract long longValue()
Returns the value of the specified number as a long. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public abstract float floatValue()
Returns the value of the specified number as a float. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public abstract double doubleValue()
Returns the value of the specified number as a double. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type double.

byteValue

public byte byteValue()
Returns the value of the specified number as a byte. This may involve rounding or truncation.
Returns:
the numeric value represented by this object after conversion to type byte.
Since:
JDK1.1

shortValue

public short shortValue()
Returns the value of the specified number as a short. This may involve rounding or truncation.
Returns:
the numeric value represented by this object after conversion to type short.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumberFormatException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class NumberFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
                          |
                          +--java.lang.NumberFormatException
All Implemented Interfaces:
Serializable
public class NumberFormatException
extends IllegalArgumentException

Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.

Since:
JDK1.0
See Also:
Integer.toString(), Serialized Form

Constructor Summary
NumberFormatException()
Constructs a NumberFormatException with no detail message.
NumberFormatException(String s)
Constructs a NumberFormatException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NumberFormatException

public NumberFormatException()
Constructs a NumberFormatException with no detail message.

NumberFormatException

public NumberFormatException(String s)
Constructs a NumberFormatException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Object

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Object

java.lang.Object
public class Object

Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

Since:
JDK1.0
See Also:
Class

Constructor Summary
Object()
Method Summary
protected  Object clone()
Creates and returns a copy of this object.
 boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
protected  void finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
 Class getClass()
Returns the runtime class of an object.
 int hashCode()
Returns a hash code value for the object.
 void notify()
Wakes up a single thread that is waiting on this object's monitor.
 void notifyAll()
Wakes up all threads that are waiting on this object's monitor.
 String toString()
Returns a string representation of the object.
 void wait()
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.
 void wait(long timeout)
Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed.
 void wait(long timeout, int nanos)
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

Constructor Detail

Object

public Object()
Method Detail

getClass

public final Class getClass()
Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class.
Returns:
the object of type Class that represents the runtime class of the object.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Returns:
a hash code value for this object.
See Also:
equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

  • It is reflexive: for any reference value x, x.equals(x) should return true.
  • It is symmetric: for any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any reference values x,
     y, and z, if x.equals(y)
     returns  true and y.equals(z) returns
     true, then x.equals(z) should return
     true.
  • It is consistent: for any reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the object is modified.
  • For any non-null reference value x, x.equals(null) should return false.

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

clone

protected Object clone()
                throws CloneNotSupportedException
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:
 x.clone() != x
will be true, and that the expression:
 x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
 x.clone().equals(x)
will be true, this is not an absolute requirement. Copying an object will typically entail creating a new instance of its class, but it also may require copying of internal data structures as well. No constructors are called.

The method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.

The class Object does not itself implement the interface Cloneable, so calling the clone method on an object whose class is Object will result in throwing an exception at run time. The clone method is implemented by the class Object as a convenient, general utility for subclasses that implement the interface Cloneable, possibly also overriding the clone method, in which case the overriding definition can refer to this utility definition by the call:

 super.clone()
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

toString

public String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns:
a string representation of the object.

notify

public final void notify()
Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.

The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. The awakened thread will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways:

  • By executing a synchronized instance method of that object.
  • By executing the body of a synchronized statement that synchronizes on the object.
  • For objects of type Class, by executing a synchronized static method of that class.

Only one thread at a time can own an object's monitor.

Throws:
IllegalMonitorStateException - if the current thread is not the owner of this object's monitor.
See Also:
notifyAll(), wait()

notifyAll

public final void notifyAll()
Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.

The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Throws:
IllegalMonitorStateException - if the current thread is not the owner of this object's monitor.
See Also:
notify(), wait()

wait

public final void wait(long timeout)
                throws InterruptedException
Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed.

The current thread must own this object's monitor.

This method causes the current thread (call it T) to place itself in the wait set for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens:

  • Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened.
  • Some other thread invokes the notifyAll method for this object.
  • Some other thread interrupts thread T.
  • The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.
The thread T is then removed from the wait set for this object and re-enabled for thread scheduling. It then competes in the usual manner with other threads for the right to synchronize on the object; once it has gained control of the object, all its synchronization claims on the object are restored to the status quo ante - that is, to the situation as of the time that the wait method was invoked. Thread T then returns from the invocation of the wait method. Thus, on return from the wait method, the synchronization state of the object and of thread T is exactly as it was when the wait method was invoked.

If the current thread is interrupted by another thread while it is waiting, then an InterruptedException is thrown. This exception is not thrown until the lock status of this object has been restored as described above.

Note that the wait method, as it places the current thread into the wait set for this object, unlocks only this object; any other objects on which the current thread may be synchronized remain locked while the thread waits.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Parameters:
timeout - the maximum time to wait in milliseconds.
Throws:
IllegalArgumentException - if the value of timeout is negative.
IllegalMonitorStateException - if the current thread is not the owner of the object's monitor.
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
See Also:
notify(), notifyAll()

wait

public final void wait(long timeout,
                       int nanos)
                throws InterruptedException
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by:

 1000000*millis+nanos

In all other respects, this method does the same thing as the method wait(long) of one argument. In particular, wait(0, 0) means the same thing as wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred:

  • Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method.
  • The timeout period, specified by timeout milliseconds plus nanos nanoseconds arguments, has elapsed.

The thread then waits until it can re-obtain ownership of the monitor and resumes execution

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Parameters:
timeout - the maximum time to wait in milliseconds.
nanos - additional time, in nanoseconds range 0-999999.
Throws:
IllegalArgumentException - if the value of timeout is negative or the value of nanos is not in the range 0-999999.
IllegalMonitorStateException - if the current thread is not the owner of this object's monitor.
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

wait

public final void wait()
                throws InterruptedException
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object. In other word's this method behaves exactly as if it simply performs the call wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The thread then waits until it can re-obtain ownership of the monitor and resumes execution.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Throws:
IllegalMonitorStateException - if the current thread is not the owner of the object's monitor.
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
See Also:
notify(), notifyAll()

finalize

protected void finalize()
                 throws Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

The general contract of finalize is that it is invoked if and when the JavaTM virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutOfMemoryError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class OutOfMemoryError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.VirtualMachineError
                    |
                    +--java.lang.OutOfMemoryError
All Implemented Interfaces:
Serializable
public class OutOfMemoryError
extends VirtualMachineError

Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
OutOfMemoryError()
Constructs an OutOfMemoryError with no detail message.
OutOfMemoryError(String s)
Constructs an OutOfMemoryError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OutOfMemoryError

public OutOfMemoryError()
Constructs an OutOfMemoryError with no detail message.

OutOfMemoryError

public OutOfMemoryError(String s)
Constructs an OutOfMemoryError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Package

java.lang.Object
  |
  +--java.lang.Package
public class Package
extends Object

Package objects contain version information about the implementation and specification of a Java package. This versioning information is retrieved and made available by the classloader that loaded the class(es). Typically, it is stored in the manifest that is distributed with the classes.

The set of classes that make up the package may implement a particular specification and if so the specification title, version number, and vendor strings identify that specification. An application can ask if the package is compatible with a particular version, see the isCompatibleWith method for details.

Specification version numbers use a "Dewey Decimal" syntax that consists of positive decimal integers separated by periods ".", for example, "2.0" or "1.2.3.4.5.6.7". This allows an extensible number to be used to represent major, minor, micro, etc versions. The version number must begin with a number.

The implementation title, version, and vendor strings identify an implementation and are made available conveniently to enable accurate reporting of the packages involved when a problem occurs. The contents all three implementation strings are vendor specific. The implementation version strings have no specified syntax and should only be compared for equality with desired version identifers. Within each classloader all classes from the same java package have the same Package object. The static methods allow a package to be found by name or the set of all packages known to the current class loader to be found.

See Also:
ClassLoader.definePackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.net.URL)

Method Summary
String | getImplementationTitle() Return the title of this package.
String | getImplementationVendor() Returns the name of the organization, vendor or company that provided this implementation.
String | getImplementationVersion() Return the version of this implementation.
String | getName() Return the name of this package.
static Package | getPackage(String name) Find a package by name in the callers classloader.
static Package[] | getPackages() Get all the packages currently known for the caller's class loader.
String | getSpecificationTitle() Return the title of the specification that this package implements.
String | getSpecificationVendor() Return the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package.
String | getSpecificationVersion() Returns the version number of the specification that this package implements.
int | hashCode() Return the hashcode computed from the package name.
boolean | isCompatibleWith(String desired) Compare this package's specification version with a desired version.
boolean | isSealed() Returns true if this package is sealed.
boolean | isSealed(URL url) Returns true if this package is sealed with respect to the specified code source url.
String | toString() Returns the string representation of this Package.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getName

public String getName()
Return the name of this package.
Returns:
The name of this package using the Java language dot notation for the package. i.e java.lang

getSpecificationTitle

public String getSpecificationTitle()
Return the title of the specification that this package implements.
Returns:
the specification title, null is returned if it is not known.

getSpecificationVersion

public String getSpecificationVersion()
Returns the version number of the specification that this package implements. This version string must be a sequence of positive decimal integers separated by "."'s and may have leading zeros. When version strings are compared the most significant numbers are compared.
Returns:
the specification version, null is returned if it is not known.

getSpecificationVendor

public String getSpecificationVendor()
Return the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package.
Returns:
the specification vendor, null is returned if it is not known.

getImplementationTitle

public String getImplementationTitle()
Return the title of this package.
Returns:
the title of the implementation, null is returned if it is not known.

getImplementationVersion

public String getImplementationVersion()
Return the version of this implementation. It consists of any string assigned by the vendor of this implementation and does not have any particular syntax specified or expected by the Java runtime. It may be compared for equality with other package version strings used for this implementation by this vendor for this package.
Returns:
the version of the implementation, null is returned if it is not known.

getImplementationVendor

public String getImplementationVendor()
Returns the name of the organization, vendor or company that provided this implementation.
Returns:
the vendor that implemented this package..

isSealed

public boolean isSealed()
Returns true if this package is sealed.
Returns:
true if the package is sealed, false otherwise

isSealed

public boolean isSealed(URL url)
Returns true if this package is sealed with respect to the specified code source url.
Parameters:
url - the code source url
Returns:
true if this package is sealed with respect to url

isCompatibleWith

public boolean isCompatibleWith(String desired)
                         throws NumberFormatException
Compare this package's specification version with a desired version. It returns true if this packages specification version number is greater than or equal to the desired version number.

Version numbers are compared by sequentially comparing corresponding components of the desired and specification strings. Each component is converted as a decimal integer and the values compared. If the specification value is greater than the desired value true is returned. If the value is less false is returned. If the values are equal the period is skipped and the next pair of components is compared.

Parameters:
desired - the version string of the desired version.
Returns:
true if this package's version number is greater than or equal to the desired version number
Throws:
NumberFormatException - if the desired or current version is not of the correct dotted form.

getPackage

public static Package getPackage(String name)
Find a package by name in the callers classloader. The callers classloader is used to find the package instance corresponding to the named class. If the callers classloader is null then the set of packages loaded by the system classloader is searched to find the named package.

Packages have attributes for versions and specifications only if the class loader created the package instance with the appropriate attributes. Typically, those attributes are defined in the manifests that accompany the classes.

Parameters:
name - a package name, for example, java.lang.
Returns:
the package of the requested name. It may be null if no package information is available from the archive or codebase.

getPackages

public static Package[] getPackages()
Get all the packages currently known for the caller's class loader. Those packages correspond to classes loaded via or accessible by name to that class loader. If the caller's class loader is the bootstrap classloader, which may be represented by null in some implementations, only packages corresponding to classes loaded by the bootstrap class loader will be returned.
Returns:
a new array of packages known to the callers classloader. An zero length array is returned if none are known.

hashCode

public int hashCode()
Return the hashcode computed from the package name.
Overrides:
hashCode in class Object
Returns:
the hodecode computed from the package name.

toString

public String toString()
Returns the string representation of this Package. Its value is the string "package " and the package name. If the package title is defined it is appended. If the package version is defined it is appended.
Overrides:
toString in class Object
Returns:
the string representation of the package.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package java.lang

Provides classes that are fundamental to the design of the Java programming language.

See:
Description

Interface Summary
Cloneable | A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class.
Comparable | This interface imposes a total ordering on the objects of each class that implements it.
Runnable | The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.

Class Summary
Boolean | The Boolean class wraps a value of the primitive type boolean in an object.
Byte | The Byte class is the standard wrapper for byte values.
Character | The Character class wraps a value of the primitive type char in an object.
Character.Subset | Instances of this class represent particular subsets of the Unicode character set.
Character.UnicodeBlock | A family of character subsets representing the character blocks defined by the Unicode 2.0 specification.
Class | Instances of the class Class represent classes and interfaces in a running Java application.
ClassLoader | The class ClassLoader is an abstract class.
Compiler | The Compiler class is provided to support Java-to-native-code compilers and related services.
Double | The Double class wraps a value of the primitive type double in an object.
Float | The Float class wraps a value of primitive type float in an object.
InheritableThreadLocal | This class extends ThreadLocal to provide inheritance of values from parent Thread to child Thread: when a child thread is created, the child receives initial values for all InheritableThreadLocals for which the parent has values.
Integer | The Integer class wraps a value of the primitive type int in an object.
Long | The Long class wraps a value of the primitive type long in an object.
Math | The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
Number | The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Object | Class Object is the root of the class hierarchy.
Package | Package objects contain version information about the implementation and specification of a Java package.
Process | The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.
Runtime | Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
RuntimePermission | This class is for runtime permissions.
SecurityManager | The security manager is a class that allows applications to implement a security policy.
Short | The Short class is the standard wrapper for short values.
StrictMath | The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
String | The String class represents character strings.
StringBuffer | A string buffer implements a mutable sequence of characters.
System | The System class contains several useful class fields and methods.
Thread | A thread is a thread of execution in a program.
ThreadGroup | A thread group represents a set of threads.
ThreadLocal | This class provides ThreadLocal variables.
Throwable | The Throwable class is the superclass of all errors and exceptions in the Java language.
Void | The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.

Exception Summary
ArithmeticException | Thrown when an exceptional arithmetic condition has occurred.
ArrayIndexOutOfBoundsException | Thrown to indicate that an array has been accessed with an illegal index.
ArrayStoreException | Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects.
ClassCastException | Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
ClassNotFoundException | Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
CloneNotSupportedException | Thrown to indicate that the clone method in class Object has been called to clone an object, but that the object's class does not implement the Cloneable interface.
Exception | The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
IllegalAccessException | Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
IllegalArgumentException | Thrown to indicate that a method has been passed an illegal or inappropriate argument.
IllegalMonitorStateException | Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
IllegalStateException | Signals that a method has been invoked at an illegal or inappropriate time.
IllegalThreadStateException | Thrown to indicate that a thread is not in an appropriate state for the requested operation.
IndexOutOfBoundsException | Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
InstantiationException | Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
InterruptedException | Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.
NegativeArraySizeException | Thrown if an application tries to create an array with negative size.
NoSuchFieldException | Signals that the class doesn't have a field of a specified name.
NoSuchMethodException | Thrown when a particular method cannot be found.
NullPointerException | Thrown when an application attempts to use null in a case where an object is required.
NumberFormatException | Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
RuntimeException | RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
SecurityException | Thrown by the security manager to indicate a security violation.
StringIndexOutOfBoundsException | Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
UnsupportedOperationException | Thrown to indicate that the requested operation is not supported.

Error Summary
AbstractMethodError | Thrown when an application tries to call an abstract method.
ClassCircularityError | Thrown when a circularity has been detected while initializing a class.
ClassFormatError | Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
Error | An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
ExceptionInInitializerError | Signals that an unexpected exception has occurred in a static initializer.
IllegalAccessError | Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
IncompatibleClassChangeError | Thrown when an incompatible class change has occurred to some class definition.
InstantiationError | Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
InternalError | Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
LinkageError | Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
NoClassDefFoundError | Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
NoSuchFieldError | Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
NoSuchMethodError | Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
OutOfMemoryError | Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
StackOverflowError | Thrown when a stack overflow occurs because an application recurses too deeply.
ThreadDeath | An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.
UnknownError | Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.
UnsatisfiedLinkError | Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
UnsupportedClassVersionError | Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
VerifyError | Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
VirtualMachineError | Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Package java.lang Description

Provides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time.

Frequently it is necessary to represent a value of primitive type as if it were an object. The wrapper classes Boolean, Character, Integer, Long, Float, and Double serve this purpose. An object of type Double, for example, contains a field whose type is double, representing that value in such a way that a reference to it can be stored in a variable of reference type. These classes also provide a number of methods for converting among primitive values, as well as supporting such standard methods as equals and hashCode. The Void class is a non-instantiable class that holds a reference to a Class object represening the primitive type void.

The class Math provides commonly used mathematical functions such as sine, cosine, and square root. The classes String and StringBuffer similarly provide commonly used operations on character strings.

Classes ClassLoader, Process, Runtime, SecurityManager, and System provide "system operations" that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.

Class Throwable encompasses objects that may be thrown by the throw statement (§14.16). Subclasses of Throwable represent errors and exceptions.

Package Specification

Character Encodings

Various constructors and methods in the java.lang and java.io packages accept string arguments that specify the character encoding to be used when converting between raw eight-bit bytes and sixteen-bit Unicode characters. Such encodings are named by strings composed of the following characters:
  • The uppercase letters 'A' through 'Z' ('\u0041' through '\u005a'),
  • The lowercase letters 'a' through 'z' ('\u0061' through '\u007a'),
  • The digits '0' through '9' ('\u0030' through '\u0039'),
  • The dash character '-' ('\u002d', HYPHEN-MINUS),
  • The colon character ':' ('\u003a', COLON), and
  • The underscore character '_' ('\u005f', LOW LINE).
An encoding name must begin with either a letter or a digit. The empty string is not a legal encoding name.

An encoding may have more than one name. One of an encoding's names is considered to be its canonical name. The canonical name of an encoding is the name returned by the getEncoding methods of the InputStreamReader and OutputStreamWriter classes.

Encoding names generally follow the conventions documented in RFC2278: IANA Charset Registration Procedures. If an encoding listed in the IANA Charset Registry is supported by an implementation of the Java platform then one of its names must be the name listed in the registry. Many encodings are given more than one name in the registry, in which case the registry identifies one of the names as MIME-preferred. An implementation of the Java platform must support the MIME-preferred registry name for a supported encoding if there is one; for convenience it may additionally support other registry names. The IANA MIME-preferred name of an encoding, if there is one, is often, but not necessarily, its canonical name. Following IANA convention, the mapping from IANA registry names to encodings is not case-sensitive.

Every implementation of the Java platform is required to support the following character encodings. Consult the release documentation for your implementation to see if any other encodings are supported.

US-ASCII | Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
ISO-8859-1   | ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
UTF-8 | Eight-bit Unicode Transformation Format
UTF-16BE | Sixteen-bit Unicode Transformation Format, big-endian byte order
UTF-16LE | Sixteen-bit Unicode Transformation Format, little-endian byte order
UTF-16 | Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output)
The various Unicode Transformation Formats are described in detail in The Unicode Standard and in the Unicode FAQ.

Every instance of the Java virtual machine has a default character encoding. The default encoding is determined during virtual-machine startup and typically depends upon the locale and encoding being used by the underlying operating system.

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Process

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Process

java.lang.Object
  |
  +--java.lang.Process
public abstract class Process
extends Object

The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it. The class Process provides methods for performing input from the process, performing output to the process, waiting for the process to complete, checking the exit status of the process, and destroying (killing) the process.

The Runtime.exec methods may not work well for special processes on certain native platforms, such as native windowing processes, daemon processes, Win16/DOS processes on Win32, or shell scripts. The created subprocess does not have its own terminal or console. All its standard io (i.e. stdin, stdout, stderr) operations will be redirected to the parent process through three streams (Process.getOutputStream(), Process.getInputStream(), Process.getErrorStream()). The parent process uses these streams to feed input to and get output from the subprocess. Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

The subprocess is not killed when there are no more references to the Process object, but rather the subprocess continues executing asynchronously.

There is no requirement that a process represented by a Process object execute asynchronously or concurrently with respect to the Java process that owns the Process object.

Since:
JDK1.0
See Also:
Runtime.exec(java.lang.String),
Runtime.exec(java.lang.String, java.lang.String[]),
Runtime.exec(java.lang.String[]),
Runtime.exec(java.lang.String[], java.lang.String[])

Constructor Summary
Process()
Method Summary
abstract void | destroy() Kills the subprocess.
abstract int | exitValue() Returns the exit value for the subprocess.
abstract InputStream | getErrorStream() Gets the error stream of the subprocess.
abstract InputStream | getInputStream() Gets the input stream of the subprocess.
abstract OutputStream | getOutputStream() Gets the output stream of the subprocess.
abstract int | waitFor() causes the current thread to wait, if necessary, until the process represented by this Process object has terminated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Process

public Process()
Method Detail

getOutputStream

public abstract OutputStream getOutputStream()
Gets the output stream of the subprocess. Output to the stream is piped into the standard input stream of the process represented by this Process object.

Implementation note: It is a good idea for the output stream to be buffered.

Returns:
the output stream connected to the normal input of the subprocess.

getInputStream

public abstract InputStream getInputStream()
Gets the input stream of the subprocess. The stream obtains data piped from the standard output stream of the process represented by this Process object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the normal output of the subprocess.

getErrorStream

public abstract InputStream getErrorStream()
Gets the error stream of the subprocess. The stream obtains data piped from the error output stream of the process represented by this Process object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the error stream of the subprocess.

waitFor

public abstract int waitFor()
                     throws InterruptedException
causes the current thread to wait, if necessary, until the process represented by this Process object has terminated. This method returns immediately if the subprocess has already terminated. If the subprocess has not yet terminated, the calling thread will be blocked until the subprocess exits.
Returns:
the exit value of the process. By convention, 0 indicates normal termination.
Throws:
InterruptedException - if the current thread is interrupted by another thread while it is waiting, then the wait is ended and an InterruptedException is thrown.

exitValue

public abstract int exitValue()
Returns the exit value for the subprocess.
Returns:
the exit value of the subprocess represented by this Process object. by convention, the value 0 indicates normal termination.
Throws:
IllegalThreadStateException - if the subprocess represented by this Process object has not yet terminated.

destroy

public abstract void destroy()
Kills the subprocess. The subprocess represented by this Process object is forcibly terminated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.lang.ref Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.lang.ref

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.ref.Reference
      • class java.lang.ref.PhantomReference
      • class java.lang.ref.SoftReference
      • class java.lang.ref.WeakReference
    • class java.lang.ref.ReferenceQueue
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package java.lang.ref

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.lang.ref

Packages that use java.lang.ref
java.lang.ref Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

Classes in java.lang.ref used by java.lang.ref
Reference
Abstract base class for reference objects.
ReferenceQueue
Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ref.PhantomReference

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ref.PhantomReference

No usage of java.lang.ref.PhantomReference

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ref.SoftReference

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ref.SoftReference

No usage of java.lang.ref.SoftReference

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ref.WeakReference

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ref.WeakReference

No usage of java.lang.ref.WeakReference

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ref.Reference

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ref.Reference

Packages that use Reference
java.lang.ref Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

Uses of Reference in java.lang.ref

Subclasses of Reference in java.lang.ref
class | PhantomReference Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
class | SoftReference Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
class | WeakReference Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Methods in java.lang.ref that return Reference
Reference | ReferenceQueue.poll() Polls this queue to see if a reference object is available, returning one immediately if so.
Reference | ReferenceQueue.remove(long timeout) Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
Reference | ReferenceQueue.remove() Removes the next reference object in this queue, blocking until one becomes available.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.ref.ReferenceQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.ref.ReferenceQueue

Packages that use ReferenceQueue
java.lang.ref Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

Uses of ReferenceQueue in java.lang.ref

Constructors in java.lang.ref with parameters of type ReferenceQueue
PhantomReference(Object referent, ReferenceQueue q)
Creates a new phantom reference that refers to the given object and is registered with the given queue.
WeakReference(Object referent, ReferenceQueue q)
Creates a new weak reference that refers to the given object and is registered with the given queue.
SoftReference(Object referent, ReferenceQueue q)
Creates a new soft reference that refers to the given object and is registered with the given queue.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.lang.ref

Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

See:
Description

Class Summary
PhantomReference | Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed.
Reference | Abstract base class for reference objects.
ReferenceQueue | Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
SoftReference | Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
WeakReference | Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed.

Package java.lang.ref Description

Provides reference-object classes, which support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed.

Package Specification

A reference object encapsulates a reference to some other object so that the reference itself may be examined and manipulated like any other object. Three types of reference objects are provided, each weaker than the last: soft, weak, and phantom. Each type corresponds to a different level of reachability, as defined below. Soft references are for implementing memory-sensitive caches, weak references are for implementing canonicalizing mappings that do not prevent their keys (or values) from being reclaimed, and phantom references are for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.

Each reference-object type is implemented by a subclass of the abstract base Reference class. An instance of one of these subclasses encapsulates a single reference to a particular object, called the referent. Every reference object provides methods for getting and clearing the reference. Aside from the clearing operation reference objects are otherwise immutable, so no set operation is provided. A program may further subclass these subclasses, adding whatever fields and methods are required for its purposes, or it may use these subclasses without change.

Notification

A program may request to be notified of changes in an object's reachability by registering an appropriate reference object with a reference queue at the time the reference object is created. Some time after the garbage collector determines that the reachability of the referent has changed to the value corresponding to the type of the reference, it will add the reference to the associated queue. At this point, the reference is considered to be enqueued. The program may remove references from a queue either by polling or by blocking until a reference becomes available. Reference queues are implemented by the ReferenceQueue class.

The relationship between a registered reference object and its queue is one-sided. That is, a queue does not keep track of the references that are registered with it. If a registered reference becomes unreachable itself, then it will never be enqueued. It is the responsibility of the program using reference objects to ensure that the objects remain reachable for as long as the program is interested in their referents.

While some programs will choose to dedicate a thread to removing reference objects from one or more queues and processing them, this is by no means necessary. A tactic that often works well is to examine a reference queue in the course of performing some other fairly-frequent action. For example, a hashtable that uses weak references to implement weak keys could poll its reference queue each time the table is accessed. This is how the WeakHashMap class works. Because the ReferenceQueue.poll method simply checks an internal data structure, this check will add little overhead to the hashtable access methods.

Automatically-cleared references

Soft and weak references are automatically cleared by the collector before being added to the queues with which they are registered, if any. Therefore soft and weak references need not be registered with a queue in order to be useful, while phantom references do. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable.

Reachability

Going from strongest to weakest, the different levels of reachability reflect the life cycle of an object. They are operationally defined as follows:
  • An object is strongly reachable if it can be reached by some thread without traversing any reference objects. A newly-created object is strongly reachable by the thread that created it.
  • An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.
  • An object is weakly reachable if it is neither strongly nor softly reachable but can be reached by traversing a weak reference. When the weak references to a weakly-reachable object are cleared, the object becomes eligible for finalization.
  • An object is phantom reachable if it is neither strongly, softly, nor weakly reachable, it has been finalized, and some phantom reference refers to it.
  • Finally, an object is unreachable, and therefore eligible for reclamation, when it is not reachable in any of the above ways.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


PhantomReference

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.ref
Class PhantomReference

java.lang.Object
  |
  +--java.lang.ref.Reference
        |
        +--java.lang.ref.PhantomReference
public class PhantomReference
extends Reference

Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed. Phantom references are most often used for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.

If the garbage collector determines at a certain point in time that the referent of a phantom reference is phantom reachable, then at that time or at some later time it will enqueue the reference.

In order to ensure that a reclaimable object remains so, the referent of a phantom reference may not be retrieved: The get method of a phantom reference always returns null.

Unlike soft and weak references, phantom references are not automatically cleared by the garbage collector as they are enqueued. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable.

Since:
1.2

Constructor Summary
PhantomReference(Object referent, ReferenceQueue q)
Creates a new phantom reference that refers to the given object and is registered with the given queue.
Method Summary
 Object get()
Returns this reference object's referent.
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PhantomReference

public PhantomReference(Object referent,
                        ReferenceQueue q)
Creates a new phantom reference that refers to the given object and is registered with the given queue.
Throws:
NullPointerException - If the queue argument is null
Method Detail

get

public Object get()
Returns this reference object's referent. Because the referent of a phantom reference is always inaccessible, this method always returns null.
Overrides:
get in class Reference
Returns:
null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Reference

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.ref
Class Reference

java.lang.Object
  |
  +--java.lang.ref.Reference
Direct Known Subclasses:
PhantomReference, SoftReference, WeakReference
public abstract class Reference
extends Object

Abstract base class for reference objects. This class defines the operations common to all reference objects. Because reference objects are implemented in close cooperation with the garbage collector, this class may not be subclassed directly.

Since:
1.2

Method Summary
void | clear() Clears this reference object.
boolean | enqueue() Adds this reference object to the queue with which it is registered, if any.
Object | get() Returns this reference object's referent.
boolean | isEnqueued() Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

get

public Object get()
Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
Returns:
The object to which this reference refers, or null if this reference object has been cleared

clear

public void clear()
Clears this reference object. Invoking this method will not cause this object to be enqueued.

isEnqueued

public boolean isEnqueued()
Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector. If this reference object was not registered with a queue when it was created, then this method will always return false.
Returns:
true if and only if this reference object has been enqueued

enqueue

public boolean enqueue()
Adds this reference object to the queue with which it is registered, if any.
Returns:
true if this reference object was successfully enqueued; false if it was already enqueued or if it was not registered with a queue when it was created
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReferenceQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.ref
Class ReferenceQueue

java.lang.Object
  |
  +--java.lang.ref.ReferenceQueue
public class ReferenceQueue
extends Object

Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.

Since:
1.2

Constructor Summary
ReferenceQueue()
Constructs a new reference-object queue.
Method Summary
Reference | poll() Polls this queue to see if a reference object is available, returning one immediately if so.
Reference | remove() Removes the next reference object in this queue, blocking until one becomes available.
Reference | remove(long timeout) Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ReferenceQueue

public ReferenceQueue()
Constructs a new reference-object queue.
Method Detail

poll

public Reference poll()
Polls this queue to see if a reference object is available, returning one immediately if so. If the queue is empty, this method immediately returns null.
Returns:
A reference object, if one was immediately available, otherwise null

remove

public Reference remove(long timeout)
                 throws IllegalArgumentException,
                        InterruptedException
Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
Parameters:
timeout - If positive, block for up timeout milliseconds while waiting for a reference to be added to this queue. If zero, block indefinitely.
Returns:
A reference object, if one was available within the specified timeout period, otherwise null
Throws:
IllegalArgumentException - If the value of the timeout argument is negative
InterruptedException - If the timeout wait is interrupted

remove

public Reference remove()
                 throws InterruptedException
Removes the next reference object in this queue, blocking until one becomes available.
Throws:
InterruptedException - If the wait is interrupted
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SoftReference

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.ref
Class SoftReference

java.lang.Object
  |
  +--java.lang.ref.Reference
        |
        +--java.lang.ref.SoftReference
public class SoftReference
extends Reference

Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand. Soft references are most often used to implement memory-sensitive caches.

Suppose that the garbage collector determines at a certain point in time that an object is softly reachable. At that time it may choose to clear atomically all soft references to that object and all soft references to any other softly-reachable objects from which that object is reachable through a chain of strong references. At the same time or at some later time it will enqueue those newly-cleared soft references that are registered with reference queues.

All soft references to softly-reachable objects are guaranteed to have been cleared before the virtual machine throws an OutOfMemoryError. Otherwise no constraints are placed upon the time at which a soft reference will be cleared or the order in which a set of such references to different objects will be cleared. Virtual machine implementations are, however, encouraged to bias against clearing recently-created or recently-used soft references.

Direct instances of this class may be used to implement simple caches; this class or derived subclasses may also be used in larger data structures to implement more sophisticated caches. As long as the referent of a soft reference is strongly reachable, that is, is actually in use, the soft reference will not be cleared. Thus a sophisticated cache can, for example, prevent its most recently used entries from being discarded by keeping strong referents to those entries, leaving the remaining entries to be discarded at the discretion of the garbage collector.

Since:
1.2

Constructor Summary
SoftReference(Object referent)
Creates a new soft reference that refers to the given object.
SoftReference(Object referent, ReferenceQueue q)
Creates a new soft reference that refers to the given object and is registered with the given queue.
Method Summary
 Object get()
Returns this reference object's referent.
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SoftReference

public SoftReference(Object referent)
Creates a new soft reference that refers to the given object. The new reference is not registered with any queue.

SoftReference

public SoftReference(Object referent,
                     ReferenceQueue q)
Creates a new soft reference that refers to the given object and is registered with the given queue.
Throws:
NullPointerException - If the queue argument is null
Method Detail

get

public Object get()
Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
Overrides:
get in class Reference
Returns:
The object to which this reference refers, or null if this reference object has been cleared
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeakReference

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.ref
Class WeakReference

java.lang.Object
  |
  +--java.lang.ref.Reference
        |
        +--java.lang.ref.WeakReference
public class WeakReference
extends Reference

Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed. Weak references are most often used to implement canonicalizing mappings.

Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all weak references to that object and all weak references to any other weakly-reachable objects from which that object is reachable through a chain of strong and soft references. At the same time it will declare all of the formerly weakly-reachable objects to be finalizable. At the same time or at some later time it will enqueue those newly-cleared weak references that are registered with reference queues.

Since:
1.2

Constructor Summary
WeakReference(Object referent)
Creates a new weak reference that refers to the given object.
WeakReference(Object referent, ReferenceQueue q)
Creates a new weak reference that refers to the given object and is registered with the given queue.
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WeakReference

public WeakReference(Object referent)
Creates a new weak reference that refers to the given object. The new reference is not registered with any queue.

WeakReference

public WeakReference(Object referent,
                     ReferenceQueue q)
Creates a new weak reference that refers to the given object and is registered with the given queue.
Throws:
NullPointerException - If the queue argument is null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.lang.reflect Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.lang.reflect

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.reflect.AccessibleObject
      • class java.lang.reflect.Constructor (implements java.lang.reflect.Member)
      • class java.lang.reflect.Field (implements java.lang.reflect.Member)
      • class java.lang.reflect.Method (implements java.lang.reflect.Member)
    • class java.lang.reflect.Array
    • class java.lang.reflect.Modifier
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.lang.reflect.ReflectPermission
    • class java.lang.reflect.Proxy (implements java.io.Serializable)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.reflect.InvocationTargetException
        • class java.lang.RuntimeException
          • class java.lang.reflect.UndeclaredThrowableException

Interface Hierarchy

  • interface java.lang.reflect.InvocationHandler
  • interface java.lang.reflect.Member
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.lang.reflect

Provides classes and interfaces for obtaining reflective information about classes and objects.

See:
Description

Interface Summary
InvocationHandler | InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
Member | Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.

Class Summary
AccessibleObject | The AccessibleObject class is the base class for Field, Method and Constructor objects.
Array | The Array class provides static methods to dynamically create and access Java arrays.
Constructor | Constructor provides information about, and access to, a single constructor for a class.
Field | A Field provides information about, and dynamic access to, a single field of a class or an interface.
Method | A Method provides information about, and access to, a single method on a class or interface.
Modifier | The Modifier class provides static methods and constants to decode class and member access modifiers.
Proxy | Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.
ReflectPermission | The Permission class for reflective operations.

Exception Summary
InvocationTargetException | InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
UndeclaredThrowableException | Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

Package java.lang.reflect Description

Provides classes and interfaces for obtaining reflective information about classes and objects. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions.

AccessibleObject allows supression of access checks if the necessary ReflectPermission is available.

Arrays provides static methods to dynamically create and access arrays.

Classes in this package, along with java.lang.Class accommodate applications such as debuggers, interpreters, object inspectors, class browsers, and services such as Object Serialization and JavaBeans that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.lang.reflect

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.lang.reflect

Packages that use java.lang.reflect
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans | Contains classes related to Java Beans development.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Classes in java.lang.reflect used by java.awt
InvocationTargetException
InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.

Classes in java.lang.reflect used by java.beans
Method
A Method provides information about, and access to, a single method on a class or interface.

Classes in java.lang.reflect used by java.lang
Constructor
Constructor provides information about, and access to, a single constructor for a class.
Field
A Field provides information about, and dynamic access to, a single field of a class or an interface.
Method
A Method provides information about, and access to, a single method on a class or interface.

Classes in java.lang.reflect used by java.lang.reflect
AccessibleObject
The AccessibleObject class is the base class for Field, Method and Constructor objects.
InvocationHandler
InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
InvocationTargetException
InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.
Member
Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
Method
A Method provides information about, and access to, a single method on a class or interface.

Classes in java.lang.reflect used by java.rmi.server
Method
A Method provides information about, and access to, a single method on a class or interface.

Classes in java.lang.reflect used by javax.swing
InvocationTargetException
InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AccessibleObject

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class AccessibleObject

java.lang.Object
  |
  +--java.lang.reflect.AccessibleObject
Direct Known Subclasses:
Constructor, Field, Method
public class AccessibleObject
extends Object

The AccessibleObject class is the base class for Field, Method and Constructor objects. It provides the ability to flag a reflected object as suppressing default Java language access control checks when it is used. The access checks--for public, default (package) access, protected, and private members--are performed when Fields, Methods or Constructors are used to set or get fields, to invoke methods, or to create and initialize new instances of classes, respectively.

Setting the accessible flag in a reflected object permits sophisticated applications with sufficient privilege, such as Java Object Serialization or other persistence mechanisms, to manipulate objects in a manner that would normally be prohibited.

Since:
1.2
See Also:
Field, Method, Constructor, ReflectPermission

Constructor Summary
protected AccessibleObject()
Constructor: only used by the Java Virtual Machine.
Method Summary
boolean | isAccessible() Get the value of the accessible flag for this object.
static void | setAccessible(AccessibleObject[] array, boolean flag) Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).
void | setAccessible(boolean flag) Set the accessible flag for this object to the indicated boolean value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AccessibleObject

protected AccessibleObject()
Constructor: only used by the Java Virtual Machine.
Method Detail

setAccessible

public static void setAccessible(AccessibleObject[] array,
                                 boolean flag)
                          throws SecurityException
Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).

First, if there is a security manager, its checkPermission method is called with a ReflectPermission("suppressAccessChecks") permission.

A SecurityException is raised if flag is true but accessibility of any of the elements of the input array may not be changed (for example, if the element object is a Constructor object for the class Class). In the event of such a SecurityException, the accessiblity of objects is set to flag for array elements upto (and excluding) the element for which the exception occurred; the accessiblity of elements beyond (and including) the element for which the exception occurred is unchanged.

Parameters:
array - the array of AccessibleObjects
flag - the new value for the accessible flag in each object
Throws:
SecurityException - if the request is denied.
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setAccessible

public void setAccessible(boolean flag)
                   throws SecurityException
Set the accessible flag for this object to the indicated boolean value. A value of true indicates that the reflected object should suppress Java language access checking when it is used. A value of false indicates that the reflected object should enforce Java language access checks.

First, if there is a security manager, its checkPermission method is called with a ReflectPermission("suppressAccessChecks") permission.

A SecurityException is raised if flag is true but accessibility of this object may not be changed (for example, if this element object is a Constructor object for the class Class).

A SecurityException is raised if this object is a Constructor object for the class java.lang.Class, and flag is true.

Parameters:
flag - the new value for the accessible flag
Throws:
SecurityException - if the request is denied.
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

isAccessible

public boolean isAccessible()
Get the value of the accessible flag for this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Array

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Array

java.lang.Object
  |
  +--java.lang.reflect.Array
public final class Array
extends Object

The Array class provides static methods to dynamically create and access Java arrays.

Array permits widening conversions to occur during a get or set operation, but throws an IllegalArgumentException if a narrowing conversion would occur.

Method Summary
static Object | get(Object array, int index) Returns the value of the indexed component in the specified array object.
static boolean | getBoolean(Object array, int index) Returns the value of the indexed component in the specified array object, as a boolean.
static byte | getByte(Object array, int index) Returns the value of the indexed component in the specified array object, as a byte.
static char | getChar(Object array, int index) Returns the value of the indexed component in the specified array object, as a char.
static double | getDouble(Object array, int index) Returns the value of the indexed component in the specified array object, as a double.
static float | getFloat(Object array, int index) Returns the value of the indexed component in the specified array object, as a float.
static int | getInt(Object array, int index) Returns the value of the indexed component in the specified array object, as an int.
static int | getLength(Object array) Returns the length of the specified array object, as an int.
static long | getLong(Object array, int index) Returns the value of the indexed component in the specified array object, as a long.
static short | getShort(Object array, int index) Returns the value of the indexed component in the specified array object, as a short.
static Object | newInstance(Class componentType, int length) Creates a new array with the specified component type and length.
static Object | newInstance(Class componentType, int[] dimensions) Creates a new array with the specified component type and dimensions.
static void | set(Object array, int index, Object value) Sets the value of the indexed component of the specified array object to the specified new value.
static void | setBoolean(Object array, int index, boolean z) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | setByte(Object array, int index, byte b) Sets the value of the indexed component of the specified array object to the specified boolean value.
static void | setChar(Object array, int index, char c) Sets the value of the indexed component of the specified array object to the specified byte value.
static void | setDouble(Object array, int index, double d) Sets the value of the indexed component of the specified array object to the specified double value.
static void | setFloat(Object array, int index, float f) Sets the value of the indexed component of the specified array object to the specified float value.
static void | setInt(Object array, int index, int i) Sets the value of the indexed component of the specified array object to the specified int value.
static void | setLong(Object array, int index, long l) Sets the value of the indexed component of the specified array object to the specified long value.
static void | setShort(Object array, int index, short s) Sets the value of the indexed component of the specified array object to the specified short value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

newInstance

public static Object newInstance(Class componentType,
                                 int length)
                          throws NegativeArraySizeException
Creates a new array with the specified component type and length. Invoking this method is equivalent to creating an array as follows:
 int[] x = {length};
 Array.newInstance(componentType, x);
Parameters:
componentType - the Class object representing the component type of the new array
length - the length of the new array
Returns:
the new array
Throws:
NullPointerException - if the specified componentType parameter is null
NegativeArraySizeException - if the specified length is negative

newInstance

public static Object newInstance(Class componentType,
                                 int[] dimensions)
                          throws IllegalArgumentException,
                                 NegativeArraySizeException
Creates a new array with the specified component type and dimensions. If componentType represents a non-array class or interface, the new array has dimensions.length dimensions and componentType  as its component type. If componentType represents an array class, the number of dimensions of the new array is equal to the sum of dimensions.length and the number of dimensions of componentType. In this case, the component type of the new array is the component type of componentType.

The number of dimensions of the new array must not exceed the number of array dimensions supported by the implementation (typically 255).

Parameters:
componentType - the Class object representing the component type of the new array
dimensions - an array of int types representing the dimensions of the new array
Returns:
the new array
Throws:
NullPointerException - if the specified componentType argument is null
IllegalArgumentException - if the specified dimensions argument is a zero-dimensional array, or if the number of requested dimensions exceeds the limit on the number of array dimensions supported by the implementation (typically 255).
NegativeArraySizeException - if any of the components in the specified dimensions argument is negative.

getLength

public static int getLength(Object array)
                     throws IllegalArgumentException
Returns the length of the specified array object, as an int.
Parameters:
array - the array
Returns:
the length of the array
Throws:
IllegalArgumentException - if the object argument is not an array

get

public static Object get(Object array,
                         int index)
                  throws IllegalArgumentException,
                         ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object. The value is automatically wrapped in an object if it has a primitive type.
Parameters:
array - the array
index - the index
Returns:
the (possibly wrapped) value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array

getBoolean

public static boolean getBoolean(Object array,
                                 int index)
                          throws IllegalArgumentException,
                                 ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a boolean.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getByte

public static byte getByte(Object array,
                           int index)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a byte.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getChar

public static char getChar(Object array,
                           int index)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a char.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getShort

public static short getShort(Object array,
                             int index)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a short.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getInt

public static int getInt(Object array,
                         int index)
                  throws IllegalArgumentException,
                         ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as an int.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getLong

public static long getLong(Object array,
                           int index)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a long.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getFloat

public static float getFloat(Object array,
                             int index)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a float.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

getDouble

public static double getDouble(Object array,
                               int index)
                        throws IllegalArgumentException,
                               ArrayIndexOutOfBoundsException
Returns the value of the indexed component in the specified array object, as a double.
Parameters:
array - the array
index - the index
Returns:
the value of the indexed component in the specified array
Throws:
NullPointerException - If the specified object is null
IllegalArgumentException - If the specified object is not an array, or if the indexed element cannot be converted to the return type by an identity or widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
get(java.lang.Object, int)

set

public static void set(Object array,
                       int index,
                       Object value)
                throws IllegalArgumentException,
                       ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified new value. The new value is first automatically unwrapped if the array has a primitive component type.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null, or if the array component type is primitive and the specified value is null
IllegalArgumentException - If the specified object argument is not an array, or if the array component type is primitive and the specified value cannot be converted to the primitive type by a combination of unwrapping and identity or widening conversions
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array

setBoolean

public static void setBoolean(Object array,
                              int index,
                              boolean z)
                       throws IllegalArgumentException,
                              ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified boolean value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setByte

public static void setByte(Object array,
                           int index,
                           byte b)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified boolean value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setChar

public static void setChar(Object array,
                           int index,
                           char c)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified byte value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setShort

public static void setShort(Object array,
                            int index,
                            short s)
                     throws IllegalArgumentException,
                            ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified short value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setInt

public static void setInt(Object array,
                          int index,
                          int i)
                   throws IllegalArgumentException,
                          ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified int value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setLong

public static void setLong(Object array,
                           int index,
                           long l)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified long value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setFloat

public static void setFloat(Object array,
                            int index,
                            float f)
                     throws IllegalArgumentException,
                            ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified float value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)

setDouble

public static void setDouble(Object array,
                             int index,
                             double d)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Sets the value of the indexed component of the specified array object to the specified double value.
Parameters:
array - the array
index - the index into the array
value - the new value of the indexed component
Throws:
NullPointerException - If the specified object argument is null
IllegalArgumentException - If the specified object argument is not an array, or if the the specified value cannot be converted to the underlying array's component type by an identity or a primitive widening widening conversion
ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
See Also:
set(java.lang.Object, int, java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.lang.reflect.Array

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Array

No usage of java.lang.reflect.Array

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.Modifier

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Modifier

No usage of java.lang.reflect.Modifier

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.Proxy

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Proxy

No usage of java.lang.reflect.Proxy

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.ReflectPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.ReflectPermission

No usage of java.lang.reflect.ReflectPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.UndeclaredThrowableException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.UndeclaredThrowableException

No usage of java.lang.reflect.UndeclaredThrowableException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.AccessibleObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.AccessibleObject

Packages that use AccessibleObject
java.lang.reflect Provides classes and interfaces for obtaining reflective information about classes and objects.

Uses of AccessibleObject in java.lang.reflect

Subclasses of AccessibleObject in java.lang.reflect
class | Constructor Constructor provides information about, and access to, a single constructor for a class.
class | Field A Field provides information about, and dynamic access to, a single field of a class or an interface.
class | Method A Method provides information about, and access to, a single method on a class or interface.

Methods in java.lang.reflect with parameters of type AccessibleObject
static void AccessibleObject.setAccessible(AccessibleObject[] array, boolean flag)
Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.Constructor

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Constructor

Packages that use Constructor
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Constructor in java.lang

Methods in java.lang that return Constructor
Constructor[] | Class.getConstructors() Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object.
Constructor | Class.getConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object.
Constructor[] | Class.getDeclaredConstructors() Returns an array of Constructor objects reflecting all the constructors declared by the class represented by this Class object.
Constructor | Class.getDeclaredConstructor(Class[] parameterTypes) Returns a Constructor object that reflects the specified constructor of the class or interface represented by this Class object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.Field

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Field

Packages that use Field
java.lang Provides classes that are fundamental to the design of the Java programming language.

Uses of Field in java.lang

Methods in java.lang that return Field
Field[] | Class.getFields() Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.
Field | Class.getField(String name) Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.
Field[] | Class.getDeclaredFields() Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object.
Field | Class.getDeclaredField(String name) Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.InvocationTargetException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.InvocationTargetException

Packages that use InvocationTargetException
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of InvocationTargetException in java.awt

Methods in java.awt that throw InvocationTargetException
static void EventQueue.invokeAndWait(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue.

Uses of InvocationTargetException in java.lang.reflect

Methods in java.lang.reflect that throw InvocationTargetException
Object | Method.invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
Object | Constructor.newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

Uses of InvocationTargetException in javax.swing

Methods in javax.swing that throw InvocationTargetException
static void SwingUtilities.invokeAndWait(Runnable doRun)
Causes doRun.run() to be executed synchronously on the AWT event dispatching thread.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.lang.reflect.Method

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.lang.reflect.Method

Packages that use Method
java.beans | Contains classes related to Java Beans development.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of Method in java.beans

Methods in java.beans that return Method
Method | PropertyDescriptor.getReadMethod() Gets the method that should be used to read the property value.
Method | PropertyDescriptor.getWriteMethod() Gets the method that should be used to write the property value.
Method | IndexedPropertyDescriptor.getIndexedReadMethod() Gets the method that should be used to read an indexed property value.
Method | IndexedPropertyDescriptor.getIndexedWriteMethod() Gets the method that should be used to write an indexed property value.
Method[] | EventSetDescriptor.getListenerMethods() Gets the methods of the target listener interface.
Method | EventSetDescriptor.getAddListenerMethod() Gets the method used to add event listeners.
Method | EventSetDescriptor.getRemoveListenerMethod() Gets the method used to remove event listeners.
Method | MethodDescriptor.getMethod() Gets the method that this MethodDescriptor encapsualtes.

Methods in java.beans with parameters of type Method
void | PropertyDescriptor.setReadMethod(Method getter) Sets the method that should be used to read the property value.
void | PropertyDescriptor.setWriteMethod(Method setter) Sets the method that should be used to write the property value.
void | IndexedPropertyDescriptor.setIndexedReadMethod(Method getter) Sets the method that should be used to read an indexed property value.
void | IndexedPropertyDescriptor.setIndexedWriteMethod(Method setter) Sets the method that should be used to write an indexed property value.

Constructors in java.beans with parameters of type Method
PropertyDescriptor(String propertyName, Method getter, Method setter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
IndexedPropertyDescriptor(String propertyName, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.
EventSetDescriptor(String eventSetName, Class listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.
EventSetDescriptor(String eventSetName, Class listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.
MethodDescriptor(Method method)
Constructs a MethodDescriptor from a Method.
MethodDescriptor(Method method, ParameterDescriptor[] parameterDescriptors)
Constructs a MethodDescriptor from a Method providing descriptive information for each of the method's parameters.

Uses of Method in java.lang

Methods in java.lang that return Method
Method[] | Class.getMethods() Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces.
Method | Class.getMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.
Method[] | Class.getDeclaredMethods() Returns an array of Method objects reflecting all the methods declared by the class or interface represented by this Class object.
Method | Class.getDeclaredMethod(String name, Class[] parameterTypes) Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.

Uses of Method in java.lang.reflect

Methods in java.lang.reflect with parameters of type Method
 Object InvocationHandler.invoke(Object proxy, Method method, Object[] args)
Processes a method invocation on a proxy instance and returns the result.

Uses of Method in java.rmi.server

Methods in java.rmi.server with parameters of type Method
 Object RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum)
Invoke a method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.lang.reflect.InvocationHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.lang.reflect.InvocationHandler

Packages that use InvocationHandler
java.lang.reflect Provides classes and interfaces for obtaining reflective information about classes and objects.

Uses of InvocationHandler in java.lang.reflect

Fields in java.lang.reflect declared as InvocationHandler
protected  InvocationHandler Proxy.h
the invocation handler for this proxy instance.

Methods in java.lang.reflect that return InvocationHandler
static InvocationHandler Proxy.getInvocationHandler(Object proxy)
Returns the invocation handler for the specified proxy instance.

Methods in java.lang.reflect with parameters of type InvocationHandler
static Object Proxy.newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h)
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.

Constructors in java.lang.reflect with parameters of type InvocationHandler
Proxy(InvocationHandler h)
Constructs a new Proxy instance from a subclass (typically, a dynamic proxy class) with the specified value for its invocation handler.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.lang.reflect.Member

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.lang.reflect.Member

Packages that use Member
java.lang.reflect Provides classes and interfaces for obtaining reflective information about classes and objects.

Uses of Member in java.lang.reflect

Classes in java.lang.reflect that implement Member
class | Constructor Constructor provides information about, and access to, a single constructor for a class.
class | Field A Field provides information about, and dynamic access to, a single field of a class or an interface.
class | Method A Method provides information about, and access to, a single method on a class or interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Constructor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Constructor

java.lang.Object
  |
  +--java.lang.reflect.AccessibleObject
        |
        +--java.lang.reflect.Constructor
All Implemented Interfaces:
Member
public final class Constructor
extends AccessibleObject
implements Member

Constructor provides information about, and access to, a single constructor for a class.

Constructor permits widening conversions to occur when matching the actual parameters to newInstance() with the underlying constructor's formal parameters, but throws an IllegalArgumentException if a narrowing conversion would occur.

See Also:
Member,
Class,
Class.getConstructors(),
Class.getConstructor(Class[]),
Class.getDeclaredConstructors()

Fields inherited from interface java.lang.reflect.Member
DECLARED, PUBLIC
Method Summary
boolean | equals(Object obj) Compares this Constructor against the specified object.
Class | getDeclaringClass() Returns the Class object representing the class that declares the constructor represented by this Constructor object.
Class[] | getExceptionTypes() Returns an array of Class objects that represent the types of of exceptions declared to be thrown by the underlying constructor represented by this Constructor object.
int | getModifiers() Returns the Java language modifiers for the constructor represented by this Constructor object, as an integer.
String | getName() Returns the name of this constructor, as a string.
Class[] | getParameterTypes() Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor represented by this Constructor object.
int | hashCode() Returns a hashcode for this Constructor.
Object | newInstance(Object[] initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.
String | toString() Returns a string describing this Constructor.
Methods inherited from class java.lang.reflect.AccessibleObject
isAccessible, setAccessible, setAccessible
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getDeclaringClass

public Class getDeclaringClass()
Returns the Class object representing the class that declares the constructor represented by this Constructor object.
Specified by:
getDeclaringClass in interface Member

getName

public String getName()
Returns the name of this constructor, as a string. This is always the same as the simple name of the constructor's declaring class.
Specified by:
getName in interface Member

getModifiers

public int getModifiers()
Returns the Java language modifiers for the constructor represented by this Constructor object, as an integer. The Modifier class should be used to decode the modifiers.
Specified by:
getModifiers in interface Member
See Also:
Modifier

getParameterTypes

public Class[] getParameterTypes()
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor represented by this Constructor object. Returns an array of length 0 if the underlying constructor takes no parameters.

getExceptionTypes

public Class[] getExceptionTypes()
Returns an array of Class objects that represent the types of of exceptions declared to be thrown by the underlying constructor represented by this Constructor object. Returns an array of length 0 if the constructor declares no exceptions in its throws clause.

equals

public boolean equals(Object obj)
Compares this Constructor against the specified object. Returns true if the objects are the same. Two Constructor objects are the same if they were declared by the same class and have the same formal parameter types.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hashcode for this Constructor. The hashcode is the same as the hashcode for the underlying constructor's declaring class name.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns a string describing this Constructor. The string is formatted as the constructor access modifiers, if any, followed by the fully-qualified name of the declaring class, followed by a parenthesized, comma-separated list of the constructor's formal parameter types. For example:
    public java.util.Hashtable(int,float)

The only possible modifiers for constructors are the access modifiers public, protected or private. Only one of these may appear, or none if the constructor has default (package) access.

Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

newInstance

public Object newInstance(Object[] initargs)
                   throws InstantiationException,
                          IllegalAccessException,
                          IllegalArgumentException,
                          InvocationTargetException
Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters. Individual parameters are automatically unwrapped to match primitive formal parameters, and both primitive and reference parameters are subject to method invocation conversions as necessary. Returns the newly created and initialized object.

Creation proceeds with the following steps, in order:

If the class that declares the underlying constructor represents an abstract class, the creation throws an InstantiationException.

If this Constructor object enforces Java language access control and the underlying constructor is inaccessible, the creation throws an IllegalAccessException.

If the number of actual parameters supplied via initargs is different from the number of formal parameters required by the underlying constructor, the creation throws an IllegalArgumentException.

A new instance of the constructor's declaring class is created, and its fields are initialized to their default initial values.

For each actual parameter in the supplied initargs array:

If the corresponding formal parameter has a primitive type, an unwrapping conversion is attempted to convert the object value to a value of the primitive type. If this attempt fails, the creation throws an IllegalArgumentException.

If, after possible unwrapping, the parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion, the creation throws an IllegalArgumentException.

The constructor's declaring class is initialized if it has not already been initialized. A new instance of the constructor's declaring class is created, and its fields are initialized to their default initial values.

Control transfers to the underlying constructor to initialize the new instance. If the constructor completes abruptly by throwing an exception, the exception is placed in an InvocationTargetException and thrown in turn to the caller of newInstance.

If the constructor completes normally, returns the newly created and initialized instance.

Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the number of actual and formal parameters differ, or if an unwrapping or method invocation conversion fails.
InstantiationException - if the class that declares the underlying constructor represents an abstract class.
InvocationTargetException - if the underlying constructor throws an exception.
ExceptionInInitializerError - if the initialization provoked by this method fails.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Field

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Field

java.lang.Object
  |
  +--java.lang.reflect.AccessibleObject
        |
        +--java.lang.reflect.Field
All Implemented Interfaces:
Member
public final class Field
extends AccessibleObject
implements Member

A Field provides information about, and dynamic access to, a single field of a class or an interface. The reflected field may be a class (static) field or an instance field.

A Field permits widening conversions to occur during a get or set access operation, but throws an IllegalArgumentException if a narrowing conversion would occur.

See Also:
Member,
Class,
Class.getFields(),
Class.getField(String),
Class.getDeclaredFields(),
Class.getDeclaredField(String)

Fields inherited from interface java.lang.reflect.Member
DECLARED, PUBLIC
Method Summary
boolean | equals(Object obj) Compares this Field against the specified object.
Object | get(Object obj) Returns the value of the field represented by this Field, on the specified object.
boolean | getBoolean(Object obj) Gets the value of a field as a boolean on the specified object.
byte | getByte(Object obj) Gets the value of a field as a byte on the specified object.
char | getChar(Object obj) Gets the value of a field as a char on the specified object.
Class | getDeclaringClass() Returns the Class object representing the class or interface that declares the field represented by this Field object.
double | getDouble(Object obj) Gets the value of a field as a double on the specified object.
float | getFloat(Object obj) Gets the value of a field as a float on the specified object.
int | getInt(Object obj) Gets the value of a field as an int on the specified object.
long | getLong(Object obj) Gets the value of a field as a long on the specified object.
int | getModifiers() Returns the Java language modifiers for the field represented by this Field object, as an integer.
String | getName() Returns the name of the field represented by this Field object.
short | getShort(Object obj) Gets the value of a field as a short on the specified object.
Class | getType() Returns a Class object that identifies the declared type for the field represented by this Field object.
int | hashCode() Returns a hashcode for this Field.
void | set(Object obj, Object value) Sets the field represented by this Field object on the specified object argument to the specified new value.
void | setBoolean(Object obj, boolean z) Sets the value of a field as a boolean on the specified object.
void | setByte(Object obj, byte b) Sets the value of a field as a byte on the specified object.
void | setChar(Object obj, char c) Sets the value of a field as a char on the specified object.
void | setDouble(Object obj, double d) Sets the value of a field as a double on the specified object.
void | setFloat(Object obj, float f) Sets the value of a field as a float on the specified object.
void | setInt(Object obj, int i) Sets the value of a field as an int on the specified object.
void | setLong(Object obj, long l) Sets the value of a field as a long on the specified object.
void | setShort(Object obj, short s) Sets the value of a field as a short on the specified object.
String | toString() Returns a string describing this Field.
Methods inherited from class java.lang.reflect.AccessibleObject
isAccessible, setAccessible, setAccessible
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getDeclaringClass

public Class getDeclaringClass()
Returns the Class object representing the class or interface that declares the field represented by this Field object.
Specified by:
getDeclaringClass in interface Member

getName

public String getName()
Returns the name of the field represented by this Field object.
Specified by:
getName in interface Member

getModifiers

public int getModifiers()
Returns the Java language modifiers for the field represented by this Field object, as an integer. The Modifier class should be used to decode the modifiers.
Specified by:
getModifiers in interface Member
See Also:
Modifier

getType

public Class getType()
Returns a Class object that identifies the declared type for the field represented by this Field object.

equals

public boolean equals(Object obj)
Compares this Field against the specified object. Returns true if the objects are the same. Two Field objects are the same if they were declared by the same class and have the same name and type.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hashcode for this Field. This is computed as the exclusive-or of the hashcodes for the underlying field's declaring class name and its name.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns a string describing this Field. The format is the access modifiers for the field, if any, followed by the field type, followed by a space, followed by the fully-qualified name of the class declaring the field, followed by a period, followed by the name of the field. For example:
    public static final int java.lang.Thread.MIN_PRIORITY
    private int java.io.FileDescriptor.fd

The modifiers are placed in canonical order as specified by "The Java Language Specification". This is public, protected or private first, and then other modifiers in the following order: static, final, transient, volatile.

Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

get

public Object get(Object obj)
           throws IllegalArgumentException,
                  IllegalAccessException
Returns the value of the field represented by this Field, on the specified object. The value is automatically wrapped in an object if it has a primitive type.

The underlying field's value is obtained as follows:

If the underlying field is a static field, the obj argument is ignored; it may be null.

Otherwise, the underlying field is an instance field. If the specified obj argument is null, the method throws a NullPointerException. If the specified object is not an instance of the class or interface declaring the underlying field, the method throws an IllegalArgumentException.

If this Field object enforces Java language access control, and the underlying field is inaccessible, the method throws an IllegalAccessException. If the underlying field is static, the class that declared the field is initialized if it has not already been initialized.

Otherwise, the value is retrieved from the underlying instance or static field. If the field has a primitive type, the value is wrapped in an object before being returned, otherwise it is returned as is.

If the field is hidden in the type of obj, the field's value is obtained according to the preceding rules.

Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof).
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.

getBoolean

public boolean getBoolean(Object obj)
                   throws IllegalArgumentException,
                          IllegalAccessException
Gets the value of a field as a boolean on the specified object. This method is equivalent to ((Boolean)get(obj)).booleanValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type boolean by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type boolean by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getByte

public byte getByte(Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Gets the value of a field as a byte on the specified object. This method is equivalent to ((Number)get(obj)).byteValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type byte by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type byte by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getChar

public char getChar(Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Gets the value of a field as a char on the specified object. This method is equivalent to ((Character)get(obj)).charValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type char by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type char by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getShort

public short getShort(Object obj)
               throws IllegalArgumentException,
                      IllegalAccessException
Gets the value of a field as a short on the specified object. This method is equivalent to ((Number)get(obj)).shortValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type short by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type short by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getInt

public int getInt(Object obj)
           throws IllegalArgumentException,
                  IllegalAccessException
Gets the value of a field as an int on the specified object. This method is equivalent to ((Number)get(obj)).intValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type int by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type int by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getLong

public long getLong(Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Gets the value of a field as a long on the specified object. This method is equivalent to ((Number)get(obj)).longValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type long by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type long by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getFloat

public float getFloat(Object obj)
               throws IllegalArgumentException,
                      IllegalAccessException
Gets the value of a field as a float on the specified object. This method is equivalent to ((Number)get(obj)).floatValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type float by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type float by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

getDouble

public double getDouble(Object obj)
                 throws IllegalArgumentException,
                        IllegalAccessException
Gets the value of a field as a double on the specified object. This method is equivalent to ((Number)get(obj)).doubleValue(), except that an IllegalArgumentException is thrown if the field value cannot be converted to the type double by a widening conversion.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if the field value cannot be converted to the type double by a widening conversion.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
get(java.lang.Object)

set

public void set(Object obj,
                Object value)
         throws IllegalArgumentException,
                IllegalAccessException
Sets the field represented by this Field object on the specified object argument to the specified new value. The new value is automatically unwrapped if the underlying field has a primitive type.

The operation proceeds as follows:

If the underlying field is static, the obj argument is ignored; it may be null.

Otherwise the underlying field is an instance field. If the specified object argument is null, the method throws a NullPointerException. If the specified object argument is not an instance of the class or interface declaring the underlying field, the method throws an IllegalArgumentException.

If this Field object enforces Java language access control, and the underlying field is inaccessible, the method throws an IllegalAccessException.

If the underlying field is final, the method throws an IllegalAccessException.

If the underlying field is of a primitive type, an unwrapping conversion is attempted to convert the new value to a value of a primitive type. If this attempt fails, the method throws an IllegalArgumentException.

If, after possible unwrapping, the new value cannot be converted to the type of the underlying field by an identity or widening conversion, the method throws an IllegalArgumentException.

If the underlying field is static, the class that declared the field is initialized if it has not already been initialized.

The field is set to the possibly unwrapped and widened new value.

If the field is hidden in the type of obj, the field's value is set according to the preceding rules.

Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.

setBoolean

public void setBoolean(Object obj,
                       boolean z)
                throws IllegalArgumentException,
                       IllegalAccessException
Sets the value of a field as a boolean on the specified object. This method is equivalent to set(obj, zObj), where zObj is a Boolean object and zObj.booleanValue() == z.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setByte

public void setByte(Object obj,
                    byte b)
             throws IllegalArgumentException,
                    IllegalAccessException
Sets the value of a field as a byte on the specified object. This method is equivalent to set(obj, bObj), where bObj is a Byte object and bObj.byteValue() == b.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setChar

public void setChar(Object obj,
                    char c)
             throws IllegalArgumentException,
                    IllegalAccessException
Sets the value of a field as a char on the specified object. This method is equivalent to set(obj, cObj), where cObj is a Character object and cObj.charValue() == c.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setShort

public void setShort(Object obj,
                     short s)
              throws IllegalArgumentException,
                     IllegalAccessException
Sets the value of a field as a short on the specified object. This method is equivalent to set(obj, sObj), where sObj is a Short object and sObj.shortValue() == s.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setInt

public void setInt(Object obj,
                   int i)
            throws IllegalArgumentException,
                   IllegalAccessException
Sets the value of a field as an int on the specified object. This method is equivalent to set(obj, iObj), where iObj is a Integer object and iObj.intValue() == i.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setLong

public void setLong(Object obj,
                    long l)
             throws IllegalArgumentException,
                    IllegalAccessException
Sets the value of a field as a long on the specified object. This method is equivalent to set(obj, lObj), where lObj is a Long object and lObj.longValue() == l.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setFloat

public void setFloat(Object obj,
                     float f)
              throws IllegalArgumentException,
                     IllegalAccessException
Sets the value of a field as a float on the specified object. This method is equivalent to set(obj, fObj), where fObj is a Float object and fObj.floatValue() == f.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)

setDouble

public void setDouble(Object obj,
                      double d)
               throws IllegalArgumentException,
                      IllegalAccessException
Sets the value of a field as a double on the specified object. This method is equivalent to set(obj, dObj), where dObj is a Double object and dObj.doubleValue() == d.
Throws:
IllegalAccessException - if the underlying constructor is inaccessible.
IllegalArgumentException - if the specified object is not an instance of the class or interface declaring the underlying field (or a subclass or implementor thereof), or if an unwrapping conversion fails.
NullPointerException - if the specified object is null and the field is an instance field.
ExceptionInInitializerError - if the initialization provoked by this method fails.
See Also:
set(java.lang.Object, java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Interface InvocationHandler

public interface InvocationHandler

InvocationHandler is the interface implemented by the invocation handler of a proxy instance.

Each proxy instance has an associated invocation handler. When a method is invoked on a proxy instance, the method invocation is encoded and dispatched to the invoke method of its invocation handler.

Since:
JDK1.3
See Also:
Proxy

Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
Processes a method invocation on a proxy instance and returns the result.

Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
Parameters:
proxy - the proxy instance that the method was invoked on
method - the Method instance corresponding to the interface method invoked on the proxy instance. The declaring class of the Method object will be the interface that the method was declared in, which may be a superinterface of the proxy interface that the proxy class inherits the method through.
args - an array of objects containing the values of the arguments passed in the method invocation on the proxy instance, or null if interface method takes no arguments. Arguments of primitive types are wrapped in instances of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean.
Returns:
the value to return from the method invocation on the proxy instance. If the declared return type of the interface method is a primitive type, then the value returned by this method must be an instance of the corresponding primitive wrapper class; otherwise, it must be a type assignable to the declared return type. If the value returned by this method is null and the interface method's return type is primitive, then a NullPointerException will be thrown by the method invocation on the proxy instance. If the value returned by this method is otherwise not compatible with the interface method's declared return type as described above, a ClassCastException will be thrown by the method invocation on the proxy instance.
Throws:
Throwable - the exception to throw from the method invocation on the proxy instance. The exception's type must be assignable either to any of the exception types declared in the throws clause of the interface method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by this method that is not assignable to any of the exception types declared in the throws clause of the interface method, then an UndeclaredThrowableException containing the exception that was thrown by this method will be thrown by the method invocation on the proxy instance.
See Also:
UndeclaredThrowableException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvocationTargetException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class InvocationTargetException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.reflect.InvocationTargetException
All Implemented Interfaces:
Serializable
public class InvocationTargetException
extends Exception

InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.

See Also:
Method, Constructor, Serialized Form

Constructor Summary
protected | InvocationTargetException() Constructs an InvocationTargetException with null as the target exception.
 | InvocationTargetException(Throwable target) Constructs a InvocationTargetException with a target exception.
 | InvocationTargetException(Throwable target, String s) Constructs a InvocationTargetException with a target exception and a detail message.
Method Summary
Throwable | getTargetException() Get the thrown target exception.
void | printStackTrace() Prints the stack trace of the thrown target exception.
void | printStackTrace(PrintStream ps) Prints the stack trace of the thrown target exception to the specified print stream.
void | printStackTrace(PrintWriter pw) Prints the stack trace of the thrown target exception to the specified print writer.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvocationTargetException

protected InvocationTargetException()
Constructs an InvocationTargetException with null as the target exception.

InvocationTargetException

public InvocationTargetException(Throwable target)
Constructs a InvocationTargetException with a target exception.

InvocationTargetException

public InvocationTargetException(Throwable target,
                                 String s)
Constructs a InvocationTargetException with a target exception and a detail message.
Method Detail

getTargetException

public Throwable getTargetException()
Get the thrown target exception.

printStackTrace

public void printStackTrace()
Prints the stack trace of the thrown target exception.
Overrides:
printStackTrace in class Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the stack trace of the thrown target exception to the specified print stream.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the stack trace of the thrown target exception to the specified print writer.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintWriter to use for output
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Member

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Interface Member

All Known Implementing Classes:
Method, Field, Constructor
public interface Member

Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.

See Also:
Class, Field, Method, Constructor

Field Summary
static int | DECLARED Identifies the set of declared members of a class or interface.
static int | PUBLIC Identifies the set of all public members of a class or interface, including inherited members.
Method Summary
Class | getDeclaringClass() Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.
int | getModifiers() Returns the Java language modifiers for the member or constructor represented by this Member, as an integer.
String | getName() Returns the simple name of the underlying member or constructor represented by this Member.

Field Detail

PUBLIC

public static final int PUBLIC
Identifies the set of all public members of a class or interface, including inherited members.
See Also:
SecurityManager.checkMemberAccess(java.lang.Class, int)

DECLARED

public static final int DECLARED
Identifies the set of declared members of a class or interface. Inherited members are not included.
See Also:
SecurityManager.checkMemberAccess(java.lang.Class, int)
Method Detail

getDeclaringClass

public Class getDeclaringClass()
Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.

getName

public String getName()
Returns the simple name of the underlying member or constructor represented by this Member.

getModifiers

public int getModifiers()
Returns the Java language modifiers for the member or constructor represented by this Member, as an integer. The Modifier class should be used to decode the modifiers in the integer.
See Also:
Modifier
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Method

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Method

java.lang.Object
  |
  +--java.lang.reflect.AccessibleObject
        |
        +--java.lang.reflect.Method
All Implemented Interfaces:
Member
public final class Method
extends AccessibleObject
implements Member

A Method provides information about, and access to, a single method on a class or interface. The reflected method may be a class method or an instance method (including an abstract method).

A Method permits widening conversions to occur when matching the actual parameters to invokewith the underlying method's formal parameters, but it throws an IllegalArgumentException if a narrowing conversion would occur.

See Also:
Member,
Class,
Class.getMethods(),
Class.getMethod(String, Class[]),
Class.getDeclaredMethods(),
Class.getDeclaredMethod(String, Class[])

Fields inherited from interface java.lang.reflect.Member
DECLARED, PUBLIC
Method Summary
boolean | equals(Object obj) Compares this Method against the specified object.
Class | getDeclaringClass() Returns the Class object representing the class or interface that declares the method represented by this Method object.
Class[] | getExceptionTypes() Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this Method object.
int | getModifiers() Returns the Java language modifiers for the method represented by this Method object, as an integer.
String | getName() Returns the name of the method represented by this Method object, as a String.
Class[] | getParameterTypes() Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.
Class | getReturnType() Returns a Class object that represents the formal return type of the method represented by this Method object.
int | hashCode() Returns a hashcode for this Method.
Object | invoke(Object obj, Object[] args) Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
String | toString() Returns a string describing this Method.
Methods inherited from class java.lang.reflect.AccessibleObject
isAccessible, setAccessible, setAccessible
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getDeclaringClass

public Class getDeclaringClass()
Returns the Class object representing the class or interface that declares the method represented by this Method object.
Specified by:
getDeclaringClass in interface Member

getName

public String getName()
Returns the name of the method represented by this Method object, as a String.
Specified by:
getName in interface Member

getModifiers

public int getModifiers()
Returns the Java language modifiers for the method represented by this Method object, as an integer. The Modifier class should be used to decode the modifiers.
Specified by:
getModifiers in interface Member
See Also:
Modifier

getReturnType

public Class getReturnType()
Returns a Class object that represents the formal return type of the method represented by this Method object.

getParameterTypes

public Class[] getParameterTypes()
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object. Returns an array of length 0 if the underlying method takes no parameters.

getExceptionTypes

public Class[] getExceptionTypes()
Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this Method object. Returns an array of length 0 if the method declares no exceptions in its throws clause.

equals

public boolean equals(Object obj)
Compares this Method against the specified object. Returns true if the objects are the same. Two Methods are the same if they were declared by the same class and have the same name and formal parameter types and return type.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hashcode for this Method. The hashcode is computed as the exclusive-or of the hashcodes for the underlying method's declaring class name and the method's name.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns a string describing this Method. The string is formatted as the method access modifiers, if any, followed by the method return type, followed by a space, followed by the class declaring the method, followed by a period, followed by the method name, followed by a parenthesized, comma-separated list of the method's formal parameter types. If the method throws checked exceptions, the parameter list is followed by a space, followed by the word throws followed by a comma-separated list of the thrown exception types. For example:
    public boolean java.lang.Object.equals(java.lang.Object)

The access modifiers are placed in canonical order as specified by "The Java Language Specification". This is public, protected or private first, and then other modifiers in the following order: abstract, static, final, synchronized native.

Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

invoke

public Object invoke(Object obj,
                     Object[] args)
              throws IllegalAccessException,
                     IllegalArgumentException,
                     InvocationTargetException
Invokes the underlying method represented by this Method object, on the specified object with the specified parameters. Individual parameters are automatically unwrapped to match primitive formal parameters, and both primitive and reference parameters are subject to widening conversions as necessary. The value returned by the underlying method is automatically wrapped in an object if it has a primitive type.

Method invocation proceeds with the following steps, in order:

If the underlying method is static, then the specified obj argument is ignored. It may be null.

Otherwise, the method is an instance method. If the specified object argument is null, the invocation throws a NullPointerException. Otherwise, if the specified object argument is not an instance of the class or interface declaring the underlying method (or of a subclass or implementor thereof) the invocation throws an IllegalArgumentException.

If this Method object enforces Java language access control and the underlying method is inaccessible, the invocation throws an IllegalAccessException.

If the number of actual parameters supplied via args is different from the number of formal parameters required by the underlying method, the invocation throws an IllegalArgumentException.

For each actual parameter in the supplied args array:

If the corresponding formal parameter has a primitive type, an unwrapping conversion is attempted to convert the object value to a value of a primitive type. If this attempt fails, the invocation throws an IllegalArgumentException.

If, after possible unwrapping, the parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion, the invocation throws an IllegalArgumentException.

If the underlying method is an instance method, it is invoked using dynamic method lookup as documented in The Java Language Specification, section 15.11.4.4; in particular, overriding based on the runtime type of the target object will occur.

If the underlying method is static, the class that declared the method is initialized if it has not already been initialized. The underlying method is invoked directly.

Control transfers to the invoked method. If the method completes abruptly by throwing an exception, the exception is placed in an InvocationTargetException and thrown in turn to the caller of invoke.

If the method completes normally, the value it returns is returned to the caller of invoke; if the value has a primitive type, it is first appropriately wrapped in an object. If the underlying method return type is void, the invocation returns null.

Throws:
IllegalAccessException - if the underlying method is inaccessible.
IllegalArgumentException - if the number of actual and formal parameters differ, or if an unwrapping conversion fails.
InvocationTargetException - if the underlying method throws an exception.
NullPointerException - if the specified object is null and the method is an instance method.
ExceptionInInitializerError - if the initialization provoked by this method fails.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Modifier

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Modifier

java.lang.Object
  |
  +--java.lang.reflect.Modifier
public class Modifier
extends Object

The Modifier class provides static methods and constants to decode class and member access modifiers.

See Also:
Class.getModifiers(), Member.getModifiers()

Field Summary
static int | ABSTRACT The int value representing the abstract modifier.
static int | FINAL The int value representing the final modifier.
static int | INTERFACE The int value representing the interface modifier.
static int | NATIVE The int value representing the native modifier.
static int | PRIVATE The int value representing the private modifier.
static int | PROTECTED The int value representing the protected modifier.
static int | PUBLIC The int value representing the public modifier.
static int | STATIC The int value representing the static modifier.
static int | STRICT The int value representing the strictfp modifier.
static int | SYNCHRONIZED The int value representing the synchronized modifier.
static int | TRANSIENT The int value representing the transient modifier.
static int | VOLATILE The int value representing the volatile modifier.
Constructor Summary
Modifier()
Method Summary
static boolean | isAbstract(int mod) Return true if the specifier integer includes the abstract modifier.
static boolean | isFinal(int mod) Return true if the specified integer includes the final modifier.
static boolean | isInterface(int mod) Return true if the specifier integer includes the interface modifier.
static boolean | isNative(int mod) Return true if the specifier integer includes the native modifier.
static boolean | isPrivate(int mod) Return true if the specifier integer includes the private modifier.
static boolean | isProtected(int mod) Return true if the specifier integer includes the protected modifier.
static boolean | isPublic(int mod) Return true if the specified integer includes the public modifier.
static boolean | isStatic(int mod) Return true if the specifier integer includes the static modifier.
static boolean | isStrict(int mod) Return true if the specifier integer includes the strictfp modifier.
static boolean | isSynchronized(int mod) Return true if the specified integer includes the synchronized modifier.
static boolean | isTransient(int mod) Return true if the specifier integer includes the transient modifier.
static boolean | isVolatile(int mod) Return true if the specified integer includes the volatile modifier.
static String | toString(int mod) Return a string describing the access modifier flags in the specified modifier.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PUBLIC

public static final int PUBLIC
The int value representing the public modifier.

PRIVATE

public static final int PRIVATE
The int value representing the private modifier.

PROTECTED

public static final int PROTECTED
The int value representing the protected modifier.

STATIC

public static final int STATIC
The int value representing the static modifier.

FINAL

public static final int FINAL
The int value representing the final modifier.

SYNCHRONIZED

public static final int SYNCHRONIZED
The int value representing the synchronized modifier.

VOLATILE

public static final int VOLATILE
The int value representing the volatile modifier.

TRANSIENT

public static final int TRANSIENT
The int value representing the transient modifier.

NATIVE

public static final int NATIVE
The int value representing the native modifier.

INTERFACE

public static final int INTERFACE
The int value representing the interface modifier.

ABSTRACT

public static final int ABSTRACT
The int value representing the abstract modifier.

STRICT

public static final int STRICT
The int value representing the strictfp modifier.
Constructor Detail

Modifier

public Modifier()
Method Detail

isPublic

public static boolean isPublic(int mod)
Return true if the specified integer includes the public modifier.

isPrivate

public static boolean isPrivate(int mod)
Return true if the specifier integer includes the private modifier.

isProtected

public static boolean isProtected(int mod)
Return true if the specifier integer includes the protected modifier.

isStatic

public static boolean isStatic(int mod)
Return true if the specifier integer includes the static modifier.

isFinal

public static boolean isFinal(int mod)
Return true if the specified integer includes the final modifier.

isSynchronized

public static boolean isSynchronized(int mod)
Return true if the specified integer includes the synchronized modifier.

isVolatile

public static boolean isVolatile(int mod)
Return true if the specified integer includes the volatile modifier.

isTransient

public static boolean isTransient(int mod)
Return true if the specifier integer includes the transient modifier.

isNative

public static boolean isNative(int mod)
Return true if the specifier integer includes the native modifier.

isInterface

public static boolean isInterface(int mod)
Return true if the specifier integer includes the interface modifier.

isAbstract

public static boolean isAbstract(int mod)
Return true if the specifier integer includes the abstract modifier.

isStrict

public static boolean isStrict(int mod)
Return true if the specifier integer includes the strictfp modifier.

toString

public static String toString(int mod)
Return a string describing the access modifier flags in the specified modifier. For example:
    public final synchronized
    private transient volatile
The modifier names are return in canonical order, as specified by The Java Language Specification.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Proxy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class Proxy

java.lang.Object
  |
  +--java.lang.reflect.Proxy
All Implemented Interfaces:
Serializable
public class Proxy
extends Object
implements Serializable

Proxy provides static methods for creating dynamic proxy classes and instances, and it is also the superclass of all dynamic proxy classes created by those methods.

To create a proxy for some interface Foo:

     InvocationHandler handler = new MyInvocationHandler(...);
     Class proxyClass = Proxy.getProxyClass(
         Foo.class.getClassLoader(), new Class[] { Foo.class });
     Foo f = (Foo) proxyClass.
         getConstructor(new Class[] { InvocationHandler.class }).
         newInstance(new Object[] { handler });
or more simply:
     Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
                                          new Class[] { Foo.class },
                                          handler);

A dynamic proxy class (simply referred to as a proxy class below) is a class that implements a list of interfaces specified at runtime when the class is created, with behavior as described below. A proxy interface is such an interface that is implemented by a proxy class. A proxy instance is an instance of a proxy class. Each proxy instance has an associated invocation handler object, which implements the interface InvocationHandler. A method invocation on a proxy instance through one of its proxy interfaces will be dispatched to the invoke method of the instance's invocation handler, passing the proxy instance, a java.lang.reflect.Method object identifying the method that was invoked, and an array of type Object containing the arguments. The invocation handler processes the encoded method invocation as appropriate and the result that it returns will be returned as the result of the method invocation on the proxy instance.

A proxy class has the following properties:

  • Proxy classes are public, final, and not abstract.
  • The unqualified name of a proxy class is unspecified. The space of class names that begin with the string "$Proxy" should be, however, reserved for proxy classes.
  • A proxy class extends java.lang.reflect.Proxy.
  • A proxy class implements exactly the interfaces specified at its creation, in the same order.
  • If a proxy class implements a non-public interface, then it will be defined in the same package as that interface. Otherwise, the package of a proxy class is also unspecified. Note that package sealing will not prevent a proxy class from being successfully defined in a particular package at runtime, and neither will classes already defined in the same class loader and the same package with particular signers.
  • Since a proxy class implements all of the interfaces specified at its creation, invoking getInterfaces on its Class object will return an array containing the same list of interfaces (in the order specified at its creation), invoking getMethods on its Class object will return an array of Method objects that include all of the methods in those interfaces, and invoking getMethod will find methods in the proxy interfaces as would be expected.
  • The Proxy.isProxyClass method will return true if it is passed a proxy class-- a class returned by Proxy.getProxyClass or the class of an object returned by Proxy.newProxyInstance-- and false otherwise.
  • The java.security.ProtectionDomain of a proxy class is the same as that of system classes loaded by the bootstrap class loader, such as java.lang.Object, because the code for a proxy class is generated by trusted system code. This protection domain will typically be granted java.security.AllPermission.
  • Each proxy class has one public constructor that takes one argument, an implementation of the interface InvocationHandler, to set the invocation handler for a proxy instance. Rather than having to use the reflection API to access the public constructor, a proxy instance can be also be created by calling the Proxy.newInstance method, which combines the actions of calling Proxy.getProxyClass with invoking the constructor with an invocation handler.

A proxy instance has the following properties:

  • Given a proxy instance proxy and one of the interfaces implemented by its proxy class Foo, the following expression will return true:
         proxy instanceof Foo
    and the following cast operation will succeed (rather than throwing a ClassCastException):
         (Foo) proxy
  • Each proxy instance has an associated invocation handler, the one that was passed to its constructor. The static Proxy.getInvocationHandler method will return the invocation handler associated with the proxy instance passed as its argument.
  • An interface method invocation on a proxy instance will be encoded and dispatched to the invocation handler's invoke method as described in the documentation for that method.
  • An invocation of the hashCode, equals, or toString methods declared in java.lang.Object on a proxy instance will be encoded and dispatched to the invocation handler's invoke method in the same manner as interface method invocations are encoded and dispatched, as described above. The declaring class of the Method object passed to invoke will be java.lang.Object. Other public methods of a proxy instance inherited from java.lang.Object are not overridden by a proxy class, so invocations of those methods behave like they do for instances of java.lang.Object.

Methods Duplicated in Multiple Proxy Interfaces

When two or more interfaces of a proxy class contain a method with the same name and parameter signature, the order of the proxy class's interfaces becomes significant. When such a duplicate method is invoked on a proxy instance, the Method object passed to the invocation handler will not necessarily be the one whose declaring class is assignable from the reference type of the interface that the proxy's method was invoked through. This limitation exists because the corresponding method implementation in the generated proxy class cannot determine which interface it was invoked through. Therefore, when a duplicate method is invoked on a proxy instance, the Method object for the method in the foremost interface that contains the method (either directly or inherited through a superinterface) in the proxy class's list of interfaces is passed to the invocation handler's invoke method, regardless of the reference type through which the method invocation occurred.

If a proxy interface contains a method with the same name and parameter signature as the hashCode, equals, or toString methods of java.lang.Object, when such a method is invoked on a proxy instance, the Method object passed to the invocation handler will have java.lang.Object as its declaring class. In other words, the public, non-final methods of java.lang.Object logically precede all of the proxy interfaces for the determination of which Method object to pass to the invocation handler.

Note also that when a duplicate method is dispatched to an invocation handler, the invoke method may only throw checked exception types that are assignable to one of the exception types in the throws clause of the method in all of the proxy interfaces that it can be invoked through. If the invoke method throws a checked exception that is not assignable to any of the exception types declared by the method in one of the the proxy interfaces that it can be invoked through, then an unchecked UndeclaredThrowableException will be thrown by the invocation on the proxy instance. This restriction means that not all of the exception types returned by invoking getExceptionTypes on the Method object passed to the invoke method can necessarily be thrown successfully by the invoke method.

Since:
JDK1.3
See Also:
InvocationHandler, Serialized Form

Field Summary
protected  InvocationHandler h
the invocation handler for this proxy instance.
Constructor Summary
protected Proxy(InvocationHandler h)
Constructs a new Proxy instance from a subclass (typically, a dynamic proxy class) with the specified value for its invocation handler.
Method Summary
static InvocationHandler | getInvocationHandler(Object proxy) Returns the invocation handler for the specified proxy instance.
static Class | getProxyClass(ClassLoader loader, Class[] interfaces) Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces.
static boolean | isProxyClass(Class cl) Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.
static Object | newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

h

protected InvocationHandler h
the invocation handler for this proxy instance.
Constructor Detail

Proxy

protected Proxy(InvocationHandler h)
Constructs a new Proxy instance from a subclass (typically, a dynamic proxy class) with the specified value for its invocation handler.
Parameters:
h - the invocation handler for this proxy instance
Method Detail

getProxyClass

public static Class getProxyClass(ClassLoader loader,
                                  Class[] interfaces)
                           throws IllegalArgumentException
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces. The proxy class will be defined in the specified class loader and will implement all of the supplied interfaces. If a proxy class for the same permutation of interfaces has already been defined in the class loader, then the existing proxy class will be returned; otherwise, a proxy class for those interfaces will be generated dynamically and defined in the class loader.

There are several restrictions on the parameters that may be passed to Proxy.getProxyClass:

  • All of the Class objects in the interfaces array must represent interfaces, not classes or primitive types.
  • No two elements in the interfaces array may refer to identical Class objects.
  • All of the interface types must be visible by name through the specified class loader. In other words, for class loader cl and every interface i, the following expression must be true:
         Class.forName(i.getName(), false, cl) == i
  • All non-public interfaces must be in the same package; otherwise, it would not be possible for the proxy class to implement all of the interfaces, regardless of what package it is defined in.
  • No two interfaces may each have a method with the same name and parameter signature but different return type.
  • The resulting proxy class must not exceed any limits imposed on classes by the virtual machine. For example, the VM may limit the number of interfaces that a class may implement to 65535; in that case, the size of the interfaces array must not exceed 65535.

If any of these restrictions are violated, Proxy.getProxyClass will throw an IllegalArgumentException. If the interfaces array argument or any of its elements are null, a NullPointerException will be thrown.

Note that the order of the specified proxy interfaces is significant: two requests for a proxy class with the same combination of interfaces but in a different order will result in two distinct proxy classes.

Parameters:
loader - the class loader to define the proxy class in
interfaces - the list of interfaces for the proxy class to implement
Returns:
a proxy class that is defined in the specified class loader and that implements the specified interfaces
Throws:
IllegalArgumentException - if any of the restrictions on the parameters that may be passed to getProxyClass are violated
NullPointerException - if the interfaces array argument or any of its elements are null

newProxyInstance

public static Object newProxyInstance(ClassLoader loader,
                                      Class[] interfaces,
                                      InvocationHandler h)
                               throws IllegalArgumentException
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler. This method is equivalent to:
     Proxy.getProxyClass(loader, interfaces).
         getConstructor(new Class[] { InvocationHandler.class }).
         newInstance(new Object[] { handler });

Proxy.newProxyInstance throws IllegalArgumentException for the same reasons that Proxy.getProxyClass does.

Parameters:
loader - the class loader to define the proxy class in
interfaces - the list of interfaces for the proxy class to implement
h - the invocation handler to dispatch method invocations to
Returns:
a proxy instance with the specified invocation handler of a proxy class that is defined in the specified class loader and that implements the specified interfaces
Throws:
IllegalArgumentException - if any of the restrictions on the parameters that may be passed to getProxyClass are violated
NullPointerException - if the interfaces array argument or any of its elements are null, or if the invocation handler, h, is null

isProxyClass

public static boolean isProxyClass(Class cl)
Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method.

The reliability of this method is important for the ability to use it to make security decisions, so its implementation should not just test if the class in question extends Proxy.

Parameters:
cl - the class to test
Returns:
true if the class is a proxy class and false otherwise
Throws:
NullPointerException - if cl is null

getInvocationHandler

public static InvocationHandler getInvocationHandler(Object proxy)
                                              throws IllegalArgumentException
Returns the invocation handler for the specified proxy instance.
Parameters:
proxy - the proxy instance to return the invocation handler for
Returns:
the invocation handler for the proxy instance
Throws:
IllegalArgumentException - if the argument is not a proxy instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReflectPermission

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class ReflectPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.lang.reflect.ReflectPermission
All Implemented Interfaces:
Guard, Serializable
public final class ReflectPermission
extends BasicPermission

The Permission class for reflective operations. A ReflectPermission is a named permission and has no actions. The only name currently defined is suppressAccessChecks, which allows suppressing the standard Java language access checks -- for public, default (package) access, protected, and private members -- performed by reflected objects at their point of use.

The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
suppressAccessChecks | ability to access fields and invoke methods in a class. Note that this includes not only public, but protected and private fields and methods as well. | This is dangerous in that information (possibly confidential) and methods normally unavailable would be accessible to malicious code.

Since:
1.2
See Also:
Permission, BasicPermission, AccessibleObject, Field.get(java.lang.Object), Field.set(java.lang.Object, java.lang.Object), Method.invoke(java.lang.Object, java.lang.Object[]), Constructor.newInstance(java.lang.Object[]), Serialized Form

Constructor Summary
ReflectPermission(String name)
Constructs a ReflectPermission with the specified name.
ReflectPermission(String name, String actions)
Constructs a ReflectPermission with the specified name and actions.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ReflectPermission

public ReflectPermission(String name)
Constructs a ReflectPermission with the specified name.
Parameters:
name - the name of the ReflectPermission

ReflectPermission

public ReflectPermission(String name,
                         String actions)
Constructs a ReflectPermission with the specified name and actions. The actions should be null; they are ignored. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the ReflectPermission
actions - should be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UndeclaredThrowableException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang.reflect
Class UndeclaredThrowableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.reflect.UndeclaredThrowableException
All Implemented Interfaces:
Serializable
public class UndeclaredThrowableException
extends RuntimeException

Thrown by a method invocation on a proxy instance if its invocation handler's invoke method throws a checked exception (a Throwable that is not assignable to RuntimeException or Error) that is not assignable to any of the exception types declared in the throws clause of the method that was invoked on the proxy instance and dispatched to the invocation handler.

An UndeclaredThrowableException instance contains the undeclared checked exception that was thrown by the invocation handler, and it can be retrieved with the getUndeclaredThrowable() method. UndeclaredThrowableException extends RuntimeException, so it is an unchecked exception that wraps a checked exception.

Since:
JDK1.3
See Also:
InvocationHandler, Serialized Form

Constructor Summary
UndeclaredThrowableException(Throwable undeclaredThrowable)
Constructs an UndeclaredThrowableException with the specifed Throwable.
UndeclaredThrowableException(Throwable undeclaredThrowable, String s)
Constructs an UndeclaredThrowableException with the specified Throwable and a detail message.
Method Summary
Throwable | getUndeclaredThrowable() Returns the Throwable instance wrapped in this UndeclaredThrowableException.
void | printStackTrace() Prints this UndeclaredThrowableException and its backtrace to the standard error stream.
void | printStackTrace(PrintStream ps) Prints this UndeclaredThrowableException and its backtrace to the specified PrintStream.
void | printStackTrace(PrintWriter pw) Prints this UndeclaredThrowableException and its backtrace to the specified PrintWriter.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UndeclaredThrowableException

public UndeclaredThrowableException(Throwable undeclaredThrowable)
Constructs an UndeclaredThrowableException with the specifed Throwable.
Parameters:
undeclaredThrowable - the undeclared checked exception that was thrown

UndeclaredThrowableException

public UndeclaredThrowableException(Throwable undeclaredThrowable,
                                    String s)
Constructs an UndeclaredThrowableException with the specified Throwable and a detail message.
Parameters:
undeclaredThrowable - the undeclared checked exception that was thrown
s - the detail message
Method Detail

getUndeclaredThrowable

public Throwable getUndeclaredThrowable()
Returns the Throwable instance wrapped in this UndeclaredThrowableException.
Returns:
the undeclared checked exception that was thrown

printStackTrace

public void printStackTrace()
Prints this UndeclaredThrowableException and its backtrace to the standard error stream.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints this UndeclaredThrowableException and its backtrace to the specified PrintStream.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints this UndeclaredThrowableException and its backtrace to the specified PrintWriter.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintWriter to use for output
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Runnable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Interface Runnable

All Known Implementing Classes:
RenderableImageProducer, Thread, TimerTask, AsyncBoxView.ChildState
public interface Runnable

The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run.

This interface is designed to provide a common protocol for objects that wish to execute code while they are active. For example, Runnable is implemented by class Thread. Being active simply means that a thread has been started and has not yet been stopped.

In addition, Runnable provides the means for a class to be active while not subclassing Thread. A class that implements Runnable can run without subclassing Thread by instantiating a Thread instance and passing itself in as the target. In most cases, the Runnable interface should be used if you are only planning to override the run() method and no other Thread methods. This is important because classes should not be subclassed unless the programmer intends on modifying or enhancing the fundamental behavior of the class.

Since:
JDK1.0
See Also:
Thread

Method Summary
 void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

Method Detail

run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

The general contract of the method run is that it may take any action whatsoever.

See Also:
Thread.run()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Runtime

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Runtime

java.lang.Object
  |
  +--java.lang.Runtime
public class Runtime
extends Object

Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method.

An application cannot create its own instance of this class.

Since:
JDK1.0
See Also:
getRuntime()

Method Summary
void | addShutdownHook(Thread hook) Registers a new virtual-machine shutdown hook.
Process | exec(String command) Executes the specified string command in a separate process.
Process | exec(String[] cmdarray) Executes the specified command and arguments in a separate process.
Process | exec(String[] cmdarray, String[] envp) Executes the specified command and arguments in a separate process with the specified environment.
Process | exec(String[] cmdarray, String[] envp, File dir) Executes the specified command and arguments in a separate process with the specified environment and working directory.
Process | exec(String cmd, String[] envp) Executes the specified string command in a separate process with the specified environment.
Process | exec(String command, String[] envp, File dir) Executes the specified string command in a separate process with the specified environment and working directory.
void | exit(int status) Terminates the currently running Java virtual machine by initiating its shutdown sequence.
long | freeMemory() Returns the amount of free memory in the system.
void | gc() Runs the garbage collector.
InputStream | getLocalizedInputStream(InputStream in) Deprecated. As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.
OutputStream | getLocalizedOutputStream(OutputStream out) Deprecated. As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.
static Runtime | getRuntime() Returns the runtime object associated with the current Java application.
void | halt(int status) Forcibly terminates the currently running Java virtual machine.
void | load(String filename) Loads the specified filename as a dynamic library.
void | loadLibrary(String libname) Loads the dynamic library with the specified library name.
boolean | removeShutdownHook(Thread hook) De-registers a previously-registered virtual-machine shutdown hook.
void | runFinalization() Runs the finalization methods of any objects pending finalization.
static void | runFinalizersOnExit(boolean value) Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
long | totalMemory() Returns the total amount of memory in the Java Virtual Machine.
void | traceInstructions(boolean on) Enables/Disables tracing of instructions.
void | traceMethodCalls(boolean on) Enables/Disables tracing of method calls.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getRuntime

public static Runtime getRuntime()
Returns the runtime object associated with the current Java application. Most of the methods of class Runtime are instance methods and must be invoked with respect to the current runtime object.
Returns:
the Runtime object associated with the current Java application.

exit

public void exit(int status)
Terminates the currently running Java virtual machine by initiating its shutdown sequence. This method never returns normally. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

The virtual machine's shutdown sequence constists of two phases. In the first phase all registered shutdown hooks, if any, are started in some unspecified order and allowed to run concurrently until they finish. In the second phase all uninvoked finalizers are run if finalization-on-exit has been enabled. Once this is done the virtual machine halts.

If this method is invoked after the virtual machine has begun its shutdown sequence then if shutdown hooks are being run this method will block indefinitely. If shutdown hooks have already been run and on-exit finalization has been enabled then this method halts the virtual machine with the given status code if the status is nonzero; otherwise, it blocks indefinitely.

The System.exit method is the conventional and convenient means of invoking this method.

Parameters:
status - Termination status. By convention, a nonzero status code indicates abnormal termination.
Throws:
SecurityException - If a security manager is present and its checkExit method does not permit exiting with the specified status
See Also:
SecurityException,
SecurityManager.checkExit(int),
addShutdownHook(java.lang.Thread),
removeShutdownHook(java.lang.Thread),
runFinalizersOnExit(boolean),
halt(int)

addShutdownHook

public void addShutdownHook(Thread hook)
Registers a new virtual-machine shutdown hook.

The Java virtual machine shuts down in response to two kinds of events:

  • The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or

  • The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.

A shutdown hook is simply an initialized but unstarted thread. When the virtual machine begins its shutdown sequence it will start all registered shutdown hooks in some unspecified order and let them run concurrently. When all the hooks have finished it will then run all uninvoked finalizers if finalization-on-exit has been enabled. Finally, the virtual machine will halt. Note that daemon threads will continue to run during the shutdown sequence, as will non-daemon threads if shutdown was initiated by invoking the exit method.

Once the shutdown sequence has begun it can be stopped only by invoking the halt method, which forcibly terminates the virtual machine.

Once the shutdown sequence has begun it is impossible to register a new shutdown hook or de-register a previously-registered hook. Attempting either of these operations will cause an IllegalStateException to be thrown.

Shutdown hooks run at a delicate time in the life cycle of a virtual machine and should therefore be coded defensively. They should, in particular, be written to be thread-safe and to avoid deadlocks insofar as possible. They should also not rely blindly upon services that may have registered their own shutdown hooks and therefore may themselves in the process of shutting down.

Shutdown hooks should also finish their work quickly. When a program invokes exit the expectation is that the virtual machine will promptly shut down and exit. When the virtual machine is terminated due to user logoff or system shutdown the underlying operating system may only allow a fixed amount of time in which to shut down and exit. It is therefore inadvisable to attempt any user interaction or to perform a long-running computation in a shutdown hook.

Uncaught exceptions are handled in shutdown hooks just as in any other thread, by invoking the uncaughtException method of the thread's ThreadGroup object. The default implementation of this method prints the exception's stack trace to System.err and terminates the thread; it does not cause the virtual machine to exit or halt.

In rare circumstances the virtual machine may abort, that is, stop running without shutting down cleanly. This occurs when the virtual machine is terminated externally, for example with the SIGKILL signal on Unix or the TerminateProcess call on Win32. The virtual machine may also abort if a native method goes awry by, for example, corrupting internal data structures or attempting to access nonexistent memory. If the virtual machine aborts then no guarantee can be made about whether or not any shutdown hooks will be run.

Parameters:
hook - An initialized but unstarted Thread object
Throws:
IllegalArgumentException - If the specified hook has already been registered, or if it can be determined that the hook is already running or has already been run
IllegalStateException - If the virtual machine is already in the process of shutting down
SecurityException - If a security manager is present and it denies RuntimePermission("shutdownHooks")
Since:
1.3
See Also:
removeShutdownHook(java.lang.Thread), halt(int), exit(int)

removeShutdownHook

public boolean removeShutdownHook(Thread hook)
De-registers a previously-registered virtual-machine shutdown hook.

Parameters:
hook - the hook to remove
Returns:
true if the specified hook had previously been registered and was successfully de-registered, false otherwise.
Throws:
IllegalStateException - If the virtual machine is already in the process of shutting down
SecurityException - If a security manager is present and it denies RuntimePermission("shutdownHooks")
Since:
1.3
See Also:
addShutdownHook(java.lang.Thread), exit(int)

halt

public void halt(int status)
Forcibly terminates the currently running Java virtual machine. This method never returns normally.

This method should be used with extreme caution. Unlike the exit method, this method does not cause shutdown hooks to be started and does not run uninvoked finalizers if finalization-on-exit has been enabled. If the shutdown sequence has already been initiated then this method does not wait for any running shutdown hooks or finalizers to finish their work.

Parameters:
status - Termination status. By convention, a nonzero status code indicates abnormal termination. If the exit (equivalently, System.exit) method has already been invoked then this status code will override the status code passed to that method.
Throws:
SecurityException - If a security manager is present and its checkExit method does not permit an exit with the specified status
Since:
1.3
See Also:
exit(int), addShutdownHook(java.lang.Thread), removeShutdownHook(java.lang.Thread)

runFinalizersOnExit

public static void runFinalizersOnExit(boolean value)
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.

Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits. By default, finalization on exit is disabled.

If there is a security manager, its checkExit method is first called with 0 as its argument to ensure the exit is allowed. This could result in a SecurityException.

Parameters:
value - true to enable finalization on exit, false to disable
Throws:
SecurityException - if a security manager exists and its checkExit method doesn't allow the exit.
Since:
JDK1.1
See Also:
exit(int), gc(), SecurityManager.checkExit(int)

exec

public Process exec(String command)
             throws IOException
Executes the specified string command in a separate process.

The command argument is parsed into tokens and then executed as a command in a separate process. The token parsing is done by a StringTokenizer created by the call:

 new StringTokenizer(command)
with no further modifications of the character categories. This method has exactly the same effect as exec(command, null).
Parameters:
command - a specified system command.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
IOException - if an I/O error occurs
See Also:
exec(java.lang.String, java.lang.String[]), SecurityManager.checkExec(java.lang.String)

exec

public Process exec(String cmd,
                    String[] envp)
             throws IOException
Executes the specified string command in a separate process with the specified environment.

This method breaks the command string into tokens and creates a new array cmdarray containing the tokens in the order that they were produced by the string tokenizer; it then performs the call exec(cmdarray, envp). The token parsing is done by a StringTokenizer created by the call:

 new StringTokenizer(command)
with no further modification of the character categories.

The environment variable settings are specified by envp. If envp is null, the subprocess inherits the environment settings of the current process.

Parameters:
cmd - a specified system command.
envp - array of strings, each element of which has environment variable settings in format name=value.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
IOException - if an I/O error occurs
See Also:
exec(java.lang.String[]),
exec(java.lang.String[], java.lang.String[]),
SecurityManager.checkExec(java.lang.String)

exec

public Process exec(String command,
                    String[] envp,
                    File dir)
             throws IOException
Executes the specified string command in a separate process with the specified environment and working directory.

This method breaks the command string into tokens and creates a new array cmdarray containing the tokens in the order that they were produced by the string tokenizer; it then performs the call exec(cmdarray, envp). The token parsing is done by a StringTokenizer created by the call:

 new StringTokenizer(command)
with no further modification of the character categories.

The environment variable settings are specified by envp. If envp is null, the subprocess inherits the environment settings of the current process.

The working directory of the new subprocess is specified by dir. If dir is null, the subprocess inherits the current working directory of the current process.

Parameters:
command - a specified system command.
envp - array of strings, each element of which has environment variable settings in format name=value.
dir - the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
IOException - if an I/O error occurs
See Also:
exec(java.lang.String[], java.lang.String[], File), SecurityManager.checkExec(java.lang.String)

exec

public Process exec(String[] cmdarray)
             throws IOException
Executes the specified command and arguments in a separate process.

The command specified by the tokens in cmdarray is executed as a command in a separate process. This has exactly the same effect as exec(cmdarray, null).

If there is a security manager, its checkExec method is called with the first component of the array cmdarray as its argument. This may result in a security exception.

Parameters:
cmdarray - array containing the command to call and its arguments.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
IOException - if an I/O error occurs
See Also:
exec(java.lang.String[], java.lang.String[]), SecurityManager.checkExec(java.lang.String)

exec

public Process exec(String[] cmdarray,
                    String[] envp)
             throws IOException
Executes the specified command and arguments in a separate process with the specified environment.

Given an array of strings cmdarray, representing the tokens of a command line, and an array of strings envp, representing "environment" variable settings, this method creates a new process in which to execute the specified command.

If envp is null, the subprocess inherits the environment settings of the current process.

Parameters:
cmdarray - array containing the command to call and its arguments.
envp - array of strings, each element of which has environment variable settings in format name=value.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
NullPointerException - if cmdarray is null.
IndexOutOfBoundsException - if cmdarray is an empty array (has length 0).
IOException - if an I/O error occurs
See Also:
Process, SecurityException, SecurityManager.checkExec(java.lang.String)

exec

public Process exec(String[] cmdarray,
                    String[] envp,
                    File dir)
             throws IOException
Executes the specified command and arguments in a separate process with the specified environment and working directory.

If there is a security manager, its checkExec method is called with the first component of the array cmdarray as its argument. This may result in a security exception.

Given an array of strings cmdarray, representing the tokens of a command line, and an array of strings envp, representing "environment" variable settings, this method creates a new process in which to execute the specified command.

If envp is null, the subprocess inherits the environment settings of the current process.

The working directory of the new subprocess is specified by dir. If dir is null, the subprocess inherits the current working directory of the current process.

Parameters:
cmdarray - array containing the command to call and its arguments.
envp - array of strings, each element of which has environment variable settings in format name=value.
dir - the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
Returns:
a Process object for managing the subprocess.
Throws:
SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess.
NullPointerException - if cmdarray is null.
IndexOutOfBoundsException - if cmdarray is an empty array (has length 0).
IOException - if an I/O error occurs.
See Also:
Process, SecurityException, SecurityManager.checkExec(java.lang.String)

freeMemory

public long freeMemory()
Returns the amount of free memory in the system. Calling the gc method may result in increasing the value returned by freeMemory.
Returns:
an approximation to the total amount of memory currently available for future allocated objects, measured in bytes.

totalMemory

public long totalMemory()
Returns the total amount of memory in the Java Virtual Machine. The value returned by this method may vary over time, depending on the host environment.

Note that the amount of memory required to hold an object of any given type may be implementation-dependent.

Returns:
the total amount of memory currently available for current and future objects, measured in bytes.

gc

public void gc()
Runs the garbage collector. Calling this method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made its best effort to recycle all discarded objects.

The name gc stands for "garbage collector". The Java Virtual Machine performs this recycling process automatically as needed, in a separate thread, even if the gc method is not invoked explicitly.

The method System.gc() is hte conventional and convenient means of invoking this method.

runFinalization

public void runFinalization()
Runs the finalization methods of any objects pending finalization. Calling this method suggests that the Java Virtual Machine expend effort toward running the finalize methods of objects that have been found to be discarded but whose finalize methods have not yet been run. When control returns from the method call, the Java Virtual Machine has made a best effort to complete all outstanding finalizations.

The Java Virtual Machine performs the finalization process automatically as needed, in a separate thread, if the runFinalization method is not invoked explicitly.

The method System.runFinalization() is the conventional and convenient means of invoking this method.

See Also:
Object.finalize()

traceInstructions

public void traceInstructions(boolean on)
Enables/Disables tracing of instructions. If the boolean argument is true, this method suggests that the Java Virtual Machine emit debugging information for each instruction in the Java Virtual Machine as it is executed. The format of this information, and the file or other output stream to which it is emitted, depends on the host environment. The virtual machine may ignore this request if it does not support this feature. The destination of the trace output is system dependent.

If the boolean argument is false, this method causes the Java Virtual Machine to stop performing the detailed instruction trace it is performing.

Parameters:
on - true to enable instruction tracing; false to disable this feature.

traceMethodCalls

public void traceMethodCalls(boolean on)
Enables/Disables tracing of method calls. If the boolean argument is true, this method suggests that the Java Virtual Machine emit debugging information for each method in the Java Virtual Machine as it is called. The format of this information, and the file or other output stream to which it is emitted, depends on the host environment. The virtual machine may ignore this request if it does not support this feature.

Calling this method with argument false suggests that the Java Virtual Machine cease emitting per-call debugging information.

Parameters:
on - true to enable instruction tracing; false to disable this feature.

load

public void load(String filename)
Loads the specified filename as a dynamic library. The filename argument must be a complete pathname. From java_g it will automagically insert "_g" before the ".so" (for example Runtime.getRuntime().load("/home/avh/lib/libX11.so");).

First, if there is a security manager, its checkLink method is called with the filename as its argument. This may result in a security exception.

This is similar to the method loadLibrary(String), but it accepts a general file name as an argument rathan than just a library name, allowing any file of native code to be loaded.

The method System.load(String) is the conventional and convenient means of invoking this method.

Parameters:
filename - the file to load.
Throws:
SecurityException - if a security manager exists and its checkLink method doesn't allow loading of the specified dynamic library
UnsatisfiedLinkError - if the file does not exist.
See Also:
getRuntime(), SecurityException, SecurityManager.checkLink(java.lang.String)

loadLibrary

public void loadLibrary(String libname)
Loads the dynamic library with the specified library name. A file containing native code is loaded from the local file system from a place where library files are conventionally obtained. The details of this process are implementation-dependent. The mapping from a library name to a specific filename is done in a system-specific manner.

First, if there is a security manager, its checkLink method is called with the libname as its argument. This may result in a security exception.

The method System.loadLibrary(String) is the conventional and convenient means of invoking this method. If native methods are to be used in the implementation of a class, a standard strategy is to put the native code in a library file (call it LibFile) and then to put a static initializer:

 static { System.loadLibrary("LibFile"); }
within the class declaration. When the class is loaded and initialized, the necessary native code implementation for the native methods will then be loaded as well.

If this method is called more than once with the same library name, the second and subsequent calls are ignored.

Parameters:
libname - the name of the library.
Throws:
SecurityException - if a security manager exists and its checkLink method doesn't allow loading of the specified dynamic library
UnsatisfiedLinkError - if the library does not exist.
See Also:
SecurityException, SecurityManager.checkLink(java.lang.String)

getLocalizedInputStream

public InputStream getLocalizedInputStream(InputStream in)
Deprecated. As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes.

Creates a localized version of an input stream. This method takes an InputStream and returns an InputStream equivalent to the argument in all respects except that it is localized: as characters in the local character set are read from the stream, they are automatically converted from the local character set to Unicode.

If the argument is already a localized stream, it may be returned as the result.

Parameters:
in - InputStream to localize
Returns:
a localized input stream
See Also:
InputStream, BufferedReader.BufferedReader(java.io.Reader), InputStreamReader.InputStreamReader(java.io.InputStream)

getLocalizedOutputStream

public OutputStream getLocalizedOutputStream(OutputStream out)
Deprecated. As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes.

Creates a localized version of an output stream. This method takes an OutputStream and returns an OutputStream equivalent to the argument in all respects except that it is localized: as Unicode characters are written to the stream, they are automatically converted to the local character set.

If the argument is already a localized stream, it may be returned as the result.

Parameters:
out - OutputStream to localize
Returns:
a localized output stream
See Also:
OutputStream,
BufferedWriter.BufferedWriter(java.io.Writer),
OutputStreamWriter.OutputStreamWriter(java.io.OutputStream),
PrintWriter.PrintWriter(java.io.OutputStream)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RuntimeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class RuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArithmeticException, ArrayStoreException, CannotRedoException, CannotUndoException, ClassCastException, CMMException, ConcurrentModificationException, EmptyStackException, IllegalArgumentException, IllegalMonitorStateException, IllegalPathStateException, IllegalStateException, ImagingOpException, IndexOutOfBoundsException, MissingResourceException, NegativeArraySizeException, NoSuchElementException, NullPointerException, ProfileDataException, ProviderException, RasterFormatException, SecurityException, SystemException, UndeclaredThrowableException, UnsupportedOperationException
public class RuntimeException
extends Exception

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.

A method is not required to declare in its throws clause any subclasses of RuntimeException that might be thrown during the execution of the method but not caught.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
RuntimeException()
Constructs a RuntimeException with no detail message.
RuntimeException(String s)
Constructs a RuntimeException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RuntimeException

public RuntimeException()
Constructs a RuntimeException with no detail message.

RuntimeException

public RuntimeException(String s)
Constructs a RuntimeException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RuntimePermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class RuntimePermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.lang.RuntimePermission
All Implemented Interfaces:
Guard, Serializable
public final class RuntimePermission
extends BasicPermission

This class is for runtime permissions. A RuntimePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the runtime permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "loadLibrary.*" or "*" is valid, "*loadLibrary" or "a*b" is not valid.

The following table lists all the possible RuntimePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
createClassLoader | Creation of a class loader | This is an extremely dangerous permission to grant. Malicious applications that can instantiate their own class loaders could then load their own rogue classes into the system. These newly loaded classes could be placed into any protection domain by the class loader, thereby automatically granting the classes the permissions for that domain.
getClassLoader | Retrieval of a class loader (e.g., the class loader for the calling class) | This would grant an attacker permission to get the class loader for a particular class. This is dangerous because having access to a class's class loader allows the attacker to load other classes available to that class loader. The attacker would typically otherwise not have access to those classes.
setContextClassLoader | Setting of the context class loader used by a thread | The context class loader is used by system code and extensions when they need to lookup resources that might not exist in the system class loader. Granting setContextClassLoader permission would allow code to change which context class loader is used for a particular thread, including system threads.
setSecurityManager | Setting of the security manager (possibly replacing an existing one) | The security manager is a class that allows applications to implement a security policy. Granting the setSecurityManager permission would allow code to change which security manager is used by installing a different, possibly less restrictive security manager, thereby bypassing checks that would have been enforced by the original security manager.
createSecurityManager | Creation of a new security manager | This gives code access to protected, sensitive methods that may disclose information about other classes or the execution stack.
exitVM | Halting of the Java Virtual Machine | This allows an attacker to mount a denial-of-service attack by automatically forcing the virtual machine to halt.
shutdownHooks | Registration and cancellation of virtual-machine shutdown hooks | This allows an attacker to register a malicious shutdown hook that interferes with the clean shutdown of the virtual machine.
setFactory | Setting of the socket factory used by ServerSocket or Socket, or of the stream handler factory used by URL | This allows code to set the actual implementation for the socket, server socket, stream handler, or RMI socket factory. An attacker may set a faulty implementation which mangles the data stream.
setIO | Setting of System.out, System.in, and System.err | This allows changing the value of the standard system streams. An attacker may change System.in to monitor and steal user input, or may set System.err to a "null" OutputSteam, which would hide any error messages sent to System.err.
modifyThread | Modification of threads, e.g., via calls to Thread stop, suspend, resume, setPriority, and setName methods | This allows an attacker to start or suspend any thread in the system.
stopThread | Stopping of threads via calls to the Thread stop method | This allows code to stop any thread in the system provided that it is already granted permission to access that thread. This poses as a threat, because that code may corrupt the system by killing existing threads.
modifyThreadGroup | modification of thread groups, e.g., via calls to ThreadGroup destroy, getParent, resume, setDaemon, setMaxPriority, stop, and suspend methods | This allows an attacker to create thread groups and set their run priority.
getProtectionDomain | Retrieval of the ProtectionDomain for a class | This allows code to obtain policy information for a particular code source. While obtaining policy information does not compromise the security of the system, it does give attackers additional information, such as local file names for example, to better aim an attack.
readFileDescriptor | Reading of file descriptors | This would allow code to read the particular file associated with the file descriptor read. This is dangerous if the file contains confidential data.
writeFileDescriptor | Writing to file descriptors | This allows code to write to a particular file associated with the descriptor. This is dangerous because it may allow malicous code to plant viruses or at the very least, fill up your entire disk.
loadLibrary.{library name} | Dynamic linking of the specified library | It is dangerous to allow an applet permission to load native code libraries, because the Java security architecture is not designed to and does not prevent malicious behavior at the level of native code.
accessClassInPackage.{package name} | Access to the specified package via a class loader's loadClass method when that class loader calls the SecurityManager checkPackageAcesss method | This gives code access to classes in packages to which it normally does not have access. Malicious code may use these classes to help in its attempt to compromise security in the system.
defineClassInPackage.{package name} | Definition of classes in the specified package, via a class loader's defineClass method when that class loader calls the SecurityManager checkPackageDefinition method. | This grants code permission to define a class in a particular package. This is dangerous because malicious code with this permission may define rogue classes in trusted packages like java.security or java.lang, for example.
accessDeclaredMembers | Access to the declared members of a class | This grants code permission to query a class for its public, protected, default (package) access, and private fields and/or methods. Although the code would have access to the private and protected field and method names, it would not have access to the private/protected field data and would not be able to invoke any private methods. Nevertheless, malicious code may use this information to better aim an attack. Additionally, it may invoke any public methods and/or access public fields in the class. This could be dangerous if the code would normally not be able to invoke those methods and/or access the fields because it can't cast the object to the class/interface with those methods and fields.
queuePrintJob | Initiation of a print job request | This could print sensitive information to a printer, or simply waste paper.

See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
RuntimePermission(String name)
Creates a new RuntimePermission with the specified name.
RuntimePermission(String name, String actions)
Creates a new RuntimePermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RuntimePermission

public RuntimePermission(String name)
Creates a new RuntimePermission with the specified name. The name is the symbolic name of the RuntimePermission, such as "exit", "setFactory", etc. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match.
Parameters:
name - the name of the RuntimePermission.

RuntimePermission

public RuntimePermission(String name,
                         String actions)
Creates a new RuntimePermission object with the specified name. The name is the symbolic name of the RuntimePermission, and the actions String is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the RuntimePermission.
actions - should be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SecurityException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class SecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.SecurityException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccessControlException, RMISecurityException
public class SecurityException
extends RuntimeException

Thrown by the security manager to indicate a security violation.

Since:
JDK1.0
See Also:
SecurityManager, Serialized Form

Constructor Summary
SecurityException()
Constructs a SecurityException with no detail message.
SecurityException(String s)
Constructs a SecurityException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SecurityException

public SecurityException()
Constructs a SecurityException with no detail message.

SecurityException

public SecurityException(String s)
Constructs a SecurityException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SecurityManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class SecurityManager

java.lang.Object
  |
  +--java.lang.SecurityManager
Direct Known Subclasses:
RMISecurityManager
public class SecurityManager
extends Object

The security manager is a class that allows applications to implement a security policy. It allows an application to determine, before performing a possibly unsafe or sensitive operation, what the operation is and whether it is being attempted in a security context that allows the operation to be performed. The application can allow or disallow the operation.

The SecurityManager class contains many methods with names that begin with the word check. These methods are called by various methods in the Java libraries before those methods perform certain potentially sensitive operations. The invocation of such a check method typically looks like this:

     SecurityManager security = System.getSecurityManager();
     if (security != null) {
         security.checkXXX(argument,  . . . );
     }

The security manager is thereby given an opportunity to prevent completion of the operation by throwing an exception. A security manager routine simply returns if the operation is permitted, but throws a SecurityException if the operation is not permitted. The only exception to this convention is checkTopLevelWindow, which returns a boolean value.

The current security manager is set by the setSecurityManager method in class System. The current security manager is obtained by the getSecurityManager method.

The special method checkPermission(java.security.Permission) determines whether an access request indicated by a specified permission should be granted or denied. The default implementation calls

   AccessController.checkPermission(perm);

If a requested access is allowed, checkPermission returns quietly. If denied, a SecurityException is thrown.

As of Java 2 SDK v1.2, the default implementation of each of the other check methods in SecurityManager is to call the SecurityManager checkPermission method to determine if the calling thread has permission to perform the requested operation.

Note that the checkPermission method with just a single permission argument always performs security checks within the context of the currently executing thread. Sometimes a security check that should be made within a given context will actually need to be done from within a different context (for example, from within a worker thread). The getSecurityContext method and the checkPermission method that includes a context argument are provided for this situation. The getSecurityContext method returns a "snapshot" of the current calling context. (The default implementation returns an AccessControlContext object.) A sample call is the following:

   Object context = null;
   SecurityManager sm = System.getSecurityManager();
   if (sm != null) context = sm.getSecurityContext();

The checkPermission method that takes a context object in addition to a permission makes access decisions based on that context, rather than on that of the current execution thread. Code within a different context can thus call that method, passing the permission and the previously-saved context object. A sample call, using the SecurityManager sm obtained as in the previous example, is the following:

   if (sm != null) sm.checkPermission(permission, context);

Permissions fall into these categories: File, Socket, Net, Security, Runtime, Property, AWT, Reflect, and Serializable. The classes managing these various permission categories are java.io.FilePermission, java.net.SocketPermission, java.net.NetPermission, java.security.SecurityPermission, java.lang.RuntimePermission, java.util.PropertyPermission, java.awt.AWTPermission, java.lang.reflect.ReflectPermission, and java.io.SerializablePermission.

All but the first two (FilePermission and SocketPermission) are subclasses of java.security.BasicPermission, which itself is an abstract subclass of the top-level class for permissions, which is java.security.Permission. BasicPermission defines the functionality needed for all permissions that contain a name that follows the hierarchical property naming convention (for example, "exitVM", "setFactory", "queuePrintJob", etc). An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "a.*" or "*" is valid, "*a" or "a*b" is not valid.

FilePermission and SocketPermission are subclasses of the top-level class for permissions (java.security.Permission). Classes like these that have a more complicated name syntax than that used by BasicPermission subclass directly from Permission rather than from BasicPermission. For example, for a java.io.FilePermission object, the permission name is the pathname of a file (or directory).

Some of the permission classes have an "actions" list that tells the actions that are permitted for the object. For example, for a java.io.FilePermission object, the actions list (such as "read, write") specifies which actions are granted for the specified file (or for files in the specified directory).

Other permission classes are for "named" permissions - ones that contain a name but no actions list; you either have the named permission or you don't.

Note: There is also a java.security.AllPermission permission that implies all permissions. It exists to simplify the work of system administrators who might need to perform multiple tasks that require all (or numerous) permissions.

See Permissions in the Java 2 SDK for permission-related information. This document includes, for example, a table listing the various SecurityManager check methods and the permission(s) the default implementation of each such method requires. It also contains a table of all the version 1.2 methods that require permissions, and for each such method tells which permission it requires.

For more information about SecurityManager changes made in the Java 2 SDK and advice regarding porting of 1.1-style security managers, see the security documentation.

Since:
JDK1.0
See Also:
ClassLoader, SecurityException, checkTopLevelWindow, getSecurityManager, setSecurityManager, AccessController, AccessControlContext, AccessControlException, Permission, BasicPermission, FilePermission, SocketPermission, PropertyPermission, RuntimePermission, AWTPermission, Policy, SecurityPermission, ProtectionDomain

Field Summary
protected  boolean inCheck
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
Constructor Summary
SecurityManager()
Constructs a new SecurityManager.
Method Summary
void | checkAccept(String host, int port) Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.
void | checkAccess(Thread t) Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
void | checkAccess(ThreadGroup g) Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.
void | checkAwtEventQueueAccess() Throws a SecurityException if the calling thread is not allowed to access the AWT event queue.
void | checkConnect(String host, int port) Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.
void | checkConnect(String host, int port, Object context) Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
void | checkCreateClassLoader() Throws a SecurityException if the calling thread is not allowed to create a new class loader.
void | checkDelete(String file) Throws a SecurityException if the calling thread is not allowed to delete the specified file.
void | checkExec(String cmd) Throws a SecurityException if the calling thread is not allowed to create a subprocess.
void | checkExit(int status) Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.
void | checkLink(String lib) Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.
void | checkListen(int port) Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.
void | checkMemberAccess(Class clazz, int which) Throws a SecurityException if the calling thread is not allowed to access members.
void | checkMulticast(InetAddress maddr) Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
void | checkMulticast(InetAddress maddr, byte ttl) Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
void | checkPackageAccess(String pkg) Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.
void | checkPackageDefinition(String pkg) Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.
void | checkPermission(Permission perm) Throws a SecurityException if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.
void | checkPermission(Permission perm, Object context) Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission.
void | checkPrintJobAccess() Throws a SecurityException if the calling thread is not allowed to initiate a print job request.
void | checkPropertiesAccess() Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.
void | checkPropertyAccess(String key) Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.
void | checkRead(FileDescriptor fd) Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.
void | checkRead(String file) Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.
void | checkRead(String file, Object context) Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
void | checkSecurityAccess(String target) Determines whether the permission with the specified permission target name should be granted or denied.
void | checkSetFactory() Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.
void | checkSystemClipboardAccess() Throws a SecurityException if the calling thread is not allowed to access the system clipboard.
boolean | checkTopLevelWindow(Object window) Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.
void | checkWrite(FileDescriptor fd) Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.
void | checkWrite(String file) Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.
protected int | classDepth(String name) Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected int | classLoaderDepth() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected ClassLoader | currentClassLoader() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected Class | currentLoadedClass() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected Class[] | getClassContext() Returns the current execution stack as an array of classes.
boolean | getInCheck() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
Object | getSecurityContext() Creates an object that encapsulates the current execution environment.
ThreadGroup | getThreadGroup() Returns the thread group into which to instantiate any new thread being created at the time this is being called.
protected boolean | inClass(String name) Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
protected boolean | inClassLoader() Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

inCheck

protected boolean inCheck
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

This field is true if there is a security check in progress; false otherwise.
Constructor Detail

SecurityManager

public SecurityManager()
Constructs a new SecurityManager.

If there is a security manager already installed, this method first calls the security manager's checkPermission method with the RuntimePermission("createSecurityManager") permission to ensure the calling thread has permission to create a new security manager. This may result in throwing a SecurityException.

Throws:
SecurityException - if a security manager already exists and its checkPermission method doesn't allow creation of a new security manager.
See Also:
System.getSecurityManager(), checkPermission, RuntimePermission
Method Detail

getInCheck

public boolean getInCheck()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Tests if there is a security check in progress.
Returns:
the value of the inCheck field. This field should contain true if a security check is in progress, false otherwise.
See Also:
inCheck

getClassContext

protected Class[] getClassContext()
Returns the current execution stack as an array of classes.

The length of the array is the number of methods on the execution stack. The element at index 0 is the class of the currently executing method, the element at index 1 is the class of that method's caller, and so on.

Returns:
the execution stack.

currentClassLoader

protected ClassLoader currentClassLoader()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Returns the class loader of the most recently executing method from a class defined using a non-system class loader. A non-system class loader is defined as being a class loader that is not equal to the system class loader (as returned by ClassLoader.getSystemClassLoader()) or one of its ancestors.

This method will return null in the following three cases:

  1. All methods on the execution stack are from classes defined using the system class loader or one of its ancestors.
  2. All methods on the execution stack up to the first "privileged" caller (see AccessController.doPrivileged(java.security.PrivilegedAction)) are from classes defined using the system class loader or one of its ancestors.
  3. A call to checkPermission with java.security.AllPermission does not result in a SecurityException.
Returns:
the class loader of the most recent occurrence on the stack of a method from a class defined using a non-system class loader.
See Also:
getSystemClassLoader, checkPermission

currentLoadedClass

protected Class currentLoadedClass()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Returns the class of the most recently executing method from a class defined using a non-system class loader. A non-system class loader is defined as being a class loader that is not equal to the system class loader (as returned by ClassLoader.getSystemClassLoader()) or one of its ancestors.

This method will return null in the following three cases:

  1. All methods on the execution stack are from classes defined using the system class loader or one of its ancestors.
  2. All methods on the execution stack up to the first "privileged" caller (see AccessController.doPrivileged(java.security.PrivilegedAction)) are from classes defined using the system class loader or one of its ancestors.
  3. A call to checkPermission with java.security.AllPermission does not result in a SecurityException.
Returns:
the class of the most recent occurrence on the stack of a method from a class defined using a non-system class loader.
See Also:
getSystemClassLoader, checkPermission

classDepth

protected int classDepth(String name)
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Returns the stack depth of the specified class.
Parameters:
name - the fully qualified name of the class to search for.
Returns:
the depth on the stack frame of the first occurrence of a method from a class with the specified name; -1 if such a frame cannot be found.

classLoaderDepth

protected int classLoaderDepth()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Returns the stack depth of the most recently executing method from a class defined using a non-system class loader. A non-system class loader is defined as being a class loader that is not equal to the system class loader (as returned by ClassLoader.getSystemClassLoader()) or one of its ancestors.

This method will return -1 in the following three cases:

  1. All methods on the execution stack are from classes defined using the system class loader or one of its ancestors.
  2. All methods on the execution stack up to the first "privileged" caller (see AccessController.doPrivileged(java.security.PrivilegedAction)) are from classes defined using the system class loader or one of its ancestors.
  3. A call to checkPermission with java.security.AllPermission does not result in a SecurityException.
Returns:
the depth on the stack frame of the most recent occurrence of a method from a class defined using a non-system class loader.
See Also:
getSystemClassLoader, checkPermission

inClass

protected boolean inClass(String name)
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Tests if a method from a class with the specified name is on the execution stack.
Parameters:
name - the fully qualified name of the class.
Returns:
true if a method from a class with the specified name is on the execution stack; false otherwise.

inClassLoader

protected boolean inClassLoader()
Deprecated. This type of security checking is not recommended. It is recommended that the checkPermission call be used instead.

Basically, tests if a method from a class defined using a class loader is on the execution stack.
Returns:
true if a call to currentClassLoader has a non-null return value.
See Also:
currentClassLoader

getSecurityContext

public Object getSecurityContext()
Creates an object that encapsulates the current execution environment. The result of this method is used, for example, by the three-argument checkConnect method and by the two-argument checkRead method. These methods are needed because a trusted method may be called on to read a file or open a socket on behalf of another method. The trusted method needs to determine if the other (possibly untrusted) method would be allowed to perform the operation on its own.

The default implementation of this method is to return an AccessControlContext object.

Returns:
an implementation-dependent object that encapsulates sufficient information about the current execution environment to perform some security checks later.
See Also:
checkConnect, checkRead, AccessControlContext

checkPermission

public void checkPermission(Permission perm)
Throws a SecurityException if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.

This method calls AccessController.checkPermission with the given permission.

Parameters:
perm - the requested permission.
Throws:
SecurityException - if access is not permitted based on the current security policy.
NullPointerException - if the permission argument is null.
Since:
1.2

checkPermission

public void checkPermission(Permission perm,
                            Object context)
Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission. The context must be a security context returned by a previous call to getSecurityContext and the access control decision is based upon the configured security policy for that security context.

If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method is invoked with the specified permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

Parameters:
perm - the specified permission
context - a system-dependent security context.
Throws:
SecurityException - if the specified security context is not an instance of AccessControlContext (e.g., is null), or is denied access to the resource specified by the given permission.
NullPointerException - if the permission argument is null.
Since:
1.2
See Also:
getSecurityContext(), AccessControlContext.checkPermission(java.security.Permission)

checkCreateClassLoader

public void checkCreateClassLoader()
Throws a SecurityException if the calling thread is not allowed to create a new class loader.

This method calls checkPermission with the RuntimePermission("createClassLoader") permission.

If you override this method, then you should make a call to super.checkCreateClassLoader at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to create a new class loader.
See Also:
ClassLoader.ClassLoader(), checkPermission

checkAccess

public void checkAccess(Thread t)
Throws a SecurityException if the calling thread is not allowed to modify the thread argument.

This method is invoked for the current security manager by the stop, suspend, resume, setPriority, setName, and setDaemon methods of class Thread.

If the thread argument is a system thread (belongs to the thread group with a null parent) then this method calls checkPermission with the RuntimePermission("modifyThread") permission. If the thread argument is not a system thread, this method just returns silently.

Applications that want a stricter policy should override this method. If this method is overridden, the method that overrides it should additionally check to see if the calling thread has the RuntimePermission("modifyThread") permission, and if so, return silently. This is to ensure that code granted that permission (such as the SDK itself) is allowed to manipulate any thread.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

Parameters:
t - the thread to be checked.
Throws:
SecurityException - if the calling thread does not have permission to modify the thread.
NullPointerException - if the thread argument is null.
See Also:
resume, setDaemon, setName, setPriority, stop, suspend, checkPermission

checkAccess

public void checkAccess(ThreadGroup g)
Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.

This method is invoked for the current security manager when a new child thread or child thread group is created, and by the setDaemon, setMaxPriority, stop, suspend, resume, and destroy methods of class ThreadGroup.

If the thread group argument is the system thread group ( has a null parent) then this method calls checkPermission with the RuntimePermission("modifyThreadGroup") permission. If the thread group argument is not the system thread group, this method just returns silently.

Applications that want a stricter policy should override this method. If this method is overridden, the method that overrides it should additionally check to see if the calling thread has the RuntimePermission("modifyThreadGroup") permission, and if so, return silently. This is to ensure that code granted that permission (such as the SDK itself) is allowed to manipulate any thread.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

Parameters:
g - the thread group to be checked.
Throws:
SecurityException - if the calling thread does not have permission to modify the thread group.
NullPointerException - if the thread group argument is null.
See Also:
destroy, resume, setDaemon, setMaxPriority, stop, suspend, checkPermission

checkExit

public void checkExit(int status)
Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.

This method is invoked for the current security manager by the exit method of class Runtime. A status of 0 indicates success; other values indicate various errors.

This method calls checkPermission with the RuntimePermission("exitVM") permission.

If you override this method, then you should make a call to super.checkExit at the point the overridden method would normally throw an exception.

Parameters:
status - the exit status.
Throws:
SecurityException - if the calling thread does not have permission to halt the Java Virtual Machine with the specified status.
See Also:
exit, checkPermission

checkExec

public void checkExec(String cmd)
Throws a SecurityException if the calling thread is not allowed to create a subprocess.

This method is invoked for the current security manager by the exec methods of class Runtime.

This method calls checkPermission with the FilePermission(cmd,"execute") permission if cmd is an absolute path, otherwise it calls checkPermission with FilePermission("<<ALL FILES>>","execute").

If you override this method, then you should make a call to super.checkExec at the point the overridden method would normally throw an exception.

Parameters:
cmd - the specified system command.
Throws:
SecurityException - if the calling thread does not have permission to create a subprocess.
NullPointerException - if the cmd argument is null.
See Also:
Runtime.exec(java.lang.String),
Runtime.exec(java.lang.String, java.lang.String[]),
Runtime.exec(java.lang.String[]),
Runtime.exec(java.lang.String[], java.lang.String[]),
checkPermission

checkLink

public void checkLink(String lib)
Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file. The argument is either a simple library name or a complete filename.

This method is invoked for the current security manager by methods load and loadLibrary of class Runtime.

This method calls checkPermission with the RuntimePermission("loadLibrary."+lib) permission.

If you override this method, then you should make a call to super.checkLink at the point the overridden method would normally throw an exception.

Parameters:
lib - the name of the library.
Throws:
SecurityException - if the calling thread does not have permission to dynamically link the library.
NullPointerException - if the lib argument is null.
See Also:
Runtime.load(java.lang.String), Runtime.loadLibrary(java.lang.String), checkPermission

checkRead

public void checkRead(FileDescriptor fd)
Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.

This method calls checkPermission with the RuntimePermission("readFileDescriptor") permission.

If you override this method, then you should make a call to super.checkRead at the point the overridden method would normally throw an exception.

Parameters:
fd - the system-dependent file descriptor.
Throws:
SecurityException - if the calling thread does not have permission to access the specified file descriptor.
NullPointerException - if the file descriptor argument is null.
See Also:
FileDescriptor, checkPermission

checkRead

public void checkRead(String file)
Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.

This method calls checkPermission with the FilePermission(file,"read") permission.

If you override this method, then you should make a call to super.checkRead at the point the overridden method would normally throw an exception.

Parameters:
file - the system-dependent file name.
Throws:
SecurityException - if the calling thread does not have permission to access the specified file.
NullPointerException - if the file argument is null.
See Also:
checkPermission

checkRead

public void checkRead(String file,
                      Object context)
Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument. The context must be a security context returned by a previous call to getSecurityContext.

If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked with the FilePermission(file,"read") permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

If you override this method, then you should make a call to super.checkRead at the point the overridden method would normally throw an exception.

Parameters:
file - the system-dependent filename.
context - a system-dependent security context.
Throws:
SecurityException - if the specified security context is not an instance of AccessControlContext (e.g., is null), or does not have permission to read the specified file.
NullPointerException - if the file argument is null.
See Also:
getSecurityContext(), AccessControlContext.checkPermission(java.security.Permission)

checkWrite

public void checkWrite(FileDescriptor fd)
Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.

This method calls checkPermission with the RuntimePermission("writeFileDescriptor") permission.

If you override this method, then you should make a call to super.checkWrite at the point the overridden method would normally throw an exception.

Parameters:
fd - the system-dependent file descriptor.
Throws:
SecurityException - if the calling thread does not have permission to access the specified file descriptor.
NullPointerException - if the file descriptor argument is null.
See Also:
FileDescriptor, checkPermission

checkWrite

public void checkWrite(String file)
Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.

This method calls checkPermission with the FilePermission(file,"write") permission.

If you override this method, then you should make a call to super.checkWrite at the point the overridden method would normally throw an exception.

Parameters:
file - the system-dependent filename.
Throws:
SecurityException - if the calling thread does not have permission to access the specified file.
NullPointerException - if the file argument is null.
See Also:
checkPermission

checkDelete

public void checkDelete(String file)
Throws a SecurityException if the calling thread is not allowed to delete the specified file.

This method is invoked for the current security manager by the delete method of class File.

This method calls checkPermission with the FilePermission(file,"delete") permission.

If you override this method, then you should make a call to super.checkDelete at the point the overridden method would normally throw an exception.

Parameters:
file - the system-dependent filename.
Throws:
SecurityException - if the calling thread does not have permission to delete the file.
NullPointerException - if the file argument is null.
See Also:
File.delete(), checkPermission

checkConnect

public void checkConnect(String host,
                         int port)
Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.

A port number of -1 indicates that the calling method is attempting to determine the IP address of the specified host name.

This method calls checkPermission with the SocketPermission(host+":"+port,"connect") permission if the port is not equal to -1. If the port is equal to -1, then it calls checkPermission with the SocketPermission(host,"resolve") permission.

If you override this method, then you should make a call to super.checkConnect at the point the overridden method would normally throw an exception.

Parameters:
host - the host name port to connect to.
port - the protocol port to connect to.
Throws:
SecurityException - if the calling thread does not have permission to open a socket connection to the specified host and port.
NullPointerException - if the host argument is null.
See Also:
checkPermission

checkConnect

public void checkConnect(String host,
                         int port,
                         Object context)
Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.

A port number of -1 indicates that the calling method is attempting to determine the IP address of the specified host name.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

Otherwise, the port number is checked. If it is not equal to -1, the context's checkPermission method is called with a SocketPermission(host+":"+port,"connect") permission. If the port is equal to -1, then the context's checkPermission method is called with a SocketPermission(host,"resolve") permission.

If you override this method, then you should make a call to super.checkConnect at the point the overridden method would normally throw an exception.

Parameters:
host - the host name port to connect to.
port - the protocol port to connect to.
context - a system-dependent security context.
Throws:
SecurityException - if the specified security context is not an instance of AccessControlContext (e.g., is null), or does not have permission to open a socket connection to the specified host and port.
NullPointerException - if the host argument is null.
See Also:
getSecurityContext(), AccessControlContext.checkPermission(java.security.Permission)

checkListen

public void checkListen(int port)
Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.

If port is not 0, this method calls checkPermission with the SocketPermission("localhost:"+port,"listen"). If port is zero, this method calls checkPermission with SocketPermission("localhost:1024-","listen").

If you override this method, then you should make a call to super.checkListen at the point the overridden method would normally throw an exception.

Parameters:
port - the local port.
Throws:
SecurityException - if the calling thread does not have permission to listen on the specified port.
See Also:
checkPermission

checkAccept

public void checkAccept(String host,
                        int port)
Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.

This method is invoked for the current security manager by the accept method of class ServerSocket.

This method calls checkPermission with the SocketPermission(host+":"+port,"accept") permission.

If you override this method, then you should make a call to super.checkAccept at the point the overridden method would normally throw an exception.

Parameters:
host - the host name of the socket connection.
port - the port number of the socket connection.
Throws:
SecurityException - if the calling thread does not have permission to accept the connection.
NullPointerException - if the host argument is null.
See Also:
ServerSocket.accept(), checkPermission

checkMulticast

public void checkMulticast(InetAddress maddr)
Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.

This method calls checkPermission with the java.net.SocketPermission(maddr.getHostAddress(), "accept,connect") permission.

If you override this method, then you should make a call to super.checkMulticast at the point the overridden method would normally throw an exception.

Parameters:
maddr - Internet group address to be used.
Throws:
SecurityException - if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
NullPointerException - if the address argument is null.
Since:
JDK1.1
See Also:
checkPermission

checkMulticast

public void checkMulticast(InetAddress maddr,
                           byte ttl)
Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.

This method calls checkPermission with the java.net.SocketPermission(maddr.getHostAddress(), "accept,connect") permission.

If you override this method, then you should make a call to super.checkMulticast at the point the overridden method would normally throw an exception.

Parameters:
maddr - Internet group address to be used.
ttl - value in use, if it is multicast send. Note: this particular implementation does not use the ttl parameter.
Throws:
SecurityException - if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
NullPointerException - if the address argument is null.
Since:
JDK1.1
See Also:
checkPermission

checkPropertiesAccess

public void checkPropertiesAccess()
Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.

This method is used by the getProperties and setProperties methods of class System.

This method calls checkPermission with the PropertyPermission("*", "read,write") permission.

If you override this method, then you should make a call to super.checkPropertiesAccess at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to access or modify the system properties.
See Also:
System.getProperties(), System.setProperties(java.util.Properties), checkPermission

checkPropertyAccess

public void checkPropertyAccess(String key)
Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.

This method is used by the getProperty method of class System.

This method calls checkPermission with the PropertyPermission(key, "read") permission.

If you override this method, then you should make a call to super.checkPropertyAccess at the point the overridden method would normally throw an exception.

Parameters:
key - a system property key.
Throws:
SecurityException - if the calling thread does not have permission to access the specified system property.
NullPointerException - if the key argument is null.
IllegalArgumentException - if key is empty.
See Also:
System.getProperty(java.lang.String), checkPermission

checkTopLevelWindow

public boolean checkTopLevelWindow(Object window)
Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument. In this case, the caller can still decide to show the window, but the window should include some sort of visual warning. If the method returns true, then the window can be shown without any special restrictions.

See class Window for more information on trusted and untrusted windows.

This method calls checkPermission with the AWTPermission("showWindowWithoutWarningBanner") permission, and returns true if a SecurityException is not thrown, otherwise it returns false.

If you override this method, then you should make a call to super.checkTopLevelWindow at the point the overridden method would normally return false, and the value of super.checkTopLevelWindow should be returned.

Parameters:
window - the new window that is being created.
Returns:
true if the calling thread is trusted to put up top-level windows; false otherwise.
Throws:
SecurityException - if creation is disallowed entirely.
NullPointerException - if the window argument is null.
See Also:
Window, checkPermission

checkPrintJobAccess

public void checkPrintJobAccess()
Throws a SecurityException if the calling thread is not allowed to initiate a print job request.

This method calls checkPermission with the RuntimePermission("queuePrintJob") permission.

If you override this method, then you should make a call to super.checkPrintJobAccess at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to initiate a print job request.
Since:
JDK1.1
See Also:
checkPermission

checkSystemClipboardAccess

public void checkSystemClipboardAccess()
Throws a SecurityException if the calling thread is not allowed to access the system clipboard.

This method calls checkPermission with the AWTPermission("accessClipboard") permission.

If you override this method, then you should make a call to super.checkSystemClipboardAccess at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to access the system clipboard.
Since:
JDK1.1
See Also:
checkPermission

checkAwtEventQueueAccess

public void checkAwtEventQueueAccess()
Throws a SecurityException if the calling thread is not allowed to access the AWT event queue.

This method calls checkPermission with the AWTPermission("accessEventQueue") permission.

If you override this method, then you should make a call to super.checkAwtEventQueueAccess at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to access the AWT event queue.
Since:
JDK1.1
See Also:
checkPermission

checkPackageAccess

public void checkPackageAccess(String pkg)
Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.

This method is used by the loadClass method of class loaders.

This method first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.access"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("accessClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageAccess should be called as the first line in the overridden method.

Parameters:
pkg - the package name.
Throws:
SecurityException - if the calling thread does not have permission to access the specified package.
NullPointerException - if the package name argument is null.
See Also:
loadClass, getProperty, checkPermission

checkPackageDefinition

public void checkPackageDefinition(String pkg)
Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.

This method is used by the loadClass method of some class loaders.

This method first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.definition"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("defineClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageDefinition should be called as the first line in the overridden method.

Parameters:
pkg - the package name.
Throws:
SecurityException - if the calling thread does not have permission to define classes in the specified package.
See Also:
ClassLoader.loadClass(java.lang.String, boolean), getProperty, checkPermission

checkSetFactory

public void checkSetFactory()
Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.

This method calls checkPermission with the RuntimePermission("setFactory") permission.

If you override this method, then you should make a call to super.checkSetFactory at the point the overridden method would normally throw an exception.

Throws:
SecurityException - if the calling thread does not have permission to specify a socket factory or a stream handler factory.
See Also:
setSocketFactory, setSocketImplFactory, setURLStreamHandlerFactory, checkPermission

checkMemberAccess

public void checkMemberAccess(Class clazz,
                              int which)
Throws a SecurityException if the calling thread is not allowed to access members.

The default policy is to allow access to PUBLIC members, as well as access to classes that have the same class loader as the caller. In all other cases, this method calls checkPermission with the RuntimePermission("accessDeclaredMembers") permission.

If this method is overridden, then a call to super.checkMemberAccess cannot be made, as the default implementation of checkMemberAccess relies on the code being checked being at a stack depth of 4.

Parameters:
clazz - the class that reflection is to be performed on.
which - type of access, PUBLIC or DECLARED.
Throws:
SecurityException - if the caller does not have permission to access members.
NullPointerException - if the clazz argument is null.
Since:
JDK1.1
See Also:
Member, checkPermission

checkSecurityAccess

public void checkSecurityAccess(String target)
Determines whether the permission with the specified permission target name should be granted or denied.

If the requested permission is allowed, this method returns quietly. If denied, a SecurityException is raised.

This method creates a SecurityPermission object for the given permission target name and calls checkPermission with it.

See the documentation for SecurityPermission for a list of possible permission target names.

If you override this method, then you should make a call to super.checkSecurityAccess at the point the overridden method would normally throw an exception.

Parameters:
target - the target name of the SecurityPermission.
Throws:
SecurityException - if the calling thread does not have permission for the requested access.
NullPointerException - if target is null.
IllegalArgumentException - if target is empty.
Since:
JDK1.1
See Also:
checkPermission

getThreadGroup

public ThreadGroup getThreadGroup()
Returns the thread group into which to instantiate any new thread being created at the time this is being called. By default, it returns the thread group of the current thread. This should be overridden by a specific security manager to return the appropriate thread group.
Returns:
ThreadGroup that new threads are instantiated into
Since:
JDK1.1
See Also:
ThreadGroup
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Short

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Short

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Short
All Implemented Interfaces:
Comparable, Serializable
public final class Short
extends Number
implements Comparable

The Short class is the standard wrapper for short values.

Since:
JDK1.1
See Also:
Number, Serialized Form

Field Summary
static short | MAX_VALUE The maximum value a Short can have.
static short | MIN_VALUE The minimum value a Short can have.
static Class | TYPE The Class object representing the primitive type short.
Constructor Summary
Short(short value)
Constructs a Short object initialized to the specified short value.
Short(String s)
Constructs a Short object initialized to the value specified by the String parameter.
Method Summary
byte | byteValue() Returns the value of this Short as a byte.
int | compareTo(Object o) Compares this Short to another Object.
int | compareTo(Short anotherShort) Compares two Shorts numerically.
static Short | decode(String nm) Decodes a String into a Short.
double | doubleValue() Returns the value of this Short as a double.
boolean | equals(Object obj) Compares this object to the specified object.
float | floatValue() Returns the value of this Short as a float.
int | hashCode() Returns a hashcode for this Short.
int | intValue() Returns the value of this Short as an int.
long | longValue() Returns the value of this Short as a long.
static short | parseShort(String s) Assuming the specified String represents a short, returns that short's value.
static short | parseShort(String s, int radix) Assuming the specified String represents a short, returns that short's value.
short | shortValue() Returns the value of this Short as a short.
String | toString() Returns a String object representing this Short's value.
static String | toString(short s) Returns a new String object representing the specified Short.
static Short | valueOf(String s) Assuming the specified String represents a short, returns a new Short object initialized to that value.
static Short | valueOf(String s, int radix) Assuming the specified String represents a short, returns a new Short object initialized to that value.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MIN_VALUE

public static final short MIN_VALUE
The minimum value a Short can have.

MAX_VALUE

public static final short MAX_VALUE
The maximum value a Short can have.

TYPE

public static final Class TYPE
The Class object representing the primitive type short.
Constructor Detail

Short

public Short(short value)
Constructs a Short object initialized to the specified short value.
Parameters:
value - the initial value of the Short

Short

public Short(String s)
      throws NumberFormatException
Constructs a Short object initialized to the value specified by the String parameter. The radix is assumed to be 10.
Parameters:
s - the String to be converted to a Short
Throws:
NumberFormatException - If the String does not contain a parsable short.
Method Detail

toString

public static String toString(short s)
Returns a new String object representing the specified Short. The radix is assumed to be 10.
Parameters:
s - the short to be converted
Returns:
The String that represents the specified short in radix 10.

parseShort

public static short parseShort(String s)
                        throws NumberFormatException
Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short. The radix is assumed to be 10.
Parameters:
s - the String containing the short
Returns:
short the value represented by the specified string
Throws:
NumberFormatException - If the string does not contain a parsable short.

parseShort

public static short parseShort(String s,
                               int radix)
                        throws NumberFormatException
Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short.
Parameters:
s - the String containing the short
radix - the radix to be used
Returns:
The short value represented by the specified string in the specified radix.
Throws:
NumberFormatException - If the String does not contain a parsable short.

valueOf

public static Short valueOf(String s,
                            int radix)
                     throws NumberFormatException
Assuming the specified String represents a short, returns a new Short object initialized to that value. Throws an exception if the String cannot be parsed as a short.
Parameters:
s - the String containing the integer
radix - the radix to be used
Returns:
The Short value represented by the specified string in the specified radix.
Throws:
NumberFormatException - If the String does not contain a parsable short.

valueOf

public static Short valueOf(String s)
                     throws NumberFormatException
Assuming the specified String represents a short, returns a new Short object initialized to that value. Throws an exception if the String cannot be parsed as a short.
Parameters:
s - the String containing the integer
Returns:
Short of the value represented by the specified string in radix 10.
Throws:
NumberFormatException - If the String does not contain a parsable short.

decode

public static Short decode(String nm)
                    throws NumberFormatException
Decodes a String into a Short. Accepts decimal, hexadecimal, and octal numbers, in the following formats:
     [-]        decimal constant
     [-] 0x     hex constant
     [-] #      hex constant
     [-] 0      octal constant
The constant following an (optional) negative sign and/or "radix specifier" is parsed as by the Short.parseShort method with the specified radix (10, 8 or 16). This constant must be positive or a NumberFormatException will result. The result is made negative if first character of the specified String is the negative sign. No whitespace characters are permitted in the String.
Parameters:
nm - the String to decode.
Returns:
the Short represented by the specified string.
Throws:
NumberFormatException - if the String does not contain a parsable short.
See Also:
parseShort(String, int)

byteValue

public byte byteValue()
Returns the value of this Short as a byte.
Overrides:
byteValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type byte.

shortValue

public short shortValue()
Returns the value of this Short as a short.
Overrides:
shortValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type short.

intValue

public int intValue()
Returns the value of this Short as an int.
Overrides:
intValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type int.

longValue

public long longValue()
Returns the value of this Short as a long.
Overrides:
longValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public float floatValue()
Returns the value of this Short as a float.
Overrides:
floatValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public double doubleValue()
Returns the value of this Short as a double.
Overrides:
doubleValue in class Number
Following copied from class: java.lang.Number
Returns:
the numeric value represented by this object after conversion to type double.

toString

public String toString()
Returns a String object representing this Short's value.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

hashCode

public int hashCode()
Returns a hashcode for this Short.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compares this object to the specified object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with
Returns:
true if the objects are the same; false otherwise.

compareTo

public int compareTo(Short anotherShort)
Compares two Shorts numerically.
Parameters:
anotherShort - the Short to be compared.
Returns:
the value 0 if the argument Short is equal to this Short; a value less than 0 if this Short is numerically less than the Short argument; and a value greater than 0 if this Short is numerically greater than the Short argument (signed comparison).
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Short to another Object. If the Object is a Short, this function behaves like compareTo(Short). Otherwise, it throws a ClassCastException (as Shorts are comparable only to other Shorts).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Short numerically equal to this Short; a value less than 0 if the argument is a Short numerically greater than this Short; and a value greater than 0 if the argument is a Short numerically less than this Short.
Throws:
ClassCastException - if the argument is not a Short.
Since:
1.2
See Also:
Comparable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StackOverflowError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class StackOverflowError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.VirtualMachineError
                    |
                    +--java.lang.StackOverflowError
All Implemented Interfaces:
Serializable
public class StackOverflowError
extends VirtualMachineError

Thrown when a stack overflow occurs because an application recurses too deeply.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
StackOverflowError()
Constructs a StackOverflowError with no detail message.
StackOverflowError(String s)
Constructs a StackOverflowError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StackOverflowError

public StackOverflowError()
Constructs a StackOverflowError with no detail message.

StackOverflowError

public StackOverflowError(String s)
Constructs a StackOverflowError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StrictMath

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class StrictMath

java.lang.Object
  |
  +--java.lang.StrictMath
public final class StrictMath
extends Object

The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.

To help ensure portability of Java programs, the definitions of many of the numeric functions in this package require that they produce the same results as certain published algorithms. These algorithms are available from the well-known network library netlib as the package "Freely Distributable Math Library" (fdlibm). These algorithms, which are written in the C programming language, are then to be understood as executed with all floating-point operations following the rules of Java floating-point arithmetic.

The network library may be found on the World Wide Web at:

   http://metalab.unc.edu/

The Java math library is defined with respect to the version of fdlibm dated January 4, 1995. Where fdlibm provides more than one definition for a function (such as acos), use the "IEEE 754 core function" version (residing in a file whose name begins with the letter e).

Since:
1.3

Field Summary
static double | E The double value that is closer than any other to e, the base of the natural logarithms.
static double | PI The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Method Summary
static double | abs(double a) Returns the absolute value of a double value.
static float | abs(float a) Returns the absolute value of a float value.
static int | abs(int a) Returns the absolute value of an int value..
static long | abs(long a) Returns the absolute value of a long value.
static double | acos(double a) Returns the arc cosine of an angle, in the range of 0.0 through pi.
static double | asin(double a) Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
static double | atan(double a) Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
static double | atan2(double a, double b) Converts rectangular coordinates (b, a) to polar (r, theta).
static double | ceil(double a) Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.
static double | cos(double a) Returns the trigonometric cosine of an angle.
static double | exp(double a) Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.
static double | floor(double a) Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.
static double | IEEEremainder(double f1, double f2) Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
static double | log(double a) Returns the natural logarithm (base e) of a double value.
static double | max(double a, double b) Returns the greater of two double values.
static float | max(float a, float b) Returns the greater of two float values.
static int | max(int a, int b) Returns the greater of two int values.
static long | max(long a, long b) Returns the greater of two long values.
static double | min(double a, double b) Returns the smaller of two double values.
static float | min(float a, float b) Returns the smaller of two float values.
static int | min(int a, int b) Returns the smaller of two int values.
static long | min(long a, long b) Returns the smaller of two long values.
static double | pow(double a, double b) Returns of value of the first argument raised to the power of the second argument.
static double | random() Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
static double | rint(double a) Returns the double value that is closest in value to a and is equal to a mathematical integer.
static long | round(double a) Returns the closest long to the argument.
static int | round(float a) Returns the closest int to the argument.
static double | sin(double a) Returns the trigonometric sine of an angle.
static double | sqrt(double a) Returns the positive square root of a double value.
static double | tan(double a) Returns the trigonometric tangent of an angle.
static double | toDegrees(double angrad) Converts an angle measured in radians to the equivalent angle measured in degrees.
static double | toRadians(double angdeg) Converts an angle measured in degrees to the equivalent angle measured in radians.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

E

public static final double E
The double value that is closer than any other to e, the base of the natural logarithms.

PI

public static final double PI
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Method Detail

sin

public static double sin(double a)
Returns the trigonometric sine of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
Parameters:
a - an angle, in radians.
Returns:
the sine of the argument.

cos

public static double cos(double a)
Returns the trigonometric cosine of an angle. Special case:
  • If the argument is NaN or an infinity, then the result is NaN.
Parameters:
a - an angle, in radians.
Returns:
the cosine of the argument.

tan

public static double tan(double a)
Returns the trigonometric tangent of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero
Parameters:
a - an angle, in radians.
Returns:
the tangent of the argument.

asin

public static double asin(double a)
Returns the arc sine of an angle, in the range of -pi/2 through pi/2. Special cases:
  • If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
Parameters:
a - the double value whose arc sine is to be returned.
Returns:
the arc sine of the argument.

acos

public static double acos(double a)
Returns the arc cosine of an angle, in the range of 0.0 through pi. Special case:
  • If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
Parameters:
a - the double value whose arc cosine is to be returned.
Returns:
the arc cosine of the argument.

atan

public static double atan(double a)
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2. Special cases:
  • If the argument is NaN, then the result is NaN.
  • If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
Parameters:
a - the double value whose arc tangent is to be returned.
Returns:
the arc tangent of the argument.

toRadians

public static double toRadians(double angdeg)
Converts an angle measured in degrees to the equivalent angle measured in radians.
Parameters:
angdeg - an angle, in degrees
Returns:
the measurement of the angle angdeg in radians.

toDegrees

public static double toDegrees(double angrad)
Converts an angle measured in radians to the equivalent angle measured in degrees.
Parameters:
angrad - an angle, in radians
Returns:
the measurement of the angle angrad in degrees.

exp

public static double exp(double a)
Returns the exponential number e (i.e., 2.718...) raised to the power of a double value. Special cases:
  • If the argument is NaN, the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is negative infinity, then the result is positive zero.
Parameters:
a - a double value.
Returns:
the value ea, where e is the base of the natural logarithms.

log

public static double log(double a)
Returns the natural logarithm (base e) of a double value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is negative infinity.
Parameters:
a - a number greater than 0.0.
Returns:
the value ln a, the natural logarithm of a.

sqrt

public static double sqrt(double a)
Returns the positive square root of a double value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is the same as the argument.
Otherwise, the result is the double value closest to the true mathetmatical square root of the argument value.
Parameters:
a - a double value.
Returns:
the positive square root of a.

IEEEremainder

public static double IEEEremainder(double f1,
                                   double f2)
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. The remainder value is mathematically equal to f1 - f2 × n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument. Special cases:
  • If either argument is NaN, or the first argument is infinite, or the second argument is positive zero or negative zero, then the result is NaN.
  • If the first argument is finite and the second argument is infinite, then the result is the same as the first argument.
Parameters:
f1 - the dividend.
f2 - the divisor.
Returns:
the remainder when f1 is divided by f2.

ceil

public static double ceil(double a)
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
  • If the argument value is less than zero but greater than -1.0, then the result is negative zero.
Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
Parameters:
a - a double value.
Returns:
the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.

floor

public static double floor(double a)
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
Parameters:
a - a double value.
Returns:
the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.

rint

public static double rint(double a)
Returns the double value that is closest in value to a and is equal to a mathematical integer. If two double values that are mathematical integers are equally close to the value of the argument, the result is the integer value that is even. Special cases:
  • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
Parameters:
a - a double value.
Returns:
the closest double value to a that is equal to a mathematical integer.

atan2

public static double atan2(double a,
                           double b)
Converts rectangular coordinates (b, a) to polar (r, theta). This method computes the phase theta by computing an arc tangent of a/b in the range of -pi to pi. Special cases:
  • If either argument is NaN, then the result is NaN.
  • If the first argument is positive zero and the second argument is positive, or the first argument is positive and finite and the second argument is positive infinity, then the result is positive zero.
  • If the first argument is negative zero and the second argument is positive, or the first argument is negative and finite and the second argument is positive infinity, then the result is negative zero.
  • If the first argument is positive zero and the second argument is negative, or the first argument is positive and finite and the second argument is negative infinity, then the result is the double value closest to pi.
  • If the first argument is negative zero and the second argument is negative, or the first argument is negative and finite and the second argument is negative infinity, then the result is the double value closest to -pi.
  • If the first argument is positive and the second argument is positive zero or negative zero, or the first argument is positive infinity and the second argument is finite, then the result is the double value closest to pi/2.
  • If the first argument is negative and the second argument is positive zero or negative zero, or the first argument is negative infinity and the second argument is finite, then the result is the double value closest to -pi/2.
  • If both arguments are positive infinity, then the result is the double value closest to pi/4.
  • If the first argument is positive infinity and the second argument is negative infinity, then the result is the double value closest to 3*pi/4.
  • If the first argument is negative infinity and the second argument is positive infinity, then the result is the double value closest to -pi/4.
  • If both arguments are negative infinity, then the result is the double value closest to -3*pi/4.
Parameters:
a - a double value.
b - a double value.
Returns:
the theta component of the point (r, theta) in polar coordinates that corresponds to the point (b, a) in Cartesian coordinates.

pow

public static double pow(double a,
                         double b)
Returns of value of the first argument raised to the power of the second argument. Special cases:
  • If the second argument is positive or negative zero, then the result is 1.0.
  • If the second argument is 1.0, then the result is the same as the first argument.
  • If the second argument is NaN, then the result is NaN.
  • If the first argument is NaN and the second argument is nonzero, then the result is NaN.
  • If the absolute value of the first argument is greater than 1 and the second argument is positive infinity, or the absolute value of the first argument is less than 1 and the second argument is negative infinity, then the result is positive infinity.
  • If the absolute value of the first argument is greater than 1 and the second argument is negative infinity, or the absolute value of the first argument is less than 1 and the second argument is positive infinity, then the result is positive zero.
  • If the absolute value of the first argument equals 1 and the second argument is infinite, then the result is NaN.
  • If the first argument is positive zero and the second argument is greater than zero, or the first argument is positive infinity and the second argument is less than zero, then the result is positive zero.
  • If the first argument is positive zero and the second argument is less than zero, or the first argument is positive infinity and the second argument is greater than zero, then the result is positive infinity.
  • If the first argument is negative zero and the second argument is greater than zero but not a finite odd integer, or the first argument is negative infinity and the second argument is less than zero but not a finite odd integer, then the result is positive zero.
  • If the first argument is negative zero and the second argument is a positive finite odd integer, or the first argument is negative infinity and the second argument is a negative finite odd integer, then the result is negative zero.
  • If the first argument is negative zero and the second argument is less than zero but not a finite odd integer, or the first argument is negative infinity and the second argument is greater than zero but not a finite odd integer, then the result is positive infinity.
  • If the first argument is negative zero and the second argument is a negative finite odd integer, or the first argument is negative infinity and the second argument is a positive finite odd integer, then the result is negative infinity.
  • If the first argument is less than zero and the second argument is a finite even integer, then the result is equal to the result of raising the absolute value of the first argument to the power of the second argument.
  • If the first argument is less than zero and the second argument is a finite odd integer, then the result is equal to the negative of the result of raising the absolute value of the first argument to the power of the second argument.
  • If the first argument is finite and less than zero and the second argument is finite and not an integer, then the result is NaN.
  • If both arguments are integers, then the result is exactly equal to the mathematical result of raising the first argument to the power of the second argument if that result can in fact be represented exactly as a double value.

(In the foregoing descriptions, a floating-point value is considered to be an integer if and only if it is a fixed point of the method ceil or, which is the same thing, a fixed point of the method floor. A value is a fixed point of a one-argument method if and only if the result of applying the method to the value is equal to the value.)

Parameters:
a - a double value.
b - a double value.
Returns:
the value ab.

round

public static int round(float a)
Returns the closest int to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. In other words, the result is equal to the value of the expression:

(int)Math.floor(a + 0.5f)

Special cases:

  • If the argument is NaN, the result is 0.
  • If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is equal to the value of Integer.MIN_VALUE.
  • If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is equal to the value of Integer.MAX_VALUE.
Parameters:
a - a float value.
Returns:
the value of the argument rounded to the nearest int value.
See Also:
Integer.MAX_VALUE, Integer.MIN_VALUE

round

public static long round(double a)
Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression:

(long)Math.floor(a + 0.5d)

Special cases:

  • If the argument is NaN, the result is 0.
  • If the argument is negative infinity or any value less than or equal to the value of Long.MIN_VALUE, the result is equal to the value of Long.MIN_VALUE.
  • If the argument is positive infinity or any value greater than or equal to the value of Long.MAX_VALUE, the result is equal to the value of Long.MAX_VALUE.
Parameters:
a - a double value.
Returns:
the value of the argument rounded to the nearest long value.
See Also:
Long.MAX_VALUE, Long.MIN_VALUE

random

public static double random()
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.

When this method is first called, it creates a single new pseudorandom-number generator, exactly as if by the expression

new java.util.Random
This new pseudorandom-number generator is used thereafter for all calls to this method and is used nowhere else.

This method is properly synchronized to allow correct use by more than one thread. However, if many threads need to generate pseudorandom numbers at a great rate, it may reduce contention for each thread to have its own pseudorandom number generator.

Returns:
a pseudorandom double greater than or equal to 0.0 and less than 1.0.
See Also:
Random.nextDouble()

abs

public static int abs(int a)
Returns the absolute value of an int value.. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.

Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.

Parameters:
a - the int argument whose absolute value is to be determined.
Returns:
the absolute value of the argument.
See Also:
Integer.MIN_VALUE

abs

public static long abs(long a)
Returns the absolute value of a long value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.

Note that if the argument is equal to the value of Long.MIN_VALUE, the most negative representable long value, the result is that same value, which is negative.

Parameters:
a - a long value.
Returns:
the absolute value of the argument.
See Also:
Long.MIN_VALUE

abs

public static float abs(float a)
Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
  • If the argument is infinite, the result is positive infinity.
  • If the argument is NaN, the result is NaN.
In other words, the result is equal to the value of the expression:

Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
Parameters:
a - a float value.
Returns:
the absolute value of the argument.

abs

public static double abs(double a)
Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
  • If the argument is infinite, the result is positive infinity.
  • If the argument is NaN, the result is NaN.
In other words, the result is equal to the value of the expression:

Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
Parameters:
a - a double value.
Returns:
the absolute value of the argument.

max

public static int max(int a,
                      int b)
Returns the greater of two int values. That is, the result is the argument closer to the value of Integer.MAX_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - an int value.
b - an int value.
Returns:
the larger of a and b.
See Also:
Long.MAX_VALUE

max

public static long max(long a,
                       long b)
Returns the greater of two long values. That is, the result is the argument closer to the value of Long.MAX_VALUE. If the argumens have the same value, the result is that same value.
Parameters:
a - a long value.
b - a long value.
Returns:
the larger of a and b.
See Also:
Long.MAX_VALUE

max

public static float max(float a,
                        float b)
Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Parameters:
a - a float value.
b - a float value.
Returns:
the larger of a and b.

max

public static double max(double a,
                         double b)
Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Parameters:
a - a double value.
b - a double value.
Returns:
the larger of a and b.

min

public static int min(int a,
                      int b)
Returns the smaller of two int values. That is, the result the argument closer to the value of Integer.MIN_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - an int value.
b - an int value.
Returns:
the smaller of a and b.
See Also:
Long.MIN_VALUE

min

public static long min(long a,
                       long b)
Returns the smaller of two long values. That is, the result is the argument closer to the value of Long.MIN_VALUE. If the arguments have the same value, the result is that same value.
Parameters:
a - a long value.
b - a long value.
Returns:
the smaller of a and b.
See Also:
Long.MIN_VALUE

min

public static float min(float a,
                        float b)
Returns the smaller of two float values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Parameters:
a - a float value.
b - a float value.
Returns:
the smaller of a and b.

min

public static double min(double a,
                         double b)
Returns the smaller of two double values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Parameters:
a - a double value.
b - a double value.
Returns:
the smaller of a and b.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


String

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class String

java.lang.Object
  |
  +--java.lang.String
All Implemented Interfaces:
Comparable, Serializable
public final class String
extends Object
implements Serializable, Comparable

The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class.

Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:

     String str = "abc";

is equivalent to:

     char data[] = {'a', 'b', 'c'};
     String str = new String(data);

Here are some more examples of how strings can be used:

     System.out.println("abc");
     String cde = "cde";
     System.out.println("abc" + cde);
     String c = "abc".substring(2,3);
     String d = cde.substring(1, 2);

The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase.

The Java language provides special support for the string concatentation operator ( + ), and for conversion of other objects to strings. String concatenation is implemented through the StringBuffer class and its append method. String conversions are implemented through the method toString, defined by Object and inherited by all classes in Java. For additional information on string concatenation and conversion, see Gosling, Joy, and Steele, The Java Language Specification.

Since:
JDK1.0
See Also:
Object.toString(),
StringBuffer,
StringBuffer.append(boolean),
StringBuffer.append(char),
StringBuffer.append(char[]),
StringBuffer.append(char[], int, int),
StringBuffer.append(double),
StringBuffer.append(float),
StringBuffer.append(int),
StringBuffer.append(long),
StringBuffer.append(java.lang.Object),
StringBuffer.append(java.lang.String),
Character encodings, Serialized Form

Field Summary
static Comparator CASE_INSENSITIVE_ORDER
Returns a Comparator that orders String objects as by compareToIgnoreCase.
Constructor Summary
String()
Initializes a newly created String object so that it represents an empty character sequence.
String(byte[] bytes)
Construct a new String by converting the specified array of bytes using the platform's default character encoding.
String(byte[] ascii, int hibyte)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
String(byte[] bytes, int offset, int length)
Construct a new String by converting the specified subarray of bytes using the platform's default character encoding.
String(byte[] ascii, int hibyte, int offset, int count)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.
String(byte[] bytes, int offset, int length, String enc)
Construct a new String by converting the specified subarray of bytes using the specified character encoding.
String(byte[] bytes, String enc)
Construct a new String by converting the specified array of bytes using the specified character encoding.
String(char[] value)
Allocates a new String so that it represents the sequence of characters currently contained in the character array argument.
String(char[] value, int offset, int count)
Allocates a new String that contains characters from a subarray of the character array argument.
String(String original)
Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
String(StringBuffer buffer)
Allocates a new string that contains the sequence of characters currently contained in the string buffer argument.
Method Summary
 char charAt(int index)
Returns the character at the specified index.
 int compareTo(Object o)
Compares this String to another Object.
 int compareTo(String anotherString)
Compares two strings lexicographically.
 int compareToIgnoreCase(String str)
Compares two strings lexicographically, ignoring case considerations.
 String concat(String str)
Concatenates the specified string to the end of this string.
static String copyValueOf(char[] data)
Returns a String that is equivalent to the specified character array.
static String copyValueOf(char[] data, int offset, int count)
Returns a String that is equivalent to the specified character array.
 boolean endsWith(String suffix)
Tests if this string ends with the specified suffix.
 boolean equals(Object anObject)
Compares this string to the specified object.
 boolean equalsIgnoreCase(String anotherString)
Compares this String to another String, ignoring case considerations.
 byte[] getBytes()
Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
 void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)
Deprecated. This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding.
 byte[] getBytes(String enc)
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
 void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copies characters from this string into the destination character array.
 int hashCode()
Returns a hashcode for this string.
 int indexOf(int ch)
Returns the index within this string of the first occurrence of the specified character.
 int indexOf(int ch, int fromIndex)
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
 int indexOf(String str)
Returns the index within this string of the first occurrence of the specified substring.
 int indexOf(String str, int fromIndex)
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
 String intern()
Returns a canonical representation for the string object.
 int lastIndexOf(int ch)
Returns the index within this string of the last occurrence of the specified character.
 int lastIndexOf(int ch, int fromIndex)
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.
 int lastIndexOf(String str)
Returns the index within this string of the rightmost occurrence of the specified substring.
 int lastIndexOf(String str, int fromIndex)
Returns the index within this string of the last occurrence of the specified substring.
 int length()
Returns the length of this string.
 boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
Tests if two string regions are equal.
 boolean regionMatches(int toffset, String other, int ooffset, int len)
Tests if two string regions are equal.
 String replace(char oldChar, char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
 boolean startsWith(String prefix)
Tests if this string starts with the specified prefix.
 boolean startsWith(String prefix, int toffset)
Tests if this string starts with the specified prefix beginning a specified index.
 String substring(int beginIndex)
Returns a new string that is a substring of this string.
 String substring(int beginIndex, int endIndex)
Returns a new string that is a substring of this string.
 char[] toCharArray()
Converts this string to a new character array.
 String toLowerCase()
Converts all of the characters in this String to lower case using the rules of the default locale, which is returned by Locale.getDefault.
 String toLowerCase(Locale locale)
Converts all of the characters in this String to lower case using the rules of the given Locale.
 String toString()
This object (which is already a string!) is itself returned.
 String toUpperCase()
Converts all of the characters in this String to upper case using the rules of the default locale, which is returned by Locale.getDefault.
 String toUpperCase(Locale locale)
Converts all of the characters in this String to upper case using the rules of the given locale.
 String trim()
Removes white space from both ends of this string.
static String valueOf(boolean b)
Returns the string representation of the boolean argument.
static String valueOf(char c)
Returns the string representation of the char argument.
static String valueOf(char[] data)
Returns the string representation of the char array argument.
static String valueOf(char[] data, int offset, int count)
Returns the string representation of a specific subarray of the char array argument.
static String valueOf(double d)
Returns the string representation of the double argument.
static String valueOf(float f)
Returns the string representation of the float argument.
static String valueOf(int i)
Returns the string representation of the int argument.
static String valueOf(long l)
Returns the string representation of the long argument.
static String valueOf(Object obj)
Returns the string representation of the Object argument.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

CASE_INSENSITIVE_ORDER

public static final Comparator CASE_INSENSITIVE_ORDER
Returns a Comparator that orders String objects as by compareToIgnoreCase. This comparator is serializable.

Note that this Comparator does not take locale into account, and will result in an unsatisfactory ordering for certain locales. The java.text package provides Collators to allow locale-sensitive ordering.

See Also:
Collator.compare(String, String)
Since:
1.2
Constructor Detail

String

public String()
Initializes a newly created String object so that it represents an empty character sequence.

String

public String(String original)
Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
Parameters:
value - a String.

String

public String(char[] value)
Allocates a new String so that it represents the sequence of characters currently contained in the character array argument. The contents of the character array are copied; subsequent modification of the character array does not affect the newly created string.
Parameters:
value - the initial value of the string.
Throws:
NullPointerException - if value is null.

String

public String(char[] value,
              int offset,
              int count)
Allocates a new String that contains characters from a subarray of the character array argument. The offset argument is the index of the first character of the subarray and the count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.
Parameters:
value - array that is the source of characters.
offset - the initial offset.
count - the length.
Throws:
IndexOutOfBoundsException - if the offset and count arguments index characters outside the bounds of the value array.
NullPointerException - if value is null.

String

public String(byte[] ascii,
              int hibyte,
              int offset,
              int count)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.

Allocates a new String constructed from a subarray of an array of 8-bit integer values.

The offset argument is the index of the first byte of the subarray, and the count argument specifies the length of the subarray.

Each byte in the subarray is converted to a char as specified in the method above.

Parameters:
ascii - the bytes to be converted to characters.
hibyte - the top 8 bits of each 16-bit Unicode character.
offset - the initial offset.
count - the length.
Throws:
IndexOutOfBoundsException - if the offset or count argument is invalid.
NullPointerException - if ascii is null.
See Also:
String(byte[], int),
String(byte[], int, int, java.lang.String),
String(byte[], int, int),
String(byte[], java.lang.String),
String(byte[])

String

public String(byte[] ascii,
              int hibyte)
Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding.

Allocates a new String containing characters constructed from an array of 8-bit integer values. Each character cin the resulting string is constructed from the corresponding component b in the byte array such that:

     c == (char)(((hibyte & 0xff) << 8)
                         | (b & 0xff))
Parameters:
ascii - the bytes to be converted to characters.
hibyte - the top 8 bits of each 16-bit Unicode character.
Throws:
NullPointerException - If ascii is null.
See Also:
String(byte[], int, int, java.lang.String),
String(byte[], int, int),
String(byte[], java.lang.String),
String(byte[])

String

public String(byte[] bytes,
              int offset,
              int length,
              String enc)
       throws UnsupportedEncodingException
Construct a new String by converting the specified subarray of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
Parameters:
bytes - The bytes to be converted into characters
offset - Index of the first byte to convert
length - Number of bytes to convert
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - if the named encoding is not supported
IndexOutOfBoundsException - if the offset and count arguments index characters outside the bounds of the value array.
Since:
JDK1.1

String

public String(byte[] bytes,
              String enc)
       throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
Since:
JDK1.1

String

public String(byte[] bytes,
              int offset,
              int length)
Construct a new String by converting the specified subarray of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
Parameters:
bytes - The bytes to be converted into characters
offset - Index of the first byte to convert
length - Number of bytes to convert
Since:
JDK1.1

String

public String(byte[] bytes)
Construct a new String by converting the specified array of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
Since:
JDK1.1

String

public String(StringBuffer buffer)
Allocates a new string that contains the sequence of characters currently contained in the string buffer argument. The contents of the string buffer are copied; subsequent modification of the string buffer does not affect the newly created string.
Parameters:
buffer - a StringBuffer.
Throws:
NullPointerException - If buffer is null.
Method Detail

length

public int length()
Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.
Returns:
the length of the sequence of characters represented by this object.

charAt

public char charAt(int index)
Returns the character at the specified index. An index ranges from 0 to length() - 1. The first character of the sequence is at index 0, the next at index 1, and so on, as for array indexing.
Parameters:
index - the index of the character.
Returns:
the character at the specified index of this string. The first character is at index 0.
Throws:
IndexOutOfBoundsException - if the index argument is negative or not less than the length of this string.

getChars

public void getChars(int srcBegin,
                     int srcEnd,
                     char[] dst,
                     int dstBegin)
Copies characters from this string into the destination character array.

The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1 (thus the total number of characters to be copied is srcEnd-srcBegin). The characters are copied into the subarray of dst starting at index dstBegin and ending at index:

     dstbegin + (srcEnd-srcBegin) - 1
Parameters:
srcBegin - index of the first character in the string to copy.
srcEnd - index after the last character in the string to copy.
dst - the destination array.
dstBegin - the start offset in the destination array.
Throws:
IndexOutOfBoundsException - If any of the following is true:
  • srcBegin is negative.
  • srcBegin is greater than srcEnd
  • srcEnd is greater than the length of this string
  • dstBegin is negative
  • dstBegin+(srcEnd-srcBegin) is larger than dst.length
NullPointerException - if dst is null

getBytes

public void getBytes(int srcBegin,
                     int srcEnd,
                     byte[] dst,
                     int dstBegin)
Deprecated. This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding.

Copies characters from this string into the destination byte array. Each byte receives the 8 low-order bits of the corresponding character. The eight high-order bits of each character are not copied and do not participate in the transfer in any way.

The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters, converted to bytes, are copied into the subarray of dst starting at index dstBegin and ending at index:

     dstbegin + (srcEnd-srcBegin) - 1
Parameters:
srcBegin - index of the first character in the string to copy.
srcEnd - index after the last character in the string to copy.
dst - the destination array.
dstBegin - the start offset in the destination array.
Throws:
IndexOutOfBoundsException - if any of the following is true: srcBegin is negative
  • srcBegin is greater than srcEnd
  • srcEnd is greater than the length of this String
  • dstBegin is negative
  • dstBegin+(srcEnd-srcBegin) is larger than dst.length
    NullPointerException - if dst is null

    • getBytes

    public byte[] getBytes(String enc)
                throws UnsupportedEncodingException
    Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
    Parameters:
    enc - The name of a supported character encoding
    Returns:
    The resultant byte array
    Throws:
    UnsupportedEncodingException - If the named encoding is not supported
    Since:
    JDK1.1

    getBytes

    public byte[] getBytes()
    Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
    Returns:
    the resultant byte array.
    Since:
    JDK1.1

    equals

    public boolean equals(Object anObject)
    Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
    Overrides:
    equals in class Object
    Parameters:
    anObject - the object to compare this String against.
    Returns:
    true if the String are equal; false otherwise.
    See Also:
    compareTo(java.lang.String), equalsIgnoreCase(java.lang.String)

    equalsIgnoreCase

    public boolean equalsIgnoreCase(String anotherString)
    Compares this String to another String, ignoring case considerations. Two strings are considered equal ignoring case if they are of the same length, and corresponding characters in the two strings are equal ignoring case.

    Two characters c1 and c2 are considered the same, ignoring case if at least one of the following is true:

    • The two characters are the same (as compared by the == operator).
    • Applying the method Character.toUpperCase(char) to each character produces the same result.
    • Applying the method Character.toLowerCase(char) to each character produces the same result.
    Parameters:
    anotherString - the String to compare this String against.
    Returns:
    true if the argument is not null and the Strings are equal, ignoring case; false otherwise.
    See Also:
    equals(Object), Character.toLowerCase(char), Character.toUpperCase(char)

    compareTo

    public int compareTo(String anotherString)
    Compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string. The result is a negative integer if this String object lexicographically precedes the argument string. The result is a positive integer if this String object lexicographically follows the argument string. The result is zero if the strings are equal; compareTo returns 0 exactly when the equals(Object) method would return true.

    This is the definition of lexicographic ordering. If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both. If they have different characters at one or more index positions, let k be the smallest such index; then the string whose character at position k has the smaller value, as determined by using the compareTo returns the difference of the two character values at position k in the two string -- that is, the value:

     this.charAt(k)-anotherString.charAt(k)
    If there is no index position at which they differ, then the shorter string lexicographically precedes the longer string. In this case, compareTo returns the difference of the lengths of the strings -- that is, the value:
     this.length()-anotherString.length()
    Parameters:
    anotherString - the String to be compared.
    Returns:
    the value 0 if the argument string is equal to this string; a value less than 0 if this string is lexicographically less than the string argument; and a value greater than 0 if this string is lexicographically greater than the string argument.
    Throws:
    NullPointerException - if anotherString is null.

    compareTo

    public int compareTo(Object o)
    Compares this String to another Object. If the Object is a String, this function behaves like compareTo(String). Otherwise, it throws a ClassCastException (as Strings are comparable only to other Strings).
    Specified by:
    compareTo in interface Comparable
    Parameters:
    o - the Object to be compared.
    Returns:
    the value 0 if the argument is a string lexicographically equal to this string; a value less than 0 if the argument is a string lexicographically greater than this string; and a value greater than 0 if the argument is a string lexicographically less than this string.
    Throws:
    ClassCastException - if the argument is not a String.
    Since:
    1.2
    See Also:
    Comparable

    compareToIgnoreCase

    public int compareToIgnoreCase(String str)
    Compares two strings lexicographically, ignoring case considerations. This method returns an integer whose sign is that of this.toUpperCase().toLowerCase().compareTo( str.toUpperCase().toLowerCase()).

    Note that this method does not take locale into account, and will result in an unsatisfactory ordering for certain locales. The java.text package provides collators to allow locale-sensitive ordering.

    Parameters:
    str - the String to be compared.
    Returns:
    a negative integer, zero, or a positive integer as the the specified String is greater than, equal to, or less than this String, ignoring case considerations.
    Since:
    1.2
    See Also:
    Collator.compare(String, String)

    regionMatches

    public boolean regionMatches(int toffset,
                             String other,
                             int ooffset,
                             int len)
    Tests if two string regions are equal.

    A substring of this String object is compared to a substring of the argument other. The result is true if these substrings represent identical character sequences. The substring of this String object to be compared begins at index toffset and has length len. The substring of other to be compared begins at index ooffset and has length len. The result is false if and only if at least one of the following is true:

    • toffset is negative.
    • ooffset is negative.
    • toffset+len is greater than the length of this String object.
    • ooffset+len is greater than the length of the other argument.
    • There is some nonnegative integer k less than len such that: this.charAt(toffset+k) != other.charAt(ooffset+k)
      Parameters:
      toffset - the starting offset of the subregion in this string.
      other - the string argument.
      ooffset - the starting offset of the subregion in the string argument.
      len - the number of characters to compare.
      Returns:
      true if the specified subregion of this string exactly matches the specified subregion of the string argument; false otherwise.
      Throws:
      NullPointerException - if other is null.

    regionMatches

    public boolean regionMatches(boolean ignoreCase,
                             int toffset,
                             String other,
                             int ooffset,
                             int len)
    Tests if two string regions are equal.

    A substring of this String object is compared to a substring of the argument other. The result is true if these substrings represent character sequences that are the same, ignoring case if and only if ignoreCase is true. The substring of this String object to be compared begins at index toffset and has length len. The substring of other to be compared begins at index ooffset and has length len. The result is false if and only if at least one of the following is true:

    • toffset is negative.
    • ooffset is negative.
    • toffset+len is greater than the length of this String object.
    • ooffset+len is greater than the length of the other argument.
    • There is some nonnegative integer k less than len such that:
       this.charAt(toffset+k) != other.charAt(ooffset+k)
    • ignoreCase is true and there is some nonnegative integer k less than len such that:
       Character.toLowerCase(this.charAt(toffset+k)) !=
Character.toLowerCase(other.charAt(ooffset+k))
      and:
       Character.toUpperCase(this.charAt(toffset+k)) !=
         Character.toUpperCase(other.charAt(ooffset+k))
    Parameters:
    ignoreCase - if true, ignore case when comparing characters.
    toffset - the starting offset of the subregion in this string.
    other - the string argument.
    ooffset - the starting offset of the subregion in the string argument.
    len - the number of characters to compare.
    Returns:
    true if the specified subregion of this string matches the specified subregion of the string argument; false otherwise. Whether the matching is exact or case insensitive depends on the ignoreCase argument.

    startsWith

    public boolean startsWith(String prefix,
                          int toffset)
    Tests if this string starts with the specified prefix beginning a specified index.
    Parameters:
    prefix - the prefix.
    toffset - where to begin looking in the string.
    Returns:
    true if the character sequence represented by the argument is a prefix of the substring of this object starting at index toffset; false otherwise. The result is false if toffset is negative or greater than the length of this String object; otherwise the result is the same as the result of the expression
              this.subString(toffset).startsWith(prefix)
    Throws:
    NullPointerException - if prefix is null.

    startsWith

    public boolean startsWith(String prefix)
    Tests if this string starts with the specified prefix.
    Parameters:
    prefix - the prefix.
    Returns:
    true if the character sequence represented by the argument is a prefix of the character sequence represented by this string; false otherwise. Note also that true will be returned if the argument is an empty string or is equal to this String object as determined by the equals(Object) method.
    Throws:
    NullPointerException - if prefix is null.
    Since:
    JDK1. 0

    endsWith

    public boolean endsWith(String suffix)
    Tests if this string ends with the specified suffix.
    Parameters:
    suffix - the suffix.
    Returns:
    true if the character sequence represented by the argument is a suffix of the character sequence represented by this object; false otherwise. Note that the result will be true if the argument is the empty string or is equal to this String object as determined by the equals(Object) method.
    Throws:
    NullPointerException - if suffix is null.

    hashCode

    public int hashCode()
    Returns a hashcode for this string. The hashcode for a String object is computed as

 s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
    using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation. (The hash value of the empty string is zero.)
    Overrides:
    hashCode in class Object
    Returns:
    a hash code value for this object.

    indexOf

    public int indexOf(int ch)
    Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index of the first such occurrence is returned -- that is, the smallest value k such that:
     this.charAt(k) == ch
    is true. If no such character occurs in this string, then -1 is returned.
    Parameters:
    ch - a character.
    Returns:
    the index of the first occurrence of the character in the character sequence represented by this object, or -1 if the character does not occur.

    indexOf

    public int indexOf(int ch,
                   int fromIndex)
    Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.

    If a character with value ch occurs in the character sequence represented by this String object at an index no smaller than fromIndex, then the index of the first such occurrence is returned--that is, the smallest value k such that:

     (this.charAt(k) == ch) && (k >= fromIndex)
    is true. If no such character occurs in this string at or after position fromIndex, then -1 is returned.

    There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.

    Parameters:
    ch - a character.
    fromIndex - the index to start the search from.
    Returns:
    the index of the first occurrence of the character in the character sequence represented by this object that is greater than or equal to fromIndex, or -1 if the character does not occur.

    lastIndexOf

    public int lastIndexOf(int ch)
    Returns the index within this string of the last occurrence of the specified character. That is, the index returned is the largest value k such that:
     this.charAt(k) == ch
    is true. The String is searched backwards starting at the last character.
    Parameters:
    ch - a character.
    Returns:
    the index of the last occurrence of the character in the character sequence represented by this object, or -1 if the character does not occur.

    lastIndexOf

    public int lastIndexOf(int ch,
                       int fromIndex)
    Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. That is, the index returned is the largest value k such that:
     this.charAt(k) == ch) && (k <= fromIndex)="fromIndex)"
    is true.
    Parameters:
    ch - a character.
    fromIndex - the index to start the search from. There is no restriction on the value of fromIndex. If it is greater than or equal to the length of this string, it has the same effect as if it were equal to one less than the length of this string: this entire string may be searched. If it is negative, it has the same effect as if it were -1: -1 is returned.
    Returns:
    the index of the last occurrence of the character in the character sequence represented by this object that is less than or equal to fromIndex, or -1 if the character does not occur before that point.

    indexOf

    public int indexOf(String str)
    Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value k such that:
     this.startsWith(str, k)
    is true.
    Parameters:
    str - any string.
    Returns:
    if the string argument occurs as a substring within this object, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
    Throws:
    NullPointerException - if str is null.

    indexOf

    public int indexOf(String str,
                   int fromIndex)
    Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. The integer returned is the smallest value k such that:
     this.startsWith(str, k) && (k >= fromIndex)
    is true.

    There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.

    Parameters:
    str - the substring to search for.
    fromIndex - the index to start the search from.
    Returns:
    If the string argument occurs as a substring within this object at a starting index no smaller than fromIndex, then the index of the first character of the first such substring is returned. If it does not occur as a substring starting at fromIndex or beyond, -1 is returned.
    Throws:
    NullPointerException - if str is null

    lastIndexOf

    public int lastIndexOf(String str)
    Returns the index within this string of the rightmost occurrence of the specified substring. The rightmost empty string "" is considered to occur at the index value this.length(). The returned index is the largest value k such that
     this.startsWith(str, k)
    is true.
    Parameters:
    str - the substring to search for.
    Returns:
    if the string argument occurs one or more times as a substring within this object, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1 is returned.
    Throws:
    NullPointerException - if str is null.

    lastIndexOf

    public int lastIndexOf(String str,
                       int fromIndex)
    Returns the index within this string of the last occurrence of the specified substring. The returned index indicates the start of the substring, and it must be equal to or less than fromIndex. That is, the index returned is the largest value k such that:
     this.startsWith(str, k) && (k <= fromIndex)="fromIndex)"
    Parameters:
    str - the substring to search for.
    fromIndex - the index to start the search from. There is no restriction on the value of fromIndex. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: this entire string may be searched. If it is negative, it has the same effect as if it were -1: -1 is returned.
    Returns:
    If the string argument occurs one or more times as a substring within this object at a starting index no greater than fromIndex, then the index of the first character of the last such substring is returned. If it does not occur as a substring starting at fromIndex or earlier, -1 is returned.
    Throws:
    NullPointerException - if str is null.

    substring

    public String substring(int beginIndex)
    Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.

    Examples:

     "unhappy".substring(2) returns "happy"
 "Harbison".substring(3) returns "bison"
 "emptiness".substring(9) returns "" (an empty string)
    Parameters:
    beginIndex - the beginning index, inclusive.
    Returns:
    the specified substring.
    Throws:
    IndexOutOfBoundsException - if beginIndex is negative or larger than the length of this String object.

    substring

    public String substring(int beginIndex,
                        int endIndex)
    Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.

    Examples:

     "hamburger".substring(4, 8) returns "urge"
 "smiles".substring(1, 5) returns "mile"
    Parameters:
    beginIndex - the beginning index, inclusive.
    endIndex - the ending index, exclusive.
    Returns:
    the specified substring.
    Throws:
    IndexOutOfBoundsException - if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex.

    concat

    public String concat(String str)
    Concatenates the specified string to the end of this string.

    If the length of the argument string is 0, then this String object is returned. Otherwise, a new String object is created, representing a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string.

    Examples:

     "cares".concat("s") returns "caress"
 "to".concat("get").concat("her") returns "together"
    Parameters:
    str - the String that is concatenated to the end of this String.
    Returns:
    a string that represents the concatenation of this object's characters followed by the string argument's characters.
    Throws:
    NullPointerException - if str is null.

    replace

    public String replace(char oldChar,
                      char newChar)
    Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.

    If the character oldChar does not occur in the character sequence represented by this String object, then a reference to this String object is returned. Otherwise, a new String object is created that represents a character sequence identical to the character sequence represented by this String object, except that every occurrence of oldChar is replaced by an occurrence of newChar.

    Examples:

     "mesquite in your cellar".replace('e', 'o')
         returns "mosquito in your collar"
 "the war of baronets".replace('r', 'y')
         returns "the way of bayonets"
 "sparring with a purple porpoise".replace('p', 't')
         returns "starring with a turtle tortoise"
 "JonL".replace('q', 'x') returns "JonL" (no change)
    Parameters:
    oldChar - the old character.
    newChar - the new character.
    Returns:
    a string derived from this string by replacing every occurrence of oldChar with newChar.

    toLowerCase

    public String toLowerCase(Locale locale)
    Converts all of the characters in this String to lower case using the rules of the given Locale. Usually, the characters are converted by calling Character.toLowerCase. Exceptions to this rule are listed in the following table:

    Language Code of Locale | Upper Case | Lower Case | Description
    tr (Turkish) | \u0130 | \u0069 | capital letter I with dot above -> small letter i
    tr (Turkish) | \u0049 | \u0131 | capital letter I -> small letter dotless i
    Parameters:
    locale - use the case transformation rules for this locale
    Returns:
    the String, converted to lowercase.
    Since:
    JDK1.1
    See Also:
    Character.toLowerCase(char), toUpperCase(Locale)

    toLowerCase

    public String toLowerCase()
    Converts all of the characters in this String to lower case using the rules of the default locale, which is returned by Locale.getDefault.

    If no character in the string has a different lowercase version, based on calling the toLowerCase method defined by Character, then the original string is returned.

    Otherwise, this method creates a new String object that represents a character sequence identical in length to the character sequence represented by this String object, with every character equal to the result of applying the method Character.toLowerCase to the corresponding character of this String object.

    Examples:

     "French Fries".toLowerCase() returns "french fries"
 "          ".toLowerCase() returns "          "
    Returns:
    the string, converted to lowercase.
    See Also:
    Character.toLowerCase(char), toLowerCase(Locale)

    toUpperCase

    public String toUpperCase(Locale locale)
    Converts all of the characters in this String to upper case using the rules of the given locale. Usually, the characters are converted by calling Character.toUpperCase. Exceptions to this rule are listed in the following table:

    Language Code of Locale | Lower Case | Upper Case | Description
    tr (Turkish) | \u0069 | \u0130 | small letter i -> capital letter I with dot above
    tr (Turkish) | \u0131 | \u0049 | small letter dotless i -> capital letter I
    (all) | \u00df | \u0053 \u0053 | small letter sharp s -> two letters: SS
    Parameters:
    locale - use the case transformation rules for this locale
    Returns:
    the String, converted to uppercase.
    Since:
    JDK1.1
    See Also:
    Character.toUpperCase(char), toLowerCase(Locale)

    toUpperCase

    public String toUpperCase()
    Converts all of the characters in this String to upper case using the rules of the default locale, which is returned by Locale.getDefault.

    If no character in this string has a different uppercase version, based on calling the toUpperCase method defined by Character, then the original string is returned.

    Otherwise, this method creates a new String object representing a character sequence identical in length to the character sequence represented by this String object and with every character equal to the result of applying the method Character.toUpperCase to the corresponding character of this String object.

    Examples:

     "Fahrvergnügen".toUpperCase() returns "FAHRVERGNÜGEN"
 "Visit Ljubinje!".toUpperCase() returns "VISIT LJUBINJE!"
    Returns:
    the string, converted to uppercase.
    See Also:
    Character.toUpperCase(char), toUpperCase(Locale)

    trim

    public String trim()
    Removes white space from both ends of this string.

    If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes greater than '\u0020' (the space character), then a reference to this String object is returned.

    Otherwise, if there is no character with a code greater than '\u0020' in the string, then a new String object representing an empty string is created and returned.

    Otherwise, let k be the index of the first character in the string whose code is greater than '\u0020', and let m be the index of the last character in the string whose code is greater than '\u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k, m+1).

    This method may be used to trim whitespace from the beginning and end of a string; in fact, it trims all ASCII control characters as well.

    Returns:
    this string, with white space removed from the front and end.

    toString

    public String toString()
    This object (which is already a string!) is itself returned.
    Overrides:
    toString in class Object
    Returns:
    the string itself.

    toCharArray

    public char[] toCharArray()
    Converts this string to a new character array.
    Returns:
    a newly allocated character array whose length is the length of this string and whose contents are initialized to contain the character sequence represented by this string.

    valueOf

    public static String valueOf(Object obj)
    Returns the string representation of the Object argument.
    Parameters:
    obj - an Object.
    Returns:
    if the argument is null, then a string equal to "null"; otherwise, the value of obj.toString() is returned.
    See Also:
    Object.toString()

    valueOf

    public static String valueOf(char[] data)
    Returns the string representation of the char array argument. The contents of the character array are copied; subsequent modification of the character array does not affect the newly created string.
    Parameters:
    data - a char array.
    Returns:
    a newly allocated string representing the same sequence of characters contained in the character array argument.

    valueOf

    public static String valueOf(char[] data,
                             int offset,
                             int count)
    Returns the string representation of a specific subarray of the char array argument.

    The offset argument is the index of the first character of the subarray. The count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.

    Parameters:
    data - the character array.
    offset - the initial offset into the value of the String.
    count - the length of the value of the String.
    Returns:
    a newly allocated string representing the sequence of characters contained in the subarray of the character array argument.
    Throws:
    NullPointerException - if data is null.
    IndexOutOfBoundsException - if offset is negative, or count is negative, or offset+count is larger than data.length.

    copyValueOf

    public static String copyValueOf(char[] data,
                                 int offset,
                                 int count)
    Returns a String that is equivalent to the specified character array. It creates a new array and copies the characters into it.
    Parameters:
    data - the character array.
    offset - initial offset of the subarray.
    count - length of the subarray.
    Returns:
    a String that contains the characters of the specified subarray of the character array.

    copyValueOf

    public static String copyValueOf(char[] data)
    Returns a String that is equivalent to the specified character array. It creates a new array and copies the characters into it.
    Parameters:
    data - the character array.
    Returns:
    a String that contains the characters of the character array.

    valueOf

    public static String valueOf(boolean b)
    Returns the string representation of the boolean argument.
    Parameters:
    b - a boolean.
    Returns:
    if the argument is true, a string equal to "true" is returned; otherwise, a string equal to "false" is returned.

    valueOf

    public static String valueOf(char c)
    Returns the string representation of the char argument.
    Parameters:
    c - a char.
    Returns:
    a newly allocated string of length 1 containing as its single character the argument c.

    valueOf

    public static String valueOf(int i)
    Returns the string representation of the int argument.

    The representation is exactly the one returned by the Integer.toString method of one argument.

    Parameters:
    i - an int.
    Returns:
    a newly allocated string containing a string representation of the int argument.
    See Also:
    Integer.toString(int, int)

    valueOf

    public static String valueOf(long l)
    Returns the string representation of the long argument.

    The representation is exactly the one returned by the Long.toString method of one argument.

    Parameters:
    l - a long.
    Returns:
    a newly allocated string containing a string representation of the long argument.
    See Also:
    Long.toString(long)

    valueOf

    public static String valueOf(float f)
    Returns the string representation of the float argument.

    The representation is exactly the one returned by the Float.toString method of one argument.

    Parameters:
    f - a float.
    Returns:
    a newly allocated string containing a string representation of the float argument.
    See Also:
    Float.toString(float)

    valueOf

    public static String valueOf(double d)
    Returns the string representation of the double argument.

    The representation is exactly the one returned by the Double.toString method of one argument.

    Parameters:
    d - a double.
    Returns:
    a newly allocated string containing a string representation of the double argument.
    See Also:
    Double.toString(double)

    intern

    public String intern()
    Returns a canonical representation for the string object.

    A pool of strings, initially empty, is maintained privately by the class String.

    When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.

    It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true.

    All literal strings and string-valued constant expressions are interned. String literals are defined in §3.10.5 of the Java Language Specification

    Returns:
    a string that has the same contents as this string, but is guaranteed to be from a pool of unique strings.
    Overview Package Class Use Tree Deprecated Index Help
            JavaTM 2 Platform
    Std. Ed. v1.3.1
    PREV CLASS NEXT CLASS FRAMES NO FRAMES
    SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class StringBuffer

java.lang.Object
  |
  +--java.lang.StringBuffer
All Implemented Interfaces:
Serializable
public final class StringBuffer
extends Object
implements Serializable

A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.

String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.

String buffers are used by the compiler to implement the binary string concatenation operator +. For example, the code:

     x = "a" + 4 + "c"

is compiled to the equivalent of:

     x = new StringBuffer().append("a").append(4).append("c")
                           .toString()
which creates a new string buffer (initially empty), appends the string representation of each operand to the string buffer in turn, and then converts the contents of the string buffer to a string. Overall, this avoids creating many temporary strings.

The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.

For example, if z refers to a string buffer object whose current contents are "start", then the method call z.append("le") would cause the string buffer to contain "startle", whereas z.insert(4, "le") would alter the string buffer to contain "starlet".

In general, if sb refers to an instance of a StringBuffer, then sb.append(x) has the same effect as sb.insert(sb.length(), x).

Every string buffer has a capacity. As long as the length of the character sequence contained in the string buffer does not exceed the capacity, it is not necessary to allocate a new internal buffer array. If the internal buffer overflows, it is automatically made larger.

Since:
JDK1.0
See Also:
ByteArrayOutputStream, String, Serialized Form

Constructor Summary
StringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
StringBuffer(int length)
Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
StringBuffer(String str)
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
Method Summary
StringBuffer | append(boolean b) Appends the string representation of the boolean argument to the string buffer.
StringBuffer | append(char c) Appends the string representation of the char argument to this string buffer.
StringBuffer | append(char[] str) Appends the string representation of the char array argument to this string buffer.
StringBuffer | append(char[] str, int offset, int len) Appends the string representation of a subarray of the char array argument to this string buffer.
StringBuffer | append(double d) Appends the string representation of the double argument to this string buffer.
StringBuffer | append(float f) Appends the string representation of the float argument to this string buffer.
StringBuffer | append(int i) Appends the string representation of the int argument to this string buffer.
StringBuffer | append(long l) Appends the string representation of the long argument to this string buffer.
StringBuffer | append(Object obj) Appends the string representation of the Object argument to this string buffer.
StringBuffer | append(String str) Appends the string to this string buffer.
int | capacity() Returns the current capacity of the String buffer.
char | charAt(int index) The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned.
StringBuffer | delete(int start, int end) Removes the characters in a substring of this StringBuffer.
StringBuffer | deleteCharAt(int index) Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
void | ensureCapacity(int minimumCapacity) Ensures that the capacity of the buffer is at least equal to the specified minimum.
void | getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) Characters are copied from this string buffer into the destination character array dst.
StringBuffer | insert(int offset, boolean b) Inserts the string representation of the boolean argument into this string buffer.
StringBuffer | insert(int offset, char c) Inserts the string representation of the char argument into this string buffer.
StringBuffer | insert(int offset, char[] str) Inserts the string representation of the char array argument into this string buffer.
StringBuffer | insert(int index, char[] str, int offset, int len) Inserts the string representation of a subarray of the str array argument into this string buffer.
StringBuffer | insert(int offset, double d) Inserts the string representation of the double argument into this string buffer.
StringBuffer | insert(int offset, float f) Inserts the string representation of the float argument into this string buffer.
StringBuffer | insert(int offset, int i) Inserts the string representation of the second int argument into this string buffer.
StringBuffer | insert(int offset, long l) Inserts the string representation of the long argument into this string buffer.
StringBuffer | insert(int offset, Object obj) Inserts the string representation of the Object argument into this string buffer.
StringBuffer | insert(int offset, String str) Inserts the string into this string buffer.
int | length() Returns the length (character count) of this string buffer.
StringBuffer | replace(int start, int end, String str) Replaces the characters in a substring of this StringBuffer with characters in the specified String.
StringBuffer | reverse() The character sequence contained in this string buffer is replaced by the reverse of the sequence.
void | setCharAt(int index, char ch) The character at the specified index of this string buffer is set to ch.
void | setLength(int newLength) Sets the length of this String buffer.
String | substring(int start) Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.The substring begins at the specified index and extends to the end of the StringBuffer.
String | substring(int start, int end) Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.
String | toString() Converts to a string representing the data in this string buffer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StringBuffer

public StringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.

StringBuffer

public StringBuffer(int length)
Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
Parameters:
length - the initial capacity.
Throws:
NegativeArraySizeException - if the length argument is less than 0.

StringBuffer

public StringBuffer(String str)
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string. The initial capacity of the string buffer is 16 plus the length of the string argument.
Parameters:
str - the initial contents of the buffer.
Method Detail

length

public int length()
Returns the length (character count) of this string buffer.
Returns:
the length of the sequence of characters currently represented by this string buffer.

capacity

public int capacity()
Returns the current capacity of the String buffer. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
Returns:
the current capacity of this string buffer.

ensureCapacity

public void ensureCapacity(int minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum. If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of:
  • The minimumCapacity argument.
  • Twice the old capacity, plus 2.
If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
Parameters:
minimumCapacity - the minimum desired capacity.

setLength

public void setLength(int newLength)
Sets the length of this String buffer. This string buffer is altered to represent a new character sequence whose length is specified by the argument. For every nonnegative index k less than newLength, the character at index k in the new character sequence is the same as the character at index k in the old sequence if k is less than the length of the old character sequence; otherwise, it is the null character ''. In other words, if the newLength argument is less than the current length of the string buffer, the string buffer is truncated to contain exactly the number of characters given by the newLength argument.

If the newLength argument is greater than or equal to the current length, sufficient null characters ('\u0000') are appended to the string buffer so that length becomes the newLength argument.

The newLength argument must be greater than or equal to 0.

Parameters:
newLength - the new length of the buffer.
Throws:
IndexOutOfBoundsException - if the newLength argument is negative.
See Also:
length()

charAt

public char charAt(int index)
The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned. The first character of a string buffer is at index 0, the next at index 1, and so on, for array indexing.

The index argument must be greater than or equal to 0, and less than the length of this string buffer.

Parameters:
index - the index of the desired character.
Returns:
the character at the specified index of this string buffer.
Throws:
IndexOutOfBoundsException - if index is negative or greater than or equal to length().
See Also:
length()

getChars

public void getChars(int srcBegin,
                     int srcEnd,
                     char[] dst,
                     int dstBegin)
Characters are copied from this string buffer into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:

 dstbegin + (srcEnd-srcBegin) - 1
Parameters:
srcBegin - start copying at this offset in the string buffer.
srcEnd - stop copying at this offset in the string buffer.
dst - the array to copy the data into.
dstBegin - offset into dst.
Throws:
NullPointerException - if dst is null.
IndexOutOfBoundsException - if any of the following is true:
  • srcBegin is negative
  • dstBegin is negative
  • the srcBegin argument is greater than the srcEnd argument.
  • srcEnd is greater than this.length(), the current length of this string buffer.
  • dstBegin+srcEnd-srcBegin is greater than dst.length

setCharAt

public void setCharAt(int index,
                      char ch)
The character at the specified index of this string buffer is set to ch. The string buffer is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.

The offset argument must be greater than or equal to 0, and less than the length of this string buffer.

Parameters:
index - the index of the character to modify.
ch - the new character.
Throws:
IndexOutOfBoundsException - if index is negative or greater than or equal to length().
See Also:
length()

append

public StringBuffer append(Object obj)
Appends the string representation of the Object argument to this string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
obj - an Object.
Returns:
a reference to this StringBuffer object.
See Also:
String.valueOf(java.lang.Object), append(java.lang.String)

append

public StringBuffer append(String str)
Appends the string to this string buffer.

The characters of the String argument are appended, in order, to the contents of this string buffer, increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are appended to this string buffer.

Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str.

Parameters:
str - a string.
Returns:
a reference to this StringBuffer.

append

public StringBuffer append(char[] str)
Appends the string representation of the char array argument to this string buffer.

The characters of the array argument are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the length of the argument.

The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char[]) and the characters of that string were then appended to this StringBuffer object.

Parameters:
str - the characters to be appended.
Returns:
a reference to this StringBuffer object.

append

public StringBuffer append(char[] str,
                           int offset,
                           int len)
Appends the string representation of a subarray of the char array argument to this string buffer.

Characters of the character array str, starting at index offset, are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the value of len.

The overall effect is exactly as if the arguments were converted to a string by the method String.valueOf(char[],int,int) and the characters of that string were then appended to this StringBuffer object.

Parameters:
str - the characters to be appended.
offset - the index of the first character to append.
len - the number of characters to append.
Returns:
a reference to this StringBuffer object.

append

public StringBuffer append(boolean b)
Appends the string representation of the boolean argument to the string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
b - a boolean.
Returns:
a reference to this StringBuffer.
See Also:
String.valueOf(boolean), append(java.lang.String)

append

public StringBuffer append(char c)
Appends the string representation of the char argument to this string buffer.

The argument is appended to the contents of this string buffer. The length of this string buffer increases by 1.

The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuffer object.

Parameters:
c - a char.
Returns:
a reference to this StringBuffer object.

append

public StringBuffer append(int i)
Appends the string representation of the int argument to this string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
i - an int.
Returns:
a reference to this StringBuffer object.
See Also:
String.valueOf(int), append(java.lang.String)

append

public StringBuffer append(long l)
Appends the string representation of the long argument to this string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
l - a long.
Returns:
a referenct to this StringBuffer object.
See Also:
String.valueOf(long), append(java.lang.String)

append

public StringBuffer append(float f)
Appends the string representation of the float argument to this string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
f - a float.
Returns:
a reference to this StringBuffer object.
See Also:
String.valueOf(float), append(java.lang.String)

append

public StringBuffer append(double d)
Appends the string representation of the double argument to this string buffer.

The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.

Parameters:
d - a double.
Returns:
a reference to this StringBuffer object.
See Also:
String.valueOf(double), append(java.lang.String)

delete

public StringBuffer delete(int start,
                           int end)
Removes the characters in a substring of this StringBuffer. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuffer if no such character exists. If start is equal to end, no changes are made.
Parameters:
start - The beginning index, inclusive.
end - The ending index, exclusive.
Returns:
This string buffer.
Throws:
StringIndexOutOfBoundsException - if start is negative, greater than length(), or greater than end.
Since:
1.2

deleteCharAt

public StringBuffer deleteCharAt(int index)
Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
Parameters:
index - Index of character to remove
Returns:
This string buffer.
Throws:
StringIndexOutOfBoundsException - if the index is negative or greater than or equal to length().
Since:
1.2

replace

public StringBuffer replace(int start,
                            int end,
                            String str)
Replaces the characters in a substring of this StringBuffer with characters in the specified String. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuffer if no such character exists. First the characters in the substring are removed and then the specified String is inserted at start. (The StringBuffer will be lengthened to accommodate the specified String if necessary.)
Parameters:
start - The beginning index, inclusive.
end - The ending index, exclusive.
str - String that will replace previous contents.
Returns:
This string buffer.
Throws:
StringIndexOutOfBoundsException - if start is negative, greater than length(), or greater than end.
Since:
1.2

substring

public String substring(int start)
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer.The substring begins at the specified index and extends to the end of the StringBuffer.
Parameters:
start - The beginning index, inclusive.
Returns:
The new string.
Throws:
StringIndexOutOfBoundsException - if start is less than zero, or greater than the length of this StringBuffer.
Since:
1.2

substring

public String substring(int start,
                        int end)
Returns a new String that contains a subsequence of characters currently contained in this StringBuffer. The substring begins at the specified start and extends to the character at index end - 1. An exception is thrown if
Parameters:
start - The beginning index, inclusive.
end - The ending index, exclusive.
Returns:
The new string.
Throws:
StringIndexOutOfBoundsException - if start or end are negative or greater than length(), or start is greater than end.
Since:
1.2

insert

public StringBuffer insert(int index,
                           char[] str,
                           int offset,
                           int len)
Inserts the string representation of a subarray of the str array argument into this string buffer. The subarray begins at the specified offset and extends len characters. The characters of the subarray are inserted into this string buffer at the position indicated by index. The length of this StringBuffer increases by len characters.
Parameters:
index - position at which to insert subarray.
str - A character array.
offset - the index of the first character in subarray to to be inserted.
len - the number of characters in the subarray to to be inserted.
Returns:
This string buffer.
Throws:
StringIndexOutOfBoundsException - if index is negative or greater than length(), or offset or len are negative, or (offset+len) is greater than str.length.
Since:
1.2

insert

public StringBuffer insert(int offset,
                           Object obj)
Inserts the string representation of the Object argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
obj - an Object.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(java.lang.Object),
insert(int, java.lang.String),
length()

insert

public StringBuffer insert(int offset,
                           String str)
Inserts the string into this string buffer.

The characters of the String argument are inserted, in order, into this string buffer at the indicated offset, moving up any characters originally above that position and increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are inserted into this string buffer.

The character at index k in the new character sequence is equal to:

  • the character at index k in the old character sequence, if k is less than offset
  • the character at index k-offset in the argument str, if k is not less than offset but is less than offset+str.length()
  • the character at index k-str.length() in the old character sequence, if k is not less than offset+str.length()

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
str - a string.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
length()

insert

public StringBuffer insert(int offset,
                           char[] str)
Inserts the string representation of the char array argument into this string buffer.

The characters of the array argument are inserted into the contents of this string buffer at the position indicated by offset. The length of this string buffer increases by the length of the argument.

The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char[]) and the characters of that string were then inserted into this StringBuffer object at the position indicated by offset.

Parameters:
offset - the offset.
str - a character array.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.

insert

public StringBuffer insert(int offset,
                           boolean b)
Inserts the string representation of the boolean argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
b - a boolean.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(boolean),
insert(int, java.lang.String),
length()

insert

public StringBuffer insert(int offset,
                           char c)
Inserts the string representation of the char argument into this string buffer.

The second argument is inserted into the contents of this string buffer at the position indicated by offset. The length of this string buffer increases by one.

The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then inserted into this StringBuffer object at the position indicated by offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
c - a char.
Returns:
a reference to this StringBuffer object.
Throws:
IndexOutOfBoundsException - if the offset is invalid.
See Also:
length()

insert

public StringBuffer insert(int offset,
                           int i)
Inserts the string representation of the second int argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
i - an int.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(int),
insert(int, java.lang.String),
length()

insert

public StringBuffer insert(int offset,
                           long l)
Inserts the string representation of the long argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the position indicated by offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
l - a long.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(long),
insert(int, java.lang.String),
length()

insert

public StringBuffer insert(int offset,
                           float f)
Inserts the string representation of the float argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
f - a float.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(float),
insert(int, java.lang.String),
length()

insert

public StringBuffer insert(int offset,
                           double d)
Inserts the string representation of the double argument into this string buffer.

The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.

The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.

Parameters:
offset - the offset.
d - a double.
Returns:
a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also:
String.valueOf(double),
insert(int, java.lang.String),
length()

reverse

public StringBuffer reverse()
The character sequence contained in this string buffer is replaced by the reverse of the sequence.

Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the reverse method. Then the character at index k in the new character sequence is equal to the character at index n-k-1 in the old character sequence.

Returns:
a reference to this object..
Since:
JDK1.0.2

toString

public String toString()
Converts to a string representing the data in this string buffer. A new String object is allocated and initialized to contain the character sequence currently represented by this string buffer. This String is then returned. Subsequent changes to the string buffer do not affect the contents of the String.

Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string buffer. Any subsequent operation that alters the content or capacity of the string buffer must then make a copy of the internal buffer at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string buffer.

Overrides:
toString in class Object
Returns:
a string representation of the string buffer.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringIndexOutOfBoundsException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class StringIndexOutOfBoundsException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IndexOutOfBoundsException
                          |
                          +--java.lang.StringIndexOutOfBoundsException
All Implemented Interfaces:
Serializable
public class StringIndexOutOfBoundsException
extends IndexOutOfBoundsException

Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.

Since:
JDK1.0
See Also:
String.charAt(int), Serialized Form

Constructor Summary
StringIndexOutOfBoundsException()
Constructs a StringIndexOutOfBoundsException with no detail message.
StringIndexOutOfBoundsException(int index)
Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
StringIndexOutOfBoundsException(String s)
Constructs a StringIndexOutOfBoundsException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StringIndexOutOfBoundsException

public StringIndexOutOfBoundsException()
Constructs a StringIndexOutOfBoundsException with no detail message.
Since:
JDK1.0.

StringIndexOutOfBoundsException

public StringIndexOutOfBoundsException(String s)
Constructs a StringIndexOutOfBoundsException with the specified detail message.
Parameters:
s - the detail message.

StringIndexOutOfBoundsException

public StringIndexOutOfBoundsException(int index)
Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
Parameters:
index - the illegal index.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Subset

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Character.Subset

java.lang.Object
  |
  +--java.lang.Character.Subset
Direct Known Subclasses:
Character.UnicodeBlock, InputSubset
Enclosing class:
Character
public static class Character.Subset
extends Object

Instances of this class represent particular subsets of the Unicode character set. The only family of subsets defined in the Character class is UnicodeBlock. Other portions of the Java API may define other subsets for their own purposes.

Since:
1.2

Constructor Summary
protected Character.Subset(String name)
Constructs a new Subset instance.
Method Summary
 boolean equals(Object obj)
Compares two Subset objects for equality.
 int hashCode()
Returns the standard hash code as defined by the Object.hashCode() method.
 String toString()
Returns the name of this subset.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Character.Subset

protected Character.Subset(String name)
Constructs a new Subset instance.
Parameters:
name - The name of this subset
Method Detail

equals

public final boolean equals(Object obj)
Compares two Subset objects for equality. This method returns true if and only if x and y refer to the same object, and because it is final it guarantees this for all subclasses.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Returns the standard hash code as defined by the Object.hashCode() method. This method is final in order to ensure that the equals and hashCode methods will be consistent in all subclasses.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Returns the name of this subset.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


System

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class System

java.lang.Object
  |
  +--java.lang.System
public final class System
extends Object

The System class contains several useful class fields and methods. It cannot be instantiated.

Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined "properties"; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.

Since:
JDK1.0

Field Summary
static PrintStream | err The "standard" error output stream.
static InputStream | in The "standard" input stream.
static PrintStream | out The "standard" output stream.
Method Summary
static void arraycopy(Object src, int src_position, Object dst, int dst_position, int length)
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
static long currentTimeMillis()
Returns the current time in milliseconds.
static void exit(int status)
Terminates the currently running Java Virtual Machine.
static void gc()
Runs the garbage collector.
static String getenv(String name)
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding get TypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();
static Properties getProperties()
Determines the current system properties.
static String getProperty(String key)
Gets the system property indicated by the specified key.
static String getProperty(String key, String def)
Gets the system property indicated by the specified key.
static SecurityManager getSecurityManager()
Gets the system security interface.
static int identityHashCode(Object x)
Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().
static void load(String filename)
Loads a code file with the specified filename from the local file system as a dynamic library.
static void loadLibrary(String libname)
Loads the system library specified by the libname argument.
static String mapLibraryName(String libname)
Maps a library name into a platform-specific string representing a native library.
static void runFinalization()
Runs the finalization methods of any objects pending finalization.
static void runFinalizersOnExit(boolean value)
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
static void setErr(PrintStream err)
Reassigns the "standard" error output stream.
static void setIn(InputStream in)
Reassigns the "standard" input stream.
static void setOut(PrintStream out)
Reassigns the "standard" output stream.
static void setProperties(Properties props)
Sets the system properties to the Properties argument.
static String setProperty(String key, String value)
Sets the system property indicated by the specified key.
static void setSecurityManager(SecurityManager s)
Sets the System security.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

public static final InputStream in
The "standard" input stream. This stream is already open and ready to supply input data. Typically this stream corresponds to keyboard input or another input source specified by the host environment or user.

out

public static final PrintStream out
The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.

For simple stand-alone Java applications, a typical way to write a line of output data is:

     System.out.println(data)

See the println methods in class PrintStream.

See Also:
PrintStream.println(),
PrintStream.println(boolean),
PrintStream.println(char),
PrintStream.println(char[]),
PrintStream.println(double),
PrintStream.println(float),
PrintStream.println(int),
PrintStream.println(long),
PrintStream.println(java.lang.Object),
PrintStream.println(java.lang.String)

err

public static final PrintStream err
The "standard" error output stream. This stream is already open and ready to accept output data.

Typically this stream corresponds to display output or another output destination specified by the host environment or user. By convention, this output stream is used to display error messages or other information that should come to the immediate attention of a user even if the principal output stream, the value of the variable out, has been redirected to a file or other destination that is typically not continuously monitored.

Method Detail

setIn

public static void setIn(InputStream in)
Reassigns the "standard" input stream.

First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" input stream.

Parameters:
in - the new standard input stream.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow reassigning of the standard input stream.
Since:
JDK1.1
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setOut

public static void setOut(PrintStream out)
Reassigns the "standard" output stream.

First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" output stream.

Parameters:
out - the new standard output stream
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow reassigning of the standard output stream.
Since:
JDK1.1
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setErr

public static void setErr(PrintStream err)
Reassigns the "standard" error output stream.

First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" error output stream.

Parameters:
err - the new standard error output stream.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow reassigning of the standard error output stream.
Since:
JDK1.1
See Also:
SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setSecurityManager

public static void setSecurityManager(SecurityManager s)
Sets the System security.

If there is a security manager already installed, this method first calls the security manager's checkPermission method with a RuntimePermission("setSecurityManager") permission to ensure it's ok to replace the existing security manager. This may result in throwing a SecurityException.

Otherwise, the argument is established as the current security manager. If the argument is null and no security manager has been established, then no action is taken and the method simply returns.

Parameters:
s - the security manager.
Throws:
SecurityException - if the security manager has already been set and its checkPermission method doesn't allow it to be replaced.
See Also:
getSecurityManager(), SecurityManager.checkPermission(java.security.Permission), RuntimePermission

getSecurityManager

public static SecurityManager getSecurityManager()
Gets the system security interface.
Returns:
if a security manager has already been established for the current application, then that security manager is returned; otherwise, null is returned.
See Also:
setSecurityManager(java.lang.SecurityManager)

currentTimeMillis

public static long currentTimeMillis()
Returns the current time in milliseconds.

See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).

Returns:
the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
See Also:
Date

arraycopy

public static void arraycopy(Object src,
                             int src_position,
                             Object dst,
                             int dst_position,
                             int length)
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. A subsequence of array components are copied from the source array referenced by src to the destination array referenced by dst. The number of components copied is equal to the length argument. The components at positions srcOffset through srcOffset+length-1 in the source array are copied into positions dstOffset through dstOffset+length-1, respectively, of the destination array.

If the src and dst arguments refer to the same array object, then the copying is performed as if the components at positions srcOffset through srcOffset+length-1 were first copied to a temporary array with length components and then the contents of the temporary array were copied into positions dstOffset through dstOffset+length-1 of the destination array.

If dst is null, then a NullPointerException is thrown.

If src is null, then a NullPointerException is thrown and the destination array is not modified.

Otherwise, if any of the following is true, an ArrayStoreException is thrown and the destination is not modified:

  • The src argument refers to an object that is not an array.
  • The dst argument refers to an object that is not an array.
  • The src argument and dst argument refer to arrays whose component types are different primitive types.
  • The src argument refers to an array with a primitive component type and the dst argument refers to an array with a reference component type.
  • The src argument refers to an array with a reference component type and the dst argument refers to an array with a primitive component type.

Otherwise, if any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified:

  • The srcOffset argument is negative.
  • The dstOffset argument is negative.
  • The length argument is negative.
  • srcOffset+length is greater than src.length, the length of the source array.
  • dstOffset+length is greater than dst.length, the length of the destination array.

Otherwise, if any actual component of the source array from position srcOffset through srcOffset+length-1 cannot be converted to the component type of the destination array by assignment conversion, an ArrayStoreException is thrown. In this case, let k be the smallest nonnegative integer less than length such that src[srcOffset+k] cannot be converted to the component type of the destination array; when the exception is thrown, source array components from positions srcOffset through srcOffset+k-1 will already have been copied to destination array positions dstOffset through dstOffset+k-1 and no other positions of the destination array will have been modified. (Because of the restrictions already itemized, this paragraph effectively applies only to the situation where both arrays have component types that are reference types.)

Parameters:
src - the source array.
src_position - start position in the source array.
dst - the destination array.
dst_position - pos start position in the destination data.
length - the number of array elements to be copied.
Throws:
IndexOutOfBoundsException - if copying would cause access of data outside array bounds.
ArrayStoreException - if an element in the src array could not be stored into the dest array because of a type mismatch.
NullPointerException - if either src or dst is null.

identityHashCode

public static int identityHashCode(Object x)
Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hashcode for the null reference is zero.
Parameters:
x - object for which the hashCode is to be calculated
Returns:
the hashCode
Since:
JDK1.1

getProperties

public static Properties getProperties()
Determines the current system properties.

First, if there is a security manager, its checkPropertiesAccess method is called with no arguments. This may result in a security exception.

The current set of system properties for use by the getProperty(String) method is returned as a Properties object. If there is no current set of system properties, a set of system properties is first created and initialized. This set of system properties always includes values for the following keys:
Key | Description of Associated Value
java.version | Java Runtime Environment version
java.vendor | Java Runtime Environment vendor
java.vendor.url | Java vendor URL
java.home | Java installation directory
java.vm.specification.version | Java Virtual Machine specification version
java.vm.specification.vendor | Java Virtual Machine specification vendor
java.vm.specification.name | Java Virtual Machine specification name
java.vm.version | Java Virtual Machine implementation version
java.vm.vendor | Java Virtual Machine implementation vendor
java.vm.name | Java Virtual Machine implementation name
java.specification.version | Java Runtime Environment specification version
java.specification.vendor | Java Runtime Environment specification vendor
java.specification.name | Java Runtime Environment specification name
java.class.version | Java class format version number
java.class.path | Java class path
java.ext.dirs | Path of extension directory or directories
os.name | Operating system name
os.arch | Operating system architecture
os.version | Operating system version
file.separator | File separator ("/" on UNIX)
path.separator | Path separator (":" on UNIX)
line.separator | Line separator ("\n" on UNIX)
user.name | User's account name
user.home | User's home directory
user.dir | User's current working directory

Note that even if the security manager does not permit the getProperties operation, it may choose to permit the getProperty(String) operation.

Returns:
the system properties
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to the system properties.
See Also:
setProperties(java.util.Properties), SecurityException, SecurityManager.checkPropertiesAccess(), Properties

setProperties

public static void setProperties(Properties props)
Sets the system properties to the Properties argument.

First, if there is a security manager, its checkPropertiesAccess method is called with no arguments. This may result in a security exception.

The argument becomes the current set of system properties for use by the getProperty(String) method. If the argument is null, then the current set of system properties is forgotten.

Parameters:
props - the new system properties.
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to the system properties.
See Also:
getProperties(), Properties, SecurityException, SecurityManager.checkPropertiesAccess()

getProperty

public static String getProperty(String key)
Gets the system property indicated by the specified key.

First, if there is a security manager, its checkPropertyAccess method is called with the key as its argument. This may result in a SecurityException.

If there is no current set of system properties, a set of system properties is first created and initialized in the same manner as for the getProperties method.

Parameters:
key - the name of the system property.
Returns:
the string value of the system property, or null if there is no property with that key.
Throws:
SecurityException - if a security manager exists and its checkPropertyAccess method doesn't allow access to the specified system property.
NullPointerException - if key is null.
IllegalArgumentException - if key is empty.
See Also:
setProperty(java.lang.String, java.lang.String), SecurityException, SecurityManager.checkPropertyAccess(java.lang.String), getProperties()

getProperty

public static String getProperty(String key,
                                 String def)
Gets the system property indicated by the specified key.

First, if there is a security manager, its checkPropertyAccess method is called with the key as its argument.

If there is no current set of system properties, a set of system properties is first created and initialized in the same manner as for the getProperties method.

Parameters:
key - the name of the system property.
def - a default value.
Returns:
the string value of the system property, or the default value if there is no property with that key.
Throws:
SecurityException - if a security manager exists and its checkPropertyAccess method doesn't allow access to the specified system property.
NullPointerException - if key is null.
IllegalArgumentException - if key is empty.
See Also:
setProperty(java.lang.String, java.lang.String),
SecurityManager.checkPropertyAccess(java.lang.String),
getProperties()

setProperty

public static String setProperty(String key,
                                 String value)
Sets the system property indicated by the specified key.

First, if a security manager exists, its SecurityManager.checkPermission method is called with a PropertyPermission(key, "write") permission. This may result in a SecurityException being thrown. If no exception is thrown, the specified property is set to the given value.

Parameters:
key - the name of the system property.
value - the value of the system property.
Returns:
the previous value of the system property, or null if it did not have one.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow setting of the specified property.
NullPointerException - if key is null.
IllegalArgumentException - if key is empty.
Since:
1.2
See Also:
getProperty(java.lang.String),
getProperty(java.lang.String),
getProperty(java.lang.String, java.lang.String),
PropertyPermission,
SecurityManager.checkPermission(java.security.Permission)

getenv

public static String getenv(String name)
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding get TypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");

     if (Boolean.getBoolean("myapp.exper.mode"))
         enableExpertCommands();

Gets an environment variable. An environment variable is a system-dependent external variable that has a string value.
Parameters:
name - of the environment variable
Returns:
the value of the variable, or null if the variable is not defined.
See Also:
Boolean.getBoolean(java.lang.String),
Integer.getInteger(java.lang.String),
Integer.getInteger(java.lang.String, int),
Integer.getInteger(java.lang.String, java.lang.Integer),
Long.getLong(java.lang.String),
Long.getLong(java.lang.String, long),
Long.getLong(java.lang.String, java.lang.Long),
getProperties(),
getProperty(java.lang.String),
getProperty(java.lang.String, java.lang.String)

exit

public static void exit(int status)
Terminates the currently running Java Virtual Machine. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

This method calls the exit method in class Runtime. This method never returns normally.

The call System.exit(n) is effectively equivalent to the call:

 Runtime.getRuntime().exit(n)
Parameters:
status - exit status.
Throws:
SecurityException - if a security manager exists and its checkExit method doesn't allow exit with the specified status.
See Also:
Runtime.exit(int)

gc

public static void gc()
Runs the garbage collector.

Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects.

The call System.gc() is effectively equivalent to the call:

 Runtime.getRuntime().gc()
See Also:
Runtime.gc()

runFinalization

public static void runFinalization()
Runs the finalization methods of any objects pending finalization.

Calling this method suggests that the Java Virtual Machine expend effort toward running the finalize methods of objects that have been found to be discarded but whose finalize methods have not yet been run. When control returns from the method call, the Java Virtual Machine has made a best effort to complete all outstanding finalizations.

The call System.runFinalization() is effectively equivalent to the call:

 Runtime.getRuntime().runFinalization()
See Also:
Runtime.runFinalization()

runFinalizersOnExit

public static void runFinalizersOnExit(boolean value)
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.

Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits. By default, finalization on exit is disabled.

If there is a security manager, its checkExit method is first called with 0 as its argument to ensure the exit is allowed. This could result in a SecurityException.

Parameters:
value - indicating enabling or disabling of finalization
Throws:
SecurityException - if a security manager exists and its checkExit method doesn't allow the exit.
Since:
JDK1.1
See Also:
Runtime.exit(int),
Runtime.gc(),
SecurityManager.checkExit(int)

load

public static void load(String filename)
Loads a code file with the specified filename from the local file system as a dynamic library. The filename argument must be a complete pathname.

The call System.load(name) is effectively equivalent to the call:

 Runtime.getRuntime().load(name)
Parameters:
filename - the file to load.
Throws:
SecurityException - if a security manager exists and its checkLink method doesn't allow loading of the specified dynamic library
UnsatisfiedLinkError - if the file does not exist.
See Also:
Runtime.load(java.lang.String), SecurityManager.checkLink(java.lang.String)

loadLibrary

public static void loadLibrary(String libname)
Loads the system library specified by the libname argument. The manner in which a library name is mapped to the actual system library is system dependent.

The call System.loadLibrary(name) is effectively equivalent to the call

 Runtime.getRuntime().loadLibrary(name)
Parameters:
libname - the name of the library.
Throws:
SecurityException - if a security manager exists and its checkLink method doesn't allow loading of the specified dynamic library
UnsatisfiedLinkError - if the library does not exist.
See Also:
Runtime.loadLibrary(java.lang.String), SecurityManager.checkLink(java.lang.String)

mapLibraryName

public static String mapLibraryName(String libname)
Maps a library name into a platform-specific string representing a native library.
Parameters:
libname - the name of the library.
Returns:
a platform-dependent native library name.
Since:
1.2
See Also:
loadLibrary(java.lang.String), ClassLoader.findLibrary(java.lang.String)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Thread

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Thread

java.lang.Object
  |
  +--java.lang.Thread
All Implemented Interfaces:
Runnable
public class Thread
extends Object
implements Runnable

A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently.

Every thread has a priority. Threads with higher priority are executed in preference to threads with lower priority. Each thread may or may not also be marked as a daemon. When code running in some thread creates a new Thread object, the new thread has its priority initially set equal to the priority of the creating thread, and is a daemon thread if and only if the creating thread is a daemon.

When a Java Virtual Machine starts up, there is usually a single non-daemon thread (which typically calls the method named main of some designated class). The Java Virtual Machine continues to execute threads until either of the following occurs:

  • The exit method of class Runtime has been called and the security manager has permitted the exit operation to take place.
  • All threads that are not daemon threads have died, either by returning from the call to the run method or by throwing an exception that propagates beyond the run method.

There are two ways to create a new thread of execution. One is to declare a class to be a subclass of Thread. This subclass should override the run method of class Thread. An instance of the subclass can then be allocated and started. For example, a thread that computes primes larger than a stated value could be written as follows:

     class PrimeThread extends Thread {
         long minPrime;
         PrimeThread(long minPrime) {
             this.minPrime = minPrime;
         }

         public void run() {
             // compute primes larger than minPrime
              . . .
         }
     }

The following code would then create a thread and start it running:

     PrimeThread p = new PrimeThread(143);
     p.start();

The other way to create a thread is to declare a class that implements the Runnable interface. That class then implements the run method. An instance of the class can then be allocated, passed as an argument when creating Thread, and started. The same example in this other style looks like the following:

     class PrimeRun implements Runnable {
         long minPrime;
         PrimeRun(long minPrime) {
             this.minPrime = minPrime;
         }

         public void run() {
             // compute primes larger than minPrime
              . . .
         }
     }

The following code would then create a thread and start it running:

     PrimeRun p = new PrimeRun(143);
     new Thread(p).start();

Every thread has a name for identification purposes. More than one thread may have the same name. If a name is not specified when a thread is created, a new name is generated for it.

Since:
JDK1.0
See Also:
Runnable,
Runtime.exit(int),
run(),
stop()

Field Summary
static int | MAX_PRIORITY The maximum priority that a thread can have.
static int | MIN_PRIORITY The minimum priority that a thread can have.
static int | NORM_PRIORITY The default priority that is assigned to a thread.
Constructor Summary
Thread()
Allocates a new Thread object.
Thread(Runnable target)
Allocates a new Thread object.
Thread(Runnable target, String name)
Allocates a new Thread object.
Thread(String name)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target, String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
Thread(ThreadGroup group, String name)
Allocates a new Thread object.
Method Summary
static int activeCount()
Returns the current number of active threads in this thread's thread group.
 void checkAccess()
Determines if the currently running thread has permission to modify this thread.
 int countStackFrames()
Deprecated. The definition of this call depends on suspend(), which is deprecated. Further, the results of this call were never well-defined.
static Thread currentThread()
Returns a reference to the currently executing thread object.
 void destroy()
Destroys this thread, without any cleanup.
static void dumpStack()
Prints a stack trace of the current thread.
static int enumerate(Thread[] tarray)
Copies into the specified array every active thread in this thread's thread group and its subgroups.
 ClassLoader getContextClassLoader()
Returns the context ClassLoader for this Thread.
 String getName()
Returns this thread's name.
 int getPriority()
Returns this thread's priority.
 ThreadGroup getThreadGroup()
Returns the thread group to which this thread belongs.
 void interrupt()
Interrupts this thread.
static boolean interrupted()
Tests whether the current thread has been interrupted.
 boolean isAlive()
Tests if this thread is alive.
 boolean isDaemon()
Tests if this thread is a daemon thread.
 boolean isInterrupted()
Tests whether this thread has been interrupted.
 void join()
Waits for this thread to die.
 void join(long millis)
Waits at most millis milliseconds for this thread to die.
 void join(long millis, int nanos)
Waits at most millis milliseconds plus nanos nanoseconds for this thread to die.
 void resume()
Deprecated. This method exists solely for use with suspend(), which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
 void run()
If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.
 void setContextClassLoader(ClassLoader cl)
Sets the context ClassLoader for this Thread.
 void setDaemon(boolean on)
Marks this thread as either a daemon thread or a user thread.
 void setName(String name)
Changes the name of this thread to be equal to the argument name.
 void setPriority(int newPriority)
Changes the priority of this thread.
static void sleep(long millis)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds.
static void sleep(long millis, int nanos)
Causes the currently executing thread to sleep (cease execution) for the specified number of milliseconds plus the specified number of nanoseconds.
 void start()
Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
 void stop()
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
 void stop(Throwable obj)
Deprecated. This method is inherently unsafe. See stop() (with no arguments) for details. An additional danger of this method is that it may be used to generate exceptions that the target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
 void suspend()
Deprecated. This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
 String toString()
Returns a string representation of this thread, including the thread's name, priority, and thread group.
static void yield()
Causes the currently executing thread object to temporarily pause and allow other threads to execute.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

MIN_PRIORITY

public static final int MIN_PRIORITY
The minimum priority that a thread can have.

NORM_PRIORITY

public static final int NORM_PRIORITY
The default priority that is assigned to a thread.

MAX_PRIORITY

public static final int MAX_PRIORITY
The maximum priority that a thread can have.
Constructor Detail

Thread

public Thread()
Allocates a new Thread object. This constructor has the same effect as Thread(null, null, gname), where gname is a newly generated name. Automatically generated names are of the form "Thread-"+n, where n is an integer.

Threads created this way must have overridden their run() method to actually do anything. An example illustrating this method being used follows:

     import java.lang.*;

     class plain01 implements Runnable {
         String name;
         plain01() {
             name = null;
         }
         plain01(String s) {
             name = s;
         }
         public void run() {
             if (name == null)
                 System.out.println("A new thread created");
             else
                 System.out.println("A new thread with name " + name +
                                    " created");
         }
     }
     class threadtest01 {
         public static void main(String args[] ) {
             int failed = 0 ;

             Thread t1 = new Thread();
             if (t1 != null)
                 System.out.println("new Thread() succeed");
             else {
                 System.out.println("new Thread() failed");
                 failed++;
             }
         }
     }
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(Runnable target)
Allocates a new Thread object. This constructor has the same effect as Thread(null, target, gname), where gname is a newly generated name. Automatically generated names are of the form "Thread-"+n, where n is an integer.
Parameters:
target - the object whose run method is called.
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(ThreadGroup group,
              Runnable target)
Allocates a new Thread object. This constructor has the same effect as Thread(group, target, gname), where gname is a newly generated name. Automatically generated names are of the form "Thread-"+n, where n is an integer.
Parameters:
group - the thread group.
target - the object whose run method is called.
Throws:
SecurityException - if the current thread cannot create a thread in the specified thread group.
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(String name)
Allocates a new Thread object. This constructor has the same effect as Thread(null, null, name).
Parameters:
name - the name of the new thread.
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(ThreadGroup group,
              String name)
Allocates a new Thread object. This constructor has the same effect as Thread(group, null, name)
Parameters:
group - the thread group.
name - the name of the new thread.
Throws:
SecurityException - if the current thread cannot create a thread in the specified thread group.
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(Runnable target,
              String name)
Allocates a new Thread object. This constructor has the same effect as Thread(null, target, name).
Parameters:
target - the object whose run method is called.
name - the name of the new thread.
See Also:
Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)

Thread

public Thread(ThreadGroup group,
              Runnable target,
              String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.

If group is null, the group is set to be the same ThreadGroup as the thread that is creating the new thread.

If there is a security manager, its checkAccess method is called with the ThreadGroup as its argument. This may result in a SecurityException.

If the target argument is not null, the run method of the target is called when this thread is started. If the target argument is null, this thread's run method is called when this thread is started.

The priority of the newly created thread is set equal to the priority of the thread creating it, that is, the currently running thread. The method setPriority may be used to change the priority to a new value.

The newly created thread is initially marked as being a daemon thread if and only if the thread creating it is currently marked as a daemon thread. The method setDaemon may be used to change whether or not a thread is a daemon.

Parameters:
group - the thread group.
target - the object whose run method is called.
name - the name of the new thread.
Throws:
SecurityException - if the current thread cannot create a thread in the specified thread group.
See Also:
Runnable.run(), run(), setDaemon(boolean), setPriority(int), ThreadGroup.checkAccess(), SecurityManager.checkAccess(java.lang.Thread)
Method Detail

currentThread

public static Thread currentThread()
Returns a reference to the currently executing thread object.
Returns:
the currently executing thread.

yield

public static void yield()
Causes the currently executing thread object to temporarily pause and allow other threads to execute.

sleep

public static void sleep(long millis)
                  throws InterruptedException
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. The thread does not lose ownership of any monitors.
Parameters:
millis - the length of time to sleep in milliseconds.
Throws:
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
See Also:
Object.notify()

sleep

public static void sleep(long millis,
                         int nanos)
                  throws InterruptedException
Causes the currently executing thread to sleep (cease execution) for the specified number of milliseconds plus the specified number of nanoseconds. The thread does not lose ownership of any monitors.
Parameters:
millis - the length of time to sleep in milliseconds.
nanos - 0-999999 additional nanoseconds to sleep.
Throws:
IllegalArgumentException - if the value of millis is negative or the value of nanos is not in the range 0-999999.
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
See Also:
Object.notify()

start

public void start()
Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.

The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).

Throws:
IllegalThreadStateException - if the thread was already started.
See Also:
run(), stop()

run

public void run()
If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.

Subclasses of Thread should override this method.

Specified by:
run in interface Runnable
See Also:
start(), stop(), Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String), Runnable.run()

stop

public final void stop()
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Forces the thread to stop executing.

If there is a security manager installed, its checkAccess method is called with this as its argument. This may result in a SecurityException being raised (in the current thread).

If this thread is different from the current thread (that is, the current thread is trying to stop a thread other than itself), the security manager's checkPermission method (with a RuntimePermission("stopThread") argument) is called in addition. Again, this may result in throwing a SecurityException (in the current thread).

The thread represented by this thread is forced to stop whatever it is doing abnormally and to throw a newly created ThreadDeath object as an exception.

It is permitted to stop a thread that has not yet been started. If the thread is eventually started, it immediately terminates.

An application should not normally try to catch ThreadDeath unless it must do some extraordinary cleanup operation (note that the throwing of ThreadDeath causes finally clauses of try statements to be executed before the thread officially dies). If a catch clause catches a ThreadDeath object, it is important to rethrow the object so that the thread actually dies.

The top-level error handler that reacts to otherwise uncaught exceptions does not print out a message or otherwise notify the application if the uncaught exception is an instance of ThreadDeath.

Throws:
SecurityException - if the current thread cannot modify this thread.
See Also:
interrupt(),
checkAccess(),
run(),
start(),
ThreadDeath,
ThreadGroup.uncaughtException(java.lang.Thread,
             java.lang.Throwable),
SecurityManager.checkAccess(Thread),
SecurityManager.checkPermission(java.security.Permission)

stop

public final void stop(Throwable obj)
Deprecated. This method is inherently unsafe. See stop() (with no arguments) for details. An additional danger of this method is that it may be used to generate exceptions that the target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Forces the thread to stop executing.

If there is a security manager installed, the checkAccess method of this thread is called, which may result in a SecurityException being raised (in the current thread).

If this thread is different from the current thread (that is, the current thread is trying to stop a thread other than itself) or obj is not an instance of ThreadDeath, the security manager's checkPermission method (with the RuntimePermission("stopThread") argument) is called in addition. Again, this may result in throwing a SecurityException (in the current thread).

If the argument obj is null, a NullPointerException is thrown (in the current thread).

The thread represented by this thread is forced to complete whatever it is doing abnormally and to throw the Throwable object obj as an exception. This is an unusual action to take; normally, the stop method that takes no arguments should be used.

It is permitted to stop a thread that has not yet been started. If the thread is eventually started, it immediately terminates.

Parameters:
obj - the Throwable object to be thrown.
Throws:
SecurityException - if the current thread cannot modify this thread.
See Also:
interrupt(),
checkAccess(),
run(),
start(),
stop(),
SecurityManager.checkAccess(Thread),
SecurityManager.checkPermission(java.security.Permission)

interrupt

public void interrupt()
Interrupts this thread.

First the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException.

Throws:
SecurityException - if the current thread cannot modify this thread.

interrupted

public static boolean interrupted()
Tests whether the current thread has been interrupted. The interrupted status of the thread is cleared by this method. In other words, if this method were to be called twice in succession, the second call would return false (unless the current thread were interrupted again, after the first call had cleared its interrupted status and before the second call had examined it).
Returns:
true if the current thread has been interrupted; false otherwise.
See Also:
isInterrupted()

isInterrupted

public boolean isInterrupted()
Tests whether this thread has been interrupted. The interrupted status of the thread is unaffected by this method.
Returns:
true if this thread has been interrupted; false otherwise.
See Also:
interrupted()

destroy

public void destroy()
Destroys this thread, without any cleanup. Any monitors it has locked remain locked. (This method is not implemented.)

isAlive

public final boolean isAlive()
Tests if this thread is alive. A thread is alive if it has been started and has not yet died.
Returns:
true if this thread is alive; false otherwise.

suspend

public final void suspend()
Deprecated. This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Suspends this thread.

First, the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException (in the current thread).

If the thread is alive, it is suspended and makes no further progress unless and until it is resumed.

Throws:
SecurityException - if the current thread cannot modify this thread.
See Also:
checkAccess()

resume

public final void resume()
Deprecated. This method exists solely for use with suspend(), which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Resumes a suspended thread.

First, the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException (in the current thread).

If the thread is alive but suspended, it is resumed and is permitted to make progress in its execution.

Throws:
SecurityException - if the current thread cannot modify this thread.
See Also:
checkAccess(), suspend()

setPriority

public final void setPriority(int newPriority)
Changes the priority of this thread.

First the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException.

Otherwise, the priority of this thread is set to the smaller of the specified newPriority and the maximum permitted priority of the thread's thread group.

Parameters:
newPriority - priority to set this thread to
Throws:
IllegalArgumentException - If the priority is not in the range MIN_PRIORITY to MAX_PRIORITY.
SecurityException - if the current thread cannot modify this thread.
See Also:
getPriority(),
checkAccess(),
getPriority(),
getThreadGroup(),
MAX_PRIORITY,
MIN_PRIORITY,
ThreadGroup.getMaxPriority()

getPriority

public final int getPriority()
Returns this thread's priority.
Returns:
this thread's name.
See Also:
setPriority(int), setPriority(int)

setName

public final void setName(String name)
Changes the name of this thread to be equal to the argument name.

First the checkAccess method of this thread is called with no arguments. This may result in throwing a SecurityException.

Parameters:
name - the new name for this thread.
Throws:
SecurityException - if the current thread cannot modify this thread.
See Also:
getName(),
checkAccess(),
getName()

getName

public final String getName()
Returns this thread's name.
Returns:
this thread's name.
See Also:
setName(java.lang.String), setName(java.lang.String)

getThreadGroup

public final ThreadGroup getThreadGroup()
Returns the thread group to which this thread belongs. This method returns null if this thread has died (been stopped).
Returns:
this thread's thread group.

activeCount

public static int activeCount()
Returns the current number of active threads in this thread's thread group.
Returns:
the current number of threads in this thread's thread group.

enumerate

public static int enumerate(Thread[] tarray)
Copies into the specified array every active thread in this thread's thread group and its subgroups. This method simply calls the enumerate method of this thread's thread group with the array argument.

First, if there is a security manager, that enumerate method calls the security manager's checkAccess method with the thread group as its argument. This may result in throwing a SecurityException.

Parameters:
tarray - an array of Thread objects to copy to
Returns:
the number of threads put into the array
Throws:
SecurityException - if a security manager exists and its checkAccess method doesn't allow the operation.
See Also:
ThreadGroup.enumerate(java.lang.Thread[]), SecurityManager.checkAccess(java.lang.ThreadGroup)

countStackFrames

public int countStackFrames()
Deprecated. The definition of this call depends on suspend(), which is deprecated. Further, the results of this call were never well-defined.

Counts the number of stack frames in this thread. The thread must be suspended.
Returns:
the number of stack frames in this thread.
Throws:
IllegalThreadStateException - if this thread is not suspended.

join

public final void join(long millis)
                throws InterruptedException
Waits at most millis milliseconds for this thread to die. A timeout of 0 means to wait forever.
Parameters:
millis - the time to wait in milliseconds.
Throws:
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

join

public final void join(long millis,
                       int nanos)
                throws InterruptedException
Waits at most millis milliseconds plus nanos nanoseconds for this thread to die.
Parameters:
millis - the time to wait in milliseconds.
nanos - 0-999999 additional nanoseconds to wait.
Throws:
IllegalArgumentException - if the value of millis is negative the value of nanos is not in the range 0-999999.
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

join

public final void join()
                throws InterruptedException
Waits for this thread to die.
Throws:
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

dumpStack

public static void dumpStack()
Prints a stack trace of the current thread. This method is used only for debugging.
See Also:
Throwable.printStackTrace()

setDaemon

public final void setDaemon(boolean on)
Marks this thread as either a daemon thread or a user thread. The Java Virtual Machine exits when the only threads running are all daemon threads.

This method must be called before the thread is started.

This method first calls the checkAccess method of this thread with no arguments. This may result in throwing a SecurityException (in the current thread).

Parameters:
on - if true, marks this thread as a daemon thread.
Throws:
IllegalThreadStateException - if this thread is active.
SecurityException - if the current thread cannot modify this thread.
See Also:
isDaemon(), checkAccess()

isDaemon

public final boolean isDaemon()
Tests if this thread is a daemon thread.
Returns:
true if this thread is a daemon thread; false otherwise.
See Also:
setDaemon(boolean)

checkAccess

public final void checkAccess()
Determines if the currently running thread has permission to modify this thread.

If there is a security manager, its checkAccess method is called with this thread as its argument. This may result in throwing a SecurityException.

Note: This method was mistakenly non-final in JDK 1.1. It has been made final in the Java 2 Platform.

Throws:
SecurityException - if the current thread is not allowed to access this thread.
See Also:
SecurityManager.checkAccess(java.lang.Thread)

toString

public String toString()
Returns a string representation of this thread, including the thread's name, priority, and thread group.
Overrides:
toString in class Object
Returns:
a string representation of this thread.

getContextClassLoader

public ClassLoader getContextClassLoader()
Returns the context ClassLoader for this Thread. The context ClassLoader is provided by the creator of the thread for use by code running in this thread when loading classes and resources. If not set, the default is the ClassLoader context of the parent Thread. The context ClassLoader of the primordial thread is typically set to the class loader used to load the application.

First, if there is a security manager, and the caller's class loader is not null and the caller's class loader is not the same as or an ancestor of the context class loader for the thread whose context class loader is being requested, then the security manager's checkPermission method is called with a RuntimePermission("getClassLoader") permission to see if it's ok to get the context ClassLoader..

Returns:
the context ClassLoader for this Thread
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow getting the context ClassLoader.
Since:
1.2
See Also:
setContextClassLoader(java.lang.ClassLoader), SecurityManager.checkPermission(java.security.Permission), RuntimePermission

setContextClassLoader

public void setContextClassLoader(ClassLoader cl)
Sets the context ClassLoader for this Thread. The context ClassLoader can be set when a thread is created, and allows the creator of the thread to provide the appropriate class loader to code running in the thread when loading classes and resources.

First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setContextClassLoader") permission to see if it's ok to set the context ClassLoader..

Parameters:
cl - the context ClassLoader for this Thread
Throws:
SecurityException - if the current thread cannot set the context ClassLoader.
Since:
1.2
See Also:
getContextClassLoader(), SecurityManager.checkPermission(java.security.Permission), RuntimePermission
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadDeath

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ThreadDeath

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.ThreadDeath
All Implemented Interfaces:
Serializable
public class ThreadDeath
extends Error

An instance of ThreadDeath is thrown in the victim thread when the stop method with zero arguments in class Thread is called.

An application should catch instances of this class only if it must clean up after being terminated asynchronously. If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

The top-level error handler does not print out a message if ThreadDeath is never caught.

The class ThreadDeath is specifically a subclass of Error rather than Exception, even though it is a "normal occurrence", because many applications catch all occurrences of Exception and then discard the exception.

Since:
JDK1.0
See Also:
Thread.stop(), Serialized Form

Constructor Summary
ThreadDeath()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ThreadDeath

public ThreadDeath()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ThreadGroup

java.lang.Object
  |
  +--java.lang.ThreadGroup
public class ThreadGroup
extends Object

A thread group represents a set of threads. In addition, a thread group can also include other thread groups. The thread groups form a tree in which every thread group except the initial thread group has a parent.

A thread is allowed to access information about its own thread group, but not to access information about its thread group's parent thread group or any other thread groups.

Since:
JDK1.0

Constructor Summary
ThreadGroup(String name)
Constructs a new thread group.
ThreadGroup(ThreadGroup parent, String name)
Creates a new thread group.
Method Summary
 int activeCount()
Returns an estimate of the number of active threads in this thread group.
 int activeGroupCount()
Returns an estimate of the number of active groups in this thread group.
 boolean allowThreadSuspension(boolean b)
Deprecated. The definition of this call depends on suspend(), which is deprecated. Further, the behavior of this call was never specified.
 void checkAccess()
Determines if the currently running thread has permission to modify this thread group.
 void destroy()
Destroys this thread group and all of its subgroups.
 int enumerate(Thread[] list)
Copies into the specified array every active thread in this thread group and its subgroups.
 int enumerate(Thread[] list, boolean recurse)
Copies into the specified array every active thread in this thread group.
 int enumerate(ThreadGroup[] list)
Copies into the specified array references to every active subgroup in this thread group.
 int enumerate(ThreadGroup[] list, boolean recurse)
Copies into the specified array references to every active subgroup in this thread group.
 int getMaxPriority()
Returns the maximum priority of this thread group.
 String getName()
Returns the name of this thread group.
 ThreadGroup getParent()
Returns the parent of this thread group.
 void interrupt()
Interrupts all threads in this thread group.
 boolean isDaemon()
Tests if this thread group is a daemon thread group.
 boolean isDestroyed()
Tests if this thread group has been destroyed.
 void list()
Prints information about this thread group to the standard output.
 boolean parentOf(ThreadGroup g)
Tests if this thread group is either the thread group argument or one of its ancestor thread groups.
 void resume()
Deprecated. This method is used solely in conjunction with Thread.suspend and ThreadGroup.suspend, both of which have been deprecated, as they are inherently deadlock-prone. See Thread.suspend() for details.
 void setDaemon(boolean daemon)
Changes the daemon status of this thread group.
 void setMaxPriority(int pri)
Sets the maximum priority of the group.
 void stop()
Deprecated. This method is inherently unsafe. See Thread.stop() for details.
 void suspend()
Deprecated. This method is inherently deadlock-prone. See Thread.suspend() for details.
 String toString()
Returns a string representation of this Thread group.
 void uncaughtException(Thread t, Throwable e)
Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ThreadGroup

public ThreadGroup(String name)
Constructs a new thread group. The parent of this new group is the thread group of the currently running thread.

The checkAccess method of the parent thread group is called with no arguments; this may result in a security exception.

Parameters:
name - the name of the new thread group.
Throws:
SecurityException - if the current thread cannot create a thread in the specified thread group.
Since:
JDK1.0
See Also:
checkAccess()

ThreadGroup

public ThreadGroup(ThreadGroup parent,
                   String name)
Creates a new thread group. The parent of this new group is the specified thread group.

The checkAccess method of the parent thread group is called with no arguments; this may result in a security exception.

Parameters:
parent - the parent thread group.
name - the name of the new thread group.
Throws:
NullPointerException - if the thread group argument is null.
SecurityException - if the current thread cannot create a thread in the specified thread group.
Since:
JDK1.0
See Also:
SecurityException, checkAccess()
Method Detail

getName

public final String getName()
Returns the name of this thread group.
Returns:
the name of this thread group.
Since:
JDK1.0

getParent

public final ThreadGroup getParent()
Returns the parent of this thread group.

First, if the parent is not null, the checkAccess method of the parent thread group is called with no arguments; this may result in a security exception.

Returns:
the parent of this thread group. The top-level thread group is the only thread group whose parent is null.
Throws:
SecurityException - if the current thread cannot modify this thread group.
Since:
JDK1.0
See Also:
checkAccess(), SecurityException, RuntimePermission

getMaxPriority

public final int getMaxPriority()
Returns the maximum priority of this thread group. Threads that are part of this group cannot have a higher priority than the maximum priority.
Returns:
the maximum priority that a thread in this thread group can have.
Since:
JDK1.0
See Also:
setMaxPriority(int)

isDaemon

public final boolean isDaemon()
Tests if this thread group is a daemon thread group. A daemon thread group is automatically destroyed when its last thread is stopped or its last thread group is destroyed.
Returns:
true if this thread group is a daemon thread group; false otherwise.
Since:
JDK1.0

isDestroyed

public boolean isDestroyed()
Tests if this thread group has been destroyed.
Returns:
true if this object is destroyed
Since:
JDK1.1

setDaemon

public final void setDaemon(boolean daemon)
Changes the daemon status of this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

A daemon thread group is automatically destroyed when its last thread is stopped or its last thread group is destroyed.

Parameters:
daemon - if true, marks this thread group as a daemon thread group; otherwise, marks this thread group as normal.
Throws:
SecurityException - if the current thread cannot modify this thread group.
Since:
JDK1.0
See Also:
SecurityException, checkAccess()

setMaxPriority

public final void setMaxPriority(int pri)
Sets the maximum priority of the group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

Threads in the thread group that already have a higher priority are not affected.

Parameters:
pri - the new priority of the thread group.
Throws:
SecurityException - if the current thread cannot modify this thread group.
Since:
JDK1.0
See Also:
getMaxPriority(), SecurityException, checkAccess()

parentOf

public final boolean parentOf(ThreadGroup g)
Tests if this thread group is either the thread group argument or one of its ancestor thread groups.
Parameters:
g - a thread group.
Returns:
true if this thread group is the thread group argument or one of its ancestor thread groups; false otherwise.
Since:
JDK1.0

checkAccess

public final void checkAccess()
Determines if the currently running thread has permission to modify this thread group.

If there is a security manager, its checkAccess method is called with this thread group as its argument. This may result in throwing a SecurityException.

Throws:
SecurityException - if the current thread is not allowed to access this thread group.
Since:
JDK1.0
See Also:
SecurityManager.checkAccess(java.lang.ThreadGroup)

activeCount

public int activeCount()
Returns an estimate of the number of active threads in this thread group.
Returns:
the number of active threads in this thread group and in any other thread group that has this thread group as an ancestor.
Since:
JDK1.0

enumerate

public int enumerate(Thread[] list)
Copies into the specified array every active thread in this thread group and its subgroups.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

An application should use the activeCount method to get an estimate of how big the array should be. If the array is too short to hold all the threads, the extra threads are silently ignored.

Parameters:
list - an array into which to place the list of threads.
Returns:
the number of threads put into the array.
Throws:
SecurityException - if the current thread does not have permission to enumerate this thread group.
Since:
JDK1.0
See Also:
activeCount(), checkAccess()

enumerate

public int enumerate(Thread[] list,
                     boolean recurse)
Copies into the specified array every active thread in this thread group. If the recurse flag is true, references to every active thread in this thread's subgroups are also included. If the array is too short to hold all the threads, the extra threads are silently ignored.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

An application should use the activeCount method to get an estimate of how big the array should be.

Parameters:
list - an array into which to place the list of threads.
recurse - a flag indicating whether also to include threads in thread groups that are subgroups of this thread group.
Returns:
the number of threads placed into the array.
Throws:
SecurityException - if the current thread does not have permission to enumerate this thread group.
Since:
JDK1.0
See Also:
activeCount(), checkAccess()

activeGroupCount

public int activeGroupCount()
Returns an estimate of the number of active groups in this thread group.
Returns:
the number of active thread groups with this thread group as an ancestor.
Since:
JDK1.0

enumerate

public int enumerate(ThreadGroup[] list)
Copies into the specified array references to every active subgroup in this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

An application should use the activeGroupCount method to get an estimate of how big the array should be. If the array is too short to hold all the thread groups, the extra thread groups are silently ignored.

Parameters:
list - an array into which to place the list of thread groups.
Returns:
the number of thread groups put into the array.
Throws:
SecurityException - if the current thread does not have permission to enumerate this thread group.
Since:
JDK1.0
See Also:
activeGroupCount(), checkAccess()

enumerate

public int enumerate(ThreadGroup[] list,
                     boolean recurse)
Copies into the specified array references to every active subgroup in this thread group. If the recurse flag is true, references to all active subgroups of the subgroups and so forth are also included.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

An application should use the activeGroupCount method to get an estimate of how big the array should be.

Parameters:
list - an array into which to place the list of threads.
recurse - a flag indicating whether to recursively enumerate all included thread groups.
Returns:
the number of thread groups put into the array.
Throws:
SecurityException - if the current thread does not have permission to enumerate this thread group.
Since:
JDK1.0
See Also:
activeGroupCount(), checkAccess()

stop

public final void stop()
Deprecated. This method is inherently unsafe. See Thread.stop() for details.

Stops all threads in this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

This method then calls the stop method on all the threads in this thread group and in all of its subgroups.

Throws:
SecurityException - if the current thread is not allowed to access this thread group or any of the threads in the thread group.
Since:
JDK1.0
See Also:
SecurityException, Thread.stop(), checkAccess()

interrupt

public final void interrupt()
Interrupts all threads in this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

This method then calls the interrupt method on all the threads in this thread group and in all of its subgroups.

Throws:
SecurityException - if the current thread is not allowed to access this thread group or any of the threads in the thread group.
Since:
1.2
See Also:
Thread.interrupt(), SecurityException, checkAccess()

suspend

public final void suspend()
Deprecated. This method is inherently deadlock-prone. See Thread.suspend() for details.

Suspends all threads in this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

This method then calls the suspend method on all the threads in this thread group and in all of its subgroups.

Throws:
SecurityException - if the current thread is not allowed to access this thread group or any of the threads in the thread group.
Since:
JDK1.0
See Also:
Thread.suspend(), SecurityException, checkAccess()

resume

public final void resume()
Deprecated. This method is used solely in conjunction with Thread.suspend and ThreadGroup.suspend, both of which have been deprecated, as they are inherently deadlock-prone. See Thread.suspend() for details.

Resumes all threads in this thread group.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

This method then calls the resume method on all the threads in this thread group and in all of its sub groups.

Throws:
SecurityException - if the current thread is not allowed to access this thread group or any of the threads in the thread group.
Since:
JDK1.0
See Also:
SecurityException, Thread.resume(), checkAccess()

destroy

public final void destroy()
Destroys this thread group and all of its subgroups. This thread group must be empty, indicating that all threads that had been in this thread group have since stopped.

First, the checkAccess method of this thread group is called with no arguments; this may result in a security exception.

Throws:
IllegalThreadStateException - if the thread group is not empty or if the thread group has already been destroyed.
SecurityException - if the current thread cannot modify this thread group.
Since:
JDK1.0
See Also:
checkAccess()

list

public void list()
Prints information about this thread group to the standard output. This method is useful only for debugging.
Since:
JDK1.0

uncaughtException

public void uncaughtException(Thread t,
                              Throwable e)
Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.

The uncaughtException method of ThreadGroup does the following:

  • If this thread group has a parent thread group, the uncaughtException method of that parent is called with the same two arguments.
  • Otherwise, this method determines if the Throwable argument is an instance of ThreadDeath. If so, nothing special is done. Otherwise, the Throwable's printStackTrace method is called to print a stack backtrace to the standard error stream.

Applications can override this method in subclasses of ThreadGroup to provide alternative handling of uncaught exceptions.

Parameters:
t - the thread that is about to exit.
e - the uncaught exception.
Since:
JDK1.0
See Also:
System.err, ThreadDeath, Throwable.printStackTrace(java.io.PrintStream)

allowThreadSuspension

public boolean allowThreadSuspension(boolean b)
Deprecated. The definition of this call depends on suspend(), which is deprecated. Further, the behavior of this call was never specified.

Used by VM to control lowmem implicit suspension.
Parameters:
b - boolean to allow or disallow suspension
Returns:
true on success
Since:
JDK1.1

toString

public String toString()
Returns a string representation of this Thread group.
Overrides:
toString in class Object
Returns:
a string representation of this thread group.
Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadLocal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class ThreadLocal

java.lang.Object
  |
  +--java.lang.ThreadLocal
Direct Known Subclasses:
InheritableThreadLocal
public class ThreadLocal
extends Object

This class provides ThreadLocal variables. These variables differ from their normal counterparts in that each thread that accesses one (via its get or set method) has its own, independently initialized copy of the variable. ThreadLocal objects are typically private static variables in classes that wish to associate state with a thread (e.g., a user ID or Transaction ID).

Each thread holds an implicit reference to its copy of a ThreadLocal as long as the thread is alive and the ThreadLocal object is accessible; after a thread goes away, all of its copies of ThreadLocal variables are subject to garbage collection (unless other references to these copies exist).

Since:
1.2

Constructor Summary
ThreadLocal()
Creates a ThreadLocal variable.
Method Summary
Object | get() Returns the value in the calling thread's copy of this ThreadLocal variable.
protected Object | initialValue() Returns the calling thread's initial value for this ThreadLocal variable.
void | set(Object value) Sets the calling thread's instance of this ThreadLocal variable to the given value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ThreadLocal

public ThreadLocal()
Creates a ThreadLocal variable.
Method Detail

initialValue

protected Object initialValue()
Returns the calling thread's initial value for this ThreadLocal variable. This method will be called once per accessing thread for each ThreadLocal, the first time each thread accesses the variable with get or set. If the programmer desires ThreadLocal variables to be initialized to some value other than null, ThreadLocal must be subclassed, and this method overridden. Typically, an anonymous inner class will be used. Typical implementations of initialValue will call an appropriate constructor and return the newly constructed object.
Returns:
the initial value for this ThreadLocal

get

public Object get()
Returns the value in the calling thread's copy of this ThreadLocal variable. Creates and initializes the copy if this is the first time the thread has called this method.
Returns:
the value of this ThreadLocal

set

public void set(Object value)
Sets the calling thread's instance of this ThreadLocal variable to the given value. This is only used to change the value from the one assigned by the initialValue method, and many applications will have no need for this functionality.
Parameters:
value - the value to be stored in the calling threads' copy of this ThreadLocal.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Throwable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Throwable

java.lang.Object
  |
  +--java.lang.Throwable
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Error, Exception
public class Throwable
extends Object
implements Serializable

The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or of one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement. Similarly, only this class or one of its subclasses can be the argument type in a catch clause.

Instances of two subclasses, Error and Exception, are conventionally used to indicate that exceptional situations have occurred. Typically, these instances are freshly created in the context of the exceptional situation so as to include relevant information (such as stack trace data).

By convention, class Throwable and its subclasses have two constructors, one that takes no arguments and one that takes a String argument that can be used to produce an error message.

A Throwable class contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error.

Here is one example of catching an exception:

     try {
         int a[] = new int[2];
         a[4];
     } catch (ArrayIndexOutOfBoundsException e) {
         System.out.println("exception: " + e.getMessage());
         e.printStackTrace();
     }

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
Throwable()
Constructs a new Throwable with null as its error message string.
Throwable(String message)
Constructs a new Throwable with the specified error message.
Method Summary
Throwable | fillInStackTrace() Fills in the execution stack trace.
String | getLocalizedMessage() Creates a localized description of this Throwable.
String | getMessage() Returns the error message string of this throwable object.
void | printStackTrace() Prints this Throwable and its backtrace to the standard error stream.
void | printStackTrace(PrintStream s) Prints this Throwable and its backtrace to the specified print stream.
void | printStackTrace(PrintWriter s) Prints this Throwable and its backtrace to the specified print writer.
String | toString() Returns a short description of this throwable object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Throwable

public Throwable()
Constructs a new Throwable with null as its error message string. Also, the method fillInStackTrace() is called for this object.

Throwable

public Throwable(String message)
Constructs a new Throwable with the specified error message. Also, the method fillInStackTrace() is called for this object.
Parameters:
message - the error message. The error message is saved for later retrieval by the getMessage() method.
Method Detail

getMessage

public String getMessage()
Returns the error message string of this throwable object.
Returns:
the error message string of this Throwable object if it was created with an error message string; or null if it was created with no error message.

getLocalizedMessage

public String getLocalizedMessage()
Creates a localized description of this Throwable. Subclasses may override this method in order to produce a locale-specific message. For subclasses that do not override this method, the default implementation returns the same result as getMessage().
Returns:
The localized description of this Throwable.
Since:
JDK1.1

toString

public String toString()
Returns a short description of this throwable object. If this Throwable object was created with an error message string, then the result is the concatenation of three strings:
  • The name of the actual class of this object
  • ": " (a colon and a space)
  • The result of the getMessage() method for this object
If this Throwable object was created with no error message string, then the name of the actual class of this object is returned.
Overrides:
toString in class Object
Returns:
a string representation of this Throwable.

printStackTrace

public void printStackTrace()
Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. The first line of output contains the result of the toString() method for this object. Remaining lines represent data previously recorded by the method fillInStackTrace(). The format of this information depends on the implementation, but the following example may be regarded as typical:
 java.lang.NullPointerException
         at MyClass.mash(MyClass.java:9)
         at MyClass.crunch(MyClass.java:6)
         at MyClass.main(MyClass.java:3)
This example was produced by running the program:

 class MyClass {

     public static void main(String[] argv) {
         crunch(null);
     }
     static void crunch(int[] a) {
         mash(a);
     }

     static void mash(int[] b) {
         System.out.println(b[0]);
     }
 }
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream s)
Prints this Throwable and its backtrace to the specified print stream.
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter s)
Prints this Throwable and its backtrace to the specified print writer.
Parameters:
s - PrintWriter to use for output
Since:
JDK1.1

fillInStackTrace

public Throwable fillInStackTrace()
Fills in the execution stack trace. This method records within this Throwable object information about the current state of the stack frames for the current thread. This method is useful when an application is re-throwing an error or exception. For example:

     try {
         a = b / c;
     } catch(ArithmeticThrowable e) {
         a = Double.MAX_VALUE;
         throw e.fillInStackTrace();
     }
Returns:
this Throwable object.
See Also:
printStackTrace()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnicodeBlock

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Character.UnicodeBlock

java.lang.Object
  |
  +--java.lang.Character.Subset
        |
        +--java.lang.Character.UnicodeBlock
Enclosing class:
Character
public static final class Character.UnicodeBlock
extends Character.Subset

A family of character subsets representing the character blocks defined by the Unicode 2.0 specification. Any given character is contained by at most one Unicode block.

Since:
1.2

Field Summary
static Character.UnicodeBlock | ALPHABETIC_PRESENTATION_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ARABIC Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ARABIC_PRESENTATION_FORMS_A Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ARABIC_PRESENTATION_FORMS_B Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ARMENIAN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ARROWS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | BASIC_LATIN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | BENGALI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | BLOCK_ELEMENTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | BOPOMOFO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | BOX_DRAWING Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CJK_COMPATIBILITY Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CJK_COMPATIBILITY_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CJK_COMPATIBILITY_IDEOGRAPHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CJK_SYMBOLS_AND_PUNCTUATION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CJK_UNIFIED_IDEOGRAPHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | COMBINING_DIACRITICAL_MARKS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | COMBINING_HALF_MARKS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | COMBINING_MARKS_FOR_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CONTROL_PICTURES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CURRENCY_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | CYRILLIC Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | DEVANAGARI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | DINGBATS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ENCLOSED_ALPHANUMERICS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ENCLOSED_CJK_LETTERS_AND_MONTHS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GENERAL_PUNCTUATION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GEOMETRIC_SHAPES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GEORGIAN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GREEK Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GREEK_EXTENDED Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GUJARATI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | GURMUKHI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HALFWIDTH_AND_FULLWIDTH_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HANGUL_COMPATIBILITY_JAMO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HANGUL_JAMO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HANGUL_SYLLABLES Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HEBREW Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | HIRAGANA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | IPA_EXTENSIONS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | KANBUN Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | KANNADA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | KATAKANA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LAO Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LATIN_1_SUPPLEMENT Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LATIN_EXTENDED_A Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LATIN_EXTENDED_ADDITIONAL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LATIN_EXTENDED_B Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | LETTERLIKE_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | MALAYALAM Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | MATHEMATICAL_OPERATORS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | MISCELLANEOUS_SYMBOLS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | MISCELLANEOUS_TECHNICAL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | NUMBER_FORMS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | OPTICAL_CHARACTER_RECOGNITION Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | ORIYA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | PRIVATE_USE_AREA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | SMALL_FORM_VARIANTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | SPACING_MODIFIER_LETTERS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | SPECIALS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | SUPERSCRIPTS_AND_SUBSCRIPTS Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | SURROGATES_AREA Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | TAMIL Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | TELUGU Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | THAI Constant for the Unicode character block of the same name.
static Character.UnicodeBlock | TIBETAN Constant for the Unicode character block of the same name.
Method Summary
static Character.UnicodeBlock of(char c)
Returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.
Methods inherited from class java.lang.Character.Subset
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

BASIC_LATIN

public static final Character.UnicodeBlock BASIC_LATIN
Constant for the Unicode character block of the same name.

LATIN_1_SUPPLEMENT

public static final Character.UnicodeBlock LATIN_1_SUPPLEMENT
Constant for the Unicode character block of the same name.

LATIN_EXTENDED_A

public static final Character.UnicodeBlock LATIN_EXTENDED_A
Constant for the Unicode character block of the same name.

LATIN_EXTENDED_B

public static final Character.UnicodeBlock LATIN_EXTENDED_B
Constant for the Unicode character block of the same name.

IPA_EXTENSIONS

public static final Character.UnicodeBlock IPA_EXTENSIONS
Constant for the Unicode character block of the same name.

SPACING_MODIFIER_LETTERS

public static final Character.UnicodeBlock SPACING_MODIFIER_LETTERS
Constant for the Unicode character block of the same name.

COMBINING_DIACRITICAL_MARKS

public static final Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS
Constant for the Unicode character block of the same name.

GREEK

public static final Character.UnicodeBlock GREEK
Constant for the Unicode character block of the same name.

CYRILLIC

public static final Character.UnicodeBlock CYRILLIC
Constant for the Unicode character block of the same name.

ARMENIAN

public static final Character.UnicodeBlock ARMENIAN
Constant for the Unicode character block of the same name.

HEBREW

public static final Character.UnicodeBlock HEBREW
Constant for the Unicode character block of the same name.

ARABIC

public static final Character.UnicodeBlock ARABIC
Constant for the Unicode character block of the same name.

DEVANAGARI

public static final Character.UnicodeBlock DEVANAGARI
Constant for the Unicode character block of the same name.

BENGALI

public static final Character.UnicodeBlock BENGALI
Constant for the Unicode character block of the same name.

GURMUKHI

public static final Character.UnicodeBlock GURMUKHI
Constant for the Unicode character block of the same name.

GUJARATI

public static final Character.UnicodeBlock GUJARATI
Constant for the Unicode character block of the same name.

ORIYA

public static final Character.UnicodeBlock ORIYA
Constant for the Unicode character block of the same name.

TAMIL

public static final Character.UnicodeBlock TAMIL
Constant for the Unicode character block of the same name.

TELUGU

public static final Character.UnicodeBlock TELUGU
Constant for the Unicode character block of the same name.

KANNADA

public static final Character.UnicodeBlock KANNADA
Constant for the Unicode character block of the same name.

MALAYALAM

public static final Character.UnicodeBlock MALAYALAM
Constant for the Unicode character block of the same name.

THAI

public static final Character.UnicodeBlock THAI
Constant for the Unicode character block of the same name.

LAO

public static final Character.UnicodeBlock LAO
Constant for the Unicode character block of the same name.

TIBETAN

public static final Character.UnicodeBlock TIBETAN
Constant for the Unicode character block of the same name.

GEORGIAN

public static final Character.UnicodeBlock GEORGIAN
Constant for the Unicode character block of the same name.

HANGUL_JAMO

public static final Character.UnicodeBlock HANGUL_JAMO
Constant for the Unicode character block of the same name.

LATIN_EXTENDED_ADDITIONAL

public static final Character.UnicodeBlock LATIN_EXTENDED_ADDITIONAL
Constant for the Unicode character block of the same name.

GREEK_EXTENDED

public static final Character.UnicodeBlock GREEK_EXTENDED
Constant for the Unicode character block of the same name.

GENERAL_PUNCTUATION

public static final Character.UnicodeBlock GENERAL_PUNCTUATION
Constant for the Unicode character block of the same name.

SUPERSCRIPTS_AND_SUBSCRIPTS

public static final Character.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS
Constant for the Unicode character block of the same name.

CURRENCY_SYMBOLS

public static final Character.UnicodeBlock CURRENCY_SYMBOLS
Constant for the Unicode character block of the same name.

COMBINING_MARKS_FOR_SYMBOLS

public static final Character.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS
Constant for the Unicode character block of the same name.

LETTERLIKE_SYMBOLS

public static final Character.UnicodeBlock LETTERLIKE_SYMBOLS
Constant for the Unicode character block of the same name.

NUMBER_FORMS

public static final Character.UnicodeBlock NUMBER_FORMS
Constant for the Unicode character block of the same name.

ARROWS

public static final Character.UnicodeBlock ARROWS
Constant for the Unicode character block of the same name.

MATHEMATICAL_OPERATORS

public static final Character.UnicodeBlock MATHEMATICAL_OPERATORS
Constant for the Unicode character block of the same name.

MISCELLANEOUS_TECHNICAL

public static final Character.UnicodeBlock MISCELLANEOUS_TECHNICAL
Constant for the Unicode character block of the same name.

CONTROL_PICTURES

public static final Character.UnicodeBlock CONTROL_PICTURES
Constant for the Unicode character block of the same name.

OPTICAL_CHARACTER_RECOGNITION

public static final Character.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION
Constant for the Unicode character block of the same name.

ENCLOSED_ALPHANUMERICS

public static final Character.UnicodeBlock ENCLOSED_ALPHANUMERICS
Constant for the Unicode character block of the same name.

BOX_DRAWING

public static final Character.UnicodeBlock BOX_DRAWING
Constant for the Unicode character block of the same name.

BLOCK_ELEMENTS

public static final Character.UnicodeBlock BLOCK_ELEMENTS
Constant for the Unicode character block of the same name.

GEOMETRIC_SHAPES

public static final Character.UnicodeBlock GEOMETRIC_SHAPES
Constant for the Unicode character block of the same name.

MISCELLANEOUS_SYMBOLS

public static final Character.UnicodeBlock MISCELLANEOUS_SYMBOLS
Constant for the Unicode character block of the same name.

DINGBATS

public static final Character.UnicodeBlock DINGBATS
Constant for the Unicode character block of the same name.

CJK_SYMBOLS_AND_PUNCTUATION

public static final Character.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION
Constant for the Unicode character block of the same name.

HIRAGANA

public static final Character.UnicodeBlock HIRAGANA
Constant for the Unicode character block of the same name.

KATAKANA

public static final Character.UnicodeBlock KATAKANA
Constant for the Unicode character block of the same name.

BOPOMOFO

public static final Character.UnicodeBlock BOPOMOFO
Constant for the Unicode character block of the same name.

HANGUL_COMPATIBILITY_JAMO

public static final Character.UnicodeBlock HANGUL_COMPATIBILITY_JAMO
Constant for the Unicode character block of the same name.

KANBUN

public static final Character.UnicodeBlock KANBUN
Constant for the Unicode character block of the same name.

ENCLOSED_CJK_LETTERS_AND_MONTHS

public static final Character.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS
Constant for the Unicode character block of the same name.

CJK_COMPATIBILITY

public static final Character.UnicodeBlock CJK_COMPATIBILITY
Constant for the Unicode character block of the same name.

CJK_UNIFIED_IDEOGRAPHS

public static final Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS
Constant for the Unicode character block of the same name.

HANGUL_SYLLABLES

public static final Character.UnicodeBlock HANGUL_SYLLABLES
Constant for the Unicode character block of the same name.

SURROGATES_AREA

public static final Character.UnicodeBlock SURROGATES_AREA
Constant for the Unicode character block of the same name.

PRIVATE_USE_AREA

public static final Character.UnicodeBlock PRIVATE_USE_AREA
Constant for the Unicode character block of the same name.

CJK_COMPATIBILITY_IDEOGRAPHS

public static final Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS
Constant for the Unicode character block of the same name.

ALPHABETIC_PRESENTATION_FORMS

public static final Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS
Constant for the Unicode character block of the same name.

ARABIC_PRESENTATION_FORMS_A

public static final Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_A
Constant for the Unicode character block of the same name.

COMBINING_HALF_MARKS

public static final Character.UnicodeBlock COMBINING_HALF_MARKS
Constant for the Unicode character block of the same name.

CJK_COMPATIBILITY_FORMS

public static final Character.UnicodeBlock CJK_COMPATIBILITY_FORMS
Constant for the Unicode character block of the same name.

SMALL_FORM_VARIANTS

public static final Character.UnicodeBlock SMALL_FORM_VARIANTS
Constant for the Unicode character block of the same name.

ARABIC_PRESENTATION_FORMS_B

public static final Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_B
Constant for the Unicode character block of the same name.

HALFWIDTH_AND_FULLWIDTH_FORMS

public static final Character.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS
Constant for the Unicode character block of the same name.

SPECIALS

public static final Character.UnicodeBlock SPECIALS
Constant for the Unicode character block of the same name.
Method Detail

of

public static Character.UnicodeBlock of(char c)
Returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.
Parameters:
c - The character in question
Returns:
The UnicodeBlock instance representing the Unicode block of which this character is a member, or null if the character is not a member of any Unicode block
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class UnknownError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.VirtualMachineError
                    |
                    +--java.lang.UnknownError
All Implemented Interfaces:
Serializable
public class UnknownError
extends VirtualMachineError

Thrown when an unknown but serious exception has occurred in the Java Virtual Machine.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
UnknownError()
Constructs an UnknownError with no detail message.
UnknownError(String s)
Constructs an UnknownError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownError

public UnknownError()
Constructs an UnknownError with no detail message.

UnknownError

public UnknownError(String s)
Constructs an UnknownError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsatisfiedLinkError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class UnsatisfiedLinkError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.UnsatisfiedLinkError
All Implemented Interfaces:
Serializable
public class UnsatisfiedLinkError
extends LinkageError

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

Since:
JDK1.0
See Also:
Runtime, Serialized Form

Constructor Summary
UnsatisfiedLinkError()
Constructs an UnsatisfiedLinkError with no detail message.
UnsatisfiedLinkError(String s)
Constructs an UnsatisfiedLinkError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsatisfiedLinkError

public UnsatisfiedLinkError()
Constructs an UnsatisfiedLinkError with no detail message.

UnsatisfiedLinkError

public UnsatisfiedLinkError(String s)
Constructs an UnsatisfiedLinkError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsupportedClassVersionError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class UnsupportedClassVersionError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.ClassFormatError
                          |
                          +--java.lang.UnsupportedClassVersionError
All Implemented Interfaces:
Serializable
public class UnsupportedClassVersionError
extends ClassFormatError

Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
UnsupportedClassVersionError()
Constructs a UnsupportedClassVersionError with no detail message.
UnsupportedClassVersionError(String s)
Constructs a UnsupportedClassVersionError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedClassVersionError

public UnsupportedClassVersionError()
Constructs a UnsupportedClassVersionError with no detail message.

UnsupportedClassVersionError

public UnsupportedClassVersionError(String s)
Constructs a UnsupportedClassVersionError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsupportedOperationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class UnsupportedOperationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.UnsupportedOperationException
All Implemented Interfaces:
Serializable
public class UnsupportedOperationException
extends RuntimeException

Thrown to indicate that the requested operation is not supported.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
UnsupportedOperationException()
Constructs an UnsupportedOperationException with no detail message.
UnsupportedOperationException(String message)
Constructs an UnsupportedOperationException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedOperationException

public UnsupportedOperationException()
Constructs an UnsupportedOperationException with no detail message.

UnsupportedOperationException

public UnsupportedOperationException(String message)
Constructs an UnsupportedOperationException with the specified detail message.
Parameters:
message - the detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VerifyError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.lang
Class VerifyError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.LinkageError
                    |
                    +--java.lang.VerifyError
All Implemented Interfaces:
Serializable
public class VerifyError
extends LinkageError

Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
VerifyError()
Constructs an VerifyError with no detail message.
VerifyError(String s)
Constructs an VerifyError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VerifyError

public VerifyError()
Constructs an VerifyError with no detail message.

VerifyError

public VerifyError(String s)
Constructs an VerifyError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VirtualMachineError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class VirtualMachineError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--java.lang.VirtualMachineError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InternalError, OutOfMemoryError, StackOverflowError, UnknownError
public abstract class VirtualMachineError
extends Error

Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
VirtualMachineError()
Constructs a VirtualMachineError with no detail message.
VirtualMachineError(String s)
Constructs a VirtualMachineError with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VirtualMachineError

public VirtualMachineError()
Constructs a VirtualMachineError with no detail message.

VirtualMachineError

public VirtualMachineError(String s)
Constructs a VirtualMachineError with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Void

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.lang
Class Void

java.lang.Object
  |
  +--java.lang.Void
public final class Void
extends Object

The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.

Since:
JDK1.1

Field Summary
static Class TYPE
The Class object representing the primitive Java type void.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE

public static final Class TYPE
The Class object representing the primitive Java type void.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.math Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.math

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Number (implements java.io.Serializable)
      • class java.math.BigDecimal (implements java.lang.Comparable)
      • class java.math.BigInteger (implements java.lang.Comparable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.math

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

See:
Description

Class Summary
BigDecimal | Immutable, arbitrary-precision signed decimal numbers.
BigInteger | Immutable arbitrary-precision integers.

Package java.math Description

Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal). BigInteger is analogous to Java's primitive integer types except that it provides arbitrary precision, hence operations on BigIntegers do not overflow or lose precision. In addition to standard arithmetic operations, BigInteger provides modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations. BigDecimal provides arbitrary-precision signed decimal numbers suitable for currency calculations and the like. BigDecimal gives the user complete control over rounding behavior, allowing the user to choose from a comprehensive set of eight rounding modes.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.math

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.math

Packages that use java.math
java.awt.image | Provides classes for creating and modifying images.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Classes in java.math used by java.awt.image
BigInteger
Immutable arbitrary-precision integers.

Classes in java.math used by java.math
BigDecimal
Immutable, arbitrary-precision signed decimal numbers.
BigInteger
Immutable arbitrary-precision integers.

Classes in java.math used by java.security.cert
BigInteger
Immutable arbitrary-precision integers.

Classes in java.math used by java.security.interfaces
BigInteger
Immutable arbitrary-precision integers.

Classes in java.math used by java.security.spec
BigInteger
Immutable arbitrary-precision integers.

Classes in java.math used by java.sql
BigDecimal
Immutable, arbitrary-precision signed decimal numbers.

Classes in java.math used by org.omg.CORBA
BigDecimal
Immutable, arbitrary-precision signed decimal numbers.

Classes in java.math used by org.omg.CORBA.portable
BigDecimal
Immutable, arbitrary-precision signed decimal numbers.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


BigDecimal

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.math
Class BigDecimal

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.math.BigDecimal
All Implemented Interfaces:
Comparable, Serializable
public class BigDecimal
extends Number
implements Comparable

Immutable, arbitrary-precision signed decimal numbers. A BigDecimal consists of an arbitrary precision integer unscaled value and a non-negative 32-bit integer scale, which represents the number of digits to the right of the decimal point. The number represented by the BigDecimal is (unscaledValue/10scale). BigDecimal provides operations for basic arithmetic, scale manipulation, comparison, hashing, and format conversion.

The BigDecimal class gives its user complete control over rounding behavior, forcing the user to explicitly specify a rounding behavior for operations capable of discarding precision (divide and setScale). Eight rounding modes are provided for this purpose.

Two types of operations are provided for manipulating the scale of a BigDecimal: scaling/rounding operations and decimal point motion operations. Scaling/rounding operations (SetScale) return a BigDecimal whose value is approximately (or exactly) equal to that of the operand, but whose scale is the specified value; that is, they increase or decrease the precision of the number with minimal effect on its value. Decimal point motion operations (movePointLeft and movePointRight) return a BigDecimal created from the operand by moving the decimal point a specified distance in the specified direction; that is, they change a number's value without affecting its precision.

For the sake of brevity and clarity, pseudo-code is used throughout the descriptions of BigDecimal methods. The pseudo-code expression (i + j) is shorthand for "a BigDecimal whose value is that of the BigDecimal i plus that of the BigDecimal j." The pseudo-code expression (i == j) is shorthand for "true if and only if the BigDecimal i represents the same value as the the BigDecimal j." Other pseudo-code expressions are interpreted similarly.

Note: care should be exercised if BigDecimals are to be used as keys in a SortedMap or elements in a SortedSet, as BigDecimal's natural ordering is inconsistent with equals. See Comparable, SortedMap or SortedSet for more information.

See Also:
BigInteger, SortedMap, SortedSet, Serialized Form

Field Summary
static int | ROUND_CEILING Rounding mode to round towards positive infinity.
static int | ROUND_DOWN Rounding mode to round towards zero.
static int | ROUND_FLOOR Rounding mode to round towards negative infinity.
static int | ROUND_HALF_DOWN Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
static int | ROUND_HALF_EVEN Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.
static int | ROUND_HALF_UP Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
static int | ROUND_UNNECESSARY Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.
static int | ROUND_UP Rounding mode to round away from zero.
Constructor Summary
BigDecimal(BigInteger val)
Translates a BigInteger into a BigDecimal.
BigDecimal(BigInteger unscaledVal, int scale)
Translates a BigInteger unscaled value and an int scale into a BigDecimal.
BigDecimal(double val)
Translates a double into a BigDecimal.
BigDecimal(String val)
Translates the String representation of a BigDecmal into a BigDecimal.
Method Summary
 BigDecimal abs()
Returns a BigDecimal whose value is the absolute value of this BigDecimal, and whose scale is this.scale().
 BigDecimal add(BigDecimal val)
Returns a BigDecimal whose value is (this + val), and whose scale is max(this.scale(), val.scale()).
 int compareTo(BigDecimal val)
Compares this BigDecimal with the specified BigDecimal.
 int compareTo(Object o)
Compares this BigDecimal with the specified Object.
 BigDecimal divide(BigDecimal val, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is this.scale().
 BigDecimal divide(BigDecimal val, int scale, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is as specified.
 double doubleValue()
Converts this BigDecimal to a double.
 boolean equals(Object x)
Compares this BigDecimal with the specified Object for equality.
 float floatValue()
Converts this BigDecimal to a float.
 int hashCode()
Returns the hash code for this BigDecimal.
 int intValue()
Converts this BigDecimal to an int.
 long longValue()
Converts this BigDecimal to a long.
 BigDecimal max(BigDecimal val)
Returns the maximum of this BigDecimal and val.
 BigDecimal min(BigDecimal val)
Returns the minimum of this BigDecimal and val.
 BigDecimal movePointLeft(int n)
Returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the left.
 BigDecimal movePointRight(int n)
Moves the decimal point the specified number of places to the right.
 BigDecimal multiply(BigDecimal val)
Returns a BigDecimal whose value is (this * val), and whose scale is (this.scale() + val.scale()).
 BigDecimal negate()
Returns a BigDecimal whose value is (-this), and whose scale is this.scale().
 int scale()
Returns the scale of this BigDecimal.
 BigDecimal setScale(int scale)
Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's.
 BigDecimal setScale(int scale, int roundingMode)
Returns a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.
 int signum()
Returns the signum function of this BigDecimal.
 BigDecimal subtract(BigDecimal val)
Returns a BigDecimal whose value is (this - val), and whose scale is max(this.scale(), val.scale()).
 BigInteger toBigInteger()
Converts this BigDecimal to a BigInteger.
 String toString()
Returns the string representation of this BigDecimal.
 BigInteger unscaledValue()
Returns a BigInteger whose value is the unscaled value of this BigDecimal.
static BigDecimal valueOf(long val)
Translates a long value into a BigDecimal with a scale of zero.
static BigDecimal valueOf(long unscaledVal, int scale)
Translates a long unscaled value and an int scale into a BigDecimal.
Methods inherited from class java.lang.Number
byteValue, shortValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ROUND_UP

public static final int ROUND_UP
Rounding mode to round away from zero. Always increments the digit prior to a non-zero discarded fraction. Note that this rounding mode never decreases the magnitude of the calculated value.

ROUND_DOWN

public static final int ROUND_DOWN
Rounding mode to round towards zero. Never increments the digit prior to a discarded fraction (i.e., truncates). Note that this rounding mode never increases the magnitude of the calculated value.

ROUND_CEILING

public static final int ROUND_CEILING
Rounding mode to round towards positive infinity. If the BigDecimal is positive, behaves as for ROUND_UP; if negative, behaves as for ROUND_DOWN. Note that this rounding mode never decreases the calculated value.

ROUND_FLOOR

public static final int ROUND_FLOOR
Rounding mode to round towards negative infinity. If the BigDecimal is positive, behave as for ROUND_DOWN; if negative, behave as for ROUND_UP. Note that this rounding mode never increases the calculated value.

ROUND_HALF_UP

public static final int ROUND_HALF_UP
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up. Behaves as for ROUND_UP if the discarded fraction is >= .5; otherwise, behaves as for ROUND_DOWN. Note that this is the rounding mode that most of us were taught in grade school.

ROUND_HALF_DOWN

public static final int ROUND_HALF_DOWN
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. Behaves as for ROUND_UP if the discarded fraction is > .5; otherwise, behaves as for ROUND_DOWN.

ROUND_HALF_EVEN

public static final int ROUND_HALF_EVEN
Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor. Behaves as for ROUND_HALF_UP if the digit to the left of the discarded fraction is odd; behaves as for ROUND_HALF_DOWN if it's even. Note that this is the rounding mode that minimizes cumulative error when applied repeatedly over a sequence of calculations.

ROUND_UNNECESSARY

public static final int ROUND_UNNECESSARY
Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary. If this rounding mode is specified on an operation that yields an inexact result, an ArithmeticException is thrown.
Constructor Detail

BigDecimal

public BigDecimal(String val)
Translates the String representation of a BigDecmal into a BigDecimal. The String representation consists of an optional sign ('+' or '-') followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent.

The fraction consists of of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand.

The exponent consists of the character 'e'(0x75) or E (0x45) followed by one or more decimal digits. The value of the exponenet must lie between Integer.MIN_VALUE and Integer.MAX_VALUE, inclusive.

The scale of the returned BigDecimal will be the number of digits in the fraction, or zero if the string contains no decimal point, subject to adjustment for any exponent: If the string contains an exponent, the exponent is subtracted from the scale. If the resulting scale is negative, the scale of the returned BigDecimal is zero and the unscaled value is multiplied by the appropriate power of ten so that, in every case, the resulting BigDecimal is equal to significand * 10exponent. (If in the future this specification is amended to permit negative scales, the final step of zeroing the scale and adjusting the unscaled value will be eliminated.)

The character-to-digit mapping is provided by Character.digit(char, int). The String may not contain any extraneous characters (whitespace, for example).

Note: For floats (and doubles) other that NAN, +INFINITY and -INFINITY, this constructor is compatible with the values returned by Float.toString (and Double.toString). This is generally the preferred way to convert a float (or double) into a BigDecimal, as it doesn't suffer from the unpredictability of the BigDecimal(double) constructor.

Note: the optional leading plus sign and trailing exponent were added in release 1.3.

Parameters:
val - String representation of BigDecimal.
Throws:
NumberFormatException - val is not a valid representation of a BigDecimal.

BigDecimal

public BigDecimal(double val)
Translates a double into a BigDecimal. The scale of the BigDecimal is the smallest value such that (10scale * val) is an integer.

Note: the results of this constructor can be somewhat unpredictable. One might assume that new BigDecimal(.1) is exactly equal to .1, but it is actually equal to .1000000000000000055511151231257827021181583404541015625. This is so because .1 cannot be represented exactly as a double (or, for that matter, as a binary fraction of any finite length). Thus, the long value that is being passed in to the constructor is not exactly equal to .1, appearances nonwithstanding.

The (String) constructor, on the other hand, is perfectly predictable: new BigDecimal(".1") is exactly equal to .1, as one would expect. Therefore, it is generally recommended that the (String) constructor be used in preference to this one.

Parameters:
val - double value to be converted to BigDecimal.
Throws:
NumberFormatException - val is equal to Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, or Double.NaN.

BigDecimal

public BigDecimal(BigInteger val)
Translates a BigInteger into a BigDecimal. The scale of the BigDecimal is zero.
Parameters:
val - BigInteger value to be converted to BigDecimal.

BigDecimal

public BigDecimal(BigInteger unscaledVal,
                  int scale)
Translates a BigInteger unscaled value and an int scale into a BigDecimal. The value of the BigDecimal is (unscaledVal/10scale).
Parameters:
unscaledVal - unscaled value of the BigDecimal.
scale - scale of the BigDecimal.
Throws:
NumberFormatException - scale is negative
Method Detail

valueOf

public static BigDecimal valueOf(long unscaledVal,
                                 int scale)
Translates a long unscaled value and an int scale into a BigDecimal. This "static factory method" is provided in preference to a (long, int) constructor because it allows for reuse of frequently used BigDecimals.
Parameters:
unscaledVal - unscaled value of the BigDecimal.
scale - scale of the BigDecimal.
Returns:
a BigDecimal whose value is (unscaledVal/10scale).

valueOf

public static BigDecimal valueOf(long val)
Translates a long value into a BigDecimal with a scale of zero. This "static factory method" is provided in preference to a (long) constructor because it allows for reuse of frequently used BigDecimals.
Parameters:
val - value of the BigDecimal.
Returns:
a BigDecimal whose value is val.

add

public BigDecimal add(BigDecimal val)
Returns a BigDecimal whose value is (this + val), and whose scale is max(this.scale(), val.scale()).
Parameters:
val - value to be added to this BigDecimal.
Returns:
this + val

subtract

public BigDecimal subtract(BigDecimal val)
Returns a BigDecimal whose value is (this - val), and whose scale is max(this.scale(), val.scale()).
Parameters:
val - value to be subtracted from this BigDecimal.
Returns:
this - val

multiply

public BigDecimal multiply(BigDecimal val)
Returns a BigDecimal whose value is (this * val), and whose scale is (this.scale() + val.scale()).
Parameters:
val - value to be multiplied by this BigDecimal.
Returns:
this * val

divide

public BigDecimal divide(BigDecimal val,
                         int scale,
                         int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is as specified. If rounding must be performed to generate a result with the specified scale, the specified rounding mode is applied.
Parameters:
val - value by which this BigDecimal is to be divided.
scale - scale of the BigDecimal quotient to be returned.
roundingMode - rounding mode to apply.
Returns:
this / val
Throws:
ArithmeticException - val is zero, scale is negative, or roundingMode==ROUND_UNNECESSARY and the specified scale is insufficient to represent the result of the division exactly.
IllegalArgumentException - roundingMode does not represent a valid rounding mode.
See Also:
ROUND_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR, ROUND_HALF_UP, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_UNNECESSARY

divide

public BigDecimal divide(BigDecimal val,
                         int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is this.scale(). If rounding must be performed to generate a result with the given scale, the specified rounding mode is applied.
Parameters:
val - value by which this BigDecimal is to be divided.
roundingMode - rounding mode to apply.
Returns:
this / val
Throws:
ArithmeticException - val==0, or roundingMode==ROUND_UNNECESSARY and this.scale() is insufficient to represent the result of the division exactly.
IllegalArgumentException - roundingMode does not represent a valid rounding mode.
See Also:
ROUND_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR, ROUND_HALF_UP, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_UNNECESSARY

abs

public BigDecimal abs()
Returns a BigDecimal whose value is the absolute value of this BigDecimal, and whose scale is this.scale().
Returns:
abs(this)

negate

public BigDecimal negate()
Returns a BigDecimal whose value is (-this), and whose scale is this.scale().
Returns:
-this

signum

public int signum()
Returns the signum function of this BigDecimal.
Returns:
-1, 0 or 1 as the value of this BigDecimal is negative, zero or positive.

scale

public int scale()
Returns the scale of this BigDecimal. (The scale is the number of digits to the right of the decimal point.)
Returns:
the scale of this BigDecimal.

unscaledValue

public BigInteger unscaledValue()
Returns a BigInteger whose value is the unscaled value of this BigDecimal. (Computes (this * 10this.scale()).)
Returns:
the unscaled value of this BigDecimal.
Since:
1.2

setScale

public BigDecimal setScale(int scale,
                           int roundingMode)
Returns a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value. If the scale is reduced by the operation, the unscaled value must be divided (rather than multiplied), and the value may be changed; in this case, the specified rounding mode is applied to the division.
Parameters:
scale - scale of the BigDecimal value to be returned.
roundingMode - The rounding mode to apply.
Returns:
a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.
Throws:
ArithmeticException - scale is negative, or roundingMode==ROUND_UNNECESSARY and the specified scaling operation would require rounding.
IllegalArgumentException - roundingMode does not represent a valid rounding mode.
See Also:
ROUND_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR, ROUND_HALF_UP, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_UNNECESSARY

setScale

public BigDecimal setScale(int scale)
Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's. Throws an ArithmeticException if this is not possible. This call is typically used to increase the scale, in which case it is guaranteed that there exists a BigDecimal of the specified scale and the correct value. The call can also be used to reduce the scale if the caller knows that the BigDecimal has sufficiently many zeros at the end of its fractional part (i.e., factors of ten in its integer value) to allow for the rescaling without loss of precision.

Note that this call returns the same result as the two argument version of setScale, but saves the caller the trouble of specifying a rounding mode in cases where it is irrelevant.

Parameters:
scale - scale of the BigDecimal value to be returned.
Returns:
a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.
Throws:
ArithmeticException - scale is negative, or the specified scaling operation would require rounding.
See Also:
setScale(int, int)

movePointLeft

public BigDecimal movePointLeft(int n)
Returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the left. If n is non-negative, the call merely adds n to the scale. If n is negative, the call is equivalent to movePointRight(-n). (The BigDecimal returned by this call has value (this * 10-n) and scale max(this.scale()+n, 0).)
Parameters:
n - number of places to move the decimal point to the left.
Returns:
a BigDecimal which is equivalent to this one with the decimal point moved n places to the left.

movePointRight

public BigDecimal movePointRight(int n)
Moves the decimal point the specified number of places to the right. If this BigDecimal's scale is >= n, the call merely subtracts n from the scale; otherwise, it sets the scale to zero, and multiplies the integer value by 10(n - this.scale). If n is negative, the call is equivalent to movePointLeft(-n). (The BigDecimal returned by this call has value (this * 10n) and scale max(this.scale()-n, 0).)
Parameters:
n - number of places to move the decimal point to the right.
Returns:
a BigDecimal which is equivalent to this one with the decimal point moved n places to the right.

compareTo

public int compareTo(BigDecimal val)
Compares this BigDecimal with the specified BigDecimal. Two BigDecimals that are equal in value but have a different scale (like 2.0 and 2.00) are considered equal by this method. This method is provided in preference to individual methods for each of the six boolean comparison operators (<, ==, >, >=, !=, <=). The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.
Parameters:
val - BigDecimal to which this BigDecimal is to be compared.
Returns:
-1, 0 or 1 as this BigDecimal is numerically less than, equal to, or greater than val.

compareTo

public int compareTo(Object o)
Compares this BigDecimal with the specified Object. If the Object is a BigDecimal, this method behaves like compareTo(BigDecimal). Otherwise, it throws a ClassCastException (as BigDecimals are comparable only to other BigDecimals).
Specified by:
compareTo in interface Comparable
Parameters:
o - Object to which this BigDecimal is to be compared.
Returns:
a negative number, zero, or a positive number as this BigDecimal is numerically less than, equal to, or greater than o, which must be a BigDecimal.
Throws:
ClassCastException - o is not a BigDecimal.
Since:
1.2
See Also:
compareTo(java.math.BigDecimal), Comparable

equals

public boolean equals(Object x)
Compares this BigDecimal with the specified Object for equality. Unlike compareTo, this method considers two BigDecimals equal only if they are equal in value and scale (thus 2.0 is not equal to 2.00 when compared by this method).
Overrides:
equals in class Object
Parameters:
x - Object to which this BigDecimal is to be compared.
Returns:
true if and only if the specified Object is a BigDecimal whose value and scale are equal to this BigDecimal's.
See Also:
compareTo(java.math.BigDecimal)

min

public BigDecimal min(BigDecimal val)
Returns the minimum of this BigDecimal and val.
Parameters:
val - value with with the minimum is to be computed.
Returns:
the BigDecimal whose value is the lesser of this BigDecimal and val. If they are equal, as defined by the compareTo method, either may be returned.
See Also:
compareTo(java.math.BigDecimal)

max

public BigDecimal max(BigDecimal val)
Returns the maximum of this BigDecimal and val.
Parameters:
val - value with with the maximum is to be computed.
Returns:
the BigDecimal whose value is the greater of this BigDecimal and val. If they are equal, as defined by the compareTo method, either may be returned.
See Also:
compareTo(java.math.BigDecimal)

hashCode

public int hashCode()
Returns the hash code for this BigDecimal. Note that two BigDecimals that are numerically equal but differ in scale (like 2.0 and 2.00) will generally not have the same hash code.
Overrides:
hashCode in class Object
Returns:
hash code for this BigDecimal.

toString

public String toString()
Returns the string representation of this BigDecimal. The digit-to- character mapping provided by Character.forDigit is used. A leading minus sign is used to indicate sign, and the number of digits to the right of the decimal point is used to indicate scale. (This representation is compatible with the (String) constructor.)
Overrides:
toString in class Object
Returns:
String representation of this BigDecimal.
See Also:
Character.forDigit(int, int), BigDecimal(java.lang.String)

toBigInteger

public BigInteger toBigInteger()
Converts this BigDecimal to a BigInteger. Standard narrowing primitive conversion as defined in The Java Language Specification: any fractional part of this BigDecimal will be discarded.
Returns:
this BigDecimal converted to a BigInteger.

intValue

public int intValue()
Converts this BigDecimal to an int. Standard narrowing primitive conversion as defined in The Java Language Specification: any fractional part of this BigDecimal will be discarded, and if the resulting "BigInteger" is too big to fit in an int, only the low-order 32 bits are returned.
Overrides:
intValue in class Number
Returns:
this BigDecimal converted to an int.

longValue

public long longValue()
Converts this BigDecimal to a long. Standard narrowing primitive conversion as defined in The Java Language Specification: any fractional part of this BigDecimal will be discarded, and if the resulting "BigInteger" is too big to fit in a long, only the low-order 64 bits are returned.
Overrides:
longValue in class Number
Returns:
this BigDecimal converted to an int.

floatValue

public float floatValue()
Converts this BigDecimal to a float. Similar to the double-to-float narrowing primitive conversion defined in The Java Language Specification: if this BigDecimal has too great a magnitude to represent as a float, it will be converted to FLOAT.NEGATIVE_INFINITY or FLOAT.POSITIVE_INFINITY as appropriate.
Overrides:
floatValue in class Number
Returns:
this BigDecimal converted to a float.

doubleValue

public double doubleValue()
Converts this BigDecimal to a double. Similar to the double-to-float narrowing primitive conversion defined in The Java Language Specification: if this BigDecimal has too great a magnitude to represent as a double, it will be converted to DOUBLE.NEGATIVE_INFINITY or DOUBLE.POSITIVE_INFINITY as appropriate.
Overrides:
doubleValue in class Number
Returns:
this BigDecimal converted to a double.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BigInteger

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.math
Class BigInteger

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.math.BigInteger
All Implemented Interfaces:
Comparable, Serializable
public class BigInteger
extends Number
implements Comparable

Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in two's-complement notation (like Java's primitive integer types). BigInteger provides analogues to all of Java's primitive integer operators, and all relevant methods from java.lang.Math. Additionally, BigInteger provides operations for modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation, and a few other miscellaneous operations.

Semantics of arithmetic operations exactly mimic those of Java's integer arithmetic operators, as defined in The Java Language Specification. For example, division by zero throws an ArithmeticException, and division of a negative by a positive yields a negative (or zero) remainder. All of the details in the Spec concerning overflow are ignored, as BigIntegers are made as large as necessary to accommodate the results of an operation.

Semantics of shift operations extend those of Java's shift operators to allow for negative shift distances. A right-shift with a negative shift distance results in a left shift, and vice-versa. The unsigned right shift operator (>>>) is omitted, as this operation makes little sense in combination with the "infinite word size" abstraction provided by this class.

Semantics of bitwise logical operations exactly mimic those of Java's bitwise integer operators. The binary operators (and, or, xor) implicitly perform sign extension on the shorter of the two operands prior to performing the operation.

Comparison operations perform signed integer comparisons, analogous to those performed by Java's relational and equality operators.

Modular arithmetic operations are provided to compute residues, perform exponentiation, and compute multiplicative inverses. These methods always return a non-negative result, between 0 and (modulus - 1), inclusive.

Bit operations operate on a single bit of the two's-complement representation of their operand. If necessary, the operand is sign- extended so that it contains the designated bit. None of the single-bit operations can produce a BigInteger with a different sign from the BigInteger being operated on, as they affect only a single bit, and the "infinite word size" abstraction provided by this class ensures that there are infinitely many "virtual sign bits" preceding each BigInteger.

For the sake of brevity and clarity, pseudo-code is used throughout the descriptions of BigInteger methods. The pseudo-code expression (i + j) is shorthand for "a BigInteger whose value is that of the BigInteger i plus that of the BigInteger j." The pseudo-code expression (i == j) is shorthand for "true if and only if the BigInteger i represents the same value as the the BigInteger j." Other pseudo-code expressions are interpreted similarly.

Since:
JDK1.1
See Also:
BigDecimal, Serialized Form

Field Summary
static BigInteger | ONE The BigInteger constant one.
static BigInteger | ZERO The BigInteger constant zero.
Constructor Summary
BigInteger(byte[] val)
Translates a byte array containing the two's-complement binary representation of a BigInteger into a BigInteger.
BigInteger(int signum, byte[] magnitude)
Translates the sign-magnitude representation of a BigInteger into a BigInteger.
BigInteger(int bitLength, int certainty, Random rnd)
Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.
BigInteger(int numBits, Random rnd)
Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits - 1), inclusive.
BigInteger(String val)
Translates the decimal String representation of a BigInteger into a BigInteger.
BigInteger(String val, int radix)
Translates the String representation of a BigInteger in the specified radix into a BigInteger.
Method Summary
BigInteger | abs() Returns a BigInteger whose value is the absolute value of this BigInteger.
BigInteger | add(BigInteger val) Returns a BigInteger whose value is (this + val).
BigInteger | and(BigInteger val) Returns a BigInteger whose value is (this & val).
BigInteger | andNot(BigInteger val) Returns a BigInteger whose value is (this & ~val).
int | bitCount() Returns the number of bits in the two's complement representation of this BigInteger that differ from its sign bit.
int | bitLength() Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit.
BigInteger | clearBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit cleared.
int | compareTo(BigInteger val) Compares this BigInteger with the specified BigInteger.
int | compareTo(Object o) Compares this BigInteger with the specified Object.
BigInteger | divide(BigInteger val) Returns a BigInteger whose value is (this / val).
BigInteger[] | divideAndRemainder(BigInteger val) Returns an array of two BigIntegers containing (this / val) followed by (this % val).
double | doubleValue() Converts this BigInteger to a double.
boolean | equals(Object x) Compares this BigInteger with the specified Object for equality.
BigInteger | flipBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit flipped.
float | floatValue() Converts this BigInteger to a float.
BigInteger | gcd(BigInteger val) Returns a BigInteger whose value is the greatest common divisor of abs(this) and abs(val).
int | getLowestSetBit() Returns the index of the rightmost (lowest-order) one bit in this BigInteger (the number of zero bits to the right of the rightmost one bit).
int | hashCode() Returns the hash code for this BigInteger.
int | intValue() Converts this BigInteger to an int.
boolean | isProbablePrime(int certainty) Returns true if this BigInteger is probably prime, false if it's definitely composite.
long | longValue() Converts this BigInteger to a long.
BigInteger | max(BigInteger val) Returns the maximum of this BigInteger and val.
BigInteger | min(BigInteger val) Returns the minimum of this BigInteger and val.
BigInteger | mod(BigInteger m) Returns a BigInteger whose value is (this mod m).
BigInteger | modInverse(BigInteger m) Returns a BigInteger whose value is (this-1 mod m).
BigInteger | modPow(BigInteger exponent, BigInteger m) Returns a BigInteger whose value is (thisexponent mod m).
BigInteger | multiply(BigInteger val) Returns a BigInteger whose value is (this * val).
BigInteger | negate() Returns a BigInteger whose value is (-this).
BigInteger | not() Returns a BigInteger whose value is (~this).
BigInteger | or(BigInteger val) Returns a BigInteger whose value is (this | val).
BigInteger | pow(int exponent) Returns a BigInteger whose value is (thisexponent).
BigInteger | remainder(BigInteger val) Returns a BigInteger whose value is (this % val).
BigInteger | setBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit set.
BigInteger | shiftLeft(int n) Returns a BigInteger whose value is (this << n).
BigInteger | shiftRight(int n) Returns a BigInteger whose value is (this >> n).
int | signum() Returns the signum function of this BigInteger.
BigInteger | subtract(BigInteger val) Returns a BigInteger whose value is (this - val).
boolean | testBit(int n) Returns true if and only if the designated bit is set.
byte[] | toByteArray() Returns a byte array containing the two's-complement representation of this BigInteger.
String | toString() Returns the decimal String representation of this BigInteger.
String | toString(int radix) Returns the String representation of this BigInteger in the given radix.
static BigInteger | valueOf(long val) Returns a BigInteger whose value is equal to that of the specified long.
BigInteger | xor(BigInteger val) Returns a BigInteger whose value is (this ^ val).
Methods inherited from class java.lang.Number
byteValue, shortValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ZERO

public static final BigInteger ZERO
The BigInteger constant zero.
Since:
1.2

ONE

public static final BigInteger ONE
The BigInteger constant one.
Since:
1.2
Constructor Detail

BigInteger

public BigInteger(byte[] val)
Translates a byte array containing the two's-complement binary representation of a BigInteger into a BigInteger. The input array is assumed to be in big-endian byte-order: the most significant byte is in the zeroth element.
Parameters:
val - big-endian two's-complement binary representation of BigInteger.
Throws:
NumberFormatException - val is zero bytes long.

BigInteger

public BigInteger(int signum,
                  byte[] magnitude)
Translates the sign-magnitude representation of a BigInteger into a BigInteger. The sign is represented as an integer signum value: -1 for negative, 0 for zero, or 1 for positive. The magnitude is a byte array in big-endian byte-order: the most significant byte is in the zeroth element. A zero-length magnitude array is permissible, and will result in in a BigInteger value of 0, whether signum is -1, 0 or 1.
Parameters:
signum - signum of the number (-1 for negative, 0 for zero, 1 for positive).
magnitude - big-endian binary representation of the magnitude of the number.
Throws:
NumberFormatException - signum is not one of the three legal values (-1, 0, and 1), or signum is 0 and magnitude contains one or more non-zero bytes.

BigInteger

public BigInteger(String val,
                  int radix)
Translates the String representation of a BigInteger in the specified radix into a BigInteger. The String representation consists of an optional minus sign followed by a sequence of one or more digits in the specified radix. The character-to-digit mapping is provided by Character.digit. The String may not contain any extraneous characters (whitespace, for example).
Parameters:
val - String representation of BigInteger.
radix - radix to be used in interpreting val.
Throws:
NumberFormatException - val is not a valid representation of a BigInteger in the specified radix, or radix is outside the range from Character.MIN_RADIX (2) to Character.MAX_RADIX (36), inclusive.
See Also:
Character.digit(char, int)

BigInteger

public BigInteger(String val)
Translates the decimal String representation of a BigInteger into a BigInteger. The String representation consists of an optional minus sign followed by a sequence of one or more decimal digits. The character-to-digit mapping is provided by Character.digit. The String may not contain any extraneous characters (whitespace, for example).
Parameters:
val - decimal String representation of BigInteger.
Throws:
NumberFormatException - val is not a valid representation of a BigInteger.
See Also:
Character.digit(char, int)

BigInteger

public BigInteger(int numBits,
                  Random rnd)
Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits - 1), inclusive. The uniformity of the distribution assumes that a fair source of random bits is provided in rnd. Note that this constructor always constructs a non-negative BigInteger.
Parameters:
numBits - maximum bitLength of the new BigInteger.
rnd - source of randomness to be used in computing the new BigInteger.
Throws:
IllegalArgumentException - numBits is negative.
See Also:
bitLength()

BigInteger

public BigInteger(int bitLength,
                  int certainty,
                  Random rnd)
Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.

It is recommended that the probablePrime method be used in preference to this constructor unless there is a compelling need to specify a certainty.

Parameters:
bitLength - bitLength of the returned BigInteger.
certainty - a measure of the uncertainty that the caller is willing to tolerate. The probability that the new BigInteger represents a prime number will exceed (1 - 1/2certainty). The execution time of this constructor is proportional to the value of this parameter.
rnd - source of random bits used to select candidates to be tested for primality.
Throws:
ArithmeticException - bitLength < 2.
See Also:
bitLength()
Method Detail

valueOf

public static BigInteger valueOf(long val)
Returns a BigInteger whose value is equal to that of the specified long. This "static factory method" is provided in preference to a (long) constructor because it allows for reuse of frequently used BigIntegers.
Parameters:
val - value of the BigInteger to return.
Returns:
a BigInteger with the specified value.

add

public BigInteger add(BigInteger val)
Returns a BigInteger whose value is (this + val).
Parameters:
val - value to be added to this BigInteger.
Returns:
this + val

subtract

public BigInteger subtract(BigInteger val)
Returns a BigInteger whose value is (this - val).
Parameters:
val - value to be subtracted from this BigInteger.
Returns:
this - val

multiply

public BigInteger multiply(BigInteger val)
Returns a BigInteger whose value is (this * val).
Parameters:
val - value to be multiplied by this BigInteger.
Returns:
this * val

divide

public BigInteger divide(BigInteger val)
Returns a BigInteger whose value is (this / val).
Parameters:
val - value by which this BigInteger is to be divided.
Returns:
this / val
Throws:
ArithmeticException - val==0

divideAndRemainder

public BigInteger[] divideAndRemainder(BigInteger val)
Returns an array of two BigIntegers containing (this / val) followed by (this % val).
Parameters:
val - value by which this BigInteger is to be divided, and the remainder computed.
Returns:
an array of two BigIntegers: the quotient (this / val) is the initial element, and the remainder (this % val) is the final element.
Throws:
ArithmeticException - val==0

remainder

public BigInteger remainder(BigInteger val)
Returns a BigInteger whose value is (this % val).
Parameters:
val - value by which this BigInteger is to be divided, and the remainder computed.
Returns:
this % val
Throws:
ArithmeticException - val==0

pow

public BigInteger pow(int exponent)
Returns a BigInteger whose value is (thisexponent). Note that exponent is an integer rather than a BigInteger.
Parameters:
exponent - exponent to which this BigInteger is to be raised.
Returns:
thisexponent
Throws:
ArithmeticException - exponent is negative. (This would cause the operation to yield a non-integer value.)

gcd

public BigInteger gcd(BigInteger val)
Returns a BigInteger whose value is the greatest common divisor of abs(this) and abs(val). Returns 0 if this==0 && val==0.
Parameters:
val - value with with the GCD is to be computed.
Returns:
GCD(abs(this), abs(val))

abs

public BigInteger abs()
Returns a BigInteger whose value is the absolute value of this BigInteger.
Returns:
abs(this)

negate

public BigInteger negate()
Returns a BigInteger whose value is (-this).
Returns:
-this

signum

public int signum()
Returns the signum function of this BigInteger.
Returns:
-1, 0 or 1 as the value of this BigInteger is negative, zero or positive.

mod

public BigInteger mod(BigInteger m)
Returns a BigInteger whose value is (this mod m). This method differs from remainder in that it always returns a non-negative BigInteger.
Parameters:
m - the modulus.
Returns:
this mod m
Throws:
ArithmeticException - m <= 0
See Also:
remainder(java.math.BigInteger)

modPow

public BigInteger modPow(BigInteger exponent,
                         BigInteger m)
Returns a BigInteger whose value is (thisexponent mod m). (Unlike pow, this method permits negative exponents.)
Parameters:
exponent - the exponent.
m - the modulus.
Returns:
thisexponent mod m
Throws:
ArithmeticException - m <= 0
See Also:
modInverse(java.math.BigInteger)

modInverse

public BigInteger modInverse(BigInteger m)
Returns a BigInteger whose value is (this-1 mod m).
Parameters:
m - the modulus.
Returns:
this-1 mod m.
Throws:
ArithmeticException - m <= 0, or this BigInteger has no multiplicative inverse mod m (that is, this BigInteger is not relatively prime to m).

shiftLeft

public BigInteger shiftLeft(int n)
Returns a BigInteger whose value is (this << n). The shift distance, n, may be negative, in which case this method performs a right shift. (Computes floor(this * 2n).)
Parameters:
n - shift distance, in bits.
Returns:
this << n
See Also:
shiftRight(int)

shiftRight

public BigInteger shiftRight(int n)
Returns a BigInteger whose value is (this >> n). Sign extension is performed. The shift distance, n, may be negative, in which case this method performs a left shift. (Computes floor(this / 2n).)
Parameters:
n - shift distance, in bits.
Returns:
this >> n
See Also:
shiftLeft(int)

and

public BigInteger and(BigInteger val)
Returns a BigInteger whose value is (this & val). (This method returns a negative BigInteger if and only if this and val are both negative.)
Parameters:
val - value to be AND'ed with this BigInteger.
Returns:
this & val

or

public BigInteger or(BigInteger val)
Returns a BigInteger whose value is (this | val). (This method returns a negative BigInteger if and only if either this or val is negative.)
Parameters:
val - value to be OR'ed with this BigInteger.
Returns:
this | val

xor

public BigInteger xor(BigInteger val)
Returns a BigInteger whose value is (this ^ val). (This method returns a negative BigInteger if and only if exactly one of this and val are negative.)
Parameters:
val - value to be XOR'ed with this BigInteger.
Returns:
this ^ val

not

public BigInteger not()
Returns a BigInteger whose value is (~this). (This method returns a negative value if and only if this BigInteger is non-negative.)
Returns:
~this

andNot

public BigInteger andNot(BigInteger val)
Returns a BigInteger whose value is (this & ~val). This method, which is equivalent to and(val.not()), is provided as a convenience for masking operations. (This method returns a negative BigInteger if and only if this is negative and val is positive.)
Parameters:
val - value to be complemented and AND'ed with this BigInteger.
Returns:
this & ~val

testBit

public boolean testBit(int n)
Returns true if and only if the designated bit is set. (Computes ((this & (1<<n)) != 0).)
Parameters:
n - index of bit to test.
Returns:
true if and only if the designated bit is set.
Throws:
ArithmeticException - n is negative.

setBit

public BigInteger setBit(int n)
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit set. (Computes (this | (1<<n)).)
Parameters:
n - index of bit to set.
Returns:
this | (1<<n)
Throws:
ArithmeticException - n is negative.

clearBit

public BigInteger clearBit(int n)
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit cleared. (Computes (this & ~(1<<n)).)
Parameters:
n - index of bit to clear.
Returns:
this & ~(1<<n)
Throws:
ArithmeticException - n is negative.

flipBit

public BigInteger flipBit(int n)
Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit flipped. (Computes (this ^ (1<<n)).)
Parameters:
n - index of bit to flip.
Returns:
this ^ (1<<n)
Throws:
ArithmeticException - n is negative.

getLowestSetBit

public int getLowestSetBit()
Returns the index of the rightmost (lowest-order) one bit in this BigInteger (the number of zero bits to the right of the rightmost one bit). Returns -1 if this BigInteger contains no one bits. (Computes (this==0? -1 : log2(this & -this)).)
Returns:
index of the rightmost one bit in this BigInteger.

bitLength

public int bitLength()
Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit. For positive BigIntegers, this is equivalent to the number of bits in the ordinary binary representation. (Computes (ceil(log2(this < 0 ? -this : this+1))).)
Returns:
number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit.

bitCount

public int bitCount()
Returns the number of bits in the two's complement representation of this BigInteger that differ from its sign bit. This method is useful when implementing bit-vector style sets atop BigIntegers.
Returns:
number of bits in the two's complement representation of this BigInteger that differ from its sign bit.

isProbablePrime

public boolean isProbablePrime(int certainty)
Returns true if this BigInteger is probably prime, false if it's definitely composite.
Parameters:
certainty - a measure of the uncertainty that the caller is willing to tolerate: if the call returns true the probability that this BigInteger is prime exceeds (1 - 1/2certainty). The execution time of this method is proportional to the value of this parameter.
Returns:
true if this BigInteger is probably prime, false if it's definitely composite.

compareTo

public int compareTo(BigInteger val)
Compares this BigInteger with the specified BigInteger. This method is provided in preference to individual methods for each of the six boolean comparison operators (<, ==, >, >=, !=, <=). The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.
Parameters:
val - BigInteger to which this BigInteger is to be compared.
Returns:
-1, 0 or 1 as this BigInteger is numerically less than, equal to, or greater than val.

compareTo

public int compareTo(Object o)
Compares this BigInteger with the specified Object. If the Object is a BigInteger, this method behaves like compareTo(BigInteger). Otherwise, it throws a ClassCastException (as BigIntegers are comparable only to other BigIntegers).
Specified by:
compareTo in interface Comparable
Parameters:
o - Object to which this BigInteger is to be compared.
Returns:
a negative number, zero, or a positive number as this BigInteger is numerically less than, equal to, or greater than o, which must be a BigInteger.
Throws:
ClassCastException - o is not a BigInteger.
Since:
1.2
See Also:
compareTo(java.math.BigInteger), Comparable

equals

public boolean equals(Object x)
Compares this BigInteger with the specified Object for equality.
Overrides:
equals in class Object
Parameters:
x - Object to which this BigInteger is to be compared.
Returns:
true if and only if the specified Object is a BigInteger whose value is numerically equal to this BigInteger.

min

public BigInteger min(BigInteger val)
Returns the minimum of this BigInteger and val.
Parameters:
val - value with with the minimum is to be computed.
Returns:
the BigInteger whose value is the lesser of this BigInteger and val. If they are equal, either may be returned.

max

public BigInteger max(BigInteger val)
Returns the maximum of this BigInteger and val.
Parameters:
val - value with with the maximum is to be computed.
Returns:
the BigInteger whose value is the greater of this and val. If they are equal, either may be returned.

hashCode

public int hashCode()
Returns the hash code for this BigInteger.
Overrides:
hashCode in class Object
Returns:
hash code for this BigInteger.

toString

public String toString(int radix)
Returns the String representation of this BigInteger in the given radix. If the radix is outside the range from Character.MIN_RADIX (2) to Character.MAX_RADIX (36) inclusive, it will default to 10 (as is the case for Integer.toString). The digit-to-character mapping provided by Character.forDigit is used, and a minus sign is prepended if appropriate. (This representation is compatible with the (String, int) constructor.)
Parameters:
radix - radix of the String representation.
Returns:
String representation of this BigInteger in the given radix.
See Also:
Integer.toString(int, int),
Character.forDigit(int, int),
BigInteger(java.lang.String, int)

toString

public String toString()
Returns the decimal String representation of this BigInteger. The digit-to-character mapping provided by Character.forDigit is used, and a minus sign is prepended if appropriate. (This representation is compatible with the (String) constructor, and allows for String concatenation with Java's + operator.)
Overrides:
toString in class Object
Returns:
decimal String representation of this BigInteger.
See Also:
Character.forDigit(int, int), BigInteger(java.lang.String)

toByteArray

public byte[] toByteArray()
Returns a byte array containing the two's-complement representation of this BigInteger. The byte array will be in big-endian byte-order: the most significant byte is in the zeroth element. The array will contain the minimum number of bytes required to represent this BigInteger, including at least one sign bit, which is (ceil((this.bitLength() + 1)/8)). (This representation is compatible with the (byte[]) constructor.)
Returns:
a byte array containing the two's-complement representation of this BigInteger.
See Also:
BigInteger(byte[])

intValue

public int intValue()
Converts this BigInteger to an int. Standard narrowing primitive conversion as defined in The Java Language Specification: if this BigInteger is too big to fit in an int, only the low-order 32 bits are returned.
Overrides:
intValue in class Number
Returns:
this BigInteger converted to an int.

longValue

public long longValue()
Converts this BigInteger to a long. Standard narrowing primitive conversion as defined in The Java Language Specification: if this BigInteger is too big to fit in a long, only the low-order 64 bits are returned.
Overrides:
longValue in class Number
Returns:
this BigInteger converted to a long.

floatValue

public float floatValue()
Converts this BigInteger to a float. Similar to the double-to-float narrowing primitive conversion defined in The Java Language Specification: if this BigInteger has too great a magnitude to represent as a float, it will be converted to infinity or negative infinity, as appropriate.
Overrides:
floatValue in class Number
Returns:
this BigInteger converted to a float.

doubleValue

public double doubleValue()
Converts this BigInteger to a double. Similar to the double-to-float narrowing primitive conversion defined in The Java Language Specification: if this BigInteger has too great a magnitude to represent as a double, it will be converted to infinity or negative infinity, as appropriate.
Overrides:
doubleValue in class Number
Returns:
this BigInteger converted to a double.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.math.BigDecimal

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.math.BigDecimal

Packages that use BigDecimal
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of BigDecimal in java.math

Methods in java.math that return BigDecimal
static BigDecimal BigDecimal.valueOf(long unscaledVal, int scale)
Translates a long unscaled value and an int scale into a BigDecimal.
static BigDecimal BigDecimal.valueOf(long val)
Translates a long value into a BigDecimal with a scale of zero.
 BigDecimal BigDecimal.add(BigDecimal val)
Returns a BigDecimal whose value is (this + val), and whose scale is max(this.scale(), val.scale()).
 BigDecimal BigDecimal.subtract(BigDecimal val)
Returns a BigDecimal whose value is (this - val), and whose scale is max(this.scale(), val.scale()).
 BigDecimal BigDecimal.multiply(BigDecimal val)
Returns a BigDecimal whose value is (this * val), and whose scale is (this.scale() + val.scale()).
 BigDecimal BigDecimal.divide(BigDecimal val, int scale, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is as specified.
 BigDecimal BigDecimal.divide(BigDecimal val, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is this.scale().
 BigDecimal BigDecimal.abs()
Returns a BigDecimal whose value is the absolute value of this BigDecimal, and whose scale is this.scale().
 BigDecimal BigDecimal.negate()
Returns a BigDecimal whose value is (-this), and whose scale is this.scale().
 BigDecimal BigDecimal.setScale(int scale, int roundingMode)
Returns a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.
 BigDecimal BigDecimal.setScale(int scale)
Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's.
 BigDecimal BigDecimal.movePointLeft(int n)
Returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the left.
 BigDecimal BigDecimal.movePointRight(int n)
Moves the decimal point the specified number of places to the right.
 BigDecimal BigDecimal.min(BigDecimal val)
Returns the minimum of this BigDecimal and val.
 BigDecimal BigDecimal.max(BigDecimal val)
Returns the maximum of this BigDecimal and val.

Methods in java.math with parameters of type BigDecimal
 BigDecimal BigDecimal.add(BigDecimal val)
Returns a BigDecimal whose value is (this + val), and whose scale is max(this.scale(), val.scale()).
 BigDecimal BigDecimal.subtract(BigDecimal val)
Returns a BigDecimal whose value is (this - val), and whose scale is max(this.scale(), val.scale()).
 BigDecimal BigDecimal.multiply(BigDecimal val)
Returns a BigDecimal whose value is (this * val), and whose scale is (this.scale() + val.scale()).
 BigDecimal BigDecimal.divide(BigDecimal val, int scale, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is as specified.
 BigDecimal BigDecimal.divide(BigDecimal val, int roundingMode)
Returns a BigDecimal whose value is (this / val), and whose scale is this.scale().
 int BigDecimal.compareTo(BigDecimal val)
Compares this BigDecimal with the specified BigDecimal.
 BigDecimal BigDecimal.min(BigDecimal val)
Returns the minimum of this BigDecimal and val.
 BigDecimal BigDecimal.max(BigDecimal val)
Returns the maximum of this BigDecimal and val.

Uses of BigDecimal in java.sql

Methods in java.sql that return BigDecimal
BigDecimal | CallableStatement.getBigDecimal(int parameterIndex, int scale) Deprecated.
BigDecimal | CallableStatement.getBigDecimal(int parameterIndex) Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
BigDecimal | SQLInput.readBigDecimal() Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language.
BigDecimal | ResultSet.getBigDecimal(int columnIndex, int scale) Deprecated.
BigDecimal | ResultSet.getBigDecimal(String columnName, int scale) Deprecated.
BigDecimal | ResultSet.getBigDecimal(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
BigDecimal | ResultSet.getBigDecimal(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

Methods in java.sql with parameters of type BigDecimal
void | PreparedStatement.setBigDecimal(int parameterIndex, BigDecimal x) Sets the designated parameter to a java.math.BigDecimal value.
void | SQLOutput.writeBigDecimal(BigDecimal x) Writes the next attribute to the stream as a java.math.BigDecimal object.
void | ResultSet.updateBigDecimal(int columnIndex, BigDecimal x) Updates the designated column with a java.math.BigDecimal value.
void | ResultSet.updateBigDecimal(String columnName, BigDecimal x) Updates the designated column with a java.sql.BigDecimal value.

Uses of BigDecimal in org.omg.CORBA

Fields in org.omg.CORBA declared as BigDecimal
 BigDecimal FixedHolder.value
The value held by the FixedHolder

Methods in org.omg.CORBA that return BigDecimal
 BigDecimal Any.extract_fixed()
Extracts the java.math.BigDecimal object in this Any object's value field.

Methods in org.omg.CORBA with parameters of type BigDecimal
void | Any.insert_fixed(BigDecimal value) Inserts the given java.math.BigDecimal object into this Any object's value field.
void | Any.insert_fixed(BigDecimal value, TypeCode type) Inserts the given java.math.BigDecimal object into this Any object's value field.

Constructors in org.omg.CORBA with parameters of type BigDecimal
FixedHolder(BigDecimal initial)
Construct the FixedHolder and initialize it with the given value.

Uses of BigDecimal in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return BigDecimal
 BigDecimal InputStream.read_fixed()
Reads a BigDecimal number.

Methods in org.omg.CORBA.portable with parameters of type BigDecimal
 void OutputStream.write_fixed(BigDecimal value)
Writes a BigDecimal number.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.math.BigInteger

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.math.BigInteger

Packages that use BigInteger
java.awt.image | Provides classes for creating and modifying images.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of BigInteger in java.awt.image

Methods in java.awt.image that return BigInteger
 BigInteger IndexColorModel.getValidPixels()
Returns a BigInteger that indicates the valid/invalid pixels in the colormap.

Constructors in java.awt.image with parameters of type BigInteger
IndexColorModel(int bits, int size, int[] cmap, int start, int transferType, BigInteger validBits)
Constructs an IndexColorModel from an int array where each int is comprised of red, green, blue, and alpha components in the default RGB color model format.

Uses of BigInteger in java.math

Fields in java.math declared as BigInteger
static BigInteger | BigInteger.ZERO The BigInteger constant zero.
static BigInteger | BigInteger.ONE The BigInteger constant one.

Methods in java.math that return BigInteger
static BigInteger | BigInteger.valueOf(long val) Returns a BigInteger whose value is equal to that of the specified long.
BigInteger | BigInteger.add(BigInteger val) Returns a BigInteger whose value is (this + val).
BigInteger | BigInteger.subtract(BigInteger val) Returns a BigInteger whose value is (this - val).
BigInteger | BigInteger.multiply(BigInteger val) Returns a BigInteger whose value is (this * val).
BigInteger | BigInteger.divide(BigInteger val) Returns a BigInteger whose value is (this / val).
BigInteger[] | BigInteger.divideAndRemainder(BigInteger val) Returns an array of two BigIntegers containing (this / val) followed by (this % val).
BigInteger | BigInteger.remainder(BigInteger val) Returns a BigInteger whose value is (this % val).
BigInteger | BigInteger.pow(int exponent) Returns a BigInteger whose value is (thisexponent).
BigInteger | BigInteger.gcd(BigInteger val) Returns a BigInteger whose value is the greatest common divisor of abs(this) and abs(val).
BigInteger | BigInteger.abs() Returns a BigInteger whose value is the absolute value of this BigInteger.
BigInteger | BigInteger.negate() Returns a BigInteger whose value is (-this).
BigInteger | BigInteger.mod(BigInteger m) Returns a BigInteger whose value is (this mod m).
BigInteger | BigInteger.modPow(BigInteger exponent, BigInteger m) Returns a BigInteger whose value is (thisexponent mod m).
BigInteger | BigInteger.modInverse(BigInteger m) Returns a BigInteger whose value is (this-1 mod m).
BigInteger | BigInteger.shiftLeft(int n) Returns a BigInteger whose value is (this << n).
BigInteger | BigInteger.shiftRight(int n) Returns a BigInteger whose value is (this >> n).
BigInteger | BigInteger.and(BigInteger val) Returns a BigInteger whose value is (this & val).
BigInteger | BigInteger.or(BigInteger val) Returns a BigInteger whose value is (this | val).
BigInteger | BigInteger.xor(BigInteger val) Returns a BigInteger whose value is (this ^ val).
BigInteger | BigInteger.not() Returns a BigInteger whose value is (~this).
BigInteger | BigInteger.andNot(BigInteger val) Returns a BigInteger whose value is (this & ~val).
BigInteger | BigInteger.setBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit set.
BigInteger | BigInteger.clearBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit cleared.
BigInteger | BigInteger.flipBit(int n) Returns a BigInteger whose value is equivalent to this BigInteger with the designated bit flipped.
BigInteger | BigInteger.min(BigInteger val) Returns the minimum of this BigInteger and val.
BigInteger | BigInteger.max(BigInteger val) Returns the maximum of this BigInteger and val.
BigInteger | BigDecimal.unscaledValue() Returns a BigInteger whose value is the unscaled value of this BigDecimal.
BigInteger | BigDecimal.toBigInteger() Converts this BigDecimal to a BigInteger.

Methods in java.math with parameters of type BigInteger
BigInteger | BigInteger.add(BigInteger val) Returns a BigInteger whose value is (this + val).
BigInteger | BigInteger.subtract(BigInteger val) Returns a BigInteger whose value is (this - val).
BigInteger | BigInteger.multiply(BigInteger val) Returns a BigInteger whose value is (this * val).
BigInteger | BigInteger.divide(BigInteger val) Returns a BigInteger whose value is (this / val).
BigInteger[] | BigInteger.divideAndRemainder(BigInteger val) Returns an array of two BigIntegers containing (this / val) followed by (this % val).
BigInteger | BigInteger.remainder(BigInteger val) Returns a BigInteger whose value is (this % val).
BigInteger | BigInteger.gcd(BigInteger val) Returns a BigInteger whose value is the greatest common divisor of abs(this) and abs(val).
BigInteger | BigInteger.mod(BigInteger m) Returns a BigInteger whose value is (this mod m).
BigInteger | BigInteger.modPow(BigInteger exponent, BigInteger m) Returns a BigInteger whose value is (thisexponent mod m).
BigInteger | BigInteger.modInverse(BigInteger m) Returns a BigInteger whose value is (this-1 mod m).
BigInteger | BigInteger.and(BigInteger val) Returns a BigInteger whose value is (this & val).
BigInteger | BigInteger.or(BigInteger val) Returns a BigInteger whose value is (this | val).
BigInteger | BigInteger.xor(BigInteger val) Returns a BigInteger whose value is (this ^ val).
BigInteger | BigInteger.andNot(BigInteger val) Returns a BigInteger whose value is (this & ~val).
int | BigInteger.compareTo(BigInteger val) Compares this BigInteger with the specified BigInteger.
BigInteger | BigInteger.min(BigInteger val) Returns the minimum of this BigInteger and val.
BigInteger | BigInteger.max(BigInteger val) Returns the maximum of this BigInteger and val.

Constructors in java.math with parameters of type BigInteger
BigDecimal(BigInteger val)
Translates a BigInteger into a BigDecimal.
BigDecimal(BigInteger unscaledVal, int scale)
Translates a BigInteger unscaled value and an int scale into a BigDecimal.

Uses of BigInteger in java.security.cert

Methods in java.security.cert that return BigInteger
abstract BigInteger | X509Certificate.getSerialNumber() Gets the serialNumber value from the certificate.
abstract BigInteger | X509CRLEntry.getSerialNumber() Gets the serial number from this X509CRLEntry, the userCertificate.

Methods in java.security.cert with parameters of type BigInteger
abstract  X509CRLEntry X509CRL.getRevokedCertificate(BigInteger serialNumber)
Gets the CRL entry, if any, with the given certificate serialNumber.

Uses of BigInteger in java.security.interfaces

Methods in java.security.interfaces that return BigInteger
BigInteger | DSAPrivateKey.getX() Returns the value of the private key, x.
BigInteger | RSAPublicKey.getPublicExponent() Returns the public exponent.
BigInteger | DSAParams.getP() Returns the prime, p.
BigInteger | DSAParams.getQ() Returns the subprime, q.
BigInteger | DSAParams.getG() Returns the base, g.
BigInteger | RSAPrivateCrtKey.getPublicExponent() Returns the public exponent.
BigInteger | RSAPrivateCrtKey.getPrimeP() Returns the primeP.
BigInteger | RSAPrivateCrtKey.getPrimeQ() Returns the primeQ.
BigInteger | RSAPrivateCrtKey.getPrimeExponentP() Returns the primeExponentP.
BigInteger | RSAPrivateCrtKey.getPrimeExponentQ() Returns the primeExponentQ.
BigInteger | RSAPrivateCrtKey.getCrtCoefficient() Returns the crtCoefficient.
BigInteger | RSAPrivateKey.getPrivateExponent() Returns the private exponent.
BigInteger | DSAPublicKey.getY() Returns the value of the public key, y.
BigInteger | RSAKey.getModulus() Returns the modulus.

Uses of BigInteger in java.security.spec

Fields in java.security.spec declared as BigInteger
static BigInteger | RSAKeyGenParameterSpec.F0 The public-exponent value F0 = 3.
static BigInteger | RSAKeyGenParameterSpec.F4 The public exponent-value F4 = 65537.

Methods in java.security.spec that return BigInteger
BigInteger | DSAPrivateKeySpec.getX() Returns the private key x.
BigInteger | DSAPrivateKeySpec.getP() Returns the prime p.
BigInteger | DSAPrivateKeySpec.getQ() Returns the sub-prime q.
BigInteger | DSAPrivateKeySpec.getG() Returns the base g.
BigInteger | RSAPrivateKeySpec.getModulus() Returns the modulus.
BigInteger | RSAPrivateKeySpec.getPrivateExponent() Returns the private exponent.
BigInteger | RSAPrivateCrtKeySpec.getPublicExponent() Returns the public exponent.
BigInteger | RSAPrivateCrtKeySpec.getPrimeP() Returns the primeP.
BigInteger | RSAPrivateCrtKeySpec.getPrimeQ() Returns the primeQ.
BigInteger | RSAPrivateCrtKeySpec.getPrimeExponentP() Returns the primeExponentP.
BigInteger | RSAPrivateCrtKeySpec.getPrimeExponentQ() Returns the primeExponentQ.
BigInteger | RSAPrivateCrtKeySpec.getCrtCoefficient() Returns the crtCoefficient.
BigInteger | RSAKeyGenParameterSpec.getPublicExponent() Returns the public-exponent value.
BigInteger | RSAPublicKeySpec.getModulus() Returns the modulus.
BigInteger | RSAPublicKeySpec.getPublicExponent() Returns the public exponent.
BigInteger | DSAPublicKeySpec.getY() Returns the public key y.
BigInteger | DSAPublicKeySpec.getP() Returns the prime p.
BigInteger | DSAPublicKeySpec.getQ() Returns the sub-prime q.
BigInteger | DSAPublicKeySpec.getG() Returns the base g.
BigInteger | DSAParameterSpec.getP() Returns the prime p.
BigInteger | DSAParameterSpec.getQ() Returns the sub-prime q.
BigInteger | DSAParameterSpec.getG() Returns the base g.

Constructors in java.security.spec with parameters of type BigInteger
DSAPrivateKeySpec(BigInteger x, BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAPrivateKeySpec with the specified parameter values.
RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent)
RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient)
Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.
RSAKeyGenParameterSpec(int keysize, BigInteger publicExponent)
Constructs a new RSAParameterSpec object from the given keysize and public-exponent value.
RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent)
DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAPublicKeySpec with the specified parameter values.
DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAParameterSpec with the specified parameter values.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


java.net Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.net

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.net.Authenticator
    • class java.lang.ClassLoader
      • class java.security.SecureClassLoader
        • class java.net.URLClassLoader
    • class java.net.ContentHandler
    • class java.net.DatagramPacket
    • class java.net.DatagramSocket
      • class java.net.MulticastSocket
    • class java.net.DatagramSocketImpl (implements java.net.SocketOptions)
    • class java.net.InetAddress (implements java.io.Serializable)
    • class java.net.PasswordAuthentication
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.net.NetPermission
      • class java.net.SocketPermission (implements java.io.Serializable)
    • class java.net.ServerSocket
    • class java.net.Socket
    • class java.net.SocketImpl (implements java.net.SocketOptions)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.io.IOException
          • class java.net.MalformedURLException
          • class java.net.ProtocolException
          • class java.net.SocketException
            • class java.net.BindException
            • class java.net.ConnectException
            • class java.net.NoRouteToHostException
          • class java.net.UnknownHostException
          • class java.net.UnknownServiceException
    • class java.net.URL (implements java.io.Serializable)
    • class java.net.URLConnection
      • class java.net.HttpURLConnection
      • class java.net.JarURLConnection
    • class java.net.URLDecoder
    • class java.net.URLEncoder
    • class java.net.URLStreamHandler

Interface Hierarchy

  • interface java.net.ContentHandlerFactory
  • interface java.net.DatagramSocketImplFactory
  • interface java.net.FileNameMap
  • interface java.net.SocketImplFactory
  • interface java.net.SocketOptions
  • interface java.net.URLStreamHandlerFactory
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.net

Provides the classes for implementing networking applications.

See:
Description

Interface Summary
ContentHandlerFactory | This interface defines a factory for content handlers.
DatagramSocketImplFactory | This interface defines a factory for datagram socket implementations.
FileNameMap | A simple interface which provides a mechanism to map between a file name and a MIME type string.
SocketImplFactory | This interface defines a factory for socket implementations.
SocketOptions | Interface of methods to get/set socket options.
URLStreamHandlerFactory | This interface defines a factory for URL stream protocol handlers.

Class Summary
Authenticator | The class Authenticator represents an object that knows how to obtain authentication for a network connection.
ContentHandler | The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
DatagramPacket | This class represents a datagram packet.
DatagramSocket | This class represents a socket for sending and receiving datagram packets.
DatagramSocketImpl | Abstract datagram and multicast socket implementation base class.
HttpURLConnection | A URLConnection with support for HTTP-specific features.
InetAddress | This class represents an Internet Protocol (IP) address.
JarURLConnection | A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
MulticastSocket | The multicast datagram socket class is useful for sending and receiving IP multicast packets.
NetPermission | This class is for various network permissions.
PasswordAuthentication | The class PasswordAuthentication is a data holder that is used by Authenticator.
ServerSocket | This class implements server sockets.
Socket | This class implements client sockets (also called just "sockets").
SocketImpl | The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
SocketPermission | This class represents access to a network via sockets.
URL | Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
URLClassLoader | This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
URLConnection | The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
URLDecoder | The class contains a utility method for converting from a MIME format called "x-www-form-urlencoded" to a String
URLEncoder | The class contains a utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.
URLStreamHandler | The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.

Exception Summary
BindException | Signals that an error occurred while attempting to bind a socket to a local address and port.
ConnectException | Signals that an error occurred while attempting to connect a socket to a remote address and port.
MalformedURLException | Thrown to indicate that a malformed URL has occurred.
NoRouteToHostException | Signals that an error occurred while attempting to connect a socket to a remote address and port.
ProtocolException | Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
SocketException | Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
UnknownHostException | Thrown to indicate that the IP address of a host could not be determined.
UnknownServiceException | Thrown to indicate that an unknown service exception has occurred.

Package java.net Description

Provides the classes for implementing networking applications. Using the socket classes, you can communicate with any server on the Internet or implement your own Internet server. A number of classes are provided to make it convenient to use Universal Resource Locators (URLs) to retrieve data on the Internet.

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.net

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.net

Packages that use java.net
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Classes in java.net used by java.applet
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.awt
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.beans.beancontext
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.io
MalformedURLException
Thrown to indicate that a malformed URL has occurred.
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.lang
InetAddress
This class represents an Internet Protocol (IP) address.
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.net
Authenticator
The class Authenticator represents an object that knows how to obtain authentication for a network connection.
ContentHandler
The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.
ContentHandlerFactory
This interface defines a factory for content handlers.
DatagramPacket
This class represents a datagram packet.
DatagramSocket
This class represents a socket for sending and receiving datagram packets.
DatagramSocketImpl
Abstract datagram and multicast socket implementation base class.
DatagramSocketImplFactory
This interface defines a factory for datagram socket implementations.
FileNameMap
A simple interface which provides a mechanism to map between a file name and a MIME type string.
InetAddress
This class represents an Internet Protocol (IP) address.
MalformedURLException
Thrown to indicate that a malformed URL has occurred.
PasswordAuthentication
The class PasswordAuthentication is a data holder that is used by Authenticator.
ProtocolException
Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
Socket
This class implements client sockets (also called just "sockets").
SocketException
Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
SocketImpl
The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
SocketImplFactory
This interface defines a factory for socket implementations.
SocketOptions
Interface of methods to get/set socket options.
UnknownHostException
Thrown to indicate that the IP address of a host could not be determined.
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.
URLClassLoader
This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
URLConnection
The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
URLStreamHandler
The abstract class URLStreamHandler is the common superclass for all stream protocol handlers.
URLStreamHandlerFactory
This interface defines a factory for URL stream protocol handlers.

Classes in java.net used by java.rmi
MalformedURLException
Thrown to indicate that a malformed URL has occurred.

Classes in java.net used by java.rmi.server
MalformedURLException
Thrown to indicate that a malformed URL has occurred.
ServerSocket
This class implements server sockets.
Socket
This class implements client sockets (also called just "sockets").
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by java.security
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.sound.midi
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.sound.midi.spi
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.sound.sampled
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.sound.sampled.spi
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.swing
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.swing.event
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Classes in java.net used by javax.swing.text.html
URL
Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Authenticator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Class Authenticator

java.lang.Object
  |
  +--java.net.Authenticator
public abstract class Authenticator
extends Object

The class Authenticator represents an object that knows how to obtain authentication for a network connection. Usually, it will do this by prompting the user for information.

Applications use this class by creating a subclass, and registering an instance of that subclass with the system with setDefault(). When authentication is required, the system will invoke a method on the subclass (like getPasswordAuthentication). The subclass's method can query about the authentication being requested with a number of inherited methods (getRequestingXXX()), and form an appropriate message for the user.

All methods that request authentication have a default implementation that fails.

Since:
1.2
See Also:
setDefault(java.net.Authenticator), getPasswordAuthentication()

Constructor Summary
Authenticator()
Method Summary
protected PasswordAuthentication | getPasswordAuthentication() Called when password authorization is needed.
protected int | getRequestingPort() Gets the port number for the requested connection.
protected String | getRequestingPrompt() Gets the prompt string given by the requestor.
protected String | getRequestingProtocol() Give the protocol that's requesting the connection.
protected String | getRequestingScheme() Gets the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).
protected InetAddress | getRequestingSite() Gets the InetAddress of the site requesting authorization, or null if not available.
static PasswordAuthentication | requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) Ask the authenticator that has been registered with the system for a password.
static void | setDefault(Authenticator a) Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authenticator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Authenticator

public Authenticator()
Method Detail

setDefault

public static void setDefault(Authenticator a)
Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authenticator. If an Authenticator has already been established as the current authenticator, no action will be taken. If the argument is null and no authenticator has been established, then no action is taken and the method simply returns.

First, if there is a security manager, its checkPermission method is called with a NetPermission("setDefaultAuthenticator") permission. This may result in a java.lang.SecurityException.

Typically, this method will be called exactly once, at system startup.

Parameters:
a - The authenticator
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow setting the default authenticator.
See Also:
SecurityManager.checkPermission(java.security.Permission), NetPermission

requestPasswordAuthentication

public static PasswordAuthentication requestPasswordAuthentication(InetAddress addr,
                                                                   int port,
                                                                   String protocol,
                                                                   String prompt,
                                                                   String scheme)
Ask the authenticator that has been registered with the system for a password.

First, if there is a security manager, its checkPermission method is called with a NetPermission("requestPasswordAuthentication") permission. This may result in a java.lang.SecurityException.

Parameters:
addr - The InetAddress of the site requesting authorization, or null if not known.
port - the port for the requested connection
protocol - The protocol that's requesting the connection (java.net.Authenticator#getProtocol())
prompt - A prompt string for the user
scheme - The authentication scheme
Returns:
The username/password, or null if one can't be gotten.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow the password authentication request.
See Also:
SecurityManager.checkPermission(java.security.Permission), NetPermission

getRequestingSite

protected final InetAddress getRequestingSite()
Gets the InetAddress of the site requesting authorization, or null if not available.
Returns:
the InetAddress of the site requesting authorization, or null if it's not available.

getRequestingPort

protected final int getRequestingPort()
Gets the port number for the requested connection.
Returns:
an int indicating the port for the requested connection.

getRequestingProtocol

protected final String getRequestingProtocol()
Give the protocol that's requesting the connection. Often this will be based on a URL, but in a future SDK it could be, for example, "SOCKS" for a password-protected SOCKS5 firewall.
Returns:
the protcol, optionally followed by "/version", where version is a version number.
See Also:
URL.getProtocol()

getRequestingPrompt

protected final String getRequestingPrompt()
Gets the prompt string given by the requestor.
Returns:
the prompt string given by the requestor (realm for http requests)

getRequestingScheme

protected final String getRequestingScheme()
Gets the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).
Returns:
the scheme of the requestor

getPasswordAuthentication

protected PasswordAuthentication getPasswordAuthentication()
Called when password authorization is needed. Subclasses should override the default implementation, which returns null.
Returns:
The PasswordAuthentication collected from the user, or null if none is provided.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BindException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Class BindException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.SocketException
                          |
                          +--java.net.BindException
All Implemented Interfaces:
Serializable
public class BindException
extends SocketException

Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
BindException()
Construct a new BindException with no detailed message.
BindException(String msg)
Constructs a new BindException with the specified detail message as to why the bind error occurred.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BindException

public BindException(String msg)
Constructs a new BindException with the specified detail message as to why the bind error occurred. A detail message is a String that gives a specific description of this error.
Parameters:
msg - the detail message

BindException

public BindException()
Construct a new BindException with no detailed message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.net.BindException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.BindException

No usage of java.net.BindException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.ConnectException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.ConnectException

No usage of java.net.ConnectException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.HttpURLConnection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.HttpURLConnection

No usage of java.net.HttpURLConnection

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.JarURLConnection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.JarURLConnection

No usage of java.net.JarURLConnection

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.MulticastSocket

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.MulticastSocket

No usage of java.net.MulticastSocket

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.NetPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.NetPermission

No usage of java.net.NetPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.NoRouteToHostException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.NoRouteToHostException

No usage of java.net.NoRouteToHostException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.SocketPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.SocketPermission

No usage of java.net.SocketPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.UnknownServiceException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.UnknownServiceException

No usage of java.net.UnknownServiceException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URLDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URLDecoder

No usage of java.net.URLDecoder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URLEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URLEncoder

No usage of java.net.URLEncoder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.Authenticator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.Authenticator

Packages that use Authenticator
java.net Provides the classes for implementing networking applications.

Uses of Authenticator in java.net

Methods in java.net with parameters of type Authenticator
static void Authenticator.setDefault(Authenticator a)
Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authenticator.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.ContentHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.ContentHandler

Packages that use ContentHandler
java.net Provides the classes for implementing networking applications.

Uses of ContentHandler in java.net

Methods in java.net that return ContentHandler
 ContentHandler ContentHandlerFactory.createContentHandler(String mimetype)
Creates a new ContentHandler to read an object from a URLStreamHandler.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.DatagramPacket

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.DatagramPacket

Packages that use DatagramPacket
java.net Provides the classes for implementing networking applications.

Uses of DatagramPacket in java.net

Methods in java.net with parameters of type DatagramPacket
void | DatagramSocket.send(DatagramPacket p) Sends a datagram packet from this socket.
void | DatagramSocket.receive(DatagramPacket p) Receives a datagram packet from this socket.
void | MulticastSocket.send(DatagramPacket p, byte ttl) Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket.
protected abstract void | DatagramSocketImpl.send(DatagramPacket p) Sends a datagram packet.
protected abstract void | DatagramSocketImpl.receive(DatagramPacket p) Receive the datagram packet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.DatagramSocket

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.DatagramSocket

Packages that use DatagramSocket
java.net Provides the classes for implementing networking applications.

Uses of DatagramSocket in java.net

Subclasses of DatagramSocket in java.net
 class MulticastSocket
The multicast datagram socket class is useful for sending and receiving IP multicast packets.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.DatagramSocketImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.DatagramSocketImpl

Packages that use DatagramSocketImpl
java.net Provides the classes for implementing networking applications.

Uses of DatagramSocketImpl in java.net

Methods in java.net that return DatagramSocketImpl
 DatagramSocketImpl DatagramSocketImplFactory.createDatagramSocketImpl()
Creates a new DatagramSocketImpl instance.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.InetAddress

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.InetAddress

Packages that use InetAddress
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.

Uses of InetAddress in java.lang

Methods in java.lang with parameters of type InetAddress
void | SecurityManager.checkMulticast(InetAddress maddr) Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
void | SecurityManager.checkMulticast(InetAddress maddr, byte ttl) Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.

Uses of InetAddress in java.net

Fields in java.net declared as InetAddress
protected  InetAddress SocketImpl.address
The IP address of the remote end of this socket.

Methods in java.net that return InetAddress
InetAddress | DatagramSocket.getInetAddress() Returns the address to which this socket is connected.
InetAddress | DatagramSocket.getLocalAddress() Gets the local address to which the socket is bound.
protected InetAddress | SocketImpl.getInetAddress() Returns the value of this socket's address field.
InetAddress | Socket.getInetAddress() Returns the address to which the socket is connected.
InetAddress | Socket.getLocalAddress() Gets the local address to which the socket is bound.
InetAddress | MulticastSocket.getInterface() Retrieve the address of the network interface used for multicast packets.
InetAddress | ServerSocket.getInetAddress() Returns the local address of this server socket.
protected InetAddress | URLStreamHandler.getHostAddress(URL u) Get the IP address of our host.
static InetAddress | InetAddress.getByName(String host) Determines the IP address of a host, given the host's name.
static InetAddress[] | InetAddress.getAllByName(String host) Determines all the IP addresses of a host, given the host's name.
static InetAddress | InetAddress.getLocalHost() Returns the local host.
InetAddress | DatagramPacket.getAddress() Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
protected InetAddress | Authenticator.getRequestingSite() Gets the InetAddress of the site requesting authorization, or null if not available.

Methods in java.net with parameters of type InetAddress
void | DatagramSocket.connect(InetAddress address, int port) Connects the socket to a remote address for this socket.
protected abstract void | SocketImpl.connect(InetAddress address, int port) Connects this socket to the specified port number on the specified host.
protected abstract void | SocketImpl.bind(InetAddress host, int port) Binds this socket to the specified port number on the specified host.
void | MulticastSocket.joinGroup(InetAddress mcastaddr) Joins a multicast group.Its behavior may be affected by setInterface.
void | MulticastSocket.leaveGroup(InetAddress mcastaddr) Leave a multicast group.
void | MulticastSocket.setInterface(InetAddress inf) Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface.
protected abstract void | DatagramSocketImpl.bind(int lport, InetAddress laddr) Binds a datagram socket to a local port and address.
protected abstract int | DatagramSocketImpl.peek(InetAddress i) Peek at the packet to see who it is from.
protected abstract void | DatagramSocketImpl.join(InetAddress inetaddr) Join the multicast group.
protected abstract void | DatagramSocketImpl.leave(InetAddress inetaddr) Leave the multicast group.
void | DatagramPacket.setAddress(InetAddress iaddr) Sets the IP address of the machine to which this datagram is being sent.
static PasswordAuthentication | Authenticator.requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) Ask the authenticator that has been registered with the system for a password.

Constructors in java.net with parameters of type InetAddress
DatagramSocket(int port, InetAddress laddr)
Creates a datagram socket, bound to the specified local address.
Socket(InetAddress address, int port)
Creates a stream socket and connects it to the specified port number at the specified IP address.
Socket(String host, int port, InetAddress localAddr, int localPort)
Creates a socket and connects it to the specified remote host on the specified remote port.
Socket(InetAddress address, int port, InetAddress localAddr, int localPort)
Creates a socket and connects it to the specified remote address on the specified remote port.
Socket(InetAddress host, int port, boolean stream)
Deprecated. Use DatagramSocket instead for UDP transport.
ServerSocket(int port, int backlog, InetAddress bindAddr)
Create a server with the specified port, listen backlog, and local IP address to bind to.
DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port)
Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host.
DatagramPacket(byte[] buf, int length, InetAddress address, int port)
Constructs a datagram packet for sending packets of length length to the specified port number on the specified host.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.MalformedURLException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.MalformedURLException

Packages that use MalformedURLException
java.io | Provides for system input and output through data streams, serialization and the file system.
java.net | Provides the classes for implementing networking applications.
java.rmi | Provides the RMI package.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of MalformedURLException in java.io

Methods in java.io that throw MalformedURLException
 URL File.toURL()
Converts this abstract pathname into a file: URL.

Uses of MalformedURLException in java.net

Constructors in java.net that throw MalformedURLException
JarURLConnection(URL url)
Creates the new JarURLConnection to the specified URL.
URL(String protocol, String host, int port, String file)
Creates a URL object from the specified protocol, host, port number, and file.
URL(String protocol, String host, String file)
Creates a URL from the specified protocol name, host name, and file name.
URL(String protocol, String host, int port, String file, URLStreamHandler handler)
Creates a URL object from the specified protocol, host, port number, file, and handler.
URL(String spec)
Creates a URL object from the String representation.
URL(URL context, String spec)
Creates a URL by parsing the given spec within a specified context.
URL(URL context, String spec, URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.

Uses of MalformedURLException in java.rmi

Methods in java.rmi that throw MalformedURLException
static Remote | Naming.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
static void | Naming.bind(String name, Remote obj) Binds the specified name to a remote object.
static void | Naming.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
static void | Naming.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
static String[] | Naming.list(String name) Returns an array of the names bound in the registry.

Uses of MalformedURLException in java.rmi.server

Methods in java.rmi.server that throw MalformedURLException
static Class RMIClassLoader.loadClass(String name)
Deprecated. replaced by loadClass(String,String) method
static Class RMIClassLoader.loadClass(URL codebase, String name)
Loads a class from a codebase URL.
static Class RMIClassLoader.loadClass(String codebase, String name)
Loads a class from a codebase URL path.
static ClassLoader RMIClassLoader.getClassLoader(String codebase)
Returns a class loader that loads classes from the given codebase URL path.
 Class LoaderHandler.loadClass(String name)
Deprecated. no replacement
 Class LoaderHandler.loadClass(URL codebase, String name)
Deprecated. no replacement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.PasswordAuthentication

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.PasswordAuthentication

Packages that use PasswordAuthentication
java.net Provides the classes for implementing networking applications.

Uses of PasswordAuthentication in java.net

Methods in java.net that return PasswordAuthentication
static PasswordAuthentication | Authenticator.requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) Ask the authenticator that has been registered with the system for a password.
protected PasswordAuthentication | Authenticator.getPasswordAuthentication() Called when password authorization is needed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.ProtocolException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.ProtocolException

Packages that use ProtocolException
java.net Provides the classes for implementing networking applications.

Uses of ProtocolException in java.net

Methods in java.net that throw ProtocolException
 void HttpURLConnection.setRequestMethod(String method)
Set the method for the URL request, one of: GET POST HEAD OPTIONS PUT DELETE TRACE are legal, subject to protocol restrictions.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.ServerSocket

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.ServerSocket

Packages that use ServerSocket
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of ServerSocket in java.rmi.server

Methods in java.rmi.server that return ServerSocket
ServerSocket | RMIServerSocketFactory.createServerSocket(int port) Create a server socket on the specified port (port 0 indicates an anonymous port).
abstract ServerSocket | RMISocketFactory.createServerSocket(int port) Create a server socket on the specified port (port 0 indicates an anonymous port).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.Socket

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.Socket

Packages that use Socket
java.net | Provides the classes for implementing networking applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of Socket in java.net

Methods in java.net that return Socket
 Socket ServerSocket.accept()
Listens for a connection to be made to this socket and accepts it.

Methods in java.net with parameters of type Socket
protected  void ServerSocket.implAccept(Socket s)
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.

Uses of Socket in java.rmi.server

Methods in java.rmi.server that return Socket
Socket | RMIClientSocketFactory.createSocket(String host, int port) Create a client socket connected to the specified host and port.
abstract Socket | RMISocketFactory.createSocket(String host, int port) Creates a client socket connected to the specified host and port.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.SocketException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.SocketException

Packages that use SocketException
java.net Provides the classes for implementing networking applications.

Uses of SocketException in java.net

Subclasses of SocketException in java.net
class | BindException Signals that an error occurred while attempting to bind a socket to a local address and port.
class | ConnectException Signals that an error occurred while attempting to connect a socket to a remote address and port.
class | NoRouteToHostException Signals that an error occurred while attempting to connect a socket to a remote address and port.

Methods in java.net that throw SocketException
void | DatagramSocket.setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
int | DatagramSocket.getSoTimeout() Retrive setting for SO_TIMEOUT.
void | DatagramSocket.setSendBufferSize(int size) Sets the SO_SNDBUF option to the specified value for this DatagramSocket.
int | DatagramSocket.getSendBufferSize() Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.
void | DatagramSocket.setReceiveBufferSize(int size) Sets the SO_RCVBUF option to the specified value for this DatagramSocket.
int | DatagramSocket.getReceiveBufferSize() Get value of the SO_RCVBUF option for this DatagramSocket, that is the buffer size used by the platform for input on this DatagramSocket.
void | Socket.setTcpNoDelay(boolean on) Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
boolean | Socket.getTcpNoDelay() Tests if TCP_NODELAY is enabled.
void | Socket.setSoLinger(boolean on, int linger) Enable/disable SO_LINGER with the specified linger time in seconds.
int | Socket.getSoLinger() Returns setting for SO_LINGER.
void | Socket.setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
int | Socket.getSoTimeout() Returns setting for SO_TIMEOUT.
void | Socket.setSendBufferSize(int size) Sets the SO_SNDBUF option to the specified value for this Socket.
int | Socket.getSendBufferSize() Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket.
void | Socket.setReceiveBufferSize(int size) Sets the SO_RCVBUF option to the specified value for this Socket.
int | Socket.getReceiveBufferSize() Gets the value of the SO_RCVBUF option for this Socket, that is the buffer size used by the platform for input on this Socket.
void | Socket.setKeepAlive(boolean on) Enable/disable SO_KEEPALIVE.
boolean | Socket.getKeepAlive() Tests if SO_KEEPALIVE is enabled.
void | MulticastSocket.setInterface(InetAddress inf) Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface.
InetAddress | MulticastSocket.getInterface() Retrieve the address of the network interface used for multicast packets.
void | ServerSocket.setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
protected abstract void | DatagramSocketImpl.create() Creates a datagram socket.
protected abstract void | DatagramSocketImpl.bind(int lport, InetAddress laddr) Binds a datagram socket to a local port and address.
void | SocketOptions.setOption(int optID, Object value) Enable/disable the option specified by optID.
Object | SocketOptions.getOption(int optID) Fetch the value of an option.

Constructors in java.net that throw SocketException
DatagramSocket()
Constructs a datagram socket and binds it to any available port on the local host machine.
DatagramSocket(int port)
Constructs a datagram socket and binds it to the specified port on the local host machine.
DatagramSocket(int port, InetAddress laddr)
Creates a datagram socket, bound to the specified local address.
Socket(SocketImpl impl)
Creates an unconnected Socket with a user-specified SocketImpl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.SocketImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.SocketImpl

Packages that use SocketImpl
java.net Provides the classes for implementing networking applications.

Uses of SocketImpl in java.net

Methods in java.net that return SocketImpl
 SocketImpl SocketImplFactory.createSocketImpl()
Creates a new SocketImpl instance.

Methods in java.net with parameters of type SocketImpl
protected abstract  void SocketImpl.accept(SocketImpl s)
Accepts a connection.

Constructors in java.net with parameters of type SocketImpl
Socket(SocketImpl impl)
Creates an unconnected Socket with a user-specified SocketImpl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.UnknownHostException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.UnknownHostException

Packages that use UnknownHostException
java.net Provides the classes for implementing networking applications.

Uses of UnknownHostException in java.net

Methods in java.net that throw UnknownHostException
static InetAddress | InetAddress.getByName(String host) Determines the IP address of a host, given the host's name.
static InetAddress[] | InetAddress.getAllByName(String host) Determines all the IP addresses of a host, given the host's name.
static InetAddress | InetAddress.getLocalHost() Returns the local host.

Constructors in java.net that throw UnknownHostException
Socket(String host, int port)
Creates a stream socket and connects it to the specified port number on the named host.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URL

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URL

Packages that use URL
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
java.security | Provides the classes and interfaces for the security framework.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of URL in java.applet

Methods in java.applet that return URL
URL | Applet.getDocumentBase() Returns an absolute URL naming the directory of the document in which the applet is embedded.
URL | Applet.getCodeBase() Gets the base URL.
URL | AppletStub.getDocumentBase() Returns an absolute URL naming the directory of the document in which the applet is embedded.
URL | AppletStub.getCodeBase() Gets the base URL.

Methods in java.applet with parameters of type URL
AudioClip | AppletContext.getAudioClip(URL url) Creates an audio clip.
Image | AppletContext.getImage(URL url) Returns an Image object that can then be painted on the screen.
void | AppletContext.showDocument(URL url) Replaces the Web page currently being viewed with the given URL.
void | AppletContext.showDocument(URL url, String target) Requests that the browser or applet viewer show the Web page indicated by the url argument.
Image | Applet.getImage(URL url) Returns an Image object that can then be painted on the screen.
Image | Applet.getImage(URL url, String name) Returns an Image object that can then be painted on the screen.
static AudioClip | Applet.newAudioClip(URL url) Get an audio clip from the given URL.
AudioClip | Applet.getAudioClip(URL url) Returns the AudioClip object specified by the URL argument.
AudioClip | Applet.getAudioClip(URL url, String name) Returns the AudioClip object specified by the URL and name arguments.
void | Applet.play(URL url) Plays the audio clip at the specified absolute URL.
void | Applet.play(URL url, String name) Plays the audio clip given the URL and a specifier that is relative to it.

Uses of URL in java.awt

Methods in java.awt with parameters of type URL
abstract Image | Toolkit.getImage(URL url) Returns an image which gets pixel data from the specified URL.
abstract Image | Toolkit.createImage(URL url) Returns an image which gets pixel data from the specified URL.

Uses of URL in java.beans.beancontext

Methods in java.beans.beancontext that return URL
 URL BeanContextSupport.getResource(String name, BeanContextChild bcc)
 URL BeanContext.getResource(String name, BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Uses of URL in java.io

Methods in java.io that return URL
 URL File.toURL()
Converts this abstract pathname into a file: URL.

Uses of URL in java.lang

Methods in java.lang that return URL
URL | ClassLoader.getResource(String name) Finds the resource with the given name.
protected URL | ClassLoader.findResource(String name) Finds the resource with the given name.
static URL | ClassLoader.getSystemResource(String name) Find a resource of the specified name from the search path used to load classes.
URL | Class.getResource(String name) Finds a resource with a given name.

Methods in java.lang with parameters of type URL
boolean | Package.isSealed(URL url) Returns true if this package is sealed with respect to the specified code source url.
protected Package | ClassLoader.definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) Defines a package by name in this ClassLoader.

Uses of URL in java.net

Fields in java.net declared as URL
protected  URL URLConnection.url
The URL represents the remote object on the World Wide Web to which this connection is opened.

Methods in java.net that return URL
URL[] | URLClassLoader.getURLs() Returns the search path of URLs for loading classes and resources.
URL | URLClassLoader.findResource(String name) Finds the resource with the specified name on the URL search path.
URL | URLConnection.getURL() Returns the value of this URLConnection's URL field.
URL | JarURLConnection.getJarFileURL() Returns the URL for the Jar file for this connection.

Methods in java.net with parameters of type URL
protected  void URLClassLoader.addURL(URL url)
Appends the specified URL to the list of URLs to search for classes and resources.
protected  Package URLClassLoader.definePackage(String name, Manifest man, URL url)
Defines a new package by name in this ClassLoader.
static URLClassLoader URLClassLoader.newInstance(URL[] urls, ClassLoader parent)
Creates a new instance of URLClassLoader for the specified URLs and parent class loader.
static URLClassLoader URLClassLoader.newInstance(URL[] urls)
Creates a new instance of URLClassLoader for the specified URLs and default parent class loader.
 boolean URL.sameFile(URL other)
Compares two URLs, excluding the "ref" fields.
protected abstract  URLConnection URLStreamHandler.openConnection(URL u)
Opens a connection to the object referenced by the URL argument.
protected  void URLStreamHandler.parseURL(URL u, String spec, int start, int limit)
Parses the string representation of a URL into a URL object.
protected  boolean URLStreamHandler.equals(URL u1, URL u2)
Provides the default equals calculation.
protected  int URLStreamHandler.hashCode(URL u)
Provides the default hash calculation.
protected  boolean URLStreamHandler.sameFile(URL u1, URL u2)
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path.
protected  InetAddress URLStreamHandler.getHostAddress(URL u)
Get the IP address of our host.
protected  boolean URLStreamHandler.hostsEqual(URL u1, URL u2)
Compares the host components of two URLs.
protected  String URLStreamHandler.toExternalForm(URL u)
Converts a URL of a specific protocol to a String.
protected  void URLStreamHandler.setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)
Sets the fields of the URL argument to the indicated values.
protected  void URLStreamHandler.setURL(URL u, String protocol, String host, int port, String file, String ref)
Deprecated. Use setURL(URL, String, String, int, String, String, String, String);

Constructors in java.net with parameters of type URL
URLClassLoader(URL[] urls, ClassLoader parent)
Constructs a new URLClassLoader for the given URLs.
URLClassLoader(URL[] urls)
Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader.
URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.
URLConnection(URL url)
Constructs a URL connection to the specified URL.
JarURLConnection(URL url)
Creates the new JarURLConnection to the specified URL.
URL(URL context, String spec)
Creates a URL by parsing the given spec within a specified context.
URL(URL context, String spec, URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.
HttpURLConnection(URL u)
Constructor for the URLStreamHandler.

Uses of URL in java.rmi.server

Methods in java.rmi.server with parameters of type URL
static Class | RMIClassLoader.loadClass(URL codebase, String name) Loads a class from a codebase URL.
Class | LoaderHandler.loadClass(URL codebase, String name) Deprecated. no replacement

Uses of URL in java.security

Methods in java.security that return URL
 URL CodeSource.getLocation()
Returns the location associated with this CodeSource.

Constructors in java.security with parameters of type URL
CodeSource(URL url, Certificate[] certs)
Constructs a CodeSource and associates it with the specified location and set of certificates.

Uses of URL in javax.sound.midi

Methods in javax.sound.midi with parameters of type URL
static Soundbank | MidiSystem.getSoundbank(URL url) Constructs a Soundbank by reading it from the specified URL.
static MidiFileFormat | MidiSystem.getMidiFileFormat(URL url) Obtains the MIDI file format of the data in the specified URL.
static Sequence | MidiSystem.getSequence(URL url) Obtains a MIDI sequence from the specified URL.

Uses of URL in javax.sound.midi.spi

Methods in javax.sound.midi.spi with parameters of type URL
abstract Soundbank | SoundbankReader.getSoundbank(URL url) Obtains a soundbank object from the URL provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(URL url) Obtains the MIDI file format of the URL provided.
abstract Sequence | MidiFileReader.getSequence(URL url) Obtains a MIDI sequence from the URL provided.

Uses of URL in javax.sound.sampled

Methods in javax.sound.sampled with parameters of type URL
static AudioFileFormat | AudioSystem.getAudioFileFormat(URL url) Obtains the audio file format of the specified URL.
static AudioInputStream | AudioSystem.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.

Uses of URL in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi with parameters of type URL
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(URL url) Obtains the audio file format of the URL provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.

Uses of URL in javax.swing

Methods in javax.swing that return URL
 URL JEditorPane.getPage()
Gets the current URL being displayed.

Methods in javax.swing with parameters of type URL
void | JEditorPane.setPage(URL page) Sets the current URL being displayed.
protected InputStream | JEditorPane.getStream(URL page) Fetches a stream for the given URL, which is about to be loaded by the setPage method.

Constructors in javax.swing with parameters of type URL
JEditorPane(URL initialPage)
Creates a JEditorPane based on a specified URL for input.
ImageIcon(URL location, String description)
Creates an ImageIcon from the specified URL.
ImageIcon(URL location)
Creates an ImageIcon from the specified URL.

Uses of URL in javax.swing.event

Methods in javax.swing.event that return URL
 URL HyperlinkEvent.getURL()
Gets the URL that the link refers to.

Constructors in javax.swing.event with parameters of type URL
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u)
Creates a new object representing a hypertext link event.
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc)
Creates a new object representing a hypertext link event.

Uses of URL in javax.swing.text.html

Methods in javax.swing.text.html that return URL
URL | StyleSheet.getBase() Returns the base.
URL | HTMLDocument.getBase() Gets the location to resolve relative URLs against.

Methods in javax.swing.text.html with parameters of type URL
void | StyleSheet.loadRules(Reader in, URL ref) Loads a set of rules that have been specified in terms of CSS1 grammar.
void | StyleSheet.importStyleSheet(URL url) Imports a style sheet from url.
void | StyleSheet.setBase(URL base) Sets the base.
void | HTMLDocument.setBase(URL u) Sets the location to resolve relative URLs against.

Constructors in javax.swing.text.html with parameters of type URL
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String targetFrame)
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URLClassLoader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URLClassLoader

Packages that use URLClassLoader
java.net Provides the classes for implementing networking applications.

Uses of URLClassLoader in java.net

Methods in java.net that return URLClassLoader
static URLClassLoader | URLClassLoader.newInstance(URL[] urls, ClassLoader parent) Creates a new instance of URLClassLoader for the specified URLs and parent class loader.
static URLClassLoader | URLClassLoader.newInstance(URL[] urls) Creates a new instance of URLClassLoader for the specified URLs and default parent class loader.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URLConnection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URLConnection

Packages that use URLConnection
java.net Provides the classes for implementing networking applications.

Uses of URLConnection in java.net

Subclasses of URLConnection in java.net
class | HttpURLConnection A URLConnection with support for HTTP-specific features.
class | JarURLConnection A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.

Fields in java.net declared as URLConnection
protected  URLConnection JarURLConnection.jarFileURLConnection
The connection to the JAR file URL, if the connection has been initiated.

Methods in java.net that return URLConnection
URLConnection | URL.openConnection() Returns a URLConnection object that represents a connection to the remote object referred to by the URL.
protected abstract URLConnection | URLStreamHandler.openConnection(URL u) Opens a connection to the object referenced by the URL argument.

Methods in java.net with parameters of type URLConnection
abstract Object | ContentHandler.getContent(URLConnection urlc) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
Object | ContentHandler.getContent(URLConnection urlc, Class[] classes) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.net.URLStreamHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.net.URLStreamHandler

Packages that use URLStreamHandler
java.net Provides the classes for implementing networking applications.

Uses of URLStreamHandler in java.net

Methods in java.net that return URLStreamHandler
 URLStreamHandler URLStreamHandlerFactory.createURLStreamHandler(String protocol)
Creates a new URLStreamHandler instance with the specified protocol.

Constructors in java.net with parameters of type URLStreamHandler
URL(String protocol, String host, int port, String file, URLStreamHandler handler)
Creates a URL object from the specified protocol, host, port number, file, and handler.
URL(URL context, String spec, URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.ContentHandlerFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.ContentHandlerFactory

Packages that use ContentHandlerFactory
java.net Provides the classes for implementing networking applications.

Uses of ContentHandlerFactory in java.net

Methods in java.net with parameters of type ContentHandlerFactory
static void URLConnection.setContentHandlerFactory(ContentHandlerFactory fac)
Sets the ContentHandlerFactory of an application.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.DatagramSocketImplFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.DatagramSocketImplFactory

Packages that use DatagramSocketImplFactory
java.net Provides the classes for implementing networking applications.

Uses of DatagramSocketImplFactory in java.net

Methods in java.net with parameters of type DatagramSocketImplFactory
static void DatagramSocket.setDatagramSocketImplFactory(DatagramSocketImplFactory fac)
Sets the datagram socket implementation factory for the application.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.FileNameMap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.FileNameMap

Packages that use FileNameMap
java.net Provides the classes for implementing networking applications.

Uses of FileNameMap in java.net

Methods in java.net that return FileNameMap
static FileNameMap URLConnection.getFileNameMap()
Loads filename map (a mimetable) from a data file.

Methods in java.net with parameters of type FileNameMap
static void URLConnection.setFileNameMap(FileNameMap map)
Sets the FileNameMap.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.SocketImplFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.SocketImplFactory

Packages that use SocketImplFactory
java.net Provides the classes for implementing networking applications.

Uses of SocketImplFactory in java.net

Methods in java.net with parameters of type SocketImplFactory
static void | Socket.setSocketImplFactory(SocketImplFactory fac) Sets the client socket implementation factory for the application.
static void | ServerSocket.setSocketFactory(SocketImplFactory fac) Sets the server socket implementation factory for the application.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.SocketOptions

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.SocketOptions

Packages that use SocketOptions
java.net Provides the classes for implementing networking applications.

Uses of SocketOptions in java.net

Classes in java.net that implement SocketOptions
class | DatagramSocketImpl Abstract datagram and multicast socket implementation base class.
class | SocketImpl The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.net.URLStreamHandlerFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.net.URLStreamHandlerFactory

Packages that use URLStreamHandlerFactory
java.net Provides the classes for implementing networking applications.

Uses of URLStreamHandlerFactory in java.net

Methods in java.net with parameters of type URLStreamHandlerFactory
static void URL.setURLStreamHandlerFactory(URLStreamHandlerFactory fac)
Sets an application's URLStreamHandlerFactory.

Constructors in java.net with parameters of type URLStreamHandlerFactory
URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ConnectException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class ConnectException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.SocketException
                          |
                          +--java.net.ConnectException
All Implemented Interfaces:
Serializable
public class ConnectException
extends SocketException

Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is listening on the remote address/port).

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
ConnectException()
Construct a new ConnectException with no detailed message.
ConnectException(String msg)
Constructs a new ConnectException with the specified detail message as to why the connect error occurred.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConnectException

public ConnectException(String msg)
Constructs a new ConnectException with the specified detail message as to why the connect error occurred. A detail message is a String that gives a specific description of this error.
Parameters:
msg - the detail message

ConnectException

public ConnectException()
Construct a new ConnectException with no detailed message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContentHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class ContentHandler

java.lang.Object
  |
  +--java.net.ContentHandler
public abstract class ContentHandler
extends Object

The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.

An application does not generally call the getContent method in this class directly. Instead, an application calls the getContent method in class URL or in URLConnection. The application's content handler factory (an instance of a class that implements the interface ContentHandlerFactory set up by a call to setContentHandler) is called with a String giving the MIME type of the object being received on the socket. The factory returns an instance of a subclass of ContentHandler, and its getContent method is called to create the object.

If no content handler could be found, URLConnection will look for a content handler in a user-defineable set of places. By default it looks in sun.net.www.content, but users can define a vertical-bar delimited set of class prefixes to search through in addition by defining the java.content.handler.pkgs property. The class name must be of the form:

     {package-prefix}.{major}.{minor}
 e.g.
     YoyoDyne.experimental.text.plain
If the loading of the content handler class would be performed by a classloader that is outside of the the delegation chain of the caller, the JVM will need the RuntimePermission "getClassLoader".

Since:
JDK1.0
See Also:
getContent(java.net.URLConnection), ContentHandlerFactory, URL.getContent(), URLConnection, URLConnection.getContent(), URLConnection.setContentHandlerFactory(java.net.ContentHandlerFactory)

Constructor Summary
ContentHandler()
Method Summary
abstract Object | getContent(URLConnection urlc) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
Object | getContent(URLConnection urlc, Class[] classes) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ContentHandler

public ContentHandler()
Method Detail

getContent

public abstract Object getContent(URLConnection urlc)
                           throws IOException
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
Parameters:
urlc - a URL connection.
Returns:
the object read by the ContentHandler.
Throws:
IOException - if an I/O error occurs while reading the object.

getContent

public Object getContent(URLConnection urlc,
                         Class[] classes)
                  throws IOException
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified. The default implementation of this method should call getContent() and screen the return type for a match of the suggested types.
Parameters:
urlc - a URL connection.
classes - an array of types requested
Returns:
the object read by the ContentHandler that is the first match of the suggested types. null if none of the requested are supported.
Throws:
IOException - if an I/O error occurs while reading the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContentHandlerFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Interface ContentHandlerFactory

public interface ContentHandlerFactory

This interface defines a factory for content handlers. An implementation of this interface should map a MIME type into an instance of ContentHandler.

This interface is used by the URLStreamHandler class to create a ContentHandler for a MIME type.

Since:
JDK1.0
See Also:
ContentHandler, URLStreamHandler

Method Summary
 ContentHandler createContentHandler(String mimetype)
Creates a new ContentHandler to read an object from a URLStreamHandler.

Method Detail

createContentHandler

public ContentHandler createContentHandler(String mimetype)
Creates a new ContentHandler to read an object from a URLStreamHandler.
Parameters:
mimetype - the MIME type for which a content handler is desired.
Returns:
a new ContentHandler to read an object from a URLStreamHandler.
See Also:
ContentHandler, URLStreamHandler
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DatagramPacket

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class DatagramPacket

java.lang.Object
  |
  +--java.net.DatagramPacket
public final class DatagramPacket
extends Object

This class represents a datagram packet.

Datagram packets are used to implement a connectionless packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order.

Since:
JDK1.0

Constructor Summary
DatagramPacket(byte[] buf, int length)
Constructs a DatagramPacket for receiving packets of length length.
DatagramPacket(byte[] buf, int length, InetAddress address, int port)
Constructs a datagram packet for sending packets of length length to the specified port number on the specified host.
DatagramPacket(byte[] buf, int offset, int length)
Constructs a DatagramPacket for receiving packets of length length, specifying an offset into the buffer.
DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port)
Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host.
Method Summary
InetAddress | getAddress() Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
byte[] | getData() Returns the data received or the data to be sent.
int | getLength() Returns the length of the data to be sent or the length of the data received.
int | getOffset() Returns the offset of the data to be sent or the offset of the data received.
int | getPort() Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
void | setAddress(InetAddress iaddr) Sets the IP address of the machine to which this datagram is being sent.
void | setData(byte[] buf) Set the data buffer for this packet.
void | setData(byte[] buf, int offset, int length) Set the data buffer for this packet.
void | setLength(int length) Set the length for this packet.
void | setPort(int iport) Sets the port number on the remote host to which this datagram is being sent.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DatagramPacket

public DatagramPacket(byte[] buf,
                      int offset,
                      int length)
Constructs a DatagramPacket for receiving packets of length length, specifying an offset into the buffer.

The length argument must be less than or equal to buf.length.

Parameters:
buf - buffer for holding the incoming datagram.
offset - the offset for the buffer
length - the number of bytes to read.
Since:
JDK1.2

DatagramPacket

public DatagramPacket(byte[] buf,
                      int length)
Constructs a DatagramPacket for receiving packets of length length.

The length argument must be less than or equal to buf.length.

Parameters:
buf - buffer for holding the incoming datagram.
length - the number of bytes to read.

DatagramPacket

public DatagramPacket(byte[] buf,
                      int offset,
                      int length,
                      InetAddress address,
                      int port)
Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host. The length argument must be less than or equal to buf.length.
Parameters:
buf - the packet data.
offset - the packet data offset.
length - the packet data length.
address - the destination address.
port - the destination port number.
Since:
JDK1.2
See Also:
InetAddress

DatagramPacket

public DatagramPacket(byte[] buf,
                      int length,
                      InetAddress address,
                      int port)
Constructs a datagram packet for sending packets of length length to the specified port number on the specified host. The length argument must be less than or equal to buf.length.
Parameters:
buf - the packet data.
length - the packet length.
address - the destination address.
port - the destination port number.
See Also:
InetAddress
Method Detail

getAddress

public InetAddress getAddress()
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
Returns:
the IP address of the machine to which this datagram is being sent or from which the datagram was received.
See Also:
InetAddress, setAddress(java.net.InetAddress)

getPort

public int getPort()
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
Returns:
the port number on the remote host to which this datagram is being sent or from which the datagram was received.
See Also:
setPort(int)

getData

public byte[] getData()
Returns the data received or the data to be sent.
Returns:
the data received or the data to be sent.
See Also:
setData(byte[], int, int)

getOffset

public int getOffset()
Returns the offset of the data to be sent or the offset of the data received.
Returns:
the offset of the data to be sent or the offset of the data received.
Since:
JDK1.2

getLength

public int getLength()
Returns the length of the data to be sent or the length of the data received.
Returns:
the length of the data to be sent or the length of the data received.
See Also:
setLength(int)

setData

public void setData(byte[] buf,
                    int offset,
                    int length)
Set the data buffer for this packet. This sets the data, length and offset of the packet.
Parameters:
buf - the buffer to set for this packet
offset - the offset into the data
length - the length of the data
Throws:
NullPointerException - if the argument is null
Since:
JDK1.2
See Also:
getData(),
getOffset(),
getLength()

setAddress

public void setAddress(InetAddress iaddr)
Sets the IP address of the machine to which this datagram is being sent.
Parameters:
iaddr - the InetAddress
Since:
JDK1.1
See Also:
getAddress()

setPort

public void setPort(int iport)
Sets the port number on the remote host to which this datagram is being sent.
Parameters:
iport - the port number
Since:
JDK1.1
See Also:
setPort(int)

setData

public void setData(byte[] buf)
Set the data buffer for this packet. If the length of the packet length is greater than the length of argument to this method, the length is reset to the the length of the argument.
Parameters:
buf - the buffer to set for this packet.
Throws:
NullPointerException - if the argument is null.
Since:
JDK1.1
See Also:
getLength(), getData()

setLength

public void setLength(int length)
Set the length for this packet. The length of the packet is the number of bytes from the packet's data buffer that will be sent, or the number of bytes of the packet's data buffer that will be used for receiving data. The length must be lesser or equal to the length of the packet's buffer.
Parameters:
length - the length to set for this packet.
Throws:
IllegalArgumentException - if the length is negative of if the length is greater than the packet's data buffer length.
Since:
JDK1.1
See Also:
getLength(), setData(byte[], int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DatagramSocket

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class DatagramSocket

java.lang.Object
  |
  +--java.net.DatagramSocket
Direct Known Subclasses:
MulticastSocket
public class DatagramSocket
extends Object

This class represents a socket for sending and receiving datagram packets.

A datagram socket is the sending or receiving point for a packet delivery service. Each packet sent or received on a datagram socket is individually addressed and routed. Multiple packets sent from one machine to another may be routed differently, and may arrive in any order.

UDP broadcasts sends and receives are always enabled on a DatagramSocket.

Since:
JDK1.0
See Also:
DatagramPacket

Constructor Summary
DatagramSocket()
Constructs a datagram socket and binds it to any available port on the local host machine.
DatagramSocket(int port)
Constructs a datagram socket and binds it to the specified port on the local host machine.
DatagramSocket(int port, InetAddress laddr)
Creates a datagram socket, bound to the specified local address.
Method Summary
void | close() Closes this datagram socket.
void | connect(InetAddress address, int port) Connects the socket to a remote address for this socket.
void | disconnect() Disconnects the socket.
InetAddress | getInetAddress() Returns the address to which this socket is connected.
InetAddress | getLocalAddress() Gets the local address to which the socket is bound.
int | getLocalPort() Returns the port number on the local host to which this socket is bound.
int | getPort() Returns the port for this socket.
int | getReceiveBufferSize() Get value of the SO_RCVBUF option for this DatagramSocket, that is the buffer size used by the platform for input on this DatagramSocket.
int | getSendBufferSize() Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.
int | getSoTimeout() Retrive setting for SO_TIMEOUT.
void | receive(DatagramPacket p) Receives a datagram packet from this socket.
void | send(DatagramPacket p) Sends a datagram packet from this socket.
static void | setDatagramSocketImplFactory(DatagramSocketImplFactory fac) Sets the datagram socket implementation factory for the application.
void | setReceiveBufferSize(int size) Sets the SO_RCVBUF option to the specified value for this DatagramSocket.
void | setSendBufferSize(int size) Sets the SO_SNDBUF option to the specified value for this DatagramSocket.
void | setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DatagramSocket

public DatagramSocket()
               throws SocketException
Constructs a datagram socket and binds it to any available port on the local host machine.

If there is a security manager, its checkListen method is first called with 0 as its argument to ensure the operation is allowed. This could result in a SecurityException.

Throws:
SocketException - if the socket could not be opened, or the socket could not bind to the specified local port.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SecurityManager.checkListen(int)

DatagramSocket

public DatagramSocket(int port)
               throws SocketException
Constructs a datagram socket and binds it to the specified port on the local host machine.

If there is a security manager, its checkListen method is first called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - port to use.
Throws:
SocketException - if the socket could not be opened, or the socket could not bind to the specified local port.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SecurityManager.checkListen(int)

DatagramSocket

public DatagramSocket(int port,
                      InetAddress laddr)
               throws SocketException
Creates a datagram socket, bound to the specified local address. The local port must be between 0 and 65535 inclusive.

If there is a security manager, its checkListen method is first called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - local port to use
laddr - local address to bind
Throws:
SocketException - if the socket could not be opened, or the socket could not bind to the specified local port.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
Since:
JDK1.1
See Also:
SecurityManager.checkListen(int)
Method Detail

connect

public void connect(InetAddress address,
                    int port)
Connects the socket to a remote address for this socket. When a socket is connected to a remote address, packets may only be sent to or received from that address. By default a datagram socket is not connected.

A caller's permission to send and receive datagrams to a given host and port are checked at connect time. When a socket is connected, receive and send will not perform any security checks on incoming and outgoing packets, other than matching the packet's and the socket's address and port. On a send operation, if the packet's address is set and the packet's address and the socket's address do not match, an IllegalArgumentException will be thrown. A socket connected to a multicast address may only be used to send packets.

Parameters:
address - the remote address for the socket
port - the remote port for the socket.
Throws:
IllegalArgumentException - if the address is invalid or the port is out of range.
SecurityException - if the caller is not allowed to send datagrams to and receive datagrams from the address and port.
See Also:
disconnect(),
send(java.net.DatagramPacket),
receive(java.net.DatagramPacket)

disconnect

public void disconnect()
Disconnects the socket. This does nothing if the socket is not connected.
See Also:
connect(java.net.InetAddress, int)

getInetAddress

public InetAddress getInetAddress()
Returns the address to which this socket is connected. Returns null if the socket is not connected.
Returns:
the address to which this socket is connected.

getPort

public int getPort()
Returns the port for this socket. Returns -1 if the socket is not connected.
Returns:
the port to which this socket is connected.

send

public void send(DatagramPacket p)
          throws IOException
Sends a datagram packet from this socket. The DatagramPacket includes information indicating the data to be sent, its length, the IP address of the remote host, and the port number on the remote host.

If there is a security manager, and the socket is not currently connected to a remote address, this method first performs some security checks. First, if p.getAddress().isMulticastAddress() is true, this method calls the security manager's checkMulticast method with p.getAddress() as its argument. If the evaluation of that expression is false, this method instead calls the security manager's checkConnect method with arguments p.getAddress().getHostAddress() and p.getPort(). Each call to a security manager method could result in a SecurityException if the operation is not allowed.

Parameters:
p - the DatagramPacket to be sent.
Throws:
IOException - if an I/O error occurs.
SecurityException - if a security manager exists and its checkMulticast or checkConnect method doesn't allow the send.
See Also:
DatagramPacket, SecurityManager.checkMulticast(InetAddress), SecurityManager.checkConnect(java.lang.String, int)

receive

public void receive(DatagramPacket p)
             throws IOException
Receives a datagram packet from this socket. When this method returns, the DatagramPacket's buffer is filled with the data received. The datagram packet also contains the sender's IP address, and the port number on the sender's machine.

This method blocks until a datagram is received. The length field of the datagram packet object contains the length of the received message. If the message is longer than the packet's length, the message is truncated.

If there is a security manager, a packet cannot be received if the security manager's checkAccept method does not allow it.

Parameters:
p - the DatagramPacket into which to place the incoming data.
Throws:
IOException - if an I/O error occurs.
See Also:
DatagramPacket, DatagramSocket

getLocalAddress

public InetAddress getLocalAddress()
Gets the local address to which the socket is bound.

If there is a security manager, its checkConnect method is first called with the host address and -1 as its arguments to see if the operation is allowed.

Returns:
an InetAddress representing the local address to which the socket is bound
Throws:
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
Since:
1.1
See Also:
SecurityManager.checkConnect(java.lang.String, int)

getLocalPort

public int getLocalPort()
Returns the port number on the local host to which this socket is bound.
Returns:
the port number on the local host to which this socket is bound.

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a call to receive() for this DatagramSocket will block for only this amount of time. If the timeout expires, a java.io.InterruptedIOException is raised, though the ServerSocket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.
Parameters:
timeout - the specified timeout in milliseconds.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
getSoTimeout()

getSoTimeout

public int getSoTimeout()
                 throws SocketException
Retrive setting for SO_TIMEOUT. 0 returns implies that the option is disabled (i.e., timeout of infinity).
Returns:
the setting for SO_TIMEOUT
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
setSoTimeout(int)

setSendBufferSize

public void setSendBufferSize(int size)
                       throws SocketException
Sets the SO_SNDBUF option to the specified value for this DatagramSocket. The SO_SNDBUF option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers.

Increasing buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. For UDP, this sets the maximum size of a packet that may be sent on this socket.

Because SO_SNDBUF is a hint, applications that want to verify what size the buffers were set to should call getSendBufferSize().

Parameters:
size - the size to which to set the send buffer size. This value must be greater than 0.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
IllegalArgumentException - if the value is 0 or is negative.
See Also:
getSendBufferSize()

getSendBufferSize

public int getSendBufferSize()
                      throws SocketException
Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.
Returns:
the value of the SO_SNDBUF option for this DatagramSocket
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
setSendBufferSize(int)

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws SocketException
Sets the SO_RCVBUF option to the specified value for this DatagramSocket. The SO_RCVBUF option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers.

Increasing buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. For UDP, this sets the maximum size of a packet that may be sent on this DatagramSocket.

Because SO_RCVBUF is a hint, applications that want to verify what size the buffers were set to should call getReceiveBufferSize().

Parameters:
size - the size to which to set the receive buffer size. This value must be greater than 0.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
IllegalArgumentException - if the value is 0 or is negative.
See Also:
getReceiveBufferSize()

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws SocketException
Get value of the SO_RCVBUF option for this DatagramSocket, that is the buffer size used by the platform for input on this DatagramSocket.
Returns:
the value of the SO_RCVBUF option for this DatagramSocket
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
setReceiveBufferSize(int)

close

public void close()
Closes this datagram socket.

setDatagramSocketImplFactory

public static void setDatagramSocketImplFactory(DatagramSocketImplFactory fac)
                                         throws IOException
Sets the datagram socket implementation factory for the application. The factory can be specified only once.

When an application creates a new datagram socket, the socket implementation factory's createDatagramSocketImpl method is called to create the actual datagram socket implementation.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
fac - the desired factory.
Throws:
IOException - if an I/O error occurs when setting the datagram socket factory.
SocketException - if the factory is already defined.
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
DatagramSocketImplFactory.createDatagramSocketImpl(), SecurityManager.checkSetFactory()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DatagramSocketImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class DatagramSocketImpl

java.lang.Object
  |
  +--java.net.DatagramSocketImpl
All Implemented Interfaces:
SocketOptions
public abstract class DatagramSocketImpl
extends Object
implements SocketOptions

Abstract datagram and multicast socket implementation base class.

Since:
JDK1.1

Field Summary
protected FileDescriptor | fd The file descriptor object.
protected int | localPort The local port number.
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, SO_BINDADDR, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
Constructor Summary
DatagramSocketImpl()
Method Summary
protected abstract void | bind(int lport, InetAddress laddr) Binds a datagram socket to a local port and address.
protected abstract void | close() Close the socket.
protected abstract void | create() Creates a datagram socket.
protected FileDescriptor | getFileDescriptor() Gets the datagram socket file descriptor.
protected int | getLocalPort() Gets the local port.
protected abstract int | getTimeToLive() Retrieve the TTL (time-to-live) option.
protected abstract byte | getTTL() Deprecated. use getTimeToLive instead.
protected abstract void | join(InetAddress inetaddr) Join the multicast group.
protected abstract void | leave(InetAddress inetaddr) Leave the multicast group.
protected abstract int | peek(InetAddress i) Peek at the packet to see who it is from.
protected abstract void | receive(DatagramPacket p) Receive the datagram packet.
protected abstract void | send(DatagramPacket p) Sends a datagram packet.
protected abstract void | setTimeToLive(int ttl) Set the TTL (time-to-live) option.
protected abstract void | setTTL(byte ttl) Deprecated. use setTimeToLive instead.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.net.SocketOptions
getOption, setOption

Field Detail

localPort

protected int localPort
The local port number.

fd

protected FileDescriptor fd
The file descriptor object.
Constructor Detail

DatagramSocketImpl

public DatagramSocketImpl()
Method Detail

create

protected abstract void create()
                        throws SocketException
Creates a datagram socket.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.

bind

protected abstract void bind(int lport,
                             InetAddress laddr)
                      throws SocketException
Binds a datagram socket to a local port and address.
Parameters:
lport - the local port
laddr - the local address
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.

send

protected abstract void send(DatagramPacket p)
                      throws IOException
Sends a datagram packet. The packet contains the data and the destination address to send the packet to.
Parameters:
p - the packet to be sent.
Throws:
IOException - if an I/O exception occurs while sending the datagram packet.

peek

protected abstract int peek(InetAddress i)
                     throws IOException
Peek at the packet to see who it is from.
Parameters:
i - an InetAddress object
Returns:
the address which the packet came from.
Throws:
IOException - if an I/O exception occurs

receive

protected abstract void receive(DatagramPacket p)
                         throws IOException
Receive the datagram packet.
Parameters:
p - the Packet Received.
Throws:
IOException - if an I/O exception occurs while receiving the datagram packet.

setTTL

protected abstract void setTTL(byte ttl)
                        throws IOException
Deprecated. use setTimeToLive instead.

Set the TTL (time-to-live) option.
Parameters:
ttl - a byte specifying the TTL value
Throws:
IOException - if an I/O exception occurs while setting the time-to-live option.
See Also:
getTTL()

getTTL

protected abstract byte getTTL()
                        throws IOException
Deprecated. use getTimeToLive instead.

Retrieve the TTL (time-to-live) option.
Returns:
a byte representing the TTL value
Throws:
IOException - if an I/O exception occurs while retrieving the time-to-live option
See Also:
setTTL(byte)

setTimeToLive

protected abstract void setTimeToLive(int ttl)
                               throws IOException
Set the TTL (time-to-live) option.
Parameters:
ttl - an int specifying the time-to-live value
Throws:
IOException - if an I/O exception occurs while setting the time-to-live option.
See Also:
getTimeToLive()

getTimeToLive

protected abstract int getTimeToLive()
                              throws IOException
Retrieve the TTL (time-to-live) option.
Returns:
an int representing the time-to-live value
Throws:
IOException - if an I/O exception occurs while retrieving the time-to-live option
See Also:
setTimeToLive(int)

join

protected abstract void join(InetAddress inetaddr)
                      throws IOException
Join the multicast group.
Parameters:
inetaddr - multicast address to join.
Throws:
IOException - if an I/O exception occurs while joining the multicast group.

leave

protected abstract void leave(InetAddress inetaddr)
                       throws IOException
Leave the multicast group.
Parameters:
inetaddr - multicast address to leave.
Throws:
IOException - if an I/O exception occurs while leaving the multicast group.

close

protected abstract void close()
Close the socket.

getLocalPort

protected int getLocalPort()
Gets the local port.
Returns:
an int representing the local port value

getFileDescriptor

protected FileDescriptor getFileDescriptor()
Gets the datagram socket file descriptor.
Returns:
a FileDescriptor object representing the datagram socket file descriptor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DatagramSocketImplFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Interface DatagramSocketImplFactory

public interface DatagramSocketImplFactory

This interface defines a factory for datagram socket implementations. It is used by the classes DatagramSocket to create actual socket implementations.

Since:
1.3
See Also:
DatagramSocket

Method Summary
 DatagramSocketImpl createDatagramSocketImpl()
Creates a new DatagramSocketImpl instance.

Method Detail

createDatagramSocketImpl

public DatagramSocketImpl createDatagramSocketImpl()
Creates a new DatagramSocketImpl instance.
Returns:
a new instance of DatagramSocketImpl.
See Also:
java.io.DatagramSocketImpl
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileNameMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Interface FileNameMap

public interface FileNameMap

A simple interface which provides a mechanism to map between a file name and a MIME type string.

Since:
JDK1.1

Method Summary
 String getContentTypeFor(String fileName)
Gets the MIME type for the specified file name.

Method Detail

getContentTypeFor

public String getContentTypeFor(String fileName)
Gets the MIME type for the specified file name.
Parameters:
fileName - the specified file name
Returns:
a String indicating the MIME type for the specified file name.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HttpURLConnection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class HttpURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--java.net.HttpURLConnection
public abstract class HttpURLConnection
extends URLConnection

A URLConnection with support for HTTP-specific features. See the spec for details.

Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the close() methods on the InputStream or OutputStream of an HttpURLConnection after a request may free network resources associated with this instance but has no effect on any shared persistent connection. Calling the disconnect() method may close the underlying socket if a persistent connection is otherwise idle at that time.

Since:
JDK1.1
See Also:
disconnect()

Field Summary
static int | HTTP_ACCEPTED HTTP Status-Code 202: Accepted.
static int | HTTP_BAD_GATEWAY HTTP Status-Code 502: Bad Gateway.
static int | HTTP_BAD_METHOD HTTP Status-Code 405: Method Not Allowed.
static int | HTTP_BAD_REQUEST HTTP Status-Code 400: Bad Request.
static int | HTTP_CLIENT_TIMEOUT HTTP Status-Code 408: Request Time-Out.
static int | HTTP_CONFLICT HTTP Status-Code 409: Conflict.
static int | HTTP_CREATED HTTP Status-Code 201: Created.
static int | HTTP_ENTITY_TOO_LARGE HTTP Status-Code 413: Request Entity Too Large.
static int | HTTP_FORBIDDEN HTTP Status-Code 403: Forbidden.
static int | HTTP_GATEWAY_TIMEOUT HTTP Status-Code 504: Gateway Timeout.
static int | HTTP_GONE HTTP Status-Code 410: Gone.
static int | HTTP_INTERNAL_ERROR HTTP Status-Code 500: Internal Server Error.
static int | HTTP_LENGTH_REQUIRED HTTP Status-Code 411: Length Required.
static int | HTTP_MOVED_PERM HTTP Status-Code 301: Moved Permanently.
static int | HTTP_MOVED_TEMP HTTP Status-Code 302: Temporary Redirect.
static int | HTTP_MULT_CHOICE HTTP Status-Code 300: Multiple Choices.
static int | HTTP_NO_CONTENT HTTP Status-Code 204: No Content.
static int | HTTP_NOT_ACCEPTABLE HTTP Status-Code 406: Not Acceptable.
static int | HTTP_NOT_AUTHORITATIVE HTTP Status-Code 203: Non-Authoritative Information.
static int | HTTP_NOT_FOUND HTTP Status-Code 404: Not Found.
static int | HTTP_NOT_IMPLEMENTED HTTP Status-Code 501: Not Implemented.
static int | HTTP_NOT_MODIFIED HTTP Status-Code 304: Not Modified.
static int | HTTP_OK HTTP Status-Code 200: OK.
static int | HTTP_PARTIAL HTTP Status-Code 206: Partial Content.
static int | HTTP_PAYMENT_REQUIRED HTTP Status-Code 402: Payment Required.
static int | HTTP_PRECON_FAILED HTTP Status-Code 412: Precondition Failed.
static int | HTTP_PROXY_AUTH HTTP Status-Code 407: Proxy Authentication Required.
static int | HTTP_REQ_TOO_LONG HTTP Status-Code 414: Request-URI Too Large.
static int | HTTP_RESET HTTP Status-Code 205: Reset Content.
static int | HTTP_SEE_OTHER HTTP Status-Code 303: See Other.
static int | HTTP_SERVER_ERROR Deprecated. it is misplaced and shouldn't have existed.
static int | HTTP_UNAUTHORIZED HTTP Status-Code 401: Unauthorized.
static int | HTTP_UNAVAILABLE HTTP Status-Code 503: Service Unavailable.
static int | HTTP_UNSUPPORTED_TYPE HTTP Status-Code 415: Unsupported Media Type.
static int | HTTP_USE_PROXY HTTP Status-Code 305: Use Proxy.
static int | HTTP_VERSION HTTP Status-Code 505: HTTP Version Not Supported.
protected boolean | instanceFollowRedirects If true, the protocol will automatically follow redirects.
protected String | method The HTTP method (GET,POST,PUT,etc.).
protected int | responseCode An int representing the three digit HTTP Status-Code.
protected String | responseMessage The HTTP response message.
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor Summary
protected HttpURLConnection(URL u)
Constructor for the URLStreamHandler.
Method Summary
abstract void | disconnect() Indicates that other requests to the server are unlikely in the near future.
InputStream | getErrorStream() Returns the error stream if the connection failed but the server sent useful data nonetheless.
static boolean | getFollowRedirects() Returns a boolean indicating whether or not HTTP redirects (3xx) should be automatically followed.
long | getHeaderFieldDate(String name, long Default) Returns the value of the named field parsed as date.
boolean | getInstanceFollowRedirects() Returns the value of this HttpURLConnection's instanceFollowRedirects field.
Permission | getPermission() Returns a permission object representing the permission necessary to make the connection represented by this object.
String | getRequestMethod() Get the request method.
int | getResponseCode() Gets HTTP response status from responses like:
String | getResponseMessage() Gets the HTTP response message, if any, returned along with the response code from a server.
static void | setFollowRedirects(boolean set) Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this class.
void | setInstanceFollowRedirects(boolean followRedirects) Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this HttpURLConnection instance.
void | setRequestMethod(String method) Set the method for the URL request, one of: GET POST HEAD OPTIONS PUT DELETE TRACE are legal, subject to protocol restrictions.
abstract boolean | usingProxy() Indicates if the connection is going through a proxy.
Methods inherited from class java.net.URLConnection
connect, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

method

protected String method
The HTTP method (GET,POST,PUT,etc.).

responseCode

protected int responseCode
An int representing the three digit HTTP Status-Code.
  • 1xx: Informational
  • 2xx: Success
  • 3xx: Redirection
  • 4xx: Client Error
  • 5xx: Server Error

responseMessage

protected String responseMessage
The HTTP response message.

instanceFollowRedirects

protected boolean instanceFollowRedirects
If true, the protocol will automatically follow redirects. If false, the protocol will not automatically follow redirects.

This field is set by the setInstanceFollowRedirects method. Its value is returned by the getInstanceFollowRedirects method.

Its default value is based on the value of the static followRedirects at HttpURLConnection construction time.

See Also:
setInstanceFollowRedirects(boolean), getInstanceFollowRedirects(), setFollowRedirects(boolean)

HTTP_OK

public static final int HTTP_OK
HTTP Status-Code 200: OK.

HTTP_CREATED

public static final int HTTP_CREATED
HTTP Status-Code 201: Created.

HTTP_ACCEPTED

public static final int HTTP_ACCEPTED
HTTP Status-Code 202: Accepted.

HTTP_NOT_AUTHORITATIVE

public static final int HTTP_NOT_AUTHORITATIVE
HTTP Status-Code 203: Non-Authoritative Information.

HTTP_NO_CONTENT

public static final int HTTP_NO_CONTENT
HTTP Status-Code 204: No Content.

HTTP_RESET

public static final int HTTP_RESET
HTTP Status-Code 205: Reset Content.

HTTP_PARTIAL

public static final int HTTP_PARTIAL
HTTP Status-Code 206: Partial Content.

HTTP_MULT_CHOICE

public static final int HTTP_MULT_CHOICE
HTTP Status-Code 300: Multiple Choices.

HTTP_MOVED_PERM

public static final int HTTP_MOVED_PERM
HTTP Status-Code 301: Moved Permanently.

HTTP_MOVED_TEMP

public static final int HTTP_MOVED_TEMP
HTTP Status-Code 302: Temporary Redirect.

HTTP_SEE_OTHER

public static final int HTTP_SEE_OTHER
HTTP Status-Code 303: See Other.

HTTP_NOT_MODIFIED

public static final int HTTP_NOT_MODIFIED
HTTP Status-Code 304: Not Modified.

HTTP_USE_PROXY

public static final int HTTP_USE_PROXY
HTTP Status-Code 305: Use Proxy.

HTTP_BAD_REQUEST

public static final int HTTP_BAD_REQUEST
HTTP Status-Code 400: Bad Request.

HTTP_UNAUTHORIZED

public static final int HTTP_UNAUTHORIZED
HTTP Status-Code 401: Unauthorized.

HTTP_PAYMENT_REQUIRED

public static final int HTTP_PAYMENT_REQUIRED
HTTP Status-Code 402: Payment Required.

HTTP_FORBIDDEN

public static final int HTTP_FORBIDDEN
HTTP Status-Code 403: Forbidden.

HTTP_NOT_FOUND

public static final int HTTP_NOT_FOUND
HTTP Status-Code 404: Not Found.

HTTP_BAD_METHOD

public static final int HTTP_BAD_METHOD
HTTP Status-Code 405: Method Not Allowed.

HTTP_NOT_ACCEPTABLE

public static final int HTTP_NOT_ACCEPTABLE
HTTP Status-Code 406: Not Acceptable.

HTTP_PROXY_AUTH

public static final int HTTP_PROXY_AUTH
HTTP Status-Code 407: Proxy Authentication Required.

HTTP_CLIENT_TIMEOUT

public static final int HTTP_CLIENT_TIMEOUT
HTTP Status-Code 408: Request Time-Out.

HTTP_CONFLICT

public static final int HTTP_CONFLICT
HTTP Status-Code 409: Conflict.

HTTP_GONE

public static final int HTTP_GONE
HTTP Status-Code 410: Gone.

HTTP_LENGTH_REQUIRED

public static final int HTTP_LENGTH_REQUIRED
HTTP Status-Code 411: Length Required.

HTTP_PRECON_FAILED

public static final int HTTP_PRECON_FAILED
HTTP Status-Code 412: Precondition Failed.

HTTP_ENTITY_TOO_LARGE

public static final int HTTP_ENTITY_TOO_LARGE
HTTP Status-Code 413: Request Entity Too Large.

HTTP_REQ_TOO_LONG

public static final int HTTP_REQ_TOO_LONG
HTTP Status-Code 414: Request-URI Too Large.

HTTP_UNSUPPORTED_TYPE

public static final int HTTP_UNSUPPORTED_TYPE
HTTP Status-Code 415: Unsupported Media Type.

HTTP_SERVER_ERROR

public static final int HTTP_SERVER_ERROR
Deprecated. it is misplaced and shouldn't have existed.

HTTP_INTERNAL_ERROR

public static final int HTTP_INTERNAL_ERROR
HTTP Status-Code 500: Internal Server Error.

HTTP_NOT_IMPLEMENTED

public static final int HTTP_NOT_IMPLEMENTED
HTTP Status-Code 501: Not Implemented.

HTTP_BAD_GATEWAY

public static final int HTTP_BAD_GATEWAY
HTTP Status-Code 502: Bad Gateway.

HTTP_UNAVAILABLE

public static final int HTTP_UNAVAILABLE
HTTP Status-Code 503: Service Unavailable.

HTTP_GATEWAY_TIMEOUT

public static final int HTTP_GATEWAY_TIMEOUT
HTTP Status-Code 504: Gateway Timeout.

HTTP_VERSION

public static final int HTTP_VERSION
HTTP Status-Code 505: HTTP Version Not Supported.
Constructor Detail

HttpURLConnection

protected HttpURLConnection(URL u)
Constructor for the URLStreamHandler.
Parameters:
u - the URL
Method Detail

setFollowRedirects

public static void setFollowRedirects(boolean set)
Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this class. True by default. Applets cannot change this variable.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
set - a boolean indicating whether or not to follow HTTP redirects.
Throws:
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
SecurityManager.checkSetFactory(), getFollowRedirects()

getFollowRedirects

public static boolean getFollowRedirects()
Returns a boolean indicating whether or not HTTP redirects (3xx) should be automatically followed.
Returns:
true if HTTP redirects should be automatically followed, false if not.
See Also:
setFollowRedirects(boolean)

setInstanceFollowRedirects

public void setInstanceFollowRedirects(boolean followRedirects)
Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this HttpURLConnection instance.

The default value comes from followRedirects, which defaults to true.

Parameters:
followRedirects - a boolean indicating whether or not to follow HTTP redirects.
See Also:
instanceFollowRedirects, getInstanceFollowRedirects()

getInstanceFollowRedirects

public boolean getInstanceFollowRedirects()
Returns the value of this HttpURLConnection's instanceFollowRedirects field.
Returns:
the value of this HttpURLConnection's instanceFollowRedirects field.
See Also:
instanceFollowRedirects, setInstanceFollowRedirects(boolean)

setRequestMethod

public void setRequestMethod(String method)
                      throws ProtocolException
Set the method for the URL request, one of:
  • GET
  • POST
  • HEAD
  • OPTIONS
  • PUT
  • DELETE
  • TRACE
are legal, subject to protocol restrictions. The default method is GET.
Parameters:
method - the HTTP method
Throws:
ProtocolException - if the method cannot be reset or if the requested method isn't valid for HTTP.
See Also:
getRequestMethod()

getRequestMethod

public String getRequestMethod()
Get the request method.
Returns:
the HTTP request method
See Also:
setRequestMethod(java.lang.String)

getResponseCode

public int getResponseCode()
                    throws IOException
Gets HTTP response status from responses like:
 HTTP/1.0 200 OK
 HTTP/1.0 401 Unauthorized
Extracts the ints 200 and 401 respectively. Returns -1 if none can be discerned from the response (i.e., the response is not valid HTTP).
Returns:
the HTTP Status-Code
Throws:
IOException - if an error occurred connecting to the server.

getResponseMessage

public String getResponseMessage()
                          throws IOException
Gets the HTTP response message, if any, returned along with the response code from a server. From responses like:
 HTTP/1.0 200 OK
 HTTP/1.0 404 Not Found
Extracts the Strings "OK" and "Not Found" respectively. Returns null if none could be discerned from the responses (the result was not valid HTTP).
Returns:
the HTTP response message, or null
Throws:
IOException - if an error occurred connecting to the server.

getHeaderFieldDate

public long getHeaderFieldDate(String name,
                               long Default)
Description copied from class: URLConnection
Returns the value of the named field parsed as date. The result is the number of milliseconds since January 1, 1970 GMT represented by the named field.

This form of getHeaderField exists because some connection types (e.g., http-ng) have pre-parsed headers. Classes for that connection type can override this method and short-circuit the parsing.

Overrides:
getHeaderFieldDate in class URLConnection
Following copied from class: java.net.URLConnection
Parameters:
name - the name of the header field.
Default - a default value.
Returns:
the value of the field, parsed as a date. The value of the Default argument is returned if the field is missing or malformed.

disconnect

public abstract void disconnect()
Indicates that other requests to the server are unlikely in the near future. Calling disconnect() should not imply that this HttpURLConnection instance can be reused for other requests.

usingProxy

public abstract boolean usingProxy()
Indicates if the connection is going through a proxy.
Returns:
a boolean indicating if the connection is using a proxy.

getPermission

public Permission getPermission()
                         throws IOException
Description copied from class: URLConnection
Returns a permission object representing the permission necessary to make the connection represented by this object. This method returns null if no permission is required to make the connection. By default, this method returns java.security.AllPermission. Subclasses should override this method and return the permission that best represents the permission required to make a a connection to the URL. For example, a URLConnection representing a file: URL would return a java.io.FilePermission object.

The permission returned may dependent upon the state of the connection. For example, the permission before connecting may be different from that after connecting. For example, an HTTP sever, say foo.com, may redirect the connection to a different host, say bar.com. Before connecting the permission returned by the connection will represent the permission needed to connect to foo.com, while the permission returned after connecting will be to bar.com.

Permissions are generally used for two purposes: to protect caches of objects obtained through URLConnections, and to check the right of a recipient to learn about a particular URL. In the first case, the permission should be obtained after the object has been obtained. For example, in an HTTP connection, this will represent the permission to connect to the host from which the data was ultimately fetched. In the second case, the permission should be obtained and tested before connecting.

Overrides:
getPermission in class URLConnection
Following copied from class: java.net.URLConnection
Returns:
the permission object representing the permission necessary to make the connection represented by this URLConnection.
Throws:
IOException - if the computation of the permission requires network or file I/O and an exception occurs while computing it.

getErrorStream

public InputStream getErrorStream()
Returns the error stream if the connection failed but the server sent useful data nonetheless. The typical example is when an HTTP server responds with a 404, which will cause a FileNotFoundException to be thrown in connect, but the server sent an HTML help page with suggestions as to what to do.

This method will not cause a connection to be initiated. If there the connection was not connected, or if the server did not have an error while connecting or if the server did have an error but there no error data was sent, this method will return null. This is the default.

Returns:
an error stream if any, null if there have been no errors, the connection is not connected or the server sent no useful data.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InetAddress

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class InetAddress

java.lang.Object
  |
  +--java.net.InetAddress
All Implemented Interfaces:
Serializable
public final class InetAddress
extends Object
implements Serializable

This class represents an Internet Protocol (IP) address.

Applications should use the methods getLocalHost, getByName, or getAllByName to create a new InetAddress instance.

Since:
JDK1.0
See Also:
getAllByName(java.lang.String),
getByName(java.lang.String),
getLocalHost(), Serialized Form

Method Summary
boolean | equals(Object obj) Compares this object against the specified object.
byte[] | getAddress() Returns the raw IP address of this InetAddress object.
static InetAddress[] | getAllByName(String host) Determines all the IP addresses of a host, given the host's name.
static InetAddress | getByName(String host) Determines the IP address of a host, given the host's name.
String | getHostAddress() Returns the IP address string "%d.%d.%d.%d".
String | getHostName() Gets the host name for this IP address.
static InetAddress | getLocalHost() Returns the local host.
int | hashCode() Returns a hashcode for this IP address.
boolean | isMulticastAddress() Utility routine to check if the InetAddress is an IP multicast address.
String | toString() Converts this IP address to a String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

isMulticastAddress

public boolean isMulticastAddress()
Utility routine to check if the InetAddress is an IP multicast address. IP multicast address is a Class D address i.e first four bits of the address are 1110.
Returns:
a boolean indicating if the InetAddress is an IP multicast address
Since:
JDK1.1

getHostName

public String getHostName()
Gets the host name for this IP address.

If there is a security manager, its checkConnect method is first called with the hostname and -1 as its arguments to see if the operation is allowed.

Returns:
the host name for this IP address.
Throws:
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation .
See Also:
SecurityManager.checkConnect(java.lang.String, int)

getAddress

public byte[] getAddress()
Returns the raw IP address of this InetAddress object. The result is in network byte order: the highest order byte of the address is in getAddress()[0].
Returns:
the raw IP address of this object.

getHostAddress

public String getHostAddress()
Returns the IP address string "%d.%d.%d.%d".
Returns:
the raw IP address in a string format.
Since:
JDK1.0.2

hashCode

public int hashCode()
Returns a hashcode for this IP address.
Overrides:
hashCode in class Object
Returns:
a hash code value for this IP address.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and it represents the same IP address as this object.

Two instances of InetAddress represent the same IP address if the length of the byte arrays returned by getAddress is the same for both, and each of the array components is the same for the byte arrays.

Overrides:
equals in class Object
Parameters:
obj - the object to compare against.
Returns:
true if the objects are the same; false otherwise.
See Also:
getAddress()

toString

public String toString()
Converts this IP address to a String.
Overrides:
toString in class Object
Returns:
a string representation of this IP address.

getByName

public static InetAddress getByName(String host)
                             throws UnknownHostException
Determines the IP address of a host, given the host's name. The host name can either be a machine name, such as "java.sun.com", or a string representing its IP address, such as "206.26.48.100".
Parameters:
host - the specified host, or null for the local host.
Returns:
an IP address for the given host name.
Throws:
UnknownHostException - if no IP address for the host could be found.

getAllByName

public static InetAddress[] getAllByName(String host)
                                  throws UnknownHostException
Determines all the IP addresses of a host, given the host's name. The host name can either be a machine name, such as "java.sun.com", or a string representing its IP address, such as "206.26.48.100".

If there is a security manager and host is not null and host.length() is not equal to zero, the security manager's checkConnect method is called with the hostname and -1 as its arguments to see if the operation is allowed.

Parameters:
host - the name of the host.
Returns:
an array of all the IP addresses for a given host name.
Throws:
UnknownHostException - if no IP address for the host could be found.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
SecurityManager.checkConnect(java.lang.String, int)

getLocalHost

public static InetAddress getLocalHost()
                                throws UnknownHostException
Returns the local host.

If there is a security manager, its checkConnect method is called with the local host name and -1 as its arguments to see if the operation is allowed.

Returns:
the IP address of the local host.
Throws:
UnknownHostException - if no IP address for the host could be found.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
SecurityManager.checkConnect(java.lang.String, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JarURLConnection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class JarURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--java.net.JarURLConnection
public abstract class JarURLConnection
extends URLConnection

A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.

The syntax of a JAR URL is:

 jar:<url>!/{entry}

for example:

jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class

Jar URLs should be used to refer to a JAR file or entries in a JAR file. The example above is a JAR URL which refers to a JAR entry. If the entry name is omitted, the URL refers to the whole JAR file: jar:http://www.foo.com/bar/baz.jar!/

Users should cast the generic URLConnection to a JarURLConnection when they know that the URL they created is a JAR URL, and they need JAR-specific functionality. For example:

 URL url = new URL("jar:file:/home/duke/duke.jar!/");
 JarURLConnection jarConnection = (JarURLConnection)url.openConnection();
 Manifest manifest = jarConnection.getManifest();

Examples:

A Jar entry
jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class
A Jar file
jar:http://www.foo.com/bar/baz.jar!/
A Jar directory
jar:http://www.foo.com/bar/baz.jar!/COM/foo/

!/ is refered to as the separator.

When constructing a JAR url via new URL(context, spec), the following rules apply:

  • if there is no context URL and the specification passed to the URL constructor doesn't contain a separator, the URL is considered to refer to a JarFile.
  • if there is a context URL, the context URL is assumed to refer to a JAR file or a Jar directory.
  • if the specification begins with a '/', the Jar directory is ignored, and the spec is considered to be at the root of the Jar file.

    Examples:

    context: jar:http://www.foo.com/bar/jar.jar!/, spec:baz/entry.txt
    url:jar:http://www.foo.com/bar/baz/jar.jar!/baz/entry.txt
    context: jar:http://www.foo.com/bar/jar.jar!/baz, spec:entry.txt
    url:jar:http://www.foo.com/bar/baz/jar.jar!/baz/entry.txt
    context: jar:http://www.foo.com/bar/jar.jar!/baz, spec:/entry.txt
    url:jar:http://www.foo.com/bar/baz/jar.jar!/entry.txt

Since:
1.2
See Also:
URL, URLConnection, JarFile, JarInputStream, Manifest, ZipEntry

Field Summary
protected  URLConnection jarFileURLConnection
The connection to the JAR file URL, if the connection has been initiated.
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor Summary
protected JarURLConnection(URL url)
Creates the new JarURLConnection to the specified URL.
Method Summary
Attributes | getAttributes() Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
Certificate[] | getCertificates() Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.
String | getEntryName() Return the entry name for this connection.
JarEntry | getJarEntry() Return the JAR entry object for this connection, if any.
abstract JarFile | getJarFile() Return the JAR file for this connection.
URL | getJarFileURL() Returns the URL for the Jar file for this connection.
Attributes | getMainAttributes() Returns the main Attributes for the JAR file for this connection.
Manifest | getManifest() Returns the Manifest for this connection, or null if none.
Methods inherited from class java.net.URLConnection
connect, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

jarFileURLConnection

protected URLConnection jarFileURLConnection
The connection to the JAR file URL, if the connection has been initiated. This should be set by connect.
Constructor Detail

JarURLConnection

protected JarURLConnection(URL url)
                    throws MalformedURLException
Creates the new JarURLConnection to the specified URL.
Parameters:
url - the URL
Throws:
MalformedURLException - if no legal protocol could be found in a specification string or the string could not be parsed.
Method Detail

getJarFileURL

public URL getJarFileURL()
Returns the URL for the Jar file for this connection.
Returns:
the URL for the Jar file for this connection.

getEntryName

public String getEntryName()
Return the entry name for this connection. This method returns null if the JAR file URL corresponding to this connection points to a JAR file and not a JAR file entry.
Returns:
the entry name for this connection, if any.

getJarFile

public abstract JarFile getJarFile()
                            throws IOException
Return the JAR file for this connection. The returned object is not modifiable, and will throw UnsupportedOperationException if the caller attempts to modify it.
Returns:
the JAR file for this connection. If the connection is a connection to an entry of a JAR file, the JAR file object is returned
Throws:
IOException - if an IOException occurs while trying to connect to the JAR file for this connection.
See Also:
URLConnection.connect()

getManifest

public Manifest getManifest()
                     throws IOException
Returns the Manifest for this connection, or null if none. The returned object is not modifiable, and will throw UnsupportedOperationException if the caller attempts to modify it.
Returns:
the manifest object corresponding to the JAR file object for this connection.
Throws:
IOException - if getting the JAR file for this connection causes an IOException to be trown.
See Also:
getJarFile()

getJarEntry

public JarEntry getJarEntry()
                     throws IOException
Return the JAR entry object for this connection, if any. This method returns null if the JAR file URL corresponding to this connection points to a JAR file and not a JAR file entry. The returned object is not modifiable, and will throw UnsupportedOperationException if the caller attempts to modify it.
Returns:
the JAR entry object for this connection, or null if the JAR URL for this connection points to a JAR file.
Throws:
IOException - if getting the JAR file for this connection causes an IOException to be trown.
See Also:
getJarFile(), getJarEntry()

getAttributes

public Attributes getAttributes()
                         throws IOException
Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
Returns:
the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
Throws:
IOException - if getting the JAR entry causes an IOException to be thrown.
See Also:
getJarEntry()

getMainAttributes

public Attributes getMainAttributes()
                             throws IOException
Returns the main Attributes for the JAR file for this connection.
Returns:
the main Attributes for the JAR file for this connection.
Throws:
IOException - if getting the manifest causes an IOException to be thrown.
See Also:
getJarFile(), getManifest()

getCertificates

public Certificate[] getCertificates()
                              throws IOException
Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise. This method can only be called once the connection has been completely verified by reading from the input stream until the end of the stream has been reached. Otherwise, this method will return null
Returns:
the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.
Throws:
IOException - if getting the JAR entry causes an IOException to be thrown.
See Also:
getJarEntry()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MalformedURLException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class MalformedURLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.MalformedURLException
All Implemented Interfaces:
Serializable
public class MalformedURLException
extends IOException

Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a specification string or the string could not be parsed.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
MalformedURLException()
Constructs a MalformedURLException with no detail message.
MalformedURLException(String msg)
Constructs a MalformedURLException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MalformedURLException

public MalformedURLException()
Constructs a MalformedURLException with no detail message.

MalformedURLException

public MalformedURLException(String msg)
Constructs a MalformedURLException with the specified detail message.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MulticastSocket

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class MulticastSocket

java.lang.Object
  |
  +--java.net.DatagramSocket
        |
        +--java.net.MulticastSocket
public class MulticastSocket
extends DatagramSocket

The multicast datagram socket class is useful for sending and receiving IP multicast packets. A MulticastSocket is a (UDP) DatagramSocket, with additional capabilities for joining "groups" of other multicast hosts on the internet.

A multicast group is specified by a class D IP address and by a standard UDP port number. Class D IP addresses are in the range 224.0.0.0 to 239.255.255.255, inclusive. The address 224.0.0.0 is reserved and should not be used.

One would join a multicast group by first creating a MulticastSocket with the desired port, then invoking the joinGroup(InetAddress groupAddr) method:

 // join a Multicast group and send the group salutations
 ...
 String msg = "Hello";
 InetAddress group = InetAddress.getByName("228.5.6.7");
 MulticastSocket s = new MulticastSocket(6789);
 s.joinGroup(group);
 DatagramPacket hi = new DatagramPacket(msg.getBytes(), msg.length(),
                             group, 6789);
 s.send(hi);
 // get their responses!
 byte[] buf = new byte[1000];
 DatagramPacket recv = new DatagramPacket(buf, buf.length);
 s.receive(recv);
 ...
 // OK, I'm done talking - leave the group...
 s.leaveGroup(group);
When one sends a message to a multicast group, all subscribing recipients to that host and port receive the message (within the time-to-live range of the packet, see below). The socket needn't be a member of the multicast group to send messages to it.

When a socket subscribes to a multicast group/port, it receives datagrams sent by other hosts to the group/port, as do all other members of the group and port. A socket relinquishes membership in a group by the leaveGroup(InetAddress addr) method. Multiple MulticastSocket's may subscribe to a multicast group and port concurrently, and they will all receive group datagrams.

Currently applets are not allowed to use multicast sockets.

Since:
JDK1.1

Constructor Summary
MulticastSocket()
Create a multicast socket.
MulticastSocket(int port)
Create a multicast socket and bind it to a specific port.
Method Summary
InetAddress | getInterface() Retrieve the address of the network interface used for multicast packets.
int | getTimeToLive() Get the default time-to-live for multicast packets sent out on the socket.
byte | getTTL() Deprecated. use the getTimeToLive method instead, which returns an int instead of a byte.
void | joinGroup(InetAddress mcastaddr) Joins a multicast group.Its behavior may be affected by setInterface.
void | leaveGroup(InetAddress mcastaddr) Leave a multicast group.
void | send(DatagramPacket p, byte ttl) Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket.
void | setInterface(InetAddress inf) Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface.
void | setTimeToLive(int ttl) Set the default time-to-live for multicast packets sent out on this socket.
void | setTTL(byte ttl) Deprecated. use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.
Methods inherited from class java.net.DatagramSocket
close, connect, disconnect, getInetAddress, getLocalAddress, getLocalPort, getPort, getReceiveBufferSize, getSendBufferSize, getSoTimeout, receive, send, setDatagramSocketImplFactory, setReceiveBufferSize, setSendBufferSize, setSoTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MulticastSocket

public MulticastSocket()
                throws IOException
Create a multicast socket.

If there is a security manager, its checkListen method is first called with 0 as its argument to ensure the operation is allowed. This could result in a SecurityException.

Throws:
IOException - if an I/O exception occurs while creating the MulticastSocket
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SecurityManager.checkListen(int)

MulticastSocket

public MulticastSocket(int port)
                throws IOException
Create a multicast socket and bind it to a specific port.

If there is a security manager, its checkListen method is first called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - port to use
Throws:
IOException - if an I/O exception occurs while creating the MulticastSocket
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SecurityManager.checkListen(int)
Method Detail

setTTL

public void setTTL(byte ttl)
            throws IOException
Deprecated. use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.

Set the default time-to-live for multicast packets sent out on this socket. The TTL sets the IP time-to-live for DatagramPackets sent to a MulticastGroup, which specifies how many "hops" that the packet will be forwarded on the network before it expires.

The ttl is an unsigned 8-bit quantity, and so must be in the range 0 <= ttl="ttl" <="0xFF" .

Parameters:
ttl - the time-to-live
Throws:
IOException - if an I/O exception occurs while setting the default time-to-live value
See Also:
getTTL()

setTimeToLive

public void setTimeToLive(int ttl)
                   throws IOException
Set the default time-to-live for multicast packets sent out on this socket. The TTL sets the IP time-to-live for DatagramPackets sent to a MulticastGroup, which specifies how many "hops" that the packet will be forwarded on the network before it expires.

The ttl must be in the range 0 <= ttl="ttl" <="255 or an IllegalArgumentException will be thrown.

Parameters:
ttl - the time-to-live
Throws:
IOException - if an I/O exception occurs while setting the default time-to-live value
See Also:
getTimeToLive()

getTTL

public byte getTTL()
            throws IOException
Deprecated. use the getTimeToLive method instead, which returns an int instead of a byte.

Get the default time-to-live for multicast packets sent out on the socket.
Throws:
IOException - if an I/O exception occurs while getting the default time-to-live value
See Also:
setTTL(byte)

getTimeToLive

public int getTimeToLive()
                  throws IOException
Get the default time-to-live for multicast packets sent out on the socket.
Returns:
the default time-to-live value
Throws:
IOException - if an I/O exception occurs while getting the default time-to-live value
See Also:
setTimeToLive(int)

joinGroup

public void joinGroup(InetAddress mcastaddr)
               throws IOException
Joins a multicast group.Its behavior may be affected by setInterface.

If there is a security manager, this method first calls its checkMulticast method with the mcastaddr argument as its argument.

Parameters:
mcastaddr - is the multicast address to join
Throws:
IOException - if there is an error joining or when the address is not a multicast address.
SecurityException - if a security manager exists and its checkMulticast method doesn't allow the join.
See Also:
SecurityManager.checkMulticast(InetAddress)

leaveGroup

public void leaveGroup(InetAddress mcastaddr)
                throws IOException
Leave a multicast group. Its behavior may be affected by setInterface.

If there is a security manager, this method first calls its checkMulticast method with the mcastaddr argument as its argument.

Parameters:
mcastaddr - is the multicast address to leave
Throws:
IOException - if there is an error leaving or when the address is not a multicast address.
SecurityException - if a security manager exists and its checkMulticast method doesn't allow the operation.
See Also:
SecurityManager.checkMulticast(InetAddress)

setInterface

public void setInterface(InetAddress inf)
                  throws SocketException
Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface. Useful for multihomed hosts.
Parameters:
inf - the InetAddress
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
getInterface()

getInterface

public InetAddress getInterface()
                         throws SocketException
Retrieve the address of the network interface used for multicast packets.
Returns:
An InetAddress representing the address of the network interface used for multicast packets.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
setInterface(java.net.InetAddress)

send

public void send(DatagramPacket p,
                 byte ttl)
          throws IOException
Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket. This method need only be used in instances where a particular TTL is desired; otherwise it is preferable to set a TTL once on the socket, and use that default TTL for all packets. This method does not alter the default TTL for the socket. Its behavior may be affected by setInterface.

If there is a security manager, this method first performs some security checks. First, if p.getAddress().isMulticastAddress() is true, this method calls the security manager's checkMulticast method with p.getAddress() and ttl as its arguments. If the evaluation of that expression is false, this method instead calls the security manager's checkConnect method with arguments p.getAddress().getHostAddress() and p.getPort(). Each call to a security manager method could result in a SecurityException if the operation is not allowed.

Parameters:
p - is the packet to be sent. The packet should contain the destination multicast ip address and the data to be sent. One does not need to be the member of the group to send packets to a destination multicast address.
ttl - optional time to live for multicast packet. default ttl is 1.
Throws:
IOException - is raised if an error occurs i.e error while setting ttl.
SecurityException - if a security manager exists and its checkMulticast or checkConnect method doesn't allow the send.
See Also:
DatagramSocket.send(java.net.DatagramPacket),
DatagramSocket.receive(java.net.DatagramPacket),
SecurityManager.checkMulticast(java.net.InetAddress, byte),
SecurityManager.checkConnect(java.lang.String, int)
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


NetPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class NetPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.net.NetPermission
All Implemented Interfaces:
Guard, Serializable
public final class NetPermission
extends BasicPermission

This class is for various network permissions. A NetPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the network permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "foo.*" or "*" is valid, "*foo" or "a*b" is not valid.

The following table lists all the possible NetPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
setDefaultAuthenticator | The ability to set the way authentication information is retrieved when a proxy or HTTP server asks for authentication | Malicious code can set an authenticator that monitors and steals user authentication input as it retrieves the input from the user.
requestPasswordAuthentication | The ability to ask the authenticator registered with the system for a password | Malicious code may steal this password.
specifyStreamHandler | The ability to specify a stream handler when constructing a URL | Malicious code may create a URL with resources that it would normally not have access to (like file:/foo/fum/), specifying a stream handler that gets the actual bytes from someplace it does have access to. Thus it might be able to trick the system into creating a ProtectionDomain/CodeSource for a class even though that class really didn't come from that location.

See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
NetPermission(String name)
Creates a new NetPermission with the specified name.
NetPermission(String name, String actions)
Creates a new NetPermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NetPermission

public NetPermission(String name)
Creates a new NetPermission with the specified name. The name is the symbolic name of the NetPermission, such as "setDefaultAuthenticator", etc. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match.
Parameters:
name - the name of the NetPermission.

NetPermission

public NetPermission(String name,
                     String actions)
Creates a new NetPermission object with the specified name. The name is the symbolic name of the NetPermission, and the actions String is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the NetPermission.
actions - should be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoRouteToHostException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class NoRouteToHostException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.SocketException
                          |
                          +--java.net.NoRouteToHostException
All Implemented Interfaces:
Serializable
public class NoRouteToHostException
extends SocketException

Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
NoRouteToHostException()
Construct a new NoRouteToHostException with no detailed message.
NoRouteToHostException(String msg)
Constructs a new NoRouteToHostException with the specified detail message as to why the remote host cannot be reached.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoRouteToHostException

public NoRouteToHostException(String msg)
Constructs a new NoRouteToHostException with the specified detail message as to why the remote host cannot be reached. A detail message is a String that gives a specific description of this error.
Parameters:
msg - the detail message

NoRouteToHostException

public NoRouteToHostException()
Construct a new NoRouteToHostException with no detailed message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PasswordAuthentication

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class PasswordAuthentication

java.lang.Object
  |
  +--java.net.PasswordAuthentication
public final class PasswordAuthentication
extends Object

The class PasswordAuthentication is a data holder that is used by Authenticator. It is simply a repository for a user name and a password.

Since:
1.2
See Also:
Authenticator, Authenticator.getPasswordAuthentication()

Constructor Summary
PasswordAuthentication(String userName, char[] password)
Creates a new PasswordAuthentication object from the given user name and password.
Method Summary
char[] | getPassword() Returns the user password.
String | getUserName() Returns the user name.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PasswordAuthentication

public PasswordAuthentication(String userName,
                              char[] password)
Creates a new PasswordAuthentication object from the given user name and password.

Note that the given user password is cloned before it is stored in the new PasswordAuthentication object.

Parameters:
userName - the user name
password - the user's password
Method Detail

getUserName

public String getUserName()
Returns the user name.
Returns:
the user name

getPassword

public char[] getPassword()
Returns the user password.

Note that this method returns a reference to the password. It is the caller's responsibility to zero out the password information after it is no longer needed.

Returns:
the password
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProtocolException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class ProtocolException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.ProtocolException
All Implemented Interfaces:
Serializable
public class ProtocolException
extends IOException

Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
ProtocolException()
Constructs a new ProtocolException with no detail message.
ProtocolException(String host)
Constructs a new ProtocolException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ProtocolException

public ProtocolException(String host)
Constructs a new ProtocolException with the specified detail message.
Parameters:
host - the detail message.

ProtocolException

public ProtocolException()
Constructs a new ProtocolException with no detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerSocket

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class ServerSocket

java.lang.Object
  |
  +--java.net.ServerSocket
public class ServerSocket
extends Object

This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.

The actual work of the server socket is performed by an instance of the SocketImpl class. An application can change the socket factory that creates the socket implementation to configure itself to create sockets appropriate to the local firewall.

Since:
JDK1.0
See Also:
SocketImpl, setSocketFactory(java.net.SocketImplFactory)

Constructor Summary
ServerSocket(int port)
Creates a server socket on a specified port.
ServerSocket(int port, int backlog)
Creates a server socket and binds it to the specified local port number, with the specified backlog.
ServerSocket(int port, int backlog, InetAddress bindAddr)
Create a server with the specified port, listen backlog, and local IP address to bind to.
Method Summary
Socket | accept() Listens for a connection to be made to this socket and accepts it.
void | close() Closes this socket.
InetAddress | getInetAddress() Returns the local address of this server socket.
int | getLocalPort() Returns the port on which this socket is listening.
int | getSoTimeout() Retrive setting for SO_TIMEOUT.
protected void | implAccept(Socket s) Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.
static void | setSocketFactory(SocketImplFactory fac) Sets the server socket implementation factory for the application.
void | setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
String | toString() Returns the implementation address and implementation port of this socket as a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServerSocket

public ServerSocket(int port)
             throws IOException
Creates a server socket on a specified port. A port of 0 creates a socket on any free port.

The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.

If the application has specified a server socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkListen method is called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - the port number, or 0 to use any free port.
Throws:
IOException - if an I/O error occurs when opening the socket.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SocketImpl,
SocketImplFactory.createSocketImpl(),
setSocketFactory(java.net.SocketImplFactory),
SecurityManager.checkListen(int)

ServerSocket

public ServerSocket(int port,
                    int backlog)
             throws IOException
Creates a server socket and binds it to the specified local port number, with the specified backlog. A port number of 0 creates a socket on any free port.

The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.

If the application has specified a server socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkListen method is called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - the specified port, or 0 to use any free port.
backlog - the maximum length of the queue.
Throws:
IOException - if an I/O error occurs when opening the socket.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SocketImpl,
SocketImplFactory.createSocketImpl(),
setSocketFactory(java.net.SocketImplFactory),
SecurityManager.checkListen(int)

ServerSocket

public ServerSocket(int port,
                    int backlog,
                    InetAddress bindAddr)
             throws IOException
Create a server with the specified port, listen backlog, and local IP address to bind to. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If bindAddr is null, it will default accepting connections on any/all local addresses. The port must be between 0 and 65535, inclusive.

If there is a security manager, this method calls its checkListen method with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
port - the local TCP port
backlog - the listen backlog
bindAddr - the local InetAddress the server will bind to
Throws:
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
IOException - if an I/O error occurs when opening the socket.
Since:
JDK1.1
See Also:
SocketOptions, SocketImpl, SecurityManager.checkListen(int)
Method Detail

getInetAddress

public InetAddress getInetAddress()
Returns the local address of this server socket.
Returns:
the address to which this socket is connected, or null if the socket is not yet connected.

getLocalPort

public int getLocalPort()
Returns the port on which this socket is listening.
Returns:
the port number to which this socket is listening.

accept

public Socket accept()
              throws IOException
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.

A new Socket s is created and, if there is a security manager, the security manager's checkAccept method is called with s.getInetAddress().getHostAddress() and s.getPort() as its arguments to ensure the operation is allowed. This could result in a SecurityException.

Returns:
the new Socket
Throws:
IOException - if an I/O error occurs when waiting for a connection.
SecurityException - if a security manager exists and its checkListen method doesn't allow the operation.
See Also:
SecurityManager.checkAccept(java.lang.String, int)

implAccept

protected final void implAccept(Socket s)
                         throws IOException
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket. So a FooServerSocket will typically hand this method an empty FooSocket. On return from implAccept the FooSocket will be connected to a client.
Parameters:
s - the Socket
Throws:
IOException - if an I/O error occurs when waiting for a connection.
Since:
JDK1.1

close

public void close()
           throws IOException
Closes this socket.
Throws:
IOException - if an I/O error occurs when closing the socket.

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a call to accept() for this ServerSocket will block for only this amount of time. If the timeout expires, a java.io.InterruptedIOException is raised, though the ServerSocket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.
Parameters:
timeout - the specified timeout, in milliseconds
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
getSoTimeout()

getSoTimeout

public int getSoTimeout()
                 throws IOException
Retrive setting for SO_TIMEOUT. 0 returns implies that the option is disabled (i.e., timeout of infinity).
Returns:
the SO_TIMEOUT value
Throws:
IOException - if an I/O error occurs
Since:
JDK1.1
See Also:
setSoTimeout(int)

toString

public String toString()
Returns the implementation address and implementation port of this socket as a String.
Overrides:
toString in class Object
Returns:
a string representation of this socket.

setSocketFactory

public static void setSocketFactory(SocketImplFactory fac)
                             throws IOException
Sets the server socket implementation factory for the application. The factory can be specified only once.

When an application creates a new server socket, the socket implementation factory's createSocketImpl method is called to create the actual socket implementation.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
fac - the desired factory.
Throws:
IOException - if an I/O error occurs when setting the socket factory.
SocketException - if the factory has already been defined.
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
SocketImplFactory.createSocketImpl(), SecurityManager.checkSetFactory()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Socket

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class Socket

java.lang.Object
  |
  +--java.net.Socket
public class Socket
extends Object

This class implements client sockets (also called just "sockets"). A socket is an endpoint for communication between two machines.

The actual work of the socket is performed by an instance of the SocketImpl class. An application, by changing the socket factory that creates the socket implementation, can configure itself to create sockets appropriate to the local firewall.

Since:
JDK1.0
See Also:
setSocketImplFactory(java.net.SocketImplFactory), SocketImpl

Constructor Summary
protected | Socket() Creates an unconnected socket, with the system-default type of SocketImpl.
 | Socket(InetAddress address, int port) Creates a stream socket and connects it to the specified port number at the specified IP address.
 | Socket(InetAddress host, int port, boolean stream) Deprecated. Use DatagramSocket instead for UDP transport.
 | Socket(InetAddress address, int port, InetAddress localAddr, int localPort) Creates a socket and connects it to the specified remote address on the specified remote port.
protected | Socket(SocketImpl impl) Creates an unconnected Socket with a user-specified SocketImpl.
 | Socket(String host, int port) Creates a stream socket and connects it to the specified port number on the named host.
 | Socket(String host, int port, boolean stream) Deprecated. Use DatagramSocket instead for UDP transport.
 | Socket(String host, int port, InetAddress localAddr, int localPort) Creates a socket and connects it to the specified remote host on the specified remote port.
Method Summary
void | close() Closes this socket.
InetAddress | getInetAddress() Returns the address to which the socket is connected.
InputStream | getInputStream() Returns an input stream for this socket.
boolean | getKeepAlive() Tests if SO_KEEPALIVE is enabled.
InetAddress | getLocalAddress() Gets the local address to which the socket is bound.
int | getLocalPort() Returns the local port to which this socket is bound.
OutputStream | getOutputStream() Returns an output stream for this socket.
int | getPort() Returns the remote port to which this socket is connected.
int | getReceiveBufferSize() Gets the value of the SO_RCVBUF option for this Socket, that is the buffer size used by the platform for input on this Socket.
int | getSendBufferSize() Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket.
int | getSoLinger() Returns setting for SO_LINGER.
int | getSoTimeout() Returns setting for SO_TIMEOUT.
boolean | getTcpNoDelay() Tests if TCP_NODELAY is enabled.
void | setKeepAlive(boolean on) Enable/disable SO_KEEPALIVE.
void | setReceiveBufferSize(int size) Sets the SO_RCVBUF option to the specified value for this Socket.
void | setSendBufferSize(int size) Sets the SO_SNDBUF option to the specified value for this Socket.
static void | setSocketImplFactory(SocketImplFactory fac) Sets the client socket implementation factory for the application.
void | setSoLinger(boolean on, int linger) Enable/disable SO_LINGER with the specified linger time in seconds.
void | setSoTimeout(int timeout) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
void | setTcpNoDelay(boolean on) Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
void | shutdownInput() Places the input stream for this socket at "end of stream".
void | shutdownOutput() Disables the output stream for this socket.
String | toString() Converts this socket to a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Socket

protected Socket()
Creates an unconnected socket, with the system-default type of SocketImpl.
Since:
JDK1.1

Socket

protected Socket(SocketImpl impl)
          throws SocketException
Creates an unconnected Socket with a user-specified SocketImpl.

Parameters:
impl - an instance of a SocketImpl the subclass wishes to use on the Socket.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1

Socket

public Socket(String host,
              int port)
       throws UnknownHostException,
              IOException
Creates a stream socket and connects it to the specified port number on the named host.

If the application has specified a server socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.

Parameters:
host - the host name.
port - the port number.
Throws:
UnknownHostException - if the IP address of the host could not be determined.
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
setSocketImplFactory(java.net.SocketImplFactory), SocketImpl, SocketImplFactory.createSocketImpl(), SecurityManager.checkConnect(java.lang.String, int)

Socket

public Socket(InetAddress address,
              int port)
       throws IOException
Creates a stream socket and connects it to the specified port number at the specified IP address.

If the application has specified a socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.

Parameters:
address - the IP address.
port - the port number.
Throws:
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
setSocketImplFactory(java.net.SocketImplFactory), SocketImpl, SocketImplFactory.createSocketImpl(), SecurityManager.checkConnect(java.lang.String, int)

Socket

public Socket(String host,
              int port,
              InetAddress localAddr,
              int localPort)
       throws IOException
Creates a socket and connects it to the specified remote host on the specified remote port. The Socket will also bind() to the local address and port supplied.

If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.

Parameters:
host - the name of the remote host
port - the remote port
localAddr - the local address the socket is bound to
localPort - the local port the socket is bound to
Throws:
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
Since:
JDK1.1
See Also:
SecurityManager.checkConnect(java.lang.String, int)

Socket

public Socket(InetAddress address,
              int port,
              InetAddress localAddr,
              int localPort)
       throws IOException
Creates a socket and connects it to the specified remote address on the specified remote port. The Socket will also bind() to the local address and port supplied.

If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.

Parameters:
address - the remote address
port - the remote port
localAddr - the local address the socket is bound to
localPort - the local port the socket is bound to
Throws:
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
Since:
JDK1.1
See Also:
SecurityManager.checkConnect(java.lang.String, int)

Socket

public Socket(String host,
              int port,
              boolean stream)
       throws IOException
Deprecated. Use DatagramSocket instead for UDP transport.

Creates a stream socket and connects it to the specified port number on the named host.

If the stream argument is true, this creates a stream socket. If the stream argument is false, it creates a datagram socket.

If the application has specified a server socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.

Parameters:
host - the host name.
port - the port number.
stream - a boolean indicating whether this is a stream socket or a datagram socket.
Throws:
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
setSocketImplFactory(java.net.SocketImplFactory), SocketImpl, SocketImplFactory.createSocketImpl(), SecurityManager.checkConnect(java.lang.String, int)

Socket

public Socket(InetAddress host,
              int port,
              boolean stream)
       throws IOException
Deprecated. Use DatagramSocket instead for UDP transport.

Creates a socket and connects it to the specified port number at the specified IP address.

If the stream argument is true, this creates a stream socket. If the stream argument is false, it creates a datagram socket.

If the application has specified a server socket factory, that factory's createSocketImpl method is called to create the actual socket implementation. Otherwise a "plain" socket is created.

If there is a security manager, its checkConnect method is called with host.getHostAddress() and port as its arguments. This could result in a SecurityException.

Parameters:
host - the IP address.
port - the port number.
stream - if true, create a stream socket; otherwise, create a datagram socket.
Throws:
IOException - if an I/O error occurs when creating the socket.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
setSocketImplFactory(java.net.SocketImplFactory), SocketImpl, SocketImplFactory.createSocketImpl(), SecurityManager.checkConnect(java.lang.String, int)
Method Detail

getInetAddress

public InetAddress getInetAddress()
Returns the address to which the socket is connected.
Returns:
the remote IP address to which this socket is connected.

getLocalAddress

public InetAddress getLocalAddress()
Gets the local address to which the socket is bound.
Returns:
the local address to which the socket is bound.
Since:
JDK1.1

getPort

public int getPort()
Returns the remote port to which this socket is connected.
Returns:
the remote port number to which this socket is connected.

getLocalPort

public int getLocalPort()
Returns the local port to which this socket is bound.
Returns:
the local port number to which this socket is connected.

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns an input stream for this socket.
Returns:
an input stream for reading bytes from this socket.
Throws:
IOException - if an I/O error occurs when creating the input stream.

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Returns an output stream for this socket.
Returns:
an output stream for writing bytes to this socket.
Throws:
IOException - if an I/O error occurs when creating the output stream.

setTcpNoDelay

public void setTcpNoDelay(boolean on)
                   throws SocketException
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
Parameters:
on - true to enable TCP_NODELAY, false to disable.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
getTcpNoDelay()

getTcpNoDelay

public boolean getTcpNoDelay()
                      throws SocketException
Tests if TCP_NODELAY is enabled.
Returns:
a boolean indicating whether or not TCP_NODELAY is enabled.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
setTcpNoDelay(boolean)

setSoLinger

public void setSoLinger(boolean on,
                        int linger)
                 throws SocketException
Enable/disable SO_LINGER with the specified linger time in seconds. The maximum timeout value is platform specific. The setting only affects socket close.
Parameters:
on - whether or not to linger on.
linger - how to linger for, if on is true.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
IllegalArgumentException - if the linger value is negative.
Since:
JDK1.1
See Also:
getSoLinger()

getSoLinger

public int getSoLinger()
                throws SocketException
Returns setting for SO_LINGER. -1 returns implies that the option is disabled. The setting only affects socket close.
Returns:
the setting for SO_LINGER.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
setSoLinger(boolean, int)

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.io.InterruptedIOException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.
Parameters:
timeout - the specified timeout, in milliseconds.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK 1.1
See Also:
getSoTimeout()

getSoTimeout

public int getSoTimeout()
                 throws SocketException
Returns setting for SO_TIMEOUT. 0 returns implies that the option is disabled (i.e., timeout of infinity).
Returns:
the setting for SO_TIMEOUT
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
JDK1.1
See Also:
setSoTimeout(int)

setSendBufferSize

public void setSendBufferSize(int size)
                       throws SocketException
Sets the SO_SNDBUF option to the specified value for this Socket. The SO_SNDBUF option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers.

Increasing buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. For UDP, this sets the maximum size of a packet that may be sent on this Socket.

Because SO_SNDBUF is a hint, applications that want to verify what size the buffers were set to should call getSendBufferSize().

Parameters:
size - the size to which to set the send buffer size. This value must be greater than 0.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
IllegalArgumentException - if the value is 0 or is negative.
See Also:
getSendBufferSize()

getSendBufferSize

public int getSendBufferSize()
                      throws SocketException
Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket.
Returns:
the value of the SO_SNDBUF option for this Socket.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
setSendBufferSize(int)

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws SocketException
Sets the SO_RCVBUF option to the specified value for this Socket. The SO_RCVBUF option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers.

Increasing buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. For UDP, this sets the maximum size of a packet that may be sent on this Socket.

Because SO_RCVBUF is a hint, applications that want to verify what size the buffers were set to should call getReceiveBufferSize().

Parameters:
size - the size to which to set the receive buffer size. This value must be greater than 0.
Throws:
IllegalArgumentException - if the value is 0 or is negative.
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
getReceiveBufferSize()

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws SocketException
Gets the value of the SO_RCVBUF option for this Socket, that is the buffer size used by the platform for input on this Socket.
Returns:
the value of the SO_RCVBUF option for this Socket.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
See Also:
setReceiveBufferSize(int)

setKeepAlive

public void setKeepAlive(boolean on)
                  throws SocketException
Enable/disable SO_KEEPALIVE.
Parameters:
on - whether or not to have socket keep alive turned on.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
1.3
See Also:
getKeepAlive()

getKeepAlive

public boolean getKeepAlive()
                     throws SocketException
Tests if SO_KEEPALIVE is enabled.
Returns:
a boolean indicating whether or not SO_KEEPALIVE is enabled.
Throws:
SocketException - if there is an error in the underlying protocol, such as a TCP error.
Since:
1.3
See Also:
setKeepAlive(boolean)

close

public void close()
           throws IOException
Closes this socket.
Throws:
IOException - if an I/O error occurs when closing this socket.

shutdownInput

public void shutdownInput()
                   throws IOException
Places the input stream for this socket at "end of stream". Any data sent to the input stream side of the socket is acknowledged and then silently discarded. If you read from a socket input stream after invoking shutdownInput() on the socket, the stream will return EOF.
Throws:
IOException - if an I/O error occurs when shutting down this socket.
See Also:
shutdownOutput(),
close(),
setSoLinger(boolean, int)

shutdownOutput

public void shutdownOutput()
                    throws IOException
Disables the output stream for this socket. For a TCP socket, any previously written data will be sent followed by TCP's normal connection termination sequence. If you write to a socket output stream after invoking shutdownOutput() on the socket, the stream will throw an IOException.
Throws:
IOException - if an I/O error occurs when shutting down this socket.
See Also:
shutdownInput(),
close(),
setSoLinger(boolean, int)

toString

public String toString()
Converts this socket to a String.
Overrides:
toString in class Object
Returns:
a string representation of this socket.

setSocketImplFactory

public static void setSocketImplFactory(SocketImplFactory fac)
                                 throws IOException
Sets the client socket implementation factory for the application. The factory can be specified only once.

When an application creates a new client socket, the socket implementation factory's createSocketImpl method is called to create the actual socket implementation.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
fac - the desired factory.
Throws:
IOException - if an I/O error occurs when setting the socket factory.
SocketException - if the factory is already defined.
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
SocketImplFactory.createSocketImpl(), SecurityManager.checkSetFactory()
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


SocketException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class SocketException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.SocketException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BindException, ConnectException, NoRouteToHostException
public class SocketException
extends IOException

Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
SocketException()
Constructs a new SocketException with no detail message.
SocketException(String msg)
Constructs a new SocketException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SocketException

public SocketException(String msg)
Constructs a new SocketException with the specified detail message.
Parameters:
msg - the detail message.

SocketException

public SocketException()
Constructs a new SocketException with no detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SocketImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class SocketImpl

java.lang.Object
  |
  +--java.net.SocketImpl
All Implemented Interfaces:
SocketOptions
public abstract class SocketImpl
extends Object
implements SocketOptions

The abstract class SocketImpl is a common superclass of all classes that actually implement sockets. It is used to create both client and server sockets.

A "plain" socket implements these methods exactly as described, without attempting to go through a firewall or proxy.

Since:
JDK1.0

Field Summary
protected InetAddress | address The IP address of the remote end of this socket.
protected FileDescriptor | fd The file descriptor object for this socket.
protected int | localport The local port number to which this socket is connected.
protected int | port The port number on the remote host to which this socket is connected.
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, SO_BINDADDR, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
Constructor Summary
SocketImpl()
Method Summary
protected abstract void | accept(SocketImpl s) Accepts a connection.
protected abstract int | available() Returns the number of bytes that can be read from this socket without blocking.
protected abstract void | bind(InetAddress host, int port) Binds this socket to the specified port number on the specified host.
protected abstract void | close() Closes this socket.
protected abstract void | connect(InetAddress address, int port) Connects this socket to the specified port number on the specified host.
protected abstract void | connect(String host, int port) Connects this socket to the specified port on the named host.
protected abstract void | create(boolean stream) Creates either a stream or a datagram socket.
protected FileDescriptor | getFileDescriptor() Returns the value of this socket's fd field.
protected InetAddress | getInetAddress() Returns the value of this socket's address field.
protected abstract InputStream | getInputStream() Returns an input stream for this socket.
protected int | getLocalPort() Returns the value of this socket's localport field.
protected abstract OutputStream | getOutputStream() Returns an output stream for this socket.
protected int | getPort() Returns the value of this socket's port field.
protected abstract void | listen(int backlog) Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.
protected void | shutdownInput() Places the input stream for this socket at "end of stream".
protected void | shutdownOutput() Disables the output stream for this socket.
String | toString() Returns the address and port of this socket as a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.net.SocketOptions
getOption, setOption

Field Detail

fd

protected FileDescriptor fd
The file descriptor object for this socket.

address

protected InetAddress address
The IP address of the remote end of this socket.

port

protected int port
The port number on the remote host to which this socket is connected.

localport

protected int localport
The local port number to which this socket is connected.
Constructor Detail

SocketImpl

public SocketImpl()
Method Detail

create

protected abstract void create(boolean stream)
                        throws IOException
Creates either a stream or a datagram socket.
Parameters:
stream - if true, create a stream socket; otherwise, create a datagram socket.
Throws:
IOException - if an I/O error occurs while creating the socket.

connect

protected abstract void connect(String host,
                                int port)
                         throws IOException
Connects this socket to the specified port on the named host.
Parameters:
host - the name of the remote host.
port - the port number.
Throws:
IOException - if an I/O error occurs when connecting to the remote host.

connect

protected abstract void connect(InetAddress address,
                                int port)
                         throws IOException
Connects this socket to the specified port number on the specified host.
Parameters:
address - the IP address of the remote host.
port - the port number.
Throws:
IOException - if an I/O error occurs when attempting a connection.

bind

protected abstract void bind(InetAddress host,
                             int port)
                      throws IOException
Binds this socket to the specified port number on the specified host.
Parameters:
host - the IP address of the remote host.
port - the port number.
Throws:
IOException - if an I/O error occurs when binding this socket.

listen

protected abstract void listen(int backlog)
                        throws IOException
Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument. If a connection indication arrives when the queue is full, the connection is refused.
Parameters:
backlog - the maximum length of the queue.
Throws:
IOException - if an I/O error occurs when creating the queue.

accept

protected abstract void accept(SocketImpl s)
                        throws IOException
Accepts a connection.
Parameters:
s - the accepted connection.
Throws:
IOException - if an I/O error occurs when accepting the connection.

getInputStream

protected abstract InputStream getInputStream()
                                       throws IOException
Returns an input stream for this socket.
Returns:
a stream for reading from this socket.
Throws:
IOException - if an I/O error occurs when creating the input stream.

getOutputStream

protected abstract OutputStream getOutputStream()
                                         throws IOException
Returns an output stream for this socket.
Returns:
an output stream for writing to this socket.
Throws:
IOException - if an I/O error occurs when creating the output stream.

available

protected abstract int available()
                          throws IOException
Returns the number of bytes that can be read from this socket without blocking.
Returns:
the number of bytes that can be read from this socket without blocking.
Throws:
IOException - if an I/O error occurs when determining the number of bytes available.

close

protected abstract void close()
                       throws IOException
Closes this socket.
Throws:
IOException - if an I/O error occurs when closing this socket.

shutdownInput

protected void shutdownInput()
                      throws IOException
Places the input stream for this socket at "end of stream". Any data sent to this socket is acknowledged and then silently discarded. If you read from a socket input stream after invoking shutdownInput() on the socket, the stream will return EOF.
Throws:
IOException - if an I/O error occurs when shutting down this socket.
See Also:
Socket.shutdownOutput(),
Socket.close(),
Socket.setSoLinger(boolean, int)

shutdownOutput

protected void shutdownOutput()
                       throws IOException
Disables the output stream for this socket. For a TCP socket, any previously written data will be sent followed by TCP's normal connection termination sequence. If you write to a socket output stream after invoking shutdownOutput() on the socket, the stream will throw an IOException.
Throws:
IOException - if an I/O error occurs when shutting down this socket.
See Also:
Socket.shutdownInput(),
Socket.close(),
Socket.setSoLinger(boolean, int)

getFileDescriptor

protected FileDescriptor getFileDescriptor()
Returns the value of this socket's fd field.
Returns:
the value of this socket's fd field.
See Also:
fd

getInetAddress

protected InetAddress getInetAddress()
Returns the value of this socket's address field.
Returns:
the value of this socket's address field.
See Also:
address

getPort

protected int getPort()
Returns the value of this socket's port field.
Returns:
the value of this socket's port field.
See Also:
port

getLocalPort

protected int getLocalPort()
Returns the value of this socket's localport field.
Returns:
the value of this socket's localport field.
See Also:
localport

toString

public String toString()
Returns the address and port of this socket as a String.
Overrides:
toString in class Object
Returns:
a string representation of this socket.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SocketImplFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Interface SocketImplFactory

public interface SocketImplFactory

This interface defines a factory for socket implementations. It is used by the classes Socket and ServerSocket to create actual socket implementations.

Since:
JDK1.0
See Also:
Socket, ServerSocket

Method Summary
 SocketImpl createSocketImpl()
Creates a new SocketImpl instance.

Method Detail

createSocketImpl

public SocketImpl createSocketImpl()
Creates a new SocketImpl instance.
Returns:
a new instance of SocketImpl.
See Also:
SocketImpl
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SocketOptions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Interface SocketOptions

All Known Implementing Classes:
DatagramSocketImpl, SocketImpl
public interface SocketOptions

Interface of methods to get/set socket options. This interface is implemented by: SocketImpl and DatagramSocketImpl. Subclasses of these should override the methods of this interface in order to support their own options.

The methods and constants which specify options in this interface are for implementation only. If you're not subclassing SocketImpl or DatagramSocketImpl, you won't use these directly. There are type-safe methods to get/set each of these options in Socket, ServerSocket, DatagramSocket and MulticastSocket.

A subset of the standard BSD-style socket options are supported in the base classes, PlainSocketImpl and PlainDatagramSocketImpl. A brief description of each and their use is provided.

Field Summary
static int | IP_MULTICAST_IF Set which outgoing interface on which to send multicast packets.
static int | SO_BINDADDR Fetch the local address binding of a socket (this option cannot be "set" only "gotten", since sockets are bound at creation time, and so the locally bound address cannot be changed).
static int | SO_KEEPALIVE When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer.
static int | SO_LINGER Specify a linger-on-close timeout.
static int | SO_RCVBUF Set a hint the size of the underlying buffers used by the platform for incoming network I/O.
static int | SO_REUSEADDR Sets SO_REUSEADDR for a socket.
static int | SO_SNDBUF Set a hint the size of the underlying buffers used by the platform for outgoing network I/O.
static int | SO_TIMEOUT Set a timeout on blocking Socket operations:
static int | TCP_NODELAY Disable Nagle's algorithm for this connection.
Method Summary
Object | getOption(int optID) Fetch the value of an option.
void | setOption(int optID, Object value) Enable/disable the option specified by optID.

Field Detail

TCP_NODELAY

public static final int TCP_NODELAY
Disable Nagle's algorithm for this connection. Written data to the network is not buffered pending acknowledgement of previously written data.

Valid for TCP only: SocketImpl.

See Also:
Socket.setTcpNoDelay(boolean), Socket.getTcpNoDelay()

SO_BINDADDR

public static final int SO_BINDADDR
Fetch the local address binding of a socket (this option cannot be "set" only "gotten", since sockets are bound at creation time, and so the locally bound address cannot be changed). The default local address of a socket is INADDR_ANY, meaning any local address on a multi-homed host. A multi-homed host can use this option to accept connections to only one of its addresses (in the case of a ServerSocket or DatagramSocket), or to specify its return address to the peer (for a Socket or DatagramSocket). The parameter of this option is an InetAddress.

This option must be specified in the constructor.

Valid for: SocketImpl, DatagramSocketImpl

See Also:
Socket.getLocalAddress(), DatagramSocket.getLocalAddress()

SO_REUSEADDR

public static final int SO_REUSEADDR
Sets SO_REUSEADDR for a socket. This is used only for MulticastSockets in java, and it is set by default for MulticastSockets.

Valid for: DatagramSocketImpl

IP_MULTICAST_IF

public static final int IP_MULTICAST_IF
Set which outgoing interface on which to send multicast packets. Useful on hosts with multiple network interfaces, where applications want to use other than the system default. Takes/returns an InetAddress.

Valid for Multicast: DatagramSocketImpl

See Also:
MulticastSocket.setInterface(java.net.InetAddress), MulitcastSocket#getInterface

SO_LINGER

public static final int SO_LINGER
Specify a linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Upon reaching the linger timeout, the socket is closed forcefully, with a TCP RST. Enabling the option with a timeout of zero does a forceful close immediately. If the specified timeout value exceeds 65,535 it will be reduced to 65,535.

Valid only for TCP: SocketImpl

See Also:
Socket.setSoLinger(boolean, int), Socket.getSoLinger()

SO_TIMEOUT

public static final int SO_TIMEOUT
Set a timeout on blocking Socket operations:
 ServerSocket.accept();
 SocketInputStream.read();
 DatagramSocket.receive();

The option must be set prior to entering a blocking operation to take effect. If the timeout expires and the operation would continue to block, java.io.InterruptedIOException is raised. The Socket is not closed in this case.

Valid for all sockets: SocketImpl, DatagramSocketImpl

See Also:
Socket.setSoTimeout(int),
ServerSocket.setSoTimeout(int),
DatagramSocket.setSoTimeout(int)

SO_SNDBUF

public static final int SO_SNDBUF
Set a hint the size of the underlying buffers used by the platform for outgoing network I/O. When used in set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket. When used in get, this must return the size of the buffer actually used by the platform when sending out data on this socket. Valid for all sockets: SocketImpl, DatagramSocketImpl
See Also:
Socket.setSendBufferSize(int),
Socket.getSendBufferSize(),
DatagramSocket.setSendBufferSize(int),
DatagramSocket.getSendBufferSize()

SO_RCVBUF

public static final int SO_RCVBUF
Set a hint the size of the underlying buffers used by the platform for incoming network I/O. When used in set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket. When used in get, this must return the size of the buffer actually used by the platform when receiving in data on this socket. Valid for all sockets: SocketImpl, DatagramSocketImpl
See Also:
Socket.setReceiveBufferSize(int),
Socket.getReceiveBufferSize(),
DatagramSocket.setReceiveBufferSize(int),
DatagramSocket.getReceiveBufferSize()

SO_KEEPALIVE

public static final int SO_KEEPALIVE
When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer. This probe is a TCP segment to which the peer must respond. One of three responses is expected: 1. The peer responds with the expected ACK. The application is not notified (since everything is OK). TCP will send another probe following another 2 hours of inactivity. 2. The peer responds with an RST, which tells the local TCP that the peer host has crashed and rebooted. The socket is closed. 3. There is no response from the peer. The socket is closed. The purpose of this option is to detect if the peer host crashes. Valid only for TCP socket: SocketImpl
See Also:
Socket.setKeepAlive(boolean), Socket.getKeepAlive()
Method Detail

setOption

public void setOption(int optID,
                      Object value)
               throws SocketException
Enable/disable the option specified by optID. If the option is to be enabled, and it takes an option-specific "value", this is passed in value. The actual type of value is option-specific, and it is an error to pass something that isn't of the expected type:
 SocketImpl s;
 ...
 s.setOption(SO_LINGER, new Integer(10));
    // OK - set SO_LINGER w/ timeout of 10 sec.
 s.setOption(SO_LINGER, new Double(10));
    // ERROR - expects java.lang.Integer
If the requested option is binary, it can be set using this method by a java.lang.Boolean:
 s.setOption(TCP_NODELAY, new Boolean(true));
    // OK - enables TCP_NODELAY, a binary option

Any option can be disabled using this method with a Boolean(false):
 s.setOption(TCP_NODELAY, new Boolean(false));
    // OK - disables TCP_NODELAY
 s.setOption(SO_LINGER, new Boolean(false));
    // OK - disables SO_LINGER

For an option that has a notion of on and off, and requires a non-boolean parameter, setting its value to anything other than Boolean(false) implicitly enables it.
Throws SocketException if the option is unrecognized, the socket is closed, or some low-level error occurred
Parameters:
optID - identifies the option
value - the parameter of the socket option
Throws:
SocketException - if the option is unrecognized, the socket is closed, or some low-level error occurred
See Also:
getOption(int)

getOption

public Object getOption(int optID)
                 throws SocketException
Fetch the value of an option. Binary options will return java.lang.Boolean(true) if enabled, java.lang.Boolean(false) if disabled, e.g.:
 SocketImpl s;
 ...
 Boolean noDelay = (Boolean)(s.getOption(TCP_NODELAY));
 if (noDelay.booleanValue()) {
     // true if TCP_NODELAY is enabled...
 ...
 }

For options that take a particular type as a parameter, getOption(int) will return the paramter's value, else it will return java.lang.Boolean(false):

 Object o = s.getOption(SO_LINGER);
 if (o instanceof Integer) {
     System.out.print("Linger time is " + ((Integer)o).intValue());
 } else {
   // the true type of o is java.lang.Boolean(false);
 }
Parameters:
optID - an int identifying the option to fetch
Returns:
the value of the option
Throws:
SocketException - if the socket is closed
SocketException - if optID is unknown along the protocol stack (including the SocketImpl)
See Also:
setOption(int, java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SocketPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class SocketPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.net.SocketPermission
All Implemented Interfaces:
Guard, Serializable
public final class SocketPermission
extends Permission
implements Serializable

This class represents access to a network via sockets. A SocketPermission consists of a host specification and a set of "actions" specifying ways to connect to that host. The host is specified as

    host = (hostname | IPaddress)[:portrange]
    portrange = portnumber | -portnumber | portnumber-[portnumber]
The host is expressed as a DNS name, as a numerical IP address, or as "localhost" (for the local machine). The wildcard "*" may be included once in a DNS name host specification. If it is included, it must be in the leftmost position, as in "*.sun.com".

The port or portrange is optional. A port specification of the form "N-", where N is a port number, signifies all ports numbered N and above, while a specification of the form "-N" indicates all ports numbered N and below.

The possible ways to connect to the host are

 accept
 connect
 listen
 resolve
The "listen" action is only meaningful when used with "localhost". The "resolve" (resolve host/ip name service lookups) action is implied when any of the other actions are present.

As an example of the creation and meaning of SocketPermissions, note that if the following permission:

   p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");
is granted to some code, it allows that code to connect to port 7777 on puffin.eng.sun.com, and to accept connections on that port.

Similarly, if the following permission:

   p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");
   p2 = new SocketPermission("localhost:1024-", "accept,connect,listen");
is granted to some code, it allows that code to accept connections on, connect to, or listen on any port between 1024 and 65535 on the local host.

Note: Granting code permission to accept or make connections to remote hosts may be dangerous because malevolent code can then more easily transfer and share confidential data among parties who may not otherwise have access to the data.

See Also:
Permissions, SocketPermission, Serialized Form

Constructor Summary
SocketPermission(String host, String action)
Creates a new SocketPermission object with the specified actions.
Method Summary
boolean | equals(Object obj) Checks two SocketPermission objects for equality.
String | getActions() Returns the canonical string representation of the actions.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) Checks if this socket permission object "implies" the specified permission.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing SocketPermission objects.
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SocketPermission

public SocketPermission(String host,
                        String action)
Creates a new SocketPermission object with the specified actions. The host is expressed as a DNS name, or as a numerical IP address. Optionally, a port or a portrange may be supplied (separated from the DNS name or IP address by a colon).

To specify the local machine, use "localhost" as the host. Also note: An empty host String ("") is equivalent to "localhost".

The actions parameter contains a comma-separated list of the actions granted for the specified host (and port(s)). Possible actions are "connect", "listen", "accept", "resolve", or any combination of those. "resolve" is automatically added when any of the other three are specified.

Examples of SocketPermission instantiation are the following:

    nr = new SocketPermission("www.catalog.com", "connect");
    nr = new SocketPermission("www.sun.com:80", "connect");
    nr = new SocketPermission("*.sun.com", "connect");
    nr = new SocketPermission("*.edu", "resolve");
    nr = new SocketPermission("204.160.241.0", "connect");
    nr = new SocketPermission("localhost:1024-65535", "listen");
    nr = new SocketPermission("204.160.241.0:1024-65535", "connect");
Parameters:
host - the hostname or IPaddress of the computer, optionally including a colon followed by a port or port range.
action - the action string.
Method Detail

implies

public boolean implies(Permission p)
Checks if this socket permission object "implies" the specified permission.

More specifically, this method first ensures that all of the following are true (and returns false if any of them are not):

  • p is an instanceof SocketPermission,

  • p's actions are a proper subset of this object's actions, and

  • p's port range is included in this port range.

Then implies checks each of the following, in order, and for each returns true if the stated condition is true:

  • If this object was initialized with a single IP address and one of p's IP addresses is equal to this object's IP address.

  • If this object is a wildcard domain (such as *.sun.com), and p's canonical name (the name without any preceding *) ends with this object's canonical host name. For example, *.sun.com implies *.eng.sun.com..

  • If this object was not initialized with a single IP address, and one of this object's IP addresses equals one of p's IP addresses.

  • If this canonical name equals p's canonical name.

If none of the above are true, implies returns false.
Overrides:
implies in class Permission
Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(Object obj)
Checks two SocketPermission objects for equality.

Overrides:
equals in class Permission
Parameters:
obj - the object to test for equality with this object.
Returns:
true if obj is a SocketPermission, and has the same hostname, port range, and actions as this SocketPermission object.

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Permission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the canonical string representation of the actions. Always returns present actions in the following order: connect, listen, accept, resolve.
Overrides:
getActions in class Permission
Returns:
the canonical string representation of the actions.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing SocketPermission objects.

SocketPermission objects must be stored in a manner that allows them to be inserted into the collection in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.

Overrides:
newPermissionCollection in class Permission
Returns:
a new PermissionCollection object suitable for storing SocketPermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownHostException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class UnknownHostException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.UnknownHostException
All Implemented Interfaces:
Serializable
public class UnknownHostException
extends IOException

Thrown to indicate that the IP address of a host could not be determined.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
UnknownHostException()
Constructs a new UnknownHostException with no detail message.
UnknownHostException(String host)
Constructs a new UnknownHostException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownHostException

public UnknownHostException(String host)
Constructs a new UnknownHostException with the specified detail message.
Parameters:
host - the detail message.

UnknownHostException

public UnknownHostException()
Constructs a new UnknownHostException with no detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownServiceException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Class UnknownServiceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.net.UnknownServiceException
All Implemented Interfaces:
Serializable
public class UnknownServiceException
extends IOException

Thrown to indicate that an unknown service exception has occurred. Either the MIME type returned by a URL connection does not make sense, or the application is attempting to write to a read-only URL connection.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
UnknownServiceException()
Constructs a new UnknownServiceException with no detail message.
UnknownServiceException(String msg)
Constructs a new UnknownServiceException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownServiceException

public UnknownServiceException()
Constructs a new UnknownServiceException with no detail message.

UnknownServiceException

public UnknownServiceException(String msg)
Constructs a new UnknownServiceException with the specified detail message.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


URL

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class URL

java.lang.Object
  |
  +--java.net.URL
All Implemented Interfaces:
Serializable
public final class URL
extends Object
implements Serializable

Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as a query to a database or to a search engine. More information on the types of URLs and their formats can be found at:

     http://www.ncsa.uiuc.edu/demoweb/url-primer.html

In general, a URL can be broken into several parts. The previous example of a URL indicates that the protocol to use is http (HyperText Transfer Protocol) and that the information resides on a host machine named www.ncsa.uiuc.edu. The information on that host machine is named /demoweb/url-primer.html. The exact meaning of this name on the host machine is both protocol dependent and host dependent. The information normally resides in a file, but it could be generated on the fly. This component of the URL is called the path component.

A URL can optionally specify a "port", which is the port number to which the TCP connection is made on the remote host machine. If the port is not specified, the default port for the protocol is used instead. For example, the default port for http is 80. An alternative port could be specified as:

     http://www.ncsa.uiuc.edu:8080/demoweb/url-primer.html

A URL may have appended to it a "fragment", also known as a "ref" or a "reference". The fragment is indicated by the sharp sign character "#" followed by more characters. For example,

     http://java.sun.com/index.html#chapter1

This fragment is not technically part of the URL. Rather, it indicates that after the specified resource is retrieved, the application is specifically interested in that part of the document that has the tag chapter1 attached to it. The meaning of a tag is resource specific.

An application can also specify a "relative URL", which contains only enough information to reach the resource relative to another URL. Relative URLs are frequently used within HTML pages. For example, if the contents of the URL:

     http://java.sun.com/index.html
contained within it the relative URL:
     FAQ.html
it would be a shorthand for:
     http://java.sun.com/FAQ.html

The relative URL need not specify all the components of a URL. If the protocol, host name, or port number is missing, the value is inherited from the fully specified URL. The file component must be specified. The optional fragment is not inherited.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
URL(String spec)
Creates a URL object from the String representation.
URL(String protocol, String host, int port, String file)
Creates a URL object from the specified protocol, host, port number, and file.
URL(String protocol, String host, int port, String file, URLStreamHandler handler)
Creates a URL object from the specified protocol, host, port number, file, and handler.
URL(String protocol, String host, String file)
Creates a URL from the specified protocol name, host name, and file name.
URL(URL context, String spec)
Creates a URL by parsing the given spec within a specified context.
URL(URL context, String spec, URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler within a specified context.
Method Summary
boolean | equals(Object obj) Compares two URLs.
String | getAuthority() Returns the authority part of this URL.
Object | getContent() Returns the contents of this URL.
Object | getContent(Class[] classes) Returns the contents of this URL.
String | getFile() Returns the file name of this URL.
String | getHost() Returns the host name of this URL, if applicable.
String | getPath() Returns the path part of this URL.
int | getPort() Returns the port number of this URL.
String | getProtocol() Returns the protocol name of this URL.
String | getQuery() Returns the query part of this URL.
String | getRef() Returns the anchor (also known as the "reference") of this URL.
String | getUserInfo() Returns the userInfo part of this URL.
int | hashCode() Creates an integer suitable for hash table indexing.
URLConnection | openConnection() Returns a URLConnection object that represents a connection to the remote object referred to by the URL.
InputStream | openStream() Opens a connection to this URL and returns an InputStream for reading from that connection.
boolean | sameFile(URL other) Compares two URLs, excluding the "ref" fields.
protected void | set(String protocol, String host, int port, String file, String ref) Sets the fields of the URL.
protected void | set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) Sets the specified 8 fields of the URL.
static void | setURLStreamHandlerFactory(URLStreamHandlerFactory fac) Sets an application's URLStreamHandlerFactory.
String | toExternalForm() Constructs a string representation of this URL.
String | toString() Constructs a string representation of this URL.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

URL

public URL(String protocol,
           String host,
           int port,
           String file)
    throws MalformedURLException
Creates a URL object from the specified protocol, host, port number, and file. Specifying a port number of -1 indicates that the URL should use the default port for the protocol.

If this is the first URL object being created with the specified protocol, a stream protocol handler object, an instance of class URLStreamHandler, is created for that protocol:

  1. If the application has previously set up an instance of URLStreamHandlerFactory as the stream handler factory, then the createURLStreamHandler method of that instance is called with the protocol string as an argument to create the stream protocol handler.
  2. If no URLStreamHandlerFactory has yet been set up, or if the factory's createURLStreamHandler method returns null, then the constructor finds the value of the system property:
             java.protocol.handler.pkgs
    If the value of that system property is not null, it is interpreted as a list of packages separated by a vertical slash character '|'. The constructor tries to load the class named:
             <package>.<protocol>.Handler
    where <package> is replaced by the name of the package and <protocol> is replaced by the name of the protocol. If this class does not exist, or if the class exists but it is not a subclass of URLStreamHandler, then the next package in the list is tried.
  3. If the previous step fails to find a protocol handler, then the constructor tries to load the class named:
             sun.net.www.protocol.<protocol>.Handler
    If this class does not exist, or if the class exists but it is not a subclass of URLStreamHandler, then a MalformedURLException is thrown.
Parameters:
protocol - the name of the protocol to use.
host - the name of the host.
port - the port number on the host.
file - the file on the host
Throws:
MalformedURLException - if an unknown protocol is specified.
See Also:
System.getProperty(java.lang.String), setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory), URLStreamHandler, URLStreamHandlerFactory.createURLStreamHandler(java.lang.String)

URL

public URL(String protocol,
           String host,
           String file)
    throws MalformedURLException
Creates a URL from the specified protocol name, host name, and file name. The default port for the specified protocol is used.

This method is equivalent to calling the four-argument constructor with the arguments being protocol, host, -1, and file.

Parameters:
protocol - the name of the protocol to use.
host - the name of the host.
file - the file on the host.
Throws:
MalformedURLException - if an unknown protocol is specified.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String)

URL

public URL(String protocol,
           String host,
           int port,
           String file,
           URLStreamHandler handler)
    throws MalformedURLException
Creates a URL object from the specified protocol, host, port number, file, and handler. Specifying a port number of -1 indicates that the URL should use the default port for the protocol. Specifying a handler of null indicates that the URL should use a default stream handler for the protocol, as outlined for: java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String)

If the handler is not null and there is a security manager, the security manager's checkPermission method is called with a NetPermission("specifyStreamHandler") permission. This may result in a SecurityException.

Parameters:
protocol - the name of the protocol to use.
host - the name of the host.
port - the port number on the host.
file - the file on the host
handler - the stream handler for the URL.
Throws:
MalformedURLException - if an unknown protocol is specified.
SecurityException - if a security manager exists and its checkPermission method doesn't allow specifying a stream handler explicitly.
See Also:
System.getProperty(java.lang.String), setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory), URLStreamHandler, URLStreamHandlerFactory.createURLStreamHandler(java.lang.String), SecurityManager.checkPermission(java.security.Permission), NetPermission

URL

public URL(String spec)
    throws MalformedURLException
Creates a URL object from the String representation.

This constructor is equivalent to a call to the two-argument constructor with a null first argument.

Parameters:
spec - the String to parse as a URL.
Throws:
MalformedURLException - If the string specifies an unknown protocol.
See Also:
URL(java.net.URL, java.lang.String)

URL

public URL(URL context,
           String spec)
    throws MalformedURLException
Creates a URL by parsing the given spec within a specified context. The new URL is created from the given context URL and the spec argument as described in RFC2396 "Uniform Resource Identifiers : Generic Syntax" :
          <scheme>://<authority><path>?<query>#<fragment>
The reference is parsed into the scheme, authority, path, query and fragment parts. If the path component is empty and the scheme, authority, and query components are undefined, then the new URL is a reference to the current document. Otherwise the any fragment and query parts present in the spec are used in the new URL. If the scheme component is defined in the given spec and does not match the scheme of the context, then the new URL is created as an absolute URL based on the spec alone. Otherwise the scheme component is inherited from the context URL. If the authority component is present in the spec then the spec is treated as absolute and the spec authority and path will replace the context authority and path. If the authority component is absent in the spec then the authority of the new URL will be inherited from the context. If the spec's path component begins with a slash character "/" then the path is treated as absolute and the spec path replaces the context path. Otherwise the path is treated as a relative path and is appended to the context path. The path is canonicalized through the removal of directory changes made by occurences of ".." and ".". For a more detailed description of URL parsing, refer to RFC2396.
Parameters:
context - the context in which to parse the specification.
spec - the String to parse as a URL.
Throws:
MalformedURLException - if no protocol is specified, or an unknown protocol is found.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLStreamHandler, URLStreamHandler.parseURL(java.net.URL, java.lang.String, int, int)

URL

public URL(URL context,
           String spec,
           URLStreamHandler handler)
    throws MalformedURLException
Creates a URL by parsing the given spec with the specified handler within a specified context. If the handler is null, the parsing occurs as with the two argument constructor.
Parameters:
context - the context in which to parse the specification.
spec - the String to parse as a URL.
handler - the stream handler for the URL.
Throws:
MalformedURLException - if no protocol is specified, or an unknown protocol is found.
SecurityException - if a security manager exists and its checkPermission method doesn't allow specifying a stream handler.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLStreamHandler, URLStreamHandler.parseURL(java.net.URL, java.lang.String, int, int)
Method Detail

set

protected void set(String protocol,
                   String host,
                   int port,
                   String file,
                   String ref)
Sets the fields of the URL. This is not a public method so that only URLStreamHandlers can modify URL fields. URLs are otherwise constant.
Parameters:
protocol - the name of the protocol to use
host - the name of the host
port - the port number on the host
file - the file on the host
ref - the internal reference in the URL

set

protected void set(String protocol,
                   String host,
                   int port,
                   String authority,
                   String userInfo,
                   String path,
                   String query,
                   String ref)
Sets the specified 8 fields of the URL. This is not a public method so that only URLStreamHandlers can modify URL fields. URLs are otherwise constant.
Parameters:
protocol - the name of the protocol to use
host - the name of the host
port - the port number on the host
authority - the authority part for the url
userInfo - the username and password
path - the file on the host
ref - the internal reference in the URL
query - the query part of this URL

getQuery

public String getQuery()
Returns the query part of this URL.
Returns:
the query part of this URL.

getPath

public String getPath()
Returns the path part of this URL.
Returns:
the path part of this URL.

getUserInfo

public String getUserInfo()
Returns the userInfo part of this URL.
Returns:
the userInfo part of this URL.

getAuthority

public String getAuthority()
Returns the authority part of this URL.
Returns:
the authority part of this URL.

getPort

public int getPort()
Returns the port number of this URL. Returns -1 if the port is not set.
Returns:
the port number

getProtocol

public String getProtocol()
Returns the protocol name of this URL.
Returns:
the protocol of this URL.

getHost

public String getHost()
Returns the host name of this URL, if applicable.
Returns:
the host name of this URL.

getFile

public String getFile()
Returns the file name of this URL.
Returns:
the file name of this URL.

getRef

public String getRef()
Returns the anchor (also known as the "reference") of this URL.
Returns:
the anchor (also known as the "reference") of this URL.

equals

public boolean equals(Object obj)
Compares two URLs. The result is true if and only if the argument is not null and is a URL object that represents the same URL as this object. Two URL objects are equal if they have the same protocol and reference the same host, the same port number on the host, and the same file and anchor on the host.
Overrides:
equals in class Object
Parameters:
obj - the URL to compare against.
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Creates an integer suitable for hash table indexing.
Overrides:
hashCode in class Object
Returns:
a hash code for this URL.

sameFile

public boolean sameFile(URL other)
Compares two URLs, excluding the "ref" fields. Returns true if this URL and the other argument both refer to the same resource. The two URLs might not both contain the same anchor.
Parameters:
other - the URL to compare against.
Returns:
true if they reference the same remote object; false otherwise.

toString

public String toString()
Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.
Overrides:
toString in class Object
Returns:
a string representation of this object.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLStreamHandler.toExternalForm(java.net.URL)

toExternalForm

public String toExternalForm()
Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.
Returns:
a string representation of this object.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLStreamHandler.toExternalForm(java.net.URL)

openConnection

public URLConnection openConnection()
                             throws IOException
Returns a URLConnection object that represents a connection to the remote object referred to by the URL.

A new connection is opened every time by calling the openConnection method of the protocol handler for this URL.

If for the URL's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

Returns:
a URLConnection to the URL.
Throws:
IOException - if an I/O exception occurs.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLConnection, URLStreamHandler.openConnection(java.net.URL)

openStream

public final InputStream openStream()
                             throws IOException
Opens a connection to this URL and returns an InputStream for reading from that connection. This method is a shorthand for:
     openConnection().getInputStream()
Returns:
an input stream for reading from the URL connection.
Throws:
IOException - if an I/O exception occurs.
See Also:
openConnection(), URLConnection.getInputStream()

getContent

public final Object getContent()
                        throws IOException
Returns the contents of this URL. This method is a shorthand for:
     openConnection().getContent()
Returns:
the contents of this URL.
Throws:
IOException - if an I/O exception occurs.
See Also:
URLConnection.getContent()

getContent

public final Object getContent(Class[] classes)
                        throws IOException
Returns the contents of this URL. This method is a shorthand for:
     openConnection().getContent(Class[])
Returns:
the content object of this URL that is the first match of the types specified in the classes array. null if none of the requested types are supported.
Throws:
IOException - if an I/O exception occurs.
See Also:
URLConnection.getContent(Class[])

setURLStreamHandlerFactory

public static void setURLStreamHandlerFactory(URLStreamHandlerFactory fac)
Sets an application's URLStreamHandlerFactory. This method can be called at most once in a given Java Virtual Machine.

The URLStreamHandlerFactory instance is used to construct a stream protocol handler from a protocol name.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
fac - the desired factory.
Throws:
Error - if the application has already set a factory.
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
URL(java.lang.String, java.lang.String, int, java.lang.String), URLStreamHandlerFactory, SecurityManager.checkSetFactory()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


URLClassLoader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class URLClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--java.net.URLClassLoader
public class URLClassLoader
extends SecureClassLoader

This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be opened as needed.

The AccessControlContext of the thread that created the instance of URLClassLoader will be used when subsequently loading classes and resources.

The classes that are loaded are by default granted permission only to access the URLs specified when the URLClassLoader was created.

Since:
1.2

Constructor Summary
URLClassLoader(URL[] urls)
Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader.
URLClassLoader(URL[] urls, ClassLoader parent)
Constructs a new URLClassLoader for the given URLs.
URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.
Method Summary
protected void | addURL(URL url) Appends the specified URL to the list of URLs to search for classes and resources.
protected Package | definePackage(String name, Manifest man, URL url) Defines a new package by name in this ClassLoader.
protected Class | findClass(String name) Finds and loads the class with the specified name from the URL search path.
URL | findResource(String name) Finds the resource with the specified name on the URL search path.
Enumeration | findResources(String name) Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
protected PermissionCollection | getPermissions(CodeSource codesource) Returns the permissions for the given codesource object.
URL[] | getURLs() Returns the search path of URLs for loading classes and resources.
static URLClassLoader | newInstance(URL[] urls) Creates a new instance of URLClassLoader for the specified URLs and default parent class loader.
static URLClassLoader | newInstance(URL[] urls, ClassLoader parent) Creates a new instance of URLClassLoader for the specified URLs and parent class loader.
Methods inherited from class java.security.SecureClassLoader
defineClass
Methods inherited from class java.lang.ClassLoader
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

URLClassLoader

public URLClassLoader(URL[] urls,
                      ClassLoader parent)
Constructs a new URLClassLoader for the given URLs. The URLs will be searched in the order specified for classes and resources after first searching in the specified parent class loader. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

Parameters:
urls - the URLs from which to load classes and resources
parent - the parent class loader for delegation
Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
See Also:
SecurityManager.checkCreateClassLoader()

URLClassLoader

public URLClassLoader(URL[] urls)
Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader. The URLs will be searched in the order specified for classes and resources after first searching in the parent class loader. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

Parameters:
urls - the URLs from which to load classes and resources
Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
See Also:
SecurityManager.checkCreateClassLoader()

URLClassLoader

public URLClassLoader(URL[] urls,
                      ClassLoader parent,
                      URLStreamHandlerFactory factory)
Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory. The parent argument will be used as the parent class loader for delegation. The factory argument will be used as the stream handler factory to obtain protocol handlers when creating new URLs.

If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

Parameters:
urls - the URLs from which to load classes and resources
parent - the parent class loader for delegation
factory - the URLStreamHandlerFactory to use when creating URLs
Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
See Also:
SecurityManager.checkCreateClassLoader()
Method Detail

addURL

protected void addURL(URL url)
Appends the specified URL to the list of URLs to search for classes and resources.
Parameters:
url - the URL to be added to the search path of URLs

getURLs

public URL[] getURLs()
Returns the search path of URLs for loading classes and resources. This includes the original list of URLs specified to the constructor, along with any URLs subsequently appended by the addURL() method.
Returns:
the search path of URLs for loading classes and resources.

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Finds and loads the class with the specified name from the URL search path. Any URLs referring to JAR files are loaded and opened as needed until the class is found.
Overrides:
findClass in class ClassLoader
Parameters:
name - the name of the class
Returns:
the resulting class
Throws:
ClassNotFoundException - if the class could not be found

definePackage

protected Package definePackage(String name,
                                Manifest man,
                                URL url)
                         throws IllegalArgumentException
Defines a new package by name in this ClassLoader. The attributes contained in the specified Manifest will be used to obtain package version and sealing information. For sealed packages, the additional URL specifies the code source URL from which the package was loaded.
Parameters:
name - the package name
man - the Manifest containing package version and sealing information
url - the code source url for the package, or null if none
Returns:
the newly defined Package object
Throws:
IllegalArgumentException - if the package name duplicates an existing package either in this class loader or one of its ancestors

findResource

public URL findResource(String name)
Finds the resource with the specified name on the URL search path.
Overrides:
findResource in class ClassLoader
Parameters:
name - the name of the resource
Returns:
a URL for the resource, or null if the resource could not be found.

findResources

public Enumeration findResources(String name)
                          throws IOException
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
Overrides:
findResources in class ClassLoader
Parameters:
name - the resource name
Returns:
an Enumeration of URLs
Throws:
if - an I/O exception occurs

getPermissions

protected PermissionCollection getPermissions(CodeSource codesource)
Returns the permissions for the given codesource object. The implementation of this method first calls super.getPermissions, to get the permissions granted by the policy, and then adds additional permissions based on the URL of the codesource.

If the protocol is "file" and the path specifies a file, then permission to read that file is granted. If protocol is "file" and the path is a directory, permission is granted to read all files and (recursively) all files and subdirectories contained in that directory.

If the protocol is not "file", then to connect to and accept connections from the URL's host is granted.

Overrides:
getPermissions in class SecureClassLoader
Parameters:
codesource - the codesource
Returns:
the permissions granted to the codesource

newInstance

public static URLClassLoader newInstance(URL[] urls,
                                         ClassLoader parent)
Creates a new instance of URLClassLoader for the specified URLs and parent class loader. If a security manager is installed, the loadClass method of the URLClassLoader returned by this method will invoke the SecurityManager.checkPackageAccess method before loading the class.
Parameters:
urls - the URLs to search for classes and resources
parent - the parent class loader for delegation
Returns:
the resulting class loader

newInstance

public static URLClassLoader newInstance(URL[] urls)
Creates a new instance of URLClassLoader for the specified URLs and default parent class loader. If a security manager is installed, the loadClass method of the URLClassLoader returned by this method will invoke the SecurityManager.checkPackageAccess before loading the class.
Parameters:
urls - the URLs to search for classes and resources
Returns:
the resulting class loader
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


URLConnection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class URLConnection

java.lang.Object
  |
  +--java.net.URLConnection
Direct Known Subclasses:
HttpURLConnection, JarURLConnection
public abstract class URLConnection
extends Object

The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL. Instances of this class can be used both to read from and to write to the resource referenced by the URL. In general, creating a connection to a URL is a multistep process:

openConnection() | connect()
Manipulate parameters that affect the connection to the remote resource. | Interact with the resource; query header fields and contents.
---------------------------->
time
  1. The connection object is created by invoking the openConnection method on a URL.
  2. The setup parameters and general request properties are manipulated.
  3. The actual connection to the remote object is made, using the connect method.
  4. The remote object becomes available. The header fields and the contents of the remote object can be accessed.

The setup parameters are modified using the following methods:

  • setAllowUserInteraction
  • setDoInput
  • setDoOutput
  • setIfModifiedSince
  • setUseCaches

and the general request properties are modified using the method:

  • setRequestProperty

Default values for the AllowUserInteraction and UseCaches parameters can be set using the methods setDefaultAllowUserInteraction and setDefaultUseCaches.

Each of the above set methods has a corresponding get method to retrieve the value of the parameter or general request property. The specific parameters and general request properties that are applicable are protocol specific.

The following methods are used to access the header fields and the contents after the connection is made to the remote object:

  • getContent
  • getHeaderField
  • getInputStream
  • getOutputStream

Certain header fields are accessed frequently. The methods:

  • getContentEncoding
  • getContentLength
  • getContentType
  • getDate
  • getExpiration
  • getLastModifed

provide convenient access to these fields. The getContentType method is used by the getContent method to determine the type of the remote object; subclasses may find it convenient to override the getContentType method.

In the common case, all of the pre-connection parameters and general request properties can be ignored: the pre-connection parameters and request properties default to sensible values. For most clients of this interface, there are only two interesting methods: getInputStream and getObject, which are mirrored in the URL class by convenience methods.

More information on the request properties and header fields of an http connection can be found at:

 http://www.ietf.org/rfc/rfc2068.txt
Note about fileNameMap: In versions prior to JDK 1.1.6, field fileNameMap of URLConnection was public. In JDK 1.1.6 and later, fileNameMap is private; accessor and mutator methods getFileNameMap and setFileNameMap are added to access it. This change is also described on the Compatibility page.

Since:
JDK1.0
See Also:
URL.openConnection(),
connect(),
getContent(),
getContentEncoding(),
getContentLength(),
getContentType(),
getDate(),
getExpiration(),
getHeaderField(int),
getHeaderField(java.lang.String),
getInputStream(),
getLastModified(),
getOutputStream(),
setAllowUserInteraction(boolean),
setDefaultUseCaches(boolean),
setDoInput(boolean),
setDoOutput(boolean),
setIfModifiedSince(long),
setRequestProperty(java.lang.String, java.lang.String),
setUseCaches(boolean)

Field Summary
protected boolean | allowUserInteraction If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.
protected boolean | connected If false, this connection object has not created a communications link to the specified URL.
protected boolean | doInput This variable is set by the setDoInput method.
protected boolean | doOutput This variable is set by the setDoOutput method.
protected long | ifModifiedSince Some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.
protected URL | url The URL represents the remote object on the World Wide Web to which this connection is opened.
protected boolean | useCaches If true, the protocol is allowed to use caching whenever it can.
Constructor Summary
protected URLConnection(URL url)
Constructs a URL connection to the specified URL.
Method Summary
abstract void | connect() Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
boolean | getAllowUserInteraction() Returns the value of the allowUserInteraction field for this object.
Object | getContent() Retrieves the contents of this URL connection.
Object | getContent(Class[] classes) Retrieves the contents of this URL connection.
String | getContentEncoding() Returns the value of the content-encoding header field.
int | getContentLength() Returns the value of the content-length header field.
String | getContentType() Returns the value of the content-type header field.
long | getDate() Returns the value of the date header field.
static boolean | getDefaultAllowUserInteraction() Returns the default value of the allowUserInteraction field.
static String | getDefaultRequestProperty(String key) Deprecated. The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
boolean | getDefaultUseCaches() Returns the default value of a URLConnection's useCaches flag.
boolean | getDoInput() Returns the value of this URLConnection's doInput flag.
boolean | getDoOutput() Returns the value of this URLConnection's doOutput flag.
long | getExpiration() Returns the value of the expires header field.
static FileNameMap | getFileNameMap() Loads filename map (a mimetable) from a data file.
String | getHeaderField(int n) Returns the value for the nth header field.
String | getHeaderField(String name) Returns the name of the specified header field.
long | getHeaderFieldDate(String name, long Default) Returns the value of the named field parsed as date.
int | getHeaderFieldInt(String name, int Default) Returns the value of the named field parsed as a number.
String | getHeaderFieldKey(int n) Returns the key for the nth header field.
long | getIfModifiedSince() Returns the value of this object's ifModifiedSince field.
InputStream | getInputStream() Returns an input stream that reads from this open connection.
long | getLastModified() Returns the value of the last-modified header field.
OutputStream | getOutputStream() Returns an output stream that writes to this connection.
Permission | getPermission() Returns a permission object representing the permission necessary to make the connection represented by this object.
String | getRequestProperty(String key) Returns the value of the named general request property for this connection.
URL | getURL() Returns the value of this URLConnection's URL field.
boolean | getUseCaches() Returns the value of this URLConnection's useCaches field.
protected static String | guessContentTypeFromName(String fname) Tries to determine the content type of an object, based on the specified "file" component of a URL.
static String | guessContentTypeFromStream(InputStream is) Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
void | setAllowUserInteraction(boolean allowuserinteraction) Set the value of the allowUserInteraction field of this URLConnection.
static void | setContentHandlerFactory(ContentHandlerFactory fac) Sets the ContentHandlerFactory of an application.
static void | setDefaultAllowUserInteraction(boolean defaultallowuserinteraction) Sets the default value of the allowUserInteraction field for all future URLConnection objects to the specified value.
static void | setDefaultRequestProperty(String key, String value) Deprecated. The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained.
void | setDefaultUseCaches(boolean defaultusecaches) Sets the default value of the useCaches field to the specified value.
void | setDoInput(boolean doinput) Sets the value of the doInput field for this URLConnection to the specified value.
void | setDoOutput(boolean dooutput) Sets the value of the doOutput field for this URLConnection to the specified value.
static void | setFileNameMap(FileNameMap map) Sets the FileNameMap.
void | setIfModifiedSince(long ifmodifiedsince) Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
void | setRequestProperty(String key, String value) Sets the general request property.
void | setUseCaches(boolean usecaches) Sets the value of the useCaches field of this URLConnection to the specified value.
String | toString() Returns a String representation of this URL connection.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

url

protected URL url
The URL represents the remote object on the World Wide Web to which this connection is opened.

The value of this field can be accessed by the getURL method.

The default value of this variable is the value of the URL argument in the URLConnection constructor.

See Also:
getURL(), url

doInput

protected boolean doInput
This variable is set by the setDoInput method. Its value is returned by the getDoInput method.

A URL connection can be used for input and/or output. Setting the doInput flag to true indicates that the application intends to read data from the URL connection.

The default value of this field is true.

See Also:
getDoInput(), setDoInput(boolean)

doOutput

protected boolean doOutput
This variable is set by the setDoOutput method. Its value is returned by the getDoInput method.

A URL connection can be used for input and/or output. Setting the doOutput flag to true indicates that the application intends to write data to the URL connection.

The default value of this field is false.

See Also:
getDoOutput(), setDoOutput(boolean)

allowUserInteraction

protected boolean allowUserInteraction
If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog. If false, then no user interaction is allowed.

The value of this field can be set by the setAllowUserInteraction method. Its value is returned by the getAllowUserInteraction method. Its default value is the value of the argument in the last invocation of the setDefaultAllowUserInteraction method.

See Also:
getAllowUserInteraction(), setAllowUserInteraction(boolean), setDefaultAllowUserInteraction(boolean)

useCaches

protected boolean useCaches
If true, the protocol is allowed to use caching whenever it can. If false, the protocol must always try to get a fresh copy of the object.

This field is set by the setUseCaches method. Its value is returned by the getUseCaches method.

Its default value is the value given in the last invocation of the setDefaultUseCaches method.

See Also:
setUseCaches(boolean), getUseCaches(), setDefaultUseCaches(boolean)

ifModifiedSince

protected long ifModifiedSince
Some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.

A nonzero value gives a time as the number of milliseconds since January 1, 1970, GMT. The object is fetched only if it has been modified more recently than that time.

This variable is set by the setIfModifiedSince method. Its value is returned by the getIfModifiedSince method.

The default value of this field is 0, indicating that the fetching must always occur.

See Also:
getIfModifiedSince(), setIfModifiedSince(long)

connected

protected boolean connected
If false, this connection object has not created a communications link to the specified URL. If true, the communications link has been established.
Constructor Detail

URLConnection

protected URLConnection(URL url)
Constructs a URL connection to the specified URL. A connection to the object referenced by the URL is not created.
Parameters:
url - the specified URL.
Method Detail

getFileNameMap

public static FileNameMap getFileNameMap()
Loads filename map (a mimetable) from a data file. It will first try to load the user-specific table, defined by "content.types.user.table" property. If that fails, it tries to load the default built-in table at lib/content-types.properties under java home.
Returns:
the FileNameMap
Since:
1.2
See Also:
setFileNameMap(java.net.FileNameMap)

setFileNameMap

public static void setFileNameMap(FileNameMap map)
Sets the FileNameMap.

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
map - the FileNameMap to be set
Throws:
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
Since:
1.2
See Also:
SecurityManager.checkSetFactory(), getFileNameMap()

connect

public abstract void connect()
                      throws IOException
Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.

If the connect method is called when the connection has already been opened (indicated by the connected field having the value true), the call is ignored.

URLConnection objects go through two phases: first they are created, then they are connected. After being created, and before being connected, various options can be specified (e.g., doInput and UseCaches). After connecting, it is an error to try to set them. Operations that depend on being connected, like getContentLength, will implicitly perform the connection, if necessary.

Throws:
IOException - if an I/O error occurs while opening the connection.
See Also:
connected

getURL

public URL getURL()
Returns the value of this URLConnection's URL field.
Returns:
the value of this URLConnection's URL field.
See Also:
url

getContentLength

public int getContentLength()
Returns the value of the content-length header field.
Returns:
the content length of the resource that this connection's URL references, or -1 if the content length is not known.

getContentType

public String getContentType()
Returns the value of the content-type header field.
Returns:
the content type of the resource that the URL references, or null if not known.
See Also:
getHeaderField(java.lang.String)

getContentEncoding

public String getContentEncoding()
Returns the value of the content-encoding header field.
Returns:
the content encoding of the resource that the URL references, or null if not known.
See Also:
getHeaderField(java.lang.String)

getExpiration

public long getExpiration()
Returns the value of the expires header field.
Returns:
the expiration date of the resource that this URL references, or 0 if not known. The value is the number of milliseconds since January 1, 1970 GMT.
See Also:
getHeaderField(java.lang.String)

getDate

public long getDate()
Returns the value of the date header field.
Returns:
the sending date of the resource that the URL references, or 0 if not known. The value returned is the number of milliseconds since January 1, 1970 GMT.
See Also:
getHeaderField(java.lang.String)

getLastModified

public long getLastModified()
Returns the value of the last-modified header field. The result is the number of milliseconds since January 1, 1970 GMT.
Returns:
the date the resource referenced by this URLConnection was last modified, or 0 if not known.
See Also:
getHeaderField(java.lang.String)

getHeaderField

public String getHeaderField(String name)
Returns the name of the specified header field.
Parameters:
name - the name of a header field.
Returns:
the value of the named header field, or null if there is no such field in the header.

getHeaderFieldInt

public int getHeaderFieldInt(String name,
                             int Default)
Returns the value of the named field parsed as a number.

This form of getHeaderField exists because some connection types (e.g., http-ng) have pre-parsed headers. Classes for that connection type can override this method and short-circuit the parsing.

Parameters:
name - the name of the header field.
Default - the default value.
Returns:
the value of the named field, parsed as an integer. The Default value is returned if the field is missing or malformed.

getHeaderFieldDate

public long getHeaderFieldDate(String name,
                               long Default)
Returns the value of the named field parsed as date. The result is the number of milliseconds since January 1, 1970 GMT represented by the named field.

This form of getHeaderField exists because some connection types (e.g., http-ng) have pre-parsed headers. Classes for that connection type can override this method and short-circuit the parsing.

Parameters:
name - the name of the header field.
Default - a default value.
Returns:
the value of the field, parsed as a date. The value of the Default argument is returned if the field is missing or malformed.

getHeaderFieldKey

public String getHeaderFieldKey(int n)
Returns the key for the nth header field.
Parameters:
n - an index.
Returns:
the key for the nth header field, or null if there are fewer than n fields.

getHeaderField

public String getHeaderField(int n)
Returns the value for the nth header field. It returns null if there are fewer than n fields.

This method can be used in conjunction with the getHeaderFieldKey method to iterate through all the headers in the message.

Parameters:
n - an index.
Returns:
the value of the nth header field.
See Also:
getHeaderFieldKey(int)

getContent

public Object getContent()
                  throws IOException
Retrieves the contents of this URL connection.

This method first determines the content type of the object by calling the getContentType method. If this is the first time that the application has seen that specific content type, a content handler for that content type is created:

  1. If the application has set up a content handler factory instance using the setContentHandlerFactory method, the createContentHandler method of that instance is called with the content type as an argument; the result is a content handler for that content type.
  2. If no content handler factory has yet been set up, or if the factory's createContentHandler method returns null, then the application loads the class named:
             sun.net.www.content.<contentType>
    where <contentType> is formed by taking the content-type string, replacing all slash characters with a period ('.'), and all other non-alphanumeric characters with the underscore character '_'. The alphanumeric characters are specifically the 26 uppercase ASCII letters 'A' through 'Z', the 26 lowercase ASCII letters 'a' through 'z', and the 10 ASCII digits '0' through '9'. If the specified class does not exist, or is not a subclass of ContentHandler, then an UnknownServiceException is thrown.
Returns:
the object fetched. The instanceOf operation should be used to determine the specific kind of object returned.
Throws:
IOException - if an I/O error occurs while getting the content.
UnknownServiceException - if the protocol does not support the content type.
See Also:
ContentHandlerFactory.createContentHandler(java.lang.String),
getContentType(),
setContentHandlerFactory(java.net.ContentHandlerFactory)

getContent

public Object getContent(Class[] classes)
                  throws IOException
Retrieves the contents of this URL connection.
Parameters:
classes - the Class array indicating the requested types
Returns:
the object fetched that is the first match of the type specified in the classes array. null if none of the requested types are supported. The instanceOf operation should be used to determine the specific kind of object returned.
Throws:
IOException - if an I/O error occurs while getting the content.
UnknownServiceException - if the protocol does not support the content type.
See Also:
getContent(),
ContentHandlerFactory.createContentHandler(java.lang.String),
getContent(java.lang.Class[]),
setContentHandlerFactory(java.net.ContentHandlerFactory)

getPermission

public Permission getPermission()
                         throws IOException
Returns a permission object representing the permission necessary to make the connection represented by this object. This method returns null if no permission is required to make the connection. By default, this method returns java.security.AllPermission. Subclasses should override this method and return the permission that best represents the permission required to make a a connection to the URL. For example, a URLConnection representing a file: URL would return a java.io.FilePermission object.

The permission returned may dependent upon the state of the connection. For example, the permission before connecting may be different from that after connecting. For example, an HTTP sever, say foo.com, may redirect the connection to a different host, say bar.com. Before connecting the permission returned by the connection will represent the permission needed to connect to foo.com, while the permission returned after connecting will be to bar.com.

Permissions are generally used for two purposes: to protect caches of objects obtained through URLConnections, and to check the right of a recipient to learn about a particular URL. In the first case, the permission should be obtained after the object has been obtained. For example, in an HTTP connection, this will represent the permission to connect to the host from which the data was ultimately fetched. In the second case, the permission should be obtained and tested before connecting.

Returns:
the permission object representing the permission necessary to make the connection represented by this URLConnection.
Throws:
IOException - if the computation of the permission requires network or file I/O and an exception occurs while computing it.

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns an input stream that reads from this open connection.
Returns:
an input stream that reads from this open connection.
Throws:
IOException - if an I/O error occurs while creating the input stream.
UnknownServiceException - if the protocol does not support input.

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Returns an output stream that writes to this connection.
Returns:
an output stream that writes to this connection.
Throws:
IOException - if an I/O error occurs while creating the output stream.
UnknownServiceException - if the protocol does not support output.

toString

public String toString()
Returns a String representation of this URL connection.
Overrides:
toString in class Object
Returns:
a string representation of this URLConnection.

setDoInput

public void setDoInput(boolean doinput)
Sets the value of the doInput field for this URLConnection to the specified value.

A URL connection can be used for input and/or output. Set the DoInput flag to true if you intend to use the URL connection for input, false if not. The default is true unless DoOutput is explicitly set to true, in which case DoInput defaults to false.

Parameters:
doinput - the new value.
See Also:
doInput, getDoInput()

getDoInput

public boolean getDoInput()
Returns the value of this URLConnection's doInput flag.
Returns:
the value of this URLConnection's doInput flag.
See Also:
setDoInput(boolean)

setDoOutput

public void setDoOutput(boolean dooutput)
Sets the value of the doOutput field for this URLConnection to the specified value.

A URL connection can be used for input and/or output. Set the DoOutput flag to true if you intend to use the URL connection for output, false if not. The default is false.

Parameters:
dooutput - the new value.
See Also:
getDoOutput()

getDoOutput

public boolean getDoOutput()
Returns the value of this URLConnection's doOutput flag.
Returns:
the value of this URLConnection's doOutput flag.
See Also:
setDoOutput(boolean)

setAllowUserInteraction

public void setAllowUserInteraction(boolean allowuserinteraction)
Set the value of the allowUserInteraction field of this URLConnection.
Parameters:
allowuserinteraction - the new value.
See Also:
getAllowUserInteraction()

getAllowUserInteraction

public boolean getAllowUserInteraction()
Returns the value of the allowUserInteraction field for this object.
Returns:
the value of the allowUserInteraction field for this object.
See Also:
setAllowUserInteraction(boolean)

setDefaultAllowUserInteraction

public static void setDefaultAllowUserInteraction(boolean defaultallowuserinteraction)
Sets the default value of the allowUserInteraction field for all future URLConnection objects to the specified value.
Parameters:
defaultallowuserinteraction - the new value.
See Also:
getDefaultAllowUserInteraction()

getDefaultAllowUserInteraction

public static boolean getDefaultAllowUserInteraction()
Returns the default value of the allowUserInteraction field.

Ths default is "sticky", being a part of the static state of all URLConnections. This flag applies to the next, and all following URLConnections that are created.

Returns:
the default value of the allowUserInteraction field.
See Also:
setDefaultAllowUserInteraction(boolean)

setUseCaches

public void setUseCaches(boolean usecaches)
Sets the value of the useCaches field of this URLConnection to the specified value.

Some protocols do caching of documents. Occasionally, it is important to be able to "tunnel through" and ignore the caches (e.g., the "reload" button in a browser). If the UseCaches flag on a connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value comes from DefaultUseCaches, which defaults to true.

Parameters:
usecaches - a boolean indicating whether or not to allow caching
See Also:
getUseCaches()

getUseCaches

public boolean getUseCaches()
Returns the value of this URLConnection's useCaches field.
Returns:
the value of this URLConnection's useCaches field.
See Also:
setUseCaches(boolean)

setIfModifiedSince

public void setIfModifiedSince(long ifmodifiedsince)
Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
Parameters:
ifmodifiedsince - the new value.
See Also:
getIfModifiedSince()

getIfModifiedSince

public long getIfModifiedSince()
Returns the value of this object's ifModifiedSince field.
Returns:
the value of this object's ifModifiedSince field.
See Also:
setIfModifiedSince(long)

getDefaultUseCaches

public boolean getDefaultUseCaches()
Returns the default value of a URLConnection's useCaches flag.

Ths default is "sticky", being a part of the static state of all URLConnections. This flag applies to the next, and all following URLConnections that are created.

Returns:
the default value of a URLConnection's useCaches flag.
See Also:
setDefaultUseCaches(boolean)

setDefaultUseCaches

public void setDefaultUseCaches(boolean defaultusecaches)
Sets the default value of the useCaches field to the specified value.
Parameters:
defaultusecaches - the new value.
See Also:
getDefaultUseCaches()

setRequestProperty

public void setRequestProperty(String key,
                               String value)
Sets the general request property. If a property with the key already exists, overwrite its value with the new value.

NOTE: HTTP requires all request properties which can legally have multiple instances with the same key to use a comma-seperated list syntax which enables multiple properties to be appended into a single property.

Parameters:
key - the keyword by which the request is known (e.g., "accept").
value - the value associated with it.
See Also:
getRequestProperty(java.lang.String)

getRequestProperty

public String getRequestProperty(String key)
Returns the value of the named general request property for this connection.
Parameters:
key - the keyword by which the request is known (e.g., "accept").
Returns:
the value of the named general request property for this connection.
See Also:
setRequestProperty(java.lang.String, java.lang.String)

setDefaultRequestProperty

public static void setDefaultRequestProperty(String key,
                                             String value)
Deprecated. The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained.

Sets the default value of a general request property. When a URLConnection is created, it is initialized with these properties.
Parameters:
key - the keyword by which the request is known (e.g., "accept").
value - the value associated with the key.
See Also:
setRequestProperty(java.lang.String,java.lang.String), getDefaultRequestProperty(java.lang.String)

getDefaultRequestProperty

public static String getDefaultRequestProperty(String key)
Deprecated. The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.

Returns the value of the default request property. Default request properties are set for every connection.
Parameters:
key - the keyword by which the request is known (e.g., "accept").
Returns:
the value of the default request property for the specified key.
See Also:
getRequestProperty(java.lang.String), setDefaultRequestProperty(java.lang.String, java.lang.String)

setContentHandlerFactory

public static void setContentHandlerFactory(ContentHandlerFactory fac)
Sets the ContentHandlerFactory of an application. It can be called at most once by an application.

The ContentHandlerFactory instance is used to construct a content handler from a content type

If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.

Parameters:
fac - the desired factory.
Throws:
Error - if the factory has already been defined.
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
See Also:
ContentHandlerFactory, getContent(), SecurityManager.checkSetFactory()

guessContentTypeFromName

protected static String guessContentTypeFromName(String fname)
Tries to determine the content type of an object, based on the specified "file" component of a URL. This is a convenience method that can be used by subclasses that override the getContentType method.
Parameters:
fname - a filename.
Returns:
a guess as to what the content type of the object is, based upon its file name.
See Also:
getContentType()

guessContentTypeFromStream

public static String guessContentTypeFromStream(InputStream is)
                                         throws IOException
Tries to determine the type of an input stream based on the characters at the beginning of the input stream. This method can be used by subclasses that override the getContentType method.

Ideally, this routine would not be needed. But many http servers return the incorrect content type; in addition, there are many nonstandard extensions. Direct inspection of the bytes to determine the content type is often more accurate than believing the content type claimed by the http server.

Parameters:
is - an input stream that supports marks.
Returns:
a guess at the content type, or null if none can be determined.
Throws:
IOException - if an I/O error occurs while reading the input stream.
See Also:
InputStream.mark(int),
InputStream.markSupported(),
getContentType()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


URLDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class URLDecoder

java.lang.Object
  |
  +--java.net.URLDecoder
public class URLDecoder
extends Object

The class contains a utility method for converting from a MIME format called "x-www-form-urlencoded" to a String

To convert to a String, each character is examined in turn:

  • The ASCII characters 'a' through 'z', 'A' through 'Z', and '0' through '9' remain the same.
  • The plus sign '+'is converted into a space character ' '.
  • The remaining characters are represented by 3-character strings which begin with the percent sign, "%xy", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.

Since:
1.2

Constructor Summary
URLDecoder()
Method Summary
static String decode(String s)
Decodes a "x-www-form-urlencoded" to a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

URLDecoder

public URLDecoder()
Method Detail

decode

public static String decode(String s)
Decodes a "x-www-form-urlencoded" to a String.
Parameters:
s - the String to decode
Returns:
the newly decoded String
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


URLEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.net
Class URLEncoder

java.lang.Object
  |
  +--java.net.URLEncoder
public class URLEncoder
extends Object

The class contains a utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.

To convert a String, each character is examined in turn:

  • The ASCII characters 'a' through 'z', 'A' through 'Z', '0' through '9', and ".", "-", "*", "_" remain the same.
  • The space character ' ' is converted into a plus sign '+'.
  • All other characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.

Since:
JDK1.0

Method Summary
static String encode(String s)
Translates a string into x-www-form-urlencoded format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

encode

public static String encode(String s)
Translates a string into x-www-form-urlencoded format.
Parameters:
s - String to be translated.
Returns:
the translated String.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


URLStreamHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Class URLStreamHandler

java.lang.Object
  |
  +--java.net.URLStreamHandler
public abstract class URLStreamHandler
extends Object

The abstract class URLStreamHandler is the common superclass for all stream protocol handlers. A stream protocol handler knows how to make a connection for a particular protocol type, such as http, ftp, or gopher.

In most cases, an instance of a URLStreamHandler subclass is not created directly by an application. Rather, the first time a protocol name is encountered when constructing a URL, the appropriate stream protocol handler is automatically loaded.

Since:
JDK1.0
See Also:
URL.URL(java.lang.String, java.lang.String, int, java.lang.String)

Constructor Summary
URLStreamHandler()
Method Summary
protected  boolean equals(URL u1, URL u2)
Provides the default equals calculation.
protected  int getDefaultPort()
Returns the default port for a URL parsed by this handler.
protected  InetAddress getHostAddress(URL u)
Get the IP address of our host.
protected  int hashCode(URL u)
Provides the default hash calculation.
protected  boolean hostsEqual(URL u1, URL u2)
Compares the host components of two URLs.
protected abstract  URLConnection openConnection(URL u)
Opens a connection to the object referenced by the URL argument.
protected  void parseURL(URL u, String spec, int start, int limit)
Parses the string representation of a URL into a URL object.
protected  boolean sameFile(URL u1, URL u2)
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path.
protected  void setURL(URL u, String protocol, String host, int port, String file, String ref)
Deprecated. Use setURL(URL, String, String, int, String, String, String, String);
protected  void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)
Sets the fields of the URL argument to the indicated values.
protected  String toExternalForm(URL u)
Converts a URL of a specific protocol to a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

URLStreamHandler

public URLStreamHandler()
Method Detail

openConnection

protected abstract URLConnection openConnection(URL u)
                                         throws IOException
Opens a connection to the object referenced by the URL argument. This method should be overridden by a subclass.

If for the handler's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

Parameters:
u - the URL that this connects to.
Returns:
a URLConnection object for the URL.
Throws:
IOException - if an I/O error occurs while opening the connection.

parseURL

protected void parseURL(URL u,
                        String spec,
                        int start,
                        int limit)
Parses the string representation of a URL into a URL object.

If there is any inherited context, then it has already been copied into the URL argument.

The parseURL method of URLStreamHandler parses the string representation as if it were an http specification. Most URL protocol families have a similar parsing. A stream protocol handler for a protocol that has a different syntax must override this routine.

Parameters:
u - the URL to receive the result of parsing the spec.
spec - the String representing the URL that must be parsed.
start - the character index at which to begin parsing. This is just past the ':' (if there is one) that specifies the determination of the protocol name.
limit - the character position to stop parsing at. This is the end of the string or the position of the "#" character, if present. All information after the sharp sign indicates an anchor.

getDefaultPort

protected int getDefaultPort()
Returns the default port for a URL parsed by this handler. This method is meant to be overidden by handlers with default port numbers.
Returns:
the default port for a URL parsed by this handler.

equals

protected boolean equals(URL u1,
                         URL u2)
Provides the default equals calculation. May be overidden by handlers for other protocols that have different requirements for equals(). This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called by java.net.URL class.
Returns:
true if the two urls are considered equal, ie. they refer to the same fragment in the same file.

hashCode

protected int hashCode(URL u)
Provides the default hash calculation. May be overidden by handlers for other protocols that have different requirements for hashCode calculation.
Returns:
an int suitable for hash table indexing

sameFile

protected boolean sameFile(URL u1,
                           URL u2)
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path. This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called indirectly by java.net.URL class.
Returns:
true if u1 and u2 refer to the same file

getHostAddress

protected InetAddress getHostAddress(URL u)
Get the IP address of our host. An empty host field or a DNS failure will result in a null return.
Returns:
an InetAddress representing the host IP address.

hostsEqual

protected boolean hostsEqual(URL u1,
                             URL u2)
Compares the host components of two URLs.
Parameters:
u1 - the URL of the first host to compare
u2 - the URL of the second host to compare
Returns:
true if and only if they are equal, false otherwise.
Throws:
UnknownHostException - If an unknown host is found.

toExternalForm

protected String toExternalForm(URL u)
Converts a URL of a specific protocol to a String.
Parameters:
u - the URL.
Returns:
a string representation of the URL argument.

setURL

protected void setURL(URL u,
                      String protocol,
                      String host,
                      int port,
                      String authority,
                      String userInfo,
                      String path,
                      String query,
                      String ref)
Sets the fields of the URL argument to the indicated values. Only classes derived from URLStreamHandler are supposed to be able to call the set method on a URL.
Parameters:
u - the URL to modify.
protocol - the protocol name.
host - the remote host value for the URL.
port - the port on the remote machine.
authority - the authority part for the URL.
path - the path component of the URL.
query - the query part for the URL.
ref - the reference.
See Also:
URL.set(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)

setURL

protected void setURL(URL u,
                      String protocol,
                      String host,
                      int port,
                      String file,
                      String ref)
Deprecated. Use setURL(URL, String, String, int, String, String, String, String);

Sets the fields of the URL argument to the indicated values. Only classes derived from URLStreamHandler are supposed to be able to call the set method on a URL.
Parameters:
u - the URL to modify.
protocol - the protocol name. This value is ignored since 1.2.
host - the remote host value for the URL.
port - the port on the remote machine.
file - the file.
ref - the reference.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


URLStreamHandlerFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.net
Interface URLStreamHandlerFactory

public interface URLStreamHandlerFactory

This interface defines a factory for URL stream protocol handlers.

It is used by the URL class to create a URLStreamHandler for a specific protocol.

Since:
JDK1.0
See Also:
URL, URLStreamHandler

Method Summary
 URLStreamHandler createURLStreamHandler(String protocol)
Creates a new URLStreamHandler instance with the specified protocol.

Method Detail

createURLStreamHandler

public URLStreamHandler createURLStreamHandler(String protocol)
Creates a new URLStreamHandler instance with the specified protocol.
Parameters:
protocol - the protocol ("ftp", "http", "nntp", etc.).
Returns:
a URLStreamHandler for the specific protocol.
See Also:
URLStreamHandler
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.rmi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.rmi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.rmi.MarshalledObject (implements java.io.Serializable)
    • class java.rmi.Naming
    • class java.lang.SecurityManager
      • class java.rmi.RMISecurityManager
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.rmi.AlreadyBoundException
        • class java.io.IOException
          • class java.rmi.RemoteException
            • class java.rmi.AccessException
            • class java.rmi.ConnectException
            • class java.rmi.ConnectIOException
            • class java.rmi.MarshalException
            • class java.rmi.NoSuchObjectException
            • class java.rmi.ServerError
            • class java.rmi.ServerException
            • class java.rmi.ServerRuntimeException
            • class java.rmi.StubNotFoundException
            • class java.rmi.UnexpectedException
            • class java.rmi.UnknownHostException
            • class java.rmi.UnmarshalException
        • class java.rmi.NotBoundException
        • class java.lang.RuntimeException
          • class java.lang.SecurityException
            • class java.rmi.RMISecurityException

Interface Hierarchy

  • interface java.rmi.Remote
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.rmi

Provides the RMI package.

See:
Description

Interface Summary
Remote The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.

Class Summary
MarshalledObject | A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
Naming | The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry.
RMISecurityManager | RMISecurityManager provides an example security manager for use by RMI applications that use downloaded code.

Exception Summary
AccessException | An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
AlreadyBoundException | An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
ConnectException | A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
ConnectIOException | A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
MarshalException | A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
NoSuchObjectException | A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
NotBoundException | A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
RemoteException | A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
RMISecurityException | Deprecated. no replacement.
ServerError | A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
ServerException | A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
ServerRuntimeException | Deprecated. no replacement
StubNotFoundException | A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
UnexpectedException | An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
UnknownHostException | An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.
UnmarshalException | An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Package java.rmi Description

Provides the RMI package. RMI is Remote Method Invocation. It is a mechanism that enables an object on one Java virtual machine to invoke methods on an object in another Java virtual machine. Any object that can be invoked this way must implement the Remote interface. When such an object is invoked, its arguments are ``marshalled'' and sent from the local virtual machine to the remote one, where the arguments are ``unmarshalled.'' When the method terminates, the results are marshalled from the remote machine and sent to the caller's virtual machine. If the method invocation results in an exception being thrown, the exception is indicated to caller.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Remote

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi
Interface Remote

All Known Subinterfaces:
ActivationInstantiator, ActivationMonitor, ActivationSystem, Activator, DGC, Registry
All Known Implementing Classes:
RemoteObject, _Remote_Stub
public interface Remote

The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine. Any object that is a remote object must directly or indirectly implement this interface. Only those methods specified in a "remote interface", an interface that extends java.rmi.Remote are available remotely.

Implementation classes can implement any number of remote interfaces and can extend other remote implementation classes. RMI provides some convenience classes that remote object implementations can extend which facilitate remote object creation. These classes are java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable.

For complete details on RMI, see the RMI Specification which describes the RMI API and system.

Since:
JDK1.1
See Also:
UnicastRemoteObject, Activatable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Package java.rmi

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.rmi

Packages that use java.rmi
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in java.rmi used by java.rmi
AlreadyBoundException
An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
NotBoundException
A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by java.rmi.activation
MarshalledObject
A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor.
NoSuchObjectException
A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by java.rmi.dgc
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by java.rmi.registry
AccessException
An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
AlreadyBoundException
An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.
NotBoundException
A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.
UnknownHostException
An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.

Classes in java.rmi used by java.rmi.server
NoSuchObjectException
A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by javax.rmi
NoSuchObjectException
A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by javax.rmi.CORBA
NoSuchObjectException
A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by javax.transaction
RemoteException
A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call.

Classes in java.rmi used by org.omg.stub.java.rmi
Remote
The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AccessException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class AccessException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.AccessException
All Implemented Interfaces:
Serializable
public class AccessException
extends RemoteException

An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call. If the method was invoked from a non-local host, then an AccessException is thrown.

Since:
JDK1.1
See Also:
Naming, ActivationSystem, Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
AccessException(String s)
Constructs an AccessException with the specified detail message.
AccessException(String s, Exception ex)
Constructs an AccessException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AccessException

public AccessException(String s)
Constructs an AccessException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

AccessException

public AccessException(String s,
                       Exception ex)
Constructs an AccessException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.rmi.activation Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.rmi.activation

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.rmi.activation.ActivationDesc (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupDesc (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupDesc.CommandEnvironment (implements java.io.Serializable)
    • class java.rmi.activation.ActivationGroupID (implements java.io.Serializable)
    • class java.rmi.activation.ActivationID (implements java.io.Serializable)
    • class java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable)
      • class java.rmi.server.RemoteServer
        • class java.rmi.activation.Activatable
        • class java.rmi.server.UnicastRemoteObject
          • class java.rmi.activation.ActivationGroup (implements java.rmi.activation.ActivationInstantiator)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.rmi.activation.ActivationException
          • class java.rmi.activation.UnknownGroupException
          • class java.rmi.activation.UnknownObjectException
        • class java.io.IOException
          • class java.rmi.RemoteException
            • class java.rmi.activation.ActivateFailedException

Interface Hierarchy

  • interface java.rmi.Remote
    • interface java.rmi.activation.ActivationInstantiator
    • interface java.rmi.activation.ActivationMonitor
    • interface java.rmi.activation.ActivationSystem
    • interface java.rmi.activation.Activator
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.rmi.activation

Provides support for RMI Object Activation.

See:
Description

Interface Summary
ActivationInstantiator | An ActivationInstantiator is responsible for creating instances of "activatable" objects.
ActivationMonitor | An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
ActivationSystem | The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
Activator | The Activator facilitates remote object activation.

Class Summary
Activatable | The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
ActivationDesc | An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
ActivationGroup | An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
ActivationGroupDesc | An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
ActivationGroupDesc.CommandEnvironment | Startup options for ActivationGroup implementations.
ActivationGroupID | The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
ActivationID | Activation makes use of special identifiers to denote remote objects that can be activated over time.

Exception Summary
ActivateFailedException | This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.
ActivationException | General exception used by the activation interfaces.
UnknownGroupException | An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
UnknownObjectException | An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Package java.rmi.activation Description

Provides support for RMI Object Activation. A remote object's reference can be made ``persistent'' and later activated into a ``live'' object using the RMI activation mechanism.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.rmi.activation

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.rmi.activation

Packages that use java.rmi.activation
java.rmi.activation Provides support for RMI Object Activation.

Classes in java.rmi.activation used by java.rmi.activation
ActivationDesc
An activation descriptor contains the information necessary to activate an object: the object's group identifier, the object's fully-qualified class name, the object's code location (the location of the class), a codebase URL path, the object's restart "mode", and, a "marshalled" object that can contain object specific initialization data.
ActivationException
General exception used by the activation interfaces.
ActivationGroup
An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.
ActivationGroupDesc
An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects.
ActivationGroupDesc.CommandEnvironment
Startup options for ActivationGroup implementations.
ActivationGroupID
The identifier for a registered activation group serves several purposes: identifies the group uniquely within the activation system, and contains a reference to the group's activation system so that the group can contact its activation system when necessary.
ActivationID
Activation makes use of special identifiers to denote remote objects that can be activated over time.
ActivationInstantiator
An ActivationInstantiator is responsible for creating instances of "activatable" objects.
ActivationMonitor
An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
ActivationSystem
The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
Activator
The Activator facilitates remote object activation.
UnknownGroupException
An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
UnknownObjectException
An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Activatable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class Activatable

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.activation.Activatable
All Implemented Interfaces:
Remote, Serializable
public abstract class Activatable
extends RemoteServer

The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
protected | Activatable(ActivationID id, int port) Constructor used to activate/export the object on a specified port.
protected | Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Constructor used to activate/export the object on a specified port.
protected | Activatable(String location, MarshalledObject data, boolean restart, int port) Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
protected | Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Method Summary
static Remote | exportObject(Remote obj, ActivationID id, int port) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote | exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static ActivationID | exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
protected ActivationID | getID() Returns the object's activation identifier.
static boolean | inactive(ActivationID id) Informs the system that the object with the corresponding activation id is currently inactive.
static Remote | register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
static boolean | unexportObject(Remote obj, boolean force) Remove the remote object, obj, from the RMI runtime.
static void | unregister(ActivationID id) Revokes previous registration for the activation descriptor associated with id.
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Activatable

protected Activatable(String location,
                      MarshalledObject data,
                      boolean restart,
                      int port)
               throws ActivationException,
                      RemoteException
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) . A concrete subclass of this class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.
Parameters:
location - the location for classes for this object
data - the object's initialization data
port - the port on which the object is exported (an anonymous port is used if port=0)
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
ActivationException - if object registration fails.
RemoteException - if either of the following fails: a) registering the object with the activation system or b) exporting the object to the RMI runtime.
Since:
1.2

Activatable

protected Activatable(String location,
                      MarshalledObject data,
                      boolean restart,
                      int port,
                      RMIClientSocketFactory csf,
                      RMIServerSocketFactory ssf)
               throws ActivationException,
                      RemoteException
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .

A concrete subclass of this class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.

Parameters:
location - the location for classes for this object
data - the object's initialization data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Throws:
ActivationException - if object registration fails.
RemoteException - if either of the following fails: a) registering the object with the activation system or b) exporting the object to the RMI runtime.
Since:
1.2

Activatable

protected Activatable(ActivationID id,
                      int port)
               throws RemoteException
Constructor used to activate/export the object on a specified port. An "activatable" remote object must have a constructor that takes two arguments:
  • the object's activation identifier (ActivationID), and
  • the object's initialization data (a MarshalledObject).

A concrete subclass of this class must call this constructor when it is activated via the two parameter constructor described above. As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients.

Parameters:
id - activation identifier for the object
port - the port number on which the object is exported
Throws:
RemoteException - if exporting the object to the RMI runtime fails
Since:
1.2

Activatable

protected Activatable(ActivationID id,
                      int port,
                      RMIClientSocketFactory csf,
                      RMIServerSocketFactory ssf)
               throws RemoteException
Constructor used to activate/export the object on a specified port. An "activatable" remote object must have a constructor that takes two arguments:
  • the object's activation identifier (ActivationID), and
  • the object's initialization data (a MarshalledObject).

A concrete subclass of this class must call this constructor when it is activated via the two parameter constructor described above. As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients.

Parameters:
id - activation identifier for the object
port - the port number on which the object is exported
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Throws:
RemoteException - if exporting the object to the RMI runtime fails
Since:
1.2
Method Detail

getID

protected ActivationID getID()
Returns the object's activation identifier. The method is protected so that only subclasses can obtain an object's identifier.
Returns:
the object's activation identifier
Since:
1.2

register

public static Remote register(ActivationDesc desc)
                       throws UnknownGroupException,
                              ActivationException,
                              RemoteException
Register an object descriptor for an activatable remote object so that is can be activated on demand.
Parameters:
desc - the object's descriptor
Returns:
the stub for the activatable remote object
Throws:
UnknownGroupException - if group id in desc is not registered with the activation system
ActivationException - if activation system is not running
RemoteException - if remote call fails
Since:
1.2

inactive

public static boolean inactive(ActivationID id)
                        throws UnknownObjectException,
                               ActivationException,
                               RemoteException
Informs the system that the object with the corresponding activation id is currently inactive. If the object is currently active, the object is "unexported" from the RMI runtime (only if there are no pending or in-progress calls) so the that it can no longer receive incoming calls. This call informs this VM's ActivationGroup that the object is inactive, that, in turn, informs its ActivationMonitor. If this call completes successfully, a subsequent activate request to the activator will cause the object to reactivate. The operation may still succeed if the object is considered active but has already unexported itself.
Parameters:
id - the object's activation identifier
Returns:
true if the operation succeeds (the operation will succeed if the object in currently known to be active and is either already unexported or is currently exported and has no pending/executing calls); false is returned if the object has pending/executing calls in which case it cannot be deactivated
Throws:
UnknownObjectException - if object is not known (it may already be inactive)
ActivationException - if group is not active
RemoteException - if call informing monitor fails
Since:
1.2

unregister

public static void unregister(ActivationID id)
                       throws UnknownObjectException,
                              ActivationException,
                              RemoteException
Revokes previous registration for the activation descriptor associated with id. An object can no longer be activated via that id.
Parameters:
id - the object's activation identifier
Throws:
UnknownObjectException - if object (id) is unknown
ActivationException - if activation system is not running
RemoteException - if remote call to activation system fails
Since:
1.2

exportObject

public static ActivationID exportObject(Remote obj,
                                        String location,
                                        MarshalledObject data,
                                        boolean restart,
                                        int port)
                                 throws ActivationException,
                                        RemoteException
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen). Once the object is exported, it can receive incoming RMI calls.

This method does not need to be called if obj extends Activatable, since the first constructor calls this method.

Parameters:
obj - the object being exported
location - the object's code location
data - the object's bootstrapping data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
Returns:
the activation identifier obtained from registering the descriptor, desc, with the activation system the wrong group
Throws:
ActivationException - if activation group is not active
RemoteException - if object registration or export fails
Since:
1.2

exportObject

public static ActivationID exportObject(Remote obj,
                                        String location,
                                        MarshalledObject data,
                                        boolean restart,
                                        int port,
                                        RMIClientSocketFactory csf,
                                        RMIServerSocketFactory ssf)
                                 throws ActivationException,
                                        RemoteException
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen). Once the object is exported, it can receive incoming RMI calls.

This method does not need to be called if obj extends Activatable, since the first constructor calls this method.

Parameters:
obj - the object being exported
location - the object's code location
data - the object's bootstrapping data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Returns:
the activation identifier obtained from registering the descriptor, desc, with the activation system the wrong group
Throws:
ActivationException - if activation group is not active
RemoteException - if object registration or export fails
Since:
1.2

exportObject

public static Remote exportObject(Remote obj,
                                  ActivationID id,
                                  int port)
                           throws RemoteException
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).

Parameters:
obj - the remote object implementation
id - the object's activation identifier
port - the port on which the object is exported (an anonymous port is used if port=0)
Returns:
the stub for the activatable remote object
Throws:
RemoteException - if object export fails
Since:
1.2

exportObject

public static Remote exportObject(Remote obj,
                                  ActivationID id,
                                  int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
                           throws RemoteException
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).

Parameters:
obj - the remote object implementation
id - the object's activation identifier
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Returns:
the stub for the activatable remote object
Throws:
RemoteException - if object export fails
Since:
1.2

unexportObject

public static boolean unexportObject(Remote obj,
                                     boolean force)
                              throws NoSuchObjectException
Remove the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.
Parameters:
obj - the remote object to be unexported
force - if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls
Returns:
true if operation is successful, false otherwise
Throws:
NoSuchObjectException - if the remote object is not currently exported
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActivateFailedException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivateFailedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.activation.ActivateFailedException
All Implemented Interfaces:
Serializable
public class ActivateFailedException
extends RemoteException

This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.

Since:
1.2
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ActivateFailedException(String s)
Constructs an ActivateFailedException with the specified detail message.
ActivateFailedException(String s, Exception ex)
Constructs an ActivateFailedException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ActivateFailedException

public ActivateFailedException(String s)
Constructs an ActivateFailedException with the specified detail message.
Parameters:
s - the detail message
Since:
1.2

ActivateFailedException

public ActivateFailedException(String s,
                               Exception ex)
Constructs an ActivateFailedException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActivationDesc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationDesc

java.lang.Object
  |
  +--java.rmi.activation.ActivationDesc
All Implemented Interfaces:
Serializable
public final class ActivationDesc
extends Object
implements Serializable

An activation descriptor contains the information necessary to activate an object:

  • the object's group identifier,
  • the object's fully-qualified class name,
  • the object's code location (the location of the class), a codebase URL path,
  • the object's restart "mode", and,
  • a "marshalled" object that can contain object specific initialization data.

A descriptor registered with the activation system can be used to recreate/activate the object specified by the descriptor. The MarshalledObject in the object's descriptor is passed as the second argument to the remote object's constructor for object to use during reinitialization/activation.

Since:
1.2
See Also:
Activatable, Serialized Form

Constructor Summary
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
Method Summary
boolean | equals(Object obj) Compares two activation descriptors for content equality.
String | getClassName() Returns the class name for the object specified by this descriptor.
MarshalledObject | getData() Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.
ActivationGroupID | getGroupID() Returns the group identifier for the object specified by this descriptor.
String | getLocation() Returns the code location for the object specified by this descriptor.
boolean | getRestartMode() Returns the "restart" mode of the object associated with this activation descriptor.
int | hashCode() Return the same hashCode for similar ActivationDescs.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActivationDesc

public ActivationDesc(String className,
                      String location,
                      MarshalledObject data)
               throws ActivationException
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data. If this form of the constructor is used, the groupID defaults to the current id for ActivationGroup for this VM. All objects with the same ActivationGroupID are activated in the same VM.

Note that objects specified by a descriptor created with this constructor will only be activated on demand (by default, the restart mode is false). If an activatable object requires restart services, use one of the ActivationDesc constructors that takes a boolean parameter, restart.

This constructor will throw ActivationException if there is no current activation group for this VM. To create an ActivationGroup use the ActivationGroup.createGroup method.

Parameters:
className - the object's fully package qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
Throws:
ActivationException - if the current group is nonexistent
Since:
1.2

ActivationDesc

public ActivationDesc(String className,
                      String location,
                      MarshalledObject data,
                      boolean restart)
               throws ActivationException
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data. If this form of the constructor is used, the groupID defaults to the current id for ActivationGroup for this VM. All objects with the same ActivationGroupID are activated in the same VM.

This constructor will throw ActivationException if there is no current activation group for this VM. To create an ActivationGroup use the ActivationGroup.createGroup method.

Parameters:
className - the object's fully package qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
ActivationException - if the current group is nonexistent
Since:
1.2

ActivationDesc

public ActivationDesc(ActivationGroupID groupID,
                      String className,
                      String location,
                      MarshalledObject data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data. All objects with the same groupID are activated in the same Java VM.

Note that objects specified by a descriptor created with this constructor will only be activated on demand (by default, the restart mode is false). If an activatable object requires restart services, use one of the ActivationDesc constructors that takes a boolean parameter, restart.

Parameters:
groupID - the group's identifier (obtained from registering ActivationSystem.registerGroup method). The group indicates the VM in which the object should be activated.
className - the object's fully package-qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
Throws:
IllegalArgumentException - if groupID is null
Since:
1.2

ActivationDesc

public ActivationDesc(ActivationGroupID groupID,
                      String className,
                      String location,
                      MarshalledObject data,
                      boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data. All objects with the same groupID are activated in the same Java VM.
Parameters:
groupID - the group's identifier (obtained from registering ActivationSystem.registerGroup method). The group indicates the VM in which the object should be activated.
className - the object's fully package-qualified class name
location - the object's code location (from where the class is loaded)
data - the object's initialization (activation) data contained in marshalled form.
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
IllegalArgumentException - if groupID is null
Since:
1.2
Method Detail

getGroupID

public ActivationGroupID getGroupID()
Returns the group identifier for the object specified by this descriptor. A group provides a way to aggregate objects into a single Java virtual machine. RMI creates/activates objects with the same groupID in the same virtual machine.
Returns:
the group identifier
Since:
1.2

getClassName

public String getClassName()
Returns the class name for the object specified by this descriptor.
Returns:
the class name
Since:
1.2

getLocation

public String getLocation()
Returns the code location for the object specified by this descriptor.
Returns:
the code location
Since:
1.2

getData

public MarshalledObject getData()
Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.
Returns:
the object specific "initialization" data
Since:
1.2

getRestartMode

public boolean getRestartMode()
Returns the "restart" mode of the object associated with this activation descriptor.
Returns:
true if the activatable object associated with this activation descriptor is restarted via the activation daemon when either the daemon comes up or the object's group is restarted after an unexpected crash; otherwise it returns false, meaning that the object is only activated on demand via a method call. Note that if the restart mode is true, the activator does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Since:
1.2

equals

public boolean equals(Object obj)
Compares two activation descriptors for content equality.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable

hashCode

public int hashCode()
Return the same hashCode for similar ActivationDescs.
Overrides:
hashCode in class Object
Returns:
an integer
See Also:
Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.activation.ActivationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnknownGroupException, UnknownObjectException
public class ActivationException
extends Exception

General exception used by the activation interfaces.

Since:
1.2
See Also:
Serialized Form

Field Summary
 Throwable detail
Nested Exception to hold wrapped remote exceptions.
Constructor Summary
ActivationException()
Constructs an ActivationException with no specified detail message.
ActivationException(String s)
Constructs an ActivationException with detail message, s.
ActivationException(String s, Throwable ex)
Constructs an ActivationException with detail message, s, and detail exception ex.
Method Summary
String | getMessage() Produces the message, include the message from the nested exception if there is one.
void | printStackTrace() Prints the composite message to System.err.
void | printStackTrace(PrintStream ps) Prints the composite message and the embedded stack trace to the specified stream ps.
void | printStackTrace(PrintWriter pw) Prints the composite message and the embedded stack trace to the specified print writer pw.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

detail

public Throwable detail
Nested Exception to hold wrapped remote exceptions.
Constructor Detail

ActivationException

public ActivationException()
Constructs an ActivationException with no specified detail message.
Since:
1.2

ActivationException

public ActivationException(String s)
Constructs an ActivationException with detail message, s.
Parameters:
s - the detail message
Since:
1.2

ActivationException

public ActivationException(String s,
                           Throwable ex)
Constructs an ActivationException with detail message, s, and detail exception ex.
Parameters:
s - detail message
ex - detail exception
Since:
1.2
Method Detail

getMessage

public String getMessage()
Produces the message, include the message from the nested exception if there is one.
Overrides:
getMessage in class Throwable
Returns:
the message
Since:
1.2

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.
Overrides:
printStackTrace in class Throwable
Parameters:
ps - the print stream
Since:
1.2

printStackTrace

public void printStackTrace()
Prints the composite message to System.err.
Overrides:
printStackTrace in class Throwable
Since:
1.2

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.
Overrides:
printStackTrace in class Throwable
Parameters:
pw - the print writer
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationGroup

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--java.rmi.activation.ActivationGroup
All Implemented Interfaces:
ActivationInstantiator, Remote, Serializable
public abstract class ActivationGroup
extends UnicastRemoteObject
implements ActivationInstantiator

An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

An ActivationGroup is initially created in one of several ways:

  • as a side-effect of creating an ActivationDesc (using its first constructor) for the first activatable object in the group, or
  • via the ActivationGroup.createGroup method
  • as a side-effect of activating the first object in a group whose ActivationGroupDesc was only registered.

Only the activator can recreate an ActivationGroup. The activator spawns, as needed, a separate VM (as a child process, for example) for each registered activation group and directs activation requests to the appropriate group. It is implementation specific how VMs are spawned. An activation group is created via the ActivationGroup.createGroup static method. The createGroup method has two requirements on the group to be created: 1) the group must be a concrete subclass of ActivationGroup, and 2) the group must have a constructor that takes two arguments:

  • the group's ActivationGroupID, and
  • the group's initialization data (in a java.rmi.MarshalledObject)

When created, the default implementation of ActivationGroup will override the system properties with the properties requested when its ActivationGroupDesc was created, and will set a java.rmi.RMISecurityManager as the default system security manager. If your application requires specific properties to be set when objects are activated in the group, the application should create a special Properties object containing these properties, then create an ActivationGroupDesc with the Properties object, and use ActivationGroup.createGroup before creating any ActivationDescs (before the default ActivationGroupDesc is created). If your application requires the use of a security manager other than java.rmi.RMISecurityManager, in the ActivativationGroupDescriptor properties list you can set java.security.manager property to the name of the security manager you would like to install.

Since:
1.2
See Also:
ActivationInstantiator, ActivationGroupDesc, ActivationGroupID, Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
protected ActivationGroup(ActivationGroupID groupID)
Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.
Method Summary
protected void | activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
abstract void | activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
static ActivationGroup | createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) Create and set the activation group for the current VM.
static ActivationGroupID | currentGroupID() Returns the current activation group's identifier.
static ActivationSystem | getSystem() Returns the activation system for the VM.
protected void | inactiveGroup() This protected method is necessary for subclasses to make the inactiveGroup callback to the group's monitor.
boolean | inactiveObject(ActivationID id) The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
static void | setSystem(ActivationSystem system) Set the activation system for the VM.
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.rmi.activation.ActivationInstantiator
newInstance

Constructor Detail

ActivationGroup

protected ActivationGroup(ActivationGroupID groupID)
                   throws RemoteException
Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.
Parameters:
groupID - the group's identifier
Throws:
RemoteException - if group could not be exported
Since:
1.2
Method Detail

inactiveObject

public boolean inactiveObject(ActivationID id)
                       throws ActivationException,
                              UnknownObjectException,
                              RemoteException
The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method. A remote object implementation must call Activatable's inactive method when that object deactivates (the object deems that it is no longer active). If the object does not call Activatable.inactive when it deactivates, the object will never be garbage collected since the group keeps strong references to the objects it creates.

The group's inactiveObject method unexports the remote object from the RMI runtime so that the object can no longer receive incoming RMI calls. An object will only be unexported if the object has no pending or executing calls. The subclass of ActivationGroup must override this method and unexport the object.

After removing the object from the RMI runtime, the group must inform its ActivationMonitor (via the monitor's inactiveObject method) that the remote object is not currently active so that the remote object will be re-activated by the activator upon a subsequent activation request.

This method simply informs the group's monitor that the object is inactive. It is up to the concrete subclass of ActivationGroup to fulfill the additional requirement of unexporting the object.

Parameters:
id - the object's activation identifier
Returns:
true if the object was successfully deactivated; otherwise returns false.
Throws:
UnknownObjectException - if object is unknown (may already be inactive)
RemoteException - if call informing monitor fails
ActivationException - if group is inactive
Since:
1.2

activeObject

public abstract void activeObject(ActivationID id,
                                  Remote obj)
                           throws ActivationException,
                                  UnknownObjectException,
                                  RemoteException
The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject. The group must inform its ActivationMonitor that the object is active (via the monitor's activeObject method) if the group hasn't already done so.
Parameters:
id - the object's identifier
obj - the remote object implementation
Throws:
UnknownObjectException - if object is not registered
RemoteException - if call informing monitor fails
ActivationException - if group is inactive
Since:
1.2

createGroup

public static ActivationGroup createGroup(ActivationGroupID id,
                                          ActivationGroupDesc desc,
                                          long incarnation)
                                   throws ActivationException
Create and set the activation group for the current VM. The activation group can only be set if it is not currently set. An activation group is set using the createGroup method when the Activator initiates the re-creation of an activation group in order to carry out incoming activate requests. A group must first be registered with the ActivationSystem before it can be created via this method.

The group class specified by the ActivationGroupDesc must be a concrete subclass of ActivationGroup and have a public constructor that takes two arguments: the ActivationGroupID for the group and the MarshalledObject containing the group's initialization data (obtained from the ActivationGroupDesc.

If the group class name specified in the ActivationGroupDesc is null, then this method will behave as if the group descriptor contained the name of the default activation group implementation class.

Note that if your application creates its own custom activation group, a security manager must be set for that group. Otherwise objects cannot be activated in the group. java.rmi.RMISecurityManager is set by default.

If a security manager is already set in the group VM, this method first calls the security manager's checkSetFactory method. This could result in a SecurityException. If your application needs to set a different security manager, you must ensure that the policy file specified by the group's ActivationGroupDesc grants the group the necessary permissions to set a new security manager. (Note: This will be necessary if your group downloads and sets a security manager).

After the group is created, the ActivationSystem is informed that the group is active by calling the activeGroup method which returns the ActivationMonitor for the group. The application need not call activeGroup independently since it is taken care of by this method.

Once a group is created, subsequent calls to the currentGroupID method will return the identifier for this group until the group becomes inactive.

Parameters:
id - the activation group's identifier
desc - the activation group's descriptor
incarnation - the group's incarnation number (zero on group's initial creation)
Returns:
the activation group for the VM
Throws:
ActivationException - if group already exists or if error occurs during group creation
SecurityException - if permission to create group is denied. (Note: The default implementation of the security manager checkSetFactory method requires the RuntimePermission "setFactory")
Since:
1.2
See Also:
SecurityManager.checkSetFactory()

currentGroupID

public static ActivationGroupID currentGroupID()
Returns the current activation group's identifier. Returns null if no group is currently active for this VM.
Returns:
the activation group's identifier
Since:
1.2

setSystem

public static void setSystem(ActivationSystem system)
                      throws ActivationException
Set the activation system for the VM. The activation system can only be set it if no group is currently active. If the activation system is not set via this call, then the getSystem method attempts to obtain a reference to the ActivationSystem by looking up the name "java.rmi.activation.ActivationSystem" in the Activator's registry. By default, the port number used to look up the activation system is defined by ActivationSystem.SYSTEM_PORT. This port can be overridden by setting the property java.rmi.activation.port.

If there is a security manager, this method first calls the security manager's checkSetFactory method. This could result in a SecurityException.

Parameters:
system - remote reference to the ActivationSystem
Throws:
ActivationException - if activation system is already set
SecurityException - if permission to set the activation system is denied. (Note: The default implementation of the security manager checkSetFactory method requires the RuntimePermission "setFactory")
Since:
1.2
See Also:
SecurityManager.checkSetFactory()

getSystem

public static ActivationSystem getSystem()
                                  throws ActivationException
Returns the activation system for the VM. The activation system may be set by the setSystem method. If the activation system is not set via the setSystem method, then the getSystem method attempts to obtain a reference to the ActivationSystem by looking up the name "java.rmi.activation.ActivationSystem" in the Activator's registry. By default, the port number used to look up the activation system is defined by ActivationSystem.SYSTEM_PORT. This port can be overridden by setting the property java.rmi.activation.port.
Returns:
the activation system for the VM/group
Throws:
ActivationException - if activation system cannot be obtained or is not bound (means that it is not running)
Since:
1.2

activeObject

protected void activeObject(ActivationID id,
                            MarshalledObject mobj)
                     throws ActivationException,
                            UnknownObjectException,
                            RemoteException
This protected method is necessary for subclasses to make the activeObject callback to the group's monitor. The call is simply forwarded to the group's ActivationMonitor.
Parameters:
id - the object's identifier
mobj - a marshalled object containing the remote object's stub
Throws:
UnknownObjectException - if object is not registered
RemoteException - if call informing monitor fails
ActivationException - if an activation error occurs
Since:
1.2

inactiveGroup

protected void inactiveGroup()
                      throws UnknownGroupException,
                             RemoteException
This protected method is necessary for subclasses to make the inactiveGroup callback to the group's monitor. The call is simply forwarded to the group's ActivationMonitor. Also, the current group for the VM is set to null.
Throws:
UnknownGroupException - if group is not registered
RemoteException - if call informing monitor fails
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationGroupDesc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationGroupDesc

java.lang.Object
  |
  +--java.rmi.activation.ActivationGroupDesc
All Implemented Interfaces:
Serializable
public final class ActivationGroupDesc
extends Object
implements Serializable

An activation group descriptor contains the information necessary to create/recreate an activation group in which to activate objects. Such a descriptor contains:

  • the group's class name,
  • the group's code location (the location of the group's class), and
  • a "marshalled" object that can contain group specific initialization data.

The group's class must be a concrete subclass of ActivationGroup. A subclass of ActivationGroup is created/recreated via the ActivationGroup.createGroup static method that invokes a special constructor that takes two arguments:

  • the group's ActivationGroupID, and
  • the group's initialization data (in a java.rmi.MarshalledObject)

Since:
1.2
See Also:
ActivationGroup, ActivationGroupID, Serialized Form

Inner Class Summary
static class ActivationGroupDesc.CommandEnvironment
Startup options for ActivationGroup implementations.
Constructor Summary
ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location.
ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
Method Summary
boolean | equals(Object obj) Compares two activation group descriptors for content equality.
String | getClassName() Returns the group's class name (possibly null).
ActivationGroupDesc.CommandEnvironment | getCommandEnvironment() Returns the group's command-environment control object.
MarshalledObject | getData() Returns the group's initialization data.
String | getLocation() Returns the group's code location.
Properties | getPropertyOverrides() Returns the group's property-override list.
int | hashCode() Produce identical numbers for similar ActivationGroupDescs.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActivationGroupDesc

public ActivationGroupDesc(Properties overrides,
                           ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location. Properties specify Java environment overrides (which will override system properties in the group implementation's VM). The command environment can control the exact command/options used in starting the child VM, or can be null to accept rmid's default.

This constructor will create an ActivationGroupDesc with a null group class name, which indicates the system's default ActivationGroup implementation.

Parameters:
overrides - the set of properties to set when the group is recreated.
cmd - the controlling options for executing the VM in another process (or null).
Since:
1.2

ActivationGroupDesc

public ActivationGroupDesc(String className,
                           String location,
                           MarshalledObject data,
                           Properties overrides,
                           ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
Parameters:
className - the group's package qualified class name or null. A null group class name indicates the system's default ActivationGroup implementation.
location - the location from where to load the group's class
data - the group's initialization data contained in marshalled form (could contain properties, for example)
overrides - a properties map which will override those set by default in the subprocess environment (will be translated into -D options), or null.
cmd - the controlling options for executing the VM in another process (or null).
Since:
1.2
Method Detail

getClassName

public String getClassName()
Returns the group's class name (possibly null). A null group class name indicates the system's default ActivationGroup implementation.
Returns:
the group's class name
Since:
1.2

getLocation

public String getLocation()
Returns the group's code location.
Returns:
the group's code location
Since:
1.2

getData

public MarshalledObject getData()
Returns the group's initialization data.
Returns:
the group's initialization data
Since:
1.2

getPropertyOverrides

public Properties getPropertyOverrides()
Returns the group's property-override list.
Returns:
the property-override list, or null
Since:
1.2

getCommandEnvironment

public ActivationGroupDesc.CommandEnvironment getCommandEnvironment()
Returns the group's command-environment control object.
Returns:
the command-environment object, or null
Since:
1.2

equals

public boolean equals(Object obj)
Compares two activation group descriptors for content equality.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable

hashCode

public int hashCode()
Produce identical numbers for similar ActivationGroupDescs.
Overrides:
hashCode in class Object
Returns:
an integer
See Also:
Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationGroupID

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationGroupID

java.lang.Object
  |
  +--java.rmi.activation.ActivationGroupID
All Implemented Interfaces:
Serializable
public class ActivationGroupID
extends Object
implements Serializable

The identifier for a registered activation group serves several purposes:

  • identifies the group uniquely within the activation system, and
  • contains a reference to the group's activation system so that the group can contact its activation system when necessary.

The ActivationGroupID is returned from the call to ActivationSystem.registerGroup and is used to identify the group within the activation system. This group id is passed as one of the arguments to the activation group's special constructor when an activation group is created/recreated.

Since:
1.2
See Also:
ActivationGroup, ActivationGroupDesc, Serialized Form

Constructor Summary
ActivationGroupID(ActivationSystem system)
Constructs a unique group id.
Method Summary
boolean | equals(Object obj) Compares two group identifiers for content equality.
ActivationSystem | getSystem() Returns the group's activation system.
int | hashCode() Returns a hashcode for the group's identifier.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActivationGroupID

public ActivationGroupID(ActivationSystem system)
Constructs a unique group id.
Parameters:
system - the group's activation system
Since:
1.2
Method Detail

getSystem

public ActivationSystem getSystem()
Returns the group's activation system.
Returns:
the group's activation system
Since:
1.2

hashCode

public int hashCode()
Returns a hashcode for the group's identifier. Two group identifiers that refer to the same remote group will have the same hash code.
Overrides:
hashCode in class Object
Since:
1.2
See Also:
Hashtable

equals

public boolean equals(Object obj)
Compares two group identifiers for content equality. Returns true if both of the following conditions are true: 1) the unique identifiers are equivalent (by content), and 2) the activation system specified in each refers to the same remote object.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationID

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationID

java.lang.Object
  |
  +--java.rmi.activation.ActivationID
All Implemented Interfaces:
Serializable
public class ActivationID
extends Object
implements Serializable

Activation makes use of special identifiers to denote remote objects that can be activated over time. An activation identifier (an instance of the class ActivationID) contains several pieces of information needed for activating an object:

  • a remote reference to the object's activator, and
  • a unique identifier for the object.

An activation id for an object can be obtained by registering an object with the activation system. Registration is accomplished in a few ways:

  • via the Activatable.register method
  • via the first Activatable constructor (that takes three arguments and both registers and exports the object, and
  • via the first Activatable.exportObject method that takes the activation descriptor, object and port as arguments; this method both registers and exports the object.

Since:
1.2
See Also:
Activatable, Serialized Form

Constructor Summary
ActivationID(Activator activator)
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier.
Method Summary
Remote | activate(boolean force) Activate the object for this id.
boolean | equals(Object obj) Compares two activation ids for content equality.
int | hashCode() Returns a hashcode for the activation id.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActivationID

public ActivationID(Activator activator)
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier. An instance of ActivationID is globally unique.
Parameters:
activator - reference to the activator responsible for activating the object
Since:
1.2
Method Detail

activate

public Remote activate(boolean force)
                throws ActivationException,
                       UnknownObjectException,
                       RemoteException
Activate the object for this id.
Parameters:
force - if true, forces the activator to contact the group when activating the object (instead of returning a cached reference); if false, returning a cached value is acceptable.
Returns:
the reference to the active remote object
Throws:
ActivationException - if activation fails
UnknownObjectException - if the object is unknown
RemoteException - if remote call fails
Since:
1.2

hashCode

public int hashCode()
Returns a hashcode for the activation id. Two identifiers that refer to the same remote object will have the same hash code.
Overrides:
hashCode in class Object
Since:
1.2
See Also:
Hashtable

equals

public boolean equals(Object obj)
Compares two activation ids for content equality. Returns true if both of the following conditions are true: 1) the unique identifiers equivalent (by content), and 2) the activator specified in each identifier refers to the same remote object.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActivationInstantiator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Interface ActivationInstantiator

All Superinterfaces:
Remote
All Known Implementing Classes:
ActivationGroup
public interface ActivationInstantiator
extends Remote

An ActivationInstantiator is responsible for creating instances of "activatable" objects. A concrete subclass of ActivationGroup implements the newInstance method to handle creating objects within the group.

Since:
1.2
See Also:
ActivationGroup

Method Summary
 MarshalledObject newInstance(ActivationID id, ActivationDesc desc)
The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.

Method Detail

newInstance

public MarshalledObject newInstance(ActivationID id,
                                    ActivationDesc desc)
                             throws ActivationException,
                                    RemoteException
The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc. The instantiator is responsible for:
  • determining the class for the object using the descriptor's getClassName method,
  • loading the class from the code location obtained from the descriptor (using the getLocation method),
  • creating an instance of the class by invoking the special "activation" constructor of the object's class that takes two arguments: the object's ActivationID, and the MarshalledObject containing object specific initialization data, and
  • returning a MarshalledObject containing the stub for the remote object it created

    Parameters:
    id - the object's activation identifier
    desc - the object's descriptor
    Returns:
    a marshalled object containing the serialized representation of remote object's stub
    Throws:
    ActivationException - if object activation fails
    RemoteException - if remote call fails
    Since:
    1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActivationMonitor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Interface ActivationMonitor

All Superinterfaces:
Remote
public interface ActivationMonitor
extends Remote

An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally). An activation group is responsible for informing its ActivationMonitor when either: its objects become active or inactive, or the group as a whole becomes inactive.

Since:
1.2
See Also:
Activator, ActivationSystem, ActivationGroup

Method Summary
void | activeObject(ActivationID id, MarshalledObject obj) Informs that an object is now active.
void | inactiveGroup(ActivationGroupID id, long incarnation) Informs that the group is now inactive.
void | inactiveObject(ActivationID id) An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates).

Method Detail

inactiveObject

public void inactiveObject(ActivationID id)
                    throws UnknownObjectException,
                           RemoteException
An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates). An activation group discovers that an object (that it participated in activating) in its VM is no longer active, via calls to the activation group's inactiveObject method.

The inactiveObject call informs the ActivationMonitor that the remote object reference it holds for the object with the activation identifier, id, is no longer valid. The monitor considers the reference associated with id as a stale reference. Since the reference is considered stale, a subsequent activate call for the same activation identifier results in re-activating the remote object.

Parameters:
id - the object's activation identifier
Throws:
UnknownObjectException - if object is unknown
RemoteException - if remote call fails
Since:
1.2

activeObject

public void activeObject(ActivationID id,
                         MarshalledObject obj)
                  throws UnknownObjectException,
                         RemoteException
Informs that an object is now active. An ActivationGroup informs its monitor if an object in its group becomes active by other means than being activated directly (i.e., the object is registered and "activated" itself).
Parameters:
id - the active object's id
obj - the marshalled form of the object's stub
Throws:
UnknownObjectException - if object is unknown
RemoteException - if remote call fails
Since:
1.2

inactiveGroup

public void inactiveGroup(ActivationGroupID id,
                          long incarnation)
                   throws UnknownGroupException,
                          RemoteException
Informs that the group is now inactive. The group will be recreated upon a subsequent request to activate an object within the group. A group becomes inactive when all objects in the group report that they are inactive.
Parameters:
id - the group's id
incarnation - the group's incarnation number
Throws:
UnknownGroupException - if group is unknown
RemoteException - if remote call fails
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActivationSystem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Interface ActivationSystem

All Superinterfaces:
Remote
public interface ActivationSystem
extends Remote

The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups. The ActivationSystem works closely with the Activator, which activates objects registered via the ActivationSystem, and the ActivationMonitor, which obtains information about active and inactive objects, and inactive groups.

Since:
1.2
See Also:
Activator, ActivationMonitor

Field Summary
static int SYSTEM_PORT
The port to lookup the activation system.
Method Summary
ActivationMonitor | activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) Callback to inform activation system that group is now active.
ActivationDesc | getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.
ActivationGroupDesc | getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.
ActivationGroupID | registerGroup(ActivationGroupDesc desc) Register the activation group.
ActivationID | registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
ActivationDesc | setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationGroupDesc | setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
void | shutdown() Shutdown the activation system.
void | unregisterGroup(ActivationGroupID id) Remove the activation group.
void | unregisterObject(ActivationID id) Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.

Field Detail

SYSTEM_PORT

public static final int SYSTEM_PORT
The port to lookup the activation system.
Method Detail

registerObject

public ActivationID registerObject(ActivationDesc desc)
                            throws ActivationException,
                                   UnknownGroupException,
                                   RemoteException
The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object. The ActivationSystem creates an ActivationID (a activation identifier) for the object specified by the descriptor, desc, and records, in stable storage, the activation descriptor and its associated identifier for later use. When the Activator receives an activate request for a specific identifier, it looks up the activation descriptor (registered previously) for the specified identifier and uses that information to activate the object.

Parameters:
desc - the object's activation descriptor
Returns:
the activation id that can be used to activate the object
Throws:
ActivationException - if registration fails (e.g., database update failure, etc).
UnknownGroupException - if group referred to in desc is not registered with this system
RemoteException - if remote call fails
Since:
1.2

unregisterObject

public void unregisterObject(ActivationID id)
                      throws ActivationException,
                             UnknownObjectException,
                             RemoteException
Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
Parameters:
id - the object's activation id (from previous registration)
Throws:
ActivationException - if unregister fails (e.g., database update failure, etc).
UnknownObjectException - if object is unknown (not registered)
RemoteException - if remote call fails
Since:
1.2

registerGroup

public ActivationGroupID registerGroup(ActivationGroupDesc desc)
                                throws ActivationException,
                                       RemoteException
Register the activation group. An activation group must be registered with the ActivationSystem before objects can be registered within that group.
Parameters:
desc - the group's descriptor
Returns:
an identifier for the group
Throws:
ActivationException - if group registration fails
RemoteException - if remote call fails
Since:
1.2

activeGroup

public ActivationMonitor activeGroup(ActivationGroupID id,
                                     ActivationInstantiator group,
                                     long incarnation)
                              throws UnknownGroupException,
                                     ActivationException,
                                     RemoteException
Callback to inform activation system that group is now active. This call is made internally by the ActivationGroup.createGroup method to inform the ActivationSystem that the group is now active.
Parameters:
id - the activation group's identifier
group - the group's instantiator
incarnation - the group's incarnation number
Returns:
monitor for activation group
Throws:
UnknownGroupException - if group is not registered
ActivationException - if group is already active
RemoteException - if remote call fails
Since:
1.2

unregisterGroup

public void unregisterGroup(ActivationGroupID id)
                     throws ActivationException,
                            UnknownGroupException,
                            RemoteException
Remove the activation group. An activation group makes this call back to inform the activator that the group should be removed (destroyed). If this call completes successfully, objects can no longer be registered or activated within the group. All information of the group and its associated objects is removed from the system.
Parameters:
id - the activation group's identifier
Throws:
ActivationException - if unregister fails (e.g., database update failure, etc).
UnknownGroupException - if group is not registered
RemoteException - if remote call fails
Since:
1.2

shutdown

public void shutdown()
              throws RemoteException
Shutdown the activation system. Destroys all groups spawned by the activation daemon and exits the activation daemon.
Throws:
RemoteException - if failed to contact/shutdown the activation daemon
Since:
1.2

setActivationDesc

public ActivationDesc setActivationDesc(ActivationID id,
                                        ActivationDesc desc)
                                 throws ActivationException,
                                        UnknownObjectException,
                                        UnknownGroupException,
                                        RemoteException
Set the activation descriptor, desc for the object with the activation identifier, id. The change will take effect upon subsequent activation of the object.
Parameters:
id - the activation identifier for the activatable object
desc - the activation descriptor for the activatable object
Returns:
the previous value of the activation descriptor
Throws:
UnknownGroupException - the group associated with desc is not a registered group
UnknownObjectException - the activation id is not registered
ActivationException - for general failure (e.g., unable to update log)
RemoteException - if remote call fails
Since:
1.2

setActivationGroupDesc

public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id,
                                                  ActivationGroupDesc desc)
                                           throws ActivationException,
                                                  UnknownGroupException,
                                                  RemoteException
Set the activation group descriptor, desc for the object with the activation group identifier, id. The change will take effect upon subsequent activation of the group.
Parameters:
id - the activation group identifier for the activation group
desc - the activation group descriptor for the activation group
Returns:
the previous value of the activation group descriptor
Throws:
UnknownGroupException - the group associated with id is not a registered group
ActivationException - for general failure (e.g., unable to update log)
RemoteException - if remote call fails
Since:
1.2

getActivationDesc

public ActivationDesc getActivationDesc(ActivationID id)
                                 throws ActivationException,
                                        UnknownObjectException,
                                        RemoteException
Returns the activation descriptor, for the object with the activation identifier, id.
Parameters:
id - the activation identifier for the activatable object
Returns:
the activation descriptor
Throws:
UnknownObjectException - if id is not registered
ActivationException - for general failure
RemoteException - if remote call fails
Since:
1.2

getActivationGroupDesc

public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id)
                                           throws ActivationException,
                                                  UnknownGroupException,
                                                  RemoteException
Returns the activation group descriptor, for the group with the activation group identifier, id.
Parameters:
id - the activation group identifier for the group
Returns:
the activation group descriptor
Throws:
UnknownGroupException - if id is not registered
ActivationException - for general failure
RemoteException - if remote call fails
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Activator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Interface Activator

All Superinterfaces:
Remote
public interface Activator
extends Remote

The Activator facilitates remote object activation. A "faulting" remote reference calls the activator's activate method to obtain a "live" reference to a "activatable" remote object. Upon receiving a request for activation, the activator looks up the activation descriptor for the activation identifier, id, determines the group in which the object should be activated initiates object re-creation via the group's ActivationInstantiator (via a call to the newInstance method). The activator initiates the execution of activation groups as necessary. For example, if an activation group for a specific group identifier is not already executing, the activator initiates the execution of a VM for the group.

The Activator works closely with ActivationSystem, which provides a means for registering groups and objects within those groups, and ActivationMonitor, which recives information about active and inactive objects and inactive groups.

The activator is responsible for monitoring and detecting when activation groups fail so that it can remove stale remote references to groups and active object's within those groups.

Since:
1.2
See Also:
ActivationInstantiator, ActivationGroupDesc, ActivationGroupID

Method Summary
 MarshalledObject activate(ActivationID id, boolean force)
Activate the object associated with the activation identifier, id.

Method Detail

activate

public MarshalledObject activate(ActivationID id,
                                 boolean force)
                          throws ActivationException,
                                 UnknownObjectException,
                                 RemoteException
Activate the object associated with the activation identifier, id. If the activator knows the object to be active already, and force is false , the stub with a "live" reference is returned immediately to the caller; otherwise, if the activator does not know that corresponding the remote object is active, the activator uses the activation descriptor information (previously registered) to determine the group (VM) in which the object should be activated. If an ActivationInstantiator corresponding to the object's group descriptor already exists, the activator invokes the activation group's newInstance method passing it the object's id and descriptor.

If the activation group for the object's group descriptor does not yet exist, the activator starts an ActivationInstantiator executing (by spawning a child process, for example). When the activator receives the activation group's call back (via the ActivationSystem's activeGroup method) specifying the activation group's reference, the activator can then invoke that activation instantiator's newInstance method to forward each pending activation request to the activation group and return the result (a marshalled remote object reference, a stub) to the caller.

Note that the activator receives a "marshalled" object instead of a Remote object so that the activator does not need to load the code for that object, or participate in distributed garbage collection for that object. If the activator kept a strong reference to the remote object, the activator would then prevent the object from being garbage collected under the normal distributed garbage collection mechanism.

Parameters:
id - the activation identifier for the object being activated
force - if true, the activator contacts the group to obtain the remote object's reference; if false, returning the cached value is allowed.
Returns:
the remote object (a stub) in a marshalled form
Throws:
ActivationException - if object activation fails
UnknownObjectException - if object is unknown (not registered)
RemoteException - if remote call fails
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.rmi.activation.Activatable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.Activatable

No usage of java.rmi.activation.Activatable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivateFailedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivateFailedException

No usage of java.rmi.activation.ActivateFailedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationDesc

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationDesc

Packages that use ActivationDesc
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationDesc in java.rmi.activation

Methods in java.rmi.activation that return ActivationDesc
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationDesc | ActivationSystem.getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.

Methods in java.rmi.activation with parameters of type ActivationDesc
static Remote | Activatable.register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
ActivationID | ActivationSystem.registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
MarshalledObject | ActivationInstantiator.newInstance(ActivationID id, ActivationDesc desc) The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationException

Packages that use ActivationException
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationException in java.rmi.activation

Subclasses of ActivationException in java.rmi.activation
class | UnknownGroupException An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem.
class | UnknownObjectException An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid.

Methods in java.rmi.activation that throw ActivationException
static Remote | Activatable.register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
static boolean | Activatable.inactive(ActivationID id) Informs the system that the object with the corresponding activation id is currently inactive.
static void | Activatable.unregister(ActivationID id) Revokes previous registration for the activation descriptor associated with id.
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
MarshalledObject | Activator.activate(ActivationID id, boolean force) Activate the object associated with the activation identifier, id.
ActivationID | ActivationSystem.registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
void | ActivationSystem.unregisterObject(ActivationID id) Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
ActivationGroupID | ActivationSystem.registerGroup(ActivationGroupDesc desc) Register the activation group.
ActivationMonitor | ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) Callback to inform activation system that group is now active.
void | ActivationSystem.unregisterGroup(ActivationGroupID id) Remove the activation group.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
ActivationDesc | ActivationSystem.getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.
ActivationGroupDesc | ActivationSystem.getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.
MarshalledObject | ActivationInstantiator.newInstance(ActivationID id, ActivationDesc desc) The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.
boolean | ActivationGroup.inactiveObject(ActivationID id) The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
abstract void | ActivationGroup.activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
static ActivationGroup | ActivationGroup.createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) Create and set the activation group for the current VM.
static void | ActivationGroup.setSystem(ActivationSystem system) Set the activation system for the VM.
static ActivationSystem | ActivationGroup.getSystem() Returns the activation system for the VM.
protected void | ActivationGroup.activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
Remote | ActivationID.activate(boolean force) Activate the object for this id.

Constructors in java.rmi.activation that throw ActivationException
Activatable(String location, MarshalledObject data, boolean restart, int port)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
ActivationDesc(String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationGroup

Packages that use ActivationGroup
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationGroup in java.rmi.activation

Methods in java.rmi.activation that return ActivationGroup
static ActivationGroup ActivationGroup.createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation)
Create and set the activation group for the current VM.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationGroupDesc

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationGroupDesc

Packages that use ActivationGroupDesc
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationGroupDesc in java.rmi.activation

Methods in java.rmi.activation that return ActivationGroupDesc
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
ActivationGroupDesc | ActivationSystem.getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.

Methods in java.rmi.activation with parameters of type ActivationGroupDesc
ActivationGroupID | ActivationSystem.registerGroup(ActivationGroupDesc desc) Register the activation group.
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
static ActivationGroup | ActivationGroup.createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) Create and set the activation group for the current VM.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationGroupDesc.CommandEnvironment

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationGroupDesc.CommandEnvironment

Packages that use ActivationGroupDesc.CommandEnvironment
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationGroupDesc.CommandEnvironment in java.rmi.activation

Methods in java.rmi.activation that return ActivationGroupDesc.CommandEnvironment
 ActivationGroupDesc.CommandEnvironment ActivationGroupDesc.getCommandEnvironment()
Returns the group's command-environment control object.

Constructors in java.rmi.activation with parameters of type ActivationGroupDesc.CommandEnvironment
ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location.
ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationGroupID

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationGroupID

Packages that use ActivationGroupID
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationGroupID in java.rmi.activation

Methods in java.rmi.activation that return ActivationGroupID
ActivationGroupID | ActivationDesc.getGroupID() Returns the group identifier for the object specified by this descriptor.
ActivationGroupID | ActivationSystem.registerGroup(ActivationGroupDesc desc) Register the activation group.
static ActivationGroupID | ActivationGroup.currentGroupID() Returns the current activation group's identifier.

Methods in java.rmi.activation with parameters of type ActivationGroupID
ActivationMonitor | ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) Callback to inform activation system that group is now active.
void | ActivationSystem.unregisterGroup(ActivationGroupID id) Remove the activation group.
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
ActivationGroupDesc | ActivationSystem.getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.
static ActivationGroup | ActivationGroup.createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) Create and set the activation group for the current VM.
void | ActivationMonitor.inactiveGroup(ActivationGroupID id, long incarnation) Informs that the group is now inactive.

Constructors in java.rmi.activation with parameters of type ActivationGroupID
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationGroup(ActivationGroupID groupID)
Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.ActivationID

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.ActivationID

Packages that use ActivationID
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationID in java.rmi.activation

Methods in java.rmi.activation that return ActivationID
protected ActivationID | Activatable.getID() Returns the object's activation identifier.
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
ActivationID | ActivationSystem.registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.

Methods in java.rmi.activation with parameters of type ActivationID
static boolean | Activatable.inactive(ActivationID id) Informs the system that the object with the corresponding activation id is currently inactive.
static void | Activatable.unregister(ActivationID id) Revokes previous registration for the activation descriptor associated with id.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
MarshalledObject | Activator.activate(ActivationID id, boolean force) Activate the object associated with the activation identifier, id.
void | ActivationSystem.unregisterObject(ActivationID id) Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationDesc | ActivationSystem.getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.
MarshalledObject | ActivationInstantiator.newInstance(ActivationID id, ActivationDesc desc) The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.
boolean | ActivationGroup.inactiveObject(ActivationID id) The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
abstract void | ActivationGroup.activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
protected void | ActivationGroup.activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
void | ActivationMonitor.inactiveObject(ActivationID id) An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates).
void | ActivationMonitor.activeObject(ActivationID id, MarshalledObject obj) Informs that an object is now active.

Constructors in java.rmi.activation with parameters of type ActivationID
Activatable(ActivationID id, int port)
Constructor used to activate/export the object on a specified port.
Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to activate/export the object on a specified port.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.UnknownGroupException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.UnknownGroupException

Packages that use UnknownGroupException
java.rmi.activation Provides support for RMI Object Activation.

Uses of UnknownGroupException in java.rmi.activation

Methods in java.rmi.activation that throw UnknownGroupException
static Remote | Activatable.register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
ActivationID | ActivationSystem.registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
ActivationMonitor | ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) Callback to inform activation system that group is now active.
void | ActivationSystem.unregisterGroup(ActivationGroupID id) Remove the activation group.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
ActivationGroupDesc | ActivationSystem.getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.
protected void | ActivationGroup.inactiveGroup() This protected method is necessary for subclasses to make the inactiveGroup callback to the group's monitor.
void | ActivationMonitor.inactiveGroup(ActivationGroupID id, long incarnation) Informs that the group is now inactive.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.activation.UnknownObjectException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.activation.UnknownObjectException

Packages that use UnknownObjectException
java.rmi.activation Provides support for RMI Object Activation.

Uses of UnknownObjectException in java.rmi.activation

Methods in java.rmi.activation that throw UnknownObjectException
static boolean | Activatable.inactive(ActivationID id) Informs the system that the object with the corresponding activation id is currently inactive.
static void | Activatable.unregister(ActivationID id) Revokes previous registration for the activation descriptor associated with id.
MarshalledObject | Activator.activate(ActivationID id, boolean force) Activate the object associated with the activation identifier, id.
void | ActivationSystem.unregisterObject(ActivationID id) Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationDesc | ActivationSystem.getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.
boolean | ActivationGroup.inactiveObject(ActivationID id) The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
abstract void | ActivationGroup.activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
protected void | ActivationGroup.activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
Remote | ActivationID.activate(boolean force) Activate the object for this id.
void | ActivationMonitor.inactiveObject(ActivationID id) An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates).
void | ActivationMonitor.activeObject(ActivationID id, MarshalledObject obj) Informs that an object is now active.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.activation.ActivationInstantiator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.activation.ActivationInstantiator

Packages that use ActivationInstantiator
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationInstantiator in java.rmi.activation

Classes in java.rmi.activation that implement ActivationInstantiator
 class ActivationGroup
An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

Methods in java.rmi.activation with parameters of type ActivationInstantiator
 ActivationMonitor ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)
Callback to inform activation system that group is now active.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.activation.ActivationMonitor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.activation.ActivationMonitor

Packages that use ActivationMonitor
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationMonitor in java.rmi.activation

Methods in java.rmi.activation that return ActivationMonitor
 ActivationMonitor ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)
Callback to inform activation system that group is now active.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.activation.ActivationSystem

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.activation.ActivationSystem

Packages that use ActivationSystem
java.rmi.activation Provides support for RMI Object Activation.

Uses of ActivationSystem in java.rmi.activation

Methods in java.rmi.activation that return ActivationSystem
ActivationSystem | ActivationGroupID.getSystem() Returns the group's activation system.
static ActivationSystem | ActivationGroup.getSystem() Returns the activation system for the VM.

Methods in java.rmi.activation with parameters of type ActivationSystem
static void ActivationGroup.setSystem(ActivationSystem system)
Set the activation system for the VM.

Constructors in java.rmi.activation with parameters of type ActivationSystem
ActivationGroupID(ActivationSystem system)
Constructs a unique group id.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.activation.Activator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.activation.Activator

Packages that use Activator
java.rmi.activation Provides support for RMI Object Activation.

Uses of Activator in java.rmi.activation

Constructors in java.rmi.activation with parameters of type Activator
ActivationID(Activator activator)
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this identifier.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CommandEnvironment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class ActivationGroupDesc.CommandEnvironment

java.lang.Object
  |
  +--java.rmi.activation.ActivationGroupDesc.CommandEnvironment
All Implemented Interfaces:
Serializable
Enclosing class:
ActivationGroupDesc
public static class ActivationGroupDesc.CommandEnvironment
extends Object
implements Serializable

Startup options for ActivationGroup implementations. This class allows overriding default system properties and specifying implementation-defined options for ActivationGroups.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
ActivationGroupDesc.CommandEnvironment(String cmdpath, String[] argv)
Create a CommandEnvironment with all the necessary information.
Method Summary
boolean | equals(Object obj) Compares two command environments for content equality.
String[] | getCommandOptions() Fetch the configured java command options.
String | getCommandPath() Fetch the configured path-qualified java command name.
int | hashCode() Return identical values for similar CommandEnvironments.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActivationGroupDesc.CommandEnvironment

public ActivationGroupDesc.CommandEnvironment(String cmdpath,
                                              String[] argv)
Create a CommandEnvironment with all the necessary information.
Parameters:
cmdpath - the name of the java executable, including the full path, or null, meaning "use rmid's default". The named program must be able to accept multiple -Dpropname=value options (as documented for the "java" tool)
argv - extra options which will be used in creating the ActivationGroup. Null has the same effect as an empty list.
Since:
1.2
Method Detail

getCommandPath

public String getCommandPath()
Fetch the configured path-qualified java command name.
Returns:
the configured name, or null if configured to accept the default
Since:
1.2

getCommandOptions

public String[] getCommandOptions()
Fetch the configured java command options.
Returns:
An array of the command options which will be passed to the new child command by rmid. Note that rmid may add other options before or after these options, or both. Never returns null.
Since:
1.2

equals

public boolean equals(Object obj)
Compares two command environments for content equality.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
1.2
See Also:
Hashtable

hashCode

public int hashCode()
Return identical values for similar CommandEnvironments.
Overrides:
hashCode in class Object
Returns:
an integer
See Also:
Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownGroupException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class UnknownGroupException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.activation.ActivationException
                    |
                    +--java.rmi.activation.UnknownGroupException
All Implemented Interfaces:
Serializable
public class UnknownGroupException
extends ActivationException

An UnknownGroupException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationGroupID parameter to the method is determined to be invalid, i.e., not known by the ActivationSystem. An UnknownGroupException is also thrown if the ActivationGroupID in an ActivationDesc refers to a group that is not registered with the ActivationSystem

Since:
1.2
See Also:
Activatable, ActivationGroup, ActivationGroupID, ActivationMonitor, ActivationSystem, Serialized Form

Fields inherited from class java.rmi.activation.ActivationException
detail
Constructor Summary
UnknownGroupException(String s)
Constructs an UnknownGroupException with the specified detail message.
Methods inherited from class java.rmi.activation.ActivationException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownGroupException

public UnknownGroupException(String s)
Constructs an UnknownGroupException with the specified detail message.
Parameters:
s - the detail message
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownObjectException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.activation
Class UnknownObjectException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.activation.ActivationException
                    |
                    +--java.rmi.activation.UnknownObjectException
All Implemented Interfaces:
Serializable
public class UnknownObjectException
extends ActivationException

An UnknownObjectException is thrown by methods of classes and interfaces in the java.rmi.activation package when the ActivationID parameter to the method is determined to be invalid. An ActivationID is invalid if it is not currently known by the ActivationSystem. An ActivationID is obtained by the ActivationSystem.registerObject method. An ActivationID is also obtained during the Activatable.register call.

Since:
1.2
See Also:
Activatable, ActivationGroup, ActivationID, ActivationMonitor, ActivationSystem, Activator, Serialized Form

Fields inherited from class java.rmi.activation.ActivationException
detail
Constructor Summary
UnknownObjectException(String s)
Constructs an UnknownObjectException with the specified detail message.
Methods inherited from class java.rmi.activation.ActivationException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownObjectException

public UnknownObjectException(String s)
Constructs an UnknownObjectException with the specified detail message.
Parameters:
s - the detail message
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AlreadyBoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class AlreadyBoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.AlreadyBoundException
All Implemented Interfaces:
Serializable
public class AlreadyBoundException
extends Exception

An AlreadyBoundException is thrown if an attempt is made to bind an object in the registry to a name that already has an associated binding.

Since:
JDK1.1
See Also:
Naming.bind(String, java.rmi.Remote), Registry.bind(String, java.rmi.Remote), Serialized Form

Constructor Summary
AlreadyBoundException()
Constructs an AlreadyBoundException with no specified detail message.
AlreadyBoundException(String s)
Constructs an AlreadyBoundException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AlreadyBoundException

public AlreadyBoundException()
Constructs an AlreadyBoundException with no specified detail message.
Since:
JDK1.1

AlreadyBoundException

public AlreadyBoundException(String s)
Constructs an AlreadyBoundException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.rmi.ConnectException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.ConnectException

No usage of java.rmi.ConnectException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.ConnectIOException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.ConnectIOException

No usage of java.rmi.ConnectIOException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.MarshalException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.MarshalException

No usage of java.rmi.MarshalException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.Naming

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.Naming

No usage of java.rmi.Naming

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.RMISecurityException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.RMISecurityException

No usage of java.rmi.RMISecurityException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.RMISecurityManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.RMISecurityManager

No usage of java.rmi.RMISecurityManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.ServerError

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.ServerError

No usage of java.rmi.ServerError

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.ServerException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.ServerException

No usage of java.rmi.ServerException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.ServerRuntimeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.ServerRuntimeException

No usage of java.rmi.ServerRuntimeException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.StubNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.StubNotFoundException

No usage of java.rmi.StubNotFoundException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.UnexpectedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.UnexpectedException

No usage of java.rmi.UnexpectedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.UnmarshalException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.UnmarshalException

No usage of java.rmi.UnmarshalException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.AccessException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.AccessException

Packages that use AccessException
java.rmi.registry Provides a class and two interfaces for the RMI registry.

Uses of AccessException in java.rmi.registry

Methods in java.rmi.registry that throw AccessException
Remote | Registry.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
void | Registry.bind(String name, Remote obj) Binds the specified name to a remote object.
void | Registry.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
void | Registry.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
String[] | Registry.list() Returns an array of the names bound in the registry.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.AlreadyBoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.AlreadyBoundException

Packages that use AlreadyBoundException
java.rmi | Provides the RMI package.
java.rmi.registry | Provides a class and two interfaces for the RMI registry.

Uses of AlreadyBoundException in java.rmi

Methods in java.rmi that throw AlreadyBoundException
static void Naming.bind(String name, Remote obj)
Binds the specified name to a remote object.

Uses of AlreadyBoundException in java.rmi.registry

Methods in java.rmi.registry that throw AlreadyBoundException
 void Registry.bind(String name, Remote obj)
Binds the specified name to a remote object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.MarshalledObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.MarshalledObject

Packages that use MarshalledObject
java.rmi.activation Provides support for RMI Object Activation.

Uses of MarshalledObject in java.rmi.activation

Methods in java.rmi.activation that return MarshalledObject
MarshalledObject | ActivationGroupDesc.getData() Returns the group's initialization data.
MarshalledObject | ActivationDesc.getData() Returns a "marshalled object" containing intialization/activation data for the object specified by this descriptor.
MarshalledObject | Activator.activate(ActivationID id, boolean force) Activate the object associated with the activation identifier, id.
MarshalledObject | ActivationInstantiator.newInstance(ActivationID id, ActivationDesc desc) The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.

Methods in java.rmi.activation with parameters of type MarshalledObject
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
protected void | ActivationGroup.activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
void | ActivationMonitor.activeObject(ActivationID id, MarshalledObject obj) Informs that an object is now active.

Constructors in java.rmi.activation with parameters of type MarshalledObject
Activatable(String location, MarshalledObject data, boolean restart, int port)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.
ActivationDesc(String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className, that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.
ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart)
Constructs an object descriptor for an object whose class name is className that can be loaded from the code location and whose initialization information is data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.NoSuchObjectException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.NoSuchObjectException

Packages that use NoSuchObjectException
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.

Uses of NoSuchObjectException in java.rmi.activation

Methods in java.rmi.activation that throw NoSuchObjectException
static boolean Activatable.unexportObject(Remote obj, boolean force)
Remove the remote object, obj, from the RMI runtime.

Uses of NoSuchObjectException in java.rmi.server

Methods in java.rmi.server that throw NoSuchObjectException
static Remote | RemoteObject.toStub(Remote obj) Returns the stub for the remote object obj passed as a parameter.
static boolean | UnicastRemoteObject.unexportObject(Remote obj, boolean force) Remove the remote object, obj, from the RMI runtime.

Uses of NoSuchObjectException in javax.rmi

Methods in javax.rmi that throw NoSuchObjectException
static Remote | PortableRemoteObject.toStub(Remote obj) Returns a stub for the given server object.
static void | PortableRemoteObject.unexportObject(Remote obj) Deregisters a server object from the runtime, allowing the object to become available for garbage collection.

Uses of NoSuchObjectException in javax.rmi.CORBA

Methods in javax.rmi.CORBA that throw NoSuchObjectException
 Remote PortableRemoteObjectDelegate.toStub(Remote obj)
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).
 void PortableRemoteObjectDelegate.unexportObject(Remote obj)
Delegation call for PortableRemoteObject.unexportObject(java.rmi.Remote).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.NotBoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.NotBoundException

Packages that use NotBoundException
java.rmi | Provides the RMI package.
java.rmi.registry | Provides a class and two interfaces for the RMI registry.

Uses of NotBoundException in java.rmi

Methods in java.rmi that throw NotBoundException
static Remote | Naming.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
static void | Naming.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.

Uses of NotBoundException in java.rmi.registry

Methods in java.rmi.registry that throw NotBoundException
Remote | Registry.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
void | Registry.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.RemoteException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.RemoteException

Packages that use RemoteException
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
javax.transaction | Contains three exceptions thrown by the ORB machinery during unmarshalling.

Uses of RemoteException in java.rmi

Subclasses of RemoteException in java.rmi
class | AccessException An AccessException is thrown by certain methods of the java.rmi.Naming class (specifically bind, rebind, and unbind) and methods of the java.rmi.activation.ActivationSystem interface to indicate that the caller does not have permission to perform the action requested by the method call.
class | ConnectException A ConnectException is thrown if a connection is refused to the remote host for a remote method call.
class | ConnectIOException A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.
class | MarshalException A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call.
class | NoSuchObjectException A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.
class | ServerError A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error.
class | ServerException A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.
class | ServerRuntimeException Deprecated. no replacement
class | StubNotFoundException A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported.
class | UnexpectedException An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.
class | UnknownHostException An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.
class | UnmarshalException An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur: if an exception occurs while unmarshalling the call header if the protocol for the return value is invalid if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).

Methods in java.rmi that throw RemoteException
static Remote | Naming.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
static void | Naming.bind(String name, Remote obj) Binds the specified name to a remote object.
static void | Naming.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
static void | Naming.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
static String[] | Naming.list(String name) Returns an array of the names bound in the registry.

Uses of RemoteException in java.rmi.activation

Subclasses of RemoteException in java.rmi.activation
 class ActivateFailedException
This exception is thrown by the RMI runtime when activation fails during a remote call to an activatable object.

Methods in java.rmi.activation that throw RemoteException
static Remote | Activatable.register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
static boolean | Activatable.inactive(ActivationID id) Informs the system that the object with the corresponding activation id is currently inactive.
static void | Activatable.unregister(ActivationID id) Revokes previous registration for the activation descriptor associated with id.
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
MarshalledObject | Activator.activate(ActivationID id, boolean force) Activate the object associated with the activation identifier, id.
ActivationID | ActivationSystem.registerObject(ActivationDesc desc) The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object.
void | ActivationSystem.unregisterObject(ActivationID id) Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.
ActivationGroupID | ActivationSystem.registerGroup(ActivationGroupDesc desc) Register the activation group.
ActivationMonitor | ActivationSystem.activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) Callback to inform activation system that group is now active.
void | ActivationSystem.unregisterGroup(ActivationGroupID id) Remove the activation group.
void | ActivationSystem.shutdown() Shutdown the activation system.
ActivationDesc | ActivationSystem.setActivationDesc(ActivationID id, ActivationDesc desc) Set the activation descriptor, desc for the object with the activation identifier, id.
ActivationGroupDesc | ActivationSystem.setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) Set the activation group descriptor, desc for the object with the activation group identifier, id.
ActivationDesc | ActivationSystem.getActivationDesc(ActivationID id) Returns the activation descriptor, for the object with the activation identifier, id.
ActivationGroupDesc | ActivationSystem.getActivationGroupDesc(ActivationGroupID id) Returns the activation group descriptor, for the group with the activation group identifier, id.
MarshalledObject | ActivationInstantiator.newInstance(ActivationID id, ActivationDesc desc) The activator calls an instantiator's newInstance method in order to recreate in that group an object with the activation identifier, id, and descriptor, desc.
boolean | ActivationGroup.inactiveObject(ActivationID id) The group's inactiveObject method is called indirectly via a call to the Activatable.inactive method.
abstract void | ActivationGroup.activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.
protected void | ActivationGroup.activeObject(ActivationID id, MarshalledObject mobj) This protected method is necessary for subclasses to make the activeObject callback to the group's monitor.
protected void | ActivationGroup.inactiveGroup() This protected method is necessary for subclasses to make the inactiveGroup callback to the group's monitor.
Remote | ActivationID.activate(boolean force) Activate the object for this id.
void | ActivationMonitor.inactiveObject(ActivationID id) An activation group calls its monitor's inactiveObject method when an object in its group becomes inactive (deactivates).
void | ActivationMonitor.activeObject(ActivationID id, MarshalledObject obj) Informs that an object is now active.
void | ActivationMonitor.inactiveGroup(ActivationGroupID id, long incarnation) Informs that the group is now inactive.

Constructors in java.rmi.activation that throw RemoteException
Activatable(String location, MarshalledObject data, boolean restart, int port)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(ActivationID id, int port)
Constructor used to activate/export the object on a specified port.
Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to activate/export the object on a specified port.
ActivationGroup(ActivationGroupID groupID)
Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.

Uses of RemoteException in java.rmi.dgc

Methods in java.rmi.dgc that throw RemoteException
Lease | DGC.dirty(ObjID[] ids, long sequenceNum, Lease lease) The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.
void | DGC.clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.

Uses of RemoteException in java.rmi.registry

Methods in java.rmi.registry that throw RemoteException
Remote | Registry.lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
void | Registry.bind(String name, Remote obj) Binds the specified name to a remote object.
void | Registry.unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
void | Registry.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
String[] | Registry.list() Returns an array of the names bound in the registry.
Registry | RegistryHandler.registryStub(String host, int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.
Registry | RegistryHandler.registryImpl(int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.
static Registry | LocateRegistry.getRegistry() Returns a reference to the the remote object Registry for the local host on the default registry port of 1099.
static Registry | LocateRegistry.getRegistry(int port) Returns a reference to the the remote object Registry for the local host on the specified port.
static Registry | LocateRegistry.getRegistry(String host) Returns a reference to the remote object Registry on the specified host on the default registry port of 1099.
static Registry | LocateRegistry.getRegistry(String host, int port) Returns a reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.getRegistry(String host, int port, RMIClientSocketFactory csf) Returns a locally created remote reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.createRegistry(int port) Creates and exports a Registry on the local host that accepts requests on the specified port.
static Registry | LocateRegistry.createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.

Uses of RemoteException in java.rmi.server

Subclasses of RemoteException in java.rmi.server
class | ExportException An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
class | SkeletonMismatchException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SkeletonNotFoundException Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
class | SocketSecurityException A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Methods in java.rmi.server that throw RemoteException
static RemoteStub | UnicastRemoteObject.exportObject(Remote obj) Export the remote object to make it available to receive incoming calls, using an anonymous port.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port) Export the remote object to make it available to receive incoming calls, using the particular supplied port.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
RemoteCall | RemoteRef.newCall(RemoteObject obj, Operation[] op, int opnum, long hash) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
void | RemoteRef.done(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
RemoteStub | ServerRef.exportObject(Remote obj, Object data) Creates a client stub object for the supplied Remote object.

Constructors in java.rmi.server that throw RemoteException
UnicastRemoteObject()
Create and export a new UnicastRemoteObject object using an anonymous port.
UnicastRemoteObject(int port)
Create and export a new UnicastRemoteObject object using the particular supplied port.
UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.

Uses of RemoteException in javax.rmi

Methods in javax.rmi that throw RemoteException
static void | PortableRemoteObject.exportObject(Remote obj) Makes a server object ready to receive remote calls.
static void | PortableRemoteObject.connect(Remote target, Remote source) Makes a Remote object ready for remote communication.

Constructors in javax.rmi that throw RemoteException
PortableRemoteObject()
Initializes the object by calling exportObject(this).

Uses of RemoteException in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return RemoteException
static RemoteException Util.mapSystemException(SystemException ex)
Maps a SystemException to a RemoteException.
static RemoteException Util.wrapException(Throwable orig)
Wraps an exception thrown by an implementation method.
 RemoteException UtilDelegate.mapSystemException(SystemException ex)
Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).
 RemoteException UtilDelegate.wrapException(Throwable obj)
Delegation call for Util.wrapException(java.lang.Throwable).

Methods in javax.rmi.CORBA that throw RemoteException
static boolean Util.isLocal(Stub stub)
Returns true if the stub is in the same ORB instance as is the servant.
static Object[] Util.copyObjects(Object[] obj, ORB orb)
Copies or connects an array of objects.
static Object Util.copyObject(Object obj, ORB orb)
Copies or connects an object.
 void Stub.connect(ORB orb)
Connects this stub to an ORB.
 void PortableRemoteObjectDelegate.exportObject(Remote obj)
Delegation call for PortableRemoteObject.exportObject(java.rmi.Remote).
 void PortableRemoteObjectDelegate.connect(Remote target, Remote source)
Delegation call for PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
 void StubDelegate.connect(Stub self, ORB orb)
Delegation call for Stub.connect(org.omg.CORBA.ORB).
 boolean UtilDelegate.isLocal(Stub stub)
Delegation call for Util.isLocal(javax.rmi.CORBA.Stub).
 Object UtilDelegate.copyObject(Object obj, ORB orb)
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
 Object[] UtilDelegate.copyObjects(Object[] obj, ORB orb)
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).

Uses of RemoteException in javax.transaction

Subclasses of RemoteException in javax.transaction
class | InvalidTransactionException This exception indicates that the request carried an invalid transaction context.
class | TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
class | TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.UnknownHostException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.UnknownHostException

Packages that use UnknownHostException
java.rmi.registry Provides a class and two interfaces for the RMI registry.

Uses of UnknownHostException in java.rmi.registry

Methods in java.rmi.registry that throw UnknownHostException
 Registry RegistryHandler.registryStub(String host, int port)
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.Remote

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.Remote

Packages that use Remote
java.rmi | Provides the RMI package.
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.
javax.rmi | Contains user APIs for RMI-IIOP.
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of Remote in java.rmi

Methods in java.rmi that return Remote
static Remote Naming.lookup(String name)
Returns a reference, a stub, for the remote object associated with the specified name.

Methods in java.rmi with parameters of type Remote
static void | Naming.bind(String name, Remote obj) Binds the specified name to a remote object.
static void | Naming.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.

Uses of Remote in java.rmi.activation

Subinterfaces of Remote in java.rmi.activation
interface | ActivationInstantiator An ActivationInstantiator is responsible for creating instances of "activatable" objects.
interface | ActivationMonitor An ActivationMonitor is specific to an ActivationGroup and is obtained when a group is reported active via a call to ActivationSystem.activeGroup (this is done internally).
interface | ActivationSystem The ActivationSystem provides a means for registering groups and "activatable" objects to be activated within those groups.
interface | Activator The Activator facilitates remote object activation.

Classes in java.rmi.activation that implement Remote
class | Activatable The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
class | ActivationGroup An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

Methods in java.rmi.activation that return Remote
static Remote | Activatable.register(ActivationDesc desc) Register an object descriptor for an activatable remote object so that is can be activated on demand.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
Remote | ActivationID.activate(boolean force) Activate the object for this id.

Methods in java.rmi.activation with parameters of type Remote
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static boolean | Activatable.unexportObject(Remote obj, boolean force) Remove the remote object, obj, from the RMI runtime.
abstract void | ActivationGroup.activeObject(ActivationID id, Remote obj) The group's activeObject method is called when an object is exported (either by Activatable object construction or an explicit call to Activatable.exportObject.

Uses of Remote in java.rmi.dgc

Subinterfaces of Remote in java.rmi.dgc
 interface DGC
The DGC abstraction is used for the server side of the distributed garbage collection algorithm.

Uses of Remote in java.rmi.registry

Subinterfaces of Remote in java.rmi.registry
 interface Registry
For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references.

Methods in java.rmi.registry that return Remote
 Remote Registry.lookup(String name)
Returns a reference, a stub, for the remote object associated with the specified name.

Methods in java.rmi.registry with parameters of type Remote
void | Registry.bind(String name, Remote obj) Binds the specified name to a remote object.
void | Registry.rebind(String name, Remote obj) Rebinds the specified name to a new remote object.

Uses of Remote in java.rmi.server

Classes in java.rmi.server that implement Remote
class | RemoteObject The RemoteObject class implements the java.lang.Object behavior for remote objects.
class | RemoteServer The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
class | RemoteStub The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
class | UnicastRemoteObject The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Methods in java.rmi.server that return Remote
static Remote | RemoteObject.toStub(Remote obj) Returns the stub for the remote object obj passed as a parameter.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port) Export the remote object to make it available to receive incoming calls, using the particular supplied port.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.

Methods in java.rmi.server with parameters of type Remote
static Remote | RemoteObject.toStub(Remote obj) Returns the stub for the remote object obj passed as a parameter.
static RemoteStub | UnicastRemoteObject.exportObject(Remote obj) Export the remote object to make it available to receive incoming calls, using an anonymous port.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port) Export the remote object to make it available to receive incoming calls, using the particular supplied port.
static Remote | UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
static boolean | UnicastRemoteObject.unexportObject(Remote obj, boolean force) Remove the remote object, obj, from the RMI runtime.
Object | RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum) Invoke a method.
void | Skeleton.dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) Deprecated. no replacement
RemoteStub | ServerRef.exportObject(Remote obj, Object data) Creates a client stub object for the supplied Remote object.

Uses of Remote in javax.rmi

Methods in javax.rmi that return Remote
static Remote PortableRemoteObject.toStub(Remote obj)
Returns a stub for the given server object.

Methods in javax.rmi with parameters of type Remote
static void | PortableRemoteObject.exportObject(Remote obj) Makes a server object ready to receive remote calls.
static Remote | PortableRemoteObject.toStub(Remote obj) Returns a stub for the given server object.
static void | PortableRemoteObject.unexportObject(Remote obj) Deregisters a server object from the runtime, allowing the object to become available for garbage collection.
static void | PortableRemoteObject.connect(Remote target, Remote source) Makes a Remote object ready for remote communication.

Uses of Remote in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return Remote
 Remote PortableRemoteObjectDelegate.toStub(Remote obj)
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).
 Remote Tie.getTarget()
Returns the target for this tie.

Methods in javax.rmi.CORBA with parameters of type Remote
static void Util.registerTarget(Tie tie, Remote target)
Registers a target for a tie.
static void Util.unexportObject(Remote target)
Removes the associated tie from an internal table and calls Tie.deactivate() to deactivate the object.
static Tie Util.getTie(Remote target)
Returns the tie (if any) for a given target object.
 void PortableRemoteObjectDelegate.exportObject(Remote obj)
Delegation call for PortableRemoteObject.exportObject(java.rmi.Remote).
 Remote PortableRemoteObjectDelegate.toStub(Remote obj)
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).
 void PortableRemoteObjectDelegate.unexportObject(Remote obj)
Delegation call for PortableRemoteObject.unexportObject(java.rmi.Remote).
 void PortableRemoteObjectDelegate.connect(Remote target, Remote source)
Delegation call for PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
 void Tie.setTarget(Remote target)
Called by Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote) to set the target for this tie.
 void UtilDelegate.registerTarget(Tie tie, Remote target)
Delegation call for Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote).
 void UtilDelegate.unexportObject(Remote target)
Delegation call for Util.unexportObject(java.rmi.Remote).
 Tie UtilDelegate.getTie(Remote target)
Delegation call for Util.getTie(java.rmi.Remote).

Uses of Remote in org.omg.stub.java.rmi

Classes in org.omg.stub.java.rmi that implement Remote
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ConnectException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class ConnectException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.ConnectException
All Implemented Interfaces:
Serializable
public class ConnectException
extends RemoteException

A ConnectException is thrown if a connection is refused to the remote host for a remote method call.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ConnectException(String s)
Constructs a ConnectException with the specified detail message.
ConnectException(String s, Exception ex)
Constructs a ConnectException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConnectException

public ConnectException(String s)
Constructs a ConnectException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

ConnectException

public ConnectException(String s,
                        Exception ex)
Constructs a ConnectException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConnectIOException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class ConnectIOException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.ConnectIOException
All Implemented Interfaces:
Serializable
public class ConnectIOException
extends RemoteException

A ConnectIOException is thrown if an IOException occurs while making a connection to the remote host for a remote method call.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ConnectIOException(String s)
Constructs a ConnectIOException with the specified detail message.
ConnectIOException(String s, Exception ex)
Constructs a ConnectIOException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConnectIOException

public ConnectIOException(String s)
Constructs a ConnectIOException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

ConnectIOException

public ConnectIOException(String s,
                          Exception ex)
Constructs a ConnectIOException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.rmi.dgc Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.rmi.dgc

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.rmi.dgc.Lease (implements java.io.Serializable)
    • class java.rmi.dgc.VMID (implements java.io.Serializable)

Interface Hierarchy

  • interface java.rmi.Remote
    • interface java.rmi.dgc.DGC
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.rmi.dgc

Provides classes and interface for RMI distributed garbage-collection (DGC).

See:
Description

Interface Summary
DGC The DGC abstraction is used for the server side of the distributed garbage collection algorithm.

Class Summary
Lease | A lease contains a unique VM identifier and a lease duration.
VMID | A VMID is a identifier that is unique across all Java virtual machines.

Package java.rmi.dgc Description

Provides classes and interface for RMI distributed garbage-collection (DGC). When the RMI server returns an object to its client (caller of the remote method), it tracks the remote object's usage in the client. When there are no more references to the remote object on the client, or if the reference's ``lease'' expires and not renewed, the server garbage-collects the remote object.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.rmi.dgc

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.rmi.dgc

Packages that use java.rmi.dgc
java.rmi.dgc Provides classes and interface for RMI distributed garbage-collection (DGC).

Classes in java.rmi.dgc used by java.rmi.dgc
Lease
A lease contains a unique VM identifier and a lease duration.
VMID
A VMID is a identifier that is unique across all Java virtual machines.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.dgc.DGC

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.dgc.DGC

No usage of java.rmi.dgc.DGC

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.dgc.Lease

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.dgc.Lease

Packages that use Lease
java.rmi.dgc Provides classes and interface for RMI distributed garbage-collection (DGC).

Uses of Lease in java.rmi.dgc

Methods in java.rmi.dgc that return Lease
 Lease DGC.dirty(ObjID[] ids, long sequenceNum, Lease lease)
The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.

Methods in java.rmi.dgc with parameters of type Lease
 Lease DGC.dirty(ObjID[] ids, long sequenceNum, Lease lease)
The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.dgc.VMID

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.dgc.VMID

Packages that use VMID
java.rmi.dgc Provides classes and interface for RMI distributed garbage-collection (DGC).

Uses of VMID in java.rmi.dgc

Methods in java.rmi.dgc that return VMID
 VMID Lease.getVMID()
Returns the client VMID associated with the lease.

Methods in java.rmi.dgc with parameters of type VMID
 void DGC.clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.

Constructors in java.rmi.dgc with parameters of type VMID
Lease(VMID id, long duration)
Constructs a lease with a specific VMID and lease duration.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DGC

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.dgc
Interface DGC

All Superinterfaces:
Remote
public interface DGC
extends Remote

The DGC abstraction is used for the server side of the distributed garbage collection algorithm. This interface contains the two methods: dirty and clean. A dirty call is made when a remote reference is unmarshaled in a client (the client is indicated by its VMID). A corresponding clean call is made when no more references to the remote reference exist in the client. A failed dirty call must schedule a strong clean call so that the call's sequence number can be retained in order to detect future calls received out of order by the distributed garbage collector. A reference to a remote object is leased for a period of time by the client holding the reference. The lease period starts when the dirty call is received. It is the client's responsibility to renew the leases, by making additional dirty calls, on the remote references it holds before such leases expire. If the client does not renew the lease before it expires, the distributed garbage collector assumes that the remote object is no longer referenced by that client.

Method Summary
void | clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.
Lease | dirty(ObjID[] ids, long sequenceNum, Lease lease) The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.

Method Detail

dirty

public Lease dirty(ObjID[] ids,
                   long sequenceNum,
                   Lease lease)
            throws RemoteException
The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'. The 'lease' contains a client's unique VM identifier (VMID) and a requested lease period. For each remote object exported in the local VM, the garbage collector maintains a reference list-a list of clients that hold references to it. If the lease is granted, the garbage collector adds the client's VMID to the reference list for each remote object indicated in 'ids'. The 'sequenceNum' parameter is a sequence number that is used to detect and discard late calls to the garbage collector. The sequence number should always increase for each subsequent call to the garbage collector. Some clients are unable to generate a VMID, since a VMID is a universally unique identifier that contains a host address which some clients are unable to obtain due to security restrictions. In this case, a client can use a VMID of null, and the distributed garbage collector will assign a VMID for the client. The dirty call returns a Lease object that contains the VMID used and the lease period granted for the remote references (a server may decide to grant a smaller lease period than the client requests). A client must use the VMID the garbage collector uses in order to make corresponding clean calls when the client drops remote object references. A client VM need only make one initial dirty call for each remote reference referenced in the VM (even if it has multiple references to the same remote object). The client must also make a dirty call to renew leases on remote references before such leases expire. When the client no longer has any references to a specific remote object, it must schedule a clean call for the object ID associated with the reference.
Parameters:
ids - IDs of objects to mark as referenced by calling client
sequenceNum - sequence number
lease - requested lease
Returns:
granted lease
Throws:
RemoteException - if dirty call fails

clean

public void clean(ObjID[] ids,
                  long sequenceNum,
                  VMID vmid,
                  boolean strong)
           throws RemoteException
The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's. The sequence number is used to detect late clean calls. If the argument 'strong' is true, then the clean call is a result of a failed dirty call, thus the sequence number for the client 'vmid' needs to be remembered.
Parameters:
ids - IDs of objects to mark as unreferenced by calling client
sequenceNum - sequence number
vmid - client VMID
strong - make 'strong' clean call
Throws:
RemoteException - if clean call fails
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Lease

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.dgc
Class Lease

java.lang.Object
  |
  +--java.rmi.dgc.Lease
All Implemented Interfaces:
Serializable
public final class Lease
extends Object
implements Serializable

A lease contains a unique VM identifier and a lease duration. A Lease object is used to request and grant leases to remote object references.

See Also:
Serialized Form

Constructor Summary
Lease(VMID id, long duration)
Constructs a lease with a specific VMID and lease duration.
Method Summary
long | getValue() Returns the lease duration.
VMID | getVMID() Returns the client VMID associated with the lease.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Lease

public Lease(VMID id,
             long duration)
Constructs a lease with a specific VMID and lease duration. The vmid may be null.
Parameters:
id - VMID associated with this lease
duration - lease duration
Method Detail

getVMID

public VMID getVMID()
Returns the client VMID associated with the lease.
Returns:
client VMID

getValue

public long getValue()
Returns the lease duration.
Returns:
lease duration
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VMID

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.dgc
Class VMID

java.lang.Object
  |
  +--java.rmi.dgc.VMID
All Implemented Interfaces:
Serializable
public final class VMID
extends Object
implements Serializable

A VMID is a identifier that is unique across all Java virtual machines. VMIDs are used by the distributed garbage collector to identify client VMs.

See Also:
Serialized Form

Constructor Summary
VMID()
Create a new VMID.
Method Summary
boolean | equals(Object obj) Compare this VMID to another, and return true if they are the same identifier.
int | hashCode() Compute hash code for this VMID.
static boolean | isUnique() Deprecated.
String | toString() Return string representation of this VMID.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

VMID

public VMID()
Create a new VMID. Each new VMID returned from this constructor is unique for all Java virtual machines under the following conditions: a) the conditions for uniqueness for objects of the class java.rmi.server.UID are satisfied, and b) an address can be obtained for this host that is unique and constant for the lifetime of this object.

Method Detail

isUnique

public static boolean isUnique()
Deprecated.

Return true if an accurate address can be determined for this host. If false, reliable VMID cannot be generated from this host
Returns:
true if host address can be determined, false otherwise

hashCode

public int hashCode()
Compute hash code for this VMID.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compare this VMID to another, and return true if they are the same identifier.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

toString

public String toString()
Return string representation of this VMID.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MarshalException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class MarshalException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.MarshalException
All Implemented Interfaces:
Serializable
public class MarshalException
extends RemoteException

A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call. A MarshalException is also thrown if the receiver does not support the protocol version of the sender.

If a MarshalException occurs during a remote method call, the call may or may not have reached the server. If the call did reach the server, parameters may have been deserialized. A call may not be retransmitted after a MarshalException and reliably preserve "at most once" call semantics.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
MarshalException(String s)
Constructs a MarshalException with the specified detail message.
MarshalException(String s, Exception ex)
Constructs a MarshalException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MarshalException

public MarshalException(String s)
Constructs a MarshalException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

MarshalException

public MarshalException(String s,
                        Exception ex)
Constructs a MarshalException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MarshalledObject

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class MarshalledObject

java.lang.Object
  |
  +--java.rmi.MarshalledObject
All Implemented Interfaces:
Serializable
public final class MarshalledObject
extends Object
implements Serializable

A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor. The get method returns a new copy of the original object, as deserialized from the contained byte stream. The contained object is serialized and deserialized with the same serialization semantics used for marshaling and unmarshaling parameters and return values of RMI calls: When the serialized form is created:

  • classes are annotated with a codebase URL from where the class can be loaded (if available), and
  • any remote object in the MarshalledObject is represented by a serialized instance of its stub.

When copy of the object is retrieved (via the get method), if the class is not available locally, it will be loaded from the appropriate location (specified the URL annotated with the class descriptor when the class was serialized.

MarshalledObject facilitates passing objects in RMI calls that are not automatically deserialized immediately by the remote peer.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
MarshalledObject(Object obj)
Creates a new MarshalledObject that contains the serialized representation of the current state of the supplied object.
Method Summary
boolean | equals(Object obj) Compares this MarshalledObject to another object.
Object | get() Returns a new copy of the contained marshalledobject.
int | hashCode() Return a hash code for this MarshalledObject.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MarshalledObject

public MarshalledObject(Object obj)
                 throws IOException
Creates a new MarshalledObject that contains the serialized representation of the current state of the supplied object. The object is serialized with the semantics used for marshaling parameters for RMI calls.
Parameters:
obj - the object to be serialized (must be serializable)
Throws:
IOException - if an IOException occurs; an IOException may occur if obj is not serializable.
Since:
1.2
Method Detail

get

public Object get()
           throws IOException,
                  ClassNotFoundException
Returns a new copy of the contained marshalledobject. The internal representation is deserialized with the semantics used for unmarshaling paramters for RMI calls.
Returns:
a copy of the contained object
Throws:
IOException - if an IOException occurs while deserializing the object from its internal representation.
ClassNotFoundException - if a ClassNotFoundException occurs while deserializing the object from its internal representation. could not be found
Since:
1.2

hashCode

public int hashCode()
Return a hash code for this MarshalledObject.
Overrides:
hashCode in class Object
Returns:
a hash code

equals

public boolean equals(Object obj)
Compares this MarshalledObject to another object. Returns true if and only if the argument refers to a MarshalledObject that contains exactly the same serialized representation of an object as this one does. The comparison ignores any class codebase annotation, meaning that two objects are equivalent if they have the same serialized representation except for the codebase of each class in the serialized representation.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with this MarshalledObject
Returns:
true if the argument contains an equaivalent serialized object; false otherwise
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Naming

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class Naming

java.lang.Object
  |
  +--java.rmi.Naming
public final class Naming
extends Object

The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry. The Naming class's methods take, as one of their arguments, a name that is a URL formatted java.lang.String of the form:

    //host:port/name

where host is the host (remote or local) where the registry is located, port is the port number on which the registry accepts calls, and where name is a simple string uninterpreted by the registry. Both host and port are optional. If host is omitted, the host defaults to the local host. If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses.

Binding a name for a remote object is associating or registering a name for a remote object that can be used at a later time to look up that remote object. A remote object can be associated with a name using the Naming class's bind or rebind methods.

Once a remote object is registered (bound) with the RMI registry on the local host, callers on a remote (or local) host can lookup the remote object by name, obtain its reference, and then invoke remote methods on the object. A registry may be shared by all servers running on a host or an individual server process may create and use its own registry if desired (see java.rmi.registry.LocateRegistry.createRegistry method for details).

Since:
JDK1.1
See Also:
Registry, LocateRegistry, LocateRegistry.createRegistry(int)

Method Summary
static void | bind(String name, Remote obj) Binds the specified name to a remote object.
static String[] | list(String name) Returns an array of the names bound in the registry.
static Remote | lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
static void | rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
static void | unbind(String name) Destroys the binding for the specified name that is associated with a remote object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

lookup

public static Remote lookup(String name)
                     throws NotBoundException,
                            MalformedURLException,
                            RemoteException
Returns a reference, a stub, for the remote object associated with the specified name.
Parameters:
name - a URL-formatted name for the remote object
Returns:
a reference for a remote object
Throws:
NotBoundException - if name is not currently bound
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted
MalformedURLException - if the name is not an appropriately formatted URL
Since:
JDK1.1

bind

public static void bind(String name,
                        Remote obj)
                 throws AlreadyBoundException,
                        MalformedURLException,
                        RemoteException
Binds the specified name to a remote object.
Parameters:
name - a URL-formatted name for the remote object
obj - a reference for the remote object (usually a stub)
Throws:
AlreadyBoundException - if name is already bound
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

unbind

public static void unbind(String name)
                   throws RemoteException,
                          NotBoundException,
                          MalformedURLException
Destroys the binding for the specified name that is associated with a remote object.
Parameters:
name - a URL-formatted name associated with a remote object
Throws:
NotBoundException - if name is not currently bound
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

rebind

public static void rebind(String name,
                          Remote obj)
                   throws RemoteException,
                          MalformedURLException
Rebinds the specified name to a new remote object. Any existing binding for the name is replaced.
Parameters:
name - a URL-formatted name associated with the remote object
obj - new remote object to associate with the name
Throws:
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

list

public static String[] list(String name)
                     throws RemoteException,
                            MalformedURLException
Returns an array of the names bound in the registry. The names are URL-formatted strings. The array contains a snapshot of the names present in the registry at the time of the call.
Parameters:
name - a URL-formatted name that specifies the remote registry
Returns:
an array of names (in the appropriate URL format) bound in the registry
Throws:
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchObjectException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class NoSuchObjectException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.NoSuchObjectException
All Implemented Interfaces:
Serializable
public class NoSuchObjectException
extends RemoteException

A NoSuchObjectException is thrown if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine. If a NoSuchObjectException occurs attempting to invoke a method on a remote object, the call may be retransmitted and still preserve RMI's "at most once" call semantics. A NoSuchObjectException is also thrown by the method java.rmi.server.RemoteObject.toStub and by the unexportObject methods of java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable and

Since:
JDK1.1
See Also:
RemoteObject.toStub(Remote),
UnicastRemoteObject.unexportObject(Remote,boolean),
Activatable.unexportObject(Remote,boolean), Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
NoSuchObjectException(String s)
Constructs a NoSuchObjectException with the specified detail message.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchObjectException

public NoSuchObjectException(String s)
Constructs a NoSuchObjectException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotBoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class NotBoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.NotBoundException
All Implemented Interfaces:
Serializable
public class NotBoundException
extends Exception

A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.

Since:
JDK1.1
See Also:
Naming.lookup(String),
Naming.unbind(String),
Registry.lookup(String),
Registry.unbind(String), Serialized Form

Constructor Summary
NotBoundException()
Constructs a NotBoundException with no specified detail message.
NotBoundException(String s)
Constructs a NotBoundException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotBoundException

public NotBoundException()
Constructs a NotBoundException with no specified detail message.
Since:
JDK1.1

NotBoundException

public NotBoundException(String s)
Constructs a NotBoundException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.rmi.registry Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.rmi.registry

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.rmi.registry.LocateRegistry

Interface Hierarchy

  • interface java.rmi.registry.RegistryHandler
  • interface java.rmi.Remote
    • interface java.rmi.registry.Registry
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.rmi.registry

Provides a class and two interfaces for the RMI registry.

See:
Description

Interface Summary
Registry | For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references.
RegistryHandler | Deprecated. no replacement

Class Summary
LocateRegistry LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

Package java.rmi.registry Description

Provides a class and two interfaces for the RMI registry. A registry is a remote object that maps names to remote objects. A server registers its remote objects with the registry so that they can be looked up. When an object wants to invoke a method on a remote object, it must first lookup the remote object using its name. The registry returns to the calling object a reference to the remote object, using which a remote method can be invoked.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.rmi.registry

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.rmi.registry

Packages that use java.rmi.registry
java.rmi.registry Provides a class and two interfaces for the RMI registry.

Classes in java.rmi.registry used by java.rmi.registry
Registry
For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.registry.LocateRegistry

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.registry.LocateRegistry

No usage of java.rmi.registry.LocateRegistry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.registry.RegistryHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.registry.RegistryHandler

No usage of java.rmi.registry.RegistryHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.registry.Registry

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.registry.Registry

Packages that use Registry
java.rmi.registry Provides a class and two interfaces for the RMI registry.

Uses of Registry in java.rmi.registry

Methods in java.rmi.registry that return Registry
Registry | RegistryHandler.registryStub(String host, int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.
Registry | RegistryHandler.registryImpl(int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.
static Registry | LocateRegistry.getRegistry() Returns a reference to the the remote object Registry for the local host on the default registry port of 1099.
static Registry | LocateRegistry.getRegistry(int port) Returns a reference to the the remote object Registry for the local host on the specified port.
static Registry | LocateRegistry.getRegistry(String host) Returns a reference to the remote object Registry on the specified host on the default registry port of 1099.
static Registry | LocateRegistry.getRegistry(String host, int port) Returns a reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.getRegistry(String host, int port, RMIClientSocketFactory csf) Returns a locally created remote reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.createRegistry(int port) Creates and exports a Registry on the local host that accepts requests on the specified port.
static Registry | LocateRegistry.createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


LocateRegistry

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.registry
Class LocateRegistry

java.lang.Object
  |
  +--java.rmi.registry.LocateRegistry
public final class LocateRegistry
extends Object

LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port.

Note that a getRegistry call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore, a subsequent method invocation to a remote registry returned as a result of this method may fail.

Since:
JDK1.1
See Also:
Registry

Method Summary
static Registry | createRegistry(int port) Creates and exports a Registry on the local host that accepts requests on the specified port.
static Registry | createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.
static Registry | getRegistry() Returns a reference to the the remote object Registry for the local host on the default registry port of 1099.
static Registry | getRegistry(int port) Returns a reference to the the remote object Registry for the local host on the specified port.
static Registry | getRegistry(String host) Returns a reference to the remote object Registry on the specified host on the default registry port of 1099.
static Registry | getRegistry(String host, int port) Returns a reference to the remote object Registry on the specified host and port.
static Registry | getRegistry(String host, int port, RMIClientSocketFactory csf) Returns a locally created remote reference to the remote object Registry on the specified host and port.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getRegistry

public static Registry getRegistry()
                            throws RemoteException
Returns a reference to the the remote object Registry for the local host on the default registry port of 1099.
Returns:
reference (a stub) to the remote object registry
Throws:
RemoteException - if the reference could not be created
Since:
JDK1.1

getRegistry

public static Registry getRegistry(int port)
                            throws RemoteException
Returns a reference to the the remote object Registry for the local host on the specified port.
Parameters:
port - port on which the registry accepts requests
Returns:
reference (a stub) to the remote object registry
Throws:
RemoteException - if the reference could not be created
Since:
JDK1.1

getRegistry

public static Registry getRegistry(String host)
                            throws RemoteException
Returns a reference to the remote object Registry on the specified host on the default registry port of 1099. If host is null, the local host is used.
Parameters:
host - host for the remote registry
Returns:
reference (a stub) to the remote object registry
Throws:
RemoteException - if the reference could not be created
Since:
JDK1.1

getRegistry

public static Registry getRegistry(String host,
                                   int port)
                            throws RemoteException
Returns a reference to the remote object Registry on the specified host and port. If host is null, the local host is used.
Parameters:
host - host for the remote registry
port - port on which the registry accepts requests
Returns:
reference (a stub) to the remote object registry
Throws:
RemoteException - if the reference could not be created
Since:
JDK1.1

getRegistry

public static Registry getRegistry(String host,
                                   int port,
                                   RMIClientSocketFactory csf)
                            throws RemoteException
Returns a locally created remote reference to the remote object Registry on the specified host and port. Communication with this remote registry will use the supplied RMIClientSocketFactory csf to create Socket connections to the registry on the remote host and port.
Parameters:
host - host for the remote registry
port - port on which the registry accepts requests
csf - client-side Socket factory used to make connections to the registry. If csf is null, then the default client-side Socket factory will be used in the registry stub.
Returns:
reference (a stub) to the remote registry
Throws:
RemoteException - if the reference could not be created
Since:
1.2

createRegistry

public static Registry createRegistry(int port)
                               throws RemoteException
Creates and exports a Registry on the local host that accepts requests on the specified port.
Parameters:
port - the port on which the registry accepts requests
Returns:
the registry
Throws:
RemoteException - if the registry could not be exported
Since:
JDK1.1

createRegistry

public static Registry createRegistry(int port,
                                      RMIClientSocketFactory csf,
                                      RMIServerSocketFactory ssf)
                               throws RemoteException
Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry. The registry that is created listens for incoming requests on the given port using a ServerSocket created from the supplied RMIServerSocketFactory. A client that receives a reference to this registry will use a Socket created from the supplied RMIClientSocketFactory.
Parameters:
port - port on which the registry accepts requests
csf - client-side Socket factory used to make connections to the registry
ssf - server-side ServerSocket factory used to accept connections to the registry
Returns:
the registry
Throws:
RemoteException - if the registry could not be exported
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Registry

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.registry
Interface Registry

All Superinterfaces:
Remote
public interface Registry
extends Remote

For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references. The java.rmi.Naming class provides methods to access a remote object registry using URL-formatted names to specify in a compact format both the remote registry along with the name for the remote object.

Typically a "registry" exists on every node that allows RMI connections to servers on that node. A registry on a particular node contains a transient database that maps names to remote objects. When a registry starts up, the registry database is empty. The names stored in the registry are pure and are not parsed. A service storing itself in the registry may want to prefix its name of the service by a package name (although not required), to reduce name collisions in the registry.

To create a registry that runs in an application, use one of the LocateRegistry.createRegistry methods. To obtain a reference to a remote object registry, use one of the LocateRegistry.getRegistry methods.

Since:
JDK1.1
See Also:
Naming, LocateRegistry

Field Summary
static int REGISTRY_PORT
Well known port for registry.
Method Summary
void | bind(String name, Remote obj) Binds the specified name to a remote object.
String[] | list() Returns an array of the names bound in the registry.
Remote | lookup(String name) Returns a reference, a stub, for the remote object associated with the specified name.
void | rebind(String name, Remote obj) Rebinds the specified name to a new remote object.
void | unbind(String name) Destroys the binding for the specified name that is associated with a remote object.

Field Detail

REGISTRY_PORT

public static final int REGISTRY_PORT
Well known port for registry.
Method Detail

lookup

public Remote lookup(String name)
              throws RemoteException,
                     NotBoundException,
                     AccessException
Returns a reference, a stub, for the remote object associated with the specified name.
Parameters:
name - a URL-formatted name for the remote object
Returns:
a reference for a remote object
Throws:
NotBoundException - if name is not currently bound
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

bind

public void bind(String name,
                 Remote obj)
          throws RemoteException,
                 AlreadyBoundException,
                 AccessException
Binds the specified name to a remote object.
Parameters:
name - a URL-formatted name for the remote object
obj - a reference for the remote object (usually a stub)
Throws:
AlreadyBoundException - if name is already bound
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

unbind

public void unbind(String name)
            throws RemoteException,
                   NotBoundException,
                   AccessException
Destroys the binding for the specified name that is associated with a remote object.
Parameters:
name - a URL-formatted name associated with a remote object
Throws:
NotBoundException - if name is not currently bound
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

rebind

public void rebind(String name,
                   Remote obj)
            throws RemoteException,
                   AccessException
Rebinds the specified name to a new remote object. Any existing binding for the name is replaced.
Parameters:
name - a URL-formatted name associated with the remote object
obj - new remote object to associate with the name
Throws:
MalformedURLException - if the name is not an appropriately formatted URL
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1

list

public String[] list()
              throws RemoteException,
                     AccessException
Returns an array of the names bound in the registry. The names are URL-formatted strings. The array contains a snapshot of the names present in the registry at the time of the call.
Returns:
an array of names (in the appropriate URL format) bound in the registry
Throws:
RemoteException - if registry could not be contacted
AccessException - if this operation is not permitted (if originating from a non-local host, for example)
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RegistryHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.registry
Interface RegistryHandler

Deprecated. no replacement

public interface RegistryHandler

RegistryHandler is an interface used internally by the RMI runtime in previous implementation versions. It should never be accessed by application code.

Since:
JDK1.1

Method Summary
Registry | registryImpl(int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.
Registry | registryStub(String host, int port) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.

Method Detail

registryStub

public Registry registryStub(String host,
                             int port)
                      throws RemoteException,
                             UnknownHostException
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub.

Returns a "stub" for contacting a remote registry on the specified host and port.
Parameters:
host - name of remote registry host
port - remote registry port
Returns:
remote registry stub
Throws:
RemoteException - if a remote error occurs
UnknownHostException - if unable to resolve given hostname

registryImpl

public Registry registryImpl(int port)
                      throws RemoteException
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation.

Constructs and exports a Registry on the specified port. The port must be non-zero.
Parameters:
port - port to export registry on
Returns:
registry stub
Throws:
RemoteException - if a remote error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RemoteException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class RemoteException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccessException, ActivateFailedException, ConnectException, ConnectIOException, ExportException, InvalidTransactionException, MarshalException, NoSuchObjectException, ServerError, ServerException, ServerRuntimeException, SkeletonMismatchException, SkeletonNotFoundException, StubNotFoundException, TransactionRequiredException, TransactionRolledbackException, UnexpectedException, UnknownHostException, UnmarshalException
public class RemoteException
extends IOException

A RemoteException is the common superclass for a number of communication-related exceptions that may occur during the execution of a remote method call. Each method of a remote interface, an interface that extends java.rmi.Remote, must list RemoteException in its throws clause.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
 Throwable detail
Nested Exception to hold wrapped remote exception.
Constructor Summary
RemoteException()
Constructs a RemoteException with no specified detail message.
RemoteException(String s)
Constructs a RemoteException with the specified detail message.
RemoteException(String s, Throwable ex)
Constructs a RemoteException with the specified detail message and nested exception.
Method Summary
String | getMessage() Returns the detail message, including the message from the nested exception if there is one.
void | printStackTrace() Prints the composite message to System.err.
void | printStackTrace(PrintStream ps) Prints the composite message and the embedded stack trace to the specified stream ps.
void | printStackTrace(PrintWriter pw) Prints the composite message and the embedded stack trace to the specified print writer pw.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

detail

public Throwable detail
Nested Exception to hold wrapped remote exception.
Since:
JDK1.1
Constructor Detail

RemoteException

public RemoteException()
Constructs a RemoteException with no specified detail message.
Since:
JDK1.1

RemoteException

public RemoteException(String s)
Constructs a RemoteException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

RemoteException

public RemoteException(String s,
                       Throwable ex)
Constructs a RemoteException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Method Detail

getMessage

public String getMessage()
Returns the detail message, including the message from the nested exception if there is one.
Overrides:
getMessage in class Throwable
Since:
JDK1.1

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.
Overrides:
printStackTrace in class Throwable
Parameters:
ps - the print stream
Since:
1.2

printStackTrace

public void printStackTrace()
Prints the composite message to System.err.
Overrides:
printStackTrace in class Throwable
Since:
1.2

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.
Overrides:
printStackTrace in class Throwable
Parameters:
pw - the print writer
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMISecurityException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class RMISecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.SecurityException
                          |
                          +--java.rmi.RMISecurityException
All Implemented Interfaces:
Serializable
Deprecated. no replacement. RMISecurityManager no longer throws this subclass of java.lang.SecurityException.

public class RMISecurityException
extends SecurityException

An RMISecurityException signals that a security exception has occurred during the execution of one of java.rmi.RMISecurityManager's methods.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
RMISecurityException(String name)
Deprecated. no replacement
RMISecurityException(String name, String arg)
Deprecated. no replacement
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RMISecurityException

public RMISecurityException(String name)
Deprecated. no replacement

Construct an RMISecurityException with a detail message.
Parameters:
name - the detail message
Since:
JDK1.1

RMISecurityException

public RMISecurityException(String name,
                            String arg)
Deprecated. no replacement

Construct an RMISecurityException with a detail message.
Parameters:
name - the detail message
arg - ignored
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMISecurityManager

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class RMISecurityManager

java.lang.Object
  |
  +--java.lang.SecurityManager
        |
        +--java.rmi.RMISecurityManager
public class RMISecurityManager
extends SecurityManager

RMISecurityManager provides an example security manager for use by RMI applications that use downloaded code. RMI's class loader will not download any classes from remote locations if no security manager has been set. RMISecurityManager does not apply to applets, which run under the protection of their browser's security manager.

To use the RMISecurityManager in your application , add the following statement to your code (it needs to be executed before RMI can download code from remote hosts, so it most likely needs to appear in the main of your application):

 System.setSecurityManager(new RMISecurityManager());

Since:
JDK1.1

Fields inherited from class java.lang.SecurityManager
inCheck
Constructor Summary
RMISecurityManager()
Constructs a new RMISecurityManager.
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RMISecurityManager

public RMISecurityManager()
Constructs a new RMISecurityManager.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.rmi.server Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.rmi.server

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.rmi.server.ObjID (implements java.io.Serializable)
    • class java.rmi.server.Operation
    • class java.io.OutputStream
      • class java.io.FilterOutputStream
        • class java.io.PrintStream
          • class java.rmi.server.LogStream
    • class java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable)
      • class java.rmi.server.RemoteServer
        • class java.rmi.server.UnicastRemoteObject
      • class java.rmi.server.RemoteStub
    • class java.rmi.server.RMIClassLoader
    • class java.rmi.server.RMISocketFactory (implements java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.CloneNotSupportedException
          • class java.rmi.server.ServerCloneException
        • class java.io.IOException
          • class java.rmi.RemoteException
            • class java.rmi.server.ExportException
              • class java.rmi.server.SocketSecurityException
            • class java.rmi.server.SkeletonMismatchException
            • class java.rmi.server.SkeletonNotFoundException
        • class java.rmi.server.ServerNotActiveException
    • class java.rmi.server.UID (implements java.io.Serializable)

Interface Hierarchy

  • interface java.rmi.server.LoaderHandler
  • interface java.rmi.server.RemoteCall
  • interface java.rmi.server.RMIClientSocketFactory
  • interface java.rmi.server.RMIFailureHandler
  • interface java.rmi.server.RMIServerSocketFactory
  • interface java.io.Serializable
    • interface java.io.Externalizable
      • interface java.rmi.server.RemoteRef
        • interface java.rmi.server.ServerRef
  • interface java.rmi.server.Skeleton
  • interface java.rmi.server.Unreferenced
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.rmi.server

Provides classes and interfaces for supporting the server side of RMI.

See:
Description

Interface Summary
LoaderHandler | Deprecated. no replacement
RemoteCall | Deprecated. no replacement.
RemoteRef | RemoteRef represents the handle for a remote object.
RMIClientSocketFactory | An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
RMIFailureHandler | An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call.
RMIServerSocketFactory | An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
ServerRef | A ServerRef represents the server-side handle for a remote object implementation.
Skeleton | Deprecated. no replacement.
Unreferenced | A remote object implementation should implement the Unreferenced interface to receive notification when there are no more clients that reference that remote object.

Class Summary
LogStream | Deprecated. no replacement
ObjID | An ObjID is used to identify remote objects uniquely in a VM over time.
Operation | Deprecated. no replacement
RemoteObject | The RemoteObject class implements the java.lang.Object behavior for remote objects.
RemoteServer | The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
RemoteStub | The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
RMIClassLoader | RMIClassLoader provides static methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class can be loaded.
RMISocketFactory | An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
UID | Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.
UnicastRemoteObject | The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Exception Summary
ExportException | An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
ServerCloneException | A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.
ServerNotActiveException | An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
SkeletonMismatchException | Deprecated. no replacement.
SkeletonNotFoundException | Deprecated. no replacement.
SocketSecurityException | A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Package java.rmi.server Description

Provides classes and interfaces for supporting the server side of RMI. A group of classes are used by the stubs and skeletons generated by the rmic stub compiler. Another group of classes implements the RMI Transport protocol and HTTP tunneling.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.rmi.server

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.rmi.server

Packages that use java.rmi.server
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Classes in java.rmi.server used by java.rmi.activation
RemoteObject
The RemoteObject class implements the java.lang.Object behavior for remote objects.
RemoteServer
The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
RMIClientSocketFactory
An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
RMIServerSocketFactory
An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
UnicastRemoteObject
The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Classes in java.rmi.server used by java.rmi.dgc
ObjID
An ObjID is used to identify remote objects uniquely in a VM over time.

Classes in java.rmi.server used by java.rmi.registry
RMIClientSocketFactory
An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
RMIServerSocketFactory
An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.

Classes in java.rmi.server used by java.rmi.server
ExportException
An ExportException is a RemoteException thrown if an attempt to export a remote object fails.
LogStream
Deprecated. no replacement
ObjID
An ObjID is used to identify remote objects uniquely in a VM over time.
Operation
Deprecated. no replacement
RemoteCall
Deprecated. no replacement.
RemoteObject
The RemoteObject class implements the java.lang.Object behavior for remote objects.
RemoteRef
RemoteRef represents the handle for a remote object.
RemoteServer
The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
RemoteStub
The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
RMIClientSocketFactory
An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls.
RMIFailureHandler
An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call.
RMIServerSocketFactory
An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls.
RMISocketFactory
An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.
ServerNotActiveException
An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.
UID
Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.RMIClassLoader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.RMIClassLoader

No usage of java.rmi.server.RMIClassLoader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.ServerCloneException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.ServerCloneException

No usage of java.rmi.server.ServerCloneException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.SkeletonMismatchException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.SkeletonMismatchException

No usage of java.rmi.server.SkeletonMismatchException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.SkeletonNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.SkeletonNotFoundException

No usage of java.rmi.server.SkeletonNotFoundException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.SocketSecurityException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.SocketSecurityException

No usage of java.rmi.server.SocketSecurityException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.LoaderHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.LoaderHandler

No usage of java.rmi.server.LoaderHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.ServerRef

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.ServerRef

No usage of java.rmi.server.ServerRef

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.Skeleton

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.Skeleton

No usage of java.rmi.server.Skeleton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.Unreferenced

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.Unreferenced

No usage of java.rmi.server.Unreferenced

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.ExportException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.ExportException

Packages that use ExportException
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of ExportException in java.rmi.server

Subclasses of ExportException in java.rmi.server
 class SocketSecurityException
A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.LogStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.LogStream

Packages that use LogStream
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of LogStream in java.rmi.server

Methods in java.rmi.server that return LogStream
static LogStream LogStream.log(String name)
Deprecated. no replacement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.ObjID

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.ObjID

Packages that use ObjID
java.rmi.dgc | Provides classes and interface for RMI distributed garbage-collection (DGC).
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of ObjID in java.rmi.dgc

Methods in java.rmi.dgc with parameters of type ObjID
Lease | DGC.dirty(ObjID[] ids, long sequenceNum, Lease lease) The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.
void | DGC.clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.

Uses of ObjID in java.rmi.server

Methods in java.rmi.server that return ObjID
static ObjID ObjID.read(ObjectInput in)
Constructs an object id whose contents is read from the specified input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.Operation

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.Operation

Packages that use Operation
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of Operation in java.rmi.server

Methods in java.rmi.server that return Operation
 Operation[] Skeleton.getOperations()
Deprecated. no replacement

Methods in java.rmi.server with parameters of type Operation
 RemoteCall RemoteRef.newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.RemoteObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.RemoteObject

Packages that use RemoteObject
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of RemoteObject in java.rmi.activation

Subclasses of RemoteObject in java.rmi.activation
class | Activatable The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
class | ActivationGroup An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

Uses of RemoteObject in java.rmi.server

Subclasses of RemoteObject in java.rmi.server
class | RemoteServer The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics.
class | RemoteStub The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics.
class | UnicastRemoteObject The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Methods in java.rmi.server with parameters of type RemoteObject
 RemoteCall RemoteRef.newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.RemoteServer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.RemoteServer

Packages that use RemoteServer
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of RemoteServer in java.rmi.activation

Subclasses of RemoteServer in java.rmi.activation
class | Activatable The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.
class | ActivationGroup An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

Uses of RemoteServer in java.rmi.server

Subclasses of RemoteServer in java.rmi.server
 class UnicastRemoteObject
The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.RemoteStub

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.RemoteStub

Packages that use RemoteStub
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of RemoteStub in java.rmi.server

Methods in java.rmi.server that return RemoteStub
static RemoteStub | UnicastRemoteObject.exportObject(Remote obj) Export the remote object to make it available to receive incoming calls, using an anonymous port.
RemoteStub | ServerRef.exportObject(Remote obj, Object data) Creates a client stub object for the supplied Remote object.

Methods in java.rmi.server with parameters of type RemoteStub
protected static void RemoteStub.setRef(RemoteStub stub, RemoteRef ref)
Deprecated. no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.RMISocketFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.RMISocketFactory

Packages that use RMISocketFactory
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of RMISocketFactory in java.rmi.server

Methods in java.rmi.server that return RMISocketFactory
static RMISocketFactory | RMISocketFactory.getSocketFactory() Returns the socket factory set by the setSocketFactory method.
static RMISocketFactory | RMISocketFactory.getDefaultSocketFactory() Returns a reference to the default socket factory used by this RMI implementation.

Methods in java.rmi.server with parameters of type RMISocketFactory
static void RMISocketFactory.setSocketFactory(RMISocketFactory fac)
Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.ServerNotActiveException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.ServerNotActiveException

Packages that use ServerNotActiveException
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of ServerNotActiveException in java.rmi.server

Methods in java.rmi.server that throw ServerNotActiveException
static String | RemoteServer.getClientHost() Return the hostname of the current client.
String | ServerRef.getClientHost() Returns the hostname of the current client.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.UID

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.UID

Packages that use UID
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of UID in java.rmi.server

Methods in java.rmi.server that return UID
static UID UID.read(DataInput in)
Reads the UID from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.rmi.server.UnicastRemoteObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.rmi.server.UnicastRemoteObject

Packages that use UnicastRemoteObject
java.rmi.activation Provides support for RMI Object Activation.

Uses of UnicastRemoteObject in java.rmi.activation

Subclasses of UnicastRemoteObject in java.rmi.activation
 class ActivationGroup
An ActivationGroup is responsible for creating new instances of "activatable" objects in its group, informing its ActivationMonitor when either: its object's become active or inactive, or the group as a whole becomes inactive.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.RemoteCall

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.RemoteCall

Packages that use RemoteCall
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of RemoteCall in java.rmi.server

Methods in java.rmi.server that return RemoteCall
 RemoteCall RemoteRef.newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Methods in java.rmi.server with parameters of type RemoteCall
void | RemoteRef.invoke(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
void | RemoteRef.done(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
void | Skeleton.dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) Deprecated. no replacement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.RemoteRef

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.RemoteRef

Packages that use RemoteRef
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of RemoteRef in java.rmi.server

Subinterfaces of RemoteRef in java.rmi.server
 interface ServerRef
A ServerRef represents the server-side handle for a remote object implementation.

Fields in java.rmi.server declared as RemoteRef
protected  RemoteRef RemoteObject.ref
the object's remote reference.

Methods in java.rmi.server that return RemoteRef
 RemoteRef RemoteObject.getRef()
Returns the remote reference for the remote object.

Methods in java.rmi.server with parameters of type RemoteRef
boolean | RemoteRef.remoteEquals(RemoteRef obj) Compares two remote objects for equality.
protected static void | RemoteStub.setRef(RemoteStub stub, RemoteRef ref) Deprecated. no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.

Constructors in java.rmi.server with parameters of type RemoteRef
RemoteObject(RemoteRef newref)
Creates a remote object, initialized with the specified remote reference.
RemoteServer(RemoteRef ref)
Constructs a RemoteServer with the given reference type.
RemoteStub(RemoteRef ref)
Constructs a RemoteStub, with the specified remote reference.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.RMIClientSocketFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.RMIClientSocketFactory

Packages that use RMIClientSocketFactory
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of RMIClientSocketFactory in java.rmi.activation

Methods in java.rmi.activation with parameters of type RMIClientSocketFactory
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.

Constructors in java.rmi.activation with parameters of type RMIClientSocketFactory
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to activate/export the object on a specified port.

Uses of RMIClientSocketFactory in java.rmi.registry

Methods in java.rmi.registry with parameters of type RMIClientSocketFactory
static Registry | LocateRegistry.getRegistry(String host, int port, RMIClientSocketFactory csf) Returns a locally created remote reference to the remote object Registry on the specified host and port.
static Registry | LocateRegistry.createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.

Uses of RMIClientSocketFactory in java.rmi.server

Classes in java.rmi.server that implement RMIClientSocketFactory
 class RMISocketFactory
An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.

Methods in java.rmi.server with parameters of type RMIClientSocketFactory
static Remote UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.

Constructors in java.rmi.server with parameters of type RMIClientSocketFactory
UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.RMIFailureHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.RMIFailureHandler

Packages that use RMIFailureHandler
java.rmi.server Provides classes and interfaces for supporting the server side of RMI.

Uses of RMIFailureHandler in java.rmi.server

Methods in java.rmi.server that return RMIFailureHandler
static RMIFailureHandler RMISocketFactory.getFailureHandler()
Returns the handler for socket creation failure set by the setFailureHandler method.

Methods in java.rmi.server with parameters of type RMIFailureHandler
static void RMISocketFactory.setFailureHandler(RMIFailureHandler fh)
Sets the failure handler to be called by the RMI runtime if server socket creation fails.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.rmi.server.RMIServerSocketFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.rmi.server.RMIServerSocketFactory

Packages that use RMIServerSocketFactory
java.rmi.activation | Provides support for RMI Object Activation.
java.rmi.registry | Provides a class and two interfaces for the RMI registry.
java.rmi.server | Provides classes and interfaces for supporting the server side of RMI.

Uses of RMIServerSocketFactory in java.rmi.activation

Methods in java.rmi.activation with parameters of type RMIServerSocketFactory
static ActivationID | Activatable.exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static Remote | Activatable.exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.

Constructors in java.rmi.activation with parameters of type RMIServerSocketFactory
Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Constructor used to activate/export the object on a specified port.

Uses of RMIServerSocketFactory in java.rmi.registry

Methods in java.rmi.registry with parameters of type RMIServerSocketFactory
static Registry LocateRegistry.createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Creates and exports a Registry on the local host that uses custom socket factories for communication with that registry.

Uses of RMIServerSocketFactory in java.rmi.server

Classes in java.rmi.server that implement RMIServerSocketFactory
 class RMISocketFactory
An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls.

Methods in java.rmi.server with parameters of type RMIServerSocketFactory
static Remote UnicastRemoteObject.exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.

Constructors in java.rmi.server with parameters of type RMIServerSocketFactory
UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ExportException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class ExportException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.server.ExportException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SocketSecurityException
public class ExportException
extends RemoteException

An ExportException is a RemoteException thrown if an attempt to export a remote object fails. A remote object is exported via the constructors and exportObject methods of java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable.

Since:
JDK1.1
See Also:
UnicastRemoteObject, Activatable, Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ExportException(String s)
Constructs an ExportException with the specified detail message.
ExportException(String s, Exception ex)
Constructs an ExportException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ExportException

public ExportException(String s)
Constructs an ExportException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

ExportException

public ExportException(String s,
                       Exception ex)
Constructs an ExportException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


LoaderHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface LoaderHandler

Deprecated. no replacement

public interface LoaderHandler

LoaderHandler is an interface used internally by the RMI runtime in previous implementation versions. It should never be accessed by application code.

Since:
JDK1.1

Field Summary
static String packagePrefix
Deprecated. package of system LoaderHandler implementation.
Method Summary
Object | getSecurityContext(ClassLoader loader) Deprecated. no replacement
Class | loadClass(String name) Deprecated. no replacement
Class | loadClass(URL codebase, String name) Deprecated. no replacement

Field Detail

packagePrefix

public static final String packagePrefix
Deprecated.
package of system LoaderHandler implementation.
Method Detail

loadClass

public Class loadClass(String name)
                throws MalformedURLException,
                       ClassNotFoundException
Deprecated. no replacement

Loads a class from the location specified by the java.rmi.server.codebase property.
Parameters:
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the system property java.rmi.server.codebase contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the codebase location.
Since:
JDK1.1

loadClass

public Class loadClass(URL codebase,
                       String name)
                throws MalformedURLException,
                       ClassNotFoundException
Deprecated. no replacement

Loads a class from a URL.
Parameters:
codebase - the URL from which to load the class
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the codebase paramater contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the specified URL
Since:
JDK1.1

getSecurityContext

public Object getSecurityContext(ClassLoader loader)
Deprecated. no replacement

Returns the security context of the given class loader.
Parameters:
loader - a class loader from which to get the security context
Returns:
the security context
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


LogStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class LogStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.PrintStream
                    |
                    +--java.rmi.server.LogStream
Deprecated. no replacement

public class LogStream
extends PrintStream

LogStream provides a mechanism for logging errors that are of possible interest to those monitoring a system.

Since:
JDK1.1

Field Summary
static int | BRIEF Deprecated. log level constant (brief logging).
static int | SILENT Deprecated. log level constant (no logging).
static int | VERBOSE Deprecated. log level constant (verbose logging).
Fields inherited from class java.io.FilterOutputStream
out
Method Summary
static PrintStream | getDefaultStream() Deprecated. no replacement
OutputStream | getOutputStream() Deprecated. no replacement
static LogStream | log(String name) Deprecated. no replacement
static int | parseLevel(String s) Deprecated. no replacement
static void | setDefaultStream(PrintStream newDefault) Deprecated. no replacement
void | setOutputStream(OutputStream out) Deprecated. no replacement
String | toString() Deprecated. no replacement
void | write(byte[] b, int off, int len) Deprecated. no replacement
void | write(int b) Deprecated. no replacement
Methods inherited from class java.io.PrintStream
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError
Methods inherited from class java.io.FilterOutputStream
write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SILENT

public static final int SILENT
Deprecated.
log level constant (no logging).

BRIEF

public static final int BRIEF
Deprecated.
log level constant (brief logging).

VERBOSE

public static final int VERBOSE
Deprecated.
log level constant (verbose logging).
Method Detail

log

public static LogStream log(String name)
Deprecated. no replacement

Return the LogStream identified by the given name. If a log corresponding to "name" does not exist, a log using the default stream is created.
Parameters:
name - name identifying the desired LogStream
Returns:
log associated with given name
Since:
JDK1.1

getDefaultStream

public static PrintStream getDefaultStream()
Deprecated. no replacement

Return the current default stream for new logs.
Returns:
default log stream
Since:
JDK1.1

setDefaultStream

public static void setDefaultStream(PrintStream newDefault)
Deprecated. no replacement

Set the default stream for new logs.
Parameters:
newDefault - new default log stream
Since:
JDK1.1

getOutputStream

public OutputStream getOutputStream()
Deprecated. no replacement

Return the current stream to which output from this log is sent.
Returns:
output stream for this log
Since:
JDK1.1

setOutputStream

public void setOutputStream(OutputStream out)
Deprecated. no replacement

Set the stream to which output from this log is sent.
Parameters:
out - new output stream for this log
Since:
JDK1.1

write

public void write(int b)
Deprecated. no replacement

Write a byte of data to the stream. If it is not a newline, then the byte is appended to the internal buffer. If it is a newline, then the currently buffered line is sent to the log's output stream, prefixed with the appropriate logging information.
Overrides:
write in class PrintStream
Since:
JDK1.1

write

public void write(byte[] b,
                  int off,
                  int len)
Deprecated. no replacement

Write a subarray of bytes. Pass each through write byte method.
Overrides:
write in class PrintStream
Since:
JDK1.1

toString

public String toString()
Deprecated. no replacement

Return log name as string representation.
Overrides:
toString in class Object
Returns:
log name
Since:
JDK1.1

parseLevel

public static int parseLevel(String s)
Deprecated. no replacement

Convert a string name of a logging level to its internal integer representation.
Parameters:
s - name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE')
Returns:
corresponding integer log level
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ObjID

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class ObjID

java.lang.Object
  |
  +--java.rmi.server.ObjID
All Implemented Interfaces:
Serializable
public final class ObjID
extends Object
implements Serializable

An ObjID is used to identify remote objects uniquely in a VM over time. Each identifier contains an object number and an address space identifier that is unique with respect to a specific host. An object identifier is assigned to a remote object when it is exported. If the property java.rmi.server.randomIDs is true, then the object number component (64 bits) of an ObjID created with the no argument constructor will contain a cryptographically strong random number.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
static int | ACTIVATOR_ID well-known id for the activator.
static int | DGC_ID well-known id for the distributed garbage collector.
static int | REGISTRY_ID well-known id for the registry.
Constructor Summary
ObjID()
Generates a unique object identifier.
ObjID(int num)
Generates a "well-known" object ID.
Method Summary
boolean | equals(Object obj) Two object identifiers are considered equal if they have the same contents.
int | hashCode() Returns the hash code for the ObjID (the object number).
static ObjID | read(ObjectInput in) Constructs an object id whose contents is read from the specified input stream.
String | toString() Returns a string containing the object id representation.
void | write(ObjectOutput out) Marshals object id to output stream.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

REGISTRY_ID

public static final int REGISTRY_ID
well-known id for the registry.

ACTIVATOR_ID

public static final int ACTIVATOR_ID
well-known id for the activator.

DGC_ID

public static final int DGC_ID
well-known id for the distributed garbage collector.
Constructor Detail

ObjID

public ObjID()
Generates a unique object identifier. If the property java.rmi.server.randomIDs is true, then the object number component (64 bits) of an ObjID created with the no argument constructor will contain a cryptographically strong random number.
Since:
JDK1.1

ObjID

public ObjID(int num)
Generates a "well-known" object ID. An object ID generated via this constructor will not clash with any object IDs generated via the default constructor.
Parameters:
num - a unique well-known object number
Since:
JDK1.1
Method Detail

write

public void write(ObjectOutput out)
           throws IOException
Marshals object id to output stream.
Parameters:
out - output stream to write object ID to
Throws:
IOException - if an I/O error occurred
Since:
JDK1.1

read

public static ObjID read(ObjectInput in)
                  throws IOException
Constructs an object id whose contents is read from the specified input stream.
Parameters:
in - input stream to read object ID from
Returns:
object ID instance read from stream
Throws:
IOException - if an I/O error occurred
Since:
JDK1.1

hashCode

public int hashCode()
Returns the hash code for the ObjID (the object number).
Overrides:
hashCode in class Object
Since:
JDK1.1

equals

public boolean equals(Object obj)
Two object identifiers are considered equal if they have the same contents.
Overrides:
equals in class Object
Since:
JDK1.1

toString

public String toString()
Returns a string containing the object id representation. The address space identifier is included in the string representation only if the object id is from a non-local address space.
Overrides:
toString in class Object
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Operation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class Operation

java.lang.Object
  |
  +--java.rmi.server.Operation
Deprecated. no replacement

public class Operation
extends Object

An Operation contains a description of a Java method. Operation objects were used in JDK1.1 version stubs and skeletons. The Operation class is not needed for 1.2 style stubs (stubs generated with rmic -v1.2); hence, this class is deprecated.

Since:
JDK1.1

Constructor Summary
Operation(String op)
Deprecated. no replacement
Method Summary
String | getOperation() Deprecated. no replacement
String | toString() Deprecated. no replacement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Operation

public Operation(String op)
Deprecated. no replacement

Creates a new Operation object.
Parameters:
op - method name
Since:
JDK1.1
Method Detail

getOperation

public String getOperation()
Deprecated. no replacement

Returns the name of the method.
Returns:
method name
Since:
JDK1.1

toString

public String toString()
Deprecated. no replacement

Returns the string representation of the operation.
Overrides:
toString in class Object
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteCall

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface RemoteCall

Deprecated. no replacement.

public interface RemoteCall

RemoteCall is an abstraction used solely by the RMI runtime (in conjunction with stubs and skeletons of remote objects) to carry out a call to a remote object. The RemoteCall interface is deprecated in the Java 2 platform since it is only used by deprecated methods of java.rmi.server.RemoteRef.

Since:
JDK1.1
See Also:
RemoteRef

Method Summary
void | done() Deprecated. no replacement
void | executeCall() Deprecated. no replacement
ObjectInput | getInputStream() Deprecated. no replacement
ObjectOutput | getOutputStream() Deprecated. no replacement
ObjectOutput | getResultStream(boolean success) Deprecated. no replacement
void | releaseInputStream() Deprecated. no replacement
void | releaseOutputStream() Deprecated. no replacement

Method Detail

getOutputStream

public ObjectOutput getOutputStream()
                             throws IOException
Deprecated. no replacement

Return the output stream the stub/skeleton should put arguments/results into.
Returns:
output stream for arguments/results
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.1

releaseOutputStream

public void releaseOutputStream()
                         throws IOException
Deprecated. no replacement

Release the output stream; in some transports this would release the stream.
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.1

getInputStream

public ObjectInput getInputStream()
                           throws IOException
Deprecated. no replacement

Get the InputStream that the stub/skeleton should get results/arguments from.
Returns:
input stream for reading arguments/results
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.1

releaseInputStream

public void releaseInputStream()
                        throws IOException
Deprecated. no replacement

Release the input stream. This would allow some transports to release the channel early.
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.1

getResultStream

public ObjectOutput getResultStream(boolean success)
                             throws IOException,
                                    StreamCorruptedException
Deprecated. no replacement

Returns an output stream (may put out header information relating to the success of the call). Should only succeed once per remote call.
Parameters:
success - If true, indicates normal return, else indicates exceptional return.
Returns:
output stream for writing call result
Throws:
IOException - if an I/O error occurs.
StreamCorruptedException - If already been called.
Since:
JDK1.1

executeCall

public void executeCall()
                 throws Exception
Deprecated. no replacement

Do whatever it takes to execute the call.
Throws:
Exception - if a general exception occurs.
Since:
JDK1.1

done

public void done()
          throws IOException
Deprecated. no replacement

Allow cleanup after the remote call has completed.
Throws:
IOException - if an I/O error occurs.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteObject

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class RemoteObject

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
All Implemented Interfaces:
Remote, Serializable
Direct Known Subclasses:
RemoteServer, RemoteStub
public abstract class RemoteObject
extends Object
implements Remote, Serializable

The RemoteObject class implements the java.lang.Object behavior for remote objects. RemoteObject provides the remote semantics of Object by implementing methods for hashCode, equals, and toString.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
protected  RemoteRef ref
the object's remote reference.
Constructor Summary
protected | RemoteObject() Creates a remote object.
protected | RemoteObject(RemoteRef newref) Creates a remote object, initialized with the specified remote reference.
Method Summary
boolean | equals(Object obj) Compares two remote objects for equality.
RemoteRef | getRef() Returns the remote reference for the remote object.
int | hashCode() Returns a hashcode for a remote object.
String | toString() Returns a String that represents the value of this remote object.
static Remote | toStub(Remote obj) Returns the stub for the remote object obj passed as a parameter.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ref

protected transient RemoteRef ref
the object's remote reference.
Constructor Detail

RemoteObject

protected RemoteObject()
Creates a remote object.
Since:
JDK1.1

RemoteObject

protected RemoteObject(RemoteRef newref)
Creates a remote object, initialized with the specified remote reference.
Parameters:
newref - remote reference
Since:
JDK1.1
Method Detail

getRef

public RemoteRef getRef()
Returns the remote reference for the remote object.
Returns:
remote reference for the remote object
Since:
1.2

toStub

public static Remote toStub(Remote obj)
                     throws NoSuchObjectException
Returns the stub for the remote object obj passed as a parameter. This operation is only valid after the object has been exported.
Parameters:
obj - the remote object whose stub is neede
Returns:
the stub for the remote object, obj.
Throws:
NoSuchObjectException - if the stub for the remote object could not be found.
Since:
1.2

hashCode

public int hashCode()
Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hash tables).
Overrides:
hashCode in class Object
Since:
JDK1.1
See Also:
Hashtable

equals

public boolean equals(Object obj)
Compares two remote objects for equality. Returns a boolean that indicates whether this remote object is equivalent to the specified Object. This method is used when a remote object is stored in a hashtable. If the specified Object is not itself an instance of RemoteObject, then this method delegates by returning the result of invoking the equals method of its parameter with this remote object as the argument.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
JDK1.1
See Also:
Hashtable

toString

public String toString()
Returns a String that represents the value of this remote object.
Overrides:
toString in class Object
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface RemoteRef

All Superinterfaces:
Externalizable, Serializable
All Known Subinterfaces:
ServerRef
public interface RemoteRef
extends Externalizable

RemoteRef represents the handle for a remote object. A RemoteStub uses a remote reference to carry out a remote method invocation to a remote object.

Since:
JDK1.1
See Also:
RemoteStub

Field Summary
static String | packagePrefix Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
static long | serialVersionUID indicate compatibility with JDK 1.1.x version of class.
Method Summary
void | done(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
String | getRefClass(ObjectOutput out) Returns the class name of the ref type to be serialized onto the stream 'out'.
void | invoke(RemoteCall call) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
Object | invoke(Remote obj, Method method, Object[] params, long opnum) Invoke a method.
RemoteCall | newCall(RemoteObject obj, Operation[] op, int opnum, long hash) Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value. 1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.
boolean | remoteEquals(RemoteRef obj) Compares two remote objects for equality.
int | remoteHashCode() Returns a hashcode for a remote object.
String | remoteToString() Returns a String that represents the reference of this remote object.
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal

Field Detail

serialVersionUID

public static final long serialVersionUID
indicate compatibility with JDK 1.1.x version of class.

packagePrefix

public static final String packagePrefix
Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.
Method Detail

invoke

public Object invoke(Remote obj,
                     Method method,
                     Object[] params,
                     long opnum)
              throws Exception
Invoke a method. This form of delegating method invocation to the reference allows the reference to take care of setting up the connection to the remote host, marshaling some representation for the method and parameters, then communicating the method invocation to the remote host. This method either returns the result of a method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception.
Parameters:
obj - the object that contains the RemoteRef (e.g., the RemoteStub for the object.
method - the method to be invoked
params - the parameter list
opnum - a hash that may be used to represent the method
Returns:
result of remote method invocation
Throws:
Exception - if any exception occurs during remote method invocation
Since:
1.2

newCall

public RemoteCall newCall(RemoteObject obj,
                          Operation[] op,
                          int opnum,
                          long hash)
                   throws RemoteException
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Creates an appropriate call object for a new remote method invocation on this object. Passing operation array and index, allows the stubs generator to assign the operation indexes and interpret them. The remote reference may need the operation to encode in the call.
Parameters:
obj - remote stub through which to make call
op - array of stub operations
opnum - operation number
hash - stub/skeleton interface hash
Returns:
call object representing remote call
Throws:
RemoteException - if failed to initiate new remote call
Since:
JDK1.1
See Also:
invoke(Remote,java.lang.reflect.Method,Object[],long)

invoke

public void invoke(RemoteCall call)
            throws Exception
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Executes the remote call. Invoke will raise any "user" exceptions which should pass through and not be caught by the stub. If any exception is raised during the remote invocation, invoke should take care of cleaning up the connection before raising the "user" or remote exception.
Parameters:
call - object representing remote call
Throws:
Exception - if any exception occurs during remote method
Since:
JDK1.1
See Also:
invoke(Remote,java.lang.reflect.Method,Object[],long)

done

public void done(RemoteCall call)
          throws RemoteException
Deprecated. 1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall, invoke, and done), a stub uses a single method, invoke(Remote, Method, Object[], int), on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.

1.2 stubs are generated using rmic -v1.2. By default, rmic generates stubs compatible with JDK1.1 and the Java 2 SDK. The compatible stubs can also be generated using rmic -vcompat.

Allows the remote reference to clean up (or reuse) the connection. Done should only be called if the invoke returns successfully (non-exceptionally) to the stub.
Parameters:
call - object representing remote call
Throws:
RemoteException - if remote error occurs during call cleanup
Since:
JDK1.1
See Also:
invoke(Remote,java.lang.reflect.Method,Object[],long)

getRefClass

public String getRefClass(ObjectOutput out)
Returns the class name of the ref type to be serialized onto the stream 'out'.
Parameters:
out - the output stream to which the reference will be serialized
Returns:
the class name (without package qualification) of the reference type
Since:
JDK1.1

remoteHashCode

public int remoteHashCode()
Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hash tables).
Returns:
remote object hashcode
Since:
JDK1.1
See Also:
Hashtable

remoteEquals

public boolean remoteEquals(RemoteRef obj)
Compares two remote objects for equality. Returns a boolean that indicates whether this remote object is equivalent to the specified Object. This method is used when a remote object is stored in a hashtable.
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
JDK1.1
See Also:
Hashtable

remoteToString

public String remoteToString()
Returns a String that represents the reference of this remote object.
Returns:
string representing remote object reference
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteServer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class RemoteServer

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
All Implemented Interfaces:
Remote, Serializable
Direct Known Subclasses:
Activatable, UnicastRemoteObject
public abstract class RemoteServer
extends RemoteObject

The RemoteServer class is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics. Specifically, the functions needed to create and export remote objects (i.e. to make them remotely available) are provided abstractly by RemoteServer and concretely by its subclass(es).

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
protected | RemoteServer() Constructs a RemoteServer.
protected | RemoteServer(RemoteRef ref) Constructs a RemoteServer with the given reference type.
Method Summary
static String | getClientHost() Return the hostname of the current client.
static PrintStream | getLog() Returns stream for the RMI call log.
static void | setLog(OutputStream out) Log RMI calls to the output stream out.
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RemoteServer

protected RemoteServer()
Constructs a RemoteServer.
Since:
JDK1.1

RemoteServer

protected RemoteServer(RemoteRef ref)
Constructs a RemoteServer with the given reference type.
Parameters:
ref - the remote reference
Since:
JDK1.1
Method Detail

getClientHost

public static String getClientHost()
                            throws ServerNotActiveException
Return the hostname of the current client. When called from a thread actively handling a remote method invocation the hostname of the client is returned.
Returns:
client hostname
Throws:
ServerNotActiveException - If called outside of servicing a remote method invocation.
Since:
JDK1.1

setLog

public static void setLog(OutputStream out)
Log RMI calls to the output stream out. If out is null, call logging is turned off.
Parameters:
out - the output stream to which RMI calls should be logged
Since:
JDK1.1

getLog

public static PrintStream getLog()
Returns stream for the RMI call log.
Returns:
the call log
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteStub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class RemoteStub

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteStub
All Implemented Interfaces:
Remote, Serializable
public abstract class RemoteStub
extends RemoteObject

The RemoteStub class is the common superclass to client stubs and provides the framework to support a wide range of remote reference semantics. Stub objects are surrogates that support exactly the same set of remote interfaces defined by the actual implementation of the remote object.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
protected | RemoteStub() Constructs a RemoteStub.
protected | RemoteStub(RemoteRef ref) Constructs a RemoteStub, with the specified remote reference.
Method Summary
protected static void setRef(RemoteStub stub, RemoteRef ref)
Deprecated. no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RemoteStub

protected RemoteStub()
Constructs a RemoteStub.

RemoteStub

protected RemoteStub(RemoteRef ref)
Constructs a RemoteStub, with the specified remote reference.
Parameters:
ref - the remote reference
Since:
JDK1.1
Method Detail

setRef

protected static void setRef(RemoteStub stub,
                             RemoteRef ref)
Deprecated. no replacement. The setRef method is not needed since RemoteStubs can be created with the RemoteStub(RemoteRef) constructor.

Sets the remote reference inside the remote stub.
Parameters:
stub - the remote stub
ref - the remote reference
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMIClassLoader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class RMIClassLoader

java.lang.Object
  |
  +--java.rmi.server.RMIClassLoader
public class RMIClassLoader
extends Object

RMIClassLoader provides static methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class can be loaded. These methods are used by the RMI runtime when marshalling and unmarshalling classes of parameters and return values.

Since:
JDK1.1

Method Summary
static String | getClassAnnotation(Class cl) Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.
static ClassLoader | getClassLoader(String codebase) Returns a class loader that loads classes from the given codebase URL path.
static Object | getSecurityContext(ClassLoader loader) Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.
static Class | loadClass(String name) Deprecated. replaced by loadClass(String,String) method
static Class | loadClass(String codebase, String name) Loads a class from a codebase URL path.
static Class | loadClass(URL codebase, String name) Loads a class from a codebase URL.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

loadClass

public static Class loadClass(String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Deprecated. replaced by loadClass(String,String) method

Loads a class from the codebase URL path specified by the java.rmi.server.codebase property.
Parameters:
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the system property java.rmi.server.codebase contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the codebase location
Since:
JDK1.1
See Also:
loadClass(String,String)

loadClass

public static Class loadClass(URL codebase,
                              String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Loads a class from a codebase URL. If the given codebase is null, then the Class object returned is equivalent to the Class object returned by RMIClassLoader.loadClass(name).
Parameters:
codebase - the URL to load the class from
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the codebase paramater contains an invalid non-null URL
ClassNotFoundException - if a definition for the class could not be found at the specified URL
Since:
JDK1.1

loadClass

public static Class loadClass(String codebase,
                              String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Loads a class from a codebase URL path. If the given codebase is null, then the Class object returned is equivalent to the Class object returned by RMIClassLoader.loadClass(name).
Parameters:
codebase - the list of space-separated URLs to load the class from
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the codebase paramater contains an invalid non-null URL
ClassNotFoundException - if a definition for the class could not be found at the specified location
Since:
1.2

getClassLoader

public static ClassLoader getClassLoader(String codebase)
                                  throws MalformedURLException,
                                         SecurityException
Returns a class loader that loads classes from the given codebase URL path. The class loader returned is the class loader that the #loadClass(String,String) method would use to load classes from the given codebase. If a class loader with the same codebase URL path already exists for RMI runtime, it will be returned; otherwise, a new class loader will be created. If the given codebase is null, it returns the class loader used to load classes via the #loadClass(String) method.
Parameters:
codebase - the list of space-separated URLs which the the class loader will load classes from
Returns:
a class loader that loads classes from the given codebase URL path
Throws:
MalformedURLException - if the codebase paramater contains an invalid non-null URL
SecurityException - if the caller does not have permission to connect to all of the URLs in codebase URL path
Since:
1.3

getClassAnnotation

public static String getClassAnnotation(Class cl)
Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.
Parameters:
cl - the class to obtain the annotation for
Returns:
a string to be used to annotate the class when marshalled
Since:
1.2

getSecurityContext

public static Object getSecurityContext(ClassLoader loader)
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.

Returns the security context of the given class loader.
Parameters:
loader - a class loader from which to get the security context
Returns:
the security context
Since:
JDK1.1
See Also:
SecurityManager.getSecurityContext()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMIClientSocketFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface RMIClientSocketFactory

All Known Implementing Classes:
RMISocketFactory
public interface RMIClientSocketFactory

An RMIClientSocketFactory instance is used by the RMI runtime in order to obtain client sockets for RMI calls. A remote object can be associated with an RMIClientSocketFactory when it is created/exported via the constructors or exportObject methods of java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable .

An RMIClientSocketFactory instance associated with a remote object will be downloaded to clients when the remote object's reference is transmitted in an RMI call. This RMIClientSocketFactory will be used to create connections to the remote object for remote method calls.

An RMIClientSocketFactory instance can also be associated with a remote object registry so that clients can use custom socket communication with a remote object registry.

Since:
1.2
See Also:
UnicastRemoteObject, Activatable, LocateRegistry

Method Summary
 Socket createSocket(String host, int port)
Create a client socket connected to the specified host and port.

Method Detail

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException
Create a client socket connected to the specified host and port.
Parameters:
host - the host name
port - the port number
Returns:
a socket connected to the specified host and port.
Throws:
IOException - if an I/O error occurs during socket creation
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMIFailureHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface RMIFailureHandler

public interface RMIFailureHandler

An RMIFailureHandler can be registered via the RMISocketFactory.setFailureHandler call. The failure method of the handler is invoked when the RMI runtime is unable to create a ServerSocket to listen for incoming calls. The failure method returns a boolean indicating whether the runtime should attempt to re-create the ServerSocket.

Since:
JDK1.1

Method Summary
 boolean failure(Exception ex)
The failure callback is invoked when the RMI runtime is unable to create a ServerSocket via the RMISocketFactory.

Method Detail

failure

public boolean failure(Exception ex)
The failure callback is invoked when the RMI runtime is unable to create a ServerSocket via the RMISocketFactory. An RMIFailureHandler is registered via a call to RMISocketFacotry.setFailureHandler. If no failure handler is installed, the default behavior is to attempt to re-create the ServerSocket.
Parameters:
ex - the exception that occurred during ServerSocket creation
Returns:
if true, the RMI runtime attempts to retry ServerSocket creation
Since:
JDK1.1
See Also:
RMISocketFactory.setFailureHandler(RMIFailureHandler)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMIServerSocketFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface RMIServerSocketFactory

All Known Implementing Classes:
RMISocketFactory
public interface RMIServerSocketFactory

An RMIServerSocketFactory instance is used by the RMI runtime in order to obtain server sockets for RMI calls. A remote object can be associated with an RMIServerSocketFactory when it is created/exported via the constructors or exportObject methods of java.rmi.server.UnicastRemoteObject and java.rmi.activation.Activatable .

An RMIServerSocketFactory instance associated with a remote object is used to obtain the ServerSocket used to accept incoming calls from clients.

An RMIServerSocketFactory instance can also be associated with a remote object registry so that clients can use custom socket communication with a remote object registry.

Since:
1.2
See Also:
UnicastRemoteObject, Activatable, LocateRegistry

Method Summary
 ServerSocket createServerSocket(int port)
Create a server socket on the specified port (port 0 indicates an anonymous port).

Method Detail

createServerSocket

public ServerSocket createServerSocket(int port)
                                throws IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
IOException - if an I/O error occurs during server socket creation
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMISocketFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class RMISocketFactory

java.lang.Object
  |
  +--java.rmi.server.RMISocketFactory
All Implemented Interfaces:
RMIClientSocketFactory, RMIServerSocketFactory
public abstract class RMISocketFactory
extends Object
implements RMIClientSocketFactory, RMIServerSocketFactory

An RMISocketFactory instance is used by the RMI runtime in order to obtain client and server sockets for RMI calls. An application may use the setSocketFactory method to request that the RMI runtime use its socket factory instance instead of the default implementation.

The default socket factory implementation used goes through a three-tiered approach to creating client sockets. First, a direct socket connection to the remote VM is attempted. If that fails (due to a firewall), the runtime uses HTTP with the explicit port number of the server. If the firewall does not allow this type of communication, then HTTP to a cgi-bin script on the server is used to POST the RMI call.

Since:
JDK1.1

Constructor Summary
RMISocketFactory()
Constructs an RMISocketFactory.
Method Summary
abstract ServerSocket | createServerSocket(int port) Create a server socket on the specified port (port 0 indicates an anonymous port).
abstract Socket | createSocket(String host, int port) Creates a client socket connected to the specified host and port.
static RMISocketFactory | getDefaultSocketFactory() Returns a reference to the default socket factory used by this RMI implementation.
static RMIFailureHandler | getFailureHandler() Returns the handler for socket creation failure set by the setFailureHandler method.
static RMISocketFactory | getSocketFactory() Returns the socket factory set by the setSocketFactory method.
static void | setFailureHandler(RMIFailureHandler fh) Sets the failure handler to be called by the RMI runtime if server socket creation fails.
static void | setSocketFactory(RMISocketFactory fac) Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RMISocketFactory

public RMISocketFactory()
Constructs an RMISocketFactory.
Since:
JDK1.1
Method Detail

createSocket

public abstract Socket createSocket(String host,
                                    int port)
                             throws IOException
Creates a client socket connected to the specified host and port.
Specified by:
createSocket in interface RMIClientSocketFactory
Parameters:
host - the host name
port - the port number
Returns:
a socket connected to the specified host and port.
Throws:
IOException - if an I/O error occurs during socket creation
Since:
JDK1.1

createServerSocket

public abstract ServerSocket createServerSocket(int port)
                                         throws IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).
Specified by:
createServerSocket in interface RMIServerSocketFactory
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
IOException - if an I/O error occurs during server socket creation
Since:
JDK1.1

setSocketFactory

public static void setSocketFactory(RMISocketFactory fac)
                             throws IOException
Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory). The RMI socket factory can only be set once. Note: The RMISocketFactory may only be set if the current security manager allows setting a socket factory; if disallowed, a SecurityException will be thrown.
Parameters:
fac - the socket factory
Throws:
IOException - if the RMI socket factory is already set
SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.
Since:
JDK1.1
See Also:
SecurityManager.checkSetFactory()

getSocketFactory

public static RMISocketFactory getSocketFactory()
Returns the socket factory set by the setSocketFactory method. Returns null if no socket factory has been set.
Returns:
the socket factory
Since:
JDK1.1
See Also:
setSocketFactory(RMISocketFactory)

getDefaultSocketFactory

public static RMISocketFactory getDefaultSocketFactory()
Returns a reference to the default socket factory used by this RMI implementation. This will be the factory used by the RMI runtime when getSocketFactory returns null.
Returns:
the default RMI socket factory
Since:
JDK1.1

setFailureHandler

public static void setFailureHandler(RMIFailureHandler fh)
Sets the failure handler to be called by the RMI runtime if server socket creation fails. By default, if no failure handler is installed and server socket creation fails, the RMI runtime does attempt to recreate the server socket.
Parameters:
fh - the failure handler
Since:
JDK1.1
See Also:
RMIFailureHandler.failure(Exception)

getFailureHandler

public static RMIFailureHandler getFailureHandler()
Returns the handler for socket creation failure set by the setFailureHandler method.
Returns:
the failure handler
Since:
JDK1.1
See Also:
setFailureHandler(RMIFailureHandler)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerCloneException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class ServerCloneException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.CloneNotSupportedException
                    |
                    +--java.rmi.server.ServerCloneException
All Implemented Interfaces:
Serializable
public class ServerCloneException
extends CloneNotSupportedException

A ServerCloneException is thrown if a remote exception occurs during the cloning of a UnicastRemoteObject.

Since:
JDK1.1
See Also:
UnicastRemoteObject.clone(), Serialized Form

Field Summary
 Exception detail
Nested exception for ServerCloneException.
Constructor Summary
ServerCloneException(String s)
Constructs an ServerCloneException with the specified detail message.
ServerCloneException(String s, Exception ex)
Constructs an ServerCloneException with the specified detail message and nested exception.
Method Summary
String | getMessage() Obtains the message, include the message from the nested exception if there is one.
void | printStackTrace() Returns the detail message, including the message from the nested exception if there is one.
void | printStackTrace(PrintStream ps) Prints the composite message and the embedded stack trace to the specified stream ps.
void | printStackTrace(PrintWriter pw) Prints the composite message and the embedded stack trace to the specified writer pw.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

detail

public Exception detail
Nested exception for ServerCloneException.
Since:
JDK1.1
Constructor Detail

ServerCloneException

public ServerCloneException(String s)
Constructs an ServerCloneException with the specified detail message.
Parameters:
s - the detail message.
Since:
JDK1.1

ServerCloneException

public ServerCloneException(String s,
                            Exception ex)
Constructs an ServerCloneException with the specified detail message and nested exception.
Parameters:
s - the detail message.
ex - the nested exception
Since:
JDK1.1
Method Detail

getMessage

public String getMessage()
Obtains the message, include the message from the nested exception if there is one.
Overrides:
getMessage in class Throwable
Following copied from class: java.lang.Throwable
Returns:
the error message string of this Throwable object if it was created with an error message string; or null if it was created with no error message.

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.
Overrides:
printStackTrace in class Throwable
Parameters:
ps - the print stream
Since:
1.2

printStackTrace

public void printStackTrace()
Returns the detail message, including the message from the nested exception if there is one.
Overrides:
printStackTrace in class Throwable
Since:
JDK1.1

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified writer pw.
Overrides:
printStackTrace in class Throwable
Parameters:
pw - the print writer
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerNotActiveException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class ServerNotActiveException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.rmi.server.ServerNotActiveException
All Implemented Interfaces:
Serializable
public class ServerNotActiveException
extends Exception

An ServerNotActiveException is an Exception thrown during a call to RemoteServer.getClientHost if the getClientHost method is called outside of servicing a remote method call.

Since:
JDK1.1
See Also:
RemoteServer.getClientHost(), Serialized Form

Constructor Summary
ServerNotActiveException()
Constructs an ServerNotActiveException with no specified detail message.
ServerNotActiveException(String s)
Constructs an ServerNotActiveException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServerNotActiveException

public ServerNotActiveException()
Constructs an ServerNotActiveException with no specified detail message.
Since:
JDK1.1

ServerNotActiveException

public ServerNotActiveException(String s)
Constructs an ServerNotActiveException with the specified detail message.
Parameters:
s - the detail message.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface ServerRef

All Superinterfaces:
Externalizable, RemoteRef, Serializable
public interface ServerRef
extends RemoteRef

A ServerRef represents the server-side handle for a remote object implementation.

Since:
JDK1.1

Field Summary
static long serialVersionUID
indicate compatibility with JDK 1.1.x version of class.
Fields inherited from interface java.rmi.server.RemoteRef
packagePrefix
Method Summary
RemoteStub | exportObject(Remote obj, Object data) Creates a client stub object for the supplied Remote object.
String | getClientHost() Returns the hostname of the current client.
Methods inherited from interface java.rmi.server.RemoteRef
done, getRefClass, invoke, invoke, newCall, remoteEquals, remoteHashCode, remoteToString
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal

Field Detail

serialVersionUID

public static final long serialVersionUID
indicate compatibility with JDK 1.1.x version of class.
Method Detail

exportObject

public RemoteStub exportObject(Remote obj,
                               Object data)
                        throws RemoteException
Creates a client stub object for the supplied Remote object. If the call completes successfully, the remote object should be able to accept incoming calls from clients.
Parameters:
obj - the remote object implementation
data - information necessary to export the object
Returns:
the stub for the remote object
Throws:
RemoteException - if an exception occurs attempting to export the object (e.g., stub class could not be found)
Since:
JDK1.1

getClientHost

public String getClientHost()
                     throws ServerNotActiveException
Returns the hostname of the current client. When called from a thread actively handling a remote method invocation the hostname of the client is returned.
Returns:
the client's host name
Throws:
ServerNotActiveException - if called outside of servicing a remote method invocation
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Skeleton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface Skeleton

Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.

public interface Skeleton

The Skeleton interface is used solely by the RMI implementation.

Every version 1.1 (and version 1.1 compatible skeletons generated in 1.2 using rmic -vcompat) skeleton class generated by the rmic stub compiler implements this interface. A skeleton for a remote object is a server-side entity that dispatches calls to the actual remote object implementation.

Since:
JDK1.1

Method Summary
void | dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) Deprecated. no replacement
Operation[] | getOperations() Deprecated. no replacement

Method Detail

dispatch

public void dispatch(Remote obj,
                     RemoteCall theCall,
                     int opnum,
                     long hash)
              throws Exception
Deprecated. no replacement

Unmarshals arguments, calls the actual remote object implementation, and marshals the return value or any exception.
Parameters:
obj - remote implementation to dispatch call to
theCall - object representing remote call
opnum - operation number
hash - stub/skeleton interface hash
Throws:
Exception - if a general exception occurs.
Since:
JDK1.1

getOperations

public Operation[] getOperations()
Deprecated. no replacement

Returns the operations supported by the skeleton.
Returns:
operations supported by skeleton
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SkeletonMismatchException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class SkeletonMismatchException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.server.SkeletonMismatchException
All Implemented Interfaces:
Serializable
Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.

public class SkeletonMismatchException
extends RemoteException

This exception is thrown when a call is received that does not match the available skeleton. It indicates either that the remote method names or signatures in this interface have changed or that the stub class used to make the call and the skeleton receiving the call were not generated by the same version of the stub compiler (rmic).

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
SkeletonMismatchException(String s)
Deprecated. no replacement
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SkeletonMismatchException

public SkeletonMismatchException(String s)
Deprecated. no replacement

Constructs a new SkeletonMismatchException with a specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SkeletonNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class SkeletonNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.server.SkeletonNotFoundException
All Implemented Interfaces:
Serializable
Deprecated. no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.

public class SkeletonNotFoundException
extends RemoteException

A SkeletonNotFoundException is thrown if the Skeleton corresponding to the remote object being exported is not found. Skeletons are not required in the Java 2 platform, so this exception is never thrown if stubs are generated with rmic -v1.2. To generate stubs and skeletons compatible with JDK1.1 and the Java 2 SDK, use rmic -vcompat which is the default in the Java 2 SDK.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
SkeletonNotFoundException(String s)
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message.
SkeletonNotFoundException(String s, Exception ex)
Deprecated. Constructs a SkeletonNotFoundException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SkeletonNotFoundException

public SkeletonNotFoundException(String s)
Deprecated.
Constructs a SkeletonNotFoundException with the specified detail message.
Parameters:
s - the detail message.
Since:
JDK1.1

SkeletonNotFoundException

public SkeletonNotFoundException(String s,
                                 Exception ex)
Deprecated.
Constructs a SkeletonNotFoundException with the specified detail message and nested exception.
Parameters:
s - the detail message.
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SocketSecurityException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class SocketSecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.server.ExportException
                                |
                                +--java.rmi.server.SocketSecurityException
All Implemented Interfaces:
Serializable
public class SocketSecurityException
extends ExportException

A SocketSecurityException is thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to the exportObject method of UnicastRemoteObject or java.rmi.activation.Activatable) does not have permission to create a java.net.ServerSocket on the port number specified during remote object export.

Since:
JDK1.1
See Also:
UnicastRemoteObject, Activatable, Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
SocketSecurityException(String s)
Constructs an SocketSecurityException with the specified detail message.
SocketSecurityException(String s, Exception ex)
Constructs an SocketSecurityException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SocketSecurityException

public SocketSecurityException(String s)
Constructs an SocketSecurityException with the specified detail message.
Parameters:
s - the detail message.
Since:
JDK1.1

SocketSecurityException

public SocketSecurityException(String s,
                               Exception ex)
Constructs an SocketSecurityException with the specified detail message and nested exception.
Parameters:
s - the detail message.
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UID

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class UID

java.lang.Object
  |
  +--java.rmi.server.UID
All Implemented Interfaces:
Serializable
public final class UID
extends Object
implements Serializable

Abstraction for creating identifiers that are unique with respect to the the host on which it is generated.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
UID()
Creates a pure identifier that is unique with respect to the host on which it is generated.
UID(short num)
Creates a "well-known" ID.
Method Summary
boolean | equals(Object obj) Compares two UIDs for content equality.
int | hashCode() Returns a hashcode for the UID.
static UID | read(DataInput in) Reads the UID from the input stream.
String | toString() Returns the string representation of the UID.
void | write(DataOutput out) Write the UID to output stream, out.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

UID

public UID()
Creates a pure identifier that is unique with respect to the host on which it is generated. This UID is unique under the following conditions: a) the machine takes more than one second to reboot, and b) the machine's clock is never set backward. In order to construct a UID that is globally unique, simply pair a UID with an InetAddress.
Since:
JDK1.1

UID

public UID(short num)
Creates a "well-known" ID. There are 2^16 -1 such possible well-known ids. An id generated via this constructor will not clash with any id generated via the default UID constructor which will generates a genuinely unique identifier with respect to this host.
Parameters:
num - well known ID number
Since:
JDK1.1
Method Detail

hashCode

public int hashCode()
Returns a hashcode for the UID. Two UIDs will have the same hashcode if they are equal with respect to their content.
Overrides:
hashCode in class Object
Returns:
the hashcode
Since:
JDK1.1
See Also:
Hashtable

equals

public boolean equals(Object obj)
Compares two UIDs for content equality.
Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
Since:
JDK1.1
See Also:
Hashtable

toString

public String toString()
Returns the string representation of the UID.
Overrides:
toString in class Object
Since:
JDK1.1

write

public void write(DataOutput out)
           throws IOException
Write the UID to output stream, out.
Parameters:
out - the output stream to which the UID is written
Throws:
IOException - if writing the UID to the stream fails.
Since:
JDK1.1

read

public static UID read(DataInput in)
                throws IOException
Reads the UID from the input stream.
Parameters:
in - the input stream
Returns:
the UID
Throws:
IOException - if uid could not be read (due to stream failure or malformed UID)
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnicastRemoteObject

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Class UnicastRemoteObject

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
All Implemented Interfaces:
Remote, Serializable
Direct Known Subclasses:
ActivationGroup
public class UnicastRemoteObject
extends RemoteServer

The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive. The UnicastRemoteObject class provides support for point-to-point active object references (invocations, parameters, and results) using TCP streams.

Objects that require remote behavior should extend RemoteObject, typically via UnicastRemoteObject. If UnicastRemoteObject is not extended, the implementation class must then assume the responsibility for the correct semantics of the hashCode, equals, and toString methods inherited from the Object class, so that they behave appropriately for remote objects.

Since:
JDK1.1
See Also:
RemoteServer, RemoteObject, Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
protected | UnicastRemoteObject() Create and export a new UnicastRemoteObject object using an anonymous port.
protected | UnicastRemoteObject(int port) Create and export a new UnicastRemoteObject object using the particular supplied port.
protected | UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.
Method Summary
Object | clone() Returns a clone of the remote object that is distinct from the original.
static RemoteStub | exportObject(Remote obj) Export the remote object to make it available to receive incoming calls, using an anonymous port.
static Remote | exportObject(Remote obj, int port) Export the remote object to make it available to receive incoming calls, using the particular supplied port.
static Remote | exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
static boolean | unexportObject(Remote obj, boolean force) Remove the remote object, obj, from the RMI runtime.
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

UnicastRemoteObject

protected UnicastRemoteObject()
                       throws RemoteException
Create and export a new UnicastRemoteObject object using an anonymous port.
Throws:
RemoteException - if failed to export object
Since:
JDK1.1

UnicastRemoteObject

protected UnicastRemoteObject(int port)
                       throws RemoteException
Create and export a new UnicastRemoteObject object using the particular supplied port.
Parameters:
port - the port number on which the remote object receives calls (if port is zero, an anonymous port is chosen)
Throws:
RemoteException - if failed to export object
Since:
1.2

UnicastRemoteObject

protected UnicastRemoteObject(int port,
                              RMIClientSocketFactory csf,
                              RMIServerSocketFactory ssf)
                       throws RemoteException
Create and export a new UnicastRemoteObject object using the particular supplied port and socket factories.
Parameters:
port - the port number on which the remote object receives calls (if port is zero, an anonymous port is chosen)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Throws:
RemoteException - if failed to export object
Since:
1.2
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone of the remote object that is distinct from the original.
Overrides:
clone in class Object
Returns:
the new remote object
Throws:
CloneNotSupportedException - if clone failed due to a RemoteException.
Since:
JDK1.1

exportObject

public static RemoteStub exportObject(Remote obj)
                               throws RemoteException
Export the remote object to make it available to receive incoming calls, using an anonymous port.
Parameters:
obj - the remote object to be exported
Returns:
remote object stub
Throws:
RemoteException - if export fails
Since:
JDK1.1

exportObject

public static Remote exportObject(Remote obj,
                                  int port)
                           throws RemoteException
Export the remote object to make it available to receive incoming calls, using the particular supplied port.
Parameters:
obj - the remote object to be exported
port - the port to export the object on
Returns:
remote object stub
Throws:
RemoteException - if export fails
Since:
1.2

exportObject

public static Remote exportObject(Remote obj,
                                  int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
                           throws RemoteException
Export the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
Parameters:
obj - the remote object to be exported
port - the port to export the object on
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Returns:
remote object stub
Throws:
RemoteException - if export fails
Since:
1.2

unexportObject

public static boolean unexportObject(Remote obj,
                                     boolean force)
                              throws NoSuchObjectException
Remove the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.
Parameters:
obj - the remote object to be unexported
force - if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls
Returns:
true if operation is successful, false otherwise
Throws:
NoSuchObjectException - if the remote object is not currently exported
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Unreferenced

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi.server
Interface Unreferenced

public interface Unreferenced

A remote object implementation should implement the Unreferenced interface to receive notification when there are no more clients that reference that remote object.

Since:
JDK1.1

Method Summary
 void unreferenced()
Called by the RMI runtime sometime after the runtime determines that the reference list, the list of clients referencing the remote object, becomes empty.

Method Detail

unreferenced

public void unreferenced()
Called by the RMI runtime sometime after the runtime determines that the reference list, the list of clients referencing the remote object, becomes empty.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ServerError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class ServerError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.ServerError
All Implemented Interfaces:
Serializable
public class ServerError
extends RemoteException

A ServerError is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.Error. The ServerError contains a nested exception which is the java.lang.Error that occurred during remote method execution.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ServerError(String s, Error err)
Constructs a ServerError with the specified detail message and nested error.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServerError

public ServerError(String s,
                   Error err)
Constructs a ServerError with the specified detail message and nested error.
Parameters:
s - the detail message
err - the nested error
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class ServerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.ServerException
All Implemented Interfaces:
Serializable
public class ServerException
extends RemoteException

A ServerException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a RemoteException.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ServerException(String s)
Constructs a ServerException with the specified detail message.
ServerException(String s, Exception ex)
Constructs a ServerException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServerException

public ServerException(String s)
Constructs a ServerException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

ServerException

public ServerException(String s,
                       Exception ex)
Constructs a ServerException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerRuntimeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class ServerRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.ServerRuntimeException
All Implemented Interfaces:
Serializable
Deprecated. no replacement

public class ServerRuntimeException
extends RemoteException

A ServerRuntimeException is thrown as a result of a remote method call if the execution of the remote method on the server machine throws a java.lang.RuntimeException. A ServerRuntimeException is not thrown from servers executing in the Java 2 SDK v1.2 or later versions.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
ServerRuntimeException(String s, Exception ex)
Deprecated. no replacement
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServerRuntimeException

public ServerRuntimeException(String s,
                              Exception ex)
Deprecated. no replacement

Constructs a ServerRuntimeException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StubNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class StubNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.StubNotFoundException
All Implemented Interfaces:
Serializable
public class StubNotFoundException
extends RemoteException

A StubNotFoundException is thrown if a valid stub class could not be found for a remote object when it is exported. A StubNotFoundException may also be thrown when an activatable object is registered via the java.rmi.activation.Activatable.register method.

Since:
JDK1.1
See Also:
UnicastRemoteObject, Activatable, Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
StubNotFoundException(String s)
Constructs a StubNotFoundException with the specified detail message and nested exception.
StubNotFoundException(String s, Exception ex)
Constructs a StubNotFoundException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StubNotFoundException

public StubNotFoundException(String s)
Constructs a StubNotFoundException with the specified detail message and nested exception.
Parameters:
s - the detail message
Since:
JDK1.1

StubNotFoundException

public StubNotFoundException(String s,
                             Exception ex)
Constructs a StubNotFoundException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnexpectedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class UnexpectedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.UnexpectedException
All Implemented Interfaces:
Serializable
public class UnexpectedException
extends RemoteException

An UnexpectedException is thrown if the client of a remote method call receives, as a result of the call, a checked exception that is not among the checked exception types declared in the throws clause of the method in the remote interface.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
UnexpectedException(String s)
Constructs an UnexpectedException with the specified detail message.
UnexpectedException(String s, Exception ex)
Constructs a UnexpectedException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnexpectedException

public UnexpectedException(String s)
Constructs an UnexpectedException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

UnexpectedException

public UnexpectedException(String s,
                           Exception ex)
Constructs a UnexpectedException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownHostException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class UnknownHostException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.UnknownHostException
All Implemented Interfaces:
Serializable
public class UnknownHostException
extends RemoteException

An UnknownHostException is thrown if a java.net.UnknownHostException occurs while creating a connection to the remote host for a remote method call.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
UnknownHostException(String s)
Constructs an UnknownHostException with the specified detail message.
UnknownHostException(String s, Exception ex)
Constructs an UnknownHostException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnknownHostException

public UnknownHostException(String s)
Constructs an UnknownHostException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

UnknownHostException

public UnknownHostException(String s,
                            Exception ex)
Constructs an UnknownHostException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnmarshalException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.rmi
Class UnmarshalException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--java.rmi.UnmarshalException
All Implemented Interfaces:
Serializable
public class UnmarshalException
extends RemoteException

An UnmarshalException can be thrown while unmarshalling the parameters or results of a remote method call if any of the following conditions occur:

  • if an exception occurs while unmarshalling the call header
  • if the protocol for the return value is invalid
  • if a java.io.IOException occurs unmarshalling parameters (on the server side) or the return value (on the client side).
  • if a java.lang.ClassNotFoundException occurs during unmarshalling parameters or return values
  • if no skeleton can be loaded on the server-side; note that skeletons are required in the 1.1 stub protocol, but not in the 1.2 stub protocol.
  • if the method hash is invalid (i.e., missing method).
  • if there is a failure to create a remote reference object for a remote object's stub when it is unmarshalled.

Since:
JDK1.1
See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
UnmarshalException(String s)
Constructs an UnmarshalException with the specified detail message.
UnmarshalException(String s, Exception ex)
Constructs an UnmarshalException with the specified detail message and nested exception.
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnmarshalException

public UnmarshalException(String s)
Constructs an UnmarshalException with the specified detail message.
Parameters:
s - the detail message
Since:
JDK1.1

UnmarshalException

public UnmarshalException(String s,
                          Exception ex)
Constructs an UnmarshalException with the specified detail message and nested exception.
Parameters:
s - the detail message
ex - the nested exception
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.security Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.security

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.security.AccessControlContext
    • class java.security.AccessController
    • class java.security.AlgorithmParameterGenerator
    • class java.security.AlgorithmParameterGeneratorSpi
    • class java.security.AlgorithmParameters
    • class java.security.AlgorithmParametersSpi
    • class java.lang.ClassLoader
      • class java.security.SecureClassLoader
    • class java.security.CodeSource (implements java.io.Serializable)
    • class java.util.Dictionary
      • class java.util.Hashtable (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
        • class java.util.Properties
          • class java.security.Provider
    • class java.security.GuardedObject (implements java.io.Serializable)
    • class java.security.Identity (implements java.security.Principal, java.io.Serializable)
      • class java.security.IdentityScope
      • class java.security.Signer
    • class java.io.InputStream
      • class java.io.FilterInputStream
        • class java.security.DigestInputStream
    • class java.security.KeyFactory
    • class java.security.KeyFactorySpi
    • class java.security.KeyPair (implements java.io.Serializable)
    • class java.security.KeyPairGeneratorSpi
      • class java.security.KeyPairGenerator
    • class java.security.KeyStore
    • class java.security.KeyStoreSpi
    • class java.security.MessageDigestSpi
      • class java.security.MessageDigest
    • class java.io.OutputStream
      • class java.io.FilterOutputStream
        • class java.security.DigestOutputStream
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.AllPermission
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.security.SecurityPermission
      • class java.security.UnresolvedPermission (implements java.io.Serializable)
    • class java.security.PermissionCollection (implements java.io.Serializable)
      • class java.security.Permissions (implements java.io.Serializable)
    • class java.security.Policy
    • class java.security.ProtectionDomain
    • class java.util.Random (implements java.io.Serializable)
      • class java.security.SecureRandom
    • class java.security.SecureRandomSpi (implements java.io.Serializable)
    • class java.security.Security
    • class java.security.SignatureSpi
      • class java.security.Signature
    • class java.security.SignedObject (implements java.io.Serializable)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.security.GeneralSecurityException
          • class java.security.DigestException
          • class java.security.InvalidAlgorithmParameterException
          • class java.security.KeyException
            • class java.security.InvalidKeyException
            • class java.security.KeyManagementException
          • class java.security.KeyStoreException
          • class java.security.NoSuchAlgorithmException
          • class java.security.NoSuchProviderException
          • class java.security.SignatureException
          • class java.security.UnrecoverableKeyException
        • class java.security.PrivilegedActionException
        • class java.lang.RuntimeException
          • class java.lang.IllegalArgumentException
            • class java.security.InvalidParameterException
          • class java.security.ProviderException
          • class java.lang.SecurityException
            • class java.security.AccessControlException

Interface Hierarchy

  • interface java.security.Certificate
  • interface java.security.DomainCombiner
  • interface java.security.Guard
  • interface java.security.Principal
  • interface java.security.PrivilegedAction
  • interface java.security.PrivilegedExceptionAction
  • interface java.io.Serializable
    • interface java.security.Key
      • interface java.security.PrivateKey
      • interface java.security.PublicKey
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.security

Provides the classes and interfaces for the security framework.

See:
Description

Interface Summary
Certificate | Deprecated. A new certificate handling package is created in the Java 2 platform.
DomainCombiner | A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
Guard | This interface represents a guard, which is an object that is used to protect access to another object.
Key | The Key interface is the top-level interface for all keys.
Principal | This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
PrivateKey | A private key.
PrivilegedAction | A computation to be performed with privileges enabled.
PrivilegedExceptionAction | A computation to be performed with privileges enabled, that throws one or more checked exceptions.
PublicKey | A public key.

Class Summary
AccessControlContext | An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
AccessController | The AccessController class is used for three purposes: to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,
AlgorithmParameterGenerator | The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi | This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameters | This class is used as an opaque representation of cryptographic parameters.
AlgorithmParametersSpi | This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
AllPermission | The AllPermission is a permission that implies all other permissions.
BasicPermission | The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
CodeSource | This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
DigestInputStream | A transparent stream that updates the associated message digest using the bits going through the stream.
DigestOutputStream | A transparent stream that updates the associated message digest using the bits going through the stream.
GuardedObject | A GuardedObject is an object that is used to protect access to another object.
Identity | Deprecated. This class is no longer used.
IdentityScope | Deprecated. This class is no longer used.
KeyFactory | Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
KeyFactorySpi | This class defines the Service Provider Interface (SPI) for the KeyFactory class.
KeyPair | This class is a simple holder for a key pair (a public key and a private key).
KeyPairGenerator | The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGeneratorSpi | This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
KeyStore | This class represents an in-memory collection of keys and certificates.
KeyStoreSpi | This class defines the Service Provider Interface (SPI) for the KeyStore class.
MessageDigest | This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
MessageDigestSpi | This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
Permission | Abstract class for representing access to a system resource.
PermissionCollection | Abstract class representing a collection of Permission objects.
Permissions | This class represents a heterogeneous collection of Permissions.
Policy | This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).
ProtectionDomain | This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.
Provider | This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
SecureClassLoader | This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
SecureRandom | This class provides a cryptographically strong pseudo-random number generator (PRNG).
SecureRandomSpi | This class defines the Service Provider Interface (SPI) for the SecureRandom class.
Security | This class centralizes all security properties and common security methods.
SecurityPermission | This class is for security permissions.
Signature | This Signature class is used to provide applications the functionality of a digital signature algorithm.
SignatureSpi | This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
SignedObject | SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
Signer | Deprecated. This class is no longer used.
UnresolvedPermission | The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.

Exception Summary
AccessControlException | This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
DigestException | This is the generic Message Digest exception.
GeneralSecurityException | This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
InvalidAlgorithmParameterException | This is the exception for invalid or inappropriate algorithm parameters.
InvalidKeyException | This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidParameterException | This exception is thrown when an invalid parameter is passed to a method.
KeyException | This is the basic key exception.
KeyManagementException | This is the general key management exception, for all operations dealing with key management.
KeyStoreException | This is the generic KeyStore exception.
NoSuchAlgorithmException | This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException | This exception is thrown when a particular security provider is requested but is not available in the environment.
PrivilegedActionException | This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
ProviderException | A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
SignatureException | This is the generic Signature exception.
UnrecoverableKeyException | This exception is thrown if a key in the keystore cannot be recovered.

Package java.security Description

Provides the classes and interfaces for the security framework. This includes classes that implement an easily configurable, fine-grained access control security architecture. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

  • PKCS8: Private-Key Information Standard, Version 1.2, November 1993

Related Documentation

For further documentation, please see:
  • Security Architecture
  • Cryptography Architecture
  • How to Implement a Provider for the Java Cryptography Architecture
  • Default Policy Implementation and Policy File Syntax
  • Policy Permissions
  • Security Tools Summary
  • keytool (for Solaris) (for Windows)
  • jarsigner (for Solaris) (for Windows)

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.security

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.security

Packages that use java.security
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Classes in java.security used by java.awt
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.

Classes in java.security used by java.io
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.
PermissionCollection
Abstract class representing a collection of Permission objects.

Classes in java.security used by java.lang
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.
ProtectionDomain
This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.

Classes in java.security used by java.lang.reflect
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.

Classes in java.security used by java.net
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
CodeSource
This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.
PermissionCollection
Abstract class representing a collection of Permission objects.
SecureClassLoader
This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.

Classes in java.security used by java.security
AccessControlContext
An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
AccessControlException
This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
AlgorithmParameterGenerator
The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi
This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameters
This class is used as an opaque representation of cryptographic parameters.
AlgorithmParametersSpi
This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Certificate
Deprecated. A new certificate handling package is created in the Java 2 platform. This Certificate interface is entirely deprecated and is here to allow for a smooth transition to the new package.
CodeSource
This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
DigestException
This is the generic Message Digest exception.
DomainCombiner
A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
GeneralSecurityException
This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Identity
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
IdentityScope
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
InvalidAlgorithmParameterException
This is the exception for invalid or inappropriate algorithm parameters.
InvalidKeyException
This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidParameterException
This exception is thrown when an invalid parameter is passed to a method.
Key
The Key interface is the top-level interface for all keys.
KeyException
This is the basic key exception.
KeyFactory
Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
KeyFactorySpi
This class defines the Service Provider Interface (SPI) for the KeyFactory class.
KeyManagementException
This is the general key management exception, for all operations dealing with key management.
KeyPair
This class is a simple holder for a key pair (a public key and a private key).
KeyPairGenerator
The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGeneratorSpi
This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
KeyStore
This class represents an in-memory collection of keys and certificates.
KeyStoreException
This is the generic KeyStore exception.
KeyStoreSpi
This class defines the Service Provider Interface (SPI) for the KeyStore class.
MessageDigest
This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
MessageDigestSpi
This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
NoSuchAlgorithmException
This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException
This exception is thrown when a particular security provider is requested but is not available in the environment.
Permission
Abstract class for representing access to a system resource.
PermissionCollection
Abstract class representing a collection of Permission objects.
Policy
This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).
Principal
This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
PrivateKey
A private key.
PrivilegedAction
A computation to be performed with privileges enabled.
PrivilegedActionException
This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
PrivilegedExceptionAction
A computation to be performed with privileges enabled, that throws one or more checked exceptions.
ProtectionDomain
This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.
Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
PublicKey
A public key.
SecureRandom
This class provides a cryptographically strong pseudo-random number generator (PRNG).
SecureRandomSpi
This class defines the Service Provider Interface (SPI) for the SecureRandom class.
Signature
This Signature class is used to provide applications the functionality of a digital signature algorithm.
SignatureException
This is the generic Signature exception.
SignatureSpi
This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
UnrecoverableKeyException
This exception is thrown if a key in the keystore cannot be recovered.

Classes in java.security used by java.security.acl
Principal
This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.

Classes in java.security used by java.security.cert
GeneralSecurityException
This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.
InvalidKeyException
This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
NoSuchAlgorithmException
This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException
This exception is thrown when a particular security provider is requested but is not available in the environment.
Principal
This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).
PublicKey
A public key.
SignatureException
This is the generic Signature exception.

Classes in java.security used by java.security.interfaces
InvalidParameterException
This exception is thrown when an invalid parameter is passed to a method.
Key
The Key interface is the top-level interface for all keys.
PrivateKey
A private key.
PublicKey
A public key.
SecureRandom
This class provides a cryptographically strong pseudo-random number generator (PRNG).

Classes in java.security used by java.security.spec
GeneralSecurityException
This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it.

Classes in java.security used by java.sql
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.

Classes in java.security used by java.util
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.
PermissionCollection
Abstract class representing a collection of Permission objects.

Classes in java.security used by javax.sound.sampled
BasicPermission
The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
Guard
This interface represents a guard, which is an object that is used to protect access to another object.
Permission
Abstract class for representing access to a system resource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AccessControlContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Class AccessControlContext

java.lang.Object
  |
  +--java.security.AccessControlContext
public final class AccessControlContext
extends Object

An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.

More specifically, it encapsulates a context and has a single method, checkPermission, that is equivalent to the checkPermission method in the AccessController class, with one difference: The AccessControlContext checkPermission method makes access decisions based on the context it encapsulates, rather than that of the current execution thread.

Thus, the purpose of AccessControlContext is for those situations where a security check that should be made within a given context actually needs to be done from within a different context (for example, from within a worker thread).

An AccessControlContext is created by calling the AccessController.getContext method. The getContext method takes a "snapshot" of the current calling context, and places it in an AccessControlContext object, which it returns. A sample call is the following:

   AccessControlContext acc = AccessController.getContext()

Code within a different context can subsequently call the checkPermission method on the previously-saved AccessControlContext object. A sample call is the following:

   acc.checkPermission(permission)

See Also:
AccessController

Constructor Summary
AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
Create a new AccessControlContext with the given AccessControlContext and DomainCombiner.
AccessControlContext(ProtectionDomain[] context)
Create an AccessControlContext with the given set of ProtectionDomains.
Method Summary
void | checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.
boolean | equals(Object obj) Checks two AccessControlContext objects for equality.
DomainCombiner | getDomainCombiner() Get the DomainCombiner associated with this AccessControlContext.
int | hashCode() Returns the hash code value for this context.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AccessControlContext

public AccessControlContext(ProtectionDomain[] context)
Create an AccessControlContext with the given set of ProtectionDomains. Context must not be null. Duplicate domains will be removed from the context.
Parameters:
context - the ProtectionDomains associated with this context.

AccessControlContext

public AccessControlContext(AccessControlContext acc,
                            DomainCombiner combiner)
Create a new AccessControlContext with the given AccessControlContext and DomainCombiner. This constructor associates the provided DomainCombiner with the provided AccessControlContext.

Parameters:
acc - the AccessControlContext associated with the provided DomainCombiner.

combiner - the DomainCombiner to be associated with the provided AccessControlContext.
Throws:
NullPointerException - if either the provided context or the provided combiner are null.

SecurityException - if the caller does not have permission to invoke this constructor.
Method Detail

getDomainCombiner

public DomainCombiner getDomainCombiner()
Get the DomainCombiner associated with this AccessControlContext.

Returns:
the DomainCombiner associated with this AccessControlContext, or null if there is none.
Throws:
SecurityException - if the caller does not have permission to get the DomainCombiner associated with this AccessControlContext.

checkPermission

public void checkPermission(Permission perm)
                     throws AccessControlException
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.

This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.

Parameters:
perm - the requested permission.
Throws:
AccessControlException - if the specified permission is not permitted, based on the current security policy and the context encapsulated by this object.
NullPointerException - if the permission to check for is null.

equals

public boolean equals(Object obj)
Checks two AccessControlContext objects for equality. Checks that obj is an AccessControlContext and has the same set of ProtectionDomains as this context.

Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is an AccessControlContext, and has the same set of ProtectionDomains as this context, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this context. The hash code is computed by exclusive or-ing the hash code of all the protection domains in the context together.
Overrides:
hashCode in class Object
Returns:
a hash code value for this context.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessControlException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Class AccessControlException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.SecurityException
                          |
                          +--java.security.AccessControlException
All Implemented Interfaces:
Serializable
public class AccessControlException
extends SecurityException

This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.

The reason to deny access can vary. For example, the requested permission might be of an incorrect type, contain an invalid value, or request access that is not allowed according to the security policy. Such information should be given whenever possible at the time the exception is thrown.

See Also:
Serialized Form

Constructor Summary
AccessControlException(String s)
Constructs an AccessControlException with the specified, detailed message.
AccessControlException(String s, Permission p)
Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.
Method Summary
 Permission getPermission()
Gets the Permission object associated with this exeception, or null if there was no corresponding Permission object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AccessControlException

public AccessControlException(String s)
Constructs an AccessControlException with the specified, detailed message.
Parameters:
s - the detail message.

AccessControlException

public AccessControlException(String s,
                              Permission p)
Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.
Parameters:
s - the detail message.
p - the permission that caused the exception.
Method Detail

getPermission

public Permission getPermission()
Gets the Permission object associated with this exeception, or null if there was no corresponding Permission object.
Returns:
the Permission object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessController

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AccessController

java.lang.Object
  |
  +--java.security.AccessController
public final class AccessController
extends Object

The AccessController class is used for three purposes:

  • to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,

  • to mark code as being "privileged", thus affecting subsequent access determinations, and

  • to obtain a "snapshot" of the current calling context so access-control decisions from a different context can be made with respect to the saved context.

The checkPermission method determines whether the access request indicated by a specified permission should be granted or denied. A sample call appears below. In this example, checkPermission will determine whether or not to grant "read" access to the file named "testFile" in the "/temp" directory.

    FilePermission perm = new FilePermission("/temp/testFile", "read");
    AccessController.checkPermission(perm);

If a requested access is allowed, checkPermission returns quietly. If denied, an AccessControlException is thrown. AccessControlException can also be thrown if the requested permission is of an incorrect type or contains an invalid value. Such information is given whenever possible. Suppose the current thread traversed m callers, in the order of caller 1 to caller 2 to caller m. Then caller m invoked the checkPermission method. The checkPermission method determines whether access is granted or denied based on the following algorithm:

 i = m;

 while (i > 0) {

      if (caller i's domain does not have the permission)
              throw AccessControlException

      else if (caller i is marked as privileged) {
              if (a context was specified in the call to doPrivileged)
                 context.checkPermission(permission)
              return;
      }
      i = i - 1;
 };

    // Next, check the context inherited when
    // the thread was created. Whenever a new thread is created, the
    // AccessControlContext at that time is
    // stored and associated with the new thread, as the "inherited"
    // context.

 inheritedContext.checkPermission(permission);

A caller can be marked as being "privileged" (see doPrivileged and below). When making access control decisions, the checkPermission method stops checking if it reaches a caller that was marked as "privileged" via a doPrivileged call without a context argument (see below for information about a context argument). If that caller's domain has the specified permission, no further checking is done and checkPermission returns quietly, indicating that the requested access is allowed. If that domain does not have the specified permission, an exception is thrown, as usual.

The normal use of the "privileged" feature is as follows. If you don't need to return a value from within the "privileged" block, do the following:

   somemethod() {
        ...normal code here...
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                // privileged code goes here, for example:
                System.loadLibrary("awt");
                return null; // nothing to return
            }
        });
       ...normal code here...
  }

PrivilegedAction is an interface with a single method, named run, that returns an Object. The above example shows creation of an implementation of that interface; a concrete implementation of the run method is supplied. When the call to doPrivileged is made, an instance of the PrivilegedAction implementation is passed to it. The doPrivileged method calls the run method from the PrivilegedAction implementation after enabling privileges, and returns the run method's return value as the doPrivileged return value (which is ignored in this example).

If you need to return a value, you can do something like the following:

   somemethod() {
        ...normal code here...
        String user = (String) AccessController.doPrivileged(
          new PrivilegedAction() {
            public Object run() {
                return System.getProperty("user.name");
            }
          }
        );
        ...normal code here...
  }

If the action performed in your run method could throw a "checked" exception (those listed in the throws clause of a method), then you need to use the PrivilegedExceptionAction interface instead of the PrivilegedAction interface:

   somemethod() throws FileNotFoundException {
        ...normal code here...
      try {
        FileInputStream fis = (FileInputStream) AccessController.doPrivileged(
          new PrivilegedExceptionAction() {
            public Object run() throws FileNotFoundException {
                return new FileInputStream("someFile");
            }
          }
        );
      } catch (PrivilegedActionException e) {
        // e.getException() should be an instance of FileNotFoundException,
        // as only "checked" exceptions will be "wrapped" in a
        // PrivilegedActionException.
        throw (FileNotFoundException) e.getException();
      }
        ...normal code here...
  }

Be *very* careful in your use of the "privileged" construct, and always remember to make the privileged code section as small as possible.

Note that checkPermission always performs security checks within the context of the currently executing thread. Sometimes a security check that should be made within a given context will actually need to be done from within a different context (for example, from within a worker thread). The getContext method and AccessControlContext class are provided for this situation. The getContext method takes a "snapshot" of the current calling context, and places it in an AccessControlContext object, which it returns. A sample call is the following:

   AccessControlContext acc = AccessController.getContext()

AccessControlContext itself has a checkPermission method that makes access decisions based on the context it encapsulates, rather than that of the current execution thread. Code within a different context can thus call that method on the previously-saved AccessControlContext object. A sample call is the following:

   acc.checkPermission(permission)

There are also times where you don't know a priori which permissions to check the context against. In these cases you can use the doPrivileged method that takes a context:

   somemethod() {
         AccessController.doPrivileged(new PrivilegedAction() {
              public Object run() {
                 // Code goes here. Any permission checks from this
                 // point forward require both the current context and
                 // the snapshot's context to have the desired permission.
              }
         }, acc);
         ...normal code here...
   }

See Also:
AccessControlContext

Method Summary
static void | checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.
static Object | doPrivileged(PrivilegedAction action) Performs the specified PrivilegedAction with privileges enabled.
static Object | doPrivileged(PrivilegedAction action, AccessControlContext context) Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext.
static Object | doPrivileged(PrivilegedExceptionAction action) Performs the specified PrivilegedExceptionAction with privileges enabled.
static Object | doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.
static AccessControlContext | getContext() This method takes a "snapshot" of the current calling context, which includes the current Thread's inherited AccessControlContext, and places it in an AccessControlContext object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

doPrivileged

public static Object doPrivileged(PrivilegedAction action)
Performs the specified PrivilegedAction with privileges enabled. The action is performed with all of the permissions possessed by the caller's protection domain.

If the action's run method throws an (unchecked) exception, it will propagate through this method.

Parameters:
action - the action to be performed.
Returns:
the value returned by the action's run method.
See Also:
doPrivileged(PrivilegedAction,AccessControlContext), doPrivileged(PrivilegedExceptionAction)

doPrivileged

public static Object doPrivileged(PrivilegedAction action,
                                  AccessControlContext context)
Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext. The action is performed with the intersection of the permissions possessed by the caller's protection domain, and those possessed by the domains represented by the specified AccessControlContext.

If the action's run method throws an (unchecked) exception, it will propagate through this method.

Parameters:
action - the action to be performed.
context - an access control context representing the restriction to be applied to the caller's domain's privileges before performing the specified action.
Returns:
the value returned by the action's run method.
See Also:
doPrivileged(PrivilegedAction), doPrivileged(PrivilegedExceptionAction,AccessControlContext)

doPrivileged

public static Object doPrivileged(PrivilegedExceptionAction action)
                           throws PrivilegedActionException
Performs the specified PrivilegedExceptionAction with privileges enabled. The action is performed with all of the permissions possessed by the caller's protection domain.

If the action's run method throws an unchecked exception, it will propagate through this method.

Parameters:
action - the action to be performed.
Returns:
the value returned by the action's run method.
Throws:
PrivilgedActionException - the specified action's run method threw a checked exception.
See Also:
doPrivileged(PrivilegedExceptionAction,AccessControlContext), doPrivileged(PrivilegedAction)

doPrivileged

public static Object doPrivileged(PrivilegedExceptionAction action,
                                  AccessControlContext context)
                           throws PrivilegedActionException
Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext. The action is performed with the intersection of the the permissions possessed by the caller's protection domain, and those possessed by the domains represented by the specified AccessControlContext.

If the action's run method throws an unchecked exception, it will propagate through this method.

Parameters:
action - the action to be performed.
context - an access control context representing the restriction to be applied to the caller's domain's privileges before performing the specified action.
Returns:
the value returned by the action's run method.
Throws:
PrivilegedActionException - the specified action's run method threw a checked exception.
See Also:
doPrivileged(PrivilegedAction), doPrivileged(PrivilegedExceptionAction,AccessControlContext)

getContext

public static AccessControlContext getContext()
This method takes a "snapshot" of the current calling context, which includes the current Thread's inherited AccessControlContext, and places it in an AccessControlContext object. This context may then be checked at a later point, possibly in another thread.
Returns:
the AccessControlContext based on the current context.
See Also:
AccessControlContext

checkPermission

public static void checkPermission(Permission perm)
                            throws AccessControlException
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect. This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.
Parameters:
perm - the requested permission.
Throws:
AccessControlException - if the specified permission is not permitted, based on the current security policy.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.security.acl Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.security.acl

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.security.acl.AclNotFoundException
        • class java.security.acl.LastOwnerException
        • class java.security.acl.NotOwnerException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface java.security.acl.AclEntry
  • interface java.security.acl.Owner
    • interface java.security.acl.Acl
  • interface java.security.acl.Permission
  • interface java.security.Principal
    • interface java.security.acl.Group
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.security.acl

The classes and interfaces in this package have been superseded by classes in the java.security package.

See:
Description

Interface Summary
Acl | Interface representing an Access Control List (ACL).
AclEntry | This is the interface used for representing one entry in an Access Control List (ACL).
Group | This interface is used to represent a group of principals.
Owner | Interface for managing owners of Access Control Lists (ACLs) or ACL configurations.
Permission | This interface represents a permission, such as that used to grant a particular type of access to a resource.

Exception Summary
AclNotFoundException | This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).
LastOwnerException | This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
NotOwnerException | This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

Package java.security.acl Description

The classes and interfaces in this package have been superseded by classes in the java.security package. See that package and, for example, java.security.Permission for details.

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.security.acl

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.security.acl

Packages that use java.security.acl
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Classes in java.security.acl used by java.security.acl
AclEntry
This is the interface used for representing one entry in an Access Control List (ACL).
LastOwnerException
This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.
NotOwnerException
This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.
Owner
Interface for managing owners of Access Control Lists (ACLs) or ACL configurations.
Permission
This interface represents a permission, such as that used to grant a particular type of access to a resource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Acl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Interface Acl

All Superinterfaces:
Owner
public interface Acl
extends Owner

Interface representing an Access Control List (ACL). An Access Control List is a data structure used to guard access to resources.

An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type AclEntry, contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied.

The ACL Entries in each ACL observe the following rules:

  • Each principal can have at most one positive ACL entry and one negative entry; that is, multiple positive or negative ACL entries are not allowed for any principal. Each entry specifies the set of permissions that are to be granted (if positive) or denied (if negative).

  • If there is no entry for a particular principal, then the principal is considered to have a null (empty) permission set.

  • If there is a positive entry that grants a principal a particular permission, and a negative entry that denies the principal the same permission, the result is as though the permission was never granted or denied.

  • Individual permissions always override permissions of the group(s) to which the individual belongs. That is, individual negative permissions (specific denial of permissions) override the groups' positive permissions. And individual positive permissions override the groups' negative permissions.

The java.security.acl package provides the interfaces to the ACL and related data structures (ACL entries, groups, permissions, etc.), and the sun.security.acl classes provide a default implementation of the interfaces. For example, java.security.acl.Acl provides the interface to an ACL and the sun.security.acl.AclImpl class provides the default implementation of the interface.

The java.security.acl.Acl interface extends the java.security.acl.Owner interface. The Owner interface is used to maintain a list of owners for each ACL. Only owners are allowed to modify an ACL. For example, only an owner can call the ACL's addEntry method to add a new ACL entry to the ACL.

See Also:
AclEntry, Owner, getPermissions(java.security.Principal)

Method Summary
boolean | addEntry(Principal caller, AclEntry entry) Adds an ACL entry to this ACL.
boolean | checkPermission(Principal principal, Permission permission) Checks whether or not the specified principal has the specified permission.
Enumeration | entries() Returns an enumeration of the entries in this ACL.
String | getName() Returns the name of this ACL.
Enumeration | getPermissions(Principal user) Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group).
boolean | removeEntry(Principal caller, AclEntry entry) Removes an ACL entry from this ACL.
void | setName(Principal caller, String name) Sets the name of this ACL.
String | toString() Returns a string representation of the ACL contents.
Methods inherited from interface java.security.acl.Owner
addOwner, deleteOwner, isOwner

Method Detail

setName

public void setName(Principal caller,
                    String name)
             throws NotOwnerException
Sets the name of this ACL.
Parameters:
caller - the principal invoking this method. It must be an owner of this ACL.
name - the name to be given to this ACL.
Throws:
NotOwnerException - if the caller principal is not an owner of this ACL.

getName

public String getName()
Returns the name of this ACL.
Returns:
the name of this ACL.

addEntry

public boolean addEntry(Principal caller,
                        AclEntry entry)
                 throws NotOwnerException
Adds an ACL entry to this ACL. An entry associates a principal (e.g., an individual or a group) with a set of permissions. Each principal can have at most one positive ACL entry (specifying permissions to be granted to the principal) and one negative ACL entry (specifying permissions to be denied). If there is already an ACL entry of the same type (negative or positive) already in the ACL, false is returned.
Parameters:
caller - the principal invoking this method. It must be an owner of this ACL.
entry - the ACL entry to be added to this ACL.
Returns:
true on success, false if an entry of the same type (positive or negative) for the same principal is already present in this ACL.
Throws:
NotOwnerException - if the caller principal is not an owner of this ACL.

removeEntry

public boolean removeEntry(Principal caller,
                           AclEntry entry)
                    throws NotOwnerException
Removes an ACL entry from this ACL.
Parameters:
caller - the principal invoking this method. It must be an owner of this ACL.
entry - the ACL entry to be removed from this ACL.
Returns:
true on success, false if the entry is not part of this ACL.
Throws:
NotOwnerException - if the caller principal is not an owner of this Acl.

getPermissions

public Enumeration getPermissions(Principal user)
Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group). This set of allowed permissions is calculated as follows:

  • If there is no entry in this Access Control List for the specified principal, an empty permission set is returned.

  • Otherwise, the principal's group permission sets are determined. (A principal can belong to one or more groups, where a group is a group of principals, represented by the Group interface.) The group positive permission set is the union of all the positive permissions of each group that the principal belongs to. The group negative permission set is the union of all the negative permissions of each group that the principal belongs to. If there is a specific permission that occurs in both the positive permission set and the negative permission set, it is removed from both.

    The individual positive and negative permission sets are also determined. The positive permission set contains the permissions specified in the positive ACL entry (if any) for the principal. Similarly, the negative permission set contains the permissions specified in the negative ACL entry (if any) for the principal. The individual positive (or negative) permission set is considered to be null if there is not a positive (negative) ACL entry for the principal in this ACL.

    The set of permissions granted to the principal is then calculated using the simple rule that individual permissions always override the group permissions. That is, the principal's individual negative permission set (specific denial of permissions) overrides the group positive permission set, and the principal's individual positive permission set overrides the group negative permission set.

Parameters:
user - the principal whose permission set is to be returned.
Returns:
the permission set specifying the permissions the principal is allowed.

entries

public Enumeration entries()
Returns an enumeration of the entries in this ACL. Each element in the enumeration is of type AclEntry.
Returns:
an enumeration of the entries in this ACL.

checkPermission

public boolean checkPermission(Principal principal,
                               Permission permission)
Checks whether or not the specified principal has the specified permission. If it does, true is returned, otherwise false is returned. More specifically, this method checks whether the passed permission is a member of the allowed permission set of the specified principal. The allowed permission set is determined by the same algorithm as is used by the getPermissions method.
Parameters:
principal - the principal, assumed to be a valid authenticated Principal.
permission - the permission to be checked for.
Returns:
true if the principal has the specified permission, false otherwise.
See Also:
getPermissions(java.security.Principal)

toString

public String toString()
Returns a string representation of the ACL contents.
Overrides:
toString in class Object
Returns:
a string representation of the ACL contents.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AclEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Interface AclEntry

All Superinterfaces:
Cloneable
public interface AclEntry
extends Cloneable

This is the interface used for representing one entry in an Access Control List (ACL).

An ACL can be thought of as a data structure with multiple ACL entry objects. Each ACL entry object contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied. Each principal can have at most one positive ACL entry and one negative entry; that is, multiple positive or negative ACL entries are not allowed for any principal. Note: ACL entries are by default positive. An entry becomes a negative entry only if the setNegativePermissions method is called on it.

See Also:
Acl

Method Summary
boolean | addPermission(Permission permission) Adds the specified permission to this ACL entry.
boolean | checkPermission(Permission permission) Checks if the specified permission is part of the permission set in this entry.
Object | clone() Clones this ACL entry.
Principal | getPrincipal() Returns the principal for which permissions are granted or denied by this ACL entry.
boolean | isNegative() Returns true if this is a negative ACL entry (one denying the associated principal the set of permissions in the entry), false otherwise.
Enumeration | permissions() Returns an enumeration of the permissions in this ACL entry.
boolean | removePermission(Permission permission) Removes the specified permission from this ACL entry.
void | setNegativePermissions() Sets this ACL entry to be a negative one.
boolean | setPrincipal(Principal user) Specifies the principal for which permissions are granted or denied by this ACL entry.
String | toString() Returns a string representation of the contents of this ACL entry.

Method Detail

setPrincipal

public boolean setPrincipal(Principal user)
Specifies the principal for which permissions are granted or denied by this ACL entry. If a principal was already set for this ACL entry, false is returned, otherwise true is returned.
Parameters:
user - the principal to be set for this entry.
Returns:
true if the principal is set, false if there was already a principal set for this entry.

getPrincipal

public Principal getPrincipal()
Returns the principal for which permissions are granted or denied by this ACL entry. Returns null if there is no principal set for this entry yet.
Returns:
the principal associated with this entry.

setNegativePermissions

public void setNegativePermissions()
Sets this ACL entry to be a negative one. That is, the associated principal (e.g., a user or a group) will be denied the permission set specified in the entry. Note: ACL entries are by default positive. An entry becomes a negative entry only if this setNegativePermissions method is called on it.

isNegative

public boolean isNegative()
Returns true if this is a negative ACL entry (one denying the associated principal the set of permissions in the entry), false otherwise.
Returns:
true if this is a negative ACL entry, false if it's not.

addPermission

public boolean addPermission(Permission permission)
Adds the specified permission to this ACL entry. Note: An entry can have multiple permissions.
Parameters:
permission - the permission to be associated with the principal in this entry.
Returns:
true if the permission was added, false if the permission was already part of this entry's permission set.

removePermission

public boolean removePermission(Permission permission)
Removes the specified permission from this ACL entry.
Parameters:
permission - the permission to be removed from this entry.
Returns:
true if the permission is removed, false if the permission was not part of this entry's permission set.

checkPermission

public boolean checkPermission(Permission permission)
Checks if the specified permission is part of the permission set in this entry.
Parameters:
permission - the permission to be checked for.
Returns:
true if the permission is part of the permission set in this entry, false otherwise.

permissions

public Enumeration permissions()
Returns an enumeration of the permissions in this ACL entry.
Returns:
an enumeration of the permissions in this ACL entry.

toString

public String toString()
Returns a string representation of the contents of this ACL entry.
Overrides:
toString in class Object
Returns:
a string representation of the contents.

clone

public Object clone()
Clones this ACL entry.
Overrides:
clone in class Object
Returns:
a clone of this ACL entry.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AclNotFoundException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Class AclNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.acl.AclNotFoundException
All Implemented Interfaces:
Serializable
public class AclNotFoundException
extends Exception

This is an exception that is thrown whenever a reference is made to a non-existent ACL (Access Control List).

See Also:
Serialized Form

Constructor Summary
AclNotFoundException()
Constructs an AclNotFoundException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AclNotFoundException

public AclNotFoundException()
Constructs an AclNotFoundException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.security.acl.AclNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.acl.AclNotFoundException

No usage of java.security.acl.AclNotFoundException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.acl.Acl

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.acl.Acl

No usage of java.security.acl.Acl

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.acl.Group

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.acl.Group

No usage of java.security.acl.Group

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.acl.LastOwnerException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.acl.LastOwnerException

Packages that use LastOwnerException
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Uses of LastOwnerException in java.security.acl

Methods in java.security.acl that throw LastOwnerException
 boolean Owner.deleteOwner(Principal caller, Principal owner)
Deletes an owner.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.acl.NotOwnerException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.acl.NotOwnerException

Packages that use NotOwnerException
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Uses of NotOwnerException in java.security.acl

Methods in java.security.acl that throw NotOwnerException
boolean | Owner.addOwner(Principal caller, Principal owner) Adds an owner.
boolean | Owner.deleteOwner(Principal caller, Principal owner) Deletes an owner.
void | Acl.setName(Principal caller, String name) Sets the name of this ACL.
boolean | Acl.addEntry(Principal caller, AclEntry entry) Adds an ACL entry to this ACL.
boolean | Acl.removeEntry(Principal caller, AclEntry entry) Removes an ACL entry from this ACL.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.acl.AclEntry

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.acl.AclEntry

Packages that use AclEntry
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Uses of AclEntry in java.security.acl

Methods in java.security.acl with parameters of type AclEntry
boolean | Acl.addEntry(Principal caller, AclEntry entry) Adds an ACL entry to this ACL.
boolean | Acl.removeEntry(Principal caller, AclEntry entry) Removes an ACL entry from this ACL.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.acl.Owner

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.acl.Owner

Packages that use Owner
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Uses of Owner in java.security.acl

Subinterfaces of Owner in java.security.acl
 interface Acl
Interface representing an Access Control List (ACL).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.acl.Permission

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.acl.Permission

Packages that use Permission
java.security.acl The classes and interfaces in this package have been superseded by classes in the java.security package.

Uses of Permission in java.security.acl

Methods in java.security.acl with parameters of type Permission
boolean | AclEntry.addPermission(Permission permission) Adds the specified permission to this ACL entry.
boolean | AclEntry.removePermission(Permission permission) Removes the specified permission from this ACL entry.
boolean | AclEntry.checkPermission(Permission permission) Checks if the specified permission is part of the permission set in this entry.
boolean | Acl.checkPermission(Principal principal, Permission permission) Checks whether or not the specified principal has the specified permission.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Group

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Interface Group

All Superinterfaces:
Principal
public interface Group
extends Principal

This interface is used to represent a group of principals. (A principal represents an entity such as an individual user or a company).

Note that Group extends Principal. Thus, either a Principal or a Group can be passed as an argument to methods containing a Principal parameter. For example, you can add either a Principal or a Group to a Group object by calling the object's addMember method, passing it the Principal or Group.

Method Summary
boolean | addMember(Principal user) Adds the specified member to the group.
boolean | isMember(Principal member) Returns true if the passed principal is a member of the group.
Enumeration | members() Returns an enumeration of the members in the group.
boolean | removeMember(Principal user) Removes the specified member from the group.
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString

Method Detail

addMember

public boolean addMember(Principal user)
Adds the specified member to the group.
Parameters:
user - the principal to add to this group.
Returns:
true if the member was successfully added, false if the principal was already a member.

removeMember

public boolean removeMember(Principal user)
Removes the specified member from the group.
Parameters:
user - the principal to remove from this group.
Returns:
true if the principal was removed, or false if the principal was not a member.

isMember

public boolean isMember(Principal member)
Returns true if the passed principal is a member of the group. This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned.
Parameters:
member - the principal whose membership is to be checked.
Returns:
true if the principal is a member of this group, false otherwise.

members

public Enumeration members()
Returns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).
Returns:
an enumeration of the group members.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LastOwnerException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Class LastOwnerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.acl.LastOwnerException
All Implemented Interfaces:
Serializable
public class LastOwnerException
extends Exception

This is an exception that is thrown whenever an attempt is made to delete the last owner of an Access Control List.

See Also:
Owner.deleteOwner(java.security.Principal, java.security.Principal), Serialized Form

Constructor Summary
LastOwnerException()
Constructs a LastOwnerException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LastOwnerException

public LastOwnerException()
Constructs a LastOwnerException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotOwnerException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Class NotOwnerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.acl.NotOwnerException
All Implemented Interfaces:
Serializable
public class NotOwnerException
extends Exception

This is an exception that is thrown whenever the modification of an object (such as an Access Control List) is only allowed to be done by an owner of the object, but the Principal attempting the modification is not an owner.

See Also:
Serialized Form

Constructor Summary
NotOwnerException()
Constructs a NotOwnerException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotOwnerException

public NotOwnerException()
Constructs a NotOwnerException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Owner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Interface Owner

All Known Subinterfaces:
Acl
public interface Owner

Interface for managing owners of Access Control Lists (ACLs) or ACL configurations. (Note that the Acl interface in the java.security.acl package extends this Owner interface.) The initial owner Principal should be specified as an argument to the constructor of the class implementing this interface.

See Also:
Acl

Method Summary
boolean | addOwner(Principal caller, Principal owner) Adds an owner.
boolean | deleteOwner(Principal caller, Principal owner) Deletes an owner.
boolean | isOwner(Principal owner) Returns true if the given principal is an owner of the ACL.

Method Detail

addOwner

public boolean addOwner(Principal caller,
                        Principal owner)
                 throws NotOwnerException
Adds an owner. Only owners can modify ACL contents. The caller principal must be an owner of the ACL in order to invoke this method. That is, only an owner can add another owner. The initial owner is configured at ACL construction time.
Parameters:
caller - the principal invoking this method. It must be an owner of the ACL.
owner - the owner that should be added to the list of owners.
Returns:
true if successful, false if owner is already an owner.
Throws:
NotOwnerException - if the caller principal is not an owner of the ACL.

deleteOwner

public boolean deleteOwner(Principal caller,
                           Principal owner)
                    throws NotOwnerException,
                           LastOwnerException
Deletes an owner. If this is the last owner in the ACL, an exception is raised.

The caller principal must be an owner of the ACL in order to invoke this method.

Parameters:
caller - the principal invoking this method. It must be an owner of the ACL.
owner - the owner to be removed from the list of owners.
Returns:
true if the owner is removed, false if the owner is not part of the list of owners.
Throws:
NotOwnerException - if the caller principal is not an owner of the ACL.
LastOwnerException - if there is only one owner left, so that deleteOwner would leave the ACL owner-less.

isOwner

public boolean isOwner(Principal owner)
Returns true if the given principal is an owner of the ACL.
Parameters:
owner - the principal to be checked to determine whether or not it is an owner.
Returns:
true if the passed principal is in the list of owners, false if not.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Permission

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.acl
Interface Permission

public interface Permission

This interface represents a permission, such as that used to grant a particular type of access to a resource.

Method Summary
boolean | equals(Object another) Returns true if the object passed matches the permission represented in this interface.
String | toString() Prints a string representation of this permission.

Method Detail

equals

public boolean equals(Object another)
Returns true if the object passed matches the permission represented in this interface.
Overrides:
equals in class Object
Parameters:
another - the Permission object to compare with.
Returns:
true if the Permission objects are equal, false otherwise

toString

public String toString()
Prints a string representation of this permission.
Overrides:
toString in class Object
Returns:
the string representation of the permission.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AlgorithmParameterGenerator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AlgorithmParameterGenerator

java.lang.Object
  |
  +--java.security.AlgorithmParameterGenerator
public class AlgorithmParameterGenerator
extends Object

The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm. Parameter generators are constructed using the getInstance factory methods (static methods that return instances of a given class).

The object that will generate the parameters can be initialized in two different ways: in an algorithm-independent manner, or in an algorithm-specific manner:

  • The algorithm-independent approach uses the fact that all parameter generators share the concept of a "size" and a source of randomness. The measure of size is universally shared by all algorithm parameters, though it is interpreted differently for different algorithms. For example, in the case of parameters for the DSA algorithm, "size" corresponds to the size of the prime modulus (in bits). When using this approach, algorithm-specific parameter generation values - if any - default to some standard values, unless they can be derived from the specified size.

  • The other approach initializes a parameter generator object using algorithm-specific semantics, which are represented by a set of algorithm-specific parameter generation values. To generate Diffie-Hellman system parameters, for example, the parameter generation values usually consist of the size of the prime modulus and the size of the random exponent, both specified in number of bits.

In case the client does not explicitly initialize the AlgorithmParameterGenerator (via a call to an init method), each provider must supply (and document) a default initialization. For example, the Sun provider uses a default modulus prime size of 1024 bits for the generation of DSA parameters.

Since:
1.2
See Also:
AlgorithmParameters, AlgorithmParameterSpec

Constructor Summary
protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, String algorithm)
Creates an AlgorithmParameterGenerator object.
Method Summary
AlgorithmParameters | generateParameters() Generates the parameters.
String | getAlgorithm() Returns the standard name of the algorithm this parameter generator is associated with.
static AlgorithmParameterGenerator | getInstance(String algorithm) Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm.
static AlgorithmParameterGenerator | getInstance(String algorithm, String provider) Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
Provider | getProvider() Returns the provider of this algorithm parameter generator object.
void | init(AlgorithmParameterSpec genParamSpec) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | init(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | init(int size) Initializes this parameter generator for a certain size.
void | init(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AlgorithmParameterGenerator

protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi,
                                      Provider provider,
                                      String algorithm)
Creates an AlgorithmParameterGenerator object.
Parameters:
paramGenSpi - the delegate
provider - the provider
algorithm - the algorithm
Method Detail

getAlgorithm

public final String getAlgorithm()
Returns the standard name of the algorithm this parameter generator is associated with.
Returns:
the string name of the algorithm.

getInstance

public static AlgorithmParameterGenerator getInstance(String algorithm)
                                               throws NoSuchAlgorithmException
Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of AlgorithmParameterGenerator containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - the string name of the algorithm this parameter generator is associated with.
Returns:
the new AlgorithmParameterGenerator object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the environment.

getInstance

public static AlgorithmParameterGenerator getInstance(String algorithm,
                                                      String provider)
                                               throws NoSuchAlgorithmException,
                                                      NoSuchProviderException
Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
Parameters:
algorithm - the string name of the algorithm.
provider - the string name of the provider.
Returns:
the new AlgorithmParameterGenerator object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available from the provider.
NoSuchProviderException - if the provider is not available in the environment.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this algorithm parameter generator object.
Returns:
the provider of this algorithm parameter generator object

init

public final void init(int size)
Initializes this parameter generator for a certain size. To create the parameters, the SecureRandom implementation of the highest-priority installed provider is used as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)
Parameters:
size - the size (number of bits).

init

public final void init(int size,
                       SecureRandom random)
Initializes this parameter generator for a certain size and source of randomness.
Parameters:
size - the size (number of bits).
random - the source of randomness.

init

public final void init(AlgorithmParameterSpec genParamSpec)
                throws InvalidAlgorithmParameterException
Initializes this parameter generator with a set of algorithm-specific parameter generation values. To generate the parameters, the SecureRandom implementation of the highest-priority installed provider is used as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)
Parameters:
genParamSpec - the set of algorithm-specific parameter generation values.
Throws:
InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator.

init

public final void init(AlgorithmParameterSpec genParamSpec,
                       SecureRandom random)
                throws InvalidAlgorithmParameterException
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
Parameters:
genParamSpec - the set of algorithm-specific parameter generation values.
random - the source of randomness.
Throws:
InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator.

generateParameters

public final AlgorithmParameters generateParameters()
Generates the parameters.
Returns:
the new AlgorithmParameters object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlgorithmParameterGeneratorSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AlgorithmParameterGeneratorSpi

java.lang.Object
  |
  +--java.security.AlgorithmParameterGeneratorSpi
public abstract class AlgorithmParameterGeneratorSpi
extends Object

This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a parameter generator for a particular algorithm.

In case the client does not explicitly initialize the AlgorithmParameterGenerator (via a call to an engineInit method), each provider must supply (and document) a default initialization. For example, the Sun provider uses a default modulus prime size of 1024 bits for the generation of DSA parameters.

Since:
1.2
See Also:
AlgorithmParameterGenerator, AlgorithmParameters, AlgorithmParameterSpec

Constructor Summary
AlgorithmParameterGeneratorSpi()
Method Summary
protected abstract AlgorithmParameters | engineGenerateParameters() Generates the parameters.
protected abstract void | engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
protected abstract void | engineInit(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AlgorithmParameterGeneratorSpi

public AlgorithmParameterGeneratorSpi()
Method Detail

engineInit

protected abstract void engineInit(int size,
                                   SecureRandom random)
Initializes this parameter generator for a certain size and source of randomness.
Parameters:
size - the size (number of bits).
random - the source of randomness.

engineInit

protected abstract void engineInit(AlgorithmParameterSpec genParamSpec,
                                   SecureRandom random)
                            throws InvalidAlgorithmParameterException
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
Parameters:
genParamSpec - the set of algorithm-specific parameter generation values.
random - the source of randomness.
Throws:
InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator.

engineGenerateParameters

protected abstract AlgorithmParameters engineGenerateParameters()
Generates the parameters.
Returns:
the new AlgorithmParameters object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlgorithmParameters

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AlgorithmParameters

java.lang.Object
  |
  +--java.security.AlgorithmParameters
public class AlgorithmParameters
extends Object

This class is used as an opaque representation of cryptographic parameters.

An AlgorithmParameters object for managing the parameters for a particular algorithm can be obtained by calling one of the getInstance factory methods (static methods that return instances of a given class).

There are two ways to request such an implementation: by specifying either just an algorithm name, or both an algorithm name and a package provider.

  • If just an algorithm name is specified, the system will determine if there is an AlgorithmParameters implementation for the algorithm requested available in the environment, and if there is more than one, if there is a preferred one.
  • If both an algorithm name and a package provider are specified, the system will determine if there is an implementation in the package requested, and throw an exception if there is not.

Once an AlgorithmParameters object is returned, it must be initialized via a call to init, using an appropriate parameter specification or parameter encoding.

A transparent parameter specification is obtained from an AlgorithmParameters object via a call to getParameterSpec, and a byte encoding of the parameters is obtained via a call to getEncoded.

Since:
1.2
See Also:
AlgorithmParameterSpec, DSAParameterSpec, KeyPairGenerator

Constructor Summary
protected AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm)
Creates an AlgorithmParameters object.
Method Summary
String | getAlgorithm() Returns the name of the algorithm associated with this parameter object.
byte[] | getEncoded() Returns the parameters in their primary encoding format.
byte[] | getEncoded(String format) Returns the parameters encoded in the specified scheme.
static AlgorithmParameters | getInstance(String algorithm) Generates a parameter object for the specified algorithm.
static AlgorithmParameters | getInstance(String algorithm, String provider) Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
AlgorithmParameterSpec | getParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameter object.
Provider | getProvider() Returns the provider of this parameter object.
void | init(AlgorithmParameterSpec paramSpec) Initializes this parameter object using the parameters specified in paramSpec.
void | init(byte[] params) Imports the specified parameters and decodes them according to the primary decoding format for parameters.
void | init(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding scheme.
String | toString() Returns a formatted string describing the parameters.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AlgorithmParameters

protected AlgorithmParameters(AlgorithmParametersSpi paramSpi,
                              Provider provider,
                              String algorithm)
Creates an AlgorithmParameters object.
Parameters:
paramSpi - the delegate
provider - the provider
algorithm - the algorithm
Method Detail

getAlgorithm

public final String getAlgorithm()
Returns the name of the algorithm associated with this parameter object.
Returns:
the algorithm name.

getInstance

public static AlgorithmParameters getInstance(String algorithm)
                                       throws NoSuchAlgorithmException
Generates a parameter object for the specified algorithm.

If the default provider package provides an implementation of the requested algorithm, an instance of AlgorithmParameters containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.

The returned parameter object must be initialized via a call to init, using an appropriate parameter specification or parameter encoding.

Parameters:
algorithm - the name of the algorithm requested.
Returns:
the new parameter object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the environment.

getInstance

public static AlgorithmParameters getInstance(String algorithm,
                                              String provider)
                                       throws NoSuchAlgorithmException,
                                              NoSuchProviderException
Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.

The returned parameter object must be initialized via a call to init, using an appropriate parameter specification or parameter encoding.

Parameters:
algorithm - the name of the algorithm requested.
provider - the name of the provider.
Returns:
the new parameter object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the package supplied by the requested provider.
NoSuchProviderException - if the provider is not available in the environment.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this parameter object.
Returns:
the provider of this parameter object

init

public final void init(AlgorithmParameterSpec paramSpec)
                throws InvalidParameterSpecException
Initializes this parameter object using the parameters specified in paramSpec.
Parameters:
paramSpec - the parameter specification.
Throws:
InvalidParameterSpecException - if the given parameter specification is inappropriate for the initialization of this parameter object, or if this parameter object has already been initialized.

init

public final void init(byte[] params)
                throws IOException
Imports the specified parameters and decodes them according to the primary decoding format for parameters. The primary decoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.
Parameters:
params - the encoded parameters.
Throws:
IOException - on decoding errors, or if this parameter object has already been initialized.

init

public final void init(byte[] params,
                       String format)
                throws IOException
Imports the parameters from params and decodes them according to the specified decoding scheme. If format is null, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for these parameters exists.
Parameters:
params - the encoded parameters.
format - the name of the decoding scheme.
Throws:
IOException - on decoding errors, or if this parameter object has already been initialized.

getParameterSpec

public final AlgorithmParameterSpec getParameterSpec(Class paramSpec)
                                              throws InvalidParameterSpecException
Returns a (transparent) specification of this parameter object. paramSpec identifies the specification class in which the parameters should be returned. It could, for example, be DSAParameterSpec.class, to indicate that the parameters should be returned in an instance of the DSAParameterSpec class.
Parameters:
paramSpec - the specification class in which the parameters should be returned.
Returns:
the parameter specification.
Throws:
InvalidParameterSpecException - if the requested parameter specification is inappropriate for this parameter object, or if this parameter object has not been initialized.

getEncoded

public final byte[] getEncoded()
                        throws IOException
Returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.
Returns:
the parameters encoded using their primary encoding format.
Throws:
IOException - on encoding errors, or if this parameter object has not been initialized.

getEncoded

public final byte[] getEncoded(String format)
                        throws IOException
Returns the parameters encoded in the specified scheme. If format is null, the primary encoding format for parameters is used. The primary encoding format is ASN.1, if an ASN.1 specification for these parameters exists.
Parameters:
format - the name of the encoding format.
Returns:
the parameters encoded using the specified encoding scheme.
Throws:
IOException - on encoding errors, or if this parameter object has not been initialized.

toString

public final String toString()
Returns a formatted string describing the parameters.
Overrides:
toString in class Object
Returns:
a formatted string describing the parameters, or null if this parameter object has not been initialized.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlgorithmParametersSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AlgorithmParametersSpi

java.lang.Object
  |
  +--java.security.AlgorithmParametersSpi
public abstract class AlgorithmParametersSpi
extends Object

This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply parameter management for a particular algorithm.

Since:
1.2
See Also:
AlgorithmParameters, AlgorithmParameterSpec, DSAParameterSpec

Constructor Summary
AlgorithmParametersSpi()
Method Summary
protected abstract byte[] | engineGetEncoded() Returns the parameters in their primary encoding format.
protected abstract byte[] | engineGetEncoded(String format) Returns the parameters encoded in the specified format.
protected abstract AlgorithmParameterSpec | engineGetParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameters object.
protected abstract void | engineInit(AlgorithmParameterSpec paramSpec) Initializes this parameters object using the parameters specified in paramSpec.
protected abstract void | engineInit(byte[] params) Imports the specified parameters and decodes them according to the primary decoding format for parameters.
protected abstract void | engineInit(byte[] params, String format) Imports the parameters from params and decodes them according to the specified decoding format.
protected abstract String | engineToString() Returns a formatted string describing the parameters.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AlgorithmParametersSpi

public AlgorithmParametersSpi()
Method Detail

engineInit

protected abstract void engineInit(AlgorithmParameterSpec paramSpec)
                            throws InvalidParameterSpecException
Initializes this parameters object using the parameters specified in paramSpec.
Parameters:
paramSpec - the parameter specification.
Throws:
InvalidParameterSpecException - if the given parameter specification is inappropriate for the initialization of this parameter object.

engineInit

protected abstract void engineInit(byte[] params)
                            throws IOException
Imports the specified parameters and decodes them according to the primary decoding format for parameters. The primary decoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.
Parameters:
params - the encoded parameters.
Throws:
IOException - on decoding errors

engineInit

protected abstract void engineInit(byte[] params,
                                   String format)
                            throws IOException
Imports the parameters from params and decodes them according to the specified decoding format. If format is null, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for these parameters exists.
Parameters:
params - the encoded parameters.
format - the name of the decoding format.
Throws:
IOException - on decoding errors

engineGetParameterSpec

protected abstract AlgorithmParameterSpec engineGetParameterSpec(Class paramSpec)
                                                          throws InvalidParameterSpecException
Returns a (transparent) specification of this parameters object. paramSpec identifies the specification class in which the parameters should be returned. It could, for example, be DSAParameterSpec.class, to indicate that the parameters should be returned in an instance of the DSAParameterSpec class.
Parameters:
paramSpec - the the specification class in which the parameters should be returned.
Returns:
the parameter specification.
Throws:
InvalidParameterSpecException - if the requested parameter specification is inappropriate for this parameter object.

engineGetEncoded

protected abstract byte[] engineGetEncoded()
                                    throws IOException
Returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.
Returns:
the parameters encoded using the specified encoding scheme.
Throws:
IOException - on encoding errors.

engineGetEncoded

protected abstract byte[] engineGetEncoded(String format)
                                    throws IOException
Returns the parameters encoded in the specified format. If format is null, the primary encoding format for parameters is used. The primary encoding format is ASN.1, if an ASN.1 specification for these parameters exists.
Parameters:
format - the name of the encoding format.
Returns:
the parameters encoded using the specified encoding scheme.
Throws:
IOException - on encoding errors.

engineToString

protected abstract String engineToString()
Returns a formatted string describing the parameters.
Returns:
a formatted string describing the parameters.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AllPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class AllPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.AllPermission
All Implemented Interfaces:
Guard, Serializable
public final class AllPermission
extends Permission

The AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions. Thus, it grants code the ability to run with security disabled. Extreme caution should be taken before granting such a permission to code. This permission should be used only during testing, or in extremely rare cases where an application or applet is completely trusted and adding the necessary permissions to the policy is prohibitively cumbersome.

See Also:
Permission, AccessController, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
AllPermission()
Creates a new AllPermission object.
AllPermission(String name, String actions)
Creates a new AllPermission object.
Method Summary
boolean | equals(Object obj) Checks two AllPermission objects for equality.
String | getActions() Returns the canonical string representation of the actions.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) Checks if the specified permission is "implied" by this object.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing AllPermission objects.
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AllPermission

public AllPermission()
Creates a new AllPermission object.

AllPermission

public AllPermission(String name,
                     String actions)
Creates a new AllPermission object. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - ignored
actions - ignored.
Method Detail

implies

public boolean implies(Permission p)
Checks if the specified permission is "implied" by this object. This method always returns true.
Overrides:
implies in class Permission
Parameters:
p - the permission to check against.
Returns:
return

equals

public boolean equals(Object obj)
Checks two AllPermission objects for equality. Two AllPermission objects are always equal.
Overrides:
equals in class Permission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is an AllPermission, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Permission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the canonical string representation of the actions.
Overrides:
getActions in class Permission
Returns:
the actions.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing AllPermission objects.

Overrides:
newPermissionCollection in class Permission
Returns:
a new PermissionCollection object suitable for storing AllPermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class BasicPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
All Implemented Interfaces:
Guard, Serializable
Direct Known Subclasses:
AudioPermission, AWTPermission, NetPermission, PropertyPermission, ReflectPermission, RuntimePermission, SecurityPermission, SerializablePermission, SQLPermission
public abstract class BasicPermission
extends Permission
implements Serializable

The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.

The name for a BasicPermission is the name of the given permission (for example, "exit", "setFactory", "print.queueJob", etc). The naming convention follows the hierarchical property naming convention. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The action string (inherited from Permission) is unused. Thus, BasicPermission is commonly used as the base class for "named" permissions (ones that contain a name but no actions list; you either have the named permission or you don't.) Subclasses may implement actions on top of BasicPermission, if desired.

See Also:
Permission, Permissions, PermissionCollection, RuntimePermission, SecurityPermission, PropertyPermission, AWTPermission, NetPermission, SecurityManager, Serialized Form

Constructor Summary
BasicPermission(String name)
Creates a new BasicPermission with the specified name.
BasicPermission(String name, String actions)
Creates a new BasicPermission object with the specified name.
Method Summary
boolean | equals(Object obj) Checks two BasicPermission objects for equality.
String | getActions() Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a BasicPermission.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) Checks if the specified permission is "implied" by this object.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing BasicPermission objects.
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BasicPermission

public BasicPermission(String name)
Creates a new BasicPermission with the specified name. Name is the symbolic name of the permission, such as "setFactory", "print.queueJob", or "topLevelWindow", etc. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match.
Parameters:
name - the name of the BasicPermission.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if name is empty.

BasicPermission

public BasicPermission(String name,
                       String actions)
Creates a new BasicPermission object with the specified name. The name is the symbolic name of the BasicPermission, and the actions String is currently unused. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the BasicPermission.
actions - ignored.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if name is empty.
Method Detail

implies

public boolean implies(Permission p)
Checks if the specified permission is "implied" by this object.

More specifically, this method returns true if:

  • p's class is the same as this object's class, and

  • p's name equals or (in the case of wildcards) is implied by this object's name. For example, "a.b.*" implies "a.b.c".
Overrides:
implies in class Permission
Parameters:
p - the permission to check against.
Returns:
true if the passed permission is equal to or implied by this permission, false otherwise.

equals

public boolean equals(Object obj)
Checks two BasicPermission objects for equality. Checks that obj's class is the same as this object's class and has the same name as this object.

Overrides:
equals in class Permission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a BasicPermission, and has the same name as this BasicPermission object, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this object. The hash code used is the hash code of the name, that is, getName().hashCode(), where getName is from the Permission superclass.
Overrides:
hashCode in class Permission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a BasicPermission.
Overrides:
getActions in class Permission
Returns:
the empty string "".

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing BasicPermission objects.

A BasicPermissionCollection stores a collection of BasicPermission permissions.

BasicPermission objects must be stored in a manner that allows them to be inserted in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.

Overrides:
newPermissionCollection in class Permission
Returns:
a new PermissionCollection object suitable for storing BasicPermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.security.cert Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.security.cert

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.security.cert.Certificate (implements java.io.Serializable)
      • class java.security.cert.X509Certificate (implements java.security.cert.X509Extension)
    • class java.security.cert.Certificate.CertificateRep (implements java.io.Serializable)
    • class java.security.cert.CertificateFactory
    • class java.security.cert.CertificateFactorySpi
    • class java.security.cert.CRL
      • class java.security.cert.X509CRL (implements java.security.cert.X509Extension)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.security.GeneralSecurityException
          • class java.security.cert.CertificateException
            • class java.security.cert.CertificateEncodingException
            • class java.security.cert.CertificateExpiredException
            • class java.security.cert.CertificateNotYetValidException
            • class java.security.cert.CertificateParsingException
          • class java.security.cert.CRLException
    • class java.security.cert.X509CRLEntry (implements java.security.cert.X509Extension)

Interface Hierarchy

  • interface java.security.cert.X509Extension
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.security.cert

Provides classes and interfaces for parsing and managing certificates.

See:
Description

Interface Summary
X509Extension Interface for an X.509 extension.

Class Summary
Certificate | Abstract class for managing a variety of identity certificates.
Certificate.CertificateRep | Alternate Certificate class for serialization.
CertificateFactory | This class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.
CertificateFactorySpi | This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
CRL | This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
X509Certificate | Abstract class for X.509 certificates.
X509CRL | Abstract class for an X.509 Certificate Revocation List (CRL).
X509CRLEntry | Abstract class for a revoked certificate in a CRL (Certificate Revocation List).

Exception Summary
CertificateEncodingException | Certificate Encoding Exception.
CertificateException | This exception indicates one of a variety of certificate problems.
CertificateExpiredException | Certificate Expired Exception.
CertificateNotYetValidException | Certificate is not yet valid exception.
CertificateParsingException | Certificate Parsing Exception.
CRLException | CRL (Certificate Revocation List) Exception

Package java.security.cert Description

Provides classes and interfaces for parsing and managing certificates. It contains support for X.509 v3 certificates.

Package Specification

  • RFC 2459: X.509 Certificate and CRL Profile

Related Documentation

For information about X.509 certificates, please see:
  • http://www.ietf.org/rfc/rfc2459.txt
  • Why should I care about X.509 certificates?

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.security.cert

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.security.cert

Packages that use java.security.cert
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Classes in java.security.cert used by java.net
Certificate
Abstract class for managing a variety of identity certificates.

Classes in java.security.cert used by java.security
Certificate
Abstract class for managing a variety of identity certificates.
CertificateException
This exception indicates one of a variety of certificate problems.

Classes in java.security.cert used by java.security.cert
Certificate
Abstract class for managing a variety of identity certificates.
CertificateEncodingException
Certificate Encoding Exception.
CertificateException
This exception indicates one of a variety of certificate problems.
CertificateExpiredException
Certificate Expired Exception.
CertificateFactory
This class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.
CertificateFactorySpi
This class defines the Service Provider Interface (SPI) for the CertificateFactory class.
CertificateNotYetValidException
Certificate is not yet valid exception.
CRL
This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses.
CRLException
CRL (Certificate Revocation List) Exception
X509CRLEntry
Abstract class for a revoked certificate in a CRL (Certificate Revocation List).
X509Extension
Interface for an X.509 extension.

Classes in java.security.cert used by java.util.jar
Certificate
Abstract class for managing a variety of identity certificates.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Certificate

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class Certificate

java.lang.Object
  |
  +--java.security.cert.Certificate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
X509Certificate
public abstract class Certificate
extends Object
implements Serializable

Abstract class for managing a variety of identity certificates. An identity certificate is a binding of a principal to a public key which is vouched for by another principal. (A principal represents an entity such as an individual user, a group, or a corporation.)

This class is an abstraction for certificates that have different formats but important common uses. For example, different types of certificates, such as X.509 and PGP, share general certificate functionality (like encoding and verifying) and some types of information (like a public key).

X.509, PGP, and SDSI certificates can all be implemented by subclassing the Certificate class, even though they contain different sets of information, and they store and retrieve the information in different ways.

See Also:
X509Certificate, CertificateFactory, Serialized Form

Inner Class Summary
protected static class Certificate.CertificateRep
Alternate Certificate class for serialization.
Constructor Summary
protected Certificate(String type)
Creates a certificate of the specified type.
Method Summary
boolean | equals(Object other) Compares this certificate for equality with the specified object.
abstract byte[] | getEncoded() Returns the encoded form of this certificate.
abstract PublicKey | getPublicKey() Gets the public key from this certificate.
String | getType() Returns the type of this certificate.
int | hashCode() Returns a hashcode value for this certificate from its encoded form.
abstract String | toString() Returns a string representation of this certificate.
abstract void | verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
protected Object | writeReplace() Replace the Certificate to be serialized.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Certificate

protected Certificate(String type)
Creates a certificate of the specified type.
Parameters:
type - the standard name of the certificate type. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard certificate types.
Method Detail

getType

public final String getType()
Returns the type of this certificate.
Returns:
the type of this certificate.

equals

public boolean equals(Object other)
Compares this certificate for equality with the specified object. If the other object is an instanceof Certificate, then its encoded form is retrieved and compared with the encoded form of this certificate.
Overrides:
equals in class Object
Parameters:
other - the object to test for equality with this certificate.
Returns:
true iff the encoded forms of the two certificates match, false otherwise.

hashCode

public int hashCode()
Returns a hashcode value for this certificate from its encoded form.
Overrides:
hashCode in class Object
Returns:
the hashcode value.

getEncoded

public abstract byte[] getEncoded()
                           throws CertificateEncodingException
Returns the encoded form of this certificate. It is assumed that each certificate type would have only a single form of encoding; for example, X.509 certificates would be encoded as ASN.1 DER.
Returns:
the encoded form of this certificate
Throws:
CertificateEncodingException - if an encoding error occurs.

verify

public abstract void verify(PublicKey key)
                     throws CertificateException,
                            NoSuchAlgorithmException,
                            InvalidKeyException,
                            NoSuchProviderException,
                            SignatureException
Verifies that this certificate was signed using the private key that corresponds to the specified public key.
Parameters:
key - the PublicKey used to carry out the verification.
Throws:
NoSuchAlgorithmException - on unsupported signature algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - if there's no default provider.
SignatureException - on signature errors.
CertificateException - on encoding errors.

verify

public abstract void verify(PublicKey key,
                            String sigProvider)
                     throws CertificateException,
                            NoSuchAlgorithmException,
                            InvalidKeyException,
                            NoSuchProviderException,
                            SignatureException
Verifies that this certificate was signed using the private key that corresponds to the specified public key. This method uses the signature verification engine supplied by the specified provider.
Parameters:
key - the PublicKey used to carry out the verification.
sigProvider - the name of the signature provider.
Throws:
NoSuchAlgorithmException - on unsupported signature algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - on incorrect provider.
SignatureException - on signature errors.
CertificateException - on encoding errors.

toString

public abstract String toString()
Returns a string representation of this certificate.
Overrides:
toString in class Object
Returns:
a string representation of this certificate.

getPublicKey

public abstract PublicKey getPublicKey()
Gets the public key from this certificate.
Returns:
the public key.

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
Replace the Certificate to be serialized.
Returns:
the alternate Certificate object to be serialized.
Throws:
ObjectStreamException - if a new object representing this certificate could not be created
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CertificateEncodingException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateEncodingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CertificateException
                          |
                          +--java.security.cert.CertificateEncodingException
All Implemented Interfaces:
Serializable
public class CertificateEncodingException
extends CertificateException

Certificate Encoding Exception. This is thrown whenever an error occurs while attempting to encode a certificate.

See Also:
Serialized Form

Constructor Summary
CertificateEncodingException()
Constructs a CertificateEncodingException with no detail message.
CertificateEncodingException(String message)
Constructs a CertificateEncodingException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CertificateEncodingException

public CertificateEncodingException()
Constructs a CertificateEncodingException with no detail message. A detail message is a String that describes this particular exception.

CertificateEncodingException

public CertificateEncodingException(String message)
Constructs a CertificateEncodingException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
message - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CertificateException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CertificateException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CertificateEncodingException, CertificateExpiredException, CertificateNotYetValidException, CertificateParsingException
public class CertificateException
extends GeneralSecurityException

This exception indicates one of a variety of certificate problems.

See Also:
Certificate, Serialized Form

Constructor Summary
CertificateException()
CertificateException(String msg)
Constructs a certificate exception with the given detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CertificateException

public CertificateException()

CertificateException

public CertificateException(String msg)
Constructs a certificate exception with the given detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateExpiredException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateExpiredException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CertificateException
                          |
                          +--java.security.cert.CertificateExpiredException
All Implemented Interfaces:
Serializable
public class CertificateExpiredException
extends CertificateException

Certificate Expired Exception. This is thrown whenever the current Date or the specified Date is after the notAfter date/time specified in the validity period of the certificate.

See Also:
Serialized Form

Constructor Summary
CertificateExpiredException()
Constructs a CertificateExpiredException with no detail message.
CertificateExpiredException(String message)
Constructs a CertificateExpiredException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CertificateExpiredException

public CertificateExpiredException()
Constructs a CertificateExpiredException with no detail message. A detail message is a String that describes this particular exception.

CertificateExpiredException

public CertificateExpiredException(String message)
Constructs a CertificateExpiredException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
message - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateFactory

java.lang.Object
  |
  +--java.security.cert.CertificateFactory
public class CertificateFactory
extends Object

This class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.

A certificate factory for X.509 must return certificates that are an instance of java.security.cert.X509Certificate, and CRLs that are an instance of java.security.cert.X509CRL.

The following example reads a file with Base64 encoded certificates, which are each bounded at the beginning by -----BEGIN CERTIFICATE-----, and bounded at the end by -----END CERTIFICATE-----. We convert the FileInputStream (which does not support mark and reset) to a ByteArrayInputStream (which supports those methods), so that each call to generateCertificate consumes only one certificate, and the read position of the input stream is positioned to the next certificate in the file:

 FileInputStream fis = new FileInputStream(filename);
 DataInputStream dis = new DataInputStream(fis);

 CertificateFactory cf = CertificateFactory.getInstance("X.509");

 byte[] bytes = new byte[dis.available()];
 dis.readFully(bytes);
 ByteArrayInputStream bais = new ByteArrayInputStream(bytes);

 while (bais.available() > 0) {
    Certificate cert = cf.generateCertificate(bais);
    System.out.println(cert.toString());
 }

The following example parses a PKCS#7-formatted certificate reply stored in a file and extracts all the certificates from it:

 FileInputStream fis = new FileInputStream(filename);
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 Collection c = cf.generateCertificates(fis);
 Iterator i = c.iterator();
 while (i.hasNext()) {
    Certificate cert = (Certificate)i.next();
    System.out.println(cert);
 }

Since:
1.2
See Also:
Certificate, X509Certificate, CRL, X509CRL

Constructor Summary
protected CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Method Summary
Certificate | generateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
Collection | generateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
CRL | generateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
Collection | generateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
static CertificateFactory | getInstance(String type) Generates a certificate factory object that implements the specified certificate type.
static CertificateFactory | getInstance(String type, String provider) Generates a certificate factory object for the specified certificate type from the specified provider.
Provider | getProvider() Returns the provider of this certificate factory.
String | getType() Returns the name of the certificate type associated with this certificate factory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CertificateFactory

protected CertificateFactory(CertificateFactorySpi certFacSpi,
                             Provider provider,
                             String type)
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Parameters:
certFacSpi - the provider implementation.
provider - the provider.
type - the certificate type.
Method Detail

getInstance

public static final CertificateFactory getInstance(String type)
                                            throws CertificateException
Generates a certificate factory object that implements the specified certificate type. If the default provider package provides an implementation of the requested certificate type, an instance of certificate factory containing that implementation is returned. If the type is not available in the default package, other packages are searched.
Parameters:
type - the name of the requested certificate type. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard certificate types.
Returns:
a certificate factory object for the specified type.
Throws:
CertificateException - if the requested certificate type is not available in the default provider package or any of the other provider packages that were searched.

getInstance

public static final CertificateFactory getInstance(String type,
                                                   String provider)
                                            throws CertificateException,
                                                   NoSuchProviderException
Generates a certificate factory object for the specified certificate type from the specified provider.
Parameters:
type - the certificate type
provider - the name of the provider.
Returns:
a certificate factory object for the specified type.
Throws:
CertificateException - if the certificate type is not available from the specified provider.
NoSuchProviderException - if the provider has not been configured.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this certificate factory.
Returns:
the provider of this certificate factory.

getType

public final String getType()
Returns the name of the certificate type associated with this certificate factory.
Returns:
the name of the certificate type associated with this certificate factory.

generateCertificate

public final Certificate generateCertificate(InputStream inStream)
                                      throws CertificateException
Generates a certificate object and initializes it with the data read from the input stream inStream.

The given input stream inStream must contain a single certificate.

In order to take advantage of the specialized certificate format supported by this certificate factory, the returned certificate object can be typecast to the corresponding certificate class. For example, if this certificate factory implements X.509 certificates, the returned certificate object can be typecast to the X509Certificate class.

In the case of a certificate factory for X.509 certificates, the certificate provided in inStream must be DER-encoded and may be supplied in binary or printable (Base64) encoding. If the certificate is provided in Base64 encoding, it must be bounded at the beginning by -----BEGIN CERTIFICATE-----, and must be bounded at the end by -----END CERTIFICATE-----.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - an input stream with the certificate data.
Returns:
a certificate object initialized with the data from the input stream.
Throws:
CertificateException - on parsing errors.

generateCertificates

public final Collection generateCertificates(InputStream inStream)
                                      throws CertificateException
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.

In order to take advantage of the specialized certificate format supported by this certificate factory, each element in the returned collection view can be typecast to the corresponding certificate class. For example, if this certificate factory implements X.509 certificates, the elements in the returned collection can be typecast to the X509Certificate class.

In the case of a certificate factory for X.509 certificates, inStream may contain a sequence of DER-encoded certificates in the formats described for generateCertificate. In addition, inStream may contain a PKCS#7 certificate chain. This is a PKCS#7 SignedData object, with the only significant field being certificates. In particular, the signature and the contents are ignored. This format allows multiple certificates to be downloaded at once. If no certificates are present, an empty collection is returned.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - the input stream with the certificates.
Returns:
a (possibly empty) collection view of java.security.cert.Certificate objects initialized with the data from the input stream.
Throws:
CertificateException - on parsing errors.

generateCRL

public final CRL generateCRL(InputStream inStream)
                      throws CRLException
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.

In order to take advantage of the specialized CRL format supported by this certificate factory, the returned CRL object can be typecast to the corresponding CRL class. For example, if this certificate factory implements X.509 CRLs, the returned CRL object can be typecast to the X509CRL class.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - an input stream with the CRL data.
Returns:
a CRL object initialized with the data from the input stream.
Throws:
CRLException - on parsing errors.

generateCRLs

public final Collection generateCRLs(InputStream inStream)
                              throws CRLException
Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.

In order to take advantage of the specialized CRL format supported by this certificate factory, each element in the returned collection view can be typecast to the corresponding CRL class. For example, if this certificate factory implements X.509 CRLs, the elements in the returned collection can be typecast to the X509CRL class.

In the case of a certificate factory for X.509 CRLs, inStream may contain a sequence of DER-encoded CRLs. In addition, inStream may contain a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the only significant field being crls. In particular, the signature and the contents are ignored. This format allows multiple CRLs to be downloaded at once. If no CRLs are present, an empty collection is returned.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - the input stream with the CRLs.
Returns:
a (possibly empty) collection view of java.security.cert.CRL objects initialized with the data from the input stream.
Throws:
CRLException - on parsing errors.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateFactorySpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateFactorySpi

java.lang.Object
  |
  +--java.security.cert.CertificateFactorySpi
public abstract class CertificateFactorySpi
extends Object

This class defines the Service Provider Interface (SPI) for the CertificateFactory class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a certificate factory for a particular certificate type, e.g., X.509.

Certificate factories are used to generate certificate and certificate revocation list (CRL) objects from their encoding.

A certificate factory for X.509 must return certificates that are an instance of java.security.cert.X509Certificate, and CRLs that are an instance of java.security.cert.X509CRL.

Since:
1.2
See Also:
CertificateFactory, Certificate, X509Certificate, CRL, X509CRL

Constructor Summary
CertificateFactorySpi()
Method Summary
abstract Certificate | engineGenerateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
abstract Collection | engineGenerateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
abstract CRL | engineGenerateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
abstract Collection | engineGenerateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CertificateFactorySpi

public CertificateFactorySpi()
Method Detail

engineGenerateCertificate

public abstract Certificate engineGenerateCertificate(InputStream inStream)
                                               throws CertificateException
Generates a certificate object and initializes it with the data read from the input stream inStream.

The given input stream inStream must contain a single certificate.

In order to take advantage of the specialized certificate format supported by this certificate factory, the returned certificate object can be typecast to the corresponding certificate class. For example, if this certificate factory implements X.509 certificates, the returned certificate object can be typecast to the X509Certificate class.

In the case of a certificate factory for X.509 certificates, the certificate provided in inStream must be DER-encoded and may be supplied in binary or printable (Base64) encoding. If the certificate is provided in Base64 encoding, it must be bounded at the beginning by -----BEGIN CERTIFICATE-----, and must be bounded at the end by -----END CERTIFICATE-----.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - an input stream with the certificate data.
Returns:
a certificate object initialized with the data from the input stream.
Throws:
CertificateException - on parsing errors.

engineGenerateCertificates

public abstract Collection engineGenerateCertificates(InputStream inStream)
                                               throws CertificateException
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.

In order to take advantage of the specialized certificate format supported by this certificate factory, each element in the returned collection view can be typecast to the corresponding certificate class. For example, if this certificate factory implements X.509 certificates, the elements in the returned collection can be typecast to the X509Certificate class.

In the case of a certificate factory for X.509 certificates, inStream may contain a single DER-encoded certificate in the formats described for generateCertificate. In addition, inStream may contain a PKCS#7 certificate chain. This is a PKCS#7 SignedData object, with the only significant field being certificates. In particular, the signature and the contents are ignored. This format allows multiple certificates to be downloaded at once. If no certificates are present, an empty collection is returned.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - the input stream with the certificates.
Returns:
a (possibly empty) collection view of java.security.cert.Certificate objects initialized with the data from the input stream.
Throws:
CertificateException - on parsing errors.

engineGenerateCRL

public abstract CRL engineGenerateCRL(InputStream inStream)
                               throws CRLException
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.

In order to take advantage of the specialized CRL format supported by this certificate factory, the returned CRL object can be typecast to the corresponding CRL class. For example, if this certificate factory implements X.509 CRLs, the returned CRL object can be typecast to the X509CRL class.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - an input stream with the CRL data.
Returns:
a CRL object initialized with the data from the input stream.
Throws:
CRLException - on parsing errors.

engineGenerateCRLs

public abstract Collection engineGenerateCRLs(InputStream inStream)
                                       throws CRLException
Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.

In order to take advantage of the specialized CRL format supported by this certificate factory, each element in the returned collection view can be typecast to the corresponding CRL class. For example, if this certificate factory implements X.509 CRLs, the elements in the returned collection can be typecast to the X509CRL class.

In the case of a certificate factory for X.509 CRLs, inStream may contain a single DER-encoded CRL. In addition, inStream may contain a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the only significant field being crls. In particular, the signature and the contents are ignored. This format allows multiple CRLs to be downloaded at once. If no CRLs are present, an empty collection is returned.

Note that if the given input stream does not support mark and reset, this method will consume the entire input stream.

Parameters:
inStream - the input stream with the CRLs.
Returns:
a (possibly empty) collection view of java.security.cert.CRL objects initialized with the data from the input stream.
Throws:
CRLException - on parsing errors.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateNotYetValidException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateNotYetValidException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CertificateException
                          |
                          +--java.security.cert.CertificateNotYetValidException
All Implemented Interfaces:
Serializable
public class CertificateNotYetValidException
extends CertificateException

Certificate is not yet valid exception. This is thrown whenever the current Date or the specified Date is before the notBefore date/time in the Certificate validity period.

See Also:
Serialized Form

Constructor Summary
CertificateNotYetValidException()
Constructs a CertificateNotYetValidException with no detail message.
CertificateNotYetValidException(String message)
Constructs a CertificateNotYetValidException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CertificateNotYetValidException

public CertificateNotYetValidException()
Constructs a CertificateNotYetValidException with no detail message. A detail message is a String that describes this particular exception.

CertificateNotYetValidException

public CertificateNotYetValidException(String message)
Constructs a CertificateNotYetValidException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
message - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateParsingException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CertificateParsingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CertificateException
                          |
                          +--java.security.cert.CertificateParsingException
All Implemented Interfaces:
Serializable
public class CertificateParsingException
extends CertificateException

Certificate Parsing Exception. This is thrown whenever an invalid DER-encoded certificate is parsed or unsupported DER features are found in the Certificate.

See Also:
Serialized Form

Constructor Summary
CertificateParsingException()
Constructs a CertificateParsingException with no detail message.
CertificateParsingException(String message)
Constructs a CertificateParsingException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CertificateParsingException

public CertificateParsingException()
Constructs a CertificateParsingException with no detail message. A detail message is a String that describes this particular exception.

CertificateParsingException

public CertificateParsingException(String message)
Constructs a CertificateParsingException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
message - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CertificateRep

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class Certificate.CertificateRep

java.lang.Object
  |
  +--java.security.cert.Certificate.CertificateRep
All Implemented Interfaces:
Serializable
Enclosing class:
Certificate
protected static class Certificate.CertificateRep
extends Object
implements Serializable

Alternate Certificate class for serialization.

See Also:
Serialized Form

Constructor Summary
protected Certificate.CertificateRep(String type, byte[] data)
Construct the alternate Certificate class with the Certificate type and Certificate encoding bytes.
Method Summary
protected  Object readResolve()
Resolve the Certificate Object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Certificate.CertificateRep

protected Certificate.CertificateRep(String type,
                                     byte[] data)
Construct the alternate Certificate class with the Certificate type and Certificate encoding bytes.

Parameters:
type - the standard name of the Certificate type.

data - the Certificate data.
Method Detail

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Resolve the Certificate Object.

Returns:
the resolved Certificate Object.
Throws:
ObjectStreamException - if the Certificate could not be resolved.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.security.cert.Certificate.CertificateRep

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.Certificate.CertificateRep

No usage of java.security.cert.Certificate.CertificateRep

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateParsingException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateParsingException

No usage of java.security.cert.CertificateParsingException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.X509Certificate

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.X509Certificate

No usage of java.security.cert.X509Certificate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.X509CRL

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.X509CRL

No usage of java.security.cert.X509CRL

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.Certificate

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.Certificate

Packages that use Certificate
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Certificate in java.net

Methods in java.net that return Certificate
 Certificate[] JarURLConnection.getCertificates()
Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.

Uses of Certificate in java.security

Methods in java.security that return Certificate
Certificate[] | CodeSource.getCertificates() Returns the certificates associated with this CodeSource.
Certificate[] | KeyStore.getCertificateChain(String alias) Returns the certificate chain associated with the given alias.
Certificate | KeyStore.getCertificate(String alias) Returns the certificate associated with the given alias.
abstract Certificate[] | KeyStoreSpi.engineGetCertificateChain(String alias) Returns the certificate chain associated with the given alias.
abstract Certificate | KeyStoreSpi.engineGetCertificate(String alias) Returns the certificate associated with the given alias.

Methods in java.security with parameters of type Certificate
void | KeyStore.setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
void | KeyStore.setKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
void | KeyStore.setCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
String | KeyStore.getCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
abstract void | KeyStoreSpi.engineSetCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
abstract String | KeyStoreSpi.engineGetCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
void | Signature.initVerify(Certificate certificate) Initializes this object for verification, using the public key from the given certificate.

Constructors in java.security with parameters of type Certificate
CodeSource(URL url, Certificate[] certs)
Constructs a CodeSource and associates it with the specified location and set of certificates.
UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Creates a new UnresolvedPermission containing the permission information needed later to actually create a Permission of the specified class, when the permission is resolved.

Uses of Certificate in java.security.cert

Subclasses of Certificate in java.security.cert
 class X509Certificate
Abstract class for X.509 certificates.

Methods in java.security.cert that return Certificate
Certificate | CertificateFactory.generateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
abstract Certificate | CertificateFactorySpi.engineGenerateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.

Methods in java.security.cert with parameters of type Certificate
abstract  boolean CRL.isRevoked(Certificate cert)
Checks whether the given certificate is on this CRL.

Uses of Certificate in java.util.jar

Methods in java.util.jar that return Certificate
 Certificate[] JarEntry.getCertificates()
Returns the Certificate objects for this entry, or null if none.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateEncodingException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateEncodingException

Packages that use CertificateEncodingException
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateEncodingException in java.security.cert

Methods in java.security.cert that throw CertificateEncodingException
abstract byte[] | Certificate.getEncoded() Returns the encoded form of this certificate.
abstract byte[] | X509Certificate.getTBSCertificate() Gets the DER-encoded certificate information, the tbsCertificate from this certificate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateException

Packages that use CertificateException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateException in java.security

Methods in java.security that throw CertificateException
void | KeyStore.store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
void | KeyStore.load(InputStream stream, char[] password) Loads this KeyStore from the given input stream.
abstract void | KeyStoreSpi.engineStore(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
abstract void | KeyStoreSpi.engineLoad(InputStream stream, char[] password) Loads the keystore from the given input stream.

Uses of CertificateException in java.security.cert

Subclasses of CertificateException in java.security.cert
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.

Methods in java.security.cert that throw CertificateException
static CertificateFactory | CertificateFactory.getInstance(String type) Generates a certificate factory object that implements the specified certificate type.
static CertificateFactory | CertificateFactory.getInstance(String type, String provider) Generates a certificate factory object for the specified certificate type from the specified provider.
Certificate | CertificateFactory.generateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
Collection | CertificateFactory.generateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
abstract Certificate | CertificateFactorySpi.engineGenerateCertificate(InputStream inStream) Generates a certificate object and initializes it with the data read from the input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateExpiredException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateExpiredException

Packages that use CertificateExpiredException
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateExpiredException in java.security.cert

Methods in java.security.cert that throw CertificateExpiredException
abstract void | X509Certificate.checkValidity() Checks that the certificate is currently valid.
abstract void | X509Certificate.checkValidity(Date date) Checks that the given date is within the certificate's validity period.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateFactory

Packages that use CertificateFactory
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateFactory in java.security.cert

Methods in java.security.cert that return CertificateFactory
static CertificateFactory | CertificateFactory.getInstance(String type) Generates a certificate factory object that implements the specified certificate type.
static CertificateFactory | CertificateFactory.getInstance(String type, String provider) Generates a certificate factory object for the specified certificate type from the specified provider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateFactorySpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateFactorySpi

Packages that use CertificateFactorySpi
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateFactorySpi in java.security.cert

Constructors in java.security.cert with parameters of type CertificateFactorySpi
CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CertificateNotYetValidException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CertificateNotYetValidException

Packages that use CertificateNotYetValidException
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CertificateNotYetValidException in java.security.cert

Methods in java.security.cert that throw CertificateNotYetValidException
abstract void | X509Certificate.checkValidity() Checks that the certificate is currently valid.
abstract void | X509Certificate.checkValidity(Date date) Checks that the given date is within the certificate's validity period.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CRL

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CRL

Packages that use CRL
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CRL in java.security.cert

Subclasses of CRL in java.security.cert
 class X509CRL
Abstract class for an X.509 Certificate Revocation List (CRL).

Methods in java.security.cert that return CRL
CRL | CertificateFactory.generateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
abstract CRL | CertificateFactorySpi.engineGenerateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.CRLException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.CRLException

Packages that use CRLException
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of CRLException in java.security.cert

Methods in java.security.cert that throw CRLException
CRL | CertificateFactory.generateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
Collection | CertificateFactory.generateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
abstract CRL | CertificateFactorySpi.engineGenerateCRL(InputStream inStream) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
abstract byte[] | X509CRLEntry.getEncoded() Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE.
abstract byte[] | X509CRL.getEncoded() Returns the ASN.1 DER-encoded form of this CRL.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract byte[] | X509CRL.getTBSCertList() Gets the DER-encoded CRL information, the tbsCertList from this CRL.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.cert.X509CRLEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.cert.X509CRLEntry

Packages that use X509CRLEntry
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of X509CRLEntry in java.security.cert

Methods in java.security.cert that return X509CRLEntry
abstract  X509CRLEntry X509CRL.getRevokedCertificate(BigInteger serialNumber)
Gets the CRL entry, if any, with the given certificate serialNumber.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.cert.X509Extension

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.cert.X509Extension

Packages that use X509Extension
java.security.cert Provides classes and interfaces for parsing and managing certificates.

Uses of X509Extension in java.security.cert

Classes in java.security.cert that implement X509Extension
class | X509Certificate Abstract class for X.509 certificates.
class | X509CRL Abstract class for an X.509 Certificate Revocation List (CRL).
class | X509CRLEntry Abstract class for a revoked certificate in a CRL (Certificate Revocation List).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CRL

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CRL

java.lang.Object
  |
  +--java.security.cert.CRL
Direct Known Subclasses:
X509CRL
public abstract class CRL
extends Object

This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses. For example, all CRLs share the functionality of listing revoked certificates, and can be queried on whether or not they list a given certificate.

Specialized CRL types can be defined by subclassing off of this abstract class.

Since:
1.2
See Also:
X509CRL, CertificateFactory

Constructor Summary
protected CRL(String type)
Creates a CRL of the specified type.
Method Summary
String | getType() Returns the type of this CRL.
abstract boolean | isRevoked(Certificate cert) Checks whether the given certificate is on this CRL.
abstract String | toString() Returns a string representation of this CRL.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CRL

protected CRL(String type)
Creates a CRL of the specified type.
Parameters:
type - the standard name of the CRL type. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard CRL types.
Method Detail

getType

public final String getType()
Returns the type of this CRL.
Returns:
the type of this CRL.

toString

public abstract String toString()
Returns a string representation of this CRL.
Overrides:
toString in class Object
Returns:
a string representation of this CRL.

isRevoked

public abstract boolean isRevoked(Certificate cert)
Checks whether the given certificate is on this CRL.
Parameters:
cert - the certificate to check for.
Returns:
true if the given certificate is on this CRL, false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CRLException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class CRLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.cert.CRLException
All Implemented Interfaces:
Serializable
public class CRLException
extends GeneralSecurityException

CRL (Certificate Revocation List) Exception

See Also:
Serialized Form

Constructor Summary
CRLException()
Constructs a CRLException with no detail message.
CRLException(String message)
Constructs a CRLException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CRLException

public CRLException()
Constructs a CRLException with no detail message. A detail message is a String that describes this particular exception.

CRLException

public CRLException(String message)
Constructs a CRLException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
message - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


X509Certificate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class X509Certificate

java.lang.Object
  |
  +--java.security.cert.Certificate
        |
        +--java.security.cert.X509Certificate
All Implemented Interfaces:
Serializable, X509Extension
public abstract class X509Certificate
extends Certificate
implements X509Extension

Abstract class for X.509 certificates. This provides a standard way to access all the attributes of an X.509 certificate.

In June of 1996, the basic X.509 v3 format was completed by ISO/IEC and ANSI X9, which is described below in ASN.1:

 Certificate  ::=  SEQUENCE  {
     tbsCertificate       TBSCertificate,
     signatureAlgorithm   AlgorithmIdentifier,
     signature            BIT STRING  }

These certificates are widely used to support authentication and other functionality in Internet security systems. Common applications include Privacy Enhanced Mail (PEM), Transport Layer Security (SSL), code signing for trusted software distribution, and Secure Electronic Transactions (SET).

These certificates are managed and vouched for by Certificate Authorities (CAs). CAs are services which create certificates by placing data in the X.509 standard format and then digitally signing that data. CAs act as trusted third parties, making introductions between principals who have no direct knowledge of each other. CA certificates are either signed by themselves, or by some other CA such as a "root" CA.

More information can be found in RFC 2459, "Internet X.509 Public Key Infrastructure Certificate and CRL Profile" at http://www.ietf.org/rfc/rfc2459.txt .

The ASN.1 definition of tbsCertificate is:

 TBSCertificate  ::=  SEQUENCE  {
     version         [0]  EXPLICIT Version DEFAULT v1,
     serialNumber         CertificateSerialNumber,
     signature            AlgorithmIdentifier,
     issuer               Name,
     validity             Validity,
     subject              Name,
     subjectPublicKeyInfo SubjectPublicKeyInfo,
     issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
                          -- If present, version must be v2 or v3
     subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
                          -- If present, version must be v2 or v3
     extensions      [3]  EXPLICIT Extensions OPTIONAL
                          -- If present, version must be v3
     }

Certificates are instantiated using a certificate factory. The following is an example of how to instantiate an X.509 certificate:

 InputStream inStream = new FileInputStream("fileName-of-cert");
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 X509Certificate cert = (X509Certificate)cf.generateCertificate(inStream);
 inStream.close();

See Also:
Certificate, CertificateFactory, X509Extension, Serialized Form

Inner classes inherited from class java.security.cert.Certificate
Certificate.CertificateRep
Constructor Summary
protected X509Certificate()
Constructor for X.509 certificates.
Method Summary
abstract void | checkValidity() Checks that the certificate is currently valid.
abstract void | checkValidity(Date date) Checks that the given date is within the certificate's validity period.
abstract int | getBasicConstraints() Gets the certificate constraints path length from the critical BasicConstraints extension, (OID = 2.5.29.19).
abstract Principal | getIssuerDN() Gets the issuer (issuer distinguished name) value from the certificate.
abstract boolean[] | getIssuerUniqueID() Gets the issuerUniqueID value from the certificate.
abstract boolean[] | getKeyUsage() Gets a boolean array representing bits of the KeyUsage extension, (OID = 2.5.29.15).
abstract Date | getNotAfter() Gets the notAfter date from the validity period of the certificate.
abstract Date | getNotBefore() Gets the notBefore date from the validity period of the certificate.
abstract BigInteger | getSerialNumber() Gets the serialNumber value from the certificate.
abstract String | getSigAlgName() Gets the signature algorithm name for the certificate signature algorithm.
abstract String | getSigAlgOID() Gets the signature algorithm OID string from the certificate.
abstract byte[] | getSigAlgParams() Gets the DER-encoded signature algorithm parameters from this certificate's signature algorithm.
abstract byte[] | getSignature() Gets the signature value (the raw signature bits) from the certificate.
abstract Principal | getSubjectDN() Gets the subject (subject distinguished name) value from the certificate.
abstract boolean[] | getSubjectUniqueID() Gets the subjectUniqueID value from the certificate.
abstract byte[] | getTBSCertificate() Gets the DER-encoded certificate information, the tbsCertificate from this certificate.
abstract int | getVersion() Gets the version (version number) value from the certificate.
Methods inherited from class java.security.cert.Certificate
equals, getEncoded, getPublicKey, getType, hashCode, toString, verify, verify, writeReplace
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.cert.X509Extension
getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasUnsupportedCriticalExtension

Constructor Detail

X509Certificate

protected X509Certificate()
Constructor for X.509 certificates.
Method Detail

checkValidity

public abstract void checkValidity()
                            throws CertificateExpiredException,
                                   CertificateNotYetValidException
Checks that the certificate is currently valid. It is if the current date and time are within the validity period given in the certificate.

The validity period consists of two date/time values: the first and last dates (and times) on which the certificate is valid. It is defined in ASN.1 as:

 validity             Validity

 Validity ::= SEQUENCE {
     notBefore      CertificateValidityDate,
     notAfter       CertificateValidityDate }

 CertificateValidityDate ::= CHOICE {
     utcTime        UTCTime,
     generalTime    GeneralizedTime }
Throws:
CertificateExpiredException - if the certificate has expired.
CertificateNotYetValidException - if the certificate is not yet valid.

checkValidity

public abstract void checkValidity(Date date)
                            throws CertificateExpiredException,
                                   CertificateNotYetValidException
Checks that the given date is within the certificate's validity period. In other words, this determines whether the certificate would be valid at the given date/time.
Parameters:
date - the Date to check against to see if this certificate is valid at that date/time.
Throws:
CertificateExpiredException - if the certificate has expired with respect to the date supplied.
CertificateNotYetValidException - if the certificate is not yet valid with respect to the date supplied.
See Also:
checkValidity()

getVersion

public abstract int getVersion()
Gets the version (version number) value from the certificate. The ASN.1 definition for this is:
 version  [0] EXPLICIT Version DEFAULT v1

 Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
Returns:
the version number, i.e. 1, 2 or 3.

getSerialNumber

public abstract BigInteger getSerialNumber()
Gets the serialNumber value from the certificate. The serial number is an integer assigned by the certification authority to each certificate. It must be unique for each certificate issued by a given CA (i.e., the issuer name and serial number identify a unique certificate). The ASN.1 definition for this is:
 serialNumber     CertificateSerialNumber

 CertificateSerialNumber  ::=  INTEGER
Returns:
the serial number.

getIssuerDN

public abstract Principal getIssuerDN()
Gets the issuer (issuer distinguished name) value from the certificate. The issuer name identifies the entity that signed (and issued) the certificate.

The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is:

 issuer    Name

 Name ::= CHOICE { RDNSequence }
 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
 RelativeDistinguishedName ::=
     SET OF AttributeValueAssertion

 AttributeValueAssertion ::= SEQUENCE {
                               AttributeType,
                               AttributeValue }
 AttributeType ::= OBJECT IDENTIFIER
 AttributeValue ::= ANY
The Name describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the AttributeValue component is determined by the AttributeType; in general it will be a directoryString. A directoryString is usually one of PrintableString, TeletexString or UniversalString.
Returns:
a Principal whose name is the issuer distinguished name.

getSubjectDN

public abstract Principal getSubjectDN()
Gets the subject (subject distinguished name) value from the certificate. The ASN.1 definition for this is:
 subject    Name

See getIssuerDN for Name and other relevant definitions.

Returns:
a Principal whose name is the subject name.

getNotBefore

public abstract Date getNotBefore()
Gets the notBefore date from the validity period of the certificate. The relevant ASN.1 definitions are:
 validity             Validity

 Validity ::= SEQUENCE {
     notBefore      CertificateValidityDate,
     notAfter       CertificateValidityDate }

 CertificateValidityDate ::= CHOICE {
     utcTime        UTCTime,
     generalTime    GeneralizedTime }
Returns:
the start date of the validity period.
See Also:
checkValidity()

getNotAfter

public abstract Date getNotAfter()
Gets the notAfter date from the validity period of the certificate. See getNotBefore for relevant ASN.1 definitions.
Returns:
the end date of the validity period.
See Also:
checkValidity()

getTBSCertificate

public abstract byte[] getTBSCertificate()
                                  throws CertificateEncodingException
Gets the DER-encoded certificate information, the tbsCertificate from this certificate. This can be used to verify the signature independently.
Returns:
the DER-encoded certificate information.
Throws:
CertificateEncodingException - if an encoding error occurs.

getSignature

public abstract byte[] getSignature()
Gets the signature value (the raw signature bits) from the certificate. The ASN.1 definition for this is:
 signature     BIT STRING
Returns:
the signature.

getSigAlgName

public abstract String getSigAlgName()
Gets the signature algorithm name for the certificate signature algorithm. An example is the string "SHA-1/DSA". The ASN.1 definition for this is:
 signatureAlgorithm   AlgorithmIdentifier

 AlgorithmIdentifier  ::=  SEQUENCE  {
     algorithm               OBJECT IDENTIFIER,
     parameters              ANY DEFINED BY algorithm OPTIONAL  }
                             -- contains a value of the type
                             -- registered for use with the
                             -- algorithm object identifier value

The algorithm name is determined from the algorithm OID string.

Returns:
the signature algorithm name.

getSigAlgOID

public abstract String getSigAlgOID()
Gets the signature algorithm OID string from the certificate. An OID is represented by a set of positive whole numbers separated by periods. For example, the string "1.2.840.10040.4.3" identifies the SHA-1 with DSA signature algorithm, as per RFC 2459.

See getSigAlgName for relevant ASN.1 definitions.

Returns:
the signature algorithm OID string.

getSigAlgParams

public abstract byte[] getSigAlgParams()
Gets the DER-encoded signature algorithm parameters from this certificate's signature algorithm. In most cases, the signature algorithm parameters are null; the parameters are usually supplied with the certificate's public key. If access to individual parameter values is needed then use AlgorithmParameters and instantiate with the name returned by getSigAlgName.

See getSigAlgName for relevant ASN.1 definitions.

Returns:
the DER-encoded signature algorithm parameters, or null if no parameters are present.

getIssuerUniqueID

public abstract boolean[] getIssuerUniqueID()
Gets the issuerUniqueID value from the certificate. The issuer unique identifier is present in the certificate to handle the possibility of reuse of issuer names over time. RFC 2459 recommends that names not be reused and that conforming certificates not make use of unique identifiers. Applications conforming to that profile should be capable of parsing unique identifiers and making comparisons.

The ASN.1 definition for this is:

 issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL

 UniqueIdentifier  ::=  BIT STRING
Returns:
the issuer unique identifier or null if it is not present in the certificate.

getSubjectUniqueID

public abstract boolean[] getSubjectUniqueID()
Gets the subjectUniqueID value from the certificate.

The ASN.1 definition for this is:

 subjectUniqueID  [2]  IMPLICIT UniqueIdentifier OPTIONAL

 UniqueIdentifier  ::=  BIT STRING
Returns:
the subject unique identifier or null if it is not present in the certificate.

getKeyUsage

public abstract boolean[] getKeyUsage()
Gets a boolean array representing bits of the KeyUsage extension, (OID = 2.5.29.15). The key usage extension defines the purpose (e.g., encipherment, signature, certificate signing) of the key contained in the certificate. The ASN.1 definition for this is:
 KeyUsage ::= BIT STRING {
     digitalSignature        (0),
     nonRepudiation          (1),
     keyEncipherment         (2),
     dataEncipherment        (3),
     keyAgreement            (4),
     keyCertSign             (5),
     cRLSign                 (6),
     encipherOnly            (7),
     decipherOnly            (8) }
RFC 2459 recommends that when used, this be marked as a critical extension.
Returns:
the KeyUsage extension of this certificate, represented as an array of booleans. The order of KeyUsage values in the array is the same as in the above ASN.1 definition. The array will contain a value for each KeyUsage defined above. If the KeyUsage list encoded in the certificate is longer than the above list, it will not be truncated. Returns null if this certificate does not contain a KeyUsage extension.

getBasicConstraints

public abstract int getBasicConstraints()
Gets the certificate constraints path length from the critical BasicConstraints extension, (OID = 2.5.29.19).

The basic constraints extension identifies whether the subject of the certificate is a Certificate Authority (CA) and how deep a certification path may exist through that CA. The pathLenConstraint field (see below) is meaningful only if cA is set to TRUE. In this case, it gives the maximum number of CA certificates that may follow this certificate in a certification path. A value of zero indicates that only an end-entity certificate may follow in the path.

Note that for RFC 2459 this extension is always marked critical if cA is TRUE, meaning this certificate belongs to a Certificate Authority.

The ASN.1 definition for this is:

 BasicConstraints ::= SEQUENCE {
     cA                  BOOLEAN DEFAULT FALSE,
     pathLenConstraint   INTEGER (0..MAX) OPTIONAL }
Returns:
the value of pathLenConstraint if the BasicConstraints extension is present in the certificate and the subject of the certificate is a CA, otherwise -1. If the subject of the certificate is a CA and pathLenConstraint does not appear, Integer.MAX_VALUE is returned to indicate that there is no limit to the allowed length of the certification path.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


X509CRL

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class X509CRL

java.lang.Object
  |
  +--java.security.cert.CRL
        |
        +--java.security.cert.X509CRL
All Implemented Interfaces:
X509Extension
public abstract class X509CRL
extends CRL
implements X509Extension

Abstract class for an X.509 Certificate Revocation List (CRL). A CRL is a time-stamped list identifying revoked certificates. It is signed by a Certificate Authority (CA) and made freely available in a public repository.

Each revoked certificate is identified in a CRL by its certificate serial number. When a certificate-using system uses a certificate (e.g., for verifying a remote user's digital signature), that system not only checks the certificate signature and validity but also acquires a suitably- recent CRL and checks that the certificate serial number is not on that CRL. The meaning of "suitably-recent" may vary with local policy, but it usually means the most recently-issued CRL. A CA issues a new CRL on a regular periodic basis (e.g., hourly, daily, or weekly). Entries are added to CRLs as revocations occur, and an entry may be removed when the certificate expiration date is reached.

The X.509 v2 CRL format is described below in ASN.1:

 CertificateList  ::=  SEQUENCE  {
     tbsCertList          TBSCertList,
     signatureAlgorithm   AlgorithmIdentifier,
     signature            BIT STRING  }

More information can be found in RFC 2459, "Internet X.509 Public Key Infrastructure Certificate and CRL Profile" at http://www.ietf.org/rfc/rfc2459.txt .

The ASN.1 definition of tbsCertList is:

 TBSCertList  ::=  SEQUENCE  {
     version                 Version OPTIONAL,
                             -- if present, must be v2
     signature               AlgorithmIdentifier,
     issuer                  Name,
     thisUpdate              ChoiceOfTime,
     nextUpdate              ChoiceOfTime OPTIONAL,
     revokedCertificates     SEQUENCE OF SEQUENCE  {
         userCertificate         CertificateSerialNumber,
         revocationDate          ChoiceOfTime,
         crlEntryExtensions      Extensions OPTIONAL
                                 -- if present, must be v2
         }  OPTIONAL,
     crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
                                  -- if present, must be v2
     }

CRLs are instantiated using a certificate factory. The following is an example of how to instantiate an X.509 CRL:

 InputStream inStream = new FileInputStream("fileName-of-crl");
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 X509CRL crl = (X509CRL)cf.generateCRL(inStream);
 inStream.close();

See Also:
CRL, CertificateFactory, X509Extension

Constructor Summary
protected X509CRL()
Constructor for X.509 CRLs.
Method Summary
boolean | equals(Object other) Compares this CRL for equality with the given object.
abstract byte[] | getEncoded() Returns the ASN.1 DER-encoded form of this CRL.
abstract Principal | getIssuerDN() Gets the issuer (issuer distinguished name) value from the CRL.
abstract Date | getNextUpdate() Gets the nextUpdate date from the CRL.
abstract X509CRLEntry | getRevokedCertificate(BigInteger serialNumber) Gets the CRL entry, if any, with the given certificate serialNumber.
abstract Set | getRevokedCertificates() Gets all the entries from this CRL.
abstract String | getSigAlgName() Gets the signature algorithm name for the CRL signature algorithm.
abstract String | getSigAlgOID() Gets the signature algorithm OID string from the CRL.
abstract byte[] | getSigAlgParams() Gets the DER-encoded signature algorithm parameters from this CRL's signature algorithm.
abstract byte[] | getSignature() Gets the signature value (the raw signature bits) from the CRL.
abstract byte[] | getTBSCertList() Gets the DER-encoded CRL information, the tbsCertList from this CRL.
abstract Date | getThisUpdate() Gets the thisUpdate date from the CRL.
abstract int | getVersion() Gets the version (version number) value from the CRL.
int | hashCode() Returns a hashcode value for this CRL from its encoded form.
abstract void | verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.
Methods inherited from class java.security.cert.CRL
getType, isRevoked, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.cert.X509Extension
getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasUnsupportedCriticalExtension

Constructor Detail

X509CRL

protected X509CRL()
Constructor for X.509 CRLs.
Method Detail

equals

public boolean equals(Object other)
Compares this CRL for equality with the given object. If the other object is an instanceof X509CRL, then its encoded form is retrieved and compared with the encoded form of this CRL.
Overrides:
equals in class Object
Parameters:
other - the object to test for equality with this CRL.
Returns:
true iff the encoded forms of the two CRLs match, false otherwise.

hashCode

public int hashCode()
Returns a hashcode value for this CRL from its encoded form.
Overrides:
hashCode in class Object
Returns:
the hashcode value.

getEncoded

public abstract byte[] getEncoded()
                           throws CRLException
Returns the ASN.1 DER-encoded form of this CRL.
Returns:
the encoded form of this certificate
Throws:
CRLException - if an encoding error occurs.

verify

public abstract void verify(PublicKey key)
                     throws CRLException,
                            NoSuchAlgorithmException,
                            InvalidKeyException,
                            NoSuchProviderException,
                            SignatureException
Verifies that this CRL was signed using the private key that corresponds to the given public key.
Parameters:
key - the PublicKey used to carry out the verification.
Throws:
NoSuchAlgorithmException - on unsupported signature algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - if there's no default provider.
SignatureException - on signature errors.
CRLException - on encoding errors.

verify

public abstract void verify(PublicKey key,
                            String sigProvider)
                     throws CRLException,
                            NoSuchAlgorithmException,
                            InvalidKeyException,
                            NoSuchProviderException,
                            SignatureException
Verifies that this CRL was signed using the private key that corresponds to the given public key. This method uses the signature verification engine supplied by the given provider.
Parameters:
key - the PublicKey used to carry out the verification.
sigProvider - the name of the signature provider.
Throws:
NoSuchAlgorithmException - on unsupported signature algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - on incorrect provider.
SignatureException - on signature errors.
CRLException - on encoding errors.

getVersion

public abstract int getVersion()
Gets the version (version number) value from the CRL. The ASN.1 definition for this is:
 version    Version OPTIONAL,
             -- if present, must be v2

 Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
             -- v3 does not apply to CRLs but appears for consistency
             -- with definition of Version for certs
Returns:
the version number, i.e. 1 or 2.

getIssuerDN

public abstract Principal getIssuerDN()
Gets the issuer (issuer distinguished name) value from the CRL. The issuer name identifies the entity that signed (and issued) the CRL.

The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is:

 issuer    Name

 Name ::= CHOICE { RDNSequence }
 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
 RelativeDistinguishedName ::=
     SET OF AttributeValueAssertion

 AttributeValueAssertion ::= SEQUENCE {
                               AttributeType,
                               AttributeValue }
 AttributeType ::= OBJECT IDENTIFIER
 AttributeValue ::= ANY
The Name describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the AttributeValue component is determined by the AttributeType; in general it will be a directoryString. A directoryString is usually one of PrintableString, TeletexString or UniversalString.
Returns:
a Principal whose name is the issuer distinguished name.

getThisUpdate

public abstract Date getThisUpdate()
Gets the thisUpdate date from the CRL. The ASN.1 definition for this is:
 thisUpdate   ChoiceOfTime
 ChoiceOfTime ::= CHOICE {
     utcTime        UTCTime,
     generalTime    GeneralizedTime }
Returns:
the thisUpdate date from the CRL.

getNextUpdate

public abstract Date getNextUpdate()
Gets the nextUpdate date from the CRL.
Returns:
the nextUpdate date from the CRL, or null if not present.

getRevokedCertificate

public abstract X509CRLEntry getRevokedCertificate(BigInteger serialNumber)
Gets the CRL entry, if any, with the given certificate serialNumber.
Parameters:
serialNumber - the serial number of the certificate for which a CRL entry is to be looked up
Returns:
the entry with the given serial number, or null if no such entry exists in this CRL.
See Also:
X509CRLEntry

getRevokedCertificates

public abstract Set getRevokedCertificates()
Gets all the entries from this CRL. This returns a Set of X509CRLEntry objects.
Returns:
all the entries or null if there are none present.
See Also:
X509CRLEntry

getTBSCertList

public abstract byte[] getTBSCertList()
                               throws CRLException
Gets the DER-encoded CRL information, the tbsCertList from this CRL. This can be used to verify the signature independently.
Returns:
the DER-encoded CRL information.
Throws:
CRLException - if an encoding error occurs.

getSignature

public abstract byte[] getSignature()
Gets the signature value (the raw signature bits) from the CRL. The ASN.1 definition for this is:
 signature     BIT STRING
Returns:
the signature.

getSigAlgName

public abstract String getSigAlgName()
Gets the signature algorithm name for the CRL signature algorithm. An example is the string "SHA-1/DSA". The ASN.1 definition for this is:
 signatureAlgorithm   AlgorithmIdentifier

 AlgorithmIdentifier  ::=  SEQUENCE  {
     algorithm               OBJECT IDENTIFIER,
     parameters              ANY DEFINED BY algorithm OPTIONAL  }
                             -- contains a value of the type
                             -- registered for use with the
                             -- algorithm object identifier value

The algorithm name is determined from the algorithm OID string.

Returns:
the signature algorithm name.

getSigAlgOID

public abstract String getSigAlgOID()
Gets the signature algorithm OID string from the CRL. An OID is represented by a set of positive whole numbers separated by periods. For example, the string "1.2.840.10040.4.3" identifies the SHA-1 with DSA signature algorithm, as per RFC 2459.

See getSigAlgName()#getSigAlgName for relevant ASN.1 definitions.

Returns:
the signature algorithm OID string.

getSigAlgParams

public abstract byte[] getSigAlgParams()
Gets the DER-encoded signature algorithm parameters from this CRL's signature algorithm. In most cases, the signature algorithm parameters are null; the parameters are usually supplied with the public key. If access to individual parameter values is needed then use AlgorithmParameters and instantiate with the name returned by getSigAlgName()#getSigAlgName.

See getSigAlgName()#getSigAlgName for relevant ASN.1 definitions.

Returns:
the DER-encoded signature algorithm parameters, or null if no parameters are present.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


X509CRLEntry

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Class X509CRLEntry

java.lang.Object
  |
  +--java.security.cert.X509CRLEntry
All Implemented Interfaces:
X509Extension
public abstract class X509CRLEntry
extends Object
implements X509Extension

Abstract class for a revoked certificate in a CRL (Certificate Revocation List). The ASN.1 definition for revokedCertificates is:

 revokedCertificates    SEQUENCE OF SEQUENCE  {
     userCertificate    CertificateSerialNumber,
     revocationDate     ChoiceOfTime,
     crlEntryExtensions Extensions OPTIONAL
                        -- if present, must be v2
 }  OPTIONAL

 CertificateSerialNumber  ::=  INTEGER

 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

 Extension  ::=  SEQUENCE  {
     extnId        OBJECT IDENTIFIER,
     critical      BOOLEAN DEFAULT FALSE,
     extnValue     OCTET STRING
                   -- contains a DER encoding of a value
                   -- of the type registered for use with
                   -- the extnId object identifier value
 }

See Also:
X509CRL, X509Extension

Constructor Summary
X509CRLEntry()
Method Summary
boolean | equals(Object other) Compares this CRL entry for equality with the given object.
abstract byte[] | getEncoded() Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE.
abstract Date | getRevocationDate() Gets the revocation date from this X509CRLEntry, the revocationDate.
abstract BigInteger | getSerialNumber() Gets the serial number from this X509CRLEntry, the userCertificate.
abstract boolean | hasExtensions() Returns true if this CRL entry has extensions.
int | hashCode() Returns a hashcode value for this CRL entry from its encoded form.
abstract String | toString() Returns a string representation of this CRL entry.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.cert.X509Extension
getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasUnsupportedCriticalExtension

Constructor Detail

X509CRLEntry

public X509CRLEntry()
Method Detail

equals

public boolean equals(Object other)
Compares this CRL entry for equality with the given object. If the other object is an instanceof X509CRLEntry, then its encoded form (the inner SEQUENCE) is retrieved and compared with the encoded form of this CRL entry.
Overrides:
equals in class Object
Parameters:
other - the object to test for equality with this CRL entry.
Returns:
true iff the encoded forms of the two CRL entries match, false otherwise.

hashCode

public int hashCode()
Returns a hashcode value for this CRL entry from its encoded form.
Overrides:
hashCode in class Object
Returns:
the hashcode value.

getEncoded

public abstract byte[] getEncoded()
                           throws CRLException
Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE.
Returns:
the encoded form of this certificate
Throws:
CRLException - if an encoding error occurs.

getSerialNumber

public abstract BigInteger getSerialNumber()
Gets the serial number from this X509CRLEntry, the userCertificate.
Returns:
the serial number.

getRevocationDate

public abstract Date getRevocationDate()
Gets the revocation date from this X509CRLEntry, the revocationDate.
Returns:
the revocation date.

hasExtensions

public abstract boolean hasExtensions()
Returns true if this CRL entry has extensions.
Returns:
true if this entry has extensions, false otherwise.

toString

public abstract String toString()
Returns a string representation of this CRL entry.
Overrides:
toString in class Object
Returns:
a string representation of this CRL entry.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


X509Extension

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.cert
Interface X509Extension

All Known Implementing Classes:
X509Certificate, X509CRLEntry, X509CRL
public interface X509Extension

Interface for an X.509 extension.

The extensions defined for X.509 v3 Certificates and v2 CRLs (Certificate Revocation Lists) provide methods for associating additional attributes with users or public keys, for managing the certification hierarchy, and for managing CRL distribution. The X.509 extensions format also allows communities to define private extensions to carry information unique to those communities.

Each extension in a certificate/CRL may be designated as critical or non-critical. A certificate/CRL-using system (an application validating a certificate/CRL) must reject the certificate/CRL if it encounters a critical extension it does not recognize. A non-critical extension may be ignored if it is not recognized.

The ASN.1 definition for this is:

 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

 Extension  ::=  SEQUENCE  {
     extnId        OBJECT IDENTIFIER,
     critical      BOOLEAN DEFAULT FALSE,
     extnValue     OCTET STRING
                   -- contains a DER encoding of a value
                   -- of the type registered for use with
                   -- the extnId object identifier value
 }
Since not all extensions are known, the getExtensionValue method returns the DER-encoded OCTET STRING of the extension value (i.e., the extnValue). This can then be handled by a Class that understands the extension.

Method Summary
Set | getCriticalExtensionOIDs() Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface.
byte[] | getExtensionValue(String oid) Gets the DER-encoded OCTET string for the extension value (extnValue) identified by the passed-in oid String.
Set | getNonCriticalExtensionOIDs() Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.
boolean | hasUnsupportedCriticalExtension() Check if there is a critical extension that is not supported.

Method Detail

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()
Check if there is a critical extension that is not supported.
Returns:
true if a critical extension is found that is not supported, otherwise false.

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()
Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface. Here is sample code to get a Set of critical extensions from an X509Certificate and print the OIDs:

 InputStream inStrm = new FileInputStream("DER-encoded-Cert");
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 X509Certificate cert = (X509Certificate)cf.generateCertificate(inStrm);
 inStrm.close();

 Set critSet = cert.getCriticalExtensionOIDs();
 if (critSet != null && !critSet.isEmpty()) {
     System.out.println("Set of critical extensions:");
     for (Iterator i = critSet.iterator(); i.hasNext();) {
         String oid = (String)i.next();
         System.out.println(oid);
     }
 }
Returns:
a Set (or an empty Set if none are marked critical) of the extension OID strings for extensions that are marked critical. If there are no extensions present at all, then this method returns null.

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()
Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface. Here is sample code to get a Set of non-critical extensions from an X509CRL revoked certificate entry and print the OIDs:

 InputStream inStrm = new FileInputStream("DER-encoded-CRL");
 CertificateFactory cf = CertificateFactory.getInstance("X.509");
 X509CRL crl = (X509CRL)cf.generateCRL(inStrm);
 inStrm.close();

 byte[] certData = <DER-encoded certificate data>
 ByteArrayInputStream bais = new ByteArrayInputStream(certData);
 X509Certificate cert = (X509Certificate)cf.generateCertificate(bais);
 bais.close();
 X509CRLEntry badCert =
              crl.getRevokedCertificate(cert.getSerialNumber());

 if (badCert != null) {
     Set nonCritSet = badCert.getNonCriticalExtensionOIDs();

     if (nonCritSet != null)
         for (Iterator i = nonCritSet.iterator(); i.hasNext();) {
             String oid = (String)i.next();
             System.out.println(oid);
         }
 }
Returns:
a Set (or an empty Set if none are marked non-critical) of the extension OID strings for extensions that are marked non-critical. If there are no extensions present at all, then this method returns null.

getExtensionValue

public byte[] getExtensionValue(String oid)
Gets the DER-encoded OCTET string for the extension value (extnValue) identified by the passed-in oid String. The oid string is represented by a set of positive whole numbers separated by periods.

For example:
OID (Object Identifier) | Extension Name
2.5.29.14 | SubjectKeyIdentifier
2.5.29.15 | KeyUsage
2.5.29.16 | PrivateKeyUsage
2.5.29.17 | SubjectAlternativeName
2.5.29.18 | IssuerAlternativeName
2.5.29.19 | BasicConstraints
2.5.29.30 | NameConstraints
2.5.29.33 | PolicyMappings
2.5.29.35 | AuthorityKeyIdentifier
2.5.29.36 | PolicyConstraints

Parameters:
oid - the Object Identifier value for the extension.
Returns:
the DER-encoded octet string of the extension value or null if it is not present.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Certificate

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Interface Certificate

Deprecated. A new certificate handling package is created in the Java 2 platform. This Certificate interface is entirely deprecated and is here to allow for a smooth transition to the new package.

public interface Certificate

This is an interface of abstract methods for managing a variety of identity certificates. An identity certificate is a guarantee by a principal that a public key is that of another principal. (A principal represents an entity such as an individual user, a group, or a corporation.)

In particular, this interface is intended to be a common abstraction for constructs that have different formats but important common uses. For example, different types of certificates, such as X.509 certificates and PGP certificates, share general certificate functionality (the need to encode and decode certificates) and some types of information, such as a public key, the principal whose key it is, and the guarantor guaranteeing that the public key is that of the specified principal. So an implementation of X.509 certificates and an implementation of PGP certificates can both utilize the Certificate interface, even though their formats and additional types and amounts of information stored are different.

Important: This interface is useful for cataloging and grouping objects sharing certain common uses. It does not have any semantics of its own. In particular, a Certificate object does not make any statement as to the validity of the binding. It is the duty of the application implementing this interface to verify the certificate and satisfy itself of its validity.

See Also:
Certificate

Method Summary
void | decode(InputStream stream) Deprecated. Decodes a certificate from an input stream.
void | encode(OutputStream stream) Deprecated. Encodes the certificate to an output stream in a format that can be decoded by the decode method.
String | getFormat() Deprecated. Returns the name of the coding format.
Principal | getGuarantor() Deprecated. Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate.
Principal | getPrincipal() Deprecated. Returns the principal of the principal-key pair being guaranteed by the guarantor.
PublicKey | getPublicKey() Deprecated. Returns the key of the principal-key pair being guaranteed by the guarantor.
String | toString(boolean detailed) Deprecated. Returns a string that represents the contents of the certificate.

Method Detail

getGuarantor

public Principal getGuarantor()
Deprecated.
Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate. For X.509 certificates, the guarantor will typically be a Certificate Authority (such as the United States Postal Service or Verisign, Inc.).
Returns:
the guarantor which guaranteed the principal-key binding.

getPrincipal

public Principal getPrincipal()
Deprecated.
Returns the principal of the principal-key pair being guaranteed by the guarantor.
Returns:
the principal to which this certificate is bound.

getPublicKey

public PublicKey getPublicKey()
Deprecated.
Returns the key of the principal-key pair being guaranteed by the guarantor.
Returns:
the public key that this certificate certifies belongs to a particular principal.

encode

public void encode(OutputStream stream)
            throws KeyException,
                   IOException
Deprecated.
Encodes the certificate to an output stream in a format that can be decoded by the decode method.
Parameters:
stream - the output stream to which to encode the certificate.
Throws:
KeyException - if the certificate is not properly initialized, or data is missing, etc.
IOException - if a stream exception occurs while trying to output the encoded certificate to the output stream.
See Also:
decode(java.io.InputStream), getFormat()

decode

public void decode(InputStream stream)
            throws KeyException,
                   IOException
Deprecated.
Decodes a certificate from an input stream. The format should be that returned by getFormat and produced by encode.
Parameters:
stream - the input stream from which to fetch the data being decoded.
Throws:
KeyException - if the certificate is not properly initialized, or data is missing, etc.
IOException - if an exception occurs while trying to input the encoded certificate from the input stream.
See Also:
encode(java.io.OutputStream), getFormat()

getFormat

public String getFormat()
Deprecated.
Returns the name of the coding format. This is used as a hint to find an appropriate parser. It could be "X.509", "PGP", etc. This is the format produced and understood by the encode and decode methods.
Returns:
the name of the coding format.

toString

public String toString(boolean detailed)
Deprecated.
Returns a string that represents the contents of the certificate.
Parameters:
detailed - whether or not to give detailed information about the certificate.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.security.AccessController

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AccessController

No usage of java.security.AccessController

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AllPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AllPermission

No usage of java.security.AllPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.DigestInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.DigestInputStream

No usage of java.security.DigestInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.DigestOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.DigestOutputStream

No usage of java.security.DigestOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.GuardedObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.GuardedObject

No usage of java.security.GuardedObject

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Permissions

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Permissions

No usage of java.security.Permissions

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.ProviderException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.ProviderException

No usage of java.security.ProviderException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Security

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Security

No usage of java.security.Security

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SecurityPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SecurityPermission

No usage of java.security.SecurityPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SignedObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SignedObject

No usage of java.security.SignedObject

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Signer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Signer

No usage of java.security.Signer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.UnresolvedPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.UnresolvedPermission

No usage of java.security.UnresolvedPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AccessControlContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AccessControlContext

Packages that use AccessControlContext
java.security Provides the classes and interfaces for the security framework.

Uses of AccessControlContext in java.security

Methods in java.security that return AccessControlContext
static AccessControlContext AccessController.getContext()
This method takes a "snapshot" of the current calling context, which includes the current Thread's inherited AccessControlContext, and places it in an AccessControlContext object.

Methods in java.security with parameters of type AccessControlContext
static Object | AccessController.doPrivileged(PrivilegedAction action, AccessControlContext context) Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext.
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.

Constructors in java.security with parameters of type AccessControlContext
AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
Create a new AccessControlContext with the given AccessControlContext and DomainCombiner.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AccessControlException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AccessControlException

Packages that use AccessControlException
java.security Provides the classes and interfaces for the security framework.

Uses of AccessControlException in java.security

Methods in java.security that throw AccessControlException
static void | AccessController.checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.
void | AccessControlContext.checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AlgorithmParameterGenerator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AlgorithmParameterGenerator

Packages that use AlgorithmParameterGenerator
java.security Provides the classes and interfaces for the security framework.

Uses of AlgorithmParameterGenerator in java.security

Methods in java.security that return AlgorithmParameterGenerator
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm) Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm, String provider) Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AlgorithmParameterGeneratorSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AlgorithmParameterGeneratorSpi

Packages that use AlgorithmParameterGeneratorSpi
java.security Provides the classes and interfaces for the security framework.

Uses of AlgorithmParameterGeneratorSpi in java.security

Constructors in java.security with parameters of type AlgorithmParameterGeneratorSpi
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, String algorithm)
Creates an AlgorithmParameterGenerator object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AlgorithmParameters

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AlgorithmParameters

Packages that use AlgorithmParameters
java.security Provides the classes and interfaces for the security framework.

Uses of AlgorithmParameters in java.security

Methods in java.security that return AlgorithmParameters
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm) Generates a parameter object for the specified algorithm.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm, String provider) Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
protected abstract AlgorithmParameters | AlgorithmParameterGeneratorSpi.engineGenerateParameters() Generates the parameters.
AlgorithmParameters | AlgorithmParameterGenerator.generateParameters() Generates the parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.AlgorithmParametersSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.AlgorithmParametersSpi

Packages that use AlgorithmParametersSpi
java.security Provides the classes and interfaces for the security framework.

Uses of AlgorithmParametersSpi in java.security

Constructors in java.security with parameters of type AlgorithmParametersSpi
AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm)
Creates an AlgorithmParameters object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.BasicPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.BasicPermission

Packages that use BasicPermission
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of BasicPermission in java.awt

Subclasses of BasicPermission in java.awt
 class AWTPermission
This class is for AWT permissions.

Uses of BasicPermission in java.io

Subclasses of BasicPermission in java.io
 class SerializablePermission
This class is for Serializable permissions.

Uses of BasicPermission in java.lang

Subclasses of BasicPermission in java.lang
 class RuntimePermission
This class is for runtime permissions.

Uses of BasicPermission in java.lang.reflect

Subclasses of BasicPermission in java.lang.reflect
 class ReflectPermission
The Permission class for reflective operations.

Uses of BasicPermission in java.net

Subclasses of BasicPermission in java.net
 class NetPermission
This class is for various network permissions.

Uses of BasicPermission in java.security

Subclasses of BasicPermission in java.security
 class SecurityPermission
This class is for security permissions.

Uses of BasicPermission in java.sql

Subclasses of BasicPermission in java.sql
 class SQLPermission
The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.

Uses of BasicPermission in java.util

Subclasses of BasicPermission in java.util
 class PropertyPermission
This class is for property permissions.

Uses of BasicPermission in javax.sound.sampled

Subclasses of BasicPermission in javax.sound.sampled
 class AudioPermission
The AudioPermission class represents access rights to the audio system resources.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.CodeSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.CodeSource

Packages that use CodeSource
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.

Uses of CodeSource in java.net

Methods in java.net with parameters of type CodeSource
protected  PermissionCollection URLClassLoader.getPermissions(CodeSource codesource)
Returns the permissions for the given codesource object.

Uses of CodeSource in java.security

Methods in java.security that return CodeSource
 CodeSource ProtectionDomain.getCodeSource()
Returns the CodeSource of this domain.

Methods in java.security with parameters of type CodeSource
protected Class | SecureClassLoader.defineClass(String name, byte[] b, int off, int len, CodeSource cs) Converts an array of bytes into an instance of class Class, with an optional CodeSource.
protected PermissionCollection | SecureClassLoader.getPermissions(CodeSource codesource) Returns the permissions for the given CodeSource object.
boolean | CodeSource.implies(CodeSource codesource) Returns true if this CodeSource object "implies" the specified CodeSource.
abstract PermissionCollection | Policy.getPermissions(CodeSource codesource) Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.

Constructors in java.security with parameters of type CodeSource
ProtectionDomain(CodeSource codesource, PermissionCollection permissions)
Creates a new ProtectionDomain with the given CodeSource and Permissions.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.DigestException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.DigestException

Packages that use DigestException
java.security Provides the classes and interfaces for the security framework.

Uses of DigestException in java.security

Methods in java.security that throw DigestException
protected int | MessageDigestSpi.engineDigest(byte[] buf, int offset, int len) Completes the hash computation by performing final operations such as padding.
int | MessageDigest.digest(byte[] buf, int offset, int len) Completes the hash computation by performing final operations such as padding.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.GeneralSecurityException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.GeneralSecurityException

Packages that use GeneralSecurityException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of GeneralSecurityException in java.security

Subclasses of GeneralSecurityException in java.security
class | DigestException This is the generic Message Digest exception.
class | InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | KeyException This is the basic key exception.
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.
class | KeyStoreException This is the generic KeyStore exception.
class | NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
class | NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
class | SignatureException This is the generic Signature exception.
class | UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.

Uses of GeneralSecurityException in java.security.cert

Subclasses of GeneralSecurityException in java.security.cert
class | CertificateEncodingException Certificate Encoding Exception.
class | CertificateException This exception indicates one of a variety of certificate problems.
class | CertificateExpiredException Certificate Expired Exception.
class | CertificateNotYetValidException Certificate is not yet valid exception.
class | CertificateParsingException Certificate Parsing Exception.
class | CRLException CRL (Certificate Revocation List) Exception

Uses of GeneralSecurityException in java.security.spec

Subclasses of GeneralSecurityException in java.security.spec
class | InvalidKeySpecException This is the exception for invalid key specifications.
class | InvalidParameterSpecException This is the exception for invalid parameter specifications.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Identity

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Identity

Packages that use Identity
java.security Provides the classes and interfaces for the security framework.

Uses of Identity in java.security

Subclasses of Identity in java.security
class | IdentityScope Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | Signer Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

Methods in java.security that return Identity
abstract Identity | IdentityScope.getIdentity(String name) Deprecated. Returns the identity in this scope with the specified name (if any).
Identity | IdentityScope.getIdentity(Principal principal) Deprecated. Retrieves the identity whose name is the same as that of the specified principal.
abstract Identity | IdentityScope.getIdentity(PublicKey key) Deprecated. Retrieves the identity with the specified public key.

Methods in java.security with parameters of type Identity
protected boolean | Identity.identityEquals(Identity identity) Deprecated. Tests for equality between the specified identity and this identity.
abstract void | IdentityScope.addIdentity(Identity identity) Deprecated. Adds an identity to this identity scope.
abstract void | IdentityScope.removeIdentity(Identity identity) Deprecated. Removes an identity from this identity scope.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.IdentityScope

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.IdentityScope

Packages that use IdentityScope
java.security Provides the classes and interfaces for the security framework.

Uses of IdentityScope in java.security

Methods in java.security that return IdentityScope
IdentityScope | Identity.getScope() Deprecated. Returns this identity's scope.
static IdentityScope | IdentityScope.getSystemScope() Deprecated. Returns the system's identity scope.

Methods in java.security with parameters of type IdentityScope
protected static void IdentityScope.setSystemScope(IdentityScope scope)
Deprecated. Sets the system's identity scope.

Constructors in java.security with parameters of type IdentityScope
Identity(String name, IdentityScope scope)
Deprecated. Constructs an identity with the specified name and scope.
Signer(String name, IdentityScope scope)
Deprecated. Creates a signer with the specified identity name and scope.
IdentityScope(String name, IdentityScope scope)
Deprecated. Constructs a new identity scope with the specified name and scope.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.InvalidAlgorithmParameterException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.InvalidAlgorithmParameterException

Packages that use InvalidAlgorithmParameterException
java.security Provides the classes and interfaces for the security framework.

Uses of InvalidAlgorithmParameterException in java.security

Methods in java.security that throw InvalidAlgorithmParameterException
void | KeyPairGeneratorSpi.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
void | KeyPairGenerator.initialize(AlgorithmParameterSpec params) Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
void | KeyPairGenerator.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator with the given parameter set and source of randomness.
protected void | SignatureSpi.engineSetParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.
protected abstract void | AlgorithmParameterGeneratorSpi.engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | AlgorithmParameterGenerator.init(AlgorithmParameterSpec genParamSpec) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | AlgorithmParameterGenerator.init(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | Signature.setParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.InvalidKeyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.InvalidKeyException

Packages that use InvalidKeyException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of InvalidKeyException in java.security

Methods in java.security that throw InvalidKeyException
Key | KeyFactory.translateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
protected abstract void | SignatureSpi.engineInitVerify(PublicKey publicKey) Initializes this signature object with the specified public key for verification operations.
protected abstract void | SignatureSpi.engineInitSign(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.
protected void | SignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random) Initializes this signature object with the specified private key and source of randomness for signing operations.
protected abstract Key | KeyFactorySpi.engineTranslateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
boolean | SignedObject.verify(PublicKey verificationKey, Signature verificationEngine) Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
void | Signature.initVerify(PublicKey publicKey) Initializes this object for verification.
void | Signature.initVerify(Certificate certificate) Initializes this object for verification, using the public key from the given certificate.
void | Signature.initSign(PrivateKey privateKey) Initialize this object for signing.
void | Signature.initSign(PrivateKey privateKey, SecureRandom random) Initialize this object for signing.

Constructors in java.security that throw InvalidKeyException
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Uses of InvalidKeyException in java.security.cert

Methods in java.security.cert that throw InvalidKeyException
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.InvalidParameterException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.InvalidParameterException

Packages that use InvalidParameterException
java.security | Provides the classes and interfaces for the security framework.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of InvalidParameterException in java.security

Methods in java.security that throw InvalidParameterException
void | Signer.setKeyPair(KeyPair pair) Deprecated. Sets the key pair (public key and private key) for this signer.
protected abstract void | SignatureSpi.engineSetParameter(String param, Object value) Deprecated. Replaced by engineSetParameter.
protected abstract Object | SignatureSpi.engineGetParameter(String param) Deprecated.
void | Signature.setParameter(String param, Object value) Deprecated. Use setParameter.
Object | Signature.getParameter(String param) Deprecated.

Uses of InvalidParameterException in java.security.interfaces

Methods in java.security.interfaces that throw InvalidParameterException
void | DSAKeyPairGenerator.initialize(DSAParams params, SecureRandom random) Initializes the key pair generator using p, q and g, the DSA family parameters.
void | DSAKeyPairGenerator.initialize(int modlen, boolean genParams, SecureRandom random) Initializes the key pair generator for a given modulus length, without parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyException

Packages that use KeyException
java.security Provides the classes and interfaces for the security framework.

Uses of KeyException in java.security

Subclasses of KeyException in java.security
class | InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
class | KeyManagementException This is the general key management exception, for all operations dealing with key management.

Methods in java.security that throw KeyException
void | Signer.setKeyPair(KeyPair pair) Deprecated. Sets the key pair (public key and private key) for this signer.
void | Certificate.encode(OutputStream stream) Deprecated. Encodes the certificate to an output stream in a format that can be decoded by the decode method.
void | Certificate.decode(InputStream stream) Deprecated. Decodes a certificate from an input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyFactory

Packages that use KeyFactory
java.security Provides the classes and interfaces for the security framework.

Uses of KeyFactory in java.security

Methods in java.security that return KeyFactory
static KeyFactory | KeyFactory.getInstance(String algorithm) Generates a KeyFactory object that implements the specified digest algorithm.
static KeyFactory | KeyFactory.getInstance(String algorithm, String provider) Generates a KeyFactory object for the specified algorithm from the specified provider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyFactorySpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyFactorySpi

Packages that use KeyFactorySpi
java.security Provides the classes and interfaces for the security framework.

Uses of KeyFactorySpi in java.security

Constructors in java.security with parameters of type KeyFactorySpi
KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Creates a KeyFactory object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyManagementException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyManagementException

Packages that use KeyManagementException
java.security Provides the classes and interfaces for the security framework.

Uses of KeyManagementException in java.security

Methods in java.security that throw KeyManagementException
void | Identity.setPublicKey(PublicKey key) Deprecated. Sets this identity's public key.
void | Identity.addCertificate(Certificate certificate) Deprecated. Adds a certificate for this identity.
void | Identity.removeCertificate(Certificate certificate) Deprecated. Removes a certificate from this identity.
abstract void | IdentityScope.addIdentity(Identity identity) Deprecated. Adds an identity to this identity scope.
abstract void | IdentityScope.removeIdentity(Identity identity) Deprecated. Removes an identity from this identity scope.

Constructors in java.security that throw KeyManagementException
Identity(String name, IdentityScope scope)
Deprecated. Constructs an identity with the specified name and scope.
Signer(String name, IdentityScope scope)
Deprecated. Creates a signer with the specified identity name and scope.
IdentityScope(String name, IdentityScope scope)
Deprecated. Constructs a new identity scope with the specified name and scope.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyPair

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyPair

Packages that use KeyPair
java.security Provides the classes and interfaces for the security framework.

Uses of KeyPair in java.security

Methods in java.security that return KeyPair
abstract KeyPair | KeyPairGeneratorSpi.generateKeyPair() Generates a key pair.
KeyPair | KeyPairGenerator.genKeyPair() Generates a key pair.
KeyPair | KeyPairGenerator.generateKeyPair() Generates a key pair.

Methods in java.security with parameters of type KeyPair
 void Signer.setKeyPair(KeyPair pair)
Deprecated. Sets the key pair (public key and private key) for this signer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyPairGenerator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyPairGenerator

Packages that use KeyPairGenerator
java.security Provides the classes and interfaces for the security framework.

Uses of KeyPairGenerator in java.security

Methods in java.security that return KeyPairGenerator
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm) Generates a KeyPairGenerator object that implements the specified digest algorithm.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm, String provider) Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyPairGeneratorSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyPairGeneratorSpi

Packages that use KeyPairGeneratorSpi
java.security Provides the classes and interfaces for the security framework.

Uses of KeyPairGeneratorSpi in java.security

Subclasses of KeyPairGeneratorSpi in java.security
 class KeyPairGenerator
The KeyPairGenerator class is used to generate pairs of public and private keys.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyStore

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyStore

Packages that use KeyStore
java.security Provides the classes and interfaces for the security framework.

Uses of KeyStore in java.security

Methods in java.security that return KeyStore
static KeyStore | KeyStore.getInstance(String type) Generates a keystore object of the given type.
static KeyStore | KeyStore.getInstance(String type, String provider) Generates a keystore object for the specified keystore type from the specified provider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyStoreException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyStoreException

Packages that use KeyStoreException
java.security Provides the classes and interfaces for the security framework.

Uses of KeyStoreException in java.security

Methods in java.security that throw KeyStoreException
static KeyStore | KeyStore.getInstance(String type) Generates a keystore object of the given type.
static KeyStore | KeyStore.getInstance(String type, String provider) Generates a keystore object for the specified keystore type from the specified provider.
Key | KeyStore.getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
Certificate[] | KeyStore.getCertificateChain(String alias) Returns the certificate chain associated with the given alias.
Certificate | KeyStore.getCertificate(String alias) Returns the certificate associated with the given alias.
Date | KeyStore.getCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
void | KeyStore.setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
void | KeyStore.setKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
void | KeyStore.setCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
void | KeyStore.deleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.
Enumeration | KeyStore.aliases() Lists all the alias names of this keystore.
boolean | KeyStore.containsAlias(String alias) Checks if the given alias exists in this keystore.
int | KeyStore.size() Retrieves the number of entries in this keystore.
boolean | KeyStore.isKeyEntry(String alias) Returns true if the entry identified by the given alias is a key entry, and false otherwise.
boolean | KeyStore.isCertificateEntry(String alias) Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
String | KeyStore.getCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
void | KeyStore.store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
abstract void | KeyStoreSpi.engineSetCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
abstract void | KeyStoreSpi.engineDeleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.KeyStoreSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.KeyStoreSpi

Packages that use KeyStoreSpi
java.security Provides the classes and interfaces for the security framework.

Uses of KeyStoreSpi in java.security

Constructors in java.security with parameters of type KeyStoreSpi
KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.MessageDigest

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.MessageDigest

Packages that use MessageDigest
java.security Provides the classes and interfaces for the security framework.

Uses of MessageDigest in java.security

Fields in java.security declared as MessageDigest
protected MessageDigest | DigestOutputStream.digest The message digest associated with this stream.
protected MessageDigest | DigestInputStream.digest The message digest associated with this stream.

Methods in java.security that return MessageDigest
static MessageDigest | MessageDigest.getInstance(String algorithm) Generates a MessageDigest object that implements the specified digest algorithm.
static MessageDigest | MessageDigest.getInstance(String algorithm, String provider) Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
MessageDigest | DigestOutputStream.getMessageDigest() Returns the message digest associated with this stream.
MessageDigest | DigestInputStream.getMessageDigest() Returns the message digest associated with this stream.

Methods in java.security with parameters of type MessageDigest
void | DigestOutputStream.setMessageDigest(MessageDigest digest) Associates the specified message digest with this stream.
void | DigestInputStream.setMessageDigest(MessageDigest digest) Associates the specified message digest with this stream.

Constructors in java.security with parameters of type MessageDigest
DigestOutputStream(OutputStream stream, MessageDigest digest)
Creates a digest output stream, using the specified output stream and message digest.
DigestInputStream(InputStream stream, MessageDigest digest)
Creates a digest input stream, using the specified input stream and message digest.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.MessageDigestSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.MessageDigestSpi

Packages that use MessageDigestSpi
java.security Provides the classes and interfaces for the security framework.

Uses of MessageDigestSpi in java.security

Subclasses of MessageDigestSpi in java.security
 class MessageDigest
This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.NoSuchAlgorithmException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.NoSuchAlgorithmException

Packages that use NoSuchAlgorithmException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of NoSuchAlgorithmException in java.security

Methods in java.security that throw NoSuchAlgorithmException
static KeyFactory | KeyFactory.getInstance(String algorithm) Generates a KeyFactory object that implements the specified digest algorithm.
static KeyFactory | KeyFactory.getInstance(String algorithm, String provider) Generates a KeyFactory object for the specified algorithm from the specified provider.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm) Generates a KeyPairGenerator object that implements the specified digest algorithm.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm, String provider) Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
static SecureRandom | SecureRandom.getInstance(String algorithm) Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm.
static SecureRandom | SecureRandom.getInstance(String algorithm, String provider) Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm) Generates a parameter object for the specified algorithm.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm, String provider) Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm) Generates an AlgorithmParameterGenerator object that implements the specified digest algorithm.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm, String provider) Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
Key | KeyStore.getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
void | KeyStore.store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
void | KeyStore.load(InputStream stream, char[] password) Loads this KeyStore from the given input stream.
abstract Key | KeyStoreSpi.engineGetKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
abstract void | KeyStoreSpi.engineStore(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
abstract void | KeyStoreSpi.engineLoad(InputStream stream, char[] password) Loads the keystore from the given input stream.
static MessageDigest | MessageDigest.getInstance(String algorithm) Generates a MessageDigest object that implements the specified digest algorithm.
static MessageDigest | MessageDigest.getInstance(String algorithm, String provider) Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
static Signature | Signature.getInstance(String algorithm) Generates a Signature object that implements the specified digest algorithm.
static Signature | Signature.getInstance(String algorithm, String provider) Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.

Uses of NoSuchAlgorithmException in java.security.cert

Methods in java.security.cert that throw NoSuchAlgorithmException
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.NoSuchProviderException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.NoSuchProviderException

Packages that use NoSuchProviderException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of NoSuchProviderException in java.security

Methods in java.security that throw NoSuchProviderException
static KeyFactory | KeyFactory.getInstance(String algorithm, String provider) Generates a KeyFactory object for the specified algorithm from the specified provider.
static KeyPairGenerator | KeyPairGenerator.getInstance(String algorithm, String provider) Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
static SecureRandom | SecureRandom.getInstance(String algorithm, String provider) Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.
static AlgorithmParameters | AlgorithmParameters.getInstance(String algorithm, String provider) Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.
static AlgorithmParameterGenerator | AlgorithmParameterGenerator.getInstance(String algorithm, String provider) Generates an AlgorithmParameterGenerator object for the requested algorithm, as supplied from the specified provider, if such a parameter generator is available from the provider.
static KeyStore | KeyStore.getInstance(String type, String provider) Generates a keystore object for the specified keystore type from the specified provider.
static MessageDigest | MessageDigest.getInstance(String algorithm, String provider) Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
static Signature | Signature.getInstance(String algorithm, String provider) Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.

Uses of NoSuchProviderException in java.security.cert

Methods in java.security.cert that throw NoSuchProviderException
static CertificateFactory | CertificateFactory.getInstance(String type, String provider) Generates a certificate factory object for the specified certificate type from the specified provider.
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Permission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Permission

Packages that use Permission
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Permission in java.awt

Subclasses of Permission in java.awt
 class AWTPermission
This class is for AWT permissions.

Uses of Permission in java.io

Subclasses of Permission in java.io
class | FilePermission This class represents access to a file or directory.
class | SerializablePermission This class is for Serializable permissions.

Methods in java.io with parameters of type Permission
 boolean FilePermission.implies(Permission p)
Checks if this FilePermission object "implies" the specified permission.

Uses of Permission in java.lang

Subclasses of Permission in java.lang
 class RuntimePermission
This class is for runtime permissions.

Methods in java.lang with parameters of type Permission
void | SecurityManager.checkPermission(Permission perm) Throws a SecurityException if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.
void | SecurityManager.checkPermission(Permission perm, Object context) Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission.

Uses of Permission in java.lang.reflect

Subclasses of Permission in java.lang.reflect
 class ReflectPermission
The Permission class for reflective operations.

Uses of Permission in java.net

Subclasses of Permission in java.net
class | NetPermission This class is for various network permissions.
class | SocketPermission This class represents access to a network via sockets.

Methods in java.net that return Permission
Permission | URLConnection.getPermission() Returns a permission object representing the permission necessary to make the connection represented by this object.
Permission | HttpURLConnection.getPermission()

Methods in java.net with parameters of type Permission
 boolean SocketPermission.implies(Permission p)
Checks if this socket permission object "implies" the specified permission.

Uses of Permission in java.security

Subclasses of Permission in java.security
class | AllPermission The AllPermission is a permission that implies all other permissions.
class | BasicPermission The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
class | SecurityPermission This class is for security permissions.
class | UnresolvedPermission The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.

Methods in java.security that return Permission
 Permission AccessControlException.getPermission()
Gets the Permission object associated with this exeception, or null if there was no corresponding Permission object.

Methods in java.security with parameters of type Permission
abstract boolean | Permission.implies(Permission permission) Checks if the specified permission's actions are "implied by" this object's actions.
boolean | BasicPermission.implies(Permission p) Checks if the specified permission is "implied" by this object.
boolean | UnresolvedPermission.implies(Permission p) This method always returns false for unresolved permissions.
static void | AccessController.checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect.
void | AccessControlContext.checkPermission(Permission perm) Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.
boolean | AllPermission.implies(Permission p) Checks if the specified permission is "implied" by this object.
boolean | ProtectionDomain.implies(Permission permission) Check and see if this ProtectionDomain implies the permissions expressed in the Permission object.
abstract void | PermissionCollection.add(Permission permission) Adds a permission object to the current collection of permission objects.
abstract boolean | PermissionCollection.implies(Permission permission) Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
void | Permissions.add(Permission permission) Adds a permission object to the PermissionCollection for the class the permission belongs to.
boolean | Permissions.implies(Permission permission) Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object.

Constructors in java.security with parameters of type Permission
AccessControlException(String s, Permission p)
Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.

Uses of Permission in java.sql

Subclasses of Permission in java.sql
 class SQLPermission
The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.

Uses of Permission in java.util

Subclasses of Permission in java.util
 class PropertyPermission
This class is for property permissions.

Methods in java.util with parameters of type Permission
 boolean PropertyPermission.implies(Permission p)
Checks if this PropertyPermission object "implies" the specified permission.

Uses of Permission in javax.sound.sampled

Subclasses of Permission in javax.sound.sampled
 class AudioPermission
The AudioPermission class represents access rights to the audio system resources.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.PermissionCollection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.PermissionCollection

Packages that use PermissionCollection
java.io | Provides for system input and output through data streams, serialization and the file system.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of PermissionCollection in java.io

Methods in java.io that return PermissionCollection
 PermissionCollection FilePermission.newPermissionCollection()
Returns a new PermissionCollection object for storing FilePermission objects.

Uses of PermissionCollection in java.net

Methods in java.net that return PermissionCollection
protected PermissionCollection | URLClassLoader.getPermissions(CodeSource codesource) Returns the permissions for the given codesource object.
PermissionCollection | SocketPermission.newPermissionCollection() Returns a new PermissionCollection object for storing SocketPermission objects.

Uses of PermissionCollection in java.security

Subclasses of PermissionCollection in java.security
 class Permissions
This class represents a heterogeneous collection of Permissions.

Methods in java.security that return PermissionCollection
PermissionCollection | Permission.newPermissionCollection() Returns an empty PermissionCollection for a given Permission object, or null if one is not defined.
PermissionCollection | BasicPermission.newPermissionCollection() Returns a new PermissionCollection object for storing BasicPermission objects.
protected PermissionCollection | SecureClassLoader.getPermissions(CodeSource codesource) Returns the permissions for the given CodeSource object.
PermissionCollection | UnresolvedPermission.newPermissionCollection() Returns a new PermissionCollection object for storing UnresolvedPermission objects.
PermissionCollection | AllPermission.newPermissionCollection() Returns a new PermissionCollection object for storing AllPermission objects.
PermissionCollection | ProtectionDomain.getPermissions() Returns the permissions of this domain.
abstract PermissionCollection | Policy.getPermissions(CodeSource codesource) Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.

Constructors in java.security with parameters of type PermissionCollection
ProtectionDomain(CodeSource codesource, PermissionCollection permissions)
Creates a new ProtectionDomain with the given CodeSource and Permissions.

Uses of PermissionCollection in java.util

Methods in java.util that return PermissionCollection
 PermissionCollection PropertyPermission.newPermissionCollection()
Returns a new PermissionCollection object for storing PropertyPermission objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Policy

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Policy

Packages that use Policy
java.security Provides the classes and interfaces for the security framework.

Uses of Policy in java.security

Methods in java.security that return Policy
static Policy Policy.getPolicy()
Returns the installed Policy object.

Methods in java.security with parameters of type Policy
static void Policy.setPolicy(Policy policy)
Sets the system-wide Policy object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.PrivilegedActionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.PrivilegedActionException

Packages that use PrivilegedActionException
java.security Provides the classes and interfaces for the security framework.

Uses of PrivilegedActionException in java.security

Methods in java.security that throw PrivilegedActionException
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action) Performs the specified PrivilegedExceptionAction with privileges enabled.
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.ProtectionDomain

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.ProtectionDomain

Packages that use ProtectionDomain
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.security | Provides the classes and interfaces for the security framework.

Uses of ProtectionDomain in java.lang

Methods in java.lang that return ProtectionDomain
 ProtectionDomain Class.getProtectionDomain()
Returns the ProtectionDomain of this class.

Methods in java.lang with parameters of type ProtectionDomain
protected  Class ClassLoader.defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.

Uses of ProtectionDomain in java.security

Methods in java.security that return ProtectionDomain
 ProtectionDomain[] DomainCombiner.combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
Modify or update the provided ProtectionDomains.

Methods in java.security with parameters of type ProtectionDomain
 ProtectionDomain[] DomainCombiner.combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
Modify or update the provided ProtectionDomains.

Constructors in java.security with parameters of type ProtectionDomain
AccessControlContext(ProtectionDomain[] context)
Create an AccessControlContext with the given set of ProtectionDomains.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Provider

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Provider

Packages that use Provider
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of Provider in java.security

Methods in java.security that return Provider
Provider | KeyFactory.getProvider() Returns the provider of this key factory object.
Provider | KeyPairGenerator.getProvider() Returns the provider of this key pair generator object.
Provider | SecureRandom.getProvider() Returns the provider of this SecureRandom object.
Provider | AlgorithmParameters.getProvider() Returns the provider of this parameter object.
Provider | AlgorithmParameterGenerator.getProvider() Returns the provider of this algorithm parameter generator object.
Provider | KeyStore.getProvider() Returns the provider of this keystore.
static Provider[] | Security.getProviders() Returns an array containing all the installed providers.
static Provider | Security.getProvider(String name) Returns the provider installed with the specified name, if any.
static Provider[] | Security.getProviders(String filter) Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed.
static Provider[] | Security.getProviders(Map filter) Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.
Provider | MessageDigest.getProvider() Returns the provider of this message digest object.
Provider | Signature.getProvider() Returns the provider of this signature object.

Methods in java.security with parameters of type Provider
static int | Security.insertProviderAt(Provider provider, int position) Adds a new provider, at a specified position.
static int | Security.addProvider(Provider provider) Adds a provider to the next position available.

Constructors in java.security with parameters of type Provider
KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Creates a KeyFactory object.
SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider)
Creates a SecureRandom object.
AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm)
Creates an AlgorithmParameters object.
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, String algorithm)
Creates an AlgorithmParameterGenerator object.
KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.

Uses of Provider in java.security.cert

Methods in java.security.cert that return Provider
 Provider CertificateFactory.getProvider()
Returns the provider of this certificate factory.

Constructors in java.security.cert with parameters of type Provider
CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)
Creates a CertificateFactory object of the given type, and encapsulates the given provider implementation (SPI object) in it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SecureClassLoader

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SecureClassLoader

Packages that use SecureClassLoader
java.net Provides the classes for implementing networking applications.

Uses of SecureClassLoader in java.net

Subclasses of SecureClassLoader in java.net
 class URLClassLoader
This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SecureRandom

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SecureRandom

Packages that use SecureRandom
java.security | Provides the classes and interfaces for the security framework.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of SecureRandom in java.security

Fields in java.security declared as SecureRandom
protected  SecureRandom SignatureSpi.appRandom
Application-specified source of randomness.

Methods in java.security that return SecureRandom
static SecureRandom | SecureRandom.getInstance(String algorithm) Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm.
static SecureRandom | SecureRandom.getInstance(String algorithm, String provider) Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.

Methods in java.security with parameters of type SecureRandom
abstract void | KeyPairGeneratorSpi.initialize(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize, using the default parameter set.
void | KeyPairGeneratorSpi.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
void | KeyPairGenerator.initialize(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
void | KeyPairGenerator.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator with the given parameter set and source of randomness.
protected void | SignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random) Initializes this signature object with the specified private key and source of randomness for signing operations.
protected abstract void | AlgorithmParameterGeneratorSpi.engineInit(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.
protected abstract void | AlgorithmParameterGeneratorSpi.engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | AlgorithmParameterGenerator.init(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.
void | AlgorithmParameterGenerator.init(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | Signature.initSign(PrivateKey privateKey, SecureRandom random) Initialize this object for signing.

Uses of SecureRandom in java.security.interfaces

Methods in java.security.interfaces with parameters of type SecureRandom
void | DSAKeyPairGenerator.initialize(DSAParams params, SecureRandom random) Initializes the key pair generator using p, q and g, the DSA family parameters.
void | DSAKeyPairGenerator.initialize(int modlen, boolean genParams, SecureRandom random) Initializes the key pair generator for a given modulus length, without parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SecureRandomSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SecureRandomSpi

Packages that use SecureRandomSpi
java.security Provides the classes and interfaces for the security framework.

Uses of SecureRandomSpi in java.security

Constructors in java.security with parameters of type SecureRandomSpi
SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider)
Creates a SecureRandom object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.Signature

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.Signature

Packages that use Signature
java.security Provides the classes and interfaces for the security framework.

Uses of Signature in java.security

Methods in java.security that return Signature
static Signature | Signature.getInstance(String algorithm) Generates a Signature object that implements the specified digest algorithm.
static Signature | Signature.getInstance(String algorithm, String provider) Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.

Methods in java.security with parameters of type Signature
 boolean SignedObject.verify(PublicKey verificationKey, Signature verificationEngine)
Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.

Constructors in java.security with parameters of type Signature
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SignatureException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SignatureException

Packages that use SignatureException
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of SignatureException in java.security

Methods in java.security that throw SignatureException
protected abstract void | SignatureSpi.engineUpdate(byte b) Updates the data to be signed or verified using the specified byte.
protected abstract void | SignatureSpi.engineUpdate(byte[] b, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
protected abstract byte[] | SignatureSpi.engineSign() Returns the signature bytes of all the data updated so far.
protected int | SignatureSpi.engineSign(byte[] outbuf, int offset, int len) Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
protected abstract boolean | SignatureSpi.engineVerify(byte[] sigBytes) Verifies the passed-in signature.
boolean | SignedObject.verify(PublicKey verificationKey, Signature verificationEngine) Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
byte[] | Signature.sign() Returns the signature bytes of all the data updated.
int | Signature.sign(byte[] outbuf, int offset, int len) Finishes the signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
boolean | Signature.verify(byte[] signature) Verifies the passed-in signature.
void | Signature.update(byte b) Updates the data to be signed or verified by a byte.
void | Signature.update(byte[] data) Updates the data to be signed or verified, using the specified array of bytes.
void | Signature.update(byte[] data, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.

Constructors in java.security that throw SignatureException
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Uses of SignatureException in java.security.cert

Methods in java.security.cert that throw SignatureException
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.SignatureSpi

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.SignatureSpi

Packages that use SignatureSpi
java.security Provides the classes and interfaces for the security framework.

Uses of SignatureSpi in java.security

Subclasses of SignatureSpi in java.security
 class Signature
This Signature class is used to provide applications the functionality of a digital signature algorithm.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.UnrecoverableKeyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.UnrecoverableKeyException

Packages that use UnrecoverableKeyException
java.security Provides the classes and interfaces for the security framework.

Uses of UnrecoverableKeyException in java.security

Methods in java.security that throw UnrecoverableKeyException
Key | KeyStore.getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
abstract Key | KeyStoreSpi.engineGetKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.Certificate

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.Certificate

Packages that use Certificate
java.security Provides the classes and interfaces for the security framework.

Uses of Certificate in java.security

Methods in java.security that return Certificate
 Certificate[] Identity.certificates()
Deprecated. Returns a copy of all the certificates for this identity.

Methods in java.security with parameters of type Certificate
void | Identity.addCertificate(Certificate certificate) Deprecated. Adds a certificate for this identity.
void | Identity.removeCertificate(Certificate certificate) Deprecated. Removes a certificate from this identity.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.DomainCombiner

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.DomainCombiner

Packages that use DomainCombiner
java.security Provides the classes and interfaces for the security framework.

Uses of DomainCombiner in java.security

Methods in java.security that return DomainCombiner
 DomainCombiner AccessControlContext.getDomainCombiner()
Get the DomainCombiner associated with this AccessControlContext.

Constructors in java.security with parameters of type DomainCombiner
AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
Create a new AccessControlContext with the given AccessControlContext and DomainCombiner.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.Guard

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.Guard

Packages that use Guard
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Guard in java.awt

Classes in java.awt that implement Guard
 class AWTPermission
This class is for AWT permissions.

Uses of Guard in java.io

Classes in java.io that implement Guard
class | FilePermission This class represents access to a file or directory.
class | SerializablePermission This class is for Serializable permissions.

Uses of Guard in java.lang

Classes in java.lang that implement Guard
 class RuntimePermission
This class is for runtime permissions.

Uses of Guard in java.lang.reflect

Classes in java.lang.reflect that implement Guard
 class ReflectPermission
The Permission class for reflective operations.

Uses of Guard in java.net

Classes in java.net that implement Guard
class | NetPermission This class is for various network permissions.
class | SocketPermission This class represents access to a network via sockets.

Uses of Guard in java.security

Classes in java.security that implement Guard
class | AllPermission The AllPermission is a permission that implies all other permissions.
class | BasicPermission The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
class | Permission Abstract class for representing access to a system resource.
class | SecurityPermission This class is for security permissions.
class | UnresolvedPermission The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.

Constructors in java.security with parameters of type Guard
GuardedObject(Object object, Guard guard)
Constructs a GuardedObject using the specified object and guard.

Uses of Guard in java.sql

Classes in java.sql that implement Guard
 class SQLPermission
The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.

Uses of Guard in java.util

Classes in java.util that implement Guard
 class PropertyPermission
This class is for property permissions.

Uses of Guard in javax.sound.sampled

Classes in javax.sound.sampled that implement Guard
 class AudioPermission
The AudioPermission class represents access rights to the audio system resources.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.Key

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.Key

Packages that use Key
java.security | Provides the classes and interfaces for the security framework.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of Key in java.security

Subinterfaces of Key in java.security
interface | PrivateKey A private key.
interface | PublicKey A public key.

Methods in java.security that return Key
Key | KeyFactory.translateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Key | KeyStore.getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
abstract Key | KeyStoreSpi.engineGetKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
protected abstract Key | KeyFactorySpi.engineTranslateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

Methods in java.security with parameters of type Key
KeySpec | KeyFactory.getKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
Key | KeyFactory.translateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
void | KeyStore.setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
abstract void | KeyStoreSpi.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
protected abstract KeySpec | KeyFactorySpi.engineGetKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
protected abstract Key | KeyFactorySpi.engineTranslateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

Uses of Key in java.security.interfaces

Subinterfaces of Key in java.security.interfaces
interface | DSAPrivateKey The standard interface to a DSA private key.
interface | DSAPublicKey The interface to a DSA public key.
interface | RSAPrivateCrtKey The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
interface | RSAPrivateKey The interface to an RSA private key.
interface | RSAPublicKey The interface to an RSA public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.Principal

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.Principal

Packages that use Principal
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.

Uses of Principal in java.security

Classes in java.security that implement Principal
class | Identity Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | IdentityScope Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.
class | Signer Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

Methods in java.security that return Principal
Principal | Certificate.getGuarantor() Deprecated. Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate.
Principal | Certificate.getPrincipal() Deprecated. Returns the principal of the principal-key pair being guaranteed by the guarantor.

Methods in java.security with parameters of type Principal
 Identity IdentityScope.getIdentity(Principal principal)
Deprecated. Retrieves the identity whose name is the same as that of the specified principal.

Uses of Principal in java.security.acl

Subinterfaces of Principal in java.security.acl
 interface Group
This interface is used to represent a group of principals.

Methods in java.security.acl that return Principal
 Principal AclEntry.getPrincipal()
Returns the principal for which permissions are granted or denied by this ACL entry.

Methods in java.security.acl with parameters of type Principal
boolean | AclEntry.setPrincipal(Principal user) Specifies the principal for which permissions are granted or denied by this ACL entry.
boolean | Group.addMember(Principal user) Adds the specified member to the group.
boolean | Group.removeMember(Principal user) Removes the specified member from the group.
boolean | Group.isMember(Principal member) Returns true if the passed principal is a member of the group.
boolean | Owner.addOwner(Principal caller, Principal owner) Adds an owner.
boolean | Owner.deleteOwner(Principal caller, Principal owner) Deletes an owner.
boolean | Owner.isOwner(Principal owner) Returns true if the given principal is an owner of the ACL.
void | Acl.setName(Principal caller, String name) Sets the name of this ACL.
boolean | Acl.addEntry(Principal caller, AclEntry entry) Adds an ACL entry to this ACL.
boolean | Acl.removeEntry(Principal caller, AclEntry entry) Removes an ACL entry from this ACL.
Enumeration | Acl.getPermissions(Principal user) Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group).
boolean | Acl.checkPermission(Principal principal, Permission permission) Checks whether or not the specified principal has the specified permission.

Uses of Principal in java.security.cert

Methods in java.security.cert that return Principal
abstract Principal | X509Certificate.getIssuerDN() Gets the issuer (issuer distinguished name) value from the certificate.
abstract Principal | X509Certificate.getSubjectDN() Gets the subject (subject distinguished name) value from the certificate.
abstract Principal | X509CRL.getIssuerDN() Gets the issuer (issuer distinguished name) value from the CRL.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.PrivateKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.PrivateKey

Packages that use PrivateKey
java.security | Provides the classes and interfaces for the security framework.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of PrivateKey in java.security

Methods in java.security that return PrivateKey
PrivateKey | KeyFactory.generatePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
PrivateKey | Signer.getPrivateKey() Deprecated. Returns this signer's private key.
PrivateKey | KeyPair.getPrivate() Returns a reference to the private key component of this key pair.
protected abstract PrivateKey | KeyFactorySpi.engineGeneratePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).

Methods in java.security with parameters of type PrivateKey
protected abstract void | SignatureSpi.engineInitSign(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.
protected void | SignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random) Initializes this signature object with the specified private key and source of randomness for signing operations.
void | Signature.initSign(PrivateKey privateKey) Initialize this object for signing.
void | Signature.initSign(PrivateKey privateKey, SecureRandom random) Initialize this object for signing.

Constructors in java.security with parameters of type PrivateKey
KeyPair(PublicKey publicKey, PrivateKey privateKey)
Constructs a key pair from the given public key and private key.
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.

Uses of PrivateKey in java.security.interfaces

Subinterfaces of PrivateKey in java.security.interfaces
interface | DSAPrivateKey The standard interface to a DSA private key.
interface | RSAPrivateCrtKey The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
interface | RSAPrivateKey The interface to an RSA private key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.PrivilegedAction

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.PrivilegedAction

Packages that use PrivilegedAction
java.security Provides the classes and interfaces for the security framework.

Uses of PrivilegedAction in java.security

Methods in java.security with parameters of type PrivilegedAction
static Object | AccessController.doPrivileged(PrivilegedAction action) Performs the specified PrivilegedAction with privileges enabled.
static Object | AccessController.doPrivileged(PrivilegedAction action, AccessControlContext context) Performs the specified PrivilegedAction with privileges enabled and restricted by the specified AccessControlContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.PrivilegedExceptionAction

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.PrivilegedExceptionAction

Packages that use PrivilegedExceptionAction
java.security Provides the classes and interfaces for the security framework.

Uses of PrivilegedExceptionAction in java.security

Methods in java.security with parameters of type PrivilegedExceptionAction
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action) Performs the specified PrivilegedExceptionAction with privileges enabled.
static Object | AccessController.doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) Performs the specified PrivilegedExceptionAction with privileges enabled and restricted by the specified AccessControlContext.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.PublicKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.PublicKey

Packages that use PublicKey
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of PublicKey in java.security

Methods in java.security that return PublicKey
PublicKey | KeyFactory.generatePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
PublicKey | Identity.getPublicKey() Deprecated. Returns this identity's public key.
PublicKey | KeyPair.getPublic() Returns a reference to the public key component of this key pair.
PublicKey | Certificate.getPublicKey() Deprecated. Returns the key of the principal-key pair being guaranteed by the guarantor.
protected abstract PublicKey | KeyFactorySpi.engineGeneratePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).

Methods in java.security with parameters of type PublicKey
void | Identity.setPublicKey(PublicKey key) Deprecated. Sets this identity's public key.
protected abstract void | SignatureSpi.engineInitVerify(PublicKey publicKey) Initializes this signature object with the specified public key for verification operations.
boolean | SignedObject.verify(PublicKey verificationKey, Signature verificationEngine) Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
void | Signature.initVerify(PublicKey publicKey) Initializes this object for verification.
abstract Identity | IdentityScope.getIdentity(PublicKey key) Deprecated. Retrieves the identity with the specified public key.

Constructors in java.security with parameters of type PublicKey
KeyPair(PublicKey publicKey, PrivateKey privateKey)
Constructs a key pair from the given public key and private key.

Uses of PublicKey in java.security.cert

Methods in java.security.cert that return PublicKey
abstract  PublicKey Certificate.getPublicKey()
Gets the public key from this certificate.

Methods in java.security.cert with parameters of type PublicKey
abstract void | Certificate.verify(PublicKey key) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | Certificate.verify(PublicKey key, String sigProvider) Verifies that this certificate was signed using the private key that corresponds to the specified public key.
abstract void | X509CRL.verify(PublicKey key) Verifies that this CRL was signed using the private key that corresponds to the given public key.
abstract void | X509CRL.verify(PublicKey key, String sigProvider) Verifies that this CRL was signed using the private key that corresponds to the given public key.

Uses of PublicKey in java.security.interfaces

Subinterfaces of PublicKey in java.security.interfaces
interface | DSAPublicKey The interface to a DSA public key.
interface | RSAPublicKey The interface to an RSA public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CodeSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class CodeSource

java.lang.Object
  |
  +--java.security.CodeSource
All Implemented Interfaces:
Serializable
public class CodeSource
extends Object
implements Serializable

This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.

See Also:
Serialized Form

Constructor Summary
CodeSource(URL url, Certificate[] certs)
Constructs a CodeSource and associates it with the specified location and set of certificates.
Method Summary
boolean | equals(Object obj) Tests for equality between the specified object and this object.
Certificate[] | getCertificates() Returns the certificates associated with this CodeSource.
URL | getLocation() Returns the location associated with this CodeSource.
int | hashCode() Returns the hash code value for this object.
boolean | implies(CodeSource codesource) Returns true if this CodeSource object "implies" the specified CodeSource.
String | toString() Returns a string describing this CodeSource, telling its URL and certificates.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CodeSource

public CodeSource(URL url,
                  Certificate[] certs)
Constructs a CodeSource and associates it with the specified location and set of certificates.
Parameters:
url - the location (URL).
certs - the certificate(s).
Method Detail

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Tests for equality between the specified object and this object. Two CodeSource objects are considered equal if their locations are of identical value and if the two sets of certificates are of identical values. It is not required that the certificates be in the same order.
Overrides:
equals in class Object
Parameters:
obj - the object to test for equality with this object.
Returns:
true if the objects are considered equal, false otherwise.

getLocation

public final URL getLocation()
Returns the location associated with this CodeSource.
Returns:
the location (URL).

getCertificates

public final Certificate[] getCertificates()
Returns the certificates associated with this CodeSource.
Returns:
the certificates

implies

public boolean implies(CodeSource codesource)
Returns true if this CodeSource object "implies" the specified CodeSource.

More specifically, this method makes the following checks, in order. If any fail, it returns false. If they all succeed, it returns true.

  1. codesource must not be null.
  2. If this object's certificates are not null, then all of this object's certificates must be present in codesource's certificates.
  3. If this object's location (getLocation()) is not null, then the following checks are made against this object's location and codesource's:

    1. codesource's location must not be null.
    2. If this object's location equals codesource's location, then return true.
    3. This object's protocol (getLocation().getProtocol()) must be equal to codesource's protocol.
    4. If this object's host (getLocation().getHost()) is not null, then the SocketPermission constructed with this object's host must imply the SocketPermission constructed with codesource's host.
    5. If this object's port (getLocation().getPort()) is not equal to -1 (that is, if a port is specified), it must equal codesource's port.
    6. If this object's file (getLocation().getFile()) doesn't equal codesource's file, then the following checks are made: If this object's file ends with "/-", then codesource's file must start with this object's file (exclusive the trailing "-"). If this object's file ends with a "/*", then codesource's file must start with this object's file and must not have any further "/" separators. If this object's file doesn't end with a "/", then codesource's file must match this object's file with a '/' appended.
    7. If this object's reference (getLocation().getRef()) is not null, it must equal codesource's reference.

For example, the codesource objects with the following locations and null certificates all imply the codesource with the location "http://java.sun.com/classes/foo.jar" and null certificates:

     http:
     http://*.sun.com/classes/*
     http://java.sun.com/classes/-
     http://java.sun.com/classes/foo.jar
Parameters:
codesource - CodeSource to compare against.
Returns:
true if the specified codesource is implied by this codesource, false if not.

toString

public String toString()
Returns a string describing this CodeSource, telling its URL and certificates.
Overrides:
toString in class Object
Returns:
information about this CodeSource.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DigestException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class DigestException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.DigestException
All Implemented Interfaces:
Serializable
public class DigestException
extends GeneralSecurityException

This is the generic Message Digest exception.

See Also:
Serialized Form

Constructor Summary
DigestException()
Constructs a DigestException with no detail message.
DigestException(String msg)
Constructs a DigestException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DigestException

public DigestException()
Constructs a DigestException with no detail message. (A detail message is a String that describes this particular exception.)

DigestException

public DigestException(String msg)
Constructs a DigestException with the specified detail message. (A detail message is a String that describes this particular exception.)
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DigestInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class DigestInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.security.DigestInputStream
public class DigestInputStream
extends FilterInputStream

A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest input stream's read methods.

It is possible to turn this stream on or off (see on). When it is on, a call to one of the read methods results in an update on the message digest. But when it is off, the message digest is not updated. The default is for the stream to be on.

Note that digest objects can compute only one digest (see MessageDigest), so that in order to compute intermediate digests, a caller should retain a handle onto the digest object, and clone it for each digest to be computed, leaving the orginal digest untouched.

See Also:
MessageDigest, DigestOutputStream

Field Summary
protected  MessageDigest digest
The message digest associated with this stream.
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
DigestInputStream(InputStream stream, MessageDigest digest)
Creates a digest input stream, using the specified input stream and message digest.
Method Summary
MessageDigest | getMessageDigest() Returns the message digest associated with this stream.
void | on(boolean on) Turns the digest function on or off.
int | read() Reads a byte, and updates the message digest (if the digest function is on).
int | read(byte[] b, int off, int len) Reads into a byte array, and updates the message digest (if the digest function is on).
void | setMessageDigest(MessageDigest digest) Associates the specified message digest with this stream.
String | toString() Prints a string representation of this digest input stream and its associated message digest object.
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

digest

protected MessageDigest digest
The message digest associated with this stream.
Constructor Detail

DigestInputStream

public DigestInputStream(InputStream stream,
                         MessageDigest digest)
Creates a digest input stream, using the specified input stream and message digest.
Parameters:
stream - the input stream.
digest - the message digest to associate with this stream.
Method Detail

getMessageDigest

public MessageDigest getMessageDigest()
Returns the message digest associated with this stream.
Returns:
the message digest associated with this stream.
See Also:
setMessageDigest(java.security.MessageDigest)

setMessageDigest

public void setMessageDigest(MessageDigest digest)
Associates the specified message digest with this stream.
Parameters:
digest - the message digest to be associated with this stream.
See Also:
getMessageDigest()

read

public int read()
         throws IOException
Reads a byte, and updates the message digest (if the digest function is on). That is, this method reads a byte from the input stream, blocking until the byte is actually read. If the digest function is on (see on), this method will then call update on the message digest associated with this stream, passing it the byte read.
Overrides:
read in class FilterInputStream
Returns:
the byte read.
Throws:
IOException - if an I/O error occurs.
See Also:
MessageDigest.update(byte)

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads into a byte array, and updates the message digest (if the digest function is on). That is, this method reads up to len bytes from the input stream into the array b, starting at offset off. This method blocks until the data is actually read. If the digest function is on (see on), this method will then call update on the message digest associated with this stream, passing it the data.
Overrides:
read in class FilterInputStream
Parameters:
b - the array into which the data is read.
off - the starting offset into b of where the data should be placed.
len - the maximum number of bytes to be read from the input stream into b, starting at offset off.
Returns:
the actual number of bytes read. This is less than len if the end of the stream is reached prior to reading len bytes. -1 is returned if no bytes were read because the end of the stream had already been reached when the call was made.
Throws:
IOException - if an I/O error occurs.
See Also:
MessageDigest.update(byte[], int, int)

on

public void on(boolean on)
Turns the digest function on or off. The default is on. When it is on, a call to one of the read methods results in an update on the message digest. But when it is off, the message digest is not updated.
Parameters:
on - true to turn the digest function on, false to turn it off.

toString

public String toString()
Prints a string representation of this digest input stream and its associated message digest object.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DigestOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class DigestOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.security.DigestOutputStream
public class DigestOutputStream
extends FilterOutputStream

A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest ouput stream's write methods.

It is possible to turn this stream on or off (see on). When it is on, a call to one of the write methods results in an update on the message digest. But when it is off, the message digest is not updated. The default is for the stream to be on.

See Also:
MessageDigest, DigestInputStream

Field Summary
protected  MessageDigest digest
The message digest associated with this stream.
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
DigestOutputStream(OutputStream stream, MessageDigest digest)
Creates a digest output stream, using the specified output stream and message digest.
Method Summary
MessageDigest | getMessageDigest() Returns the message digest associated with this stream.
void | on(boolean on) Turns the digest function on or off.
void | setMessageDigest(MessageDigest digest) Associates the specified message digest with this stream.
String | toString() Prints a string representation of this digest output stream and its associated message digest object.
void | write(byte[] b, int off, int len) Updates the message digest (if the digest function is on) using the specified subarray, and in any case writes the subarray to the output stream.
void | write(int b) Updates the message digest (if the digest function is on) using the specified byte, and in any case writes the byte to the output stream.
Methods inherited from class java.io.FilterOutputStream
close, flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

digest

protected MessageDigest digest
The message digest associated with this stream.
Constructor Detail

DigestOutputStream

public DigestOutputStream(OutputStream stream,
                          MessageDigest digest)
Creates a digest output stream, using the specified output stream and message digest.
Parameters:
stream - the output stream.
digest - the message digest to associate with this stream.
Method Detail

getMessageDigest

public MessageDigest getMessageDigest()
Returns the message digest associated with this stream.
Returns:
the message digest associated with this stream.
See Also:
setMessageDigest(java.security.MessageDigest)

setMessageDigest

public void setMessageDigest(MessageDigest digest)
Associates the specified message digest with this stream.
Parameters:
digest - the message digest to be associated with this stream.
See Also:
getMessageDigest()

write

public void write(int b)
           throws IOException
Updates the message digest (if the digest function is on) using the specified byte, and in any case writes the byte to the output stream. That is, if the digest function is on (see on), this method calls update on the message digest associated with this stream, passing it the byte b. This method then writes the byte to the output stream, blocking until the byte is actually written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be used for updating and writing to the output stream.
Throws:
IOException - if an I/O error occurs.
See Also:
MessageDigest.update(byte)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Updates the message digest (if the digest function is on) using the specified subarray, and in any case writes the subarray to the output stream. That is, if the digest function is on (see on), this method calls update on the message digest associated with this stream, passing it the subarray specifications. This method then writes the subarray bytes to the output stream, blocking until the bytes are actually written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the array containing the subarray to be used for updating and writing to the output stream.
off - the offset into b of the first byte to be updated and written.
len - the number of bytes of data to be updated and written from b, starting at offset off.
Throws:
IOException - if an I/O error occurs.
See Also:
MessageDigest.update(byte[], int, int)

on

public void on(boolean on)
Turns the digest function on or off. The default is on. When it is on, a call to one of the write methods results in an update on the message digest. But when it is off, the message digest is not updated.
Parameters:
on - true to turn the digest function on, false to turn it off.

toString

public String toString()
Prints a string representation of this digest output stream and its associated message digest object.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DomainCombiner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface DomainCombiner

public interface DomainCombiner

A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.

A DomainCombiner is passed as a parameter to the appropriate constructor for AccessControlContext. The newly constructed context is then passed to the AccessController.doPrivileged(..., context) method to bind the provided context (and associated DomainCombiner) with the current execution Thread. Subsequent calls to AccessController.getContext or AccessController.checkPermission cause the DomainCombiner.combine to get invoked.

The combine method takes two arguments. The ProtectionDomains on the current execution Thread, since the most recent call to AccessController.doPrivileged, get passed to the first argument in an array. If no call to doPrivileged was made, then all the ProtectionDomains from the current execution Thread get passed to the first argument. The ProtectionDomains inherited from the parent Thread get passed to the second argument, unless a call to doPrivileged(..., context) had occurred. In that case, the ProtectionDomains from the privileged context are passed to the second argument.

The combine method investigates the two input arrays of ProtectionDomains and returns a single array containing the updated ProtectionDomains. In the simplest case, the combine method merges the two stacks into one. In more complex cases, the combine method returns a modified stack of ProtectionDomains. The modification may have added new ProtectionDomains, removed certain ProtectionDomains, or simply updated existing ProtectionDomains. Re-ordering and other optimizations to the ProtectionDomains are also permitted. Typically the combine method bases its updates on the information encapsulated in the DomainCombiner.

After the AccessController.getContext method receives the combined stack of ProtectionDomains back from the DomainCombiner, it returns a new AccessControlContext that has both the combined ProtectionDomains as well as the DomainCombiner.

See Also:
AccessController, AccessControlContext

Method Summary
 ProtectionDomain[] combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains)
Modify or update the provided ProtectionDomains.

Method Detail

combine

public ProtectionDomain[] combine(ProtectionDomain[] currentDomains,
                                  ProtectionDomain[] assignedDomains)
Modify or update the provided ProtectionDomains. ProtectionDomains may be added to or removed from the given ProtectionDomains. The ProtectionDomains may be re-ordered. Individual ProtectionDomains may be may be modified (with a new set of Permissions, for example).

Parameters:
currentDomains - the ProtectionDomains associated with the current execution Thread, up to the most recent privileged ProtectionDomain. The ProtectionDomains are are listed in order of execution, with the most recently executing ProtectionDomain residing at the beginning of the array. This parameter may be null if the current execution Thread has no associated ProtectionDomains.

assignedDomains - the ProtectionDomains inherited from the parent Thread, or the ProtectionDomains from the privileged context, if a call to AccessController.doPrivileged(..., context) had occurred This parameter may be null if there were no ProtectionDomains inherited from the parent Thread, or from the privileged context.
Returns:
a new array consisting of the updated ProtectionDomains, or null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GeneralSecurityException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class GeneralSecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CertificateException, CRLException, DigestException, InvalidAlgorithmParameterException, InvalidKeySpecException, InvalidParameterSpecException, KeyException, KeyStoreException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException, UnrecoverableKeyException
public class GeneralSecurityException
extends Exception

This is the general security exception class, which serves to group all the exception classes of the java.security package that extend from it. (Exceptions are AccessControlException and CertificateException, which subclass from java.lang.SecurityException, and ProviderException and InvalidParameterException, which subclass from java.lang.RuntimeException.)

See Also:
Serialized Form

Constructor Summary
GeneralSecurityException()
Constructs a GeneralSecurityException with no detail message.
GeneralSecurityException(String msg)
Constructs a GeneralSecurityException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

GeneralSecurityException

public GeneralSecurityException()
Constructs a GeneralSecurityException with no detail message.

GeneralSecurityException

public GeneralSecurityException(String msg)
Constructs a GeneralSecurityException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Guard

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface Guard

All Known Implementing Classes:
Permission
public interface Guard

This interface represents a guard, which is an object that is used to protect access to another object.

This interface contains a single method, checkGuard, with a single object argument. checkGuard is invoked (by the GuardedObject getObject method) to determine whether or not to allow access to the object.

See Also:
GuardedObject

Method Summary
 void checkGuard(Object object)
Determines whether or not to allow access to the guarded object object.

Method Detail

checkGuard

public void checkGuard(Object object)
                throws SecurityException
Determines whether or not to allow access to the guarded object object. Returns silently if access is allowed. Otherwise, throws a SecurityException.
Parameters:
object - the object being protected by the guard.
Throws:
SecurityException - if access is denied.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GuardedObject

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class GuardedObject

java.lang.Object
  |
  +--java.security.GuardedObject
All Implemented Interfaces:
Serializable
public class GuardedObject
extends Object
implements Serializable

A GuardedObject is an object that is used to protect access to another object.

A GuardedObject encapsulates a target object and a Guard object, such that access to the target object is possible only if the Guard object allows it. Once an object is encapsulated by a GuardedObject, access to that object is controlled by the getObject method, which invokes the checkGuard method on the Guard object that is guarding access. If access is not allowed, an exception is thrown.

See Also:
Guard, Permission, Serialized Form

Constructor Summary
GuardedObject(Object object, Guard guard)
Constructs a GuardedObject using the specified object and guard.
Method Summary
 Object getObject()
Retrieves the guarded object, or throws an exception if access to the guarded object is denied by the guard.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GuardedObject

public GuardedObject(Object object,
                     Guard guard)
Constructs a GuardedObject using the specified object and guard. If the Guard object is null, then no restrictions will be placed on who can access the object.
Parameters:
object - the object to be guarded.
guard - the Guard object that guards access to the object.
Method Detail

getObject

public Object getObject()
                 throws SecurityException
Retrieves the guarded object, or throws an exception if access to the guarded object is denied by the guard.
Returns:
the guarded object.
Throws:
SecurityException - if access to the guarded object is denied.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Identity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Identity

java.lang.Object
  |
  +--java.security.Identity
All Implemented Interfaces:
Principal, Serializable
Direct Known Subclasses:
IdentityScope, Signer
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

public abstract class Identity
extends Object
implements Principal, Serializable

This class represents identities: real-world objects such as people, companies or organizations whose identities can be authenticated using their public keys. Identities may also be more abstract (or concrete) constructs, such as daemon threads or smart cards.

All Identity objects have a name and a public key. Names are immutable. Identities may also be scoped. That is, if an Identity is specified to have a particular scope, then the name and public key of the Identity are unique within that scope.

An Identity also has a set of certificates (all certifying its own public key). The Principal names specified in these certificates need not be the same, only the key.

An Identity can be subclassed, to include postal and email addresses, telephone numbers, images of faces and logos, and so on.

See Also:
IdentityScope, Signer, Principal, Serialized Form

Constructor Summary
protected | Identity() Deprecated. Constructor for serialization only.
 | Identity(String name) Deprecated. Constructs an identity with the specified name and no scope.
 | Identity(String name, IdentityScope scope) Deprecated. Constructs an identity with the specified name and scope.
Method Summary
void | addCertificate(Certificate certificate) Deprecated. Adds a certificate for this identity.
Certificate[] | certificates() Deprecated. Returns a copy of all the certificates for this identity.
boolean | equals(Object identity) Deprecated. Tests for equality between the specified object and this identity.
String | getInfo() Deprecated. Returns general information previously specified for this identity.
String | getName() Deprecated. Returns this identity's name.
PublicKey | getPublicKey() Deprecated. Returns this identity's public key.
IdentityScope | getScope() Deprecated. Returns this identity's scope.
int | hashCode() Deprecated. Returns a hashcode for this identity.
protected boolean | identityEquals(Identity identity) Deprecated. Tests for equality between the specified identity and this identity.
void | removeCertificate(Certificate certificate) Deprecated. Removes a certificate from this identity.
void | setInfo(String info) Deprecated. Specifies a general information string for this identity.
void | setPublicKey(PublicKey key) Deprecated. Sets this identity's public key.
String | toString() Deprecated. Returns a short string describing this identity, telling its name and its scope (if any).
String | toString(boolean detailed) Deprecated. Returns a string representation of this identity, with optionally more details than that provided by the toString method without any arguments.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Identity

protected Identity()
Deprecated.
Constructor for serialization only.

Identity

public Identity(String name,
                IdentityScope scope)
         throws KeyManagementException
Deprecated.
Constructs an identity with the specified name and scope.
Parameters:
name - the identity name.
scope - the scope of the identity.
Throws:
KeyManagementException - if there is already an identity with the same name in the scope.

Identity

public Identity(String name)
Deprecated.
Constructs an identity with the specified name and no scope.
Parameters:
name - the identity name.
Method Detail

getName

public final String getName()
Deprecated.
Returns this identity's name.
Specified by:
getName in interface Principal
Returns:
the name of this identity.

getScope

public final IdentityScope getScope()
Deprecated.
Returns this identity's scope.
Returns:
the scope of this identity.

getPublicKey

public PublicKey getPublicKey()
Deprecated.
Returns this identity's public key.
Returns:
the public key for this identity.

setPublicKey

public void setPublicKey(PublicKey key)
                  throws KeyManagementException
Deprecated.
Sets this identity's public key. The old key and all of this identity's certificates are removed by this operation.

First, if there is a security manager, its checkSecurityAccess method is called with "setIdentityPublicKey" as its argument to see if it's ok to set the public key.

Parameters:
key - the public key for this identity.
Throws:
KeyManagementException - if another identity in the identity's scope has the same public key, or if another exception occurs.
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the public key.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

setInfo

public void setInfo(String info)
Deprecated.
Specifies a general information string for this identity.

First, if there is a security manager, its checkSecurityAccess method is called with "setIdentityInfo" as its argument to see if it's ok to specify the information string.

Parameters:
info - the information string.
Throws:
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the information string.
See Also:
getInfo(), SecurityManager.checkSecurityAccess(java.lang.String)

getInfo

public String getInfo()
Deprecated.
Returns general information previously specified for this identity.
Returns:
general information about this identity.
See Also:
setInfo(java.lang.String)

addCertificate

public void addCertificate(Certificate certificate)
                    throws KeyManagementException
Deprecated.
Adds a certificate for this identity. If the identity has a public key, the public key in the certificate must be the same, and if the identity does not have a public key, the identity's public key is set to be that specified in the certificate.

First, if there is a security manager, its checkSecurityAccess method is called with "addIdentityCertificate" as its argument to see if it's ok to add a certificate.

Parameters:
certificate - the certificate to be added.
Throws:
KeyManagementException - if the certificate is not valid, if the public key in the certificate being added conflicts with this identity's public key, or if another exception occurs.
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow adding a certificate.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

removeCertificate

public void removeCertificate(Certificate certificate)
                       throws KeyManagementException
Deprecated.
Removes a certificate from this identity.

First, if there is a security manager, its checkSecurityAccess method is called with "removeIdentityCertificate" as its argument to see if it's ok to remove a certificate.

Parameters:
certificate - the certificate to be removed.
Throws:
KeyManagementException - if the certificate is missing, or if another exception occurs.
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow removing a certificate.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

certificates

public Certificate[] certificates()
Deprecated.
Returns a copy of all the certificates for this identity.
Returns:
a copy of all the certificates for this identity.

equals

public final boolean equals(Object identity)
Deprecated.
Tests for equality between the specified object and this identity. This first tests to see if the entities actually refer to the same object, in which case it returns true. Next, it checks to see if the entities have the same name and the same scope. If they do, the method returns true. Otherwise, it calls identityEquals, which subclasses should override.
Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
identity - the object to test for equality with this identity.
Returns:
true if the objects are considered equal, false otherwise.
See Also:
identityEquals(java.security.Identity)

identityEquals

protected boolean identityEquals(Identity identity)
Deprecated.
Tests for equality between the specified identity and this identity. This method should be overriden by subclasses to test for equality. The default behavior is to return true if the names and public keys are equal.
Parameters:
identity - the identity to test for equality with this identity.
Returns:
true if the identities are considered equal, false otherwise.
See Also:
equals(java.lang.Object)

toString

public String toString()
Deprecated.
Returns a short string describing this identity, telling its name and its scope (if any).

First, if there is a security manager, its checkSecurityAccess method is called with "printIdentity" as its argument to see if it's ok to return the string.

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
information about this identity, such as its name and the name of its scope (if any).
Throws:
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow returning a string describing this identity.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

toString

public String toString(boolean detailed)
Deprecated.
Returns a string representation of this identity, with optionally more details than that provided by the toString method without any arguments.

First, if there is a security manager, its checkSecurityAccess method is called with "printIdentity" as its argument to see if it's ok to return the string.

Parameters:
detailed - whether or not to provide detailed information.
Returns:
information about this identity. If detailed is true, then this method returns more information than that provided by the toString method without any arguments.
Throws:
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow returning a string describing this identity.
See Also:
toString(), SecurityManager.checkSecurityAccess(java.lang.String)

hashCode

public int hashCode()
Deprecated.
Returns a hashcode for this identity.
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
a hashcode for this identity.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IdentityScope

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class IdentityScope

java.lang.Object
  |
  +--java.security.Identity
        |
        +--java.security.IdentityScope
All Implemented Interfaces:
Principal, Serializable
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

public abstract class IdentityScope
extends Identity

This class represents a scope for identities. It is an Identity itself, and therefore has a name and can have a scope. It can also optionally have a public key and associated certificates.

An IdentityScope can contain Identity objects of all kinds, including Signers. All types of Identity objects can be retrieved, added, and removed using the same methods. Note that it is possible, and in fact expected, that different types of identity scopes will apply different policies for their various operations on the various types of Identities.

There is a one-to-one mapping between keys and identities, and there can only be one copy of one key per scope. For example, suppose Acme Software, Inc is a software publisher known to a user. Suppose it is an Identity, that is, it has a public key, and a set of associated certificates. It is named in the scope using the name "Acme Software". No other named Identity in the scope has the same public key. Of course, none has the same name as well.

See Also:
Identity, Signer, Principal, Key, Serialized Form

Constructor Summary
protected | IdentityScope() Deprecated. This constructor is used for serialization only and should not be used by subclasses.
 | IdentityScope(String name) Deprecated. Constructs a new identity scope with the specified name.
 | IdentityScope(String name, IdentityScope scope) Deprecated. Constructs a new identity scope with the specified name and scope.
Method Summary
abstract void | addIdentity(Identity identity) Deprecated. Adds an identity to this identity scope.
Identity | getIdentity(Principal principal) Deprecated. Retrieves the identity whose name is the same as that of the specified principal.
abstract Identity | getIdentity(PublicKey key) Deprecated. Retrieves the identity with the specified public key.
abstract Identity | getIdentity(String name) Deprecated. Returns the identity in this scope with the specified name (if any).
static IdentityScope | getSystemScope() Deprecated. Returns the system's identity scope.
abstract Enumeration | identities() Deprecated. Returns an enumeration of all identities in this identity scope.
abstract void | removeIdentity(Identity identity) Deprecated. Removes an identity from this identity scope.
protected static void | setSystemScope(IdentityScope scope) Deprecated. Sets the system's identity scope.
abstract int | size() Deprecated. Returns the number of identities within this identity scope.
String | toString() Deprecated. Returns a string representation of this identity scope, including its name, its scope name, and the number of identities in this identity scope.
Methods inherited from class java.security.Identity
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IdentityScope

protected IdentityScope()
Deprecated.
This constructor is used for serialization only and should not be used by subclasses.

IdentityScope

public IdentityScope(String name)
Deprecated.
Constructs a new identity scope with the specified name.
Parameters:
name - the scope name.

IdentityScope

public IdentityScope(String name,
                     IdentityScope scope)
              throws KeyManagementException
Deprecated.
Constructs a new identity scope with the specified name and scope.
Parameters:
name - the scope name.
scope - the scope for the new identity scope.
Throws:
KeyManagementException - if there is already an identity with the same name in the scope.
Method Detail

getSystemScope

public static IdentityScope getSystemScope()
Deprecated.
Returns the system's identity scope.
Returns:
the system's identity scope.

setSystemScope

protected static void setSystemScope(IdentityScope scope)
Deprecated.
Sets the system's identity scope.

First, if there is a security manager, its checkSecurityAccess method is called with "setSystemScope" as its argument to see if it's ok to set the identity scope.

Parameters:
scope - the scope to set.
Throws:
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the identity scope.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

size

public abstract int size()
Deprecated.
Returns the number of identities within this identity scope.
Returns:
the number of identities within this identity scope.

getIdentity

public abstract Identity getIdentity(String name)
Deprecated.
Returns the identity in this scope with the specified name (if any).
Parameters:
name - the name of the identity to be retrieved.
Returns:
the identity named name, or null if there are no identities named name in this scope.

getIdentity

public Identity getIdentity(Principal principal)
Deprecated.
Retrieves the identity whose name is the same as that of the specified principal. (Note: Identity implements Principal.)
Parameters:
principal - the principal corresponding to the identity to be retrieved.
Returns:
the identity whose name is the same as that of the principal, or null if there are no identities of the same name in this scope.

getIdentity

public abstract Identity getIdentity(PublicKey key)
Deprecated.
Retrieves the identity with the specified public key.
Parameters:
key - the public key for the identity to be returned.
Returns:
the identity with the given key, or null if there are no identities in this scope with that key.

addIdentity

public abstract void addIdentity(Identity identity)
                          throws KeyManagementException
Deprecated.
Adds an identity to this identity scope.
Parameters:
identity - the identity to be added.
Throws:
KeyManagementException - if the identity is not valid, a name conflict occurs, another identity has the same public key as the identity being added, or another exception occurs.

removeIdentity

public abstract void removeIdentity(Identity identity)
                             throws KeyManagementException
Deprecated.
Removes an identity from this identity scope.
Parameters:
identity - the identity to be removed.
Throws:
KeyManagementException - if the identity is missing, or another exception occurs.

identities

public abstract Enumeration identities()
Deprecated.
Returns an enumeration of all identities in this identity scope.
Returns:
an enumeration of all identities in this identity scope.

toString

public String toString()
Deprecated.
Returns a string representation of this identity scope, including its name, its scope name, and the number of identities in this identity scope.
Overrides:
toString in class Identity
Returns:
a string representation of this identity scope.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.security.interfaces Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.security.interfaces

Package Hierarchies:
All Packages

Interface Hierarchy

  • interface java.security.interfaces.DSAKey
    • interface java.security.interfaces.DSAPrivateKey (also extends java.security.PrivateKey)
    • interface java.security.interfaces.DSAPublicKey (also extends java.security.PublicKey)
  • interface java.security.interfaces.DSAKeyPairGenerator
  • interface java.security.interfaces.DSAParams
  • interface java.security.interfaces.RSAKey
    • interface java.security.interfaces.RSAPrivateKey (also extends java.security.PrivateKey)
      • interface java.security.interfaces.RSAPrivateCrtKey
    • interface java.security.interfaces.RSAPublicKey (also extends java.security.PublicKey)
  • interface java.io.Serializable
    • interface java.security.Key
      • interface java.security.PrivateKey
        • interface java.security.interfaces.DSAPrivateKey (also extends java.security.interfaces.DSAKey)
        • interface java.security.interfaces.RSAPrivateKey (also extends java.security.interfaces.RSAKey)
          • interface java.security.interfaces.RSAPrivateCrtKey
      • interface java.security.PublicKey
        • interface java.security.interfaces.DSAPublicKey (also extends java.security.interfaces.DSAKey)
        • interface java.security.interfaces.RSAPublicKey (also extends java.security.interfaces.RSAKey)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.security.interfaces

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

See:
Description

Interface Summary
DSAKey | The interface to a DSA public or private key.
DSAKeyPairGenerator | An interface to an object capable of generating DSA key pairs.
DSAParams | Interface to a DSA-specific set of key parameters, which defines a DSA key family.
DSAPrivateKey | The standard interface to a DSA private key.
DSAPublicKey | The interface to a DSA public key.
RSAKey | The interface to an RSA public or private key.
RSAPrivateCrtKey | The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
RSAPrivateKey | The interface to an RSA private key.
RSAPublicKey | The interface to an RSA public key.

Package java.security.interfaces Description

Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.security.interfaces

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.security.interfaces

Packages that use java.security.interfaces
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Classes in java.security.interfaces used by java.security.interfaces
DSAKey
The interface to a DSA public or private key.
DSAParams
Interface to a DSA-specific set of key parameters, which defines a DSA key family.
RSAKey
The interface to an RSA public or private key.
RSAPrivateKey
The interface to an RSA private key.

Classes in java.security.interfaces used by java.security.spec
DSAParams
Interface to a DSA-specific set of key parameters, which defines a DSA key family.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.DSAKeyPairGenerator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.DSAKeyPairGenerator

No usage of java.security.interfaces.DSAKeyPairGenerator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.DSAPrivateKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.DSAPrivateKey

No usage of java.security.interfaces.DSAPrivateKey

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.DSAPublicKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.DSAPublicKey

No usage of java.security.interfaces.DSAPublicKey

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.RSAPrivateCrtKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.RSAPrivateCrtKey

No usage of java.security.interfaces.RSAPrivateCrtKey

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.RSAPublicKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.RSAPublicKey

No usage of java.security.interfaces.RSAPublicKey

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.DSAKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.DSAKey

Packages that use DSAKey
java.security.interfaces Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of DSAKey in java.security.interfaces

Subinterfaces of DSAKey in java.security.interfaces
interface | DSAPrivateKey The standard interface to a DSA private key.
interface | DSAPublicKey The interface to a DSA public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.DSAParams

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.DSAParams

Packages that use DSAParams
java.security.interfaces | Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of DSAParams in java.security.interfaces

Methods in java.security.interfaces that return DSAParams
 DSAParams DSAKey.getParams()
Returns the DSA-specific key parameters.

Methods in java.security.interfaces with parameters of type DSAParams
 void DSAKeyPairGenerator.initialize(DSAParams params, SecureRandom random)
Initializes the key pair generator using p, q and g, the DSA family parameters.

Uses of DSAParams in java.security.spec

Classes in java.security.spec that implement DSAParams
 class DSAParameterSpec
This class specifies the set of parameters used with the DSA algorithm.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.RSAKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.RSAKey

Packages that use RSAKey
java.security.interfaces Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of RSAKey in java.security.interfaces

Subinterfaces of RSAKey in java.security.interfaces
interface | RSAPrivateCrtKey The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.
interface | RSAPrivateKey The interface to an RSA private key.
interface | RSAPublicKey The interface to an RSA public key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.interfaces.RSAPrivateKey

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.interfaces.RSAPrivateKey

Packages that use RSAPrivateKey
java.security.interfaces Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.

Uses of RSAPrivateKey in java.security.interfaces

Subinterfaces of RSAPrivateKey in java.security.interfaces
 interface RSAPrivateCrtKey
The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DSAKey

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface DSAKey

All Known Subinterfaces:
DSAPrivateKey, DSAPublicKey
public interface DSAKey

The interface to a DSA public or private key. DSA (Digital Signature Algorithm) is defined in NIST's FIPS-186.

See Also:
DSAParams, Key, Signature

Method Summary
 DSAParams getParams()
Returns the DSA-specific key parameters.

Method Detail

getParams

public DSAParams getParams()
Returns the DSA-specific key parameters. These parameters are never secret.
Returns:
the DSA-specific key parameters.
See Also:
DSAParams
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DSAKeyPairGenerator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface DSAKeyPairGenerator

public interface DSAKeyPairGenerator

An interface to an object capable of generating DSA key pairs.

The initialize methods may each be called any number of times. If no initialize method is called on a DSAKeyPairGenerator, the default is to generate 1024-bit keys, using precomputed p, q and g parameters and an instance of SecureRandom as the random bit source.

Users wishing to indicate DSA-specific parameters, and to generate a key pair suitable for use with the DSA algorithm typically

  1. Get a key pair generator for the DSA algorithm by calling the KeyPairGenerator getInstance method with "DSA" as its argument.

  2. Initialize the generator by casting the result to a DSAKeyPairGenerator and calling one of the initialize methods from this DSAKeyPairGenerator interface.

  3. Generate a key pair by calling the generateKeyPair method from the KeyPairGenerator class.

Note: it is not always necessary to do do algorithm-specific initialization for a DSA key pair generator. That is, it is not always necessary to call an initialize method in this interface. Algorithm-independent initialization using the initialize method in the KeyPairGenerator interface is all that is needed when you accept defaults for algorithm-specific parameters.

See Also:
KeyPairGenerator

Method Summary
void | initialize(DSAParams params, SecureRandom random) Initializes the key pair generator using p, q and g, the DSA family parameters.
void | initialize(int modlen, boolean genParams, SecureRandom random) Initializes the key pair generator for a given modulus length, without parameters.

Method Detail

initialize

public void initialize(DSAParams params,
                       SecureRandom random)
                throws InvalidParameterException
Initializes the key pair generator using p, q and g, the DSA family parameters.
Parameters:
params - the parameters to use to generate the keys.
random - the random bit source to use to generate key bits.
Throws:
InvalidParameterException - if the parameters passed are invalid or null.

initialize

public void initialize(int modlen,
                       boolean genParams,
                       SecureRandom random)
                throws InvalidParameterException
Initializes the key pair generator for a given modulus length, without parameters.

If genParams is true, this method will generate new p, q and g parameters. If it is false, the method will use precomputed parameters for the modulus length requested. If there are no precomputed parameters for that modulus length, an exception will be thrown. It is guaranteed that there will always be default parameters for modulus lengths of 512 and 1024 bits.

Parameters:
modlen - the modulus length, in bits. Valid values are any multiple of 8 between 512 and 1024, inclusive.
random - the random bit source to use to generate key bits.
genParams - whether or not to generate new parameters for the modulus length requested.
Throws:
InvalidParameterException - if the modulus length is not between 512 and 1024, or if genParams is false and there are not precomputed parameters for the modulus length requested.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DSAParams

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface DSAParams

All Known Implementing Classes:
DSAParameterSpec
public interface DSAParams

Interface to a DSA-specific set of key parameters, which defines a DSA key family. DSA (Digital Signature Algorithm) is defined in NIST's FIPS-186.

See Also:
DSAKey, Key, Signature

Method Summary
BigInteger | getG() Returns the base, g.
BigInteger | getP() Returns the prime, p.
BigInteger | getQ() Returns the subprime, q.

Method Detail

getP

public BigInteger getP()
Returns the prime, p.
Returns:
the prime, p.

getQ

public BigInteger getQ()
Returns the subprime, q.
Returns:
the subprime, q.

getG

public BigInteger getG()
Returns the base, g.
Returns:
the base, g.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DSAPrivateKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface DSAPrivateKey

All Superinterfaces:
DSAKey, Key, PrivateKey, Serializable
public interface DSAPrivateKey
extends DSAKey, PrivateKey

The standard interface to a DSA private key. DSA (Digital Signature Algorithm) is defined in NIST's FIPS-186.

See Also:
Key, Signature, DSAKey, DSAPublicKey

Field Summary
static long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Summary
 BigInteger getX()
Returns the value of the private key, x.
Methods inherited from interface java.security.interfaces.DSAKey
getParams
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Field Detail

serialVersionUID

public static final long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Detail

getX

public BigInteger getX()
Returns the value of the private key, x.
Returns:
the value of the private key, x.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DSAPublicKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface DSAPublicKey

All Superinterfaces:
DSAKey, Key, PublicKey, Serializable
public interface DSAPublicKey
extends DSAKey, PublicKey

The interface to a DSA public key. DSA (Digital Signature Algorithm) is defined in NIST's FIPS-186.

See Also:
Key, Signature, DSAKey, DSAPrivateKey

Field Summary
static long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Summary
 BigInteger getY()
Returns the value of the public key, y.
Methods inherited from interface java.security.interfaces.DSAKey
getParams
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Field Detail

serialVersionUID

public static final long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Detail

getY

public BigInteger getY()
Returns the value of the public key, y.
Returns:
the value of the public key, y.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface RSAKey

All Known Subinterfaces:
RSAPrivateCrtKey, RSAPrivateKey, RSAPublicKey
public interface RSAKey

The interface to an RSA public or private key.

Since:
1.3
See Also:
RSAPublicKey, RSAPrivateKey

Method Summary
 BigInteger getModulus()
Returns the modulus.

Method Detail

getModulus

public BigInteger getModulus()
Returns the modulus.
Returns:
the modulus
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPrivateCrtKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface RSAPrivateCrtKey

All Superinterfaces:
Key, PrivateKey, RSAKey, RSAPrivateKey, Serializable
public interface RSAPrivateCrtKey
extends RSAPrivateKey

The interface to an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values.

See Also:
RSAPrivateKey

Fields inherited from interface java.security.PrivateKey
serialVersionUID
Method Summary
BigInteger | getCrtCoefficient() Returns the crtCoefficient.
BigInteger | getPrimeExponentP() Returns the primeExponentP.
BigInteger | getPrimeExponentQ() Returns the primeExponentQ.
BigInteger | getPrimeP() Returns the primeP.
BigInteger | getPrimeQ() Returns the primeQ.
BigInteger | getPublicExponent() Returns the public exponent.
Methods inherited from interface java.security.interfaces.RSAPrivateKey
getPrivateExponent
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
Methods inherited from interface java.security.interfaces.RSAKey
getModulus

Method Detail

getPublicExponent

public BigInteger getPublicExponent()
Returns the public exponent.
Returns:
the public exponent

getPrimeP

public BigInteger getPrimeP()
Returns the primeP.
Returns:
the primeP

getPrimeQ

public BigInteger getPrimeQ()
Returns the primeQ.
Returns:
the primeQ

getPrimeExponentP

public BigInteger getPrimeExponentP()
Returns the primeExponentP.
Returns:
the primeExponentP

getPrimeExponentQ

public BigInteger getPrimeExponentQ()
Returns the primeExponentQ.
Returns:
the primeExponentQ

getCrtCoefficient

public BigInteger getCrtCoefficient()
Returns the crtCoefficient.
Returns:
the crtCoefficient
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPrivateKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface RSAPrivateKey

All Superinterfaces:
Key, PrivateKey, RSAKey, Serializable
All Known Subinterfaces:
RSAPrivateCrtKey
public interface RSAPrivateKey
extends PrivateKey, RSAKey

The interface to an RSA private key.

See Also:
RSAPrivateCrtKey

Fields inherited from interface java.security.PrivateKey
serialVersionUID
Method Summary
 BigInteger getPrivateExponent()
Returns the private exponent.
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
Methods inherited from interface java.security.interfaces.RSAKey
getModulus

Method Detail

getPrivateExponent

public BigInteger getPrivateExponent()
Returns the private exponent.
Returns:
the private exponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPublicKey

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.interfaces
Interface RSAPublicKey

All Superinterfaces:
Key, PublicKey, RSAKey, Serializable
public interface RSAPublicKey
extends PublicKey, RSAKey

The interface to an RSA public key.

Fields inherited from interface java.security.PublicKey
serialVersionUID
Method Summary
 BigInteger getPublicExponent()
Returns the public exponent.
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
Methods inherited from interface java.security.interfaces.RSAKey
getModulus

Method Detail

getPublicExponent

public BigInteger getPublicExponent()
Returns the public exponent.
Returns:
the public exponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidAlgorithmParameterException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class InvalidAlgorithmParameterException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.InvalidAlgorithmParameterException
All Implemented Interfaces:
Serializable
public class InvalidAlgorithmParameterException
extends GeneralSecurityException

This is the exception for invalid or inappropriate algorithm parameters.

Since:
1.2
See Also:
AlgorithmParameters, AlgorithmParameterSpec, Serialized Form

Constructor Summary
InvalidAlgorithmParameterException()
Constructs an InvalidAlgorithmParameterException with no detail message.
InvalidAlgorithmParameterException(String msg)
Constructs an InvalidAlgorithmParameterException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidAlgorithmParameterException

public InvalidAlgorithmParameterException()
Constructs an InvalidAlgorithmParameterException with no detail message. A detail message is a String that describes this particular exception.

InvalidAlgorithmParameterException

public InvalidAlgorithmParameterException(String msg)
Constructs an InvalidAlgorithmParameterException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidKeyException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class InvalidKeyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.KeyException
                          |
                          +--java.security.InvalidKeyException
All Implemented Interfaces:
Serializable
public class InvalidKeyException
extends KeyException

This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).

See Also:
Serialized Form

Constructor Summary
InvalidKeyException()
Constructs an InvalidKeyException with no detail message.
InvalidKeyException(String msg)
Constructs an InvalidKeyException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidKeyException

public InvalidKeyException()
Constructs an InvalidKeyException with no detail message. A detail message is a String that describes this particular exception.

InvalidKeyException

public InvalidKeyException(String msg)
Constructs an InvalidKeyException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidParameterException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class InvalidParameterException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
                          |
                          +--java.security.InvalidParameterException
All Implemented Interfaces:
Serializable
public class InvalidParameterException
extends IllegalArgumentException

This exception is thrown when an invalid parameter is passed to a method.

See Also:
Serialized Form

Constructor Summary
InvalidParameterException()
Constructs an InvalidParameterException with no detail message.
InvalidParameterException(String msg)
Constructs an InvalidParameterException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidParameterException

public InvalidParameterException()
Constructs an InvalidParameterException with no detail message. A detail message is a String that describes this particular exception.

InvalidParameterException

public InvalidParameterException(String msg)
Constructs an InvalidParameterException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Key

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface Key

All Superinterfaces:
Serializable
All Known Subinterfaces:
DSAPrivateKey, DSAPublicKey, PrivateKey, PublicKey, RSAPrivateCrtKey, RSAPrivateKey, RSAPublicKey
public interface Key
extends Serializable

The Key interface is the top-level interface for all keys. It defines the functionality shared by all key objects. All keys have three characteristics:

  • An Algorithm

    This is the key algorithm for that key. The key algorithm is usually an encryption or asymmetric operation algorithm (such as DSA or RSA), which will work with those algorithms and with related algorithms (such as MD5 with RSA, SHA-1 with RSA, Raw DSA, etc.) The name of the algorithm of a key is obtained using the getAlgorithm method.

  • An Encoded Form

    This is an external encoded form for the key used when a standard representation of the key is needed outside the Java Virtual Machine, as when transmitting the key to some other party. The key is encoded according to a standard format (such as X.509 or PKCS#8), and is returned using the getEncoded method.

  • A Format

    This is the name of the format of the encoded key. It is returned by the getFormat method.

Keys are generally obtained through key generators, certificates, or various Identity classes used to manage keys. Keys may also be obtained from key specifications (transparent representations of the underlying key material) through the use of a key factory (see KeyFactory).

See Also:
PublicKey, PrivateKey, KeyPair, KeyPairGenerator, KeyFactory, KeySpec, Identity, Signer

Field Summary
static long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Summary
String | getAlgorithm() Returns the standard algorithm name for this key.
byte[] | getEncoded() Returns the key in its primary encoding format, or null if this key does not support encoding.
String | getFormat() Returns the name of the primary encoding format of this key, or null if this key does not support encoding.

Field Detail

serialVersionUID

public static final long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.
Method Detail

getAlgorithm

public String getAlgorithm()
Returns the standard algorithm name for this key. For example, "DSA" would indicate that this key is a DSA key. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
the name of the algorithm associated with this key.

getFormat

public String getFormat()
Returns the name of the primary encoding format of this key, or null if this key does not support encoding. The primary encoding format is named in terms of the appropriate ASN.1 data format, if an ASN.1 specification for this key exists. For example, the name of the ASN.1 data format for public keys is SubjectPublicKeyInfo, as defined by the X.509 standard; in this case, the returned format is "X.509". Similarly, the name of the ASN.1 data format for private keys is PrivateKeyInfo, as defined by the PKCS #8 standard; in this case, the returned format is "PKCS#8".
Returns:
the primary encoding format of the key.

getEncoded

public byte[] getEncoded()
Returns the key in its primary encoding format, or null if this key does not support encoding.
Returns:
the encoded key, or null if the key does not support encoding.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.KeyException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidKeyException, KeyManagementException
public class KeyException
extends GeneralSecurityException

This is the basic key exception.

See Also:
Key, InvalidKeyException, KeyManagementException, Serialized Form

Constructor Summary
KeyException()
Constructs a KeyException with no detail message.
KeyException(String msg)
Constructs a KeyException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

KeyException

public KeyException()
Constructs a KeyException with no detail message. A detail message is a String that describes this particular exception.

KeyException

public KeyException(String msg)
Constructs a KeyException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyFactory

java.lang.Object
  |
  +--java.security.KeyFactory
public class KeyFactory
extends Object

Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.

Key factories are bi-directional. That is, they allow you to build an opaque key object from a given key specification (key material), or to retrieve the underlying key material of a key object in a suitable format.

Multiple compatible key specifications may exist for the same key. For example, a DSA public key may be specified using DSAPublicKeySpec or X509EncodedKeySpec. A key factory can be used to translate between compatible key specifications.

The following is an example of how to use a key factory in order to instantiate a DSA public key from its encoding. Assume Alice has received a digital signature from Bob. Bob also sent her his public key (in encoded format) to verify his signature. Alice then performs the following actions:

 X509EncodedKeySpec bobPubKeySpec = new X509EncodedKeySpec(bobEncodedPubKey);
 KeyFactory keyFactory = KeyFactory.getInstance("DSA");
 PublicKey bobPubKey = keyFactory.generatePublic(bobPubKeySpec);
 Signature sig = Signature.getInstance("DSA");
 sig.initVerify(bobPubKey);
 sig.update(data);
 sig.verify(signature);

Since:
1.2
See Also:
Key, PublicKey, PrivateKey, KeySpec, DSAPublicKeySpec, X509EncodedKeySpec

Constructor Summary
protected KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Creates a KeyFactory object.
Method Summary
PrivateKey | generatePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
PublicKey | generatePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
String | getAlgorithm() Gets the name of the algorithm associated with this KeyFactory.
static KeyFactory | getInstance(String algorithm) Generates a KeyFactory object that implements the specified digest algorithm.
static KeyFactory | getInstance(String algorithm, String provider) Generates a KeyFactory object for the specified algorithm from the specified provider.
KeySpec | getKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
Provider | getProvider() Returns the provider of this key factory object.
Key | translateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyFactory

protected KeyFactory(KeyFactorySpi keyFacSpi,
                     Provider provider,
                     String algorithm)
Creates a KeyFactory object.
Parameters:
keyFacSpi - the delegate
provider - the provider
algorithm - the name of the algorithm to associate with this KeyFactory
Method Detail

getInstance

public static KeyFactory getInstance(String algorithm)
                              throws NoSuchAlgorithmException
Generates a KeyFactory object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of KeyFactory containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - the name of the requested key algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
a KeyFactory object for the specified algorithm.
Throws:
NoSuchAlgorithmException - if the requested algorithm is not available in the default provider package or any of the other provider packages that were searched.

getInstance

public static KeyFactory getInstance(String algorithm,
                                     String provider)
                              throws NoSuchAlgorithmException,
                                     NoSuchProviderException
Generates a KeyFactory object for the specified algorithm from the specified provider.
Parameters:
algorithm - the name of the requested key algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider - the name of the provider.
Returns:
a KeyFactory object for the specified algorithm.
Throws:
NoSuchAlgorithmException - if the algorithm is not available from the specified provider.
NoSuchProviderException - if the provider has not been configured.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this key factory object.
Returns:
the provider of this key factory object

getAlgorithm

public final String getAlgorithm()
Gets the name of the algorithm associated with this KeyFactory.
Returns:
the name of the algorithm associated with this KeyFactory

generatePublic

public final PublicKey generatePublic(KeySpec keySpec)
                               throws InvalidKeySpecException
Generates a public key object from the provided key specification (key material).
Parameters:
keySpec - the specification (key material) of the public key.
Returns:
the public key.
Throws:
InvalidKeySpecException - if the given key specification is inappropriate for this key factory to produce a public key.

generatePrivate

public final PrivateKey generatePrivate(KeySpec keySpec)
                                 throws InvalidKeySpecException
Generates a private key object from the provided key specification (key material).
Parameters:
keySpec - the specification (key material) of the private key.
Returns:
the private key.
Throws:
InvalidKeySpecException - if the given key specification is inappropriate for this key factory to produce a private key.

getKeySpec

public final KeySpec getKeySpec(Key key,
                                Class keySpec)
                         throws InvalidKeySpecException
Returns a specification (key material) of the given key object. keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.
Parameters:
key - the key.
keySpec - the specification class in which the key material should be returned.
Returns:
the underlying key specification (key material) in an instance of the requested specification class.
Throws:
InvalidKeySpecException - if the requested key specification is inappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).

translateKey

public final Key translateKey(Key key)
                       throws InvalidKeyException
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Parameters:
key - the key whose provider is unknown or untrusted.
Returns:
the translated key.
Throws:
InvalidKeyException - if the given key cannot be processed by this key factory.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyFactorySpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyFactorySpi

java.lang.Object
  |
  +--java.security.KeyFactorySpi
public abstract class KeyFactorySpi
extends Object

This class defines the Service Provider Interface (SPI) for the KeyFactory class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a key factory for a particular algorithm.

Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.

Key factories are bi-directional. That is, they allow you to build an opaque key object from a given key specification (key material), or to retrieve the underlying key material of a key object in a suitable format.

Multiple compatible key specifications may exist for the same key. For example, a DSA public key may be specified using DSAPublicKeySpec or X509EncodedKeySpec. A key factory can be used to translate between compatible key specifications.

A provider should document all the key specifications supported by its key factory.

Since:
1.2
See Also:
KeyFactory, Key, PublicKey, PrivateKey, KeySpec, DSAPublicKeySpec, X509EncodedKeySpec

Constructor Summary
KeyFactorySpi()
Method Summary
protected abstract PrivateKey | engineGeneratePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
protected abstract PublicKey | engineGeneratePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
protected abstract KeySpec | engineGetKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
protected abstract Key | engineTranslateKey(Key key) Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyFactorySpi

public KeyFactorySpi()
Method Detail

engineGeneratePublic

protected abstract PublicKey engineGeneratePublic(KeySpec keySpec)
                                           throws InvalidKeySpecException
Generates a public key object from the provided key specification (key material).
Parameters:
keySpec - the specification (key material) of the public key.
Returns:
the public key.
Throws:
InvalidKeySpecException - if the given key specification is inappropriate for this key factory to produce a public key.

engineGeneratePrivate

protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
                                             throws InvalidKeySpecException
Generates a private key object from the provided key specification (key material).
Parameters:
keySpec - the specification (key material) of the private key.
Returns:
the private key.
Throws:
InvalidKeySpecException - if the given key specification is inappropriate for this key factory to produce a private key.

engineGetKeySpec

protected abstract KeySpec engineGetKeySpec(Key key,
                                            Class keySpec)
                                     throws InvalidKeySpecException
Returns a specification (key material) of the given key object. keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.
Parameters:
key - the key.
keySpec - the specification class in which the key material should be returned.
Returns:
the underlying key specification (key material) in an instance of the requested specification class.
Throws:
InvalidKeySpecException - if the requested key specification is inappropriate for the given key, or the given key cannot be dealt with (e.g., the given key has an unrecognized format).

engineTranslateKey

protected abstract Key engineTranslateKey(Key key)
                                   throws InvalidKeyException
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Parameters:
key - the key whose provider is unknown or untrusted.
Returns:
the translated key.
Throws:
InvalidKeyException - if the given key cannot be processed by this key factory.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyManagementException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyManagementException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.KeyException
                          |
                          +--java.security.KeyManagementException
All Implemented Interfaces:
Serializable
public class KeyManagementException
extends KeyException

This is the general key management exception, for all operations dealing with key management. Subclasses could include:

  • KeyIDConflict
  • KeyAuthorizationFailureException
  • ExpiredKeyException

See Also:
Key, KeyException, Serialized Form

Constructor Summary
KeyManagementException()
Constructs a KeyManagementException with no detail message.
KeyManagementException(String msg)
Constructs a KeyManagementException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

KeyManagementException

public KeyManagementException()
Constructs a KeyManagementException with no detail message. A detail message is a String that describes this particular exception.

KeyManagementException

public KeyManagementException(String msg)
Constructs a KeyManagementException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyPair

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyPair

java.lang.Object
  |
  +--java.security.KeyPair
All Implemented Interfaces:
Serializable
public final class KeyPair
extends Object
implements Serializable

This class is a simple holder for a key pair (a public key and a private key). It does not enforce any security, and, when initialized, should be treated like a PrivateKey.

See Also:
PublicKey, PrivateKey, Serialized Form

Constructor Summary
KeyPair(PublicKey publicKey, PrivateKey privateKey)
Constructs a key pair from the given public key and private key.
Method Summary
PrivateKey | getPrivate() Returns a reference to the private key component of this key pair.
PublicKey | getPublic() Returns a reference to the public key component of this key pair.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyPair

public KeyPair(PublicKey publicKey,
               PrivateKey privateKey)
Constructs a key pair from the given public key and private key.

Note that this constructor only stores references to the public and private key components in the generated key pair. This is safe, because Key objects are immutable.

Parameters:
publicKey - the public key.
privateKey - the private key.
Method Detail

getPublic

public PublicKey getPublic()
Returns a reference to the public key component of this key pair.
Returns:
a reference to the public key.

getPrivate

public PrivateKey getPrivate()
Returns a reference to the private key component of this key pair.
Returns:
a reference to the private key.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyPairGenerator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyPairGenerator

java.lang.Object
  |
  +--java.security.KeyPairGeneratorSpi
        |
        +--java.security.KeyPairGenerator
public abstract class KeyPairGenerator
extends KeyPairGeneratorSpi

The KeyPairGenerator class is used to generate pairs of public and private keys. Key pair generators are constructed using the getInstance factory methods (static methods that return instances of a given class).

A Key pair generator for a particular algorithm creates a public/private key pair that can be used with this algorithm. It also associates algorithm-specific parameters with each of the generated keys.

There are two ways to generate a key pair: in an algorithm-independent manner, and in an algorithm-specific manner. The only difference between the two is the initialization of the object:

  • Algorithm-Independent Initialization

    All key pair generators share the concepts of a keysize and a source of randomness. The keysize is interpreted differently for different algorithms (e.g., in the case of the DSA algorithm, the keysize corresponds to the length of the modulus). There is an initialize method in this KeyPairGenerator class that takes these two universally shared types of arguments. There is also one that takes just a keysize argument, and uses the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)

    Since no other parameters are specified when you call the above algorithm-independent initialize methods, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with each of the keys.

    If the algorithm is the DSA algorithm, and the keysize (modulus size) is 512, 768, or 1024, then the Sun provider uses a set of precomputed values for the p, q, and g parameters. If the modulus size is not one of the above values, the Sun provider creates a new set of parameters. Other providers might have precomputed parameter sets for more than just the three modulus sizes mentioned above. Still others might not have a list of precomputed parameters at all and instead always create new parameter sets.

  • Algorithm-Specific Initialization

    For situations where a set of algorithm-specific parameters already exists (e.g., so-called community parameters in DSA), there are two initialize methods that have an AlgorithmParameterSpec argument. One also has a SecureRandom argument, while the the other uses the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)

In case the client does not explicitly initialize the KeyPairGenerator (via a call to an initialize method), each provider must supply (and document) a default initialization. For example, the Sun provider uses a default modulus size (keysize) of 1024 bits.

Note that this class is abstract and extends from KeyPairGeneratorSpi for historical reasons. Application developers should only take notice of the methods defined in this KeyPairGenerator class; all the methods in the superclass are intended for cryptographic service providers who wish to supply their own implementations of key pair generators.

See Also:
AlgorithmParameterSpec

Constructor Summary
protected KeyPairGenerator(String algorithm)
Creates a KeyPairGenerator object for the specified algorithm.
Method Summary
KeyPair | generateKeyPair() Generates a key pair.
KeyPair | genKeyPair() Generates a key pair.
String | getAlgorithm() Returns the standard name of the algorithm for this key pair generator.
static KeyPairGenerator | getInstance(String algorithm) Generates a KeyPairGenerator object that implements the specified digest algorithm.
static KeyPairGenerator | getInstance(String algorithm, String provider) Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Provider | getProvider() Returns the provider of this key pair generator object.
void | initialize(AlgorithmParameterSpec params) Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
void | initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator with the given parameter set and source of randomness.
void | initialize(int keysize) Initializes the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
void | initialize(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyPairGenerator

protected KeyPairGenerator(String algorithm)
Creates a KeyPairGenerator object for the specified algorithm.
Parameters:
algorithm - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Method Detail

getAlgorithm

public String getAlgorithm()
Returns the standard name of the algorithm for this key pair generator. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
the standard string name of the algorithm.

getInstance

public static KeyPairGenerator getInstance(String algorithm)
                                    throws NoSuchAlgorithmException
Generates a KeyPairGenerator object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of KeyPairGenerator containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
the new KeyPairGenerator object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the environment.

getInstance

public static KeyPairGenerator getInstance(String algorithm,
                                           String provider)
                                    throws NoSuchAlgorithmException,
                                           NoSuchProviderException
Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Parameters:
algorithm - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider - the string name of the provider.
Returns:
the new KeyPairGenerator object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available from the provider.
NoSuchProviderException - if the provider is not available in the environment.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this key pair generator object.
Returns:
the provider of this key pair generator object

initialize

public void initialize(int keysize)
Initializes the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)
Parameters:
keysize - the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
Throws:
InvalidParameterException - if the keysize is not supported by this KeyPairGenerator object.

initialize

public void initialize(int keysize,
                       SecureRandom random)
Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
Overrides:
initialize in class KeyPairGeneratorSpi
Parameters:
keysize - the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
random - the source of randomness.
Throws:
InvalidParameterException - if the keysize is not supported by this KeyPairGenerator object.
Since:
1.2

initialize

public void initialize(AlgorithmParameterSpec params)
                throws InvalidAlgorithmParameterException
Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.).

This concrete method has been added to this previously-defined abstract class. This method calls the KeyPairGeneratorSpi initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) initialize method, passing it params and a source of randomness (obtained from the highest-priority installed provider or system-provided if none of the installed providers supply one). That initialize method always throws an UnsupportedOperationException if it is not overridden by the provider.

Parameters:
params - the parameter set used to generate the keys.
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator.
Since:
1.2

initialize

public void initialize(AlgorithmParameterSpec params,
                       SecureRandom random)
                throws InvalidAlgorithmParameterException
Initializes the key pair generator with the given parameter set and source of randomness.

This concrete method has been added to this previously-defined abstract class. This method calls the KeyPairGeneratorSpi initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) initialize method, passing it params and random. That initialize method always throws an UnsupportedOperationException if it is not overridden by the provider.

Overrides:
initialize in class KeyPairGeneratorSpi
Parameters:
params - the parameter set used to generate the keys.
random - the source of randomness.
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator.
Since:
1.2

genKeyPair

public final KeyPair genKeyPair()
Generates a key pair.

If this KeyPairGenerator has not been initialized explicitly, provider-specific defaults will be used for the size and other (algorithm-specific) values of the generated keys.

This will generate a new key pair every time it is called.

This method is functionally equivalent to generateKeyPair.

Returns:
the generated key pair
Since:
1.2

generateKeyPair

public KeyPair generateKeyPair()
Generates a key pair.

If this KeyPairGenerator has not been initialized explicitly, provider-specific defaults will be used for the size and other (algorithm-specific) values of the generated keys.

This will generate a new key pair every time it is called.

This method is functionally equivalent to genKeyPair.

Overrides:
generateKeyPair in class KeyPairGeneratorSpi
Returns:
the generated key pair
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyPairGeneratorSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyPairGeneratorSpi

java.lang.Object
  |
  +--java.security.KeyPairGeneratorSpi
Direct Known Subclasses:
KeyPairGenerator
public abstract class KeyPairGeneratorSpi
extends Object

This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a key pair generator for a particular algorithm.

In case the client does not explicitly initialize the KeyPairGenerator (via a call to an initialize method), each provider must supply (and document) a default initialization. For example, the Sun provider uses a default modulus size (keysize) of 1024 bits.

See Also:
KeyPairGenerator, AlgorithmParameterSpec

Constructor Summary
KeyPairGeneratorSpi()
Method Summary
abstract KeyPair | generateKeyPair() Generates a key pair.
void | initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
abstract void | initialize(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize, using the default parameter set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyPairGeneratorSpi

public KeyPairGeneratorSpi()
Method Detail

initialize

public abstract void initialize(int keysize,
                                SecureRandom random)
Initializes the key pair generator for a certain keysize, using the default parameter set.
Parameters:
keysize - the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
random - the source of randomness for this generator.
Throws:
InvalidParameterException - if the keysize is not supported by this KeyPairGeneratorSpi object.

initialize

public void initialize(AlgorithmParameterSpec params,
                       SecureRandom random)
                throws InvalidAlgorithmParameterException
Initializes the key pair generator using the specified parameter set and user-provided source of randomness.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to initialize the key pair generator. Such an override is expected to throw an InvalidAlgorithmParameterException if a parameter is inappropriate for this key pair generator. If this method is not overridden, it always throws an UnsupportedOperationException.

Parameters:
params - the parameter set used to generate the keys.
random - the source of randomness for this generator.
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator.
Since:
1.2

generateKeyPair

public abstract KeyPair generateKeyPair()
Generates a key pair. Unless an initialization method is called using a KeyPairGenerator interface, algorithm-specific defaults will be used. This will generate a new key pair every time it is called.
Returns:
the newly generated KeyPair
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyStore

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyStore

java.lang.Object
  |
  +--java.security.KeyStore
public class KeyStore
extends Object

This class represents an in-memory collection of keys and certificates. It manages two types of entries:

  • Key Entry

    This type of keystore entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access.

    Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain for the corresponding public key.

    Private keys and certificate chains are used by a given entity for self-authentication. Applications for this authentication include software distribution organizations which sign JAR files as part of releasing and/or licensing software.

  • Trusted Certificate Entry

    This type of entry contains a single public key certificate belonging to another party. It is called a trusted certificate because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the subject (owner) of the certificate.

    This type of entry can be used to authenticate other parties.

Each entry in a keystore is identified by an "alias" string. In the case of private keys and their associated certificate chains, these strings distinguish among the different ways in which the entity may authenticate itself. For example, the entity may authenticate itself using different certificate authorities, or using different public key algorithms.

Whether keystores are persistent, and the mechanisms used by the keystore if it is persistent, are not specified here. This allows use of a variety of techniques for protecting sensitive (e.g., private or secret) keys. Smart cards or other integrated cryptographic engines (SafeKeyper) are one option, and simpler mechanisms such as files may also be used (in a variety of formats).

There are two ways to request a KeyStore object: by specifying either just a keystore type, or both a keystore type and a package provider.

  • If just a keystore type is specified:
          KeyStore ks = KeyStore.getInstance("JKS");
    the system will determine if there is an implementation of the keystore type requested available in the environment, and if there is more than one, if there is a preferred one.

  • If both a keystore type and a package provider are specified:
          KeyStore ks = KeyStore.getInstance("JKS", "SUN");
    the system will determine if there is an implementation of the keystore type in the package requested, and throw an exception if there is not.

Before a keystore can be accessed, it must be loaded. In order to create an empty keystore, you pass null as the InputStream argument to the load method.

Since:
1.2
See Also:
PrivateKey, Certificate

Constructor Summary
protected KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Method Summary
Enumeration | aliases() Lists all the alias names of this keystore.
boolean | containsAlias(String alias) Checks if the given alias exists in this keystore.
void | deleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.
Certificate | getCertificate(String alias) Returns the certificate associated with the given alias.
String | getCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
Certificate[] | getCertificateChain(String alias) Returns the certificate chain associated with the given alias.
Date | getCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
static String | getDefaultType() Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists.
static KeyStore | getInstance(String type) Generates a keystore object of the given type.
static KeyStore | getInstance(String type, String provider) Generates a keystore object for the specified keystore type from the specified provider.
Key | getKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
Provider | getProvider() Returns the provider of this keystore.
String | getType() Returns the type of this keystore.
boolean | isCertificateEntry(String alias) Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
boolean | isKeyEntry(String alias) Returns true if the entry identified by the given alias is a key entry, and false otherwise.
void | load(InputStream stream, char[] password) Loads this KeyStore from the given input stream.
void | setCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
void | setKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
void | setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
int | size() Retrieves the number of entries in this keystore.
void | store(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyStore

protected KeyStore(KeyStoreSpi keyStoreSpi,
                   Provider provider,
                   String type)
Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Parameters:
keyStoreSpi - the provider implementation.
provider - the provider.
type - the keystore type.
Method Detail

getInstance

public static KeyStore getInstance(String type)
                            throws KeyStoreException
Generates a keystore object of the given type.

If the default provider package provides a keystore implementation of the given type, an instance of KeyStore containing that implementation is returned. If the requested keystore type is not available in the default package, other packages are searched.

Parameters:
type - the type of keystore. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard keystore types.
Returns:
a keystore object of the specified type.
Throws:
KeyStoreException - if the requested keystore type is not available in the default provider package or any of the other provider packages that were searched.

getInstance

public static KeyStore getInstance(String type,
                                   String provider)
                            throws KeyStoreException,
                                   NoSuchProviderException
Generates a keystore object for the specified keystore type from the specified provider.
Parameters:
type - the type of keystore. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard keystore types.
provider - the name of the provider.
Returns:
a keystore object of the specified type, as supplied by the specified provider.
Throws:
KeyStoreException - if the requested keystore type is not available from the provider.
NoSuchProviderException - if the provider has not been configured.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this keystore.
Returns:
the provider of this keystore.

getType

public final String getType()
Returns the type of this keystore.
Returns:
the type of this keystore.

getKey

public final Key getKey(String alias,
                        char[] password)
                 throws KeyStoreException,
                        NoSuchAlgorithmException,
                        UnrecoverableKeyException
Returns the key associated with the given alias, using the given password to recover it.
Parameters:
alias - the alias name
password - the password for recovering the key
Returns:
the requested key, or null if the given alias does not exist or does not identify a key entry.
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).
NoSuchAlgorithmException - if the algorithm for recovering the key cannot be found
UnrecoverableKeyException - if the key cannot be recovered (e.g., the given password is wrong).

getCertificateChain

public final Certificate[] getCertificateChain(String alias)
                                        throws KeyStoreException
Returns the certificate chain associated with the given alias.
Parameters:
alias - the alias name
Returns:
the certificate chain (ordered with the user's certificate first and the root certificate authority last), or null if the given alias does not exist or does not contain a certificate chain (i.e., the given alias identifies either a trusted certificate entry or a key entry without a certificate chain).
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

getCertificate

public final Certificate getCertificate(String alias)
                                 throws KeyStoreException
Returns the certificate associated with the given alias.

If the given alias name identifies a trusted certificate entry, the certificate associated with that entry is returned. If the given alias name identifies a key entry, the first element of the certificate chain of that entry is returned, or null if that entry does not have a certificate chain.

Parameters:
alias - the alias name
Returns:
the certificate, or null if the given alias does not exist or does not contain a certificate.
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

getCreationDate

public final Date getCreationDate(String alias)
                           throws KeyStoreException
Returns the creation date of the entry identified by the given alias.
Parameters:
alias - the alias name
Returns:
the creation date of this entry, or null if the given alias does not exist
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

setKeyEntry

public final void setKeyEntry(String alias,
                              Key key,
                              char[] password,
                              Certificate[] chain)
                       throws KeyStoreException
Assigns the given key to the given alias, protecting it with the given password.

If the given key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

Parameters:
alias - the alias name
key - the key to be associated with the alias
password - the password to protect the key
chain - the certificate chain for the corresponding public key (only required if the given key is of type java.security.PrivateKey).
Throws:
KeyStoreException - if the keystore has not been initialized (loaded), the given key cannot be protected, or this operation fails for some other reason

setKeyEntry

public final void setKeyEntry(String alias,
                              byte[] key,
                              Certificate[] chain)
                       throws KeyStoreException
Assigns the given key (that has already been protected) to the given alias.

If the protected key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key. If the underlying keystore implementation is of type jks, key must be encoded as an EncryptedPrivateKeyInfo as defined in the PKCS #8 standard.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

Parameters:
alias - the alias name
key - the key (in protected format) to be associated with the alias
chain - the certificate chain for the corresponding public key (only useful if the protected key is of type java.security.PrivateKey).
Throws:
KeyStoreException - if the keystore has not been initialized (loaded), or if this operation fails for some other reason.

setCertificateEntry

public final void setCertificateEntry(String alias,
                                      Certificate cert)
                               throws KeyStoreException
Assigns the given certificate to the given alias.

If the given alias already exists in this keystore and identifies a trusted certificate entry, the certificate associated with it is overridden by the given certificate.

Parameters:
alias - the alias name
cert - the certificate
Throws:
KeyStoreException - if the keystore has not been initialized, or the given alias already exists and does not identify a trusted certificate entry, or this operation fails for some other reason.

deleteEntry

public final void deleteEntry(String alias)
                       throws KeyStoreException
Deletes the entry identified by the given alias from this keystore.
Parameters:
alias - the alias name
Throws:
KeyStoreException - if the keystore has not been initialized, or if the entry cannot be removed.

aliases

public final Enumeration aliases()
                          throws KeyStoreException
Lists all the alias names of this keystore.
Returns:
enumeration of the alias names
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

containsAlias

public final boolean containsAlias(String alias)
                            throws KeyStoreException
Checks if the given alias exists in this keystore.
Parameters:
alias - the alias name
Returns:
true if the alias exists, false otherwise
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

size

public final int size()
               throws KeyStoreException
Retrieves the number of entries in this keystore.
Returns:
the number of entries in this keystore
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

isKeyEntry

public final boolean isKeyEntry(String alias)
                         throws KeyStoreException
Returns true if the entry identified by the given alias is a key entry, and false otherwise.
Parameters:
alias - the alias for the keystore entry to be checked
Returns:
true if the entry identified by the given alias is a key entry, false otherwise.
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

isCertificateEntry

public final boolean isCertificateEntry(String alias)
                                 throws KeyStoreException
Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
Parameters:
alias - the alias for the keystore entry to be checked
Returns:
true if the entry identified by the given alias is a trusted certificate entry, false otherwise.
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

getCertificateAlias

public final String getCertificateAlias(Certificate cert)
                                 throws KeyStoreException
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

This method attempts to match the given certificate with each keystore entry. If the entry being considered is a trusted certificate entry, the given certificate is compared to that entry's certificate. If the entry being considered is a key entry, the given certificate is compared to the first element of that entry's certificate chain (if a chain exists).

Parameters:
cert - the certificate to match with.
Returns:
the (alias) name of the first entry with matching certificate, or null if no such entry exists in this keystore.
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).

store

public final void store(OutputStream stream,
                        char[] password)
                 throws KeyStoreException,
                        IOException,
                        NoSuchAlgorithmException,
                        CertificateException
Stores this keystore to the given output stream, and protects its integrity with the given password.
Parameters:
stream - the output stream to which this keystore is written.
password - the password to generate the keystore integrity check
Throws:
KeyStoreException - if the keystore has not been initialized (loaded).
IOException - if there was an I/O problem with data
NoSuchAlgorithmException - if the appropriate data integrity algorithm could not be found
CertificateException - if any of the certificates included in the keystore data could not be stored

load

public final void load(InputStream stream,
                       char[] password)
                throws IOException,
                       NoSuchAlgorithmException,
                       CertificateException
Loads this KeyStore from the given input stream.

If a password is given, it is used to check the integrity of the keystore data. Otherwise, the integrity of the keystore is not checked.

In order to create an empty keystore, or if the keystore cannot be initialized from a stream (e.g., because it is stored on a hardware token device), you pass null as the stream argument.

Note that if this KeyStore has already been loaded, it is reinitialized and loaded again from the given input stream.

Parameters:
stream - the input stream from which the keystore is loaded, or null if an empty keystore is to be created.
password - the (optional) password used to check the integrity of the keystore.
Throws:
IOException - if there is an I/O or format problem with the keystore data
NoSuchAlgorithmException - if the algorithm used to check the integrity of the keystore cannot be found
CertificateException - if any of the certificates in the keystore could not be loaded

getDefaultType

public static final String getDefaultType()
Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists. The Java security properties file is located in the file named <JAVA_HOME>/lib/security/java.security, where <JAVA_HOME> refers to the directory where the SDK was installed.

The default keystore type can be used by applications that do not want to use a hard-coded keystore type when calling one of the getInstance methods, and want to provide a default keystore type in case a user does not specify its own.

The default keystore type can be changed by setting the value of the "keystore.type" security property (in the Java security properties file) to the desired keystore type.

Returns:
the default keystore type as specified in the Java security properties file, or the string "jks" if no such property exists.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyStoreException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyStoreException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.KeyStoreException
All Implemented Interfaces:
Serializable
public class KeyStoreException
extends GeneralSecurityException

This is the generic KeyStore exception.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
KeyStoreException()
Constructs a KeyStoreException with no detail message.
KeyStoreException(String msg)
Constructs a KeyStoreException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

KeyStoreException

public KeyStoreException()
Constructs a KeyStoreException with no detail message. (A detail message is a String that describes this particular exception.)

KeyStoreException

public KeyStoreException(String msg)
Constructs a KeyStoreException with the specified detail message. (A detail message is a String that describes this particular exception.)
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyStoreSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class KeyStoreSpi

java.lang.Object
  |
  +--java.security.KeyStoreSpi
public abstract class KeyStoreSpi
extends Object

This class defines the Service Provider Interface (SPI) for the KeyStore class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a keystore for a particular keystore type.

Since:
1.2
See Also:
KeyStore

Constructor Summary
KeyStoreSpi()
Method Summary
abstract Enumeration | engineAliases() Lists all the alias names of this keystore.
abstract boolean | engineContainsAlias(String alias) Checks if the given alias exists in this keystore.
abstract void | engineDeleteEntry(String alias) Deletes the entry identified by the given alias from this keystore.
abstract Certificate | engineGetCertificate(String alias) Returns the certificate associated with the given alias.
abstract String | engineGetCertificateAlias(Certificate cert) Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
abstract Certificate[] | engineGetCertificateChain(String alias) Returns the certificate chain associated with the given alias.
abstract Date | engineGetCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
abstract Key | engineGetKey(String alias, char[] password) Returns the key associated with the given alias, using the given password to recover it.
abstract boolean | engineIsCertificateEntry(String alias) Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
abstract boolean | engineIsKeyEntry(String alias) Returns true if the entry identified by the given alias is a key entry, and false otherwise.
abstract void | engineLoad(InputStream stream, char[] password) Loads the keystore from the given input stream.
abstract void | engineSetCertificateEntry(String alias, Certificate cert) Assigns the given certificate to the given alias.
abstract void | engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) Assigns the given key (that has already been protected) to the given alias.
abstract void | engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) Assigns the given key to the given alias, protecting it with the given password.
abstract int | engineSize() Retrieves the number of entries in this keystore.
abstract void | engineStore(OutputStream stream, char[] password) Stores this keystore to the given output stream, and protects its integrity with the given password.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeyStoreSpi

public KeyStoreSpi()
Method Detail

engineGetKey

public abstract Key engineGetKey(String alias,
                                 char[] password)
                          throws NoSuchAlgorithmException,
                                 UnrecoverableKeyException
Returns the key associated with the given alias, using the given password to recover it.
Parameters:
alias - the alias name
password - the password for recovering the key
Returns:
the requested key, or null if the given alias does not exist or does not identify a key entry.
Throws:
NoSuchAlgorithmException - if the algorithm for recovering the key cannot be found
UnrecoverableKeyException - if the key cannot be recovered (e.g., the given password is wrong).

engineGetCertificateChain

public abstract Certificate[] engineGetCertificateChain(String alias)
Returns the certificate chain associated with the given alias.
Parameters:
alias - the alias name
Returns:
the certificate chain (ordered with the user's certificate first and the root certificate authority last), or null if the given alias does not exist or does not contain a certificate chain (i.e., the given alias identifies either a trusted certificate entry or a key entry without a certificate chain).

engineGetCertificate

public abstract Certificate engineGetCertificate(String alias)
Returns the certificate associated with the given alias.

If the given alias name identifies a trusted certificate entry, the certificate associated with that entry is returned. If the given alias name identifies a key entry, the first element of the certificate chain of that entry is returned, or null if that entry does not have a certificate chain.

Parameters:
alias - the alias name
Returns:
the certificate, or null if the given alias does not exist or does not contain a certificate.

engineGetCreationDate

public abstract Date engineGetCreationDate(String alias)
Returns the creation date of the entry identified by the given alias.
Parameters:
alias - the alias name
Returns:
the creation date of this entry, or null if the given alias does not exist

engineSetKeyEntry

public abstract void engineSetKeyEntry(String alias,
                                       Key key,
                                       char[] password,
                                       Certificate[] chain)
                                throws KeyStoreException
Assigns the given key to the given alias, protecting it with the given password.

If the given key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

Parameters:
alias - the alias name
key - the key to be associated with the alias
password - the password to protect the key
chain - the certificate chain for the corresponding public key (only required if the given key is of type java.security.PrivateKey).
Throws:
KeyStoreException - if the given key cannot be protected, or this operation fails for some other reason

engineSetKeyEntry

public abstract void engineSetKeyEntry(String alias,
                                       byte[] key,
                                       Certificate[] chain)
                                throws KeyStoreException
Assigns the given key (that has already been protected) to the given alias.

If the protected key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

Parameters:
alias - the alias name
key - the key (in protected format) to be associated with the alias
chain - the certificate chain for the corresponding public key (only useful if the protected key is of type java.security.PrivateKey).
Throws:
KeyStoreException - if this operation fails.

engineSetCertificateEntry

public abstract void engineSetCertificateEntry(String alias,
                                               Certificate cert)
                                        throws KeyStoreException
Assigns the given certificate to the given alias.

If the given alias already exists in this keystore and identifies a trusted certificate entry, the certificate associated with it is overridden by the given certificate.

Parameters:
alias - the alias name
cert - the certificate
Throws:
KeyStoreException - if the given alias already exists and does not identify a trusted certificate entry, or this operation fails for some other reason.

engineDeleteEntry

public abstract void engineDeleteEntry(String alias)
                                throws KeyStoreException
Deletes the entry identified by the given alias from this keystore.
Parameters:
alias - the alias name
Throws:
KeyStoreException - if the entry cannot be removed.

engineAliases

public abstract Enumeration engineAliases()
Lists all the alias names of this keystore.
Returns:
enumeration of the alias names

engineContainsAlias

public abstract boolean engineContainsAlias(String alias)
Checks if the given alias exists in this keystore.
Parameters:
alias - the alias name
Returns:
true if the alias exists, false otherwise

engineSize

public abstract int engineSize()
Retrieves the number of entries in this keystore.
Returns:
the number of entries in this keystore

engineIsKeyEntry

public abstract boolean engineIsKeyEntry(String alias)
Returns true if the entry identified by the given alias is a key entry, and false otherwise.
Parameters:
alias - the alias for the keystore entry to be checked
Returns:
true if the entry identified by the given alias is a key entry, false otherwise.

engineIsCertificateEntry

public abstract boolean engineIsCertificateEntry(String alias)
Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
Parameters:
alias - the alias for the keystore entry to be checked
Returns:
true if the entry identified by the given alias is a trusted certificate entry, false otherwise.

engineGetCertificateAlias

public abstract String engineGetCertificateAlias(Certificate cert)
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

This method attempts to match the given certificate with each keystore entry. If the entry being considered is a trusted certificate entry, the given certificate is compared to that entry's certificate. If the entry being considered is a key entry, the given certificate is compared to the first element of that entry's certificate chain (if a chain exists).

Parameters:
cert - the certificate to match with.
Returns:
the (alias) name of the first entry with matching certificate, or null if no such entry exists in this keystore.

engineStore

public abstract void engineStore(OutputStream stream,
                                 char[] password)
                          throws IOException,
                                 NoSuchAlgorithmException,
                                 CertificateException
Stores this keystore to the given output stream, and protects its integrity with the given password.
Parameters:
stream - the output stream to which this keystore is written.
password - the password to generate the keystore integrity check
Throws:
IOException - if there was an I/O problem with data
NoSuchAlgorithmException - if the appropriate data integrity algorithm could not be found
CertificateException - if any of the certificates included in the keystore data could not be stored

engineLoad

public abstract void engineLoad(InputStream stream,
                                char[] password)
                         throws IOException,
                                NoSuchAlgorithmException,
                                CertificateException
Loads the keystore from the given input stream.

If a password is given, it is used to check the integrity of the keystore data. Otherwise, the integrity of the keystore is not checked.

Parameters:
stream - the input stream from which the keystore is loaded
password - the (optional) password used to check the integrity of the keystore.
Throws:
IOException - if there is an I/O or format problem with the keystore data
NoSuchAlgorithmException - if the algorithm used to check the integrity of the keystore cannot be found
CertificateException - if any of the certificates in the keystore could not be loaded
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MessageDigest

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class MessageDigest

java.lang.Object
  |
  +--java.security.MessageDigestSpi
        |
        +--java.security.MessageDigest
public abstract class MessageDigest
extends MessageDigestSpi

This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA. Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value.

A MessageDigest object starts out initialized. The data is processed through it using the update methods. At any point reset can be called to reset the digest. Once all the data to be updated has been updated, one of the digest methods should be called to complete the hash computation.

The digest method can be called once for a given number of updates. After digest has been called, the MessageDigest object is reset to its initialized state.

Implementations are free to implement the Cloneable interface. Client applications can test cloneability by attempting cloning and catching the CloneNotSupportedException:

 MessageDigest md = MessageDigest.getInstance("SHA");

 try {
     md.update(toChapter1);
     MessageDigest tc1 = md.clone();
     byte[] toChapter1Digest = tc1.digest();
     md.update(toChapter2);
     ...etc.
 } catch (CloneNotSupportedException cnse) {
     throw new DigestException("couldn't make digest of partial content");
 }

Note that if a given implementation is not cloneable, it is still possible to compute intermediate digests by instantiating several instances, if the number of digests is known in advance.

Note that this class is abstract and extends from MessageDigestSpi for historical reasons. Application developers should only take notice of the methods defined in this MessageDigest class; all the methods in the superclass are intended for cryptographic service providers who wish to supply their own implementations of message digest algorithms.

See Also:
DigestInputStream, DigestOutputStream

Constructor Summary
protected MessageDigest(String algorithm)
Creates a message digest with the specified algorithm name.
Method Summary
Object | clone() Returns a clone if the implementation is cloneable.
byte[] | digest() Completes the hash computation by performing final operations such as padding.
byte[] | digest(byte[] input) Performs a final update on the digest using the specified array of bytes, then completes the digest computation.
int | digest(byte[] buf, int offset, int len) Completes the hash computation by performing final operations such as padding.
String | getAlgorithm() Returns a string that identifies the algorithm, independent of implementation details.
int | getDigestLength() Returns the length of the digest in bytes, or 0 if this operation is not supported by the provider and the implementation is not cloneable.
static MessageDigest | getInstance(String algorithm) Generates a MessageDigest object that implements the specified digest algorithm.
static MessageDigest | getInstance(String algorithm, String provider) Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Provider | getProvider() Returns the provider of this message digest object.
static boolean | isEqual(byte[] digesta, byte[] digestb) Compares two digests for equality.
void | reset() Resets the digest for further use.
String | toString() Returns a string representation of this message digest object.
void | update(byte input) Updates the digest using the specified byte.
void | update(byte[] input) Updates the digest using the specified array of bytes.
void | update(byte[] input, int offset, int len) Updates the digest using the specified array of bytes, starting at the specified offset.
Methods inherited from class java.security.MessageDigestSpi
engineDigest, engineDigest, engineGetDigestLength, engineReset, engineUpdate, engineUpdate
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MessageDigest

protected MessageDigest(String algorithm)
Creates a message digest with the specified algorithm name.
Parameters:
algorithm - the standard name of the digest algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Method Detail

getInstance

public static MessageDigest getInstance(String algorithm)
                                 throws NoSuchAlgorithmException
Generates a MessageDigest object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of MessageDigest containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
a Message Digest object implementing the specified algorithm.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the caller's environment.

getInstance

public static MessageDigest getInstance(String algorithm,
                                        String provider)
                                 throws NoSuchAlgorithmException,
                                        NoSuchProviderException
Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Parameters:
algorithm - the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider - the name of the provider.
Returns:
a Message Digest object implementing the specified algorithm.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the package supplied by the requested provider.
NoSuchProviderException - if the provider is not available in the environment.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this message digest object.
Returns:
the provider of this message digest object

update

public void update(byte input)
Updates the digest using the specified byte.
Parameters:
input - the byte with which to update the digest.

update

public void update(byte[] input,
                   int offset,
                   int len)
Updates the digest using the specified array of bytes, starting at the specified offset.
Parameters:
input - the array of bytes.
offset - the offset to start from in the array of bytes.
len - the number of bytes to use, starting at offset.

update

public void update(byte[] input)
Updates the digest using the specified array of bytes.
Parameters:
input - the array of bytes.

digest

public byte[] digest()
Completes the hash computation by performing final operations such as padding. The digest is reset after this call is made.
Returns:
the array of bytes for the resulting hash value.

digest

public int digest(byte[] buf,
                  int offset,
                  int len)
           throws DigestException
Completes the hash computation by performing final operations such as padding. The digest is reset after this call is made.
Parameters:
buf - output buffer for the computed digest
offset - offset into the output buffer to begin storing the digest
len - number of bytes within buf allotted for the digest
Returns:
the number of bytes placed into buf
Throws:
DigestException - if an error occurs.

digest

public byte[] digest(byte[] input)
Performs a final update on the digest using the specified array of bytes, then completes the digest computation. That is, this method first calls update(input), passing the input array to the update method, then calls digest().
Parameters:
input - the input to be updated before the digest is completed.
Returns:
the array of bytes for the resulting hash value.

toString

public String toString()
Returns a string representation of this message digest object.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

isEqual

public static boolean isEqual(byte[] digesta,
                              byte[] digestb)
Compares two digests for equality. Does a simple byte compare.
Parameters:
digesta - one of the digests to compare.
digestb - the other digest to compare.
Returns:
true if the digests are equal, false otherwise.

reset

public void reset()
Resets the digest for further use.

getAlgorithm

public final String getAlgorithm()
Returns a string that identifies the algorithm, independent of implementation details. The name should be a standard Java Security name (such as "SHA", "MD5", and so on). See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
the name of the algorithm

getDigestLength

public final int getDigestLength()
Returns the length of the digest in bytes, or 0 if this operation is not supported by the provider and the implementation is not cloneable.
Returns:
the digest length in bytes, or 0 if this operation is not supported by the provider and the implementation is not cloneable.
Since:
1.2

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone if the implementation is cloneable.
Overrides:
clone in class MessageDigestSpi
Returns:
a clone if the implementation is cloneable.
Throws:
CloneNotSupportedException - if this is called on an implementation that does not support Cloneable.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MessageDigestSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class MessageDigestSpi

java.lang.Object
  |
  +--java.security.MessageDigestSpi
Direct Known Subclasses:
MessageDigest
public abstract class MessageDigestSpi
extends Object

This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA. Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value.

All the abstract methods in this class must be implemented by a cryptographic service provider who wishes to supply the implementation of a particular message digest algorithm.

Implementations are free to implement the Cloneable interface.

See Also:
MessageDigest

Constructor Summary
MessageDigestSpi()
Method Summary
Object | clone() Returns a clone if the implementation is cloneable.
protected abstract byte[] | engineDigest() Completes the hash computation by performing final operations such as padding.
protected int | engineDigest(byte[] buf, int offset, int len) Completes the hash computation by performing final operations such as padding.
protected int | engineGetDigestLength() Returns the digest length in bytes.
protected abstract void | engineReset() Resets the digest for further use.
protected abstract void | engineUpdate(byte input) Updates the digest using the specified byte.
protected abstract void | engineUpdate(byte[] input, int offset, int len) Updates the digest using the specified array of bytes, starting at the specified offset.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MessageDigestSpi

public MessageDigestSpi()
Method Detail

engineGetDigestLength

protected int engineGetDigestLength()
Returns the digest length in bytes.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)

The default behavior is to return 0.

This method may be overridden by a provider to return the digest length.

Returns:
the digest length in bytes.
Since:
1.2

engineUpdate

protected abstract void engineUpdate(byte input)
Updates the digest using the specified byte.
Parameters:
input - the byte to use for the update.

engineUpdate

protected abstract void engineUpdate(byte[] input,
                                     int offset,
                                     int len)
Updates the digest using the specified array of bytes, starting at the specified offset.
Parameters:
input - the array of bytes to use for the update.
offset - the offset to start from in the array of bytes.
len - the number of bytes to use, starting at offset.

engineDigest

protected abstract byte[] engineDigest()
Completes the hash computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see engineReset). Resetting is the responsibility of the engine implementor.
Returns:
the array of bytes for the resulting hash value.

engineDigest

protected int engineDigest(byte[] buf,
                           int offset,
                           int len)
                    throws DigestException
Completes the hash computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see engineReset). Resetting is the responsibility of the engine implementor. This method should be abstract, but we leave it concrete for binary compatibility. Knowledgeable providers should override this method.
Parameters:
buf - the output buffer in which to store the digest
offset - offset to start from in the output buffer
len - number of bytes within buf allotted for the digest. Both this default implementation and the SUN provider do not return partial digests. The presence of this parameter is solely for consistency in our API's. If the value of this parameter is less than the actual digest length, the method will throw a DigestException. This parameter is ignored if its value is greater than or equal to the actual digest length.
Returns:
the length of the digest stored in the output buffer.
Throws:
DigestException - if an error occurs.
Since:
1.2

engineReset

protected abstract void engineReset()
Resets the digest for further use.

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone if the implementation is cloneable.
Overrides:
clone in class Object
Returns:
a clone if the implementation is cloneable.
Throws:
CloneNotSupportedException - if this is called on an implementation that does not support Cloneable.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchAlgorithmException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class NoSuchAlgorithmException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.NoSuchAlgorithmException
All Implemented Interfaces:
Serializable
public class NoSuchAlgorithmException
extends GeneralSecurityException

This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.

See Also:
Serialized Form

Constructor Summary
NoSuchAlgorithmException()
Constructs a NoSuchAlgorithmException with no detail message.
NoSuchAlgorithmException(String msg)
Constructs a NoSuchAlgorithmException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchAlgorithmException

public NoSuchAlgorithmException()
Constructs a NoSuchAlgorithmException with no detail message. A detail message is a String that describes this particular exception.

NoSuchAlgorithmException

public NoSuchAlgorithmException(String msg)
Constructs a NoSuchAlgorithmException with the specified detail message. A detail message is a String that describes this particular exception, which may, for example, specify which algorithm is not available.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchProviderException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class NoSuchProviderException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.NoSuchProviderException
All Implemented Interfaces:
Serializable
public class NoSuchProviderException
extends GeneralSecurityException

This exception is thrown when a particular security provider is requested but is not available in the environment.

See Also:
Serialized Form

Constructor Summary
NoSuchProviderException()
Constructs a NoSuchProviderException with no detail message.
NoSuchProviderException(String msg)
Constructs a NoSuchProviderException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchProviderException

public NoSuchProviderException()
Constructs a NoSuchProviderException with no detail message. A detail message is a String that describes this particular exception.

NoSuchProviderException

public NoSuchProviderException(String msg)
Constructs a NoSuchProviderException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Permission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Permission

java.lang.Object
  |
  +--java.security.Permission
All Implemented Interfaces:
Guard, Serializable
Direct Known Subclasses:
AllPermission, BasicPermission, FilePermission, SocketPermission, UnresolvedPermission
public abstract class Permission
extends Object
implements Guard, Serializable

Abstract class for representing access to a system resource. All permissions have a name (whose interpretation depends on the subclass), as well as abstract functions for defining the semantics of the particular Permission subclass.

Most Permission objects also include an "actions" list that tells the actions that are permitted for the object. For example, for a java.io.FilePermission object, the permission name is the pathname of a file (or directory), and the actions list (such as "read, write") specifies which actions are granted for the specified file (or for files in the specified directory). The actions list is optional for Permission objects, such as java.lang.RuntimePermission, that don't need such a list; you either have the named permission (such as "system.exit") or you don't.

An important method that must be implemented by each subclass is the implies method to compare Permissions. Basically, "permission p1 implies permission p2" means that if one is granted permission p1, one is naturally granted permission p2. Thus, this is not an equality test, but rather more of a subset test.

Permission objects are similar to String objects in that they are immutable once they have been created. Subclasses should not provide methods that can change the state of a permission once it has been created.

See Also:
Permissions, PermissionCollection, Serialized Form

Constructor Summary
Permission(String name)
Constructs a permission with the specified name.
Method Summary
void | checkGuard(Object object) Implements the guard interface for a permission.
abstract boolean | equals(Object obj) Checks two Permission objects for equality.
abstract String | getActions() Returns the actions as a String.
String | getName() Returns the name of this Permission.
abstract int | hashCode() Returns the hash code value for this Permission object.
abstract boolean | implies(Permission permission) Checks if the specified permission's actions are "implied by" this object's actions.
PermissionCollection | newPermissionCollection() Returns an empty PermissionCollection for a given Permission object, or null if one is not defined.
String | toString() Returns a string describing this Permission.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Permission

public Permission(String name)
Constructs a permission with the specified name.
Parameters:
name - name of the Permission object being created.
Method Detail

checkGuard

public void checkGuard(Object object)
                throws SecurityException
Implements the guard interface for a permission. The SecurityManager.checkPermission method is called, passing this permission object as the permission to check. Returns silently if access is granted. Otherwise, throws a SecurityException.
Specified by:
checkGuard in interface Guard
Parameters:
object - the object being guarded (currently ignored).
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow access.
See Also:
Guard, GuardedObject, SecurityManager.checkPermission(java.security.Permission)

implies

public abstract boolean implies(Permission permission)
Checks if the specified permission's actions are "implied by" this object's actions.

This must be implemented by subclasses of Permission, as they are the only ones that can impose semantics on a Permission object.

The implies method is used by the AccessController to determine whether or not a requested permission is implied by another permission that is known to be valid in the current execution context.

Parameters:
permission - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public abstract boolean equals(Object obj)
Checks two Permission objects for equality.

Do not use the equals method for making access control decisions; use the implies method.

Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if both Permission objects are equivalent.

hashCode

public abstract int hashCode()
Returns the hash code value for this Permission object.

The required hashCode behavior for Permission Objects is the following:

  • Whenever it is invoked on the same Permission object more than once during an execution of a Java application, the hashCode method must consistently return the same integer. This integer need not remain consistent from one execution of an application to another execution of the same application.

  • If two Permission objects are equal according to the equals method, then calling the hashCode method on each of the two Permission objects must produce the same integer result.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

getName

public final String getName()
Returns the name of this Permission. For example, in the case of a java.io.FilePermission, the name will be a pathname.
Returns:
the name of this Permission.

getActions

public abstract String getActions()
Returns the actions as a String. This is abstract so subclasses can defer creating a String representation until one is needed. Subclasses should always return actions in what they consider to be their canonical form. For example, two FilePermission objects created via the following:
   perm1 = new FilePermission(p1,"read,write");
   perm2 = new FilePermission(p2,"write,read");
both return "read,write" when the getActions method is invoked.
Returns:
the actions of this Permission.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns an empty PermissionCollection for a given Permission object, or null if one is not defined. Subclasses of class Permission should override this if they need to store their permissions in a particular PermissionCollection object in order to provide the correct semantics when the PermissionCollection.implies method is called. If null is returned, then the caller of this method is free to store permissions of this type in any PermissionCollection they choose (one that uses a Hashtable, one that uses a Vector, etc).
Returns:
a new PermissionCollection object for this type of Permission, or null if one is not defined.

toString

public String toString()
Returns a string describing this Permission. The convention is to specify the class name, the permission name, and the actions in the following format: '("ClassName" "name" "actions")'.
Overrides:
toString in class Object
Returns:
information about this Permission.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PermissionCollection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class PermissionCollection

java.lang.Object
  |
  +--java.security.PermissionCollection
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Permissions
public abstract class PermissionCollection
extends Object
implements Serializable

Abstract class representing a collection of Permission objects.

With a PermissionCollection, you can:

  • add a permission to the collection using the add method.
  • check to see if a particular permission is implied in the collection, using the implies method.
  • enumerate all the permissions, using the elements method.

When it is desirable to group together a number of Permission objects of the same type, the newPermissionCollection method on that particular type of Permission object should first be called. The default behavior (from the Permission class) is to simply return null. Subclasses of class Permission override the method if they need to store their permissions in a particular PermissionCollection object in order to provide the correct semantics when the PermissionCollection.implies method is called. If a non-null value is returned, that PermissionCollection must be used. If null is returned, then the caller of newPermissionCollection is free to store permissions of the given type in any PermissionCollection they choose (one that uses a Hashtable, one that uses a Vector, etc).

The PermissionCollection returned by the Permission.newPermissionCollection method is a homogeneous collection, which stores only Permission objects for a given Permission type. A PermissionCollection may also be heterogenous. For example, Permissions is a PermissionCollection subclass that represents a collection of PermissionCollections. That is, its members are each a homogeneous PermissionCollection. For example, a Permissions object might have a FilePermissionCollection for all the FilePermission objects, a SocketPermissionCollection for all the SocketPermission objects, and so on. Its add method adds a permission to the appropriate collection.

Whenever a permission is added to a heterogeneous PermissionCollection such as Permissions, and the PermissionCollection doesn't yet contain a PermissionCollection of the specified permission's type, the PermissionCollection should call the newPermissionCollection method on the permission's class to see if it requires a special PermissionCollection. If newPermissionCollection returns null, the PermissionCollection is free to store the permission in any type of PermissionCollection it desires (one using a Hastable, one using a Vector, etc.). For example, the Permissions object uses a default PermissionCollection implementation that stores the permission objects in a Hashtable.

See Also:
Permission, Permissions, Serialized Form

Constructor Summary
PermissionCollection()
Method Summary
abstract void | add(Permission permission) Adds a permission object to the current collection of permission objects.
abstract Enumeration | elements() Returns an enumeration of all the Permission objects in the collection.
abstract boolean | implies(Permission permission) Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
boolean | isReadOnly() Returns true if this PermissionCollection object is marked as readonly.
void | setReadOnly() Marks this PermissionCollection object as "readonly".
String | toString() Returns a string describing this PermissionCollection object, providing information about all the permissions it contains.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PermissionCollection

public PermissionCollection()
Method Detail

add

public abstract void add(Permission permission)
Adds a permission object to the current collection of permission objects.
Parameters:
permission - the Permission object to add.
Throws:
SecurityException - - if this PermissionCollection object has been marked readonly

implies

public abstract boolean implies(Permission permission)
Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
Parameters:
permission - the Permission object to compare.
Returns:
true if "permission" is implied by the permissions in the collection, false if not.

elements

public abstract Enumeration elements()
Returns an enumeration of all the Permission objects in the collection.
Returns:
an enumeration of all the Permissions.

setReadOnly

public void setReadOnly()
Marks this PermissionCollection object as "readonly". After a PermissionCollection object is marked as readonly, no new Permission objects can be added to it using add.

isReadOnly

public boolean isReadOnly()
Returns true if this PermissionCollection object is marked as readonly. If it is readonly, no new Permission objects can be added to it using add.

By default, the object is not readonly. It can be set to readonly by a call to setReadOnly.

Returns:
true if this PermissionCollection object is marked as readonly, false otherwise.

toString

public String toString()
Returns a string describing this PermissionCollection object, providing information about all the permissions it contains. The format is:
 super.toString() (
   // enumerate all the Permission
   // objects and call toString() on them,
   // one per line..
 )
super.toString is a call to the toString method of this object's superclass, which is Object. The result is this PermissionCollection's type name followed by this object's hashcode, thus enabling clients to differentiate different PermissionCollections object, even if they contain the same permissions.
Overrides:
toString in class Object
Returns:
information about this PermissionCollection object, as described above.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Permissions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Permissions

java.lang.Object
  |
  +--java.security.PermissionCollection
        |
        +--java.security.Permissions
All Implemented Interfaces:
Serializable
public final class Permissions
extends PermissionCollection
implements Serializable

This class represents a heterogeneous collection of Permissions. That is, it contains different types of Permission objects, organized into PermissionCollections. For example, if any java.io.FilePermission objects are added to an instance of this class, they are all stored in a single PermissionCollection. It is the PermissionCollection returned by a call to the newPermissionCollection method in the FilePermission class. Similarly, any java.lang.RuntimePermission objects are stored in the PermissionCollection returned by a call to the newPermissionCollection method in the RuntimePermission class. Thus, this class represents a collection of PermissionCollections.

When the add method is called to add a Permission, the Permission is stored in the appropriate PermissionCollection. If no such collection exists yet, the Permission object's class is determined and the newPermissionCollection method is called on that class to create the PermissionCollection and add it to the Permissions object. If newPermissionCollection returns null, then a default PermissionCollection that uses a hashtable will be created and used. Each hashtable entry stores a Permission object as both the key and the value.

See Also:
Permission, PermissionCollection, AllPermission, Serialized Form

Constructor Summary
Permissions()
Creates a new Permissions object containing no PermissionCollections.
Method Summary
void | add(Permission permission) Adds a permission object to the PermissionCollection for the class the permission belongs to.
Enumeration | elements() Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.
boolean | implies(Permission permission) Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object.
Methods inherited from class java.security.PermissionCollection
isReadOnly, setReadOnly, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Permissions

public Permissions()
Creates a new Permissions object containing no PermissionCollections.
Method Detail

add

public void add(Permission permission)
Adds a permission object to the PermissionCollection for the class the permission belongs to. For example, if permission is a FilePermission, it is added to the FilePermissionCollection stored in this Permissions object. This method creates a new PermissionCollection object (and adds the permission to it) if an appropriate collection does not yet exist.

Overrides:
add in class PermissionCollection
Parameters:
permission - the Permission object to add.
Throws:
SecurityException - if this Permissions object is marked as readonly.
See Also:
PermissionCollection.isReadOnly()

implies

public boolean implies(Permission permission)
Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object. Returns true if the combination of permissions in the appropriate PermissionCollection (e.g., a FilePermissionCollection for a FilePermission) together imply the specified permission.

For example, suppose there is a FilePermissionCollection in this Permissions object, and it contains one FilePermission that specifies "read" access for all files in all subdirectories of the "/tmp" directory, and another FilePermission that specifies "write" access for all files in the "/tmp/scratch/foo" directory. Then if the implies method is called with a permission specifying both "read" and "write" access to files in the "/tmp/scratch/foo" directory, true is returned.

Additionally, if this PermissionCollection contains the AllPermission, this method will always return true.

Overrides:
implies in class PermissionCollection
Parameters:
permission - the Permission object to check.
Returns:
true if "permission" is implied by the permissions in the PermissionCollection it belongs to, false if not.

elements

public Enumeration elements()
Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.
Overrides:
elements in class PermissionCollection
Returns:
an enumeration of all the Permissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Policy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Policy

java.lang.Object
  |
  +--java.security.Policy
public abstract class Policy
extends Object

This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources). That is, the security policy is represented by a Policy subclass providing an implementation of the abstract methods in this Policy class.

There is only one Policy object in effect at any given time.

The Policy object is typically consulted by objects such as the SecureClassLoader when a loader needs to determine the permissions to assign to a particular protection domain. The SecureClassLoader executes code such as the following to ask the currently installed Policy object to populate a PermissionCollection object:

   policy = Policy.getPolicy();
   PermissionCollection perms = policy.getPermissions(MyCodeSource)

The SecureClassLoader object passes in a CodeSource object, which encapsulates the codebase (URL) and public key certificates of the classes being loaded. The Policy object consults its policy specification and returns an appropriate Permissions object enumerating the permissions allowed for code from the specified code source.

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The policy configuration may be stored, for example, as a flat ASCII file, as a serialized binary file of the Policy class, or as a database.

The currently-installed Policy object can be obtained by calling the getPolicy method, and it can be changed by a call to the setPolicy method (by code with permission to reset the Policy).

The refresh method causes the policy object to refresh/reload its current configuration. This is implementation-dependent. For example, if the policy object stores its policy in configuration files, calling refresh will cause it to re-read the configuration policy files. The refreshed policy may not have an effect on classes loaded from a given CodeSource. This is dependent on the ProtectionDomain caching strategy of the ClassLoader. For example, the SecureClassLoader caches protection domains.

The default Policy implementation can be changed by setting the value of the "policy.provider" security property (in the Java security properties file) to the fully qualified name of the desired Policy implementation class. The Java security properties file is located in the file named <JAVA_HOME>/lib/security/java.security, where <JAVA_HOME> refers to the directory where the SDK was installed.

See Also:
CodeSource, PermissionCollection, SecureClassLoader

Constructor Summary
Policy()
Method Summary
abstract PermissionCollection | getPermissions(CodeSource codesource) Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.
static Policy | getPolicy() Returns the installed Policy object.
abstract void | refresh() Refreshes/reloads the policy configuration.
static void | setPolicy(Policy policy) Sets the system-wide Policy object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Policy

public Policy()
Method Detail

getPolicy

public static Policy getPolicy()
Returns the installed Policy object. This value should not be cached, as it may be changed by a call to setPolicy. This method first calls SecurityManager.checkPermission with a SecurityPermission("getPolicy") permission to ensure it's ok to get the Policy object..
Returns:
the installed Policy.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow getting the Policy object.
See Also:
SecurityManager#checkPermission(SecurityPermission), setPolicy(java.security.Policy)

setPolicy

public static void setPolicy(Policy policy)
Sets the system-wide Policy object. This method first calls SecurityManager.checkPermission with a SecurityPermission("setPolicy") permission to ensure it's ok to set the Policy.
Parameters:
policy - the new system Policy object.
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow setting the Policy.
See Also:
SecurityManager#checkPermission(SecurityPermission), getPolicy()

getPermissions

public abstract PermissionCollection getPermissions(CodeSource codesource)
Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.
Parameters:
codesource - the CodeSource associated with the caller. This encapsulates the original location of the code (where the code came from) and the public key(s) of its signer.
Returns:
the set of permissions allowed for code from codesource according to the policy.
Throws:
SecurityException - if the current thread does not have permission to call getPermissions on the policy object.

refresh

public abstract void refresh()
Refreshes/reloads the policy configuration. The behavior of this method depends on the implementation. For example, calling refresh on a file-based policy will cause the file to be re-read.
Throws:
SecurityException - if the current thread does not have permission to refresh this Policy object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Principal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface Principal

All Known Subinterfaces:
Group
All Known Implementing Classes:
Identity
public interface Principal

This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.

See Also:
X509Certificate

Method Summary
boolean | equals(Object another) Compares this principal to the specified object.
String | getName() Returns the name of this principal.
int | hashCode() Returns a hashcode for this principal.
String | toString() Returns a string representation of this principal.

Method Detail

equals

public boolean equals(Object another)
Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.
Overrides:
equals in class Object
Parameters:
another - principal to compare with.
Returns:
true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

toString

public String toString()
Returns a string representation of this principal.
Overrides:
toString in class Object
Returns:
a string representation of this principal.

hashCode

public int hashCode()
Returns a hashcode for this principal.
Overrides:
hashCode in class Object
Returns:
a hashcode for this principal.

getName

public String getName()
Returns the name of this principal.
Returns:
the name of this principal.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrivateKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface PrivateKey

All Superinterfaces:
Key, Serializable
All Known Subinterfaces:
DSAPrivateKey, RSAPrivateCrtKey, RSAPrivateKey
public interface PrivateKey
extends Key

A private key. This interface contains no methods or constants. It merely serves to group (and provide type safety for) all private key interfaces. Note: The specialized private key interfaces extend this interface. See, for example, the DSAPrivateKey interface in java.security.interfaces.

See Also:
Key, PublicKey, Certificate, Signature.initVerify(java.security.PublicKey), DSAPrivateKey, RSAPrivateKey, RSAPrivateCrtKey

Field Summary
static long serialVersionUID
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Field Detail

serialVersionUID

public static final long serialVersionUID
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrivilegedAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface PrivilegedAction

public interface PrivilegedAction

A computation to be performed with privileges enabled. The computation is performed by invoking AccessController.doPrivileged on the PrivilegedAction object. This interface is used only for computations that do not throw checked exceptions; computations that throw checked exceptions must use PrivilegedExceptionAction instead.

See Also:
AccessController, AccessController.doPrivileged(PrivilegedAction), PrivilegedExceptionAction

Method Summary
 Object run()
Performs the computation.

Method Detail

run

public Object run()
Performs the computation. This method will be called by AccessController.doPrivileged after enabling privileges.
Returns:
a class-dependent value that may represent the results of the computation. Each class that implements PrivilegedAction should document what (if anything) this value represents.
See Also:
AccessController.doPrivileged(PrivilegedAction), AccessController.doPrivileged(PrivilegedAction, AccessControlContext)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrivilegedActionException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class PrivilegedActionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.PrivilegedActionException
All Implemented Interfaces:
Serializable
public class PrivilegedActionException
extends Exception

This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception. The exception thrown by the action can be obtained by calling the getException method. In effect, an PrivilegedActionException is a "wrapper" for an exception thrown by a privileged action.

See Also:
PrivilegedExceptionAction, AccessController.doPrivileged(PrivilegedExceptionAction), AccessController.doPrivileged(PrivilegedExceptionAction,AccessControlContext), Serialized Form

Constructor Summary
PrivilegedActionException(Exception exception)
Constructs a new PrivilegedActionException "wrapping" the specific Exception.
Method Summary
Exception | getException() Returns the exception thrown by the privileged computation that resulted in this PrivilegedActionException.
void | printStackTrace() Prints the stack trace of the exception that occurred.
void | printStackTrace(PrintStream ps) Prints the stack trace of the exception that occurred to the specified print stream.
void | printStackTrace(PrintWriter pw) Prints the stack trace of the exception that occurred to the specified print writer.
String | toString() Returns a string describing this exception, including a description of the exception it wraps.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrivilegedActionException

public PrivilegedActionException(Exception exception)
Constructs a new PrivilegedActionException "wrapping" the specific Exception.
Parameters:
exception - The exception thrown
Method Detail

getException

public Exception getException()
Returns the exception thrown by the privileged computation that resulted in this PrivilegedActionException.
Returns:
the exception thrown by the privileged computation that resulted in this PrivilegedActionException.
See Also:
PrivilegedExceptionAction, AccessController.doPrivileged(PrivilegedExceptionAction), AccessController.doPrivileged(PrivilegedExceptionAction, AccessControlContext)

printStackTrace

public void printStackTrace()
Prints the stack trace of the exception that occurred.
Overrides:
printStackTrace in class Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the stack trace of the exception that occurred to the specified print stream.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the stack trace of the exception that occurred to the specified print writer.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
Parameters:
s - PrintWriter to use for output

toString

public String toString()
Returns a string describing this exception, including a description of the exception it wraps.
Overrides:
toString in class Throwable
Returns:
a string representation of this PrivilegedActionException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrivilegedExceptionAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Interface PrivilegedExceptionAction

public interface PrivilegedExceptionAction

A computation to be performed with privileges enabled, that throws one or more checked exceptions. The computation is performed by invoking AccessController.doPrivileged on the PrivilegedExceptionAction object. This interface is used only for computations that throw checked exceptions; computations that do not throw checked exceptions should use PrivilegedAction instead.

See Also:
AccessController, AccessController.doPrivileged(PrivilegedExceptionAction), AccessController.doPrivileged(PrivilegedExceptionAction, AccessControlContext), PrivilegedAction

Method Summary
 Object run()
Performs the computation.

Method Detail

run

public Object run()
           throws Exception
Performs the computation. This method will be called by AccessController.doPrivileged after enabling privileges.
Returns:
a class-dependent value that may represent the results of the computation. Each class that implements PrivilegedExceptionAction should document what (if anything) this value represents.
Throws:
Exception - an exceptional condition has occurred. Each class that implements PrivilegedExceptionAction should document the exceptions that its run method can throw.
See Also:
AccessController.doPrivileged(PrivilegedExceptionAction), AccessController.doPrivileged(PrivilegedExceptionAction,AccessControlContext)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProtectionDomain

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class ProtectionDomain

java.lang.Object
  |
  +--java.security.ProtectionDomain
public class ProtectionDomain
extends Object

This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.

In addition to a set of permissions, a domain is comprised of a CodeSource, which is a set of PublicKeys together with a codebase (in the form of a URL). Thus, classes signed by the same keys and from the same URL are placed in the same domain. Classes that have the same permissions but are from different code sources belong to different domains.

A class belongs to one and only one ProtectionDomain.

Constructor Summary
ProtectionDomain(CodeSource codesource, PermissionCollection permissions)
Creates a new ProtectionDomain with the given CodeSource and Permissions.
Method Summary
CodeSource | getCodeSource() Returns the CodeSource of this domain.
PermissionCollection | getPermissions() Returns the permissions of this domain.
boolean | implies(Permission permission) Check and see if this ProtectionDomain implies the permissions expressed in the Permission object.
String | toString() Convert a ProtectionDomain to a String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ProtectionDomain

public ProtectionDomain(CodeSource codesource,
                        PermissionCollection permissions)
Creates a new ProtectionDomain with the given CodeSource and Permissions. If the permissions object is not null, then setReadOnly() will be called on the passed in Permissions object.
Parameters:
codesource - the codesource associated with this domain
permissions - the permissions granted to this domain
Method Detail

getCodeSource

public final CodeSource getCodeSource()
Returns the CodeSource of this domain.
Returns:
the CodeSource of this domain.

getPermissions

public final PermissionCollection getPermissions()
Returns the permissions of this domain.
Returns:
the permissions of this domain.

implies

public boolean implies(Permission permission)
Check and see if this ProtectionDomain implies the permissions expressed in the Permission object.
Parameters:
permission - the Permission object to check.
Returns:
true if "permission" is a proper subset of a permission in this ProtectionDomain, false if not.

toString

public String toString()
Convert a ProtectionDomain to a String.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Provider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Provider

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--java.security.Provider
All Implemented Interfaces:
Cloneable, Map, Serializable
public abstract class Provider
extends Properties

This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including:

  • Algorithms (such as DSA, RSA, MD5 or SHA-1).
  • Key generation, conversion, and management facilities (such as for algorithm-specific keys).

Each provider has a name and a version number, and is configured in each runtime it is installed in.

See The Provider Class in the "Java Cryptography Architecture API Specification & Reference" for information about how a particular type of provider, the cryptographic service provider, works and is installed. However, please note that a provider can be used to implement any security service in Java that uses a pluggable architecture with a choice of implementations that fit underneath.

See Also:
Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
Fields inherited from class java.util.Properties
defaults
Constructor Summary
protected Provider(String name, double version, String info)
Constructs a provider with the specified name, version number, and information.
Method Summary
void | clear() Clears this provider so that it no longer contains the properties used to look up facilities implemented by the provider.
Set | entrySet() Returns an unmodifiable Set view of the property entries contained in this Provider.
String | getInfo() Returns a human-readable description of the provider and its services.
String | getName() Returns the name of this provider.
double | getVersion() Returns the version number for this provider.
Set | keySet() Returns an unmodifiable Set view of the property keys contained in this provider.
void | load(InputStream inStream) Reads a property list (key and element pairs) from the input stream.
Object | put(Object key, Object value) Sets the key property to have the specified value.
void | putAll(Map t) Copies all of the mappings from the specified Map to this provider.
Object | remove(Object key) Removes the key property (and its corresponding value).
String | toString() Returns a string with the name and the version number of this provider.
Collection | values() Returns an unmodifiable Collection view of the property values contained in this provider.
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, propertyNames, save, setProperty, store
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, keys, rehash, size
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Provider

protected Provider(String name,
                   double version,
                   String info)
Constructs a provider with the specified name, version number, and information.
Parameters:
name - the provider name.
version - the provider version number.
info - a description of the provider and its services.
Method Detail

getName

public String getName()
Returns the name of this provider.
Returns:
the name of this provider.

getVersion

public double getVersion()
Returns the version number for this provider.
Returns:
the version number for this provider.

getInfo

public String getInfo()
Returns a human-readable description of the provider and its services. This may return an HTML page, with relevant links.
Returns:
a description of the provider and its services.

toString

public String toString()
Returns a string with the name and the version number of this provider.
Overrides:
toString in class Hashtable
Returns:
the string with the name and the version number for this provider.

clear

public void clear()
Clears this provider so that it no longer contains the properties used to look up facilities implemented by the provider.

First, if there is a security manager, its checkSecurityAccess method is called with the string "clearProviderProperties."+name (where name is the provider name) to see if it's ok to clear this provider. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("clearProviderProperties."+name) permission.

Overrides:
clear in class Hashtable
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to clear this provider
Since:
1.2

load

public void load(InputStream inStream)
          throws IOException
Reads a property list (key and element pairs) from the input stream.
Overrides:
load in class Properties
Parameters:
inStream - the input stream.
Throws:
IOException - if an error occurred when reading from the input stream.
See Also:
Properties.load(java.io.InputStream)

putAll

public void putAll(Map t)
Copies all of the mappings from the specified Map to this provider. These mappings will replace any properties that this provider had for any of the keys currently in the specified Map.
Overrides:
putAll in class Hashtable
Since:
1.2

entrySet

public Set entrySet()
Returns an unmodifiable Set view of the property entries contained in this Provider.
Overrides:
entrySet in class Hashtable
Since:
1.2
See Also:
Map.Entry

keySet

public Set keySet()
Returns an unmodifiable Set view of the property keys contained in this provider.
Overrides:
keySet in class Hashtable
Since:
1.2

values

public Collection values()
Returns an unmodifiable Collection view of the property values contained in this provider.
Overrides:
values in class Hashtable
Since:
1.2

put

public Object put(Object key,
                  Object value)
Sets the key property to have the specified value.

First, if there is a security manager, its checkSecurityAccess method is called with the string "putProviderProperty."+name, where name is the provider name, to see if it's ok to set this provider's property values. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("putProviderProperty."+name) permission.

Overrides:
put in class Hashtable
Parameters:
key - the property key.
value - the property value.
Returns:
the previous value of the specified property (key), or null if it did not have one.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to set property values.
Since:
1.2

remove

public Object remove(Object key)
Removes the key property (and its corresponding value).

First, if there is a security manager, its checkSecurityAccess method is called with the string ""removeProviderProperty."+name, where name is the provider name, to see if it's ok to remove this provider's properties. If the default implementation of checkSecurityAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a SecurityPermission("removeProviderProperty."+name) permission.

Overrides:
remove in class Hashtable
Parameters:
key - the key for the property to be removed.
Returns:
the value to which the key had been mapped, or null if the key did not have a mapping.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to remove this provider's properties.
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProviderException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class ProviderException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.security.ProviderException
All Implemented Interfaces:
Serializable
public class ProviderException
extends RuntimeException

A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.

See Also:
Serialized Form

Constructor Summary
ProviderException()
Constructs a ProviderException with no detail message.
ProviderException(String s)
Constructs a ProviderException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ProviderException

public ProviderException()
Constructs a ProviderException with no detail message. A detail message is a String that describes this particular exception.

ProviderException

public ProviderException(String s)
Constructs a ProviderException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PublicKey

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Interface PublicKey

All Superinterfaces:
Key, Serializable
All Known Subinterfaces:
DSAPublicKey, RSAPublicKey
public interface PublicKey
extends Key

A public key. This interface contains no methods or constants. It merely serves to group (and provide type safety for) all public key interfaces. Note: The specialized public key interfaces extend this interface. See, for example, the DSAPublicKey interface in java.security.interfaces.

See Also:
Key, PrivateKey, Certificate, Signature.initVerify(java.security.PublicKey), DSAPublicKey, RSAPublicKey

Field Summary
static long serialVersionUID
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Field Detail

serialVersionUID

public static final long serialVersionUID
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SecureClassLoader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SecureClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
Direct Known Subclasses:
URLClassLoader
public class SecureClassLoader
extends ClassLoader

This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.

Constructor Summary
protected | SecureClassLoader() Creates a new SecureClassLoader using the default parent class loader for delegation.
protected | SecureClassLoader(ClassLoader parent) Creates a new SecureClassLoader using the specified parent class loader for delegation.
Method Summary
protected Class | defineClass(String name, byte[] b, int off, int len, CodeSource cs) Converts an array of bytes into an instance of class Class, with an optional CodeSource.
protected PermissionCollection | getPermissions(CodeSource codesource) Returns the permissions for the given CodeSource object.
Methods inherited from class java.lang.ClassLoader
defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SecureClassLoader

protected SecureClassLoader(ClassLoader parent)
Creates a new SecureClassLoader using the specified parent class loader for delegation.

If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

Parameters:
parent - the parent ClassLoader
Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
See Also:
SecurityManager.checkCreateClassLoader()

SecureClassLoader

protected SecureClassLoader()
Creates a new SecureClassLoader using the default parent class loader for delegation.

If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

Throws:
SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
See Also:
SecurityManager.checkCreateClassLoader()
Method Detail

defineClass

protected final Class defineClass(String name,
                                  byte[] b,
                                  int off,
                                  int len,
                                  CodeSource cs)
Converts an array of bytes into an instance of class Class, with an optional CodeSource. Before the class can be used it must be resolved.

If a non-null CodeSource is supplied and a Policy provider is installed, Policy.getPermissions() is invoked in order to associate a ProtectionDomain with the class being defined.

Parameters:
name - the name of the class
b - the class bytes
off - the start offset of the class bytes
len - the length of the class bytes
cs - the associated CodeSource, or null if none
Returns:
the Class object created from the data, and optional CodeSource.

getPermissions

protected PermissionCollection getPermissions(CodeSource codesource)
Returns the permissions for the given CodeSource object. The default implementation of this method invokes the java.security.Policy.getPermissions method to get the permissions granted by the policy to the specified CodeSource.

This method is invoked by the defineClass method which takes a CodeSource as an argument when it is constructing the ProtectionDomain for the class being defined.

The constructed ProtectionDomain is cached by the SecureClassLoader. The contents of the cache persist for the lifetime of the SecureClassLoader instance. This persistence inhibits Policy.refresh() from influencing the protection domains already in the cache for a given CodeSource.

Parameters:
codesource - the codesource.
Returns:
the permissions granted to the codesource.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SecureRandom

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SecureRandom

java.lang.Object
  |
  +--java.util.Random
        |
        +--java.security.SecureRandom
All Implemented Interfaces:
Serializable
public class SecureRandom
extends Random

This class provides a cryptographically strong pseudo-random number generator (PRNG).

Like other algorithm-based classes in Java Security, SecureRandom provides implementation-independent algorithms, whereby a caller (application code) requests a particular PRNG algorithm and is handed back a SecureRandom object for that algorithm. It is also possible, if desired, to request a particular algorithm from a particular provider. See the getInstance methods.

Thus, there are two ways to request a SecureRandom object: by specifying either just an algorithm name, or both an algorithm name and a package provider.

  • If just an algorithm name is specified, as in:
          SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
    the system will determine if there is an implementation of the algorithm requested available in the environment, and if there is more than one, if there is a preferred one.

  • If both an algorithm name and a package provider are specified, as in:
          SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
    the system will determine if there is an implementation of the algorithm in the package requested, and throw an exception if there is not.

The SecureRandom implementation attempts to completely randomize the internal state of the generator itself unless the caller follows the call to a getInstance method with a call to the setSeed method:

      SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
      random.setSeed(seed);

After the caller obtains the SecureRandom object from the getInstance call, it can call nextBytes to generate random bytes:

      byte bytes[] = new byte[20];
      random.nextBytes(bytes);

The caller may also invoke the generateSeed method to generate a given number of seed bytes (to seed other random number generators, for example):

      byte seed[] = random.generateSeed(20);

See Also:
SecureRandomSpi, Random, Serialized Form

Constructor Summary
 | SecureRandom() By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation.
 | SecureRandom(byte[] seed) By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation.
protected | SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider) Creates a SecureRandom object.
Method Summary
byte[] | generateSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
static SecureRandom | getInstance(String algorithm) Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm.
static SecureRandom | getInstance(String algorithm, String provider) Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.
Provider | getProvider() Returns the provider of this SecureRandom object.
static byte[] | getSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
protected int | next(int numBits) Generates an integer containing the user-specified number of pseudo-random bits (right justified, with leading zeros).
void | nextBytes(byte[] bytes) Generates a user-specified number of random bytes.
void | setSeed(byte[] seed) Reseeds this random object.
void | setSeed(long seed) Reseeds this random object, using the eight bytes contained in the given long seed.
Methods inherited from class java.util.Random
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SecureRandom

public SecureRandom()

By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation.

Note that this instance of SecureRandom has not been seeded. A call to the setSeed method will seed the SecureRandom object. If a call is not made to setSeed, the first call to the nextBytes method will force the SecureRandom object to seed itself.

This constructor is provided for backwards compatibility. The caller is encouraged to use one of the alternative getInstance methods to obtain a SecureRandom object.

SecureRandom

public SecureRandom(byte[] seed)

By using this constructor, the caller obtains a SecureRandom object containing the implementation from the highest-priority installed provider that has a SecureRandom implementation. This constructor uses a user-provided seed in preference to the self-seeding algorithm referred to in the empty constructor description. It may be preferable to the empty constructor if the caller has access to high-quality random bytes from some physical device (for example, a radiation detector or a noisy diode).

This constructor is provided for backwards compatibility. The caller is encouraged to use one of the alternative getInstance methods to obtain a SecureRandom object, and then to call the setSeed method to seed it.

Parameters:
seed - the seed.

SecureRandom

protected SecureRandom(SecureRandomSpi secureRandomSpi,
                       Provider provider)
Creates a SecureRandom object.
Parameters:
secureRandomSpi - the SecureRandom implementation.
provider - the provider.
Method Detail

getInstance

public static SecureRandom getInstance(String algorithm)
                                throws NoSuchAlgorithmException
Generates a SecureRandom object that implements the specified Pseudo Random Number Generator (PRNG) algorithm. If the default provider package provides an implementation of the requested PRNG, an instance of SecureRandom containing that implementation is returned. If the PRNG is not available in the default package, other packages are searched.

Note that the returned instance of SecureRandom has not been seeded. A call to the setSeed method will seed the SecureRandom object. If a call is not made to setSeed, the first call to the nextBytes method will force the SecureRandom object to seed itself.

Parameters:
algorithm - the name of the PRNG algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard PRNG algorithm names.
Returns:
the new SecureRandom object.
Throws:
NoSuchAlgorithmException - if the PRNG algorithm is not available in the caller's environment.
Since:
1.2

getInstance

public static SecureRandom getInstance(String algorithm,
                                       String provider)
                                throws NoSuchAlgorithmException,
                                       NoSuchProviderException
Generates a SecureRandom object for the specified PRNG algorithm, as supplied from the specified provider, if such a PRNG implementation is available from the provider.

Note that the returned instance of SecureRandom has not been seeded. A call to the setSeed method will seed the SecureRandom object. If a call is not made to setSeed, the first call to the nextBytes method will force the SecureRandom object to seed itself.

Parameters:
algorithm - the name of the PRNG algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard PRNG algorithm names.
provider - the name of the provider.
Returns:
the new SecureRandom object.
Throws:
NoSuchAlgorithmException - if the requested PRNG implementation is not available from the provider.
NoSuchProviderException - if the provider has not been configured.
Since:
1.2
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this SecureRandom object.
Returns:
the provider of this SecureRandom object.

setSeed

public void setSeed(byte[] seed)
Reseeds this random object. The given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.
Parameters:
seed - the seed.

setSeed

public void setSeed(long seed)
Reseeds this random object, using the eight bytes contained in the given long seed. The given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.

This method is defined for compatibility with java.util.Random.

Overrides:
setSeed in class Random
Parameters:
seed - the seed.

nextBytes

public void nextBytes(byte[] bytes)
Generates a user-specified number of random bytes. This method is used as the basis of all random entities returned by this class (except seed bytes).
Overrides:
nextBytes in class Random
Parameters:
bytes - the array to be filled in with random bytes.

next

protected final int next(int numBits)
Generates an integer containing the user-specified number of pseudo-random bits (right justified, with leading zeros). This method overrides a java.util.Random method, and serves to provide a source of random bits to all of the methods inherited from that class (for example, nextInt, nextLong, and nextFloat).
Overrides:
next in class Random
Parameters:
numBits - number of pseudo-random bits to be generated, where 0 <= numBits <= 32.Returns:
an int containing the user-specified number of pseudo-random bits (right justified, with leading zeros).

getSeed

public static byte[] getSeed(int numBytes)
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself. This call may be used to seed other random number generators.

This method is only included for backwards compatibility. The caller is encouraged to use one of the alternative getInstance methods to obtain a SecureRandom object, and then call the generateSeed method to obtain seed bytes from that object.

Parameters:
numBytes - the number of seed bytes to generate.
Returns:
the seed bytes.

generateSeed

public byte[] generateSeed(int numBytes)
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself. This call may be used to seed other random number generators.
Parameters:
numBytes - the number of seed bytes to generate.
Returns:
the seed bytes.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SecureRandomSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SecureRandomSpi

java.lang.Object
  |
  +--java.security.SecureRandomSpi
All Implemented Interfaces:
Serializable
public abstract class SecureRandomSpi
extends Object
implements Serializable

This class defines the Service Provider Interface (SPI) for the SecureRandom class. All the abstract methods in this class must be implemented by each service provider who wishes to supply the implementation of a cryptographically strong pseudo-random number generator.

Since:
1.2
See Also:
SecureRandom, Serialized Form

Constructor Summary
SecureRandomSpi()
Method Summary
protected abstract byte[] | engineGenerateSeed(int numBytes) Returns the given number of seed bytes.
protected abstract void | engineNextBytes(byte[] bytes) Generates a user-specified number of random bytes.
protected abstract void | engineSetSeed(byte[] seed) Reseeds this random object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SecureRandomSpi

public SecureRandomSpi()
Method Detail

engineSetSeed

protected abstract void engineSetSeed(byte[] seed)
Reseeds this random object. The given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.
Parameters:
seed - the seed.

engineNextBytes

protected abstract void engineNextBytes(byte[] bytes)
Generates a user-specified number of random bytes.
Parameters:
bytes - the array to be filled in with random bytes.

engineGenerateSeed

protected abstract byte[] engineGenerateSeed(int numBytes)
Returns the given number of seed bytes. This call may be used to seed other random number generators.
Parameters:
numBytes - the number of seed bytes to generate.
Returns:
the seed bytes.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Security

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Security

java.lang.Object
  |
  +--java.security.Security
public final class Security
extends Object

This class centralizes all security properties and common security methods. One of its primary uses is to manage providers.

Method Summary
static int | addProvider(Provider provider) Adds a provider to the next position available.
static String | getAlgorithmProperty(String algName, String propName) Deprecated. This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.
static String | getProperty(String key) Gets a security property value.
static Provider | getProvider(String name) Returns the provider installed with the specified name, if any.
static Provider[] | getProviders() Returns an array containing all the installed providers.
static Provider[] | getProviders(Map filter) Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.
static Provider[] | getProviders(String filter) Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed.
static int | insertProviderAt(Provider provider, int position) Adds a new provider, at a specified position.
static void | removeProvider(String name) Removes the provider with the specified name.
static void | setProperty(String key, String datum) Sets a security property value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getAlgorithmProperty

public static String getAlgorithmProperty(String algName,
                                          String propName)
Deprecated. This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independent AlgorithmParameters and KeyFactory engine classes (introduced in the Java 2 platform) instead.

Gets a specified property for an algorithm. The algorithm name should be a standard name. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names. One possible use is by specialized algorithm parsers, which may map classes to algorithms which they understand (much like Key parsers do).
Parameters:
algName - the algorithm name.
propName - the name of the property to get.
Returns:
the value of the specified property.

insertProviderAt

public static int insertProviderAt(Provider provider,
                                   int position)
Adds a new provider, at a specified position. The position is the preference order in which providers are searched for requested algorithms. Note that it is not guaranteed that this preference will be respected. The position is 1-based, that is, 1 is most preferred, followed by 2, and so on.

If the given provider is installed at the requested position, the provider that used to be at that position, and all providers with a position greater than position, are shifted up one position (towards the end of the list of installed providers).

A provider cannot be added if it is already installed.

First, if there is a security manager, its checkSecurityAccess method is called with the string "insertProvider."+provider.getName() to see if it's ok to add a new provider. If the default implementation of checkSecurityAccess is used (i.e., that method is not overriden), then this will result in a call to the security manager's checkPermission method with a SecurityPermission("insertProvider."+provider.getName()) permission.

Parameters:
provider - the provider to be added.
position - the preference position that the caller would like for this provider.
Returns:
the actual preference position in which the provider was added, or -1 if the provider was not added because it is already installed.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to add a new provider
See Also:
getProvider(java.lang.String), removeProvider(java.lang.String), SecurityPermission

addProvider

public static int addProvider(Provider provider)
Adds a provider to the next position available.

First, if there is a security manager, its checkSecurityAccess method is called with the string "insertProvider."+provider.getName() to see if it's ok to add a new provider. If the default implementation of checkSecurityAccess is used (i.e., that method is not overriden), then this will result in a call to the security manager's checkPermission method with a SecurityPermission("insertProvider."+provider.getName()) permission.

Parameters:
provider - the provider to be added.
Returns:
the preference position in which the provider was added, or -1 if the provider was not added because it is already installed.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to add a new provider
See Also:
getProvider(java.lang.String), removeProvider(java.lang.String), SecurityPermission

removeProvider

public static void removeProvider(String name)
Removes the provider with the specified name.

When the specified provider is removed, all providers located at a position greater than where the specified provider was are shifted down one position (towards the head of the list of installed providers).

This method returns silently if the provider is not installed.

First, if there is a security manager, its checkSecurityAccess method is called with the string "removeProvider."+name to see if it's ok to remove the provider. If the default implementation of checkSecurityAccess is used (i.e., that method is not overriden), then this will result in a call to the security manager's checkPermission method with a SecurityPermission("removeProvider."+name) permission.

Parameters:
name - the name of the provider to remove.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkSecurityAccess(java.lang.String) method denies access to remove the provider
See Also:
getProvider(java.lang.String), addProvider(java.security.Provider)

getProviders

public static Provider[] getProviders()
Returns an array containing all the installed providers. The order of the providers in the array is their preference order.
Returns:
an array of all the installed providers.

getProvider

public static Provider getProvider(String name)
Returns the provider installed with the specified name, if any. Returns null if no provider with the speicified name is installed.
Parameters:
name - the name of the provider to get.
Returns:
the provider of the specified name.
See Also:
removeProvider(java.lang.String), addProvider(java.security.Provider)

getProviders

public static Provider[] getProviders(String filter)
Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed. The returned providers are ordered according to their preference order.

A cryptographic service is always associated with a particular algorithm or type. For example, a digital signature service is always associated with a particular algorithm (e.g., DSA), and a CertificateFactory service is always associated with a particular certificate type (e.g., X.509).

The selection criterion must be specified in one of the following two formats:

  • <crypto_service>.<algorithm_or_type>

    The cryptographic service name must not contain any dots.

    A provider satisfies the specified selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service.

    For example, "CertificateFactory.X.509" would be satisfied by any provider that supplied a CertificateFactory implementation for X.509 certificates.

  • <crypto_service>.<algorithm_or_type> <attribute_name>:< attribute_value>

    The cryptographic service name must not contain any dots. There must be one or more space charaters between the the <algorithm_or_type> and the <attribute_name>.

    A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service and its implementation meets the constraint expressed by the specified attribute name/value pair.

    For example, "Signature.SHA1withDSA KeySize:1024" would be satisfied by any provider that implemented the SHA1withDSA signature algorithm with a keysize of 1024 (or larger).

See Appendix A in the Java Cryptogaphy Architecture API Specification & Reference for information about standard cryptographic service names, standard algorithm names and standard attribute names.

Parameters:
filter - the criterion for selecting providers. The filter is case-insensitive.
Returns:
all the installed providers that satisfy the selection criterion, or null if no such providers have been installed.
Throws:
InvalidParameterException - if the filter is not in the required format

getProviders

public static Provider[] getProviders(Map filter)
Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed. The returned providers are ordered according to their preference order.

The selection criteria are represented by a map. Each map entry represents a selection criterion. A provider is selected iff it satisfies all selection criteria. The key for any entry in such a map must be in one of the following two formats:

  • <crypto_service>.<algorithm_or_type>

    The cryptographic service name must not contain any dots.

    The value associated with the key must be an empty string.

    A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service.

  • <crypto_service>.<algorithm_or_type> <attribute_name>

    The cryptographic service name must not contain any dots. There must be one or more space charaters between the <algorithm_or_type> and the <attribute_name>.

    The value associated with the key must be a non-empty string. A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service and its implementation meets the constraint expressed by the specified attribute name/value pair.

See Appendix A in the Java Cryptogaphy Architecture API Specification & Reference for information about standard cryptographic service names, standard algorithm names and standard attribute names.

Parameters:
filter - the criteria for selecting providers. The filter is case-insensitive.
Returns:
all the installed providers that satisfy the selection criteria, or null if no such providers have been installed.
Throws:
InvalidParameterException - if the filter is not in the required format

getProperty

public static String getProperty(String key)
Gets a security property value.

First, if there is a security manager, its checkPermission method is called with a java.security.SecurityPermission("getProperty."+key) permission to see if it's ok to retrieve the specified security property value..

Parameters:
key - the key of the property being retrieved.
Returns:
the value of the security property corresponding to key.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkPermission(java.security.Permission) method denies access to retrieve the specified security property value
See Also:
SecurityPermission

setProperty

public static void setProperty(String key,
                               String datum)
Sets a security property value.

First, if there is a security manager, its checkPermission method is called with a java.security.SecurityPermission("setProperty."+key) permission to see if it's ok to set the specified security property value.

Parameters:
key - the name of the property to be set.
datum - the value of the property to be set.
Throws:
SecurityException - if a security manager exists and its SecurityManager.checkPermission(java.security.Permission) method denies access to set the specified security property value
See Also:
SecurityPermission
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SecurityPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SecurityPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.security.SecurityPermission
All Implemented Interfaces:
Guard, Serializable
public final class SecurityPermission
extends BasicPermission

This class is for security permissions. A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects.

The following table lists all the possible SecurityPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
createAccessControlContext | Creation of an AccessControlContext | This allows someone to instantiate an AccessControlContext with a DomainCombiner. Since DomainCombiners are given a reference to the ProtectionDomains currently on the stack, this could potentially lead to a privacy leak if the DomainCombiner is malicious.
getDomainCombiner | Retrieval of an AccessControlContext's DomainCombiner | This allows someone to retrieve an AccessControlContext's DomainCombiner. Since DomainCombiners may contain sensitive information, this could potentially lead to a privacy leak.
getPolicy | Retrieval of the system-wide security policy (specifically, of the currently-installed Policy object) | This allows someone to query the policy via the getPermissions call, which discloses which permissions would be granted to a given CodeSource. While revealing the policy does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack. It is wise not to divulge more information than necessary.
setPolicy | Setting of the system-wide security policy (specifically, the Policy object) | Granting this permission is extremely dangerous, as malicious code may grant itself all the necessary permissions it needs to successfully mount an attack on the system.
getProperty.{key} | Retrieval of the security property with the specified key | Depending on the particular key for which access has been granted, the code may have access to the list of security providers, as well as the location of the system-wide and user security policies. while revealing this information does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack.
setProperty.{key} | Setting of the security property with the specified key | This could include setting a security provider or defining the location of the the system-wide security policy. Malicious code that has permission to set a new security provider may set a rogue provider that steals confidential information such as cryptographic private keys. In addition, malicious code with permission to set the location of the system-wide security policy may point it to a security policy that grants the attacker all the necessary permissions it requires to successfully mount an attack on the system.
insertProvider.{provider name} | Addition of a new provider, with the specified name | This would allow somebody to introduce a possibly malicious provider (e.g., one that discloses the private keys passed to it) as the highest-priority provider. This would be possible because the Security object (which manages the installed providers) currently does not check the integrity or authenticity of a provider before attaching it.
removeProvider.{provider name} | Removal of the specified provider | This may change the behavior or disable execution of other parts of the program. If a provider subsequently requested by the program has been removed, execution may fail. Also, if the removed provider is not explicitly requested by the rest of the program, but it would normally be the provider chosen when a cryptography service is requested (due to its previous order in the list of providers), a different provider will be chosen instead, or no suitable provider will be found, thereby resulting in program failure.
setSystemScope | Setting of the system identity scope | This would allow an attacker to configure the system identity scope with certificates that should not be trusted, thereby granting applet or application code signed with those certificates privileges that would have been denied by the system's original identity scope
setIdentityPublicKey | Setting of the public key for an Identity | If the identity is marked as "trusted", this allows an attacker to introduce a different public key (e.g., its own) that is not trusted by the system's identity scope, thereby granting applet or application code signed with that public key privileges that would have been denied otherwise.
setIdentityInfo | Setting of a general information string for an Identity | This allows attackers to set the general description for an identity. This may trick applications into using a different identity than intended or may prevent applications from finding a particular identity.
addIdentityCertificate | Addition of a certificate for an Identity | This allows attackers to set a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes trusted to a wider audience than it otherwise would be.
removeIdentityCertificate | Removal of a certificate for an Identity | This allows attackers to remove a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes considered less trustworthy than it otherwise would be.
printIdentity | Viewing the name of a principal and optionally the scope in which it is used, and whether or not it is considered "trusted" in that scope | The scope that is printed out may be a filename, in which case it may convey local system information. For example, here's a sample printout of an identity named "carol", who is marked not trusted in the user's identity database: carol[/home/luehe/identitydb.obj][not trusted]
clearProviderProperties.{provider name} | "Clearing" of a Provider so that it no longer contains the properties used to look up services implemented by the provider | This disables the lookup of services implemented by the provider. This may thus change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.
putProviderProperty.{provider name} | Setting of properties for the specified Provider | The provider properties each specify the name and location of a particular service implemented by the provider. By granting this permission, you let code replace the service specification with another one, thereby specifying a different implementation.
removeProviderProperty.{provider name} | Removal of properties from the specified Provider | This disables the lookup of services implemented by the provider. They are no longer accessible due to removal of the properties specifying their names and locations. This may change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.
getSignerPrivateKey | Retrieval of a Signer's private key | It is very dangerous to allow access to a private key; private keys are supposed to be kept secret. Otherwise, code can use the private key to sign various files and claim the signature came from the Signer.
setSignerKeyPair | Setting of the key pair (public key and private key) for a Signer | This would allow an attacker to replace somebody else's (the "target's") keypair with a possibly weaker keypair (e.g., a keypair of a smaller keysize). This also would allow the attacker to listen in on encrypted communication between the target and its peers. The target's peers might wrap an encryption session key under the target's "new" public key, which would allow the attacker (who possesses the corresponding private key) to unwrap the session key and decipher the communication data encrypted under that session key.

See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
SecurityPermission(String name)
Creates a new SecurityPermission with the specified name.
SecurityPermission(String name, String actions)
Creates a new SecurityPermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SecurityPermission

public SecurityPermission(String name)
Creates a new SecurityPermission with the specified name. The name is the symbolic name of the SecurityPermission. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match.
Parameters:
name - the name of the SecurityPermission

SecurityPermission

public SecurityPermission(String name,
                          String actions)
Creates a new SecurityPermission object with the specified name. The name is the symbolic name of the SecurityPermission, and the actions String is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the SecurityPermission
actions - should be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Signature

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Signature

java.lang.Object
  |
  +--java.security.SignatureSpi
        |
        +--java.security.Signature
public abstract class Signature
extends SignatureSpi

This Signature class is used to provide applications the functionality of a digital signature algorithm. Digital signatures are used for authentication and integrity assurance of digital data.

The signature algorithm can be, among others, the NIST standard DSA, using DSA and SHA-1. The DSA algorithm using the SHA-1 message digest algorithm can be specified as SHA1withDSA. In the case of RSA, there are multiple choices for the message digest algorithm, so the signing algorithm could be specified as, for example, MD2withRSA, MD5withRSA, or SHA1withRSA. The algorithm name must be specified, as there is no default.

Like other algorithm-based classes in Java Security, Signature provides implementation-independent algorithms, whereby a caller (application code) requests a particular signature algorithm and is handed back a properly initialized Signature object. It is also possible, if desired, to request a particular algorithm from a particular provider. See the getInstance methods.

Thus, there are two ways to request a Signature algorithm object: by specifying either just an algorithm name, or both an algorithm name and a package provider.

  • If just an algorithm name is specified, the system will determine if there is an implementation of the algorithm requested available in the environment, and if there is more than one, if there is a preferred one.

  • If both an algorithm name and a package provider are specified, the system will determine if there is an implementation of the algorithm in the package requested, and throw an exception if there is not.

A Signature object can be used to generate and verify digital signatures.

There are three phases to the use of a Signature object for either signing data or verifying a signature:

  1. Initialization, with either
    • a public key, which initializes the signature for verification (see initVerify), or
    • a private key (and optionally a Secure Random Number Generator), which initializes the signature for signing (see initSign(PrivateKey) and initSign(PrivateKey, SecureRandom)).

  2. Updating

    Depending on the type of initialization, this will update the bytes to be signed or verified. See the update methods.

  3. Signing or Verifying a signature on all updated bytes. See the sign methods and the verify method.

Note that this class is abstract and extends from SignatureSpi for historical reasons. Application developers should only take notice of the methods defined in this Signature class; all the methods in the superclass are intended for cryptographic service providers who wish to supply their own implementations of digital signature algorithms.

Field Summary
protected static int | SIGN Possible state value, signifying that this signature object has been initialized for signing.
protected int | state Current state of this signature object.
protected static int | UNINITIALIZED Possible state value, signifying that this signature object has not yet been initialized.
protected static int | VERIFY Possible state value, signifying that this signature object has been initialized for verification.
Fields inherited from class java.security.SignatureSpi
appRandom
Constructor Summary
protected Signature(String algorithm)
Creates a Signature object for the specified algorithm.
Method Summary
Object | clone() Returns a clone if the implementation is cloneable.
String | getAlgorithm() Returns the name of the algorithm for this signature object.
static Signature | getInstance(String algorithm) Generates a Signature object that implements the specified digest algorithm.
static Signature | getInstance(String algorithm, String provider) Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Object | getParameter(String param) Deprecated.
Provider | getProvider() Returns the provider of this signature object.
void | initSign(PrivateKey privateKey) Initialize this object for signing.
void | initSign(PrivateKey privateKey, SecureRandom random) Initialize this object for signing.
void | initVerify(Certificate certificate) Initializes this object for verification, using the public key from the given certificate.
void | initVerify(PublicKey publicKey) Initializes this object for verification.
void | setParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.
void | setParameter(String param, Object value) Deprecated. Use setParameter.
byte[] | sign() Returns the signature bytes of all the data updated.
int | sign(byte[] outbuf, int offset, int len) Finishes the signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
String | toString() Returns a string representation of this signature object, providing information that includes the state of the object and the name of the algorithm used.
void | update(byte b) Updates the data to be signed or verified by a byte.
void | update(byte[] data) Updates the data to be signed or verified, using the specified array of bytes.
void | update(byte[] data, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
boolean | verify(byte[] signature) Verifies the passed-in signature.
Methods inherited from class java.security.SignatureSpi
engineGetParameter, engineInitSign, engineInitSign, engineInitVerify, engineSetParameter, engineSetParameter, engineSign, engineSign, engineUpdate, engineUpdate, engineVerify
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

UNINITIALIZED

protected static final int UNINITIALIZED
Possible state value, signifying that this signature object has not yet been initialized.

SIGN

protected static final int SIGN
Possible state value, signifying that this signature object has been initialized for signing.

VERIFY

protected static final int VERIFY
Possible state value, signifying that this signature object has been initialized for verification.

state

protected int state
Current state of this signature object.
Constructor Detail

Signature

protected Signature(String algorithm)
Creates a Signature object for the specified algorithm.
Parameters:
algorithm - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Method Detail

getInstance

public static Signature getInstance(String algorithm)
                             throws NoSuchAlgorithmException
Generates a Signature object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of Signature containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - the standard name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
the new Signature object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the environment.

getInstance

public static Signature getInstance(String algorithm,
                                    String provider)
                             throws NoSuchAlgorithmException,
                                    NoSuchProviderException
Generates a Signature object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Parameters:
algorithm - the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider - the name of the provider.
Returns:
the new Signature object.
Throws:
NoSuchAlgorithmException - if the algorithm is not available in the package supplied by the requested provider.
NoSuchProviderException - if the provider is not available in the environment.
See Also:
Provider

getProvider

public final Provider getProvider()
Returns the provider of this signature object.
Returns:
the provider of this signature object

initVerify

public final void initVerify(PublicKey publicKey)
                      throws InvalidKeyException
Initializes this object for verification. If this method is called again with a different argument, it negates the effect of this call.
Parameters:
publicKey - the public key of the identity whose signature is going to be verified.
Throws:
InvalidKeyException - if the key is invalid.

initVerify

public final void initVerify(Certificate certificate)
                      throws InvalidKeyException
Initializes this object for verification, using the public key from the given certificate.

If the certificate is of type X.509 and has a key usage extension field marked as critical, and the value of the key usage extension field implies that the public key in the certificate and its corresponding private key are not supposed to be used for digital signatures, an InvalidKeyException is thrown.

Parameters:
certificate - the certificate of the identity whose signature is going to be verified.
Throws:
InvalidKeyException - if the public key in the certificate is not encoded properly or does not include required parameter information or cannot be used for digital signature purposes.

initSign

public final void initSign(PrivateKey privateKey)
                    throws InvalidKeyException
Initialize this object for signing. If this method is called again with a different argument, it negates the effect of this call.
Parameters:
privateKey - the private key of the identity whose signature is going to be generated.
Throws:
InvalidKeyException - if the key is invalid.

initSign

public final void initSign(PrivateKey privateKey,
                           SecureRandom random)
                    throws InvalidKeyException
Initialize this object for signing. If this method is called again with a different argument, it negates the effect of this call.
Parameters:
privateKey - the private key of the identity whose signature is going to be generated.
random - the source of randomness for this signature.
Throws:
InvalidKeyException - if the key is invalid.

sign

public final byte[] sign()
                  throws SignatureException
Returns the signature bytes of all the data updated. The format of the signature depends on the underlying signature scheme.

A call to this method resets this signature object to the state it was in when previously initialized for signing via a call to initSign(PrivateKey). That is, the object is reset and available to generate another signature from the same signer, if desired, via new calls to update and sign.

Returns:
the signature bytes of the signing operation's result.
Throws:
SignatureException - if this signature object is not initialized properly.

sign

public final int sign(byte[] outbuf,
                      int offset,
                      int len)
               throws SignatureException
Finishes the signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset. The format of the signature depends on the underlying signature scheme.

This signature object is reset to its initial state (the state it was in after a call to one of the initSign methods) and can be reused to generate further signatures with the same private key.

Parameters:
outbuf - buffer for the signature result.
offset - offset into outbuf where the signature is stored.
len - number of bytes within outbuf allotted for the signature.
Returns:
the number of bytes placed into outbuf.
Throws:
SignatureException - if an error occurs or len is less than the actual signature length.
Since:
1.2

verify

public final boolean verify(byte[] signature)
                     throws SignatureException
Verifies the passed-in signature.

A call to this method resets this signature object to the state it was in when previously initialized for verification via a call to initVerify(PublicKey). That is, the object is reset and available to verify another signature from the identity whose public key was specified in the call to initVerify.

Parameters:
signature - the signature bytes to be verified.
Returns:
true if the signature was verified, false if not.
Throws:
SignatureException - if this signature object is not initialized properly, or the passed-in signature is improperly encoded or of the wrong type, etc.

update

public final void update(byte b)
                  throws SignatureException
Updates the data to be signed or verified by a byte.
Parameters:
b - the byte to use for the update.
Throws:
SignatureException - if this signature object is not initialized properly.

update

public final void update(byte[] data)
                  throws SignatureException
Updates the data to be signed or verified, using the specified array of bytes.
Parameters:
data - the byte array to use for the update.
Throws:
SignatureException - if this signature object is not initialized properly.

update

public final void update(byte[] data,
                         int off,
                         int len)
                  throws SignatureException
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
Parameters:
data - the array of bytes.
off - the offset to start from in the array of bytes.
len - the number of bytes to use, starting at offset.
Throws:
SignatureException - if this signature object is not initialized properly.

getAlgorithm

public final String getAlgorithm()
Returns the name of the algorithm for this signature object.
Returns:
the name of the algorithm for this signature object.

toString

public String toString()
Returns a string representation of this signature object, providing information that includes the state of the object and the name of the algorithm used.
Overrides:
toString in class Object
Returns:
a string representation of this signature object.

setParameter

public final void setParameter(String param,
                               Object value)
                        throws InvalidParameterException
Deprecated. Use setParameter.

Sets the specified algorithm parameter to the specified value. This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
Parameters:
param - the string identifier of the parameter.
value - the parameter value.
Throws:
InvalidParameterException - if param is an invalid parameter for this signature algorithm engine, the parameter is already set and cannot be set again, a security exception occurs, and so on.

setParameter

public final void setParameter(AlgorithmParameterSpec params)
                        throws InvalidAlgorithmParameterException
Initializes this signature engine with the specified parameter set.
Parameters:
params - the parameters
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this signature engine

getParameter

public final Object getParameter(String param)
                          throws InvalidParameterException
Deprecated.

Gets the value of the specified algorithm parameter. This method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
Parameters:
param - the string name of the parameter.
Returns:
the object that represents the parameter value, or null if there is none.
Throws:
InvalidParameterException - if param is an invalid parameter for this engine, or another exception occurs while trying to get this parameter.

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone if the implementation is cloneable.
Overrides:
clone in class SignatureSpi
Returns:
a clone if the implementation is cloneable.
Throws:
CloneNotSupportedException - if this is called on an implementation that does not support Cloneable.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SignatureException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SignatureException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.SignatureException
All Implemented Interfaces:
Serializable
public class SignatureException
extends GeneralSecurityException

This is the generic Signature exception.

See Also:
Serialized Form

Constructor Summary
SignatureException()
Constructs a SignatureException with no detail message.
SignatureException(String msg)
Constructs a SignatureException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SignatureException

public SignatureException()
Constructs a SignatureException with no detail message. A detail message is a String that describes this particular exception.

SignatureException

public SignatureException(String msg)
Constructs a SignatureException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SignatureSpi

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SignatureSpi

java.lang.Object
  |
  +--java.security.SignatureSpi
Direct Known Subclasses:
Signature
public abstract class SignatureSpi
extends Object

This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm. Digital signatures are used for authentication and integrity assurance of digital data. .

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a particular signature algorithm.

See Also:
Signature

Field Summary
protected  SecureRandom appRandom
Application-specified source of randomness.
Constructor Summary
SignatureSpi()
Method Summary
Object | clone() Returns a clone if the implementation is cloneable.
protected abstract Object | engineGetParameter(String param) Deprecated.
protected abstract void | engineInitSign(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.
protected void | engineInitSign(PrivateKey privateKey, SecureRandom random) Initializes this signature object with the specified private key and source of randomness for signing operations.
protected abstract void | engineInitVerify(PublicKey publicKey) Initializes this signature object with the specified public key for verification operations.
protected void | engineSetParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.
protected abstract void | engineSetParameter(String param, Object value) Deprecated. Replaced by engineSetParameter.
protected abstract byte[] | engineSign() Returns the signature bytes of all the data updated so far.
protected int | engineSign(byte[] outbuf, int offset, int len) Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.
protected abstract void | engineUpdate(byte b) Updates the data to be signed or verified using the specified byte.
protected abstract void | engineUpdate(byte[] b, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
protected abstract boolean | engineVerify(byte[] sigBytes) Verifies the passed-in signature.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

appRandom

protected SecureRandom appRandom
Application-specified source of randomness.
Constructor Detail

SignatureSpi

public SignatureSpi()
Method Detail

engineInitVerify

protected abstract void engineInitVerify(PublicKey publicKey)
                                  throws InvalidKeyException
Initializes this signature object with the specified public key for verification operations.
Parameters:
publicKey - the public key of the identity whose signature is going to be verified.
Throws:
InvalidKeyException - if the key is improperly encoded, parameters are missing, and so on.

engineInitSign

protected abstract void engineInitSign(PrivateKey privateKey)
                                throws InvalidKeyException
Initializes this signature object with the specified private key for signing operations.
Parameters:
privateKey - the private key of the identity whose signature will be generated.
Throws:
InvalidKeyException - if the key is improperly encoded, parameters are missing, and so on.

engineInitSign

protected void engineInitSign(PrivateKey privateKey,
                              SecureRandom random)
                       throws InvalidKeyException
Initializes this signature object with the specified private key and source of randomness for signing operations.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)

Parameters:
privateKey - the private key of the identity whose signature will be generated.
random - the source of randomness
Throws:
InvalidKeyException - if the key is improperly encoded, parameters are missing, and so on.

engineUpdate

protected abstract void engineUpdate(byte b)
                              throws SignatureException
Updates the data to be signed or verified using the specified byte.
Parameters:
b - the byte to use for the update.
Throws:
SignatureException - if the engine is not initialized properly.

engineUpdate

protected abstract void engineUpdate(byte[] b,
                                     int off,
                                     int len)
                              throws SignatureException
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
Parameters:
data - the array of bytes.
off - the offset to start from in the array of bytes.
len - the number of bytes to use, starting at offset.
Throws:
SignatureException - if the engine is not initialized properly.

engineSign

protected abstract byte[] engineSign()
                              throws SignatureException
Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.
Returns:
the signature bytes of the signing operation's result.
Throws:
SignatureException - if the engine is not initialized properly.

engineSign

protected int engineSign(byte[] outbuf,
                         int offset,
                         int len)
                  throws SignatureException
Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset. The format of the signature depends on the underlying signature scheme.

The signature implementation is reset to its initial state (the state it was in after a call to one of the engineInitSign methods) and can be reused to generate further signatures with the same private key. This method should be abstract, but we leave it concrete for binary compatibility. Knowledgeable providers should override this method.

Parameters:
outbuf - buffer for the signature result.
offset - offset into outbuf where the signature is stored.
len - number of bytes within outbuf allotted for the signature. Both this default implementation and the SUN provider do not return partial digests. If the value of this parameter is less than the actual signature length, this method will throw a SignatureException. This parameter is ignored if its value is greater than or equal to the actual signature length.
Returns:
the number of bytes placed into outbuf
Throws:
SignatureException - if an error occurs or len is less than the actual signature length.
Since:
1.2

engineVerify

protected abstract boolean engineVerify(byte[] sigBytes)
                                 throws SignatureException
Verifies the passed-in signature.
Parameters:
sigBytes - the signature bytes to be verified.
Returns:
true if the signature was verified, false if not.
Throws:
SignatureException - if the engine is not initialized properly, or the passed-in signature is improperly encoded or of the wrong type, etc.

engineSetParameter

protected abstract void engineSetParameter(String param,
                                           Object value)
                                    throws InvalidParameterException
Deprecated. Replaced by engineSetParameter.

Sets the specified algorithm parameter to the specified value. This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
Parameters:
param - the string identifier of the parameter.
value - the parameter value.
Throws:
InvalidParameterException - if param is an invalid parameter for this signature algorithm engine, the parameter is already set and cannot be set again, a security exception occurs, and so on.

engineSetParameter

protected void engineSetParameter(AlgorithmParameterSpec params)
                           throws InvalidAlgorithmParameterException
Initializes this signature engine with the specified parameter set. This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to set the algorithm parameters using the specified params. Such an override is expected to throw an InvalidAlgorithmParameterException if a parameter is invalid. If this method is not overridden, it always throws an UnsupportedOperationException.
Parameters:
params - the parameters
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this signature engine

engineGetParameter

protected abstract Object engineGetParameter(String param)
                                      throws InvalidParameterException
Deprecated.

Gets the value of the specified algorithm parameter. This method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
Parameters:
param - the string name of the parameter.
Returns:
the object that represents the parameter value, or null if there is none.
Throws:
InvalidParameterException - if param is an invalid parameter for this engine, or another exception occurs while trying to get this parameter.

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone if the implementation is cloneable.
Overrides:
clone in class Object
Returns:
a clone if the implementation is cloneable.
Throws:
CloneNotSupportedException - if this is called on an implementation that does not support Cloneable.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SignedObject

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class SignedObject

java.lang.Object
  |
  +--java.security.SignedObject
All Implemented Interfaces:
Serializable
public final class SignedObject
extends Object
implements Serializable

SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.

More specifically, a SignedObject contains another Serializable object, the (to-be-)signed object and its signature.

The signed object is a "deep copy" (in serialized form) of an original object. Once the copy is made, further manipulation of the original object has no side effect on the copy.

The underlying signing algorithm is designated by the Signature object passed to the constructor and the verify method. A typical usage for signing is the following:

 Signature signingEngine = Signature.getInstance(algorithm,
                                                 provider);
 SignedObject so = new SignedObject(myobject, signingKey,
                                    signingEngine);

A typical usage for verification is the following (having received SignedObject so):

 Signature verificationEngine =
     Signature.getInstance(algorithm, provider);
 if (so.verify(publickey, verificationEngine))
     try {
         Object myobj = so.getObject();
     } catch (java.lang.ClassNotFoundException e) {};

Several points are worth noting. First, there is no need to initialize the signing or verification engine, as it will be re-initialized inside the constructor and the verify method. Secondly, for verification to succeed, the specified public key must be the public key corresponding to the private key used to generate the SignedObject.

More importantly, for flexibility reasons, the constructor and verify method allow for customized signature engines, which can implement signature algorithms that are not installed formally as part of a crypto provider. However, it is crucial that the programmer writing the verifier code be aware what Signature engine is being used, as its own implementation of the verify method is invoked to verify a signature. In other words, a malicious Signature may choose to always return true on verification in an attempt to bypass a security check.

The signature algorithm can be, among others, the NIST standard DSA, using DSA and SHA-1. The algorithm is specified using the same convention as that for signatures. The DSA algorithm using the SHA-1 message digest algorithm can be specified, for example, as "SHA/DSA" or "SHA-1/DSA" (they are equivalent). In the case of RSA, there are multiple choices for the message digest algorithm, so the signing algorithm could be specified as, for example, "MD2/RSA", "MD5/RSA" or "SHA-1/RSA". The algorithm name must be specified, as there is no default.

The name of the Cryptography Package Provider is designated also by the Signature parameter to the constructor and the verify method. If the provider is not specified, the default provider is used. Each installation can be configured to use a particular provider as default.

Potential applications of SignedObject include:

  • It can be used internally to any Java runtime as an unforgeable authorization token -- one that can be passed around without the fear that the token can be maliciously modified without being detected.
  • It can be used to sign and serialize data/object for storage outside the Java runtime (e.g., storing critical access control data on disk).
  • Nested SignedObjects can be used to construct a logical sequence of signatures, resembling a chain of authorization and delegation.

See Also:
Signature, Serialized Form

Constructor Summary
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a SignedObject from any Serializable object.
Method Summary
String | getAlgorithm() Retrieves the name of the signature algorithm.
Object | getObject() Retrieves the encapsulated object.
byte[] | getSignature() Retrieves the signature on the signed object, in the form of a byte array.
boolean | verify(PublicKey verificationKey, Signature verificationEngine) Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SignedObject

public SignedObject(Serializable object,
                    PrivateKey signingKey,
                    Signature signingEngine)
             throws IOException,
                    InvalidKeyException,
                    SignatureException
Constructs a SignedObject from any Serializable object. The given object is signed with the given signing key, using the designated signature engine.
Parameters:
object - the object to be signed.
signingKey - the private key for signing.
signingEngine - the signature signing engine.
Throws:
IOException - if an error occurs during serialization
InvalidKeyException - if the key is invalid.
SignatureException - if signing fails.
Method Detail

getObject

public Object getObject()
                 throws IOException,
                        ClassNotFoundException
Retrieves the encapsulated object. The encapsulated object is de-serialized before it is returned.
Returns:
the encapsulated object.
Throws:
IOException - if an error occurs during de-serialization
ClassNotFoundException - if an error occurs during de-serialization

getSignature

public byte[] getSignature()
Retrieves the signature on the signed object, in the form of a byte array.
Returns:
the signature.

getAlgorithm

public String getAlgorithm()
Retrieves the name of the signature algorithm.
Returns:
the signature algorithm name.

verify

public boolean verify(PublicKey verificationKey,
                      Signature verificationEngine)
               throws InvalidKeyException,
                      SignatureException
Verifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.
Parameters:
verificationKey - the public key for verification.
verificationEngine - the signature verification engine.
Returns:
true if the signature is valid, false otherwise
Throws:
SignatureException - if signature verification failed.
InvalidKeyException - if the verification key is invalid.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Signer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security
Class Signer

java.lang.Object
  |
  +--java.security.Identity
        |
        +--java.security.Signer
All Implemented Interfaces:
Principal, Serializable
Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

public abstract class Signer
extends Identity

This class is used to represent an Identity that can also digitally sign data.

The management of a signer's private keys is an important and sensitive issue that should be handled by subclasses as appropriate to their intended use.

See Also:
Identity, Serialized Form

Constructor Summary
protected | Signer() Deprecated. Creates a signer.
 | Signer(String name) Deprecated. Creates a signer with the specified identity name.
 | Signer(String name, IdentityScope scope) Deprecated. Creates a signer with the specified identity name and scope.
Method Summary
PrivateKey | getPrivateKey() Deprecated. Returns this signer's private key.
void | setKeyPair(KeyPair pair) Deprecated. Sets the key pair (public key and private key) for this signer.
String | toString() Deprecated. Returns a string of information about the signer.
Methods inherited from class java.security.Identity
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Signer

protected Signer()
Deprecated.
Creates a signer. This constructor should only be used for serialization.

Signer

public Signer(String name)
Deprecated.
Creates a signer with the specified identity name.
Parameters:
name - the identity name.

Signer

public Signer(String name,
              IdentityScope scope)
       throws KeyManagementException
Deprecated.
Creates a signer with the specified identity name and scope.
Parameters:
name - the identity name.
scope - the scope of the identity.
Throws:
KeyManagementException - if there is already an identity with the same name in the scope.
Method Detail

getPrivateKey

public PrivateKey getPrivateKey()
Deprecated.
Returns this signer's private key.

First, if there is a security manager, its checkSecurityAccess method is called with "getSignerPrivateKey" as its argument to see if it's ok to return the private key.

Returns:
this signer's private key, or null if the private key has not yet been set.
Throws:
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow returning the private key.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

setKeyPair

public final void setKeyPair(KeyPair pair)
                      throws InvalidParameterException,
                             KeyException
Deprecated.
Sets the key pair (public key and private key) for this signer.

First, if there is a security manager, its checkSecurityAccess method is called with "setSignerKeyPair" as its argument to see if it's ok to set the key pair.

Parameters:
pair - an initialized key pair.
Throws:
InvalidParameterException - if the key pair is not properly initialized.
KeyException - if the key pair cannot be set for any other reason.
SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the key pair.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String)

toString

public String toString()
Deprecated.
Returns a string of information about the signer.
Overrides:
toString in class Identity
Returns:
a string of information about the signer.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlgorithmParameterSpec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Interface AlgorithmParameterSpec

All Known Implementing Classes:
RSAKeyGenParameterSpec, DSAParameterSpec
public interface AlgorithmParameterSpec

A (transparent) specification of cryptographic parameters.

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all parameter specifications. All parameter specifications must implement this interface.

Since:
1.2
See Also:
AlgorithmParameters, DSAParameterSpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.security.spec Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.security.spec

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.security.spec.DSAParameterSpec (implements java.security.spec.AlgorithmParameterSpec, java.security.interfaces.DSAParams)
    • class java.security.spec.DSAPrivateKeySpec (implements java.security.spec.KeySpec)
    • class java.security.spec.DSAPublicKeySpec (implements java.security.spec.KeySpec)
    • class java.security.spec.EncodedKeySpec (implements java.security.spec.KeySpec)
      • class java.security.spec.PKCS8EncodedKeySpec
      • class java.security.spec.X509EncodedKeySpec
    • class java.security.spec.RSAKeyGenParameterSpec (implements java.security.spec.AlgorithmParameterSpec)
    • class java.security.spec.RSAPrivateKeySpec (implements java.security.spec.KeySpec)
      • class java.security.spec.RSAPrivateCrtKeySpec
    • class java.security.spec.RSAPublicKeySpec (implements java.security.spec.KeySpec)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.security.GeneralSecurityException
          • class java.security.spec.InvalidKeySpecException
          • class java.security.spec.InvalidParameterSpecException

Interface Hierarchy

  • interface java.security.spec.AlgorithmParameterSpec
  • interface java.security.spec.KeySpec
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


KeySpec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Interface KeySpec

All Known Implementing Classes:
EncodedKeySpec, DSAPrivateKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec, DSAPublicKeySpec
public interface KeySpec

A (transparent) specification of the key material that constitutes a cryptographic key.

If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec).

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all key specifications. All key specifications must implement this interface.

Since:
1.2
See Also:
Key, KeyFactory, EncodedKeySpec, X509EncodedKeySpec, PKCS8EncodedKeySpec, DSAPrivateKeySpec, DSAPublicKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package java.security.spec

Provides classes and interfaces for key specifications and algorithm parameter specifications.

See:
Description

Interface Summary
AlgorithmParameterSpec | A (transparent) specification of cryptographic parameters.
KeySpec | A (transparent) specification of the key material that constitutes a cryptographic key.

Class Summary
DSAParameterSpec | This class specifies the set of parameters used with the DSA algorithm.
DSAPrivateKeySpec | This class specifies a DSA private key with its associated parameters.
DSAPublicKeySpec | This class specifies a DSA public key with its associated parameters.
EncodedKeySpec | This class represents a public or private key in encoded format.
PKCS8EncodedKeySpec | This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:
RSAKeyGenParameterSpec | This class specifies the set of parameters used to generate an RSA key pair.
RSAPrivateCrtKeySpec | This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
RSAPrivateKeySpec | This class specifies an RSA private key.
RSAPublicKeySpec | This class specifies an RSA public key.
X509EncodedKeySpec | This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:

Exception Summary
InvalidKeySpecException | This is the exception for invalid key specifications.
InvalidParameterSpecException | This is the exception for invalid parameter specifications.

Package java.security.spec Description

Provides classes and interfaces for key specifications and algorithm parameter specifications.

A key specification is a transparent representation of the key material that constitutes a key. A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). This package contains key specifications for DSA public and private keys, RSA public and private keys, PKCS #8 private keys in DER-encoded format, and X.509 public and private keys in DER-encoded format.

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm. This package contains an algorithm parameter specification for parameters used with the DSA algorithm.

Package Specification

  • PKCS #1: RSA Encryption Standard, Version 1.5, November 1993
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, November 1993
  • Federal Information Processing Standards Publication (FIPS PUB) 186: Digital Signature Standard (DSS)

Related Documentation

For documentation that includes information about algorithm parameter and key specifications, please see:
  • Java Cryptography Architecture API Specification and Reference

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.security.spec

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.security.spec

Packages that use java.security.spec
java.security | Provides the classes and interfaces for the security framework.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Classes in java.security.spec used by java.security
AlgorithmParameterSpec
A (transparent) specification of cryptographic parameters.
InvalidKeySpecException
This is the exception for invalid key specifications.
InvalidParameterSpecException
This is the exception for invalid parameter specifications.
KeySpec
A (transparent) specification of the key material that constitutes a cryptographic key.

Classes in java.security.spec used by java.security.spec
AlgorithmParameterSpec
A (transparent) specification of cryptographic parameters.
EncodedKeySpec
This class represents a public or private key in encoded format.
KeySpec
A (transparent) specification of the key material that constitutes a cryptographic key.
RSAPrivateKeySpec
This class specifies an RSA private key.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.DSAParameterSpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.DSAParameterSpec

No usage of java.security.spec.DSAParameterSpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.DSAPrivateKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.DSAPrivateKeySpec

No usage of java.security.spec.DSAPrivateKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.DSAPublicKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.DSAPublicKeySpec

No usage of java.security.spec.DSAPublicKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.PKCS8EncodedKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.PKCS8EncodedKeySpec

No usage of java.security.spec.PKCS8EncodedKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.RSAKeyGenParameterSpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.RSAKeyGenParameterSpec

No usage of java.security.spec.RSAKeyGenParameterSpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.RSAPrivateCrtKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.RSAPrivateCrtKeySpec

No usage of java.security.spec.RSAPrivateCrtKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.RSAPublicKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.RSAPublicKeySpec

No usage of java.security.spec.RSAPublicKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.X509EncodedKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.X509EncodedKeySpec

No usage of java.security.spec.X509EncodedKeySpec

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.EncodedKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.EncodedKeySpec

Packages that use EncodedKeySpec
java.security.spec Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of EncodedKeySpec in java.security.spec

Subclasses of EncodedKeySpec in java.security.spec
class | PKCS8EncodedKeySpec This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:
class | X509EncodedKeySpec This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.InvalidKeySpecException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.InvalidKeySpecException

Packages that use InvalidKeySpecException
java.security Provides the classes and interfaces for the security framework.

Uses of InvalidKeySpecException in java.security

Methods in java.security that throw InvalidKeySpecException
PublicKey | KeyFactory.generatePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
PrivateKey | KeyFactory.generatePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
KeySpec | KeyFactory.getKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
protected abstract PublicKey | KeyFactorySpi.engineGeneratePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
protected abstract PrivateKey | KeyFactorySpi.engineGeneratePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
protected abstract KeySpec | KeyFactorySpi.engineGetKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.InvalidParameterSpecException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.InvalidParameterSpecException

Packages that use InvalidParameterSpecException
java.security Provides the classes and interfaces for the security framework.

Uses of InvalidParameterSpecException in java.security

Methods in java.security that throw InvalidParameterSpecException
void | AlgorithmParameters.init(AlgorithmParameterSpec paramSpec) Initializes this parameter object using the parameters specified in paramSpec.
AlgorithmParameterSpec | AlgorithmParameters.getParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameter object.
protected abstract void | AlgorithmParametersSpi.engineInit(AlgorithmParameterSpec paramSpec) Initializes this parameters object using the parameters specified in paramSpec.
protected abstract AlgorithmParameterSpec | AlgorithmParametersSpi.engineGetParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameters object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.security.spec.RSAPrivateKeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.security.spec.RSAPrivateKeySpec

Packages that use RSAPrivateKeySpec
java.security.spec Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of RSAPrivateKeySpec in java.security.spec

Subclasses of RSAPrivateKeySpec in java.security.spec
 class RSAPrivateCrtKeySpec
This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.spec.AlgorithmParameterSpec

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.spec.AlgorithmParameterSpec

Packages that use AlgorithmParameterSpec
java.security | Provides the classes and interfaces for the security framework.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of AlgorithmParameterSpec in java.security

Methods in java.security that return AlgorithmParameterSpec
AlgorithmParameterSpec | AlgorithmParameters.getParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameter object.
protected abstract AlgorithmParameterSpec | AlgorithmParametersSpi.engineGetParameterSpec(Class paramSpec) Returns a (transparent) specification of this parameters object.

Methods in java.security with parameters of type AlgorithmParameterSpec
void | KeyPairGeneratorSpi.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
void | KeyPairGenerator.initialize(AlgorithmParameterSpec params) Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
void | KeyPairGenerator.initialize(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator with the given parameter set and source of randomness.
protected void | SignatureSpi.engineSetParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.
void | AlgorithmParameters.init(AlgorithmParameterSpec paramSpec) Initializes this parameter object using the parameters specified in paramSpec.
protected abstract void | AlgorithmParameterGeneratorSpi.engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | AlgorithmParameterGenerator.init(AlgorithmParameterSpec genParamSpec) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | AlgorithmParameterGenerator.init(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.
void | Signature.setParameter(AlgorithmParameterSpec params) Initializes this signature engine with the specified parameter set.
protected abstract void | AlgorithmParametersSpi.engineInit(AlgorithmParameterSpec paramSpec) Initializes this parameters object using the parameters specified in paramSpec.

Uses of AlgorithmParameterSpec in java.security.spec

Classes in java.security.spec that implement AlgorithmParameterSpec
class | DSAParameterSpec This class specifies the set of parameters used with the DSA algorithm.
class | RSAKeyGenParameterSpec This class specifies the set of parameters used to generate an RSA key pair.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.security.spec.KeySpec

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.security.spec.KeySpec

Packages that use KeySpec
java.security | Provides the classes and interfaces for the security framework.
java.security.spec | Provides classes and interfaces for key specifications and algorithm parameter specifications.

Uses of KeySpec in java.security

Methods in java.security that return KeySpec
KeySpec | KeyFactory.getKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.
protected abstract KeySpec | KeyFactorySpi.engineGetKeySpec(Key key, Class keySpec) Returns a specification (key material) of the given key object.

Methods in java.security with parameters of type KeySpec
PublicKey | KeyFactory.generatePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
PrivateKey | KeyFactory.generatePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).
protected abstract PublicKey | KeyFactorySpi.engineGeneratePublic(KeySpec keySpec) Generates a public key object from the provided key specification (key material).
protected abstract PrivateKey | KeyFactorySpi.engineGeneratePrivate(KeySpec keySpec) Generates a private key object from the provided key specification (key material).

Uses of KeySpec in java.security.spec

Classes in java.security.spec that implement KeySpec
class | DSAPrivateKeySpec This class specifies a DSA private key with its associated parameters.
class | DSAPublicKeySpec This class specifies a DSA public key with its associated parameters.
class | EncodedKeySpec This class represents a public or private key in encoded format.
class | PKCS8EncodedKeySpec This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:
class | RSAPrivateCrtKeySpec This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
class | RSAPrivateKeySpec This class specifies an RSA private key.
class | RSAPublicKeySpec This class specifies an RSA public key.
class | X509EncodedKeySpec This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DSAParameterSpec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class DSAParameterSpec

java.lang.Object
  |
  +--java.security.spec.DSAParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec, DSAParams
public class DSAParameterSpec
extends Object
implements AlgorithmParameterSpec, DSAParams

This class specifies the set of parameters used with the DSA algorithm.

Since:
1.2
See Also:
AlgorithmParameterSpec

Constructor Summary
DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAParameterSpec with the specified parameter values.
Method Summary
BigInteger | getG() Returns the base g.
BigInteger | getP() Returns the prime p.
BigInteger | getQ() Returns the sub-prime q.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DSAParameterSpec

public DSAParameterSpec(BigInteger p,
                        BigInteger q,
                        BigInteger g)
Creates a new DSAParameterSpec with the specified parameter values.
Parameters:
p - the prime.
q - the sub-prime.
g - the base.
Method Detail

getP

public BigInteger getP()
Returns the prime p.
Specified by:
getP in interface DSAParams
Returns:
the prime p.

getQ

public BigInteger getQ()
Returns the sub-prime q.
Specified by:
getQ in interface DSAParams
Returns:
the sub-prime q.

getG

public BigInteger getG()
Returns the base g.
Specified by:
getG in interface DSAParams
Returns:
the base g.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DSAPrivateKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class DSAPrivateKeySpec

java.lang.Object
  |
  +--java.security.spec.DSAPrivateKeySpec
All Implemented Interfaces:
KeySpec
public class DSAPrivateKeySpec
extends Object
implements KeySpec

This class specifies a DSA private key with its associated parameters.

Since:
1.2
See Also:
Key, KeyFactory, KeySpec, DSAPublicKeySpec, PKCS8EncodedKeySpec

Constructor Summary
DSAPrivateKeySpec(BigInteger x, BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAPrivateKeySpec with the specified parameter values.
Method Summary
BigInteger | getG() Returns the base g.
BigInteger | getP() Returns the prime p.
BigInteger | getQ() Returns the sub-prime q.
BigInteger | getX() Returns the private key x.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DSAPrivateKeySpec

public DSAPrivateKeySpec(BigInteger x,
                         BigInteger p,
                         BigInteger q,
                         BigInteger g)
Creates a new DSAPrivateKeySpec with the specified parameter values.
Parameters:
x - the private key.
p - the prime.
q - the sub-prime.
g - the base.
Method Detail

getX

public BigInteger getX()
Returns the private key x.
Returns:
the private key x.

getP

public BigInteger getP()
Returns the prime p.
Returns:
the prime p.

getQ

public BigInteger getQ()
Returns the sub-prime q.
Returns:
the sub-prime q.

getG

public BigInteger getG()
Returns the base g.
Returns:
the base g.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DSAPublicKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class DSAPublicKeySpec

java.lang.Object
  |
  +--java.security.spec.DSAPublicKeySpec
All Implemented Interfaces:
KeySpec
public class DSAPublicKeySpec
extends Object
implements KeySpec

This class specifies a DSA public key with its associated parameters.

Since:
1.2
See Also:
Key, KeyFactory, KeySpec, DSAPrivateKeySpec, X509EncodedKeySpec

Constructor Summary
DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, BigInteger g)
Creates a new DSAPublicKeySpec with the specified parameter values.
Method Summary
BigInteger | getG() Returns the base g.
BigInteger | getP() Returns the prime p.
BigInteger | getQ() Returns the sub-prime q.
BigInteger | getY() Returns the public key y.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DSAPublicKeySpec

public DSAPublicKeySpec(BigInteger y,
                        BigInteger p,
                        BigInteger q,
                        BigInteger g)
Creates a new DSAPublicKeySpec with the specified parameter values.
Parameters:
y - the public key.
p - the prime.
q - the sub-prime.
g - the base.
Method Detail

getY

public BigInteger getY()
Returns the public key y.
Returns:
the public key y.

getP

public BigInteger getP()
Returns the prime p.
Returns:
the prime p.

getQ

public BigInteger getQ()
Returns the sub-prime q.
Returns:
the sub-prime q.

getG

public BigInteger getG()
Returns the base g.
Returns:
the base g.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EncodedKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class EncodedKeySpec

java.lang.Object
  |
  +--java.security.spec.EncodedKeySpec
All Implemented Interfaces:
KeySpec
Direct Known Subclasses:
PKCS8EncodedKeySpec, X509EncodedKeySpec
public abstract class EncodedKeySpec
extends Object
implements KeySpec

This class represents a public or private key in encoded format.

Since:
1.2
See Also:
Key, KeyFactory, KeySpec, X509EncodedKeySpec, PKCS8EncodedKeySpec

Constructor Summary
EncodedKeySpec(byte[] encodedKey)
Creates a new EncodedKeySpec with the given encoded key.
Method Summary
byte[] | getEncoded() Returns the encoded key.
abstract String | getFormat() Returns the name of the encoding format associated with this key specification.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EncodedKeySpec

public EncodedKeySpec(byte[] encodedKey)
Creates a new EncodedKeySpec with the given encoded key.
Parameters:
encodedKey - the encoded key.
Method Detail

getEncoded

public byte[] getEncoded()
Returns the encoded key.
Returns:
the encoded key.

getFormat

public abstract String getFormat()
Returns the name of the encoding format associated with this key specification.

If the opaque representation of a key (see Key) can be transformed (see KeyFactory) into this key specification (or a subclass of it), getFormat called on the opaque key returns the same value as the getFormat method of this key specification.

Returns:
a string representation of the encoding format.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidKeySpecException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class InvalidKeySpecException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.spec.InvalidKeySpecException
All Implemented Interfaces:
Serializable
public class InvalidKeySpecException
extends GeneralSecurityException

This is the exception for invalid key specifications.

Since:
1.2
See Also:
KeySpec, Serialized Form

Constructor Summary
InvalidKeySpecException()
Constructs an InvalidKeySpecException with no detail message.
InvalidKeySpecException(String msg)
Constructs an InvalidKeySpecException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidKeySpecException

public InvalidKeySpecException()
Constructs an InvalidKeySpecException with no detail message. A detail message is a String that describes this particular exception.

InvalidKeySpecException

public InvalidKeySpecException(String msg)
Constructs an InvalidKeySpecException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidParameterSpecException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class InvalidParameterSpecException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.spec.InvalidParameterSpecException
All Implemented Interfaces:
Serializable
public class InvalidParameterSpecException
extends GeneralSecurityException

This is the exception for invalid parameter specifications.

Since:
1.2
See Also:
AlgorithmParameters, AlgorithmParameterSpec, DSAParameterSpec, Serialized Form

Constructor Summary
InvalidParameterSpecException()
Constructs an InvalidParameterSpecException with no detail message.
InvalidParameterSpecException(String msg)
Constructs an InvalidParameterSpecException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidParameterSpecException

public InvalidParameterSpecException()
Constructs an InvalidParameterSpecException with no detail message. A detail message is a String that describes this particular exception.

InvalidParameterSpecException

public InvalidParameterSpecException(String msg)
Constructs an InvalidParameterSpecException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PKCS8EncodedKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class PKCS8EncodedKeySpec

java.lang.Object
  |
  +--java.security.spec.EncodedKeySpec
        |
        +--java.security.spec.PKCS8EncodedKeySpec
All Implemented Interfaces:
KeySpec
public class PKCS8EncodedKeySpec
extends EncodedKeySpec

This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type PrivateKeyInfo, whose syntax is defined in the PKCS#8 standard, as follows:

 PrivateKeyInfo ::= SEQUENCE {
   version Version,
   privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
   privateKey PrivateKey,
   attributes [0] IMPLICIT Attributes OPTIONAL }

 Version ::= INTEGER

 PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier

 PrivateKey ::= OCTET STRING

 Attributes ::= SET OF Attribute

Since:
1.2
See Also:
Key, KeyFactory, KeySpec, EncodedKeySpec, X509EncodedKeySpec

Constructor Summary
PKCS8EncodedKeySpec(byte[] encodedKey)
Creates a new PKCS8EncodedKeySpec with the given encoded key.
Method Summary
byte[] | getEncoded() Returns the key bytes, encoded according to the PKCS #8 standard.
String | getFormat() Returns the name of the encoding format associated with this key specification.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PKCS8EncodedKeySpec

public PKCS8EncodedKeySpec(byte[] encodedKey)
Creates a new PKCS8EncodedKeySpec with the given encoded key.
Parameters:
encodedKey - the key, which is assumed to be encoded according to the PKCS #8 standard.
Method Detail

getEncoded

public byte[] getEncoded()
Returns the key bytes, encoded according to the PKCS #8 standard.
Overrides:
getEncoded in class EncodedKeySpec
Returns:
the PKCS #8 encoding of the key.

getFormat

public final String getFormat()
Returns the name of the encoding format associated with this key specification.
Overrides:
getFormat in class EncodedKeySpec
Returns:
the string "PKCS#8".
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAKeyGenParameterSpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class RSAKeyGenParameterSpec

java.lang.Object
  |
  +--java.security.spec.RSAKeyGenParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec
public class RSAKeyGenParameterSpec
extends Object
implements AlgorithmParameterSpec

This class specifies the set of parameters used to generate an RSA key pair.

Since:
1.3
See Also:
KeyPairGenerator.initialize(java.security.spec.AlgorithmParameterSpec)

Field Summary
static BigInteger | F0 The public-exponent value F0 = 3.
static BigInteger | F4 The public exponent-value F4 = 65537.
Constructor Summary
RSAKeyGenParameterSpec(int keysize, BigInteger publicExponent)
Constructs a new RSAParameterSpec object from the given keysize and public-exponent value.
Method Summary
int | getKeysize() Returns the keysize.
BigInteger | getPublicExponent() Returns the public-exponent value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

F0

public static final BigInteger F0
The public-exponent value F0 = 3.

F4

public static final BigInteger F4
The public exponent-value F4 = 65537.
Constructor Detail

RSAKeyGenParameterSpec

public RSAKeyGenParameterSpec(int keysize,
                              BigInteger publicExponent)
Constructs a new RSAParameterSpec object from the given keysize and public-exponent value.
Parameters:
keysize - the modulus size (specified in number of bits)
publicExponent - the public exponent
Method Detail

getKeysize

public int getKeysize()
Returns the keysize.
Returns:
the keysize.

getPublicExponent

public BigInteger getPublicExponent()
Returns the public-exponent value.
Returns:
the public-exponent value.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPrivateCrtKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class RSAPrivateCrtKeySpec

java.lang.Object
  |
  +--java.security.spec.RSAPrivateKeySpec
        |
        +--java.security.spec.RSAPrivateCrtKeySpec
All Implemented Interfaces:
KeySpec
public class RSAPrivateCrtKeySpec
extends RSAPrivateKeySpec

This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.

See Also:
Key, KeyFactory, KeySpec, PKCS8EncodedKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec

Constructor Summary
RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient)
Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.
Method Summary
BigInteger | getCrtCoefficient() Returns the crtCoefficient.
BigInteger | getPrimeExponentP() Returns the primeExponentP.
BigInteger | getPrimeExponentQ() Returns the primeExponentQ.
BigInteger | getPrimeP() Returns the primeP.
BigInteger | getPrimeQ() Returns the primeQ.
BigInteger | getPublicExponent() Returns the public exponent.
Methods inherited from class java.security.spec.RSAPrivateKeySpec
getModulus, getPrivateExponent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RSAPrivateCrtKeySpec

public RSAPrivateCrtKeySpec(BigInteger modulus,
                            BigInteger publicExponent,
                            BigInteger privateExponent,
                            BigInteger primeP,
                            BigInteger primeQ,
                            BigInteger primeExponentP,
                            BigInteger primeExponentQ,
                            BigInteger crtCoefficient)
Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.
Parameters:
modulus - the modulus n
publicExponent - the public exponent e
privateExponent - the private exponent d
primeP - the prime factor p of n
primeQ - the prime factor q of n
primeExponentP - this is d mod (p-1)
primeExponentQ - this is d mod (q-1)
crtCoefficient - the Chinese Remainder Theorem coefficient q-1 mod p
Method Detail

getPublicExponent

public BigInteger getPublicExponent()
Returns the public exponent.
Returns:
the public exponent

getPrimeP

public BigInteger getPrimeP()
Returns the primeP.
Returns:
the primeP

getPrimeQ

public BigInteger getPrimeQ()
Returns the primeQ.
Returns:
the primeQ

getPrimeExponentP

public BigInteger getPrimeExponentP()
Returns the primeExponentP.
Returns:
the primeExponentP

getPrimeExponentQ

public BigInteger getPrimeExponentQ()
Returns the primeExponentQ.
Returns:
the primeExponentQ

getCrtCoefficient

public BigInteger getCrtCoefficient()
Returns the crtCoefficient.
Returns:
the crtCoefficient
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPrivateKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class RSAPrivateKeySpec

java.lang.Object
  |
  +--java.security.spec.RSAPrivateKeySpec
All Implemented Interfaces:
KeySpec
Direct Known Subclasses:
RSAPrivateCrtKeySpec
public class RSAPrivateKeySpec
extends Object
implements KeySpec

This class specifies an RSA private key.

See Also:
Key, KeyFactory, KeySpec, PKCS8EncodedKeySpec, RSAPublicKeySpec, RSAPrivateCrtKeySpec

Constructor Summary
RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent)
Method Summary
BigInteger | getModulus() Returns the modulus.
BigInteger | getPrivateExponent() Returns the private exponent.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RSAPrivateKeySpec

public RSAPrivateKeySpec(BigInteger modulus,
                         BigInteger privateExponent)
Method Detail

getModulus

public BigInteger getModulus()
Returns the modulus.
Returns:
the modulus

getPrivateExponent

public BigInteger getPrivateExponent()
Returns the private exponent.
Returns:
the private exponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSAPublicKeySpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class RSAPublicKeySpec

java.lang.Object
  |
  +--java.security.spec.RSAPublicKeySpec
All Implemented Interfaces:
KeySpec
public class RSAPublicKeySpec
extends Object
implements KeySpec

This class specifies an RSA public key.

See Also:
Key, KeyFactory, KeySpec, X509EncodedKeySpec, RSAPrivateKeySpec, RSAPrivateCrtKeySpec

Constructor Summary
RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent)
Method Summary
BigInteger | getModulus() Returns the modulus.
BigInteger | getPublicExponent() Returns the public exponent.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RSAPublicKeySpec

public RSAPublicKeySpec(BigInteger modulus,
                        BigInteger publicExponent)
Method Detail

getModulus

public BigInteger getModulus()
Returns the modulus.
Returns:
the modulus

getPublicExponent

public BigInteger getPublicExponent()
Returns the public exponent.
Returns:
the public exponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


X509EncodedKeySpec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security.spec
Class X509EncodedKeySpec

java.lang.Object
  |
  +--java.security.spec.EncodedKeySpec
        |
        +--java.security.spec.X509EncodedKeySpec
All Implemented Interfaces:
KeySpec
public class X509EncodedKeySpec
extends EncodedKeySpec

This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type SubjectPublicKeyInfo, whose syntax is defined in the X.509 standard, as follows:

 SubjectPublicKeyInfo ::= SEQUENCE {
   algorithm AlgorithmIdentifier,
   subjectPublicKey BIT STRING }

Since:
1.2
See Also:
Key, KeyFactory, KeySpec, EncodedKeySpec, PKCS8EncodedKeySpec

Constructor Summary
X509EncodedKeySpec(byte[] encodedKey)
Creates a new X509EncodedKeySpec with the given encoded key.
Method Summary
byte[] | getEncoded() Returns the key bytes, encoded according to the X.509 standard.
String | getFormat() Returns the name of the encoding format associated with this key specification.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

X509EncodedKeySpec

public X509EncodedKeySpec(byte[] encodedKey)
Creates a new X509EncodedKeySpec with the given encoded key.
Parameters:
encodedKey - the key, which is assumed to be encoded according to the X.509 standard.
Method Detail

getEncoded

public byte[] getEncoded()
Returns the key bytes, encoded according to the X.509 standard.
Overrides:
getEncoded in class EncodedKeySpec
Returns:
the X.509 encoding of the key.

getFormat

public final String getFormat()
Returns the name of the encoding format associated with this key specification.
Overrides:
getFormat in class EncodedKeySpec
Returns:
the string "X.509".
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnrecoverableKeyException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Class UnrecoverableKeyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--java.security.UnrecoverableKeyException
All Implemented Interfaces:
Serializable
public class UnrecoverableKeyException
extends GeneralSecurityException

This exception is thrown if a key in the keystore cannot be recovered.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
UnrecoverableKeyException()
Constructs an UnrecoverableKeyException with no detail message.
UnrecoverableKeyException(String msg)
Constructs an UnrecoverableKeyException with the specified detail message, which provides more information about why this exception has been thrown.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnrecoverableKeyException

public UnrecoverableKeyException()
Constructs an UnrecoverableKeyException with no detail message.

UnrecoverableKeyException

public UnrecoverableKeyException(String msg)
Constructs an UnrecoverableKeyException with the specified detail message, which provides more information about why this exception has been thrown.
Parameters:
msg - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnresolvedPermission

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.security
Class UnresolvedPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.UnresolvedPermission
All Implemented Interfaces:
Guard, Serializable
public final class UnresolvedPermission
extends Permission
implements Serializable

The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized. An unresolved permission is one whose actual Permission class does not yet exist at the time the Policy is initialized (see below).

The policy for a Java runtime (specifying which permissions are available for code from various principals) is represented by a Policy object. Whenever a Policy is initialized or refreshed, Permission objects of appropriate classes are created for all permissions allowed by the Policy.

Many permission class types referenced by the policy configuration are ones that exist locally (i.e., ones that can be found on CLASSPATH). Objects for such permissions can be instantiated during Policy initialization. For example, it is always possible to instantiate a java.io.FilePermission, since the FilePermission class is found on the CLASSPATH.

Other permission classes may not yet exist during Policy initialization. For example, a referenced permission class may be in a JAR file that will later be loaded. For each such class, an UnresolvedPermission is instantiated. Thus, an UnresolvedPermission is essentially a "placeholder" containing information about the permission.

Later, when code calls AccessController.checkPermission on a permission of a type that was previously unresolved, but whose class has since been loaded, previously-unresolved permissions of that type are "resolved". That is, for each such UnresolvedPermission, a new object of the appropriate class type is instantiated, based on the information in the UnresolvedPermission. This new object replaces the UnresolvedPermission, which is removed.

See Also:
Permission, Permissions, PermissionCollection, Policy, Serialized Form

Constructor Summary
UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Creates a new UnresolvedPermission containing the permission information needed later to actually create a Permission of the specified class, when the permission is resolved.
Method Summary
boolean | equals(Object obj) Checks two UnresolvedPermission objects for equality.
String | getActions() Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for an UnresolvedPermission.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) This method always returns false for unresolved permissions.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing UnresolvedPermission objects.
String | toString() Returns a string describing this UnresolvedPermission.
Methods inherited from class java.security.Permission
checkGuard, getName
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

UnresolvedPermission

public UnresolvedPermission(String type,
                            String name,
                            String actions,
                            Certificate[] certs)
Creates a new UnresolvedPermission containing the permission information needed later to actually create a Permission of the specified class, when the permission is resolved.
Parameters:
type - the class name of the Permission class that will be created when this unresolved permission is resolved.
name - the name of the permission.
actions - the actions of the permission.
certs - the certificates the permission's class was signed with. This is a list of certificate chains, where each chain is composed of a signer certificate and optionally its supporting certificate chain. Each chain is ordered bottom-to-top (i.e., with the signer certificate first and the (root) certificate authority last).
Method Detail

implies

public boolean implies(Permission p)
This method always returns false for unresolved permissions. That is, an UnresolvedPermission is never considered to imply another permission.
Overrides:
implies in class Permission
Parameters:
p - the permission to check against.
Returns:
false.

equals

public boolean equals(Object obj)
Checks two UnresolvedPermission objects for equality. Checks that obj is an UnresolvedPermission, and has the same type (class) name, permission name, actions, and certificates as this object.
Overrides:
equals in class Permission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is an UnresolvedPermission, and has the same type (class) name, permission name, actions, and certificates as this object.

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Permission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for an UnresolvedPermission. That is, the actions for the permission that will be created when this UnresolvedPermission is resolved may be non-null, but an UnresolvedPermission itself is never considered to have any actions.
Overrides:
getActions in class Permission
Returns:
the empty string "".

toString

public String toString()
Returns a string describing this UnresolvedPermission. The convention is to specify the class name, the permission name, and the actions, in the following format: '(unresolved "ClassName" "name" "actions")'.
Overrides:
toString in class Permission
Returns:
information about this UnresolvedPermission.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing UnresolvedPermission objects.

Overrides:
newPermissionCollection in class Permission
Returns:
a new PermissionCollection object suitable for storing UnresolvedPermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.sql Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.sql

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.util.Date (implements java.lang.Cloneable, java.lang.Comparable, java.io.Serializable)
      • class java.sql.Date
      • class java.sql.Time
      • class java.sql.Timestamp
    • class java.sql.DriverManager
    • class java.sql.DriverPropertyInfo
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.sql.SQLPermission
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.sql.SQLException
          • class java.sql.BatchUpdateException
          • class java.sql.SQLWarning
            • class java.sql.DataTruncation
    • class java.sql.Types

Interface Hierarchy

  • interface java.sql.Array
  • interface java.sql.Blob
  • interface java.sql.Clob
  • interface java.sql.Connection
  • interface java.sql.DatabaseMetaData
  • interface java.sql.Driver
  • interface java.sql.Ref
  • interface java.sql.ResultSet
  • interface java.sql.ResultSetMetaData
  • interface java.sql.SQLData
  • interface java.sql.SQLInput
  • interface java.sql.SQLOutput
  • interface java.sql.Statement
    • interface java.sql.PreparedStatement
      • interface java.sql.CallableStatement
  • interface java.sql.Struct
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.sql

Provides the API for accessing and processing data in a data source using the JavaTM programming language.

See:
Description

Interface Summary
Array | The mapping in the Java programming language for the SQL type ARRAY.
Blob | The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
CallableStatement | The interface used to execute SQL stored procedures.
Clob | The mapping in the JavaTM programming language for the SQL CLOB type.
Connection | A connection (session) with a specific database.
DatabaseMetaData | Comprehensive information about the database as a whole.
Driver | The interface that every driver class must implement.
PreparedStatement | An object that represents a precompiled SQL statement.
Ref | The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
ResultSet | A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
ResultSetMetaData | An object that can be used to get information about the types and properties of the columns in a ResultSet object.
SQLData | The interface used for the custom mapping of SQL user-defined types.
SQLInput | An input stream that contains a stream of values representing an instance of an SQL structured or distinct type.
SQLOutput | The output stream for writing the attributes of a user-defined type back to the database.
Statement | The object used for executing a static SQL statement and obtaining the results produced by it.
Struct | The standard mapping in the Java programming language for an SQL structured type.

Class Summary
Date | A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE.
DriverManager | The basic service for managing a set of JDBC drivers. NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source.
DriverPropertyInfo | Driver properties for making a connection.
SQLPermission | The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods.
Time | A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
Timestamp | A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
Types | The class that defines the constants that are used to identify generic SQL types, called JDBC types.

Exception Summary
BatchUpdateException | An exception thrown when an error occurs during a batch update operation.
DataTruncation | An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
SQLException | An exception that provides information on a database access error or other errors.
SQLWarning | An exception that provides information on database access warnings.

Package java.sql Description

Provides the API for accessing and processing data in a data source using the JavaTM programming language. This API includes a framework whereby different drivers can be installed dynamically to access different data sources.

The java.sql package, referred to as the JDBC 2.0 core API, had many new features added in the JavaTM 2 SDK, Standard Edition, version 1.2 release. New methods, fields, constructors, and exceptions in the JDBC 2.0 API are marked "Since 1.2" in the javadoc comments.

The class SQLPermission was added in the JavaTM 2 SDK, Standard Edition, version 1.3 release. This class is used to prevent unauthorized access to the logging stream associated with the DriverManager, which may contain information such as table names, column data, and so on.

What Is in the JDBCTM 2.0 API

NOTE: Code that uses API marked "Since 1.2" must be run using a JDBC technology driver that implements the JDBC 2.0 core API. Check your driver documentation to be sure that it implements the particular features you want to use.

The JDBCTM 2.0 API includes the complete JDBC API, which includes both core and Optional Package API, and provides industrial-strength database computing capabilities. It is not, however, limited to SQL databases; the JDBC2.0 API makes it possible to access data from virtually any data source with a tabular format.

The JDBC 2.0 API includes two packages:

  • java.sql package--the JDBC 2.0 core API
    • JDBC API included in the JDKTM 1.1 release (previously called JDBC 1.2). This API is compatible with any driver that uses JDBC technology.

    • JDBC API included in the Java 2 SDK, Standard Edition, version 1.2 (called the JDBC 2.0 core API). This API includes the JDBC 1.2 API and adds many new features.

  • javax.sql package--the JDBC 2.0 Optional Package API. This package extends the functionality of the JDBC API from a client-side API to a server-side API, and it is an essential part of JavaTM 2 SDK, Enterprise Edition technology.

    Being an Optional Package, it is not included in the Java 2 Platform SDK, Standard Edition, version 1.2, but it is readily available from various sources.

    • Information about the JDBC 2.0 Optional Package API is available from the JDBC web page. The javax.sql package may also be downloaded from this web site.
    • Driver vendors may include the javax.sql package with their products.
    • The Java 2 SDK, Enterprise Edition, includes many Optional Package APIs, including the JDBC 2.0 Optional Package.

What the java.sql Package Contains

The java.sql package contains API for the following:
  • Making a connection with a data source
    • DriverManager class
    • Driver interface
    • DriverPropertyInfo class
    • Connection interface
  • Sending SQL statements to a database
    • Statement interface for sending basic SQL statements
    • PreparedStatement interface for sending prepared statements or basic SQL statements (derived from Statement)
    • CallableStatement interface for calling database stored procedures (derived from PreparedStatement)
  • Retrieving and updating the results of a query
    • ResultSet interface
  • Mapping an SQL value to the standard mapping in the Java programming language
    • Array interface
    • Blob interface
    • Clob interface
    • Date class
    • Ref interface
    • Struct interface
    • Time class
    • Timestamp class
    • Types class
  • Custom mapping an SQL user-defined type to a class in the Java programming language
    • SQLData interface
    • SQLInput interface
    • SQLOutput interface
  • Providing information about the database and the columns of a ResultSet object
    • DatabaseMetaData interface
    • ResultSetMetaData interface
  • Throwing exceptions
    • SQLException thrown by most methods when there is a problem accessing data and by some methods for other reasons
    • SQLWarning thrown to indicate a warning
    • DataTruncation thrown to indicate that data may have been truncated
    • BatchUpdateException thrown to indicate that not all commands in a batch update executed successfully
  • Providing security
    • SQLPermission interface

New Features in the JDBC 2.0 Core API

  • Scrollable result sets--using new methods in the ResultSet interface that allow the cursor to be moved to a particular row or to a position relative to its current position
  • Batch updates
  • Programmatic updates--using ResultSet.updateXXX methods
  • New data types--interfaces mapping the SQL3 data types
  • Custom mapping of user-defined types (UDTs)
  • Miscellaneous features, including performance hints, the use of character streams, full precision for java.math.BigDecimal values, additional security, and support for time zones in date, time, and timestamp values.

Custom Mapping of UDTs

New features in the JDBC 2.0 core API make it possible to map a user-defined type (UDT) defined in SQL to a class in the Java programming language. An SQL structured type or an SQL DISTINCT type are the UDTs that may be custom mapped. The following three steps set up a custom mapping:
  1. Defining the SQL structured type or DISTINCT type in SQL
  2. Defining the class in the Java programming language to which the SQL UDT will be mapped. This class must implement the SQLData interface.
  3. Making an entry in a Connection object's type map that contains two things:
    • the fully-qualified SQL name of the UDT and the
    • the Class object for the class to which the UDT is to be mapped

When these are in place for a UDT, calling the methods ResultSet.getObject or CallableStatement.getObject on that UDT will automatically retrieve the custom mapping for it.

Type Maps

A newly-created JDBC 2.0 Connection object has an initially-empty type map associated with it. A user may enter a custom mapping for a UDT in this type map. When a UDT is retrieved from a data source with the method ResultSet.getObject, the getObject method will check the connection's type map to see if there is an entry for that UDT. If so, the getObject method will map the UDT to the class indicated. If there is no entry, the UDT will be mapped using the standard mapping.

A user may create a new type map, which is a Map object, make an entry in it, and pass it to the java.sql methods that can perform custom mapping. In this case, the method will use the given type map instead of the one associated with the connection.

For example, the following code fragment specifies that the SQL type ATHLETES will be mapped to the class Athletes in the Java programming language. The code fragment retrieves the type map for the Connection object con, inserts the entry into it, and then sets the type map with the new entry as the connection's type map.

    java.util.Map map = con.getTypeMap();
    map.put("mySchemaName.ATHLETES", Class.forName("Athletes"));
    con.setTypeMap(map);

Classes Used for Custom Mapping

The class to which an SQL UDT is mapped in a custom mapping must implement the SQLData interface. Typically, this class will define a field for each attribute of an SQL structured type or a single field for an SQL DISTINCT type. When the UDT is retrieved from a data source with the ResultSet.getObject method, it will be mapped as an instance of this class. A programmer can operate on this class instance just as on any other object in the Java programming language and then store any changes made to it by calling the PreparedStatement.setObject method, which will map it back to the SQL type.

It is expected that the implementation of the class for a custom mapping will be done by a tool. In a typical implementation, the programmer would simply supply the name of the SQL UDT, the name of the class to which it is being mapped, and the names of the fields to which each of the attributes of the UDT is to be mapped. The tool will use this information to implement the SQLData.readSQL and SQLData.writeSQL methods. The readSQL method calls the appropriate SQLInput.readXXX methods to read each attribute from an SQLInput object, and the writeSQL method calls SQLOutput.writeXXX methods to write each attribute back to the data source via an SQLOutput object.

An application programmer will not normally call SQLData methods directly, and the SQLInput and SQLOutput methods are called internally by SQLData methods, not by application code.

Package Specification

  • Specification of the JDBC 2.0 Core API

Related Documentation

For overviews of the basic interfaces and a tutorial, please see:
  • Getting Started--overviews of the major interfaces
  • Chapters on the JDBC API from the online version of The Java Tutorial Continued

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.sql

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.sql

Packages that use java.sql
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Classes in java.sql used by java.sql
Array
The mapping in the Java programming language for the SQL type ARRAY.
Blob
The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
CallableStatement
The interface used to execute SQL stored procedures.
Clob
The mapping in the JavaTM programming language for the SQL CLOB type.
Connection
A connection (session) with a specific database.
DatabaseMetaData
Comprehensive information about the database as a whole.
Date
A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE.
Driver
The interface that every driver class must implement.
DriverPropertyInfo
Driver properties for making a connection.
PreparedStatement
An object that represents a precompiled SQL statement.
Ref
The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.
ResultSet
A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
ResultSetMetaData
An object that can be used to get information about the types and properties of the columns in a ResultSet object.
SQLData
The interface used for the custom mapping of SQL user-defined types.
SQLException
An exception that provides information on a database access error or other errors.
SQLInput
An input stream that contains a stream of values representing an instance of an SQL structured or distinct type.
SQLOutput
The output stream for writing the attributes of a user-defined type back to the database.
SQLWarning
An exception that provides information on database access warnings.
Statement
The object used for executing a static SQL statement and obtaining the results produced by it.
Struct
The standard mapping in the Java programming language for an SQL structured type.
Time
A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
Timestamp
A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Array

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Array

public interface Array

The mapping in the Java programming language for the SQL type ARRAY. By default, an Array object is a transaction-duration reference to an SQL ARRAY value. By default, an Array object is implemented using an SQL LOCATOR(array) internally, which means that an Array object contains a logical pointer to the data in the SQL ARRAY value on the server rather than containing the ARRAY value's data.

The Array interface provides methods for bringing an SQL ARRAY value's data to the client as either an array or a ResultSet object.

If the elements of the SQL ARRAY are a UDT, they may be custom mapped. To create a custom mapping, a programmer must do two things:

  • create a class that implements the SQLData interface for the UDT to be custom mapped. This will typically be done using a tool.
  • make an entry in a type map that contains
    • the fully-qualified SQL type name of the UDT
    • the Class object for the class implementing SQLData

When a type map with an entry for the base type is supplied to the methods getArray and getResultSet, the mapping it contains will be used to map the elements of the ARRAY value. If no type map is supplied, which would typically be the case, the connection's type map is used by default. If the connection's type map or a type map supplied to a method has no entry for the base type, the elements are mapped according to the standard mapping.

NOTE: This interface is new in the JDBC 2.0 API.

Method Summary
Object | getArray() Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
Object | getArray(long index, int count) Returns an array containing a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Object | getArray(long index, int count, Map map) Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Object | getArray(Map map) Retrieves the contents of the SQL array designated by this Array object.
int | getBaseType() Returns the JDBC type of the elements in the array designated by this Array object.
String | getBaseTypeName() Returns the SQL type name of the elements in the array designated by this Array object.
ResultSet | getResultSet() Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
ResultSet | getResultSet(long index, int count) Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
ResultSet | getResultSet(long index, int count, Map map) Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
ResultSet | getResultSet(Map map) Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.

Method Detail

getBaseTypeName

public String getBaseTypeName()
                       throws SQLException
Returns the SQL type name of the elements in the array designated by this Array object. If the elements are a built-in type, it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT), this method returns the fully-qualified SQL type name.
Returns:
a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT
Throws:
SQLException - if an error occurs while attempting to access the type name
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBaseType

public int getBaseType()
                throws SQLException
Returns the JDBC type of the elements in the array designated by this Array object.
Returns:
a constant from the class Types that is the type code for the elements in the array designated by this Array object.
Throws:
SQLException - if an error occurs while attempting to access the base type
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Object getArray()
                throws SQLException
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language. This version of the method getArray uses the type map associated with the connection for customizations of the type mappings.
Returns:
an array in the Java programming language that contains the ordered elements of the SQL ARRAY value designated by this object
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Object getArray(Map map)
                throws SQLException
Retrieves the contents of the SQL array designated by this Array object. This method uses the specified map for type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. This version of the method getArray uses either the given type map or the standard mapping; it never uses the type map associated with the connection.
Parameters:
map - a java.util.Map object that contains mappings of SQL type names to classes in the Java programming language
Returns:
an array in the Java programming language that contains the ordered elements of the SQL array designated by this object
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Object getArray(long index,
                       int count)
                throws SQLException
Returns an array containing a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array. This method uses the type map associated with the connection for customizations of the type mappings.
Parameters:
index - the array index of the first element to retrieve; the first element is at index 1
count - the number of successive SQL array elements to retrieve
Returns:
an array containing up to count consecutive elements of the SQL array, beginning with element index
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Object getArray(long index,
                       int count,
                       Map map)
                throws SQLException
Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.

This method uses the specified map for type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. This version of the method getArray uses either the given type map or the standard mapping; it never uses the type map associated with the connection.

Parameters:
index - the array index of the first element to retrieve; the first element is at index 1
count - the number of successive SQL array elements to retrieve
map - a java.util.Map object that contains SQL type names and the classes in the Java programming language to which they are mapped
Returns:
an array containing up to count consecutive elements of the SQL array designated by this Array object, beginning with element index.
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object. If appropriate, the elements of the array are mapped using the connection's type map; otherwise, the standard mapping is used.

The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices.

Returns:
a ResultSet object containing one row for each of the elements in the array designated by this Array object, with the rows in ascending order based on the indices.
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSet

public ResultSet getResultSet(Map map)
                       throws SQLException
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object. This method uses the specified map for type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. This version of the method getResultSet uses either the given type map or the standard mapping; it never uses the type map associated with the connection.

The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices.

Parameters:
map - contains the mapping of SQL user-defined types to classes in the Java programming language
Returns:
a ResultSet object containing one row for each of the elements in the array designated by this Array object, with the rows in ascending order based on the indices.
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSet

public ResultSet getResultSet(long index,
                              int count)
                       throws SQLException
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. This method uses the connection's type map to map the elements of the array if the map contains an entry for the base type. Otherwise, the standard mapping is used.

The result set has one row for each element of the SQL array designated by this object, with the first row containing the element at index index. The result set has up to count rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stores the index into the array for that element.

Parameters:
index - the array index of the first element to retrieve; the first element is at index 1
count - the number of successive SQL array elements to retrieve
Returns:
a ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object, starting at index index.
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSet

public ResultSet getResultSet(long index,
                              int count,
                              Map map)
                       throws SQLException
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. This method uses the specified map for type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. This version of the method getResultSet uses either the given type map or the standard mapping; it never uses the type map associated with the connection.

The result set has one row for each element of the SQL array designated by this object, with the first row containing the element at index index. The result set has up to count rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stroes the index into the array for that element.

Parameters:
index - the array index of the first element to retrieve; the first element is at index 1
count - the number of successive SQL array elements to retrieve
map - the Map object that contains the mapping of SQL type names to classes in the Java(tm) programming language
Returns:
a ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object, starting at index index.
Throws:
SQLException - if an error occurs while attempting to access the array
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BatchUpdateException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Class BatchUpdateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.sql.SQLException
                    |
                    +--java.sql.BatchUpdateException
All Implemented Interfaces:
Serializable
public class BatchUpdateException
extends SQLException

An exception thrown when an error occurs during a batch update operation. In addition to the information provided by SQLException, a BatchUpdateException provides the update counts for all commands that were executed successfully during the batch update, that is, all commands that were executed before the error occurred. The order of elements in an array of update counts corresponds to the order in which commands were added to the batch.

After a command in a batch update fails to execute properly and a BatchUpdateException is thrown, the driver may or may not continue to process the remaining commands in the batch. If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will have an element for every command in the batch rather than only elements for the commands that executed successfully before the error. In the case where the driver continues processing commands, the array element for any command that failed is -3.

This class is new in the JDBC 2.0 API.

See Also:
Serialized Form

Constructor Summary
BatchUpdateException()
Constructs a BatchUpdateException object with the reason, SQLState, and update count initialized to null and the vendor code initialized to 0.
BatchUpdateException(int[] updateCounts)
Constructs a BatchUpdateException initialized to null for the reason and SQLState and 0 for the vendor code.
BatchUpdateException(String reason, int[] updateCounts)
Constructs a BatchUpdateException initialized with reason, updateCounts and null for the SQLState and 0 for the vendorCode.
BatchUpdateException(String reason, String SQLState, int[] updateCounts)
Constructs a BatchUpdateException initialized with the given arguments (reason, SQLState, and updateCounts) and 0 for the vendor code.
BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts)
Constructs a fully-specified BatchUpdateException object, initializing it with the given values.
Method Summary
 int[] getUpdateCounts()
Retrieves the update count for each update statement in the batch update that executed successfully before this exception occurred.
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BatchUpdateException

public BatchUpdateException(String reason,
                            String SQLState,
                            int vendorCode,
                            int[] updateCounts)
Constructs a fully-specified BatchUpdateException object, initializing it with the given values.
Parameters:
reason - a description of the error
SQLState - an X/OPEN code identifying the error
vendorCode - an exception code used by a particular database vendor
updateCounts - an array of int, with each element indicating the update count for a SQL command that executed successfully before the exception was thrown
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

BatchUpdateException

public BatchUpdateException(String reason,
                            String SQLState,
                            int[] updateCounts)
Constructs a BatchUpdateException initialized with the given arguments (reason, SQLState, and updateCounts) and 0 for the vendor code.
Parameters:
reason - a description of the exception
SQLState - an X/OPEN code identifying the exception
updateCounts - an array of int, with each element indicating the update count for a SQL command that executed successfully before the exception was thrown
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

BatchUpdateException

public BatchUpdateException(String reason,
                            int[] updateCounts)
Constructs a BatchUpdateException initialized with reason, updateCounts and null for the SQLState and 0 for the vendorCode.
Parameters:
reason - a description of the exception
updateCounts - an array of int, with each element indicating the update count for a SQL command that executed successfully before the exception was thrown
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

BatchUpdateException

public BatchUpdateException(int[] updateCounts)
Constructs a BatchUpdateException initialized to null for the reason and SQLState and 0 for the vendor code.
Parameters:
updateCounts - an array of int, with each element indicating the update count for a SQL command that executed successfully before the exception was thrown
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

BatchUpdateException

public BatchUpdateException()
Constructs a BatchUpdateException object with the reason, SQLState, and update count initialized to null and the vendor code initialized to 0.
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Method Detail

getUpdateCounts

public int[] getUpdateCounts()
Retrieves the update count for each update statement in the batch update that executed successfully before this exception occurred. A driver that implements batch updates may or may not continue to process the remaining commands in a batch when one of the commands fails to execute properly. If the driver continues processing commands, the array returned by this method will have as many elements as there are commands in the batch; otherwise, it will contain an update count for each command that executed successfully before the BatchUpdateException was thrown.

The possible return values for this method were modified for the Java 2 SDK, Standard Edition, version 1.3. This was done to accommodate the new option of continuing to process commands in a batch update after a BatchUpdateException object has been thrown.

Returns:
an array of int containing the update counts for the updates that were executed successfully before this error occurred. Or, if the driver continues to process commands after an error, one of the following for every command in the batch:
  1. an update count
  2. -2 to indicate that the command executed successfully but the number of rows affected is unknown
  3. -3 to indicate that the command failed to execute successfully
Since:
1.3
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Blob

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Blob

public interface Blob

The representation (mapping) in the JavaTM programming language of an SQL BLOB value. An SQL BLOB is a built-in type that stores a Binary Large Object as a column value in a row of a database table. The driver implements Blob using an SQL locator(BLOB), which means that a Blob object contains a logical pointer to the SQL BLOB data rather than the data itself. A Blob object is valid for the duration of the transaction in which is was created.

Methods in the interfaces ResultSet, CallableStatement, and PreparedStatement, such as getBlob and setBlob allow a programmer to access an SQL BLOB value. The Blob interface provides methods for getting the length of an SQL BLOB (Binary Large Object) value, for materializing a BLOB value on the client, and for determining the position of a pattern of bytes within a BLOB value.

This class is new in the JDBC 2.0 API.

Since:
1.2

Method Summary
InputStream | getBinaryStream() Retrieves the BLOB designated by this Blob instance as a stream.
byte[] | getBytes(long pos, int length) Returns as an array of bytes, part or all of the BLOB value that this Blob object designates.
long | length() Returns the number of bytes in the BLOB value designated by this Blob object.
long | position(Blob pattern, long start) Determines the byte position in the BLOB value designated by this Blob object at which pattern begins.
long | position(byte[] pattern, long start) Determines the byte position at which the specified byte pattern begins within the BLOB value that this Blob object represents.

Method Detail

length

public long length()
            throws SQLException
Returns the number of bytes in the BLOB value designated by this Blob object.
Returns:
length of the BLOB in bytes
Throws:
SQLException - if there is an error accessing the length of the BLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBytes

public byte[] getBytes(long pos,
                       int length)
                throws SQLException
Returns as an array of bytes, part or all of the BLOB value that this Blob object designates. The byte array contains up to length consecutive bytes starting at position pos.
Parameters:
pos - the ordinal position of the first byte in the BLOB value to be extracted; the first byte is at position 1
length - the number of consecutive bytes to be copied
Returns:
a byte array containing up to length consecutive bytes from the BLOB value designated by this Blob object, starting with the byte at position pos
Throws:
SQLException - if there is an error accessing the BLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBinaryStream

public InputStream getBinaryStream()
                            throws SQLException
Retrieves the BLOB designated by this Blob instance as a stream.
Returns:
a stream containing the BLOB data
Throws:
SQLException - if there is an error accessing the BLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

position

public long position(byte[] pattern,
                     long start)
              throws SQLException
Determines the byte position at which the specified byte pattern begins within the BLOB value that this Blob object represents. The search for pattern begins at position start.
Parameters:
pattern - the byte array for which to search
start - the position at which to begin searching; the first position is 1
Returns:
the position at which the pattern appears, else -1
Throws:
SQLException - if there is an error accessing the BLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

position

public long position(Blob pattern,
                     long start)
              throws SQLException
Determines the byte position in the BLOB value designated by this Blob object at which pattern begins. The search begins at position start.
Parameters:
pattern - the Blob object designating the BLOB value for which to search
start - the position in the BLOB value at which to begin searching; the first position is 1
Returns:
the position at which the pattern begins, else -1
Throws:
SQLException - if there is an error accessing the BLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CallableStatement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface CallableStatement

All Superinterfaces:
PreparedStatement, Statement
public interface CallableStatement
extends PreparedStatement

The interface used to execute SQL stored procedures. JDBC provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output or both. Parameters are referred to sequentially, by number, with the first parameter being 1.

   {?= call <procedure-name>[<arg1>,<arg2>, ...]}
   {call <procedure-name>[<arg1>,<arg2>, ...]}

IN parameter values are set using the set methods inherited from PreparedStatement. The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here.

A CallableStatement can return one ResultSet or multiple ResultSet objects. Multiple ResultSet objects are handled using operations inherited from Statement.

For maximum portability, a call's ResultSet objects and update counts should be processed prior to getting the values of output parameters.

Methods that are new in the JDBC 2.0 API are marked "Since 1.2."

See Also:
Connection.prepareCall(java.lang.String), ResultSet

Method Summary
Array | getArray(int i) Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
BigDecimal | getBigDecimal(int parameterIndex) Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
BigDecimal | getBigDecimal(int parameterIndex, int scale) Deprecated.
Blob | getBlob(int i) Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
boolean | getBoolean(int parameterIndex) Gets the value of a JDBC BIT parameter as a boolean in the Java programming language.
byte | getByte(int parameterIndex) Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language.
byte[] | getBytes(int parameterIndex) Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
Clob | getClob(int i) Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
Date | getDate(int parameterIndex) Gets the value of a JDBC DATE parameter as a java.sql.Date object.
Date | getDate(int parameterIndex, Calendar cal) Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
double | getDouble(int parameterIndex) Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language.
float | getFloat(int parameterIndex) Gets the value of a JDBC FLOAT parameter as a float in the Java programming language.
int | getInt(int parameterIndex) Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
long | getLong(int parameterIndex) Gets the value of a JDBC BIGINT parameter as a long in the Java programming language.
Object | getObject(int parameterIndex) Gets the value of a parameter as an Object in the Java programming language.
Object | getObject(int i, Map map) Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
Ref | getRef(int i) Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
short | getShort(int parameterIndex) Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language.
String | getString(int parameterIndex) Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
Time | getTime(int parameterIndex) Get the value of a JDBC TIME parameter as a java.sql.Time object.
Time | getTime(int parameterIndex, Calendar cal) Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
Timestamp | getTimestamp(int parameterIndex) Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
Timestamp | getTimestamp(int parameterIndex, Calendar cal) Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
void | registerOutParameter(int parameterIndex, int sqlType) Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
void | registerOutParameter(int parameterIndex, int sqlType, int scale) Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
void | registerOutParameter(int paramIndex, int sqlType, String typeName) Registers the designated output parameter.
boolean | wasNull() Indicates whether or not the last OUT parameter read had the value of SQL NULL.
Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, executeBatch, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout

Method Detail

registerOutParameter

public void registerOutParameter(int parameterIndex,
                                 int sqlType)
                          throws SQLException
Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method getObject(int) retrieves the value.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
sqlType - the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.
Throws:
SQLException - if a database access error occurs
See Also:
Types

registerOutParameter

public void registerOutParameter(int parameterIndex,
                                 int sqlType,
                                 int scale)
                          throws SQLException
Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType. This method must be called before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
sqlType - SQL type code defined by java.sql.Types.
scale - the desired number of digits to the right of the decimal point. It must be greater than or equal to zero.
Throws:
SQLException - if a database access error occurs
See Also:
Types

wasNull

public boolean wasNull()
                throws SQLException
Indicates whether or not the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling a getXXX method; otherwise, there is no value to use in determining whether it is null or not.
Returns:
true if the last parameter read was SQL NULL; false otherwise
Throws:
SQLException - if a database access error occurs

getString

public String getString(int parameterIndex)
                 throws SQLException
Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.

For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the JDBC CHAR value had in the database, including any padding added by the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getBoolean

public boolean getBoolean(int parameterIndex)
                   throws SQLException
Gets the value of a JDBC BIT parameter as a boolean in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is false.
Throws:
SQLException - if a database access error occurs

getByte

public byte getByte(int parameterIndex)
             throws SQLException
Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getShort

public short getShort(int parameterIndex)
               throws SQLException
Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getInt

public int getInt(int parameterIndex)
           throws SQLException
Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getLong

public long getLong(int parameterIndex)
             throws SQLException
Gets the value of a JDBC BIGINT parameter as a long in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getFloat

public float getFloat(int parameterIndex)
               throws SQLException
Gets the value of a JDBC FLOAT parameter as a float in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getDouble

public double getDouble(int parameterIndex)
                 throws SQLException
Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
SQLException - if a database access error occurs

getBigDecimal

public BigDecimal getBigDecimal(int parameterIndex,
                                int scale)
                         throws SQLException
Deprecated.

Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with scale digits to the right of the decimal point.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
scale - the number of digits to the right of the decimal point
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getBytes

public byte[] getBytes(int parameterIndex)
                throws SQLException
Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getDate

public Date getDate(int parameterIndex)
             throws SQLException
Gets the value of a JDBC DATE parameter as a java.sql.Date object.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getTime

public Time getTime(int parameterIndex)
             throws SQLException
Get the value of a JDBC TIME parameter as a java.sql.Time object.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getTimestamp

public Timestamp getTimestamp(int parameterIndex)
                       throws SQLException
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getObject

public Object getObject(int parameterIndex)
                 throws SQLException
Gets the value of a parameter as an Object in the Java programming language.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
A java.lang.Object holding the OUT parameter value.
Throws:
SQLException - if a database access error occurs
See Also:
Types

getBigDecimal

public BigDecimal getBigDecimal(int parameterIndex)
                         throws SQLException
Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value in full precision. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getObject

public Object getObject(int i,
                        Map map)
                 throws SQLException
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
i - the first parameter is 1, the second is 2, and so on
map - the mapping from SQL type names to Java classes
Returns:
a java.lang.Object holding the OUT parameter value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getRef

public Ref getRef(int i)
           throws SQLException
Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Ref object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBlob

public Blob getBlob(int i)
             throws SQLException
Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Blob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getClob

public Clob getClob(int i)
             throws SQLException
Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Clob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Array getArray(int i)
               throws SQLException
Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as an Array object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getDate

public Date getDate(int parameterIndex,
                    Calendar cal)
             throws SQLException
Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. With a Calendar object, the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the date
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getTime

public Time getTime(int parameterIndex,
                    Calendar cal)
             throws SQLException
Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. With a Calendar object, the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the time
Returns:
the parameter value; if the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

getTimestamp

public Timestamp getTimestamp(int parameterIndex,
                              Calendar cal)
                       throws SQLException
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the timestamp
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
SQLException - if a database access error occurs

registerOutParameter

public void registerOutParameter(int paramIndex,
                                 int sqlType,
                                 String typeName)
                          throws SQLException
Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-named or REF output parameter. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types. Before executing a stored procedure call, you must explicitly call registerOutParameter to register the type from java.sql.Types for each OUT parameter. For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored.

Note: When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

Parameters:
parameterIndex - the first parameter is 1, the second is 2,...
sqlType - a value from Types
typeName - the fully-qualified name of an SQL structured type
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
Types, What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.sql.BatchUpdateException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.BatchUpdateException

No usage of java.sql.BatchUpdateException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.DataTruncation

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.DataTruncation

No usage of java.sql.DataTruncation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.DriverManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.DriverManager

No usage of java.sql.DriverManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.SQLPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.SQLPermission

No usage of java.sql.SQLPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.Types

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.Types

No usage of java.sql.Types

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.Date

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.Date

Packages that use Date
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Date in java.sql

Methods in java.sql that return Date
static Date | Date.valueOf(String s) Converts a string in JDBC date escape format to a Date value.
Date | CallableStatement.getDate(int parameterIndex) Gets the value of a JDBC DATE parameter as a java.sql.Date object.
Date | CallableStatement.getDate(int parameterIndex, Calendar cal) Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
Date | SQLInput.readDate() Reads the next attribute in the stream as a java.sql.Date object.
Date | ResultSet.getDate(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | ResultSet.getDate(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | ResultSet.getDate(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | ResultSet.getDate(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.

Methods in java.sql with parameters of type Date
void | PreparedStatement.setDate(int parameterIndex, Date x) Sets the designated parameter to a value.
void | PreparedStatement.setDate(int parameterIndex, Date x, Calendar cal) Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
void | SQLOutput.writeDate(Date x) Writes the next attribute to the stream as a java.sql.Date object.
void | ResultSet.updateDate(int columnIndex, Date x) Updates the designated column with a java.sql.Date value.
void | ResultSet.updateDate(String columnName, Date x) Updates the designated column with a java.sql.Date value.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.DriverPropertyInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.DriverPropertyInfo

Packages that use DriverPropertyInfo
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of DriverPropertyInfo in java.sql

Methods in java.sql that return DriverPropertyInfo
 DriverPropertyInfo[] Driver.getPropertyInfo(String url, Properties info)
Gets information about the possible properties for this driver.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.SQLException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.SQLException

Packages that use SQLException
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of SQLException in java.sql

Subclasses of SQLException in java.sql
class | BatchUpdateException An exception thrown when an error occurs during a batch update operation.
class | DataTruncation An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.
class | SQLWarning An exception that provides information on database access warnings.

Methods in java.sql that return SQLException
 SQLException SQLException.getNextException()
Retrieves the exception chained to this SQLException object.

Methods in java.sql with parameters of type SQLException
 void SQLException.setNextException(SQLException ex)
Adds an SQLException object to the end of the chain.

Methods in java.sql that throw SQLException
 ResultSet Statement.executeQuery(String sql)
Executes an SQL statement that returns a single ResultSet object.
 int Statement.executeUpdate(String sql)
Executes an SQL INSERT, UPDATE or DELETE statement.
 void Statement.close()
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
 int Statement.getMaxFieldSize()
Returns the maximum number of bytes allowed for any column value.
 void Statement.setMaxFieldSize(int max)
Sets the limit for the maximum number of bytes in a column to the given number of bytes.
 int Statement.getMaxRows()
Retrieves the maximum number of rows that a ResultSet object can contain.
 void Statement.setMaxRows(int max)
Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
 void Statement.setEscapeProcessing(boolean enable)
Sets escape processing on or off.
 int Statement.getQueryTimeout()
Retrieves the number of seconds the driver will wait for a Statement object to execute.
 void Statement.setQueryTimeout(int seconds)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
 void Statement.cancel()
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
 SQLWarning Statement.getWarnings()
Retrieves the first warning reported by calls on this Statement object.
 void Statement.clearWarnings()
Clears all the warnings reported on this Statement object.
 void Statement.setCursorName(String name)
Defines the SQL cursor name that will be used by subsequent Statement object execute methods.
 boolean Statement.execute(String sql)
Executes an SQL statement that may return multiple results.
 ResultSet Statement.getResultSet()
Returns the current result as a ResultSet object.
 int Statement.getUpdateCount()
Returns the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
 boolean Statement.getMoreResults()
Moves to a Statement object's next result.
 void Statement.setFetchDirection(int direction)
Gives the driver a hint as to the direction in which the rows in a result set will be processed.
 int Statement.getFetchDirection()
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
 void Statement.setFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
 int Statement.getFetchSize()
Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object.
 int Statement.getResultSetConcurrency()
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
 int Statement.getResultSetType()
Retrieves the result set type for ResultSet objects generated by this Statement object.
 void Statement.addBatch(String sql)
Adds an SQL command to the current batch of commmands for this Statement object.
 void Statement.clearBatch()
Makes the set of commands in the current batch empty.
 int[] Statement.executeBatch()
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
 Connection Statement.getConnection()
Returns the Connection object that produced this Statement object.
 ResultSet PreparedStatement.executeQuery()
Executes the SQL query in this PreparedStatement object and returns the result set generated by the query.
 int PreparedStatement.executeUpdate()
Executes the SQL INSERT, UPDATE or DELETE statement in this PreparedStatement object.
 void PreparedStatement.setNull(int parameterIndex, int sqlType)
Sets the designated parameter to SQL NULL.
 void PreparedStatement.setBoolean(int parameterIndex, boolean x)
Sets the designated parameter to a Java boolean value.
 void PreparedStatement.setByte(int parameterIndex, byte x)
Sets the designated parameter to a Java byte value.
 void PreparedStatement.setShort(int parameterIndex, short x)
Sets the designated parameter to a Java short value.
 void PreparedStatement.setInt(int parameterIndex, int x)
Sets the designated parameter to a Java int value.
 void PreparedStatement.setLong(int parameterIndex, long x)
Sets the designated parameter to a Java long value.
 void PreparedStatement.setFloat(int parameterIndex, float x)
Sets the designated parameter to a Java float value.
 void PreparedStatement.setDouble(int parameterIndex, double x)
Sets the designated parameter to a Java double value.
 void PreparedStatement.setBigDecimal(int parameterIndex, BigDecimal x)
Sets the designated parameter to a java.math.BigDecimal value.
 void PreparedStatement.setString(int parameterIndex, String x)
Sets the designated parameter to a Java String value.
 void PreparedStatement.setBytes(int parameterIndex, byte[] x)
Sets the designated parameter to a Java array of bytes.
 void PreparedStatement.setDate(int parameterIndex, Date x)
Sets the designated parameter to a value.
 void PreparedStatement.setTime(int parameterIndex, Time x)
Sets the designated parameter to a java.sql.Time value.
 void PreparedStatement.setTimestamp(int parameterIndex, Timestamp x)
Sets the designated parameter to a java.sql.Timestamp value.
 void PreparedStatement.setAsciiStream(int parameterIndex, InputStream x, int length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
 void PreparedStatement.setUnicodeStream(int parameterIndex, InputStream x, int length)
Deprecated.
 void PreparedStatement.setBinaryStream(int parameterIndex, InputStream x, int length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
 void PreparedStatement.clearParameters()
Clears the current parameter values immediately.
 void PreparedStatement.setObject(int parameterIndex, Object x, int targetSqlType, int scale)
Sets the value of the designated parameter with the given object.
 void PreparedStatement.setObject(int parameterIndex, Object x, int targetSqlType)
Sets the value of the designated parameter with the given object.
 void PreparedStatement.setObject(int parameterIndex, Object x)
Sets the value of the designated parameter using the given object.
 boolean PreparedStatement.execute()
Executes any kind of SQL statement.
 void PreparedStatement.addBatch()
Adds a set of parameters to this PreparedStatement object's batch of commands.
 void PreparedStatement.setCharacterStream(int parameterIndex, Reader reader, int length)
Sets the designated parameter to the given Reader object, which is the given number of characters long.
 void PreparedStatement.setRef(int i, Ref x)
Sets the designated parameter to the given REF(<structured-type>) value.
 void PreparedStatement.setBlob(int i, Blob x)
Sets the designated parameter to the given Blob object.
 void PreparedStatement.setClob(int i, Clob x)
Sets the designated parameter to the given Clob object.
 void PreparedStatement.setArray(int i, Array x)
Sets the designated parameter to the given Array object.
 ResultSetMetaData PreparedStatement.getMetaData()
Gets the number, types and properties of a ResultSet object's columns.
 void PreparedStatement.setDate(int parameterIndex, Date x, Calendar cal)
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
 void PreparedStatement.setTime(int parameterIndex, Time x, Calendar cal)
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
 void PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
 void PreparedStatement.setNull(int paramIndex, int sqlType, String typeName)
Sets the designated parameter to SQL NULL.
 String SQLData.getSQLTypeName()
Returns the fully-qualified name of the SQL user-defined type that this object represents.
 void SQLData.readSQL(SQLInput stream, String typeName)
Populates this object with data read from the database.
 void SQLData.writeSQL(SQLOutput stream)
Writes this object to the given SQL data stream, converting it back to its SQL value in the data source.
 Connection Driver.connect(String url, Properties info)
Attempts to make a database connection to the given URL.
 boolean Driver.acceptsURL(String url)
Returns true if the driver thinks that it can open a connection to the given URL.
 DriverPropertyInfo[] Driver.getPropertyInfo(String url, Properties info)
Gets information about the possible properties for this driver.
 Statement Connection.createStatement()
Creates a Statement object for sending SQL statements to the database.
 PreparedStatement Connection.prepareStatement(String sql)
Creates a PreparedStatement object for sending parameterized SQL statements to the database.
 CallableStatement Connection.prepareCall(String sql)
Creates a CallableStatement object for calling database stored procedures.
 String Connection.nativeSQL(String sql)
Converts the given SQL statement into the system's native SQL grammar.
 void Connection.setAutoCommit(boolean autoCommit)
Sets this connection's auto-commit mode.
 boolean Connection.getAutoCommit()
Gets the current auto-commit state.
 void Connection.commit()
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
 void Connection.rollback()
Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
 void Connection.close()
Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.
 boolean Connection.isClosed()
Tests to see if a Connection is closed.
 DatabaseMetaData Connection.getMetaData()
Gets the metadata regarding this connection's database.
 void Connection.setReadOnly(boolean readOnly)
Puts this connection in read-only mode as a hint to enable database optimizations.
 boolean Connection.isReadOnly()
Tests to see if the connection is in read-only mode.
 void Connection.setCatalog(String catalog)
Sets a catalog name in order to select a subspace of this Connection's database in which to work.
 String Connection.getCatalog()
Returns the Connection's current catalog name.
 void Connection.setTransactionIsolation(int level)
Attempts to change the transaction isolation level to the one given.
 int Connection.getTransactionIsolation()
Gets this Connection's current transaction isolation level.
 SQLWarning Connection.getWarnings()
Returns the first warning reported by calls on this Connection.
 void Connection.clearWarnings()
Clears all warnings reported for this Connection object.
 Statement Connection.createStatement(int resultSetType, int resultSetConcurrency)
Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
 PreparedStatement Connection.prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
 CallableStatement Connection.prepareCall(String sql, int resultSetType, int resultSetConcurrency)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
 Map Connection.getTypeMap()
Gets the type map object associated with this connection.
 void Connection.setTypeMap(Map map)
Installs the given type map as the type map for this connection.
 void SQLOutput.writeString(String x)
Writes the next attribute to the stream as a String in the Java programming language.
 void SQLOutput.writeBoolean(boolean x)
Writes the next attribute to the stream as a Java boolean.
 void SQLOutput.writeByte(byte x)
Writes the next attribute to the stream as a Java byte.
 void SQLOutput.writeShort(short x)
Writes the next attribute to the stream as a Java short.
 void SQLOutput.writeInt(int x)
Writes the next attribute to the stream as a Java int.
 void SQLOutput.writeLong(long x)
Writes the next attribute to the stream as a Java long.
 void SQLOutput.writeFloat(float x)
Writes the next attribute to the stream as a Java float.
 void SQLOutput.writeDouble(double x)
Writes the next attribute to the stream as a Java double.
 void SQLOutput.writeBigDecimal(BigDecimal x)
Writes the next attribute to the stream as a java.math.BigDecimal object.
 void SQLOutput.writeBytes(byte[] x)
Writes the next attribute to the stream as an array of bytes.
 void SQLOutput.writeDate(Date x)
Writes the next attribute to the stream as a java.sql.Date object.
 void SQLOutput.writeTime(Time x)
Writes the next attribute to the stream as a java.sql.Time object.
 void SQLOutput.writeTimestamp(Timestamp x)
Writes the next attribute to the stream as a java.sql.Timestamp object.
 void SQLOutput.writeCharacterStream(Reader x)
Writes the next attribute to the stream as a stream of Unicode characters.
 void SQLOutput.writeAsciiStream(InputStream x)
Writes the next attribute to the stream as a stream of ASCII characters.
 void SQLOutput.writeBinaryStream(InputStream x)
Writes the next attribute to the stream as a stream of uninterpreted bytes.
 void SQLOutput.writeObject(SQLData x)
Writes to the stream the data contained in the given SQLData object.
 void SQLOutput.writeRef(Ref x)
Writes an SQL REF value to the stream.
 void SQLOutput.writeBlob(Blob x)
Writes an SQL BLOB value to the stream.
 void SQLOutput.writeClob(Clob x)
Writes an SQL CLOB value to the stream.
 void SQLOutput.writeStruct(Struct x)
Writes an SQL structured type value to the stream.
 void SQLOutput.writeArray(Array x)
Writes an SQL ARRAY value to the stream.
static Connection DriverManager.getConnection(String url, Properties info)
Attempts to establish a connection to the given database URL.
static Connection DriverManager.getConnection(String url, String user, String password)
Attempts to establish a connection to the given database URL.
static Connection DriverManager.getConnection(String url)
Attempts to establish a connection to the given database URL.
static Driver DriverManager.getDriver(String url)
Attempts to locate a driver that understands the given URL.
static void DriverManager.registerDriver(Driver driver)
Registers the given driver with the DriverManager.
static void DriverManager.deregisterDriver(Driver driver)
Drops a Driver from the DriverManager's list.
 long Blob.length()
Returns the number of bytes in the BLOB value designated by this Blob object.
 byte[] Blob.getBytes(long pos, int length)
Returns as an array of bytes, part or all of the BLOB value that this Blob object designates.
 InputStream Blob.getBinaryStream()
Retrieves the BLOB designated by this Blob instance as a stream.
 long Blob.position(byte[] pattern, long start)
Determines the byte position at which the specified byte pattern begins within the BLOB value that this Blob object represents.
 long Blob.position(Blob pattern, long start)
Determines the byte position in the BLOB value designated by this Blob object at which pattern begins.
 void CallableStatement.registerOutParameter(int parameterIndex, int sqlType)
Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
 void CallableStatement.registerOutParameter(int parameterIndex, int sqlType, int scale)
Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
 boolean CallableStatement.wasNull()
Indicates whether or not the last OUT parameter read had the value of SQL NULL.
 String CallableStatement.getString(int parameterIndex)
Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
 boolean CallableStatement.getBoolean(int parameterIndex)
Gets the value of a JDBC BIT parameter as a boolean in the Java programming language.
 byte CallableStatement.getByte(int parameterIndex)
Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language.
 short CallableStatement.getShort(int parameterIndex)
Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language.
 int CallableStatement.getInt(int parameterIndex)
Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
 long CallableStatement.getLong(int parameterIndex)
Gets the value of a JDBC BIGINT parameter as a long in the Java programming language.
 float CallableStatement.getFloat(int parameterIndex)
Gets the value of a JDBC FLOAT parameter as a float in the Java programming language.
 double CallableStatement.getDouble(int parameterIndex)
Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language.
 BigDecimal CallableStatement.getBigDecimal(int parameterIndex, int scale)
Deprecated.
 byte[] CallableStatement.getBytes(int parameterIndex)
Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
 Date CallableStatement.getDate(int parameterIndex)
Gets the value of a JDBC DATE parameter as a java.sql.Date object.
 Time CallableStatement.getTime(int parameterIndex)
Get the value of a JDBC TIME parameter as a java.sql.Time object.
 Timestamp CallableStatement.getTimestamp(int parameterIndex)
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
 Object CallableStatement.getObject(int parameterIndex)
Gets the value of a parameter as an Object in the Java programming language.
 BigDecimal CallableStatement.getBigDecimal(int parameterIndex)
Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
 Object CallableStatement.getObject(int i, Map map)
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
 Ref CallableStatement.getRef(int i)
Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
 Blob CallableStatement.getBlob(int i)
Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
 Clob CallableStatement.getClob(int i)
Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
 Array CallableStatement.getArray(int i)
Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
 Date CallableStatement.getDate(int parameterIndex, Calendar cal)
Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
 Time CallableStatement.getTime(int parameterIndex, Calendar cal)
Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
 Timestamp CallableStatement.getTimestamp(int parameterIndex, Calendar cal)
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
 void CallableStatement.registerOutParameter(int paramIndex, int sqlType, String typeName)
Registers the designated output parameter.
 String Struct.getSQLTypeName()
Retrieves the SQL type name of the SQL structured type that this Struct object represents.
 Object[] Struct.getAttributes()
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
 Object[] Struct.getAttributes(Map map)
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
 boolean DatabaseMetaData.allProceduresAreCallable()
Can all the procedures returned by getProcedures be called by the current user?
 boolean DatabaseMetaData.allTablesAreSelectable()
Can all the tables returned by getTable be SELECTed by the current user?
 String DatabaseMetaData.getURL()
What's the url for this database?
 String DatabaseMetaData.getUserName()
What's our user name as known to the database?
 boolean DatabaseMetaData.isReadOnly()
Is the database in read-only mode?
 boolean DatabaseMetaData.nullsAreSortedHigh()
Are NULL values sorted high?
 boolean DatabaseMetaData.nullsAreSortedLow()
Are NULL values sorted low?
 boolean DatabaseMetaData.nullsAreSortedAtStart()
Are NULL values sorted at the start regardless of sort order?
 boolean DatabaseMetaData.nullsAreSortedAtEnd()
Are NULL values sorted at the end regardless of sort order?
 String DatabaseMetaData.getDatabaseProductName()
What's the name of this database product?
 String DatabaseMetaData.getDatabaseProductVersion()
What's the version of this database product?
 String DatabaseMetaData.getDriverName()
What's the name of this JDBC driver?
 String DatabaseMetaData.getDriverVersion()
What's the version of this JDBC driver?
 boolean DatabaseMetaData.usesLocalFiles()
Does the database store tables in a local file?
 boolean DatabaseMetaData.usesLocalFilePerTable()
Does the database use a file for each table?
 boolean DatabaseMetaData.supportsMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return false.
 boolean DatabaseMetaData.storesUpperCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in upper case?
 boolean DatabaseMetaData.storesLowerCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lower case?
 boolean DatabaseMetaData.storesMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case?
 boolean DatabaseMetaData.supportsMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return true.
 boolean DatabaseMetaData.storesUpperCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in upper case?
 boolean DatabaseMetaData.storesLowerCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lower case?
 boolean DatabaseMetaData.storesMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case?
 String DatabaseMetaData.getIdentifierQuoteString()
What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported.
 String DatabaseMetaData.getSQLKeywords()
Gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords.
 String DatabaseMetaData.getNumericFunctions()
Gets a comma-separated list of math functions.
 String DatabaseMetaData.getStringFunctions()
Gets a comma-separated list of string functions.
 String DatabaseMetaData.getSystemFunctions()
Gets a comma-separated list of system functions.
 String DatabaseMetaData.getTimeDateFunctions()
Gets a comma-separated list of time and date functions.
 String DatabaseMetaData.getSearchStringEscape()
Gets the string that can be used to escape wildcard characters.
 String DatabaseMetaData.getExtraNameCharacters()
Gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
 boolean DatabaseMetaData.supportsAlterTableWithAddColumn()
Is "ALTER TABLE" with add column supported?
 boolean DatabaseMetaData.supportsAlterTableWithDropColumn()
Is "ALTER TABLE" with drop column supported?
 boolean DatabaseMetaData.supportsColumnAliasing()
Is column aliasing supported?
 boolean DatabaseMetaData.nullPlusNonNullIsNull()
Are concatenations between NULL and non-NULL values NULL? For SQL-92 compliance, a JDBC technology-enabled driver will return true.
 boolean DatabaseMetaData.supportsConvert()
Is the CONVERT function between SQL types supported?
 boolean DatabaseMetaData.supportsConvert(int fromType, int toType)
Is CONVERT between the given SQL types supported?
 boolean DatabaseMetaData.supportsTableCorrelationNames()
Are table correlation names supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsDifferentTableCorrelationNames()
If table correlation names are supported, are they restricted to be different from the names of the tables?
 boolean DatabaseMetaData.supportsExpressionsInOrderBy()
Are expressions in "ORDER BY" lists supported?
 boolean DatabaseMetaData.supportsOrderByUnrelated()
Can an "ORDER BY" clause use columns not in the SELECT statement?
 boolean DatabaseMetaData.supportsGroupBy()
Is some form of "GROUP BY" clause supported?
 boolean DatabaseMetaData.supportsGroupByUnrelated()
Can a "GROUP BY" clause use columns not in the SELECT?
 boolean DatabaseMetaData.supportsGroupByBeyondSelect()
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
 boolean DatabaseMetaData.supportsLikeEscapeClause()
Is the escape character in "LIKE" clauses supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsMultipleResultSets()
Are multiple ResultSet from a single execute supported?
 boolean DatabaseMetaData.supportsMultipleTransactions()
Can we have multiple transactions open at once (on different connections)?
 boolean DatabaseMetaData.supportsNonNullableColumns()
Can columns be defined as non-nullable? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsMinimumSQLGrammar()
Is the ODBC Minimum SQL grammar supported? All JDBC CompliantTM drivers must return true.
 boolean DatabaseMetaData.supportsCoreSQLGrammar()
Is the ODBC Core SQL grammar supported?
 boolean DatabaseMetaData.supportsExtendedSQLGrammar()
Is the ODBC Extended SQL grammar supported?
 boolean DatabaseMetaData.supportsANSI92EntryLevelSQL()
Is the ANSI92 entry level SQL grammar supported? All JDBC CompliantTM drivers must return true.
 boolean DatabaseMetaData.supportsANSI92IntermediateSQL()
Is the ANSI92 intermediate SQL grammar supported?
 boolean DatabaseMetaData.supportsANSI92FullSQL()
Is the ANSI92 full SQL grammar supported?
 boolean DatabaseMetaData.supportsIntegrityEnhancementFacility()
Is the SQL Integrity Enhancement Facility supported?
 boolean DatabaseMetaData.supportsOuterJoins()
Is some form of outer join supported?
 boolean DatabaseMetaData.supportsFullOuterJoins()
Are full nested outer joins supported?
 boolean DatabaseMetaData.supportsLimitedOuterJoins()
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
 String DatabaseMetaData.getSchemaTerm()
What's the database vendor's preferred term for "schema"?
 String DatabaseMetaData.getProcedureTerm()
What's the database vendor's preferred term for "procedure"?
 String DatabaseMetaData.getCatalogTerm()
What's the database vendor's preferred term for "catalog"?
 boolean DatabaseMetaData.isCatalogAtStart()
Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end)
 String DatabaseMetaData.getCatalogSeparator()
What's the separator between catalog and table name?
 boolean DatabaseMetaData.supportsSchemasInDataManipulation()
Can a schema name be used in a data manipulation statement?
 boolean DatabaseMetaData.supportsSchemasInProcedureCalls()
Can a schema name be used in a procedure call statement?
 boolean DatabaseMetaData.supportsSchemasInTableDefinitions()
Can a schema name be used in a table definition statement?
 boolean DatabaseMetaData.supportsSchemasInIndexDefinitions()
Can a schema name be used in an index definition statement?
 boolean DatabaseMetaData.supportsSchemasInPrivilegeDefinitions()
Can a schema name be used in a privilege definition statement?
 boolean DatabaseMetaData.supportsCatalogsInDataManipulation()
Can a catalog name be used in a data manipulation statement?
 boolean DatabaseMetaData.supportsCatalogsInProcedureCalls()
Can a catalog name be used in a procedure call statement?
 boolean DatabaseMetaData.supportsCatalogsInTableDefinitions()
Can a catalog name be used in a table definition statement?
 boolean DatabaseMetaData.supportsCatalogsInIndexDefinitions()
Can a catalog name be used in an index definition statement?
 boolean DatabaseMetaData.supportsCatalogsInPrivilegeDefinitions()
Can a catalog name be used in a privilege definition statement?
 boolean DatabaseMetaData.supportsPositionedDelete()
Is positioned DELETE supported?
 boolean DatabaseMetaData.supportsPositionedUpdate()
Is positioned UPDATE supported?
 boolean DatabaseMetaData.supportsSelectForUpdate()
Is SELECT for UPDATE supported?
 boolean DatabaseMetaData.supportsStoredProcedures()
Are stored procedure calls using the stored procedure escape syntax supported?
 boolean DatabaseMetaData.supportsSubqueriesInComparisons()
Are subqueries in comparison expressions supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsSubqueriesInExists()
Are subqueries in 'exists' expressions supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsSubqueriesInIns()
Are subqueries in 'in' statements supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsSubqueriesInQuantifieds()
Are subqueries in quantified expressions supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsCorrelatedSubqueries()
Are correlated subqueries supported? A JDBC CompliantTM driver always returns true.
 boolean DatabaseMetaData.supportsUnion()
Is SQL UNION supported?
 boolean DatabaseMetaData.supportsUnionAll()
Is SQL UNION ALL supported?
 boolean DatabaseMetaData.supportsOpenCursorsAcrossCommit()
Can cursors remain open across commits?
 boolean DatabaseMetaData.supportsOpenCursorsAcrossRollback()
Can cursors remain open across rollbacks?
 boolean DatabaseMetaData.supportsOpenStatementsAcrossCommit()
Can statements remain open across commits?
 boolean DatabaseMetaData.supportsOpenStatementsAcrossRollback()
Can statements remain open across rollbacks?
 int DatabaseMetaData.getMaxBinaryLiteralLength()
How many hex characters can you have in an inline binary literal?
 int DatabaseMetaData.getMaxCharLiteralLength()
What's the max length for a character literal?
 int DatabaseMetaData.getMaxColumnNameLength()
What's the limit on column name length?
 int DatabaseMetaData.getMaxColumnsInGroupBy()
What's the maximum number of columns in a "GROUP BY" clause?
 int DatabaseMetaData.getMaxColumnsInIndex()
What's the maximum number of columns allowed in an index?
 int DatabaseMetaData.getMaxColumnsInOrderBy()
What's the maximum number of columns in an "ORDER BY" clause?
 int DatabaseMetaData.getMaxColumnsInSelect()
What's the maximum number of columns in a "SELECT" list?
 int DatabaseMetaData.getMaxColumnsInTable()
What's the maximum number of columns in a table?
 int DatabaseMetaData.getMaxConnections()
How many active connections can we have at a time to this database?
 int DatabaseMetaData.getMaxCursorNameLength()
What's the maximum cursor name length?
 int DatabaseMetaData.getMaxIndexLength()
Retrieves the maximum number of bytes for an index, including all of the parts of the index.
 int DatabaseMetaData.getMaxSchemaNameLength()
What's the maximum length allowed for a schema name?
 int DatabaseMetaData.getMaxProcedureNameLength()
What's the maximum length of a procedure name?
 int DatabaseMetaData.getMaxCatalogNameLength()
What's the maximum length of a catalog name?
 int DatabaseMetaData.getMaxRowSize()
What's the maximum length of a single row?
 boolean DatabaseMetaData.doesMaxRowSizeIncludeBlobs()
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
 int DatabaseMetaData.getMaxStatementLength()
What's the maximum length of an SQL statement?
 int DatabaseMetaData.getMaxStatements()
How many active statements can we have open at one time to this database?
 int DatabaseMetaData.getMaxTableNameLength()
What's the maximum length of a table name?
 int DatabaseMetaData.getMaxTablesInSelect()
What's the maximum number of tables in a SELECT statement?
 int DatabaseMetaData.getMaxUserNameLength()
What's the maximum length of a user name?
 int DatabaseMetaData.getDefaultTransactionIsolation()
What's the database's default transaction isolation level? The values are defined in java.sql.Connection.
 boolean DatabaseMetaData.supportsTransactions()
Are transactions supported? If not, invoking the method commit is a noop and the isolation level is TRANSACTION_NONE.
 boolean DatabaseMetaData.supportsTransactionIsolationLevel(int level)
Does this database support the given transaction isolation level?
 boolean DatabaseMetaData.supportsDataDefinitionAndDataManipulationTransactions()
Are both data definition and data manipulation statements within a transaction supported?
 boolean DatabaseMetaData.supportsDataManipulationTransactionsOnly()
Are only data manipulation statements within a transaction supported?
 boolean DatabaseMetaData.dataDefinitionCausesTransactionCommit()
Does a data definition statement within a transaction force the transaction to commit?
 boolean DatabaseMetaData.dataDefinitionIgnoredInTransactions()
Is a data definition statement within a transaction ignored?
 ResultSet DatabaseMetaData.getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
Gets a description of the stored procedures available in a catalog.
 ResultSet DatabaseMetaData.getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
Gets a description of a catalog's stored procedure parameters and result columns.
 ResultSet DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
Gets a description of tables available in a catalog.
 ResultSet DatabaseMetaData.getSchemas()
Gets the schema names available in this database.
 ResultSet DatabaseMetaData.getCatalogs()
Gets the catalog names available in this database.
 ResultSet DatabaseMetaData.getTableTypes()
Gets the table types available in this database.
 ResultSet DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
Gets a description of table columns available in the specified catalog.
 ResultSet DatabaseMetaData.getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)
Gets a description of the access rights for a table's columns.
 ResultSet DatabaseMetaData.getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
Gets a description of the access rights for each table available in a catalog.
 ResultSet DatabaseMetaData.getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
Gets a description of a table's optimal set of columns that uniquely identifies a row.
 ResultSet DatabaseMetaData.getVersionColumns(String catalog, String schema, String table)
Gets a description of a table's columns that are automatically updated when any value in a row is updated.
 ResultSet DatabaseMetaData.getPrimaryKeys(String catalog, String schema, String table)
Gets a description of a table's primary key columns.
 ResultSet DatabaseMetaData.getImportedKeys(String catalog, String schema, String table)
Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
 ResultSet DatabaseMetaData.getExportedKeys(String catalog, String schema, String table)
Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).
 ResultSet DatabaseMetaData.getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)
Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
 ResultSet DatabaseMetaData.getTypeInfo()
Gets a description of all the standard SQL types supported by this database.
 ResultSet DatabaseMetaData.getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)
Gets a description of a table's indices and statistics.
 boolean DatabaseMetaData.supportsResultSetType(int type)
Does the database support the given result set type?
 boolean DatabaseMetaData.supportsResultSetConcurrency(int type, int concurrency)
Does the database support the concurrency type in combination with the given result set type?
 boolean DatabaseMetaData.ownUpdatesAreVisible(int type)
Indicates whether a result set's own updates are visible.
 boolean DatabaseMetaData.ownDeletesAreVisible(int type)
Indicates whether a result set's own deletes are visible.
 boolean DatabaseMetaData.ownInsertsAreVisible(int type)
Indicates whether a result set's own inserts are visible.
 boolean DatabaseMetaData.othersUpdatesAreVisible(int type)
Indicates whether updates made by others are visible.
 boolean DatabaseMetaData.othersDeletesAreVisible(int type)
Indicates whether deletes made by others are visible.
 boolean DatabaseMetaData.othersInsertsAreVisible(int type)
Indicates whether inserts made by others are visible.
 boolean DatabaseMetaData.updatesAreDetected(int type)
Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
 boolean DatabaseMetaData.deletesAreDetected(int type)
Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted().
 boolean DatabaseMetaData.insertsAreDetected(int type)
Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted().
 boolean DatabaseMetaData.supportsBatchUpdates()
Indicates whether the driver supports batch updates.
 ResultSet DatabaseMetaData.getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)
Gets a description of the user-defined types defined in a particular schema.
 Connection DatabaseMetaData.getConnection()
Retrieves the connection that produced this metadata object.
 String Array.getBaseTypeName()
Returns the SQL type name of the elements in the array designated by this Array object.
 int Array.getBaseType()
Returns the JDBC type of the elements in the array designated by this Array object.
 Object Array.getArray()
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language.
 Object Array.getArray(Map map)
Retrieves the contents of the SQL array designated by this Array object.
 Object Array.getArray(long index, int count)
Returns an array containing a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
 Object Array.getArray(long index, int count, Map map)
Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
 ResultSet Array.getResultSet()
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
 ResultSet Array.getResultSet(Map map)
Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
 ResultSet Array.getResultSet(long index, int count)
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
 ResultSet Array.getResultSet(long index, int count, Map map)
Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
 String SQLInput.readString()
Reads the next attribute in the stream as a String in the Java programming language.
 boolean SQLInput.readBoolean()
Reads the next attribute in the stream as a boolean in the Java programming language.
 byte SQLInput.readByte()
Reads the next attribute in the stream as a byte in the Java programming language.
 short SQLInput.readShort()
Reads the next attribute in the stream as a short in the Java programming language.
 int SQLInput.readInt()
Reads the next attribute in the stream as an int in the Java programming language.
 long SQLInput.readLong()
Reads the next attribute in the stream as a long in the Java programming language.
 float SQLInput.readFloat()
Reads the next attribute in the stream as a float in the Java programming language.
 double SQLInput.readDouble()
Reads the next attribute in the stream as a double in the Java programming language.
 BigDecimal SQLInput.readBigDecimal()
Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language.
 byte[] SQLInput.readBytes()
Reads the next attribute in the stream as an array of bytes in the Java programming language.
 Date SQLInput.readDate()
Reads the next attribute in the stream as a java.sql.Date object.
 Time SQLInput.readTime()
Reads the next attribute in the stream as a java.sql.Time object.
 Timestamp SQLInput.readTimestamp()
Reads the next attribute in the stream as a java.sql.Timestamp object.
 Reader SQLInput.readCharacterStream()
Returns the next attribute in the stream as a stream of Unicode characters.
 InputStream SQLInput.readAsciiStream()
Returns the next attribute in the stream as a stream of ASCII characters.
 InputStream SQLInput.readBinaryStream()
Returns the next attribute in the stream as a stream of uninterpreted bytes.
 Object SQLInput.readObject()
Returns the datum at the head of the stream as an Object in the Java programming language.
 Ref SQLInput.readRef()
Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
 Blob SQLInput.readBlob()
Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
 Clob SQLInput.readClob()
Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
 Array SQLInput.readArray()
Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
 boolean SQLInput.wasNull()
Determines whether the last value read was SQL NULL.
 boolean ResultSet.next()
Moves the cursor down one row from its current position.
 void ResultSet.close()
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
 boolean ResultSet.wasNull()
Reports whether the last column read had a value of SQL NULL.
 String ResultSet.getString(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
 boolean ResultSet.getBoolean(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
 byte ResultSet.getByte(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
 short ResultSet.getShort(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
 int ResultSet.getInt(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
 long ResultSet.getLong(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
 float ResultSet.getFloat(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
 double ResultSet.getDouble(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
 BigDecimal ResultSet.getBigDecimal(int columnIndex, int scale)
Deprecated.
 byte[] ResultSet.getBytes(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
 Date ResultSet.getDate(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
 Time ResultSet.getTime(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 Timestamp ResultSet.getTimestamp(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
 InputStream ResultSet.getAsciiStream(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
 InputStream ResultSet.getUnicodeStream(int columnIndex)
Deprecated. use getCharacterStream in place of getUnicodeStream
 InputStream ResultSet.getBinaryStream(int columnIndex)
Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
 String ResultSet.getString(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
 boolean ResultSet.getBoolean(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
 byte ResultSet.getByte(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
 short ResultSet.getShort(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
 int ResultSet.getInt(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
 long ResultSet.getLong(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
 float ResultSet.getFloat(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
 double ResultSet.getDouble(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
 BigDecimal ResultSet.getBigDecimal(String columnName, int scale)
Deprecated.
 byte[] ResultSet.getBytes(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
 Date ResultSet.getDate(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
 Time ResultSet.getTime(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 Timestamp ResultSet.getTimestamp(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
 InputStream ResultSet.getAsciiStream(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
 InputStream ResultSet.getUnicodeStream(String columnName)
Deprecated.
 InputStream ResultSet.getBinaryStream(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
 SQLWarning ResultSet.getWarnings()
Returns the first warning reported by calls on this ResultSet object.
 void ResultSet.clearWarnings()
Clears all warnings reported on this ResultSet object.
 String ResultSet.getCursorName()
Gets the name of the SQL cursor used by this ResultSet object.
 ResultSetMetaData ResultSet.getMetaData()
Retrieves the number, types and properties of this ResultSet object's columns.
 Object ResultSet.getObject(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 Object ResultSet.getObject(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 int ResultSet.findColumn(String columnName)
Maps the given ResultSet column name to its ResultSet column index.
 Reader ResultSet.getCharacterStream(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
 Reader ResultSet.getCharacterStream(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
 BigDecimal ResultSet.getBigDecimal(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
 BigDecimal ResultSet.getBigDecimal(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
 boolean ResultSet.isBeforeFirst()
Indicates whether the cursor is before the first row in this ResultSet object.
 boolean ResultSet.isAfterLast()
Indicates whether the cursor is after the last row in this ResultSet object.
 boolean ResultSet.isFirst()
Indicates whether the cursor is on the first row of this ResultSet object.
 boolean ResultSet.isLast()
Indicates whether the cursor is on the last row of this ResultSet object.
 void ResultSet.beforeFirst()
Moves the cursor to the front of this ResultSet object, just before the first row.
 void ResultSet.afterLast()
Moves the cursor to the end of this ResultSet object, just after the last row.
 boolean ResultSet.first()
Moves the cursor to the first row in this ResultSet object.
 boolean ResultSet.last()
Moves the cursor to the last row in this ResultSet object.
 int ResultSet.getRow()
Retrieves the current row number.
 boolean ResultSet.absolute(int row)
Moves the cursor to the given row number in this ResultSet object.
 boolean ResultSet.relative(int rows)
Moves the cursor a relative number of rows, either positive or negative.
 boolean ResultSet.previous()
Moves the cursor to the previous row in this ResultSet object.
 void ResultSet.setFetchDirection(int direction)
Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
 int ResultSet.getFetchDirection()
Returns the fetch direction for this ResultSet object.
 void ResultSet.setFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
 int ResultSet.getFetchSize()
Returns the fetch size for this ResultSet object.
 int ResultSet.getType()
Returns the type of this ResultSet object.
 int ResultSet.getConcurrency()
Returns the concurrency mode of this ResultSet object.
 boolean ResultSet.rowUpdated()
Indicates whether the current row has been updated.
 boolean ResultSet.rowInserted()
Indicates whether the current row has had an insertion.
 boolean ResultSet.rowDeleted()
Indicates whether a row has been deleted.
 void ResultSet.updateNull(int columnIndex)
Gives a nullable column a null value.
 void ResultSet.updateBoolean(int columnIndex, boolean x)
Updates the designated column with a boolean value.
 void ResultSet.updateByte(int columnIndex, byte x)
Updates the designated column with a byte value.
 void ResultSet.updateShort(int columnIndex, short x)
Updates the designated column with a short value.
 void ResultSet.updateInt(int columnIndex, int x)
Updates the designated column with an int value.
 void ResultSet.updateLong(int columnIndex, long x)
Updates the designated column with a long value.
 void ResultSet.updateFloat(int columnIndex, float x)
Updates the designated column with a float value.
 void ResultSet.updateDouble(int columnIndex, double x)
Updates the designated column with a double value.
 void ResultSet.updateBigDecimal(int columnIndex, BigDecimal x)
Updates the designated column with a java.math.BigDecimal value.
 void ResultSet.updateString(int columnIndex, String x)
Updates the designated column with a String value.
 void ResultSet.updateBytes(int columnIndex, byte[] x)
Updates the designated column with a byte array value.
 void ResultSet.updateDate(int columnIndex, Date x)
Updates the designated column with a java.sql.Date value.
 void ResultSet.updateTime(int columnIndex, Time x)
Updates the designated column with a java.sql.Time value.
 void ResultSet.updateTimestamp(int columnIndex, Timestamp x)
Updates the designated column with a java.sql.Timestamp value.
 void ResultSet.updateAsciiStream(int columnIndex, InputStream x, int length)
Updates the designated column with an ascii stream value.
 void ResultSet.updateBinaryStream(int columnIndex, InputStream x, int length)
Updates the designated column with a binary stream value.
 void ResultSet.updateCharacterStream(int columnIndex, Reader x, int length)
Updates the designated column with a character stream value.
 void ResultSet.updateObject(int columnIndex, Object x, int scale)
Updates the designated column with an Object value.
 void ResultSet.updateObject(int columnIndex, Object x)
Updates the designated column with an Object value.
 void ResultSet.updateNull(String columnName)
Updates the designated column with a null value.
 void ResultSet.updateBoolean(String columnName, boolean x)
Updates the designated column with a boolean value.
 void ResultSet.updateByte(String columnName, byte x)
Updates the designated column with a byte value.
 void ResultSet.updateShort(String columnName, short x)
Updates the designated column with a short value.
 void ResultSet.updateInt(String columnName, int x)
Updates the designated column with an int value.
 void ResultSet.updateLong(String columnName, long x)
Updates the designated column with a long value.
 void ResultSet.updateFloat(String columnName, float x)
Updates the designated column with a float value.
 void ResultSet.updateDouble(String columnName, double x)
Updates the designated column with a double value.
 void ResultSet.updateBigDecimal(String columnName, BigDecimal x)
Updates the designated column with a java.sql.BigDecimal value.
 void ResultSet.updateString(String columnName, String x)
Updates the designated column with a String value.
 void ResultSet.updateBytes(String columnName, byte[] x)
Updates the designated column with a boolean value.
 void ResultSet.updateDate(String columnName, Date x)
Updates the designated column with a java.sql.Date value.
 void ResultSet.updateTime(String columnName, Time x)
Updates the designated column with a java.sql.Time value.
 void ResultSet.updateTimestamp(String columnName, Timestamp x)
Updates the designated column with a java.sql.Timestamp value.
 void ResultSet.updateAsciiStream(String columnName, InputStream x, int length)
Updates the designated column with an ascii stream value.
 void ResultSet.updateBinaryStream(String columnName, InputStream x, int length)
Updates the designated column with a binary stream value.
 void ResultSet.updateCharacterStream(String columnName, Reader reader, int length)
Updates the designated column with a character stream value.
 void ResultSet.updateObject(String columnName, Object x, int scale)
Updates the designated column with an Object value.
 void ResultSet.updateObject(String columnName, Object x)
Updates the designated column with an Object value.
 void ResultSet.insertRow()
Inserts the contents of the insert row into this ResultSet objaect and into the database.
 void ResultSet.updateRow()
Updates the underlying database with the new contents of the current row of this ResultSet object.
 void ResultSet.deleteRow()
Deletes the current row from this ResultSet object and from the underlying database.
 void ResultSet.refreshRow()
Refreshes the current row with its most recent value in the database.
 void ResultSet.cancelRowUpdates()
Cancels the updates made to the current row in this ResultSet object.
 void ResultSet.moveToInsertRow()
Moves the cursor to the insert row.
 void ResultSet.moveToCurrentRow()
Moves the cursor to the remembered cursor position, usually the current row.
 Statement ResultSet.getStatement()
Returns the Statement object that produced this ResultSet object.
 Object ResultSet.getObject(int i, Map map)
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 Ref ResultSet.getRef(int i)
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
 Blob ResultSet.getBlob(int i)
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
 Clob ResultSet.getClob(int i)
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
 Array ResultSet.getArray(int i)
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
 Object ResultSet.getObject(String colName, Map map)
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 Ref ResultSet.getRef(String colName)
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
 Blob ResultSet.getBlob(String colName)
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
 Clob ResultSet.getClob(String colName)
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
 Array ResultSet.getArray(String colName)
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
 Date ResultSet.getDate(int columnIndex, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
 Date ResultSet.getDate(String columnName, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
 Time ResultSet.getTime(int columnIndex, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 Time ResultSet.getTime(String columnName, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 Timestamp ResultSet.getTimestamp(int columnIndex, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
 Timestamp ResultSet.getTimestamp(String columnName, Calendar cal)
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
 int ResultSetMetaData.getColumnCount()
Returns the number of columns in this ResultSet object.
 boolean ResultSetMetaData.isAutoIncrement(int column)
Indicates whether the designated column is automatically numbered, thus read-only.
 boolean ResultSetMetaData.isCaseSensitive(int column)
Indicates whether a column's case matters.
 boolean ResultSetMetaData.isSearchable(int column)
Indicates whether the designated column can be used in a where clause.
 boolean ResultSetMetaData.isCurrency(int column)
Indicates whether the designated column is a cash value.
 int ResultSetMetaData.isNullable(int column)
Indicates the nullability of values in the designated column.
 boolean ResultSetMetaData.isSigned(int column)
Indicates whether values in the designated column are signed numbers.
 int ResultSetMetaData.getColumnDisplaySize(int column)
Indicates the designated column's normal maximum width in characters.
 String ResultSetMetaData.getColumnLabel(int column)
Gets the designated column's suggested title for use in printouts and displays.
 String ResultSetMetaData.getColumnName(int column)
Get the designated column's name.
 String ResultSetMetaData.getSchemaName(int column)
Get the designated column's table's schema.
 int ResultSetMetaData.getPrecision(int column)
Get the designated column's number of decimal digits.
 int ResultSetMetaData.getScale(int column)
Gets the designated column's number of digits to right of the decimal point.
 String ResultSetMetaData.getTableName(int column)
Gets the designated column's table name.
 String ResultSetMetaData.getCatalogName(int column)
Gets the designated column's table's catalog name.
 int ResultSetMetaData.getColumnType(int column)
Retrieves the designated column's SQL type.
 String ResultSetMetaData.getColumnTypeName(int column)
Retrieves the designated column's database-specific type name.
 boolean ResultSetMetaData.isReadOnly(int column)
Indicates whether the designated column is definitely not writable.
 boolean ResultSetMetaData.isWritable(int column)
Indicates whether it is possible for a write on the designated column to succeed.
 boolean ResultSetMetaData.isDefinitelyWritable(int column)
Indicates whether a write on the designated column will definitely succeed.
 String ResultSetMetaData.getColumnClassName(int column)
Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
 String Ref.getBaseTypeName()
Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references.
 long Clob.length()
Returns the number of characters in the CLOB value designated by this Clob object.
 String Clob.getSubString(long pos, int length)
Returns a copy of the specified substring in the CLOB value designated by this Clob object.
 Reader Clob.getCharacterStream()
Gets the CLOB value designated by this Clob object as a Unicode stream.
 InputStream Clob.getAsciiStream()
Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
 long Clob.position(String searchstr, long start)
Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.
 long Clob.position(Clob searchstr, long start)
Determines the character position at which the specified Clob object searchstr appears in this Clob object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.SQLWarning

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.SQLWarning

Packages that use SQLWarning
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of SQLWarning in java.sql

Subclasses of SQLWarning in java.sql
 class DataTruncation
An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.

Methods in java.sql that return SQLWarning
SQLWarning | Statement.getWarnings() Retrieves the first warning reported by calls on this Statement object.
SQLWarning | SQLWarning.getNextWarning() Retrieves the warning chained to this SQLWarning object.
SQLWarning | Connection.getWarnings() Returns the first warning reported by calls on this Connection.
SQLWarning | ResultSet.getWarnings() Returns the first warning reported by calls on this ResultSet object.

Methods in java.sql with parameters of type SQLWarning
 void SQLWarning.setNextWarning(SQLWarning w)
Adds an SQLWarning object to the end of the chain.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.Time

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.Time

Packages that use Time
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Time in java.sql

Methods in java.sql that return Time
Time | CallableStatement.getTime(int parameterIndex) Get the value of a JDBC TIME parameter as a java.sql.Time object.
Time | CallableStatement.getTime(int parameterIndex, Calendar cal) Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
static Time | Time.valueOf(String s) Converts a string in JDBC time escape format to a Time value.
Time | SQLInput.readTime() Reads the next attribute in the stream as a java.sql.Time object.
Time | ResultSet.getTime(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | ResultSet.getTime(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | ResultSet.getTime(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | ResultSet.getTime(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.

Methods in java.sql with parameters of type Time
void | PreparedStatement.setTime(int parameterIndex, Time x) Sets the designated parameter to a java.sql.Time value.
void | PreparedStatement.setTime(int parameterIndex, Time x, Calendar cal) Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
void | SQLOutput.writeTime(Time x) Writes the next attribute to the stream as a java.sql.Time object.
void | ResultSet.updateTime(int columnIndex, Time x) Updates the designated column with a java.sql.Time value.
void | ResultSet.updateTime(String columnName, Time x) Updates the designated column with a java.sql.Time value.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.sql.Timestamp

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.sql.Timestamp

Packages that use Timestamp
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Timestamp in java.sql

Methods in java.sql that return Timestamp
static Timestamp | Timestamp.valueOf(String s) Converts a String object in JDBC timestamp escape format to a Timestamp value.
Timestamp | CallableStatement.getTimestamp(int parameterIndex) Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
Timestamp | CallableStatement.getTimestamp(int parameterIndex, Calendar cal) Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
Timestamp | SQLInput.readTimestamp() Reads the next attribute in the stream as a java.sql.Timestamp object.
Timestamp | ResultSet.getTimestamp(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp | ResultSet.getTimestamp(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
Timestamp | ResultSet.getTimestamp(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp | ResultSet.getTimestamp(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.

Methods in java.sql with parameters of type Timestamp
void | PreparedStatement.setTimestamp(int parameterIndex, Timestamp x) Sets the designated parameter to a java.sql.Timestamp value.
void | PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal) Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
boolean | Timestamp.equals(Timestamp ts) Tests to see if this Timestamp object is equal to the given Timestamp object.
boolean | Timestamp.before(Timestamp ts) Indicates whether this Timestamp object is earlier than the given Timestamp object.
boolean | Timestamp.after(Timestamp ts) Indicates whether this Timestamp object is later than the given Timestamp object.
void | SQLOutput.writeTimestamp(Timestamp x) Writes the next attribute to the stream as a java.sql.Timestamp object.
void | ResultSet.updateTimestamp(int columnIndex, Timestamp x) Updates the designated column with a java.sql.Timestamp value.
void | ResultSet.updateTimestamp(String columnName, Timestamp x) Updates the designated column with a java.sql.Timestamp value.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Array

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Array

Packages that use Array
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Array in java.sql

Methods in java.sql that return Array
Array | CallableStatement.getArray(int i) Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language.
Array | SQLInput.readArray() Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
Array | ResultSet.getArray(int i) Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Array | ResultSet.getArray(String colName) Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.

Methods in java.sql with parameters of type Array
void | PreparedStatement.setArray(int i, Array x) Sets the designated parameter to the given Array object.
void | SQLOutput.writeArray(Array x) Writes an SQL ARRAY value to the stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Blob

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Blob

Packages that use Blob
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Blob in java.sql

Methods in java.sql that return Blob
Blob | CallableStatement.getBlob(int i) Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
Blob | SQLInput.readBlob() Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
Blob | ResultSet.getBlob(int i) Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Blob | ResultSet.getBlob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.

Methods in java.sql with parameters of type Blob
void | PreparedStatement.setBlob(int i, Blob x) Sets the designated parameter to the given Blob object.
void | SQLOutput.writeBlob(Blob x) Writes an SQL BLOB value to the stream.
long | Blob.position(Blob pattern, long start) Determines the byte position in the BLOB value designated by this Blob object at which pattern begins.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.CallableStatement

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.CallableStatement

Packages that use CallableStatement
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of CallableStatement in java.sql

Methods in java.sql that return CallableStatement
CallableStatement | Connection.prepareCall(String sql) Creates a CallableStatement object for calling database stored procedures.
CallableStatement | Connection.prepareCall(String sql, int resultSetType, int resultSetConcurrency) Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Clob

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Clob

Packages that use Clob
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Clob in java.sql

Methods in java.sql that return Clob
Clob | CallableStatement.getClob(int i) Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
Clob | SQLInput.readClob() Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
Clob | ResultSet.getClob(int i) Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Clob | ResultSet.getClob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.

Methods in java.sql with parameters of type Clob
void | PreparedStatement.setClob(int i, Clob x) Sets the designated parameter to the given Clob object.
void | SQLOutput.writeClob(Clob x) Writes an SQL CLOB value to the stream.
long | Clob.position(Clob searchstr, long start) Determines the character position at which the specified Clob object searchstr appears in this Clob object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Connection

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Connection

Packages that use Connection
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Connection in java.sql

Methods in java.sql that return Connection
Connection | Statement.getConnection() Returns the Connection object that produced this Statement object.
Connection | Driver.connect(String url, Properties info) Attempts to make a database connection to the given URL.
static Connection | DriverManager.getConnection(String url, Properties info) Attempts to establish a connection to the given database URL.
static Connection | DriverManager.getConnection(String url, String user, String password) Attempts to establish a connection to the given database URL.
static Connection | DriverManager.getConnection(String url) Attempts to establish a connection to the given database URL.
Connection | DatabaseMetaData.getConnection() Retrieves the connection that produced this metadata object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.DatabaseMetaData

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.DatabaseMetaData

Packages that use DatabaseMetaData
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of DatabaseMetaData in java.sql

Methods in java.sql that return DatabaseMetaData
 DatabaseMetaData Connection.getMetaData()
Gets the metadata regarding this connection's database.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Driver

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Driver

Packages that use Driver
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Driver in java.sql

Methods in java.sql that return Driver
static Driver DriverManager.getDriver(String url)
Attempts to locate a driver that understands the given URL.

Methods in java.sql with parameters of type Driver
static void | DriverManager.registerDriver(Driver driver) Registers the given driver with the DriverManager.
static void | DriverManager.deregisterDriver(Driver driver) Drops a Driver from the DriverManager's list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.PreparedStatement

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.PreparedStatement

Packages that use PreparedStatement
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of PreparedStatement in java.sql

Subinterfaces of PreparedStatement in java.sql
 interface CallableStatement
The interface used to execute SQL stored procedures.

Methods in java.sql that return PreparedStatement
PreparedStatement | Connection.prepareStatement(String sql) Creates a PreparedStatement object for sending parameterized SQL statements to the database.
PreparedStatement | Connection.prepareStatement(String sql, int resultSetType, int resultSetConcurrency) Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Ref

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Ref

Packages that use Ref
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Ref in java.sql

Methods in java.sql that return Ref
Ref | CallableStatement.getRef(int i) Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language.
Ref | SQLInput.readRef() Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
Ref | ResultSet.getRef(int i) Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Ref | ResultSet.getRef(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.

Methods in java.sql with parameters of type Ref
void | PreparedStatement.setRef(int i, Ref x) Sets the designated parameter to the given REF(<structured-type>) value.
void | SQLOutput.writeRef(Ref x) Writes an SQL REF value to the stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.ResultSet

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.ResultSet

Packages that use ResultSet
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of ResultSet in java.sql

Methods in java.sql that return ResultSet
ResultSet | Statement.executeQuery(String sql) Executes an SQL statement that returns a single ResultSet object.
ResultSet | Statement.getResultSet() Returns the current result as a ResultSet object.
ResultSet | PreparedStatement.executeQuery() Executes the SQL query in this PreparedStatement object and returns the result set generated by the query.
ResultSet | DatabaseMetaData.getProcedures(String catalog, String schemaPattern, String procedureNamePattern) Gets a description of the stored procedures available in a catalog.
ResultSet | DatabaseMetaData.getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) Gets a description of a catalog's stored procedure parameters and result columns.
ResultSet | DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Gets a description of tables available in a catalog.
ResultSet | DatabaseMetaData.getSchemas() Gets the schema names available in this database.
ResultSet | DatabaseMetaData.getCatalogs() Gets the catalog names available in this database.
ResultSet | DatabaseMetaData.getTableTypes() Gets the table types available in this database.
ResultSet | DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Gets a description of table columns available in the specified catalog.
ResultSet | DatabaseMetaData.getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) Gets a description of the access rights for a table's columns.
ResultSet | DatabaseMetaData.getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) Gets a description of the access rights for each table available in a catalog.
ResultSet | DatabaseMetaData.getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) Gets a description of a table's optimal set of columns that uniquely identifies a row.
ResultSet | DatabaseMetaData.getVersionColumns(String catalog, String schema, String table) Gets a description of a table's columns that are automatically updated when any value in a row is updated.
ResultSet | DatabaseMetaData.getPrimaryKeys(String catalog, String schema, String table) Gets a description of a table's primary key columns.
ResultSet | DatabaseMetaData.getImportedKeys(String catalog, String schema, String table) Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
ResultSet | DatabaseMetaData.getExportedKeys(String catalog, String schema, String table) Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).
ResultSet | DatabaseMetaData.getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
ResultSet | DatabaseMetaData.getTypeInfo() Gets a description of all the standard SQL types supported by this database.
ResultSet | DatabaseMetaData.getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) Gets a description of a table's indices and statistics.
ResultSet | DatabaseMetaData.getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) Gets a description of the user-defined types defined in a particular schema.
ResultSet | Array.getResultSet() Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
ResultSet | Array.getResultSet(Map map) Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
ResultSet | Array.getResultSet(long index, int count) Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
ResultSet | Array.getResultSet(long index, int count, Map map) Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.ResultSetMetaData

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.ResultSetMetaData

Packages that use ResultSetMetaData
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of ResultSetMetaData in java.sql

Methods in java.sql that return ResultSetMetaData
ResultSetMetaData | PreparedStatement.getMetaData() Gets the number, types and properties of a ResultSet object's columns.
ResultSetMetaData | ResultSet.getMetaData() Retrieves the number, types and properties of this ResultSet object's columns.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.SQLData

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.SQLData

Packages that use SQLData
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of SQLData in java.sql

Methods in java.sql with parameters of type SQLData
 void SQLOutput.writeObject(SQLData x)
Writes to the stream the data contained in the given SQLData object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.SQLInput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.SQLInput

Packages that use SQLInput
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of SQLInput in java.sql

Methods in java.sql with parameters of type SQLInput
 void SQLData.readSQL(SQLInput stream, String typeName)
Populates this object with data read from the database.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.SQLOutput

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.SQLOutput

Packages that use SQLOutput
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of SQLOutput in java.sql

Methods in java.sql with parameters of type SQLOutput
 void SQLData.writeSQL(SQLOutput stream)
Writes this object to the given SQL data stream, converting it back to its SQL value in the data source.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Statement

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Statement

Packages that use Statement
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Statement in java.sql

Subinterfaces of Statement in java.sql
interface | CallableStatement The interface used to execute SQL stored procedures.
interface | PreparedStatement An object that represents a precompiled SQL statement.

Methods in java.sql that return Statement
Statement | Connection.createStatement() Creates a Statement object for sending SQL statements to the database.
Statement | Connection.createStatement(int resultSetType, int resultSetConcurrency) Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
Statement | ResultSet.getStatement() Returns the Statement object that produced this ResultSet object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.sql.Struct

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.sql.Struct

Packages that use Struct
java.sql Provides the API for accessing and processing data in a data source using the JavaTM programming language.

Uses of Struct in java.sql

Methods in java.sql with parameters of type Struct
 void SQLOutput.writeStruct(Struct x)
Writes an SQL structured type value to the stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Clob

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Clob

public interface Clob

The mapping in the JavaTM programming language for the SQL CLOB type. An SQL CLOB is a built-in type that stores a Character Large Object as a column value in a row of a database table. The driver implements a Clob object using an SQL locator(CLOB), which means that a Clob object contains a logical pointer to the SQL CLOB data rather than the data itself. A Clob object is valid for the duration of the transaction in which it was created.

The Clob interface provides methods for getting the length of an SQL CLOB (Character Large Object) value, for materializing a CLOB value on the client, and for searching for a substring or CLOB object within a CLOB value. Methods in the interfaces ResultSet, CallableStatement, and PreparedStatement, such as getClob and setClob allow a programmer to access an SQL CLOB value.

This class is new in the JDBC 2.0 API.

Method Summary
InputStream | getAsciiStream() Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
Reader | getCharacterStream() Gets the CLOB value designated by this Clob object as a Unicode stream.
String | getSubString(long pos, int length) Returns a copy of the specified substring in the CLOB value designated by this Clob object.
long | length() Returns the number of characters in the CLOB value designated by this Clob object.
long | position(Clob searchstr, long start) Determines the character position at which the specified Clob object searchstr appears in this Clob object.
long | position(String searchstr, long start) Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object.

Method Detail

length

public long length()
            throws SQLException
Returns the number of characters in the CLOB value designated by this Clob object.
Returns:
length of the CLOB in characters
Throws:
SQLException - if there is an error accessing the length of the CLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getSubString

public String getSubString(long pos,
                           int length)
                    throws SQLException
Returns a copy of the specified substring in the CLOB value designated by this Clob object. The substring begins at position pos and has up to length consecutive characters.
Parameters:
pos - the first character of the substring to be extracted. The first character is at position 1.
length - the number of consecutive characters to be copied
Returns:
a String that is the specified substring in the CLOB value designated by this Clob object
Throws:
SQLException - if there is an error accessing the CLOB
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getCharacterStream

public Reader getCharacterStream()
                          throws SQLException
Gets the CLOB value designated by this Clob object as a Unicode stream.
Returns:
a Unicode stream containing the CLOB data
Throws:
SQLException - if there is an error accessing the CLOB value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getAsciiStream

public InputStream getAsciiStream()
                           throws SQLException
Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
Returns:
an ascii stream containing the CLOB data
Throws:
SQLException - if there is an error accessing the CLOB value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

position

public long position(String searchstr,
                     long start)
              throws SQLException
Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object. The search begins at position start.
Parameters:
searchstr - the substring for which to search
start - the position at which to begin searching; the first position is 1
Returns:
the position at which the substring appears, else -1; the first position is 1
Throws:
SQLException - if there is an error accessing the CLOB value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

position

public long position(Clob searchstr,
                     long start)
              throws SQLException
Determines the character position at which the specified Clob object searchstr appears in this Clob object. The search begins at position start.
Parameters:
searchstr - the Clob object for which to search
start - the position at which to begin searching; the first position is 1
Returns:
the position at which the Clob object appears, else -1; the first position is 1
Throws:
SQLException - if there is an error accessing the CLOB value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Connection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Connection

public interface Connection

A connection (session) with a specific database. Within the context of a Connection, SQL statements are executed and results are returned.

A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.

Note: By default the Connection automatically commits changes after executing each statement. If auto commit has been disabled, the method commit must be called explicitly; otherwise, database changes will not be saved.

See Also:
DriverManager.getConnection(java.lang.String, java.util.Properties), Statement, ResultSet,

Methods that are new in the JDBC 2.0 API are tagged @since 1.2.

Field Summary
static int | TRANSACTION_NONE Indicates that transactions are not supported.
static int | TRANSACTION_READ_COMMITTED Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
static int | TRANSACTION_READ_UNCOMMITTED Dirty reads, non-repeatable reads and phantom reads can occur.
static int | TRANSACTION_REPEATABLE_READ Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
static int | TRANSACTION_SERIALIZABLE Dirty reads, non-repeatable reads and phantom reads are prevented.
Method Summary
void | clearWarnings() Clears all warnings reported for this Connection object.
void | close() Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.
void | commit() Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
Statement | createStatement() Creates a Statement object for sending SQL statements to the database.
Statement | createStatement(int resultSetType, int resultSetConcurrency) Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
boolean | getAutoCommit() Gets the current auto-commit state.
String | getCatalog() Returns the Connection's current catalog name.
DatabaseMetaData | getMetaData() Gets the metadata regarding this connection's database.
int | getTransactionIsolation() Gets this Connection's current transaction isolation level.
Map | getTypeMap() Gets the type map object associated with this connection.
SQLWarning | getWarnings() Returns the first warning reported by calls on this Connection.
boolean | isClosed() Tests to see if a Connection is closed.
boolean | isReadOnly() Tests to see if the connection is in read-only mode.
String | nativeSQL(String sql) Converts the given SQL statement into the system's native SQL grammar.
CallableStatement | prepareCall(String sql) Creates a CallableStatement object for calling database stored procedures.
CallableStatement | prepareCall(String sql, int resultSetType, int resultSetConcurrency) Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatement | prepareStatement(String sql) Creates a PreparedStatement object for sending parameterized SQL statements to the database.
PreparedStatement | prepareStatement(String sql, int resultSetType, int resultSetConcurrency) Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
void | rollback() Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection.
void | setAutoCommit(boolean autoCommit) Sets this connection's auto-commit mode.
void | setCatalog(String catalog) Sets a catalog name in order to select a subspace of this Connection's database in which to work.
void | setReadOnly(boolean readOnly) Puts this connection in read-only mode as a hint to enable database optimizations.
void | setTransactionIsolation(int level) Attempts to change the transaction isolation level to the one given.
void | setTypeMap(Map map) Installs the given type map as the type map for this connection.

Field Detail

TRANSACTION_NONE

public static final int TRANSACTION_NONE
Indicates that transactions are not supported.

TRANSACTION_READ_UNCOMMITTED

public static final int TRANSACTION_READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads can occur. This level allows a row changed by one transaction to be read by another transaction before any changes in that row have been committed (a "dirty read"). If any of the changes are rolled back, the second transaction will have retrieved an invalid row.

TRANSACTION_READ_COMMITTED

public static final int TRANSACTION_READ_COMMITTED
Dirty reads are prevented; non-repeatable reads and phantom reads can occur. This level only prohibits a transaction from reading a row with uncommitted changes in it.

TRANSACTION_REPEATABLE_READ

public static final int TRANSACTION_REPEATABLE_READ
Dirty reads and non-repeatable reads are prevented; phantom reads can occur. This level prohibits a transaction from reading a row with uncommitted changes in it, and it also prohibits the situation where one transaction reads a row, a second transaction alters the row, and the first transaction rereads the row, getting different values the second time (a "non-repeatable read").

TRANSACTION_SERIALIZABLE

public static final int TRANSACTION_SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are prevented. This level includes the prohibitions in TRANSACTION_REPEATABLE_READ and further prohibits the situation where one transaction reads all rows that satisfy a WHERE condition, a second transaction inserts a row that satisfies that WHERE condition, and the first transaction rereads for the same condition, retrieving the additional "phantom" row in the second read.
Method Detail

createStatement

public Statement createStatement()
                          throws SQLException
Creates a Statement object for sending SQL statements to the database. SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it is more efficient to use a PreparedStatement object.

Result sets created using the returned Statement object will by default have forward-only type and read-only concurrency.

Returns:
a new Statement object
Throws:
SQLException - if a database access error occurs

prepareStatement

public PreparedStatement prepareStatement(String sql)
                                   throws SQLException
Creates a PreparedStatement object for sending parameterized SQL statements to the database. A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. This has no direct effect on users; however, it does affect which method throws certain SQLExceptions. Result sets created using the returned PreparedStatement will have forward-only type and read-only concurrency, by default.

Parameters:
sql - a SQL statement that may contain one or more '?' IN parameter placeholders
Returns:
a new PreparedStatement object containing the pre-compiled statement
Throws:
SQLException - if a database access error occurs

prepareCall

public CallableStatement prepareCall(String sql)
                              throws SQLException
Creates a CallableStatement object for calling database stored procedures. The CallableStatement object provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure.

Note: This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done; others may wait until the CallableStatement object is executed. This has no direct effect on users; however, it does affect which method throws certain SQLExceptions. Result sets created using the returned CallableStatement will have forward-only type and read-only concurrency, by default.

Parameters:
sql - a SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is a JDBC function call escape string.
Returns:
a new CallableStatement object containing the pre-compiled SQL statement
Throws:
SQLException - if a database access error occurs

nativeSQL

public String nativeSQL(String sql)
                 throws SQLException
Converts the given SQL statement into the system's native SQL grammar. A driver may convert the JDBC sql grammar into its system's native SQL grammar prior to sending it; this method returns the native form of the statement that the driver would have sent.
Parameters:
sql - a SQL statement that may contain one or more '?' parameter placeholders
Returns:
the native form of this statement
Throws:
SQLException - if a database access error occurs

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws SQLException
Sets this connection's auto-commit mode. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode. The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. In these cases the commit occurs when all results and output parameter values have been retrieved.
Parameters:
autoCommit - true enables auto-commit; false disables auto-commit.
Throws:
SQLException - if a database access error occurs

getAutoCommit

public boolean getAutoCommit()
                      throws SQLException
Gets the current auto-commit state.
Returns:
the current state of auto-commit mode
Throws:
SQLException - if a database access error occurs
See Also:
setAutoCommit(boolean)

commit

public void commit()
            throws SQLException
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. This method should be used only when auto-commit mode has been disabled.
Throws:
SQLException - if a database access error occurs
See Also:
setAutoCommit(boolean)

rollback

public void rollback()
              throws SQLException
Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection. This method should be used only when auto- commit has been disabled.
Throws:
SQLException - if a database access error occurs
See Also:
setAutoCommit(boolean)

close

public void close()
           throws SQLException
Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released.

Note: A Connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed Connection.

Throws:
SQLException - if a database access error occurs

isClosed

public boolean isClosed()
                 throws SQLException
Tests to see if a Connection is closed.
Returns:
true if the connection is closed; false if it's still open
Throws:
SQLException - if a database access error occurs

getMetaData

public DatabaseMetaData getMetaData()
                             throws SQLException
Gets the metadata regarding this connection's database. A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object.
Returns:
a DatabaseMetaData object for this Connection
Throws:
SQLException - if a database access error occurs

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws SQLException
Puts this connection in read-only mode as a hint to enable database optimizations.

Note: This method cannot be called while in the middle of a transaction.

Parameters:
readOnly - true enables read-only mode; false disables read-only mode.
Throws:
SQLException - if a database access error occurs

isReadOnly

public boolean isReadOnly()
                   throws SQLException
Tests to see if the connection is in read-only mode.
Returns:
true if connection is read-only and false otherwise
Throws:
SQLException - if a database access error occurs

setCatalog

public void setCatalog(String catalog)
                throws SQLException
Sets a catalog name in order to select a subspace of this Connection's database in which to work. If the driver does not support catalogs, it will silently ignore this request.
Throws:
SQLException - if a database access error occurs

getCatalog

public String getCatalog()
                  throws SQLException
Returns the Connection's current catalog name.
Returns:
the current catalog name or null
Throws:
SQLException - if a database access error occurs

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws SQLException
Attempts to change the transaction isolation level to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

Note: This method cannot be called while in the middle of a transaction.

Parameters:
level - one of the TRANSACTION_* isolation values with the exception of TRANSACTION_NONE; some databases may not support other values
Throws:
SQLException - if a database access error occurs
See Also:
DatabaseMetaData.supportsTransactionIsolationLevel(int)

getTransactionIsolation

public int getTransactionIsolation()
                            throws SQLException
Gets this Connection's current transaction isolation level.
Returns:
the current TRANSACTION_* mode value
Throws:
SQLException - if a database access error occurs

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
Returns the first warning reported by calls on this Connection.

Note: Subsequent warnings will be chained to this SQLWarning.

Returns:
the first SQLWarning or null
Throws:
SQLException - if a database access error occurs

clearWarnings

public void clearWarnings()
                   throws SQLException
Clears all warnings reported for this Connection object. After a call to this method, the method getWarnings returns null until a new warning is reported for this Connection.
Throws:
SQLException - if a database access error occurs

createStatement

public Statement createStatement(int resultSetType,
                                 int resultSetConcurrency)
                          throws SQLException
Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
a new Statement object
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int resultSetType,
                                          int resultSetConcurrency)
                                   throws SQLException
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareStatement method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
a new PreparedStatement object containing the pre-compiled SQL statement
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

prepareCall

public CallableStatement prepareCall(String sql,
                                     int resultSetType,
                                     int resultSetConcurrency)
                              throws SQLException
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
a new CallableStatement object containing the pre-compiled SQL statement
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getTypeMap

public Map getTypeMap()
               throws SQLException
Gets the type map object associated with this connection. Unless the application has added an entry to the type map, the map returned will be empty.
Returns:
the java.util.Map object associated with this Connection object
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setTypeMap

public void setTypeMap(Map map)
                throws SQLException
Installs the given type map as the type map for this connection. The type map will be used for the custom mapping of SQL structured types and distinct types.
Parameters:
the - java.util.Map object to install as the replacement for this Connection object's default type map
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DatabaseMetaData

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface DatabaseMetaData

public interface DatabaseMetaData

Comprehensive information about the database as a whole.

Many of the methods here return lists of information in the form of ResultSet objects. You can use the normal ResultSet methods such as getString and getInt to retrieve the data from these ResultSet. If a given form of metadata is not available, these methods should throw an SQLException.

Some of these methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to a null ref, that argument's criteria will be dropped from the search.

An SQLException will be thrown if a driver does not support a meta data method. In the case of methods that return a ResultSet, either a ResultSet (which may be empty) is returned or a SQLException is thrown.

Field Summary
static int | bestRowNotPseudo Indicates that the best row identifier is NOT a pseudo column.
static int | bestRowPseudo Indicates that the best row identifier is a pseudo column.
static int | bestRowSession Indicates that the scope of the best row identifier is the remainder of the current session.
static int | bestRowTemporary Indicates that the scope of the best row identifier is very temporary, lasting only while the row is being used.
static int | bestRowTransaction Indicates that the scope of the best row identifier is the remainder of the current transaction.
static int | bestRowUnknown Indicates that the best row identifier may or may not be a pseudo column.
static int | columnNoNulls Indicates that the column might not allow NULL values.
static int | columnNullable Indicates that the column definitely allows NULL values.
static int | columnNullableUnknown Indicates that the nullability of columns is unknown.
static int | importedKeyCascade A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeyInitiallyDeferred A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeyInitiallyImmediate A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeyNoAction A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeyNotDeferrable A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeyRestrict A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeySetDefault A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | importedKeySetNull A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.
static int | procedureColumnIn Indicates that the column stores IN parameters.
static int | procedureColumnInOut Indicates that the column stores INOUT parameters.
static int | procedureColumnOut Indicates that the column stores OUT parameters.
static int | procedureColumnResult Indicates that the column stores results.
static int | procedureColumnReturn Indicates that the column stores return values.
static int | procedureColumnUnknown Indicates that type of the column is unknown.
static int | procedureNoNulls Indicates that NULL values are not allowed.
static int | procedureNoResult A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
static int | procedureNullable Indicates that NULL values are allowed.
static int | procedureNullableUnknown Indicates that whether NULL values are allowed is unknown.
static int | procedureResultUnknown A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
static int | procedureReturnsResult A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.
static short | tableIndexClustered A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
static short | tableIndexHashed A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
static short | tableIndexOther A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
static short | tableIndexStatistic A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.
static int | typeNoNulls A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
static int | typeNullable A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
static int | typeNullableUnknown A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.
static int | typePredBasic A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
static int | typePredChar A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
static int | typePredNone A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
static int | typeSearchable A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.
static int | versionColumnNotPseudo Indicates that this version column is NOT a pseudo column.
static int | versionColumnPseudo Indicates that this version column is a pseudo column.
static int | versionColumnUnknown Indicates that this version column may or may not be a pseudo column.
Method Summary
 boolean allProceduresAreCallable()
Can all the procedures returned by getProcedures be called by the current user?
 boolean allTablesAreSelectable()
Can all the tables returned by getTable be SELECTed by the current user?
 boolean dataDefinitionCausesTransactionCommit()
Does a data definition statement within a transaction force the transaction to commit?
 boolean dataDefinitionIgnoredInTransactions()
Is a data definition statement within a transaction ignored?
 boolean deletesAreDetected(int type)
Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted().
 boolean doesMaxRowSizeIncludeBlobs()
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
 ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
Gets a description of a table's optimal set of columns that uniquely identifies a row.
 ResultSet getCatalogs()
Gets the catalog names available in this database.
 String getCatalogSeparator()
What's the separator between catalog and table name?
 String getCatalogTerm()
What's the database vendor's preferred term for "catalog"?
 ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)
Gets a description of the access rights for a table's columns.
 ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
Gets a description of table columns available in the specified catalog.
 Connection getConnection()
Retrieves the connection that produced this metadata object.
 ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)
Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
 String getDatabaseProductName()
What's the name of this database product?
 String getDatabaseProductVersion()
What's the version of this database product?
 int getDefaultTransactionIsolation()
What's the database's default transaction isolation level? The values are defined in java.sql.Connection.
 int getDriverMajorVersion()
What's this JDBC driver's major version number?
 int getDriverMinorVersion()
What's this JDBC driver's minor version number?
 String getDriverName()
What's the name of this JDBC driver?
 String getDriverVersion()
What's the version of this JDBC driver?
 ResultSet getExportedKeys(String catalog, String schema, String table)
Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).
 String getExtraNameCharacters()
Gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
 String getIdentifierQuoteString()
What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported.
 ResultSet getImportedKeys(String catalog, String schema, String table)
Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).
 ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)
Gets a description of a table's indices and statistics.
 int getMaxBinaryLiteralLength()
How many hex characters can you have in an inline binary literal?
 int getMaxCatalogNameLength()
What's the maximum length of a catalog name?
 int getMaxCharLiteralLength()
What's the max length for a character literal?
 int getMaxColumnNameLength()
What's the limit on column name length?
 int getMaxColumnsInGroupBy()
What's the maximum number of columns in a "GROUP BY" clause?
 int getMaxColumnsInIndex()
What's the maximum number of columns allowed in an index?
 int getMaxColumnsInOrderBy()
What's the maximum number of columns in an "ORDER BY" clause?
 int getMaxColumnsInSelect()
What's the maximum number of columns in a "SELECT" list?
 int getMaxColumnsInTable()
What's the maximum number of columns in a table?
 int getMaxConnections()
How many active connections can we have at a time to this database?
 int getMaxCursorNameLength()
What's the maximum cursor name length?
 int getMaxIndexLength()
Retrieves the maximum number of bytes for an index, including all of the parts of the index.
 int getMaxProcedureNameLength()
What's the maximum length of a procedure name?
 int getMaxRowSize()
What's the maximum length of a single row?
 int getMaxSchemaNameLength()
What's the maximum length allowed for a schema name?
 int getMaxStatementLength()
What's the maximum length of an SQL statement?
 int getMaxStatements()
How many active statements can we have open at one time to this database?
 int getMaxTableNameLength()
What's the maximum length of a table name?
 int getMaxTablesInSelect()
What's the maximum number of tables in a SELECT statement?
 int getMaxUserNameLength()
What's the maximum length of a user name?
 String getNumericFunctions()
Gets a comma-separated list of math functions.
 ResultSet getPrimaryKeys(String catalog, String schema, String table)
Gets a description of a table's primary key columns.
 ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
Gets a description of a catalog's stored procedure parameters and result columns.
 ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
Gets a description of the stored procedures available in a catalog.
 String getProcedureTerm()
What's the database vendor's preferred term for "procedure"?
 ResultSet getSchemas()
Gets the schema names available in this database.
 String getSchemaTerm()
What's the database vendor's preferred term for "schema"?
 String getSearchStringEscape()
Gets the string that can be used to escape wildcard characters.
 String getSQLKeywords()
Gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords.
 String getStringFunctions()
Gets a comma-separated list of string functions.
 String getSystemFunctions()
Gets a comma-separated list of system functions.
 ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
Gets a description of the access rights for each table available in a catalog.
 ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
Gets a description of tables available in a catalog.
 ResultSet getTableTypes()
Gets the table types available in this database.
 String getTimeDateFunctions()
Gets a comma-separated list of time and date functions.
 ResultSet getTypeInfo()
Gets a description of all the standard SQL types supported by this database.
 ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)
Gets a description of the user-defined types defined in a particular schema.
 String getURL()
What's the url for this database?
 String getUserName()
What's our user name as known to the database?
 ResultSet getVersionColumns(String catalog, String schema, String table)
Gets a description of a table's columns that are automatically updated when any value in a row is updated.
 boolean insertsAreDetected(int type)
Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted().
 boolean isCatalogAtStart()
Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end)
 boolean isReadOnly()
Is the database in read-only mode?
 boolean nullPlusNonNullIsNull()
Are concatenations between NULL and non-NULL values NULL? For SQL-92 compliance, a JDBC technology-enabled driver will return true.
 boolean nullsAreSortedAtEnd()
Are NULL values sorted at the end regardless of sort order?
 boolean nullsAreSortedAtStart()
Are NULL values sorted at the start regardless of sort order?
 boolean nullsAreSortedHigh()
Are NULL values sorted high?
 boolean nullsAreSortedLow()
Are NULL values sorted low?
 boolean othersDeletesAreVisible(int type)
Indicates whether deletes made by others are visible.
 boolean othersInsertsAreVisible(int type)
Indicates whether inserts made by others are visible.
 boolean othersUpdatesAreVisible(int type)
Indicates whether updates made by others are visible.
 boolean ownDeletesAreVisible(int type)
Indicates whether a result set's own deletes are visible.
 boolean ownInsertsAreVisible(int type)
Indicates whether a result set's own inserts are visible.
 boolean ownUpdatesAreVisible(int type)
Indicates whether a result set's own updates are visible.
 boolean storesLowerCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lower case?
 boolean storesLowerCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lower case?
 boolean storesMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case?
 boolean storesMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case?
 boolean storesUpperCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in upper case?
 boolean storesUpperCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in upper case?
 boolean supportsAlterTableWithAddColumn()
Is "ALTER TABLE" with add column supported?
 boolean supportsAlterTableWithDropColumn()
Is "ALTER TABLE" with drop column supported?
 boolean supportsANSI92EntryLevelSQL()
Is the ANSI92 entry level SQL grammar supported? All JDBC CompliantTM drivers must return true.
 boolean supportsANSI92FullSQL()
Is the ANSI92 full SQL grammar supported?
 boolean supportsANSI92IntermediateSQL()
Is the ANSI92 intermediate SQL grammar supported?
 boolean supportsBatchUpdates()
Indicates whether the driver supports batch updates.
 boolean supportsCatalogsInDataManipulation()
Can a catalog name be used in a data manipulation statement?
 boolean supportsCatalogsInIndexDefinitions()
Can a catalog name be used in an index definition statement?
 boolean supportsCatalogsInPrivilegeDefinitions()
Can a catalog name be used in a privilege definition statement?
 boolean supportsCatalogsInProcedureCalls()
Can a catalog name be used in a procedure call statement?
 boolean supportsCatalogsInTableDefinitions()
Can a catalog name be used in a table definition statement?
 boolean supportsColumnAliasing()
Is column aliasing supported?
 boolean supportsConvert()
Is the CONVERT function between SQL types supported?
 boolean supportsConvert(int fromType, int toType)
Is CONVERT between the given SQL types supported?
 boolean supportsCoreSQLGrammar()
Is the ODBC Core SQL grammar supported?
 boolean supportsCorrelatedSubqueries()
Are correlated subqueries supported? A JDBC CompliantTM driver always returns true.
 boolean supportsDataDefinitionAndDataManipulationTransactions()
Are both data definition and data manipulation statements within a transaction supported?
 boolean supportsDataManipulationTransactionsOnly()
Are only data manipulation statements within a transaction supported?
 boolean supportsDifferentTableCorrelationNames()
If table correlation names are supported, are they restricted to be different from the names of the tables?
 boolean supportsExpressionsInOrderBy()
Are expressions in "ORDER BY" lists supported?
 boolean supportsExtendedSQLGrammar()
Is the ODBC Extended SQL grammar supported?
 boolean supportsFullOuterJoins()
Are full nested outer joins supported?
 boolean supportsGroupBy()
Is some form of "GROUP BY" clause supported?
 boolean supportsGroupByBeyondSelect()
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
 boolean supportsGroupByUnrelated()
Can a "GROUP BY" clause use columns not in the SELECT?
 boolean supportsIntegrityEnhancementFacility()
Is the SQL Integrity Enhancement Facility supported?
 boolean supportsLikeEscapeClause()
Is the escape character in "LIKE" clauses supported? A JDBC CompliantTM driver always returns true.
 boolean supportsLimitedOuterJoins()
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
 boolean supportsMinimumSQLGrammar()
Is the ODBC Minimum SQL grammar supported? All JDBC CompliantTM drivers must return true.
 boolean supportsMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return false.
 boolean supportsMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return true.
 boolean supportsMultipleResultSets()
Are multiple ResultSet from a single execute supported?
 boolean supportsMultipleTransactions()
Can we have multiple transactions open at once (on different connections)?
 boolean supportsNonNullableColumns()
Can columns be defined as non-nullable? A JDBC CompliantTM driver always returns true.
 boolean supportsOpenCursorsAcrossCommit()
Can cursors remain open across commits?
 boolean supportsOpenCursorsAcrossRollback()
Can cursors remain open across rollbacks?
 boolean supportsOpenStatementsAcrossCommit()
Can statements remain open across commits?
 boolean supportsOpenStatementsAcrossRollback()
Can statements remain open across rollbacks?
 boolean supportsOrderByUnrelated()
Can an "ORDER BY" clause use columns not in the SELECT statement?
 boolean supportsOuterJoins()
Is some form of outer join supported?
 boolean supportsPositionedDelete()
Is positioned DELETE supported?
 boolean supportsPositionedUpdate()
Is positioned UPDATE supported?
 boolean supportsResultSetConcurrency(int type, int concurrency)
Does the database support the concurrency type in combination with the given result set type?
 boolean supportsResultSetType(int type)
Does the database support the given result set type?
 boolean supportsSchemasInDataManipulation()
Can a schema name be used in a data manipulation statement?
 boolean supportsSchemasInIndexDefinitions()
Can a schema name be used in an index definition statement?
 boolean supportsSchemasInPrivilegeDefinitions()
Can a schema name be used in a privilege definition statement?
 boolean supportsSchemasInProcedureCalls()
Can a schema name be used in a procedure call statement?
 boolean supportsSchemasInTableDefinitions()
Can a schema name be used in a table definition statement?
 boolean supportsSelectForUpdate()
Is SELECT for UPDATE supported?
 boolean supportsStoredProcedures()
Are stored procedure calls using the stored procedure escape syntax supported?
 boolean supportsSubqueriesInComparisons()
Are subqueries in comparison expressions supported? A JDBC CompliantTM driver always returns true.
 boolean supportsSubqueriesInExists()
Are subqueries in 'exists' expressions supported? A JDBC CompliantTM driver always returns true.
 boolean supportsSubqueriesInIns()
Are subqueries in 'in' statements supported? A JDBC CompliantTM driver always returns true.
 boolean supportsSubqueriesInQuantifieds()
Are subqueries in quantified expressions supported? A JDBC CompliantTM driver always returns true.
 boolean supportsTableCorrelationNames()
Are table correlation names supported? A JDBC CompliantTM driver always returns true.
 boolean supportsTransactionIsolationLevel(int level)
Does this database support the given transaction isolation level?
 boolean supportsTransactions()
Are transactions supported? If not, invoking the method commit is a noop and the isolation level is TRANSACTION_NONE.
 boolean supportsUnion()
Is SQL UNION supported?
 boolean supportsUnionAll()
Is SQL UNION ALL supported?
 boolean updatesAreDetected(int type)
Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
 boolean usesLocalFilePerTable()
Does the database use a file for each table?
 boolean usesLocalFiles()
Does the database store tables in a local file?

Field Detail

procedureResultUnknown

public static final int procedureResultUnknown
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.

Indicates that it is not known whether the procedure returns a result.

procedureNoResult

public static final int procedureNoResult
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.

Indicates that the procedure does not return a result.

procedureReturnsResult

public static final int procedureReturnsResult
A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures.

Indicates that the procedure returns a result.

procedureColumnUnknown

public static final int procedureColumnUnknown
Indicates that type of the column is unknown. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureColumnIn

public static final int procedureColumnIn
Indicates that the column stores IN parameters. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureColumnInOut

public static final int procedureColumnInOut
Indicates that the column stores INOUT parameters. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureColumnOut

public static final int procedureColumnOut
Indicates that the column stores OUT parameters. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureColumnReturn

public static final int procedureColumnReturn
Indicates that the column stores return values. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureColumnResult

public static final int procedureColumnResult
Indicates that the column stores results. A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

procedureNoNulls

public static final int procedureNoNulls
Indicates that NULL values are not allowed. A possible value for the column NULLABLE in the ResultSet returned by the method getProcedureColumns.

procedureNullable

public static final int procedureNullable
Indicates that NULL values are allowed. A possible value for the column NULLABLE in the ResultSet returned by the method getProcedureColumns.

procedureNullableUnknown

public static final int procedureNullableUnknown
Indicates that whether NULL values are allowed is unknown. A possible value for the column NULLABLE in the ResultSet returned by the method getProcedureColumns.

columnNoNulls

public static final int columnNoNulls
Indicates that the column might not allow NULL values. A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

columnNullable

public static final int columnNullable
Indicates that the column definitely allows NULL values. A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

columnNullableUnknown

public static final int columnNullableUnknown
Indicates that the nullability of columns is unknown. A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

bestRowTemporary

public static final int bestRowTemporary
Indicates that the scope of the best row identifier is very temporary, lasting only while the row is being used. A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

bestRowTransaction

public static final int bestRowTransaction
Indicates that the scope of the best row identifier is the remainder of the current transaction. A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

bestRowSession

public static final int bestRowSession
Indicates that the scope of the best row identifier is the remainder of the current session. A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

bestRowUnknown

public static final int bestRowUnknown
Indicates that the best row identifier may or may not be a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

bestRowNotPseudo

public static final int bestRowNotPseudo
Indicates that the best row identifier is NOT a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

bestRowPseudo

public static final int bestRowPseudo
Indicates that the best row identifier is a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

versionColumnUnknown

public static final int versionColumnUnknown
Indicates that this version column may or may not be a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.

versionColumnNotPseudo

public static final int versionColumnNotPseudo
Indicates that this version column is NOT a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.

versionColumnPseudo

public static final int versionColumnPseudo
Indicates that this version column is a pseudo column. A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.

importedKeyCascade

public static final int importedKeyCascade
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

For the column UPDATE_RULE, it indicates that when the primary key is updated, the foreign key (imported key) is changed to agree with it.

For the column DELETE_RULE, it indicates that when the primary key is deleted, rows that imported that key are deleted.

importedKeyRestrict

public static final int importedKeyRestrict
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

For the column UPDATE_RULE, it indicates that a primary key may not be updated if it has been imported by another table as a foreign key.

For the column DELETE_RULE, it indicates that a primary key may not be deleted if it has been imported by another table as a foreign key.

importedKeySetNull

public static final int importedKeySetNull
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

For the columns UPDATE_RULE and DELETE_RULE, it indicates that when the primary key is updated or deleted, the foreign key (imported key) is changed to NULL.

importedKeyNoAction

public static final int importedKeyNoAction
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

For the columns UPDATE_RULE and DELETE_RULE, it indicates that if the primary key has been imported, it cannot be updated or deleted.

importedKeySetDefault

public static final int importedKeySetDefault
A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

For the columns UPDATE_RULE and DELETE_RULE, it indicates that if the primary key is updated or deleted, the foreign key (imported key) is set to the default value.

importedKeyInitiallyDeferred

public static final int importedKeyInitiallyDeferred
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

Indicates deferrability. See SQL-92 for a definition.

importedKeyInitiallyImmediate

public static final int importedKeyInitiallyImmediate
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

Indicates deferrability. See SQL-92 for a definition.

importedKeyNotDeferrable

public static final int importedKeyNotDeferrable
A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys, getExportedKeys, and getCrossReference.

Indicates deferrability. See SQL-92 for a definition.

typeNoNulls

public static final int typeNoNulls
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that a NULL value is NOT allowed for this data type.

typeNullable

public static final int typeNullable
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that a NULL value is allowed for this data type.

typeNullableUnknown

public static final int typeNullableUnknown
A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that it is not known whether a NULL value is allowed for this data type.

typePredNone

public static final int typePredNone
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that WHERE search clauses are not supported for this type.

typePredChar

public static final int typePredChar
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that the only WHERE search clause that can be based on this type is WHERE . . .LIKE.

typePredBasic

public static final int typePredBasic
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that one can base all WHERE search clauses except WHERE . . .LIKE on this data type.

typeSearchable

public static final int typeSearchable
A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Indicates that all WHERE search clauses can be based on this type.

tableIndexStatistic

public static final short tableIndexStatistic
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Indicates that this column contains table statistics that are returned in conjunction with a table's index descriptions.

tableIndexClustered

public static final short tableIndexClustered
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Indicates that this table index is a clustered index.

tableIndexHashed

public static final short tableIndexHashed
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Indicates that this table index is a hashed index.

tableIndexOther

public static final short tableIndexOther
A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Indicates that this table index is not a clustered index, a hashed index, or table statistics; it is something other than these.

Method Detail

allProceduresAreCallable

public boolean allProceduresAreCallable()
                                 throws SQLException
Can all the procedures returned by getProcedures be called by the current user?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

allTablesAreSelectable

public boolean allTablesAreSelectable()
                               throws SQLException
Can all the tables returned by getTable be SELECTed by the current user?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getURL

public String getURL()
              throws SQLException
What's the url for this database?
Returns:
the url or null if it cannot be generated
Throws:
SQLException - if a database access error occurs

getUserName

public String getUserName()
                   throws SQLException
What's our user name as known to the database?
Returns:
our database user name
Throws:
SQLException - if a database access error occurs

isReadOnly

public boolean isReadOnly()
                   throws SQLException
Is the database in read-only mode?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

nullsAreSortedHigh

public boolean nullsAreSortedHigh()
                           throws SQLException
Are NULL values sorted high?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

nullsAreSortedLow

public boolean nullsAreSortedLow()
                          throws SQLException
Are NULL values sorted low?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

nullsAreSortedAtStart

public boolean nullsAreSortedAtStart()
                              throws SQLException
Are NULL values sorted at the start regardless of sort order?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

nullsAreSortedAtEnd

public boolean nullsAreSortedAtEnd()
                            throws SQLException
Are NULL values sorted at the end regardless of sort order?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getDatabaseProductName

public String getDatabaseProductName()
                              throws SQLException
What's the name of this database product?
Returns:
database product name
Throws:
SQLException - if a database access error occurs

getDatabaseProductVersion

public String getDatabaseProductVersion()
                                 throws SQLException
What's the version of this database product?
Returns:
database version
Throws:
SQLException - if a database access error occurs

getDriverName

public String getDriverName()
                     throws SQLException
What's the name of this JDBC driver?
Returns:
JDBC driver name
Throws:
SQLException - if a database access error occurs

getDriverVersion

public String getDriverVersion()
                        throws SQLException
What's the version of this JDBC driver?
Returns:
JDBC driver version
Throws:
SQLException - if a database access error occurs

getDriverMajorVersion

public int getDriverMajorVersion()
What's this JDBC driver's major version number?
Returns:
JDBC driver major version

getDriverMinorVersion

public int getDriverMinorVersion()
What's this JDBC driver's minor version number?
Returns:
JDBC driver minor version number

usesLocalFiles

public boolean usesLocalFiles()
                       throws SQLException
Does the database store tables in a local file?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

usesLocalFilePerTable

public boolean usesLocalFilePerTable()
                              throws SQLException
Does the database use a file for each table?
Returns:
true if the database uses a local file for each table
Throws:
SQLException - if a database access error occurs

supportsMixedCaseIdentifiers

public boolean supportsMixedCaseIdentifiers()
                                     throws SQLException
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return false.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesUpperCaseIdentifiers

public boolean storesUpperCaseIdentifiers()
                                   throws SQLException
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in upper case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesLowerCaseIdentifiers

public boolean storesLowerCaseIdentifiers()
                                   throws SQLException
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lower case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesMixedCaseIdentifiers

public boolean storesMixedCaseIdentifiers()
                                   throws SQLException
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsMixedCaseQuotedIdentifiers

public boolean supportsMixedCaseQuotedIdentifiers()
                                           throws SQLException
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC CompliantTM driver will always return true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesUpperCaseQuotedIdentifiers

public boolean storesUpperCaseQuotedIdentifiers()
                                         throws SQLException
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in upper case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesLowerCaseQuotedIdentifiers

public boolean storesLowerCaseQuotedIdentifiers()
                                         throws SQLException
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lower case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

storesMixedCaseQuotedIdentifiers

public boolean storesMixedCaseQuotedIdentifiers()
                                         throws SQLException
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getIdentifierQuoteString

public String getIdentifierQuoteString()
                                throws SQLException
What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported. A JDBC CompliantTM driver always uses a double quote character.
Returns:
the quoting string
Throws:
SQLException - if a database access error occurs

getSQLKeywords

public String getSQLKeywords()
                      throws SQLException
Gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords.
Returns:
the list
Throws:
SQLException - if a database access error occurs

getNumericFunctions

public String getNumericFunctions()
                           throws SQLException
Gets a comma-separated list of math functions. These are the X/Open CLI math function names used in the JDBC function escape clause.
Returns:
the list
Throws:
SQLException - if a database access error occurs

getStringFunctions

public String getStringFunctions()
                          throws SQLException
Gets a comma-separated list of string functions. These are the X/Open CLI string function names used in the JDBC function escape clause.
Returns:
the list
Throws:
SQLException - if a database access error occurs

getSystemFunctions

public String getSystemFunctions()
                          throws SQLException
Gets a comma-separated list of system functions. These are the X/Open CLI system function names used in the JDBC function escape clause.
Returns:
the list
Throws:
SQLException - if a database access error occurs

getTimeDateFunctions

public String getTimeDateFunctions()
                            throws SQLException
Gets a comma-separated list of time and date functions.
Returns:
the list
Throws:
SQLException - if a database access error occurs

getSearchStringEscape

public String getSearchStringEscape()
                             throws SQLException
Gets the string that can be used to escape wildcard characters. This is the string that can be used to escape '_' or '%' in the string pattern style catalog search parameters.

The '_' character represents any single character.

The '%' character represents any sequence of zero or more characters.

Returns:
the string used to escape wildcard characters
Throws:
SQLException - if a database access error occurs

getExtraNameCharacters

public String getExtraNameCharacters()
                              throws SQLException
Gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
Returns:
the string containing the extra characters
Throws:
SQLException - if a database access error occurs

supportsAlterTableWithAddColumn

public boolean supportsAlterTableWithAddColumn()
                                        throws SQLException
Is "ALTER TABLE" with add column supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsAlterTableWithDropColumn

public boolean supportsAlterTableWithDropColumn()
                                         throws SQLException
Is "ALTER TABLE" with drop column supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsColumnAliasing

public boolean supportsColumnAliasing()
                               throws SQLException
Is column aliasing supported?

If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required. A JDBC CompliantTM driver always returns true.

Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

nullPlusNonNullIsNull

public boolean nullPlusNonNullIsNull()
                              throws SQLException
Are concatenations between NULL and non-NULL values NULL? For SQL-92 compliance, a JDBC technology-enabled driver will return true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsConvert

public boolean supportsConvert()
                        throws SQLException
Is the CONVERT function between SQL types supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsConvert

public boolean supportsConvert(int fromType,
                               int toType)
                        throws SQLException
Is CONVERT between the given SQL types supported?
Parameters:
fromType - the type to convert from
toType - the type to convert to
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
See Also:
Types

supportsTableCorrelationNames

public boolean supportsTableCorrelationNames()
                                      throws SQLException
Are table correlation names supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsDifferentTableCorrelationNames

public boolean supportsDifferentTableCorrelationNames()
                                               throws SQLException
If table correlation names are supported, are they restricted to be different from the names of the tables?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsExpressionsInOrderBy

public boolean supportsExpressionsInOrderBy()
                                     throws SQLException
Are expressions in "ORDER BY" lists supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsOrderByUnrelated

public boolean supportsOrderByUnrelated()
                                 throws SQLException
Can an "ORDER BY" clause use columns not in the SELECT statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsGroupBy

public boolean supportsGroupBy()
                        throws SQLException
Is some form of "GROUP BY" clause supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsGroupByUnrelated

public boolean supportsGroupByUnrelated()
                                 throws SQLException
Can a "GROUP BY" clause use columns not in the SELECT?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsGroupByBeyondSelect

public boolean supportsGroupByBeyondSelect()
                                    throws SQLException
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsLikeEscapeClause

public boolean supportsLikeEscapeClause()
                                 throws SQLException
Is the escape character in "LIKE" clauses supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsMultipleResultSets

public boolean supportsMultipleResultSets()
                                   throws SQLException
Are multiple ResultSet from a single execute supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsMultipleTransactions

public boolean supportsMultipleTransactions()
                                     throws SQLException
Can we have multiple transactions open at once (on different connections)?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsNonNullableColumns

public boolean supportsNonNullableColumns()
                                   throws SQLException
Can columns be defined as non-nullable? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsMinimumSQLGrammar

public boolean supportsMinimumSQLGrammar()
                                  throws SQLException
Is the ODBC Minimum SQL grammar supported? All JDBC CompliantTM drivers must return true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCoreSQLGrammar

public boolean supportsCoreSQLGrammar()
                               throws SQLException
Is the ODBC Core SQL grammar supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsExtendedSQLGrammar

public boolean supportsExtendedSQLGrammar()
                                   throws SQLException
Is the ODBC Extended SQL grammar supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsANSI92EntryLevelSQL

public boolean supportsANSI92EntryLevelSQL()
                                    throws SQLException
Is the ANSI92 entry level SQL grammar supported? All JDBC CompliantTM drivers must return true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsANSI92IntermediateSQL

public boolean supportsANSI92IntermediateSQL()
                                      throws SQLException
Is the ANSI92 intermediate SQL grammar supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsANSI92FullSQL

public boolean supportsANSI92FullSQL()
                              throws SQLException
Is the ANSI92 full SQL grammar supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsIntegrityEnhancementFacility

public boolean supportsIntegrityEnhancementFacility()
                                             throws SQLException
Is the SQL Integrity Enhancement Facility supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsOuterJoins

public boolean supportsOuterJoins()
                           throws SQLException
Is some form of outer join supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsFullOuterJoins

public boolean supportsFullOuterJoins()
                               throws SQLException
Are full nested outer joins supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsLimitedOuterJoins

public boolean supportsLimitedOuterJoins()
                                  throws SQLException
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getSchemaTerm

public String getSchemaTerm()
                     throws SQLException
What's the database vendor's preferred term for "schema"?
Returns:
the vendor term
Throws:
SQLException - if a database access error occurs

getProcedureTerm

public String getProcedureTerm()
                        throws SQLException
What's the database vendor's preferred term for "procedure"?
Returns:
the vendor term
Throws:
SQLException - if a database access error occurs

getCatalogTerm

public String getCatalogTerm()
                      throws SQLException
What's the database vendor's preferred term for "catalog"?
Returns:
the vendor term
Throws:
SQLException - if a database access error occurs

isCatalogAtStart

public boolean isCatalogAtStart()
                         throws SQLException
Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end)
Returns:
true if it appears at the start
Throws:
SQLException - if a database access error occurs

getCatalogSeparator

public String getCatalogSeparator()
                           throws SQLException
What's the separator between catalog and table name?
Returns:
the separator string
Throws:
SQLException - if a database access error occurs

supportsSchemasInDataManipulation

public boolean supportsSchemasInDataManipulation()
                                          throws SQLException
Can a schema name be used in a data manipulation statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSchemasInProcedureCalls

public boolean supportsSchemasInProcedureCalls()
                                        throws SQLException
Can a schema name be used in a procedure call statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSchemasInTableDefinitions

public boolean supportsSchemasInTableDefinitions()
                                          throws SQLException
Can a schema name be used in a table definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSchemasInIndexDefinitions

public boolean supportsSchemasInIndexDefinitions()
                                          throws SQLException
Can a schema name be used in an index definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSchemasInPrivilegeDefinitions

public boolean supportsSchemasInPrivilegeDefinitions()
                                              throws SQLException
Can a schema name be used in a privilege definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCatalogsInDataManipulation

public boolean supportsCatalogsInDataManipulation()
                                           throws SQLException
Can a catalog name be used in a data manipulation statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCatalogsInProcedureCalls

public boolean supportsCatalogsInProcedureCalls()
                                         throws SQLException
Can a catalog name be used in a procedure call statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCatalogsInTableDefinitions

public boolean supportsCatalogsInTableDefinitions()
                                           throws SQLException
Can a catalog name be used in a table definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCatalogsInIndexDefinitions

public boolean supportsCatalogsInIndexDefinitions()
                                           throws SQLException
Can a catalog name be used in an index definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCatalogsInPrivilegeDefinitions

public boolean supportsCatalogsInPrivilegeDefinitions()
                                               throws SQLException
Can a catalog name be used in a privilege definition statement?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsPositionedDelete

public boolean supportsPositionedDelete()
                                 throws SQLException
Is positioned DELETE supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsPositionedUpdate

public boolean supportsPositionedUpdate()
                                 throws SQLException
Is positioned UPDATE supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSelectForUpdate

public boolean supportsSelectForUpdate()
                                throws SQLException
Is SELECT for UPDATE supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsStoredProcedures

public boolean supportsStoredProcedures()
                                 throws SQLException
Are stored procedure calls using the stored procedure escape syntax supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSubqueriesInComparisons

public boolean supportsSubqueriesInComparisons()
                                        throws SQLException
Are subqueries in comparison expressions supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSubqueriesInExists

public boolean supportsSubqueriesInExists()
                                   throws SQLException
Are subqueries in 'exists' expressions supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSubqueriesInIns

public boolean supportsSubqueriesInIns()
                                throws SQLException
Are subqueries in 'in' statements supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsSubqueriesInQuantifieds

public boolean supportsSubqueriesInQuantifieds()
                                        throws SQLException
Are subqueries in quantified expressions supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsCorrelatedSubqueries

public boolean supportsCorrelatedSubqueries()
                                     throws SQLException
Are correlated subqueries supported? A JDBC CompliantTM driver always returns true.
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsUnion

public boolean supportsUnion()
                      throws SQLException
Is SQL UNION supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsUnionAll

public boolean supportsUnionAll()
                         throws SQLException
Is SQL UNION ALL supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsOpenCursorsAcrossCommit

public boolean supportsOpenCursorsAcrossCommit()
                                        throws SQLException
Can cursors remain open across commits?
Returns:
true if cursors always remain open; false if they might not remain open
Throws:
SQLException - if a database access error occurs

supportsOpenCursorsAcrossRollback

public boolean supportsOpenCursorsAcrossRollback()
                                          throws SQLException
Can cursors remain open across rollbacks?
Returns:
true if cursors always remain open; false if they might not remain open
Throws:
SQLException - if a database access error occurs

supportsOpenStatementsAcrossCommit

public boolean supportsOpenStatementsAcrossCommit()
                                           throws SQLException
Can statements remain open across commits?
Returns:
true if statements always remain open; false if they might not remain open
Throws:
SQLException - if a database access error occurs

supportsOpenStatementsAcrossRollback

public boolean supportsOpenStatementsAcrossRollback()
                                             throws SQLException
Can statements remain open across rollbacks?
Returns:
true if statements always remain open; false if they might not remain open
Throws:
SQLException - if a database access error occurs

getMaxBinaryLiteralLength

public int getMaxBinaryLiteralLength()
                              throws SQLException
How many hex characters can you have in an inline binary literal?
Returns:
max binary literal length in hex characters; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxCharLiteralLength

public int getMaxCharLiteralLength()
                            throws SQLException
What's the max length for a character literal?
Returns:
max literal length; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnNameLength

public int getMaxColumnNameLength()
                           throws SQLException
What's the limit on column name length?
Returns:
max column name length; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnsInGroupBy

public int getMaxColumnsInGroupBy()
                           throws SQLException
What's the maximum number of columns in a "GROUP BY" clause?
Returns:
max number of columns; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnsInIndex

public int getMaxColumnsInIndex()
                         throws SQLException
What's the maximum number of columns allowed in an index?
Returns:
max number of columns; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnsInOrderBy

public int getMaxColumnsInOrderBy()
                           throws SQLException
What's the maximum number of columns in an "ORDER BY" clause?
Returns:
max number of columns; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnsInSelect

public int getMaxColumnsInSelect()
                          throws SQLException
What's the maximum number of columns in a "SELECT" list?
Returns:
max number of columns; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxColumnsInTable

public int getMaxColumnsInTable()
                         throws SQLException
What's the maximum number of columns in a table?
Returns:
max number of columns; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxConnections

public int getMaxConnections()
                      throws SQLException
How many active connections can we have at a time to this database?
Returns:
max number of active connections; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxCursorNameLength

public int getMaxCursorNameLength()
                           throws SQLException
What's the maximum cursor name length?
Returns:
max cursor name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxIndexLength

public int getMaxIndexLength()
                      throws SQLException
Retrieves the maximum number of bytes for an index, including all of the parts of the index.
Returns:
max index length in bytes, which includes the composite of all the constituent parts of the index; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxSchemaNameLength

public int getMaxSchemaNameLength()
                           throws SQLException
What's the maximum length allowed for a schema name?
Returns:
max name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxProcedureNameLength

public int getMaxProcedureNameLength()
                              throws SQLException
What's the maximum length of a procedure name?
Returns:
max name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxCatalogNameLength

public int getMaxCatalogNameLength()
                            throws SQLException
What's the maximum length of a catalog name?
Returns:
max name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxRowSize

public int getMaxRowSize()
                  throws SQLException
What's the maximum length of a single row?
Returns:
max row size in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

doesMaxRowSizeIncludeBlobs

public boolean doesMaxRowSizeIncludeBlobs()
                                   throws SQLException
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getMaxStatementLength

public int getMaxStatementLength()
                          throws SQLException
What's the maximum length of an SQL statement?
Returns:
max length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxStatements

public int getMaxStatements()
                     throws SQLException
How many active statements can we have open at one time to this database?
Returns:
the maximum number of statements that can be open at one time; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxTableNameLength

public int getMaxTableNameLength()
                          throws SQLException
What's the maximum length of a table name?
Returns:
max name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxTablesInSelect

public int getMaxTablesInSelect()
                         throws SQLException
What's the maximum number of tables in a SELECT statement?
Returns:
the maximum number of tables allowed in a SELECT statement; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getMaxUserNameLength

public int getMaxUserNameLength()
                         throws SQLException
What's the maximum length of a user name?
Returns:
max user name length in bytes; a result of zero means that there is no limit or the limit is not known
Throws:
SQLException - if a database access error occurs

getDefaultTransactionIsolation

public int getDefaultTransactionIsolation()
                                   throws SQLException
What's the database's default transaction isolation level? The values are defined in java.sql.Connection.
Returns:
the default isolation level
Throws:
SQLException - if a database access error occurs
See Also:
Connection

supportsTransactions

public boolean supportsTransactions()
                             throws SQLException
Are transactions supported? If not, invoking the method commit is a noop and the isolation level is TRANSACTION_NONE.
Returns:
true if transactions are supported; false otherwise
Throws:
SQLException - if a database access error occurs

supportsTransactionIsolationLevel

public boolean supportsTransactionIsolationLevel(int level)
                                          throws SQLException
Does this database support the given transaction isolation level?
Parameters:
level - the values are defined in java.sql.Connection
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
See Also:
Connection

supportsDataDefinitionAndDataManipulationTransactions

public boolean supportsDataDefinitionAndDataManipulationTransactions()
                                                              throws SQLException
Are both data definition and data manipulation statements within a transaction supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

supportsDataManipulationTransactionsOnly

public boolean supportsDataManipulationTransactionsOnly()
                                                 throws SQLException
Are only data manipulation statements within a transaction supported?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

dataDefinitionCausesTransactionCommit

public boolean dataDefinitionCausesTransactionCommit()
                                              throws SQLException
Does a data definition statement within a transaction force the transaction to commit?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

dataDefinitionIgnoredInTransactions

public boolean dataDefinitionIgnoredInTransactions()
                                            throws SQLException
Is a data definition statement within a transaction ignored?
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getProcedures

public ResultSet getProcedures(String catalog,
                               String schemaPattern,
                               String procedureNamePattern)
                        throws SQLException
Gets a description of the stored procedures available in a catalog.

Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM, and PROCEDURE_NAME.

Each procedure description has the the following columns:

  1. PROCEDURE_CAT String => procedure catalog (may be null)
  2. PROCEDURE_SCHEM String => procedure schema (may be null)
  3. PROCEDURE_NAME String => procedure name
  4. reserved for future use
  5. reserved for future use
  6. reserved for future use
  7. REMARKS String => explanatory comment on the procedure
  8. PROCEDURE_TYPE short => kind of procedure:
    • procedureResultUnknown - May return a result
    • procedureNoResult - Does not return a result
    • procedureReturnsResult - Returns a result
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
procedureNamePattern - a procedure name pattern
Returns:
ResultSet - each row is a procedure description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getProcedureColumns

public ResultSet getProcedureColumns(String catalog,
                                     String schemaPattern,
                                     String procedureNamePattern,
                                     String columnNamePattern)
                              throws SQLException
Gets a description of a catalog's stored procedure parameters and result columns.

Only descriptions matching the schema, procedure and parameter name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the ResultSet is a parameter description or column description with the following fields:

  1. PROCEDURE_CAT String => procedure catalog (may be null)
  2. PROCEDURE_SCHEM String => procedure schema (may be null)
  3. PROCEDURE_NAME String => procedure name
  4. COLUMN_NAME String => column/parameter name
  5. COLUMN_TYPE Short => kind of column/parameter:
    • procedureColumnUnknown - nobody knows
    • procedureColumnIn - IN parameter
    • procedureColumnInOut - INOUT parameter
    • procedureColumnOut - OUT parameter
    • procedureColumnReturn - procedure return value
    • procedureColumnResult - result column in ResultSet
  6. DATA_TYPE short => SQL type from java.sql.Types
  7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale
  11. RADIX short => radix
  12. NULLABLE short => can it contain NULL?
    • procedureNoNulls - does not allow NULL values
    • procedureNullable - allows NULL values
    • procedureNullableUnknown - nullability unknown
  13. REMARKS String => comment describing parameter/column

Note: Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database.

Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
procedureNamePattern - a procedure name pattern
columnNamePattern - a column name pattern
Returns:
ResultSet - each row describes a stored procedure parameter or column
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getTables

public ResultSet getTables(String catalog,
                           String schemaPattern,
                           String tableNamePattern,
                           String[] types)
                    throws SQLException
Gets a description of tables available in a catalog.

Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.

Each table description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  5. REMARKS String => explanatory comment on the table

Note: Some databases may not return information for all tables.

Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
tableNamePattern - a table name pattern
types - a list of table types to include; null returns all types
Returns:
ResultSet - each row is a table description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getSchemas

public ResultSet getSchemas()
                     throws SQLException
Gets the schema names available in this database. The results are ordered by schema name.

The schema column is:

  1. TABLE_SCHEM String => schema name
Returns:
ResultSet - each row has a single String column that is a schema name
Throws:
SQLException - if a database access error occurs

getCatalogs

public ResultSet getCatalogs()
                      throws SQLException
Gets the catalog names available in this database. The results are ordered by catalog name.

The catalog column is:

  1. TABLE_CAT String => catalog name
Returns:
ResultSet - each row has a single String column that is a catalog name
Throws:
SQLException - if a database access error occurs

getTableTypes

public ResultSet getTableTypes()
                        throws SQLException
Gets the table types available in this database. The results are ordered by table type.

The table type is:

  1. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
Returns:
ResultSet - each row has a single String column that is a table type
Throws:
SQLException - if a database access error occurs

getColumns

public ResultSet getColumns(String catalog,
                            String schemaPattern,
                            String tableNamePattern,
                            String columnNamePattern)
                     throws SQLException
Gets a description of table columns available in the specified catalog.

Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.

Each column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. DATA_TYPE short => SQL type from java.sql.Types
  6. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
  7. COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
  8. BUFFER_LENGTH is not used.
  9. DECIMAL_DIGITS int => the number of fractional digits
  10. NUM_PREC_RADIX int => Radix (typically either 10 or 2)
  11. NULLABLE int => is NULL allowed?
    • columnNoNulls - might not allow NULL values
    • columnNullable - definitely allows NULL values
    • columnNullableUnknown - nullability unknown
  12. REMARKS String => comment describing column (may be null)
  13. COLUMN_DEF String => default value (may be null)
  14. SQL_DATA_TYPE int => unused
  15. SQL_DATETIME_SUB int => unused
  16. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
  17. ORDINAL_POSITION int => index of column in table (starting at 1)
  18. IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
tableNamePattern - a table name pattern
columnNamePattern - a column name pattern
Returns:
ResultSet - each row is a column description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getColumnPrivileges

public ResultSet getColumnPrivileges(String catalog,
                                     String schema,
                                     String table,
                                     String columnNamePattern)
                              throws SQLException
Gets a description of the access rights for a table's columns.

Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE.

Each privilige description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. GRANTOR => grantor of access (may be null)
  6. GRANTEE String => grantee of access
  7. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
  8. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
columnNamePattern - a column name pattern
Returns:
ResultSet - each row is a column privilege description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getTablePrivileges

public ResultSet getTablePrivileges(String catalog,
                                    String schemaPattern,
                                    String tableNamePattern)
                             throws SQLException
Gets a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It would be wrong to assume that this priviledge applies to all columns (this may be true for some systems but is not true for all.)

Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.

Each privilige description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. GRANTOR => grantor of access (may be null)
  5. GRANTEE String => grantee of access
  6. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
  7. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
tableNamePattern - a table name pattern
Returns:
ResultSet - each row is a table privilege description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getBestRowIdentifier

public ResultSet getBestRowIdentifier(String catalog,
                                      String schema,
                                      String table,
                                      int scope,
                                      boolean nullable)
                               throws SQLException
Gets a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.

Each column description has the following columns:

  1. SCOPE short => actual scope of result
    • bestRowTemporary - very temporary, while using row
    • bestRowTransaction - valid for remainder of current transaction
    • bestRowSession - valid for remainder of current session
  2. COLUMN_NAME String => column name
  3. DATA_TYPE short => SQL data type from java.sql.Types
  4. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
  5. COLUMN_SIZE int => precision
  6. BUFFER_LENGTH int => not used
  7. DECIMAL_DIGITS short => scale
  8. PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
    • bestRowUnknown - may or may not be pseudo column
    • bestRowNotPseudo - is NOT a pseudo column
    • bestRowPseudo - is a pseudo column
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
scope - the scope of interest; use same values as SCOPE
nullable - include columns that are nullable?
Returns:
ResultSet - each row is a column description
Throws:
SQLException - if a database access error occurs

getVersionColumns

public ResultSet getVersionColumns(String catalog,
                                   String schema,
                                   String table)
                            throws SQLException
Gets a description of a table's columns that are automatically updated when any value in a row is updated. They are unordered.

Each column description has the following columns:

  1. SCOPE short => is not used
  2. COLUMN_NAME String => column name
  3. DATA_TYPE short => SQL data type from java.sql.Types
  4. TYPE_NAME String => Data source dependent type name
  5. COLUMN_SIZE int => precision
  6. BUFFER_LENGTH int => length of column value in bytes
  7. DECIMAL_DIGITS short => scale
  8. PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
    • versionColumnUnknown - may or may not be pseudo column
    • versionColumnNotPseudo - is NOT a pseudo column
    • versionColumnPseudo - is a pseudo column
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
Returns:
ResultSet - each row is a column description
Throws:
SQLException - if a database access error occurs

getPrimaryKeys

public ResultSet getPrimaryKeys(String catalog,
                                String schema,
                                String table)
                         throws SQLException
Gets a description of a table's primary key columns. They are ordered by COLUMN_NAME.

Each primary key column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. KEY_SEQ short => sequence number within primary key
  6. PK_NAME String => primary key name (may be null)
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
Returns:
ResultSet - each row is a primary key column description
Throws:
SQLException - if a database access error occurs

getImportedKeys

public ResultSet getImportedKeys(String catalog,
                                 String schema,
                                 String table)
                          throws SQLException
Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). They are ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.

Each primary key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog being imported (may be null)
  2. PKTABLE_SCHEM String => primary key table schema being imported (may be null)
  3. PKTABLE_NAME String => primary key table name being imported
  4. PKCOLUMN_NAME String => primary key column name being imported
  5. FKTABLE_CAT String => foreign key table catalog (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null)
  7. FKTABLE_NAME String => foreign key table name
  8. FKCOLUMN_NAME String => foreign key column name
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
Returns:
ResultSet - each row is a primary key column description
Throws:
SQLException - if a database access error occurs
See Also:
getExportedKeys(java.lang.String, java.lang.String, java.lang.String)

getExportedKeys

public ResultSet getExportedKeys(String catalog,
                                 String schema,
                                 String table)
                          throws SQLException
Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.

Each foreign key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog (may be null)
  2. PKTABLE_SCHEM String => primary key table schema (may be null)
  3. PKTABLE_NAME String => primary key table name
  4. PKCOLUMN_NAME String => primary key column name
  5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
  7. FKTABLE_NAME String => foreign key table name being exported
  8. FKCOLUMN_NAME String => foreign key column name being exported
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
Returns:
ResultSet - each row is a foreign key column description
Throws:
SQLException - if a database access error occurs
See Also:
getImportedKeys(java.lang.String, java.lang.String, java.lang.String)

getCrossReference

public ResultSet getCrossReference(String primaryCatalog,
                                   String primarySchema,
                                   String primaryTable,
                                   String foreignCatalog,
                                   String foreignSchema,
                                   String foreignTable)
                            throws SQLException
Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.

Each foreign key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog (may be null)
  2. PKTABLE_SCHEM String => primary key table schema (may be null)
  3. PKTABLE_NAME String => primary key table name
  4. PKCOLUMN_NAME String => primary key column name
  5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
  7. FKTABLE_NAME String => foreign key table name being exported
  8. FKCOLUMN_NAME String => foreign key column name being exported
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
Parameters:
primaryCatalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
primarySchema - a schema name; "" retrieves those without a schema
primaryTable - the table name that exports the key
foreignCatalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
foreignSchema - a schema name; "" retrieves those without a schema
foreignTable - the table name that imports the key
Returns:
ResultSet - each row is a foreign key column description
Throws:
SQLException - if a database access error occurs
See Also:
getImportedKeys(java.lang.String, java.lang.String, java.lang.String)

getTypeInfo

public ResultSet getTypeInfo()
                      throws SQLException
Gets a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.

Each type description has the following columns:

  1. TYPE_NAME String => Type name
  2. DATA_TYPE short => SQL data type from java.sql.Types
  3. PRECISION int => maximum precision
  4. LITERAL_PREFIX String => prefix used to quote a literal (may be null)
  5. LITERAL_SUFFIX String => suffix used to quote a literal (may be null)
  6. CREATE_PARAMS String => parameters used in creating the type (may be null)
  7. NULLABLE short => can you use NULL for this type?
    • typeNoNulls - does not allow NULL values
    • typeNullable - allows NULL values
    • typeNullableUnknown - nullability unknown
  8. CASE_SENSITIVE boolean=> is it case sensitive?
  9. SEARCHABLE short => can you use "WHERE" based on this type:
    • typePredNone - No support
    • typePredChar - Only supported with WHERE .. LIKE
    • typePredBasic - Supported except for WHERE .. LIKE
    • typeSearchable - Supported for all WHERE ..
  10. UNSIGNED_ATTRIBUTE boolean => is it unsigned?
  11. FIXED_PREC_SCALE boolean => can it be a money value?
  12. AUTO_INCREMENT boolean => can it be used for an auto-increment value?
  13. LOCAL_TYPE_NAME String => localized version of type name (may be null)
  14. MINIMUM_SCALE short => minimum scale supported
  15. MAXIMUM_SCALE short => maximum scale supported
  16. SQL_DATA_TYPE int => unused
  17. SQL_DATETIME_SUB int => unused
  18. NUM_PREC_RADIX int => usually 2 or 10
Returns:
ResultSet - each row is an SQL type description
Throws:
SQLException - if a database access error occurs

getIndexInfo

public ResultSet getIndexInfo(String catalog,
                              String schema,
                              String table,
                              boolean unique,
                              boolean approximate)
                       throws SQLException
Gets a description of a table's indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.

Each index column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. NON_UNIQUE boolean => Can index values be non-unique? false when TYPE is tableIndexStatistic
  5. INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
  6. INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
  7. TYPE short => index type:
    • tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
    • tableIndexClustered - this is a clustered index
    • tableIndexHashed - this is a hashed index
    • tableIndexOther - this is some other style of index
  8. ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
  9. COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
  10. ASC_OR_DESC String => column sort sequence, "A" => ascending, "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
  11. CARDINALITY int => When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.
  12. PAGES int => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
  13. FILTER_CONDITION String => Filter condition, if any. (may be null)
Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema - a schema name; "" retrieves those without a schema
table - a table name
unique - when true, return only indices for unique values; when false, return indices regardless of whether unique or not
approximate - when true, result is allowed to reflect approximate or out of data values; when false, results are requested to be accurate
Returns:
ResultSet - each row is an index column description
Throws:
SQLException - if a database access error occurs

supportsResultSetType

public boolean supportsResultSetType(int type)
                              throws SQLException
Does the database support the given result set type?
Parameters:
type - defined in java.sql.ResultSet
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
Connection, What Is in the JDBC 2.0 API

supportsResultSetConcurrency

public boolean supportsResultSetConcurrency(int type,
                                            int concurrency)
                                     throws SQLException
Does the database support the concurrency type in combination with the given result set type?
Parameters:
type - defined in java.sql.ResultSet
concurrency - type defined in java.sql.ResultSet
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
Connection, What Is in the JDBC 2.0 API

ownUpdatesAreVisible

public boolean ownUpdatesAreVisible(int type)
                             throws SQLException
Indicates whether a result set's own updates are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if updates are visible for the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

ownDeletesAreVisible

public boolean ownDeletesAreVisible(int type)
                             throws SQLException
Indicates whether a result set's own deletes are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if deletes are visible for the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

ownInsertsAreVisible

public boolean ownInsertsAreVisible(int type)
                             throws SQLException
Indicates whether a result set's own inserts are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if inserts are visible for the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

othersUpdatesAreVisible

public boolean othersUpdatesAreVisible(int type)
                                throws SQLException
Indicates whether updates made by others are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if updates made by others are visible for the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

othersDeletesAreVisible

public boolean othersDeletesAreVisible(int type)
                                throws SQLException
Indicates whether deletes made by others are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if deletes made by others are visible for the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

othersInsertsAreVisible

public boolean othersInsertsAreVisible(int type)
                                throws SQLException
Indicates whether inserts made by others are visible.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if updates are visible for the result set type
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updatesAreDetected

public boolean updatesAreDetected(int type)
                           throws SQLException
Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if changes are detected by the result set type; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

deletesAreDetected

public boolean deletesAreDetected(int type)
                           throws SQLException
Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted(). If deletesAreDetected() returns false, then deleted rows are removed from the result set.
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if changes are detected by the resultset type
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

insertsAreDetected

public boolean insertsAreDetected(int type)
                           throws SQLException
Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted().
Parameters:
result - set type, i.e. ResultSet.TYPE_XXX
Returns:
true if changes are detected by the resultset type
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

supportsBatchUpdates

public boolean supportsBatchUpdates()
                             throws SQLException
Indicates whether the driver supports batch updates.
Returns:
true if the driver supports batch updates; false otherwise
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getUDTs

public ResultSet getUDTs(String catalog,
                         String schemaPattern,
                         String typeNamePattern,
                         int[] types)
                  throws SQLException
Gets a description of the user-defined types defined in a particular schema. Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT.

Only types matching the catalog, schema, type name and type criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM and TYPE_NAME. The type name parameter may be a fully-qualified name. In this case, the catalog and schemaPattern parameters are ignored.

Each type description has the following columns:

  1. TYPE_CAT String => the type's catalog (may be null)
  2. TYPE_SCHEM String => type's schema (may be null)
  3. TYPE_NAME String => type name
  4. CLASS_NAME String => Java class name
  5. DATA_TYPE String => type value defined in java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT
  6. REMARKS String => explanatory comment on the type

Note: If the driver does not support UDTs, an empty result set is returned.

Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
typeNamePattern - a type name pattern; may be a fully-qualified name
types - a list of user-named types to include (JAVA_OBJECT, STRUCT, or DISTINCT); null returns all types
Returns:
ResultSet - each row is a type description
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getConnection

public Connection getConnection()
                         throws SQLException
Retrieves the connection that produced this metadata object.
Returns:
the connection that produced this metadata object
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataTruncation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class DataTruncation

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.sql.SQLException
                    |
                    +--java.sql.SQLWarning
                          |
                          +--java.sql.DataTruncation
All Implemented Interfaces:
Serializable
public class DataTruncation
extends SQLWarning

An exception that reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes) when JDBC unexpectedly truncates a data value.

The SQLstate for a DataTruncation is 01004.

See Also:
Serialized Form

Constructor Summary
DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize)
Creates a DataTruncation object with the SQLState initialized to 01004, the reason set to "Data truncation", the vendorCode set to the SQLException default, and the other fields set to the given values.
Method Summary
int | getDataSize() Gets the number of bytes of data that should have been transferred.
int | getIndex() Retrieves the index of the column or parameter that was truncated.
boolean | getParameter() Indicates whether the value truncated was a parameter value or a column value.
boolean | getRead() Indicates whether or not the value was truncated on a read.
int | getTransferSize() Gets the number of bytes of data actually transferred.
Methods inherited from class java.sql.SQLWarning
getNextWarning, setNextWarning
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DataTruncation

public DataTruncation(int index,
                      boolean parameter,
                      boolean read,
                      int dataSize,
                      int transferSize)
Creates a DataTruncation object with the SQLState initialized to 01004, the reason set to "Data truncation", the vendorCode set to the SQLException default, and the other fields set to the given values.
Parameters:
index - The index of the parameter or column value
parameter - true if a parameter value was truncated
read - true if a read was truncated
dataSize - the original size of the data
transferSize - the size after truncation
Method Detail

getIndex

public int getIndex()
Retrieves the index of the column or parameter that was truncated.

This may be -1 if the column or parameter index is unknown, in which case the parameter and read fields should be ignored.

Returns:
the index of the truncated paramter or column value

getParameter

public boolean getParameter()
Indicates whether the value truncated was a parameter value or a column value.
Returns:
true if the value truncated was a parameter; false if it was a column value

getRead

public boolean getRead()
Indicates whether or not the value was truncated on a read.
Returns:
true if the value was truncated when read from the database; false if the data was truncated on a write

getDataSize

public int getDataSize()
Gets the number of bytes of data that should have been transferred. This number may be approximate if data conversions were being performed. The value may be -1 if the size is unknown.
Returns:
the number of bytes of data that should have been transferred

getTransferSize

public int getTransferSize()
Gets the number of bytes of data actually transferred. The value may be -1 if the size is unknown.
Returns:
the number of bytes of data actually transferred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Date

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Class Date

java.lang.Object
  |
  +--java.util.Date
        |
        +--java.sql.Date
All Implemented Interfaces:
Cloneable, Comparable, Serializable
public class Date
extends Date

A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE. A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.

See Also:
Serialized Form

Constructor Summary
Date(int year, int month, int day)
Deprecated. instead use the constructor Date(long date)
Date(long date)
Constructs a Date object using a milliseconds time value.
Method Summary
int | getHours() Deprecated.
int | getMinutes() Deprecated.
int | getSeconds() Deprecated.
void | setHours(int i) Deprecated.
void | setMinutes(int i) Deprecated.
void | setSeconds(int i) Deprecated.
void | setTime(long date) Sets an existing Date object using the given milliseconds time value.
String | toString() Formats a date in the date escape format yyyy-mm-dd.
static Date | valueOf(String s) Converts a string in JDBC date escape format to a Date value.
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getMonth, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setMonth, setYear, toGMTString, toLocaleString, UTC
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Date

public Date(int year,
            int month,
            int day)
Deprecated. instead use the constructor Date(long date)

Constructs a Date object initialized with the given year, month, and day.
Parameters:
year - year-1900
month - 0 to 11
day - 1 to 31

Date

public Date(long date)
Constructs a Date object using a milliseconds time value. If the given millisecond value contains time information, the driver will set the time components to zero.
Parameters:
date - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.
Method Detail

setTime

public void setTime(long date)
Sets an existing Date object using the given milliseconds time value. If the given milliseconds value contains time information, the driver will set the time components to zero.
Overrides:
setTime in class Date
Parameters:
date - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

valueOf

public static Date valueOf(String s)
Converts a string in JDBC date escape format to a Date value.
Parameters:
s - date in format "yyyy-mm-dd"
Returns:
a Date object representing the given date

toString

public String toString()
Formats a date in the date escape format yyyy-mm-dd.

NOTE: To specify a date format for the class SimpleDateFormat, use "yyyy.MM.dd" rather than "yyyy-mm-dd". In the context of SimpleDateFormat, "mm" indicates minutes rather than the month. For example:

 Format Pattern                         Result
  --------------                         -------
    "yyyy.MM.dd G 'at' hh:mm:ss z"    ->>  1996.07.10 AD at 15:08:56 PDT
Overrides:
toString in class Date
Returns:
a String in yyyy-mm-dd format

getHours

public int getHours()
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
getHours in class Date
Throws:
IllegalArgumentException - if this method is invoked

getMinutes

public int getMinutes()
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
getMinutes in class Date
Throws:
IllegalArgumentException - if this method is invoked

getSeconds

public int getSeconds()
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
getSeconds in class Date
Throws:
IllegalArgumentException - if this method is invoked

setHours

public void setHours(int i)
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
setHours in class Date
Throws:
IllegalArgumentException - if this method is invoked

setMinutes

public void setMinutes(int i)
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
setMinutes in class Date
Throws:
IllegalArgumentException - if this method is invoked

setSeconds

public void setSeconds(int i)
Deprecated.

This method is deprecated and should not be used because SQL Date values do not have a time component.
Overrides:
setSeconds in class Date
Throws:
IllegalArgumentException - if this method is invoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Driver

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Driver

public interface Driver

The interface that every driver class must implement.

The Java SQL framework allows for multiple database drivers.

Each driver should supply a class that implements the Driver interface.

The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.

It is strongly recommended that each Driver class should be small and standalone so that the Driver class can be loaded and queried without bringing in vast quantities of supporting code.

When a Driver class is loaded, it should create an instance of itself and register it with the DriverManager. This means that a user can load and register a driver by calling

   Class.forName("foo.bah.Driver")

See Also:
DriverManager, Connection

Method Summary
boolean | acceptsURL(String url) Returns true if the driver thinks that it can open a connection to the given URL.
Connection | connect(String url, Properties info) Attempts to make a database connection to the given URL.
int | getMajorVersion() Gets the driver's major version number.
int | getMinorVersion() Gets the driver's minor version number.
DriverPropertyInfo[] | getPropertyInfo(String url, Properties info) Gets information about the possible properties for this driver.
boolean | jdbcCompliant() Reports whether this driver is a genuine JDBC COMPLIANTTM driver.

Method Detail

connect

public Connection connect(String url,
                          Properties info)
                   throws SQLException
Attempts to make a database connection to the given URL. The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common, as when the JDBC driver manager is asked to connect to a given URL it passes the URL to each loaded driver in turn.

The driver should raise a SQLException if it is the right driver to connect to the given URL, but has trouble connecting to the database.

The java.util.Properties argument can be used to passed arbitrary string tag/value pairs as connection arguments. Normally at least "user" and "password" properties should be included in the Properties.

Parameters:
url - the URL of the database to which to connect
info - a list of arbitrary string tag/value pairs as connection arguments. Normally at least a "user" and "password" property should be included.
Returns:
a Connection object that represents a connection to the URL
Throws:
SQLException - if a database access error occurs

acceptsURL

public boolean acceptsURL(String url)
                   throws SQLException
Returns true if the driver thinks that it can open a connection to the given URL. Typically drivers will return true if they understand the subprotocol specified in the URL and false if they don't.
Parameters:
url - the URL of the database
Returns:
true if this driver can connect to the given URL
Throws:
SQLException - if a database access error occurs

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url,
                                            Properties info)
                                     throws SQLException
Gets information about the possible properties for this driver.

The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to getPropertyInfo.

Parameters:
url - the URL of the database to which to connect
info - a proposed list of tag/value pairs that will be sent on connect open
Returns:
an array of DriverPropertyInfo objects describing possible properties. This array may be an empty array if no properties are required.
Throws:
SQLException - if a database access error occurs

getMajorVersion

public int getMajorVersion()
Gets the driver's major version number. Initially this should be 1.
Returns:
this driver's major version number

getMinorVersion

public int getMinorVersion()
Gets the driver's minor version number. Initially this should be 0.
Returns:
this driver's minor version number

jdbcCompliant

public boolean jdbcCompliant()
Reports whether this driver is a genuine JDBC COMPLIANTTM driver. A driver may only report true here if it passes the JDBC compliance tests; otherwise it is required to return false. JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level. It is expected that JDBC compliant drivers will be available for all the major commercial databases. This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DriverManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class DriverManager

java.lang.Object
  |
  +--java.sql.DriverManager
public class DriverManager
extends Object

The basic service for managing a set of JDBC drivers.
NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source. The use of a DataSource object is the preferred means of connecting to a data source.

As part of its initialization, the DriverManager class will attempt to load the driver classes referenced in the "jdbc.drivers" system property. This allows a user to customize the JDBC Drivers used by their applications. For example in your ~/.hotjava/properties file you might specify:

 jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.taste.ourDriver
A program can also explicitly load JDBC drivers at any time. For example, the my.sql.Driver is loaded with the following statement:
 Class.forName("my.sql.Driver");

When the method getConnection is called, the DriverManager will attempt to locate a suitable driver from amongst those loaded at initialization and those loaded explicitly using the same classloader as the current applet or application.

Starting with the Java 2 SDK, Standard Edition, version 1.3, a logging stream can be set only if the proper permission has been granted. Normally this will be done with the tool PolicyTool, which can be used to grant permission java.sql.SQLPermission "setLog".

See Also:
Driver,

Some methods in this class are new in the JDBC 2.0 API. They are marked with "since 1.2". API marked "since 1.3" is new in the JDBC 2.0 API and is included in the Java 2 SDK, Standard Edition, version 1.3.

Method Summary
static void | deregisterDriver(Driver driver) Drops a Driver from the DriverManager's list.
static Connection | getConnection(String url) Attempts to establish a connection to the given database URL.
static Connection | getConnection(String url, Properties info) Attempts to establish a connection to the given database URL.
static Connection | getConnection(String url, String user, String password) Attempts to establish a connection to the given database URL.
static Driver | getDriver(String url) Attempts to locate a driver that understands the given URL.
static Enumeration | getDrivers() Retrieves an Enumeration with all of the currently loaded JDBC drivers to which the current caller has access.
static int | getLoginTimeout() Gets the maximum time in seconds that a driver can wait when attempting to log in to a database.
static PrintStream | getLogStream() Deprecated.
static PrintWriter | getLogWriter() Gets the log writer.
static void | println(String message) Prints a message to the current JDBC log stream.
static void | registerDriver(Driver driver) Registers the given driver with the DriverManager.
static void | setLoginTimeout(int seconds) Sets the maximum time in seconds that a driver will wait while attempting to connect to a database.
static void | setLogStream(PrintStream out) Deprecated.
static void | setLogWriter(PrintWriter out) Sets the logging/tracing PrintWriter object that is used by the DriverManager and all drivers.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getLogWriter

public static PrintWriter getLogWriter()
Gets the log writer. The getLogWriter and setLogWriter methods should be used instead of the get/setlogStream methods, which are deprecated.
Returns:
a java.io.PrintWriter object
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setLogWriter

public static void setLogWriter(PrintWriter out)
Sets the logging/tracing PrintWriter object that is used by the DriverManager and all drivers.

There is a minor versioning problem created by the introduction of the method setLogWriter. The method setLogWriter cannot create a PrintStream object that will be returned by getLogStream---the Java platform does not provide a backward conversion. As a result, a new application that uses setLogWriter and also uses a JDBC 1.0 driver that uses getLogStream will likely not see debugging information written by that driver.

In the Java 2 SDK, Standard Edition, version 1.3 release, this method checks to see that there is an SQLPermission object before setting the logging stream. If a SecurityManager exists and its checkPermission method denies setting the log writer, this method throws a java.lang.SecurityException.

Parameters:
out - the new logging/tracing PrintStream object; null to disable logging and tracing
Throws:
SecurityException - if a security manager exists and its checkPermission method denies setting the log writer
Since:
1.2
See Also:
SecurityManager.checkPermission(java.security.Permission), What Is in the JDBC 2.0 API

getConnection

public static Connection getConnection(String url,
                                       Properties info)
                                throws SQLException
Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
Returns:
a Connection to the URL
Throws:
SQLException - if a database access error occurs

getConnection

public static Connection getConnection(String url,
                                       String user,
                                       String password)
                                throws SQLException
Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
user - the database user on whose behalf the connection is being made
password - the user's password
Returns:
a connection to the URL
Throws:
SQLException - if a database access error occurs

getConnection

public static Connection getConnection(String url)
                                throws SQLException
Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
Returns:
a connection to the URL
Throws:
SQLException - if a database access error occurs

getDriver

public static Driver getDriver(String url)
                        throws SQLException
Attempts to locate a driver that understands the given URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database URL of the form jdbc:subprotocol:subname
Returns:
a Driver object representing a driver that can connect to the given URL
Throws:
SQLException - if a database access error occurs

registerDriver

public static void registerDriver(Driver driver)
                           throws SQLException
Registers the given driver with the DriverManager. A newly-loaded driver class should call the method registerDriver to make itself known to the DriverManager.
Parameters:
driver - the new JDBC Driver that is to be registered with the DriverManager
Throws:
SQLException - if a database access error occurs

deregisterDriver

public static void deregisterDriver(Driver driver)
                             throws SQLException
Drops a Driver from the DriverManager's list. Applets can only deregister Drivers from their own classloaders.
Parameters:
driver - the JDBC Driver to drop
Throws:
SQLException - if a database access error occurs

getDrivers

public static Enumeration getDrivers()
Retrieves an Enumeration with all of the currently loaded JDBC drivers to which the current caller has access.

Note: The classname of a driver can be found using d.getClass().getName()

Returns:
the list of JDBC Drivers loaded by the caller's class loader

setLoginTimeout

public static void setLoginTimeout(int seconds)

Sets the maximum time in seconds that a driver will wait while attempting to connect to a database.

Parameters:
seconds - the login time limit in seconds

getLoginTimeout

public static int getLoginTimeout()
Gets the maximum time in seconds that a driver can wait when attempting to log in to a database.
Returns:
the driver login time limit in seconds

setLogStream

public static void setLogStream(PrintStream out)
Deprecated.

Sets the logging/tracing PrintStream that is used by the DriverManager and all drivers.

In the Java 2 SDK, Standard Edition, version 1.3 release, this method checks to see that there is an SQLPermission object before setting the logging stream. If a SecurityManager exists and its checkPermission method denies setting the log writer, this method throws a java.lang.SecurityException.

Parameters:
out - the new logging/tracing PrintStream; to disable, set to null
Throws:
SecurityException - if a security manager exists and its checkPermission method denies setting the log stream.
See Also:
SecurityManager.checkPermission(java.security.Permission)

getLogStream

public static PrintStream getLogStream()
Deprecated.

Gets the logging/tracing PrintStream that is used by the DriverManager and all drivers.
Returns:
the logging/tracing PrintStream; if disabled, is null

println

public static void println(String message)
Prints a message to the current JDBC log stream.
Parameters:
message - a log or tracing message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DriverPropertyInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class DriverPropertyInfo

java.lang.Object
  |
  +--java.sql.DriverPropertyInfo
public class DriverPropertyInfo
extends Object

Driver properties for making a connection. The DriverPropertyInfo class is of interest only to advanced programmers who need to interact with a Driver via the method getDriverProperties to discover and supply properties for connections.

Field Summary
String[] | choices An array of possible values if the value for the field DriverPropertyInfo.value may be selected from a particular set of values; otherwise null.
String | description A brief description of the property, which may be null.
String | name The name of the property.
boolean | required The required field is true if a value must be supplied for this property during Driver.connect and false otherwise.
String | value The value field specifies the current value of the property, based on a combination of the information supplied to the method getPropertyInfo, the Java environment, and the driver-supplied default values.
Constructor Summary
DriverPropertyInfo(String name, String value)
Constructs a DriverPropertyInfo object with a name and value; other members default to their initial values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name
The name of the property.

description

public String description
A brief description of the property, which may be null.

required

public boolean required
The required field is true if a value must be supplied for this property during Driver.connect and false otherwise.

value

public String value
The value field specifies the current value of the property, based on a combination of the information supplied to the method getPropertyInfo, the Java environment, and the driver-supplied default values. This field may be null if no value is known.

choices

public String[] choices
An array of possible values if the value for the field DriverPropertyInfo.value may be selected from a particular set of values; otherwise null.
Constructor Detail

DriverPropertyInfo

public DriverPropertyInfo(String name,
                          String value)
Constructs a DriverPropertyInfo object with a name and value; other members default to their initial values.
Parameters:
name - the name of the property
value - the current value, which may be null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PreparedStatement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface PreparedStatement

All Superinterfaces:
Statement
All Known Subinterfaces:
CallableStatement
public interface PreparedStatement
extends Statement

An object that represents a precompiled SQL statement.

A SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer, then the method setInt should be used.

If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type.
Example of setting a parameter; con is an active connection

   PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
                                     SET SALARY = ? WHERE ID = ?");
   pstmt.setBigDecimal(1, 153833.00)
   pstmt.setInt(2, 110592)

See Also:
Connection.prepareStatement(java.lang.String),

Some of the methods in this interface are new in the JDBC 2.0 API.

Method Summary
void | addBatch() Adds a set of parameters to this PreparedStatement object's batch of commands.
void | clearParameters() Clears the current parameter values immediately.
boolean | execute() Executes any kind of SQL statement.
ResultSet | executeQuery() Executes the SQL query in this PreparedStatement object and returns the result set generated by the query.
int | executeUpdate() Executes the SQL INSERT, UPDATE or DELETE statement in this PreparedStatement object.
ResultSetMetaData | getMetaData() Gets the number, types and properties of a ResultSet object's columns.
void | setArray(int i, Array x) Sets the designated parameter to the given Array object.
void | setAsciiStream(int parameterIndex, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setBigDecimal(int parameterIndex, BigDecimal x) Sets the designated parameter to a java.math.BigDecimal value.
void | setBinaryStream(int parameterIndex, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setBlob(int i, Blob x) Sets the designated parameter to the given Blob object.
void | setBoolean(int parameterIndex, boolean x) Sets the designated parameter to a Java boolean value.
void | setByte(int parameterIndex, byte x) Sets the designated parameter to a Java byte value.
void | setBytes(int parameterIndex, byte[] x) Sets the designated parameter to a Java array of bytes.
void | setCharacterStream(int parameterIndex, Reader reader, int length) Sets the designated parameter to the given Reader object, which is the given number of characters long.
void | setClob(int i, Clob x) Sets the designated parameter to the given Clob object.
void | setDate(int parameterIndex, Date x) Sets the designated parameter to a value.
void | setDate(int parameterIndex, Date x, Calendar cal) Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
void | setDouble(int parameterIndex, double x) Sets the designated parameter to a Java double value.
void | setFloat(int parameterIndex, float x) Sets the designated parameter to a Java float value.
void | setInt(int parameterIndex, int x) Sets the designated parameter to a Java int value.
void | setLong(int parameterIndex, long x) Sets the designated parameter to a Java long value.
void | setNull(int parameterIndex, int sqlType) Sets the designated parameter to SQL NULL.
void | setNull(int paramIndex, int sqlType, String typeName) Sets the designated parameter to SQL NULL.
void | setObject(int parameterIndex, Object x) Sets the value of the designated parameter using the given object.
void | setObject(int parameterIndex, Object x, int targetSqlType) Sets the value of the designated parameter with the given object.
void | setObject(int parameterIndex, Object x, int targetSqlType, int scale) Sets the value of the designated parameter with the given object.
void | setRef(int i, Ref x) Sets the designated parameter to the given REF(<structured-type>) value.
void | setShort(int parameterIndex, short x) Sets the designated parameter to a Java short value.
void | setString(int parameterIndex, String x) Sets the designated parameter to a Java String value.
void | setTime(int parameterIndex, Time x) Sets the designated parameter to a java.sql.Time value.
void | setTime(int parameterIndex, Time x, Calendar cal) Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
void | setTimestamp(int parameterIndex, Timestamp x) Sets the designated parameter to a java.sql.Timestamp value.
void | setTimestamp(int parameterIndex, Timestamp x, Calendar cal) Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
void | setUnicodeStream(int parameterIndex, InputStream x, int length) Deprecated.
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, executeBatch, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout

Method Detail

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Executes the SQL query in this PreparedStatement object and returns the result set generated by the query.
Returns:
a ResultSet object that contains the data produced by the query; never null
Throws:
SQLException - if a database access error occurs

executeUpdate

public int executeUpdate()
                  throws SQLException
Executes the SQL INSERT, UPDATE or DELETE statement in this PreparedStatement object. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.
Returns:
either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing
Throws:
SQLException - if a database access error occurs

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws SQLException
Sets the designated parameter to SQL NULL.

Note: You must specify the parameter's SQL type.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
sqlType - the SQL type code defined in java.sql.Types
Throws:
SQLException - if a database access error occurs

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws SQLException
Sets the designated parameter to a Java boolean value. The driver converts this to an SQL BIT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws SQLException
Sets the designated parameter to a Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setShort

public void setShort(int parameterIndex,
                     short x)
              throws SQLException
Sets the designated parameter to a Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setInt

public void setInt(int parameterIndex,
                   int x)
            throws SQLException
Sets the designated parameter to a Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setLong

public void setLong(int parameterIndex,
                    long x)
             throws SQLException
Sets the designated parameter to a Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws SQLException
Sets the designated parameter to a Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws SQLException
Sets the designated parameter to a Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          BigDecimal x)
                   throws SQLException
Sets the designated parameter to a java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setString

public void setString(int parameterIndex,
                      String x)
               throws SQLException
Sets the designated parameter to a Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws SQLException
Sets the designated parameter to a Java array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setDate

public void setDate(int parameterIndex,
                    Date x)
             throws SQLException
Sets the designated parameter to a value. The driver converts this to an SQL DATE value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setTime

public void setTime(int parameterIndex,
                    Time x)
             throws SQLException
Sets the designated parameter to a java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setTimestamp

public void setTimestamp(int parameterIndex,
                         Timestamp x)
                  throws SQLException
Sets the designated parameter to a java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
Throws:
SQLException - if a database access error occurs

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           InputStream x,
                           int length)
                    throws SQLException
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the Java input stream that contains the ASCII parameter value
length - the number of bytes in the stream
Throws:
SQLException - if a database access error occurs

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             InputStream x,
                             int length)
                      throws SQLException
Deprecated.

Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format. The byte format of the Unicode stream must be Java UTF-8, as defined in the Java Virtual Machine Specification.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java input stream which contains the UNICODE parameter value
length - the number of bytes in the stream
Throws:
SQLException - if a database access error occurs

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            InputStream x,
                            int length)
                     throws SQLException
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java input stream which contains the binary parameter value
length - the number of bytes in the stream
Throws:
SQLException - if a database access error occurs

clearParameters

public void clearParameters()
                     throws SQLException
Clears the current parameter values immediately.

In general, parameter values remain in force for repeated use of a statement. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling the method clearParameters.

Throws:
SQLException - if a database access error occurs

setObject

public void setObject(int parameterIndex,
                      Object x,
                      int targetSqlType,
                      int scale)
               throws SQLException

Sets the value of the designated parameter with the given object. The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.

The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase- specific abstract data types.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the object containing the input parameter value
targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
Throws:
SQLException - if a database access error occurs
See Also:
Types

setObject

public void setObject(int parameterIndex,
                      Object x,
                      int targetSqlType)
               throws SQLException
Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the object containing the input parameter value
targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database
Throws:
SQLException - if a database access error occurs

setObject

public void setObject(int parameterIndex,
                      Object x)
               throws SQLException

Sets the value of the designated parameter using the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase- specific abstract data types, by using a driver-specific Java type. If the object is of a class implementing the interface SQLData, the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, then the driver should pass it to the database as a value of the corresponding SQL type. This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the object containing the input parameter value
Throws:
SQLException - if a database access error occurs

execute

public boolean execute()
                throws SQLException
Executes any kind of SQL statement. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by the methods executeQuery and executeUpdate.
Throws:
SQLException - if a database access error occurs
See Also:
Statement.execute(java.lang.String)

addBatch

public void addBatch()
              throws SQLException
Adds a set of parameters to this PreparedStatement object's batch of commands.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
Statement.addBatch(java.lang.String), What Is in the JDBC 2.0 API

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               Reader reader,
                               int length)
                        throws SQLException
Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java reader which contains the UNICODE data
length - the number of characters in the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setRef

public void setRef(int i,
                   Ref x)
            throws SQLException
Sets the designated parameter to the given REF(<structured-type>) value.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - an SQL REF value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setBlob

public void setBlob(int i,
                    Blob x)
             throws SQLException
Sets the designated parameter to the given Blob object.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - a Blob object that maps an SQL BLOB value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setClob

public void setClob(int i,
                    Clob x)
             throws SQLException
Sets the designated parameter to the given Clob object.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - a Clob object that maps an SQL CLOB value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setArray

public void setArray(int i,
                     Array x)
              throws SQLException
Sets the designated parameter to the given Array object. Sets an Array parameter.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - an Array object that maps an SQL ARRAY value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
Gets the number, types and properties of a ResultSet object's columns.
Returns:
the description of a ResultSet object's columns
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setDate

public void setDate(int parameterIndex,
                    Date x,
                    Calendar cal)
             throws SQLException
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
cal - the Calendar object the driver will use to construct the date
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setTime

public void setTime(int parameterIndex,
                    Time x,
                    Calendar cal)
             throws SQLException
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIME value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the time taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
cal - the Calendar object the driver will use to construct the time
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setTimestamp

public void setTimestamp(int parameterIndex,
                         Timestamp x,
                         Calendar cal)
                  throws SQLException
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIMESTAMP value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the timestamp taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
cal - the Calendar object the driver will use to construct the timestamp
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setNull

public void setNull(int paramIndex,
                    int sqlType,
                    String typeName)
             throws SQLException
Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
sqlType - a value from java.sql.Types
typeName - the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REF
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Ref

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Ref

public interface Ref

The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.

SQL REF values are stored in a special table that contains instances of a referenceable SQL structured type, and each REF value is a unique identifier for one instance in that table. An SQL REF value may be used in place of the SQL structured type it references; it may be used as either a column value in a table or an attribute value in a structured type.

Because an SQL REF value is a logical pointer to an SQL structured type, a Ref object is by default also a logical pointer; thus, retrieving an SQL REF value as a Ref object does not materialize the attributes of the structured type on the client.

A Ref object can be saved to persistent storage and is dereferenced by passing it as a parameter to an SQL statement and executing the statement.

The Ref interface is new in the JDBC 2.0 API.

See Also:
Struct

Method Summary
 String getBaseTypeName()
Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references.

Method Detail

getBaseTypeName

public String getBaseTypeName()
                       throws SQLException
Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references.
Returns:
the fully-qualified SQL name of the referenced SQL structured type
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResultSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface ResultSet

public interface ResultSet

A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, it is possible to iterate through it only once and only from the first row to the last row. New methods in the JDBC 2.0 API make it possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. See ResultSet fields for other options.

       Statement stmt = con.createStatement(
                                      ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
       ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
       // rs will be scrollable, will not show changes made by others,
       // and will be updatable
The ResultSet interface provides getXXX methods for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

For the getXXX methods, a JDBC driver attempts to convert the underlying data to the Java type specified in the XXX part of the getXXX method and returns a suitable Java value. The JDBC specification has a table showing the allowable mappings from SQL types to Java types with the ResultSet.getXXX methods.

Column names used as input to getXXX methods are case insensitive. When a getXXX method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they actually refer to the intended columns.

A set of updateXXX methods were added to this interface in the JDBC 2.0 API (JavaTM 2 SDK, Standard Edition, version 1.2). The comments regarding parameters to the getXXX methods also apply to parameters to the updateXXX methods.

The updateXXX methods may be used in two ways:

  1. to update a column value in the current row. In a scrollable ResultSet object, the cursor can be moved backwards and forwards, to an absolute position, or to a position relative to the current row. The following code fragment updates the NAME column in the fifth row of the ResultSet object rs and then uses the method updateRow to update the data source table from which rs was derived.

       rs.absolute(5); // moves the cursor to the fifth row of rs
       rs.updateString("NAME", "AINSWORTH"); // updates the
          // NAME column of row 5 to be AINSWORTH
       rs.updateRow(); // updates the row in the data source
  2. to insert column values into the insert row. An updatable ResultSet object has a special row associated with it that serves as a staging area for building a row to be inserted. The following code fragment moves the cursor to the insert row, builds a three-column row, and inserts it into rs and into the data source table using the method insertRow.

       rs.moveToInsertRow(); // moves cursor to the insert row
       rs.updateString(1, "AINSWORTH"); // updates the
          // first column of the insert row to be AINSWORTH
       rs.updateInt(2,35); // updates the second column to be 35
       rs.updateBoolean(3, true); // updates the third row to true
       rs.insertRow();
       rs.moveToCurrentRow();

A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.

The number, types and properties of a ResultSet object's columns are provided by the ResulSetMetaData object returned by the ResultSet.getMetaData method.

See Also:
Statement.executeQuery(java.lang.String), Statement.getResultSet(), ResultSetMetaData

Field Summary
static int | CONCUR_READ_ONLY The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
static int | CONCUR_UPDATABLE The constant indicating the concurrency mode for a ResultSet object that may be updated.
static int | FETCH_FORWARD The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.
static int | FETCH_REVERSE The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.
static int | FETCH_UNKNOWN The constant indicating that the order in which rows in a result set will be processed is unknown.
static int | TYPE_FORWARD_ONLY The constant indicating the type for a ResultSet object whose cursor may move only forward.
static int | TYPE_SCROLL_INSENSITIVE The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
static int | TYPE_SCROLL_SENSITIVE The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.
Method Summary
boolean | absolute(int row) Moves the cursor to the given row number in this ResultSet object.
void | afterLast() Moves the cursor to the end of this ResultSet object, just after the last row.
void | beforeFirst() Moves the cursor to the front of this ResultSet object, just before the first row.
void | cancelRowUpdates() Cancels the updates made to the current row in this ResultSet object.
void | clearWarnings() Clears all warnings reported on this ResultSet object.
void | close() Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
void | deleteRow() Deletes the current row from this ResultSet object and from the underlying database.
int | findColumn(String columnName) Maps the given ResultSet column name to its ResultSet column index.
boolean | first() Moves the cursor to the first row in this ResultSet object.
Array | getArray(int i) Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Array | getArray(String colName) Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
InputStream | getAsciiStream(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
InputStream | getAsciiStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
BigDecimal | getBigDecimal(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
BigDecimal | getBigDecimal(int columnIndex, int scale) Deprecated.
BigDecimal | getBigDecimal(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
BigDecimal | getBigDecimal(String columnName, int scale) Deprecated.
InputStream | getBinaryStream(int columnIndex) Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
InputStream | getBinaryStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
Blob | getBlob(int i) Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Blob | getBlob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
boolean | getBoolean(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
boolean | getBoolean(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
byte | getByte(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
byte | getByte(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
byte[] | getBytes(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
byte[] | getBytes(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
Reader | getCharacterStream(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Reader | getCharacterStream(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Clob | getClob(int i) Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Clob | getClob(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
int | getConcurrency() Returns the concurrency mode of this ResultSet object.
String | getCursorName() Gets the name of the SQL cursor used by this ResultSet object.
Date | getDate(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | getDate(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | getDate(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | getDate(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
double | getDouble(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
double | getDouble(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
int | getFetchDirection() Returns the fetch direction for this ResultSet object.
int | getFetchSize() Returns the fetch size for this ResultSet object.
float | getFloat(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
float | getFloat(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
int | getInt(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
int | getInt(String columnName) Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
long | getLong(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
long | getLong(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
ResultSetMetaData | getMetaData() Retrieves the number, types and properties of this ResultSet object's columns.
Object | getObject(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | getObject(int i, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | getObject(String columnName) Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | getObject(String colName, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Ref | getRef(int i) Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Ref | getRef(String colName) Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
int | getRow() Retrieves the current row number.
short | getShort(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
short | getShort(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Statement | getStatement() Returns the Statement object that produced this ResultSet object.
String | getString(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
String | getString(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Time | getTime(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | getTime(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | getTime(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | getTime(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Timestamp | getTimestamp(int columnIndex) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp | getTimestamp(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp | getTimestamp(String columnName) Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
Timestamp | getTimestamp(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
int | getType() Returns the type of this ResultSet object.
InputStream | getUnicodeStream(int columnIndex) Deprecated. use getCharacterStream in place of getUnicodeStream
InputStream | getUnicodeStream(String columnName) Deprecated.
SQLWarning | getWarnings() Returns the first warning reported by calls on this ResultSet object.
void | insertRow() Inserts the contents of the insert row into this ResultSet objaect and into the database.
boolean | isAfterLast() Indicates whether the cursor is after the last row in this ResultSet object.
boolean | isBeforeFirst() Indicates whether the cursor is before the first row in this ResultSet object.
boolean | isFirst() Indicates whether the cursor is on the first row of this ResultSet object.
boolean | isLast() Indicates whether the cursor is on the last row of this ResultSet object.
boolean | last() Moves the cursor to the last row in this ResultSet object.
void | moveToCurrentRow() Moves the cursor to the remembered cursor position, usually the current row.
void | moveToInsertRow() Moves the cursor to the insert row.
boolean | next() Moves the cursor down one row from its current position.
boolean | previous() Moves the cursor to the previous row in this ResultSet object.
void | refreshRow() Refreshes the current row with its most recent value in the database.
boolean | relative(int rows) Moves the cursor a relative number of rows, either positive or negative.
boolean | rowDeleted() Indicates whether a row has been deleted.
boolean | rowInserted() Indicates whether the current row has had an insertion.
boolean | rowUpdated() Indicates whether the current row has been updated.
void | setFetchDirection(int direction) Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
void | setFetchSize(int rows) Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
void | updateAsciiStream(int columnIndex, InputStream x, int length) Updates the designated column with an ascii stream value.
void | updateAsciiStream(String columnName, InputStream x, int length) Updates the designated column with an ascii stream value.
void | updateBigDecimal(int columnIndex, BigDecimal x) Updates the designated column with a java.math.BigDecimal value.
void | updateBigDecimal(String columnName, BigDecimal x) Updates the designated column with a java.sql.BigDecimal value.
void | updateBinaryStream(int columnIndex, InputStream x, int length) Updates the designated column with a binary stream value.
void | updateBinaryStream(String columnName, InputStream x, int length) Updates the designated column with a binary stream value.
void | updateBoolean(int columnIndex, boolean x) Updates the designated column with a boolean value.
void | updateBoolean(String columnName, boolean x) Updates the designated column with a boolean value.
void | updateByte(int columnIndex, byte x) Updates the designated column with a byte value.
void | updateByte(String columnName, byte x) Updates the designated column with a byte value.
void | updateBytes(int columnIndex, byte[] x) Updates the designated column with a byte array value.
void | updateBytes(String columnName, byte[] x) Updates the designated column with a boolean value.
void | updateCharacterStream(int columnIndex, Reader x, int length) Updates the designated column with a character stream value.
void | updateCharacterStream(String columnName, Reader reader, int length) Updates the designated column with a character stream value.
void | updateDate(int columnIndex, Date x) Updates the designated column with a java.sql.Date value.
void | updateDate(String columnName, Date x) Updates the designated column with a java.sql.Date value.
void | updateDouble(int columnIndex, double x) Updates the designated column with a double value.
void | updateDouble(String columnName, double x) Updates the designated column with a double value.
void | updateFloat(int columnIndex, float x) Updates the designated column with a float value.
void | updateFloat(String columnName, float x) Updates the designated column with a float value.
void | updateInt(int columnIndex, int x) Updates the designated column with an int value.
void | updateInt(String columnName, int x) Updates the designated column with an int value.
void | updateLong(int columnIndex, long x) Updates the designated column with a long value.
void | updateLong(String columnName, long x) Updates the designated column with a long value.
void | updateNull(int columnIndex) Gives a nullable column a null value.
void | updateNull(String columnName) Updates the designated column with a null value.
void | updateObject(int columnIndex, Object x) Updates the designated column with an Object value.
void | updateObject(int columnIndex, Object x, int scale) Updates the designated column with an Object value.
void | updateObject(String columnName, Object x) Updates the designated column with an Object value.
void | updateObject(String columnName, Object x, int scale) Updates the designated column with an Object value.
void | updateRow() Updates the underlying database with the new contents of the current row of this ResultSet object.
void | updateShort(int columnIndex, short x) Updates the designated column with a short value.
void | updateShort(String columnName, short x) Updates the designated column with a short value.
void | updateString(int columnIndex, String x) Updates the designated column with a String value.
void | updateString(String columnName, String x) Updates the designated column with a String value.
void | updateTime(int columnIndex, Time x) Updates the designated column with a java.sql.Time value.
void | updateTime(String columnName, Time x) Updates the designated column with a java.sql.Time value.
void | updateTimestamp(int columnIndex, Timestamp x) Updates the designated column with a java.sql.Timestamp value.
void | updateTimestamp(String columnName, Timestamp x) Updates the designated column with a java.sql.Timestamp value.
boolean | wasNull() Reports whether the last column read had a value of SQL NULL.

Field Detail

FETCH_FORWARD

public static final int FETCH_FORWARD
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

FETCH_REVERSE

public static final int FETCH_REVERSE
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

FETCH_UNKNOWN

public static final int FETCH_UNKNOWN
The constant indicating that the order in which rows in a result set will be processed is unknown. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.

TYPE_FORWARD_ONLY

public static final int TYPE_FORWARD_ONLY
The constant indicating the type for a ResultSet object whose cursor may move only forward.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

TYPE_SCROLL_INSENSITIVE

public static final int TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

TYPE_SCROLL_SENSITIVE

public static final int TYPE_SCROLL_SENSITIVE
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

CONCUR_READ_ONLY

public static final int CONCUR_READ_ONLY
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

CONCUR_UPDATABLE

public static final int CONCUR_UPDATABLE
The constant indicating the concurrency mode for a ResultSet object that may be updated.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2
Method Detail

next

public boolean next()
             throws SQLException
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Returns:
true if the new current row is valid; false if there are no more rows
Throws:
SQLException - if a database access error occurs

close

public void close()
           throws SQLException
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected.

Throws:
SQLException - if a database access error occurs

wasNull

public boolean wasNull()
                throws SQLException
Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getXXX methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.
Returns:
true if the last column value read was SQL NULL and false otherwise
Throws:
SQLException - if a database access error occurs

getString

public String getString(int columnIndex)
                 throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getBoolean

public boolean getBoolean(int columnIndex)
                   throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is false
Throws:
SQLException - if a database access error occurs

getByte

public byte getByte(int columnIndex)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getShort

public short getShort(int columnIndex)
               throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getInt

public int getInt(int columnIndex)
           throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getLong

public long getLong(int columnIndex)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getFloat

public float getFloat(int columnIndex)
               throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getDouble

public double getDouble(int columnIndex)
                 throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getBigDecimal

public BigDecimal getBigDecimal(int columnIndex,
                                int scale)
                         throws SQLException
Deprecated.

Gets the value of the designated column in the current row of this ResultSet object as a java.sql.BigDecimal in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
scale - the number of digits to the right of the decimal point
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getBytes

public byte[] getBytes(int columnIndex)
                throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getDate

public Date getDate(int columnIndex)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getTime

public Time getTime(int columnIndex)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getTimestamp

public Timestamp getTimestamp(int columnIndex)
                       throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getAsciiStream

public InputStream getAsciiStream(int columnIndex)
                           throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getUnicodeStream

public InputStream getUnicodeStream(int columnIndex)
                             throws SQLException
Deprecated. use getCharacterStream in place of getUnicodeStream

Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as as a stream of Unicode characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving largeLONGVARCHARvalues. The JDBC driver will do any necessary conversion from the database format into Unicode. The byte format of the Unicode stream must be Java UTF-8, as specified in the Java virtual machine specification.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a Java input stream that delivers the database column value as a stream in Java UTF-8 byte format; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getBinaryStream

public InputStream getBinaryStream(int columnIndex)
                            throws SQLException
Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getString

public String getString(String columnName)
                 throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getBoolean

public boolean getBoolean(String columnName)
                   throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is false
Throws:
SQLException - if a database access error occurs

getByte

public byte getByte(String columnName)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getShort

public short getShort(String columnName)
               throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getInt

public int getInt(String columnName)
           throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getLong

public long getLong(String columnName)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getFloat

public float getFloat(String columnName)
               throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getDouble

public double getDouble(String columnName)
                 throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs

getBigDecimal

public BigDecimal getBigDecimal(String columnName,
                                int scale)
                         throws SQLException
Deprecated.

Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal in the Java programming language.
Parameters:
columnName - the SQL name of the column
scale - the number of digits to the right of the decimal point
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getBytes

public byte[] getBytes(String columnName)
                throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getDate

public Date getDate(String columnName)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getTime

public Time getTime(String columnName)
             throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getTimestamp

public Timestamp getTimestamp(String columnName)
                       throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

getAsciiStream

public InputStream getAsciiStream(String columnName)
                           throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
columnName - the SQL name of the column
Returns:
a Java input stream that delivers the database column value as a stream of one-byte ASCII characters. If the value is SQL NULL, the value returned is null.
Throws:
SQLException - if a database access error occurs

getUnicodeStream

public InputStream getUnicodeStream(String columnName)
                             throws SQLException
Deprecated.

Gets the value of the designated column in the current row of this ResultSet object as a stream of Unicode characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. The byte format of the Unicode stream must be Java UTF-8, as defined in the Java virtual machine specification.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
columnName - the SQL name of the column
Returns:
a Java input stream that delivers the database column value as a stream of two-byte Unicode characters. If the value is SQL NULL, the value returned is null.
Throws:
SQLException - if a database access error occurs

getBinaryStream

public InputStream getBinaryStream(String columnName)
                            throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
columnName - the SQL name of the column
Returns:
a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database access error occurs

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
Returns the first warning reported by calls on this ResultSet object. Subsequent warnings on this ResultSet object will be chained to the SQLWarning object that this method returns.

The warning chain is automatically cleared each time a new row is read.

Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by Statement methods (such as reading OUT parameters) will be chained on the Statement object.

Returns:
the first SQLWarning object reported or null
Throws:
SQLException - if a database access error occurs

clearWarnings

public void clearWarnings()
                   throws SQLException
Clears all warnings reported on this ResultSet object. After this method is called, the method getWarnings returns null until a new warning is reported for this ResultSet object.
Throws:
SQLException - if a database access error occurs

getCursorName

public String getCursorName()
                     throws SQLException
Gets the name of the SQL cursor used by this ResultSet object.

In SQL, a result table is retrieved through a cursor that is named. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update, the cursor's select statement should be of the form 'select for update'. If the 'for update' clause is omitted, the positioned updates may fail.

The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor.

Note: If positioned update is not supported, a SQLException is thrown.

Returns:
the SQL name for this ResultSet object's cursor
Throws:
SQLException - if a database access error occurs

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
Retrieves the number, types and properties of this ResultSet object's columns.
Returns:
the description of this ResultSet object's columns
Throws:
SQLException - if a database access error occurs

getObject

public Object getObject(int columnIndex)
                 throws SQLException

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.

This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a java.lang.Object holding the column value
Throws:
SQLException - if a database access error occurs

getObject

public Object getObject(String columnName)
                 throws SQLException

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.

This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
columnName - the SQL name of the column
Returns:
a java.lang.Object holding the column value
Throws:
SQLException - if a database access error occurs

findColumn

public int findColumn(String columnName)
               throws SQLException
Maps the given ResultSet column name to its ResultSet column index.
Parameters:
columnName - the name of the column
Returns:
the column index of the given column name
Throws:
SQLException - if a database access error occurs

getCharacterStream

public Reader getCharacterStream(int columnIndex)
                          throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getCharacterStream

public Reader getCharacterStream(String columnName)
                          throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Parameters:
columnName - the name of the column
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBigDecimal

public BigDecimal getBigDecimal(int columnIndex)
                         throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBigDecimal

public BigDecimal getBigDecimal(String columnName)
                         throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
Parameters:
columnName - the column name
Returns:
the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

isBeforeFirst

public boolean isBeforeFirst()
                      throws SQLException
Indicates whether the cursor is before the first row in this ResultSet object.
Returns:
true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

isAfterLast

public boolean isAfterLast()
                    throws SQLException
Indicates whether the cursor is after the last row in this ResultSet object.
Returns:
true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

isFirst

public boolean isFirst()
                throws SQLException
Indicates whether the cursor is on the first row of this ResultSet object.
Returns:
true if the cursor is on the first row; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

isLast

public boolean isLast()
               throws SQLException
Indicates whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.
Returns:
true if the cursor is on the last row; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

beforeFirst

public void beforeFirst()
                 throws SQLException
Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

afterLast

public void afterLast()
               throws SQLException
Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

first

public boolean first()
              throws SQLException
Moves the cursor to the first row in this ResultSet object.
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

last

public boolean last()
             throws SQLException
Moves the cursor to the last row in this ResultSet object.
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getRow

public int getRow()
           throws SQLException
Retrieves the current row number. The first row is number 1, the second number 2, and so on.
Returns:
the current row number; 0 if there is no current row
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

absolute

public boolean absolute(int row)
                 throws SQLException
Moves the cursor to the given row number in this ResultSet object.

If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.

If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.

Note: Calling absolute(1) is the same
 as calling first(). Calling absolute(-1)
 is the same as calling last().

Returns:
true if the cursor is on the result set; false otherwise
Throws:
SQLException - if a database access error occurs, the row is 0, or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

relative

public boolean relative(int rows)
                 throws SQLException
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Note: Calling the method relative(1) is different from calling the method next() because is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.

Returns:
true if the cursor is on a row; false otherwise
Throws:
SQLException - if a database access error occurs, there is no current row, or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

previous

public boolean previous()
                 throws SQLException
Moves the cursor to the previous row in this ResultSet object.

Note: Calling the method previous() is not the same as calling the method relative(-1) because it makes sense to callprevious() when there is no current row.

Returns:
true if the cursor is on a valid row; false if it is off the result set
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setFetchDirection

public void setFetchDirection(int direction)
                       throws SQLException
Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY and the fetch direction is not FETCH_FORWARD
Since:
1.2
See Also:
What Is in the JDBC 2.0 API, Statement.setFetchDirection(int)

getFetchDirection

public int getFetchDirection()
                      throws SQLException
Returns the fetch direction for this ResultSet object.
Returns:
the current fetch direction for this ResultSet object
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setFetchSize

public void setFetchSize(int rows)
                  throws SQLException
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object. If the fetch size specified is zero, the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be. The default value is set by the Statement object that created the result set. The fetch size may be changed at any time.
Parameters:
rows - the number of rows to fetch
Throws:
SQLException - if a database access error occurs or the condition 0 <= rows="rows" <="this.getMaxRows() is not satisfied
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getFetchSize

public int getFetchSize()
                 throws SQLException
Returns the fetch size for this ResultSet object.
Returns:
the current fetch size for this ResultSet object
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getType

public int getType()
            throws SQLException
Returns the type of this ResultSet object. The type is determined by the Statement object that created the result set.
Returns:
TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or TYPE_SCROLL_SENSITIVE
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getConcurrency

public int getConcurrency()
                   throws SQLException
Returns the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.
Returns:
the concurrency type, either CONCUR_READ_ONLY or CONCUR_UPDATABLE
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

rowUpdated

public boolean rowUpdated()
                   throws SQLException
Indicates whether the current row has been updated. The value returned depends on whether or not the result set can detect updates.
Returns:
true if the row has been visibly updated by the owner or another, and updates are detected
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
DatabaseMetaData.updatesAreDetected(int), What Is in the JDBC 2.0 API

rowInserted

public boolean rowInserted()
                    throws SQLException
Indicates whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts.
Returns:
true if a row has had an insertion and insertions are detected; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
DatabaseMetaData.insertsAreDetected(int), What Is in the JDBC 2.0 API

rowDeleted

public boolean rowDeleted()
                   throws SQLException
Indicates whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not this ResultSet object can detect deletions.
Returns:
true if a row was deleted and deletions are detected; false otherwise
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
DatabaseMetaData.deletesAreDetected(int), What Is in the JDBC 2.0 API

updateNull

public void updateNull(int columnIndex)
                throws SQLException
Gives a nullable column a null value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBoolean

public void updateBoolean(int columnIndex,
                          boolean x)
                   throws SQLException
Updates the designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateByte

public void updateByte(int columnIndex,
                       byte x)
                throws SQLException
Updates the designated column with a byte value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateShort

public void updateShort(int columnIndex,
                        short x)
                 throws SQLException
Updates the designated column with a short value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateInt

public void updateInt(int columnIndex,
                      int x)
               throws SQLException
Updates the designated column with an int value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateLong

public void updateLong(int columnIndex,
                       long x)
                throws SQLException
Updates the designated column with a long value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateFloat

public void updateFloat(int columnIndex,
                        float x)
                 throws SQLException
Updates the designated column with a float value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateDouble

public void updateDouble(int columnIndex,
                         double x)
                  throws SQLException
Updates the designated column with a double value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBigDecimal

public void updateBigDecimal(int columnIndex,
                             BigDecimal x)
                      throws SQLException
Updates the designated column with a java.math.BigDecimal value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateString

public void updateString(int columnIndex,
                         String x)
                  throws SQLException
Updates the designated column with a String value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBytes

public void updateBytes(int columnIndex,
                        byte[] x)
                 throws SQLException
Updates the designated column with a byte array value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateDate

public void updateDate(int columnIndex,
                       Date x)
                throws SQLException
Updates the designated column with a java.sql.Date value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateTime

public void updateTime(int columnIndex,
                       Time x)
                throws SQLException
Updates the designated column with a java.sql.Time value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateTimestamp

public void updateTimestamp(int columnIndex,
                            Timestamp x)
                     throws SQLException
Updates the designated column with a java.sql.Timestamp value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateAsciiStream

public void updateAsciiStream(int columnIndex,
                              InputStream x,
                              int length)
                       throws SQLException
Updates the designated column with an ascii stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBinaryStream

public void updateBinaryStream(int columnIndex,
                               InputStream x,
                               int length)
                        throws SQLException
Updates the designated column with a binary stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateCharacterStream

public void updateCharacterStream(int columnIndex,
                                  Reader x,
                                  int length)
                           throws SQLException
Updates the designated column with a character stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateObject

public void updateObject(int columnIndex,
                         Object x,
                         int scale)
                  throws SQLException
Updates the designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
scale - for java.sql.Types.DECIMA or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types this value will be ignored.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateObject

public void updateObject(int columnIndex,
                         Object x)
                  throws SQLException
Updates the designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateNull

public void updateNull(String columnName)
                throws SQLException
Updates the designated column with a null value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBoolean

public void updateBoolean(String columnName,
                          boolean x)
                   throws SQLException
Updates the designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateByte

public void updateByte(String columnName,
                       byte x)
                throws SQLException
Updates the designated column with a byte value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateShort

public void updateShort(String columnName,
                        short x)
                 throws SQLException
Updates the designated column with a short value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateInt

public void updateInt(String columnName,
                      int x)
               throws SQLException
Updates the designated column with an int value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateLong

public void updateLong(String columnName,
                       long x)
                throws SQLException
Updates the designated column with a long value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateFloat

public void updateFloat(String columnName,
                        float x)
                 throws SQLException
Updates the designated column with a float value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateDouble

public void updateDouble(String columnName,
                         double x)
                  throws SQLException
Updates the designated column with a double value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBigDecimal

public void updateBigDecimal(String columnName,
                             BigDecimal x)
                      throws SQLException
Updates the designated column with a java.sql.BigDecimal value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateString

public void updateString(String columnName,
                         String x)
                  throws SQLException
Updates the designated column with a String value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBytes

public void updateBytes(String columnName,
                        byte[] x)
                 throws SQLException
Updates the designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. JDBC 2.0 Updates a column with a byte array value. The updateXXX methods are used to update column values in the current row, or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateDate

public void updateDate(String columnName,
                       Date x)
                throws SQLException
Updates the designated column with a java.sql.Date value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateTime

public void updateTime(String columnName,
                       Time x)
                throws SQLException
Updates the designated column with a java.sql.Time value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateTimestamp

public void updateTimestamp(String columnName,
                            Timestamp x)
                     throws SQLException
Updates the designated column with a java.sql.Timestamp value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateAsciiStream

public void updateAsciiStream(String columnName,
                              InputStream x,
                              int length)
                       throws SQLException
Updates the designated column with an ascii stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateBinaryStream

public void updateBinaryStream(String columnName,
                               InputStream x,
                               int length)
                        throws SQLException
Updates the designated column with a binary stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateCharacterStream

public void updateCharacterStream(String columnName,
                                  Reader reader,
                                  int length)
                           throws SQLException
Updates the designated column with a character stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
length - the length of the stream
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateObject

public void updateObject(String columnName,
                         Object x,
                         int scale)
                  throws SQLException
Updates the designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
scale - for java.sql.Types.DECIMA or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types this value will be ignored.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateObject

public void updateObject(String columnName,
                         Object x)
                  throws SQLException
Updates the designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
columnName - the name of the column
x - the new column value
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

insertRow

public void insertRow()
               throws SQLException
Inserts the contents of the insert row into this ResultSet objaect and into the database. The cursor must be on the insert row when this method is called.
Throws:
SQLException - if a database access error occurs, if this method is called when the cursor is not on the insert row, or if not all of non-nullable columns in the insert row have been given a value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

updateRow

public void updateRow()
               throws SQLException
Updates the underlying database with the new contents of the current row of this ResultSet object. This method cannot be called when the cursor is on the insert row.
Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

deleteRow

public void deleteRow()
               throws SQLException
Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row.
Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

refreshRow

public void refreshRow()
                throws SQLException
Refreshes the current row with its most recent value in the database. This method cannot be called when the cursor is on the insert row.

The refreshRow method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one.

All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow is called after calling an updateXXX method, but before calling the method updateRow, then the updates made to the row are lost. Calling the method refreshRow frequently will likely slow performance.

Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

cancelRowUpdates

public void cancelRowUpdates()
                      throws SQLException
Cancels the updates made to the current row in this ResultSet object. This method may be called after calling an updateXXX method(s) and before calling the method updateRow to roll back the updates made to a row. If no updates have been made or updateRow has already been called, this method has no effect.
Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

moveToInsertRow

public void moveToInsertRow()
                     throws SQLException
Moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updateXXX methods prior to inserting the row into the result set. Only the updateXXX, getXXX, and insertRow methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow. An updateXXX method must be called before a getXXX method can be called on a column value.
Throws:
SQLException - if a database access error occurs or the result set is not updatable
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

moveToCurrentRow

public void moveToCurrentRow()
                      throws SQLException
Moves the cursor to the remembered cursor position, usually the current row. This method has no effect if the cursor is not on the insert row.
Throws:
SQLException - if a database access error occurs or the result set is not updatable
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getStatement

public Statement getStatement()
                       throws SQLException
Returns the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method returns null.
Returns:
the Statment object that produced this ResultSet object or null if the result set was produced some other way
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getObject

public Object getObject(int i,
                        Map map)
                 throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method uses the given Map object for the custom mapping of the SQL structured or distinct type that is being retrieved.
Parameters:
i - the first column is 1, the second is 2, ...
map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
Returns:
an Object in the Java programming language representing the SQL value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getRef

public Ref getRef(int i)
           throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Ref object representing an SQL REF value
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBlob

public Blob getBlob(int i)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Blob object representing the SQL BLOB value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getClob

public Clob getClob(int i)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Clob object representing the SQL CLOB value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Array getArray(int i)
               throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
an Array object representing the SQL ARRAY value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getObject

public Object getObject(String colName,
                        Map map)
                 throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method uses the specified Map object for custom mapping if appropriate.
Parameters:
colName - the name of the column from which to retrieve the value
map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
Returns:
an Object representing the SQL value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getRef

public Ref getRef(String colName)
           throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Parameters:
colName - the column name
Returns:
a Ref object representing the SQL REF value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getBlob

public Blob getBlob(String colName)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
a Blob object representing the SQL BLOB value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getClob

public Clob getClob(String colName)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
a Clob object representing the SQL CLOB value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getArray

public Array getArray(String colName)
               throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
an Array object representing the SQL ARRAY value in the specified column
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getDate

public Date getDate(int columnIndex,
                    Calendar cal)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the date
Returns:
the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getDate

public Date getDate(String columnName,
                    Calendar cal)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.
Parameters:
columnName - the SQL name of the column from which to retrieve the value
cal - the java.util.Calendar object to use in constructing the date
Returns:
the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getTime

public Time getTime(int columnIndex,
                    Calendar cal)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the time
Returns:
the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getTime

public Time getTime(String columnName,
                    Calendar cal)
             throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.
Parameters:
columnName - the SQL name of the column
cal - the java.util.Calendar object to use in constructing the time
cal - the calendar to use in constructing the time
Returns:
the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getTimestamp

public Timestamp getTimestamp(int columnIndex,
                              Calendar cal)
                       throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the timestamp
Returns:
the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getTimestamp

public Timestamp getTimestamp(String columnName,
                              Calendar cal)
                       throws SQLException
Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.
Parameters:
columnName - the SQL name of the column
cal - the java.util.Calendar object to use in constructing the date
Returns:
the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


ResultSetMetaData

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface ResultSetMetaData

public interface ResultSetMetaData

An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.

     ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
     ResultSetMetaData rsmd = rs.getMetaData();
     int numberOfColumns = rsmd.getColumnCount();
     boolean b = rsmd.isSearchable(1);

Field Summary
static int | columnNoNulls The constant indicating that a column does not allow NULL values.
static int | columnNullable The constant indicating that a column allows NULL values.
static int | columnNullableUnknown The constant indicating that the nullability of a column's values is unknown.
Method Summary
String | getCatalogName(int column) Gets the designated column's table's catalog name.
String | getColumnClassName(int column) Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
int | getColumnCount() Returns the number of columns in this ResultSet object.
int | getColumnDisplaySize(int column) Indicates the designated column's normal maximum width in characters.
String | getColumnLabel(int column) Gets the designated column's suggested title for use in printouts and displays.
String | getColumnName(int column) Get the designated column's name.
int | getColumnType(int column) Retrieves the designated column's SQL type.
String | getColumnTypeName(int column) Retrieves the designated column's database-specific type name.
int | getPrecision(int column) Get the designated column's number of decimal digits.
int | getScale(int column) Gets the designated column's number of digits to right of the decimal point.
String | getSchemaName(int column) Get the designated column's table's schema.
String | getTableName(int column) Gets the designated column's table name.
boolean | isAutoIncrement(int column) Indicates whether the designated column is automatically numbered, thus read-only.
boolean | isCaseSensitive(int column) Indicates whether a column's case matters.
boolean | isCurrency(int column) Indicates whether the designated column is a cash value.
boolean | isDefinitelyWritable(int column) Indicates whether a write on the designated column will definitely succeed.
int | isNullable(int column) Indicates the nullability of values in the designated column.
boolean | isReadOnly(int column) Indicates whether the designated column is definitely not writable.
boolean | isSearchable(int column) Indicates whether the designated column can be used in a where clause.
boolean | isSigned(int column) Indicates whether values in the designated column are signed numbers.
boolean | isWritable(int column) Indicates whether it is possible for a write on the designated column to succeed.

Field Detail

columnNoNulls

public static final int columnNoNulls
The constant indicating that a column does not allow NULL values.

columnNullable

public static final int columnNullable
The constant indicating that a column allows NULL values.

columnNullableUnknown

public static final int columnNullableUnknown
The constant indicating that the nullability of a column's values is unknown.
Method Detail

getColumnCount

public int getColumnCount()
                   throws SQLException
Returns the number of columns in this ResultSet object.
Returns:
the number of columns
Throws:
SQLException - if a database access error occurs

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws SQLException
Indicates whether the designated column is automatically numbered, thus read-only.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws SQLException
Indicates whether a column's case matters.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isSearchable

public boolean isSearchable(int column)
                     throws SQLException
Indicates whether the designated column can be used in a where clause.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isCurrency

public boolean isCurrency(int column)
                   throws SQLException
Indicates whether the designated column is a cash value.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isNullable

public int isNullable(int column)
               throws SQLException
Indicates the nullability of values in the designated column.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown
Throws:
SQLException - if a database access error occurs

isSigned

public boolean isSigned(int column)
                 throws SQLException
Indicates whether values in the designated column are signed numbers.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws SQLException
Indicates the designated column's normal maximum width in characters.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the normal maximum number of characters allowed as the width of the designated column
Throws:
SQLException - if a database access error occurs

getColumnLabel

public String getColumnLabel(int column)
                      throws SQLException
Gets the designated column's suggested title for use in printouts and displays.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the suggested column title
Throws:
SQLException - if a database access error occurs

getColumnName

public String getColumnName(int column)
                     throws SQLException
Get the designated column's name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
column name
Throws:
SQLException - if a database access error occurs

getSchemaName

public String getSchemaName(int column)
                     throws SQLException
Get the designated column's table's schema.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
schema name or "" if not applicable
Throws:
SQLException - if a database access error occurs

getPrecision

public int getPrecision(int column)
                 throws SQLException
Get the designated column's number of decimal digits.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
precision
Throws:
SQLException - if a database access error occurs

getScale

public int getScale(int column)
             throws SQLException
Gets the designated column's number of digits to right of the decimal point.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
scale
Throws:
SQLException - if a database access error occurs

getTableName

public String getTableName(int column)
                    throws SQLException
Gets the designated column's table name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
table name or "" if not applicable
Throws:
SQLException - if a database access error occurs

getCatalogName

public String getCatalogName(int column)
                      throws SQLException
Gets the designated column's table's catalog name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
column name or "" if not applicable
Throws:
SQLException - if a database access error occurs

getColumnType

public int getColumnType(int column)
                  throws SQLException
Retrieves the designated column's SQL type.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
SQL type from java.sql.Types
Throws:
SQLException - if a database access error occurs
See Also:
Types

getColumnTypeName

public String getColumnTypeName(int column)
                         throws SQLException
Retrieves the designated column's database-specific type name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned.
Throws:
SQLException - if a database access error occurs

isReadOnly

public boolean isReadOnly(int column)
                   throws SQLException
Indicates whether the designated column is definitely not writable.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isWritable

public boolean isWritable(int column)
                   throws SQLException
Indicates whether it is possible for a write on the designated column to succeed.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws SQLException
Indicates whether a write on the designated column will definitely succeed.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs

getColumnClassName

public String getColumnClassName(int column)
                          throws SQLException

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.

Returns:
the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLData

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface SQLData

public interface SQLData

The interface used for the custom mapping of SQL user-defined types. This interface must be implemented by any Java class that is registered in a type mapping. It is expected that this interface will normally be implemented by a tool. The methods in this interface are called by the driver and are never called by a programmer directly.

Since:
1.2
See Also:
What Is in the JDBC 2.0 API

Method Summary
String | getSQLTypeName() Returns the fully-qualified name of the SQL user-defined type that this object represents.
void | readSQL(SQLInput stream, String typeName) Populates this object with data read from the database.
void | writeSQL(SQLOutput stream) Writes this object to the given SQL data stream, converting it back to its SQL value in the data source.

Method Detail

getSQLTypeName

public String getSQLTypeName()
                      throws SQLException
Returns the fully-qualified name of the SQL user-defined type that this object represents. This method is called by the JDBC driver to get the name of the UDT instance that is being mapped to this instance of SQLData.
Returns:
the type name that was passed to the method readSql when this object was constructed and populated
Throws:
SQLException - if there is a database access error
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

readSQL

public void readSQL(SQLInput stream,
                    String typeName)
             throws SQLException
Populates this object with data read from the database. The implementation of the method must follow this protocol:
  • It must read each of the attributes or elements of the SQL type from the given input stream. This is done by calling a method of the input stream to read each item, in the order that they appear in the SQL definition of the type.
  • The method readSQL then assigns the data to appropriate fields or elements (of this or other objects). Specifically, it must call the appropriate SQLInput.readXXX method(s) to do the following: for a distinct type, read its single data element; for a structured type, read a value for each attribute of the SQL type.
The JDBC driver initializes the input stream with a type map before calling this method, which is used by the appropriate SQLInput.readXXX method on the stream.
Parameters:
stream - the SQLInput object from which to read the data for the value that is being custom mapped
typeName - the SQL type name of the value on the data stream
Throws:
SQLException - if there is a database access error
See Also:
SQLInput

writeSQL

public void writeSQL(SQLOutput stream)
              throws SQLException
Writes this object to the given SQL data stream, converting it back to its SQL value in the data source. The implementation of the method must follow this protocol:
It must write each of the attributes of the SQL type to the given output stream. This is done by calling a method of the output stream to write each item, in the order that they appear in the SQL definition of the type. Specifically, it must call the appropriate SQLOutput.writeXXX method(s) to do the following: for a Distinct Type, write its single data element; for a Structured Type, write a value for each attribute of the SQL type.
Parameters:
stream - the SQLOutput object to which to write the data for the value that was custom mapped
Throws:
SQLException - if there is a database access error
Since:
1.2
See Also:
SQLOutput, What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class SQLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.sql.SQLException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BatchUpdateException, SQLWarning
public class SQLException
extends Exception

An exception that provides information on a database access error or other errors.

Each SQLException provides several kinds of information:

  • a string describing the error. This is used as the Java Exception message, available via the method getMesage.
  • a "SQLstate" string, which follows the XOPEN SQLstate conventions. The values of the SQLState string are described in the XOPEN SQL spec.
  • an integer error code that is specific to each vendor. Normally this will be the actual error code returned by the underlying database.
  • a chain to a next Exception. This can be used to provide additional error information.

See Also:
Serialized Form

Constructor Summary
SQLException()
Constructs an SQLException object; reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.
SQLException(String reason)
Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.
SQLException(String reason, String SQLState)
Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.
SQLException(String reason, String SQLState, int vendorCode)
Constructs a fully-specified SQLException object.
Method Summary
int | getErrorCode() Retrieves the vendor-specific exception code for this SQLException object.
SQLException | getNextException() Retrieves the exception chained to this SQLException object.
String | getSQLState() Retrieves the SQLState for this SQLException object.
void | setNextException(SQLException ex) Adds an SQLException object to the end of the chain.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SQLException

public SQLException(String reason,
                    String SQLState,
                    int vendorCode)
Constructs a fully-specified SQLException object.
Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception
vendorCode - a database vendor-specific exception code

SQLException

public SQLException(String reason,
                    String SQLState)
Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.
Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception

SQLException

public SQLException(String reason)
Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.
Parameters:
reason - a description of the exception

SQLException

public SQLException()
Constructs an SQLException object; reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.
Method Detail

getSQLState

public String getSQLState()
Retrieves the SQLState for this SQLException object.
Returns:
the SQLState value

getErrorCode

public int getErrorCode()
Retrieves the vendor-specific exception code for this SQLException object.
Returns:
the vendor's error code

getNextException

public SQLException getNextException()
Retrieves the exception chained to this SQLException object.
Returns:
the next SQLException object in the chain; null if there are none

setNextException

public void setNextException(SQLException ex)
Adds an SQLException object to the end of the chain.
Parameters:
ex - the new exception that will be added to the end of the SQLException chain
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface SQLInput

public interface SQLInput

An input stream that contains a stream of values representing an instance of an SQL structured or distinct type. This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes SQLInput methods. The readXXX methods provide a way to read the values in an SQLInput object. The method wasNull is used to determine whether the the last value read was SQL NULL.

When the method getObject is called with an object of a class implementing the interface SQLData, the JDBC driver calls the method SQLData.getSQLType to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an instance of SQLInput, populating it with the attributes of the UDT. The driver then passes the input stream to the method SQLData.readSQL, which in turn calls the SQLInput.readXXX methods in its implementation for reading the attributes from the input stream.

Since:
1.2
See Also:
What Is in the JDBC 2.0 API

Method Summary
Array | readArray() Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
InputStream | readAsciiStream() Returns the next attribute in the stream as a stream of ASCII characters.
BigDecimal | readBigDecimal() Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language.
InputStream | readBinaryStream() Returns the next attribute in the stream as a stream of uninterpreted bytes.
Blob | readBlob() Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
boolean | readBoolean() Reads the next attribute in the stream as a boolean in the Java programming language.
byte | readByte() Reads the next attribute in the stream as a byte in the Java programming language.
byte[] | readBytes() Reads the next attribute in the stream as an array of bytes in the Java programming language.
Reader | readCharacterStream() Returns the next attribute in the stream as a stream of Unicode characters.
Clob | readClob() Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
Date | readDate() Reads the next attribute in the stream as a java.sql.Date object.
double | readDouble() Reads the next attribute in the stream as a double in the Java programming language.
float | readFloat() Reads the next attribute in the stream as a float in the Java programming language.
int | readInt() Reads the next attribute in the stream as an int in the Java programming language.
long | readLong() Reads the next attribute in the stream as a long in the Java programming language.
Object | readObject() Returns the datum at the head of the stream as an Object in the Java programming language.
Ref | readRef() Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
short | readShort() Reads the next attribute in the stream as a short in the Java programming language.
String | readString() Reads the next attribute in the stream as a String in the Java programming language.
Time | readTime() Reads the next attribute in the stream as a java.sql.Time object.
Timestamp | readTimestamp() Reads the next attribute in the stream as a java.sql.Timestamp object.
boolean | wasNull() Determines whether the last value read was SQL NULL.

Method Detail

readString

public String readString()
                  throws SQLException
Reads the next attribute in the stream as a String in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readBoolean

public boolean readBoolean()
                    throws SQLException
Reads the next attribute in the stream as a boolean in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns false
Throws:
SQLException - if a database access error occurs

readByte

public byte readByte()
              throws SQLException
Reads the next attribute in the stream as a byte in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readShort

public short readShort()
                throws SQLException
Reads the next attribute in the stream as a short in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readInt

public int readInt()
            throws SQLException
Reads the next attribute in the stream as an int in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readLong

public long readLong()
              throws SQLException
Reads the next attribute in the stream as a long in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readFloat

public float readFloat()
                throws SQLException
Reads the next attribute in the stream as a float in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readDouble

public double readDouble()
                  throws SQLException
Reads the next attribute in the stream as a double in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns 0
Throws:
SQLException - if a database access error occurs

readBigDecimal

public BigDecimal readBigDecimal()
                          throws SQLException
Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readBytes

public byte[] readBytes()
                 throws SQLException
Reads the next attribute in the stream as an array of bytes in the Java programming language.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readDate

public Date readDate()
              throws SQLException
Reads the next attribute in the stream as a java.sql.Date object.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readTime

public Time readTime()
              throws SQLException
Reads the next attribute in the stream as a java.sql.Time object.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readTimestamp

public Timestamp readTimestamp()
                        throws SQLException
Reads the next attribute in the stream as a java.sql.Timestamp object.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readCharacterStream

public Reader readCharacterStream()
                           throws SQLException
Returns the next attribute in the stream as a stream of Unicode characters.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readAsciiStream

public InputStream readAsciiStream()
                            throws SQLException
Returns the next attribute in the stream as a stream of ASCII characters.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readBinaryStream

public InputStream readBinaryStream()
                             throws SQLException
Returns the next attribute in the stream as a stream of uninterpreted bytes.
Returns:
the attribute; if the value is SQL NULL, returns null
Throws:
SQLException - if a database access error occurs

readObject

public Object readObject()
                  throws SQLException
Returns the datum at the head of the stream as an Object in the Java programming language. The actual type of the object returned is determined by the default type mapping, and any customizations present in this stream's type map.

A type map is registered with the stream by the JDBC driver before the stream is passed to the application.

When the datum at the head of the stream is an SQL NULL, the method returns null. If the datum is an SQL structured or distinct type, it determines the SQL type of the datum at the head of the stream. If the stream's type map has an entry for that SQL type, the driver constructs an object of the appropriate class and calls the method SQLData.readSQL on that object, which reads additional data from the stream, using the protocol described for that method.

Returns:
the datum at the head of the stream as an Object in the Java programming language;null if the datum is SQL NULL
Throws:
SQLException - if a database access error occurs

readRef

public Ref readRef()
            throws SQLException
Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
Returns:
a Ref object representing the SQL REF value at the head of the stream; null if the value read is SQL NULL
Throws:
SQLException - if a database access error occurs

readBlob

public Blob readBlob()
              throws SQLException
Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
Returns:
a Blob object representing data of the SQL BLOB value at the head of the stream; null if the value read is SQL NULL
Throws:
SQLException - if a database access error occurs

readClob

public Clob readClob()
              throws SQLException
Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
Returns:
a Clob object representing data of the SQL CLOB value at the head of the stream; null if the value read is SQL NULL
Throws:
SQLException - if a database access error occurs

readArray

public Array readArray()
                throws SQLException
Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
Returns:
an Array object representing data of the SQL ARRAY value at the head of the stream; null if the value read is SQL NULL
Throws:
SQLException - if a database access error occurs

wasNull

public boolean wasNull()
                throws SQLException
Determines whether the last value read was SQL NULL.
Returns:
true if the most recently read SQL value was SQL NULL; otherwise, false
Throws:
SQLException - if a database access error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface SQLOutput

public interface SQLOutput

The output stream for writing the attributes of a user-defined type back to the database. This interface, used only for custom mapping, is used by the driver, and its methods are never directly invoked by a programmer.

When an object of a class implementing the interface SQLData is passed as an argument to an SQL statement, the JDBC driver calls the method SQLData.getSQLType to determine the kind of SQL datum being passed to the database. The driver then creates an instance of SQLOutput and passes it to the method SQLData.writeSQL. The method writeSQL in turn calls the appropriate SQLOutput.writeXXX methods to write data from the SQLData object to the SQLOutput output stream as the representation of an SQL user-defined type.

Since:
1.2
See Also:
What Is in the JDBC 2.0 API

Method Summary
void | writeArray(Array x) Writes an SQL ARRAY value to the stream.
void | writeAsciiStream(InputStream x) Writes the next attribute to the stream as a stream of ASCII characters.
void | writeBigDecimal(BigDecimal x) Writes the next attribute to the stream as a java.math.BigDecimal object.
void | writeBinaryStream(InputStream x) Writes the next attribute to the stream as a stream of uninterpreted bytes.
void | writeBlob(Blob x) Writes an SQL BLOB value to the stream.
void | writeBoolean(boolean x) Writes the next attribute to the stream as a Java boolean.
void | writeByte(byte x) Writes the next attribute to the stream as a Java byte.
void | writeBytes(byte[] x) Writes the next attribute to the stream as an array of bytes.
void | writeCharacterStream(Reader x) Writes the next attribute to the stream as a stream of Unicode characters.
void | writeClob(Clob x) Writes an SQL CLOB value to the stream.
void | writeDate(Date x) Writes the next attribute to the stream as a java.sql.Date object.
void | writeDouble(double x) Writes the next attribute to the stream as a Java double.
void | writeFloat(float x) Writes the next attribute to the stream as a Java float.
void | writeInt(int x) Writes the next attribute to the stream as a Java int.
void | writeLong(long x) Writes the next attribute to the stream as a Java long.
void | writeObject(SQLData x) Writes to the stream the data contained in the given SQLData object.
void | writeRef(Ref x) Writes an SQL REF value to the stream.
void | writeShort(short x) Writes the next attribute to the stream as a Java short.
void | writeString(String x) Writes the next attribute to the stream as a String in the Java programming language.
void | writeStruct(Struct x) Writes an SQL structured type value to the stream.
void | writeTime(Time x) Writes the next attribute to the stream as a java.sql.Time object.
void | writeTimestamp(Timestamp x) Writes the next attribute to the stream as a java.sql.Timestamp object.

Method Detail

writeString

public void writeString(String x)
                 throws SQLException
Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeBoolean

public void writeBoolean(boolean x)
                  throws SQLException
Writes the next attribute to the stream as a Java boolean. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeByte

public void writeByte(byte x)
               throws SQLException
Writes the next attribute to the stream as a Java byte. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeShort

public void writeShort(short x)
                throws SQLException
Writes the next attribute to the stream as a Java short. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeInt

public void writeInt(int x)
              throws SQLException
Writes the next attribute to the stream as a Java int. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeLong

public void writeLong(long x)
               throws SQLException
Writes the next attribute to the stream as a Java long. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeFloat

public void writeFloat(float x)
                throws SQLException
Writes the next attribute to the stream as a Java float. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeDouble

public void writeDouble(double x)
                 throws SQLException
Writes the next attribute to the stream as a Java double. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeBigDecimal

public void writeBigDecimal(BigDecimal x)
                     throws SQLException
Writes the next attribute to the stream as a java.math.BigDecimal object. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeBytes

public void writeBytes(byte[] x)
                throws SQLException
Writes the next attribute to the stream as an array of bytes. Writes the next attribute to the stream as a String in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeDate

public void writeDate(Date x)
               throws SQLException
Writes the next attribute to the stream as a java.sql.Date object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeTime

public void writeTime(Time x)
               throws SQLException
Writes the next attribute to the stream as a java.sql.Time object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeTimestamp

public void writeTimestamp(Timestamp x)
                    throws SQLException
Writes the next attribute to the stream as a java.sql.Timestamp object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeCharacterStream

public void writeCharacterStream(Reader x)
                          throws SQLException
Writes the next attribute to the stream as a stream of Unicode characters.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeAsciiStream

public void writeAsciiStream(InputStream x)
                      throws SQLException
Writes the next attribute to the stream as a stream of ASCII characters.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeBinaryStream

public void writeBinaryStream(InputStream x)
                       throws SQLException
Writes the next attribute to the stream as a stream of uninterpreted bytes.
Parameters:
x - the value to pass to the database
Throws:
SQLException - if a database access error occurs

writeObject

public void writeObject(SQLData x)
                 throws SQLException
Writes to the stream the data contained in the given SQLData object. When the SQLData object is null, this method writes an SQL NULL to the stream. Otherwise, it calls the SQLData.writeSQL method of the given object, which writes the object's attributes to the stream. The implementation of the method SQLData.writeSQ calls the appropriate SQLOutput.writeXXX method(s) for writing each of the object's attributes in order. The attributes must be read from an SQLInput input stream and written to an SQLOutput output stream in the same order in which they were listed in the SQL definition of the user-defined type.
Parameters:
x - the object representing data of an SQL structured or distinct type
Throws:
SQLException - if a database access error occurs

writeRef

public void writeRef(Ref x)
              throws SQLException
Writes an SQL REF value to the stream.
Parameters:
x - a Ref object representing data of an SQL REF value
Throws:
SQLException - if a database access error occurs

writeBlob

public void writeBlob(Blob x)
               throws SQLException
Writes an SQL BLOB value to the stream.
Parameters:
x - a Blob object representing data of an SQL BLOB value
Throws:
SQLException - if a database access error occurs

writeClob

public void writeClob(Clob x)
               throws SQLException
Writes an SQL CLOB value to the stream.
Parameters:
x - a Clob object representing data of an SQL CLOB value
Throws:
SQLException - if a database access error occurs

writeStruct

public void writeStruct(Struct x)
                 throws SQLException
Writes an SQL structured type value to the stream.
Parameters:
x - a Struct object representing data of an SQL structured type
Throws:
SQLException - if a database access error occurs

writeArray

public void writeArray(Array x)
                throws SQLException
Writes an SQL ARRAY value to the stream.
Parameters:
x - an Array object representing data of an SQL ARRAY type
Throws:
SQLException - if a database access error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class SQLPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.sql.SQLPermission
All Implemented Interfaces:
Guard, Serializable
public final class SQLPermission
extends BasicPermission

The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods. These methods include those in the following list.

  • DriverManager.setLogWriter
  • DriverManager.setLogStream (deprecated)
  • javax.sql.DataSource.setLogWriter
  • javax.sql.ConnectionPoolDataSource.setLogWriter
  • javax.sql.XADataSource.setLogWriter
If there is no SQLPermission object, this method throws a java.lang.SecurityException as a runtime exception.

A SQLPermission object contains a name (also referred to as a "target name") but no actions list; there is either a named permission or there is not. The target name is the name of the permission (see below). The naming convention follows the hierarchical property naming convention. In addition, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: loadLibrary.* or * is valid, but *loadLibrary or a*b is not valid.

The following table lists all the possible SQLPermission target names. Currently, the only name allowed is setLog. The table gives a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
setLog | Setting of the logging stream | This is a dangerous permission to grant. The contents of the log may contain usernames and passwords, SQL statements, and SQL data.
The person running an applet decides what permissions to allow and will run the Policy Tool to create an SQLPermission in a policy file. A programmer does not use a constructor directly to create an instance of SQLPermission but rather uses a tool.

Since:
1.3
See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
SQLPermission(String name)
Creates a new SQLPermission object with the specified name.
SQLPermission(String name, String actions)
Creates a new SQLPermission object with the specified name.
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SQLPermission

public SQLPermission(String name)
Creates a new SQLPermission object with the specified name. The name is the symbolic name of the SQLPermission; currently, the only name allowed is "setLog".
Parameters:
name - the name of this SQLPermission object, which must be setLog

SQLPermission

public SQLPermission(String name,
                     String actions)
Creates a new SQLPermission object with the specified name. The name is the symbolic name of the SQLPermission; the actions String is currently unused and should be null.
Parameters:
name - the name of this SQLPermission object, which must be setLog
actions - should be null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SQLWarning

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Class SQLWarning

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.sql.SQLException
                    |
                    +--java.sql.SQLWarning
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataTruncation
public class SQLWarning
extends SQLException

An exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be reported.

See Also:
Connection.getWarnings(),
Statement.getWarnings(),
ResultSet.getWarnings(), Serialized Form

Constructor Summary
SQLWarning()
Constructs a default SQLWarning object.
SQLWarning(String reason)
Constructs an SQLWarning object with the given value for a reason; SQLState defaults to null, and vendorCode defaults to 0.
SQLWarning(String reason, String SQLstate)
Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.
SQLWarning(String reason, String SQLstate, int vendorCode)
Constructs a fully-specified SQLWarning object initialized with the given values.
Method Summary
SQLWarning | getNextWarning() Retrieves the warning chained to this SQLWarning object.
void | setNextWarning(SQLWarning w) Adds an SQLWarning object to the end of the chain.
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SQLWarning

public SQLWarning(String reason,
                  String SQLstate,
                  int vendorCode)
Constructs a fully-specified SQLWarning object initialized with the given values.
Parameters:
reason - a description of the warning
SQLState - an XOPEN code identifying the warning
vendorCode - a database vendor-specific warning code

SQLWarning

public SQLWarning(String reason,
                  String SQLstate)
Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.
Parameters:
reason - a description of the warning
SQLState - an XOPEN code identifying the warning

SQLWarning

public SQLWarning(String reason)
Constructs an SQLWarning object with the given value for a reason; SQLState defaults to null, and vendorCode defaults to 0.
Parameters:
reason - a description of the warning

SQLWarning

public SQLWarning()
Constructs a default SQLWarning object. The reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.
Method Detail

getNextWarning

public SQLWarning getNextWarning()
Retrieves the warning chained to this SQLWarning object.
Returns:
the next SQLException in the chain; null if none

setNextWarning

public void setNextWarning(SQLWarning w)
Adds an SQLWarning object to the end of the chain.
Parameters:
w - the new end of the SQLException chain
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Statement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Statement

All Known Subinterfaces:
CallableStatement, PreparedStatement
public interface Statement

The object used for executing a static SQL statement and obtaining the results produced by it.

Only one ResultSet object per Statement object can be open at any point in time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All statement execute methods implicitly close a statment's current ResultSet object if an open one exists.

See Also:
Connection.createStatement(), ResultSet

Method Summary
void | addBatch(String sql) Adds an SQL command to the current batch of commmands for this Statement object.
void | cancel() Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
void | clearBatch() Makes the set of commands in the current batch empty.
void | clearWarnings() Clears all the warnings reported on this Statement object.
void | close() Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
boolean | execute(String sql) Executes an SQL statement that may return multiple results.
int[] | executeBatch() Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
ResultSet | executeQuery(String sql) Executes an SQL statement that returns a single ResultSet object.
int | executeUpdate(String sql) Executes an SQL INSERT, UPDATE or DELETE statement.
Connection | getConnection() Returns the Connection object that produced this Statement object.
int | getFetchDirection() Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
int | getFetchSize() Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object.
int | getMaxFieldSize() Returns the maximum number of bytes allowed for any column value.
int | getMaxRows() Retrieves the maximum number of rows that a ResultSet object can contain.
boolean | getMoreResults() Moves to a Statement object's next result.
int | getQueryTimeout() Retrieves the number of seconds the driver will wait for a Statement object to execute.
ResultSet | getResultSet() Returns the current result as a ResultSet object.
int | getResultSetConcurrency() Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
int | getResultSetType() Retrieves the result set type for ResultSet objects generated by this Statement object.
int | getUpdateCount() Returns the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
SQLWarning | getWarnings() Retrieves the first warning reported by calls on this Statement object.
void | setCursorName(String name) Defines the SQL cursor name that will be used by subsequent Statement object execute methods.
void | setEscapeProcessing(boolean enable) Sets escape processing on or off.
void | setFetchDirection(int direction) Gives the driver a hint as to the direction in which the rows in a result set will be processed.
void | setFetchSize(int rows) Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
void | setMaxFieldSize(int max) Sets the limit for the maximum number of bytes in a column to the given number of bytes.
void | setMaxRows(int max) Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
void | setQueryTimeout(int seconds) Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.

Method Detail

executeQuery

public ResultSet executeQuery(String sql)
                       throws SQLException
Executes an SQL statement that returns a single ResultSet object.
Parameters:
sql - typically this is a static SQL SELECT statement
Returns:
a ResultSet object that contains the data produced by the given query; never null
Throws:
SQLException - if a database access error occurs

executeUpdate

public int executeUpdate(String sql)
                  throws SQLException
Executes an SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.
Parameters:
sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
Throws:
SQLException - if a database access error occurs

close

public void close()
           throws SQLException
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Note: A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed.

Throws:
SQLException - if a database access error occurs

getMaxFieldSize

public int getMaxFieldSize()
                    throws SQLException
Returns the maximum number of bytes allowed for any column value. This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
Returns:
the current max column size limit; zero means unlimited
Throws:
SQLException - if a database access error occurs

setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws SQLException
Sets the limit for the maximum number of bytes in a column to the given number of bytes. This is the maximum number of bytes that can be returned for any column value. This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.
Parameters:
max - the new max column size limit; zero means unlimited
Throws:
SQLException - if a database access error occurs

getMaxRows

public int getMaxRows()
               throws SQLException
Retrieves the maximum number of rows that a ResultSet object can contain. If the limit is exceeded, the excess rows are silently dropped.
Returns:
the current max row limit; zero means unlimited
Throws:
SQLException - if a database access error occurs

setMaxRows

public void setMaxRows(int max)
                throws SQLException
Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped.
Parameters:
max - the new max rows limit; zero means unlimited
Throws:
SQLException - if a database access error occurs

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws SQLException
Sets escape processing on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for prepared statements will have no effect.
Parameters:
enable - true to enable; false to disable
Throws:
SQLException - if a database access error occurs

getQueryTimeout

public int getQueryTimeout()
                    throws SQLException
Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded, a SQLException is thrown.
Returns:
the current query timeout limit in seconds; zero means unlimited
Throws:
SQLException - if a database access error occurs

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws SQLException
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. If the limit is exceeded, an SQLException is thrown.
Parameters:
seconds - the new query timeout limit in seconds; zero means unlimited
Throws:
SQLException - if a database access error occurs

cancel

public void cancel()
            throws SQLException
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. This method can be used by one thread to cancel a statement that is being executed by another thread.
Throws:
SQLException - if a database access error occurs

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
Retrieves the first warning reported by calls on this Statement object. Subsequent Statement object warnings will be chained to this SQLWarning object.

The warning chain is automatically cleared each time a statement is (re)executed.

Note: If you are processing a ResultSet object, any warnings associated with reads on that ResultSet object will be chained on it.

Returns:
the first SQLWarning object or null
Throws:
SQLException - if a database access error occurs

clearWarnings

public void clearWarnings()
                   throws SQLException
Clears all the warnings reported on this Statement object. After a call to this method, the method getWarnings will return null until a new warning is reported for this Statement object.
Throws:
SQLException - if a database access error occurs

setCursorName

public void setCursorName(String name)
                   throws SQLException
Defines the SQL cursor name that will be used by subsequent Statement object execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet object generated by this statement. If the database doesn't support positioned update/delete, this method is a noop. To insure that a cursor has the proper isolation level to support updates, the cursor's SELECT statement should be of the form 'select for update ...'. If the 'for update' phrase is omitted, positioned updates may fail.

Note: By definition, positioned update/delete execution must be done by a different Statement object than the one which generated the ResultSet object being used for positioning. Also, cursor names must be unique within a connection.

Parameters:
name - the new cursor name, which must be unique within a connection
Throws:
SQLException - if a database access error occurs

execute

public boolean execute(String sql)
                throws SQLException
Executes an SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string. The methods execute, getMoreResults, getResultSet, and getUpdateCount let you navigate through multiple results. The execute method executes an SQL statement and indicates the form of the first result. You can then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
Throws:
SQLException - if a database access error occurs
See Also:
getResultSet(),
getUpdateCount(),
getMoreResults()

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Returns the current result as a ResultSet object. This method should be called only once per result.
Returns:
the current result as a ResultSet object; null if the result is an update count or there are no more results
Throws:
SQLException - if a database access error occurs
See Also:
execute(java.lang.String)

getUpdateCount

public int getUpdateCount()
                   throws SQLException
Returns the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. This method should be called only once per result.
Returns:
the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
Throws:
SQLException - if a database access error occurs
See Also:
execute(java.lang.String)

getMoreResults

public boolean getMoreResults()
                       throws SQLException
Moves to a Statement object's next result. It returns true if this result is a ResultSet object. This method also implicitly closes any current ResultSet object obtained with the method getResultSet.

There are no more results when the following is true:

      (!getMoreResults() && (getUpdateCount() == -1)
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
Throws:
SQLException - if a database access error occurs
See Also:
execute(java.lang.String)

setFetchDirection

public void setFetchDirection(int direction)
                       throws SQLException
Gives the driver a hint as to the direction in which the rows in a result set will be processed. The hint applies only to result sets created using this Statement object. The default value is ResultSet.FETCH_FORWARD.

Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.

Parameters:
direction - the initial direction for processing rows
Throws:
SQLException - if a database access error occurs or the given direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getFetchDirection

public int getFetchDirection()
                      throws SQLException
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. If this Statement object has not set a fetch direction by calling the method setFetchDirection, the return value is implementation-specific.
Returns:
the default fetch direction for result sets generated from this Statement object
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

setFetchSize

public void setFetchSize(int rows)
                  throws SQLException
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.
Parameters:
rows - the number of rows to fetch
Throws:
SQLException - if a database access error occurs, or the condition 0 <= rows="rows" <="this.getMaxRows()" is="is" not="not" satisfied.Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getFetchSize

public int getFetchSize()
                 throws SQLException
Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object. If this Statement object has not set a fetch size by calling the method setFetchSize, the return value is implementation-specific.
Returns:
the default fetch size for result sets generated from this Statement object
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws SQLException
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
Returns:
either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

getResultSetType

public int getResultSetType()
                     throws SQLException
Retrieves the result set type for ResultSet objects generated by this Statement object.
Returns:
one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

addBatch

public void addBatch(String sql)
              throws SQLException
Adds an SQL command to the current batch of commmands for this Statement object. This method is optional.
Parameters:
sql - typically this is a static SQL INSERT or UPDATE statement
Throws:
SQLException - if a database access error occurs, or the driver does not support batch statements
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

clearBatch

public void clearBatch()
                throws SQLException
Makes the set of commands in the current batch empty. This method is optional.
Throws:
SQLException - if a database access error occurs or the driver does not support batch statements
Since:
1.2
See Also:
What Is in the JDBC 2.0 API

executeBatch

public int[] executeBatch()
                   throws SQLException
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
  1. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
  2. A value of -2 -- indicates that the command was processed successfully but that the number of rows affected is unknown

    If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands. If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:

  3. A value of -3 -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails

A driver is not required to implement this method. The possible implementations and return values have been modified in the Java 2 SDK, Standard Edition, version 1.3 to accommodate the option of continuing to proccess commands in a batch update after a BatchUpdateException obejct has been thrown.

Returns:
an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
Throws:
SQLException - if a database access error occurs or the driver does not support batch statements. Throws BatchUpdateException (a subclass of SQLException) if one of the commands sent to the database fails to execute properly or attempts to return a result set.
Since:
1.3
See Also:
What Is in the JDBC 2.0 API

getConnection

public Connection getConnection()
                         throws SQLException
Returns the Connection object that produced this Statement object.
Returns:
the connection that produced this statement
Throws:
SQLException - if a database access error occurs
Since:
1.2
See Also:
What Is in the JDBC 2.0 API
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Struct

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Interface Struct

public interface Struct

The standard mapping in the Java programming language for an SQL structured type. A Struct object contains a value for each attribute of the SQL structured type that it represents. By default, an instance ofStruct is valid as long as the application has a reference to it.

Since:
1.2
See Also:
What Is in the JDBC 2.0 API

Method Summary
Object[] | getAttributes() Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
Object[] | getAttributes(Map map) Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
String | getSQLTypeName() Retrieves the SQL type name of the SQL structured type that this Struct object represents.

Method Detail

getSQLTypeName

public String getSQLTypeName()
                      throws SQLException
Retrieves the SQL type name of the SQL structured type that this Struct object represents.
Throws:
SQLException - if a database access error occurs

getAttributes

public Object[] getAttributes()
                       throws SQLException
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents. This method uses the type map associated with the connection for customizations of the type mappings. If there is no entry in the connection's type map that matches the structured type that this Struct object represents, the driver uses the standard mapping.

Conceptually, this method calls the method getObject on each attribute of the structured type and returns a Java array containing the result.

Returns:
an array containing the ordered attribute values
Throws:
SQLException - if a database access error occurs

getAttributes

public Object[] getAttributes(Map map)
                       throws SQLException
Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents. This method uses the given type map for customizations of the type mappings. If there is no entry in the given type map that matches the structured type that this Struct object represents, the driver uses the standard mapping. This method never uses the type map associated with the connection.

Conceptually, this method calls the method getObject on each attribute of the structured type and returns a Java array containing the result.

Parameters:
map - a mapping of SQL type names to Java classes
Returns:
an array containing the ordered attribute values
Throws:
SQLException - if a database access error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Time

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class Time

java.lang.Object
  |
  +--java.util.Date
        |
        +--java.sql.Time
All Implemented Interfaces:
Cloneable, Comparable, Serializable
public class Time
extends Date

A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value. The Time class adds formatting and parsing operations to support the JDBC escape syntax for time values.

The date components should be set to the "zero epoch" value of January 1, 1970 and should not be accessed.

See Also:
Serialized Form

Constructor Summary
Time(int hour, int minute, int second)
Deprecated. Use the constructor that takes a milliseconds value in place of this constructor
Time(long time)
Constructs a Time object using a milliseconds time value.
Method Summary
int | getDate() Deprecated.
int | getDay() Deprecated.
int | getMonth() Deprecated.
int | getYear() Deprecated.
void | setDate(int i) Deprecated.
void | setMonth(int i) Deprecated.
void | setTime(long time) Sets a Time object using a milliseconds time value.
void | setYear(int i) Deprecated.
String | toString() Formats a time in JDBC date escape format
static Time | valueOf(String s) Converts a string in JDBC time escape format to a Time value.
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, toGMTString, toLocaleString, UTC
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Time

public Time(int hour,
            int minute,
            int second)
Deprecated. Use the constructor that takes a milliseconds value in place of this constructor

Constructs a Time object initialized with the given values for the hour, minute, and second. The driver sets the date components to January 1, 1970. Any method that attempts to access the date components of a Time object will throw a java.lang.IllegalArgumentException.
Parameters:
hour - 0 to 23
minute - 0 to 59
second - 0 to 59

Time

public Time(long time)
Constructs a Time object using a milliseconds time value.
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT
Method Detail

setTime

public void setTime(long time)
Sets a Time object using a milliseconds time value.
Overrides:
setTime in class Date
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT

valueOf

public static Time valueOf(String s)
Converts a string in JDBC time escape format to a Time value.
Parameters:
s - time in format "hh:mm:ss"
Returns:
a corresponding Time object

toString

public String toString()
Formats a time in JDBC date escape format
Overrides:
toString in class Date
Returns:
a String in hh:mm:ss format

getYear

public int getYear()
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a year component.
Overrides:
getYear in class Date
Throws:
IllegalArgumentException - if this method is invoked

getMonth

public int getMonth()
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a month component.
Overrides:
getMonth in class Date
Throws:
IllegalArgumentException - if this method is invoked

getDay

public int getDay()
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a day component.
Overrides:
getDay in class Date
Throws:
IllegalArgumentException - if this method is invoked

getDate

public int getDate()
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a date component.
Overrides:
getDate in class Date
Throws:
IllegalArgumentException - if this method is invoked

setYear

public void setYear(int i)
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a year component.
Overrides:
setYear in class Date
Throws:
IllegalArgumentException - if this method is invoked

setMonth

public void setMonth(int i)
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a month component.
Overrides:
setMonth in class Date
Throws:
IllegalArgumentException - if this method is invoked

setDate

public void setDate(int i)
Deprecated.

This method is deprecated and should not be used because SQL TIME values do not have a date component.
Overrides:
setDate in class Date
Throws:
IllegalArgumentException - if this method is invoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Timestamp

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.sql
Class Timestamp

java.lang.Object
  |
  +--java.util.Date
        |
        +--java.sql.Timestamp
All Implemented Interfaces:
Cloneable, Comparable, Serializable
public class Timestamp
extends Date

A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value. It adds the ability to hold the SQL TIMESTAMP nanos value and provides formatting and parsing operations to support the JDBC escape syntax for timestamp values.

Note: This type is a composite of a java.util.Date and a separate nanoseconds value. Only integral seconds are stored in the java.util.Date component. The fractional seconds - the nanos - are separate. The getTime method will return only integral seconds. If a time value that includes the fractional seconds is desired, you must convert nanos to milliseconds (nanos/1000000) and add this to the getTime value. The Timestamp.equals(Object) method never returns true when passed a value of type java.util.Date because the nanos component of a date is unknown. As a result, the Timestamp.equals(Object) method is not symmetric with respect to the java.util.Date.equals(Object) method. Also, the hashcode method uses the underlying java.util.Data implementation and therefore does not include nanos in its computation. Due to the differences between the Timestamp class and the java.util.Date class mentioned above, it is recommended that code not view Timestamp values generically as an instance of java.util.Date. The inheritance relationship between Timestamp and java.util.Date really denotes implementation inheritance, and not type inheritance.

See Also:
Serialized Form

Constructor Summary
Timestamp(int year, int month, int date, int hour, int minute, int second, int nano)
Deprecated. instead use the constructor Timestamp(long millis)
Timestamp(long time)
Constructs a Timestamp object using a milliseconds time value.
Method Summary
boolean | after(Timestamp ts) Indicates whether this Timestamp object is later than the given Timestamp object.
boolean | before(Timestamp ts) Indicates whether this Timestamp object is earlier than the given Timestamp object.
boolean | equals(Object ts) Tests to see if this Timestamp object is equal to the given object.
boolean | equals(Timestamp ts) Tests to see if this Timestamp object is equal to the given Timestamp object.
int | getNanos() Gets this Timestamp object's nanos value.
void | setNanos(int n) Sets this Timestamp object's nanos field to the given value.
String | toString() Formats a timestamp in JDBC timestamp escape format.
static Timestamp | valueOf(String s) Converts a String object in JDBC timestamp escape format to a Timestamp value.
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Timestamp

public Timestamp(int year,
                 int month,
                 int date,
                 int hour,
                 int minute,
                 int second,
                 int nano)
Deprecated. instead use the constructor Timestamp(long millis)

Constructs a Timestamp object initialized with the given values.
Parameters:
year - year-1900
month - 0 to 11
date - 1 to 31
hour - 0 to 23
minute - 0 to 59
second - 0 to 59
nano - 0 to 999,999,999

Timestamp

public Timestamp(long time)
Constructs a Timestamp object using a milliseconds time value. The integral seconds are stored in the underlying date value; the fractional seconds are stored in the nanos field of the Timestamp object.
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number of milliseconds before January 1, 1970, 00:00:00 GMT.
Method Detail

valueOf

public static Timestamp valueOf(String s)
Converts a String object in JDBC timestamp escape format to a Timestamp value.
Parameters:
s - timestamp in format yyyy-mm-dd hh:mm:ss.fffffffff
Returns:
corresponding Timestamp value
Throws:
IllegalArgumentException - if the given argument does not have the format yyyy-mm-dd hh:mm:ss.fffffffff

toString

public String toString()
Formats a timestamp in JDBC timestamp escape format.
Overrides:
toString in class Date
Returns:
a String object in yyyy-mm-dd hh:mm:ss.fffffffff format

getNanos

public int getNanos()
Gets this Timestamp object's nanos value.
Returns:
this Timestamp object's fractional seconds component

setNanos

public void setNanos(int n)
Sets this Timestamp object's nanos field to the given value.
Parameters:
n - the new fractional seconds component
Throws:
IllegalArgumentException - if the given argument is greater than 999999999 or less than 0

equals

public boolean equals(Timestamp ts)
Tests to see if this Timestamp object is equal to the given Timestamp object.
Parameters:
ts - the Timestamp value to compare with

equals

public boolean equals(Object ts)
Tests to see if this Timestamp object is equal to the given object. This version of the method equals has been added to fix the incorrect signature of Timestamp.equals(Timestamp) and to preserve backward compatibility with existing class files. Note: This method is not symmetric with respect to the equals(Object) method in the base class.
Overrides:
equals in class Date
Parameters:
ts - the Object value to compare with

before

public boolean before(Timestamp ts)
Indicates whether this Timestamp object is earlier than the given Timestamp object.
Parameters:
ts - the Timestamp value to compare with
Returns:
true if this Timestamp object is earlier; false otherwise

after

public boolean after(Timestamp ts)
Indicates whether this Timestamp object is later than the given Timestamp object.
Parameters:
ts - the Timestamp value to compare with
Returns:
true if this Timestamp object is later; false otherwise
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Types

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.sql
Class Types

java.lang.Object
  |
  +--java.sql.Types
public class Types
extends Object

The class that defines the constants that are used to identify generic SQL types, called JDBC types. The actual type constant values are equivalent to those in XOPEN.

This class is never instantiated.

Field Summary
static int | ARRAY The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
static int | BIGINT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.
static int | BINARY The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.
static int | BIT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.
static int | BLOB The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
static int | CHAR The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.
static int | CLOB The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
static int | DATE The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.
static int | DECIMAL The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.
static int | DISTINCT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
static int | DOUBLE The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.
static int | FLOAT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.
static int | INTEGER The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.
static int | JAVA_OBJECT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
static int | LONGVARBINARY The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
static int | LONGVARCHAR The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
static int | NULL The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL.
static int | NUMERIC The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.
static int | OTHER The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
static int | REAL The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.
static int | REF The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
static int | SMALLINT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.
static int | STRUCT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
static int | TIME The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.
static int | TIMESTAMP The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.
static int | TINYINT The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.
static int | VARBINARY The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.
static int | VARCHAR The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BIT

public static final int BIT

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.

TINYINT

public static final int TINYINT

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.

SMALLINT

public static final int SMALLINT

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.

INTEGER

public static final int INTEGER

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.

BIGINT

public static final int BIGINT

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.

FLOAT

public static final int FLOAT

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.

REAL

public static final int REAL

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.

DOUBLE

public static final int DOUBLE

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.

NUMERIC

public static final int NUMERIC

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.

DECIMAL

public static final int DECIMAL

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.

CHAR

public static final int CHAR

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.

VARCHAR

public static final int VARCHAR

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.

LONGVARCHAR

public static final int LONGVARCHAR

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.

DATE

public static final int DATE

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.

TIME

public static final int TIME

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.

TIMESTAMP

public static final int TIMESTAMP

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.

BINARY

public static final int BINARY

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.

VARBINARY

public static final int VARBINARY

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.

LONGVARBINARY

public static final int LONGVARBINARY

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.

NULL

public static final int NULL

The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL.

OTHER

public static final int OTHER
The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.

JAVA_OBJECT

public static final int JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

DISTINCT

public static final int DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

STRUCT

public static final int STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

ARRAY

public static final int ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

BLOB

public static final int BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

CLOB

public static final int CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2

REF

public static final int REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
See Also:
What Is in the JDBC 2.0 API
Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.text Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.text

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.text.Annotation
    • class java.text.AttributedCharacterIterator.Attribute (implements java.io.Serializable)
    • class java.text.AttributedString
    • class java.text.BreakIterator (implements java.lang.Cloneable)
    • class java.text.CollationElementIterator
    • class java.text.CollationKey (implements java.lang.Comparable)
    • class java.text.Collator (implements java.lang.Cloneable, java.util.Comparator)
      • class java.text.RuleBasedCollator
    • class java.text.DateFormatSymbols (implements java.lang.Cloneable, java.io.Serializable)
    • class java.text.DecimalFormatSymbols (implements java.lang.Cloneable, java.io.Serializable)
    • class java.text.FieldPosition
    • class java.text.Format (implements java.lang.Cloneable, java.io.Serializable)
      • class java.text.DateFormat
        • class java.text.SimpleDateFormat
      • class java.text.MessageFormat
      • class java.text.NumberFormat
        • class java.text.ChoiceFormat
        • class java.text.DecimalFormat
    • class java.text.ParsePosition
    • class java.text.StringCharacterIterator (implements java.text.CharacterIterator)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.text.ParseException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface java.text.CharacterIterator
      • interface java.text.AttributedCharacterIterator
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.text

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

See:
Description

Interface Summary
AttributedCharacterIterator | An AttributedCharacterIterator allows iteration through both text and related attribute information.
CharacterIterator | This interface defines a protocol for bidirectional iteration over text.

Class Summary
Annotation | An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.
AttributedCharacterIterator.Attribute | Defines attribute keys that are used to identify text attributes.
AttributedString | An AttributedString holds text and related attribute information.
BreakIterator | The BreakIterator class implements methods for finding the location of boundaries in text.
ChoiceFormat | A ChoiceFormat allows you to attach a format to a range of numbers.
CollationElementIterator | The CollationElementIterator class is used as an iterator to walk through each character of an international string.
CollationKey | A CollationKey represents a String under the rules of a specific Collator object.
Collator | The Collator class performs locale-sensitive String comparison.
DateFormat | DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
DateFormatSymbols | DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
DecimalFormat | DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
DecimalFormatSymbols | This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
FieldPosition | FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
Format | Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
MessageFormat | MessageFormat provides a means to produce concatenated messages in language-neutral way.
NumberFormat | NumberFormat is the abstract base class for all number formats.
ParsePosition | ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.
RuleBasedCollator | The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
SimpleDateFormat | SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.
StringCharacterIterator | StringCharacterIterator implements the CharacterIterater protocol for a String.

Exception Summary
ParseException Signals that an error has been reached unexpectedly while parsing.

Package java.text Description

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. This means your main application or applet can be written to be language-independent, and it can rely upon separate, dynamically-linked localized resources. This allows the flexibility of adding localizations for new localizations at any time.

These classes are capable of formatting dates, numbers, and messages, parsing; searching and sorting strings; and iterating over characters, words, sentences, and line breaks. This package contains three main groups of classes and interfaces:

  • Classes for iteration over text
  • Classes for formatting and parsing
  • Classes for string collation

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.text

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.text

Packages that use java.text
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Classes in java.text used by java.awt
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.
AttributedCharacterIterator.Attribute
Defines attribute keys that are used to identify text attributes.
CharacterIterator
This interface defines a protocol for bidirectional iteration over text.

Classes in java.text used by java.awt.event
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.

Classes in java.text used by java.awt.font
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.
AttributedCharacterIterator.Attribute
Defines attribute keys that are used to identify text attributes.
BreakIterator
The BreakIterator class implements methods for finding the location of boundaries in text.

Classes in java.text used by java.awt.im
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.
AttributedCharacterIterator.Attribute
Defines attribute keys that are used to identify text attributes.

Classes in java.text used by java.awt.im.spi
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.

Classes in java.text used by java.text
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.
AttributedCharacterIterator.Attribute
Defines attribute keys that are used to identify text attributes.
BreakIterator
The BreakIterator class implements methods for finding the location of boundaries in text.
CharacterIterator
This interface defines a protocol for bidirectional iteration over text.
CollationElementIterator
The CollationElementIterator class is used as an iterator to walk through each character of an international string.
CollationKey
A CollationKey represents a String under the rules of a specific Collator object.
Collator
The Collator class performs locale-sensitive String comparison.
DateFormat
DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
DateFormatSymbols
DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.
DecimalFormatSymbols
This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers.
FieldPosition
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output.
Format
Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
NumberFormat
NumberFormat is the abstract base class for all number formats.
ParseException
Signals that an error has been reached unexpectedly while parsing.
ParsePosition
ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing.

Classes in java.text used by javax.swing
AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.

Classes in java.text used by javax.swing.text
CharacterIterator
This interface defines a protocol for bidirectional iteration over text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Annotation

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.text
Class Annotation

java.lang.Object
  |
  +--java.text.Annotation
public class Annotation
extends Object

An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics. These characteristics are:

  • The text range that the attribute is applied to is critical to the semantics of the range. That means, the attribute cannot be applied to subranges of the text range that it applies to, and, if two adjacent text ranges have the same value for this attribute, the attribute still cannot be applied to the combined range as a whole with this value.
  • The attribute or its value usually do no longer apply if the underlying text is changed.
An example is grammatical information attached to a sentence: For the previous sentence, you can say that "an example" is the subject, but you cannot say the same about "an", "example", or "exam". When the text is changed, the grammatical information typically becomes invalid. Another example is Japanese reading information (yomi).

Wrapping the attribute value into an Annotation object guarantees that adjacent text runs don't get merged even if the attribute values are equal, and indicates to text containers that the attribute should be discarded if the underlying text is modified.

See Also:
AttributedCharacterIterator

Constructor Summary
Annotation(Object value)
Constructs an annotation record with the given value, which may be null.
Method Summary
Object | getValue() Returns the value of the attribute, which may be null.
String | toString() Returns the String representation of this Annotation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Annotation

public Annotation(Object value)
Constructs an annotation record with the given value, which may be null.
Parameters:
value - The value of the attribute
Method Detail

getValue

public Object getValue()
Returns the value of the attribute, which may be null.

toString

public String toString()
Returns the String representation of this Annotation.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Attribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class AttributedCharacterIterator.Attribute

java.lang.Object
  |
  +--java.text.AttributedCharacterIterator.Attribute
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TextAttribute
Enclosing class:
AttributedCharacterIterator
public static class AttributedCharacterIterator.Attribute
extends Object
implements Serializable

Defines attribute keys that are used to identify text attributes. These keys are used in AttributedCharacterIterator and AttributedString.

See Also:
AttributedCharacterIterator, AttributedString, Serialized Form

Field Summary
static AttributedCharacterIterator.Attribute | INPUT_METHOD_SEGMENT Attribute key for input method segments.
static AttributedCharacterIterator.Attribute | LANGUAGE Attribute key for the language of some text.
static AttributedCharacterIterator.Attribute | READING Attribute key for the reading of some text.
Constructor Summary
protected AttributedCharacterIterator.Attribute(String name)
Constructs an Attribute with the given name.
Method Summary
boolean | equals(Object obj) Compares two objects for equality.
protected String | getName() Returns the name of the attribute.
int | hashCode() Returns a hash code value for the object.
protected Object | readResolve() Resolves instances being deserialized to the predefined constants.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

LANGUAGE

public static final AttributedCharacterIterator.Attribute LANGUAGE
Attribute key for the language of some text.

Values are instances of Locale.

See Also:
Locale

READING

public static final AttributedCharacterIterator.Attribute READING
Attribute key for the reading of some text. In languages where the written form and the pronunciation of a word are only loosely related (such as Japanese), it is often necessary to store the reading (pronunciation) along with the written form.

Values are instances of Annotation holding instances of String.

See Also:
Annotation, String

INPUT_METHOD_SEGMENT

public static final AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT
Attribute key for input method segments. Input methods often break up text into segments, which usually correspond to words.

Values are instances of Annotation holding a null reference.

See Also:
Annotation
Constructor Detail

AttributedCharacterIterator.Attribute

protected AttributedCharacterIterator.Attribute(String name)
Constructs an Attribute with the given name.
Method Detail

equals

public final boolean equals(Object obj)
Compares two objects for equality. This version only returns true for x.equals(y) if x and y refer to the same object, and guarantees this for all subclasses.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Returns a hash code value for the object. This version is identical to the one in Object, but is also final.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns a string representation of the object. This version returns the concatenation of class name, "(", a name identifying the attribute and ")".
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

getName

protected String getName()
Returns the name of the attribute.

readResolve

protected Object readResolve()
                      throws InvalidObjectException
Resolves instances being deserialized to the predefined constants.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributedCharacterIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.text
Interface AttributedCharacterIterator

All Superinterfaces:
CharacterIterator, Cloneable
public interface AttributedCharacterIterator
extends CharacterIterator

An AttributedCharacterIterator allows iteration through both text and related attribute information.

An attribute is a key/value pair, identified by the key. No two attributes on a given character can have the same key.

The values for an attribute are immutable, or must not be mutated by clients or storage. They are always passed by reference, and not cloned.

A run with respect to an attribute is a maximum text range for which:

  • the attribute is undefined or null for the entire range, or
  • the attribute value is defined and has the same non-null value for the entire range.

A run with respect to a set of attributes is a maximum text range for which this condition is met for each member attribute.

The returned indexes are limited to the range of the iterator.

The returned attribute information is limited to runs that contain the current character.

Attribute keys are instances of AttributedCharacterIterator.Attribute and its subclasses, such as java.awt.font.TextAttribute.

Since:
1.2
See Also:
AttributedCharacterIterator.Attribute, TextAttribute, AttributedString, Annotation

Inner Class Summary
static class AttributedCharacterIterator.Attribute
Defines attribute keys that are used to identify text attributes.
Fields inherited from interface java.text.CharacterIterator
DONE
Method Summary
Set | getAllAttributeKeys() Returns the keys of all attributes defined on the iterator's text range.
Object | getAttribute(AttributedCharacterIterator.Attribute attribute) Returns the value of the named attribute for the current character.
Map | getAttributes() Returns a map with the attributes defined on the current character.
int | getRunLimit() Returns the index of the first character following the run with respect to all attributes containing the current character.
int | getRunLimit(AttributedCharacterIterator.Attribute attribute) Returns the index of the first character following the run with respect to the given attribute containing the current character.
int | getRunLimit(Set attributes) Returns the index of the first character following the run with respect to the given attributes containing the current character.
int | getRunStart() Returns the index of the first character of the run with respect to all attributes containing the current character.
int | getRunStart(AttributedCharacterIterator.Attribute attribute) Returns the index of the first character of the run with respect to the given attribute containing the current character.
int | getRunStart(Set attributes) Returns the index of the first character of the run with respect to the given attributes containing the current character.
Methods inherited from interface java.text.CharacterIterator
clone, current, first, getBeginIndex, getEndIndex, getIndex, last, next, previous, setIndex

Method Detail

getRunStart

public int getRunStart()
Returns the index of the first character of the run with respect to all attributes containing the current character.

getRunStart

public int getRunStart(AttributedCharacterIterator.Attribute attribute)
Returns the index of the first character of the run with respect to the given attribute containing the current character.

getRunStart

public int getRunStart(Set attributes)
Returns the index of the first character of the run with respect to the given attributes containing the current character.

getRunLimit

public int getRunLimit()
Returns the index of the first character following the run with respect to all attributes containing the current character.

getRunLimit

public int getRunLimit(AttributedCharacterIterator.Attribute attribute)
Returns the index of the first character following the run with respect to the given attribute containing the current character.

getRunLimit

public int getRunLimit(Set attributes)
Returns the index of the first character following the run with respect to the given attributes containing the current character.

getAttributes

public Map getAttributes()
Returns a map with the attributes defined on the current character.

getAttribute

public Object getAttribute(AttributedCharacterIterator.Attribute attribute)
Returns the value of the named attribute for the current character. Returns null if the attribute is not defined.
Parameters:
attribute - the key of the attribute whose value is requested.

getAllAttributeKeys

public Set getAllAttributeKeys()
Returns the keys of all attributes defined on the iterator's text range. The set is empty if no attributes are defined.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AttributedString

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class AttributedString

java.lang.Object
  |
  +--java.text.AttributedString
public class AttributedString
extends Object

An AttributedString holds text and related attribute information. It may be used as the actual data storage in some cases where a text reader wants to access attributed text through the AttributedCharacterIterator interface.

See Also:
AttributedCharacterIterator, Annotation

Constructor Summary
AttributedString(AttributedCharacterIterator text)
Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
AttributedString(String text)
Constructs an AttributedString instance with the given text.
AttributedString(String text, Map attributes)
Constructs an AttributedString instance with the given text and attributes.
Method Summary
void | addAttribute(AttributedCharacterIterator.Attribute attribute, Object value) Adds an attribute to the entire string.
void | addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex) Adds an attribute to a subrange of the string.
void | addAttributes(Map attributes, int beginIndex, int endIndex) Adds a set of attributes to a subrange of the string.
AttributedCharacterIterator | getIterator() Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string.
AttributedCharacterIterator | getIterator(AttributedCharacterIterator.Attribute[] attributes) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
AttributedCharacterIterator | getIterator(AttributedCharacterIterator.Attribute[] attributes, int beginIndex, int endIndex) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AttributedString

public AttributedString(String text)
Constructs an AttributedString instance with the given text.
Parameters:
text - The text for this attributed string.

AttributedString

public AttributedString(String text,
                        Map attributes)
Constructs an AttributedString instance with the given text and attributes.
Parameters:
text - The text for this attributed string.
attributes - The attributes that apply to the entire string.
Throws:
IllegalArgumentException - if the text has length 0 and the attributes parameter is not an empty Map (attributes cannot be applied to a 0-length range).

AttributedString

public AttributedString(AttributedCharacterIterator text)
Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
Parameters:
text - The text for this attributed string.

AttributedString

public AttributedString(AttributedCharacterIterator text,
                        int beginIndex,
                        int endIndex)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator. If the given range produces an empty text, all attributes will be discarded. Note that any attributes wrapped by an Annotation object are discarded for a subrange of the original attribute range.
Parameters:
text - The text for this attributed string.
beginIndex - Index of the first character of the range.
endIndex - Index of the character following the last character of the range.
Throws:
IllegalArgumentException - if the subrange given by beginIndex and endIndex is out of the text range.
See Also:
Annotation

AttributedString

public AttributedString(AttributedCharacterIterator text,
                        int beginIndex,
                        int endIndex,
                        AttributedCharacterIterator.Attribute[] attributes)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator. Only attributes that match the given attributes will be incorporated into the instance. If the given range produces an empty text, all attributes will be discarded. Note that any attributes wrapped by an Annotation object are discarded for a subrange of the original attribute range.
Parameters:
text - The text for this attributed string.
beginIndex - Index of the first character of the range.
endIndex - Index of the character following the last character of the range.
attributes - Specifies attributes to be extracted from the text. If null is specified, all available attributes will be used.
Throws:
IllegalArgumentException - if the subrange given by beginIndex and endIndex is out of the text range.
See Also:
Annotation
Method Detail

addAttribute

public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                         Object value)
Adds an attribute to the entire string.
Parameters:
attribute - the attribute key
value - the value of the attribute; may be null
Throws:
IllegalArgumentException - if the AttributedString has length 0 (attributes cannot be applied to a 0-length range).

addAttribute

public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                         Object value,
                         int beginIndex,
                         int endIndex)
Adds an attribute to a subrange of the string.
Parameters:
attribute - the attribute key
value - The value of the attribute. May be null.
beginIndex - Index of the first character of the range.
endIndex - Index of the character following the last character of the range.
Throws:
IllegalArgumentException - if beginIndex is less then 0, endIndex is greater than the length of the string, or beginIndex and endIndex together don't define a non-empty subrange of the string.

addAttributes

public void addAttributes(Map attributes,
                          int beginIndex,
                          int endIndex)
Adds a set of attributes to a subrange of the string.
Parameters:
attributes - The attributes to be added to the string.
beginIndex - Index of the first character of the range.
endIndex - Index of the character following the last character of the range.
Throws:
IllegalArgumentException - if beginIndex is less then 0, endIndex is greater than the length of the string, or beginIndex and endIndex together don't define a non-empty subrange of the string and the attributes parameter is not an empty Map.

getIterator

public AttributedCharacterIterator getIterator()
Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string.
Returns:
An iterator providing access to the text and its attributes.

getIterator

public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes)
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string. Information about attributes not listed in attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.
Parameters:
attributes - a list of attributes that the client is interested in
Returns:
an iterator providing access to the text and its attributes

getIterator

public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes,
                                               int beginIndex,
                                               int endIndex)
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string. Information about attributes not listed in attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.
Parameters:
attributes - a list of attributes that the client is interested in
beginIndex - the index of the first character
endIndex - the index of the character following the last character
Returns:
an iterator providing access to the text and its attributes
Throws:
IllegalArgumentException - if beginIndex is less then 0, endIndex is greater than the length of the string, or beginIndex is greater than endIndex.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BreakIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class BreakIterator

java.lang.Object
  |
  +--java.text.BreakIterator
All Implemented Interfaces:
Cloneable
public abstract class BreakIterator
extends Object
implements Cloneable

The BreakIterator class implements methods for finding the location of boundaries in text. Instances of BreakIterator maintain a current position and scan over text returning the index of characters where boundaries occur. Internally, BreakIterator scans text using a CharacterIterator, and is thus able to scan text held by any object implementing that protocol. A StringCharacterIterator is used to scan String objects passed to setText.

You use the factory methods provided by this class to create instances of various types of break iterators. In particular, use getWordIterator, getLineIterator, getSentenceIterator, and getCharacterIterator to create BreakIterators that perform word, line, sentence, and character boundary analysis respectively. A single BreakIterator can work only on one unit (word, line, sentence, and so on). You must use a different iterator for each unit boundary analysis you wish to perform.

Line boundary analysis determines where a text string can be broken when line-wrapping. The mechanism correctly handles punctuation and hyphenated words.

Sentence boundary analysis allows selection with correct interpretation of periods within numbers and abbreviations, and trailing punctuation marks such as quotation marks and parentheses.

Word boundary analysis is used by search and replace functions, as well as within text editing applications that allow the user to select words with a double click. Word selection provides correct interpretation of punctuation marks within and following words. Characters that are not part of a word, such as symbols or punctuation marks, have word-breaks on both sides.

Character boundary analysis allows users to interact with characters as they expect to, for example, when moving the cursor through a text string. Character boundary analysis provides correct navigation of through character strings, regardless of how the character is stored. For example, an accented character might be stored as a base character and a diacritical mark. What users consider to be a character can differ between languages.

BreakIterator is intended for use with natural languages only. Do not use this class to tokenize a programming language.

Examples:

Creating and using text boundaries

 public static void main(String args[]) {
      if (args.length == 1) {
          String stringToExamine = args[0];
          //print each word in order
          BreakIterator boundary = BreakIterator.getWordInstance();
          boundary.setText(stringToExamine);
          printEachForward(boundary, stringToExamine);
          //print each sentence in reverse order
          boundary = BreakIterator.getSentenceInstance(Locale.US);
          boundary.setText(stringToExamine);
          printEachBackward(boundary, stringToExamine);
          printFirst(boundary, stringToExamine);
          printLast(boundary, stringToExamine);
      }
 }
Print each element in order
 public static void printEachForward(BreakIterator boundary, String source) {
     int start = boundary.first();
     for (int end = boundary.next();
          end != BreakIterator.DONE;
          start = end, end = boundary.next()) {
          System.out.println(source.substring(start,end));
     }
 }
Print each element in reverse order
 public static void printEachBackward(BreakIterator boundary, String source) {
     int end = boundary.last();
     for (int start = boundary.previous();
          start != BreakIterator.DONE;
          end = start, start = boundary.previous()) {
         System.out.println(source.substring(start,end));
     }
 }
Print first element
 public static void printFirst(BreakIterator boundary, String source) {
     int start = boundary.first();
     int end = boundary.next();
     System.out.println(source.substring(start,end));
 }
Print last element
 public static void printLast(BreakIterator boundary, String source) {
     int end = boundary.last();
     int start = boundary.previous();
     System.out.println(source.substring(start,end));
 }
Print the element at a specified position
 public static void printAt(BreakIterator boundary, int pos, String source) {
     int end = boundary.following(pos);
     int start = boundary.previous();
     System.out.println(source.substring(start,end));
 }
Find the next word
 public static int nextWordStartAfter(int pos, String text) {
     BreakIterator wb = BreakIterator.getWordInstance();
     wb.setText(text);
     int last = wb.following(pos);
     int current = wb.next();
     while (current != BreakIterator.DONE) {
         for (int p = last; p
 (The iterator returned by BreakIterator.getWordInstance() is unique in that
 the break positions it returns don't represent both the start and end of the
 thing being iterated over.  That is, a sentence-break iterator returns breaks
 that each represent the end of one sentence and the beginning of the next.
 With the word-break iterator, the characters between two boundaries might be a
 word, or they might be the punctuation or whitespace between two words.  The
 above code uses a simple heuristic to determine which boundary is the beginning
 of a word: If the characters between this boundary and the next boundary
 include at least one letter (this can be an alphabetical letter, a CJK ideograph,
 a Hangul syllable, a Kana character, etc.), then the text between this boundary
 and the next is a word; otherwise, it's the material between words.)

See Also:
CharacterIterator

Field Summary
static int DONE
DONE is returned by previous() and next() after all valid boundaries have been returned.
Constructor Summary
protected BreakIterator()
Constructor.
Method Summary
 Object clone()
Create a copy of this iterator
abstract  int current()
Return character index of the text boundary that was most recently returned by next(), previous(), first(), or last()
abstract  int first()
Return the first boundary.
abstract  int following(int offset)
Return the first boundary following the specified offset.
static Locale[] getAvailableLocales()
Get the set of Locales for which BreakIterators are installed
static BreakIterator getCharacterInstance()
Create BreakIterator for character-breaks using default locale Returns an instance of a BreakIterator implementing character breaks.
static BreakIterator getCharacterInstance(Locale where)
Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterator implementing character breaks.
static BreakIterator getLineInstance()
Create BreakIterator for line-breaks using default locale.
static BreakIterator getLineInstance(Locale where)
Create BreakIterator for line-breaks using specified locale.
static BreakIterator getSentenceInstance()
Create BreakIterator for sentence-breaks using default locale Returns an instance of a BreakIterator implementing sentence breaks.
static BreakIterator getSentenceInstance(Locale where)
Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterator implementing sentence breaks.
abstract  CharacterIterator getText()
Get the text being scanned
static BreakIterator getWordInstance()
Create BreakIterator for word-breaks using default locale.
static BreakIterator getWordInstance(Locale where)
Create BreakIterator for word-breaks using specified locale.
 boolean isBoundary(int offset)
Return true if the specified position is a boundary position.
abstract  int last()
Return the last boundary.
abstract  int next()
Return the boundary following the current boundary.
abstract  int next(int n)
Return the nth boundary from the current boundary
 int preceding(int offset)
Return the last boundary preceding the specfied offset.
abstract  int previous()
Return the boundary preceding the current boundary.
abstract  void setText(CharacterIterator newText)
Set a new text for scanning.
 void setText(String newText)
Set a new text string to be scanned.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DONE

public static final int DONE
DONE is returned by previous() and next() after all valid boundaries have been returned.
Constructor Detail

BreakIterator

protected BreakIterator()
Constructor. BreakIterator is stateless and has no default behavior.
Method Detail

clone

public Object clone()
Create a copy of this iterator
Overrides:
clone in class Object
Returns:
A copy of this

first

public abstract int first()
Return the first boundary. The iterator's current position is set to the first boundary.
Returns:
The character index of the first text boundary.

last

public abstract int last()
Return the last boundary. The iterator's current position is set to the last boundary.
Returns:
The character index of the last text boundary.

next

public abstract int next(int n)
Return the nth boundary from the current boundary
Parameters:
n - which boundary to return. A value of 0 does nothing. Negative values move to previous boundaries and positive values move to later boundaries.
Returns:
The index of the nth boundary from the current position.

next

public abstract int next()
Return the boundary following the current boundary.
Returns:
The character index of the next text boundary or DONE if all boundaries have been returned. Equivalent to next(1).

previous

public abstract int previous()
Return the boundary preceding the current boundary.
Returns:
The character index of the previous text boundary or DONE if all boundaries have been returned.

following

public abstract int following(int offset)
Return the first boundary following the specified offset. The value returned is always greater than the offset or the value BreakIterator.DONE
Parameters:
offset - the offset to begin scanning. Valid values are determined by the CharacterIterator passed to setText(). Invalid values cause an IllegalArgumentException to be thrown.
Returns:
The first boundary after the specified offset.

preceding

public int preceding(int offset)
Return the last boundary preceding the specfied offset. The value returned is always less than the offset or the value BreakIterator.DONE.
Parameters:
offset - the offset to begin scanning. Valid values are determined by the CharacterIterator passed to setText(). Invalid values cause an IllegalArgumentException to be thrown.
Returns:
The last boundary before the specified offset.

isBoundary

public boolean isBoundary(int offset)
Return true if the specified position is a boundary position.
Parameters:
offset - the offset to check.
Returns:
True if "offset" is a boundary position.

current

public abstract int current()
Return character index of the text boundary that was most recently returned by next(), previous(), first(), or last()
Returns:
The boundary most recently returned.

getText

public abstract CharacterIterator getText()
Get the text being scanned
Returns:
the text being scanned

setText

public void setText(String newText)
Set a new text string to be scanned. The current scan position is reset to first().
Parameters:
newText - new text to scan.

setText

public abstract void setText(CharacterIterator newText)
Set a new text for scanning. The current scan position is reset to first().
Parameters:
newText - new text to scan.

getWordInstance

public static BreakIterator getWordInstance()
Create BreakIterator for word-breaks using default locale. Returns an instance of a BreakIterator implementing word breaks. WordBreak is usefull for word selection (ex. double click)
Returns:
A BreakIterator for word-breaks
See Also:
Locale.getDefault()

getWordInstance

public static BreakIterator getWordInstance(Locale where)
Create BreakIterator for word-breaks using specified locale. Returns an instance of a BreakIterator implementing word breaks. WordBreak is usefull for word selection (ex. double click)
Parameters:
where - the local. If a specific WordBreak is not avaliable for the specified locale, a default WordBreak is returned.
Returns:
A BreakIterator for word-breaks

getLineInstance

public static BreakIterator getLineInstance()
Create BreakIterator for line-breaks using default locale. Returns an instance of a BreakIterator implementing line breaks. Line breaks are logically possible line breaks, actual line breaks are usually determined based on display width. LineBreak is useful for word wrapping text.
Returns:
A BreakIterator for line-breaks
See Also:
Locale.getDefault()

getLineInstance

public static BreakIterator getLineInstance(Locale where)
Create BreakIterator for line-breaks using specified locale. Returns an instance of a BreakIterator implementing line breaks. Line breaks are logically possible line breaks, actual line breaks are usually determined based on display width. LineBreak is useful for word wrapping text.
Parameters:
where - the local. If a specific LineBreak is not avaliable for the specified locale, a default LineBreak is returned.
Returns:
A BreakIterator for line-breaks

getCharacterInstance

public static BreakIterator getCharacterInstance()
Create BreakIterator for character-breaks using default locale Returns an instance of a BreakIterator implementing character breaks. Character breaks are boundaries of combining character sequences.
Returns:
A BreakIterator for character-breaks
See Also:
Locale.getDefault()

getCharacterInstance

public static BreakIterator getCharacterInstance(Locale where)
Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterator implementing character breaks. Character breaks are boundaries of combining character sequences.
Parameters:
where - the local. If a specific character break is not avaliable for the specified local, a default character break is returned.
Returns:
A BreakIterator for character-breaks

getSentenceInstance

public static BreakIterator getSentenceInstance()
Create BreakIterator for sentence-breaks using default locale Returns an instance of a BreakIterator implementing sentence breaks.
Returns:
A BreakIterator for sentence-breaks
See Also:
Locale.getDefault()

getSentenceInstance

public static BreakIterator getSentenceInstance(Locale where)
Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterator implementing sentence breaks.
Parameters:
where - the local. If a specific SentenceBreak is not avaliable for the specified local, a default SentenceBreak is returned.
Returns:
A BreakIterator for sentence-breaks

getAvailableLocales

public static Locale[] getAvailableLocales()
Get the set of Locales for which BreakIterators are installed
Returns:
available locales
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharacterIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.text
Interface CharacterIterator

All Superinterfaces:
Cloneable
All Known Subinterfaces:
AttributedCharacterIterator
All Known Implementing Classes:
StringCharacterIterator, Segment
public interface CharacterIterator
extends Cloneable

This interface defines a protocol for bidirectional iteration over text. The iterator iterates over a bounded sequence of characters. Characters are indexed with values beginning with the value returned by getBeginIndex() and continuing through the value returned by getEndIndex()-1.

Iterators maintain a current character index, whose valid range is from getBeginIndex() to getEndIndex(); the value getEndIndex() is included to allow handling of zero-length text ranges and for historical reasons. The current index can be retrieved by calling getIndex() and set directly by calling setIndex(), first(), and last().

The methods previous() and next() are used for iteration. They return DONE if they would move outside the range from getBeginIndex() to getEndIndex() -1, signaling that the iterator has reached the end of the sequence. DONE is also returned by other methods to indicate that the current index is outside this range.

Examples:

Traverse the text from start to finish

 public void traverseForward(CharacterIterator iter) {
     for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
         processChar(c);
     }
 }
Traverse the text backwards, from end to start
 public void traverseBackward(CharacterIterator iter) {
     for(char c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) {
         processChar(c);
     }
 }
Traverse both forward and backward from a given position in the text. Calls to notBoundary() in this example represents some additional stopping criteria.
 public void traverseOut(CharacterIterator iter, int pos) {
     for (char c = iter.setIndex(pos);
              c != CharacterIterator.DONE && notBoundary(c);
              c = iter.next()) {
     }
     int end = iter.getIndex();
     for (char c = iter.setIndex(pos);
             c != CharacterIterator.DONE && notBoundary(c);
             c = iter.previous()) {
     }
     int start = iter.getIndex();
     processSection(start, end);
 }

See Also:
StringCharacterIterator, AttributedCharacterIterator

Field Summary
static char DONE
Constant that is returned when the iterator has reached either the end or the beginning of the text.
Method Summary
 Object clone()
Create a copy of this iterator
 char current()
Gets the character at the current position (as returned by getIndex()).
 char first()
Sets the position to getBeginIndex() and returns the character at that position.
 int getBeginIndex()
Returns the start index of the text.
 int getEndIndex()
Returns the end index of the text.
 int getIndex()
Returns the current index.
 char last()
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
 char next()
Increments the iterator's index by one and returns the character at the new index.
 char previous()
Decrements the iterator's index by one and returns the character at the new index.
 char setIndex(int position)
Sets the position to the specified position in the text and returns that character.

Field Detail

DONE

public static final char DONE
Constant that is returned when the iterator has reached either the end or the beginning of the text. The unicode 2.0 standard states that '\\uFFFF' is an invalid unicode value and should not occur in any valid unicode string.
Method Detail

first

public char first()
Sets the position to getBeginIndex() and returns the character at that position.
Returns:
the first character in the text, or DONE if the text is empty
See Also:
getBeginIndex()

last

public char last()
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
Returns:
the last character in the text, or DONE if the text is empty
See Also:
getEndIndex()

current

public char current()
Gets the character at the current position (as returned by getIndex()).
Returns:
the character at the current position or DONE if the current position is off the end of the text.
See Also:
getIndex()

next

public char next()
Increments the iterator's index by one and returns the character at the new index. If the resulting index is greater or equal to getEndIndex(), the current index is reset to getEndIndex() and a value of DONE is returned.
Returns:
the character at the new position or DONE if the new position is off the end of the text range.

previous

public char previous()
Decrements the iterator's index by one and returns the character at the new index. If the current index is getBeginIndex(), the index remains at getBeginIndex() and a value of DONE is returned.
Returns:
the character at the new position or DONE if the current position is equal to getBeginIndex().

setIndex

public char setIndex(int position)
Sets the position to the specified position in the text and returns that character.
Parameters:
position - the position within the text. Valid values range from getBeginIndex() to getEndIndex(). An IllegalArgumentException is thrown if an invalid value is supplied.
Returns:
the character at the specified position or DONE if the specified position is equal to getEndIndex()

getBeginIndex

public int getBeginIndex()
Returns the start index of the text.
Returns:
the index at which the text begins.

getEndIndex

public int getEndIndex()
Returns the end index of the text. This index is the index of the first character following the end of the text.
Returns:
the index after the last character in the text

getIndex

public int getIndex()
Returns the current index.
Returns:
the current index.

clone

public Object clone()
Create a copy of this iterator
Overrides:
clone in class Object
Returns:
A copy of this
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ChoiceFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class ChoiceFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.NumberFormat
              |
              +--java.text.ChoiceFormat
All Implemented Interfaces:
Cloneable, Serializable
public class ChoiceFormat
extends NumberFormat

A ChoiceFormat allows you to attach a format to a range of numbers. It is generally used in a MessageFormat for handling plurals. The choice is specified with an ascending list of doubles, where each item specifies a half-open interval up to the next item:

 X matches j if and only if limit[j] <= X < limit[j+1]
If there is no match, then either the first or last index is used, depending on whether the number (X) is too low or too high. If the limit array is not in ascending order, the results of formatting will be incorrect. ChoiceFormat also accepts \\u221E as equivalent to infinity(INF).

Note: ChoiceFormat differs from the other Format classes in that you create a ChoiceFormat object with a constructor (not with a getInstance style factory method). The factory methods aren't necessary because ChoiceFormat doesn't require any complex setup for a given locale. In fact, ChoiceFormat doesn't implement any locale specific behavior.

When creating a ChoiceFormat, you must specify an array of formats and an array of limits. The length of these arrays must be the same. For example,

  • limits = {1,2,3,4,5,6,7}
    formats = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"}
  • limits = {0, 1, ChoiceFormat.nextDouble(1)}
    formats = {"no files", "one file", "many files"}
    (nextDouble can be used to get the next higher double, to make the half-open interval.)

Here is a simple example that shows formatting and parsing:

 double[] limits = {1,2,3,4,5,6,7};
 String[] monthNames = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
 ChoiceFormat form = new ChoiceFormat(limits, monthNames);
 ParsePosition status = new ParsePosition(0);
 for (double i = 0.0; i <= 8.0; ++i) {
     status.setIndex(0);
     System.out.println(i + " -> " + form.format(i) + " -> "
                              + form.parse(form.format(i),status));
 }
Here is a more complex example, with a pattern format:
 double[] filelimits = {0,1,2};
 String[] filepart = {"are no files","is one file","are {2} files"};
 ChoiceFormat fileform = new ChoiceFormat(filelimits, filepart);
 Format[] testFormats = {fileform, null, NumberFormat.getInstance()};
 MessageFormat pattform = new MessageFormat("There {0} on {1}");
 pattform.setFormats(testFormats);
 Object[] testArgs = {null, "ADisk", null};
 for (int i = 0; i < 4; ++i) {
     testArgs[0] = new Integer(i);
     testArgs[2] = testArgs[0];
     System.out.println(pattform.format(testArgs));
 }

Specifying a pattern for ChoiceFormat objects is fairly straightforward. For example:

 ChoiceFormat fmt = new ChoiceFormat(
      "-1#is negative| 0#is zero or fraction | 1#is one |1.0<is 1+ |2#is two |2<is more than 2.");
 System.out.println("Formatter Pattern : " + fmt.toPattern());

 System.out.println("Format with -INF : " + fmt.format(Double.NEGATIVE_INFINITY));
 System.out.println("Format with -1.0 : " + fmt.format(-1.0));
 System.out.println("Format with 0 : " + fmt.format(0));
 System.out.println("Format with 0.9 : " + fmt.format(0.9));
 System.out.println("Format with 1.0 : " + fmt.format(1));
 System.out.println("Format with 1.5 : " + fmt.format(1.5));
 System.out.println("Format with 2 : " + fmt.format(2));
 System.out.println("Format with 2.1 : " + fmt.format(2.1));
 System.out.println("Format with NaN : " + fmt.format(Double.NaN));
 System.out.println("Format with +INF : " + fmt.format(Double.POSITIVE_INFINITY));
And the output result would be like the following:

   Format with -INF : is negative
   Format with -1.0 : is negative
   Format with 0 : is zero or fraction
   Format with 0.9 : is zero or fraction
   Format with 1.0 : is one
   Format with 1.5 : is 1+
   Format with 2 : is two
   Format with 2.1 : is more than 2.
   Format with NaN : is negative
   Format with +INF : is more than 2.

See Also:
DecimalFormat, MessageFormat, Serialized Form

Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
Constructor Summary
ChoiceFormat(double[] limits, String[] formats)
Constructs with the limits and the corresponding formats.
ChoiceFormat(String newPattern)
Constructs with limits and corresponding formats based on the pattern.
Method Summary
void | applyPattern(String newPattern) Sets the pattern.
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Equality comparision between two
StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition status) Returns pattern with formatted double.
StringBuffer | format(long number, StringBuffer toAppendTo, FieldPosition status) Specialization of format.
Object[] | getFormats() Get the formats passed in the constructor.
double[] | getLimits() Get the limits passed in the constructor.
int | hashCode() Generates a hash code for the message format object.
static double | nextDouble(double d) Finds the least double greater than d.
static double | nextDouble(double d, boolean positive) Finds the least double greater than d (if positive == true), or the greatest double less than d (if positive == false).
Number | parse(String text, ParsePosition status) Parses a Number from the input text.
static double | previousDouble(double d) Finds the greatest double less than d.
void | setChoices(double[] limits, String[] formats) Set the choices to be used in formatting.
String | toPattern() Gets the pattern.
Methods inherited from class java.text.NumberFormat
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly
Methods inherited from class java.text.Format
format, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ChoiceFormat

public ChoiceFormat(String newPattern)
Constructs with limits and corresponding formats based on the pattern.

ChoiceFormat

public ChoiceFormat(double[] limits,
                    String[] formats)
Constructs with the limits and the corresponding formats.
See Also:
setChoices(double[], java.lang.String[])
Method Detail

applyPattern

public void applyPattern(String newPattern)
Sets the pattern.
Parameters:
newPattern - See the class description.

toPattern

public String toPattern()
Gets the pattern.

setChoices

public void setChoices(double[] limits,
                       String[] formats)
Set the choices to be used in formatting.
Parameters:
limits - contains the top value that you want parsed with that format,and should be in ascending sorted order. When formatting X, the choice will be the i, where limit[i] <= X < limit[i+1]. If the limit array is not in ascending order, the results of formatting will be incorrect.
formats - are the formats you want to use for each limit. They can be either Format objects or Strings. When formatting with object Y, if the object is a NumberFormat, then ((NumberFormat) Y).format(X) is called. Otherwise Y.toString() is called.

getLimits

public double[] getLimits()
Get the limits passed in the constructor.
Returns:
the limits.

getFormats

public Object[] getFormats()
Get the formats passed in the constructor.
Returns:
the formats.

format

public StringBuffer format(long number,
                           StringBuffer toAppendTo,
                           FieldPosition status)
Specialization of format. This method really calls format(double, StringBuffer, FieldPosition) thus the range of longs that are supported is only equal to the range that can be stored by double. This will never be a practical limitation.
Overrides:
format in class NumberFormat
Following copied from class: java.text.NumberFormat
See Also:
Format.format(java.lang.Object)

format

public StringBuffer format(double number,
                           StringBuffer toAppendTo,
                           FieldPosition status)
Returns pattern with formatted double.
Overrides:
format in class NumberFormat
Parameters:
number - number to be formatted & substituted.
toAppendTo - where text is appended.
status - ignore no useful status is returned.

parse

public Number parse(String text,
                    ParsePosition status)
Parses a Number from the input text.
Overrides:
parse in class NumberFormat
Parameters:
text - the source text.
status - an input-output parameter. On input, the status.index field indicates the first character of the source text that should be parsed. On exit, if no error occured, status.index is set to the first unparsed character in the source text. On exit, if an error did occur, status.index is unchanged and status.errorIndex is set to the first index of the character that caused the parse to fail.
Returns:
A Number representing the value of the number parsed.

nextDouble

public static final double nextDouble(double d)
Finds the least double greater than d. If NaN, returns same value.

Used to make half-open intervals.

See Also:
previousDouble(double)

previousDouble

public static final double previousDouble(double d)
Finds the greatest double less than d. If NaN, returns same value.
See Also:
nextDouble(double)

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class NumberFormat
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

hashCode

public int hashCode()
Generates a hash code for the message format object.
Overrides:
hashCode in class NumberFormat
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Equality comparision between two
Overrides:
equals in class NumberFormat
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

nextDouble

public static double nextDouble(double d,
                                boolean positive)
Finds the least double greater than d (if positive == true), or the greatest double less than d (if positive == false). If NaN, returns same value. Does not affect floating-point flags, provided these member functions do not: Double.longBitsToDouble(long) Double.doubleToLongBits(double) Double.isNaN(double)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.text.Annotation

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.Annotation

No usage of java.text.Annotation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.AttributedString

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.AttributedString

No usage of java.text.AttributedString

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.ChoiceFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.ChoiceFormat

No usage of java.text.ChoiceFormat

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.DecimalFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.DecimalFormat

No usage of java.text.DecimalFormat

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.MessageFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.MessageFormat

No usage of java.text.MessageFormat

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.RuleBasedCollator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.RuleBasedCollator

No usage of java.text.RuleBasedCollator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.SimpleDateFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.SimpleDateFormat

No usage of java.text.SimpleDateFormat

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.StringCharacterIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.StringCharacterIterator

No usage of java.text.StringCharacterIterator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.AttributedCharacterIterator.Attribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.AttributedCharacterIterator.Attribute

Packages that use AttributedCharacterIterator.Attribute
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of AttributedCharacterIterator.Attribute in java.awt

Methods in java.awt that return AttributedCharacterIterator.Attribute
 AttributedCharacterIterator.Attribute[] Font.getAvailableAttributes()
Returns the keys of all the attributes supported by this Font.

Uses of AttributedCharacterIterator.Attribute in java.awt.font

Subclasses of AttributedCharacterIterator.Attribute in java.awt.font
 class TextAttribute
The TextAttribute class defines attribute keys and attribute values used for text rendering.

Uses of AttributedCharacterIterator.Attribute in java.awt.im

Methods in java.awt.im with parameters of type AttributedCharacterIterator.Attribute
AttributedCharacterIterator | InputMethodRequests.getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes) Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
AttributedCharacterIterator | InputMethodRequests.cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes) Gets the latest committed text from the text editing component and removes it from the component's text body.
AttributedCharacterIterator | InputMethodRequests.getSelectedText(AttributedCharacterIterator.Attribute[] attributes) Gets the currently selected text from the text editing component.

Uses of AttributedCharacterIterator.Attribute in java.text

Fields in java.text declared as AttributedCharacterIterator.Attribute
static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute.LANGUAGE Attribute key for the language of some text.
static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute.READING Attribute key for the reading of some text.
static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT Attribute key for input method segments.

Methods in java.text with parameters of type AttributedCharacterIterator.Attribute
int | AttributedCharacterIterator.getRunStart(AttributedCharacterIterator.Attribute attribute) Returns the index of the first character of the run with respect to the given attribute containing the current character.
int | AttributedCharacterIterator.getRunLimit(AttributedCharacterIterator.Attribute attribute) Returns the index of the first character following the run with respect to the given attribute containing the current character.
Object | AttributedCharacterIterator.getAttribute(AttributedCharacterIterator.Attribute attribute) Returns the value of the named attribute for the current character.
void | AttributedString.addAttribute(AttributedCharacterIterator.Attribute attribute, Object value) Adds an attribute to the entire string.
void | AttributedString.addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex) Adds an attribute to a subrange of the string.
AttributedCharacterIterator | AttributedString.getIterator(AttributedCharacterIterator.Attribute[] attributes) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
AttributedCharacterIterator | AttributedString.getIterator(AttributedCharacterIterator.Attribute[] attributes, int beginIndex, int endIndex) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.

Constructors in java.text with parameters of type AttributedCharacterIterator.Attribute
AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.BreakIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.BreakIterator

Packages that use BreakIterator
java.awt.font | Provides classes and interface relating to fonts.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of BreakIterator in java.awt.font

Constructors in java.awt.font with parameters of type BreakIterator
LineBreakMeasurer(AttributedCharacterIterator text, BreakIterator breakIter, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.

Uses of BreakIterator in java.text

Methods in java.text that return BreakIterator
static BreakIterator | BreakIterator.getWordInstance() Create BreakIterator for word-breaks using default locale.
static BreakIterator | BreakIterator.getWordInstance(Locale where) Create BreakIterator for word-breaks using specified locale.
static BreakIterator | BreakIterator.getLineInstance() Create BreakIterator for line-breaks using default locale.
static BreakIterator | BreakIterator.getLineInstance(Locale where) Create BreakIterator for line-breaks using specified locale.
static BreakIterator | BreakIterator.getCharacterInstance() Create BreakIterator for character-breaks using default locale Returns an instance of a BreakIterator implementing character breaks.
static BreakIterator | BreakIterator.getCharacterInstance(Locale where) Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterator implementing character breaks.
static BreakIterator | BreakIterator.getSentenceInstance() Create BreakIterator for sentence-breaks using default locale Returns an instance of a BreakIterator implementing sentence breaks.
static BreakIterator | BreakIterator.getSentenceInstance(Locale where) Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterator implementing sentence breaks.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.CollationElementIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.CollationElementIterator

Packages that use CollationElementIterator
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of CollationElementIterator in java.text

Methods in java.text that return CollationElementIterator
CollationElementIterator | RuleBasedCollator.getCollationElementIterator(String source) Return a CollationElementIterator for the given String.
CollationElementIterator | RuleBasedCollator.getCollationElementIterator(CharacterIterator source) Return a CollationElementIterator for the given String.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.CollationKey

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.CollationKey

Packages that use CollationKey
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of CollationKey in java.text

Methods in java.text that return CollationKey
abstract CollationKey | Collator.getCollationKey(String source) Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.
CollationKey | RuleBasedCollator.getCollationKey(String source) Transforms the string into a series of characters that can be compared with CollationKey.compareTo.

Methods in java.text with parameters of type CollationKey
 int CollationKey.compareTo(CollationKey target)
Compare this CollationKey to the target CollationKey.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.Collator

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.Collator

Packages that use Collator
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of Collator in java.text

Subclasses of Collator in java.text
 class RuleBasedCollator
The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.

Methods in java.text that return Collator
static Collator | Collator.getInstance() Gets the Collator for the current default locale.
static Collator | Collator.getInstance(Locale desiredLocale) Gets the Collator for the desired locale.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.DateFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.DateFormat

Packages that use DateFormat
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of DateFormat in java.text

Subclasses of DateFormat in java.text
 class SimpleDateFormat
SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.

Methods in java.text that return DateFormat
static DateFormat | DateFormat.getTimeInstance() Gets the time formatter with the default formatting style for the default locale.
static DateFormat | DateFormat.getTimeInstance(int style) Gets the time formatter with the given formatting style for the default locale.
static DateFormat | DateFormat.getTimeInstance(int style, Locale aLocale) Gets the time formatter with the given formatting style for the given locale.
static DateFormat | DateFormat.getDateInstance() Gets the date formatter with the default formatting style for the default locale.
static DateFormat | DateFormat.getDateInstance(int style) Gets the date formatter with the given formatting style for the default locale.
static DateFormat | DateFormat.getDateInstance(int style, Locale aLocale) Gets the date formatter with the given formatting style for the given locale.
static DateFormat | DateFormat.getDateTimeInstance() Gets the date/time formatter with the default formatting style for the default locale.
static DateFormat | DateFormat.getDateTimeInstance(int dateStyle, int timeStyle) Gets the date/time formatter with the given date and time formatting styles for the default locale.
static DateFormat | DateFormat.getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale) Gets the date/time formatter with the given formatting styles for the given locale.
static DateFormat | DateFormat.getInstance() Get a default date/time formatter that uses the SHORT style for both the date and the time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.DateFormatSymbols

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.DateFormatSymbols

Packages that use DateFormatSymbols
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of DateFormatSymbols in java.text

Methods in java.text that return DateFormatSymbols
 DateFormatSymbols SimpleDateFormat.getDateFormatSymbols()
Gets the date/time formatting data.

Methods in java.text with parameters of type DateFormatSymbols
 void SimpleDateFormat.setDateFormatSymbols(DateFormatSymbols newFormatSymbols)
Allows you to set the date/time formatting data.

Constructors in java.text with parameters of type DateFormatSymbols
SimpleDateFormat(String pattern, DateFormatSymbols formatData)
Construct a SimpleDateFormat using the given pattern and locale-specific symbol data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.DecimalFormatSymbols

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.DecimalFormatSymbols

Packages that use DecimalFormatSymbols
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of DecimalFormatSymbols in java.text

Methods in java.text that return DecimalFormatSymbols
 DecimalFormatSymbols DecimalFormat.getDecimalFormatSymbols()
Returns the decimal format symbols, which is generally not changed by the programmer or user.

Methods in java.text with parameters of type DecimalFormatSymbols
 void DecimalFormat.setDecimalFormatSymbols(DecimalFormatSymbols newSymbols)
Sets the decimal format symbols, which is generally not changed by the programmer or user.

Constructors in java.text with parameters of type DecimalFormatSymbols
DecimalFormat(String pattern, DecimalFormatSymbols symbols)
Create a DecimalFormat from the given pattern and symbols.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.FieldPosition

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.FieldPosition

Packages that use FieldPosition
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of FieldPosition in java.text

Methods in java.text with parameters of type FieldPosition
abstract StringBuffer | Format.format(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
StringBuffer | NumberFormat.format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
abstract StringBuffer | NumberFormat.format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
abstract StringBuffer | NumberFormat.format(long number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
StringBuffer | ChoiceFormat.format(long number, StringBuffer toAppendTo, FieldPosition status) Specialization of format.
StringBuffer | ChoiceFormat.format(double number, StringBuffer toAppendTo, FieldPosition status) Returns pattern with formatted double.
StringBuffer | DateFormat.format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Overrides Format.
abstract StringBuffer | DateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats a Date into a date/time string.
StringBuffer | SimpleDateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition pos) Overrides DateFormat
StringBuffer | DecimalFormat.format(double number, StringBuffer result, FieldPosition fieldPosition) Formats a double to produce a string.
StringBuffer | DecimalFormat.format(long number, StringBuffer result, FieldPosition fieldPosition) Format a long to produce a string.
StringBuffer | MessageFormat.format(Object[] source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
StringBuffer | MessageFormat.format(Object source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.Format

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.Format

Packages that use Format
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of Format in java.text

Subclasses of Format in java.text
class | ChoiceFormat A ChoiceFormat allows you to attach a format to a range of numbers.
class | DateFormat DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
class | DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.
class | MessageFormat MessageFormat provides a means to produce concatenated messages in language-neutral way.
class | NumberFormat NumberFormat is the abstract base class for all number formats.
class | SimpleDateFormat SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner.

Methods in java.text that return Format
 Format[] MessageFormat.getFormats()
Gets formats that were set with setFormats.

Methods in java.text with parameters of type Format
void | MessageFormat.setFormats(Format[] newFormats) Sets formats to use on parameters.
void | MessageFormat.setFormat(int variable, Format newFormat) Set a format to be used on a variable in the pattern.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.NumberFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.NumberFormat

Packages that use NumberFormat
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of NumberFormat in java.text

Subclasses of NumberFormat in java.text
class | ChoiceFormat A ChoiceFormat allows you to attach a format to a range of numbers.
class | DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers.

Fields in java.text declared as NumberFormat
protected  NumberFormat DateFormat.numberFormat
The number formatter that DateFormat uses to format numbers in dates and times.

Methods in java.text that return NumberFormat
static NumberFormat | NumberFormat.getInstance() Returns the default number format for the current default locale.
static NumberFormat | NumberFormat.getInstance(Locale inLocale) Returns the default number format for the specified locale.
static NumberFormat | NumberFormat.getNumberInstance() Returns a general-purpose number format for the current default locale.
static NumberFormat | NumberFormat.getNumberInstance(Locale inLocale) Returns a general-purpose number format for the specified locale.
static NumberFormat | NumberFormat.getCurrencyInstance() Returns a currency format for the current default locale.
static NumberFormat | NumberFormat.getCurrencyInstance(Locale inLocale) Returns a currency format for the specified locale.
static NumberFormat | NumberFormat.getPercentInstance() Returns a percentage format for the current default locale.
static NumberFormat | NumberFormat.getPercentInstance(Locale inLocale) Returns a percentage format for the specified locale.
NumberFormat | DateFormat.getNumberFormat() Gets the number formatter which this date/time formatter uses to format and parse a time.

Methods in java.text with parameters of type NumberFormat
 void DateFormat.setNumberFormat(NumberFormat newNumberFormat)
Allows you to set the number formatter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.ParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.ParseException

Packages that use ParseException
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of ParseException in java.text

Methods in java.text that throw ParseException
Object | Format.parseObject(String source) Parses a string to produce an object.
Number | NumberFormat.parse(String text) Convenience method.
Date | DateFormat.parse(String text) Parse a date/time string.
Object[] | MessageFormat.parse(String source) Parses the string.

Constructors in java.text that throw ParseException
RuleBasedCollator(String rules)
RuleBasedCollator constructor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.text.ParsePosition

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.text.ParsePosition

Packages that use ParsePosition
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.

Uses of ParsePosition in java.text

Methods in java.text with parameters of type ParsePosition
abstract Object | Format.parseObject(String source, ParsePosition status) Parses a string to produce an object.
Object | NumberFormat.parseObject(String source, ParsePosition parsePosition) Parses a string to produce an object.
abstract Number | NumberFormat.parse(String text, ParsePosition parsePosition) Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
Number | ChoiceFormat.parse(String text, ParsePosition status) Parses a Number from the input text.
abstract Date | DateFormat.parse(String text, ParsePosition pos) Parse a date/time string according to the given parse position.
Object | DateFormat.parseObject(String source, ParsePosition pos) Parse a date/time string into an Object.
Date | SimpleDateFormat.parse(String text, ParsePosition pos) Overrides DateFormat
Number | DecimalFormat.parse(String text, ParsePosition parsePosition) Returns an instance of Number with a value matching the given string.
Object[] | MessageFormat.parse(String source, ParsePosition status) Parses the string.
Object | MessageFormat.parseObject(String text, ParsePosition status) Parses the string.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.text.AttributedCharacterIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.text.AttributedCharacterIterator

Packages that use AttributedCharacterIterator
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AttributedCharacterIterator in java.awt

Methods in java.awt with parameters of type AttributedCharacterIterator
abstract void | Graphics.drawString(AttributedCharacterIterator iterator, int x, int y) Draws the text given by the specified iterator, using this graphics context's current color.
abstract void | Graphics2D.drawString(AttributedCharacterIterator iterator, int x, int y) Renders the text of the specified iterator, using the Graphics2D context's current Paint.
abstract void | Graphics2D.drawString(AttributedCharacterIterator iterator, float x, float y) Renders the text of the specified iterator, using the Graphics2D context's current Paint.

Uses of AttributedCharacterIterator in java.awt.event

Methods in java.awt.event that return AttributedCharacterIterator
 AttributedCharacterIterator InputMethodEvent.getText()
Gets the combined committed and composed text.

Constructors in java.awt.event with parameters of type AttributedCharacterIterator
InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.

Uses of AttributedCharacterIterator in java.awt.font

Methods in java.awt.font with parameters of type AttributedCharacterIterator
void | LineBreakMeasurer.insertChar(AttributedCharacterIterator newParagraph, int insertPos) Updates this LineBreakMeasurer after a single character is inserted into the text, and sets the current position to the beginning of the paragraph.
void | LineBreakMeasurer.deleteChar(AttributedCharacterIterator newParagraph, int deletePos) Updates this LineBreakMeasurer after a single character is deleted from the text, and sets the current position to the beginning of the paragraph.
void | TextMeasurer.insertChar(AttributedCharacterIterator newParagraph, int insertPos) Updates the TextMeasurer after a single character has been inserted into the paragraph currently represented by this TextMeasurer.
void | TextMeasurer.deleteChar(AttributedCharacterIterator newParagraph, int deletePos) Updates the TextMeasurer after a single character has been deleted from the paragraph currently represented by this TextMeasurer.

Constructors in java.awt.font with parameters of type AttributedCharacterIterator
TextLayout(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextLayout from an iterator over styled text.
LineBreakMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
LineBreakMeasurer(AttributedCharacterIterator text, BreakIterator breakIter, FontRenderContext frc)
Constructs a LineBreakMeasurer for the specified text.
TextMeasurer(AttributedCharacterIterator text, FontRenderContext frc)
Constructs a TextMeasurer from the source text.

Uses of AttributedCharacterIterator in java.awt.im

Methods in java.awt.im that return AttributedCharacterIterator
AttributedCharacterIterator | InputMethodRequests.getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes) Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
AttributedCharacterIterator | InputMethodRequests.cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes) Gets the latest committed text from the text editing component and removes it from the component's text body.
AttributedCharacterIterator | InputMethodRequests.getSelectedText(AttributedCharacterIterator.Attribute[] attributes) Gets the currently selected text from the text editing component.

Uses of AttributedCharacterIterator in java.awt.im.spi

Methods in java.awt.im.spi with parameters of type AttributedCharacterIterator
 void InputMethodContext.dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
Creates an input method event from the arguments given and dispatches it to the client component.

Uses of AttributedCharacterIterator in java.text

Methods in java.text that return AttributedCharacterIterator
AttributedCharacterIterator | AttributedString.getIterator() Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string.
AttributedCharacterIterator | AttributedString.getIterator(AttributedCharacterIterator.Attribute[] attributes) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
AttributedCharacterIterator | AttributedString.getIterator(AttributedCharacterIterator.Attribute[] attributes, int beginIndex, int endIndex) Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.

Constructors in java.text with parameters of type AttributedCharacterIterator
AttributedString(AttributedCharacterIterator text)
Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.

Uses of AttributedCharacterIterator in javax.swing

Methods in javax.swing with parameters of type AttributedCharacterIterator
 void DebugGraphics.drawString(AttributedCharacterIterator iterator, int x, int y)
Overrides Graphics.drawString.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.text.CharacterIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.text.CharacterIterator

Packages that use CharacterIterator
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of CharacterIterator in java.awt

Methods in java.awt with parameters of type CharacterIterator
LineMetrics | FontMetrics.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
Rectangle2D | FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
int | Font.canDisplayUpTo(CharacterIterator iter, int start, int limit) Indicates whether or not this Font can display the specified String.
LineMetrics | Font.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns a LineMetrics object created with the specified arguments.
Rectangle2D | Font.getStringBounds(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns the bounds of the characters indexed in the specified CharacterIterator in the specified FontRenderContext.
GlyphVector | Font.createGlyphVector(FontRenderContext frc, CharacterIterator ci) Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext.

Uses of CharacterIterator in java.text

Subinterfaces of CharacterIterator in java.text
 interface AttributedCharacterIterator
An AttributedCharacterIterator allows iteration through both text and related attribute information.

Classes in java.text that implement CharacterIterator
 class StringCharacterIterator
StringCharacterIterator implements the CharacterIterater protocol for a String.

Methods in java.text that return CharacterIterator
abstract  CharacterIterator BreakIterator.getText()
Get the text being scanned

Methods in java.text with parameters of type CharacterIterator
void | CollationElementIterator.setText(CharacterIterator source) Set a new string over which to iterate.
CollationElementIterator | RuleBasedCollator.getCollationElementIterator(CharacterIterator source) Return a CollationElementIterator for the given String.
abstract void | BreakIterator.setText(CharacterIterator newText) Set a new text for scanning.

Uses of CharacterIterator in javax.swing.text

Classes in javax.swing.text that implement CharacterIterator
 class Segment
A segment of a character array representing a fragment of text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CollationElementIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class CollationElementIterator

java.lang.Object
  |
  +--java.text.CollationElementIterator
public final class CollationElementIterator
extends Object

The CollationElementIterator class is used as an iterator to walk through each character of an international string. Use the iterator to return the ordering priority of the positioned character. The ordering priority of a character, which we refer to as a key, defines how a character is collated in the given collation object.

For example, consider the following in Spanish:

 "ca" -> the first key is key('c') and second key is key('a').
 "cha" -> the first key is key('ch') and second key is key('a').
And in German,
 "äb"-> the first key is key('a'), the second key is key('e'), and
 the third key is key('b').
The key of a character is an integer composed of primary order(short), secondary order(byte), and tertiary order(byte). Java strictly defines the size and signedness of its primitive data types. Therefore, the static functions primaryOrder, secondaryOrder, and tertiaryOrder return int, short, and short respectively to ensure the correctness of the key value.

Example of the iterator usage,

 // get the first key of the string
 String str = "This is a test";
 CollationElementIterator c =
     new CollationElementIterator(str, 0, str.length(),
                                  Collator.getInstance());
 int primaryOrder = CollationElementIterator.primaryOrder(c->next());

CollationElementIterator.next returns the collation order of the next character. A collation order consists of primary order, secondary order and tertiary order. The data type of the collation order is int. The first 16 bits of a collation order is its primary order; the next 8 bits is the secondary order and the last 8 bits is the tertiary order.

See Also:
Collator, RuleBasedCollator

Field Summary
static int NULLORDER
Null order which indicates the end of string is reached by the cursor.
Method Summary
int | getMaxExpansion(int order) Return the maximum length of any expansion sequences that end with the specified comparison order.
int | getOffset() Returns the character offset in the original text corresponding to the next collation element.
int | next() Get the next collation element in the string.
int | previous() Get the previous collation element in the string.
static int | primaryOrder(int order) Return the primary component of a collation element.
void | reset() Resets the cursor to the beginning of the string.
static short | secondaryOrder(int order) Return the secondary component of a collation element.
void | setOffset(int newOffset) Sets the iterator to point to the collation element corresponding to the specified character (the parameter is a CHARACTER offset in the original string, not an offset into its corresponding sequence of collation elements).
void | setText(CharacterIterator source) Set a new string over which to iterate.
void | setText(String source) Set a new string over which to iterate.
static short | tertiaryOrder(int order) Return the tertiary component of a collation element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NULLORDER

public static final int NULLORDER
Null order which indicates the end of string is reached by the cursor.
Method Detail

reset

public void reset()
Resets the cursor to the beginning of the string. The next call to next() will return the first collation element in the string.

next

public int next()
Get the next collation element in the string.

This iterator iterates over a sequence of collation elements that were built from the string. Because there isn't necessarily a one-to-one mapping from characters to collation elements, this doesn't mean the same thing as "return the collation element [or ordering priority] of the next character in the string".

This function returns the collation element that the iterator is currently pointing to and then updates the internal pointer to point to the next element. previous() updates the pointer first and then returns the element. This means that when you change direction while iterating (i.e., call next() and then call previous(), or call previous() and then call next()), you'll get back the same element twice.

previous

public int previous()
Get the previous collation element in the string.

This iterator iterates over a sequence of collation elements that were built from the string. Because there isn't necessarily a one-to-one mapping from characters to collation elements, this doesn't mean the same thing as "return the collation element [or ordering priority] of the previous character in the string".

This function updates the iterator's internal pointer to point to the collation element preceding the one it's currently pointing to and then returns that element, while next() returns the current element and then updates the pointer. This means that when you change direction while iterating (i.e., call next() and then call previous(), or call previous() and then call next()), you'll get back the same element twice.

primaryOrder

public static final int primaryOrder(int order)
Return the primary component of a collation element.
Parameters:
order - the collation element
Returns:
the element's primary component

secondaryOrder

public static final short secondaryOrder(int order)
Return the secondary component of a collation element.
Parameters:
order - the collation element
Returns:
the element's secondary component

tertiaryOrder

public static final short tertiaryOrder(int order)
Return the tertiary component of a collation element.
Parameters:
order - the collation element
Returns:
the element's tertiary component

setOffset

public void setOffset(int newOffset)
Sets the iterator to point to the collation element corresponding to the specified character (the parameter is a CHARACTER offset in the original string, not an offset into its corresponding sequence of collation elements). The value returned by the next call to next() will be the collation element corresponding to the specified position in the text. If that position is in the middle of a contracting character sequence, the result of the next call to next() is the collation element for that sequence. This means that getOffset() is not guaranteed to return the same value as was passed to a preceding call to setOffset().
Parameters:
newOffset - The new character offset into the original text.

getOffset

public int getOffset()
Returns the character offset in the original text corresponding to the next collation element. (That is, getOffset() returns the position in the text corresponding to the collation element that will be returned by the next call to next().) This value will always be the index of the FIRST character corresponding to the collation element (a contracting character sequence is when two or more characters all correspond to the same collation element). This means if you do setOffset(x) followed immediately by getOffset(), getOffset() won't necessarily return x.
Returns:
The character offset in the original text corresponding to the collation element that will be returned by the next call to next().

getMaxExpansion

public int getMaxExpansion(int order)
Return the maximum length of any expansion sequences that end with the specified comparison order.
Parameters:
order - a collation order returned by previous or next.
Returns:
the maximum length of any expansion sequences ending with the specified order.

setText

public void setText(String source)
Set a new string over which to iterate.
Parameters:
str - the new source text.

setText

public void setText(CharacterIterator source)
Set a new string over which to iterate.
Parameters:
str - the new source text.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CollationKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class CollationKey

java.lang.Object
  |
  +--java.text.CollationKey
All Implemented Interfaces:
Comparable
public final class CollationKey
extends Object
implements Comparable

A CollationKey represents a String under the rules of a specific Collator object. Comparing two CollationKeys returns the relative order of the Strings they represent. Using CollationKeys to compare Strings is generally faster than using Collator.compare. Thus, when the Strings must be compared multiple times, for example when sorting a list of Strings. It's more efficient to use CollationKeys.

You can not create CollationKeys directly. Rather, generate them by calling Collator.getCollationKey. You can only compare CollationKeys generated from the same Collator object.

Generating a CollationKey for a String involves examining the entire String and converting it to series of bits that can be compared bitwise. This allows fast comparisons once the keys are generated. The cost of generating keys is recouped in faster comparisons when Strings need to be compared many times. On the other hand, the result of a comparison is often determined by the first couple of characters of each String. Collator.compare examines only as many characters as it needs which allows it to be faster when doing single comparisons.

The following example shows how CollationKeys might be used to sort a list of Strings.

 // Create an array of CollationKeys for the Strings to be sorted.
 Collator myCollator = Collator.getInstance();
 CollationKey[] keys = new CollationKey[3];
 keys[0] = myCollator.getCollationKey("Tom");
 keys[1] = myCollator.getCollationKey("Dick");
 keys[2] = myCollator.getCollationKey("Harry");
 sort( keys );

 //...

 // Inside body of sort routine, compare keys this way
 if( keys[i].compareTo( keys[j] ) > 0 )
    // swap keys[i] and keys[j]

 //...

 // Finally, when we've returned from sort.
 System.out.println( keys[0].getSourceString() );
 System.out.println( keys[1].getSourceString() );
 System.out.println( keys[2].getSourceString() );

See Also:
Collator, RuleBasedCollator

Method Summary
int | compareTo(CollationKey target) Compare this CollationKey to the target CollationKey.
int | compareTo(Object o) Compares this CollationKey with the specified Object for order.
boolean | equals(Object target) Compare this CollationKey and the target CollationKey for equality.
String | getSourceString() Returns the String that this CollationKey represents.
int | hashCode() Creates a hash code for this CollationKey.
byte[] | toByteArray() Converts the CollationKey to a sequence of bits.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Method Detail

compareTo

public int compareTo(CollationKey target)
Compare this CollationKey to the target CollationKey. The collation rules of the Collator object which created these keys are applied. Note: CollationKeys created by different Collators can not be compared.
Parameters:
target - target CollationKey
Returns:
Returns an integer value. Value is less than zero if this is less than target, value is zero if this and target are equal and value is greater than zero if this is greater than target.
See Also:
Collator.compare(java.lang.String, java.lang.String)

compareTo

public int compareTo(Object o)
Compares this CollationKey with the specified Object for order. Returns a negative integer, zero, or a positive integer as this CollationKey is less than, equal to, or greater than the given Object.
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this Collation Key is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - the specified Object is not a CollationKey.
Since:
1.2
See Also:
Comparable

equals

public boolean equals(Object target)
Compare this CollationKey and the target CollationKey for equality. The collation rules of the Collator object which created these keys are applied. Note: CollationKeys created by different Collators can not be compared.
Overrides:
equals in class Object
Parameters:
target - the CollationKey to compare to.
Returns:
Returns true if two objects are equal, false otherwise.

hashCode

public int hashCode()
Creates a hash code for this CollationKey. The hash value is calculated on the key itself, not the String from which the key was created. Thus if x and y are CollationKeys, then x.hashCode(x) == y.hashCode() if x.equals(y) is true. This allows language-sensitive comparison in a hash table. See the CollatinKey class description for an example.
Overrides:
hashCode in class Object
Returns:
the hash value based on the string's collation order.

getSourceString

public String getSourceString()
Returns the String that this CollationKey represents.

toByteArray

public byte[] toByteArray()
Converts the CollationKey to a sequence of bits. If two CollationKeys could be legitimately compared, then one could compare the byte arrays for each of those keys to obtain the same result. Byte arrays are organized most significant byte first.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Collator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class Collator

java.lang.Object
  |
  +--java.text.Collator
All Implemented Interfaces:
Cloneable, Comparator
Direct Known Subclasses:
RuleBasedCollator
public abstract class Collator
extends Object
implements Comparator, Cloneable

The Collator class performs locale-sensitive String comparison. You use this class to build searching and sorting routines for natural language text.

Collator is an abstract base class. Subclasses implement specific collation strategies. One subclass, RuleBasedCollator, is currently provided with the Java 2 platform and is applicable to a wide set of languages. Other subclasses may be created to handle more specialized needs.

Like other locale-sensitive classes, you can use the static factory method, getInstance, to obtain the appropriate Collator object for a given locale. You will only need to look at the subclasses of Collator if you need to understand the details of a particular collation strategy or if you need to modify that strategy.

The following example shows how to compare two strings using the Collator for the default locale.

 // Compare two strings in the default locale
 Collator myCollator = Collator.getInstance();
 if( myCollator.compare("abc", "ABC") <0 )=")" System.out.println("abc="System.out.println("abc" is="is" less="less" than="than" ABC");="ABC");" else="else" System.out.println("abc="System.out.println("abc" is="is" greater="greater" than="than" or="or" equal="equal" to="to" ABC");="ABC");"

You can set a Collator's strength property to determine the level of difference considered significant in comparisons. Four strengths are provided: PRIMARY, SECONDARY, TERTIARY, and IDENTICAL. The exact assignment of strengths to language features is locale dependant. For example, in Czech, "e" and "f" are considered primary differences, while "e" and "ê" are secondary differences, "e" and "E" are tertiary differences and "e" and "e" are identical. The following shows how both case and accents could be ignored for US English.

 //Get the Collator for US English and set its strength to PRIMARY
 Collator usCollator = Collator.getInstance(Locale.US);
 usCollator.setStrength(Collator.PRIMARY);
 if( usCollator.compare("abc", "ABC") == 0 ) {
     System.out.println("Strings are equivalent");
 }

For comparing Strings exactly once, the compare method provides the best performance. When sorting a list of Strings however, it is generally necessary to compare each String multiple times. In this case, CollationKeys provide better performance. The CollationKey class converts a String to a series of bits that can be compared bitwise against other CollationKeys. A CollationKey is created by a Collator object for a given String.
Note: CollationKeys from different Collators can not be compared. See the class description for CollationKey for an example using CollationKeys.

See Also:
RuleBasedCollator, CollationKey, CollationElementIterator, Locale

Field Summary
static int | CANONICAL_DECOMPOSITION Decomposition mode value.
static int | FULL_DECOMPOSITION Decomposition mode value.
static int | IDENTICAL Collator strength value.
static int | NO_DECOMPOSITION Decomposition mode value.
static int | PRIMARY Collator strength value.
static int | SECONDARY Collator strength value.
static int | TERTIARY Collator strength value.
Constructor Summary
protected Collator()
Default constructor.
Method Summary
Object | clone() Overrides Cloneable
int | compare(Object o1, Object o2) Compares its two arguments for order.
abstract int | compare(String source, String target) Compares the source string to the target string according to the collation rules for this Collator.
boolean | equals(Object that) Compares the equality of two Collators.
boolean | equals(String source, String target) Convenience method for comparing the equality of two strings based on this Collator's collation rules.
static Locale[] | getAvailableLocales() Get the set of Locales for which Collators are installed.
abstract CollationKey | getCollationKey(String source) Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.
int | getDecomposition() Get the decomposition mode of this Collator.
static Collator | getInstance() Gets the Collator for the current default locale.
static Collator | getInstance(Locale desiredLocale) Gets the Collator for the desired locale.
int | getStrength() Returns this Collator's strength property.
abstract int | hashCode() Generates the hash code for this Collator.
void | setDecomposition(int decompositionMode) Set the decomposition mode of this Collator.
void | setStrength(int newStrength) Sets this Collator's strength property.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

PRIMARY

public static final int PRIMARY
Collator strength value. When set, only PRIMARY differences are considered significant during comparison. The assignment of strengths to language features is locale dependant. A common example is for different base letters ("a" vs "b") to be considered a PRIMARY difference.
See Also:
setStrength(int), getStrength()

SECONDARY

public static final int SECONDARY
Collator strength value. When set, only SECONDARY and above differences are considered significant during comparison. The assignment of strengths to language features is locale dependant. A common example is for different accented forms of the same base letter ("a" vs "ä") to be considered a SECONDARY difference.
See Also:
setStrength(int), getStrength()

TERTIARY

public static final int TERTIARY
Collator strength value. When set, only TERTIARY and above differences are considered significant during comparison. The assignment of strengths to language features is locale dependant. A common example is for case differences ("a" vs "A") to be considered a TERTIARY difference.
See Also:
setStrength(int), getStrength()

IDENTICAL

public static final int IDENTICAL
Collator strength value. When set, all differences are considered significant during comparison. The assignment of strengths to language features is locale dependant. A common example is for control characters ("\u0001" vs "\u0002") to be considered equal at the PRIMARY, SECONDARY, and TERTIARY levels but different at the IDENTICAL level. Additionally, differences between pre-composed accents such as "\u00C0" (A-grave) and combining accents such as "A\u0300" (A, combining-grave) will be considered significant at the tertiary level if decomposition is set to NO_DECOMPOSITION.

NO_DECOMPOSITION

public static final int NO_DECOMPOSITION
Decomposition mode value. With NO_DECOMPOSITION set, accented characters will not be decomposed for collation. This provides the fastest collation but will only produce correct results for languages that do not use accents.
See Also:
getDecomposition(), setDecomposition(int)

CANONICAL_DECOMPOSITION

public static final int CANONICAL_DECOMPOSITION
Decomposition mode value. With CANONICAL_DECOMPOSITION set, characters that are canonical variants according to Unicode 2.0 will be decomposed for collation. This is the default setting and should be used to get correct collation of accented characters.

CANONICAL_DECOMPOSITION corresponds to Normalization Form D as described in Unicode Technical Report #15.

See Also:
getDecomposition(), setDecomposition(int)

FULL_DECOMPOSITION

public static final int FULL_DECOMPOSITION
Decomposition mode value. With FULL_DECOMPOSITION set, both Unicode canonical variants and Unicode compatibility variants will be decomposed for collation. This causes not only accented characters to be collated, but also characters that have special formats to be collated with their norminal form. For example, the half-width and full-width ASCII and Katakana characters are then collated together. FULL_DECOMPOSITION is the most complete and therefore the slowest decomposition mode.

FULL_DECOMPOSITION corresponds to Normalization Form DC as described in Unicode Technical Report #15.

See Also:
getDecomposition(), setDecomposition(int)
Constructor Detail

Collator

protected Collator()
Default constructor. This constructor is protected so subclasses can get access to it. Users typically create a Collator sub-class by calling the factory method getInstance.
See Also:
getInstance()
Method Detail

getInstance

public static Collator getInstance()
Gets the Collator for the current default locale. The default locale is determined by java.util.Locale.getDefault.
Returns:
the Collator for the default locale.(for example, en_US)
See Also:
Locale.getDefault()

getInstance

public static Collator getInstance(Locale desiredLocale)
Gets the Collator for the desired locale.
Parameters:
desiredLocale - the desired locale.
Returns:
the Collator for the desired locale.
See Also:
Locale, ResourceBundle

compare

public abstract int compare(String source,
                            String target)
Compares the source string to the target string according to the collation rules for this Collator. Returns an integer less than, equal to or greater than zero depending on whether the source String is less than, equal to or greater than the target string. See the Collator class description for an example of use.

For a one time comparison, this method has the best performance. If a given String will be involved in multiple comparisons, CollationKey.compareTo has the best performance. See the Collator class description for an example using CollationKeys.

Parameters:
source - the source string.
target - the target string.
Returns:
Returns an integer value. Value is less than zero if source is less than target, value is zero if source and target are equal, value is greater than zero if source is greater than target.
See Also:
CollationKey, getCollationKey(java.lang.String)

compare

public int compare(Object o1,
                   Object o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

This implementation merely returns compare((String)o1, (String)o2) .

Specified by:
compare in interface Comparator
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
ClassCastException - the arguments cannot be cast to Strings.
Since:
1.2
See Also:
Comparator

getCollationKey

public abstract CollationKey getCollationKey(String source)
Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. CollationKeys provide better performance than Collator.compare when Strings are involved in multiple comparisons. See the Collator class description for an example using CollationKeys.
Parameters:
source - the string to be transformed into a collation key.
Returns:
the CollationKey for the given String based on this Collator's collation rules. If the source String is null, a null CollationKey is returned.
See Also:
CollationKey, compare(java.lang.String, java.lang.String)

equals

public boolean equals(String source,
                      String target)
Convenience method for comparing the equality of two strings based on this Collator's collation rules.
Parameters:
source - the source string to be compared with.
target - the target string to be compared with.
Returns:
true if the strings are equal according to the collation rules. false, otherwise.
See Also:
compare(java.lang.String, java.lang.String)

getStrength

public int getStrength()
Returns this Collator's strength property. The strength property determines the minimum level of difference considered significant during comparison. See the Collator class description for an example of use.
Returns:
this Collator's current strength property.
See Also:
setStrength(int), PRIMARY, SECONDARY, TERTIARY, IDENTICAL

setStrength

public void setStrength(int newStrength)
Sets this Collator's strength property. The strength property determines the minimum level of difference considered significant during comparison. See the Collator class description for an example of use.
Parameters:
the - new strength value.
Throws:
IllegalArgumentException - If the new strength value is not one of PRIMARY, SECONDARY, TERTIARY or IDENTICAL.
See Also:
getStrength(), PRIMARY, SECONDARY, TERTIARY, IDENTICAL

getDecomposition

public int getDecomposition()
Get the decomposition mode of this Collator. Decomposition mode determines how Unicode composed characters are handled. Adjusting decomposition mode allows the user to select between faster and more complete collation behavior.

The three values for decomposition mode are:

  • NO_DECOMPOSITION,
  • CANONICAL_DECOMPOSITION
  • FULL_DECOMPOSITION.
See the documentation for these three constants for a description of their meaning.
Returns:
the decomposition mode
See Also:
setDecomposition(int), NO_DECOMPOSITION, CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION

setDecomposition

public void setDecomposition(int decompositionMode)
Set the decomposition mode of this Collator. See getDecomposition for a description of decomposition mode.
Parameters:
the - new decomposition mode
Throws:
IllegalArgumentException - If the given value is not a valid decomposition mode.
See Also:
getDecomposition(), NO_DECOMPOSITION, CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION

getAvailableLocales

public static Locale[] getAvailableLocales()
Get the set of Locales for which Collators are installed.
Returns:
the list of available locales which collators are installed.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

equals

public boolean equals(Object that)
Compares the equality of two Collators.
Specified by:
equals in interface Comparator
Overrides:
equals in class Object
Parameters:
that - the Collator to be compared with this.
Returns:
true if this Collator is the same as that Collator; false otherwise.

hashCode

public abstract int hashCode()
Generates the hash code for this Collator.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class DateFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.DateFormat
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
SimpleDateFormat
public abstract class DateFormat
extends Format

DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner. The date/time formatting subclass, such as SimpleDateFormat, allows for formatting (i.e., date -> text), parsing (text -> date), and normalization. The date is represented as a Date object or as the milliseconds since January 1, 1970, 00:00:00 GMT.

DateFormat provides many class methods for obtaining default date/time formatters based on the default or a given loacle and a number of formatting styles. The formatting styles include FULL, LONG, MEDIUM, and SHORT. More detail and examples of using these styles are provided in the method descriptions.

DateFormat helps you to format and parse dates for any locale. Your code can be completely independent of the locale conventions for months, days of the week, or even the calendar format: lunar vs. solar.

To format a date for the current Locale, use one of the static factory methods:

  myString = DateFormat.getDateInstance().format(myDate);

If you are formatting multiple numbers, it is more efficient to get the format and use it multiple times so that the system doesn't have to fetch the information about the local language and country conventions multiple times.

  DateFormat df = DateFormat.getDateInstance();
  for (int i = 0; i

To format a number for a different Locale, specify it in the
 call to getDateInstance().

  DateFormat df = DateFormat.getDateInstance(Locale.FRANCE);

You can use a DateFormat to parse also.

  myDate = df.parse(myString);

Use getDateInstance to get the normal date format for that country.
 There are other static factory methods available.
 Use getTimeInstance to get the time format for that country.
 Use getDateTimeInstance to get a date and time format. You can pass in
 different options to these factory methods to control the length of the
 result; from SHORT to MEDIUM to LONG to FULL. The exact result depends
 on the locale, but generally:

  • SHORT is completely numeric, such as 12.13.52 or 3:30pm

  • MEDIUM is longer, such as Jan 12, 1952

  • LONG is longer, such as January 12, 1952 or 3:30:32pm

  • FULL is pretty completely specified, such as
 Tuesday, April 12, 1952 AD or 3:30:42pm PST.

You can also set the time zone on the format if you wish.
 If you want even more control over the format or parsing,
 (or want to give your users more control),
 you can try casting the DateFormat you get from the factory methods
 to a SimpleDateFormat. This will work for the majority
 of countries; just remember to put it in a try block in case you
 encounter an unusual one.

You can also use forms of the parse and format methods with
 ParsePosition and FieldPosition to
 allow you to

  • progressively parse through pieces of a string.

  • align any particular field, or find out where it is for selection
 on the screen.

See Also:
Format,
NumberFormat,
SimpleDateFormat,
Calendar,
GregorianCalendar,
TimeZone, Serialized Form

Field Summary
static int | AM_PM_FIELD Useful constant for AM_PM field alignment.
protected Calendar | calendar The calendar that DateFormat uses to produce the time field values needed to implement date and time formatting.
static int | DATE_FIELD Useful constant for DATE field alignment.
static int | DAY_OF_WEEK_FIELD Useful constant for DAY_OF_WEEK field alignment.
static int | DAY_OF_WEEK_IN_MONTH_FIELD Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
static int | DAY_OF_YEAR_FIELD Useful constant for DAY_OF_YEAR field alignment.
static int | DEFAULT Constant for default style pattern.
static int | ERA_FIELD Useful constant for ERA field alignment.
static int | FULL Constant for full style pattern.
static int | HOUR_OF_DAY0_FIELD Useful constant for zero-based HOUR_OF_DAY field alignment.
static int | HOUR_OF_DAY1_FIELD Useful constant for one-based HOUR_OF_DAY field alignment.
static int | HOUR0_FIELD Useful constant for zero-based HOUR field alignment.
static int | HOUR1_FIELD Useful constant for one-based HOUR field alignment.
static int | LONG Constant for long style pattern.
static int | MEDIUM Constant for medium style pattern.
static int | MILLISECOND_FIELD Useful constant for MILLISECOND field alignment.
static int | MINUTE_FIELD Useful constant for MINUTE field alignment.
static int | MONTH_FIELD Useful constant for MONTH field alignment.
protected NumberFormat | numberFormat The number formatter that DateFormat uses to format numbers in dates and times.
static int | SECOND_FIELD Useful constant for SECOND field alignment.
static int | SHORT Constant for short style pattern.
static int | TIMEZONE_FIELD Useful constant for TIMEZONE field alignment.
static int | WEEK_OF_MONTH_FIELD Useful constant for WEEK_OF_MONTH field alignment.
static int | WEEK_OF_YEAR_FIELD Useful constant for WEEK_OF_YEAR field alignment.
static int | YEAR_FIELD Useful constant for YEAR field alignment.

Constructor Summary

protected
DateFormat()

          Create a new date format.

Method Summary
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Overrides equals
String | format(Date date) Formats a Date into a date/time string.
abstract StringBuffer | format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats a Date into a date/time string.
StringBuffer | format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Overrides Format.
static Locale[] | getAvailableLocales() Gets the set of locales for which DateFormats are installed.
Calendar | getCalendar() Gets the calendar associated with this date/time formatter.
static DateFormat | getDateInstance() Gets the date formatter with the default formatting style for the default locale.
static DateFormat | getDateInstance(int style) Gets the date formatter with the given formatting style for the default locale.
static DateFormat | getDateInstance(int style, Locale aLocale) Gets the date formatter with the given formatting style for the given locale.
static DateFormat | getDateTimeInstance() Gets the date/time formatter with the default formatting style for the default locale.
static DateFormat | getDateTimeInstance(int dateStyle, int timeStyle) Gets the date/time formatter with the given date and time formatting styles for the default locale.
static DateFormat | getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale) Gets the date/time formatter with the given formatting styles for the given locale.
static DateFormat | getInstance() Get a default date/time formatter that uses the SHORT style for both the date and the time.
NumberFormat | getNumberFormat() Gets the number formatter which this date/time formatter uses to format and parse a time.
static DateFormat | getTimeInstance() Gets the time formatter with the default formatting style for the default locale.
static DateFormat | getTimeInstance(int style) Gets the time formatter with the given formatting style for the default locale.
static DateFormat | getTimeInstance(int style, Locale aLocale) Gets the time formatter with the given formatting style for the given locale.
TimeZone | getTimeZone() Gets the time zone.
int | hashCode() Overrides hashCode
boolean | isLenient() Tell whether date/time parsing is to be lenient.
Date | parse(String text) Parse a date/time string.
abstract Date | parse(String text, ParsePosition pos) Parse a date/time string according to the given parse position.
Object | parseObject(String source, ParsePosition pos) Parse a date/time string into an Object.
void | setCalendar(Calendar newCalendar) Set the calendar to be used by this date format.
void | setLenient(boolean lenient) Specify whether or not date/time parsing is to be lenient.
void | setNumberFormat(NumberFormat newNumberFormat) Allows you to set the number formatter.
void | setTimeZone(TimeZone zone) Sets the time zone for the calendar of this DateFormat object.

Methods inherited from class java.text.Format

format, parseObject

Methods inherited from class java.lang.Object

finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

calendar

protected Calendar calendar

The calendar that DateFormat uses to produce the time field
 values needed to implement date and time formatting.  Subclasses should
 initialize this to a calendar appropriate for the locale associated with
 this DateFormat.

numberFormat

protected NumberFormat numberFormat

The number formatter that DateFormat uses to format numbers
 in dates and times.  Subclasses should initialize this to a number format
 appropriate for the locale associated with this DateFormat.

ERA_FIELD

public static final int ERA_FIELD

Useful constant for ERA field alignment.
 Used in FieldPosition of date/time formatting.

YEAR_FIELD

public static final int YEAR_FIELD

Useful constant for YEAR field alignment.
 Used in FieldPosition of date/time formatting.

MONTH_FIELD

public static final int MONTH_FIELD

Useful constant for MONTH field alignment.
 Used in FieldPosition of date/time formatting.

DATE_FIELD

public static final int DATE_FIELD

Useful constant for DATE field alignment.
 Used in FieldPosition of date/time formatting.

HOUR_OF_DAY1_FIELD

public static final int HOUR_OF_DAY1_FIELD

Useful constant for one-based HOUR_OF_DAY field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR_OF_DAY1_FIELD is used for the one-based 24-hour clock.
 For example, 23:59 + 01:00 results in 24:59.

HOUR_OF_DAY0_FIELD

public static final int HOUR_OF_DAY0_FIELD

Useful constant for zero-based HOUR_OF_DAY field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR_OF_DAY0_FIELD is used for the zero-based 24-hour clock.
 For example, 23:59 + 01:00 results in 00:59.

MINUTE_FIELD

public static final int MINUTE_FIELD

Useful constant for MINUTE field alignment.
 Used in FieldPosition of date/time formatting.

SECOND_FIELD

public static final int SECOND_FIELD

Useful constant for SECOND field alignment.
 Used in FieldPosition of date/time formatting.

MILLISECOND_FIELD

public static final int MILLISECOND_FIELD

Useful constant for MILLISECOND field alignment.
 Used in FieldPosition of date/time formatting.

DAY_OF_WEEK_FIELD

public static final int DAY_OF_WEEK_FIELD

Useful constant for DAY_OF_WEEK field alignment.
 Used in FieldPosition of date/time formatting.

DAY_OF_YEAR_FIELD

public static final int DAY_OF_YEAR_FIELD

Useful constant for DAY_OF_YEAR field alignment.
 Used in FieldPosition of date/time formatting.

DAY_OF_WEEK_IN_MONTH_FIELD

public static final int DAY_OF_WEEK_IN_MONTH_FIELD

Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
 Used in FieldPosition of date/time formatting.

WEEK_OF_YEAR_FIELD

public static final int WEEK_OF_YEAR_FIELD

Useful constant for WEEK_OF_YEAR field alignment.
 Used in FieldPosition of date/time formatting.

WEEK_OF_MONTH_FIELD

public static final int WEEK_OF_MONTH_FIELD

Useful constant for WEEK_OF_MONTH field alignment.
 Used in FieldPosition of date/time formatting.

AM_PM_FIELD

public static final int AM_PM_FIELD

Useful constant for AM_PM field alignment.
 Used in FieldPosition of date/time formatting.

HOUR1_FIELD

public static final int HOUR1_FIELD

Useful constant for one-based HOUR field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR1_FIELD is used for the one-based 12-hour clock.
 For example, 11:30 PM + 1 hour results in 12:30 AM.

HOUR0_FIELD

public static final int HOUR0_FIELD

Useful constant for zero-based HOUR field alignment.
 Used in FieldPosition of date/time formatting.
 HOUR0_FIELD is used for the zero-based 12-hour clock.
 For example, 11:30 PM + 1 hour results in 00:30 AM.

TIMEZONE_FIELD

public static final int TIMEZONE_FIELD

Useful constant for TIMEZONE field alignment.
 Used in FieldPosition of date/time formatting.

FULL

public static final int FULL

Constant for full style pattern.

LONG

public static final int LONG

Constant for long style pattern.

MEDIUM

public static final int MEDIUM

Constant for medium style pattern.

SHORT

public static final int SHORT

Constant for short style pattern.

DEFAULT

public static final int DEFAULT

Constant for default style pattern.  Its value is MEDIUM.

Constructor Detail

DateFormat

protected DateFormat()

Create a new date format.

Method Detail

format

public final StringBuffer format(Object obj,
                                 StringBuffer toAppendTo,
                                 FieldPosition fieldPosition)

Overrides Format.
 Formats a time object into a time string. Examples of time objects
 are a time value expressed in milliseconds and a Date object.

Overrides:
format in class Format

Parameters:
obj - must be a Number or a Date.
toAppendTo - the string buffer for the returning time string.
fieldPosition - keeps track of the position of the field
 within the returned string.
 On input: an alignment field,
 if desired. On output: the offsets of the alignment field. For
 example, given a time text "1996.07.10 AD at 15:08:56 PDT",
 if the given fieldPosition is DateFormat.YEAR_FIELD, the
 begin index and end index of fieldPosition will be set to
 0 and 4, respectively.
 Notice that if the same time field appears
 more than once in a pattern, the fieldPosition will be set for the first
 occurence of that time field. For instance, formatting a Date to
 the time string "1 PM PDT (Pacific Daylight Time)" using the pattern
 "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
 the begin index and end index of fieldPosition will be set to
 5 and 8, respectively, for the first occurence of the timezone
 pattern character 'z'.
Returns:
the formatted time string.
See Also:
Format

format

public abstract StringBuffer format(Date date,
                                    StringBuffer toAppendTo,
                                    FieldPosition fieldPosition)

Formats a Date into a date/time string.

Parameters:
date - a Date to be formatted into a date/time string.
toAppendTo - the string buffer for the returning date/time string.
fieldPosition - keeps track of the position of the field
 within the returned string.
 On input: an alignment field,
 if desired. On output: the offsets of the alignment field. For
 example, given a time text "1996.07.10 AD at 15:08:56 PDT",
 if the given fieldPosition is DateFormat.YEAR_FIELD, the
 begin index and end index of fieldPosition will be set to
 0 and 4, respectively.
 Notice that if the same time field appears
 more than once in a pattern, the fieldPosition will be set for the first
 occurence of that time field. For instance, formatting a Date to
 the time string "1 PM PDT (Pacific Daylight Time)" using the pattern
 "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
 the begin index and end index of fieldPosition will be set to
 5 and 8, respectively, for the first occurence of the timezone
 pattern character 'z'.
Returns:
the formatted date/time string.

format

public final String format(Date date)

Formats a Date into a date/time string.

Parameters:
date - the time value to be formatted into a time string.
Returns:
the formatted time string.

parse

public Date parse(String text)
           throws ParseException

Parse a date/time string.

Parameters:
text - The date/time string to be parsed
Returns:
A Date, or null if the input could not be parsed
Throws:
ParseException - If the given string cannot be parsed as a date.
See Also:
parse(String, ParsePosition)

parse

public abstract Date parse(String text,
                           ParsePosition pos)

Parse a date/time string according to the given parse position.  For
 example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Date
 that is equivalent to Date(837039928046).

 By default, parsing is lenient: If the input is not in the form used
 by this object's format method but can still be parsed as a date, then
 the parse succeeds.  Clients may insist on strict adherence to the
 format by calling setLenient(false).

Parameters:
text - The date/time string to be parsed
pos - On input, the position at which to start parsing; on
              output, the position at which parsing terminated, or the
              start position if the parse failed.
Returns:
A Date, or null if the input could not be parsed
See Also:
setLenient(boolean)

parseObject

public Object parseObject(String source,
                          ParsePosition pos)

Parse a date/time string into an Object.  This convenience method simply
 calls parse(String, ParsePosition).

Overrides:
parseObject in class Format

See Also:
parse(String, ParsePosition)

getTimeInstance

public static final DateFormat getTimeInstance()

Gets the time formatter with the default formatting style
 for the default locale.

Returns:
a time formatter.

getTimeInstance

public static final DateFormat getTimeInstance(int style)

Gets the time formatter with the given formatting style
 for the default locale.

Parameters:
style - the given formatting style. For example,
 SHORT for "h:mm a" in the US locale.
Returns:
a time formatter.

getTimeInstance

public static final DateFormat getTimeInstance(int style,
                                               Locale aLocale)

Gets the time formatter with the given formatting style
 for the given locale.

Parameters:
style - the given formatting style. For example,
 SHORT for "h:mm a" in the US locale.
aLocale - the given locale.
Returns:
a time formatter.

getDateInstance

public static final DateFormat getDateInstance()

Gets the date formatter with the default formatting style
 for the default locale.

Returns:
a date formatter.

getDateInstance

public static final DateFormat getDateInstance(int style)

Gets the date formatter with the given formatting style
 for the default locale.

Parameters:
style - the given formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
Returns:
a date formatter.

getDateInstance

public static final DateFormat getDateInstance(int style,
                                               Locale aLocale)

Gets the date formatter with the given formatting style
 for the given locale.

Parameters:
style - the given formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
aLocale - the given locale.
Returns:
a date formatter.

getDateTimeInstance

public static final DateFormat getDateTimeInstance()

Gets the date/time formatter with the default formatting style
 for the default locale.

Returns:
a date/time formatter.

getDateTimeInstance

public static final DateFormat getDateTimeInstance(int dateStyle,
                                                   int timeStyle)

Gets the date/time formatter with the given date and time
 formatting styles for the default locale.

Parameters:
dateStyle - the given date formatting style. For example,
 SHORT for "M/d/yy" in the US locale.
timeStyle - the given time formatting style. For example,
 SHORT for "h:mm a" in the US locale.
Returns:
a date/time formatter.

getDateTimeInstance

public static final DateFormat getDateTimeInstance(int dateStyle,
                                                   int timeStyle,
                                                   Locale aLocale)

Gets the date/time formatter with the given formatting styles
 for the given locale.

Parameters:
dateStyle - the given date formatting style.
timeStyle - the given time formatting style.
aLocale - the given locale.
Returns:
a date/time formatter.

getInstance

public static final DateFormat getInstance()

Get a default date/time formatter that uses the SHORT style for both the
 date and the time.

getAvailableLocales

public static Locale[] getAvailableLocales()

Gets the set of locales for which DateFormats are installed.

Returns:
the set of locales for which DateFormats are installed.

setCalendar

public void setCalendar(Calendar newCalendar)

Set the calendar to be used by this date format.  Initially, the default
 calendar for the specified or default locale is used.

Parameters:
newCalendar - the new Calendar to be used by the date format

getCalendar

public Calendar getCalendar()

Gets the calendar associated with this date/time formatter.

Returns:
the calendar associated with this date/time formatter.

setNumberFormat

public void setNumberFormat(NumberFormat newNumberFormat)

Allows you to set the number formatter.

Parameters:
newNumberFormat - the given new NumberFormat.

getNumberFormat

public NumberFormat getNumberFormat()

Gets the number formatter which this date/time formatter uses to
 format and parse a time.

Returns:
the number formatter which this date/time formatter uses.

setTimeZone

public void setTimeZone(TimeZone zone)

Sets the time zone for the calendar of this DateFormat object.

Parameters:
zone - the given new time zone.

getTimeZone

public TimeZone getTimeZone()

Gets the time zone.

Returns:
the time zone associated with the calendar of DateFormat.

setLenient

public void setLenient(boolean lenient)

Specify whether or not date/time parsing is to be lenient.  With
 lenient parsing, the parser may use heuristics to interpret inputs that
 do not precisely match this object's format.  With strict parsing,
 inputs must match this object's format.

Parameters:
lenient - when true, parsing is lenient
See Also:
Calendar.setLenient(boolean)

isLenient

public boolean isLenient()

Tell whether date/time parsing is to be lenient.

hashCode

public int hashCode()

Overrides hashCode

Overrides:
hashCode in class Object

Following copied from class: java.lang.Object

Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object),
Hashtable

equals

public boolean equals(Object obj)

Overrides equals

Overrides:
equals in class Object

Following copied from class: java.lang.Object

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj
          argument; false otherwise.
See Also:
Boolean.hashCode(),
Hashtable

clone

public Object clone()

Overrides Cloneable

Overrides:
clone in class Format

Following copied from class: java.lang.Object

Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not
               support the Cloneable interface. Subclasses
               that override the clone method can also
               throw this exception to indicate that an instance cannot
               be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


DateFormatSymbols

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class DateFormatSymbols

java.lang.Object
  |
  +--java.text.DateFormatSymbols
All Implemented Interfaces:
Cloneable, Serializable
public class DateFormatSymbols
extends Object
implements Serializable, Cloneable

DateFormatSymbols is a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data. DateFormat and SimpleDateFormat both use DateFormatSymbols to encapsulate this information.

Typically you shouldn't use DateFormatSymbols directly. Rather, you are encouraged to create a date-time formatter with the DateFormat class's factory methods: getTimeInstance, getDateInstance, or getDateTimeInstance. These methods automatically create a DateFormatSymbols for the formatter so that you don't have to. After the formatter is created, you may modify its format pattern using the setPattern method. For more information about creating formatters using DateFormat's factory methods, see DateFormat.

If you decide to create a date-time formatter with a specific format pattern for a specific locale, you can do so with:

 new SimpleDateFormat(aPattern, new DateFormatSymbols(aLocale)).

DateFormatSymbols objects are clonable. When you obtain a DateFormatSymbols object, feel free to modify the date-time formatting data. For instance, you can replace the localized date-time format pattern characters with the ones that you feel easy to remember. Or you can change the representative cities to your favorite ones.

New DateFormatSymbols subclasses may be added to support SimpleDateFormat for date-time formatting for additional locales.

See Also:
DateFormat, SimpleDateFormat, SimpleTimeZone, Serialized Form

Constructor Summary
DateFormatSymbols()
Construct a DateFormatSymbols object by loading format data from resources for the default locale.
DateFormatSymbols(Locale locale)
Construct a DateFormatSymbols object by loading format data from resources for the given locale.
Method Summary
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Override equals
String[] | getAmPmStrings() Gets ampm strings.
String[] | getEras() Gets era strings.
String | getLocalPatternChars() Gets localized date-time pattern characters.
String[] | getMonths() Gets month strings.
String[] | getShortMonths() Gets short month strings.
String[] | getShortWeekdays() Gets short weekday strings.
String[] | getWeekdays() Gets weekday strings.
String[][] | getZoneStrings() Gets timezone strings.
int | hashCode() Override hashCode.
void | setAmPmStrings(String[] newAmpms) Sets ampm strings.
void | setEras(String[] newEras) Sets era strings.
void | setLocalPatternChars(String newLocalPatternChars) Sets localized date-time pattern characters.
void | setMonths(String[] newMonths) Sets month strings.
void | setShortMonths(String[] newShortMonths) Sets short month strings.
void | setShortWeekdays(String[] newShortWeekdays) Sets short weekday strings.
void | setWeekdays(String[] newWeekdays) Sets weekday strings.
void | setZoneStrings(String[][] newZoneStrings) Sets timezone strings.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DateFormatSymbols

public DateFormatSymbols()
Construct a DateFormatSymbols object by loading format data from resources for the default locale.
Throws:
MissingResourceException - if the resources for the default locale cannot be found or cannot be loaded.

DateFormatSymbols

public DateFormatSymbols(Locale locale)
Construct a DateFormatSymbols object by loading format data from resources for the given locale.
Throws:
MissingResourceException - if the resources for the specified locale cannot be found or cannot be loaded.
Method Detail

getEras

public String[] getEras()
Gets era strings. For example: "AD" and "BC".
Returns:
the era strings.

setEras

public void setEras(String[] newEras)
Sets era strings. For example: "AD" and "BC".
Parameters:
newEras - the new era strings.

getMonths

public String[] getMonths()
Gets month strings. For example: "January", "February", etc.
Returns:
the month strings.

setMonths

public void setMonths(String[] newMonths)
Sets month strings. For example: "January", "February", etc.
Parameters:
newMonths - the new month strings.

getShortMonths

public String[] getShortMonths()
Gets short month strings. For example: "Jan", "Feb", etc.
Returns:
the short month strings.

setShortMonths

public void setShortMonths(String[] newShortMonths)
Sets short month strings. For example: "Jan", "Feb", etc.
Parameters:
newShortMonths - the new short month strings.

getWeekdays

public String[] getWeekdays()
Gets weekday strings. For example: "Sunday", "Monday", etc.
Returns:
the weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.

setWeekdays

public void setWeekdays(String[] newWeekdays)
Sets weekday strings. For example: "Sunday", "Monday", etc.
Parameters:
newWeekdays - the new weekday strings. The array should be indexed by Calendar.SUNDAY, Calendar.MONDAY, etc.

getShortWeekdays

public String[] getShortWeekdays()
Gets short weekday strings. For example: "Sun", "Mon", etc.
Returns:
the short weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.

setShortWeekdays

public void setShortWeekdays(String[] newShortWeekdays)
Sets short weekday strings. For example: "Sun", "Mon", etc.
Parameters:
newShortWeekdays - the new short weekday strings. The array should be indexed by Calendar.SUNDAY, Calendar.MONDAY, etc.

getAmPmStrings

public String[] getAmPmStrings()
Gets ampm strings. For example: "AM" and "PM".
Returns:
the weekday strings.

setAmPmStrings

public void setAmPmStrings(String[] newAmpms)
Sets ampm strings. For example: "AM" and "PM".
Parameters:
newAmpms - the new ampm strings.

getZoneStrings

public String[][] getZoneStrings()
Gets timezone strings.
Returns:
the timezone strings.

setZoneStrings

public void setZoneStrings(String[][] newZoneStrings)
Sets timezone strings.
Parameters:
newZoneStrings - the new timezone strings.

getLocalPatternChars

public String getLocalPatternChars()
Gets localized date-time pattern characters. For example: 'u', 't', etc.
Returns:
the localized date-time pattern characters.

setLocalPatternChars

public void setLocalPatternChars(String newLocalPatternChars)
Sets localized date-time pattern characters. For example: 'u', 't', etc.
Parameters:
newLocalPatternChars - the new localized date-time pattern characters.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

hashCode

public int hashCode()
Override hashCode. Generates a hash code for the DateFormatSymbols object.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Override equals
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DecimalFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class DecimalFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.NumberFormat
              |
              +--java.text.DecimalFormat
All Implemented Interfaces:
Cloneable, Serializable
public class DecimalFormat
extends NumberFormat

DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features designed to make it possible to parse and format numbers in any locale, including support for Western, Arabic, and Indic digits. It also supports different kinds of numbers, including integers (123), fixed-point numbers (123.4), scientific notation (1.23E4), percentages (12%), and currency amounts ($123). All of these can be localized.

To obtain a NumberFormat for a specific locale, including the default locale, call one of NumberFormat's factory methods, such as getInstance(). In general, do not call the DecimalFormat constructors directly, since the NumberFormat factory methods may return subclasses other than DecimalFormat. If you need to customize the format object, do something like this:

 NumberFormat f = NumberFormat.getInstance(loc);
 if (f instanceof DecimalFormat) {
     ((DecimalFormat) f).setDecimalSeparatorAlwaysShown(true);
 }

A DecimalFormat comprises a pattern and a set of symbols. The pattern may be set directly using applyPattern(), or indirectly using the API methods. The symbols are stored in a DecimalFormatSymbols object. When using the NumberFormat factory methods, the pattern and symbols are read from localized ResourceBundles in the package java.text.resource.

Example

 // Print out a number using the localized number, currency,
 // and percent format for each locale
 Locale[] locales = NumberFormat.getAvailableLocales();
 double myNumber = -1234.56;
 NumberFormat form;
 for (int j=0; j<3; ++j)="++j)" {="{" System.out.println("FORMAT");="System.out.println("FORMAT");" for="for" (int="(int" i="0;" i="i" <="<" locales.length;="locales.length;" ++i)="++i)" {="{" if="if" (locales[i].getCountry().length()="=" 0)="0)" {="{" continue;="continue;" //="//" Skip="Skip" language-only="language-only" locales="locales" }="}" System.out.print(locales[i].getDisplayName());="System.out.print(locales[i].getDisplayName());" switch="switch" (j)="(j)" {="{" case="case" 0:="0:" form="NumberFormat.getInstance(locales[i]);" break;="break;" case="case" 1:="1:" form="NumberFormat.getCurrencyInstance(locales[i]);" break;="break;" default:="default:" form="NumberFormat.getPercentInstance(locales[i]);" break;="break;" }="}" try="try" {="{" //="//" Assume="Assume" form="form" is="is" a="a" DecimalFormat="DecimalFormat" System.out.print(":="System.out.print(":" " + ((DecimalFormat) form).toPattern()
                              + "="" + ((DecimalFormat) form).toPattern()
                              + "" -="-"> " + form.format(myNumber));
         } catch (IllegalArgumentException e) {}
         try {
             System.out.println(" -> " + form.parse(form.format(myNumber)));
         } catch (ParseException e) {}
     }
 }

Patterns

A DecimalFormat pattern contains a postive and negative subpattern, for example, "#,##0.00;(#,##0.00)". Each subpattern has a prefix, numeric part, and suffix. The negative subpattern is optional; if absent, then the positive subpattern prefixed with the localized minus sign ('-' in most locales) is used as the negative subpattern. That is, "0.00" alone is equivalent to "0.00;-0.00". If there is an explicit negative subpattern, it serves only to specify the negative prefix and suffix; the number of digits, minimal digits, and other characteristics are all the same as the positive pattern. That means that "#,##0.0#;(#)" produces precisely the same behavior as "#,##0.0#;(#,##0.0#)".

The prefixes, suffixes, and various symbols used for infinity, digits, thousands separators, decimal separators, etc. may be set to arbitrary values, and they will appear properly during formatting. However, care must be taken that the symbols and strings do not conflict, or parsing will be unreliable. For example, either the positive and negative prefixes or the suffixes must be distinct for DecimalFormat.parse() to be able to distinguish positive from negative values. (If they are identical, then DecimalFormat will behave as if no negative subpattern was specified.) Another example is that the decimal separator and thousands separator should be distinct characters, or parsing will be impossible.

The grouping separator is commonly used for thousands, but in some countries it separates ten-thousands. The grouping size is a constant number of digits between the grouping characters, such as 3 for 100,000,000 or 4 for 1,0000,0000. If you supply a pattern with multiple grouping characters, the interval between the last one and the end of the integer is the one that is used. So "#,##,###,####" == "######,####" == "##,####,####".

Illegal patterns, such as "#.#.#" or "#.###,###", will cause DecimalFormat to throw an IllegalArgumentException with a message that describes the problem.

Parsing

DecimalFormat parses all Unicode characters that represent decimal digits, as defined by Character.digit(). In addition, DecimalFormat also recognizes as digits the ten consecutive characters starting with the localized zero digit defined in the DecimalFormatSymbols object. During formatting, the DecimalFormatSymbols-based digits are output.

DecimalFormat.parse returns a subclass of java.lang.Number representing the parsed numeric string. DecimalFormat chooses the most economical subclass that can represent the numeric string. This means most integer values are returned as Long objects, no matter how they are written: "17" and "17.000" both parse to Long(17). Values that cannot fit into a Long are returned as Doubles. This includes values with a fractional part, infinite values, NaN, and the value -0.0. DecimalFormat does not decide whether to return a Double or a Long based on the presence of a decimal separator in the source string. Doing so would prevent integers that overflow the mantissa of a double, such as "10,000,000,000,000,000.00", from being parsed accurately. Currently, the only classes that DecimalFormat returns are Long and Double, but callers should not rely on this. Callers may use the Number methods doubleValue, longValue, etc., to obtain the type they want.

If DecimalFormat.parse(String, ParsePosition) fails to parse a string, it returns null, leaves the ParsePosition index unchanged, and sets the ParsePosition error index. The convenience method DecimalFormat.parse(String) indicates parse failure by throwing a ParseException.

Special Values

NaN is formatted as a single character, typically \uFFFD. This character is determined by the DecimalFormatSymbols object. This is the only value for which the prefixes and suffixes are not used.

Infinity is formatted as a single character, typically \u221E, with the positive or negative prefixes and suffixes applied. The infinity character is determined by the DecimalFormatSymbols object.

Negative zero ("-0") parses to Double(-0.0), unless isParseIntegerOnly() is true, in which case it parses to Long(0).

Scientific Notation

Numbers in scientific notation are expressed as the product of a mantissa and a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The mantissa is often in the range 1.0 <= x="x" <="<" 10.0,="10.0," but="but" it="it" need="need" not="not" be.="be." DecimalFormat can be instructed to format and parse scientific notation only via a pattern; there is currently no factory method that creates a scientific notation format. In a pattern, the exponent character immediately followed by one or more digit characters indicates scientific notation. Example: "0.###E0" formats the number 1234 as "1.234E3".

  • The number of digit characters after the exponent character gives the minimum exponent digit count. There is no maximum. Negative exponents are formatted using the localized minus sign, not the prefix and suffix from the pattern. This allows patterns such as "0.###E0 m/s".
  • The minimum and maximum number of integer digits are interpreted together:
    • If the maximum number of integer digits is greater than their minimum number and greater than 1, it forces the exponent to be a multiple of the maximum number of integer digits, and the minimum number of integer digits to be interpreted as 1. The most common use of this is to generate engineering notation, in which the exponent is a multiple of three, e.g., "##0.#####E0". Using this pattern, the number 12345 formats to "12.345E3", and 123456 formats to "123.456E3".
    • Otherwise, the minimum number of integer digits is achieved by adjusting the exponent. Example: 0.00123 formatted with "00.###E0" yields "12.3E-4".
  • The number of significant digits in the mantissa is the sum of the minimum integer and maximum fraction digits, and is unaffected by the maximum integer digits. For example, 12345 formatted with "##0.##E0" is "12.3E3". To show all digits, set the significant digits count to zero. The number of significant digits does not affect parsing.
  • Exponential patterns may not contain grouping separators.

Pattern Syntax

 pattern     := pos_pattern{';' neg_pattern}
 pos_pattern := {prefix}number{suffix}
 neg_pattern := {prefix}number{suffix}
 number      := integer{'.' fraction}{exponent}
 prefix      := '\u0000'..'\uFFFD' - special_characters
 suffix      := '\u0000'..'\uFFFD' - special_characters
 integer     := min_int | '#' | '#' integer | '#' ',' integer
 min_int     := '0' | '0' min_int | '0' ',' min_int
 fraction    := '0'* '#'*
 exponent    := 'E' '0' '0'*

 Notation:
   X*       0 or more instances of X
   { X }    0 or 1 instances of X
   X | Y    either X or Y
   X..Y     any character from X up to Y, inclusive
   S - T    characters in S, except those in T

Special Pattern Characters

Many characters in a pattern are taken literally; they are matched during parsing and output unchanged during formatting. Special characters, on the other hand, stand for other characters, strings, or classes of characters. They must be quoted, unless noted otherwise, if they are to appear in the prefix or suffix as literals.

The characters listed here are used in non-localized patterns. Localized patterns use the corresponding characters taken from this formatter's DecimalFormatSymbols object instead, and these characters lose their special status. Two exceptions are the currency sign and quote, which are not localized.

Symbol | Location | Localized? | Meaning
0 | Number | Y | Digit
# | Number | Y | Digit, zero shows as absent
. | Number | Y | Decimal separator or monetary decimal separator
- | Number | Y | Minus sign
, | Number | Y | Grouping separator
E | Number | Y | Separates mantissa and exponent in scientific notation. Need not be quoted in prefix or suffix.
; | Subpattern boundary | Y | Separates positive and negative subpatterns
% | Prefix or suffix | Y | Multiply by 100 and show as percentage
\u2030 | Prefix or suffix | Y | Multiply by 1000 and show as per mille
¤ (\u00A4) | Prefix or suffix | N | Currency sign, replaced by currency symbol. If doubled, replaced by international currency symbol. If present in a pattern, the monetary decimal separator is used instead of the decimal separator.
' | Prefix or suffix | N | Used to quote special characters in a prefix or suffix, for example, "'#'#" formats 123 to "#123". To create a single quote itself, use two in a row: "# o''clock".

See Also:
Format, NumberFormat, ChoiceFormat, ParsePosition, Serialized Form

Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
Constructor Summary
DecimalFormat()
Create a DecimalFormat using the default pattern and symbols for the default locale.
DecimalFormat(String pattern)
Create a DecimalFormat from the given pattern and the symbols for the default locale.
DecimalFormat(String pattern, DecimalFormatSymbols symbols)
Create a DecimalFormat from the given pattern and symbols.
Method Summary
void | applyLocalizedPattern(String pattern) Apply the given pattern to this Format object.
void | applyPattern(String pattern) Apply the given pattern to this Format object.
Object | clone() Standard override; no change in semantics.
boolean | equals(Object obj) Overrides equals
StringBuffer | format(double number, StringBuffer result, FieldPosition fieldPosition) Formats a double to produce a string.
StringBuffer | format(long number, StringBuffer result, FieldPosition fieldPosition) Format a long to produce a string.
DecimalFormatSymbols | getDecimalFormatSymbols() Returns the decimal format symbols, which is generally not changed by the programmer or user.
int | getGroupingSize() Return the grouping size.
int | getMultiplier() Get the multiplier for use in percent, permill, etc.
String | getNegativePrefix() Get the negative prefix.
String | getNegativeSuffix() Get the negative suffix.
String | getPositivePrefix() Get the positive prefix.
String | getPositiveSuffix() Get the positive suffix.
int | hashCode() Overrides hashCode
boolean | isDecimalSeparatorAlwaysShown() Allows you to get the behavior of the decimal separator with integers.
Number | parse(String text, ParsePosition parsePosition) Returns an instance of Number with a value matching the given string.
void | setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) Sets the decimal format symbols, which is generally not changed by the programmer or user.
void | setDecimalSeparatorAlwaysShown(boolean newValue) Allows you to set the behavior of the decimal separator with integers.
void | setGroupingSize(int newValue) Set the grouping size.
void | setMaximumFractionDigits(int newValue) Sets the maximum number of digits allowed in the fraction portion of a number.
void | setMaximumIntegerDigits(int newValue) Sets the maximum number of digits allowed in the integer portion of a number.
void | setMinimumFractionDigits(int newValue) Sets the minimum number of digits allowed in the fraction portion of a number.
void | setMinimumIntegerDigits(int newValue) Sets the minimum number of digits allowed in the integer portion of a number.
void | setMultiplier(int newValue) Set the multiplier for use in percent, permill, etc.
void | setNegativePrefix(String newValue) Set the negative prefix.
void | setNegativeSuffix(String newValue) Set the positive suffix.
void | setPositivePrefix(String newValue) Set the positive prefix.
void | setPositiveSuffix(String newValue) Set the positive suffix.
String | toLocalizedPattern() Synthesizes a localized pattern string that represents the current state of this Format object.
String | toPattern() Synthesizes a pattern string that represents the current state of this Format object.
Methods inherited from class java.text.NumberFormat
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnly
Methods inherited from class java.text.Format
format, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DecimalFormat

public DecimalFormat()
Create a DecimalFormat using the default pattern and symbols for the default locale. This is a convenient way to obtain a DecimalFormat when internationalization is not the main concern.

To obtain standard formats for a given locale, use the factory methods on NumberFormat such as getNumberInstance. These factories will return the most appropriate sub-class of NumberFormat for a given locale.

See Also:
NumberFormat.getInstance(),
NumberFormat.getNumberInstance(),
NumberFormat.getCurrencyInstance(),
NumberFormat.getPercentInstance()

DecimalFormat

public DecimalFormat(String pattern)
Create a DecimalFormat from the given pattern and the symbols for the default locale. This is a convenient way to obtain a DecimalFormat when internationalization is not the main concern.

To obtain standard formats for a given locale, use the factory methods on NumberFormat such as getNumberInstance. These factories will return the most appropriate sub-class of NumberFormat for a given locale.

Parameters:
pattern - A non-localized pattern string.
Throws:
IllegalArgumentException - if the given pattern is invalid.
See Also:
NumberFormat.getInstance(),
NumberFormat.getNumberInstance(),
NumberFormat.getCurrencyInstance(),
NumberFormat.getPercentInstance()

DecimalFormat

public DecimalFormat(String pattern,
                     DecimalFormatSymbols symbols)
Create a DecimalFormat from the given pattern and symbols. Use this constructor when you need to completely customize the behavior of the format.

To obtain standard formats for a given locale, use the factory methods on NumberFormat such as getInstance or getCurrencyInstance. If you need only minor adjustments to a standard format, you can modify the format returned by a NumberFormat factory method.

Parameters:
pattern - a non-localized pattern string
symbols - the set of symbols to be used
Throws:
IllegalArgumentException - if the given pattern is invalid
See Also:
NumberFormat.getInstance(),
NumberFormat.getNumberInstance(),
NumberFormat.getCurrencyInstance(),
NumberFormat.getPercentInstance(),
DecimalFormatSymbols
Method Detail

format

public StringBuffer format(double number,
                           StringBuffer result,
                           FieldPosition fieldPosition)
Formats a double to produce a string.
Overrides:
format in class NumberFormat
Parameters:
number - The double to format
toAppendTo - where the text is to be appended
fieldPosition - On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns:
The value passed in as the result parameter
See Also:
FieldPosition

format

public StringBuffer format(long number,
                           StringBuffer result,
                           FieldPosition fieldPosition)
Format a long to produce a string.
Overrides:
format in class NumberFormat
Parameters:
number - The long to format
toAppendTo - where the text is to be appended
fieldPosition - On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns:
The value passed in as the result parameter
See Also:
FieldPosition

parse

public Number parse(String text,
                    ParsePosition parsePosition)
Returns an instance of Number with a value matching the given string. The most economical subclass that can represent all the bits of the source string is chosen.
Overrides:
parse in class NumberFormat
Parameters:
text - the string to be parsed
parsePosition - on entry, where to begin parsing; on exit, just past the last parsed character. If parsing fails, the index will not move and the error index will be set.
Returns:
the parsed value, or null if the parse fails

getDecimalFormatSymbols

public DecimalFormatSymbols getDecimalFormatSymbols()
Returns the decimal format symbols, which is generally not changed by the programmer or user.
Returns:
desired DecimalFormatSymbols
See Also:
DecimalFormatSymbols

setDecimalFormatSymbols

public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols)
Sets the decimal format symbols, which is generally not changed by the programmer or user.
Parameters:
newSymbols - desired DecimalFormatSymbols
See Also:
DecimalFormatSymbols

getPositivePrefix

public String getPositivePrefix()
Get the positive prefix.

Examples: +123, $123, sFr123

setPositivePrefix

public void setPositivePrefix(String newValue)
Set the positive prefix.

Examples: +123, $123, sFr123

getNegativePrefix

public String getNegativePrefix()
Get the negative prefix.

Examples: -123, ($123) (with negative suffix), sFr-123

setNegativePrefix

public void setNegativePrefix(String newValue)
Set the negative prefix.

Examples: -123, ($123) (with negative suffix), sFr-123

getPositiveSuffix

public String getPositiveSuffix()
Get the positive suffix.

Example: 123%

setPositiveSuffix

public void setPositiveSuffix(String newValue)
Set the positive suffix.

Example: 123%

getNegativeSuffix

public String getNegativeSuffix()
Get the negative suffix.

Examples: -123%, ($123) (with positive suffixes)

setNegativeSuffix

public void setNegativeSuffix(String newValue)
Set the positive suffix.

Examples: 123%

getMultiplier

public int getMultiplier()
Get the multiplier for use in percent, permill, etc. For a percentage, set the suffixes to have "%" and the multiplier to be 100. (For Arabic, use arabic percent symbol). For a permill, set the suffixes to have "?" and the multiplier to be 1000.

Examples: with 100, 1.23 -> "123", and "123" -> 1.23

setMultiplier

public void setMultiplier(int newValue)
Set the multiplier for use in percent, permill, etc. For a percentage, set the suffixes to have "%" and the multiplier to be 100. (For Arabic, use arabic percent symbol). For a permill, set the suffixes to have "?" and the multiplier to be 1000.

Examples: with 100, 1.23 -> "123", and "123" -> 1.23

getGroupingSize

public int getGroupingSize()
Return the grouping size. Grouping size is the number of digits between grouping separators in the integer portion of a number. For example, in the number "123,456.78", the grouping size is 3.
See Also:
setGroupingSize(int), NumberFormat.isGroupingUsed(), DecimalFormatSymbols.getGroupingSeparator()

setGroupingSize

public void setGroupingSize(int newValue)
Set the grouping size. Grouping size is the number of digits between grouping separators in the integer portion of a number. For example, in the number "123,456.78", the grouping size is 3.
See Also:
getGroupingSize(),
NumberFormat.setGroupingUsed(boolean),
DecimalFormatSymbols.setGroupingSeparator(char)

isDecimalSeparatorAlwaysShown

public boolean isDecimalSeparatorAlwaysShown()
Allows you to get the behavior of the decimal separator with integers. (The decimal separator will always appear with decimals.)

Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345

setDecimalSeparatorAlwaysShown

public void setDecimalSeparatorAlwaysShown(boolean newValue)
Allows you to set the behavior of the decimal separator with integers. (The decimal separator will always appear with decimals.)

Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345

clone

public Object clone()
Standard override; no change in semantics.
Overrides:
clone in class NumberFormat
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

equals

public boolean equals(Object obj)
Overrides equals
Overrides:
equals in class NumberFormat
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Overrides hashCode
Overrides:
hashCode in class NumberFormat
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toPattern

public String toPattern()
Synthesizes a pattern string that represents the current state of this Format object.
See Also:
applyPattern(java.lang.String)

toLocalizedPattern

public String toLocalizedPattern()
Synthesizes a localized pattern string that represents the current state of this Format object.
See Also:
applyPattern(java.lang.String)

applyPattern

public void applyPattern(String pattern)
Apply the given pattern to this Format object. A pattern is a short-hand specification for the various formatting properties. These properties can also be changed individually through the various setter methods.

There is no limit to integer digits are set by this routine, since that is the typical end-user desire; use setMaximumInteger if you want to set a real value. For negative numbers, use a second pattern, separated by a semicolon

Example "#,#00.0#" -> 1,234.56

This means a minimum of 2 integer digits, 1 fraction digit, and a maximum of 2 fraction digits.

Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.

In negative patterns, the minimum and maximum counts are ignored; these are presumed to be set in the positive pattern.

applyLocalizedPattern

public void applyLocalizedPattern(String pattern)
Apply the given pattern to this Format object. The pattern is assumed to be in a localized notation. A pattern is a short-hand specification for the various formatting properties. These properties can also be changed individually through the various setter methods.

There is no limit to integer digits are set by this routine, since that is the typical end-user desire; use setMaximumInteger if you want to set a real value. For negative numbers, use a second pattern, separated by a semicolon

Example "#,#00.0#" -> 1,234.56

This means a minimum of 2 integer digits, 1 fraction digit, and a maximum of 2 fraction digits.

Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.

In negative patterns, the minimum and maximum counts are ignored; these are presumed to be set in the positive pattern.

setMaximumIntegerDigits

public void setMaximumIntegerDigits(int newValue)
Sets the maximum number of digits allowed in the integer portion of a number. This override limits the integer digit count to 309.
Overrides:
setMaximumIntegerDigits in class NumberFormat
See Also:
NumberFormat.setMaximumIntegerDigits(int)

setMinimumIntegerDigits

public void setMinimumIntegerDigits(int newValue)
Sets the minimum number of digits allowed in the integer portion of a number. This override limits the integer digit count to 309.
Overrides:
setMinimumIntegerDigits in class NumberFormat
See Also:
NumberFormat.setMinimumIntegerDigits(int)

setMaximumFractionDigits

public void setMaximumFractionDigits(int newValue)
Sets the maximum number of digits allowed in the fraction portion of a number. This override limits the fraction digit count to 340.
Overrides:
setMaximumFractionDigits in class NumberFormat
See Also:
NumberFormat.setMaximumFractionDigits(int)

setMinimumFractionDigits

public void setMinimumFractionDigits(int newValue)
Sets the minimum number of digits allowed in the fraction portion of a number. This override limits the fraction digit count to 340.
Overrides:
setMinimumFractionDigits in class NumberFormat
See Also:
NumberFormat.setMinimumFractionDigits(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DecimalFormatSymbols

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class DecimalFormatSymbols

java.lang.Object
  |
  +--java.text.DecimalFormatSymbols
All Implemented Interfaces:
Cloneable, Serializable
public final class DecimalFormatSymbols
extends Object
implements Cloneable, Serializable

This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers. DecimalFormat creates for itself an instance of DecimalFormatSymbols from its locale data. If you need to change any of these symbols, you can get the DecimalFormatSymbols object from your DecimalFormat and modify it.

See Also:
Locale, DecimalFormat, Serialized Form

Constructor Summary
DecimalFormatSymbols()
Create a DecimalFormatSymbols object for the default locale.
DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale.
Method Summary
Object | clone() Standard override.
boolean | equals(Object obj) Override equals.
String | getCurrencySymbol() Return the string denoting the local currency.
char | getDecimalSeparator() Gets the character used for decimal sign.
char | getDigit() Gets the character used for a digit in a pattern.
char | getGroupingSeparator() Gets the character used for thousands separator.
String | getInfinity() Gets the character used to represent infinity.
String | getInternationalCurrencySymbol() Return the international string denoting the local currency.
char | getMinusSign() Gets the character used to represent minus sign.
char | getMonetaryDecimalSeparator() Return the monetary decimal separator.
String | getNaN() Gets the character used to represent NaN.
char | getPatternSeparator() Gets the character used to separate positive and negative subpatterns in a pattern.
char | getPercent() Gets the character used for percent sign.
char | getPerMill() Gets the character used for mille percent sign.
char | getZeroDigit() Gets the character used for zero.
int | hashCode() Override hashCode.
void | setCurrencySymbol(String currency) Set the string denoting the local currency.
void | setDecimalSeparator(char decimalSeparator) Set the character used for decimal sign.
void | setDigit(char digit) Set the character used for a digit in a pattern.
void | setGroupingSeparator(char groupingSeparator) Set the character used for thousands separator.
void | setInfinity(String infinity) Set the character used to represent infinity.
void | setInternationalCurrencySymbol(String currency) Set the international string denoting the local currency.
void | setMinusSign(char minusSign) Set the character used to represent minus sign.
void | setMonetaryDecimalSeparator(char sep) Set the monetary decimal separator.
void | setNaN(String NaN) Set the character used to represent NaN.
void | setPatternSeparator(char patternSeparator) Set the character used to separate positive and negative subpatterns in a pattern.
void | setPercent(char percent) Set the character used for percent sign.
void | setPerMill(char perMill) Set the character used for mille percent sign.
void | setZeroDigit(char zeroDigit) Set the character used for zero.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DecimalFormatSymbols

public DecimalFormatSymbols()
Create a DecimalFormatSymbols object for the default locale.

DecimalFormatSymbols

public DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale.
Method Detail

getZeroDigit

public char getZeroDigit()
Gets the character used for zero. Different for Arabic, etc.

setZeroDigit

public void setZeroDigit(char zeroDigit)
Set the character used for zero. Different for Arabic, etc.

getGroupingSeparator

public char getGroupingSeparator()
Gets the character used for thousands separator. Different for French, etc.

setGroupingSeparator

public void setGroupingSeparator(char groupingSeparator)
Set the character used for thousands separator. Different for French, etc.

getDecimalSeparator

public char getDecimalSeparator()
Gets the character used for decimal sign. Different for French, etc.

setDecimalSeparator

public void setDecimalSeparator(char decimalSeparator)
Set the character used for decimal sign. Different for French, etc.

getPerMill

public char getPerMill()
Gets the character used for mille percent sign. Different for Arabic, etc.

setPerMill

public void setPerMill(char perMill)
Set the character used for mille percent sign. Different for Arabic, etc.

getPercent

public char getPercent()
Gets the character used for percent sign. Different for Arabic, etc.

setPercent

public void setPercent(char percent)
Set the character used for percent sign. Different for Arabic, etc.

getDigit

public char getDigit()
Gets the character used for a digit in a pattern.

setDigit

public void setDigit(char digit)
Set the character used for a digit in a pattern.

getPatternSeparator

public char getPatternSeparator()
Gets the character used to separate positive and negative subpatterns in a pattern.

setPatternSeparator

public void setPatternSeparator(char patternSeparator)
Set the character used to separate positive and negative subpatterns in a pattern.

getInfinity

public String getInfinity()
Gets the character used to represent infinity. Almost always left unchanged.

setInfinity

public void setInfinity(String infinity)
Set the character used to represent infinity. Almost always left unchanged.

getNaN

public String getNaN()
Gets the character used to represent NaN. Almost always left unchanged.

setNaN

public void setNaN(String NaN)
Set the character used to represent NaN. Almost always left unchanged.

getMinusSign

public char getMinusSign()
Gets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

setMinusSign

public void setMinusSign(char minusSign)
Set the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

getCurrencySymbol

public String getCurrencySymbol()
Return the string denoting the local currency.

setCurrencySymbol

public void setCurrencySymbol(String currency)
Set the string denoting the local currency.

getInternationalCurrencySymbol

public String getInternationalCurrencySymbol()
Return the international string denoting the local currency.

setInternationalCurrencySymbol

public void setInternationalCurrencySymbol(String currency)
Set the international string denoting the local currency.

getMonetaryDecimalSeparator

public char getMonetaryDecimalSeparator()
Return the monetary decimal separator.

setMonetaryDecimalSeparator

public void setMonetaryDecimalSeparator(char sep)
Set the monetary decimal separator.

clone

public Object clone()
Standard override.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

equals

public boolean equals(Object obj)
Override equals.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Override hashCode.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldPosition

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class FieldPosition

java.lang.Object
  |
  +--java.text.FieldPosition
public class FieldPosition
extends Object

FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output. Fields are identified by constants, whose names typically end with _FIELD, defined in the various subclasses of Format. See ERA_FIELD and its friends in DateFormat for an example.

FieldPosition keeps track of the position of the field within the formatted output with two indices: the index of the first character of the field and the index of the last character of the field.

One version of the format method in the various Format classes requires a FieldPosition object as an argument. You use this format method to perform partial formatting or to get information about the formatted output (such as the position of a field).

See Also:
Format

Constructor Summary
FieldPosition(int field)
Creates a FieldPosition object for the given field.
Method Summary
boolean | equals(Object obj) Overrides equals
int | getBeginIndex() Retrieves the index of the first character in the requested field.
int | getEndIndex() Retrieves the index of the character following the last character in the requested field.
int | getField() Retrieves the field identifier.
int | hashCode() Returns a hash code for this FieldPosition.
void | setBeginIndex(int bi) Sets the begin index.
void | setEndIndex(int ei) Sets the end index.
String | toString() Return a string representation of this FieldPosition.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldPosition

public FieldPosition(int field)
Creates a FieldPosition object for the given field. Fields are identified by constants, whose names typically end with _FIELD, in the various subclasses of Format.
See Also:
NumberFormat.INTEGER_FIELD, NumberFormat.FRACTION_FIELD, DateFormat.YEAR_FIELD, DateFormat.MONTH_FIELD
Method Detail

getField

public int getField()
Retrieves the field identifier.

getBeginIndex

public int getBeginIndex()
Retrieves the index of the first character in the requested field.

getEndIndex

public int getEndIndex()
Retrieves the index of the character following the last character in the requested field.

setBeginIndex

public void setBeginIndex(int bi)
Sets the begin index. For use by subclasses of Format.

setEndIndex

public void setEndIndex(int ei)
Sets the end index. For use by subclasses of Format.

equals

public boolean equals(Object obj)
Overrides equals
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code for this FieldPosition.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object

toString

public String toString()
Return a string representation of this FieldPosition.
Overrides:
toString in class Object
Returns:
a string representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Format

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class Format

java.lang.Object
  |
  +--java.text.Format
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
DateFormat, MessageFormat, NumberFormat
public abstract class Format
extends Object
implements Serializable, Cloneable

Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.

Format defines the programming interface for formatting locale-sensitive objects into Strings (the format method) and for parsing Strings back into objects (the parseObject method). Any String formatted by format is guaranteed to be parseable by parseObject.

If formatting is unsuccessful because the Format object cannot format the type of object specified, format throws an IllegalArgumentException. Otherwise, if there is something illformed about the object, format returns the Unicode replacement character \\uFFFD.

If there is no match when parsing, parseObject(String) throws a ParseException, and parseObject(String, ParsePosition) leaves the ParsePosition index member unchanged and returns null.

Subclassing: The Java 2 platform provides three concrete subclasses of Format-- DateFormat, MessageFormat, and NumberFormat--for formatting dates, messages, and numbers, respectively.

Concrete subclasses must implement these two methods:

  1. format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
  2. parseObject (String source, ParsePosition pos)

Most subclasses will also implement the following two methods:

  1. getInstance for getting a useful format object appropriate for the current locale
  2. getInstance(Locale) for getting a useful format object appropriate for the specified locale
In addition, some subclasses may also choose to implement other getXxxxInstance methods for more specialized control. For example, the NumberFormat class provides getPercentInstance and getCurrencyInstance methods for getting specialized number formatters.

Subclasses of Format that allow programmers to create objects for locales (with getInstance(Locale) for example) must also implement the following class method:

 public static Locale[] getAvailableLocales()

And finally subclasses may define a set of constants to identify the various fields in the formatted output. These constants are used to create a FieldPosition object which identifies what information is contained in the field and its position in the formatted result. These constants should be named item_FIELD where item identifies the field. For examples of these constants, see ERA_FIELD and its friends in DateFormat.

See Also:
ParsePosition, FieldPosition, NumberFormat, DateFormat, MessageFormat, Serialized Form

Constructor Summary
Format()
Method Summary
Object | clone() Overrides Cloneable
String | format(Object obj) Formats an object to produce a string.
abstract StringBuffer | format(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
Object | parseObject(String source) Parses a string to produce an object.
abstract Object | parseObject(String source, ParsePosition status) Parses a string to produce an object.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Format

public Format()
Method Detail

format

public final String format(Object obj)
Formats an object to produce a string.

Subclasses will override the StringBuffer version of format.

Parameters:
obj - The object to format
Returns:
Formatted string.
Throws:
IllegalArgumentException - when the Format cannot format the type of object.
See Also:
MessageFormat, format(Object, StringBuffer, FieldPosition)

format

public abstract StringBuffer format(Object obj,
                                    StringBuffer toAppendTo,
                                    FieldPosition pos)
Formats an object to produce a string. Subclasses will implement for particular object, such as:
 StringBuffer format (Number obj, StringBuffer toAppendTo)
 Number parse (String str)
These general routines allow polymorphic parsing and formatting for objects such as the MessageFormat.
Parameters:
obj - The object to format
toAppendTo - where the text is to be appended
pos - On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns:
the value passed in as toAppendTo (this allows chaining, as with StringBuffer.append())
Throws:
IllegalArgumentException - when the Format cannot format the given object.
See Also:
MessageFormat, FieldPosition

parseObject

public abstract Object parseObject(String source,
                                   ParsePosition status)
Parses a string to produce an object. Subclasses will typically implement for particular object, such as:
       String format (Number obj);
       String format (long obj);
       String format (double obj);
       Number parse (String str);
Parameters:
status - Input-Output parameter.

Before calling, set status.index to the offset you want to start parsing at in the source. After calling, status.index is the end of the text you parsed. If error occurs, index is unchanged.

When parsing, leading whitespace is discarded (with successful parse), while trailing whitespace is left as is.

Example: Parsing "_12_xy" (where _ represents a space) for a number, with index == 0 will result in the number 12, with status.index updated to 3 (just before the second space). Parsing a second time will result in a ParseException since "xy" is not a number, and leave index at 3.

Subclasses will typically supply specific parse methods that return different types of values. Since methods can't overload on return types, these will typically be named "parse", while this polymorphic method will always be called parseObject. Any parse method that does not take a status should throw ParseException when no text in the required format is at the start position.

Returns:
Object parsed from string. In case of error, returns null.
See Also:
ParsePosition

parseObject

public Object parseObject(String source)
                   throws ParseException
Parses a string to produce an object.
Throws:
ParseException - if the specified string is invalid.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MessageFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class MessageFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.MessageFormat
All Implemented Interfaces:
Cloneable, Serializable
public class MessageFormat
extends Format

MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to construct messages displayed for end users.

MessageFormat takes a set of objects, formats them, then inserts the formatted strings into the pattern at the appropriate places.

Note: MessageFormat differs from the other Format classes in that you create a MessageFormat object with one of its constructors (not with a getInstance style factory method). The factory methods aren't necessary because MessageFormat doesn't require any complex setup for a given locale. In fact, MessageFormat doesn't implement any locale specific behavior at all. It just needs to be set up on a sentence by sentence basis.

Here are some examples of usage:

 Object[] arguments = {
     new Integer(7),
     new Date(System.currentTimeMillis()),
     "a disturbance in the Force"
 };

 String result = MessageFormat.format(
     "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
     arguments);

 output: At 12:30 PM on Jul 3, 2053, there was a disturbance
           in the Force on planet 7.
Typically, the message format will come from resources, and the arguments will be dynamically set at runtime.

Example 2:

 Object[] testArgs = {new Long(3), "MyDisk"};

 MessageFormat form = new MessageFormat(
     "The disk \"{1}\" contains {0} file(s).");

 System.out.println(form.format(testArgs));

 // output, with different testArgs
 output: The disk "MyDisk" contains 0 file(s).
 output: The disk "MyDisk" contains 1 file(s).
 output: The disk "MyDisk" contains 1,273 file(s).

The pattern is of the form:

 messageFormatPattern := string ( "{" messageFormatElement "}" string )*

 messageFormatElement := argument { "," elementFormat }

 elementFormat := "time" { "," datetimeStyle }
                | "date" { "," datetimeStyle }
                | "number" { "," numberStyle }
                | "choice" { "," choiceStyle }

 datetimeStyle := "short"
                  | "medium"
                  | "long"
                  | "full"
                  | dateFormatPattern

 numberStyle := "currency"
               | "percent"
               | "integer"
               | numberFormatPattern

 choiceStyle := choiceFormatPattern
If there is no elementFormat, then the argument must be a string, which is substituted. If there is no dateTimeStyle or numberStyle, then the default format is used (for example, NumberFormat.getInstance, DateFormat.getTimeInstance, or DateFormat.getInstance).

In strings, single quotes can be used to quote the "{" (curly brace) if necessary. A real single quote is represented by ''. Inside a messageFormatElement, quotes are not removed. For example, {1,number,$'#',##} will produce a number format with the pound-sign quoted, with a result such as: "$#31,45".

If a pattern is used, then unquoted braces in the pattern, if any, must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab {0'}' de" and "ab } de" are not.

The argument is a number from 0 to 9, which corresponds to the arguments presented in an array to be formatted.

It is ok to have unused arguments in the array. With missing arguments or arguments that are not of the right class for the specified format, a ParseException is thrown. First, format checks to see if a Format object has been specified for the argument with the setFormats method. If so, then format uses that Format object to format the argument. Otherwise, the argument is formatted based on the object's type. If the argument is a Number, then format uses NumberFormat.getInstance to format the argument; if the argument is a Date, then format uses DateFormat.getDateTimeInstance to format the argument. Otherwise, it uses the toString method.

For more sophisticated patterns, you can use a ChoiceFormat to get output such as:

 MessageFormat form = new MessageFormat("The disk \"{1}\" contains {0}.");
 double[] filelimits = {0,1,2};
 String[] filepart = {"no files","one file","{0,number} files"};
 ChoiceFormat fileform = new ChoiceFormat(filelimits, filepart);
 form.setFormat(1,fileform); // NOT zero, see below

 Object[] testArgs = {new Long(12373), "MyDisk"};

 System.out.println(form.format(testArgs));

 // output, with different testArgs
 output: The disk "MyDisk" contains no files.
 output: The disk "MyDisk" contains one file.
 output: The disk "MyDisk" contains 1,273 files.
You can either do this programmatically, as in the above example, or by using a pattern (see ChoiceFormat for more information) as in:
 form.applyPattern(
    "There {0,choice,0#are no files|1#is one file|1#are {0,number,integer} files}.");

Note: As we see above, the string produced by a ChoiceFormat in MessageFormat is treated specially; occurances of '{' are used to indicated subformats, and cause recursion. If you create both a MessageFormat and ChoiceFormat programmatically (instead of using the string patterns), then be careful not to produce a format that recurses on itself, which will cause an infinite loop.

Note: formats are numbered by order of variable in the string. This is not the same as the argument numbering! For example: with "abc{2}def{3}ghi{0}...",

  • format0 affects the first variable {2}
  • format1 affects the second variable {3}
  • format2 affects the second variable {0}
  • and so on.

When a single argument is parsed more than once in the string, the last match will be the final result of the parsing. For example,

 MessageFormat mf = new MessageFormat("{0,number,#.##}, {0,number,#.#}");
 Object[] objs = {new Double(3.1415)};
 String result = mf.format( objs );
 // result now equals "3.14, 3.1"
 objs = null;
 objs = mf.parse(result, new ParsePosition(0));
 // objs now equals {new Double(3.1)}

Likewise, parsing with a MessageFormat object using patterns containing multiple occurances of the same argument would return the last match. For example,

 MessageFormat mf = new MessageFormat("{0}, {0}, {0}");
 String forParsing = "x, y, z";
 Object[] objs = mf.parse(forParsing, new ParsePosition(0));
 // result now equals {new String("z")}

You can use setLocale followed by applyPattern (and then possibly setFormat) to re-initialize a MessageFormat with a different locale.

See Also:
Locale, Format, NumberFormat, DecimalFormat, ChoiceFormat, Serialized Form

Constructor Summary
MessageFormat(String pattern)
Constructs with the specified pattern.
Method Summary
void | applyPattern(String newPattern) Sets the pattern.
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Equality comparision between two message format objects
StringBuffer | format(Object[] source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
StringBuffer | format(Object source, StringBuffer result, FieldPosition ignore) Returns pattern with formatted objects.
static String | format(String pattern, Object[] arguments) Convenience routine.
Format[] | getFormats() Gets formats that were set with setFormats.
Locale | getLocale() Gets the locale.
int | hashCode() Generates a hash code for the message format object.
Object[] | parse(String source) Parses the string.
Object[] | parse(String source, ParsePosition status) Parses the string.
Object | parseObject(String text, ParsePosition status) Parses the string.
void | setFormat(int variable, Format newFormat) Set a format to be used on a variable in the pattern.
void | setFormats(Format[] newFormats) Sets formats to use on parameters.
void | setLocale(Locale theLocale) Constructs with the specified pattern and formats for the arguments in that pattern.
String | toPattern() Gets the pattern.
Methods inherited from class java.text.Format
format, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MessageFormat

public MessageFormat(String pattern)
Constructs with the specified pattern.
See Also:
applyPattern(java.lang.String)
Method Detail

setLocale

public void setLocale(Locale theLocale)
Constructs with the specified pattern and formats for the arguments in that pattern.

getLocale

public Locale getLocale()
Gets the locale. This locale is used for fetching default number or date format information.

applyPattern

public void applyPattern(String newPattern)
Sets the pattern. See the class description.

toPattern

public String toPattern()
Gets the pattern. See the class description.

setFormats

public void setFormats(Format[] newFormats)
Sets formats to use on parameters. See the class description about format numbering.

setFormat

public void setFormat(int variable,
                      Format newFormat)
Set a format to be used on a variable in the pattern.
Parameters:
variable - the zero-based number of the variable in the format. This is not the argument number. If variable is out of range, an ArrayIndexOutOfBoundsException is thrown.
newFormat - the format to use for the specified variable

getFormats

public Format[] getFormats()
Gets formats that were set with setFormats. See the class description about format numbering.

format

public final StringBuffer format(Object[] source,
                                 StringBuffer result,
                                 FieldPosition ignore)
Returns pattern with formatted objects. If source is null, the original pattern is returned, if source contains null objects, the formatted result will substitute each argument with the string "null".
Parameters:
source - an array of objects to be formatted & substituted.
result - where text is appended.
ignore - no useful status is returned.

format

public static String format(String pattern,
                            Object[] arguments)
Convenience routine. Avoids explicit creation of MessageFormat, but doesn't allow future optimizations.

format

public final StringBuffer format(Object source,
                                 StringBuffer result,
                                 FieldPosition ignore)
Returns pattern with formatted objects. If source is null, the original pattern is returned, if source contains null objects, the formatted result will substitute each argument with the string "null".
Overrides:
format in class Format
Parameters:
source - an array of objects to be formatted & substituted.
result - where text is appended.
ignore - no useful status is returned.

parse

public Object[] parse(String source,
                      ParsePosition status)
Parses the string.

Caveats: The parse may fail in a number of circumstances. For example:

  • If one of the arguments does not occur in the pattern.
  • If the format of an argument loses information, such as with a choice format where a large number formats to "many".
  • Does not yet handle recursion (where the substituted strings contain {n} references.)
  • Will not always find a match (or the correct match) if some part of the parse is ambiguous. For example, if the pattern "{1},{2}" is used with the string arguments {"a,b", "c"}, it will format as "a,b,c". When the result is parsed, it will return {"a", "b,c"}.
  • If a single argument is parsed more than once in the string, then the later parse wins.
When the parse fails, use ParsePosition.getErrorIndex() to find out where in the string did the parsing failed. The returned error index is the starting offset of the sub-patterns that the string is comparing with. For example, if the parsing string "AAA {0} BBB" is comparing against the pattern "AAD {0} BBB", the error index is 0. When an error occurs, the call to this method will return null. If the soruce is null, return an empty array.

parse

public Object[] parse(String source)
               throws ParseException
Parses the string. Does not yet handle recursion (where the substituted strings contain {n} references.)
Throws:
ParseException - if the string can't be parsed.

parseObject

public Object parseObject(String text,
                          ParsePosition status)
Parses the string. Does not yet handle recursion (where the substituted strings contain %n references.)
Overrides:
parseObject in class Format
Following copied from class: java.text.Format
Parameters:
status - Input-Output parameter.

Before calling, set status.index to the offset you want to start parsing at in the source. After calling, status.index is the end of the text you parsed. If error occurs, index is unchanged.

When parsing, leading whitespace is discarded (with successful parse), while trailing whitespace is left as is.

Example: Parsing "_12_xy" (where _ represents a space) for a number, with index == 0 will result in the number 12, with status.index updated to 3 (just before the second space). Parsing a second time will result in a ParseException since "xy" is not a number, and leave index at 3.

Subclasses will typically supply specific parse methods that return different types of values. Since methods can't overload on return types, these will typically be named "parse", while this polymorphic method will always be called parseObject. Any parse method that does not take a status should throw ParseException when no text in the required format is at the start position.

Returns:
Object parsed from string. In case of error, returns null.
See Also:
ParsePosition

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Format
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

equals

public boolean equals(Object obj)
Equality comparision between two message format objects
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Generates a hash code for the message format object.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumberFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class NumberFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.NumberFormat
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
ChoiceFormat, DecimalFormat
public abstract class NumberFormat
extends Format

NumberFormat is the abstract base class for all number formats. This class provides the interface for formatting and parsing numbers. NumberFormat also provides methods for determining which locales have number formats, and what their names are.

NumberFormat helps you to format and parse numbers for any locale. Your code can be completely independent of the locale conventions for decimal points, thousands-separators, or even the particular decimal digits used, or whether the number format is even decimal.

To format a number for the current Locale, use one of the factory class methods:

  myString = NumberFormat.getInstance().format(myNumber);
If you are formatting multiple numbers, it is more efficient to get the format and use it multiple times so that the system doesn't have to fetch the information about the local language and country conventions multiple times.
 NumberFormat nf = NumberFormat.getInstance();
 for (int i = 0; i
To format a number for a different Locale, specify it in the call to getInstance.
 NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH);
You can also use a NumberFormat to parse numbers:
 myNumber = nf.parse(myString);
Use getInstance or getNumberInstance to get the normal number format. Use getCurrencyInstance to get the currency number format. And use getPercentInstance to get a format for displaying percentages. With this format, a fraction like 0.53 is displayed as 53%.

You can also control the display of numbers with such methods as setMinimumFractionDigits. If you want even more control over the format or parsing, or want to give your users more control, you can try casting the NumberFormat you get from the factory methods to a DecimalNumberFormat. This will work for the vast majority of locales; just remember to put it in a try block in case you encounter an unusual one.

NumberFormat and DecimalFormat are designed such that some controls work for formatting and others work for parsing. The following is the detailed description for each these control methods,

setParseIntegerOnly : only affects parsing, e.g. if true, "3456.78" -> 3456 (and leaves the parse position just after index 6) if false, "3456.78" -> 3456.78 (and leaves the parse position just after index 8) This is independent of formatting. If you want to not show a decimal point where there might be no digits after the decimal point, use setDecimalSeparatorAlwaysShown.

setDecimalSeparatorAlwaysShown : only affects formatting, and only where there might be no digits after the decimal point, such as with a pattern like "#,##0.##", e.g., if true, 3456.00 -> "3,456." if false, 3456.00 -> "3456" This is independent of parsing. If you want parsing to stop at the decimal point, use setParseIntegerOnly.

You can also use forms of the parse and format methods with ParsePosition and FieldPosition to allow you to:

  • progressively parse through pieces of a string
  • align the decimal point and other areas
For example, you can align numbers in two ways:
  1. If you are using a monospaced font with spacing for alignment, you can pass the FieldPosition in your format call, with field = INTEGER_FIELD. On output, getEndIndex will be set to the offset between the last character of the integer and the decimal. Add (desiredSpaceCount - getEndIndex) spaces at the front of the string.
  2. If you are using proportional fonts, instead of padding with spaces, measure the width of the string in pixels from the start to getEndIndex. Then move the pen by (desiredPixelWidth - widthToAlignmentPoint) before drawing the text. It also works where there is no decimal, but possibly additional characters at the end, e.g., with parentheses in negative numbers: "(12)" for -12.

See Also:
DecimalFormat, ChoiceFormat, Serialized Form

Field Summary
static int | FRACTION_FIELD Field constant used to construct a FieldPosition object.
static int | INTEGER_FIELD Field constant used to construct a FieldPosition object.
Constructor Summary
NumberFormat()
Method Summary
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Overrides equals
String | format(double number) Specialization of format.
abstract StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
String | format(long number) Specialization of format.
abstract StringBuffer | format(long number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.
StringBuffer | format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats an object to produce a string.
static Locale[] | getAvailableLocales() Get the set of Locales for which NumberFormats are installed
static NumberFormat | getCurrencyInstance() Returns a currency format for the current default locale.
static NumberFormat | getCurrencyInstance(Locale inLocale) Returns a currency format for the specified locale.
static NumberFormat | getInstance() Returns the default number format for the current default locale.
static NumberFormat | getInstance(Locale inLocale) Returns the default number format for the specified locale.
int | getMaximumFractionDigits() Returns the maximum number of digits allowed in the fraction portion of a number.
int | getMaximumIntegerDigits() Returns the maximum number of digits allowed in the integer portion of a number.
int | getMinimumFractionDigits() Returns the minimum number of digits allowed in the fraction portion of a number.
int | getMinimumIntegerDigits() Returns the minimum number of digits allowed in the integer portion of a number.
static NumberFormat | getNumberInstance() Returns a general-purpose number format for the current default locale.
static NumberFormat | getNumberInstance(Locale inLocale) Returns a general-purpose number format for the specified locale.
static NumberFormat | getPercentInstance() Returns a percentage format for the current default locale.
static NumberFormat | getPercentInstance(Locale inLocale) Returns a percentage format for the specified locale.
int | hashCode() Overrides hashCode
boolean | isGroupingUsed() Returns true if grouping is used in this format.
boolean | isParseIntegerOnly() Returns true if this format will parse numbers as integers only.
Number | parse(String text) Convenience method.
abstract Number | parse(String text, ParsePosition parsePosition) Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
Object | parseObject(String source, ParsePosition parsePosition) Parses a string to produce an object.
void | setGroupingUsed(boolean newValue) Set whether or not grouping will be used in this format.
void | setMaximumFractionDigits(int newValue) Sets the maximum number of digits allowed in the fraction portion of a number.
void | setMaximumIntegerDigits(int newValue) Sets the maximum number of digits allowed in the integer portion of a number.
void | setMinimumFractionDigits(int newValue) Sets the minimum number of digits allowed in the fraction portion of a number.
void | setMinimumIntegerDigits(int newValue) Sets the minimum number of digits allowed in the integer portion of a number.
void | setParseIntegerOnly(boolean value) Sets whether or not numbers should be parsed as integers only.
Methods inherited from class java.text.Format
format, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

INTEGER_FIELD

public static final int INTEGER_FIELD
Field constant used to construct a FieldPosition object. Signifies that the position of the integer part of a formatted number should be returned.
See Also:
FieldPosition

FRACTION_FIELD

public static final int FRACTION_FIELD
Field constant used to construct a FieldPosition object. Signifies that the position of the fraction part of a formatted number should be returned.
See Also:
FieldPosition
Constructor Detail

NumberFormat

public NumberFormat()
Method Detail

format

public final StringBuffer format(Object number,
                                 StringBuffer toAppendTo,
                                 FieldPosition pos)
Formats an object to produce a string. This general routines allows polymorphic parsing and formatting for objectst.
Overrides:
format in class Format
Parameters:
obj - The object to format
toAppendTo - where the text is to be appended
pos - On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns:
the value passed in as toAppendTo (this allows chaining, as with StringBuffer.append())
Throws:
IllegalArgumentException - when the Format cannot format the given object.
See Also:
FieldPosition

parseObject

public final Object parseObject(String source,
                                ParsePosition parsePosition)
Parses a string to produce an object.
Overrides:
parseObject in class Format
Parameters:
source - the string to parse.
parsePosition - Input-Output parameter. On input, the position to begin parsing. On output, the position of the first unparse character.
Returns:
Object parsed from string. In case of error, returns null.
See Also:
ParsePosition

format

public final String format(double number)
Specialization of format.
See Also:
Format.format(java.lang.Object)

format

public final String format(long number)
Specialization of format.
See Also:
Format.format(java.lang.Object)

format

public abstract StringBuffer format(double number,
                                    StringBuffer toAppendTo,
                                    FieldPosition pos)
Specialization of format.
See Also:
Format.format(java.lang.Object)

format

public abstract StringBuffer format(long number,
                                    StringBuffer toAppendTo,
                                    FieldPosition pos)
Specialization of format.
See Also:
Format.format(java.lang.Object)

parse

public abstract Number parse(String text,
                             ParsePosition parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g., for rational numbers "1 2/3", will stop after the 1). Does not throw an exception; if no object can be parsed, index is unchanged!
See Also:
isParseIntegerOnly(), Format.parseObject(java.lang.String, java.text.ParsePosition)

parse

public Number parse(String text)
             throws ParseException
Convenience method.
Throws:
ParseException - if the specified string is invalid.
See Also:
format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)

isParseIntegerOnly

public boolean isParseIntegerOnly()
Returns true if this format will parse numbers as integers only. For example in the English locale, with ParseIntegerOnly true, the string "1234." would be parsed as the integer value 1234 and parsing would stop at the "." character. Of course, the exact format accepted by the parse operation is locale dependant and determined by sub-classes of NumberFormat.

setParseIntegerOnly

public void setParseIntegerOnly(boolean value)
Sets whether or not numbers should be parsed as integers only.
See Also:
isParseIntegerOnly()

getInstance

public static final NumberFormat getInstance()
Returns the default number format for the current default locale. The default format is one of the styles provided by the other factory methods: getNumberInstance, getCurrencyInstance or getPercentInstance. Exactly which one is locale dependant.

getInstance

public static NumberFormat getInstance(Locale inLocale)
Returns the default number format for the specified locale. The default format is one of the styles provided by the other factory methods: getNumberInstance, getCurrencyInstance or getPercentInstance. Exactly which one is locale dependant.

getNumberInstance

public static final NumberFormat getNumberInstance()
Returns a general-purpose number format for the current default locale.

getNumberInstance

public static NumberFormat getNumberInstance(Locale inLocale)
Returns a general-purpose number format for the specified locale.

getCurrencyInstance

public static final NumberFormat getCurrencyInstance()
Returns a currency format for the current default locale.

getCurrencyInstance

public static NumberFormat getCurrencyInstance(Locale inLocale)
Returns a currency format for the specified locale.

getPercentInstance

public static final NumberFormat getPercentInstance()
Returns a percentage format for the current default locale.

getPercentInstance

public static NumberFormat getPercentInstance(Locale inLocale)
Returns a percentage format for the specified locale.

getAvailableLocales

public static Locale[] getAvailableLocales()
Get the set of Locales for which NumberFormats are installed
Returns:
available locales

hashCode

public int hashCode()
Overrides hashCode
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Overrides equals
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Format
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

isGroupingUsed

public boolean isGroupingUsed()
Returns true if grouping is used in this format. For example, in the English locale, with grouping on, the number 1234567 might be formatted as "1,234,567". The grouping separator as well as the size of each group is locale dependant and is determined by sub-classes of NumberFormat.
See Also:
setGroupingUsed(boolean)

setGroupingUsed

public void setGroupingUsed(boolean newValue)
Set whether or not grouping will be used in this format.
See Also:
isGroupingUsed()

getMaximumIntegerDigits

public int getMaximumIntegerDigits()
Returns the maximum number of digits allowed in the integer portion of a number.
See Also:
setMaximumIntegerDigits(int)

setMaximumIntegerDigits

public void setMaximumIntegerDigits(int newValue)
Sets the maximum number of digits allowed in the integer portion of a number. maximumIntegerDigits must be >= minimumIntegerDigits. If the new value for maximumIntegerDigits is less than the current value of minimumIntegerDigits, then minimumIntegerDigits will also be set to the new value.
Parameters:
newValue - the maximum number of integer digits to be shown; if less than zero, then zero is used. The concrete subclass may enforce an upper limit to this value appropriate to the numeric type being formatted.
See Also:
getMaximumIntegerDigits()

getMinimumIntegerDigits

public int getMinimumIntegerDigits()
Returns the minimum number of digits allowed in the integer portion of a number.
See Also:
setMinimumIntegerDigits(int)

setMinimumIntegerDigits

public void setMinimumIntegerDigits(int newValue)
Sets the minimum number of digits allowed in the integer portion of a number. minimumIntegerDigits must be <= maximumIntegerDigits.="maximumIntegerDigits." If="If" the="the" new="new" value="value" for="for" minimumIntegerDigits="minimumIntegerDigits" exceeds="exceeds" the="the" current="current" value="value" of="of" maximumIntegerDigits,="maximumIntegerDigits," then="then" maximumIntegerDigits="maximumIntegerDigits" will="will" also="also" be="be" set="set" to="to" the="the" new="new" value
Parameters:
newValue - the minimum number of integer digits to be shown; if less than zero, then zero is used. The concrete subclass may enforce an upper limit to this value appropriate to the numeric type being formatted.
See Also:
getMinimumIntegerDigits()

getMaximumFractionDigits

public int getMaximumFractionDigits()
Returns the maximum number of digits allowed in the fraction portion of a number.
See Also:
setMaximumFractionDigits(int)

setMaximumFractionDigits

public void setMaximumFractionDigits(int newValue)
Sets the maximum number of digits allowed in the fraction portion of a number. maximumFractionDigits must be >= minimumFractionDigits. If the new value for maximumFractionDigits is less than the current value of minimumFractionDigits, then minimumFractionDigits will also be set to the new value.
Parameters:
newValue - the maximum number of fraction digits to be shown; if less than zero, then zero is used. The concrete subclass may enforce an upper limit to this value appropriate to the numeric type being formatted.
See Also:
getMaximumFractionDigits()

getMinimumFractionDigits

public int getMinimumFractionDigits()
Returns the minimum number of digits allowed in the fraction portion of a number.
See Also:
setMinimumFractionDigits(int)

setMinimumFractionDigits

public void setMinimumFractionDigits(int newValue)
Sets the minimum number of digits allowed in the fraction portion of a number. minimumFractionDigits must be <= maximumFractionDigits.="maximumFractionDigits." If="If" the="the" new="new" value="value" for="for" minimumFractionDigits="minimumFractionDigits" exceeds="exceeds" the="the" current="current" value="value" of="of" maximumFractionDigits,="maximumFractionDigits," then="then" maximumIntegerDigits="maximumIntegerDigits" will="will" also="also" be="be" set="set" to="to" the="the" new="new" value
Parameters:
newValue - the minimum number of fraction digits to be shown; if less than zero, then zero is used. The concrete subclass may enforce an upper limit to this value appropriate to the numeric type being formatted.
See Also:
getMinimumFractionDigits()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParseException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.text
Class ParseException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.text.ParseException
All Implemented Interfaces:
Serializable
public class ParseException
extends Exception

Signals that an error has been reached unexpectedly while parsing.

See Also:
Exception, Format, FieldPosition, Serialized Form

Constructor Summary
ParseException(String s, int errorOffset)
Constructs a ParseException with the specified detail message and offset.
Method Summary
 int getErrorOffset()
Returns the position where the error was found.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ParseException

public ParseException(String s,
                      int errorOffset)
Constructs a ParseException with the specified detail message and offset. A detail message is a String that describes this particular exception.
Parameters:
s - the detail message
errorOffset - the position where the error is found while parsing.
Method Detail

getErrorOffset

public int getErrorOffset()
Returns the position where the error was found.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ParsePosition

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class ParsePosition

java.lang.Object
  |
  +--java.text.ParsePosition
public class ParsePosition
extends Object

ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing. The parseObject method in the various Format classes requires a ParsePosition object as an argument.

By design, as you parse through a string with different formats, you can use the same ParsePosition, since the index parameter records the current position.

See Also:
Format

Constructor Summary
ParsePosition(int index)
Create a new ParsePosition with the given initial index.
Method Summary
boolean | equals(Object obj) Overrides equals
int | getErrorIndex() Retrieve the index at which an error occurred, or -1 if the error index has not been set.
int | getIndex() Retrieve the current parse position.
int | hashCode() Returns a hash code for this ParsePosition.
void | setErrorIndex(int ei) Set the index at which a parse error occurred.
void | setIndex(int index) Set the current parse position.
String | toString() Return a string representation of this ParsePosition.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ParsePosition

public ParsePosition(int index)
Create a new ParsePosition with the given initial index.
Method Detail

getIndex

public int getIndex()
Retrieve the current parse position. On input to a parse method, this is the index of the character at which parsing will begin; on output, it is the index of the character following the last character parsed.

setIndex

public void setIndex(int index)
Set the current parse position.

setErrorIndex

public void setErrorIndex(int ei)
Set the index at which a parse error occurred. Formatters should set this before returning an error code from their parseObject method. The default value is -1 if this is not set.

getErrorIndex

public int getErrorIndex()
Retrieve the index at which an error occurred, or -1 if the error index has not been set.

equals

public boolean equals(Object obj)
Overrides equals
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code for this ParsePosition.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object

toString

public String toString()
Return a string representation of this ParsePosition.
Overrides:
toString in class Object
Returns:
a string representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RuleBasedCollator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class RuleBasedCollator

java.lang.Object
  |
  +--java.text.Collator
        |
        +--java.text.RuleBasedCollator
All Implemented Interfaces:
Cloneable, Comparator
public class RuleBasedCollator
extends Collator

The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator. With this class you can create a customized table-based Collator. RuleBasedCollator maps characters to sort keys.

RuleBasedCollator has the following restrictions for efficiency (other subclasses may be used for more complex languages) :

  1. If a French secondary ordering is specified it applies to the whole collator object.
  2. All non-mentioned Unicode characters are at the end of the collation order.

The collation table is composed of a list of collation rules, where each rule is of three forms:
The following demonstrates how to create your own collation rules:
  • Text-Argument: A text-argument is any sequence of characters, excluding special characters (that is, common whitespace characters [0009-000D, 0020] and rule syntax characters [0021-002F, 003A-0040, 005B-0060, 007B-007E]). If those characters are desired, you can put them in single quotes (e.g. ampersand => '&'). Note that unquoted white space characters are ignored; e.g. b c is treated as bc.
  • Modifier: There is a single modifier which is used to specify that all accents (secondary differences) are backwards.

    '@' : Indicates that accents are sorted backwards, as in French.

  • Relation: The relations are the following:
    • '<' :=":" Greater,="Greater," as="as" a="a" letter="letter" difference="difference" (primary)="(primary)" ';' : Greater, as an accent difference (secondary)
    • ',' : Greater, as a case difference (tertiary)
    • '=' : Equal
  • Reset: There is a single reset which is used primarily for contractions and expansions, but which can also be used to add a modification at the end of a set of rules.

    '&' : Indicates that the next rule follows the position to where the reset text-argument would be sorted.

This sounds more complicated than it is in practice. For example, the following are equivalent ways of expressing the same thing:

 a
Notice that the order is important, as the subsequent item goes immediately after the text-argument. The following are not equivalent:
 a
Either the text-argument must already be present in the sequence, or some initial substring of the text-argument must be present. (e.g. "a Ignorable Characters

For ignorable characters, the first rule must start with a relation (the examples we have used above are really fragments; "a Normalization and Accents

RuleBasedCollator automatically processes its rule table to include both pre-composed and combining-character versions of accented characters. Even if the provided rule string contains only base characters and separate combining accent characters, the pre-composed accented characters matching all canonical combinations of characters from the rule string will be entered in the table.

This allows you to use a RuleBasedCollator to compare accented strings even when the collator is set to NO_DECOMPOSITION. There are two caveats, however. First, if the strings to be collated contain combining sequences that may not be in canonical order, you should set the collator to CANONICAL_DECOMPOSITION or FULL_DECOMPOSITION to enable sorting of combining sequences. Second, if the strings contain characters with compatibility decompositions (such as full-width and half-width forms), you must use FULL_DECOMPOSITION, since the rule tables only include canonical mappings. For more information, see The Unicode Standard, Version 2.0.)

Errors

The following are errors:

  • A text-argument contains unquoted punctuation symbols (e.g. "a A relation or reset character not followed by a text-argument (e.g. "a <, b").="b")." A reset where the text-argument (or an initial substring of the text-argument) is not already in the sequence. (e.g. "a If you produce one of these errors, a RuleBasedCollator throws a ParseException.

    Examples

    Simple: "Norwegian: " Normally, to create a rule-based Collator object, you will use Collator's factory method getInstance. However, to create a rule-based Collator object with specialized rules tailored to your needs, you construct the RuleBasedCollator with the rules contained in a String object. For example:

     String Simple = "
    Or:
     String Norwegian = "

    Combining Collators is as simple as concatenating strings. Here's an example that combines two Collators from two different locales:

     // Create an en_US Collator object
 RuleBasedCollator en_USCollator = (RuleBasedCollator)
     Collator.getInstance(new Locale("en", "US", ""));
 // Create a da_DK Collator object
 RuleBasedCollator da_DKCollator = (RuleBasedCollator)
     Collator.getInstance(new Locale("da", "DK", ""));
 // Combine the two
 // First, get the collation rules from en_USCollator
 String en_USRules = en_USCollator.getRules();
 // Second, get the collation rules from da_DKCollator
 String da_DKRules = da_DKCollator.getRules();
 RuleBasedCollator newCollator =
     new RuleBasedCollator(en_USRules + da_DKRules);
 // newCollator has the combined rules

    Another more interesting example would be to make changes on an existing table to create a new Collator object. For example, add "& C en_USCollator object to create your own:

     // Create a new Collator object with additional rules
 String addRules = "& C

    The following example demonstrates how to change the order of non-spacing accents,

     // old rule
 String oldRules = "=?;?;?;?"    // main accents
                 + ";?;?;?;?"    // main accents
                 + ";?;?;?;?"    // main accents
                 + ";?;?;?;?"    // main accents
                 + ";?;?;?;?"    // main accents
                 + "

    The last example shows how to put new primary ordering in before the default setting. For example, in Japanese Collator, you can either sort English characters before or after Japanese characters,

     // get en_US Collator rules
 RuleBasedCollator en_USCollator = (RuleBasedCollator)Collator.getInstance(Locale.US);
 // add a few Japanese character to sort before English characters
 // suppose the last character before the first base letter 'a' in
 // the English collation rule is ?
 String jaString = "& ?

    See Also:
    Collator, CollationElementIterator

    Fields inherited from class java.text.Collator
    CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
    Constructor Summary
    RuleBasedCollator(String rules)
    RuleBasedCollator constructor.
    Method Summary
     Object clone()
    Standard override; no change in semantics.
     int compare(String source, String target)
    Compares the character data stored in two different strings based on the collation rules.
     boolean equals(Object obj)
    Compares the equality of two collation objects.
     CollationElementIterator getCollationElementIterator(CharacterIterator source)
    Return a CollationElementIterator for the given String.
     CollationElementIterator getCollationElementIterator(String source)
    Return a CollationElementIterator for the given String.
     CollationKey getCollationKey(String source)
    Transforms the string into a series of characters that can be compared with CollationKey.compareTo.
     String getRules()
    Gets the table-based rules for the collation object.
     int hashCode()
    Generates the hash code for the table-based collation object
    Methods inherited from class java.text.Collator
    compare, equals, getAvailableLocales, getDecomposition, getInstance, getInstance, getStrength, setDecomposition, setStrength
    Methods inherited from class java.lang.Object
    finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Constructor Detail

    RuleBasedCollator

    public RuleBasedCollator(String rules)
                  throws ParseException
    RuleBasedCollator constructor. This takes the table rules and builds a collation table out of them. Please see RuleBasedCollator class description for more details on the collation rule syntax.
    Parameters:
    rules - the collation rules to build the collation table from.
    Throws:
    ParseException - A format exception will be thrown if the build process of the rules fails. For example, build rule "a See Also:
    Locale
    Method Detail

    getRules

    public String getRules()
    Gets the table-based rules for the collation object.
    Returns:
    returns the collation rules that the table collation object was created from.

    getCollationElementIterator

    public CollationElementIterator getCollationElementIterator(String source)
    Return a CollationElementIterator for the given String.
    See Also:
    CollationElementIterator

    getCollationElementIterator

    public CollationElementIterator getCollationElementIterator(CharacterIterator source)
    Return a CollationElementIterator for the given String.
    See Also:
    CollationElementIterator

    compare

    public int compare(String source,
                   String target)
    Compares the character data stored in two different strings based on the collation rules. Returns information about whether a string is less than, greater than or equal to another string in a language. This can be overriden in a subclass.
    Overrides:
    compare in class Collator
    Following copied from class: java.text.Collator
    Parameters:
    source - the source string.
    target - the target string.
    Returns:
    Returns an integer value. Value is less than zero if source is less than target, value is zero if source and target are equal, value is greater than zero if source is greater than target.
    See Also:
    CollationKey, Collator.getCollationKey(java.lang.String)

    getCollationKey

    public CollationKey getCollationKey(String source)
    Transforms the string into a series of characters that can be compared with CollationKey.compareTo. This overrides java.text.Collator.getCollationKey. It can be overriden in a subclass.
    Overrides:
    getCollationKey in class Collator
    Following copied from class: java.text.Collator
    Parameters:
    source - the string to be transformed into a collation key.
    Returns:
    the CollationKey for the given String based on this Collator's collation rules. If the source String is null, a null CollationKey is returned.
    See Also:
    CollationKey, Collator.compare(java.lang.String, java.lang.String)

    clone

    public Object clone()
    Standard override; no change in semantics.
    Overrides:
    clone in class Collator
    Following copied from class: java.lang.Object
    Returns:
    a clone of this instance.
    Throws:
    CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
    OutOfMemoryError - if there is not enough memory.
    See Also:
    Cloneable

    equals

    public boolean equals(Object obj)
    Compares the equality of two collation objects.
    Overrides:
    equals in class Collator
    Parameters:
    obj - the table-based collation object to be compared with this.
    Returns:
    true if the current table-based collation object is the same as the table-based collation object obj; false otherwise.

    hashCode

    public int hashCode()
    Generates the hash code for the table-based collation object
    Overrides:
    hashCode in class Collator
    Following copied from class: java.lang.Object
    Returns:
    a hash code value for this object.
    See Also:
    Object.equals(java.lang.Object), Hashtable
    Overview Package Class Use Tree Deprecated Index Help
            JavaTM 2 Platform
    Std. Ed. v1.3.1
    PREV CLASS NEXT CLASS FRAMES NO FRAMES
    SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleDateFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.text
Class SimpleDateFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.DateFormat
              |
              +--java.text.SimpleDateFormat
All Implemented Interfaces:
Cloneable, Serializable
public class SimpleDateFormat
extends DateFormat

SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. It allows for formatting (date -> text), parsing (text -> date), and normalization.

SimpleDateFormat allows you to start by choosing any user-defined patterns for date-time formatting. However, you are encouraged to create a date-time formatter with either getTimeInstance, getDateInstance, or getDateTimeInstance in DateFormat. Each of these class methods can return a date/time formatter initialized with a default format pattern. You may modify the format pattern using the applyPattern methods as desired. For more information on using these methods, see DateFormat.

Time Format Syntax:

To specify the time format use a time pattern string. In this pattern, all ASCII letters are reserved as pattern letters, which are defined as the following:

 Symbol   Meaning                 Presentation        Example
 ------   -------                 ------------        -------
 G        era designator          (Text)              AD
 y        year                    (Number)            1996
 M        month in year           (Text & Number)     July & 07
 d        day in month            (Number)            10
 h        hour in am/pm (1~12)    (Number)            12
 H        hour in day (0~23)      (Number)            0
 m        minute in hour          (Number)            30
 s        second in minute        (Number)            55
 S        millisecond             (Number)            978
 E        day in week             (Text)              Tuesday
 D        day in year             (Number)            189
 F        day of week in month    (Number)            2 (2nd Wed in July)
 w        week in year            (Number)            27
 W        week in month           (Number)            2
 a        am/pm marker            (Text)              PM
 k        hour in day (1~24)      (Number)            24
 K        hour in am/pm (0~11)    (Number)            0
 z        time zone               (Text)              Pacific Standard Time
 '        escape for text         (Delimiter)
 ''       single quote            (Literal)           '
The count of pattern letters determine the format.

(Text): 4 or more pattern letters--use full form, < 4--use short or abbreviated form if one exists.

(Number): the minimum number of digits. Shorter numbers are zero-padded to this amount. Year is handled specially; that is, if the count of 'y' is 2, the Year will be truncated to 2 digits.

(Text & Number): 3 or over, use text, otherwise use number.

Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not embraced within single quotes.

A pattern containing any invalid pattern letter will result in a thrown exception during formatting or parsing.

Examples Using the US Locale:

 Format Pattern                         Result
 --------------                         -------
 "yyyy.MM.dd G 'at' hh:mm:ss z"    ->>  1996.07.10 AD at 15:08:56 PDT
 "EEE, MMM d, ''yy"                ->>  Wed, July 10, '96
 "h:mm a"                          ->>  12:08 PM
 "hh 'o''clock' a, zzzz"           ->>  12 o'clock PM, Pacific Daylight Time
 "K:mm a, z"                       ->>  0:00 PM, PST
 "yyyyy.MMMMM.dd GGG hh:mm aaa"    ->>  1996.July.10 AD 12:08 PM
Code Sample:
 SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, "PST");
 pdt.setStartRule(DateFields.APRIL, 1, DateFields.SUNDAY, 2*60*60*1000);
 pdt.setEndRule(DateFields.OCTOBER, -1, DateFields.SUNDAY, 2*60*60*1000);

 // Format the current time.
 SimpleDateFormat formatter
     = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss a zzz");
 Date currentTime_1 = new Date();
 String dateString = formatter.format(currentTime_1);

 // Parse the previous string back into a Date.
 ParsePosition pos = new ParsePosition(0);
 Date currentTime_2 = formatter.parse(dateString, pos);
In the example, the time value currentTime_2 obtained from parsing will be equal to currentTime_1. However, they may not be equal if the am/pm marker 'a' is left out from the format pattern while the "hour in am/pm" pattern symbol is used. This information loss can happen when formatting the time in PM.

When parsing a date string using the abbreviated year pattern ("y" or "yy"), SimpleDateFormat must interpret the abbreviated year relative to some century. It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance is created. For example, using a pattern of "MM/dd/yy" and a SimpleDateFormat instance created on Jan 1, 1997, the string "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" would be interpreted as May 4, 1964. During parsing, only strings consisting of exactly two digits, as defined by Character.isDigit(char), will be parsed into the default century. Any other numeric string, such as a one digit string, a three or more digit string, or a two digit string that isn't all digits (for example, "-1"), is interpreted literally. So "01/02/3" or "01/02/003" are parsed, using the same pattern, as Jan 2, 3 AD. Likewise, "01/02/-3" is parsed as Jan 2, 4 BC.

If the year pattern has more than two 'y' characters, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.

For time zones that have no names, use strings GMT+hours:minutes or GMT-hours:minutes.

The calendar defines what is the first day of the week, the first week of the year, whether hours are zero based or not (0 vs 12 or 24), and the time zone. There is one common decimal format to handle all the numbers; the digit count is handled programmatically according to the pattern.

See Also:
Calendar, GregorianCalendar, TimeZone, DateFormat, DateFormatSymbols, DecimalFormat, Serialized Form

Fields inherited from class java.text.DateFormat
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
Constructor Summary
SimpleDateFormat()
Construct a SimpleDateFormat using the default pattern for the default locale.
SimpleDateFormat(String pattern)
Construct a SimpleDateFormat using the given pattern in the default locale.
SimpleDateFormat(String pattern, DateFormatSymbols formatData)
Construct a SimpleDateFormat using the given pattern and locale-specific symbol data.
SimpleDateFormat(String pattern, Locale loc)
Construct a SimpleDateFormat using the given pattern and locale.
Method Summary
void | applyLocalizedPattern(String pattern) Apply the given localized pattern string to this date format.
void | applyPattern(String pattern) Apply the given unlocalized pattern string to this date format.
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Override equals.
StringBuffer | format(Date date, StringBuffer toAppendTo, FieldPosition pos) Overrides DateFormat
Date | get2DigitYearStart() Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.
DateFormatSymbols | getDateFormatSymbols() Gets the date/time formatting data.
int | hashCode() Override hashCode.
Date | parse(String text, ParsePosition pos) Overrides DateFormat
void | set2DigitYearStart(Date startDate) Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.
void | setDateFormatSymbols(DateFormatSymbols newFormatSymbols) Allows you to set the date/time formatting data.
String | toLocalizedPattern() Return a localized pattern string describing this date format.
String | toPattern() Return a pattern string describing this date format.
Methods inherited from class java.text.DateFormat
format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone
Methods inherited from class java.text.Format
format, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleDateFormat

public SimpleDateFormat()
Construct a SimpleDateFormat using the default pattern for the default locale. Note: Not all locales support SimpleDateFormat; for full generality, use the factory methods in the DateFormat class.
See Also:
DateFormat

SimpleDateFormat

public SimpleDateFormat(String pattern)
Construct a SimpleDateFormat using the given pattern in the default locale. Note: Not all locales support SimpleDateFormat; for full generality, use the factory methods in the DateFormat class.

SimpleDateFormat

public SimpleDateFormat(String pattern,
                        Locale loc)
Construct a SimpleDateFormat using the given pattern and locale. Note: Not all locales support SimpleDateFormat; for full generality, use the factory methods in the DateFormat class.

SimpleDateFormat

public SimpleDateFormat(String pattern,
                        DateFormatSymbols formatData)
Construct a SimpleDateFormat using the given pattern and locale-specific symbol data.
Method Detail

set2DigitYearStart

public void set2DigitYearStart(Date startDate)
Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.
Parameters:
startDate - During parsing, two digit years will be placed in the range startDate to startDate + 100 years.

get2DigitYearStart

public Date get2DigitYearStart()
Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.
Returns:
the start of the 100-year period into which two digit years are parsed

format

public StringBuffer format(Date date,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Overrides DateFormat

Formats a date or time, which is the standard millis since January 1, 1970, 00:00:00 GMT.

Example: using the US locale: "yyyy.MM.dd G 'at' HH:mm:ss zzz" ->> 1996.07.10 AD at 15:08:56 PDT

Overrides:
format in class DateFormat
Parameters:
date - the date-time value to be formatted into a date-time string.
toAppendTo - where the new date-time text is to be appended.
pos - the formatting position. On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns:
the formatted date-time string.
See Also:
DateFormat

parse

public Date parse(String text,
                  ParsePosition pos)
Overrides DateFormat
Overrides:
parse in class DateFormat
See Also:
DateFormat

toPattern

public String toPattern()
Return a pattern string describing this date format.

toLocalizedPattern

public String toLocalizedPattern()
Return a localized pattern string describing this date format.

applyPattern

public void applyPattern(String pattern)
Apply the given unlocalized pattern string to this date format.

applyLocalizedPattern

public void applyLocalizedPattern(String pattern)
Apply the given localized pattern string to this date format.

getDateFormatSymbols

public DateFormatSymbols getDateFormatSymbols()
Gets the date/time formatting data.
Returns:
a copy of the date-time formatting data associated with this date-time formatter.

setDateFormatSymbols

public void setDateFormatSymbols(DateFormatSymbols newFormatSymbols)
Allows you to set the date/time formatting data.
Parameters:
newFormatData - the given date-time formatting data.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class DateFormat
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

hashCode

public int hashCode()
Override hashCode. Generates the hash code for the SimpleDateFormat object
Overrides:
hashCode in class DateFormat
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Override equals.
Overrides:
equals in class DateFormat
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringCharacterIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.text
Class StringCharacterIterator

java.lang.Object
  |
  +--java.text.StringCharacterIterator
All Implemented Interfaces:
CharacterIterator, Cloneable
public final class StringCharacterIterator
extends Object
implements CharacterIterator

StringCharacterIterator implements the CharacterIterater protocol for a String. The StringCharacterIterator class iterates over the entire String.

See Also:
CharacterIterator

Fields inherited from interface java.text.CharacterIterator
DONE
Constructor Summary
StringCharacterIterator(String text)
Constructs an iterator with an initial index of 0.
StringCharacterIterator(String text, int pos)
Constructs an iterator with the specified initial index.
StringCharacterIterator(String text, int begin, int end, int pos)
Constructs an iterator over the given range of the given string, with the index set at the specified position.
Method Summary
 Object clone()
Creates a copy of this iterator.
 char current()
Implements CharacterIterator.current() for String.
 boolean equals(Object obj)
Compares the equality of two StringCharacterIterator objects.
 char first()
Implements CharacterIterator.first() for String.
 int getBeginIndex()
Implements CharacterIterator.getBeginIndex() for String.
 int getEndIndex()
Implements CharacterIterator.getEndIndex() for String.
 int getIndex()
Implements CharacterIterator.getIndex() for String.
 int hashCode()
Computes a hashcode for this iterator.
 char last()
Implements CharacterIterator.last() for String.
 char next()
Implements CharacterIterator.next() for String.
 char previous()
Implements CharacterIterator.previous() for String.
 char setIndex(int p)
Implements CharacterIterator.setIndex() for String.
 void setText(String text)
Reset this iterator to point to a new string.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringCharacterIterator

public StringCharacterIterator(String text)
Constructs an iterator with an initial index of 0.

StringCharacterIterator

public StringCharacterIterator(String text,
                               int pos)
Constructs an iterator with the specified initial index.
Parameters:
text - The String to be iterated over
pos - Initial iterator position

StringCharacterIterator

public StringCharacterIterator(String text,
                               int begin,
                               int end,
                               int pos)
Constructs an iterator over the given range of the given string, with the index set at the specified position.
Parameters:
text - The String to be iterated over
begin - Index of the first character
end - Index of the character following the last character
pos - Initial iterator position
Method Detail

setText

public void setText(String text)
Reset this iterator to point to a new string. This package-visible method is used by other java.text classes that want to avoid allocating new StringCharacterIterator objects every time their setText method is called.
Parameters:
text - The String to be iterated over

first

public char first()
Implements CharacterIterator.first() for String.
Specified by:
first in interface CharacterIterator
See Also:
CharacterIterator.first()

last

public char last()
Implements CharacterIterator.last() for String.
Specified by:
last in interface CharacterIterator
See Also:
CharacterIterator.last()

setIndex

public char setIndex(int p)
Implements CharacterIterator.setIndex() for String.
Specified by:
setIndex in interface CharacterIterator
See Also:
CharacterIterator.setIndex(int)

current

public char current()
Implements CharacterIterator.current() for String.
Specified by:
current in interface CharacterIterator
See Also:
CharacterIterator.current()

next

public char next()
Implements CharacterIterator.next() for String.
Specified by:
next in interface CharacterIterator
See Also:
CharacterIterator.next()

previous

public char previous()
Implements CharacterIterator.previous() for String.
Specified by:
previous in interface CharacterIterator
See Also:
CharacterIterator.previous()

getBeginIndex

public int getBeginIndex()
Implements CharacterIterator.getBeginIndex() for String.
Specified by:
getBeginIndex in interface CharacterIterator
See Also:
CharacterIterator.getBeginIndex()

getEndIndex

public int getEndIndex()
Implements CharacterIterator.getEndIndex() for String.
Specified by:
getEndIndex in interface CharacterIterator
See Also:
CharacterIterator.getEndIndex()

getIndex

public int getIndex()
Implements CharacterIterator.getIndex() for String.
Specified by:
getIndex in interface CharacterIterator
See Also:
CharacterIterator.getIndex()

equals

public boolean equals(Object obj)
Compares the equality of two StringCharacterIterator objects.
Overrides:
equals in class Object
Parameters:
obj - the StringCharacterIterator object to be compared with.
Returns:
true if the given obj is the same as this StringCharacterIterator object; false otherwise.

hashCode

public int hashCode()
Computes a hashcode for this iterator.
Overrides:
hashCode in class Object
Returns:
A hash code

clone

public Object clone()
Creates a copy of this iterator.
Specified by:
clone in interface CharacterIterator
Overrides:
clone in class Object
Returns:
A copy of this
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EventListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface EventListener

All Known Subinterfaces:
Action, ActionListener, AdjustmentListener, AncestorListener, AWTEventListener, BeanContextMembershipListener, BeanContextServiceRevokedListener, BeanContextServices, BeanContextServicesListener, CaretListener, CellEditorListener, ChangeListener, ComponentListener, ContainerListener, ControllerEventListener, DocumentListener, DragGestureListener, DragSourceListener, DropTargetListener, FocusListener, HierarchyBoundsListener, HierarchyListener, HyperlinkListener, InputMethodListener, InternalFrameListener, ItemListener, KeyListener, LineListener, ListDataListener, ListSelectionListener, MenuDragMouseListener, MenuKeyListener, MenuListener, MetaEventListener, MouseInputListener, MouseListener, MouseMotionListener, NamespaceChangeListener, NamingListener, ObjectChangeListener, PopupMenuListener, PropertyChangeListener, TableColumnModelListener, TableModelListener, TextListener, TreeExpansionListener, TreeModelListener, TreeSelectionListener, TreeWillExpandListener, UndoableEditListener, UnsolicitedNotificationListener, VetoableChangeListener, WindowListener
public interface EventListener

A tagging interface that all event listener interfaces must extend.

Since:
JDK1.1

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.util

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.util.AbstractCollection (implements java.util.Collection)
      • class java.util.AbstractList (implements java.util.List)
        • class java.util.AbstractSequentialList
          • class java.util.LinkedList (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
        • class java.util.ArrayList (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
        • class java.util.Vector (implements java.lang.Cloneable, java.util.List, java.io.Serializable)
          • class java.util.Stack
      • class java.util.AbstractSet (implements java.util.Set)
        • class java.util.HashSet (implements java.lang.Cloneable, java.io.Serializable, java.util.Set)
        • class java.util.TreeSet (implements java.lang.Cloneable, java.io.Serializable, java.util.SortedSet)
    • class java.util.AbstractMap (implements java.util.Map)
      • class java.util.HashMap (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
      • class java.util.TreeMap (implements java.lang.Cloneable, java.io.Serializable, java.util.SortedMap)
      • class java.util.WeakHashMap (implements java.util.Map)
    • class java.util.Arrays
    • class java.util.BitSet (implements java.lang.Cloneable, java.io.Serializable)
    • class java.util.Calendar (implements java.lang.Cloneable, java.io.Serializable)
      • class java.util.GregorianCalendar
    • class java.util.Collections
    • class java.util.Date (implements java.lang.Cloneable, java.lang.Comparable, java.io.Serializable)
    • class java.util.Dictionary
      • class java.util.Hashtable (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
        • class java.util.Properties
    • class java.util.EventObject (implements java.io.Serializable)
    • class java.util.Locale (implements java.lang.Cloneable, java.io.Serializable)
    • class java.util.Observable
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class java.util.PropertyPermission
    • class java.util.Random (implements java.io.Serializable)
    • class java.util.ResourceBundle
      • class java.util.ListResourceBundle
      • class java.util.PropertyResourceBundle
    • class java.util.StringTokenizer (implements java.util.Enumeration)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class java.util.ConcurrentModificationException
          • class java.util.EmptyStackException
          • class java.util.MissingResourceException
          • class java.util.NoSuchElementException
        • class java.util.TooManyListenersException
    • class java.util.Timer
    • class java.util.TimerTask (implements java.lang.Runnable)
    • class java.util.TimeZone (implements java.lang.Cloneable, java.io.Serializable)
      • class java.util.SimpleTimeZone

Interface Hierarchy

  • interface java.util.Collection
    • interface java.util.List
    • interface java.util.Set
      • interface java.util.SortedSet
  • interface java.util.Comparator
  • interface java.util.Enumeration
  • interface java.util.EventListener
  • interface java.util.Iterator
    • interface java.util.ListIterator
  • interface java.util.Map
    • interface java.util.SortedMap
  • interface java.util.Map.Entry
  • interface java.util.Observer
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.util

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

See:
Description

Interface Summary
Collection | The root interface in the collection hierarchy.
Comparator | A comparison function, which imposes a total ordering on some collection of objects.
Enumeration | An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener | A tagging interface that all event listener interfaces must extend.
Iterator | An iterator over a collection.
List | An ordered collection (also known as a sequence).
ListIterator | An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.
Map | An object that maps keys to values.
Map.Entry | A map entry (key-value pair).
Observer | A class can implement the Observer interface when it wants to be informed of changes in observable objects.
Set | A collection that contains no duplicate elements.
SortedMap | A map that further guarantees that it will be in ascending key order, sorted according to the natural ordering of its keys (see the Comparable interface), or by a comparator provided at sorted map creation time.
SortedSet | A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time.

Class Summary
AbstractCollection | This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
AbstractList | This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
AbstractMap | This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
AbstractSequentialList | This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
AbstractSet | This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
ArrayList | Resizable-array implementation of the List interface.
Arrays | This class contains various methods for manipulating arrays (such as sorting and searching).
BitSet | This class implements a vector of bits that grows as needed.
Calendar | Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Collections | This class consists exclusively of static methods that operate on or return collections.
Date | The class Date represents a specific instant in time, with millisecond precision.
Dictionary | The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
EventObject | The root class from which all event state objects shall be derived.
GregorianCalendar | GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.
HashMap | Hash table based implementation of the Map interface.
HashSet | This class implements the Set interface, backed by a hash table (actually a HashMap instance).
Hashtable | This class implements a hashtable, which maps keys to values.
LinkedList | Linked list implementation of the List interface.
ListResourceBundle | ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
Locale | A Locale object represents a specific geographical, political, or cultural region.
Observable | This class represents an observable object, or "data" in the model-view paradigm.
Properties | The Properties class represents a persistent set of properties.
PropertyPermission | This class is for property permissions.
PropertyResourceBundle | PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
Random | An instance of this class is used to generate a stream of pseudorandom numbers.
ResourceBundle | Resource bundles contain locale-specific objects.
SimpleTimeZone | SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
Stack | The Stack class represents a last-in-first-out (LIFO) stack of objects.
StringTokenizer | The string tokenizer class allows an application to break a string into tokens.
Timer | A facility for threads to schedule tasks for future execution in a background thread.
TimerTask | A task that can be scheduled for one-time or repeated execution by a Timer.
TimeZone | TimeZone represents a time zone offset, and also figures out daylight savings.
TreeMap | Red-Black tree based implementation of the SortedMap interface.
TreeSet | This class implements the Set interface, backed by a TreeMap instance.
Vector | The Vector class implements a growable array of objects.
WeakHashMap | A hashtable-based Map implementation with weak keys.

Exception Summary
ConcurrentModificationException | This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.
EmptyStackException | Thrown by methods in the Stack class to indicate that the stack is empty.
MissingResourceException | Signals that a resource is missing.
NoSuchElementException | Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.
TooManyListenersException | The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

Package java.util Description

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Package Specification

  • Collections Framework Overview
  • Collections Framework Annotated Outline

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Collections Framework Tutorial
  • Collections Framework Design FAQ

Since:
JDK1.0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.util

Packages that use java.util
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.net | Provides the classes for implementing networking applications.
java.rmi.activation | Provides support for RMI Object Activation.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Classes in java.util used by java.applet
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Locale
A Locale object represents a specific geographical, political, or cultural region.

Classes in java.util used by java.awt
Collection
The root interface in the collection hierarchy.
EmptyStackException
Thrown by methods in the Stack class to indicate that the stack is empty.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Hashtable
This class implements a hashtable, which maps keys to values.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Map
An object that maps keys to values.
Properties
The Properties class represents a persistent set of properties.
ResourceBundle
Resource bundles contain locale-specific objects.
Set
A collection that contains no duplicate elements.

Classes in java.util used by java.awt.datatransfer
Map
An object that maps keys to values.

Classes in java.util used by java.awt.dnd
ArrayList
Resizable-array implementation of the List interface.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Iterator
An iterator over a collection.
List
An ordered collection (also known as a sequence).
TooManyListenersException
The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

Classes in java.util used by java.awt.event
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.

Classes in java.util used by java.awt.font
Map
An object that maps keys to values.

Classes in java.util used by java.awt.im
Locale
A Locale object represents a specific geographical, political, or cultural region.
Map
An object that maps keys to values.

Classes in java.util used by java.awt.im.spi
Locale
A Locale object represents a specific geographical, political, or cultural region.

Classes in java.util used by java.awt.image
Hashtable
This class implements a hashtable, which maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by java.awt.image.renderable
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by java.beans
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.

Classes in java.util used by java.beans.beancontext
ArrayList
Resizable-array implementation of the List interface.
Collection
The root interface in the collection hierarchy.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
HashMap
Hash table based implementation of the Map interface.
Iterator
An iterator over a collection.
Locale
A Locale object represents a specific geographical, political, or cultural region.
TooManyListenersException
The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

Classes in java.util used by java.io
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.

Classes in java.util used by java.lang
Comparator
A comparison function, which imposes a total ordering on some collection of objects.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Properties
The Properties class represents a persistent set of properties.

Classes in java.util used by java.math
Random
An instance of this class is used to generate a stream of pseudorandom numbers.

Classes in java.util used by java.net
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.

Classes in java.util used by java.rmi.activation
Properties
The Properties class represents a persistent set of properties.

Classes in java.util used by java.security
Collection
The root interface in the collection hierarchy.
Date
The class Date represents a specific instant in time, with millisecond precision.
Dictionary
The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Hashtable
This class implements a hashtable, which maps keys to values.
Map
An object that maps keys to values.
Properties
The Properties class represents a persistent set of properties.
Random
An instance of this class is used to generate a stream of pseudorandom numbers.
Set
A collection that contains no duplicate elements.

Classes in java.util used by java.security.acl
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.

Classes in java.util used by java.security.cert
Collection
The root interface in the collection hierarchy.
Date
The class Date represents a specific instant in time, with millisecond precision.
Set
A collection that contains no duplicate elements.

Classes in java.util used by java.sql
Calendar
Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Date
The class Date represents a specific instant in time, with millisecond precision.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Map
An object that maps keys to values.
Properties
The Properties class represents a persistent set of properties.

Classes in java.util used by java.text
Calendar
Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Comparator
A comparison function, which imposes a total ordering on some collection of objects.
Date
The class Date represents a specific instant in time, with millisecond precision.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Map
An object that maps keys to values.
Set
A collection that contains no duplicate elements.
TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.

Classes in java.util used by java.util
AbstractCollection
This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
AbstractList
This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
AbstractMap
This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
AbstractSequentialList
This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
AbstractSet
This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
BitSet
This class implements a vector of bits that grows as needed.
Calendar
Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Collection
The root interface in the collection hierarchy.
Comparator
A comparison function, which imposes a total ordering on some collection of objects.
Date
The class Date represents a specific instant in time, with millisecond precision.
Dictionary
The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Hashtable
This class implements a hashtable, which maps keys to values.
Iterator
An iterator over a collection.
List
An ordered collection (also known as a sequence).
ListIterator
An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Map
An object that maps keys to values.
MissingResourceException
Signals that a resource is missing.
Observable
This class represents an observable object, or "data" in the model-view paradigm.
Observer
A class can implement the Observer interface when it wants to be informed of changes in observable objects.
Properties
The Properties class represents a persistent set of properties.
Random
An instance of this class is used to generate a stream of pseudorandom numbers.
ResourceBundle
Resource bundles contain locale-specific objects.
Set
A collection that contains no duplicate elements.
SortedMap
A map that further guarantees that it will be in ascending key order, sorted according to the natural ordering of its keys (see the Comparable interface), or by a comparator provided at sorted map creation time.
SortedSet
A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time.
TimerTask
A task that can be scheduled for one-time or repeated execution by a Timer.
TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by java.util.jar
Collection
The root interface in the collection hierarchy.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Map
An object that maps keys to values.
Set
A collection that contains no duplicate elements.

Classes in java.util used by java.util.zip
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.

Classes in java.util used by javax.accessibility
ListResourceBundle
ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
Locale
A Locale object represents a specific geographical, political, or cultural region.
ResourceBundle
Resource bundles contain locale-specific objects.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.naming
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Hashtable
This class implements a hashtable, which maps keys to values.
Properties
The Properties class represents a persistent set of properties.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.naming.directory
Hashtable
This class implements a hashtable, which maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.naming.event
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.

Classes in java.util used by javax.naming.ldap
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Hashtable
This class implements a hashtable, which maps keys to values.

Classes in java.util used by javax.naming.spi
Hashtable
This class implements a hashtable, which maps keys to values.

Classes in java.util used by javax.sound.midi
EventListener
A tagging interface that all event listener interfaces must extend.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.sound.sampled
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.

Classes in java.util used by javax.swing
Dictionary
The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Hashtable
This class implements a hashtable, which maps keys to values.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Map
An object that maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.event
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.

Classes in java.util used by javax.swing.plaf.basic
EventListener
A tagging interface that all event listener interfaces must extend.
Hashtable
This class implements a hashtable, which maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.plaf.metal
EventListener
A tagging interface that all event listener interfaces must extend.

Classes in java.util used by javax.swing.plaf.multi
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.table
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
Locale
A Locale object represents a specific geographical, political, or cultural region.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.text
Dictionary
The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.text.html
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.text.html.parser
BitSet
This class implements a vector of bits that grows as needed.
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
Hashtable
This class implements a hashtable, which maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.tree
Enumeration
An object that implements the Enumeration interface generates a series of elements, one at a time.
EventListener
A tagging interface that all event listener interfaces must extend.
EventObject
The root class from which all event state objects shall be derived.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by javax.swing.undo
EventListener
A tagging interface that all event listener interfaces must extend.
Hashtable
This class implements a hashtable, which maps keys to values.
Vector
The Vector class implements a growable array of objects.

Classes in java.util used by org.omg.CORBA
Properties
The Properties class represents a persistent set of properties.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractCollection

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Class AbstractCollection

java.lang.Object
  |
  +--java.util.AbstractCollection
All Implemented Interfaces:
Collection
Direct Known Subclasses:
AbstractList, AbstractSet
public abstract class AbstractCollection
extends Object
implements Collection

This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.

To implement an unmodifiable collection, the programmer needs only to extend this class and provide implementations for the iterator and size methods. (The iterator returned by the iterator method must implement hasNext and next.)

To implement a modifiable collection, the programmer must additionally override this class's add method (which otherwise throws an UnsupportedOperationException), and the iterator returned by the iterator method must additionally implement its remove method.

The programmer should generally provide a void (no argument) and Collection constructor, as per the recommendation in the Collection interface specification.

The documentation for each non-abstract methods in this class describes its implementation in detail. Each of these methods may be overridden if the collection being implemented admits a more efficient implementation.

Since:
1.2
See Also:
Collection

Constructor Summary
protected AbstractCollection()
Sole constructor.
Method Summary
boolean | add(Object o) Ensures that this collection contains the specified element (optional operation).
boolean | addAll(Collection c) Adds all of the elements in the specified collection to this collection (optional operation).
void | clear() Removes all of the elements from this collection (optional operation).
boolean | contains(Object o) Returns true if this collection contains the specified element.
boolean | containsAll(Collection c) Returns true if this collection contains all of the elements in the specified collection.
boolean | isEmpty() Returns true if this collection contains no elements.
abstract Iterator | iterator() Returns an iterator over the elements contained in this collection.
boolean | remove(Object o) Removes a single instance of the specified element from this collection, if it is present (optional operation).
boolean | removeAll(Collection c) Removes from this collection all of its elements that are contained in the specified collection (optional operation).
boolean | retainAll(Collection c) Retains only the elements in this collection that are contained in the specified collection (optional operation).
abstract int | size() Returns the number of elements in this collection.
Object[] | toArray() Returns an array containing all of the elements in this collection.
Object[] | toArray(Object[] a) Returns an array with a runtime type is that of the specified array and that contains all of the elements in this collection.
String | toString() Returns a string representation of this collection.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode

Constructor Detail

AbstractCollection

protected AbstractCollection()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

iterator

public abstract Iterator iterator()
Returns an iterator over the elements contained in this collection.
Specified by:
iterator in interface Collection
Returns:
an iterator over the elements contained in this collection.

size

public abstract int size()
Returns the number of elements in this collection. If the collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
Specified by:
size in interface Collection
Returns:
the number of elements in this collection.

isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.

This implementation returns size() == 0.

Specified by:
isEmpty in interface Collection
Returns:
true if this collection contains no elements.

contains

public boolean contains(Object o)
Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e)).

This implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.

Specified by:
contains in interface Collection
Parameters:
o - object to be checked for containment in this collection.
Returns:
true if this collection contains the specified element.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this collection. If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. The returned array will be "safe" in that no references to it are maintained by the collection. (In other words, this method must allocate a new array even if the collection is backed by an Array). The caller is thus free to modify the returned array.

This implementation allocates the array to be returned, and iterates over the elements in the collection, storing each object reference in the next consecutive element of the array, starting with element 0.

Specified by:
toArray in interface Collection
Returns:
an array containing all of the elements in this collection.

toArray

public Object[] toArray(Object[] a)
Returns an array with a runtime type is that of the specified array and that contains all of the elements in this collection. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.

If the collection fits in the specified array with room to spare (i.e., the array has more elements than the collection), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the collection only if the caller knows that the collection does not contain any null elements.)

If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

This implementation checks if the array is large enough to contain the collection; if not, it allocates a new array of the correct size and type (using reflection). Then, it iterates over the collection, storing each object reference in the next consecutive element of the array, starting with element 0. If the array is larger than the collection, a null is stored in the first location after the end of the collection.

Specified by:
toArray in interface Collection
Parameters:
a - the array into which the elements of the collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the collection.
Throws:
NullPointerException - if the specified array is null.
ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every element in this collection.

add

public boolean add(Object o)
Ensures that this collection contains the specified element (optional operation). Returns true if the collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.) Collections that support this operation may place limitations on what elements may be added to the collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.

This implementation always throws an UnsupportedOperationException.

Specified by:
add in interface Collection
Parameters:
o - element whose presence in this collection is to be ensured.
Returns:
true if the collection changed as a result of the call.
Throws:
UnsupportedOperationException - if the add method is not supported by this collection.
NullPointerException - if this collection does not permit null elements, and the specified element is null.
ClassCastException - if the class of the specified element prevents it from being added to this collection.
IllegalArgumentException - if some aspect of this element prevents it from being added to this collection.

remove

public boolean remove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if the collection contains one or more such elements. Returns true if the collection contained the specified element (or equivalently, if the collection changed as a result of the call).

This implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.

Note that this implementation throws an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method.

Specified by:
remove in interface Collection
Parameters:
o - element to be removed from this collection, if present.
Returns:
true if the collection contained the specified element.
Throws:
UnsupportedOperationException - if the remove method is not supported by this collection.

containsAll

public boolean containsAll(Collection c)
Returns true if this collection contains all of the elements in the specified collection.

This implementation iterates over the specified collection, checking each element returned by the iterator in turn to see if it's contained in this collection. If all elements are so contained true is returned, otherwise false.

Specified by:
containsAll in interface Collection
Parameters:
c - collection to be checked for containment in this collection.
Returns:
true if this collection contains all of the elements in the specified collection.
See Also:
contains(Object)

addAll

public boolean addAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)

This implementation iterates over the specified collection, and adds each object returned by the iterator to this collection, in turn.

Note that this implementation will throw an UnsupportedOperationException unless add is overridden.

Specified by:
addAll in interface Collection
Parameters:
c - collection whose elements are to be added to this collection.
Returns:
true if this collection changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll method is not supported by this collection.
See Also:
add(Object)

removeAll

public boolean removeAll(Collection c)
Removes from this collection all of its elements that are contained in the specified collection (optional operation).

This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's so contained, it's removed from this collection with the iterator's remove method.

Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method.

Specified by:
removeAll in interface Collection
Parameters:
c - elements to be removed from this collection.
Returns:
true if this collection changed as a result of the call.
Throws:
UnsupportedOperationException - removeAll is not supported by this collection.
See Also:
remove(Object), contains(Object)

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.

This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's not so contained, it's removed from this collection with the iterator's remove method.

Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method.

Specified by:
retainAll in interface Collection
Parameters:
c - elements to be retained in this collection.
Returns:
true if this collection changed as a result of the call.
Throws:
UnsupportedOperationException - if the retainAll method is not supported by this collection.
See Also:
remove(Object), contains(Object)

clear

public void clear()
Removes all of the elements from this collection (optional operation). The collection will be empty after this call returns (unless it throws an exception).

This implementation iterates over this collection, removing each element using the Iterator.remove operation. Most implementations will probably choose to override this method for efficiency.

Note that this implementation will throw an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method.

Specified by:
clear in interface Collection
Throws:
UnsupportedOperationException - if the remove method is not supported by this collection.

toString

public String toString()
Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(Object).

This implementation creates an empty string buffer, appends a left square bracket, and iterates over the collection appending the string representation of each element in turn. After appending each element except the last, the string ", " is appended. Finally a right bracket is appended. A string is obtained from the string buffer, and returned.

Overrides:
toString in class Object
Returns:
a string representation of this collection.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AbstractList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class AbstractList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
All Implemented Interfaces:
Collection, List
Direct Known Subclasses:
AbstractSequentialList, ArrayList, Vector
public abstract class AbstractList
extends AbstractCollection
implements List

This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array). For sequential access data (such as a linked list), AbstractSequentialList should be used in preference to this class.

To implement an unmodifiable list, the programmer needs only to extend this class and provide implementations for the get(int index) and size() methods.

To implement a modifiable list, the programmer must additionally override the set(int index, Object element) method (which otherwise throws an UnsupportedOperationException. If the list is variable-size the programmer must additionally override the add(int index, Object element) and remove(int index) methods.

The programmer should generally provide a void (no argument) and collection constructor, as per the recommendation in the Collection interface specification.

Unlike the other abstract collection implementations, the programmer does not have to provide an iterator implementation; the iterator and list iterator are implemented by this class, on top the "random access" methods: get(int index), set(int index, Object element), set(int index, Object element), add(int index, Object element) and remove(int index).

The documentation for each non-abstract methods in this class describes its implementation in detail. Each of these methods may be overridden if the collection being implemented admits a more efficient implementation.

Since:
1.2
See Also:
Collection, List, AbstractSequentialList, AbstractCollection

Field Summary
protected  int modCount
The number of times this list has been structurally modified.
Constructor Summary
protected AbstractList()
Sole constructor.
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list (optional operation).
boolean | add(Object o) Appends the specified element to the end of this List (optional operation).
boolean | addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
void | clear() Removes all of the elements from this collection (optional operation).
boolean | equals(Object o) Compares the specified object with this list for equality.
abstract Object | get(int index) Returns the element at the specified position in this list.
int | hashCode() Returns the hash code value for this list.
int | indexOf(Object o) Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.
Iterator | iterator() Returns an iterator over the elements in this list in proper sequence.
int | lastIndexOf(Object o) Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.
ListIterator | listIterator() Returns an iterator of the elements in this list (in proper sequence).
ListIterator | listIterator(int index) Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
Object | remove(int index) Removes the element at the specified position in this list (optional operation).
protected void | removeRange(int fromIndex, int toIndex) Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
List | subList(int fromIndex, int toIndex) Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray

Field Detail

modCount

protected transient int modCount
The number of times this list has been structurally modified. Structural modifications are those that change the size of the list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.

This field is used by the iterator and list iterator implementation returned by the iterator and listIterator methods. If the value of this field changes unexpectedly, the iterator (or list iterator) will throw a ConcurrentModificationException in response to the next, remove, previous, set or add operations. This provides fail-fast behavior, rather than non-deterministic behavior in the face of concurrent modification during iteration.

Use of this field by subclasses is optional. If a subclass wishes to provide fail-fast iterators (and list iterators), then it merely has to increment this field in its add(int, Object) and remove(int) methods (and any other methods that it overrides that result in structural modifications to the list). A single call to add(int, Object) or remove(int) must add no more than one to this field, or the iterators (and list iterators) will throw bogus ConcurrentModificationExceptions. If an implementation does not wish to provide fail-fast iterators, this field may be ignored.

Constructor Detail

AbstractList

protected AbstractList()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

add

public boolean add(Object o)
Appends the specified element to the end of this List (optional operation).

This implementation calls add(size(), o).

Note that this implementation throws an UnsupportedOperationException unless add(int, Object) is overridden.

Specified by:
add in interface List
Overrides:
add in class AbstractCollection
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of Collection.add).
Throws:
UnsupportedOperationException - if the add method is not supported by this Set.
ClassCastException - if the class of the specified element prevents it from being added to this set.
IllegalArgumentException - some aspect of this element prevents it from being added to this collection.

get

public abstract Object get(int index)
Returns the element at the specified position in this list.
Specified by:
get in interface List
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if the given index is out of range (index < 0 || index >= size()).

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element (optional operation).

This implementation always throws an UnsupportedOperationException.

Specified by:
set in interface List
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
UnsupportedOperationException - if the set method is not supported by this List.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

This implementation always throws an UnsupportedOperationException.

Specified by:
add in interface List
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
UnsupportedOperationException - if the add method is not supported by this list.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - index is out of range (index < 0 || index > size()).

remove

public Object remove(int index)
Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

This implementation always throws an UnsupportedOperationException.

Specified by:
remove in interface List
Parameters:
index - the index of the element to remove.
Returns:
the element previously at the specified position.
Throws:
UnsupportedOperationException - if the remove method is not supported by this list.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

indexOf

public int indexOf(Object o)
Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

This implementation first gets a list iterator (with listIterator()). Then, it iterates over the list until the specified element is found or the end of the list is reached.

Specified by:
indexOf in interface List
Parameters:
o - element to search for.
Returns:
the index in this List of the first occurence of the specified element, or -1 if the List does not contain this element.

lastIndexOf

public int lastIndexOf(Object o)
Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

This implementation first gets a list iterator that points to the end of the list (with listIterator(size())). Then, it iterates backwards over the list until the specified element is found, or the beginning of the list is reached.

Specified by:
lastIndexOf in interface List
Parameters:
o - element to search for.
Returns:
the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.

clear

public void clear()
Removes all of the elements from this collection (optional operation). The collection will be empty after this call returns (unless it throws an exception).

This implementation calls removeRange(0, size()).

Note that this implementation throws an UnsupportedOperationException unless remove(int index) or removeRange(int fromIndex, int toIndex) is overridden.

Specified by:
clear in interface List
Overrides:
clear in class AbstractCollection
Throws:
UnsupportedOperationException - if the clear method is not supported by this Collection.

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

This implementation gets an iterator over the specified collection and iterates over it, inserting the elements obtained from the iterator into this list at the appropriate position, one at a time, using add(int, Object). Many implementations will override this method for efficiency.

Note that this implementation throws an UnsupportedOperationException unless add(int, Object) is overridden.

Specified by:
addAll in interface List
Parameters:
index - index at which to insert the first element from the specified collection.
c - elements to be inserted into this List.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll method is not supported by this list.
ClassCastException - if the class of an element of the specified collection prevents it from being added to this List.
IllegalArgumentException - some aspect an element of the specified collection prevents it from being added to this List.
IndexOutOfBoundsException - index out of range (index < 0 || index > size()).

iterator

public Iterator iterator()
Returns an iterator over the elements in this list in proper sequence.

This implementation returns a straightforward implementation of the iterator interface, relying on the backing list's size(), get(int), and remove(int) methods.

Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method unless the list's remove(int) method is overridden.

This implementation can be made to throw runtime exceptions in the face of concurrent modification, as described in the specification for the (protected) modCount field.

Specified by:
iterator in interface List
Overrides:
iterator in class AbstractCollection
Returns:
an iterator over the elements in this list in proper sequence.
See Also:
modCount

listIterator

public ListIterator listIterator()
Returns an iterator of the elements in this list (in proper sequence). This implementation returns listIterator(0).
Specified by:
listIterator in interface List
Returns:
an iterator of the elements in this list (in proper sequence).
See Also:
listIterator(int)

listIterator

public ListIterator listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to the next method. An initial call to the previous method would return the element with the specified index minus one.

This implementation returns a straightforward implementation of the ListIterator interface that extends the implementation of the Iterator interface returned by the iterator() method. The ListIterator implementation relies on the backing list's get(int), set(int, Object), add(int, Object) and remove(int) methods.

Note that the list iterator returned by this implementation will throw an UnsupportedOperationException in response to its remove, set and add methods unless the list's remove(int), set(int, Object), and add(int, Object) methods are overridden.

This implementation can be made to throw runtime exceptions in the face of concurrent modification, as described in the specification for the (protected) modCount field.

Specified by:
listIterator in interface List
Parameters:
index - index of the first element to be returned from the list iterator (by a call to the next method).
Returns:
a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).
See Also:
modCount

subList

public List subList(int fromIndex,
                    int toIndex)
Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list.

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by operating on a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:

     list.subList(from, to).clear();
Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.

The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of the list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

This implementation returns a list that subclasses AbstractList. The subclass stores, in private fields, the offset of the subList within the backing list, the size of the subList (which can change over its lifetime), and the expected modCount value of the backing list.

The subclass's set(int, Object), get(int), add(int, Object), remove(int), addAll(int, Collection) and removeRange(int, int) methods all delegate to the corresponding methods on the backing abstract list, after bounds-checking the index and adjusting for the offset. The addAll(Collection c) method merely returns addAll(size, c).

The listIterator(int) method returns a "wrapper object" over a list iterator on the backing list, which is created with the corresponding method on the backing list. The iterator method merely returns listIterator(), and the size method merely returns the subclass's size field.

All methods first check to see if the actual modCount of the backing list is equal to its expected value, and throw a ConcurrentModificationException if it is not.

Specified by:
subList in interface List
Parameters:
fromIndex - low endpoint (inclusive) of the subList.
toIndex - high endpoint (exclusive) of the subList.
Returns:
a view of the specified range within this list.
Throws:
IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)

equals

public boolean equals(Object o)
Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if (e1==null ? e2==null : e1.equals(e2)).) In other words, two lists are defined to be equal if they contain the same elements in the same order.

This implementation first checks if the specified object is this list. If so, it returns true; if not, it checks if the specified object is a list. If not, it returns false; if so, it iterates over both lists, comparing corresponding pairs of elements. If any comparison returns false, this method returns false. If either iterator runs out of elements before the other it returns false (as the lists are of unequal length); otherwise it returns true when the iterations complete.

Specified by:
equals in interface List
Overrides:
equals in class Object
Parameters:
o - the object to be compared for equality with this list.
Returns:
true if the specified object is equal to this list.

hashCode

public int hashCode()
Returns the hash code value for this list.

This implementation uses exactly the code that is used to define the list hash function in the documentation for the List.hashCode method.

Specified by:
hashCode in interface List
Overrides:
hashCode in class Object
Returns:
the hash code value for this list.

removeRange

protected void removeRange(int fromIndex,
                           int toIndex)
Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

This method is called by the clear operation on this list and its subLists. Overriding this method to take advantage of the internals of the list implementation can substantially improve the performance of the clear operation on this list and its subLists.

This implementation gets a list iterator positioned before fromIndex, and repeatedly calls ListIterator.next followed by ListIterator.remove until the entire range has been removed. Note: if ListIterator.remove requires linear time, this implementation requires quadratic time.

Parameters:
fromIndex - index of first element to be removed.
toIndex - index after last element to be removed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class AbstractMap

java.lang.Object
  |
  +--java.util.AbstractMap
All Implemented Interfaces:
Map
Direct Known Subclasses:
HashMap, TreeMap, WeakHashMap
public abstract class AbstractMap
extends Object
implements Map

This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.

To implement an unmodifiable map, the programmer needs only to extend this class and provide an implementation for the entrySet method, which returns a set-view of the map's mappings. Typically, the returned set will, in turn, be implemented atop AbstractSet. This set should not support the add or remove methods, and its iterator should not support the remove method.

To implement a modifiable map, the programmer must additionally override this class's put method (which otherwise throws an UnsupportedOperationException), and the iterator returned by entrySet().iterator() must additionally implement its remove method.

The programmer should generally provide a void (no argument) and map constructor, as per the recommendation in the Map interface specification.

The documentation for each non-abstract methods in this class describes its implementation in detail. Each of these methods may be overridden if the map being implemented admits a more efficient implementation.

Since:
1.2
See Also:
Map, Collection

Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
protected AbstractMap()
Sole constructor.
Method Summary
void | clear() Removes all mappings from this map (optional operation).
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | containsValue(Object value) Returns true if this map maps one or more keys to this value.
abstract Set | entrySet() Returns a set view of the mappings contained in this map.
boolean | equals(Object o) Compares the specified object with this map for equality.
Object | get(Object key) Returns the value to which this map maps the specified key.
int | hashCode() Returns the hash code value for this map.
boolean | isEmpty() Returns true if this map contains no key-value mappings.
Set | keySet() Returns a Set view of the keys contained in this map.
Object | put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
void | putAll(Map t) Copies all of the mappings from the specified map to this map (optional operation).
Object | remove(Object key) Removes the mapping for this key from this map if present (optional operation).
int | size() Returns the number of key-value mappings in this map.
String | toString() Returns a string representation of this map.
Collection | values() Returns a collection view of the values contained in this map.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractMap

protected AbstractMap()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

size

public int size()
Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

This implementation returns entrySet().size().

Specified by:
size in interface Map
Returns:
the number of key-value mappings in this map.

isEmpty

public boolean isEmpty()
Returns true if this map contains no key-value mappings.

This implementation returns size() == 0.

Specified by:
isEmpty in interface Map
Returns:
true if this map contains no key-value mappings.

containsValue

public boolean containsValue(Object value)
Returns true if this map maps one or more keys to this value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)). This operation will probably require time linear in the map size for most implementations of map.

This implementation iterates over entrySet() searching for an entry with the specified value. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map.

Specified by:
containsValue in interface Map
Parameters:
value - value whose presence in this map is to be tested.
Returns:
true if this map maps one or more keys to this value.

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Specified by:
containsKey in interface Map
Parameters:
key - key whose presence in this map is to be tested.
Returns:
true if this map contains a mapping for the specified key.
Throws:
ClassCastException - if the specified key is of an inappropriate type for this map.
NullPointerException - key is null and this map does not not permit null keys.

get

public Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, the entry's value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Specified by:
get in interface Map
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key.
Throws:
ClassCastException - if the specified key is of an inappropriate type for this map.
NullPointerException - if the key is null and this map does not not permit null keys.
See Also:
containsKey(Object)

put

public Object put(Object key,
                  Object value)
Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for this key, the old value is replaced.

This implementation always throws an UnsupportedOperationException.

Specified by:
put in interface Map
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.)
Throws:
UnsupportedOperationException - if the put operation is not supported by this map.
ClassCastException - if the class of the specified key or value prevents it from being stored in this map.
IllegalArgumentException - if some aspect of this key or value * prevents it from being stored in this map.
NullPointerException - this map does not permit null keys or values, and the specified key or value is null.

remove

public Object remove(Object key)
Removes the mapping for this key from this map if present (optional operation).

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, its value is obtained with its getValue operation, the entry is is removed from the Collection (and the backing map) with the iterator's remove operation, and the saved value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Specified by:
remove in interface Map
Parameters:
key - key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or null if there was no entry for key. (A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.)
Throws:
UnsupportedOperationException - if the remove operation is not supported by this map.

putAll

public void putAll(Map t)
Copies all of the mappings from the specified map to this map (optional operation). These mappings will replace any mappings that this map had for any of the keys currently in the specified map.

This implementation iterates over the specified map's entrySet() collection, and calls this map's put operation once for each entry returned by the iteration.

Specified by:
putAll in interface Map
Parameters:
t - mappings to be stored in this map.
Throws:
UnsupportedOperationException - if the putAll operation is not supported by this map.
ClassCastException - if the class of a key or value in the specified map prevents it from being stored in this map.
IllegalArgumentException - if some aspect of a key or value in the specified map prevents it from being stored in this map.
NullPointerException - this map does not permit null keys or values, and the specified key or value is null.

clear

public void clear()
Removes all mappings from this map (optional operation).

This implementation calls entrySet().clear().

Specified by:
clear in interface Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

keySet

public Set keySet()
Returns a Set view of the keys contained in this map. The Set is backed by the map, so changes to the map are reflected in the Set, and vice-versa. (If the map is modified while an iteration over the Set is in progress, the results of the iteration are undefined.) The Set supports element removal, which removes the corresponding entry from the map, via the Iterator.remove, Set.remove, removeAll retainAll, and clear operations. It does not support the add or addAll operations.

This implementation returns a Set that subclasses AbstractSet. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsKey method.

The Set is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same Set.

Specified by:
keySet in interface Map
Returns:
a Set view of the keys contained in this map.

values

public Collection values()
Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. (If the map is modified while an iteration over the collection is in progress, the results of the iteration are undefined.) The collection supports element removal, which removes the corresponding entry from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.

This implementation returns a collection that subclasses abstract collection. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsValue method.

The collection is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same Collection.

Specified by:
values in interface Map
Returns:
a collection view of the values contained in this map.

entrySet

public abstract Set entrySet()
Returns a set view of the mappings contained in this map. Each element in this set is a Map.Entry. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. (If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined.) The set supports element removal, which removes the corresponding entry from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Specified by:
entrySet in interface Map
Returns:
a set view of the mappings contained in this map.

equals

public boolean equals(Object o)
Compares the specified object with this map for equality. Returns true if the given object is also a map and the two maps represent the same mappings. More formally, two maps t1 and t2 represent the same mappings if t1.keySet().equals(t2.keySet()) and for every key k in t1.keySet(), (t1.get(k)==null ? t2.get(k)==null : t1.get(k).equals(t2.get(k))) . This ensures that the equals method works properly across different implementations of the map interface.

This implementation first checks if the specified object is this map; if so it returns true. Then, it checks if the specified object is a map whose size is identical to the size of this set; if not, it it returns false. If so, it iterates over this map's entrySet collection, and checks that the specified map contains each mapping that this map contains. If the specified map fails to contain such a mapping, false is returned. If the iteration completes, true is returned.

Specified by:
equals in interface Map
Overrides:
equals in class Object
Parameters:
o - object to be compared for equality with this map.
Returns:
true if the specified object is equal to this map.

hashCode

public int hashCode()
Returns the hash code value for this map. The hash code of a map is defined to be the sum of the hash codes of each entry in the map's entrySet() view. This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two maps t1 and t2, as required by the general contract of Object.hashCode.

This implementation iterates over entrySet(), calling hashCode on each element (entry) in the Collection, and adding up the results.

Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object
Returns:
the hash code value for this map.
See Also:
Map.Entry.hashCode(),
Object.hashCode(),
Object.equals(Object),
Set.equals(Object)

toString

public String toString()
Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map's entrySet view's iterator, enclosed in braces ("{}"). Adjacent mappings are separated by the characters ", " (comma and space). Each key-value mapping is rendered as the key followed by an equals sign ("=") followed by the associated value. Keys and values are converted to strings as by String.valueOf(Object).

This implementation creates an empty string buffer, appends a left brace, and iterates over the map's entrySet view, appending the string representation of each map.entry in turn. After appending each entry except the last, the string ", " is appended. Finally a right brace is appended. A string is obtained from the stringbuffer, and returned.

Overrides:
toString in class Object
Returns:
a String representation of this map.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractSequentialList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class AbstractSequentialList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
All Implemented Interfaces:
Collection, List
Direct Known Subclasses:
LinkedList
public abstract class AbstractSequentialList
extends AbstractList

This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list). For random access data (such as an array), AbstractList should be used in preference to this class.

This class is the opposite of the AbstractList class in the sense that it implements the "random access" methods (get(int index), set(int index, Object element), set(int index, Object element), add(int index, Object element) and remove(int index)) on top of the list's list iterator, instead of the other way around.

To implement a list the programmer needs only to extend this class and provide implementations for the listIterator and size methods. For an unmodifiable list, the programmer need only implement the list iterator's hasNext, next, hasPrevious, previous and index methods.

For a modifiable list the programmer should additionally implement the list iterator's set method. For a variable-size list the programmer should additionally implement the list iterator's remove and add methods.

The programmer should generally provide a void (no argument) and collection constructor, as per the recommendation in the Collection interface specification.

Since:
1.2
See Also:
Collection, List, AbstractList, AbstractCollection

Fields inherited from class java.util.AbstractList
modCount
Constructor Summary
protected AbstractSequentialList()
Sole constructor.
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list.
boolean | addAll(int index, Collection c) Inserts all of the elements in in the specified collection into this list at the specified position.
Object | get(int index) Returns the element at the specified position in this list.
Iterator | iterator() Returns an iterator over the elements in this list (in proper sequence).
abstract ListIterator | listIterator(int index) Returns a list iterator over the elements in this list (in proper sequence).
Object | remove(int index) Removes the element at the specified position in this list.
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray

Constructor Detail

AbstractSequentialList

protected AbstractSequentialList()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

get

public Object get(int index)
Returns the element at the specified position in this list.

This implementation first gets a list iterator pointing to the indexed element (with listIterator(index)). Then, it gets the element using ListIterator.next and returns it.

Overrides:
get in class AbstractList
Returns:
the element at the specified position in this list. * @param index index of element to return. * @throws IndexOutOfBoundsException if the specified index is out of range (index < 0 || index >= size()).

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element.

This implementation first gets a list iterator pointing to the indexed element (with listIterator(index)). Then, it gets the current element using ListIterator.next and replaces it with ListIterator.set.

Note that this implementation will throw an UnsupportedOperationException if list iterator does not implement the set operation.

Overrides:
set in class AbstractList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
UnsupportedOperationException - set is not supported by this list.
NullPointerException - this list does not permit null elements and one of the elements of c is null.
ClassCastException - class of the specified element prevents it from being added to this list.
IllegalArgumentException - some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
IllegalArgumentException - fromIndex > toIndex.

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

This implementation first gets a list iterator pointing to the indexed element (with listIterator(index)). Then, it inserts the specified element with ListIterator.add.

Note that this implementation will throw an UnsupportedOperationException if list iterator does not implement the add operation.

Overrides:
add in class AbstractList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
UnsupportedOperationException - if the add operation is not supported by this list.
NullPointerException - this list does not permit null elements and one of the elements of c is null.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

remove

public Object remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).

This implementation first gets a list iterator pointing to the indexed element (with listIterator(index)). Then, it removes the element with ListIterator.remove.

Note that this implementation will throw an UnsupportedOperationException if list iterator does not implement the remove operation.

Overrides:
remove in class AbstractList
Parameters:
index - index of the element to be removed from the List.
Returns:
the element that was removed from the list.
Throws:
UnsupportedOperationException - if the remove operation is not supported by this list.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in in the specified collection into this list at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.) Optional operation.

This implementation gets an iterator over the specified collection and a list iterator over this list pointing to the indexed element (with listIterator(index)). Then, it iterates over the specified collection, inserting the elements obtained from the iterator into this list, one at a time, using ListIterator.add followed by ListIterator.next (to skip over the added element).

Note that this implementation will throw an UnsupportedOperationException if the list iterator returned by the listIterator method does not implement the add operation.

Overrides:
addAll in class AbstractList
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll operation is not supported by this list.
NullPointerException - this list does not permit null elements and one of the elements of the specified collection is null.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

iterator

public Iterator iterator()
Returns an iterator over the elements in this list (in proper sequence).

This implementation merely returns a list iterator over the list.

Overrides:
iterator in class AbstractList
Returns:
an iterator over the elements in this list (in proper sequence).

listIterator

public abstract ListIterator listIterator(int index)
Returns a list iterator over the elements in this list (in proper sequence).
Overrides:
listIterator in class AbstractList
Returns:
a list iterator over the elements in this list (in proper sequence).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class AbstractSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
All Implemented Interfaces:
Collection, Set
Direct Known Subclasses:
HashSet, TreeSet
public abstract class AbstractSet
extends AbstractCollection
implements Set

This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.

The process of implementing a set by extending this class is identical to that of implementing a Collection by extending AbstractCollection, except that all of the methods and constructors in subclasses of this class must obey the additional constraints imposed by the Set interface (for instance, the add method must not permit addition of multiple intances of an object to a set).

Note that this class does not override any of the implementations from the AbstractCollection class. It merely adds implementations for equals and hashCode.

Since:
1.2
See Also:
Collection, AbstractCollection, Set

Constructor Summary
protected AbstractSet()
Sole constructor.
Method Summary
boolean | equals(Object o) Compares the specified object with this set for equality.
int | hashCode() Returns the hash code value for this set.
boolean | removeAll(Collection c) Removes from this set all of its elements that are contained in the specified collection (optional operation).
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray

Constructor Detail

AbstractSet

protected AbstractSet()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

equals

public boolean equals(Object o)
Compares the specified object with this set for equality. Returns true if the given object is also a set, the two sets have the same size, and every member of the given set is contained in this set. This ensures that the equals method works properly across different implementations of the Set interface.

This implementation first checks if the specified object is this set; if so it returns true. Then, it checks if the specified object is a set whose size is identical to the size of this set; if not, it it returns false. If so, it returns containsAll((Collection) o).

Specified by:
equals in interface Set
Overrides:
equals in class Object
Parameters:
o - Object to be compared for equality with this set.
Returns:
true if the specified object is equal to this set.

hashCode

public int hashCode()
Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of Object.hashCode.

This implementation enumerates over the set, calling the hashCode method on each element in the collection, and adding up the results.

Specified by:
hashCode in interface Set
Overrides:
hashCode in class Object
Returns:
the hash code value for this set.

removeAll

public boolean removeAll(Collection c)
Removes from this set all of its elements that are contained in the specified collection (optional operation).

This implementation determines which is the smaller of this set and the specified collection, by invoking the size method on each. If this set has fewer elements, then the implementation iterates over this set, checking each element returned by the iterator in turn to see if it is contained in the specified collection. If it is so contained, it is removed from this set with the iterator's remove method. If the specified collection has fewer elements, then the implementation iterates over the specified collection, removing from this set each element returned by the iterator, using this set's remove method.

Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method.

Specified by:
removeAll in interface Set
Overrides:
removeAll in class AbstractCollection
Parameters:
c - elements to be removed from this set.
Returns:
true if this set changed as a result of the call.
Throws:
UnsupportedOperationException - removeAll is not supported by this set.
See Also:
AbstractCollection.remove(Object), AbstractCollection.contains(Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArrayList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class ArrayList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
All Implemented Interfaces:
Cloneable, Collection, List, Serializable
public class ArrayList
extends AbstractList
implements List, Cloneable, Serializable

Resizable-array implementation of the List interface. Implements all optional list operations, and permits all elements, including null. In addition to implementing the List interface, this class provides methods to manipulate the size of the array that is used internally to store the list. (This class is roughly equivalent to Vector, except that it is unsynchronized.)

The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.

Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. As elements are added an ArrayList, its capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an element has constant amortized time cost.

An application can increase the capacity of an ArrayList instance before adding a large number of elements using the ensureCapacity operation. This may reduce the amount of incremental reallocation.

Note that this implementation is not synchronized. If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. If no such object exists, the list should be "wrapped" using the Collections.synchronizedList method. This is best done at creation time, to prevent accidental unsynchronized access to the list:

    List list = Collections.synchronizedList(new ArrayList(...));

The iterators returned by this class's iterator and listIterator methods are fail-fast: if list is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Collection, List, LinkedList, Vector, Collections.synchronizedList(List), Serialized Form

Fields inherited from class java.util.AbstractList
modCount
Constructor Summary
ArrayList()
Constructs an empty list.
ArrayList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
ArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list.
boolean | add(Object o) Appends the specified element to the end of this list.
boolean | addAll(Collection c) Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator.
boolean | addAll(int index, Collection c) Inserts all of the elements in the specified Collection into this list, starting at the specified position.
void | clear() Removes all of the elements from this list.
Object | clone() Returns a shallow copy of this ArrayList instance.
boolean | contains(Object elem) Returns true if this list contains the specified element.
void | ensureCapacity(int minCapacity) Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
Object | get(int index) Returns the element at the specified position in this list.
int | indexOf(Object elem) Searches for the first occurence of the given argument, testing for equality using the equals method.
boolean | isEmpty() Tests if this list has no elements.
int | lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this list.
Object | remove(int index) Removes the element at the specified position in this list.
protected void | removeRange(int fromIndex, int toIndex) Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
int | size() Returns the number of elements in this list.
Object[] | toArray() Returns an array containing all of the elements in this list in the correct order.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
void | trimToSize() Trims the capacity of this ArrayList instance to be the list's current size.
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList

Constructor Detail

ArrayList

public ArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
Parameters:
initialCapacity - the initial capacity of the list.
Throws:
IllegalArgumentException - if the specified initial capacity is negative

ArrayList

public ArrayList()
Constructs an empty list.

ArrayList

public ArrayList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. The ArrayList instance has an initial capacity of 110% the size of the specified collection.
Parameters:
c - the collection whose elements are to be placed into this list.
Method Detail

trimToSize

public void trimToSize()
Trims the capacity of this ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.

ensureCapacity

public void ensureCapacity(int minCapacity)
Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
Parameters:
minCapacity - the desired minimum capacity.

size

public int size()
Returns the number of elements in this list.
Specified by:
size in interface List
Overrides:
size in class AbstractCollection
Returns:
the number of elements in this list.

isEmpty

public boolean isEmpty()
Tests if this list has no elements.
Specified by:
isEmpty in interface List
Overrides:
isEmpty in class AbstractCollection
Returns:
true if this list has no elements; false otherwise.

contains

public boolean contains(Object elem)
Returns true if this list contains the specified element.
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection
Parameters:
elem - element whose presence in this List is to be tested.

indexOf

public int indexOf(Object elem)
Searches for the first occurence of the given argument, testing for equality using the equals method.
Specified by:
indexOf in interface List
Overrides:
indexOf in class AbstractList
Parameters:
elem - an object.
Returns:
the index of the first occurrence of the argument in this list; returns -1 if the object is not found.
See Also:
Object.equals(Object)

lastIndexOf

public int lastIndexOf(Object elem)
Returns the index of the last occurrence of the specified object in this list.
Specified by:
lastIndexOf in interface List
Overrides:
lastIndexOf in class AbstractList
Parameters:
elem - the desired element.
Returns:
the index of the last occurrence of the specified object in this list; returns -1 if the object is not found.

clone

public Object clone()
Returns a shallow copy of this ArrayList instance. (The elements themselves are not copied.)
Overrides:
clone in class Object
Returns:
a clone of this ArrayList instance.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this list in the correct order.
Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Returns:
an array containing all of the elements in this list in the correct order.

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this list in the correct order. The runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.

If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.

Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the list.
Throws:
ArrayStoreException - if the runtime type of a is not a supertype of the runtime type of every element in this list.

get

public Object get(int index)
Returns the element at the specified position in this list.
Specified by:
get in interface List
Overrides:
get in class AbstractList
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size()).

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element.
Specified by:
set in interface List
Overrides:
set in class AbstractList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
IndexOutOfBoundsException - if index out of range (index < 0 || index >= size()).

add

public boolean add(Object o)
Appends the specified element to the end of this list.
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of Collection.add).

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index > size()).

remove

public Object remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index - the index of the element to removed.
Returns:
the element that was removed from the list.
Throws:
IndexOutOfBoundsException - if index out of range (index < 0 || index >= size()).

clear

public void clear()
Removes all of the elements from this list. The list will be empty after this call returns.
Specified by:
clear in interface List
Overrides:
clear in class AbstractList
Following copied from interface: java.util.List
Throws:
UnsupportedOperationException - if the clear method is not supported by this list.

addAll

public boolean addAll(Collection c)
Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractCollection
Parameters:
c - the elements to be inserted into this list.
Throws:
IndexOutOfBoundsException - if index out of range (index < 0 || index > size()).

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in the specified Collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified Collection's iterator.
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractList
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.
Throws:
IndexOutOfBoundsException - if index out of range (index < 0 || index > size()).

removeRange

protected void removeRange(int fromIndex,
                           int toIndex)
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)
Overrides:
removeRange in class AbstractList
Parameters:
fromIndex - index of first element to be removed.
toIndex - index after last element to be removed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Arrays

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Arrays

java.lang.Object
  |
  +--java.util.Arrays
public class Arrays
extends Object

This class contains various methods for manipulating arrays (such as sorting and searching). It also contains a static factory that allows arrays to be viewed as lists.

The documentation for the sorting and searching methods contained in this class includes briefs description of the implementations. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort(Object[]) does not have to be a mergesort, but it does have to be stable.)

Since:
1.2
See Also:
Comparable, Comparator

Method Summary
static List | asList(Object[] a) Returns a fixed-size list backed by the specified array.
static int | binarySearch(byte[] a, byte key) Searches the specified array of bytes for the specified value using the binary search algorithm.
static int | binarySearch(char[] a, char key) Searches the specified array of chars for the specified value using the binary search algorithm.
static int | binarySearch(double[] a, double key) Searches the specified array of doubles for the specified value using the binary search algorithm.
static int | binarySearch(float[] a, float key) Searches the specified array of floats for the specified value using the binary search algorithm.
static int | binarySearch(int[] a, int key) Searches the specified array of ints for the specified value using the binary search algorithm.
static int | binarySearch(long[] a, long key) Searches the specified array of longs for the specified value using the binary search algorithm.
static int | binarySearch(Object[] a, Object key) Searches the specified array for the specified object using the binary search algorithm.
static int | binarySearch(Object[] a, Object key, Comparator c) Searches the specified array for the specified object using the binary search algorithm.
static int | binarySearch(short[] a, short key) Searches the specified array of shorts for the specified value using the binary search algorithm.
static boolean | equals(boolean[] a, boolean[] a2) Returns true if the two specified arrays of equals are equal to one another.
static boolean | equals(byte[] a, byte[] a2) Returns true if the two specified arrays of bytes are equal to one another.
static boolean | equals(char[] a, char[] a2) Returns true if the two specified arrays of chars are equal to one another.
static boolean | equals(double[] a, double[] a2) Returns true if the two specified arrays of doubles are equal to one another.
static boolean | equals(float[] a, float[] a2) Returns true if the two specified arrays of floats are equal to one another.
static boolean | equals(int[] a, int[] a2) Returns true if the two specified arrays of ints are equal to one another.
static boolean | equals(long[] a, long[] a2) Returns true if the two specified arrays of longs are equal to one another.
static boolean | equals(Object[] a, Object[] a2) Returns true if the two specified arrays of Objects are equal to one another.
static boolean | equals(short[] a, short[] a2) Returns true if the two specified arrays of shorts are equal to one another.
static void | fill(boolean[] a, boolean val) Assigns the specified boolean value to each element of the specified array of booleans.
static void | fill(boolean[] a, int fromIndex, int toIndex, boolean val) Assigns the specified boolean value to each element of the specified range of the specified array of booleans.
static void | fill(byte[] a, byte val) Assigns the specified byte value to each element of the specified array of bytes.
static void | fill(byte[] a, int fromIndex, int toIndex, byte val) Assigns the specified byte value to each element of the specified range of the specified array of bytes.
static void | fill(char[] a, char val) Assigns the specified char value to each element of the specified array of chars.
static void | fill(char[] a, int fromIndex, int toIndex, char val) Assigns the specified char value to each element of the specified range of the specified array of chars.
static void | fill(double[] a, double val) Assigns the specified double value to each element of the specified array of doubles.
static void | fill(double[] a, int fromIndex, int toIndex, double val) Assigns the specified double value to each element of the specified range of the specified array of doubles.
static void | fill(float[] a, float val) Assigns the specified float value to each element of the specified array of floats.
static void | fill(float[] a, int fromIndex, int toIndex, float val) Assigns the specified float value to each element of the specified range of the specified array of floats.
static void | fill(int[] a, int val) Assigns the specified int value to each element of the specified array of ints.
static void | fill(int[] a, int fromIndex, int toIndex, int val) Assigns the specified int value to each element of the specified range of the specified array of ints.
static void | fill(long[] a, int fromIndex, int toIndex, long val) Assigns the specified long value to each element of the specified range of the specified array of longs.
static void | fill(long[] a, long val) Assigns the specified long value to each element of the specified array of longs.
static void | fill(Object[] a, int fromIndex, int toIndex, Object val) Assigns the specified Object reference to each element of the specified range of the specified array of Objects.
static void | fill(Object[] a, Object val) Assigns the specified Object reference to each element of the specified array of Objects.
static void | fill(short[] a, int fromIndex, int toIndex, short val) Assigns the specified short value to each element of the specified range of the specified array of shorts.
static void | fill(short[] a, short val) Assigns the specified short value to each element of the specified array of shorts.
static void | sort(byte[] a) Sorts the specified array of bytes into ascending numerical order.
static void | sort(byte[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of bytes into ascending numerical order.
static void | sort(char[] a) Sorts the specified array of chars into ascending numerical order.
static void | sort(char[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of chars into ascending numerical order.
static void | sort(double[] a) Sorts the specified array of doubles into ascending numerical order.
static void | sort(double[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of doubles into ascending numerical order.
static void | sort(float[] a) Sorts the specified array of floats into ascending numerical order.
static void | sort(float[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of floats into ascending numerical order.
static void | sort(int[] a) Sorts the specified array of ints into ascending numerical order.
static void | sort(int[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of ints into ascending numerical order.
static void | sort(long[] a) Sorts the specified array of longs into ascending numerical order.
static void | sort(long[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of longs into ascending numerical order.
static void | sort(Object[] a) Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.
static void | sort(Object[] a, Comparator c) Sorts the specified array of objects according to the order induced by the specified comparator.
static void | sort(Object[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.
static void | sort(Object[] a, int fromIndex, int toIndex, Comparator c) Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static void | sort(short[] a) Sorts the specified array of shorts into ascending numerical order.
static void | sort(short[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of shorts into ascending numerical order.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

sort

public static void sort(long[] a)
Sorts the specified array of longs into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(long[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of longs into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(int[] a)
Sorts the specified array of ints into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(int[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of ints into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(short[] a)
Sorts the specified array of shorts into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(short[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of shorts into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(char[] a)
Sorts the specified array of chars into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(char[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of chars into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(byte[] a)
Sorts the specified array of bytes into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(byte[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of bytes into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(double[] a)
Sorts the specified array of doubles into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(double[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of doubles into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(float[] a)
Sorts the specified array of floats into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.
Parameters:
a - the array to be sorted.

sort

public static void sort(float[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of floats into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)

The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

sort

public static void sort(Object[] a)
Sorts the specified array of objects into ascending order, according to the natural ordering of its elements. All elements in the array must implement the Comparable interface. Furthermore, all elements in the array must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the array).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists.

Parameters:
a - the array to be sorted.
Throws:
ClassCastException - if the array contains elements that are not mutually comparable (for example, strings and integers).
See Also:
Comparable

sort

public static void sort(Object[] a,
                        int fromIndex,
                        int toIndex)
Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.) All elements in this range must implement the Comparable interface. Furthermore, all elements in this range must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the array).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length
ClassCastException - if the array contains elements that are not mutually comparable (for example, strings and integers).
See Also:
Comparable

sort

public static void sort(Object[] a,
                        Comparator c)
Sorts the specified array of objects according to the order induced by the specified comparator. All elements in the array must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the array).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists.

Parameters:
a - the array to be sorted.
c - the comparator to determine the order of the array. A null value indicates that the elements' natural ordering should be used.
Throws:
ClassCastException - if the array contains elements that are not mutually comparable using the specified comparator.
See Also:
Comparator

sort

public static void sort(Object[] a,
                        int fromIndex,
                        int toIndex,
                        Comparator c)
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.) All elements in the range must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the range).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists.

Parameters:
a - the array to be sorted.
fromIndex - the index of the first element (inclusive) to be sorted.
toIndex - the index of the last element (exclusive) to be sorted.
c - the comparator to determine the order of the array. A null value indicates that the elements' natural ordering should be used.
Throws:
ClassCastException - if the array contains elements that are not mutually comparable using the specified comparator.
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length
See Also:
Comparator

binarySearch

public static int binarySearch(long[] a,
                               long key)
Searches the specified array of longs for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(long[])

binarySearch

public static int binarySearch(int[] a,
                               int key)
Searches the specified array of ints for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(int[])

binarySearch

public static int binarySearch(short[] a,
                               short key)
Searches the specified array of shorts for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(short[])

binarySearch

public static int binarySearch(char[] a,
                               char key)
Searches the specified array of chars for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(char[])

binarySearch

public static int binarySearch(byte[] a,
                               byte key)
Searches the specified array of bytes for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(byte[])

binarySearch

public static int binarySearch(double[] a,
                               double key)
Searches the specified array of doubles for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(double[])

binarySearch

public static int binarySearch(float[] a,
                               float key)
Searches the specified array of floats for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
See Also:
sort(float[])

binarySearch

public static int binarySearch(Object[] a,
                               Object key)
Searches the specified array for the specified object using the binary search algorithm. The array must be sorted into ascending order according to the natural ordering of its elements (as by Sort(Object[]), above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements equal to the specified object, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
Throws:
ClassCastException - if the array contains elements that are not mutually comparable (for example, strings and integers), or the search key in not mutually comparable with the elements of the array.
See Also:
Comparable, sort(Object[])

binarySearch

public static int binarySearch(Object[] a,
                               Object key,
                               Comparator c)
Searches the specified array for the specified object using the binary search algorithm. The array must be sorted into ascending order according to the specified comparator (as by the Sort(Object[], Comparator) method, above), prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements equal to the specified object, there is no guarantee which one will be found.
Parameters:
a - the array to be searched.
key - the value to be searched for.
c - the comparator by which the array is ordered. A null value indicates that the elements' natural ordering should be used.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
Throws:
ClassCastException - if the array contains elements that are not mutually comparable using the specified comparator, or the search key in not mutually comparable with the elements of the array using this comparator.
See Also:
Comparable, sort(Object[], Comparator)

equals

public static boolean equals(long[] a,
                             long[] a2)
Returns true if the two specified arrays of longs are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(int[] a,
                             int[] a2)
Returns true if the two specified arrays of ints are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(short[] a,
                             short[] a2)
Returns true if the two specified arrays of shorts are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(char[] a,
                             char[] a2)
Returns true if the two specified arrays of chars are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(byte[] a,
                             byte[] a2)
Returns true if the two specified arrays of bytes are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(boolean[] a,
                             boolean[] a2)
Returns true if the two specified arrays of equals are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

equals

public static boolean equals(double[] a,
                             double[] a2)
Returns true if the two specified arrays of doubles are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Two doubles d1 and d2 are considered equal if:

    new Double(d1).equals(new Double(d2))
(Unlike the == operator, this method considers NaN equals to itself, and 0.0d unequal to -0.0d.)
Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.
See Also:
Double.equals(Object)

equals

public static boolean equals(float[] a,
                             float[] a2)
Returns true if the two specified arrays of floats are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Two floats f1 and f2 are considered equal if:

    new Float(f1).equals(new Float(f2))
(Unlike the == operator, this method considers NaN equals to itself, and 0.0f unequal to -0.0f.)
Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.
See Also:
Float.equals(Object)

equals

public static boolean equals(Object[] a,
                             Object[] a2)
Returns true if the two specified arrays of Objects are equal to one another. The two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. Two objects e1 and e2 are considered equal if (e1==null ? e2==null : e1.equals(e2)). In other words, the two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Parameters:
a - one array to be tested for equality.
a2 - the other array to be tested for equality.
Returns:
true if the two arrays are equal.

fill

public static void fill(long[] a,
                        long val)
Assigns the specified long value to each element of the specified array of longs.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(long[] a,
                        int fromIndex,
                        int toIndex,
                        long val)
Assigns the specified long value to each element of the specified range of the specified array of longs. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(int[] a,
                        int val)
Assigns the specified int value to each element of the specified array of ints.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(int[] a,
                        int fromIndex,
                        int toIndex,
                        int val)
Assigns the specified int value to each element of the specified range of the specified array of ints. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(short[] a,
                        short val)
Assigns the specified short value to each element of the specified array of shorts.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(short[] a,
                        int fromIndex,
                        int toIndex,
                        short val)
Assigns the specified short value to each element of the specified range of the specified array of shorts. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(char[] a,
                        char val)
Assigns the specified char value to each element of the specified array of chars.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(char[] a,
                        int fromIndex,
                        int toIndex,
                        char val)
Assigns the specified char value to each element of the specified range of the specified array of chars. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(byte[] a,
                        byte val)
Assigns the specified byte value to each element of the specified array of bytes.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(byte[] a,
                        int fromIndex,
                        int toIndex,
                        byte val)
Assigns the specified byte value to each element of the specified range of the specified array of bytes. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(boolean[] a,
                        boolean val)
Assigns the specified boolean value to each element of the specified array of booleans.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(boolean[] a,
                        int fromIndex,
                        int toIndex,
                        boolean val)
Assigns the specified boolean value to each element of the specified range of the specified array of booleans. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(double[] a,
                        double val)
Assigns the specified double value to each element of the specified array of doubles.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(double[] a,
                        int fromIndex,
                        int toIndex,
                        double val)
Assigns the specified double value to each element of the specified range of the specified array of doubles. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(float[] a,
                        float val)
Assigns the specified float value to each element of the specified array of floats.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(float[] a,
                        int fromIndex,
                        int toIndex,
                        float val)
Assigns the specified float value to each element of the specified range of the specified array of floats. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

fill

public static void fill(Object[] a,
                        Object val)
Assigns the specified Object reference to each element of the specified array of Objects.
Parameters:
a - the array to be filled.
val - the value to be stored in all elements of the array.

fill

public static void fill(Object[] a,
                        int fromIndex,
                        int toIndex,
                        Object val)
Assigns the specified Object reference to each element of the specified range of the specified array of Objects. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)
Parameters:
a - the array to be filled.
fromIndex - the index of the first element (inclusive) to be filled with the specified value.
toIndex - the index of the last element (exclusive) to be filled with the specified value.
val - the value to be stored in all elements of the array.
Throws:
IllegalArgumentException - if fromIndex > toIndex
ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length

asList

public static List asList(Object[] a)
Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs, in combination with Collection.toArray. The returned list is serializable.
Parameters:
a - the array by which the list will be backed.
Returns:
a list view of the specified array.
See Also:
Collection.toArray()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BitSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class BitSet

java.lang.Object
  |
  +--java.util.BitSet
All Implemented Interfaces:
Cloneable, Serializable
public class BitSet
extends Object
implements Cloneable, Serializable

This class implements a vector of bits that grows as needed. Each component of the bit set has a boolean value. The bits of a BitSet are indexed by nonnegative integers. Individual indexed bits can be examined, set, or cleared. One BitSet may be used to modify the contents of another BitSet through logical AND, logical inclusive OR, and logical exclusive OR operations.

By default, all bits in the set initially have the value false.

Every bit set has a current size, which is the number of bits of space currently in use by the bit set. Note that the size is related to the implementation of a bit set, so it may change with implementation. The length of a bit set relates to logical length of a bit set and is defined independently of implementation.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
BitSet()
Creates a new bit set.
BitSet(int nbits)
Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through nbits-1.
Method Summary
void | and(BitSet set) Performs a logical AND of this target bit set with the argument bit set.
void | andNot(BitSet set) Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
void | clear(int bitIndex) Sets the bit specified by the index to false.
Object | clone() Cloning this BitSet produces a new BitSet that is equal to it.
boolean | equals(Object obj) Compares this object against the specified object.
boolean | get(int bitIndex) Returns the value of the bit with the specified index.
int | hashCode() Returns a hash code value for this bit set.
int | length() Returns the "logical size" of this BitSet: the index of the highest set bit in the BitSet plus one.
void | or(BitSet set) Performs a logical OR of this bit set with the bit set argument.
void | set(int bitIndex) Sets the bit specified by the index to true.
int | size() Returns the number of bits of space actually in use by this BitSet to represent bit values.
String | toString() Returns a string representation of this bit set.
void | xor(BitSet set) Performs a logical XOR of this bit set with the bit set argument.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BitSet

public BitSet()
Creates a new bit set. All bits are initially false.

BitSet

public BitSet(int nbits)
Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through nbits-1. All bits are initially false.
Parameters:
nbits - the initial size of the bit set.
Throws:
NegativeArraySizeException - if the specified initial size is negative.
Method Detail

length

public int length()
Returns the "logical size" of this BitSet: the index of the highest set bit in the BitSet plus one. Returns zero if the BitSet contains no set bits.
Returns:
the logical size of this BitSet.
Since:
1.2

set

public void set(int bitIndex)
Sets the bit specified by the index to true.
Parameters:
bitIndex - a bit index.
Throws:
IndexOutOfBoundsException - if the specified index is negative.
Since:
JDK1.0

clear

public void clear(int bitIndex)
Sets the bit specified by the index to false.
Parameters:
bitIndex - the index of the bit to be cleared.
Throws:
IndexOutOfBoundsException - if the specified index is negative.
Since:
JDK1.0

andNot

public void andNot(BitSet set)
Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
Parameters:
set - the BitSet with which to mask this BitSet.
Since:
1.2

get

public boolean get(int bitIndex)
Returns the value of the bit with the specified index. The value is true if the bit with the index bitIndex is currently set in this BitSet; otherwise, the result is false.
Parameters:
bitIndex - the bit index.
Returns:
the value of the bit with the specified index.
Throws:
IndexOutOfBoundsException - if the specified index is negative.

and

public void and(BitSet set)
Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each bit in it has the value true if and only if it both initially had the value true and the corresponding bit in the bit set argument also had the value true.
Parameters:
set - a bit set.

or

public void or(BitSet set)
Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if it either already had the value true or the corresponding bit in the bit set argument has the value true.
Parameters:
set - a bit set.

xor

public void xor(BitSet set)
Performs a logical XOR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if one of the following statements holds:
  • The bit initially has the value true, and the corresponding bit in the argument has the value false.
  • The bit initially has the value false, and the corresponding bit in the argument has the value true.
Parameters:
set - a bit set.

hashCode

public int hashCode()
Returns a hash code value for this bit set. The has code depends only on which bits have been set within this BitSet. The algorithm used to compute it may be described as follows.

Suppose the bits in the BitSet were to be stored in an array of long integers called, say, bits, in such a manner that bit k is set in the BitSet (for nonnegative values of k) if and only if the expression

((k>>6) < bits.length) && ((bits[k>>6] & (1L << (bit & 0x3F))) != 0)
is true. Then the following definition of the hashCode method would be a correct implementation of the actual algorithm:
 public synchronized int hashCode() {
      long h = 1234;
      for (int i = bits.length; --i >= 0; ) {
           h ^= bits[i] * (i + 1);
      }
      return (int)((h >> 32) ^ h);
 }
Note that the hash code values change if the set of bits is altered.

Overrides the hashCode method of Object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this bit set.

size

public int size()
Returns the number of bits of space actually in use by this BitSet to represent bit values. The maximum element in the set is the size - 1st element.
Returns:
the number of bits currently in this bit set.

equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Bitset object that has exactly the same set of bits set to true as this bit set. That is, for every nonnegative int index k,
((BitSet)obj).get(k) == this.get(k)
must be true. The current sizes of the two bit sets are not compared.

Overrides the equals method of Object.

Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.
See Also:
size()

clone

public Object clone()
Cloning this BitSet produces a new BitSet that is equal to it. The clone of the bit set is another bit set that has exactly the same bits set to true as this bit set and the same current size.

Overrides the clone method of Object.

Overrides:
clone in class Object
Returns:
a clone of this bit set.
See Also:
size()

toString

public String toString()
Returns a string representation of this bit set. For every index for which this BitSet contains a bit in the set state, the decimal representation of that index is included in the result. Such indeces aer listed in order from lowest to highest, separated by ",$nbsp;" (a comma and a space) and surrounded by braces, resulting in the usual mathematical notation for a set of integers.

Overrides the toString method of Object.

Example:

 BitSet drPepper = new BitSet();
Now drPepper.toString() returns "{}".

 drPepper.set(2);
Now drPepper.toString() returns "{2}".

 drPepper.set(4);
 drPepper.set(10);
Now drPepper.toString() returns "{2, 4, 10}".
Overrides:
toString in class Object
Returns:
a string representation of this bit set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Calendar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Calendar

java.lang.Object
  |
  +--java.util.Calendar
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
GregorianCalendar
public abstract class Calendar
extends Object
implements Serializable, Cloneable

Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on. (A Date object represents a specific instant in time with millisecond precision. See Date for information about the Date class.)

Subclasses of Calendar interpret a Date according to the rules of a specific calendar system. The platform provides one concrete subclass of Calendar: GregorianCalendar. Future subclasses could represent the various types of lunar calendars in use in many parts of the world.

Like other locale-sensitive classes, Calendar provides a class method, getInstance, for getting a generally useful object of this type. Calendar's getInstance method returns a GregorianCalendar object whose time fields have been initialized with the current date and time:

 Calendar rightNow = Calendar.getInstance();

A Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style (for example, Japanese-Gregorian, Japanese-Traditional). Calendar defines the range of values returned by certain fields, as well as their meaning. For example, the first month of the year has value MONTH == JANUARY for all calendars. Other values are defined by the concrete subclass, such as ERA and YEAR. See individual field documentation and subclass documentation for details.

When a Calendar is lenient, it accepts a wider range of field values than it produces. For example, a lenient GregorianCalendar interprets MONTH == JANUARY, DAY_OF_MONTH == 32 as February 1. A non-lenient GregorianCalendar throws an exception when given out-of-range field settings. When calendars recompute field values for return by get(), they normalize them. For example, a GregorianCalendar always produces DAY_OF_MONTH values between 1 and the length of the month.

Calendar defines a locale-specific seven day week using two parameters: the first day of the week and the minimal days in first week (from 1 to 7). These numbers are taken from the locale resource data when a Calendar is constructed. They may also be specified explicitly through the API.

When setting or getting the WEEK_OF_MONTH or WEEK_OF_YEAR fields, Calendar must determine the first week of the month or year as a reference point. The first week of a month or year is defined as the earliest seven day period beginning on getFirstDayOfWeek() and containing at least getMinimalDaysInFirstWeek() days of that month or year. Weeks numbered ..., -1, 0 precede the first week; weeks numbered 2, 3,... follow it. Note that the normalized numbering returned by get() may be different. For example, a specific Calendar subclass may designate the week before week 1 of a year as week n of the previous year.

When computing a Date from time fields, two special circumstances may arise: there may be insufficient information to compute the Date (such as only year and month but no day in the month), or there may be inconsistent information (such as "Tuesday, July 15, 1996" -- July 15, 1996 is actually a Monday).

Insufficient information. The calendar will use default information to specify the missing fields. This may vary by calendar; for the Gregorian calendar, the default for a field is the same as that of the start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc.

Inconsistent information. If fields conflict, the calendar will give preference to fields set more recently. For example, when determining the day, the calendar will look for one of the following combinations of fields. The most recent combination, as determined by the most recently set single field, will be used.

 MONTH + DAY_OF_MONTH
 MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
 MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
 DAY_OF_YEAR
 DAY_OF_WEEK + WEEK_OF_YEAR
For the time of day:
 HOUR_OF_DAY
 AM_PM + HOUR

Note: for some non-Gregorian calendars, different fields may be necessary for complete disambiguation. For example, a full specification of the historial Arabic astronomical calendar requires year, month, day-of-month and day-of-week in some cases.

Note: There are certain possible ambiguities in interpretation of certain singular times, which are resolved in the following ways:

  1. 24:00:00 "belongs" to the following day. That is, 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970
  2. Although historically not precise, midnight also belongs to "am", and noon belongs to "pm", so on the same day, 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm

The date or time format strings are not part of the definition of a calendar, as those must be modifiable or overridable by the user at runtime. Use DateFormat to format dates.

Field manipulation methods

Calendar fields can be changed using three methods: set(), add(), and roll().

set(f, value) changes field f to value. In addition, it sets an internal member variable to indicate that field f has been changed. Although field f is changed immediately, the calendar's milliseconds is not recomputed until the next call to get(), getTime(), or getTimeInMillis() is made. Thus, multiple calls to set() do not trigger multiple, unnecessary computations. As a result of changing a field using set(), other fields may also change, depending on the field, the field value, and the calendar system. In addition, get(f) will not necessarily return value after the fields have been recomputed. The specifics are determined by the concrete calendar class.

Example: Consider a GregorianCalendar originally set to August 31, 1999. Calling set(Calendar.MONTH, Calendar.SEPTEMBER) sets the calendar to September 31, 1999. This is a temporary internal representation that resolves to October 1, 1999 if getTime()is then called. However, a call to set(Calendar.DAY_OF_MONTH, 30) before the call to getTime() sets the calendar to September 30, 1999, since no recomputation occurs after set() itself.

add(f, delta) adds delta to field f. This is equivalent to calling set(f, get(f) + delta) with two adjustments:

Add rule 1. The value of field f after the call minus the value of field f before the call is delta, modulo any overflow that has occurred in field f. Overflow occurs when a field value exceeds its range and, as a result, the next larger field is incremented or decremented and the field value is adjusted back into its range.

Add rule 2. If a smaller field is expected to be invariant, but it is impossible for it to be equal to its prior value because of changes in its minimum or maximum after field f is changed, then its value is adjusted to be as close as possible to its expected value. A smaller field represents a smaller unit of time. HOUR is a smaller field than DAY_OF_MONTH. No adjustment is made to smaller fields that are not expected to be invariant. The calendar system determines what fields are expected to be invariant.

In addition, unlike set(), add() forces an immediate recomputation of the calendar's milliseconds and all fields.

Example: Consider a GregorianCalendar originally set to August 31, 1999. Calling add(Calendar.MONTH, 13) sets the calendar to September 30, 2000. Add rule 1 sets the MONTH field to September, since adding 13 months to August gives September of the next year. Since DAY_OF_MONTH cannot be 31 in September in a GregorianCalendar, add rule 2 sets the DAY_OF_MONTH to 30, the closest possible value. Although it is a smaller field, DAY_OF_WEEK is not adjusted by rule 2, since it is expected to change when the month changes in a GregorianCalendar.

roll(f, delta) adds delta to field f without changing larger fields. This is equivalent to calling add(f, delta) with the following adjustment:

Roll rule. Larger fields are unchanged after the call. A larger field represents a larger unit of time. DAY_OF_MONTH is a larger field than HOUR.

Example: Consider a GregorianCalendar originally set to August 31, 1999. Calling roll(Calendar.MONTH, 8) sets the calendar to April 30, 1999. Add rule 1 sets the MONTH field to April. Using a GregorianCalendar, the DAY_OF_MONTH cannot be 31 in the month April. Add rule 2 sets it to the closest possible value, 30. Finally, the roll rule maintains the YEAR field value of 1999.

Example: Consider a GregorianCalendar originally set to Sunday June 6, 1999. Calling roll(Calendar.WEEK_OF_MONTH, -1) sets the calendar to Tuesday June 1, 1999, whereas calling add(Calendar.WEEK_OF_MONTH, -1) sets the calendar to Sunday May 30, 1999. This is because the roll rule imposes an additional constraint: The MONTH must not change when the WEEK_OF_MONTH is rolled. Taken together with add rule 1, the resultant date must be between Tuesday June 1 and Saturday June 5. According to add rule 2, the DAY_OF_WEEK, an invariant when changing the WEEK_OF_MONTH, is set to Tuesday, the closest possible value to Sunday (where Sunday is the first day of the week).

Usage model. To motivate the behavior of add() and roll(), consider a user interface component with increment and decrement buttons for the month, day, and year, and an underlying GregorianCalendar. If the interface reads January 31, 1999 and the user presses the month increment button, what should it read? If the underlying implementation uses set(), it might read March 3, 1999. A better result would be February 28, 1999. Furthermore, if the user presses the month increment button again, it should read March 31, 1999, not March 28, 1999. By saving the original date and using either add() or roll(), depending on whether larger fields should be affected, the user interface can behave as most users will intuitively expect.

Since:
JDK1.1
See Also:
Date, GregorianCalendar, TimeZone, DateFormat, Serialized Form

Field Summary
static int | AM Value of the AM_PM field indicating the period of the day from midnight to just before noon.
static int | AM_PM Field number for get and set indicating whether the HOUR is before or after noon.
static int | APRIL Value of the MONTH field indicating the fourth month of the year.
protected boolean | areFieldsSet True if fields[] are in sync with the currently set time.
static int | AUGUST Value of the MONTH field indicating the eighth month of the year.
static int | DATE Field number for get and set indicating the day of the month.
static int | DAY_OF_MONTH Field number for get and set indicating the day of the month.
static int | DAY_OF_WEEK Field number for get and set indicating the day of the week.
static int | DAY_OF_WEEK_IN_MONTH Field number for get and set indicating the ordinal number of the day of the week within the current month.
static int | DAY_OF_YEAR Field number for get and set indicating the day number within the current year.
static int | DECEMBER Value of the MONTH field indicating the twelfth month of the year.
static int | DST_OFFSET Field number for get and set indicating the daylight savings offset in milliseconds.
static int | ERA Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar.
static int | FEBRUARY Value of the MONTH field indicating the second month of the year.
static int | FIELD_COUNT The number of distict fields recognized by get and set.
protected int[] | fields The field values for the currently set time for this calendar.
static int | FRIDAY Value of the DAY_OF_WEEK field indicating Friday.
static int | HOUR Field number for get and set indicating the hour of the morning or afternoon.
static int | HOUR_OF_DAY Field number for get and set indicating the hour of the day.
protected boolean[] | isSet The flags which tell if a specified time field for the calendar is set.
protected boolean | isTimeSet True if then the value of time is valid.
static int | JANUARY Value of the MONTH field indicating the first month of the year.
static int | JULY Value of the MONTH field indicating the seventh month of the year.
static int | JUNE Value of the MONTH field indicating the sixth month of the year.
static int | MARCH Value of the MONTH field indicating the third month of the year.
static int | MAY Value of the MONTH field indicating the fifth month of the year.
static int | MILLISECOND Field number for get and set indicating the millisecond within the second.
static int | MINUTE Field number for get and set indicating the minute within the hour.
static int | MONDAY Value of the DAY_OF_WEEK field indicating Monday.
static int | MONTH Field number for get and set indicating the month.
static int | NOVEMBER Value of the MONTH field indicating the eleventh month of the year.
static int | OCTOBER Value of the MONTH field indicating the tenth month of the year.
static int | PM Value of the AM_PM field indicating the period of the day from noon to just before midnight.
static int | SATURDAY Value of the DAY_OF_WEEK field indicating Saturday.
static int | SECOND Field number for get and set indicating the second within the minute.
static int | SEPTEMBER Value of the MONTH field indicating the ninth month of the year.
static int | SUNDAY Value of the DAY_OF_WEEK field indicating Sunday.
static int | THURSDAY Value of the DAY_OF_WEEK field indicating Thursday.
protected long | time The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
static int | TUESDAY Value of the DAY_OF_WEEK field indicating Tuesday.
static int | UNDECIMBER Value of the MONTH field indicating the thirteenth month of the year.
static int | WEDNESDAY Value of the DAY_OF_WEEK field indicating Wednesday.
static int | WEEK_OF_MONTH Field number for get and set indicating the week number within the current month.
static int | WEEK_OF_YEAR Field number for get and set indicating the week number within the current year.
static int | YEAR Field number for get and set indicating the year.
static int | ZONE_OFFSET Field number for get and set indicating the raw offset from GMT in milliseconds.
Constructor Summary
protected | Calendar() Constructs a Calendar with the default time zone and locale.
protected | Calendar(TimeZone zone, Locale aLocale) Constructs a calendar with the specified time zone and locale.
Method Summary
abstract void | add(int field, int amount) Date Arithmetic function.
boolean | after(Object when) Compares the time field records.
boolean | before(Object when) Compares the time field records.
void | clear() Clears the values of all the time fields.
void | clear(int field) Clears the value in the given time field.
Object | clone() Overrides Cloneable
protected void | complete() Fills in any unset fields in the time field list.
protected abstract void | computeFields() Converts the current millisecond time value time to field values in fields[].
protected abstract void | computeTime() Converts the current field values in fields[] to the millisecond time value time.
boolean | equals(Object obj) Compares this calendar to the specified object.
int | get(int field) Gets the value for a given time field.
int | getActualMaximum(int field) Return the maximum value that this field could have, given the current date.
int | getActualMinimum(int field) Return the minimum value that this field could have, given the current date.
static Locale[] | getAvailableLocales() Gets the list of locales for which Calendars are installed.
int | getFirstDayOfWeek() Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
abstract int | getGreatestMinimum(int field) Gets the highest minimum value for the given field if varies.
static Calendar | getInstance() Gets a calendar using the default time zone and locale.
static Calendar | getInstance(Locale aLocale) Gets a calendar using the default time zone and specified locale.
static Calendar | getInstance(TimeZone zone) Gets a calendar using the specified time zone and default locale.
static Calendar | getInstance(TimeZone zone, Locale aLocale) Gets a calendar with the specified time zone and locale.
abstract int | getLeastMaximum(int field) Gets the lowest maximum value for the given field if varies.
abstract int | getMaximum(int field) Gets the maximum value for the given time field.
int | getMinimalDaysInFirstWeek() Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, getMinimalDaysInFirstWeek returns 1.
abstract int | getMinimum(int field) Gets the minimum value for the given time field.
Date | getTime() Gets this Calendar's current time.
protected long | getTimeInMillis() Gets this Calendar's current time as a long.
TimeZone | getTimeZone() Gets the time zone.
int | hashCode() Returns a hash code for this calendar.
protected int | internalGet(int field) Gets the value for a given time field.
boolean | isLenient() Tell whether date/time interpretation is to be lenient.
boolean | isSet(int field) Determines if the given time field has a value set.
abstract void | roll(int field, boolean up) Time Field Rolling function.
void | roll(int field, int amount) Time Field Rolling function.
void | set(int field, int value) Sets the time field with the given value.
void | set(int year, int month, int date) Sets the values for the fields year, month, and date.
void | set(int year, int month, int date, int hour, int minute) Sets the values for the fields year, month, date, hour, and minute.
void | set(int year, int month, int date, int hour, int minute, int second) Sets the values for the fields year, month, date, hour, minute, and second.
void | setFirstDayOfWeek(int value) Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
void | setLenient(boolean lenient) Specify whether or not date/time interpretation is to be lenient.
void | setMinimalDaysInFirstWeek(int value) Sets what the minimal days required in the first week of the year are; For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1.
void | setTime(Date date) Sets this Calendar's current time with the given Date.
protected void | setTimeInMillis(long millis) Sets this Calendar's current time from the given long value.
void | setTimeZone(TimeZone value) Sets the time zone with the given time zone value.
String | toString() Return a string representation of this calendar.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ERA

public static final int ERA
Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar. This is a calendar-specific value; see subclass documentation.
See Also:
GregorianCalendar.AD, GregorianCalendar.BC

YEAR

public static final int YEAR
Field number for get and set indicating the year. This is a calendar-specific value; see subclass documentation.

MONTH

public static final int MONTH
Field number for get and set indicating the month. This is a calendar-specific value. The first month of the year is JANUARY; the last depends on the number of months in a year.
See Also:
JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER, UNDECIMBER

WEEK_OF_YEAR

public static final int WEEK_OF_YEAR
Field number for get and set indicating the week number within the current year. The first week of the year, as defined by getFirstDayOfWeek() and getMinimalDaysInFirstWeek(), has value 1. Subclasses define the value of WEEK_OF_YEAR for days before the first week of the year.
See Also:
getFirstDayOfWeek(), getMinimalDaysInFirstWeek()

WEEK_OF_MONTH

public static final int WEEK_OF_MONTH
Field number for get and set indicating the week number within the current month. The first week of the month, as defined by getFirstDayOfWeek() and getMinimalDaysInFirstWeek(), has value 1. Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month.
See Also:
getFirstDayOfWeek(), getMinimalDaysInFirstWeek()

DATE

public static final int DATE
Field number for get and set indicating the day of the month. This is a synonym for DAY_OF_MONTH. The first day of the month has value 1.
See Also:
DAY_OF_MONTH

DAY_OF_MONTH

public static final int DAY_OF_MONTH
Field number for get and set indicating the day of the month. This is a synonym for DATE. The first day of the month has value 1.
See Also:
DATE

DAY_OF_YEAR

public static final int DAY_OF_YEAR
Field number for get and set indicating the day number within the current year. The first day of the year has value 1.

DAY_OF_WEEK

public static final int DAY_OF_WEEK
Field number for get and set indicating the day of the week. This field takes values SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.
See Also:
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY

DAY_OF_WEEK_IN_MONTH

public static final int DAY_OF_WEEK_IN_MONTH
Field number for get and set indicating the ordinal number of the day of the week within the current month. Together with the DAY_OF_WEEK field, this uniquely specifies a day within a month. Unlike WEEK_OF_MONTH and WEEK_OF_YEAR, this field's value does not depend on getFirstDayOfWeek() or getMinimalDaysInFirstWeek(). DAY_OF_MONTH 1 through 7 always correspond to DAY_OF_WEEK_IN_MONTH 1; 8 through 15 correspond to DAY_OF_WEEK_IN_MONTH 2, and so on. DAY_OF_WEEK_IN_MONTH 0 indicates the week before DAY_OF_WEEK_IN_MONTH 1. Negative values count back from the end of the month, so the last Sunday of a month is specified as DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. For example, if a month has 31 days, DAY_OF_WEEK_IN_MONTH -1 will overlap DAY_OF_WEEK_IN_MONTH 5 and the end of 4.
See Also:
DAY_OF_WEEK, WEEK_OF_MONTH

AM_PM

public static final int AM_PM
Field number for get and set indicating whether the HOUR is before or after noon. E.g., at 10:04:15.250 PM the AM_PM is PM.
See Also:
AM, PM, HOUR

HOUR

public static final int HOUR
Field number for get and set indicating the hour of the morning or afternoon. HOUR is used for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.
See Also:
AM_PM, HOUR_OF_DAY

HOUR_OF_DAY

public static final int HOUR_OF_DAY
Field number for get and set indicating the hour of the day. HOUR_OF_DAY is used for the 24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.
See Also:
HOUR

MINUTE

public static final int MINUTE
Field number for get and set indicating the minute within the hour. E.g., at 10:04:15.250 PM the MINUTE is 4.

SECOND

public static final int SECOND
Field number for get and set indicating the second within the minute. E.g., at 10:04:15.250 PM the SECOND is 15.

MILLISECOND

public static final int MILLISECOND
Field number for get and set indicating the millisecond within the second. E.g., at 10:04:15.250 PM the MILLISECOND is 250.

ZONE_OFFSET

public static final int ZONE_OFFSET
Field number for get and set indicating the raw offset from GMT in milliseconds.

DST_OFFSET

public static final int DST_OFFSET
Field number for get and set indicating the daylight savings offset in milliseconds.

FIELD_COUNT

public static final int FIELD_COUNT
The number of distict fields recognized by get and set. Field numbers range from 0..FIELD_COUNT-1.

SUNDAY

public static final int SUNDAY
Value of the DAY_OF_WEEK field indicating Sunday.

MONDAY

public static final int MONDAY
Value of the DAY_OF_WEEK field indicating Monday.

TUESDAY

public static final int TUESDAY
Value of the DAY_OF_WEEK field indicating Tuesday.

WEDNESDAY

public static final int WEDNESDAY
Value of the DAY_OF_WEEK field indicating Wednesday.

THURSDAY

public static final int THURSDAY
Value of the DAY_OF_WEEK field indicating Thursday.

FRIDAY

public static final int FRIDAY
Value of the DAY_OF_WEEK field indicating Friday.

SATURDAY

public static final int SATURDAY
Value of the DAY_OF_WEEK field indicating Saturday.

JANUARY

public static final int JANUARY
Value of the MONTH field indicating the first month of the year.

FEBRUARY

public static final int FEBRUARY
Value of the MONTH field indicating the second month of the year.

MARCH

public static final int MARCH
Value of the MONTH field indicating the third month of the year.

APRIL

public static final int APRIL
Value of the MONTH field indicating the fourth month of the year.

MAY

public static final int MAY
Value of the MONTH field indicating the fifth month of the year.

JUNE

public static final int JUNE
Value of the MONTH field indicating the sixth month of the year.

JULY

public static final int JULY
Value of the MONTH field indicating the seventh month of the year.

AUGUST

public static final int AUGUST
Value of the MONTH field indicating the eighth month of the year.

SEPTEMBER

public static final int SEPTEMBER
Value of the MONTH field indicating the ninth month of the year.

OCTOBER

public static final int OCTOBER
Value of the MONTH field indicating the tenth month of the year.

NOVEMBER

public static final int NOVEMBER
Value of the MONTH field indicating the eleventh month of the year.

DECEMBER

public static final int DECEMBER
Value of the MONTH field indicating the twelfth month of the year.

UNDECIMBER

public static final int UNDECIMBER
Value of the MONTH field indicating the thirteenth month of the year. Although GregorianCalendar does not use this value, lunar calendars do.

AM

public static final int AM
Value of the AM_PM field indicating the period of the day from midnight to just before noon.

PM

public static final int PM
Value of the AM_PM field indicating the period of the day from noon to just before midnight.

fields

protected int[] fields
The field values for the currently set time for this calendar. This is an array of FIELD_COUNT integers, with index values ERA through DST_OFFSET.

isSet

protected boolean[] isSet
The flags which tell if a specified time field for the calendar is set. A new object has no fields set. After the first call to a method which generates the fields, they all remain set after that. This is an array of FIELD_COUNT booleans, with index values ERA through DST_OFFSET.

time

protected long time
The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
See Also:
isTimeSet

isTimeSet

protected boolean isTimeSet
True if then the value of time is valid. The time is made invalid by a change to an item of field[].
See Also:
time

areFieldsSet

protected boolean areFieldsSet
True if fields[] are in sync with the currently set time. If false, then the next attempt to get the value of a field will force a recomputation of all fields from the current value of time.
Constructor Detail

Calendar

protected Calendar()
Constructs a Calendar with the default time zone and locale.
See Also:
TimeZone.getDefault()

Calendar

protected Calendar(TimeZone zone,
                   Locale aLocale)
Constructs a calendar with the specified time zone and locale.
Parameters:
zone - the time zone to use
aLocale - the locale for the week data
Method Detail

getInstance

public static Calendar getInstance()
Gets a calendar using the default time zone and locale.
Returns:
a Calendar.

getInstance

public static Calendar getInstance(TimeZone zone)
Gets a calendar using the specified time zone and default locale.
Parameters:
zone - the time zone to use
Returns:
a Calendar.

getInstance

public static Calendar getInstance(Locale aLocale)
Gets a calendar using the default time zone and specified locale.
Parameters:
aLocale - the locale for the week data
Returns:
a Calendar.

getInstance

public static Calendar getInstance(TimeZone zone,
                                   Locale aLocale)
Gets a calendar with the specified time zone and locale.
Parameters:
zone - the time zone to use
aLocale - the locale for the week data
Returns:
a Calendar.

getAvailableLocales

public static Locale[] getAvailableLocales()
Gets the list of locales for which Calendars are installed.
Returns:
the list of locales for which Calendars are installed.

computeTime

protected abstract void computeTime()
Converts the current field values in fields[] to the millisecond time value time.

computeFields

protected abstract void computeFields()
Converts the current millisecond time value time to field values in fields[]. This allows you to sync up the time field values with a new time that is set for the calendar. The time is not recomputed first; to recompute the time, then the fields, call the complete method.
See Also:
complete()

getTime

public final Date getTime()
Gets this Calendar's current time.
Returns:
the current time.

setTime

public final void setTime(Date date)
Sets this Calendar's current time with the given Date.

Note: Calling setTime() with Date(Long.MAX_VALUE) or Date(Long.MIN_VALUE) may yield incorrect field values from get().

Parameters:
date - the given Date.

getTimeInMillis

protected long getTimeInMillis()
Gets this Calendar's current time as a long.
Returns:
the current time as UTC milliseconds from the epoch.

setTimeInMillis

protected void setTimeInMillis(long millis)
Sets this Calendar's current time from the given long value.
Parameters:
date - the new time in UTC milliseconds from the epoch.

get

public final int get(int field)
Gets the value for a given time field.
Parameters:
field - the given time field.
Returns:
the value for the given time field.

internalGet

protected final int internalGet(int field)
Gets the value for a given time field. This is an internal fast time field value getter for the subclasses.
Parameters:
field - the given time field.
Returns:
the value for the given time field.

set

public final void set(int field,
                      int value)
Sets the time field with the given value.
Parameters:
field - the given time field.
value - the value to be set for the given time field.

set

public final void set(int year,
                      int month,
                      int date)
Sets the values for the fields year, month, and date. Previous values of other fields are retained. If this is not desired, call clear first.
Parameters:
year - the value used to set the YEAR time field.
month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field.

set

public final void set(int year,
                      int month,
                      int date,
                      int hour,
                      int minute)
Sets the values for the fields year, month, date, hour, and minute. Previous values of other fields are retained. If this is not desired, call clear first.
Parameters:
year - the value used to set the YEAR time field.
month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field.
hour - the value used to set the HOUR_OF_DAY time field.
minute - the value used to set the MINUTE time field.

set

public final void set(int year,
                      int month,
                      int date,
                      int hour,
                      int minute,
                      int second)
Sets the values for the fields year, month, date, hour, minute, and second. Previous values of other fields are retained. If this is not desired, call clear first.
Parameters:
year - the value used to set the YEAR time field.
month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field.
hour - the value used to set the HOUR_OF_DAY time field.
minute - the value used to set the MINUTE time field.
second - the value used to set the SECOND time field.

clear

public final void clear()
Clears the values of all the time fields.

clear

public final void clear(int field)
Clears the value in the given time field.
Parameters:
field - the time field to be cleared.

isSet

public final boolean isSet(int field)
Determines if the given time field has a value set.
Returns:
true if the given time field has a value set; false otherwise.

complete

protected void complete()
Fills in any unset fields in the time field list.

equals

public boolean equals(Object obj)
Compares this calendar to the specified object. The result is true if and only if the argument is not null and is a Calendar object that represents the same calendar as this object.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this calendar.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
Since:
1.2

before

public boolean before(Object when)
Compares the time field records. Equivalent to comparing result of conversion to UTC.
Parameters:
when - the Calendar to be compared with this Calendar.
Returns:
true if the current time of this Calendar is before the time of Calendar when; false otherwise.

after

public boolean after(Object when)
Compares the time field records. Equivalent to comparing result of conversion to UTC.
Parameters:
when - the Calendar to be compared with this Calendar.
Returns:
true if the current time of this Calendar is after the time of Calendar when; false otherwise.

add

public abstract void add(int field,
                         int amount)
Date Arithmetic function. Adds the specified (signed) amount of time to the given time field, based on the calendar's rules. For example, to subtract 5 days from the current time of the calendar, you can achieve it by calling:

add(Calendar.DATE, -5).

Parameters:
field - the time field.
amount - the amount of date or time to be added to the field.

roll

public abstract void roll(int field,
                          boolean up)
Time Field Rolling function. Rolls (up/down) a single unit of time on the given time field. For example, to roll the current date up by one day, you can achieve it by calling:

roll(Calendar.DATE, true). When rolling on the year or Calendar.YEAR field, it will roll the year value in the range between 1 and the value returned by calling getMaximum(Calendar.YEAR). When rolling on the month or Calendar.MONTH field, other fields like date might conflict and, need to be changed. For instance, rolling the month on the date 01/31/96 will result in 02/29/96. When rolling on the hour-in-day or Calendar.HOUR_OF_DAY field, it will roll the hour value in the range between 0 and 23, which is zero-based.

Parameters:
field - the time field.
up - indicates if the value of the specified time field is to be rolled up or rolled down. Use true if rolling up, false otherwise.

roll

public void roll(int field,
                 int amount)
Time Field Rolling function. Rolls up or down the specified number of units on the given time field. (A negative roll amount means to roll down.) [NOTE: This default implementation on Calendar just repeatedly calls the version of roll() that takes a boolean and rolls by one unit. This may not always do the right thing. For example, if the DAY_OF_MONTH field is 31, rolling through February will leave it set to 28. The GregorianCalendar version of this function takes care of this problem. Other subclasses should also provide overrides of this function that do the right thing.
Since:
1.2

setTimeZone

public void setTimeZone(TimeZone value)
Sets the time zone with the given time zone value.
Parameters:
value - the given time zone.

getTimeZone

public TimeZone getTimeZone()
Gets the time zone.
Returns:
the time zone object associated with this calendar.

setLenient

public void setLenient(boolean lenient)
Specify whether or not date/time interpretation is to be lenient. With lenient interpretation, a date such as "February 942, 1996" will be treated as being equivalent to the 941st day after February 1, 1996. With strict interpretation, such dates will cause an exception to be thrown.
See Also:
DateFormat.setLenient(boolean)

isLenient

public boolean isLenient()
Tell whether date/time interpretation is to be lenient.

setFirstDayOfWeek

public void setFirstDayOfWeek(int value)
Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
Parameters:
value - the given first day of the week.

getFirstDayOfWeek

public int getFirstDayOfWeek()
Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
Returns:
the first day of the week.

setMinimalDaysInFirstWeek

public void setMinimalDaysInFirstWeek(int value)
Sets what the minimal days required in the first week of the year are; For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1. If it must be a full week, use value 7.
Parameters:
value - the given minimal days required in the first week of the year.

getMinimalDaysInFirstWeek

public int getMinimalDaysInFirstWeek()
Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, getMinimalDaysInFirstWeek returns 1. If the minimal days required must be a full week, getMinimalDaysInFirstWeek returns 7.
Returns:
the minimal days required in the first week of the year.

getMinimum

public abstract int getMinimum(int field)
Gets the minimum value for the given time field. e.g., for Gregorian DAY_OF_MONTH, 1.
Parameters:
field - the given time field.
Returns:
the minimum value for the given time field.

getMaximum

public abstract int getMaximum(int field)
Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH, 31.
Parameters:
field - the given time field.
Returns:
the maximum value for the given time field.

getGreatestMinimum

public abstract int getGreatestMinimum(int field)
Gets the highest minimum value for the given field if varies. Otherwise same as getMinimum(). For Gregorian, no difference.
Parameters:
field - the given time field.
Returns:
the highest minimum value for the given time field.

getLeastMaximum

public abstract int getLeastMaximum(int field)
Gets the lowest maximum value for the given field if varies. Otherwise same as getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
Parameters:
field - the given time field.
Returns:
the lowest maximum value for the given time field.

getActualMinimum

public int getActualMinimum(int field)
Return the minimum value that this field could have, given the current date. For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum(). The version of this function on Calendar uses an iterative algorithm to determine the actual minimum value for the field. There is almost always a more efficient way to accomplish this (in most cases, you can simply return getMinimum()). GregorianCalendar overrides this function with a more efficient implementation.
Parameters:
field - the field to determine the minimum of
Returns:
the minimum of the given field for the current date of this Calendar
Since:
1.2

getActualMaximum

public int getActualMaximum(int field)
Return the maximum value that this field could have, given the current date. For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, for some years the actual maximum for MONTH is 12, and for others 13. The version of this function on Calendar uses an iterative algorithm to determine the actual maximum value for the field. There is almost always a more efficient way to accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar overrides this function with a more efficient implementation.
Parameters:
field - the field to determine the maximum of
Returns:
the maximum of the given field for the current date of this Calendar
Since:
1.2

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

toString

public String toString()
Return a string representation of this calendar. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
toString in class Object
Returns:
a string representation of this calendar.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.util.Arrays

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Arrays

No usage of java.util.Arrays

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Collections

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Collections

No usage of java.util.Collections

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.ConcurrentModificationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.ConcurrentModificationException

No usage of java.util.ConcurrentModificationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.GregorianCalendar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.GregorianCalendar

No usage of java.util.GregorianCalendar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.HashSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.HashSet

No usage of java.util.HashSet

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.LinkedList

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.LinkedList

No usage of java.util.LinkedList

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.NoSuchElementException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.NoSuchElementException

No usage of java.util.NoSuchElementException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.PropertyPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.PropertyPermission

No usage of java.util.PropertyPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.PropertyResourceBundle

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.PropertyResourceBundle

No usage of java.util.PropertyResourceBundle

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.SimpleTimeZone

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.SimpleTimeZone

No usage of java.util.SimpleTimeZone

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Stack

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Stack

No usage of java.util.Stack

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.StringTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.StringTokenizer

No usage of java.util.StringTokenizer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Timer

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Timer

No usage of java.util.Timer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.TreeMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.TreeMap

No usage of java.util.TreeMap

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.TreeSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.TreeSet

No usage of java.util.TreeSet

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.WeakHashMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.WeakHashMap

No usage of java.util.WeakHashMap

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Map.Entry

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Map.Entry

No usage of java.util.Map.Entry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.AbstractCollection

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.AbstractCollection

Packages that use AbstractCollection
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of AbstractCollection in java.util

Subclasses of AbstractCollection in java.util
class | AbstractList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
class | AbstractSequentialList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
class | AbstractSet This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
class | ArrayList Resizable-array implementation of the List interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | LinkedList Linked list implementation of the List interface.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.
class | Vector The Vector class implements a growable array of objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.AbstractList

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.AbstractList

Packages that use AbstractList
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of AbstractList in java.util

Subclasses of AbstractList in java.util
class | AbstractSequentialList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
class | ArrayList Resizable-array implementation of the List interface.
class | LinkedList Linked list implementation of the List interface.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | Vector The Vector class implements a growable array of objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.AbstractMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.AbstractMap

Packages that use AbstractMap
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of AbstractMap in java.util

Subclasses of AbstractMap in java.util
class | HashMap Hash table based implementation of the Map interface.
class | TreeMap Red-Black tree based implementation of the SortedMap interface.
class | WeakHashMap A hashtable-based Map implementation with weak keys.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.AbstractSequentialList

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.AbstractSequentialList

Packages that use AbstractSequentialList
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of AbstractSequentialList in java.util

Subclasses of AbstractSequentialList in java.util
 class LinkedList
Linked list implementation of the List interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.AbstractSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.AbstractSet

Packages that use AbstractSet
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of AbstractSet in java.util

Subclasses of AbstractSet in java.util
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.ArrayList

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.ArrayList

Packages that use ArrayList
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.
java.beans.beancontext | Provides classes and interfaces relating to bean context.

Uses of ArrayList in java.awt.dnd

Fields in java.awt.dnd declared as ArrayList
protected  ArrayList DragGestureRecognizer.events
The list of events (in order) that the DragGestureRecognizer "recognized" as a "gesture" that triggers a drag.

Uses of ArrayList in java.beans.beancontext

Fields in java.beans.beancontext declared as ArrayList
protected ArrayList | BeanContextSupport.bcmListeners all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
protected ArrayList | BeanContextServicesSupport.bcsListeners List of BeanContextServicesListener objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.BitSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.BitSet

Packages that use BitSet
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Uses of BitSet in java.util

Methods in java.util with parameters of type BitSet
void | BitSet.andNot(BitSet set) Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
void | BitSet.and(BitSet set) Performs a logical AND of this target bit set with the argument bit set.
void | BitSet.or(BitSet set) Performs a logical OR of this bit set with the bit set argument.
void | BitSet.xor(BitSet set) Performs a logical XOR of this bit set with the bit set argument.

Uses of BitSet in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as BitSet
BitSet | Element.inclusions
BitSet | Element.exclusions

Methods in javax.swing.text.html.parser with parameters of type BitSet
 Element DTD.defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts)
Define an element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Calendar

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Calendar

Packages that use Calendar
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Calendar in java.sql

Methods in java.sql with parameters of type Calendar
void | PreparedStatement.setDate(int parameterIndex, Date x, Calendar cal) Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
void | PreparedStatement.setTime(int parameterIndex, Time x, Calendar cal) Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
void | PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal) Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
Date | CallableStatement.getDate(int parameterIndex, Calendar cal) Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
Time | CallableStatement.getTime(int parameterIndex, Calendar cal) Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
Timestamp | CallableStatement.getTimestamp(int parameterIndex, Calendar cal) Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
Date | ResultSet.getDate(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date | ResultSet.getDate(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Time | ResultSet.getTime(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time | ResultSet.getTime(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Timestamp | ResultSet.getTimestamp(int columnIndex, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp | ResultSet.getTimestamp(String columnName, Calendar cal) Returns the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.

Uses of Calendar in java.text

Fields in java.text declared as Calendar
protected  Calendar DateFormat.calendar
The calendar that DateFormat uses to produce the time field values needed to implement date and time formatting.

Methods in java.text that return Calendar
 Calendar DateFormat.getCalendar()
Gets the calendar associated with this date/time formatter.

Methods in java.text with parameters of type Calendar
 void DateFormat.setCalendar(Calendar newCalendar)
Set the calendar to be used by this date format.

Uses of Calendar in java.util

Subclasses of Calendar in java.util
 class GregorianCalendar
GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.

Methods in java.util that return Calendar
static Calendar | Calendar.getInstance() Gets a calendar using the default time zone and locale.
static Calendar | Calendar.getInstance(TimeZone zone) Gets a calendar using the specified time zone and default locale.
static Calendar | Calendar.getInstance(Locale aLocale) Gets a calendar using the default time zone and specified locale.
static Calendar | Calendar.getInstance(TimeZone zone, Locale aLocale) Gets a calendar with the specified time zone and locale.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Date

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Date

Packages that use Date
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Date in java.security

Methods in java.security that return Date
Date | KeyStore.getCreationDate(String alias) Returns the creation date of the entry identified by the given alias.
abstract Date | KeyStoreSpi.engineGetCreationDate(String alias) Returns the creation date of the entry identified by the given alias.

Uses of Date in java.security.cert

Methods in java.security.cert that return Date
abstract Date | X509Certificate.getNotBefore() Gets the notBefore date from the validity period of the certificate.
abstract Date | X509Certificate.getNotAfter() Gets the notAfter date from the validity period of the certificate.
abstract Date | X509CRLEntry.getRevocationDate() Gets the revocation date from this X509CRLEntry, the revocationDate.
abstract Date | X509CRL.getThisUpdate() Gets the thisUpdate date from the CRL.
abstract Date | X509CRL.getNextUpdate() Gets the nextUpdate date from the CRL.

Methods in java.security.cert with parameters of type Date
abstract  void X509Certificate.checkValidity(Date date)
Checks that the given date is within the certificate's validity period.

Uses of Date in java.sql

Subclasses of Date in java.sql
class | Date A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE.
class | Time A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value.
class | Timestamp A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.

Uses of Date in java.text

Methods in java.text that return Date
Date | DateFormat.parse(String text) Parse a date/time string.
abstract Date | DateFormat.parse(String text, ParsePosition pos) Parse a date/time string according to the given parse position.
Date | SimpleDateFormat.get2DigitYearStart() Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.
Date | SimpleDateFormat.parse(String text, ParsePosition pos) Overrides DateFormat

Methods in java.text with parameters of type Date
abstract StringBuffer | DateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats a Date into a date/time string.
String | DateFormat.format(Date date) Formats a Date into a date/time string.
void | SimpleDateFormat.set2DigitYearStart(Date startDate) Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.
StringBuffer | SimpleDateFormat.format(Date date, StringBuffer toAppendTo, FieldPosition pos) Overrides DateFormat

Uses of Date in java.util

Methods in java.util that return Date
Date | Calendar.getTime() Gets this Calendar's current time.
Date | GregorianCalendar.getGregorianChange() Gets the Gregorian Calendar change date.

Methods in java.util with parameters of type Date
boolean | Date.before(Date when) Tests if this date is before the specified date.
boolean | Date.after(Date when) Tests if this date is after the specified date.
int | Date.compareTo(Date anotherDate) Compares two Dates for ordering.
abstract boolean | TimeZone.inDaylightTime(Date date) Queries if the given date is in daylight savings time in this time zone.
boolean | SimpleTimeZone.inDaylightTime(Date date) Overrides TimeZone Queries if the given date is in Daylight Savings Time.
void | Calendar.setTime(Date date) Sets this Calendar's current time with the given Date.
void | GregorianCalendar.setGregorianChange(Date date) Sets the GregorianCalendar change date.
void | Timer.schedule(TimerTask task, Date time) Schedules the specified task for execution at the specified time.
void | Timer.schedule(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-delay execution, beginning at the specified time.
void | Timer.scheduleAtFixedRate(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-rate execution, beginning at the specified time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Dictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Dictionary

Packages that use Dictionary
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Dictionary in java.security

Subclasses of Dictionary in java.security
 class Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).

Uses of Dictionary in java.util

Subclasses of Dictionary in java.util
class | Hashtable This class implements a hashtable, which maps keys to values.
class | Properties The Properties class represents a persistent set of properties.

Uses of Dictionary in javax.swing

Subclasses of Dictionary in javax.swing
 class UIDefaults
A table of defaults for Swing components.

Methods in javax.swing that return Dictionary
 Dictionary JSlider.getLabelTable()
Returns the dictionary of what labels to draw at which values.

Methods in javax.swing with parameters of type Dictionary
 void JSlider.setLabelTable(Dictionary labels)
Used to specify what label will be drawn at any given value.

Uses of Dictionary in javax.swing.text

Methods in javax.swing.text that return Dictionary
 Dictionary AbstractDocument.getDocumentProperties()
Support for managing a set of properties.

Methods in javax.swing.text with parameters of type Dictionary
 void AbstractDocument.setDocumentProperties(Dictionary x)
Replace the document properties dictionary for this document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.EmptyStackException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.EmptyStackException

Packages that use EmptyStackException
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.

Uses of EmptyStackException in java.awt

Methods in java.awt that throw EmptyStackException
protected  void EventQueue.pop()
Stop dispatching events using this EventQueue instance.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.EventObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.EventObject

Packages that use EventObject
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of EventObject in java.awt

Subclasses of EventObject in java.awt
 class AWTEvent
The root event class for all AWT events.

Uses of EventObject in java.awt.dnd

Subclasses of EventObject in java.awt.dnd
class | DragGestureEvent A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
class | DragSourceDragEvent The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the currently registered DragSourceListener.
class | DragSourceDropEvent The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to its currently registered DragSourceListener's dragDropEnd() method.
class | DragSourceEvent This class is the base class for DragSourceDragEvent and DragSourceDropEvent.
class | DropTargetDragEvent The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.
class | DropTargetDropEvent The DropTargetDropEvent is delivered via the DropTargetListener drop() method.
class | DropTargetEvent The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent.

Uses of EventObject in java.awt.event

Subclasses of EventObject in java.awt.event
class | ActionEvent A semantic event which indicates that a component-defined action occured.
class | AdjustmentEvent The adjustment event emitted by Adjustable objects.
class | ComponentEvent A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).
class | ContainerEvent A low-level event which indicates that a container's contents changed because a component was added or removed.
class | FocusEvent A low-level event which indicates that a component has gained or lost the keyboard focus.
class | HierarchyEvent An event which indicates a change to the Component hierarchy to which a Component belongs.
class | InputEvent The root event class for all component-level input events.
class | InputMethodEvent Input method events contain information about text that is being composed using an input method.
class | InvocationEvent An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.
class | ItemEvent A semantic event which indicates that an item was selected or deselected.
class | KeyEvent An event which indicates that a keystroke occurred in a component.
class | MouseEvent /** An event which indicates that a mouse action occurred in a component.
class | PaintEvent The component-level paint event.
class | TextEvent A semantic event which indicates that an object's text changed.
class | WindowEvent A low-level event which indicates that a window has changed its status.

Uses of EventObject in java.beans

Subclasses of EventObject in java.beans
 class PropertyChangeEvent
A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" property.

Uses of EventObject in java.beans.beancontext

Subclasses of EventObject in java.beans.beancontext
class | BeanContextEvent BeanContextEvent is the abstract root event class for all events emitted from, and pertaining to the semantics of, a BeanContext.
class | BeanContextMembershipEvent A BeanContextMembershipEvent encapsulates the list of children added to, or removed from, the membership of a particular BeanContext.
class | BeanContextServiceAvailableEvent This event type is used by the BeanContextServicesListener in order to identify the service being registered.
class | BeanContextServiceRevokedEvent This event type is used by the BeanContextServiceRevokedListener in order to identify the service being revoked.

Uses of EventObject in javax.naming.event

Subclasses of EventObject in javax.naming.event
class | NamingEvent This class represents an event fired by a naming/directory service.
class | NamingExceptionEvent This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.

Uses of EventObject in javax.naming.ldap

Subclasses of EventObject in javax.naming.ldap
 class UnsolicitedNotificationEvent
This class represents an event fired in response to an unsolicited notification sent by the LDAP server.

Uses of EventObject in javax.sound.sampled

Subclasses of EventObject in javax.sound.sampled
 class LineEvent
The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.

Uses of EventObject in javax.swing

Methods in javax.swing with parameters of type EventObject
 boolean CellEditor.isCellEditable(EventObject anEvent)
Ask the editor if it can start editing using anEvent.
 boolean CellEditor.shouldSelectCell(EventObject anEvent)
The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not.
 boolean AbstractCellEditor.isCellEditable(EventObject e)
Returns true.
 boolean AbstractCellEditor.shouldSelectCell(EventObject anEvent)
Returns true.
 boolean DefaultCellEditor.isCellEditable(EventObject anEvent)
 boolean DefaultCellEditor.shouldSelectCell(EventObject anEvent)
 boolean DefaultCellEditor.EditorDelegate.isCellEditable(EventObject anEvent)
 boolean DefaultCellEditor.EditorDelegate.shouldSelectCell(EventObject anEvent)
 boolean DefaultCellEditor.EditorDelegate.startCellEditing(EventObject anEvent)
 boolean JTable.editCellAt(int row, int column, EventObject e)
Programmatically starts editing the cell at row and column, if the cell is editable.

Uses of EventObject in javax.swing.event

Subclasses of EventObject in javax.swing.event
class | AncestorEvent An event reported to a child component that originated from an ancestor in the component hierarchy.
class | CaretEvent CaretEvent is used to notify interested parties that the text caret has changed in the event source.
class | ChangeEvent ChangeEvent is used to notify interested parties that state has changed in the event source.
class | HyperlinkEvent HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
class | InternalFrameEvent InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
class | ListDataEvent Defines an event that encapsulates changes to a list.
class | ListSelectionEvent An event that characterizes a change in the current selection.
class | MenuDragMouseEvent MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
class | MenuEvent MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
class | MenuKeyEvent MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
class | PopupMenuEvent PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
class | TableColumnModelEvent TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
class | TableModelEvent TableModelEvent is used to notify listeners that a table model has changed.
class | TreeExpansionEvent An event used to identify a single path in a tree.
class | TreeModelEvent Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
class | TreeSelectionEvent An event that characterizes a change in the current selection.
class | UndoableEditEvent An event indicating that an operation which can be undone has occurred.

Uses of EventObject in javax.swing.text.html

Subclasses of EventObject in javax.swing.text.html
 class HTMLFrameHyperlinkEvent
HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.

Uses of EventObject in javax.swing.tree

Methods in javax.swing.tree with parameters of type EventObject
boolean | DefaultTreeCellEditor.isCellEditable(EventObject event) If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
boolean | DefaultTreeCellEditor.shouldSelectCell(EventObject event) Messages the realEditor for the return value.
protected boolean | DefaultTreeCellEditor.shouldStartEditingTimer(EventObject event) Returns true if event is a MouseEvent and the click count is 1.
protected boolean | DefaultTreeCellEditor.canEditImmediately(EventObject event) Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.HashMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.HashMap

Packages that use HashMap
java.beans.beancontext Provides classes and interfaces relating to bean context.

Uses of HashMap in java.beans.beancontext

Fields in java.beans.beancontext declared as HashMap
protected HashMap | BeanContextSupport.children all accesses to the protected HashMap children field shall be synchronized on that object.
protected HashMap | BeanContextServicesSupport.services all accesses to the protected transient HashMap services field should be synchronized on that object

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Hashtable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Hashtable

Packages that use Hashtable
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.image | Provides classes for creating and modifying images.
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of Hashtable in java.awt

Fields in java.awt declared as Hashtable
protected  Hashtable GridBagLayout.comptable
This hashtable maintains the association between a component and its gridbag constraints.

Uses of Hashtable in java.awt.image

Methods in java.awt.image with parameters of type Hashtable
void | ImageFilter.setProperties(Hashtable props) Passes the properties from the source object along after adding a property indicating the stream of filters it has been run through.
void | ReplicateScaleFilter.setProperties(Hashtable props) Passes along the properties from the source object after adding a property indicating the scale applied.
void | PixelGrabber.setProperties(Hashtable props) The setProperties method is part of the ImageConsumer API which this class must implement to retrieve the pixels.
void | ImageConsumer.setProperties(Hashtable props) Sets the extensible list of properties associated with this image.
void | CropImageFilter.setProperties(Hashtable props) Passes along the properties from the source object after adding a property indicating the cropped region.

Constructors in java.awt.image with parameters of type Hashtable
BufferedImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable properties)
Constructs a new BufferedImage with a specified ColorModel and Raster.
MemoryImageSource(int w, int h, ColorModel cm, byte[] pix, int off, int scan, Hashtable props)
Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
MemoryImageSource(int w, int h, ColorModel cm, int[] pix, int off, int scan, Hashtable props)
Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
MemoryImageSource(int w, int h, int[] pix, int off, int scan, Hashtable props)
Constructs an ImageProducer object which uses an array of integers in the default RGB ColorModel to produce data for an Image object.

Uses of Hashtable in java.security

Subclasses of Hashtable in java.security
 class Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).

Uses of Hashtable in java.util

Subclasses of Hashtable in java.util
 class Properties
The Properties class represents a persistent set of properties.

Uses of Hashtable in javax.naming

Fields in javax.naming declared as Hashtable
protected Hashtable | InitialContext.myProps The environment associated with this InitialContext.
protected Hashtable | CannotProceedException.environment Contains the environment relevant for the Context or DirContext method that cannot proceed.

Methods in javax.naming that return Hashtable
Hashtable | InitialContext.getEnvironment()
Hashtable | CannotProceedException.getEnvironment() Retrieves the environment that was in effect when this exception was created.
Hashtable | Context.getEnvironment() Retrieves the environment in effect for this context.

Methods in javax.naming with parameters of type Hashtable
protected  void InitialContext.init(Hashtable environment)
Initializes the initial context using the supplied environment.
 void CannotProceedException.setEnvironment(Hashtable environment)
Sets the environment that will be returned when getEnvironment() is called.
abstract  Context ReferralException.getReferralContext(Hashtable env)
Retrieves the context at which to continue the method using environment properties.

Constructors in javax.naming with parameters of type Hashtable
InitialContext(Hashtable environment)
Constructs an initial context using the supplied environment.

Uses of Hashtable in javax.naming.directory

Constructors in javax.naming.directory with parameters of type Hashtable
InitialDirContext(Hashtable environment)
Constructs an initial DirContext using the supplied environment.

Uses of Hashtable in javax.naming.ldap

Methods in javax.naming.ldap with parameters of type Hashtable
static Control | ControlFactory.getControlInstance(Control ctl, Context ctx, Hashtable env) Creates a control using known control factories.
abstract Context | LdapReferralException.getReferralContext(Hashtable env) Retrieves the context at which to continue the method using environment properties and no controls.
abstract Context | LdapReferralException.getReferralContext(Hashtable env, Control[] reqCtls) Retrieves the context at which to continue the method using request controls and environment properties.

Constructors in javax.naming.ldap with parameters of type Hashtable
InitialLdapContext(Hashtable environment, Control[] connCtls)
Constructs an initial context using environment properties and connection request controls.

Uses of Hashtable in javax.naming.spi

Methods in javax.naming.spi with parameters of type Hashtable
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
InitialContextFactory | InitialContextFactoryBuilder.createInitialContextFactory(Hashtable environment) Creates an initial context factory using the specified environment.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Context | NamingManager.getURLContext(String scheme, Hashtable environment) Creates a context for the given URL scheme id.
static Context | NamingManager.getInitialContext(Hashtable env) Creates an initial context using the specified environment properties.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
ObjectFactory | ObjectFactoryBuilder.createObjectFactory(Object obj, Hashtable environment) Creates a new object factory using the environment supplied.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.
Context | InitialContextFactory.getInitialContext(Hashtable environment) Creates an Initial Context for beginning name resolution.

Uses of Hashtable in javax.swing

Subclasses of Hashtable in javax.swing
 class UIDefaults
A table of defaults for Swing components.

Fields in javax.swing declared as Hashtable
protected Hashtable | JTable.defaultRenderersByColumnClass A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
protected Hashtable | JTable.defaultEditorsByColumnClass A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.

Methods in javax.swing that return Hashtable
protected Hashtable | JLayeredPane.getComponentToLayer() Returns the hashtable that maps components to layers.
Hashtable | JSlider.createStandardLabels(int increment) Creates a hashtable that will draw text labels starting at the slider minimum using the increment specified.
Hashtable | JSlider.createStandardLabels(int increment, int start) Creates a hashtable that will draw text labels starting at the start point specified using the increment specified.

Constructors in javax.swing with parameters of type Hashtable
JTree(Hashtable value)
Returns a JTree created from a Hashtable which does not display with root.

Uses of Hashtable in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Hashtable
protected Hashtable | BasicFileChooserUI.BasicFileView.iconCache
protected Hashtable | BasicTreeUI.drawingCache Used for minimizing the drawing of vertical lines.

Uses of Hashtable in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as Hashtable
Hashtable | DTD.elementHash
Hashtable | DTD.entityHash

Uses of Hashtable in javax.swing.undo

Fields in javax.swing.undo declared as Hashtable
protected Hashtable | StateEdit.preState The state information prior to the edit
protected Hashtable | StateEdit.postState The state information after the edit

Methods in javax.swing.undo with parameters of type Hashtable
void | StateEditable.storeState(Hashtable state) Upon receiving this message the receiver should place any relevant state into state.
void | StateEditable.restoreState(Hashtable state) Upon receiving this message the receiver should extract any relevant state out of state.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.ListResourceBundle

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.ListResourceBundle

Packages that use ListResourceBundle
javax.accessibility Defines a contract between user-interface components and an assistive technology that provides access to those components.

Uses of ListResourceBundle in javax.accessibility

Subclasses of ListResourceBundle in javax.accessibility
 class AccessibleResourceBundle
Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Locale

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Locale

Packages that use Locale
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.im | Provides classes and interfaces for the input method framework.
java.awt.im.spi | Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of Locale in java.applet

Methods in java.applet that return Locale
 Locale Applet.getLocale()
Gets the Locale for the applet, if it has been set.

Uses of Locale in java.awt

Methods in java.awt that return Locale
Locale | Component.getLocale() Gets the locale of this component.
Locale | Component.AccessibleAWTComponent.getLocale() Return the locale of this object.
Locale | MenuComponent.AccessibleAWTMenuComponent.getLocale() Return the locale of this object.
Locale | Window.getLocale() Gets the Locale object that is associated with this window, if the locale has been set.
Locale | List.AccessibleAWTList.AccessibleAWTListChild.getLocale() Gets the locale of the component.

Methods in java.awt with parameters of type Locale
void | Component.setLocale(Locale l) Sets the locale of this component.
abstract String[] | GraphicsEnvironment.getAvailableFontFamilyNames(Locale l) Returns an array containing the localized names of all font families available in this GraphicsEnvironment.
String | Font.getFamily(Locale l) Returns the family name of this Font, localized for the specified locale.
String | Font.getFontName(Locale l) Returns the font face name of the Font, localized for the specified locale.
static ComponentOrientation | ComponentOrientation.getOrientation(Locale locale) Return the orientation that is appropriate for the given locale

Uses of Locale in java.awt.im

Methods in java.awt.im that return Locale
 Locale InputContext.getLocale()
Returns the current locale of the current input method.

Methods in java.awt.im with parameters of type Locale
 boolean InputContext.selectInputMethod(Locale locale)
Selects an input method that supports the given locale.

Uses of Locale in java.awt.im.spi

Methods in java.awt.im.spi that return Locale
Locale[] | InputMethodDescriptor.getAvailableLocales() Returns the locales supported by the corresponding input method.
Locale | InputMethod.getLocale() Returns the current input locale.

Methods in java.awt.im.spi with parameters of type Locale
String | InputMethodDescriptor.getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.
Image | InputMethodDescriptor.getInputMethodIcon(Locale inputLocale) Returns an icon for the corresponding input method.
boolean | InputMethod.setLocale(Locale locale) Attempts to set the input locale.

Uses of Locale in java.beans.beancontext

Fields in java.beans.beancontext declared as Locale
protected  Locale BeanContextSupport.locale
The current locale of this BeanContext.

Methods in java.beans.beancontext that return Locale
 Locale BeanContextSupport.getLocale()
Gets the locale for this BeanContext.

Methods in java.beans.beancontext with parameters of type Locale
 void BeanContextSupport.setLocale(Locale newLocale)
Sets the locale of this BeanContext.

Constructors in java.beans.beancontext with parameters of type Locale
BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextSupport instance
BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextSupport(BeanContext peer, Locale lcle)
Create an instance using the specified locale
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextServicesSupport instance
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
Create an instance using the specified locale

Uses of Locale in java.lang

Methods in java.lang with parameters of type Locale
String | String.toLowerCase(Locale locale) Converts all of the characters in this String to lower case using the rules of the given Locale.
String | String.toUpperCase(Locale locale) Converts all of the characters in this String to upper case using the rules of the given locale.

Uses of Locale in java.text

Methods in java.text that return Locale
static Locale[] | NumberFormat.getAvailableLocales() Get the set of Locales for which NumberFormats are installed
static Locale[] | Collator.getAvailableLocales() Get the set of Locales for which Collators are installed.
static Locale[] | DateFormat.getAvailableLocales() Gets the set of locales for which DateFormats are installed.
static Locale[] | BreakIterator.getAvailableLocales() Get the set of Locales for which BreakIterators are installed
Locale | MessageFormat.getLocale() Gets the locale.

Methods in java.text with parameters of type Locale
static NumberFormat | NumberFormat.getInstance(Locale inLocale) Returns the default number format for the specified locale.
static NumberFormat | NumberFormat.getNumberInstance(Locale inLocale) Returns a general-purpose number format for the specified locale.
static NumberFormat | NumberFormat.getCurrencyInstance(Locale inLocale) Returns a currency format for the specified locale.
static NumberFormat | NumberFormat.getPercentInstance(Locale inLocale) Returns a percentage format for the specified locale.
static Collator | Collator.getInstance(Locale desiredLocale) Gets the Collator for the desired locale.
static DateFormat | DateFormat.getTimeInstance(int style, Locale aLocale) Gets the time formatter with the given formatting style for the given locale.
static DateFormat | DateFormat.getDateInstance(int style, Locale aLocale) Gets the date formatter with the given formatting style for the given locale.
static DateFormat | DateFormat.getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale) Gets the date/time formatter with the given formatting styles for the given locale.
static BreakIterator | BreakIterator.getWordInstance(Locale where) Create BreakIterator for word-breaks using specified locale.
static BreakIterator | BreakIterator.getLineInstance(Locale where) Create BreakIterator for line-breaks using specified locale.
static BreakIterator | BreakIterator.getCharacterInstance(Locale where) Create BreakIterator for character-breaks using specified locale Returns an instance of a BreakIterator implementing character breaks.
static BreakIterator | BreakIterator.getSentenceInstance(Locale where) Create BreakIterator for sentence-breaks using specified locale Returns an instance of a BreakIterator implementing sentence breaks.
void | MessageFormat.setLocale(Locale theLocale) Constructs with the specified pattern and formats for the arguments in that pattern.

Constructors in java.text with parameters of type Locale
SimpleDateFormat(String pattern, Locale loc)
Construct a SimpleDateFormat using the given pattern and locale.
DateFormatSymbols(Locale locale)
Construct a DateFormatSymbols object by loading format data from resources for the given locale.
DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale.

Uses of Locale in java.util

Fields in java.util declared as Locale
static Locale | Locale.ENGLISH Useful constant for language.
static Locale | Locale.FRENCH Useful constant for language.
static Locale | Locale.GERMAN Useful constant for language.
static Locale | Locale.ITALIAN Useful constant for language.
static Locale | Locale.JAPANESE Useful constant for language.
static Locale | Locale.KOREAN Useful constant for language.
static Locale | Locale.CHINESE Useful constant for language.
static Locale | Locale.SIMPLIFIED_CHINESE Useful constant for language.
static Locale | Locale.TRADITIONAL_CHINESE Useful constant for language.
static Locale | Locale.FRANCE Useful constant for country.
static Locale | Locale.GERMANY Useful constant for country.
static Locale | Locale.ITALY Useful constant for country.
static Locale | Locale.JAPAN Useful constant for country.
static Locale | Locale.KOREA Useful constant for country.
static Locale | Locale.CHINA Useful constant for country.
static Locale | Locale.PRC Useful constant for country.
static Locale | Locale.TAIWAN Useful constant for country.
static Locale | Locale.UK Useful constant for country.
static Locale | Locale.US Useful constant for country.
static Locale | Locale.CANADA Useful constant for country.
static Locale | Locale.CANADA_FRENCH Useful constant for country.

Methods in java.util that return Locale
Locale | ResourceBundle.getLocale() Return the Locale for this ResourceBundle.
static Locale[] | Calendar.getAvailableLocales() Gets the list of locales for which Calendars are installed.
static Locale | Locale.getDefault() Gets the current value of the default locale for this instance of the Java Virtual Machine.
static Locale[] | Locale.getAvailableLocales() Returns a list of all installed locales.

Methods in java.util with parameters of type Locale
static ResourceBundle | ResourceBundle.getBundle(String baseName, Locale locale) Get the appropriate ResourceBundle subclass.
static ResourceBundle | ResourceBundle.getBundle(String baseName, Locale locale, ClassLoader loader) Get the appropriate ResourceBundle subclass.
String | TimeZone.getDisplayName(Locale locale) Returns a name of this time zone suitable for presentation to the user in the specified locale.
String | TimeZone.getDisplayName(boolean daylight, int style, Locale locale) Returns a name of this time zone suitable for presentation to the user in the specified locale.
static Calendar | Calendar.getInstance(Locale aLocale) Gets a calendar using the default time zone and specified locale.
static Calendar | Calendar.getInstance(TimeZone zone, Locale aLocale) Gets a calendar with the specified time zone and locale.
static void | Locale.setDefault(Locale newLocale) Sets the default locale for this instance of the Java Virtual Machine.
String | Locale.getDisplayLanguage(Locale inLocale) Returns a name for the locale's language that is appropriate for display to the user.
String | Locale.getDisplayCountry(Locale inLocale) Returns a name for the locale's country that is appropriate for display to the user.
String | Locale.getDisplayVariant(Locale inLocale) Returns a name for the locale's variant code that is appropriate for display to the user.
String | Locale.getDisplayName(Locale inLocale) Returns a name for the locale that is appropriate for display to the user.

Constructors in java.util with parameters of type Locale
Calendar(TimeZone zone, Locale aLocale)
Constructs a calendar with the specified time zone and locale.
GregorianCalendar(Locale aLocale)
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.
GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.

Uses of Locale in javax.accessibility

Methods in javax.accessibility that return Locale
abstract  Locale AccessibleContext.getLocale()
Gets the locale of the component.

Methods in javax.accessibility with parameters of type Locale
protected String | AccessibleBundle.toDisplayString(String resourceBundleName, Locale locale) Obtains the key as a localized string.
String | AccessibleBundle.toDisplayString(Locale locale) Obtains the key as a localized string.

Uses of Locale in javax.swing

Methods in javax.swing that return Locale
Locale | JList.AccessibleJList.AccessibleJListChild.getLocale()
Locale | JTree.AccessibleJTree.AccessibleJTreeNode.getLocale() Gets the locale of the component.
Locale | JTable.AccessibleJTable.AccessibleJTableCell.getLocale() Gets the locale of the component.
Locale | ImageIcon.AccessibleImageIcon.getLocale() Returns the locale of this object.

Uses of Locale in javax.swing.table

Methods in javax.swing.table that return Locale
 Locale JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocale()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.MissingResourceException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.MissingResourceException

Packages that use MissingResourceException
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of MissingResourceException in java.util

Methods in java.util that throw MissingResourceException
String | ResourceBundle.getString(String key) Get an object from a ResourceBundle.
String[] | ResourceBundle.getStringArray(String key) Get an object from a ResourceBundle.
Object | ResourceBundle.getObject(String key) Get an object from a ResourceBundle.
static ResourceBundle | ResourceBundle.getBundle(String baseName) Get the appropriate ResourceBundle subclass.
static ResourceBundle | ResourceBundle.getBundle(String baseName, Locale locale, ClassLoader loader) Get the appropriate ResourceBundle subclass.
protected abstract Object | ResourceBundle.handleGetObject(String key) Get an object from a ResourceBundle.
String | Locale.getISO3Language() Returns a three-letter abbreviation for this locale's language.
String | Locale.getISO3Country() Returns a three-letter abbreviation for this locale's country.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Observable

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Observable

Packages that use Observable
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Observable in java.util

Methods in java.util with parameters of type Observable
 void Observer.update(Observable o, Object arg)
This method is called whenever the observed object is changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Properties

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Properties

Packages that use Properties
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.rmi.activation | Provides support for RMI Object Activation.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.naming | Provides the classes and interfaces for accessing naming services.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Properties in java.awt

Methods in java.awt with parameters of type Properties
abstract  PrintJob Toolkit.getPrintJob(Frame frame, String jobtitle, Properties props)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Uses of Properties in java.lang

Methods in java.lang that return Properties
static Properties System.getProperties()
Determines the current system properties.

Methods in java.lang with parameters of type Properties
static void System.setProperties(Properties props)
Sets the system properties to the Properties argument.

Uses of Properties in java.rmi.activation

Methods in java.rmi.activation that return Properties
 Properties ActivationGroupDesc.getPropertyOverrides()
Returns the group's property-override list.

Constructors in java.rmi.activation with parameters of type Properties
ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Constructs a group descriptor that uses the system defaults for group implementation and code location.
ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd)
Specifies an alternate group implementation and execution environment to be used for the group.

Uses of Properties in java.security

Subclasses of Properties in java.security
 class Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).

Uses of Properties in java.sql

Methods in java.sql with parameters of type Properties
Connection | Driver.connect(String url, Properties info) Attempts to make a database connection to the given URL.
DriverPropertyInfo[] | Driver.getPropertyInfo(String url, Properties info) Gets information about the possible properties for this driver.
static Connection | DriverManager.getConnection(String url, Properties info) Attempts to establish a connection to the given database URL.

Uses of Properties in java.util

Fields in java.util declared as Properties
protected  Properties Properties.defaults
A property list that contains default values for any keys not found in this property list.

Constructors in java.util with parameters of type Properties
Properties(Properties defaults)
Creates an empty property list with the specified defaults.

Uses of Properties in javax.naming

Fields in javax.naming declared as Properties
protected  Properties CompoundName.mySyntax
Syntax properties for this compound name.

Constructors in javax.naming with parameters of type Properties
CompoundName(Enumeration comps, Properties syntax)
Constructs a new compound name instance using the components specified in comps and syntax.
CompoundName(String n, Properties syntax)
Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.

Uses of Properties in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type Properties
static ORB | ORB.init(String[] args, Properties props) Creates a new ORB instance for a standalone application.
static ORB | ORB.init(Applet app, Properties props) Creates a new ORB instance for an applet.
protected abstract void | ORB.set_parameters(String[] args, Properties props) Allows the ORB implementation to be initialized with the given parameters and properties.
protected abstract void | ORB.set_parameters(Applet app, Properties props) Allows the ORB implementation to be initialized with the given applet and parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Random

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Random

Packages that use Random
java.math | Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
java.security | Provides the classes and interfaces for the security framework.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Random in java.math

Constructors in java.math with parameters of type Random
BigInteger(int numBits, Random rnd)
Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits - 1), inclusive.
BigInteger(int bitLength, int certainty, Random rnd)
Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.

Uses of Random in java.security

Subclasses of Random in java.security
 class SecureRandom
This class provides a cryptographically strong pseudo-random number generator (PRNG).

Uses of Random in java.util

Methods in java.util with parameters of type Random
static void Collections.shuffle(List list, Random rnd)
Randomly permute the specified list using the specified source of randomness.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.ResourceBundle

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.ResourceBundle

Packages that use ResourceBundle
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.

Uses of ResourceBundle in java.awt

Methods in java.awt with parameters of type ResourceBundle
void | Window.applyResourceBundle(ResourceBundle rb) Apply the settings in the given ResourceBundle to this Window.
static ComponentOrientation | ComponentOrientation.getOrientation(ResourceBundle bdl) Return the orientation appropriate for the given ResourceBundle's localization.

Uses of ResourceBundle in java.util

Subclasses of ResourceBundle in java.util
class | ListResourceBundle ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
class | PropertyResourceBundle PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.

Fields in java.util declared as ResourceBundle
protected  ResourceBundle ResourceBundle.parent
The parent bundle is consulted by getObject when this bundle does not contain a particular resource.

Methods in java.util that return ResourceBundle
static ResourceBundle | ResourceBundle.getBundle(String baseName) Get the appropriate ResourceBundle subclass.
static ResourceBundle | ResourceBundle.getBundle(String baseName, Locale locale) Get the appropriate ResourceBundle subclass.
static ResourceBundle | ResourceBundle.getBundle(String baseName, Locale locale, ClassLoader loader) Get the appropriate ResourceBundle subclass.

Methods in java.util with parameters of type ResourceBundle
protected  void ResourceBundle.setParent(ResourceBundle parent)
Set the parent bundle of this bundle.

Uses of ResourceBundle in javax.accessibility

Subclasses of ResourceBundle in javax.accessibility
 class AccessibleResourceBundle
Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.TimerTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.TimerTask

Packages that use TimerTask
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of TimerTask in java.util

Methods in java.util with parameters of type TimerTask
void | Timer.schedule(TimerTask task, long delay) Schedules the specified task for execution after the specified delay.
void | Timer.schedule(TimerTask task, Date time) Schedules the specified task for execution at the specified time.
void | Timer.schedule(TimerTask task, long delay, long period) Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay.
void | Timer.schedule(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-delay execution, beginning at the specified time.
void | Timer.scheduleAtFixedRate(TimerTask task, long delay, long period) Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
void | Timer.scheduleAtFixedRate(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-rate execution, beginning at the specified time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.TimeZone

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.TimeZone

Packages that use TimeZone
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of TimeZone in java.text

Methods in java.text that return TimeZone
 TimeZone DateFormat.getTimeZone()
Gets the time zone.

Methods in java.text with parameters of type TimeZone
 void DateFormat.setTimeZone(TimeZone zone)
Sets the time zone for the calendar of this DateFormat object.

Uses of TimeZone in java.util

Subclasses of TimeZone in java.util
 class SimpleTimeZone
SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.

Methods in java.util that return TimeZone
static TimeZone | TimeZone.getTimeZone(String ID) Gets the TimeZone for the given ID.
static TimeZone | TimeZone.getDefault() Gets the default TimeZone for this host.
TimeZone | Calendar.getTimeZone() Gets the time zone.

Methods in java.util with parameters of type TimeZone
static void | TimeZone.setDefault(TimeZone zone) Sets the TimeZone that is returned by the getDefault method.
boolean | TimeZone.hasSameRules(TimeZone other) Returns true if this zone has the same rule and offset as another zone.
boolean | SimpleTimeZone.hasSameRules(TimeZone other) Return true if this zone has the same rules and offset as another zone.
static Calendar | Calendar.getInstance(TimeZone zone) Gets a calendar using the specified time zone and default locale.
static Calendar | Calendar.getInstance(TimeZone zone, Locale aLocale) Gets a calendar with the specified time zone and locale.
void | Calendar.setTimeZone(TimeZone value) Sets the time zone with the given time zone value.

Constructors in java.util with parameters of type TimeZone
Calendar(TimeZone zone, Locale aLocale)
Constructs a calendar with the specified time zone and locale.
GregorianCalendar(TimeZone zone)
Constructs a GregorianCalendar based on the current time in the given time zone with the default locale.
GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.TooManyListenersException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.TooManyListenersException

Packages that use TooManyListenersException
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.
java.beans.beancontext | Provides classes and interfaces relating to bean context.

Uses of TooManyListenersException in java.awt.dnd

Methods in java.awt.dnd that throw TooManyListenersException
void | DragGestureRecognizer.addDragGestureListener(DragGestureListener dgl) Register a new DragGestureListener.
void | DragSourceContext.addDragSourceListener(DragSourceListener dsl) Add a DragSourceListener to this DragSourceContext if one has not already been added.
void | DropTarget.addDropTargetListener(DropTargetListener dtl) Add a new DropTargetListener (UNICAST SOURCE)

Uses of TooManyListenersException in java.beans.beancontext

Methods in java.beans.beancontext that throw TooManyListenersException
Object | BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) obtain a service which may be delegated
Object | BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) A BeanContextChild, or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via invocation of this method.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.Vector

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.Vector

Packages that use Vector
java.awt.image | Provides classes for creating and modifying images.
java.awt.image.renderable | Provides classes and interfaces for producing rendering-independent images.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of Vector in java.awt.image

Methods in java.awt.image that return Vector
Vector | RenderedImage.getSources() Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage.
Vector | BufferedImage.getSources() Returns a Vector of RenderedImage objects that are the immediate sources, not the sources of these immediate sources, of image data for this BufferedImage.

Uses of Vector in java.awt.image.renderable

Fields in java.awt.image.renderable declared as Vector
protected Vector | ParameterBlock.sources A Vector of sources, stored as arbitrary Objects.
protected Vector | ParameterBlock.parameters A Vector of non-source parameters, stored as arbitrary Objects.

Methods in java.awt.image.renderable that return Vector
Vector | RenderableImageOp.getSources() Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
Vector | RenderableImage.getSources() Returns a vector of RenderableImages that are the sources of image data for this RenderableImage.
Vector | ParameterBlock.getSources() Returns the entire Vector of sources.
Vector | ParameterBlock.getParameters() Returns the entire Vector of parameters.

Methods in java.awt.image.renderable with parameters of type Vector
void | ParameterBlock.setSources(Vector sources) Sets the entire Vector of sources to a given Vector.
void | ParameterBlock.setParameters(Vector parameters) Sets the entire Vector of parameters to a given Vector.

Constructors in java.awt.image.renderable with parameters of type Vector
ParameterBlock(Vector sources)
Constructs a ParameterBlock with a given Vector of sources.
ParameterBlock(Vector sources, Vector parameters)
Constructs a ParameterBlock with a given Vector of sources and Vector of parameters.

Uses of Vector in java.util

Subclasses of Vector in java.util
 class Stack
The Stack class represents a last-in-first-out (LIFO) stack of objects.

Uses of Vector in javax.accessibility

Fields in javax.accessibility declared as Vector
protected Vector | AccessibleStateSet.states Each entry in the Vector represents an AccessibleState.
protected Vector | AccessibleRelationSet.relations Each entry in the Vector represents an AccessibleRelation.

Uses of Vector in javax.naming

Fields in javax.naming declared as Vector
protected  Vector Reference.addrs
Contains the addresses contained in this Reference.

Uses of Vector in javax.naming.directory

Fields in javax.naming.directory declared as Vector
protected  Vector BasicAttribute.values
Holds the attribute's values.

Uses of Vector in javax.sound.midi

Fields in javax.sound.midi declared as Vector
protected Vector | Sequence.tracks The MIDI tracks in this sequence.
protected Vector | Track.events The list of MidiEvents contained in this track.

Uses of Vector in javax.swing

Fields in javax.swing declared as Vector
protected  Vector ButtonGroup.buttons

Methods in javax.swing with parameters of type Vector
 void JList.setListData(Vector listData)
Constructs a ListModel from a Vector and then applies setModel to it.

Constructors in javax.swing with parameters of type Vector
DefaultComboBoxModel(Vector v)
Constructs a DefaultComboBoxModel object initialized with a vector.
JComboBox(Vector items)
Creates a JComboBox that contains the elements in the specified Vector.
JList(Vector listData)
Constructs a JList that displays the elements in the specified Vector.
JTree(Vector value)
Returns a JTree with each element of the specified Vector as the child of a new root node which is not displayed.
JTable(Vector rowData, Vector columnNames)
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.

Uses of Vector in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return Vector
Vector | BasicDirectoryModel.getDirectories()
Vector | BasicDirectoryModel.getFiles()

Methods in javax.swing.plaf.basic with parameters of type Vector
protected  void BasicDirectoryModel.sort(Vector v)

Uses of Vector in javax.swing.plaf.multi

Fields in javax.swing.plaf.multi declared as Vector
protected Vector | MultiListUI.uis The Vector containing the real UI's.
protected Vector | MultiSeparatorUI.uis The Vector containing the real UI's.
protected Vector | MultiLabelUI.uis The Vector containing the real UI's.
protected Vector | MultiPopupMenuUI.uis The Vector containing the real UI's.
protected Vector | MultiPanelUI.uis The Vector containing the real UI's.
protected Vector | MultiScrollBarUI.uis The Vector containing the real UI's.
protected Vector | MultiTextUI.uis The Vector containing the real UI's.
protected Vector | MultiComboBoxUI.uis The Vector containing the real UI's.
protected Vector | MultiTableHeaderUI.uis The Vector containing the real UI's.
protected Vector | MultiFileChooserUI.uis The Vector containing the real UI's.
protected Vector | MultiColorChooserUI.uis The Vector containing the real UI's.
protected Vector | MultiTreeUI.uis The Vector containing the real UI's.
protected Vector | MultiViewportUI.uis The Vector containing the real UI's.
protected Vector | MultiTabbedPaneUI.uis The Vector containing the real UI's.
protected Vector | MultiProgressBarUI.uis The Vector containing the real UI's.
protected Vector | MultiScrollPaneUI.uis The Vector containing the real UI's.
protected Vector | MultiOptionPaneUI.uis The Vector containing the real UI's.
protected Vector | MultiSplitPaneUI.uis The Vector containing the real UI's.
protected Vector | MultiButtonUI.uis The Vector containing the real UI's.
protected Vector | MultiToolBarUI.uis The Vector containing the real UI's.
protected Vector | MultiSliderUI.uis The Vector containing the real UI's.
protected Vector | MultiDesktopPaneUI.uis The Vector containing the real UI's.
protected Vector | MultiTableUI.uis The Vector containing the real UI's.
protected Vector | MultiDesktopIconUI.uis The Vector containing the real UI's.
protected Vector | MultiMenuItemUI.uis The Vector containing the real UI's.
protected Vector | MultiInternalFrameUI.uis The Vector containing the real UI's.
protected Vector | MultiToolTipUI.uis The Vector containing the real UI's.
protected Vector | MultiMenuBarUI.uis The Vector containing the real UI's.

Methods in javax.swing.plaf.multi with parameters of type Vector
static ComponentUI | MultiLookAndFeel.createUIs(ComponentUI mui, Vector uis, JComponent target) Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
protected static ComponentUI[] | MultiLookAndFeel.uisToArray(Vector uis) Turn the Vector of UI's into an array.

Uses of Vector in javax.swing.table

Fields in javax.swing.table declared as Vector
protected Vector | DefaultTableModel.dataVector The Vector of Vectors of Object values.
protected Vector | DefaultTableModel.columnIdentifiers The Vector of column identifiers.
protected Vector | DefaultTableColumnModel.tableColumns Array of TableColumn objects in this model

Methods in javax.swing.table that return Vector
Vector | DefaultTableModel.getDataVector() Returns the Vector of Vectors that contains the table's data values.
protected static Vector | DefaultTableModel.convertToVector(Object[] anArray) Returns a vector that contains the same objects as the array.
protected static Vector | DefaultTableModel.convertToVector(Object[][] anArray) Returns a vector of vectors that contains the same objects as the array.

Methods in javax.swing.table with parameters of type Vector
void | DefaultTableModel.setDataVector(Vector newData, Vector columnNames) Replaces the current dataVector instance variable with the new Vector of rows, newData.
void | DefaultTableModel.setColumnIdentifiers(Vector newIdentifiers) Replaces the column identifiers in the model.
void | DefaultTableModel.addColumn(Object columnName, Vector columnData) Adds a column to the model.
void | DefaultTableModel.addRow(Vector rowData) Adds a row to the end of the model.
void | DefaultTableModel.insertRow(int row, Vector rowData) Inserts a row at row in the model.

Constructors in javax.swing.table with parameters of type Vector
DefaultTableModel(Vector columnNames, int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Vector data, Vector columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.

Uses of Vector in javax.swing.text

Methods in javax.swing.text that return Vector
protected Vector | StringContent.getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
protected Vector | GapContent.getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.

Methods in javax.swing.text with parameters of type Vector
protected Vector | StringContent.getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
protected void | StringContent.updateUndoPositions(Vector positions) Resets the location for all the UndoPosRef instances in positions.
protected Vector | GapContent.getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
protected void | GapContent.updateUndoPositions(Vector positions, int offset, int length) Resets the location for all the UndoPosRef instances in positions.

Uses of Vector in javax.swing.text.html

Fields in javax.swing.text.html declared as Vector
protected  Vector HTMLDocument.HTMLReader.parseBuffer

Uses of Vector in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as Vector
Vector | AttributeList.values
Vector | DTD.elements

Methods in javax.swing.text.html.parser with parameters of type Vector
 void ContentModel.getElements(Vector elemVec)
Update elemVec with the list of elements that are part of the this contentModel.

Constructors in javax.swing.text.html.parser with parameters of type Vector
AttributeList(String name, int type, int modifier, String value, Vector values, AttributeList next)
Create an attribute list element.

Uses of Vector in javax.swing.tree

Fields in javax.swing.tree declared as Vector
protected  Vector DefaultMutableTreeNode.children
array of children, may be null if this node has no children

Methods in javax.swing.tree with parameters of type Vector
protected  void DefaultTreeSelectionModel.notifyPathChange(Vector changedPaths, TreePath oldLeadSelection)
Notifies listeners of a change in path.

Uses of Vector in javax.swing.undo

Fields in javax.swing.undo declared as Vector
protected Vector | CompoundEdit.edits The collection of UndoableEdits undone/redone en masse by this CompoundEdit
protected Vector | UndoableEditSupport.listeners

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Collection

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Collection

Packages that use Collection
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Collection in java.awt

Methods in java.awt that return Collection
 Collection RenderingHints.values()
Returns a Collection view of the values contained in this RenderinHints.

Uses of Collection in java.beans.beancontext

Subinterfaces of Collection in java.beans.beancontext
interface | BeanContext The BeanContext acts a logical hierarchical container for JavaBeans.
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.

Classes in java.beans.beancontext that implement Collection
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Fields in java.beans.beancontext declared as Collection
protected  Collection BeanContextMembershipEvent.children
The list of children affected by this event notification.

Methods in java.beans.beancontext with parameters of type Collection
boolean | BeanContextSupport.containsAll(Collection c) Tests to see if all objects in the specified Collection are children of this BeanContext.
boolean | BeanContextSupport.addAll(Collection c) add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
boolean | BeanContextSupport.removeAll(Collection c) remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
boolean | BeanContextSupport.retainAll(Collection c) retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
protected void | BeanContextSupport.serialize(ObjectOutputStream oos, Collection coll) Used by writeObject to serialize a Collection.
protected void | BeanContextSupport.deserialize(ObjectInputStream ois, Collection coll) used by readObject to deserialize a collection.

Constructors in java.beans.beancontext with parameters of type Collection
BeanContextMembershipEvent(BeanContext bc, Collection changes)
Contruct a BeanContextMembershipEvent

Uses of Collection in java.security

Methods in java.security that return Collection
 Collection Provider.values()
Returns an unmodifiable Collection view of the property values contained in this provider.

Uses of Collection in java.security.cert

Methods in java.security.cert that return Collection
Collection | CertificateFactory.generateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
Collection | CertificateFactory.generateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
abstract Collection | CertificateFactorySpi.engineGenerateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.

Uses of Collection in java.util

Subinterfaces of Collection in java.util
interface | List An ordered collection (also known as a sequence).
interface | Set A collection that contains no duplicate elements.
interface | SortedSet A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time.

Classes in java.util that implement Collection
class | AbstractCollection This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
class | AbstractList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
class | AbstractSequentialList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
class | AbstractSet This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
class | ArrayList Resizable-array implementation of the List interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | LinkedList Linked list implementation of the List interface.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.
class | Vector The Vector class implements a growable array of objects.

Methods in java.util that return Collection
Collection | Hashtable.values() Returns a Collection view of the values contained in this Hashtable.
Collection | AbstractMap.values() Returns a collection view of the values contained in this map.
static Collection | Collections.unmodifiableCollection(Collection c) Returns an unmodifiable view of the specified collection.
static Collection | Collections.synchronizedCollection(Collection c) Returns a synchronized (thread-safe) collection backed by the specified collection.
Collection | TreeMap.values() Returns a collection view of the values contained in this map.
Collection | HashMap.values() Returns a collection view of the values contained in this map.
Collection | Map.values() Returns a collection view of the values contained in this map.

Methods in java.util with parameters of type Collection
boolean | AbstractCollection.containsAll(Collection c) Returns true if this collection contains all of the elements in the specified collection.
boolean | AbstractCollection.addAll(Collection c) Adds all of the elements in the specified collection to this collection (optional operation).
boolean | AbstractCollection.removeAll(Collection c) Removes from this collection all of its elements that are contained in the specified collection (optional operation).
boolean | AbstractCollection.retainAll(Collection c) Retains only the elements in this collection that are contained in the specified collection (optional operation).
boolean | AbstractSet.removeAll(Collection c) Removes from this set all of its elements that are contained in the specified collection (optional operation).
boolean | TreeSet.addAll(Collection c) Adds all of the elements in the specified collection to this set.
boolean | AbstractList.addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
boolean | Vector.containsAll(Collection c) Returns true if this Vector contains all of the elements in the specified Collection.
boolean | Vector.addAll(Collection c) Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator.
boolean | Vector.removeAll(Collection c) Removes from this Vector all of its elements that are contained in the specified Collection.
boolean | Vector.retainAll(Collection c) Retains only the elements in this Vector that are contained in the specified Collection.
boolean | Vector.addAll(int index, Collection c) Inserts all of the elements in in the specified Collection into this Vector at the specified position.
boolean | Collection.containsAll(Collection c) Returns true if this collection contains all of the elements in the specified collection.
boolean | Collection.addAll(Collection c) Adds all of the elements in the specified collection to this collection (optional operation).
boolean | Collection.removeAll(Collection c) Removes all this collection's elements that are also contained in the specified collection (optional operation).
boolean | Collection.retainAll(Collection c) Retains only the elements in this collection that are contained in the specified collection (optional operation).
static Object | Collections.min(Collection coll) Returns the minimum element of the given collection, according to the natural ordering of its elements.
static Object | Collections.min(Collection coll, Comparator comp) Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static Object | Collections.max(Collection coll) Returns the maximum element of the given collection, according to the natural ordering of its elements.
static Object | Collections.max(Collection coll, Comparator comp) Returns the maximum element of the given collection, according to the order induced by the specified comparator.
static Collection | Collections.unmodifiableCollection(Collection c) Returns an unmodifiable view of the specified collection.
static Collection | Collections.synchronizedCollection(Collection c) Returns a synchronized (thread-safe) collection backed by the specified collection.
static Enumeration | Collections.enumeration(Collection c) Returns an enumeration over the specified collection.
boolean | AbstractSequentialList.addAll(int index, Collection c) Inserts all of the elements in in the specified collection into this list at the specified position.
boolean | Set.containsAll(Collection c) Returns true if this set contains all of the elements of the specified collection.
boolean | Set.addAll(Collection c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation).
boolean | Set.retainAll(Collection c) Retains only the elements in this set that are contained in the specified collection (optional operation).
boolean | Set.removeAll(Collection c) Removes from this set all of its elements that are contained in the specified collection (optional operation).
boolean | LinkedList.addAll(Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
boolean | LinkedList.addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list, starting at the specified position.
boolean | List.containsAll(Collection c) Returns true if this list contains all of the elements of the specified collection.
boolean | List.addAll(Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).
boolean | List.addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
boolean | List.removeAll(Collection c) Removes from this list all the elements that are contained in the specified collection (optional operation).
boolean | List.retainAll(Collection c) Retains only the elements in this list that are contained in the specified collection (optional operation).
boolean | ArrayList.addAll(Collection c) Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator.
boolean | ArrayList.addAll(int index, Collection c) Inserts all of the elements in the specified Collection into this list, starting at the specified position.

Constructors in java.util with parameters of type Collection
TreeSet(Collection c)
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order.
Vector(Collection c)
Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator.
HashSet(Collection c)
Constructs a new set containing the elements in the specified collection.
LinkedList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
ArrayList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.

Uses of Collection in java.util.jar

Methods in java.util.jar that return Collection
 Collection Attributes.values()
Returns a Collection view of the attribute values contained in this Map.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Comparator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Comparator

Packages that use Comparator
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Comparator in java.lang

Fields in java.lang declared as Comparator
static Comparator String.CASE_INSENSITIVE_ORDER
Returns a Comparator that orders String objects as by compareToIgnoreCase.

Uses of Comparator in java.text

Classes in java.text that implement Comparator
class | Collator The Collator class performs locale-sensitive String comparison.
class | RuleBasedCollator The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.

Uses of Comparator in java.util

Methods in java.util that return Comparator
Comparator | TreeSet.comparator() Returns the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.
static Comparator | Collections.reverseOrder() Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
Comparator | SortedSet.comparator() Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
Comparator | TreeMap.comparator() Returns the comparator used to order this map, or null if this map uses its keys' natural order.
Comparator | SortedMap.comparator() Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.

Methods in java.util with parameters of type Comparator
static void | Arrays.sort(Object[] a, Comparator c) Sorts the specified array of objects according to the order induced by the specified comparator.
static void | Arrays.sort(Object[] a, int fromIndex, int toIndex, Comparator c) Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static int | Arrays.binarySearch(Object[] a, Object key, Comparator c) Searches the specified array for the specified object using the binary search algorithm.
static void | Collections.sort(List list, Comparator c) Sorts the specified list according to the order induced by the specified comparator.
static int | Collections.binarySearch(List list, Object key, Comparator c) Searches the specified list for the specified object using the binary search algorithm.
static Object | Collections.min(Collection coll, Comparator comp) Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static Object | Collections.max(Collection coll, Comparator comp) Returns the maximum element of the given collection, according to the order induced by the specified comparator.

Constructors in java.util with parameters of type Comparator
TreeSet(Comparator c)
Constructs a new, empty set, sorted according to the given comparator.
TreeMap(Comparator c)
Constructs a new, empty map, sorted according to the given comparator.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Enumeration

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Enumeration

Packages that use Enumeration
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.beans | Contains classes related to Java Beans development.
java.io | Provides for system input and output through data streams, serialization and the file system.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.net | Provides the classes for implementing networking applications.
java.security | Provides the classes and interfaces for the security framework.
java.security.acl | The classes and interfaces in this package have been superseded by classes in the java.security package.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Enumeration in java.applet

Methods in java.applet that return Enumeration
 Enumeration AppletContext.getApplets()
Finds all the applets in the document represented by this applet context.

Uses of Enumeration in java.awt

Methods in java.awt that return Enumeration
 Enumeration MenuBar.shortcuts()
Gets an enumeration of all menu shortcuts this menu bar is managing.

Uses of Enumeration in java.beans

Methods in java.beans that return Enumeration
 Enumeration FeatureDescriptor.attributeNames()
Gets an enumeration of the locale-independent names of this feature.

Uses of Enumeration in java.io

Constructors in java.io with parameters of type Enumeration
SequenceInputStream(Enumeration e)
Initializes a newly created SequenceInputStream by remembering the argument, which must be an Enumeration that produces objects whose run-time type is InputStream.

Uses of Enumeration in java.lang

Methods in java.lang that return Enumeration
Enumeration | ClassLoader.getResources(String name) Finds all the resources with the given name.
protected Enumeration | ClassLoader.findResources(String name) Returns an Enumeration of URLs representing all the resources with the given name.
static Enumeration | ClassLoader.getSystemResources(String name) Finds all resources of the specified name from the search path used to load classes.

Uses of Enumeration in java.net

Methods in java.net that return Enumeration
 Enumeration URLClassLoader.findResources(String name)
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.

Uses of Enumeration in java.security

Methods in java.security that return Enumeration
Enumeration | KeyStore.aliases() Lists all the alias names of this keystore.
abstract Enumeration | KeyStoreSpi.engineAliases() Lists all the alias names of this keystore.
abstract Enumeration | PermissionCollection.elements() Returns an enumeration of all the Permission objects in the collection.
Enumeration | Permissions.elements() Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.
abstract Enumeration | IdentityScope.identities() Deprecated. Returns an enumeration of all identities in this identity scope.

Uses of Enumeration in java.security.acl

Methods in java.security.acl that return Enumeration
Enumeration | AclEntry.permissions() Returns an enumeration of the permissions in this ACL entry.
Enumeration | Group.members() Returns an enumeration of the members in the group.
Enumeration | Acl.getPermissions(Principal user) Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group).
Enumeration | Acl.entries() Returns an enumeration of the entries in this ACL.

Uses of Enumeration in java.sql

Methods in java.sql that return Enumeration
static Enumeration DriverManager.getDrivers()
Retrieves an Enumeration with all of the currently loaded JDBC drivers to which the current caller has access.

Uses of Enumeration in java.util

Classes in java.util that implement Enumeration
 class StringTokenizer
The string tokenizer class allows an application to break a string into tokens.

Methods in java.util that return Enumeration
abstract Enumeration | Dictionary.keys() Returns an enumeration of the keys in this dictionary.
abstract Enumeration | Dictionary.elements() Returns an enumeration of the values in this dictionary.
Enumeration | Hashtable.keys() Returns an enumeration of the keys in this hashtable.
Enumeration | Hashtable.elements() Returns an enumeration of the values in this hashtable.
Enumeration | Properties.propertyNames() Returns an enumeration of all the keys in this property list, including the keys in the default property list.
Enumeration | Vector.elements() Returns an enumeration of the components of this vector.
abstract Enumeration | ResourceBundle.getKeys() Return an enumeration of the keys.
Enumeration | PropertyResourceBundle.getKeys() Implementation of ResourceBundle.getKeys.
static Enumeration | Collections.enumeration(Collection c) Returns an enumeration over the specified collection.
Enumeration | ListResourceBundle.getKeys() Implementation of ResourceBundle.getKeys.

Uses of Enumeration in java.util.jar

Methods in java.util.jar that return Enumeration
 Enumeration JarFile.entries()
Returns an enumeration of the ZIP file entries.

Uses of Enumeration in java.util.zip

Methods in java.util.zip that return Enumeration
 Enumeration ZipFile.entries()
Returns an enumeration of the ZIP file entries.

Uses of Enumeration in javax.naming

Subinterfaces of Enumeration in javax.naming
 interface NamingEnumeration
This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.

Methods in javax.naming that return Enumeration
Enumeration | Reference.getAll() Retrieves an enumeration of the addresses in this reference.
Enumeration | Name.getAll() Retrieves the components of this name as an enumeration of strings.
Enumeration | CompoundName.getAll() Retrieves the components of this compound name as an enumeration of strings.
Enumeration | CompositeName.getAll() Retrieves the components of this composite name as an enumeration of strings.

Constructors in javax.naming with parameters of type Enumeration
CompoundName(Enumeration comps, Properties syntax)
Constructs a new compound name instance using the components specified in comps and syntax.
CompositeName(Enumeration comps)
Constructs a new composite name instance using the components specified by 'comps'.

Uses of Enumeration in javax.swing

Methods in javax.swing that return Enumeration
Enumeration | ButtonGroup.getElements() Return all the buttons that are participating in this group.
Enumeration | JTree.getExpandedDescendants(TreePath parent) Returns an Enumeration of the descendants of the path parent that are currently expanded.
protected Enumeration | JTree.getDescendantToggledPaths(TreePath parent) Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
Enumeration | JTree.DynamicUtilTreeNode.children() Subclassed to load the children, if necessary.
Enumeration | DefaultListModel.elements() Returns an enumeration of the components of this list.

Methods in javax.swing with parameters of type Enumeration
protected  void JTree.removeDescendantToggledPaths(Enumeration toRemove)
Removes any descendants of the TreePaths in toRemove that have been expanded.

Uses of Enumeration in javax.swing.table

Methods in javax.swing.table that return Enumeration
Enumeration | DefaultTableColumnModel.getColumns() Returns an Enumeration of all the columns in the model.
Enumeration | TableColumnModel.getColumns() Returns an Enumeration of all the columns in the model.

Uses of Enumeration in javax.swing.text

Methods in javax.swing.text that return Enumeration
Enumeration | SimpleAttributeSet.getAttributeNames() Gets the names of the attributes in the set.
Enumeration | StyleContext.getStyleNames() Fetches the names of the styles defined.
Enumeration | StyleContext.SmallAttributeSet.getAttributeNames() Gets the names of all attributes.
Enumeration | StyleContext.NamedStyle.getAttributeNames() Gets the names of all attributes.
Enumeration | AbstractDocument.AbstractElement.getAttributeNames() Gets the names of all attributes.
abstract Enumeration | AbstractDocument.AbstractElement.children() Returns the children of the reciever as an Enumeration.
Enumeration | AbstractDocument.BranchElement.children() Returns the children of the reciever as an Enumeration.
Enumeration | AbstractDocument.LeafElement.children() Returns the children of the reciever as an Enumeration.
Enumeration | AttributeSet.getAttributeNames() Returns an enumeration over the names of the attributes in the set.
Enumeration | DefaultStyledDocument.getStyleNames() Fetches the list of of style names.

Methods in javax.swing.text with parameters of type Enumeration
void | SimpleAttributeSet.removeAttributes(Enumeration names) Removes a set of attributes from the list.
AttributeSet | StyleContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
void | StyleContext.NamedStyle.removeAttributes(Enumeration names) Removes a set of attributes for the element.
void | MutableAttributeSet.removeAttributes(Enumeration names) Creates a new attribute set similar to this one except that it contains no attribute with any of the given names.
AttributeSet | AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
void | AbstractDocument.AbstractElement.removeAttributes(Enumeration names) Removes a set of attributes for the element.

Uses of Enumeration in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Enumeration
 AttributeSet StyleSheet.removeAttributes(AttributeSet old, Enumeration names)
Removes a set of attributes for the element.

Uses of Enumeration in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that return Enumeration
 Enumeration AttributeList.getValues()

Uses of Enumeration in javax.swing.tree

Fields in javax.swing.tree declared as Enumeration
static Enumeration DefaultMutableTreeNode.EMPTY_ENUMERATION
An enumeration that is always empty.

Methods in javax.swing.tree that return Enumeration
Enumeration | DefaultMutableTreeNode.children() Creates and returns a forward-order enumeration of this node's children.
Enumeration | DefaultMutableTreeNode.preorderEnumeration() Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.
Enumeration | DefaultMutableTreeNode.postorderEnumeration() Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.
Enumeration | DefaultMutableTreeNode.breadthFirstEnumeration() Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.
Enumeration | DefaultMutableTreeNode.depthFirstEnumeration() Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.
Enumeration | DefaultMutableTreeNode.pathFromAncestorEnumeration(TreeNode ancestor) Creates and returns an enumeration that follows the path from ancestor to this node.
abstract Enumeration | AbstractLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
Enumeration | VariableHeightLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
Enumeration | FixedHeightLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
Enumeration | TreeNode.children() Returns the children of the reciever as an Enumeration.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.EventListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.EventListener

Packages that use EventListener
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
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.
java.awt.event | Provides interfaces and classes for dealing with different types of events fired by AWT components.
java.beans | Contains classes related to Java Beans development.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of EventListener in java.awt

Classes in java.awt that implement EventListener
class | AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | Component.AccessibleAWTComponent.AccessibleAWTComponentHandler Fire PropertyChange listener, if one is registered, when shown/hidden..
protected class | Component.AccessibleAWTComponent.AccessibleAWTFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
protected class | Container.AccessibleAWTContainer.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.

Fields in java.awt declared as EventListener
protected EventListener | AWTEventMulticaster.a
protected EventListener | AWTEventMulticaster.b

Methods in java.awt that return EventListener
 EventListener[] Component.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Container.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Scrollbar.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Scrollbar with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] MenuItem.getListeners(Class listenerType)
Return an array of all the listeners that were added to the MenuItem with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Checkbox.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Checkbox with addXXXListener(), where XXX is the name of the listenerType argument.
protected  EventListener AWTEventMulticaster.remove(EventListener oldl)
Removes a listener from this multicaster and returns the resulting multicast listener.
protected static EventListener AWTEventMulticaster.addInternal(EventListener a, EventListener b)
Returns the resulting multicast listener from adding listener-a and listener-b together.
protected static EventListener AWTEventMulticaster.removeInternal(EventListener l, EventListener oldl)
Returns the resulting multicast listener after removing the old listener from listener-l.
 EventListener[] Window.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] List.getListeners(Class listenerType)
Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] TextComponent.getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextComponent with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Choice.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Choice with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] TextField.getListeners(Class listenerType)
Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] Button.getListeners(Class listenerType)
Return an array of all the listeners that were added to the Button with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] CheckboxMenuItem.getListeners(Class listenerType)
Return an array of all the listeners that were added to the CheckboxMenuItem with addXXXListener(), where XXX is the name of the listenerType argument.

Methods in java.awt with parameters of type EventListener
protected EventListener | AWTEventMulticaster.remove(EventListener oldl) Removes a listener from this multicaster and returns the resulting multicast listener.
protected static EventListener | AWTEventMulticaster.addInternal(EventListener a, EventListener b) Returns the resulting multicast listener from adding listener-a and listener-b together.
protected static EventListener | AWTEventMulticaster.removeInternal(EventListener l, EventListener oldl) Returns the resulting multicast listener after removing the old listener from listener-l.
protected static void | AWTEventMulticaster.save(ObjectOutputStream s, String k, EventListener l)

Constructors in java.awt with parameters of type EventListener
AWTEventMulticaster(EventListener a, EventListener b)
Creates an event multicaster instance which chains listener-a with listener-b.

Uses of EventListener in java.awt.dnd

Subinterfaces of EventListener in java.awt.dnd
interface | DragGestureListener This interface is sourced from a DragGestureRecognizer and is invoked when an object of that (sub)class detects a drag initiating gesture.
interface | DragSourceListener The DragSourceListener defines the event interface for originators of Drag and Drop operations to track the state of the user's gesture, and to provide appropriate "drag over" feedback to the user throughout the Drag and Drop operation.
interface | DropTargetListener The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget.

Classes in java.awt.dnd that implement EventListener
class | DragSourceContext The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
class | DropTarget The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
protected static class | DropTarget.DropTargetAutoScroller this protected nested class implements autoscrolling
class | MouseDragGestureRecognizer This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures.

Uses of EventListener in java.awt.event

Subinterfaces of EventListener in java.awt.event
interface | ActionListener The listener interface for receiving action events.
interface | AdjustmentListener The listener interface for receiving adjustment events.
interface | AWTEventListener The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.
interface | ComponentListener The listener interface for receiving component events.
interface | ContainerListener The listener interface for receiving container events.
interface | FocusListener The listener interface for receiving keyboard focus events on a component.
interface | HierarchyBoundsListener The listener interface for receiving ancestor moved and resized events.
interface | HierarchyListener The listener interface for receiving hierarchy changed events.
interface | InputMethodListener The listener interface for receiving input method events.
interface | ItemListener The listener interface for receiving item events.
interface | KeyListener The listener interface for receiving keyboard events (keystrokes).
interface | MouseListener The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.
interface | MouseMotionListener The listener interface for receiving mouse motion events on a component.
interface | TextListener The listener interface for receiving text events.
interface | WindowListener The listener interface for receiving window events.

Classes in java.awt.event that implement EventListener
class | ComponentAdapter An abstract adapter class for receiving component events.
class | ContainerAdapter An abstract adapter class for receiving container events.
class | FocusAdapter An abstract adapter class for receiving keyboard focus events.
class | HierarchyBoundsAdapter An abstract adapter class for receiving ancestor moved and resized events.
class | KeyAdapter An abstract adapter class for receiving keyboard events.
class | MouseAdapter An abstract adapter class for receiving mouse events.
class | MouseMotionAdapter An abstract adapter class for receiving mouse motion events.
class | WindowAdapter An abstract adapter class for receiving window events.

Uses of EventListener in java.beans

Subinterfaces of EventListener in java.beans
interface | PropertyChangeListener A "PropertyChange" event gets fired whenever a bean changes a "bound" property.
interface | VetoableChangeListener A VetoableChange event gets fired whenever a bean changes a "constrained" property.

Uses of EventListener in java.beans.beancontext

Subinterfaces of EventListener in java.beans.beancontext
interface | BeanContextMembershipListener Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.
interface | BeanContextServiceRevokedListener The listener interface for receiving BeanContextServiceRevokedEvent objects.
interface | BeanContextServices The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.
interface | BeanContextServicesListener The listener interface for receiving BeanContextServiceAvailableEvent objects.

Classes in java.beans.beancontext that implement EventListener
class | BeanContextChildSupport This is a general support class to provide support for implementing the BeanContextChild protocol.
class | BeanContextServicesSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
protected class | BeanContextServicesSupport.BCSSProxyServiceProvider
class | BeanContextSupport This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Uses of EventListener in javax.naming.event

Subinterfaces of EventListener in javax.naming.event
interface | NamespaceChangeListener Specifies the methods that a listener interested in namespace changes must implement.
interface | NamingListener This interface is the root of listener interfaces that handle NamingEvents.
interface | ObjectChangeListener Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.

Uses of EventListener in javax.naming.ldap

Subinterfaces of EventListener in javax.naming.ldap
 interface UnsolicitedNotificationListener
This interface is for handling UnsolicitedNotificationEvent.

Uses of EventListener in javax.sound.midi

Subinterfaces of EventListener in javax.sound.midi
interface | ControllerEventListener The ControllerEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a requested type of MIDI control-change event.
interface | MetaEventListener The MetaEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a MetaMessage.

Uses of EventListener in javax.sound.sampled

Subinterfaces of EventListener in javax.sound.sampled
 interface LineListener
Instances of classes that implement the LineListener interface can register to receive events when a line's status changes.

Uses of EventListener in javax.swing

Subinterfaces of EventListener in javax.swing
 interface Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.

Classes in javax.swing that implement EventListener
class | AbstractAction This class provides default implementations for the JFC Action interface.
protected class | AbstractButton.ButtonChangeListener Extends ChangeListener to be serializable.
protected class | DefaultCellEditor.EditorDelegate
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
class | JComboBox A component that combines a button or text field and a drop-down list.
protected class | JComponent.AccessibleJComponent.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.
protected class | JComponent.AccessibleJComponent.AccessibleFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenu.WinListener A listener class that watches for a popup window closing.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTabbedPane.ModelListener We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.TreeModelHandler Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.
protected class | JTree.TreeSelectionRedirector Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
protected class | JViewport.ViewListener A listener for the view.
class | ToolTipManager Manages all the ToolTips in the system.
protected class | ToolTipManager.insideTimerAction
protected class | ToolTipManager.outsideTimerAction
protected class | ToolTipManager.stillInsideTimerAction

Methods in javax.swing that return EventListener
 EventListener[] DefaultSingleSelectionModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 EventListener[] JComponent.getListeners(Class listenerType)
Return an array of all the listeners that were added to this JComponent with addXXXListener(), where XXX is the name of the listenerType argument.
 EventListener[] DefaultBoundedRangeModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 EventListener[] AbstractListModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 EventListener[] DefaultListSelectionModel.getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
 EventListener[] Timer.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this timer.
 EventListener[] DefaultButtonModel.getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.

Uses of EventListener in javax.swing.event

Subinterfaces of EventListener in javax.swing.event
interface | AncestorListener AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors.
interface | CaretListener Listener for changes in the caret position of a text component.
interface | CellEditorListener CellEditorListener defines the interface for an object that listens to changes in a CellEditor
interface | ChangeListener Defines an object which listens for ChangeEvents.
interface | DocumentListener Interface for an observer to register to receive notifications of changes to a text document.
interface | HyperlinkListener HyperlinkListener
interface | InternalFrameListener The listener interface for receiving internal frame events.
interface | ListDataListener ListDataListener
interface | ListSelectionListener The listener that's notified when a lists selection value changes.
interface | MenuDragMouseListener Defines a menu mouse-drag listener.
interface | MenuKeyListener MenuKeyListener
interface | MenuListener Defines a listener for menu events.
interface | MouseInputListener A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.
interface | PopupMenuListener A popup menu listener
interface | TableColumnModelListener TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.
interface | TableModelListener TableModelListener defines the interface for an object that listens to changes in a TableModel.
interface | TreeExpansionListener The listener that's notified when a tree expands or collapses a node.
interface | TreeModelListener Defines the interface for an object that listens to changes in a TreeModel.
interface | TreeSelectionListener The listener that's notified when the selection in a TreeSelectionModel changes.
interface | TreeWillExpandListener The listener that's notified when a tree expands or collapses a node.
interface | UndoableEditListener Interface implemented by a class interested in hearing about undoable operations.

Classes in javax.swing.event that implement EventListener
class | InternalFrameAdapter An abstract adapter class for receiving internal frame events.
class | MouseInputAdapter The adapter which receives mouse events and mouse motion events.

Methods in javax.swing.event that return EventListener
 EventListener[] EventListenerList.getListeners(Class t)
Return an array of all the listeners of the given type.

Methods in javax.swing.event with parameters of type EventListener
void | EventListenerList.add(Class t, EventListener l) Adds the listener as a listener of the specified type.
void | EventListenerList.remove(Class t, EventListener l) Removes the listener as a listener of the specified type.

Uses of EventListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement EventListener
class | BasicButtonListener Button Listener
class | BasicColorChooserUI.PropertyHandler This inner class is marked "public" due to a compiler bug.
class | BasicComboBoxEditor The default editor for editable combo boxes
static class | BasicComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
class | BasicComboBoxUI.FocusHandler This listener hides the popup when the focus is lost.
class | BasicComboBoxUI.ItemHandler This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.
class | BasicComboBoxUI.KeyHandler This listener checks to see if the key event isn't a navigation key.
class | BasicComboBoxUI.ListDataHandler This listener watches for changes in the data and revalidates.
class | BasicComboBoxUI.PropertyChangeHandler This listener watches for bound properties that have changed in the JComboBox.
class | BasicComboPopup.InvocationKeyHandler This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
protected class | BasicComboPopup.InvocationMouseHandler This listener knows how and when to invoke this popup menu.
protected class | BasicComboPopup.InvocationMouseMotionHandler This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
protected class | BasicComboPopup.ItemHandler This listener watches for changes in the JComboBox's selection.
class | BasicComboPopup.ListDataHandler Keeps the selected index in the list in-sync with the combo box's selection.
protected class | BasicComboPopup.ListMouseHandler This listener hides the popup when the mouse is released in the list.
protected class | BasicComboPopup.ListMouseMotionHandler This listener changes the selected item as you move the mouse over the list.
protected class | BasicComboPopup.ListSelectionHandler This listener watches for changes in the list's selection and reports them to the combo box.
protected class | BasicComboPopup.PropertyChangeHandler This listener watches for bound property changes in JComboBox.
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
class | BasicDirectoryModel Basic implementation of a file list.
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.DoubleClickListener
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.SelectionListener
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
protected class | BasicInternalFrameUI.BasicInternalFrameListener
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.ComponentHandler
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicInternalFrameUI.InternalFramePropertyChangeListener
class | BasicLabelUI A Windows L&F implementation of LabelUI.
class | BasicListUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicListUI.ListDataHandler The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
class | BasicListUI.ListSelectionHandler The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
class | BasicListUI.PropertyChangeHandler The PropertyChangeListener that's added to the JList at installUI time.
protected class | BasicMenuItemUI.MouseInputHandler
class | BasicMenuUI.ChangeHandler
class | BasicOptionPaneUI.ButtonActionListener This inner class is marked "public" due to a compiler bug.
class | BasicOptionPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicProgressBarUI.ChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicRootPaneUI Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
protected class | BasicScrollBarUI.ArrowButtonListener Listener for cursor keys.
protected class | BasicScrollBarUI.ModelListener A listener to listen for model changes.
class | BasicScrollBarUI.PropertyChangeHandler
protected class | BasicScrollBarUI.ScrollListener Listener for scrolling events intiated in the ScrollPane.
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
class | BasicScrollPaneUI.HSBChangeListener Horizontal scrollbar listener.
class | BasicScrollPaneUI.PropertyChangeHandler
class | BasicScrollPaneUI.ViewportChangeHandler Listener for viewport events.
class | BasicScrollPaneUI.VSBChangeListener Vertical scrollbar listener.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicSliderUI.ChangeHandler Data model listener.
class | BasicSliderUI.ComponentHandler Listener for resizing events.
class | BasicSliderUI.FocusHandler Focus-change listener.
class | BasicSliderUI.PropertyChangeHandler
class | BasicSliderUI.ScrollListener Scroll-event listener.
class | BasicSliderUI.TrackListener Track mouse movements.
class | BasicSplitPaneDivider Divider used by BasicSplitPaneUI.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
class | BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses.
class | BasicSplitPaneUI.KeyboardDownRightHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardEndHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardHomeHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardResizeToggleHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardUpLeftHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.PropertyHandler Implementation of the PropertyChangeListener that the JSplitPane UI uses.
class | BasicTabbedPaneUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.MouseHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.TabSelectionHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableHeaderUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.KeyHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
static class | BasicTextUI.BasicCaret
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
protected class | BasicToolBarUI.FrameListener
protected class | BasicToolBarUI.PropertyListener
protected class | BasicToolBarUI.ToolBarContListener
protected class | BasicToolBarUI.ToolBarFocusListener
class | BasicTreeUI.CellEditorHandler Listener responsible for getting cell editing events and updating the tree accordingly.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).
class | BasicTreeUI.FocusHandler Repaints the lead selection row when focus is lost/gained.
class | BasicTreeUI.KeyHandler This is used to get mutliple key down events to appropriately generate events.
class | BasicTreeUI.MouseHandler TreeMouseListener is responsible for updating the selection based on mouse events.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.
class | BasicTreeUI.PropertyChangeHandler PropertyChangeListener for the tree.
class | BasicTreeUI.SelectionModelPropertyChangeHandler Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeExpansionHandler Updates the TreeState in response to nodes expanding/collapsing.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreeModelHandler Forwards all TreeModel events to the TreeState.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeSelectionHandler Listens for changes in the selection model and updates the display accordingly.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.

Uses of EventListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement EventListener
class | MetalComboBoxEditor The default editor for Metal editable combo boxes
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
class | MetalComboBoxUI.MetalPropertyChangeListener This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.DirectoryComboBoxAction Acts when DirectoryComboBox has changed the selected item.
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.SingleClickListener
class | MetalLabelUI A Windows L&F implementation of LabelUI.
protected class | MetalSliderUI.MetalPropertyListener
protected class | MetalToolBarUI.MetalContainerListener
protected class | MetalToolBarUI.MetalDockingListener
protected class | MetalToolBarUI.MetalRolloverListener

Uses of EventListener in javax.swing.table

Classes in javax.swing.table that implement EventListener
class | DefaultTableColumnModel The standard column-handler for a JTable.
class | JTableHeader This is the object which manages the header of the JTable.

Methods in javax.swing.table that return EventListener
EventListener[] | AbstractTableModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultTableColumnModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.

Uses of EventListener in javax.swing.text

Classes in javax.swing.text that implement EventListener
class | DefaultCaret A default implementation of Caret.
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
class | JTextComponent.AccessibleJTextComponent This class implements accessibility support for the JTextComponent class.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Methods in javax.swing.text that return EventListener
EventListener[] | StyleContext.NamedStyle.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
EventListener[] | AbstractDocument.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultCaret.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.

Uses of EventListener in javax.swing.text.html

Classes in javax.swing.text.html that implement EventListener
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
protected class | FormView.MouseEventListener MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.

Uses of EventListener in javax.swing.tree

Classes in javax.swing.tree that implement EventListener
 class DefaultTreeCellEditor
A TreeCellEditor.

Methods in javax.swing.tree that return EventListener
EventListener[] | DefaultTreeSelectionModel.getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
EventListener[] | DefaultTreeModel.getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.

Uses of EventListener in javax.swing.undo

Classes in javax.swing.undo that implement EventListener
 class UndoManager
Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Iterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Iterator

Packages that use Iterator
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.
java.beans.beancontext | Provides classes and interfaces relating to bean context.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Iterator in java.awt.dnd

Methods in java.awt.dnd that return Iterator
 Iterator DragGestureEvent.iterator()
This method returns an Iterator for the events comprising the gesture.

Uses of Iterator in java.beans.beancontext

Classes in java.beans.beancontext that implement Iterator
protected static class BeanContextSupport.BCSIterator
protected final subclass that encapsulates an iterator but implements a noop remove() method.

Methods in java.beans.beancontext that return Iterator
 Iterator BeanContextMembershipEvent.iterator()
Gets the array of children affected by this event.
 Iterator BeanContextServiceAvailableEvent.getCurrentServiceSelectors()
Gets the list of service dependent selectors.
 Iterator BeanContextSupport.iterator()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
protected  Iterator BeanContextSupport.bcsChildren()
Returns an iterator of all children of this BeanContext.
 Iterator BeanContextServicesSupport.getCurrentServiceClasses()
 Iterator BeanContextServicesSupport.getCurrentServiceSelectors(Class serviceClass)
 Iterator BeanContextServicesSupport.BCSSProxyServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
 Iterator BeanContextServiceProvider.getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
Invoked by BeanContextServices, this method gets the current service selectors for the specified service.
 Iterator BeanContextServices.getCurrentServiceClasses()
Gets the currently available services for this context.
 Iterator BeanContextServices.getCurrentServiceSelectors(Class serviceClass)
Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.

Uses of Iterator in java.util

Subinterfaces of Iterator in java.util
 interface ListIterator
An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.

Methods in java.util that return Iterator
abstract Iterator | AbstractCollection.iterator() Returns an iterator over the elements contained in this collection.
Iterator | TreeSet.iterator() Returns an iterator over the elements in this set.
Iterator | AbstractList.iterator() Returns an iterator over the elements in this list in proper sequence.
Iterator | Collection.iterator() Returns an iterator over the elements in this collection.
Iterator | AbstractSequentialList.iterator() Returns an iterator over the elements in this list (in proper sequence).
Iterator | HashSet.iterator() Returns an iterator over the elements in this set.
Iterator | Set.iterator() Returns an iterator over the elements in this set.
Iterator | List.iterator() Returns an iterator over the elements in this list in proper sequence.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.List

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.List

Packages that use List
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.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of List in java.awt.dnd

Methods in java.awt.dnd that return List
protected List | DropTargetContext.getCurrentDataFlavorsAsList() This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.
List | DropTargetDropEvent.getCurrentDataFlavorsAsList() This method returns the currently available DataFlavors as a java.util.List.
List | DropTargetDragEvent.getCurrentDataFlavorsAsList() This method returns the current DataFlavors as a java.util.List

Constructors in java.awt.dnd with parameters of type List
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
Construct a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.

Uses of List in java.util

Classes in java.util that implement List
class | AbstractList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
class | AbstractSequentialList This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
class | ArrayList Resizable-array implementation of the List interface.
class | LinkedList Linked list implementation of the List interface.
class | Stack The Stack class represents a last-in-first-out (LIFO) stack of objects.
class | Vector The Vector class implements a growable array of objects.

Fields in java.util declared as List
static List Collections.EMPTY_LIST
The empty list (immutable).

Methods in java.util that return List
static List | Arrays.asList(Object[] a) Returns a fixed-size list backed by the specified array.
List | AbstractList.subList(int fromIndex, int toIndex) Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.
List | Vector.subList(int fromIndex, int toIndex) Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
static List | Collections.unmodifiableList(List list) Returns an unmodifiable view of the specified list.
static List | Collections.synchronizedList(List list) Returns a synchronized (thread-safe) list backed by the specified list.
static List | Collections.singletonList(Object o) Returns an immutable list containing only the specified object.
static List | Collections.nCopies(int n, Object o) Returns an immutable list consisting of n copies of the specified object.
List | List.subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

Methods in java.util with parameters of type List
static void | Collections.sort(List list) Sorts the specified list into ascending order, according to the natural ordering of its elements.
static void | Collections.sort(List list, Comparator c) Sorts the specified list according to the order induced by the specified comparator.
static int | Collections.binarySearch(List list, Object key) Searches the specified list for the specified object using the binary search algorithm.
static int | Collections.binarySearch(List list, Object key, Comparator c) Searches the specified list for the specified object using the binary search algorithm.
static void | Collections.reverse(List l) Reverses the order of the elements in the specified list.
static void | Collections.shuffle(List list) Randomly permutes the specified list using a default source of randomness.
static void | Collections.shuffle(List list, Random rnd) Randomly permute the specified list using the specified source of randomness.
static void | Collections.fill(List list, Object o) Replaces all of the elements of the specified list with the specified element.
static void | Collections.copy(List dest, List src) Copies all of the elements from one list into another.
static List | Collections.unmodifiableList(List list) Returns an unmodifiable view of the specified list.
static List | Collections.synchronizedList(List list) Returns a synchronized (thread-safe) list backed by the specified list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.ListIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.ListIterator

Packages that use ListIterator
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of ListIterator in java.util

Methods in java.util that return ListIterator
ListIterator | AbstractList.listIterator() Returns an iterator of the elements in this list (in proper sequence).
ListIterator | AbstractList.listIterator(int index) Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
abstract ListIterator | AbstractSequentialList.listIterator(int index) Returns a list iterator over the elements in this list (in proper sequence).
ListIterator | LinkedList.listIterator(int index) Returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
ListIterator | List.listIterator() Returns a list iterator of the elements in this list (in proper sequence).
ListIterator | List.listIterator(int index) Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Map

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Map

Packages that use Map
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.datatransfer | Provides interfaces and classes for transferring data between and within applications.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.im | Provides classes and interfaces for the input method framework.
java.security | Provides the classes and interfaces for the security framework.
java.sql | Provides the API for accessing and processing data in a data source using the JavaTM programming language.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Map in java.awt

Classes in java.awt that implement Map
 class RenderingHints
The RenderingHints class contains rendering hints that can be used by the Graphics2D class, and classes that implement BufferedImageOp and Raster.

Fields in java.awt declared as Map
protected  Map Toolkit.desktopProperties

Methods in java.awt that return Map
Map | Font.getAttributes() Returns a map of font attributes available in this Font.
abstract Map | Toolkit.mapInputMethodHighlight(InputMethodHighlight highlight) Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.

Methods in java.awt with parameters of type Map
abstract void | Graphics2D.setRenderingHints(Map hints) Replaces the values of all preferences for the rendering algorithms with the specified hints.
abstract void | Graphics2D.addRenderingHints(Map hints) Sets the values of an arbitrary number of preferences for the rendering algorithms.
static Font | Font.getFont(Map attributes) Returns a Font appropriate to this attribute set.
Font | Font.deriveFont(Map attributes) Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
void | RenderingHints.putAll(Map m) Copies all of the mappings from the specified Map to this RenderingHints.

Constructors in java.awt with parameters of type Map
Font(Map attributes)
Creates a new Font with the specified attributes.
RenderingHints(Map init)
Constructs a new object with keys and values initialized from the specified Map object (which may be null).

Uses of Map in java.awt.datatransfer

Methods in java.awt.datatransfer that return Map
Map | SystemFlavorMap.getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names
Map | SystemFlavorMap.getFlavorsForNatives(String[] natives) map natives to corresponding flavors
Map | FlavorMap.getNativesForFlavors(DataFlavor[] flavors) map flavors to native data types names
Map | FlavorMap.getFlavorsForNatives(String[] natives) map natives to corresponding flavors

Uses of Map in java.awt.font

Constructors in java.awt.font with parameters of type Map
TextLayout(String string, Map attributes, FontRenderContext frc)
Constructs a TextLayout from a String and an attribute set.

Uses of Map in java.awt.im

Methods in java.awt.im that return Map
 Map InputMethodHighlight.getStyle()
Returns the rendering style attributes for the text range, or null.

Constructors in java.awt.im with parameters of type Map
InputMethodHighlight(boolean selected, int state, int variation, Map style)
Constructs an input method highlight record.

Uses of Map in java.security

Classes in java.security that implement Map
 class Provider
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security, including: Algorithms (such as DSA, RSA, MD5 or SHA-1).

Methods in java.security with parameters of type Map
void | Provider.putAll(Map t) Copies all of the mappings from the specified Map to this provider.
static Provider[] | Security.getProviders(Map filter) Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.

Uses of Map in java.sql

Methods in java.sql that return Map
 Map Connection.getTypeMap()
Gets the type map object associated with this connection.

Methods in java.sql with parameters of type Map
void | Connection.setTypeMap(Map map) Installs the given type map as the type map for this connection.
Object | CallableStatement.getObject(int i, Map map) Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
Object[] | Struct.getAttributes(Map map) Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents.
Object | Array.getArray(Map map) Retrieves the contents of the SQL array designated by this Array object.
Object | Array.getArray(long index, int count, Map map) Returns an array containing a slice of the SQL array object designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
ResultSet | Array.getResultSet(Map map) Returns a result set that contains the elements of the SQL ARRAY value designated by this Array object.
ResultSet | Array.getResultSet(long index, int count, Map map) Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
Object | ResultSet.getObject(int i, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object | ResultSet.getObject(String colName, Map map) Returns the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

Uses of Map in java.text

Methods in java.text that return Map
 Map AttributedCharacterIterator.getAttributes()
Returns a map with the attributes defined on the current character.

Methods in java.text with parameters of type Map
 void AttributedString.addAttributes(Map attributes, int beginIndex, int endIndex)
Adds a set of attributes to a subrange of the string.

Constructors in java.text with parameters of type Map
AttributedString(String text, Map attributes)
Constructs an AttributedString instance with the given text and attributes.

Uses of Map in java.util

Subinterfaces of Map in java.util
 interface SortedMap
A map that further guarantees that it will be in ascending key order, sorted according to the natural ordering of its keys (see the Comparable interface), or by a comparator provided at sorted map creation time.

Classes in java.util that implement Map
class | AbstractMap This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
class | HashMap Hash table based implementation of the Map interface.
class | Hashtable This class implements a hashtable, which maps keys to values.
class | Properties The Properties class represents a persistent set of properties.
class | TreeMap Red-Black tree based implementation of the SortedMap interface.
class | WeakHashMap A hashtable-based Map implementation with weak keys.

Fields in java.util declared as Map
static Map Collections.EMPTY_MAP
The empty map (immutable).

Methods in java.util that return Map
static Map | Collections.unmodifiableMap(Map m) Returns an unmodifiable view of the specified map.
static Map | Collections.synchronizedMap(Map m) Returns a synchronized (thread-safe) map backed by the specified map.
static Map | Collections.singletonMap(Object key, Object value) Returns an immutable map, mapping only the specified key to the specified value.

Methods in java.util with parameters of type Map
void | Hashtable.putAll(Map t) Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
void | AbstractMap.putAll(Map t) Copies all of the mappings from the specified map to this map (optional operation).
static Map | Collections.unmodifiableMap(Map m) Returns an unmodifiable view of the specified map.
static Map | Collections.synchronizedMap(Map m) Returns a synchronized (thread-safe) map backed by the specified map.
void | TreeMap.putAll(Map map) Copies all of the mappings from the specified map to this map.
void | HashMap.putAll(Map t) Copies all of the mappings from the specified map to this one.
void | Map.putAll(Map t) Copies all of the mappings from the specified map to this map (optional operation).

Constructors in java.util with parameters of type Map
Hashtable(Map t)
Constructs a new hashtable with the same mappings as the given Map.
WeakHashMap(Map t)
Constructs a new WeakHashMap with the same mappings as the specified Map.
TreeMap(Map m)
Constructs a new map containing the same mappings as the given map, sorted according to the keys' natural order.
HashMap(Map t)
Constructs a new map with the same mappings as the given map.

Uses of Map in java.util.jar

Classes in java.util.jar that implement Map
 class Attributes
The Attributes class maps Manifest attribute names to associated string values.

Fields in java.util.jar declared as Map
protected  Map Attributes.map
The attribute name-value mappings.

Methods in java.util.jar that return Map
 Map Manifest.getEntries()
Returns a Map of the entries contained in this Manifest.

Methods in java.util.jar with parameters of type Map
 void Attributes.putAll(Map attr)
Copies all of the attribute name-value mappings from the specified Attributes to this Map.

Uses of Map in javax.swing

Classes in javax.swing that implement Map
 class UIDefaults
A table of defaults for Swing components.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Observer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Observer

Packages that use Observer
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of Observer in java.util

Methods in java.util with parameters of type Observer
void | Observable.addObserver(Observer o) Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
void | Observable.deleteObserver(Observer o) Deletes an observer from the set of observers of this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.Set

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.Set

Packages that use Set
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.security | Provides the classes and interfaces for the security framework.
java.security.cert | Provides classes and interfaces for parsing and managing certificates.
java.text | Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Set in java.awt

Methods in java.awt that return Set
Set | RenderingHints.keySet() Returns a Set view of the Keys contained in this RenderingHints.
Set | RenderingHints.entrySet() Returns a Set view of the mappings contained in this RenderingHints.

Uses of Set in java.security

Methods in java.security that return Set
Set | Provider.entrySet() Returns an unmodifiable Set view of the property entries contained in this Provider.
Set | Provider.keySet() Returns an unmodifiable Set view of the property keys contained in this provider.

Uses of Set in java.security.cert

Methods in java.security.cert that return Set
Set | X509Extension.getCriticalExtensionOIDs() Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface.
Set | X509Extension.getNonCriticalExtensionOIDs() Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.
abstract Set | X509CRL.getRevokedCertificates() Gets all the entries from this CRL.

Uses of Set in java.text

Methods in java.text that return Set
 Set AttributedCharacterIterator.getAllAttributeKeys()
Returns the keys of all attributes defined on the iterator's text range.

Methods in java.text with parameters of type Set
int | AttributedCharacterIterator.getRunStart(Set attributes) Returns the index of the first character of the run with respect to the given attributes containing the current character.
int | AttributedCharacterIterator.getRunLimit(Set attributes) Returns the index of the first character following the run with respect to the given attributes containing the current character.

Uses of Set in java.util

Subinterfaces of Set in java.util
 interface SortedSet
A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time.

Classes in java.util that implement Set
class | AbstractSet This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
class | HashSet This class implements the Set interface, backed by a hash table (actually a HashMap instance).
class | TreeSet This class implements the Set interface, backed by a TreeMap instance.

Fields in java.util declared as Set
static Set Collections.EMPTY_SET
The empty set (immutable).

Methods in java.util that return Set
Set | Hashtable.keySet() Returns a Set view of the keys contained in this Hashtable.
Set | Hashtable.entrySet() Returns a Set view of the entries contained in this Hashtable.
Set | AbstractMap.keySet() Returns a Set view of the keys contained in this map.
abstract Set | AbstractMap.entrySet() Returns a set view of the mappings contained in this map.
static Set | Collections.unmodifiableSet(Set s) Returns an unmodifiable view of the specified set.
static Set | Collections.synchronizedSet(Set s) Returns a synchronized (thread-safe) set backed by the specified set.
static Set | Collections.singleton(Object o) Returns an immutable set containing only the specified object.
Set | WeakHashMap.entrySet() Returns a Set view of the mappings in this map.
Set | TreeMap.keySet() Returns a Set view of the keys contained in this map.
Set | TreeMap.entrySet() Returns a set view of the mappings contained in this map.
Set | HashMap.keySet() Returns a set view of the keys contained in this map.
Set | HashMap.entrySet() Returns a collection view of the mappings contained in this map.
Set | Map.keySet() Returns a set view of the keys contained in this map.
Set | Map.entrySet() Returns a set view of the mappings contained in this map.

Methods in java.util with parameters of type Set
static Set | Collections.unmodifiableSet(Set s) Returns an unmodifiable view of the specified set.
static Set | Collections.synchronizedSet(Set s) Returns a synchronized (thread-safe) set backed by the specified set.

Uses of Set in java.util.jar

Methods in java.util.jar that return Set
Set | Attributes.keySet() Returns a Set view of the attribute names (keys) contained in this Map.
Set | Attributes.entrySet() Returns a Collection view of the attribute name-value mappings contained in this Map.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.SortedMap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.SortedMap

Packages that use SortedMap
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of SortedMap in java.util

Classes in java.util that implement SortedMap
 class TreeMap
Red-Black tree based implementation of the SortedMap interface.

Methods in java.util that return SortedMap
static SortedMap | Collections.unmodifiableSortedMap(SortedMap m) Returns an unmodifiable view of the specified sorted map.
static SortedMap | Collections.synchronizedSortedMap(SortedMap m) Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.
SortedMap | TreeMap.subMap(Object fromKey, Object toKey) Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | TreeMap.headMap(Object toKey) Returns a view of the portion of this map whose keys are strictly less than toKey.
SortedMap | TreeMap.tailMap(Object fromKey) Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
SortedMap | SortedMap.subMap(Object fromKey, Object toKey) Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | SortedMap.headMap(Object toKey) Returns a view of the portion of this sorted map whose keys are strictly less than toKey.
SortedMap | SortedMap.tailMap(Object fromKey) Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.

Methods in java.util with parameters of type SortedMap
static SortedMap | Collections.unmodifiableSortedMap(SortedMap m) Returns an unmodifiable view of the specified sorted map.
static SortedMap | Collections.synchronizedSortedMap(SortedMap m) Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.

Constructors in java.util with parameters of type SortedMap
TreeMap(SortedMap m)
Constructs a new map containing the same mappings as the given SortedMap, sorted according to the same ordering.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.SortedSet

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.SortedSet

Packages that use SortedSet
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Uses of SortedSet in java.util

Classes in java.util that implement SortedSet
 class TreeSet
This class implements the Set interface, backed by a TreeMap instance.

Methods in java.util that return SortedSet
SortedSet | TreeSet.subSet(Object fromElement, Object toElement) Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | TreeSet.headSet(Object toElement) Returns a view of the portion of this set whose elements are strictly less than toElement.
SortedSet | TreeSet.tailSet(Object fromElement) Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
static SortedSet | Collections.unmodifiableSortedSet(SortedSet s) Returns an unmodifiable view of the specified sorted set.
static SortedSet | Collections.synchronizedSortedSet(SortedSet s) Returns a synchronized (thread-safe) sorted set backed by the specified sorted set.
SortedSet | SortedSet.subSet(Object fromElement, Object toElement) Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | SortedSet.headSet(Object toElement) Returns a view of the portion of this sorted set whose elements are strictly less than toElement.
SortedSet | SortedSet.tailSet(Object fromElement) Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.

Methods in java.util with parameters of type SortedSet
static SortedSet | Collections.unmodifiableSortedSet(SortedSet s) Returns an unmodifiable view of the specified sorted set.
static SortedSet | Collections.synchronizedSortedSet(SortedSet s) Returns a synchronized (thread-safe) sorted set backed by the specified sorted set.

Constructors in java.util with parameters of type SortedSet
TreeSet(SortedSet s)
Constructs a new set containing the same elements as the given sorted set, sorted according to the same ordering.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Collection

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Collection

All Known Subinterfaces:
BeanContext, BeanContextServices, List, Set, SortedSet
All Known Implementing Classes:
AbstractCollection
public interface Collection

The root interface in the collection hierarchy. A collection represents a group of objects, known as its elements. Some collections allow duplicate elements and others do not. Some are ordered and others unordered. The SDK does not provide any direct implementations of this interface: it provides implementations of more specific subinterfaces like Set and List. This interface is typically used to pass collections around and manipulate them where maximum generality is desired.

Bags or multisets (unordered collections that may contain duplicate elements) should implement this interface directly.

All general-purpose Collection implementation classes (which typically implement Collection indirectly through one of its subinterfaces) should provide two "standard" constructors: a void (no arguments) constructor, which creates an empty collection, and a constructor with a single argument of type Collection, which creates a new collection with the same elements as its argument. In effect, the latter constructor allows the user to copy any collection, producing an equivalent collection of the desired implementation type. There is no way to enforce this convention (as interfaces cannot contain constructors) but all of the general-purpose Collection implementations in the SDK comply.

Since:
1.2
See Also:
Set, List, Map, SortedSet, SortedMap, HashSet, TreeSet, ArrayList, LinkedList, Vector, Collections, Arrays, AbstractCollection

Method Summary
boolean | add(Object o) Ensures that this collection contains the specified element (optional operation).
boolean | addAll(Collection c) Adds all of the elements in the specified collection to this collection (optional operation).
void | clear() Removes all of the elements from this collection (optional operation).
boolean | contains(Object o) Returns true if this collection contains the specified element.
boolean | containsAll(Collection c) Returns true if this collection contains all of the elements in the specified collection.
boolean | equals(Object o) Compares the specified object with this collection for equality.
int | hashCode() Returns the hash code value for this collection.
boolean | isEmpty() Returns true if this collection contains no elements.
Iterator | iterator() Returns an iterator over the elements in this collection.
boolean | remove(Object o) Removes a single instance of the specified element from this collection, if it is present (optional operation).
boolean | removeAll(Collection c) Removes all this collection's elements that are also contained in the specified collection (optional operation).
boolean | retainAll(Collection c) Retains only the elements in this collection that are contained in the specified collection (optional operation).
int | size() Returns the number of elements in this collection.
Object[] | toArray() Returns an array containing all of the elements in this collection.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this collection whose runtime type is that of the specified array.

Method Detail

size

public int size()
Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
Returns:
the number of elements in this collection

isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.
Returns:
true if this collection contains no elements

contains

public boolean contains(Object o)
Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e)).
Parameters:
o - element whose presence in this collection is to be tested.
Returns:
true if this collection contains the specified element

iterator

public Iterator iterator()
Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee).
Returns:
an Iterator over the elements in this collection

toArray

public Object[] toArray()
Returns an array containing all of the elements in this collection. If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

The returned array will be "safe" in that no references to it are maintained by this collection. (In other words, this method must allocate a new array even if this collection is backed by an array). The caller is thus free to modify the returned array.

This method acts as bridge between array-based and collection-based APIs.

Returns:
an array containing all of the elements in this collection

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this collection whose runtime type is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.

If this collection fits in the specified array with room to spare (i.e., the array has more elements than this collection), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of this collection only if the caller knows that this collection does not contain any null elements.)

If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

Like the toArray method, this method acts as bridge between array-based and collection-based APIs. Further, this method allows precise control over the runtime type of the output array, and may, under certain circumstances, be used to save allocation costs

Suppose l is a List known to contain only strings. The following code can be used to dump the list into a newly allocated array of String:

     String[] x = (String[]) v.toArray(new String[0]);

Note that toArray(new Object[0]) is identical in function to toArray().

Parameters:
a - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this collection
Throws:
ArrayStoreException - the runtime type of the specified array is not a supertype of the runtime type of every element in this collection.

add

public boolean add(Object o)
Ensures that this collection contains the specified element (optional operation). Returns true if this collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.)

Collections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.

If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.

Parameters:
o - element whose presence in this collection is to be ensured.
Returns:
true if this collection changed as a result of the call
Throws:
UnsupportedOperationException - add is not supported by this collection.
ClassCastException - class of the specified element prevents it from being added to this collection.
IllegalArgumentException - some aspect of this element prevents it from being added to this collection.

remove

public boolean remove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if this collection contains one or more such elements. Returns true if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).
Parameters:
o - element to be removed from this collection, if present.
Returns:
true if this collection changed as a result of the call
Throws:
UnsupportedOperationException - remove is not supported by this collection.

containsAll

public boolean containsAll(Collection c)
Returns true if this collection contains all of the elements in the specified collection.
Parameters:
c - collection to be checked for containment in this collection.
Returns:
true if this collection contains all of the elements in the specified collection
See Also:
contains(Object)

addAll

public boolean addAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)
Parameters:
c - elements to be inserted into this collection.
Returns:
true if this collection changed as a result of the call
Throws:
UnsupportedOperationException - if this collection does not support the addAll method.
ClassCastException - if the class of an element of the specified collection prevents it from being added to this collection.
IllegalArgumentException - some aspect of an element of the specified collection prevents it from being added to this collection.
See Also:
add(Object)

removeAll

public boolean removeAll(Collection c)
Removes all this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.
Parameters:
c - elements to be removed from this collection.
Returns:
true if this collection changed as a result of the call
Throws:
UnsupportedOperationException - if the removeAll method is not supported by this collection.
See Also:
remove(Object), contains(Object)

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.
Parameters:
c - elements to be retained in this collection.
Returns:
true if this collection changed as a result of the call
Throws:
UnsupportedOperationException - if the retainAll method is not supported by this Collection.
See Also:
remove(Object), contains(Object)

clear

public void clear()
Removes all of the elements from this collection (optional operation). This collection will be empty after this method returns unless it throws an exception.
Throws:
UnsupportedOperationException - if the clear method is not supported by this collection.

equals

public boolean equals(Object o)
Compares the specified object with this collection for equality.

While the Collection interface adds no stipulations to the general contract for the Object.equals, programmers who implement the Collection interface "directly" (in other words, create a class that is a Collection but is not a Set or a List) must exercise care if they choose to override the Object.equals. It is not necessary to do so, and the simplest course of action is to rely on Object's implementation, but the implementer may wish to implement a "value comparison" in place of the default "reference comparison." (The List and Set interfaces mandate such value comparisons.)

The general contract for the Object.equals method states that equals must be symmetric (in other words, a.equals(b) if and only if b.equals(a)). The contracts for List.equals and Set.equals state that lists are only equal to other lists, and sets to other sets. Thus, a custom equals method for a collection class that implements neither the List nor Set interface must return false when this collection is compared to any list or set. (By the same logic, it is not possible to write a class that correctly implements both the Set and List interfaces.)

Overrides:
equals in class Object
Parameters:
o - Object to be compared for equality with this collection.
Returns:
true if the specified object is equal to this collection
See Also:
Object.equals(Object),
Set.equals(Object),
List.equals(Object)

hashCode

public int hashCode()
Returns the hash code value for this collection. While the Collection interface adds no stipulations to the general contract for the Object.hashCode method, programmers should take note that any class that overrides the Object.equals method must also override the Object.hashCode method in order to satisfy the general contract for the Object.hashCodemethod. In particular, c1.equals(c2) implies that c1.hashCode()==c2.hashCode().
Overrides:
hashCode in class Object
Returns:
the hash code value for this collection
See Also:
Object.hashCode(), Object.equals(Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Collections

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Collections

java.lang.Object
  |
  +--java.util.Collections
public class Collections
extends Object

This class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, "wrappers", which return a new collection backed by a specified collection, and a few other odds and ends.

The documentation for the polymorphic algorithms contained in this class generally includes a brief description of the implementation. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort does not have to be a mergesort, but it does have to be stable.)

Since:
1.2
See Also:
Collection, Set, List, Map

Field Summary
static List | EMPTY_LIST The empty list (immutable).
static Map | EMPTY_MAP The empty map (immutable).
static Set | EMPTY_SET The empty set (immutable).
Method Summary
static int | binarySearch(List list, Object key) Searches the specified list for the specified object using the binary search algorithm.
static int | binarySearch(List list, Object key, Comparator c) Searches the specified list for the specified object using the binary search algorithm.
static void | copy(List dest, List src) Copies all of the elements from one list into another.
static Enumeration | enumeration(Collection c) Returns an enumeration over the specified collection.
static void | fill(List list, Object o) Replaces all of the elements of the specified list with the specified element.
static Object | max(Collection coll) Returns the maximum element of the given collection, according to the natural ordering of its elements.
static Object | max(Collection coll, Comparator comp) Returns the maximum element of the given collection, according to the order induced by the specified comparator.
static Object | min(Collection coll) Returns the minimum element of the given collection, according to the natural ordering of its elements.
static Object | min(Collection coll, Comparator comp) Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static List | nCopies(int n, Object o) Returns an immutable list consisting of n copies of the specified object.
static void | reverse(List l) Reverses the order of the elements in the specified list.
static Comparator | reverseOrder() Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
static void | shuffle(List list) Randomly permutes the specified list using a default source of randomness.
static void | shuffle(List list, Random rnd) Randomly permute the specified list using the specified source of randomness.
static Set | singleton(Object o) Returns an immutable set containing only the specified object.
static List | singletonList(Object o) Returns an immutable list containing only the specified object.
static Map | singletonMap(Object key, Object value) Returns an immutable map, mapping only the specified key to the specified value.
static void | sort(List list) Sorts the specified list into ascending order, according to the natural ordering of its elements.
static void | sort(List list, Comparator c) Sorts the specified list according to the order induced by the specified comparator.
static Collection | synchronizedCollection(Collection c) Returns a synchronized (thread-safe) collection backed by the specified collection.
static List | synchronizedList(List list) Returns a synchronized (thread-safe) list backed by the specified list.
static Map | synchronizedMap(Map m) Returns a synchronized (thread-safe) map backed by the specified map.
static Set | synchronizedSet(Set s) Returns a synchronized (thread-safe) set backed by the specified set.
static SortedMap | synchronizedSortedMap(SortedMap m) Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.
static SortedSet | synchronizedSortedSet(SortedSet s) Returns a synchronized (thread-safe) sorted set backed by the specified sorted set.
static Collection | unmodifiableCollection(Collection c) Returns an unmodifiable view of the specified collection.
static List | unmodifiableList(List list) Returns an unmodifiable view of the specified list.
static Map | unmodifiableMap(Map m) Returns an unmodifiable view of the specified map.
static Set | unmodifiableSet(Set s) Returns an unmodifiable view of the specified set.
static SortedMap | unmodifiableSortedMap(SortedMap m) Returns an unmodifiable view of the specified sorted map.
static SortedSet | unmodifiableSortedSet(SortedSet s) Returns an unmodifiable view of the specified sorted set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EMPTY_SET

public static final Set EMPTY_SET
The empty set (immutable). This set is serializable.

EMPTY_LIST

public static final List EMPTY_LIST
The empty list (immutable). This list is serializable.

EMPTY_MAP

public static final Map EMPTY_MAP
The empty map (immutable). This map is serializable.
Since:
1.3
Method Detail

sort

public static void sort(List list)
Sorts the specified list into ascending order, according to the natural ordering of its elements. All elements in the list must implement the Comparable interface. Furthermore, all elements in the list must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the list).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The specified list must be modifiable, but need not be resizable.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n log(n) performance, and can approach linear performance on nearly sorted lists.

This implementation dumps the specified list into an array, sorts the array, and iterates over the list resetting each element from the corresponding position in the array. This avoids the n2 log(n) performance that would result from attempting to sort a linked list in place.

Parameters:
list - the list to be sorted.
Throws:
ClassCastException - if the list contains elements that are not mutually comparable (for example, strings and integers).
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.
See Also:
Comparable

sort

public static void sort(List list,
                        Comparator c)
Sorts the specified list according to the order induced by the specified comparator. All elements in the list must be mutually comparable using the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the list).

This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.

The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n log(n) performance, and can approach linear performance on nearly sorted lists.

The specified list must be modifiable, but need not be resizable. This implementation dumps the specified list into an array, sorts the array, and iterates over the list resetting each element from the corresponding position in the array. This avoids the n2 log(n) performance that would result from attempting to sort a linked list in place.

Parameters:
list - the list to be sorted.
c - the comparator to determine the order of the list. A null value indicates that the elements' natural ordering should be used.
Throws:
ClassCastException - if the list contains elements that are not mutually comparable using the specified comparator.
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.
See Also:
Comparator

binarySearch

public static int binarySearch(List list,
                               Object key)
Searches the specified list for the specified object using the binary search algorithm. The list must be sorted into ascending order according to the natural ordering of its elements (as by the sort(List) method, above) prior to making this call. If it is not sorted, the results are undefined. If the list contains multiple elements equal to the specified object, there is no guarantee which one will be found.

This method runs in log(n) time for a "random access" list (which provides near-constant-time positional access). It may run in n log(n) time if it is called on a "sequential access" list (which provides linear-time positional access).

If the specified list implements the AbstracSequentialList interface, this method will do a sequential search instead of a binary search; this offers linear performance instead of n log(n) performance if this method is called on a LinkedList object.
Parameters:
list - the list to be searched.
key - the key to be searched for.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
Throws:
ClassCastException - if the list contains elements that are not mutually comparable (for example, strings and integers), or the search key in not mutually comparable with the elements of the list.
See Also:
Comparable, sort(List)

binarySearch

public static int binarySearch(List list,
                               Object key,
                               Comparator c)
Searches the specified list for the specified object using the binary search algorithm. The list must be sorted into ascending order according to the specified comparator (as by the Sort(List, Comparator) method, above), prior to making this call. If it is not sorted, the results are undefined. If the list contains multiple elements equal to the specified object, there is no guarantee which one will be found.

This method runs in log(n) time for a "random access" list (which provides near-constant-time positional access). It may run in n log(n) time if it is called on a "sequential access" list (which provides linear-time positional access).

If the specified list implements the AbstracSequentialList interface, this method will do a sequential search instead of a binary search; this offers linear performance instead of n log(n) performance if this method is called on a LinkedList object.
Parameters:
list - the list to be searched.
key - the key to be searched for.
c - the comparator by which the list is ordered. A null value indicates that the elements' natural ordering should be used.
Returns:
index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.
Throws:
ClassCastException - if the list contains elements that are not mutually comparable using the specified comparator, or the search key in not mutually comparable with the elements of the list using this comparator.
See Also:
Comparable, sort(List, Comparator)

reverse

public static void reverse(List l)
Reverses the order of the elements in the specified list.

This method runs in linear time.

Parameters:
l - the list whose elements are to be reversed.
Throws:
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.

shuffle

public static void shuffle(List list)
Randomly permutes the specified list using a default source of randomness. All permutations occur with approximately equal likelihood.

The hedge "approximately" is used in the foregoing description because default source of randomenss is only approximately an unbiased source of independently chosen bits. If it were a perfect source of randomly chosen bits, then the algorithm would choose permutations with perfect uniformity.

This implementation traverses the list backwards, from the last element up to the second, repeatedly swapping a randomly selected element into the "current position". Elements are randomly selected from the portion of the list that runs from the first element to the current position, inclusive.

This method runs in linear time for a "random access" list (which provides near-constant-time positional access). It may require quadratic time for a "sequential access" list.

Parameters:
list - the list to be shuffled.
Throws:
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.

shuffle

public static void shuffle(List list,
                           Random rnd)
Randomly permute the specified list using the specified source of randomness. All permutations occur with equal likelihood assuming that the source of randomness is fair.

This implementation traverses the list backwards, from the last element up to the second, repeatedly swapping a randomly selected element into the "current position". Elements are randomly selected from the portion of the list that runs from the first element to the current position, inclusive.

This method runs in linear time for a "random access" list (which provides near-constant-time positional access). It may require quadratic time for a "sequential access" list.

Parameters:
list - the list to be shuffled.
rnd - the source of randomness to use to shuffle the list.
Throws:
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.

fill

public static void fill(List list,
                        Object o)
Replaces all of the elements of the specified list with the specified element.

This method runs in linear time.

Parameters:
list - the list to be filled with the specified element.
o - The element with which to fill the specified list.
Throws:
UnsupportedOperationException - if the specified list's list-iterator does not support the set operation.

copy

public static void copy(List dest,
                        List src)
Copies all of the elements from one list into another. After the operation, the index of each copied element in the destination list will be identical to its index in the source list. The destination list must be at least as long as the source list. If it is longer, the remaining elements in the destination list are unaffected.

This method runs in linear time.

Parameters:
dest - The destination list.
src - The source list.
Throws:
IndexOutOfBoundsException - if the destination list is too small to contain the entire source List.
UnsupportedOperationException - if the destination list's list-iterator does not support the set operation.

min

public static Object min(Collection coll)
Returns the minimum element of the given collection, according to the natural ordering of its elements. All elements in the collection must implement the Comparable interface. Furthermore, all elements in the collection must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the collection).

This method iterates over the entire collection, hence it requires time proportional to the size of the collection.

Parameters:
coll - the collection whose minimum element is to be determined.
Returns:
the minimum element of the given collection, according to the natural ordering of its elements.
Throws:
ClassCastException - if the collection contains elements that are not mutually comparable (for example, strings and integers).
NoSuchElementException - if the collection is empty.
See Also:
Comparable

min

public static Object min(Collection coll,
                         Comparator comp)
Returns the minimum element of the given collection, according to the order induced by the specified comparator. All elements in the collection must be mutually comparable by the specified comparator (that is, comp.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the collection).

This method iterates over the entire collection, hence it requires time proportional to the size of the collection.

Parameters:
coll - the collection whose minimum element is to be determined.
comp - the comparator with which to determine the minimum element. A null value indicates that the elements' natural ordering should be used.
Returns:
the minimum element of the given collection, according to the specified comparator.
Throws:
ClassCastException - if the collection contains elements that are not mutually comparable using the specified comparator.
NoSuchElementException - if the collection is empty.
See Also:
Comparable

max

public static Object max(Collection coll)
Returns the maximum element of the given collection, according to the natural ordering of its elements. All elements in the collection must implement the Comparable interface. Furthermore, all elements in the collection must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the collection).

This method iterates over the entire collection, hence it requires time proportional to the size of the collection.

Parameters:
coll - the collection whose maximum element is to be determined.
Returns:
the maximum element of the given collection, according to the natural ordering of its elements.
Throws:
ClassCastException - if the collection contains elements that are not mutually comparable (for example, strings and integers).
NoSuchElementException - if the collection is empty.
See Also:
Comparable

max

public static Object max(Collection coll,
                         Comparator comp)
Returns the maximum element of the given collection, according to the order induced by the specified comparator. All elements in the collection must be mutually comparable by the specified comparator (that is, comp.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the collection).

This method iterates over the entire collection, hence it requires time proportional to the size of the collection.

Parameters:
coll - the collection whose maximum element is to be determined.
comp - the comparator with which to determine the maximum element. A null value indicates that the elements' natural ordering should be used.
Returns:
the maximum element of the given collection, according to the specified comparator.
Throws:
ClassCastException - if the collection contains elements that are not mutually comparable using the specified comparator.
NoSuchElementException - if the collection is empty.
See Also:
Comparable

unmodifiableCollection

public static Collection unmodifiableCollection(Collection c)
Returns an unmodifiable view of the specified collection. This method allows modules to provide users with "read-only" access to internal collections. Query operations on the returned collection "read through" to the specified collection, and attempts to modify the returned collection, whether direct or via its iterator, result in an UnsupportedOperationException.

The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list.

The returned collection will be serializable if the specified collection is serializable.

Parameters:
c - the collection for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified collection.

unmodifiableSet

public static Set unmodifiableSet(Set s)
Returns an unmodifiable view of the specified set. This method allows modules to provide users with "read-only" access to internal sets. Query operations on the returned set "read through" to the specified set, and attempts to modify the returned set, whether direct or via its iterator, result in an UnsupportedOperationException.

The returned set will be serializable if the specified set is serializable.

Parameters:
s - the set for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified set.

unmodifiableSortedSet

public static SortedSet unmodifiableSortedSet(SortedSet s)
Returns an unmodifiable view of the specified sorted set. This method allows modules to provide users with "read-only" access to internal sorted sets. Query operations on the returned sorted set "read through" to the specified sorted set. Attempts to modify the returned sorted set, whether direct, via its iterator, or via its subSet, headSet, or tailSet views, result in an UnsupportedOperationException.

The returned sorted set will be serializable if the specified sorted set is serializable.

Parameters:
s - the sorted set for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified sorted set.

unmodifiableList

public static List unmodifiableList(List list)
Returns an unmodifiable view of the specified list. This method allows modules to provide users with "read-only" access to internal lists. Query operations on the returned list "read through" to the specified list, and attempts to modify the returned list, whether direct or via its iterator, result in an UnsupportedOperationException.

The returned list will be serializable if the specified list is serializable.

Parameters:
list - the list for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified list.

unmodifiableMap

public static Map unmodifiableMap(Map m)
Returns an unmodifiable view of the specified map. This method allows modules to provide users with "read-only" access to internal maps. Query operations on the returned map "read through" to the specified map, and attempts to modify the returned map, whether direct or via its collection views, result in an UnsupportedOperationException.

The returned map will be serializable if the specified map is serializable.

Parameters:
m - the map for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified map.

unmodifiableSortedMap

public static SortedMap unmodifiableSortedMap(SortedMap m)
Returns an unmodifiable view of the specified sorted map. This method allows modules to provide users with "read-only" access to internal sorted maps. Query operations on the returned sorted map "read through" to the specified sorted map. Attempts to modify the returned sorted map, whether direct, via its collection views, or via its subMap, headMap, or tailMap views, result in an UnsupportedOperationException.

The returned sorted map will be serializable if the specified sorted map is serializable.

Parameters:
m - the sorted map for which an unmodifiable view is to be returned.
Returns:
an unmodifiable view of the specified sorted map.

synchronizedCollection

public static Collection synchronizedCollection(Collection c)
Returns a synchronized (thread-safe) collection backed by the specified collection. In order to guarantee serial access, it is critical that all access to the backing collection is accomplished through the returned collection.

It is imperative that the user manually synchronize on the returned collection when iterating over it:

  Collection c = Collections.synchronizedCollection(myCollection);
     ...
  synchronized(c) {
      Iterator i = c.iterator(); // Must be in the synchronized block
      while (i.hasNext())
         foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list.

The returned collection will be serializable if the specified collection is serializable.

Parameters:
c - the collection to be "wrapped" in a synchronized collection.
Returns:
a synchronized view of the specified collection.

synchronizedSet

public static Set synchronizedSet(Set s)
Returns a synchronized (thread-safe) set backed by the specified set. In order to guarantee serial access, it is critical that all access to the backing set is accomplished through the returned set.

It is imperative that the user manually synchronize on the returned set when iterating over it:

  Set s = Collections.synchronizedSet(new HashSet());
      ...
  synchronized(s) {
      Iterator i = s.iterator(); // Must be in the synchronized block
      while (i.hasNext())
          foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned set will be serializable if the specified set is serializable.

Parameters:
s - the set to be "wrapped" in a synchronized set.
Returns:
a synchronized view of the specified set.

synchronizedSortedSet

public static SortedSet synchronizedSortedSet(SortedSet s)
Returns a synchronized (thread-safe) sorted set backed by the specified sorted set. In order to guarantee serial access, it is critical that all access to the backing sorted set is accomplished through the returned sorted set (or its views).

It is imperative that the user manually synchronize on the returned sorted set when iterating over it or any of its subSet, headSet, or tailSet views.

  SortedSet s = Collections.synchronizedSortedSet(new HashSortedSet());
      ...
  synchronized(s) {
      Iterator i = s.iterator(); // Must be in the synchronized block
      while (i.hasNext())
          foo(i.next());
  }
or:
  SortedSet s = Collections.synchronizedSortedSet(new HashSortedSet());
  SortedSet s2 = s.headSet(foo);
      ...
  synchronized(s) {  // Note: s, not s2!!!
      Iterator i = s2.iterator(); // Must be in the synchronized block
      while (i.hasNext())
          foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned sorted set will be serializable if the specified sorted set is serializable.

Parameters:
s - the sorted set to be "wrapped" in a synchronized sorted set.
Returns:
a synchronized view of the specified sorted set.

synchronizedList

public static List synchronizedList(List list)
Returns a synchronized (thread-safe) list backed by the specified list. In order to guarantee serial access, it is critical that all access to the backing list is accomplished through the returned list.

It is imperative that the user manually synchronize on the returned list when iterating over it:

  List list = Collections.synchronizedList(new ArrayList());
      ...
  synchronized(list) {
      Iterator i = list.iterator(); // Must be in synchronized block
      while (i.hasNext())
          foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned list will be serializable if the specified list is serializable.

Parameters:
list - the list to be "wrapped" in a synchronized list.
Returns:
a synchronized view of the specified list.

synchronizedMap

public static Map synchronizedMap(Map m)
Returns a synchronized (thread-safe) map backed by the specified map. In order to guarantee serial access, it is critical that all access to the backing map is accomplished through the returned map.

It is imperative that the user manually synchronize on the returned map when iterating over any of its collection views:

  Map m = Collections.synchronizedMap(new HashMap());
      ...
  Set s = m.keySet();  // Needn't be in synchronized block
      ...
  synchronized(m) {  // Synchronizing on m, not s!
      Iterator i = s.iterator(); // Must be in synchronized block
      while (i.hasNext())
          foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned map will be serializable if the specified map is serializable.

Parameters:
m - the map to be "wrapped" in a synchronized map.
Returns:
a synchronized view of the specified map.

synchronizedSortedMap

public static SortedMap synchronizedSortedMap(SortedMap m)
Returns a synchronized (thread-safe) sorted map backed by the specified sorted map. In order to guarantee serial access, it is critical that all access to the backing sorted map is accomplished through the returned sorted map (or its views).

It is imperative that the user manually synchronize on the returned sorted map when iterating over any of its collection views, or the collections views of any of its subMap, headMap or tailMap views.

  SortedMap m = Collections.synchronizedSortedMap(new HashSortedMap());
      ...
  Set s = m.keySet();  // Needn't be in synchronized block
      ...
  synchronized(m) {  // Synchronizing on m, not s!
      Iterator i = s.iterator(); // Must be in synchronized block
      while (i.hasNext())
          foo(i.next());
  }
or:
  SortedMap m = Collections.synchronizedSortedMap(new HashSortedMap());
  SortedMap m2 = m.subMap(foo, bar);
      ...
  Set s2 = m2.keySet();  // Needn't be in synchronized block
      ...
  synchronized(m) {  // Synchronizing on m, not m2 or s2!
      Iterator i = s.iterator(); // Must be in synchronized block
      while (i.hasNext())
          foo(i.next());
  }
Failure to follow this advice may result in non-deterministic behavior.

The returned sorted map will be serializable if the specified sorted map is serializable.

Parameters:
m - the sorted map to be "wrapped" in a synchronized sorted map.
Returns:
a synchronized view of the specified sorted map.

singleton

public static Set singleton(Object o)
Returns an immutable set containing only the specified object. The returned set is serializable.
Parameters:
o - the sole object to be stored in the returned set.
Returns:
an immutable set containing only the specified object.

singletonList

public static List singletonList(Object o)
Returns an immutable list containing only the specified object. The returned list is serializable.
Parameters:
o - the sole object to be stored in the returned list.
Returns:
an immutable list containing only the specified object.
Since:
1.3

singletonMap

public static Map singletonMap(Object key,
                               Object value)
Returns an immutable map, mapping only the specified key to the specified value. The returned map is serializable.
Parameters:
key - the sole key to be stored in the returned map.
value - the value to which the returned map maps key.
Returns:
an immutable map containing only the specified key-value mapping.
Since:
1.3

nCopies

public static List nCopies(int n,
                           Object o)
Returns an immutable list consisting of n copies of the specified object. The newly allocated data object is tiny (it contains a single reference to the data object). This method is useful in combination with the List.addAll method to grow lists. The returned list is serializable.
Parameters:
n - the number of elements in the returned list.
o - the element to appear repeatedly in the returned list.
Returns:
an immutable list consisting of n copies of the specified object.
Throws:
IllegalArgumentException - if n < 0.
See Also:
List.addAll(Collection), List.addAll(int, Collection)

reverseOrder

public static Comparator reverseOrder()
Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface. (The natural ordering is the ordering imposed by the objects' own compareTo method.) This enables a simple idiom for sorting (or maintaining) collections (or arrays) of objects that implement the Comparable interface in reverse-natural-order. For example, suppose a is an array of strings. Then:
         Arrays.sort(a, Collections.reverseOrder());
sorts the array in reverse-lexicographic (alphabetical) order.

The returned comparator is serializable.

Returns:
a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
See Also:
Comparable

enumeration

public static Enumeration enumeration(Collection c)
Returns an enumeration over the specified collection. This provides interoperatbility with legacy APIs that require an enumeration as input.
Parameters:
c - the collection for which an enumeration is to be returned.
Returns:
an enumeration over the specified collection.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Comparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Comparator

All Known Implementing Classes:
Collator
public interface Comparator

A comparison function, which imposes a total ordering on some collection of objects. Comparators can be passed to a sort method (such as Collections.sort) to allow precise control over the sort order. Comparators can also be used to control the order of certain data structures (such as TreeSet or TreeMap).

The ordering imposed by a Comparator c on a set of elements S is said to be consistent with equals if and only if (compare((Object)e1, (Object)e2)==0) has the same boolean value as e1.equals((Object)e2) for every e1 and e2 in S.

Caution should be exercised when using a comparator capable of imposing an ordering inconsistent with equals to order a sorted set (or sorted map). Suppose a sorted set (or sorted map) with an explicit Comparator c is used with elements (or keys) drawn from a set S. If the ordering imposed by c on S is inconsistent with equals, the sorted set (or sorted map) will behave "strangely." In particular the sorted set (or sorted map) will violate the general contract for set (or map), which is defined in terms of equals.

For example, if one adds two keys a and b such that (a.equals((Object)b) && c.compare((Object)a, (Object)b) != 0) to a sorted set with comparator c, the second add operation will return false (and the size of the sorted set will not increase) because a and b are equivalent from the sorted set's perspective.

Note: It is generally a good idea for comparators to implement java.io.Serializable, as they may be used as ordering methods in serializable data structures (like TreeSet, TreeMap). In order for the data structure to serialize successfully, the comparator (if provided) must implement Serializable.

For the mathematically inclined, the relation that defines the total order that a given comparator c imposes on a given set of objects S is:

       {(x, y) such that c.compare((Object)x, (Object)y) <= 0}.
The quotient for this total order is:
       {(x, y) such that x.compareTo((Object)y) == 0}.
It follows immediately from the contract for compare that the quotient is an equivalence relation on S, and that the natural ordering is a total order on S. When we say that the ordering imposed by c on S is consistent with equals, we mean that the quotient for the natural ordering is the equivalence relation defined by the objects' equals(Object) method(s):
       {(x, y) such that x.equals((Object)y)}.

Since:
1.2
See Also:
Comparable, Arrays.sort(Object[], Comparator), TreeMap, TreeSet, SortedMap, SortedSet, Serializable

Method Summary
int | compare(Object o1, Object o2) Compares its two arguments for order.
boolean | equals(Object obj) Indicates whether some other object is "equal to" this Comparator.

Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementer must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.

It is generally the case, but not strictly required that (compare(x, y)==0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is "Note: this comparator imposes orderings that are inconsistent with equals."

Parameters:
o1 - the first object to be compared.
o2 - the second object to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
ClassCastException - if the arguments' types prevent them from being compared by this Comparator.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this Comparator. This method must obey the general contract of Object.equals(Object). Additionally, this method can return true only if the specified Object is also a comparator and it imposes the same ordering as this comparator. Thus, comp1.equals(comp2) implies that sgn(comp1.compare(o1, o2))==sgn(comp2.compare(o1, o2)) for every object reference o1 and o2.

Note that it is always safe not to override Object.equals(Object). However, overriding this method may, in some cases, improve performance by allowing programs to determine that two distinct Comparators impose the same order.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true only if the specified object is also a comparator and it imposes the same ordering as this comparator.
See Also:
Object.equals(java.lang.Object), Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConcurrentModificationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Class ConcurrentModificationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.util.ConcurrentModificationException
All Implemented Interfaces:
Serializable
public class ConcurrentModificationException
extends RuntimeException

This exception may be thrown by methods that have detected concurrent modification of a backing object when such modification is not permissible.

For example, it is not permssible for one thread to modify a Collection while another thread is iterating over it. In general, the results of the iteration are undefined under these circumstances. Some Iterator implementations (including those of all the collection implementations provided by the SDK) may choose to throw this exception if this behavior is detected. Iterators that do this are known as fail-fast iterators, as they fail quickly and cleanly, rather that risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Collection, Iterator, ListIterator, Vector, LinkedList, HashSet, Hashtable, TreeMap, AbstractList, Serialized Form

Constructor Summary
ConcurrentModificationException()
Constructs a ConcurrentModificationException with no detail message.
ConcurrentModificationException(String message)
Constructs a ConcurrentModificationException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConcurrentModificationException

public ConcurrentModificationException()
Constructs a ConcurrentModificationException with no detail message.

ConcurrentModificationException

public ConcurrentModificationException(String message)
Constructs a ConcurrentModificationException with the specified detail message.
Parameters:
message - the detail message pertaining to this exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Date

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Date

java.lang.Object
  |
  +--java.util.Date
All Implemented Interfaces:
Cloneable, Comparable, Serializable
Direct Known Subclasses:
Date, Time, Timestamp
public class Date
extends Object
implements Serializable, Cloneable, Comparable

The class Date represents a specific instant in time, with millisecond precision.

Prior to JDK 1.1, the class Date had two additional functions. It allowed the interpretation of dates as year, month, day, hour, minute, and second values. It also allowed the formatting and parsing of date strings. Unfortunately, the API for these functions was not amenable to internationalization. As of JDK 1.1, the Calendar class should be used to convert between dates and time fields and the DateFormat class should be used to format and parse date strings. The corresponding methods in Date are deprecated.

Although the Date class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine. Nearly all modern operating systems assume that 1 day = 24 × 60 × 60 = 86400 seconds in all cases. In UTC, however, about once every year or two there is an extra second, called a "leap second." The leap second is always added as the last second of the day, and always on December 31 or June 30. For example, the last minute of the year 1995 was 61 seconds long, thanks to an added leap second. Most computer clocks are not accurate enough to be able to reflect the leap-second distinction.

Some computer standards are defined in terms of Greenwich mean time (GMT), which is equivalent to universal time (UT). GMT is the "civil" name for the standard; UT is the "scientific" name for the same standard. The distinction between UTC and UT is that UTC is based on an atomic clock and UT is based on astronomical observations, which for all practical purposes is an invisibly fine hair to split. Because the earth's rotation is not uniform (it slows down and speeds up in complicated ways), UT does not always flow uniformly. Leap seconds are introduced as needed into UTC so as to keep UTC within 0.9 seconds of UT1, which is a version of UT with certain corrections applied. There are other time and date systems as well; for example, the time scale used by the satellite-based global positioning system (GPS) is synchronized to UTC but is not adjusted for leap seconds. An interesting source of further information is the U.S. Naval Observatory, particularly the Directorate of Time at:

     http://tycho.usno.navy.mil

and their definitions of "Systems of Time" at:

     http://tycho.usno.navy.mil/systime.html

In all methods of class Date that accept or return year, month, date, hours, minutes, and seconds values, the following representations are used:

  • A year y is represented by the integer y - 1900.
  • A month is represented by an integer form 0 to 11; 0 is January, 1 is February, and so forth; thus 11 is December.
  • A date (day of month) is represented by an integer from 1 to 31 in the usual manner.
  • An hour is represented by an integer from 0 to 23. Thus, the hour from midnight to 1 a.m. is hour 0, and the hour from noon to 1 p.m. is hour 12.
  • A minute is represented by an integer from 0 to 59 in the usual manner.
  • A second is represented by an integer from 0 to 61; the values 60 and 61 occur only for leap seconds and even then only in Java implementations that actually track leap seconds correctly. Because of the manner in which leap seconds are currently introduced, it is extremely unlikely that two leap seconds will occur in the same minute, but this specification follows the date and time conventions for ISO C.

In all cases, arguments given to methods for these purposes need not fall within the indicated ranges; for example, a date may be specified as January 32 and is interpreted as meaning February 1.

Since:
JDK1.0
See Also:
DateFormat, Calendar, TimeZone, Serialized Form

Constructor Summary
Date()
Allocates a Date object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond.
Date(int year, int month, int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date).
Date(int year, int month, int date, int hrs, int min)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min) or GregorianCalendar(year + 1900, month, date, hrs, min).
Date(int year, int month, int date, int hrs, int min, int sec)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec).
Date(long date)
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
Date(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
Method Summary
 boolean after(Date when)
Tests if this date is after the specified date.
 boolean before(Date when)
Tests if this date is before the specified date.
 Object clone()
Return a copy of this object.
 int compareTo(Date anotherDate)
Compares two Dates for ordering.
 int compareTo(Object o)
Compares this Date to another Object.
 boolean equals(Object obj)
Compares two dates for equality.
 int getDate()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_MONTH).
 int getDay()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK).
 int getHours()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY).
 int getMinutes()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MINUTE).
 int getMonth()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MONTH).
 int getSeconds()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.SECOND).
 long getTime()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
 int getTimezoneOffset()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET).
 int getYear()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900.
 int hashCode()
Returns a hash code value for this object.
static long parse(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
 void setDate(int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).
 void setHours(int hours)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours).
 void setMinutes(int minutes)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes).
 void setMonth(int month)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month).
 void setSeconds(int seconds)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds).
 void setTime(long time)
Sets this Date object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
 void setYear(int year)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900).
 String toGMTString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.
 String toLocaleString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date).
 String toString()
Converts this Date object to a String of the form:
static long UTC(int year, int month, int date, int hrs, int min, int sec)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime().
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Date

public Date()
Allocates a Date object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond.
See Also:
System.currentTimeMillis()

Date

public Date(long date)
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
Parameters:
date - the milliseconds since January 1, 1970, 00:00:00 GMT.
See Also:
System.currentTimeMillis()

Date

public Date(int year,
            int month,
            int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date).

Allocates a Date object and initializes it so that it represents midnight, local time, at the beginning of the day specified by the year, month, and date arguments.
Parameters:
year - the year minus 1900.
month - the month between 0-11.
date - the day of the month between 1-31.
See Also:
Calendar

Date

public Date(int year,
            int month,
            int date,
            int hrs,
            int min)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min) or GregorianCalendar(year + 1900, month, date, hrs, min).

Allocates a Date object and initializes it so that it represents the instant at the start of the minute specified by the year, month, date, hrs, and min arguments, in the local time zone.
Parameters:
year - the year minus 1900.
month - the month between 0-11.
date - the day of the month between 1-31.
hrs - the hours between 0-23.
min - the minutes between 0-59.
See Also:
Calendar

Date

public Date(int year,
            int month,
            int date,
            int hrs,
            int min,
            int sec)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec).

Allocates a Date object and initializes it so that it represents the instant at the start of the second specified by the year, month, date, hrs, min, and sec arguments, in the local time zone.
Parameters:
year - the year minus 1900.
month - the month between 0-11.
date - the day of the month between 1-31.
hrs - the hours between 0-23.
min - the minutes between 0-59.
sec - the seconds between 0-59.
See Also:
Calendar

Date

public Date(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).

Allocates a Date object and initializes it so that it represents the date and time indicated by the string s, which is interpreted as if by the parse(java.lang.String) method.
Parameters:
s - a string representation of the date.
See Also:
DateFormat, parse(java.lang.String)
Method Detail

clone

public Object clone()
Return a copy of this object.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

UTC

public static long UTC(int year,
                       int month,
                       int date,
                       int hrs,
                       int min,
                       int sec)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime().

Determines the date and time based on the arguments. The arguments are interpreted as a year, month, day of the month, hour of the day, minute within the hour, and second within the minute, exactly as for the Date constructor with six arguments, except that the arguments are interpreted relative to UTC rather than to the local time zone. The time indecated is returned represented as the distance, measured in milliseconds, of that time from the epoch (00:00:00 GMT on January 1, 1970).
Parameters:
year - the year minus 1900.
month - the month between 0-11.
date - the day of the month between 1-31.
hrs - the hours between 0-23.
min - the minutes between 0-59.
sec - the seconds between 0-59.
Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT for the date and time specified by the arguments.
See Also:
Calendar

parse

public static long parse(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).

Attempts to interpret the string s as a representation of a date and time. If the attempt is successful, the time indicated is returned represented as the distance, measured in milliseconds, of that time from the epoch (00:00:00 GMT on January 1, 1970). If the attempt fails, an IllegalArgumentException is thrown.

It accepts many syntaxes; in particular, it recognizes the IETF standard date syntax: "Sat, 12 Aug 1995 13:30:00 GMT". It also understands the continental U.S. time-zone abbreviations, but for general use, a time-zone offset should be used: "Sat, 12 Aug 1995 13:30:00 GMT+0430" (4 hours, 30 minutes west of the Greenwich meridian). If no time zone is specified, the local time zone is assumed. GMT and UTC are considered equivalent.

The string s is processed from left to right, looking for data of interest. Any material in s that is within the ASCII parenthesis characters ( and ) is ignored. Parentheses may be nested. Otherwise, the only characters permitted within s are these ASCII characters:

 abcdefghijklmnopqrstuvwxyz
 ABCDEFGHIJKLMNOPQRSTUVWXYZ
 0123456789,+-:/
and whitespace characters.

A consecutive sequence of decimal digits is treated as a decimal number:

  • If a number is preceded by + or - and a year has already been recognized, then the number is a time-zone offset. If the number is less than 24, it is an offset measured in hours. Otherwise, it is regarded as an offset in minutes, expressed in 24-hour time format without punctuation. A preceding - means a westward offset. Time zone offsets are always relative to UTC (Greenwich). Thus, for example, -5 occurring in the string would mean "five hours west of Greenwich" and +0430 would mean "four hours and thirty minutes east of Greenwich." It is permitted for the string to specify GMT, UT, or UTC redundantly-for example, GMT-5 or utc+0430.
  • The number is regarded as a year number if one of the following conditions is true:
    • The number is equal to or greater than 70 and followed by a space, comma, slash, or end of string
    • The number is less than 70, and both a month and a day of the month have already been recognized
    If the recognized year number is less than 100, it is interpreted as an abbreviated year relative to a century of which dates are within 80 years before and 19 years after the time when the Date class is initialized. After adjusting the year number, 1900 is subtracted from it. For example, if the current year is 1999 then years in the range 19 to 99 are assumed to mean 1919 to 1999, while years from 0 to 18 are assumed to mean 2000 to 2018. Note that this is slightly different from the interpretation of years less than 100 that is used in SimpleDateFormat.
  • If the number is followed by a colon, it is regarded as an hour, unless an hour has already been recognized, in which case it is regarded as a minute.
  • If the number is followed by a slash, it is regarded as a month (it is decreased by 1 to produce a number in the range 0 to 11), unless a month has already been recognized, in which case it is regarded as a day of the month.
  • If the number is followed by whitespace, a comma, a hyphen, or end of string, then if an hour has been recognized but not a minute, it is regarded as a minute; otherwise, if a minute has been recognized but not a second, it is regarded as a second; otherwise, it is regarded as a day of the month.

A consecutive sequence of letters is regarded as a word and treated as follows:

  • A word that matches AM, ignoring case, is ignored (but the parse fails if an hour has not been recognized or is less than 1 or greater than 12).
  • A word that matches PM, ignoring case, adds 12 to the hour (but the parse fails if an hour has not been recognized or is less than 1 or greater than 12).
  • Any word that matches any prefix of SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, or SATURDAY, ignoring case, is ignored. For example, sat, Friday, TUE, and Thurs are ignored.
  • Otherwise, any word that matches any prefix of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, or DECEMBER, ignoring case, and considering them in the order given here, is recognized as specifying a month and is converted to a number (0 to 11). For example, aug, Sept, april, and NOV are recognized as months. So is Ma, which is recognized as MARCH, not MAY.
  • Any word that matches GMT, UT, or UTC, ignoring case, is treated as referring to UTC.
  • Any word that matches EST, CST, MST, or PST, ignoring case, is recognized as referring to the time zone in North America that is five, six, seven, or eight hours west of Greenwich, respectively. Any word that matches EDT, CDT, MDT, or PDT, ignoring case, is recognized as referring to the same time zone, respectively, during daylight saving time.

Once the entire string s has been scanned, it is converted to a time result in one of two ways. If a time zone or time-zone offset has been recognized, then the year, month, day of month, hour, minute, and second are interpreted in UTC and then the time-zone offset is applied. Otherwise, the year, month, day of month, hour, minute, and second are interpreted in the local time zone.

Parameters:
s - a string to be parsed as a date.
Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the string argument.
See Also:
DateFormat

getYear

public int getYear()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900.

Returns a value that is the result of subtracting 1900 from the year that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
Returns:
the year represented by this date, minus 1900.
See Also:
Calendar

setYear

public void setYear(int year)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900).

Sets the year of this Date object to be the specified value plus 1900. This Date object is modified so that it represents a point in time within the specified year, with the month, date, hour, minute, and second the same as before, as interpreted in the local time zone. (Of course, if the date was February 29, for example, and the year is set to a non-leap year, then the new date will be treated as if it were on March 1.)
Parameters:
year - the year value.
See Also:
Calendar

getMonth

public int getMonth()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MONTH).

Returns a number representing the month that contains or begins with the instant in time represented by this Date object. The value returned is between 0 and 11, with the value 0 representing January.
Returns:
the month represented by this date.
See Also:
Calendar

setMonth

public void setMonth(int month)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month).

Sets the month of this date to the specified value. This Date object is modified so that it represents a point in time within the specified month, with the year, date, hour, minute, and second the same as before, as interpreted in the local time zone. If the date was October 31, for example, and the month is set to June, then the new date will be treated as if it were on July 1, because June has only 30 days.
Parameters:
month - the month value between 0-11.
See Also:
Calendar

getDate

public int getDate()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_MONTH).

Returns the day of the month represented by this Date object. The value returned is between 1 and 31 representing the day of the month that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
Returns:
the day of the month represented by this date.
See Also:
Calendar

setDate

public void setDate(int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).

Sets the day of the month of this Date object to the specified value. This Date object is modified so that it represents a point in time within the specified day of the month, with the year, month, hour, minute, and second the same as before, as interpreted in the local time zone. If the date was April 30, for example, and the date is set to 31, then it will be treated as if it were on May 1, because April has only 30 days.
Parameters:
date - the day of the month value between 1-31.
See Also:
Calendar

getDay

public int getDay()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK).

Returns the day of the week represented by this date. The returned value (0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday) represents the day of the week that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
Returns:
the day of the week represented by this date.
See Also:
Calendar

getHours

public int getHours()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY).

Returns the hour represented by this Date object. The returned value is a number (0 through 23) representing the hour within the day that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
Returns:
the hour represented by this date.
See Also:
Calendar

setHours

public void setHours(int hours)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours).

Sets the hour of this Date object to the specified value. This Date object is modified so that it represents a point in time within the specified hour of the day, with the year, month, date, minute, and second the same as before, as interpreted in the local time zone.
Parameters:
hours - the hour value.
See Also:
Calendar

getMinutes

public int getMinutes()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.MINUTE).

Returns the number of minutes past the hour represented by this date, as interpreted in the local time zone. The value returned is between 0 and 59.
Returns:
the number of minutes past the hour represented by this date.
See Also:
Calendar

setMinutes

public void setMinutes(int minutes)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes).

Sets the minutes of this Date object to the specified value. This Date object is modified so that it represents a point in time within the specified minute of the hour, with the year, month, date, hour, and second the same as before, as interpreted in the local time zone.
Parameters:
minutes - the value of the minutes.
See Also:
Calendar

getSeconds

public int getSeconds()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.SECOND).

Returns the number of seconds past the minute represented by this date. The value returned is between 0 and 61. The values 60 and 61 can only occur on those Java Virtual Machines that take leap seconds into account.
Returns:
the number of seconds past the minute represented by this date.
See Also:
Calendar

setSeconds

public void setSeconds(int seconds)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds).

Sets the seconds of this Date to the specified value. This Date object is modified so that it represents a point in time within the specified second of the minute, with the year, month, date, hour, and minute the same as before, as interpreted in the local time zone.
Parameters:
seconds - the seconds value.
See Also:
Calendar

getTime

public long getTime()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date.

setTime

public void setTime(long time)
Sets this Date object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
Parameters:
time - the number of milliseconds.

before

public boolean before(Date when)
Tests if this date is before the specified date.
Parameters:
when - a date.
Returns:
true if and only if the instant of time represented by this Date object is strictly earlier than the instant represented by when; false otherwise.

after

public boolean after(Date when)
Tests if this date is after the specified date.
Parameters:
when - a date.
Returns:
true if and only if the instant represented by this Date object is strictly later than the instant represented by when; false otherwise.

equals

public boolean equals(Object obj)
Compares two dates for equality. The result is true if and only if the argument is not null and is a Date object that represents the same point in time, to the millisecond, as this object.

Thus, two Date objects are equal if and only if the getTime method returns the same long value for both.

Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.
See Also:
getTime()

compareTo

public int compareTo(Date anotherDate)
Compares two Dates for ordering.
Parameters:
anotherDate - the Date to be compared.
Returns:
the value 0 if the argument Date is equal to this Date; a value less than 0 if this Date is before the Date argument; and a value greater than 0 if this Date is after the Date argument.
Since:
1.2

compareTo

public int compareTo(Object o)
Compares this Date to another Object. If the Object is a Date, this function behaves like compareTo(Date). Otherwise, it throws a ClassCastException (as Dates are comparable only to other Dates).
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
the value 0 if the argument is a Date equal to this Date; a value less than 0 if the argument is a Date after this Date; and a value greater than 0 if the argument is a Date before this Date.
Throws:
ClassCastException - if the argument is not a Date.
Since:
1.2
See Also:
Comparable

hashCode

public int hashCode()
Returns a hash code value for this object. The result is the exclusive OR of the two halves of the primitive long value returned by the getTime() method. That is, the hash code is the value of the expression:
 (int)(this.getTime()^(this.getTime() >>> 32))
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

toString

public String toString()
Converts this Date object to a String of the form:
 dow mon dd hh:mm:ss zzz yyyy
where:
  • dow is the day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat).
  • mon is the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec).
  • dd is the day of the month (01 through 31), as two decimal digits.
  • hh is the hour of the day (00 through 23), as two decimal digits.
  • mm is the minute within the hour (00 through 59), as two decimal digits.
  • ss is the second within the minute (00 through 61, as two decimal digits.
  • zzz is the time zone (and may reflect daylight savings time). Standard time zone abbreviations include those recognized by the method parse. If time zone informationi is not available, then zzz is empty - that is, it consists of no characters at all.
  • yyyy is the year, as four decimal digits.
Overrides:
toString in class Object
Returns:
a string representation of this date.
See Also:
toLocaleString(), toGMTString()

toLocaleString

public String toLocaleString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date).

Creates a string representation of this Date object in an implementation-dependent form. The intent is that the form should be familiar to the user of the Java application, wherever it may happen to be running. The intent is comparable to that of the "%c" format supported by the strftime() function of ISO C.
Returns:
a string representation of this date, using the locale conventions.
See Also:
DateFormat, toString(), toGMTString()

toGMTString

public String toGMTString()
Deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.

Creates a string representation of this Date object of the form: d mon yyyy hh:mm:ss GMT where:
  • d is the day of the month (1 through 31), as one or two decimal digits.
  • mon is the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec).
  • yyyy i sthe year, as four decimal digits.
  • hh is the hour of the day (00 through 23), as two decimal digits.
  • mm is the minute within the hour (00 through 59), as two decimal digits.
  • ss is the second within the minute (00 through 61), as two decimal digits.
  • GMT is exactly the ASCII letters "GMT" to indicate Greenwich Mean Time.

The result does not depend on the local time zone.

Returns:
a string representation of this date, using the Internet GMT conventions.
See Also:
DateFormat, toString(), toLocaleString()

getTimezoneOffset

public int getTimezoneOffset()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET).

Returns the offset, measured in minutes, for the local time zone relative to UTC that is appropriate for the time represented by this Date object.

For example, in Massachusetts, five time zones west of Greenwich:

 new Date(96, 1, 14).getTimezoneOffset() returns 300
because on February 14, 1996, standard time (Eastern Standard Time) is in use, which is offset five hours from UTC; but:
 new Date(96, 5, 1).getTimezoneOffset() returns 240
because on May 1, 1996, daylight savings time (Eastern Daylight Time) is in use, which is offset only four hours from UTC.

This method produces teh same result as if it computed:

 (this.getTime() - UTC(this.getYear(),
                       this.getMonth(),
                       this.getDate(),
                       this.getHours(),
                       this.getMinutes(),
                       this.getSeconds())) / (60 * 1000)
Returns:
the time-zone offset, in minutes, for the current locale.
See Also:
Calendar, TimeZone
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Dictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Dictionary

java.lang.Object
  |
  +--java.util.Dictionary
Direct Known Subclasses:
Hashtable
public abstract class Dictionary
extends Object

The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values. Every key and every value is an object. In any one Dictionary object, every key is associated with at most one value. Given a Dictionary and a key, the associated element can be looked up. Any non-null object can be used as a key and as a value.

As a rule, the equals method should be used by implementations of this class to decide if two keys are the same.

NOTE: This class is obsolete. New implementations should implement the Map interface, rather than extendidng this class.

Since:
JDK1.0
See Also:
Map, Object.equals(java.lang.Object), Object.hashCode(), Hashtable

Constructor Summary
Dictionary()
Sole constructor.
Method Summary
abstract Enumeration | elements() Returns an enumeration of the values in this dictionary.
abstract Object | get(Object key) Returns the value to which the key is mapped in this dictionary.
abstract boolean | isEmpty() Tests if this dictionary maps no keys to value.
abstract Enumeration | keys() Returns an enumeration of the keys in this dictionary.
abstract Object | put(Object key, Object value) Maps the specified key to the specified value in this dictionary.
abstract Object | remove(Object key) Removes the key (and its corresponding value) from this dictionary.
abstract int | size() Returns the number of entries (dinstint keys) in this dictionary.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Dictionary

public Dictionary()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

size

public abstract int size()
Returns the number of entries (dinstint keys) in this dictionary.
Returns:
the number of keys in this dictionary.

isEmpty

public abstract boolean isEmpty()
Tests if this dictionary maps no keys to value. The general contract for the isEmpty method is that the result is true if and only if this dictionary contains no entries.
Returns:
true if this dictionary maps no keys to values; false otherwise.

keys

public abstract Enumeration keys()
Returns an enumeration of the keys in this dictionary. The general contract for the keys method is that an Enumeration object is returned that will generate all the keys for which this dictionary contains entries.
Returns:
an enumeration of the keys in this dictionary.
See Also:
elements(), Enumeration

elements

public abstract Enumeration elements()
Returns an enumeration of the values in this dictionary. The general contract for the elements method is that an Enumeration is returned that will generate all the elements contained in entries in this dictionary.
Returns:
an enumeration of the values in this dictionary.
See Also:
keys(), Enumeration

get

public abstract Object get(Object key)
Returns the value to which the key is mapped in this dictionary. The general contract for the isEmpty method is that if this dictionary contains an entry for the specified key, the associated value is returned; otherwise, null is returned.
Parameters:
key - a key in this dictionary. null if the key is not mapped to any value in this dictionary.
Returns:
the value to which the key is mapped in this dictionary;
Throws:
NullPointerException - if the key is null.
See Also:
put(java.lang.Object, java.lang.Object)

put

public abstract Object put(Object key,
                           Object value)
Maps the specified key to the specified value in this dictionary. Neither the key nor the value can be null.

If this dictionary already contains an entry for the specified key, the value already in this dictionary for that key is returned, after modifying the entry to contain the new element.

If this dictionary does not already have an entry for the specified key, an entry is created for the specified key and value, and null is returned.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
key - the hashtable key.
value - the value.
Returns:
the previous value to which the key was mapped in this dictionary, or null if the key did not have a previous mapping.
Throws:
NullPointerException - if the key or value is null.
See Also:
Object.equals(java.lang.Object), get(java.lang.Object)

remove

public abstract Object remove(Object key)
Removes the key (and its corresponding value) from this dictionary. This method does nothing if the key is not in this dictionary.
Parameters:
key - the key that needs to be removed.
Returns:
the value to which the key had been mapped in this dictionary, or null if the key did not have a mapping.
Throws:
NullPointerException - if key is null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EmptyStackException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class EmptyStackException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.util.EmptyStackException
All Implemented Interfaces:
Serializable
public class EmptyStackException
extends RuntimeException

Thrown by methods in the Stack class to indicate that the stack is empty.

Since:
JDK1.0
See Also:
Stack, Serialized Form

Constructor Summary
EmptyStackException()
Constructs a new EmptyStackException with null as its error message string.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

EmptyStackException

public EmptyStackException()
Constructs a new EmptyStackException with null as its error message string.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Entry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Map.Entry

Enclosing class:
Map
public static interface Map.Entry

A map entry (key-value pair). The Map.entrySet method returns a collection-view of the map, whose elements are of this class. The only way to obtain a reference to a map entry is from the iterator of this collection-view. These Map.Entry objects are valid only for the duration of the iteration; more formally, the behavior of a map entry is undefined if the backing map has been modified after the entry was returned by the iterator, except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator.

Since:
1.2
See Also:
Map.entrySet()

Method Summary
boolean | equals(Object o) Compares the specified object with this entry for equality.
Object | getKey() Returns the key corresponding to this entry.
Object | getValue() Returns the value corresponding to this entry.
int | hashCode() Returns the hash code value for this map entry.
Object | setValue(Object value) Replaces the value corresponding to this entry with the specified value (optional operation).

Method Detail

getKey

public Object getKey()
Returns the key corresponding to this entry.
Returns:
the key corresponding to this entry.

getValue

public Object getValue()
Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator's remove operation), the results of this call are undefined.
Returns:
the value corresponding to this entry.

setValue

public Object setValue(Object value)
Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator's remove operation).
Parameters:
value - new value to be stored in this entry.
Returns:
old value corresponding to the entry.
Throws:
UnsupportedOperationException - if the put operation is not supported by the backing map.
ClassCastException - if the class of the specified value prevents it from being stored in the backing map.
IllegalArgumentException - if some aspect of this value prevents it from being stored in the backing map.
NullPointerException - the backing map does not permit null values, and the specified value is null.

equals

public boolean equals(Object o)
Compares the specified object with this entry for equality. Returns true if the given object is also a map entry and the two entries represent the same mapping. More formally, two entries e1 and e2 represent the same mapping if
     (e1.getKey()==null ?
      e2.getKey()==null : e1.getKey().equals(e2.getKey()))  &&
     (e1.getValue()==null ?
      e2.getValue()==null : e1.getValue().equals(e2.getValue()))
This ensures that the equals method works properly across different implementations of the Map.Entry interface.
Overrides:
equals in class Object
Parameters:
o - object to be compared for equality with this map entry.
Returns:
true if the specified object is equal to this map entry.

hashCode

public int hashCode()
Returns the hash code value for this map entry. The hash code of a map entry e is defined to be:
     (e.getKey()==null   ? 0 : e.getKey().hashCode()) ^
     (e.getValue()==null ? 0 : e.getValue().hashCode())
This ensures that e1.equals(e2) implies that e1.hashCode()==e2.hashCode() for any two Entries e1 and e2, as required by the general contract of Object.hashCode.
Overrides:
hashCode in class Object
Returns:
the hash code value for this map entry.
See Also:
Object.hashCode(),
Object.equals(Object),
equals(Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Enumeration

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Enumeration

All Known Subinterfaces:
NamingEnumeration
All Known Implementing Classes:
StringTokenizer
public interface Enumeration

An object that implements the Enumeration interface generates a series of elements, one at a time. Successive calls to the nextElement method return successive elements of the series.

For example, to print all elements of a vector v:

     for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
         System.out.println(e.nextElement());

     }

Methods are provided to enumerate through the elements of a vector, the keys of a hashtable, and the values in a hashtable. Enumerations are also used to specify the input streams to a SequenceInputStream.

NOTE: The functionality of this interface is duplicated by the Iterator interface. In addition, Iterator adds an optional remove operation, and has shorter method names. New implementations should consider using Iterator in preference to Enumeration.

Since:
JDK1.0
See Also:
Iterator, SequenceInputStream, nextElement(), Hashtable, Hashtable.elements(), Hashtable.keys(), Vector, Vector.elements()

Method Summary
boolean | hasMoreElements() Tests if this enumeration contains more elements.
Object | nextElement() Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public Object nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
Returns:
the next element of this enumeration.
Throws:
NoSuchElementException - if no more elements exist.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventObject

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class EventObject

java.lang.Object
  |
  +--java.util.EventObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AWTEvent, BeanContextEvent, CaretEvent, ChangeEvent, DragGestureEvent, DragSourceEvent, DropTargetEvent, HyperlinkEvent, LineEvent, ListDataEvent, ListSelectionEvent, MenuEvent, NamingEvent, NamingExceptionEvent, PopupMenuEvent, PropertyChangeEvent, TableColumnModelEvent, TableModelEvent, TreeExpansionEvent, TreeModelEvent, TreeSelectionEvent, UndoableEditEvent, UnsolicitedNotificationEvent
public class EventObject
extends Object
implements Serializable

The root class from which all event state objects shall be derived.

All Events are constructed with a reference to the object, the "source", that is logically deemed to be the object upon which the Event in question initially occurred upon.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
protected  Object source
The object on which the Event initially occurred.
Constructor Summary
EventObject(Object source)
Constructs a prototypical Event.
Method Summary
Object | getSource() The object on which the Event initially occurred.
String | toString() Returns a String representation of this EventObject.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

source

protected transient Object source
The object on which the Event initially occurred.
Constructor Detail

EventObject

public EventObject(Object source)
Constructs a prototypical Event.
Parameters:
source - The object on which the Event initially occurred.
Method Detail

getSource

public Object getSource()
The object on which the Event initially occurred.
Returns:
The object on which the Event initially occurred.

toString

public String toString()
Returns a String representation of this EventObject.
Overrides:
toString in class Object
Returns:
A a String representation of this EventObject.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GregorianCalendar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class GregorianCalendar

java.lang.Object
  |
  +--java.util.Calendar
        |
        +--java.util.GregorianCalendar
All Implemented Interfaces:
Cloneable, Serializable
public class GregorianCalendar
extends Calendar

GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar used by most of the world.

The standard (Gregorian) calendar has 2 eras, BC and AD.

This implementation handles a single discontinuity, which corresponds by default to the date the Gregorian calendar was instituted (October 15, 1582 in some countries, later in others). The cutover date may be changed by the caller by calling setGregorianChange().

Historically, in those countries which adopted the Gregorian calendar first, October 4, 1582 was thus followed by October 15, 1582. This calendar models this correctly. Before the Gregorian cutover, GregorianCalendar implements the Julian calendar. The only difference between the Gregorian and the Julian calendar is the leap year rule. The Julian calendar specifies leap years every four years, whereas the Gregorian calendar omits century years which are not divisible by 400.

GregorianCalendar implements proleptic Gregorian and Julian calendars. That is, dates are computed by extrapolating the current rules indefinitely far backward and forward in time. As a result, GregorianCalendar may be used for all years to generate meaningful and consistent results. However, dates obtained using GregorianCalendar are historically accurate only from March 1, 4 AD onward, when modern Julian calendar rules were adopted. Before this date, leap year rules were applied irregularly, and before 45 BC the Julian calendar did not even exist.

Prior to the institution of the Gregorian calendar, New Year's Day was March 25. To avoid confusion, this calendar always uses January 1. A manual adjustment may be made if desired for dates that are prior to the Gregorian changeover and which fall between January 1 and March 24.

Values calculated for the WEEK_OF_YEAR field range from 1 to 53. Week 1 for a year is the earliest seven day period starting on getFirstDayOfWeek() that contains at least getMinimalDaysInFirstWeek() days from that year. It thus depends on the values of getMinimalDaysInFirstWeek(), getFirstDayOfWeek(), and the day of the week of January 1. Weeks between week 1 of one year and week 1 of the following year are numbered sequentially from 2 to 52 or 53 (as needed).

For example, January 1, 1998 was a Thursday. If getFirstDayOfWeek() is MONDAY and getMinimalDaysInFirstWeek() is 4 (these are the values reflecting ISO 8601 and many national standards), then week 1 of 1998 starts on December 29, 1997, and ends on January 4, 1998. If, however, getFirstDayOfWeek() is SUNDAY, then week 1 of 1998 starts on January 4, 1998, and ends on January 10, 1998; the first three days of 1998 then are part of week 53 of 1997.

Values calculated for the WEEK_OF_MONTH field range from 0 or 1 to 4 or 5. Week 1 of a month (the days with WEEK_OF_MONTH = 1) is the earliest set of at least getMinimalDaysInFirstWeek() contiguous days in that month, ending on the day before getFirstDayOfWeek(). Unlike week 1 of a year, week 1 of a month may be shorter than 7 days, need not start on getFirstDayOfWeek(), and will not include days of the previous month. Days of a month before week 1 have a WEEK_OF_MONTH of 0.

For example, if getFirstDayOfWeek() is SUNDAY and getMinimalDaysInFirstWeek() is 4, then the first week of January 1998 is Sunday, January 4 through Saturday, January 10. These days have a WEEK_OF_MONTH of 1. Thursday, January 1 through Saturday, January 3 have a WEEK_OF_MONTH of 0. If getMinimalDaysInFirstWeek() is changed to 3, then January 1 through January 3 have a WEEK_OF_MONTH of 1.

Example:

 // get the supported ids for GMT-08:00 (Pacific Standard Time)
 String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000);
 // if no ids were returned, something is wrong. get out.
 if (ids.length == 0)
     System.exit(0);

  // begin output
 System.out.println("Current Time");

 // create a Pacific Standard Time time zone
 SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);

 // set up rules for daylight savings time
 pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
 pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);

 // create a GregorianCalendar with the Pacific Daylight time zone
 // and the current date and time
 Calendar calendar = new GregorianCalendar(pdt);
 Date trialTime = new Date();
 calendar.setTime(trialTime);

 // print out a bunch of interesting things
 System.out.println("ERA: " + calendar.get(Calendar.ERA));
 System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
 System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
 System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
 System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
 System.out.println("DATE: " + calendar.get(Calendar.DATE));
 System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
 System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
 System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
 System.out.println("DAY_OF_WEEK_IN_MONTH: "
                    + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
 System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
 System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
 System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
 System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
 System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
 System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
 System.out.println("ZONE_OFFSET: "
                    + (calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000)));
 System.out.println("DST_OFFSET: "
                    + (calendar.get(Calendar.DST_OFFSET)/(60*60*1000)));

 System.out.println("Current Time, with hour reset to 3");
 calendar.clear(Calendar.HOUR_OF_DAY); // so doesn't override
 calendar.set(Calendar.HOUR, 3);
 System.out.println("ERA: " + calendar.get(Calendar.ERA));
 System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
 System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
 System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
 System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
 System.out.println("DATE: " + calendar.get(Calendar.DATE));
 System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
 System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
 System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
 System.out.println("DAY_OF_WEEK_IN_MONTH: "
                    + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
 System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
 System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
 System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
 System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
 System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
 System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
 System.out.println("ZONE_OFFSET: "
        + (calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000))); // in hours
 System.out.println("DST_OFFSET: "
        + (calendar.get(Calendar.DST_OFFSET)/(60*60*1000))); // in hours

Since:
JDK1.1
See Also:
Calendar, TimeZone, Serialized Form

Field Summary
static int | AD Value of the ERA field indicating the common era (Anno Domini), also known as CE.
static int | BC Value of the ERA field indicating the period before the common era (before Christ), also known as BCE.
Fields inherited from class java.util.Calendar
AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
Constructor Summary
GregorianCalendar()
Constructs a default GregorianCalendar using the current time in the default time zone with the default locale.
GregorianCalendar(int year, int month, int date)
Constructs a GregorianCalendar with the given date set in the default time zone with the default locale.
GregorianCalendar(int year, int month, int date, int hour, int minute)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(int year, int month, int date, int hour, int minute, int second)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(Locale aLocale)
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.
GregorianCalendar(TimeZone zone)
Constructs a GregorianCalendar based on the current time in the given time zone with the default locale.
GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.
Method Summary
void | add(int field, int amount) Overrides Calendar Date Arithmetic function.
protected void | computeFields() Overrides Calendar Converts UTC as milliseconds to time field values.
protected void | computeTime() Overrides Calendar Converts time field values to UTC as milliseconds.
boolean | equals(Object obj) Compares this GregorianCalendar to an object reference.
int | getActualMaximum(int field) Return the maximum value that this field could have, given the current date.
int | getActualMinimum(int field) Return the minimum value that this field could have, given the current date.
int | getGreatestMinimum(int field) Returns highest minimum value for the given field if varies.
Date | getGregorianChange() Gets the Gregorian Calendar change date.
int | getLeastMaximum(int field) Returns lowest maximum value for the given field if varies.
int | getMaximum(int field) Returns maximum value for the given field.
int | getMinimum(int field) Returns minimum value for the given field.
int | hashCode() Override hashCode.
boolean | isLeapYear(int year) Determines if the given year is a leap year.
void | roll(int field, boolean up) Overrides Calendar Time Field Rolling function.
void | roll(int field, int amount) Roll a field by a signed amount.
void | setGregorianChange(Date date) Sets the GregorianCalendar change date.
Methods inherited from class java.util.Calendar
after, before, clear, clear, clone, complete, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

BC

public static final int BC
Value of the ERA field indicating the period before the common era (before Christ), also known as BCE. The sequence of years at the transition from BC to AD is ..., 2 BC, 1 BC, 1 AD, 2 AD,...
See Also:
Calendar.ERA

AD

public static final int AD
Value of the ERA field indicating the common era (Anno Domini), also known as CE. The sequence of years at the transition from BC to AD is ..., 2 BC, 1 BC, 1 AD, 2 AD,...
See Also:
Calendar.ERA
Constructor Detail

GregorianCalendar

public GregorianCalendar()
Constructs a default GregorianCalendar using the current time in the default time zone with the default locale.

GregorianCalendar

public GregorianCalendar(TimeZone zone)
Constructs a GregorianCalendar based on the current time in the given time zone with the default locale.
Parameters:
zone - the given time zone.

GregorianCalendar

public GregorianCalendar(Locale aLocale)
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.
Parameters:
aLocale - the given locale.

GregorianCalendar

public GregorianCalendar(TimeZone zone,
                         Locale aLocale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.
Parameters:
zone - the given time zone.
aLocale - the given locale.

GregorianCalendar

public GregorianCalendar(int year,
                         int month,
                         int date)
Constructs a GregorianCalendar with the given date set in the default time zone with the default locale.
Parameters:
year - the value used to set the YEAR time field in the calendar.
month - the value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field in the calendar.

GregorianCalendar

public GregorianCalendar(int year,
                         int month,
                         int date,
                         int hour,
                         int minute)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
Parameters:
year - the value used to set the YEAR time field in the calendar.
month - the value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field in the calendar.
hour - the value used to set the HOUR_OF_DAY time field in the calendar.
minute - the value used to set the MINUTE time field in the calendar.

GregorianCalendar

public GregorianCalendar(int year,
                         int month,
                         int date,
                         int hour,
                         int minute,
                         int second)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
Parameters:
year - the value used to set the YEAR time field in the calendar.
month - the value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.
date - the value used to set the DATE time field in the calendar.
hour - the value used to set the HOUR_OF_DAY time field in the calendar.
minute - the value used to set the MINUTE time field in the calendar.
second - the value used to set the SECOND time field in the calendar.
Method Detail

setGregorianChange

public void setGregorianChange(Date date)
Sets the GregorianCalendar change date. This is the point when the switch from Julian dates to Gregorian dates occurred. Default is October 15, 1582. Previous to this, dates will be in the Julian calendar.

To obtain a pure Julian calendar, set the change date to Date(Long.MAX_VALUE). To obtain a pure Gregorian calendar, set the change date to Date(Long.MIN_VALUE).

Parameters:
date - the given Gregorian cutover date.

getGregorianChange

public final Date getGregorianChange()
Gets the Gregorian Calendar change date. This is the point when the switch from Julian dates to Gregorian dates occurred. Default is October 15, 1582. Previous to this, dates will be in the Julian calendar.
Returns:
the Gregorian cutover date for this calendar.

isLeapYear

public boolean isLeapYear(int year)
Determines if the given year is a leap year. Returns true if the given year is a leap year.
Parameters:
year - the given year.
Returns:
true if the given year is a leap year; false otherwise.

equals

public boolean equals(Object obj)
Compares this GregorianCalendar to an object reference.
Overrides:
equals in class Calendar
Parameters:
obj - the object reference with which to compare
Returns:
true if this object is equal to obj; false otherwise

hashCode

public int hashCode()
Override hashCode. Generates the hash code for the GregorianCalendar object
Overrides:
hashCode in class Calendar
Following copied from class: java.util.Calendar
Returns:
a hash code value for this object.

add

public void add(int field,
                int amount)
Overrides Calendar Date Arithmetic function. Adds the specified (signed) amount of time to the given time field, based on the calendar's rules.
Overrides:
add in class Calendar
Parameters:
field - the time field.
amount - the amount of date or time to be added to the field.
Throws:
IllegalArgumentException - if an unknown field is given.

roll

public void roll(int field,
                 boolean up)
Overrides Calendar Time Field Rolling function. Rolls (up/down) a single unit of time on the given time field.
Overrides:
roll in class Calendar
Parameters:
field - the time field.
up - Indicates if rolling up or rolling down the field value.
Throws:
IllegalArgumentException - if an unknown field value is given.

roll

public void roll(int field,
                 int amount)
Roll a field by a signed amount.
Overrides:
roll in class Calendar
Since:
1.2

getMinimum

public int getMinimum(int field)
Returns minimum value for the given field. e.g. for Gregorian DAY_OF_MONTH, 1 Please see Calendar.getMinimum for descriptions on parameters and the return value.
Overrides:
getMinimum in class Calendar
Following copied from class: java.util.Calendar
Parameters:
field - the given time field.
Returns:
the minimum value for the given time field.

getMaximum

public int getMaximum(int field)
Returns maximum value for the given field. e.g. for Gregorian DAY_OF_MONTH, 31 Please see Calendar.getMaximum for descriptions on parameters and the return value.
Overrides:
getMaximum in class Calendar
Following copied from class: java.util.Calendar
Parameters:
field - the given time field.
Returns:
the maximum value for the given time field.

getGreatestMinimum

public int getGreatestMinimum(int field)
Returns highest minimum value for the given field if varies. Otherwise same as getMinimum(). For Gregorian, no difference. Please see Calendar.getGreatestMinimum for descriptions on parameters and the return value.
Overrides:
getGreatestMinimum in class Calendar
Following copied from class: java.util.Calendar
Parameters:
field - the given time field.
Returns:
the highest minimum value for the given time field.

getLeastMaximum

public int getLeastMaximum(int field)
Returns lowest maximum value for the given field if varies. Otherwise same as getMaximum(). For Gregorian DAY_OF_MONTH, 28 Please see Calendar.getLeastMaximum for descriptions on parameters and the return value.
Overrides:
getLeastMaximum in class Calendar
Following copied from class: java.util.Calendar
Parameters:
field - the given time field.
Returns:
the lowest maximum value for the given time field.

getActualMinimum

public int getActualMinimum(int field)
Return the minimum value that this field could have, given the current date. For the Gregorian calendar, this is the same as getMinimum() and getGreatestMinimum().
Overrides:
getActualMinimum in class Calendar
Since:
1.2

getActualMaximum

public int getActualMaximum(int field)
Return the maximum value that this field could have, given the current date. For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, for some years the actual maximum for MONTH is 12, and for others 13.
Overrides:
getActualMaximum in class Calendar
Since:
1.2

computeFields

protected void computeFields()
Overrides Calendar Converts UTC as milliseconds to time field values. The time is not recomputed first; to recompute the time, then the fields, call the complete method.
Overrides:
computeFields in class Calendar
See Also:
Calendar.complete()

computeTime

protected void computeTime()
Overrides Calendar Converts time field values to UTC as milliseconds.
Overrides:
computeTime in class Calendar
Throws:
IllegalArgumentException - if any fields are invalid.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HashMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class HashMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
All Implemented Interfaces:
Cloneable, Map, Serializable
public class HashMap
extends AbstractMap
implements Map, Cloneable, Serializable

Hash table based implementation of the Map interface. This implementation provides all of the optional map operations, and permits null values and the null key. (The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.) This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.

This implementation provides constant-time performance for the basic operations (get and put), assuming the hash function disperses the elements properly among the buckets. Iteration over collection views requires time proportional to the "capacity" of the HashMap instance (the number of buckets) plus its size (the number of key-value mappings). Thus, it's very important not to set the intial capacity too high (or the load factor too low) if iteration performance is important.

An instance of HashMap has two parameters that affect its performance: initial capacity and load factor. The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at the time the hash table is created. The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased. When the number of entries in the hash table exceeds the product of the load factor and the current capacity, the capacity is roughly doubled by calling the rehash method.

As a general rule, the default load factor (.75) offers a good tradeoff between time and space costs. Higher values decrease the space overhead but increase the lookup cost (reflected in most of the operations of the HashMap class, including get and put). The expected number of entries in the map and its load factor should be taken into account when setting its initial capacity, so as to minimize the number of rehash operations. If the initial capacity is greater than the maximum number of entries divided by the load factor, no rehash operations will ever occur.

If many mappings are to be stored in a HashMap instance, creating it with a sufficiently large capacity will allow the mappings to be stored more efficiently than letting it perform automatic rehashing as needed to grow the table.

Note that this implementation is not synchronized. If multiple threads access this map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more mappings; merely changing the value associated with a key that an instance already contains is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the map. If no such object exists, the map should be "wrapped" using the Collections.synchronizedMap method. This is best done at creation time, to prevent accidental unsynchronized access to the map:

 Map m = Collections.synchronizedMap(new HashMap(...));

The iterators returned by all of this class's "collection view methods" are fail-fast: if the map is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Object.hashCode(), Collection, Map, TreeMap, Hashtable, Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
HashMap()
Constructs a new, empty map with a default capacity and load factor, which is 0.75.
HashMap(int initialCapacity)
Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75.
HashMap(int initialCapacity, float loadFactor)
Constructs a new, empty map with the specified initial capacity and the specified load factor.
HashMap(Map t)
Constructs a new map with the same mappings as the given map.
Method Summary
void | clear() Removes all mappings from this map.
Object | clone() Returns a shallow copy of this HashMap instance: the keys and values themselves are not cloned.
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
Set | entrySet() Returns a collection view of the mappings contained in this map.
Object | get(Object key) Returns the value to which this map maps the specified key.
boolean | isEmpty() Returns true if this map contains no key-value mappings.
Set | keySet() Returns a set view of the keys contained in this map.
Object | put(Object key, Object value) Associates the specified value with the specified key in this map.
void | putAll(Map t) Copies all of the mappings from the specified map to this one.
Object | remove(Object key) Removes the mapping for this key from this map if present.
int | size() Returns the number of key-value mappings in this map.
Collection | values() Returns a collection view of the values contained in this map.
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
equals, hashCode

Constructor Detail

HashMap

public HashMap(int initialCapacity,
               float loadFactor)
Constructs a new, empty map with the specified initial capacity and the specified load factor.
Parameters:
initialCapacity - the initial capacity of the HashMap.
loadFactor - the load factor of the HashMap
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.

HashMap

public HashMap(int initialCapacity)
Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75.
Parameters:
initialCapacity - the initial capacity of the HashMap.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.

HashMap

public HashMap()
Constructs a new, empty map with a default capacity and load factor, which is 0.75.

HashMap

public HashMap(Map t)
Constructs a new map with the same mappings as the given map. The map is created with a capacity of twice the number of mappings in the given map or 11 (whichever is greater), and a default load factor, which is 0.75.
Parameters:
t - the map whose mappings are to be placed in this map.
Method Detail

size

public int size()
Returns the number of key-value mappings in this map.
Specified by:
size in interface Map
Overrides:
size in class AbstractMap
Returns:
the number of key-value mappings in this map.

isEmpty

public boolean isEmpty()
Returns true if this map contains no key-value mappings.
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap
Returns:
true if this map contains no key-value mappings.

containsValue

public boolean containsValue(Object value)
Returns true if this map maps one or more keys to the specified value.
Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap
Parameters:
value - value whose presence in this map is to be tested.
Returns:
true if this map maps one or more keys to the specified value.

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap
Parameters:
key - key whose presence in this Map is to be tested.
Returns:
true if this map contains a mapping for the specified key.

get

public Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
Specified by:
get in interface Map
Overrides:
get in class AbstractMap
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key.

put

public Object put(Object key,
                  Object value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.
Specified by:
put in interface Map
Overrides:
put in class AbstractMap
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.

remove

public Object remove(Object key)
Removes the mapping for this key from this map if present.
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap
Parameters:
key - key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.

putAll

public void putAll(Map t)
Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified Map.
Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap
Parameters:
t - Mappings to be stored in this map.

clear

public void clear()
Removes all mappings from this map.
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

clone

public Object clone()
Returns a shallow copy of this HashMap instance: the keys and values themselves are not cloned.
Overrides:
clone in class Object
Returns:
a shallow copy of this map.

keySet

public Set keySet()
Returns a set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap
Returns:
a set view of the keys contained in this map.

values

public Collection values()
Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
values in interface Map
Overrides:
values in class AbstractMap
Returns:
a collection view of the values contained in this map.

entrySet

public Set entrySet()
Returns a collection view of the mappings contained in this map. Each element in the returned collection is a Map.Entry. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
entrySet in interface Map
Overrides:
entrySet in class AbstractMap
Returns:
a collection view of the mappings contained in this map.
See Also:
Map.Entry
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HashSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class HashSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set
public class HashSet
extends AbstractSet
implements Set, Cloneable, Serializable

This class implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time. This class permits the null element.

This class offers constant time performance for the basic operations (add, remove, contains and size), assuming the hash function disperses the elements properly among the buckets. Iterating over this set requires time proportional to the sum of the HashSet instance's size (the number of elements) plus the "capacity" of the backing HashMap instance (the number of buckets). Thus, it's very important not to set the intial capacity too high (or the load factor too low) if iteration performance is important.

Note that this implementation is not synchronized. If multiple threads access a set concurrently, and at least one of the threads modifies the set, it must be synchronized externally. This is typically accomplished by synchronizing on some object that naturally encapsulates the set. If no such object exists, the set should be "wrapped" using the Collections.synchronizedSet method. This is best done at creation time, to prevent accidental unsynchronized access to the HashSet instance:

     Set s = Collections.synchronizedSet(new HashSet(...));

The iterators returned by this class's iterator method are fail-fast: if the set is modified at any time after the iterator is created, in any way except through the iterator's own remove method, the Iterator throws a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Collection, Set, TreeSet, Collections.synchronizedSet(Set), HashMap, Serialized Form

Constructor Summary
HashSet()
Constructs a new, empty set; the backing HashMap instance has default capacity and load factor, which is 0.75.
HashSet(Collection c)
Constructs a new set containing the elements in the specified collection.
HashSet(int initialCapacity)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75.
HashSet(int initialCapacity, float loadFactor)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and the specified load factor.
Method Summary
boolean | add(Object o) Adds the specified element to this set if it is not already present.
void | clear() Removes all of the elements from this set.
Object | clone() Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
boolean | contains(Object o) Returns true if this set contains the specified element.
boolean | isEmpty() Returns true if this set contains no elements.
Iterator | iterator() Returns an iterator over the elements in this set.
boolean | remove(Object o) Removes the given element from this set if it is present.
int | size() Returns the number of elements in this set (its cardinality).
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray

Constructor Detail

HashSet

public HashSet()
Constructs a new, empty set; the backing HashMap instance has default capacity and load factor, which is 0.75.

HashSet

public HashSet(Collection c)
Constructs a new set containing the elements in the specified collection. The capacity of the backing HashMap instance is twice the size of the specified collection or eleven (whichever is greater), and the default load factor (which is 0.75) is used.
Parameters:
c - the collection whose elements are to be placed into this set.

HashSet

public HashSet(int initialCapacity,
               float loadFactor)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and the specified load factor.
Parameters:
initialCapacity - the initial capacity of the hash map.
loadFactor - the load factor of the hash map.
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.

HashSet

public HashSet(int initialCapacity)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75.
Parameters:
initialCapacity - the initial capacity of the hash table.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.
Method Detail

iterator

public Iterator iterator()
Returns an iterator over the elements in this set. The elements are returned in no particular order.
Specified by:
iterator in interface Set
Overrides:
iterator in class AbstractCollection
Returns:
an Iterator over the elements in this set.
See Also:
ConcurrentModificationException

size

public int size()
Returns the number of elements in this set (its cardinality).
Specified by:
size in interface Set
Overrides:
size in class AbstractCollection
Returns:
the number of elements in this set (its cardinality).

isEmpty

public boolean isEmpty()
Returns true if this set contains no elements.
Specified by:
isEmpty in interface Set
Overrides:
isEmpty in class AbstractCollection
Returns:
true if this set contains no elements.

contains

public boolean contains(Object o)
Returns true if this set contains the specified element.
Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection
Parameters:
o - element whose presence in this set is to be tested.
Returns:
true if this set contains the specified element.

add

public boolean add(Object o)
Adds the specified element to this set if it is not already present.
Specified by:
add in interface Set
Overrides:
add in class AbstractCollection
Parameters:
o - element to be added to this set.
Returns:
true if the set did not already contain the specified element.

remove

public boolean remove(Object o)
Removes the given element from this set if it is present.
Specified by:
remove in interface Set
Overrides:
remove in class AbstractCollection
Parameters:
o - object to be removed from this set, if present.
Returns:
true if the set contained the specified element.

clear

public void clear()
Removes all of the elements from this set.
Specified by:
clear in interface Set
Overrides:
clear in class AbstractCollection
Following copied from interface: java.util.Set
Throws:
UnsupportedOperationException - if the clear method is not supported by this set.

clone

public Object clone()
Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
Overrides:
clone in class Object
Returns:
a shallow copy of this set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Hashtable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Hashtable

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
All Implemented Interfaces:
Cloneable, Map, Serializable
Direct Known Subclasses:
Properties, UIDefaults
public class Hashtable
extends Dictionary
implements Map, Cloneable, Serializable

This class implements a hashtable, which maps keys to values. Any non-null object can be used as a key or as a value.

To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the hashCode method and the equals method.

An instance of Hashtable has two parameters that affect its performance: initial capacity and load factor. The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at the time the hash table is created. Note that the hash table is open: in the case a "hash collision", a single bucket stores multiple entries, which must be searched sequentially. The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased. When the number of entries in the hashtable exceeds the product of the load factor and the current capacity, the capacity is increased by calling the rehash method.

Generally, the default load factor (.75) offers a good tradeoff between time and space costs. Higher values decrease the space overhead but increase the time cost to look up an entry (which is reflected in most Hashtable operations, including get and put).

The initial capacity controls a tradeoff between wasted space and the need for rehash operations, which are time-consuming. No rehash operations will ever occur if the initial capacity is greater than the maximum number of entries the Hashtable will contain divided by its load factor. However, setting the initial capacity too high can waste space.

If many entries are to be made into a Hashtable, creating it with a sufficiently large capacity may allow the entries to be inserted more efficiently than letting it perform automatic rehashing as needed to grow the table.

This example creates a hashtable of numbers. It uses the names of the numbers as keys:

     Hashtable numbers = new Hashtable();
     numbers.put("one", new Integer(1));
     numbers.put("two", new Integer(2));
     numbers.put("three", new Integer(3));

To retrieve a number, use the following code:

     Integer n = (Integer)numbers.get("two");
     if (n != null) {
         System.out.println("two = " + n);
     }

As of the Java 2 platform v1.2, this class has been retrofitted to implement Map, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Hashtable is synchronized.

The Iterators returned by the iterator and listIterator methods of the Collections returned by all of Hashtable's "collection view methods" are fail-fast: if the Hashtable is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the Iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future. The Enumerations returned by Hashtable's keys and values methods are not fail-fast.

Since:
JDK1.0
See Also:
Object.equals(java.lang.Object), Object.hashCode(), rehash(), Collection, Map, HashMap, TreeMap, Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
Hashtable()
Constructs a new, empty hashtable with a default capacity and load factor, which is 0.75.
Hashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
Hashtable(int initialCapacity, float loadFactor)
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
Hashtable(Map t)
Constructs a new hashtable with the same mappings as the given Map.
Method Summary
void | clear() Clears this hashtable so that it contains no keys.
Object | clone() Creates a shallow copy of this hashtable.
boolean | contains(Object value) Tests if some key maps into the specified value in this hashtable.
boolean | containsKey(Object key) Tests if the specified object is a key in this hashtable.
boolean | containsValue(Object value) Returns true if this Hashtable maps one or more keys to this value.
Enumeration | elements() Returns an enumeration of the values in this hashtable.
Set | entrySet() Returns a Set view of the entries contained in this Hashtable.
boolean | equals(Object o) Compares the specified Object with this Map for equality, as per the definition in the Map interface.
Object | get(Object key) Returns the value to which the specified key is mapped in this hashtable.
int | hashCode() Returns the hash code value for this Map as per the definition in the Map interface.
boolean | isEmpty() Tests if this hashtable maps no keys to values.
Enumeration | keys() Returns an enumeration of the keys in this hashtable.
Set | keySet() Returns a Set view of the keys contained in this Hashtable.
Object | put(Object key, Object value) Maps the specified key to the specified value in this hashtable.
void | putAll(Map t) Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
protected void | rehash() Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently.
Object | remove(Object key) Removes the key (and its corresponding value) from this hashtable.
int | size() Returns the number of keys in this hashtable.
String | toString() Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space).
Collection | values() Returns a Collection view of the values contained in this Hashtable.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Hashtable

public Hashtable(int initialCapacity,
                 float loadFactor)
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
Parameters:
initialCapacity - the initial capacity of the hashtable.
loadFactor - the load factor of the hashtable.
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.

Hashtable

public Hashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
Parameters:
initialCapacity - the initial capacity of the hashtable.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.

Hashtable

public Hashtable()
Constructs a new, empty hashtable with a default capacity and load factor, which is 0.75.

Hashtable

public Hashtable(Map t)
Constructs a new hashtable with the same mappings as the given Map. The hashtable is created with a capacity of twice the number of entries in the given Map or 11 (whichever is greater), and a default load factor, which is 0.75.
Parameters:
t - the map whose mappings are to be placed in this map.
Since:
1.2
Method Detail

size

public int size()
Returns the number of keys in this hashtable.
Specified by:
size in interface Map
Overrides:
size in class Dictionary
Returns:
the number of keys in this hashtable.

isEmpty

public boolean isEmpty()
Tests if this hashtable maps no keys to values.
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class Dictionary
Returns:
true if this hashtable maps no keys to values; false otherwise.

keys

public Enumeration keys()
Returns an enumeration of the keys in this hashtable.
Overrides:
keys in class Dictionary
Returns:
an enumeration of the keys in this hashtable.
See Also:
Enumeration, elements(), keySet(), Map

elements

public Enumeration elements()
Returns an enumeration of the values in this hashtable. Use the Enumeration methods on the returned object to fetch the elements sequentially.
Overrides:
elements in class Dictionary
Returns:
an enumeration of the values in this hashtable.
See Also:
Enumeration, keys(), values(), Map

contains

public boolean contains(Object value)
Tests if some key maps into the specified value in this hashtable. This operation is more expensive than the containsKey method.

Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).

Parameters:
value - a value to search for.
Returns:
true if and only if some key maps to the value argument in this hashtable as determined by the equals method; false otherwise.
Throws:
NullPointerException - if the value is null.
See Also:
containsKey(Object), containsValue(Object), Map

containsValue

public boolean containsValue(Object value)
Returns true if this Hashtable maps one or more keys to this value.

Note that this method is identical in functionality to contains (which predates the Map interface).

Specified by:
containsValue in interface Map
Parameters:
value - value whose presence in this Hashtable is to be tested.
Returns:
true if this map maps one or more keys to the specified value.
Since:
1.2
See Also:
Map

containsKey

public boolean containsKey(Object key)
Tests if the specified object is a key in this hashtable.
Specified by:
containsKey in interface Map
Parameters:
key - possible key.
Returns:
true if and only if the specified object is a key in this hashtable, as determined by the equals method; false otherwise.
See Also:
contains(Object)

get

public Object get(Object key)
Returns the value to which the specified key is mapped in this hashtable.
Specified by:
get in interface Map
Overrides:
get in class Dictionary
Parameters:
key - a key in the hashtable.
Returns:
the value to which the key is mapped in this hashtable; null if the key is not mapped to any value in this hashtable.
See Also:
put(Object, Object)

rehash

protected void rehash()
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently. This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity and load factor.

put

public Object put(Object key,
                  Object value)
Maps the specified key to the specified value in this hashtable. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Specified by:
put in interface Map
Overrides:
put in class Dictionary
Parameters:
key - the hashtable key.
value - the value.
Returns:
the previous value of the specified key in this hashtable, or null if it did not have one.
Throws:
NullPointerException - if the key or value is null.
See Also:
Object.equals(Object), get(Object)

remove

public Object remove(Object key)
Removes the key (and its corresponding value) from this hashtable. This method does nothing if the key is not in the hashtable.
Specified by:
remove in interface Map
Overrides:
remove in class Dictionary
Parameters:
key - the key that needs to be removed.
Returns:
the value to which the key had been mapped in this hashtable, or null if the key did not have a mapping.

putAll

public void putAll(Map t)
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
Specified by:
putAll in interface Map
Parameters:
t - Mappings to be stored in this map.
Since:
1.2

clear

public void clear()
Clears this hashtable so that it contains no keys.
Specified by:
clear in interface Map
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

clone

public Object clone()
Creates a shallow copy of this hashtable. All the structure of the hashtable itself is copied, but the keys and values are not cloned. This is a relatively expensive operation.
Overrides:
clone in class Object
Returns:
a clone of the hashtable.

toString

public String toString()
Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space). Each entry is rendered as the key, an equals sign =, and the associated element, where the toString method is used to convert the key and element to strings.

Overrides to toString method of Object.

Overrides:
toString in class Object
Returns:
a string representation of this hashtable.

keySet

public Set keySet()
Returns a Set view of the keys contained in this Hashtable. The Set is backed by the Hashtable, so changes to the Hashtable are reflected in the Set, and vice-versa. The Set supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Specified by:
keySet in interface Map
Returns:
a set view of the keys contained in this map.
Since:
1.2

entrySet

public Set entrySet()
Returns a Set view of the entries contained in this Hashtable. Each element in this collection is a Map.Entry. The Set is backed by the Hashtable, so changes to the Hashtable are reflected in the Set, and vice-versa. The Set supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Specified by:
entrySet in interface Map
Returns:
a set view of the mappings contained in this map.
Since:
1.2
See Also:
Map.Entry

values

public Collection values()
Returns a Collection view of the values contained in this Hashtable. The Collection is backed by the Hashtable, so changes to the Hashtable are reflected in the Collection, and vice-versa. The Collection supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Specified by:
values in interface Map
Returns:
a collection view of the values contained in this map.
Since:
1.2

equals

public boolean equals(Object o)
Compares the specified Object with this Map for equality, as per the definition in the Map interface.
Specified by:
equals in interface Map
Overrides:
equals in class Object
Returns:
true if the specified Object is equal to this Map.
Since:
1.2
See Also:
Map.equals(Object)

hashCode

public int hashCode()
Returns the hash code value for this Map as per the definition in the Map interface.
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object
Since:
1.2
See Also:
Map.hashCode()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Iterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Iterator

All Known Subinterfaces:
ListIterator
All Known Implementing Classes:
BeanContextSupport.BCSIterator
public interface Iterator

An iterator over a collection. Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways:

  • Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
  • Method names have been improved.

Since:
1.2
See Also:
Collection, ListIterator, Enumeration

Method Summary
boolean | hasNext() Returns true if the iteration has more elements.
Object | next() Returns the next element in the interation.
void | remove() Removes from the underlying collection the last element returned by the iterator (optional operation).

Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
Returns:
true if the iterator has more elements.

next

public Object next()
Returns the next element in the interation.
Returns:
the next element in the iteration.
Throws:
NoSuchElementException - iteration has no more elements.

remove

public void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
Throws:
UnsupportedOperationException - if the remove operation is not supported by this Iterator.
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


java.util.jar Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.util.jar

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.util.jar.Attributes (implements java.lang.Cloneable, java.util.Map)
    • class java.util.jar.Attributes.Name
    • class java.io.InputStream
      • class java.io.FilterInputStream
        • class java.util.zip.InflaterInputStream
          • class java.util.zip.ZipInputStream (implements java.util.zip.ZipConstants)
            • class java.util.jar.JarInputStream
    • class java.util.jar.Manifest (implements java.lang.Cloneable)
    • class java.io.OutputStream
      • class java.io.FilterOutputStream
        • class java.util.zip.DeflaterOutputStream
          • class java.util.zip.ZipOutputStream (implements java.util.zip.ZipConstants)
            • class java.util.jar.JarOutputStream
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.io.IOException
          • class java.util.zip.ZipException
            • class java.util.jar.JarException
    • class java.util.zip.ZipEntry (implements java.lang.Cloneable, java.util.zip.ZipConstants)
      • class java.util.jar.JarEntry
    • class java.util.zip.ZipFile (implements java.util.zip.ZipConstants)
      • class java.util.jar.JarFile
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.util.jar

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

See:
Description

Class Summary
Attributes | The Attributes class maps Manifest attribute names to associated string values.
Attributes.Name | The Attributes.Name class represents an attribute name stored in this Map.
JarEntry | This class is used to represent a JAR file entry.
JarFile | The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile.
JarInputStream | The JarInputStream class is used to read the contents of a JAR file from any input stream.
JarOutputStream | The JarOutputStream class is used to write the contents of a JAR file to any output stream.
Manifest | The Manifest class is used to maintain Manifest entry names and their associated Attributes.

Exception Summary
JarException Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Package java.util.jar Description

Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. The manifest stores meta-information about the JAR file contents and is also used for signing JAR files.

Package Specification

The java.util.zip package is based on the following specifications:
  • Info-ZIP file format - The JAR format is based on the Info-ZIP file format. See java.util.zip package description.

  • Manifest and Signature Specification - The manifest format specification.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.util.jar

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.util.jar

Packages that use java.util.jar
java.net | Provides the classes for implementing networking applications.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Classes in java.util.jar used by java.net
Attributes
The Attributes class maps Manifest attribute names to associated string values.
JarEntry
This class is used to represent a JAR file entry.
JarFile
The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile.
Manifest
The Manifest class is used to maintain Manifest entry names and their associated Attributes.

Classes in java.util.jar used by java.util.jar
Attributes
The Attributes class maps Manifest attribute names to associated string values.
Attributes.Name
The Attributes.Name class represents an attribute name stored in this Map.
JarEntry
This class is used to represent a JAR file entry.
Manifest
The Manifest class is used to maintain Manifest entry names and their associated Attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Attributes

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class Attributes

java.lang.Object
  |
  +--java.util.jar.Attributes
All Implemented Interfaces:
Cloneable, Map
public class Attributes
extends Object
implements Map, Cloneable

The Attributes class maps Manifest attribute names to associated string values. Attribute names are case-insensitive and restricted to the ASCII characters in the set [0-9a-zA-Z_-]. Attribute values can contain any characters and will be UTF8-encoded when written to the output stream.

Since:
1.2
See Also:
Manifest

Inner Class Summary
static class Attributes.Name
The Attributes.Name class represents an attribute name stored in this Map.
Inner classes inherited from class java.util.Map
Map.Entry
Field Summary
protected  Map map
The attribute name-value mappings.
Constructor Summary
Attributes()
Constructs a new, empty Attributes object with default size.
Attributes(Attributes attr)
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.
Attributes(int size)
Constructs a new, empty Attributes object with the specified initial size.
Method Summary
void | clear() Removes all attributes from this Map.
Object | clone() Returns a copy of the Attributes, implemented as follows:
boolean | containsKey(Object name) Returns true if this Map contains the specified attribute name (key).
boolean | containsValue(Object value) Returns true if this Map maps one or more attribute names (keys) to the specified value.
Set | entrySet() Returns a Collection view of the attribute name-value mappings contained in this Map.
boolean | equals(Object o) Compares the specified Attributes object with this Map for equality.
Object | get(Object name) Returns the value of the specified attribute name, or null if the attribute name was not found.
String | getValue(Attributes.Name name) Returns the value of the specified Attributes.Name, or null if the attribute was not found.
String | getValue(String name) Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.
int | hashCode() Returns the hash code value for this Map.
boolean | isEmpty() Returns true if this Map contains no attributes.
Set | keySet() Returns a Set view of the attribute names (keys) contained in this Map.
Object | put(Object name, Object value) Associates the specified value with the specified attribute name (key) in this Map.
void | putAll(Map attr) Copies all of the attribute name-value mappings from the specified Attributes to this Map.
String | putValue(String name, String value) Associates the specified value with the specified attribute name, specified as a String.
Object | remove(Object name) Removes the attribute with the specified name (key) from this Map.
int | size() Returns the number of attributes in this Map.
Collection | values() Returns a Collection view of the attribute values contained in this Map.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

map

protected Map map
The attribute name-value mappings.
Constructor Detail

Attributes

public Attributes()
Constructs a new, empty Attributes object with default size.

Attributes

public Attributes(int size)
Constructs a new, empty Attributes object with the specified initial size.
Parameters:
size - the initial number of attributes

Attributes

public Attributes(Attributes attr)
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.
Parameters:
attr - the specified Attributes
Method Detail

get

public Object get(Object name)
Returns the value of the specified attribute name, or null if the attribute name was not found.
Specified by:
get in interface Map
Parameters:
name - the attribute name
Returns:
the value of the specified attribute name, or null if not found.

getValue

public String getValue(String name)
Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found. The attribute name is case-insensitive.

This method is defined as:

        return (String)get(new Attributes.Name((String)name));
Parameters:
name - the attribute name as a string
Returns:
the String value of the specified attribute name, or null if not found.

getValue

public String getValue(Attributes.Name name)
Returns the value of the specified Attributes.Name, or null if the attribute was not found.

This method is defined as:

     return (String)get(name);
Parameters:
name - the Attributes.Name object
Returns:
the String value of the specified Attribute.Name, or null if not found.

put

public Object put(Object name,
                  Object value)
Associates the specified value with the specified attribute name (key) in this Map. If the Map previously contained a mapping for the attribute name, the old value is replaced.
Specified by:
put in interface Map
Parameters:
name - the attribute name
value - the attribute value
Returns:
the previous value of the attribute, or null if none
Throws:
ClassCastException - if the name is not a Attributes.Name or the value is not a String

putValue

public String putValue(String name,
                       String value)
Associates the specified value with the specified attribute name, specified as a String. The attributes name is case-insensitive. If the Map previously contained a mapping for the attribute name, the old value is replaced.

This method is defined as:

        return (String)put(new Attributes.Name(name), value);
Parameters:
name - the attribute name as a string
value - the attribute value
Returns:
the previous value of the attribute, or null if none
Throws:
IllegalArgumentException - if the attribute name is invalid

remove

public Object remove(Object name)
Removes the attribute with the specified name (key) from this Map. Returns the previous attribute value, or null if none.
Specified by:
remove in interface Map
Parameters:
name - attribute name
Returns:
the previous value of the attribute, or null if none

containsValue

public boolean containsValue(Object value)
Returns true if this Map maps one or more attribute names (keys) to the specified value.
Specified by:
containsValue in interface Map
Parameters:
value - the attribute value
Returns:
true if this Map maps one or more attribute names to the specified value

containsKey

public boolean containsKey(Object name)
Returns true if this Map contains the specified attribute name (key).
Specified by:
containsKey in interface Map
Parameters:
name - the attribute name
Returns:
true if this Map contains the specified attribute name

putAll

public void putAll(Map attr)
Copies all of the attribute name-value mappings from the specified Attributes to this Map. Duplicate mappings will be replaced.
Specified by:
putAll in interface Map
Parameters:
attr - the Attributes to be stored in this map
Throws:
ClassCastException - if attr is not an Attributes

clear

public void clear()
Removes all attributes from this Map.
Specified by:
clear in interface Map
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

size

public int size()
Returns the number of attributes in this Map.
Specified by:
size in interface Map
Following copied from interface: java.util.Map
Returns:
the number of key-value mappings in this map.

isEmpty

public boolean isEmpty()
Returns true if this Map contains no attributes.
Specified by:
isEmpty in interface Map
Following copied from interface: java.util.Map
Returns:
true if this map contains no key-value mappings.

keySet

public Set keySet()
Returns a Set view of the attribute names (keys) contained in this Map.
Specified by:
keySet in interface Map
Following copied from interface: java.util.Map
Returns:
a set view of the keys contained in this map.

values

public Collection values()
Returns a Collection view of the attribute values contained in this Map.
Specified by:
values in interface Map
Following copied from interface: java.util.Map
Returns:
a collection view of the values contained in this map.

entrySet

public Set entrySet()
Returns a Collection view of the attribute name-value mappings contained in this Map.
Specified by:
entrySet in interface Map
Following copied from interface: java.util.Map
Returns:
a set view of the mappings contained in this map.

equals

public boolean equals(Object o)
Compares the specified Attributes object with this Map for equality. Returns true if the given object is also an instance of Attributes and the two Attributes objects represent the same mappings.
Specified by:
equals in interface Map
Overrides:
equals in class Object
Parameters:
o - the Object to be compared
Returns:
true if the specified Object is equal to this Map

hashCode

public int hashCode()
Returns the hash code value for this Map.
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object
Following copied from interface: java.util.Map
Returns:
the hash code value for this map.
See Also:
Map.Entry.hashCode(),
Object.hashCode(),
Object.equals(Object),
Map.equals(Object)

clone

public Object clone()
Returns a copy of the Attributes, implemented as follows:
     public Object clone() { return new Attributes(this); }
Since the attribute names and values are themselves immutable, the Attributes returned can be safely modified without affecting the original.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.util.jar.JarException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.JarException

No usage of java.util.jar.JarException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.JarInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.JarInputStream

No usage of java.util.jar.JarInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.JarOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.JarOutputStream

No usage of java.util.jar.JarOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.Attributes

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.Attributes

Packages that use Attributes
java.net | Provides the classes for implementing networking applications.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Attributes in java.net

Methods in java.net that return Attributes
Attributes | JarURLConnection.getAttributes() Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
Attributes | JarURLConnection.getMainAttributes() Returns the main Attributes for the JAR file for this connection.

Uses of Attributes in java.util.jar

Methods in java.util.jar that return Attributes
Attributes | Manifest.getMainAttributes() Returns the main Attributes for the Manifest.
Attributes | Manifest.getAttributes(String name) Returns the Attributes for the specified entry name.
Attributes | JarEntry.getAttributes() Returns the Manifest Attributes for this entry, or null if none.

Constructors in java.util.jar with parameters of type Attributes
Attributes(Attributes attr)
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.Attributes.Name

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.Attributes.Name

Packages that use Attributes.Name
java.util.jar Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Attributes.Name in java.util.jar

Fields in java.util.jar declared as Attributes.Name
static Attributes.Name | Attributes.Name.MANIFEST_VERSION Name object for Manifest-Version manifest attribute.
static Attributes.Name | Attributes.Name.SIGNATURE_VERSION Name object for Signature-Version manifest attribute used when signing JAR files.
static Attributes.Name | Attributes.Name.CONTENT_TYPE Name object for Content-Type manifest attribute.
static Attributes.Name | Attributes.Name.CLASS_PATH Name object for Class-Path manifest attribute.
static Attributes.Name | Attributes.Name.MAIN_CLASS Name object for Main-Class manifest attribute used for launching applications packaged in JAR files.
static Attributes.Name | Attributes.Name.SEALED Name object for Sealed manifest attribute used for sealing.
static Attributes.Name | Attributes.Name.EXTENSION_LIST Name object for Extension-List manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | Attributes.Name.EXTENSION_NAME Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | Attributes.Name.EXTENSION_INSTALLATION Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | Attributes.Name.IMPLEMENTATION_TITLE Name object for Implementation-Title manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.IMPLEMENTATION_VERSION Name object for Implementation-Version manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.IMPLEMENTATION_VENDOR Name object for Implementation-Vendor manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.IMPLEMENTATION_VENDOR_ID Name object for Implementation-Vendor-Id manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.IMPLEMENTATION_URL Name object for Implementation-Vendor-URL manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.SPECIFICATION_TITLE Name object for Specification-Title manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.SPECIFICATION_VERSION Name object for Specification-Version manifest attribute used for package versioning.
static Attributes.Name | Attributes.Name.SPECIFICATION_VENDOR Name object for Specification-Vendor manifest attribute used for package versioning.

Methods in java.util.jar with parameters of type Attributes.Name
 String Attributes.getValue(Attributes.Name name)
Returns the value of the specified Attributes.Name, or null if the attribute was not found.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.JarEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.JarEntry

Packages that use JarEntry
java.net | Provides the classes for implementing networking applications.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of JarEntry in java.net

Methods in java.net that return JarEntry
 JarEntry JarURLConnection.getJarEntry()
Return the JAR entry object for this connection, if any.

Uses of JarEntry in java.util.jar

Methods in java.util.jar that return JarEntry
JarEntry | JarInputStream.getNextJarEntry() Reads the next JAR file entry and positions the stream at the beginning of the entry data.
JarEntry | JarFile.getJarEntry(String name) Returns the JarEntry for the given entry name or null if not found.

Constructors in java.util.jar with parameters of type JarEntry
JarEntry(JarEntry je)
Creates a new JarEntry with fields taken from the specified JarEntry object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.JarFile

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.JarFile

Packages that use JarFile
java.net Provides the classes for implementing networking applications.

Uses of JarFile in java.net

Methods in java.net that return JarFile
abstract  JarFile JarURLConnection.getJarFile()
Return the JAR file for this connection.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.jar.Manifest

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.jar.Manifest

Packages that use Manifest
java.net | Provides the classes for implementing networking applications.
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of Manifest in java.net

Methods in java.net that return Manifest
 Manifest JarURLConnection.getManifest()
Returns the Manifest for this connection, or null if none.

Methods in java.net with parameters of type Manifest
protected  Package URLClassLoader.definePackage(String name, Manifest man, URL url)
Defines a new package by name in this ClassLoader.

Uses of Manifest in java.util.jar

Methods in java.util.jar that return Manifest
Manifest | JarInputStream.getManifest() Returns the Manifest for this JAR file, or null if none.
Manifest | JarFile.getManifest() Returns the JAR file manifest, or null if none.

Constructors in java.util.jar with parameters of type Manifest
Manifest(Manifest man)
Constructs a new Manifest that is a copy of the specified Manifest.
JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with the specified Manifest.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


JarEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class JarEntry

java.lang.Object
  |
  +--java.util.zip.ZipEntry
        |
        +--java.util.jar.JarEntry
All Implemented Interfaces:
Cloneable, java.util.zip.ZipConstants
public class JarEntry
extends ZipEntry

This class is used to represent a JAR file entry.

Fields inherited from class java.util.zip.ZipEntry
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, DEFLATED, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, STORED
Constructor Summary
JarEntry(JarEntry je)
Creates a new JarEntry with fields taken from the specified JarEntry object.
JarEntry(String name)
Creates a new JarEntry for the specified JAR file entry name.
JarEntry(ZipEntry ze)
Creates a new JarEntry with fields taken from the specified ZipEntry object.
Method Summary
Attributes | getAttributes() Returns the Manifest Attributes for this entry, or null if none.
Certificate[] | getCertificates() Returns the Certificate objects for this entry, or null if none.
Methods inherited from class java.util.zip.ZipEntry
clone, getComment, getCompressedSize, getCrc, getExtra, getMethod, getName, getSize, getTime, hashCode, isDirectory, setComment, setCompressedSize, setCrc, setExtra, setMethod, setSize, setTime, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

JarEntry

public JarEntry(String name)
Creates a new JarEntry for the specified JAR file entry name.
Parameters:
name - the JAR file entry name
Throws:
NullPointerException - if the entry name is null
IllegalArgumentException - if the entry name is longer than 0xFFFF bytes.

JarEntry

public JarEntry(ZipEntry ze)
Creates a new JarEntry with fields taken from the specified ZipEntry object.
Parameters:
ze - the ZipEntry object to create the JarEntry from

JarEntry

public JarEntry(JarEntry je)
Creates a new JarEntry with fields taken from the specified JarEntry object.
Parameters:
je - the JarEntry to copy
Method Detail

getAttributes

public Attributes getAttributes()
                         throws IOException
Returns the Manifest Attributes for this entry, or null if none.
Returns:
the Manifest Attributes for this entry, or null if none

getCertificates

public Certificate[] getCertificates()
Returns the Certificate objects for this entry, or null if none. This method can only be called once the JarEntry has been completely verified by reading from the entry input stream until the end of the stream has been reached. Otherwise, this method will return null.

The returned certificate array comprises all the signer certificates that were used to verify this entry. Each signer certificate is followed by its supporting certificate chain (which may be empty). Each signer certificate and its supporting certificate chain are ordered bottom-to-top (i.e., with the signer certificate first and the (root) certificate authority last).

Returns:
the Certificate objects for this entry, or null if none.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JarException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class JarException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.util.zip.ZipException
                          |
                          +--java.util.jar.JarException
All Implemented Interfaces:
Serializable
public class JarException
extends ZipException

Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
JarException()
Constructs a JarException with no detail message.
JarException(String s)
Constructs a JarException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JarException

public JarException()
Constructs a JarException with no detail message.

JarException

public JarException(String s)
Constructs a JarException with the specified detail message.
Parameters:
s - the detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JarFile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class JarFile

java.lang.Object
  |
  +--java.util.zip.ZipFile
        |
        +--java.util.jar.JarFile
All Implemented Interfaces:
java.util.zip.ZipConstants
public class JarFile
extends ZipFile

The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile. It extends the class java.util.zip.ZipFile with support for reading an optional Manifest entry. The Manifest can be used to specify meta-information about the JAR file and its entries.

Since:
1.2
See Also:
Manifest, ZipFile, JarEntry

Field Summary
static String MANIFEST_NAME
The JAR manifest file name.
Fields inherited from class java.util.zip.ZipFile
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, OPEN_DELETE, OPEN_READ
Constructor Summary
JarFile(File file)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify)
Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify, int mode)
Creates a new JarFile to read from the specified File object in the specified mode.
JarFile(String name)
Creates a new JarFile to read from the specified file name.
JarFile(String name, boolean verify)
Creates a new JarFile to read from the specified file name.
Method Summary
Enumeration | entries() Returns an enumeration of the ZIP file entries.
ZipEntry | getEntry(String name) Returns the ZipEntry for the given entry name or null if not found.
InputStream | getInputStream(ZipEntry ze) Returns an input stream for reading the contents of the specified ZIP file entry.
JarEntry | getJarEntry(String name) Returns the JarEntry for the given entry name or null if not found.
Manifest | getManifest() Returns the JAR file manifest, or null if none.
Methods inherited from class java.util.zip.ZipFile
close, finalize, getName, size
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MANIFEST_NAME

public static final String MANIFEST_NAME
The JAR manifest file name.
Constructor Detail

JarFile

public JarFile(String name)
        throws IOException
Creates a new JarFile to read from the specified file name. The JarFile will be verified if it is signed.
Parameters:
name - the name of the JAR file to be opened for reading
Throws:
FileNotFoundException - if the file could not be found
IOException - if an I/O error has occurred

JarFile

public JarFile(String name,
               boolean verify)
        throws IOException
Creates a new JarFile to read from the specified file name.
Parameters:
name - the name of the JAR file to be opened for reading
verify - whether or not to verify the JarFile if it is signed.
Throws:
FileNotFoundException - if the file could not be found
IOException - if an I/O error has occurred

JarFile

public JarFile(File file)
        throws IOException
Creates a new JarFile to read from the specified File object. The JarFile will be verified if it is signed.
Parameters:
file - the JAR file to be opened for reading
Throws:
FileNotFoundException - if the file could not be found
IOException - if an I/O error has occurred

JarFile

public JarFile(File file,
               boolean verify)
        throws IOException
Creates a new JarFile to read from the specified File object.
Parameters:
file - the JAR file to be opened for reading
verify - whether or not to verify the JarFile if it is signed.
Throws:
FileNotFoundException - if the file could not be found
IOException - if an I/O error has occurred

JarFile

public JarFile(File file,
               boolean verify,
               int mode)
        throws IOException
Creates a new JarFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.
Parameters:
file - the JAR file to be opened for reading
verify - whether or not to verify the JarFile if it is signed.
mode - the mode in which the file is to be opened
Throws:
FileNotFoundException - if the file could not be found
IOException - if an I/O error has occurred
IllegalArgumentException - If the mode argument is invalid
Method Detail

getManifest

public Manifest getManifest()
                     throws IOException
Returns the JAR file manifest, or null if none.
Returns:
the JAR file manifest, or null if none

getJarEntry

public JarEntry getJarEntry(String name)
Returns the JarEntry for the given entry name or null if not found.
Parameters:
name - the JAR file entry name
Returns:
the JarEntry for the given entry name or null if not found.
See Also:
JarEntry

getEntry

public ZipEntry getEntry(String name)
Returns the ZipEntry for the given entry name or null if not found.
Overrides:
getEntry in class ZipFile
Parameters:
name - the JAR file entry name
Returns:
the ZipEntry for the given entry name or null if not found
See Also:
ZipEntry

entries

public Enumeration entries()
Returns an enumeration of the ZIP file entries.
Overrides:
entries in class ZipFile
Following copied from class: java.util.zip.ZipFile
Returns:
an enumeration of the ZIP file entries
Throws:
IllegalStateException - if the zip file has been closed

getInputStream

public InputStream getInputStream(ZipEntry ze)
                           throws IOException
Returns an input stream for reading the contents of the specified ZIP file entry.
Overrides:
getInputStream in class ZipFile
Parameters:
ze - the zip file entry
Returns:
an input stream for reading the contents of the specified ZIP file entry
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if any of the JarFile entries are incorrectly signed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JarInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class JarInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.util.zip.InflaterInputStream
                    |
                    +--java.util.zip.ZipInputStream
                          |
                          +--java.util.jar.JarInputStream
All Implemented Interfaces:
java.util.zip.ZipConstants
public class JarInputStream
extends ZipInputStream

The JarInputStream class is used to read the contents of a JAR file from any input stream. It extends the class java.util.zip.ZipInputStream with support for reading an optional Manifest entry. The Manifest can be used to store meta-information about the JAR file and its entries.

Since:
1.2
See Also:
Manifest, ZipInputStream

Fields inherited from class java.util.zip.ZipInputStream
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
JarInputStream(InputStream in)
Creates a new JarInputStream and reads the optional manifest.
JarInputStream(InputStream in, boolean verify)
Creates a new JarInputStream and reads the optional manifest.
Method Summary
protected ZipEntry | createZipEntry(String name) Creates a new JarEntry (ZipEntry) for the specified JAR file entry name.
Manifest | getManifest() Returns the Manifest for this JAR file, or null if none.
ZipEntry | getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
JarEntry | getNextJarEntry() Reads the next JAR file entry and positions the stream at the beginning of the entry data.
int | read(byte[] b, int off, int len) Reads from the current JAR file entry into an array of bytes.
Methods inherited from class java.util.zip.ZipInputStream
available, close, closeEntry, skip
Methods inherited from class java.util.zip.InflaterInputStream
fill, read
Methods inherited from class java.io.FilterInputStream
mark, markSupported, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JarInputStream

public JarInputStream(InputStream in)
               throws IOException
Creates a new JarInputStream and reads the optional manifest. If a manifest is present, also attempts to verify the signatures if the JarInputStream is signed.
Parameters:
in - the actual input stream
Throws:
IOException - if an I/O error has occurred

JarInputStream

public JarInputStream(InputStream in,
                      boolean verify)
               throws IOException
Creates a new JarInputStream and reads the optional manifest. If a manifest is present and verify is true, also attempts to verify the signatures if the JarInputStream is signed.
Parameters:
in - the actual input stream
verify - whether or not to verify the JarInputStream if it is signed.
Throws:
IOException - if an I/O error has occurred
Method Detail

getManifest

public Manifest getManifest()
Returns the Manifest for this JAR file, or null if none.
Returns:
the Manifest for this JAR file, or null if none.

getNextEntry

public ZipEntry getNextEntry()
                      throws IOException
Reads the next ZIP file entry and positions stream at the beginning of the entry data.
Overrides:
getNextEntry in class ZipInputStream
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

getNextJarEntry

public JarEntry getNextJarEntry()
                         throws IOException
Reads the next JAR file entry and positions the stream at the beginning of the entry data.
Returns:
the next JAR file entry
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads from the current JAR file entry into an array of bytes. Blocks until some input is available.
Overrides:
read in class ZipInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes to read
Returns:
the actual number of bytes read, or -1 if the end of the entry is reached
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

createZipEntry

protected ZipEntry createZipEntry(String name)
Creates a new JarEntry (ZipEntry) for the specified JAR file entry name.
Overrides:
createZipEntry in class ZipInputStream
Parameters:
name - the name of the JAR/ZIP file entry
Returns:
the JarEntry object just created
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JarOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class JarOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.util.zip.DeflaterOutputStream
                    |
                    +--java.util.zip.ZipOutputStream
                          |
                          +--java.util.jar.JarOutputStream
All Implemented Interfaces:
java.util.zip.ZipConstants
public class JarOutputStream
extends ZipOutputStream

The JarOutputStream class is used to write the contents of a JAR file to any output stream. It extends the class java.util.zip.ZipOutputStream with support for writing an optional Manifest entry. The Manifest can be used to specify meta-information about the JAR file and its entries.

Since:
1.2
See Also:
Manifest, ZipOutputStream

Fields inherited from class java.util.zip.ZipOutputStream
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, DEFLATED, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, STORED
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, def
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
JarOutputStream(OutputStream out)
Creates a new JarOutputStream with no manifest.
JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with the specified Manifest.
Method Summary
 void putNextEntry(ZipEntry ze)
Begins writing a new JAR file entry and positions the stream to the start of the entry data.
Methods inherited from class java.util.zip.ZipOutputStream
close, closeEntry, finish, setComment, setLevel, setMethod, write
Methods inherited from class java.util.zip.DeflaterOutputStream
deflate, write
Methods inherited from class java.io.FilterOutputStream
flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JarOutputStream

public JarOutputStream(OutputStream out,
                       Manifest man)
                throws IOException
Creates a new JarOutputStream with the specified Manifest. The manifest is written as the first entry to the output stream.
Parameters:
out - the actual output stream
man - the optional Manifest
Throws:
IOException - if an I/O error has occurred

JarOutputStream

public JarOutputStream(OutputStream out)
                throws IOException
Creates a new JarOutputStream with no manifest.
Parameters:
out - the actual output stream
Throws:
IOException - if an I/O error has occurred
Method Detail

putNextEntry

public void putNextEntry(ZipEntry ze)
                  throws IOException
Begins writing a new JAR file entry and positions the stream to the start of the entry data. This method will also close any previous entry. The default compression method will be used if no compression method was specified for the entry. The current time will be used if the entry has no set modification time.
Overrides:
putNextEntry in class ZipOutputStream
Parameters:
ze - the ZIP/JAR entry to be written
Throws:
ZipException - if a ZIP error has occurred
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Manifest

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class Manifest

java.lang.Object
  |
  +--java.util.jar.Manifest
All Implemented Interfaces:
Cloneable
public class Manifest
extends Object
implements Cloneable

The Manifest class is used to maintain Manifest entry names and their associated Attributes. There are main Manifest Attributes as well as per-entry Attributes. Documentation on the Manifest format can be found at :

 http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html

Since:
1.2
See Also:
Attributes

Constructor Summary
Manifest()
Constructs a new, empty Manifest.
Manifest(InputStream is)
Constructs a new Manifest from the specified input stream.
Manifest(Manifest man)
Constructs a new Manifest that is a copy of the specified Manifest.
Method Summary
void | clear() Clears the main Attributes as well as the entries in this Manifest.
Object | clone() Returns a shallow copy of this Manifest, implemented as follows:
boolean | equals(Object o) Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
Attributes | getAttributes(String name) Returns the Attributes for the specified entry name.
Map | getEntries() Returns a Map of the entries contained in this Manifest.
Attributes | getMainAttributes() Returns the main Attributes for the Manifest.
int | hashCode() Returns the hash code for this Manifest.
void | read(InputStream is) Reads the Manifest from the specified InputStream.
void | write(OutputStream out) Writes the Manifest to the specified OutputStream.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Manifest

public Manifest()
Constructs a new, empty Manifest.

Manifest

public Manifest(InputStream is)
         throws IOException
Constructs a new Manifest from the specified input stream.
Parameters:
is - the input stream containing manifest data
Throws:
IOException - if an I/O error has occured

Manifest

public Manifest(Manifest man)
Constructs a new Manifest that is a copy of the specified Manifest.
Parameters:
man - the Manifest to copy
Method Detail

getMainAttributes

public Attributes getMainAttributes()
Returns the main Attributes for the Manifest.
Returns:
the main Attributes for the Manifest

getEntries

public Map getEntries()
Returns a Map of the entries contained in this Manifest. Each entry is represented by a String name (key) and associated Attributes (value).
Returns:
a Map of the entries contained in this Manifest

getAttributes

public Attributes getAttributes(String name)
Returns the Attributes for the specified entry name. This method is defined as:
        return (Attributes)getEntries().get(name)
Returns:
the Attributes for the specified entry name

clear

public void clear()
Clears the main Attributes as well as the entries in this Manifest.

write

public void write(OutputStream out)
           throws IOException
Writes the Manifest to the specified OutputStream.
Parameters:
out - the output stream
Throws:
IOException - if an I/O error has occurred

read

public void read(InputStream is)
          throws IOException
Reads the Manifest from the specified InputStream. The entry names and attributes read will be merged in with the current manifest entries.
Parameters:
is - the input stream
Throws:
IOException - if an I/O error has occurred

equals

public boolean equals(Object o)
Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
Overrides:
equals in class Object
Parameters:
o - the object to be compared
Returns:
true if the specified Object is also a Manifest and has the same main Attributes and entries

hashCode

public int hashCode()
Returns the hash code for this Manifest.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

clone

public Object clone()
Returns a shallow copy of this Manifest, implemented as follows:
     public Object clone() { return new Manifest(this); }
Overrides:
clone in class Object
Returns:
a shallow copy of this Manifest
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Name

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.jar
Class Attributes.Name

java.lang.Object
  |
  +--java.util.jar.Attributes.Name
Enclosing class:
Attributes
public static class Attributes.Name
extends Object

The Attributes.Name class represents an attribute name stored in this Map. Attribute names are case-insensitive and restricted to the ASCII characters in the set [0-9a-zA-Z_-].

Field Summary
static Attributes.Name | CLASS_PATH Name object for Class-Path manifest attribute.
static Attributes.Name | CONTENT_TYPE Name object for Content-Type manifest attribute.
static Attributes.Name | EXTENSION_INSTALLATION Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | EXTENSION_LIST Name object for Extension-List manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | EXTENSION_NAME Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
static Attributes.Name | IMPLEMENTATION_TITLE Name object for Implementation-Title manifest attribute used for package versioning.
static Attributes.Name | IMPLEMENTATION_URL Name object for Implementation-Vendor-URL manifest attribute used for package versioning.
static Attributes.Name | IMPLEMENTATION_VENDOR Name object for Implementation-Vendor manifest attribute used for package versioning.
static Attributes.Name | IMPLEMENTATION_VENDOR_ID Name object for Implementation-Vendor-Id manifest attribute used for package versioning.
static Attributes.Name | IMPLEMENTATION_VERSION Name object for Implementation-Version manifest attribute used for package versioning.
static Attributes.Name | MAIN_CLASS Name object for Main-Class manifest attribute used for launching applications packaged in JAR files.
static Attributes.Name | MANIFEST_VERSION Name object for Manifest-Version manifest attribute.
static Attributes.Name | SEALED Name object for Sealed manifest attribute used for sealing.
static Attributes.Name | SIGNATURE_VERSION Name object for Signature-Version manifest attribute used when signing JAR files.
static Attributes.Name | SPECIFICATION_TITLE Name object for Specification-Title manifest attribute used for package versioning.
static Attributes.Name | SPECIFICATION_VENDOR Name object for Specification-Vendor manifest attribute used for package versioning.
static Attributes.Name | SPECIFICATION_VERSION Name object for Specification-Version manifest attribute used for package versioning.
Constructor Summary
Attributes.Name(String name)
Constructs a new attribute name using the given string name.
Method Summary
boolean | equals(Object o) Compares this attribute name to another for equality.
int | hashCode() Computes the hash value for this attribute name.
String | toString() Returns the attribute name as a String.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MANIFEST_VERSION

public static final Attributes.Name MANIFEST_VERSION
Name object for Manifest-Version manifest attribute. This attribute indicates the version number of the manifest standard to which a JAR file's manifest conforms.
See Also:
Manifest and Signature Specification

SIGNATURE_VERSION

public static final Attributes.Name SIGNATURE_VERSION
Name object for Signature-Version manifest attribute used when signing JAR files.
See Also:
Manifest and Signature Specification

CONTENT_TYPE

public static final Attributes.Name CONTENT_TYPE
Name object for Content-Type manifest attribute.

CLASS_PATH

public static final Attributes.Name CLASS_PATH
Name object for Class-Path manifest attribute. Bundled extensions can use this attribute to find other JAR files containing needed classes.
See Also:
Extensions Specification

MAIN_CLASS

public static final Attributes.Name MAIN_CLASS
Name object for Main-Class manifest attribute used for launching applications packaged in JAR files. The Main-Class attribute is used in conjunction with the -jar command-line option of the java application launcher.

SEALED

public static final Attributes.Name SEALED
Name object for Sealed manifest attribute used for sealing.
See Also:
Extension Sealing

EXTENSION_LIST

public static final Attributes.Name EXTENSION_LIST
Name object for Extension-List manifest attribute used for declaring dependencies on installed extensions.
See Also:
Installed extension dependency

EXTENSION_NAME

public static final Attributes.Name EXTENSION_NAME
Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
See Also:
Installed extension dependency

EXTENSION_INSTALLATION

public static final Attributes.Name EXTENSION_INSTALLATION
Name object for Extension-Name manifest attribute used for declaring dependencies on installed extensions.
See Also:
Installed extension dependency

IMPLEMENTATION_TITLE

public static final Attributes.Name IMPLEMENTATION_TITLE
Name object for Implementation-Title manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

IMPLEMENTATION_VERSION

public static final Attributes.Name IMPLEMENTATION_VERSION
Name object for Implementation-Version manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

IMPLEMENTATION_VENDOR

public static final Attributes.Name IMPLEMENTATION_VENDOR
Name object for Implementation-Vendor manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

IMPLEMENTATION_VENDOR_ID

public static final Attributes.Name IMPLEMENTATION_VENDOR_ID
Name object for Implementation-Vendor-Id manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

IMPLEMENTATION_URL

public static final Attributes.Name IMPLEMENTATION_URL
Name object for Implementation-Vendor-URL manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

SPECIFICATION_TITLE

public static final Attributes.Name SPECIFICATION_TITLE
Name object for Specification-Title manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

SPECIFICATION_VERSION

public static final Attributes.Name SPECIFICATION_VERSION
Name object for Specification-Version manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification

SPECIFICATION_VENDOR

public static final Attributes.Name SPECIFICATION_VENDOR
Name object for Specification-Vendor manifest attribute used for package versioning.
See Also:
Java Product Versioning Specification
Constructor Detail

Attributes.Name

public Attributes.Name(String name)
Constructs a new attribute name using the given string name.
Parameters:
name - the attribute string name
Throws:
IllegalArgumentException - if the attribute name was invalid
NullPointerException - if the attribute name was null
Method Detail

equals

public boolean equals(Object o)
Compares this attribute name to another for equality.
Overrides:
equals in class Object
Parameters:
o - the object to compare
Returns:
true if this attribute name is equal to the specified attribute object

hashCode

public int hashCode()
Computes the hash value for this attribute name.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns the attribute name as a String.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkedList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class LinkedList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
All Implemented Interfaces:
Cloneable, Collection, List, Serializable
public class LinkedList
extends AbstractSequentialList
implements List, Cloneable, Serializable

Linked list implementation of the List interface. Implements all optional list operations, and permits all elements (including null). In addition to implementing the List interface, the LinkedList class provides uniformly named methods to get, remove and insert an element at the beginning and end of the list. These operations allow linked lists to be used as a stack, queue, or double-ended queue (deque).

All of the stack/queue/deque operations could be easily recast in terms of the standard list operations. They're included here primarily for convenience, though they may run slightly faster than the equivalent List operations.

All of the operations perform as could be expected for a doubly-linked list. Operations that index into the list will traverse the list from the begining or the end, whichever is closer to the specified index.

Note that this implementation is not synchronized. If multiple threads access a list concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements; merely setting the value of an element is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. If no such object exists, the list should be "wrapped" using the Collections.synchronizedList method. This is best done at creation time, to prevent accidental unsynchronized access to the list:

     List list = Collections.synchronizedList(new LinkedList(...));

The iterators returned by the this class's iterator and listIterator methods are fail-fast: if the list is structurally modified at any time after the iterator is created, in any way except through the Iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
List, ArrayList, Vector, Collections.synchronizedList(List), Serialized Form

Fields inherited from class java.util.AbstractList
modCount
Constructor Summary
LinkedList()
Constructs an empty list.
LinkedList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list.
boolean | add(Object o) Appends the specified element to the end of this list.
boolean | addAll(Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
boolean | addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list, starting at the specified position.
void | addFirst(Object o) Inserts the given element at the beginning of this list.
void | addLast(Object o) Appends the given element to the end of this list.
void | clear() Removes all of the elements from this list.
Object | clone() Returns a shallow copy of this LinkedList.
boolean | contains(Object o) Returns true if this list contains the specified element.
Object | get(int index) Returns the element at the specified position in this list.
Object | getFirst() Returns the first element in this list.
Object | getLast() Returns the last element in this list.
int | indexOf(Object o) Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element.
int | lastIndexOf(Object o) Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.
ListIterator | listIterator(int index) Returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
Object | remove(int index) Removes the element at the specified position in this list.
boolean | remove(Object o) Removes the first occurrence of the specified element in this list.
Object | removeFirst() Removes and returns the first element from this list.
Object | removeLast() Removes and returns the last element from this list.
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
int | size() Returns the number of elements in this list.
Object[] | toArray() Returns an array containing all of the elements in this list in the correct order.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this list in the correct order.
Methods inherited from class java.util.AbstractSequentialList
iterator
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList

Constructor Detail

LinkedList

public LinkedList()
Constructs an empty list.

LinkedList

public LinkedList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Parameters:
c - the collection whose elements are to be placed into this list.
Method Detail

getFirst

public Object getFirst()
Returns the first element in this list.
Returns:
the first element in this list.

getLast

public Object getLast()
Returns the last element in this list.
Returns:
the last element in this list.
Throws:
NoSuchElementException - if this list is empty.

removeFirst

public Object removeFirst()
Removes and returns the first element from this list.
Returns:
the first element from this list.
Throws:
NoSuchElementException - if this list is empty.

removeLast

public Object removeLast()
Removes and returns the last element from this list.
Returns:
the last element from this list.
Throws:
NoSuchElementException - if this list is empty.

addFirst

public void addFirst(Object o)
Inserts the given element at the beginning of this list.
Parameters:
o - the element to be inserted at the beginning of this list.

addLast

public void addLast(Object o)
Appends the given element to the end of this list. (Identical in function to the add method; included only for consistency.)
Parameters:
o - the element to be inserted at the end of this list.

contains

public boolean contains(Object o)
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection
Parameters:
o - element whose presence in this list is to be tested.
Returns:
true if this list contains the specified element.

size

public int size()
Returns the number of elements in this list.
Specified by:
size in interface List
Overrides:
size in class AbstractCollection
Returns:
the number of elements in this list.

add

public boolean add(Object o)
Appends the specified element to the end of this list.
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of Collection.add).

remove

public boolean remove(Object o)
Removes the first occurrence of the specified element in this list. If the list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists).
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection
Parameters:
o - element to be removed from this list, if present.
Returns:
true if the list contained the specified element.

addAll

public boolean addAll(Collection c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractCollection
Parameters:
c - the elements to be inserted into this list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator.
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractSequentialList
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

clear

public void clear()
Removes all of the elements from this list.
Specified by:
clear in interface List
Overrides:
clear in class AbstractList
Following copied from interface: java.util.List
Throws:
UnsupportedOperationException - if the clear method is not supported by this list.

get

public Object get(int index)
Returns the element at the specified position in this list.
Specified by:
get in interface List
Overrides:
get in class AbstractSequentialList
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if the specified index is is out of range (index < 0 || index >= size()).

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element.
Specified by:
set in interface List
Overrides:
set in class AbstractSequentialList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Specified by:
add in interface List
Overrides:
add in class AbstractSequentialList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

remove

public Object remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
Specified by:
remove in interface List
Overrides:
remove in class AbstractSequentialList
Parameters:
index - the index of the element to removed.
Returns:
the element previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

indexOf

public int indexOf(Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Specified by:
indexOf in interface List
Overrides:
indexOf in class AbstractList
Parameters:
o - element to search for.
Returns:
the index in this list of the first occurrence of the specified element, or -1 if the list does not contain this element.

lastIndexOf

public int lastIndexOf(Object o)
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Specified by:
lastIndexOf in interface List
Overrides:
lastIndexOf in class AbstractList
Parameters:
o - element to search for.
Returns:
the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.

listIterator

public ListIterator listIterator(int index)
Returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list. Obeys the general contract of List.listIterator(int).

The list-iterator is fail-fast: if the list is structurally modified at any time after the Iterator is created, in any way except through the list-iterator's own remove or add methods, the list-iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Specified by:
listIterator in interface List
Overrides:
listIterator in class AbstractSequentialList
Parameters:
index - index of first element to be returned from the list-iterator (by a call to next).
Returns:
a ListIterator of the elements in this list (in proper sequence), starting at the specified position in the list.
Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index > size()).
See Also:
List.listIterator(int)

clone

public Object clone()
Returns a shallow copy of this LinkedList. (The elements themselves are not cloned.)
Overrides:
clone in class Object
Returns:
a shallow copy of this LinkedList instance.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this list in the correct order.
Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Returns:
an array containing all of the elements in this list in the correct order.

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this list in the correct order. The runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.

If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.

Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the list.
Throws:
ArrayStoreException - if the runtime type of a is not a supertype of the runtime type of every element in this list.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


List

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface List

All Superinterfaces:
Collection
All Known Implementing Classes:
AbstractList, LinkedList, Vector, ArrayList
public interface List
extends Collection

An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list.

Unlike sets, lists typically allow duplicate elements. More formally, lists typically allow pairs of elements e1 and e2 such that e1.equals(e2), and they typically allow multiple null elements if they allow null elements at all. It is not inconceivable that someone might wish to implement a list that prohibits duplicates, by throwing runtime exceptions when the user attempts to insert them, but we expect this usage to be rare.

The List interface places additional stipulations, beyond those specified in the Collection interface, on the contracts of the iterator, add, remove, equals, and hashCode methods. Declarations for other inherited methods are also included here for convenience.

The List interface provides four methods for positional (indexed) access to list elements. Lists (like Java arrays) are zero based. Note that these operations may execute in time proportional to the index value for some implementations (the LinkedList class, for example). Thus, iterating over the elements in a list is typically preferable to indexing through it if the caller does not know the implementation.

The List interface provides a special iterator, called a ListIterator, that allows element insertion and replacement, and bidirectional access in addition to the normal operations that the Iterator interface provides. A method is provided to obtain a list iterator that starts at a specified position in the list.

The List interface provides two methods to search for a specified object. From a performance standpoint, these methods should be used with caution. In many implementations they will perform costly linear searches.

The List interface provides two methods to efficiently insert and remove multiple elements at an arbitrary point in the list.

Note: While it is permissible for lists to contain themselves as elements, extreme caution is advised: the equals and hashCode methods are no longer well defined on a such a list.

Since:
1.2
See Also:
Collection, Set, ArrayList, LinkedList, Vector, Arrays.asList(Object[]), Collections.nCopies(int, Object), Collections.EMPTY_LIST, AbstractList, AbstractSequentialList

Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list (optional operation).
boolean | add(Object o) Appends the specified element to the end of this list (optional operation).
boolean | addAll(Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).
boolean | addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
void | clear() Removes all of the elements from this list (optional operation).
boolean | contains(Object o) Returns true if this list contains the specified element.
boolean | containsAll(Collection c) Returns true if this list contains all of the elements of the specified collection.
boolean | equals(Object o) Compares the specified object with this list for equality.
Object | get(int index) Returns the element at the specified position in this list.
int | hashCode() Returns the hash code value for this list.
int | indexOf(Object o) Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
boolean | isEmpty() Returns true if this list contains no elements.
Iterator | iterator() Returns an iterator over the elements in this list in proper sequence.
int | lastIndexOf(Object o) Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
ListIterator | listIterator() Returns a list iterator of the elements in this list (in proper sequence).
ListIterator | listIterator(int index) Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
Object | remove(int index) Removes the element at the specified position in this list (optional operation).
boolean | remove(Object o) Removes the first occurrence in this list of the specified element (optional operation).
boolean | removeAll(Collection c) Removes from this list all the elements that are contained in the specified collection (optional operation).
boolean | retainAll(Collection c) Retains only the elements in this list that are contained in the specified collection (optional operation).
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element (optional operation).
int | size() Returns the number of elements in this list.
List | subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
Object[] | toArray() Returns an array containing all of the elements in this list in proper sequence.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.

Method Detail

size

public int size()
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
Specified by:
size in interface Collection
Returns:
the number of elements in this list.

isEmpty

public boolean isEmpty()
Returns true if this list contains no elements.
Specified by:
isEmpty in interface Collection
Returns:
true if this list contains no elements.

contains

public boolean contains(Object o)
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).
Specified by:
contains in interface Collection
Parameters:
o - element whose presence in this list is to be tested.
Returns:
true if this list contains the specified element.

iterator

public Iterator iterator()
Returns an iterator over the elements in this list in proper sequence.
Specified by:
iterator in interface Collection
Returns:
an iterator over the elements in this list in proper sequence.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this list in proper sequence. Obeys the general contract of the Collection.toArray method.
Specified by:
toArray in interface Collection
Returns:
an array containing all of the elements in this list in proper sequence.
See Also:
Arrays.asList(Object[])

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array. Obeys the general contract of the Collection.toArray(Object[]) method.
Specified by:
toArray in interface Collection
Parameters:
a - the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this list.
Throws:
ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every element in this list.

add

public boolean add(Object o)
Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Specified by:
add in interface Collection
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of the Collection.add method).
Throws:
UnsupportedOperationException - if the add method is not supported by this list.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of this element prevents it from being added to this collection.

remove

public boolean remove(Object o)
Removes the first occurrence in this list of the specified element (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists).
Specified by:
remove in interface Collection
Parameters:
o - element to be removed from this list, if present.
Returns:
true if this list contained the specified element.
Throws:
UnsupportedOperationException - if the remove method is not supported by this list.

containsAll

public boolean containsAll(Collection c)
Returns true if this list contains all of the elements of the specified collection.
Specified by:
containsAll in interface Collection
Parameters:
c - collection to be checked for containment in this list.
Returns:
true if this list contains all of the elements of the specified collection.
See Also:
contains(Object)

addAll

public boolean addAll(Collection c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
Specified by:
addAll in interface Collection
Parameters:
c - collection whose elements are to be added to this list.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll method is not supported by this list.
ClassCastException - if the class of an element in the specified collection prevents it from being added to this list.
IllegalArgumentException - if some aspect of an element in the specified collection prevents it from being added to this list.
See Also:
add(Object)

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll method is not supported by this list.
ClassCastException - if the class of one of elements of the specified collection prevents it from being added to this list.
IllegalArgumentException - if some aspect of one of elements of the specified collection prevents it from being added to this list.
IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

removeAll

public boolean removeAll(Collection c)
Removes from this list all the elements that are contained in the specified collection (optional operation).
Specified by:
removeAll in interface Collection
Parameters:
c - collection that defines which elements will be removed from this list.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the removeAll method is not supported by this list.
See Also:
remove(Object), contains(Object)

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all the elements that are not contained in the specified collection.
Specified by:
retainAll in interface Collection
Parameters:
c - collection that defines which elements this set will retain.
Returns:
true if this list changed as a result of the call.
Throws:
UnsupportedOperationException - if the retainAll method is not supported by this list.
See Also:
remove(Object), contains(Object)

clear

public void clear()
Removes all of the elements from this list (optional operation). This list will be empty after this call returns (unless it throws an exception).
Specified by:
clear in interface Collection
Throws:
UnsupportedOperationException - if the clear method is not supported by this list.

equals

public boolean equals(Object o)
Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if (e1==null ? e2==null : e1.equals(e2)).) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.
Specified by:
equals in interface Collection
Overrides:
equals in class Object
Parameters:
o - the object to be compared for equality with this list.
Returns:
true if the specified object is equal to this list.

hashCode

public int hashCode()
Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:
  hashCode = 1;
  Iterator i = list.iterator();
  while (i.hasNext()) {
      Object obj = i.next();
      hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
  }
This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object.hashCode.
Specified by:
hashCode in interface Collection
Overrides:
hashCode in class Object
Returns:
the hash code value for this list.
See Also:
Object.hashCode(),
Object.equals(Object),
equals(Object)

get

public Object get(int index)
Returns the element at the specified position in this list.
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element (optional operation).
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
UnsupportedOperationException - if the set method is not supported by this list.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
UnsupportedOperationException - if the add method is not supported by this list.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

remove

public Object remove(int index)
Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
Parameters:
index - the index of the element to removed.
Returns:
the element previously at the specified position.
Throws:
UnsupportedOperationException - if the remove method is not supported by this list.
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

indexOf

public int indexOf(Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
o - element to search for.
Returns:
the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

lastIndexOf

public int lastIndexOf(Object o)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
o - element to search for.
Returns:
the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.

listIterator

public ListIterator listIterator()
Returns a list iterator of the elements in this list (in proper sequence).
Returns:
a list iterator of the elements in this list (in proper sequence).

listIterator

public ListIterator listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. The specified index indicates the first element that would be returned by an initial call to the next method. An initial call to the previous method would return the element with the specified index minus one.
Parameters:
index - index of first element to be returned from the list iterator (by a call to the next method).
Returns:
a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

subList

public List subList(int fromIndex,
                    int toIndex)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list.

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:

        list.subList(from, to).clear();
Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.

The semantics of this list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

Parameters:
fromIndex - low endpoint (inclusive) of the subList.
toIndex - high endpoint (exclusive) of the subList.
Returns:
a view of the specified range within this list.
Throws:
IndexOutOfBoundsException - for an illegal endpoint index value (fromIndex < 0 || toIndex > size || fromIndex > toIndex).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface ListIterator

All Superinterfaces:
Iterator
public interface ListIterator
extends Iterator

An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.

Since:
1.2
See Also:
Collection, List, Iterator, Enumeration

Method Summary
void | add(Object o) Inserts the specified element into the list (optional operation).
boolean | hasNext() Returns true if this list iterator has more elements when traversing the list in the forward direction.
boolean | hasPrevious() Returns true if this list iterator has more elements when traversing the list in the reverse direction.
Object | next() Returns the next element in the list.
int | nextIndex() Returns the index of the element that would be returned by a subsequent call to next.
Object | previous() Returns the previous element in the list.
int | previousIndex() Returns the index of the element that would be returned by a subsequent call to previous.
void | remove() Removes from the list the last element that was returned by next or previous (optional operation).
void | set(Object o) Replaces the last element returned by next or previous with the specified element (optional operation).

Method Detail

hasNext

public boolean hasNext()
Returns true if this list iterator has more elements when traversing the list in the forward direction. (In other words, returns true if next would return an element rather than throwing an exception.)
Specified by:
hasNext in interface Iterator
Returns:
true if the list iterator has more elements when traversing the list in the forward direction.

next

public Object next()
Returns the next element in the list. This method may be called repeatedly to iterate through the list, or intermixed with calls to previous to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)
Specified by:
next in interface Iterator
Returns:
the next element in the list.
Throws:
NoSuchElementException - if the iteration has no next element.

hasPrevious

public boolean hasPrevious()
Returns true if this list iterator has more elements when traversing the list in the reverse direction. (In other words, returns true if previous would return an element rather than throwing an exception.)
Returns:
true if the list iterator has more elements when traversing the list in the reverse direction.

previous

public Object previous()
Returns the previous element in the list. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)
Returns:
the previous element in the list.
Throws:
NoSuchElementException - if the iteration has no previous element.

nextIndex

public int nextIndex()
Returns the index of the element that would be returned by a subsequent call to next. (Returns list size if the list iterator is at the end of the list.)
Returns:
the index of the element that would be returned by a subsequent call to next, or list size if list iterator is at end of list.

previousIndex

public int previousIndex()
Returns the index of the element that would be returned by a subsequent call to previous. (Returns -1 if the list iterator is at the beginning of the list.)
Returns:
the index of the element that would be returned by a subsequent call to previous, or -1 if list iterator is at beginning of list.

remove

public void remove()
Removes from the list the last element that was returned by next or previous (optional operation). This call can only be made once per call to next or previous. It can be made only if ListIterator.add has not been called after the last call to next or previous.
Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - if the remove operation is not supported by this list iterator.
IllegalStateException - neither next nor previous have been called, or remove or add have been called after the last call to * next or previous.

set

public void set(Object o)
Replaces the last element returned by next or previous with the specified element (optional operation). This call can be made only if neither ListIterator.remove nor ListIterator.add have been called after the last call to next or previous.
Parameters:
o - the element with which to replace the last element returned by next or previous.
Throws:
UnsupportedOperationException - if the set operation is not supported by this list iterator.
ClassCastException - if the class of the specified element prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
IllegalStateException - if neither next nor previous have been called, or remove or add have been called after the last call to next or previous.

add

public void add(Object o)
Inserts the specified element into the list (optional operation). The element is inserted immediately before the next element that would be returned by next, if any, and after the next element that would be returned by previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.) The new element is inserted before the implicit cursor: a subsequent call to next would be unaffected, and a subsequent call to previous would return the new element. (This call increases by one the value that would be returned by a call to nextIndex or previousIndex.)
Parameters:
o - the element to insert.
Throws:
UnsupportedOperationException - if the add method is not supported by this list iterator.
ClassCastException - if the class of the specified element prevents it from being added to this Set.
IllegalArgumentException - if some aspect of this element prevents it from being added to this Collection.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListResourceBundle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class ListResourceBundle

java.lang.Object
  |
  +--java.util.ResourceBundle
        |
        +--java.util.ListResourceBundle
Direct Known Subclasses:
AccessibleResourceBundle
public abstract class ListResourceBundle
extends ResourceBundle

ListResourceBundle is a abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list. See ResourceBundle for more information about resource bundles in general.

Subclasses must override getContents and provide an array, where each item in the array is a pair of objects. The first element of each pair is a String key, and the second is the value associated with that key. [Right now, there's no error-checking code to enforce this, so you could specify key-value pairs that have something other than a String as a key. But since the interfaces are defined in terms of String, any value with a key that isn't a String will be inaccessible.]

In the following example, the keys are of the form "s1"... The actual keys are entirely up to your choice, so long as they are the same as the keys you use in your program to retrieve the objects from the bundle. Keys are case-sensitive. MyResource is the default version of the bundle family, and MyResource_fr is the french version:

 //====================
 class MyResource extends ListResourceBundle {
  public Object[][] getContents() {
      return contents;
  }
  static final Object[][] contents = {
  // LOCALIZE THIS
      {"s1", "3"},        // starting value in choice field
      {"s2", "MyDisk"},    // starting value in string field
      {"s3", "3 Mar 96"}, // starting value in date field
      {"s4", "The disk '{1}' contained {0} on {2}."}, // initial pattern
      {"s5", "0"},        // first choice number
      {"s6", "no files"}, // first choice value
      {"s7", "1"},        // second choice number
      {"s8", "one file"}, // second choice value
      {"s9", "2"},        // third choice number
      {"s10", "{0}|3 files"}, // third choice value
      {"s11", "format threw an exception: {0}"},  // generic exception message
      {"s12", "ERROR"},   // what to show in field in case of error
      {"s14", "Result"},  // label for formatted stuff
      {"s13", "Dialog"},  // standard font
      {"s15", "Pattern"}, // label for standard pattern
      {"s16", new Dimension(1,5)} // real object, not just string
  // END OF MATERIAL TO LOCALIZE
  };
 }
 //====================
 class MyResource_fr  extends ListResourceBundle {
  public Object[][] getContents() {
      return contents;
}
  static final Object[][] contents = {
  // LOCALIZE THIS
      {"s1", "3"},        // starting value in choice field
      {"s2", "MonDisk"},  // starting value in string field
      {"s3", "3 Mar 96"}, // starting value in date field
      {"s4", "Le disk '{1}' a {0} a {2}."},   // initial pattern
      {"s5", "0"},        // first choice number
      {"s6", "pas de files"}, // first choice value
      {"s7", "1"},        // second choice number
      {"s8", "une file"}, // second choice value
      {"s9", "2"},        // third choice number
      {"s10", "{0}|3 files"}, // third choice value
      {"s11", "Le format a jete une exception: {0}"}, // generic exception message
      {"s12", "ERROR"},   // what to show in field in case of error
      {"s14", "Resulte"}, // label for formatted stuff
      {"s13", "Dialogue"},    // standard font
      {"s15", "Pattern"}, // label for standard pattern
      {"s16", new Dimension(1,3)} // real object, not just string
  // END OF MATERIAL TO LOCALIZE
  };
 }

Since:
JDK1.1
See Also:
ResourceBundle, PropertyResourceBundle

Fields inherited from class java.util.ResourceBundle
parent
Constructor Summary
ListResourceBundle()
Sole constructor.
Method Summary
protected abstract Object[][] | getContents() See class description.
Enumeration | getKeys() Implementation of ResourceBundle.getKeys.
Object | handleGetObject(String key) Override of ResourceBundle, same semantics
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ListResourceBundle

public ListResourceBundle()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

handleGetObject

public final Object handleGetObject(String key)
Override of ResourceBundle, same semantics
Overrides:
handleGetObject in class ResourceBundle
Following copied from class: java.util.ResourceBundle
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getKeys

public Enumeration getKeys()
Implementation of ResourceBundle.getKeys.
Overrides:
getKeys in class ResourceBundle

getContents

protected abstract Object[][] getContents()
See class description.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Locale

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Locale

java.lang.Object
  |
  +--java.util.Locale
All Implemented Interfaces:
Cloneable, Serializable
public final class Locale
extends Object
implements Cloneable, Serializable

A Locale object represents a specific geographical, political, or cultural region. An operation that requires a Locale to perform its task is called locale-sensitive and uses the Locale to tailor information for the user. For example, displaying a number is a locale-sensitive operation--the number should be formatted according to the customs/conventions of the user's native country, region, or culture.

You create a Locale object using one of the two constructors in this class:

 Locale(String language, String country)
 Locale(String language, String country, String variant)
The first argument to both constructors is a valid ISO Language Code. These codes are the lower-case two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as:
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt

The second argument to both constructors is a valid ISO Country Code. These codes are the upper-case two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html

The second constructor requires a third argument--the Variant. The Variant codes are vendor and browser-specific. For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX. Where there are two variants, separate them with an underscore, and put the most important one first. For example, a Traditional Spanish collation might construct a locale with parameters for language, country and variant as: "es", "ES", "Traditional_WIN".

Because a Locale object is just an identifier for a region, no validity check is performed when you construct a Locale. If you want to see whether particular resources are available for the Locale you construct, you must query those resources. For example, ask the NumberFormat for the locales it supports using its getAvailableLocales method.
Note: When you ask for a resource for a particular locale, you get back the best available match, not necessarily precisely what you asked for. For more information, look at ResourceBundle.

The Locale class provides a number of convenient constants that you can use to create Locale objects for commonly used locales. For example, the following creates a Locale object for the United States:

 Locale.US

Once you've created a Locale you can query it for information about itself. Use getCountry to get the ISO Country Code and getLanguage to get the ISO Language Code. You can use getDisplayCountry to get the name of the country suitable for displaying to the user. Similarly, you can use getDisplayLanguage to get the name of the language suitable for displaying to the user. Interestingly, the getDisplayXXX methods are themselves locale-sensitive and have two versions: one that uses the default locale and one that uses the locale specified as an argument.

The Java 2 platform provides a number of classes that perform locale-sensitive operations. For example, the NumberFormat class formats numbers, currency, or percentages in a locale-sensitive manner. Classes such as NumberFormat have a number of convenience methods for creating a default object of that type. For example, the NumberFormat class provides these three convenience methods for creating a default NumberFormat object:

 NumberFormat.getInstance()
 NumberFormat.getCurrencyInstance()
 NumberFormat.getPercentInstance()
These methods have two variants; one with an explicit locale and one without; the latter using the default locale.
 NumberFormat.getInstance(myLocale)
 NumberFormat.getCurrencyInstance(myLocale)
 NumberFormat.getPercentInstance(myLocale)
A Locale is the mechanism for identifying the kind of object (NumberFormat) that you would like to get. The locale is just a mechanism for identifying objects, not a container for the objects themselves.

Each class that performs locale-sensitive operations allows you to get all the available objects of that type. You can sift through these objects by language, country, or variant, and use the display names to present a menu to the user. For example, you can create a menu of all the collation objects suitable for a given language. Such classes must implement these three class methods:

 public static Locale[] getAvailableLocales()
 public static String getDisplayName(Locale objectLocale,
                                     Locale displayLocale)
 public static final String getDisplayName(Locale objectLocale)
     // getDisplayName will throw MissingResourceException if the locale
     // is not one of the available locales.

Since:
JDK1.1
See Also:
ResourceBundle, Format, NumberFormat, Collator, Serialized Form

Field Summary
static Locale | CANADA Useful constant for country.
static Locale | CANADA_FRENCH Useful constant for country.
static Locale | CHINA Useful constant for country.
static Locale | CHINESE Useful constant for language.
static Locale | ENGLISH Useful constant for language.
static Locale | FRANCE Useful constant for country.
static Locale | FRENCH Useful constant for language.
static Locale | GERMAN Useful constant for language.
static Locale | GERMANY Useful constant for country.
static Locale | ITALIAN Useful constant for language.
static Locale | ITALY Useful constant for country.
static Locale | JAPAN Useful constant for country.
static Locale | JAPANESE Useful constant for language.
static Locale | KOREA Useful constant for country.
static Locale | KOREAN Useful constant for language.
static Locale | PRC Useful constant for country.
static Locale | SIMPLIFIED_CHINESE Useful constant for language.
static Locale | TAIWAN Useful constant for country.
static Locale | TRADITIONAL_CHINESE Useful constant for language.
static Locale | UK Useful constant for country.
static Locale | US Useful constant for country.
Constructor Summary
Locale(String language, String country)
Construct a locale from language, country.
Locale(String language, String country, String variant)
Construct a locale from language, country, variant.
Method Summary
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Returns true if this Locale is equal to another object.
static Locale[] | getAvailableLocales() Returns a list of all installed locales.
String | getCountry() Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
static Locale | getDefault() Gets the current value of the default locale for this instance of the Java Virtual Machine.
String | getDisplayCountry() Returns a name for the locale's country that is appropriate for display to the user.
String | getDisplayCountry(Locale inLocale) Returns a name for the locale's country that is appropriate for display to the user.
String | getDisplayLanguage() Returns a name for the locale's language that is appropriate for display to the user.
String | getDisplayLanguage(Locale inLocale) Returns a name for the locale's language that is appropriate for display to the user.
String | getDisplayName() Returns a name for the locale that is appropriate for display to the user.
String | getDisplayName(Locale inLocale) Returns a name for the locale that is appropriate for display to the user.
String | getDisplayVariant() Returns a name for the locale's variant code that is appropriate for display to the user.
String | getDisplayVariant(Locale inLocale) Returns a name for the locale's variant code that is appropriate for display to the user.
String | getISO3Country() Returns a three-letter abbreviation for this locale's country.
String | getISO3Language() Returns a three-letter abbreviation for this locale's language.
static String[] | getISOCountries() Returns a list of all 2-letter country codes defined in ISO 3166.
static String[] | getISOLanguages() Returns a list of all 2-letter language codes defined in ISO 639.
String | getLanguage() Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.
String | getVariant() Returns the variant code for this locale.
int | hashCode() Override hashCode.
static void | setDefault(Locale newLocale) Sets the default locale for this instance of the Java Virtual Machine.
String | toString() Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ENGLISH

public static final Locale ENGLISH
Useful constant for language.

FRENCH

public static final Locale FRENCH
Useful constant for language.

GERMAN

public static final Locale GERMAN
Useful constant for language.

ITALIAN

public static final Locale ITALIAN
Useful constant for language.

JAPANESE

public static final Locale JAPANESE
Useful constant for language.

KOREAN

public static final Locale KOREAN
Useful constant for language.

CHINESE

public static final Locale CHINESE
Useful constant for language.

SIMPLIFIED_CHINESE

public static final Locale SIMPLIFIED_CHINESE
Useful constant for language.

TRADITIONAL_CHINESE

public static final Locale TRADITIONAL_CHINESE
Useful constant for language.

FRANCE

public static final Locale FRANCE
Useful constant for country.

GERMANY

public static final Locale GERMANY
Useful constant for country.

ITALY

public static final Locale ITALY
Useful constant for country.

JAPAN

public static final Locale JAPAN
Useful constant for country.

KOREA

public static final Locale KOREA
Useful constant for country.

CHINA

public static final Locale CHINA
Useful constant for country.

PRC

public static final Locale PRC
Useful constant for country.

TAIWAN

public static final Locale TAIWAN
Useful constant for country.

UK

public static final Locale UK
Useful constant for country.

US

public static final Locale US
Useful constant for country.

CANADA

public static final Locale CANADA
Useful constant for country.

CANADA_FRENCH

public static final Locale CANADA_FRENCH
Useful constant for country.
Constructor Detail

Locale

public Locale(String language,
              String country,
              String variant)
Construct a locale from language, country, variant. NOTE: ISO 639 is not a stable standard; some of the language codes it defines (specifically iw, ji, and in) have changed. This constructor accepts both the old codes (iw, ji, and in) and the new codes (he, yi, and id), but all other API on Locale will return only the OLD codes.
Parameters:
language - lowercase two-letter ISO-639 code.
country - uppercase two-letter ISO-3166 code.
variant - vendor and browser specific code. See class description.

Locale

public Locale(String language,
              String country)
Construct a locale from language, country. To create a locale that only identifies a language, use "" for the country. NOTE: ISO 639 is not a stable standard; some of the language codes it defines (specifically iw, ji, and in) have changed. This constructor accepts both the old codes (iw, ji, and in) and the new codes (he, yi, and id), but all other API on Locale will return only the OLD codes.
Parameters:
language - lowercase two-letter ISO-639 code.
country - uppercase two-letter ISO-3166 code.
Method Detail

getDefault

public static Locale getDefault()
Gets the current value of the default locale for this instance of the Java Virtual Machine.

The Java Virtual Machine sets the default locale during startup based on the host environment. It is used by many locale-sensitive methods if no locale is explicitly specified. It can be changed using the setDefault method.

Returns:
the default locale for this instance of the Java Virtual Machine

setDefault

public static void setDefault(Locale newLocale)
Sets the default locale for this instance of the Java Virtual Machine. This does not affect the host locale.

If there is a security manager, its checkPermission method is called with a PropertyPermission("user.language", "write") permission before the default locale is changed.

The Java Virtual Machine sets the default locale during startup based on the host environment. It is used by many locale-sensitive methods if no locale is explicitly specified.

Since changing the default locale may affect many different areas of functionality, this method should only be used if the caller is prepared to reinitialize locale-sensitive code running within the same Java Virtual Machine, such as the user interface.

Parameters:
newLocale - the new default locale
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
NullPointerException - if newLocale is null
See Also:
SecurityManager.checkPermission(java.security.Permission), PropertyPermission

getAvailableLocales

public static Locale[] getAvailableLocales()
Returns a list of all installed locales.

getISOCountries

public static String[] getISOCountries()
Returns a list of all 2-letter country codes defined in ISO 3166. Can be used to create Locales.

getISOLanguages

public static String[] getISOLanguages()
Returns a list of all 2-letter language codes defined in ISO 639. Can be used to create Locales. [NOTE: ISO 639 is not a stable standard-- some languages' codes have changed. The list this function returns includes both the new and the old codes for the languages whose codes have changed.]

getLanguage

public String getLanguage()
Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.

NOTE: ISO 639 is not a stable standard-- some languages' codes have changed. Locale's constructor recognizes both the new and the old codes for the languages whose codes have changed, but this function always returns the old code. If you want to check for a specific language whose code has changed, don't do

 if (locale.getLanguage().equals("he")
    ...
Instead, do
 if (locale.getLanguage().equals(new Locale("he", "", "").getLanguage())
    ...
See Also:
getDisplayLanguage()

getCountry

public String getCountry()
Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
See Also:
getDisplayCountry()

getVariant

public String getVariant()
Returns the variant code for this locale.
See Also:
getDisplayVariant()

toString

public final String toString()
Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars. Language is always lower case, and country is always upper case. If the language is missing, the string will begin with an underbar. If both the language and country fields are missing, this function will return the empty string, even if the variant field is filled in (you can't have a locale with just a variant-- the variant must accompany a valid language or country code). Examples: "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr_MAC"
Overrides:
toString in class Object
See Also:
getDisplayName()

getISO3Language

public String getISO3Language()
                       throws MissingResourceException
Returns a three-letter abbreviation for this locale's language. If the locale doesn't specify a language, this will be the empty string. Otherwise, this will be a lowercase ISO 639-2/T language code. The ISO 639-2 language codes can be found on-line at http://www.triacom.com/archive/iso639-2.en.html and ftp://dkuug.dk/i18n/iso-639-2.txt
Throws:
MissingResourceException - Throws MissingResourceException if the three-letter language abbreviation is not available for this locale.

getISO3Country

public String getISO3Country()
                      throws MissingResourceException
Returns a three-letter abbreviation for this locale's country. If the locale doesn't specify a country, this will be tbe the empty string. Otherwise, this will be an uppercase ISO 3166 3-letter country code.
Throws:
MissingResourceException - Throws MissingResourceException if the three-letter country abbreviation is not available for this locale.

getDisplayLanguage

public final String getDisplayLanguage()
Returns a name for the locale's language that is appropriate for display to the user. If possible, the name returned will be localized for the default locale. For example, if the locale is fr_FR and the default locale is en_US, getDisplayLanguage() will return "French"; if the locale is en_US and the default locale is fr_FR, getDisplayLanguage() will return "anglais". If the name returned cannot be localized for the default locale, (say, we don't have a Japanese name for Croatian), this function falls back on the English name, and uses the ISO code as a last-resort value. If the locale doesn't specify a language, this function returns the empty string.

getDisplayLanguage

public String getDisplayLanguage(Locale inLocale)
Returns a name for the locale's language that is appropriate for display to the user. If possible, the name returned will be localized according to inLocale. For example, if the locale is fr_FR and inLocale is en_US, getDisplayLanguage() will return "French"; if the locale is en_US and inLocale is fr_FR, getDisplayLanguage() will return "anglais". If the name returned cannot be localized according to inLocale, (say, we don't have a Japanese name for Croatian), this function falls back on the default locale, on the English name, and finally on the ISO code as a last-resort value. If the locale doesn't specify a language, this function returns the empty string.

getDisplayCountry

public final String getDisplayCountry()
Returns a name for the locale's country that is appropriate for display to the user. If possible, the name returned will be localized for the default locale. For example, if the locale is fr_FR and the default locale is en_US, getDisplayCountry() will return "France"; if the locale is en_US and the default locale is fr_FR, getDisplayLanguage() will return "Etats-Unis". If the name returned cannot be localized for the default locale, (say, we don't have a Japanese name for Croatia), this function falls back on the English name, and uses the ISO code as a last-resort value. If the locale doesn't specify a country, this function returns the empty string.

getDisplayCountry

public String getDisplayCountry(Locale inLocale)
Returns a name for the locale's country that is appropriate for display to the user. If possible, the name returned will be localized according to inLocale. For example, if the locale is fr_FR and inLocale is en_US, getDisplayCountry() will return "France"; if the locale is en_US and inLocale is fr_FR, getDisplayLanguage() will return "Etats-Unis". If the name returned cannot be localized according to inLocale. (say, we don't have a Japanese name for Croatia), this function falls back on the default locale, on the English name, and finally on the ISO code as a last-resort value. If the locale doesn't specify a country, this function returns the empty string.

getDisplayVariant

public final String getDisplayVariant()
Returns a name for the locale's variant code that is appropriate for display to the user. If possible, the name will be localized for the default locale. If the locale doesn't specify a variant code, this function returns the empty string.

getDisplayVariant

public String getDisplayVariant(Locale inLocale)
Returns a name for the locale's variant code that is appropriate for display to the user. If possible, the name will be localized for inLocale. If the locale doesn't specify a variant code, this function returns the empty string.

getDisplayName

public final String getDisplayName()
Returns a name for the locale that is appropriate for display to the user. This will be the values returned by getDisplayLanguage(), getDisplayCountry(), and getDisplayVariant() assembled into a single string. The display name will have one of the following forms:

language (country, variant)

language (country)

language (variant)

country (variant)

language

country

variant

depending on which fields are specified in the locale. If the language, country, and variant fields are all empty, this function returns the empty string.

getDisplayName

public String getDisplayName(Locale inLocale)
Returns a name for the locale that is appropriate for display to the user. This will be the values returned by getDisplayLanguage(), getDisplayCountry(), and getDisplayVariant() assembled into a single string. The display name will have one of the following forms:

language (country, variant)

language (country)

language (variant)

country (variant)

language

country

variant

depending on which fields are specified in the locale. If the language, country, and variant fields are all empty, this function returns the empty string.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

hashCode

public int hashCode()
Override hashCode. Since Locales are often used in hashtables, caches the value for speed.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Returns true if this Locale is equal to another object. A Locale is deemed equal to another Locale with identical language, country, and variant, and unequal to all other objects.
Overrides:
equals in class Object
Returns:
true if this Locale is equal to the specified object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Map

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Map

All Known Subinterfaces:
SortedMap
All Known Implementing Classes:
AbstractMap, HashMap, Hashtable, RenderingHints, WeakHashMap, Attributes
public interface Map

An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.

This interface takes the place of the Dictionary class, which was a totally abstract class rather than an interface.

The Map interface provides three collection views, which allow a map's contents to be viewed as a set of keys, collection of values, or set of key-value mappings. The order of a map is defined as the order in which the iterators on the map's collection views return their elements. Some map implementations, like the TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.

Note: great care must be exercised if mutable objects are used as map keys. The behavior of a map is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is a key in the map. A special case of this prohibition is that it is not permissible for a map to contain itself as a key. While it is permissible for a map to contain itself as a value, extreme caution is advised: the equals and hashCode methods are no longer well defined on a such a map.

All general-purpose map implementation classes should provide two "standard" constructors: a void (no arguments) constructor which creates an empty map, and a constructor with a single argument of type Map, which creates a new map with the same key-value mappings as its argument. In effect, the latter constructor allows the user to copy any map, producing an equivalent map of the desired class. There is no way to enforce this recommendation (as interfaces cannot contain constructors) but all of the general-purpose map implementations in the SDK comply.

Since:
1.2
See Also:
HashMap, TreeMap, Hashtable, SortedMap, Collection, Set

Inner Class Summary
static interface Map.Entry
A map entry (key-value pair).
Method Summary
void | clear() Removes all mappings from this map (optional operation).
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
Set | entrySet() Returns a set view of the mappings contained in this map.
boolean | equals(Object o) Compares the specified object with this map for equality.
Object | get(Object key) Returns the value to which this map maps the specified key.
int | hashCode() Returns the hash code value for this map.
boolean | isEmpty() Returns true if this map contains no key-value mappings.
Set | keySet() Returns a set view of the keys contained in this map.
Object | put(Object key, Object value) Associates the specified value with the specified key in this map (optional operation).
void | putAll(Map t) Copies all of the mappings from the specified map to this map (optional operation).
Object | remove(Object key) Removes the mapping for this key from this map if present (optional operation).
int | size() Returns the number of key-value mappings in this map.
Collection | values() Returns a collection view of the values contained in this map.

Method Detail

size

public int size()
Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
Returns:
the number of key-value mappings in this map.

isEmpty

public boolean isEmpty()
Returns true if this map contains no key-value mappings.
Returns:
true if this map contains no key-value mappings.

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.
Parameters:
key - key whose presence in this map is to be tested.
Returns:
true if this map contains a mapping for the specified key.
Throws:
ClassCastException - if the key is of an inappropriate type for this map.
NullPointerException - if the key is null and this map does not not permit null keys.

containsValue

public boolean containsValue(Object value)
Returns true if this map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)). This operation will probably require time linear in the map size for most implementations of the Map interface.
Parameters:
value - value whose presence in this map is to be tested.
Returns:
true if this map maps one or more keys to the specified value.

get

public Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key, or null if the map contains no mapping for this key.
Throws:
ClassCastException - if the key is of an inappropriate type for this map.
NullPointerException - key is null and this map does not not permit null keys.
See Also:
containsKey(Object)

put

public Object put(Object key,
                  Object value)
Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for this key, the old value is replaced.
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
Throws:
UnsupportedOperationException - if the put operation is not supported by this map.
ClassCastException - if the class of the specified key or value prevents it from being stored in this map.
IllegalArgumentException - if some aspect of this key or value prevents it from being stored in this map.
NullPointerException - this map does not permit null keys or values, and the specified key or value is null.

remove

public Object remove(Object key)
Removes the mapping for this key from this map if present (optional operation).
Parameters:
key - key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
Throws:
UnsupportedOperationException - if the remove method is not supported by this map.

putAll

public void putAll(Map t)
Copies all of the mappings from the specified map to this map (optional operation). These mappings will replace any mappings that this map had for any of the keys currently in the specified map.
Parameters:
t - Mappings to be stored in this map.
Throws:
UnsupportedOperationException - if the putAll method is not supported by this map.
ClassCastException - if the class of a key or value in the specified map prevents it from being stored in this map.
IllegalArgumentException - some aspect of a key or value in the specified map prevents it from being stored in this map.
NullPointerException - this map does not permit null keys or values, and the specified key or value is null.

clear

public void clear()
Removes all mappings from this map (optional operation).
Throws:
UnsupportedOperationException - clear is not supported by this map.

keySet

public Set keySet()
Returns a set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll retainAll, and clear operations. It does not support the add or addAll operations.
Returns:
a set view of the keys contained in this map.

values

public Collection values()
Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. If the map is modified while an iteration over the collection is in progress, the results of the iteration are undefined. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Returns:
a collection view of the values contained in this map.

entrySet

public Set entrySet()
Returns a set view of the mappings contained in this map. Each element in the returned set is a Map.Entry. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Returns:
a set view of the mappings contained in this map.

equals

public boolean equals(Object o)
Compares the specified object with this map for equality. Returns true if the given object is also a map and the two Maps represent the same mappings. More formally, two maps t1 and t2 represent the same mappings if t1.entrySet().equals(t2.entrySet()). This ensures that the equals method works properly across different implementations of the Map interface.
Overrides:
equals in class Object
Parameters:
o - object to be compared for equality with this map.
Returns:
true if the specified object is equal to this map.

hashCode

public int hashCode()
Returns the hash code value for this map. The hash code of a map is defined to be the sum of the hashCodes of each entry in the map's entrySet view. This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two maps t1 and t2, as required by the general contract of Object.hashCode.
Overrides:
hashCode in class Object
Returns:
the hash code value for this map.
See Also:
Map.Entry.hashCode(),
Object.hashCode(),
Object.equals(Object),
equals(Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MissingResourceException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class MissingResourceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.util.MissingResourceException
All Implemented Interfaces:
Serializable
public class MissingResourceException
extends RuntimeException

Signals that a resource is missing.

Since:
JDK1.1
See Also:
Exception, ResourceBundle, Serialized Form

Constructor Summary
MissingResourceException(String s, String className, String key)
Constructs a MissingResourceException with the specified information.
Method Summary
String | getClassName() Gets parameter passed by constructor.
String | getKey() Gets parameter passed by constructor.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MissingResourceException

public MissingResourceException(String s,
                                String className,
                                String key)
Constructs a MissingResourceException with the specified information. A detail message is a String that describes this particular exception.
Parameters:
s - the detail message
classname - the name of the resource class
key - the key for the missing resource.
Method Detail

getClassName

public String getClassName()
Gets parameter passed by constructor.

getKey

public String getKey()
Gets parameter passed by constructor.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchElementException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class NoSuchElementException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.util.NoSuchElementException
All Implemented Interfaces:
Serializable
public class NoSuchElementException
extends RuntimeException

Thrown by the nextElement method of an Enumeration to indicate that there are no more elements in the enumeration.

Since:
JDK1.0
See Also:
Enumeration, Enumeration.nextElement(), Serialized Form

Constructor Summary
NoSuchElementException()
Constructs a NoSuchElementException with null as its error message string.
NoSuchElementException(String s)
Constructs a NoSuchElementException, saving a reference to the error message string s for later retrieval by the getMessage method.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchElementException

public NoSuchElementException()
Constructs a NoSuchElementException with null as its error message string.

NoSuchElementException

public NoSuchElementException(String s)
Constructs a NoSuchElementException, saving a reference to the error message string s for later retrieval by the getMessage method.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Observable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Observable

java.lang.Object
  |
  +--java.util.Observable
public class Observable
extends Object

This class represents an observable object, or "data" in the model-view paradigm. It can be subclassed to represent an object that the application wants to have observed.

An observable object can have one or more observers. An observer may be any object that implements interface Observer. After an observable instance changes, an application calling the Observable's notifyObservers method causes all of its observers to be notified of the change by a call to their update method.

The order in which notifications will be delivered is unspecified. The default implementation provided in the Observerable class will notify Observers in the order in which they registered interest, but subclasses may change this order, use no guaranteed order, deliver notifications on separate threaads, or may guarantee that their subclass follows this order, as they choose.

Note that this notification mechanism is has nothing to do with threads and is completely separate from the wait and notify mechanism of class Object.

When an observable object is newly created, its set of observers is empty. Two observers are considered the same if and only if the equals method returns true for them.

Since:
JDK1.0
See Also:
notifyObservers(), notifyObservers(java.lang.Object), Observer, Observer.update(java.util.Observable, java.lang.Object)

Constructor Summary
Observable()
Construct an Observable with zero Observers.
Method Summary
void | addObserver(Observer o) Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
protected void | clearChanged() Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
int | countObservers() Returns the number of observers of this Observable object.
void | deleteObserver(Observer o) Deletes an observer from the set of observers of this object.
void | deleteObservers() Clears the observer list so that this object no longer has any observers.
boolean | hasChanged() Tests if this object has changed.
void | notifyObservers() If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
void | notifyObservers(Object arg) If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
protected void | setChanged() Marks this Observable object as having been changed; the hasChanged method will now return true.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Observable

public Observable()
Construct an Observable with zero Observers.
Method Detail

addObserver

public void addObserver(Observer o)
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.
Parameters:
o - an observer to be added.

deleteObserver

public void deleteObserver(Observer o)
Deletes an observer from the set of observers of this object.
Parameters:
o - the observer to be deleted.

notifyObservers

public void notifyObservers()
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

Each observer has its update method called with two arguments: this observable object and null. In other words, this method is equivalent to:

notifyObservers(null)
See Also:
clearChanged(),
hasChanged(),
Observer.update(java.util.Observable, java.lang.Object)

notifyObservers

public void notifyObservers(Object arg)
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

Each observer has its update method called with two arguments: this observable object and the arg argument.

Parameters:
arg - any object.
See Also:
clearChanged(),
hasChanged(),
Observer.update(java.util.Observable, java.lang.Object)

deleteObservers

public void deleteObservers()
Clears the observer list so that this object no longer has any observers.

setChanged

protected void setChanged()
Marks this Observable object as having been changed; the hasChanged method will now return true.

clearChanged

protected void clearChanged()
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false. This method is called automatically by the notifyObservers methods.
See Also:
notifyObservers(), notifyObservers(java.lang.Object)

hasChanged

public boolean hasChanged()
Tests if this object has changed.
Returns:
true if and only if the setChanged method has been called more recently than the clearChanged method on this object; false otherwise.
See Also:
clearChanged(), setChanged()

countObservers

public int countObservers()
Returns the number of observers of this Observable object.
Returns:
the number of observers of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Observer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Observer

public interface Observer

A class can implement the Observer interface when it wants to be informed of changes in observable objects.

Since:
JDK1.0
See Also:
Observable

Method Summary
 void update(Observable o, Object arg)
This method is called whenever the observed object is changed.

Method Detail

update

public void update(Observable o,
                   Object arg)
This method is called whenever the observed object is changed. An application calls an Observable object's notifyObservers method to have all the object's observers notified of the change.
Parameters:
o - the observable object.
arg - an argument passed to the notifyObservers method.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Properties

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Properties

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
All Implemented Interfaces:
Cloneable, Map, Serializable
Direct Known Subclasses:
Provider
public class Properties
extends Hashtable

The Properties class represents a persistent set of properties. The Properties can be saved to a stream or loaded from a stream. Each key and its corresponding value in the property list is a string.

A property list can contain another property list as its "defaults"; this second property list is searched if the property key is not found in the original property list.

Because Properties inherits from Hashtable, the put and putAll methods can be applied to a Properties object. Their use is strongly discouraged as they allow the caller to insert entries whose keys or values are not Strings. The setProperty method should be used instead. If the store or save method is called on a "compromised" Properties object that contains a non-String key or value, the call will fail.

When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.

Since:
JDK1.0
See Also:
native2ascii tool for Solaris, native2ascii tool for Windows, Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
Field Summary
protected  Properties defaults
A property list that contains default values for any keys not found in this property list.
Constructor Summary
Properties()
Creates an empty property list with no default values.
Properties(Properties defaults)
Creates an empty property list with the specified defaults.
Method Summary
 String getProperty(String key)
Searches for the property with the specified key in this property list.
 String getProperty(String key, String defaultValue)
Searches for the property with the specified key in this property list.
 void list(PrintStream out)
Prints this property list out to the specified output stream.
 void list(PrintWriter out)
Prints this property list out to the specified output stream.
 void load(InputStream inStream)
Reads a property list (key and element pairs) from the input stream.
 Enumeration propertyNames()
Returns an enumeration of all the keys in this property list, including the keys in the default property list.
 void save(OutputStream out, String header)
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.
 Object setProperty(String key, String value)
Calls the hashtable method put.
 void store(OutputStream out, String header)
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

defaults

protected Properties defaults
A property list that contains default values for any keys not found in this property list.
Constructor Detail

Properties

public Properties()
Creates an empty property list with no default values.

Properties

public Properties(Properties defaults)
Creates an empty property list with the specified defaults.
Parameters:
defaults - the defaults.
Method Detail

setProperty

public Object setProperty(String key,
                          String value)
Calls the hashtable method put. Provided for parallelism with the getProperty method. Enforces use of strings for property keys and values.
Parameters:
key - the key to be placed into this property list.
value - the value corresponding to key.
Since:
1.2
See Also:
getProperty(java.lang.String)

load

public void load(InputStream inStream)
          throws IOException
Reads a property list (key and element pairs) from the input stream. The stream is assumed to be using the ISO 8859-1 character encoding.

Every property occupies one line of the input stream. Each line is terminated by a line terminator (\n or \r or \r\n). Lines from the input stream are processed until end of file is reached on the input stream.

A line that contains only whitespace or whose first non-whitespace character is an ASCII # or ! is ignored (thus, # or ! indicate comment lines).

Every line other than a blank line or a comment line describes one property to be added to the table (except that if a line ends with \, then the following line, if it exists, is treated as a continuation line, as described below). The key consists of all the characters in the line starting with the first non-whitespace character and up to, but not including, the first ASCII =, :, or whitespace character. All of the key termination characters may be included in the key by preceding them with a \. Any whitespace after the key is skipped; if the first non-whitespace character after the key is = or :, then it is ignored and any whitespace characters after it are also skipped. All remaining characters on the line become part of the associated element string. Within the element string, the ASCII escape sequences \t, \n, \r, \\, \", \', \ (a backslash and a space), and \u xxxx are recognized and converted to single characters. Moreover, if the last character on the line is \, then the next line is treated as a continuation of the current line; the \ and line terminator are simply discarded, and any leading whitespace characters on the continuation line are also discarded and are not part of the element string.

As an example, each of the following four lines specifies the key "Truth" and the associated element value "Beauty":

 Truth = Beauty
    Truth:Beauty
 Truth			:Beauty
As another example, the following three lines specify a single property:

 fruits				apple, banana, pear, \
                                  cantaloupe, watermelon, \
                                  kiwi, mango
The key is "fruits" and the associated element is:

"apple, banana, pear, cantaloupe, watermelon,kiwi, mango"
Note that a space appears before each \ so that a space will appear after each comma in the final result; the \, line terminator, and leading whitespace on the continuation line are merely discarded and are not replaced by one or more other characters.

As a third example, the line:

cheeses
specifies that the key is "cheeses" and the associated element is the empty string.

Parameters:
inStream - the input stream.
Throws:
IOException - if an error occurred when reading from the input stream.

save

public void save(OutputStream out,
                 String header)
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out, String header) method.

Calls the store(OutputStream out, String header) method and suppresses IOExceptions that were thrown.
Parameters:
out - an output stream.
header - a description of the property list.
Throws:
ClassCastException - if this Properties object contains any keys or values that are not Strings.

store

public void store(OutputStream out,
                  String header)
           throws IOException
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method. The stream is written using the ISO 8859-1 character encoding.

Properties from the defaults table of this Properties table (if any) are not written out by this method.

If the header argument is not null, then an ASCII # character, the header string, and a line separator are first written to the output stream. Thus, the header can serve as an identifying comment.

Next, a comment line is always written, consisting of an ASCII # character, the current date and time (as if produced by the toString method of Date for the current time), and a line separator as generated by the Writer.

Then every entry in this Properties table is written out, one per line. For each entry the key string is written, then an ASCII =, then the associated element string. Each character of the element string is examined to see whether it should be rendered as an escape sequence. The ASCII characters \, tab, newline, and carriage return are written as \\, \t, \n, and \r, respectively. Characters less than \u0020 and characters greater than \u007E are written as \u xxxx for the appropriate hexadecimal value xxxx. Leading space characters, but not embedded or trailing space characters, are written with a preceding \. The key and value characters #, !, =, and : are written with a preceding slash to ensure that they are properly loaded.

After the entries have been written, the output stream is flushed. The output stream remains open after this method returns.

Parameters:
out - an output stream.
header - a description of the property list.
Throws:
IOException - if writing this property list to the specified output stream throws an IOException.
ClassCastException - if this Properties object contains any keys or values that are not Strings.

getProperty

public String getProperty(String key)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns null if the property is not found.
Parameters:
key - the property key.
Returns:
the value in this property list with the specified key value.
See Also:
setProperty(java.lang.String, java.lang.String), defaults

getProperty

public String getProperty(String key,
                          String defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.
Parameters:
key - the hashtable key.
defaultValue - a default value.
Returns:
the value in this property list with the specified key value.
See Also:
setProperty(java.lang.String, java.lang.String), defaults

propertyNames

public Enumeration propertyNames()
Returns an enumeration of all the keys in this property list, including the keys in the default property list.
Returns:
an enumeration of all the keys in this property list, including the keys in the default property list.
See Also:
Enumeration, defaults

list

public void list(PrintStream out)
Prints this property list out to the specified output stream. This method is useful for debugging.
Parameters:
out - an output stream.

list

public void list(PrintWriter out)
Prints this property list out to the specified output stream. This method is useful for debugging.
Parameters:
out - an output stream.
Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class PropertyPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--java.util.PropertyPermission
All Implemented Interfaces:
Guard, Serializable
public final class PropertyPermission
extends BasicPermission

This class is for property permissions.

The name is the name of the property ("java.home", "os.name", etc). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords. The possible keywords are "read" and "write". Their meaning is defined as follows:

read
read permission. Allows System.getProperty to be called.
write
write permission. Allows System.setProperty to be called.

The actions string is converted to lowercase before processing.

Care should be taken before granting code permission to access certain system properties. For example, granting permission to access the "java.home" system property gives potentially malevolent code sensitive information about the system environment (the Java installation directory). Also, granting permission to access the "user.name" and "user.home" system properties gives potentially malevolent code sensitive information about the user environment (the user's account name and home directory).

Since:
1.2
See Also:
BasicPermission, Permission, Permissions, PermissionCollection, SecurityManager, Serialized Form

Constructor Summary
PropertyPermission(String name, String actions)
Creates a new PropertyPermission object with the specified name.
Method Summary
boolean | equals(Object obj) Checks two PropertyPermission objects for equality.
String | getActions() Returns the "canonical string representation" of the actions.
int | hashCode() Returns the hash code value for this object.
boolean | implies(Permission p) Checks if this PropertyPermission object "implies" the specified permission.
PermissionCollection | newPermissionCollection() Returns a new PermissionCollection object for storing PropertyPermission objects.
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PropertyPermission

public PropertyPermission(String name,
                          String actions)
Creates a new PropertyPermission object with the specified name. The name is the name of the system property, and actions contains a comma-separated list of the desired actions granted on the property. Possible actions are "read" and "write".
Parameters:
name - the name of the PropertyPermission.
actions - the actions string.
Method Detail

implies

public boolean implies(Permission p)
Checks if this PropertyPermission object "implies" the specified permission.

More specifically, this method returns true if:

  • p is an instanceof PropertyPermission,

  • p's actions are a proper subset of this object's actions, and

  • p's name is implied by this object's name. For example, "java.*" implies "java.home".
Overrides:
implies in class BasicPermission
Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(Object obj)
Checks two PropertyPermission objects for equality. Checks that obj is a PropertyPermission, and has the same name and actions as this object.

Overrides:
equals in class BasicPermission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a PropertyPermission, and has the same name and actions as this PropertyPermission object.

hashCode

public int hashCode()
Returns the hash code value for this object. The hash code used is the hash code of this permissions name, that is, getName().hashCode(), where getName is from the Permission superclass.
Overrides:
hashCode in class BasicPermission
Returns:
a hash code value for this object.

getActions

public String getActions()
Returns the "canonical string representation" of the actions. That is, this method always returns present actions in the following order: read, write. For example, if this PropertyPermission object allows both write and read actions, a call to getActions will return the string "read,write".
Overrides:
getActions in class BasicPermission
Returns:
the canonical string representation of the actions.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing PropertyPermission objects.

Overrides:
newPermissionCollection in class BasicPermission
Returns:
a new PermissionCollection object suitable for storing PropertyPermissions.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyResourceBundle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class PropertyResourceBundle

java.lang.Object
  |
  +--java.util.ResourceBundle
        |
        +--java.util.PropertyResourceBundle
public class PropertyResourceBundle
extends ResourceBundle

PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file. See ResourceBundle for more information about resource bundles. See Properties for more information about properties files, in particular the information on character encodings.

Unlike other types of resource bundle, you don't subclass PropertyResourceBundle. Instead, you supply properties files containing the resource data. ResourceBundle.getBundle() will automatically look for the appropriate properties file and create a PropertyResourceBundle that refers to it. The resource bundle name that you pass to ResourceBundle.getBundle() is the file name of the properties file, not the class name of the object that is returned.

For example, if you say ResourceBundle.getBundle("MyResources", new Locale("fr", "FR")); the resource bundle lookup mechanism will search the class path for a file called MyResources_fr_FR.properties.

If a real class and a properties file with a particular name both exist, the class wins; the properties file will only be used if there is no class with the desired name.

In the following example, the keys are of the form "s1"... The actual keys are entirely up to your choice, so long as they are the same as the keys you use in your program to retrieve the objects from the bundle. Keys are case-sensitive.

 s1=3
 s2=MeinDisk
 s3=3 Mar 96
 s4=Der disk '{1}' a {0} a {2}.
 s5=0
 s6=keine Datein
 s7=1
 s8=ein Datei
 s9=2
 s10={0}|3 Datein
 s11=Der Format worf ein Exception: {0}
 s12=ERROR
 s14=Resulte
 s13=Dialogue
 s15=Pattern
 s16=1,3

Since:
JDK1.1
See Also:
ResourceBundle, ListResourceBundle, Properties

Fields inherited from class java.util.ResourceBundle
parent
Constructor Summary
PropertyResourceBundle(InputStream stream)
Creates a property resource
Method Summary
Enumeration | getKeys() Implementation of ResourceBundle.getKeys.
Object | handleGetObject(String key) Override of ResourceBundle, same semantics
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PropertyResourceBundle

public PropertyResourceBundle(InputStream stream)
                       throws IOException
Creates a property resource
Parameters:
stream - property file to read from.
Method Detail

handleGetObject

public Object handleGetObject(String key)
Override of ResourceBundle, same semantics
Overrides:
handleGetObject in class ResourceBundle
Following copied from class: java.util.ResourceBundle
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getKeys

public Enumeration getKeys()
Implementation of ResourceBundle.getKeys.
Overrides:
getKeys in class ResourceBundle
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Random

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Random

java.lang.Object
  |
  +--java.util.Random
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SecureRandom
public class Random
extends Object
implements Serializable

An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)

If two instances of Random are created with the same seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers. In order to guarantee this property, particular algorithms are specified for the class Random. Java implementations must use all the algorithms shown here for the class Random, for the sake of absolute portability of Java code. However, subclasses of class Random are permitted to use other algorithms, so long as they adhere to the general contracts for all the methods.

The algorithms implemented by class Random use a protected utility method that on each invocation can supply up to 32 pseudorandomly generated bits.

Many applications will find the random method in class Math simpler to use.

Since:
JDK1.0
See Also:
Math.random(), Serialized Form

Constructor Summary
Random()
Creates a new random number generator.
Random(long seed)
Creates a new random number generator using a single long seed:
Method Summary
protected int | next(int bits) Generates the next pseudorandom number.
boolean | nextBoolean() Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
void | nextBytes(byte[] bytes) Generates random bytes and places them into a user-supplied byte array.
double | nextDouble() Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
float | nextFloat() Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
double | nextGaussian() Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.
int | nextInt() Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
int | nextInt(int n) Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
long | nextLong() Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
void | setSeed(long seed) Sets the seed of this random number generator using a single long seed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Random

public Random()
Creates a new random number generator. Its seed is initialized to a value based on the current time:
 public Random() { this(System.currentTimeMillis()); }
See Also:
System.currentTimeMillis()

Random

public Random(long seed)
Creates a new random number generator using a single long seed:
 public Random(long seed) { setSeed(seed); }
Used by method next to hold the state of the pseudorandom number generator.
Parameters:
seed - the initial seed.
See Also:
setSeed(long)
Method Detail

setSeed

public void setSeed(long seed)
Sets the seed of this random number generator using a single long seed. The general contract of setSeed is that it alters the state of this random number generator object so as to be in exactly the same state as if it had just been created with the argument seed as a seed. The method setSeed is implemented by class Random as follows:
 synchronized public void setSeed(long seed) {
       this.seed = (seed ^ 0x5DEECE66DL) & ((1L << 48) - 1);
       haveNextNextGaussian = false;
 }
The implementation of setSeed by class Random happens to use only 48 bits of the given seed. In general, however, an overriding method may use all 64 bits of the long argument as a seed value.
Parameters:
seed - the initial seed.

next

protected int next(int bits)
Generates the next pseudorandom number. Subclass should override this, as this is used by all other methods.

The general contract of next is that it returns an int value and if the argument bits is between 1 and 32 (inclusive), then that many low-order bits of the returned value will be (approximately) independently chosen bit values, each of which is (approximately) equally likely to be 0 or 1. The method next is implemented by class Random as follows:

 synchronized protected int next(int bits) {
       seed = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);
       return (int)(seed >>> (48 - bits));
 }
This is a linear congruential pseudorandom number generator, as defined by D. H. Lehmer and described by Donald E. Knuth in The Art of Computer Programming, Volume 2: Seminumerical Algorithms, section 3.2.1.
Parameters:
bits - random bits
Returns:
the next pseudorandom value from this random number generator's sequence.
Since:
JDK1.1

nextBytes

public void nextBytes(byte[] bytes)
Generates random bytes and places them into a user-supplied byte array. The number of random bytes produced is equal to the length of the byte array.
Parameters:
bytes - the non-null byte array in which to put the random bytes.
Since:
JDK1.1

nextInt

public int nextInt()
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. The general contract of nextInt is that one int value is pseudorandomly generated and returned. All 232 possible int values are produced with (approximately) equal probability. The method nextInt is implemented by class Random as follows:
 public int nextInt() {  return next(32); }
Returns:
the next pseudorandom, uniformly distributed int value from this random number generator's sequence.

nextInt

public int nextInt(int n)
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. The general contract of nextInt is that one int value in the specified range is pseudorandomly generated and returned. All n possible int values are produced with (approximately) equal probability. The method nextInt(int n) is implemented by class Random as follows:
 public int nextInt(int n) {
     if (n<=0) throw="throw" new="new" IllegalArgumentException("n="IllegalArgumentException("n" must="must" be="be" positive");="positive");" if="if" ((n="((n" &="&" -n)="=" n)="n)" //="//" i.e.,="i.e.," n="n" is="is" a="a" power="power" of="of" 2="2" return="return" (int)((n="(int)((n" *="*" (long)next(31))="(long)next(31))">> 31);

     int bits, val;
     do {
         bits = next(31);
         val = bits % n;
     } while(bits - val + (n-1) <0); return="return" val;="val;" }="}"

The hedge "approximately" is used in the foregoing description only because the next method is only approximately an unbiased source of independently chosen bits. If it were a perfect source of randomly chosen bits, then the algorithm shown would choose int values from the stated range with perfect uniformity.

The algorithm is slightly tricky. It rejects values that would result in an uneven distribution (due to the fact that 2^31 is not divisible by n). The probability of a value being rejected depends on n. The worst case is n=2^30+1, for which the probability of a reject is 1/2, and the expected number of iterations before the loop terminates is 2.

The algorithm treats the case where n is a power of two specially: it returns the correct number of high-order bits from the underlying pseudo-random number generator. In the absence of special treatment, the correct number of low-order bits would be returned. Linear congruential pseudo-random number generators such as the one implemented by this class are known to have short periods in the sequence of values of their low-order bits. Thus, this special case greatly increases the length of the sequence of values returned by successive calls to this method if n is a small power of two.

Parameters:
n - the bound on the random number to be returned. Must be positive.
Returns:
a pseudorandom, uniformly distributed int value between 0 (inclusive) and n (exclusive).
Throws:
IllegalArgumentException - n is not positive.
Since:
1.2

nextLong

public long nextLong()
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence. The general contract of nextLong is that one long value is pseudorandomly generated and returned. All 264 possible long values are produced with (approximately) equal probability. The method nextLong is implemented by class Random as follows:
 public long nextLong() {
       return ((long)next(32) << 32) + next(32);
 }
Returns:
the next pseudorandom, uniformly distributed long value from this random number generator's sequence.

nextBoolean

public boolean nextBoolean()
Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence. The general contract of nextBoolean is that one boolean value is pseudorandomly generated and returned. The values true and false are produced with (approximately) equal probability. The method nextBoolean is implemented by class Random as follows:
 public boolean nextBoolean() {return next(1) != 0;}
Returns:
the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
Since:
1.2

nextFloat

public float nextFloat()
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

The general contract of nextFloat is that one float value, chosen (approximately) uniformly from the range 0.0f (inclusive) to 1.0f (exclusive), is pseudorandomly generated and returned. All 224 possible float values of the form m x 2-24, where m is a positive integer less than 224 , are produced with (approximately) equal probability. The method nextFloat is implemented by class Random as follows:

 public float nextFloat() {
      return next(24) / ((float)(1 << 24));
 }
The hedge "approximately" is used in the foregoing description only because the next method is only approximately an unbiased source of independently chosen bits. If it were a perfect source or randomly chosen bits, then the algorithm shown would choose float values from the stated range with perfect uniformity.

[In early versions of Java, the result was incorrectly calculated as:

 return next(30) / ((float)(1 << 30));
This might seem to be equivalent, if not better, but in fact it introduced a slight nonuniformity because of the bias in the rounding of floating-point numbers: it was slightly more likely that the low-order bit of the significand would be 0 than that it would be 1.]
Returns:
the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

nextDouble

public double nextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

The general contract of nextDouble is that one double value, chosen (approximately) uniformly from the range 0.0d (inclusive) to 1.0d (exclusive), is pseudorandomly generated and returned. All 253 possible float values of the form m x 2-53 , where m is a positive integer less than 253, are produced with (approximately) equal probability. The method nextDouble is implemented by class Random as follows:

 public double nextDouble() {
       return (((long)next(26) << 27) + next(27))
           / (double)(1L << 53);
 }

The hedge "approximately" is used in the foregoing description only because the next method is only approximately an unbiased source of independently chosen bits. If it were a perfect source or randomly chosen bits, then the algorithm shown would choose double values from the stated range with perfect uniformity.

[In early versions of Java, the result was incorrectly calculated as:

  return (((long)next(27) << 27) + next(27))
      / (double)(1L << 54);
This might seem to be equivalent, if not better, but in fact it introduced a large nonuniformity because of the bias in the rounding of floating-point numbers: it was three times as likely that the low-order bit of the significand would be 0 than that it would be 1! This nonuniformity probably doesn't matter much in practice, but we strive for perfection.]
Returns:
the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

nextGaussian

public double nextGaussian()
Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.

The general contract of nextGaussian is that one double value, chosen from (approximately) the usual normal distribution with mean 0.0 and standard deviation 1.0, is pseudorandomly generated and returned. The method nextGaussian is implemented by class Random as follows:

 synchronized public double nextGaussian() {
    if (haveNextNextGaussian) {
            haveNextNextGaussian = false;
            return nextNextGaussian;
    } else {
            double v1, v2, s;
            do {
                    v1 = 2 * nextDouble() - 1;   // between -1.0 and 1.0
                    v2 = 2 * nextDouble() - 1;   // between -1.0 and 1.0
                    s = v1 * v1 + v2 * v2;
            } while (s >= 1 || s == 0);
            double multiplier = Math.sqrt(-2 * Math.log(s)/s);
            nextNextGaussian = v2 * multiplier;
            haveNextNextGaussian = true;
            return v1 * multiplier;
    }
 }
This uses the polar method of G. E. P. Box, M. E. Muller, and G. Marsaglia, as described by Donald E. Knuth in The Art of Computer Programming, Volume 2: Seminumerical Algorithms, section 3.4.1, subsection C, algorithm P. Note that it generates two independent values at the cost of only one call to Math.log and one call to Math.sqrt.
Returns:
the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResourceBundle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class ResourceBundle

java.lang.Object
  |
  +--java.util.ResourceBundle
Direct Known Subclasses:
ListResourceBundle, PropertyResourceBundle
public abstract class ResourceBundle
extends Object

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

This allows you to write programs that can:

  • be easily localized, or translated, into different languages
  • handle multiple locales at once
  • be easily modified later to support even more locales

One resource bundle is, conceptually, a set of related classes that inherit from ResourceBundle. Each related subclass of ResourceBundle has the same base name plus an additional component that identifies its locale. For example, suppose your resource bundle is named MyResources. The first class you are likely to write is the default resource bundle which simply has the same name as its family--MyResources. You can also provide as many related locale-specific classes as you need: for example, perhaps you would provide a German one named MyResources_de.

Each related subclass of ResourceBundle contains the same items, but the items have been translated for the locale represented by that ResourceBundle subclass. For example, both MyResources and MyResources_de may have a String that's used on a button for canceling operations. In MyResources the String may contain Cancel and in MyResources_de it may contain Abbrechen.

If there are different resources for different countries, you can make specializations: for example, MyResources_de_CH is the German language (de) in Switzerland (CH). If you want to only modify some of the resources in the specialization, you can do so.

When your program needs a locale-specific object, it loads the ResourceBundle class using the getBundle method:

 ResourceBundle myResources =
      ResourceBundle.getBundle("MyResources", currentLocale);
The first argument specifies the family name of the resource bundle that contains the object in question. The second argument indicates the desired locale. getBundle uses these two arguments to construct the name of the ResourceBundle subclass it should load as follows.

The resource bundle lookup searches for classes with various suffixes on the basis of (1) the desired locale and (2) the current default locale as returned by Locale.getDefault(), and (3) the root resource bundle (baseclass), in the following order from lower-level (more specific) to parent-level (less specific):

baseclass + "_" + language1 + "_" + country1 + "_" + variant1
baseclass + "_" + language1 + "_" + country1 + "_" + variant1 + ".properties"
baseclass + "_" + language1 + "_" + country1
baseclass + "_" + language1 + "_" + country1 + ".properties"
baseclass + "_" + language1
baseclass + "_" + language1 + ".properties"
baseclass + "_" + language2 + "_" + country2 + "_" + variant2
baseclass + "_" + language2 + "_" + country2 + "_" + variant2 + ".properties"
baseclass + "_" + language2 + "_" + country2
baseclass + "_" + language2 + "_" + country2 + ".properties"
baseclass + "_" + language2
baseclass + "_" + language2 + ".properties"
baseclass
baseclass + ".properties"

For example, if the current default locale is en_US, the locale the caller is interested in is fr_CH, and the resource bundle name is MyResources, resource bundle lookup will search for the following classes, in order:
MyResources_fr_CH
MyResources_fr
MyResources_en_US
MyResources_en
MyResources

The result of the lookup is a class, but that class may be backed by a properties file on disk. That is, if getBundle does not find a class of a given name, it appends ".properties" to the class name and searches for a properties file of that name. If it finds such a file, it creates a new PropertyResourceBundle object to hold it. Following on the previous example, it will return classes and and files giving preference as follows: (class) MyResources_fr_CH (file) MyResources_fr_CH.properties (class) MyResources_fr (file) MyResources_fr.properties (class) MyResources_en_US (file) MyResources_en_US.properties (class) MyResources_en (file) MyResources_en.properties (class) MyResources (file) MyResources.properties If a lookup fails, getBundle() throws a MissingResourceException.

The baseclass must be fully qualified (for example, myPackage.MyResources, not just MyResources). It must also be accessable by your code; it cannot be a class that is private to the package where ResourceBundle.getBundle is called.

Note: ResourceBundles are used internally in accessing NumberFormats, Collations, and so on. The lookup strategy is the same.

Resource bundles contain key/value pairs. The keys uniquely identify a locale-specific object in the bundle. Here's an example of a ListResourceBundle that contains two key/value pairs:

 class MyResource extends ListResourceBundle {
      public Object[][] getContents() {
              return contents;
      }
      static final Object[][] contents = {
      // LOCALIZE THIS
              {"OkKey", "OK"},
              {"CancelKey", "Cancel"},
      // END OF MATERIAL TO LOCALIZE
      };
 }
Keys are always Strings. In this example, the keys are OkKey and CancelKey. In the above example, the values are also Strings--OK and Cancel--but they don't have to be. The values can be any type of object.

You retrieve an object from resource bundle using the appropriate getter method. Because OkKey and CancelKey are both strings, you would use getString to retrieve them:

 button1 = new Button(myResourceBundle.getString("OkKey"));
 button2 = new Button(myResourceBundle.getString("CancelKey"));
The getter methods all require the key as an argument and return the object if found. If the object is not found, the getter method throws a MissingResourceException.

Besides getString; ResourceBundle supports a number of other methods for getting different types of objects such as getStringArray. If you don't have an object that matches one of these methods, you can use getObject and cast the result to the appropriate type. For example:

 int[] myIntegers = (int[]) myResources.getObject("intList");

NOTE: You should always supply a baseclass with no suffixes. This will be the class of "last resort", if a locale is requested that does not exist. In fact, you must provide all of the classes in any given inheritance chain that you provide a resource for. For example, if you provide MyResources_fr_BE, you must provide both MyResources and MyResources_fr or the resource bundle lookup won't work right.

The Java 2 platform provides two subclasses of ResourceBundle, ListResourceBundle and PropertyResourceBundle, that provide a fairly simple way to create resources. (Once serialization is fully integrated, we will provide another way.) As you saw briefly in a previous example, ListResourceBundle manages its resource as a List of key/value pairs. PropertyResourceBundle uses a properties file to manage its resources.

If ListResourceBundle or PropertyResourceBundle do not suit your needs, you can write your own ResourceBundle subclass. Your subclasses must override two methods: handleGetObject and getKeys().

The following is a very simple example of a ResourceBundle subclass, MyResources, that manages two resources (for a larger number of resources you would probably use a Hashtable). Notice that if the key is not found, handleGetObject must return null. If the key is null, a NullPointerException should be thrown. Notice also that you don't need to supply a value if a "parent-level" ResourceBundle handles the same key with the same value (as in United Kingdom below). Also notice that because you specify an en_GB resource bundle, you also have to provide a default en resource bundle even though it inherits all its data from the root resource bundle.

Example:

 // default (English language, United States)
 abstract class MyResources extends ResourceBundle {
     public Object handleGetObject(String key) {
         if (key.equals("okKey")) return "Ok";
         if (key.equals("cancelKey")) return "Cancel";
     return null;
     }
 }

 // German language
 public class MyResources_de extends MyResources {
     public Object handleGetObject(String key) {
         // don't need okKey, since parent level handles it.
         if (key.equals("cancelKey")) return "Abbrechen";
         return null;
     }
 }
You do not have to restrict yourself to using a single family of ResourceBundles. For example, you could have a set of bundles for exception messages, ExceptionResources (ExceptionResources_fr, ExceptionResources_de, ...), and one for widgets, WidgetResource (WidgetResources_fr, WidgetResources_de, ...); breaking up the resources however you like.

Since:
JDK1.1
See Also:
ListResourceBundle, PropertyResourceBundle, MissingResourceException

Field Summary
protected  ResourceBundle parent
The parent bundle is consulted by getObject when this bundle does not contain a particular resource.
Constructor Summary
ResourceBundle()
Sole constructor.
Method Summary
static ResourceBundle | getBundle(String baseName) Get the appropriate ResourceBundle subclass.
static ResourceBundle | getBundle(String baseName, Locale locale) Get the appropriate ResourceBundle subclass.
static ResourceBundle | getBundle(String baseName, Locale locale, ClassLoader loader) Get the appropriate ResourceBundle subclass.
abstract Enumeration | getKeys() Return an enumeration of the keys.
Locale | getLocale() Return the Locale for this ResourceBundle.
Object | getObject(String key) Get an object from a ResourceBundle.
String | getString(String key) Get an object from a ResourceBundle.
String[] | getStringArray(String key) Get an object from a ResourceBundle.
protected abstract Object | handleGetObject(String key) Get an object from a ResourceBundle.
protected void | setParent(ResourceBundle parent) Set the parent bundle of this bundle.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

parent

protected ResourceBundle parent
The parent bundle is consulted by getObject when this bundle does not contain a particular resource.
Constructor Detail

ResourceBundle

public ResourceBundle()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

getString

public final String getString(String key)
                       throws MissingResourceException
Get an object from a ResourceBundle.
Convenience method to save casting.
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getStringArray

public final String[] getStringArray(String key)
                              throws MissingResourceException
Get an object from a ResourceBundle.
Convenience method to save casting.
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getObject

public final Object getObject(String key)
                       throws MissingResourceException
Get an object from a ResourceBundle.
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getLocale

public Locale getLocale()
Return the Locale for this ResourceBundle. (This function can be used after a call to getBundle() to determine whether the ResourceBundle returned really corresponds to the requested locale or is a fallback.)

setParent

protected void setParent(ResourceBundle parent)
Set the parent bundle of this bundle. The parent bundle is searched by getObject when this bundle does not contain a particular resource.
Parameters:
parent - this bundle's parent bundle.

getBundle

public static final ResourceBundle getBundle(String baseName)
                                      throws MissingResourceException
Get the appropriate ResourceBundle subclass.
Parameters:
baseName - see class description.

getBundle

public static final ResourceBundle getBundle(String baseName,
                                             Locale locale)
Get the appropriate ResourceBundle subclass.
Parameters:
baseName - see class description.
locale - see class description.

getBundle

public static ResourceBundle getBundle(String baseName,
                                       Locale locale,
                                       ClassLoader loader)
                                throws MissingResourceException
Get the appropriate ResourceBundle subclass.
Parameters:
baseName - see class description.
locale - see class description.
loader - the ClassLoader to load the resource from.

handleGetObject

protected abstract Object handleGetObject(String key)
                                   throws MissingResourceException
Get an object from a ResourceBundle. NOTE: Subclasses must override.
Parameters:
key - see class description.
Throws:
NullPointerException - if key is null.

getKeys

public abstract Enumeration getKeys()
Return an enumeration of the keys. NOTE: Subclasses must override.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Set

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface Set

All Superinterfaces:
Collection
All Known Subinterfaces:
SortedSet
All Known Implementing Classes:
AbstractSet, HashSet
public interface Set
extends Collection

A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 and e2 such that e1.equals(e2), and at most one null element. As implied by its name, this interface models the mathematical set abstraction.

The Set interface places additional stipulations, beyond those inherited from the Collection interface, on the contracts of all constructors and on the contracts of the add, equals and hashCode methods. Declarations for other inherited methods are also included here for convenience. (The specifications accompanying these declarations have been tailored to the Set interface, but they do not contain any additional stipulations.)

The additional stipulation on constructors is, not surprisingly, that all constructors must create a set that contains no duplicate elements (as defined above).

Note: Great care must be exercised if mutable objects are used as set elements. The behavior of a set is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is an element in the set. A special case of this prohibition is that it is not permissible for a set to contain itself as an element.

Since:
1.2
See Also:
Collection, List, SortedSet, HashSet, TreeSet, AbstractSet, Collections.singleton(java.lang.Object), Collections.EMPTY_SET

Method Summary
boolean | add(Object o) Adds the specified element to this set if it is not already present (optional operation).
boolean | addAll(Collection c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation).
void | clear() Removes all of the elements from this set (optional operation).
boolean | contains(Object o) Returns true if this set contains the specified element.
boolean | containsAll(Collection c) Returns true if this set contains all of the elements of the specified collection.
boolean | equals(Object o) Compares the specified object with this set for equality.
int | hashCode() Returns the hash code value for this set.
boolean | isEmpty() Returns true if this set contains no elements.
Iterator | iterator() Returns an iterator over the elements in this set.
boolean | remove(Object o) Removes the specified element from this set if it is present (optional operation).
boolean | removeAll(Collection c) Removes from this set all of its elements that are contained in the specified collection (optional operation).
boolean | retainAll(Collection c) Retains only the elements in this set that are contained in the specified collection (optional operation).
int | size() Returns the number of elements in this set (its cardinality).
Object[] | toArray() Returns an array containing all of the elements in this set.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this set whose runtime type is that of the specified array.

Method Detail

size

public int size()
Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
Specified by:
size in interface Collection
Returns:
the number of elements in this set (its cardinality).

isEmpty

public boolean isEmpty()
Returns true if this set contains no elements.
Specified by:
isEmpty in interface Collection
Returns:
true if this set contains no elements.

contains

public boolean contains(Object o)
Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that (o==null ? e==null : o.equals(e)).
Specified by:
contains in interface Collection
Parameters:
o - element whose presence in this set is to be tested.
Returns:
true if this set contains the specified element.

iterator

public Iterator iterator()
Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).
Specified by:
iterator in interface Collection
Returns:
an iterator over the elements in this set.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this set. Obeys the general contract of the Collection.toArray method.
Specified by:
toArray in interface Collection
Returns:
an array containing all of the elements in this set.

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this set whose runtime type is that of the specified array. Obeys the general contract of the Collection.toArray(Object[]) method.
Specified by:
toArray in interface Collection
Parameters:
a - the array into which the elements of this set are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this set.
Throws:
ArrayStoreException - the runtime type of a is not a supertype of the runtime type of every element in this set.

add

public boolean add(Object o)
Adds the specified element to this set if it is not already present (optional operation). More formally, adds the specified element, o, to this set if this set contains no element e such that (o==null ? e==null : o.equals(e)). If this set already contains the specified element, the call leaves this set unchanged and returns false. In combination with the restriction on constructors, this ensures that sets never contain duplicate elements.

The stipulation above does not imply that sets must accept all elements; sets may refuse to add any particular element, including null, and throwing an exception, as described in the specification for Collection.add. Individual set implementations should clearly document any restrictions on the the elements that they may contain.

Specified by:
add in interface Collection
Parameters:
o - element to be added to this set.
Returns:
true if this set did not already contain the specified element.
Throws:
UnsupportedOperationException - if the add method is not supported by this set.
ClassCastException - if the class of the specified element prevents it from being added to this set.
IllegalArgumentException - if some aspect of this element prevents it from being added to this set.

remove

public boolean remove(Object o)
Removes the specified element from this set if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if the set contains such an element. Returns true if the set contained the specified element (or equivalently, if the set changed as a result of the call). (The set will not contain the specified element once the call returns.)
Specified by:
remove in interface Collection
Parameters:
o - object to be removed from this set, if present.
Returns:
true if the set contained the specified element.
Throws:
UnsupportedOperationException - if the remove method is not supported by this set.

containsAll

public boolean containsAll(Collection c)
Returns true if this set contains all of the elements of the specified collection. If the specified collection is also a set, this method returns true if it is a subset of this set.
Specified by:
containsAll in interface Collection
Parameters:
c - collection to be checked for containment in this set.
Returns:
true if this set contains all of the elements of the specified collection.

addAll

public boolean addAll(Collection c)
Adds all of the elements in the specified collection to this set if they're not already present (optional operation). If the specified collection is also a set, the addAll operation effectively modifies this set so that its value is the union of the two sets. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress.
Specified by:
addAll in interface Collection
Parameters:
c - collection whose elements are to be added to this set.
Returns:
true if this set changed as a result of the call.
Throws:
UnsupportedOperationException - if the addAll method is not supported by this set.
ClassCastException - if the class of some element of the specified collection prevents it from being added to this set.
IllegalArgumentException - if some aspect of some element of the specified collection prevents it from being added to this set.
See Also:
add(Object)

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets.
Specified by:
retainAll in interface Collection
Parameters:
c - collection that defines which elements this set will retain.
Returns:
true if this collection changed as a result of the call.
Throws:
UnsupportedOperationException - if the retainAll method is not supported by this Collection.
See Also:
remove(Object)

removeAll

public boolean removeAll(Collection c)
Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.
Specified by:
removeAll in interface Collection
Parameters:
c - collection that defines which elements will be removed from this set.
Returns:
true if this set changed as a result of the call.
Throws:
UnsupportedOperationException - if the removeAll method is not supported by this Collection.
See Also:
remove(Object)

clear

public void clear()
Removes all of the elements from this set (optional operation). This set will be empty after this call returns (unless it throws an exception).
Specified by:
clear in interface Collection
Throws:
UnsupportedOperationException - if the clear method is not supported by this set.

equals

public boolean equals(Object o)
Compares the specified object with this set for equality. Returns true if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface.
Specified by:
equals in interface Collection
Overrides:
equals in class Object
Parameters:
o - Object to be compared for equality with this set.
Returns:
true if the specified Object is equal to this set.

hashCode

public int hashCode()
Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hashcode of a null element is defined to be zero. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of the Object.hashCode method.
Specified by:
hashCode in interface Collection
Overrides:
hashCode in class Object
Returns:
the hash code value for this set.
See Also:
Object.hashCode(),
Object.equals(Object),
equals(Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleTimeZone

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class SimpleTimeZone

java.lang.Object
  |
  +--java.util.TimeZone
        |
        +--java.util.SimpleTimeZone
All Implemented Interfaces:
Cloneable, Serializable
public class SimpleTimeZone
extends TimeZone

SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar. This class does not handle historical changes.

Use a negative value for dayOfWeekInMonth to indicate that SimpleTimeZone should count from the end of the month backwards. For example, Daylight Savings Time ends at the last (dayOfWeekInMonth = -1) Sunday in October, at 2 AM in standard time.

See Also:
Calendar, GregorianCalendar, TimeZone, Serialized Form

Fields inherited from class java.util.TimeZone
LONG, SHORT
Constructor Summary
SimpleTimeZone(int rawOffset, String ID)
Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID.
SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime)
Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time.
SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings)
Constructor.
Method Summary
Object | clone() Overrides Cloneable
boolean | equals(Object obj) Compares the equality of two SimpleTimeZone objects.
int | getDSTSavings() Returns the amount of time in ms that the clock is advanced during DST.
int | getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight savings, for the specified date and time.
int | getRawOffset() Overrides TimeZone Gets the GMT offset for this time zone.
int | hashCode() Override hashCode.
boolean | hasSameRules(TimeZone other) Return true if this zone has the same rules and offset as another zone.
boolean | inDaylightTime(Date date) Overrides TimeZone Queries if the given date is in Daylight Savings Time.
void | setDSTSavings(int millisSavedDuringDST) Sets the amount of time in ms that the clock is advanced during DST.
void | setEndRule(int month, int dayOfMonth, int time) Sets the DST end rule to a fixed date within a month.
void | setEndRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time) Sets the daylight savings ending rule.
void | setEndRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after) Sets the DST end rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
void | setRawOffset(int offsetMillis) Overrides TimeZone Sets the base time zone offset to GMT.
void | setStartRule(int month, int dayOfMonth, int time) Sets the DST start rule to a fixed date within a month.
void | setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time) Sets the daylight savings starting rule.
void | setStartRule(int month, int dayOfMonth, int dayOfWeek, int time, boolean after) Sets the DST start rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
void | setStartYear(int year) Sets the daylight savings starting year.
String | toString() Return a string representation of this time zone.
boolean | useDaylightTime() Overrides TimeZone Queries if this time zone uses Daylight Savings Time.
Methods inherited from class java.util.TimeZone
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getID, getTimeZone, setDefault, setID
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SimpleTimeZone

public SimpleTimeZone(int rawOffset,
                      String ID)
Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID. Timezone IDs can be obtained from TimeZone.getAvailableIDs. Normally you should use TimeZone.getDefault to construct a TimeZone.
Parameters:
rawOffset - The given base time zone offset to GMT.
ID - The time zone ID which is obtained from TimeZone.getAvailableIDs.

SimpleTimeZone

public SimpleTimeZone(int rawOffset,
                      String ID,
                      int startMonth,
                      int startDay,
                      int startDayOfWeek,
                      int startTime,
                      int endMonth,
                      int endDay,
                      int endDayOfWeek,
                      int endTime)
Construct a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, time to start and end the daylight time. Timezone IDs can be obtained from TimeZone.getAvailableIDs. Normally you should use TimeZone.getDefault to create a TimeZone. For a time zone that does not use daylight saving time, do not use this constructor; instead you should use SimpleTimeZone(rawOffset, ID). By default, this constructor specifies day-of-week-in-month rules. That is, if the startDay is 1, and the startDayOfWeek is SUNDAY, then this indicates the first Sunday in the startMonth. A startDay of -1 likewise indicates the last Sunday. However, by using negative or zero values for certain parameters, other types of rules can be specified. Day of month. To specify an exact day of the month, such as March 1, set startDayOfWeek to zero. Day of week after day of month. To specify the first day of the week occurring on or after an exact day of the month, make the day of the week negative. For example, if startDay is 5 and startDayOfWeek is -MONDAY, this indicates the first Monday on or after the 5th day of the startMonth. Day of week before day of month. To specify the last day of the week occurring on or before an exact day of the month, make the day of the week and the day of the month negative. For example, if startDay is -21 and startDayOfWeek is -WEDNESDAY, this indicates the last Wednesday on or before the 21st of the startMonth. The above examples refer to the startMonth, startDay, and startDayOfWeek; the same applies for the endMonth, endDay, and endDayOfWeek.
Parameters:
rawOffset - The given base time zone offset to GMT.
ID - The time zone ID which is obtained from TimeZone.getAvailableIDs.
startMonth - The daylight savings starting month. Month is 0-based. eg, 0 for January.
startDay - The daylight savings starting day-of-week-in-month. Please see the member description for an example.
startDayOfWeek - The daylight savings starting day-of-week. Please see the member description for an example.
startTime - The daylight savings starting time in local wall time, which is standard time in this case. Please see the member description for an example.
endMonth - The daylight savings ending month. Month is 0-based. eg, 0 for January.
endDay - The daylight savings ending day-of-week-in-month. Please see the member description for an example.
endDayOfWeek - The daylight savings ending day-of-week. Please see the member description for an example.
endTime - The daylight savings ending time in local wall time, which is daylight time in this case. Please see the member description for an example.
Throws:
IllegalArgumentException - the month, day, dayOfWeek, or time parameters are out of range for the start or end rule
Since:
JDK1.1

SimpleTimeZone

public SimpleTimeZone(int rawOffset,
                      String ID,
                      int startMonth,
                      int startDay,
                      int startDayOfWeek,
                      int startTime,
                      int endMonth,
                      int endDay,
                      int endDayOfWeek,
                      int endTime,
                      int dstSavings)
Constructor. This constructor is identical to the 10-argument constructor, but also takes a dstSavings parameter.
Parameters:
dstSavings - The amount of time in ms saved during DST.
Throws:
IllegalArgumentException - the month, day, dayOfWeek, or time parameters are out of range for the start or end rule
Since:
1.2
Method Detail

setStartYear

public void setStartYear(int year)
Sets the daylight savings starting year.
Parameters:
year - The daylight savings starting year.

setStartRule

public void setStartRule(int month,
                         int dayOfWeekInMonth,
                         int dayOfWeek,
                         int time)
Sets the daylight savings starting rule. For example, Daylight Savings Time starts at the first Sunday in April, at 2 AM in standard time. Therefore, you can set the start rule by calling: setStartRule(TimeFields.APRIL, 1, TimeFields.SUNDAY, 2*60*60*1000);
Parameters:
month - The daylight savings starting month. Month is 0-based. eg, 0 for January.
dayOfWeekInMonth - The daylight savings starting day-of-week-in-month. Please see the member description for an example.
dayOfWeek - The daylight savings starting day-of-week. Please see the member description for an example.
time - The daylight savings starting time in local wall time, which is standard time in this case. Please see the member description for an example.
Throws:
IllegalArgumentException - the month, dayOfWeekInMonth, dayOfWeek, or time parameters are out of range

setStartRule

public void setStartRule(int month,
                         int dayOfMonth,
                         int time)
Sets the DST start rule to a fixed date within a month.
Parameters:
month - The month in which this rule occurs (0-based).
dayOfMonth - The date in that month (1-based).
time - The time of that day (number of millis after midnight) when DST takes effect in local wall time, which is standard time in this case.
Throws:
IllegalArgumentException - the month, dayOfMonth, or time parameters are out of range
Since:
1.2

setStartRule

public void setStartRule(int month,
                         int dayOfMonth,
                         int dayOfWeek,
                         int time,
                         boolean after)
Sets the DST start rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
month - The month in which this rule occurs (0-based).
dayOfMonth - A date within that month (1-based).
dayOfWeek - The day of the week on which this rule occurs.
time - The time of that day (number of millis after midnight) when DST takes effect in local wall time, which is standard time in this case.
after - If true, this rule selects the first dayOfWeek on or after dayOfMonth. If false, this rule selects the last dayOfWeek on or before dayOfMonth.
Throws:
IllegalArgumentException - the month, dayOfMonth, dayOfWeek, or time parameters are out of range
Since:
1.2

setEndRule

public void setEndRule(int month,
                       int dayOfWeekInMonth,
                       int dayOfWeek,
                       int time)
Sets the daylight savings ending rule. For example, Daylight Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time. Therefore, you can set the end rule by calling: setEndRule(TimeFields.OCTOBER, -1, TimeFields.SUNDAY, 2*60*60*1000);
Parameters:
month - The daylight savings ending month. Month is 0-based. eg, 0 for January.
dayOfWeekInMonth - The daylight savings ending day-of-week-in-month. Please see the member description for an example.
dayOfWeek - The daylight savings ending day-of-week. Please see the member description for an example.
time - The daylight savings ending time in local wall time, which is daylight time in this case. Please see the member description for an example.
Throws:
IllegalArgumentException - the month, dayOfWeekInMonth, dayOfWeek, or time parameters are out of range

setEndRule

public void setEndRule(int month,
                       int dayOfMonth,
                       int time)
Sets the DST end rule to a fixed date within a month.
Parameters:
month - The month in which this rule occurs (0-based).
dayOfMonth - The date in that month (1-based).
time - The time of that day (number of millis after midnight) when DST ends in local wall time, which is daylight time in this case.
Throws:
IllegalArgumentException - the month, dayOfMonth, or time parameters are out of range
Since:
1.2

setEndRule

public void setEndRule(int month,
                       int dayOfMonth,
                       int dayOfWeek,
                       int time,
                       boolean after)
Sets the DST end rule to a weekday before or after a give date within a month, e.g., the first Monday on or after the 8th.
Parameters:
month - The month in which this rule occurs (0-based).
dayOfMonth - A date within that month (1-based).
dayOfWeek - The day of the week on which this rule occurs.
time - The time of that day (number of millis after midnight) when DST ends in local wall time, which is daylight time in this case.
after - If true, this rule selects the first dayOfWeek on or after dayOfMonth. If false, this rule selects the last dayOfWeek on or before dayOfMonth.
Throws:
IllegalArgumentException - the month, dayOfMonth, dayOfWeek, or time parameters are out of range
Since:
1.2

getOffset

public int getOffset(int era,
                     int year,
                     int month,
                     int day,
                     int dayOfWeek,
                     int millis)
Returns the difference in milliseconds between local time and UTC, taking into account both the raw offset and the effect of daylight savings, for the specified date and time. This method assumes that the start and end month are distinct. It also uses a default GregorianCalendar object as its underlying calendar, such as for determining leap years. Do not use the result of this method with a calendar other than a default GregorianCalendar.

Note: In general, clients should use Calendar.get(ZONE_OFFSET) + Calendar.get(DST_OFFSET) instead of calling this method.

Overrides:
getOffset in class TimeZone
Parameters:
era - The era of the given date.
year - The year in the given date.
month - The month in the given date. Month is 0-based. e.g., 0 for January.
day - The day-in-month of the given date.
dayOfWeek - The day-of-week of the given date.
millis - The milliseconds in day in standard local time.
Returns:
The milliseconds to add to UTC to get local time.
Throws:
IllegalArgumentException - the era, month, day, dayOfWeek, or millis parameters are out of range

getRawOffset

public int getRawOffset()
Overrides TimeZone Gets the GMT offset for this time zone.
Overrides:
getRawOffset in class TimeZone
Following copied from class: java.util.TimeZone
Returns:
the unmodified offset to add *to* UTC to get local time.

setRawOffset

public void setRawOffset(int offsetMillis)
Overrides TimeZone Sets the base time zone offset to GMT. This is the offset to add *to* UTC to get local time. Please see TimeZone.setRawOffset for descriptions on the parameter.
Overrides:
setRawOffset in class TimeZone
Following copied from class: java.util.TimeZone
Parameters:
offsetMillis - the given base time zone offset to GMT.

setDSTSavings

public void setDSTSavings(int millisSavedDuringDST)
Sets the amount of time in ms that the clock is advanced during DST.
Parameters:
millisSavedDuringDST - the number of milliseconds the time is advanced with respect to standard time when the daylight savings rules are in effect. A positive number, typically one hour (3600000).
Since:
1.2

getDSTSavings

public int getDSTSavings()
Returns the amount of time in ms that the clock is advanced during DST.
Returns:
the number of milliseconds the time is advanced with respect to standard time when the daylight savings rules are in effect. A positive number, typically one hour (3600000).
Since:
1.2

useDaylightTime

public boolean useDaylightTime()
Overrides TimeZone Queries if this time zone uses Daylight Savings Time.
Overrides:
useDaylightTime in class TimeZone
Following copied from class: java.util.TimeZone
Returns:
true if this time zone uses daylight savings time, false, otherwise.

inDaylightTime

public boolean inDaylightTime(Date date)
Overrides TimeZone Queries if the given date is in Daylight Savings Time.
Overrides:
inDaylightTime in class TimeZone
Following copied from class: java.util.TimeZone
Parameters:
date - the given Date.
Returns:
true if the given date is in daylight savings time, false, otherwise.

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class TimeZone
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

hashCode

public int hashCode()
Override hashCode. Generates the hash code for the SimpleDateFormat object
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compares the equality of two SimpleTimeZone objects.
Overrides:
equals in class Object
Parameters:
obj - The SimpleTimeZone object to be compared with.
Returns:
True if the given obj is the same as this SimpleTimeZone object; false otherwise.

hasSameRules

public boolean hasSameRules(TimeZone other)
Return true if this zone has the same rules and offset as another zone.
Overrides:
hasSameRules in class TimeZone
Parameters:
other - the TimeZone object to be compared with
Returns:
true if the given zone has the same rules and offset as this one
Since:
1.2

toString

public String toString()
Return a string representation of this time zone.
Overrides:
toString in class Object
Returns:
a string representation of this time zone.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortedMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Interface SortedMap

All Superinterfaces:
Map
All Known Implementing Classes:
TreeMap
public interface SortedMap
extends Map

A map that further guarantees that it will be in ascending key order, sorted according to the natural ordering of its keys (see the Comparable interface), or by a comparator provided at sorted map creation time. This order is reflected when iterating over the sorted map's collection views (returned by the entrySet, keySet and values methods). Several additional operations are provided to take advantage of the ordering. (This interface is the map analogue of the SortedSet interface.)

All keys inserted into a sorted map must implement the Comparable interface (or be accepted by the specified comparator). Furthermore, all such keys must be mutually comparable: k1.compareTo(k2) (or comparator.compare(k1, k2)) must not throw a ClassCastException for any elements k1 and k2 in the sorted map. Attempts to violate this restriction will cause the offending method or constructor invocation to throw a ClassCastException.

Note that the ordering maintained by a sorted map (whether or not an explicit comparator is provided) must be consistent with equals if the sorted map is to correctly implement the Map interface. (See the Comparable interface or Comparator interface for a precise definition of consistent with equals.) This is so because the Map interface is defined in terms of the equals operation, but a sorted map performs all key comparisons using its compareTo (or compare) method, so two keys that are deemed equal by this method are, from the standpoint of the sorted map, equal. The behavior of a tree map is well-defined even if its ordering is inconsistent with equals; it just fails to obey the general contract of the Map interface.

All general-purpose sorted map implementation classes should provide four "standard" constructors: 1) A void (no arguments) constructor, which creates an empty sorted map sorted according to the natural order of its keys. 2) A constructor with a single argument of type Comparator, which creates an empty sorted map sorted according to the specified comparator. 3) A constructor with a single argument of type Map, which creates a new map with the same key-value mappings as its argument, sorted according to the keys' natural ordering. 4) A constructor with a single argument of type sorted map, which creates a new sorted map with the same key-value mappings and the same ordering as the input sorted map. There is no way to enforce this recommendation (as interfaces cannot contain constructors) but the SDK implementation (TreeMap) complies.

Since:
1.2
See Also:
Map, TreeMap, SortedSet, Comparator, Comparable, Collection, ClassCastException

Inner classes inherited from class java.util.Map
Map.Entry
Method Summary
Comparator | comparator() Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.
Object | firstKey() Returns the first (lowest) key currently in this sorted map.
SortedMap | headMap(Object toKey) Returns a view of the portion of this sorted map whose keys are strictly less than toKey.
Object | lastKey() Returns the last (highest) key currently in this sorted map.
SortedMap | subMap(Object fromKey, Object toKey) Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | tailMap(Object fromKey) Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values

Method Detail

comparator

public Comparator comparator()
Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.
Returns:
the comparator associated with this sorted map, or null if it uses its keys' natural ordering.

subMap

public SortedMap subMap(Object fromKey,
                        Object toKey)
Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive. (If fromKey and toKey are equal, the returned sorted map is empty.) The returned sorted map is backed by this sorted map, so changes in the returned sorted map are reflected in this sorted map, and vice-versa. The returned Map supports all optional map operations that this sorted map supports.

The map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key outside the specified range.

Note: this method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the key type allows for calculation of the successor a given key, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that m is a map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are between low and high, inclusive:

    Map sub = m.subMap(low, high+"\0");
A similarly technique can be used to generate an open range (which contains neither endpoint). The following idiom obtains a view containing all of the key-value mappings in m whose keys are between low and high, exclusive:
    Map sub = m.subMap(low+"\0", high);
Parameters:
fromKey - low endpoint (inclusive) of the subMap.
toKey - high endpoint (exclusive) of the subMap.
Returns:
a view of the specified range within this sorted map.
Throws:
ClassCastException - if fromKey and toKey cannot be compared to one another using this map's comparator (or, if the map has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if fromKey or toKey cannot be compared to keys currently in the map.
IllegalArgumentException - if fromKey is greater than toKey; or if this map is itself a subMap, headMap, or tailMap, and fromKey or toKey are not within the specified range of the subMap, headMap, or tailMap.
NullPointerException - if fromKey or toKey is null and this sorted map does not tolerate null keys.

headMap

public SortedMap headMap(Object toKey)
Returns a view of the portion of this sorted map whose keys are strictly less than toKey. The returned sorted map is backed by this sorted map, so changes in the returned sorted map are reflected in this sorted map, and vice-versa. The returned map supports all optional map operations that this sorted map supports.

The map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key outside the specified range.

Note: this method always returns a view that does not contain its (high) endpoint. If you need a view that does contain this endpoint, and the key type allows for calculation of the successor a given key, merely request a headMap bounded by successor(highEndpoint). For example, suppose that suppose that m is a map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are less than or equal to high:

    Map head = m.headMap(high+"\0");
Parameters:
toKey - high endpoint (exclusive) of the subMap.
Returns:
a view of the specified initial range of this sorted map.
Throws:
ClassCastException - if toKey is not compatible with this map's comparator (or, if the map has no comparator, if toKey does not implement Comparable). Implementations may, but are not required to, throw this exception if toKey cannot be compared to keys currently in the map.
IllegalArgumentException - if this map is itself a subMap, headMap, or tailMap, and toKey is not within the specified range of the subMap, headMap, or tailMap.
NullPointerException - if toKey is null and this sorted map does not tolerate null keys.

tailMap

public SortedMap tailMap(Object fromKey)
Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey. The returned sorted map is backed by this sorted map, so changes in the returned sorted map are reflected in this sorted map, and vice-versa. The returned map supports all optional map operations that this sorted map supports.

The map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key outside the specified range.

Note: this method always returns a view that contains its (low) endpoint. If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailMap bounded by successor(lowEndpoint). For example, suppose that suppose that m is a map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are strictly greater than low:

    Map tail = m.tailMap(low+"\0");
Parameters:
fromKey - low endpoint (inclusive) of the tailMap.
Returns:
a view of the specified final range of this sorted map.
Throws:
ClassCastException - if fromKey is not compatible with this map's comparator (or, if the map has no comparator, if fromKey does not implement Comparable). Implementations may, but are not required to, throw this exception if fromKey cannot be compared to keys currently in the map.
IllegalArgumentException - if this map is itself a subMap, headMap, or tailMap, and fromKey is not within the specified range of the subMap, headMap, or tailMap.
NullPointerException - if fromKey is null and this sorted map does not tolerate null keys.

firstKey

public Object firstKey()
Returns the first (lowest) key currently in this sorted map.
Returns:
the first (lowest) key currently in this sorted map.
Throws:
NoSuchElementException - if this map is empty.

lastKey

public Object lastKey()
Returns the last (highest) key currently in this sorted map.
Returns:
the last (highest) key currently in this sorted map.
Throws:
NoSuchElementException - if this map is empty.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortedSet

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Interface SortedSet

All Superinterfaces:
Collection, Set
All Known Implementing Classes:
TreeSet
public interface SortedSet
extends Set

A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at sorted set creation time. Several additional operations are provided to take advantage of the ordering. (This interface is the set analogue of SortedMap.)

All elements inserted into an sorted set must implement the Comparable interface (or be accepted by the specified Comparator). Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) (or comparator.compare(e1, e2)) must not throw a ClassCastException for any elements e1 and e2 in the sorted set. Attempts to violate this restriction will cause the offending method or constructor invocation to throw a ClassCastException.

Note that the ordering maintained by a sorted set (whether or not an explicit comparator is provided) must be consistent with equals if the sorted set is to correctly implement the Set interface. (See the Comparable interface or Comparator interface for a precise definition of consistent with equals.) This is so because the Set interface is defined in terms of the equals operation, but a sorted set performs all element comparisons using its compareTo (or compare) method, so two elements that are deemed equal by this method are, from the standpoint of the sorted set, equal. The behavior of a sorted set is well-defined even if its ordering is inconsistent with equals; it just fails to obey the general contract of the Set interface.

All general-purpose sorted set implementation classes should provide four "standard" constructors: 1) A void (no arguments) constructor, which creates an empty sorted set sorted according to the natural order of its elements. 2) A constructor with a single argument of type Comparator, which creates an empty sorted set sorted according to the specified comparator. 3) A constructor with a single argument of type Collection, which creates a new sorted set with the same elements as its argument, sorted according to the elements' natural ordering. 4) A constructor with a single argument of type SortedSet, which creates a new sorted set with the same elements and the same ordering as the input sorted set. There is no way to enforce this recommendation (as interfaces cannot contain constructors) but the SDK implementation (the TreeSet class) complies.

Since:
1.2
See Also:
Set, TreeSet, SortedMap, Collection, Comparable, Comparator, ClassCastException

Method Summary
Comparator | comparator() Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
Object | first() Returns the first (lowest) element currently in this sorted set.
SortedSet | headSet(Object toElement) Returns a view of the portion of this sorted set whose elements are strictly less than toElement.
Object | last() Returns the last (highest) element currently in this sorted set.
SortedSet | subSet(Object fromElement, Object toElement) Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | tailSet(Object fromElement) Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray

Method Detail

comparator

public Comparator comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
Returns:
the comparator associated with this sorted set, or null if it uses its elements' natural ordering.

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned sorted set is empty.) The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations that this sorted set supports.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.

Note: this method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the element type allows for calculation of the successor a given value, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s from low to high, inclusive:

 SortedSet sub = s.subSet(low, high+"\0");
A similar technique can be used to generate an open range (which contains neither endpoint). The following idiom obtains a view containing all of the Strings in s from low to high, exclusive:
 SortedSet sub = s.subSet(low+"\0", high);
Parameters:
fromElement - low endpoint (inclusive) of the subSet.
toElement - high endpoint (exclusive) of the subSet.
Returns:
a view of the specified range within this sorted set.
Throws:
ClassCastException - if fromElement and toElement cannot be compared to one another using this set's comparator (or, if the set has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if fromElement or toElement cannot be compared to elements currently in the set.
IllegalArgumentException - if fromElement is greater than toElement; or if this set is itself a subSet, headSet, or tailSet, and fromElement or toElement are not within the specified range of the subSet, headSet, or tailSet.
NullPointerException - if fromElement or toElement is null and this sorted set does not tolerate null elements.

headSet

public SortedSet headSet(Object toElement)
Returns a view of the portion of this sorted set whose elements are strictly less than toElement. The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.

Note: this method always returns a view that does not contain its (high) endpoint. If you need a view that does contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a headSet bounded by successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are less than or equal to high:

    SortedSet head = s.headSet(high+"\0");
Parameters:
toElement - high endpoint (exclusive) of the headSet.
Returns:
a view of the specified initial range of this sorted set.
Throws:
ClassCastException - if toElement is not compatible with this set's comparator (or, if the set has no comparator, if toElement does not implement Comparable). Implementations may, but are not required to, throw this exception if toElement cannot be compared to elements currently in the set.
NullPointerException - if toElement is null and this sorted set does not tolerate null elements.
IllegalArgumentException - if this set is itself a subSet, headSet, or tailSet, and toElement is not within the specified range of the subSet, headSet, or tailSet.

tailSet

public SortedSet tailSet(Object fromElement)
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement. The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa. The returned sorted set supports all optional set operations.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert a element outside the specified range.

Note: this method always returns a view that contains its (low) endpoint. If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailSet bounded by successor(lowEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are strictly greater than low:

    SortedSet tail = s.tailSet(low+"\0");
Parameters:
fromElement - low endpoint (inclusive) of the tailSet.
Returns:
a view of the specified final range of this sorted set.
Throws:
ClassCastException - if fromElement is not compatible with this set's comparator (or, if the set has no comparator, if fromElement does not implement Comparable). Implementations may, but are not required to, throw this exception if fromElement cannot be compared to elements currently in the set.
NullPointerException - if fromElement is null and this sorted set does not tolerate null elements.
IllegalArgumentException - if this set is itself a subSet, headSet, or tailSet, and fromElement is not within the specified range of the subSet, headSet, or tailSet.

first

public Object first()
Returns the first (lowest) element currently in this sorted set.
Returns:
the first (lowest) element currently in this sorted set.
Throws:
NoSuchElementException - sorted set is empty.

last

public Object last()
Returns the last (highest) element currently in this sorted set.
Returns:
the last (highest) element currently in this sorted set.
Throws:
NoSuchElementException - sorted set is empty.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Stack

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Stack

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--java.util.Stack
All Implemented Interfaces:
Cloneable, Collection, List, Serializable
public class Stack
extends Vector

The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top.

When a stack is first created, it contains no items.

Since:
JDK1.0
See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
Fields inherited from class java.util.AbstractList
modCount
Constructor Summary
Stack()
Creates an empty Stack.
Method Summary
boolean | empty() Tests if this stack is empty.
Object | peek() Looks at the object at the top of this stack without removing it from the stack.
Object | pop() Removes the object at the top of this stack and returns that object as the value of this function.
Object | push(Object item) Pushes an item onto the top of this stack.
int | search(Object o) Returns the 1-based position where an object is on this stack.
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
iterator, listIterator, listIterator

Constructor Detail

Stack

public Stack()
Creates an empty Stack.
Method Detail

push

public Object push(Object item)
Pushes an item onto the top of this stack. This has exactly the same effect as:
 addElement(item)
Parameters:
item - the item to be pushed onto this stack.
Returns:
the item argument.
See Also:
Vector.addElement(java.lang.Object)

pop

public Object pop()
Removes the object at the top of this stack and returns that object as the value of this function.
Returns:
The object at the top of this stack (the last item of the Vector object).
Throws:
EmptyStackException - if this stack is empty.

peek

public Object peek()
Looks at the object at the top of this stack without removing it from the stack.
Returns:
the object at the top of this stack (the last item of the Vector object).
Throws:
EmptyStackException - if this stack is empty.

empty

public boolean empty()
Tests if this stack is empty.
Returns:
true if and only if this stack contains no items; false otherwise.

search

public int search(Object o)
Returns the 1-based position where an object is on this stack. If the object o occurs as an item in this stack, this method returns the distance from the top of the stack of the occurrence nearest the top of the stack; the topmost item on the stack is considered to be at distance 1. The equals method is used to compare o to the items in this stack.
Parameters:
o - the desired object.
Returns:
the 1-based position from the top of the stack where the object is located; the return value -1 indicates that the object is not on the stack.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class StringTokenizer

java.lang.Object
  |
  +--java.util.StringTokenizer
All Implemented Interfaces:
Enumeration
public class StringTokenizer
extends Object
implements Enumeration

The string tokenizer class allows an application to break a string into tokens. The tokenization method is much simpler than the one used by the StreamTokenizer class. The StringTokenizer methods do not distinguish among identifiers, numbers, and quoted strings, nor do they recognize and skip comments.

The set of delimiters (the characters that separate tokens) may be specified either at creation time or on a per-token basis.

An instance of StringTokenizer behaves in one of two ways, depending on whether it was created with the returnDelims flag having the value true or false:

  • If the flag is false, delimiter characters serve to separate tokens. A token is a maximal sequence of consecutive characters that are not delimiters.
  • If the flag is true, delimiter characters are themselves considered to be tokens. A token is thus either one delimiter character, or a maximal sequence of consecutive characters that are not delimiters.

A StringTokenizer object internally maintains a current position within the string to be tokenized. Some operations advance this current position past the characters processed.

A token is returned by taking a substring of the string that was used to create the StringTokenizer object.

The following is one example of the use of the tokenizer. The code:

     StringTokenizer st = new StringTokenizer("this is a test");
     while (st.hasMoreTokens()) {
         println(st.nextToken());
     }

prints the following output:

     this
     is
     a
     test

Since:
JDK1.0
See Also:
StreamTokenizer

Constructor Summary
StringTokenizer(String str)
Constructs a string tokenizer for the specified string.
StringTokenizer(String str, String delim)
Constructs a string tokenizer for the specified string.
StringTokenizer(String str, String delim, boolean returnDelims)
Constructs a string tokenizer for the specified string.
Method Summary
int | countTokens() Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
boolean | hasMoreElements() Returns the same value as the hasMoreTokens method.
boolean | hasMoreTokens() Tests if there are more tokens available from this tokenizer's string.
Object | nextElement() Returns the same value as the nextToken method, except that its declared return value is Object rather than String.
String | nextToken() Returns the next token from this string tokenizer.
String | nextToken(String delim) Returns the next token in this string tokenizer's string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringTokenizer

public StringTokenizer(String str,
                       String delim,
                       boolean returnDelims)
Constructs a string tokenizer for the specified string. All characters in the delim argument are the delimiters for separating tokens.

If the returnDelims flag is true, then the delimiter characters are also returned as tokens. Each delimiter is returned as a string of length one. If the flag is false, the delimiter characters are skipped and only serve as separators between tokens.

Parameters:
str - a string to be parsed.
delim - the delimiters.
returnDelims - flag indicating whether to return the delimiters as tokens.

StringTokenizer

public StringTokenizer(String str,
                       String delim)
Constructs a string tokenizer for the specified string. The characters in the delim argument are the delimiters for separating tokens. Delimiter characters themselves will not be treated as tokens.
Parameters:
str - a string to be parsed.
delim - the delimiters.

StringTokenizer

public StringTokenizer(String str)
Constructs a string tokenizer for the specified string. The tokenizer uses the default delimiter set, which is " \t\n\r\f": the space character, the tab character, the newline character, the carriage-return character, and the form-feed character. Delimiter characters themselves will not be treated as tokens.
Parameters:
str - a string to be parsed.
Method Detail

hasMoreTokens

public boolean hasMoreTokens()
Tests if there are more tokens available from this tokenizer's string. If this method returns true, then a subsequent call to nextToken with no argument will successfully return a token.
Returns:
true if and only if there is at least one token in the string after the current position; false otherwise.

nextToken

public String nextToken()
Returns the next token from this string tokenizer.
Returns:
the next token from this string tokenizer.
Throws:
NoSuchElementException - if there are no more tokens in this tokenizer's string.

nextToken

public String nextToken(String delim)
Returns the next token in this string tokenizer's string. First, the set of characters considered to be delimiters by this StringTokenizer object is changed to be the characters in the string delim. Then the next token in the string after the current position is returned. The current position is advanced beyond the recognized token. The new delimiter set remains the default after this call.
Parameters:
delim - the new delimiters.
Returns:
the next token, after switching to the new delimiter set.
Throws:
NoSuchElementException - if there are no more tokens in this tokenizer's string.

hasMoreElements

public boolean hasMoreElements()
Returns the same value as the hasMoreTokens method. It exists so that this class can implement the Enumeration interface.
Specified by:
hasMoreElements in interface Enumeration
Returns:
true if there are more tokens; false otherwise.
See Also:
Enumeration, hasMoreTokens()

nextElement

public Object nextElement()
Returns the same value as the nextToken method, except that its declared return value is Object rather than String. It exists so that this class can implement the Enumeration interface.
Specified by:
nextElement in interface Enumeration
Returns:
the next token in the string.
Throws:
NoSuchElementException - if there are no more tokens in this tokenizer's string.
See Also:
Enumeration, nextToken()

countTokens

public int countTokens()
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception. The current position is not advanced.
Returns:
the number of tokens remaining in the string using the current delimiter set.
See Also:
nextToken()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Timer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Timer

java.lang.Object
  |
  +--java.util.Timer
public class Timer
extends Object

A facility for threads to schedule tasks for future execution in a background thread. Tasks may be scheduled for one-time execution, or for repeated execution at regular intervals.

Corresponding to each Timer object is a single background thread that is used to execute all of the timer's tasks, sequentially. Timer tasks should complete quickly. If a timer task takes excessive time to complete, it "hogs" the timer's task execution thread. This can, in turn, delay the execution of subsequent tasks, which may "bunch up" and execute in rapid succession when (and if) the offending task finally completes.

After the last live reference to a Timer object goes away and all outstanding tasks have completed execution, the timer's task execution thread terminates gracefully (and becomes subject to garbage collection). However, this can take arbitrarily long to occur. By default, the task execution thread does not run as a daemon thread, so it is capable of keeping an application from terminating. If a caller wants to terminate a timer's task execution thread rapidly, the caller should invoke the the timer's cancel method.

If the timer's task execution thread terminates unexpectedly, for example, because its stop method is invoked, any further attempt to schedule a task on the timer will result in an IllegalStateException, as if the timer's cancel method had been invoked.

This class is thread-safe: multiple threads can share a single Timer object without the need for external synchronization.

This class does not offer real-time guarantees: it schedules tasks using the Object.wait(long) method.

Implementation note: This class scales to large numbers of concurrently scheduled tasks (thousands should present no problem). Internally, it uses a binary heap to represent its task queue, so the cost to schedule a task is O(log n), where n is the number of concurrently scheduled tasks.

Since:
1.3
See Also:
TimerTask, Object.wait(long)

Constructor Summary
Timer()
Creates a new timer.
Timer(boolean isDaemon)
Creates a new timer whose associated thread may be specified to run as a daemon.
Method Summary
void | cancel() Terminates this timer, discarding any currently scheduled tasks.
void | schedule(TimerTask task, Date time) Schedules the specified task for execution at the specified time.
void | schedule(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-delay execution, beginning at the specified time.
void | schedule(TimerTask task, long delay) Schedules the specified task for execution after the specified delay.
void | schedule(TimerTask task, long delay, long period) Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay.
void | scheduleAtFixedRate(TimerTask task, Date firstTime, long period) Schedules the specified task for repeated fixed-rate execution, beginning at the specified time.
void | scheduleAtFixedRate(TimerTask task, long delay, long period) Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Timer

public Timer()
Creates a new timer. The associated thread does not run as a daemon.
See Also:
Thread, cancel()

Timer

public Timer(boolean isDaemon)
Creates a new timer whose associated thread may be specified to run as a daemon. A deamon thread is called for if the timer will be used to schedule repeating "maintenance activities", which must be performed as long as the application is running, but should not prolong the lifetime of the application.
Parameters:
isDaemon - true if the associated thread should run as a daemon.
See Also:
Thread, cancel()
Method Detail

schedule

public void schedule(TimerTask task,
                     long delay)
Schedules the specified task for execution after the specified delay.
Parameters:
task - task to be scheduled.
delay - delay in milliseconds before task is to be executed.
Throws:
IllegalArgumentException - if delay is negative, or delay + System.currentTimeMillis() is negative.
IllegalStateException - if task was already scheduled or cancelled, or timer was cancelled.

schedule

public void schedule(TimerTask task,
                     Date time)
Schedules the specified task for execution at the specified time. If the time is in the past, the task is scheduled for immediate execution.
Parameters:
task - task to be scheduled.
time - time at which task is to be executed.
Throws:
IllegalArgumentException - if time.getTime() is negative.
IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer thread terminated.

schedule

public void schedule(TimerTask task,
                     long delay,
                     long period)
Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay. Subsequent executions take place at approximately regular intervals separated by the specified period.

In fixed-delay execution, each execution is scheduled relative to the actual execution time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions will be delayed as well. In the long run, the frequency of execution will generally be slightly lower than the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

Fixed-delay execution is appropriate for recurring activities that require "smoothness." In other words, it is appropriate for activities where it is more important to keep the frequency accurate in the short run than in the long run. This includes most animation tasks, such as blinking a cursor at regular intervals. It also includes tasks wherein regular activity is performed in response to human input, such as automatically repeating a character as long as a key is held down.

Parameters:
task - task to be scheduled.
delay - delay in milliseconds before task is to be executed.
period - time in milliseconds between successive task executions.
Throws:
IllegalArgumentException - if delay is negative, or delay + System.currentTimeMillis() is negative.
IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer thread terminated.

schedule

public void schedule(TimerTask task,
                     Date firstTime,
                     long period)
Schedules the specified task for repeated fixed-delay execution, beginning at the specified time. Subsequent executions take place at approximately regular intervals, separated by the specified period.

In fixed-delay execution, each execution is scheduled relative to the actual execution time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions will be delayed as well. In the long run, the frequency of execution will generally be slightly lower than the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

Fixed-delay execution is appropriate for recurring activities that require "smoothness." In other words, it is appropriate for activities where it is more important to keep the frequency accurate in the short run than in the long run. This includes most animation tasks, such as blinking a cursor at regular intervals. It also includes tasks wherein regular activity is performed in response to human input, such as automatically repeating a character as long as a key is held down.

Parameters:
task - task to be scheduled.
firstTime - First time at which task is to be executed.
period - time in milliseconds between successive task executions.
Throws:
IllegalArgumentException - if time.getTime() is negative.
IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer thread terminated.

scheduleAtFixedRate

public void scheduleAtFixedRate(TimerTask task,
                                long delay,
                                long period)
Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay. Subsequent executions take place at approximately regular intervals, separated by the specified period.

In fixed-rate execution, each execution is scheduled relative to the scheduled execution time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to "catch up." In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

Fixed-rate execution is appropriate for recurring activities that are sensitive to absolute time, such as ringing a chime every hour on the hour, or running scheduled maintenance every day at a particular time. It is also appropriate for for recurring activities where the total time to perform a fixed number of executions is important, such as a countdown timer that ticks once every second for ten seconds. Finally, fixed-rate execution is appropriate for scheduling multiple repeating timer tasks that must remain synchronized with respect to one another.

Parameters:
task - task to be scheduled.
delay - delay in milliseconds before task is to be executed.
period - time in milliseconds between successive task executions.
Throws:
IllegalArgumentException - if delay is negative, or delay + System.currentTimeMillis() is negative.
IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer thread terminated.

scheduleAtFixedRate

public void scheduleAtFixedRate(TimerTask task,
                                Date firstTime,
                                long period)
Schedules the specified task for repeated fixed-rate execution, beginning at the specified time. Subsequent executions take place at approximately regular intervals, separated by the specified period.

In fixed-rate execution, each execution is scheduled relative to the scheduled execution time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to "catch up." In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

Fixed-rate execution is appropriate for recurring activities that are sensitive to absolute time, such as ringing a chime every hour on the hour, or running scheduled maintenance every day at a particular time. It is also appropriate for for recurring activities where the total time to perform a fixed number of executions is important, such as a countdown timer that ticks once every second for ten seconds. Finally, fixed-rate execution is appropriate for scheduling multiple repeating timer tasks that must remain synchronized with respect to one another.

Parameters:
task - task to be scheduled.
firstTime - First time at which task is to be executed.
period - time in milliseconds between successive task executions.
Throws:
IllegalArgumentException - if time.getTime() is negative.
IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer thread terminated.

cancel

public void cancel()
Terminates this timer, discarding any currently scheduled tasks. Does not interfere with a currently executing task (if it exists). Once a timer has been terminated, its execution thread terminates gracefully, and no more tasks may be scheduled on it.

Note that calling this method from within the run method of a timer task that was invoked by this timer absolutely guarantees that the ongoing task execution is the last task execution that will ever be performed by this timer.

This method may be called repeatedly; the second and subsequent calls have no effect.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TimerTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class TimerTask

java.lang.Object
  |
  +--java.util.TimerTask
All Implemented Interfaces:
Runnable
public abstract class TimerTask
extends Object
implements Runnable

A task that can be scheduled for one-time or repeated execution by a Timer.

Since:
1.3
See Also:
Timer

Constructor Summary
protected TimerTask()
Creates a new timer task.
Method Summary
boolean | cancel() Cancels this timer task.
abstract void | run() The action to be performed by this timer task.
long | scheduledExecutionTime() Returns the scheduled execution time of the most recent actual execution of this task.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TimerTask

protected TimerTask()
Creates a new timer task.
Method Detail

run

public abstract void run()
The action to be performed by this timer task.
Specified by:
run in interface Runnable
Following copied from interface: java.lang.Runnable
See Also:
Thread.run()

cancel

public boolean cancel()
Cancels this timer task. If the task has been scheduled for one-time execution and has not yet run, or has not yet been scheduled, it will never run. If the task has been scheduled for repeated execution, it will never run again. (If the task is running when this call occurs, the task will run to completion, but will never run again.)

Note that calling this method from within the run method of a repeating timer task absolutely guarantees that the timer task will not run again.

This method may be called repeatedly; the second and subsequent calls have no effect.

Returns:
true if this task is scheduled for one-time execution and has not yet run, or this task is scheduled for repeated execution. Returns false if the task was scheduled for one-time execution and has already run, or if the task was never scheduled, or if the task was already cancelled. (Loosely speaking, this method returns true if it prevents one or more scheduled executions from taking place.)

scheduledExecutionTime

public long scheduledExecutionTime()
Returns the scheduled execution time of the most recent actual execution of this task. (If this method is invoked while task execution is in progress, the return value is the scheduled execution time of the ongoing task execution.)

This method is typically invoked from within a task's run method, to determine whether the current execution of the task is sufficiently timely to warrant performing the scheduled activity:

   public void run() {
       if (System.currentTimeMillis() - scheduledExecutionTime() >=
           MAX_TARDINESS)
               return;  // Too late; skip this execution.
       // Perform the task
   }
This method is typically not used in conjunction with fixed-delay execution repeating tasks, as their scheduled execution times are allowed to drift over time, and so are not terribly significant.
Returns:
the time at which the most recent execution of this task was scheduled to occur, in the format returned by Date.getTime(). The return value is undefined if the task has yet to commence its first execution.
See Also:
Date.getTime()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TimeZone

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class TimeZone

java.lang.Object
  |
  +--java.util.TimeZone
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
SimpleTimeZone
public abstract class TimeZone
extends Object
implements Serializable, Cloneable

TimeZone represents a time zone offset, and also figures out daylight savings.

Typically, you get a TimeZone using getDefault which creates a TimeZone based on the time zone where the program is running. For example, for a program running in Japan, getDefault creates a TimeZone object based on Japanese Standard Time.

You can also get a TimeZone using getTimeZone along with a time zone ID. For instance, the time zone ID for the U.S. Pacific Time zone is "America/Los_Angeles". So, you can get a U.S. Pacific Time TimeZone object with:

 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
You can use getAvailableIDs method to iterate through all the supported time zone IDs. You can then choose a supported ID to get a TimeZone. If the time zone you want is not represented by one of the supported IDs, then you can create a custom time zone ID with the following syntax:
 GMT[+|-]hh[[:]mm]
For example, you might specify GMT+14:00 as a custom time zone ID. The TimeZone that is returned when you specify a custom time zone ID does not include daylight savings time.

For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them.

Since:
JDK1.1
See Also:
Calendar, GregorianCalendar, SimpleTimeZone, Serialized Form

Field Summary
static int | LONG A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
static int | SHORT A style specifier for getDisplayName() indicating a short name, such as "PST."
Constructor Summary
TimeZone()
Sole constructor.
Method Summary
Object | clone() Overrides Cloneable
static String[] | getAvailableIDs() Gets all the available IDs supported.
static String[] | getAvailableIDs(int rawOffset) Gets the available IDs according to the given time zone offset.
static TimeZone | getDefault() Gets the default TimeZone for this host.
String | getDisplayName() Returns a name of this time zone suitable for presentation to the user in the default locale.
String | getDisplayName(boolean daylight, int style) Returns a name of this time zone suitable for presentation to the user in the default locale.
String | getDisplayName(boolean daylight, int style, Locale locale) Returns a name of this time zone suitable for presentation to the user in the specified locale.
String | getDisplayName(Locale locale) Returns a name of this time zone suitable for presentation to the user in the specified locale.
String | getID() Gets the ID of this time zone.
abstract int | getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) Gets the time zone offset, for current date, modified in case of daylight savings.
abstract int | getRawOffset() Gets unmodified offset, NOT modified in case of daylight savings.
static TimeZone | getTimeZone(String ID) Gets the TimeZone for the given ID.
boolean | hasSameRules(TimeZone other) Returns true if this zone has the same rule and offset as another zone.
abstract boolean | inDaylightTime(Date date) Queries if the given date is in daylight savings time in this time zone.
static void | setDefault(TimeZone zone) Sets the TimeZone that is returned by the getDefault method.
void | setID(String ID) Sets the time zone ID.
abstract void | setRawOffset(int offsetMillis) Sets the base time zone offset to GMT.
abstract boolean | useDaylightTime() Queries if this time zone uses daylight savings time.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SHORT

public static final int SHORT
A style specifier for getDisplayName() indicating a short name, such as "PST."
See Also:
LONG
Since:
1.2

LONG

public static final int LONG
A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
See Also:
SHORT
Since:
1.2
Constructor Detail

TimeZone

public TimeZone()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Method Detail

getOffset

public abstract int getOffset(int era,
                              int year,
                              int month,
                              int day,
                              int dayOfWeek,
                              int milliseconds)
Gets the time zone offset, for current date, modified in case of daylight savings. This is the offset to add *to* UTC to get local time.
Parameters:
era - the era of the given date.
year - the year in the given date.
month - the month in the given date. Month is 0-based. e.g., 0 for January.
day - the day-in-month of the given date.
dayOfWeek - the day-of-week of the given date.
milliseconds - the millis in day in standard local time.
Returns:
the offset to add *to* GMT to get local time.

setRawOffset

public abstract void setRawOffset(int offsetMillis)
Sets the base time zone offset to GMT. This is the offset to add *to* UTC to get local time.
Parameters:
offsetMillis - the given base time zone offset to GMT.

getRawOffset

public abstract int getRawOffset()
Gets unmodified offset, NOT modified in case of daylight savings. This is the offset to add *to* UTC to get local time.
Returns:
the unmodified offset to add *to* UTC to get local time.

getID

public String getID()
Gets the ID of this time zone.
Returns:
the ID of this time zone.

setID

public void setID(String ID)
Sets the time zone ID. This does not change any other data in the time zone object.
Parameters:
ID - the new time zone ID.

getDisplayName

public final String getDisplayName()
Returns a name of this time zone suitable for presentation to the user in the default locale. This method returns the long name, not including daylight savings. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
Returns:
the human-readable name of this time zone in the default locale.
Since:
1.2

getDisplayName

public final String getDisplayName(Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale. This method returns the long name, not including daylight savings. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
Parameters:
locale - the locale in which to supply the display name.
Returns:
the human-readable name of this time zone in the given locale or in the default locale if the given locale is not recognized.
Since:
1.2

getDisplayName

public final String getDisplayName(boolean daylight,
                                   int style)
Returns a name of this time zone suitable for presentation to the user in the default locale. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
Parameters:
daylight - if true, return the daylight savings name.
style - either LONG or SHORT
Returns:
the human-readable name of this time zone in the default locale.
Since:
1.2

getDisplayName

public String getDisplayName(boolean daylight,
                             int style,
                             Locale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
Parameters:
daylight - if true, return the daylight savings name.
style - either LONG or SHORT
locale - the locale in which to supply the display name.
Returns:
the human-readable name of this time zone in the given locale or in the default locale if the given locale is not recognized.
Throws:
IllegalArgumentException - style is invalid.
Since:
1.2

useDaylightTime

public abstract boolean useDaylightTime()
Queries if this time zone uses daylight savings time.
Returns:
true if this time zone uses daylight savings time, false, otherwise.

inDaylightTime

public abstract boolean inDaylightTime(Date date)
Queries if the given date is in daylight savings time in this time zone.
Parameters:
date - the given Date.
Returns:
true if the given date is in daylight savings time, false, otherwise.

getTimeZone

public static TimeZone getTimeZone(String ID)
Gets the TimeZone for the given ID.
Parameters:
ID - the ID for a TimeZone, either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". Note that the support of abbreviations is for JDK 1.1.x compatibility only and full names should be used.
Returns:
the specified TimeZone, or the GMT zone if the given ID cannot be understood.

getAvailableIDs

public static String[] getAvailableIDs(int rawOffset)
Gets the available IDs according to the given time zone offset.
Parameters:
rawOffset - the given time zone GMT offset.
Returns:
an array of IDs, where the time zone for that ID has the specified GMT offset. For example, "America/Phoenix" and "America/Denver" both have GMT-07:00, but differ in daylight savings behavior.

getAvailableIDs

public static String[] getAvailableIDs()
Gets all the available IDs supported.
Returns:
an array of IDs.

getDefault

public static TimeZone getDefault()
Gets the default TimeZone for this host. The source of the default TimeZone may vary with implementation.
Returns:
a default TimeZone.

setDefault

public static void setDefault(TimeZone zone)
Sets the TimeZone that is returned by the getDefault method. If zone is null, reset the default to the value it had originally when the VM first started.
Parameters:
zone - the new default time zone

hasSameRules

public boolean hasSameRules(TimeZone other)
Returns true if this zone has the same rule and offset as another zone. That is, if this zone differs only in ID, if at all. Returns false if the other zone is null.
Parameters:
other - the TimeZone object to be compared with
Returns:
true if the other zone is not null and is the same as this one, with the possible exception of the ID
Since:
1.2

clone

public Object clone()
Overrides Cloneable
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TooManyListenersException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Class TooManyListenersException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.util.TooManyListenersException
All Implemented Interfaces:
Serializable
public class TooManyListenersException
extends Exception

The TooManyListenersException Exception is used as part of the Java Event model to annotate and implement a unicast special case of a multicast Event Source.

The presence of a "throws TooManyListenersException" clause on any given concrete implementation of the normally multicast "void addXyzEventListener" event listener registration pattern is used to annotate that interface as implementing a unicast Listener special case, that is, that one and only one Listener may be registered on the particular event listener source concurrently.

Since:
JDK1.1
See Also:
EventObject, EventListener, Serialized Form

Constructor Summary
TooManyListenersException()
Constructs a TooManyListenersException with no detail message.
TooManyListenersException(String s)
Constructs a TooManyListenersException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TooManyListenersException

public TooManyListenersException()
Constructs a TooManyListenersException with no detail message. A detail message is a String that describes this particular exception.

TooManyListenersException

public TooManyListenersException(String s)
Constructs a TooManyListenersException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
s - the detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TreeMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class TreeMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.TreeMap
All Implemented Interfaces:
Cloneable, Map, Serializable, SortedMap
public class TreeMap
extends AbstractMap
implements SortedMap, Cloneable, Serializable

Red-Black tree based implementation of the SortedMap interface. This class guarantees that the map will be in ascending key order, sorted according to the natural order for the key's class (see Comparable), or by the comparator provided at creation time, depending on which constructor is used.

This implementation provides guaranteed log(n) time cost for the containsKey, get, put and remove operations. Algorithms are adaptations of those in Cormen, Leiserson, and Rivest's Introduction to Algorithms.

Note that the ordering maintained by a sorted map (whether or not an explicit comparator is provided) must be consistent with equals if this sorted map is to correctly implement the Map interface. (See Comparable or Comparator for a precise definition of consistent with equals.) This is so because the Map interface is defined in terms of the equals operation, but a map performs all key comparisons using its compareTo (or compare) method, so two keys that are deemed equal by this method are, from the standpoint of the sorted map, equal. The behavior of a sorted map is well-defined even if its ordering is inconsistent with equals; it just fails to obey the general contract of the Map interface.

Note that this implementation is not synchronized. If multiple threads access a map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more mappings; merely changing the value associated with an existing key is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the map. If no such object exists, the map should be "wrapped" using the Collections.synchronizedMap method. This is best done at creation time, to prevent accidental unsynchronized access to the map:

     Map m = Collections.synchronizedMap(new TreeMap(...));

The iterators returned by all of this class's "collection view methods" are fail-fast: if the map is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove or add methods, the iterator throws a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Map, HashMap, Hashtable, Comparable, Comparator, Collection, Collections.synchronizedMap(Map), Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
TreeMap()
Constructs a new, empty map, sorted according to the keys' natural order.
TreeMap(Comparator c)
Constructs a new, empty map, sorted according to the given comparator.
TreeMap(Map m)
Constructs a new map containing the same mappings as the given map, sorted according to the keys' natural order.
TreeMap(SortedMap m)
Constructs a new map containing the same mappings as the given SortedMap, sorted according to the same ordering.
Method Summary
void | clear() Removes all mappings from this TreeMap.
Object | clone() Returns a shallow copy of this TreeMap instance.
Comparator | comparator() Returns the comparator used to order this map, or null if this map uses its keys' natural order.
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key.
boolean | containsValue(Object value) Returns true if this map maps one or more keys to the specified value.
Set | entrySet() Returns a set view of the mappings contained in this map.
Object | firstKey() Returns the first (lowest) key currently in this sorted map.
Object | get(Object key) Returns the value to which this map maps the specified key.
SortedMap | headMap(Object toKey) Returns a view of the portion of this map whose keys are strictly less than toKey.
Set | keySet() Returns a Set view of the keys contained in this map.
Object | lastKey() Returns the last (highest) key currently in this sorted map.
Object | put(Object key, Object value) Associates the specified value with the specified key in this map.
void | putAll(Map map) Copies all of the mappings from the specified map to this map.
Object | remove(Object key) Removes the mapping for this key from this TreeMap if present.
int | size() Returns the number of key-value mappings in this map.
SortedMap | subMap(Object fromKey, Object toKey) Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedMap | tailMap(Object fromKey) Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
Collection | values() Returns a collection view of the values contained in this map.
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty

Constructor Detail

TreeMap

public TreeMap()
Constructs a new, empty map, sorted according to the keys' natural order. All keys inserted into the map must implement the Comparable interface. Furthermore, all such keys must be mutually comparable: k1.compareTo(k2) must not throw a ClassCastException for any elements k1 and k2 in the map. If the user attempts to put a key into the map that violates this constraint (for example, the user attempts to put a string key into a map whose keys are integers), the put(Object key, Object value) call will throw a ClassCastException.
See Also:
Comparable

TreeMap

public TreeMap(Comparator c)
Constructs a new, empty map, sorted according to the given comparator. All keys inserted into the map must be mutually comparable by the given comparator: comparator.compare(k1, k2) must not throw a ClassCastException for any keys k1 and k2 in the map. If the user attempts to put a key into the map that violates this constraint, the put(Object key, Object value) call will throw a ClassCastException.
Parameters:
c - the comparator that will be used to sort this map. A null value indicates that the keys' natural ordering should be used.

TreeMap

public TreeMap(Map m)
Constructs a new map containing the same mappings as the given map, sorted according to the keys' natural order. All keys inserted into the new map must implement the Comparable interface. Furthermore, all such keys must be mutually comparable: k1.compareTo(k2) must not throw a ClassCastException for any elements k1 and k2 in the map. This method runs in n*log(n) time.
Parameters:
m - the map whose mappings are to be placed in this map.
Throws:
ClassCastException - the keys in t are not Comparable, or are not mutually comparable.

TreeMap

public TreeMap(SortedMap m)
Constructs a new map containing the same mappings as the given SortedMap, sorted according to the same ordering. This method runs in linear time.
Parameters:
m - the sorted map whose mappings are to be placed in this map, and whose comparator is to be used to sort this map.
Method Detail

size

public int size()
Returns the number of key-value mappings in this map.
Specified by:
size in interface Map
Overrides:
size in class AbstractMap
Returns:
the number of key-value mappings in this map.

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap
Parameters:
key - key whose presence in this map is to be tested.
Returns:
true if this map contains a mapping for the specified key.
Throws:
ClassCastException - if the key cannot be compared with the keys currently in the map.
NullPointerException - key is null and this map uses natural ordering, or its comparator does not tolerate null keys.

containsValue

public boolean containsValue(Object value)
Returns true if this map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)). This operation will probably require time linear in the Map size for most implementations of Map.
Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap
Parameters:
value - value whose presence in this Map is to be tested.
Since:
1.2

get

public Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
Specified by:
get in interface Map
Overrides:
get in class AbstractMap
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key, or null if the map contains no mapping for the key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and this map uses natural ordering, or its comparator does not tolerate null keys.
See Also:
containsKey(Object)

comparator

public Comparator comparator()
Returns the comparator used to order this map, or null if this map uses its keys' natural order.
Specified by:
comparator in interface SortedMap
Returns:
the comparator associated with this sorted map, or null if it uses its keys' natural sort method.

firstKey

public Object firstKey()
Returns the first (lowest) key currently in this sorted map.
Specified by:
firstKey in interface SortedMap
Returns:
the first (lowest) key currently in this sorted map.
Throws:
NoSuchElementException - Map is empty.

lastKey

public Object lastKey()
Returns the last (highest) key currently in this sorted map.
Specified by:
lastKey in interface SortedMap
Returns:
the last (highest) key currently in this sorted map.
Throws:
NoSuchElementException - Map is empty.

putAll

public void putAll(Map map)
Copies all of the mappings from the specified map to this map. These mappings replace any mappings that this map had for any of the keys currently in the specified map.
Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap
Parameters:
map - mappings to be stored in this map.
Throws:
ClassCastException - class of a key or value in the specified map prevents it from being stored in this map.
NullPointerException - this map does not permit null keys and a specified key is null.

put

public Object put(Object key,
                  Object value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.
Specified by:
put in interface Map
Overrides:
put in class AbstractMap
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and this map uses natural order, or its comparator does not tolerate null keys.

remove

public Object remove(Object key)
Removes the mapping for this key from this TreeMap if present.
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and this map uses natural order, or its comparator does not tolerate null keys.

clear

public void clear()
Removes all mappings from this TreeMap.
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

clone

public Object clone()
Returns a shallow copy of this TreeMap instance. (The keys and values themselves are not cloned.)
Overrides:
clone in class Object
Returns:
a shallow copy of this Map.

keySet

public Set keySet()
Returns a Set view of the keys contained in this map. The set's iterator will return the keys in ascending order. The map is backed by this TreeMap instance, so changes to this map are reflected in the Set, and vice-versa. The Set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap
Returns:
a set view of the keys contained in this TreeMap.

values

public Collection values()
Returns a collection view of the values contained in this map. The collection's iterator will return the values in the order that their corresponding keys appear in the tree. The collection is backed by this TreeMap instance, so changes to this map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from the map through the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
Specified by:
values in interface Map
Overrides:
values in class AbstractMap
Returns:
a collection view of the values contained in this map.

entrySet

public Set entrySet()
Returns a set view of the mappings contained in this map. The set's iterator returns the mappings in ascending key order. Each element in the returned set is a Map.Entry. The set is backed by this map, so changes to this map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the TreeMap, through the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Specified by:
entrySet in interface Map
Overrides:
entrySet in class AbstractMap
Returns:
a set view of the mappings contained in this map.
See Also:
Map.Entry

subMap

public SortedMap subMap(Object fromKey,
                        Object toKey)
Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive. (If fromKey and toKey are equal, the returned sorted map is empty.) The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa. The returned sorted map supports all optional map operations.

The sorted map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key less than fromKey or greater than or equal to toKey.

Note: this method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the key type allows for calculation of the successor a given key, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that m is a sorted map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are between low and high, inclusive:

    SortedMap sub = m.submap(low, high+"\0");
A similar technique can be used to generate an open range (which contains neither endpoint). The following idiom obtains a view containing all of the key-value mappings in m whose keys are between low and high, exclusive:
    SortedMap sub = m.subMap(low+"\0", high);
Specified by:
subMap in interface SortedMap
Parameters:
fromKey - low endpoint (inclusive) of the subMap.
toKey - high endpoint (exclusive) of the subMap.
Returns:
a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
Throws:
ClassCastException - if fromKey and toKey cannot be compared to one another using this map's comparator (or, if the map has no comparator, using natural ordering).
IllegalArgumentException - if fromKey is greater than toKey.
NullPointerException - if fromKey or toKey is null and this map uses natural order, or its comparator does not tolerate null keys.

headMap

public SortedMap headMap(Object toKey)
Returns a view of the portion of this map whose keys are strictly less than toKey. The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa. The returned sorted map supports all optional map operations.

The sorted map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key greater than or equal to toKey.

Note: this method always returns a view that does not contain its (high) endpoint. If you need a view that does contain this endpoint, and the key type allows for calculation of the successor a given key, merely request a headMap bounded by successor(highEndpoint). For example, suppose that suppose that m is a sorted map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are less than or equal to high:

     SortedMap head = m.headMap(high+"\0");
Specified by:
headMap in interface SortedMap
Parameters:
toKey - high endpoint (exclusive) of the headMap.
Returns:
a view of the portion of this map whose keys are strictly less than toKey.
Throws:
ClassCastException - if toKey is not compatible with this map's comparator (or, if the map has no comparator, if toKey does not implement Comparable).
IllegalArgumentException - if this map is itself a subMap, headMap, or tailMap, and toKey is not within the specified range of the subMap, headMap, or tailMap.
NullPointerException - if toKey is null and this map uses natural order, or its comparator does not tolerate null keys.

tailMap

public SortedMap tailMap(Object fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to fromKey. The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa. The returned sorted map supports all optional map operations.

The sorted map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key less than fromKey.

Note: this method always returns a view that contains its (low) endpoint. If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailMap bounded by successor(lowEndpoint). For For example, suppose that suppose that m is a sorted map whose keys are strings. The following idiom obtains a view containing all of the key-value mappings in m whose keys are strictly greater than low:

     SortedMap tail = m.tailMap(low+"\0");
Specified by:
tailMap in interface SortedMap
Parameters:
fromKey - low endpoint (inclusive) of the tailMap.
Returns:
a view of the portion of this map whose keys are greater than or equal to fromKey.
Throws:
ClassCastException - if fromKey is not compatible with this map's comparator (or, if the map has no comparator, if fromKey does not implement Comparable).
IllegalArgumentException - if this map is itself a subMap, headMap, or tailMap, and fromKey is not within the specified range of the subMap, headMap, or tailMap.
NullPointerException - if fromKey is null and this map uses natural order, or its comparator does not tolerate null keys.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class TreeSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.TreeSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set, SortedSet
public class TreeSet
extends AbstractSet
implements SortedSet, Cloneable, Serializable

This class implements the Set interface, backed by a TreeMap instance. This class guarantees that the sorted set will be in ascending element order, sorted according to the natural order of the elements (see Comparable), or by the comparator provided at set creation time, depending on which constructor is used.

This implementation provides guaranteed log(n) time cost for the basic operations (add, remove and contains).

Note that the ordering maintained by a set (whether or not an explicit comparator is provided) must be consistent with equals if it is to correctly implement the Set interface. (See Comparable or Comparator for a precise definition of consistent with equals.) This is so because the Set interface is defined in terms of the equals operation, but a TreeSet instance performs all key comparisons using its compareTo (or compare) method, so two keys that are deemed equal by this method are, from the standpoint of the set, equal. The behavior of a set is well-defined even if its ordering is inconsistent with equals; it just fails to obey the general contract of the Set interface.

Note that this implementation is not synchronized. If multiple threads access a set concurrently, and at least one of the threads modifies the set, it must be synchronized externally. This is typically accomplished by synchronizing on some object that naturally encapsulates the set. If no such object exists, the set should be "wrapped" using the Collections.synchronizedSet method. This is best done at creation time, to prevent accidental unsynchronized access to the set:

     SortedSet s = Collections.synchronizedSortedSet(new TreeSet(...));

The Iterators returned by this class's iterator method are fail-fast: if the set is modified at any time after the iterator is created, in any way except through the iterator's own remove method, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
1.2
See Also:
Collection, Set, HashSet, Comparable, Comparator, Collections.synchronizedSortedSet(SortedSet), TreeMap, Serialized Form

Constructor Summary
TreeSet()
Constructs a new, empty set, sorted according to the elements' natural order.
TreeSet(Collection c)
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order.
TreeSet(Comparator c)
Constructs a new, empty set, sorted according to the given comparator.
TreeSet(SortedSet s)
Constructs a new set containing the same elements as the given sorted set, sorted according to the same ordering.
Method Summary
boolean | add(Object o) Adds the specified element to this set if it is not already present.
boolean | addAll(Collection c) Adds all of the elements in the specified collection to this set.
void | clear() Removes all of the elements from this set.
Object | clone() Returns a shallow copy of this TreeSet instance.
Comparator | comparator() Returns the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.
boolean | contains(Object o) Returns true if this set contains the specified element.
Object | first() Returns the first (lowest) element currently in this sorted set.
SortedSet | headSet(Object toElement) Returns a view of the portion of this set whose elements are strictly less than toElement.
boolean | isEmpty() Returns true if this set contains no elements.
Iterator | iterator() Returns an iterator over the elements in this set.
Object | last() Returns the last (highest) element currently in this sorted set.
boolean | remove(Object o) Removes the given element from this set if it is present.
int | size() Returns the number of elements in this set (its cardinality).
SortedSet | subSet(Object fromElement, Object toElement) Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
SortedSet | tailSet(Object fromElement) Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray

Constructor Detail

TreeSet

public TreeSet()
Constructs a new, empty set, sorted according to the elements' natural order. All elements inserted into the set must implement the Comparable interface. Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the set. If the user attempts to add an element to the set that violates this constraint (for example, the user attempts to add a string element to a set whose elements are integers), the add(Object) call will throw a ClassCastException.
See Also:
Comparable

TreeSet

public TreeSet(Comparator c)
Constructs a new, empty set, sorted according to the given comparator. All elements inserted into the set must be mutually comparable by the given comparator: comparator.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the set. If the user attempts to add an element to the set that violates this constraint, the add(Object) call will throw a ClassCastException.
Parameters:
c - the comparator that will be used to sort this set. A null value indicates that the elements' natural ordering should be used.

TreeSet

public TreeSet(Collection c)
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order. All keys inserted into the set must implement the Comparable interface. Furthermore, all such keys must be mutually comparable: k1.compareTo(k2) must not throw a ClassCastException for any elements k1 and k2 in the set.
Parameters:
c - The elements that will comprise the new set.
Throws:
ClassCastException - if the keys in the given collection are not comparable, or are not mutually comparable.

TreeSet

public TreeSet(SortedSet s)
Constructs a new set containing the same elements as the given sorted set, sorted according to the same ordering.
Parameters:
s - sorted set whose elements will comprise the new set.
Method Detail

iterator

public Iterator iterator()
Returns an iterator over the elements in this set. The elements are returned in ascending order.
Specified by:
iterator in interface Set
Overrides:
iterator in class AbstractCollection
Returns:
an iterator over the elements in this set.

size

public int size()
Returns the number of elements in this set (its cardinality).
Specified by:
size in interface Set
Overrides:
size in class AbstractCollection
Returns:
the number of elements in this set (its cardinality).

isEmpty

public boolean isEmpty()
Returns true if this set contains no elements.
Specified by:
isEmpty in interface Set
Overrides:
isEmpty in class AbstractCollection
Returns:
true if this set contains no elements.

contains

public boolean contains(Object o)
Returns true if this set contains the specified element.
Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection
Parameters:
o - the object to be checked for containment in this set.
Returns:
true if this set contains the specified element.
Throws:
ClassCastException - if the specified object cannot be compared with the elements currently in the set.

add

public boolean add(Object o)
Adds the specified element to this set if it is not already present.
Specified by:
add in interface Set
Overrides:
add in class AbstractCollection
Parameters:
o - element to be added to this set.
Returns:
true if the set did not already contain the specified element.
Throws:
ClassCastException - if the specified object cannot be compared with the elements currently in the set.

remove

public boolean remove(Object o)
Removes the given element from this set if it is present.
Specified by:
remove in interface Set
Overrides:
remove in class AbstractCollection
Parameters:
o - object to be removed from this set, if present.
Returns:
true if the set contained the specified element.
Throws:
ClassCastException - if the specified object cannot be compared with the elements currently in the set.

clear

public void clear()
Removes all of the elements from this set.
Specified by:
clear in interface Set
Overrides:
clear in class AbstractCollection
Following copied from interface: java.util.Set
Throws:
UnsupportedOperationException - if the clear method is not supported by this set.

addAll

public boolean addAll(Collection c)
Adds all of the elements in the specified collection to this set.
Specified by:
addAll in interface Set
Overrides:
addAll in class AbstractCollection
Parameters:
c - elements to be added
Returns:
true if this set changed as a result of the call.
Throws:
ClassCastException - if the elements provided cannot be compared with the elements currently in the set.

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)
Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned sorted set is empty.) The returned sorted set is backed by this set, so changes in the returned sorted set are reflected in this set, and vice-versa. The returned sorted set supports all optional Set operations.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert an element outside the specified range.

Note: this method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the element type allows for calculation of the successor a given value, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s from low to high, inclusive:

     SortedSet sub = s.subSet(low, high+"\0");
A similar technique can be used to generate an open range (which contains neither endpoint). The following idiom obtains a view containing all of the strings in s from low to high, exclusive:
     SortedSet sub = s.subSet(low+"\0", high);
Specified by:
subSet in interface SortedSet
Parameters:
fromElement - low endpoint (inclusive) of the subSet.
toElement - high endpoint (exclusive) of the subSet.
Returns:
a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
Throws:
ClassCastException - if fromElement and toElement cannot be compared to one another using this set's comparator (or, if the set has no comparator, using natural ordering).
IllegalArgumentException - if fromElement is greater than toElement.
NullPointerException - if fromElement or toElement is null and this set uses natural order, or its comparator does not tolerate null elements.

headSet

public SortedSet headSet(Object toElement)
Returns a view of the portion of this set whose elements are strictly less than toElement. The returned sorted set is backed by this set, so changes in the returned sorted set are reflected in this set, and vice-versa. The returned sorted set supports all optional set operations.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert an element greater than or equal to toElement.

Note: this method always returns a view that does not contain its (high) endpoint. If you need a view that does contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a headSet bounded by successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are less than or equal to high:

 SortedSet head = s.headSet(high+"\0");
Specified by:
headSet in interface SortedSet
Parameters:
toElement - high endpoint (exclusive) of the headSet.
Returns:
a view of the portion of this set whose elements are strictly less than toElement.
Throws:
ClassCastException - if toElement is not compatible with this set's comparator (or, if the set has no comparator, if toElement does not implement Comparable).
IllegalArgumentException - if this set is itself a subSet, headSet, or tailSet, and toElement is not within the specified range of the subSet, headSet, or tailSet.
NullPointerException - if toElement is null and this set uses natural ordering, or its comparator does not tolerate null elements.

tailSet

public SortedSet tailSet(Object fromElement)
Returns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned sorted set is backed by this set, so changes in the returned sorted set are reflected in this set, and vice-versa. The returned sorted set supports all optional set operations.

The sorted set returned by this method will throw an IllegalArgumentException if the user attempts to insert an element less than fromElement. Note: this method always returns a view that contains its (low) endpoint. If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailSet bounded by successor(lowEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s that are strictly greater than low:

     SortedSet tail = s.tailSet(low+"\0");
Specified by:
tailSet in interface SortedSet
Parameters:
fromElement - low endpoint (inclusive) of the tailSet.
Returns:
a view of the portion of this set whose elements are greater than or equal to fromElement.
Throws:
ClassCastException - if fromElement is not compatible with this set's comparator (or, if the set has no comparator, if fromElement does not implement Comparable).
IllegalArgumentException - if this set is itself a subSet, headSet, or tailSet, and fromElement is not within the specified range of the subSet, headSet, or tailSet.
NullPointerException - if fromElement is null and this set uses natural ordering, or its comparator does not tolerate null elements.

comparator

public Comparator comparator()
Returns the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.
Specified by:
comparator in interface SortedSet
Returns:
the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.

first

public Object first()
Returns the first (lowest) element currently in this sorted set.
Specified by:
first in interface SortedSet
Returns:
the first (lowest) element currently in this sorted set.
Throws:
NoSuchElementException - sorted set is empty.

last

public Object last()
Returns the last (highest) element currently in this sorted set.
Specified by:
last in interface SortedSet
Returns:
the last (highest) element currently in this sorted set.
Throws:
NoSuchElementException - sorted set is empty.

clone

public Object clone()
Returns a shallow copy of this TreeSet instance. (The elements themselves are not cloned.)
Overrides:
clone in class Object
Returns:
a shallow copy of this set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Vector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util
Class Vector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
All Implemented Interfaces:
Cloneable, Collection, List, Serializable
Direct Known Subclasses:
Stack
public class Vector
extends AbstractList
implements List, Cloneable, Serializable

The Vector class implements a growable array of objects. Like an array, it contains components that can be accessed using an integer index. However, the size of a Vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created.

Each vector tries to optimize storage management by maintaining a capacity and a capacityIncrement. The capacity is always at least as large as the vector size; it is usually larger because as components are added to the vector, the vector's storage increases in chunks the size of capacityIncrement. An application can increase the capacity of a vector before inserting a large number of components; this reduces the amount of incremental reallocation.

As of the Java 2 platform v1.2, this class has been retrofitted to implement List, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Vector is synchronized.

The Iterators returned by Vector's iterator and listIterator methods are fail-fast: if the Vector is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the Iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future. The Enumerations returned by Vector's elements method are not fail-fast.

Since:
JDK1.0
See Also:
Collection, List, ArrayList, LinkedList, Serialized Form

Field Summary
protected int | capacityIncrement The amount by which the capacity of the vector is automatically incremented when its size becomes greater than its capacity.
protected int | elementCount The number of valid components in this Vector object.
protected Object[] | elementData The array buffer into which the components of the vector are stored.
Fields inherited from class java.util.AbstractList
modCount
Constructor Summary
Vector()
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.
Vector(Collection c)
Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Vector(int initialCapacity)
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.
Vector(int initialCapacity, int capacityIncrement)
Constructs an empty vector with the specified initial capacity and capacity increment.
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this Vector.
boolean | add(Object o) Appends the specified element to the end of this Vector.
boolean | addAll(Collection c) Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator.
boolean | addAll(int index, Collection c) Inserts all of the elements in in the specified Collection into this Vector at the specified position.
void | addElement(Object obj) Adds the specified component to the end of this vector, increasing its size by one.
int | capacity() Returns the current capacity of this vector.
void | clear() Removes all of the elements from this Vector.
Object | clone() Returns a clone of this vector.
boolean | contains(Object elem) Tests if the specified object is a component in this vector.
boolean | containsAll(Collection c) Returns true if this Vector contains all of the elements in the specified Collection.
void | copyInto(Object[] anArray) Copies the components of this vector into the specified array.
Object | elementAt(int index) Returns the component at the specified index.
Enumeration | elements() Returns an enumeration of the components of this vector.
void | ensureCapacity(int minCapacity) Increases the capacity of this vector, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
boolean | equals(Object o) Compares the specified Object with this Vector for equality.
Object | firstElement() Returns the first component (the item at index 0) of this vector.
Object | get(int index) Returns the element at the specified position in this Vector.
int | hashCode() Returns the hash code value for this Vector.
int | indexOf(Object elem) Searches for the first occurence of the given argument, testing for equality using the equals method.
int | indexOf(Object elem, int index) Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
void | insertElementAt(Object obj, int index) Inserts the specified object as a component in this vector at the specified index.
boolean | isEmpty() Tests if this vector has no components.
Object | lastElement() Returns the last component of the vector.
int | lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this vector.
int | lastIndexOf(Object elem, int index) Searches backwards for the specified object, starting from the specified index, and returns an index to it.
Object | remove(int index) Removes the element at the specified position in this Vector.
boolean | remove(Object o) Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
boolean | removeAll(Collection c) Removes from this Vector all of its elements that are contained in the specified Collection.
void | removeAllElements() Removes all components from this vector and sets its size to zero.
boolean | removeElement(Object obj) Removes the first (lowest-indexed) occurrence of the argument from this vector.
void | removeElementAt(int index) Deletes the component at the specified index.
protected void | removeRange(int fromIndex, int toIndex) Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
boolean | retainAll(Collection c) Retains only the elements in this Vector that are contained in the specified Collection.
Object | set(int index, Object element) Replaces the element at the specified position in this Vector with the specified element.
void | setElementAt(Object obj, int index) Sets the component at the specified index of this vector to be the specified object.
void | setSize(int newSize) Sets the size of this vector.
int | size() Returns the number of components in this vector.
List | subList(int fromIndex, int toIndex) Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
Object[] | toArray() Returns an array containing all of the elements in this Vector in the correct order.
Object[] | toArray(Object[] a) Returns an array containing all of the elements in this Vector in the correct order.
String | toString() Returns a string representation of this Vector, containing the String representation of each element.
void | trimToSize() Trims the capacity of this vector to be the vector's current size.
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
iterator, listIterator, listIterator

Field Detail

elementData

protected Object[] elementData
The array buffer into which the components of the vector are stored. The capacity of the vector is the length of this array buffer, and is at least large enough to contain all the vector's elements.

Any array elements following the last element in the Vector are null.

elementCount

protected int elementCount
The number of valid components in this Vector object. Components elementData[0] through elementData[elementCount-1] are the actual items.

capacityIncrement

protected int capacityIncrement
The amount by which the capacity of the vector is automatically incremented when its size becomes greater than its capacity. If the capacity increment is less than or equal to zero, the capacity of the vector is doubled each time it needs to grow.
Constructor Detail

Vector

public Vector(int initialCapacity,
              int capacityIncrement)
Constructs an empty vector with the specified initial capacity and capacity increment.
Parameters:
initialCapacity - the initial capacity of the vector.
capacityIncrement - the amount by which the capacity is increased when the vector overflows.
Throws:
IllegalArgumentException - if the specified initial capacity is negative

Vector

public Vector(int initialCapacity)
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.
Parameters:
initialCapacity - the initial capacity of the vector.
Throws:
IllegalArgumentException - if the specified initial capacity is negative

Vector

public Vector()
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.

Vector

public Vector(Collection c)
Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Parameters:
c - the collection whose elements are to be placed into this vector.
Since:
1.2
Method Detail

copyInto

public void copyInto(Object[] anArray)
Copies the components of this vector into the specified array. The item at index k in this vector is copied into component k of anArray. The array must be big enough to hold all the objects in this vector, else an IndexOutOfBoundsException is thrown.
Parameters:
anArray - the array into which the components get copied.

trimToSize

public void trimToSize()
Trims the capacity of this vector to be the vector's current size. If the capacity of this cector is larger than its current size, then the capacity is changed to equal the size by replacing its internal data array, kept in the field elementData, with a smaller one. An application can use this operation to minimize the storage of a vector.

ensureCapacity

public void ensureCapacity(int minCapacity)
Increases the capacity of this vector, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.

If the current capacity of this vector is less than minCapacity, then its capacity is increased by replacing its internal data array, kept in the field elementData, with a larger one. The size of the new data array will be the old size plus capacityIncrement, unless the value of capacityIncrement is less than or equal to zero, in which case the new capacity will be twice the old capacity; but if this new size is still smaller than minCapacity, then the new capacity will be minCapacity.

Parameters:
minCapacity - the desired minimum capacity.

setSize

public void setSize(int newSize)
Sets the size of this vector. If the new size is greater than the current size, new null items are added to the end of the vector. If the new size is less than the current size, all components at index newSize and greater are discarded.
Parameters:
newSize - the new size of this vector.
Throws:
ArrayIndexOutOfBoundsException - if new size is negative.

capacity

public int capacity()
Returns the current capacity of this vector.
Returns:
the current capacity (the length of its internal data arary, kept in the field elementData of this vector.

size

public int size()
Returns the number of components in this vector.
Specified by:
size in interface List
Overrides:
size in class AbstractCollection
Returns:
the number of components in this vector.

isEmpty

public boolean isEmpty()
Tests if this vector has no components.
Specified by:
isEmpty in interface List
Overrides:
isEmpty in class AbstractCollection
Returns:
true if and only if this vector has no components, that is, its size is zero; false otherwise.

elements

public Enumeration elements()
Returns an enumeration of the components of this vector. The returned Enumeration object will generate all items in this vector. The first item generated is the item at index 0, then the item at index 1, and so on.
Returns:
an enumeration of the components of this vector.
See Also:
Enumeration, Iterator

contains

public boolean contains(Object elem)
Tests if the specified object is a component in this vector.
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection
Parameters:
elem - an object.
Returns:
true if and only if the specified object is the same as a component in this vector, as determined by the equals method; false otherwise.

indexOf

public int indexOf(Object elem)
Searches for the first occurence of the given argument, testing for equality using the equals method.
Specified by:
indexOf in interface List
Overrides:
indexOf in class AbstractList
Parameters:
elem - an object.
Returns:
the index of the first occurrence of the argument in this vector, that is, the smallest value k such that elem.equals(elementData[k]) is true; returns -1 if the object is not found.
See Also:
Object.equals(Object)

indexOf

public int indexOf(Object elem,
                   int index)
Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
Parameters:
elem - an object.
index - the non-negative index to start searching from.
Returns:
the index of the first occurrence of the object argument in this vector at position index or later in the vector, that is, the smallest value k such that elem.equals(elementData[k]) && (k >= index) is true; returns -1 if the object is not found. (Returns -1 if index >= the current size of this Vector.)
Throws:
IndexOutOfBoundsException - if index is negative.
See Also:
Object.equals(Object)

lastIndexOf

public int lastIndexOf(Object elem)
Returns the index of the last occurrence of the specified object in this vector.
Specified by:
lastIndexOf in interface List
Overrides:
lastIndexOf in class AbstractList
Parameters:
elem - the desired component.
Returns:
the index of the last occurrence of the specified object in this vector, that is, the largest value k such that elem.equals(elementData[k]) is true; returns -1 if the object is not found.

lastIndexOf

public int lastIndexOf(Object elem,
                       int index)
Searches backwards for the specified object, starting from the specified index, and returns an index to it.
Parameters:
elem - the desired component.
index - the index to start searching from.
Returns:
the index of the last occurrence of the specified object in this vector at position less than or equal to index in the vector, that is, the largest value k such that elem.equals(elementData[k]) && (k <= index) is true; -1 if the object is not found. (Returns -1 if index is negative.)
Throws:
IndexOutOfBoundsException - if index is greater than or equal to the current size of this vector.

elementAt

public Object elementAt(int index)
Returns the component at the specified index.

This method is identical in functionality to the get method (which is part of the List interface).

Parameters:
index - an index into this vector.
Returns:
the component at the specified index.
Throws:
ArrayIndexOutOfBoundsException - if the index is negative or not less than the current size of this Vector object. given.
See Also:
get(int), List

firstElement

public Object firstElement()
Returns the first component (the item at index 0) of this vector.
Returns:
the first component of this vector.
Throws:
NoSuchElementException - if this vector has no components.

lastElement

public Object lastElement()
Returns the last component of the vector.
Returns:
the last component of the vector, i.e., the component at index size() - 1.
Throws:
NoSuchElementException - if this vector is empty.

setElementAt

public void setElementAt(Object obj,
                         int index)
Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded.

The index must be a value greater than or equal to 0 and less than the current size of the vector.

This method is identical in functionality to the set method (which is part of the List interface). Note that the set method reverses the order of the parameters, to more closely match array usage. Note also that the set method returns the old value that was stored at the specified position.

Parameters:
obj - what the component is to be set to.
index - the specified index.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
size(), List, set(int, java.lang.Object)

removeElementAt

public void removeElementAt(int index)
Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this vector is decreased by 1.

The index must be a value greater than or equal to 0 and less than the current size of the vector.

This method is identical in functionality to the remove method (which is part of the List interface). Note that the remove method returns the old value that was stored at the specified position.

Parameters:
index - the index of the object to remove.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
size(), remove(int), List

insertElementAt

public void insertElementAt(Object obj,
                            int index)
Inserts the specified object as a component in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

The index must be a value greater than or equal to 0 and less than or equal to the current size of the vector. (If the index is equal to the current size of the vector, the new element is appended to the Vector.)

This method is identical in functionality to the add(Object, int) method (which is part of the List interface). Note that the add method reverses the order of the parameters, to more closely match array usage.

Parameters:
obj - the component to insert.
index - where to insert the new component.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
size(), add(int, Object), List

addElement

public void addElement(Object obj)
Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity.

This method is identical in functionality to the add(Object) method (which is part of the List interface).

Parameters:
obj - the component to be added.
See Also:
add(Object), List

removeElement

public boolean removeElement(Object obj)
Removes the first (lowest-indexed) occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.

This method is identical in functionality to the remove(Object) method (which is part of the List interface).

Parameters:
obj - the component to be removed.
Returns:
true if the argument was a component of this vector; false otherwise.
See Also:
List.remove(Object), List

removeAllElements

public void removeAllElements()
Removes all components from this vector and sets its size to zero.

This method is identical in functionality to the clear method (which is part of the List interface).

See Also:
clear(), List

clone

public Object clone()
Returns a clone of this vector. The copy will contain a reference to a clone of the internal data array, not a reference to the original internal data array of this Vector object.
Overrides:
clone in class Object
Returns:
a clone of this vector.

toArray

public Object[] toArray()
Returns an array containing all of the elements in this Vector in the correct order.
Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Since:
1.2

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this Vector in the correct order. The runtime type of the returned array is that of the specified array. If the Vector fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this Vector.

If the Vector fits in the specified array with room to spare (i.e., the array has more elements than the Vector), the element in the array immediately following the end of the Vector is set to null. This is useful in determining the length of the Vector only if the caller knows that the Vector does not contain any null elements.

Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection
Parameters:
a - the array into which the elements of the Vector are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the Vector.
Throws:
ArrayStoreException - the runtime type of a is not a supertype of the runtime type of every element in this Vector.

get

public Object get(int index)
Returns the element at the specified position in this Vector.
Specified by:
get in interface List
Overrides:
get in class AbstractList
Parameters:
index - index of element to return.
Throws:
ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index >= size()).
Since:
1.2

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this Vector with the specified element.
Specified by:
set in interface List
Overrides:
set in class AbstractList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
IllegalArgumentException - fromIndex > toIndex.
Since:
1.2

add

public boolean add(Object o)
Appends the specified element to the end of this Vector.
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
o - element to be appended to this Vector.
Returns:
true (as per the general contract of Collection.add).
Since:
1.2

remove

public boolean remove(Object o)
Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists).
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection
Parameters:
o - element to be removed from this Vector, if present.
Returns:
true if the Vector contained the specified element.
Since:
1.2

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this Vector. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index > size()).
Since:
1.2

remove

public Object remove(int index)
Removes the element at the specified position in this Vector. shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the Vector.
Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index - the index of the element to removed.
Throws:
ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
Since:
1.2

clear

public void clear()
Removes all of the elements from this Vector. The Vector will be empty after this call returns (unless it throws an exception).
Specified by:
clear in interface List
Overrides:
clear in class AbstractList
Since:
1.2

containsAll

public boolean containsAll(Collection c)
Returns true if this Vector contains all of the elements in the specified Collection.
Specified by:
containsAll in interface List
Overrides:
containsAll in class AbstractCollection
Returns:
true if this Vector contains all of the elements in the specified collection.

addAll

public boolean addAll(Collection c)
Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this Vector, and this Vector is nonempty.)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractCollection
Parameters:
c - elements to be inserted into this Vector.
Throws:
ArrayIndexOutOfBoundsException - index out of range (index < 0 || index > size()).
Since:
1.2

removeAll

public boolean removeAll(Collection c)
Removes from this Vector all of its elements that are contained in the specified Collection.
Specified by:
removeAll in interface List
Overrides:
removeAll in class AbstractCollection
Returns:
true if this Vector changed as a result of the call.
Since:
1.2

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this Vector that are contained in the specified Collection. In other words, removes from this Vector all of its elements that are not contained in the specified Collection.
Specified by:
retainAll in interface List
Overrides:
retainAll in class AbstractCollection
Returns:
true if this Vector changed as a result of the call.
Since:
1.2

addAll

public boolean addAll(int index,
                      Collection c)
Inserts all of the elements in in the specified Collection into this Vector at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the Vector in the order that they are returned by the specified Collection's iterator.
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractList
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this Vector.
Throws:
ArrayIndexOutOfBoundsException - index out of range (index < 0 || index > size()).
Since:
1.2

equals

public boolean equals(Object o)
Compares the specified Object with this Vector for equality. Returns true if and only if the specified Object is also a List, both Lists have the same size, and all corresponding pairs of elements in the two Lists are equal. (Two elements e1 and e2 are equal if (e1==null ? e2==null : e1.equals(e2)).) In other words, two Lists are defined to be equal if they contain the same elements in the same order.
Specified by:
equals in interface List
Overrides:
equals in class AbstractList
Parameters:
o - the Object to be compared for equality with this Vector.
Returns:
true if the specified Object is equal to this Vector

hashCode

public int hashCode()
Returns the hash code value for this Vector.
Specified by:
hashCode in interface List
Overrides:
hashCode in class AbstractList
Following copied from interface: java.util.List
Returns:
the hash code value for this list.
See Also:
Object.hashCode(),
Object.equals(Object),
List.equals(Object)

toString

public String toString()
Returns a string representation of this Vector, containing the String representation of each element.
Overrides:
toString in class AbstractCollection
Following copied from class: java.util.AbstractCollection
Returns:
a string representation of this collection.

subList

public List subList(int fromIndex,
                    int toIndex)
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and ToIndex are equal, the returned List is empty.) The returned List is backed by this List, so changes in the returned List are reflected in this List, and vice-versa. The returned List supports all of the optional List operations supported by this List.

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a List can be used as a range operation by operating on a subList view instead of a whole List. For example, the following idiom removes a range of elements from a List:

        list.subList(from, to).clear();
Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.

The semantics of the List returned by this method become undefined if the backing list (i.e., this List) is structurally modified in any way other than via the returned List. (Structural modifications are those that change the size of the List, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

Specified by:
subList in interface List
Overrides:
subList in class AbstractList
Parameters:
fromIndex - low endpoint (inclusive) of the subList.
toIndex - high endpoint (exclusive) of the subList.
Returns:
a view of the specified range within this List.
Throws:
IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)

removeRange

protected void removeRange(int fromIndex,
                           int toIndex)
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)
Overrides:
removeRange in class AbstractList
Parameters:
fromIndex - index of first element to be removed.
toIndex - index after last element to be removed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeakHashMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util
Class WeakHashMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.WeakHashMap
All Implemented Interfaces:
Map
public class WeakHashMap
extends AbstractMap
implements Map

A hashtable-based Map implementation with weak keys. An entry in a WeakHashMap will automatically be removed when its key is no longer in ordinary use. More precisely, the presence of a mapping for a given key will not prevent the key from being discarded by the garbage collector, that is, made finalizable, finalized, and then reclaimed. When a key has been discarded its entry is effectively removed from the map, so this class behaves somewhat differently than other Map implementations.

Both null values and the null key are supported. This class has performance characteristics similar to those of the HashMap class, and has the same efficiency parameters of initial capacity and load factor.

Like most collection classes, this class is not synchronized. A synchronized WeakHashMap may be constructed using the Collections.synchronizedMap method.

This class is intended primarily for use with key objects whose equals methods test for object identity using the == operator. Once such a key is discarded it can never be recreated, so it is impossible to do a lookup of that key in a WeakHashMap at some later time and be surprised that its entry has been removed. This class will work perfectly well with key objects whose equals methods are not based upon object identity, such as String instances. With such recreatable key objects, however, the automatic removal of WeakHashMap entries whose keys have been discarded may prove to be confusing.

The behavior of the WeakHashMap class depends in part upon the actions of the garbage collector, so several familiar (though not required) Map invariants do not hold for this class. Because the garbage collector may discard keys at any time, a WeakHashMap may behave as though an unknown thread is silently removing entries. In particular, even if you synchronize on a WeakHashMap instance and invoke none of its mutator methods, it is possible for the size method to return smaller values over time, for the isEmpty method to return false and then true, for the containsKey method to return true and later false for a given key, for the get method to return a value for a given key but later return null, for the put method to return null and the remove method to return false for a key that previously appeared to be in the map, and for successive examinations of the key set, the value set, and the entry set to yield successively smaller numbers of elements.

Each key object in a WeakHashMap is stored indirectly as the referent of a weak reference. Therefore a key will automatically be removed only after the weak references to it, both inside and outside of the map, have been cleared by the garbage collector.

Implementation note: The value objects in a WeakHashMap are held by ordinary strong references. Thus care should be taken to ensure that value objects do not strongly refer to their own keys, either directly or indirectly, since that will prevent the keys from being discarded. Note that a value object may refer indirectly to its key via the WeakHashMap itself; that is, a value object may strongly refer to some other key object whose associated value object, in turn, strongly refers to the key of the first value object. This problem may be fixed in a future release.

Since:
1.2
See Also:
HashMap, WeakReference

Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
WeakHashMap()
Constructs a new, empty WeakHashMap with the default initial capacity and the default load factor, which is 0.75.
WeakHashMap(int initialCapacity)
Constructs a new, empty WeakHashMap with the given initial capacity and the default load factor, which is 0.75.
WeakHashMap(int initialCapacity, float loadFactor)
Constructs a new, empty WeakHashMap with the given initial capacity and the given load factor.
WeakHashMap(Map t)
Constructs a new WeakHashMap with the same mappings as the specified Map.
Method Summary
void | clear() Removes all mappings from this map.
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key.
Set | entrySet() Returns a Set view of the mappings in this map.
Object | get(Object key) Returns the value to which this map maps the specified key.
boolean | isEmpty() Returns true if this map contains no key-value mappings.
Object | put(Object key, Object value) Updates this map so that the given key maps to the given value.
Object | remove(Object key) Removes the mapping for the given key from this map, if present.
int | size() Returns the number of key-value mappings in this map.
Methods inherited from class java.util.AbstractMap
containsValue, equals, hashCode, keySet, putAll, toString, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
containsValue, equals, hashCode, keySet, putAll, values

Constructor Detail

WeakHashMap

public WeakHashMap(int initialCapacity,
                   float loadFactor)
Constructs a new, empty WeakHashMap with the given initial capacity and the given load factor.
Parameters:
initialCapacity - The initial capacity of the WeakHashMap
loadFactor - The load factor of the WeakHashMap
Throws:
IllegalArgumentException - If the initial capacity is less than zero, or if the load factor is nonpositive

WeakHashMap

public WeakHashMap(int initialCapacity)
Constructs a new, empty WeakHashMap with the given initial capacity and the default load factor, which is 0.75.
Parameters:
initialCapacity - The initial capacity of the WeakHashMap
Throws:
IllegalArgumentException - If the initial capacity is less than zero

WeakHashMap

public WeakHashMap()
Constructs a new, empty WeakHashMap with the default initial capacity and the default load factor, which is 0.75.

WeakHashMap

public WeakHashMap(Map t)
Constructs a new WeakHashMap with the same mappings as the specified Map. The WeakHashMap is created with an initial capacity of twice the number of mappings in the specified map or 11 (whichever is greater), and a default load factor, which is 0.75.
Parameters:
t - the map whose mappings are to be placed in this map.
Since:
1.3
Method Detail

size

public int size()
Returns the number of key-value mappings in this map. Note: In contrast with most implementations of the Map interface, the time required by this operation is linear in the size of the map.
Specified by:
size in interface Map
Overrides:
size in class AbstractMap
Following copied from interface: java.util.Map
Returns:
the number of key-value mappings in this map.

isEmpty

public boolean isEmpty()
Returns true if this map contains no key-value mappings.
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap
Following copied from interface: java.util.Map
Returns:
true if this map contains no key-value mappings.

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap
Parameters:
key - The key whose presence in this map is to be tested

get

public Object get(Object key)
Returns the value to which this map maps the specified key. If this map does not contain a value for this key, then return null.
Specified by:
get in interface Map
Overrides:
get in class AbstractMap
Parameters:
key - The key whose associated value, if any, is to be returned

put

public Object put(Object key,
                  Object value)
Updates this map so that the given key maps to the given value. If the map previously contained a mapping for key then that mapping is replaced and the previous value is returned.
Specified by:
put in interface Map
Overrides:
put in class AbstractMap
Parameters:
key - The key that is to be mapped to the given value
value - The value to which the given key is to be mapped
Returns:
The previous value to which this key was mapped, or null if if there was no mapping for the key

remove

public Object remove(Object key)
Removes the mapping for the given key from this map, if present.
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap
Parameters:
key - The key whose mapping is to be removed
Returns:
The value to which this key was mapped, or null if there was no mapping for the key

clear

public void clear()
Removes all mappings from this map.
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap
Following copied from interface: java.util.Map
Throws:
UnsupportedOperationException - clear is not supported by this map.

entrySet

public Set entrySet()
Returns a Set view of the mappings in this map.
Specified by:
entrySet in interface Map
Overrides:
entrySet in class AbstractMap
Following copied from interface: java.util.Map
Returns:
a set view of the mappings contained in this map.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


java.util.zip Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package java.util.zip

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.util.zip.Adler32 (implements java.util.zip.Checksum)
    • class java.util.zip.CRC32 (implements java.util.zip.Checksum)
    • class java.util.zip.Deflater
    • class java.util.zip.Inflater
    • class java.io.InputStream
      • class java.io.FilterInputStream
        • class java.util.zip.CheckedInputStream
        • class java.util.zip.InflaterInputStream
          • class java.util.zip.GZIPInputStream
          • class java.util.zip.ZipInputStream (implements java.util.zip.ZipConstants)
    • class java.io.OutputStream
      • class java.io.FilterOutputStream
        • class java.util.zip.CheckedOutputStream
        • class java.util.zip.DeflaterOutputStream
          • class java.util.zip.GZIPOutputStream
          • class java.util.zip.ZipOutputStream (implements java.util.zip.ZipConstants)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.util.zip.DataFormatException
        • class java.io.IOException
          • class java.util.zip.ZipException
    • class java.util.zip.ZipEntry (implements java.lang.Cloneable, java.util.zip.ZipConstants)
    • class java.util.zip.ZipFile (implements java.util.zip.ZipConstants)

Interface Hierarchy

  • interface java.util.zip.Checksum
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package java.util.zip

Provides classes for reading and writing the standard ZIP and GZIP file formats.

See:
Description

Interface Summary
Checksum An interface representing a data checksum.

Class Summary
Adler32 | A class that can be used to compute the Adler-32 checksum of a data stream.
CheckedInputStream | An input stream that also maintains a checksum of the data being read.
CheckedOutputStream | An output stream that also maintains a checksum of the data being written.
CRC32 | A class that can be used to compute the CRC-32 of a data stream.
Deflater | This class provides support for general purpose compression using the popular ZLIB compression library.
DeflaterOutputStream | This class implements an output stream filter for compressing data in the "deflate" compression format.
GZIPInputStream | This class implements a stream filter for reading compressed data in the GZIP format.
GZIPOutputStream | This class implements a stream filter for writing compressed data in the GZIP file format.
Inflater | This class provides support for general purpose decompression using popular ZLIB compression library.
InflaterInputStream | This class implements a stream filter for uncompressing data in the "deflate" compression format.
ZipEntry | This class is used to represent a ZIP file entry.
ZipFile | This class is used to read entries from a zip file.
ZipInputStream | This class implements an input stream filter for reading files in the ZIP file format.
ZipOutputStream | This class implements an output stream filter for writing files in the ZIP file format.

Exception Summary
DataFormatException | Signals that a data format error has occurred.
ZipException | Signals that a Zip exception of some sort has occurred.

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

  • Info-ZIP Application Note 970311 - a detailed description of the Info-ZIP format upon which the java.util.zip classes are based.

  • ZLIB Compressed Data Format Specification version 3.3 (PostScript) (RFC 1950)

  • DEFLATE Compressed Data Format Specification version 1.3 (PostScript) (RFC 1951)

  • GZIP file format specification version 4.3 (PostScript) (RFC 1952)

  • CRC-32 checksum is described in RFC 1952 (above)

  • Adler-32 checksum is described in RFC 1950 (above)

Since:
JDK1.1
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package java.util.zip

PREV NEXT FRAMES NO FRAMES

Uses of Package
java.util.zip

Packages that use java.util.zip
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Classes in java.util.zip used by java.util.jar
DeflaterOutputStream
This class implements an output stream filter for compressing data in the "deflate" compression format.
InflaterInputStream
This class implements a stream filter for uncompressing data in the "deflate" compression format.
ZipEntry
This class is used to represent a ZIP file entry.
ZipException
Signals that a Zip exception of some sort has occurred.
ZipFile
This class is used to read entries from a zip file.
ZipInputStream
This class implements an input stream filter for reading files in the ZIP file format.
ZipOutputStream
This class implements an output stream filter for writing files in the ZIP file format.

Classes in java.util.zip used by java.util.zip
Checksum
An interface representing a data checksum.
CRC32
A class that can be used to compute the CRC-32 of a data stream.
DataFormatException
Signals that a data format error has occurred.
Deflater
This class provides support for general purpose compression using the popular ZLIB compression library.
DeflaterOutputStream
This class implements an output stream filter for compressing data in the "deflate" compression format.
Inflater
This class provides support for general purpose decompression using popular ZLIB compression library.
InflaterInputStream
This class implements a stream filter for uncompressing data in the "deflate" compression format.
ZipEntry
This class is used to represent a ZIP file entry.
ZipException
Signals that a Zip exception of some sort has occurred.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Adler32

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class Adler32

java.lang.Object
  |
  +--java.util.zip.Adler32
All Implemented Interfaces:
Checksum
public class Adler32
extends Object
implements Checksum

A class that can be used to compute the Adler-32 checksum of a data stream. An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed much faster.

See Also:
Checksum

Constructor Summary
Adler32()
Creates a new Adler32 class.
Method Summary
long | getValue() Returns checksum value.
void | reset() Resets checksum to initial value.
void | update(byte[] b) Updates checksum with specified array of bytes.
void | update(byte[] b, int off, int len) Updates checksum with specified array of bytes.
void | update(int b) Updates checksum with specified byte.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Adler32

public Adler32()
Creates a new Adler32 class.
Method Detail

update

public void update(int b)
Updates checksum with specified byte.
Specified by:
update in interface Checksum
Parameters:
b - an array of bytes

update

public void update(byte[] b,
                   int off,
                   int len)
Updates checksum with specified array of bytes.
Specified by:
update in interface Checksum
Following copied from interface: java.util.zip.Checksum
Parameters:
b - the byte array to update the checksum with
off - the start offset of the data
len - the number of bytes to use for the update

update

public void update(byte[] b)
Updates checksum with specified array of bytes.

reset

public void reset()
Resets checksum to initial value.
Specified by:
reset in interface Checksum

getValue

public long getValue()
Returns checksum value.
Specified by:
getValue in interface Checksum
Following copied from interface: java.util.zip.Checksum
Returns:
the current checksum value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CheckedInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class CheckedInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.util.zip.CheckedInputStream
public class CheckedInputStream
extends FilterInputStream

An input stream that also maintains a checksum of the data being read. The checksum can then be used to verify the integrity of the input data.

See Also:
Checksum

Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
CheckedInputStream(InputStream in, Checksum cksum)
Creates an input stream using the specified Checksum.
Method Summary
Checksum | getChecksum() Returns the Checksum for this input stream.
int | read() Reads a byte.
int | read(byte[] buf, int off, int len) Reads into an array of bytes.
long | skip(long n) Skips specified number of bytes of input.
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CheckedInputStream

public CheckedInputStream(InputStream in,
                          Checksum cksum)
Creates an input stream using the specified Checksum.
Parameters:
in - the input stream
cksum - the Checksum
Method Detail

read

public int read()
         throws IOException
Reads a byte. Will block if no input is available.
Overrides:
read in class FilterInputStream
Returns:
the byte read, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error has occurred

read

public int read(byte[] buf,
                int off,
                int len)
         throws IOException
Reads into an array of bytes. Will block until some input is available.
Overrides:
read in class FilterInputStream
Parameters:
buf - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error has occurred

skip

public long skip(long n)
          throws IOException
Skips specified number of bytes of input.
Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to skip
Returns:
the actual number of bytes skipped
Throws:
IOException - if an I/O error has occurred

getChecksum

public Checksum getChecksum()
Returns the Checksum for this input stream.
Returns:
the Checksum value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckedOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class CheckedOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.util.zip.CheckedOutputStream
public class CheckedOutputStream
extends FilterOutputStream

An output stream that also maintains a checksum of the data being written. The checksum can then be used to verify the integrity of the output data.

See Also:
Checksum

Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
CheckedOutputStream(OutputStream out, Checksum cksum)
Creates an output stream with the specified Checksum.
Method Summary
Checksum | getChecksum() Returns the Checksum for this output stream.
void | write(byte[] b, int off, int len) Writes an array of bytes.
void | write(int b) Writes a byte.
Methods inherited from class java.io.FilterOutputStream
close, flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CheckedOutputStream

public CheckedOutputStream(OutputStream out,
                           Checksum cksum)
Creates an output stream with the specified Checksum.
Parameters:
out - the output stream
cksum - the checksum
Method Detail

write

public void write(int b)
           throws IOException
Writes a byte. Will block until the byte is actually written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written
Throws:
IOException - if an I/O error has occurred

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes an array of bytes. Will block until the bytes are actually written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the data to be written
off - the start offset of the data
len - the number of bytes to be written
Throws:
IOException - if an I/O error has occurred

getChecksum

public Checksum getChecksum()
Returns the Checksum for this output stream.
Returns:
the Checksum
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Checksum

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Interface Checksum

All Known Implementing Classes:
Adler32, CRC32
public interface Checksum

An interface representing a data checksum.

Method Summary
long | getValue() Returns the current checksum value.
void | reset() Resets the checksum to its initial value.
void | update(byte[] b, int off, int len) Updates the current checksum with the specified array of bytes.
void | update(int b) Updates the current checksum with the specified byte.

Method Detail

update

public void update(int b)
Updates the current checksum with the specified byte.
Parameters:
b - the byte to update the checksum with

update

public void update(byte[] b,
                   int off,
                   int len)
Updates the current checksum with the specified array of bytes.
Parameters:
b - the byte array to update the checksum with
off - the start offset of the data
len - the number of bytes to use for the update

getValue

public long getValue()
Returns the current checksum value.
Returns:
the current checksum value

reset

public void reset()
Resets the checksum to its initial value.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class java.util.zip.Adler32

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.Adler32

No usage of java.util.zip.Adler32

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.CheckedInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.CheckedInputStream

No usage of java.util.zip.CheckedInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.CheckedOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.CheckedOutputStream

No usage of java.util.zip.CheckedOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.GZIPInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.GZIPInputStream

No usage of java.util.zip.GZIPInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.GZIPOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.GZIPOutputStream

No usage of java.util.zip.GZIPOutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.CRC32

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.CRC32

Packages that use CRC32
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of CRC32 in java.util.zip

Fields in java.util.zip declared as CRC32
protected CRC32 | GZIPOutputStream.crc CRC-32 of uncompressed data.
protected CRC32 | GZIPInputStream.crc CRC-32 for uncompressed data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.DataFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.DataFormatException

Packages that use DataFormatException
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of DataFormatException in java.util.zip

Methods in java.util.zip that throw DataFormatException
int | Inflater.inflate(byte[] b, int off, int len) Uncompresses bytes into specified buffer.
int | Inflater.inflate(byte[] b) Uncompresses bytes into specified buffer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.Deflater

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.Deflater

Packages that use Deflater
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of Deflater in java.util.zip

Fields in java.util.zip declared as Deflater
protected  Deflater DeflaterOutputStream.def
Compressor for this stream.

Constructors in java.util.zip with parameters of type Deflater
DeflaterOutputStream(OutputStream out, Deflater def, int size)
Creates a new output stream with the specified compressor and buffer size.
DeflaterOutputStream(OutputStream out, Deflater def)
Creates a new output stream with the specified compressor and a default buffer size.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.DeflaterOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.DeflaterOutputStream

Packages that use DeflaterOutputStream
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of DeflaterOutputStream in java.util.jar

Subclasses of DeflaterOutputStream in java.util.jar
 class JarOutputStream
The JarOutputStream class is used to write the contents of a JAR file to any output stream.

Uses of DeflaterOutputStream in java.util.zip

Subclasses of DeflaterOutputStream in java.util.zip
class | GZIPOutputStream This class implements a stream filter for writing compressed data in the GZIP file format.
class | ZipOutputStream This class implements an output stream filter for writing files in the ZIP file format.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.Inflater

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.Inflater

Packages that use Inflater
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of Inflater in java.util.zip

Fields in java.util.zip declared as Inflater
protected  Inflater InflaterInputStream.inf
Decompressor for this stream.

Constructors in java.util.zip with parameters of type Inflater
InflaterInputStream(InputStream in, Inflater inf, int size)
Creates a new input stream with the specified decompressor and buffer size.
InflaterInputStream(InputStream in, Inflater inf)
Creates a new input stream with the specified decompressor and a default buffer size.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.InflaterInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.InflaterInputStream

Packages that use InflaterInputStream
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of InflaterInputStream in java.util.jar

Subclasses of InflaterInputStream in java.util.jar
 class JarInputStream
The JarInputStream class is used to read the contents of a JAR file from any input stream.

Uses of InflaterInputStream in java.util.zip

Subclasses of InflaterInputStream in java.util.zip
class | GZIPInputStream This class implements a stream filter for reading compressed data in the GZIP format.
class | ZipInputStream This class implements an input stream filter for reading files in the ZIP file format.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.ZipEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.ZipEntry

Packages that use ZipEntry
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of ZipEntry in java.util.jar

Subclasses of ZipEntry in java.util.jar
 class JarEntry
This class is used to represent a JAR file entry.

Methods in java.util.jar that return ZipEntry
ZipEntry | JarInputStream.getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
protected ZipEntry | JarInputStream.createZipEntry(String name) Creates a new JarEntry (ZipEntry) for the specified JAR file entry name.
ZipEntry | JarFile.getEntry(String name) Returns the ZipEntry for the given entry name or null if not found.

Methods in java.util.jar with parameters of type ZipEntry
InputStream | JarFile.getInputStream(ZipEntry ze) Returns an input stream for reading the contents of the specified ZIP file entry.
void | JarOutputStream.putNextEntry(ZipEntry ze) Begins writing a new JAR file entry and positions the stream to the start of the entry data.

Constructors in java.util.jar with parameters of type ZipEntry
JarEntry(ZipEntry ze)
Creates a new JarEntry with fields taken from the specified ZipEntry object.

Uses of ZipEntry in java.util.zip

Methods in java.util.zip that return ZipEntry
ZipEntry | ZipInputStream.getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
protected ZipEntry | ZipInputStream.createZipEntry(String name) Creates a new ZipEntry object for the specified entry name.
ZipEntry | ZipFile.getEntry(String name) Returns the zip file entry for the specified name, or null if not found.

Methods in java.util.zip with parameters of type ZipEntry
InputStream | ZipFile.getInputStream(ZipEntry entry) Returns an input stream for reading the contents of the specified zip file entry.
void | ZipOutputStream.putNextEntry(ZipEntry e) Begins writing a new ZIP file entry and positions the stream to the start of the entry data.

Constructors in java.util.zip with parameters of type ZipEntry
ZipEntry(ZipEntry e)
Creates a new zip entry with fields taken from the specified zip entry.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.ZipException

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.ZipException

Packages that use ZipException
java.util.jar | Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
java.util.zip | Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of ZipException in java.util.jar

Subclasses of ZipException in java.util.jar
 class JarException
Signals that an error of some sort has occurred while reading from or writing to a JAR file.

Uses of ZipException in java.util.zip

Constructors in java.util.zip that throw ZipException
ZipFile(File file)
Opens a ZIP file for reading given the specified File object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.ZipFile

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.ZipFile

Packages that use ZipFile
java.util.jar Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of ZipFile in java.util.jar

Subclasses of ZipFile in java.util.jar
 class JarFile
The JarFile class is used to read the contents of a JAR file from any file that can be opened with java.io.RandomAccessFile.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.ZipInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.ZipInputStream

Packages that use ZipInputStream
java.util.jar Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of ZipInputStream in java.util.jar

Subclasses of ZipInputStream in java.util.jar
 class JarInputStream
The JarInputStream class is used to read the contents of a JAR file from any input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class java.util.zip.ZipOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
java.util.zip.ZipOutputStream

Packages that use ZipOutputStream
java.util.jar Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.

Uses of ZipOutputStream in java.util.jar

Subclasses of ZipOutputStream in java.util.jar
 class JarOutputStream
The JarOutputStream class is used to write the contents of a JAR file to any output stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface java.util.zip.Checksum

PREV NEXT FRAMES NO FRAMES

Uses of Interface
java.util.zip.Checksum

Packages that use Checksum
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats.

Uses of Checksum in java.util.zip

Classes in java.util.zip that implement Checksum
class | Adler32 A class that can be used to compute the Adler-32 checksum of a data stream.
class | CRC32 A class that can be used to compute the CRC-32 of a data stream.

Methods in java.util.zip that return Checksum
Checksum | CheckedInputStream.getChecksum() Returns the Checksum for this input stream.
Checksum | CheckedOutputStream.getChecksum() Returns the Checksum for this output stream.

Constructors in java.util.zip with parameters of type Checksum
CheckedInputStream(InputStream in, Checksum cksum)
Creates an input stream using the specified Checksum.
CheckedOutputStream(OutputStream out, Checksum cksum)
Creates an output stream with the specified Checksum.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CRC32

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class CRC32

java.lang.Object
  |
  +--java.util.zip.CRC32
All Implemented Interfaces:
Checksum
public class CRC32
extends Object
implements Checksum

A class that can be used to compute the CRC-32 of a data stream.

See Also:
Checksum

Constructor Summary
CRC32()
Creates a new CRC32 class.
Method Summary
long | getValue() Returns CRC-32 value.
void | reset() Resets CRC-32 to initial value.
void | update(byte[] b) Updates checksum with specified array of bytes.
void | update(byte[] b, int off, int len) Updates CRC-32 with specified array of bytes.
void | update(int b) Updates CRC-32 with specified byte.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CRC32

public CRC32()
Creates a new CRC32 class.
Method Detail

update

public void update(int b)
Updates CRC-32 with specified byte.
Specified by:
update in interface Checksum
Following copied from interface: java.util.zip.Checksum
Parameters:
b - the byte to update the checksum with

update

public void update(byte[] b,
                   int off,
                   int len)
Updates CRC-32 with specified array of bytes.
Specified by:
update in interface Checksum
Following copied from interface: java.util.zip.Checksum
Parameters:
b - the byte array to update the checksum with
off - the start offset of the data
len - the number of bytes to use for the update

update

public void update(byte[] b)
Updates checksum with specified array of bytes.
Parameters:
the - array of bytes to update the checksum with

reset

public void reset()
Resets CRC-32 to initial value.
Specified by:
reset in interface Checksum

getValue

public long getValue()
Returns CRC-32 value.
Specified by:
getValue in interface Checksum
Following copied from interface: java.util.zip.Checksum
Returns:
the current checksum value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataFormatException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class DataFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.util.zip.DataFormatException
All Implemented Interfaces:
Serializable
public class DataFormatException
extends Exception

Signals that a data format error has occurred.

See Also:
Serialized Form

Constructor Summary
DataFormatException()
Constructs a DataFormatException with no detail message.
DataFormatException(String s)
Constructs a DataFormatException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DataFormatException

public DataFormatException()
Constructs a DataFormatException with no detail message.

DataFormatException

public DataFormatException(String s)
Constructs a DataFormatException with the specified detail message. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Deflater

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class Deflater

java.lang.Object
  |
  +--java.util.zip.Deflater
public class Deflater
extends Object

This class provides support for general purpose compression using the popular ZLIB compression library. The ZLIB compression library was initially developed as part of the PNG graphics standard and is not protected by patents. It is fully described in the specifications at the java.util.zip package description.

See Also:
Inflater

Field Summary
static int | BEST_COMPRESSION Compression level for best compression.
static int | BEST_SPEED Compression level for fastest compression.
static int | DEFAULT_COMPRESSION Default compression level.
static int | DEFAULT_STRATEGY Default compression strategy.
static int | DEFLATED Compression method for the deflate algorithm (the only one currently supported).
static int | FILTERED Compression strategy best used for data consisting mostly of small values with a somewhat random distribution.
static int | HUFFMAN_ONLY Compression strategy for Huffman coding only.
static int | NO_COMPRESSION Compression level for no compression.
Constructor Summary
Deflater()
Creates a new compressor with the default compression level.
Deflater(int level)
Creates a new compressor using the specified compression level.
Deflater(int level, boolean nowrap)
Creates a new compressor using the specified compression level.
Method Summary
 int deflate(byte[] b)
Fills specified buffer with compressed data.
 int deflate(byte[] b, int off, int len)
Fills specified buffer with compressed data.
 void end()
Closes the compressor and discards any unprocessed input.
protected  void finalize()
Closes the compressor when garbage is collected.
 void finish()
When called, indicates that compression should end with the current contents of the input buffer.
 boolean finished()
Returns true if the end of the compressed data output stream has been reached.
 int getAdler()
Returns the ADLER-32 value of the uncompressed data.
 int getTotalIn()
Returns the total number of bytes input so far.
 int getTotalOut()
Returns the total number of bytes output so far.
 boolean needsInput()
Returns true if the input data buffer is empty and setInput() should be called in order to provide more input.
 void reset()
Resets deflater so that a new set of input data can be processed.
 void setDictionary(byte[] b)
Sets preset dictionary for compression.
 void setDictionary(byte[] b, int off, int len)
Sets preset dictionary for compression.
 void setInput(byte[] b)
Sets input data for compression.
 void setInput(byte[] b, int off, int len)
Sets input data for compression.
 void setLevel(int level)
Sets the current compression level to the specified value.
 void setStrategy(int strategy)
Sets the compression strategy to the specified value.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFLATED

public static final int DEFLATED
Compression method for the deflate algorithm (the only one currently supported).

NO_COMPRESSION

public static final int NO_COMPRESSION
Compression level for no compression.

BEST_SPEED

public static final int BEST_SPEED
Compression level for fastest compression.

BEST_COMPRESSION

public static final int BEST_COMPRESSION
Compression level for best compression.

DEFAULT_COMPRESSION

public static final int DEFAULT_COMPRESSION
Default compression level.

FILTERED

public static final int FILTERED
Compression strategy best used for data consisting mostly of small values with a somewhat random distribution. Forces more Huffman coding and less string matching.

HUFFMAN_ONLY

public static final int HUFFMAN_ONLY
Compression strategy for Huffman coding only.

DEFAULT_STRATEGY

public static final int DEFAULT_STRATEGY
Default compression strategy.
Constructor Detail

Deflater

public Deflater(int level,
                boolean nowrap)
Creates a new compressor using the specified compression level. If 'nowrap' is true then the ZLIB header and checksum fields will not be used in order to support the compression format used in both GZIP and PKZIP.
Parameters:
level - the compression level (0-9)
nowrap - if true then use GZIP compatible compression

Deflater

public Deflater(int level)
Creates a new compressor using the specified compression level. Compressed data will be generated in ZLIB format.
Parameters:
level - the compression level (0-9)

Deflater

public Deflater()
Creates a new compressor with the default compression level. Compressed data will be generated in ZLIB format.
Method Detail

setInput

public void setInput(byte[] b,
                     int off,
                     int len)
Sets input data for compression. This should be called whenever needsInput() returns true indicating that more input data is required.
Parameters:
b - the input data bytes
off - the start offset of the data
len - the length of the data
See Also:
needsInput()

setInput

public void setInput(byte[] b)
Sets input data for compression. This should be called whenever needsInput() returns true indicating that more input data is required.
Parameters:
b - the input data bytes
See Also:
needsInput()

setDictionary

public void setDictionary(byte[] b,
                          int off,
                          int len)
Sets preset dictionary for compression. A preset dictionary is used when the history buffer can be predetermined. When the data is later uncompressed with Inflater.inflate(), Inflater.getAdler() can be called in order to get the Adler-32 value of the dictionary required for decompression.
Parameters:
b - the dictionary data bytes
off - the start offset of the data
len - the length of the data
See Also:
Inflater.inflate(byte[], int, int), Inflater.getAdler()

setDictionary

public void setDictionary(byte[] b)
Sets preset dictionary for compression. A preset dictionary is used when the history buffer can be predetermined. When the data is later uncompressed with Inflater.inflate(), Inflater.getAdler() can be called in order to get the Adler-32 value of the dictionary required for decompression.
Parameters:
b - the dictionary data bytes
See Also:
Inflater.inflate(byte[], int, int), Inflater.getAdler()

setStrategy

public void setStrategy(int strategy)
Sets the compression strategy to the specified value.
Parameters:
strategy - the new compression strategy
Throws:
IllegalArgumentException - if the compression strategy is invalid

setLevel

public void setLevel(int level)
Sets the current compression level to the specified value.
Parameters:
level - the new compression level (0-9)
Throws:
IllegalArgumentException - if the compression level is invalid

needsInput

public boolean needsInput()
Returns true if the input data buffer is empty and setInput() should be called in order to provide more input.
Returns:
true if the input data buffer is empty and setInput() should be called in order to provide more input

finish

public void finish()
When called, indicates that compression should end with the current contents of the input buffer.

finished

public boolean finished()
Returns true if the end of the compressed data output stream has been reached.
Returns:
true if the end of the compressed data output stream has been reached

deflate

public int deflate(byte[] b,
                   int off,
                   int len)
Fills specified buffer with compressed data. Returns actual number of bytes of compressed data. A return value of 0 indicates that needsInput() should be called in order to determine if more input data is required.
Parameters:
b - the buffer for the compressed data
off - the start offset of the data
len - the maximum number of bytes of compressed data
Returns:
the actual number of bytes of compressed data

deflate

public int deflate(byte[] b)
Fills specified buffer with compressed data. Returns actual number of bytes of compressed data. A return value of 0 indicates that needsInput() should be called in order to determine if more input data is required.
Parameters:
b - the buffer for the compressed data
Returns:
the actual number of bytes of compressed data

getAdler

public int getAdler()
Returns the ADLER-32 value of the uncompressed data.
Returns:
the ADLER-32 value of the uncompressed data

getTotalIn

public int getTotalIn()
Returns the total number of bytes input so far.
Returns:
the total number of bytes input so far

getTotalOut

public int getTotalOut()
Returns the total number of bytes output so far.
Returns:
the total number of bytes output so far

reset

public void reset()
Resets deflater so that a new set of input data can be processed. Keeps current compression level and strategy settings.

end

public void end()
Closes the compressor and discards any unprocessed input. This method should be called when the compressor is no longer being used, but will also be called automatically by the finalize() method. Once this method is called, the behavior of the Deflater object is undefined.

finalize

protected void finalize()
Closes the compressor when garbage is collected.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DeflaterOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class DeflaterOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.util.zip.DeflaterOutputStream
Direct Known Subclasses:
GZIPOutputStream, ZipOutputStream
public class DeflaterOutputStream
extends FilterOutputStream

This class implements an output stream filter for compressing data in the "deflate" compression format. It is also used as the basis for other types of compression filters, such as GZIPOutputStream.

See Also:
Deflater

Field Summary
protected byte[] | buf Output buffer for writing compressed data.
protected Deflater | def Compressor for this stream.
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
DeflaterOutputStream(OutputStream out)
Creates a new output stream with a defaul compressor and buffer size.
DeflaterOutputStream(OutputStream out, Deflater def)
Creates a new output stream with the specified compressor and a default buffer size.
DeflaterOutputStream(OutputStream out, Deflater def, int size)
Creates a new output stream with the specified compressor and buffer size.
Method Summary
void | close() Writes remaining compressed data to the output stream and closes the underlying stream.
protected void | deflate() Writes next block of compressed data to the output stream.
void | finish() Finishes writing compressed data to the output stream without closing the underlying stream.
void | write(byte[] b, int off, int len) Writes an array of bytes to the compressed output stream.
void | write(int b) Writes a byte to the compressed output stream.
Methods inherited from class java.io.FilterOutputStream
flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

def

protected Deflater def
Compressor for this stream.

buf

protected byte[] buf
Output buffer for writing compressed data.
Constructor Detail

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out,
                            Deflater def,
                            int size)
Creates a new output stream with the specified compressor and buffer size.
Parameters:
out - the output stream
def - the compressor ("deflater")
size - the output buffer size
Throws:
IllegalArgumentException - if size is <= 0

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out,
                            Deflater def)
Creates a new output stream with the specified compressor and a default buffer size.
Parameters:
out - the output stream
def - the compressor ("deflater")

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out)
Creates a new output stream with a defaul compressor and buffer size.
Parameters:
out - the output stream
Method Detail

write

public void write(int b)
           throws IOException
Writes a byte to the compressed output stream. This method will block until the byte can be written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written
Throws:
IOException - if an I/O error has occurred

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes an array of bytes to the compressed output stream. This method will block until all the bytes are written.
Overrides:
write in class FilterOutputStream
Parameters:
b - the data to be written
off - the start offset of the data
len - the length of the data
Throws:
IOException - if an I/O error has occurred

finish

public void finish()
            throws IOException
Finishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
Throws:
IOException - if an I/O error has occurred

close

public void close()
           throws IOException
Writes remaining compressed data to the output stream and closes the underlying stream.
Overrides:
close in class FilterOutputStream
Throws:
IOException - if an I/O error has occurred

deflate

protected void deflate()
                throws IOException
Writes next block of compressed data to the output stream.
Throws:
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GZIPInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class GZIPInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.util.zip.InflaterInputStream
                    |
                    +--java.util.zip.GZIPInputStream
public class GZIPInputStream
extends InflaterInputStream

This class implements a stream filter for reading compressed data in the GZIP format.

See Also:
InflaterInputStream

Field Summary
protected CRC32 | crc CRC-32 for uncompressed data.
protected boolean | eos Indicates end of input stream.
static int | GZIP_MAGIC GZIP header magic number.
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
GZIPInputStream(InputStream in)
Creates a new input stream with a default buffer size.
GZIPInputStream(InputStream in, int size)
Creates a new input stream with the specified buffer size.
Method Summary
void | close() Closes the input stream.
int | read(byte[] buf, int off, int len) Reads uncompressed data into an array of bytes.
Methods inherited from class java.util.zip.InflaterInputStream
available, fill, read, skip
Methods inherited from class java.io.FilterInputStream
mark, markSupported, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

crc

protected CRC32 crc
CRC-32 for uncompressed data.

eos

protected boolean eos
Indicates end of input stream.

GZIP_MAGIC

public static final int GZIP_MAGIC
GZIP header magic number.
Constructor Detail

GZIPInputStream

public GZIPInputStream(InputStream in,
                       int size)
                throws IOException
Creates a new input stream with the specified buffer size.
Parameters:
in - the input stream
size - the input buffer size
Throws:
IOException - if an I/O error has occurred
IllegalArgumentException - if size is <= 0

GZIPInputStream

public GZIPInputStream(InputStream in)
                throws IOException
Creates a new input stream with a default buffer size.
Parameters:
in - the input stream
Throws:
IOException - if an I/O error has occurred
Method Detail

read

public int read(byte[] buf,
                int off,
                int len)
         throws IOException
Reads uncompressed data into an array of bytes. Blocks until enough input is available for decompression.
Overrides:
read in class InflaterInputStream
Parameters:
buf - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the compressed input stream is reached
Throws:
IOException - if an I/O error has occurred or the compressed input data is corrupt

close

public void close()
           throws IOException
Closes the input stream.
Overrides:
close in class InflaterInputStream
Throws:
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GZIPOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class GZIPOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.util.zip.DeflaterOutputStream
                    |
                    +--java.util.zip.GZIPOutputStream
public class GZIPOutputStream
extends DeflaterOutputStream

This class implements a stream filter for writing compressed data in the GZIP file format.

Field Summary
protected  CRC32 crc
CRC-32 of uncompressed data.
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, def
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
GZIPOutputStream(OutputStream out)
Creates a new output stream with a default buffer size.
GZIPOutputStream(OutputStream out, int size)
Creates a new output stream with the specified buffer size.
Method Summary
void | close() Writes remaining compressed data to the output stream and closes the underlying stream.
void | finish() Finishes writing compressed data to the output stream without closing the underlying stream.
void | write(byte[] buf, int off, int len) Writes array of bytes to the compressed output stream.
Methods inherited from class java.util.zip.DeflaterOutputStream
deflate, write
Methods inherited from class java.io.FilterOutputStream
flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

crc

protected CRC32 crc
CRC-32 of uncompressed data.
Constructor Detail

GZIPOutputStream

public GZIPOutputStream(OutputStream out,
                        int size)
                 throws IOException
Creates a new output stream with the specified buffer size.
Parameters:
out - the output stream
size - the output buffer size
Throws:
IOException - If an I/O error has occurred.
IllegalArgumentException - if size is <= 0

GZIPOutputStream

public GZIPOutputStream(OutputStream out)
                 throws IOException
Creates a new output stream with a default buffer size.
Parameters:
out - the output stream
Throws:
IOException - If an I/O error has occurred.
Method Detail

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException
Writes array of bytes to the compressed output stream. This method will block until all the bytes are written.
Overrides:
write in class DeflaterOutputStream
Parameters:
buf - the data to be written
off - the start offset of the data
len - the length of the data
Throws:
IOException - If an I/O error has occurred.

finish

public void finish()
            throws IOException
Finishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
Overrides:
finish in class DeflaterOutputStream
Throws:
IOException - if an I/O error has occurred

close

public void close()
           throws IOException
Writes remaining compressed data to the output stream and closes the underlying stream.
Overrides:
close in class DeflaterOutputStream
Throws:
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Inflater

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class Inflater

java.lang.Object
  |
  +--java.util.zip.Inflater
public class Inflater
extends Object

This class provides support for general purpose decompression using popular ZLIB compression library. The ZLIB compression library was initially developed as part of the PNG graphics standard and is not protected by patents. It is fully described in the specifications at the java.util.zip package description.

See Also:
Deflater

Constructor Summary
Inflater()
Creates a new decompressor.
Inflater(boolean nowrap)
Creates a new decompressor.
Method Summary
void | end() Closes the decompressor and discards any unprocessed input.
protected void | finalize() Closes the decompressor when garbage is collected.
boolean | finished() Return true if the end of the compressed data stream has been reached.
int | getAdler() Returns the ADLER-32 value of the uncompressed data.
int | getRemaining() Returns the total number of bytes remaining in the input buffer.
int | getTotalIn() Returns the total number of bytes input so far.
int | getTotalOut() Returns the total number of bytes output so far.
int | inflate(byte[] b) Uncompresses bytes into specified buffer.
int | inflate(byte[] b, int off, int len) Uncompresses bytes into specified buffer.
boolean | needsDictionary() Returns true if a preset dictionary is needed for decompression.
boolean | needsInput() Returns true if no data remains in the input buffer.
void | reset() Resets inflater so that a new set of input data can be processed.
void | setDictionary(byte[] b) Sets the preset dictionary to the given array of bytes.
void | setDictionary(byte[] b, int off, int len) Sets the preset dictionary to the given array of bytes.
void | setInput(byte[] b) Sets input data for decompression.
void | setInput(byte[] b, int off, int len) Sets input data for decompression.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Inflater

public Inflater(boolean nowrap)
Creates a new decompressor. If the parameter 'nowrap' is true then the ZLIB header and checksum fields will not be used. This provides compatibility with the compression format used by both GZIP and PKZIP.

Note: When using the 'nowrap' option it is also necessary to provide an extra "dummy" byte as input. This is required by the ZLIB native library in order to support certain optimizations.

Parameters:
nowrap - if true then support GZIP compatible compression

Inflater

public Inflater()
Creates a new decompressor.
Method Detail

setInput

public void setInput(byte[] b,
                     int off,
                     int len)
Sets input data for decompression. Should be called whenever needsInput() returns true indicating that more input data is required.
Parameters:
b - the input data bytes
off - the start offset of the input data
len - the length of the input data
See Also:
needsInput()

setInput

public void setInput(byte[] b)
Sets input data for decompression. Should be called whenever needsInput() returns true indicating that more input data is required.
Parameters:
b - the input data bytes
See Also:
needsInput()

setDictionary

public void setDictionary(byte[] b,
                          int off,
                          int len)
Sets the preset dictionary to the given array of bytes. Should be called when inflate() returns 0 and needsDictionary() returns true indicating that a preset dictionary is required. The method getAdler() can be used to get the Adler-32 value of the dictionary needed.
Parameters:
b - the dictionary data bytes
off - the start offset of the data
len - the length of the data
See Also:
needsDictionary(), getAdler()

setDictionary

public void setDictionary(byte[] b)
Sets the preset dictionary to the given array of bytes. Should be called when inflate() returns 0 and needsDictionary() returns true indicating that a preset dictionary is required. The method getAdler() can be used to get the Adler-32 value of the dictionary needed.
Parameters:
b - the dictionary data bytes
See Also:
needsDictionary(), getAdler()

getRemaining

public int getRemaining()
Returns the total number of bytes remaining in the input buffer. This can be used to find out what bytes still remain in the input buffer after decompression has finished.
Returns:
the total number of bytes remaining in the input buffer

needsInput

public boolean needsInput()
Returns true if no data remains in the input buffer. This can be used to determine if #setInput should be called in order to provide more input.
Returns:
true if no data remains in the input buffer

needsDictionary

public boolean needsDictionary()
Returns true if a preset dictionary is needed for decompression.
Returns:
true if a preset dictionary is needed for decompression
See Also:
setDictionary(byte[], int, int)

finished

public boolean finished()
Return true if the end of the compressed data stream has been reached.
Returns:
true if the end of the compressed data stream has been reached

inflate

public int inflate(byte[] b,
                   int off,
                   int len)
            throws DataFormatException
Uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the later case, getAdler() can be used to get the Adler-32 value of the dictionary required.
Parameters:
b - the buffer for the uncompressed data
off - the start offset of the data
len - the maximum number of uncompressed bytes
Returns:
the actual number of uncompressed bytes
Throws:
DataFormatException - if the compressed data format is invalid
See Also:
needsInput(), needsDictionary()

inflate

public int inflate(byte[] b)
            throws DataFormatException
Uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the later case, getAdler() can be used to get the Adler-32 value of the dictionary required.
Parameters:
b - the buffer for the uncompressed data
Returns:
the actual number of uncompressed bytes
Throws:
DataFormatException - if the compressed data format is invalid
See Also:
needsInput(), needsDictionary()

getAdler

public int getAdler()
Returns the ADLER-32 value of the uncompressed data.
Returns:
the ADLER-32 value of the uncompressed data

getTotalIn

public int getTotalIn()
Returns the total number of bytes input so far.
Returns:
the total number of bytes input so far

getTotalOut

public int getTotalOut()
Returns the total number of bytes output so far.
Returns:
the total number of bytes output so far

reset

public void reset()
Resets inflater so that a new set of input data can be processed.

end

public void end()
Closes the decompressor and discards any unprocessed input. This method should be called when the decompressor is no longer being used, but will also be called automatically by the finalize() method. Once this method is called, the behavior of the Inflater object is undefined.

finalize

protected void finalize()
Closes the decompressor when garbage is collected.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InflaterInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class InflaterInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.util.zip.InflaterInputStream
Direct Known Subclasses:
GZIPInputStream, ZipInputStream
public class InflaterInputStream
extends FilterInputStream

This class implements a stream filter for uncompressing data in the "deflate" compression format. It is also used as the basis for other decompression filters, such as GZIPInputStream.

See Also:
Inflater

Field Summary
protected byte[] | buf Input buffer for decompression.
protected Inflater | inf Decompressor for this stream.
protected int | len Length of input buffer.
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
InflaterInputStream(InputStream in)
Creates a new input stream with a default decompressor and buffer size.
InflaterInputStream(InputStream in, Inflater inf)
Creates a new input stream with the specified decompressor and a default buffer size.
InflaterInputStream(InputStream in, Inflater inf, int size)
Creates a new input stream with the specified decompressor and buffer size.
Method Summary
int | available() Returns 0 after EOF has reached, otherwise always return 1.
void | close() Closes the input stream.
protected void | fill() Fills input buffer with more data to decompress.
int | read() Reads a byte of uncompressed data.
int | read(byte[] b, int off, int len) Reads uncompressed data into an array of bytes.
long | skip(long n) Skips specified number of bytes of uncompressed data.
Methods inherited from class java.io.FilterInputStream
mark, markSupported, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

inf

protected Inflater inf
Decompressor for this stream.

buf

protected byte[] buf
Input buffer for decompression.

len

protected int len
Length of input buffer.
Constructor Detail

InflaterInputStream

public InflaterInputStream(InputStream in,
                           Inflater inf,
                           int size)
Creates a new input stream with the specified decompressor and buffer size.
Parameters:
in - the input stream
inf - the decompressor ("inflater")
size - the input buffer size
Throws:
IllegalArgumentException - if size is <= 0

InflaterInputStream

public InflaterInputStream(InputStream in,
                           Inflater inf)
Creates a new input stream with the specified decompressor and a default buffer size.
Parameters:
in - the input stream
inf - the decompressor ("inflater")

InflaterInputStream

public InflaterInputStream(InputStream in)
Creates a new input stream with a default decompressor and buffer size.
Parameters:
in - the input stream
Method Detail

read

public int read()
         throws IOException
Reads a byte of uncompressed data. This method will block until enough input is available for decompression.
Overrides:
read in class FilterInputStream
Returns:
the byte read, or -1 if end of compressed input is reached
Throws:
IOException - if an I/O error has occurred

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads uncompressed data into an array of bytes. This method will block until some input can be decompressed.
Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the compressed input is reached or a preset dictionary is needed
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred

available

public int available()
              throws IOException
Returns 0 after EOF has reached, otherwise always return 1.

Programs should not count on this method to return the actual number of bytes that could be read without blocking.

Overrides:
available in class FilterInputStream
Returns:
1 before EOF and 0 after EOF.
Throws:
IOException - if an I/O error occurs.

skip

public long skip(long n)
          throws IOException
Skips specified number of bytes of uncompressed data.
Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to skip
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error has occurred
IllegalArgumentException - if n <0< /DL="/DL">

close

public void close()
           throws IOException
Closes the input stream.
Overrides:
close in class FilterInputStream
Throws:
IOException - if an I/O error has occurred

fill

protected void fill()
             throws IOException
Fills input buffer with more data to decompress.
Throws:
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ZipEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class ZipEntry

java.lang.Object
  |
  +--java.util.zip.ZipEntry
All Implemented Interfaces:
Cloneable, java.util.zip.ZipConstants
Direct Known Subclasses:
JarEntry
public class ZipEntry
extends Object
implements java.util.zip.ZipConstants, Cloneable

This class is used to represent a ZIP file entry.

Field Summary
static int | CENATT
static int | CENATX
static int | CENCOM
static int | CENCRC
static int | CENDSK
static int | CENEXT
static int | CENFLG
static int | CENHDR
static int | CENHOW
static int | CENLEN
static int | CENNAM
static int | CENOFF
static long | CENSIG
static int | CENSIZ
static int | CENTIM
static int | CENVEM
static int | CENVER
static int | DEFLATED Compression method for compressed (deflated) entries.
static int | ENDCOM
static int | ENDHDR
static int | ENDOFF
static long | ENDSIG
static int | ENDSIZ
static int | ENDSUB
static int | ENDTOT
static int | EXTCRC
static int | EXTHDR
static int | EXTLEN
static long | EXTSIG
static int | EXTSIZ
static int | LOCCRC
static int | LOCEXT
static int | LOCFLG
static int | LOCHDR
static int | LOCHOW
static int | LOCLEN
static int | LOCNAM
static long | LOCSIG
static int | LOCSIZ
static int | LOCTIM
static int | LOCVER
static int | STORED Compression method for uncompressed entries.
Constructor Summary
ZipEntry(String name)
Creates a new zip entry with the specified name.
ZipEntry(ZipEntry e)
Creates a new zip entry with fields taken from the specified zip entry.
Method Summary
Object | clone() Returns a copy of this entry.
String | getComment() Returns the comment string for the entry, or null if none.
long | getCompressedSize() Returns the size of the compressed entry data, or -1 if not known.
long | getCrc() Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known.
byte[] | getExtra() Returns the extra field data for the entry, or null if none.
int | getMethod() Returns the compression method of the entry, or -1 if not specified.
String | getName() Returns the name of the entry.
long | getSize() Returns the uncompressed size of the entry data, or -1 if not known.
long | getTime() Returns the modification time of the entry, or -1 if not specified.
int | hashCode() Returns the hash code value for this entry.
boolean | isDirectory() Returns true if this is a directory entry.
void | setComment(String comment) Sets the optional comment string for the entry.
void | setCompressedSize(long csize) Sets the size of the compressed entry data.
void | setCrc(long crc) Sets the CRC-32 checksum of the uncompressed entry data.
void | setExtra(byte[] extra) Sets the optional extra field data for the entry.
void | setMethod(int method) Sets the compression method for the entry.
void | setSize(long size) Sets the uncompressed size of the entry data.
void | setTime(long time) Sets the modification time of the entry.
String | toString() Returns a string representation of the ZIP entry.
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

STORED

public static final int STORED
Compression method for uncompressed entries.

DEFLATED

public static final int DEFLATED
Compression method for compressed (deflated) entries.

LOCSIG

public static final long LOCSIG

EXTSIG

public static final long EXTSIG

CENSIG

public static final long CENSIG

ENDSIG

public static final long ENDSIG

LOCHDR

public static final int LOCHDR

EXTHDR

public static final int EXTHDR

CENHDR

public static final int CENHDR

ENDHDR

public static final int ENDHDR

LOCVER

public static final int LOCVER

LOCFLG

public static final int LOCFLG

LOCHOW

public static final int LOCHOW

LOCTIM

public static final int LOCTIM

LOCCRC

public static final int LOCCRC

LOCSIZ

public static final int LOCSIZ

LOCLEN

public static final int LOCLEN

LOCNAM

public static final int LOCNAM

LOCEXT

public static final int LOCEXT

EXTCRC

public static final int EXTCRC

EXTSIZ

public static final int EXTSIZ

EXTLEN

public static final int EXTLEN

CENVEM

public static final int CENVEM

CENVER

public static final int CENVER

CENFLG

public static final int CENFLG

CENHOW

public static final int CENHOW

CENTIM

public static final int CENTIM

CENCRC

public static final int CENCRC

CENSIZ

public static final int CENSIZ

CENLEN

public static final int CENLEN

CENNAM

public static final int CENNAM

CENEXT

public static final int CENEXT

CENCOM

public static final int CENCOM

CENDSK

public static final int CENDSK

CENATT

public static final int CENATT

CENATX

public static final int CENATX

CENOFF

public static final int CENOFF

ENDSUB

public static final int ENDSUB

ENDTOT

public static final int ENDTOT

ENDSIZ

public static final int ENDSIZ

ENDOFF

public static final int ENDOFF

ENDCOM

public static final int ENDCOM
Constructor Detail

ZipEntry

public ZipEntry(String name)
Creates a new zip entry with the specified name.
Parameters:
name - the entry name
Throws:
NullPointerException - if the entry name is null
IllegalArgumentException - if the entry name is longer than 0xFFFF bytes

ZipEntry

public ZipEntry(ZipEntry e)
Creates a new zip entry with fields taken from the specified zip entry.
Parameters:
e - a zip Entry object
Method Detail

getName

public String getName()
Returns the name of the entry.
Returns:
the name of the entry

setTime

public void setTime(long time)
Sets the modification time of the entry.
Parameters:
time - the entry modification time in number of milliseconds since the epoch
See Also:
getTime()

getTime

public long getTime()
Returns the modification time of the entry, or -1 if not specified.
Returns:
the modification time of the entry, or -1 if not specified
See Also:
setTime(long)

setSize

public void setSize(long size)
Sets the uncompressed size of the entry data.
Parameters:
size - the uncompressed size in bytes
Throws:
IllegalArgumentException - if the specified size is less than 0 or greater than 0xFFFFFFFF bytes
See Also:
getSize()

getSize

public long getSize()
Returns the uncompressed size of the entry data, or -1 if not known.
Returns:
the uncompressed size of the entry data, or -1 if not known
See Also:
setSize(long)

getCompressedSize

public long getCompressedSize()
Returns the size of the compressed entry data, or -1 if not known. In the case of a stored entry, the compressed size will be the same as the uncompressed size of the entry.
Returns:
the size of the compressed entry data, or -1 if not known
See Also:
setCompressedSize(long)

setCompressedSize

public void setCompressedSize(long csize)
Sets the size of the compressed entry data.
Parameters:
csize - the compressed size to set to
See Also:
getCompressedSize()

setCrc

public void setCrc(long crc)
Sets the CRC-32 checksum of the uncompressed entry data.
Parameters:
crc - the CRC-32 value
Throws:
IllegalArgumentException - if the specified CRC-32 value is less than 0 or greater than 0xFFFFFFFF
See Also:
setCrc(long)

getCrc

public long getCrc()
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known.
Returns:
the CRC-32 checksum of the uncompressed entry data, or -1 if not known
See Also:
getCrc()

setMethod

public void setMethod(int method)
Sets the compression method for the entry.
Parameters:
method - the compression method, either STORED or DEFLATED
Throws:
IllegalArgumentException - if the specified compression method is invalid
See Also:
getMethod()

getMethod

public int getMethod()
Returns the compression method of the entry, or -1 if not specified.
Returns:
the compression method of the entry, or -1 if not specified
See Also:
setMethod(int)

setExtra

public void setExtra(byte[] extra)
Sets the optional extra field data for the entry.
Parameters:
extra - the extra field data bytes
Throws:
IllegalArgumentException - if the length of the specified extra field data is greater than 0xFFFFF bytes
See Also:
getExtra()

getExtra

public byte[] getExtra()
Returns the extra field data for the entry, or null if none.
Returns:
the extra field data for the entry, or null if none
See Also:
setExtra(byte[])

setComment

public void setComment(String comment)
Sets the optional comment string for the entry.
Parameters:
comment - the comment string
Throws:
IllegalArgumentException - if the length of the specified comment string is greater than 0xFFFF bytes
See Also:
getComment()

getComment

public String getComment()
Returns the comment string for the entry, or null if none.
Returns:
the comment string for the entry, or null if none
See Also:
setComment(String)

isDirectory

public boolean isDirectory()
Returns true if this is a directory entry. A directory entry is defined to be one whose name ends with a '/'.
Returns:
true if this is a directory entry

toString

public String toString()
Returns a string representation of the ZIP entry.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

hashCode

public int hashCode()
Returns the hash code value for this entry.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

clone

public Object clone()
Returns a copy of this entry.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ZipException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class ZipException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.util.zip.ZipException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JarException
public class ZipException
extends IOException

Signals that a Zip exception of some sort has occurred.

Since:
JDK1.0
See Also:
java.io.IOExcpetion, Serialized Form

Constructor Summary
ZipException()
Constructs an ZipException with null as its error detail message.
ZipException(String s)
Constructs an ZipException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ZipException

public ZipException()
Constructs an ZipException with null as its error detail message.

ZipException

public ZipException(String s)
Constructs an ZipException with the specified detail message.
Parameters:
s - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ZipFile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class ZipFile

java.lang.Object
  |
  +--java.util.zip.ZipFile
All Implemented Interfaces:
java.util.zip.ZipConstants
Direct Known Subclasses:
JarFile
public class ZipFile
extends Object
implements java.util.zip.ZipConstants

This class is used to read entries from a zip file.

Field Summary
static int | CENATT
static int | CENATX
static int | CENCOM
static int | CENCRC
static int | CENDSK
static int | CENEXT
static int | CENFLG
static int | CENHDR
static int | CENHOW
static int | CENLEN
static int | CENNAM
static int | CENOFF
static long | CENSIG
static int | CENSIZ
static int | CENTIM
static int | CENVEM
static int | CENVER
static int | ENDCOM
static int | ENDHDR
static int | ENDOFF
static long | ENDSIG
static int | ENDSIZ
static int | ENDSUB
static int | ENDTOT
static int | EXTCRC
static int | EXTHDR
static int | EXTLEN
static long | EXTSIG
static int | EXTSIZ
static int | LOCCRC
static int | LOCEXT
static int | LOCFLG
static int | LOCHDR
static int | LOCHOW
static int | LOCLEN
static int | LOCNAM
static long | LOCSIG
static int | LOCSIZ
static int | LOCTIM
static int | LOCVER
static int | OPEN_DELETE Mode flag to open a zip file and mark it for deletion.
static int | OPEN_READ Mode flag to open a zip file for reading.
Constructor Summary
ZipFile(File file)
Opens a ZIP file for reading given the specified File object.
ZipFile(File file, int mode)
Opens a new ZipFile to read from the specified File object in the specified mode.
ZipFile(String name)
Opens a zip file for reading.
Method Summary
void | close() Closes the ZIP file.
Enumeration | entries() Returns an enumeration of the ZIP file entries.
protected void | finalize() Ensures that the close method of this ZIP file is called when there are no more references to it.
ZipEntry | getEntry(String name) Returns the zip file entry for the specified name, or null if not found.
InputStream | getInputStream(ZipEntry entry) Returns an input stream for reading the contents of the specified zip file entry.
String | getName() Returns the path name of the ZIP file.
int | size() Returns the number of entries in the ZIP file.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OPEN_READ

public static final int OPEN_READ
Mode flag to open a zip file for reading.

OPEN_DELETE

public static final int OPEN_DELETE
Mode flag to open a zip file and mark it for deletion. The file will be deleted some time between the moment that it is opened and the moment that it is closed, but its contents will remain accessible via the ZipFile object until either the close method is invoked or the virtual machine exits.

LOCSIG

public static final long LOCSIG

EXTSIG

public static final long EXTSIG

CENSIG

public static final long CENSIG

ENDSIG

public static final long ENDSIG

LOCHDR

public static final int LOCHDR

EXTHDR

public static final int EXTHDR

CENHDR

public static final int CENHDR

ENDHDR

public static final int ENDHDR

LOCVER

public static final int LOCVER

LOCFLG

public static final int LOCFLG

LOCHOW

public static final int LOCHOW

LOCTIM

public static final int LOCTIM

LOCCRC

public static final int LOCCRC

LOCSIZ

public static final int LOCSIZ

LOCLEN

public static final int LOCLEN

LOCNAM

public static final int LOCNAM

LOCEXT

public static final int LOCEXT

EXTCRC

public static final int EXTCRC

EXTSIZ

public static final int EXTSIZ

EXTLEN

public static final int EXTLEN

CENVEM

public static final int CENVEM

CENVER

public static final int CENVER

CENFLG

public static final int CENFLG

CENHOW

public static final int CENHOW

CENTIM

public static final int CENTIM

CENCRC

public static final int CENCRC

CENSIZ

public static final int CENSIZ

CENLEN

public static final int CENLEN

CENNAM

public static final int CENNAM

CENEXT

public static final int CENEXT

CENCOM

public static final int CENCOM

CENDSK

public static final int CENDSK

CENATT

public static final int CENATT

CENATX

public static final int CENATX

CENOFF

public static final int CENOFF

ENDSUB

public static final int ENDSUB

ENDTOT

public static final int ENDTOT

ENDSIZ

public static final int ENDSIZ

ENDOFF

public static final int ENDOFF

ENDCOM

public static final int ENDCOM
Constructor Detail

ZipFile

public ZipFile(String name)
        throws IOException
Opens a zip file for reading.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
name - the name of the zip file
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file.
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(File file,
               int mode)
        throws IOException
Opens a new ZipFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
file - the ZIP file to be opened for reading
mode - the mode in which the file is to be opened
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file.
IllegalArgumentException - If the mode argument is invalid
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(File file)
        throws ZipException,
               IOException
Opens a ZIP file for reading given the specified File object.
Parameters:
file - the ZIP file to be opened for reading
Throws:
ZipException - if a ZIP error has occurred
IOException - if an I/O error has occurred
Method Detail

getEntry

public ZipEntry getEntry(String name)
Returns the zip file entry for the specified name, or null if not found.
Parameters:
name - the name of the entry
Returns:
the zip file entry, or null if not found
Throws:
IllegalStateException - if the zip file has been closed

getInputStream

public InputStream getInputStream(ZipEntry entry)
                           throws IOException
Returns an input stream for reading the contents of the specified zip file entry.
Parameters:
entry - the zip file entry
Returns:
the input stream for reading the contents of the specified zip file entry.
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
IllegalStateException - if the zip file has been closed

getName

public String getName()
Returns the path name of the ZIP file.
Returns:
the path name of the ZIP file

entries

public Enumeration entries()
Returns an enumeration of the ZIP file entries.
Returns:
an enumeration of the ZIP file entries
Throws:
IllegalStateException - if the zip file has been closed

size

public int size()
Returns the number of entries in the ZIP file.
Returns:
the number of entries in the ZIP file
Throws:
IllegalStateException - if the zip file has been closed

close

public void close()
           throws IOException
Closes the ZIP file.
Throws:
IOException - if an I/O error has occured

finalize

protected void finalize()
                 throws IOException
Ensures that the close method of this ZIP file is called when there are no more references to it.

Since the time when GC would invoke this method is undetermined, it is strongly recommanded that applications invoke the close method as soon they have finished accessing this ZipFile. This will prevent holding up system resources for an undetermined length of time.

Overrides:
finalize in class Object
Throws:
IOException - if an I/O error occurs.
See Also:
close()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ZipInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class ZipInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.util.zip.InflaterInputStream
                    |
                    +--java.util.zip.ZipInputStream
All Implemented Interfaces:
java.util.zip.ZipConstants
Direct Known Subclasses:
JarInputStream
public class ZipInputStream
extends InflaterInputStream
implements java.util.zip.ZipConstants

This class implements an input stream filter for reading files in the ZIP file format. Includes support for both compressed and uncompressed entries.

Field Summary
static int | CENATT
static int | CENATX
static int | CENCOM
static int | CENCRC
static int | CENDSK
static int | CENEXT
static int | CENFLG
static int | CENHDR
static int | CENHOW
static int | CENLEN
static int | CENNAM
static int | CENOFF
static long | CENSIG
static int | CENSIZ
static int | CENTIM
static int | CENVEM
static int | CENVER
static int | ENDCOM
static int | ENDHDR
static int | ENDOFF
static long | ENDSIG
static int | ENDSIZ
static int | ENDSUB
static int | ENDTOT
static int | EXTCRC
static int | EXTHDR
static int | EXTLEN
static long | EXTSIG
static int | EXTSIZ
static int | LOCCRC
static int | LOCEXT
static int | LOCFLG
static int | LOCHDR
static int | LOCHOW
static int | LOCLEN
static int | LOCNAM
static long | LOCSIG
static int | LOCSIZ
static int | LOCTIM
static int | LOCVER
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
ZipInputStream(InputStream in)
Creates a new ZIP input stream.
Method Summary
int | available() Returns 0 after EOF has reached for the current entry data, otherwise always return 1.
void | close() Closes the ZIP input stream.
void | closeEntry() Closes the current ZIP entry and positions the stream for reading the next entry.
protected ZipEntry | createZipEntry(String name) Creates a new ZipEntry object for the specified entry name.
ZipEntry | getNextEntry() Reads the next ZIP file entry and positions stream at the beginning of the entry data.
int | read(byte[] b, int off, int len) Reads from the current ZIP entry into an array of bytes.
long | skip(long n) Skips specified number of bytes in the current ZIP entry.
Methods inherited from class java.util.zip.InflaterInputStream
fill, read
Methods inherited from class java.io.FilterInputStream
mark, markSupported, read, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LOCSIG

public static final long LOCSIG

EXTSIG

public static final long EXTSIG

CENSIG

public static final long CENSIG

ENDSIG

public static final long ENDSIG

LOCHDR

public static final int LOCHDR

EXTHDR

public static final int EXTHDR

CENHDR

public static final int CENHDR

ENDHDR

public static final int ENDHDR

LOCVER

public static final int LOCVER

LOCFLG

public static final int LOCFLG

LOCHOW

public static final int LOCHOW

LOCTIM

public static final int LOCTIM

LOCCRC

public static final int LOCCRC

LOCSIZ

public static final int LOCSIZ

LOCLEN

public static final int LOCLEN

LOCNAM

public static final int LOCNAM

LOCEXT

public static final int LOCEXT

EXTCRC

public static final int EXTCRC

EXTSIZ

public static final int EXTSIZ

EXTLEN

public static final int EXTLEN

CENVEM

public static final int CENVEM

CENVER

public static final int CENVER

CENFLG

public static final int CENFLG

CENHOW

public static final int CENHOW

CENTIM

public static final int CENTIM

CENCRC

public static final int CENCRC

CENSIZ

public static final int CENSIZ

CENLEN

public static final int CENLEN

CENNAM

public static final int CENNAM

CENEXT

public static final int CENEXT

CENCOM

public static final int CENCOM

CENDSK

public static final int CENDSK

CENATT

public static final int CENATT

CENATX

public static final int CENATX

CENOFF

public static final int CENOFF

ENDSUB

public static final int ENDSUB

ENDTOT

public static final int ENDTOT

ENDSIZ

public static final int ENDSIZ

ENDOFF

public static final int ENDOFF

ENDCOM

public static final int ENDCOM
Constructor Detail

ZipInputStream

public ZipInputStream(InputStream in)
Creates a new ZIP input stream.
Parameters:
in - the actual input stream
Method Detail

getNextEntry

public ZipEntry getNextEntry()
                      throws IOException
Reads the next ZIP file entry and positions stream at the beginning of the entry data.
Returns:
the ZipEntry just read
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

closeEntry

public void closeEntry()
                throws IOException
Closes the current ZIP entry and positions the stream for reading the next entry.
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

available

public int available()
              throws IOException
Returns 0 after EOF has reached for the current entry data, otherwise always return 1.

Programs should not count on this method to return the actual number of bytes that could be read without blocking.

Overrides:
available in class InflaterInputStream
Returns:
1 before EOF and 0 after EOF has reached for current entry.
Throws:
IOException - if an I/O error occurs.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads from the current ZIP entry into an array of bytes. Blocks until some input is available.
Overrides:
read in class InflaterInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the entry is reached
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

skip

public long skip(long n)
          throws IOException
Skips specified number of bytes in the current ZIP entry.
Overrides:
skip in class InflaterInputStream
Parameters:
n - the number of bytes to skip
Returns:
the actual number of bytes skipped
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
IllegalArgumentException - if n <0< /DL="/DL">

close

public void close()
           throws IOException
Closes the ZIP input stream.
Overrides:
close in class InflaterInputStream
Throws:
IOException - if an I/O error has occurred

createZipEntry

protected ZipEntry createZipEntry(String name)
Creates a new ZipEntry object for the specified entry name.
Parameters:
name - the ZIP file entry name
Returns:
the ZipEntry just created
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ZipOutputStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

java.util.zip
Class ZipOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.util.zip.DeflaterOutputStream
                    |
                    +--java.util.zip.ZipOutputStream
All Implemented Interfaces:
java.util.zip.ZipConstants
Direct Known Subclasses:
JarOutputStream
public class ZipOutputStream
extends DeflaterOutputStream
implements java.util.zip.ZipConstants

This class implements an output stream filter for writing files in the ZIP file format. Includes support for both compressed and uncompressed entries.

Field Summary
static int | CENATT
static int | CENATX
static int | CENCOM
static int | CENCRC
static int | CENDSK
static int | CENEXT
static int | CENFLG
static int | CENHDR
static int | CENHOW
static int | CENLEN
static int | CENNAM
static int | CENOFF
static long | CENSIG
static int | CENSIZ
static int | CENTIM
static int | CENVEM
static int | CENVER
static int | DEFLATED Compression method for compressed (DEFLATED) entries.
static int | ENDCOM
static int | ENDHDR
static int | ENDOFF
static long | ENDSIG
static int | ENDSIZ
static int | ENDSUB
static int | ENDTOT
static int | EXTCRC
static int | EXTHDR
static int | EXTLEN
static long | EXTSIG
static int | EXTSIZ
static int | LOCCRC
static int | LOCEXT
static int | LOCFLG
static int | LOCHDR
static int | LOCHOW
static int | LOCLEN
static int | LOCNAM
static long | LOCSIG
static int | LOCSIZ
static int | LOCTIM
static int | LOCVER
static int | STORED Compression method for uncompressed (STORED) entries.
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, def
Fields inherited from class java.io.FilterOutputStream
out
Constructor Summary
ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.
Method Summary
void | close() Closes the ZIP output stream as well as the stream being filtered.
void | closeEntry() Closes the current ZIP entry and positions the stream for writing the next entry.
void | finish() Finishes writing the contents of the ZIP output stream without closing the underlying stream.
void | putNextEntry(ZipEntry e) Begins writing a new ZIP file entry and positions the stream to the start of the entry data.
void | setComment(String comment) Sets the ZIP file comment.
void | setLevel(int level) Sets the compression level for subsequent entries which are DEFLATED.
void | setMethod(int method) Sets the default compression method for subsequent entries.
void | write(byte[] b, int off, int len) Writes an array of bytes to the current ZIP entry data.
Methods inherited from class java.util.zip.DeflaterOutputStream
deflate, write
Methods inherited from class java.io.FilterOutputStream
flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

STORED

public static final int STORED
Compression method for uncompressed (STORED) entries.

DEFLATED

public static final int DEFLATED
Compression method for compressed (DEFLATED) entries.

LOCSIG

public static final long LOCSIG

EXTSIG

public static final long EXTSIG

CENSIG

public static final long CENSIG

ENDSIG

public static final long ENDSIG

LOCHDR

public static final int LOCHDR

EXTHDR

public static final int EXTHDR

CENHDR

public static final int CENHDR

ENDHDR

public static final int ENDHDR

LOCVER

public static final int LOCVER

LOCFLG

public static final int LOCFLG

LOCHOW

public static final int LOCHOW

LOCTIM

public static final int LOCTIM

LOCCRC

public static final int LOCCRC

LOCSIZ

public static final int LOCSIZ

LOCLEN

public static final int LOCLEN

LOCNAM

public static final int LOCNAM

LOCEXT

public static final int LOCEXT

EXTCRC

public static final int EXTCRC

EXTSIZ

public static final int EXTSIZ

EXTLEN

public static final int EXTLEN

CENVEM

public static final int CENVEM

CENVER

public static final int CENVER

CENFLG

public static final int CENFLG

CENHOW

public static final int CENHOW

CENTIM

public static final int CENTIM

CENCRC

public static final int CENCRC

CENSIZ

public static final int CENSIZ

CENLEN

public static final int CENLEN

CENNAM

public static final int CENNAM

CENEXT

public static final int CENEXT

CENCOM

public static final int CENCOM

CENDSK

public static final int CENDSK

CENATT

public static final int CENATT

CENATX

public static final int CENATX

CENOFF

public static final int CENOFF

ENDSUB

public static final int ENDSUB

ENDTOT

public static final int ENDTOT

ENDSIZ

public static final int ENDSIZ

ENDOFF

public static final int ENDOFF

ENDCOM

public static final int ENDCOM
Constructor Detail

ZipOutputStream

public ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.
Parameters:
out - the actual output stream
Method Detail

setComment

public void setComment(String comment)
Sets the ZIP file comment.
Parameters:
comment - the comment string
Throws:
IllegalArgumentException - if the length of the specified ZIP file comment is greater than 0xFFFF bytes

setMethod

public void setMethod(int method)
Sets the default compression method for subsequent entries. This default will be used whenever the compression method is not specified for an individual ZIP file entry, and is initially set to DEFLATED.
Parameters:
method - the default compression method
Throws:
IllegalArgumentException - if the specified compression method is invalid

setLevel

public void setLevel(int level)
Sets the compression level for subsequent entries which are DEFLATED. The default setting is DEFAULT_COMPRESSION.
Parameters:
level - the compression level (0-9)
Throws:
IllegalArgumentException - if the compression level is invalid

putNextEntry

public void putNextEntry(ZipEntry e)
                  throws IOException
Begins writing a new ZIP file entry and positions the stream to the start of the entry data. Closes the current entry if still active. The default compression method will be used if no compression method was specified for the entry, and the current time will be used if the entry has no set modification time.
Parameters:
e - the ZIP entry to be written
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred

closeEntry

public void closeEntry()
                throws IOException
Closes the current ZIP entry and positions the stream for writing the next entry.
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes an array of bytes to the current ZIP entry data. This method will block until all the bytes are written.
Overrides:
write in class DeflaterOutputStream
Parameters:
b - the data to be written
off - the start offset in the data
len - the number of bytes that are written
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred

finish

public void finish()
            throws IOException
Finishes writing the contents of the ZIP output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
Overrides:
finish in class DeflaterOutputStream
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O exception has occurred

close

public void close()
           throws IOException
Closes the ZIP output stream as well as the stream being filtered.
Overrides:
close in class DeflaterOutputStream
Throws:
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.accessibility Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.accessibility

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.accessibility.AccessibleBundle
      • class javax.accessibility.AccessibleRelation
      • class javax.accessibility.AccessibleRole
      • class javax.accessibility.AccessibleState
    • class javax.accessibility.AccessibleContext
    • class javax.accessibility.AccessibleHyperlink (implements javax.accessibility.AccessibleAction)
    • class javax.accessibility.AccessibleRelationSet
    • class javax.accessibility.AccessibleStateSet
    • class java.util.ResourceBundle
      • class java.util.ListResourceBundle
        • class javax.accessibility.AccessibleResourceBundle

Interface Hierarchy

  • interface javax.accessibility.Accessible
  • interface javax.accessibility.AccessibleAction
  • interface javax.accessibility.AccessibleComponent
  • interface javax.accessibility.AccessibleIcon
  • interface javax.accessibility.AccessibleSelection
  • interface javax.accessibility.AccessibleTable
  • interface javax.accessibility.AccessibleTableModelChange
  • interface javax.accessibility.AccessibleText
    • interface javax.accessibility.AccessibleHypertext
  • interface javax.accessibility.AccessibleValue
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package javax.accessibility

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.accessibility

Packages that use javax.accessibility
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in javax.accessibility used by java.applet
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.

Classes in javax.accessibility used by java.awt
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleSelection
This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.
AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).

Classes in javax.accessibility used by javax.accessibility
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions.
AccessibleBundle
Base class used to maintain a strongly typed enumeration.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleHyperlink
Encapsulation of a link, or set of links (e.g.
AccessibleIcon
The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons).
AccessibleRelation
Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
AccessibleRelationSet
Class AccessibleRelationSet determines a component's relation set.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleSelection
This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleState
Class AccessibleState describes a component's particular state.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.
AccessibleTable
Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.
AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).

Classes in javax.accessibility used by javax.swing
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleHyperlink
Encapsulation of a link, or set of links (e.g.
AccessibleHypertext
The AccessibleHypertext class is the base class for all classes that present hypertext information on the display.
AccessibleIcon
The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons).
AccessibleRelationSet
Class AccessibleRelationSet determines a component's relation set.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleSelection
This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.
AccessibleTable
Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.
AccessibleTableModelChange
The AccessibleTableModelChange interface describes a change to the table model.
AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).

Classes in javax.accessibility used by javax.swing.colorchooser
Accessible
Interface Accessible is the main interface for the accessibility package.

Classes in javax.accessibility used by javax.swing.plaf
Accessible
Interface Accessible is the main interface for the accessibility package.

Classes in javax.accessibility used by javax.swing.plaf.basic
Accessible
Interface Accessible is the main interface for the accessibility package.

Classes in javax.accessibility used by javax.swing.plaf.metal
Accessible
Interface Accessible is the main interface for the accessibility package.

Classes in javax.accessibility used by javax.swing.plaf.multi
Accessible
Interface Accessible is the main interface for the accessibility package.

Classes in javax.accessibility used by javax.swing.table
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleSelection
This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.
AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).

Classes in javax.accessibility used by javax.swing.text
Accessible
Interface Accessible is the main interface for the accessibility package.
AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
AccessibleRole
Class AccessibleRole determines the role of a component.
AccessibleStateSet
Class AccessibleStateSet determines a component's state set.
AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.

Classes in javax.accessibility used by javax.swing.tree
Accessible
Interface Accessible is the main interface for the accessibility package.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Accessible

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface Accessible

All Known Implementing Classes:
Button, Canvas, Checkbox, CheckboxMenuItem, Choice, Label, List, List.AccessibleAWTList.AccessibleAWTListChild, Menu, MenuBar, MenuItem, Panel, Scrollbar, ScrollPane, TextComponent, Window, JTextComponent, JViewport, JTabbedPane, JMenuItem, JCheckBoxMenuItem, JLayeredPane, JToggleButton, JCheckBox, JOptionPane, JMenu, JColorChooser, JButton, JPopupMenu, JSeparator, JWindow, JApplet, JComboBox, JList, JList.AccessibleJList.AccessibleJListChild, JToolTip, CellRendererPane, JInternalFrame, JInternalFrame.JDesktopIcon, JPanel, JFrame, JSplitPane, JTree, JTree.AccessibleJTree.AccessibleJTreeNode, JTable, JTable.AccessibleJTable.AccessibleJTableCell, JLabel, JFileChooser, JDesktopPane, JRadioButton, JToolBar, JMenuBar, ImageIcon, JRadioButtonMenuItem, Box, Box.Filler, JScrollPane, JScrollBar, JProgressBar, JRootPane, JDialog, JSlider, JTableHeader, JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
public interface Accessible

Interface Accessible is the main interface for the accessibility package. All components that support the accessibility package must implement this interface. It contains a single method, getAccessibleContext(), which returns an instance of the class AccessibleContext.

Method Summary
 AccessibleContext getAccessibleContext()
Returns the AccessibleContext associated with this object.

Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Returns the AccessibleContext associated with this object. In most cases, the return value should not be null if the object implements interface Accessible. If a component developer creates a subclass of an object that implements Accessible, and that subclass is not Accessible, the developer should override the getAccessibleContext method to return null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessibleAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleAction

All Known Implementing Classes:
AccessibleHyperlink, Button.AccessibleAWTButton, Checkbox.AccessibleAWTCheckbox, CheckboxMenuItem.AccessibleAWTCheckboxMenuItem, Choice.AccessibleAWTChoice, MenuItem.AccessibleAWTMenuItem, AbstractButton.AccessibleAbstractButton, JComboBox.AccessibleJComboBox, JTree.AccessibleJTree.AccessibleJTreeNode
public interface AccessibleAction

The AccessibleAction interface should be supported by any object that can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are as well as tell the object to perform them. Any object that can be manipulated should support this interface. Applications can determine if an object supports the AccessibleAction interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleAction() method. If the return value is not null, the object supports this interface.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleAction()

Method Summary
boolean | doAccessibleAction(int i) Performs the specified Action on the object
int | getAccessibleActionCount() Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
String | getAccessibleActionDescription(int i) Returns a description of the specified action of the object.

Method Detail

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
Returns:
the zero-based number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Returns a description of the specified action of the object.
Parameters:
i - zero-based index of the actions
Returns:
a String description of the action
See Also:
getAccessibleActionCount()

doAccessibleAction

public boolean doAccessibleAction(int i)
Performs the specified Action on the object
Parameters:
i - zero-based index of actions
Returns:
true if the action was performed; otherwise false.
See Also:
getAccessibleActionCount()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleBundle

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleBundle

java.lang.Object
  |
  +--javax.accessibility.AccessibleBundle
Direct Known Subclasses:
AccessibleRelation, AccessibleRole, AccessibleState
public abstract class AccessibleBundle
extends Object

Base class used to maintain a strongly typed enumeration. This is the superclass of AccessibleState and AccessibleRole.

The toDisplayString method allows you to obtain the localized string for a locale independent key from a predefined ResourceBundle for the keys defined in this class. This localized string is intended to be readable by humans.

See Also:
AccessibleRole, AccessibleState

Field Summary
protected  String key
The locale independent name of the state.
Constructor Summary
AccessibleBundle()
Method Summary
String | toDisplayString() Gets localized string describing the key using the default locale.
String | toDisplayString(Locale locale) Obtains the key as a localized string.
protected String | toDisplayString(String resourceBundleName, Locale locale) Obtains the key as a localized string.
String | toString() Gets localized string describing the key using the default locale.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

key

protected String key
The locale independent name of the state. This is a programmatic name that is not intended to be read by humans.
See Also:
toDisplayString(java.lang.String, java.util.Locale)
Constructor Detail

AccessibleBundle

public AccessibleBundle()
Method Detail

toDisplayString

protected String toDisplayString(String resourceBundleName,
                                 Locale locale)
Obtains the key as a localized string. If a localized string cannot be found for the key, the locale independent key stored in the role will be returned. This method is intended to be used only by subclasses so that they can specify their own resource bundles which contain localized strings for their keys.
Parameters:
resourceBundleName - the name of the resource bundle to use for lookup
locale - the locale for which to obtain a localized string
Returns:
a localized String for the key.

toDisplayString

public String toDisplayString(Locale locale)
Obtains the key as a localized string. If a localized string cannot be found for the key, the locale independent key stored in the role will be returned.
Parameters:
locale - the locale for which to obtain a localized string
Returns:
a localized String for the key.

toDisplayString

public String toDisplayString()
Gets localized string describing the key using the default locale.
Returns:
a localized String describing the key for the default locale

toString

public String toString()
Gets localized string describing the key using the default locale.
Overrides:
toString in class Object
Returns:
a localized String describing the key using the default locale
See Also:
toDisplayString(java.lang.String, java.util.Locale)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessibleComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleComponent

All Known Implementing Classes:
Component.AccessibleAWTComponent, MenuComponent.AccessibleAWTMenuComponent, JList.AccessibleJList.AccessibleJListChild, JTree.AccessibleJTree.AccessibleJTreeNode, JTable.AccessibleJTable.AccessibleJTableCell, JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
public interface AccessibleComponent

The AccessibleComponent interface should be supported by any object that is rendered on the screen. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of an object. Applications can determine if an object supports the AccessibleComponent interface by first obtaining its AccessibleContext and then calling the AccessibleContext.getAccessibleComponent() method. If the return value is not null, the object supports this interface.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleComponent()

Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Color | getBackground() Gets the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Gets the Cursor of this object.
Font | getFont() Gets the Font of this object.
FontMetrics | getFontMetrics(Font f) Gets the FontMetrics of this object.
Color | getForeground() Gets the foreground color of this object.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determines if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determines if the object is showing.
boolean | isVisible() Determines if the object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | requestFocus() Requests focus for this object.
void | setBackground(Color c) Sets the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor cursor) Sets the Cursor of this object.
void | setEnabled(boolean b) Sets the enabled state of the object.
void | setFont(Font f) Sets the Font of this object.
void | setForeground(Color c) Sets the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Sets the visible state of the object.

Method Detail

getBackground

public Color getBackground()
Gets the background color of this object.
Returns:
the background color, if supported, of the object; otherwise, null
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(Color c)
Sets the background color of this object.
Parameters:
c - the new Color for the background
See Also:
setBackground(java.awt.Color)

getForeground

public Color getForeground()
Gets the foreground color of this object.
Returns:
the foreground color, if supported, of the object; otherwise, null
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(Color c)
Sets the foreground color of this object.
Parameters:
c - the new Color for the foreground
See Also:
getForeground()

getCursor

public Cursor getCursor()
Gets the Cursor of this object.
Returns:
the Cursor, if supported, of the object; otherwise, null
See Also:
setCursor(java.awt.Cursor)

setCursor

public void setCursor(Cursor cursor)
Sets the Cursor of this object.
Parameters:
c - the new Cursor for the object
See Also:
getCursor()

getFont

public Font getFont()
Gets the Font of this object.
Returns:
the Font,if supported, for the object; otherwise, null
See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font f)
Sets the Font of this object.
Parameters:
f - the new Font for the object
See Also:
getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Gets the FontMetrics of this object.
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
getFont()

isEnabled

public boolean isEnabled()
Determines if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSets.
Returns:
true if object is enabled; otherwise, false
See Also:
setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.ENABLED, AccessibleStateSet

setEnabled

public void setEnabled(boolean b)
Sets the enabled state of the object.
Parameters:
b - if true, enables this object; otherwise, disables it
See Also:
isEnabled()

isVisible

public boolean isVisible()
Determines if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use isShowing().

Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets.

Returns:
true if object is visible; otherwise, false
See Also:
setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE, AccessibleStateSet

setVisible

public void setVisible(boolean b)
Sets the visible state of the object.
Parameters:
b - if true, shows this object; otherwise, hides it
See Also:
isVisible()

isShowing

public boolean isShowing()
Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note: this will return true even if the object is obscured by another (for example, it is underneath a menu that was pulled down).
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
See Also:
getBounds()

getLocationOnScreen

public Point getLocationOnScreen()
Returns the location of the object on the screen.
Returns:
the location of the object on screen; null if this object is not on the screen
See Also:
getBounds(), getLocation()

getLocation

public Point getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Returns:
An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen
See Also:
getBounds(), getLocationOnScreen()

setLocation

public void setLocation(Point p)
Sets the location of the object relative to the parent.
Parameters:
p - the new position for the top-left corner
See Also:
getLocation()

getBounds

public Rectangle getBounds()
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Parameters:
r - rectangle indicating this component's bounds
See Also:
getBounds()

getSize

public Dimension getSize()
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Resizes this object so that it has width and height.
Parameters:
d - The dimension specifying the new size of the object.
See Also:
getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets.
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
See Also:
isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Adds the specified focus listener to receive focus events from this component.
Parameters:
l - the focus listener
See Also:
removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Removes the specified focus listener so it no longer receives focus events from this component.
Parameters:
l - the focus listener
See Also:
addFocusListener(java.awt.event.FocusListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleContext

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
Direct Known Subclasses:
Component.AccessibleAWTComponent, ImageIcon.AccessibleImageIcon, JList.AccessibleJList.AccessibleJListChild, JTable.AccessibleJTable.AccessibleJTableCell, JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry, JTree.AccessibleJTree.AccessibleJTreeNode, MenuComponent.AccessibleAWTMenuComponent
public abstract class AccessibleContext
extends Object

AccessibleContext represents the minimum information all accessible objects return. This information includes the accessible name, description, role, and state of the object, as well as information about its parent and children. AccessibleContext also contains methods for obtaining more specific accessibility information about a component. If the component supports them, these methods will return an object that implements one or more of the following interfaces:

  • AccessibleAction - the object can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are and tell the object to perform them. Any object that can be manipulated should support this interface.
  • AccessibleComponent - the object has a graphical representation. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of the object. Any object that is rendered on the screen should support this interface.
  • AccessibleSelection - the object allows its children to be selected. This interface provides the standard mechanism for an assistive technology to determine the currently selected children of the object as well as modify its selection set. Any object that has children that can be selected should support this interface.
  • AccessibleText - the object presents editable textual information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. Any object that contains editable text should support this interface.
  • AccessibleValue - the object supports a numerical value. This interface provides the standard mechanism for an assistive technology to determine and set the current value of the object, as well as obtain its minimum and maximum values. Any object that supports a numerical value should support this interface.

Field Summary
static String | ACCESSIBLE_ACTION_PROPERTY Constant used to indicate that the supported set of actions has changed.
static String | ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY Constant used to determine when the active descendant of a component has changed.
static String | ACCESSIBLE_CARET_PROPERTY Constant used to determine when the accessibleText caret has changed.
static String | ACCESSIBLE_CHILD_PROPERTY Constant used to determine when Accessible children are added/removed from the object.
static String | ACCESSIBLE_DESCRIPTION_PROPERTY Constant used to determine when the accessibleDescription property has changed.
static String | ACCESSIBLE_NAME_PROPERTY Constant used to determine when the accessibleName property has changed.
static String | ACCESSIBLE_SELECTION_PROPERTY Constant used to determine when the accessibleSelection has changed.
static String | ACCESSIBLE_STATE_PROPERTY Constant used to determine when the accessibleStateSet property has changed.
static String | ACCESSIBLE_TABLE_CAPTION_CHANGED Constant used to indicate that the table caption has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table caption and the new value will be an Accessible representing the new table caption.
static String | ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED Constant used to indicate that the column description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the column index.
static String | ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED Constant used to indicate that the column header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
static String | ACCESSIBLE_TABLE_MODEL_CHANGED Constant used to indicate that table data has changed.
static String | ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED Constant used to indicate that the row description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the row index.
static String | ACCESSIBLE_TABLE_ROW_HEADER_CHANGED Constant used to indicate that the row header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
static String | ACCESSIBLE_TABLE_SUMMARY_CHANGED Constant used to indicate that the table summary has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table summary and the new value will be an Accessible representing the new table summary.
static String | ACCESSIBLE_TEXT_PROPERTY Constant used to determine when the accessibleText has changed.
static String | ACCESSIBLE_VALUE_PROPERTY Constant used to determine when the accessibleValue property has changed.
static String | ACCESSIBLE_VISIBLE_DATA_PROPERTY Constant used to determine when the visual appearance of the object has changed.
protected String | accessibleDescription A localized String containing the description of the object.
protected String | accessibleName A localized String containing the name of the object.
protected Accessible | accessibleParent The accessible parent of this object.
Constructor Summary
AccessibleContext()
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
AccessibleAction | getAccessibleAction() Gets the AccessibleAction associated with this object that supports one or more actions.
abstract Accessible | getAccessibleChild(int i) Returns the specified Accessible child of the object.
abstract int | getAccessibleChildrenCount() Returns the number of accessible children of the object.
AccessibleComponent | getAccessibleComponent() Gets the AccessibleComponent associated with this object that has a graphical representation.
String | getAccessibleDescription() Gets the accessibleDescription property of this object.
AccessibleIcon[] | getAccessibleIcon() Gets the AccessibleIcons associated with an object that has one or more associated icons
abstract int | getAccessibleIndexInParent() Gets the 0-based index of this object in its accessible parent.
String | getAccessibleName() Gets the accessibleName property of this object.
Accessible | getAccessibleParent() Gets the Accessible parent of this object.
AccessibleRelationSet | getAccessibleRelationSet() Gets the AccessibleRelationSet associated with an object
abstract AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleSelection | getAccessibleSelection() Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
abstract AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
AccessibleTable | getAccessibleTable() Gets the AccessibleTable associated with an object
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object presently editable text on the display.
AccessibleValue | getAccessibleValue() Gets the AccessibleValue associated with this object that supports a Numerical value.
abstract Locale | getLocale() Gets the locale of the component.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | setAccessibleDescription(String s) Sets the accessible description of this object.
void | setAccessibleName(String s) Sets the localized accessible name of this object.
void | setAccessibleParent(Accessible a) Sets the Accessible parent of this object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ACCESSIBLE_NAME_PROPERTY

public static final String ACCESSIBLE_NAME_PROPERTY
Constant used to determine when the accessibleName property has changed. The old value in the PropertyChangeEvent will be the old accessibleName and the new value will be the new accessibleName.
See Also:
getAccessibleName(), addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_DESCRIPTION_PROPERTY

public static final String ACCESSIBLE_DESCRIPTION_PROPERTY
Constant used to determine when the accessibleDescription property has changed. The old value in the PropertyChangeEvent will be the old accessibleDescription and the new value will be the new accessibleDescription.
See Also:
getAccessibleDescription(), addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_STATE_PROPERTY

public static final String ACCESSIBLE_STATE_PROPERTY
Constant used to determine when the accessibleStateSet property has changed. The old value will be the old AccessibleState and the new value will be the new AccessibleState in the accessibleStateSet. For example, if a component that supports the vertical and horizontal states changes its orientation from vertical to horizontal, the old value will be AccessibleState.VERTICAL and the new value will be AccessibleState.HORIZONTAL. Please note that either value can also be null. For example, when a component changes from being enabled to disabled, the old value will be AccessibleState.ENABLED and the new value will be null.
See Also:
getAccessibleStateSet(), AccessibleState, AccessibleStateSet, addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_VALUE_PROPERTY

public static final String ACCESSIBLE_VALUE_PROPERTY
Constant used to determine when the accessibleValue property has changed. The old value in the PropertyChangeEvent will be a Number representing the old value and the new value will be a Number representing the new value
See Also:
getAccessibleValue(), addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_SELECTION_PROPERTY

public static final String ACCESSIBLE_SELECTION_PROPERTY
Constant used to determine when the accessibleSelection has changed. The old and new values in the PropertyChangeEvent are currently reserved for future use.
See Also:
getAccessibleSelection(), addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_TEXT_PROPERTY

public static final String ACCESSIBLE_TEXT_PROPERTY
Constant used to determine when the accessibleText has changed. The old and new values in the PropertyChangeEvent are currently reserved for future use.
See Also:
getAccessibleText(), addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_CARET_PROPERTY

public static final String ACCESSIBLE_CARET_PROPERTY
Constant used to determine when the accessibleText caret has changed. The old value in the PropertyChangeEvent will be an integer representing the old caret position, and the new value will be an integer representing the new/current caret position.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_VISIBLE_DATA_PROPERTY

public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY
Constant used to determine when the visual appearance of the object has changed. The old and new values in the PropertyChangeEvent are currently reserved for future use.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_CHILD_PROPERTY

public static final String ACCESSIBLE_CHILD_PROPERTY
Constant used to determine when Accessible children are added/removed from the object. If an Accessible child is being added, the old value will be null and the new value will be the Accessible child. If an Accessible child is being removed, the old value will be the Accessible child, and the new value will be null.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY

public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY
Constant used to determine when the active descendant of a component has changed. The active descendant is used for objects such as list, tree, and table, which may have transient children. When the active descendant has changed, the old value of the property change event will be the Accessible representing the previous active child, and the new value will be the Accessible representing the current active child.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

ACCESSIBLE_TABLE_CAPTION_CHANGED

public static final String ACCESSIBLE_TABLE_CAPTION_CHANGED
Constant used to indicate that the table caption has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table caption and the new value will be an Accessible representing the new table caption.
See Also:
Accessible, AccessibleTable

ACCESSIBLE_TABLE_SUMMARY_CHANGED

public static final String ACCESSIBLE_TABLE_SUMMARY_CHANGED
Constant used to indicate that the table summary has changed The old value in the PropertyChangeEvent will be an Accessible representing the previous table summary and the new value will be an Accessible representing the new table summary.
See Also:
Accessible, AccessibleTable

ACCESSIBLE_TABLE_MODEL_CHANGED

public static final String ACCESSIBLE_TABLE_MODEL_CHANGED
Constant used to indicate that table data has changed. The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the table change.
See Also:
AccessibleTable, AccessibleTableModelChange

ACCESSIBLE_TABLE_ROW_HEADER_CHANGED

public static final String ACCESSIBLE_TABLE_ROW_HEADER_CHANGED
Constant used to indicate that the row header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
See Also:
AccessibleTable, AccessibleTableModelChange

ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED

public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED
Constant used to indicate that the row description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the row index.
See Also:
AccessibleTable

ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED

public static final String ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED
Constant used to indicate that the column header has changed The old value in the PropertyChangeEvent will be null and the new value will be an AccessibleTableModelChange representing the header change.
See Also:
AccessibleTable, AccessibleTableModelChange

ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED

public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED
Constant used to indicate that the column description has changed The old value in the PropertyChangeEvent will be null and the new value will be an Integer representing the column index.
See Also:
AccessibleTable

ACCESSIBLE_ACTION_PROPERTY

public static final String ACCESSIBLE_ACTION_PROPERTY
Constant used to indicate that the supported set of actions has changed. The old value in the PropertyChangeEvent will be an Integer representing the old number of actions supported and the new value will be an Integer representing the new number of actions supported.
See Also:
AccessibleAction

accessibleParent

protected Accessible accessibleParent
The accessible parent of this object.
See Also:
getAccessibleParent(), setAccessibleParent(javax.accessibility.Accessible)

accessibleName

protected String accessibleName
A localized String containing the name of the object.
See Also:
getAccessibleName(), setAccessibleName(java.lang.String)

accessibleDescription

protected String accessibleDescription
A localized String containing the description of the object.
See Also:
getAccessibleDescription(), setAccessibleDescription(java.lang.String)
Constructor Detail

AccessibleContext

public AccessibleContext()
Method Detail

getAccessibleName

public String getAccessibleName()
Gets the accessibleName property of this object. The accessibleName property of an object is a localized String that designates the purpose of the object. For example, the accessibleName property of a label or button might be the text of the label or button itself. In the case of an object that doesn't display its name, the accessibleName should still be set. For example, in the case of a text field used to enter the name of a city, the accessibleName for the en_US locale could be 'city.'
Returns:
the localized name of the object; null if this object does not have a name
See Also:
setAccessibleName(java.lang.String)

setAccessibleName

public void setAccessibleName(String s)
Sets the localized accessible name of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_NAME_PROPERTY property.
Parameters:
s - the new localized name of the object.
See Also:
getAccessibleName(), addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleDescription

public String getAccessibleDescription()
Gets the accessibleDescription property of this object. The accessibleDescription property of this object is a short localized phrase describing the purpose of the object. For example, in the case of a 'Cancel' button, the accessibleDescription could be 'Ignore changes and close dialog box.'
Returns:
the localized description of the object; null if this object does not have a description
See Also:
setAccessibleDescription(java.lang.String)

setAccessibleDescription

public void setAccessibleDescription(String s)
Sets the accessible description of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_DESCRIPTION_PROPERTY property.
Parameters:
s - the new localized description of the object
See Also:
setAccessibleName(java.lang.String), addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleRole

public abstract AccessibleRole getAccessibleRole()
Gets the role of this object. The role of the object is the generic purpose or use of the class of this object. For example, the role of a push button is AccessibleRole.PUSH_BUTTON. The roles in AccessibleRole are provided so component developers can pick from a set of predefined roles. This enables assistive technologies to provide a consistent interface to various tweaked subclasses of components (e.g., use AccessibleRole.PUSH_BUTTON for all components that act like a push button) as well as distinguish between sublasses that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes and AccessibleRole.RADIO_BUTTON for radio buttons).

Note that the AccessibleRole class is also extensible, so custom component developers can define their own AccessibleRole's if the set of predefined roles is inadequate.

Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public abstract AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object. The AccessibleStateSet of an object is composed of a set of unique AccessibleStates. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_STATE_PROPERTY property.
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleParent

public Accessible getAccessibleParent()
Gets the Accessible parent of this object.
Returns:
the Accessible parent of this object; null if this object does not have an Accessible parent

setAccessibleParent

public void setAccessibleParent(Accessible a)
Sets the Accessible parent of this object. This is meant to be used only in the situations where the actual component's parent should not be treated as the component's accessible parent and is a method that should only be called by the parent of the accessible child.
Parameters:
a - - Accessible to be set as the parent

getAccessibleIndexInParent

public abstract int getAccessibleIndexInParent()
Gets the 0-based index of this object in its accessible parent.
Returns:
the 0-based index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent(),
getAccessibleChildrenCount(),
getAccessibleChild(int)

getAccessibleChildrenCount

public abstract int getAccessibleChildrenCount()
Returns the number of accessible children of the object.
Returns:
the number of accessible children of the object.

getAccessibleChild

public abstract Accessible getAccessibleChild(int i)
Returns the specified Accessible child of the object. The Accessible children of an Accessible object are zero-based, so the first child of an Accessible child is at index 0, the second child is at index 1, and so on.
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object
See Also:
getAccessibleChildrenCount()

getLocale

public abstract Locale getLocale()
                          throws IllegalComponentStateException
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Returns:
this component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all Accessible properties and will be called when those properties change.
Parameters:
listener - The PropertyChangeListener to be added
See Also:
ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleAction

public AccessibleAction getAccessibleAction()
Gets the AccessibleAction associated with this object that supports one or more actions.
Returns:
AccessibleAction if supported by object; else return null
See Also:
AccessibleAction

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Gets the AccessibleComponent associated with this object that has a graphical representation.
Returns:
AccessibleComponent if supported by object; else return null
See Also:
AccessibleComponent

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
Returns:
AccessibleSelection if supported by object; else return null
See Also:
AccessibleSelection

getAccessibleText

public AccessibleText getAccessibleText()
Gets the AccessibleText associated with this object presently editable text on the display.
Returns:
AccessibleText if supported by object; else return null
See Also:
AccessibleText

getAccessibleValue

public AccessibleValue getAccessibleValue()
Gets the AccessibleValue associated with this object that supports a Numerical value.
Returns:
AccessibleValue if supported by object; else return null
See Also:
AccessibleValue

getAccessibleIcon

public AccessibleIcon[] getAccessibleIcon()
Gets the AccessibleIcons associated with an object that has one or more associated icons
Returns:
an array of AccessibleIcon if supported by object; otherwise return null
See Also:
AccessibleIcon

getAccessibleRelationSet

public AccessibleRelationSet getAccessibleRelationSet()
Gets the AccessibleRelationSet associated with an object
Returns:
an AccessibleRelationSet if supported by object; otherwise return null
See Also:
AccessibleRelationSet

getAccessibleTable

public AccessibleTable getAccessibleTable()
Gets the AccessibleTable associated with an object
Returns:
an AccessibleTable if supported by object; otherwise return null
See Also:
AccessibleTable

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
Support for reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEvent listener list is not empty, then fire a PropertyChange event to each listener. In general, this is for use by the Accessible objects themselves and should not be called by an application program.
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.
See Also:
PropertyChangeSupport, addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener), ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleHyperlink

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleHyperlink

java.lang.Object
  |
  +--javax.accessibility.AccessibleHyperlink
All Implemented Interfaces:
AccessibleAction
Direct Known Subclasses:
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
public abstract class AccessibleHyperlink
extends Object
implements AccessibleAction

Encapsulation of a link, or set of links (e.g. client side imagemap) in a Hypertext document

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleText, AccessibleContext.getAccessibleText()

Constructor Summary
AccessibleHyperlink()
Method Summary
abstract boolean | doAccessibleAction(int i) Performs the specified Action on the object
abstract Object | getAccessibleActionAnchor(int i) Returns an object that represents the link anchor, as appropriate for that link.
abstract int | getAccessibleActionCount() Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g.
abstract String | getAccessibleActionDescription(int i) Returns a String description of this particular link action.
abstract Object | getAccessibleActionObject(int i) Returns an object that represents the link action, as appropriate for that link.
abstract int | getEndIndex() Gets the index with the hypertext document at which this link ends
abstract int | getStartIndex() Gets the index with the hypertext document at which this link begins
abstract boolean | isValid() Since the document a link is associated with may have changed, this method returns whether or not this Link is still valid (with respect to the document it references).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AccessibleHyperlink

public AccessibleHyperlink()
Method Detail

isValid

public abstract boolean isValid()
Since the document a link is associated with may have changed, this method returns whether or not this Link is still valid (with respect to the document it references).
Returns:
a flag indicating whether this link is still valid with respect to the AccessibleHypertext it belongs to

getAccessibleActionCount

public abstract int getAccessibleActionCount()
Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g. in an HTML imagemap). In general, links will have only one AccessibleAction in them.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
the zero-based number of Actions in this object

doAccessibleAction

public abstract boolean doAccessibleAction(int i)
Performs the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the action was performed; otherwise false.
See Also:
getAccessibleActionCount()

getAccessibleActionDescription

public abstract String getAccessibleActionDescription(int i)
Returns a String description of this particular link action. This should be a text string associated with anchoring text, this should be the anchor text. E.g. from HTML: <a HREF="http://www.sun.com/access">Accessibility</a> this method would return "Accessibility". Similarly, from this HTML: <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a> this method would return "top hat"
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions
Returns:
a String description of the action
See Also:
getAccessibleActionCount()

getAccessibleActionObject

public abstract Object getAccessibleActionObject(int i)
Returns an object that represents the link action, as appropriate for that link. E.g. from HTML: <a HREF="http://www.sun.com/access">Accessibility</a> this method would return a java.net.URL("http://www.sun.com/access.html");
Parameters:
i - zero-based index of the actions
Returns:
an Object representing the hypertext link itself
See Also:
getAccessibleActionCount()

getAccessibleActionAnchor

public abstract Object getAccessibleActionAnchor(int i)
Returns an object that represents the link anchor, as appropriate for that link. E.g. from HTML: <a href="http://www.sun.com/access">Accessibility</a> this method would return a String containing the text: "Accessibility". Similarly, from this HTML: <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a> this might return the object ImageIcon("top-hat.gif", "top hat");
Parameters:
i - zero-based index of the actions
Returns:
an Object representing the hypertext anchor
See Also:
getAccessibleActionCount()

getStartIndex

public abstract int getStartIndex()
Gets the index with the hypertext document at which this link begins
Returns:
index of start of link

getEndIndex

public abstract int getEndIndex()
Gets the index with the hypertext document at which this link ends
Returns:
index of end of link
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleHypertext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleHypertext

All Superinterfaces:
AccessibleText
All Known Implementing Classes:
JEditorPane.JEditorPaneAccessibleHypertextSupport
public interface AccessibleHypertext
extends AccessibleText

The AccessibleHypertext class is the base class for all classes that present hypertext information on the display. This class provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. It also provides standard mechanisms for manipulating hyperlinks. Applications can determine if an object supports the AccessibleHypertext interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleText() method of AccessibleContext. If the return value is a class which extends AccessibleHypertext, then that object supports AccessibleHypertext.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleText, AccessibleContext.getAccessibleText()

Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Method Summary
AccessibleHyperlink | getLink(int linkIndex) Returns the nth Link of this Hypertext document.
int | getLinkCount() Returns the number of links within this hypertext document.
int | getLinkIndex(int charIndex) Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
Methods inherited from interface javax.accessibility.AccessibleText
getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart

Method Detail

getLinkCount

public int getLinkCount()
Returns the number of links within this hypertext document.
Returns:
number of links in this hypertext doc.

getLink

public AccessibleHyperlink getLink(int linkIndex)
Returns the nth Link of this Hypertext document.
Parameters:
linkIndex - within the links of this Hypertext
Returns:
Link object encapsulating the nth link(s)

getLinkIndex

public int getLinkIndex(int charIndex)
Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
Parameters:
charIndex - index within the text
Returns:
index into the set of hyperlinks for this hypertext doc.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleIcon

All Known Implementing Classes:
ImageIcon.AccessibleImageIcon
public interface AccessibleIcon

The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons). This interface provides the standard mechanism for an assistive technology to get descriptive information about icons. Applications can determine if an object supports the AccessibleIcon interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleIcon() method. If the return value is not null, the object supports this interface.

See Also:
Accessible, AccessibleContext

Method Summary
String | getAccessibleIconDescription() Gets the description of the icon.
int | getAccessibleIconHeight() Gets the height of the icon
int | getAccessibleIconWidth() Gets the width of the icon
void | setAccessibleIconDescription(String description) Sets the description of the icon.

Method Detail

getAccessibleIconDescription

public String getAccessibleIconDescription()
Gets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Returns:
the description of the icon

setAccessibleIconDescription

public void setAccessibleIconDescription(String description)
Sets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Parameters:
description - the description of the icon

getAccessibleIconWidth

public int getAccessibleIconWidth()
Gets the width of the icon
Returns:
the width of the icon.

getAccessibleIconHeight

public int getAccessibleIconHeight()
Gets the height of the icon
Returns:
the height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleRelation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleRelation

java.lang.Object
  |
  +--javax.accessibility.AccessibleBundle
        |
        +--javax.accessibility.AccessibleRelation
public class AccessibleRelation
extends AccessibleBundle

Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects. The actual relations that an object has with other objects are defined as an AccessibleRelationSet, which is a composed set of AccessibleRelations.

The toDisplayString method allows you to obtain the localized string for a locale independent key from a predefined ResourceBundle for the keys defined in this class.

The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. If the constants in this class are not sufficient to describe the role of an object, a subclass should be generated from this class and it should provide constants in a similar manner.

Field Summary
static String | CONTROLLED_BY Indicates an object is controlled by one or more target objects.
static String | CONTROLLED_BY_PROPERTY Identifies that the target object that is doing the controlling has changed
static String | CONTROLLER_FOR Indicates an object is a controller for one or more target objects.
static String | CONTROLLER_FOR_PROPERTY Identifies that the controller for the target object has changed
static String | LABEL_FOR Indicates an object is a label for one or more target objects.
static String | LABEL_FOR_PROPERTY Identifies that the target group for a label has changed
static String | LABELED_BY Indicates an object is labeled by one or more target objects.
static String | LABELED_BY_PROPERTY Identifies that the objects that are doing the labeling have changed
static String | MEMBER_OF Indicates an object is a member of a group of one or more target objects.
static String | MEMBER_OF_PROPERTY Identifies that group membership has changed.
Fields inherited from class javax.accessibility.AccessibleBundle
key
Constructor Summary
AccessibleRelation(String key)
Create a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String key, Object target)
Creates a new AccessibleRelation using the given locale independent key.
AccessibleRelation(String key, Object[] target)
Creates a new AccessibleRelation using the given locale independent key.
Method Summary
String | getKey() Returns the key for this relation
Object[] | getTarget() Returns the target objects for this relation
void | setTarget(Object target) Sets the target object for this relation
void | setTarget(Object[] target) Sets the target objects for this relation
Methods inherited from class javax.accessibility.AccessibleBundle
toDisplayString, toDisplayString, toDisplayString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LABEL_FOR

public static final String LABEL_FOR
Indicates an object is a label for one or more target objects.
See Also:
getTarget(), CONTROLLER_FOR, CONTROLLED_BY, LABELED_BY, MEMBER_OF

LABELED_BY

public static final String LABELED_BY
Indicates an object is labeled by one or more target objects.
See Also:
getTarget(), CONTROLLER_FOR, CONTROLLED_BY, LABEL_FOR, MEMBER_OF

MEMBER_OF

public static final String MEMBER_OF
Indicates an object is a member of a group of one or more target objects.
See Also:
getTarget(), CONTROLLER_FOR, CONTROLLED_BY, LABEL_FOR, LABELED_BY

CONTROLLER_FOR

public static final String CONTROLLER_FOR
Indicates an object is a controller for one or more target objects.
See Also:
getTarget(), CONTROLLED_BY, LABEL_FOR, LABELED_BY, MEMBER_OF

CONTROLLED_BY

public static final String CONTROLLED_BY
Indicates an object is controlled by one or more target objects.
See Also:
getTarget(), CONTROLLER_FOR, LABEL_FOR, LABELED_BY, MEMBER_OF

LABEL_FOR_PROPERTY

public static final String LABEL_FOR_PROPERTY
Identifies that the target group for a label has changed

LABELED_BY_PROPERTY

public static final String LABELED_BY_PROPERTY
Identifies that the objects that are doing the labeling have changed

MEMBER_OF_PROPERTY

public static final String MEMBER_OF_PROPERTY
Identifies that group membership has changed.

CONTROLLER_FOR_PROPERTY

public static final String CONTROLLER_FOR_PROPERTY
Identifies that the controller for the target object has changed

CONTROLLED_BY_PROPERTY

public static final String CONTROLLED_BY_PROPERTY
Identifies that the target object that is doing the controlling has changed
Constructor Detail

AccessibleRelation

public AccessibleRelation(String key)
Create a new AccessibleRelation using the given locale independent key.
Parameters:
key - the locale independent name of the relation.
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)

AccessibleRelation

public AccessibleRelation(String key,
                          Object target)
Creates a new AccessibleRelation using the given locale independent key.
Parameters:
key - the locale independent name of the relation.
target - the target object for this relation
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)

AccessibleRelation

public AccessibleRelation(String key,
                          Object[] target)
Creates a new AccessibleRelation using the given locale independent key.
Parameters:
key - the locale independent name of the relation.
target - the target object(s) for this relation
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Method Detail

getKey

public String getKey()
Returns the key for this relation
Returns:
the key for this relation
See Also:
CONTROLLER_FOR, CONTROLLED_BY, LABEL_FOR, LABELED_BY, MEMBER_OF

getTarget

public Object[] getTarget()
Returns the target objects for this relation
Returns:
an array containing the target objects for this relation

setTarget

public void setTarget(Object target)
Sets the target object for this relation
Parameters:
target - the target object for this relation

setTarget

public void setTarget(Object[] target)
Sets the target objects for this relation
Parameters:
target - an array containing the target objects for this relation
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleRelationSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleRelationSet

java.lang.Object
  |
  +--javax.accessibility.AccessibleRelationSet
public class AccessibleRelationSet
extends Object

Class AccessibleRelationSet determines a component's relation set. The relation set of a component is a set of AccessibleRelation objects that describe the component's relationships with other components.

See Also:
AccessibleRelation

Field Summary
protected  Vector relations
Each entry in the Vector represents an AccessibleRelation.
Constructor Summary
AccessibleRelationSet()
Creates a new empty relation set.
AccessibleRelationSet(AccessibleRelation[] relations)
Creates a new relation with the initial set of relations contained in the array of relations passed in.
Method Summary
boolean | add(AccessibleRelation relation) Adds a new relation to the current relation set if it is not already present.
void | addAll(AccessibleRelation[] relations) Adds all of the relations to the existing relation set.
void | clear() Removes all the relations from the current relation set.
boolean | contains(String key) Returns whether the relation set contains a relation that matches the specified key.
AccessibleRelation | get(String key) Returns the relation that matches the specified key.
boolean | remove(AccessibleRelation relation) Removes a relation from the current relation set.
int | size() Returns the number of relations in the relation set.
AccessibleRelation[] | toArray() Returns the current relation set as an array of AccessibleRelation
String | toString() Creates a localized String representing all the relations in the set using the default locale.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

relations

protected Vector relations
Each entry in the Vector represents an AccessibleRelation.
See Also:
add(javax.accessibility.AccessibleRelation),
addAll(javax.accessibility.AccessibleRelation[]),
remove(javax.accessibility.AccessibleRelation),
contains(java.lang.String),
get(java.lang.String),
size(),
toArray(),
clear()
Constructor Detail

AccessibleRelationSet

public AccessibleRelationSet()
Creates a new empty relation set.

AccessibleRelationSet

public AccessibleRelationSet(AccessibleRelation[] relations)
Creates a new relation with the initial set of relations contained in the array of relations passed in. Duplicate entries are ignored.
Parameters:
relation - an array of AccessibleRelation describing the relation set.
Method Detail

add

public boolean add(AccessibleRelation relation)
Adds a new relation to the current relation set if it is not already present. If the relation is already in the relation set, the relation set is unchanged and the return value is false. Otherwise, the relation is added to the relation set and the return value is true.
Parameters:
relation - the relation to add to the relation set
Returns:
true if relation is added to the relation set; false if the relation set is unchanged

addAll

public void addAll(AccessibleRelation[] relations)
Adds all of the relations to the existing relation set. Duplicate entries are ignored.
Parameters:
relation - AccessibleRelation array describing the relation set.

remove

public boolean remove(AccessibleRelation relation)
Removes a relation from the current relation set. If the relation is not in the set, the relation set will be unchanged and the return value will be false. If the relation is in the relation set, it will be removed from the set and the return value will be true.
Parameters:
relation - the relation to remove from the relation set
Returns:
true if the relation is in the relation set; false if the relation set is unchanged

clear

public void clear()
Removes all the relations from the current relation set.

size

public int size()
Returns the number of relations in the relation set.

contains

public boolean contains(String key)
Returns whether the relation set contains a relation that matches the specified key.
Parameters:
key - the AccessibleRelation key
Returns:
true if the relation is in the relation set; otherwise false

get

public AccessibleRelation get(String key)
Returns the relation that matches the specified key.
Parameters:
key - the AccessibleRelation key
Returns:
the relation, if one exists, that matches the specified key. Otherwise, null is returned.

toArray

public AccessibleRelation[] toArray()
Returns the current relation set as an array of AccessibleRelation
Returns:
AccessibleRelation array contacting the current relation.

toString

public String toString()
Creates a localized String representing all the relations in the set using the default locale.
Overrides:
toString in class Object
Returns:
comma separated localized String
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleResourceBundle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleResourceBundle

java.lang.Object
  |
  +--java.util.ResourceBundle
        |
        +--java.util.ListResourceBundle
              |
              +--javax.accessibility.AccessibleResourceBundle
Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.

public class AccessibleResourceBundle
extends ListResourceBundle

A resource bundle containing the localized strings in the accessibility package. This is meant only for internal use by Java Accessibility and is not meant to be used by assistive technologies or applications.

Fields inherited from class java.util.ResourceBundle
parent
Constructor Summary
AccessibleResourceBundle()
Deprecated.
Method Summary
 Object[][] getContents()
Deprecated. Returns the mapping between the programmatic keys and the localized display strings.
Methods inherited from class java.util.ListResourceBundle
getKeys, handleGetObject
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AccessibleResourceBundle

public AccessibleResourceBundle()
Deprecated.
Method Detail

getContents

public Object[][] getContents()
Deprecated.
Returns the mapping between the programmatic keys and the localized display strings.
Overrides:
getContents in class ListResourceBundle
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleRole

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleRole

java.lang.Object
  |
  +--javax.accessibility.AccessibleBundle
        |
        +--javax.accessibility.AccessibleRole
public class AccessibleRole
extends AccessibleBundle

Class AccessibleRole determines the role of a component. The role of a component describes its generic function. (E.G., "push button," "table," or "list.")

The toDisplayString method allows you to obtain the localized string for a locale independent key from a predefined ResourceBundle for the keys defined in this class.

The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. If the constants in this class are not sufficient to describe the role of an object, a subclass should be generated from this class and it should provide constants in a similar manner.

Field Summary
static AccessibleRole | ALERT Object is used to alert the user about something.
static AccessibleRole | AWT_COMPONENT An AWT component, but nothing else is known about it.
static AccessibleRole | CANVAS Object that can be drawn into and is used to trap events.
static AccessibleRole | CHECK_BOX A choice that can be checked or unchecked and provides a separate indicator for the current state.
static AccessibleRole | COLOR_CHOOSER A specialized dialog that lets the user choose a color.
static AccessibleRole | COLUMN_HEADER The header for a column of data.
static AccessibleRole | COMBO_BOX A list of choices the user can select from.
static AccessibleRole | DESKTOP_ICON An iconified internal frame in a DESKTOP_PANE.
static AccessibleRole | DESKTOP_PANE A pane that supports internal frames and iconified versions of those internal frames.
static AccessibleRole | DIALOG A top level window with title bar and a border.
static AccessibleRole | DIRECTORY_PANE A pane that allows the user to navigate through and select the contents of a directory.
static AccessibleRole | FILE_CHOOSER A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename.
static AccessibleRole | FILLER An object that fills up space in a user interface.
static AccessibleRole | FRAME A top level window with a title bar, border, menu bar, etc.
static AccessibleRole | GLASS_PANE A pane that is guaranteed to be painted on top of all panes beneath it.
static AccessibleRole | ICON A small fixed size picture, typically used to decorate components.
static AccessibleRole | INTERNAL_FRAME A frame-like object that is clipped by a desktop pane.
static AccessibleRole | LABEL An object used to present an icon or short string in an interface.
static AccessibleRole | LAYERED_PANE A specialized pane that allows its children to be drawn in layers, providing a form of stacking order.
static AccessibleRole | LIST An object that presents a list of objects to the user and allows the user to select one or more of them.
static AccessibleRole | LIST_ITEM An object that presents an element in a list.
static AccessibleRole | MENU An object usually found inside a menu bar that contains a list of actions the user can choose from.
static AccessibleRole | MENU_BAR An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from.
static AccessibleRole | MENU_ITEM An object usually contained in a menu that presents an action the user can choose.
static AccessibleRole | OPTION_PANE A specialized pane whose primary use is inside a DIALOG
static AccessibleRole | PAGE_TAB An object that is a child of a page tab list.
static AccessibleRole | PAGE_TAB_LIST An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object.
static AccessibleRole | PANEL A generic container that is often used to group objects.
static AccessibleRole | PASSWORD_TEXT A text object used for passwords, or other places where the text contents is not shown visibly to the user
static AccessibleRole | POPUP_MENU A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices.
static AccessibleRole | PROGRESS_BAR An object used to indicate how much of a task has been completed.
static AccessibleRole | PUSH_BUTTON An object the user can manipulate to tell the application to do something.
static AccessibleRole | RADIO_BUTTON A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked.
static AccessibleRole | ROOT_PANE A specialized pane that has a glass pane and a layered pane as its children.
static AccessibleRole | ROW_HEADER The header for a row of data.
static AccessibleRole | SCROLL_BAR An object usually used to allow a user to incrementally view a large amount of data.
static AccessibleRole | SCROLL_PANE An object that allows a user to incrementally view a large amount of information.
static AccessibleRole | SEPARATOR An object usually contained in a menu to provide a visual and logical separation of the contents in a menu.
static AccessibleRole | SLIDER An object that allows the user to select from a bounded range.
static AccessibleRole | SPLIT_PANE A specialized panel that presents two other panels at the same time.
static AccessibleRole | SWING_COMPONENT A Swing component, but nothing else is known about it.
static AccessibleRole | TABLE An object used to present information in terms of rows and columns.
static AccessibleRole | TEXT An object that presents text to the user.
static AccessibleRole | TOGGLE_BUTTON A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
static AccessibleRole | TOOL_BAR A bar or palette usually composed of push buttons or toggle buttons.
static AccessibleRole | TOOL_TIP An object that provides information about another object.
static AccessibleRole | TREE An object used to present hierarchical information to the user.
static AccessibleRole | UNKNOWN The object contains some Accessible information, but its role is not known.
static AccessibleRole | VIEWPORT An object usually used in a scroll pane.
static AccessibleRole | WINDOW A top level window with no title or border.
Fields inherited from class javax.accessibility.AccessibleBundle
key
Constructor Summary
protected AccessibleRole(String key)
Creates a new AccessibleRole using the given locale independent key.
Methods inherited from class javax.accessibility.AccessibleBundle
toDisplayString, toDisplayString, toDisplayString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ALERT

public static final AccessibleRole ALERT
Object is used to alert the user about something.

COLUMN_HEADER

public static final AccessibleRole COLUMN_HEADER
The header for a column of data.

CANVAS

public static final AccessibleRole CANVAS
Object that can be drawn into and is used to trap events.
See Also:
FRAME, GLASS_PANE, LAYERED_PANE

COMBO_BOX

public static final AccessibleRole COMBO_BOX
A list of choices the user can select from. Also optionally allows the user to enter a choice of their own.

DESKTOP_ICON

public static final AccessibleRole DESKTOP_ICON
An iconified internal frame in a DESKTOP_PANE.
See Also:
DESKTOP_PANE, INTERNAL_FRAME

INTERNAL_FRAME

public static final AccessibleRole INTERNAL_FRAME
A frame-like object that is clipped by a desktop pane. The desktop pane, internal frame, and desktop icon objects are often used to create multiple document interfaces within an application.
See Also:
DESKTOP_ICON, DESKTOP_PANE, FRAME

DESKTOP_PANE

public static final AccessibleRole DESKTOP_PANE
A pane that supports internal frames and iconified versions of those internal frames.
See Also:
DESKTOP_ICON, INTERNAL_FRAME

OPTION_PANE

public static final AccessibleRole OPTION_PANE
A specialized pane whose primary use is inside a DIALOG
See Also:
DIALOG

WINDOW

public static final AccessibleRole WINDOW
A top level window with no title or border.
See Also:
FRAME, DIALOG

FRAME

public static final AccessibleRole FRAME
A top level window with a title bar, border, menu bar, etc. It is often used as the primary window for an application.
See Also:
DIALOG, CANVAS, WINDOW

DIALOG

public static final AccessibleRole DIALOG
A top level window with title bar and a border. A dialog is similar to a frame, but it has fewer properties and is often used as a secondary window for an application.
See Also:
FRAME, WINDOW

COLOR_CHOOSER

public static final AccessibleRole COLOR_CHOOSER
A specialized dialog that lets the user choose a color.

DIRECTORY_PANE

public static final AccessibleRole DIRECTORY_PANE
A pane that allows the user to navigate through and select the contents of a directory. May be used by a file chooser.
See Also:
FILE_CHOOSER

FILE_CHOOSER

public static final AccessibleRole FILE_CHOOSER
A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename. May use the directory pane to show the contents of a directory.
See Also:
DIRECTORY_PANE

FILLER

public static final AccessibleRole FILLER
An object that fills up space in a user interface. It is often used in interfaces to tweak the spacing between components, but serves no other purpose.

ICON

public static final AccessibleRole ICON
A small fixed size picture, typically used to decorate components.

LABEL

public static final AccessibleRole LABEL
An object used to present an icon or short string in an interface.

ROOT_PANE

public static final AccessibleRole ROOT_PANE
A specialized pane that has a glass pane and a layered pane as its children.
See Also:
GLASS_PANE, LAYERED_PANE

GLASS_PANE

public static final AccessibleRole GLASS_PANE
A pane that is guaranteed to be painted on top of all panes beneath it.
See Also:
ROOT_PANE, CANVAS

LAYERED_PANE

public static final AccessibleRole LAYERED_PANE
A specialized pane that allows its children to be drawn in layers, providing a form of stacking order. This is usually the pane that holds the menu bar as well as the pane that contains most of the visual components in a window.
See Also:
GLASS_PANE, ROOT_PANE

LIST

public static final AccessibleRole LIST
An object that presents a list of objects to the user and allows the user to select one or more of them. A list is usually contained within a scroll pane.
See Also:
SCROLL_PANE, LIST_ITEM

LIST_ITEM

public static final AccessibleRole LIST_ITEM
An object that presents an element in a list. A list is usually contained within a scroll pane.
See Also:
SCROLL_PANE, LIST

MENU_BAR

public static final AccessibleRole MENU_BAR
An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from. For example, a menu bar might contain menus for "File," "Edit," and "Help."
See Also:
MENU, POPUP_MENU, LAYERED_PANE

POPUP_MENU

public static final AccessibleRole POPUP_MENU
A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices.
See Also:
MENU, MENU_ITEM

MENU

public static final AccessibleRole MENU
An object usually found inside a menu bar that contains a list of actions the user can choose from. A menu can have any object as its children, but most often they are menu items, other menus, or rudimentary objects such as radio buttons, check boxes, or separators. For example, an application may have an "Edit" menu that contains menu items for "Cut" and "Paste."
See Also:
MENU_BAR, MENU_ITEM, SEPARATOR, RADIO_BUTTON, CHECK_BOX, POPUP_MENU

MENU_ITEM

public static final AccessibleRole MENU_ITEM
An object usually contained in a menu that presents an action the user can choose. For example, the "Cut" menu item in an "Edit" menu would be an action the user can select to cut the selected area of text in a document.
See Also:
MENU_BAR, SEPARATOR, POPUP_MENU

SEPARATOR

public static final AccessibleRole SEPARATOR
An object usually contained in a menu to provide a visual and logical separation of the contents in a menu. For example, the "File" menu of an application might contain menu items for "Open," "Close," and "Exit," and will place a separator between "Close" and "Exit" menu items.
See Also:
MENU, MENU_ITEM

PAGE_TAB_LIST

public static final AccessibleRole PAGE_TAB_LIST
An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object. The most common mechanism is a list of tabs at the top of the panel. The children of a page tab list are all page tabs.
See Also:
PAGE_TAB

PAGE_TAB

public static final AccessibleRole PAGE_TAB
An object that is a child of a page tab list. Its sole child is the panel that is to be presented to the user when the user selects the page tab from the list of tabs in the page tab list.
See Also:
PAGE_TAB_LIST

PANEL

public static final AccessibleRole PANEL
A generic container that is often used to group objects.

PROGRESS_BAR

public static final AccessibleRole PROGRESS_BAR
An object used to indicate how much of a task has been completed.

PASSWORD_TEXT

public static final AccessibleRole PASSWORD_TEXT
A text object used for passwords, or other places where the text contents is not shown visibly to the user

PUSH_BUTTON

public static final AccessibleRole PUSH_BUTTON
An object the user can manipulate to tell the application to do something.
See Also:
CHECK_BOX, TOGGLE_BUTTON, RADIO_BUTTON

TOGGLE_BUTTON

public static final AccessibleRole TOGGLE_BUTTON
A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
See Also:
PUSH_BUTTON, CHECK_BOX, RADIO_BUTTON

CHECK_BOX

public static final AccessibleRole CHECK_BOX
A choice that can be checked or unchecked and provides a separate indicator for the current state.
See Also:
PUSH_BUTTON, TOGGLE_BUTTON, RADIO_BUTTON

RADIO_BUTTON

public static final AccessibleRole RADIO_BUTTON
A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked.
See Also:
PUSH_BUTTON, TOGGLE_BUTTON, CHECK_BOX

ROW_HEADER

public static final AccessibleRole ROW_HEADER
The header for a row of data.

SCROLL_PANE

public static final AccessibleRole SCROLL_PANE
An object that allows a user to incrementally view a large amount of information. Its children can include scroll bars and a viewport.
See Also:
SCROLL_BAR, VIEWPORT

SCROLL_BAR

public static final AccessibleRole SCROLL_BAR
An object usually used to allow a user to incrementally view a large amount of data. Usually used only by a scroll pane.
See Also:
SCROLL_PANE

VIEWPORT

public static final AccessibleRole VIEWPORT
An object usually used in a scroll pane. It represents the portion of the entire data that the user can see. As the user manipulates the scroll bars, the contents of the viewport can change.
See Also:
SCROLL_PANE

SLIDER

public static final AccessibleRole SLIDER
An object that allows the user to select from a bounded range. For example, a slider might be used to select a number between 0 and 100.

SPLIT_PANE

public static final AccessibleRole SPLIT_PANE
A specialized panel that presents two other panels at the same time. Between the two panels is a divider the user can manipulate to make one panel larger and the other panel smaller.

TABLE

public static final AccessibleRole TABLE
An object used to present information in terms of rows and columns. An example might include a spreadsheet application.

TEXT

public static final AccessibleRole TEXT
An object that presents text to the user. The text is usually editable by the user as opposed to a label.
See Also:
LABEL

TREE

public static final AccessibleRole TREE
An object used to present hierarchical information to the user. The individual nodes in the tree can be collapsed and expanded to provide selective disclosure of the tree's contents.

TOOL_BAR

public static final AccessibleRole TOOL_BAR
A bar or palette usually composed of push buttons or toggle buttons. It is often used to provide the most frequently used functions for an application.

TOOL_TIP

public static final AccessibleRole TOOL_TIP
An object that provides information about another object. The accessibleDescription property of the tool tip is often displayed to the user in a small "help bubble" when the user causes the mouse to hover over the object associated with the tool tip.

AWT_COMPONENT

public static final AccessibleRole AWT_COMPONENT
An AWT component, but nothing else is known about it.
See Also:
SWING_COMPONENT, UNKNOWN

SWING_COMPONENT

public static final AccessibleRole SWING_COMPONENT
A Swing component, but nothing else is known about it.
See Also:
AWT_COMPONENT, UNKNOWN

UNKNOWN

public static final AccessibleRole UNKNOWN
The object contains some Accessible information, but its role is not known.
See Also:
AWT_COMPONENT, SWING_COMPONENT
Constructor Detail

AccessibleRole

protected AccessibleRole(String key)
Creates a new AccessibleRole using the given locale independent key. This should not be a public method. Instead, it is used to create the constants in this file to make it a strongly typed enumeration. Subclasses of this class should enforce similar policy.
Parameters:
key - the locale independent name of the role.
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleSelection

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleSelection

All Known Implementing Classes:
List.AccessibleAWTList, MenuComponent.AccessibleAWTMenuComponent, JTabbedPane.AccessibleJTabbedPane, JMenu.AccessibleJMenu, JComboBox.AccessibleJComboBox, JList.AccessibleJList, JTree.AccessibleJTree, JTree.AccessibleJTree.AccessibleJTreeNode, JTable.AccessibleJTable, JMenuBar.AccessibleJMenuBar
public interface AccessibleSelection

This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set. Any object that has children that can be selected should support the AccessibleSelection interface. Applications can determine if an object supports the AccessibleSelection interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleSelection() method. If the return value is not null, the object supports this interface.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleSelection()

Method Summary
void | addAccessibleSelection(int i) Adds the specified Accessible child of the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected child of the object.
int | getAccessibleSelectionCount() Returns the number of Accessible children currently selected.
boolean | isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
void | removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection.
void | selectAllAccessibleSelection() Causes every child of the object to be selected if the object supports multiple selections.

Method Detail

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected child of the object. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null.

Note that the index represents the i-th selected child, which is different from the i-th child.

Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.
Parameters:
i - the zero-based index of the child in this Accessible object.
Returns:
true if the current child of this object is selected; else false.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified Accessible child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect.
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleState

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleState

java.lang.Object
  |
  +--javax.accessibility.AccessibleBundle
        |
        +--javax.accessibility.AccessibleState
public class AccessibleState
extends AccessibleBundle

Class AccessibleState describes a component's particular state. The actual state of the component is defined as an AccessibleStateSet, which is a composed set of AccessibleStates.

The toDisplayString method allows you to obtain the localized string for a locale independent key from a predefined ResourceBundle for the keys defined in this class.

The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. If the constants in this class are not sufficient to describe the role of an object, a subclass should be generated from this class and it should provide constants in a similar manner.

Field Summary
static AccessibleState | ACTIVE Indicates a window is currently the active window.
static AccessibleState | ARMED Indicates that the object is armed.
static AccessibleState | BUSY Indicates the current object is busy.
static AccessibleState | CHECKED Indicates this object is currently checked.
static AccessibleState | COLLAPSED Indicates this object is collapsed.
static AccessibleState | EDITABLE Indicates the user can change the contents of this object.
static AccessibleState | ENABLED Indicates this object is enabled.
static AccessibleState | EXPANDABLE Indicates this object allows progressive disclosure of its children.
static AccessibleState | EXPANDED Indicates this object is expanded.
static AccessibleState | FOCUSABLE Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus.
static AccessibleState | FOCUSED Indicates this object currently has the keyboard focus.
static AccessibleState | HORIZONTAL Indicates the orientation of this object is horizontal.
static AccessibleState | ICONIFIED Indicates this object is minimized and is represented only by an icon.
static AccessibleState | MODAL Indicates something must be done with this object before the user can interact with an object in a different window.
static AccessibleState | MULTI_LINE Indicates this (text) object can contain multiple lines of text
static AccessibleState | MULTISELECTABLE Indicates this object allows more than one of its children to be selected at the same time.
static AccessibleState | OPAQUE Indicates this object paints every pixel within its rectangular region.
static AccessibleState | PRESSED Indicates this object is currently pressed.
static AccessibleState | RESIZABLE Indicates the size of this object is not fixed.
static AccessibleState | SELECTABLE Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that can be selected.
static AccessibleState | SELECTED Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that has been selected.
static AccessibleState | SHOWING Indicates this object, the object's parent, the object's parent's parent, and so on, are all visible.
static AccessibleState | SINGLE_LINE Indicates this (text) object can contain only a single line of text
static AccessibleState | TRANSIENT Indicates this object is transient.
static AccessibleState | VERTICAL Indicates the orientation of this object is vertical.
static AccessibleState | VISIBLE Indicates this object is visible.
Fields inherited from class javax.accessibility.AccessibleBundle
key
Constructor Summary
protected AccessibleState(String key)
Creates a new AccessibleState using the given locale independent key.
Methods inherited from class javax.accessibility.AccessibleBundle
toDisplayString, toDisplayString, toDisplayString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ACTIVE

public static final AccessibleState ACTIVE
Indicates a window is currently the active window. This includes windows, dialogs, frames, etc. In addition, this state is used to indicate the currently active child of a component such as a list, table, or tree. For example, the active child of a list is the child that is drawn with a rectangle around it.
See Also:
AccessibleRole.WINDOW, AccessibleRole.FRAME, AccessibleRole.DIALOG

PRESSED

public static final AccessibleState PRESSED
Indicates this object is currently pressed. This is usually associated with buttons and indicates the user has pressed a mouse button while the pointer was over the button and has not yet released the mouse button.
See Also:
AccessibleRole.PUSH_BUTTON

ARMED

public static final AccessibleState ARMED
Indicates that the object is armed. This is usually used on buttons that have been pressed but not yet released, and the mouse pointer is still over the button.
See Also:
AccessibleRole.PUSH_BUTTON

BUSY

public static final AccessibleState BUSY
Indicates the current object is busy. This is usually used on objects such as progress bars, sliders, or scroll bars to indicate they are in a state of transition.
See Also:
AccessibleRole.PROGRESS_BAR, AccessibleRole.SCROLL_BAR, AccessibleRole.SLIDER

CHECKED

public static final AccessibleState CHECKED
Indicates this object is currently checked. This is usually used on objects such as toggle buttons, radio buttons, and check boxes.
See Also:
AccessibleRole.TOGGLE_BUTTON, AccessibleRole.RADIO_BUTTON, AccessibleRole.CHECK_BOX

EDITABLE

public static final AccessibleState EDITABLE
Indicates the user can change the contents of this object. This is usually used primarily for objects that allow the user to enter text. Other objects, such as scroll bars and sliders, are automatically editable if they are enabled.
See Also:
ENABLED

EXPANDABLE

public static final AccessibleState EXPANDABLE
Indicates this object allows progressive disclosure of its children. This is usually used with hierarchical objects such as trees and is often paired with the EXPANDED or COLLAPSED states.
See Also:
EXPANDED, COLLAPSED, AccessibleRole.TREE

COLLAPSED

public static final AccessibleState COLLAPSED
Indicates this object is collapsed. This is usually paired with the EXPANDABLE state and is used on objects that provide progressive disclosure such as trees.
See Also:
EXPANDABLE, EXPANDED, AccessibleRole.TREE

EXPANDED

public static final AccessibleState EXPANDED
Indicates this object is expanded. This is usually paired with the EXPANDABLE state and is used on objects that provide progressive disclosure such as trees.
See Also:
EXPANDABLE, COLLAPSED, AccessibleRole.TREE

ENABLED

public static final AccessibleState ENABLED
Indicates this object is enabled. The absence of this state from an object's state set indicates this object is not enabled. An object that is not enabled cannot be manipulated by the user. In a graphical display, it is usually grayed out.

FOCUSABLE

public static final AccessibleState FOCUSABLE
Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus.
See Also:
FOCUSED

FOCUSED

public static final AccessibleState FOCUSED
Indicates this object currently has the keyboard focus.
See Also:
FOCUSABLE

ICONIFIED

public static final AccessibleState ICONIFIED
Indicates this object is minimized and is represented only by an icon. This is usually only associated with frames and internal frames.
See Also:
AccessibleRole.FRAME, AccessibleRole.INTERNAL_FRAME

MODAL

public static final AccessibleState MODAL
Indicates something must be done with this object before the user can interact with an object in a different window. This is usually associated only with dialogs.
See Also:
AccessibleRole.DIALOG

OPAQUE

public static final AccessibleState OPAQUE
Indicates this object paints every pixel within its rectangular region. A non-opaque component paints only some of its pixels, allowing the pixels underneath it to "show through". A component that does not fully paint its pixels therefore provides a degree of transparency.
See Also:
Accessible.getAccessibleContext(),
AccessibleContext.getAccessibleComponent(),
AccessibleComponent.getBounds()

RESIZABLE

public static final AccessibleState RESIZABLE
Indicates the size of this object is not fixed.
See Also:
Accessible.getAccessibleContext(),
AccessibleContext.getAccessibleComponent(),
AccessibleComponent.getSize(),
AccessibleComponent.setSize(java.awt.Dimension)

MULTISELECTABLE

public static final AccessibleState MULTISELECTABLE
Indicates this object allows more than one of its children to be selected at the same time.
See Also:
Accessible.getAccessibleContext(), AccessibleContext.getAccessibleSelection(), AccessibleSelection

SELECTABLE

public static final AccessibleState SELECTABLE
Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that can be selected.
See Also:
SELECTED, Accessible.getAccessibleContext(), AccessibleContext.getAccessibleSelection(), AccessibleSelection

SELECTED

public static final AccessibleState SELECTED
Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that has been selected.
See Also:
SELECTABLE, Accessible.getAccessibleContext(), AccessibleContext.getAccessibleSelection(), AccessibleSelection

SHOWING

public static final AccessibleState SHOWING
Indicates this object, the object's parent, the object's parent's parent, and so on, are all visible. Note that this does not necessarily mean the object is painted on the screen. It might be occluded by some other showing object.
See Also:
VISIBLE

VISIBLE

public static final AccessibleState VISIBLE
Indicates this object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen because one of the objects that this object is contained by is not visible.
See Also:
SHOWING

VERTICAL

public static final AccessibleState VERTICAL
Indicates the orientation of this object is vertical. This is usually associated with objects such as scrollbars, sliders, and progress bars.
See Also:
VERTICAL, AccessibleRole.SCROLL_BAR, AccessibleRole.SLIDER, AccessibleRole.PROGRESS_BAR

HORIZONTAL

public static final AccessibleState HORIZONTAL
Indicates the orientation of this object is horizontal. This is usually associated with objects such as scrollbars, sliders, and progress bars.
See Also:
HORIZONTAL, AccessibleRole.SCROLL_BAR, AccessibleRole.SLIDER, AccessibleRole.PROGRESS_BAR

SINGLE_LINE

public static final AccessibleState SINGLE_LINE
Indicates this (text) object can contain only a single line of text

MULTI_LINE

public static final AccessibleState MULTI_LINE
Indicates this (text) object can contain multiple lines of text

TRANSIENT

public static final AccessibleState TRANSIENT
Indicates this object is transient. An assistive technology should not add a PropertyChange listener to an object with transient state, as that object will never generate any events. Transient objects are typically created to answer Java Accessibility method queries, but otherwise do not remain linked to the underlying object (for example, those objects underneath lists, tables, and trees in Swing, where only one actual UI Component does shared rendering duty for all of the data objects underneath the actual list/table/tree elements).
Constructor Detail

AccessibleState

protected AccessibleState(String key)
Creates a new AccessibleState using the given locale independent key. This should not be a public method. Instead, it is used to create the constants in this file to make it a strongly typed enumeration. Subclasses of this class should enforce similar policy.
Parameters:
key - the locale independent name of the state.
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleStateSet

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Class AccessibleStateSet

java.lang.Object
  |
  +--javax.accessibility.AccessibleStateSet
public class AccessibleStateSet
extends Object

Class AccessibleStateSet determines a component's state set. The state set of a component is a set of AccessibleState objects and descriptions. E.G., The current overall state of the object, such as whether it is enabled, has focus, etc.

See Also:
AccessibleState

Field Summary
protected  Vector states
Each entry in the Vector represents an AccessibleState.
Constructor Summary
AccessibleStateSet()
Creates a new empty state set.
AccessibleStateSet(AccessibleState[] states)
Creates a new state with the initial set of states contained in the array of states passed in.
Method Summary
boolean | add(AccessibleState state) Adds a new state to the current state set if it is not already present.
void | addAll(AccessibleState[] states) Adds all of the states to the existing state set.
void | clear() Removes all the states from the current state set.
boolean | contains(AccessibleState state) Checks if the current state is in the state set.
boolean | remove(AccessibleState state) Removes a state from the current state set.
AccessibleState[] | toArray() Returns the current state set as an array of AccessibleState
String | toString() Creates a localized String representing all the states in the set using the default locale.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

states

protected Vector states
Each entry in the Vector represents an AccessibleState.
See Also:
add(javax.accessibility.AccessibleState),
addAll(javax.accessibility.AccessibleState[]),
remove(javax.accessibility.AccessibleState),
contains(javax.accessibility.AccessibleState),
toArray(),
clear()
Constructor Detail

AccessibleStateSet

public AccessibleStateSet()
Creates a new empty state set.

AccessibleStateSet

public AccessibleStateSet(AccessibleState[] states)
Creates a new state with the initial set of states contained in the array of states passed in. Duplicate entries are ignored.
Parameters:
state - an array of AccessibleState describing the state set.
Method Detail

add

public boolean add(AccessibleState state)
Adds a new state to the current state set if it is not already present. If the state is already in the state set, the state set is unchanged and the return value is false. Otherwise, the state is added to the state set and the return value is true.
Parameters:
state - the state to add to the state set
Returns:
true if state is added to the state set; false if the state set is unchanged

addAll

public void addAll(AccessibleState[] states)
Adds all of the states to the existing state set. Duplicate entries are ignored.
Parameters:
state - AccessibleState array describing the state set.

remove

public boolean remove(AccessibleState state)
Removes a state from the current state set. If the state is not in the set, the state set will be unchanged and the return value will be false. If the state is in the state set, it will be removed from the set and the return value will be true.
Parameters:
state - the state to remove from the state set
Returns:
true if the state is in the state set; false if the state set will be unchanged

clear

public void clear()
Removes all the states from the current state set.

contains

public boolean contains(AccessibleState state)
Checks if the current state is in the state set.
Parameters:
state - the state
Returns:
true if the state is in the state set; otherwise false

toArray

public AccessibleState[] toArray()
Returns the current state set as an array of AccessibleState
Returns:
AccessibleState array containing the current state.

toString

public String toString()
Creates a localized String representing all the states in the set using the default locale.
Overrides:
toString in class Object
Returns:
comma separated localized String
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessibleTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleTable

All Known Implementing Classes:
JTable.AccessibleJTable
public interface AccessibleTable

Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.

Method Summary
Accessible | getAccessibleAt(int r, int c) Returns the Accessible at a specified row and column in the table.
Accessible | getAccessibleCaption() Returns the caption for the table.
int | getAccessibleColumnCount() Returns the number of columns in the table.
Accessible | getAccessibleColumnDescription(int c) Returns the description text of the specified column in the table.
int | getAccessibleColumnExtentAt(int r, int c) Returns the number of columns occupied by the Accessible at a specified row and column in the table.
AccessibleTable | getAccessibleColumnHeader() Returns the column headers as an AccessibleTable.
int | getAccessibleRowCount() Returns the number of rows in the table.
Accessible | getAccessibleRowDescription(int r) Returns the description of the specified row in the table.
int | getAccessibleRowExtentAt(int r, int c) Returns the number of rows occupied by the Accessible at a specified row and column in the table.
AccessibleTable | getAccessibleRowHeader() Returns the row headers as an AccessibleTable.
Accessible | getAccessibleSummary() Returns the summary description of the table.
int[] | getSelectedAccessibleColumns() Returns the selected columns in a table.
int[] | getSelectedAccessibleRows() Returns the selected rows in a table.
boolean | isAccessibleColumnSelected(int c) Returns a boolean value indicating whether the specified column is selected.
boolean | isAccessibleRowSelected(int r) Returns a boolean value indicating whether the specified row is selected.
boolean | isAccessibleSelected(int r, int c) Returns a boolean value indicating whether the accessible at a specified row and column is selected.
void | setAccessibleCaption(Accessible a) Sets the caption for the table.
void | setAccessibleColumnDescription(int c, Accessible a) Sets the description text of the specified column in the table.
void | setAccessibleColumnHeader(AccessibleTable table) Sets the column headers.
void | setAccessibleRowDescription(int r, Accessible a) Sets the description text of the specified row of the table.
void | setAccessibleRowHeader(AccessibleTable table) Sets the row headers.
void | setAccessibleSummary(Accessible a) Sets the summary description of the table

Method Detail

getAccessibleCaption

public Accessible getAccessibleCaption()
Returns the caption for the table.
Returns:
the caption for the table

setAccessibleCaption

public void setAccessibleCaption(Accessible a)
Sets the caption for the table.
Parameters:
a - the caption for the table

getAccessibleSummary

public Accessible getAccessibleSummary()
Returns the summary description of the table.
Returns:
the summary description of the table

setAccessibleSummary

public void setAccessibleSummary(Accessible a)
Sets the summary description of the table
Parameters:
a - the summary description of the table

getAccessibleRowCount

public int getAccessibleRowCount()
Returns the number of rows in the table.
Returns:
the number of rows in the table

getAccessibleColumnCount

public int getAccessibleColumnCount()
Returns the number of columns in the table.
Returns:
the number of columns in the table

getAccessibleAt

public Accessible getAccessibleAt(int r,
                                  int c)
Returns the Accessible at a specified row and column in the table.
Parameters:
r - zero-based row of the table
c - zero-based column of the table
Returns:
the Accessible at the specified row and column

getAccessibleRowExtentAt

public int getAccessibleRowExtentAt(int r,
                                    int c)
Returns the number of rows occupied by the Accessible at a specified row and column in the table.
Returns:
the number of rows occupied by the Accessible at a given specified (row, column)

getAccessibleColumnExtentAt

public int getAccessibleColumnExtentAt(int r,
                                       int c)
Returns the number of columns occupied by the Accessible at a specified row and column in the table.
Returns:
the number of columns occupied by the Accessible at a given specified row and column

getAccessibleRowHeader

public AccessibleTable getAccessibleRowHeader()
Returns the row headers as an AccessibleTable.
Returns:
an AccessibleTable representing the row headers

setAccessibleRowHeader

public void setAccessibleRowHeader(AccessibleTable table)
Sets the row headers.
Parameters:
table - an AccessibleTable representing the row headers

getAccessibleColumnHeader

public AccessibleTable getAccessibleColumnHeader()
Returns the column headers as an AccessibleTable.
Returns:
an AccessibleTable representing the column headers

setAccessibleColumnHeader

public void setAccessibleColumnHeader(AccessibleTable table)
Sets the column headers.
Parameters:
table - an AccessibleTable representing the column headers

getAccessibleRowDescription

public Accessible getAccessibleRowDescription(int r)
Returns the description of the specified row in the table.
Parameters:
r - zero-based row of the table
Returns:
the description of the row

setAccessibleRowDescription

public void setAccessibleRowDescription(int r,
                                        Accessible a)
Sets the description text of the specified row of the table.
Parameters:
r - zero-based row of the table
a - the description of the row

getAccessibleColumnDescription

public Accessible getAccessibleColumnDescription(int c)
Returns the description text of the specified column in the table.
Parameters:
c - zero-based column of the table
Returns:
the text description of the column

setAccessibleColumnDescription

public void setAccessibleColumnDescription(int c,
                                           Accessible a)
Sets the description text of the specified column in the table.
Parameters:
c - zero-based column of the table
a - the text description of the column

isAccessibleSelected

public boolean isAccessibleSelected(int r,
                                    int c)
Returns a boolean value indicating whether the accessible at a specified row and column is selected.
Parameters:
r - zero-based row of the table
c - zero-based column of the table
Returns:
the boolean value true if the accessible at the row and column is selected. Otherwise, the boolean value false

isAccessibleRowSelected

public boolean isAccessibleRowSelected(int r)
Returns a boolean value indicating whether the specified row is selected.
Parameters:
r - zero-based row of the table
Returns:
the boolean value true if the specified row is selected. Otherwise, false.

isAccessibleColumnSelected

public boolean isAccessibleColumnSelected(int c)
Returns a boolean value indicating whether the specified column is selected.
Parameters:
r - zero-based column of the table
Returns:
the boolean value true if the specified column is selected. Otherwise, false.

getSelectedAccessibleRows

public int[] getSelectedAccessibleRows()
Returns the selected rows in a table.
Returns:
an array of selected rows where each element is a zero-based row of the table

getSelectedAccessibleColumns

public int[] getSelectedAccessibleColumns()
Returns the selected columns in a table.
Returns:
an array of selected columns where each element is a zero-based column of the table
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleTableModelChange

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleTableModelChange

All Known Implementing Classes:
JTable.AccessibleJTable.AccessibleJTableModelChange
public interface AccessibleTableModelChange

The AccessibleTableModelChange interface describes a change to the table model. The attributes of the model change can be obtained by the following methods:

  • public int getType()
  • public int getFirstRow();
  • public int getLastRow();
  • public int getFirstColumn();
  • public int getLastColumn();
The model change type returned by getType() will be one of:
  • INSERT - one or more rows and/or columns have been inserted
  • UPDATE - some of the table data has changed
  • DELETE - one or more rows and/or columns have been deleted
The affected area of the table can be determined by the other four methods which specify ranges of rows and columns

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleTable()

Field Summary
static int | DELETE Identifies the deletion of rows and/or columns.
static int | INSERT Identifies the insertion of new rows and/or columns.
static int | UPDATE Identifies a change to existing data.
Method Summary
int | getFirstColumn() Returns the first column that changed.
int | getFirstRow() Returns the first row that changed.
int | getLastColumn() Returns the last column that changed.
int | getLastRow() Returns the last row that changed.
int | getType() Returns the type of event

Field Detail

INSERT

public static final int INSERT
Identifies the insertion of new rows and/or columns.

UPDATE

public static final int UPDATE
Identifies a change to existing data.

DELETE

public static final int DELETE
Identifies the deletion of rows and/or columns.
Method Detail

getType

public int getType()
Returns the type of event
See Also:
INSERT, UPDATE, DELETE

getFirstRow

public int getFirstRow()
Returns the first row that changed.

getLastRow

public int getLastRow()
Returns the last row that changed.

getFirstColumn

public int getFirstColumn()
Returns the first column that changed.

getLastColumn

public int getLastColumn()
Returns the last column that changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleText

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleText

All Known Subinterfaces:
AccessibleHypertext
All Known Implementing Classes:
TextComponent.AccessibleAWTTextComponent, AbstractButton.AccessibleAbstractButton, JTextComponent.AccessibleJTextComponent, JLabel.AccessibleJLabel
public interface AccessibleText

The AccessibleText interface should be implemented by all classes that present textual information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. Applications can determine if an object supports the AccessibleText interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleText() method of AccessibleContext. If the return value is not null, the object supports this interface.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleText()

Field Summary
static int | CHARACTER Constant used to indicate that the part of the text that should be retrieved is a character.
static int | SENTENCE Constant used to indicate that the part of the text that should be retrieved is a sentence.
static int | WORD Constant used to indicate that the part of the text that should be retrieved is a word.
Method Summary
String | getAfterIndex(int part, int index) Returns the String after a given index.
String | getAtIndex(int part, int index) Returns the String at a given index.
String | getBeforeIndex(int part, int index) Returns the String before a given index.
int | getCaretPosition() Returns the zero-based offset of the caret.
AttributeSet | getCharacterAttribute(int i) Returns the AttributeSet for a given character at a given index
Rectangle | getCharacterBounds(int i) Determines the bounding box of the character at the given index into the string.
int | getCharCount() Returns the number of characters (valid indicies)
int | getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
String | getSelectedText() Returns the portion of the text that is selected.
int | getSelectionEnd() Returns the end offset within the selected text.
int | getSelectionStart() Returns the start offset within the selected text.

Field Detail

CHARACTER

public static final int CHARACTER
Constant used to indicate that the part of the text that should be retrieved is a character.
See Also:
getAtIndex(int, int),
getAfterIndex(int, int),
getBeforeIndex(int, int)

WORD

public static final int WORD
Constant used to indicate that the part of the text that should be retrieved is a word.
See Also:
getAtIndex(int, int),
getAfterIndex(int, int),
getBeforeIndex(int, int)

SENTENCE

public static final int SENTENCE
Constant used to indicate that the part of the text that should be retrieved is a sentence.
See Also:
getAtIndex(int, int),
getAfterIndex(int, int),
getBeforeIndex(int, int)
Method Detail

getIndexAtPoint

public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point. If the point is invalid, this method returns -1.
Parameters:
p - the Point in local coordinates
Returns:
the zero-based index of the character under Point p; if Point is invalid return -1.

getCharacterBounds

public Rectangle getCharacterBounds(int i)
Determines the bounding box of the character at the given index into the string. The bounds are returned in local coordinates. If the index is invalid an empty rectangle is returned.
Parameters:
i - the index into the String
Returns:
the screen coordinates of the character's bounding box, if index is invalid return an empty rectangle.

getCharCount

public int getCharCount()
Returns the number of characters (valid indicies)
Returns:
the number of characters

getCaretPosition

public int getCaretPosition()
Returns the zero-based offset of the caret. Note: That to the right of the caret will have the same index value as the offset (the caret is between two characters).
Returns:
the zero-based offset of the caret.

getAtIndex

public String getAtIndex(int part,
                         int index)
Returns the String at a given index.
Parameters:
part - the CHARACTER, WORD, or SENTENCE to retrieve
index - an index within the text
Returns:
the letter, word, or sentence

getAfterIndex

public String getAfterIndex(int part,
                            int index)
Returns the String after a given index.
Parameters:
part - the CHARACTER, WORD, or SENTENCE to retrieve
index - an index within the text
Returns:
the letter, word, or sentence

getBeforeIndex

public String getBeforeIndex(int part,
                             int index)
Returns the String before a given index.
Parameters:
part - the CHARACTER, WORD, or SENTENCE to retrieve
index - an index within the text
Returns:
the letter, word, or sentence

getCharacterAttribute

public AttributeSet getCharacterAttribute(int i)
Returns the AttributeSet for a given character at a given index
Parameters:
i - the zero-based index into the text
Returns:
the AttributeSet of the character

getSelectionStart

public int getSelectionStart()
Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Returns:
the index into the text of the start of the selection

getSelectionEnd

public int getSelectionEnd()
Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Returns:
the index into teh text of the end of the selection

getSelectedText

public String getSelectedText()
Returns the portion of the text that is selected.
Returns:
the String portion of the text that is selected
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleValue

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.accessibility
Interface AccessibleValue

All Known Implementing Classes:
Button.AccessibleAWTButton, Checkbox.AccessibleAWTCheckbox, CheckboxMenuItem.AccessibleAWTCheckboxMenuItem, MenuItem.AccessibleAWTMenuItem, Scrollbar.AccessibleAWTScrollBar, AbstractButton.AccessibleAbstractButton, JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon, JSplitPane.AccessibleJSplitPane, JScrollBar.AccessibleJScrollBar, JProgressBar.AccessibleJProgressBar, JSlider.AccessibleJSlider
public interface AccessibleValue

The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar). This interface provides the standard mechanism for an assistive technology to determine and set the numerical value as well as get the minimum and maximum values. Applications can determine if an object supports the AccessibleValue interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleValue() method. If the return value is not null, the object supports this interface.

See Also:
Accessible, Accessible.getAccessibleContext(), AccessibleContext, AccessibleContext.getAccessibleValue()

Method Summary
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.

Method Detail

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number. If the value has not been set, the return value will be null.
Returns:
value of the object
See Also:
setCurrentAccessibleValue(java.lang.Number)

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Returns:
True if the value was set; else False
See Also:
getCurrentAccessibleValue()

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Returns:
Minimum value of the object; null if this object does not have a minimum value
See Also:
getMaximumAccessibleValue()

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Returns:
Maximum value of the object; null if this object does not have a maximum value
See Also:
getMinimumAccessibleValue()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.accessibility.AccessibleResourceBundle

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleResourceBundle

No usage of javax.accessibility.AccessibleResourceBundle

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleBundle

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleBundle

Packages that use AccessibleBundle
javax.accessibility Defines a contract between user-interface components and an assistive technology that provides access to those components.

Uses of AccessibleBundle in javax.accessibility

Subclasses of AccessibleBundle in javax.accessibility
class | AccessibleRelation Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
class | AccessibleRole Class AccessibleRole determines the role of a component.
class | AccessibleState Class AccessibleState describes a component's particular state.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleContext

Packages that use AccessibleContext
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AccessibleContext in java.applet

Subclasses of AccessibleContext in java.applet
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Methods in java.applet that return AccessibleContext
 AccessibleContext Applet.getAccessibleContext()
Gets the AccessibleContext associated with this Applet.

Uses of AccessibleContext in java.awt

Subclasses of AccessibleContext in java.awt
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
protected class | Canvas.AccessibleAWTCanvas This class implements accessibility support for the Canvas class.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
protected class | Component.AccessibleAWTComponent Inner class of Component used to provide default support for accessibility.
protected class | Container.AccessibleAWTContainer Inner class of Container used to provide default support for accessibility.
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
protected class | Label.AccessibleAWTLabel This class implements accessibility support for the Label class.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
protected class | MenuComponent.AccessibleAWTMenuComponent Inner class of MenuComponent used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Methods in java.awt that return AccessibleContext
AccessibleContext | Component.getAccessibleContext() Get the AccessibleContext associated with this Component
AccessibleContext | Panel.getAccessibleContext() Gets the AccessibleContext associated with this Panel.
AccessibleContext | ScrollPane.getAccessibleContext() Gets the AccessibleContext associated with this ScrollPane.
AccessibleContext | Scrollbar.getAccessibleContext() Gets the AccessibleContext associated with this Scrollbar.
AccessibleContext | Canvas.getAccessibleContext() Gets the AccessibleContext associated with this Canvas.
AccessibleContext | MenuComponent.getAccessibleContext() Get the AccessibleContext associated with this MenuComponent
AccessibleContext | MenuItem.getAccessibleContext() Gets the AccessibleContext associated with this MenuItem.
AccessibleContext | Menu.getAccessibleContext() Gets the AccessibleContext associated with this Menu.
AccessibleContext | Checkbox.getAccessibleContext() Gets the AccessibleContext associated with this Checkbox.
AccessibleContext | Window.getAccessibleContext() Gets the AccessibleContext associated with this Window.
AccessibleContext | Dialog.getAccessibleContext() Gets the AccessibleContext associated with this Dialog.
AccessibleContext | MenuBar.getAccessibleContext() Gets the AccessibleContext associated with this MenuBar.
AccessibleContext | List.getAccessibleContext() Gets the AccessibleContext associated with this List.
AccessibleContext | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleContext() Gets the AccessibleContext for this object.
AccessibleContext | TextComponent.getAccessibleContext() Gets the AccessibleContext associated with this TextComponent.
AccessibleContext | PopupMenu.getAccessibleContext() Gets the AccessibleContext associated with this PopupMenu.
AccessibleContext | Choice.getAccessibleContext() Gets the AccessibleContext associated with this Choice.
AccessibleContext | Frame.getAccessibleContext() Gets the AccessibleContext associated with this Frame.
AccessibleContext | Label.getAccessibleContext() Gets the AccessibleContext associated with this Label.
AccessibleContext | TextField.getAccessibleContext() Gets the AccessibleContext associated with this TextField.
AccessibleContext | Button.getAccessibleContext() Gets the AccessibleContext associated with this Button.
AccessibleContext | CheckboxMenuItem.getAccessibleContext() Gets the AccessibleContext associated with this CheckboxMenuItem.
AccessibleContext | TextArea.getAccessibleContext() Gets the AccessibleContext associated with this TextArea.

Uses of AccessibleContext in javax.accessibility

Methods in javax.accessibility that return AccessibleContext
 AccessibleContext Accessible.getAccessibleContext()
Returns the AccessibleContext associated with this object.

Uses of AccessibleContext in javax.swing

Subclasses of AccessibleContext in javax.swing
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
protected class | Box.Filler.AccessibleBoxFiller This class implements accessibility support for the Box.Filler class.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
protected class | ImageIcon.AccessibleImageIcon This class implements accessibility support for the ImageIcon class.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JList.AccessibleJList.AccessibleJListChild This class implements accessibility support appropriate for list children.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTable.AccessibleJTable.AccessibleJTableCell The class provides an implementation of the Java Accessibility API appropriate to table cells.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.

Fields in javax.swing declared as AccessibleContext
protected AccessibleContext | JComponent.accessibleContext The AccessibleContext associated with this JComponent.
protected AccessibleContext | JColorChooser.accessibleContext
protected AccessibleContext | JWindow.accessibleContext The accessible context property.
protected AccessibleContext | JApplet.accessibleContext
protected AccessibleContext | CellRendererPane.accessibleContext
protected AccessibleContext | JFrame.accessibleContext The accessible context property.
protected AccessibleContext | JFileChooser.accessibleContext
protected AccessibleContext | Box.accessibleContext The currently set AccessibleContext object.
protected AccessibleContext | Box.Filler.accessibleContext The currently set AccessibleContext object.
protected AccessibleContext | JDialog.accessibleContext

Methods in javax.swing that return AccessibleContext
AccessibleContext | JComponent.getAccessibleContext() Gets the AccessibleContext associated with this JComponent.
AccessibleContext | JEditorPane.getAccessibleContext() Gets the AccessibleContext associated with this JEditorPane.
AccessibleContext | JViewport.getAccessibleContext() Gets the AccessibleContext associated with this JViewport.
AccessibleContext | JTabbedPane.getAccessibleContext() Gets the AccessibleContext associated with this JTabbedPane.
AccessibleContext | JMenuItem.getAccessibleContext() Gets the AccessibleContext associated with this JMenuItem.
AccessibleContext | JCheckBoxMenuItem.getAccessibleContext() Gets the AccessibleContext associated with this JCheckBoxMenuItem.
AccessibleContext | JLayeredPane.getAccessibleContext() Gets the AccessibleContext associated with this JLayeredPane.
AccessibleContext | JToggleButton.getAccessibleContext() Gets the AccessibleContext associated with this JToggleButton.
AccessibleContext | JCheckBox.getAccessibleContext() Gets the AccessibleContext associated with this JCheckBox.
AccessibleContext | JTextField.getAccessibleContext() Gets the AccessibleContext associated with this JTextField.
AccessibleContext | JPasswordField.getAccessibleContext() Gets the AccessibleContext associated with this JPasswordField.
AccessibleContext | JOptionPane.getAccessibleContext() Gets the AccessibleContext associated with this JOptionPane.
AccessibleContext | JMenu.getAccessibleContext() Gets the AccessibleContext associated with this JMenu.
AccessibleContext | JColorChooser.getAccessibleContext() Gets the AccessibleContext associated with this JColorChooser.
AccessibleContext | JButton.getAccessibleContext() Gets the AccessibleContext associated with this JButton.
AccessibleContext | JPopupMenu.getAccessibleContext() Gets the AccessibleContext associated with this JPopupMenu.
AccessibleContext | JSeparator.getAccessibleContext() Gets the AccessibleContext associated with this JSeparator.
AccessibleContext | JWindow.getAccessibleContext() Gets the AccessibleContext associated with this JWindow.
AccessibleContext | JApplet.getAccessibleContext() Gets the AccessibleContext associated with this JApplet.
AccessibleContext | JComboBox.getAccessibleContext() Gets the AccessibleContext associated with this JComboBox.
AccessibleContext | JList.getAccessibleContext() Gets the AccessibleContext associated with this JList.
AccessibleContext | JList.AccessibleJList.AccessibleJListChild.getAccessibleContext() Get the AccessibleContext for this object.
AccessibleContext | JToolTip.getAccessibleContext() Gets the AccessibleContext associated with this JToolTip.
AccessibleContext | CellRendererPane.getAccessibleContext() Gets the AccessibleContext associated with this CellRendererPane.
AccessibleContext | JInternalFrame.getAccessibleContext() Gets the AccessibleContext associated with this JInternalFrame.
AccessibleContext | JInternalFrame.JDesktopIcon.getAccessibleContext() Gets the AccessibleContext associated with this JDesktopIcon.
AccessibleContext | JPanel.getAccessibleContext() Gets the AccessibleContext associated with this JPanel.
AccessibleContext | JFrame.getAccessibleContext() Gets the AccessibleContext associated with this JFrame.
AccessibleContext | JSplitPane.getAccessibleContext() Gets the AccessibleContext associated with this JSplitPane.
AccessibleContext | JTree.getAccessibleContext() Gets the AccessibleContext associated with this JTree.
AccessibleContext | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleContext() Get the AccessibleContext associated with this tree node.
AccessibleContext | JTable.getAccessibleContext() Gets the AccessibleContext associated with this JTable.
AccessibleContext | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleContext() Gets the AccessibleContext associated with this component.
AccessibleContext | JLabel.getAccessibleContext() Get the AccessibleContext of this object
AccessibleContext | JFileChooser.getAccessibleContext() Gets the AccessibleContext associated with this JFileChooser.
AccessibleContext | JDesktopPane.getAccessibleContext() Gets the AccessibleContext associated with this JDesktopPane.
AccessibleContext | JRadioButton.getAccessibleContext() Gets the AccessibleContext associated with this JRadioButton.
AccessibleContext | JToolBar.getAccessibleContext() Gets the AccessibleContext associated with this JToolBar.
AccessibleContext | JMenuBar.getAccessibleContext() Gets the AccessibleContext associated with this JMenuBar.
AccessibleContext | ImageIcon.getAccessibleContext() Gets the AccessibleContext associated with this ImageIcon.
AccessibleContext | JRadioButtonMenuItem.getAccessibleContext() Gets the AccessibleContext associated with this JRadioButtonMenuItem.
AccessibleContext | JTextArea.getAccessibleContext() Gets the AccessibleContext associated with this JTextArea.
AccessibleContext | Box.getAccessibleContext() Gets the AccessibleContext associated with this Box.
AccessibleContext | Box.Filler.getAccessibleContext() Gets the AccessibleContext associated with this Box.Filler.
AccessibleContext | JScrollPane.getAccessibleContext() Gets the AccessibleContext associated with this JScrollPane.
AccessibleContext | JScrollBar.getAccessibleContext() Gets the AccessibleContext associated with this JScrollBar.
AccessibleContext | JProgressBar.getAccessibleContext() Gets the AccessibleContext associated with this JProgressBar.
AccessibleContext | JRootPane.getAccessibleContext() Gets the AccessibleContext associated with this JRootPane.
AccessibleContext | JDialog.getAccessibleContext() Gets the AccessibleContext associated with this JDialog.
AccessibleContext | JSlider.getAccessibleContext() Gets the AccessibleContext associated with this JSlider.

Uses of AccessibleContext in javax.swing.table

Subclasses of AccessibleContext in javax.swing.table
protected class | JTableHeader.AccessibleJTableHeader This class implements accessibility support for the JTableHeader class.
protected class | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.

Methods in javax.swing.table that return AccessibleContext
AccessibleContext | JTableHeader.getAccessibleContext() Gets the AccessibleContext associated with this JTableHeader.
AccessibleContext | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleContext() Get the AccessibleContext associated with this object.

Uses of AccessibleContext in javax.swing.text

Subclasses of AccessibleContext in javax.swing.text
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Methods in javax.swing.text that return AccessibleContext
 AccessibleContext JTextComponent.getAccessibleContext()
Gets the AccessibleContext associated with this JTextComponent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleHyperlink

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleHyperlink

Packages that use AccessibleHyperlink
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleHyperlink in javax.accessibility

Methods in javax.accessibility that return AccessibleHyperlink
 AccessibleHyperlink AccessibleHypertext.getLink(int linkIndex)
Returns the nth Link of this Hypertext document.

Uses of AccessibleHyperlink in javax.swing

Subclasses of AccessibleHyperlink in javax.swing
 class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

Methods in javax.swing that return AccessibleHyperlink
 AccessibleHyperlink JEditorPane.JEditorPaneAccessibleHypertextSupport.getLink(int linkIndex)
Returns the index into an array of hyperlinks that index.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleRelation

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleRelation

Packages that use AccessibleRelation
javax.accessibility Defines a contract between user-interface components and an assistive technology that provides access to those components.

Uses of AccessibleRelation in javax.accessibility

Methods in javax.accessibility that return AccessibleRelation
AccessibleRelation | AccessibleRelationSet.get(String key) Returns the relation that matches the specified key.
AccessibleRelation[] | AccessibleRelationSet.toArray() Returns the current relation set as an array of AccessibleRelation

Methods in javax.accessibility with parameters of type AccessibleRelation
boolean | AccessibleRelationSet.add(AccessibleRelation relation) Adds a new relation to the current relation set if it is not already present.
void | AccessibleRelationSet.addAll(AccessibleRelation[] relations) Adds all of the relations to the existing relation set.
boolean | AccessibleRelationSet.remove(AccessibleRelation relation) Removes a relation from the current relation set.

Constructors in javax.accessibility with parameters of type AccessibleRelation
AccessibleRelationSet(AccessibleRelation[] relations)
Creates a new relation with the initial set of relations contained in the array of relations passed in.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleRelationSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleRelationSet

Packages that use AccessibleRelationSet
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleRelationSet in javax.accessibility

Methods in javax.accessibility that return AccessibleRelationSet
 AccessibleRelationSet AccessibleContext.getAccessibleRelationSet()
Gets the AccessibleRelationSet associated with an object

Uses of AccessibleRelationSet in javax.swing

Methods in javax.swing that return AccessibleRelationSet
AccessibleRelationSet | AbstractButton.AccessibleAbstractButton.getAccessibleRelationSet() Get the AccessibleRelationSet associated with this object if one exists.
AccessibleRelationSet | JLabel.AccessibleJLabel.getAccessibleRelationSet() Get the AccessibleRelationSet associated with this object if one exists.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleRole

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleRole

Packages that use AccessibleRole
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AccessibleRole in java.applet

Methods in java.applet that return AccessibleRole
 AccessibleRole Applet.AccessibleApplet.getAccessibleRole()
Get the role of this object.

Uses of AccessibleRole in java.awt

Methods in java.awt that return AccessibleRole
AccessibleRole | Component.AccessibleAWTComponent.getAccessibleRole() Get the role of this object.
AccessibleRole | Panel.AccessibleAWTPanel.getAccessibleRole() Get the role of this object.
AccessibleRole | ScrollPane.AccessibleAWTScrollPane.getAccessibleRole() Get the role of this object.
AccessibleRole | Scrollbar.AccessibleAWTScrollBar.getAccessibleRole() Get the role of this object.
AccessibleRole | Canvas.AccessibleAWTCanvas.getAccessibleRole() Get the role of this object.
AccessibleRole | MenuComponent.AccessibleAWTMenuComponent.getAccessibleRole() Get the role of this object.
AccessibleRole | MenuItem.AccessibleAWTMenuItem.getAccessibleRole() Get the role of this object.
AccessibleRole | Menu.AccessibleAWTMenu.getAccessibleRole() Get the role of this object.
AccessibleRole | Checkbox.AccessibleAWTCheckbox.getAccessibleRole() Get the role of this object.
AccessibleRole | MenuBar.AccessibleAWTMenuBar.getAccessibleRole() Get the role of this object.
AccessibleRole | List.AccessibleAWTList.getAccessibleRole() Get the role of this object.
AccessibleRole | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleRole() Get the role of this object.
AccessibleRole | TextComponent.AccessibleAWTTextComponent.getAccessibleRole() Gets the role of this object.
AccessibleRole | PopupMenu.AccessibleAWTPopupMenu.getAccessibleRole() Get the role of this object.
AccessibleRole | Window.AccessibleAWTWindow.getAccessibleRole() Get the role of this object.
AccessibleRole | Dialog.AccessibleAWTDialog.getAccessibleRole() Get the role of this object.
AccessibleRole | Choice.AccessibleAWTChoice.getAccessibleRole() Get the role of this object.
AccessibleRole | Frame.AccessibleAWTFrame.getAccessibleRole() Get the role of this object.
AccessibleRole | Label.AccessibleAWTLabel.getAccessibleRole() Get the role of this object.
AccessibleRole | Button.AccessibleAWTButton.getAccessibleRole() Get the role of this object.
AccessibleRole | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleRole() Get the role of this object.

Uses of AccessibleRole in javax.accessibility

Fields in javax.accessibility declared as AccessibleRole
static AccessibleRole | AccessibleRole.ALERT Object is used to alert the user about something.
static AccessibleRole | AccessibleRole.COLUMN_HEADER The header for a column of data.
static AccessibleRole | AccessibleRole.CANVAS Object that can be drawn into and is used to trap events.
static AccessibleRole | AccessibleRole.COMBO_BOX A list of choices the user can select from.
static AccessibleRole | AccessibleRole.DESKTOP_ICON An iconified internal frame in a DESKTOP_PANE.
static AccessibleRole | AccessibleRole.INTERNAL_FRAME A frame-like object that is clipped by a desktop pane.
static AccessibleRole | AccessibleRole.DESKTOP_PANE A pane that supports internal frames and iconified versions of those internal frames.
static AccessibleRole | AccessibleRole.OPTION_PANE A specialized pane whose primary use is inside a DIALOG
static AccessibleRole | AccessibleRole.WINDOW A top level window with no title or border.
static AccessibleRole | AccessibleRole.FRAME A top level window with a title bar, border, menu bar, etc.
static AccessibleRole | AccessibleRole.DIALOG A top level window with title bar and a border.
static AccessibleRole | AccessibleRole.COLOR_CHOOSER A specialized dialog that lets the user choose a color.
static AccessibleRole | AccessibleRole.DIRECTORY_PANE A pane that allows the user to navigate through and select the contents of a directory.
static AccessibleRole | AccessibleRole.FILE_CHOOSER A specialized dialog that displays the files in the directory and lets the user select a file, browse a different directory, or specify a filename.
static AccessibleRole | AccessibleRole.FILLER An object that fills up space in a user interface.
static AccessibleRole | AccessibleRole.ICON A small fixed size picture, typically used to decorate components.
static AccessibleRole | AccessibleRole.LABEL An object used to present an icon or short string in an interface.
static AccessibleRole | AccessibleRole.ROOT_PANE A specialized pane that has a glass pane and a layered pane as its children.
static AccessibleRole | AccessibleRole.GLASS_PANE A pane that is guaranteed to be painted on top of all panes beneath it.
static AccessibleRole | AccessibleRole.LAYERED_PANE A specialized pane that allows its children to be drawn in layers, providing a form of stacking order.
static AccessibleRole | AccessibleRole.LIST An object that presents a list of objects to the user and allows the user to select one or more of them.
static AccessibleRole | AccessibleRole.LIST_ITEM An object that presents an element in a list.
static AccessibleRole | AccessibleRole.MENU_BAR An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from.
static AccessibleRole | AccessibleRole.POPUP_MENU A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices.
static AccessibleRole | AccessibleRole.MENU An object usually found inside a menu bar that contains a list of actions the user can choose from.
static AccessibleRole | AccessibleRole.MENU_ITEM An object usually contained in a menu that presents an action the user can choose.
static AccessibleRole | AccessibleRole.SEPARATOR An object usually contained in a menu to provide a visual and logical separation of the contents in a menu.
static AccessibleRole | AccessibleRole.PAGE_TAB_LIST An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object.
static AccessibleRole | AccessibleRole.PAGE_TAB An object that is a child of a page tab list.
static AccessibleRole | AccessibleRole.PANEL A generic container that is often used to group objects.
static AccessibleRole | AccessibleRole.PROGRESS_BAR An object used to indicate how much of a task has been completed.
static AccessibleRole | AccessibleRole.PASSWORD_TEXT A text object used for passwords, or other places where the text contents is not shown visibly to the user
static AccessibleRole | AccessibleRole.PUSH_BUTTON An object the user can manipulate to tell the application to do something.
static AccessibleRole | AccessibleRole.TOGGLE_BUTTON A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
static AccessibleRole | AccessibleRole.CHECK_BOX A choice that can be checked or unchecked and provides a separate indicator for the current state.
static AccessibleRole | AccessibleRole.RADIO_BUTTON A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked.
static AccessibleRole | AccessibleRole.ROW_HEADER The header for a row of data.
static AccessibleRole | AccessibleRole.SCROLL_PANE An object that allows a user to incrementally view a large amount of information.
static AccessibleRole | AccessibleRole.SCROLL_BAR An object usually used to allow a user to incrementally view a large amount of data.
static AccessibleRole | AccessibleRole.VIEWPORT An object usually used in a scroll pane.
static AccessibleRole | AccessibleRole.SLIDER An object that allows the user to select from a bounded range.
static AccessibleRole | AccessibleRole.SPLIT_PANE A specialized panel that presents two other panels at the same time.
static AccessibleRole | AccessibleRole.TABLE An object used to present information in terms of rows and columns.
static AccessibleRole | AccessibleRole.TEXT An object that presents text to the user.
static AccessibleRole | AccessibleRole.TREE An object used to present hierarchical information to the user.
static AccessibleRole | AccessibleRole.TOOL_BAR A bar or palette usually composed of push buttons or toggle buttons.
static AccessibleRole | AccessibleRole.TOOL_TIP An object that provides information about another object.
static AccessibleRole | AccessibleRole.AWT_COMPONENT An AWT component, but nothing else is known about it.
static AccessibleRole | AccessibleRole.SWING_COMPONENT A Swing component, but nothing else is known about it.
static AccessibleRole | AccessibleRole.UNKNOWN The object contains some Accessible information, but its role is not known.

Methods in javax.accessibility that return AccessibleRole
abstract  AccessibleRole AccessibleContext.getAccessibleRole()
Gets the role of this object.

Uses of AccessibleRole in javax.swing

Methods in javax.swing that return AccessibleRole
AccessibleRole | JComponent.AccessibleJComponent.getAccessibleRole() Gets the role of this object.
AccessibleRole | JViewport.AccessibleJViewport.getAccessibleRole() Get the role of this object.
AccessibleRole | JTabbedPane.AccessibleJTabbedPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JMenuItem.AccessibleJMenuItem.getAccessibleRole() Get the role of this object.
AccessibleRole | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem.getAccessibleRole() Get the role of this object.
AccessibleRole | JLayeredPane.AccessibleJLayeredPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JToggleButton.AccessibleJToggleButton.getAccessibleRole() Get the role of this object.
AccessibleRole | JCheckBox.AccessibleJCheckBox.getAccessibleRole() Get the role of this object.
AccessibleRole | JPasswordField.AccessibleJPasswordField.getAccessibleRole() Gets the role of this object.
AccessibleRole | JOptionPane.AccessibleJOptionPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JMenu.AccessibleJMenu.getAccessibleRole() Get the role of this object.
AccessibleRole | JColorChooser.AccessibleJColorChooser.getAccessibleRole() Get the role of this object.
AccessibleRole | JButton.AccessibleJButton.getAccessibleRole() Get the role of this object.
AccessibleRole | JPopupMenu.AccessibleJPopupMenu.getAccessibleRole() Get the role of this object.
AccessibleRole | JComboBox.AccessibleJComboBox.getAccessibleRole() Get the role of this object.
AccessibleRole | JList.AccessibleJList.getAccessibleRole() Get the role of this object.
AccessibleRole | JList.AccessibleJList.AccessibleJListChild.getAccessibleRole()
AccessibleRole | JToolTip.AccessibleJToolTip.getAccessibleRole() Get the role of this object.
AccessibleRole | JSeparator.AccessibleJSeparator.getAccessibleRole() Get the role of this object.
AccessibleRole | CellRendererPane.AccessibleCellRendererPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JInternalFrame.AccessibleJInternalFrame.getAccessibleRole() Get the role of this object.
AccessibleRole | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getAccessibleRole() Get the role of this object.
AccessibleRole | JPanel.AccessibleJPanel.getAccessibleRole() Get the role of this object.
AccessibleRole | JSplitPane.AccessibleJSplitPane.getAccessibleRole() Gets the role of this object.
AccessibleRole | JTree.AccessibleJTree.getAccessibleRole() Get the role of this object.
AccessibleRole | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleRole() Get the role of this object.
AccessibleRole | JTable.AccessibleJTable.getAccessibleRole() Gets the role of this object.
AccessibleRole | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleRole() Gets the role of this object.
AccessibleRole | JFileChooser.AccessibleJFileChooser.getAccessibleRole() Gets the role of this object.
AccessibleRole | JDesktopPane.AccessibleJDesktopPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JRadioButton.AccessibleJRadioButton.getAccessibleRole() Get the role of this object.
AccessibleRole | JLabel.AccessibleJLabel.getAccessibleRole() Get the role of this object.
AccessibleRole | JToolBar.AccessibleJToolBar.getAccessibleRole() Get the role of this object.
AccessibleRole | JMenuBar.AccessibleJMenuBar.getAccessibleRole() Get the role of this object.
AccessibleRole | ImageIcon.AccessibleImageIcon.getAccessibleRole() Gets the role of this object.
AccessibleRole | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem.getAccessibleRole() Get the role of this object.
AccessibleRole | Box.Filler.AccessibleBoxFiller.getAccessibleRole() Gets the role of this object.
AccessibleRole | Box.AccessibleBox.getAccessibleRole() Gets the role of this object.
AccessibleRole | JScrollPane.AccessibleJScrollPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JScrollBar.AccessibleJScrollBar.getAccessibleRole() Get the role of this object.
AccessibleRole | JProgressBar.AccessibleJProgressBar.getAccessibleRole() Get the role of this object.
AccessibleRole | JRootPane.AccessibleJRootPane.getAccessibleRole() Get the role of this object.
AccessibleRole | JSlider.AccessibleJSlider.getAccessibleRole() Get the role of this object.

Uses of AccessibleRole in javax.swing.table

Methods in javax.swing.table that return AccessibleRole
AccessibleRole | JTableHeader.AccessibleJTableHeader.getAccessibleRole() Get the role of this object.
AccessibleRole | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleRole()

Uses of AccessibleRole in javax.swing.text

Methods in javax.swing.text that return AccessibleRole
 AccessibleRole JTextComponent.AccessibleJTextComponent.getAccessibleRole()
Gets the role of this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleState

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleState

Packages that use AccessibleState
javax.accessibility Defines a contract between user-interface components and an assistive technology that provides access to those components.

Uses of AccessibleState in javax.accessibility

Fields in javax.accessibility declared as AccessibleState
static AccessibleState | AccessibleState.ACTIVE Indicates a window is currently the active window.
static AccessibleState | AccessibleState.PRESSED Indicates this object is currently pressed.
static AccessibleState | AccessibleState.ARMED Indicates that the object is armed.
static AccessibleState | AccessibleState.BUSY Indicates the current object is busy.
static AccessibleState | AccessibleState.CHECKED Indicates this object is currently checked.
static AccessibleState | AccessibleState.EDITABLE Indicates the user can change the contents of this object.
static AccessibleState | AccessibleState.EXPANDABLE Indicates this object allows progressive disclosure of its children.
static AccessibleState | AccessibleState.COLLAPSED Indicates this object is collapsed.
static AccessibleState | AccessibleState.EXPANDED Indicates this object is expanded.
static AccessibleState | AccessibleState.ENABLED Indicates this object is enabled.
static AccessibleState | AccessibleState.FOCUSABLE Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus.
static AccessibleState | AccessibleState.FOCUSED Indicates this object currently has the keyboard focus.
static AccessibleState | AccessibleState.ICONIFIED Indicates this object is minimized and is represented only by an icon.
static AccessibleState | AccessibleState.MODAL Indicates something must be done with this object before the user can interact with an object in a different window.
static AccessibleState | AccessibleState.OPAQUE Indicates this object paints every pixel within its rectangular region.
static AccessibleState | AccessibleState.RESIZABLE Indicates the size of this object is not fixed.
static AccessibleState | AccessibleState.MULTISELECTABLE Indicates this object allows more than one of its children to be selected at the same time.
static AccessibleState | AccessibleState.SELECTABLE Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that can be selected.
static AccessibleState | AccessibleState.SELECTED Indicates this object is the child of an object that allows its children to be selected, and that this child is one of those children that has been selected.
static AccessibleState | AccessibleState.SHOWING Indicates this object, the object's parent, the object's parent's parent, and so on, are all visible.
static AccessibleState | AccessibleState.VISIBLE Indicates this object is visible.
static AccessibleState | AccessibleState.VERTICAL Indicates the orientation of this object is vertical.
static AccessibleState | AccessibleState.HORIZONTAL Indicates the orientation of this object is horizontal.
static AccessibleState | AccessibleState.SINGLE_LINE Indicates this (text) object can contain only a single line of text
static AccessibleState | AccessibleState.MULTI_LINE Indicates this (text) object can contain multiple lines of text
static AccessibleState | AccessibleState.TRANSIENT Indicates this object is transient.

Methods in javax.accessibility that return AccessibleState
 AccessibleState[] AccessibleStateSet.toArray()
Returns the current state set as an array of AccessibleState

Methods in javax.accessibility with parameters of type AccessibleState
boolean | AccessibleStateSet.add(AccessibleState state) Adds a new state to the current state set if it is not already present.
void | AccessibleStateSet.addAll(AccessibleState[] states) Adds all of the states to the existing state set.
boolean | AccessibleStateSet.remove(AccessibleState state) Removes a state from the current state set.
boolean | AccessibleStateSet.contains(AccessibleState state) Checks if the current state is in the state set.

Constructors in javax.accessibility with parameters of type AccessibleState
AccessibleStateSet(AccessibleState[] states)
Creates a new state with the initial set of states contained in the array of states passed in.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.accessibility.AccessibleStateSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.accessibility.AccessibleStateSet

Packages that use AccessibleStateSet
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AccessibleStateSet in java.applet

Methods in java.applet that return AccessibleStateSet
 AccessibleStateSet Applet.AccessibleApplet.getAccessibleStateSet()
Get the state of this object.

Uses of AccessibleStateSet in java.awt

Methods in java.awt that return AccessibleStateSet
AccessibleStateSet | Component.AccessibleAWTComponent.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | Scrollbar.AccessibleAWTScrollBar.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | MenuComponent.AccessibleAWTMenuComponent.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | Checkbox.AccessibleAWTCheckbox.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | List.AccessibleAWTList.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | TextComponent.AccessibleAWTTextComponent.getAccessibleStateSet() Gets the state set of the TextComponent.
AccessibleStateSet | Window.AccessibleAWTWindow.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | Dialog.AccessibleAWTDialog.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | Frame.AccessibleAWTFrame.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | TextField.AccessibleAWTTextField.getAccessibleStateSet() Gets the state set of this object.
AccessibleStateSet | TextArea.AccessibleAWTTextArea.getAccessibleStateSet() Gets the state set of this object.

Uses of AccessibleStateSet in javax.accessibility

Methods in javax.accessibility that return AccessibleStateSet
abstract  AccessibleStateSet AccessibleContext.getAccessibleStateSet()
Gets the state set of this object.

Uses of AccessibleStateSet in javax.swing

Methods in javax.swing that return AccessibleStateSet
AccessibleStateSet | JComponent.AccessibleJComponent.getAccessibleStateSet() Gets the state of this object.
AccessibleStateSet | AbstractButton.AccessibleAbstractButton.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | JTextField.AccessibleJTextField.getAccessibleStateSet() Gets the state set of this object.
AccessibleStateSet | JEditorPane.AccessibleJEditorPane.getAccessibleStateSet() Gets the state set of this object.
static AccessibleStateSet | SwingUtilities.getAccessibleStateSet(Component c) Get the state of this object.
AccessibleStateSet | JList.AccessibleJList.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | JList.AccessibleJList.AccessibleJListChild.getAccessibleStateSet()
AccessibleStateSet | JFrame.AccessibleJFrame.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | JSplitPane.AccessibleJSplitPane.getAccessibleStateSet() Gets the state set of this object.
AccessibleStateSet | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleStateSet() Gets the state set of this object.
AccessibleStateSet | JToolBar.AccessibleJToolBar.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | JMenuBar.AccessibleJMenuBar.getAccessibleStateSet() Get the accessible state set of this object.
AccessibleStateSet | ImageIcon.AccessibleImageIcon.getAccessibleStateSet() Gets the state of this object.
AccessibleStateSet | JTextArea.AccessibleJTextArea.getAccessibleStateSet() Gets the state set of this object.
AccessibleStateSet | JScrollBar.AccessibleJScrollBar.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | JProgressBar.AccessibleJProgressBar.getAccessibleStateSet() Get the state set of this object.
AccessibleStateSet | JDialog.AccessibleJDialog.getAccessibleStateSet() Get the state of this object.
AccessibleStateSet | JSlider.AccessibleJSlider.getAccessibleStateSet() Get the state set of this object.

Uses of AccessibleStateSet in javax.swing.table

Methods in javax.swing.table that return AccessibleStateSet
 AccessibleStateSet JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleStateSet()

Uses of AccessibleStateSet in javax.swing.text

Methods in javax.swing.text that return AccessibleStateSet
 AccessibleStateSet JTextComponent.AccessibleJTextComponent.getAccessibleStateSet()
Gets the state set of the JTextComponent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.Accessible

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.Accessible

Packages that use Accessible
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Accessible in java.applet

Classes in java.applet that implement Accessible
 class Applet
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.

Uses of Accessible in java.awt

Classes in java.awt that implement Accessible
class | Button This class creates a labeled button.
class | Canvas A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
class | Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
class | CheckboxMenuItem This class represents a check box that can be included in a menu.
class | Choice The Choice class presents a pop-up menu of choices.
class | Dialog A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
class | FileDialog The FileDialog class displays a dialog window from which the user can select a file.
class | Frame A Frame is a top-level window with a title and a border.
class | Label A Label object is a component for placing text in a container.
class | List The List component presents the user with a scrolling list of text items.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
class | Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
class | MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
class | MenuItem All items in a menu must belong to the class MenuItem, or one of its subclasses.
class | Panel Panel is the simplest container class.
class | PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.
class | Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
class | ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
class | TextArea A TextArea object is a multi-line region that displays text.
class | TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
class | TextField A TextField object is a text component that allows for the editing of a single line of text.
class | Window A Window object is a top-level window with no borders and no menubar.

Methods in java.awt that return Accessible
Accessible | Component.AccessibleAWTComponent.getAccessibleParent() Get the Accessible parent of this object.
Accessible | Component.AccessibleAWTComponent.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | Component.AccessibleAWTComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | Container.AccessibleAWTContainer.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | Container.AccessibleAWTContainer.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | MenuComponent.AccessibleAWTMenuComponent.getAccessibleParent() Get the Accessible parent of this object.
Accessible | MenuComponent.AccessibleAWTMenuComponent.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | MenuComponent.AccessibleAWTMenuComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | MenuComponent.AccessibleAWTMenuComponent.getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the object.
Accessible | List.AccessibleAWTList.getAccessibleAt(Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
Accessible | List.AccessibleAWTList.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | List.AccessibleAWTList.getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
Accessible | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleChild(int i) Return the specified Accessible child of the object.
Accessible | List.AccessibleAWTList.AccessibleAWTListChild.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.

Uses of Accessible in javax.accessibility

Fields in javax.accessibility declared as Accessible
protected  Accessible AccessibleContext.accessibleParent
The accessible parent of this object.

Methods in javax.accessibility that return Accessible
Accessible | AccessibleContext.getAccessibleParent() Gets the Accessible parent of this object.
abstract Accessible | AccessibleContext.getAccessibleChild(int i) Returns the specified Accessible child of the object.
Accessible | AccessibleSelection.getAccessibleSelection(int i) Returns an Accessible representing the specified selected child of the object.
Accessible | AccessibleComponent.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | AccessibleTable.getAccessibleCaption() Returns the caption for the table.
Accessible | AccessibleTable.getAccessibleSummary() Returns the summary description of the table.
Accessible | AccessibleTable.getAccessibleAt(int r, int c) Returns the Accessible at a specified row and column in the table.
Accessible | AccessibleTable.getAccessibleRowDescription(int r) Returns the description of the specified row in the table.
Accessible | AccessibleTable.getAccessibleColumnDescription(int c) Returns the description text of the specified column in the table.

Methods in javax.accessibility with parameters of type Accessible
void | AccessibleContext.setAccessibleParent(Accessible a) Sets the Accessible parent of this object.
void | AccessibleTable.setAccessibleCaption(Accessible a) Sets the caption for the table.
void | AccessibleTable.setAccessibleSummary(Accessible a) Sets the summary description of the table
void | AccessibleTable.setAccessibleRowDescription(int r, Accessible a) Sets the description text of the specified row of the table.
void | AccessibleTable.setAccessibleColumnDescription(int c, Accessible a) Sets the description text of the specified column in the table.

Uses of Accessible in javax.swing

Classes in javax.swing that implement Accessible
class | Box A lightweight container that uses a BoxLayout object as its layout manager.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
class | CellRendererPane This class is inserted in between cell renderers and the components that use them.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | ImageIcon An implementation of the Icon interface that paints Icons from Images.
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JDialog The main class for creating a dialog window.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
protected class | JList.AccessibleJList.AccessibleJListChild This class implements accessibility support appropriate for list children.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable.AccessibleJTableCell The class provides an implementation of the Java Accessibility API appropriate to table cells.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Methods in javax.swing that return Accessible
Accessible | JComponent.AccessibleJComponent.getAccessibleChild(int i) Returns the nth Accessible child of the object.
Accessible | JTabbedPane.AccessibleJTabbedPane.getAccessibleChild(int i) Return the specified Accessible child of the object.
Accessible | JTabbedPane.AccessibleJTabbedPane.getAccessibleAt(Point p)
Accessible | JTabbedPane.AccessibleJTabbedPane.getAccessibleSelection(int i)
Accessible | JMenu.AccessibleJMenu.getAccessibleChild(int i) Returns the nth Accessible child of the object.
Accessible | JMenu.AccessibleJMenu.getAccessibleSelection(int i) Returns the currently selected sub-menu if one is selected, otherwise null (there can only be one selection, and it can only be a sub-menu, as otherwise menu items don't remain selected).
static Accessible | SwingUtilities.getAccessibleAt(Component c, Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
static Accessible | SwingUtilities.getAccessibleChild(Component c, int i) Return the nth Accessible child of the object.
Accessible | JComboBox.AccessibleJComboBox.getAccessibleChild(int i) Returns the nth Accessible child of the object.
Accessible | JComboBox.AccessibleJComboBox.getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the popup.
Accessible | JList.AccessibleJList.getAccessibleAt(Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
Accessible | JList.AccessibleJList.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | JList.AccessibleJList.getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
Accessible | JList.AccessibleJList.AccessibleJListChild.getAccessibleChild(int i)
Accessible | JList.AccessibleJList.AccessibleJListChild.getAccessibleAt(Point p)
Accessible | JTree.AccessibleJTree.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | JTree.AccessibleJTree.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | JTree.AccessibleJTree.getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
Accessible | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleParent() Get the Accessible parent of this object.
Accessible | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleChild(int i) Return the specified Accessible child of the object.
Accessible | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAt(Point p)
Accessible | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
Accessible | JTable.AccessibleJTable.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | JTable.AccessibleJTable.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | JTable.AccessibleJTable.getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the object.
Accessible | JTable.AccessibleJTable.getAccessibleCaption() Returns the caption for the table.
Accessible | JTable.AccessibleJTable.getAccessibleSummary() Returns the summary description of the table.
Accessible | JTable.AccessibleJTable.getAccessibleAt(int r, int c)
Accessible | JTable.AccessibleJTable.getAccessibleRowDescription(int r) Return the description of the specified row in the table.
Accessible | JTable.AccessibleJTable.getAccessibleColumnDescription(int c) Return the description of the specified column in the table.
Accessible | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleParent() Gets the Accessible parent of this object.
Accessible | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleChild(int i) Return the specified Accessible child of the object.
Accessible | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAt(Point p)
Accessible | JMenuBar.AccessibleJMenuBar.getAccessibleSelection(int i) Returns the currently selected menu if one is selected, otherwise null.
Accessible | ImageIcon.AccessibleImageIcon.getAccessibleParent() Gets the Accessible parent of this object.
Accessible | ImageIcon.AccessibleImageIcon.getAccessibleChild(int i) Returns the nth Accessible child of the object.

Methods in javax.swing with parameters of type Accessible
void | JTable.AccessibleJTable.setAccessibleCaption(Accessible a) Sets the caption for the table.
void | JTable.AccessibleJTable.setAccessibleSummary(Accessible a) Sets the summary description of the table.
void | JTable.AccessibleJTable.setAccessibleRowDescription(int r, Accessible a) Sets the description text of the specified row of the table.
void | JTable.AccessibleJTable.setAccessibleColumnDescription(int c, Accessible a) Sets the description text of the specified column of the table.

Constructors in javax.swing with parameters of type Accessible
JTree.AccessibleJTree.AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
Constructs an AccessibleJTreeNode

Uses of Accessible in javax.swing.colorchooser

Classes in javax.swing.colorchooser that implement Accessible
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of Accessible in javax.swing.plaf

Methods in javax.swing.plaf that return Accessible
 Accessible ComponentUI.getAccessibleChild(JComponent c, int i)
Return the nth Accessible child of the object.

Uses of Accessible in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Accessible
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
protected class | BasicToolBarUI.DragWindow

Methods in javax.swing.plaf.basic that return Accessible
 Accessible BasicComboBoxUI.getAccessibleChild(JComponent c, int i)

Uses of Accessible in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Accessible
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Uses of Accessible in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return Accessible
Accessible | MultiListUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiSeparatorUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiLabelUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiPopupMenuUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiPanelUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiScrollBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiTextUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiComboBoxUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiTableHeaderUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiFileChooserUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiColorChooserUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiTreeUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiViewportUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiTabbedPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiProgressBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiScrollPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiOptionPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiSplitPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiButtonUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiToolBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiSliderUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiDesktopPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiTableUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiDesktopIconUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiMenuItemUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiInternalFrameUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiToolTipUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
Accessible | MultiMenuBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.

Uses of Accessible in javax.swing.table

Classes in javax.swing.table that implement Accessible
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.
protected class | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.

Methods in javax.swing.table that return Accessible
Accessible | JTableHeader.AccessibleJTableHeader.getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | JTableHeader.AccessibleJTableHeader.getAccessibleChild(int i) Return the nth Accessible child of the object.
Accessible | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleChild(int i)
Accessible | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAt(Point p)

Uses of Accessible in javax.swing.text

Classes in javax.swing.text that implement Accessible
 class JTextComponent
JTextComponent is the base class for swing text components.

Uses of Accessible in javax.swing.tree

Classes in javax.swing.tree that implement Accessible
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleAction

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleAction

Packages that use AccessibleAction
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of AccessibleAction in java.awt

Classes in java.awt that implement AccessibleAction
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.

Methods in java.awt that return AccessibleAction
AccessibleAction | MenuItem.AccessibleAWTMenuItem.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | Checkbox.AccessibleAWTCheckbox.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | Choice.AccessibleAWTChoice.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | Button.AccessibleAWTButton.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleAction() Get the AccessibleAction associated with this object.

Uses of AccessibleAction in javax.accessibility

Classes in javax.accessibility that implement AccessibleAction
 class AccessibleHyperlink
Encapsulation of a link, or set of links (e.g.

Methods in javax.accessibility that return AccessibleAction
 AccessibleAction AccessibleContext.getAccessibleAction()
Gets the AccessibleAction associated with this object that supports one or more actions.

Uses of AccessibleAction in javax.swing

Classes in javax.swing that implement AccessibleAction
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.

Methods in javax.swing that return AccessibleAction
AccessibleAction | AbstractButton.AccessibleAbstractButton.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | JComboBox.AccessibleJComboBox.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | JList.AccessibleJList.AccessibleJListChild.getAccessibleAction()
AccessibleAction | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAction() Get the AccessibleAction associated with this object.
AccessibleAction | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAction() Gets the AccessibleAction associated with this object if one exists.

Uses of AccessibleAction in javax.swing.table

Methods in javax.swing.table that return AccessibleAction
 AccessibleAction JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAction()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleComponent

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleComponent

Packages that use AccessibleComponent
java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AccessibleComponent in java.applet

Classes in java.applet that implement AccessibleComponent
protected  class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.

Uses of AccessibleComponent in java.awt

Classes in java.awt that implement AccessibleComponent
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
protected class | Canvas.AccessibleAWTCanvas This class implements accessibility support for the Canvas class.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Choice.AccessibleAWTChoice This class implements accessibility support for the Choice class.
protected class | Component.AccessibleAWTComponent Inner class of Component used to provide default support for accessibility.
protected class | Container.AccessibleAWTContainer Inner class of Container used to provide default support for accessibility.
protected class | Dialog.AccessibleAWTDialog This class implements accessibility support for the Dialog class.
protected class | Frame.AccessibleAWTFrame This class implements accessibility support for the Frame class.
protected class | Label.AccessibleAWTLabel This class implements accessibility support for the Label class.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | List.AccessibleAWTList.AccessibleAWTListChild This class implements accessibility support for List children.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
protected class | MenuComponent.AccessibleAWTMenuComponent Inner class of MenuComponent used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.
protected class | ScrollPane.AccessibleAWTScrollPane This class implements accessibility support for the ScrollPane class.
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.
protected class | Window.AccessibleAWTWindow This class implements accessibility support for the Window class.

Methods in java.awt that return AccessibleComponent
AccessibleComponent | Component.AccessibleAWTComponent.getAccessibleComponent() Get the AccessibleComponent associated with this object if one exists.
AccessibleComponent | MenuComponent.AccessibleAWTMenuComponent.getAccessibleComponent() Get the AccessibleComponent associated with this object if one exists.

Uses of AccessibleComponent in javax.accessibility

Methods in javax.accessibility that return AccessibleComponent
 AccessibleComponent AccessibleContext.getAccessibleComponent()
Gets the AccessibleComponent associated with this object that has a graphical representation.

Uses of AccessibleComponent in javax.swing

Classes in javax.swing that implement AccessibleComponent
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
protected class | Box.Filler.AccessibleBoxFiller This class implements accessibility support for the Box.Filler class.
protected class | CellRendererPane.AccessibleCellRendererPane This class implements accessibility support for the CellRendererPane class.
protected class | JApplet.AccessibleJApplet This class implements accessibility support for the JApplet class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
class | JComponent.AccessibleJComponent Inner class of JComponent used to provide default support for accessibility.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
protected class | JDialog.AccessibleJDialog This class implements accessibility support for the JDialog class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
protected class | JFrame.AccessibleJFrame This class implements accessibility support for the JFrame class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JList.AccessibleJList.AccessibleJListChild This class implements accessibility support appropriate for list children.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTable.AccessibleJTable.AccessibleJTableCell The class provides an implementation of the Java Accessibility API appropriate to table cells.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JWindow.AccessibleJWindow This class implements accessibility support for the JWindow class.

Methods in javax.swing that return AccessibleComponent
AccessibleComponent | JList.AccessibleJList.AccessibleJListChild.getAccessibleComponent() Get the AccessibleComponent associated with this object.
AccessibleComponent | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleComponent() Get the AccessibleComponent associated with this object.
AccessibleComponent | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleComponent() Gets the AccessibleComponent associated with this object if one exists.

Uses of AccessibleComponent in javax.swing.table

Classes in javax.swing.table that implement AccessibleComponent
protected class | JTableHeader.AccessibleJTableHeader This class implements accessibility support for the JTableHeader class.
protected class | JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.

Methods in javax.swing.table that return AccessibleComponent
 AccessibleComponent JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleComponent()
Get the AccessibleComponent associated with this object.

Uses of AccessibleComponent in javax.swing.text

Classes in javax.swing.text that implement AccessibleComponent
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleHypertext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleHypertext

Packages that use AccessibleHypertext
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleHypertext in javax.swing

Classes in javax.swing that implement AccessibleHypertext
protected  class JEditorPane.JEditorPaneAccessibleHypertextSupport
What's returned by AccessibleJEditorPaneHTML.getAccessibleText.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleIcon

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleIcon

Packages that use AccessibleIcon
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleIcon in javax.accessibility

Methods in javax.accessibility that return AccessibleIcon
 AccessibleIcon[] AccessibleContext.getAccessibleIcon()
Gets the AccessibleIcons associated with an object that has one or more associated icons

Uses of AccessibleIcon in javax.swing

Classes in javax.swing that implement AccessibleIcon
protected  class ImageIcon.AccessibleImageIcon
This class implements accessibility support for the ImageIcon class.

Methods in javax.swing that return AccessibleIcon
AccessibleIcon[] | AbstractButton.AccessibleAbstractButton.getAccessibleIcon() Get the AccessibleIcons associated with this object if one or more exist.
AccessibleIcon[] | JLabel.AccessibleJLabel.getAccessibleIcon() Get the AccessibleIcons associated with this object if one or more exist.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleSelection

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleSelection

Packages that use AccessibleSelection
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of AccessibleSelection in java.awt

Classes in java.awt that implement AccessibleSelection
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | List.AccessibleAWTList This class implements accessibility support for the List class.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuBar.AccessibleAWTMenuBar Inner class of MenuBar used to provide default support for accessibility.
protected class | MenuComponent.AccessibleAWTMenuComponent Inner class of MenuComponent used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.

Methods in java.awt that return AccessibleSelection
AccessibleSelection | MenuComponent.AccessibleAWTMenuComponent.getAccessibleSelection() Get the AccessibleSelection associated with this object which allows its Accessible children to be selected.
AccessibleSelection | List.AccessibleAWTList.getAccessibleSelection() Get the AccessibleSelection associated with this object.

Uses of AccessibleSelection in javax.accessibility

Methods in javax.accessibility that return AccessibleSelection
 AccessibleSelection AccessibleContext.getAccessibleSelection()
Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.

Uses of AccessibleSelection in javax.swing

Classes in javax.swing that implement AccessibleSelection
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.AccessibleJTree.AccessibleJTreeNode This class implements accessibility support for the JTree child.

Methods in javax.swing that return AccessibleSelection
AccessibleSelection | JTabbedPane.AccessibleJTabbedPane.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JMenu.AccessibleJMenu.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JComboBox.AccessibleJComboBox.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JList.AccessibleJList.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JList.AccessibleJList.AccessibleJListChild.getAccessibleSelection()
AccessibleSelection | JTree.AccessibleJTree.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelection() Get the AccessibleSelection associated with this object if one exists.
AccessibleSelection | JTable.AccessibleJTable.getAccessibleSelection() Get the AccessibleSelection associated with this object.
AccessibleSelection | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleSelection() Gets the AccessibleSelection associated with this object if one exists.
AccessibleSelection | JMenuBar.AccessibleJMenuBar.getAccessibleSelection() Get the AccessibleSelection associated with this object.

Uses of AccessibleSelection in javax.swing.table

Methods in javax.swing.table that return AccessibleSelection
 AccessibleSelection JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleSelection()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleTable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleTable

Packages that use AccessibleTable
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleTable in javax.accessibility

Methods in javax.accessibility that return AccessibleTable
AccessibleTable | AccessibleContext.getAccessibleTable() Gets the AccessibleTable associated with an object
AccessibleTable | AccessibleTable.getAccessibleRowHeader() Returns the row headers as an AccessibleTable.
AccessibleTable | AccessibleTable.getAccessibleColumnHeader() Returns the column headers as an AccessibleTable.

Methods in javax.accessibility with parameters of type AccessibleTable
void | AccessibleTable.setAccessibleRowHeader(AccessibleTable table) Sets the row headers.
void | AccessibleTable.setAccessibleColumnHeader(AccessibleTable table) Sets the column headers.

Uses of AccessibleTable in javax.swing

Classes in javax.swing that implement AccessibleTable
protected  class JTable.AccessibleJTable
This class implements accessibility support for the JTable class.

Methods in javax.swing that return AccessibleTable
AccessibleTable | JTable.AccessibleJTable.getAccessibleTable() Get the AccessibleTable associated with this object.
AccessibleTable | JTable.AccessibleJTable.getAccessibleRowHeader() Return the row headers as an AccessibleTable.
AccessibleTable | JTable.AccessibleJTable.getAccessibleColumnHeader() Return the column headers as an AccessibleTable.

Methods in javax.swing with parameters of type AccessibleTable
void | JTable.AccessibleJTable.setAccessibleRowHeader(AccessibleTable a) Return the row headers as an AccessibleTable.
void | JTable.AccessibleJTable.setAccessibleColumnHeader(AccessibleTable a) Return the column headers as an AccessibleTable.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleTableModelChange

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleTableModelChange

Packages that use AccessibleTableModelChange
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AccessibleTableModelChange in javax.swing

Classes in javax.swing that implement AccessibleTableModelChange
protected  class JTable.AccessibleJTable.AccessibleJTableModelChange

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleText

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleText

Packages that use AccessibleText
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AccessibleText in java.awt

Classes in java.awt that implement AccessibleText
protected class | TextArea.AccessibleAWTTextArea This class implements accessibility support for the TextArea class.
protected class | TextComponent.AccessibleAWTTextComponent This class implements accessibility support for the TextComponent class.
protected class | TextField.AccessibleAWTTextField This class implements accessibility support for the TextField class.

Methods in java.awt that return AccessibleText
 AccessibleText TextComponent.AccessibleAWTTextComponent.getAccessibleText()
Get the AccessibleText associated with this object.

Uses of AccessibleText in javax.accessibility

Subinterfaces of AccessibleText in javax.accessibility
 interface AccessibleHypertext
The AccessibleHypertext class is the base class for all classes that present hypertext information on the display.

Methods in javax.accessibility that return AccessibleText
 AccessibleText AccessibleContext.getAccessibleText()
Gets the AccessibleText associated with this object presently editable text on the display.

Uses of AccessibleText in javax.swing

Classes in javax.swing that implement AccessibleText
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.

Methods in javax.swing that return AccessibleText
AccessibleText | AbstractButton.AccessibleAbstractButton.getAccessibleText()
AccessibleText | JEditorPane.AccessibleJEditorPaneHTML.getAccessibleText()
AccessibleText | JList.AccessibleJList.AccessibleJListChild.getAccessibleText()
AccessibleText | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleText() Get the AccessibleText associated with this object if one exists.
AccessibleText | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleText() Gets the AccessibleText associated with this object if one exists.
AccessibleText | JLabel.AccessibleJLabel.getAccessibleText()

Uses of AccessibleText in javax.swing.table

Methods in javax.swing.table that return AccessibleText
 AccessibleText JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleText()

Uses of AccessibleText in javax.swing.text

Classes in javax.swing.text that implement AccessibleText
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Methods in javax.swing.text that return AccessibleText
 AccessibleText JTextComponent.AccessibleJTextComponent.getAccessibleText()
Get the AccessibleText associated with this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.accessibility.AccessibleValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.accessibility.AccessibleValue

Packages that use AccessibleValue
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of AccessibleValue in java.awt

Classes in java.awt that implement AccessibleValue
protected class | Button.AccessibleAWTButton This class implements accessibility support for the Button class.
protected class | Checkbox.AccessibleAWTCheckbox This class implements accessibility support for the Checkbox class.
protected class | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem Inner class of CheckboxMenuItem used to provide default support for accessibility.
protected class | Menu.AccessibleAWTMenu Inner class of Menu used to provide default support for accessibility.
protected class | MenuItem.AccessibleAWTMenuItem Inner class of MenuItem used to provide default support for accessibility.
protected class | PopupMenu.AccessibleAWTPopupMenu Inner class of PopupMenu used to provide default support for accessibility.
protected class | Scrollbar.AccessibleAWTScrollBar This class implements accessibility support for the Scrollbar class.

Methods in java.awt that return AccessibleValue
AccessibleValue | Scrollbar.AccessibleAWTScrollBar.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | MenuItem.AccessibleAWTMenuItem.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | Checkbox.AccessibleAWTCheckbox.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | Button.AccessibleAWTButton.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.getAccessibleValue() Get the AccessibleValue associated with this object.

Uses of AccessibleValue in javax.accessibility

Methods in javax.accessibility that return AccessibleValue
 AccessibleValue AccessibleContext.getAccessibleValue()
Gets the AccessibleValue associated with this object that supports a Numerical value.

Uses of AccessibleValue in javax.swing

Classes in javax.swing that implement AccessibleValue
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.

Methods in javax.swing that return AccessibleValue
AccessibleValue | AbstractButton.AccessibleAbstractButton.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JList.AccessibleJList.AccessibleJListChild.getAccessibleValue()
AccessibleValue | JInternalFrame.AccessibleJInternalFrame.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JSplitPane.AccessibleJSplitPane.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleValue() Get the AccessibleValue associated with this object if one exists.
AccessibleValue | JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleValue() Gets the AccessibleValue associated with this object if one exists.
AccessibleValue | JScrollBar.AccessibleJScrollBar.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JProgressBar.AccessibleJProgressBar.getAccessibleValue() Get the AccessibleValue associated with this object.
AccessibleValue | JSlider.AccessibleJSlider.getAccessibleValue() Get the AccessibleValue associated with this object.

Uses of AccessibleValue in javax.swing.table

Methods in javax.swing.table that return AccessibleValue
 AccessibleValue JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleValue()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.accessibility

Defines a contract between user-interface components and an assistive technology that provides access to those components.

See:
Description

Interface Summary
Accessible | Interface Accessible is the main interface for the accessibility package.
AccessibleAction | The AccessibleAction interface should be supported by any object that can perform one or more actions.
AccessibleComponent | The AccessibleComponent interface should be supported by any object that is rendered on the screen.
AccessibleHypertext | The AccessibleHypertext class is the base class for all classes that present hypertext information on the display.
AccessibleIcon | The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons).
AccessibleSelection | This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
AccessibleTable | Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.
AccessibleTableModelChange | The AccessibleTableModelChange interface describes a change to the table model.
AccessibleText | The AccessibleText interface should be implemented by all classes that present textual information on the display.
AccessibleValue | The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar).

Class Summary
AccessibleBundle | Base class used to maintain a strongly typed enumeration.
AccessibleContext | AccessibleContext represents the minimum information all accessible objects return.
AccessibleHyperlink | Encapsulation of a link, or set of links (e.g.
AccessibleRelation | Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
AccessibleRelationSet | Class AccessibleRelationSet determines a component's relation set.
AccessibleResourceBundle | Deprecated. This class is deprecated as of version 1.3 of the Java 2 Platform.
AccessibleRole | Class AccessibleRole determines the role of a component.
AccessibleState | Class AccessibleState describes a component's particular state.
AccessibleStateSet | Class AccessibleStateSet determines a component's state set.

Package javax.accessibility Description

Defines a contract between user-interface components and an assistive technology that provides access to those components. If a Java application fully supports the Java Accessibility API, then it should be compatible with, and friendly toward, assistive technologies such as screen readers, screen magnifiers, etc. With a Java application that fully supports the Java Accessibility API, no screen reader off screen model would be necessary because the API provides all of the information normally contained in an off screen model.

The Java Accessibility API package consists of 8 Java programming language interfaces, and 6 Java programming language classes. These are described below.

Interface Accessible

Interface Accessible is the main interface of the Java Accessibility API. All components that support the Java Accessibility API must implement this interface. It contains a single method, getAccessibleContext, that returns an instance of the class AccessibleContext. Sun thinks that implementing this interface is the absolute minimum requirement of every object that is part of the user interface of a Java application, if that program is to be compatible with assistive technologies.

Class AccessibleContext

AccessibleContext represents the minimum information all accessible objects return and is obtained by calling the getAccessibleContext method on an object that implements the Accessible interface. This information includes the accessible name, description, role, and state of the object, as well as information about the parent and children of the object. In addition, JavaBeans TM property change support is also included to allow assisitive technologies learn when the values of the accessible properties change. AccessibleContext also contains methods for obtaining more specific accessibility information about a component. If the component supports it, these methods will return an object that implements one or more of the following interfaces:
  • AccessibleAction - the object can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are and tell the object to perform those actions. Any object that can be manipulated should return an object that implements this interface when the getAccessibleAction method is called on an AccessibleContext.
  • AccessibleComponent - the object has a graphical representation. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of the object. Any object that is rendered on the screen should return an object that implements this interface when the getAccessibleComponent method is called on an AccessibleContext.
  • AccessibleSelection - the object allows its children to be selected. This interface provides the standard mechanism for an assistive technology to determine the currently selected children as well as modify the selection set. Any object that has children that can be selected should return an object that implements this interface when the getAccessibleSelection method is called on an AccessibleContext.
  • AccessibleText - the object presents editable textual information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. Any object that contains editable text should return an object that implements this interface when the getAccessibleText method is called on an AccessibleContext.
  • AccessibleHypertext - the object presents hypertext information on the display. This interface provides the standard mechanism for an assistive technology to access that hypertext via its content, attributes, and spatial location. Any object that contains hypertext should return an object that implements this interface when the getAccessibleText method is called on an AccessibleContext.
  • AccessibleValue - the object supports a numerical value. This interface provides the standard mechanism for an assistive technology to determine and set the current value of the object, as well as the minimum and maximum values. Any object that supports a numerical value should return an object that implements this interface when the getAccessibleValue method is called on an AccessibleContext.

Class AccessibleRole

This class encapsulates the Accessible object's role in the user interface and is obtained by calling the getAccessibleRole method on an AccessibleContext. Accessible roles include "Check box", "Menu Item", "Panel", etc. These roles are identified by the constants in this class such as AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM, and AccessibleRole.PANEL. The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional programmer-defined roles can be added in the future without needing to modify the base class.

Class AccessibleState

This class encapsulates a particular state of the Accessible object. Accessible states include things like "Armed", "Busy", "Checked", "Focused", etc. These roles are identified by the constants in this class such as AccessibleState.ARMED, AccessibleState.BUSY, AccessibleState.CHECKED, and AccessibleState.FOCUSED. The sum of all the states of an Accessible object is called the AccessibleStateSet, and can be obtained by calling the getAccessibleStateSet method on an AccessibleContext.

The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional, programmer-defined roles can be added in the future without needing to modify the base class.

Class AccessibleStateSet

This class encapsulates a collection of states of the Accessible object and is obtained by calling the getAccessibleStateSet method on an AccessibleContext. Since an object might have multiple states (e.g. it might be both "Checked" and "Focused"), this class is needed to encapsulate a collection of these states. Methods in the class provide for retrieving the individual AccessibleStates on the state set.

Class AccessibleBundle

This class is used to maintain a strongly typed enumeration. It is the super class of both the AccessibleRole and AccessibleState classes. Programmers normally do not interact with this class directly, but will instead use the AccessibleRole and AccessibleState classes.

Interface AccessibleAction

The AccessibleAction interface should be supported by any object that can perform one or more actions. This interface provides the standard mechanism for an assistive technology to determine what those actions are as well as tell the object to perform those actions. Any object that can be manipulated should support this interface.

Applications can determine if an object supports the AccessibleAction interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleAction method of AccessibleContext. If the return value is not null, the object supports this interface.

Interface AccessibleComponent

The AccessibleComponent interface should be supported by any object that is rendered on the screen. This interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of an object.

Applications can determine if an object supports the AccessibleComponent interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleComponent method of AccessibleContext. If the return value is not null, the object supports this interface.

Interface AccessibleSelection

The AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set. Any object that has children that can be selected should support this the AccessibleSelection interface.

Applications can determine if an object supports the AccessibleSelection interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleSelection method of AccessibleContext. If the return value is not null, the object supports this interface.

Interface AccessibleText

Interface AccessibleText is the contract for making rich, editable text Accessible. Not all text displayed on the screen is rich and editable (e.g. text contained in buttons, labels, menus, etc., which users aren't expected to manipulate). However, objects containing editable text must implement interface AccessibleText if they are to interoperate with assistive technologies.

This interface provides support for going between pixel coordinates and the text at a given pixel coordinate, for retrieving the letter, word, and sentence at, before, or after a given position in the text. This interface provides support for retrieving the attributes of the character at a given position in the text (font, font size, style, etc.), as well as getting the selected text (if any), the length of the text, and the location of the text caret.

Applications can determine if an object supports the AccessibleText interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleText method of AccessibleContext. If the return value is not null, the object supports this interface.

Interface AccessibleHypertext

The AccessibleHypertext interface should be supported by any object that presents hypertext information on the display. This interface provides the standard mechanism for an assistive technology to access that text via its content, attributes, and spatial location. It also provides standard mechanisms for manipulating hyperlinks. Applications can determine if an object supports the AccessibleHypertext interface by first obtaining its AccessibleContext (see Accessible) and then calling the AccessibleContext.getAccessibleText() method of AccessibleContext. If the return value is a class which extends AccessibleHypertext, then that object supports AccessibleHypertext.

Interface AccessibleHyperlink

An object that is a hyperlink should support the AccessibleHyperlink interface. An object that implements this interface will be returned by calling the getLink method on an AccessibleHypertext object.

Interface AccessibleValue

The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar). This interface provides the standard mechanism for an assistive technology to determine and set the numerical value as well as get the minimum and maximum values.

Applications can determine if an object supports the AccessibleValue interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleValue method of AccessibleContext. If the return value is not null, the object supports this interface.

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


javax.naming Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.naming

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.naming.CompositeName (implements javax.naming.Name)
    • class javax.naming.CompoundName (implements javax.naming.Name)
    • class javax.naming.InitialContext (implements javax.naming.Context)
    • class javax.naming.NameClassPair (implements java.io.Serializable)
      • class javax.naming.Binding
    • class javax.naming.RefAddr (implements java.io.Serializable)
      • class javax.naming.BinaryRefAddr
      • class javax.naming.StringRefAddr
    • class javax.naming.Reference (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.naming.LinkRef
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.naming.NamingException
          • class javax.naming.CannotProceedException
          • class javax.naming.CommunicationException
          • class javax.naming.ConfigurationException
          • class javax.naming.ContextNotEmptyException
          • class javax.naming.InsufficientResourcesException
          • class javax.naming.InterruptedNamingException
          • class javax.naming.InvalidNameException
          • class javax.naming.LimitExceededException
            • class javax.naming.SizeLimitExceededException
            • class javax.naming.TimeLimitExceededException
          • class javax.naming.LinkException
            • class javax.naming.LinkLoopException
            • class javax.naming.MalformedLinkException
          • class javax.naming.NameAlreadyBoundException
          • class javax.naming.NameNotFoundException
          • class javax.naming.NamingSecurityException
            • class javax.naming.AuthenticationException
            • class javax.naming.AuthenticationNotSupportedException
            • class javax.naming.NoPermissionException
          • class javax.naming.NoInitialContextException
          • class javax.naming.NotContextException
          • class javax.naming.OperationNotSupportedException
          • class javax.naming.PartialResultException
          • class javax.naming.ReferralException
          • class javax.naming.ServiceUnavailableException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface javax.naming.Name (also extends java.io.Serializable)
  • interface javax.naming.Context
  • interface java.util.Enumeration
    • interface javax.naming.NamingEnumeration
  • interface javax.naming.NameParser
  • interface javax.naming.Referenceable
  • interface java.io.Serializable
    • interface javax.naming.Name (also extends java.lang.Cloneable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.naming

Provides the classes and interfaces for accessing naming services.

See:
Description

Interface Summary
Context | This interface represents a naming context, which consists of a set of name-to-object bindings.
Name | The Name interface represents a generic name -- an ordered sequence of components.
NameParser | This interface is used for parsing names from a hierarchical namespace.
NamingEnumeration | This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.
Referenceable | This interface is implemented by an object that can provide a Reference to itself.

Class Summary
BinaryRefAddr | This class represents the binary form of the address of a communications end-point.
Binding | This class represents a name-to-object binding found in a context.
CompositeName | This class represents a composite name -- a sequence of component names spanning multiple namespaces.
CompoundName | This class represents a compound name -- a name from a hierarchical name space.
InitialContext | This class is the starting context for performing naming operations.
LinkRef | This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.
NameClassPair | This class represents the object name and class name pair of a binding found in a context.
RefAddr | This class represents the address of a communications end-point.
Reference | This class represents a reference to an object that is found outside of the naming/directory system.
StringRefAddr | This class represents the string form of the address of a communications end-point.

Exception Summary
AuthenticationException | This exception is thrown when an authentication error occurs while accessing the naming or directory service.
AuthenticationNotSupportedException | This exception is thrown when the particular flavor of authentication requested is not supported.
CannotProceedException | This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
CommunicationException | This exception is thrown when the client is unable to communicate with the directory or naming service.
ConfigurationException | This exception is thrown when there is a configuration problem.
ContextNotEmptyException | This exception is thrown when attempting to destroy a context that is not empty.
InsufficientResourcesException | This exception is thrown when resources are not available to complete the requested operation.
InterruptedNamingException | This exception is thrown when the naming operation being invoked has been interrupted.
InvalidNameException | This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
LimitExceededException | This exception is thrown when a method terminates abnormally due to a user or system specified limit.
LinkException | This exception is used to describe problems encounter while resolving links.
LinkLoopException | This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
MalformedLinkException | This exception is thrown when a malformed link was encountered while resolving or constructing a link.
NameAlreadyBoundException | This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
NameNotFoundException | This exception is thrown when a component of the name cannot be resolved because it is not bound.
NamingException | This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
NamingSecurityException | This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
NoInitialContextException | This exception is thrown when no initial context implementation can be created.
NoPermissionException | This exception is thrown when attempting to perform an operation for which the client has no permission.
NotContextException | This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
OperationNotSupportedException | This exception is thrown when a context implementation does not support the operation being invoked.
PartialResultException | This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
ReferralException | This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
ServiceUnavailableException | This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
SizeLimitExceededException | This exception is thrown when a method produces a result that exceeds a size-related limit.
TimeLimitExceededException | This exception is thrown when a method does not terminate within the specified time limit.

Package javax.naming Description

Provides the classes and interfaces for accessing naming services.

This package defines the naming operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

Context

This package defines the notion of a context, represented by the Context interface. A context consists of a set of name-to-object bindings. Context is the core interface for looking up, binding, unbinding, and renaming objects, and for creating and destroying subcontexts.

lookup() is the most commonly used operation. You supply lookup() the name of the object you want to look up, and it returns the object bound to that name. For example, the following code fragment looks up a printer and sends a document to the printer object to be printed:

Printer printer = (Printer)ctx.lookup("treekiller");
printer.print(report);

Names

Every naming method in the Context interface has two overloads: one that accepts a Name argument and one that accepts a string name. Name is an interface that represents a generic name--an ordered sequence of zero of more components. For these methods, Name can be used to represent a composite name (CompositeName) so that you can name an object using a name which spans multiple namespaces.

The overloads that accept Name are useful for applications that need to manipulate names: composing them, comparing components, and so on. The overloads that accept string names are likely to be more useful for simple applications, such as those that simply read in a name and look up the corresponding object.

Bindings

The Binding class represents a name-to-object binding. It is a tuple containing the name of the bound object, the name of the object's class, and the object itself.

The Binding class is actually a subclass of NameClassPair, which consists simply of the object's name and the object's class name. The NameClassPair is useful when you only want information about the object's class and do not want to pay the extra cost of getting the object.

References

Objects are stored in naming and directory services in different ways. If an object store supports storing Java objects, it might support storing an object in its serialized form. However, some naming and directory services do not support the storing of Java objects. Furthermore, for some objects in the directory, Java programs are but one group of applications that access them. In this case, a serialized Java object might not be the most appropriate representation. JNDI defines a reference, represented by the Reference class, which contains information on how to construct a copy of the object. JNDI will attempt to turn references looked up from the directory into the Java objects they represent, so that JNDI clients have the illusion that what is stored in the directory are Java objects.

The Initial Context

In JNDI, all naming and directory operations are performed relative to a context. There are no absolute roots. Therefore JNDI defines an initial context, InitialContext, which provides a starting point for naming and directory operations. Once you have an initial context, you can use it to look up other contexts and objects.

Exceptions

JNDI defines a class hierarchy for exceptions that can be thrown in the course of performing naming and directory operations. The root of this class hierarchy is NamingException. Programs interested in dealing with a particular exception can catch the corresponding subclass of the exception. Otherwise, programs should catch NamingException.

Package Specification

The following documents can be found at the Java technology web site:
  • JNDI API Document (Postscript)
  • JNDI API Document (PDF)

Related Documentation

For a tutorial, examples, and overview, please see:
  • The JNDI Tutorial
  • Examples
  • Executive Summary (Postscript)
  • Executive Summary (PDF)

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.naming

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.naming

Packages that use javax.naming
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Classes in javax.naming used by javax.naming
Context
This interface represents a naming context, which consists of a set of name-to-object bindings.
InvalidNameException
This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
LimitExceededException
This exception is thrown when a method terminates abnormally due to a user or system specified limit.
LinkException
This exception is used to describe problems encounter while resolving links.
Name
The Name interface represents a generic name -- an ordered sequence of components.
NameClassPair
This class represents the object name and class name pair of a binding found in a context.
NameParser
This interface is used for parsing names from a hierarchical namespace.
NamingEnumeration
This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.
NamingException
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
NamingSecurityException
This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
RefAddr
This class represents the address of a communications end-point.
Reference
This class represents a reference to an object that is found outside of the naming/directory system.

Classes in javax.naming used by javax.naming.directory
Binding
This class represents a name-to-object binding found in a context.
Context
This interface represents a naming context, which consists of a set of name-to-object bindings.
InitialContext
This class is the starting context for performing naming operations.
Name
The Name interface represents a generic name -- an ordered sequence of components.
NameClassPair
This class represents the object name and class name pair of a binding found in a context.
NamingEnumeration
This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages.
NamingException
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.

Classes in javax.naming used by javax.naming.event
Binding
This class represents a name-to-object binding found in a context.
Context
This interface represents a naming context, which consists of a set of name-to-object bindings.
Name
The Name interface represents a generic name -- an ordered sequence of components.
NamingException
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.

Classes in javax.naming used by javax.naming.ldap
Context
This interface represents a naming context, which consists of a set of name-to-object bindings.
InitialContext
This class is the starting context for performing naming operations.
NamingException
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.
ReferralException
This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.

Classes in javax.naming used by javax.naming.spi
CannotProceedException
This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
Context
This interface represents a naming context, which consists of a set of name-to-object bindings.
Name
The Name interface represents a generic name -- an ordered sequence of components.
NamingException
This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AuthenticationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class AuthenticationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NamingSecurityException
                          |
                          +--javax.naming.AuthenticationException
All Implemented Interfaces:
Serializable
public class AuthenticationException
extends NamingSecurityException

This exception is thrown when an authentication error occurs while accessing the naming or directory service. An authentication error can happen, for example, when the credentials supplied by the user program is invalid or otherwise fails to authenticate the user to the naming/directory service.

If the program wants to handle this exception in particular, it should catch AuthenticationException explicitly before attempting to catch NamingException. After catching AuthenticationException, the program could reattempt the authentication by updating the resolved context's environment properties with the appropriate appropriate credentials.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
AuthenticationException()
Constructs a new instance of AuthenticationException.
AuthenticationException(String explanation)
Constructs a new instance of AuthenticationException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AuthenticationException

public AuthenticationException(String explanation)
Constructs a new instance of AuthenticationException using the explanation supplied. All other fields default to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

AuthenticationException

public AuthenticationException()
Constructs a new instance of AuthenticationException. All fields are set to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AuthenticationNotSupportedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class AuthenticationNotSupportedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NamingSecurityException
                          |
                          +--javax.naming.AuthenticationNotSupportedException
All Implemented Interfaces:
Serializable
public class AuthenticationNotSupportedException
extends NamingSecurityException

This exception is thrown when the particular flavor of authentication requested is not supported. For example, if the program is attempting to use strong authentication but the directory/naming supports only simple authentication, this exception would be thrown. Identification of a particular flavor of authentication is provider- and server-specific. It may be specified using specific authentication schemes such those identified using SASL, or a generic authentication specifier (such as "simple" and "strong").

If the program wants to handle this exception in particular, it should catch AuthenticationNotSupportedException explicitly before attempting to catch NamingException. After catching AuthenticationNotSupportedException, the program could reattempt the authentication using a different authentication flavor by updating the resolved context's environment properties accordingly.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
AuthenticationNotSupportedException()
Constructs a new instance of AuthenticationNotSupportedException all name resolution fields and explanation initialized to null.
AuthenticationNotSupportedException(String explanation)
Constructs a new instance of AuthenticationNotSupportedException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AuthenticationNotSupportedException

public AuthenticationNotSupportedException(String explanation)
Constructs a new instance of AuthenticationNotSupportedException using an explanation. All other fields default to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

AuthenticationNotSupportedException

public AuthenticationNotSupportedException()
Constructs a new instance of AuthenticationNotSupportedException all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BinaryRefAddr

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class BinaryRefAddr

java.lang.Object
  |
  +--javax.naming.RefAddr
        |
        +--javax.naming.BinaryRefAddr
All Implemented Interfaces:
Serializable
public class BinaryRefAddr
extends RefAddr

This class represents the binary form of the address of a communications end-point.

A BinaryRefAddr consists of a type that describes the communication mechanism and an opaque buffer containing the address description specific to that communication mechanism. The format and interpretation of the address type and the contents of the opaque buffer are based on the agreement of three parties: the client that uses the address, the object/server that can be reached using the address, and the administrator or program that creates the address.

An example of a binary reference address is an BER X.500 presentation address. Another example of a binary reference address is a serialized form of a service's object handle.

A binary reference address is immutable in the sense that its fields once created, cannot be replaced. However, it is possible to access the byte array used to hold the opaque buffer. Programs are strongly recommended against changing this byte array. Changes to this byte array need to be explicitly synchronized.

Since:
1.3
See Also:
RefAddr, StringRefAddr, Serialized Form

Fields inherited from class javax.naming.RefAddr
addrType
Constructor Summary
BinaryRefAddr(String addrType, byte[] src)
Constructs a new instance of BinaryRefAddr using its address type and a byte array for contents.
BinaryRefAddr(String addrType, byte[] src, int offset, int count)
Constructs a new instance of BinaryRefAddr using its address type and a region of a byte array for contents.
Method Summary
boolean | equals(Object obj) Determines whether obj is equal to this address.
Object | getContent() Retrieves the contents of this address as an Object.
int | hashCode() Computes the hash code of this address using its address type and contents.
String | toString() Generates the string representation of this address.
Methods inherited from class javax.naming.RefAddr
getType
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BinaryRefAddr

public BinaryRefAddr(String addrType,
                     byte[] src)
Constructs a new instance of BinaryRefAddr using its address type and a byte array for contents.
Parameters:
addrType - A non-null string describing the type of the address.
src - The non-null contents of the address as a byte array. The contents of src is copied into the new BinaryRefAddr.

BinaryRefAddr

public BinaryRefAddr(String addrType,
                     byte[] src,
                     int offset,
                     int count)
Constructs a new instance of BinaryRefAddr using its address type and a region of a byte array for contents.
Parameters:
addrType - A non-null string describing the type of the address.
src - The non-null contents of the address as a byte array. The contents of src is copied into the new BinaryRefAddr.
offset - The starting index in src to get the bytes. 0 <= offset="offset" <="src.length.count - The number of bytes to extract from src. 0 <= count="count" <="src.length-offset.
Method Detail

getContent

public Object getContent()
Retrieves the contents of this address as an Object. The result is a byte array. Changes to this array will affect this BinaryRefAddr's contents. Programs are recommended against changing this array's contents and to lock the buffer if they need to change it.
Overrides:
getContent in class RefAddr
Returns:
The non-null buffer containing this address's contents.

equals

public boolean equals(Object obj)
Determines whether obj is equal to this address. It is equal if it contains the same address type and their contents are byte-wise equivalent.
Overrides:
equals in class RefAddr
Parameters:
obj - The possibly null object to check.
Returns:
true if the object is equal; false otherwise.

hashCode

public int hashCode()
Computes the hash code of this address using its address type and contents. Two BinaryRefAddrs have the same hash code if they have the same address type and the same contents. It is also possible for different BinaryRefAddrs to have the same hash code.
Overrides:
hashCode in class RefAddr
Returns:
The hash code of this address as an int.

toString

public String toString()
Generates the string representation of this address. The string consists of the address's type and contents with labels. The first 32 bytes of contents are displayed (in hexadecimal). If there are more than 32 bytes, "..." is used to indicate more. This string is meant to used for debugging purposes and not meant to be interpreted programmatically.
Overrides:
toString in class RefAddr
Returns:
The non-null string representation of this address.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Binding

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class Binding

java.lang.Object
  |
  +--javax.naming.NameClassPair
        |
        +--javax.naming.Binding
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SearchResult
public class Binding
extends NameClassPair

This class represents a name-to-object binding found in a context.

A context consists of name-to-object bindings. The Binding class represents such a binding. It consists of a name and an object. The Context.listBindings() method returns an enumeration of Binding.

Use subclassing for naming systems that generate contents of a binding dynamically.

A Binding instance is not synchronized against concurrent access by multiple threads. Threads that need to access a Binding concurrently should synchronize amongst themselves and provide the necessary locking.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
Binding(String name, Object obj)
Constructs an instance of a Binding given its name and object.
Binding(String name, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, object, and whether the name is relative.
Binding(String name, String className, Object obj)
Constructs an instance of a Binding given its name, class name, and object.
Binding(String name, String className, Object obj, boolean isRelative)
Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.
Method Summary
String | getClassName() Retrieves the class name of the object bound to the name of this binding.
Object | getObject() Retrieves the object bound to the name of this binding.
void | setObject(Object obj) Sets the object associated with this binding.
String | toString() Generates the string representation of this binding.
Methods inherited from class javax.naming.NameClassPair
getName, isRelative, setClassName, setName, setRelative
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Binding

public Binding(String name,
               Object obj)
Constructs an instance of a Binding given its name and object.

getClassName() will return the class name of obj (or null if obj is null) unless the class name has been explicitly set using setClassName()

Parameters:
name - The non-null name of the object. It is relative to the target context (which is named by the first parameter of the listBindings() method)
obj - The possibly null object bound to name.
See Also:
NameClassPair.setClassName(java.lang.String)

Binding

public Binding(String name,
               Object obj,
               boolean isRelative)
Constructs an instance of a Binding given its name, object, and whether the name is relative.

getClassName() will return the class name of obj (or null if obj is null) unless the class name has been explicitly set using setClassName()

Parameters:
name - The non-null string name of the object.
obj - The possibly null object bound to name.
isRelative - true if name is a name relative to the target context (which is named by the first parameter of the listBindings() method); false if name is a URL string.
See Also:
NameClassPair.isRelative(),
NameClassPair.setRelative(boolean),
NameClassPair.setClassName(java.lang.String)

Binding

public Binding(String name,
               String className,
               Object obj)
Constructs an instance of a Binding given its name, class name, and object.
Parameters:
name - The non-null name of the object. It is relative to the target context (which is named by the first parameter of the listBindings() method)
className - The possibly null class name of the object bound to name. If null, the class name of obj is returned by getClassName(). If obj is also null, getClassName() will return null.
obj - The possibly null object bound to name.
See Also:
NameClassPair.setClassName(java.lang.String)

Binding

public Binding(String name,
               String className,
               Object obj,
               boolean isRelative)
Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.
Parameters:
name - The non-null string name of the object.
className - The possibly null class name of the object bound to name. If null, the class name of obj is returned by getClassName(). If obj is also null, getClassName() will return null.
obj - The possibly null object bound to name.
isRelative - true if name is a name relative to the target context (which is named by the first parameter of the listBindings() method); false if name is a URL string.
See Also:
NameClassPair.isRelative(),
NameClassPair.setRelative(boolean),
NameClassPair.setClassName(java.lang.String)
Method Detail

getClassName

public String getClassName()
Retrieves the class name of the object bound to the name of this binding. If the class name has been set explicitly, return it. Otherwise, if this binding contains a non-null object, that object's class name is used. Otherwise, null is returned.
Overrides:
getClassName in class NameClassPair
Returns:
A possibly null string containing class name of object bound.

getObject

public Object getObject()
Retrieves the object bound to the name of this binding.
Returns:
The object bound; null if this binding does not contain an object.
See Also:
setObject(java.lang.Object)

setObject

public void setObject(Object obj)
Sets the object associated with this binding.
Parameters:
obj - The possibly null object to use.
See Also:
getObject()

toString

public String toString()
Generates the string representation of this binding. The string representation consists of the string representation of the name/class pair and the string representation of this binding's object, separated by ':'. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
Overrides:
toString in class NameClassPair
Returns:
The non-null string representation of this binding.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CannotProceedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class CannotProceedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.CannotProceedException
All Implemented Interfaces:
Serializable
public class CannotProceedException
extends NamingException

This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further. When performing an operation on a composite name, a naming service provider may reach a part of the name that does not belong to its namespace. At that point, it can construct a CannotProceedException and then invoke methods provided by javax.naming.spi.NamingManager (such as getContinuationContext()) to locate another provider to continue the operation. If this is not possible, this exception is raised to the caller of the context operation.

If the program wants to handle this exception in particular, it should catch CannotProceedException explicitly before attempting to catch NamingException.

A CannotProceedException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify CannotProceedException should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected Name | altName Contains the name of the resolved object, relative to the context altNameCtx.
protected Context | altNameCtx Contains the context relative to which altName is specified.
protected Hashtable | environment Contains the environment relevant for the Context or DirContext method that cannot proceed.
protected Name | remainingNewName Contains the remaining unresolved part of the second "name" argument to Context.rename().
Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
CannotProceedException()
Constructs a new instance of CannotProceedException.
CannotProceedException(String explanation)
Constructs a new instance of CannotProceedException using an explanation.
Method Summary
 Name getAltName()
Retrieves the altName field of this exception.
 Context getAltNameCtx()
Retrieves the altNameCtx field of this exception.
 Hashtable getEnvironment()
Retrieves the environment that was in effect when this exception was created.
 Name getRemainingNewName()
Retrieves the "remaining new name" field of this exception, which is used when this exception is thrown during a rename() operation.
 void setAltName(Name altName)
Sets the altName field of this exception.
 void setAltNameCtx(Context altNameCtx)
Sets the altNameCtx field of this exception.
 void setEnvironment(Hashtable environment)
Sets the environment that will be returned when getEnvironment() is called.
 void setRemainingNewName(Name newName)
Sets the "remaining new name" field of this exception.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

remainingNewName

protected Name remainingNewName
Contains the remaining unresolved part of the second "name" argument to Context.rename(). This information necessary for continuing the Context.rename() operation.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getRemainingName() and setRemainingName().

See Also:
getRemainingNewName(), setRemainingNewName(javax.naming.Name)

environment

protected Hashtable environment
Contains the environment relevant for the Context or DirContext method that cannot proceed.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getEnvironment() and setEnvironment().

See Also:
getEnvironment(), setEnvironment(java.util.Hashtable)

altName

protected Name altName
Contains the name of the resolved object, relative to the context altNameCtx. It is a composite name. If null, then no name is specified. See the javax.naming.spi.ObjectFactory.getObjectInstance method for details on how this is used.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getAltName() and setAltName().

See Also:
getAltName(), setAltName(javax.naming.Name), altNameCtx, ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

altNameCtx

protected Context altNameCtx
Contains the context relative to which altName is specified. If null, then the default initial context is implied. See the javax.naming.spi.ObjectFactory.getObjectInstance method for details on how this is used.

This field is initialized to null. It should not be manipulated directly: it should be accessed and updated using getAltNameCtx() and setAltNameCtx().

See Also:
getAltNameCtx(), setAltNameCtx(javax.naming.Context), altName, ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
Constructor Detail

CannotProceedException

public CannotProceedException(String explanation)
Constructs a new instance of CannotProceedException using an explanation. All unspecified fields default to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception. If null, this exception has no detail message.
See Also:
Throwable.getMessage()

CannotProceedException

public CannotProceedException()
Constructs a new instance of CannotProceedException. All fields default to null.
Method Detail

getEnvironment

public Hashtable getEnvironment()
Retrieves the environment that was in effect when this exception was created.
Returns:
Possibly null environment property set. null means no environment was recorded for this exception.
See Also:
setEnvironment(java.util.Hashtable)

setEnvironment

public void setEnvironment(Hashtable environment)
Sets the environment that will be returned when getEnvironment() is called.
Parameters:
environment - A possibly null environment property set. null means no environment is being recorded for this exception.
See Also:
getEnvironment()

getRemainingNewName

public Name getRemainingNewName()
Retrieves the "remaining new name" field of this exception, which is used when this exception is thrown during a rename() operation.
Returns:
The possibly null part of the new name that has not been resolved. It is a composite name. It can be null, which means the remaining new name field has not been set.
See Also:
setRemainingNewName(javax.naming.Name)

setRemainingNewName

public void setRemainingNewName(Name newName)
Sets the "remaining new name" field of this exception. This is the value returned by getRemainingNewName().

newName is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of newName is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
newName - The possibly null name to set the "remaining new name" to. If null, it sets the remaining name field to null.
See Also:
getRemainingNewName()

getAltName

public Name getAltName()
Retrieves the altName field of this exception. This is the name of the resolved object, relative to the context altNameCtx. It will be used during a subsequent call to the javax.naming.spi.ObjectFactory.getObjectInstance method.
Returns:
The name of the resolved object, relative to altNameCtx. It is a composite name. If null, then no name is specified.
See Also:
setAltName(javax.naming.Name),
getAltNameCtx(),
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

setAltName

public void setAltName(Name altName)
Sets the altName field of this exception.
Parameters:
altName - The name of the resolved object, relative to altNameCtx. It is a composite name. If null, then no name is specified.
See Also:
getAltName(), setAltNameCtx(javax.naming.Context)

getAltNameCtx

public Context getAltNameCtx()
Retrieves the altNameCtx field of this exception. This is the context relative to which altName is named. It will be used during a subsequent call to the javax.naming.spi.ObjectFactory.getObjectInstance method.
Returns:
The context relative to which altName is named. If null, then the default initial context is implied.
See Also:
setAltNameCtx(javax.naming.Context),
getAltName(),
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

setAltNameCtx

public void setAltNameCtx(Context altNameCtx)
Sets the altNameCtx field of this exception.
Parameters:
altNameCtx - The context relative to which altName is named. If null, then the default initial context is implied.
See Also:
getAltNameCtx(), setAltName(javax.naming.Name)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.naming.AuthenticationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.AuthenticationException

No usage of javax.naming.AuthenticationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.AuthenticationNotSupportedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.AuthenticationNotSupportedException

No usage of javax.naming.AuthenticationNotSupportedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.BinaryRefAddr

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.BinaryRefAddr

No usage of javax.naming.BinaryRefAddr

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.CommunicationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.CommunicationException

No usage of javax.naming.CommunicationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.CompositeName

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.CompositeName

No usage of javax.naming.CompositeName

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.CompoundName

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.CompoundName

No usage of javax.naming.CompoundName

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ConfigurationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ConfigurationException

No usage of javax.naming.ConfigurationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ContextNotEmptyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ContextNotEmptyException

No usage of javax.naming.ContextNotEmptyException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.InsufficientResourcesException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.InsufficientResourcesException

No usage of javax.naming.InsufficientResourcesException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.InterruptedNamingException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.InterruptedNamingException

No usage of javax.naming.InterruptedNamingException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.LinkLoopException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.LinkLoopException

No usage of javax.naming.LinkLoopException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.LinkRef

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.LinkRef

No usage of javax.naming.LinkRef

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.MalformedLinkException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.MalformedLinkException

No usage of javax.naming.MalformedLinkException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NameAlreadyBoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NameAlreadyBoundException

No usage of javax.naming.NameAlreadyBoundException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NameNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NameNotFoundException

No usage of javax.naming.NameNotFoundException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NoInitialContextException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NoInitialContextException

No usage of javax.naming.NoInitialContextException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NoPermissionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NoPermissionException

No usage of javax.naming.NoPermissionException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NotContextException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NotContextException

No usage of javax.naming.NotContextException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.OperationNotSupportedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.OperationNotSupportedException

No usage of javax.naming.OperationNotSupportedException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.PartialResultException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.PartialResultException

No usage of javax.naming.PartialResultException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ServiceUnavailableException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ServiceUnavailableException

No usage of javax.naming.ServiceUnavailableException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.SizeLimitExceededException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.SizeLimitExceededException

No usage of javax.naming.SizeLimitExceededException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.StringRefAddr

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.StringRefAddr

No usage of javax.naming.StringRefAddr

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.TimeLimitExceededException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.TimeLimitExceededException

No usage of javax.naming.TimeLimitExceededException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.Referenceable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.Referenceable

No usage of javax.naming.Referenceable

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.Binding

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.Binding

Packages that use Binding
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.

Uses of Binding in javax.naming.directory

Subclasses of Binding in javax.naming.directory
 class SearchResult
This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

Uses of Binding in javax.naming.event

Fields in javax.naming.event declared as Binding
protected Binding | NamingEvent.oldBinding Contains information about the object before the change.
protected Binding | NamingEvent.newBinding Contains information about the object after the change.

Methods in javax.naming.event that return Binding
Binding | NamingEvent.getOldBinding() Retrieves the binding of the object before the change.
Binding | NamingEvent.getNewBinding() Retrieves the binding of the object after the change.

Constructors in javax.naming.event with parameters of type Binding
NamingEvent(EventContext source, int type, Binding newBd, Binding oldBd, Object changeInfo)
Constructs an instance of NamingEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.CannotProceedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.CannotProceedException

Packages that use CannotProceedException
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of CannotProceedException in javax.naming.spi

Methods in javax.naming.spi with parameters of type CannotProceedException
static Context | NamingManager.getContinuationContext(CannotProceedException cpe) Creates a context in which to continue a context operation.
static DirContext | DirectoryManager.getContinuationDirContext(CannotProceedException cpe) Creates a context in which to continue a DirContext operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.InitialContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.InitialContext

Packages that use InitialContext
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.

Uses of InitialContext in javax.naming.directory

Subclasses of InitialContext in javax.naming.directory
 class InitialDirContext
This class is the starting context for performing directory operations.

Uses of InitialContext in javax.naming.ldap

Subclasses of InitialContext in javax.naming.ldap
 class InitialLdapContext
This class is the starting context for performing LDAPv3-style extended operations and controls.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.InvalidNameException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.InvalidNameException

Packages that use InvalidNameException
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of InvalidNameException in javax.naming

Methods in javax.naming that throw InvalidNameException
Name | Name.addAll(Name suffix) Adds the components of a name -- in order -- to the end of this name.
Name | Name.addAll(int posn, Name n) Adds the components of a name -- in order -- at a specified position within this name.
Name | Name.add(String comp) Adds a single component to the end of this name.
Name | Name.add(int posn, String comp) Adds a single component at a specified position within this name.
Object | Name.remove(int posn) Removes a component from this name.
Name | CompoundName.addAll(Name suffix) Adds the components of a compound name -- in order -- to the end of this compound name.
Name | CompoundName.addAll(int posn, Name n) Adds the components of a compound name -- in order -- at a specified position within this compound name.
Name | CompoundName.add(String comp) Adds a single component to the end of this compound name.
Name | CompoundName.add(int posn, String comp) Adds a single component at a specified position within this compound name.
Object | CompoundName.remove(int posn) Deletes a component from this compound name.
Name | CompositeName.addAll(Name suffix) Adds the components of a composite name -- in order -- to the end of this composite name.
Name | CompositeName.addAll(int posn, Name n) Adds the components of a composite name -- in order -- at a specified position within this composite name.
Name | CompositeName.add(String comp) Adds a single component to the end of this composite name.
Name | CompositeName.add(int posn, String comp) Adds a single component at a specified position within this composite name.
Object | CompositeName.remove(int posn) Deletes a component from this composite name.

Constructors in javax.naming that throw InvalidNameException
CompoundName(String n, Properties syntax)
Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.
CompositeName(String n)
Constructs a new composite name instance by parsing the string n using the composite name syntax (left-to-right, slash separated).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.LimitExceededException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.LimitExceededException

Packages that use LimitExceededException
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of LimitExceededException in javax.naming

Subclasses of LimitExceededException in javax.naming
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.LinkException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.LinkException

Packages that use LinkException
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of LinkException in javax.naming

Subclasses of LinkException in javax.naming
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NameClassPair

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NameClassPair

Packages that use NameClassPair
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.

Uses of NameClassPair in javax.naming

Subclasses of NameClassPair in javax.naming
 class Binding
This class represents a name-to-object binding found in a context.

Uses of NameClassPair in javax.naming.directory

Subclasses of NameClassPair in javax.naming.directory
 class SearchResult
This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NamingException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NamingException

Packages that use NamingException
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of NamingException in javax.naming

Subclasses of NamingException in javax.naming
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | CannotProceedException This exception is thrown to indicate that the operation reached a point in the name where the operation cannot proceed any further.
class | CommunicationException This exception is thrown when the client is unable to communicate with the directory or naming service.
class | ConfigurationException This exception is thrown when there is a configuration problem.
class | ContextNotEmptyException This exception is thrown when attempting to destroy a context that is not empty.
class | InsufficientResourcesException This exception is thrown when resources are not available to complete the requested operation.
class | InterruptedNamingException This exception is thrown when the naming operation being invoked has been interrupted.
class | InvalidNameException This exception indicates that the name being specified does not conform to the naming syntax of a naming system.
class | LimitExceededException This exception is thrown when a method terminates abnormally due to a user or system specified limit.
class | LinkException This exception is used to describe problems encounter while resolving links.
class | LinkLoopException This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.
class | MalformedLinkException This exception is thrown when a malformed link was encountered while resolving or constructing a link.
class | NameAlreadyBoundException This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.
class | NameNotFoundException This exception is thrown when a component of the name cannot be resolved because it is not bound.
class | NamingSecurityException This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces.
class | NoInitialContextException This exception is thrown when no initial context implementation can be created.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.
class | NotContextException This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context.
class | OperationNotSupportedException This exception is thrown when a context implementation does not support the operation being invoked.
class | PartialResultException This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed.
class | ReferralException This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.
class | ServiceUnavailableException This exception is thrown when attempting to communcate with a directory or naming service and that service is not available.
class | SizeLimitExceededException This exception is thrown when a method produces a result that exceeds a size-related limit.
class | TimeLimitExceededException This exception is thrown when a method does not terminate within the specified time limit.

Methods in javax.naming that throw NamingException
 Name NameParser.parse(String name)
Parses a name into its components.
 String LinkRef.getLinkName()
Retrieves the name of this link.
protected  void InitialContext.init(Hashtable environment)
Initializes the initial context using the supplied environment.
protected  Context InitialContext.getDefaultInitCtx()
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx.
protected  Context InitialContext.getURLOrDefaultInitCtx(String name)
Retrieves a context for resolving the string name name.
protected  Context InitialContext.getURLOrDefaultInitCtx(Name name)
Retrieves a context for resolving name.
 Object InitialContext.lookup(String name)
 Object InitialContext.lookup(Name name)
 void InitialContext.bind(String name, Object obj)
 void InitialContext.bind(Name name, Object obj)
 void InitialContext.rebind(String name, Object obj)
 void InitialContext.rebind(Name name, Object obj)
 void InitialContext.unbind(String name)
 void InitialContext.unbind(Name name)
 void InitialContext.rename(String oldName, String newName)
 void InitialContext.rename(Name oldName, Name newName)
 NamingEnumeration InitialContext.list(String name)
 NamingEnumeration InitialContext.list(Name name)
 NamingEnumeration InitialContext.listBindings(String name)
 NamingEnumeration InitialContext.listBindings(Name name)
 void InitialContext.destroySubcontext(String name)
 void InitialContext.destroySubcontext(Name name)
 Context InitialContext.createSubcontext(String name)
 Context InitialContext.createSubcontext(Name name)
 Object InitialContext.lookupLink(String name)
 Object InitialContext.lookupLink(Name name)
 NameParser InitialContext.getNameParser(String name)
 NameParser InitialContext.getNameParser(Name name)
 String InitialContext.composeName(String name, String prefix)
Composes the name of this context with a name relative to this context.
 Name InitialContext.composeName(Name name, Name prefix)
Composes the name of this context with a name relative to this context.
 Object InitialContext.addToEnvironment(String propName, Object propVal)
 Object InitialContext.removeFromEnvironment(String propName)
 Hashtable InitialContext.getEnvironment()
 void InitialContext.close()
 String InitialContext.getNameInNamespace()
 Object NamingEnumeration.next()
Retrieves the next element in the enumeration.
 boolean NamingEnumeration.hasMore()
Determines whether there are any more elements in the enumeration.
 void NamingEnumeration.close()
Closes this enumeration.
 Reference Referenceable.getReference()
Retrieves the Reference of this object.
abstract  Context ReferralException.getReferralContext()
Retrieves the context at which to continue the method.
abstract  Context ReferralException.getReferralContext(Hashtable env)
Retrieves the context at which to continue the method using environment properties.
 Object Context.lookup(Name name)
Retrieves the named object.
 Object Context.lookup(String name)
Retrieves the named object.
 void Context.bind(Name name, Object obj)
Binds a name to an object.
 void Context.bind(String name, Object obj)
Binds a name to an object.
 void Context.rebind(Name name, Object obj)
Binds a name to an object, overwriting any existing binding.
 void Context.rebind(String name, Object obj)
Binds a name to an object, overwriting any existing binding.
 void Context.unbind(Name name)
Unbinds the named object.
 void Context.unbind(String name)
Unbinds the named object.
 void Context.rename(Name oldName, Name newName)
Binds a new name to the object bound to an old name, and unbinds the old name.
 void Context.rename(String oldName, String newName)
Binds a new name to the object bound to an old name, and unbinds the old name.
 NamingEnumeration Context.list(Name name)
Enumerates the names bound in the named context, along with the class names of objects bound to them.
 NamingEnumeration Context.list(String name)
Enumerates the names bound in the named context, along with the class names of objects bound to them.
 NamingEnumeration Context.listBindings(Name name)
Enumerates the names bound in the named context, along with the objects bound to them.
 NamingEnumeration Context.listBindings(String name)
Enumerates the names bound in the named context, along with the objects bound to them.
 void Context.destroySubcontext(Name name)
Destroys the named context and removes it from the namespace.
 void Context.destroySubcontext(String name)
Destroys the named context and removes it from the namespace.
 Context Context.createSubcontext(Name name)
Creates and binds a new context.
 Context Context.createSubcontext(String name)
Creates and binds a new context.
 Object Context.lookupLink(Name name)
Retrieves the named object, following links except for the terminal atomic component of the name.
 Object Context.lookupLink(String name)
Retrieves the named object, following links except for the terminal atomic component of the name.
 NameParser Context.getNameParser(Name name)
Retrieves the parser associated with the named context.
 NameParser Context.getNameParser(String name)
Retrieves the parser associated with the named context.
 Name Context.composeName(Name name, Name prefix)
Composes the name of this context with a name relative to this context.
 String Context.composeName(String name, String prefix)
Composes the name of this context with a name relative to this context.
 Object Context.addToEnvironment(String propName, Object propVal)
Adds a new environment property to the environment of this context.
 Object Context.removeFromEnvironment(String propName)
Removes an environment property from the environment of this context.
 Hashtable Context.getEnvironment()
Retrieves the environment in effect for this context.
 void Context.close()
Closes this context.
 String Context.getNameInNamespace()
Retrieves the full name of this context within its own namespace.

Constructors in javax.naming that throw NamingException
InitialContext(boolean lazy)
Constructs an initial context with the option of not initializing it.
InitialContext()
Constructs an initial context.
InitialContext(Hashtable environment)
Constructs an initial context using the supplied environment.

Uses of NamingException in javax.naming.directory

Subclasses of NamingException in javax.naming.directory
class | AttributeInUseException This exception is thrown when an operation attempts to add an attribute that already exists.
class | AttributeModificationException This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
class | InvalidAttributeIdentifierException This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
class | InvalidAttributesException This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
class | InvalidAttributeValueException This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
class | InvalidSearchControlsException This exception is thrown when the specification of the SearchControls for a search operation is invalid.
class | InvalidSearchFilterException This exception is thrown when the specification of a search filter is invalid.
class | NoSuchAttributeException This exception is thrown when attempting to access an attribute that does not exist.
class | SchemaViolationException This exception is thrown when a method in some ways violates the schema.

Methods in javax.naming.directory that throw NamingException
Attributes | DirContext.getAttributes(Name name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(String name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | DirContext.getAttributes(String name, String[] attrIds) Retrieves selected attributes associated with a named object.
void | DirContext.modifyAttributes(Name name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.modifyAttributes(String name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.modifyAttributes(Name name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | DirContext.modifyAttributes(String name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | DirContext.bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
void | DirContext.rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
DirContext | DirContext.createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.getSchema(Name name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchema(String name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchemaClassDefinition(Name name) Retrieves a context containing the schema objects of the named object's class definitions.
DirContext | DirContext.getSchemaClassDefinition(String name) Retrieves a context containing the schema objects of the named object's class definitions.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | BasicAttribute.getAll() Retrieves an enumeration of this attribute's values.
Object | BasicAttribute.get() Retrieves one of this attribute's values.
Object | BasicAttribute.get(int ix)
DirContext | BasicAttribute.getAttributeSyntaxDefinition() Retrieves the syntax definition associated with this attribute.
DirContext | BasicAttribute.getAttributeDefinition() Retrieves this attribute's schema definition.
NamingEnumeration | Attribute.getAll() Retrieves an enumeration of the attribute's values.
Object | Attribute.get() Retrieves one of this attribute's values.
DirContext | Attribute.getAttributeSyntaxDefinition() Retrieves the syntax definition associated with the attribute.
DirContext | Attribute.getAttributeDefinition() Retrieves the attribute's schema definition.
Object | Attribute.get(int ix) Retrieves the attribute value from the ordered list of attribute values.
Attributes | InitialDirContext.getAttributes(String name)
Attributes | InitialDirContext.getAttributes(String name, String[] attrIds)
Attributes | InitialDirContext.getAttributes(Name name)
Attributes | InitialDirContext.getAttributes(Name name, String[] attrIds)
void | InitialDirContext.modifyAttributes(String name, int mod_op, Attributes attrs)
void | InitialDirContext.modifyAttributes(Name name, int mod_op, Attributes attrs)
void | InitialDirContext.modifyAttributes(String name, ModificationItem[] mods)
void | InitialDirContext.modifyAttributes(Name name, ModificationItem[] mods)
void | InitialDirContext.bind(String name, Object obj, Attributes attrs)
void | InitialDirContext.bind(Name name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(String name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(Name name, Object obj, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(String name, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(Name name, Attributes attrs)
DirContext | InitialDirContext.getSchema(String name)
DirContext | InitialDirContext.getSchema(Name name)
DirContext | InitialDirContext.getSchemaClassDefinition(String name)
DirContext | InitialDirContext.getSchemaClassDefinition(Name name)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(String name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Constructors in javax.naming.directory that throw NamingException
InitialDirContext(boolean lazy)
Constructs an initial DirContext with the option of not initializing it.
InitialDirContext()
Constructs an initial DirContext.
InitialDirContext(Hashtable environment)
Constructs an initial DirContext using the supplied environment.

Uses of NamingException in javax.naming.event

Methods in javax.naming.event that return NamingException
 NamingException NamingExceptionEvent.getException()
Retrieves the exception that was thrown.

Methods in javax.naming.event that throw NamingException
void | EventDirContext.addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
void | EventDirContext.addNamingListener(String target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
void | EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | EventDirContext.addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.
void | EventContext.addNamingListener(Name target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.
void | EventContext.addNamingListener(String target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.
void | EventContext.removeNamingListener(NamingListener l) Removes a listener from receiving naming events fired by this EventContext.
boolean | EventContext.targetMustExist() Determines whether a listener can register interest in a target that does not exist.

Constructors in javax.naming.event with parameters of type NamingException
NamingExceptionEvent(EventContext source, NamingException exc)
Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.

Uses of NamingException in javax.naming.ldap

Subclasses of NamingException in javax.naming.ldap
 class LdapReferralException
This abstract class is used to represent an LDAP referral exception.

Methods in javax.naming.ldap that return NamingException
 NamingException UnsolicitedNotification.getException()
Retrieves the exception as constructed using information sent by the server.

Methods in javax.naming.ldap that throw NamingException
ExtendedResponse | ExtendedRequest.createExtendedResponse(String id, byte[] berValue, int offset, int length) Creates the response object that corresponds to this request.
ExtendedResponse | InitialLdapContext.extendedOperation(ExtendedRequest request)
LdapContext | InitialLdapContext.newInstance(Control[] reqCtls)
void | InitialLdapContext.reconnect(Control[] connCtls)
Control[] | InitialLdapContext.getConnectControls()
void | InitialLdapContext.setRequestControls(Control[] requestControls)
Control[] | InitialLdapContext.getRequestControls()
Control[] | InitialLdapContext.getResponseControls()
ExtendedResponse | LdapContext.extendedOperation(ExtendedRequest request) Performs an extended operation.
LdapContext | LdapContext.newInstance(Control[] requestControls) Creates a new instance of this context initialized using request controls.
void | LdapContext.reconnect(Control[] connCtls) Reconnects to the LDAP server using the supplied controls and this context's environment.
Control[] | LdapContext.getConnectControls() Retrieves the connection request controls in effect for this context.
void | LdapContext.setRequestControls(Control[] requestControls) Sets the request controls for methods subsequently invoked on this context.
Control[] | LdapContext.getRequestControls() Retrieves the request controls in effect for this context.
Control[] | LdapContext.getResponseControls() Retrieves the response controls produced as a result of the last method invoked on this context.
Control[] | HasControls.getControls() Retrieves an array of Controls from the object that implements this interface.
abstract Control | ControlFactory.getControlInstance(Control ctl) Creates a control using this control factory.
static Control | ControlFactory.getControlInstance(Control ctl, Context ctx, Hashtable env) Creates a control using known control factories.
abstract Context | LdapReferralException.getReferralContext() Retrieves the context at which to continue the method using the context's environment and no controls.
abstract Context | LdapReferralException.getReferralContext(Hashtable env) Retrieves the context at which to continue the method using environment properties and no controls.
abstract Context | LdapReferralException.getReferralContext(Hashtable env, Control[] reqCtls) Retrieves the context at which to continue the method using request controls and environment properties.

Constructors in javax.naming.ldap that throw NamingException
InitialLdapContext()
Constructs an initial context using no environment properties or connection request controls.
InitialLdapContext(Hashtable environment, Control[] connCtls)
Constructs an initial context using environment properties and connection request controls.

Uses of NamingException in javax.naming.spi

Methods in javax.naming.spi that throw NamingException
ResolveResult | Resolver.resolveToClass(Name name, Class contextType) Partially resolves a name.
ResolveResult | Resolver.resolveToClass(String name, Class contextType) Partially resolves a name.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
InitialContextFactory | InitialContextFactoryBuilder.createInitialContextFactory(Hashtable environment) Creates an initial context factory using the specified environment.
static void | NamingManager.setObjectFactoryBuilder(ObjectFactoryBuilder builder) The ObjectFactoryBuilder determines the policy used when trying to load object factories.
static Context | NamingManager.getURLContext(String scheme, Hashtable environment) Creates a context for the given URL scheme id.
static Context | NamingManager.getInitialContext(Hashtable env) Creates an initial context using the specified environment properties.
static void | NamingManager.setInitialContextFactoryBuilder(InitialContextFactoryBuilder builder) Sets the InitialContextFactory builder to be builder.
static Context | NamingManager.getContinuationContext(CannotProceedException cpe) Creates a context in which to continue a context operation.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static DirContext | DirectoryManager.getContinuationDirContext(CannotProceedException cpe) Creates a context in which to continue a DirContext operation.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
ObjectFactory | ObjectFactoryBuilder.createObjectFactory(Object obj, Hashtable environment) Creates a new object factory using the environment supplied.
Context | InitialContextFactory.getInitialContext(Hashtable environment) Creates an Initial Context for beginning name resolution.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.NamingSecurityException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.NamingSecurityException

Packages that use NamingSecurityException
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of NamingSecurityException in javax.naming

Subclasses of NamingSecurityException in javax.naming
class | AuthenticationException This exception is thrown when an authentication error occurs while accessing the naming or directory service.
class | AuthenticationNotSupportedException This exception is thrown when the particular flavor of authentication requested is not supported.
class | NoPermissionException This exception is thrown when attempting to perform an operation for which the client has no permission.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.RefAddr

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.RefAddr

Packages that use RefAddr
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of RefAddr in javax.naming

Subclasses of RefAddr in javax.naming
class | BinaryRefAddr This class represents the binary form of the address of a communications end-point.
class | StringRefAddr This class represents the string form of the address of a communications end-point.

Methods in javax.naming that return RefAddr
RefAddr | Reference.get(String addrType) Retrieves the first address that has the address type 'addrType'.
RefAddr | Reference.get(int posn) Retrieves the address at index posn.

Methods in javax.naming with parameters of type RefAddr
void | Reference.add(RefAddr addr) Adds an address to the end of the list of addresses.
void | Reference.add(int posn, RefAddr addr) Adds an address to the list of addresses at index posn.

Constructors in javax.naming with parameters of type RefAddr
Reference(String className, RefAddr addr)
Constructs a new reference for an object with class name 'className' and an address.
Reference(String className, RefAddr addr, String factory, String factoryLocation)
Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.Reference

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.Reference

Packages that use Reference
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of Reference in javax.naming

Subclasses of Reference in javax.naming
 class LinkRef
This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.

Methods in javax.naming that return Reference
 Reference Referenceable.getReference()
Retrieves the Reference of this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ReferralException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ReferralException

Packages that use ReferralException
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of ReferralException in javax.naming.ldap

Subclasses of ReferralException in javax.naming.ldap
 class LdapReferralException
This abstract class is used to represent an LDAP referral exception.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.Context

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.Context

Packages that use Context
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of Context in javax.naming

Classes in javax.naming that implement Context
 class InitialContext
This class is the starting context for performing naming operations.

Fields in javax.naming declared as Context
protected Context | InitialContext.defaultInitCtx Field holding the result of calling NamingManager.getInitialContext().
protected Context | CannotProceedException.altNameCtx Contains the context relative to which altName is specified.

Methods in javax.naming that return Context
protected  Context InitialContext.getDefaultInitCtx()
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx.
protected  Context InitialContext.getURLOrDefaultInitCtx(String name)
Retrieves a context for resolving the string name name.
protected  Context InitialContext.getURLOrDefaultInitCtx(Name name)
Retrieves a context for resolving name.
 Context InitialContext.createSubcontext(String name)
 Context InitialContext.createSubcontext(Name name)
 Context CannotProceedException.getAltNameCtx()
Retrieves the altNameCtx field of this exception.
abstract  Context ReferralException.getReferralContext()
Retrieves the context at which to continue the method.
abstract  Context ReferralException.getReferralContext(Hashtable env)
Retrieves the context at which to continue the method using environment properties.
 Context Context.createSubcontext(Name name)
Creates and binds a new context.
 Context Context.createSubcontext(String name)
Creates and binds a new context.

Methods in javax.naming with parameters of type Context
 void CannotProceedException.setAltNameCtx(Context altNameCtx)
Sets the altNameCtx field of this exception.

Uses of Context in javax.naming.directory

Subinterfaces of Context in javax.naming.directory
 interface DirContext
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.

Classes in javax.naming.directory that implement Context
 class InitialDirContext
This class is the starting context for performing directory operations.

Uses of Context in javax.naming.event

Subinterfaces of Context in javax.naming.event
interface | EventContext Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.
interface | EventDirContext Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.

Uses of Context in javax.naming.ldap

Subinterfaces of Context in javax.naming.ldap
 interface LdapContext
This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.

Classes in javax.naming.ldap that implement Context
 class InitialLdapContext
This class is the starting context for performing LDAPv3-style extended operations and controls.

Methods in javax.naming.ldap that return Context
abstract Context | LdapReferralException.getReferralContext() Retrieves the context at which to continue the method using the context's environment and no controls.
abstract Context | LdapReferralException.getReferralContext(Hashtable env) Retrieves the context at which to continue the method using environment properties and no controls.
abstract Context | LdapReferralException.getReferralContext(Hashtable env, Control[] reqCtls) Retrieves the context at which to continue the method using request controls and environment properties.

Methods in javax.naming.ldap with parameters of type Context
static Control ControlFactory.getControlInstance(Control ctl, Context ctx, Hashtable env)
Creates a control using known control factories.

Uses of Context in javax.naming.spi

Methods in javax.naming.spi that return Context
static Context | NamingManager.getURLContext(String scheme, Hashtable environment) Creates a context for the given URL scheme id.
static Context | NamingManager.getInitialContext(Hashtable env) Creates an initial context using the specified environment properties.
static Context | NamingManager.getContinuationContext(CannotProceedException cpe) Creates a context in which to continue a context operation.
Context | InitialContextFactory.getInitialContext(Hashtable environment) Creates an Initial Context for beginning name resolution.

Methods in javax.naming.spi with parameters of type Context
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.Name

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.Name

Packages that use Name
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of Name in javax.naming

Classes in javax.naming that implement Name
class | CompositeName This class represents a composite name -- a sequence of component names spanning multiple namespaces.
class | CompoundName This class represents a compound name -- a name from a hierarchical name space.

Fields in javax.naming declared as Name
protected Name | NamingException.resolvedName Contains the part of the name that has been successfully resolved.
protected Name | NamingException.remainingName Contains the remaining name that has not been resolved yet.
protected Name | LinkException.linkResolvedName Contains the part of the link that has been successfully resolved.
protected Name | LinkException.linkRemainingName Contains the remaining link name that has not been resolved yet.
protected Name | CannotProceedException.remainingNewName Contains the remaining unresolved part of the second "name" argument to Context.rename().
protected Name | CannotProceedException.altName Contains the name of the resolved object, relative to the context altNameCtx.

Methods in javax.naming that return Name
 Name NamingException.getResolvedName()
Retrieves the leading portion of the name that was resolved successfully.
 Name NamingException.getRemainingName()
Retrieves the remaining unresolved portion of the name.
 Name LinkException.getLinkResolvedName()
Retrieves the leading portion of the link name that was resolved successfully.
 Name LinkException.getLinkRemainingName()
Retrieves the remaining unresolved portion of the link name.
 Name Name.getPrefix(int posn)
Creates a name whose components consist of a prefix of the components of this name.
 Name Name.getSuffix(int posn)
Creates a name whose components consist of a suffix of the components in this name.
 Name Name.addAll(Name suffix)
Adds the components of a name -- in order -- to the end of this name.
 Name Name.addAll(int posn, Name n)
Adds the components of a name -- in order -- at a specified position within this name.
 Name Name.add(String comp)
Adds a single component to the end of this name.
 Name Name.add(int posn, String comp)
Adds a single component at a specified position within this name.
 Name NameParser.parse(String name)
Parses a name into its components.
 Name CompoundName.getPrefix(int posn)
Creates a compound name whose components consist of a prefix of the components in this compound name.
 Name CompoundName.getSuffix(int posn)
Creates a compound name whose components consist of a suffix of the components in this compound name.
 Name CompoundName.addAll(Name suffix)
Adds the components of a compound name -- in order -- to the end of this compound name.
 Name CompoundName.addAll(int posn, Name n)
Adds the components of a compound name -- in order -- at a specified position within this compound name.
 Name CompoundName.add(String comp)
Adds a single component to the end of this compound name.
 Name CompoundName.add(int posn, String comp)
Adds a single component at a specified position within this compound name.
 Name InitialContext.composeName(Name name, Name prefix)
Composes the name of this context with a name relative to this context.
 Name CannotProceedException.getRemainingNewName()
Retrieves the "remaining new name" field of this exception, which is used when this exception is thrown during a rename() operation.
 Name CannotProceedException.getAltName()
Retrieves the altName field of this exception.
 Name CompositeName.getPrefix(int posn)
Creates a composite name whose components consist of a prefix of the components in this composite name.
 Name CompositeName.getSuffix(int posn)
Creates a composite name whose components consist of a suffix of the components in this composite name.
 Name CompositeName.addAll(Name suffix)
Adds the components of a composite name -- in order -- to the end of this composite name.
 Name CompositeName.addAll(int posn, Name n)
Adds the components of a composite name -- in order -- at a specified position within this composite name.
 Name CompositeName.add(String comp)
Adds a single component to the end of this composite name.
 Name CompositeName.add(int posn, String comp)
Adds a single component at a specified position within this composite name.
 Name Context.composeName(Name name, Name prefix)
Composes the name of this context with a name relative to this context.

Methods in javax.naming with parameters of type Name
void | NamingException.setResolvedName(Name name) Sets the resolved name field of this exception.
void | NamingException.setRemainingName(Name name) Sets the remaining name field of this exception.
void | NamingException.appendRemainingName(Name name) Add components from 'name' as the last components in remaining name.
void | LinkException.setLinkResolvedName(Name name) Sets the resolved link name field of this exception.
void | LinkException.setLinkRemainingName(Name name) Sets the remaining link name field of this exception.
boolean | Name.startsWith(Name n) Determines whether this name starts with a specified prefix.
boolean | Name.endsWith(Name n) Determines whether this name ends with a specified suffix.
Name | Name.addAll(Name suffix) Adds the components of a name -- in order -- to the end of this name.
Name | Name.addAll(int posn, Name n) Adds the components of a name -- in order -- at a specified position within this name.
boolean | CompoundName.startsWith(Name n) Determines whether a compound name is a prefix of this compound name.
boolean | CompoundName.endsWith(Name n) Determines whether a compound name is a suffix of this compound name.
Name | CompoundName.addAll(Name suffix) Adds the components of a compound name -- in order -- to the end of this compound name.
Name | CompoundName.addAll(int posn, Name n) Adds the components of a compound name -- in order -- at a specified position within this compound name.
protected Context | InitialContext.getURLOrDefaultInitCtx(Name name) Retrieves a context for resolving name.
Object | InitialContext.lookup(Name name)
void | InitialContext.bind(Name name, Object obj)
void | InitialContext.rebind(Name name, Object obj)
void | InitialContext.unbind(Name name)
void | InitialContext.rename(Name oldName, Name newName)
NamingEnumeration | InitialContext.list(Name name)
NamingEnumeration | InitialContext.listBindings(Name name)
void | InitialContext.destroySubcontext(Name name)
Context | InitialContext.createSubcontext(Name name)
Object | InitialContext.lookupLink(Name name)
NameParser | InitialContext.getNameParser(Name name)
Name | InitialContext.composeName(Name name, Name prefix) Composes the name of this context with a name relative to this context.
void | CannotProceedException.setRemainingNewName(Name newName) Sets the "remaining new name" field of this exception.
void | CannotProceedException.setAltName(Name altName) Sets the altName field of this exception.
boolean | CompositeName.startsWith(Name n) Determines whether a composite name is a prefix of this composite name.
boolean | CompositeName.endsWith(Name n) Determines whether a composite name is a suffix of this composite name.
Name | CompositeName.addAll(Name suffix) Adds the components of a composite name -- in order -- to the end of this composite name.
Name | CompositeName.addAll(int posn, Name n) Adds the components of a composite name -- in order -- at a specified position within this composite name.
Object | Context.lookup(Name name) Retrieves the named object.
void | Context.bind(Name name, Object obj) Binds a name to an object.
void | Context.rebind(Name name, Object obj) Binds a name to an object, overwriting any existing binding.
void | Context.unbind(Name name) Unbinds the named object.
void | Context.rename(Name oldName, Name newName) Binds a new name to the object bound to an old name, and unbinds the old name.
NamingEnumeration | Context.list(Name name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | Context.listBindings(Name name) Enumerates the names bound in the named context, along with the objects bound to them.
void | Context.destroySubcontext(Name name) Destroys the named context and removes it from the namespace.
Context | Context.createSubcontext(Name name) Creates and binds a new context.
Object | Context.lookupLink(Name name) Retrieves the named object, following links except for the terminal atomic component of the name.
NameParser | Context.getNameParser(Name name) Retrieves the parser associated with the named context.
Name | Context.composeName(Name name, Name prefix) Composes the name of this context with a name relative to this context.

Constructors in javax.naming with parameters of type Name
LinkRef(Name linkName)
Constructs a LinkRef for a name.

Uses of Name in javax.naming.directory

Methods in javax.naming.directory with parameters of type Name
Attributes | DirContext.getAttributes(Name name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
void | DirContext.modifyAttributes(Name name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.modifyAttributes(Name name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | DirContext.bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
DirContext | DirContext.createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.getSchema(Name name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchemaClassDefinition(Name name) Retrieves a context containing the schema objects of the named object's class definitions.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
Attributes | InitialDirContext.getAttributes(Name name)
Attributes | InitialDirContext.getAttributes(Name name, String[] attrIds)
void | InitialDirContext.modifyAttributes(Name name, int mod_op, Attributes attrs)
void | InitialDirContext.modifyAttributes(Name name, ModificationItem[] mods)
void | InitialDirContext.bind(Name name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(Name name, Object obj, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(Name name, Attributes attrs)
DirContext | InitialDirContext.getSchema(Name name)
DirContext | InitialDirContext.getSchemaClassDefinition(Name name)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(Name name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Uses of Name in javax.naming.event

Methods in javax.naming.event with parameters of type Name
void | EventDirContext.addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
void | EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | EventContext.addNamingListener(Name target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.

Uses of Name in javax.naming.spi

Fields in javax.naming.spi declared as Name
protected  Name ResolveResult.remainingName
Field containing the remaining name yet to be resolved.

Methods in javax.naming.spi that return Name
 Name ResolveResult.getRemainingName()
Retrieves the remaining unresolved portion of the name.

Methods in javax.naming.spi with parameters of type Name
ResolveResult | Resolver.resolveToClass(Name name, Class contextType) Partially resolves a name.
Object | ObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) Creates an object using the location or reference information specified.
Object | StateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
void | ResolveResult.setRemainingName(Name name) Sets the remaining name field of this result to name.
void | ResolveResult.appendRemainingName(Name name) Adds components to the end of remaining name.
static Object | NamingManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | NamingManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Constructors in javax.naming.spi with parameters of type Name
ResolveResult(Object robj, Name rname)
Constructs a new instance of ResolveResult consisting of the resolved Object and the remaining name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.NameParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.NameParser

Packages that use NameParser
javax.naming Provides the classes and interfaces for accessing naming services.

Uses of NameParser in javax.naming

Methods in javax.naming that return NameParser
NameParser | InitialContext.getNameParser(String name)
NameParser | InitialContext.getNameParser(Name name)
NameParser | Context.getNameParser(Name name) Retrieves the parser associated with the named context.
NameParser | Context.getNameParser(String name) Retrieves the parser associated with the named context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.NamingEnumeration

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.NamingEnumeration

Packages that use NamingEnumeration
javax.naming | Provides the classes and interfaces for accessing naming services.
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.

Uses of NamingEnumeration in javax.naming

Methods in javax.naming that return NamingEnumeration
NamingEnumeration | InitialContext.list(String name)
NamingEnumeration | InitialContext.list(Name name)
NamingEnumeration | InitialContext.listBindings(String name)
NamingEnumeration | InitialContext.listBindings(Name name)
NamingEnumeration | Context.list(Name name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | Context.list(String name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | Context.listBindings(Name name) Enumerates the names bound in the named context, along with the objects bound to them.
NamingEnumeration | Context.listBindings(String name) Enumerates the names bound in the named context, along with the objects bound to them.

Uses of NamingEnumeration in javax.naming.directory

Methods in javax.naming.directory that return NamingEnumeration
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | BasicAttribute.getAll() Retrieves an enumeration of this attribute's values.
NamingEnumeration | Attributes.getAll() Retrieves an enumeration of the attributes in the attribute set.
NamingEnumeration | Attributes.getIDs() Retrieves an enumeration of the ids of the attributes in the attribute set.
NamingEnumeration | Attribute.getAll() Retrieves an enumeration of the attribute's values.
NamingEnumeration | BasicAttributes.getAll()
NamingEnumeration | BasicAttributes.getIDs()
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(String name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CommunicationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class CommunicationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.CommunicationException
All Implemented Interfaces:
Serializable
public class CommunicationException
extends NamingException

This exception is thrown when the client is unable to communicate with the directory or naming service. The inability to communicate with the service might be a result of many factors, such as network partitioning, hardware or interface problems, failures on either the client or server side. This exception is meant to be used to capture such communication problems.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
CommunicationException()
Constructs a new instance of CommunicationException.
CommunicationException(String explanation)
Constructs a new instance of CommunicationException using the arguments supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CommunicationException

public CommunicationException(String explanation)
Constructs a new instance of CommunicationException using the arguments supplied.
Parameters:
explanation - Additional detail about this exception.
See Also:
Throwable.getMessage()

CommunicationException

public CommunicationException()
Constructs a new instance of CommunicationException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompositeName

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class CompositeName

java.lang.Object
  |
  +--javax.naming.CompositeName
All Implemented Interfaces:
Cloneable, Name, Serializable
public class CompositeName
extends Object
implements Name

This class represents a composite name -- a sequence of component names spanning multiple namespaces. Each component is a string name from the namespace of a naming system. If the component comes from a hierarchical namespace, that component can be further parsed into its atomic parts by using the CompoundName class.

The components of a composite name are numbered. The indexes of a composite name with N components range from 0 up to, but not including, N. This range may be written as [0,N). The most significant component is at index 0. An empty composite name has no components.

JNDI Composite Name Syntax

JNDI defines a standard string representation for composite names. This representation is the concatenation of the components of a composite name from left to right using the component separator (a forward slash character (/)) to separate each component. The JNDI syntax defines the following meta characters:
  • escape (backward slash \),
  • quote characters (single (') and double quotes (")), and
  • component separator (forward slash character (/)).
Any occurrence of a leading quote, an escape preceding any meta character, an escape at the end of a component, or a component separator character in an unquoted component must be preceded by an escape character when that component is being composed into a composite name string. Alternatively, to avoid adding escape characters as described, the entire component can be quoted using matching single quotes or matching double quotes. A single quote occurring within a double-quoted component is not considered a meta character (and need not be escaped), and vice versa.

When two composite names are compared, the case of the characters is significant.

A leading component separator (the composite name string begins with a separator) denotes a leading empty component (a component consisting of an empty string). A trailing component separator (the composite name string ends with a separator) denotes a trailing empty component. Adjacent component separators denote an empty component.

Composite Name Examples

This table shows examples of some composite names. Each row shows the string form of a composite name and its corresponding structural form (CompositeName).

String Name | CompositeName
"" | {} (the empty name == new CompositeName("") == new CompositeName())
"x" | {"x"}
"x/y" | {"x", "y"}
"x/" | {"x", ""}
"/x" | {"", "x"}
"/" | {""}
"//" | {"", ""}
"/x/" | {"", "x", ""}
"x//y" | {"x", "", "y"}

Composition Examples

Here are some composition examples. The right column shows composing string composite names while the left column shows composing the corresponding CompositeNames. Notice that composing the string forms of two composite names simply involves concatenating their string forms together.

String Names | CompositeNames
"x/y" + "/" = x/y/ | {"x", "y"} + {""} = {"x", "y", ""}
"" + "x" = "x" | {} + {"x"} = {"x"}
"/" + "x" = "/x" | {""} + {"x"} = {"", "x"}
"x" + "" + "" = "x" | {"x"} + {} + {} = {"x"}

Multithreaded Access

A CompositeName instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a CompositeName should lock the object.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
 | CompositeName() Constructs a new empty composite name.
protected | CompositeName(Enumeration comps) Constructs a new composite name instance using the components specified by 'comps'.
 | CompositeName(String n) Constructs a new composite name instance by parsing the string n using the composite name syntax (left-to-right, slash separated).
Method Summary
Name | add(int posn, String comp) Adds a single component at a specified position within this composite name.
Name | add(String comp) Adds a single component to the end of this composite name.
Name | addAll(int posn, Name n) Adds the components of a composite name -- in order -- at a specified position within this composite name.
Name | addAll(Name suffix) Adds the components of a composite name -- in order -- to the end of this composite name.
Object | clone() Generates a copy of this composite name.
int | compareTo(Object obj) Compares this CompositeName with the specified Object for order.
boolean | endsWith(Name n) Determines whether a composite name is a suffix of this composite name.
boolean | equals(Object obj) Determines whether two composite names are equal.
String | get(int posn) Retrieves a component of this composite name.
Enumeration | getAll() Retrieves the components of this composite name as an enumeration of strings.
Name | getPrefix(int posn) Creates a composite name whose components consist of a prefix of the components in this composite name.
Name | getSuffix(int posn) Creates a composite name whose components consist of a suffix of the components in this composite name.
int | hashCode() Computes the hash code of this composite name.
boolean | isEmpty() Determines whether this composite name is empty.
Object | remove(int posn) Deletes a component from this composite name.
int | size() Retrieves the number of components in this composite name.
boolean | startsWith(Name n) Determines whether a composite name is a prefix of this composite name.
String | toString() Generates the string representation of this composite name.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CompositeName

protected CompositeName(Enumeration comps)
Constructs a new composite name instance using the components specified by 'comps'. This protected method is intended to be to be used by subclasses of CompositeName when they override methods such as clone(), getPrefix(), getSuffix().
Parameters:
comps - A non-null enumeration containing the components for the new composite name. Each element is of class String. The enumeration will be consumed to extract its elements.

CompositeName

public CompositeName(String n)
              throws InvalidNameException
Constructs a new composite name instance by parsing the string n using the composite name syntax (left-to-right, slash separated). The composite name syntax is described in detail in the class description.
Parameters:
n - The non-null string to parse.
Throws:
InvalidNameException - If n has invalid composite name syntax.

CompositeName

public CompositeName()
Constructs a new empty composite name. Such a name returns true when isEmpty() is invoked on it.
Method Detail

toString

public String toString()
Generates the string representation of this composite name. The string representation consists of enumerating in order each component of the composite name and separating each component by a forward slash character. Quoting and escape characters are applied where necessary according to the JNDI syntax, which is described in the class description. An empty component is represented by an empty string. The string representation thus generated can be passed to the CompositeName constructor to create a new equivalent composite name.
Overrides:
toString in class Object
Returns:
A non-null string representation of this composite name.

equals

public boolean equals(Object obj)
Determines whether two composite names are equal. If obj is null or not a composite name, false is returned. Two composite names are equal if each component in one is equal to the corresponding component in the other. This implies both have the same number of components, and each component's equals() test against the corresponding component in the other name returns true.
Overrides:
equals in class Object
Parameters:
obj - The possibly null object to compare against.
Returns:
true if obj is equal to this composite name, false otherwise.
See Also:
hashCode()

hashCode

public int hashCode()
Computes the hash code of this composite name. The hash code is the sum of the hash codes of individual components of this composite name.
Overrides:
hashCode in class Object
Returns:
An int representing the hash code of this name.
See Also:
equals(java.lang.Object)

compareTo

public int compareTo(Object obj)
Compares this CompositeName with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Name is less than, equal to, or greater than the given Object.

If obj is null or not an instance of CompositeName, ClassCastException is thrown.

See equals() for what it means for two composite names to be equal. If two composite names are equal, 0 is returned.

Ordering of composite names follows the lexicographical rules for string comparison, with the extension that this applies to all the components in the composite name. The effect is as if all the components were lined up in their specified ordered and the lexicographical rules applied over the two line-ups. If this composite name is "lexicographically" lesser than obj, a negative number is returned. If this composite name is "lexicographically" greater than obj, a positive number is returned.

Specified by:
compareTo in interface Name
Parameters:
obj - The non-null object to compare against.
Returns:
a negative integer, zero, or a positive integer as this Name is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - if obj is not a CompositeName.

clone

public Object clone()
Generates a copy of this composite name. Changes to the components of this composite name won't affect the new copy and vice versa.
Specified by:
clone in interface Name
Overrides:
clone in class Object
Returns:
A non-null copy of this composite name.

size

public int size()
Retrieves the number of components in this composite name.
Specified by:
size in interface Name
Returns:
The nonnegative number of components in this composite name.

isEmpty

public boolean isEmpty()
Determines whether this composite name is empty. A composite name is empty if it has zero components.
Specified by:
isEmpty in interface Name
Returns:
true if this composite name is empty, false otherwise.

getAll

public Enumeration getAll()
Retrieves the components of this composite name as an enumeration of strings. The effects of updates to this composite name on this enumeration is undefined.
Specified by:
getAll in interface Name
Returns:
A non-null enumeration of the components of this composite name. Each element of the enumeration is of class String.

get

public String get(int posn)
Retrieves a component of this composite name.
Specified by:
get in interface Name
Parameters:
posn - The 0-based index of the component to retrieve. Must be in the range [0,size()).
Returns:
The non-null component at index posn.
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range.

getPrefix

public Name getPrefix(int posn)
Creates a composite name whose components consist of a prefix of the components in this composite name. Subsequent changes to this composite name does not affect the name that is returned.
Specified by:
getPrefix in interface Name
Parameters:
posn - The 0-based index of the component at which to stop. Must be in the range [0,size()].
Returns:
A composite name consisting of the components at indexes in the range [0,posn).
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.

getSuffix

public Name getSuffix(int posn)
Creates a composite name whose components consist of a suffix of the components in this composite name. Subsequent changes to this composite name does not affect the name that is returned.
Specified by:
getSuffix in interface Name
Parameters:
posn - The 0-based index of the component at which to start. Must be in the range [0,size()].
Returns:
A composite name consisting of the components at indexes in the range [posn,size()). If posn is equal to size(), an empty composite name is returned.
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.

startsWith

public boolean startsWith(Name n)
Determines whether a composite name is a prefix of this composite name. A composite name 'n' is a prefix if it is equal to getPrefix(n.size())--in other words, this composite name starts with 'n'. If 'n' is null or not a composite name, false is returned.
Specified by:
startsWith in interface Name
Parameters:
n - The possibly null name to check.
Returns:
true if n is a CompositeName and is a prefix of this composite name, false otherwise.

endsWith

public boolean endsWith(Name n)
Determines whether a composite name is a suffix of this composite name. A composite name 'n' is a suffix if it it is equal to getSuffix(size()-n.size())--in other words, this composite name ends with 'n'. If n is null or not a composite name, false is returned.
Specified by:
endsWith in interface Name
Parameters:
n - The possibly null name to check.
Returns:
true if n is a CompositeName and is a suffix of this composite name, false otherwise.

addAll

public Name addAll(Name suffix)
            throws InvalidNameException
Adds the components of a composite name -- in order -- to the end of this composite name.
Specified by:
addAll in interface Name
Parameters:
suffix - The non-null components to add.
Returns:
The updated CompositeName, not a new one. Cannot be null.
Throws:
InvalidNameException - If suffix is not a composite name.

addAll

public Name addAll(int posn,
                   Name n)
            throws InvalidNameException
Adds the components of a composite name -- in order -- at a specified position within this composite name. Components of this composite name at or after the index of the first new component are shifted up (away from index 0) to accommodate the new components.
Specified by:
addAll in interface Name
Parameters:
n - The non-null components to add.
posn - The index in this name at which to add the new components. Must be in the range [0,size()].
Returns:
The updated CompositeName, not a new one. Cannot be null.
Throws:
InvalidNameException - If n is not a composite name.
ArrayIndexOutOfBoundsException - If posn is outside the specified range.

add

public Name add(String comp)
         throws InvalidNameException
Adds a single component to the end of this composite name.
Specified by:
add in interface Name
Parameters:
comp - The non-null component to add.
Returns:
The updated CompositeName, not a new one. Cannot be null.
Throws:
InvalidNameException - If adding comp at end of the name would violate the name's syntax.

add

public Name add(int posn,
                String comp)
         throws InvalidNameException
Adds a single component at a specified position within this composite name. Components of this composite name at or after the index of the new component are shifted up by one (away from index 0) to accommodate the new component.
Specified by:
add in interface Name
Parameters:
comp - The non-null component to add.
posn - The index at which to add the new component. Must be in the range [0,size()].
Returns:
The updated CompositeName, not a new one. Cannot be null.
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.
InvalidNameException - If adding comp at the specified position would violate the name's syntax.

remove

public Object remove(int posn)
              throws InvalidNameException
Deletes a component from this composite name. The component of this composite name at position 'posn' is removed, and components at indices greater than 'posn' are shifted down (towards index 0) by one.
Specified by:
remove in interface Name
Parameters:
posn - The index of the component to delete. Must be in the range [0,size()).
Returns:
The component removed (a String).
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range (includes case where composite name is empty).
InvalidNameException - If deleting the component would violate the name's syntax.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompoundName

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class CompoundName

java.lang.Object
  |
  +--javax.naming.CompoundName
All Implemented Interfaces:
Cloneable, Name, Serializable
public class CompoundName
extends Object
implements Name

This class represents a compound name -- a name from a hierarchical name space. Each component in a compound name is an atomic name.

The components of a compound name are numbered. The indexes of a compound name with N components range from 0 up to, but not including, N. This range may be written as [0,N). The most significant component is at index 0. An empty compound name has no components.

Compound Name Syntax

The syntax of a compound name is specified using a set of properties:
jndi.syntax.direction
Direction for parsing ("right_to_left", "left_to_right", "flat"). If unspecified, defaults to "flat", which means the namespace is flat with no hierarchical structure.
jndi.syntax.separator
Separator between atomic name components. Required unless direction is "flat".
jndi.syntax.ignorecase
If present, "true" means ignore the case when comparing name components. If its value is not "true", or if the property is not present, case is considered when comparing name components.
jndi.syntax.escape
If present, specifies the escape string for overriding separator, escapes and quotes.
jndi.syntax.beginquote
If present, specifies the string delimiting start of a quoted string.
jndi.syntax.endquote
String delimiting end of quoted string. If present, specifies the string delimiting the end of a quoted string. If not present, use syntax.beginquote as end quote.
jndi.syntax.beginquote2
Alternative set of begin/end quotes.
jndi.syntax.endquote2
Alternative set of begin/end quotes.
jndi.syntax.trimblanks
If present, "true" means trim any leading and trailing whitespaces in a name component for comparison purposes. If its value is not "true", or if the property is not present, blanks are significant.
jndi.syntax.separator.ava
If present, specifies the string that separates attribute-value-assertions when specifying multiple attribute/value pairs. (e.g. "," in age=65,gender=male).
jndi.syntax.separator.typeval
If present, specifies the string that separators attribute from value (e.g. "=" in "age=65")
These properties are interpreted according to the following rules:
  1. In a string without quotes or escapes, any instance of the separator delimits two atomic names. Each atomic name is referred to as a component.
  2. A separator, quote or escape is escaped if preceded immediately (on the left) by the escape.
  3. If there are two sets of quotes, a specific begin-quote must be matched by its corresponding end-quote.
  4. A non-escaped begin-quote which precedes a component must be matched by a non-escaped end-quote at the end of the component. A component thus quoted is referred to as a quoted component. It is parsed by removing the being- and end- quotes, and by treating the intervening characters as ordinary characters unless one of the rules involving quoted components listed below applies.
  5. Quotes embedded in non-quoted components are treated as ordinary strings and need not be matched.
  6. A separator that is escaped or appears between non-escaped quotes is treated as an ordinary string and not a separator.
  7. An escape string within a quoted component acts as an escape only when followed by the corresponding end-quote string. This can be used to embed an escaped quote within a quoted component.
  8. An escaped escape string is not treated as an escape string.
  9. An escape string that does not precede a meta string (quotes or separator) and is not at the end of a component is treated as an ordinary string.
  10. A leading separator (the compound name string begins with a separator) denotes a leading empty atomic component (consisting of an empty string). A trailing separator (the compound name string ends with a separator) denotes a trailing empty atomic component. Adjacent separators denote an empty atomic component.

The string form of the compound name follows the syntax described above. When the components of the compound name are turned into their string representation, the reserved syntax rules described above are applied (e.g. embedded separators are escaped or quoted) so that when the same string is parsed, it will yield the same components of the original compound name.

Multithreaded Access

A CompoundName instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a CompoundName should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected javax.naming.NameImpl | impl Implementation of this compound name.
protected Properties | mySyntax Syntax properties for this compound name.
Constructor Summary
protected | CompoundName(Enumeration comps, Properties syntax) Constructs a new compound name instance using the components specified in comps and syntax.
 | CompoundName(String n, Properties syntax) Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.
Method Summary
Name | add(int posn, String comp) Adds a single component at a specified position within this compound name.
Name | add(String comp) Adds a single component to the end of this compound name.
Name | addAll(int posn, Name n) Adds the components of a compound name -- in order -- at a specified position within this compound name.
Name | addAll(Name suffix) Adds the components of a compound name -- in order -- to the end of this compound name.
Object | clone() Creates a copy of this compound name.
int | compareTo(Object obj) Compares this CompoundName with the specified Object for order.
boolean | endsWith(Name n) Determines whether a compound name is a suffix of this compound name.
boolean | equals(Object obj) Determines whether obj is syntactically equal to this compound name.
String | get(int posn) Retrieves a component of this compound name.
Enumeration | getAll() Retrieves the components of this compound name as an enumeration of strings.
Name | getPrefix(int posn) Creates a compound name whose components consist of a prefix of the components in this compound name.
Name | getSuffix(int posn) Creates a compound name whose components consist of a suffix of the components in this compound name.
int | hashCode() Computes the hash code of this compound name.
boolean | isEmpty() Determines whether this compound name is empty.
Object | remove(int posn) Deletes a component from this compound name.
int | size() Retrieves the number of components in this compound name.
boolean | startsWith(Name n) Determines whether a compound name is a prefix of this compound name.
String | toString() Generates the string representation of this compound name, using the syntax rules of the compound name.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

impl

protected transient javax.naming.NameImpl impl
Implementation of this compound name. This field is initialized by the constructors and cannot be null. It should be treated as a read-only variable by subclasses.

mySyntax

protected transient Properties mySyntax
Syntax properties for this compound name. This field is initialized by the constructors and cannot be null. It should be treated as a read-only variable by subclasses. Any necessary changes to mySyntax should be made within constructors and not after the compound name has been instantiated.
Constructor Detail

CompoundName

protected CompoundName(Enumeration comps,
                       Properties syntax)
Constructs a new compound name instance using the components specified in comps and syntax. This protected method is intended to be to be used by subclasses of CompoundName when they override methods such as clone(), getPrefix(), getSuffix().
Parameters:
comps - A non-null enumeration of the components to add. Each element of the enumeration is of class String. The enumeration will be consumed to extract its elements.
syntax - A non-null properties that specify the syntax of this compound name. See class description for contents of properties.

CompoundName

public CompoundName(String n,
                    Properties syntax)
             throws InvalidNameException
Constructs a new compound name instance by parsing the string n using the syntax specified by the syntax properties supplied.
Parameters:
n - The non-null string to parse.
syntax - A non-null list of properties that specify the syntax of this compound name. See class description for contents of properties.
Throws:
InvalidNameException - If 'n' violates the syntax specified by syntax.
Method Detail

toString

public String toString()
Generates the string representation of this compound name, using the syntax rules of the compound name. The syntax rules are described in the class description. An empty component is represented by an empty string. The string representation thus generated can be passed to the CompoundName constructor with the same syntax properties to create a new equivalent compound name.
Overrides:
toString in class Object
Returns:
A non-null string representation of this compound name.

equals

public boolean equals(Object obj)
Determines whether obj is syntactically equal to this compound name. If obj is null or not a CompoundName, false is returned. Two compound names are equal if each component in one is "equal" to the corresponding component in the other.

Equality is also defined in terms of the syntax of this compound name. The default implementation of CompoundName uses the syntax properties jndi.syntax.ignorecase and jndi.syntax.trimblanks when comparing two components for equality. If case is ignored, two strings with the same sequence of characters but with different cases are considered equal. If blanks are being trimmed, leading and trailing blanks are ignored for the purpose of the comparison.

Both compound names must have the same number of components.

Implementation note: Currently the syntax properties of the two compound names are not compared for equality. They might be in the future.

Overrides:
equals in class Object
Parameters:
obj - The possibly null object to compare against.
Returns:
true if obj is equal to this compound name, false otherwise.
See Also:
compareTo(java.lang.Object obj)

hashCode

public int hashCode()
Computes the hash code of this compound name. The hash code is the sum of the hash codes of the "canonicalized" forms of individual components of this compound name. Each component is "canonicalized" according to the compound name's syntax before its hash code is computed. For a case-insensitive name, for example, the uppercased form of a name has the same hash code as its lowercased equivalent.
Overrides:
hashCode in class Object
Returns:
An int representing the hash code of this name.

clone

public Object clone()
Creates a copy of this compound name. Changes to the components of this compound name won't affect the new copy and vice versa. The clone and this compound name share the same syntax.
Specified by:
clone in interface Name
Overrides:
clone in class Object
Returns:
A non-null copy of this compound name.

compareTo

public int compareTo(Object obj)
Compares this CompoundName with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Name is less than, equal to, or greater than the given Object.

If obj is null or not an instance of CompoundName, ClassCastException is thrown.

See equals() for what it means for two compound names to be equal. If two compound names are equal, 0 is returned.

Ordering of compound names depend on the syntax of the compound name. By default, they follow lexicographical rules for string comparison with the extension that this applies to all the components in the compound name and that comparison of individual components is affected by the jndi.syntax.ignorecase and jndi.syntax.trimblanks properties, identical to how they affect equals(). If this compound name is "lexicographically" lesser than obj, a negative number is returned. If this compound name is "lexicographically" greater than obj, a positive number is returned.

Implementation note: Currently the syntax properties of the two compound names are not compared when checking order. They might be in the future.

Specified by:
compareTo in interface Name
Parameters:
obj - The non-null object to compare against.
Returns:
a negative integer, zero, or a positive integer as this Name is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - if obj is not a CompoundName.
See Also:
equals(java.lang.Object)

size

public int size()
Retrieves the number of components in this compound name.
Specified by:
size in interface Name
Returns:
The nonnegative number of components in this compound name.

isEmpty

public boolean isEmpty()
Determines whether this compound name is empty. A compound name is empty if it has zero components.
Specified by:
isEmpty in interface Name
Returns:
true if this compound name is empty, false otherwise.

getAll

public Enumeration getAll()
Retrieves the components of this compound name as an enumeration of strings. The effects of updates to this compound name on this enumeration is undefined.
Specified by:
getAll in interface Name
Returns:
A non-null enumeration of the components of this compound name. Each element of the enumeration is of class String.

get

public String get(int posn)
Retrieves a component of this compound name.
Specified by:
get in interface Name
Parameters:
posn - The 0-based index of the component to retrieve. Must be in the range [0,size()).
Returns:
The component at index posn.
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range.

getPrefix

public Name getPrefix(int posn)
Creates a compound name whose components consist of a prefix of the components in this compound name. The result and this compound name share the same syntax. Subsequent changes to this compound name does not affect the name that is returned and vice versa.
Specified by:
getPrefix in interface Name
Parameters:
posn - The 0-based index of the component at which to stop. Must be in the range [0,size()].
Returns:
A compound name consisting of the components at indexes in the range [0,posn).
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.

getSuffix

public Name getSuffix(int posn)
Creates a compound name whose components consist of a suffix of the components in this compound name. The result and this compound name share the same syntax. Subsequent changes to this compound name does not affect the name that is returned.
Specified by:
getSuffix in interface Name
Parameters:
posn - The 0-based index of the component at which to start. Must be in the range [0,size()].
Returns:
A compound name consisting of the components at indexes in the range [posn,size()). If posn is equal to size(), an empty compound name is returned.
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.

startsWith

public boolean startsWith(Name n)
Determines whether a compound name is a prefix of this compound name. A compound name 'n' is a prefix if it is equal to getPrefix(n.size())--in other words, this compound name starts with 'n'. If n is null or not a compound name, false is returned.

Implementation note: Currently the syntax properties of n are not used when doing the comparison. They might be in the future.

Specified by:
startsWith in interface Name
Parameters:
n - The possibly null compound name to check.
Returns:
true if n is a CompoundName and is a prefix of this compound name, false otherwise.

endsWith

public boolean endsWith(Name n)
Determines whether a compound name is a suffix of this compound name. A compound name 'n' is a suffix if it it is equal to getSuffix(size()-n.size())--in other words, this compound name ends with 'n'. If n is null or not a compound name, false is returned.

Implementation note: Currently the syntax properties of n are not used when doing the comparison. They might be in the future.

Specified by:
endsWith in interface Name
Parameters:
n - The possibly null compound name to check.
Returns:
true if n is a CompoundName and is a suffix of this compound name, false otherwise.

addAll

public Name addAll(Name suffix)
            throws InvalidNameException
Adds the components of a compound name -- in order -- to the end of this compound name.

Implementation note: Currently the syntax properties of suffix is not used or checked. They might be in the future.

Specified by:
addAll in interface Name
Parameters:
suffix - The non-null components to add.
Returns:
The updated CompoundName, not a new one. Cannot be null.
Throws:
InvalidNameException - If suffix is not a compound name, or if the addition of the components violates the syntax of this compound name (e.g. exceeding number of components).

addAll

public Name addAll(int posn,
                   Name n)
            throws InvalidNameException
Adds the components of a compound name -- in order -- at a specified position within this compound name. Components of this compound name at or after the index of the first new component are shifted up (away from index 0) to accommodate the new components.

Implementation note: Currently the syntax properties of suffix is not used or checked. They might be in the future.

Specified by:
addAll in interface Name
Parameters:
n - The non-null components to add.
posn - The index in this name at which to add the new components. Must be in the range [0,size()].
Returns:
The updated CompoundName, not a new one. Cannot be null.
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.
InvalidNameException - If n is not a compound name, or if the addition of the components violates the syntax of this compound name (e.g. exceeding number of components).

add

public Name add(String comp)
         throws InvalidNameException
Adds a single component to the end of this compound name.
Specified by:
add in interface Name
Parameters:
comp - The non-null component to add.
Returns:
The updated CompoundName, not a new one. Cannot be null.
Throws:
InvalidNameException - If adding comp at end of the name would violate the compound name's syntax.

add

public Name add(int posn,
                String comp)
         throws InvalidNameException
Adds a single component at a specified position within this compound name. Components of this compound name at or after the index of the new component are shifted up by one (away from index 0) to accommodate the new component.
Specified by:
add in interface Name
Parameters:
comp - The non-null component to add.
posn - The index at which to add the new component. Must be in the range [0,size()].
Returns:
The updated CompoundName, not a new one. Cannot be null.
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range.
InvalidNameException - If adding comp at the specified position would violate the compound name's syntax.

remove

public Object remove(int posn)
              throws InvalidNameException
Deletes a component from this compound name. The component of this compound name at position 'posn' is removed, and components at indices greater than 'posn' are shifted down (towards index 0) by one.
Specified by:
remove in interface Name
Parameters:
posn - The index of the component to delete. Must be in the range [0,size()).
Returns:
The component removed (a String).
Throws:
ArrayIndexOutOfBoundsException - If posn is outside the specified range (includes case where compound name is empty).
InvalidNameException - If deleting the component would violate the compound name's syntax.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConfigurationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class ConfigurationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.ConfigurationException
All Implemented Interfaces:
Serializable
public class ConfigurationException
extends NamingException

This exception is thrown when there is a configuration problem. This can arise when installation of a provider was not done correctly, or if there are configuration problems with the server, or if configuration information required to access the provider or service is malformed or missing. For example, a request to use SSL as the security protocol when the service provider software was not configured with the SSL component would cause such an exception. Another example is if the provider requires that a URL be specified as one of the environment properties but the client failed to provide it.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
ConfigurationException()
Constructs a new instance of ConfigurationException with all name resolution fields and explanation initialized to null.
ConfigurationException(String explanation)
Constructs a new instance of ConfigurationException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConfigurationException

public ConfigurationException(String explanation)
Constructs a new instance of ConfigurationException using an explanation. All other fields default to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

ConfigurationException

public ConfigurationException()
Constructs a new instance of ConfigurationException with all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Context

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Interface Context

All Known Subinterfaces:
DirContext, EventContext, EventDirContext, LdapContext
All Known Implementing Classes:
InitialContext
public interface Context

This interface represents a naming context, which consists of a set of name-to-object bindings. It contains methods for examining and updating these bindings.

Names

Each name passed as an argument to a Context method is relative to that context. The empty name is used to name the context itself. A name parameter may never be null.

Most of the methods have overloaded versions with one taking a Name parameter and one taking a String. These overloaded versions are equivalent in that if the Name and String parameters are just different representations of the same name, then the overloaded versions of the same methods behave the same. In the method descriptions below, only one version is fully documented. The second version instead has a link to the first: the same documentation applies to both.

For systems that support federation, String name arguments to Context methods are composite names. Name arguments that are instances of CompositeName are treated as composite names, while Name arguments that are not instances of CompositeName are treated as compound names (which might be instances of CompoundName or other implementations of compound names). This allows the results of NameParser.parse() to be used as arguments to the Context methods. Prior to JNDI 1.2, all name arguments were treated as composite names.

Furthermore, for systems that support federation, all names returned in a NamingEnumeration from list() and listBindings() are composite names represented as strings. See CompositeName for the string syntax of names.

For systems that do not support federation, the name arguments (in either Name or String forms) and the names returned in NamingEnumeration may be names in their own namespace rather than names in a composite namespace, at the discretion of the service provider.

Exceptions

All the methods in this interface can throw a NamingException or any of its subclasses. See NamingException and their subclasses for details on each exception.

Concurrent Access

A Context instance is not guaranteed to be synchronized against concurrent access by multiple threads. Threads that need to access a single Context instance concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating a different Context instance need not synchronize. Note that the lookup method, when passed an empty name, will return a new Context instance representing the same naming context.

For purposes of concurrency control, a Context operation that returns a NamingEnumeration is not considered to have completed while the enumeration is still in use, or while any referrals generated by that operation are still being followed.

Parameters

A Name parameter passed to any method of the Context interface or one of its subinterfaces will not be modified by the service provider. The service provider may keep a reference to it for the duration of the operation, including any enumeration of the method's results and the processing of any referrals generated. The caller should not modify the object during this time. A Name returned by any such method is owned by the caller. The caller may subsequently modify it; the service provider may not.

Environment Properties

JNDI applications need a way to communicate various preferences and properties that define the environment in which naming and directory services are accessed. For example, a context might require specification of security credentials in order to access the service. Another context might require that server configuration information be supplied. These are referred to as the environment of a context. The Context interface provides methods for retrieving and updating this environment.

The environment is inherited from the parent context as context methods proceed from one context to the next. Changes to the environment of one context do not directly affect those of other contexts.

It is implementation-dependent when environment properties are used and/or verified for validity. For example, some of the security-related properties are used by service providers to "log in" to the directory. This login process might occur at the time the context is created, or the first time a method is invoked on the context. When, and whether this occurs at all, is implementation-dependent. When environment properties are added or removed from the context, verifying the validity of the changes is again implementation-dependent. For example, verification of some properties might occur at the time the change is made, or at the time the next operation is performed on the context, or not at all.

Any object with a reference to a context may examine that context's environment. Sensitive information such as clear-text passwords should not be stored there unless the implementation is known to protect it.

Resource Files

To simplify the task of setting up the environment required by a JNDI application, application components and service providers may be distributed along with resource files. A JNDI resource file is a file in the properties file format (see java.util.Properties), containing a list of key/value pairs. The key is the name of the property (e.g. "java.naming.factory.object") and the value is a string in the format defined for that property. Here is an example of a JNDI resource file:

 java.naming.factory.object=com.sun.jndi.ldap.AttrsToCorba:com.wiz.from.Person
 java.naming.factory.state=com.sun.jndi.ldap.CorbaToAttrs:com.wiz.from.Person
 java.naming.factory.control=com.sun.jndi.ldap.ResponseControlFactory
The JNDI class library reads the resource files and makes the property values freely available. Thus JNDI resource files should be considered to be "world readable", and sensitive information such as clear-text passwords should not be stored there.

There are two kinds of JNDI resource files: provider and application.

Provider Resource Files
Each service provider has an optional resource that lists properties specific to that provider. The name of this resource is:
[prefix/]jndiprovider.properties
where prefix is the package name of the provider's context implementation(s), with each period (".") converted to a slash ("/"). For example, suppose a service provider defines a context implementation with class name com.sun.jndi.ldap.LdapCtx. The provider resource for this provider is named com/sun/jndi/ldap/jndiprovider.properties. If the class is not in a package, the resource's name is simply jndiprovider.properties.

Certain methods in the JNDI class library make use of the standard JNDI properties that specify lists of JNDI factories:

  • java.naming.factory.object
  • java.naming.factory.state
  • java.naming.factory.control
  • java.naming.factory.url.pkgs
The JNDI library will consult the provider resource file when determining the values of these properties. Properties other than these may be set in the provider resource file at the discretion of the service provider. The service provider's documentation should clearly state which properties are allowed; other properties in the file will be ignored.
Application Resource Files
When an application is deployed, it will generally have several codebase directories and JARs in its classpath. Similarly, when an applet is deployed, it will have a codebase and archives specifying where to find the applet's classes. JNDI locates (using ClassLoader.getResources()) all application resource files named jndi.properties in the classpath. In addition, if the file java.home/lib/jndi.properties exists and is readable, JNDI treats it as an additional application resource file. (java.home indicates the directory named by the java.home system property.) All of the properties contained in these files are placed into the environment of the initial context. This environment is then inherited by other contexts.

For each property found in more than one application resource file, JNDI uses the first value found or, in a few cases where it makes sense to do so, it concatenates all of the values (details are given below). For example, if the "java.naming.factory.object" property is found in three jndi.properties resource files, the list of object factories is a concatentation of the property values from all three files. Using this scheme, each deployable component is responsible for listing the factories that it exports. JNDI automatically collects and uses all of these export lists when searching for factory classes.

Application resource files are available beginning with the Java 2 Platform, except that the file in java.home/lib may be used on earlier Java platforms as well.

Search Algorithm for Properties
When JNDI constructs an initial context, the context's environment is initialized with properties defined in the environment parameter passed to the constructor, the system properties, the applet parameters, and the application resource files. See InitialContext for details. This initial environment is then inherited by other context instances.

When the JNDI class library needs to determine the value of a property, it does so by merging the values from the following two sources, in order:

  1. The environment of the context being operated on.
  2. The provider resource file (jndiprovider.properties) for the context being operated on.
For each property found in both of these two sources, JNDI determines the property's value as follows. If the property is one of the standard JNDI properties that specify a list of JNDI factories (listed above), the values are concatenated into a single colon-separated list. For other properties, only the first value found is used.

When a service provider needs to determine the value of a property, it will generally take that value directly from the environment. A service provider may define provider-specific properties to be placed in its own provider resource file. In that case it should merge values as described in the previous paragraph.

In this way, each service provider developer can specify a list of factories to use with that service provider. These can be modified by the application resources specified by the deployer of the application or applet, which in turn can be modified by the user.

Since:
1.3

Field Summary
static String | APPLET Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties.
static String | AUTHORITATIVE Constant that holds the name of the environment property for specifying the authoritativeness of the service requested.
static String | BATCHSIZE Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol.
static String | DNS_URL Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com").
static String | INITIAL_CONTEXT_FACTORY Constant that holds the name of the environment property for specifying the initial context factory to use.
static String | LANGUAGE Constant that holds the name of the environment property for specifying the preferred language to use with the service.
static String | OBJECT_FACTORIES Constant that holds the name of the environment property for specifying the list of object factories to use.
static String | PROVIDER_URL Constant that holds the name of the environment property for specifying configuration information for the service provider to use.
static String | REFERRAL Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
static String | SECURITY_AUTHENTICATION Constant that holds the name of the environment property for specifying the security level to use.
static String | SECURITY_CREDENTIALS Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service.
static String | SECURITY_PRINCIPAL Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service.
static String | SECURITY_PROTOCOL Constant that holds the name of the environment property for specifying the security protocol to use.
static String | STATE_FACTORIES Constant that holds the name of the environment property for specifying the list of state factories to use.
static String | URL_PKG_PREFIXES Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories.
Method Summary
Object | addToEnvironment(String propName, Object propVal) Adds a new environment property to the environment of this context.
void | bind(Name name, Object obj) Binds a name to an object.
void | bind(String name, Object obj) Binds a name to an object.
void | close() Closes this context.
Name | composeName(Name name, Name prefix) Composes the name of this context with a name relative to this context.
String | composeName(String name, String prefix) Composes the name of this context with a name relative to this context.
Context | createSubcontext(Name name) Creates and binds a new context.
Context | createSubcontext(String name) Creates and binds a new context.
void | destroySubcontext(Name name) Destroys the named context and removes it from the namespace.
void | destroySubcontext(String name) Destroys the named context and removes it from the namespace.
Hashtable | getEnvironment() Retrieves the environment in effect for this context.
String | getNameInNamespace() Retrieves the full name of this context within its own namespace.
NameParser | getNameParser(Name name) Retrieves the parser associated with the named context.
NameParser | getNameParser(String name) Retrieves the parser associated with the named context.
NamingEnumeration | list(Name name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | list(String name) Enumerates the names bound in the named context, along with the class names of objects bound to them.
NamingEnumeration | listBindings(Name name) Enumerates the names bound in the named context, along with the objects bound to them.
NamingEnumeration | listBindings(String name) Enumerates the names bound in the named context, along with the objects bound to them.
Object | lookup(Name name) Retrieves the named object.
Object | lookup(String name) Retrieves the named object.
Object | lookupLink(Name name) Retrieves the named object, following links except for the terminal atomic component of the name.
Object | lookupLink(String name) Retrieves the named object, following links except for the terminal atomic component of the name.
void | rebind(Name name, Object obj) Binds a name to an object, overwriting any existing binding.
void | rebind(String name, Object obj) Binds a name to an object, overwriting any existing binding.
Object | removeFromEnvironment(String propName) Removes an environment property from the environment of this context.
void | rename(Name oldName, Name newName) Binds a new name to the object bound to an old name, and unbinds the old name.
void | rename(String oldName, String newName) Binds a new name to the object bound to an old name, and unbinds the old name.
void | unbind(Name name) Unbinds the named object.
void | unbind(String name) Unbinds the named object.

Field Detail

INITIAL_CONTEXT_FACTORY

public static final String INITIAL_CONTEXT_FACTORY
Constant that holds the name of the environment property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context. This property may be specified in the environment parameter passed to the initial context constructor, an applet parameter, a system property, or an application resource file. If it is not specified in any of these sources, NoInitialContextException is thrown when an initial context is required to complete an operation.

The value of this constant is "java.naming.factory.initial".

See Also:
InitialContext, InitialDirContext, NamingManager.getInitialContext(java.util.Hashtable), InitialContextFactory, NoInitialContextException, addToEnvironment(String, Object), removeFromEnvironment(String), APPLET

OBJECT_FACTORIES

public static final String OBJECT_FACTORIES
Constant that holds the name of the environment property for specifying the list of object factories to use. The value of the property should be a colon-separated list of the fully qualified class names of factory classes that will create an object given information about the object. This property may be specified in the environment, an applet parameter, a system property, or one or more resource files.

The value of this constant is "java.naming.factory.object".

See Also:
NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), ObjectFactory, addToEnvironment(String, Object), removeFromEnvironment(String), APPLET

STATE_FACTORIES

public static final String STATE_FACTORIES
Constant that holds the name of the environment property for specifying the list of state factories to use. The value of the property should be a colon-separated list of the fully qualified class names of state factory classes that will be used to get an object's state given the object itself. This property may be specified in the environment, an applet parameter, a system property, or one or more resource files.

The value of this constant is "java.naming.factory.state".

See Also:
NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), StateFactory, addToEnvironment(String, Object), removeFromEnvironment(String), APPLET
Since:
1.3

URL_PKG_PREFIXES

public static final String URL_PKG_PREFIXES
Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories. The value of the property should be a colon-separated list of package prefixes for the class name of the factory class that will create a URL context factory. This property may be specified in the environment, an applet parameter, a system property, or one or more resource files. The prefix com.sun.jndi.url is always appended to the possibly empty list of package prefixes.

The value of this constant is "java.naming.factory.url.pkgs".

See Also:
NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), NamingManager.getURLContext(java.lang.String, java.util.Hashtable), ObjectFactory, addToEnvironment(String, Object), removeFromEnvironment(String), APPLET

PROVIDER_URL

public static final String PROVIDER_URL
Constant that holds the name of the environment property for specifying configuration information for the service provider to use. The value of the property should contain a URL string (e.g. "ldap://somehost:389"). This property may be specified in the environment, an applet parameter, a system property, or a resource file. If it is not specified in any of these sources, the default configuration is determined by the service provider.

The value of this constant is "java.naming.provider.url".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String), APPLET

DNS_URL

public static final String DNS_URL
Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com"). This property may be specified in the environment, an applet parameter, a system property, or a resource file. If it is not specified in any of these sources and the program attempts to use a JNDI URL containing a DNS name, a ConfigurationException will be thrown.

The value of this constant is "java.naming.dns.url".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

AUTHORITATIVE

public static final String AUTHORITATIVE
Constant that holds the name of the environment property for specifying the authoritativeness of the service requested. If the value of the property is the string "true", it means that the access is to the most authoritative source (i.e. bypass any cache or replicas). If the value is anything else, the source need not be (but may be) authoritative. If unspecified, the value defaults to "false".

The value of this constant is "java.naming.authoritative".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

BATCHSIZE

public static final String BATCHSIZE
Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol. This is a hint to the provider to return the results of operations in batches of the specified size, so the provider can optimize its performance and usage of resources. The value of the property is the string representation of an integer. If unspecified, the batch size is determined by the service provider.

The value of this constant is "java.naming.batchsize".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

REFERRAL

public static final String REFERRAL
Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed. The value of the property is one of the following strings:
"follow"
follow referrals automatically
"ignore"
ignore referrals
"throw"
throw ReferralException when a referral is encountered.
If this property is not specified, the default is determined by the provider.

The value of this constant is "java.naming.referral".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

SECURITY_PROTOCOL

public static final String SECURITY_PROTOCOL
Constant that holds the name of the environment property for specifying the security protocol to use. Its value is a string determined by the service provider (e.g. "ssl"). If this property is unspecified, the behaviour is determined by the service provider.

The value of this constant is "java.naming.security.protocol".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

SECURITY_AUTHENTICATION

public static final String SECURITY_AUTHENTICATION
Constant that holds the name of the environment property for specifying the security level to use. Its value is one of the following strings: "none", "simple", "strong". If this property is unspecified, the behaviour is determined by the service provider.

The value of this constant is "java.naming.security.authentication".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

SECURITY_PRINCIPAL

public static final String SECURITY_PRINCIPAL
Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service. The format of the principal depends on the authentication scheme. If this property is unspecified, the behaviour is determined by the service provider.

The value of this constant is "java.naming.security.principal".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

SECURITY_CREDENTIALS

public static final String SECURITY_CREDENTIALS
Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service. The value of the property depends on the authentication scheme. For example, it could be a hashed password, clear-text password, key, certificate, and so on. If this property is unspecified, the behaviour is determined by the service provider.

The value of this constant is "java.naming.security.credentials".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

LANGUAGE

public static final String LANGUAGE
Constant that holds the name of the environment property for specifying the preferred language to use with the service. The value of the property is a colon-separated list of language tags as defined in RFC 1766. If this property is unspecified, the language preference is determined by the service provider.

The value of this constant is "java.naming.language".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

APPLET

public static final String APPLET
Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties. The value of this property is the java.applet.Applet instance that is being executed. This property may be specified in the environment parameter passed to the initial context constructor. When this property is set, each property that the initial context constructor looks for in the system properties is first looked for in the applet's parameter list. If this property is unspecified, the initial context constructor will search for properties only in the environment parameter passed to it, the system properties, and application resource files.

The value of this constant is "java.naming.applet".

See Also:
addToEnvironment(String, Object), removeFromEnvironment(String), InitialContext
Since:
1.3
Method Detail

lookup

public Object lookup(Name name)
              throws NamingException
Retrieves the named object. If name is empty, returns a new instance of this context (which represents the same naming context as this context, but its environment may be modified independently and it may be accessed concurrently).
Parameters:
name - the name of the object to look up
Returns:
the object bound to name
Throws:
NamingException - if a naming exception is encountered
See Also:
lookup(String), lookupLink(Name)

lookup

public Object lookup(String name)
              throws NamingException
Retrieves the named object. See lookup(Name) for details.
Parameters:
name - the name of the object to look up
Returns:
the object bound to name
Throws:
NamingException - if a naming exception is encountered

bind

public void bind(Name name,
                 Object obj)
          throws NamingException
Binds a name to an object. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered
See Also:
bind(String, Object), rebind(Name, Object), DirContext.bind(Name, Object, javax.naming.directory.Attributes)

bind

public void bind(String name,
                 Object obj)
          throws NamingException
Binds a name to an object. See bind(Name, Object) for details.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered

rebind

public void rebind(Name name,
                   Object obj)
            throws NamingException
Binds a name to an object, overwriting any existing binding. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.

If the object is a DirContext, any existing attributes associated with the name are replaced with those of the object. Otherwise, any existing attributes associated with the name remain unchanged.

Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered
See Also:
rebind(String, Object), bind(Name, Object), DirContext.rebind(Name, Object, javax.naming.directory.Attributes), DirContext

rebind

public void rebind(String name,
                   Object obj)
            throws NamingException
Binds a name to an object, overwriting any existing binding. See rebind(Name, Object) for details.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered

unbind

public void unbind(Name name)
            throws NamingException
Unbinds the named object. Removes the terminal atomic name in name from the target context--that named by all but the terminal atomic part of name.

This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist.

Any attributes associated with the name are removed. Intermediate contexts are not changed.

Parameters:
name - the name to unbind; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NamingException - if a naming exception is encountered
See Also:
unbind(String)

unbind

public void unbind(String name)
            throws NamingException
Unbinds the named object. See unbind(Name) for details.
Parameters:
name - the name to unbind; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NamingException - if a naming exception is encountered

rename

public void rename(Name oldName,
                   Name newName)
            throws NamingException
Binds a new name to the object bound to an old name, and unbinds the old name. Both names are relative to this context. Any attributes associated with the old name become associated with the new name. Intermediate contexts of the old name are not changed.
Parameters:
oldName - the name of the existing binding; may not be empty
newName - the name of the new binding; may not be empty
Throws:
NameAlreadyBoundException - if newName is already bound
NamingException - if a naming exception is encountered
See Also:
rename(String, String),
bind(Name, Object),
rebind(Name, Object)

rename

public void rename(String oldName,
                   String newName)
            throws NamingException
Binds a new name to the object bound to an old name, and unbinds the old name. See rename(Name, Name) for details.
Parameters:
oldName - the name of the existing binding; may not be empty
newName - the name of the new binding; may not be empty
Throws:
NameAlreadyBoundException - if newName is already bound
NamingException - if a naming exception is encountered

list

public NamingEnumeration list(Name name)
                       throws NamingException
Enumerates the names bound in the named context, along with the class names of objects bound to them. The contents of any subcontexts are not included.

If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.

Parameters:
name - the name of the context to list
Returns:
an enumeration of the names and class names of the bindings in this context. Each element of the enumeration is of type NameClassPair.
Throws:
NamingException - if a naming exception is encountered
See Also:
list(String), listBindings(Name), NameClassPair

list

public NamingEnumeration list(String name)
                       throws NamingException
Enumerates the names bound in the named context, along with the class names of objects bound to them. See list(Name) for details.
Parameters:
name - the name of the context to list
Returns:
an enumeration of the names and class names of the bindings in this context. Each element of the enumeration is of type NameClassPair.
Throws:
NamingException - if a naming exception is encountered

listBindings

public NamingEnumeration listBindings(Name name)
                               throws NamingException
Enumerates the names bound in the named context, along with the objects bound to them. The contents of any subcontexts are not included.

If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.

Parameters:
name - the name of the context to list
Returns:
an enumeration of the bindings in this context. Each element of the enumeration is of type Binding.
Throws:
NamingException - if a naming exception is encountered
See Also:
listBindings(String), list(Name), Binding

listBindings

public NamingEnumeration listBindings(String name)
                               throws NamingException
Enumerates the names bound in the named context, along with the objects bound to them. See listBindings(Name) for details.
Parameters:
name - the name of the context to list
Returns:
an enumeration of the bindings in this context. Each element of the enumeration is of type Binding.
Throws:
NamingException - if a naming exception is encountered

destroySubcontext

public void destroySubcontext(Name name)
                       throws NamingException
Destroys the named context and removes it from the namespace. Any attributes associated with the name are also removed. Intermediate contexts are not destroyed.

This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist.

In a federated naming system, a context from one naming system may be bound to a name in another. One can subsequently look up and perform operations on the foreign context using a composite name. However, an attempt destroy the context using this composite name will fail with NotContextException, because the foreign context is not a "subcontext" of the context in which it is bound. Instead, use unbind() to remove the binding of the foreign context. Destroying the foreign context requires that the destroySubcontext() be performed on a context from the foreign context's "native" naming system.

Parameters:
name - the name of the context to be destroyed; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NotContextException - if the name is bound but does not name a context, or does not name a context of the appropriate type
ContextNotEmptyException - if the named context is not empty
NamingException - if a naming exception is encountered
See Also:
destroySubcontext(String)

destroySubcontext

public void destroySubcontext(String name)
                       throws NamingException
Destroys the named context and removes it from the namespace. See destroySubcontext(Name) for details.
Parameters:
name - the name of the context to be destroyed; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NotContextException - if the name is bound but does not name a context, or does not name a context of the appropriate type
ContextNotEmptyException - if the named context is not empty
NamingException - if a naming exception is encountered

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException
Creates and binds a new context. Creates a new context with the given name and binds it in the target context (that named by all but terminal atomic component of the name). All intermediate contexts and the target context must already exist.
Parameters:
name - the name of the context to create; may not be empty
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if creation of the subcontext requires specification of mandatory attributes
NamingException - if a naming exception is encountered
See Also:
createSubcontext(String), DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)

createSubcontext

public Context createSubcontext(String name)
                         throws NamingException
Creates and binds a new context. See createSubcontext(Name) for details.
Parameters:
name - the name of the context to create; may not be empty
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if creation of the subcontext requires specification of mandatory attributes
NamingException - if a naming exception is encountered

lookupLink

public Object lookupLink(Name name)
                  throws NamingException
Retrieves the named object, following links except for the terminal atomic component of the name. If the object bound to name is not a link, returns the object itself.
Parameters:
name - the name of the object to look up
Returns:
the object bound to name, not following the terminal link (if any).
Throws:
NamingException - if a naming exception is encountered
See Also:
lookupLink(String)

lookupLink

public Object lookupLink(String name)
                  throws NamingException
Retrieves the named object, following links except for the terminal atomic component of the name. See lookupLink(Name) for details.
Parameters:
name - the name of the object to look up
Returns:
the object bound to name, not following the terminal link (if any)
Throws:
NamingException - if a naming exception is encountered

getNameParser

public NameParser getNameParser(Name name)
                         throws NamingException
Retrieves the parser associated with the named context. In a federation of namespaces, different naming systems will parse names differently. This method allows an application to get a parser for parsing names into their atomic components using the naming convention of a particular naming system. Within any single naming system, NameParser objects returned by this method must be equal (using the equals() test).
Parameters:
name - the name of the context from which to get the parser
Returns:
a name parser that can parse compound names into their atomic components
Throws:
NamingException - if a naming exception is encountered
See Also:
getNameParser(String), CompoundName

getNameParser

public NameParser getNameParser(String name)
                         throws NamingException
Retrieves the parser associated with the named context. See getNameParser(Name) for details.
Parameters:
name - the name of the context from which to get the parser
Returns:
a name parser that can parse compound names into their atomic components
Throws:
NamingException - if a naming exception is encountered

composeName

public Name composeName(Name name,
                        Name prefix)
                 throws NamingException
Composes the name of this context with a name relative to this context. Given a name (name) relative to this context, and the name (prefix) of this context relative to one of its ancestors, this method returns the composition of the two names using the syntax appropriate for the naming system(s) involved. That is, if name names an object relative to this context, the result is the name of the same object, but relative to the ancestor context. None of the names may be null.

For example, if this context is named "wiz.com" relative to the initial context, then

    composeName("east", "wiz.com")
might return "east.wiz.com". If instead this context is named "org/research", then
    composeName("user/jane", "org/research")
might return "org/research/user/jane" while
    composeName("user/jane", "research")
returns "research/user/jane".
Parameters:
name - a name relative to this context
prefix - the name of this context relative to one of its ancestors
Returns:
the composition of prefix and name
Throws:
NamingException - if a naming exception is encountered
See Also:
composeName(String, String)

composeName

public String composeName(String name,
                          String prefix)
                   throws NamingException
Composes the name of this context with a name relative to this context. See composeName(Name, Name) for details.
Parameters:
name - a name relative to this context
prefix - the name of this context relative to one of its ancestors
Returns:
the composition of prefix and name
Throws:
NamingException - if a naming exception is encountered

addToEnvironment

public Object addToEnvironment(String propName,
                               Object propVal)
                        throws NamingException
Adds a new environment property to the environment of this context. If the property already exists, its value is overwritten. See class description for more details on environment properties.
Parameters:
propName - the name of the environment property to add; may not be null
propVal - the value of the property to add; may not be null
Returns:
the previous value of the property, or null if the property was not in the environment before
Throws:
NamingException - if a naming exception is encountered
See Also:
getEnvironment(), removeFromEnvironment(String)

removeFromEnvironment

public Object removeFromEnvironment(String propName)
                             throws NamingException
Removes an environment property from the environment of this context. See class description for more details on environment properties.
Parameters:
propName - the name of the environment property to remove; may not be null
Returns:
the previous value of the property, or null if the property was not in the environment
Throws:
NamingException - if a naming exception is encountered
See Also:
getEnvironment(), addToEnvironment(String, Object)

getEnvironment

public Hashtable getEnvironment()
                         throws NamingException
Retrieves the environment in effect for this context. See class description for more details on environment properties.

The caller should not make any changes to the object returned: their effect on the context is undefined. The environment of this context may be changed using addToEnvironment() and removeFromEnvironment().

Returns:
the environment of this context; never null
Throws:
NamingException - if a naming exception is encountered
See Also:
addToEnvironment(String, Object), removeFromEnvironment(String)

close

public void close()
           throws NamingException
Closes this context. This method releases this context's resources immediately, instead of waiting for them to be released automatically by the garbage collector.

This method is idempotent: invoking it on a context that has already been closed has no effect. Invoking any other method on a closed context is not allowed, and results in undefined behaviour.

Throws:
NamingException - if a naming exception is encountered

getNameInNamespace

public String getNameInNamespace()
                          throws NamingException
Retrieves the full name of this context within its own namespace.

Many naming services have a notion of a "full name" for objects in their respective namespaces. For example, an LDAP entry has a distinguished name, and a DNS record has a fully qualified name. This method allows the client application to retrieve this name. The string returned by this method is not a JNDI composite name and should not be passed directly to context methods. In naming systems for which the notion of full name does not make sense, OperationNotSupportedException is thrown.

Returns:
this context's name in its own namespace; never null
Throws:
OperationNotSupportedException - if the naming system does not have the notion of a full name
NamingException - if a naming exception is encountered
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ContextNotEmptyException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class ContextNotEmptyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.ContextNotEmptyException
All Implemented Interfaces:
Serializable
public class ContextNotEmptyException
extends NamingException

This exception is thrown when attempting to destroy a context that is not empty.

If the program wants to handle this exception in particular, it should catch ContextNotEmptyException explicitly before attempting to catch NamingException. For example, after catching ContextNotEmptyException, the program might try to remove the contents of the context before reattempting the destroy.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context.destroySubcontext(javax.naming.Name), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
ContextNotEmptyException()
Constructs a new instance of ContextNotEmptyException with all name resolution fields and explanation initialized to null.
ContextNotEmptyException(String explanation)
Constructs a new instance of ContextNotEmptyException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ContextNotEmptyException

public ContextNotEmptyException(String explanation)
Constructs a new instance of ContextNotEmptyException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

ContextNotEmptyException

public ContextNotEmptyException()
Constructs a new instance of ContextNotEmptyException with all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.naming.directory Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.naming.directory

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.naming.directory.BasicAttribute (implements javax.naming.directory.Attribute)
    • class javax.naming.directory.BasicAttributes (implements javax.naming.directory.Attributes)
    • class javax.naming.InitialContext (implements javax.naming.Context)
      • class javax.naming.directory.InitialDirContext (implements javax.naming.directory.DirContext)
    • class javax.naming.directory.ModificationItem (implements java.io.Serializable)
    • class javax.naming.NameClassPair (implements java.io.Serializable)
      • class javax.naming.Binding
        • class javax.naming.directory.SearchResult
    • class javax.naming.directory.SearchControls (implements java.io.Serializable)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.naming.NamingException
          • class javax.naming.directory.AttributeInUseException
          • class javax.naming.directory.AttributeModificationException
          • class javax.naming.directory.InvalidAttributeIdentifierException
          • class javax.naming.directory.InvalidAttributesException
          • class javax.naming.directory.InvalidAttributeValueException
          • class javax.naming.directory.InvalidSearchControlsException
          • class javax.naming.directory.InvalidSearchFilterException
          • class javax.naming.directory.NoSuchAttributeException
          • class javax.naming.directory.SchemaViolationException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface javax.naming.directory.Attribute (also extends java.io.Serializable)
    • interface javax.naming.directory.Attributes (also extends java.io.Serializable)
  • interface javax.naming.Context
    • interface javax.naming.directory.DirContext
  • interface java.io.Serializable
    • interface javax.naming.directory.Attribute (also extends java.lang.Cloneable)
    • interface javax.naming.directory.Attributes (also extends java.lang.Cloneable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.naming.directory

Extends the javax.naming package to provide functionality for accessing directory services.

See:
Description

Interface Summary
Attribute | This interface represents an attribute associated with a named object.
Attributes | This interface represents a collection of attributes.
DirContext | The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.

Class Summary
BasicAttribute | This class provides a basic implementation of the Attribute interface.
BasicAttributes | This class provides a basic implementation of the Attributes interface.
InitialDirContext | This class is the starting context for performing directory operations.
ModificationItem | This class represents a modification item.
SearchControls | This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
SearchResult | This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

Exception Summary
AttributeInUseException | This exception is thrown when an operation attempts to add an attribute that already exists.
AttributeModificationException | This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
InvalidAttributeIdentifierException | This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
InvalidAttributesException | This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
InvalidAttributeValueException | This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
InvalidSearchControlsException | This exception is thrown when the specification of the SearchControls for a search operation is invalid.
InvalidSearchFilterException | This exception is thrown when the specification of a search filter is invalid.
NoSuchAttributeException | This exception is thrown when attempting to access an attribute that does not exist.
SchemaViolationException | This exception is thrown when a method in some ways violates the schema.

Package javax.naming.directory Description

Extends the javax.naming package to provide functionality for accessing directory services.

This package defines the directory operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

This package allows applications to retrieve and update attributes associated with objects stored in a directory, and to search for objects using specified attributes.

The Directory Context

The DirContext interface represents a directory context. It defines methods for examining and updating attributes associated with a directory object, or directory entry as it is sometimes called.

You use getAttributes() to retrieve the attributes associated with a directory object (for which you supply the name). Attributes are modified using modifyAttributes(). You can add, replace, or remove attributes and/or attribute values using this operation.

DirContext also behaves as a naming context by extending the Context interface in the javax.naming package. This means that any directory object can also provide a naming context. For example, the directory object for a person might contain the attributes of that person, and at the same time provide a context for naming objects relative to that person such as his printers and home directory.

Searches

DirContext contains methods for performing content-based searching of the directory. In the simplest and most common form of usage, the application specifies a set of attributes--possibly with specific values--to match, and submits this attribute set, to the search() method. There are other overloaded forms of search() that support more sophisticated search filters.

Package Specification

The following documents can be found at the Java technology web site:
  • JNDI API Document (Postscript)
  • JNDI API Document (PDF)

Related Documentation

For a tutorial, examples, and overview, please see:
  • The JNDI Tutorial
  • Examples
  • Executive Summary (Postscript)
  • Executive Summary (PDF)

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.naming.directory

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.naming.directory

Packages that use javax.naming.directory
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Classes in javax.naming.directory used by javax.naming.directory
Attribute
This interface represents an attribute associated with a named object.
Attributes
This interface represents a collection of attributes.
DirContext
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
ModificationItem
This class represents a modification item.
SearchControls
This class encapsulates factors that determine scope of search and what gets returned as a result of the search.

Classes in javax.naming.directory used by javax.naming.event
DirContext
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
SearchControls
This class encapsulates factors that determine scope of search and what gets returned as a result of the search.

Classes in javax.naming.directory used by javax.naming.ldap
DirContext
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
InitialDirContext
This class is the starting context for performing directory operations.

Classes in javax.naming.directory used by javax.naming.spi
Attributes
This interface represents a collection of attributes.
DirContext
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Attribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Interface Attribute

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
BasicAttribute
public interface Attribute
extends Cloneable, Serializable

This interface represents an attribute associated with a named object.

In a directory, named objects can have associated with them attributes. The Attribute interface represents an attribute associated with a named object. An attribute contains 0 or more, possibly null, values. The attribute values can be ordered or unordered (see isOrdered()). If the values are unordered, no duplicates are allowed. If the values are ordered, duplicates are allowed.

The content and representation of an attribute and its values is defined by the attribute's schema. The schema contains information about the attribute's syntax and other properties about the attribute. See getAttributeDefinition() and getAttributeSyntaxDefinition() for details regarding how to get schema information about an attribute if the underlying directory service supports schemas.

Equality of two attributes is determined by the implementation class. A simple implementation can use Object.equals() to determine equality of attribute values, while a more sophisticated implementation might make use of schema information to determine equality. Similarly, one implementation might provide a static storage structure which simply returns the values passed to its constructor, while another implementation might define get() and getAll(). to get the values dynamically from the directory.

Note that updates to Attribute (such as adding or removing a value) do not affect the corresponding representation of the attribute in the directory. Updates to the directory can only be effected using operations in the DirContext interface.

Since:
1.3
See Also:
BasicAttribute

Field Summary
static long serialVersionUID
Use serialVersionUID from JNDI 1.1.1 for interoperability.
Method Summary
void | add(int ix, Object attrVal) Adds an attribute value to the ordered list of attribute values.
boolean | add(Object attrVal) Adds a new value to the attribute.
void | clear() Removes all values from this attribute.
Object | clone() Makes a copy of the attribute.
boolean | contains(Object attrVal) Determines whether a value is in the attribute.
Object | get() Retrieves one of this attribute's values.
Object | get(int ix) Retrieves the attribute value from the ordered list of attribute values.
NamingEnumeration | getAll() Retrieves an enumeration of the attribute's values.
DirContext | getAttributeDefinition() Retrieves the attribute's schema definition.
DirContext | getAttributeSyntaxDefinition() Retrieves the syntax definition associated with the attribute.
String | getID() Retrieves the id of this attribute.
boolean | isOrdered() Determines whether this attribute's values are ordered.
Object | remove(int ix) Removes an attribute value from the ordered list of attribute values.
boolean | remove(Object attrval) Removes a specified value from the attribute.
Object | set(int ix, Object attrVal) Sets an attribute value in the ordered list of attribute values.
int | size() Retrieves the number of values in this attribute.

Field Detail

serialVersionUID

public static final long serialVersionUID
Use serialVersionUID from JNDI 1.1.1 for interoperability.
Method Detail

getAll

public NamingEnumeration getAll()
                         throws NamingException
Retrieves an enumeration of the attribute's values. The behaviour of this enumeration is unspecified if the attribute's values are added, changed, or removed while the enumeration is in progress. If the attribute values are ordered, the enumeration's items will be ordered.
Returns:
A non-null enumeration of the attribute's values. Each element of the enumeration is a possibly null Object. The object's class is the class of the attribute value. The element is null if the attribute's value is null. If the attribute has zero values, an empty enumeration is returned.
Throws:
NamingException - If a naming exception was encountered while retrieving the values.
See Also:
isOrdered()

get

public Object get()
           throws NamingException
Retrieves one of this attribute's values. If the attribute has more than one value and is unordered, any one of the values is returned. If the attribute has more than one value and is ordered, the first value is returned.
Returns:
A possibly null object representing one of the attribute's value. It is null if the attribute's value is null.
Throws:
NamingException - If a naming exception was encountered while retrieving the value.
NoSuchElementException - If this attribute has no values.

size

public int size()
Retrieves the number of values in this attribute.
Returns:
The nonnegative number of values in this attribute.

getID

public String getID()
Retrieves the id of this attribute.
Returns:
The id of this attribute. It cannot be null.

contains

public boolean contains(Object attrVal)
Determines whether a value is in the attribute. Equality is determined by the implementation, which may use Object.equals() or schema information to determine equality.
Parameters:
attrVal - The possibly null value to check. If null, check whether the attribute has an attribute value whose value is null.
Returns:
true if attrVal is one of this attribute's values; false otherwise.
See Also:
Object.equals(java.lang.Object), BasicAttribute.equals(java.lang.Object)

add

public boolean add(Object attrVal)
Adds a new value to the attribute. If the attribute values are unordered and attrVal is already in the attribute, this method does nothing. If the attribute values are ordered, attrVal is added to the end of the list of attribute values.

Equality is determined by the implementation, which may use Object.equals() or schema information to determine equality.

Parameters:
attrVal - The new possibly null value to add. If null, null is added as an attribute value.
Returns:
true if a value was added; false otherwise.

remove

public boolean remove(Object attrval)
Removes a specified value from the attribute. If attrval is not in the attribute, this method does nothing. If the attribute values are ordered, the first occurrence of attrVal is removed and attribute values at indices greater than the removed value are shifted up towards the head of the list (and their indices decremented by one).

Equality is determined by the implementation, which may use Object.equals() or schema information to determine equality.

Parameters:
attrval - The possibly null value to remove from this attribute. If null, remove the attribute value that is null.
Returns:
true if the value was removed; false otherwise.

clear

public void clear()
Removes all values from this attribute.

getAttributeSyntaxDefinition

public DirContext getAttributeSyntaxDefinition()
                                        throws NamingException
Retrieves the syntax definition associated with the attribute. An attribute's syntax definition specifies the format of the attribute's value(s). Note that this is different from the attribute value's representation as a Java object. Syntax definition refers to the directory's notion of syntax.

For example, even though a value might be a Java String object, its directory syntax might be "Printable String" or "Telephone Number". Or a value might be a byte array, and its directory syntax is "JPEG" or "Certificate". For example, if this attribute's syntax is "JPEG", this method would return the syntax definition for "JPEG".

The information that you can retrieve from a syntax definition is directory-dependent.

If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information.

Returns:
The attribute's syntax definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.
Throws:
OperationNotSupportedException - If getting the schema is not supported.
NamingException - If a naming exception occurs while getting the schema.

getAttributeDefinition

public DirContext getAttributeDefinition()
                                  throws NamingException
Retrieves the attribute's schema definition. An attribute's schema definition contains information such as whether the attribute is multivalued or single-valued, the matching rules to use when comparing the attribute's values. The information that you can retrieve from an attribute definition is directory-dependent.

If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information.

Returns:
This attribute's schema definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.
Throws:
OperationNotSupportedException - If getting the schema is not supported.
NamingException - If a naming exception occurs while getting the schema.

clone

public Object clone()
Makes a copy of the attribute. The copy contains the same attribute values as the original attribute: the attribute values are not themselves cloned. Changes to the copy will not affect the original and vice versa.
Overrides:
clone in class Object
Returns:
A non-null copy of the attribute.

isOrdered

public boolean isOrdered()
Determines whether this attribute's values are ordered. If an attribute's values are ordered, duplicate values are allowed. If an attribute's values are unordered, they are presented in any order and there are no duplicate values.
Returns:
true if this attribute's values are ordered; false otherwise.
See Also:
get(int), remove(int), add(int, java.lang.Object), set(int, java.lang.Object)

get

public Object get(int ix)
           throws NamingException
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.
Parameters:
ix - The index of the value in the ordered list of attribute values. 0 <= ix <size().
Returns:
The possibly null attribute value at index ix; null if the attribute value is null.
Throws:
NamingException - If a naming exception was encountered while retrieving the value.
IndexOutOfBoundsException - If ix is outside the specified range.

remove

public Object remove(int ix)
Removes an attribute value from the ordered list of attribute values. This method removes the value at the ix index of the list of attribute values. If the attribute values are unordered, this method removes the value that happens to be at that index. Values located at indices greater than ix are shifted up towards the front of the list (and their indices decremented by one).
Parameters:
ix - The index of the value to remove. 0 <= ix <size().
Returns:
The possibly null attribute value at index ix that was removed; null if the attribute value is null.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.

add

public void add(int ix,
                Object attrVal)
Adds an attribute value to the ordered list of attribute values. This method adds attrVal to the list of attribute values at index ix. Values located at indices at or greater than ix are shifted down towards the end of the list (and their indices incremented by one). If the attribute values are unordered and already have attrVal, IllegalStateException is thrown.
Parameters:
ix - The index in the ordered list of attribute values to add the new value. 0 <= ix <= size().
attrVal - The possibly null attribute value to add; if null, null is the value added.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If the attribute values are unordered and attrVal is one of those values.

set

public Object set(int ix,
                  Object attrVal)
Sets an attribute value in the ordered list of attribute values. This method sets the value at the ix index of the list of attribute values to be attrVal. The old value is removed. If the attribute values are unordered, this method sets the value that happens to be at that index to attrVal, unless attrVal is already one of the values. In that case, IllegalStateException is thrown.
Parameters:
ix - The index of the value in the ordered list of attribute values. 0 <= ix <size().
attrVal - The possibly null attribute value to use. If null, 'null' replaces the old value.
Returns:
The possibly null attribute value at index ix that was replaced. Null if the attribute value was null.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If attrVal already exists and the attribute values are unordered.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AttributeInUseException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class AttributeInUseException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.AttributeInUseException
All Implemented Interfaces:
Serializable
public class AttributeInUseException
extends NamingException

This exception is thrown when an operation attempts to add an attribute that already exists.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
AttributeInUseException()
Constructs a new instance of AttributeInUseException.
AttributeInUseException(String explanation)
Constructs a new instance of AttributeInUseException with an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AttributeInUseException

public AttributeInUseException(String explanation)
Constructs a new instance of AttributeInUseException with an explanation. All other fields are set to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

AttributeInUseException

public AttributeInUseException()
Constructs a new instance of AttributeInUseException. All fields are initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AttributeModificationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class AttributeModificationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.AttributeModificationException
All Implemented Interfaces:
Serializable
public class AttributeModificationException
extends NamingException

This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state. It is thrown in response to DirContext.modifyAttributes(). It contains a list of modifications that have not been performed, in the order that they were supplied to modifyAttributes(). If the list is null, none of the modifications were performed successfully.

An AttributeModificationException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single AttributeModification instance should lock the object.

Since:
1.3
See Also:
DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
AttributeModificationException()
Constructs a new instance of AttributeModificationException.
AttributeModificationException(String explanation)
Constructs a new instance of AttributeModificationException using an explanation.
Method Summary
ModificationItem[] | getUnexecutedModifications() Retrieves the unexecuted modification list.
void | setUnexecutedModifications(ModificationItem[] e) Sets the unexecuted modification list to be e.
String | toString() The string representation of this exception consists of information about where the error occurred, and the first unexecuted modification.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AttributeModificationException

public AttributeModificationException(String explanation)
Constructs a new instance of AttributeModificationException using an explanation. All other fields are set to null.
Parameters:
explanation - Possibly null additional detail about this exception. If null, this exception has no detail message.
See Also:
Throwable.getMessage()

AttributeModificationException

public AttributeModificationException()
Constructs a new instance of AttributeModificationException. All fields are set to null.
Method Detail

setUnexecutedModifications

public void setUnexecutedModifications(ModificationItem[] e)
Sets the unexecuted modification list to be e. Items in the list must appear in the same order in which they were originally supplied in DirContext.modifyAttributes(). The first item in the list is the first one that was not executed. If this list is null, none of the operations originally submitted to modifyAttributes() were executed.
Parameters:
e - The possibly null list of unexecuted modifications.
See Also:
getUnexecutedModifications()

getUnexecutedModifications

public ModificationItem[] getUnexecutedModifications()
Retrieves the unexecuted modification list. Items in the list appear in the same order in which they were originally supplied in DirContext.modifyAttributes(). The first item in the list is the first one that was not executed. If this list is null, none of the operations originally submitted to modifyAttributes() were executed.
Returns:
The possibly null unexecuted modification list.
See Also:
setUnexecutedModifications(javax.naming.directory.ModificationItem[])

toString

public String toString()
The string representation of this exception consists of information about where the error occurred, and the first unexecuted modification. This string is meant for debugging and not mean to be interpreted programmatically.
Overrides:
toString in class NamingException
Returns:
The non-null string representation of this exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Attributes

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Interface Attributes

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
BasicAttributes
public interface Attributes
extends Cloneable, Serializable

This interface represents a collection of attributes.

In a directory, named objects can have associated with them attributes. The Attributes interface represents a collection of attributes. For example, you can request from the directory the attributes associated with an object. Those attributes are returned in an object that implements the Attributes interface.

Attributes in an object that implements the Attributes interface are unordered. The object can have zero or more attributes. Attributes is either case-sensitive or case-insensitive (case-ignore). This property is determined at the time the Attributes object is created. (see BasicAttributes constructor for example). In a case-insensitive Attributes, the case of its attribute identifiers is ignored when searching for an attribute, or adding attributes. In a case-sensitive Attributes, the case is significant.

Note that updates to Attributes (such as adding or removing an attribute) do not affect the corresponding representation in the directory. Updates to the directory can only be effected using operations in the DirContext interface.

Since:
1.3
See Also:
DirContext.getAttributes(javax.naming.Name),
DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes),
DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes),
DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]),
BasicAttributes

Method Summary
Object | clone() Makes a copy of the attribute set.
Attribute | get(String attrID) Retrieves the attribute with the given attribute id from the attribute set.
NamingEnumeration | getAll() Retrieves an enumeration of the attributes in the attribute set.
NamingEnumeration | getIDs() Retrieves an enumeration of the ids of the attributes in the attribute set.
boolean | isCaseIgnored() Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.
Attribute | put(Attribute attr) Adds a new attribute to the attribute set.
Attribute | put(String attrID, Object val) Adds a new attribute to the attribute set.
Attribute | remove(String attrID) Removes the attribute with the attribute id 'attrID' from the attribute set.
int | size() Retrieves the number of attributes in the attribute set.

Method Detail

isCaseIgnored

public boolean isCaseIgnored()
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.
Returns:
true if case is ignored; false otherwise.

size

public int size()
Retrieves the number of attributes in the attribute set.
Returns:
The nonnegative number of attributes in this attribute set.

get

public Attribute get(String attrID)
Retrieves the attribute with the given attribute id from the attribute set.
Parameters:
attrID - The non-null id of the attribute to retrieve. If this attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
Returns:
The attribute identified by attrID; null if not found.
See Also:
put(java.lang.String, java.lang.Object), remove(java.lang.String)

getAll

public NamingEnumeration getAll()
Retrieves an enumeration of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined.
Returns:
A non-null enumeration of the attributes in this attribute set. Each element of the enumeration is of class Attribute. If attribute set has zero attributes, an empty enumeration is returned.

getIDs

public NamingEnumeration getIDs()
Retrieves an enumeration of the ids of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined.
Returns:
A non-null enumeration of the attributes' ids in this attribute set. Each element of the enumeration is of class String. If attribute set has zero attributes, an empty enumeration is returned.

put

public Attribute put(String attrID,
                     Object val)
Adds a new attribute to the attribute set.
Parameters:
attrID - non-null The id of the attribute to add. If the attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
val - The possibly null value of the attribute to add. If null, the attribute does not have any values.
Returns:
The Attribute with attrID that was previous in this attribute set; null if no such attribute existed.
See Also:
remove(java.lang.String)

put

public Attribute put(Attribute attr)
Adds a new attribute to the attribute set.
Parameters:
attr - The non-null attribute to add. If the attribute set ignores the character case of its attribute ids, the case of attr's identifier is ignored.
Returns:
The Attribute with the same ID as attr that was previous in this attribute set; null if no such attribute existed.
See Also:
remove(java.lang.String)

remove

public Attribute remove(String attrID)
Removes the attribute with the attribute id 'attrID' from the attribute set. If the attribute does not exist, ignore.
Parameters:
attrID - The non-null id of the attribute to remove. If the attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
Returns:
The Attribute with the same ID as attrID that was previous in the attribute set; null if no such attribute existed.

clone

public Object clone()
Makes a copy of the attribute set. The new set contains the same attributes as the original set: the attributes are not themselves cloned. Changes to the copy will not affect the original and vice versa.
Overrides:
clone in class Object
Returns:
A non-null copy of this attribute set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class BasicAttribute

java.lang.Object
  |
  +--javax.naming.directory.BasicAttribute
All Implemented Interfaces:
Attribute, Cloneable, Serializable
public class BasicAttribute
extends Object
implements Attribute

This class provides a basic implementation of the Attribute interface.

This implementation does not support the schema methods getAttributeDefinition() and getAttributeSyntaxDefinition(). They simply throw OperationNotSupportedException. Subclasses of BasicAttribute should override these methods if they support them.

The BasicAttribute class by default uses Object.equals() to determine equality of attribute values when testing for equality or when searching for values, except when the value is an array. For an array, each element of the array is checked using Object.equals(). Subclasses of BasicAttribute can make use of schema information when doing similar equality checks by overriding methods in which such use of schema is meaningful. Similarly, the BasicAttribute class by default returns the values passed to its constructor and/or manipulated using the add/remove methods. Subclasses of BasicAttribute can override get() and getAll() to get the values dynamically from the directory (or implement the Attribute interface directly instead of subclassing BasicAttribute).

Note that updates to BasicAttribute (such as adding or removing a value) does not affect the corresponding representation of the attribute in the directory. Updates to the directory can only be effected using operations in the DirContext interface.

A BasicAttribute instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a BasicAttribute should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected String | attrID Holds the attribute's id.
protected boolean | ordered A flag for recording whether this attribute's values are ordered.
protected Vector | values Holds the attribute's values.
Fields inherited from interface javax.naming.directory.Attribute
serialVersionUID
Constructor Summary
BasicAttribute(String id)
Constructs a new instance of an unordered attribute with no value.
BasicAttribute(String id, boolean ordered)
Constructs a new instance of a possibly ordered attribute with no value.
BasicAttribute(String id, Object value)
Constructs a new instance of an unordered attribute with a single value.
BasicAttribute(String id, Object value, boolean ordered)
Constructs a new instance of a possibly ordered attribute with a single value.
Method Summary
void | add(int ix, Object attrVal) Adds an attribute value to the ordered list of attribute values.
boolean | add(Object attrVal) Adds a new value to this attribute.
void | clear() Removes all values from this attribute.
Object | clone() Makes a copy of the attribute.
boolean | contains(Object attrVal) Determines whether a value is in this attribute.
boolean | equals(Object obj) Determines whether obj is equal to this attribute.
Object | get() Retrieves one of this attribute's values.
Object | get(int ix) Retrieves the attribute value from the ordered list of attribute values.
NamingEnumeration | getAll() Retrieves an enumeration of this attribute's values.
DirContext | getAttributeDefinition() Retrieves this attribute's schema definition.
DirContext | getAttributeSyntaxDefinition() Retrieves the syntax definition associated with this attribute.
String | getID() Retrieves the id of this attribute.
int | hashCode() Calculates the hash code of this attribute.
boolean | isOrdered() Determines whether this attribute's values are ordered.
Object | remove(int ix) Removes an attribute value from the ordered list of attribute values.
boolean | remove(Object attrval) Removes a specified value from this attribute.
Object | set(int ix, Object attrVal) Sets an attribute value in the ordered list of attribute values.
int | size() Retrieves the number of values in this attribute.
String | toString() Generates the string representation of this attribute.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

attrID

protected String attrID
Holds the attribute's id. It is initialized by the public constructor and cannot be null unless methods in BasicAttribute that use attrID have been overridden.

values

protected transient Vector values
Holds the attribute's values. Initialized by public constructors. Cannot be null unless methods in BasicAttribute that use values have been overridden.

ordered

protected boolean ordered
A flag for recording whether this attribute's values are ordered.
Constructor Detail

BasicAttribute

public BasicAttribute(String id)
Constructs a new instance of an unordered attribute with no value.
Parameters:
id - The attribute's id. It cannot be null.

BasicAttribute

public BasicAttribute(String id,
                      Object value)
Constructs a new instance of an unordered attribute with a single value.
Parameters:
id - The attribute's id. It cannot be null.
value - The attribute's value. If null, a null value is added to the attribute.

BasicAttribute

public BasicAttribute(String id,
                      boolean ordered)
Constructs a new instance of a possibly ordered attribute with no value.
Parameters:
id - The attribute's id. It cannot be null.
ordered - true means the attribute's values will be ordered; false otherwise.

BasicAttribute

public BasicAttribute(String id,
                      Object value,
                      boolean ordered)
Constructs a new instance of a possibly ordered attribute with a single value.
Parameters:
id - The attribute's id. It cannot be null.
value - The attribute's value. If null, a null value is added to the attribute.
ordered - true means the attribute's values will be ordered; false otherwise.
Method Detail

clone

public Object clone()
Description copied from interface: Attribute
Makes a copy of the attribute. The copy contains the same attribute values as the original attribute: the attribute values are not themselves cloned. Changes to the copy will not affect the original and vice versa.
Specified by:
clone in interface Attribute
Overrides:
clone in class Object
Following copied from interface: javax.naming.directory.Attribute
Returns:
A non-null copy of the attribute.

equals

public boolean equals(Object obj)
Determines whether obj is equal to this attribute. Two attributes are equal if their attribute-ids, syntaxes and values are equal. If the attribute values are unordered, the order that the values were added are irrelevant. If the attribute values are ordered, then the order the values must match. If obj is null or not an Attribute, false is returned.

By default Object.equals() is used when comparing the attribute id and its values except when a value is an array. For an array, each element of the array is checked using Object.equals(). A subclass may override this to make use of schema syntax information and matching rules, which define what it means for two attributes to be equal. How and whether a subclass makes use of the schema information is determined by the subclass. If a subclass overrides equals(), it should also override hashCode() such that two attributes that are equal have the same hash code.

Overrides:
equals in class Object
Parameters:
obj - The possibly null object to check.
Returns:
true if obj is equal to this attribute; false otherwise.
See Also:
hashCode(), contains(java.lang.Object)

hashCode

public int hashCode()
Calculates the hash code of this attribute.

The hash code is computed by adding the hash code of the attribute's id and that of all of its values except for values that are arrays. For an array, the hash code of each element of the array is summed. If a subclass overrides hashCode(), it should override equals() as well so that two attributes that are equal have the same hash code.

Overrides:
hashCode in class Object
Returns:
an int representing the hash code of this attribute.
See Also:
equals(java.lang.Object)

toString

public String toString()
Generates the string representation of this attribute. The string consists of the attribute's id and its values. This string is meant for debugging and not meant to be interpreted programmatically.
Overrides:
toString in class Object
Returns:
The non-null string representation of this attribute.

getAll

public NamingEnumeration getAll()
                         throws NamingException
Retrieves an enumeration of this attribute's values.

By default, the values returned are those passed to the constructor and/or manipulated using the add/replace/remove methods. A subclass may override this to retrieve the values dynamically from the directory.

Specified by:
getAll in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
A non-null enumeration of the attribute's values. Each element of the enumeration is a possibly null Object. The object's class is the class of the attribute value. The element is null if the attribute's value is null. If the attribute has zero values, an empty enumeration is returned.
Throws:
NamingException - If a naming exception was encountered while retrieving the values.
See Also:
Attribute.isOrdered()

get

public Object get()
           throws NamingException
Retrieves one of this attribute's values.

By default, the value returned is one of those passed to the constructor and/or manipulated using the add/replace/remove methods. A subclass may override this to retrieve the value dynamically from the directory.

Specified by:
get in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
A possibly null object representing one of the attribute's value. It is null if the attribute's value is null.
Throws:
NamingException - If a naming exception was encountered while retrieving the value.
NoSuchElementException - If this attribute has no values.

size

public int size()
Description copied from interface: Attribute
Retrieves the number of values in this attribute.
Specified by:
size in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
The nonnegative number of values in this attribute.

getID

public String getID()
Description copied from interface: Attribute
Retrieves the id of this attribute.
Specified by:
getID in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
The id of this attribute. It cannot be null.

contains

public boolean contains(Object attrVal)
Determines whether a value is in this attribute.

By default, Object.equals() is used when comparing attrVal with this attribute's values except when attrVal is an array. For an array, each element of the array is checked using Object.equals(). A subclass may use schema information to determine equality.

Specified by:
contains in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
attrVal - The possibly null value to check. If null, check whether the attribute has an attribute value whose value is null.
Returns:
true if attrVal is one of this attribute's values; false otherwise.
See Also:
Object.equals(java.lang.Object), equals(java.lang.Object)

add

public boolean add(Object attrVal)
Adds a new value to this attribute.

By default, Object.equals() is used when comparing attrVal with this attribute's values except when attrVal is an array. For an array, each element of the array is checked using Object.equals(). A subclass may use schema information to determine equality.

Specified by:
add in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
attrVal - The new possibly null value to add. If null, null is added as an attribute value.
Returns:
true if a value was added; false otherwise.

remove

public boolean remove(Object attrval)
Removes a specified value from this attribute.

By default, Object.equals() is used when comparing attrVal with this attribute's values except when attrVal is an array. For an array, each element of the array is checked using Object.equals(). A subclass may use schema information to determine equality.

Specified by:
remove in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
attrval - The possibly null value to remove from this attribute. If null, remove the attribute value that is null.
Returns:
true if the value was removed; false otherwise.

clear

public void clear()
Description copied from interface: Attribute
Removes all values from this attribute.
Specified by:
clear in interface Attribute

isOrdered

public boolean isOrdered()
Description copied from interface: Attribute
Determines whether this attribute's values are ordered. If an attribute's values are ordered, duplicate values are allowed. If an attribute's values are unordered, they are presented in any order and there are no duplicate values.
Specified by:
isOrdered in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
true if this attribute's values are ordered; false otherwise.
See Also:
Attribute.get(int),
Attribute.remove(int),
Attribute.add(int, java.lang.Object),
Attribute.set(int, java.lang.Object)

get

public Object get(int ix)
           throws NamingException
Description copied from interface: Attribute
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.
Specified by:
get in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
ix - The index of the value in the ordered list of attribute values. 0 <= ix <size().
Returns:
The possibly null attribute value at index ix; null if the attribute value is null.
Throws:
NamingException - If a naming exception was encountered while retrieving the value.
IndexOutOfBoundsException - If ix is outside the specified range.

remove

public Object remove(int ix)
Description copied from interface: Attribute
Removes an attribute value from the ordered list of attribute values. This method removes the value at the ix index of the list of attribute values. If the attribute values are unordered, this method removes the value that happens to be at that index. Values located at indices greater than ix are shifted up towards the front of the list (and their indices decremented by one).
Specified by:
remove in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
ix - The index of the value to remove. 0 <= ix <size().
Returns:
The possibly null attribute value at index ix that was removed; null if the attribute value is null.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.

add

public void add(int ix,
                Object attrVal)
Description copied from interface: Attribute
Adds an attribute value to the ordered list of attribute values. This method adds attrVal to the list of attribute values at index ix. Values located at indices at or greater than ix are shifted down towards the end of the list (and their indices incremented by one). If the attribute values are unordered and already have attrVal, IllegalStateException is thrown.
Specified by:
add in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
ix - The index in the ordered list of attribute values to add the new value. 0 <= ix <= size().
attrVal - The possibly null attribute value to add; if null, null is the value added.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If the attribute values are unordered and attrVal is one of those values.

set

public Object set(int ix,
                  Object attrVal)
Description copied from interface: Attribute
Sets an attribute value in the ordered list of attribute values. This method sets the value at the ix index of the list of attribute values to be attrVal. The old value is removed. If the attribute values are unordered, this method sets the value that happens to be at that index to attrVal, unless attrVal is already one of the values. In that case, IllegalStateException is thrown.
Specified by:
set in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Parameters:
ix - The index of the value in the ordered list of attribute values. 0 <= ix <size().
attrVal - The possibly null attribute value to use. If null, 'null' replaces the old value.
Returns:
The possibly null attribute value at index ix that was replaced. Null if the attribute value was null.
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If attrVal already exists and the attribute values are unordered.

getAttributeSyntaxDefinition

public DirContext getAttributeSyntaxDefinition()
                                        throws NamingException
Retrieves the syntax definition associated with this attribute.

This method by default throws OperationNotSupportedException. A subclass should override this method if it supports schema.

Specified by:
getAttributeSyntaxDefinition in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
The attribute's syntax definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.
Throws:
OperationNotSupportedException - If getting the schema is not supported.
NamingException - If a naming exception occurs while getting the schema.

getAttributeDefinition

public DirContext getAttributeDefinition()
                                  throws NamingException
Retrieves this attribute's schema definition.

This method by default throws OperationNotSupportedException. A subclass should override this method if it supports schema.

Specified by:
getAttributeDefinition in interface Attribute
Following copied from interface: javax.naming.directory.Attribute
Returns:
This attribute's schema definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.
Throws:
OperationNotSupportedException - If getting the schema is not supported.
NamingException - If a naming exception occurs while getting the schema.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BasicAttributes

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class BasicAttributes

java.lang.Object
  |
  +--javax.naming.directory.BasicAttributes
All Implemented Interfaces:
Attributes, Cloneable, Serializable
public class BasicAttributes
extends Object
implements Attributes

This class provides a basic implementation of the Attributes interface.

BasicAttributes is either case-sensitive or case-insensitive (case-ignore). This property is determined at the time the BasicAttributes constructor is called. In a case-insensitive BasicAttributes, the case of its attribute identifiers is ignored when searching for an attribute, or adding attributes. In a case-sensitive BasicAttributes, the case is significant.

When the BasicAttributes class needs to create an Attribute, it uses BasicAttribute. There is no other dependency on BasicAttribute.

Note that updates to BasicAttributes (such as adding or removing an attribute) does not affect the corresponding representation in the directory. Updates to the directory can only be effected using operations in the DirContext interface.

A BasicAttributes instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single BasicAttributes instance should lock the object.

Since:
1.3
See Also:
DirContext.getAttributes(javax.naming.Name),
DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes),
DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes),
DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]), Serialized Form

Constructor Summary
BasicAttributes()
Constructs a new instance of Attributes.
BasicAttributes(boolean ignoreCase)
Constructs a new instance of Attributes.
BasicAttributes(String attrID, Object val)
Constructs a new instance of Attributes with one attribute.
BasicAttributes(String attrID, Object val, boolean ignoreCase)
Constructs a new instance of Attributes with one attribute.
Method Summary
Object | clone() Makes a copy of the attribute set.
boolean | equals(Object obj) Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes.
Attribute | get(String attrID) Retrieves the attribute with the given attribute id from the attribute set.
NamingEnumeration | getAll() Retrieves an enumeration of the attributes in the attribute set.
NamingEnumeration | getIDs() Retrieves an enumeration of the ids of the attributes in the attribute set.
int | hashCode() Calculates the hash code of this BasicAttributes.
boolean | isCaseIgnored() Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.
Attribute | put(Attribute attr) Adds a new attribute to the attribute set.
Attribute | put(String attrID, Object val) Adds a new attribute to the attribute set.
Attribute | remove(String attrID) Removes the attribute with the attribute id 'attrID' from the attribute set.
int | size() Retrieves the number of attributes in the attribute set.
String | toString() Generates the string representation of this attribute set.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BasicAttributes

public BasicAttributes()
Constructs a new instance of Attributes. The character case of attribute identifiers is significant when subsequently retrieving or adding attributes.

BasicAttributes

public BasicAttributes(boolean ignoreCase)
Constructs a new instance of Attributes. If ignoreCase is true, the character case of attribute identifiers is ignored; otherwise the case is significant.
Parameters:
ignoreCase - true means this attribute set will ignore the case of its attribute identifiers when retrieving or adding attributes; false means case is respected.

BasicAttributes

public BasicAttributes(String attrID,
                       Object val)
Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. The character case of attribute identifiers is significant when subsequently retrieving or adding attributes.
Parameters:
attrID - non-null The id of the attribute to add.
val - The value of the attribute to add. If null, a null value is added to the attribute.

BasicAttributes

public BasicAttributes(String attrID,
                       Object val,
                       boolean ignoreCase)
Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. If ignoreCase is true, the character case of attribute identifiers is ignored; otherwise the case is significant.
Parameters:
attrID - non-null The id of the attribute to add. If this attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
val - The value of the attribute to add. If null, a null value is added to the attribute.
ignoreCase - true means this attribute set will ignore the case of its attribute identifiers when retrieving or adding attributes; false means case is respected.
Method Detail

clone

public Object clone()
Description copied from interface: Attributes
Makes a copy of the attribute set. The new set contains the same attributes as the original set: the attributes are not themselves cloned. Changes to the copy will not affect the original and vice versa.
Specified by:
clone in interface Attributes
Overrides:
clone in class Object
Following copied from interface: javax.naming.directory.Attributes
Returns:
A non-null copy of this attribute set.

isCaseIgnored

public boolean isCaseIgnored()
Description copied from interface: Attributes
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.
Specified by:
isCaseIgnored in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Returns:
true if case is ignored; false otherwise.

size

public int size()
Description copied from interface: Attributes
Retrieves the number of attributes in the attribute set.
Specified by:
size in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Returns:
The nonnegative number of attributes in this attribute set.

get

public Attribute get(String attrID)
Description copied from interface: Attributes
Retrieves the attribute with the given attribute id from the attribute set.
Specified by:
get in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Parameters:
attrID - The non-null id of the attribute to retrieve. If this attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
Returns:
The attribute identified by attrID; null if not found.
See Also:
Attributes.put(java.lang.String, java.lang.Object), Attributes.remove(java.lang.String)

getAll

public NamingEnumeration getAll()
Description copied from interface: Attributes
Retrieves an enumeration of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined.
Specified by:
getAll in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Returns:
A non-null enumeration of the attributes in this attribute set. Each element of the enumeration is of class Attribute. If attribute set has zero attributes, an empty enumeration is returned.

getIDs

public NamingEnumeration getIDs()
Description copied from interface: Attributes
Retrieves an enumeration of the ids of the attributes in the attribute set. The effects of updates to this attribute set on this enumeration are undefined.
Specified by:
getIDs in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Returns:
A non-null enumeration of the attributes' ids in this attribute set. Each element of the enumeration is of class String. If attribute set has zero attributes, an empty enumeration is returned.

put

public Attribute put(String attrID,
                     Object val)
Description copied from interface: Attributes
Adds a new attribute to the attribute set.
Specified by:
put in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Parameters:
attrID - non-null The id of the attribute to add. If the attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
val - The possibly null value of the attribute to add. If null, the attribute does not have any values.
Returns:
The Attribute with attrID that was previous in this attribute set; null if no such attribute existed.
See Also:
Attributes.remove(java.lang.String)

put

public Attribute put(Attribute attr)
Description copied from interface: Attributes
Adds a new attribute to the attribute set.
Specified by:
put in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Parameters:
attr - The non-null attribute to add. If the attribute set ignores the character case of its attribute ids, the case of attr's identifier is ignored.
Returns:
The Attribute with the same ID as attr that was previous in this attribute set; null if no such attribute existed.
See Also:
Attributes.remove(java.lang.String)

remove

public Attribute remove(String attrID)
Description copied from interface: Attributes
Removes the attribute with the attribute id 'attrID' from the attribute set. If the attribute does not exist, ignore.
Specified by:
remove in interface Attributes
Following copied from interface: javax.naming.directory.Attributes
Parameters:
attrID - The non-null id of the attribute to remove. If the attribute set ignores the character case of its attribute ids, the case of attrID is ignored.
Returns:
The Attribute with the same ID as attrID that was previous in the attribute set; null if no such attribute existed.

toString

public String toString()
Generates the string representation of this attribute set. The string consists of each attribute identifier and the contents of each attribute. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
Overrides:
toString in class Object
Returns:
A non-null string listing the contents of this attribute set.

equals

public boolean equals(Object obj)
Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes. Each Attribute in this BasicAttributes is checked for equality using Object.equals(), which may have be overridden by implementations of Attribute). If a subclass overrides equals(), it should override hashCode() as well so that two Attributes instances that are equal have the same hash code.
Overrides:
equals in class Object
Parameters:
obj - the possibly null object to compare against.
Returns:
true If obj is equal to this BasicAttributes.
See Also:
hashCode()

hashCode

public int hashCode()
Calculates the hash code of this BasicAttributes.

The hash code is computed by adding the hash code of the attributes of this object. If this BasicAttributes ignores case of its attribute IDs, one is added to the hash code. If a subclass overrides hashCode(), it should override equals() as well so that two Attributes instances that are equal have the same hash code.

Overrides:
hashCode in class Object
Returns:
an int representing the hash code of this BasicAttributes instance.
See Also:
equals(java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.naming.directory.AttributeInUseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.AttributeInUseException

No usage of javax.naming.directory.AttributeInUseException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.AttributeModificationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.AttributeModificationException

No usage of javax.naming.directory.AttributeModificationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.BasicAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.BasicAttribute

No usage of javax.naming.directory.BasicAttribute

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.BasicAttributes

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.BasicAttributes

No usage of javax.naming.directory.BasicAttributes

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InvalidAttributeIdentifierException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InvalidAttributeIdentifierException

No usage of javax.naming.directory.InvalidAttributeIdentifierException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InvalidAttributesException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InvalidAttributesException

No usage of javax.naming.directory.InvalidAttributesException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InvalidAttributeValueException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InvalidAttributeValueException

No usage of javax.naming.directory.InvalidAttributeValueException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InvalidSearchControlsException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InvalidSearchControlsException

No usage of javax.naming.directory.InvalidSearchControlsException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InvalidSearchFilterException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InvalidSearchFilterException

No usage of javax.naming.directory.InvalidSearchFilterException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.NoSuchAttributeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.NoSuchAttributeException

No usage of javax.naming.directory.NoSuchAttributeException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.SchemaViolationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.SchemaViolationException

No usage of javax.naming.directory.SchemaViolationException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.SearchResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.SearchResult

No usage of javax.naming.directory.SearchResult

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.InitialDirContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.InitialDirContext

Packages that use InitialDirContext
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of InitialDirContext in javax.naming.ldap

Subclasses of InitialDirContext in javax.naming.ldap
 class InitialLdapContext
This class is the starting context for performing LDAPv3-style extended operations and controls.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.ModificationItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.ModificationItem

Packages that use ModificationItem
javax.naming.directory Extends the javax.naming package to provide functionality for accessing directory services.

Uses of ModificationItem in javax.naming.directory

Methods in javax.naming.directory that return ModificationItem
 ModificationItem[] AttributeModificationException.getUnexecutedModifications()
Retrieves the unexecuted modification list.

Methods in javax.naming.directory with parameters of type ModificationItem
void | DirContext.modifyAttributes(Name name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | DirContext.modifyAttributes(String name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | AttributeModificationException.setUnexecutedModifications(ModificationItem[] e) Sets the unexecuted modification list to be e.
void | InitialDirContext.modifyAttributes(String name, ModificationItem[] mods)
void | InitialDirContext.modifyAttributes(Name name, ModificationItem[] mods)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.directory.SearchControls

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.directory.SearchControls

Packages that use SearchControls
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.

Uses of SearchControls in javax.naming.directory

Methods in javax.naming.directory with parameters of type SearchControls
NamingEnumeration | DirContext.search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | DirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | InitialDirContext.search(String name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filter, SearchControls cons)
NamingEnumeration | InitialDirContext.search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)
NamingEnumeration | InitialDirContext.search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Uses of SearchControls in javax.naming.event

Methods in javax.naming.event with parameters of type SearchControls
void | EventDirContext.addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
void | EventDirContext.addNamingListener(String target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
void | EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | EventDirContext.addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.directory.Attribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.directory.Attribute

Packages that use Attribute
javax.naming.directory Extends the javax.naming package to provide functionality for accessing directory services.

Uses of Attribute in javax.naming.directory

Classes in javax.naming.directory that implement Attribute
 class BasicAttribute
This class provides a basic implementation of the Attribute interface.

Methods in javax.naming.directory that return Attribute
Attribute | Attributes.get(String attrID) Retrieves the attribute with the given attribute id from the attribute set.
Attribute | Attributes.put(String attrID, Object val) Adds a new attribute to the attribute set.
Attribute | Attributes.put(Attribute attr) Adds a new attribute to the attribute set.
Attribute | Attributes.remove(String attrID) Removes the attribute with the attribute id 'attrID' from the attribute set.
Attribute | BasicAttributes.get(String attrID)
Attribute | BasicAttributes.put(String attrID, Object val)
Attribute | BasicAttributes.put(Attribute attr)
Attribute | BasicAttributes.remove(String attrID)
Attribute | ModificationItem.getAttribute() Retrieves the attribute associated with this modification item.

Methods in javax.naming.directory with parameters of type Attribute
Attribute | Attributes.put(Attribute attr) Adds a new attribute to the attribute set.
Attribute | BasicAttributes.put(Attribute attr)

Constructors in javax.naming.directory with parameters of type Attribute
ModificationItem(int mod_op, Attribute attr)
Creates a new instance of ModificationItem.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.directory.Attributes

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.directory.Attributes

Packages that use Attributes
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of Attributes in javax.naming.directory

Classes in javax.naming.directory that implement Attributes
 class BasicAttributes
This class provides a basic implementation of the Attributes interface.

Methods in javax.naming.directory that return Attributes
Attributes | DirContext.getAttributes(Name name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(String name) Retrieves all of the attributes associated with a named object.
Attributes | DirContext.getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | DirContext.getAttributes(String name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | SearchResult.getAttributes() Retrieves the attributes in this search result.
Attributes | InitialDirContext.getAttributes(String name)
Attributes | InitialDirContext.getAttributes(String name, String[] attrIds)
Attributes | InitialDirContext.getAttributes(Name name)
Attributes | InitialDirContext.getAttributes(Name name, String[] attrIds)

Methods in javax.naming.directory with parameters of type Attributes
void | DirContext.modifyAttributes(Name name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.modifyAttributes(String name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | DirContext.bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | DirContext.rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
void | DirContext.rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
DirContext | DirContext.createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | DirContext.search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | DirContext.search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
void | SearchResult.setAttributes(Attributes attrs) Sets the attributes of this search result to attrs.
void | InitialDirContext.modifyAttributes(String name, int mod_op, Attributes attrs)
void | InitialDirContext.modifyAttributes(Name name, int mod_op, Attributes attrs)
void | InitialDirContext.bind(String name, Object obj, Attributes attrs)
void | InitialDirContext.bind(Name name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(String name, Object obj, Attributes attrs)
void | InitialDirContext.rebind(Name name, Object obj, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(String name, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(Name name, Attributes attrs)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes)
NamingEnumeration | InitialDirContext.search(String name, Attributes matchingAttributes, String[] attributesToReturn)
NamingEnumeration | InitialDirContext.search(Name name, Attributes matchingAttributes, String[] attributesToReturn)

Constructors in javax.naming.directory with parameters of type Attributes
SearchResult(String name, Object obj, Attributes attrs)
Constructs a search result using the result's name, its bound object, and its attributes.
SearchResult(String name, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
SearchResult(String name, String className, Object obj, Attributes attrs)
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
SearchResult(String name, String className, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.

Uses of Attributes in javax.naming.spi

Methods in javax.naming.spi that return Attributes
 Attributes DirStateFactory.Result.getAttributes()
Retrieves the attributes to be bound.

Methods in javax.naming.spi with parameters of type Attributes
static Object | DirectoryManager.getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.
Object | DirObjectFactory.getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an object using the location or reference information, and attributes specified.

Constructors in javax.naming.spi with parameters of type Attributes
DirStateFactory.Result(Object obj, Attributes outAttrs)
Constructs an instance of Result.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.directory.DirContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.directory.DirContext

Packages that use DirContext
javax.naming.directory | Extends the javax.naming package to provide functionality for accessing directory services.
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.
javax.naming.spi | Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of DirContext in javax.naming.directory

Classes in javax.naming.directory that implement DirContext
 class InitialDirContext
This class is the starting context for performing directory operations.

Methods in javax.naming.directory that return DirContext
DirContext | DirContext.createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | DirContext.getSchema(Name name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchema(String name) Retrieves the schema associated with the named object.
DirContext | DirContext.getSchemaClassDefinition(Name name) Retrieves a context containing the schema objects of the named object's class definitions.
DirContext | DirContext.getSchemaClassDefinition(String name) Retrieves a context containing the schema objects of the named object's class definitions.
DirContext | BasicAttribute.getAttributeSyntaxDefinition() Retrieves the syntax definition associated with this attribute.
DirContext | BasicAttribute.getAttributeDefinition() Retrieves this attribute's schema definition.
DirContext | Attribute.getAttributeSyntaxDefinition() Retrieves the syntax definition associated with the attribute.
DirContext | Attribute.getAttributeDefinition() Retrieves the attribute's schema definition.
DirContext | InitialDirContext.createSubcontext(String name, Attributes attrs)
DirContext | InitialDirContext.createSubcontext(Name name, Attributes attrs)
DirContext | InitialDirContext.getSchema(String name)
DirContext | InitialDirContext.getSchema(Name name)
DirContext | InitialDirContext.getSchemaClassDefinition(String name)
DirContext | InitialDirContext.getSchemaClassDefinition(Name name)

Uses of DirContext in javax.naming.event

Subinterfaces of DirContext in javax.naming.event
 interface EventDirContext
Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.

Uses of DirContext in javax.naming.ldap

Subinterfaces of DirContext in javax.naming.ldap
 interface LdapContext
This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.

Classes in javax.naming.ldap that implement DirContext
 class InitialLdapContext
This class is the starting context for performing LDAPv3-style extended operations and controls.

Uses of DirContext in javax.naming.spi

Methods in javax.naming.spi that return DirContext
static DirContext DirectoryManager.getContinuationDirContext(CannotProceedException cpe)
Creates a context in which to continue a DirContext operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DirContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Interface DirContext

All Superinterfaces:
Context
All Known Subinterfaces:
EventDirContext, LdapContext
All Known Implementing Classes:
InitialDirContext
public interface DirContext
extends Context

The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.

Names

Each name passed as an argument to a DirContext method is relative to that context. The empty name is used to name the context itself. The name parameter may never be null.

Most of the methods have overloaded versions with one taking a Name parameter and one taking a String. These overloaded versions are equivalent in that if the Name and String parameters are just different representations of the same name, then the overloaded versions of the same methods behave the same. In the method descriptions below, only one version is documented. The second version instead has a link to the first: the same documentation applies to both.

See Context for a discussion on the interpretation of the name argument to the Context methods. These same rules apply to the name argument to the DirContext methods.

Attribute Models

There are two basic models of what attributes should be associated with. First, attributes may be directly associated with a DirContext object. In this model, an attribute operation on the named object is roughly equivalent to a lookup on the name (which returns the DirContext object), followed by the attribute operation invoked on the DirContext object in which the caller supplies an empty name. The attributes can be viewed as being stored along with the object (note that this does not imply that the implementation must do so).

The second model is that attributes are associated with a name (typically an atomic name) in a DirContext. In this model, an attribute operation on the named object is roughly equivalent to a lookup on the name of the parent DirContext of the named object, followed by the attribute operation invoked on the parent in which the caller supplies the terminal atomic name. The attributes can be viewed as being stored in the parent DirContext (again, this does not imply that the implementation must do so). Objects that are not DirContexts can have attributes, as long as their parents are DirContexts.

JNDI support both of these models. It is up to the individual service providers to decide where to "store" attributes. JNDI clients are safest when they do not make assumptions about whether an object's attributes are stored as part of the object, or stored within the parent object and associated with the object's name.

Attribute Type Names

In the getAttributes() and search() methods, you can supply the attributes to return by supplying a list of attribute names (strings). The attributes that you get back might not have the same names as the attribute names you have specified. This is because some directories support features that cause them to return other attributes. Such features include attribute subclassing, attribute name synonyms, and attribute language codes.

In attribute subclassing, attributes are defined in a class hierarchy. In some directories, for example, the "name" attribute might be the superclass of all name-related attributes, including "commonName" and "surName". Asking for the "name" attribute might return both the "commonName" and "surName" attributes.

With attribute type synonyms, a directory can assign multiple names to the same attribute. For example, "cn" and "commonName" might both refer to the same attribute. Asking for "cn" might return the "commonName" attribute.

Some directories support the language codes for attributes. Asking such a directory for the "description" attribute, for example, might return all of the following attributes:

  • description
  • description;lang-en
  • description;lang-de
  • description;lang-fr

Operational Attributes

Some directories have the notion of "operational attributes" which are attributes associated with a directory object for administrative purposes. An example of operational attributes is the access control list for an object.

In the getAttributes() and search() methods, you can specify that all attributes associated with the requested objects be returned by supply null as the list of attributes to return. The attributes returned do not include operational attributes. In order to retrieve operational attributes, you must name them explicitly.

Named Context

There are certain methods in which the name must resolve to a context (for example, when searching a single level context). The documentation of such methods use the term named context to describe their name parameter. For these methods, if the named object is not a DirContext, NotContextException is thrown. Aside from these methods, there is no requirement that the named object be a DirContext.

Parameters

An Attributes, SearchControls, or array object passed as a parameter to any method will not be modified by the service provider. The service provider may keep a reference to it for the duration of the operation, including any enumeration of the method's results and the processing of any referrals generated. The caller should not modify the object during this time. An Attributes object returned by any method is owned by the caller. The caller may subsequently modify it; the service provider will not.

Exceptions

All the methods in this interface can throw a NamingException or any of its subclasses. See NamingException and their subclasses for details on each exception.

Since:
1.3
See Also:
Context

Field Summary
static int | ADD_ATTRIBUTE This constant specifies to add an attribute with the specified values.
static int | REMOVE_ATTRIBUTE This constant specifies to delete the specified attribute values from the attribute.
static int | REPLACE_ATTRIBUTE This constant specifies to replace an attribute with specified values.
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Method Summary
void | bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
DirContext | createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
Attributes | getAttributes(Name name) Retrieves all of the attributes associated with a named object.
Attributes | getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | getAttributes(String name) Retrieves all of the attributes associated with a named object.
Attributes | getAttributes(String name, String[] attrIds) Retrieves selected attributes associated with a named object.
DirContext | getSchema(Name name) Retrieves the schema associated with the named object.
DirContext | getSchema(String name) Retrieves the schema associated with the named object.
DirContext | getSchemaClassDefinition(Name name) Retrieves a context containing the schema objects of the named object's class definitions.
DirContext | getSchemaClassDefinition(String name) Retrieves a context containing the schema objects of the named object's class definitions.
void | modifyAttributes(Name name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | modifyAttributes(Name name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | modifyAttributes(String name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | modifyAttributes(String name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
void | rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
NamingEnumeration | search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind

Field Detail

ADD_ATTRIBUTE

public static final int ADD_ATTRIBUTE
This constant specifies to add an attribute with the specified values.

If attribute does not exist, create the attribute. The resulting attribute has a union of the specified value set and the prior value set. Adding an attribute with no value will throw InvalidAttributeValueException if the attribute must have at least one value. For a single-valued attribute where that attribute already exists, throws AttributeInUseException. If attempting to add more than one value to a single-valued attribute, throws InvalidAttributeValueException.

The value of this constant is 1.

See Also:
ModificationItem, modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)

REPLACE_ATTRIBUTE

public static final int REPLACE_ATTRIBUTE
This constant specifies to replace an attribute with specified values.

If attribute already exists, replaces all existing values with new specified values. If the attribute does not exist, creates it. If no value is specified, deletes all the values of the attribute. Removal of the last value will remove the attribute if the attribute is required to have at least one value. If attempting to add more than one value to a single-valued attribute, throws InvalidAttributeValueException.

The value of this constant is 2.

See Also:
ModificationItem, modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)

REMOVE_ATTRIBUTE

public static final int REMOVE_ATTRIBUTE
This constant specifies to delete the specified attribute values from the attribute.

The resulting attribute has the set difference of its prior value set and the specified value set. If no values are specified, deletes the entire attribute. If the attribute does not exist, or if some or all members of the specified value set do not exist, this absence may be ignored and the operation succeeds, or a NamingException may be thrown to indicate the absence. Removal of the last value will remove the attribute if the attribute is required to have at least one value.

The value of this constant is 3.

See Also:
ModificationItem, modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)
Method Detail

getAttributes

public Attributes getAttributes(Name name)
                         throws NamingException
Retrieves all of the attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name. Returns an empty attribute set if name has no attributes; never null.
Throws:
NamingException - if a naming exception is encountered
See Also:
getAttributes(String), getAttributes(Name, String[])

getAttributes

public Attributes getAttributes(String name)
                         throws NamingException
Retrieves all of the attributes associated with a named object. See getAttributes(Name) for details.
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name
Throws:
NamingException - if a naming exception is encountered

getAttributes

public Attributes getAttributes(Name name,
                                String[] attrIds)
                         throws NamingException
Retrieves selected attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.

If the object does not have an attribute specified, the directory will ignore the nonexistent attribute and return those requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Parameters:
name - the name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException - if a naming exception is encountered

getAttributes

public Attributes getAttributes(String name,
                                String[] attrIds)
                         throws NamingException
Retrieves selected attributes associated with a named object. See getAttributes(Name, String[]) for details.
Parameters:
name - The name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException - if a naming exception is encountered

modifyAttributes

public void modifyAttributes(Name name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Modifies the attributes associated with a named object. The order of the modifications is not specified. Where possible, the modifications are performed atomically.
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; may not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
modifyAttributes(Name, ModificationItem[])

modifyAttributes

public void modifyAttributes(String name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Modifies the attributes associated with a named object. See modifyAttributes(Name, int, Attributes) for details.
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; map not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered

modifyAttributes

public void modifyAttributes(Name name,
                             ModificationItem[] mods)
                      throws NamingException
Modifies the attributes associated with a named object using an ordered list of modifications. The modifications are performed in the order specified. Each modification specifies a modification operation code and an attribute on which to operate. Where possible, the modifications are performed atomically.
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
modifyAttributes(Name, int, Attributes), ModificationItem

modifyAttributes

public void modifyAttributes(String name,
                             ModificationItem[] mods)
                      throws NamingException
Modifies the attributes associated with a named object using an ordered list of modifications. See modifyAttributes(Name, ModificationItem[]) for details.
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered

bind

public void bind(Name name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Binds a name to an object, along with associated attributes. If attrs is null, the resulting binding will have the attributes associated with obj if obj is a DirContext, and no attributes otherwise. If attrs is non-null, the resulting binding will have attrs as its attributes; any attributes associated with obj are ignored.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object), rebind(Name, Object, Attributes)

bind

public void bind(String name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Binds a name to an object, along with associated attributes. See bind(Name, Object, Attributes) for details.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered

rebind

public void rebind(Name name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Binds a name to an object, along with associated attributes, overwriting any existing binding. If attrs is null and obj is a DirContext, the attributes from obj are used. If attrs is null and obj is not a DirContext, any existing attributes associated with the object already bound in the directory remain unchanged. If attrs is non-null, any existing attributes associated with the object already bound in the directory are removed and attrs is associated with the named object. If obj is a DirContext and attrs is non-null, the attributes of obj are ignored.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object), bind(Name, Object, Attributes)

rebind

public void rebind(String name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Binds a name to an object, along with associated attributes, overwriting any existing binding. See rebind(Name, Object, Attributes) for details.
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered

createSubcontext

public DirContext createSubcontext(Name name,
                                   Attributes attrs)
                            throws NamingException
Creates and binds a new context, along with associated attributes. This method creates a new subcontext with the given name, binds it in the target context (that named by all but terminal atomic component of the name), and associates the supplied attributes with the newly created object. All intermediate and target contexts must already exist. If attrs is null, this method is equivalent to Context.createSubcontext().
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if the name is already bound
InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException - if a naming exception is encountered
See Also:
Context.createSubcontext(Name)

createSubcontext

public DirContext createSubcontext(String name,
                                   Attributes attrs)
                            throws NamingException
Creates and binds a new context, along with associated attributes. See createSubcontext(Name, Attributes) for details.
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if the name is already bound
InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException - if a naming exception is encountered

getSchema

public DirContext getSchema(Name name)
                     throws NamingException
Retrieves the schema associated with the named object. The schema describes rules regarding the structure of the namespace and the attributes stored within it. The schema specifies what types of objects can be added to the directory and where they can be added; what mandatory and optional attributes an object can have. The range of support for schemas is directory-specific.

This method returns the root of the schema information tree that is applicable to the named object. Several named objects (or even an entire directory) might share the same schema.

Issues such as structure and contents of the schema tree, permission to modify to the contents of the schema tree, and the effect of such modifications on the directory are dependent on the underlying directory.

Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchema

public DirContext getSchema(String name)
                     throws NamingException
Retrieves the schema associated with the named object. See getSchema(Name) for details.
Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(Name name)
                                    throws NamingException
Retrieves a context containing the schema objects of the named object's class definitions.

One category of information found in directory schemas is class definitions. An "object class" definition specifies the object's type and what attributes (mandatory and optional) the object must/can have. Note that the term "object class" being referred to here is in the directory sense rather than in the Java sense. For example, if the named object is a directory object of "Person" class, getSchemaClassDefinition() would return a DirContext representing the (directory's) object class definition of "Person".

The information that can be retrieved from an object class definition is directory-dependent.

Prior to JNDI 1.2, this method returned a single schema object representing the class definition of the named object. Since JNDI 1.2, this method returns a DirContext containing all of the named object's class definitions.

Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(String name)
                                    throws NamingException
Retrieves a context containing the schema objects of the named object's class definitions. See getSchemaClassDefinition(Name) for details.
Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. The search is performed using the default SearchControls settings.

For an object to be selected, each attribute in matchingAttributes must match some attribute of the object. If matchingAttributes is empty or null, all objects in the target context are returned.

An attribute A1 in matchingAttributes is considered to match an attribute A2 of an object if A1 and A2 have the same identifier, and each value of A1 is equal to some value of A2. This implies that the order of values is not significant, and that A2 may contain "extra" values not found in A1 without affecting the comparison. It also implies that if A1 has no values, then testing for a match is equivalent to testing for the presence of an attribute A2 with the same identifier.

The precise definition of "equality" used in comparing attribute values is defined by the underlying directory service. It might use the Object.equals method, for example, or might use a schema to specify a different equality operation. For matching based on operations other than equality (such as substring comparison) use the version of the search method that takes a filter argument.

When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

If the object does not have the attribute specified, the directory will ignore the nonexistent attribute and return the requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for. If empty or null, all objects in the target context are returned.
attributesToReturn - the attributes to return. null indicates that all attributes are to be returned; an empty array indicates that none are to be returned.
Returns:
a non-null enumeration of SearchResult objects. Each SearchResult contains the attributes identified by attributesToReturn and the name of the corresponding object, named relative to the context named by name.
Throws:
NamingException - if a naming exception is encountered
See Also:
SearchControls, SearchResult, search(Name, String, Object[], SearchControls)

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. See search(Name, Attributes, String[]) for details.
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
attributesToReturn - the attributes to return
Returns:
a non-null enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes)
                         throws NamingException
Searches in a single context for objects that contain a specified set of attributes. This method returns all the attributes of such objects. It is equivalent to supplying null as the atributesToReturn parameter to the method search(Name, Attributes, String[]).
See search(Name, Attributes, String[]) for a full description.
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered
See Also:
search(Name, Attributes, String[])

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes)
                         throws NamingException
Searches in a single context for objects that contain a specified set of attributes. See search(Name, Attributes) for details.
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The format and interpretation of filter follows RFC 2254 with the following interpretations for attr and value mentioned in the RFC.

attr is the attribute's identifier.

value is the string representation the attribute's value. The translation of this string representation into the attribute's value is directory-specific.

For the assertion "someCount=127", for example, attr is "someCount" and value is "127". The provider determines, based on the attribute ID ("someCount") (and possibly its schema), that the attribute's value is an integer. It then parses the string "127" appropriately.

Any non-ASCII characters in the filter string should be represented by the appropriate Java (Unicode) characters, and not encoded as UTF-8 octets. Alternately, the "backslash-hexcode" notation described in RFC 2254 may be used.

If the directory does not support a string representation of some or all of its attributes, the form of search that accepts filter arguments in the form of Objects can be used instead. The service provider for such a directory would then translate the filter arguments to its service-specific representation for filter evaluation. See search(Name, String, Object[], SearchControls).

RFC 2254 defines certain operators for the filter, including substring matches, equality, approximate match, greater than, less than. These operators are mapped to operators with corresponding semantics in the underlying directory. For example, for the equals operator, suppose the directory has a matching rule defining "equality" of the attributes in the filter. This rule would be used for checking equality of the attributes specified in the filter with the attributes of objects in the directory. Similarly, if the directory has a matching rule for ordering, this rule would be used for making "greater than" and "less than" comparisons.

Not all of the operators defined in RFC 2254 are applicable to all attributes. When an operator is not applicable, the exception InvalidSearchFilterException is thrown.

The result is returned in an enumeration of SearchResults. Each SearchResult contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string. The SearchResult may also contain attributes of the matching object if the cons argument specified that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException - if the search controls contain invalid settings
NamingException - if a naming exception is encountered
See Also:
search(Name, String, Object[], SearchControls), SearchControls, SearchResult

search

public NamingEnumeration search(String name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See search(Name, String, SearchControls) for details.
Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults for the objects that satisfy the filter.
Throws:
InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException - if the search controls contain invalid settings
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The interpretation of filterExpr is based on RFC 2254. It may additionally contain variables of the form {i} -- where i is an integer -- that refer to objects in the filterArgs array. The interpretation of filterExpr is otherwise identical to that of the filter parameter of the method search(Name, String, SearchControls).

When a variable {i} appears in a search filter, it indicates that the filter argument filterArgs[i] is to be used in that place. Such variables may be used wherever an attr, value, or matchingrule production appears in the filter grammar of RFC 2254, section 4. When a string-valued filter argument is substituted for a variable, the filter is interpreted as if the string were given in place of the variable, with any characters having special significance within filters (such as '*') having been escaped according to the rules of RFC 2254.

For directories that do not use a string representation for some or all of their attributes, the filter argument corresponding to an attribute value may be of a type other than String. Directories that support unstructured binary-valued attributes, for example, should accept byte arrays as filter arguments. The interpretation (if any) of filter arguments of any other type is determined by the service provider for that directory, which maps the filter operations onto operations with corresponding semantics in the underlying directory.

This method returns an enumeration of the results. Each element in the enumeration contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string.

The SearchResult may also contain attributes of the matching object if the cons argument specifies that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

If a search filter with invalid variable substitutions is provided to this method, the result is undefined. When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

See also Operational Attributes in the class description.

Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
ArrayIndexOutOfBoundsException - if filterExpr contains {i} expressions where i is outside the bounds of the array filterArgs
InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException - if a naming exception is encountered
See Also:
search(Name, Attributes, String[]), MessageFormat

search

public NamingEnumeration search(String name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See search(Name, String, Object[], SearchControls) for details.
Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
ArrayIndexOutOfBoundsException - if filterExpr contains {i} expressions where i is outside the bounds of the array filterArgs
InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException - if a naming exception is encountered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InitialDirContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InitialDirContext

java.lang.Object
  |
  +--javax.naming.InitialContext
        |
        +--javax.naming.directory.InitialDirContext
All Implemented Interfaces:
Context, DirContext
Direct Known Subclasses:
InitialLdapContext
public class InitialDirContext
extends InitialContext
implements DirContext

This class is the starting context for performing directory operations. The documentation in the class description of InitialContext (including those for synchronization) apply here.

Since:
1.3
See Also:
InitialContext

Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Constructor Summary
 | InitialDirContext() Constructs an initial DirContext.
protected | InitialDirContext(boolean lazy) Constructs an initial DirContext with the option of not initializing it.
 | InitialDirContext(Hashtable environment) Constructs an initial DirContext using the supplied environment.
Method Summary
void | bind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
void | bind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes.
DirContext | createSubcontext(Name name, Attributes attrs) Creates and binds a new context, along with associated attributes.
DirContext | createSubcontext(String name, Attributes attrs) Creates and binds a new context, along with associated attributes.
Attributes | getAttributes(Name name) Retrieves all of the attributes associated with a named object.
Attributes | getAttributes(Name name, String[] attrIds) Retrieves selected attributes associated with a named object.
Attributes | getAttributes(String name) Retrieves all of the attributes associated with a named object.
Attributes | getAttributes(String name, String[] attrIds) Retrieves selected attributes associated with a named object.
DirContext | getSchema(Name name) Retrieves the schema associated with the named object.
DirContext | getSchema(String name) Retrieves the schema associated with the named object.
DirContext | getSchemaClassDefinition(Name name) Retrieves a context containing the schema objects of the named object's class definitions.
DirContext | getSchemaClassDefinition(String name) Retrieves a context containing the schema objects of the named object's class definitions.
void | modifyAttributes(Name name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | modifyAttributes(Name name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | modifyAttributes(String name, int mod_op, Attributes attrs) Modifies the attributes associated with a named object.
void | modifyAttributes(String name, ModificationItem[] mods) Modifies the attributes associated with a named object using an ordered list of modifications.
void | rebind(Name name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
void | rebind(String name, Object obj, Attributes attrs) Binds a name to an object, along with associated attributes, overwriting any existing binding.
NamingEnumeration | search(Name name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | search(Name name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(Name name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(String name, Attributes matchingAttributes) Searches in a single context for objects that contain a specified set of attributes.
NamingEnumeration | search(String name, Attributes matchingAttributes, String[] attributesToReturn) Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
NamingEnumeration | search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
NamingEnumeration | search(String name, String filter, SearchControls cons) Searches in the named context or object for entries that satisfy the given search filter.
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind

Constructor Detail

InitialDirContext

protected InitialDirContext(boolean lazy)
                     throws NamingException
Constructs an initial DirContext with the option of not initializing it. This may be used by a constructor in a subclass when the value of the environment parameter is not yet known at the time the InitialDirContext constructor is called. The subclass's constructor will call this constructor, compute the value of the environment, and then call init() before returning.
Parameters:
lazy - true means do not initialize the initial DirContext; false is equivalent to calling new InitialDirContext()
Throws:
NamingException - if a naming exception is encountered
Since:
1.3
See Also:
InitialContext.init(Hashtable)

InitialDirContext

public InitialDirContext()
                  throws NamingException
Constructs an initial DirContext. No environment properties are supplied. Equivalent to new InitialDirContext(null).
Throws:
NamingException - if a naming exception is encountered
See Also:
InitialDirContext(Hashtable)

InitialDirContext

public InitialDirContext(Hashtable environment)
                  throws NamingException
Constructs an initial DirContext using the supplied environment. Environment properties are discussed in the javax.naming.InitialContext class description.

This constructor will not modify environment or save a reference to it, but may save a clone.

Parameters:
environment - environment used to create the initial DirContext. Null indicates an empty environment.
Throws:
NamingException - if a naming exception is encountered
Method Detail

getAttributes

public Attributes getAttributes(String name)
                         throws NamingException
Description copied from interface: DirContext
Retrieves all of the attributes associated with a named object. See DirContext.getAttributes(Name) for details.
Specified by:
getAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name
Throws:
NamingException - if a naming exception is encountered

getAttributes

public Attributes getAttributes(String name,
                                String[] attrIds)
                         throws NamingException
Description copied from interface: DirContext
Retrieves selected attributes associated with a named object. See DirContext.getAttributes(Name, String[]) for details.
Specified by:
getAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - The name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException - if a naming exception is encountered

getAttributes

public Attributes getAttributes(Name name)
                         throws NamingException
Description copied from interface: DirContext
Retrieves all of the attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.
Specified by:
getAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name. Returns an empty attribute set if name has no attributes; never null.
Throws:
NamingException - if a naming exception is encountered
See Also:
DirContext.getAttributes(String), DirContext.getAttributes(Name, String[])

getAttributes

public Attributes getAttributes(Name name,
                                String[] attrIds)
                         throws NamingException
Description copied from interface: DirContext
Retrieves selected attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.

If the object does not have an attribute specified, the directory will ignore the nonexistent attribute and return those requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
getAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException - if a naming exception is encountered

modifyAttributes

public void modifyAttributes(String name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Description copied from interface: DirContext
Modifies the attributes associated with a named object. See DirContext.modifyAttributes(Name, int, Attributes) for details.
Specified by:
modifyAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; map not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered

modifyAttributes

public void modifyAttributes(Name name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Description copied from interface: DirContext
Modifies the attributes associated with a named object. The order of the modifications is not specified. Where possible, the modifications are performed atomically.
Specified by:
modifyAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; may not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
DirContext.modifyAttributes(Name, ModificationItem[])

modifyAttributes

public void modifyAttributes(String name,
                             ModificationItem[] mods)
                      throws NamingException
Description copied from interface: DirContext
Modifies the attributes associated with a named object using an ordered list of modifications. See DirContext.modifyAttributes(Name, ModificationItem[]) for details.
Specified by:
modifyAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered

modifyAttributes

public void modifyAttributes(Name name,
                             ModificationItem[] mods)
                      throws NamingException
Description copied from interface: DirContext
Modifies the attributes associated with a named object using an ordered list of modifications. The modifications are performed in the order specified. Each modification specifies a modification operation code and an attribute on which to operate. Where possible, the modifications are performed atomically.
Specified by:
modifyAttributes in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
DirContext.modifyAttributes(Name, int, Attributes), ModificationItem

bind

public void bind(String name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Description copied from interface: DirContext
Binds a name to an object, along with associated attributes. See DirContext.bind(Name, Object, Attributes) for details.
Specified by:
bind in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered

bind

public void bind(Name name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Description copied from interface: DirContext
Binds a name to an object, along with associated attributes. If attrs is null, the resulting binding will have the attributes associated with obj if obj is a DirContext, and no attributes otherwise. If attrs is non-null, the resulting binding will have attrs as its attributes; any attributes associated with obj are ignored.
Specified by:
bind in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object), DirContext.rebind(Name, Object, Attributes)

rebind

public void rebind(String name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Description copied from interface: DirContext
Binds a name to an object, along with associated attributes, overwriting any existing binding. See DirContext.rebind(Name, Object, Attributes) for details.
Specified by:
rebind in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered

rebind

public void rebind(Name name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Description copied from interface: DirContext
Binds a name to an object, along with associated attributes, overwriting any existing binding. If attrs is null and obj is a DirContext, the attributes from obj are used. If attrs is null and obj is not a DirContext, any existing attributes associated with the object already bound in the directory remain unchanged. If attrs is non-null, any existing attributes associated with the object already bound in the directory are removed and attrs is associated with the named object. If obj is a DirContext and attrs is non-null, the attributes of obj are ignored.
Specified by:
rebind in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object), DirContext.bind(Name, Object, Attributes)

createSubcontext

public DirContext createSubcontext(String name,
                                   Attributes attrs)
                            throws NamingException
Description copied from interface: DirContext
Creates and binds a new context, along with associated attributes. See DirContext.createSubcontext(Name, Attributes) for details.
Specified by:
createSubcontext in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if the name is already bound
InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException - if a naming exception is encountered

createSubcontext

public DirContext createSubcontext(Name name,
                                   Attributes attrs)
                            throws NamingException
Description copied from interface: DirContext
Creates and binds a new context, along with associated attributes. This method creates a new subcontext with the given name, binds it in the target context (that named by all but terminal atomic component of the name), and associates the supplied attributes with the newly created object. All intermediate and target contexts must already exist. If attrs is null, this method is equivalent to Context.createSubcontext().
Specified by:
createSubcontext in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if the name is already bound
InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException - if a naming exception is encountered
See Also:
Context.createSubcontext(Name)

getSchema

public DirContext getSchema(String name)
                     throws NamingException
Description copied from interface: DirContext
Retrieves the schema associated with the named object. See DirContext.getSchema(Name) for details.
Specified by:
getSchema in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchema

public DirContext getSchema(Name name)
                     throws NamingException
Description copied from interface: DirContext
Retrieves the schema associated with the named object. The schema describes rules regarding the structure of the namespace and the attributes stored within it. The schema specifies what types of objects can be added to the directory and where they can be added; what mandatory and optional attributes an object can have. The range of support for schemas is directory-specific.

This method returns the root of the schema information tree that is applicable to the named object. Several named objects (or even an entire directory) might share the same schema.

Issues such as structure and contents of the schema tree, permission to modify to the contents of the schema tree, and the effect of such modifications on the directory are dependent on the underlying directory.

Specified by:
getSchema in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(String name)
                                    throws NamingException
Description copied from interface: DirContext
Retrieves a context containing the schema objects of the named object's class definitions. See DirContext.getSchemaClassDefinition(Name) for details.
Specified by:
getSchemaClassDefinition in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(Name name)
                                    throws NamingException
Description copied from interface: DirContext
Retrieves a context containing the schema objects of the named object's class definitions.

One category of information found in directory schemas is class definitions. An "object class" definition specifies the object's type and what attributes (mandatory and optional) the object must/can have. Note that the term "object class" being referred to here is in the directory sense rather than in the Java sense. For example, if the named object is a directory object of "Person" class, getSchemaClassDefinition() would return a DirContext representing the (directory's) object class definition of "Person".

The information that can be retrieved from an object class definition is directory-dependent.

Prior to JNDI 1.2, this method returned a single schema object representing the class definition of the named object. Since JNDI 1.2, this method returns a DirContext containing all of the named object's class definitions.

Specified by:
getSchemaClassDefinition in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException - if schema not supported
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes)
                         throws NamingException
Description copied from interface: DirContext
Searches in a single context for objects that contain a specified set of attributes. See DirContext.search(Name, Attributes) for details.
Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes)
                         throws NamingException
Description copied from interface: DirContext
Searches in a single context for objects that contain a specified set of attributes. This method returns all the attributes of such objects. It is equivalent to supplying null as the atributesToReturn parameter to the method search(Name, Attributes, String[]).
See DirContext.search(Name, Attributes, String[]) for a full description.
Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, Attributes, String[])

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Description copied from interface: DirContext
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. See DirContext.search(Name, Attributes, String[]) for details.
Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
attributesToReturn - the attributes to return
Returns:
a non-null enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Description copied from interface: DirContext
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. The search is performed using the default SearchControls settings.

For an object to be selected, each attribute in matchingAttributes must match some attribute of the object. If matchingAttributes is empty or null, all objects in the target context are returned.

An attribute A1 in matchingAttributes is considered to match an attribute A2 of an object if A1 and A2 have the same identifier, and each value of A1 is equal to some value of A2. This implies that the order of values is not significant, and that A2 may contain "extra" values not found in A1 without affecting the comparison. It also implies that if A1 has no values, then testing for a match is equivalent to testing for the presence of an attribute A2 with the same identifier.

The precise definition of "equality" used in comparing attribute values is defined by the underlying directory service. It might use the Object.equals method, for example, or might use a schema to specify a different equality operation. For matching based on operations other than equality (such as substring comparison) use the version of the search method that takes a filter argument.

When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

If the object does not have the attribute specified, the directory will ignore the nonexistent attribute and return the requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for. If empty or null, all objects in the target context are returned.
attributesToReturn - the attributes to return. null indicates that all attributes are to be returned; an empty array indicates that none are to be returned.
Returns:
a non-null enumeration of SearchResult objects. Each SearchResult contains the attributes identified by attributesToReturn and the name of the corresponding object, named relative to the context named by name.
Throws:
NamingException - if a naming exception is encountered
See Also:
SearchControls, SearchResult, DirContext.search(Name, String, Object[], SearchControls)

search

public NamingEnumeration search(String name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Description copied from interface: DirContext
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See DirContext.search(Name, String, SearchControls) for details.
Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults for the objects that satisfy the filter.
Throws:
InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException - if the search controls contain invalid settings
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Description copied from interface: DirContext
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The format and interpretation of filter follows RFC 2254 with the following interpretations for attr and value mentioned in the RFC.

attr is the attribute's identifier.

value is the string representation the attribute's value. The translation of this string representation into the attribute's value is directory-specific.

For the assertion "someCount=127", for example, attr is "someCount" and value is "127". The provider determines, based on the attribute ID ("someCount") (and possibly its schema), that the attribute's value is an integer. It then parses the string "127" appropriately.

Any non-ASCII characters in the filter string should be represented by the appropriate Java (Unicode) characters, and not encoded as UTF-8 octets. Alternately, the "backslash-hexcode" notation described in RFC 2254 may be used.

If the directory does not support a string representation of some or all of its attributes, the form of search that accepts filter arguments in the form of Objects can be used instead. The service provider for such a directory would then translate the filter arguments to its service-specific representation for filter evaluation. See search(Name, String, Object[], SearchControls).

RFC 2254 defines certain operators for the filter, including substring matches, equality, approximate match, greater than, less than. These operators are mapped to operators with corresponding semantics in the underlying directory. For example, for the equals operator, suppose the directory has a matching rule defining "equality" of the attributes in the filter. This rule would be used for checking equality of the attributes specified in the filter with the attributes of objects in the directory. Similarly, if the directory has a matching rule for ordering, this rule would be used for making "greater than" and "less than" comparisons.

Not all of the operators defined in RFC 2254 are applicable to all attributes. When an operator is not applicable, the exception InvalidSearchFilterException is thrown.

The result is returned in an enumeration of SearchResults. Each SearchResult contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string. The SearchResult may also contain attributes of the matching object if the cons argument specified that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException - if the search controls contain invalid settings
NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, String, Object[], SearchControls), SearchControls, SearchResult

search

public NamingEnumeration search(String name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Description copied from interface: DirContext
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See DirContext.search(Name, String, Object[], SearchControls) for details.
Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
ArrayIndexOutOfBoundsException - if filterExpr contains {i} expressions where i is outside the bounds of the array filterArgs
InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException - if a naming exception is encountered

search

public NamingEnumeration search(Name name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Description copied from interface: DirContext
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The interpretation of filterExpr is based on RFC 2254. It may additionally contain variables of the form {i} -- where i is an integer -- that refer to objects in the filterArgs array. The interpretation of filterExpr is otherwise identical to that of the filter parameter of the method search(Name, String, SearchControls).

When a variable {i} appears in a search filter, it indicates that the filter argument filterArgs[i] is to be used in that place. Such variables may be used wherever an attr, value, or matchingrule production appears in the filter grammar of RFC 2254, section 4. When a string-valued filter argument is substituted for a variable, the filter is interpreted as if the string were given in place of the variable, with any characters having special significance within filters (such as '*') having been escaped according to the rules of RFC 2254.

For directories that do not use a string representation for some or all of their attributes, the filter argument corresponding to an attribute value may be of a type other than String. Directories that support unstructured binary-valued attributes, for example, should accept byte arrays as filter arguments. The interpretation (if any) of filter arguments of any other type is determined by the service provider for that directory, which maps the filter operations onto operations with corresponding semantics in the underlying directory.

This method returns an enumeration of the results. Each element in the enumeration contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string.

The SearchResult may also contain attributes of the matching object if the cons argument specifies that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

If a search filter with invalid variable substitutions is provided to this method, the result is undefined. When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

See also Operational Attributes in the class description.

Specified by:
search in interface DirContext
Following copied from interface: javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
ArrayIndexOutOfBoundsException - if filterExpr contains {i} expressions where i is outside the bounds of the array filterArgs
InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, Attributes, String[]), MessageFormat
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidAttributeIdentifierException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InvalidAttributeIdentifierException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.InvalidAttributeIdentifierException
All Implemented Interfaces:
Serializable
public class InvalidAttributeIdentifierException
extends NamingException

This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier. The validity of an attribute identifier is directory-specific.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidAttributeIdentifierException()
Constructs a new instance of InvalidAttributeIdentifierException.
InvalidAttributeIdentifierException(String explanation)
Constructs a new instance of InvalidAttributeIdentifierException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidAttributeIdentifierException

public InvalidAttributeIdentifierException(String explanation)
Constructs a new instance of InvalidAttributeIdentifierException using the explanation supplied. All other fields set to null.
Parameters:
explanation - Possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

InvalidAttributeIdentifierException

public InvalidAttributeIdentifierException()
Constructs a new instance of InvalidAttributeIdentifierException. All fields are set to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidAttributesException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InvalidAttributesException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.InvalidAttributesException
All Implemented Interfaces:
Serializable
public class InvalidAttributesException
extends NamingException

This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly. This could happen, for example, when attempting to add or modify a binding, or to create a new subcontext without specifying all the mandatory attributes required for creation of the object. Another situation in which this exception is thrown is by specification of incompatible attributes within the same attribute set, or attributes in conflict with that specified by the object's schema.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidAttributesException()
Constructs a new instance of InvalidAttributesException.
InvalidAttributesException(String explanation)
Constructs a new instance of InvalidAttributesException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidAttributesException

public InvalidAttributesException(String explanation)
Constructs a new instance of InvalidAttributesException using an explanation. All other fields are set to null.
Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage()

InvalidAttributesException

public InvalidAttributesException()
Constructs a new instance of InvalidAttributesException. All fields are set to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidAttributeValueException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InvalidAttributeValueException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.InvalidAttributeValueException
All Implemented Interfaces:
Serializable
public class InvalidAttributeValueException
extends NamingException

This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition. This could happen, for example, if attempting to add an attribute with no value when the attribute is required to have at least one value, or if attempting to add more than one value to a single valued-attribute, or if attempting to add a value that conflicts with the syntax of the attribute.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidAttributeValueException()
Constructs a new instance of InvalidAttributeValueException.
InvalidAttributeValueException(String explanation)
Constructs a new instance of InvalidAttributeValueException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidAttributeValueException

public InvalidAttributeValueException(String explanation)
Constructs a new instance of InvalidAttributeValueException using an explanation. All other fields are set to null.
Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage()

InvalidAttributeValueException

public InvalidAttributeValueException()
Constructs a new instance of InvalidAttributeValueException. All fields are set to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidSearchControlsException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InvalidSearchControlsException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.InvalidSearchControlsException
All Implemented Interfaces:
Serializable
public class InvalidSearchControlsException
extends NamingException

This exception is thrown when the specification of the SearchControls for a search operation is invalid. For example, if the scope is set to a value other than OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE, this exception is thrown.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidSearchControlsException()
Constructs a new instance of InvalidSearchControlsException.
InvalidSearchControlsException(String msg)
Constructs a new instance of InvalidSearchControlsException with an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidSearchControlsException

public InvalidSearchControlsException()
Constructs a new instance of InvalidSearchControlsException. All fields are set to null.

InvalidSearchControlsException

public InvalidSearchControlsException(String msg)
Constructs a new instance of InvalidSearchControlsException with an explanation. All other fields set to null.
Parameters:
msg - Detail about this exception. Can be null.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidSearchFilterException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class InvalidSearchFilterException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.InvalidSearchFilterException
All Implemented Interfaces:
Serializable
public class InvalidSearchFilterException
extends NamingException

This exception is thrown when the specification of a search filter is invalid. The expression of the filter may be invalid, or there may be a problem with one of the parameters passed to the filter.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidSearchFilterException()
Constructs a new instance of InvalidSearchFilterException.
InvalidSearchFilterException(String msg)
Constructs a new instance of InvalidSearchFilterException with an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidSearchFilterException

public InvalidSearchFilterException()
Constructs a new instance of InvalidSearchFilterException. All fields are set to null.

InvalidSearchFilterException

public InvalidSearchFilterException(String msg)
Constructs a new instance of InvalidSearchFilterException with an explanation. All other fields are set to null.
Parameters:
msg - Detail about this exception. Can be null.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModificationItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class ModificationItem

java.lang.Object
  |
  +--javax.naming.directory.ModificationItem
All Implemented Interfaces:
Serializable
public class ModificationItem
extends Object
implements Serializable

This class represents a modification item. It consists of a modification code and an attribute on which to operate.

A ModificationItem instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single ModificationItem instance should lock the object.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
ModificationItem(int mod_op, Attribute attr)
Creates a new instance of ModificationItem.
Method Summary
Attribute | getAttribute() Retrieves the attribute associated with this modification item.
int | getModificationOp() Retrieves the modification code of this modification item.
String | toString() Generates the string representation of this modification item, which consists of the modification operation and its related attribute.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ModificationItem

public ModificationItem(int mod_op,
                        Attribute attr)
Creates a new instance of ModificationItem.
Parameters:
mod_op - Modification to apply. It must be one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
attr - The non-null attribute to use for modification.
Throws:
IllegalArgumentException - If attr is null, or if mod_op is not one of the ones specified above.
Method Detail

getModificationOp

public int getModificationOp()
Retrieves the modification code of this modification item.
Returns:
The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE

getAttribute

public Attribute getAttribute()
Retrieves the attribute associated with this modification item.
Returns:
The non-null attribute to use for the modification.

toString

public String toString()
Generates the string representation of this modification item, which consists of the modification operation and its related attribute. The string representation is meant for debugging and not to be interpreted programmatically.
Overrides:
toString in class Object
Returns:
The non-null string representation of this modification item.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchAttributeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class NoSuchAttributeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.NoSuchAttributeException
All Implemented Interfaces:
Serializable
public class NoSuchAttributeException
extends NamingException

This exception is thrown when attempting to access an attribute that does not exist.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NoSuchAttributeException()
Constructs a new instance of NoSuchAttributeException.
NoSuchAttributeException(String explanation)
Constructs a new instance of NoSuchAttributeException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchAttributeException

public NoSuchAttributeException(String explanation)
Constructs a new instance of NoSuchAttributeException using an explanation. All other fields are set to null.
Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage()

NoSuchAttributeException

public NoSuchAttributeException()
Constructs a new instance of NoSuchAttributeException. All fields are initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SchemaViolationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class SchemaViolationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.directory.SchemaViolationException
All Implemented Interfaces:
Serializable
public class SchemaViolationException
extends NamingException

This exception is thrown when a method in some ways violates the schema. An example of schema violation is modifying attributes of an object that violates the object's schema definition. Another example is renaming or moving an object to a part of the namespace that violates the namespace's schema definition.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context.bind(javax.naming.Name, java.lang.Object),
DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
Context.rebind(javax.naming.Name, java.lang.Object),
DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes),
Context.createSubcontext(javax.naming.Name),
DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
SchemaViolationException()
Constructs a new instance of SchemaViolationException.
SchemaViolationException(String explanation)
Constructs a new instance of SchemaViolationException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SchemaViolationException

public SchemaViolationException()
Constructs a new instance of SchemaViolationException. All fields are set to null.

SchemaViolationException

public SchemaViolationException(String explanation)
Constructs a new instance of SchemaViolationException using the explanation supplied. All other fields are set to null.
Parameters:
explanation - Detail about this exception. Can be null.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SearchControls

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class SearchControls

java.lang.Object
  |
  +--javax.naming.directory.SearchControls
All Implemented Interfaces:
Serializable
public class SearchControls
extends Object
implements Serializable

This class encapsulates factors that determine scope of search and what gets returned as a result of the search.

A SearchControls instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single SearchControls instance should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
static int | OBJECT_SCOPE Search the named object.
static int | ONELEVEL_SCOPE Search one level of the named context.
static int | SUBTREE_SCOPE Search the entire subtree rooted at the named object.
Constructor Summary
SearchControls()
Constructs a search constraints using defaults.
SearchControls(int scope, long countlim, int timelim, String[] attrs, boolean retobj, boolean deref)
Constructs a search constraints using arguments.
Method Summary
long | getCountLimit() Retrieves the maximum number of entries that will be returned as a result of the search.
boolean | getDerefLinkFlag() Determines whether links will be dereferenced during the search.
String[] | getReturningAttributes() Retrieves the attributes that will be returned as part of the search.
boolean | getReturningObjFlag() Determines whether objects will be returned as part of the result.
int | getSearchScope() Retrieves the search scope of these SearchControls.
int | getTimeLimit() Retrieves the time limit of these SearchControls in milliseconds.
void | setCountLimit(long limit) Sets the maximum number of entries to be returned as a result of the search.
void | setDerefLinkFlag(boolean on) Enables/disables link dereferencing during the search.
void | setReturningAttributes(String[] attrs) Specifies the attributes that will be returned as part of the search.
void | setReturningObjFlag(boolean on) Enables/disables returning objects returned as part of the result.
void | setSearchScope(int scope) Sets the search scope to one of: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE.
void | setTimeLimit(int ms) Sets the time limit of these SearchControls in milliseconds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OBJECT_SCOPE

public static final int OBJECT_SCOPE
Search the named object.

The NamingEnumeration that results from search() using OBJECT_SCOPE will contain one or zero element. The enumeration contains one element if the named object satisfies the search filter specified in search(). The element will have as its name the empty string because the names of elements in the NamingEnumeration are relative to the target context--in this case, the target context is the named object. It contains zero element if the named object does not satisfy the search filter specified in search().

The value of this constant is 0.

ONELEVEL_SCOPE

public static final int ONELEVEL_SCOPE
Search one level of the named context.

The NamingEnumeration that results from search() using ONELEVEL_SCOPE contains elements with objects in the named context that satisfy the search filter specified in search(). The names of elements in the NamingEnumeration are atomic names relative to the named context.

The value of this constant is 1.

SUBTREE_SCOPE

public static final int SUBTREE_SCOPE
Search the entire subtree rooted at the named object.

If the named object is not a DirContext, search only the object. If the named object is a DirContext, search the subtree rooted at the named object, including the named object itself.

The search will not cross naming system boundaries.

The NamingEnumeration that results from search() using SUBTREE_SCOPE contains elements of objects from the subtree (including the named context) that satisfy the search filter specified in search(). The names of elements in the NamingEnumeration are either relative to the named context or is a URL string. If the named context satisfies the search filter, it is included in the enumeration with the empty string as its name.

The value of this constant is 2.

Constructor Detail

SearchControls

public SearchControls()
Constructs a search constraints using defaults.

The defaults are:

  • search one level
  • no maximum return limit for search results
  • no time limit for search
  • return all attributes associated with objects that satisfy the search filter.
  • do not return named object (return only name and class)
  • do not dereference links during search

SearchControls

public SearchControls(int scope,
                      long countlim,
                      int timelim,
                      String[] attrs,
                      boolean retobj,
                      boolean deref)
Constructs a search constraints using arguments.
Parameters:
scope - The search scope. One of: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE.
timelim - The number of milliseconds to wait before returning. If 0, wait indefinitely.
deref - If true, dereference links during search.
countlim - The maximum number of entries to return. If 0, return all entries that satisfy filter.
retobj - If true, return the object bound to the name of the entry; if false, do not return object.
attrs - The identifiers of the attributes to return along with the entry. If null, return all attributes. If empty return no attributes.
Method Detail

getSearchScope

public int getSearchScope()
Retrieves the search scope of these SearchControls.

One of OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE.

Returns:
The search scope of this SearchControls.
See Also:
setSearchScope(int)

getTimeLimit

public int getTimeLimit()
Retrieves the time limit of these SearchControls in milliseconds.

If the value is 0, this means to wait indefinitely.

Returns:
The time limit of these SearchControls in milliseconds.
See Also:
setTimeLimit(int)

getDerefLinkFlag

public boolean getDerefLinkFlag()
Determines whether links will be dereferenced during the search.
Returns:
true if links will be dereferenced; false otherwise.
See Also:
setDerefLinkFlag(boolean)

getReturningObjFlag

public boolean getReturningObjFlag()
Determines whether objects will be returned as part of the result.
Returns:
true if objects will be returned; false otherwise.
See Also:
setReturningObjFlag(boolean)

getCountLimit

public long getCountLimit()
Retrieves the maximum number of entries that will be returned as a result of the search.

0 indicates that all entries will be returned.

Returns:
The maximum number of entries that will be returned.
See Also:
setCountLimit(long)

getReturningAttributes

public String[] getReturningAttributes()
Retrieves the attributes that will be returned as part of the search.

A value of null indicates that all attributes will be returned. An empty array indicates that no attributes are to be returned.

Returns:
An array of attribute ids identifying the attributes that will be returned. Can be null.
See Also:
setReturningAttributes(java.lang.String[])

setSearchScope

public void setSearchScope(int scope)
Sets the search scope to one of: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE.
Parameters:
scope - The search scope of this SearchControls.
See Also:
getSearchScope()

setTimeLimit

public void setTimeLimit(int ms)
Sets the time limit of these SearchControls in milliseconds.

If the value is 0, this means to wait indefinitely.

Parameters:
ms - The time limit of these SearchControls in milliseconds.
See Also:
getTimeLimit()

setDerefLinkFlag

public void setDerefLinkFlag(boolean on)
Enables/disables link dereferencing during the search.
Parameters:
on - if true links will be dereferenced; if false, not followed.
See Also:
getDerefLinkFlag()

setReturningObjFlag

public void setReturningObjFlag(boolean on)
Enables/disables returning objects returned as part of the result.

If disabled, only the name and class of the object is returned. If enabled, the object will be returned.

Parameters:
on - if true, objects will be returned; if false, objects will not be returned.
See Also:
getReturningObjFlag()

setCountLimit

public void setCountLimit(long limit)
Sets the maximum number of entries to be returned as a result of the search.

0 indicates no limit: all entries will be returned.

Parameters:
limit - The maximum number of entries that will be returned.
See Also:
getCountLimit()

setReturningAttributes

public void setReturningAttributes(String[] attrs)
Specifies the attributes that will be returned as part of the search.

null indicates that all attributes will be returned. An empty array indicates no attributes are returned.

Parameters:
attrs - An array of attribute ids identifying the attributes that will be returned. Can be null.
See Also:
getReturningAttributes()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchResult

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.directory
Class SearchResult

java.lang.Object
  |
  +--javax.naming.NameClassPair
        |
        +--javax.naming.Binding
              |
              +--javax.naming.directory.SearchResult
All Implemented Interfaces:
Serializable
public class SearchResult
extends Binding

This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.

A SearchResult instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single SearchResult instance should lock the object.

Since:
1.3
See Also:
DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]), Serialized Form

Constructor Summary
SearchResult(String name, Object obj, Attributes attrs)
Constructs a search result using the result's name, its bound object, and its attributes.
SearchResult(String name, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
SearchResult(String name, String className, Object obj, Attributes attrs)
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
SearchResult(String name, String className, Object obj, Attributes attrs, boolean isRelative)
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
Method Summary
Attributes | getAttributes() Retrieves the attributes in this search result.
void | setAttributes(Attributes attrs) Sets the attributes of this search result to attrs.
String | toString() Generates the string representation of this SearchResult.
Methods inherited from class javax.naming.Binding
getClassName, getObject, setObject
Methods inherited from class javax.naming.NameClassPair
getName, isRelative, setClassName, setName, setRelative
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SearchResult

public SearchResult(String name,
                    Object obj,
                    Attributes attrs)
Constructs a search result using the result's name, its bound object, and its attributes.

getClassName() will return the class name of obj (or null if obj is null) unless the class name has been explicitly set using setClassName().

Parameters:
name - The non-null name of the search item. It is relative to the target context of the search (which is named by the first parameter of the search() method)
obj - The object bound to name. Can be null.
attrs - The attributes that were requested to be returned with this search item. Cannot be null.
See Also:
NameClassPair.setClassName(java.lang.String), NameClassPair.getClassName()

SearchResult

public SearchResult(String name,
                    Object obj,
                    Attributes attrs,
                    boolean isRelative)
Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.

getClassName() will return the class name of obj (or null if obj is null) unless the class name has been explicitly set using setClassName()

Parameters:
name - The non-null name of the search item.
obj - The object bound to name. Can be null.
attrs - The attributes that were requested to be returned with this search item. Cannot be null.
isRelative - true if name is relative to the target context of the search (which is named by the first parameter of the search() method); false if name is a URL string.
See Also:
NameClassPair.setClassName(java.lang.String), NameClassPair.getClassName()

SearchResult

public SearchResult(String name,
                    String className,
                    Object obj,
                    Attributes attrs)
Constructs a search result using the result's name, its class name, its bound object, and its attributes.
Parameters:
name - The non-null name of the search item. It is relative to the target context of the search (which is named by the first parameter of the search() method)
className - The possibly null class name of the object bound to name. If null, the class name of obj is returned by getClassName(). If obj is also null, getClassName() will return null.
obj - The object bound to name. Can be null.
attrs - The attributes that were requested to be returned with this search item. Cannot be null.
See Also:
NameClassPair.setClassName(java.lang.String), NameClassPair.getClassName()

SearchResult

public SearchResult(String name,
                    String className,
                    Object obj,
                    Attributes attrs,
                    boolean isRelative)
Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
Parameters:
name - The non-null name of the search item.
className - The possibly null class name of the object bound to name. If null, the class name of obj is returned by getClassName(). If obj is also null, getClassName() will return null.
obj - The object bound to name. Can be null.
attrs - The attributes that were requested to be returned with this search item. Cannot be null.
isRelative - true if name is relative to the target context of the search (which is named by the first parameter of the search() method); false if name is a URL string.
See Also:
NameClassPair.setClassName(java.lang.String), NameClassPair.getClassName()
Method Detail

getAttributes

public Attributes getAttributes()
Retrieves the attributes in this search result.
Returns:
The non-null attributes in this search result. Can be empty.
See Also:
setAttributes(javax.naming.directory.Attributes)

setAttributes

public void setAttributes(Attributes attrs)
Sets the attributes of this search result to attrs.
Parameters:
attrs - The non-null attributes to use. Can be empty.
See Also:
getAttributes()

toString

public String toString()
Generates the string representation of this SearchResult. The string representation consists of the string representation of the binding and the string representation of this search result's attributes, separated by ':'. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
Overrides:
toString in class Binding
Returns:
The string representation of this SearchResult. Cannot be null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.naming.event Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.naming.event

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.util.EventObject (implements java.io.Serializable)
      • class javax.naming.event.NamingEvent
      • class javax.naming.event.NamingExceptionEvent

Interface Hierarchy

  • interface javax.naming.Context
    • interface javax.naming.directory.DirContext
      • interface javax.naming.event.EventDirContext (also extends javax.naming.event.EventContext)
    • interface javax.naming.event.EventContext
      • interface javax.naming.event.EventDirContext (also extends javax.naming.directory.DirContext)
  • interface java.util.EventListener
    • interface javax.naming.event.NamingListener
      • interface javax.naming.event.NamespaceChangeListener
      • interface javax.naming.event.ObjectChangeListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package javax.naming.event

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.naming.event

Packages that use javax.naming.event
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.

Classes in javax.naming.event used by javax.naming.event
EventContext
Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.
NamingEvent
This class represents an event fired by a naming/directory service.
NamingExceptionEvent
This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.
NamingListener
This interface is the root of listener interfaces that handle NamingEvents.

Classes in javax.naming.event used by javax.naming.ldap
NamingListener
This interface is the root of listener interfaces that handle NamingEvents.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.event.EventDirContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.event.EventDirContext

No usage of javax.naming.event.EventDirContext

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.event.NamespaceChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.event.NamespaceChangeListener

No usage of javax.naming.event.NamespaceChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.event.ObjectChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.event.ObjectChangeListener

No usage of javax.naming.event.ObjectChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.event.NamingEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.event.NamingEvent

Packages that use NamingEvent
javax.naming.event Provides support for event notification when accessing naming and directory services.

Uses of NamingEvent in javax.naming.event

Methods in javax.naming.event with parameters of type NamingEvent
void | NamespaceChangeListener.objectAdded(NamingEvent evt) Called when an object has been added.
void | NamespaceChangeListener.objectRemoved(NamingEvent evt) Called when an object has been removed.
void | NamespaceChangeListener.objectRenamed(NamingEvent evt) Called when an object has been renamed.
void | ObjectChangeListener.objectChanged(NamingEvent evt) Called when an object has been changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.event.NamingExceptionEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.event.NamingExceptionEvent

Packages that use NamingExceptionEvent
javax.naming.event Provides support for event notification when accessing naming and directory services.

Uses of NamingExceptionEvent in javax.naming.event

Methods in javax.naming.event with parameters of type NamingExceptionEvent
 void NamingListener.namingExceptionThrown(NamingExceptionEvent evt)
Called when a naming exception is thrown while attempting to fire a NamingEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.event.EventContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.event.EventContext

Packages that use EventContext
javax.naming.event Provides support for event notification when accessing naming and directory services.

Uses of EventContext in javax.naming.event

Subinterfaces of EventContext in javax.naming.event
 interface EventDirContext
Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.

Methods in javax.naming.event that return EventContext
EventContext | NamingEvent.getEventContext() Retrieves the event source that fired this event.
EventContext | NamingExceptionEvent.getEventContext() Retrieves the EventContext that fired this event.

Constructors in javax.naming.event with parameters of type EventContext
NamingEvent(EventContext source, int type, Binding newBd, Binding oldBd, Object changeInfo)
Constructs an instance of NamingEvent.
NamingExceptionEvent(EventContext source, NamingException exc)
Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.event.NamingListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.event.NamingListener

Packages that use NamingListener
javax.naming.event | Provides support for event notification when accessing naming and directory services.
javax.naming.ldap | Provides support for LDAPv3 extended operations and controls.

Uses of NamingListener in javax.naming.event

Subinterfaces of NamingListener in javax.naming.event
interface | NamespaceChangeListener Specifies the methods that a listener interested in namespace changes must implement.
interface | ObjectChangeListener Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.

Methods in javax.naming.event with parameters of type NamingListener
 void EventDirContext.addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l)
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
 void EventDirContext.addNamingListener(String target, String filter, SearchControls ctls, NamingListener l)
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
 void EventDirContext.addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l)
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
 void EventDirContext.addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l)
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.
 void NamingEvent.dispatch(NamingListener listener)
Invokes the appropriate listener method on this event.
 void NamingExceptionEvent.dispatch(NamingListener listener)
Invokes the namingExceptionThrown() method on a listener using this event.
 void EventContext.addNamingListener(Name target, int scope, NamingListener l)
Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.
 void EventContext.addNamingListener(String target, int scope, NamingListener l)
Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.
 void EventContext.removeNamingListener(NamingListener l)
Removes a listener from receiving naming events fired by this EventContext.

Uses of NamingListener in javax.naming.ldap

Subinterfaces of NamingListener in javax.naming.ldap
 interface UnsolicitedNotificationListener
This interface is for handling UnsolicitedNotificationEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


EventContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Interface EventContext

All Superinterfaces:
Context
All Known Subinterfaces:
EventDirContext
public interface EventContext
extends Context

Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.

Target

The name parameter in the addNamingListener() methods is referred to as the target. The target, along with the scope, identify the object(s) that the listener is interested in. It is possible to register interest in a target that does not exist, but there might be limitations in the extent to which this can be supported by the service provider and underlying protocol/service.

If a service only supports registration for existing targets, an attempt to register for a nonexistent target results in a NameNotFoundException being thrown as early as possible, preferably at the time addNamingListener() is called, or if that is not possible, the listener will receive the exception through the NamingExceptionEvent.

Also, for service providers that only support registration for existing targets, when the target that a listener has registered for is subsequently removed from the namespace, the listener is notified via a NamingExceptionEvent (containing a NameNotFoundException).

An application can use the method targetMustExist() to check whether a EventContext supports registration of nonexistent targets.

Event Source

The EventContext instance on which you invoke the registration methods is the event source of the events that are (potentially) generated. The source is not necessarily the object named by the target. Only when the target is the empty name is the object named by the target the source. In other words, the target, along with the scope parameter, are used to identify the object(s) that the listener is interested in, but the event source is the EventContext instance with which the listener has registered.

For example, suppose a listener makes the following registration:

    NamespaceChangeListener listener = ...;
    src.addNamingListener("x", SUBTREE_SCOPE, listener);
When an object named "x/y" is subsequently deleted, the corresponding NamingEvent (evt) must contain:
    evt.getEventContext() == src
    evt.getOldBinding().getName().equals("x/y")

Furthermore, listener registration/deregistration is with the EventContext instance, and not with the corresponding object in the namespace. If the program intends at some point to remove a listener, then it needs to keep a reference to the EventContext instance on which it invoked addNamingListener() (just as it needs to keep a reference to the listener in order to remove it later). It cannot expect to do a lookup() and get another instance of a EventContext on which to perform the deregistration.

Lifetime of Registration

A registered listener becomes deregistered when:
  • It is removed using removeNamingListener().
  • An exception is thrown while collecting information about the events. That is, when the listener receives a NamingExceptionEvent.
  • Context.close() is invoked on the EventContext instance with which it has registered.
Until that point, a EventContext instance that has outstanding listeners will continue to exist and be maintained by the service provider.

Listener Implementations

The registration/deregistration methods accept an instance of NamingListener. There are subinterfaces of NamingListener for different of event types of NamingEvent. For example, the ObjectChangeListener interface is for the NamingEvent.OBJECT_CHANGED event type. To register interest in multiple event types, the listener implementation should implement multiple NamingListener subinterfaces and use a single invocation of addNamingListener(). In addition to reducing the number of method calls and possibly the code size of the listeners, this allows some service providers to optimize the registration.

Threading Issues

Like Context instances in general, instances of EventContext are not guaranteed to be thread-safe. Care must be taken when multiple threads are accessing the same EventContext concurrently. See the package description for more information on threading issues.

Since:
1.3

Field Summary
static int | OBJECT_SCOPE Constant for expressing interest in events concerning the object named by the target.
static int | ONELEVEL_SCOPE Constant for expressing interest in events concerning objects in the context named by the target, excluding the context named by the target.
static int | SUBTREE_SCOPE Constant for expressing interest in events concerning objects in the subtree of the object named by the target, including the object named by the target.
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Method Summary
void | addNamingListener(Name target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.
void | addNamingListener(String target, int scope, NamingListener l) Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.
void | removeNamingListener(NamingListener l) Removes a listener from receiving naming events fired by this EventContext.
boolean | targetMustExist() Determines whether a listener can register interest in a target that does not exist.
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind

Field Detail

OBJECT_SCOPE

public static final int OBJECT_SCOPE
Constant for expressing interest in events concerning the object named by the target.

The value of this constant is 0.

ONELEVEL_SCOPE

public static final int ONELEVEL_SCOPE
Constant for expressing interest in events concerning objects in the context named by the target, excluding the context named by the target.

The value of this constant is 1.

SUBTREE_SCOPE

public static final int SUBTREE_SCOPE
Constant for expressing interest in events concerning objects in the subtree of the object named by the target, including the object named by the target.

The value of this constant is 2.

Method Detail

addNamingListener

public void addNamingListener(Name target,
                              int scope,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes. The event source of those events is this context. See the class description for a discussion on event source and target. See the descriptions of the constants OBJECT_SCOPE, ONELEVEL_SCOPE, and SUBTREE_SCOPE to see how scope affects the registration.

target needs to name a context only when scope is ONELEVEL_SCOPE. target may name a non-context if scope is either OBJECT_SCOPE or SUBTREE_SCOPE. Using SUBTREE_SCOPE for a non-context might be useful, for example, if the caller does not know in advance whether target is a context and just wants to register interest in the (possibly degenerate subtree) rooted at target.

When the listener is notified of an event, the listener may in invoked in a thread other than the one in which addNamingListener() is executed. Care must be taken when multiple threads are accessing the same EventContext concurrently. See the package description for more information on threading issues.

Parameters:
target - A nonnull name to be resolved relative to this context.
scope - One of OBJECT_SCOPE, ONELEVEL_SCOPE, or SUBTREE_SCOPE.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
removeNamingListener(javax.naming.event.NamingListener)

addNamingListener

public void addNamingListener(String target,
                              int scope,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when the object named by the string target name and scope changes. See the overload that accepts a Name for details.
Parameters:
target - The nonnull string name of the object resolved relative to this context.
scope - One of OBJECT_SCOPE, ONELEVEL_SCOPE, or SUBTREE_SCOPE.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
removeNamingListener(javax.naming.event.NamingListener)

removeNamingListener

public void removeNamingListener(NamingListener l)
                          throws NamingException
Removes a listener from receiving naming events fired by this EventContext. The listener may have registered more than once with this EventContext, perhaps with different target/scope arguments. After this method is invoked, the listener will no longer receive events with this EventContext instance as the event source (except for those events already in the process of being dispatched). If the listener was not, or is no longer, registered with this EventContext instance, this method does not do anything.
Parameters:
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while removing the listener.
See Also:
addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener)

targetMustExist

public boolean targetMustExist()
                        throws NamingException
Determines whether a listener can register interest in a target that does not exist.
Returns:
true if the target must exist; false if the target need not exist.
Throws:
NamingException - If the context's behavior in this regard cannot be determined.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EventDirContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Interface EventDirContext

All Superinterfaces:
Context, DirContext, EventContext
public interface EventDirContext
extends EventContext, DirContext

Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.

The methods in this interface support identification of objects by RFC 2254 search filters.

Using the search filter, it is possible to register interest in objects that do not exist at the time of registration but later come into existence and satisfy the filter. However, there might be limitations in the extent to which this can be supported by the service provider and underlying protocol/service. If the caller submits a filter that cannot be supported in this way, addNamingListener() throws an InvalidSearchFilterException.

See EventContext for a description of event source and target, and information about listener registration/deregistration that are also applicable to methods in this interface. See the package description for information on threading issues.

A SearchControls or array object passed as a parameter to any method is owned by the caller. The service provider will not modify the object or keep a reference to it.

Since:
1.3

Fields inherited from interface javax.naming.event.EventContext
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
Method Summary
void | addNamingListener(Name target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified.
void | addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.
void | addNamingListener(String target, String filter, Object[] filterArgs, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified.
void | addNamingListener(String target, String filter, SearchControls ctls, NamingListener l) Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified.
Methods inherited from interface javax.naming.event.EventContext
addNamingListener, addNamingListener, removeNamingListener, targetMustExist
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
Methods inherited from interface javax.naming.directory.DirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search

Method Detail

addNamingListener

public void addNamingListener(Name target,
                              String filter,
                              SearchControls ctls,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by target are modified.

The scope, returningObj flag, and returningAttributes flag from the search controls ctls are used to control the selection of objects that the listener is interested in, and determines what information is returned in the eventual NamingEvent object. Note that the requested information to be returned might not be present in the NamingEvent object if they are unavailable or could not be obtained by the service provider or service.

Parameters:
target - The nonnull name of the object resolved relative to this context.
filter - The nonnull string filter (see RFC2254).
ctls - The possibly null search controls. If null, the default search controls are used.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
EventContext.removeNamingListener(javax.naming.event.NamingListener), DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls)

addNamingListener

public void addNamingListener(String target,
                              String filter,
                              SearchControls ctls,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when objects identified by the search filter filter at the object named by the string target name are modified. See the overload that accepts a Name for details of how this method behaves.
Parameters:
target - The nonnull string name of the object resolved relative to this context.
filter - The nonnull string filter (see RFC2254).
ctls - The possibly null search controls. If null, the default search controls is used.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
EventContext.removeNamingListener(javax.naming.event.NamingListener), DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls)

addNamingListener

public void addNamingListener(Name target,
                              String filter,
                              Object[] filterArgs,
                              SearchControls ctls,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the target are modified. The scope, returningObj flag, and returningAttributes flag from the search controls ctls are used to control the selection of objects that the listener is interested in, and determines what information is returned in the eventual NamingEvent object. Note that the requested information to be returned might not be present in the NamingEvent object if they are unavailable or could not be obtained by the service provider or service.
Parameters:
target - The nonnull name of the object resolved relative to this context.
filter - The nonnull string filter (see RFC2254).
filterArgs - The possibly null array of arguments for the filter.
ctls - The possibly null search controls. If null, the default search controls are used.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
EventContext.removeNamingListener(javax.naming.event.NamingListener), DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)

addNamingListener

public void addNamingListener(String target,
                              String filter,
                              Object[] filterArgs,
                              SearchControls ctls,
                              NamingListener l)
                       throws NamingException
Adds a listener for receiving naming events fired when objects identified by the search filter filter and filter arguments at the object named by the string target name are modified. See the overload that accepts a Name for details of how this method behaves.
Parameters:
target - The nonnull string name of the object resolved relative to this context.
filter - The nonnull string filter (see RFC2254).
filterArgs - The possibly null array of arguments for the filter.
ctls - The possibly null search controls. If null, the default search controls is used.
l - The nonnull listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
See Also:
EventContext.removeNamingListener(javax.naming.event.NamingListener), DirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamespaceChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Interface NamespaceChangeListener

All Superinterfaces:
EventListener, NamingListener
public interface NamespaceChangeListener
extends NamingListener

Specifies the methods that a listener interested in namespace changes must implement. Specifically, the listener is interested in NamingEvents with event types of OBJECT_ADDED, OBJECT_RENAMED, or OBJECT_REMOVED.

Such a listener must:

  1. Implement this interface and its methods.
  2. Implement NamingListener.namingExceptionThrown() so that it will be notified of exceptions thrown while attempting to collect information about the events.
  3. Register with the source using the source's addNamingListener() method.
A listener that wants to be notified of OBJECT_CHANGED event types should also implement the ObjectChangeListener interface.

Since:
1.3
See Also:
NamingEvent, ObjectChangeListener, EventContext, EventDirContext

Method Summary
void | objectAdded(NamingEvent evt) Called when an object has been added.
void | objectRemoved(NamingEvent evt) Called when an object has been removed.
void | objectRenamed(NamingEvent evt) Called when an object has been renamed.
Methods inherited from interface javax.naming.event.NamingListener
namingExceptionThrown

Method Detail

objectAdded

public void objectAdded(NamingEvent evt)
Called when an object has been added.

The binding of the newly added object can be obtained using evt.getNewBinding().

Parameters:
evt - The nonnull event.
See Also:
NamingEvent.OBJECT_ADDED

objectRemoved

public void objectRemoved(NamingEvent evt)
Called when an object has been removed.

The binding of the newly removed object can be obtained using evt.getOldBinding().

Parameters:
evt - The nonnull event.
See Also:
NamingEvent.OBJECT_REMOVED

objectRenamed

public void objectRenamed(NamingEvent evt)
Called when an object has been renamed.

The binding of the renamed object can be obtained using evt.getNewBinding(). Its old binding (before the rename) can be obtained using evt.getOldBinding(). One of these may be null if the old/new binding was outside the scope in which the listener has registered interest.

Parameters:
evt - The nonnull event.
See Also:
NamingEvent.OBJECT_RENAMED
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Class NamingEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.naming.event.NamingEvent
All Implemented Interfaces:
Serializable
public class NamingEvent
extends EventObject

This class represents an event fired by a naming/directory service.

The NamingEvent's state consists of

  • The event source: the EventContext which fired this event.
  • The event type.
  • The new binding: information about the object after the change.
  • The old binding: information about the object before the change.
  • Change information: information about the change that triggered this event; usually service provider-specific or server-specific information.

Note that the event source is always the same EventContext instance that the listener has registered with. Furthermore, the names of the bindings in the NamingEvent are always relative to that instance. For example, suppose a listener makes the following registration:

    NamespaceChangeListener listener = ...;
    src.addNamingListener("x", SUBTREE_SCOPE, listener);
When an object named "x/y" is subsequently deleted, the corresponding NamingEvent (evt) must contain:
    evt.getEventContext() == src
    evt.getOldBinding().getName().equals("x/y")
Care must be taken when multiple threads are accessing the same EventContext concurrently. See the package description for more information on threading issues.

Since:
1.3
See Also:
NamingListener, EventContext, Serialized Form

Field Summary
protected Object | changeInfo Contains information about the change that generated this event.
protected Binding | newBinding Contains information about the object after the change.
static int | OBJECT_ADDED Naming event type for indicating that a new object has been added.
static int | OBJECT_CHANGED Naming event type for indicating that an object has been changed.
static int | OBJECT_REMOVED Naming event type for indicating that an object has been removed.
static int | OBJECT_RENAMED Naming event type for indicating that an object has been renamed.
protected Binding | oldBinding Contains information about the object before the change.
protected int | type Contains the type of this event.
Fields inherited from class java.util.EventObject
source
Constructor Summary
NamingEvent(EventContext source, int type, Binding newBd, Binding oldBd, Object changeInfo)
Constructs an instance of NamingEvent.
Method Summary
void | dispatch(NamingListener listener) Invokes the appropriate listener method on this event.
Object | getChangeInfo() Retrieves the change information for this event.
EventContext | getEventContext() Retrieves the event source that fired this event.
Binding | getNewBinding() Retrieves the binding of the object after the change.
Binding | getOldBinding() Retrieves the binding of the object before the change.
int | getType() Returns the type of this event.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

OBJECT_ADDED

public static final int OBJECT_ADDED
Naming event type for indicating that a new object has been added. The value of this constant is 0.

OBJECT_REMOVED

public static final int OBJECT_REMOVED
Naming event type for indicating that an object has been removed. The value of this constant is 1.

OBJECT_RENAMED

public static final int OBJECT_RENAMED
Naming event type for indicating that an object has been renamed. Note that some services might fire multiple events for a single logical rename operation. For example, the rename operation might be implemented by adding a binding with the new name and removing the old binding.

The old/new binding in NamingEvent may be null if the old name or new name is outside of the scope for which the listener has registered.

When an interior node in the namespace tree has been renamed, the topmost node which is part of the listener's scope should used to generate a rename event. The extent to which this can be supported is provider-specific. For example, a service might generate rename notifications for all descendants of the changed interior node and the corresponding provider might not be able to prevent those notifications from being propagated to the listeners.

The value of this constant is 2.

OBJECT_CHANGED

public static final int OBJECT_CHANGED
Naming event type for indicating that an object has been changed. The changes might include the object's attributes, or the object itself. Note that some services might fire multiple events for a single modification. For example, the modification might be implemented by first removing the old binding and adding a new binding containing the same name but a different object.

The value of this constant is 3.

changeInfo

protected Object changeInfo
Contains information about the change that generated this event.

type

protected int type
Contains the type of this event.
See Also:
OBJECT_ADDED, OBJECT_REMOVED, OBJECT_RENAMED, OBJECT_CHANGED

oldBinding

protected Binding oldBinding
Contains information about the object before the change.

newBinding

protected Binding newBinding
Contains information about the object after the change.
Constructor Detail

NamingEvent

public NamingEvent(EventContext source,
                   int type,
                   Binding newBd,
                   Binding oldBd,
                   Object changeInfo)
Constructs an instance of NamingEvent.

The names in newBd and oldBd are to be resolved relative to the event source source. For an OBJECT_ADDED event type, newBd must not be null. For an OBJECT_REMOVED event type, oldBd must not be null. For an OBJECT_CHANGED event type, newBd and oldBd must not be null. For an OBJECT_RENAMED event type, one of newBd or oldBd may be null if the new or old binding is outside of the scope for which the listener has registered.

Parameters:
source - The non-null context that fired this event.
type - The type of the event.
newBd - A possibly null binding before the change. See method description.
oldBd - A possibly null binding after the change. See method description.
changeInfo - A possibly null object containing information about the change.
See Also:
OBJECT_ADDED, OBJECT_REMOVED, OBJECT_RENAMED, OBJECT_CHANGED
Method Detail

getType

public int getType()
Returns the type of this event.
Returns:
The type of this event.
See Also:
OBJECT_ADDED, OBJECT_REMOVED, OBJECT_RENAMED, OBJECT_CHANGED

getEventContext

public EventContext getEventContext()
Retrieves the event source that fired this event. This returns the same object as EventObject.getSource().

If the result of this method is used to access the event source, for example, to look up the object or get its attributes, then it needs to be locked because implementations of Context are not guaranteed to be thread-safe (and EventContext is a subinterface of Context). See the package description for more information on threading issues.

Returns:
The non-null context that fired this event.

getOldBinding

public Binding getOldBinding()
Retrieves the binding of the object before the change.

The binding must be nonnull if the object existed before the change relative to the source context (getEventContext()). That is, it must be nonnull for OBJECT_REMOVED and OBJECT_CHANGED. For OBJECT_RENAMED, it is null if the object before the rename is outside of the scope for which the listener has registered interest; it is nonnull if the object is inside the scope before the rename.

The name in the binding is to be resolved relative to the event source getEventContext(). The object returned by Binding.getObject() may be null if such information is unavailable.

Returns:
The possibly null binding of the object before the change.

getNewBinding

public Binding getNewBinding()
Retrieves the binding of the object after the change.

The binding must be nonnull if the object existed after the change relative to the source context (getEventContext()). That is, it must be nonnull for OBJECT_ADDED and OBJECT_CHANGED. For OBJECT_RENAMED, it is null if the object after the rename is outside the scope for which the listener registered interest; it is nonnull if the object is inside the scope after the rename.

The name in the binding is to be resolved relative to the event source getEventContext(). The object returned by Binding.getObject() may be null if such information is unavailable.

Returns:
The possibly null binding of the object after the change.

getChangeInfo

public Object getChangeInfo()
Retrieves the change information for this event. The value of the change information is service-specific. For example, it could be an ID that identifies the change in a change log on the server.
Returns:
The possibly null change information of this event.

dispatch

public void dispatch(NamingListener listener)
Invokes the appropriate listener method on this event. The default implementation of this method handles the following event types: OBJECT_ADDED, OBJECT_REMOVED, OBJECT_RENAMED, OBJECT_CHANGED.

The listener method is executed in the same thread as this method. See the package description for more information on threading issues.

Parameters:
listener - The nonnull listener.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NamingExceptionEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Class NamingExceptionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.naming.event.NamingExceptionEvent
All Implemented Interfaces:
Serializable
public class NamingExceptionEvent
extends EventObject

This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException. This can happen, for example, if the server which the listener is using aborts subsequent to the addNamingListener() call.

Since:
1.3
See Also:
NamingListener.namingExceptionThrown(javax.naming.event.NamingExceptionEvent), EventContext, Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
NamingExceptionEvent(EventContext source, NamingException exc)
Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.
Method Summary
void | dispatch(NamingListener listener) Invokes the namingExceptionThrown() method on a listener using this event.
EventContext | getEventContext() Retrieves the EventContext that fired this event.
NamingException | getException() Retrieves the exception that was thrown.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NamingExceptionEvent

public NamingExceptionEvent(EventContext source,
                            NamingException exc)
Constructs an instance of NamingExceptionEvent using the context in which the NamingException was thrown and the exception that was thrown.
Parameters:
source - The non-null context in which the exception was thrown.
exc - The non-null NamingException that was thrown.
Method Detail

getException

public NamingException getException()
Retrieves the exception that was thrown.
Returns:
The exception that was thrown.

getEventContext

public EventContext getEventContext()
Retrieves the EventContext that fired this event. This returns the same object as EventObject.getSource().
Returns:
The non-null EventContext that fired this event.

dispatch

public void dispatch(NamingListener listener)
Invokes the namingExceptionThrown() method on a listener using this event.
Parameters:
listener - The non-null naming listener on which to invoke the method.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NamingListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Interface NamingListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
NamespaceChangeListener, ObjectChangeListener, UnsolicitedNotificationListener
public interface NamingListener
extends EventListener

This interface is the root of listener interfaces that handle NamingEvents. It does not make sense for a listener to implement just this interface. A listener typically implements a subinterface of NamingListener, such as ObjectChangeListener or NamespaceChangeListener.

This interface contains a single method, namingExceptionThrown(), that must be implemented so that the listener can be notified of exceptions that are thrown (by the service provider) while gathering information about the events that they're interested in. When this method is invoked, the listener has been automatically deregistered from the EventContext with which it has registered.

For example, suppose a listener implements ObjectChangeListener and registers with a EventContext. Then, if the connection to the server is subsequently broken, the listener will receive a NamingExceptionEvent and may take some corrective action, such as notifying the user of the application.

Since:
1.3
See Also:
NamingEvent, NamingExceptionEvent, EventContext, EventDirContext

Method Summary
 void namingExceptionThrown(NamingExceptionEvent evt)
Called when a naming exception is thrown while attempting to fire a NamingEvent.

Method Detail

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent evt)
Called when a naming exception is thrown while attempting to fire a NamingEvent.
Parameters:
evt - The nonnull event.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectChangeListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.event
Interface ObjectChangeListener

All Superinterfaces:
EventListener, NamingListener
public interface ObjectChangeListener
extends NamingListener

Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.

An OBJECT_CHANGED event type is fired when (the contents of) an object has changed. This might mean that its attributes have been modified, added, or removed, and/or that the object itself has been replaced. How the object has changed can be determined by examining the NamingEvent's old and new bindings.

A listener interested in OBJECT_CHANGED event types must:

  1. Implement this interface and its method (objectChanged())
  2. Implement NamingListener.namingExceptionThrown() so that it will be notified of exceptions thrown while attempting to collect information about the events.
  3. Register with the source using the source's addNamingListener() method.
A listener that wants to be notified of namespace change events should also implement the NamespaceChangeListener interface.

Since:
1.3
See Also:
NamingEvent, NamespaceChangeListener, EventContext, EventDirContext

Method Summary
 void objectChanged(NamingEvent evt)
Called when an object has been changed.
Methods inherited from interface javax.naming.event.NamingListener
namingExceptionThrown

Method Detail

objectChanged

public void objectChanged(NamingEvent evt)
Called when an object has been changed.

The binding of the changed object can be obtained using evt.getNewBinding(). Its old binding (before the change) can be obtained using evt.getOldBinding().

Parameters:
evt - The nonnull naming event.
See Also:
NamingEvent.OBJECT_CHANGED
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package javax.naming.event

Provides support for event notification when accessing naming and directory services.

See:
Description

Interface Summary
EventContext | Contains methods for registering/deregistering listeners to be notified of events fired when objects named in a context changes.
EventDirContext | Contains methods for registering listeners to be notified of events fired when objects named in a directory context changes.
NamespaceChangeListener | Specifies the methods that a listener interested in namespace changes must implement.
NamingListener | This interface is the root of listener interfaces that handle NamingEvents.
ObjectChangeListener | Specifies the method that a listener of a NamingEvent with event type of OBJECT_CHANGED must implement.

Class Summary
NamingEvent | This class represents an event fired by a naming/directory service.
NamingExceptionEvent | This class represents an event fired when the procedures/processes used to collect information for notifying listeners of NamingEvents threw a NamingException.

Package javax.naming.event Description

Provides support for event notification when accessing naming and directory services.

This package defines the event notification operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

Naming Events

This package defines a NamingEvent class to represent an event that is generated by a naming/directory service. It also defines subinterfaces of Context and DirContext, called EventContext and EventDirContext, through which applications can register their interest in events fired by the context.

NamingEvent represents an event that occurs in a naming or directory service. There are two categories of naming events:

  • Those that affect the namespace (add/remove/rename an object)
  • Those that affect the objects' contents.
Each category of events is handled by a corresponding listener: NamespaceChangeListener, ObjectChangeListener.

An application, for example, can register its interest in changes to objects in a context as follows:

EventContext src =
    (EventContext)(new InitialContext()).lookup("o=wiz,c=us");
src.addNamingListener("ou=users", EventContext.ONELEVEL_SCOPE,
    new ChangeHandler());
...
class ChangeHandler implements ObjectChangeListener {
    public void objectChanged(NamingEvent evt) {
        System.out.println(evt.getNewBinding());
    }
    public void namingExceptionThrown(NamingExceptionEvent evt) {
        System.out.println(evt.getException());
    }
}

Threading Issues

When an event is dispatched to a listener, the listener method (such as objectChanged()) may be executed in a thread other than the one in which the call to addNamingListener() was executed. The choice of which thread to use is made by the service provider. When an event is dispatched to multiple listeners, the service provider may choose (and is generally encouraged) to execute the listener methods concurrently in separate threads.

When a listener instance invokes NamingEvent.getEventContext(), it must take into account the possibility that other threads will be working with that context concurrently. Likewise, when a listener is registered via addNamingListener(), the registering thread must take into account the likely possibility that the service provider will later invoke the listeners in newly-created threads. As Context instances are not guaranteed to be thread-safe in general, all context operations must be synchronized as needed.

Exception Handling

When a listener registers for events with a context, the context might need to do some internal processing in order to collect information required to generate the events. The context, for example, might need to make a request to the server to register interest in changes on the server that will eventually be translated into events. If an exception occurs that prevents information about the events from being collected, the listener will never be notified of the events. When such an exception occurs, a NamingExceptionEvent is fired to notify the listener. The listener's namingExceptionThrown() method is invoked, as shown in the sample code above, and the listener is automatically deregistered.

Package Specification

The following documents can be found at the Java technology web site:

  • JNDI API Document (Postscript)
  • JNDI API Document (PDF)

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


InitialContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class InitialContext

java.lang.Object
  |
  +--javax.naming.InitialContext
All Implemented Interfaces:
Context
Direct Known Subclasses:
InitialDirContext
public class InitialContext
extends Object
implements Context

This class is the starting context for performing naming operations.

All naming operations are relative to a context. The initial context implements the Context interface and provides the starting point for resolution of names.

When the initial context is constructed, its environment is initialized with properties defined in the environment parameter passed to the constructor, and in any application resource files. In addition, a small number of standard JNDI properties may be specified as system properties or as applet parameters (through the use of Context.APPLET). These special properties are listed in the field detail sections of the Context and LdapContext interface documentation.

JNDI determines each property's value by merging the values from the following two sources, in order:

  1. The first occurrence of the property from the constructor's environment parameter and (for appropriate properties) the applet parameters and system properties.
  2. The application resource files (jndi.properties).
For each property found in both of these two sources, or in more than one application resource file, the property's value is determined as follows. If the property is one of the standard JNDI properties that specify a list of JNDI factories (see Context), all of the values are concatenated into a single colon-separated list. For other properties, only the first value found is used.

The initial context implementation is determined at runtime. The default policy uses the environment property "java.naming.factory.initial", which contains the class name of the initial context factory. An exception to this policy is made when resolving URL strings, as described below.

When a URL string (a String of the form scheme_id:rest_of_name) is passed as a name parameter to any method, a URL context factory for handling that scheme is located and used to resolve the URL. If no such factory is found, the initial context specified by "java.naming.factory.initial" is used. Similarly, when a CompositeName object whose first component is a URL string is passed as a name parameter to any method, a URL context factory is located and used to resolve the first name component. See NamingManager.getURLContext() for a description of how URL context factories are located.

This default policy of locating the initial context and URL context factories may be overridden by calling NamingManager.setInitialContextFactoryBuilder().

NoInitialContextException is thrown when an initial context cannot be instantiated. This exception can be thrown during any interaction with the InitialContext, not only when the InitialContext is constructed. For example, the implementation of the initial context might lazily retrieve the context only when actual methods are invoked on it. The application should not have any dependency on when the existence of an initial context is determined.

When the environment property "java.naming.factory.initial" is non-null, the InitialContext constructor will attempt to create the initial context specified therein. At that time, the initial context factory involved might throw an exception if a problem is encountered. However, it is provider implementation-dependent when it verifies and indicates to the users of the initial context any environment property- or connection- related problems. It can do so lazily--delaying until an operation is performed on the context, or eagerly, at the time the context is constructed.

An InitialContext instance is not synchronized against concurrent access by multiple threads. Multiple threads each manipulating a different InitialContext instance need not synchronize. Threads that need to access a single InitialContext instance concurrently should synchronize amongst themselves and provide the necessary locking.

Since:
JNDI 1.1 / Java 2 Platform, Standard Edition, v 1.3
See Also:
Context, NamingManager.setInitialContextFactoryBuilder

Field Summary
protected Context | defaultInitCtx Field holding the result of calling NamingManager.getInitialContext().
protected boolean | gotDefault Field indicating whether the initial context has been obtained by calling NamingManager.getInitialContext().
protected Hashtable | myProps The environment associated with this InitialContext.
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Constructor Summary
 | InitialContext() Constructs an initial context.
protected | InitialContext(boolean lazy) Constructs an initial context with the option of not initializing it.
 | InitialContext(Hashtable environment) Constructs an initial context using the supplied environment.
Method Summary
 Object addToEnvironment(String propName, Object propVal)
Adds a new environment property to the environment of this context.
 void bind(Name name, Object obj)
Binds a name to an object.
 void bind(String name, Object obj)
Binds a name to an object.
 void close()
Closes this context.
 Name composeName(Name name, Name prefix)
Composes the name of this context with a name relative to this context.
 String composeName(String name, String prefix)
Composes the name of this context with a name relative to this context.
 Context createSubcontext(Name name)
Creates and binds a new context.
 Context createSubcontext(String name)
Creates and binds a new context.
 void destroySubcontext(Name name)
Destroys the named context and removes it from the namespace.
 void destroySubcontext(String name)
Destroys the named context and removes it from the namespace.
protected  Context getDefaultInitCtx()
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx.
 Hashtable getEnvironment()
Retrieves the environment in effect for this context.
 String getNameInNamespace()
Retrieves the full name of this context within its own namespace.
 NameParser getNameParser(Name name)
Retrieves the parser associated with the named context.
 NameParser getNameParser(String name)
Retrieves the parser associated with the named context.
protected  Context getURLOrDefaultInitCtx(Name name)
Retrieves a context for resolving name.
protected  Context getURLOrDefaultInitCtx(String name)
Retrieves a context for resolving the string name name.
protected  void init(Hashtable environment)
Initializes the initial context using the supplied environment.
 NamingEnumeration list(Name name)
Enumerates the names bound in the named context, along with the class names of objects bound to them.
 NamingEnumeration list(String name)
Enumerates the names bound in the named context, along with the class names of objects bound to them.
 NamingEnumeration listBindings(Name name)
Enumerates the names bound in the named context, along with the objects bound to them.
 NamingEnumeration listBindings(String name)
Enumerates the names bound in the named context, along with the objects bound to them.
 Object lookup(Name name)
Retrieves the named object.
 Object lookup(String name)
Retrieves the named object.
 Object lookupLink(Name name)
Retrieves the named object, following links except for the terminal atomic component of the name.
 Object lookupLink(String name)
Retrieves the named object, following links except for the terminal atomic component of the name.
 void rebind(Name name, Object obj)
Binds a name to an object, overwriting any existing binding.
 void rebind(String name, Object obj)
Binds a name to an object, overwriting any existing binding.
 Object removeFromEnvironment(String propName)
Removes an environment property from the environment of this context.
 void rename(Name oldName, Name newName)
Binds a new name to the object bound to an old name, and unbinds the old name.
 void rename(String oldName, String newName)
Binds a new name to the object bound to an old name, and unbinds the old name.
 void unbind(Name name)
Unbinds the named object.
 void unbind(String name)
Unbinds the named object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

myProps

protected Hashtable myProps
The environment associated with this InitialContext. It is initialized to null and is updated by the constructor that accepts an environment or by the init() method.
See Also:
addToEnvironment(java.lang.String, java.lang.Object),
removeFromEnvironment(java.lang.String),
getEnvironment()

defaultInitCtx

protected Context defaultInitCtx
Field holding the result of calling NamingManager.getInitialContext(). It is set by getDefaultInitCtx() the first time getDefaultInitCtx() is called. Subsequent invocations of getDefaultInitCtx() return the value of defaultInitCtx.
See Also:
getDefaultInitCtx()

gotDefault

protected boolean gotDefault
Field indicating whether the initial context has been obtained by calling NamingManager.getInitialContext(). If true, its result is in defaultInitCtx.
Constructor Detail

InitialContext

protected InitialContext(boolean lazy)
                  throws NamingException
Constructs an initial context with the option of not initializing it. This may be used by a constructor in a subclass when the value of the environment parameter is not yet known at the time the InitialContext constructor is called. The subclass's constructor will call this constructor, compute the value of the environment, and then call init() before returning.
Parameters:
lazy - true means do not initialize the initial context; false is equivalent to calling new InitialContext()
Throws:
NamingException - if a naming exception is encountered
Since:
1.3
See Also:
init(Hashtable)

InitialContext

public InitialContext()
               throws NamingException
Constructs an initial context. No environment properties are supplied. Equivalent to new InitialContext(null).
Throws:
NamingException - if a naming exception is encountered
See Also:
InitialContext(Hashtable)

InitialContext

public InitialContext(Hashtable environment)
               throws NamingException
Constructs an initial context using the supplied environment. Environment properties are discussed in the class description.

This constructor will not modify environment or save a reference to it, but may save a clone.

Parameters:
environment - environment used to create the initial context. Null indicates an empty environment.
Throws:
NamingException - if a naming exception is encountered
Method Detail

init

protected void init(Hashtable environment)
             throws NamingException
Initializes the initial context using the supplied environment. Environment properties are discussed in the class description.

This method will modify environment and save a reference to it. The caller may no longer modify it.

Parameters:
environment - environment used to create the initial context. Null indicates an empty environment.
Throws:
NamingException - if a naming exception is encountered
Since:
1.3
See Also:
InitialContext(boolean)

getDefaultInitCtx

protected Context getDefaultInitCtx()
                             throws NamingException
Retrieves the initial context by calling NamingManager.getInitialContext() and cache it in defaultInitCtx. Set gotDefault so that we know we've tried this before.
Returns:
The non-null cached initial context.
Throws:
NoInitialContextException - If cannot find an initial context.
NamingException - If a naming exception was encountered.

getURLOrDefaultInitCtx

protected Context getURLOrDefaultInitCtx(String name)
                                  throws NamingException
Retrieves a context for resolving the string name name. If name name is a URL string, then attempt to find a URL context for it. If none is found, or if name is not a URL string, then return getDefaultInitCtx().

See getURLOrDefaultInitCtx(Name) for description of how a subclass should use this method.

Parameters:
name - The non-null name for which to get the context.
Returns:
A URL context for name or the cached initial context. The result cannot be null.
Throws:
NoInitialContextException - If cannot find an initial context.
NamingException - In a naming exception is encountered.
See Also:
NamingManager.getURLContext(java.lang.String, java.util.Hashtable)

getURLOrDefaultInitCtx

protected Context getURLOrDefaultInitCtx(Name name)
                                  throws NamingException
Retrieves a context for resolving name. If the first component of name name is a URL string, then attempt to find a URL context for it. If none is found, or if the first component of name is not a URL string, then return getDefaultInitCtx().

When creating a subclass of InitialContext, use this method as follows. Define a new method that uses this method to get an initial context of the desired subclass.

 protected XXXContext getURLOrDefaultInitXXXCtx(Name name)
 throws NamingException {
  Context answer = getURLOrDefaultInitCtx(name);
  if (!(answer instanceof XXXContext)) {
    if (answer == null) {
        throw new NoInitialContextException();
    } else {
        throw new NotContextException("Not an XXXContext");
    }
     }
    return (XXXContext)answer;
 }
When providing implementations for the new methods in the subclass, use this newly defined method to get the initial context.

 public Object XXXMethod1(Name name, ...) {
    throws NamingException {
    return getURLOrDefaultInitXXXCtx(name).XXXMethod1(name, ...);
 }
Parameters:
name - The non-null name for which to get the context.
Returns:
A URL context for name or the cached initial context. The result cannot be null.
Throws:
NoInitialContextException - If cannot find an initial context.
NamingException - In a naming exception is encountered.
See Also:
NamingManager.getURLContext(java.lang.String, java.util.Hashtable)

lookup

public Object lookup(String name)
              throws NamingException
Description copied from interface: Context
Retrieves the named object. See Context.lookup(Name) for details.
Specified by:
lookup in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the object to look up
Returns:
the object bound to name
Throws:
NamingException - if a naming exception is encountered

lookup

public Object lookup(Name name)
              throws NamingException
Description copied from interface: Context
Retrieves the named object. If name is empty, returns a new instance of this context (which represents the same naming context as this context, but its environment may be modified independently and it may be accessed concurrently).
Specified by:
lookup in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the object to look up
Returns:
the object bound to name
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.lookup(String), Context.lookupLink(Name)

bind

public void bind(String name,
                 Object obj)
          throws NamingException
Description copied from interface: Context
Binds a name to an object. See Context.bind(Name, Object) for details.
Specified by:
bind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered

bind

public void bind(Name name,
                 Object obj)
          throws NamingException
Description copied from interface: Context
Binds a name to an object. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.
Specified by:
bind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered
See Also:
Context.bind(String, Object), Context.rebind(Name, Object), DirContext.bind(Name, Object, javax.naming.directory.Attributes)

rebind

public void rebind(String name,
                   Object obj)
            throws NamingException
Description copied from interface: Context
Binds a name to an object, overwriting any existing binding. See Context.rebind(Name, Object) for details.
Specified by:
rebind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered

rebind

public void rebind(Name name,
                   Object obj)
            throws NamingException
Description copied from interface: Context
Binds a name to an object, overwriting any existing binding. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.

If the object is a DirContext, any existing attributes associated with the name are replaced with those of the object. Otherwise, any existing attributes associated with the name remain unchanged.

Specified by:
rebind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
Throws:
InvalidAttributesException - if object did not supply all mandatory attributes
NamingException - if a naming exception is encountered
See Also:
Context.rebind(String, Object), Context.bind(Name, Object), DirContext.rebind(Name, Object, javax.naming.directory.Attributes), DirContext

unbind

public void unbind(String name)
            throws NamingException
Description copied from interface: Context
Unbinds the named object. See Context.unbind(Name) for details.
Specified by:
unbind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to unbind; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NamingException - if a naming exception is encountered

unbind

public void unbind(Name name)
            throws NamingException
Description copied from interface: Context
Unbinds the named object. Removes the terminal atomic name in name from the target context--that named by all but the terminal atomic part of name.

This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist.

Any attributes associated with the name are removed. Intermediate contexts are not changed.

Specified by:
unbind in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name to unbind; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NamingException - if a naming exception is encountered
See Also:
Context.unbind(String)

rename

public void rename(String oldName,
                   String newName)
            throws NamingException
Description copied from interface: Context
Binds a new name to the object bound to an old name, and unbinds the old name. See Context.rename(Name, Name) for details.
Specified by:
rename in interface Context
Following copied from interface: javax.naming.Context
Parameters:
oldName - the name of the existing binding; may not be empty
newName - the name of the new binding; may not be empty
Throws:
NameAlreadyBoundException - if newName is already bound
NamingException - if a naming exception is encountered

rename

public void rename(Name oldName,
                   Name newName)
            throws NamingException
Description copied from interface: Context
Binds a new name to the object bound to an old name, and unbinds the old name. Both names are relative to this context. Any attributes associated with the old name become associated with the new name. Intermediate contexts of the old name are not changed.
Specified by:
rename in interface Context
Following copied from interface: javax.naming.Context
Parameters:
oldName - the name of the existing binding; may not be empty
newName - the name of the new binding; may not be empty
Throws:
NameAlreadyBoundException - if newName is already bound
NamingException - if a naming exception is encountered
See Also:
Context.rename(String, String),
Context.bind(Name, Object),
Context.rebind(Name, Object)

list

public NamingEnumeration list(String name)
                       throws NamingException
Description copied from interface: Context
Enumerates the names bound in the named context, along with the class names of objects bound to them. See Context.list(Name) for details.
Specified by:
list in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to list
Returns:
an enumeration of the names and class names of the bindings in this context. Each element of the enumeration is of type NameClassPair.
Throws:
NamingException - if a naming exception is encountered

list

public NamingEnumeration list(Name name)
                       throws NamingException
Description copied from interface: Context
Enumerates the names bound in the named context, along with the class names of objects bound to them. The contents of any subcontexts are not included.

If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.

Specified by:
list in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to list
Returns:
an enumeration of the names and class names of the bindings in this context. Each element of the enumeration is of type NameClassPair.
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.list(String), Context.listBindings(Name), NameClassPair

listBindings

public NamingEnumeration listBindings(String name)
                               throws NamingException
Description copied from interface: Context
Enumerates the names bound in the named context, along with the objects bound to them. See Context.listBindings(Name) for details.
Specified by:
listBindings in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to list
Returns:
an enumeration of the bindings in this context. Each element of the enumeration is of type Binding.
Throws:
NamingException - if a naming exception is encountered

listBindings

public NamingEnumeration listBindings(Name name)
                               throws NamingException
Description copied from interface: Context
Enumerates the names bound in the named context, along with the objects bound to them. The contents of any subcontexts are not included.

If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.

Specified by:
listBindings in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to list
Returns:
an enumeration of the bindings in this context. Each element of the enumeration is of type Binding.
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.listBindings(String), Context.list(Name), Binding

destroySubcontext

public void destroySubcontext(String name)
                       throws NamingException
Description copied from interface: Context
Destroys the named context and removes it from the namespace. See Context.destroySubcontext(Name) for details.
Specified by:
destroySubcontext in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to be destroyed; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NotContextException - if the name is bound but does not name a context, or does not name a context of the appropriate type
ContextNotEmptyException - if the named context is not empty
NamingException - if a naming exception is encountered

destroySubcontext

public void destroySubcontext(Name name)
                       throws NamingException
Description copied from interface: Context
Destroys the named context and removes it from the namespace. Any attributes associated with the name are also removed. Intermediate contexts are not destroyed.

This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context, but throws NameNotFoundException if any of the intermediate contexts do not exist.

In a federated naming system, a context from one naming system may be bound to a name in another. One can subsequently look up and perform operations on the foreign context using a composite name. However, an attempt destroy the context using this composite name will fail with NotContextException, because the foreign context is not a "subcontext" of the context in which it is bound. Instead, use unbind() to remove the binding of the foreign context. Destroying the foreign context requires that the destroySubcontext() be performed on a context from the foreign context's "native" naming system.

Specified by:
destroySubcontext in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to be destroyed; may not be empty
Throws:
NameNotFoundException - if an intermediate context does not exist
NotContextException - if the name is bound but does not name a context, or does not name a context of the appropriate type
ContextNotEmptyException - if the named context is not empty
NamingException - if a naming exception is encountered
See Also:
Context.destroySubcontext(String)

createSubcontext

public Context createSubcontext(String name)
                         throws NamingException
Description copied from interface: Context
Creates and binds a new context. See Context.createSubcontext(Name) for details.
Specified by:
createSubcontext in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to create; may not be empty
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if creation of the subcontext requires specification of mandatory attributes
NamingException - if a naming exception is encountered

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException
Description copied from interface: Context
Creates and binds a new context. Creates a new context with the given name and binds it in the target context (that named by all but terminal atomic component of the name). All intermediate contexts and the target context must already exist.
Specified by:
createSubcontext in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context to create; may not be empty
Returns:
the newly created context
Throws:
NameAlreadyBoundException - if name is already bound
InvalidAttributesException - if creation of the subcontext requires specification of mandatory attributes
NamingException - if a naming exception is encountered
See Also:
Context.createSubcontext(String), DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)

lookupLink

public Object lookupLink(String name)
                  throws NamingException
Description copied from interface: Context
Retrieves the named object, following links except for the terminal atomic component of the name. See Context.lookupLink(Name) for details.
Specified by:
lookupLink in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the object to look up
Returns:
the object bound to name, not following the terminal link (if any)
Throws:
NamingException - if a naming exception is encountered

lookupLink

public Object lookupLink(Name name)
                  throws NamingException
Description copied from interface: Context
Retrieves the named object, following links except for the terminal atomic component of the name. If the object bound to name is not a link, returns the object itself.
Specified by:
lookupLink in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the object to look up
Returns:
the object bound to name, not following the terminal link (if any).
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.lookupLink(String)

getNameParser

public NameParser getNameParser(String name)
                         throws NamingException
Description copied from interface: Context
Retrieves the parser associated with the named context. See Context.getNameParser(Name) for details.
Specified by:
getNameParser in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context from which to get the parser
Returns:
a name parser that can parse compound names into their atomic components
Throws:
NamingException - if a naming exception is encountered

getNameParser

public NameParser getNameParser(Name name)
                         throws NamingException
Description copied from interface: Context
Retrieves the parser associated with the named context. In a federation of namespaces, different naming systems will parse names differently. This method allows an application to get a parser for parsing names into their atomic components using the naming convention of a particular naming system. Within any single naming system, NameParser objects returned by this method must be equal (using the equals() test).
Specified by:
getNameParser in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - the name of the context from which to get the parser
Returns:
a name parser that can parse compound names into their atomic components
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.getNameParser(String), CompoundName

composeName

public String composeName(String name,
                          String prefix)
                   throws NamingException
Composes the name of this context with a name relative to this context. Since an initial context may never be named relative to any context other than itself, the value of the prefix parameter must be an empty name ("").
Specified by:
composeName in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - a name relative to this context
prefix - the name of this context relative to one of its ancestors
Returns:
the composition of prefix and name
Throws:
NamingException - if a naming exception is encountered

composeName

public Name composeName(Name name,
                        Name prefix)
                 throws NamingException
Composes the name of this context with a name relative to this context. Since an initial context may never be named relative to any context other than itself, the value of the prefix parameter must be an empty name.
Specified by:
composeName in interface Context
Following copied from interface: javax.naming.Context
Parameters:
name - a name relative to this context
prefix - the name of this context relative to one of its ancestors
Returns:
the composition of prefix and name
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.composeName(String, String)

addToEnvironment

public Object addToEnvironment(String propName,
                               Object propVal)
                        throws NamingException
Description copied from interface: Context
Adds a new environment property to the environment of this context. If the property already exists, its value is overwritten. See class description for more details on environment properties.
Specified by:
addToEnvironment in interface Context
Following copied from interface: javax.naming.Context
Parameters:
propName - the name of the environment property to add; may not be null
propVal - the value of the property to add; may not be null
Returns:
the previous value of the property, or null if the property was not in the environment before
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.getEnvironment(), Context.removeFromEnvironment(String)

removeFromEnvironment

public Object removeFromEnvironment(String propName)
                             throws NamingException
Description copied from interface: Context
Removes an environment property from the environment of this context. See class description for more details on environment properties.
Specified by:
removeFromEnvironment in interface Context
Following copied from interface: javax.naming.Context
Parameters:
propName - the name of the environment property to remove; may not be null
Returns:
the previous value of the property, or null if the property was not in the environment
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.getEnvironment(), Context.addToEnvironment(String, Object)

getEnvironment

public Hashtable getEnvironment()
                         throws NamingException
Description copied from interface: Context
Retrieves the environment in effect for this context. See class description for more details on environment properties.

The caller should not make any changes to the object returned: their effect on the context is undefined. The environment of this context may be changed using addToEnvironment() and removeFromEnvironment().

Specified by:
getEnvironment in interface Context
Following copied from interface: javax.naming.Context
Returns:
the environment of this context; never null
Throws:
NamingException - if a naming exception is encountered
See Also:
Context.addToEnvironment(String, Object), Context.removeFromEnvironment(String)

close

public void close()
           throws NamingException
Description copied from interface: Context
Closes this context. This method releases this context's resources immediately, instead of waiting for them to be released automatically by the garbage collector.

This method is idempotent: invoking it on a context that has already been closed has no effect. Invoking any other method on a closed context is not allowed, and results in undefined behaviour.

Specified by:
close in interface Context
Following copied from interface: javax.naming.Context
Throws:
NamingException - if a naming exception is encountered

getNameInNamespace

public String getNameInNamespace()
                          throws NamingException
Description copied from interface: Context
Retrieves the full name of this context within its own namespace.

Many naming services have a notion of a "full name" for objects in their respective namespaces. For example, an LDAP entry has a distinguished name, and a DNS record has a fully qualified name. This method allows the client application to retrieve this name. The string returned by this method is not a JNDI composite name and should not be passed directly to context methods. In naming systems for which the notion of full name does not make sense, OperationNotSupportedException is thrown.

Specified by:
getNameInNamespace in interface Context
Following copied from interface: javax.naming.Context
Returns:
this context's name in its own namespace; never null
Throws:
OperationNotSupportedException - if the naming system does not have the notion of a full name
NamingException - if a naming exception is encountered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsufficientResourcesException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class InsufficientResourcesException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.InsufficientResourcesException
All Implemented Interfaces:
Serializable
public class InsufficientResourcesException
extends NamingException

This exception is thrown when resources are not available to complete the requested operation. This might due to a lack of resources on the server or on the client. There are no restrictions to resource types, as different services might make use of different resources. Such restrictions might be due to physical limits and/or adminstrative quotas. Examples of limited resources are internal buffers, memory, network bandwidth.

InsufficientResourcesException is different from LimitExceededException in that the latter is due to user/system specified limits. See LimitExceededException for details.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InsufficientResourcesException()
Constructs a new instance of InsufficientResourcesException with all name resolution fields and explanation initialized to null.
InsufficientResourcesException(String explanation)
Constructs a new instance of InsufficientResourcesException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InsufficientResourcesException

public InsufficientResourcesException(String explanation)
Constructs a new instance of InsufficientResourcesException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

InsufficientResourcesException

public InsufficientResourcesException()
Constructs a new instance of InsufficientResourcesException with all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InterruptedNamingException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class InterruptedNamingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.InterruptedNamingException
All Implemented Interfaces:
Serializable
public class InterruptedNamingException
extends NamingException

This exception is thrown when the naming operation being invoked has been interrupted. For example, an application might interrupt a thread that is performing a search. If the search supports being interrupted, it will throw InterruptedNamingException. Whether an operation is interruptable and when depends on its implementation (as provided by the service providers). Different implementations have different ways of protecting their resources and objects from being damaged due to unexpected interrupts.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context, DirContext, Thread.interrupt(), InterruptedException, Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InterruptedNamingException()
Constructs an instance of InterruptedNamingException with all name resolution fields and explanation initialized to null.
InterruptedNamingException(String explanation)
Constructs an instance of InterruptedNamingException using an explanation of the problem.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InterruptedNamingException

public InterruptedNamingException(String explanation)
Constructs an instance of InterruptedNamingException using an explanation of the problem. All name resolution-related fields are initialized to null.
Parameters:
explanation - A possibly null message explaining the problem.
See Also:
Throwable.getMessage()

InterruptedNamingException

public InterruptedNamingException()
Constructs an instance of InterruptedNamingException with all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidNameException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class InvalidNameException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.InvalidNameException
All Implemented Interfaces:
Serializable
public class InvalidNameException
extends NamingException

This exception indicates that the name being specified does not conform to the naming syntax of a naming system. This exception is thrown by any of the methods that does name parsing (such as those in Context, DirContext, CompositeName and CompoundName).

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context, DirContext, CompositeName, CompoundName, NameParser, Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
InvalidNameException()
Constructs an instance of InvalidNameException with all fields set to null.
InvalidNameException(String explanation)
Constructs an instance of InvalidNameException using an explanation of the problem.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidNameException

public InvalidNameException(String explanation)
Constructs an instance of InvalidNameException using an explanation of the problem. All other fields are initialized to null.
Parameters:
explanation - A possibly null message explaining the problem.
See Also:
Throwable.getMessage()

InvalidNameException

public InvalidNameException()
Constructs an instance of InvalidNameException with all fields set to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.naming.ldap Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.naming.ldap

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.naming.ldap.ControlFactory
    • class java.util.EventObject (implements java.io.Serializable)
      • class javax.naming.ldap.UnsolicitedNotificationEvent
    • class javax.naming.InitialContext (implements javax.naming.Context)
      • class javax.naming.directory.InitialDirContext (implements javax.naming.directory.DirContext)
        • class javax.naming.ldap.InitialLdapContext (implements javax.naming.ldap.LdapContext)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.naming.NamingException
          • class javax.naming.ReferralException
            • class javax.naming.ldap.LdapReferralException

Interface Hierarchy

  • interface javax.naming.Context
    • interface javax.naming.directory.DirContext
      • interface javax.naming.ldap.LdapContext
  • interface java.util.EventListener
    • interface javax.naming.event.NamingListener
      • interface javax.naming.ldap.UnsolicitedNotificationListener
  • interface javax.naming.ldap.HasControls
    • interface javax.naming.ldap.UnsolicitedNotification (also extends javax.naming.ldap.ExtendedResponse)
  • interface java.io.Serializable
    • interface javax.naming.ldap.Control
    • interface javax.naming.ldap.ExtendedRequest
    • interface javax.naming.ldap.ExtendedResponse
      • interface javax.naming.ldap.UnsolicitedNotification (also extends javax.naming.ldap.HasControls)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.naming.ldap

Provides support for LDAPv3 extended operations and controls.

See:
Description

Interface Summary
Control | This interface represents an LDAPv3 control as defined in RFC 2251.
ExtendedRequest | This interface represents an LDAPv3 extended operation request as defined in RFC 2251.
ExtendedResponse | This interface represents an LDAP extended operation response as defined in RFC 2251.
HasControls | This interface is for returning controls with objects returned in NamingEnumerations.
LdapContext | This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.
UnsolicitedNotification | This interface represents an unsolicited notification as defined in RFC 2251.
UnsolicitedNotificationListener | This interface is for handling UnsolicitedNotificationEvent.

Class Summary
ControlFactory | This abstract class represents a factory for creating LDAPv3 controls.
InitialLdapContext | This class is the starting context for performing LDAPv3-style extended operations and controls.
UnsolicitedNotificationEvent | This class represents an event fired in response to an unsolicited notification sent by the LDAP server.

Exception Summary
LdapReferralException This abstract class is used to represent an LDAP referral exception.

Package javax.naming.ldap Description

Provides support for LDAPv3 extended operations and controls.

This package extends the directory operations of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

This package is for applications and service providers that deal with LDAPv3 extended operations and controls, as defined by RFC 2251. The core interface in this package is LdapContext, which defines methods on a context for performing extended operations and handling controls.

Extended Operations

This package defines the interface ExtendedRequest to represent the argument to an extended operation, and the interface ExtendedResponse to represent the result of the extended operation. An extended response is always paired with an extended request but not necessarily vice versa. That is, you can have an extended request that has no corresponding extended response.

An application typically does not deal directly with these interfaces. Instead, it deals with classes that implement these interfaces. The application gets these classes either as part of a repertoire of extended operations standardized through the IETF, or from directory vendors for vendor-specific extended operations. The request classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "get time" extended operation. It would supply classes such as GetTimeRequest and GetTimeResponse, so that applications can use this feature. An application would use these classes as follows:

GetTimeResponse resp =
    (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest());
long time = resp.getTime();

The GetTimeRequest and GetTimeResponse classes might be defined as follows:

public class GetTimeRequest implements ExtendedRequest {
    // User-friendly constructor
    public GetTimeRequest() {
    };

    // Methods used by service providers
    public String getID() {
        return GETTIME_REQ_OID;
    }
    public byte[] getEncodedValue() {
        return null;  // no value needed for get time request
    }
    public ExtendedResponse createExtendedResponse(
        String id, byte[] berValue, int offset, int length) throws NamingException {
        return new GetTimeResponse(id, berValue, offset, length);
    }
}
public class GetTimeResponse() implements ExtendedResponse {
    long time;
    // called by GetTimeRequest.createExtendedResponse()
    public GetTimeResponse(String id, byte[] berValue, int offset, int length)
        throws NamingException {
        // check validity of id
        long time =  ... // decode berValue to get time
    }

    // Type-safe and User-friendly methods
    public java.util.Date getDate() { return new java.util.Date(time); }
    public long getTime() { return time; }

    // Low level methods
    public byte[] getEncodedValue() {
        return // berValue saved;
    }
    public String getID() {
        return GETTIME_RESP_OID;
    }
}

Controls

This package defines the interface Control to represent an LDAPv3 control. It can be a control that is sent to an LDAP server (request control) or a control returned by an LDAP server (response control). Unlike extended requests and responses, there is not necessarily any pairing between request controls and response controls. You can send request controls and expect no response controls back, or receive response controls without sending any request controls.

An application typically does not deal directly with this interface. Instead, it deals with classes that implement this interface. The application gets control classes either as part of a repertoire of controls standardized through the IETF, or from directory vendors for vendor-specific controls. The request control classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response control classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response control classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "sort" request control, which when sent with a search request, asks the server to return the results of the search ordered by a particular attribute It would supply a class SortControl so that applications can use this feature. An application would use this class as follows:

Control[] reqCtls = new Control[] {new SortControl("age")};
ectx.setRequestControls(reqCtls);
NamingEnumeration enum = ectx.search(...);
The SortControl class might be defined as follows:
public class SortControl implements Control {
    // User-friendly constructor
    public SortControl(String attrID) {
        // encode attrID
    };

    // Methods used by service providers
    public String getID() {
        return SORT_OID;
    }
    public byte[] getEncodedValue() {
        return // encoded attrID
    }
    ...
}

When a service provider receives response controls, it uses the ControlFactory class to produce specific classes that implement the Control interface.

An LDAP server can send back response controls with an LDAP operation and also with enumeration results, such as those returned by a list or search operation. The LdapContext provides a method (getResponseControls()) for getting the response controls sent with an LDAP operation, while the HasControls interface is used to retrieve response controls associated with enumeration results.

For example, suppose an LDAP server sends back a "change ID" control in response to a successful modification. It would supply a class ChangeIDControl so that the application can use this feature. An application would perform an update, and then try to get the change ID.

// Perform update
Context ctx = ectx.createSubsubcontext("cn=newobj");

// Get response controls
Control[] respCtls = ectx.getResponseControls();
if (respCtls != null) {
    // Find the one we want
    for (int i = 0; i
The vendor might supply the following ChangeIDControl and VendorXControlFactory classes. The VendorXControlFactory will be used by the service provider when the provider receives response controls from the LDAP server.
public class ChangeIDControl implements Control {
    long id;

    // Constructor used by ControlFactory
    public ChangeIDControl(String OID, byte[] berVal) throws NamingException {
        // check validity of OID
        id = // extract change ID from berVal
    };

    // Type-safe and User-friendly method
    public long getChangeID() {
        return id;
    }

    // Low-level methods
    public String getID() {
        return CHANGEID_OID;
    }
    public byte[] getEncodedValue() {
        return // original berVal
    }
    ...
}
public class VendorXControlFactory extends ControlFactory {
    public VendorXControlFactory () {
    }

    public Control getControlInstance(Control orig) throws NamingException {
        if (isOneOfMyControls(orig.getID())) {
        ...

        // determine which of ours it is and call its constructor
        return (new ChangeIDControl(orig.getID(), orig.getEncodedValue()));
    }
        return null;  // not one of ours
    }
}

Package Specification

The following documents can be found at the Java technology web site:

  • JNDI API Document (Postscript)
  • JNDI API Document (PDF)

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.naming.ldap

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.naming.ldap

Packages that use javax.naming.ldap
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Classes in javax.naming.ldap used by javax.naming.ldap
Control
This interface represents an LDAPv3 control as defined in RFC 2251.
ExtendedRequest
This interface represents an LDAPv3 extended operation request as defined in RFC 2251.
ExtendedResponse
This interface represents an LDAP extended operation response as defined in RFC 2251.
HasControls
This interface is for returning controls with objects returned in NamingEnumerations.
LdapContext
This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations.
UnsolicitedNotification
This interface represents an unsolicited notification as defined in RFC 2251.
UnsolicitedNotificationEvent
This class represents an event fired in response to an unsolicited notification sent by the LDAP server.
UnsolicitedNotificationListener
This interface is for handling UnsolicitedNotificationEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ldap.ControlFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ldap.ControlFactory

No usage of javax.naming.ldap.ControlFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ldap.InitialLdapContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ldap.InitialLdapContext

No usage of javax.naming.ldap.InitialLdapContext

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ldap.LdapReferralException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ldap.LdapReferralException

No usage of javax.naming.ldap.LdapReferralException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.ldap.UnsolicitedNotificationEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.ldap.UnsolicitedNotificationEvent

Packages that use UnsolicitedNotificationEvent
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of UnsolicitedNotificationEvent in javax.naming.ldap

Methods in javax.naming.ldap with parameters of type UnsolicitedNotificationEvent
 void UnsolicitedNotificationListener.notificationReceived(UnsolicitedNotificationEvent evt)
Called when an unsolicited notification has been received.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.Control

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.Control

Packages that use Control
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of Control in javax.naming.ldap

Methods in javax.naming.ldap that return Control
Control[] | InitialLdapContext.getConnectControls()
Control[] | InitialLdapContext.getRequestControls()
Control[] | InitialLdapContext.getResponseControls()
Control[] | LdapContext.getConnectControls() Retrieves the connection request controls in effect for this context.
Control[] | LdapContext.getRequestControls() Retrieves the request controls in effect for this context.
Control[] | LdapContext.getResponseControls() Retrieves the response controls produced as a result of the last method invoked on this context.
Control[] | HasControls.getControls() Retrieves an array of Controls from the object that implements this interface.
abstract Control | ControlFactory.getControlInstance(Control ctl) Creates a control using this control factory.
static Control | ControlFactory.getControlInstance(Control ctl, Context ctx, Hashtable env) Creates a control using known control factories.

Methods in javax.naming.ldap with parameters of type Control
LdapContext | InitialLdapContext.newInstance(Control[] reqCtls)
void | InitialLdapContext.reconnect(Control[] connCtls)
void | InitialLdapContext.setRequestControls(Control[] requestControls)
LdapContext | LdapContext.newInstance(Control[] requestControls) Creates a new instance of this context initialized using request controls.
void | LdapContext.reconnect(Control[] connCtls) Reconnects to the LDAP server using the supplied controls and this context's environment.
void | LdapContext.setRequestControls(Control[] requestControls) Sets the request controls for methods subsequently invoked on this context.
abstract Control | ControlFactory.getControlInstance(Control ctl) Creates a control using this control factory.
static Control | ControlFactory.getControlInstance(Control ctl, Context ctx, Hashtable env) Creates a control using known control factories.
abstract Context | LdapReferralException.getReferralContext(Hashtable env, Control[] reqCtls) Retrieves the context at which to continue the method using request controls and environment properties.

Constructors in javax.naming.ldap with parameters of type Control
InitialLdapContext(Hashtable environment, Control[] connCtls)
Constructs an initial context using environment properties and connection request controls.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.ExtendedRequest

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.ExtendedRequest

Packages that use ExtendedRequest
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of ExtendedRequest in javax.naming.ldap

Methods in javax.naming.ldap with parameters of type ExtendedRequest
ExtendedResponse | InitialLdapContext.extendedOperation(ExtendedRequest request)
ExtendedResponse | LdapContext.extendedOperation(ExtendedRequest request) Performs an extended operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.ExtendedResponse

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.ExtendedResponse

Packages that use ExtendedResponse
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of ExtendedResponse in javax.naming.ldap

Subinterfaces of ExtendedResponse in javax.naming.ldap
 interface UnsolicitedNotification
This interface represents an unsolicited notification as defined in RFC 2251.

Methods in javax.naming.ldap that return ExtendedResponse
ExtendedResponse | ExtendedRequest.createExtendedResponse(String id, byte[] berValue, int offset, int length) Creates the response object that corresponds to this request.
ExtendedResponse | InitialLdapContext.extendedOperation(ExtendedRequest request)
ExtendedResponse | LdapContext.extendedOperation(ExtendedRequest request) Performs an extended operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.HasControls

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.HasControls

Packages that use HasControls
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of HasControls in javax.naming.ldap

Subinterfaces of HasControls in javax.naming.ldap
 interface UnsolicitedNotification
This interface represents an unsolicited notification as defined in RFC 2251.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.LdapContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.LdapContext

Packages that use LdapContext
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of LdapContext in javax.naming.ldap

Classes in javax.naming.ldap that implement LdapContext
 class InitialLdapContext
This class is the starting context for performing LDAPv3-style extended operations and controls.

Methods in javax.naming.ldap that return LdapContext
LdapContext | InitialLdapContext.newInstance(Control[] reqCtls)
LdapContext | LdapContext.newInstance(Control[] requestControls) Creates a new instance of this context initialized using request controls.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.UnsolicitedNotification

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.UnsolicitedNotification

Packages that use UnsolicitedNotification
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of UnsolicitedNotification in javax.naming.ldap

Methods in javax.naming.ldap that return UnsolicitedNotification
 UnsolicitedNotification UnsolicitedNotificationEvent.getNotification()
Returns the unsolicited notification.

Constructors in javax.naming.ldap with parameters of type UnsolicitedNotification
UnsolicitedNotificationEvent(Object src, UnsolicitedNotification notice)
Constructs a new instance of UnsolicitedNotificationEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.ldap.UnsolicitedNotificationListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.ldap.UnsolicitedNotificationListener

Packages that use UnsolicitedNotificationListener
javax.naming.ldap Provides support for LDAPv3 extended operations and controls.

Uses of UnsolicitedNotificationListener in javax.naming.ldap

Methods in javax.naming.ldap with parameters of type UnsolicitedNotificationListener
 void UnsolicitedNotificationEvent.dispatch(UnsolicitedNotificationListener listener)
Invokes the notificationReceived() method on a listener using this event.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Control

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface Control

All Superinterfaces:
Serializable
public interface Control
extends Serializable

This interface represents an LDAPv3 control as defined in RFC 2251.

The LDAPv3 protocol uses controls to send and receive additional data to affect the behavior of predefined operations. Controls can be sent along with any LDAP operation to the server. These are referred to as request controls. For example, a "sort" control can be sent with an LDAP search operation to request that the results be returned in a particular order. Solicited and unsolicited controls can also be returned with responses from the server. Such controls are referred to as response controls. For example, an LDAP server might define a special control to return change notifications.

This interface is used to represent both request and response controls.

Since:
1.3
See Also:
ControlFactory

Field Summary
static boolean | CRITICAL Indicates a critical control.
static boolean | NONCRITICAL Indicates a non-critical control.
Method Summary
byte[] | getEncodedValue() Retrieves the ASN.1 BER encoded value of the LDAP control.
String | getID() Retrieves the object identifier assigned for the LDAP control.
boolean | isCritical() Determines the criticality of the LDAP control.

Field Detail

CRITICAL

public static final boolean CRITICAL
Indicates a critical control. The value of this constant is true.

NONCRITICAL

public static final boolean NONCRITICAL
Indicates a non-critical control. The value of this constant is false.
Method Detail

getID

public String getID()
Retrieves the object identifier assigned for the LDAP control.
Returns:
The non-null object identifier string.

isCritical

public boolean isCritical()
Determines the criticality of the LDAP control. A critical control must not be ignored by the server. In other words, if the server receives a critical control that it does not support, regardless of whether the control makes sense for the operation, the operation will not be performed and an OperationNotSupportedException will be thrown.
Returns:
true if this control is critical; false otherwise.

getEncodedValue

public byte[] getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP control. The result is the raw BER bytes including the tag and length of the control's value. It does not include the controls OID or criticality. Null is returned if the value is absent.
Returns:
A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ControlFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Class ControlFactory

java.lang.Object
  |
  +--javax.naming.ldap.ControlFactory
public abstract class ControlFactory
extends Object

This abstract class represents a factory for creating LDAPv3 controls. LDAPv3 controls are defined in RFC 2251.

When a service provider receives a response control, it uses control factories to return the specific/appropriate control class implementation.

Since:
1.3
See Also:
Control

Constructor Summary
protected ControlFactory()
Method Summary
abstract Control | getControlInstance(Control ctl) Creates a control using this control factory.
static Control | getControlInstance(Control ctl, Context ctx, Hashtable env) Creates a control using known control factories.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ControlFactory

protected ControlFactory()
Method Detail

getControlInstance

public abstract Control getControlInstance(Control ctl)
                                    throws NamingException
Creates a control using this control factory.

The factory is used by the service provider to return controls that it reads from the LDAP protocol as specialized control classes. Without this mechanism, the provider would be returning controls that only contained data in BER encoded format.

Typically, ctl is a "basic" control containing BER encoded data. The factory is used to create a specialized control implementation, usually by decoding the BER encoded data, that provides methods to access that data in a type-safe and friendly manner.

For example, a factory might use the BER encoded data in basic control and return an instance of a VirtualListReplyControl.

If this factory cannot create a control using the argument supplied, it should return null. A factory should only throw an exception if it is sure that it is the only intended factory and that no other control factories should be tried. This might happen, for example, if the BER data in the control does not match what is expected of a control with the given OID. Since this method throws NamingException, any other internally generated exception that should be propagated must be wrapped inside a NamingException.

Parameters:
ctl - A non-null control.
Returns:
A possibly null Control.
Throws:
NamingException - If ctl contains invalid data that prevents it from being used to create a control. A factory should only throw an exception if it knows how to produce the control (identified by the OID) but is unable to because of, for example invalid BER data.

getControlInstance

public static Control getControlInstance(Control ctl,
                                         Context ctx,
                                         Hashtable env)
                                  throws NamingException
Creates a control using known control factories.

The following rule is used to create the control:

  • Use the control factories specified in the LdapContext.CONTROL_FACTORIES property of the environment, and of the provider resource file associated with ctx, in that order. The value of this property is a colon-separated list of factory class names that are tried in order, and the first one that succeeds in creating the control is the one used. If none of the factories can be loaded, return ctl. If an exception is encountered while creating the control, the exception is passed up to the caller.

Note that a control factory must be public and must have a public constructor that accepts no arguments.

Parameters:
ctl - The non-null control object containing the OID and BER data.
ctx - The possibly null context in which the control is being created. If null, no such information is available.
env - The possibly null environment of the context. This is used to find the value of the LdapContext.CONTROL_FACTORIES property.
Returns:
A control object created using ctl; or ctl if a control object cannot be created using the algorithm described above.
Throws:
NamingException - if a naming exception was encountered while attempting to create the control object. If one of the factories accessed throws an exception, it is propagated up to the caller. If an error was encountered while loading and instantiating the factory and object classes, the exception is wrapped inside a NamingException and then rethrown.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExtendedRequest

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface ExtendedRequest

All Superinterfaces:
Serializable
public interface ExtendedRequest
extends Serializable

This interface represents an LDAPv3 extended operation request as defined in RFC 2251.

     ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
              requestName      [0] LDAPOID,
              requestValue     [1] OCTET STRING OPTIONAL }
It comprises an object identifier string and an optional ASN.1 BER encoded value.

The methods in this class are used by the service provider to construct the bits to send to the LDAP server. Applications typically only deal with the classes that implement this interface, supplying them with any information required for a particular extended operation request. It would then pass such a class as an argument to the LdapContext.extendedOperation() method for performing the LDAPv3 extended operation.

For example, suppose the LDAP server supported a 'get time' extended operation. It would supply GetTimeRequest and GetTimeResponse classes:

 public class GetTimeRequest implements ExtendedRequest {
     public GetTimeRequest() {... };
     public ExtendedResponse createExtendedResponse(String id,
         byte[] berValue, int offset, int length)
        throws NamingException {
         return new GetTimeResponse(id, berValue, offset, length);
     }
     ...
 }
 public class GetTimeResponse implements ExtendedResponse {
     long time;
     public GetTimeResponse(String id, byte[] berValue, int offset,
         int length) throws NamingException {
         time =	... // decode berValue to get time
     }
     public java.util.Date getDate() { return new java.util.Date(time) };
     public long getTime() { return time };
     ...
 }
A program would use then these classes as follows:
 GetTimeResponse resp =
     (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest());
 long time = resp.getTime();

Since:
1.3
See Also:
ExtendedResponse, LdapContext.extendedOperation(javax.naming.ldap.ExtendedRequest)

Method Summary
ExtendedResponse | createExtendedResponse(String id, byte[] berValue, int offset, int length) Creates the response object that corresponds to this request.
byte[] | getEncodedValue() Retrieves the ASN.1 BER encoded value of the LDAP extended operation request.
String | getID() Retrieves the object identifier of the request.

Method Detail

getID

public String getID()
Retrieves the object identifier of the request.
Returns:
The non-null object identifier string representing the LDAP ExtendedRequest.requestName component.

getEncodedValue

public byte[] getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP extended operation request. Null is returned if the value is absent. The result is the raw BER bytes including the tag and length of the request value. It does not include the request OID. This method is called by the service provider to get the bits to put into the extended operation to be sent to the LDAP server.
Returns:
A possibly null byte array representing the ASN.1 BER encoded contents of the LDAP ExtendedRequest.requestValue component.
Throws:
IllegalStateException - If the encoded value cannot be retrieved because the request contains insufficient or invalid data/state.

createExtendedResponse

public ExtendedResponse createExtendedResponse(String id,
                                               byte[] berValue,
                                               int offset,
                                               int length)
                                        throws NamingException
Creates the response object that corresponds to this request.

After the service provider has sent the extended operation request to the LDAP server, it will receive a response from the server. If the operation failed, the provider will throw a NamingException. If the operation succeeded, the provider will invoke this method using the data that it got back in the response. It is the job of this method to return a class that implements the ExtendedResponse interface that is appropriate for the extended operation request.

For example, a Start TLS extended request class would need to know how to process a Start TLS extended response. It does this by creating a class that implements ExtendedResponse.

Parameters:
id - The possibly null object identifier of the response control.
berValue - The possibly null ASN.1 BER encoded value of the response control. This is the raw BER bytes including the tag and length of the response value. It does not include the response OID.
offset - The starting position in berValue of the bytes to use.
length - The number of bytes in berValue to use.
Returns:
A non-null object.
Throws:
NamingException - if cannot create extended response due to an error.
See Also:
ExtendedResponse
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ExtendedResponse

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface ExtendedResponse

All Superinterfaces:
Serializable
All Known Subinterfaces:
UnsolicitedNotification
public interface ExtendedResponse
extends Serializable

This interface represents an LDAP extended operation response as defined in RFC 2251.

     ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
          COMPONENTS OF LDAPResult,
          responseName     [10] LDAPOID OPTIONAL,
          response         [11] OCTET STRING OPTIONAL }
It comprises an optional object identifier and an optional ASN.1 BER encoded value.

The methods in this class can be used by the application to get low level information about the extended operation response. However, typically, the application will be using methods specific to the class that implements this interface. Such a class should have decoded the BER buffer in the response and should provide methods that allow the user to access that data in the response in a type-safe and friendly manner.

For example, suppose the LDAP server supported a 'get time' extended operation. It would supply GetTimeRequest and GetTimeResponse classes. The GetTimeResponse class might look like:

 public class GetTimeResponse implements ExtendedResponse {
     public java.util.Date getDate() {...};
     public long getTime() {...};
     ....
 }
A program would use then these classes as follows:
 GetTimeResponse resp =
     (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest());
 java.util.Date now = resp.getDate();

Since:
1.3
See Also:
ExtendedRequest

Method Summary
byte[] | getEncodedValue() Retrieves the ASN.1 BER encoded value of the LDAP extended operation response.
String | getID() Retrieves the object identifier of the response.

Method Detail

getID

public String getID()
Retrieves the object identifier of the response. The LDAP protocol specifies that the response object identifier is optional. If the server does not send it, the response will contain no ID (i.e. null).
Returns:
A possibly null object identifier string representing the LDAP ExtendedResponse.responseName component.

getEncodedValue

public byte[] getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP extended operation response. Null is returned if the value is absent from the response sent by the LDAP server. The result is the raw BER bytes including the tag and length of the response value. It does not include the response OID.
Returns:
A possibly null byte array representing the ASN.1 BER encoded contents of the LDAP ExtendedResponse.response component.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HasControls

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface HasControls

All Known Subinterfaces:
UnsolicitedNotification
public interface HasControls

This interface is for returning controls with objects returned in NamingEnumerations. For example, suppose a server sends back controls with the results of a search operation, the service provider would return a NamingEnumeration of objects that are both SearchResult and implement HasControls.

   NamingEnumeration enum = ectx.search((Name)name, filter, sctls);
   while (enum.hasMore()) {
    Object entry = enum.next();

    // Get search result
    SearchResult res = (SearchResult)entry;
    // do something with it

    // Get entry controls
      if (entry instanceof HasControls) {
        Control[] entryCtls = ((HasControls)entry).getControls();
        // do something with controls
    }
   }

Since:
1.3

Method Summary
 Control[] getControls()
Retrieves an array of Controls from the object that implements this interface.

Method Detail

getControls

public Control[] getControls()
                      throws NamingException
Retrieves an array of Controls from the object that implements this interface. It is null if there are no controls.
Returns:
A possibly null array of Control objects.
Throws:
NamingException - If cannot return controls due to an error.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InitialLdapContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Class InitialLdapContext

java.lang.Object
  |
  +--javax.naming.InitialContext
        |
        +--javax.naming.directory.InitialDirContext
              |
              +--javax.naming.ldap.InitialLdapContext
All Implemented Interfaces:
Context, DirContext, LdapContext
public class InitialLdapContext
extends InitialDirContext
implements LdapContext

This class is the starting context for performing LDAPv3-style extended operations and controls.

See javax.naming.InitialContext and javax.naming.InitialDirContext for details on synchronization, and the policy for how an initial context is created.

Request Controls

When you create an initial context (InitialLdapContext), you can specify a list of request controls. These controls will be used as the request controls for any implicit LDAP "bind" operation performed by the context or contexts derived from the context. These are called connection request controls. Use getConnectControls() to get a context's connection request controls.

The request controls supplied to the initial context constructor are not used as the context request controls for subsequent context operations such as searches and lookups. Context request controls are set and updated by using setRequestControls().

As shown, there can be two different sets of request controls associated with a context: connection request controls and context request controls. This is required for those applications needing to send critical controls that might not be applicable to both the context operation and any implicit LDAP "bind" operation. A typical user program would do the following:

 InitialLdapContext lctx = new InitialLdapContext(env, critConnCtls);
 lctx.setRequestControls(critModCtls);
 lctx.modifyAttributes(name, mods);
 Controls[] respCtls =  lctx.getResponseControls();
It specifies first the critical controls for creating the initial context (critConnCtls), and then sets the context's request controls (critModCtls) for the context operation. If for some reason lctx needs to reconnect to the server, it will use critConnCtls. See the LdapContext interface for more discussion about request controls.

Service provider implementors should read the "Service Provider" section in the LdapContext class description for implementation details.

Since:
1.3
See Also:
LdapContext, InitialContext, InitialDirContext, NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)

Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
Fields inherited from interface javax.naming.ldap.LdapContext
CONTROL_FACTORIES
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Constructor Summary
InitialLdapContext()
Constructs an initial context using no environment properties or connection request controls.
InitialLdapContext(Hashtable environment, Control[] connCtls)
Constructs an initial context using environment properties and connection request controls.
Method Summary
ExtendedResponse | extendedOperation(ExtendedRequest request) Performs an extended operation.
Control[] | getConnectControls() Retrieves the connection request controls in effect for this context.
Control[] | getRequestControls() Retrieves the request controls in effect for this context.
Control[] | getResponseControls() Retrieves the response controls produced as a result of the last method invoked on this context.
LdapContext | newInstance(Control[] reqCtls) Creates a new instance of this context initialized using request controls.
void | reconnect(Control[] connCtls) Reconnects to the LDAP server using the supplied controls and this context's environment.
void | setRequestControls(Control[] requestControls) Sets the request controls for methods subsequently invoked on this context.
Methods inherited from class javax.naming.directory.InitialDirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.naming.directory.DirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind

Constructor Detail

InitialLdapContext

public InitialLdapContext()
                   throws NamingException
Constructs an initial context using no environment properties or connection request controls. Equivalent to new InitialLdapContext(null, null).
Throws:
NamingException - if a naming exception is encountered

InitialLdapContext

public InitialLdapContext(Hashtable environment,
                          Control[] connCtls)
                   throws NamingException
Constructs an initial context using environment properties and connection request controls. See javax.naming.InitialContext for a discussion of environment properties.

This constructor will not modify its parameters or save references to them, but may save a clone or copy.

connCtls is used as the underlying context instance's connection request controls. See the class description for details.

Parameters:
environment - environment used to create the initial DirContext. Null indicates an empty environment.
connCtls - connection request controls for the initial context. If null, no connection request controls are used.
Throws:
NamingException - if a naming exception is encountered
See Also:
reconnect(javax.naming.ldap.Control[]), LdapContext.reconnect(javax.naming.ldap.Control[])
Method Detail

extendedOperation

public ExtendedResponse extendedOperation(ExtendedRequest request)
                                   throws NamingException
Description copied from interface: LdapContext
Performs an extended operation. This method is used to support LDAPv3 extended operations.
Specified by:
extendedOperation in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Parameters:
request - The non-null request to be performed.
Returns:
The possibly null response of the operation. null means the operation did not generate any response.
Throws:
NamingException - If an error occurred while performing the extended operation.

newInstance

public LdapContext newInstance(Control[] reqCtls)
                        throws NamingException
Description copied from interface: LdapContext
Creates a new instance of this context initialized using request controls. This method is a convenience method for creating a new instance of this context for the purposes of multithreaded access. For example, if multiple threads want to use different context request controls, each thread may use this method to get its own copy of this context and set/get context request controls without having to synchronize with other threads.

The new context has the same environment properties and connection request controls as this context. See the class description for details. Implementations might also allow this context and the new context to share the same network connection or other resources if doing so does not impede the independence of either context.

Specified by:
newInstance in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Parameters:
requestControls - The possibly null request controls to use for the new context. If null, the context is initialized with no request controls.
Returns:
A non-null LdapContext instance.
Throws:
NamingException - If an error occurred while creating the new instance.
See Also:
InitialLdapContext

reconnect

public void reconnect(Control[] connCtls)
               throws NamingException
Description copied from interface: LdapContext
Reconnects to the LDAP server using the supplied controls and this context's environment.

This method is a way to explicitly initiate an LDAP "bind" operation. For example, you can use this method to set request controls for the LDAP "bind" operation, or to explicitly connect to the server to get response controls returned by the LDAP "bind" operation.

This method sets this context's connCtls to be its new connection request controls. This context's context request controls are not affected. After this method has been invoked, any subsequent implicit reconnections will be done using connCtls. connCtls are also used as connection request controls for new context instances derived from this context. These connection request controls are not affected by setRequestControls().

Service provider implementors should read the "Service Provider" section in the class description for implementation details.

Specified by:
reconnect in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Parameters:
connCtls - The possibly null controls to use. If null, no controls are used.
Throws:
NamingException - If an error occurred while reconnecting.
See Also:
LdapContext.getConnectControls(), LdapContext.newInstance(javax.naming.ldap.Control[])

getConnectControls

public Control[] getConnectControls()
                             throws NamingException
Description copied from interface: LdapContext
Retrieves the connection request controls in effect for this context. The controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.
Specified by:
getConnectControls in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Returns:
A possibly-null array of controls. null means no connect controls have been set for this context.
Throws:
NamingException - If an error occurred while getting the request controls.

setRequestControls

public void setRequestControls(Control[] requestControls)
                        throws NamingException
Description copied from interface: LdapContext
Sets the request controls for methods subsequently invoked on this context. The request controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.

This removes any previous request controls and adds requestControls for use by subsequent methods invoked on this context. This method does not affect this context's connection request controls.

Note that requestControls will be in effect until the next invocation of setRequestControls(). You need to explicitly invoke setRequestControls() with null or an empty array to clear the controls if you don't want them to affect the context methods any more. To check what request controls are in effect for this context, use getRequestControls().

Specified by:
setRequestControls in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Parameters:
requestControls - The possibly null controls to use. If null, no controls are used.
Throws:
NamingException - If an error occurred while setting the request controls.
See Also:
LdapContext.getRequestControls()

getRequestControls

public Control[] getRequestControls()
                             throws NamingException
Description copied from interface: LdapContext
Retrieves the request controls in effect for this context. The request controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.
Specified by:
getRequestControls in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Returns:
A possibly-null array of controls. null means no request controls have been set for this context.
Throws:
NamingException - If an error occurred while getting the request controls.
See Also:
LdapContext.setRequestControls(javax.naming.ldap.Control[])

getResponseControls

public Control[] getResponseControls()
                              throws NamingException
Description copied from interface: LdapContext
Retrieves the response controls produced as a result of the last method invoked on this context. The response controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.

These response controls might have been generated by a successful or failed operation.

When a context method that may return response controls is invoked, response controls from the previous method invocation are cleared. getResponseControls() returns all of the response controls generated by LDAP operations used by the context method in the order received from the LDAP server. Invoking getResponseControls() does not clear the response controls. You can call it many times (and get back the same controls) until the next context method that may return controls is invoked.

Specified by:
getResponseControls in interface LdapContext
Following copied from interface: javax.naming.ldap.LdapContext
Returns:
A possibly null array of controls. If null, the previous method invoked on this context did not produce any controls.
Throws:
NamingException - If an error occurred while getting the response controls.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LdapContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface LdapContext

All Superinterfaces:
Context, DirContext
All Known Implementing Classes:
InitialLdapContext
public interface LdapContext
extends DirContext

This interface represents a context in which you can perform operations with LDAPv3-style controls and perform LDAPv3-style extended operations. For applications that do not require such controls or extended operations, the more generic javax.naming.directory.DirContext should be used instead.

Usage Details About Controls

This interface provides support for LDAP v3 controls. At a high level, this support allows a user program to set request controls for LDAP operations that are executed in the course of the user program's invocation of Context/DirContext methods, and read response controls resulting from LDAP operations. At the implementation level, there are some details that developers of both the user program and service providers need to understand in order to correctly use request and response controls.

Request Controls

There are two types of request controls:

  • Request controls that affect how a connection is created
  • Request controls that affect context methods
The former is used whenever a connection needs to be established or re-established with an LDAP server. The latter is used when all other LDAP operations are sent to the LDAP server. The reason why a distinction between these two types of request controls is necessary is because JNDI is a high-level API that does not deal directly with connections. It is the job of service providers to do any necessary connection management. Consequently, a single connection may be shared by multiple context instances, and a service provider is free to use its own algorithms to conserve connection and network usage. Thus, when a method is invoked on the context instance, the service provider might need to do some connection management in addition to performing the corresponding LDAP operations. For connection management, it uses the connection request controls, while for the normal LDAP operations, it uses the context request controls.

Unless explicitly qualified, the term "request controls" refers to context request controls.

Context Request Controls

There are two ways in which a context instance gets its request controls:
  1. ldapContext.newInstance(reqCtls)
  2. ldapContext.setRequestControls(reqCtls)
where ldapContext is an instance of LdapContext. Specifying null or an empty array for reqCtls means no request controls. newInstance() creates a new instance of a context using reqCtls, while setRequestControls() updates an existing context instance's request controls to reqCtls.

Unlike environment properties, request controls of a context instance are not inherited by context instances that are derived from it. Derived context instances have null as their context request controls. You must set the request controls of a derived context instance explicitly using setRequestControls().

A context instance's request controls are retrieved using the method getRequestControls().

Connection Request Controls

There are three ways in which connection request controls are set:
  1. new InitialLdapContext(env, connCtls)
  2. refException.getReferralContext(env, connCtls)
  3. ldapContext.reconnect(connCtls);
where refException is an instance of LdapReferralException, and ldapContext is an instance of LdapContext. Specifying null or an empty array for connCtls means no connection request controls.

Like environment properties, connection request controls of a context are inherited by contexts that are derived from it. Typically, you initialize the connection request controls using the InitialLdapContext constructor or LdapReferralContext.getReferralContext(). These connection request controls are inherited by contexts that share the same connection--that is, contexts derived from the initial or referral contexts.

Use reconnect() to change the connection request controls of a context. Invoking ldapContext.reconnect() affects only the connection used by ldapContext and any new contexts instances that are derived form ldapContext. Contexts that previously shared the connection with ldapContext remain unchanged. That is, a context's connection request controls must be explicitly changed and is not affected by changes to another context's connection request controls.

A context instance's connection request controls are retrieved using the method getConnectControls().

Service Provider Requirements

A service provider supports connection and context request controls in the following ways. Context request controls must be associated on a per context instance basis while connection request controls must be associated on a per connection instance basis. The service provider must look for the connection request controls in the environment property "java.naming.ldap.control.connect" and pass this environment property on to context instances that it creates.

Response Controls

The method LdapContext.getResponseControls() is used to retrieve the response controls generated by LDAP operations executed as the result of invoking a Context/DirContext operation. The result is all of the responses controls generated by the underlying LDAP operations, including any implicit reconnection. To get only the reconnection response controls, use reconnect() followed by getResponseControls().

Parameters

A Control[] array passed as a parameter to any method is owned by the caller. The service provider will not modify the array or keep a reference to it, although it may keep references to the individual Control objects in the array. A Control[] array returned by any method is immutable, and may not subsequently be modified by either the caller or the service provider.

Since:
1.3
See Also:
InitialLdapContext, LdapReferralException.getReferralContext(java.util.Hashtable,javax.naming.ldap.Control[])

Field Summary
static String CONTROL_FACTORIES
Constant that holds the name of the environment property for specifying the list of control factories to use.
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Method Summary
ExtendedResponse | extendedOperation(ExtendedRequest request) Performs an extended operation.
Control[] | getConnectControls() Retrieves the connection request controls in effect for this context.
Control[] | getRequestControls() Retrieves the request controls in effect for this context.
Control[] | getResponseControls() Retrieves the response controls produced as a result of the last method invoked on this context.
LdapContext | newInstance(Control[] requestControls) Creates a new instance of this context initialized using request controls.
void | reconnect(Control[] connCtls) Reconnects to the LDAP server using the supplied controls and this context's environment.
void | setRequestControls(Control[] requestControls) Sets the request controls for methods subsequently invoked on this context.
Methods inherited from interface javax.naming.directory.DirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind

Field Detail

CONTROL_FACTORIES

public static final String CONTROL_FACTORIES
Constant that holds the name of the environment property for specifying the list of control factories to use. The value of the property should be a colon-separated list of the fully qualified class names of factory classes that will create a control given another control. See ControlFactory.getControlInstance() for details. This property may be specified in the environment, an applet parameter, a system property, or one or more resource files.

The value of this constant is "java.naming.factory.control".

See Also:
ControlFactory, Context.addToEnvironment(java.lang.String, java.lang.Object), Context.removeFromEnvironment(java.lang.String)
Method Detail

extendedOperation

public ExtendedResponse extendedOperation(ExtendedRequest request)
                                   throws NamingException
Performs an extended operation. This method is used to support LDAPv3 extended operations.
Parameters:
request - The non-null request to be performed.
Returns:
The possibly null response of the operation. null means the operation did not generate any response.
Throws:
NamingException - If an error occurred while performing the extended operation.

newInstance

public LdapContext newInstance(Control[] requestControls)
                        throws NamingException
Creates a new instance of this context initialized using request controls. This method is a convenience method for creating a new instance of this context for the purposes of multithreaded access. For example, if multiple threads want to use different context request controls, each thread may use this method to get its own copy of this context and set/get context request controls without having to synchronize with other threads.

The new context has the same environment properties and connection request controls as this context. See the class description for details. Implementations might also allow this context and the new context to share the same network connection or other resources if doing so does not impede the independence of either context.

Parameters:
requestControls - The possibly null request controls to use for the new context. If null, the context is initialized with no request controls.
Returns:
A non-null LdapContext instance.
Throws:
NamingException - If an error occurred while creating the new instance.
See Also:
InitialLdapContext

reconnect

public void reconnect(Control[] connCtls)
               throws NamingException
Reconnects to the LDAP server using the supplied controls and this context's environment.

This method is a way to explicitly initiate an LDAP "bind" operation. For example, you can use this method to set request controls for the LDAP "bind" operation, or to explicitly connect to the server to get response controls returned by the LDAP "bind" operation.

This method sets this context's connCtls to be its new connection request controls. This context's context request controls are not affected. After this method has been invoked, any subsequent implicit reconnections will be done using connCtls. connCtls are also used as connection request controls for new context instances derived from this context. These connection request controls are not affected by setRequestControls().

Service provider implementors should read the "Service Provider" section in the class description for implementation details.

Parameters:
connCtls - The possibly null controls to use. If null, no controls are used.
Throws:
NamingException - If an error occurred while reconnecting.
See Also:
getConnectControls(), newInstance(javax.naming.ldap.Control[])

getConnectControls

public Control[] getConnectControls()
                             throws NamingException
Retrieves the connection request controls in effect for this context. The controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.
Returns:
A possibly-null array of controls. null means no connect controls have been set for this context.
Throws:
NamingException - If an error occurred while getting the request controls.

setRequestControls

public void setRequestControls(Control[] requestControls)
                        throws NamingException
Sets the request controls for methods subsequently invoked on this context. The request controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.

This removes any previous request controls and adds requestControls for use by subsequent methods invoked on this context. This method does not affect this context's connection request controls.

Note that requestControls will be in effect until the next invocation of setRequestControls(). You need to explicitly invoke setRequestControls() with null or an empty array to clear the controls if you don't want them to affect the context methods any more. To check what request controls are in effect for this context, use getRequestControls().

Parameters:
requestControls - The possibly null controls to use. If null, no controls are used.
Throws:
NamingException - If an error occurred while setting the request controls.
See Also:
getRequestControls()

getRequestControls

public Control[] getRequestControls()
                             throws NamingException
Retrieves the request controls in effect for this context. The request controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.
Returns:
A possibly-null array of controls. null means no request controls have been set for this context.
Throws:
NamingException - If an error occurred while getting the request controls.
See Also:
setRequestControls(javax.naming.ldap.Control[])

getResponseControls

public Control[] getResponseControls()
                              throws NamingException
Retrieves the response controls produced as a result of the last method invoked on this context. The response controls are owned by the JNDI implementation and are immutable. Neither the array nor the controls may be modified by the caller.

These response controls might have been generated by a successful or failed operation.

When a context method that may return response controls is invoked, response controls from the previous method invocation are cleared. getResponseControls() returns all of the response controls generated by LDAP operations used by the context method in the order received from the LDAP server. Invoking getResponseControls() does not clear the response controls. You can call it many times (and get back the same controls) until the next context method that may return controls is invoked.

Returns:
A possibly null array of controls. If null, the previous method invoked on this context did not produce any controls.
Throws:
NamingException - If an error occurred while getting the response controls.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LdapReferralException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Class LdapReferralException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.ReferralException
                          |
                          +--javax.naming.ldap.LdapReferralException
All Implemented Interfaces:
Serializable
public abstract class LdapReferralException
extends ReferralException

This abstract class is used to represent an LDAP referral exception. It extends the base ReferralException by providing a getReferralContext() method that accepts request controls. LdapReferralException is an abstract class. Concrete implementations of it determine its synchronization and serialization properties.

A Control[] array passed as a parameter to the getReferralContext() method is owned by the caller. The service provider will not modify the array or keep a reference to it, although it may keep references to the individual Control objects in the array.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
protected | LdapReferralException() Constructs a new instance of LdapReferralException.
protected | LdapReferralException(String explanation) Constructs a new instance of LdapReferralException using the explanation supplied.
Method Summary
abstract Context | getReferralContext() Retrieves the context at which to continue the method using the context's environment and no controls.
abstract Context | getReferralContext(Hashtable env) Retrieves the context at which to continue the method using environment properties and no controls.
abstract Context | getReferralContext(Hashtable env, Control[] reqCtls) Retrieves the context at which to continue the method using request controls and environment properties.
Methods inherited from class javax.naming.ReferralException
getReferralInfo, retryReferral, skipReferral
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LdapReferralException

protected LdapReferralException(String explanation)
Constructs a new instance of LdapReferralException using the explanation supplied. All other fields are set to null.
Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage()

LdapReferralException

protected LdapReferralException()
Constructs a new instance of LdapReferralException. All fields are set to null.
Method Detail

getReferralContext

public abstract Context getReferralContext()
                                    throws NamingException
Retrieves the context at which to continue the method using the context's environment and no controls. The referral context is created using the environment properties of the context that threw the ReferralException and no controls.

This method is equivalent to

 getReferralContext(ctx.getEnvironment(), null);
where ctx is the context that threw the ReferralException.

It is overridden in this class for documentation purposes only. See ReferralException for how to use this method.

Overrides:
getReferralContext in class ReferralException
Returns:
The non-null context at which to continue the method.
Throws:
NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

getReferralContext

public abstract Context getReferralContext(Hashtable env)
                                    throws NamingException
Retrieves the context at which to continue the method using environment properties and no controls. The referral context is created using env as its environment properties and no controls.

This method is equivalent to

 getReferralContext(env, null);

It is overridden in this class for documentation purposes only. See ReferralException for how to use this method.

Overrides:
getReferralContext in class ReferralException
Parameters:
env - The possibly null environment to use when retrieving the referral context. If null, no environment properties will be used.
Returns:
The non-null context at which to continue the method.
Throws:
NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

getReferralContext

public abstract Context getReferralContext(Hashtable env,
                                           Control[] reqCtls)
                                    throws NamingException
Retrieves the context at which to continue the method using request controls and environment properties. Regardless of whether a referral is encountered directly during a context operation, or indirectly, for example, during a search enumeration, the referral exception should provide a context at which to continue the operation. To continue the operation, the client program should re-invoke the method using the same arguments as the original invocation.

reqCtls is used when creating the connection to the referred server. These controls will be used as the connection request controls for the context and context instances derived from the context. reqCtls will also be the context's request controls for subsequent context operations. See the LdapContext class description for details.

This method should be used instead of the other two overloaded forms when the caller needs to supply request controls for creating the referral context. It might need to do this, for example, when it needs to supply special controls relating to authentication.

Service provider implementors should read the "Service Provider" section in the LdapContext class description for implementation details.

Parameters:
reqCtls - The possibly null request controls to use for the new context. If null or the empty array means use no request controls.
env - The possibly null environment properties to use when for the new context. If null, the context is initialized with no environment properties.
Returns:
The non-null context at which to continue the method.
Throws:
NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnsolicitedNotification

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface UnsolicitedNotification

All Superinterfaces:
ExtendedResponse, HasControls, Serializable
public interface UnsolicitedNotification
extends ExtendedResponse, HasControls

This interface represents an unsolicited notification as defined in RFC 2251. An unsolicited notification is sent by the LDAP server to the LDAP client without any provocation from the client. Its format is that of an extended response (ExtendedResponse).

Since:
1.3
See Also:
ExtendedResponse, UnsolicitedNotificationEvent, UnsolicitedNotificationListener

Method Summary
NamingException | getException() Retrieves the exception as constructed using information sent by the server.
String[] | getReferrals() Retrieves the referral(s) sent by the server.
Methods inherited from interface javax.naming.ldap.ExtendedResponse
getEncodedValue, getID
Methods inherited from interface javax.naming.ldap.HasControls
getControls

Method Detail

getReferrals

public String[] getReferrals()
Retrieves the referral(s) sent by the server.
Returns:
A possibly null array of referrals, each of which is represented by a URL string. If null, no referral was sent by the server.

getException

public NamingException getException()
Retrieves the exception as constructed using information sent by the server.
Returns:
A possibly null exception as constructed using information sent by the server. If null, a "success" status was indicated by the server.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsolicitedNotificationEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Class UnsolicitedNotificationEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.naming.ldap.UnsolicitedNotificationEvent
All Implemented Interfaces:
Serializable
public class UnsolicitedNotificationEvent
extends EventObject

This class represents an event fired in response to an unsolicited notification sent by the LDAP server.

Since:
1.3
See Also:
UnsolicitedNotification,
UnsolicitedNotificationListener,
EventContext.addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener),
EventDirContext.addNamingListener(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls, javax.naming.event.NamingListener),
EventContext.removeNamingListener(javax.naming.event.NamingListener), Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
UnsolicitedNotificationEvent(Object src, UnsolicitedNotification notice)
Constructs a new instance of UnsolicitedNotificationEvent.
Method Summary
void | dispatch(UnsolicitedNotificationListener listener) Invokes the notificationReceived() method on a listener using this event.
UnsolicitedNotification | getNotification() Returns the unsolicited notification.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsolicitedNotificationEvent

public UnsolicitedNotificationEvent(Object src,
                                    UnsolicitedNotification notice)
Constructs a new instance of UnsolicitedNotificationEvent.
Parameters:
src - The non-null source that fired the event.
notice - The non-null unsolicited notification.
Method Detail

getNotification

public UnsolicitedNotification getNotification()
Returns the unsolicited notification.
Returns:
The non-null unsolicited notification that caused this event to be fired.

dispatch

public void dispatch(UnsolicitedNotificationListener listener)
Invokes the notificationReceived() method on a listener using this event.
Parameters:
listener - The non-null listener on which to invoke notificationReceived.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnsolicitedNotificationListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.ldap
Interface UnsolicitedNotificationListener

All Superinterfaces:
EventListener, NamingListener
public interface UnsolicitedNotificationListener
extends NamingListener

This interface is for handling UnsolicitedNotificationEvent. "Unsolicited notification" is defined in RFC 2251. It allows the server to send unsolicited notifications to the client. A UnsolicitedNotificationListener must:

  1. Implement this interface and its method
  2. Implement NamingListener.namingExceptionThrown() so that it will be notified of exceptions thrown while attempting to collect unsolicited notification events.
  3. Register with the context using one of the addNamingListener() methods from EventContext or EventDirContext. Only the NamingListener argument of these methods are applicable; the rest are ignored for a UnsolicitedNotificationListener. (These arguments might be applicable to the listener if it implements other listener interfaces).

Since:
1.3
See Also:
UnsolicitedNotificationEvent,
UnsolicitedNotification,
EventContext.addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener),
EventDirContext.addNamingListener(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls, javax.naming.event.NamingListener),
EventContext.removeNamingListener(javax.naming.event.NamingListener)

Method Summary
 void notificationReceived(UnsolicitedNotificationEvent evt)
Called when an unsolicited notification has been received.
Methods inherited from interface javax.naming.event.NamingListener
namingExceptionThrown

Method Detail

notificationReceived

public void notificationReceived(UnsolicitedNotificationEvent evt)
Called when an unsolicited notification has been received.
Parameters:
evt - The non-null UnsolicitedNotificationEvent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


LimitExceededException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class LimitExceededException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LimitExceededException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SizeLimitExceededException, TimeLimitExceededException
public class LimitExceededException
extends NamingException

This exception is thrown when a method terminates abnormally due to a user or system specified limit. This is different from a InsufficientResourceException in that LimitExceededException is due to a user/system specified limit. For example, running out of memory to complete the request would be an insufficient resource. The client asking for 10 answers and getting back 11 is a size limit exception.

Examples of these limits include client and server configuration limits such as size, time, number of hops, etc.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
LimitExceededException()
Constructs a new instance of LimitExceededException with all name resolution fields and explanation initialized to null.
LimitExceededException(String explanation)
Constructs a new instance of LimitExceededException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LimitExceededException

public LimitExceededException()
Constructs a new instance of LimitExceededException with all name resolution fields and explanation initialized to null.

LimitExceededException

public LimitExceededException(String explanation)
Constructs a new instance of LimitExceededException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null detail about this exception.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class LinkException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LinkException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LinkLoopException, MalformedLinkException
public class LinkException
extends NamingException

This exception is used to describe problems encounter while resolving links. Addition information is added to the base NamingException for pinpointing the problem with the link.

Analogous to how NamingException captures name resolution information, LinkException captures "link"-name resolution information pinpointing the problem encountered while resolving a link. All these fields may be null.

  • Link Resolved Name. Portion of link name that has been resolved.
  • Link Resolved Object. Object to which resolution of link name proceeded.
  • Link Remaining Name. Portion of link name that has not been resolved.
  • Link Explanation. Detail explaining why link resolution failed.

A LinkException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single LinkException instance should lock the object.

Since:
1.3
See Also:
Context.lookupLink(javax.naming.Name), LinkRef, Serialized Form

Field Summary
protected String | linkExplanation Contains the exception of why resolution of the link failed.
protected Name | linkRemainingName Contains the remaining link name that has not been resolved yet.
protected Name | linkResolvedName Contains the part of the link that has been successfully resolved.
protected Object | linkResolvedObj Contains the object to which resolution of the part of the link was successful.
Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
LinkException()
Constructs a new instance of LinkException.
LinkException(String explanation)
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
Method Summary
String | getLinkExplanation() Retrieves the explanation associated with the problem encounter when resolving a link.
Name | getLinkRemainingName() Retrieves the remaining unresolved portion of the link name.
Name | getLinkResolvedName() Retrieves the leading portion of the link name that was resolved successfully.
Object | getLinkResolvedObj() Retrieves the object to which resolution was successful.
void | setLinkExplanation(String msg) Sets the explanation associated with the problem encounter when resolving a link.
void | setLinkRemainingName(Name name) Sets the remaining link name field of this exception.
void | setLinkResolvedName(Name name) Sets the resolved link name field of this exception.
void | setLinkResolvedObj(Object obj) Sets the link resolved object field of this exception.
String | toString() Generates the string representation of this exception.
String | toString(boolean detail) Generates the string representation of this exception.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

linkResolvedName

protected Name linkResolvedName
Contains the part of the link that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getLinkResolvedName(), setLinkResolvedName(javax.naming.Name)

linkResolvedObj

protected Object linkResolvedObj
Contains the object to which resolution of the part of the link was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getLinkResolvedObj(), setLinkResolvedObj(java.lang.Object)

linkRemainingName

protected Name linkRemainingName
Contains the remaining link name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getLinkRemainingName(), setLinkRemainingName(javax.naming.Name)

linkExplanation

protected String linkExplanation
Contains the exception of why resolution of the link failed. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getLinkExplanation(), setLinkExplanation(java.lang.String)
Constructor Detail

LinkException

public LinkException(String explanation)
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

LinkException

public LinkException()
Constructs a new instance of LinkException. All the non-link-related and link-related fields are initialized to null.
Method Detail

getLinkResolvedName

public Name getLinkResolvedName()
Retrieves the leading portion of the link name that was resolved successfully.
Returns:
The part of the link name that was resolved successfully. It is a composite name. It can be null, which means the link resolved name field has not been set.
See Also:
getLinkResolvedObj(), setLinkResolvedName(javax.naming.Name)

getLinkRemainingName

public Name getLinkRemainingName()
Retrieves the remaining unresolved portion of the link name.
Returns:
The part of the link name that has not been resolved. It is a composite name. It can be null, which means the link remaining name field has not been set.
See Also:
setLinkRemainingName(javax.naming.Name)

getLinkResolvedObj

public Object getLinkResolvedObj()
Retrieves the object to which resolution was successful. This is the object to which the resolved link name is bound.
Returns:
The possibly null object that was resolved so far. If null, it means the link resolved object field has not been set.
See Also:
getLinkResolvedName(), setLinkResolvedObj(java.lang.Object)

getLinkExplanation

public String getLinkExplanation()
Retrieves the explanation associated with the problem encounter when resolving a link.
Returns:
The possibly null detail string explaining more about the problem with resolving a link. If null, it means there is no link detail message for this exception.
See Also:
setLinkExplanation(java.lang.String)

setLinkExplanation

public void setLinkExplanation(String msg)
Sets the explanation associated with the problem encounter when resolving a link.
Parameters:
msg - The possibly null detail string explaining more about the problem with resolving a link. If null, it means no detail will be recorded.
See Also:
getLinkExplanation()

setLinkResolvedName

public void setLinkResolvedName(Name name)
Sets the resolved link name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The name to set resolved link name to. This can be null. If null, it sets the link resolved name field to null.
See Also:
getLinkResolvedName()

setLinkRemainingName

public void setLinkRemainingName(Name name)
Sets the remaining link name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The name to set remaining link name to. This can be null. If null, it sets the remaining name field to null.
See Also:
getLinkRemainingName()

setLinkResolvedObj

public void setLinkResolvedObj(Object obj)
Sets the link resolved object field of this exception. This indicates the last successfully resolved object of link name.
Parameters:
obj - The object to set link resolved object to. This can be null. If null, the link resolved object field is set to null.
See Also:
getLinkResolvedObj()

toString

public String toString()
Generates the string representation of this exception. This string consists of the NamingException information plus the link's remaining name. This string is used for debugging and not meant to be interpreted programmatically.
Overrides:
toString in class NamingException
Returns:
The non-null string representation of this link exception.

toString

public String toString(boolean detail)
Generates the string representation of this exception. This string consists of the NamingException information plus the additional information of resolving the link. If 'detail' is true, the string also contains information on the link resolved object. If false, this method is the same as the form of toString() that accepts no parameters. This string is used for debugging and not meant to be interpreted programmatically.
Overrides:
toString in class NamingException
Parameters:
detail - If true, add information about the link resolved object.
Returns:
The non-null string representation of this link exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkLoopException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class LinkLoopException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LinkException
                          |
                          +--javax.naming.LinkLoopException
All Implemented Interfaces:
Serializable
public class LinkLoopException
extends LinkException

This exception is thrown when a loop was detected will attempting to resolve a link, or an implementation specific limit on link counts has been reached.

Synchronization and serialization issues that apply to LinkException apply directly here.

Since:
1.3
See Also:
LinkRef, Serialized Form

Fields inherited from class javax.naming.LinkException
linkExplanation, linkRemainingName, linkResolvedName, linkResolvedObj
Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
LinkLoopException()
Constructs a new instance of LinkLoopException.
LinkLoopException(String explanation)
Constructs a new instance of LinkLoopException with an explanation All the other fields are initialized to null.
Methods inherited from class javax.naming.LinkException
getLinkExplanation, getLinkRemainingName, getLinkResolvedName, getLinkResolvedObj, setLinkExplanation, setLinkRemainingName, setLinkResolvedName, setLinkResolvedObj, toString, toString
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LinkLoopException

public LinkLoopException(String explanation)
Constructs a new instance of LinkLoopException with an explanation All the other fields are initialized to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

LinkLoopException

public LinkLoopException()
Constructs a new instance of LinkLoopException. All the non-link-related and link-related fields are initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class LinkRef

java.lang.Object
  |
  +--javax.naming.Reference
        |
        +--javax.naming.LinkRef
All Implemented Interfaces:
Cloneable, Serializable
public class LinkRef
extends Reference

This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.

The name is a URL, or a name to be resolved relative to the initial context, or if the first character of the name is ".", the name is relative to the context in which the link is bound.

Normal resolution of names in context operations always follow links. Resolution of the link name itself may cause resolution to pass through other links. This gives rise to the possibility of a cycle of links whose resolution could not terminate normally. As a simple means to avoid such non-terminating resolutions, service providers may define limits on the number of links that may be involved in any single operation invoked by the caller.

A LinkRef contains a single StringRefAddr, whose type is "LinkAddress", and whose contents is the link name. The class name field of the Reference is that of this (LinkRef) class.

LinkRef is bound to a name using the normal Context.bind()/rebind(), and DirContext.bind()/rebind(). Context.lookupLink() is used to retrieve the link itself if the terminal atomic name is bound to a link.

Many naming systems support a native notion of link that may be used within the naming system itself. JNDI does not specify whether there is any relationship between such native links and JNDI links.

A LinkRef instance is not synchronized against concurrent access by multiple threads. Threads that need to access a LinkRef instance concurrently should synchronize amongst themselves and provide the necessary locking.

Since:
1.3
See Also:
LinkException, LinkLoopException, MalformedLinkException, Context.lookupLink(javax.naming.Name), Serialized Form

Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
Constructor Summary
LinkRef(Name linkName)
Constructs a LinkRef for a name.
LinkRef(String linkName)
Constructs a LinkRef for a string name.
Method Summary
 String getLinkName()
Retrieves the name of this link.
Methods inherited from class javax.naming.Reference
add, add, clear, clone, equals, get, get, getAll, getClassName, getFactoryClassLocation, getFactoryClassName, hashCode, remove, size, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LinkRef

public LinkRef(Name linkName)
Constructs a LinkRef for a name.
Parameters:
linkName - The non-null name for which to create this link.

LinkRef

public LinkRef(String linkName)
Constructs a LinkRef for a string name.
Parameters:
linkName - The non-null name for which to create this link.
Method Detail

getLinkName

public String getLinkName()
                   throws NamingException
Retrieves the name of this link.
Returns:
The non-null name of this link.
Throws:
MalformedLinkException - If a link name could not be extracted
NamingException - If a naming exception was encountered.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MalformedLinkException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class MalformedLinkException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LinkException
                          |
                          +--javax.naming.MalformedLinkException
All Implemented Interfaces:
Serializable
public class MalformedLinkException
extends LinkException

This exception is thrown when a malformed link was encountered while resolving or constructing a link.

Synchronization and serialization issues that apply to LinkException apply directly here.

Since:
1.3
See Also:
LinkRef.getLinkName(), LinkRef, Serialized Form

Fields inherited from class javax.naming.LinkException
linkExplanation, linkRemainingName, linkResolvedName, linkResolvedObj
Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
MalformedLinkException()
Constructs a new instance of Malformed LinkException.
MalformedLinkException(String explanation)
Constructs a new instance of MalformedLinkException with an explanation All the other fields are initialized to null.
Methods inherited from class javax.naming.LinkException
getLinkExplanation, getLinkRemainingName, getLinkResolvedName, getLinkResolvedObj, setLinkExplanation, setLinkRemainingName, setLinkResolvedName, setLinkResolvedObj, toString, toString
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MalformedLinkException

public MalformedLinkException(String explanation)
Constructs a new instance of MalformedLinkException with an explanation All the other fields are initialized to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.

MalformedLinkException

public MalformedLinkException()
Constructs a new instance of Malformed LinkException. All fields are initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Name

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Interface Name

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
CompoundName, CompositeName
public interface Name
extends Cloneable, Serializable

The Name interface represents a generic name -- an ordered sequence of components. It can be a composite name (names that span multiple namespaces), or a compound name (names that are used within individual hierarchical naming systems).

There can be different implementations of Name; for example, composite names, URLs, or namespace-specific compound names.

The components of a name are numbered. The indexes of a name with N components range from 0 up to, but not including, N. This range may be written as [0,N). The most significant component is at index 0. An empty name has no components.

None of the methods in this interface accept null as a valid value for a parameter that is a name or a name component. Likewise, methods that return a name or name component never return null.

An instance of a Name may not be synchronized against concurrent multithreaded access if that access is not read-only.

Since:
1.3

Method Summary
Name | add(int posn, String comp) Adds a single component at a specified position within this name.
Name | add(String comp) Adds a single component to the end of this name.
Name | addAll(int posn, Name n) Adds the components of a name -- in order -- at a specified position within this name.
Name | addAll(Name suffix) Adds the components of a name -- in order -- to the end of this name.
Object | clone() Generates a new copy of this name.
int | compareTo(Object obj) Compares this name with another name for order.
boolean | endsWith(Name n) Determines whether this name ends with a specified suffix.
String | get(int posn) Retrieves a component of this name.
Enumeration | getAll() Retrieves the components of this name as an enumeration of strings.
Name | getPrefix(int posn) Creates a name whose components consist of a prefix of the components of this name.
Name | getSuffix(int posn) Creates a name whose components consist of a suffix of the components in this name.
boolean | isEmpty() Determines whether this name is empty.
Object | remove(int posn) Removes a component from this name.
int | size() Returns the number of components in this name.
boolean | startsWith(Name n) Determines whether this name starts with a specified prefix.

Method Detail

clone

public Object clone()
Generates a new copy of this name. Subsequent changes to the components of this name will not affect the new copy, and vice versa.
Overrides:
clone in class Object
Returns:
a copy of this name
See Also:
Object.clone()

compareTo

public int compareTo(Object obj)
Compares this name with another name for order. Returns a negative integer, zero, or a positive integer as this name is less than, equal to, or greater than the given name.

As with Object.equals(), the notion of ordering for names depends on the class that implements this interface. For example, the ordering may be based on lexicographical ordering of the name components. Specific attributes of the name, such as how it treats case, may affect the ordering. In general, two names of different classes may not be compared.

Parameters:
obj - the non-null object to compare against.
Returns:
a negative integer, zero, or a positive integer as this name is less than, equal to, or greater than the given name
Throws:
ClassCastException - if obj is not a Name of a type that may be compared with this name
See Also:
Comparable.compareTo(Object)

size

public int size()
Returns the number of components in this name.
Returns:
the number of components in this name

isEmpty

public boolean isEmpty()
Determines whether this name is empty. An empty name is one with zero components.
Returns:
true if this name is empty, false otherwise

getAll

public Enumeration getAll()
Retrieves the components of this name as an enumeration of strings. The effect on the enumeration of updates to this name is undefined. If the name has zero components, an empty (non-null) enumeration is returned.
Returns:
an enumeration of the components of this name, each a string

get

public String get(int posn)
Retrieves a component of this name.
Parameters:
posn - the 0-based index of the component to retrieve. Must be in the range [0,size()).
Returns:
the component at index posn
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range

getPrefix

public Name getPrefix(int posn)
Creates a name whose components consist of a prefix of the components of this name. Subsequent changes to this name will not affect the name that is returned and vice versa.
Parameters:
posn - the 0-based index of the component at which to stop. Must be in the range [0,size()].
Returns:
a name consisting of the components at indexes in the range [0,posn).
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range

getSuffix

public Name getSuffix(int posn)
Creates a name whose components consist of a suffix of the components in this name. Subsequent changes to this name do not affect the name that is returned and vice versa.
Parameters:
posn - the 0-based index of the component at which to start. Must be in the range [0,size()].
Returns:
a name consisting of the components at indexes in the range [posn,size()). If posn is equal to size(), an empty name is returned.
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range

startsWith

public boolean startsWith(Name n)
Determines whether this name starts with a specified prefix. A name n is a prefix if it is equal to getPrefix(n.size()).
Parameters:
n - the name to check
Returns:
true if n is a prefix of this name, false otherwise

endsWith

public boolean endsWith(Name n)
Determines whether this name ends with a specified suffix. A name n is a suffix if it is equal to getSuffix(size()-n.size()).
Parameters:
n - the name to check
Returns:
true if n is a suffix of this name, false otherwise

addAll

public Name addAll(Name suffix)
            throws InvalidNameException
Adds the components of a name -- in order -- to the end of this name.
Parameters:
suffix - the components to add
Returns:
the updated name (not a new one)
Throws:
InvalidNameException - if suffix is not a valid name, or if the addition of the components would violate the syntax rules of this name

addAll

public Name addAll(int posn,
                   Name n)
            throws InvalidNameException
Adds the components of a name -- in order -- at a specified position within this name. Components of this name at or after the index of the first new component are shifted up (away from 0) to accommodate the new components.
Parameters:
n - the components to add
posn - the index in this name at which to add the new components. Must be in the range [0,size()].
Returns:
the updated name (not a new one)
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range
InvalidNameException - if n is not a valid name, or if the addition of the components would violate the syntax rules of this name

add

public Name add(String comp)
         throws InvalidNameException
Adds a single component to the end of this name.
Parameters:
comp - the component to add
Returns:
the updated name (not a new one)
Throws:
InvalidNameException - if adding comp would violate the syntax rules of this name

add

public Name add(int posn,
                String comp)
         throws InvalidNameException
Adds a single component at a specified position within this name. Components of this name at or after the index of the new component are shifted up by one (away from index 0) to accommodate the new component.
Parameters:
comp - the component to add
posn - the index at which to add the new component. Must be in the range [0,size()].
Returns:
the updated name (not a new one)
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range
InvalidNameException - if adding comp would violate the syntax rules of this name

remove

public Object remove(int posn)
              throws InvalidNameException
Removes a component from this name. The component of this name at the specified position is removed. Components with indexes greater than this position are shifted down (toward index 0) by one.
Parameters:
posn - the index of the component to remove. Must be in the range [0,size()).
Returns:
the component removed (a String)
Throws:
ArrayIndexOutOfBoundsException - if posn is outside the specified range
InvalidNameException - if deleting the component would violate the syntax rules of the name
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameAlreadyBoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NameAlreadyBoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NameAlreadyBoundException
All Implemented Interfaces:
Serializable
public class NameAlreadyBoundException
extends NamingException

This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context.bind(javax.naming.Name, java.lang.Object),
Context.rebind(javax.naming.Name, java.lang.Object),
Context.createSubcontext(javax.naming.Name),
DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes),
DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NameAlreadyBoundException()
Constructs a new instance of NameAlreadyBoundException.
NameAlreadyBoundException(String explanation)
Constructs a new instance of NameAlreadyBoundException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NameAlreadyBoundException

public NameAlreadyBoundException(String explanation)
Constructs a new instance of NameAlreadyBoundException using the explanation supplied. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

NameAlreadyBoundException

public NameAlreadyBoundException()
Constructs a new instance of NameAlreadyBoundException. All fields are set to null;
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameClassPair

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NameClassPair

java.lang.Object
  |
  +--javax.naming.NameClassPair
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Binding
public class NameClassPair
extends Object
implements Serializable

This class represents the object name and class name pair of a binding found in a context.

A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of a name and a string representing the package-qualified class name.

Use subclassing for naming systems that generate contents of a name/class pair dynamically.

A NameClassPair instance is not synchronized against concurrent access by multiple threads. Threads that need to access a NameClassPair concurrently should synchronize amongst themselves and provide the necessary locking.

Since:
1.3
See Also:
Context.list(javax.naming.Name), Serialized Form

Constructor Summary
NameClassPair(String name, String className)
Constructs an instance of a NameClassPair given its name and class name.
NameClassPair(String name, String className, boolean isRelative)
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
Method Summary
 String getClassName()
Retrieves the class name of the object bound to the name of this binding.
 String getName()
Retrieves the name of this binding.
 boolean isRelative()
Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
 void setClassName(String name)
Sets the class name of this binding.
 void setName(String name)
Sets the name of this binding.
 void setRelative(boolean r)
Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
 String toString()
Generates the string representation of this name/class pair.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NameClassPair

public NameClassPair(String name,
                     String className)
Constructs an instance of a NameClassPair given its name and class name.
Parameters:
name - The non-null name of the object. It is relative to the target context (which is named by the first parameter of the list() method)
className - The possibly null class name of the object bound to name. It is null if the object bound is null.
See Also:
getClassName(),
setClassName(java.lang.String),
getName(),
setName(java.lang.String)

NameClassPair

public NameClassPair(String name,
                     String className,
                     boolean isRelative)
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
Parameters:
name - The non-null name of the object.
className - The possibly null class name of the object bound to name. It is null if the object bound is null.
isRelative - true if name is a name relative to the target context (which is named by the first parameter of the list() method); false if name is a URL string.
See Also:
getClassName(),
setClassName(java.lang.String),
getName(),
setName(java.lang.String),
isRelative(),
setRelative(boolean)
Method Detail

getClassName

public String getClassName()
Retrieves the class name of the object bound to the name of this binding. If a reference or some other indirect information is bound, retrieves the class name of the eventual object that will be returned by Binding.getObject().
Returns:
The possibly null class name of object bound. It is null if the object bound is null.
See Also:
Binding.getObject(),
Binding.getClassName(),
setClassName(java.lang.String)

getName

public String getName()
Retrieves the name of this binding. If isRelative() is true, this name is relative to the target context (which is named by the first parameter of the list()). If isRelative() is false, this name is a URL string.
Returns:
The non-null name of this binding.
See Also:
isRelative(), setName(java.lang.String)

setName

public void setName(String name)
Sets the name of this binding.
Parameters:
name - the non-null string to use as the name.
See Also:
getName(), setRelative(boolean)

setClassName

public void setClassName(String name)
Sets the class name of this binding.
Parameters:
name - the possibly null string to use as the class name. If null, Binding.getClassName() will return the actual class name of the object in the binding. The class name will be null if the object bound is null.
See Also:
getClassName(), Binding.getClassName()

isRelative

public boolean isRelative()
Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
Returns:
true if the name of this binding is relative to the target context; false if the name of this binding is a URL string.
See Also:
setRelative(boolean), getName()

setRelative

public void setRelative(boolean r)
Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
Parameters:
r - If true, the name of binding is relative to the target context; if false, the name of binding is a URL string.
See Also:
isRelative(), setName(java.lang.String)

toString

public String toString()
Generates the string representation of this name/class pair. The string representation consists of the name and class name separated by a colon (':'). The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
Overrides:
toString in class Object
Returns:
The string representation of this name/class pair.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NameNotFoundException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NameNotFoundException
All Implemented Interfaces:
Serializable
public class NameNotFoundException
extends NamingException

This exception is thrown when a component of the name cannot be resolved because it is not bound.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NameNotFoundException()
Constructs a new instance of NameNotFoundException.
NameNotFoundException(String explanation)
Constructs a new instance of NameNotFoundException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NameNotFoundException

public NameNotFoundException(String explanation)
Constructs a new instance of NameNotFoundException using the explanation supplied. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

NameNotFoundException

public NameNotFoundException()
Constructs a new instance of NameNotFoundException. all name resolution fields and explanation initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Interface NameParser

public interface NameParser

This interface is used for parsing names from a hierarchical namespace. The NameParser contains knowledge of the syntactic information (like left-to-right orientation, name separator, etc.) needed to parse names. The equals() method, when used to compare two NameParsers, returns true if and only if they serve the same namespace.

Since:
1.3
See Also:
CompoundName, Name

Method Summary
 Name parse(String name)
Parses a name into its components.

Method Detail

parse

public Name parse(String name)
           throws NamingException
Parses a name into its components.
Parameters:
name - The non-null string name to parse.
Returns:
A non-null parsed form of the name using the naming convention of this parser.
Throws:
InvalidNameException - If name does not conform to syntax defined for the namespace.
NamingException - If a naming exception was encountered.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingEnumeration

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Interface NamingEnumeration

All Superinterfaces:
Enumeration
public interface NamingEnumeration
extends Enumeration

This interface is for enumerating lists returned by methods in the javax.naming and javax.naming.directory packages. It extends Enumeration to allow as exceptions to be thrown during the enumeration.

When a method such as list(), listBindings(), or search() returns a NamingEnumeration, any exceptions encountered are reserved until all results have been returned. At the end of the enumeration, the exception is thrown (by hasMore());

For example, if the list() is returning only a partial answer, the corresponding exception would be PartialResultException. list() would first return a NamingEnumeration. When the last of the results has been returned by the NamingEnumeration's next(), invoking hasMore() would result in PartialResultException being thrown.

In another example, if a search() method was invoked with a specified size limit of 'n'. If the answer consists of more than 'n' results, search() would first return a NamingEnumeration. When the n'th result has been returned by invoking next() on the NamingEnumeration, a SizeLimitExceedException would then thrown when hasMore() is invoked.

Note that if the program uses hasMoreElements() and nextElement() instead to iterate through the NamingEnumeration, because these methods cannot throw exceptions, no exception will be thrown. Instead, in the previous example, after the n'th result has been returned by nextElement(), invoking hasMoreElements() would return false.

Note also that NoSuchElementException is thrown if the program invokes next() or nextElement() when there are no elements left in the enumeration. The program can always avoid this exception by using hasMore() and hasMoreElements() to check whether the end of the enumeration has been reached.

If an exception is thrown during an enumeration, the enumeration becomes invalid. Subsequent invocation of any method on that enumeration will yield undefined results.

Since:
1.3
See Also:
Context.list(javax.naming.Name),
Context.listBindings(javax.naming.Name),
DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]),
Attributes.getAll(),
Attributes.getIDs(),
Attribute.getAll()

Method Summary
void | close() Closes this enumeration.
boolean | hasMore() Determines whether there are any more elements in the enumeration.
Object | next() Retrieves the next element in the enumeration.
Methods inherited from interface java.util.Enumeration
hasMoreElements, nextElement

Method Detail

next

public Object next()
            throws NamingException
Retrieves the next element in the enumeration. This method allows naming exceptions encountered while retrieving the next element to be caught and handled by the application.

Note that next() can also throw the runtime exception NoSuchElementException to indicate that the caller is attempting to enumerate beyond the end of the enumeration. This is different from a NamingException, which indicates that there was a problem in obtaining the next element, for example, due to a referral or server unavailability, etc.

Returns:
The possibly null element in the enumeration. null is only valid for enumerations that can return null (e.g. Attribute.getAll() returns an enumeration of attribute values, and an attribute value can be null).
Throws:
NamingException - If a naming exception is encountered while attempting to retrieve the next element. See NamingException and its subclasses for the possible naming exceptions.
NoSuchElementException - If attempting to get the next element when none is available.
See Also:
Enumeration.nextElement()

hasMore

public boolean hasMore()
                throws NamingException
Determines whether there are any more elements in the enumeration. This method allows naming exceptions encountered while determining whether there are more elements to be caught and handled by the application.
Returns:
true if there is more in the enumeration ; false otherwise.
Throws:
NamingException - If a naming exception is encountered while attempting to determine whether there is another element in the enumeration. See NamingException and its subclasses for the possible naming exceptions.
See Also:
Enumeration.hasMoreElements()

close

public void close()
           throws NamingException
Closes this enumeration. After this method has been invoked on this enumeration, the enumeration becomes invalid and subsequent invocation of any of its methods will yield undefined results. This method is intended for aborting an enumeration to free up resources. If an enumeration proceeds to the end--that is, until hasMoreElements() or hasMore() returns false-- resources will be freed up automatically and there is no need to explicitly call close().

This method indicates to the service provider that it is free to release resources associated with the enumeration, and can notify servers to cancel any outstanding requests. The close() method is a hint to implementations for managing their resources. Implementations are encouraged to use appropriate algorithms to manage their resources when client omits the close() calls.

Throws:
NamingException - If a naming exception is encountered while closing the enumeration.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NamingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AttributeInUseException, AttributeModificationException, CannotProceedException, CommunicationException, ConfigurationException, ContextNotEmptyException, InsufficientResourcesException, InterruptedNamingException, InvalidAttributeIdentifierException, InvalidAttributesException, InvalidAttributeValueException, InvalidNameException, InvalidSearchControlsException, InvalidSearchFilterException, LimitExceededException, LinkException, NameAlreadyBoundException, NameNotFoundException, NamingSecurityException, NoInitialContextException, NoSuchAttributeException, NotContextException, OperationNotSupportedException, PartialResultException, ReferralException, SchemaViolationException, ServiceUnavailableException
public class NamingException
extends Exception

This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces. The nature of the failure is described by the name of the subclass. This exception captures the information pinpointing where the operation failed, such as where resolution last proceeded to.

  • Resolved Name. Portion of name that has been resolved.
  • Resolved Object. Object to which resolution of name proceeded.
  • Remaining Name. Portion of name that has not been resolved.
  • Explanation. Detail explaining why name resolution failed.
  • Root Exception. The exception that caused this naming exception to be thrown.
null is an acceptable value for any of these fields. When null, it means that no such information has been recorded for that field.

A NamingException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single NamingException instance should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected Name | remainingName Contains the remaining name that has not been resolved yet.
protected Name | resolvedName Contains the part of the name that has been successfully resolved.
protected Object | resolvedObj Contains the object to which resolution of the part of the name was successful.
protected Throwable | rootException Contains the original exception that caused this NamingException to be thrown.
Constructor Summary
NamingException()
Constructs a new NamingException.
NamingException(String explanation)
Constructs a new NamingException with an explanation.
Method Summary
void | appendRemainingComponent(String name) Add name as the last component in remaining name.
void | appendRemainingName(Name name) Add components from 'name' as the last components in remaining name.
String | getExplanation() Retrieves the explanation associated with this exception.
Name | getRemainingName() Retrieves the remaining unresolved portion of the name.
Name | getResolvedName() Retrieves the leading portion of the name that was resolved successfully.
Object | getResolvedObj() Retrieves the object to which resolution was successful.
Throwable | getRootCause() Retrieves the root cause of this NamingException, if any.
void | printStackTrace() Prints this exception's stack trace to System.err.
void | printStackTrace(PrintStream ps) Prints this exception's stack trace to a print stream.
void | printStackTrace(PrintWriter pw) Prints this exception's stack trace to a print writer.
void | setRemainingName(Name name) Sets the remaining name field of this exception.
void | setResolvedName(Name name) Sets the resolved name field of this exception.
void | setResolvedObj(Object obj) Sets the resolved object field of this exception.
void | setRootCause(Throwable e) Records that the root cause of this NamingException.
String | toString() Generates the string representation of this exception.
String | toString(boolean detail) Generates the string representation in more detail.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

resolvedName

protected Name resolvedName
Contains the part of the name that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getResolvedName(), setResolvedName(javax.naming.Name)

resolvedObj

protected Object resolvedObj
Contains the object to which resolution of the part of the name was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getResolvedObj(), setResolvedObj(java.lang.Object)

remainingName

protected Name remainingName
Contains the remaining name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get, set, "append" methods.
See Also:
getRemainingName(),
setRemainingName(javax.naming.Name),
appendRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String)

rootException

protected Throwable rootException
Contains the original exception that caused this NamingException to be thrown. This field is set if there is additional information that could be obtained from the original exception, or if there original exception could not be mapped to a subclass of NamingException. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
See Also:
getRootCause(), setRootCause(java.lang.Throwable)
Constructor Detail

NamingException

public NamingException(String explanation)
Constructs a new NamingException with an explanation. All unspecified fields are set to null.
Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage()

NamingException

public NamingException()
Constructs a new NamingException. All fields are set to null.
Method Detail

getResolvedName

public Name getResolvedName()
Retrieves the leading portion of the name that was resolved successfully.
Returns:
The part of the name that was resolved successfully. It is a composite name. It can be null, which means the resolved name field has not been set.
See Also:
getResolvedObj(), setResolvedName(javax.naming.Name)

getRemainingName

public Name getRemainingName()
Retrieves the remaining unresolved portion of the name.
Returns:
The part of the name that has not been resolved. It is a composite name. It can be null, which means the remaining name field has not been set.
See Also:
setRemainingName(javax.naming.Name),
appendRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String)

getResolvedObj

public Object getResolvedObj()
Retrieves the object to which resolution was successful. This is the object to which the resolved name is bound.
Returns:
The possibly null object that was resolved so far. null means that the resolved object field has not been set.
See Also:
getResolvedName(), setResolvedObj(java.lang.Object)

getExplanation

public String getExplanation()
Retrieves the explanation associated with this exception.
Returns:
The possibly null detail string explaining more about this exception. If null, it means there is no detail message for this exception.
See Also:
Throwable.getMessage()

setResolvedName

public void setResolvedName(Name name)
Sets the resolved name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The possibly null name to set resolved name to. If null, it sets the resolved name field to null.
See Also:
getResolvedName()

setRemainingName

public void setRemainingName(Name name)
Sets the remaining name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The possibly null name to set remaining name to. If null, it sets the remaining name field to null.
See Also:
getRemainingName(),
appendRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String)

setResolvedObj

public void setResolvedObj(Object obj)
Sets the resolved object field of this exception.
Parameters:
obj - The possibly null object to set resolved object to. If null, the resolved object field is set to null.
See Also:
getResolvedObj()

appendRemainingComponent

public void appendRemainingComponent(String name)
Add name as the last component in remaining name.
Parameters:
name - The component to add. If name is null, this method does not do anything.
See Also:
setRemainingName(javax.naming.Name),
getRemainingName(),
appendRemainingName(javax.naming.Name)

appendRemainingName

public void appendRemainingName(Name name)
Add components from 'name' as the last components in remaining name.

name is a composite name. If the intent is to append a compound name, you should "stringify" the compound name then invoke the overloaded form that accepts a String parameter.

Subsequent changes to name does not affect the remaining name field in this NamingException and vice versa.

Parameters:
name - The possibly null name containing ordered components to add. If name is null, this method does not do anything.
See Also:
setRemainingName(javax.naming.Name),
getRemainingName(),
appendRemainingComponent(java.lang.String)

getRootCause

public Throwable getRootCause()
Retrieves the root cause of this NamingException, if any. The root cause of a naming exception is used when the service provider wants to indicate to the caller a non-naming related exception but at the same time want to use the NamingException structure to indicate how far the naming operation proceeded.
Returns:
The possibly null exception that caused this naming exception. If null, it means no root cause has been set for this naming exception.
See Also:
setRootCause(java.lang.Throwable), rootException

setRootCause

public void setRootCause(Throwable e)
Records that the root cause of this NamingException. If e is this, this method does no do anything.
Parameters:
e - The possibly null exception that caused the naming operation to fail. If null, it means this naming exception has no root cause.
See Also:
getRootCause(), rootException

toString

public String toString()
Generates the string representation of this exception. The string representation consists of this exception's class name, its detailed message, and if it has a root cause, the string representation of the root cause exception, followed by the remaining name (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.
Overrides:
toString in class Throwable
Returns:
The non-null string containing the string representation of this exception.

toString

public String toString(boolean detail)
Generates the string representation in more detail. This string representation consists of the information returned by the toString() that takes no parameters, plus the string representation of the resolved object (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.
Parameters:
detail - If true, include details about the resolved object in addition to the other information.
Returns:
The non-null string containing the string representation.

printStackTrace

public void printStackTrace()
Prints this exception's stack trace to System.err. If this exception has a root exception, the stack trace of the root exception is printed instead.
Overrides:
printStackTrace in class Throwable
Following copied from class: java.lang.Throwable
See Also:
System.err

printStackTrace

public void printStackTrace(PrintStream ps)
Prints this exception's stack trace to a print stream. If this exception has a root exception, the stack trace of the root exception is printed instead.
Overrides:
printStackTrace in class Throwable
Parameters:
ps - The non-null print stream to which to print.

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints this exception's stack trace to a print writer. If this exception has a root exception, the stack trace of the root exception is printed instead.
Overrides:
printStackTrace in class Throwable
Parameters:
pw - The non-null print writer to which to print.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingSecurityException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NamingSecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NamingSecurityException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticationException, AuthenticationNotSupportedException, NoPermissionException
public abstract class NamingSecurityException
extends NamingException

This is the superclass of security-related exceptions thrown by operations in the Context and DirContext interfaces. The nature of the failure is described by the name of the subclass.

If the program wants to handle this exception in particular, it should catch NamingSecurityException explicitly before attempting to catch NamingException. A program might want to do this, for example, if it wants to treat security-related exceptions specially from other sorts of naming exception.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NamingSecurityException()
Constructs a new instance of NamingSecurityException.
NamingSecurityException(String explanation)
Constructs a new instance of NamingSecurityException using the explanation supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NamingSecurityException

public NamingSecurityException(String explanation)
Constructs a new instance of NamingSecurityException using the explanation supplied. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

NamingSecurityException

public NamingSecurityException()
Constructs a new instance of NamingSecurityException. All fields are initiailized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoInitialContextException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NoInitialContextException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NoInitialContextException
All Implemented Interfaces:
Serializable
public class NoInitialContextException
extends NamingException

This exception is thrown when no initial context implementation can be created. The policy of how an initial context implementation is selected is described in the documentation of the InitialContext class.

This exception can be thrown during any interaction with the InitialContext, not only when the InitialContext is constructed. For example, the implementation of the initial context might lazily retrieve the context only when actual methods are invoked on it. The application should not have any dependency on when the existence of an initial context is determined.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
InitialContext, InitialDirContext, NamingManager.getInitialContext(java.util.Hashtable), NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NoInitialContextException()
Constructs an instance of NoInitialContextException.
NoInitialContextException(String explanation)
Constructs an instance of NoInitialContextException with an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoInitialContextException

public NoInitialContextException()
Constructs an instance of NoInitialContextException. All fields are initialized to null.

NoInitialContextException

public NoInitialContextException(String explanation)
Constructs an instance of NoInitialContextException with an explanation. All other fields are initialized to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoPermissionException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NoPermissionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NamingSecurityException
                          |
                          +--javax.naming.NoPermissionException
All Implemented Interfaces:
Serializable
public class NoPermissionException
extends NamingSecurityException

This exception is thrown when attempting to perform an operation for which the client has no permission. The access control/permission model is dictated by the directory/naming server.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NoPermissionException()
Constructs a new instance of NoPermissionException.
NoPermissionException(String explanation)
Constructs a new instance of NoPermissionException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoPermissionException

public NoPermissionException(String explanation)
Constructs a new instance of NoPermissionException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.

NoPermissionException

public NoPermissionException()
Constructs a new instance of NoPermissionException. All fields are initialized to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotContextException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class NotContextException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.NotContextException
All Implemented Interfaces:
Serializable
public class NotContextException
extends NamingException

This exception is thrown when a naming operation proceeds to a point where a context is required to continue the operation, but the resolved object is not a context. For example, Context.destroy() requires that the named object be a context. If it is not, NotContextException is thrown. Another example is a non-context being encountered during the resolution phase of the Context methods.

It is also thrown when a particular subtype of context is required, such as a DirContext, and the resolved object is a context but not of the required subtype.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Context.destroySubcontext(javax.naming.Name), Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
NotContextException()
Constructs a new instance of NotContextException.
NotContextException(String explanation)
Constructs a new instance of NotContextException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotContextException

public NotContextException(String explanation)
Constructs a new instance of NotContextException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

NotContextException

public NotContextException()
Constructs a new instance of NotContextException. All fields default to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OperationNotSupportedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class OperationNotSupportedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.OperationNotSupportedException
All Implemented Interfaces:
Serializable
public class OperationNotSupportedException
extends NamingException

This exception is thrown when a context implementation does not support the operation being invoked. For example, if a server does not support the Context.bind() method it would throw OperationNotSupportedException when the bind() method is invoked on it.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
OperationNotSupportedException()
Constructs a new instance of OperationNotSupportedException.
OperationNotSupportedException(String explanation)
Constructs a new instance of OperationNotSupportedException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OperationNotSupportedException

public OperationNotSupportedException()
Constructs a new instance of OperationNotSupportedException. All fields default to null.

OperationNotSupportedException

public OperationNotSupportedException(String explanation)
Constructs a new instance of OperationNotSupportedException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PartialResultException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class PartialResultException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.PartialResultException
All Implemented Interfaces:
Serializable
public class PartialResultException
extends NamingException

This exception is thrown to indicate that the result being returned or returned so far is partial, and that the operation cannot be completed. For example, when listing a context, this exception indicates that returned results only represents some of the bindings in the context.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
PartialResultException()
Constructs a new instance of PartialResultException.
PartialResultException(String explanation)
Constructs a new instance of the exception using the explanation message specified.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PartialResultException

public PartialResultException(String explanation)
Constructs a new instance of the exception using the explanation message specified. All other fields default to null.
Parameters:
explanation - Possibly null detail explaining the exception.

PartialResultException

public PartialResultException()
Constructs a new instance of PartialResultException. All fields default to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RefAddr

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class RefAddr

java.lang.Object
  |
  +--javax.naming.RefAddr
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BinaryRefAddr, StringRefAddr
public abstract class RefAddr
extends Object
implements Serializable

This class represents the address of a communications end-point. It consists of a type that describes the communication mechanism and an address contents determined by an RefAddr subclass.

For example, an address type could be "BSD Printer Address", which specifies that it is an address to be used with the BSD printing protocol. Its contents could be the machine name identifying the location of the printer server that understands this protocol.

A RefAddr is contained within a Reference.

RefAddr is an abstract class. Concrete implementations of it determine its synchronization properties.

Since:
1.3
See Also:
Reference, LinkRef, StringRefAddr, BinaryRefAddr, Serialized Form

Field Summary
protected  String addrType
Contains the type of this address.
Constructor Summary
protected RefAddr(String addrType)
Constructs a new instance of RefAddr using its address type.
Method Summary
boolean | equals(Object obj) Determines whether obj is equal to this RefAddr.
abstract Object | getContent() Retrieves the contents of this address.
String | getType() Retrieves the address type of this address.
int | hashCode() Computes the hash code of this address using its address type and contents.
String | toString() Generates the string representation of this address.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

addrType

protected String addrType
Contains the type of this address.
Constructor Detail

RefAddr

protected RefAddr(String addrType)
Constructs a new instance of RefAddr using its address type.
Parameters:
addrType - A non-null string describing the type of the address.
Method Detail

getType

public String getType()
Retrieves the address type of this address.
Returns:
The non-null address type of this address.

getContent

public abstract Object getContent()
Retrieves the contents of this address.
Returns:
The possibly null address contents.

equals

public boolean equals(Object obj)
Determines whether obj is equal to this RefAddr.

obj is equal to this RefAddr all of these conditions are true

    non-null
  • instance of RefAddr
  • obj has the same address type as this RefAddr (using String.compareTo())
  • both obj and this RefAddr's contents are null or they are equal (using the equals() test).
Overrides:
equals in class Object
Parameters:
obj - possibly null obj to check.
Returns:
true if obj is equal to this refaddr; false otherwise.
See Also:
getContent(), getType()

hashCode

public int hashCode()
Computes the hash code of this address using its address type and contents. The hash code is the sum of the hash code of the address type and the hash code of the address contents.
Overrides:
hashCode in class Object
Returns:
The hash code of this address as an int.
See Also:
Object.hashCode()

toString

public String toString()
Generates the string representation of this address. The string consists of the address's type and contents with labels. This representation is intended for display only and not to be parsed.
Overrides:
toString in class Object
Returns:
The non-null string representation of this address.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Reference

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class Reference

java.lang.Object
  |
  +--javax.naming.Reference
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
LinkRef
public class Reference
extends Object
implements Cloneable, Serializable

This class represents a reference to an object that is found outside of the naming/directory system.

Reference provides a way of recording address information about objects which themselves are not directly bound to the naming/directory system.

A Reference consists of an ordered list of addresses and class information about the object being referenced. Each address in the list identifies a communications endpoint for the same conceptual object. The "communications endpoint" is information that indicates how to contact the object. It could be, for example, a network address, a location in memory on the local machine, another process on the same machine, etc. The order of the addresses in the list may be of significance to object factories that interpret the reference.

Multiple addresses may arise for various reasons, such as replication or the object offering interfaces over more than one communication mechanism. The addresses are indexed starting with zero.

A Reference also contains information to assist in creating an instance of the object to which this Reference refers. It contains the class name of that object, and the class name and location of the factory to be used to create the object. The class factory location is a space-separated list of URLs representing the class path used to load the factory. When the factory class (or any class or resource upon which it depends) needs to be loaded, each URL is used (in order) to attempt to load the class.

A Reference instance is not synchronized against concurrent access by multiple threads. Threads that need to access a single Reference concurrently should synchronize amongst themselves and provide the necessary locking.

Since:
1.3
See Also:
RefAddr, StringRefAddr, BinaryRefAddr, Serialized Form

Field Summary
protected Vector | addrs Contains the addresses contained in this Reference.
protected String | classFactory Contains the name of the factory class for creating an instance of the object to which this Reference refers.
protected String | classFactoryLocation Contains the location of the factory class.
protected String | className Contains the fully-qualified name of the class of the object to which this Reference refers.
Constructor Summary
Reference(String className)
Constructs a new reference for an object with class name 'className'.
Reference(String className, RefAddr addr)
Constructs a new reference for an object with class name 'className' and an address.
Reference(String className, RefAddr addr, String factory, String factoryLocation)
Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.
Reference(String className, String factory, String factoryLocation)
Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.
Method Summary
void | add(int posn, RefAddr addr) Adds an address to the list of addresses at index posn.
void | add(RefAddr addr) Adds an address to the end of the list of addresses.
void | clear() Deletes all addresses from this reference.
Object | clone() Makes a copy of this reference using its class name list of addresses, class factory name and class factory location.
boolean | equals(Object obj) Determines whether obj is a reference with the same addresses (in same order) as this reference.
RefAddr | get(int posn) Retrieves the address at index posn.
RefAddr | get(String addrType) Retrieves the first address that has the address type 'addrType'.
Enumeration | getAll() Retrieves an enumeration of the addresses in this reference.
String | getClassName() Retrieves the class name of the object to which this reference refers.
String | getFactoryClassLocation() Retrieves the location of the factory of the object to which this reference refers.
String | getFactoryClassName() Retrieves the class name of the factory of the object to which this reference refers.
int | hashCode() Computes the hash code of this reference.
Object | remove(int posn) Deletes the address at index posn from the list of addresses.
int | size() Retrieves the number of addresses in this reference.
String | toString() Generates the string representation of this reference.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

className

protected String className
Contains the fully-qualified name of the class of the object to which this Reference refers.
See Also:
Class.getName()

addrs

protected Vector addrs
Contains the addresses contained in this Reference. Initialized by constructor.

classFactory

protected String classFactory
Contains the name of the factory class for creating an instance of the object to which this Reference refers. Initialized to null.

classFactoryLocation

protected String classFactoryLocation
Contains the location of the factory class. Initialized to null.
Constructor Detail

Reference

public Reference(String className)
Constructs a new reference for an object with class name 'className'. Class factory and class factory location are set to null. The newly created reference contains zero addresses.
Parameters:
className - The non-null class name of the object to which this reference refers.

Reference

public Reference(String className,
                 RefAddr addr)
Constructs a new reference for an object with class name 'className' and an address. Class factory and class factory location are set to null.
Parameters:
className - The non-null class name of the object to which this reference refers.
addr - The non-null address of the object.

Reference

public Reference(String className,
                 String factory,
                 String factoryLocation)
Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.
Parameters:
className - The non-null class name of the object to which this reference refers.
factory - The possibly null class name of the object's factory.
factoryLocation - The possibly null location from which to load the factory (e.g. URL)
See Also:
ObjectFactory, NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

Reference

public Reference(String className,
                 RefAddr addr,
                 String factory,
                 String factoryLocation)
Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.
Parameters:
className - The non-null class name of the object to which this reference refers.
factory - The possibly null class name of the object's factory.
factoryLocation - The possibly null location from which to load the factory (e.g. URL)
addr - The non-null address of the object.
See Also:
ObjectFactory, NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
Method Detail

getClassName

public String getClassName()
Retrieves the class name of the object to which this reference refers.
Returns:
The non-null fully-qualified class name of the object. (e.g. "java.lang.String")

getFactoryClassName

public String getFactoryClassName()
Retrieves the class name of the factory of the object to which this reference refers.
Returns:
The possibly null fully-qualified class name of the factory. (e.g. "java.lang.String")

getFactoryClassLocation

public String getFactoryClassLocation()
Retrieves the location of the factory of the object to which this reference refers. If it is a codebase, then it is an ordered list of URLs, separated by spaces, listing locations from where the factory class definition should be loaded.
Returns:
The possibly null string containing the location for loading in the factory's class.

get

public RefAddr get(String addrType)
Retrieves the first address that has the address type 'addrType'. String.compareTo() is used to test the equality of the address types.
Parameters:
addrType - The non-null address type for which to find the address.
Returns:
The address in this reference with address type 'addrType; null if no such address exist.

get

public RefAddr get(int posn)
Retrieves the address at index posn.
Parameters:
posn - The index of the address to retrieve.
Returns:
The address at the 0-based index posn. It must be in the range [0,getAddressCount()).
Throws:
ArrayIndexOutOfBoundsException - If posn not in the specified range.

getAll

public Enumeration getAll()
Retrieves an enumeration of the addresses in this reference. When addresses are added, changed or removed from this reference, its effects on this enumeration are undefined.
Returns:
An non-null enumeration of the addresses (RefAddr) in this reference. If this reference has zero addresses, an enumeration with zero elements is returned.

size

public int size()
Retrieves the number of addresses in this reference.
Returns:
The nonnegative number of addresses in this reference.

add

public void add(RefAddr addr)
Adds an address to the end of the list of addresses.
Parameters:
addr - The non-null address to add.

add

public void add(int posn,
                RefAddr addr)
Adds an address to the list of addresses at index posn. All addresses at index posn or greater are shifted up the list by one (away from index 0).
Parameters:
posn - The 0-based index of the list to insert addr.
addr - The non-null address to add.
Throws:
ArrayIndexOutOfBoundsException - If posn not in the specified range.

remove

public Object remove(int posn)
Deletes the address at index posn from the list of addresses. All addresses at index greater than posn are shifted down the list by one (towards index 0).
Parameters:
posn - The 0-based index of in address to delete.
Returns:
The address removed.
Throws:
ArrayIndexOutOfBoundsException - If posn not in the specified range.

clear

public void clear()
Deletes all addresses from this reference.

equals

public boolean equals(Object obj)
Determines whether obj is a reference with the same addresses (in same order) as this reference. The addresses are checked using RefAddr.equals(). In addition to having the same addresses, the Reference also needs to have the same class name as this reference. The class factory and class factory location are not checked. If obj is null or not an instance of Reference, null is returned.
Overrides:
equals in class Object
Parameters:
obj - The possibly null object to check.
Returns:
true if obj is equal to this reference; false otherwise.

hashCode

public int hashCode()
Computes the hash code of this reference. The hash code is the sum of the hash code of its addresses.
Overrides:
hashCode in class Object
Returns:
A hash code of this reference as an int.

toString

public String toString()
Generates the string representation of this reference. The string consists of the class name to which this reference refers, and the string representation of each of its addresses. This representation is intended for display only and not to be parsed.
Overrides:
toString in class Object
Returns:
The non-null string representation of this reference.

clone

public Object clone()
Makes a copy of this reference using its class name list of addresses, class factory name and class factory location. Changes to the newly created copy does not affect this Reference and vice versa.
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Referenceable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Interface Referenceable

public interface Referenceable

This interface is implemented by an object that can provide a Reference to itself.

A Reference represents a way of recording address information about objects which themselves are not directly bound to the naming system. Such objects can implement the Referenceable interface as a way for programs that use that object to determine what its Reference is. For example, when binding a object, if an object implements the Referenceable interface, getReference() can be invoked on the object to get its Reference to use for binding.

Since:
1.3
See Also:
Context.bind(javax.naming.Name, java.lang.Object), NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), Reference

Method Summary
 Reference getReference()
Retrieves the Reference of this object.

Method Detail

getReference

public Reference getReference()
                       throws NamingException
Retrieves the Reference of this object.
Returns:
The non-null Reference of this object.
Throws:
NamingException - If a naming exception was encountered while retrieving the reference.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ReferralException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class ReferralException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.ReferralException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LdapReferralException
public abstract class ReferralException
extends NamingException

This abstract class is used to represent a referral exception, which is generated in response to a referral such as that returned by LDAP v3 servers.

A service provider provides a subclass of ReferralException by providing implementations for getReferralInfo() and getReferralContext() (and appropriate constructors and/or corresponding "set" methods).

The following code sample shows how ReferralException can be used.

    while (true) {
        try {
        bindings = ctx.listBindings(name);
        while (bindings.hasMore()) {
            b = bindings.next();
            ...
        }
        break;
        } catch (ReferralException e) {
        ctx = e.getReferralContext();
        }
    }

ReferralException is an abstract class. Concrete implementations determine its synchronization and serialization properties.

An environment parameter passed to the getReferralContext() method is owned by the caller. The service provider will not modify the object or keep a reference to it, but may keep a reference to a clone of it.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
protected | ReferralException() Constructs a new instance of ReferralException.
protected | ReferralException(String explanation) Constructs a new instance of ReferralException using the explanation supplied.
Method Summary
abstract Context | getReferralContext() Retrieves the context at which to continue the method.
abstract Context | getReferralContext(Hashtable env) Retrieves the context at which to continue the method using environment properties.
abstract Object | getReferralInfo() Retrieves information (such as URLs) related to this referral.
abstract void | retryReferral() Retries the referral currently being processed.
abstract boolean | skipReferral() Discards the referral about to be processed.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ReferralException

protected ReferralException(String explanation)
Constructs a new instance of ReferralException using the explanation supplied. All other fields are set to null.
Parameters:
explanation - Additional detail about this exception. Can be null.
See Also:
Throwable.getMessage()

ReferralException

protected ReferralException()
Constructs a new instance of ReferralException. All fields are set to null.
Method Detail

getReferralInfo

public abstract Object getReferralInfo()
Retrieves information (such as URLs) related to this referral. The program may examine or display this information to the user to determine whether to continue with the referral, or to determine additional information needs to be supplied in order to continue with the referral.
Returns:
Non-null referral information related to this referral.

getReferralContext

public abstract Context getReferralContext()
                                    throws NamingException
Retrieves the context at which to continue the method. Regardless of whether a referral is encountered directly during a context operation, or indirectly, for example, during a search enumeration, the referral exception should provide a context at which to continue the operation. The referral context is created using the environment properties of the context that threw the ReferralException.

To continue the operation, the client program should re-invoke the method using the same arguments as the original invocation.

Returns:
The non-null context at which to continue the method.
Throws:
NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

getReferralContext

public abstract Context getReferralContext(Hashtable env)
                                    throws NamingException
Retrieves the context at which to continue the method using environment properties. Regardless of whether a referral is encountered directly during a context operation, or indirectly, for example, during a search enumeration, the referral exception should provide a context at which to continue the operation.

The referral context is created using env as its environment properties. This method should be used instead of the no-arg overloaded form when the caller needs to use different environment properties for the referral context. It might need to do this, for example, when it needs to supply different authentication information to the referred server in order to create the referral context.

To continue the operation, the client program should re-invoke the method using the same arguments as the original invocation.

Parameters:
env - The possibly null environment to use when retrieving the referral context. If null, no environment properties will be used.
Returns:
The non-null context at which to continue the method.
Throws:
NamingException - If a naming exception was encountered. Call either retryReferral() or skipReferral() to continue processing referrals.

skipReferral

public abstract boolean skipReferral()
Discards the referral about to be processed. A call to this method should be followed by a call to getReferralContext to allow the processing of other referrals to continue. The following code fragment shows a typical usage pattern.

    } catch (ReferralException e) {
        if (!shallIFollow(e.getReferralInfo())) {
        if (!e.skipReferral()) {
            return;
        }
        }
        ctx = e.getReferralContext();
    }
Returns:
true If more referral processing is pending; false otherwise.

retryReferral

public abstract void retryReferral()
Retries the referral currently being processed. A call to this method should be followed by a call to getReferralContext to allow the current referral to be retried. The following code fragment shows a typical usage pattern.

    } catch (ReferralException e) {
        while (true) {
        try {
            ctx = e.getReferralContext(env);
            break;
        } catch (NamingException ne) {
            if (! shallIRetry()) {
            return;
            }
            // modify environment properties (env), if necessary
            e.retryReferral();
        }
        }
    }
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceUnavailableException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class ServiceUnavailableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.ServiceUnavailableException
All Implemented Interfaces:
Serializable
public class ServiceUnavailableException
extends NamingException

This exception is thrown when attempting to communcate with a directory or naming service and that service is not available. It might be unavailble for different reasons. For example, the server might be too busy to service the request, or the server might not be registered to service any requests, etc.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
ServiceUnavailableException()
Constructs a new instance of ServiceUnavailableException.
ServiceUnavailableException(String explanation)
Constructs a new instance of ServiceUnavailableException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServiceUnavailableException

public ServiceUnavailableException(String explanation)
Constructs a new instance of ServiceUnavailableException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null additional detail about this exception.
See Also:
Throwable.getMessage()

ServiceUnavailableException

public ServiceUnavailableException()
Constructs a new instance of ServiceUnavailableException. All fields default to null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SizeLimitExceededException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class SizeLimitExceededException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LimitExceededException
                          |
                          +--javax.naming.SizeLimitExceededException
All Implemented Interfaces:
Serializable
public class SizeLimitExceededException
extends LimitExceededException

This exception is thrown when a method produces a result that exceeds a size-related limit. This can happen, for example, if the result contains more objects than the user requested, or when the size of the result exceeds some implementation-specific limit.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
SizeLimitExceededException()
Constructs a new instance of SizeLimitExceededException.
SizeLimitExceededException(String explanation)
Constructs a new instance of SizeLimitExceededException using an explanation.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SizeLimitExceededException

public SizeLimitExceededException()
Constructs a new instance of SizeLimitExceededException. All fields default to null.

SizeLimitExceededException

public SizeLimitExceededException(String explanation)
Constructs a new instance of SizeLimitExceededException using an explanation. All other fields default to null.
Parameters:
explanation - Possibly null detail about this exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.naming.spi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.naming.spi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.naming.spi.DirStateFactory.Result
    • class javax.naming.spi.NamingManager
      • class javax.naming.spi.DirectoryManager
    • class javax.naming.spi.ResolveResult (implements java.io.Serializable)

Interface Hierarchy

  • interface javax.naming.spi.InitialContextFactory
  • interface javax.naming.spi.InitialContextFactoryBuilder
  • interface javax.naming.spi.ObjectFactory
    • interface javax.naming.spi.DirObjectFactory
  • interface javax.naming.spi.ObjectFactoryBuilder
  • interface javax.naming.spi.Resolver
  • interface javax.naming.spi.StateFactory
    • interface javax.naming.spi.DirStateFactory
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.naming.spi

Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

See:
Description

Interface Summary
DirObjectFactory | This interface represents a factory for creating an object given an object and attributes about the object.
DirStateFactory | This interface represents a factory for obtaining the state of an object and corresponding attributes for binding.
InitialContextFactory | This interface represents a factory that creates an initial context.
InitialContextFactoryBuilder | This interface represents a builder that creates initial context factories.
ObjectFactory | This interface represents a factory for creating an object.
ObjectFactoryBuilder | This interface represents a builder that creates object factories.
Resolver | This interface represents an "intermediate context" for name resolution.
StateFactory | This interface represents a factory for obtaining the state of an object for binding.

Class Summary
DirectoryManager | This class contains methods for supporting DirContext implementations.
DirStateFactory.Result | An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
NamingManager | This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.
ResolveResult | This class represents the result of resolution of a name.

Package javax.naming.spi Description

Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

This package defines the service provider interface (SPI) of the Java Naming and Directory InterfaceTM (JNDI). JNDI provides naming and directory functionality to applications written in the Java programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

The JNDI SPI provides the means for creating JNDI service providers, through which JNDI applications access different naming and directory services.

Plug-in Architecture

The service provider package allows different implementations to be plugged in dynamically. These different implementations include those for the initial context, and implementations for contexts that can be reached from the initial context.

Java Object Support

The service provider package provides support for implementors of the javax.naming.Context.lookup() method and related methods to return Java objects that are natural and intuitive for the Java programmer. For example, when looking up a printer name from the directory, it is natural for you to expect to get back a printer object on which to operate.

Multiple Naming Systems (Federation)

JNDI operations allow applications to supply names that span multiple naming systems. So in the process of completing an operation, one service provider might need to interact with another service provider, for example, to pass on the operation to be continued in the next naming system. The service provider package provides support for different providers to cooperate to complete JNDI operations.

Package Specification

The following documents can be found at the Java technology web site:
  • JNDI SPI Document (Postscript)
  • JNDI SPI Document (PDF)

Related Documentation

For a tutorial, examples, and overview, please see:
  • The JNDI Tutorial
  • Examples
  • Executive Summary (Postscript)
  • Executive Summary (PDF)

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.naming.spi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.naming.spi

Packages that use javax.naming.spi
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Classes in javax.naming.spi used by javax.naming.spi
DirStateFactory.Result
An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
InitialContextFactory
This interface represents a factory that creates an initial context.
InitialContextFactoryBuilder
This interface represents a builder that creates initial context factories.
NamingManager
This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.
ObjectFactory
This interface represents a factory for creating an object.
ObjectFactoryBuilder
This interface represents a builder that creates object factories.
ResolveResult
This class represents the result of resolution of a name.
StateFactory
This interface represents a factory for obtaining the state of an object for binding.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.spi.DirectoryManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.spi.DirectoryManager

No usage of javax.naming.spi.DirectoryManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.DirObjectFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.DirObjectFactory

No usage of javax.naming.spi.DirObjectFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.DirStateFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.DirStateFactory

No usage of javax.naming.spi.DirStateFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.Resolver

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.Resolver

No usage of javax.naming.spi.Resolver

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.spi.DirStateFactory.Result

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.spi.DirStateFactory.Result

Packages that use DirStateFactory.Result
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of DirStateFactory.Result in javax.naming.spi

Methods in javax.naming.spi that return DirStateFactory.Result
static DirStateFactory.Result | DirectoryManager.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
DirStateFactory.Result | DirStateFactory.getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) Retrieves the state of an object for binding given the object and attributes to be transformed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.spi.NamingManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.spi.NamingManager

Packages that use NamingManager
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of NamingManager in javax.naming.spi

Subclasses of NamingManager in javax.naming.spi
 class DirectoryManager
This class contains methods for supporting DirContext implementations.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.naming.spi.ResolveResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.naming.spi.ResolveResult

Packages that use ResolveResult
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of ResolveResult in javax.naming.spi

Methods in javax.naming.spi that return ResolveResult
ResolveResult | Resolver.resolveToClass(Name name, Class contextType) Partially resolves a name.
ResolveResult | Resolver.resolveToClass(String name, Class contextType) Partially resolves a name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.InitialContextFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.InitialContextFactory

Packages that use InitialContextFactory
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of InitialContextFactory in javax.naming.spi

Methods in javax.naming.spi that return InitialContextFactory
 InitialContextFactory InitialContextFactoryBuilder.createInitialContextFactory(Hashtable environment)
Creates an initial context factory using the specified environment.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.InitialContextFactoryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.InitialContextFactoryBuilder

Packages that use InitialContextFactoryBuilder
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of InitialContextFactoryBuilder in javax.naming.spi

Methods in javax.naming.spi with parameters of type InitialContextFactoryBuilder
static void NamingManager.setInitialContextFactoryBuilder(InitialContextFactoryBuilder builder)
Sets the InitialContextFactory builder to be builder.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.ObjectFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.ObjectFactory

Packages that use ObjectFactory
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of ObjectFactory in javax.naming.spi

Subinterfaces of ObjectFactory in javax.naming.spi
 interface DirObjectFactory
This interface represents a factory for creating an object given an object and attributes about the object.

Methods in javax.naming.spi that return ObjectFactory
 ObjectFactory ObjectFactoryBuilder.createObjectFactory(Object obj, Hashtable environment)
Creates a new object factory using the environment supplied.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.ObjectFactoryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.ObjectFactoryBuilder

Packages that use ObjectFactoryBuilder
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of ObjectFactoryBuilder in javax.naming.spi

Methods in javax.naming.spi with parameters of type ObjectFactoryBuilder
static void NamingManager.setObjectFactoryBuilder(ObjectFactoryBuilder builder)
The ObjectFactoryBuilder determines the policy used when trying to load object factories.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.naming.spi.StateFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.naming.spi.StateFactory

Packages that use StateFactory
javax.naming.spi Provides the means for dynamically plugging in support for accessing naming and directory services through the javax.naming and related packages.

Uses of StateFactory in javax.naming.spi

Subinterfaces of StateFactory in javax.naming.spi
 interface DirStateFactory
This interface represents a factory for obtaining the state of an object and corresponding attributes for binding.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DirectoryManager

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Class DirectoryManager

java.lang.Object
  |
  +--javax.naming.spi.NamingManager
        |
        +--javax.naming.spi.DirectoryManager
public class DirectoryManager
extends NamingManager

This class contains methods for supporting DirContext implementations.

This class is an extension of NamingManager. It contains methods for use by service providers for accessing object factories and state factories, and for getting continuation contexts for supporting federation.

DirectoryManager is safe for concurrent access by multiple threads.

Except as otherwise noted, a Name, Attributes, or environment parameter passed to any method is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Since:
1.3
See Also:
DirObjectFactory, DirStateFactory

Fields inherited from class javax.naming.spi.NamingManager
CPE
Method Summary
static DirContext | getContinuationDirContext(CannotProceedException cpe) Creates a context in which to continue a DirContext operation.
static Object | getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Creates an instance of an object for the specified object, attributes, and environment.
static DirStateFactory.Result | getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) Retrieves the state of an object for binding when given the original object and its attributes.
Methods inherited from class javax.naming.spi.NamingManager
getContinuationContext, getInitialContext, getObjectInstance, getStateToBind, getURLContext, hasInitialContextFactoryBuilder, setInitialContextFactoryBuilder, setObjectFactoryBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getContinuationDirContext

public static DirContext getContinuationDirContext(CannotProceedException cpe)
                                            throws NamingException
Creates a context in which to continue a DirContext operation. Operates just like NamingManager.getContinuationContext(), only the continuation context returned is a DirContext.
Parameters:
cpe - The non-null exception that triggered this continuation.
Returns:
A non-null DirContext object for continuing the operation.
Throws:
NamingException - If a naming exception occurred.
See Also:
NamingManager.getContinuationContext(CannotProceedException)

getObjectInstance

public static Object getObjectInstance(Object refInfo,
                                       Name name,
                                       Context nameCtx,
                                       Hashtable environment,
                                       Attributes attrs)
                                throws Exception
Creates an instance of an object for the specified object, attributes, and environment.

This method is the same as NamingManager.getObjectInstance except for the following differences:

  • It accepts an Attributes parameter that contains attributes associated with the object. The DirObjectFactory might use these attributes to save having to look them up from the directory.
  • The object factories tried must implement either ObjectFactory or DirObjectFactory. If it implements DirObjectFactory, DirObjectFactory.getObjectInstance() is used, otherwise, ObjectFactory.getObjectInstance() is used.
Service providers that implement the DirContext interface should use this method, not NamingManager.getObjectInstance().

Parameters:
refInfo - The possibly null object for which to create an object.
name - The name of this object relative to nameCtx. Specifying a name is optional; if it is omitted, name should be null.
nameCtx - The context relative to which the name parameter is specified. If null, name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the object factory and the object.
attrs - The possibly null attributes associated with refInfo. This might not be the complete set of attributes for refInfo; you might be able to read more attributes from the directory.
Returns:
An object created using refInfo and attrs; or refInfo if an object cannot be created by a factory.
Throws:
NamingException - If a naming exception was encountered while attempting to get a URL context, or if one of the factories accessed throws a NamingException.
Exception - If one of the factories accessed throws an exception, or if an error was encountered while loading and instantiating the factory and object classes. A factory should only throw an exception if it does not want other factories to be used in an attempt to create an object. See DirObjectFactory.getObjectInstance().
Since:
1.3
See Also:
NamingManager.getURLContext(java.lang.String, java.util.Hashtable), DirObjectFactory, DirObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)

getStateToBind

public static DirStateFactory.Result getStateToBind(Object obj,
                                                    Name name,
                                                    Context nameCtx,
                                                    Hashtable environment,
                                                    Attributes attrs)
                                             throws NamingException
Retrieves the state of an object for binding when given the original object and its attributes.

This method is like NamingManager.getStateToBind except for the following differences:

  • It accepts an Attributes parameter containing attributes that were passed to the DirContext.bind() method.
  • It returns a non-null DirStateFactory.Result instance containing the object to be bound, and the attributes to accompany the binding. Either the object or the attributes may be null.
  • The state factories tried must each implement either StateFactory or DirStateFactory. If it implements DirStateFactory, then DirStateFactory.getStateToBind() is called; otherwise, StateFactory.getStateToBind() is called.
Service providers that implement the DirContext interface should use this method, not NamingManager.getStateToBind().

See NamingManager.getStateToBind() for a description of how the list of state factories to be tried is determined.

The object returned by this method is owned by the caller. The implementation will not subsequently modify it. It will contain either a new Attributes object that is likewise owned by the caller, or a reference to the original attrs parameter.

Parameters:
obj - The non-null object for which to get state to bind.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the state factory and the object's state.
attrs - The possibly null Attributes that is to be bound with the object.
Returns:
A non-null DirStateFactory.Result containing the object and attributes to be bound. If no state factory returns a non-null answer, the result will contain the object (obj) itself with the original attributes.
Throws:
NamingException - If a naming exception was encountered while using the factories. A factory should only throw an exception if it does not want other factories to be used in an attempt to create an object. See DirStateFactory.getStateToBind().
Since:
1.3
See Also:
DirStateFactory, DirStateFactory.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes), NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DirObjectFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface DirObjectFactory

All Superinterfaces:
ObjectFactory
public interface DirObjectFactory
extends ObjectFactory

This interface represents a factory for creating an object given an object and attributes about the object.

The JNDI framework allows for object implementations to be loaded in dynamically via object factories. See ObjectFactory for details.

A DirObjectFactory extends ObjectFactory by allowing an Attributes instance to be supplied to the getObjectInstance() method. DirObjectFactory implementations are intended to be used by DirContext service providers. The service provider, in addition reading an object from the directory, might already have attributes that are useful for the object factory to check to see whether the factory is supposed to process the object. For instance, an LDAP-style service provider might have read the "objectclass" of the object. A CORBA object factory might be interested only in LDAP entries with "objectclass=corbaObject". By using the attributes supplied by the LDAP service provider, the CORBA object factory can quickly eliminate objects that it need not worry about, and non-CORBA object factories can quickly eliminate CORBA-related LDAP entries.

Since:
1.3
See Also:
NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), DirectoryManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes), ObjectFactory

Method Summary
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs)
Creates an object using the location or reference information, and attributes specified.
Methods inherited from interface javax.naming.spi.ObjectFactory
getObjectInstance

Method Detail

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable environment,
                                Attributes attrs)
                         throws Exception
Creates an object using the location or reference information, and attributes specified.

Special requirements of this object are supplied using environment. An example of such an environment property is user identity information.

DirectoryManager.getObjectInstance() successively loads in object factories. If it encounters a DirObjectFactory, it will invoke DirObjectFactory.getObjectInstance(); otherwise, it invokes ObjectFactory.getObjectInstance(). It does this until a factory produces a non-null answer.

When an exception is thrown by an object factory, the exception is passed on to the caller of DirectoryManager.getObjectInstance(). The search for other factories that may produce a non-null answer is halted. An object factory should only throw an exception if it is sure that it is the only intended factory and that no other object factories should be tried. If this factory cannot create an object using the arguments supplied, it should return null.

Since DirObjectFactory extends ObjectFactory, it effectively has two getObjectInstance() methods, where one differs from the other by the attributes argument. Given a factory that implements DirObjectFactory, DirectoryManager.getObjectInstance() will only use the method that accepts the attributes argument, while NamingManager.getObjectInstance() will only use the one that does not accept the attributes argument.

See ObjectFactory for a description URL context factories and other properties of object factories that apply equally to DirObjectFactory.

The name, attrs, and environment parameters are owned by the caller. The implementation will not modify these objects or keep references to them, although it may keep references to clones or copies.

Parameters:
obj - The possibly null object containing location or reference information that can be used in creating an object.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment that is used in creating the object.
attrs - The possibly null attributes containing some of obj's attributes. attrs might not necessarily have all of obj's attributes. If the object factory requires more attributes, it needs to get it, either using obj, or name and nameCtx. The factory must not modify attrs.
Returns:
The object created; null if an object cannot be created.
Throws:
Exception - If this object factory encountered an exception while attempting to create an object, and no other object factories are to be tried.
See Also:
DirectoryManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes), NamingManager.getURLContext(java.lang.String, java.util.Hashtable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DirStateFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface DirStateFactory

All Superinterfaces:
StateFactory
public interface DirStateFactory
extends StateFactory

This interface represents a factory for obtaining the state of an object and corresponding attributes for binding.

The JNDI framework allows for object implementations to be loaded in dynamically via object factories.

A DirStateFactory extends StateFactory by allowing an Attributes instance to be supplied to and be returned by the getStateToBind() method. DirStateFactory implementations are intended to be used by DirContext service providers. When a caller binds an object using DirContext.bind(), he might also specify a set of attributes to be bound with the object. The object and attributes to be bound are passed to the getStateToBind() method of a factory. If the factory processes the object and attributes, it returns a corresponding pair of object and attributes to be bound. If the factory does not process the object, it must return null.

For example, a caller might bind a printer object with some printer-related attributes.

 ctx.rebind("inky", printer, printerAttrs);
An LDAP service provider for ctx uses a DirStateFactory (indirectly via DirectoryManager.getStateToBind()) and gives it printer and printerAttrs. A factory for an LDAP directory might turn printer into a set of attributes and merge that with printerAttrs. The service provider then uses the resulting attributes to create an LDAP entry and updates the directory.

Since DirStateFactory extends StateFactory, it has two getStateToBind() methods, where one differs from the other by the attributes argument. DirectoryManager.getStateToBind() will only use the form that accepts the attributes argument, while NamingManager.getStateToBind() will only use the form that does not accept the attributes argument.

Either form of the getStateToBind() method of a DirStateFactory may be invoked multiple times, possibly using different parameters. The implementation is thread-safe.

Since:
1.3
See Also:
DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes), DirObjectFactory

Inner Class Summary
static class DirStateFactory.Result
An object/attributes pair for returning the result of DirStateFactory.getStateToBind().
Method Summary
 DirStateFactory.Result getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs)
Retrieves the state of an object for binding given the object and attributes to be transformed.
Methods inherited from interface javax.naming.spi.StateFactory
getStateToBind

Method Detail

getStateToBind

public DirStateFactory.Result getStateToBind(Object obj,
                                             Name name,
                                             Context nameCtx,
                                             Hashtable environment,
                                             Attributes inAttrs)
                                      throws NamingException
Retrieves the state of an object for binding given the object and attributes to be transformed.

DirectoryManager.getStateToBind() successively loads in state factories. If a factory implements DirStateFactory, DirectoryManager invokes this method; otherwise, it invokes StateFactory.getStateToBind(). It does this until a factory produces a non-null answer.

When an exception is thrown by a factory, the exception is passed on to the caller of DirectoryManager.getStateToBind(). The search for other factories that may produce a non-null answer is halted. A factory should only throw an exception if it is sure that it is the only intended factory and that no other factories should be tried. If this factory cannot create an object using the arguments supplied, it should return null.

The name and nameCtx parameters may optionally be used to specify the name of the object being created. See the description of "Name and Context Parameters" in ObjectFactory.getObjectInstance() for details. If a factory uses nameCtx it should synchronize its use against concurrent access, since context implementations are not guaranteed to be thread-safe.

The name, inAttrs, and environment parameters are owned by the caller. The implementation will not modify these objects or keep references to them, although it may keep references to clones or copies. The object returned by this method is owned by the caller. The implementation will not subsequently modify it. It will contain either a new Attributes object that is likewise owned by the caller, or a reference to the original inAttrs parameter.

Parameters:
obj - A possibly null object whose state is to be retrieved.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the object's state.
inAttrs - The possibly null attributes to be bound with the object. The factory must not modify inAttrs.
Returns:
A Result containing the object's state for binding and the corresponding attributes to be bound; null if the object don't use this factory.
Throws:
NamingException - If this factory encountered an exception while attempting to get the object's state, and no other factories are to be tried.
See Also:
DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InitialContextFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface InitialContextFactory

public interface InitialContextFactory

This interface represents a factory that creates an initial context.

The JNDI framework allows for different initial context implementations to be specified at runtime. The initial context is created using an initial context factory. An initial context factory must implement the InitialContextFactory interface, which provides a method for creating instances of initial context that implement the Context interface. In addition, the factory class must be public and must have a public constructor that accepts no arguments.

Since:
1.3
See Also:
InitialContextFactoryBuilder, NamingManager.getInitialContext(java.util.Hashtable), InitialContext, InitialDirContext

Method Summary
 Context getInitialContext(Hashtable environment)
Creates an Initial Context for beginning name resolution.

Method Detail

getInitialContext

public Context getInitialContext(Hashtable environment)
                          throws NamingException
Creates an Initial Context for beginning name resolution. Special requirements of this context are supplied using environment.

The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Parameters:
environment - The possibly null environment specifying information to be used in the creation of the initial context.
Returns:
A non-null initial context object that implements the Context interface.
Throws:
NamingException - If cannot create an initial context.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InitialContextFactoryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface InitialContextFactoryBuilder

public interface InitialContextFactoryBuilder

This interface represents a builder that creates initial context factories.

The JNDI framework allows for different initial context implementations to be specified at runtime. An initial context is created using an initial context factory. A program can install its own builder that creates initial context factories, thereby overriding the default policies used by the framework, by calling NamingManager.setInitialContextFactoryBuilder(). The InitialContextFactoryBuilder interface must be implemented by such a builder.

Since:
1.3
See Also:
InitialContextFactory, NamingManager.getInitialContext(java.util.Hashtable), NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder), NamingManager.hasInitialContextFactoryBuilder(), InitialContext, InitialDirContext

Method Summary
 InitialContextFactory createInitialContextFactory(Hashtable environment)
Creates an initial context factory using the specified environment.

Method Detail

createInitialContextFactory

public InitialContextFactory createInitialContextFactory(Hashtable environment)
                                                  throws NamingException
Creates an initial context factory using the specified environment.

The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Parameters:
environment - Environment used in creating an intial context implementation. Can be null.
Returns:
A non-null initial context factory.
Throws:
NamingException - If an initial context factory could not be created.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Class NamingManager

java.lang.Object
  |
  +--javax.naming.spi.NamingManager
Direct Known Subclasses:
DirectoryManager
public class NamingManager
extends Object

This class contains methods for creating context objects and objects referred to by location information in the naming or directory service.

This class cannot be instantiated. It has only static methods.

The mention of URL in the documentation for this class refers to a URL string as defined by RFC 1738 and its related RFCs. It is any string that conforms to the syntax described therein, and may not always have corresponding support in the java.net.URL class or Web browsers.

NamingManager is safe for concurrent access by multiple threads.

Except as otherwise noted, a Name or environment parameter passed to any method is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Since:
1.3

Field Summary
static String CPE
Constant that holds the name of the environment property into which getContinuationContext() stores the value of its CannotProceedException parameter.
Method Summary
static Context | getContinuationContext(CannotProceedException cpe) Creates a context in which to continue a context operation.
static Context | getInitialContext(Hashtable env) Creates an initial context using the specified environment properties.
static Object | getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable environment) Creates an instance of an object for the specified object and environment.
static Object | getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) Retrieves the state of an object for binding.
static Context | getURLContext(String scheme, Hashtable environment) Creates a context for the given URL scheme id.
static boolean | hasInitialContextFactoryBuilder() Determines whether an initial context factory builder has been set.
static void | setInitialContextFactoryBuilder(InitialContextFactoryBuilder builder) Sets the InitialContextFactory builder to be builder.
static void | setObjectFactoryBuilder(ObjectFactoryBuilder builder) The ObjectFactoryBuilder determines the policy used when trying to load object factories.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CPE

public static final String CPE
Constant that holds the name of the environment property into which getContinuationContext() stores the value of its CannotProceedException parameter. This property is inherited by the continuation context, and may be used by that context's service provider to inspect the fields of the exception.

The value of this constant is "java.naming.spi.CannotProceedException".

See Also:
getContinuationContext(javax.naming.CannotProceedException)
Since:
1.3
Method Detail

setObjectFactoryBuilder

public static void setObjectFactoryBuilder(ObjectFactoryBuilder builder)
                                    throws NamingException
The ObjectFactoryBuilder determines the policy used when trying to load object factories. See getObjectInstance() and class ObjectFactory for a description of the default policy. setObjectFactoryBuilder() overrides this default policy by installing an ObjectFactoryBuilder. Subsequent object factories will be loaded and created using the installed builder.

The builder can only be installed if the executing thread is allowed (by the security manager's checkSetFactory() method) to do so. Once installed, the builder cannot be replaced.

Parameters:
builder - The factory builder to install. If null, no builder is installed.
Throws:
SecurityException - builder cannot be installed for security reasons.
NamingException - builder cannot be installed for a non-security-related reason.
IllegalStateException - If a factory has already been installed.
See Also:
getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), ObjectFactory, ObjectFactoryBuilder, SecurityManager.checkSetFactory()

getObjectInstance

public static Object getObjectInstance(Object refInfo,
                                       Name name,
                                       Context nameCtx,
                                       Hashtable environment)
                                throws Exception
Creates an instance of an object for the specified object and environment.

If an object factory builder has been installed, it is used to create a factory for creating the object. Otherwise, the following rules are used to create the object:

  1. If refInfo is a Reference or Referenceable containing a factory class name, use the named factory to create the object. Return refInfo if the factory cannot be created. Under JDK 1.1, if the factory class must be loaded from a location specified in the reference, a SecurityManager must have been installed or the factory creation will fail. If an exception is encountered while creating the factory, it is passed up to the caller.
  2. If refInfo is a Reference or Referenceable with no factory class name, and the address or addresses are StringRefAddrs with address type "URL", try the URL context factory corresponding to each URL's scheme id to create the object (see getURLContext()). If that fails, continue to the next step.
  3. Use the object factories specified in the Context.OBJECT_FACTORIES property of the environment, and of the provider resource file associated with nameCtx, in that order. The value of this property is a colon-separated list of factory class names that are tried in order, and the first one that succeeds in creating an object is the one used. If none of the factories can be loaded, return refInfo. If an exception is encountered while creating the object, the exception is passed up to the caller.

Service providers that implement the DirContext interface should use DirectoryManager.getObjectInstance(), not this method. Service providers that implement only the Context interface should use this method.

Note that an object factory (an object that implements the ObjectFactory interface) must be public and must have a public constructor that accepts no arguments.

The name and nameCtx parameters may optionally be used to specify the name of the object being created. name is the name of the object, relative to context nameCtx. This information could be useful to the object factory or to the object implementation. If there are several possible contexts from which the object could be named -- as will often be the case -- it is up to the caller to select one. A good rule of thumb is to select the "deepest" context available. If nameCtx is null, name is relative to the default initial context. If no name is being specified, the name parameter should be null.

Parameters:
refInfo - The possibly null object for which to create an object.
name - The name of this object relative to nameCtx. Specifying a name is optional; if it is omitted, name should be null.
nameCtx - The context relative to which the name parameter is specified. If null, name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the object factory and the object.
Returns:
An object created using refInfo; or refInfo if an object cannot be created using the algorithm described above.
Throws:
NamingException - if a naming exception was encountered while attempting to get a URL context, or if one of the factories accessed throws a NamingException.
Exception - if one of the factories accessed throws an exception, or if an error was encountered while loading and instantiating the factory and object classes. A factory should only throw an exception if it does not want other factories to be used in an attempt to create an object. See ObjectFactory.getObjectInstance().
See Also:
getURLContext(java.lang.String, java.util.Hashtable), ObjectFactory, ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

getURLContext

public static Context getURLContext(String scheme,
                                    Hashtable environment)
                             throws NamingException
Creates a context for the given URL scheme id.

The resulting context is for resolving URLs of the scheme scheme. The resulting context is not tied to a specific URL. It is able to handle arbitrary URLs with the specified scheme.

The class name of the factory that creates the resulting context has the naming convention scheme-idURLContextFactory (e.g. "ftpURLContextFactory" for the "ftp" scheme-id), in the package specified as follows. The Context.URL_PKG_PREFIXES environment property (which may contain values taken from applet parameters, system properties, or application resource files) contains a colon-separated list of package prefixes. Each package prefix in the property is tried in the order specified to load the factory class. The default package prefix is "com.sun.jndi.url" (if none of the specified packages work, this default is tried). The complete package name is constructed using the package prefix, concatenated with the scheme id.

For example, if the scheme id is "ldap", and the Context.URL_PKG_PREFIXES property contains "com.widget:com.wiz.jndi", the naming manager would attempt to load the following classes until one is successfully instantiated:

  • com.widget.ldap.ldapURLContextFactory
  • com.wiz.jndi.ldap.ldapURLContextFactory
  • com.sun.jndi.url.ldap.ldapURLContextFactory
If none of the package prefixes work, null is returned.

If a factory is instantiated, it is invoked with the following parameters to produce the resulting context.

factory.getObjectInstance(null, environment);

For example, invoking getObjectInstance() as shown above on a LDAP URL context factory would return a context that can resolve LDAP urls (e.g. "ldap://ldap.wiz.com/o=wiz,c=us", "ldap://ldap.umich.edu/o=umich,c=us", ...).

Note that an object factory (an object that implements the ObjectFactory interface) must be public and must have a public constructor that accepts no arguments.

Parameters:
scheme - The non-null scheme-id of the URLs supported by the context.
environment - The possibly null environment properties to be used in the creation of the object factory and the context.
Returns:
A context for resolving URLs with the scheme id scheme; null if the factory for creating the context is not found.
Throws:
NamingException - If a naming exception occurs while creating the context.
See Also:
getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)

getInitialContext

public static Context getInitialContext(Hashtable env)
                                 throws NamingException
Creates an initial context using the specified environment properties.

If an InitialContextFactoryBuilder has been installed, it is used to create the factory for creating the initial context. Otherwise, the class specified in the Context.INITIAL_CONTEXT_FACTORY environment property is used. Note that an initial context factory (an object that implements the InitialContextFactory interface) must be public and must have a public constructor that accepts no arguments.

Parameters:
env - The possibly null environment properties used when creating the context.
Returns:
A non-null initial context.
Throws:
NoInitialContextException - If the Context.INITIAL_CONTEXT_FACTORY property is not found or names a nonexistent class or a class that cannot be instantiated, or if the initial context could not be created for some other reason.
NamingException - If some other naming exception was encountered.
See Also:
InitialContext, InitialDirContext

setInitialContextFactoryBuilder

public static void setInitialContextFactoryBuilder(InitialContextFactoryBuilder builder)
                                            throws NamingException
Sets the InitialContextFactory builder to be builder.

The builder can only be installed if the executing thread is allowed by the security manager to do so. Once installed, the builder cannot be replaced.

Parameters:
builder - The initial context factory builder to install. If null, no builder is set.
Throws:
SecurityException - builder cannot be installed for security reasons.
NamingException - builder cannot be installed for a non-security-related reason.
IllegalStateException - If a builder was previous installed.
See Also:
hasInitialContextFactoryBuilder(), SecurityManager.checkSetFactory()

hasInitialContextFactoryBuilder

public static boolean hasInitialContextFactoryBuilder()
Determines whether an initial context factory builder has been set.
Returns:
true if an initial context factory builder has been set; false otherwise.
See Also:
setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)

getContinuationContext

public static Context getContinuationContext(CannotProceedException cpe)
                                      throws NamingException
Creates a context in which to continue a context operation.

In performing an operation on a name that spans multiple namespaces, a context from one naming system may need to pass the operation on to the next naming system. The context implementation does this by first constructing a CannotProceedException containing information pinpointing how far it has proceeded. It then obtains a continuation context from JNDI by calling getContinuationContext. The context implementation should then resume the context operation by invoking the same operation on the continuation context, using the remainder of the name that has not yet been resolved.

Before making use of the cpe parameter, this method updates the environment associated with that object by setting the value of the property CPE to cpe. This property will be inherited by the continuation context, and may be used by that context's service provider to inspect the fields of this exception.

Parameters:
cpe - The non-null exception that triggered this continuation.
Returns:
A non-null Context object for continuing the operation.
Throws:
NamingException - If a naming exception occurred.

getStateToBind

public static Object getStateToBind(Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable environment)
                             throws NamingException
Retrieves the state of an object for binding.

Service providers that implement the DirContext interface should use DirectoryManager.getStateToBind(), not this method. Service providers that implement only the Context interface should use this method.

This method uses the specified state factories in the Context.STATE_FACTORIES property from the environment properties, and from the provider resource file associated with nameCtx, in that order. The value of this property is a colon-separated list of factory class names that are tried in order, and the first one that succeeds in returning the object's state is the one used. If no object's state can be retrieved in this way, return the object itself. If an exception is encountered while retrieving the state, the exception is passed up to the caller.

Note that a state factory (an object that implements the StateFactory interface) must be public and must have a public constructor that accepts no arguments.

The name and nameCtx parameters may optionally be used to specify the name of the object being created. See the description of "Name and Context Parameters" in ObjectFactory.getObjectInstance() for details.

This method may return a Referenceable object. The service provider obtaining this object may choose to store it directly, or to extract its reference (using Referenceable.getReference()) and store that instead.

Parameters:
obj - The non-null object for which to get state to bind.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the state factory and the object's state.
Returns:
The non-null object representing obj's state for binding. It could be the object (obj) itself.
Throws:
NamingException - If one of the factories accessed throws an exception, or if an error was encountered while loading and instantiating the factory and object classes. A factory should only throw an exception if it does not want other factories to be used in an attempt to create an object. See StateFactory.getStateToBind().
Since:
1.3
See Also:
StateFactory, StateFactory.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface ObjectFactory

All Known Subinterfaces:
DirObjectFactory
public interface ObjectFactory

This interface represents a factory for creating an object.

The JNDI framework allows for object implementations to be loaded in dynamically via object factories. For example, when looking up a printer bound in the name space, if the print service binds printer names to References, the printer Reference could be used to create a printer object, so that the caller of lookup can directly operate on the printer object after the lookup.

An ObjectFactory is responsible for creating objects of a specific type. In the above example, you may have a PrinterObjectFactory for creating Printer objects.

An object factory must implement the ObjectFactory interface. In addition, the factory class must be public and must have a public constructor that accepts no parameters.

The getObjectInstance() method of an object factory may be invoked multiple times, possibly using different parameters. The implementation is thread-safe.

The mention of URL in the documentation for this class refers to a URL string as defined by RFC 1738 and its related RFCs. It is any string that conforms to the syntax described therein, and may not always have corresponding support in the java.net.URL class or Web browsers.

Since:
1.3
See Also:
NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), NamingManager.getURLContext(java.lang.String, java.util.Hashtable), ObjectFactoryBuilder, StateFactory

Method Summary
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
Creates an object using the location or reference information specified.

Method Detail

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable environment)
                         throws Exception
Creates an object using the location or reference information specified.

Special requirements of this object are supplied using environment. An example of such an environment property is user identity information.

NamingManager.getObjectInstance() successively loads in object factories and invokes this method on them until one produces a non-null answer. When an exception is thrown by an object factory, the exception is passed on to the caller of NamingManager.getObjectInstance() (and no search is made for other factories that may produce a non-null answer). An object factory should only throw an exception if it is sure that it is the only intended factory and that no other object factories should be tried. If this factory cannot create an object using the arguments supplied, it should return null.

A URL context factory is a special ObjectFactory that creates contexts for resolving URLs or objects whose locations are specified by URLs. The getObjectInstance() method of a URL context factory will obey the following rules.

  1. If obj is null, create a context for resolving URLs of the scheme associated with this factory. The resulting context is not tied to a specific URL: it is able to handle arbitrary URLs with this factory's scheme id. For example, invoking getObjectInstance() with obj set to null on an LDAP URL context factory would return a context that can resolve LDAP URLs such as "ldap://ldap.wiz.com/o=wiz,c=us" and "ldap://ldap.umich.edu/o=umich,c=us".
  2. If obj is a URL string, create an object (typically a context) identified by the URL. For example, suppose this is an LDAP URL context factory. If obj is "ldap://ldap.wiz.com/o=wiz,c=us", getObjectInstance() would return the context named by the distinguished name "o=wiz, c=us" at the LDAP server ldap.wiz.com. This context can then be used to resolve LDAP names (such as "cn=George") relative to that context.
  3. If obj is an array of URL strings, the assumption is that the URLs are equivalent in terms of the context to which they refer. Verification of whether the URLs are, or need to be, equivalent is up to the context factory. The order of the URLs in the array is not significant. The object returned by getObjectInstance() is like that of the single URL case. It is the object named by the URLs.
  4. If obj is of any other type, the behavior of getObjectInstance() is determined by the context factory implementation.

The name and environment parameters are owned by the caller. The implementation will not modify these objects or keep references to them, although it may keep references to clones or copies.

Name and Context Parameters. The name and nameCtx parameters may optionally be used to specify the name of the object being created. name is the name of the object, relative to context nameCtx. If there are several possible contexts from which the object could be named -- as will often be the case -- it is up to the caller to select one. A good rule of thumb is to select the "deepest" context available. If nameCtx is null, name is relative to the default initial context. If no name is being specified, the name parameter should be null. If a factory uses nameCtx it should synchronize its use against concurrent access, since context implementations are not guaranteed to be thread-safe.

Parameters:
obj - The possibly null object containing location or reference information that can be used in creating an object.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment that is used in creating the object.
Returns:
The object created; null if an object cannot be created.
Throws:
Exception - if this object factory encountered an exception while attempting to create an object, and no other object factories are to be tried.
See Also:
NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), NamingManager.getURLContext(java.lang.String, java.util.Hashtable)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectFactoryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface ObjectFactoryBuilder

public interface ObjectFactoryBuilder

This interface represents a builder that creates object factories.

The JNDI framework allows for object implementations to be loaded in dynamically via object factories. For example, when looking up a printer bound in the name space, if the print service binds printer names to References, the printer Reference could be used to create a printer object, so that the caller of lookup can directly operate on the printer object after the lookup. An ObjectFactory is responsible for creating objects of a specific type. JNDI uses a default policy for using and loading object factories. You can override this default policy by calling NamingManager.setObjectFactoryBuilder() with an ObjectFactoryBuilder, which contains the program-defined way of creating/loading object factories. Any ObjectFactoryBuilder implementation must implement this interface that for creating object factories.

Since:
1.3
See Also:
ObjectFactory, NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), NamingManager.setObjectFactoryBuilder(javax.naming.spi.ObjectFactoryBuilder)

Method Summary
 ObjectFactory createObjectFactory(Object obj, Hashtable environment)
Creates a new object factory using the environment supplied.

Method Detail

createObjectFactory

public ObjectFactory createObjectFactory(Object obj,
                                         Hashtable environment)
                                  throws NamingException
Creates a new object factory using the environment supplied.

The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Parameters:
obj - The possibly null object for which to create a factory.
environment - Environment to use when creating the factory. Can be null.
Returns:
A non-null new instance of an ObjectFactory.
Throws:
NamingException - If an object factory cannot be created.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Resolver

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface Resolver

public interface Resolver

This interface represents an "intermediate context" for name resolution.

The Resolver interface contains methods that are implemented by contexts that do not support subtypes of Context, but which can act as intermediate contexts for resolution purposes.

A Name parameter passed to any method is owned by the caller. The service provider will not modify the object or keep a reference to it. A ResolveResult object returned by any method is owned by the caller. The caller may subsequently modify it; the service provider may not.

Since:
1.3

Method Summary
ResolveResult | resolveToClass(Name name, Class contextType) Partially resolves a name.
ResolveResult | resolveToClass(String name, Class contextType) Partially resolves a name.

Method Detail

resolveToClass

public ResolveResult resolveToClass(Name name,
                                    Class contextType)
                             throws NamingException
Partially resolves a name. Stops at the first context that is an instance of a given subtype of Context.
Parameters:
name - the name to resolve
contextType - the type of object to resolve. This should be a subtype of Context.
Returns:
the object that was found, along with the unresolved suffix of name. Cannot be null.
Throws:
NotContextException - if no context of the appropriate type is found
NamingException - if a naming exception was encountered
See Also:
resolveToClass(String, Class)

resolveToClass

public ResolveResult resolveToClass(String name,
                                    Class contextType)
                             throws NamingException
Partially resolves a name. See resolveToClass(Name, Class) for details.
Parameters:
name - the name to resolve
contextType - the type of object to resolve. This should be a subtype of Context.
Returns:
the object that was found, along with the unresolved suffix of name. Cannot be null.
Throws:
NotContextException - if no context of the appropriate type is found
NamingException - if a naming exception was encountered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResolveResult

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Class ResolveResult

java.lang.Object
  |
  +--javax.naming.spi.ResolveResult
All Implemented Interfaces:
Serializable
public class ResolveResult
extends Object
implements Serializable

This class represents the result of resolution of a name. It contains the object to which name was resolved, and the portion of the name that has not been resolved.

A ResolveResult instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single ResolveResult instance should lock the object.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected Name | remainingName Field containing the remaining name yet to be resolved.
protected Object | resolvedObj Field containing the Object that was resolved to successfully.
Constructor Summary
protected | ResolveResult() Constructs an instance of ResolveResult with the resolved object and remaining name both initialized to null.
 | ResolveResult(Object robj, Name rname) Constructs a new instance of ResolveResult consisting of the resolved Object and the remaining name.
 | ResolveResult(Object robj, String rcomp) Constructs a new instance of ResolveResult consisting of the resolved object and the remaining unresolved component.
Method Summary
void | appendRemainingComponent(String name) Adds a single component to the end of remaining name.
void | appendRemainingName(Name name) Adds components to the end of remaining name.
Name | getRemainingName() Retrieves the remaining unresolved portion of the name.
Object | getResolvedObj() Retrieves the Object to which resolution was successful.
void | setRemainingName(Name name) Sets the remaining name field of this result to name.
void | setResolvedObj(Object obj) Sets the resolved Object field of this result to obj.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

resolvedObj

protected Object resolvedObj
Field containing the Object that was resolved to successfully. It can be null only when constructed using a subclass. Constructors should always initialize this.

remainingName

protected Name remainingName
Field containing the remaining name yet to be resolved. It can be null only when constructed using a subclass. Constructors should always initialize this.
Constructor Detail

ResolveResult

protected ResolveResult()
Constructs an instance of ResolveResult with the resolved object and remaining name both initialized to null.

ResolveResult

public ResolveResult(Object robj,
                     String rcomp)
Constructs a new instance of ResolveResult consisting of the resolved object and the remaining unresolved component.
Parameters:
robj - The non-null object resolved to.
rcomp - The single remaining name component that has yet to be resolved. Cannot be null (but can be empty).

ResolveResult

public ResolveResult(Object robj,
                     Name rname)
Constructs a new instance of ResolveResult consisting of the resolved Object and the remaining name.
Parameters:
robj - The non-null Object resolved to.
rname - The non-null remaining name that has yet to be resolved.
Method Detail

getRemainingName

public Name getRemainingName()
Retrieves the remaining unresolved portion of the name.
Returns:
The remaining unresolved portion of the name. Cannot be null but empty OK.
See Also:
appendRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String),
setRemainingName(javax.naming.Name)

getResolvedObj

public Object getResolvedObj()
Retrieves the Object to which resolution was successful.
Returns:
The Object to which resolution was successful. Cannot be null.
See Also:
setResolvedObj(java.lang.Object)

setRemainingName

public void setRemainingName(Name name)
Sets the remaining name field of this result to name. A copy of name is made so that modifying the copy within this ResolveResult does not affect name and vice versa.
Parameters:
name - The name to set remaining name to. Cannot be null.
See Also:
getRemainingName(),
appendRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String)

appendRemainingName

public void appendRemainingName(Name name)
Adds components to the end of remaining name.
Parameters:
name - The components to add. Can be null.
See Also:
getRemainingName(),
setRemainingName(javax.naming.Name),
appendRemainingComponent(java.lang.String)

appendRemainingComponent

public void appendRemainingComponent(String name)
Adds a single component to the end of remaining name.
Parameters:
name - The component to add. Can be null.
See Also:
getRemainingName(), appendRemainingName(javax.naming.Name)

setResolvedObj

public void setResolvedObj(Object obj)
Sets the resolved Object field of this result to obj.
Parameters:
obj - The object to use for setting the resolved obj field. Cannot be null.
See Also:
getResolvedObj()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Result

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Class DirStateFactory.Result

java.lang.Object
  |
  +--javax.naming.spi.DirStateFactory.Result
Enclosing class:
DirStateFactory
public static class DirStateFactory.Result
extends Object

An object/attributes pair for returning the result of DirStateFactory.getStateToBind().

Constructor Summary
DirStateFactory.Result(Object obj, Attributes outAttrs)
Constructs an instance of Result.
Method Summary
Attributes | getAttributes() Retrieves the attributes to be bound.
Object | getObject() Retrieves the object to be bound.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirStateFactory.Result

public DirStateFactory.Result(Object obj,
                              Attributes outAttrs)
Constructs an instance of Result.
Parameters:
obj - The possibly null object to be bound.
outAttrs - The possibly null attributes to be bound.
Method Detail

getObject

public Object getObject()
Retrieves the object to be bound.
Returns:
The possibly null object to be bound.

getAttributes

public Attributes getAttributes()
Retrieves the attributes to be bound.
Returns:
The possibly null attributes to be bound.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StateFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming.spi
Interface StateFactory

All Known Subinterfaces:
DirStateFactory
public interface StateFactory

This interface represents a factory for obtaining the state of an object for binding.

The JNDI framework allows for object implementations to be loaded in dynamically via object factories. For example, when looking up a printer bound in the name space, if the print service binds printer names to References, the printer Reference could be used to create a printer object, so that the caller of lookup can directly operate on the printer object after the lookup.

An ObjectFactory is responsible for creating objects of a specific type. In the above example, you may have a PrinterObjectFactory for creating Printer objects.

For the reverse process, when an object is bound into the namespace, JNDI provides state factories. Continuing with the printer example, suppose the printer object is updated and rebound:

 ctx.rebind("inky", printer);
The service provider for ctx uses a state factory to obtain the state of printer for binding into its namespace. A state factory for the Printer type object might return a more compact object for storage in the naming system.

A state factory must implement the StateFactory interface. In addition, the factory class must be public and must have a public constructor that accepts no parameters.

The getStateToBind() method of a state factory may be invoked multiple times, possibly using different parameters. The implementation is thread-safe.

StateFactory is intended for use with service providers that implement only the Context interface. DirStateFactory is intended for use with service providers that implement the DirContext interface.

Since:
1.3
See Also:
NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes), ObjectFactory, DirStateFactory

Method Summary
 Object getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment)
Retrieves the state of an object for binding.

Method Detail

getStateToBind

public Object getStateToBind(Object obj,
                             Name name,
                             Context nameCtx,
                             Hashtable environment)
                      throws NamingException
Retrieves the state of an object for binding.

NamingManager.getStateToBind() successively loads in state factories and invokes this method on them until one produces a non-null answer. DirectoryManager.getStateToBind() successively loads in state factories. If a factory implements DirStateFactory, then DirectoryManager invokes DirStateFactory.getStateToBind(); otherwise it invokes StateFactory.getStateToBind().

When an exception is thrown by a factory, the exception is passed on to the caller of NamingManager.getStateToBind() and DirectoryManager.getStateToBind(). The search for other factories that may produce a non-null answer is halted. A factory should only throw an exception if it is sure that it is the only intended factory and that no other factories should be tried. If this factory cannot create an object using the arguments supplied, it should return null.

The name and nameCtx parameters may optionally be used to specify the name of the object being created. See the description of "Name and Context Parameters" in ObjectFactory.getObjectInstance() for details. If a factory uses nameCtx it should synchronize its use against concurrent access, since context implementations are not guaranteed to be thread-safe.

The name and environment parameters are owned by the caller. The implementation will not modify these objects or keep references to them, although it may keep references to clones or copies.

Parameters:
obj - A non-null object whose state is to be retrieved.
name - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - The possibly null environment to be used in the creation of the object's state.
Returns:
The object's state for binding; null if the factory is not returning any changes.
Throws:
NamingException - if this factory encountered an exception while attempting to get the object's state, and no other factories are to be tried.
See Also:
NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable), DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


StringRefAddr

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class StringRefAddr

java.lang.Object
  |
  +--javax.naming.RefAddr
        |
        +--javax.naming.StringRefAddr
All Implemented Interfaces:
Serializable
public class StringRefAddr
extends RefAddr

This class represents the string form of the address of a communications end-point. It consists of a type that describes the communication mechanism and a string contents specific to that communication mechanism. The format and interpretation of the address type and the contents of the address are based on the agreement of three parties: the client that uses the address, the object/server that can be reached using the address, and the administrator or program that creates the address.

An example of a string reference address is a host name. Another example of a string reference address is a URL.

A string reference address is immutable: once created, it cannot be changed. Multithreaded access to a single StringRefAddr need not be synchronized.

Since:
1.3
See Also:
RefAddr, BinaryRefAddr, Serialized Form

Fields inherited from class javax.naming.RefAddr
addrType
Constructor Summary
StringRefAddr(String addrType, String addr)
Constructs a new instance of StringRefAddr using its address type and contents.
Method Summary
 Object getContent()
Retrieves the contents of this address.
Methods inherited from class javax.naming.RefAddr
equals, getType, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StringRefAddr

public StringRefAddr(String addrType,
                     String addr)
Constructs a new instance of StringRefAddr using its address type and contents.
Parameters:
addrType - A non-null string describing the type of the address.
addr - The possibly null contents of the address in the form of a string.
Method Detail

getContent

public Object getContent()
Retrieves the contents of this address. The result is a string.
Overrides:
getContent in class RefAddr
Returns:
The possibly null address contents.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TimeLimitExceededException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.naming
Class TimeLimitExceededException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.naming.NamingException
                    |
                    +--javax.naming.LimitExceededException
                          |
                          +--javax.naming.TimeLimitExceededException
All Implemented Interfaces:
Serializable
public class TimeLimitExceededException
extends LimitExceededException

This exception is thrown when a method does not terminate within the specified time limit. This can happen, for example, if the user specifies that the method should take no longer than 10 seconds, and the method fails to complete with 10 seconds.

Synchronization and serialization issues that apply to NamingException apply directly here.

Since:
1.3
See Also:
Serialized Form

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
Constructor Summary
TimeLimitExceededException()
Constructs a new instance of TimeLimitExceededException.
TimeLimitExceededException(String explanation)
Constructs a new instance of TimeLimitExceededException using the argument supplied.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, printStackTrace, printStackTrace, printStackTrace, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TimeLimitExceededException

public TimeLimitExceededException()
Constructs a new instance of TimeLimitExceededException. All fields default to null.

TimeLimitExceededException

public TimeLimitExceededException(String explanation)
Constructs a new instance of TimeLimitExceededException using the argument supplied.
Parameters:
explanation - possibly null detail about this exception.
See Also:
Throwable.getMessage()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.rmi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.rmi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.rmi.PortableRemoteObject
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.rmi

Contains user APIs for RMI-IIOP.

See:
Description

Class Summary
PortableRemoteObject Server implementation objects may either inherit from javax.rmi.PortableRemoteObject or they may implement a remote interface and then use the exportObject method to register themselves as a server object.

Package javax.rmi Description

Contains user APIs for RMI-IIOP. These APIs are provided for use by RMI-IIOP applications, and provide equivalent semantics when running over either IIOP or JRMP. See also the javax.rmi.CORBA package.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.rmi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.rmi

No usage of javax.rmi

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.rmi.PortableRemoteObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.rmi.PortableRemoteObject

No usage of javax.rmi.PortableRemoteObject

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


javax.rmi.CORBA Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.rmi.CORBA

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.rmi.CORBA.ClassDesc (implements java.io.Serializable)
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CORBA_2_3.portable.ObjectImpl
        • class javax.rmi.CORBA.Stub (implements java.io.Serializable)
    • class javax.rmi.CORBA.Util

Interface Hierarchy

  • interface org.omg.CORBA.portable.InvokeHandler
    • interface javax.rmi.CORBA.Tie
  • interface javax.rmi.CORBA.PortableRemoteObjectDelegate
  • interface javax.rmi.CORBA.StubDelegate
  • interface javax.rmi.CORBA.UtilDelegate
  • interface javax.rmi.CORBA.ValueHandler
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.rmi.CORBA

Contains portability APIs for RMI-IIOP.

See:
Description

Interface Summary
PortableRemoteObjectDelegate | Supports delegation for method implementations in PortableRemoteObject.
StubDelegate | Supports delegation for method implementations in Stub.
Tie | Defines methods which all RMI-IIOP server side ties must implement.
UtilDelegate | Supports delegation for method implementations in Util.
ValueHandler | Defines methods which allow serialization of Java objects to and from GIOP streams.

Class Summary
ClassDesc | This class is used to marshal java.lang.Class objects over IIOP.
Stub | Base class from which all RMI-IIOP stubs must inherit.
Util | Provides utility methods that can be used by stubs and ties to perform common operations.

Package javax.rmi.CORBA Description

Contains portability APIs for RMI-IIOP. These APIs provide a standard interface between the generated stubs and ties and the RMI-IIOP runtime. They also allow third party ORBs to be used for RMI over IIOP as an alternative to the ORB supplied by Sun. They are not intended to be called directly from RMI-IIOP applications. See also the javax.rmi package.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.rmi.CORBA

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.rmi.CORBA

Packages that use javax.rmi.CORBA
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in javax.rmi.CORBA used by javax.rmi.CORBA
Stub
Base class from which all RMI-IIOP stubs must inherit.
Tie
Defines methods which all RMI-IIOP server side ties must implement.
ValueHandler
Defines methods which allow serialization of Java objects to and from GIOP streams.

Classes in javax.rmi.CORBA used by org.omg.stub.java.rmi
Stub
Base class from which all RMI-IIOP stubs must inherit.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.rmi.CORBA.ClassDesc

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.rmi.CORBA.ClassDesc

No usage of javax.rmi.CORBA.ClassDesc

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.rmi.CORBA.Util

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.rmi.CORBA.Util

No usage of javax.rmi.CORBA.Util

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.rmi.CORBA.PortableRemoteObjectDelegate

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.rmi.CORBA.PortableRemoteObjectDelegate

No usage of javax.rmi.CORBA.PortableRemoteObjectDelegate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.rmi.CORBA.StubDelegate

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.rmi.CORBA.StubDelegate

No usage of javax.rmi.CORBA.StubDelegate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.rmi.CORBA.UtilDelegate

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.rmi.CORBA.UtilDelegate

No usage of javax.rmi.CORBA.UtilDelegate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.rmi.CORBA.Stub

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.rmi.CORBA.Stub

Packages that use Stub
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of Stub in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type Stub
static boolean Util.isLocal(Stub stub)
Returns true if the stub is in the same ORB instance as is the servant.
 int StubDelegate.hashCode(Stub self)
Delegation call for hashCode().
 boolean StubDelegate.equals(Stub self, Object obj)
Delegation call for equals(java.lang.Object).
 String StubDelegate.toString(Stub self)
Delegation call for toString().
 void StubDelegate.connect(Stub self, ORB orb)
Delegation call for connect(org.omg.CORBA.ORB).
 void StubDelegate.readObject(Stub self, ObjectInputStream s)
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.
 void StubDelegate.writeObject(Stub self, ObjectOutputStream s)
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.
 boolean UtilDelegate.isLocal(Stub stub)
Delegation call for Util.isLocal(javax.rmi.CORBA.Stub).

Uses of Stub in org.omg.stub.java.rmi

Subclasses of Stub in org.omg.stub.java.rmi
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.rmi.CORBA.Tie

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.rmi.CORBA.Tie

Packages that use Tie
javax.rmi.CORBA Contains portability APIs for RMI-IIOP.

Uses of Tie in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return Tie
static Tie Util.getTie(Remote target)
Returns the tie (if any) for a given target object.
 Tie UtilDelegate.getTie(Remote target)
Delegation call for Util.getTie(java.rmi.Remote).

Methods in javax.rmi.CORBA with parameters of type Tie
static void Util.registerTarget(Tie tie, Remote target)
Registers a target for a tie.
 void UtilDelegate.registerTarget(Tie tie, Remote target)
Delegation call for Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.rmi.CORBA.ValueHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.rmi.CORBA.ValueHandler

Packages that use ValueHandler
javax.rmi.CORBA Contains portability APIs for RMI-IIOP.

Uses of ValueHandler in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return ValueHandler
static ValueHandler Util.createValueHandler()
Returns a singleton instance of a class that implements the ValueHandler interface.
 ValueHandler UtilDelegate.createValueHandler()
Delegation call for Util.createValueHandler().

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ClassDesc

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Class ClassDesc

java.lang.Object
  |
  +--javax.rmi.CORBA.ClassDesc
All Implemented Interfaces:
Serializable
public class ClassDesc
extends Object
implements Serializable

This class is used to marshal java.lang.Class objects over IIOP.

See Also:
Serialized Form

Constructor Summary
ClassDesc()
Creates an uninitialized class descriptor object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ClassDesc

public ClassDesc()
Creates an uninitialized class descriptor object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PortableRemoteObjectDelegate

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Interface PortableRemoteObjectDelegate

public interface PortableRemoteObjectDelegate

Supports delegation for method implementations in PortableRemoteObject. The delegate is a singleton instance of a class that implements this interface and provides a replacement implementation for all the methods of javax.rmi.PortableRemoteObject. Delegates are enabled by providing the delegate's class name as the value of the javax.rmi.CORBA.PortableRemoteObjectClass system property.

See Also:
PortableRemoteObject

Method Summary
 void connect(Remote target, Remote source)
Delegation call for PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
 void exportObject(Remote obj)
Delegation call for PortableRemoteObject.exportObject(java.rmi.Remote).
 Object narrow(Object narrowFrom, Class narrowTo)
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).
 Remote toStub(Remote obj)
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).
 void unexportObject(Remote obj)
Delegation call for PortableRemoteObject.unexportObject(java.rmi.Remote).

Method Detail

exportObject

public void exportObject(Remote obj)
                  throws RemoteException
Delegation call for PortableRemoteObject.exportObject(java.rmi.Remote).

toStub

public Remote toStub(Remote obj)
              throws NoSuchObjectException
Delegation call for PortableRemoteObject.toStub(java.rmi.Remote).

unexportObject

public void unexportObject(Remote obj)
                    throws NoSuchObjectException
Delegation call for PortableRemoteObject.unexportObject(java.rmi.Remote).

narrow

public Object narrow(Object narrowFrom,
                     Class narrowTo)
              throws ClassCastException
Delegation call for PortableRemoteObject.narrow(java.lang.Object, java.lang.Class).

connect

public void connect(Remote target,
                    Remote source)
             throws RemoteException
Delegation call for PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Stub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Class Stub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA_2_3.portable.ObjectImpl
              |
              +--javax.rmi.CORBA.Stub
All Implemented Interfaces:
Object, Serializable
Direct Known Subclasses:
_Remote_Stub
public abstract class Stub
extends ObjectImpl
implements Serializable

Base class from which all RMI-IIOP stubs must inherit.

See Also:
Serialized Form

Constructor Summary
protected Stub()
Creates an RMI-IIOP stub and sets its delegate if necessary.
Method Summary
void | connect(ORB orb) Connects this stub to an ORB.
boolean | equals(Object obj) Compares two stubs for equality.
int | hashCode() Returns a hash code value for the object which is the same for all stubs that represent the same remote object.
String | toString() Returns a string representation of this stub.
Methods inherited from class org.omg.CORBA_2_3.portable.ObjectImpl
_get_codebase
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Stub

protected Stub()
Creates an RMI-IIOP stub and sets its delegate if necessary.
Method Detail

hashCode

public int hashCode()
Returns a hash code value for the object which is the same for all stubs that represent the same remote object.
Overrides:
hashCode in class ObjectImpl
Returns:
the hash code value.

equals

public boolean equals(Object obj)
Compares two stubs for equality. Returns true when used to compare stubs that represent the same remote object, and false otherwise.
Overrides:
equals in class ObjectImpl
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

toString

public String toString()
Returns a string representation of this stub. Returns the same string for all stubs that represent the same remote object.
Overrides:
toString in class ObjectImpl
Returns:
a string representation of this stub.

connect

public void connect(ORB orb)
             throws RemoteException
Connects this stub to an ORB. Required after the stub is deserialized but not after it is demarshalled by an ORB stream. If an unconnected stub is passed to an ORB stream for marshalling, it is implicitly connected to that ORB. Application code should not call this method directly, but should call the portable wrapper method PortableRemoteObject.connect(java.rmi.Remote, java.rmi.Remote).
Parameters:
orb - the ORB to connect to.
Throws:
RemoteException - if the stub is already connected to a different ORB, or if the stub does not represent an exported remote or local object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StubDelegate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Interface StubDelegate

public interface StubDelegate

Supports delegation for method implementations in Stub. A delegate is an instance of a class that implements this interface and provides a replacement implementation for all the methods of javax.rmi.CORBA.Stub. If delegation is enabled, each stub has an associated delegate. Delegates are enabled by providing the delegate's class name as the value of the javax.rmi.CORBA.StubClass system property.

See Also:
Stub

Method Summary
 void connect(Stub self, ORB orb)
Delegation call for Stub.connect(org.omg.CORBA.ORB).
 boolean equals(Stub self, Object obj)
Delegation call for Stub.equals(java.lang.Object).
 int hashCode(Stub self)
Delegation call for Stub.hashCode().
 void readObject(Stub self, ObjectInputStream s)
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.
 String toString(Stub self)
Delegation call for Stub.toString().
 void writeObject(Stub self, ObjectOutputStream s)
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.

Method Detail

hashCode

public int hashCode(Stub self)
Delegation call for Stub.hashCode().

equals

public boolean equals(Stub self,
                      Object obj)
Delegation call for Stub.equals(java.lang.Object).

toString

public String toString(Stub self)
Delegation call for Stub.toString().

connect

public void connect(Stub self,
                    ORB orb)
             throws RemoteException
Delegation call for Stub.connect(org.omg.CORBA.ORB).

readObject

public void readObject(Stub self,
                       ObjectInputStream s)
                throws IOException,
                       ClassNotFoundException
Delegation call for Stub.readObject(java.io.ObjectInputStream)}.

writeObject

public void writeObject(Stub self,
                        ObjectOutputStream s)
                 throws IOException
Delegation call for Stub.writeObject(java.io.ObjectOutputStream)}.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Tie

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Interface Tie

All Superinterfaces:
InvokeHandler
public interface Tie
extends InvokeHandler

Defines methods which all RMI-IIOP server side ties must implement.

Method Summary
void | deactivate() Deactivates the target object represented by this tie.
Remote | getTarget() Returns the target for this tie.
ORB | orb() Returns the ORB for this tie.
void | orb(ORB orb) Sets the ORB for this tie.
void | setTarget(Remote target) Called by Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote) to set the target for this tie.
Object | thisObject() Returns an object reference for the target object represented by this tie.
Methods inherited from interface org.omg.CORBA.portable.InvokeHandler
_invoke

Method Detail

thisObject

public Object thisObject()
Returns an object reference for the target object represented by this tie.
Returns:
an object reference for the target object.

deactivate

public void deactivate()
Deactivates the target object represented by this tie.

orb

public ORB orb()
Returns the ORB for this tie.
Returns:
the ORB.

orb

public void orb(ORB orb)
Sets the ORB for this tie.
Parameters:
orb - the ORB.

setTarget

public void setTarget(Remote target)
Called by Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote) to set the target for this tie.
Parameters:
target - the object to use as the target for this tie.

getTarget

public Remote getTarget()
Returns the target for this tie.
Returns:
the target.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Util

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Class Util

java.lang.Object
  |
  +--javax.rmi.CORBA.Util
public class Util
extends Object

Provides utility methods that can be used by stubs and ties to perform common operations.

Method Summary
static Object | copyObject(Object obj, ORB orb) Copies or connects an object.
static Object[] | copyObjects(Object[] obj, ORB orb) Copies or connects an array of objects.
static ValueHandler | createValueHandler() Returns a singleton instance of a class that implements the ValueHandler interface.
static String | getCodebase(Class clz) Returns the codebase, if any, for the given class.
static Tie | getTie(Remote target) Returns the tie (if any) for a given target object.
static boolean | isLocal(Stub stub) Returns true if the stub is in the same ORB instance as is the servant.
static Class | loadClass(String className, String remoteCodebase, ClassLoader loader) Returns a class instance for the specified class.
static RemoteException | mapSystemException(SystemException ex) Maps a SystemException to a RemoteException.
static Object | readAny(InputStream in) Reads a java.lang.Object as a CORBA any.
static void | registerTarget(Tie tie, Remote target) Registers a target for a tie.
static void | unexportObject(Remote target) Removes the associated tie from an internal table and calls Tie.deactivate() to deactivate the object.
static RemoteException | wrapException(Throwable orig) Wraps an exception thrown by an implementation method.
static void | writeAbstractObject(OutputStream out, Object obj) Writes a java.lang.Object as either a value or a CORBA Object.
static void | writeAny(OutputStream out, Object obj) Writes any java.lang.Object as a CORBA any.
static void | writeRemoteObject(OutputStream out, Object obj) Writes a java.lang.Object as a CORBA Object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

mapSystemException

public static RemoteException mapSystemException(SystemException ex)
Maps a SystemException to a RemoteException.
Parameters:
ex - the SystemException to map.
Returns:
the mapped exception.

writeAny

public static void writeAny(OutputStream out,
                            Object obj)
Writes any java.lang.Object as a CORBA any.
Parameters:
out - the stream in which to write the any.
obj - the object to write as an any.

readAny

public static Object readAny(InputStream in)
Reads a java.lang.Object as a CORBA any.
Parameters:
in - the stream from which to read the any.
Returns:
the object read from the stream.

writeRemoteObject

public static void writeRemoteObject(OutputStream out,
                                     Object obj)
Writes a java.lang.Object as a CORBA Object. If obj is an exported RMI-IIOP server object, the tie is found and wired to obj, then written to out.write_Object(org.omg.CORBA.Object). If obj is a CORBA Object, it is written to out.write_Object(org.omg.CORBA.Object).
Parameters:
out - the stream in which to write the object.
obj - the object to write.

writeAbstractObject

public static void writeAbstractObject(OutputStream out,
                                       Object obj)
Writes a java.lang.Object as either a value or a CORBA Object. If obj is a value object or a stub object, it is written to out.write_abstract_interface(java.lang.Object). If obj is an exported RMI-IIOP server object, the tie is found and wired to obj, then written to out.write_abstract_interface(java.lang.Object).
Parameters:
out - the stream in which to write the object.
obj - the object to write.

registerTarget

public static void registerTarget(Tie tie,
                                  Remote target)
Registers a target for a tie. Adds the tie to an internal table and calls Tie.setTarget(java.rmi.Remote) on the tie object.
Parameters:
tie - the tie to register.
target - the target for the tie.

unexportObject

public static void unexportObject(Remote target)
Removes the associated tie from an internal table and calls Tie.deactivate() to deactivate the object.
Parameters:
target - the object to unexport.

getTie

public static Tie getTie(Remote target)
Returns the tie (if any) for a given target object.
Returns:
the tie or null if no tie is registered for the given target.

createValueHandler

public static ValueHandler createValueHandler()
Returns a singleton instance of a class that implements the ValueHandler interface.
Returns:
a class which implements the ValueHandler interface.

getCodebase

public static String getCodebase(Class clz)
Returns the codebase, if any, for the given class.
Parameters:
clz - the class to get a codebase for.
Returns:
a space-separated list of URLs, or null.

loadClass

public static Class loadClass(String className,
                              String remoteCodebase,
                              ClassLoader loader)
                       throws ClassNotFoundException
Returns a class instance for the specified class.
Parameters:
className - the name of the class.
remoteCodebase - a space-separated list of URLs at which the class might be found. May be null.
loadingContext - a class whose ClassLoader may be used to load the class if all other methods fail.
Returns:
the Class object representing the loaded class.
Throws:
ClassNotFoundException - if class cannot be loaded.

isLocal

public static boolean isLocal(Stub stub)
                       throws RemoteException
Returns true if the stub is in the same ORB instance as is the servant. This method is equivalent to ObjectImpl._is_local() except that it throws a RemoteException instead of a SystemException.
Parameters:
stub - the stub to test.
Returns:
true if local, false if not.
Throws:
RemoteException - if stub has not been connected to an ORB.

wrapException

public static RemoteException wrapException(Throwable orig)
Wraps an exception thrown by an implementation method. It returns the corresponding client-side exception.
Parameters:
orig - the exception to wrap.
Returns:
the wrapped exception.

copyObjects

public static Object[] copyObjects(Object[] obj,
                                   ORB orb)
                            throws RemoteException
Copies or connects an array of objects. Used by local stubs to copy any number of actual parameters, preserving sharing across parameters as necessary to support RMI semantics.
Parameters:
obj - the objects to copy or connect.
orb - the ORB.
Returns:
the copied or connected objects.
Throws:
RemoteException - if any object could not be copied or connected.

copyObject

public static Object copyObject(Object obj,
                                ORB orb)
                         throws RemoteException
Copies or connects an object. Used by local stubs to copy an actual parameter, result object, or exception.
Parameters:
obj - the object to copy.
orb - the ORB.
Returns:
the copy or connected object.
Throws:
RemoteException - if the object could not be copied or connected.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UtilDelegate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Interface UtilDelegate

public interface UtilDelegate

Supports delegation for method implementations in Util. The delegate is a singleton instance of a class that implements this interface and provides a replacement implementation for all the methods of javax.rmi.CORBA.Util. Delegation is enabled by providing the delegate's class name as the value of the javax.rmi.CORBA.UtilClass system property.

See Also:
Util

Method Summary
 Object copyObject(Object obj, ORB orb)
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
 Object[] copyObjects(Object[] obj, ORB orb)
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).
 ValueHandler createValueHandler()
Delegation call for Util.createValueHandler().
 String getCodebase(Class clz)
Delegation call for Util.getCodebase(java.lang.Class).
 Tie getTie(Remote target)
Delegation call for Util.getTie(java.rmi.Remote).
 boolean isLocal(Stub stub)
Delegation call for Util.isLocal(javax.rmi.CORBA.Stub).
 Class loadClass(String className, String remoteCodebase, ClassLoader loader)
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).
 RemoteException mapSystemException(SystemException ex)
Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).
 Object readAny(InputStream in)
Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).
 void registerTarget(Tie tie, Remote target)
Delegation call for Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote).
 void unexportObject(Remote target)
Delegation call for Util.unexportObject(java.rmi.Remote).
 RemoteException wrapException(Throwable obj)
Delegation call for Util.wrapException(java.lang.Throwable).
 void writeAbstractObject(OutputStream out, Object obj)
Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void writeAny(OutputStream out, Object obj)
Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void writeRemoteObject(OutputStream out, Object obj)
Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).

Method Detail

mapSystemException

public RemoteException mapSystemException(SystemException ex)
Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).

writeAny

public void writeAny(OutputStream out,
                     Object obj)
Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).

readAny

public Object readAny(InputStream in)
Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).

writeRemoteObject

public void writeRemoteObject(OutputStream out,
                              Object obj)
Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).

writeAbstractObject

public void writeAbstractObject(OutputStream out,
                                Object obj)
Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).

registerTarget

public void registerTarget(Tie tie,
                           Remote target)
Delegation call for Util.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote).

unexportObject

public void unexportObject(Remote target)
Delegation call for Util.unexportObject(java.rmi.Remote).

getTie

public Tie getTie(Remote target)
Delegation call for Util.getTie(java.rmi.Remote).

createValueHandler

public ValueHandler createValueHandler()
Delegation call for Util.createValueHandler().

getCodebase

public String getCodebase(Class clz)
Delegation call for Util.getCodebase(java.lang.Class).

loadClass

public Class loadClass(String className,
                       String remoteCodebase,
                       ClassLoader loader)
                throws ClassNotFoundException
Delegation call for Util.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader).

isLocal

public boolean isLocal(Stub stub)
                throws RemoteException
Delegation call for Util.isLocal(javax.rmi.CORBA.Stub).

wrapException

public RemoteException wrapException(Throwable obj)
Delegation call for Util.wrapException(java.lang.Throwable).

copyObject

public Object copyObject(Object obj,
                         ORB orb)
                  throws RemoteException
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).

copyObjects

public Object[] copyObjects(Object[] obj,
                            ORB orb)
                     throws RemoteException
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.rmi.CORBA
Interface ValueHandler

public interface ValueHandler

Defines methods which allow serialization of Java objects to and from GIOP streams.

Method Summary
String | getRMIRepositoryID(Class clz) Returns the CORBA RepositoryId for the given Java class.
RunTime | getRunTimeCodeBase() Returns the CodeBase for this ValueHandler.
boolean | isCustomMarshaled(Class clz) Indicates whether the given class performs custom or default marshaling.
Serializable | readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender) Reads a value from the stream using Java semantics.
Serializable | writeReplace(Serializable value) If the value contains a writeReplace method then the result is returned.
void | writeValue(OutputStream out, Serializable value) Writes a value to the stream using Java semantics.

Method Detail

writeValue

public void writeValue(OutputStream out,
                       Serializable value)
Writes a value to the stream using Java semantics.
Parameters:
out - the stream to write the value to.
value - the value to be written to the stream.

readValue

public Serializable readValue(InputStream in,
                              int offset,
                              Class clz,
                              String repositoryID,
                              RunTime sender)
Reads a value from the stream using Java semantics.
Parameters:
in - the stream to read the value from.
offset - the current position in the input stream.
clz - the type of the value to be read in.
repositoryID - the RepositoryId of the value to be read in.
sender - the sending context runtime codebase.
Returns:
the value read from the stream.

getRMIRepositoryID

public String getRMIRepositoryID(Class clz)
Returns the CORBA RepositoryId for the given Java class.
Parameters:
clz - a Java class.
Returns:
the CORBA RepositoryId for the class.

isCustomMarshaled

public boolean isCustomMarshaled(Class clz)
Indicates whether the given class performs custom or default marshaling.
Parameters:
clz - the class to test for custom marshaling.
Returns:
true if the class performs custom marshaling, false if it does not.

getRunTimeCodeBase

public RunTime getRunTimeCodeBase()
Returns the CodeBase for this ValueHandler. This is used by the ORB runtime. The server sends the service context containing the IOR for this CodeBase on the first GIOP reply. The client does the same on the first GIOP request.
Returns:
the SendingContext.CodeBase of this ValueHandler.

writeReplace

public Serializable writeReplace(Serializable value)
If the value contains a writeReplace method then the result is returned. Otherwise, the value itself is returned.
Parameters:
value - the value to be marshaled.
Returns:
the true value to marshal on the wire.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PortableRemoteObject

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.rmi
Class PortableRemoteObject

java.lang.Object
  |
  +--javax.rmi.PortableRemoteObject
public class PortableRemoteObject
extends Object

Server implementation objects may either inherit from javax.rmi.PortableRemoteObject or they may implement a remote interface and then use the exportObject method to register themselves as a server object. The toStub method takes a server implementation and returns a stub that can be used to access that server object. The connect method makes a Remote object ready for remote communication. The unexportObject method is used to deregister a server object, allowing it to become available for garbage collection. The narrow method takes an object reference or abstract interface type and attempts to narrow it to conform to the given interface. If the operation is successful the result will be an object of the specified type, otherwise an exception will be thrown.

Constructor Summary
protected PortableRemoteObject()
Initializes the object by calling exportObject(this).
Method Summary
static void | connect(Remote target, Remote source) Makes a Remote object ready for remote communication.
static void | exportObject(Remote obj) Makes a server object ready to receive remote calls.
static Object | narrow(Object narrowFrom, Class narrowTo) Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.
static Remote | toStub(Remote obj) Returns a stub for the given server object.
static void | unexportObject(Remote obj) Deregisters a server object from the runtime, allowing the object to become available for garbage collection.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PortableRemoteObject

protected PortableRemoteObject()
                        throws RemoteException
Initializes the object by calling exportObject(this).
Throws:
RemoteException - if export fails.
Method Detail

exportObject

public static void exportObject(Remote obj)
                         throws RemoteException
Makes a server object ready to receive remote calls. Note that subclasses of PortableRemoteObject do not need to call this method, as it is called by the constructor.
Parameters:
obj - the server object to export.
Throws:
RemoteException - if export fails.

toStub

public static Remote toStub(Remote obj)
                     throws NoSuchObjectException
Returns a stub for the given server object.
Parameters:
obj - the server object for which a stub is required. Must either be a subclass of PortableRemoteObject or have been previously the target of a call to exportObject(java.rmi.Remote).
Returns:
the most derived stub for the object.
Throws:
NoSuchObjectException - if a stub cannot be located for the given server object.

unexportObject

public static void unexportObject(Remote obj)
                           throws NoSuchObjectException
Deregisters a server object from the runtime, allowing the object to become available for garbage collection.
Parameters:
obj - the object to unexport.
Throws:
NoSuchObjectException - if the remote object is not currently exported.

narrow

public static Object narrow(Object narrowFrom,
                            Class narrowTo)
                     throws ClassCastException
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type.
Parameters:
narrowFrom - the object to check.
narrowTo - the desired type.
Returns:
an object which can be cast to the desired type.
Throws:
ClassCastException - if narrowFrom cannot be cast to narrowTo.

connect

public static void connect(Remote target,
                           Remote source)
                    throws RemoteException
Makes a Remote object ready for remote communication. This normally happens implicitly when the object is sent or received as an argument on a remote method call, but in some circumstances it is useful to perform this action by making an explicit call. See the Stub#connect method for more information.
Parameters:
target - the object to connect.
source - a previously connected object.
Throws:
RemoteException - if source is not connected or if target is already connected to a different ORB than source.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.sound.midi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.sound.midi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.sound.midi.MidiDevice.Info
    • class javax.sound.midi.MidiEvent
    • class javax.sound.midi.MidiFileFormat
    • class javax.sound.midi.MidiMessage (implements java.lang.Cloneable)
      • class javax.sound.midi.MetaMessage
      • class javax.sound.midi.ShortMessage
      • class javax.sound.midi.SysexMessage
    • class javax.sound.midi.MidiSystem
    • class javax.sound.midi.Patch
    • class javax.sound.midi.Sequence
    • class javax.sound.midi.Sequencer.SyncMode
    • class javax.sound.midi.SoundbankResource
      • class javax.sound.midi.Instrument
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.sound.midi.InvalidMidiDataException
        • class javax.sound.midi.MidiUnavailableException
    • class javax.sound.midi.Track
    • class javax.sound.midi.VoiceStatus

Interface Hierarchy

  • interface java.util.EventListener
    • interface javax.sound.midi.ControllerEventListener
    • interface javax.sound.midi.MetaEventListener
  • interface javax.sound.midi.MidiChannel
  • interface javax.sound.midi.MidiDevice
    • interface javax.sound.midi.Sequencer
    • interface javax.sound.midi.Synthesizer
  • interface javax.sound.midi.Receiver
  • interface javax.sound.midi.Soundbank
  • interface javax.sound.midi.Transmitter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.sound.midi

Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

See:
Description

Interface Summary
ControllerEventListener | The ControllerEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a requested type of MIDI control-change event.
MetaEventListener | The MetaEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a MetaMessage.
MidiChannel | A MidiChannel object represents a single MIDI channel.
MidiDevice | MidiDevice is the base interface for all MIDI devices.
Receiver | A Receiver receives MidiEvent objects and typically does something useful in response, such as interpreting them to generate sound or raw MIDI output.
Sequencer | A hardware or software device that plays back a MIDI sequence is known as a sequencer.
Soundbank | A Soundbank contains a set of Instruments that can be loaded into a Synthesizer.
Synthesizer | A Synthesizer generates sound.
Transmitter | A Transmitter sends MidiEvent objects to one or more Receivers.

Class Summary
Instrument | An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect.
MetaMessage | A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
MidiDevice.Info | A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
MidiEvent | MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a Sequence object.
MidiFileFormat | A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.
MidiMessage | MidiMessage is the base class for MIDI messages.
MidiSystem | The MidiSystem class provides access to the installed MIDI system resources, including devices such as synthesizers, sequencers, and MIDI input and output ports.
Patch | A Patch object represents a location, on a MIDI synthesizer, into which a single instrument is stored (loaded).
Sequence | A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object.
Sequencer.SyncMode | A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device.
ShortMessage | A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
SoundbankResource | A SoundbankResource represents any audio resource stored in a Soundbank.
SysexMessage | A SysexMessage object represents a MIDI system exclusive message.
Track | A MIDI track is an independent stream of MIDI events (time-stamped MIDI data) that can be stored along with other tracks in a standard MIDI file.
VoiceStatus | A VoiceStatus object contains information about the current status of one of the voices produced by a Synthesizer.

Exception Summary
InvalidMidiDataException | An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
MidiUnavailableException | A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.

Package javax.sound.midi Description

Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Related Documentation

For overviews, tutorials, examples, and guides, please see:
  • Sound

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.sound.midi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.sound.midi

Packages that use javax.sound.midi
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Classes in javax.sound.midi used by javax.sound.midi
ControllerEventListener
The ControllerEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a requested type of MIDI control-change event.
Instrument
An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect.
InvalidMidiDataException
An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
MetaEventListener
The MetaEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a MetaMessage.
MetaMessage
A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
MidiChannel
A MidiChannel object represents a single MIDI channel.
MidiDevice
MidiDevice is the base interface for all MIDI devices.
MidiDevice.Info
A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
MidiEvent
MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a Sequence object.
MidiFileFormat
A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.
MidiMessage
MidiMessage is the base class for MIDI messages.
MidiUnavailableException
A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable.
Patch
A Patch object represents a location, on a MIDI synthesizer, into which a single instrument is stored (loaded).
Receiver
A Receiver receives MidiEvent objects and typically does something useful in response, such as interpreting them to generate sound or raw MIDI output.
Sequence
A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object.
Sequencer
A hardware or software device that plays back a MIDI sequence is known as a sequencer.
Sequencer.SyncMode
A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device.
ShortMessage
A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
Soundbank
A Soundbank contains a set of Instruments that can be loaded into a Synthesizer.
SoundbankResource
A SoundbankResource represents any audio resource stored in a Soundbank.
Synthesizer
A Synthesizer generates sound.
Track
A MIDI track is an independent stream of MIDI events (time-stamped MIDI data) that can be stored along with other tracks in a standard MIDI file.
Transmitter
A Transmitter sends MidiEvent objects to one or more Receivers.
VoiceStatus
A VoiceStatus object contains information about the current status of one of the voices produced by a Synthesizer.

Classes in javax.sound.midi used by javax.sound.midi.spi
InvalidMidiDataException
An InvalidMidiDataException indicates that inappropriate MIDI data was encountered.
MidiDevice
MidiDevice is the base interface for all MIDI devices.
MidiDevice.Info
A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
MidiFileFormat
A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.
Sequence
A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object.
Soundbank
A Soundbank contains a set of Instruments that can be loaded into a Synthesizer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiSystem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiSystem

No usage of javax.sound.midi.MidiSystem

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.SysexMessage

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.SysexMessage

No usage of javax.sound.midi.SysexMessage

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.Instrument

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.Instrument

Packages that use Instrument
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Instrument in javax.sound.midi

Methods in javax.sound.midi that return Instrument
Instrument[] | Soundbank.getInstruments() Obtains a list of instruments contained in this sound bank.
Instrument | Soundbank.getInstrument(Patch patch) Obtains an Instrument from the given Patch.
Instrument[] | Synthesizer.getAvailableInstruments() Obtains a list of instruments that come with the synthesizer.
Instrument[] | Synthesizer.getLoadedInstruments() Obtains a list of the instruments that are currently loaded onto this Synthesizer.

Methods in javax.sound.midi with parameters of type Instrument
boolean | Synthesizer.loadInstrument(Instrument instrument) Makes a particular instrument available for synthesis.
void | Synthesizer.unloadInstrument(Instrument instrument) Unloads a particular instrument.
boolean | Synthesizer.remapInstrument(Instrument from, Instrument to) Remaps an instrument.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.InvalidMidiDataException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.InvalidMidiDataException

Packages that use InvalidMidiDataException
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of InvalidMidiDataException in javax.sound.midi

Methods in javax.sound.midi that throw InvalidMidiDataException
protected void | MidiMessage.setMessage(byte[] data, int length) Sets the data for the MIDI message.
void | SysexMessage.setMessage(byte[] data, int length) Sets the data for the system exclusive message.
void | SysexMessage.setMessage(int status, byte[] data, int length) Sets the data for the system exclusive message.
static Soundbank | MidiSystem.getSoundbank(InputStream stream) Constructs a MIDI sound bank by reading it from the specified stream.
static Soundbank | MidiSystem.getSoundbank(URL url) Constructs a Soundbank by reading it from the specified URL.
static Soundbank | MidiSystem.getSoundbank(File file) Constructs a Soundbank by reading it from the specified File.
static MidiFileFormat | MidiSystem.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the data in the specified input stream.
static MidiFileFormat | MidiSystem.getMidiFileFormat(URL url) Obtains the MIDI file format of the data in the specified URL.
static MidiFileFormat | MidiSystem.getMidiFileFormat(File file) Obtains the MIDI file format of the specified File.
static Sequence | MidiSystem.getSequence(InputStream stream) Obtains a MIDI sequence from the specified input stream.
static Sequence | MidiSystem.getSequence(URL url) Obtains a MIDI sequence from the specified URL.
static Sequence | MidiSystem.getSequence(File file) Obtains a MIDI sequence from the specified File.
void | MetaMessage.setMessage(int type, byte[] data, int length) Sets the message parameters for a MetaMessage.
void | ShortMessage.setMessage(int status) Sets the parameters for a MIDI message that takes no data bytes.
void | ShortMessage.setMessage(int status, int data1, int data2) Sets the parameters for a MIDI message that takes one or two data bytes.
void | ShortMessage.setMessage(int command, int channel, int data1, int data2) Sets the short message parameters for a channel message which takes one or two data bytes.
protected int | ShortMessage.getDataLength(int status) Retrieves the number of data bytes associated with a particular status byte value.
void | Sequencer.setSequence(Sequence sequence) Sets the current sequence on which the sequencer operates.
void | Sequencer.setSequence(InputStream stream) Sets the current sequence on which the sequencer operates.

Constructors in javax.sound.midi that throw InvalidMidiDataException
Sequence(float divisionType, int resolution)
Constructs a new MIDI sequence with the specified timing division type and timing resolution.
Sequence(float divisionType, int resolution, int numTracks)
Constructs a new MIDI sequence with the specified timing division type, timing resolution, and number of tracks.

Uses of InvalidMidiDataException in javax.sound.midi.spi

Methods in javax.sound.midi.spi that throw InvalidMidiDataException
abstract Soundbank | SoundbankReader.getSoundbank(URL url) Obtains a soundbank object from the URL provided.
abstract Soundbank | SoundbankReader.getSoundbank(InputStream stream) Obtains a soundbank object from the InputStream provided.
abstract Soundbank | SoundbankReader.getSoundbank(File file) Obtains a soundbank object from the File provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the input stream provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(URL url) Obtains the MIDI file format of the URL provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(File file) Obtains the MIDI file format of the File provided.
abstract Sequence | MidiFileReader.getSequence(InputStream stream) Obtains a MIDI sequence from the input stream provided.
abstract Sequence | MidiFileReader.getSequence(URL url) Obtains a MIDI sequence from the URL provided.
abstract Sequence | MidiFileReader.getSequence(File file) Obtains a MIDI sequence from the File provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MetaMessage

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MetaMessage

Packages that use MetaMessage
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MetaMessage in javax.sound.midi

Methods in javax.sound.midi with parameters of type MetaMessage
 void MetaEventListener.meta(MetaMessage meta)
Invoked when a Sequencer has encountered and processed a MetaMessage in the Sequence it is processing.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiDevice.Info

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiDevice.Info

Packages that use MidiDevice.Info
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of MidiDevice.Info in javax.sound.midi

Methods in javax.sound.midi that return MidiDevice.Info
static MidiDevice.Info[] | MidiSystem.getMidiDeviceInfo() Obtains an array of information objects representing the set of all MIDI devices available on the system.
MidiDevice.Info | MidiDevice.getDeviceInfo() Obtains information about the device, including its Java class and Strings containing its name, vendor, and description.

Methods in javax.sound.midi with parameters of type MidiDevice.Info
static MidiDevice MidiSystem.getMidiDevice(MidiDevice.Info info)
Obtains the requested MIDI device.

Uses of MidiDevice.Info in javax.sound.midi.spi

Methods in javax.sound.midi.spi that return MidiDevice.Info
abstract  MidiDevice.Info[] MidiDeviceProvider.getDeviceInfo()
Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.

Methods in javax.sound.midi.spi with parameters of type MidiDevice.Info
boolean | MidiDeviceProvider.isDeviceSupported(MidiDevice.Info info) Indicates whether the device provider supports the device represented by the specified device info object.
abstract MidiDevice | MidiDeviceProvider.getDevice(MidiDevice.Info info) Obtains an instance of the device represented by the info object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiEvent

Packages that use MidiEvent
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MidiEvent in javax.sound.midi

Methods in javax.sound.midi that return MidiEvent
 MidiEvent Track.get(int index)
Obtains the event at the specified index.

Methods in javax.sound.midi with parameters of type MidiEvent
boolean | Track.add(MidiEvent event) Adds a new event to the track.
boolean | Track.remove(MidiEvent event) Removes the specified event from the track.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiFileFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiFileFormat

Packages that use MidiFileFormat
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of MidiFileFormat in javax.sound.midi

Methods in javax.sound.midi that return MidiFileFormat
static MidiFileFormat | MidiSystem.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the data in the specified input stream.
static MidiFileFormat | MidiSystem.getMidiFileFormat(URL url) Obtains the MIDI file format of the data in the specified URL.
static MidiFileFormat | MidiSystem.getMidiFileFormat(File file) Obtains the MIDI file format of the specified File.

Uses of MidiFileFormat in javax.sound.midi.spi

Methods in javax.sound.midi.spi that return MidiFileFormat
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the input stream provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(URL url) Obtains the MIDI file format of the URL provided.
abstract MidiFileFormat | MidiFileReader.getMidiFileFormat(File file) Obtains the MIDI file format of the File provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiMessage

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiMessage

Packages that use MidiMessage
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MidiMessage in javax.sound.midi

Subclasses of MidiMessage in javax.sound.midi
class | MetaMessage A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program.
class | ShortMessage A ShortMessage contains a MIDI message that has at most two data bytes following its status byte.
class | SysexMessage A SysexMessage object represents a MIDI system exclusive message.

Methods in javax.sound.midi that return MidiMessage
 MidiMessage MidiEvent.getMessage()
Obtains the MIDI message contained in the event.

Methods in javax.sound.midi with parameters of type MidiMessage
 void Receiver.send(MidiMessage message, long timeStamp)
Sends a MIDI message and time-stamp to this receiver.

Constructors in javax.sound.midi with parameters of type MidiMessage
MidiEvent(MidiMessage message, long tick)
Constructs a new MidiEvent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.MidiUnavailableException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.MidiUnavailableException

Packages that use MidiUnavailableException
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MidiUnavailableException in javax.sound.midi

Methods in javax.sound.midi that throw MidiUnavailableException
static MidiDevice | MidiSystem.getMidiDevice(MidiDevice.Info info) Obtains the requested MIDI device.
static Receiver | MidiSystem.getReceiver() Obtains a MIDI receiver from an external MIDI port or other default source.
static Transmitter | MidiSystem.getTransmitter() Obtains a MIDI transmitter from an external MIDI port or other default source.
static Synthesizer | MidiSystem.getSynthesizer() Obtains the default synthesizer.
static Sequencer | MidiSystem.getSequencer() Obtains the default sequencer.
void | MidiDevice.open() Opens the device, indicating that it should now acquire any system resources it requires and become operational.
Receiver | MidiDevice.getReceiver() Obtains a MIDI IN receiver through which the MIDI device may receive MIDI data.
Transmitter | MidiDevice.getTransmitter() Obtains a MIDI OUT connection from which the MIDI device will transmit MIDI data The returned transmitter must be closed when the application has finished using it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.Patch

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.Patch

Packages that use Patch
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Patch in javax.sound.midi

Methods in javax.sound.midi that return Patch
Patch[] | Sequence.getPatchList() Obtains a list of patches referenced in this sequence.
Patch | Instrument.getPatch() Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.

Methods in javax.sound.midi with parameters of type Patch
Instrument | Soundbank.getInstrument(Patch patch) Obtains an Instrument from the given Patch.
boolean | Synthesizer.loadInstruments(Soundbank soundbank, Patch[] patchList) Loads the instruments referenced by the specified patches, from the specified Soundbank.
void | Synthesizer.unloadInstruments(Soundbank soundbank, Patch[] patchList) Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.

Constructors in javax.sound.midi with parameters of type Patch
Instrument(Soundbank soundbank, Patch patch, String name, Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.Sequence

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.Sequence

Packages that use Sequence
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of Sequence in javax.sound.midi

Methods in javax.sound.midi that return Sequence
static Sequence | MidiSystem.getSequence(InputStream stream) Obtains a MIDI sequence from the specified input stream.
static Sequence | MidiSystem.getSequence(URL url) Obtains a MIDI sequence from the specified URL.
static Sequence | MidiSystem.getSequence(File file) Obtains a MIDI sequence from the specified File.
Sequence | Sequencer.getSequence() Obtains the sequence on which the Sequencer is currently operating.

Methods in javax.sound.midi with parameters of type Sequence
static int[] | MidiSystem.getMidiFileTypes(Sequence sequence) Obtains the set of MIDI file types that the system can write from the sequence specified.
static boolean | MidiSystem.isFileTypeSupported(int fileType, Sequence sequence) Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
static int | MidiSystem.write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.
static int | MidiSystem.write(Sequence in, int type, File out) Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
void | Sequencer.setSequence(Sequence sequence) Sets the current sequence on which the sequencer operates.

Uses of Sequence in javax.sound.midi.spi

Methods in javax.sound.midi.spi that return Sequence
abstract Sequence | MidiFileReader.getSequence(InputStream stream) Obtains a MIDI sequence from the input stream provided.
abstract Sequence | MidiFileReader.getSequence(URL url) Obtains a MIDI sequence from the URL provided.
abstract Sequence | MidiFileReader.getSequence(File file) Obtains a MIDI sequence from the File provided.

Methods in javax.sound.midi.spi with parameters of type Sequence
abstract int[] | MidiFileWriter.getMidiFileTypes(Sequence sequence) Obtains the file types that this file writer can write from the sequence specified.
boolean | MidiFileWriter.isFileTypeSupported(int fileType, Sequence sequence) Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
abstract int | MidiFileWriter.write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
abstract int | MidiFileWriter.write(Sequence in, int fileType, File out) Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.Sequencer.SyncMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.Sequencer.SyncMode

Packages that use Sequencer.SyncMode
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Sequencer.SyncMode in javax.sound.midi

Fields in javax.sound.midi declared as Sequencer.SyncMode
static Sequencer.SyncMode | Sequencer.SyncMode.INTERNAL_CLOCK A master synchronization mode that makes the sequencer get its timing information from its internal clock.
static Sequencer.SyncMode | Sequencer.SyncMode.MIDI_SYNC A master or slave synchronization mode that specifies the use of MIDI clock messages.
static Sequencer.SyncMode | Sequencer.SyncMode.MIDI_TIME_CODE A master or slave synchronization mode that specifies the use of MIDI Time Code.
static Sequencer.SyncMode | Sequencer.SyncMode.NO_SYNC A slave synchronization mode indicating that no timing information should be sent to the receiver.

Methods in javax.sound.midi that return Sequencer.SyncMode
Sequencer.SyncMode | Sequencer.getMasterSyncMode() Obtains the current master synchronization mode for this sequencer.
Sequencer.SyncMode[] | Sequencer.getMasterSyncModes() Obtains the set of master synchronization modes supported by this sequencer.
Sequencer.SyncMode | Sequencer.getSlaveSyncMode() Obtains the current slave synchronization mode for this sequencer.
Sequencer.SyncMode[] | Sequencer.getSlaveSyncModes() Obtains the set of slave synchronization modes supported by the sequencer.

Methods in javax.sound.midi with parameters of type Sequencer.SyncMode
void | Sequencer.setMasterSyncMode(Sequencer.SyncMode sync) Sets the source of timing information used by this sequencer.
void | Sequencer.setSlaveSyncMode(Sequencer.SyncMode sync) Sets the slave synchronization mode for the sequencer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.ShortMessage

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.ShortMessage

Packages that use ShortMessage
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of ShortMessage in javax.sound.midi

Methods in javax.sound.midi with parameters of type ShortMessage
 void ControllerEventListener.controlChange(ShortMessage event)
Invoked when a Sequencer has encountered and processed a control-change event of interest to this listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.SoundbankResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.SoundbankResource

Packages that use SoundbankResource
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of SoundbankResource in javax.sound.midi

Subclasses of SoundbankResource in javax.sound.midi
 class Instrument
An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect.

Methods in javax.sound.midi that return SoundbankResource
 SoundbankResource[] Soundbank.getResources()
Extracts a list of non-Instrument resources contained in the sound bank.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.Track

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.Track

Packages that use Track
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Track in javax.sound.midi

Methods in javax.sound.midi that return Track
Track | Sequence.createTrack() Creates a new, initially empty track as part of this sequence.
Track[] | Sequence.getTracks() Obtains an array containing all the tracks in this sequence.

Methods in javax.sound.midi with parameters of type Track
boolean | Sequence.deleteTrack(Track track) Removes the specified track from the sequence.
void | Sequencer.recordEnable(Track track, int channel) Prepares the specified track for recording events received on a particular channel.
void | Sequencer.recordDisable(Track track) Disables recording to the specified track.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.VoiceStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.VoiceStatus

Packages that use VoiceStatus
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of VoiceStatus in javax.sound.midi

Methods in javax.sound.midi that return VoiceStatus
 VoiceStatus[] Synthesizer.getVoiceStatus()
Obtains the current status of the voices produced by this synthesizer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.ControllerEventListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.ControllerEventListener

Packages that use ControllerEventListener
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of ControllerEventListener in javax.sound.midi

Methods in javax.sound.midi with parameters of type ControllerEventListener
int[] | Sequencer.addControllerEventListener(ControllerEventListener listener, int[] controllers) Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types.
int[] | Sequencer.removeControllerEventListener(ControllerEventListener listener, int[] controllers) Removes a controller event listener's interest in one or more types of controller event.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.MetaEventListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.MetaEventListener

Packages that use MetaEventListener
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MetaEventListener in javax.sound.midi

Methods in javax.sound.midi with parameters of type MetaEventListener
boolean | Sequencer.addMetaEventListener(MetaEventListener listener) Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer.
void | Sequencer.removeMetaEventListener(MetaEventListener listener) Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.MidiChannel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.MidiChannel

Packages that use MidiChannel
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of MidiChannel in javax.sound.midi

Methods in javax.sound.midi that return MidiChannel
 MidiChannel[] Synthesizer.getChannels()
Obtains the set of MIDI channels controlled by this synthesizer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.MidiDevice

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.MidiDevice

Packages that use MidiDevice
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of MidiDevice in javax.sound.midi

Subinterfaces of MidiDevice in javax.sound.midi
interface | Sequencer A hardware or software device that plays back a MIDI sequence is known as a sequencer.
interface | Synthesizer A Synthesizer generates sound.

Methods in javax.sound.midi that return MidiDevice
static MidiDevice MidiSystem.getMidiDevice(MidiDevice.Info info)
Obtains the requested MIDI device.

Uses of MidiDevice in javax.sound.midi.spi

Methods in javax.sound.midi.spi that return MidiDevice
abstract  MidiDevice MidiDeviceProvider.getDevice(MidiDevice.Info info)
Obtains an instance of the device represented by the info object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.Receiver

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.Receiver

Packages that use Receiver
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Receiver in javax.sound.midi

Methods in javax.sound.midi that return Receiver
static Receiver | MidiSystem.getReceiver() Obtains a MIDI receiver from an external MIDI port or other default source.
Receiver | Transmitter.getReceiver() Obtains the current receiver to which this transmitter will deliver MIDI messages.
Receiver | MidiDevice.getReceiver() Obtains a MIDI IN receiver through which the MIDI device may receive MIDI data.

Methods in javax.sound.midi with parameters of type Receiver
 void Transmitter.setReceiver(Receiver receiver)
Sets the receiver to which this transmitter will deliver MIDI messages.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.Sequencer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.Sequencer

Packages that use Sequencer
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Sequencer in javax.sound.midi

Methods in javax.sound.midi that return Sequencer
static Sequencer MidiSystem.getSequencer()
Obtains the default sequencer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.Soundbank

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.Soundbank

Packages that use Soundbank
javax.sound.midi | Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
javax.sound.midi.spi | Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Uses of Soundbank in javax.sound.midi

Methods in javax.sound.midi that return Soundbank
static Soundbank | MidiSystem.getSoundbank(InputStream stream) Constructs a MIDI sound bank by reading it from the specified stream.
static Soundbank | MidiSystem.getSoundbank(URL url) Constructs a Soundbank by reading it from the specified URL.
static Soundbank | MidiSystem.getSoundbank(File file) Constructs a Soundbank by reading it from the specified File.
Soundbank | SoundbankResource.getSoundbank() Obtains the sound bank that contains this SoundbankResource.
Soundbank | Synthesizer.getDefaultSoundbank() Obtains the default soundbank for the synthesizer, if one exists.

Methods in javax.sound.midi with parameters of type Soundbank
boolean | Synthesizer.isSoundbankSupported(Soundbank soundbank) Informs the caller whether this synthesizer is capable of loading instruments from the specified soundbank.
boolean | Synthesizer.loadAllInstruments(Soundbank soundbank) Loads onto the Synthesizer all instruments contained in the specified Soundbank.
void | Synthesizer.unloadAllInstruments(Soundbank soundbank) Unloads all instruments contained in the specified Soundbank.
boolean | Synthesizer.loadInstruments(Soundbank soundbank, Patch[] patchList) Loads the instruments referenced by the specified patches, from the specified Soundbank.
void | Synthesizer.unloadInstruments(Soundbank soundbank, Patch[] patchList) Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.

Constructors in javax.sound.midi with parameters of type Soundbank
SoundbankResource(Soundbank soundBank, String name, Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index.
Instrument(Soundbank soundbank, Patch patch, String name, Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.

Uses of Soundbank in javax.sound.midi.spi

Methods in javax.sound.midi.spi that return Soundbank
abstract Soundbank | SoundbankReader.getSoundbank(URL url) Obtains a soundbank object from the URL provided.
abstract Soundbank | SoundbankReader.getSoundbank(InputStream stream) Obtains a soundbank object from the InputStream provided.
abstract Soundbank | SoundbankReader.getSoundbank(File file) Obtains a soundbank object from the File provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.Synthesizer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.Synthesizer

Packages that use Synthesizer
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Synthesizer in javax.sound.midi

Methods in javax.sound.midi that return Synthesizer
static Synthesizer MidiSystem.getSynthesizer()
Obtains the default synthesizer.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.midi.Transmitter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.midi.Transmitter

Packages that use Transmitter
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Uses of Transmitter in javax.sound.midi

Methods in javax.sound.midi that return Transmitter
static Transmitter | MidiSystem.getTransmitter() Obtains a MIDI transmitter from an external MIDI port or other default source.
Transmitter | MidiDevice.getTransmitter() Obtains a MIDI OUT connection from which the MIDI device will transmit MIDI data The returned transmitter must be closed when the application has finished using it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ControllerEventListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface ControllerEventListener

All Superinterfaces:
EventListener
public interface ControllerEventListener
extends EventListener

The ControllerEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a requested type of MIDI control-change event. To register a ControllerEventListener object to receive such notifications, invoke the addControllerEventListener method of Sequencer, specifying the types of MIDI controllers about which you are interested in getting control-change notifications.

See Also:
MidiChannel.controlChange(int, int)

Method Summary
 void controlChange(ShortMessage event)
Invoked when a Sequencer has encountered and processed a control-change event of interest to this listener.

Method Detail

controlChange

public void controlChange(ShortMessage event)
Invoked when a Sequencer has encountered and processed a control-change event of interest to this listener. The event passed in is a ShortMessage whose first data byte indicates the controller number and whose second data byte is the value to which the controller was set.
Parameters:
event - the control-change event that the sequencer encountered in the sequence it is processing
See Also:
Sequencer.addControllerEventListener(ControllerEventListener, int[]),
MidiChannel.controlChange(int, int),
ShortMessage.getData1(),
ShortMessage.getData2()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Info

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiDevice.Info

java.lang.Object
  |
  +--javax.sound.midi.MidiDevice.Info
Enclosing class:
MidiDevice
public static class MidiDevice.Info
extends Object

A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.

See Also:
MidiDevice.getDeviceInfo()

Constructor Summary
protected MidiDevice.Info(String name, String vendor, String description, String version)
Constructs a device info object.
Method Summary
boolean | equals(Object obj) Reports whether two objects are equal.
String | getDescription() Obtains the description of the device.
String | getName() Obtains the name of the device.
String | getVendor() Obtains the name of the company who supplies the device.
String | getVersion() Obtains the version of the device.
int | hashCode() Finalizes the hashcode method.
String | toString() Provides a string representation of the device information.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MidiDevice.Info

protected MidiDevice.Info(String name,
                          String vendor,
                          String description,
                          String version)
Constructs a device info object.
Parameters:
name - the name of the device
the - name of the company who provides the device
description - a description of the device
version - version information for the device
Method Detail

equals

public final boolean equals(Object obj)
Reports whether two objects are equal. Returns true if the objects are identical.
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare this object
Returns:
true if this object is the same as the obj argument; false otherwise

hashCode

public final int hashCode()
Finalizes the hashcode method.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

getName

public final String getName()
Obtains the name of the device.
Returns:
a string containing the device's name

getVendor

public final String getVendor()
Obtains the name of the company who supplies the device.
Returns:
device the vendor's name

getDescription

public final String getDescription()
Obtains the description of the device.
Returns:
a description of the device

getVersion

public final String getVersion()
Obtains the version of the device.
Returns:
textual version information for the device.

toString

public final String toString()
Provides a string representation of the device information.
Overrides:
toString in class Object
Returns:
a description of the info object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Instrument

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class Instrument

java.lang.Object
  |
  +--javax.sound.midi.SoundbankResource
        |
        +--javax.sound.midi.Instrument
public abstract class Instrument
extends SoundbankResource

An instrument is a sound-synthesis algorithm with certain parameter settings, usually designed to emulate a specific real-world musical instrument or to achieve a specific sort of sound effect. Instruments are typically stored in collections called soundbanks. Before the instrument can be used to play notes, it must first be loaded onto a synthesizer, and then it must be selected for use on one or more channels, via a program-change command. MIDI notes that are subsequently received on those channels will be played using the sound of the selected instrument.

See Also:
Soundbank, Soundbank.getInstruments(), Patch, Synthesizer.loadInstrument(Instrument), MidiChannel.programChange(int, int)

Constructor Summary
protected Instrument(Soundbank soundbank, Patch patch, String name, Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index.
Method Summary
 Patch getPatch()
Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.
Methods inherited from class javax.sound.midi.SoundbankResource
getData, getDataClass, getName, getSoundbank
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Instrument

protected Instrument(Soundbank soundbank,
                     Patch patch,
                     String name,
                     Class dataClass)
Constructs a new MIDI instrument from the specified sound bank, bank index, and program index. When a subsequent request is made to load the instrument, the sound bank will search its contents using these indices, and the instrument whose Patch matches the indices (namely, the instrument constructed here) will be loaded into the synthesizer at the indicated bank and program location.
Parameters:
soundbank - sound bank containing the instrument
bank - the bank index (0 to 127)
program - program change number (0 to 127)
See Also:
Synthesizer.loadInstrument(Instrument)
Method Detail

getPatch

public Patch getPatch()
Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.
Returns:
this instrument's patch
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidMidiDataException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class InvalidMidiDataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.sound.midi.InvalidMidiDataException
All Implemented Interfaces:
Serializable
public class InvalidMidiDataException
extends Exception

An InvalidMidiDataException indicates that inappropriate MIDI data was encountered. This often means that the data is invalid in and of itself, from the perspective of the MIDI specification. An example would be an undefined status byte. However, the exception might simply mean that the data was invalid in the context it was used, or that the object to which the data was given was unable to parse or use it. For example, a file reader might not be able to parse a Type 2 MIDI file, even though that format is defined in the MIDI specification.

See Also:
Serialized Form

Constructor Summary
InvalidMidiDataException()
Constructs an InvalidMidiDataException with null for its error detail message.
InvalidMidiDataException(String message)
Constructs an InvalidMidiDataException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidMidiDataException

public InvalidMidiDataException()
Constructs an InvalidMidiDataException with null for its error detail message.

InvalidMidiDataException

public InvalidMidiDataException(String message)
Constructs an InvalidMidiDataException with the specified detail message.
Parameters:
message - the string to display as an error detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MetaEventListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface MetaEventListener

All Superinterfaces:
EventListener
public interface MetaEventListener
extends EventListener

The MetaEventListener interface should be implemented by classes whose instances need to be notified when a Sequencer has processed a MetaMessage. To register a MetaEventListener object to receive such notifications, pass it as the argument to the addMetaEventListener method of Sequencer.

Method Summary
 void meta(MetaMessage meta)
Invoked when a Sequencer has encountered and processed a MetaMessage in the Sequence it is processing.

Method Detail

meta

public void meta(MetaMessage meta)
Invoked when a Sequencer has encountered and processed a MetaMessage in the Sequence it is processing.
Parameters:
meta - the meta-message that the sequencer encountered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetaMessage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MetaMessage

java.lang.Object
  |
  +--javax.sound.midi.MidiMessage
        |
        +--javax.sound.midi.MetaMessage
All Implemented Interfaces:
Cloneable
public class MetaMessage
extends MidiMessage

A MetaMessage is a MidiMessage that is not meaningful to synthesizers, but that can be stored in a MIDI file and interpreted by a sequencer program. (See the discussion in the MidiMessage class description.) The Standard MIDI Files specification defines various types of meta-events, such as sequence number, lyric, cue point, and set tempo. There are also meta-events for such information as lyrics, copyrights, tempo indications, time and key signatures, markers, etc. For more information, see the Standard MIDI Files 1.0 specification, which is part of the Complete MIDI 1.0 Detailed Specification published by the MIDI Manufacturer's Association (http://www.midi.org).

When data is being transported using MIDI wire protocol, a ShortMessage with the status value 0xFF represents a system reset message. In MIDI files, this same status value denotes a MetaMessage. The types of meta-message are distinguished from each other by the first byte that follows the status byte 0xFF. The subsequent bytes are data bytes. As with system exclusive messages, there are an arbitrary number of data bytes, depending on the type of MetaMessage.

See Also:
MetaEventListener

Field Summary
static int META
Status byte for MetaMessage (0xFF, or 255), which is used in MIDI files.
Fields inherited from class javax.sound.midi.MidiMessage
data, length
Constructor Summary
 | MetaMessage() Constructs a new MetaMessage.
protected | MetaMessage(byte[] data) Constructs a new MetaMessage.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
byte[] | getData() Obtains a copy of the data for the meta message.
int | getType() Obtains the type of the MetaMessage.
void | setMessage(int type, byte[] data, int length) Sets the message parameters for a MetaMessage.
Methods inherited from class javax.sound.midi.MidiMessage
getLength, getMessage, getStatus, setMessage
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

META

public static final int META
Status byte for MetaMessage (0xFF, or 255), which is used in MIDI files. It has the same value as SYSTEM_RESET, which is used in the real-time "MIDI wire" protocol.
See Also:
MidiMessage.getStatus()
Constructor Detail

MetaMessage

public MetaMessage()
Constructs a new MetaMessage. The contents of the message are not set here; use setMessage to set them subsequently.

MetaMessage

protected MetaMessage(byte[] data)
Constructs a new MetaMessage.
Parameters:
data - an array of bytes containing the complete message. The message data may be changed using the setMessage method.
See Also:
setMessage(int, byte[], int)
Method Detail

setMessage

public void setMessage(int type,
                       byte[] data,
                       int length)
                throws InvalidMidiDataException
Sets the message parameters for a MetaMessage. Since only one status byte value, 0xFF, is allowed for meta-messages, it does not need to be specified here. Calls to getStatus return 0xFF for all meta-messages.

The type argument should be a valid value for the byte that follows the status byte in the MetaMessage. The data argument should contain all the subsequent bytes of the MetaMessage. In other words, the byte that specifies the type of MetaMessage is not considered a data byte.

Parameters:
type - meta-message type (must be less than 128)
data - the data bytes in the MIDI message
length - the number of bytes in the data byte array
Throws:
InvalidMidiDataException - if the parameter values do not specify a valid MIDI meta message

getType

public int getType()
Obtains the type of the MetaMessage.
Returns:
an integer representing the MetaMessage type

getData

public byte[] getData()
Obtains a copy of the data for the meta message. The returned array of bytes does not include the status byte or the message length data. The length of the data for the meta message is the length of the array. Note that the length of the entire message includes the status byte and the meta message type byte, and therefore may be longer than the returned array.
Returns:
array containing the meta message data.
See Also:
MidiMessage.getLength()

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class MidiMessage
Returns:
a clone of this instance
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


MidiChannel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface MidiChannel

public interface MidiChannel

A MidiChannel object represents a single MIDI channel. Generally, each MidiChannel method processes a like-named MIDI "channel voice" or "channel mode" message as defined by the MIDI specification. However, MidiChannel adds some "get" methods that retrieve the value most recently set by one of the standard MIDI channel messages. Similarly, methods for per-channel solo and mute have been added.

A Synthesizer object has a collection of MidiChannels, usually one for each of the 16 channels prescribed by the MIDI 1.0 specification. The Synthesizer generates sound when its MidiChannels receive noteOn messages.

See the MIDI 1.0 Specification for more information about the prescribed behavior of the MIDI channel messages, which are not exhaustively documented here. The specification is titled MIDI Reference: The Complete MIDI 1.0 Detailed Specification, and is published by the MIDI Manufacturer's Association ( http://www.midi.org).

MIDI was originally a protocol for reporting the gestures of a keyboard musician. This genesis is visible in the MidiChannel API, which preserves such MIDI concepts as key number, key velocity, and key pressure. It should be understood that the MIDI data does not necessarily originate with a keyboard player (the source could be a different kind of musician, or software). Some devices might generate constant values for velocity and pressure, regardless of how the note was performed. Also, the MIDI specification often leaves it up to the synthesizer to use the data in the way the implementor sees fit. For example, velocity data need not always be mapped to volume and/or brightness.

See Also:
Synthesizer.getChannels()

Method Summary
void | allNotesOff() Turns off all notes that are currently sounding on this channel.
void | allSoundOff() Immediately turns off all sounding notes on this channel, ignoring the state of the Hold Pedal and the internal decay rate of the current Instrument.
void | controlChange(int controller, int value) Reacts to a change in the specified controller's value.
int | getChannelPressure() Obtains the channel's keyboard pressure.
int | getController(int controller) Obtains the current value of the specified controller.
boolean | getMono() Obtains the current mono/poly mode.
boolean | getMute() Obtains the current mute state for this channel.
boolean | getOmni() Obtains the current omni mode status.
int | getPitchBend() Obtains the upward of downward pitch offset for this channel.
int | getPolyPressure(int noteNumber) Obtains the pressure with which the specified key is being depressed.
int | getProgram() Obtains the current program number for this channel.
boolean | getSolo() Obtains the current solo state for this channel.
boolean | localControl(boolean on) Turns local control on or off.
void | noteOff(int noteNumber) Turns the specified note off.
void | noteOff(int noteNumber, int velocity) Turns the specified note off.
void | noteOn(int noteNumber, int velocity) Starts the specified note sounding.
void | programChange(int program) Changes a program (patch).
void | programChange(int bank, int program) Changes the program using bank and program (patch) numbers.
void | resetAllControllers() Resets all the implemented controllers to their default values.
void | setChannelPressure(int pressure) Reacts to a change in the keyboard pressure.
void | setMono(boolean on) Turns mono mode on or off.
void | setMute(boolean mute) Sets the mute state for this channel.
void | setOmni(boolean on) Turns omni mode on or off.
void | setPitchBend(int bend) Changes the pitch offset for all notes on this channel.
void | setPolyPressure(int noteNumber, int pressure) Reacts to a change in the specified note's key pressure.
void | setSolo(boolean soloState) Sets the solo state for this channel.

Method Detail

noteOn

public void noteOn(int noteNumber,
                   int velocity)
Starts the specified note sounding. The key-down velocity usually controls the note's volume and/or brightness. If velocity is zero, this method instead acts like noteOff(int), terminating the note.
Parameters:
noteNumber - the MIDI note number, from 0 to 127 (60 = Middle C)
velocity - the speed with which the key was depressed
See Also:
noteOff(int, int)

noteOff

public void noteOff(int noteNumber,
                    int velocity)
Turns the specified note off. The key-up velocity, if not ignored, can be used to affect how quickly the note decays. In any case, the note might not die away instantaneously; its decay rate is determined by the internals of the Instrument. If the Hold Pedal (a controller; see controlChange) is down, the effect of this method is deferred until the pedal is released.
Parameters:
noteNumber - the MIDI note number, from 0 to 127 (60 = Middle C)
velocity - the speed with which the key was released
See Also:
noteOff(int),
noteOn(int, int),
allNotesOff(),
allSoundOff()

noteOff

public void noteOff(int noteNumber)
Turns the specified note off.
Parameters:
noteNumber - the MIDI note number, from 0 to 127 (60 = Middle C)
See Also:
noteOff(int, int)

setPolyPressure

public void setPolyPressure(int noteNumber,
                            int pressure)
Reacts to a change in the specified note's key pressure. Polyphonic key pressure allows a keyboard player to press multiple keys simultaneously, each with a different amount of pressure. The pressure, if not ignored, is typically used to vary such features as the volume, brightness, or vibrato of the note.
Parameters:
noteNumber - the MIDI note number, from 0 to 127 (60 = Middle C)
pressure - value for the specified key, from 0 to 127 (127 = maximum pressure)
See Also:
getPolyPressure(int)

getPolyPressure

public int getPolyPressure(int noteNumber)
Obtains the pressure with which the specified key is being depressed.
Parameters:
noteNumber - the MIDI note number, from 0 to 127 (60 = Middle C)
Returns:
the amount of pressure for that note, from 0 to 127 (127 = maximum pressure)
See Also:
setPolyPressure(int, int)

setChannelPressure

public void setChannelPressure(int pressure)
Reacts to a change in the keyboard pressure. Channel pressure indicates how hard the keyboard player is depressing the entire keyboard. This can be the maximum or average of the per-key pressure-sensor values, as set by setPolyPressure. More commonly, it is a measurement of a single sensor on a device that doesn't implement polyphonic key pressure. Pressure can be used to control various aspects of the sound, as described under setPolyPressure.
Parameters:
pressure - the pressure with which the keyboard is being depressed, from 0 to 127 (127 = maximum pressure)
See Also:
setPolyPressure(int, int), getChannelPressure()

getChannelPressure

public int getChannelPressure()
Obtains the channel's keyboard pressure.
Returns:
the pressure with which the keyboard is being depressed, from 0 to 127 (127 = maximum pressure)
See Also:
setChannelPressure(int)

controlChange

public void controlChange(int controller,
                          int value)
Reacts to a change in the specified controller's value. A controller is some control other than a keyboard key, such as a switch, slider, pedal, wheel, or breath-pressure sensor. The MIDI 1.0 Specification provides standard numbers for typical controllers on MIDI devices, and describes the intended effect for some of the controllers. The way in which an Instrument reacts to a controller change may be specific to the Instrument.

The MIDI 1.0 Specification defines both 7-bit controllers and 14-bit controllers. Continuous controllers, such as wheels and sliders, typically have 14 bits (two MIDI bytes), while discrete controllers, such as switches, typically have 7 bits (one MIDI byte). Refer to the specification to see the expected resolution for each type of control.

Controllers 64 through 95 (0x40 - 0x5F) allow 7-bit precision. The value of a 7-bit controller is set completely by the value argument. An additional set of controllers provide 14-bit precision by using two controller numbers, one for the most significant 7 bits and another for the least significant 7 bits. Controller numbers 0 through 31 (0x00 - 0x1F) control the most significant 7 bits of 14-bit controllers; controller numbers 32 through 63 (0x20 - 0x3F) control the least significant 7 bits of these controllers. For example, controller number 7 (0x07) controls the upper 7 bits of the channel volume controller, and controller number 39 (0x27) controls the lower 7 bits. The value of a 14-bit controller is determined by the interaction of the two halves. When the most significant 7 bits of a controller are set (using controller numbers 0 through 31), the lower 7 bits are automatically set to 0. The corresponding controller number for the lower 7 bits may then be used to further modulate the controller value.

Parameters:
controller - the controller number (0 to 127; see the MIDI 1.0 Specification for the interpretation)
value - the value to which the specified controller is changed
See Also:
getController(int)

getController

public int getController(int controller)
Obtains the current value of the specified controller. The return value is represented with up to 14 bits; the resolution is dependent on the controller number. For controllers 0-31, the resolution is always 14 bits.
Parameters:
controller - the number of the controller whose value is desired. The allowed range is 0-127; see the MIDI 1.0 Specification for the interpretation.
Returns:
the current value of the specified controller
See Also:
controlChange(int, int)

programChange

public void programChange(int program)
Changes a program (patch). This selects a specific instrument from the currently selected bank of instruments.

The MIDI specification does not dictate whether notes that are already sounding should switch to the new instrument (timbre) or continue with their original timbre until terminated by a note-off.

The program number is zero-based (expressed from 0 to 127). Note that MIDI hardware displays and literature about MIDI typically use the range 1 to 128 instead.

Parameters:
program - the program number to switch to (0 to 127)
See Also:
programChange(int, int), getProgram()

programChange

public void programChange(int bank,
                          int program)
Changes the program using bank and program (patch) numbers.
Parameters:
bank - the bank number to switch to (0 to 127)
program - the program (patch) to use in the specified bank (0 to 127)
See Also:
programChange(int), getProgram()

getProgram

public int getProgram()
Obtains the current program number for this channel.
Returns:
the program number of the currently selected patch
See Also:
Patch.getProgram(),
Synthesizer.loadInstrument(javax.sound.midi.Instrument),
programChange(int)

setPitchBend

public void setPitchBend(int bend)
Changes the pitch offset for all notes on this channel. This affects all currently sounding notes as well as subsequent ones. (For pitch bend to cease, the value needs to be reset to the center position.)

The MIDI specification stipulates that pitch bend be a 14-bit value, where zero is maximum downward bend, 16383 is maximum upward bend, and 8192 is the center (no pitch bend). The actual amount of pitch change is not specified; it can be changed by a pitch-bend sensitivy setting. However, the General MIDI specification says that the default range should be two semitones up and down from center.

Parameters:
bend - the amount of pitch change, as a nonnegative 14-bit value (8192 = no bend)
See Also:
getPitchBend()

getPitchBend

public int getPitchBend()
Obtains the upward of downward pitch offset for this channel.
Returns:
bend amount, as a nonnegative 14-bit value (8192 = no bend)
See Also:
setPitchBend(int)

resetAllControllers

public void resetAllControllers()
Resets all the implemented controllers to their default values.
See Also:
controlChange(int, int)

allNotesOff

public void allNotesOff()
Turns off all notes that are currently sounding on this channel. The notes might not die away instantaneously; their decay rate is determined by the internals of the Instrument. If the Hold Pedal controller (see controlChange) is down, the effect of this method is deferred until the pedal is released.
See Also:
allSoundOff(), noteOff(int)

allSoundOff

public void allSoundOff()
Immediately turns off all sounding notes on this channel, ignoring the state of the Hold Pedal and the internal decay rate of the current Instrument.
See Also:
allNotesOff()

localControl

public boolean localControl(boolean on)
Turns local control on or off. The default is for local control to be on. The "on" setting means that if a device is capable of both synthesizing sound and transmitting MIDI messages, it will synthesize sound in response to the note-on and note-off messages that it itself transmits. It will also respond to messages received from other transmitting devices. The "off" setting means that the synthesizer will ignore its own transmitted MIDI messages, but not those received from other devices.
Parameters:
on - true to turn local control on, false to turn local control off
Returns:
the new local-control value

setMono

public void setMono(boolean on)
Turns mono mode on or off. In mono mode, the channel synthesizes only one note at a time. In poly mode (identical to mono mode off), the channel can synthesize multiple notes simultaneously. The default is mono off (poly mode on).

"Mono" is short for the word "monophonic," which in this context is opposed to the word "polyphonic" and refers to a single synthesizer voice per MIDI channel. It has nothing to do with how many audio channels there might be (as in "monophonic" versus "stereophonic" recordings).

Parameters:
on - true to turn mono mode on, false to turn it off (which means turning poly mode on).
See Also:
getMono(), VoiceStatus

getMono

public boolean getMono()
Obtains the current mono/poly mode.
Returns:
true if mono mode is on, otherwise false (meaning poly mode is on).
See Also:
setMono(boolean)

setOmni

public void setOmni(boolean on)
Turns omni mode on or off. In omni mode, the channel responds to messages sent on all channels. When omni is off, the channel responds only to messages sent on its channel number. The default is omni off.
Parameters:
on - true to turn omni mode on, false to turn it off.
See Also:
getOmni(), VoiceStatus

getOmni

public boolean getOmni()
Obtains the current omni mode status.
Returns:
true if omni mode is on, otherwise false.
See Also:
setOmni(boolean)

setMute

public void setMute(boolean mute)
Sets the mute state for this channel. A value of true means the channel is to be muted, false means the channel can sound (if other channels are not soloed).

Unlike allSoundOff(), this method applies to only a specific channel, not to all channels. Further, it silences not only currently sounding notes, but also subsequently received notes.

Parameters:
mute - the new mute state
See Also:
getMute(), setSolo(boolean)

getMute

public boolean getMute()
Obtains the current mute state for this channel.
Returns:
true the channel is muted, false if not
See Also:
setMute(boolean)

setSolo

public void setSolo(boolean soloState)
Sets the solo state for this channel. If solo is true only this channel and other soloed channels will sound. If solo is false then only other soloed channels will sound, unless no channels are soloed, in which case all unmuted channels will sound.
Parameters:
soloState - new solo state for the channel
See Also:
getSolo(), setMute(boolean)

getSolo

public boolean getSolo()
Obtains the current solo state for this channel.
Returns:
true if soloed, false if not
See Also:
setSolo(boolean)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiDevice

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface MidiDevice

All Known Subinterfaces:
Sequencer, Synthesizer
public interface MidiDevice

MidiDevice is the base interface for all MIDI devices. Common devices include synthesizers, sequencers, MIDI input ports, and MIDI output ports. A MidiDevice can be a transmitter or a receiver of MIDI events, or both. To this end, it typically also implements the Transmitter or Receiver interface (or both), or has access to objects that do.

A MidiDevice includes a MidiDevice.Info object to provide manufacturer information and so on.

See Also:
Synthesizer, Sequencer, MidiChannel.setMono(boolean)

Inner Class Summary
static class MidiDevice.Info
A MidiDevice.Info object contains assorted data about a MidiDevice, including its name, the company who created it, and descriptive text.
Method Summary
void | close() Closes the device, indicating that the device should now release any system resources it is using.
MidiDevice.Info | getDeviceInfo() Obtains information about the device, including its Java class and Strings containing its name, vendor, and description.
int | getMaxReceivers() Obtains the maximum number of MIDI IN connections available on this MIDI device for receiving MIDI data.
int | getMaxTransmitters() Obtains the maximum number of MIDI OUT connections available on this MIDI device for transmitting MIDI data.
long | getMicrosecondPosition() Obtains the current time-stamp of the device, in microseconds.
Receiver | getReceiver() Obtains a MIDI IN receiver through which the MIDI device may receive MIDI data.
Transmitter | getTransmitter() Obtains a MIDI OUT connection from which the MIDI device will transmit MIDI data The returned transmitter must be closed when the application has finished using it.
boolean | isOpen() Reports whether the device is open.
void | open() Opens the device, indicating that it should now acquire any system resources it requires and become operational.

Method Detail

getDeviceInfo

public MidiDevice.Info getDeviceInfo()
Obtains information about the device, including its Java class and Strings containing its name, vendor, and description.
Returns:
device info

open

public void open()
          throws MidiUnavailableException
Opens the device, indicating that it should now acquire any system resources it requires and become operational.

Note that some devices, once closed, cannot be reopened. Attempts to reopen such a device will always result in a MidiUnavailableException.

Throws:
MidiUnavailableException - thrown if the device cannot be opened due to resource restrictions.
SecurityException - thrown if the device cannot be opened due to security restrictions.
See Also:
close(), isOpen()

close

public void close()
Closes the device, indicating that the device should now release any system resources it is using.
See Also:
open(), isOpen()

isOpen

public boolean isOpen()
Reports whether the device is open. The mechanism for opening particular devices is defined by subinterfaces and/or by classes implementing this interface.
Returns:
true if the device is open, otherwise false
See Also:
close()

getMicrosecondPosition

public long getMicrosecondPosition()
Obtains the current time-stamp of the device, in microseconds. If a device supports time-stamps, it should start counting at 0 when the device is opened and continue incrementing its time-stamp in microseconds until the device is closed. If it does not support time-stamps, it should always return -1.
Returns:
the current time-stamp of the device in microseconds, or -1 if time-stamping is not supported by the device.

getMaxReceivers

public int getMaxReceivers()
Obtains the maximum number of MIDI IN connections available on this MIDI device for receiving MIDI data.
Returns:
maximum number of MIDI IN connections

getMaxTransmitters

public int getMaxTransmitters()
Obtains the maximum number of MIDI OUT connections available on this MIDI device for transmitting MIDI data.
Returns:
maximum number of MIDI OUT connections

getReceiver

public Receiver getReceiver()
                     throws MidiUnavailableException
Obtains a MIDI IN receiver through which the MIDI device may receive MIDI data. The returned receiver must be closed when the application has finished using it.
Returns:
a receiver for the device.
Throws:
MidiUnavailableException - thrown if a receiver is not available due to resource restrictions
See Also:
Receiver.close()

getTransmitter

public Transmitter getTransmitter()
                           throws MidiUnavailableException
Obtains a MIDI OUT connection from which the MIDI device will transmit MIDI data The returned transmitter must be closed when the application has finished using it.
Returns:
a MIDI OUT transmitter for the device.
Throws:
MidiUnavailableException - thrown if a transmitter is not available due to resource restrictions
See Also:
Transmitter.close()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiEvent

java.lang.Object
  |
  +--javax.sound.midi.MidiEvent
public class MidiEvent
extends Object

MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a Sequence object. The duration of a tick is specified by the timing information contained in the MIDI file or Sequence object.

In Java Sound, MidiEvent objects are typically contained in a Track, and Tracks are likewise contained in a Sequence.

Constructor Summary
MidiEvent(MidiMessage message, long tick)
Constructs a new MidiEvent.
Method Summary
MidiMessage | getMessage() Obtains the MIDI message contained in the event.
long | getTick() Obtains the time-stamp for the event, in MIDI ticks
void | setTick(long tick) Sets the time-stamp for the event, in MIDI ticks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MidiEvent

public MidiEvent(MidiMessage message,
                 long tick)
Constructs a new MidiEvent.
Parameters:
message - the MIDI message contained in the event
tick - the time-stamp for the event, in MIDI ticks
Method Detail

getMessage

public MidiMessage getMessage()
Obtains the MIDI message contained in the event.
Returns:
the MIDI message

setTick

public void setTick(long tick)
Sets the time-stamp for the event, in MIDI ticks
Parameters:
tick - the new time-stamp, in MIDI ticks

getTick

public long getTick()
Obtains the time-stamp for the event, in MIDI ticks
Returns:
the time-stamp for the event, in MIDI ticks
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiFileFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiFileFormat

java.lang.Object
  |
  +--javax.sound.midi.MidiFileFormat
public class MidiFileFormat
extends Object

A MidiFileFormat object encapsulates a MIDI file's type, as well as its length and timing information.

See Also:
MidiSystem.getMidiFileFormat(java.io.File), Sequencer.setSequence(java.io.InputStream stream)

Field Summary
protected int | byteLength The length of the MIDI file in bytes.
protected float | divisionType The division type of the MIDI file.
protected long | microsecondLength The duration of the MIDI file in microseconds.
protected int | resolution The timing resolution of the MIDI file.
protected int | type The type of MIDI file.
static int | UNKNOWN_LENGTH Represents unknown length.
Constructor Summary
MidiFileFormat(int type, float divisionType, int resolution, int bytes, long microseconds)
Constructs a MidiFileFormat.
Method Summary
int | getByteLength() Obtains the length of the MIDI file, expressed in 8-bit bytes.
float | getDivisionType() Obtains the timing division type for the MIDI file.
long | getMicrosecondLength() Obtains the length of the MIDI file, expressed in microseconds.
int | getResolution() Obtains the timing resolution for the MIDI file.
int | getType() Obtains the MIDI file type.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

UNKNOWN_LENGTH

public static final int UNKNOWN_LENGTH
Represents unknown length.

type

protected int type
The type of MIDI file.

divisionType

protected float divisionType
The division type of the MIDI file.
See Also:
Sequence.PPQ, Sequence.SMPTE_24, Sequence.SMPTE_25, Sequence.SMPTE_30DROP, Sequence.SMPTE_30

resolution

protected int resolution
The timing resolution of the MIDI file.

byteLength

protected int byteLength
The length of the MIDI file in bytes.

microsecondLength

protected long microsecondLength
The duration of the MIDI file in microseconds.
Constructor Detail

MidiFileFormat

public MidiFileFormat(int type,
                      float divisionType,
                      int resolution,
                      int bytes,
                      long microseconds)
Constructs a MidiFileFormat.
Parameters:
type - the MIDI file type
divisionType - the timing division type (PPQ or one of the SMPTE types)
resolution - the timing resolution
bytes - the length of the MIDI file in bytes
microseconds - the duration of the file in microseconds
See Also:
UNKNOWN_LENGTH, Sequence.PPQ, Sequence.SMPTE_24, Sequence.SMPTE_25, Sequence.SMPTE_30DROP, Sequence.SMPTE_30
Method Detail

getType

public int getType()
Obtains the MIDI file type.
Returns:
the file's type

getDivisionType

public float getDivisionType()
Obtains the timing division type for the MIDI file.
Returns:
the division type (PPQ or one of the SMPTE types)
See Also:
Sequence.Sequence(float, int), Sequence.PPQ, Sequence.SMPTE_24, Sequence.SMPTE_25, Sequence.SMPTE_30DROP, Sequence.SMPTE_30, Sequence.getDivisionType()

getResolution

public int getResolution()
Obtains the timing resolution for the MIDI file. If the division type is PPQ, the resolution is specified in ticks per beat. For SMTPE timing, the resolution is specified in ticks per frame.
Returns:
the number of ticks per beat (PPQ) or per frame (SMPTE)
See Also:
getDivisionType(), Sequence.getResolution()

getByteLength

public int getByteLength()
Obtains the length of the MIDI file, expressed in 8-bit bytes.
Returns:
the number of bytes in the file

getMicrosecondLength

public long getMicrosecondLength()
Obtains the length of the MIDI file, expressed in microseconds.
Returns:
the file's duration in microseconds
See Also:
Sequence.getMicrosecondLength(), getByteLength()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiMessage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiMessage

java.lang.Object
  |
  +--javax.sound.midi.MidiMessage
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
MetaMessage, ShortMessage, SysexMessage
public abstract class MidiMessage
extends Object
implements Cloneable

MidiMessage is the base class for MIDI messages. They include not only the standard MIDI messages that a synthesizer can respond to, but also "meta-events" that can be used by sequencer programs. There are meta-events for such information as lyrics, copyrights, tempo indications, time and key signatures, markers, etc. For more information, see the Standard MIDI Files 1.0 specification, which is part of the Complete MIDI 1.0 Detailed Specification published by the MIDI Manufacturer's Association (http://www.midi.org).

The base MidiMessage class provides access to three types of information about a MIDI message:

  • The messages's status byte
  • The total length of the message in bytes (the status byte plus any data bytes)
  • A byte array containing the complete message
MidiMessage includes methods to get, but not set, these values. Setting them is a subclass responsibility.

The MIDI standard expresses MIDI data in bytes. However, because JavaTM uses signed bytes, the Java Sound API uses integers instead of bytes when expressing MIDI data. For example, the getStatus() method of MidiMessage returns MIDI status bytes as integers. If you are processing MIDI data that originated outside Java Sound and now is encoded as signed bytes, the bytes can can be converted to integers using this conversion:

int i = (int)(byte & 0xFF)

If you simply need to pass a known MIDI byte value as a method parameter, it can be expressed directly as an integer, using (for example) decimal or hexidecimal notation. For instance, to pass the "active sensing" status byte as the first argument to ShortMessage's setMessage(int) method, you can express it as 254 or 0xFE.

See Also:
Track, Sequence, Receiver

Field Summary
protected byte[] | data The MIDI message data.
protected int | length The number of bytes in the MIDI message, including the status byte and any data bytes.
Constructor Summary
protected MidiMessage(byte[] data)
Constructs a new MidiMessage.
Method Summary
abstract Object | clone() Creates a new object of the same class and with the same contents as this object.
int | getLength() Obtains the total length of the MIDI message in bytes.
byte[] | getMessage() Obtains the MIDI message data.
int | getStatus() Obtains the status byte for the MIDI message.
protected void | setMessage(byte[] data, int length) Sets the data for the MIDI message.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

data

protected byte[] data
The MIDI message data. The first byte is the status byte for the message; subsequent bytes up to the length of the message are data bytes for this message.
See Also:
getLength()

length

protected int length
The number of bytes in the MIDI message, including the status byte and any data bytes.
See Also:
getLength()
Constructor Detail

MidiMessage

protected MidiMessage(byte[] data)
Constructs a new MidiMessage. This protected constructor is called by concrete subclasses, which should ensure that the data array specifies a complete, valid MIDI message.
Parameters:
data - an array of bytes containing the complete message. The message data may be changed using the setMessage method.
See Also:
setMessage(byte[], int)
Method Detail

setMessage

protected void setMessage(byte[] data,
                          int length)
                   throws InvalidMidiDataException
Sets the data for the MIDI message. This protected method is called by concrete subclasses, which should ensure that the data array specifies a complete, valid MIDI message.

getMessage

public byte[] getMessage()
Obtains the MIDI message data. The first byte of the returned byte array is the status byte of the message. Any subsequent bytes up to the length of the message are data bytes. The byte array may have a length which is greater than that of the actual message; the total length of the message in bytes is reported by the getLength() method.
Returns:
the byte array containing the complete MidiMessage data

getStatus

public int getStatus()
Obtains the status byte for the MIDI message. The status "byte" is represented as an integer; see the discussion in the MidiMessage class description.
Returns:
the integer representation of this event's status byte

getLength

public int getLength()
Obtains the total length of the MIDI message in bytes. A MIDI message consists of one status byte and zero or more data bytes. The return value ranges from 1 for system real-time messages, to 2 or 3 for channel messages, to any value for meta and system exclusive messages.
Returns:
the length of the message in bytes

clone

public abstract Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class Object
Returns:
a clone of this instance.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiSystem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiSystem

java.lang.Object
  |
  +--javax.sound.midi.MidiSystem
public class MidiSystem
extends Object

The MidiSystem class provides access to the installed MIDI system resources, including devices such as synthesizers, sequencers, and MIDI input and output ports. A typical simple MIDI application might begin by invoking one or more MidiSystem methods to learn what devices are installed and to obtain the ones needed in that application.

The class also has methods for reading files, streams, and URLs that contain standard MIDI file data or soundbanks. You can query the MidiSystem for the format of a specified MIDI file.

You cannot instantiate a MidiSystem; all the methods are static.

Method Summary
static MidiDevice | getMidiDevice(MidiDevice.Info info) Obtains the requested MIDI device.
static MidiDevice.Info[] | getMidiDeviceInfo() Obtains an array of information objects representing the set of all MIDI devices available on the system.
static MidiFileFormat | getMidiFileFormat(File file) Obtains the MIDI file format of the specified File.
static MidiFileFormat | getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the data in the specified input stream.
static MidiFileFormat | getMidiFileFormat(URL url) Obtains the MIDI file format of the data in the specified URL.
static int[] | getMidiFileTypes() Obtains the set of MIDI file types for which file writing support is provided by the system.
static int[] | getMidiFileTypes(Sequence sequence) Obtains the set of MIDI file types that the system can write from the sequence specified.
static Receiver | getReceiver() Obtains a MIDI receiver from an external MIDI port or other default source.
static Sequence | getSequence(File file) Obtains a MIDI sequence from the specified File.
static Sequence | getSequence(InputStream stream) Obtains a MIDI sequence from the specified input stream.
static Sequence | getSequence(URL url) Obtains a MIDI sequence from the specified URL.
static Sequencer | getSequencer() Obtains the default sequencer.
static Soundbank | getSoundbank(File file) Constructs a Soundbank by reading it from the specified File.
static Soundbank | getSoundbank(InputStream stream) Constructs a MIDI sound bank by reading it from the specified stream.
static Soundbank | getSoundbank(URL url) Constructs a Soundbank by reading it from the specified URL.
static Synthesizer | getSynthesizer() Obtains the default synthesizer.
static Transmitter | getTransmitter() Obtains a MIDI transmitter from an external MIDI port or other default source.
static boolean | isFileTypeSupported(int fileType) Indicates whether file writing support for the specified MIDI file type is provided by the system.
static boolean | isFileTypeSupported(int fileType, Sequence sequence) Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
static int | write(Sequence in, int type, File out) Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
static int | write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getMidiDeviceInfo

public static MidiDevice.Info[] getMidiDeviceInfo()
Obtains an array of information objects representing the set of all MIDI devices available on the system. A returned information object can then be used to obtain the corresponding device object, by invoking getMidiDevice.
Returns:
an array of MidiDevice.Info objects, one for each installed MIDI device. If no such devices are installed, an array of length 0 is returned.

getMidiDevice

public static MidiDevice getMidiDevice(MidiDevice.Info info)
                                throws MidiUnavailableException
Obtains the requested MIDI device.
Parameters:
info - a device information object representing the desired device.
Returns:
the requested device
Throws:
MidiUnavailableException - if the requested device is not available due to resource restrictions
IllegalArgumentException - if the info object does not represent a MIDI device installed on the system
See Also:
getMidiDeviceInfo()

getReceiver

public static Receiver getReceiver()
                            throws MidiUnavailableException
Obtains a MIDI receiver from an external MIDI port or other default source.
Returns:
the default MIDI receiver
Throws:
MidiUnavailableException - if the default receiver is not available due to resource restrictions

getTransmitter

public static Transmitter getTransmitter()
                                  throws MidiUnavailableException
Obtains a MIDI transmitter from an external MIDI port or other default source.
Returns:
the default MIDI transmitter
Throws:
MidiUnavailableException - if the default transmitter is not available due to resource restrictions

getSynthesizer

public static Synthesizer getSynthesizer()
                                  throws MidiUnavailableException
Obtains the default synthesizer.
Returns:
the default synthesizer
Throws:
MidiUnavailableException - if the synthesizer is not available due to resource restrictions

getSequencer

public static Sequencer getSequencer()
                              throws MidiUnavailableException
Obtains the default sequencer.
Returns:
the default sequencer
Throws:
MidiUnavailableException - if the sequencer is not available due to resource restrictions

getSoundbank

public static Soundbank getSoundbank(InputStream stream)
                              throws InvalidMidiDataException,
                                     IOException
Constructs a MIDI sound bank by reading it from the specified stream. The stream must point to a valid MIDI soundbank file. In general, MIDI soundbank providers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
Parameters:
stream - the source of the sound bank data.
Returns:
the sound bank
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI soundbank data recognized by the system
IOException - if an I/O error occurred when loading the soundbank
See Also:
InputStream.markSupported(), InputStream.mark(int)

getSoundbank

public static Soundbank getSoundbank(URL url)
                              throws InvalidMidiDataException,
                                     IOException
Constructs a Soundbank by reading it from the specified URL. The URL must point to a valid MIDI soundbank file.
Parameters:
url - the source of the sound bank data
Returns:
the sound bank
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI soundbank data recognized by the system
IOException - if an I/O error occurred when loading the soundbank

getSoundbank

public static Soundbank getSoundbank(File file)
                              throws InvalidMidiDataException,
                                     IOException
Constructs a Soundbank by reading it from the specified File. The File must point to a valid MIDI soundbank file.
Parameters:
file - the source of the sound bank data
Returns:
the sound bank
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI soundbank data recognized by the system
IOException - if an I/O error occurred when loading the soundbank

getMidiFileFormat

public static MidiFileFormat getMidiFileFormat(InputStream stream)
                                        throws InvalidMidiDataException,
                                               IOException
Obtains the MIDI file format of the data in the specified input stream. The stream must point to valid MIDI file data for a file type recognized by the system.

This method and/or the code it invokes may need to read some data from the stream to determine whether its data format is supported. The implementation may therefore need to mark the stream, read enough data to determine whether it is in a supported format, and reset the stream's read pointer to its original position. If the input stream does not permit this set of operations, this method may fail with an IOException.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while determining the file format.

Parameters:
stream - the input stream from which file format information should be extracted
Returns:
an MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs while accessing the stream
See Also:
getMidiFileFormat(URL), getMidiFileFormat(File), InputStream.markSupported(), InputStream.mark(int)

getMidiFileFormat

public static MidiFileFormat getMidiFileFormat(URL url)
                                        throws InvalidMidiDataException,
                                               IOException
Obtains the MIDI file format of the data in the specified URL. The URL must point to valid MIDI file data for a file type recognized by the system.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while determining the file format.

Parameters:
url - the URL from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs while accessing the URL
See Also:
getMidiFileFormat(InputStream), getMidiFileFormat(File)

getMidiFileFormat

public static MidiFileFormat getMidiFileFormat(File file)
                                        throws InvalidMidiDataException,
                                               IOException
Obtains the MIDI file format of the specified File. The File must point to valid MIDI file data for a file type recognized by the system.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while determining the file format.

Parameters:
file - the File from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs while accessing the file
See Also:
getMidiFileFormat(InputStream), getMidiFileFormat(URL)

getSequence

public static Sequence getSequence(InputStream stream)
                            throws InvalidMidiDataException,
                                   IOException
Obtains a MIDI sequence from the specified input stream. The stream must point to valid MIDI file data for a file type recognized by the system.

This method and/or the code it invokes may need to read some data from the stream to determine whether its data format is supported. The implementation may therefore need to mark the stream, read enough data to determine whether it is in a supported format, and reset the stream's read pointer to its original position. If the input stream does not permit this set of operations, this method may fail with an IOException.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while constructing the Sequence object from the file data.

Parameters:
stream - the input stream from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data contained in the input stream
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs while accessing the stream
See Also:
InputStream.markSupported(), InputStream.mark(int)

getSequence

public static Sequence getSequence(URL url)
                            throws InvalidMidiDataException,
                                   IOException
Obtains a MIDI sequence from the specified URL. The URL must point to valid MIDI file data for a file type recognized by the system.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while constructing the Sequence object from the file data.

Parameters:
url - the URL from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the URL
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs while accessing the URL

getSequence

public static Sequence getSequence(File file)
                            throws InvalidMidiDataException,
                                   IOException
Obtains a MIDI sequence from the specified File. The File must point to valid MIDI file data for a file type recognized by the system.

This operation can only succeed for files of a type which can be parsed by an installed file reader. It may fail with an InvalidMidiDataException even for valid files if no compatible file reader is installed. It will also fail with an InvalidMidiDataException if a compatible file reader is installed, but encounters errors while constructing the Sequence object from the file data.

Parameters:
file - the File from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the File
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getMidiFileTypes

public static int[] getMidiFileTypes()
Obtains the set of MIDI file types for which file writing support is provided by the system.
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

isFileTypeSupported

public static boolean isFileTypeSupported(int fileType)
Indicates whether file writing support for the specified MIDI file type is provided by the system.
Parameters:
fileType - the file type for which write capabilities are queried
Returns:
true if the file type is supported, otherwise false

getMidiFileTypes

public static int[] getMidiFileTypes(Sequence sequence)
Obtains the set of MIDI file types that the system can write from the sequence specified.
Parameters:
sequence - the sequence for which MIDI file type support is queried
Returns:
the set of supported file types. If no file types are supported, returns an array of length 0.

isFileTypeSupported

public static boolean isFileTypeSupported(int fileType,
                                          Sequence sequence)
Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
Parameters:
fileType - the file type for which write capabilities are queried
sequence - the sequence for which file writing support is queried
Returns:
true if the file type is supported for this sequence, otherwise false

write

public static int write(Sequence in,
                        int fileType,
                        OutputStream out)
                 throws IOException
Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.
Parameters:
in - sequence containing MIDI data to be written to the file
fileType - the file type of the file to be written to the output stream
out - stream to which the file data should be written
Returns:
the number of bytes written to the output stream
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file format is not supported by the system
See Also:
isFileTypeSupported(int, Sequence), getMidiFileTypes(Sequence)

write

public static int write(Sequence in,
                        int type,
                        File out)
                 throws IOException
Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
Parameters:
in - sequence containing MIDI data to be written to the file
fileType - the file type of the file to be written to the output stream
out - external file to which the file data should be written
Returns:
the number of bytes written to the file
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file type is not supported by the system
See Also:
isFileTypeSupported(int, Sequence), getMidiFileTypes(Sequence)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiUnavailableException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class MidiUnavailableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.sound.midi.MidiUnavailableException
All Implemented Interfaces:
Serializable
public class MidiUnavailableException
extends Exception

A MidiUnavailableException is thrown when a requested MIDI component cannot be opened or created because it is unavailable. This often occurs when a device is in use by another application. More generally, it can occur when there is a finite number of a certain kind of resource that can be used for some purpose, and all of them are already in use (perhaps all by this application). For an example of the latter case, see the setReceiver method of Transmitter.

See Also:
Serialized Form

Constructor Summary
MidiUnavailableException()
Constructs a MidiUnavailableException that has null as its error detail message.
MidiUnavailableException(String message)
Constructs a MidiUnavailableException with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MidiUnavailableException

public MidiUnavailableException()
Constructs a MidiUnavailableException that has null as its error detail message.

MidiUnavailableException

public MidiUnavailableException(String message)
Constructs a MidiUnavailableException with the specified detail message.
Parameters:
message - the string to display as an error detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Patch

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class Patch

java.lang.Object
  |
  +--javax.sound.midi.Patch
public class Patch
extends Object

A Patch object represents a location, on a MIDI synthesizer, into which a single instrument is stored (loaded). Every Instrument object has its own Patch object that specifies the memory location into which that instrument should be loaded. The location is specified abstractly by a bank index and a program number (not by any scheme that directly refers to a specific address or offset in RAM). This is a hierarchical indexing scheme: MIDI provides for up to 128 banks, each of which contains up to 128 program locations. For example, a minimal sort of synthesizer might have only one bank of instruments, and only 32 instruments (programs) in that bank.

To select what instrument should play the notes on a particular MIDI channel, two kinds of MIDI message are used that specify a patch location: a bank-select command, and a program-change channel command. The Java Sound equivalent is the programChange(int, int) method of MidiChannel.

See Also:
Instrument,
Instrument.getPatch(),
MidiChannel.programChange(int, int),
Synthesizer.loadInstruments(Soundbank, Patch[]),
Soundbank,
Sequence.getPatchList()

Constructor Summary
Patch(int bank, int program)
Constructs a new patch object from the specified bank and program numbers (which should be in the range from 0 to 127).
Method Summary
int | getBank() Returns the number of the bank that contains the instrument whose location this Patch specifies.
int | getProgram() Returns the index, within a bank, of the instrument whose location this Patch specifies.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Patch

public Patch(int bank,
             int program)
Constructs a new patch object from the specified bank and program numbers (which should be in the range from 0 to 127).
Parameters:
bank - the bank index
program - the program index
Method Detail

getBank

public int getBank()
Returns the number of the bank that contains the instrument whose location this Patch specifies.
Returns:
the bank number, whose range is from 0 to 127
See Also:
MidiChannel.programChange(int, int)

getProgram

public int getProgram()
Returns the index, within a bank, of the instrument whose location this Patch specifies.
Returns:
the instrument's program number, whose range is from 0 to 127
See Also:
MidiChannel.getProgram(),
MidiChannel.programChange(int),
MidiChannel.programChange(int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Receiver

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface Receiver

public interface Receiver

A Receiver receives MidiEvent objects and typically does something useful in response, such as interpreting them to generate sound or raw MIDI output. Common MIDI receivers include synthesizers and MIDI Out ports.

See Also:
MidiDevice, Synthesizer, Transmitter

Method Summary
void | close() Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.
void | send(MidiMessage message, long timeStamp) Sends a MIDI message and time-stamp to this receiver.

Method Detail

send

public void send(MidiMessage message,
                 long timeStamp)
Sends a MIDI message and time-stamp to this receiver. If time-stamping is not supported by this receiver, the time-stamp value should be -1.
Parameters:
message - the MIDI message to send
time-stamp - the time-stamp for the message, in microseconds.
Throws:
IllegalStateException - if the receiver is not open

close

public void close()
Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available. Invoking methods on a receiver which has been closed may cause an IllegalArgumentException or other exception to be thrown.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sequence

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class Sequence

java.lang.Object
  |
  +--javax.sound.midi.Sequence
public class Sequence
extends Object

A Sequence is a data structure containing musical information (often an entire song or composition) that can be played back by a Sequencer object. Specifically, the Sequence contains timing information and one or more tracks. Each track consists of a series of MIDI events (such as note-ons, note-offs, program changes, and meta-events). The sequence's timing information specifies the type of unit that is used to time-stamp the events in the sequence.

A Sequence can be created from a MIDI file by reading the file into an input stream and invoking one of the getSequence methods of MidiSystem. A sequence can also be built from scratch by adding new Tracks to an empty Sequence, and adding MidiEvent objects to these Tracks.

See Also:
Sequencer.setSequence(java.io.InputStream stream),
Sequencer.setSequence(Sequence sequence),
Track.add(MidiEvent),
MidiFileFormat

Field Summary
protected float | divisionType The timing division type of the sequence.
static float | PPQ The tempo-based timing type, for which the resolution is expressed in pulses (ticks) per quarter note.
protected int | resolution The timing resolution of the sequence.
static float | SMPTE_24 The SMPTE-based timing type with 24 frames per second (resolution is expressed in ticks per frame).
static float | SMPTE_25 The SMPTE-based timing type with 25 frames per second (resolution is expressed in ticks per frame).
static float | SMPTE_30 The SMPTE-based timing type with 30 frames per second (resolution is expressed in ticks per frame).
static float | SMPTE_30DROP The SMPTE-based timing type with 29.97 frames per second (resolution is expressed in ticks per frame).
protected Vector | tracks The MIDI tracks in this sequence.
Constructor Summary
Sequence(float divisionType, int resolution)
Constructs a new MIDI sequence with the specified timing division type and timing resolution.
Sequence(float divisionType, int resolution, int numTracks)
Constructs a new MIDI sequence with the specified timing division type, timing resolution, and number of tracks.
Method Summary
Track | createTrack() Creates a new, initially empty track as part of this sequence.
boolean | deleteTrack(Track track) Removes the specified track from the sequence.
float | getDivisionType() Obtains the timing division type for this sequence.
long | getMicrosecondLength() Obtains the duration of this sequence, expressed in microseconds.
Patch[] | getPatchList() Obtains a list of patches referenced in this sequence.
int | getResolution() Obtains the timing resolution for this sequence.
long | getTickLength() Obtains the duration of this sequence, expressed in MIDI ticks.
Track[] | getTracks() Obtains an array containing all the tracks in this sequence.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PPQ

public static final float PPQ
The tempo-based timing type, for which the resolution is expressed in pulses (ticks) per quarter note.
See Also:
Sequence(float, int)

SMPTE_24

public static final float SMPTE_24
The SMPTE-based timing type with 24 frames per second (resolution is expressed in ticks per frame).
See Also:
Sequence(float, int)

SMPTE_25

public static final float SMPTE_25
The SMPTE-based timing type with 25 frames per second (resolution is expressed in ticks per frame).
See Also:
Sequence(float, int)

SMPTE_30DROP

public static final float SMPTE_30DROP
The SMPTE-based timing type with 29.97 frames per second (resolution is expressed in ticks per frame).
See Also:
Sequence(float, int)

SMPTE_30

public static final float SMPTE_30
The SMPTE-based timing type with 30 frames per second (resolution is expressed in ticks per frame).
See Also:
Sequence(float, int)

divisionType

protected float divisionType
The timing division type of the sequence.
See Also:
PPQ, SMPTE_24, SMPTE_25, SMPTE_30DROP, SMPTE_30, getDivisionType()

resolution

protected int resolution
The timing resolution of the sequence.
See Also:
getResolution()

tracks

protected Vector tracks
The MIDI tracks in this sequence.
See Also:
getTracks()
Constructor Detail

Sequence

public Sequence(float divisionType,
                int resolution)
         throws InvalidMidiDataException
Constructs a new MIDI sequence with the specified timing division type and timing resolution. The division type must be one of the recognized MIDI timing types. For tempo-based timing, divisionType is PPQ (pulses per quarter note) and the resolution is specified in ticks per beat. For SMTPE timing, divisionType specifies the number of frames per second and the resolution is specified in ticks per frame. The sequence will contain no initial tracks. Tracks may be added to or removed from the sequence using createTrack() and deleteTrack(javax.sound.midi.Track).
Parameters:
divisionType - the timing division type (PPQ or one of the SMPTE types)
resolution - the timing resolution
Throws:
InvalidMidiDataException - if divisionType is not valid
See Also:
PPQ, SMPTE_24, SMPTE_25, SMPTE_30DROP, SMPTE_30, getDivisionType(), getResolution(), getTracks()

Sequence

public Sequence(float divisionType,
                int resolution,
                int numTracks)
         throws InvalidMidiDataException
Constructs a new MIDI sequence with the specified timing division type, timing resolution, and number of tracks. The division type must be one of the recognized MIDI timing types. For tempo-based timing, divisionType is PPQ (pulses per quarter note) and the resolution is specified in ticks per beat. For SMTPE timing, divisionType specifies the number of frames per second and the resolution is specified in ticks per frame. The sequence will be initialized with the number of tracks specified by numTracks. These tracks are initially empty. The tracks may be retrieved for editing using the getTracks() method. Additional tracks may be added, or existing tracks removed, using createTrack() and deleteTrack(javax.sound.midi.Track).
Parameters:
divisionType - the timing division type (PPQ or one of the SMPTE types)
resolution - the timing resolution
numTracks - the initial number of tracks in the sequence.
Throws:
InvalidMidiDataException - if divisionType is not valid
See Also:
PPQ, SMPTE_24, SMPTE_25, SMPTE_30DROP, SMPTE_30, getDivisionType(), getResolution()
Method Detail

getDivisionType

public float getDivisionType()
Obtains the timing division type for this sequence.
Returns:
the division type (PPQ or one of the SMPTE types)
See Also:
PPQ, SMPTE_24, SMPTE_25, SMPTE_30DROP, SMPTE_30, Sequence(float, int), MidiFileFormat.getDivisionType()

getResolution

public int getResolution()
Obtains the timing resolution for this sequence. If the sequence's division type is PPQ, the resolution is specified in ticks per beat. For SMTPE timing, the resolution is specified in ticks per frame.
Returns:
the number of ticks per beat (PPQ) or per frame (SMPTE)
See Also:
getDivisionType(),
Sequence(float, int),
MidiFileFormat.getResolution()

createTrack

public Track createTrack()
Creates a new, initially empty track as part of this sequence. The newly created track is returned. All tracks in the sequence may be retrieved using getTracks(). Tracks may be removed from the sequence using deleteTrack(javax.sound.midi.Track).
Returns:
the newly created track

deleteTrack

public boolean deleteTrack(Track track)
Removes the specified track from the sequence.
Parameters:
track - the track to remove
Returns:
true if the track existed in the track and was removed, otherwise false.
See Also:
createTrack(), getTracks()

getTracks

public Track[] getTracks()
Obtains an array containing all the tracks in this sequence. If the sequence contains no tracks, an array of length 0 is returned.
Returns:
the array of tracks
See Also:
createTrack(), deleteTrack(javax.sound.midi.Track)

getMicrosecondLength

public long getMicrosecondLength()
Obtains the duration of this sequence, expressed in microseconds.
Returns:
this sequence's duration in microseconds.

getTickLength

public long getTickLength()
Obtains the duration of this sequence, expressed in MIDI ticks.
Returns:
this sequence's length in ticks
See Also:
getMicrosecondLength()

getPatchList

public Patch[] getPatchList()
Obtains a list of patches referenced in this sequence. This patch list may be used to load the required Instrument objects into a Synthesizer.
Returns:
an array of Patch objects used in this sequence
See Also:
Synthesizer.loadInstruments(Soundbank, Patch[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sequencer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface Sequencer

All Superinterfaces:
MidiDevice
public interface Sequencer
extends MidiDevice

A hardware or software device that plays back a MIDI sequence is known as a sequencer. A MIDI sequence contains lists of time-stamped MIDI data, such as might be read from a standard MIDI file. Most sequencers also provide functions for creating and editing sequences.

The Sequencer interface includes methods for the following basic MIDI sequencer operations:

  • obtaining a sequence from MIDI file data
  • starting and stopping playback
  • moving to an arbitrary position in the sequence
  • changing the tempo (speed) of playback
  • synchronizing playback to an internal clock or to received MIDI messages
  • controlling the timing of another device
In addition, the following operations are supported, either directly, or indirectly through objects that the Sequencer has access to:
  • editing the data by adding or deleting individual MIDI events or entire tracks
  • muting or soloing individual tracks in the sequence
  • notifying listener objects about any meta-events or control-change events encountered while playing back the sequence.

See Also:
Sequencer.SyncMode, addMetaEventListener(javax.sound.midi.MetaEventListener), ControllerEventListener, Receiver, Transmitter, MidiDevice

Inner Class Summary
static class Sequencer.SyncMode
A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device.
Inner classes inherited from class javax.sound.midi.MidiDevice
MidiDevice.Info
Method Summary
int[] | addControllerEventListener(ControllerEventListener listener, int[] controllers) Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types.
boolean | addMetaEventListener(MetaEventListener listener) Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer.
Sequencer.SyncMode | getMasterSyncMode() Obtains the current master synchronization mode for this sequencer.
Sequencer.SyncMode[] | getMasterSyncModes() Obtains the set of master synchronization modes supported by this sequencer.
long | getMicrosecondLength() Obtains the length of the current sequence, expressed in microseconds.
long | getMicrosecondPosition() Obtains the current position in the sequence, expressed in microseconds.
Sequence | getSequence() Obtains the sequence on which the Sequencer is currently operating.
Sequencer.SyncMode | getSlaveSyncMode() Obtains the current slave synchronization mode for this sequencer.
Sequencer.SyncMode[] | getSlaveSyncModes() Obtains the set of slave synchronization modes supported by the sequencer.
float | getTempoFactor() Returns the current tempo factor for the sequencer.
float | getTempoInBPM() Obtains the current tempo, expressed in beats per minute.
float | getTempoInMPQ() Obtains the current tempo, expressed in microseconds per quarter note.
long | getTickLength() Obtains the length of the current sequence, expressed in MIDI ticks.
long | getTickPosition() Obtains the current position in the sequence, expressed in MIDI ticks.
boolean | getTrackMute(int track) Obtains the current mute state for a track.
boolean | getTrackSolo(int track) Obtains the current solo state for a track.
boolean | isRecording() Indicates whether the Sequencer is currently recording.
boolean | isRunning() Indicates whether the Sequencer is currently running.
void | recordDisable(Track track) Disables recording to the specified track.
void | recordEnable(Track track, int channel) Prepares the specified track for recording events received on a particular channel.
int[] | removeControllerEventListener(ControllerEventListener listener, int[] controllers) Removes a controller event listener's interest in one or more types of controller event.
void | removeMetaEventListener(MetaEventListener listener) Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered.
void | setMasterSyncMode(Sequencer.SyncMode sync) Sets the source of timing information used by this sequencer.
void | setMicrosecondPosition(long microseconds) Sets the current position in the sequence, expressed in microseconds
void | setSequence(InputStream stream) Sets the current sequence on which the sequencer operates.
void | setSequence(Sequence sequence) Sets the current sequence on which the sequencer operates.
void | setSlaveSyncMode(Sequencer.SyncMode sync) Sets the slave synchronization mode for the sequencer.
void | setTempoFactor(float factor) Scales the sequencer's actual playback tempo by the factor provided.
void | setTempoInBPM(float bpm) Sets the tempo in beats per minute.
void | setTempoInMPQ(float mpq) Sets the tempo in microseconds per quarter note.
void | setTickPosition(long tick) Sets the current sequencer position in MIDI ticks
void | setTrackMute(int track, boolean mute) Sets the mute state for a track.
void | setTrackSolo(int track, boolean solo) Sets the solo state for a track.
void | start() Starts playback of the MIDI data in the currently loaded sequence.
void | startRecording() Starts recording and playback of MIDI data.
void | stop() Stops recording, if active, and playback of the currently loaded sequence, if any.
void | stopRecording() Stops recording, if active.
Methods inherited from interface javax.sound.midi.MidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getReceiver, getTransmitter, isOpen, open

Method Detail

setSequence

public void setSequence(Sequence sequence)
                 throws InvalidMidiDataException
Sets the current sequence on which the sequencer operates.
Parameters:
sequence - the sequence to be loaded.
Throws:
InvalidMidiDataException - if the sequence contains invalid MIDI data, or is not supported.

setSequence

public void setSequence(InputStream stream)
                 throws IOException,
                        InvalidMidiDataException
Sets the current sequence on which the sequencer operates. The stream must point to MIDI file data.
Parameters:
stream - stream containing MIDI file data.
Throws:
IOException - if an I/O exception occurs during reading of the stream.
InvalidMidiDataException - if invalid data is encountered in the stream, or the stream is not supported.

getSequence

public Sequence getSequence()
Obtains the sequence on which the Sequencer is currently operating.
Returns:
the current sequence, or null if no sequence is currently set.

start

public void start()
Starts playback of the MIDI data in the currently loaded sequence.
See Also:
start(), stop()

stop

public void stop()
Stops recording, if active, and playback of the currently loaded sequence, if any.
See Also:
start(), isRunning()

isRunning

public boolean isRunning()
Indicates whether the Sequencer is currently running. The default is false. The Sequencer starts running when either start() or startRecording() is called. isRunning then returns true until playback of the sequence completes or stop() is called.
Returns:
true if the Sequencer is running, otherwise false

startRecording

public void startRecording()
Starts recording and playback of MIDI data. Data is recorded to all enabled tracks, on the channel(s) for which they were enabled. Recording begins at the current position of the sequencer. Any events already in the track are overwritten for the duration of the recording session. Events from the currently loaded sequence, if any, are delivered to the sequencer's MIDI OUT receiver(s) along with messages received during recording.

Note that tracks are not by default enabled for recording. In order to record MIDI data, at least one track must be specifically enabled for recording.

See Also:
startRecording(),
recordEnable(javax.sound.midi.Track, int),
recordDisable(javax.sound.midi.Track)

stopRecording

public void stopRecording()
Stops recording, if active. Playback of the current sequence continues.
See Also:
startRecording(), isRecording()

isRecording

public boolean isRecording()
Indicates whether the Sequencer is currently recording. The default is false. The Sequencer begins recording when startRecording() is called, and then returns true until stop() or stopRecording() is called.
Returns:
true if the Sequencer is recording, otherwise false

recordEnable

public void recordEnable(Track track,
                         int channel)
Prepares the specified track for recording events received on a particular channel. Once enabled, a track will receive events when recording is active.
Parameters:
track - the track to which events will be recorded
channel - the channel on which events will be received. If -1 is specified for the channel value, the track will receive data from all channels.
Throws:
IllegalArgumentException - thrown if the track is not part of the current sequence.

recordDisable

public void recordDisable(Track track)
Disables recording to the specified track. Events will no longer be recorded into this track.
Parameters:
track - the track to disable for recording, or null to disable recording for all tracks.

getTempoInBPM

public float getTempoInBPM()
Obtains the current tempo, expressed in beats per minute. The actual tempo of playback is the product of the returned value and the tempo factor.
Returns:
the current tempo in beats per minute
See Also:
getTempoFactor(), setTempoInBPM(float), getTempoInMPQ()

setTempoInBPM

public void setTempoInBPM(float bpm)
Sets the tempo in beats per minute. The actual tempo of playback is the product of the specified value and the tempo factor.
Parameters:
bpm - desired new tempo in beats per minute
See Also:
getTempoFactor(), setTempoInMPQ(float), getTempoInBPM()

getTempoInMPQ

public float getTempoInMPQ()
Obtains the current tempo, expressed in microseconds per quarter note. The actual tempo of playback is the product of the returned value and the tempo factor.
Returns:
the current tempo in microseconds per quarter note
See Also:
getTempoFactor(), setTempoInMPQ(float), getTempoInBPM()

setTempoInMPQ

public void setTempoInMPQ(float mpq)
Sets the tempo in microseconds per quarter note. The actual tempo of playback is the product of the specified value and the tempo factor.
Parameters:
mpq - desired new tempo in microseconds per quarter note.
See Also:
getTempoFactor(), setTempoInBPM(float), getTempoInMPQ()

setTempoFactor

public void setTempoFactor(float factor)
Scales the sequencer's actual playback tempo by the factor provided. The default is 1.0. A value of 1.0 represents the natural rate (the tempo specified in the sequence), 2.0 means twice as fast, etc. The tempo factor does not affect the values returned by getTempoInMPQ() and getTempoInBPM(). Those values indicate the tempo prior to scaling.

Note that the tempo factor cannot be adjusted when external synchronization is used. In that situation, setTempoFactor always sets the tempo factor to 1.0.

Parameters:
factor - the requested tempo scalar
See Also:
getTempoFactor()

getTempoFactor

public float getTempoFactor()
Returns the current tempo factor for the sequencer. The default is 1.0.
Returns:
tempo factor.
See Also:
setTempoFactor(float)

getTickLength

public long getTickLength()
Obtains the length of the current sequence, expressed in MIDI ticks.
Returns:
length of the sequence in ticks

getTickPosition

public long getTickPosition()
Obtains the current position in the sequence, expressed in MIDI ticks. (The duration of a tick in seconds is determined both by the tempo and by the timing resolution stored in the Sequence.)
Returns:
current tick
See Also:
setTickPosition(long)

setTickPosition

public void setTickPosition(long tick)
Sets the current sequencer position in MIDI ticks
Parameters:
tick - the desired tick position
See Also:
getTickPosition()

getMicrosecondLength

public long getMicrosecondLength()
Obtains the length of the current sequence, expressed in microseconds.
Returns:
length of the sequence in microseconds

getMicrosecondPosition

public long getMicrosecondPosition()
Obtains the current position in the sequence, expressed in microseconds.
Specified by:
getMicrosecondPosition in interface MidiDevice
Returns:
the current position in microseconds
See Also:
setMicrosecondPosition(long)

setMicrosecondPosition

public void setMicrosecondPosition(long microseconds)
Sets the current position in the sequence, expressed in microseconds
Parameters:
microseconds - desired position in microseconds
See Also:
getMicrosecondPosition()

setMasterSyncMode

public void setMasterSyncMode(Sequencer.SyncMode sync)
Sets the source of timing information used by this sequencer. The sequencer synchronizes to the master, which is the internal clock, MIDI clock, or MIDI time code, depending on the value of sync. The sync argument must be one of the supported modes, as returned by getMasterSyncModes().
Parameters:
sync - the desired master synchronization mode
See Also:
Sequencer.SyncMode.INTERNAL_CLOCK, Sequencer.SyncMode.MIDI_SYNC, Sequencer.SyncMode.MIDI_TIME_CODE, getMasterSyncMode()

getMasterSyncMode

public Sequencer.SyncMode getMasterSyncMode()
Obtains the current master synchronization mode for this sequencer.
Returns:
the current master synchronization mode
See Also:
setMasterSyncMode(Sequencer.SyncMode), getMasterSyncModes()

getMasterSyncModes

public Sequencer.SyncMode[] getMasterSyncModes()
Obtains the set of master synchronization modes supported by this sequencer.
Returns:
the available master synchronization modes
See Also:
Sequencer.SyncMode.INTERNAL_CLOCK, Sequencer.SyncMode.MIDI_SYNC, Sequencer.SyncMode.MIDI_TIME_CODE, getMasterSyncMode(), setMasterSyncMode(Sequencer.SyncMode)

setSlaveSyncMode

public void setSlaveSyncMode(Sequencer.SyncMode sync)
Sets the slave synchronization mode for the sequencer. This indicates the type of timing information sent by the sequencer to its receiver. The sync argument must be one of the supported modes, as returned by getSlaveSyncModes().
Parameters:
sync - the desired slave synchronization mode
See Also:
Sequencer.SyncMode.MIDI_SYNC, Sequencer.SyncMode.MIDI_TIME_CODE, Sequencer.SyncMode.NO_SYNC, getSlaveSyncModes()

getSlaveSyncMode

public Sequencer.SyncMode getSlaveSyncMode()
Obtains the current slave synchronization mode for this sequencer.
Returns:
the current slave synchronization mode
See Also:
setSlaveSyncMode(Sequencer.SyncMode), getSlaveSyncModes()

getSlaveSyncModes

public Sequencer.SyncMode[] getSlaveSyncModes()
Obtains the set of slave synchronization modes supported by the sequencer.
Returns:
the available slave synchronization modes
See Also:
Sequencer.SyncMode.MIDI_SYNC, Sequencer.SyncMode.MIDI_TIME_CODE, Sequencer.SyncMode.NO_SYNC

setTrackMute

public void setTrackMute(int track,
                         boolean mute)
Sets the mute state for a track. This method may fail for a number of reasons. For example, the track number specified may not be valid for the current sequence, or the sequencer may not support this functionality. An application which needs to verify whether this operation succeeded should follow this call with a call to getTrackMute(int).
Parameters:
track - the track number. Tracks in the current sequence are numbered from 0 to the number of tracks in the sequence minus 1.
mute - the new mute state for the track. true implies the track should be muted, false implies the track should be unmuted.
See Also:
getSequence()

getTrackMute

public boolean getTrackMute(int track)
Obtains the current mute state for a track. The default mute state for all tracks which have not been muted is false. In any case where the specified track has not been muted, this method should return false. This applies if the sequencer does not support muting of tracks, and if the specified track index is not valid.
Parameters:
track - the track number. Tracks in the current sequence are numbered from 0 to the number of tracks in the sequence minus 1.
Returns:
true if muted, false if not.

setTrackSolo

public void setTrackSolo(int track,
                         boolean solo)
Sets the solo state for a track. If solo is true only this track and other solo'd tracks will sound. If solo is false then only other solo'd tracks will sound, unless no tracks are solo'd in which case all un-muted tracks will sound.

This method may fail for a number of reasons. For example, the track number specified may not be valid for the current sequence, or the sequencer may not support this functionality. An application which needs to verify whether this operation succeeded should follow this call with a call to getTrackSolo(int).

Parameters:
track - the track number. Tracks in the current sequence are numbered from 0 to the number of tracks in the sequence minus 1.
solo - the new solo state for the track. true implies the track should be solo'd, false implies the track should not be solo'd.
See Also:
getSequence()

getTrackSolo

public boolean getTrackSolo(int track)
Obtains the current solo state for a track. The default mute state for all tracks which have not been solo'd is false. In any case where the specified track has not been solo'd, this method should return false. This applies if the sequencer does not support soloing of tracks, and if the specified track index is not valid.
Parameters:
track - the track number. Tracks in the current sequence are numbered from 0 to the number of tracks in the sequence minus 1.
Returns:
true if solo'd, false if not.

addMetaEventListener

public boolean addMetaEventListener(MetaEventListener listener)
Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer. This method can fail if, for instance,this class of sequencer does not support meta-event notification.
Parameters:
listener - listener to add
Returns:
true if the listener was successfully added, otherwise false
See Also:
removeMetaEventListener(javax.sound.midi.MetaEventListener), MetaEventListener, MetaMessage

removeMetaEventListener

public void removeMetaEventListener(MetaEventListener listener)
Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered.
Parameters:
listener - the meta-event listener to remove
See Also:
addMetaEventListener(javax.sound.midi.MetaEventListener)

addControllerEventListener

public int[] addControllerEventListener(ControllerEventListener listener,
                                        int[] controllers)
Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types. The types are specified by the controllers argument, which should contain an array of MIDI controller numbers. (Each number should be between 0 and 127, inclusive. See the MIDI 1.0 Specification for the numbers that correspond to various types of controllers.)

The returned array contains the MIDI controller numbers for which the listener will now receive events. Some sequencers might not support controller event notification, in which case the array has a length of 0. Other sequencers might support notification for some controllers but not all. This method may be invoked repeatedly. Each time, the returned array indicates all the controllers that the listener will be notified about, not only the controllers requested in that particular invocation.

Parameters:
listener - the controller event listener to add to the list of registered listeners
controllers - the MIDI controller numbers for which change notification is requested
Returns:
the numbers of all the MIDI controllers whose changes will now be reported to the specified listener
See Also:
removeControllerEventListener(javax.sound.midi.ControllerEventListener, int[]), ControllerEventListener

removeControllerEventListener

public int[] removeControllerEventListener(ControllerEventListener listener,
                                           int[] controllers)
Removes a controller event listener's interest in one or more types of controller event. The controllers argument is an array of MIDI numbers corresponding to the controllers for which the listener should no longer receive change notifications. To completely remove this listener from the list of registered listeners, pass in null for controllers. The returned array contains the MIDI controller numbers for which the listener will now receive events. The array has a length of 0 if the listener will not receive change notifications for any controllers.
Parameters:
listener - old listener
controllers - the MIDI controller numbers for which change notification should be cancelled, or null to cancel for all controllers
Returns:
the numbers of all the MIDI controllers whose changes will now be reported to the specified listener
See Also:
addControllerEventListener(javax.sound.midi.ControllerEventListener, int[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortMessage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class ShortMessage

java.lang.Object
  |
  +--javax.sound.midi.MidiMessage
        |
        +--javax.sound.midi.ShortMessage
All Implemented Interfaces:
Cloneable
public class ShortMessage
extends MidiMessage

A ShortMessage contains a MIDI message that has at most two data bytes following its status byte. The types of MIDI message that satisfy this criterion are channel voice, channel mode, system common, and system real-time--in other words, everything except system exclusive and meta-events. The ShortMessage class provides methods for getting and setting the contents of the MIDI message.

A number of ShortMessage methods have integer parameters by which you specify a MIDI status or data byte. If you know the numeric value, you can express it directly. For system common and system real-time messages, you can often use the corresponding fields of ShortMessage, such as SYSTEM_RESET. For channel messages, the upper four bits of the status byte are specified by a command value and the lower four bits are specified by a MIDI channel number. To convert incoming MIDI data bytes that are in the form of Java's signed bytes, you can use the conversion code given in the MidiMessage class description.

See Also:
SysexMessage, MetaMessage

Field Summary
static int | ACTIVE_SENSING Status byte for Active Sensing message (0xFE, or 254).
static int | CHANNEL_PRESSURE Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)
static int | CONTINUE Status byte for Continue message (0xFB, or 251).
static int | CONTROL_CHANGE Command value for Control Change message (0xB0, or 176)
static int | END_OF_EXCLUSIVE Status byte for End of System Exclusive message (0xF7, or 247).
static int | MIDI_TIME_CODE Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).
static int | NOTE_OFF Command value for Note Off message (0x80, or 128)
static int | NOTE_ON Command value for Note On message (0x90, or 144)
static int | PITCH_BEND Command value for Pitch Bend message (0xE0, or 224)
static int | POLY_PRESSURE Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 128)
static int | PROGRAM_CHANGE Command value for Program Change message (0xC0, or 192)
static int | SONG_POSITION_POINTER Status byte for Song Position Pointer message (0xF2, or 242).
static int | SONG_SELECT Status byte for MIDI Song Select message (0xF3, or 243).
static int | START Status byte for Start message (0xFA, or 250).
static int | STOP Status byte for Stop message (0xFC, or 252).
static int | SYSTEM_RESET Status byte for System Reset message (0xFF, or 255).
static int | TIMING_CLOCK Status byte for Timing Clock messagem (0xF8, or 248).
static int | TUNE_REQUEST Status byte for Tune Request message (0xF6, or 246).
Fields inherited from class javax.sound.midi.MidiMessage
data, length
Constructor Summary
 | ShortMessage() Constructs a new ShortMessage.
protected | ShortMessage(byte[] data) Constructs a new ShortMessage.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
int | getChannel() Obtains the MIDI channel associated with this event.
int | getCommand() Obtains the MIDI command associated with this event.
int | getData1() Obtains the first data byte in the message.
int | getData2() Obtains the second data byte in the message.
protected int | getDataLength(int status) Retrieves the number of data bytes associated with a particular status byte value.
void | setMessage(int status) Sets the parameters for a MIDI message that takes no data bytes.
void | setMessage(int status, int data1, int data2) Sets the parameters for a MIDI message that takes one or two data bytes.
void | setMessage(int command, int channel, int data1, int data2) Sets the short message parameters for a channel message which takes one or two data bytes.
Methods inherited from class javax.sound.midi.MidiMessage
getLength, getMessage, getStatus, setMessage
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MIDI_TIME_CODE

public static final int MIDI_TIME_CODE
Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).
See Also:
MidiMessage.getStatus()

SONG_POSITION_POINTER

public static final int SONG_POSITION_POINTER
Status byte for Song Position Pointer message (0xF2, or 242).
See Also:
MidiMessage.getStatus()

SONG_SELECT

public static final int SONG_SELECT
Status byte for MIDI Song Select message (0xF3, or 243).
See Also:
MidiMessage.getStatus()

TUNE_REQUEST

public static final int TUNE_REQUEST
Status byte for Tune Request message (0xF6, or 246).
See Also:
MidiMessage.getStatus()

END_OF_EXCLUSIVE

public static final int END_OF_EXCLUSIVE
Status byte for End of System Exclusive message (0xF7, or 247).
See Also:
MidiMessage.getStatus()

TIMING_CLOCK

public static final int TIMING_CLOCK
Status byte for Timing Clock messagem (0xF8, or 248).
See Also:
MidiMessage.getStatus()

START

public static final int START
Status byte for Start message (0xFA, or 250).
See Also:
MidiMessage.getStatus()

CONTINUE

public static final int CONTINUE
Status byte for Continue message (0xFB, or 251).
See Also:
MidiMessage.getStatus()

STOP

public static final int STOP
Status byte for Stop message (0xFC, or 252).
See Also:
MidiMessage.getStatus()

ACTIVE_SENSING

public static final int ACTIVE_SENSING
Status byte for Active Sensing message (0xFE, or 254).
See Also:
MidiMessage.getStatus()

SYSTEM_RESET

public static final int SYSTEM_RESET
Status byte for System Reset message (0xFF, or 255).
See Also:
MidiMessage.getStatus()

NOTE_OFF

public static final int NOTE_OFF
Command value for Note Off message (0x80, or 128)

NOTE_ON

public static final int NOTE_ON
Command value for Note On message (0x90, or 144)

POLY_PRESSURE

public static final int POLY_PRESSURE
Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 128)

CONTROL_CHANGE

public static final int CONTROL_CHANGE
Command value for Control Change message (0xB0, or 176)

PROGRAM_CHANGE

public static final int PROGRAM_CHANGE
Command value for Program Change message (0xC0, or 192)

CHANNEL_PRESSURE

public static final int CHANNEL_PRESSURE
Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)

PITCH_BEND

public static final int PITCH_BEND
Command value for Pitch Bend message (0xE0, or 224)
Constructor Detail

ShortMessage

public ShortMessage()
Constructs a new ShortMessage. The contents of the new message are guaranteed to specify a valid MIDI message. Subsequently, you may set the contents of the message using one of the setMessage methods.
See Also:
setMessage(int)

ShortMessage

protected ShortMessage(byte[] data)
Constructs a new ShortMessage.
Parameters:
data - an array of bytes containing the complete message. The message data may be changed using the setMessage method.
See Also:
setMessage(int)
Method Detail

setMessage

public void setMessage(int status)
                throws InvalidMidiDataException
Sets the parameters for a MIDI message that takes no data bytes.
Parameters:
status - the MIDI status byte
Throws:
InvalidMidiDataException - if status does not specify a valid MIDI status byte for a message that requires no data bytes.
See Also:
setMessage(int, int, int), setMessage(int, int, int, int)

setMessage

public void setMessage(int status,
                       int data1,
                       int data2)
                throws InvalidMidiDataException
Sets the parameters for a MIDI message that takes one or two data bytes. If the message takes only one data byte, the value passed in for the second data byte should be 0.
Parameters:
status - the MIDI status byte
data1 - the first data byte
data2 - the second data byte
Throws:
InvalidMidiDataException - if the the status or data bytes do not specify a valid MIDI message
See Also:
setMessage(int, int, int, int), setMessage(int)

setMessage

public void setMessage(int command,
                       int channel,
                       int data1,
                       int data2)
                throws InvalidMidiDataException
Sets the short message parameters for a channel message which takes one or two data bytes. If the message only takes one data byte, the second data byte value passed should be 0.
Parameters:
command - the MIDI command represented by this message
channel - the channel associated with the message
data1 - the first data byte
data2 - the second data byte
Throws:
InvalidMidiDataException - if the parameter values do not specify a valid MIDI message
See Also:
setMessage(int, int, int),
setMessage(int),
getCommand(),
getChannel(),
getData1(),
getData2()

getChannel

public int getChannel()
Obtains the MIDI channel associated with this event. This method assumes that the event is a MIDI channel message; if not, the return value will not be meaningful.
Returns:
MIDI channel associated with the message.
See Also:
setMessage(int, int, int, int)

getCommand

public int getCommand()
Obtains the MIDI command associated with this event. This method assumes that the event is a MIDI channel message; if not, the return value will not be meaningful.
See Also:
setMessage(int, int, int, int)

getData1

public int getData1()
Obtains the first data byte in the message.
Returns:
the value of the data1 field
See Also:
setMessage(int, int, int)

getData2

public int getData2()
Obtains the second data byte in the message.
Returns:
the value of the data2 field
See Also:
setMessage(int, int, int)

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class MidiMessage
Returns:
a clone of this instance.

getDataLength

protected final int getDataLength(int status)
                           throws InvalidMidiDataException
Retrieves the number of data bytes associated with a particular status byte value.
Parameters:
status - status byte value, which must represent a short MIDI message
Returns:
data length in bytes (0, 1, or 2)
Throws:
InvalidMidiDataException - if the status argument does not represent the status byte for any short message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Soundbank

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface Soundbank

public interface Soundbank

A Soundbank contains a set of Instruments that can be loaded into a Synthesizer. Note that a Java Sound Soundbank is different from a MIDI bank. MIDI permits up to 128 banks, each containing up to 128 instruments (also sometimes called programs, patches, or timbres). However, a Soundbank can contain 128 times 128 instruments, because the instruments within a Soundbank are indexed by both a MIDI program number and a MIDI bank number (via a Patch object). Thus, a Soundbank can be thought of as a collection of MIDI banks.

Soundbank includes methods that return String objects containing the sound bank's name, manufacturer, version number, and description. The precise content and format of these strings is left to the implementor.

Different synthesizers use a variety of synthesis techniques. A common one is wavetable synthesis, in which a segment of recorded sound is played back, often with looping and pitch change. The Downloadable Sound (DLS) format uses segments of recorded sound, as does the Headspace Engine. Soundbanks and Instruments that are based on wavetable synthesis (or other uses of stored sound recordings) should typically implement the getResources() method to provide access to these recorded segments. This is optional, however; the method can return an zero-length array if the synthesis technique doesn't use sampled sound (FM synthesis and physical modeling are examples of such techniques), or if it does but the implementor chooses not to make the samples accessible.

See Also:
Synthesizer.getDefaultSoundbank(), Synthesizer.isSoundbankSupported(javax.sound.midi.Soundbank), Synthesizer.loadInstruments(Soundbank, Patch[]), Patch, Instrument, SoundbankResource

Method Summary
String | getDescription() Obtains a textual description of the sound bank, suitable for display.
Instrument | getInstrument(Patch patch) Obtains an Instrument from the given Patch.
Instrument[] | getInstruments() Obtains a list of instruments contained in this sound bank.
String | getName() Obtains the name of the sound bank.
SoundbankResource[] | getResources() Extracts a list of non-Instrument resources contained in the sound bank.
String | getVendor() Obtains a string naming the company that provides the sound bank
String | getVersion() Obtains the version string for the sound bank.

Method Detail

getName

public String getName()
Obtains the name of the sound bank.
Returns:
a String naming the sound bank

getVersion

public String getVersion()
Obtains the version string for the sound bank.
Returns:
a String that indicates the sound bank's version

getVendor

public String getVendor()
Obtains a string naming the company that provides the sound bank
Returns:
the vendor string

getDescription

public String getDescription()
Obtains a textual description of the sound bank, suitable for display.
Returns:
a String that describes the sound bank

getResources

public SoundbankResource[] getResources()
Extracts a list of non-Instrument resources contained in the sound bank.
Returns:
an array of resources, exclusing instruments. If the sound bank contains no resources (other than instruments), returns an array of length 0.

getInstruments

public Instrument[] getInstruments()
Obtains a list of instruments contained in this sound bank.
Returns:
an array of the Instruments in this SoundBank If the sound bank contains no instruments, returns an array of length 0.
See Also:
Synthesizer.getLoadedInstruments(), getInstrument(Patch)

getInstrument

public Instrument getInstrument(Patch patch)
Obtains an Instrument from the given Patch.
Parameters:
patch - a Patch object specifying the bank index and program change number
Returns:
the requested instrument, or null if the sound bank doesn't contain that instrument
See Also:
getInstruments(), Synthesizer.loadInstruments(Soundbank, Patch[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SoundbankResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class SoundbankResource

java.lang.Object
  |
  +--javax.sound.midi.SoundbankResource
Direct Known Subclasses:
Instrument
public abstract class SoundbankResource
extends Object

A SoundbankResource represents any audio resource stored in a Soundbank. Common soundbank resources include:

  • Instruments. An instrument may be specified in a variety of ways. However, all soundbanks have some mechanism for defining instruments. In doing so, they may reference other resources stored in the soundbank. Each instrument has a Patch which specifies the MIDI program and bank by which it may be referenced in MIDI messages. Instrument information may be stored in Instrument objects.
  • Audio samples. A sample typically is a sampled audio waveform which contains a short sound recording whose duration is a fraction of a second, or at most a few seconds. These audio samples may be used by a Synthesizer to synthesize sound in response to MIDI commands, or extracted for use by an application. (The terminology reflects musicians' use of the word "sample" to refer collectively to a series of contiguous audio samples or frames, rather than to a single, instantaneous sample.) The data class for an audio sample will be an object that encapsulates the audio sample data itself and information about how to interpret it (the format of the audio data), such as an AudioInputStream.
  • Embedded sequences. A sound bank may contain built-in song data stored in a data object such as a Sequence.

Synthesizers that use wavetable synthesis or related techniques play back the audio in a sample when synthesizing notes, often when emulating the real-world instrument that was originally recorded. However, there is not necessarily a one-to-one correspondence between the Instruments and samples in a Soundbank. A single Instrument can use multiple SoundbankResources (typically for notes of dissimilar pitch or brightness). Also, more than one Instrument can use the same sample.

Constructor Summary
protected SoundbankResource(Soundbank soundBank, String name, Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index.
Method Summary
abstract Object | getData() Obtains the sampled audio that is stored in this SoundbankResource.
Class | getDataClass() Obtains the class used by this sample to represent its data.
String | getName() Obtains the name of the resource.
Soundbank | getSoundbank() Obtains the sound bank that contains this SoundbankResource.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SoundbankResource

protected SoundbankResource(Soundbank soundBank,
                            String name,
                            Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index. (Setting the SoundbankResource's name, sampled audio data, and instruments is a subclass responsibility.)
Parameters:
soundBank - the sound bank containing this SoundbankResource
name - the name of the sample
dataClass - the class used to represent the sample's data
See Also:
getSoundbank(),
getName(),
getDataClass(),
getData()
Method Detail

getSoundbank

public Soundbank getSoundbank()
Obtains the sound bank that contains this SoundbankResource.
Returns:
the sound bank in which this SoundbankResource is stored

getName

public String getName()
Obtains the name of the resource. This should generally be a string descriptive of the resource, and it should be unique within a given soundbank, so that a user can select an instrument based on its name.
Returns:
the instrument's name

getDataClass

public Class getDataClass()
Obtains the class used by this sample to represent its data. The object returned by getData will be of this class. If this SoundbankResource object does not support direct access to its data, returns null.
Returns:
the class used to represent the sample's data, or null if the data is not accessible

getData

public abstract Object getData()
Obtains the sampled audio that is stored in this SoundbankResource. The type of object returned depends on the implementation of the concrete class, and may be queried using getDataClass.
Returns:
an object containing the sampled audio data
See Also:
getDataClass()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.sound.midi.spi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.sound.midi.spi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.sound.midi.spi.MidiDeviceProvider
    • class javax.sound.midi.spi.MidiFileReader
    • class javax.sound.midi.spi.MidiFileWriter
    • class javax.sound.midi.spi.SoundbankReader
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.sound.midi.spi

Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

See:
Description

Class Summary
MidiDeviceProvider | A MidiDeviceProvider is a factory or provider for a particular type of MIDI device.
MidiFileReader | A MidiFileReader supplies MIDI file-reading services.
MidiFileWriter | A MidiFileWriter supplies MIDI file-writing services.
SoundbankReader | A SoundbankReader supplies soundbank file-reading services.

Package javax.sound.midi.spi Description

Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Related Documentation

For overviews, tutorials, examples, and guides, please see:
  • Sound

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.sound.midi.spi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.sound.midi.spi

No usage of javax.sound.midi.spi

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.spi.MidiDeviceProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.spi.MidiDeviceProvider

No usage of javax.sound.midi.spi.MidiDeviceProvider

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.spi.MidiFileReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.spi.MidiFileReader

No usage of javax.sound.midi.spi.MidiFileReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.spi.MidiFileWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.spi.MidiFileWriter

No usage of javax.sound.midi.spi.MidiFileWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.midi.spi.SoundbankReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.midi.spi.SoundbankReader

No usage of javax.sound.midi.spi.SoundbankReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


MidiDeviceProvider

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi.spi
Class MidiDeviceProvider

java.lang.Object
  |
  +--javax.sound.midi.spi.MidiDeviceProvider
public abstract class MidiDeviceProvider
extends Object

A MidiDeviceProvider is a factory or provider for a particular type of MIDI device. This mechanism allows the implementation to determine how resources are managed in the creation and management of a device.

Constructor Summary
MidiDeviceProvider()
Method Summary
abstract MidiDevice | getDevice(MidiDevice.Info info) Obtains an instance of the device represented by the info object.
abstract MidiDevice.Info[] | getDeviceInfo() Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.
boolean | isDeviceSupported(MidiDevice.Info info) Indicates whether the device provider supports the device represented by the specified device info object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MidiDeviceProvider

public MidiDeviceProvider()
Method Detail

isDeviceSupported

public boolean isDeviceSupported(MidiDevice.Info info)
Indicates whether the device provider supports the device represented by the specified device info object.
Parameters:
an - info object that describes the device for which support is queried
Returns:
true if the specified device is supported, otherwise false

getDeviceInfo

public abstract MidiDevice.Info[] getDeviceInfo()
Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.
Returns:
set of device info objects

getDevice

public abstract MidiDevice getDevice(MidiDevice.Info info)
Obtains an instance of the device represented by the info object.
Parameters:
info - an info object that describes the desired device
Returns:
device instance
Throws:
IllegalArgumentException - if the info object specified does not match the info object for a device supported by this MidiDeviceProvider.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MidiFileReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi.spi
Class MidiFileReader

java.lang.Object
  |
  +--javax.sound.midi.spi.MidiFileReader
public abstract class MidiFileReader
extends Object

A MidiFileReader supplies MIDI file-reading services. Classes implementing this interface can parse the format information from one or more types of MIDI file, and can produce a Sequence object from files of these types.

Since:
1.3

Constructor Summary
MidiFileReader()
Method Summary
abstract MidiFileFormat | getMidiFileFormat(File file) Obtains the MIDI file format of the File provided.
abstract MidiFileFormat | getMidiFileFormat(InputStream stream) Obtains the MIDI file format of the input stream provided.
abstract MidiFileFormat | getMidiFileFormat(URL url) Obtains the MIDI file format of the URL provided.
abstract Sequence | getSequence(File file) Obtains a MIDI sequence from the File provided.
abstract Sequence | getSequence(InputStream stream) Obtains a MIDI sequence from the input stream provided.
abstract Sequence | getSequence(URL url) Obtains a MIDI sequence from the URL provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MidiFileReader

public MidiFileReader()
Method Detail

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(InputStream stream)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the input stream provided. The stream must point to valid MIDI file data. In general, MIDI file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
Parameters:
stream - the input stream from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(URL url)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the URL provided. The URL must point to valid MIDI file data.
Parameters:
url - the URL from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(File file)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the File provided. The File must point to valid MIDI file data.
Parameters:
file - the File from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getSequence

public abstract Sequence getSequence(InputStream stream)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the input stream provided. The stream must point to valid MIDI file data. In general, MIDI file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
Parameters:
stream - the input stream from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data contained in the input stream.
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getSequence

public abstract Sequence getSequence(URL url)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the URL provided. The URL must point to valid MIDI file data.
Parameters:
url - the URL for which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the URL
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getSequence

public abstract Sequence getSequence(File file)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the File provided. The File must point to valid MIDI file data.
Parameters:
file - the File from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the File
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MidiFileWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi.spi
Class MidiFileWriter

java.lang.Object
  |
  +--javax.sound.midi.spi.MidiFileWriter
public abstract class MidiFileWriter
extends Object

A MidiFileWriter supplies MIDI file-writing services. Classes that implement this interface can write one or more types of MIDI file from a Sequence object.

Since:
1.3

Constructor Summary
MidiFileWriter()
Method Summary
abstract int[] | getMidiFileTypes() Obtains the set of MIDI file types for which file writing support is provided by this file writer.
abstract int[] | getMidiFileTypes(Sequence sequence) Obtains the file types that this file writer can write from the sequence specified.
boolean | isFileTypeSupported(int fileType) Indicates whether file writing support for the specified MIDI file type is provided by this file writer.
boolean | isFileTypeSupported(int fileType, Sequence sequence) Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
abstract int | write(Sequence in, int fileType, File out) Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.
abstract int | write(Sequence in, int fileType, OutputStream out) Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MidiFileWriter

public MidiFileWriter()
Method Detail

getMidiFileTypes

public abstract int[] getMidiFileTypes()
Obtains the set of MIDI file types for which file writing support is provided by this file writer.
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

getMidiFileTypes

public abstract int[] getMidiFileTypes(Sequence sequence)
Obtains the file types that this file writer can write from the sequence specified.
Parameters:
sequence - the sequence for which MIDI file type support is queried
Returns:
array of file types. If no file types are supported, returns an array of length 0.

isFileTypeSupported

public boolean isFileTypeSupported(int fileType)
Indicates whether file writing support for the specified MIDI file type is provided by this file writer.
Parameters:
fileType - the file type for which write capabilities are queried
Returns:
true if the file type is supported, otherwise false

isFileTypeSupported

public boolean isFileTypeSupported(int fileType,
                                   Sequence sequence)
Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
Parameters:
fileType - the file type for which write capabilities are queried
sequence - the sequence for which file writing support is queried
Returns:
true if the file type is supported for this sequence, otherwise false

write

public abstract int write(Sequence in,
                          int fileType,
                          OutputStream out)
                   throws IOException
Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
Parameters:
in - sequence containing MIDI data to be written to the file
fileType - type of the file to be written to the output stream
out - stream to which the file data should be written
Returns:
the number of bytes written to the output stream
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file type is not supported by this file writer
See Also:
isFileTypeSupported(int, Sequence), getMidiFileTypes(Sequence)

write

public abstract int write(Sequence in,
                          int fileType,
                          File out)
                   throws IOException
Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.
Parameters:
in - sequence containing MIDI data to be written to the external file
fileType - type of the file to be written to the external file
out - external file to which the file data should be written
Returns:
the number of bytes written to the file
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file type is not supported by this file writer
See Also:
isFileTypeSupported(int, Sequence), getMidiFileTypes(Sequence)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SoundbankReader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi.spi
Class SoundbankReader

java.lang.Object
  |
  +--javax.sound.midi.spi.SoundbankReader
public abstract class SoundbankReader
extends Object

A SoundbankReader supplies soundbank file-reading services. Concrete subclasses of SoundbankReader parse a given soundbank file, producing a Soundbank object that can be loaded into a Synthesizer.

Since:
1.3

Constructor Summary
SoundbankReader()
Method Summary
abstract Soundbank | getSoundbank(File file) Obtains a soundbank object from the File provided.
abstract Soundbank | getSoundbank(InputStream stream) Obtains a soundbank object from the InputStream provided.
abstract Soundbank | getSoundbank(URL url) Obtains a soundbank object from the URL provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SoundbankReader

public SoundbankReader()
Method Detail

getSoundbank

public abstract Soundbank getSoundbank(URL url)
                                throws InvalidMidiDataException,
                                       IOException
Obtains a soundbank object from the URL provided.
Parameters:
url - URL representing the soundbank.
Returns:
soundbank object
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI soundbank data recognized by this soundbank reader
IOException - if an I/O error occurs

getSoundbank

public abstract Soundbank getSoundbank(InputStream stream)
                                throws InvalidMidiDataException,
                                       IOException
Obtains a soundbank object from the InputStream provided.
Parameters:
stream - InputStream representing the soundbank
Returns:
soundbank object
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI soundbank data recognized by this soundbank reader
IOException - if an I/O error occurs

getSoundbank

public abstract Soundbank getSoundbank(File file)
                                throws InvalidMidiDataException,
                                       IOException
Obtains a soundbank object from the File provided.
Parameters:
file - the File representing the soundbank
Returns:
soundbank object
Throws:
InvalidMidiDataException - if the file does not point to valid MIDI soundbank data recognized by this soundbank reader
IOException - if an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SyncMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class Sequencer.SyncMode

java.lang.Object
  |
  +--javax.sound.midi.Sequencer.SyncMode
Enclosing class:
Sequencer
public static class Sequencer.SyncMode
extends Object

A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device. If the sequencer is being synchronized to a master, the sequencer revises its current time in response to messages from the master. If the sequencer has a slave, the sequencer similarly sends messages to control the slave's timing.

There are three predefined modes that specify possible masters for a sequencer: INTERNAL_CLOCK, MIDI_SYNC, and MIDI_TIME_CODE. The latter two work if the sequencer receives MIDI messages from another device. In these two modes, the sequencer's time gets reset based on system real-time timing clock messages or MIDI time code (MTC) messages, respectively. These two modes can also be used as slave modes, in which case the sequencer sends the corresponding types of MIDI messages to its receiver (whether or not the sequencer is also receiving them from a master). A fourth mode, NO_SYNC, is used to indicate that the sequencer should not control its receiver's timing.

See Also:
Sequencer.setMasterSyncMode(Sequencer.SyncMode), Sequencer.setSlaveSyncMode(Sequencer.SyncMode)

Field Summary
static Sequencer.SyncMode | INTERNAL_CLOCK A master synchronization mode that makes the sequencer get its timing information from its internal clock.
static Sequencer.SyncMode | MIDI_SYNC A master or slave synchronization mode that specifies the use of MIDI clock messages.
static Sequencer.SyncMode | MIDI_TIME_CODE A master or slave synchronization mode that specifies the use of MIDI Time Code.
static Sequencer.SyncMode | NO_SYNC A slave synchronization mode indicating that no timing information should be sent to the receiver.
Constructor Summary
protected Sequencer.SyncMode(String name)
Constructs a synchronization mode.
Method Summary
boolean | equals(Object obj) Determines whether two objects are equal.
int | hashCode() Finalizes the hashcode method.
String | toString() Provides this synchronization mode's name as the string representation of the mode.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

INTERNAL_CLOCK

public static final Sequencer.SyncMode INTERNAL_CLOCK
A master synchronization mode that makes the sequencer get its timing information from its internal clock. This is not a legal slave sync mode.

MIDI_SYNC

public static final Sequencer.SyncMode MIDI_SYNC
A master or slave synchronization mode that specifies the use of MIDI clock messages. If this mode is used as the master sync mode, the sequencer gets its timing information from system real-time MIDI clock messages. This mode only applies as the master sync mode for sequencers that are also MIDI receivers. If this is the slave sync mode, the sequencer sends system real-time MIDI clock messages to its receiver. MIDI clock messages are sent at a rate of 24 per quarter note.

MIDI_TIME_CODE

public static final Sequencer.SyncMode MIDI_TIME_CODE
A master or slave synchronization mode that specifies the use of MIDI Time Code. If this mode is used as the master sync mode, the sequencer gets its timing information from MIDI Time Code messages. This mode only applies as the master sync mode to sequencers that are also MIDI receivers. If this mode is used as the slave sync mode, the sequencer sends MIDI Time Code messages to its receiver. (See the MIDI 1.0 Detailed Specification for a description of MIDI Time Code.)

NO_SYNC

public static final Sequencer.SyncMode NO_SYNC
A slave synchronization mode indicating that no timing information should be sent to the receiver. This is not a legal master sync mode.
Constructor Detail

Sequencer.SyncMode

protected Sequencer.SyncMode(String name)
Constructs a synchronization mode.
Parameters:
name - name of the synchronization mode
Method Detail

equals

public final boolean equals(Object obj)
Determines whether two objects are equal. Returns true if the objects are identical
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument, false otherwise

hashCode

public final int hashCode()
Finalizes the hashcode method.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides this synchronization mode's name as the string representation of the mode.
Overrides:
toString in class Object
Returns:
the name of this synchronization mode
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Synthesizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface Synthesizer

All Superinterfaces:
MidiDevice
public interface Synthesizer
extends MidiDevice

A Synthesizer generates sound. This usually happens when one of the Synthesizer's MidiChannel objects receives a noteOn message, either directly or via the Synthesizer object. Many Synthesizers support Receivers, through which MIDI events can be delivered to the Synthesizer. In such cases, the Synthesizer typically responds by sending a corresponding message to the appropriate MidiChannel, or by processing the event itself if the event isn't one of the MIDI channel messages.

The Synthesizer interface includes methods for loading and unloading instruments from soundbanks. An instrument is a specification for synthesizing a certain type of sound, whether that sound emulates a traditional instrument or is some kind of sound effect or other imaginary sound. A soundbank is a collection of instruments, organized by bank and program number (via the instrument's Patch object). Different Synthesizer classes might implement different sound-synthesis techniques, meaning that some instruments and not others might be compatible with a given synthesizer. Also, synthesizers may have a limited amount of memory for instruments, meaning that not every soundbank and instrument can be used by every synthesizer, even if the synthesis technique is compatible. To see whether the instruments from a certain soundbank can be played by a given synthesizer, invoke the isSoundbankSupported method of Synthesizer.

"Loading" an instrument means that that instrument becomes available for synthesizing notes. The instrument is loaded into the bank and program location specified by its Patch object. Loading does not necessarily mean that subsequently played notes will immediately have the sound of this newly loaded instrument. For the instrument to play notes, one of the synthesizer's MidiChannel objects must receive (or have received) a program-change message that causes that particular instrument's bank and program number to be selected.

See Also:
MidiSystem.getSynthesizer(), Soundbank, Instrument, MidiChannel.programChange(int, int), Receiver, Transmitter, MidiDevice

Inner classes inherited from class javax.sound.midi.MidiDevice
MidiDevice.Info
Method Summary
Instrument[] | getAvailableInstruments() Obtains a list of instruments that come with the synthesizer.
MidiChannel[] | getChannels() Obtains the set of MIDI channels controlled by this synthesizer.
Soundbank | getDefaultSoundbank() Obtains the default soundbank for the synthesizer, if one exists.
long | getLatency() Obtains the processing latency incurred by this synthesizer, expressed in microseconds.
Instrument[] | getLoadedInstruments() Obtains a list of the instruments that are currently loaded onto this Synthesizer.
int | getMaxPolyphony() Obtains the maximum number of notes that this synthesizer can sound simultaneously.
VoiceStatus[] | getVoiceStatus() Obtains the current status of the voices produced by this synthesizer.
boolean | isSoundbankSupported(Soundbank soundbank) Informs the caller whether this synthesizer is capable of loading instruments from the specified soundbank.
boolean | loadAllInstruments(Soundbank soundbank) Loads onto the Synthesizer all instruments contained in the specified Soundbank.
boolean | loadInstrument(Instrument instrument) Makes a particular instrument available for synthesis.
boolean | loadInstruments(Soundbank soundbank, Patch[] patchList) Loads the instruments referenced by the specified patches, from the specified Soundbank.
boolean | remapInstrument(Instrument from, Instrument to) Remaps an instrument.
void | unloadAllInstruments(Soundbank soundbank) Unloads all instruments contained in the specified Soundbank.
void | unloadInstrument(Instrument instrument) Unloads a particular instrument.
void | unloadInstruments(Soundbank soundbank, Patch[] patchList) Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.
Methods inherited from interface javax.sound.midi.MidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceiver, getTransmitter, isOpen, open

Method Detail

getMaxPolyphony

public int getMaxPolyphony()
Obtains the maximum number of notes that this synthesizer can sound simultaneously.
Returns:
the maximum number of simultaneous notes
See Also:
getVoiceStatus()

getLatency

public long getLatency()
Obtains the processing latency incurred by this synthesizer, expressed in microseconds. This latency measures the worst-case delay between the time a MIDI message is delivered to the synthesizer and the time that the synthesizer actually produces the corresponding result.

Although the latency is expressed in microseconds, a synthesizer's actual measured delay may vary over a wider range than this resolution suggests. For example, a synthesizer might have a worst-case delay of a few milliseconds or more.

Returns:
the worst-case delay, in microseconds

getChannels

public MidiChannel[] getChannels()
Obtains the set of MIDI channels controlled by this synthesizer. Each non-null element in the returned array is a MidiChannel that receives the MIDI messages sent on that channel number.

The MIDI 1.0 specification provides for 16 channels, so this method returns an array of at least 16 elements. However, if this synthesizer doesn't make use of all 16 channels, some of the elements of the array might be null, so you should check each element before using it.

Returns:
an array of the MidiChannel objects managed by this Synthesizer. Some of the array elements may be null.

getVoiceStatus

public VoiceStatus[] getVoiceStatus()
Obtains the current status of the voices produced by this synthesizer. If this class of Synthesizer does not provide voice information, the returned array will always be of length 0. Otherwise, its length is always equal to the total number of voices, as returned by getMaxPolyphony(). (See the VoiceStatus class description for an explanation of synthesizer voices.)
Returns:
an array of VoiceStatus objects that supply information about the corresponding synthesizer voices
See Also:
getMaxPolyphony(), VoiceStatus

isSoundbankSupported

public boolean isSoundbankSupported(Soundbank soundbank)
Informs the caller whether this synthesizer is capable of loading instruments from the specified soundbank. If the soundbank is unsupported, any attempts to load instruments from it will result in an IllegalArgumentException.
Parameters:
soundbank - soundbank for which support is queried
Returns:
true if the soundbank is supported, otherwise false
See Also:
loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[]),
loadAllInstruments(javax.sound.midi.Soundbank),
unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[]),
unloadAllInstruments(javax.sound.midi.Soundbank),
getDefaultSoundbank()

loadInstrument

public boolean loadInstrument(Instrument instrument)
Makes a particular instrument available for synthesis. This instrument is loaded into the patch location specified by its Patch object, so that if a program-change message is received (or has been received) that causes that patch to be selected, subsequent notes will be played using the sound of instrument. If the specified instrument is already loaded, this method does nothing and returns true.

The instrument must be part of a soundbank that this Synthesizer supports. (To make sure, you can use the getSoundbank method of Instrument and the isSoundbankSupported method of Synthesizer.)

Parameters:
instrument - instrument to load
Returns:
true if the instrument is successfully loaded (or already had been), false if the instrument could not be loaded (for example, if the synthesizer has insufficient memory to load it)
Throws:
IllegalArgumentException - if this Synthesizer doesn't support the specified instrument's soundbank
See Also:
unloadInstrument(javax.sound.midi.Instrument),
loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[]),
loadAllInstruments(javax.sound.midi.Soundbank),
remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument),
SoundbankResource.getSoundbank(),
MidiChannel.programChange(int, int)

unloadInstrument

public void unloadInstrument(Instrument instrument)
Unloads a particular instrument.
Parameters:
instrument - instrument to unload
Throws:
IllegalArgumentException - if this Synthesizer doesn't support the specified instrument's soundbank
See Also:
loadInstrument(javax.sound.midi.Instrument),
unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[]),
unloadAllInstruments(javax.sound.midi.Soundbank),
getLoadedInstruments(),
remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)

remapInstrument

public boolean remapInstrument(Instrument from,
                               Instrument to)
Remaps an instrument. Instrument to takes the place of instrument from. For example, if from was located at bank number 2, program number 11, remapping causes that bank and program location to be occupied instead by to. Instrument from is unloaded.
Parameters:
from - instrument to be replaced
to - new instrument to be used in place of the old instrument
Returns:
true if the instrument could be remapped, false otherwise
Throws:
IllegalArgumentException - if the soundbank is not supported

getDefaultSoundbank

public Soundbank getDefaultSoundbank()
Obtains the default soundbank for the synthesizer, if one exists. (Some synthesizers provide a default or built-in soundbank.) If a synthesizer doesn't have a default soundbank, instruments must be loaded explicitly from an external soundbank.
Returns:
default soundbank, or null if one does not exist.
See Also:
isSoundbankSupported(javax.sound.midi.Soundbank)

getAvailableInstruments

public Instrument[] getAvailableInstruments()
Obtains a list of instruments that come with the synthesizer. These instruments might be built into the synthesizer, or they might be part of a default soundbank provided with the synthesizer, etc.

Note that you don't use this method to find out which instruments are currently loaded onto the synthesizer; for that purpose, you use getLoadedInstruments(). Nor does the method indicate all the instruments that can be loaded onto the synthesizer; it only indicates the subset that come with the synthesizer. To learn whether another instrument can be loaded, you can invoke isSoundbankSupported(), and if the instrument's Soundbank is supported, you can try loading the instrument.

Returns:
list of available instruments.
See Also:
getLoadedInstruments(), isSoundbankSupported(Soundbank), loadInstrument(javax.sound.midi.Instrument)

getLoadedInstruments

public Instrument[] getLoadedInstruments()
Obtains a list of the instruments that are currently loaded onto this Synthesizer.
Returns:
a list of currently loaded instruments
See Also:
loadInstrument(javax.sound.midi.Instrument),
getAvailableInstruments(),
Soundbank.getInstruments()

loadAllInstruments

public boolean loadAllInstruments(Soundbank soundbank)
Loads onto the Synthesizer all instruments contained in the specified Soundbank.
Parameters:
soundbank - the Soundbank whose are instruments are to be loaded
Returns:
true if the instruments are all successfully loaded (or already had been), false if any instrument could not be loaded (for example, if the Synthesizer had insufficient memory)
Throws:
IllegalArgumentException - if the requested soundbank is incompatible with this synthesizer.
See Also:
isSoundbankSupported(javax.sound.midi.Soundbank),
loadInstrument(javax.sound.midi.Instrument),
loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])

unloadAllInstruments

public void unloadAllInstruments(Soundbank soundbank)
Unloads all instruments contained in the specified Soundbank.
Parameters:
soundbank - soundbank containing instruments to unload
Throws:
IllegalArgumentException - thrown if the soundbank is not supported.
See Also:
isSoundbankSupported(javax.sound.midi.Soundbank),
unloadInstrument(javax.sound.midi.Instrument),
unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])

loadInstruments

public boolean loadInstruments(Soundbank soundbank,
                               Patch[] patchList)
Loads the instruments referenced by the specified patches, from the specified Soundbank. Each of the Patch objects indicates a bank and program number; the Instrument that has the matching Patch is loaded into that bank and program location.
Parameters:
soundbank - the Soundbank containing the instruments to load
patchList - list of patches for which instruments should be loaded
Returns:
true if the instruments are all successfully loaded (or already had been), false if any instrument could not be loaded (for example, if the Synthesizer had insufficient memory)
Throws:
IllegalArgumentException - thrown if the soundbank is not supported.
See Also:
isSoundbankSupported(javax.sound.midi.Soundbank),
Instrument.getPatch(),
loadAllInstruments(javax.sound.midi.Soundbank),
loadInstrument(javax.sound.midi.Instrument),
Soundbank.getInstrument(Patch),
Sequence.getPatchList()

unloadInstruments

public void unloadInstruments(Soundbank soundbank,
                              Patch[] patchList)
Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.
Parameters:
soundbank - soundbank containing instruments to unload
patchList - list of patches for which instruments should be unloaded
Throws:
IllegalArgumentException - thrown if the soundbank is not supported.
See Also:
unloadInstrument(javax.sound.midi.Instrument),
unloadAllInstruments(javax.sound.midi.Soundbank),
isSoundbankSupported(javax.sound.midi.Soundbank),
Instrument.getPatch(),
loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SysexMessage

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class SysexMessage

java.lang.Object
  |
  +--javax.sound.midi.MidiMessage
        |
        +--javax.sound.midi.SysexMessage
All Implemented Interfaces:
Cloneable
public class SysexMessage
extends MidiMessage

A SysexMessage object represents a MIDI system exclusive message.

When a system exclusive message is read from a MIDI file, it always has a defined length. Data from a system exclusive message from a MIDI file should be stored in the data array of a SysexMessage as follows: the system exclusive message status byte (0xF0 or 0xF7), all message data bytes, and finally the end-of-exclusive flag (0xF7). The length reported by the SysexMessage object is therefore the length of the system exclusive data plus two: one byte for the status byte and one for the end-of-exclusive flag.

As dictated by the Standard MIDI Files specification, two status byte values are legal for a SysexMessage read from a MIDI file:

  • 0xF0: System Exclusive message (same as in MIDI wire protocol)
  • 0xF7: Special System Exclusive message

When Java Sound is used to handle system exclusive data that is being received using MIDI wire protocol, it should place the data in one or more SysexMessages. In this case, the length of the system exclusive data is not known in advance; the end of the system exclusive data is marked by an end-of-exclusive flag (0xF7) in the MIDI wire byte stream.

  • 0xF0: System Exclusive message (same as in MIDI wire protocol)
  • 0xF7: End of Exclusive (EOX)
The first SysexMessage object containing data for a particular system exclusive message should have the status value 0xF0. If this message contains all the system exclusive data for the message, it should end with the status byte 0xF7 (EOX). Otherwise, additional system exclusive data should be sent in one or more SysexMessages with a status value of 0xF7. The SysexMessage containing the last of the data for the system exclusive message should end with the value 0xF7 (EOX) to mark the end of the system exclusive message.

If system exclusive data from SysexMessages objects is being transmitted using MIDI wire protocol, only the initial 0xF0 status byte, the system exclusive data itself, and the final 0xF7 (EOX) byte should be propagated; any 0xF7 status bytes used to indicate that a SysexMessage contains continuing system exclusive data should not be propagated via MIDI wire protocol.

Field Summary
static int | SPECIAL_SYSTEM_EXCLUSIVE Status byte for Special System Exclusive message (0xF7, or 247), which is used in MIDI files.
static int | SYSTEM_EXCLUSIVE Status byte for System Exclusive message (0xF0, or 240).
Fields inherited from class javax.sound.midi.MidiMessage
data, length
Constructor Summary
 | SysexMessage() Constructs a new SysexMessage.
protected | SysexMessage(byte[] data) Constructs a new SysexMessage.
Method Summary
Object | clone() Creates a new object of the same class and with the same contents as this object.
byte[] | getData() Obtains a copy of the data for the system exclusive message.
void | setMessage(byte[] data, int length) Sets the data for the system exclusive message.
void | setMessage(int status, byte[] data, int length) Sets the data for the system exclusive message.
Methods inherited from class javax.sound.midi.MidiMessage
getLength, getMessage, getStatus
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SYSTEM_EXCLUSIVE

public static final int SYSTEM_EXCLUSIVE
Status byte for System Exclusive message (0xF0, or 240).
See Also:
MidiMessage.getStatus()

SPECIAL_SYSTEM_EXCLUSIVE

public static final int SPECIAL_SYSTEM_EXCLUSIVE
Status byte for Special System Exclusive message (0xF7, or 247), which is used in MIDI files. It has the same value as END_OF_EXCLUSIVE, which is used in the real-time "MIDI wire" protocol.
See Also:
MidiMessage.getStatus()
Constructor Detail

SysexMessage

public SysexMessage()
Constructs a new SysexMessage. The contents of the new message are guaranteed to specify a valid MIDI message. Subsequently, you may set the contents of the message using one of the setMessage methods.
See Also:
setMessage(byte[], int)

SysexMessage

protected SysexMessage(byte[] data)
Constructs a new SysexMessage.
Parameters:
data - an array of bytes containing the complete message. The message data may be changed using the setMessage method.
See Also:
setMessage(byte[], int)
Method Detail

setMessage

public void setMessage(byte[] data,
                       int length)
                throws InvalidMidiDataException
Sets the data for the system exclusive message. The first byte of the data array must be a valid system exclusive status byte (0xF0 or 0xF7).
Overrides:
setMessage in class MidiMessage
Parameters:
data - the system exclusive message data
length - the length of the valid message data in the array, including the status byte.

setMessage

public void setMessage(int status,
                       byte[] data,
                       int length)
                throws InvalidMidiDataException
Sets the data for the system exclusive message.
Parameters:
status - the status byte for the message (0xF0 or 0xF7)
data - the system exclusive message data
length - the length of the valid message data in the array

getData

public byte[] getData()
Obtains a copy of the data for the system exclusive message. The returned array of bytes does not include the status byte.
Returns:
array containing the system exclusive message data.

clone

public Object clone()
Creates a new object of the same class and with the same contents as this object.
Overrides:
clone in class MidiMessage
Returns:
a clone of this instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Track

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class Track

java.lang.Object
  |
  +--javax.sound.midi.Track
public class Track
extends Object

A MIDI track is an independent stream of MIDI events (time-stamped MIDI data) that can be stored along with other tracks in a standard MIDI file. The MIDI specification allows only 16 channels of MIDI data, but tracks are a way to get around this limitation. A MIDI file can contain any number of tracks, each containing its own stream of up to 16 channels of MIDI data.

A Track occupies a middle level in the hierarchy of data played by a Sequencer: sequencers play sequences, which contain tracks, which contain MIDI events. A sequencer may provide controls that mute or solo individual tracks.

The timing information and resolution for a track is controlled by and stored in the sequence containing the track. A given Track is considered to belong to the particular Sequence that maintains its timing. For this reason, a new (empty) track is created by calling the Sequence.createTrack() method, rather than by directly invoking a Track constructor.

The Track class provides methods to edit the track by adding or removing MidiEvent objects from it. These operations keep the event list in the correct time order. Methods are also included to obtain the track's size, in terms of either the number of events it contains or its duration in ticks.

See Also:
Sequencer.setTrackMute(int, boolean), Sequencer.setTrackSolo(int, boolean)

Field Summary
protected  Vector events
The list of MidiEvents contained in this track.
Method Summary
boolean | add(MidiEvent event) Adds a new event to the track.
MidiEvent | get(int index) Obtains the event at the specified index.
boolean | remove(MidiEvent event) Removes the specified event from the track.
int | size() Obtains the number of events in this track.
long | ticks() Obtains the length of the track, expressed in MIDI ticks.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

events

protected Vector events
The list of MidiEvents contained in this track.
Method Detail

add

public boolean add(MidiEvent event)
Adds a new event to the track. However, if the event is already contained in the track, it is not added again. The list of events is kept in time order, meaning that this event inserted at the appropriate place in the list, not necessarily at the end.
Parameters:
event - the event to add
Returns:
true if the event did not already exist in the track and was added, otherwise false

remove

public boolean remove(MidiEvent event)
Removes the specified event from the track.
Parameters:
event - the event to remove
Returns:
true if the event existed in the track and was removed, otherwise false

get

public MidiEvent get(int index)
              throws ArrayIndexOutOfBoundsException
Obtains the event at the specified index.
Parameters:
index - the location of the desired event in the event vector
Throws:
ArrayIndexOutOfBoundsException - if the specified index is negative or not less than the current size of this track.
See Also:
size()

size

public int size()
Obtains the number of events in this track.
Returns:
the size of the track's event vector

ticks

public long ticks()
Obtains the length of the track, expressed in MIDI ticks. (The duration of a tick in seconds is determined by the timing resolution of the Sequence containing this track, and also by the tempo of the music as set by the sequencer.)
Returns:
the duration, in ticks
See Also:
Sequence.Sequence(float, int),
Sequencer.setTempoInBPM(float),
Sequencer.getTickPosition()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Transmitter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Interface Transmitter

public interface Transmitter

A Transmitter sends MidiEvent objects to one or more Receivers. Common MIDI transmitters include sequencers and MIDI input ports.

See Also:
Receiver

Method Summary
void | close() Indicates that the application has finished using the transmitter, and that limited resources it requires may be released or made available.
Receiver | getReceiver() Obtains the current receiver to which this transmitter will deliver MIDI messages.
void | setReceiver(Receiver receiver) Sets the receiver to which this transmitter will deliver MIDI messages.

Method Detail

setReceiver

public void setReceiver(Receiver receiver)
Sets the receiver to which this transmitter will deliver MIDI messages. If a receiver is currently set, it is replaced with this one.
Parameters:
receiver - the desired receiver.

getReceiver

public Receiver getReceiver()
Obtains the current receiver to which this transmitter will deliver MIDI messages.
Returns:
the current receiver. If no receiver is currently set, returns null

close

public void close()
Indicates that the application has finished using the transmitter, and that limited resources it requires may be released or made available. Invoking methods on a receiver which has been closed may cause an IllegalArgumentException or other exception to be thrown.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VoiceStatus

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.midi
Class VoiceStatus

java.lang.Object
  |
  +--javax.sound.midi.VoiceStatus
public class VoiceStatus
extends Object

A VoiceStatus object contains information about the current status of one of the voices produced by a Synthesizer.

MIDI synthesizers are generally capable of producing some maximum number of simultaneous notes, also referred to as voices. A voice is a stream of successive single notes, and the process of assigning incoming MIDI notes to specific voices is known as voice allocation. However, the voice-allocation algorithm and the contents of each voice are normally internal to a MIDI synthesizer and hidden from outside view. One can, of course, learn from MIDI messages which notes the synthesizer is playing, and one might be able deduce something about the assignment of notes to voices. But MIDI itself does not provide a means to report which notes a synthesizer has assigned to which voice, nor even to report how many voices the synthesizer is capable of synthesizing.

In Java Sound, however, a Synthesizer class can expose the contents of its voices through its getVoiceStatus() method. This behavior is recommended but optional; synthesizers that don't expose their voice allocation simply return a zero-length array. A Synthesizer that does report its voice status should maintain this information at all times for all of its voices, whether they are currently sounding or not. In other words, a given type of Synthesizer always has a fixed number of voices, equal to the maximum number of simultaneous notes it is capable of sounding.

If the voice is not currently processing a MIDI note, it is considered inactive. A voice is inactive when it has been given no note-on commands, or when every note-on command received has been terminated by a corresponding note-off (or by an "all notes off" message). For example, this happens when a synthesizer capable of playing 16 simultaneous notes is told to play a four-note chord; only four voices are active in this case (assuming no earlier notes are still playing). Usually, a voice whose status is reported as active is producing audible sound, but this is not always true; it depends on the details of the instrument (that is, the synthesis algorithm) and how long the note has been going on. For example, a voice may be synthesizing the sound of a single hand-clap. Because this sound dies away so quickly, it may become inaudible before a note-off message is received. In such a situation, the voice is still considered active even though no sound is currently being produced.

Besides its active or inactive status, the VoiceStatus class provides fields that reveal the voice's current MIDI channel, bank and program number, MIDI note number, and MIDI volume. All of these can change during the course of a voice. While the voice is inactive, each of these fields has an unspecified value, so you should check the active field first.

See Also:
Synthesizer.getMaxPolyphony(), Synthesizer.getVoiceStatus()

Field Summary
boolean | active Indicates whether the voice is currently processing a MIDI note.
int | bank The bank number of the instrument that this voice is currently using.
int | channel The MIDI channel on which this voice is playing.
int | note The MIDI note that this voice is playing.
int | program The program number of the instrument that this voice is currently using.
int | volume The current MIDI volume level for the voice.
Constructor Summary
VoiceStatus()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

active

public boolean active
Indicates whether the voice is currently processing a MIDI note. See the explanation of active and inactive voices.

channel

public int channel
The MIDI channel on which this voice is playing. The value is a zero-based channel number if the voice is active, or unspecified if the voice is inactive.
See Also:
MidiChannel, active

bank

public int bank
The bank number of the instrument that this voice is currently using. This is a number dictated by the MIDI bank-select message; it does not refer to a SoundBank object. The value ranges from 0 to 127 if the voice is active, and is unspecified if the voice is inactive.
See Also:
Patch, Soundbank, active, MidiChannel.programChange(int, int)

program

public int program
The program number of the instrument that this voice is currently using. The value ranges from 0 to 127 if the voice is active, and is unspecified if the voice is inactive.
See Also:
MidiChannel.getProgram(), Patch, active

note

public int note
The MIDI note that this voice is playing. The range for an active voice is from 0 to 127 in semitones, with 60 referring to Middle C. The value is unspecified if the voice is inactive.
See Also:
MidiChannel.noteOn(int, int), active

volume

public int volume
The current MIDI volume level for the voice. The value ranges from 0 to 127 if the voice is active, and is unspecified if the voice is inactive.

Note that this value does not necessarily reflect the instantaneous level of the sound produced by this voice; that level is the result of many contributing factors, including the current instrument and the shape of the amplitude envelope it produces.

See Also:
active
Constructor Detail

VoiceStatus

public VoiceStatus()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.sound.sampled Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.sound.sampled

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.sound.sampled.AudioFileFormat
    • class javax.sound.sampled.AudioFileFormat.Type
    • class javax.sound.sampled.AudioFormat
    • class javax.sound.sampled.AudioFormat.Encoding
    • class javax.sound.sampled.AudioSystem
    • class javax.sound.sampled.Control
      • class javax.sound.sampled.BooleanControl
      • class javax.sound.sampled.CompoundControl
      • class javax.sound.sampled.EnumControl
      • class javax.sound.sampled.FloatControl
    • class javax.sound.sampled.Control.Type
      • class javax.sound.sampled.BooleanControl.Type
      • class javax.sound.sampled.CompoundControl.Type
      • class javax.sound.sampled.EnumControl.Type
      • class javax.sound.sampled.FloatControl.Type
    • class java.util.EventObject (implements java.io.Serializable)
      • class javax.sound.sampled.LineEvent
    • class java.io.InputStream
      • class javax.sound.sampled.AudioInputStream
    • class javax.sound.sampled.Line.Info
      • class javax.sound.sampled.DataLine.Info
      • class javax.sound.sampled.Port.Info
    • class javax.sound.sampled.LineEvent.Type
    • class javax.sound.sampled.Mixer.Info
    • class java.security.Permission (implements java.security.Guard, java.io.Serializable)
      • class java.security.BasicPermission (implements java.io.Serializable)
        • class javax.sound.sampled.AudioPermission
    • class javax.sound.sampled.ReverbType
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.sound.sampled.LineUnavailableException
        • class javax.sound.sampled.UnsupportedAudioFileException

Interface Hierarchy

  • interface java.util.EventListener
    • interface javax.sound.sampled.LineListener
  • interface javax.sound.sampled.Line
    • interface javax.sound.sampled.DataLine
      • interface javax.sound.sampled.Clip
      • interface javax.sound.sampled.SourceDataLine
      • interface javax.sound.sampled.TargetDataLine
    • interface javax.sound.sampled.Mixer
    • interface javax.sound.sampled.Port
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.sound.sampled

Provides interfaces and classes for capture, processing, and playback of sampled audio data.

See:
Description

Interface Summary
Clip | The Clip interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.
DataLine | DataLine adds media-related functionality to its superinterface, Line.
Line | The Line interface represents a mono or multi-channel audio feed.
LineListener | Instances of classes that implement the LineListener interface can register to receive events when a line's status changes.
Mixer | A mixer is an audio device with one or more lines.
Port | Ports are simple lines for input or output of audio to or from audio devices.
SourceDataLine | A source data line is a data line to which data may be written.
TargetDataLine | A target data line is a type of DataLine from which audio data can be read.

Class Summary
AudioFileFormat | An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.
AudioFileFormat.Type | An instance of the Type class represents one of the standard types of audio file.
AudioFormat | AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
AudioFormat.Encoding | The Encoding class names the specific type of data representation used for an audio stream.
AudioInputStream | An audio input stream is an input stream with a specified audio format and length.
AudioPermission | The AudioPermission class represents access rights to the audio system resources.
AudioSystem | The AudioSystem class acts as the entry point to the sampled-audio system resources.
BooleanControl | A BooleanControl provides the ability to switch between two possible settings that affect a line's audio.
BooleanControl.Type | An instance of the BooleanControl.Type class identifies one kind of boolean control.
CompoundControl | A CompoundControl, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as a Control.
CompoundControl.Type | An instance of the CompoundControl.Type inner class identifies one kind of compound control.
Control | Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line.
Control.Type | An instance of the Type class represents the type of the control.
DataLine.Info | Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines.
EnumControl | A EnumControl provides control over a set of discrete possible values, each represented by an object.
EnumControl.Type | An instance of the EnumControl.Type inner class identifies one kind of enumerated control.
FloatControl | A FloatControl object provides control over a range of floating-point values.
FloatControl.Type | An instance of the FloatControl.Type inner class identifies one kind of float control.
Line.Info | A Line.Info object contains information about a line.
LineEvent | The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.
LineEvent.Type | The LineEvent.Type inner class identifies what kind of event occurred on a line.
Mixer.Info | The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
Port.Info | The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.
ReverbType | The ReverbType class provides methods for accessing various reverberation settings to be applied to an audio signal.

Exception Summary
LineUnavailableException | A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
UnsupportedAudioFileException | An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Package javax.sound.sampled Description

Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Related Documentation

For overviews, tutorials, examples, and guides, please see:
  • Sound

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Port

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface Port

All Superinterfaces:
Line
public interface Port
extends Line

Ports are simple lines for input or output of audio to or from audio devices. Common examples of ports that act as source lines (mixer inputs) include the microphone, line input, and CD-ROM drive. Ports that act as target lines (mixer outputs) include the speaker, headphone, and line output. You can access port using a Port.Info object.

Since:
1.3

Inner Class Summary
static class Port.Info
The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package javax.sound.sampled

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.sound.sampled

Packages that use javax.sound.sampled
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Classes in javax.sound.sampled used by javax.sound.sampled
AudioFileFormat
An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.
AudioFileFormat.Type
An instance of the Type class represents one of the standard types of audio file.
AudioFormat
AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
AudioFormat.Encoding
The Encoding class names the specific type of data representation used for an audio stream.
AudioInputStream
An audio input stream is an input stream with a specified audio format and length.
BooleanControl.Type
An instance of the BooleanControl.Type class identifies one kind of boolean control.
CompoundControl.Type
An instance of the CompoundControl.Type inner class identifies one kind of compound control.
Control
Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line.
Control.Type
An instance of the Type class represents the type of the control.
DataLine
DataLine adds media-related functionality to its superinterface, Line.
EnumControl.Type
An instance of the EnumControl.Type inner class identifies one kind of enumerated control.
FloatControl.Type
An instance of the FloatControl.Type inner class identifies one kind of float control.
Line
The Line interface represents a mono or multi-channel audio feed.
Line.Info
A Line.Info object contains information about a line.
LineEvent
The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.
LineEvent.Type
The LineEvent.Type inner class identifies what kind of event occurred on a line.
LineListener
Instances of classes that implement the LineListener interface can register to receive events when a line's status changes.
LineUnavailableException
A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable.
Mixer
A mixer is an audio device with one or more lines.
Mixer.Info
The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
Port.Info
The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.
TargetDataLine
A target data line is a type of DataLine from which audio data can be read.
UnsupportedAudioFileException
An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Classes in javax.sound.sampled used by javax.sound.sampled.spi
AudioFileFormat
An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.
AudioFileFormat.Type
An instance of the Type class represents one of the standard types of audio file.
AudioFormat
AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
AudioFormat.Encoding
The Encoding class names the specific type of data representation used for an audio stream.
AudioInputStream
An audio input stream is an input stream with a specified audio format and length.
Mixer
A mixer is an audio device with one or more lines.
Mixer.Info
The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
UnsupportedAudioFileException
An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AudioFileFormat

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioFileFormat

java.lang.Object
  |
  +--javax.sound.sampled.AudioFileFormat
public class AudioFileFormat
extends Object

An instance of the AudioFileFormat class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.

The AudioSystem class includes methods for determining the format of an audio file, obtaining an audio input stream from an audio file, and writing an audio file from an audio input stream.

Since:
1.3
See Also:
AudioInputStream

Inner Class Summary
static class AudioFileFormat.Type
An instance of the Type class represents one of the standard types of audio file.
Constructor Summary
 | AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength) Constructs an audio file format object.
protected | AudioFileFormat(AudioFileFormat.Type type, int byteLength, AudioFormat format, int frameLength) Constructs an audio file format object.
Method Summary
int | getByteLength() Obtains the size in bytes of the entire audio file (not just its audio data).
AudioFormat | getFormat() Obtains the format of the audio data contained in the audio file.
int | getFrameLength() Obtains the length of the audio data contained in the file, expressed in sample frames.
AudioFileFormat.Type | getType() Obtains the audio file type, such as WAVE or AU.
String | toString() Provides a string representation of the file format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AudioFileFormat

protected AudioFileFormat(AudioFileFormat.Type type,
                          int byteLength,
                          AudioFormat format,
                          int frameLength)
Constructs an audio file format object. This protected constructor is intended for use by providers of file-reading services when returning information about an audio file or about supported audio file formats.
Parameters:
type - the type of the audio file
byteLength - the length of the file in bytes, or AudioSystem.NOT_SPECIFIED
format - the format of the audio data contained in the file
frameLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
See Also:
getType()

AudioFileFormat

public AudioFileFormat(AudioFileFormat.Type type,
                       AudioFormat format,
                       int frameLength)
Constructs an audio file format object. This public constructor may be used by applications to describe the properties of a requested audio file.
Parameters:
type - the type of the audio file
format - the format of the audio data contained in the file
frameLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
Method Detail

getType

public AudioFileFormat.Type getType()
Obtains the audio file type, such as WAVE or AU.
Returns:
the audio file type
See Also:
AudioFileFormat.Type.WAVE, AudioFileFormat.Type.AU, AudioFileFormat.Type.AIFF, AudioFileFormat.Type.AIFC, AudioFileFormat.Type.SND

getByteLength

public int getByteLength()
Obtains the size in bytes of the entire audio file (not just its audio data).
Returns:
the audio file length in bytes
See Also:
AudioSystem.NOT_SPECIFIED

getFormat

public AudioFormat getFormat()
Obtains the format of the audio data contained in the audio file.
Returns:
the audio data format

getFrameLength

public int getFrameLength()
Obtains the length of the audio data contained in the file, expressed in sample frames.
Returns:
the number of sample frames of audio data in the file
See Also:
AudioSystem.NOT_SPECIFIED

toString

public String toString()
Provides a string representation of the file format.
Overrides:
toString in class Object
Returns:
the file format as a string
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AudioFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioFormat

java.lang.Object
  |
  +--javax.sound.sampled.AudioFormat
public class AudioFormat
extends Object

AudioFormat is the class that specifies a particular arrangement of data in a sound stream. By examing the information stored in the audio format, you can discover how to interpret the bits in the binary sound data.

Every data line has an audio format associated with its data stream. The audio format of a source (playback) data line indicates what kind of data the data line expects to receive for output. For a target (capture) data line, the audio format specifies the kind of the data that can be read from the line. Sound files also have audio formats, of course. The AudioFileFormat class encapsulates an AudioFormat in addition to other, file-specific information. Similarly, an AudioInputStream has an AudioFormat.

The AudioFormat class accommodates a number of common sound-file encoding techniques, including pulse-code modulation (PCM), mu-law encoding, and a-law encoding. These encoding techniques are predefined, but service providers can create new encoding types. The encoding that a specific format uses is named by its encoding field.

In addition to the encoding, the audio format includes other properties that further specify the exact arrangement of the data. These include the number of channels, sample rate, sample size, byte order, frame rate, and frame size. Sounds may have different numbers of audio channels: one for mono, two for stereo. The sample rate measures how many "snapshots" (samples) of the sound pressure are taken per second, per channel. (If the sound is stereo rather than mono, two samples are actually measured at each instant of time: one for the left channel, and another for the right channel; however, the sample rate still measures the number per channel, so the rate is the same regardless of the number of channels. This is the standard use of the term.) The sample size indicates how many bits are used to store each snapshot; 8 and 16 are typical values. For 16-bit samples (or any other sample size larger than a byte), byte order is important; the bytes in each sample are arranged in either the "little-endian" or "big-endian" style. For encodings like PCM, a frame consists of the set of samples for all channels at a given point in time, and so the size of a frame (in bytes) is always equal to the size of a sample (in bytes) times the number of channels. However, with some other sorts of encodings a frame can contain a bundle of compressed data for a whole series of samples, as well as additional, non-sample data. For such encodings, the sample rate and sample size refer to the data after it is decoded into PCM, and so they are completely different from the frame rate and frame size.

Since:
1.3
See Also:
DataLine.getFormat(), AudioInputStream.getFormat(), AudioFileFormat, FormatConversionProvider

Inner Class Summary
static class AudioFormat.Encoding
The Encoding class names the specific type of data representation used for an audio stream.
Field Summary
protected boolean | bigEndian Indicates whether the audio data is stored in big-endian or little-endian order.
protected int | channels The number of audio channels in this format (1 for mono, 2 for stereo).
protected AudioFormat.Encoding | encoding The audio encoding technique used by this format.
protected float | frameRate The number of frames played or recorded per second, for sounds that have this format.
protected int | frameSize The number of bytes in each frame of a sound that has this format.
protected float | sampleRate The number of samples played or recorded per second, for sounds that have this format.
protected int | sampleSizeInBits The number of bits in each sample of a sound that has this format.
Constructor Summary
AudioFormat(AudioFormat.Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate, boolean bigEndian)
Constructs an AudioFormat with the given parameters.
AudioFormat(float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian)
Constructs an AudioFormat with a linear PCM encoding and the given parameters.
Method Summary
int | getChannels() Obtains the number of channels.
AudioFormat.Encoding | getEncoding() Obtains the type of encoding for sounds in this format.
float | getFrameRate() Obtains the frame rate in frames per second.
int | getFrameSize() Obtains the frame size in bytes.
float | getSampleRate() Obtains the sample rate.
int | getSampleSizeInBits() Obtains the size of a sample.
boolean | isBigEndian() Indicates whether the audio data is stored in big-endian or little-endian byte order.
boolean | matches(AudioFormat format) Indicates whether this format matches the one specified.
String | toString() Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data".
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

encoding

protected AudioFormat.Encoding encoding
The audio encoding technique used by this format.

sampleRate

protected float sampleRate
The number of samples played or recorded per second, for sounds that have this format.

sampleSizeInBits

protected int sampleSizeInBits
The number of bits in each sample of a sound that has this format.

channels

protected int channels
The number of audio channels in this format (1 for mono, 2 for stereo).

frameSize

protected int frameSize
The number of bytes in each frame of a sound that has this format.

frameRate

protected float frameRate
The number of frames played or recorded per second, for sounds that have this format.

bigEndian

protected boolean bigEndian
Indicates whether the audio data is stored in big-endian or little-endian order.
Constructor Detail

AudioFormat

public AudioFormat(AudioFormat.Encoding encoding,
                   float sampleRate,
                   int sampleSizeInBits,
                   int channels,
                   int frameSize,
                   float frameRate,
                   boolean bigEndian)
Constructs an AudioFormat with the given parameters. The encoding specifies the convention used to represent the data. The other parameters are further explained in the class description.
Parameters:
encoding - the audio encoding technique
sampleRate - the number of samples per second
sampleSizeInBits - the number of bits in each sample
channels - the number of channels (1 for mono, 2 for stereo, and so on)
frameSize - the number of bytes in each frame
frameRate - the number of frames per second
bigEndian - indicates whether the data for a single sample is stored in big-endian byte order (false means little-endian)

AudioFormat

public AudioFormat(float sampleRate,
                   int sampleSizeInBits,
                   int channels,
                   boolean signed,
                   boolean bigEndian)
Constructs an AudioFormat with a linear PCM encoding and the given parameters. The frame size is set to the number of bytes required to contain one sample from each channel, and the frame rate is set to the sample rate.
Parameters:
sampleRate - the number of samples per second
sampleSizeInBits - the number of bits in each sample
channels - the number of channels (1 for mono, 2 for stereo, and so on)
signed - indicates whether the data is signed or unsigned
bigEndian - indicates whether the data for a single sample is stored in big-endian byte order (false means little-endian)
Method Detail

getEncoding

public AudioFormat.Encoding getEncoding()
Obtains the type of encoding for sounds in this format.
Returns:
the encoding type
See Also:
AudioFormat.Encoding.PCM_SIGNED, AudioFormat.Encoding.PCM_UNSIGNED, AudioFormat.Encoding.ULAW, AudioFormat.Encoding.ALAW

getSampleRate

public float getSampleRate()
Obtains the sample rate.
Returns:
the number of samples per second
See Also:
getFrameRate()

getSampleSizeInBits

public int getSampleSizeInBits()
Obtains the size of a sample.
Returns:
the number of bits in each sample
See Also:
getFrameSize()

getChannels

public int getChannels()
Obtains the number of channels.
Returns:
The number of channels (1 for mono, 2 for stereo, etc.)

getFrameSize

public int getFrameSize()
Obtains the frame size in bytes.
Returns:
the number of bytes per frame
See Also:
getSampleSizeInBits()

getFrameRate

public float getFrameRate()
Obtains the frame rate in frames per second.
Returns:
the number of frames per second
See Also:
getSampleRate()

isBigEndian

public boolean isBigEndian()
Indicates whether the audio data is stored in big-endian or little-endian byte order. If the sample size is not more than one byte, the return value is irrelevant.
Returns:
true if the data is stored in big-endian byte order, false if little-endian

matches

public boolean matches(AudioFormat format)
Indicates whether this format matches the one specified. To match, two formats must have the same encoding, the same number of channels, and the same number of bits per sample and bytes per frame. The two formats must also have the same sample rate, unless the specified format has the sample rate value AudioSystem.NOT_SPECIFIED, which any sample rate will match. The frame rates must similarly be equal, unless the specified format has the frame rate value AudioSystem.NOT_SPECIFIED. The byte order (big-endian or little-endian) must match if the sample size is greater than one byte.
Parameters:
format - format to test for match
Returns:
true if this format matches the one specified, false otherwise.

toString

public String toString()
Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian audio data". The contents of the string may vary between implementations of Java Sound.
Overrides:
toString in class Object
Returns:
a string that describes the format parameters
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AudioInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--javax.sound.sampled.AudioInputStream
public class AudioInputStream
extends InputStream

An audio input stream is an input stream with a specified audio format and length. The length is expressed in sample frames, not bytes. Several methods are provided for reading a certain number of bytes from the stream, or an unspecified number of bytes. The audio input stream keeps track of the last byte that was read. You can skip over an arbitrary number of bytes to get to a later position for reading. An audio input stream may support marks. When you set a mark, the current position is remembered so that you can return to it later.

The AudioSystem class includes many methods that manipulate AudioInputStream objects. For example, the methods let you:

  • obtain an audio input stream from an external audio file, stream, or URL
  • write an external file from an audio input stream
  • convert an audio input stream to a different audio format

Since:
1.3
See Also:
AudioSystem, Clip.open(AudioInputStream)

Field Summary
protected AudioFormat | format The format of the audio data contained in the stream.
protected long | frameLength This stream's length, in sample frames.
protected long | framePos The current position in this stream, in sample frames (zero-based).
protected int | frameSize The size of each frame, in bytes.
Constructor Summary
AudioInputStream(InputStream stream, AudioFormat format, long length)
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.
AudioInputStream(TargetDataLine line)
Constructs an audio input stream that reads its data from the target data line indicated.
Method Summary
int | available() Returns the maximum number of bytes that can be read (or skipped over) from this audio input stream without blocking.
void | close() Closes this audio input stream and releases any system resources associated with the stream.
AudioFormat | getFormat() Obtains the audio format of the sound data in this audio input stream.
long | getFrameLength() Obtains the length of the stream, expressed in sample frames rather than bytes.
void | mark(int readlimit) Marks the current position in this audio input stream.
boolean | markSupported() Tests whether this audio input stream supports the mark and reset methods.
int | read() Reads the next byte of data from the audio input stream.
int | read(byte[] b) Reads some number of bytes from the audio input stream and stores them into the buffer array b.
int | read(byte[] b, int off, int len) Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.
void | reset() Repositions this audio input stream to the position it had at the time its mark method was last invoked.
long | skip(long n) Skips over and discards a specified number of bytes from this audio input stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

format

protected AudioFormat format
The format of the audio data contained in the stream.

frameLength

protected long frameLength
This stream's length, in sample frames.

frameSize

protected int frameSize
The size of each frame, in bytes.

framePos

protected long framePos
The current position in this stream, in sample frames (zero-based).
Constructor Detail

AudioInputStream

public AudioInputStream(InputStream stream,
                        AudioFormat format,
                        long length)
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.
Parameters:
stream - the stream on which this AudioInputStream object is based
format - the format of this stream's audio data
length - the length in sample frames of the data in this stream

AudioInputStream

public AudioInputStream(TargetDataLine line)
Constructs an audio input stream that reads its data from the target data line indicated. The format of the stream is the same as that of the target data lin, and the length is AudioSystem#NOT_SPECIFIED.
Parameters:
line - the target data line from which this stream obtains its data.
See Also:
AudioSystem.NOT_SPECIFIED
Method Detail

getFormat

public AudioFormat getFormat()
Obtains the audio format of the sound data in this audio input stream.
Returns:
an audio format object describing this stream's format

getFrameLength

public long getFrameLength()
Obtains the length of the stream, expressed in sample frames rather than bytes.
Returns:
the length in sample frames

read

public int read()
         throws IOException
Reads the next byte of data from the audio input stream. The audio input stream's frame size must be one byte, or an IOException will be thrown.
Overrides:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached
Throws:
IOException - if an input or output error occurs
See Also:
read(byte[], int, int), read(byte[]),

read

public int read(byte[] b)
         throws IOException
Reads some number of bytes from the audio input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached
Throws:
IOException - if an input or output error occurs
See Also:
read(byte[], int, int),
read(),
available()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads up to a specified maximum number of bytes of data from the audio stream, putting them into the given byte array.
Overrides:
read in class InputStream
Parameters:
b - the buffer into which the data is read
off - the offset, from the beginning of array b, at which the data will be written
len - the maximum number of bytes to read
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached
Throws:
IOException - if an input or output error occurs
See Also:
read(byte[]), read(), skip(long), available()

skip

public long skip(long n)
          throws IOException
Skips over and discards a specified number of bytes from this audio input stream.
Overrides:
skip in class InputStream
Parameters:
n - the requested number of bytes to be skipped
Returns:
the actual number of bytes skipped
Throws:
IOException - if an input or output error occurs
See Also:
read(), available()

available

public int available()
              throws IOException
Returns the maximum number of bytes that can be read (or skipped over) from this audio input stream without blocking. This limit applies only to the next invocation of a read or skip method for this audio input stream; the limit can vary each time these methods are invoked.
Overrides:
available in class InputStream
Returns:
the number of bytes that can be read from this audio input stream without blocking
Throws:
IOException - if an input or output error occurs
See Also:
read(byte[], int, int), read(byte[]), read(), skip(long)

close

public void close()
           throws IOException
Closes this audio input stream and releases any system resources associated with the stream.
Overrides:
close in class InputStream
Throws:
IOException - if an input or output error occurs

mark

public void mark(int readlimit)
Marks the current position in this audio input stream.
Overrides:
mark in class InputStream
Parameters:
readlimit - the maximum number of bytes that can be read before the mark position becomes invalid.
See Also:
reset(), markSupported()

reset

public void reset()
           throws IOException
Repositions this audio input stream to the position it had at the time its mark method was last invoked.
Overrides:
reset in class InputStream
Throws:
IOException - if an input or output error occurs.
See Also:
mark(int), markSupported()

markSupported

public boolean markSupported()
Tests whether this audio input stream supports the mark and reset methods.
Overrides:
markSupported in class InputStream
Returns:
true if this stream supports the mark and reset methods; false otherwise
See Also:
mark(int), reset()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AudioPermission

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--javax.sound.sampled.AudioPermission
All Implemented Interfaces:
Guard, Serializable
public class AudioPermission
extends BasicPermission

The AudioPermission class represents access rights to the audio system resources. An AudioPermission contains a target name but no actions list; you either have the named permission or you don't.

The target name is the name of the audio permission (see the table below). The names follow the hierarchical property-naming convention. Also, an asterisk can be used to represent all the audio permissions.

The following table lists the possible AudioPermission target names. For each name, the table provides a description of exactly what that permission allows, as well as a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
play | Audio playback through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio playback (rendering). | In some cases use of this permission may affect other applications because the audio from one line may be mixed with other audio being played on the system, or because manipulation of a mixer affects the audio for all lines using that mixer.
record | Audio recording through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio recording (capture). | In some cases use of this permission may affect other applications because manipulation of a mixer affects the audio for all lines using that mixer. This permission can enable an applet or application to eavesdrop on a user.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
AudioPermission(String name)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
AudioPermission(String name, String actions)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AudioPermission

public AudioPermission(String name)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record". An asterisk can be used to indicate all audio permissions.
Parameters:
name - the name of the new AudioPermission

AudioPermission

public AudioPermission(String name,
                       String actions)
Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record". The actions parameter is currently unused and should be null. This constructor exists for use by the Policy class to instantiate new Permission objects.
Parameters:
name - the name of the new AudioPermission
actions - (unused; should be null)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AudioSystem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioSystem

java.lang.Object
  |
  +--javax.sound.sampled.AudioSystem
public class AudioSystem
extends Object

The AudioSystem class acts as the entry point to the sampled-audio system resources. This class lets you query and access the mixers that are installed on the system. AudioSystem includes a number of methods for converting audio data between different formats, and for translating between audio files and streams. It also provides a method for obtaining a Line directly from the AudioSystem without dealing explicitly with mixers.

Since:
1.3
See Also:
AudioFormat, AudioInputStream, Mixer, Line, Line.Info

Field Summary
static int NOT_SPECIFIED
An integer that stands for an unknown numeric value.
Method Summary
static AudioFileFormat | getAudioFileFormat(File file) Obtains the audio file format of the specified File.
static AudioFileFormat | getAudioFileFormat(InputStream stream) Obtains the audio file format of the provided input stream.
static AudioFileFormat | getAudioFileFormat(URL url) Obtains the audio file format of the specified URL.
static AudioFileFormat.Type[] | getAudioFileTypes() Obtains the file types for which file writing support is provided by the system.
static AudioFileFormat.Type[] | getAudioFileTypes(AudioInputStream stream) Obtains the file types that the system can write from the audio input stream specified.
static AudioInputStream | getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
static AudioInputStream | getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
static AudioInputStream | getAudioInputStream(File file) Obtains an audio input stream from the provided File.
static AudioInputStream | getAudioInputStream(InputStream stream) Obtains an audio input stream from the provided input stream.
static AudioInputStream | getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
static Line | getLine(Line.Info info) Obtains a line that matches the description in the specified Line.Info object.
static Mixer | getMixer(Mixer.Info info) Obtains the requested audio mixer.
static Mixer.Info[] | getMixerInfo() Obtains an array of mixer info objects that represents the set of audio mixers that are currently installed on the system.
static Line.Info[] | getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type that are supported by any installed mixer.
static AudioFormat.Encoding[] | getTargetEncodings(AudioFormat.Encoding sourceEncoding) Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
static AudioFormat.Encoding[] | getTargetEncodings(AudioFormat sourceFormat) Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
static AudioFormat[] | getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
static Line.Info[] | getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type that are supported by any installed mixer.
static boolean | isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
static boolean | isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat) Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
static boolean | isFileTypeSupported(AudioFileFormat.Type fileType) Indicates whether file writing support for the specified file type is provided by the system.
static boolean | isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
static boolean | isLineSupported(Line.Info info) Indicates whether the the system supports any lines that match the specified Line.Info object.
static int | write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
static int | write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NOT_SPECIFIED

public static final int NOT_SPECIFIED
An integer that stands for an unknown numeric value. This value is appropriate only for signed quantities that do not normally take negative values. Examples include file sizes, frame sizes, buffer sizes, and sample rates. A number of Java Sound constructors accept a value of NOT_SPECIFIED for such parameters. Other methods may also accept or return this value, as documented.
Method Detail

getMixerInfo

public static Mixer.Info[] getMixerInfo()
Obtains an array of mixer info objects that represents the set of audio mixers that are currently installed on the system.
Returns:
an array of info objects for the currently installed mixers. If no mixers are available on the system, an array of length 0 is returned.
See Also:
getMixer(javax.sound.sampled.Mixer.Info)

getMixer

public static Mixer getMixer(Mixer.Info info)
Obtains the requested audio mixer.
Parameters:
info - a Mixer.Info object representing the desired mixer, or null for the system default mixer
Returns:
the requested mixer
Throws:
SecurityException - if the requested mixer is unavailable because of security restrictions
IllegalArgumentException - if the info object does not represent a mixer installed on the system
See Also:
getMixerInfo()

getSourceLineInfo

public static Line.Info[] getSourceLineInfo(Line.Info info)
Obtains information about source lines of a particular type that are supported by any installed mixer.
Parameters:
info - a Line.Info object that specifies the kind of lines about which information is requested
Returns:
an array of Line.Info objects describing source lines matching the type requested. If no matching source lines are supported, an array of length 0 is returned.
See Also:
Mixer.getSourceLineInfo(Line.Info)

getTargetLineInfo

public static Line.Info[] getTargetLineInfo(Line.Info info)
Obtains information about target lines of a particular type that are supported by any installed mixer.
Parameters:
info - a Line.Info object that specifies the kind of lines about which information is requested
Returns:
an array of Line.Info objects describing target lines matching the type requested. If no matching target lines are supported, an array of length 0 is returned.
See Also:
Mixer.getTargetLineInfo(Line.Info)

isLineSupported

public static boolean isLineSupported(Line.Info info)
Indicates whether the the system supports any lines that match the specified Line.Info object. A line is supported if any installed mixer supports it.
Parameters:
info - a Line.Info object describing the line for which support is queried
Returns:
true if at least one matching line is supported, otherwise false
See Also:
Mixer.isLineSupported(Line.Info)

getLine

public static Line getLine(Line.Info info)
                    throws LineUnavailableException
Obtains a line that matches the description in the specified Line.Info object.
Parameters:
info - a Line.Info object describing the desired kind of line
Returns:
a line of the requested kind
Throws:
LineUnavailableException - if a matching line is not available due to resource restrictions
SecurityException - if a matching line is not available due to security restrictions
IllegalArgumentException - if the system does not support at least one line matching the specified Line.Info object through any installed mixer

getTargetEncodings

public static AudioFormat.Encoding[] getTargetEncodings(AudioFormat.Encoding sourceEncoding)
Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
Parameters:
sourceEncoding - the encoding for which conversion support is queried
Returns:
array of encodings. The array will always have a length of at least 1, representing the current encoding (no conversion).

getTargetEncodings

public static AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat)
Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
Parameters:
sourceFormat - the audio format for which conversion is queried
Returns:
array of encodings. The array will always have a length of at least 1, representing the current encoding (no conversion).

isConversionSupported

public static boolean isConversionSupported(AudioFormat.Encoding targetEncoding,
                                            AudioFormat sourceFormat)
Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
Parameters:
targetEncoding - the desired encoding after conversion
sourceFormat - the audio format before conversion
Returns:
true if the conversion is supported, otherwise false

getAudioInputStream

public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding,
                                                   AudioInputStream sourceStream)
Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
Parameters:
targetEncoding - the desired encoding after conversion
sourceStream - the stream to be converted
Returns:
an audio input stream of the indicated encoding
Throws:
IllegalArgumentException - if the conversion is not supported
See Also:
getTargetEncodings(AudioFormat.Encoding), getTargetEncodings(AudioFormat), isConversionSupported(AudioFormat.Encoding, AudioFormat), getAudioInputStream(AudioFormat, AudioInputStream)

getTargetFormats

public static AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding,
                                             AudioFormat sourceFormat)
Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
Parameters:
targetEncoding - the desired encoding after conversion
sourceFormat - the audio format before conversion
Returns:
array of formats. If no formats of the specified encoding are supported, an array of length 0 is returned.

isConversionSupported

public static boolean isConversionSupported(AudioFormat targetFormat,
                                            AudioFormat sourceFormat)
Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
Parameters:
targetFormat - the desired audio format after conversion
sourceFormat - the audio format before conversion
Returns:
true if the conversion is supported, otherwise false

getAudioInputStream

public static AudioInputStream getAudioInputStream(AudioFormat targetFormat,
                                                   AudioInputStream sourceStream)
Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
Parameters:
targetFormat - the desired audio format after conversion
sourceStream - the stream to be converted
Returns:
an audio input stream of the indicated format
Throws:
IllegalArgumentException - if the conversion is not supported #see #getTargetEncodings(AudioFormat)
See Also:
getTargetFormats(AudioFormat.Encoding, AudioFormat),
isConversionSupported(AudioFormat, AudioFormat),
getAudioInputStream(AudioFormat.Encoding, AudioInputStream)

getAudioFileFormat

public static AudioFileFormat getAudioFileFormat(InputStream stream)
                                          throws UnsupportedAudioFileException,
                                                 IOException
Obtains the audio file format of the provided input stream. The stream must point to valid audio file data. The implementation of this method may require multiple parsers to examine the stream to determine whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support these operations, this method may fail with an IOException.
Parameters:
stream - the input stream from which file format information should be extracted
Returns:
an AudioFileFormat object describing the stream's audio file format
Throws:
UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException - if an input/output exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getAudioFileFormat

public static AudioFileFormat getAudioFileFormat(URL url)
                                          throws UnsupportedAudioFileException,
                                                 IOException
Obtains the audio file format of the specified URL. The URL must point to valid audio file data.
Parameters:
url - the URL from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException - if an input/output exception occurs

getAudioFileFormat

public static AudioFileFormat getAudioFileFormat(File file)
                                          throws UnsupportedAudioFileException,
                                                 IOException
Obtains the audio file format of the specified File. The File must point to valid audio file data.
Parameters:
file - the File from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioInputStream

public static AudioInputStream getAudioInputStream(InputStream stream)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains an audio input stream from the provided input stream. The stream must point to valid audio file data. The implementation of this method may require multiple parsers to examine the stream to determine whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support these operation, this method may fail with an IOException.
Parameters:
stream - the input stream from which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data contained in the input stream.
Throws:
UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getAudioInputStream

public static AudioInputStream getAudioInputStream(URL url)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains an audio input stream from the URL provided. The URL must point to valid audio file data.
Parameters:
url - the URL for which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data pointed to by the URL
Throws:
UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioInputStream

public static AudioInputStream getAudioInputStream(File file)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains an audio input stream from the provided File. The File must point to valid audio file data.
Parameters:
file - the File for which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data pointed to by the File
Throws:
UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioFileTypes

public static AudioFileFormat.Type[] getAudioFileTypes()
Obtains the file types for which file writing support is provided by the system.
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

isFileTypeSupported

public static boolean isFileTypeSupported(AudioFileFormat.Type fileType)
Indicates whether file writing support for the specified file type is provided by the system.
Parameters:
fileType - the file type for which write capabilities are queried
Returns:
true if the file type is supported, otherwise false

getAudioFileTypes

public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)
Obtains the file types that the system can write from the audio input stream specified.
Parameters:
stream - the audio input stream for which audio file type support is queried
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

isFileTypeSupported

public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream)
Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
Parameters:
fileType - the file type for which write capabilities are queried
stream - the stream for which file-writing support is queried
Returns:
true if the file type is supported for this audio input stream, otherwise false

write

public static int write(AudioInputStream stream,
                        AudioFileFormat.Type fileType,
                        OutputStream out)
                 throws IOException
Writes a stream of bytes representing an audio file of the specified file type to the output stream provided. Some file types require that the length be written into the file header; such files cannot be written from start to finish unless the length is known in advance. An attempt to write a file of such a type will fail with an IOException if the length in the audio file type is AudioSystem.NOT_SPECIFIED.
Parameters:
stream - the audio input stream containing audio data to be written to the file
fileType - the kind of audio file to write
out - the stream to which the file data should be written
Returns:
the number of bytes written to the output stream
Throws:
IOException - if an input/output exception occurs
IllegalArgumentException - if the file type is not supported by the system
See Also:
isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type), getAudioFileTypes()

write

public static int write(AudioInputStream stream,
                        AudioFileFormat.Type fileType,
                        File out)
                 throws IOException
Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
Parameters:
stream - the audio input stream containing audio data to be written to the file
fileType - the kind of audio file to write
out - the external file to which the file data should be written
Returns:
the number of bytes written to the file
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file type is not supported by the system
See Also:
isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type), getAudioFileTypes()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanControl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class BooleanControl

java.lang.Object
  |
  +--javax.sound.sampled.Control
        |
        +--javax.sound.sampled.BooleanControl
public abstract class BooleanControl
extends Control

A BooleanControl provides the ability to switch between two possible settings that affect a line's audio. The settings are boolean values (true and false). A graphical user interface might represent the control by a two-state button, an on/off switch, two mutually exclusive buttons, or a checkbox (among other possibilities). For example, depressing a button might activate a MUTE control to silence the line's audio.

As with other Control subclasses, a method is provided that returns string labels for the values, suitable for display in the user interface.

Since:
1.3

Inner Class Summary
static class BooleanControl.Type
An instance of the BooleanControl.Type class identifies one kind of boolean control.
Inner classes inherited from class javax.sound.sampled.Control
Control.Type
Constructor Summary
protected | BooleanControl(BooleanControl.Type type, boolean initialValue) Constructs a new boolean control object with the given parameters.
protected | BooleanControl(BooleanControl.Type type, boolean initialValue, String trueStateLabel, String falseStateLabel) Constructs a new boolean control object with the given parameters.
Method Summary
String | getStateLabel(boolean state) Obtains the label for the specified state.
boolean | getValue() Obtains this control's current value.
void | setValue(boolean value) Sets the current value for the control.
String | toString() Provides a string representation of the control
Methods inherited from class javax.sound.sampled.Control
getType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanControl

protected BooleanControl(BooleanControl.Type type,
                         boolean initialValue,
                         String trueStateLabel,
                         String falseStateLabel)
Constructs a new boolean control object with the given parameters.
Parameters:
the - type of control represented this float control object
initialValue - the initial control value
trueStateLabel - the label for the state represented by true, such as "true" or "on."
falseStateLabel - the label for the state represented by false, such as "false" or "off."

BooleanControl

protected BooleanControl(BooleanControl.Type type,
                         boolean initialValue)
Constructs a new boolean control object with the given parameters. The labels for the true and false states default to "true" and "false."
Parameters:
the - type of control represented by this float control object
initialValue - the initial control value
Method Detail

setValue

public void setValue(boolean value)
Sets the current value for the control. The default implementation simply sets the value as indicated.
Parameters:
value - desired new value.

getValue

public boolean getValue()
Obtains this control's current value.
Returns:
current value.

getStateLabel

public String getStateLabel(boolean state)
Obtains the label for the specified state.
Returns:
the label for the specified state, such as "true" or "on" for true, or "false" or "off" for false.

toString

public String toString()
Provides a string representation of the control
Overrides:
toString in class Control
Returns:
a string description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.sound.sampled.AudioPermission

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioPermission

No usage of javax.sound.sampled.AudioPermission

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioSystem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioSystem

No usage of javax.sound.sampled.AudioSystem

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.BooleanControl

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.BooleanControl

No usage of javax.sound.sampled.BooleanControl

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.CompoundControl

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.CompoundControl

No usage of javax.sound.sampled.CompoundControl

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.DataLine.Info

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.DataLine.Info

No usage of javax.sound.sampled.DataLine.Info

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.EnumControl

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.EnumControl

No usage of javax.sound.sampled.EnumControl

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.FloatControl

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.FloatControl

No usage of javax.sound.sampled.FloatControl

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.ReverbType

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.ReverbType

No usage of javax.sound.sampled.ReverbType

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.Clip

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.Clip

No usage of javax.sound.sampled.Clip

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.Port

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.Port

No usage of javax.sound.sampled.Port

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.SourceDataLine

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.SourceDataLine

No usage of javax.sound.sampled.SourceDataLine

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioFileFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioFileFormat

Packages that use AudioFileFormat
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of AudioFileFormat in javax.sound.sampled

Methods in javax.sound.sampled that return AudioFileFormat
static AudioFileFormat | AudioSystem.getAudioFileFormat(InputStream stream) Obtains the audio file format of the provided input stream.
static AudioFileFormat | AudioSystem.getAudioFileFormat(URL url) Obtains the audio file format of the specified URL.
static AudioFileFormat | AudioSystem.getAudioFileFormat(File file) Obtains the audio file format of the specified File.

Uses of AudioFileFormat in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return AudioFileFormat
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(InputStream stream) Obtains the audio file format of the input stream provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(URL url) Obtains the audio file format of the URL provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(File file) Obtains the audio file format of the File provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioFileFormat.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioFileFormat.Type

Packages that use AudioFileFormat.Type
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of AudioFileFormat.Type in javax.sound.sampled

Fields in javax.sound.sampled declared as AudioFileFormat.Type
static AudioFileFormat.Type | AudioFileFormat.Type.WAVE Specifies a WAVE file.
static AudioFileFormat.Type | AudioFileFormat.Type.AU Specifies an AU file.
static AudioFileFormat.Type | AudioFileFormat.Type.AIFF Specifies an AIFF file.
static AudioFileFormat.Type | AudioFileFormat.Type.AIFC Specifies an AIFF-C file.
static AudioFileFormat.Type | AudioFileFormat.Type.SND Specifies a SND file.

Methods in javax.sound.sampled that return AudioFileFormat.Type
AudioFileFormat.Type | AudioFileFormat.getType() Obtains the audio file type, such as WAVE or AU.
static AudioFileFormat.Type[] | AudioSystem.getAudioFileTypes() Obtains the file types for which file writing support is provided by the system.
static AudioFileFormat.Type[] | AudioSystem.getAudioFileTypes(AudioInputStream stream) Obtains the file types that the system can write from the audio input stream specified.

Methods in javax.sound.sampled with parameters of type AudioFileFormat.Type
static boolean | AudioSystem.isFileTypeSupported(AudioFileFormat.Type fileType) Indicates whether file writing support for the specified file type is provided by the system.
static boolean | AudioSystem.isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the specified file type to the external file provided.

Constructors in javax.sound.sampled with parameters of type AudioFileFormat.Type
AudioFileFormat(AudioFileFormat.Type type, int byteLength, AudioFormat format, int frameLength)
Constructs an audio file format object.
AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength)
Constructs an audio file format object.

Uses of AudioFileFormat.Type in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return AudioFileFormat.Type
abstract AudioFileFormat.Type[] | AudioFileWriter.getAudioFileTypes() Obtains the file types for which file writing support is provided by this audio file writer.
abstract AudioFileFormat.Type[] | AudioFileWriter.getAudioFileTypes(AudioInputStream stream) Obtains the file types that this audio file writer can write from the audio input stream specified.

Methods in javax.sound.sampled.spi with parameters of type AudioFileFormat.Type
boolean | AudioFileWriter.isFileTypeSupported(AudioFileFormat.Type fileType) Indicates whether file writing support for the specified file type is provided by this audio file writer.
boolean | AudioFileWriter.isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the type specified can be written from the audio input stream indicated.
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioFormat

Packages that use AudioFormat
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of AudioFormat in javax.sound.sampled

Fields in javax.sound.sampled declared as AudioFormat
protected  AudioFormat AudioInputStream.format
The format of the audio data contained in the stream.

Methods in javax.sound.sampled that return AudioFormat
AudioFormat | AudioInputStream.getFormat() Obtains the audio format of the sound data in this audio input stream.
AudioFormat | DataLine.getFormat() Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
AudioFormat[] | DataLine.Info.getFormats() Obtains a set of audio formats supported by the data line.
AudioFormat | AudioFileFormat.getFormat() Obtains the format of the audio data contained in the audio file.
static AudioFormat[] | AudioSystem.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.

Methods in javax.sound.sampled with parameters of type AudioFormat
boolean | DataLine.Info.isFormatSupported(AudioFormat format) Indicates whether this data line supports a particular audio format.
static AudioFormat.Encoding[] | AudioSystem.getTargetEncodings(AudioFormat sourceFormat) Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
static boolean | AudioSystem.isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
static AudioFormat[] | AudioSystem.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
static boolean | AudioSystem.isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat) Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
boolean | AudioFormat.matches(AudioFormat format) Indicates whether this format matches the one specified.
void | Clip.open(AudioFormat format, byte[] data, int offset, int bufferSize) Opens the clip, meaning that it should acquire any required system resources and become operational.
void | TargetDataLine.open(AudioFormat format, int bufferSize) Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.
void | TargetDataLine.open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
void | SourceDataLine.open(AudioFormat format, int bufferSize) Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
void | SourceDataLine.open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.

Constructors in javax.sound.sampled with parameters of type AudioFormat
AudioInputStream(InputStream stream, AudioFormat format, long length)
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.
DataLine.Info(Class lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.
DataLine.Info(Class lineClass, AudioFormat format, int bufferSize)
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.
DataLine.Info(Class lineClass, AudioFormat format)
Constructs a data line's info object from the specified information, which includes a single audio format.
AudioFileFormat(AudioFileFormat.Type type, int byteLength, AudioFormat format, int frameLength)
Constructs an audio file format object.
AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength)
Constructs an audio file format object.

Uses of AudioFormat in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return AudioFormat
abstract  AudioFormat[] FormatConversionProvider.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat)
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.

Methods in javax.sound.sampled.spi with parameters of type AudioFormat
abstract AudioFormat.Encoding[] | FormatConversionProvider.getTargetEncodings(AudioFormat sourceFormat) Obtains the set of target format encodings supported by the format converter given a particular source format.
boolean | FormatConversionProvider.isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether the format converter supports conversion to a particular encoding from a particular format.
abstract AudioFormat[] | FormatConversionProvider.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
boolean | FormatConversionProvider.isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat) Indicates whether the format converter supports conversion to one particular format from another.
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream with the specified format from the given audio input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioFormat.Encoding

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioFormat.Encoding

Packages that use AudioFormat.Encoding
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of AudioFormat.Encoding in javax.sound.sampled

Fields in javax.sound.sampled declared as AudioFormat.Encoding
protected AudioFormat.Encoding | AudioFormat.encoding The audio encoding technique used by this format.
static AudioFormat.Encoding | AudioFormat.Encoding.PCM_SIGNED Specifies signed, linear PCM data.
static AudioFormat.Encoding | AudioFormat.Encoding.PCM_UNSIGNED Specifies unsigned, linear PCM data.
static AudioFormat.Encoding | AudioFormat.Encoding.ULAW Specifies u-law encoded data.
static AudioFormat.Encoding | AudioFormat.Encoding.ALAW Specifies a-law encoded data.

Methods in javax.sound.sampled that return AudioFormat.Encoding
static AudioFormat.Encoding[] | AudioSystem.getTargetEncodings(AudioFormat.Encoding sourceEncoding) Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
static AudioFormat.Encoding[] | AudioSystem.getTargetEncodings(AudioFormat sourceFormat) Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
AudioFormat.Encoding | AudioFormat.getEncoding() Obtains the type of encoding for sounds in this format.

Methods in javax.sound.sampled with parameters of type AudioFormat.Encoding
static AudioFormat.Encoding[] | AudioSystem.getTargetEncodings(AudioFormat.Encoding sourceEncoding) Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
static boolean | AudioSystem.isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
static AudioFormat[] | AudioSystem.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.

Constructors in javax.sound.sampled with parameters of type AudioFormat.Encoding
AudioFormat(AudioFormat.Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate, boolean bigEndian)
Constructs an AudioFormat with the given parameters.

Uses of AudioFormat.Encoding in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return AudioFormat.Encoding
abstract AudioFormat.Encoding[] | FormatConversionProvider.getSourceEncodings() Obtains the set of source format encodings from which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[] | FormatConversionProvider.getTargetEncodings() Obtains the set of target format encodings to which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[] | FormatConversionProvider.getTargetEncodings(AudioFormat sourceFormat) Obtains the set of target format encodings supported by the format converter given a particular source format.

Methods in javax.sound.sampled.spi with parameters of type AudioFormat.Encoding
boolean | FormatConversionProvider.isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding) Indicates whether the format converter supports conversion from the specified source format encoding.
boolean | FormatConversionProvider.isTargetEncodingSupported(AudioFormat.Encoding targetEncoding) Indicates whether the format converter supports conversion to the specified target format encoding.
boolean | FormatConversionProvider.isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether the format converter supports conversion to a particular encoding from a particular format.
abstract AudioFormat[] | FormatConversionProvider.getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream with the specified encoding from the given audio input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.AudioInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.AudioInputStream

Packages that use AudioInputStream
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of AudioInputStream in javax.sound.sampled

Methods in javax.sound.sampled that return AudioInputStream
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(InputStream stream) Obtains an audio input stream from the provided input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
static AudioInputStream | AudioSystem.getAudioInputStream(File file) Obtains an audio input stream from the provided File.

Methods in javax.sound.sampled with parameters of type AudioInputStream
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
static AudioFileFormat.Type[] | AudioSystem.getAudioFileTypes(AudioInputStream stream) Obtains the file types that the system can write from the audio input stream specified.
static boolean | AudioSystem.isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
static int | AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
void | Clip.open(AudioInputStream stream) Opens the clip with the format and audio data present in the provided audio input stream.

Uses of AudioInputStream in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return AudioInputStream
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream with the specified encoding from the given audio input stream.
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream with the specified format from the given audio input stream.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(InputStream stream) Obtains an audio input stream from the input stream provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(File file) Obtains an audio input stream from the File provided.

Methods in javax.sound.sampled.spi with parameters of type AudioInputStream
abstract AudioFileFormat.Type[] | AudioFileWriter.getAudioFileTypes(AudioInputStream stream) Obtains the file types that this audio file writer can write from the audio input stream specified.
boolean | AudioFileWriter.isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the type specified can be written from the audio input stream indicated.
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.
abstract int | AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream with the specified encoding from the given audio input stream.
abstract AudioInputStream | FormatConversionProvider.getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream with the specified format from the given audio input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.BooleanControl.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.BooleanControl.Type

Packages that use BooleanControl.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of BooleanControl.Type in javax.sound.sampled

Fields in javax.sound.sampled declared as BooleanControl.Type
static BooleanControl.Type | BooleanControl.Type.MUTE Represents a control for the mute status of a line.
static BooleanControl.Type | BooleanControl.Type.APPLY_REVERB Represents a control for whether reverberation is applied to a line.

Constructors in javax.sound.sampled with parameters of type BooleanControl.Type
BooleanControl(BooleanControl.Type type, boolean initialValue, String trueStateLabel, String falseStateLabel)
Constructs a new boolean control object with the given parameters.
BooleanControl(BooleanControl.Type type, boolean initialValue)
Constructs a new boolean control object with the given parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.CompoundControl.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.CompoundControl.Type

Packages that use CompoundControl.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of CompoundControl.Type in javax.sound.sampled

Constructors in javax.sound.sampled with parameters of type CompoundControl.Type
CompoundControl(CompoundControl.Type type, Control[] memberControls)
Constructs a new compound control object with the given parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.Control

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.Control

Packages that use Control
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Control in javax.sound.sampled

Subclasses of Control in javax.sound.sampled
class | BooleanControl A BooleanControl provides the ability to switch between two possible settings that affect a line's audio.
class | CompoundControl A CompoundControl, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as a Control.
class | EnumControl A EnumControl provides control over a set of discrete possible values, each represented by an object.
class | FloatControl A FloatControl object provides control over a range of floating-point values.

Methods in javax.sound.sampled that return Control
Control[] | Line.getControls() Obtains the set of controls associated with this line.
Control | Line.getControl(Control.Type control) Obtains a control of the specified type, if there is any.
Control[] | CompoundControl.getMemberControls() Returns the set of member controls that comprise the compound control.

Constructors in javax.sound.sampled with parameters of type Control
CompoundControl(CompoundControl.Type type, Control[] memberControls)
Constructs a new compound control object with the given parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.Control.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.Control.Type

Packages that use Control.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Control.Type in javax.sound.sampled

Subclasses of Control.Type in javax.sound.sampled
static class | BooleanControl.Type An instance of the BooleanControl.Type class identifies one kind of boolean control.
static class | CompoundControl.Type An instance of the CompoundControl.Type inner class identifies one kind of compound control.
static class | EnumControl.Type An instance of the EnumControl.Type inner class identifies one kind of enumerated control.
static class | FloatControl.Type An instance of the FloatControl.Type inner class identifies one kind of float control.

Methods in javax.sound.sampled that return Control.Type
 Control.Type Control.getType()
Obtains the control's type.

Methods in javax.sound.sampled with parameters of type Control.Type
boolean | Line.isControlSupported(Control.Type control) Indicates whether the line supports a control of the specified type.
Control | Line.getControl(Control.Type control) Obtains a control of the specified type, if there is any.

Constructors in javax.sound.sampled with parameters of type Control.Type
Control(Control.Type type)
Constructs a Control with the specified type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.EnumControl.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.EnumControl.Type

Packages that use EnumControl.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of EnumControl.Type in javax.sound.sampled

Fields in javax.sound.sampled declared as EnumControl.Type
static EnumControl.Type EnumControl.Type.REVERB
Represents a control over a set of possible reverberation settings.

Constructors in javax.sound.sampled with parameters of type EnumControl.Type
EnumControl(EnumControl.Type type, Object[] values, Object value)
Constructs a new enumerated control object with the given parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.FloatControl.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.FloatControl.Type

Packages that use FloatControl.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of FloatControl.Type in javax.sound.sampled

Fields in javax.sound.sampled declared as FloatControl.Type
static FloatControl.Type | FloatControl.Type.MASTER_GAIN Represents a control for the overall gain on a line.
static FloatControl.Type | FloatControl.Type.AUX_SEND Represents a control for the auxiliary send gain on a line.
static FloatControl.Type | FloatControl.Type.AUX_RETURN Represents a control for the auxiliary return gain on a line.
static FloatControl.Type | FloatControl.Type.REVERB_SEND Represents a control for the pre-reverb gain on a line.
static FloatControl.Type | FloatControl.Type.REVERB_RETURN Represents a control for the post-reverb gain on a line.
static FloatControl.Type | FloatControl.Type.VOLUME Represents a control for the volume on a line.
static FloatControl.Type | FloatControl.Type.PAN Represents a control for the relative pan (left-right positioning) of the signal.
static FloatControl.Type | FloatControl.Type.BALANCE Represents a control for the relative balance of a stereo signal between two stereo speakers.
static FloatControl.Type | FloatControl.Type.SAMPLE_RATE Represents a control that changes the sample rate of audio playback.

Constructors in javax.sound.sampled with parameters of type FloatControl.Type
FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)
Constructs a new float control object with the given parameters
FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)
Constructs a new float control object with the given parameters.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.Line.Info

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.Line.Info

Packages that use Line.Info
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Line.Info in javax.sound.sampled

Subclasses of Line.Info in javax.sound.sampled
static class | DataLine.Info Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines.
static class | Port.Info The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.

Methods in javax.sound.sampled that return Line.Info
Line.Info | Line.getLineInfo() Obtains the Line.Info object describing this line.
Line.Info[] | Mixer.getSourceLineInfo() Obtains information about the set of source lines supported by this mixer.
Line.Info[] | Mixer.getTargetLineInfo() Obtains information about the set of target lines supported by this mixer.
Line.Info[] | Mixer.getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type supported by the mixer.
Line.Info[] | Mixer.getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type supported by the mixer.
static Line.Info[] | AudioSystem.getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type that are supported by any installed mixer.
static Line.Info[] | AudioSystem.getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type that are supported by any installed mixer.

Methods in javax.sound.sampled with parameters of type Line.Info
boolean | Line.Info.matches(Line.Info info) Indicates whether the specified info object matches this one.
boolean | DataLine.Info.matches(Line.Info info) Determines whether the specified info object matches this one.
Line.Info[] | Mixer.getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type supported by the mixer.
Line.Info[] | Mixer.getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type supported by the mixer.
boolean | Mixer.isLineSupported(Line.Info info) Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object.
Line | Mixer.getLine(Line.Info info) Obtains a line that is available for use and that matches the description in the specified Line.Info object.
int | Mixer.getMaxLines(Line.Info info) Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer.
static Line.Info[] | AudioSystem.getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type that are supported by any installed mixer.
static Line.Info[] | AudioSystem.getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type that are supported by any installed mixer.
static boolean | AudioSystem.isLineSupported(Line.Info info) Indicates whether the the system supports any lines that match the specified Line.Info object.
static Line | AudioSystem.getLine(Line.Info info) Obtains a line that matches the description in the specified Line.Info object.
boolean | Port.Info.matches(Line.Info info) Indicates whether this info object specified matches this one.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.LineEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.LineEvent

Packages that use LineEvent
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of LineEvent in javax.sound.sampled

Methods in javax.sound.sampled with parameters of type LineEvent
 void LineListener.update(LineEvent event)
Informs the listener that a line's state has changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.LineEvent.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.LineEvent.Type

Packages that use LineEvent.Type
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of LineEvent.Type in javax.sound.sampled

Fields in javax.sound.sampled declared as LineEvent.Type
static LineEvent.Type | LineEvent.Type.OPEN A type of event that is sent when a line opens, reserving system resources for itself.
static LineEvent.Type | LineEvent.Type.CLOSE A type of event that is sent when a line closes, freeing the system resources it had obtained when it was opened.
static LineEvent.Type | LineEvent.Type.START A type of event that is sent when a line begins to engage in active input or output of audio data in response to a start request.
static LineEvent.Type | LineEvent.Type.STOP A type of event that is sent when a line ceases active input or output of audio data in response to a stop request, or because the end of media has been reached.

Methods in javax.sound.sampled that return LineEvent.Type
 LineEvent.Type LineEvent.getType()
Obtains the event's type.

Constructors in javax.sound.sampled with parameters of type LineEvent.Type
LineEvent(Line line, LineEvent.Type type, long position)
Constructs a new event of the specified type, originating from the specified line.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.LineUnavailableException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.LineUnavailableException

Packages that use LineUnavailableException
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of LineUnavailableException in javax.sound.sampled

Methods in javax.sound.sampled that throw LineUnavailableException
void | Line.open() Opens the line, indicating that it should acquire any required system resources and become operational.
Line | Mixer.getLine(Line.Info info) Obtains a line that is available for use and that matches the description in the specified Line.Info object.
static Line | AudioSystem.getLine(Line.Info info) Obtains a line that matches the description in the specified Line.Info object.
void | Clip.open(AudioFormat format, byte[] data, int offset, int bufferSize) Opens the clip, meaning that it should acquire any required system resources and become operational.
void | Clip.open(AudioInputStream stream) Opens the clip with the format and audio data present in the provided audio input stream.
void | TargetDataLine.open(AudioFormat format, int bufferSize) Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.
void | TargetDataLine.open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
void | SourceDataLine.open(AudioFormat format, int bufferSize) Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
void | SourceDataLine.open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.Mixer.Info

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.Mixer.Info

Packages that use Mixer.Info
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of Mixer.Info in javax.sound.sampled

Methods in javax.sound.sampled that return Mixer.Info
Mixer.Info | Mixer.getMixerInfo() Obtains information about this mixer, including the product's name, version, vendor, etc.
static Mixer.Info[] | AudioSystem.getMixerInfo() Obtains an array of mixer info objects that represents the set of audio mixers that are currently installed on the system.

Methods in javax.sound.sampled with parameters of type Mixer.Info
static Mixer AudioSystem.getMixer(Mixer.Info info)
Obtains the requested audio mixer.

Uses of Mixer.Info in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return Mixer.Info
abstract  Mixer.Info[] MixerProvider.getMixerInfo()
Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.

Methods in javax.sound.sampled.spi with parameters of type Mixer.Info
boolean | MixerProvider.isMixerSupported(Mixer.Info info) Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.
abstract Mixer | MixerProvider.getMixer(Mixer.Info info) Obtains an instance of the mixer represented by the info object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.Port.Info

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.Port.Info

Packages that use Port.Info
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Port.Info in javax.sound.sampled

Fields in javax.sound.sampled declared as Port.Info
static Port.Info | Port.Info.MICROPHONE A type of port that gets audio from a built-in microphone or a microphone jack.
static Port.Info | Port.Info.LINE_IN A type of port that gets audio from a line-level audio input jack.
static Port.Info | Port.Info.COMPACT_DISC A type of port that gets audio from a CD-ROM drive.
static Port.Info | Port.Info.SPEAKER A type of port that sends audio to a built-in speaker or a speaker jack.
static Port.Info | Port.Info.HEADPHONE A type of port that sends audio to a headphone jack.
static Port.Info | Port.Info.LINE_OUT A type of port that sends audio to a line-level audio output jack.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.UnsupportedAudioFileException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.UnsupportedAudioFileException

Packages that use UnsupportedAudioFileException
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of UnsupportedAudioFileException in javax.sound.sampled

Methods in javax.sound.sampled that throw UnsupportedAudioFileException
static AudioFileFormat | AudioSystem.getAudioFileFormat(InputStream stream) Obtains the audio file format of the provided input stream.
static AudioFileFormat | AudioSystem.getAudioFileFormat(URL url) Obtains the audio file format of the specified URL.
static AudioFileFormat | AudioSystem.getAudioFileFormat(File file) Obtains the audio file format of the specified File.
static AudioInputStream | AudioSystem.getAudioInputStream(InputStream stream) Obtains an audio input stream from the provided input stream.
static AudioInputStream | AudioSystem.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
static AudioInputStream | AudioSystem.getAudioInputStream(File file) Obtains an audio input stream from the provided File.

Uses of UnsupportedAudioFileException in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that throw UnsupportedAudioFileException
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(InputStream stream) Obtains the audio file format of the input stream provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(URL url) Obtains the audio file format of the URL provided.
abstract AudioFileFormat | AudioFileReader.getAudioFileFormat(File file) Obtains the audio file format of the File provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(InputStream stream) Obtains an audio input stream from the input stream provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
abstract AudioInputStream | AudioFileReader.getAudioInputStream(File file) Obtains an audio input stream from the File provided.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.DataLine

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.DataLine

Packages that use DataLine
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of DataLine in javax.sound.sampled

Subinterfaces of DataLine in javax.sound.sampled
interface | Clip The Clip interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.
interface | SourceDataLine A source data line is a data line to which data may be written.
interface | TargetDataLine A target data line is a type of DataLine from which audio data can be read.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.Line

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.Line

Packages that use Line
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of Line in javax.sound.sampled

Subinterfaces of Line in javax.sound.sampled
interface | Clip The Clip interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.
interface | DataLine DataLine adds media-related functionality to its superinterface, Line.
interface | Mixer A mixer is an audio device with one or more lines.
interface | Port Ports are simple lines for input or output of audio to or from audio devices.
interface | SourceDataLine A source data line is a data line to which data may be written.
interface | TargetDataLine A target data line is a type of DataLine from which audio data can be read.

Methods in javax.sound.sampled that return Line
Line | Mixer.getLine(Line.Info info) Obtains a line that is available for use and that matches the description in the specified Line.Info object.
Line[] | Mixer.getSourceLines() Obtains the set of all source lines currently open to this mixer.
Line[] | Mixer.getTargetLines() Obtains the set of all target lines currently open from this mixer.
static Line | AudioSystem.getLine(Line.Info info) Obtains a line that matches the description in the specified Line.Info object.
Line | LineEvent.getLine() Obtains the audio line that is the source of this event.

Methods in javax.sound.sampled with parameters of type Line
void | Mixer.synchronize(Line[] lines, boolean maintainSync) Synchronizes two or more lines.
void | Mixer.unsynchronize(Line[] lines) Releases synchronization for the specified lines.
boolean | Mixer.isSynchronizationSupported(Line[] lines, boolean maintainSync) Reports whether this mixer supports synchronization of the specified set of lines.

Constructors in javax.sound.sampled with parameters of type Line
LineEvent(Line line, LineEvent.Type type, long position)
Constructs a new event of the specified type, originating from the specified line.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.LineListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.LineListener

Packages that use LineListener
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of LineListener in javax.sound.sampled

Methods in javax.sound.sampled with parameters of type LineListener
void | Line.addLineListener(LineListener listener) Adds a listener to this line.
void | Line.removeLineListener(LineListener listener) Removes the specified listener from this line's list of listeners.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.Mixer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.Mixer

Packages that use Mixer
javax.sound.sampled | Provides interfaces and classes for capture, processing, and playback of sampled audio data.
javax.sound.sampled.spi | Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Uses of Mixer in javax.sound.sampled

Methods in javax.sound.sampled that return Mixer
static Mixer AudioSystem.getMixer(Mixer.Info info)
Obtains the requested audio mixer.

Uses of Mixer in javax.sound.sampled.spi

Methods in javax.sound.sampled.spi that return Mixer
abstract  Mixer MixerProvider.getMixer(Mixer.Info info)
Obtains an instance of the mixer represented by the info object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.sound.sampled.TargetDataLine

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.sound.sampled.TargetDataLine

Packages that use TargetDataLine
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data.

Uses of TargetDataLine in javax.sound.sampled

Constructors in javax.sound.sampled with parameters of type TargetDataLine
AudioInputStream(TargetDataLine line)
Constructs an audio input stream that reads its data from the target data line indicated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Clip

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface Clip

All Superinterfaces:
DataLine, Line
public interface Clip
extends DataLine

The Clip interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.

Because the data is pre-loaded and has a known length, you can set a clip to start playing at any position in its audio data. You can also create a loop, so that when the clip is played it will cycle repeatedly. Loops are specified with a starting and ending sample frame, along with the number of times that the loop should be played.

Clips may be obtained from a Mixer that supports lines of this type. Data is loaded into a clip when it is opened.

Playback of an audio clip may be started and stopped using the start and stop methods. These methods do not reset the media position; start causes playback to continue from the position where playback was last stopped. To restart playback from the beginning of the clip's audio data, simply follow the invocation of stop with setFramePosition(0), which rewinds the media to the beginning of the clip.

Since:
1.3

Inner classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Field Summary
static int LOOP_CONTINUOUSLY
A value indicating that looping should continue indefinitely rather than complete after a specific number of loops.
Method Summary
int | getFrameLength() Obtains the media length in sample frames.
long | getMicrosecondLength() Obtains the media duration in microseconds
void | loop(int count) Starts looping playback from the current position.
void | open(AudioFormat format, byte[] data, int offset, int bufferSize) Opens the clip, meaning that it should acquire any required system resources and become operational.
void | open(AudioInputStream stream) Opens the clip with the format and audio data present in the provided audio input stream.
void | setFramePosition(int frames) Sets the media position in sample frames.
void | setLoopPoints(int start, int end) Sets the first and last sample frames that will be played in the loop.
void | setMicrosecondPosition(long microseconds) Sets the media position in microseconds.
Methods inherited from interface javax.sound.sampled.DataLine
available, drain, flush, getBufferSize, getFormat, getFramePosition, getLevel, getMicrosecondPosition, isActive, isRunning, start, stop
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Field Detail

LOOP_CONTINUOUSLY

public static final int LOOP_CONTINUOUSLY
A value indicating that looping should continue indefinitely rather than complete after a specific number of loops.
See Also:
loop(int)
Method Detail

open

public void open(AudioFormat format,
                 byte[] data,
                 int offset,
                 int bufferSize)
          throws LineUnavailableException
Opens the clip, meaning that it should acquire any required system resources and become operational. The clip is opened with the format and audio data indicated. If this operation succeeds, the line is marked as open and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.

Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
format - the format of the supplied audio data
data - a byte array containing audio data to load into the clip
offset - the point at which to start copying, expressed in bytes from the beginning of the array
bufferSize - the number of bytes of data to load into the clip from the array.
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IllegalArgumentException - if the buffer size does not represent an integral number of sample frames
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
Line.close(), Line.isOpen(), LineListener

open

public void open(AudioInputStream stream)
          throws LineUnavailableException,
                 IOException
Opens the clip with the format and audio data present in the provided audio input stream. Opening a clip means that it should acquire any required system resources and become operational. If this operation input stream. If this operation succeeds, the line is marked open and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.

Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
stream - an audio input stream from which audio data will be read into the clip
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IOException - if an I/O exception occurs during reading of the stream
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
Line.close(), Line.isOpen(), LineListener

getFrameLength

public int getFrameLength()
Obtains the media length in sample frames.
Returns:
the media length, expressed in sample frames, or AudioSystem.NOT_SPECIFIED if the line is not open.
See Also:
AudioSystem.NOT_SPECIFIED

getMicrosecondLength

public long getMicrosecondLength()
Obtains the media duration in microseconds
Returns:
the media duration, expressed in microseconds, or AudioSystem.NOT_SPECIFIED if the line is not open.
See Also:
AudioSystem.NOT_SPECIFIED

setFramePosition

public void setFramePosition(int frames)
Sets the media position in sample frames. The position is zero-based; the first frame is frame number zero. When the clip begins playing the next time, it will start by playing the frame at this position.

To obtain the current position in sample frames, use the getFramePosition method of DataLine.

Parameters:
frames - the desired new media position, expressed in sample frames

setMicrosecondPosition

public void setMicrosecondPosition(long microseconds)
Sets the media position in microseconds. When the clip begins playing the next time, it will start at this position. The level of precision is not guaranteed. For example, an implementation might calculate the microsecond position from the current frame position and the audio sample frame rate. The precision in microseconds would then be limited to the number of microseconds per sample frame.

To obtain the current position in microseconds, use the getMicrosecondPosition method of DataLine.

Parameters:
microseconds - the desired new media position, expressed in microseconds

setLoopPoints

public void setLoopPoints(int start,
                          int end)
Sets the first and last sample frames that will be played in the loop. The ending point must be greater than or equal to the starting point, and both must fall within the the size of the loaded media. A value of 0 for the starting point means the beginning of the loaded media. Similarly, a value of -1 for the ending point indicates the last frame of the media.
Parameters:
start - the loop's starting position, in sample frames (zero-based)
end - the loop's ending position, in sample frames (zero-based), or -1 to indicate the final frame
Throws:
IllegalArgumentException - if the requested loop points cannot be set, usually because one or both falls outside the media's duration or because the ending point is before the starting point

loop

public void loop(int count)
Starts looping playback from the current position. Playback will continue to the loop's end point, then loop back to the loop start point count times, and finally continue playback to the end of the clip.

If the current position when this method is invoked is greater than the loop end point, playback simply continues to the end of the clip without looping.

A count value of 0 indicates that any current looping should cease and playback should continue to the end of the clip. The behavior is undefined when this method is invoked with any other value during a loop operation.

If playback is stopped during looping, the current loop status is cleared; the behavior of subsequent loop and start requests is not affected by an interrupted loop operation.

Parameters:
count - the number of times playback should loop back from the loop's end position to the loop's start position, or LOOP_CONTINUOUSLY to indicate that looping should continue until interrupted
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CompoundControl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class CompoundControl

java.lang.Object
  |
  +--javax.sound.sampled.Control
        |
        +--javax.sound.sampled.CompoundControl
public abstract class CompoundControl
extends Control

A CompoundControl, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as a Control.

Since:
1.3

Inner Class Summary
static class CompoundControl.Type
An instance of the CompoundControl.Type inner class identifies one kind of compound control.
Inner classes inherited from class javax.sound.sampled.Control
Control.Type
Constructor Summary
protected CompoundControl(CompoundControl.Type type, Control[] memberControls)
Constructs a new compound control object with the given parameters.
Method Summary
Control[] | getMemberControls() Returns the set of member controls that comprise the compound control.
String | toString() Provides a string representation of the control
Methods inherited from class javax.sound.sampled.Control
getType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CompoundControl

protected CompoundControl(CompoundControl.Type type,
                          Control[] memberControls)
Constructs a new compound control object with the given parameters.
Parameters:
the - type of control represented this compound control object
memberControls - the set of member controls
Method Detail

getMemberControls

public Control[] getMemberControls()
Returns the set of member controls that comprise the compound control.
Returns:
the set of member controls.

toString

public String toString()
Provides a string representation of the control
Overrides:
toString in class Control
Returns:
a string description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Control

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class Control

java.lang.Object
  |
  +--javax.sound.sampled.Control
Direct Known Subclasses:
BooleanControl, CompoundControl, EnumControl, FloatControl
public abstract class Control
extends Object

Lines often have a set of controls, such as gain and pan, that affect the audio signal passing through the line. Java Sound's Line objects let you obtain a particular control object by passing its class as the argument to a getControl method.

Because the various types of controls have different purposes and features, all of their functionality is accessed from the subclasses that define each kind of control.

Since:
1.3
See Also:
Line.getControls(), Line.isControlSupported(javax.sound.sampled.Control.Type)

Inner Class Summary
static class Control.Type
An instance of the Type class represents the type of the control.
Constructor Summary
protected Control(Control.Type type)
Constructs a Control with the specified type.
Method Summary
Control.Type | getType() Obtains the control's type.
String | toString() Obtains a String describing the control type and its current state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Control

protected Control(Control.Type type)
Constructs a Control with the specified type.
Parameters:
type - the kind of control desired
Method Detail

getType

public Control.Type getType()
Obtains the control's type.
Returns:
the control's type.

toString

public String toString()
Obtains a String describing the control type and its current state.
Overrides:
toString in class Object
Returns:
a String representation of the Control.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataLine

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface DataLine

All Superinterfaces:
Line
All Known Subinterfaces:
Clip, SourceDataLine, TargetDataLine
public interface DataLine
extends Line

DataLine adds media-related functionality to its superinterface, Line. This functionality includes transport-control methods that start, stop, drain, and flush the audio data that passes through the line. A data line can also report the current position, volume, and audio format of the media. Data lines are used for output of audio by means of the subinterfaces SourceDataLine or Clip, which allow an application program to write data. Similarly, audio input is handled by the subinterface TargetDataLine, which allows data to be read.

A data line has an internal buffer in which the incoming or outgoing audio data is queued. The drain() method blocks until this internal buffer becomes empty, usually because all queued data has been processed. The flush() method discards any available queued data from the internal buffer.

A data line produces START and STOP events whenever it begins or ceases active presentation or capture of data. These events can be generated in response to specific requests, or as a result of less direct state changes. For example, if start() is called on an inactive data line, and data is available for capture or playback, a START event will be generated shortly, when data playback or capture actually begins. Or, if the flow of data to an active data line is constricted so that a gap occurs in the presentation of data, a STOP event is generated.

Mixers often support synchronized control of multiple data lines. Synchronization can be established through the Mixer interface's synchronize method. See the description of the Mixer interface for a more complete description.

Since:
1.3
See Also:
LineEvent

Inner Class Summary
static class DataLine.Info
Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines.
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Method Summary
int | available() Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer.
void | drain() Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied.
void | flush() Flushes queued data from the line.
int | getBufferSize() Obtains the maximum number of bytes of data that will fit in the data line's internal buffer.
AudioFormat | getFormat() Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
int | getFramePosition() Obtains the current position in the audio data, in sample frames.
float | getLevel() Obtains the current volume level for the line.
long | getMicrosecondPosition() Obtains the current position in the audio data, in microseconds.
boolean | isActive() Indicates whether the line is engaging in active I/O (such as playback or capture).
boolean | isRunning() Indicates whether the line is running.
void | start() Allows a line to engage in data I/O.
void | stop() Stops the line.
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Method Detail

drain

public void drain()
Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied. This method blocks until the draining is complete. Because this is a blocking method, it should be used with care. If drain() is invoked on a stopped line that has data in its queue, the method will block until the line is running and the data queue becomes empty. If drain() is invoked by one thread, and another continues to fill the data queue, the operation will not complete. This method always returns when the data line is closed.
See Also:
flush()

flush

public void flush()
Flushes queued data from the line. The flushed data is discarded. In some cases, not all queued data can be discarded. For example, a mixer can flush data from the buffer for a specific input line, but any unplayed data already in the output buffer (the result of the mix) will still be played. You can invoke this method after pausing a line (the normal case) if you want to skip the "stale" data when you restart playback or capture. (It is legal to flush a line that is not stopped, but doing so on an active line is likely to cause a discontinuity in the data, resulting in a perceptible click.)
See Also:
stop(), drain()

start

public void start()
Allows a line to engage in data I/O. If invoked on a line that is already running, this method does nothing. Unless the data in the buffer has been flushed, the line resumes I/O starting with the first frame that was unprocessed at the time the line was stopped. When audio capture or playback starts, a START event is generated.
See Also:
stop(), isRunning(), LineEvent

stop

public void stop()
Stops the line. A stopped line should cease I/O activity. If the line is open and running, however, it should retain the resources required to resume activity. A stopped line should retain any audio data in its buffer instead of discarding it, so that upon resumption the I/O can continue where it left off, if possible. (This doesn't guarantee that there will never be discontinuities beyond the current buffer, of course; if the stopped condition continues for too long, input or output samples might be dropped.) If desired, the retained data can be discarded by invoking the flush method. When audio capture or playback stops, a STOP event is generated.
See Also:
start(),
isRunning(),
flush(),
LineEvent

isRunning

public boolean isRunning()
Indicates whether the line is running. The default is false. An open line begins running when the first data is presented in response to an invocation of the start method, and continues until presentation ceases in response to a call to stop or because playback completes.
Returns:
true if the line is running, otherwise false
See Also:
start(), stop()

isActive

public boolean isActive()
Indicates whether the line is engaging in active I/O (such as playback or capture). When an inactive line becomes active, it sends a START event to its listeners. Similarly, when an active line becomes inactive, it sends a STOP event.
Returns:
true if the line is actively capturing or rendering sound, otherwise false
See Also:
Line.isOpen(),
Line.addLineListener(javax.sound.sampled.LineListener),
Line.removeLineListener(javax.sound.sampled.LineListener),
LineEvent,
LineListener

getFormat

public AudioFormat getFormat()
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
Returns:
current audio data format
See Also:
AudioFormat

getBufferSize

public int getBufferSize()
Obtains the maximum number of bytes of data that will fit in the data line's internal buffer. For a source data line, this is the size of the buffer to which data can be written. For a target data line, it is the size of the buffer from which data can be read. Note that the units used are bytes, but will always correspond to an integral number of sample frames of audio data.
Returns:
the size of the buffer in bytes

available

public int available()
Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer. For a source data line, this is the amount of data that can be written to the buffer without blocking. For a target data line, this is the amount of data available to be read by the application. For a clip, this value is always 0 because the audio data is loaded into the buffer when the clip is opened, and persists without modification until the clip is closed.

Note that the units used are bytes, but will always correspond to an integral number of sample frames of audio data.

An application is guaranteed that a read or write operation of up to the number of bytes returned from available() will not block; however, there is no guarantee that attempts to read or write more data will block.

Returns:
the amount of data available, in bytes

getFramePosition

public int getFramePosition()
Obtains the current position in the audio data, in sample frames. The frame position measures the number of sample frames captured by, or rendered from, the line since it was opened.
Returns:
the number of frames already processed since the line was opened

getMicrosecondPosition

public long getMicrosecondPosition()
Obtains the current position in the audio data, in microseconds. The microsecond position measures the time corresponding to the number of sample frames captured by, or rendered from, the line since it was opened. The level of precision is not guaranteed. For example, an implementation might calculate the microsecond position from the current frame position and the audio sample frame rate. The precision in microseconds would then be limited to the number of microseconds per sample frame.
Returns:
the number of microseconds of data processed since the line was opened

getLevel

public float getLevel()
Obtains the current volume level for the line. This level is a measure of the signal's current amplitude, and should not be confused with the current setting of a gain control. The range is from 0.0 (silence) to 1.0 (maximum possible amplitude for the sound waveform). The units measure linear amplitude, not decibels.
Returns:
the current amplitude of the signal in this line, or AudioSystem.NOT_SPECIFIED
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Encoding

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioFormat.Encoding

java.lang.Object
  |
  +--javax.sound.sampled.AudioFormat.Encoding
Enclosing class:
AudioFormat
public static class AudioFormat.Encoding
extends Object

The Encoding class names the specific type of data representation used for an audio stream. The encoding includes aspects of the sound format other than the number of channels, sample rate, sample size, frame rate, frame size, and byte order.

One ubiquitous type of audio encoding is pulse-code modulation (PCM), which is simply a linear (proportional) representation of the sound waveform. With PCM, the number stored in each sample is proportional to the instantaneous amplitude of the sound pressure at that point in time. The numbers are frequently signed or unsigned integers. Besides PCM, other encodings include mu-law and a-law, which are nonlinear mappings of the sound amplitude that are often used for recording speech.

You can use a predefined encoding by referring to one of the static objects created by this class, such as PCM_SIGNED or PCM_UNSIGNED. Service providers can create new encodings, such as compressed audio formats or floating-point PCM samples, and make these available through the AudioSystem class.

The Encoding class is static, so that all AudioFormat objects that have the same encoding will refer to the same object (rather than different instances of the same class). This allows matches to be made by checking that two format's encodings are equal.

Since:
1.3
See Also:
AudioFormat, FormatConversionProvider

Field Summary
static AudioFormat.Encoding | ALAW Specifies a-law encoded data.
static AudioFormat.Encoding | PCM_SIGNED Specifies signed, linear PCM data.
static AudioFormat.Encoding | PCM_UNSIGNED Specifies unsigned, linear PCM data.
static AudioFormat.Encoding | ULAW Specifies u-law encoded data.
Constructor Summary
protected AudioFormat.Encoding(String name)
Constructs a new encoding.
Method Summary
boolean | equals(Object obj) Finalizes the equals method
int | hashCode() Finalizes the hashCode method
String | toString() Provides the String representation of the encoding.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

PCM_SIGNED

public static final AudioFormat.Encoding PCM_SIGNED
Specifies signed, linear PCM data.

PCM_UNSIGNED

public static final AudioFormat.Encoding PCM_UNSIGNED
Specifies unsigned, linear PCM data.

ULAW

public static final AudioFormat.Encoding ULAW
Specifies u-law encoded data.

ALAW

public static final AudioFormat.Encoding ALAW
Specifies a-law encoded data.
Constructor Detail

AudioFormat.Encoding

protected AudioFormat.Encoding(String name)
Constructs a new encoding.
Parameters:
name - the name of the new type of encoding
Method Detail

equals

public final boolean equals(Object obj)
Finalizes the equals method
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Finalizes the hashCode method
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides the String representation of the encoding. This String is the same name that was passed to the constructor. For the predefined encodings, the name is similar to the encoding's variable (field) name. For example, PCM_SIGNED.toString() returns the name "pcm_signed".
Overrides:
toString in class Object
Returns:
the encoding name
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnumControl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class EnumControl

java.lang.Object
  |
  +--javax.sound.sampled.Control
        |
        +--javax.sound.sampled.EnumControl
public abstract class EnumControl
extends Control

A EnumControl provides control over a set of discrete possible values, each represented by an object. In a graphical user interface, such a control might be represented by a set of buttons, each of which chooses one value or setting. For example, a reverb control might provide several preset reverberation settings, instead of providing continuously adjustable parameters of the sort that would be represented by FloatControl objects.

Controls that provide a choice between only two settings can often be implemented instead as a BooleanControl, and controls that provide a set of values along some quantifiable dimension might be implemented instead as a FloatControl with a coarse resolution. However, a key feature of EnumControl is that the returned values are arbitrary objects, rather than numerical or boolean values. This means that each returned object can provide further information. As an example, the settings of a REVERB control are instances of ReverbType that can be queried for the parameter values used for each setting.

Since:
1.3

Inner Class Summary
static class EnumControl.Type
          An instance of the EnumControl.Type inner class identifies one kind of enumerated control.

Inner classes inherited from class javax.sound.sampled.Control
Control.Type

Constructor Summary
protected EnumControl(EnumControl.Type type, Object[] values, Object value)
          Constructs a new enumerated control object with the given parameters.

Method Summary
Object | getValue() Obtains this control's current value.
Object[] | getValues() Returns the set of possible values for this control.
void | setValue(Object value) Sets the current value for the control.
String | toString() Provides a string representation of the control.

Methods inherited from class javax.sound.sampled.Control
getType

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

EnumControl

protected EnumControl(EnumControl.Type type,
                      Object[] values,
                      Object value)
Constructs a new enumerated control object with the given parameters.
Parameters:
the - type of control represented this enumerated control object
values - the set of possible values for the control
value - the initial control value
Method Detail

setValue

public void setValue(Object value)
Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is not supported, an IllegalArgumentException is thrown.
Parameters:
value - the desired new value
Throws:
IllegalArgumentException - if the value indicated does not fall within the allowable range

getValue

public Object getValue()
Obtains this control's current value.
Returns:
the current value

getValues

public Object[] getValues()
Returns the set of possible values for this control.
Returns:
the set of possible values

toString

public String toString()
Provides a string representation of the control.
Overrides:
toString in class Control
Returns:
a string description
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


FloatControl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class FloatControl

java.lang.Object
  |
  +--javax.sound.sampled.Control
        |
        +--javax.sound.sampled.FloatControl
public abstract class FloatControl
extends Control

A FloatControl object provides control over a range of floating-point values. Float controls are often represented in graphical user interfaces by continuously adjustable objects such as sliders or rotary knobs. Concrete subclasses of FloatControl implement controls, such as gain and pan, that affect a line's audio signal in some way that an application can manipulate. The FloatControl.Type inner class provides static instances of types that are used to identify some common kinds of float control.

The FloatControl abstract class provides methods to set and get the control's current floating-point value. Other methods obtain the possible range of values and the control's resolution (the smallest increment between returned values). Some float controls allow ramping to a new value over a specified period of time. FloatControl also includes methods that return string labels for the minimum, maximum, and midpoint positions of the control.

Since:
1.3
See Also:
Line.getControls(), Line.isControlSupported(javax.sound.sampled.Control.Type)

Inner Class Summary
static class FloatControl.Type
An instance of the FloatControl.Type inner class identifies one kind of float control.
Inner classes inherited from class javax.sound.sampled.Control
Control.Type
Constructor Summary
protected | FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units) Constructs a new float control object with the given parameters.
protected | FloatControl(FloatControl.Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel) Constructs a new float control object with the given parameters
Method Summary
float | getMaximum() Obtains the maximum value permitted.
String | getMaxLabel() Obtains the label for the maximum value, such as "Right" or "Full."
String | getMidLabel() Obtains the label for the mid-point value, such as "Center" or "Default."
float | getMinimum() Obtains the minimum value permitted.
String | getMinLabel() Obtains the label for the minimum value, such as "Left" or "Off."
float | getPrecision() Obtains the resolution or granularity of the control, in the units that the control measures.
String | getUnits() Obtains the label for the units in which the control's values are expressed, such as "dB" or "frames per second."
int | getUpdatePeriod() Obtains the smallest time interval, in microseconds, over which the control's value can change during a shift.
float | getValue() Obtains this control's current value.
void | setValue(float newValue) Sets the current value for the control.
void | shift(float from, float to, int microseconds) Changes the control value from the initial value to the final value linearly over the specified time period, specified in microseconds.
String | toString() Provides a string representation of the control
Methods inherited from class javax.sound.sampled.Control
getType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FloatControl

protected FloatControl(FloatControl.Type type,
                       float minimum,
                       float maximum,
                       float precision,
                       int updatePeriod,
                       float initialValue,
                       String units,
                       String minLabel,
                       String midLabel,
                       String maxLabel)
Constructs a new float control object with the given parameters
Parameters:
type - the kind of control represented by this float control object
minimum - the largest value permitted for the control
maximum - the smallest value permitted for the control
precision - the resolution or granularity of the control. This is the size of the increment between discrete valid values.
updatePeriod - the smallest time interval, in microseconds, over which the control can change from one discrete value to the next during a shift
initialValue - the value that the control starts with when constructed
units - the label for the units in which the control's values are expressed, such as "dB" or "frames per second"
minLabel - the label for the minimum value, such as "Left" or "Off"
midLabel - the label for the midpoint value, such as "Center" or "Default"
maxLabel - the label for the maximum value, such as "Right" or "Full"

FloatControl

protected FloatControl(FloatControl.Type type,
                       float minimum,
                       float maximum,
                       float precision,
                       int updatePeriod,
                       float initialValue,
                       String units)
Constructs a new float control object with the given parameters. The labels for the minimum, maximum, and mid-point values are set to zero-length strings.
Parameters:
type - the kind of control represented by this float control object
minimum - the largest value permitted for the control
maximum - the smallest value permitted for the control
precision - the resolution or granularity of the control. This is the size of the increment between discrete valid values.
updatePeriod - the smallest time interval, in microseconds, over which the control can change from one discrete value to the next during a shift
initialValue - the value that the control starts with when constructed
units - the label for the units in which the control's values are expressed, such as "dB" or "frames per second"
Method Detail

setValue

public void setValue(float newValue)
Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown.
Parameters:
newValue - desired new value
Throws:
IllegalArgumentException - if the value indicated does not fall within the allowable range

getValue

public float getValue()
Obtains this control's current value.
Returns:
the current value

getMaximum

public float getMaximum()
Obtains the maximum value permitted.
Returns:
the maximum allowable value

getMinimum

public float getMinimum()
Obtains the minimum value permitted.
Returns:
the minimum allowable value

getUnits

public String getUnits()
Obtains the label for the units in which the control's values are expressed, such as "dB" or "frames per second."
Returns:
the units label, or a zero-length string if no label

getMinLabel

public String getMinLabel()
Obtains the label for the minimum value, such as "Left" or "Off."
Returns:
the minimum value label, or a zero-length string if no label * has been set

getMidLabel

public String getMidLabel()
Obtains the label for the mid-point value, such as "Center" or "Default."
Returns:
the mid-point value label, or a zero-length string if no label * has been set

getMaxLabel

public String getMaxLabel()
Obtains the label for the maximum value, such as "Right" or "Full."
Returns:
the maximum value label, or a zero-length string if no label * has been set

getPrecision

public float getPrecision()
Obtains the resolution or granularity of the control, in the units that the control measures. The precision is the size of the increment between discrete valid values for this control, over the set of supported floating-point values.
Returns:
the control's precision

getUpdatePeriod

public int getUpdatePeriod()
Obtains the smallest time interval, in microseconds, over which the control's value can change during a shift. The update period is the inverse of the frequency with which the control updates its value during a shift. If the implementation does not support value shifting over time, it should set the control's value to the final value immediately and return -1 from this method.
Returns:
update period in microseconds, or -1 if shifting over time is unsupported
See Also:
shift(float, float, int)

shift

public void shift(float from,
                  float to,
                  int microseconds)
Changes the control value from the initial value to the final value linearly over the specified time period, specified in microseconds. This method returns without blocking; it does not wait for the shift to complete. An implementation should complete the operation within the time specified. The default implementation simply changes the value to the final value immediately.
Parameters:
from - initial value at the beginning of the shift
to - final value after the shift
frames - maximum duration of the shift in microseconds
See Also:
getUpdatePeriod()

toString

public String toString()
Provides a string representation of the control
Overrides:
toString in class Control
Returns:
a string description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Info

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class Mixer.Info

java.lang.Object
  |
  +--javax.sound.sampled.Mixer.Info
Enclosing class:
Mixer
public static class Mixer.Info
extends Object

The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description. This information may be retrieved through the getMixerInfo method of the Mixer interface.

Since:
1.3

Constructor Summary
protected Mixer.Info(String name, String vendor, String description, String version)
Constructs a mixer's info object, passing it the given textual information.
Method Summary
boolean | equals(Object obj) Indicates whether two info objects are equal, returning true if they are identical.
String | getDescription() Obtains the description of the mixer.
String | getName() Obtains the name of the mixer.
String | getVendor() Obtains the vendor of the mixer.
String | getVersion() Obtains the version of the mixer.
int | hashCode() Finalizes the hashcode method.
String | toString() Provides a string representation of the mixer info.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Mixer.Info

protected Mixer.Info(String name,
                     String vendor,
                     String description,
                     String version)
Constructs a mixer's info object, passing it the given textual information.
Parameters:
name - the name of the mixer
vendor - the company who manufactures or creates the hardware or software mixer
description - descriptive text about the mixer
version - version information for the mixer
Method Detail

equals

public final boolean equals(Object obj)
Indicates whether two info objects are equal, returning true if they are identical.
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare this info object
Returns:
true if this info object is the same as the obj argument; false otherwise

hashCode

public final int hashCode()
Finalizes the hashcode method.
Overrides:
hashCode in class Object
Returns:
the hashcode for this object

getName

public final String getName()
Obtains the name of the mixer.
Returns:
a string that names the mixer

getVendor

public final String getVendor()
Obtains the vendor of the mixer.
Returns:
a string that names the mixer's vendor

getDescription

public final String getDescription()
Obtains the description of the mixer.
Returns:
a textual description of the mixer

getVersion

public final String getVersion()
Obtains the version of the mixer.
Returns:
textual version information for the mixer

toString

public final String toString()
Provides a string representation of the mixer info.
Overrides:
toString in class Object
Returns:
a string describing the info object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Info

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class Line.Info

java.lang.Object
  |
  +--javax.sound.sampled.Line.Info
Direct Known Subclasses:
DataLine.Info, Port.Info
Enclosing class:
Line
public static class Line.Info
extends Object

A Line.Info object contains information about a line. The only information provided by Line.Info itself is the Java class of the line. A subclass of Line.Info adds other kinds of information about the line. This additional information depends on which Line subinterface is implemented by the kind of line that the Line.Info subclass describes.

A Line.Info can be retrieved using various methods of the Line, Mixer, and AudioSystem interfaces. Other such methods let you pass a Line.Info as an argument, to learn whether lines matching the specified configuration are available and to obtain them.

Since:
1.3
See Also:
Line.getLineInfo(),
Mixer.getSourceLineInfo(),
Mixer.getTargetLineInfo(),
Mixer.getLine(Line.Info),
Mixer.getSourceLineInfo(Line.Info),
Mixer.getTargetLineInfo(Line.Info),
Mixer.isLineSupported(Line.Info),
AudioSystem.getLine(Line.Info),
AudioSystem.getSourceLineInfo(Line.Info),
AudioSystem.getTargetLineInfo(Line.Info),
AudioSystem.isLineSupported(Line.Info)

Constructor Summary
Line.Info(Class lineClass)
Constructs an info object that describes a line of the specified class.
Method Summary
Class | getLineClass() Obtains the class of the line that this Line.Info object describes.
boolean | matches(Line.Info info) Indicates whether the specified info object matches this one.
String | toString() Obtains a textual description of the line info.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Line.Info

public Line.Info(Class lineClass)
Constructs an info object that describes a line of the specified class. This constructor is typically used by an application to describe a desired line.
Parameters:
lineClass - the class of the line that the new Line.Info object describes
Method Detail

getLineClass

public Class getLineClass()
Obtains the class of the line that this Line.Info object describes.
Returns:
the described line's class

matches

public boolean matches(Line.Info info)
Indicates whether the specified info object matches this one. To match, the specified object must be identical to or a special case of this one. The specified info object must be either an instance of the same class as this one, or an instance of a sub-type of this one. In addition, the attributes of the specified object must be compatible with the capabilities of this one. Specifically, the routing configuration for the specified info object must be compatible with that of this one. Subclasses may add other criteria to determine whether the two objects match.
Parameters:
info - the info object which is being compared to this one
Returns:
true if the specified object matches this one, false otherwise

toString

public String toString()
Obtains a textual description of the line info.
Overrides:
toString in class Object
Returns:
a string description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Info

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class DataLine.Info

java.lang.Object
  |
  +--javax.sound.sampled.Line.Info
        |
        +--javax.sound.sampled.DataLine.Info
Enclosing class:
DataLine
public static class DataLine.Info
extends Line.Info

Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines. This information includes:

  • the audio formats supported by the data line
  • the minimum and maximum sizes of its internal buffer
Because a Line.Info knows the class of the line its describes, a DataLine.Info object can describe DataLine subinterfaces such as SourceDataLine, TargetDataLine, and Clip. You can query a mixer for lines of any of these types, passing an appropriate instance of DataLine.Info as the argument to a method such as Mixer.getLine(Line.Info).

Since:
1.3
See Also:
Line.Info

Constructor Summary
DataLine.Info(Class lineClass, AudioFormat format)
Constructs a data line's info object from the specified information, which includes a single audio format.
DataLine.Info(Class lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.
DataLine.Info(Class lineClass, AudioFormat format, int bufferSize)
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.
Method Summary
AudioFormat[] | getFormats() Obtains a set of audio formats supported by the data line.
int | getMaxBufferSize() Obtains the maximum buffer size supported by the data line.
int | getMinBufferSize() Obtains the minimum buffer size supported by the data line.
boolean | isFormatSupported(AudioFormat format) Indicates whether this data line supports a particular audio format.
boolean | matches(Line.Info info) Determines whether the specified info object matches this one.
String | toString() Obtains a textual description of the data line info.
Methods inherited from class javax.sound.sampled.Line.Info
getLineClass
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DataLine.Info

public DataLine.Info(Class lineClass,
                     AudioFormat[] formats,
                     int minBufferSize,
                     int maxBufferSize)
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size. This constructor is typically used by mixer implementations when returning information about a supported line.
Parameters:
lineClass - the class of the data line described by the info object
formats - set of formats supported
minBufferSize - minimum buffer size supported by the data line, in bytes
maxBufferSize - maximum buffer size supported by the data line, in bytes

DataLine.Info

public DataLine.Info(Class lineClass,
                     AudioFormat format,
                     int bufferSize)
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size. This constructor is typically used by an application to describe a desired line.
Parameters:
lineClass - the class of the data line described by the info object
format - desired format
bufferSize - desired buffer size in bytes

DataLine.Info

public DataLine.Info(Class lineClass,
                     AudioFormat format)
Constructs a data line's info object from the specified information, which includes a single audio format. This constructor is typically used by an application to describe a desired line.
Parameters:
lineClass - the class of the data line described by the info object
format - desired format
Method Detail

getFormats

public AudioFormat[] getFormats()
Obtains a set of audio formats supported by the data line. Note that isFormatSupported(AudioFormat) might return true for certain additional formats that are missing from the set returned by getFormats(). The reverse is not the case: isFormatSupported(AudioFormat) is guaranteed to return true for all formats returned by getFormats().
Returns:
a set of supported audio formats.
See Also:
isFormatSupported(AudioFormat)

isFormatSupported

public boolean isFormatSupported(AudioFormat format)
Indicates whether this data line supports a particular audio format. The default implementation of this method simply returns true if the specified format matches any of the supported formats.
Parameters:
format - the audio format for which support is queried.
Returns:
true if the format is supported, otherwise false
See Also:
getFormats(), AudioFormat.matches(javax.sound.sampled.AudioFormat)

getMinBufferSize

public int getMinBufferSize()
Obtains the minimum buffer size supported by the data line.
Returns:
minimum buffer size in bytes, or AudioSystem.NOT_SPECIFIED

getMaxBufferSize

public int getMaxBufferSize()
Obtains the maximum buffer size supported by the data line.
Returns:
maximum buffer size in bytes, or AudioSystem.NOT_SPECIFIED

matches

public boolean matches(Line.Info info)
Determines whether the specified info object matches this one. To match, the superclass match requirements must be met. In addition, this object's minimum buffer size must be at least as large as that of the object specified, its maximum buffer size must be at most as large as that of the object specified, and all of its formats must match formats supported by the object specified.
Overrides:
matches in class Line.Info
Returns:
true if this object matches the one specified, otherwise false.

toString

public String toString()
Obtains a textual description of the data line info.
Overrides:
toString in class Line.Info
Returns:
a string description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Info

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class Port.Info

java.lang.Object
  |
  +--javax.sound.sampled.Line.Info
        |
        +--javax.sound.sampled.Port.Info
Enclosing class:
Port
public static class Port.Info
extends Line.Info

The Port.Info class extends Line.Info with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer. By definition, a port acts as either a source or a target to its mixer, but not both. (Audio input ports are sources; audio output ports are targets.)

To learn what ports are available, you can retrieve port info objects through the getSourceLineInfo and getTargetLineInfo methods of the Mixer interface. Instances of the Port.Info class may also be constructed and used to obtain lines matching the parameters specified in the Port.Info object.

Since:
1.3

Field Summary
static Port.Info | COMPACT_DISC A type of port that gets audio from a CD-ROM drive.
static Port.Info | HEADPHONE A type of port that sends audio to a headphone jack.
static Port.Info | LINE_IN A type of port that gets audio from a line-level audio input jack.
static Port.Info | LINE_OUT A type of port that sends audio to a line-level audio output jack.
static Port.Info | MICROPHONE A type of port that gets audio from a built-in microphone or a microphone jack.
static Port.Info | SPEAKER A type of port that sends audio to a built-in speaker or a speaker jack.
Constructor Summary
Port.Info(Class lineClass, String name, boolean isSource)
Constructs a port's info object from the information given.
Method Summary
boolean | equals(Object obj) Finalizes the equals method
String | getName() Obtains the name of the port.
int | hashCode() Finalizes the hashCode method
boolean | isSource() Indicates whether the port is a source or a target for its mixer.
boolean | matches(Line.Info info) Indicates whether this info object specified matches this one.
String | toString() Provides a String representation of the port.
Methods inherited from class javax.sound.sampled.Line.Info
getLineClass
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MICROPHONE

public static final Port.Info MICROPHONE
A type of port that gets audio from a built-in microphone or a microphone jack.

LINE_IN

public static final Port.Info LINE_IN
A type of port that gets audio from a line-level audio input jack.

COMPACT_DISC

public static final Port.Info COMPACT_DISC
A type of port that gets audio from a CD-ROM drive.

SPEAKER

public static final Port.Info SPEAKER
A type of port that sends audio to a built-in speaker or a speaker jack.

HEADPHONE

public static final Port.Info HEADPHONE
A type of port that sends audio to a headphone jack.

LINE_OUT

public static final Port.Info LINE_OUT
A type of port that sends audio to a line-level audio output jack.
Constructor Detail

Port.Info

public Port.Info(Class lineClass,
                 String name,
                 boolean isSource)
Constructs a port's info object from the information given. This constructor is typically used by an implementation of Java Sound to describe a supported line.
Parameters:
lineClass - the class of the port described by the info object.
name - the string that names the port
isSource - true if the port is a source port (such as a microphone), false if the port is a target port (such as a speaker).
Method Detail

getName

public String getName()
Obtains the name of the port.
Returns:
the string that names the port

isSource

public boolean isSource()
Indicates whether the port is a source or a target for its mixer.
Returns:
true if the port is a source port (such as a microphone), false if the port is a target port (such as a speaker).

matches

public boolean matches(Line.Info info)
Indicates whether this info object specified matches this one. To match, the match requirements of the superclass must be met and the types must be equal.
Overrides:
matches in class Line.Info
Parameters:
info - the info object for which the match is queried

equals

public final boolean equals(Object obj)
Finalizes the equals method
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Finalizes the hashCode method
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides a String representation of the port.
Overrides:
toString in class Line.Info
Returns:
a string that describes the port
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Line

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface Line

All Known Subinterfaces:
Clip, DataLine, Mixer, Port, SourceDataLine, TargetDataLine
public interface Line

The Line interface represents a mono or multi-channel audio feed. A line is an element of the digital audio "pipeline," such as a mixer, an input or output port, or a data path into or out of a mixer.

A line can have controls, such as gain, pan, and reverb. The controls themselves are instances of classes that extend the base Control class. The Line interface provides two accessor methods for obtaining the line's controls: getControls returns the entire set, and getControl returns a single control of specified type.

Lines exist in various states at different times. When a line opens, it reserves system resources for itself, and when it closes, these resources are freed for other objects or applications. The isOpen() method lets you discover whether a line is open or closed. An open line need not be processing data, however. Such processing is typically initiated by subinterface methods such as SourceDataLine.write and TargetDataLine.read.

You can register an object to receive notifications whenever the line's state changes. The object must implement the LineListener interface, which consists of the single method update. This method will be invoked when a line opens and closes (and, if it's a DataLine, when it starts and stops).

An object can be registered to listen to multiple lines. The event it receives in its update method will specify which line created the event, what type of event it was (OPEN, CLOSE, START, or STOP), and how many sample frames the line had processed at the time the event occurred.

Certain line operations, such as open and close, can generate security exceptions if invoked by unprivileged code when the line is a shared audio resource.

Since:
1.3
See Also:
LineEvent

Inner Class Summary
static class Line.Info
A Line.Info object contains information about a line.
Method Summary
void | addLineListener(LineListener listener) Adds a listener to this line.
void | close() Closes the line, indicating that any system resources in use by the line can be released.
Control | getControl(Control.Type control) Obtains a control of the specified type, if there is any.
Control[] | getControls() Obtains the set of controls associated with this line.
Line.Info | getLineInfo() Obtains the Line.Info object describing this line.
boolean | isControlSupported(Control.Type control) Indicates whether the line supports a control of the specified type.
boolean | isOpen() Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be playing or capturing sound.
void | open() Opens the line, indicating that it should acquire any required system resources and become operational.
void | removeLineListener(LineListener listener) Removes the specified listener from this line's list of listeners.

Method Detail

getLineInfo

public Line.Info getLineInfo()
Obtains the Line.Info object describing this line.
Returns:
description of the line

open

public void open()
          throws LineUnavailableException
Opens the line, indicating that it should acquire any required system resources and become operational. If this operation succeeds, the line is marked as open, and an OPEN event is dispatched to the line's listeners.

Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in an LineUnavailableException.

Some types of lines have configurable properties that may affect resource allocation. For example, a DataLine must be opened with a particular format and buffer size. Such lines should provide a mechanism for configuring these properties, such as an additional open method or methods which allow an application to specify the desired settings.

This method takes no arguments, and opens the line with the current settings. For SourceDataLine and TargetDataLine objects, this means that the line is opened with default settings. For a Clip, however, the buffer size is determined when data is loaded. Since this method does not allow the application to specify any data to load, it allocates resources for a clip with zero frames of data, and there is no means for subsequently loading data into that clip. Therefore, you should instead use one of the open methods provided in the Clip interface to load data into the Clip.

Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions.
SecurityException - if the line cannot be opened due to security restrictions.
See Also:
close(), isOpen(), LineEvent, DataLine, Clip.open(AudioFormat, byte[], int, int), Clip.open(AudioInputStream)

close

public void close()
Closes the line, indicating that any system resources in use by the line can be released. If this operation succeeds, the line is marked closed and a CLOSE event is dispatched to the line's listeners.
Throws:
SecurityException - if the line cannot be closed due to security restrictions.
See Also:
open(), isOpen(), LineEvent

isOpen

public boolean isOpen()
Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be playing or capturing sound.
Returns:
true if the line is open, otherwise false
See Also:
open(), close()

getControls

public Control[] getControls()
Obtains the set of controls associated with this line. If there are no controls, this method returns an array of length 0.
Returns:
the array of controls
See Also:
getControl(javax.sound.sampled.Control.Type)

isControlSupported

public boolean isControlSupported(Control.Type control)
Indicates whether the line supports a control of the specified type.
Parameters:
control - the type of the control for which support is queried
Returns:
true if at least one control of the specified type is supported, otherwise false.

getControl

public Control getControl(Control.Type control)
Obtains a control of the specified type, if there is any.
Parameters:
control - the type of the requested control
Returns:
a control of the specified type
Throws:
IllegalArgumentException - if a control of the specified type is not supported
See Also:
getControls(), isControlSupported(Control.Type control)

addLineListener

public void addLineListener(LineListener listener)
Adds a listener to this line. Whenever the line's status changes, the listener's update() method is called with a LineEvent object that describes the change.
Parameters:
listener - the object to add as a listener to this line
See Also:
removeLineListener(javax.sound.sampled.LineListener), LineListener.update(javax.sound.sampled.LineEvent), LineEvent

removeLineListener

public void removeLineListener(LineListener listener)
Removes the specified listener from this line's list of listeners.
Parameters:
listener - listener to remove
See Also:
addLineListener(javax.sound.sampled.LineListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class LineEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.sound.sampled.LineEvent
All Implemented Interfaces:
Serializable
public class LineEvent
extends EventObject

The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops. Each of these four state changes is represented by a corresponding type of event. A listener receives the event as a parameter to its its update method. By querying the event, the listener can learn the type of event, the line responsible for the event, and how much data the line had processed when the event occurred.

Since:
1.3
See Also:
Line, LineListener.update(javax.sound.sampled.LineEvent), Serialized Form

Inner Class Summary
static class LineEvent.Type
The LineEvent.Type inner class identifies what kind of event occurred on a line.
Fields inherited from class java.util.EventObject
source
Constructor Summary
LineEvent(Line line, LineEvent.Type type, long position)
Constructs a new event of the specified type, originating from the specified line.
Method Summary
long | getFramePosition() Obtains the position in the line's audio data when the event occurred, expressed in sample frames.
Line | getLine() Obtains the audio line that is the source of this event.
LineEvent.Type | getType() Obtains the event's type.
String | toString() Obtains a string representation of the event.
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LineEvent

public LineEvent(Line line,
                 LineEvent.Type type,
                 long position)
Constructs a new event of the specified type, originating from the specified line.
Parameters:
line - the source of this event
type - the event type (OPEN, CLOSE, START, or STOP)
position - the number of sample frames that the line had already processed when the event occurred, or AudioSystem.NOT_SPECIFIED
Method Detail

getLine

public final Line getLine()
Obtains the audio line that is the source of this event.
Returns:
the line responsible for this event

getType

public final LineEvent.Type getType()
Obtains the event's type.
Returns:
this event's type (LineEvent.Type.OPEN, LineEvent.Type.CLOSE, LineEvent.Type.START, or LineEvent.Type.STOP)

getFramePosition

public final long getFramePosition()
Obtains the position in the line's audio data when the event occurred, expressed in sample frames. For example, if a source line had already played back 14 sample frames at the time it was paused, the pause event would report the line's position as 14. The next frame to be processed would be frame number 14 using zero-based numbering, or 15 using one-based numbering.

Note that this field is relevant only to certain events generated by data lines, such as START and STOP. For events generated by lines that do not count sample frames, and for any other events for which this value is not known, the position value should be AudioSystem.NOT_SPECIFIED.

Returns:
the line's position as a sample frame number

toString

public String toString()
Obtains a string representation of the event. The contents of the string may vary between implementations of Java Sound.
Overrides:
toString in class EventObject
Returns:
a string describing the event.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface LineListener

All Superinterfaces:
EventListener
public interface LineListener
extends EventListener

Instances of classes that implement the LineListener interface can register to receive events when a line's status changes.

Since:
1.3
See Also:
Line, Line.addLineListener(javax.sound.sampled.LineListener), Line.removeLineListener(javax.sound.sampled.LineListener), LineEvent

Method Summary
 void update(LineEvent event)
Informs the listener that a line's state has changed.

Method Detail

update

public void update(LineEvent event)
Informs the listener that a line's state has changed. The listener can then invoke LineEvent methods to obtain information about the event.
Parameters:
event - a line event that describes the change
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineUnavailableException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class LineUnavailableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.sound.sampled.LineUnavailableException
All Implemented Interfaces:
Serializable
public class LineUnavailableException
extends Exception

A LineUnavailableException is an exception indicating that a line cannot be opened because it is unavailable. This situation arises most commonly when a requested line is already in use by another application.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
LineUnavailableException()
Constructs a LineUnavailableException that has null as its error detail message.
LineUnavailableException(String message)
Constructs a LineUnavailableException that has the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LineUnavailableException

public LineUnavailableException()
Constructs a LineUnavailableException that has null as its error detail message.

LineUnavailableException

public LineUnavailableException(String message)
Constructs a LineUnavailableException that has the specified detail message.
Parameters:
message - a string containing the error detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Mixer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface Mixer

All Superinterfaces:
Line
public interface Mixer
extends Line

A mixer is an audio device with one or more lines. It need not be designed for mixing audio signals. A mixer that actually mixes audio has multiple input (source) lines and at least one output (target) line. The former are often instances of classes that implement SourceDataLine, and the latter, TargetDataLine. Port objects, too, are either source lines or target lines. A mixer can accept prerecorded, loopable sound as input, by having some of its source lines be instances of objects that implement the Clip interface.

Through methods of the Line interface, which Mixer extends, a mixer might provide a set of controls that are global to the mixer. For example, the mixer can have a master gain control. These global controls are distinct from the controls belonging to each of the mixer's individual lines.

Some mixers, especially those with internal digital mixing capabilities, may provide additional capabilities by implementing the DataLine interface.

A mixer can support synchronization of its lines. When one line in a synchronized group is started or stopped, the other lines in the group automatically start or stop simultaneously with the explicitly affected one.

Since:
1.3

Inner Class Summary
static class Mixer.Info
The Mixer.Info class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Method Summary
Line | getLine(Line.Info info) Obtains a line that is available for use and that matches the description in the specified Line.Info object.
int | getMaxLines(Line.Info info) Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer.
Mixer.Info | getMixerInfo() Obtains information about this mixer, including the product's name, version, vendor, etc.
Line.Info[] | getSourceLineInfo() Obtains information about the set of source lines supported by this mixer.
Line.Info[] | getSourceLineInfo(Line.Info info) Obtains information about source lines of a particular type supported by the mixer.
Line[] | getSourceLines() Obtains the set of all source lines currently open to this mixer.
Line.Info[] | getTargetLineInfo() Obtains information about the set of target lines supported by this mixer.
Line.Info[] | getTargetLineInfo(Line.Info info) Obtains information about target lines of a particular type supported by the mixer.
Line[] | getTargetLines() Obtains the set of all target lines currently open from this mixer.
boolean | isLineSupported(Line.Info info) Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object.
boolean | isSynchronizationSupported(Line[] lines, boolean maintainSync) Reports whether this mixer supports synchronization of the specified set of lines.
void | synchronize(Line[] lines, boolean maintainSync) Synchronizes two or more lines.
void | unsynchronize(Line[] lines) Releases synchronization for the specified lines.
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Method Detail

getMixerInfo

public Mixer.Info getMixerInfo()
Obtains information about this mixer, including the product's name, version, vendor, etc.
Returns:
a mixer info object that describes this mixer
See Also:
Mixer.Info

getSourceLineInfo

public Line.Info[] getSourceLineInfo()
Obtains information about the set of source lines supported by this mixer.
Returns:
array of Line.Info objects representing source lines for this mixer. If no source lines are supported, an array of length 0 is returned.

getTargetLineInfo

public Line.Info[] getTargetLineInfo()
Obtains information about the set of target lines supported by this mixer.
Returns:
array of Line.Info objects representing target lines for this mixer. If no target lines are supported, an array of length 0 is returned.

getSourceLineInfo

public Line.Info[] getSourceLineInfo(Line.Info info)
Obtains information about source lines of a particular type supported by the mixer.
Parameters:
info - a Line.Info object describing lines about which information is queried
Returns:
an array of Line.Info objects describing source lines matching the type requested. If no matching source lines are supported, an array of length 0 is returned.

getTargetLineInfo

public Line.Info[] getTargetLineInfo(Line.Info info)
Obtains information about target lines of a particular type supported by the mixer.
Parameters:
info - a Line.Info object describing lines about which information is queried
Returns:
an array of Line.Info objects describing target lines matching the type requested. If no matching target lines are supported, an array of length 0 is returned.

isLineSupported

public boolean isLineSupported(Line.Info info)
Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object.
Parameters:
info - describes the line for which support is queried
Returns:
true if at least one matching line is supported, false otherwise

getLine

public Line getLine(Line.Info info)
             throws LineUnavailableException
Obtains a line that is available for use and that matches the description in the specified Line.Info object.
Parameters:
info - describes the desired line
Throws:
LineUnavailableException - if a matching line is not available due to resource restrictions
IllegalArgumentException - if this mixer does not support any lines matching the description
SecurityException - if a matching line is not available due to security restrictions

getMaxLines

public int getMaxLines(Line.Info info)
Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer. The requested type is any line that matches the description in the provided Line.Info object. For example, if the info object represents a speaker port, and the mixer supports exactly one speaker port, this method should return 1. If the info object represents a source data line and the mixer supports the use of 32 source data lines simultaneously, the return value should be 32.
Parameters:
info - a Line.Info that describes the line for which the number of supported instances is queried
Returns:
the maximum number of matching lines supported

getSourceLines

public Line[] getSourceLines()
Obtains the set of all source lines currently open to this mixer.
Returns:
the source lines currently open to the mixer. If no source lines are currently open to this mixer, an array of length 0 is returned.
Throws:
SecurityException - if the matching lines are not available due to security restrictions

getTargetLines

public Line[] getTargetLines()
Obtains the set of all target lines currently open from this mixer.
Returns:
target lines currently open from the mixer. If no target lines are currently open from this mixer, an array of length 0 is returned.
Throws:
SecurityException - if the matching lines are not available due to security restrictions

synchronize

public void synchronize(Line[] lines,
                        boolean maintainSync)
Synchronizes two or more lines. Any subsequent command that starts or stops audio playback or capture for one of these lines will exert the same effect on the other lines in the group, so that they start or stop playing or capturing data simultaneously.
Parameters:
lines - the lines that should be synchronized
maintainSync - true if the synchronization must be precisely maintained (i.e., the synchronization must be sample-accurate) at all times during operation of the lines , or false if precise synchronization is required only during start and stop operations
Throws:
IllegalArgumentException - if the lines cannot be synchronized. This may occur if the lines are of different types or have different formats for which this mixer does not support synchronization, or if all lines specified do not belong to this mixer.

unsynchronize

public void unsynchronize(Line[] lines)
Releases synchronization for the specified lines. The array must be identical to one for which synchronization has already been established; otherwise an exception may be thrown. However, null may be specified, in which case all currently synchronized lines that belong to this mixer are unsynchronized.
Parameters:
lines - the synchronized lines for which synchronization should be released, or null for all this mixer's synchronized lines
Throws:
IllegalArgumentException - if the lines cannot be unsynchronized. This may occur if the argument specified does not exactly match a set of lines for which synchronization has already been established.

isSynchronizationSupported

public boolean isSynchronizationSupported(Line[] lines,
                                          boolean maintainSync)
Reports whether this mixer supports synchronization of the specified set of lines.
Parameters:
lines - the set of lines for which synchronization support is queried
maintainSync - true if the synchronization must be precisely maintained (i.e., the synchronization must be sample-accurate) at all times during operation of the lines , or false if precise synchronization is required only during start and stop operations
Returns:
true if the lines can be synchronized, false otherwise
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReverbType

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class ReverbType

java.lang.Object
  |
  +--javax.sound.sampled.ReverbType
public class ReverbType
extends Object

The ReverbType class provides methods for accessing various reverberation settings to be applied to an audio signal.

Reverberation simulates the reflection of sound off of the walls, ceiling, and floor of a room. Depending on the size of the room, and how absorbent or reflective the materials in the room's surfaces are, the sound might bounce around for a long time before dying away.

The reverberation parameters provided by ReverbType consist of the delay time and intensity of early reflections, the delay time and intensity of late reflections, and an overall decay time. Early reflections are the initial individual low-order reflections of the direct signal off the surfaces in the room. The late Relections are the dense, high-order reflections that characterize the room's reverberation. The delay times for the start of these two reflection types give the listener a sense of the overall size and complexity of the room's shape and contents. The larger the room, the longer the reflection delay times. The early and late reflections' intensities define the gain (in decibels) of the reflected signals as compared to the direct signal. These intensities give the listener an impression of the absorptive nature of the surfaces and objects in the room. The decay time defines how long the reverberation takes to exponentially decay until it is no longer perceptible ("effective zero"). The larger and less absorbent the surfaces, the longer the decay time.

The set of parameters defined here may not include all aspects of reverberation as specified by some systems. For example, the Midi Manufacturer's Association (MMA) has an Interactive Audio Special Interest Group (IASIG), which has a 3-D Working Group that has defined a Level 2 Spec (I3DL2). I3DL2 supports filtering of reverberation and control of reverb density. These properties are not included in the JavaSound 1.0 definition of a reverb control. In such a case, the implementing system should either extend the defined reverb control to include additional parameters, or else interpret the system's additional capabilities in a way that fits the model described here.

If implementing JavaSound on a I3DL2-compliant device:

  • Filtering is disabled (high-frequency attenuations are set to 0.0 dB)
  • Density parameters are set to midway between minimum and maximum

The following table shows what parameter values an implementation might use for a representative set of reverberation settings.

Reverberation Types and Parameters

Type | Decay Time (ms) | Late Intensity (dB) | Late Delay (ms) | Early Intensity (dB) | Early Delay(ms)
Cavern | 2250 | -2.0 | 41.3 | -1.4 | 10.3
Dungeon | 1600 | -1.0 | 10.3 | -0.7 | 2.6
Garage | 900 | -6.0 | 14.7 | -4.0 | 3.9
Acoustic Lab | 280 | -3.0 | 8.0 | -2.0 | 2.0
Closet | 150 | -10.0 | 2.5 | -7.0 | 0.6

Since:
1.3

Constructor Summary
protected ReverbType(String name, int earlyReflectionDelay, float earlyReflectionIntensity, int lateReflectionDelay, float lateReflectionIntensity, int decayTime)
Constructs a new reverb type that has the specified reverberation parameter values.
Method Summary
boolean | equals(Object obj) Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
int | getDecayTime() Obtains the decay time, which is the amount of time over which the late reflections attenuate to effective zero.
int | getEarlyReflectionDelay() Returns the early reflection delay time in microseconds.
float | getEarlyReflectionIntensity() Returns the early reflection intensity in microseconds.
int | getLateReflectionDelay() Returns the late reflection delay time in microseconds.
float | getLateReflectionIntensity() Returns the late reflection intensity in microseconds.
int | hashCode() Finalizes the hashcode method.
String | toString() Provides a String representation of the reverb type, including its name and its parameter settings.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ReverbType

protected ReverbType(String name,
                     int earlyReflectionDelay,
                     float earlyReflectionIntensity,
                     int lateReflectionDelay,
                     float lateReflectionIntensity,
                     int decayTime)
Constructs a new reverb type that has the specified reverberation parameter values.
Parameters:
name - the name of the new reverb type, or a zero-length String
earlyReflectionDelay - the new type's early reflection delay time in microseconds
earlyReflectionIntensity - the new type's early reflection intensity in dB
lateReflectionDelay - the new type's late reflection delay time in microseconds
lateReflectionIntensity - the new type's late reflection intensity in dB
decayTime - the new type's decay time in microseconds
Method Detail

getEarlyReflectionDelay

public final int getEarlyReflectionDelay()
Returns the early reflection delay time in microseconds. This is the amount of time between when the direct signal is heard and when the first early reflections are heard.
Returns:
early reflection delay time for this reverb type, in microseconds

getEarlyReflectionIntensity

public final float getEarlyReflectionIntensity()
Returns the early reflection intensity in microseconds. This is the amplitude attenuation of the first early reflections relative to the direct signal.
Returns:
early reflection intensity for this reverb type, in microseconds

getLateReflectionDelay

public final int getLateReflectionDelay()
Returns the late reflection delay time in microseconds. This is the amount of time between when the first early reflections are heard and when the first late reflections are heard.
Returns:
late reflection delay time for this reverb type, in microseconds

getLateReflectionIntensity

public final float getLateReflectionIntensity()
Returns the late reflection intensity in microseconds. This is the amplitude attenuation of the first late reflections relative to the direct signal.
Returns:
late reflection intensity for this reverb type, in microseconds

getDecayTime

public final int getDecayTime()
Obtains the decay time, which is the amount of time over which the late reflections attenuate to effective zero. The effective zero value is implementation-dependent.
Returns:
the decay time of the late reflections, in microseconds

equals

public final boolean equals(Object obj)
Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this reverb type is the same as obj; false otherwise

hashCode

public final int hashCode()
Finalizes the hashcode method.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides a String representation of the reverb type, including its name and its parameter settings. The exact contents of the string may vary between implementations of Java Sound.
Overrides:
toString in class Object
Returns:
reverberation type name and description
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SourceDataLine

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface SourceDataLine

All Superinterfaces:
DataLine, Line
public interface SourceDataLine
extends DataLine

A source data line is a data line to which data may be written. It acts as a source to its mixer. An application writes audio bytes to a source data line, which handles the buffering of the bytes and delivers them to the mixer. The mixer may mix the samples with those from other sources and then deliver the mix to a target such as an output port (which may represent an audio output device on a sound card).

Note that the naming convention for this interface reflects the relationship between the line and its mixer. From the perspective of an application, a source data line may act as a target for audio data.

A source data line can be obtained from a mixer by invoking the getLine method of Mixer with an appropriate DataLine.Info object.

The SourceDataLine interface provides a method for writing audio data to the data line's buffer. Applications that play or mix audio should write data to the source data line quickly enough to keep the buffer from underflowing (emptying), which could cause discontinuities in the audio that are perceived as clicks. Applications can use the available method defined in the DataLine interface to determine the amount of data currently queued in the data line's buffer. The amount of data which can be written to the buffer without blocking is the difference between the buffer size and the amount of queued data. If the delivery of audio output stops due to underflow, a STOP event is generated. A START event is generated when the audio output resumes.

Since:
1.3
See Also:
Mixer, DataLine, TargetDataLine

Inner classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Method Summary
void | open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
void | open(AudioFormat format, int bufferSize) Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
int | write(byte[] b, int off, int len) Writes audio data to the mixer via this source data line.
Methods inherited from interface javax.sound.sampled.DataLine
available, drain, flush, getBufferSize, getFormat, getFramePosition, getLevel, getMicrosecondPosition, isActive, isRunning, start, stop
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Method Detail

open

public void open(AudioFormat format,
                 int bufferSize)
          throws LineUnavailableException
Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.

The buffer size is specified in bytes, but must represent an integral number of sample frames. Invoking this method with a requested buffer size that does not meet this requirement may result in an IllegalArgumentException. The actual buffer size for the open line may differ from the requested buffer size. The value actually set may be queried by subsequently calling DataLine.getBufferSize().

If this operation succeeds, the line is marked as open, and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.

Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
format - the desired audio format
bufferSize - the desired buffer size
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IllegalArgumentException - if the buffer size does not represent an integral number of sample frames
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
open(AudioFormat),
Line.open(),
Line.close(),
Line.isOpen(),
LineEvent

open

public void open(AudioFormat format)
          throws LineUnavailableException
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.

The implementation chooses a buffer size, which is measured in bytes but which encompasses an integral number of sample frames. The buffer size that the system has chosen may be queried by subsequently calling DataLine.getBufferSize().

If this operation succeeds, the line is marked as open, and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.

Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
format - the desired audio format
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
open(AudioFormat, int),
Line.open(),
Line.close(),
Line.isOpen(),
LineEvent

write

public int write(byte[] b,
                 int off,
                 int len)
Writes audio data to the mixer via this source data line. The requested number of bytes of data are read from the specified array, starting at the given offset into the array, and written to the data line's buffer. If the caller attempts to write more data than can currently be written (see available), this method blocks until the requested amount of data has been written. This applies even if the requested amount of data to write is greater than the data line's buffer size. However, if the data line is closed, stopped, or flushed before the requested amount has been written, the method no longer blocks, but returns the number of bytes written thus far.

The number of bytes that can be written without blocking can be ascertained using the available method of the DataLine interface. (While it is guaranteed that this number of bytes can be written without blocking, there is no guarantee that attempts to write additional data will block.)

The number of bytes to write must represent an integral number of sample frames, such that:

[ bytes written ] % [frame size in bytes ] == 0

The return value will always meet this requirement. A request to write a number of bytes representing a non-integral number of sample frames cannot be fulfilled and may result in an IllegalArgumentException.
Parameters:
b - a byte array containing data to be written to the data line
len - the length, in bytes, of the valid data in the array (in other words, the requested amount of data to write, in bytes)
Returns:
the number of bytes actually written
Throws:
IllegalArgumentException - if the requested number of bytes does not represent an integral number of sample frames.
See Also:
TargetDataLine.read(byte[], int, int), DataLine.available()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.sound.sampled.spi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.sound.sampled.spi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.sound.sampled.spi.AudioFileReader
    • class javax.sound.sampled.spi.AudioFileWriter
    • class javax.sound.sampled.spi.FormatConversionProvider
    • class javax.sound.sampled.spi.MixerProvider
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.sound.sampled.spi

Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

See:
Description

Class Summary
AudioFileReader | Provider for audio file reading services.
AudioFileWriter | Provider for audio file writing services.
FormatConversionProvider | A format conversion provider provides format conversion services from one or more input formats to one or more output formats.
MixerProvider | A provider or factory for a particular mixer type.

Package javax.sound.sampled.spi Description

Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Related Documentation

For overviews, tutorials, examples, and guides, please see:
  • Sound

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.sound.sampled.spi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.sound.sampled.spi

No usage of javax.sound.sampled.spi

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AudioFileReader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled.spi
Class AudioFileReader

java.lang.Object
  |
  +--javax.sound.sampled.spi.AudioFileReader
public abstract class AudioFileReader
extends Object

Provider for audio file reading services. Classes providing concrete implementations can parse the format information from one or more types of audio file, and can produce audio input streams from files of these types.

Since:
1.3

Constructor Summary
AudioFileReader()
Method Summary
abstract AudioFileFormat | getAudioFileFormat(File file) Obtains the audio file format of the File provided.
abstract AudioFileFormat | getAudioFileFormat(InputStream stream) Obtains the audio file format of the input stream provided.
abstract AudioFileFormat | getAudioFileFormat(URL url) Obtains the audio file format of the URL provided.
abstract AudioInputStream | getAudioInputStream(File file) Obtains an audio input stream from the File provided.
abstract AudioInputStream | getAudioInputStream(InputStream stream) Obtains an audio input stream from the input stream provided.
abstract AudioInputStream | getAudioInputStream(URL url) Obtains an audio input stream from the URL provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AudioFileReader

public AudioFileReader()
Method Detail

getAudioFileFormat

public abstract AudioFileFormat getAudioFileFormat(InputStream stream)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains the audio file format of the input stream provided. The stream must point to valid audio file data. In general, audio file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
Parameters:
stream - the input stream from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getAudioFileFormat

public abstract AudioFileFormat getAudioFileFormat(URL url)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains the audio file format of the URL provided. The URL must point to valid audio file data.
Parameters:
url - the URL from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioFileFormat

public abstract AudioFileFormat getAudioFileFormat(File file)
                                            throws UnsupportedAudioFileException,
                                                   IOException
Obtains the audio file format of the File provided. The File must point to valid audio file data.
Parameters:
file - the File from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(InputStream stream)
                                              throws UnsupportedAudioFileException,
                                                     IOException
Obtains an audio input stream from the input stream provided. The stream must point to valid audio file data. In general, audio file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
Parameters:
stream - the input stream from which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data contained in the input stream.
Throws:
UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs
See Also:
InputStream.markSupported(), InputStream.mark(int)

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(URL url)
                                              throws UnsupportedAudioFileException,
                                                     IOException
Obtains an audio input stream from the URL provided. The URL must point to valid audio file data.
Parameters:
url - the URL for which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data pointed to by the URL
Throws:
UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(File file)
                                              throws UnsupportedAudioFileException,
                                                     IOException
Obtains an audio input stream from the File provided. The File must point to valid audio file data.
Parameters:
file - the File for which the AudioInputStream should be constructed
Returns:
an AudioInputStream object based on the audio file data pointed to by the File
Throws:
UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException - if an I/O exception occurs
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AudioFileWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled.spi
Class AudioFileWriter

java.lang.Object
  |
  +--javax.sound.sampled.spi.AudioFileWriter
public abstract class AudioFileWriter
extends Object

Provider for audio file writing services. Classes providing concrete implementations can write one or more types of audio file from an audio stream.

Since:
1.3

Constructor Summary
AudioFileWriter()
Method Summary
abstract AudioFileFormat.Type[] | getAudioFileTypes() Obtains the file types for which file writing support is provided by this audio file writer.
abstract AudioFileFormat.Type[] | getAudioFileTypes(AudioInputStream stream) Obtains the file types that this audio file writer can write from the audio input stream specified.
boolean | isFileTypeSupported(AudioFileFormat.Type fileType) Indicates whether file writing support for the specified file type is provided by this audio file writer.
boolean | isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) Indicates whether an audio file of the type specified can be written from the audio input stream indicated.
abstract int | write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
abstract int | write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AudioFileWriter

public AudioFileWriter()
Method Detail

getAudioFileTypes

public abstract AudioFileFormat.Type[] getAudioFileTypes()
Obtains the file types for which file writing support is provided by this audio file writer.
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

isFileTypeSupported

public boolean isFileTypeSupported(AudioFileFormat.Type fileType)
Indicates whether file writing support for the specified file type is provided by this audio file writer.
Parameters:
fileType - the file type for which write capabilities are queried
Returns:
true if the file type is supported, otherwise false

getAudioFileTypes

public abstract AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)
Obtains the file types that this audio file writer can write from the audio input stream specified.
Parameters:
stream - the audio input stream for which audio file type support is queried
Returns:
array of file types. If no file types are supported, an array of length 0 is returned.

isFileTypeSupported

public boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                   AudioInputStream stream)
Indicates whether an audio file of the type specified can be written from the audio input stream indicated.
Parameters:
type - file type for which write capabilities are queried
stream - for which file writing support is queried
Returns:
true if the file type is supported for this audio input stream, otherwise false

write

public abstract int write(AudioInputStream stream,
                          AudioFileFormat.Type fileType,
                          OutputStream out)
                   throws IOException
Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided. Some file types require that the length be written into the file header, and cannot be written from start to finish unless the length is known in advance. An attempt to write such a file type will fail with an IOException if the length in the audio file format is AudioSystem.NOT_SPECIFIED.
Parameters:
stream - the audio input stream containing audio data to be written to the output stream
fileType - file type to be written to the output stream
out - stream to which the file data should be written
Returns:
the number of bytes written to the output stream
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file type is not supported by the system
See Also:
isFileTypeSupported(AudioFileFormat.Type, AudioInputStream), getAudioFileTypes()

write

public abstract int write(AudioInputStream stream,
                          AudioFileFormat.Type fileType,
                          File out)
                   throws IOException
Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
Parameters:
stream - the audio input stream containing audio data to be written to the file
fileType - file type to be written to the file
out - external file to which the file data should be written
Returns:
the number of bytes written to the file
Throws:
IOException - if an I/O exception occurs
IllegalArgumentException - if the file format is not supported by the system
See Also:
isFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type), getAudioFileTypes()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.sound.sampled.spi.AudioFileReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.spi.AudioFileReader

No usage of javax.sound.sampled.spi.AudioFileReader

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.spi.AudioFileWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.spi.AudioFileWriter

No usage of javax.sound.sampled.spi.AudioFileWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.spi.FormatConversionProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.spi.FormatConversionProvider

No usage of javax.sound.sampled.spi.FormatConversionProvider

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.sound.sampled.spi.MixerProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.sound.sampled.spi.MixerProvider

No usage of javax.sound.sampled.spi.MixerProvider

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


FormatConversionProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled.spi
Class FormatConversionProvider

java.lang.Object
  |
  +--javax.sound.sampled.spi.FormatConversionProvider
public abstract class FormatConversionProvider
extends Object

A format conversion provider provides format conversion services from one or more input formats to one or more output formats. Converters include codecs, which encode and/or decode audio data, as well as transcoders, etc. Format converters provide methods for determining what conversions are supported and for obtaining an audio stream from which converted data can be read.

The source format represents the format of the incoming audio data, which will be converted.

The target format represents the format of the processed, converted audio data. This is the format of the data that can be read from the stream returned by one of the getAudioInputStream methods.

Since:
1.3

Constructor Summary
FormatConversionProvider()
Method Summary
abstract AudioInputStream | getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) Obtains an audio input stream with the specified encoding from the given audio input stream.
abstract AudioInputStream | getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream) Obtains an audio input stream with the specified format from the given audio input stream.
abstract AudioFormat.Encoding[] | getSourceEncodings() Obtains the set of source format encodings from which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[] | getTargetEncodings() Obtains the set of target format encodings to which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[] | getTargetEncodings(AudioFormat sourceFormat) Obtains the set of target format encodings supported by the format converter given a particular source format.
abstract AudioFormat[] | getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
boolean | isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) Indicates whether the format converter supports conversion to a particular encoding from a particular format.
boolean | isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat) Indicates whether the format converter supports conversion to one particular format from another.
boolean | isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding) Indicates whether the format converter supports conversion from the specified source format encoding.
boolean | isTargetEncodingSupported(AudioFormat.Encoding targetEncoding) Indicates whether the format converter supports conversion to the specified target format encoding.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FormatConversionProvider

public FormatConversionProvider()
Method Detail

getSourceEncodings

public abstract AudioFormat.Encoding[] getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider.
Returns:
array of source format encodings. The array will always have a length of at least 1.

getTargetEncodings

public abstract AudioFormat.Encoding[] getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider.
Returns:
array of target format encodings. The array will always have a length of at least 1.

isSourceEncodingSupported

public boolean isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding)
Indicates whether the format converter supports conversion from the specified source format encoding.
Parameters:
sourceEncoding - the source format encoding for which support is queried
Returns:
true if the encoding is supported, otherwise false

isTargetEncodingSupported

public boolean isTargetEncodingSupported(AudioFormat.Encoding targetEncoding)
Indicates whether the format converter supports conversion to the specified target format encoding.
Parameters:
targetEncoding - the target format encoding for which support is queried
Returns:
true if the encoding is supported, otherwise false

getTargetEncodings

public abstract AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat)
Obtains the set of target format encodings supported by the format converter given a particular source format. If no target format encodings are supported for this source format, an array of length 0 is returned.
Returns:
array of supported target format encodings.

isConversionSupported

public boolean isConversionSupported(AudioFormat.Encoding targetEncoding,
                                     AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to a particular encoding from a particular format.
Parameters:
targetEncoding - desired encoding of the outgoing data
sourceFormat - format of the incoming data
Returns:
true if the conversion is supported, otherwise false

getTargetFormats

public abstract AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding,
                                               AudioFormat sourceFormat)
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
Returns:
array of supported target formats.

isConversionSupported

public boolean isConversionSupported(AudioFormat targetFormat,
                                     AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to one particular format from another.
Parameters:
targetFormat - desired format of outgoing data
sourceFormat - format of the incoming data
Returns:
true if the conversion is supported, otherwise false

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding,
                                                     AudioInputStream sourceStream)
Obtains an audio input stream with the specified encoding from the given audio input stream.
Parameters:
targetEncoding - desired encoding of the stream after processing
sourceStream - stream from which data to be processed should be read
Returns:
stream from which processed data with the specified target encoding may be read
Throws:
IllegalArgumentException - if the format combination supplied is not supported.

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(AudioFormat targetFormat,
                                                     AudioInputStream sourceStream)
Obtains an audio input stream with the specified format from the given audio input stream.
Parameters:
targetFormat - desired data format of the stream after processing
sourceStream - stream from which data to be processed should be read
Returns:
stream from which processed data with the specified format may be read
Throws:
IllegalArgumentException - if the format combination supplied is not supported.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MixerProvider

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled.spi
Class MixerProvider

java.lang.Object
  |
  +--javax.sound.sampled.spi.MixerProvider
public abstract class MixerProvider
extends Object

A provider or factory for a particular mixer type. This mechanism allows the implementation to determine how resources are managed in creation / management of a mixer.

Since:
1.3

Constructor Summary
MixerProvider()
Method Summary
abstract Mixer | getMixer(Mixer.Info info) Obtains an instance of the mixer represented by the info object.
abstract Mixer.Info[] | getMixerInfo() Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.
boolean | isMixerSupported(Mixer.Info info) Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MixerProvider

public MixerProvider()
Method Detail

isMixerSupported

public boolean isMixerSupported(Mixer.Info info)
Indicates whether the mixer provider supports the mixer represented by the specified mixer info object.
Parameters:
an - info object that describes the mixer for which support is queried
Returns:
true if the specified mixer is supported, otherwise false

getMixerInfo

public abstract Mixer.Info[] getMixerInfo()
Obtains the set of info objects representing the mixer or mixers provided by this MixerProvider.
Returns:
set of mixer info objects

getMixer

public abstract Mixer getMixer(Mixer.Info info)
Obtains an instance of the mixer represented by the info object.
Parameters:
an - info object that describes the desired mixer
Returns:
mixer instance
Throws:
IllegalArgumentException - if the info object specified does not match the info object for a mixer supported by this MixerProvider.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TargetDataLine

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Interface TargetDataLine

All Superinterfaces:
DataLine, Line
public interface TargetDataLine
extends DataLine

A target data line is a type of DataLine from which audio data can be read. The most common example is a data line that gets its data from an audio capture device. (The device is implemented as a mixer that writes to the target data line.)

Note that the naming convention for this interface reflects the relationship between the line and its mixer. From the perspective of an application, a target data line may act as a source for audio data.

The target data line can be obtained from a mixer by invoking the getLine method of Mixer with an appropriate DataLine.Info object.

The TargetDataLine interface provides a method for reading the captured data from the target data line's buffer.Applications that record audio should read data from the target data line quickly enough to keep the buffer from overflowing, which could cause discontinuities in the captured data that are perceived as clicks. Applications can use the available method defined in the DataLine interface to determine the amount of data currently queued in the data line's buffer. If the buffer does overflow, the oldest queued data is discarded and replaced by new data.

Since:
1.3
See Also:
Mixer, DataLine, SourceDataLine

Inner classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
Inner classes inherited from class javax.sound.sampled.Line
Line.Info
Method Summary
void | open(AudioFormat format) Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
void | open(AudioFormat format, int bufferSize) Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.
int | read(byte[] b, int off, int len) Reads audio data from the data line's input buffer.
Methods inherited from interface javax.sound.sampled.DataLine
available, drain, flush, getBufferSize, getFormat, getFramePosition, getLevel, getMicrosecondPosition, isActive, isRunning, start, stop
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener

Method Detail

open

public void open(AudioFormat format,
                 int bufferSize)
          throws LineUnavailableException
Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.

The buffer size is specified in bytes, but must represent an integral number of sample frames. Invoking this method with a requested buffer size that does not meet this requirement may result in an IllegalArgumentException. The actual buffer size for the open line may differ from the requested buffer size. The value actually set may be queried by subsequently calling DataLine.getBufferSize()

If this operation succeeds, the line is marked as open, and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line that is already open is illegal and may result in an IllegalStateException.

Some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
format - the desired audio format
bufferSize - the desired buffer size, in bytes.
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IllegalArgumentException - if the buffer size does not represent an integral number of sample frames
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
open(AudioFormat),
Line.open(),
Line.close(),
Line.isOpen(),
LineEvent

open

public void open(AudioFormat format)
          throws LineUnavailableException
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.

The implementation chooses a buffer size, which is measured in bytes but which encompasses an integral number of sample frames. The buffer size that the system has chosen may be queried by subsequently calling DataLine.getBufferSize()

If this operation succeeds, the line is marked as open, and an OPEN event is dispatched to the line's listeners.

Invoking this method on a line that is already open is illegal and may result in an IllegalStateException.

Some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException.

Parameters:
format - the desired audio format
Throws:
LineUnavailableException - if the line cannot be opened due to resource restrictions
IllegalStateException - if the line is already open
SecurityException - if the line cannot be opened due to security restrictions
See Also:
open(AudioFormat, int),
Line.open(),
Line.close(),
Line.isOpen(),
LineEvent

read

public int read(byte[] b,
                int off,
                int len)
Reads audio data from the data line's input buffer. The requested number of bytes is read into the specified array, starting at the specified offset into the array in bytes. This method blocks until the requested amount of data has been read. However, if the data line is closed, stopped, drained, or flushed before the requested amount has been read, the method no longer blocks, but returns the number of bytes read thus far.

The number of bytes that can be read without blocking can be ascertained using the available method of the DataLine interface. (While it is guaranteed that this number of bytes can be read without blocking, there is no guarantee that attempts to read additional data will block.)

The number of bytes to be read must represent an integral number of sample frames, such that:

[ bytes read ] % [frame size in bytes ] == 0

The return value will always meet this requirement. A request to read a number of bytes representing a non-integral number of sample frames cannot be fulfilled and may result in an IllegalArgumentException.
Parameters:
b - a byte array that will contain the requested input data when this method returns
off - the offset from the beginning of the array, in bytes
len - the requested number of bytes to read
Returns:
the number of bytes actually read
Throws:
IllegalArgumentException - if the requested number of bytes does not represent an integral number of sample frames.
See Also:
SourceDataLine.write(byte[], int, int), DataLine.available()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class EnumControl.Type

java.lang.Object
  |
  +--javax.sound.sampled.Control.Type
        |
        +--javax.sound.sampled.EnumControl.Type
Enclosing class:
EnumControl
public static class EnumControl.Type
extends Control.Type

An instance of the EnumControl.Type inner class identifies one kind of enumerated control. Static instances are provided for the common types.

Since:
1.3
See Also:
EnumControl

Field Summary
static EnumControl.Type REVERB
Represents a control over a set of possible reverberation settings.
Constructor Summary
protected EnumControl.Type(String name)
Constructs a new enumerated control type.
Methods inherited from class javax.sound.sampled.Control.Type
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

REVERB

public static final EnumControl.Type REVERB
Represents a control over a set of possible reverberation settings. Each reverberation setting is described by an instance of the ReverbType class. (To access these settings, invoke EnumControl.getValues() on an enumerated control of type REVERB.)
Constructor Detail

EnumControl.Type

protected EnumControl.Type(String name)
Constructs a new enumerated control type.
Parameters:
name - the name of the new enumerated control type
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class Control.Type

java.lang.Object
  |
  +--javax.sound.sampled.Control.Type
Direct Known Subclasses:
BooleanControl.Type, CompoundControl.Type, EnumControl.Type, FloatControl.Type
Enclosing class:
Control
public static class Control.Type
extends Object

An instance of the Type class represents the type of the control. Static instances are provided for the common types.

Constructor Summary
protected Control.Type(String name)
Constructs a new control type with the name specified.
Method Summary
boolean | equals(Object obj) Finalizes the equals method
int | hashCode() Finalizes the hashCode method
String | toString() Provides the String representation of the control type.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Control.Type

protected Control.Type(String name)
Constructs a new control type with the name specified. The name should be a descriptive string appropriate for labelling the control in an application, such as "Gain" or "Balance."
Parameters:
name - the name of the new control type.
Method Detail

equals

public final boolean equals(Object obj)
Finalizes the equals method
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Finalizes the hashCode method
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides the String representation of the control type. This String is the same name that was passed to the constructor.
Overrides:
toString in class Object
Returns:
the encoding name
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class CompoundControl.Type

java.lang.Object
  |
  +--javax.sound.sampled.Control.Type
        |
        +--javax.sound.sampled.CompoundControl.Type
Enclosing class:
CompoundControl
public static class CompoundControl.Type
extends Control.Type

An instance of the CompoundControl.Type inner class identifies one kind of compound control. Static instances are provided for the common types.

Since:
1.3

Constructor Summary
protected CompoundControl.Type(String name)
Constructs a new compound control type.
Methods inherited from class javax.sound.sampled.Control.Type
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CompoundControl.Type

protected CompoundControl.Type(String name)
Constructs a new compound control type.
Parameters:
name - the name of the new compound control type
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class AudioFileFormat.Type

java.lang.Object
  |
  +--javax.sound.sampled.AudioFileFormat.Type
Enclosing class:
AudioFileFormat
public static class AudioFileFormat.Type
extends Object

An instance of the Type class represents one of the standard types of audio file. Static instances are provided for the common types.

Field Summary
static AudioFileFormat.Type | AIFC Specifies an AIFF-C file.
static AudioFileFormat.Type | AIFF Specifies an AIFF file.
static AudioFileFormat.Type | AU Specifies an AU file.
static AudioFileFormat.Type | SND Specifies a SND file.
static AudioFileFormat.Type | WAVE Specifies a WAVE file.
Constructor Summary
protected AudioFileFormat.Type(String name, String extension)
Constructs a file type.
Method Summary
boolean | equals(Object obj) Finalizes the equals method
String | getExtension() Obtains the common file name extension for this file type.
int | hashCode() Finalizes the hashCode method
String | toString() Provides the file type's name as the String representation of the file type.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

WAVE

public static final AudioFileFormat.Type WAVE
Specifies a WAVE file.

AU

public static final AudioFileFormat.Type AU
Specifies an AU file.

AIFF

public static final AudioFileFormat.Type AIFF
Specifies an AIFF file.

AIFC

public static final AudioFileFormat.Type AIFC
Specifies an AIFF-C file.

SND

public static final AudioFileFormat.Type SND
Specifies a SND file.
Constructor Detail

AudioFileFormat.Type

protected AudioFileFormat.Type(String name,
                               String extension)
Constructs a file type.
Parameters:
name - the string that names the file type
extension - the string that commonly marks the file type
Method Detail

equals

public final boolean equals(Object obj)
Finalizes the equals method
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public final int hashCode()
Finalizes the hashCode method
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public final String toString()
Provides the file type's name as the String representation of the file type.
Overrides:
toString in class Object
Returns:
the file type's name

getExtension

public String getExtension()
Obtains the common file name extension for this file type.
Returns:
file type extension
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class BooleanControl.Type

java.lang.Object
  |
  +--javax.sound.sampled.Control.Type
        |
        +--javax.sound.sampled.BooleanControl.Type
Enclosing class:
BooleanControl
public static class BooleanControl.Type
extends Control.Type

An instance of the BooleanControl.Type class identifies one kind of boolean control. Static instances are provided for the common types.

Since:
1.3

Field Summary
static BooleanControl.Type | APPLY_REVERB Represents a control for whether reverberation is applied to a line.
static BooleanControl.Type | MUTE Represents a control for the mute status of a line.
Constructor Summary
protected BooleanControl.Type(String name)
Constructs a new boolean control type.
Methods inherited from class javax.sound.sampled.Control.Type
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MUTE

public static final BooleanControl.Type MUTE
Represents a control for the mute status of a line. Note that mute status does not affect gain.

APPLY_REVERB

public static final BooleanControl.Type APPLY_REVERB
Represents a control for whether reverberation is applied to a line. Note that the status of this control not affect the reverberation settings for a line, but does affect whether these settings are used.
Constructor Detail

BooleanControl.Type

protected BooleanControl.Type(String name)
Constructs a new boolean control type.
Parameters:
name - the name of the new boolean control type
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class LineEvent.Type

java.lang.Object
  |
  +--javax.sound.sampled.LineEvent.Type
Enclosing class:
LineEvent
public static class LineEvent.Type
extends Object

The LineEvent.Type inner class identifies what kind of event occurred on a line. Static instances are provided for the common types (OPEN, CLOSE, START, and STOP).

See Also:
LineEvent.getType()

Field Summary
static LineEvent.Type | CLOSE A type of event that is sent when a line closes, freeing the system resources it had obtained when it was opened.
static LineEvent.Type | OPEN A type of event that is sent when a line opens, reserving system resources for itself.
static LineEvent.Type | START A type of event that is sent when a line begins to engage in active input or output of audio data in response to a start request.
static LineEvent.Type | STOP A type of event that is sent when a line ceases active input or output of audio data in response to a stop request, or because the end of media has been reached.
Constructor Summary
protected LineEvent.Type(String name)
Constructs a new event type.
Method Summary
boolean | equals(Object obj) Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
int | hashCode() Finalizes the hashcode method.
String | toString() Returns the type name as the string representation.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

OPEN

public static final LineEvent.Type OPEN
A type of event that is sent when a line opens, reserving system resources for itself.
See Also:
CLOSE, Line.open()

CLOSE

public static final LineEvent.Type CLOSE
A type of event that is sent when a line closes, freeing the system resources it had obtained when it was opened.
See Also:
OPEN, Line.close()

START

public static final LineEvent.Type START
A type of event that is sent when a line begins to engage in active input or output of audio data in response to a start request.
See Also:
STOP, DataLine.start()

STOP

public static final LineEvent.Type STOP
A type of event that is sent when a line ceases active input or output of audio data in response to a stop request, or because the end of media has been reached.
See Also:
START, DataLine.stop()
Constructor Detail

LineEvent.Type

protected LineEvent.Type(String name)
Constructs a new event type.
Parameters:
name - name of the type
Method Detail

equals

public final boolean equals(Object obj)
Indicates whether the specified object is equal to this reverb type, returning true if the objects are identical.
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this reverb type is the same as obj; false otherwise

hashCode

public final int hashCode()
Finalizes the hashcode method.
Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public String toString()
Returns the type name as the string representation.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class FloatControl.Type

java.lang.Object
  |
  +--javax.sound.sampled.Control.Type
        |
        +--javax.sound.sampled.FloatControl.Type
Enclosing class:
FloatControl
public static class FloatControl.Type
extends Control.Type

An instance of the FloatControl.Type inner class identifies one kind of float control. Static instances are provided for the common types.

Since:
1.3

Field Summary
static FloatControl.Type | AUX_RETURN Represents a control for the auxiliary return gain on a line.
static FloatControl.Type | AUX_SEND Represents a control for the auxiliary send gain on a line.
static FloatControl.Type | BALANCE Represents a control for the relative balance of a stereo signal between two stereo speakers.
static FloatControl.Type | MASTER_GAIN Represents a control for the overall gain on a line.
static FloatControl.Type | PAN Represents a control for the relative pan (left-right positioning) of the signal.
static FloatControl.Type | REVERB_RETURN Represents a control for the post-reverb gain on a line.
static FloatControl.Type | REVERB_SEND Represents a control for the pre-reverb gain on a line.
static FloatControl.Type | SAMPLE_RATE Represents a control that changes the sample rate of audio playback.
static FloatControl.Type | VOLUME Represents a control for the volume on a line.
Constructor Summary
protected FloatControl.Type(String name)
Constructs a new float control type.
Methods inherited from class javax.sound.sampled.Control.Type
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

MASTER_GAIN

public static final FloatControl.Type MASTER_GAIN
Represents a control for the overall gain on a line.

Gain is a quantity in decibels (dB) that is added to the intrinsic decibel level of the audio signal--that is, the level of the signal before it is altered by the gain control. A positive gain amplifies (boosts) the signal's volume, and a negative gain attenuates (cuts) it. The gain setting defaults to a value of 0.0 dB, meaning the signal's loudness is unaffected. Note that gain measures dB, not amplitude. The relationship between a gain in decibels and the corresponding linear amplitude multiplier is:

linearScalar = pow(10.0, gainDB/20.0)

The FloatControl class has methods to impose a maximum and minimum allowable value for gain. However, because an audio signal might already be at a high amplitude, the maximum setting does not guarantee that the signal will be undistorted when the gain is applied to it (unless the maximum is zero or negative). To avoid numeric overflow from excessively large gain settings, a gain control can implement clipping, meaning that the signal's amplitude will be limited to the maximum value representable by its audio format, instead of wrapping around.

These comments apply to gain controls in general, not just master gain controls. A line can have more than one gain control. For example, a mixer (which is itself a line) might have a master gain control, an auxiliary return control, a reverb return control, and, on each of its source lines, an individual aux send and reverb send.

See Also:
AUX_SEND, AUX_RETURN, REVERB_SEND, REVERB_RETURN, VOLUME

AUX_SEND

public static final FloatControl.Type AUX_SEND
Represents a control for the auxiliary send gain on a line.
See Also:
MASTER_GAIN, AUX_RETURN

AUX_RETURN

public static final FloatControl.Type AUX_RETURN
Represents a control for the auxiliary return gain on a line.
See Also:
MASTER_GAIN, AUX_SEND

REVERB_SEND

public static final FloatControl.Type REVERB_SEND
Represents a control for the pre-reverb gain on a line. This control may be used to affect how much of a line's signal is directed to a mixer's internal reverberation unit.
See Also:
MASTER_GAIN, REVERB_RETURN, EnumControl.Type.REVERB

REVERB_RETURN

public static final FloatControl.Type REVERB_RETURN
Represents a control for the post-reverb gain on a line. This control may be used to control the relative amplitude of the signal returned from an internal reverberation unit.
See Also:
MASTER_GAIN, REVERB_SEND

VOLUME

public static final FloatControl.Type VOLUME
Represents a control for the volume on a line.

PAN

public static final FloatControl.Type PAN
Represents a control for the relative pan (left-right positioning) of the signal. The signal may be mono; the pan setting affects how it is distributed by the mixer in a stereo mix. The valid range of values is -1.0 (left channel only) to 1.0 (right channel only). The default is 0.0 (centered).
See Also:
BALANCE

BALANCE

public static final FloatControl.Type BALANCE
Represents a control for the relative balance of a stereo signal between two stereo speakers. The valid range of values is -1.0 (left channel only) to 1.0 (right channel only). The default is 0.0 (centered).
See Also:
PAN

SAMPLE_RATE

public static final FloatControl.Type SAMPLE_RATE
Represents a control that changes the sample rate of audio playback. The net effect of changing the sample rate depends on the relationship between the media's natural rate and the rate that is set via this control. The natural rate is the sample rate that is specified in the data line's AudioFormat object. For example, if the natural rate of the media is 11025 samples per second and the sample rate is set to 22050 samples per second, the media will play back at twice the normal speed.

Changing the sample rate with this control does not affect the data line's audio format. Also note that whenever you change a sound's sample rate, a change in the sound's pitch results. For example, doubling the sample rate has the effect of doubling the frequencies in the sound's spectrum, which raises the pitch by an octave.

Constructor Detail

FloatControl.Type

protected FloatControl.Type(String name)
Constructs a new float control type.
Parameters:
name - the name of the new float control type
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsupportedAudioFileException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.sound.sampled
Class UnsupportedAudioFileException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.sound.sampled.UnsupportedAudioFileException
All Implemented Interfaces:
Serializable
public class UnsupportedAudioFileException
extends Exception

An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
UnsupportedAudioFileException()
Constructs a UnsupportedAudioFileException that has null as its error detail message.
UnsupportedAudioFileException(String message)
Constructs a UnsupportedAudioFileException that has the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedAudioFileException

public UnsupportedAudioFileException()
Constructs a UnsupportedAudioFileException that has null as its error detail message.

UnsupportedAudioFileException

public UnsupportedAudioFileException(String message)
Constructs a UnsupportedAudioFileException that has the specified detail message.
Parameters:
message - a string containing the error detail message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.swing Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
    • class javax.swing.AbstractButton.ButtonChangeListener (implements javax.swing.event.ChangeListener, java.io.Serializable)
    • class javax.swing.AbstractCellEditor (implements javax.swing.CellEditor, java.io.Serializable)
      • class javax.swing.DefaultCellEditor (implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor)
    • class javax.swing.AbstractListModel (implements javax.swing.ListModel, java.io.Serializable)
      • class javax.swing.DefaultComboBoxModel (implements javax.swing.MutableComboBoxModel, java.io.Serializable)
      • class javax.swing.DefaultListModel
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class javax.swing.Box.Filler.AccessibleBoxFiller
        • class java.awt.Container.AccessibleAWTContainer
          • class javax.swing.Box.AccessibleBox
          • class javax.swing.CellRendererPane.AccessibleCellRendererPane
          • class javax.swing.JComponent.AccessibleJComponent
            • class javax.swing.AbstractButton.AccessibleAbstractButton (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleText, javax.accessibility.AccessibleValue)
              • class javax.swing.JButton.AccessibleJButton
              • class javax.swing.JMenuItem.AccessibleJMenuItem (implements javax.swing.event.ChangeListener)
                • class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
                • class javax.swing.JMenu.AccessibleJMenu (implements javax.accessibility.AccessibleSelection)
                • class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
              • class javax.swing.JToggleButton.AccessibleJToggleButton (implements java.awt.event.ItemListener)
                • class javax.swing.JCheckBox.AccessibleJCheckBox
                • class javax.swing.JRadioButton.AccessibleJRadioButton
            • class javax.swing.JColorChooser.AccessibleJColorChooser
            • class javax.swing.JComboBox.AccessibleJComboBox (implements javax.accessibility.AccessibleAction, javax.accessibility.AccessibleSelection)
            • class javax.swing.JDesktopPane.AccessibleJDesktopPane
            • class javax.swing.JFileChooser.AccessibleJFileChooser
            • class javax.swing.JInternalFrame.AccessibleJInternalFrame (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JLabel.AccessibleJLabel (implements javax.accessibility.AccessibleText)
            • class javax.swing.JLayeredPane.AccessibleJLayeredPane
            • class javax.swing.JList.AccessibleJList (implements javax.accessibility.AccessibleSelection, javax.swing.event.ListDataListener, javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener)
            • class javax.swing.JMenuBar.AccessibleJMenuBar (implements javax.accessibility.AccessibleSelection)
            • class javax.swing.JOptionPane.AccessibleJOptionPane
            • class javax.swing.JPanel.AccessibleJPanel
            • class javax.swing.JPopupMenu.AccessibleJPopupMenu
            • class javax.swing.JProgressBar.AccessibleJProgressBar (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JRootPane.AccessibleJRootPane
            • class javax.swing.JScrollBar.AccessibleJScrollBar (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JScrollPane.AccessibleJScrollPane (implements javax.swing.event.ChangeListener)
            • class javax.swing.JSeparator.AccessibleJSeparator
            • class javax.swing.JSlider.AccessibleJSlider (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JSplitPane.AccessibleJSplitPane (implements javax.accessibility.AccessibleValue)
            • class javax.swing.JTabbedPane.AccessibleJTabbedPane (implements javax.accessibility.AccessibleSelection, javax.swing.event.ChangeListener)
            • class javax.swing.JTable.AccessibleJTable (implements javax.accessibility.AccessibleSelection, javax.accessibility.AccessibleTable, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener)
            • class javax.swing.text.JTextComponent.AccessibleJTextComponent (implements javax.accessibility.AccessibleText, javax.swing.event.CaretListener, javax.swing.event.DocumentListener)
              • class javax.swing.JEditorPane.AccessibleJEditorPane
                • class javax.swing.JEditorPane.AccessibleJEditorPaneHTML
                • class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport (implements javax.accessibility.AccessibleHypertext)
              • class javax.swing.JTextArea.AccessibleJTextArea
              • class javax.swing.JTextField.AccessibleJTextField
                • class javax.swing.JPasswordField.AccessibleJPasswordField
            • class javax.swing.JToolBar.AccessibleJToolBar
            • class javax.swing.JToolTip.AccessibleJToolTip
            • class javax.swing.JTree.AccessibleJTree (implements javax.accessibility.AccessibleSelection, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener)
            • class javax.swing.JViewport.AccessibleJViewport
          • class java.awt.Panel.AccessibleAWTPanel
            • class java.applet.Applet.AccessibleApplet
              • class javax.swing.JApplet.AccessibleJApplet
          • class java.awt.Window.AccessibleAWTWindow
            • class java.awt.Dialog.AccessibleAWTDialog
              • class javax.swing.JDialog.AccessibleJDialog
            • class java.awt.Frame.AccessibleAWTFrame
              • class javax.swing.JFrame.AccessibleJFrame
            • class javax.swing.JWindow.AccessibleJWindow
      • class javax.swing.ImageIcon.AccessibleImageIcon (implements javax.accessibility.AccessibleIcon, java.io.Serializable)
      • class javax.swing.JList.AccessibleJList.AccessibleJListChild (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
      • class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
      • class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode (implements javax.accessibility.Accessible, javax.accessibility.AccessibleAction, javax.accessibility.AccessibleComponent, javax.accessibility.AccessibleSelection)
    • class javax.accessibility.AccessibleHyperlink (implements javax.accessibility.AccessibleAction)
      • class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
    • class javax.swing.ActionMap (implements java.io.Serializable)
    • class javax.swing.BorderFactory
    • class javax.swing.BoxLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class javax.swing.ButtonGroup (implements java.io.Serializable)
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class javax.swing.Box.Filler (implements javax.accessibility.Accessible)
      • class java.awt.Container
        • class javax.swing.Box (implements javax.accessibility.Accessible)
        • class javax.swing.CellRendererPane (implements javax.accessibility.Accessible)
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
            • class javax.swing.JButton (implements javax.accessibility.Accessible)
            • class javax.swing.JMenuItem (implements javax.accessibility.Accessible, javax.swing.MenuElement)
              • class javax.swing.JCheckBoxMenuItem (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
              • class javax.swing.JMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
              • class javax.swing.JRadioButtonMenuItem (implements javax.accessibility.Accessible)
            • class javax.swing.JToggleButton (implements javax.accessibility.Accessible)
              • class javax.swing.JCheckBox (implements javax.accessibility.Accessible)
              • class javax.swing.JRadioButton (implements javax.accessibility.Accessible)
          • class javax.swing.JColorChooser (implements javax.accessibility.Accessible)
          • class javax.swing.JComboBox (implements javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.ItemSelectable, javax.swing.event.ListDataListener)
          • class javax.swing.JFileChooser (implements javax.accessibility.Accessible)
          • class javax.swing.JInternalFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class javax.swing.JInternalFrame.JDesktopIcon (implements javax.accessibility.Accessible)
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.DefaultListCellRenderer (implements javax.swing.ListCellRenderer, java.io.Serializable)
              • class javax.swing.DefaultListCellRenderer.UIResource (implements javax.swing.plaf.UIResource)
          • class javax.swing.JLayeredPane (implements javax.accessibility.Accessible)
            • class javax.swing.JDesktopPane (implements javax.accessibility.Accessible)
          • class javax.swing.JList (implements javax.accessibility.Accessible, javax.swing.Scrollable)
          • class javax.swing.JMenuBar (implements javax.accessibility.Accessible, javax.swing.MenuElement)
          • class javax.swing.JOptionPane (implements javax.accessibility.Accessible)
          • class javax.swing.JPanel (implements javax.accessibility.Accessible)
          • class javax.swing.JPopupMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
          • class javax.swing.JProgressBar (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JRootPane (implements javax.accessibility.Accessible)
          • class javax.swing.JScrollBar (implements javax.accessibility.Accessible, java.awt.Adjustable)
            • class javax.swing.JScrollPane.ScrollBar (implements javax.swing.plaf.UIResource)
          • class javax.swing.JScrollPane (implements javax.accessibility.Accessible, javax.swing.ScrollPaneConstants)
          • class javax.swing.JSeparator (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.JPopupMenu.Separator
            • class javax.swing.JToolBar.Separator
          • class javax.swing.JSlider (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JSplitPane (implements javax.accessibility.Accessible)
          • class javax.swing.JTabbedPane (implements javax.accessibility.Accessible, java.io.Serializable, javax.swing.SwingConstants)
          • class javax.swing.JTable (implements javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.Scrollable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener)
          • class javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
            • class javax.swing.JEditorPane
              • class javax.swing.JTextPane
            • class javax.swing.JTextArea
            • class javax.swing.JTextField (implements javax.swing.SwingConstants)
              • class javax.swing.JPasswordField
          • class javax.swing.JToolBar (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
          • class javax.swing.JToolTip (implements javax.accessibility.Accessible)
          • class javax.swing.JTree (implements javax.accessibility.Accessible, javax.swing.Scrollable)
          • class javax.swing.JViewport (implements javax.accessibility.Accessible)
        • class java.awt.Panel (implements javax.accessibility.Accessible)
          • class java.applet.Applet
            • class javax.swing.JApplet (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
        • class java.awt.Window (implements javax.accessibility.Accessible)
          • class java.awt.Dialog
            • class javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class java.awt.Frame (implements java.awt.MenuContainer)
            • class javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
          • class javax.swing.JWindow (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
    • class java.awt.event.ComponentAdapter (implements java.awt.event.ComponentListener)
      • class javax.swing.JViewport.ViewListener (implements java.io.Serializable)
    • class javax.swing.DefaultBoundedRangeModel (implements javax.swing.BoundedRangeModel, java.io.Serializable)
    • class javax.swing.DefaultButtonModel (implements javax.swing.ButtonModel, java.io.Serializable)
      • class javax.swing.JToggleButton.ToggleButtonModel
    • class javax.swing.DefaultCellEditor.EditorDelegate (implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable)
    • class javax.swing.DefaultDesktopManager (implements javax.swing.DesktopManager, java.io.Serializable)
    • class javax.swing.DefaultListSelectionModel (implements java.lang.Cloneable, javax.swing.ListSelectionModel, java.io.Serializable)
    • class javax.swing.tree.DefaultMutableTreeNode (implements java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable)
      • class javax.swing.JTree.DynamicUtilTreeNode
    • class javax.swing.DefaultSingleSelectionModel (implements java.io.Serializable, javax.swing.SingleSelectionModel)
    • class javax.swing.tree.DefaultTreeSelectionModel (implements java.lang.Cloneable, java.io.Serializable, javax.swing.tree.TreeSelectionModel)
      • class javax.swing.JTree.EmptySelectionModel
    • class java.util.Dictionary
      • class java.util.Hashtable (implements java.lang.Cloneable, java.util.Map, java.io.Serializable)
        • class javax.swing.UIDefaults
    • class javax.swing.FocusManager
      • class javax.swing.DefaultFocusManager
    • class java.awt.Graphics
      • class javax.swing.DebugGraphics
    • class java.awt.image.ImageFilter (implements java.lang.Cloneable, java.awt.image.ImageConsumer)
      • class java.awt.image.RGBImageFilter
        • class javax.swing.GrayFilter
    • class javax.swing.ImageIcon (implements javax.accessibility.Accessible, javax.swing.Icon, java.io.Serializable)
    • class javax.swing.InputMap (implements java.io.Serializable)
      • class javax.swing.ComponentInputMap
    • class java.io.InputStream
      • class java.io.FilterInputStream
        • class javax.swing.ProgressMonitorInputStream
    • class javax.swing.InputVerifier
    • class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler (implements java.awt.event.ContainerListener)
    • class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.JRootPane.RootLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class javax.swing.JTabbedPane.ModelListener (implements javax.swing.event.ChangeListener, java.io.Serializable)
    • class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange (implements javax.accessibility.AccessibleTableModelChange)
    • class javax.swing.JTree.TreeModelHandler (implements javax.swing.event.TreeModelListener)
    • class javax.swing.JTree.TreeSelectionRedirector (implements java.io.Serializable, javax.swing.event.TreeSelectionListener)
    • class javax.swing.KeyStroke (implements java.io.Serializable)
    • class javax.swing.LookAndFeel
    • class javax.swing.MenuSelectionManager
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
      • class javax.swing.ToolTipManager (implements java.awt.event.MouseMotionListener)
    • class javax.swing.OverlayLayout (implements java.awt.LayoutManager2, java.io.Serializable)
    • class javax.swing.ProgressMonitor
    • class javax.swing.RepaintManager
    • class javax.swing.ScrollPaneLayout (implements java.awt.LayoutManager, javax.swing.ScrollPaneConstants, java.io.Serializable)
      • class javax.swing.ScrollPaneLayout.UIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.SizeRequirements (implements java.io.Serializable)
    • class javax.swing.SizeSequence
    • class javax.swing.SwingUtilities (implements javax.swing.SwingConstants)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.swing.UnsupportedLookAndFeelException
    • class javax.swing.Timer (implements java.io.Serializable)
    • class javax.swing.ToolTipManager.insideTimerAction (implements java.awt.event.ActionListener)
    • class javax.swing.ToolTipManager.outsideTimerAction (implements java.awt.event.ActionListener)
    • class javax.swing.ToolTipManager.stillInsideTimerAction (implements java.awt.event.ActionListener)
    • class javax.swing.UIDefaults.LazyInputMap (implements javax.swing.UIDefaults.LazyValue)
    • class javax.swing.UIDefaults.ProxyLazyValue (implements javax.swing.UIDefaults.LazyValue)
    • class javax.swing.UIManager (implements java.io.Serializable)
    • class javax.swing.UIManager.LookAndFeelInfo
    • class javax.swing.ViewportLayout (implements java.awt.LayoutManager, java.io.Serializable)
    • class java.awt.event.WindowAdapter (implements java.awt.event.WindowListener)
      • class javax.swing.JMenu.WinListener (implements java.io.Serializable)

Interface Hierarchy

  • interface javax.swing.BoundedRangeModel
  • interface javax.swing.CellEditor
  • interface javax.swing.ComboBoxEditor
  • interface javax.swing.DesktopManager
  • interface java.util.EventListener
    • interface java.awt.event.ActionListener
      • interface javax.swing.Action
  • interface javax.swing.Icon
  • interface java.awt.ItemSelectable
    • interface javax.swing.ButtonModel
  • interface javax.swing.JComboBox.KeySelectionManager
  • interface javax.swing.ListCellRenderer
  • interface javax.swing.ListModel
    • interface javax.swing.ComboBoxModel
      • interface javax.swing.MutableComboBoxModel
  • interface javax.swing.ListSelectionModel
  • interface javax.swing.MenuElement
  • interface javax.swing.Renderer
  • interface javax.swing.RootPaneContainer
  • interface javax.swing.Scrollable
  • interface javax.swing.ScrollPaneConstants
  • interface javax.swing.SingleSelectionModel
  • interface javax.swing.SwingConstants
  • interface javax.swing.UIDefaults.ActiveValue
  • interface javax.swing.UIDefaults.LazyValue
  • interface javax.swing.WindowConstants
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package javax.swing

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing

Packages that use javax.swing
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in javax.swing used by javax.swing
AbstractButton
Defines common behaviors for buttons and menu items.
AbstractButton.AccessibleAbstractButton
This class implements accessibility support for the AbstractButton class.
AbstractCellEditor
AbstractListModel
The Abstract definition for the data model the provides a List with its contents.
Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
ActionMap
ActionMap provides mappings from Objects (called keys or Action names) to Actions.
BoundedRangeModel
Defines the data model used by components like Sliders and ProgressBars.
Box
A lightweight container that uses a BoxLayout object as its layout manager.
Box.Filler
An implementation of a lightweight component that participates in layout but has no view.
ButtonGroup
This class is used to create a multiple-exclusion scope for a set of buttons.
ButtonModel
State Model for buttons.
CellEditor
This interface defines the methods any general editor should be able to implement.
CellRendererPane
This class is inserted in between cell renderers and the components that use them.
ComboBoxEditor
The editor component used for JComboBox components.
ComboBoxModel
ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
ComponentInputMap
A ComponentInputMap is an InputMap associated with a particular JComponent.
DefaultButtonModel
The default implementation of a Button component's data model.
DefaultCellEditor
The default editor for table and tree cells.
DefaultCellEditor.EditorDelegate
DefaultListCellRenderer
Renders an item in a list.
DesktopManager
DesktopManager objects are owned by a JDesktopPane object.
FocusManager
Swing Focus Manager
Icon
A small fixed size picture, typically used to decorate components.
ImageIcon
An implementation of the Icon interface that paints Icons from Images.
InputMap
InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
InputVerifier
The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields.
JApplet
An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
JButton
An implementation of a "push" button.
JCheckBox
An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
JCheckBoxMenuItem
A menu item that can be selected or deselected.
JColorChooser
JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
JComboBox
A component that combines a button or text field and a drop-down list.
JComboBox.KeySelectionManager
The interface that defines a KeySelectionManager.
JComponent
The base class for all Swing components except top-level containers.
JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for accessibility.
JDesktopPane
A container used to create a multiple-document interface or a virtual desktop.
JDialog
The main class for creating a dialog window.
JEditorPane
A text component to edit various kinds of content.
JEditorPane.AccessibleJEditorPane
This class implements accessibility support for the JEditorPane class.
JEditorPane.JEditorPaneAccessibleHypertextSupport
What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
JFileChooser
JFileChooser provides a simple mechanism for the user to choose a file.
JFrame
An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
JInternalFrame
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
JInternalFrame.JDesktopIcon
This component represents an iconified version of a JInternalFrame.
JLabel
A display area for a short text string or an image, or both.
JLayeredPane
JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
JList
A component that allows the user to select one or more objects from a list.
JList.AccessibleJList
This class implements accessibility support for the JList class.
JMenu
An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JMenu.WinListener
A listener class that watches for a popup window closing.
JMenuBar
An implementation of a menu bar.
JMenuItem
An implementation of an item in a menu.
JMenuItem.AccessibleJMenuItem
This class implements accessibility support for the JMenuItem class.
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JPanel
JPanel is a generic lightweight container.
JPasswordField
JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
JPopupMenu
An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JProgressBar
A component that displays an integer value within a bounded interval.
JRadioButton
An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
JRadioButtonMenuItem
An implementation of a radio button menu item.
JRootPane
A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
JScrollBar
An implementation of a scrollbar.
JScrollPane
Provides a scrollable view of a component.
JSeparator
An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
JSlider
A component that lets the user graphically select a value by slding a knob within a bounded interval.
JSplitPane
JSplitPane is used to divide two (and only two) Components.
JTabbedPane
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTable
JTable is a user-interface component that presents data in a two-dimensional table format.
JTable.AccessibleJTable
This class implements accessibility support for the JTable class.
JTextArea
A TextArea is a multi-line area that displays plain text.
JTextField
JTextField is a lightweight component that allows the editing of a single line of text.
JTextField.AccessibleJTextField
This class implements accessibility support for the JTextField class.
JToggleButton
An implementation of a two-state button.
JToggleButton.AccessibleJToggleButton
This class implements accessibility support for the JToggleButton class.
JToolBar
JToolBar provides a component that is useful for displaying commonly used Actions or controls.
JToolTip
Used to display a "Tip" for a Component.
JTree
A control that displays a set of hierarchical data as an outline.
JTree.AccessibleJTree
This class implements accessibility support for the JTree class.
JTree.EmptySelectionModel
EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
JTree.TreeSelectionRedirector
Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
JViewport
The "viewport" or "porthole" through which you see the underlying information.
JViewport.ViewListener
A listener for the view.
JWindow
A JWindow is a container that can be displayed anywhere on the user's desktop.
KeyStroke
A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListModel
This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
ListSelectionModel
This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
LookAndFeel
Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
MenuElement
Any component that can be placed into a menu should implement this interface.
MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
MutableComboBoxModel
A mutable version of ComboBoxModel.
ProgressMonitor
A class to monitor the progress of some operation.
RepaintManager
This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.
RootPaneContainer
This interface is implemented by components that have a single JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
Scrollable
An interface that provides information to a scrolling container like JScrollPane.
ScrollPaneConstants
Constants used with the JScrollPane component.
ScrollPaneLayout
The layout manager used by JScrollPane.
SingleSelectionModel
A model that supports at most one indexed selection.
SizeRequirements
For the convenience of layout managers, calculates information about the size and position of components.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.
ToolTipManager
Manages all the ToolTips in the system.
UIDefaults
A table of defaults for Swing components.
UIDefaults.LazyValue
This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
UIManager.LookAndFeelInfo
Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
UnsupportedLookAndFeelException
An exception that indicates the request look & feel management classes are not present on the user's system.
WindowConstants
Constants used to control the window-closing operation.

Classes in javax.swing used by javax.swing.border
Icon
A small fixed size picture, typically used to decorate components.

Classes in javax.swing used by javax.swing.colorchooser
Icon
A small fixed size picture, typically used to decorate components.
JColorChooser
JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
JComponent
The base class for all Swing components except top-level containers.
JPanel
JPanel is a generic lightweight container.

Classes in javax.swing used by javax.swing.event
JComponent
The base class for all Swing components except top-level containers.
JInternalFrame
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
MenuElement
Any component that can be placed into a menu should implement this interface.
MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.

Classes in javax.swing used by javax.swing.filechooser
Icon
A small fixed size picture, typically used to decorate components.

Classes in javax.swing used by javax.swing.plaf
ActionMap
ActionMap provides mappings from Objects (called keys or Action names) to Actions.
ComponentInputMap
A ComponentInputMap is an InputMap associated with a particular JComponent.
Icon
A small fixed size picture, typically used to decorate components.
InputMap
InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
JComboBox
A component that combines a button or text field and a drop-down list.
JComponent
The base class for all Swing components except top-level containers.
JFileChooser
JFileChooser provides a simple mechanism for the user to choose a file.
JList
A component that allows the user to select one or more objects from a list.
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JSplitPane
JSplitPane is used to divide two (and only two) Components.
JTabbedPane
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTree
A control that displays a set of hierarchical data as an outline.

Classes in javax.swing used by javax.swing.plaf.basic
AbstractAction
This class provides default implementations for the JFC Action interface.
AbstractButton
Defines common behaviors for buttons and menu items.
AbstractListModel
The Abstract definition for the data model the provides a List with its contents.
Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
BoxLayout
A layout manager that allows multiple components to be layed out either vertically or horizontally.
CellRendererPane
This class is inserted in between cell renderers and the components that use them.
ComboBoxEditor
The editor component used for JComboBox components.
ComboBoxModel
ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
DesktopManager
DesktopManager objects are owned by a JDesktopPane object.
Icon
A small fixed size picture, typically used to decorate components.
JButton
An implementation of a "push" button.
JComboBox
A component that combines a button or text field and a drop-down list.
JComponent
The base class for all Swing components except top-level containers.
JDesktopPane
A container used to create a multiple-document interface or a virtual desktop.
JFileChooser
JFileChooser provides a simple mechanism for the user to choose a file.
JFrame
An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
JInternalFrame
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
JInternalFrame.JDesktopIcon
This component represents an iconified version of a JInternalFrame.
JLabel
A display area for a short text string or an image, or both.
JList
A component that allows the user to select one or more objects from a list.
JMenu
An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JMenuBar
An implementation of a menu bar.
JMenuItem
An implementation of an item in a menu.
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JPanel
JPanel is a generic lightweight container.
JPopupMenu
An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JProgressBar
A component that displays an integer value within a bounded interval.
JRootPane
A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
JScrollBar
An implementation of a scrollbar.
JScrollPane
Provides a scrollable view of a component.
JSeparator
An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
JSlider
A component that lets the user graphically select a value by slding a knob within a bounded interval.
JSplitPane
JSplitPane is used to divide two (and only two) Components.
JTabbedPane
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTable
JTable is a user-interface component that presents data in a two-dimensional table format.
JTextField
JTextField is a lightweight component that allows the editing of a single line of text.
JToolBar
JToolBar provides a component that is useful for displaying commonly used Actions or controls.
JTree
A control that displays a set of hierarchical data as an outline.
KeyStroke
A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListModel
This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
ListSelectionModel
This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
LookAndFeel
Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
MenuElement
Any component that can be placed into a menu should implement this interface.
MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
ScrollPaneConstants
Constants used with the JScrollPane component.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.
Timer
Causes an action to occur at a predefined rate.
UIDefaults
A table of defaults for Swing components.

Classes in javax.swing used by javax.swing.plaf.metal
AbstractAction
This class provides default implementations for the JFC Action interface.
AbstractButton
Defines common behaviors for buttons and menu items.
AbstractListModel
The Abstract definition for the data model the provides a List with its contents.
Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
ActionMap
ActionMap provides mappings from Objects (called keys or Action names) to Actions.
CellRendererPane
This class is inserted in between cell renderers and the components that use them.
ComboBoxEditor
The editor component used for JComboBox components.
ComboBoxModel
ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
DefaultListCellRenderer
Renders an item in a list.
Icon
A small fixed size picture, typically used to decorate components.
JButton
An implementation of a "push" button.
JComboBox
A component that combines a button or text field and a drop-down list.
JComponent
The base class for all Swing components except top-level containers.
JFileChooser
JFileChooser provides a simple mechanism for the user to choose a file.
JInternalFrame
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
JLabel
A display area for a short text string or an image, or both.
JList
A component that allows the user to select one or more objects from a list.
JMenu
An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JPanel
JPanel is a generic lightweight container.
JPopupMenu
An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JScrollPane
Provides a scrollable view of a component.
JSeparator
An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
JSlider
A component that lets the user graphically select a value by slding a knob within a bounded interval.
JToolBar
JToolBar provides a component that is useful for displaying commonly used Actions or controls.
ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListModel
This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
LookAndFeel
Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
MenuElement
Any component that can be placed into a menu should implement this interface.
ScrollPaneConstants
Constants used with the JScrollPane component.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.
UIDefaults
A table of defaults for Swing components.

Classes in javax.swing used by javax.swing.plaf.multi
JComboBox
A component that combines a button or text field and a drop-down list.
JComponent
The base class for all Swing components except top-level containers.
JFileChooser
JFileChooser provides a simple mechanism for the user to choose a file.
JList
A component that allows the user to select one or more objects from a list.
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JSplitPane
JSplitPane is used to divide two (and only two) Components.
JTabbedPane
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTree
A control that displays a set of hierarchical data as an outline.
LookAndFeel
Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
UIDefaults
A table of defaults for Swing components.

Classes in javax.swing used by javax.swing.table
CellEditor
This interface defines the methods any general editor should be able to implement.
JComponent
The base class for all Swing components except top-level containers.
JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for accessibility.
JLabel
A display area for a short text string or an image, or both.
JTable
JTable is a user-interface component that presents data in a two-dimensional table format.
ListSelectionModel
This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.

Classes in javax.swing used by javax.swing.text
AbstractAction
This class provides default implementations for the JFC Action interface.
Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
Icon
A small fixed size picture, typically used to decorate components.
JComponent
The base class for all Swing components except top-level containers.
JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for accessibility.
JEditorPane
A text component to edit various kinds of content.
KeyStroke
A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
Scrollable
An interface that provides information to a scrolling container like JScrollPane.
SizeRequirements
For the convenience of layout managers, calculates information about the size and position of components.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.

Classes in javax.swing used by javax.swing.text.html
AbstractAction
This class provides default implementations for the JFC Action interface.
Action
The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
JEditorPane
A text component to edit various kinds of content.
SizeRequirements
For the convenience of layout managers, calculates information about the size and position of components.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.

Classes in javax.swing used by javax.swing.tree
CellEditor
This interface defines the methods any general editor should be able to implement.
DefaultListSelectionModel
Default data model for list selections.
Icon
A small fixed size picture, typically used to decorate components.
JComponent
The base class for all Swing components except top-level containers.
JLabel
A display area for a short text string or an image, or both.
JTextField
JTextField is a lightweight component that allows the editing of a single line of text.
JTree
A control that displays a set of hierarchical data as an outline.
Scrollable
An interface that provides information to a scrolling container like JScrollPane.
SwingConstants
A collection of constants generally used for positioning and orienting components on the screen.
Timer
Causes an action to occur at a predefined rate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractAction

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
BasicDesktopPaneUI.CloseAction, BasicDesktopPaneUI.MaximizeAction, BasicDesktopPaneUI.MinimizeAction, BasicDesktopPaneUI.NavigateAction, BasicDesktopPaneUI.OpenAction, BasicFileChooserUI.ApproveSelectionAction, BasicFileChooserUI.CancelSelectionAction, BasicFileChooserUI.ChangeToParentDirectoryAction, BasicFileChooserUI.GoHomeAction, BasicFileChooserUI.NewFolderAction, BasicFileChooserUI.UpdateAction, BasicInternalFrameTitlePane.CloseAction, BasicInternalFrameTitlePane.IconifyAction, BasicInternalFrameTitlePane.MaximizeAction, BasicInternalFrameTitlePane.MoveAction, BasicInternalFrameTitlePane.RestoreAction, BasicInternalFrameTitlePane.SizeAction, BasicSliderUI.ActionScroller, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreePageAction, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction, MetalFileChooserUI.DirectoryComboBoxAction, TextAction
public abstract class AbstractAction
extends Object
implements Action, Cloneable, Serializable

This class provides default implementations for the JFC Action interface. Standard behaviors like the get and set methods for Action object properties (icon, text, and enabled) are defined here. The developer need only subclass this abstract class and define the actionPerformed method.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Action, Serialized Form

Field Summary
protected SwingPropertyChangeSupport | changeSupport If any PropertyChangeListeners have been registered, the changeSupport field describes them.
protected boolean | enabled Specifies whether action is enabled; the default is true.
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
AbstractAction()
Defines an Action object with a default description string and default icon.
AbstractAction(String name)
Defines an Action object with the specified description string and a default icon.
AbstractAction(String name, Icon icon)
Defines an Action object with the specified description string and a the specified icon.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
protected Object | clone() Clones the abstract action.
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Supports reporting bound property changes.
Object[] | getKeys() Returns an array of Objects which are keys for which values have been set for this AbstractAction, or null if no keys have values set.
Object | getValue(String key) Gets the Object associated with the specified key.
boolean | isEnabled() Returns true if the action is enabled.
void | putValue(String key, Object newValue) Sets the Value associated with the specified key.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | setEnabled(boolean newValue) Enables or disables the action.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed

Field Detail

enabled

protected boolean enabled
Specifies whether action is enabled; the default is true.

changeSupport

protected SwingPropertyChangeSupport changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.
Constructor Detail

AbstractAction

public AbstractAction()
Defines an Action object with a default description string and default icon.

AbstractAction

public AbstractAction(String name)
Defines an Action object with the specified description string and a default icon.

AbstractAction

public AbstractAction(String name,
                      Icon icon)
Defines an Action object with the specified description string and a the specified icon.
Method Detail

getValue

public Object getValue(String key)
Gets the Object associated with the specified key.
Specified by:
getValue in interface Action
Parameters:
key - a string containing the specified key
Returns:
the binding Object stored with this key; if there are no keys, it will return null
See Also:
Action.getValue(java.lang.String)

putValue

public void putValue(String key,
                     Object newValue)
Sets the Value associated with the specified key.
Specified by:
putValue in interface Action
Parameters:
key - the String that identifies the stored object
newValue - the Object to store using this key
See Also:
Action.putValue(java.lang.String, java.lang.Object)

isEnabled

public boolean isEnabled()
Returns true if the action is enabled.
Specified by:
isEnabled in interface Action
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()

setEnabled

public void setEnabled(boolean newValue)
Enables or disables the action.
Specified by:
setEnabled in interface Action
Parameters:
newValue - true to enable the action, false to disable it
See Also:
Action.setEnabled(boolean)

getKeys

public Object[] getKeys()
Returns an array of Objects which are keys for which values have been set for this AbstractAction, or null if no keys have values set.
Returns:
an array of key objects, or null if no keys have values set
Since:
1.3

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Supports reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property, e.g. setFont, setBackground, or setForeground. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.

Specified by:
addPropertyChangeListener in interface Action
Parameters:
listener - The PropertyChangeListener to be added
See Also:
Action.addPropertyChangeListener(java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Specified by:
removePropertyChangeListener in interface Action
Parameters:
listener - the PropertyChangeListener to be removed
See Also:
Action.removePropertyChangeListener(java.beans.PropertyChangeListener)

clone

protected Object clone()
                throws CloneNotSupportedException
Clones the abstract action. This gives the clone its own copy of the key/value list, which is not handled for you by Object.clone().
Overrides:
clone in class Object
Following copied from class: java.lang.Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AbstractButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
JButton, JMenuItem, JToggleButton
public abstract class AbstractButton
extends JComponent
implements ItemSelectable, SwingConstants

Defines common behaviors for buttons and menu items. For further information see How to Use Buttons, Check Boxes, and Radio Buttons, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | AbstractButton.ButtonChangeListener Extends ChangeListener to be serializable.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected ActionListener | actionListener The button model's ActionListener.
static String | BORDER_PAINTED_CHANGED_PROPERTY Identifies a change to having the border drawn, or having it not drawn.
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per button instance since the event's only state is the source property.
protected ChangeListener | changeListener The button model's changeListener.
static String | CONTENT_AREA_FILLED_CHANGED_PROPERTY Identifies a change from rollover enabled to disabled or back to enabled.
static String | DISABLED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been disabled.
static String | DISABLED_SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been disabled and selected.
static String | FOCUS_PAINTED_CHANGED_PROPERTY Identifies a change to having the border highlighted when focused, or not.
static String | HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY Identifies a change in the button's horizontal alignment.
static String | HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY Identifies a change in the button's horizontal text position.
static String | ICON_CHANGED_PROPERTY Identifies a change to the icon that represents the button.
protected ItemListener | itemListener The button model's ItemListener.
static String | MARGIN_CHANGED_PROPERTY Identifies a change in the button's margins.
static String | MNEMONIC_CHANGED_PROPERTY Identifies a change to the button's mnemonic.
protected ButtonModel | model The data model that determines the button's state.
static String | MODEL_CHANGED_PROPERTY Identifies a change in the button model.
static String | PRESSED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been pressed.
static String | ROLLOVER_ENABLED_CHANGED_PROPERTY Identifies a change in the button's
static String | ROLLOVER_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the cursor is over the button.
static String | ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the cursor is over the button and it has been selected.
static String | SELECTED_ICON_CHANGED_PROPERTY Identifies a change to the icon used when the button has been selected.
static String | TEXT_CHANGED_PROPERTY Identifies a change in the button's text.
static String | VERTICAL_ALIGNMENT_CHANGED_PROPERTY Identifies a change in the button's vertical alignment.
static String | VERTICAL_TEXT_POSITION_CHANGED_PROPERTY Identifies a change in the button's vertical text position.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
AbstractButton()
Method Summary
void | addActionListener(ActionListener l) Adds an ActionListener to the button.
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | addItemListener(ItemListener l) Adds an ItemListener to the checkbox.
protected int | checkHorizontalKey(int key, String exception) Verify that key is a legal value for the horizontalAlignment properties.
protected int | checkVerticalKey(int key, String exception) Ensures that the key is a valid.
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected ActionListener | createActionListener()
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected ChangeListener | createChangeListener() Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation.
protected ItemListener | createItemListener()
void | doClick() Programmatically perform a "click".
void | doClick(int pressTime) Programmatically perform a "click".
protected void | fireActionPerformed(ActionEvent event) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireItemStateChanged(ItemEvent event) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireStateChanged() Notifies all listeners that have registered interest for notification on this event type.
Action | getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
String | getActionCommand() Returns the action command for this button.
Icon | getDisabledIcon() Returns the icon used by the button when it's disabled.
Icon | getDisabledSelectedIcon() Returns the icon used by the button when it's disabled and selected.
int | getHorizontalAlignment() Returns the horizontal alignment of the icon and text.
int | getHorizontalTextPosition() Returns the horizontal position of the text relative to the icon.
Icon | getIcon() Returns the default icon.
String | getLabel() Deprecated. - Replaced by getText
Insets | getMargin() Returns the margin between the button's border and the label.
int | getMnemonic() Returns the keyboard mnemonic from the the current model.
ButtonModel | getModel() Returns the model that this button represents.
Icon | getPressedIcon() Returns the pressed icon for the button.
Icon | getRolloverIcon() Returns the rollover icon for the button.
Icon | getRolloverSelectedIcon() Returns the rollover selection icon for the button.
Icon | getSelectedIcon() Returns the selected icon for the button.
Object[] | getSelectedObjects() Returns an array (length 1) containing the label or null if the button is not selected.
String | getText() Returns the button's text.
ButtonUI | getUI() Returns the L&F object that renders this component.
int | getVerticalAlignment() Returns the vertical alignment of the text and icon.
int | getVerticalTextPosition() Returns the vertical position of the text relative to the icon.
boolean | imageUpdate(Image img, int infoflags, int x, int y, int w, int h) This is overridden to return false if the current Icon's Image is not equal to the passed in Image img.
protected void | init(String text, Icon icon)
boolean | isBorderPainted() Returns whether the border should be painted.
boolean | isContentAreaFilled() Checks whether the "content area" of the button should be filled.
boolean | isFocusPainted() Returns whether focus should be painted.
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
boolean | isRolloverEnabled() Checks whether rollover effects are enabled.
boolean | isSelected() Returns the state of the button.
protected void | paintBorder(Graphics g) Paint the button's border if BorderPainted property is true.
protected String | paramString() Returns a string representation of this AbstractButton.
void | removeActionListener(ActionListener l) Removes an ActionListener from the button.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | removeItemListener(ItemListener l) Removes an ItemListener from the button.
void | setAction(Action a) Sets the Action for the ActionEvent source.
void | setActionCommand(String actionCommand) Sets the action command for this button.
void | setBorderPainted(boolean b) Sets whether the border should be painted.
void | setContentAreaFilled(boolean b) Sets whether the button should paint the content area or leave it transparent.
void | setDisabledIcon(Icon disabledIcon) Sets the disabled icon for the button.
void | setDisabledSelectedIcon(Icon disabledSelectedIcon) Sets the disabled selection icon for the button.
void | setEnabled(boolean b) Enables (or disables) the button.
void | setFocusPainted(boolean b) Sets whether focus should be painted.
void | setHorizontalAlignment(int alignment) Sets the horizontal alignment of the icon and text.
void | setHorizontalTextPosition(int textPosition) Sets the horizontal position of the text relative to the icon.
void | setIcon(Icon defaultIcon) Sets the button's default icon.
void | setLabel(String label) Deprecated. - Replaced by setText(text)
void | setMargin(Insets m) Sets space for margin between the button's border and the label.
void | setMnemonic(char mnemonic) Specifies the mnemonic value.
void | setMnemonic(int mnemonic) Sets the keyboard mnemonic on the current model.
void | setModel(ButtonModel newModel) Sets the model that this button represents.
void | setPressedIcon(Icon pressedIcon) Sets the pressed icon for the button.
void | setRolloverEnabled(boolean b) Sets whether rollover effects should be enabled.
void | setRolloverIcon(Icon rolloverIcon) Sets the rollover icon for the button.
void | setRolloverSelectedIcon(Icon rolloverSelectedIcon) Sets the rollover selected icon for the button.
void | setSelected(boolean b) Sets the state of the button.
void | setSelectedIcon(Icon selectedIcon) Sets the selected icon for the button.
void | setText(String text) Sets the button's text.
void | setUI(ButtonUI ui) Sets the L&F object that renders this component.
void | setVerticalAlignment(int alignment) Sets the vertical alignment of the icon and text.
void | setVerticalTextPosition(int textPosition) Sets the vertical position of the text relative to the icon.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

MODEL_CHANGED_PROPERTY

public static final String MODEL_CHANGED_PROPERTY
Identifies a change in the button model.

TEXT_CHANGED_PROPERTY

public static final String TEXT_CHANGED_PROPERTY
Identifies a change in the button's text.

MNEMONIC_CHANGED_PROPERTY

public static final String MNEMONIC_CHANGED_PROPERTY
Identifies a change to the button's mnemonic.

MARGIN_CHANGED_PROPERTY

public static final String MARGIN_CHANGED_PROPERTY
Identifies a change in the button's margins.

VERTICAL_ALIGNMENT_CHANGED_PROPERTY

public static final String VERTICAL_ALIGNMENT_CHANGED_PROPERTY
Identifies a change in the button's vertical alignment.

HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY

public static final String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY
Identifies a change in the button's horizontal alignment.

VERTICAL_TEXT_POSITION_CHANGED_PROPERTY

public static final String VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Identifies a change in the button's vertical text position.

HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY

public static final String HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY
Identifies a change in the button's horizontal text position.

BORDER_PAINTED_CHANGED_PROPERTY

public static final String BORDER_PAINTED_CHANGED_PROPERTY
Identifies a change to having the border drawn, or having it not drawn.

FOCUS_PAINTED_CHANGED_PROPERTY

public static final String FOCUS_PAINTED_CHANGED_PROPERTY
Identifies a change to having the border highlighted when focused, or not.

ROLLOVER_ENABLED_CHANGED_PROPERTY

public static final String ROLLOVER_ENABLED_CHANGED_PROPERTY
Identifies a change in the button's

CONTENT_AREA_FILLED_CHANGED_PROPERTY

public static final String CONTENT_AREA_FILLED_CHANGED_PROPERTY
Identifies a change from rollover enabled to disabled or back to enabled.

ICON_CHANGED_PROPERTY

public static final String ICON_CHANGED_PROPERTY
Identifies a change to the icon that represents the button.

PRESSED_ICON_CHANGED_PROPERTY

public static final String PRESSED_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the button has been pressed.

SELECTED_ICON_CHANGED_PROPERTY

public static final String SELECTED_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the button has been selected.

ROLLOVER_ICON_CHANGED_PROPERTY

public static final String ROLLOVER_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the cursor is over the button.

ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY

public static final String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the cursor is over the button and it has been selected.

DISABLED_ICON_CHANGED_PROPERTY

public static final String DISABLED_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the button has been disabled.

DISABLED_SELECTED_ICON_CHANGED_PROPERTY

public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY
Identifies a change to the icon used when the button has been disabled and selected.

model

protected ButtonModel model
The data model that determines the button's state.

changeListener

protected ChangeListener changeListener
The button model's changeListener.

actionListener

protected ActionListener actionListener
The button model's ActionListener.

itemListener

protected ItemListener itemListener
The button model's ItemListener.

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per button instance since the event's only state is the source property. The source of events generated is always "this".
Constructor Detail

AbstractButton

public AbstractButton()
Method Detail

getText

public String getText()
Returns the button's text.
Returns:
the buttons text
See Also:
setText(java.lang.String)

setText

public void setText(String text)
Sets the button's text.
Parameters:
t - the string used to set the text
See Also:
getText()

isSelected

public boolean isSelected()
Returns the state of the button. True if the toggle button is selected, false if it's not.
Returns:
true if the toggle button is selected, otherwise false

setSelected

public void setSelected(boolean b)
Sets the state of the button. Note that this method does not trigger an actionEvent. Call doClick to perform a programatic action change.
Parameters:
b - true if the button is selected, otherwise false

doClick

public void doClick()
Programmatically perform a "click". This does the same thing as if the user had pressed and released the button.

doClick

public void doClick(int pressTime)
Programmatically perform a "click". This does the same thing as if the user had pressed and released the button. The button stays visually "pressed" for pressTime milliseconds.
Parameters:
pressTime - the time to "hold down" the button, in milliseconds

setMargin

public void setMargin(Insets m)
Sets space for margin between the button's border and the label. Setting to null will cause the button to use the default margin. The button's default Border object will use this value to create the proper margin. However, if a non-default border is set on the button, it is that Border object's responsibility to create the appropriate margin space (else this property will effectively be ignored).
Parameters:
m - the space between the border and the label

getMargin

public Insets getMargin()
Returns the margin between the button's border and the label.
Returns:
an Insets object specifying the margin between the botton's border and the label
See Also:
setMargin(java.awt.Insets)

getIcon

public Icon getIcon()
Returns the default icon.
Returns:
the default Icon
See Also:
setIcon(javax.swing.Icon)

setIcon

public void setIcon(Icon defaultIcon)
Sets the button's default icon. This icon is also used as the "pressed" and "disabled" icon if there is no explicitly set pressed icon.
Parameters:
defaultIcon - the icon used as the default image
See Also:
getIcon(), setPressedIcon(javax.swing.Icon)

getPressedIcon

public Icon getPressedIcon()
Returns the pressed icon for the button.
Returns:
the pressedIcon property
See Also:
setPressedIcon(javax.swing.Icon)

setPressedIcon

public void setPressedIcon(Icon pressedIcon)
Sets the pressed icon for the button.
Parameters:
pressedIcon - the icon used as the "pressed" image
See Also:
getPressedIcon()

getSelectedIcon

public Icon getSelectedIcon()
Returns the selected icon for the button.
Returns:
the selectedIcon property
See Also:
setSelectedIcon(javax.swing.Icon)

setSelectedIcon

public void setSelectedIcon(Icon selectedIcon)
Sets the selected icon for the button.
Parameters:
selectedIcon - the icon used as the "selected" image
See Also:
getSelectedIcon()

getRolloverIcon

public Icon getRolloverIcon()
Returns the rollover icon for the button.
Returns:
the rolloverIcon property
See Also:
setRolloverIcon(javax.swing.Icon)

setRolloverIcon

public void setRolloverIcon(Icon rolloverIcon)
Sets the rollover icon for the button.
Parameters:
rolloverIcon - the icon used as the "rollover" image
See Also:
getRolloverIcon()

getRolloverSelectedIcon

public Icon getRolloverSelectedIcon()
Returns the rollover selection icon for the button.
Returns:
the rolloverSelectedIcon property
See Also:
setRolloverSelectedIcon(javax.swing.Icon)

setRolloverSelectedIcon

public void setRolloverSelectedIcon(Icon rolloverSelectedIcon)
Sets the rollover selected icon for the button.
Parameters:
rolloverSelectedIcon - the icon used as the "selected rollover" image
See Also:
getRolloverSelectedIcon()

getDisabledIcon

public Icon getDisabledIcon()
Returns the icon used by the button when it's disabled. If no disabled icon has been set, the button constructs one from the default icon.
Returns:
the disabledIcon property
See Also:
getPressedIcon(), setDisabledIcon(javax.swing.Icon)

setDisabledIcon

public void setDisabledIcon(Icon disabledIcon)
Sets the disabled icon for the button.
Parameters:
disabledIcon - the icon used as the disabled image
See Also:
getDisabledIcon()

getDisabledSelectedIcon

public Icon getDisabledSelectedIcon()
Returns the icon used by the button when it's disabled and selected. If not no disabled selection icon has been set, the button constructs one from the selection icon.
Returns:
the disabledSelectedIcon property
See Also:
getPressedIcon(), setDisabledIcon(javax.swing.Icon)

setDisabledSelectedIcon

public void setDisabledSelectedIcon(Icon disabledSelectedIcon)
Sets the disabled selection icon for the button.
Parameters:
disabledSelectedIcon - the icon used as the disabled selection image
See Also:
getDisabledSelectedIcon()

getVerticalAlignment

public int getVerticalAlignment()
Returns the vertical alignment of the text and icon.
Returns:
the verticalAlignment property, one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the vertical alignment of the icon and text.
Parameters:
alignment - one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the icon and text.
Returns:
the horizontalAlignment property, one of the following values:
  • SwingConstants.RIGHT (the default)
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the icon and text.
Parameters:
alignment - one of the following values:
  • SwingConstants.RIGHT (the default)
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING

getVerticalTextPosition

public int getVerticalTextPosition()
Returns the vertical position of the text relative to the icon.
Returns:
the verticalTextPosition property, one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM

setVerticalTextPosition

public void setVerticalTextPosition(int textPosition)
Sets the vertical position of the text relative to the icon.
Parameters:
alignment - one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM

getHorizontalTextPosition

public int getHorizontalTextPosition()
Returns the horizontal position of the text relative to the icon.
Returns:
the horizontalTextPosition property, one of the following values:
  • SwingConstants.RIGHT (the default)
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING

setHorizontalTextPosition

public void setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the text relative to the icon.
Parameters:
textPosition - one of the following values:
  • SwingConstants.RIGHT (the default)
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING
Throws:
IllegalArgumentException - if textPosition

checkHorizontalKey

protected int checkHorizontalKey(int key,
                                 String exception)
Verify that key is a legal value for the horizontalAlignment properties.
Parameters:
key - the property value to check, one of the following values:
  • SwingConstants.RIGHT (the default)
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING
exception - the IllegalArgumentException detail message
Throws:
IllegalArgumentException - if key is not one of the legal values listed above
See Also:
setHorizontalTextPosition(int), setHorizontalAlignment(int)

checkVerticalKey

protected int checkVerticalKey(int key,
                               String exception)
Ensures that the key is a valid. Throws an IllegalArgumentException exception otherwise.
Parameters:
key - the value to check, one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM
exception - a string to be passed to the IllegalArgumentException call if key is not one of the valid values listed above
Throws:
IllegalArgumentException - if key is not one of the legal values listed above

setActionCommand

public void setActionCommand(String actionCommand)
Sets the action command for this button.
Parameters:
actionCommand - the action command for this button

getActionCommand

public String getActionCommand()
Returns the action command for this button.
Returns:
the action command for this button

setAction

public void setAction(Action a)
Sets the Action for the ActionEvent source. The new Action replaces any previously set Action but does not affect ActionListeners independently added with addActionListener. If the Action is already a registered ActionListener for the button, it is not re-registered.

A side-effect of setting the Action is that the ActionEvent source's properties are immediately set from the values in the Action (performed by the method configurePropertiesFromAction) and subsequently updated as the Action's properties change (via a PropertyChangeListener created by the method createActionPropertyChangeListener.

Parameters:
a - the Action for the AbstractButton, or null
Since:
1.3
See Also:
Action,
getAction(),
configurePropertiesFromAction(javax.swing.Action),
createActionPropertyChangeListener(javax.swing.Action)

getAction

public Action getAction()
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Returns:
the Action for this ActionEvent source, or null
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Text, Icon Enabled, ToolTipText and Mnemonic.

If the Action passed in is null, the following things will occur:

  • the text is set to null,
  • the icon is set to null,
  • enabled is set to true,
  • the tooltip text is set to null
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Icon, Enabled, ToolTipText, Mnemonic).

Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.

Parameters:
a - the new action for the button
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

isBorderPainted

public boolean isBorderPainted()
Returns whether the border should be painted.
Returns:
true if the border should be painted, false otherwise
See Also:
setBorderPainted(boolean)

setBorderPainted

public void setBorderPainted(boolean b)
Sets whether the border should be painted.
Parameters:
b - if true and border property is not null, the border is painted.
See Also:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics g)
Paint the button's border if BorderPainted property is true.
Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics context in which to paint
See Also:
JComponent.paint(java.awt.Graphics), JComponent.setBorder(javax.swing.border.Border)

isFocusPainted

public boolean isFocusPainted()
Returns whether focus should be painted.
Returns:
the paintFocus property
See Also:
setFocusPainted(boolean)

setFocusPainted

public void setFocusPainted(boolean b)
Sets whether focus should be painted.
Parameters:
b - if true, the focus state is painted
See Also:
isFocusPainted()

isContentAreaFilled

public boolean isContentAreaFilled()
Checks whether the "content area" of the button should be filled.
Returns:
the contentAreaFilled property
See Also:
setFocusPainted(boolean)

setContentAreaFilled

public void setContentAreaFilled(boolean b)
Sets whether the button should paint the content area or leave it transparent. If you wish to have a transparent button, for example and icon only button, then you should set this to false. Do not call setOpaque(false). Whether the button follows the RepaintManager's concept of opacity is L&F depandant.

This function may cause the component's opaque property to change.

The exact behavior of calling this function varies on a component-by-component and L&F-by-L&F basis.

Parameters:
b - if true, rollover effects should be painted
See Also:
isContentAreaFilled(), JComponent.setOpaque(boolean)

isRolloverEnabled

public boolean isRolloverEnabled()
Checks whether rollover effects are enabled.
Returns:
the rolloverEnabled property
See Also:
setFocusPainted(boolean)

setRolloverEnabled

public void setRolloverEnabled(boolean b)
Sets whether rollover effects should be enabled.
Parameters:
b - if true, rollover effects should be painted
See Also:
isRolloverEnabled()

getMnemonic

public int getMnemonic()
Returns the keyboard mnemonic from the the current model.
Returns:
the keyboard mnemonic from the model

setMnemonic

public void setMnemonic(int mnemonic)
Sets the keyboard mnemonic on the current model.
Parameters:
mnemonic - the key code which represents the mnemonic

setMnemonic

public void setMnemonic(char mnemonic)
Specifies the mnemonic value.
Parameters:
mnemonic - a char specifying the mnemonic value

isFocusTraversable

public boolean isFocusTraversable()
Identifies whether or not this component can receive the focus.
Overrides:
isFocusTraversable in class JComponent
Returns:
true if this component can receive the focus

getModel

public ButtonModel getModel()
Returns the model that this button represents.
Returns:
the model property
See Also:
setModel(javax.swing.ButtonModel)

setModel

public void setModel(ButtonModel newModel)
Sets the model that this button represents.
Parameters:
m - the new ButtonModel
See Also:
getModel()

getUI

public ButtonUI getUI()
Returns the L&F object that renders this component.
Returns:
the ButtonUI object
See Also:
setUI(javax.swing.plaf.ButtonUI)

setUI

public void setUI(ButtonUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ButtonUI L&F object
See Also:
getUI()

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Subtypes of AbstractButton should override this to update the UI. For example, JButton might do the following:
      setUI((ButtonUI)UIManager.getUI(
          "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI", this));
Overrides:
updateUI in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.setUI(javax.swing.plaf.ComponentUI),
UIManager.getLookAndFeel(),
UIManager.getUI(javax.swing.JComponent)

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Parameters:
l - the listener to be added

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Parameters:
l - the listener to be removed

fireStateChanged

protected void fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
See Also:
EventListenerList

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the button.
Parameters:
l - the ActionListener to be added

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the button. If the listener is the currently set Action for the button, then the Action is set to null.
Parameters:
l - the listener to be removed

createChangeListener

protected ChangeListener createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation.
Returns:
the new ButtonChangeListener

fireActionPerformed

protected void fireActionPerformed(ActionEvent event)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the ActionEvent object
See Also:
EventListenerList

fireItemStateChanged

protected void fireItemStateChanged(ItemEvent event)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
event - the ItemEvent object
See Also:
EventListenerList

createActionListener

protected ActionListener createActionListener()

createItemListener

protected ItemListener createItemListener()

setEnabled

public void setEnabled(boolean b)
Enables (or disables) the button.
Overrides:
setEnabled in class JComponent
Parameters:
b - true to enable the button, otherwise false

getLabel

public String getLabel()
Deprecated. - Replaced by getText

Returns the label text.
Returns:
a String containing the label

setLabel

public void setLabel(String label)
Deprecated. - Replaced by setText(text)

Sets the label text.
Parameters:
label - a String containing the text

addItemListener

public void addItemListener(ItemListener l)
Adds an ItemListener to the checkbox.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the ItemListener to be added

removeItemListener

public void removeItemListener(ItemListener l)
Removes an ItemListener from the button.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the ItemListener to be removed

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array (length 1) containing the label or null if the button is not selected.
Specified by:
getSelectedObjects in interface ItemSelectable
Returns:
an array containing 1 Object: the text of the button, if the item is selected; otherwise null

init

protected void init(String text,
                    Icon icon)

imageUpdate

public boolean imageUpdate(Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
This is overridden to return false if the current Icon's Image is not equal to the passed in Image img.
Overrides:
imageUpdate in class Component
Parameters:
img - the Image to be compared
infoflags - flags used to repaint the button when the image is updated and which determine how much is to be painted
x - the x coordinate
y - the y coordinate
w - the width
h - the height
See Also:
ImageObserver, Component.imageUpdate(java.awt.Image, int, int, int, int, int)

paramString

protected String paramString()
Returns a string representation of this AbstractButton. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overriding paramString to provide information about the specific new aspects of the JFC components.

Overrides:
paramString in class JComponent
Returns:
a string representation of this AbstractButton
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


AbstractCellEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractCellEditor

java.lang.Object
  |
  +--javax.swing.AbstractCellEditor
All Implemented Interfaces:
CellEditor, Serializable
Direct Known Subclasses:
DefaultCellEditor
public abstract class AbstractCellEditor
extends Object
implements CellEditor, Serializable

See Also:
Serialized Form

Field Summary
protected ChangeEvent | changeEvent
protected EventListenerList | listenerList
Constructor Summary
AbstractCellEditor()
Method Summary
void | addCellEditorListener(CellEditorListener l) Adds a CellEditorListener to the listener list.
void | cancelCellEditing() Calls fireEditingCanceled.
protected void | fireEditingCanceled()
protected void | fireEditingStopped()
boolean | isCellEditable(EventObject e) Returns true.
void | removeCellEditorListener(CellEditorListener l) Removes a CellEditorListener from the listener list.
boolean | shouldSelectCell(EventObject anEvent) Returns true.
boolean | stopCellEditing() Calls fireEditingStopped and returns true.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.CellEditor
getCellEditorValue

Field Detail

listenerList

protected EventListenerList listenerList

changeEvent

protected transient ChangeEvent changeEvent
Constructor Detail

AbstractCellEditor

public AbstractCellEditor()
Method Detail

isCellEditable

public boolean isCellEditable(EventObject e)
Returns true.
Specified by:
isCellEditable in interface CellEditor
Parameters:
e - an event object
Returns:
true

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Returns true.
Specified by:
shouldSelectCell in interface CellEditor
Parameters:
e - an event object
Returns:
true

stopCellEditing

public boolean stopCellEditing()
Calls fireEditingStopped and returns true.
Specified by:
stopCellEditing in interface CellEditor
Returns:
true

cancelCellEditing

public void cancelCellEditing()
Calls fireEditingCanceled.
Specified by:
cancelCellEditing in interface CellEditor

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Adds a CellEditorListener to the listener list.
Specified by:
addCellEditorListener in interface CellEditor
Parameters:
l - the new listener to be added

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Removes a CellEditorListener from the listener list.
Specified by:
removeCellEditorListener in interface CellEditor
Parameters:
l - the listener to be removed

fireEditingStopped

protected void fireEditingStopped()

fireEditingCanceled

protected void fireEditingCanceled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractListModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractListModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
All Implemented Interfaces:
ListModel, Serializable
Direct Known Subclasses:
BasicDirectoryModel, DefaultComboBoxModel, DefaultListModel, MetalFileChooserUI.DirectoryComboBoxModel, MetalFileChooserUI.FilterComboBoxModel
public abstract class AbstractListModel
extends Object
implements ListModel, Serializable

The Abstract definition for the data model the provides a List with its contents.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  EventListenerList listenerList
Constructor Summary
AbstractListModel()
Method Summary
void | addListDataListener(ListDataListener l) Add a listener to the list that's notified each time a change to the data model occurs.
protected void | fireContentsChanged(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements of the list change.
protected void | fireIntervalAdded(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements are added to the model.
protected void | fireIntervalRemoved(Object source, int index0, int index1) AbstractListModel subclasses must call this method after one or more elements are removed from the model.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
void | removeListDataListener(ListDataListener l) Remove a listener from the list that's notified each time a change to the data model occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
getElementAt, getSize

Field Detail

listenerList

protected EventListenerList listenerList
Constructor Detail

AbstractListModel

public AbstractListModel()
Method Detail

addListDataListener

public void addListDataListener(ListDataListener l)
Add a listener to the list that's notified each time a change to the data model occurs.
Specified by:
addListDataListener in interface ListModel
Parameters:
l - the ListDataListener

removeListDataListener

public void removeListDataListener(ListDataListener l)
Remove a listener from the list that's notified each time a change to the data model occurs.
Specified by:
removeListDataListener in interface ListModel
Parameters:
l - the ListDataListener

fireContentsChanged

protected void fireContentsChanged(Object source,
                                   int index0,
                                   int index1)
AbstractListModel subclasses must call this method after one or more elements of the list change. The changed elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
Parameters:
source - The ListModel that changed, typically "this".
index0 - One end of the new interval.
index1 - The other end of the new interval.
See Also:
EventListenerList, DefaultListModel

fireIntervalAdded

protected void fireIntervalAdded(Object source,
                                 int index0,
                                 int index1)
AbstractListModel subclasses must call this method after one or more elements are added to the model. The new elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
Parameters:
source - The ListModel that changed, typically "this".
index0 - One end of the new interval.
index1 - The other end of the new interval.
See Also:
EventListenerList, DefaultListModel

fireIntervalRemoved

protected void fireIntervalRemoved(Object source,
                                   int index0,
                                   int index1)
AbstractListModel subclasses must call this method after one or more elements are removed from the model. The new elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
Parameters:
source - The ListModel that changed, typically "this".
index0 - One end of the new interval.
index1 - The other end of the new interval.
See Also:
EventListenerList, DefaultListModel

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleAbstractButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractButton.AccessibleAbstractButton

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, Serializable
Direct Known Subclasses:
JButton.AccessibleJButton, JMenuItem.AccessibleJMenuItem, JToggleButton.AccessibleJToggleButton
Enclosing class:
AbstractButton
protected abstract class AbstractButton.AccessibleAbstractButton
extends JComponent.AccessibleJComponent
implements AccessibleAction, AccessibleValue, AccessibleText

This class implements accessibility support for the AbstractButton class. It provides an implementation of the Java Accessibility API appropriate to button and menu item user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected AbstractButton.AccessibleAbstractButton()
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
AccessibleIcon[] | getAccessibleIcon() Get the AccessibleIcons associated with this object if one or more exist.
String | getAccessibleName() Returns the accessible name of this object.
AccessibleRelationSet | getAccessibleRelationSet() Get the AccessibleRelationSet associated with this object if one exists.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object presently editable text on the display.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
String | getAfterIndex(int part, int index) Returns the String after a given index.
String | getAtIndex(int part, int index) Returns the String at a given index.
String | getBeforeIndex(int part, int index) Returns the String before a given index.
int | getCaretPosition() Return the zero-based offset of the caret.
AttributeSet | getCharacterAttribute(int i) Return the AttributeSet for a given character at a given index
Rectangle | getCharacterBounds(int i) Determine the bounding box of the character at the given index into the string.
int | getCharCount() Return the number of characters (valid indicies)
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
int | getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
String | getSelectedText() Returns the portion of the text that is selected.
int | getSelectionEnd() Returns the end offset within the selected text.
int | getSelectionStart() Returns the start offset within the selected text.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleRole, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractButton.AccessibleAbstractButton

protected AbstractButton.AccessibleAbstractButton()
Method Detail

getAccessibleName

public String getAccessibleName()
Returns the accessible name of this object.
Overrides:
getAccessibleName in class JComponent.AccessibleJComponent
Returns:
the localized name of the object -- can be null if this object does not have a name

getAccessibleIcon

public AccessibleIcon[] getAccessibleIcon()
Get the AccessibleIcons associated with this object if one or more exist. Otherwise return null.
Overrides:
getAccessibleIcon in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an array of AccessibleIcon if supported by object; otherwise return null
See Also:
AccessibleIcon

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRelationSet

public AccessibleRelationSet getAccessibleRelationSet()
Get the AccessibleRelationSet associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleRelationSet in class AccessibleContext
See Also:
AccessibleRelation

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. The default behavior of a button is to have one action - toggle the button.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
1, the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
An Integer of 0 if this isn't selected or an Integer of 1 if this is selected.
See Also:
AbstractButton.isSelected()

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
an Integer of 0.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
An Integer of 1.

getAccessibleText

public AccessibleText getAccessibleText()
Description copied from class: AccessibleContext
Gets the AccessibleText associated with this object presently editable text on the display.
Overrides:
getAccessibleText in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleText if supported by object; else return null
See Also:
AccessibleText

getIndexAtPoint

public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point. If the point is invalid, this method returns -1. Note: the AbstractButton must have a valid size (e.g. have been added to a parent container whose ancestor container is a valid top-level window) for this method to be able to return a meaningful value.
Specified by:
getIndexAtPoint in interface AccessibleText
Parameters:
p - the Point in local coordinates
Returns:
the zero-based index of the character under Point p; if Point is invalid returns -1.

getCharacterBounds

public Rectangle getCharacterBounds(int i)
Determine the bounding box of the character at the given index into the string. The bounds are returned in local coordinates. If the index is invalid an empty rectangle is returned. Note: the AbstractButton must have a valid size (e.g. have been added to a parent container whose ancestor container is a valid top-level window) for this method to be able to return a meaningful value.
Specified by:
getCharacterBounds in interface AccessibleText
Parameters:
i - the index into the String
Returns:
the screen coordinates of the character's the bounding box, if index is invalid returns an empty rectangle.

getCharCount

public int getCharCount()
Return the number of characters (valid indicies)
Specified by:
getCharCount in interface AccessibleText
Returns:
the number of characters

getCaretPosition

public int getCaretPosition()
Return the zero-based offset of the caret. Note: That to the right of the caret will have the same index value as the offset (the caret is between two characters).
Specified by:
getCaretPosition in interface AccessibleText
Returns:
the zero-based offset of the caret.

getAtIndex

public String getAtIndex(int part,
                         int index)
Returns the String at a given index.
Specified by:
getAtIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getAfterIndex

public String getAfterIndex(int part,
                            int index)
Returns the String after a given index.
Specified by:
getAfterIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getBeforeIndex

public String getBeforeIndex(int part,
                             int index)
Returns the String before a given index.
Specified by:
getBeforeIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getCharacterAttribute

public AttributeSet getCharacterAttribute(int i)
Return the AttributeSet for a given character at a given index
Specified by:
getCharacterAttribute in interface AccessibleText
Parameters:
i - the zero-based index into the text
Returns:
the AttributeSet of the character

getSelectionStart

public int getSelectionStart()
Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Specified by:
getSelectionStart in interface AccessibleText
Returns:
the index into the text of the start of the selection

getSelectionEnd

public int getSelectionEnd()
Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Specified by:
getSelectionEnd in interface AccessibleText
Returns:
the index into teh text of the end of the selection

getSelectedText

public String getSelectedText()
Returns the portion of the text that is selected.
Specified by:
getSelectedText in interface AccessibleText
Returns:
the String portion of the text that is selected
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleBox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class Box.AccessibleBox

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.Box.AccessibleBox
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
Box
protected class Box.AccessibleBox
extends Container.AccessibleAWTContainer

This class implements accessibility support for the Box class.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Box.AccessibleBox()
Method Summary
 AccessibleRole getAccessibleRole()
Gets the role of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Box.AccessibleBox

protected Box.AccessibleBox()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object (AccessibleRole.FILLER)
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleBoxFiller

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class Box.Filler.AccessibleBoxFiller

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--javax.swing.Box.Filler.AccessibleBoxFiller
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
Box.Filler
protected class Box.Filler.AccessibleBoxFiller
extends Component.AccessibleAWTComponent

This class implements accessibility support for the Box.Filler class.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected Box.Filler.AccessibleBoxFiller()
Method Summary
 AccessibleRole getAccessibleRole()
Gets the role of this object.
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Box.Filler.AccessibleBoxFiller

protected Box.Filler.AccessibleBoxFiller()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object (AccessibleRole.FILLER)
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleCellRendererPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class CellRendererPane.AccessibleCellRendererPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.CellRendererPane.AccessibleCellRendererPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
CellRendererPane
protected class CellRendererPane.AccessibleCellRendererPane
extends Container.AccessibleAWTContainer

This class implements accessibility support for the CellRendererPane class.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected CellRendererPane.AccessibleCellRendererPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CellRendererPane.AccessibleCellRendererPane

protected CellRendererPane.AccessibleCellRendererPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleContainerHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComponent.AccessibleJComponent.AccessibleContainerHandler

java.lang.Object
  |
  +--javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler
All Implemented Interfaces:
ContainerListener, EventListener
Enclosing class:
JComponent.AccessibleJComponent
protected class JComponent.AccessibleJComponent.AccessibleContainerHandler
extends Object
implements ContainerListener

Fire PropertyChange listener, if one is registered, when children added/removed.

Constructor Summary
protected JComponent.AccessibleJComponent.AccessibleContainerHandler()
Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JComponent.AccessibleJComponent.AccessibleContainerHandler

protected JComponent.AccessibleJComponent.AccessibleContainerHandler()
Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface ContainerListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleFocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComponent.AccessibleJComponent.AccessibleFocusHandler

java.lang.Object
  |
  +--javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
JComponent.AccessibleJComponent
protected class JComponent.AccessibleJComponent.AccessibleFocusHandler
extends Object
implements FocusListener

Fire PropertyChange listener, if one is registered, when focus events happen

Constructor Summary
protected JComponent.AccessibleJComponent.AccessibleFocusHandler()
Method Summary
void | focusGained(FocusEvent event) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent event) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JComponent.AccessibleJComponent.AccessibleFocusHandler

protected JComponent.AccessibleJComponent.AccessibleFocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent event)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent event)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleImageIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ImageIcon.AccessibleImageIcon

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--javax.swing.ImageIcon.AccessibleImageIcon
All Implemented Interfaces:
AccessibleIcon, Serializable
Enclosing class:
ImageIcon
protected class ImageIcon.AccessibleImageIcon
extends AccessibleContext
implements AccessibleIcon, Serializable

This class implements accessibility support for the ImageIcon class. It provides an implementation of the Java Accessibility API appropriate to image icon user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected ImageIcon.AccessibleImageIcon()
Method Summary
Accessible | getAccessibleChild(int i) Returns the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
String | getAccessibleIconDescription() Gets the description of the icon.
int | getAccessibleIconHeight() Gets the height of the icon.
int | getAccessibleIconWidth() Gets the width of the icon.
int | getAccessibleIndexInParent() Gets the index of this object in its accessible parent.
Accessible | getAccessibleParent() Gets the Accessible parent of this object.
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state of this object.
Locale | getLocale() Returns the locale of this object.
void | setAccessibleIconDescription(String description) Sets the description of the icon.
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleComponent, getAccessibleDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ImageIcon.AccessibleImageIcon

protected ImageIcon.AccessibleImageIcon()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state of this object.
Overrides:
getAccessibleStateSet in class AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleParent

public Accessible getAccessibleParent()
Gets the Accessible parent of this object. If the parent of this object implements Accessible, this method should simply return getParent().
Overrides:
getAccessibleParent in class AccessibleContext
Returns:
the Accessible parent of this object -- can be null if this object does not have an Accessible parent

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Gets the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns the nth Accessible child of the object.
Overrides:
getAccessibleChild in class AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getLocale

public Locale getLocale()
                 throws IllegalComponentStateException
Returns the locale of this object.
Overrides:
getLocale in class AccessibleContext
Returns:
the locale of this object

getAccessibleIconDescription

public String getAccessibleIconDescription()
Gets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Specified by:
getAccessibleIconDescription in interface AccessibleIcon
Returns:
the description of the icon

setAccessibleIconDescription

public void setAccessibleIconDescription(String description)
Sets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Specified by:
setAccessibleIconDescription in interface AccessibleIcon
Parameters:
description - the description of the icon

getAccessibleIconHeight

public int getAccessibleIconHeight()
Gets the height of the icon.
Specified by:
getAccessibleIconHeight in interface AccessibleIcon
Returns:
the height of the icon

getAccessibleIconWidth

public int getAccessibleIconWidth()
Gets the width of the icon.
Specified by:
getAccessibleIconWidth in interface AccessibleIcon
Returns:
the width of the icon
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJApplet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JApplet.AccessibleJApplet

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Panel.AccessibleAWTPanel
                          |
                          +--java.applet.Applet.AccessibleApplet
                                |
                                +--javax.swing.JApplet.AccessibleJApplet
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JApplet
protected class JApplet.AccessibleJApplet
extends Applet.AccessibleApplet

This class implements accessibility support for the JApplet class.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JApplet.AccessibleJApplet()
Methods inherited from class java.applet.Applet.AccessibleApplet
getAccessibleRole, getAccessibleStateSet
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JApplet.AccessibleJApplet

protected JApplet.AccessibleJApplet()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JButton.AccessibleJButton

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JButton.AccessibleJButton
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, Serializable
Enclosing class:
JButton
protected class JButton.AccessibleJButton
extends AbstractButton.AccessibleAbstractButton

This class implements accessibility support for the JButton class. It provides an implementation of the Java Accessibility API appropriate to button user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JButton.AccessibleJButton()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JButton.AccessibleJButton

protected JButton.AccessibleJButton()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJCheckBox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JCheckBox.AccessibleJCheckBox

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JToggleButton.AccessibleJToggleButton
                                      |
                                      +--javax.swing.JCheckBox.AccessibleJCheckBox
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, EventListener, ItemListener, Serializable
Enclosing class:
JCheckBox
protected class JCheckBox.AccessibleJCheckBox
extends JToggleButton.AccessibleJToggleButton

This class implements accessibility support for the JCheckBox class. It provides an implementation of the Java Accessibility API appropriate to check box user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JCheckBox.AccessibleJCheckBox()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JToggleButton.AccessibleJToggleButton
itemStateChanged
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JCheckBox.AccessibleJCheckBox

protected JCheckBox.AccessibleJCheckBox()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JToggleButton.AccessibleJToggleButton
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJCheckBoxMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JMenuItem.AccessibleJMenuItem
                                      |
                                      +--javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, ChangeListener, EventListener, Serializable
Enclosing class:
JCheckBoxMenuItem
protected class JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
extends JMenuItem.AccessibleJMenuItem

This class implements accessibility support for the JCheckBoxMenuItem class. It provides an implementation of the Java Accessibility API appropriate to checkbox menu item user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JMenuItem.AccessibleJMenuItem
stateChanged
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem

protected JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JMenuItem.AccessibleJMenuItem
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJColorChooser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JColorChooser.AccessibleJColorChooser

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JColorChooser.AccessibleJColorChooser
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JColorChooser
protected class JColorChooser.AccessibleJColorChooser
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JColorChooser class. It provides an implementation of the Java Accessibility API appropriate to color chooser user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JColorChooser.AccessibleJColorChooser()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JColorChooser.AccessibleJColorChooser

protected JColorChooser.AccessibleJColorChooser()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJComboBox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComboBox.AccessibleJComboBox

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JComboBox.AccessibleJComboBox
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, Serializable
Enclosing class:
JComboBox
protected class JComboBox.AccessibleJComboBox
extends JComponent.AccessibleJComponent
implements AccessibleAction, AccessibleSelection

This class implements accessibility support for the JComboBox class. It provides an implementation of the Java Accessibility API appropriate to Combo Box user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JComboBox.AccessibleJComboBox()
Method Summary
void | addAccessibleSelection(int i) Adds the specified Accessible child of the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected.
boolean | doAccessibleAction(int i) Perform the specified Action on the object
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of Actions available in this object.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the object.
Accessible | getAccessibleChild(int i) Returns the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the popup.
int | getAccessibleSelectionCount() Returns the number of Accessible children currently selected.
boolean | isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
void | removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection.
void | selectAllAccessibleSelection() Causes every child of the object to be selected if the object supports multiple selections.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JComboBox.AccessibleJComboBox

protected JComboBox.AccessibleJComboBox()
Method Detail

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns the nth Accessible child of the object. The child at index zero represents the popup. If the combo box is editable, the child at index one represents the editor.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the object.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of Actions available in this object. The default behavior of a combo box is to have one action.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
1, the number of Actions in this object

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected child in the popup. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null.

Note that the index represents the i-th selected child, which is different from the i-th child.

Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
Returns:
true if the current child of this object is selected; else false
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified Accessible child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComponent.AccessibleJComponent

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
All Implemented Interfaces:
AccessibleComponent, Serializable
Direct Known Subclasses:
AbstractButton.AccessibleAbstractButton, JColorChooser.AccessibleJColorChooser, JComboBox.AccessibleJComboBox, JDesktopPane.AccessibleJDesktopPane, JFileChooser.AccessibleJFileChooser, JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon, JLabel.AccessibleJLabel, JLayeredPane.AccessibleJLayeredPane, JList.AccessibleJList, JMenuBar.AccessibleJMenuBar, JOptionPane.AccessibleJOptionPane, JPanel.AccessibleJPanel, JPopupMenu.AccessibleJPopupMenu, JProgressBar.AccessibleJProgressBar, JRootPane.AccessibleJRootPane, JScrollBar.AccessibleJScrollBar, JScrollPane.AccessibleJScrollPane, JSeparator.AccessibleJSeparator, JSlider.AccessibleJSlider, JSplitPane.AccessibleJSplitPane, JTabbedPane.AccessibleJTabbedPane, JTable.AccessibleJTable, JTableHeader.AccessibleJTableHeader, JTextComponent.AccessibleJTextComponent, JToolBar.AccessibleJToolBar, JToolTip.AccessibleJToolTip, JTree.AccessibleJTree, JViewport.AccessibleJViewport
Enclosing class:
JComponent
public abstract class JComponent.AccessibleJComponent
extends Container.AccessibleAWTContainer

Inner class of JComponent used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by component developers.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JComponent.AccessibleJComponent.AccessibleContainerHandler Fire PropertyChange listener, if one is registered, when children added/removed.
protected class | JComponent.AccessibleJComponent.AccessibleFocusHandler Fire PropertyChange listener, if one is registered, when focus events happen
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Field Summary
protected ContainerListener | accessibleContainerHandler
protected FocusListener | accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JComponent.AccessibleJComponent()
Though the class is abstract, this should be called by all sub-classes.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
Accessible | getAccessibleChild(int i) Returns the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
String | getAccessibleDescription() Gets the accessible description of this object.
String | getAccessibleName() Gets the accessible name of this object.
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state of this object.
protected String | getBorderTitle(Border b) Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

accessibleContainerHandler

protected ContainerListener accessibleContainerHandler

accessibleFocusHandler

protected FocusListener accessibleFocusHandler
Constructor Detail

JComponent.AccessibleJComponent

protected JComponent.AccessibleJComponent()
Though the class is abstract, this should be called by all sub-classes.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
Overrides:
addPropertyChangeListener in class Component.AccessibleAWTComponent
Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class Component.AccessibleAWTComponent
Parameters:
listener - the PropertyChangeListener to be removed

getBorderTitle

protected String getBorderTitle(Border b)
Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title. This does a depth first search on first the inside borders then the outside borders. The assumption is that titles make really pretty inside borders but not very pretty outside borders in compound border situations. It's rather arbitrary, but hopefully decent UI programmers will not create multiple titled borders for the same component.

getAccessibleName

public String getAccessibleName()
Gets the accessible name of this object. This should almost never return java.awt.Component.getName(), as that generally isn't a localized name, and doesn't have meaning for the user. If the object is fundamentally a text object (such as a menu item), the accessible name should be the text of the object (for example, "save"). If the object has a tooltip, the tooltip text may also be an appropriate String to return.
Overrides:
getAccessibleName in class Component.AccessibleAWTComponent
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleDescription

public String getAccessibleDescription()
Gets the accessible description of this object. This should be a concise, localized description of what this object is - what is its meaning to the user. If the object has a tooltip, the tooltip text may be an appropriate string to return, assuming it contains a concise description of the object (instead of just the name of the object - for example a "Save" icon on a toolbar that had "save" as the tooltip text shouldn't return the tooltip text as the description, but something like "Saves the current text document" instead).
Overrides:
getAccessibleDescription in class Component.AccessibleAWTComponent
Returns:
the localized description of the object -- can be null if this object does not have a description
See Also:
AccessibleContext.setAccessibleDescription(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state of this object.
Overrides:
getAccessibleStateSet in class Component.AccessibleAWTComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class Container.AccessibleAWTContainer
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns the nth Accessible child of the object.
Overrides:
getAccessibleChild in class Container.AccessibleAWTContainer
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJDesktopIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JInternalFrame.JDesktopIcon
protected class JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JInternalFrame.JDesktopIcon class. It provides an implementation of the Java Accessibility API appropriate to desktop icon user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon

protected JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
value of the object -- can be null if this object does not have a value

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
Minimum value of the object; null if this object does not have a minimum value

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
Maximum value of the object; null if this object does not have a maximum value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJDesktopPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JDesktopPane.AccessibleJDesktopPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JDesktopPane.AccessibleJDesktopPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JDesktopPane
protected class JDesktopPane.AccessibleJDesktopPane
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JDesktopPane class. It provides an implementation of the Java Accessibility API appropriate to desktop pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JDesktopPane.AccessibleJDesktopPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JDesktopPane.AccessibleJDesktopPane

protected JDesktopPane.AccessibleJDesktopPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJDialog

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JDialog.AccessibleJDialog

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
                          |
                          +--java.awt.Dialog.AccessibleAWTDialog
                                |
                                +--javax.swing.JDialog.AccessibleJDialog
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JDialog
protected class JDialog.AccessibleJDialog
extends Dialog.AccessibleAWTDialog

This class implements accessibility support for the JDialog class. It provides an implementation of the Java Accessibility API appropriate to dialog user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JDialog.AccessibleJDialog()
Method Summary
String | getAccessibleName() Get the accessible name of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Dialog.AccessibleAWTDialog
getAccessibleRole
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JDialog.AccessibleJDialog

protected JDialog.AccessibleJDialog()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class Component.AccessibleAWTComponent
Returns:
the localized name of the object -- can be null if this object does not have a name

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Dialog.AccessibleAWTDialog
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJEditorPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JEditorPane.AccessibleJEditorPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JEditorPane.AccessibleJEditorPane
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Direct Known Subclasses:
JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport
Enclosing class:
JEditorPane
protected class JEditorPane.AccessibleJEditorPane
extends JTextComponent.AccessibleJTextComponent

This class implements accessibility support for the JEditorPane class. It provides an implementation of the Java Accessibility API appropriate to editor pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JEditorPane.AccessibleJEditorPane()
Method Summary
String | getAccessibleDescription() Gets the accessibleDescription property of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JEditorPane.AccessibleJEditorPane

protected JEditorPane.AccessibleJEditorPane()
Method Detail

getAccessibleDescription

public String getAccessibleDescription()
Gets the accessibleDescription property of this object. If this property isn't set, return the content type of this JEditorPane instead (e.g. "plain/text", "html/text", etc.
Overrides:
getAccessibleDescription in class JComponent.AccessibleJComponent
Returns:
the localized description of the object; null if this object does not have a description
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class JTextComponent.AccessibleJTextComponent
Returns:
an instance of AccessibleStateSet describing the states of the object
See Also:
AccessibleStateSet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJEditorPaneHTML

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JEditorPane.AccessibleJEditorPaneHTML

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JEditorPane.AccessibleJEditorPane
                                      |
                                      +--javax.swing.JEditorPane.AccessibleJEditorPaneHTML
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Enclosing class:
JEditorPane
protected class JEditorPane.AccessibleJEditorPaneHTML
extends JEditorPane.AccessibleJEditorPane

This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for baseline for serialized form of Swing objects.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JEditorPane.AccessibleJEditorPaneHTML()
Method Summary
 AccessibleText getAccessibleText()
Get the AccessibleText associated with this object.
Methods inherited from class javax.swing.JEditorPane.AccessibleJEditorPane
getAccessibleDescription, getAccessibleStateSet
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleRole, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JEditorPane.AccessibleJEditorPaneHTML

protected JEditorPane.AccessibleJEditorPaneHTML()
Method Detail

getAccessibleText

public AccessibleText getAccessibleText()
Description copied from class: JTextComponent.AccessibleJTextComponent
Get the AccessibleText associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleText interface on behalf of itself.
Overrides:
getAccessibleText in class JTextComponent.AccessibleJTextComponent
Following copied from class: javax.swing.text.JTextComponent.AccessibleJTextComponent
Returns:
this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJFileChooser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JFileChooser.AccessibleJFileChooser

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JFileChooser.AccessibleJFileChooser
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JFileChooser
protected class JFileChooser.AccessibleJFileChooser
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JFileChooser class. It provides an implementation of the Java Accessibility API appropriate to file chooser user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JFileChooser.AccessibleJFileChooser()
Method Summary
 AccessibleRole getAccessibleRole()
Gets the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JFileChooser.AccessibleJFileChooser

protected JFileChooser.AccessibleJFileChooser()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJFrame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JFrame.AccessibleJFrame

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
                          |
                          +--java.awt.Frame.AccessibleAWTFrame
                                |
                                +--javax.swing.JFrame.AccessibleJFrame
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JFrame
protected class JFrame.AccessibleJFrame
extends Frame.AccessibleAWTFrame

This class implements accessibility support for the JFrame class. It provides an implementation of the Java Accessibility API appropriate to frame user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JFrame.AccessibleJFrame()
Method Summary
String | getAccessibleName() Get the accessible name of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class java.awt.Frame.AccessibleAWTFrame
getAccessibleRole
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JFrame.AccessibleJFrame

protected JFrame.AccessibleJFrame()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class Component.AccessibleAWTComponent
Returns:
the localized name of the object -- can be null if this object does not have a name

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class Frame.AccessibleAWTFrame
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJInternalFrame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JInternalFrame.AccessibleJInternalFrame

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JInternalFrame.AccessibleJInternalFrame
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JInternalFrame
protected class JInternalFrame.AccessibleJInternalFrame
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JInternalFrame class. It provides an implementation of the Java Accessibility API appropriate to internal frame user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JInternalFrame.AccessibleJInternalFrame()
Method Summary
String | getAccessibleName() Get the accessible name of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the value of this object as a Number.
Number | getMaximumAccessibleValue() Get the maximum value of this object as a Number.
Number | getMinimumAccessibleValue() Get the minimum value of this object as a Number.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JInternalFrame.AccessibleJInternalFrame

protected JInternalFrame.AccessibleJInternalFrame()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class JComponent.AccessibleJComponent
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the value of this object as a Number.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
value of the object -- can be null if this object does not have a value

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum value of this object as a Number.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
Minimum value of the object; null if this object does not have a minimum value

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum value of this object as a Number.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
Maximum value of the object; null if this object does not have a maximum value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJLabel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JLabel.AccessibleJLabel

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JLabel.AccessibleJLabel
All Implemented Interfaces:
AccessibleComponent, AccessibleText, Serializable
Enclosing class:
JLabel
protected class JLabel.AccessibleJLabel
extends JComponent.AccessibleJComponent
implements AccessibleText

The class used to obtain the accessible role for this object.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JLabel.AccessibleJLabel()
Method Summary
AccessibleIcon[] | getAccessibleIcon() Get the AccessibleIcons associated with this object if one or more exist.
String | getAccessibleName() Get the accessible name of this object.
AccessibleRelationSet | getAccessibleRelationSet() Get the AccessibleRelationSet associated with this object if one exists.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object presently editable text on the display.
String | getAfterIndex(int part, int index) Returns the String after a given index.
String | getAtIndex(int part, int index) Returns the String at a given index.
String | getBeforeIndex(int part, int index) Returns the String before a given index.
int | getCaretPosition() Return the zero-based offset of the caret.
AttributeSet | getCharacterAttribute(int i) Return the AttributeSet for a given character at a given index
Rectangle | getCharacterBounds(int i) Determine the bounding box of the character at the given index into the string.
int | getCharCount() Return the number of characters (valid indicies)
int | getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
String | getSelectedText() Returns the portion of the text that is selected.
int | getSelectionEnd() Returns the end offset within the selected text.
int | getSelectionStart() Returns the start offset within the selected text.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JLabel.AccessibleJLabel

protected JLabel.AccessibleJLabel()
Method Detail

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class JComponent.AccessibleJComponent
Returns:
the localized name of the object -- can be null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleIcon

public AccessibleIcon[] getAccessibleIcon()
Get the AccessibleIcons associated with this object if one or more exist. Otherwise return null.
Overrides:
getAccessibleIcon in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an array of AccessibleIcon if supported by object; otherwise return null
See Also:
AccessibleIcon

getAccessibleRelationSet

public AccessibleRelationSet getAccessibleRelationSet()
Get the AccessibleRelationSet associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleRelationSet in class AccessibleContext
See Also:
AccessibleRelation

getAccessibleText

public AccessibleText getAccessibleText()
Description copied from class: AccessibleContext
Gets the AccessibleText associated with this object presently editable text on the display.
Overrides:
getAccessibleText in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleText if supported by object; else return null
See Also:
AccessibleText

getIndexAtPoint

public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point. If the point is invalid, this method returns -1.
Specified by:
getIndexAtPoint in interface AccessibleText
Parameters:
p - the Point in local coordinates
Returns:
the zero-based index of the character under Point p; if Point is invalid returns -1.

getCharacterBounds

public Rectangle getCharacterBounds(int i)
Determine the bounding box of the character at the given index into the string. The bounds are returned in local coordinates. If the index is invalid an empty rectangle is returned.
Specified by:
getCharacterBounds in interface AccessibleText
Parameters:
i - the index into the String
Returns:
the screen coordinates of the character's the bounding box, if index is invalid returns an empty rectangle.

getCharCount

public int getCharCount()
Return the number of characters (valid indicies)
Specified by:
getCharCount in interface AccessibleText
Returns:
the number of characters

getCaretPosition

public int getCaretPosition()
Return the zero-based offset of the caret. Note: That to the right of the caret will have the same index value as the offset (the caret is between two characters).
Specified by:
getCaretPosition in interface AccessibleText
Returns:
the zero-based offset of the caret.

getAtIndex

public String getAtIndex(int part,
                         int index)
Returns the String at a given index.
Specified by:
getAtIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getAfterIndex

public String getAfterIndex(int part,
                            int index)
Returns the String after a given index.
Specified by:
getAfterIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getBeforeIndex

public String getBeforeIndex(int part,
                             int index)
Returns the String before a given index.
Specified by:
getBeforeIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getCharacterAttribute

public AttributeSet getCharacterAttribute(int i)
Return the AttributeSet for a given character at a given index
Specified by:
getCharacterAttribute in interface AccessibleText
Parameters:
i - the zero-based index into the text
Returns:
the AttributeSet of the character

getSelectionStart

public int getSelectionStart()
Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Specified by:
getSelectionStart in interface AccessibleText
Returns:
the index into the text of the start of the selection

getSelectionEnd

public int getSelectionEnd()
Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same.
Specified by:
getSelectionEnd in interface AccessibleText
Returns:
the index into teh text of the end of the selection

getSelectedText

public String getSelectedText()
Returns the portion of the text that is selected.
Specified by:
getSelectedText in interface AccessibleText
Returns:
the String portion of the text that is selected
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJLayeredPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JLayeredPane.AccessibleJLayeredPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JLayeredPane.AccessibleJLayeredPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JLayeredPane
protected class JLayeredPane.AccessibleJLayeredPane
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JLayeredPane class. It provides an implementation of the Java Accessibility API appropriate to layered pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JLayeredPane.AccessibleJLayeredPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JLayeredPane.AccessibleJLayeredPane

protected JLayeredPane.AccessibleJLayeredPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JList.AccessibleJList

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JList.AccessibleJList
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, EventListener, ListDataListener, ListSelectionListener, PropertyChangeListener, Serializable
Enclosing class:
JList
protected class JList.AccessibleJList
extends JComponent.AccessibleJComponent
implements AccessibleSelection, PropertyChangeListener, ListSelectionListener, ListDataListener

This class implements accessibility support for the JList class. It provides an implementation of the Java Accessibility API appropriate to list user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JList.AccessibleJList.AccessibleJListChild
This class implements accessibility support appropriate for list children.
Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JList.AccessibleJList()
Method Summary
void | addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
void | contentsChanged(ListDataEvent e) List Data Listener contents changed method.
Accessible | getAccessibleAt(Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
int | getAccessibleSelectionCount() Returns the number of items currently selected.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
void | intervalAdded(ListDataEvent e) List Data Listener interval added method.
void | intervalRemoved(ListDataEvent e) List Data Listener interval removed method.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected.
void | propertyChange(PropertyChangeEvent e) Property Change Listener change method.
void | removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection.
void | selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections.
void | valueChanged(ListSelectionEvent e) List Selection Listener value change method.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JList.AccessibleJList

public JList.AccessibleJList()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Property Change Listener change method. Used to track changes to the DataModel and ListSelectionModel, in order to re-set listeners to those for reporting changes there via the Accessibility PropertyChange mechanism.
Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - PropertyChangeEvent

valueChanged

public void valueChanged(ListSelectionEvent e)
List Selection Listener value change method. Used to fire the property change
Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - ListSelectionEvent

intervalAdded

public void intervalAdded(ListDataEvent e)
List Data Listener interval added method. Used to fire the visible data property change
Specified by:
intervalAdded in interface ListDataListener
Parameters:
e - ListDataEvent

intervalRemoved

public void intervalRemoved(ListDataEvent e)
List Data Listener interval removed method. Used to fire the visible data property change
Specified by:
intervalRemoved in interface ListDataListener
Parameters:
e - ListDataEvent

contentsChanged

public void contentsChanged(ListDataEvent e)
List Data Listener contents changed method. Used to fire the visible data property change
Specified by:
contentsChanged in interface ListDataListener
Parameters:
e - ListDataEvent

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
Overrides:
getAccessibleAt in class Container.AccessibleAWTContainer
Returns:
the Accessible at the specified location, if it exists

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of items currently selected. If no items are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected item in the object. If there isn't a selection, or there are fewer items selcted than the integer passed in, the return value will be null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified selected item in the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every selected item in the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJListChild

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JList.AccessibleJList.AccessibleJListChild

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--javax.swing.JList.AccessibleJList.AccessibleJListChild
All Implemented Interfaces:
Accessible, AccessibleComponent
Enclosing class:
JList.AccessibleJList
protected class JList.AccessibleJList.AccessibleJListChild
extends AccessibleContext
implements Accessible, AccessibleComponent

This class implements accessibility support appropriate for list children.

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JList.AccessibleJList.AccessibleJListChild(JList parent, int indexInParent)
Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | addPropertyChangeListener(PropertyChangeListener l) Adds a PropertyChangeListener to the listener list.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
AccessibleAction | getAccessibleAction() Gets the AccessibleAction associated with this object that supports one or more actions.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Returns the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children of the object.
AccessibleComponent | getAccessibleComponent() Get the AccessibleComponent associated with this object.
AccessibleContext | getAccessibleContext() Get the AccessibleContext for this object.
String | getAccessibleDescription() Gets the accessibleDescription property of this object.
int | getAccessibleIndexInParent() Gets the 0-based index of this object in its accessible parent.
String | getAccessibleName() Gets the accessibleName property of this object.
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleSelection | getAccessibleSelection() Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object presently editable text on the display.
AccessibleValue | getAccessibleValue() Gets the AccessibleValue associated with this object that supports a Numerical value.
Color | getBackground() Gets the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Gets the Cursor of this object.
Font | getFont() Gets the Font of this object.
FontMetrics | getFontMetrics(Font f) Gets the FontMetrics of this object.
Color | getForeground() Gets the foreground color of this object.
Locale | getLocale() Gets the locale of the component.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determines if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determines if the object is showing.
boolean | isVisible() Determines if the object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | removePropertyChangeListener(PropertyChangeListener l) Removes a PropertyChangeListener from the listener list.
void | requestFocus() Requests focus for this object.
void | setAccessibleDescription(String s) Sets the accessible description of this object.
void | setAccessibleName(String s) Sets the localized accessible name of this object.
void | setBackground(Color c) Sets the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor c) Sets the Cursor of this object.
void | setEnabled(boolean b) Sets the enabled state of the object.
void | setFont(Font f) Sets the Font of this object.
void | setForeground(Color c) Sets the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Sets the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleParent, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JList.AccessibleJList.AccessibleJListChild

public JList.AccessibleJList.AccessibleJListChild(JList parent,
                                                  int indexInParent)
Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext for this object. In the implementation of the Java Accessibility API for this class, returns this object, which is its own AccessibleContext.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this object

getAccessibleName

public String getAccessibleName()
Description copied from class: AccessibleContext
Gets the accessibleName property of this object. The accessibleName property of an object is a localized String that designates the purpose of the object. For example, the accessibleName property of a label or button might be the text of the label or button itself. In the case of an object that doesn't display its name, the accessibleName should still be set. For example, in the case of a text field used to enter the name of a city, the accessibleName for the en_US locale could be 'city.'
Overrides:
getAccessibleName in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the localized name of the object; null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

setAccessibleName

public void setAccessibleName(String s)
Description copied from class: AccessibleContext
Sets the localized accessible name of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_NAME_PROPERTY property.
Overrides:
setAccessibleName in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
s - the new localized name of the object.
See Also:
AccessibleContext.getAccessibleName(), AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleDescription

public String getAccessibleDescription()
Description copied from class: AccessibleContext
Gets the accessibleDescription property of this object. The accessibleDescription property of this object is a short localized phrase describing the purpose of the object. For example, in the case of a 'Cancel' button, the accessibleDescription could be 'Ignore changes and close dialog box.'
Overrides:
getAccessibleDescription in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the localized description of the object; null if this object does not have a description
See Also:
AccessibleContext.setAccessibleDescription(java.lang.String)

setAccessibleDescription

public void setAccessibleDescription(String s)
Description copied from class: AccessibleContext
Sets the accessible description of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_DESCRIPTION_PROPERTY property.
Overrides:
setAccessibleDescription in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
s - the new localized description of the object
See Also:
AccessibleContext.setAccessibleName(java.lang.String), AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Description copied from class: AccessibleContext
Gets the role of this object. The role of the object is the generic purpose or use of the class of this object. For example, the role of a push button is AccessibleRole.PUSH_BUTTON. The roles in AccessibleRole are provided so component developers can pick from a set of predefined roles. This enables assistive technologies to provide a consistent interface to various tweaked subclasses of components (e.g., use AccessibleRole.PUSH_BUTTON for all components that act like a push button) as well as distinguish between sublasses that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes and AccessibleRole.RADIO_BUTTON for radio buttons).

Note that the AccessibleRole class is also extensible, so custom component developers can define their own AccessibleRole's if the set of predefined roles is inadequate.

Overrides:
getAccessibleRole in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Description copied from class: AccessibleContext
Gets the state set of this object. The AccessibleStateSet of an object is composed of a set of unique AccessibleStates. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_STATE_PROPERTY property.
Overrides:
getAccessibleStateSet in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Description copied from class: AccessibleContext
Gets the 0-based index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the 0-based index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
AccessibleContext.getAccessibleParent(),
AccessibleContext.getAccessibleChildrenCount(),
AccessibleContext.getAccessibleChild(int)

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Description copied from class: AccessibleContext
Returns the number of accessible children of the object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the number of accessible children of the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Description copied from class: AccessibleContext
Returns the specified Accessible child of the object. The Accessible children of an Accessible object are zero-based, so the first child of an Accessible child is at index 0, the second child is at index 1, and so on.
Overrides:
getAccessibleChild in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object
See Also:
AccessibleContext.getAccessibleChildrenCount()

getLocale

public Locale getLocale()
Description copied from class: AccessibleContext
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Overrides:
getLocale in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
this component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from class: AccessibleContext
Adds a PropertyChangeListener to the listener list. The listener is registered for all Accessible properties and will be called when those properties change.
Overrides:
addPropertyChangeListener in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
listener - The PropertyChangeListener to be added
See Also:
AccessibleContext.ACCESSIBLE_NAME_PROPERTY, AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, AccessibleContext.ACCESSIBLE_TEXT_PROPERTY, AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Description copied from class: AccessibleContext
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleAction

public AccessibleAction getAccessibleAction()
Description copied from class: AccessibleContext
Gets the AccessibleAction associated with this object that supports one or more actions.
Overrides:
getAccessibleAction in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleAction if supported by object; else return null
See Also:
AccessibleAction

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleComponent interface on behalf of itself.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
this object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Description copied from class: AccessibleContext
Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
Overrides:
getAccessibleSelection in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleSelection if supported by object; else return null
See Also:
AccessibleSelection

getAccessibleText

public AccessibleText getAccessibleText()
Description copied from class: AccessibleContext
Gets the AccessibleText associated with this object presently editable text on the display.
Overrides:
getAccessibleText in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleText if supported by object; else return null
See Also:
AccessibleText

getAccessibleValue

public AccessibleValue getAccessibleValue()
Description copied from class: AccessibleContext
Gets the AccessibleValue associated with this object that supports a Numerical value.
Overrides:
getAccessibleValue in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleValue if supported by object; else return null
See Also:
AccessibleValue

getBackground

public Color getBackground()
Description copied from interface: AccessibleComponent
Gets the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setBackground(java.awt.Color)

setBackground

public void setBackground(Color c)
Description copied from interface: AccessibleComponent
Sets the background color of this object.
Specified by:
setBackground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Color for the background
See Also:
AccessibleComponent.setBackground(java.awt.Color)

getForeground

public Color getForeground()
Description copied from interface: AccessibleComponent
Gets the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setForeground(java.awt.Color)

setForeground

public void setForeground(Color c)
Description copied from interface: AccessibleComponent
Sets the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Color for the foreground
See Also:
AccessibleComponent.getForeground()

getCursor

public Cursor getCursor()
Description copied from interface: AccessibleComponent
Gets the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setCursor(java.awt.Cursor)

setCursor

public void setCursor(Cursor c)
Description copied from interface: AccessibleComponent
Sets the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Cursor for the object
See Also:
AccessibleComponent.getCursor()

getFont

public Font getFont()
Description copied from interface: AccessibleComponent
Gets the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null
See Also:
AccessibleComponent.setFont(java.awt.Font)

setFont

public void setFont(Font f)
Description copied from interface: AccessibleComponent
Sets the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the new Font for the object
See Also:
AccessibleComponent.getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Description copied from interface: AccessibleComponent
Gets the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
AccessibleComponent.getFont()

isEnabled

public boolean isEnabled()
Description copied from interface: AccessibleComponent
Determines if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSets.
Specified by:
isEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is enabled; otherwise, false
See Also:
AccessibleComponent.setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.ENABLED, AccessibleStateSet

setEnabled

public void setEnabled(boolean b)
Description copied from interface: AccessibleComponent
Sets the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it
See Also:
AccessibleComponent.isEnabled()

isVisible

public boolean isVisible()
Description copied from interface: AccessibleComponent
Determines if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use isShowing().

Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets.

Specified by:
isVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is visible; otherwise, false
See Also:
AccessibleComponent.setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE, AccessibleStateSet

setVisible

public void setVisible(boolean b)
Description copied from interface: AccessibleComponent
Sets the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it
See Also:
AccessibleComponent.isVisible()

isShowing

public boolean isShowing()
Description copied from interface: AccessibleComponent
Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note: this will return true even if the object is obscured by another (for example, it is underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Description copied from interface: AccessibleComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
See Also:
AccessibleComponent.getBounds()

getLocationOnScreen

public Point getLocationOnScreen()
Description copied from interface: AccessibleComponent
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the location of the object on screen; null if this object is not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocation()

getLocation

public Point getLocation()
Description copied from interface: AccessibleComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocationOnScreen()

setLocation

public void setLocation(Point p)
Description copied from interface: AccessibleComponent
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Description copied from interface: AccessibleComponent
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
AccessibleComponent.contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Description copied from interface: AccessibleComponent
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
r - rectangle indicating this component's bounds
See Also:
AccessibleComponent.getBounds()

getSize

public Dimension getSize()
Description copied from interface: AccessibleComponent
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
AccessibleComponent.setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Description copied from interface: AccessibleComponent
Resizes this object so that it has width and height.
Specified by:
setSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
d - The dimension specifying the new size of the object.
See Also:
AccessibleComponent.getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Description copied from interface: AccessibleComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Description copied from interface: AccessibleComponent
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets.
Specified by:
isFocusTraversable in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Description copied from interface: AccessibleComponent
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.addFocusListener(java.awt.event.FocusListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenu.AccessibleJMenu

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JMenuItem.AccessibleJMenuItem
                                      |
                                      +--javax.swing.JMenu.AccessibleJMenu
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleText, AccessibleValue, ChangeListener, EventListener, Serializable
Enclosing class:
JMenu
protected class JMenu.AccessibleJMenu
extends JMenuItem.AccessibleJMenuItem
implements AccessibleSelection

This class implements accessibility support for the JMenu class. It provides an implementation of the Java Accessibility API appropriate to menu user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JMenu.AccessibleJMenu()
Method Summary
void | addAccessibleSelection(int i) Selects the ith menu in the menu.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
Accessible | getAccessibleChild(int i) Returns the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns the currently selected sub-menu if one is selected, otherwise null (there can only be one selection, and it can only be a sub-menu, as otherwise menu items don't remain selected).
int | getAccessibleSelectionCount() Returns 1 if a sub-menu is currently selected in this menu.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected (that is, if this child is a popped-up submenu).
void | removeAccessibleSelection(int i) Removes the nth item from the selection.
void | selectAllAccessibleSelection() Normally causes every selected item in the object to be selected if the object supports multiple selections.
Methods inherited from class javax.swing.JMenuItem.AccessibleJMenuItem
stateChanged
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JMenu.AccessibleJMenu

protected JMenu.AccessibleJMenu()
Method Detail

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Returns the nth Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JMenuItem.AccessibleJMenuItem
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns 1 if a sub-menu is currently selected in this menu.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
1 if a menu is currently selected, else 0

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns the currently selected sub-menu if one is selected, otherwise null (there can only be one selection, and it can only be a sub-menu, as otherwise menu items don't remain selected).
Specified by:
getAccessibleSelection in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
AccessibleSelection.getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected (that is, if this child is a popped-up submenu).
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Selects the ith menu in the menu. If that item is a submenu, it will pop up in response. If a different item is already popped up, this will force it to close. If this is a sub-menu that is already popped up (selected), this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the index of the item to be selected
See Also:
AbstractButton.AccessibleAbstractButton.getAccessibleStateSet()

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the nth item from the selection. In general, menus can only have one item within them selected at a time (e.g. one sub-menu popped open).
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the selected item

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected. This will close any open sub-menu.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Normally causes every selected item in the object to be selected if the object supports multiple selections. This method makes no sense in a menu bar, and so does nothing.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJMenuBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenuBar.AccessibleJMenuBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JMenuBar.AccessibleJMenuBar
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, Serializable
Enclosing class:
JMenuBar
protected class JMenuBar.AccessibleJMenuBar
extends JComponent.AccessibleJComponent
implements AccessibleSelection

This class implements accessibility support for the JMenuBar class. It provides an implementation of the Java Accessibility API appropriate to menu bar user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JMenuBar.AccessibleJMenuBar()
Method Summary
void | addAccessibleSelection(int i) Selects the nth menu in the menu bar, forcing it to pop up.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns the currently selected menu if one is selected, otherwise null.
int | getAccessibleSelectionCount() Returns 1 if a menu is currently selected in this menu bar.
AccessibleStateSet | getAccessibleStateSet() Get the accessible state set of this object.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected.
void | removeAccessibleSelection(int i) Removes the nth selected item in the object from the object's selection.
void | selectAllAccessibleSelection() Normally causes every selected item in the object to be selected if the object supports multiple selections.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JMenuBar.AccessibleJMenuBar

protected JMenuBar.AccessibleJMenuBar()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the accessible state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns 1 if a menu is currently selected in this menu bar.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
1 if a menu is currently selected, else 0

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns the currently selected menu if one is selected, otherwise null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
AccessibleSelection.getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Selects the nth menu in the menu bar, forcing it to pop up. If another menu is popped up, this will force it to close. If the nth menu is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items
See Also:
getAccessibleStateSet()

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the nth selected item in the object from the object's selection. If the nth item isn't currently selected, this method has no effect. Otherwise, it closes the popup menu.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected. This will close any open menu.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Normally causes every selected item in the object to be selected if the object supports multiple selections. This method makes no sense in a menu bar, and so does nothing.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenuItem.AccessibleJMenuItem

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JMenuItem.AccessibleJMenuItem
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, ChangeListener, EventListener, Serializable
Direct Known Subclasses:
JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem, JMenu.AccessibleJMenu, JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
Enclosing class:
JMenuItem
protected class JMenuItem.AccessibleJMenuItem
extends AbstractButton.AccessibleAbstractButton
implements ChangeListener

This class implements accessibility support for the JMenuItem class. It provides an implementation of the Java Accessibility API appropriate to menu item user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
void | stateChanged(ChangeEvent e) Supports the change listener interface and fires property change
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

stateChanged

public void stateChanged(ChangeEvent e)
Supports the change listener interface and fires property change
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJOptionPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JOptionPane.AccessibleJOptionPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JOptionPane.AccessibleJOptionPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JOptionPane
protected class JOptionPane.AccessibleJOptionPane
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JOptionPane class. It provides an implementation of the Java Accessibility API appropriate to option pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JOptionPane.AccessibleJOptionPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JOptionPane.AccessibleJOptionPane

protected JOptionPane.AccessibleJOptionPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJPanel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPanel.AccessibleJPanel

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JPanel.AccessibleJPanel
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JPanel
protected class JPanel.AccessibleJPanel
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JPanel class. It provides an implementation of the Java Accessibility API appropriate to panel user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JPanel.AccessibleJPanel()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JPanel.AccessibleJPanel

protected JPanel.AccessibleJPanel()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJPasswordField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPasswordField.AccessibleJPasswordField

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JTextField.AccessibleJTextField
                                      |
                                      +--javax.swing.JPasswordField.AccessibleJPasswordField
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Enclosing class:
JPasswordField
protected class JPasswordField.AccessibleJPasswordField
extends JTextField.AccessibleJTextField

This class implements accessibility support for the JPasswordField class. It provides an implementation of the Java Accessibility API appropriate to password field user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JPasswordField.AccessibleJPasswordField()
Method Summary
 AccessibleRole getAccessibleRole()
Gets the role of this object.
Methods inherited from class javax.swing.JTextField.AccessibleJTextField
getAccessibleStateSet
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JPasswordField.AccessibleJPasswordField

protected JPasswordField.AccessibleJPasswordField()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class JTextComponent.AccessibleJTextComponent
Returns:
an instance of AccessibleRole describing the role of the object (AccessibleRole.PASSWORD_TEXT)
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJPopupMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPopupMenu.AccessibleJPopupMenu

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JPopupMenu.AccessibleJPopupMenu
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JPopupMenu
protected class JPopupMenu.AccessibleJPopupMenu
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JPopupMenu class. It provides an implementation of the Java Accessibility API appropriate to popup menu user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JPopupMenu.AccessibleJPopupMenu()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JPopupMenu.AccessibleJPopupMenu

protected JPopupMenu.AccessibleJPopupMenu()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJProgressBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JProgressBar.AccessibleJProgressBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JProgressBar.AccessibleJProgressBar
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JProgressBar
protected class JProgressBar.AccessibleJProgressBar
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JProgressBar class. It provides an implementation of the Java Accessibility API appropriate to progress bar user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JProgressBar.AccessibleJProgressBar()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the accessible value of this object.
Number | getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | getMinimumAccessibleValue() Get the minimum accessible value of this object.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JProgressBar.AccessibleJProgressBar

protected JProgressBar.AccessibleJProgressBar()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the accessible value of this object.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
The current value of this object.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum accessible value of this object.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
The minimum value of this object.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum accessible value of this object.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
The maximum value of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJRadioButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRadioButton.AccessibleJRadioButton

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JToggleButton.AccessibleJToggleButton
                                      |
                                      +--javax.swing.JRadioButton.AccessibleJRadioButton
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, EventListener, ItemListener, Serializable
Enclosing class:
JRadioButton
protected class JRadioButton.AccessibleJRadioButton
extends JToggleButton.AccessibleJToggleButton

This class implements accessibility support for the JRadioButton class. It provides an implementation of the Java Accessibility API appropriate to radio button user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JRadioButton.AccessibleJRadioButton()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JToggleButton.AccessibleJToggleButton
itemStateChanged
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JRadioButton.AccessibleJRadioButton

protected JRadioButton.AccessibleJRadioButton()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JToggleButton.AccessibleJToggleButton
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJRadioButtonMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JMenuItem.AccessibleJMenuItem
                                      |
                                      +--javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, ChangeListener, EventListener, Serializable
Enclosing class:
JRadioButtonMenuItem
protected class JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
extends JMenuItem.AccessibleJMenuItem

This class implements accessibility support for the JRadioButtonMenuItem class. It provides an implementation of the Java Accessibility API appropriate to JRadioButtonMenuItem user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JMenuItem.AccessibleJMenuItem
stateChanged
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem

protected JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JMenuItem.AccessibleJMenuItem
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJRootPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRootPane.AccessibleJRootPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JRootPane.AccessibleJRootPane
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JRootPane
protected class JRootPane.AccessibleJRootPane
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JRootPane class. It provides an implementation of the Java Accessibility API appropriate to root pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JRootPane.AccessibleJRootPane()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JRootPane.AccessibleJRootPane

protected JRootPane.AccessibleJRootPane()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJScrollBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JScrollBar.AccessibleJScrollBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JScrollBar.AccessibleJScrollBar
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JScrollBar
protected class JScrollBar.AccessibleJScrollBar
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JScrollBar class. It provides an implementation of the Java Accessibility API appropriate to scroll bar user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JScrollBar.AccessibleJScrollBar()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the accessible value of this object.
Number | getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | getMinimumAccessibleValue() Get the minimum accessible value of this object.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JScrollBar.AccessibleJScrollBar

protected JScrollBar.AccessibleJScrollBar()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the accessible value of this object.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
The current value of this object.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum accessible value of this object.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
The minimum value of this object.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum accessible value of this object.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
The maximum value of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJScrollPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JScrollPane.AccessibleJScrollPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JScrollPane.AccessibleJScrollPane
All Implemented Interfaces:
AccessibleComponent, ChangeListener, EventListener, Serializable
Enclosing class:
JScrollPane
protected class JScrollPane.AccessibleJScrollPane
extends JComponent.AccessibleJComponent
implements ChangeListener

This class implements accessibility support for the JScrollPane class. It provides an implementation of the Java Accessibility API appropriate to scroll pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Field Summary
protected  JViewport viewPort
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JScrollPane.AccessibleJScrollPane()
Constructor to set up listener on viewport.
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
void | resetViewPort()
void | stateChanged(ChangeEvent e) Supports the change listener interface and fires property change
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

viewPort

protected JViewport viewPort
Constructor Detail

JScrollPane.AccessibleJScrollPane

public JScrollPane.AccessibleJScrollPane()
Constructor to set up listener on viewport.
Method Detail

resetViewPort

public void resetViewPort()

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

stateChanged

public void stateChanged(ChangeEvent e)
Supports the change listener interface and fires property change
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJSeparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSeparator.AccessibleJSeparator

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JSeparator.AccessibleJSeparator
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JSeparator
protected class JSeparator.AccessibleJSeparator
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JSeparator class. It provides an implementation of the Java Accessibility API appropriate to separator user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JSeparator.AccessibleJSeparator()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JSeparator.AccessibleJSeparator

protected JSeparator.AccessibleJSeparator()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJSlider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSlider.AccessibleJSlider

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JSlider.AccessibleJSlider
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JSlider
protected class JSlider.AccessibleJSlider
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JSlider class. It provides an implementation of the Java Accessibility API appropriate to slider user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JSlider.AccessibleJSlider()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Get the accessible value of this object.
Number | getMaximumAccessibleValue() Get the maximum accessible value of this object.
Number | getMinimumAccessibleValue() Get the minimum accessible value of this object.
boolean | setCurrentAccessibleValue(Number n) Set the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JSlider.AccessibleJSlider

protected JSlider.AccessibleJSlider()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Get the accessible value of this object.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
The current value of this object.

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Set the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Get the minimum accessible value of this object.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
The minimum value of this object.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Get the maximum accessible value of this object.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
The maximum value of this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJSplitPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSplitPane.AccessibleJSplitPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JSplitPane.AccessibleJSplitPane
All Implemented Interfaces:
AccessibleComponent, AccessibleValue, Serializable
Enclosing class:
JSplitPane
protected class JSplitPane.AccessibleJSplitPane
extends JComponent.AccessibleJComponent
implements AccessibleValue

This class implements accessibility support for the JSplitPane class. It provides an implementation of the Java Accessibility API appropriate to split pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JSplitPane.AccessibleJSplitPane()
Method Summary
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object.
Number | getCurrentAccessibleValue() Gets the accessible value of this object.
Number | getMaximumAccessibleValue() Gets the maximum accessible value of this object.
Number | getMinimumAccessibleValue() Gets the minimum accessible value of this object.
boolean | setCurrentAccessibleValue(Number n) Sets the value of this object as a Number.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JSplitPane.AccessibleJSplitPane

protected JSplitPane.AccessibleJSplitPane()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleState containing the current state of the object
See Also:
AccessibleState

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleValue interface on behalf of itself.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
this object

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Gets the accessible value of this object.
Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
a localized String describing the value of this object

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number n)
Sets the value of this object as a Number.
Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Returns:
True if the value was set.

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Gets the minimum accessible value of this object.
Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
The minimum value of this object.

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Gets the maximum accessible value of this object.
Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
The maximum value of this object.

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTabbedPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTabbedPane.AccessibleJTabbedPane

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JTabbedPane.AccessibleJTabbedPane
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, ChangeListener, EventListener, Serializable
Enclosing class:
JTabbedPane
protected class JTabbedPane.AccessibleJTabbedPane
extends JComponent.AccessibleJComponent
implements AccessibleSelection, ChangeListener

This class implements accessibility support for the JTabbedPane class. It provides an implementation of the Java Accessibility API appropriate to tabbed pane user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JTabbedPane.AccessibleJTabbedPane()
Constructs an AccessibleJTabbedPane
Method Summary
void | addAccessibleSelection(int i) Adds the specified Accessible child of the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected child of the object.
int | getAccessibleSelectionCount() Returns the number of Accessible children currently selected.
boolean | isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
void | removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection.
void | selectAllAccessibleSelection() Causes every child of the object to be selected if the object supports multiple selections.
void | stateChanged(ChangeEvent e) Invoked when the target of the listener has changed its state.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTabbedPane.AccessibleJTabbedPane

public JTabbedPane.AccessibleJTabbedPane()
Constructs an AccessibleJTabbedPane
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the specified Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object
Throws:
IllegalArgumentException - if index is out of bounds

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Description copied from class: Container.AccessibleAWTContainer
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Container.AccessibleAWTContainer
Following copied from class: java.awt.Container.AccessibleAWTContainer
Parameters:
p - The point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Description copied from interface: AccessibleSelection
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Description copied from interface: AccessibleSelection
Returns an Accessible representing the specified selected child of the object. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null.

Note that the index represents the i-th selected child, which is different from the i-th child.

Specified by:
getAccessibleSelection in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
AccessibleSelection.getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Description copied from interface: AccessibleSelection
Determines if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
Returns:
true if the current child of this object is selected; else false.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Description copied from interface: AccessibleSelection
Adds the specified Accessible child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Description copied from interface: AccessibleSelection
Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Following copied from interface: javax.accessibility.AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection

public void clearAccessibleSelection()
Description copied from interface: AccessibleSelection
Clears the selection in the object, so that no children in the object are selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Description copied from interface: AccessibleSelection
Causes every child of the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTable.AccessibleJTable

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JTable.AccessibleJTable
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, AccessibleTable, CellEditorListener, EventListener, ListSelectionListener, PropertyChangeListener, Serializable, TableColumnModelListener, TableModelListener
Enclosing class:
JTable
protected class JTable.AccessibleJTable
extends JComponent.AccessibleJComponent
implements AccessibleSelection, ListSelectionListener, TableModelListener, TableColumnModelListener, CellEditorListener, PropertyChangeListener, AccessibleTable

This class implements accessibility support for the JTable class. It provides an implementation of the Java Accessibility API appropriate to table user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JTable.AccessibleJTable.AccessibleJTableCell The class provides an implementation of the Java Accessibility API appropriate to table cells.
protected class | JTable.AccessibleJTable.AccessibleJTableModelChange
Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Method Summary
void | addAccessibleSelection(int i) Adds the specified Accessible child of the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected.
void | columnAdded(TableColumnModelEvent e) Track changes to the table contents (column insertions)
void | columnMarginChanged(ChangeEvent e) Track changes of a column moving due to margin changes.
void | columnMoved(TableColumnModelEvent e) Track changes of a column repositioning.
void | columnRemoved(TableColumnModelEvent e) Track changes to the table contents (column deletions)
void | columnSelectionChanged(ListSelectionEvent e) Track that the selection model of the TableColumnModel changed.
void | editingCanceled(ChangeEvent e) Invoked when editing is canceled.
void | editingStopped(ChangeEvent e) Track changes to a cell's contents.
Accessible | getAccessibleAt(int r, int c) Returns the Accessible at a specified row and column in the table.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleCaption() Returns the caption for the table.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
int | getAccessibleColumnAtIndex(int i)
int | getAccessibleColumnCount() Returns the number of columns in the table.
Accessible | getAccessibleColumnDescription(int c) Return the description of the specified column in the table.
int | getAccessibleColumnExtentAt(int r, int c) Returns the number of columns occupied by the Accessible at a given (row, column)
AccessibleTable | getAccessibleColumnHeader() Return the column headers as an AccessibleTable.
int | getAccessibleIndexAt(int r, int c) Returns the index at a given (row, column) in the table
AccessibleRole | getAccessibleRole() Gets the role of this object.
int | getAccessibleRowAtIndex(int i)
int | getAccessibleRowCount() Returns the number of rows in the table.
Accessible | getAccessibleRowDescription(int r) Return the description of the specified row in the table.
int | getAccessibleRowExtentAt(int r, int c) Returns the number of rows occupied by the Accessible at a specified row and column in the table.
AccessibleTable | getAccessibleRowHeader() Return the row headers as an AccessibleTable.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected child in the object.
int | getAccessibleSelectionCount() Returns the number of Accessible children currently selected.
Accessible | getAccessibleSummary() Returns the summary description of the table.
AccessibleTable | getAccessibleTable() Get the AccessibleTable associated with this object.
int[] | getSelectedAccessibleColumns() Returns the selected columns in a table.
int[] | getSelectedAccessibleRows() Returns the selected rows in a table.
boolean | isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
boolean | isAccessibleColumnSelected(int c) Returns a boolean value indicating whether the specified column is selected
boolean | isAccessibleRowSelected(int r) Returns a boolean value indicating whether the specified row is selected
boolean | isAccessibleSelected(int r, int c) Returns a boolean value indicating whether the accessible at a given (row, column) is selected
void | propertyChange(PropertyChangeEvent e) Track changes to selection model, column model, etc.
void | removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection.
void | selectAllAccessibleSelection() Causes every child of the object to be selected, but only if the JTable supports multiple selections, and if individual cell selection is enabled.
void | setAccessibleCaption(Accessible a) Sets the caption for the table.
void | setAccessibleColumnDescription(int c, Accessible a) Sets the description text of the specified column of the table.
void | setAccessibleColumnHeader(AccessibleTable a) Return the column headers as an AccessibleTable.
void | setAccessibleRowDescription(int r, Accessible a) Sets the description text of the specified row of the table.
void | setAccessibleRowHeader(AccessibleTable a) Return the row headers as an AccessibleTable.
void | setAccessibleSummary(Accessible a) Sets the summary description of the table.
void | tableChanged(TableModelEvent e) Track changes to the table contents
void | tableRowsDeleted(TableModelEvent e) Track changes to the table contents (row deletions)
void | tableRowsInserted(TableModelEvent e) Track changes to the table contents (row insertions)
void | valueChanged(ListSelectionEvent e) Track changes to table cell selections
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Track changes to selection model, column model, etc. so as to be able to re-place listeners on those in order to pass on information to the Accessibility PropertyChange mechanism
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

tableChanged

public void tableChanged(TableModelEvent e)
Track changes to the table contents
Specified by:
tableChanged in interface TableModelListener

tableRowsInserted

public void tableRowsInserted(TableModelEvent e)
Track changes to the table contents (row insertions)

tableRowsDeleted

public void tableRowsDeleted(TableModelEvent e)
Track changes to the table contents (row deletions)

columnAdded

public void columnAdded(TableColumnModelEvent e)
Track changes to the table contents (column insertions)
Specified by:
columnAdded in interface TableColumnModelListener

columnRemoved

public void columnRemoved(TableColumnModelEvent e)
Track changes to the table contents (column deletions)
Specified by:
columnRemoved in interface TableColumnModelListener

columnMoved

public void columnMoved(TableColumnModelEvent e)
Track changes of a column repositioning.
Specified by:
columnMoved in interface TableColumnModelListener
See Also:
TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(ChangeEvent e)
Track changes of a column moving due to margin changes.
Specified by:
columnMarginChanged in interface TableColumnModelListener
See Also:
TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent e)
Track that the selection model of the TableColumnModel changed.
Specified by:
columnSelectionChanged in interface TableColumnModelListener
See Also:
TableColumnModelListener

editingStopped

public void editingStopped(ChangeEvent e)
Track changes to a cell's contents. Invoked when editing is finished. The changes are saved, the editor object is discarded, and the cell is rendered once again.
Specified by:
editingStopped in interface CellEditorListener
See Also:
CellEditorListener

editingCanceled

public void editingCanceled(ChangeEvent e)
Invoked when editing is canceled. The editor object is discarded and the cell is rendered once again.
Specified by:
editingCanceled in interface CellEditorListener
See Also:
CellEditorListener

valueChanged

public void valueChanged(ListSelectionEvent e)
Track changes to table cell selections
Specified by:
valueChanged in interface ListSelectionListener
Following copied from interface: javax.swing.event.ListSelectionListener
Parameters:
e - the event that characterizes the change.

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Container.AccessibleAWTContainer
Parameters:
p - the point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected child in the object. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null.

Note that the index represents the i-th selected child, which is different from the i-th child.

Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected children
Returns:
the i-th selected child
See Also:
getAccessibleSelectionCount()

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
Returns:
true if the current child of this object is selected
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified Accessible child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect. This method only works on JTables which have individual cell selection enabled.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect. This method only works on JTables which have individual cell selection enabled.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of the child
See Also:
AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every child of the object to be selected, but only if the JTable supports multiple selections, and if individual cell selection is enabled.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection

getAccessibleTable

public AccessibleTable getAccessibleTable()
Get the AccessibleTable associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleTable interface on behalf of itself.
Overrides:
getAccessibleTable in class AccessibleContext
Returns:
this object

getAccessibleCaption

public Accessible getAccessibleCaption()
Returns the caption for the table.
Specified by:
getAccessibleCaption in interface AccessibleTable
Returns:
the caption for the table

setAccessibleCaption

public void setAccessibleCaption(Accessible a)
Sets the caption for the table.
Specified by:
setAccessibleCaption in interface AccessibleTable
Parameters:
a - the caption for the table

getAccessibleSummary

public Accessible getAccessibleSummary()
Returns the summary description of the table.
Specified by:
getAccessibleSummary in interface AccessibleTable
Returns:
the summary description of the table

setAccessibleSummary

public void setAccessibleSummary(Accessible a)
Sets the summary description of the table.
Specified by:
setAccessibleSummary in interface AccessibleTable
Parameters:
a - the summary description of the table

getAccessibleRowCount

public int getAccessibleRowCount()
Description copied from interface: AccessibleTable
Returns the number of rows in the table.
Specified by:
getAccessibleRowCount in interface AccessibleTable
Following copied from interface: javax.accessibility.AccessibleTable
Returns:
the number of rows in the table

getAccessibleColumnCount

public int getAccessibleColumnCount()
Description copied from interface: AccessibleTable
Returns the number of columns in the table.
Specified by:
getAccessibleColumnCount in interface AccessibleTable
Following copied from interface: javax.accessibility.AccessibleTable
Returns:
the number of columns in the table

getAccessibleAt

public Accessible getAccessibleAt(int r,
                                  int c)
Description copied from interface: AccessibleTable
Returns the Accessible at a specified row and column in the table.
Specified by:
getAccessibleAt in interface AccessibleTable
Following copied from interface: javax.accessibility.AccessibleTable
Parameters:
r - zero-based row of the table
c - zero-based column of the table
Returns:
the Accessible at the specified row and column

getAccessibleRowExtentAt

public int getAccessibleRowExtentAt(int r,
                                    int c)
Returns the number of rows occupied by the Accessible at a specified row and column in the table.
Specified by:
getAccessibleRowExtentAt in interface AccessibleTable
Returns:
the number of rows occupied by the Accessible at a specified row and column in the table.

getAccessibleColumnExtentAt

public int getAccessibleColumnExtentAt(int r,
                                       int c)
Returns the number of columns occupied by the Accessible at a given (row, column)
Specified by:
getAccessibleColumnExtentAt in interface AccessibleTable
Returns:
the number of columns occupied by the Accessible at a specified row and column in the table.

getAccessibleRowHeader

public AccessibleTable getAccessibleRowHeader()
Return the row headers as an AccessibleTable.
Specified by:
getAccessibleRowHeader in interface AccessibleTable
Returns:
an AccessibleTable representing the row headers

setAccessibleRowHeader

public void setAccessibleRowHeader(AccessibleTable a)
Return the row headers as an AccessibleTable.
Specified by:
setAccessibleRowHeader in interface AccessibleTable
Returns:
an AccessibleTable representing the row headers

getAccessibleColumnHeader

public AccessibleTable getAccessibleColumnHeader()
Return the column headers as an AccessibleTable.
Specified by:
getAccessibleColumnHeader in interface AccessibleTable
Returns:
an AccessibleTable representing the column headers

setAccessibleColumnHeader

public void setAccessibleColumnHeader(AccessibleTable a)
Return the column headers as an AccessibleTable.
Specified by:
setAccessibleColumnHeader in interface AccessibleTable
Returns:
an AccessibleTable representing the column headers

getAccessibleRowDescription

public Accessible getAccessibleRowDescription(int r)
Return the description of the specified row in the table.
Specified by:
getAccessibleRowDescription in interface AccessibleTable
Parameters:
r - zero-based row of the table
Returns:
the description of the row

setAccessibleRowDescription

public void setAccessibleRowDescription(int r,
                                        Accessible a)
Sets the description text of the specified row of the table.
Specified by:
setAccessibleRowDescription in interface AccessibleTable
Parameters:
r - zero-based row of the table
a - the description of the row

getAccessibleColumnDescription

public Accessible getAccessibleColumnDescription(int c)
Return the description of the specified column in the table.
Specified by:
getAccessibleColumnDescription in interface AccessibleTable
Parameters:
c - zero-based column of the table
Returns:
the description of the column

setAccessibleColumnDescription

public void setAccessibleColumnDescription(int c,
                                           Accessible a)
Sets the description text of the specified column of the table.
Specified by:
setAccessibleColumnDescription in interface AccessibleTable
Parameters:
c - zero-based column of the table
a - the description of the column

isAccessibleSelected

public boolean isAccessibleSelected(int r,
                                    int c)
Returns a boolean value indicating whether the accessible at a given (row, column) is selected
Specified by:
isAccessibleSelected in interface AccessibleTable
Parameters:
r - zero-based row of the table
c - zero-based column of the table
Returns:
the boolean value true if the accessible at (row, column) is selected. Otherwise, the boolean value false

isAccessibleRowSelected

public boolean isAccessibleRowSelected(int r)
Returns a boolean value indicating whether the specified row is selected
Specified by:
isAccessibleRowSelected in interface AccessibleTable
Parameters:
r - zero-based row of the table
Returns:
the boolean value true if the specified row is selected. Otherwise, false.

isAccessibleColumnSelected

public boolean isAccessibleColumnSelected(int c)
Returns a boolean value indicating whether the specified column is selected
Specified by:
isAccessibleColumnSelected in interface AccessibleTable
Parameters:
r - zero-based column of the table
Returns:
the boolean value true if the specified column is selected. Otherwise, false.

getSelectedAccessibleRows

public int[] getSelectedAccessibleRows()
Returns the selected rows in a table.
Specified by:
getSelectedAccessibleRows in interface AccessibleTable
Returns:
an array of selected rows where each element is a zero-based row of the table

getSelectedAccessibleColumns

public int[] getSelectedAccessibleColumns()
Returns the selected columns in a table.
Specified by:
getSelectedAccessibleColumns in interface AccessibleTable
Returns:
an array of selected columns where each element is a zero-based column of the table

getAccessibleRowAtIndex

public int getAccessibleRowAtIndex(int i)

getAccessibleColumnAtIndex

public int getAccessibleColumnAtIndex(int i)

getAccessibleIndexAt

public int getAccessibleIndexAt(int r,
                                int c)
Returns the index at a given (row, column) in the table
Parameters:
r - zero-based row of the table
c - zero-based column of the table
Returns:
the index into the table
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTableCell

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTable.AccessibleJTable.AccessibleJTableCell

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--javax.swing.JTable.AccessibleJTable.AccessibleJTableCell
All Implemented Interfaces:
Accessible, AccessibleComponent
Enclosing class:
JTable.AccessibleJTable
protected class JTable.AccessibleJTable.AccessibleJTableCell
extends AccessibleContext
implements Accessible, AccessibleComponent

The class provides an implementation of the Java Accessibility API appropriate to table cells.

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JTable.AccessibleJTable.AccessibleJTableCell(JTable t, int r, int c, int i)
Constructs an AccessibleJTableHeaderEntry
Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
AccessibleAction | getAccessibleAction() Gets the AccessibleAction associated with this object if one exists.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleComponent | getAccessibleComponent() Gets the AccessibleComponent associated with this object if one exists.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this component.
String | getAccessibleDescription() Gets the accessible description of this object.
int | getAccessibleIndexInParent() Gets the index of this object in its accessible parent.
String | getAccessibleName() Gets the accessible name of this object.
Accessible | getAccessibleParent() Gets the Accessible parent of this object.
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleSelection | getAccessibleSelection() Gets the AccessibleSelection associated with this object if one exists.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object if one exists.
AccessibleValue | getAccessibleValue() Gets the AccessibleValue associated with this object if one exists.
Color | getBackground() Gets the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Gets the Cursor of this object.
Font | getFont() Gets the Font of this object.
FontMetrics | getFontMetrics(Font f) Gets the FontMetrics of this object.
Color | getForeground() Gets the foreground color of this object.
Locale | getLocale() Gets the locale of the component.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determines if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determines if the object is showing.
boolean | isVisible() Determines if this object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list.
void | requestFocus() Requests focus for this object.
void | setAccessibleDescription(String s) Sets the accessible description of this object.
void | setAccessibleName(String s) Sets the localized accessible name of this object.
void | setBackground(Color c) Sets the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor c) Sets the Cursor of this object.
void | setEnabled(boolean b) Sets the enabled state of the object.
void | setFont(Font f) Sets the Font of this object.
void | setForeground(Color c) Sets the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Sets the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTable.AccessibleJTable.AccessibleJTableCell

public JTable.AccessibleJTable.AccessibleJTableCell(JTable t,
                                                    int r,
                                                    int c,
                                                    int i)
Constructs an AccessibleJTableHeaderEntry
Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this component. In the implementation of the Java Accessibility API for this class, return this object, which is its own AccessibleContext.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this object

getAccessibleName

public String getAccessibleName()
Gets the accessible name of this object.
Overrides:
getAccessibleName in class AccessibleContext
Returns:
the localized name of the object; null if this object does not have a name

setAccessibleName

public void setAccessibleName(String s)
Sets the localized accessible name of this object.
Overrides:
setAccessibleName in class AccessibleContext
Parameters:
s - the new localized name of the object.

getAccessibleDescription

public String getAccessibleDescription()
Gets the accessible description of this object.
Overrides:
getAccessibleDescription in class AccessibleContext
Returns:
the localized description of the object; null if this object does not have a description

setAccessibleDescription

public void setAccessibleDescription(String s)
Sets the accessible description of this object.
Overrides:
setAccessibleDescription in class AccessibleContext
Parameters:
s - the new localized description of the object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleParent

public Accessible getAccessibleParent()
Gets the Accessible parent of this object.
Overrides:
getAccessibleParent in class AccessibleContext
Returns:
the Accessible parent of this object; null if this object does not have an Accessible parent

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Gets the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the specified Accessible child of the object.
Overrides:
getAccessibleChild in class AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object

getLocale

public Locale getLocale()
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Overrides:
getLocale in class AccessibleContext
Returns:
this component's locale; if this component does not have a locale, the locale of its parent is returned
Throws:
IllegalComponentStateException - if the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent
See Also:
Component.setLocale(java.util.Locale)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Overrides:
addPropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleAction

public AccessibleAction getAccessibleAction()
Gets the AccessibleAction associated with this object if one exists. Otherwise returns null.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
the AccessibleAction, or null

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Gets the AccessibleComponent associated with this object if one exists. Otherwise returns null.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
the AccessibleComponent, or null

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Gets the AccessibleSelection associated with this object if one exists. Otherwise returns null.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
the AccessibleSelection, or null

getAccessibleText

public AccessibleText getAccessibleText()
Gets the AccessibleText associated with this object if one exists. Otherwise returns null.
Overrides:
getAccessibleText in class AccessibleContext
Returns:
the AccessibleText, or null

getAccessibleValue

public AccessibleValue getAccessibleValue()
Gets the AccessibleValue associated with this object if one exists. Otherwise returns null.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
the AccessibleValue, or null

getBackground

public Color getBackground()
Gets the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null.

setBackground

public void setBackground(Color c)
Sets the background color of this object.
Specified by:
setBackground in interface AccessibleComponent
Parameters:
c - the new Color for the background

getForeground

public Color getForeground()
Gets the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null

setForeground

public void setForeground(Color c)
Sets the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Parameters:
c - the new Color for the foreground

getCursor

public Cursor getCursor()
Gets the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null

setCursor

public void setCursor(Cursor c)
Sets the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Parameters:
c - the new Cursor for the object

getFont

public Font getFont()
Gets the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null

setFont

public void setFont(Font f)
Sets the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Parameters:
f - the new Font for the object

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Gets the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
getFont()

isEnabled

public boolean isEnabled()
Determines if the object is enabled.
Specified by:
isEnabled in interface AccessibleComponent
Returns:
true if object is enabled; otherwise, false

setEnabled

public void setEnabled(boolean b)
Sets the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it

isVisible

public boolean isVisible()
Determines if this object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen because one of the objects that this object is contained by is not visible. To determine if an object is showing on the screen, use isShowing().
Specified by:
isVisible in interface AccessibleComponent
Returns:
true if object is visible; otherwise, false

setVisible

public void setVisible(boolean b)
Sets the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it

isShowing

public boolean isShowing()
Determines if the object is showing. This is determined by checking the visibility of the object and ancestors of the object. Note: this will return true even if the object is obscured by another (for example, it happens to be underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Returns:
true if the object is showing; otherwise, false

contains

public boolean contains(Point p)
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false

getLocationOnScreen

public Point getLocationOnScreen()
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Returns:
location of object on screen -- can be null if this object is not on the screen

getLocation

public Point getLocation()
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Returns:
an instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen

setLocation

public void setLocation(Point p)
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Description copied from interface: AccessibleComponent
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
AccessibleComponent.contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Description copied from interface: AccessibleComponent
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
r - rectangle indicating this component's bounds
See Also:
AccessibleComponent.getBounds()

getSize

public Dimension getSize()
Description copied from interface: AccessibleComponent
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
AccessibleComponent.setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Description copied from interface: AccessibleComponent
Resizes this object so that it has width and height.
Specified by:
setSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
d - The dimension specifying the new size of the object.
See Also:
AccessibleComponent.getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Description copied from interface: AccessibleComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Description copied from interface: AccessibleComponent
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets.
Specified by:
isFocusTraversable in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Description copied from interface: AccessibleComponent
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.addFocusListener(java.awt.event.FocusListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTableModelChange

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTable.AccessibleJTable.AccessibleJTableModelChange

java.lang.Object
  |
  +--javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange
All Implemented Interfaces:
AccessibleTableModelChange
Enclosing class:
JTable.AccessibleJTable
protected class JTable.AccessibleJTable.AccessibleJTableModelChange
extends Object
implements AccessibleTableModelChange

Field Summary
protected int | firstColumn
protected int | firstRow
protected int | lastColumn
protected int | lastRow
protected int | type
Fields inherited from interface javax.accessibility.AccessibleTableModelChange
DELETE, INSERT, UPDATE
Constructor Summary
protected JTable.AccessibleJTable.AccessibleJTableModelChange(int type, int firstRow, int lastRow, int firstColumn, int lastColumn)
Method Summary
int | getFirstColumn() Returns the first column that changed.
int | getFirstRow() Returns the first row that changed.
int | getLastColumn() Returns the last column that changed.
int | getLastRow() Returns the last row that changed.
int | getType() Returns the type of event
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

type

protected int type

firstRow

protected int firstRow

lastRow

protected int lastRow

firstColumn

protected int firstColumn

lastColumn

protected int lastColumn
Constructor Detail

JTable.AccessibleJTable.AccessibleJTableModelChange

protected JTable.AccessibleJTable.AccessibleJTableModelChange(int type,
                                                              int firstRow,
                                                              int lastRow,
                                                              int firstColumn,
                                                              int lastColumn)
Method Detail

getType

public int getType()
Description copied from interface: AccessibleTableModelChange
Returns the type of event
Specified by:
getType in interface AccessibleTableModelChange
Following copied from interface: javax.accessibility.AccessibleTableModelChange
See Also:
AccessibleTableModelChange.INSERT, AccessibleTableModelChange.UPDATE, AccessibleTableModelChange.DELETE

getFirstRow

public int getFirstRow()
Description copied from interface: AccessibleTableModelChange
Returns the first row that changed.
Specified by:
getFirstRow in interface AccessibleTableModelChange

getLastRow

public int getLastRow()
Description copied from interface: AccessibleTableModelChange
Returns the last row that changed.
Specified by:
getLastRow in interface AccessibleTableModelChange

getFirstColumn

public int getFirstColumn()
Description copied from interface: AccessibleTableModelChange
Returns the first column that changed.
Specified by:
getFirstColumn in interface AccessibleTableModelChange

getLastColumn

public int getLastColumn()
Description copied from interface: AccessibleTableModelChange
Returns the last column that changed.
Specified by:
getLastColumn in interface AccessibleTableModelChange
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTextArea

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTextArea.AccessibleJTextArea

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JTextArea.AccessibleJTextArea
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Enclosing class:
JTextArea
protected class JTextArea.AccessibleJTextArea
extends JTextComponent.AccessibleJTextComponent

This class implements accessibility support for the JTextArea class. It provides an implementation of the Java Accessibility API appropriate to text area user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JTextArea.AccessibleJTextArea()
Method Summary
 AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTextArea.AccessibleJTextArea

protected JTextArea.AccessibleJTextArea()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class JTextComponent.AccessibleJTextComponent
Returns:
an instance of AccessibleStateSet describing the states of the object
See Also:
AccessibleStateSet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTextField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTextField.AccessibleJTextField

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JTextField.AccessibleJTextField
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Direct Known Subclasses:
JPasswordField.AccessibleJPasswordField
Enclosing class:
JTextField
protected class JTextField.AccessibleJTextField
extends JTextComponent.AccessibleJTextComponent

This class implements accessibility support for the JTextField class. It provides an implementation of the Java Accessibility API appropriate to text field user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
protected JTextField.AccessibleJTextField()
Method Summary
 AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTextField.AccessibleJTextField

protected JTextField.AccessibleJTextField()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of this object.
Overrides:
getAccessibleStateSet in class JTextComponent.AccessibleJTextComponent
Returns:
an instance of AccessibleStateSet describing the states of the object
See Also:
AccessibleState
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJToggleButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToggleButton.AccessibleJToggleButton

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.AbstractButton.AccessibleAbstractButton
                                |
                                +--javax.swing.JToggleButton.AccessibleJToggleButton
All Implemented Interfaces:
AccessibleAction, AccessibleComponent, AccessibleText, AccessibleValue, EventListener, ItemListener, Serializable
Direct Known Subclasses:
JCheckBox.AccessibleJCheckBox, JRadioButton.AccessibleJRadioButton
Enclosing class:
JToggleButton
protected class JToggleButton.AccessibleJToggleButton
extends AbstractButton.AccessibleAbstractButton
implements ItemListener

This class implements accessibility support for the JToggleButton class. It provides an implementation of the Java Accessibility API appropriate to toggle button user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
JToggleButton.AccessibleJToggleButton()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
void | itemStateChanged(ItemEvent e) Fire accessible property change events when the state of the toggle button changes.
Methods inherited from class javax.swing.AbstractButton.AccessibleAbstractButton
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JToggleButton.AccessibleJToggleButton

public JToggleButton.AccessibleJToggleButton()
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)
Fire accessible property change events when the state of the toggle button changes.
Specified by:
itemStateChanged in interface ItemListener

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJToolBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToolBar.AccessibleJToolBar

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JToolBar.AccessibleJToolBar
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JToolBar
protected class JToolBar.AccessibleJToolBar
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JToolBar class. It provides an implementation of the Java Accessibility API appropriate to tool bar user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JToolBar.AccessibleJToolBar()
Method Summary
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleStateSet | getAccessibleStateSet() Get the state of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JToolBar.AccessibleJToolBar

protected JToolBar.AccessibleJToolBar()
Method Detail

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state of this object.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJToolTip

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToolTip.AccessibleJToolTip

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JToolTip.AccessibleJToolTip
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JToolTip
protected class JToolTip.AccessibleJToolTip
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JToolTip class. It provides an implementation of the Java Accessibility API appropriate to tool tip user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JToolTip.AccessibleJToolTip()
Method Summary
String | getAccessibleDescription() Get the accessible description of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JToolTip.AccessibleJToolTip

protected JToolTip.AccessibleJToolTip()
Method Detail

getAccessibleDescription

public String getAccessibleDescription()
Get the accessible description of this object.
Overrides:
getAccessibleDescription in class JComponent.AccessibleJComponent
Returns:
a localized String describing this object.

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTree

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.AccessibleJTree

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JTree.AccessibleJTree
All Implemented Interfaces:
AccessibleComponent, AccessibleSelection, EventListener, Serializable, TreeExpansionListener, TreeModelListener, TreeSelectionListener
Enclosing class:
JTree
protected class JTree.AccessibleJTree
extends JComponent.AccessibleJComponent
implements AccessibleSelection, TreeSelectionListener, TreeModelListener, TreeExpansionListener

This class implements accessibility support for the JTree class. It provides an implementation of the Java Accessibility API appropriate to tree user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JTree.AccessibleJTree.AccessibleJTreeNode
This class implements accessibility support for the JTree child.
Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JTree.AccessibleJTree()
Method Summary
void | addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
void | fireVisibleDataPropertyChange() Fire a visible data property change notification.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of top-level children nodes of this JTree.
int | getAccessibleIndexInParent() Get the index of this object in its accessible parent.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
int | getAccessibleSelectionCount() Returns the number of items currently selected.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected.
void | removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection.
void | selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections.
void | treeCollapsed(TreeExpansionEvent e) Tree Collapsed notification.
void | treeExpanded(TreeExpansionEvent e) Tree Model Expansion notification.
void | treeNodesChanged(TreeModelEvent e) Tree Model Node change notification.
void | treeNodesInserted(TreeModelEvent e) Tree Model Node change notification.
void | treeNodesRemoved(TreeModelEvent e) Tree Model Node change notification.
void | treeStructureChanged(TreeModelEvent e) Tree Model structure change change notification.
void | valueChanged(TreeSelectionEvent e) Tree Selection Listener value change method.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTree.AccessibleJTree

public JTree.AccessibleJTree()
Method Detail

valueChanged

public void valueChanged(TreeSelectionEvent e)
Tree Selection Listener value change method. Used to fire the property change
Specified by:
valueChanged in interface TreeSelectionListener
Parameters:
e - ListSelectionEvent

fireVisibleDataPropertyChange

public void fireVisibleDataPropertyChange()
Fire a visible data property change notification. A 'visible' data property is one that represents something about the way the component appears on the display, where that appearance isn't bound to any other property. It notifies screen readers that the visual appearance of the component has changed, so they can notify the user.

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)
Tree Model Node change notification.
Specified by:
treeNodesChanged in interface TreeModelListener
Parameters:
e - a Tree Model event

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)
Tree Model Node change notification.
Specified by:
treeNodesInserted in interface TreeModelListener
Parameters:
e - a Tree node insertion event

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)
Tree Model Node change notification.
Specified by:
treeNodesRemoved in interface TreeModelListener
Parameters:
e - a Tree node(s) removal event

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)
Tree Model structure change change notification.
Specified by:
treeStructureChanged in interface TreeModelListener
Parameters:
e - a Tree Model event

treeCollapsed

public void treeCollapsed(TreeExpansionEvent e)
Tree Collapsed notification.
Specified by:
treeCollapsed in interface TreeExpansionListener
Parameters:
e - a TreeExpansionEvent

treeExpanded

public void treeExpanded(TreeExpansionEvent e)
Tree Model Expansion notification.
Specified by:
treeExpanded in interface TreeExpansionListener
Parameters:
e - a Tree node insertion event

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Container.AccessibleAWTContainer
Parameters:
p - point in local coordinates of this Accessible
Returns:
the Accessible, if it exists, at the specified location; else null

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of top-level children nodes of this JTree. Each of these nodes may in turn have children nodes.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children nodes in the tree.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Get the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class Component.AccessibleAWTComponent
Returns:
the index of this object in its parent. Since a JTree top-level object does not have an accessible parent.
See Also:
Component.AccessibleAWTComponent.getAccessibleParent()

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleSelection interface on behalf of itself.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
this object

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of items currently selected. If no items are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected item in the object. If there isn't a selection, or there are fewer items selected than the integer passed in, the return value will be null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified selected item in the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every selected item in the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTreeNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.AccessibleJTree.AccessibleJTreeNode

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode
All Implemented Interfaces:
Accessible, AccessibleAction, AccessibleComponent, AccessibleSelection
Enclosing class:
JTree.AccessibleJTree
protected class JTree.AccessibleJTree.AccessibleJTreeNode
extends AccessibleContext
implements Accessible, AccessibleComponent, AccessibleSelection, AccessibleAction

This class implements accessibility support for the JTree child. It provides an implementation of the Java Accessibility API appropriate to tree nodes.

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JTree.AccessibleJTree.AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
Constructs an AccessibleJTreeNode
Method Summary
void | addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection.
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list.
void | clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
boolean | doAccessibleAction(int i) Perform the specified Action on the tree node.
AccessibleAction | getAccessibleAction() Get the AccessibleAction associated with this object.
int | getAccessibleActionCount() Returns the number of accessible actions available in this tree node.
String | getAccessibleActionDescription(int i) Return a description of the specified action of the tree node.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleComponent | getAccessibleComponent() Get the AccessibleComponent associated with this object.
AccessibleContext | getAccessibleContext() Get the AccessibleContext associated with this tree node.
String | getAccessibleDescription() Get the accessible description of this object.
int | getAccessibleIndexInParent() Get the index of this object in its accessible parent.
String | getAccessibleName() Get the accessible name of this object.
Accessible | getAccessibleParent() Get the Accessible parent of this object.
AccessibleRole | getAccessibleRole() Get the role of this object.
AccessibleSelection | getAccessibleSelection() Get the AccessibleSelection associated with this object if one exists.
Accessible | getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object.
int | getAccessibleSelectionCount() Returns the number of items currently selected.
AccessibleStateSet | getAccessibleStateSet() Get the state set of this object.
AccessibleText | getAccessibleText() Get the AccessibleText associated with this object if one exists.
AccessibleValue | getAccessibleValue() Get the AccessibleValue associated with this object if one exists.
Color | getBackground() Get the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Gets the Cursor of this object.
Font | getFont() Gets the Font of this object.
FontMetrics | getFontMetrics(Font f) Gets the FontMetrics of this object.
Color | getForeground() Get the foreground color of this object.
Locale | getLocale() Gets the locale of the component.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
protected Point | getLocationInJTree()
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isAccessibleChildSelected(int i) Returns true if the current child of this object is selected.
boolean | isEnabled() Determines if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determines if the object is showing.
boolean | isVisible() Determines if the object is visible.
void | removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list.
void | requestFocus() Requests focus for this object.
void | selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections.
void | setAccessibleDescription(String s) Set the accessible description of this object.
void | setAccessibleName(String s) Set the localized accessible name of this object.
void | setBackground(Color c) Set the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor c) Sets the Cursor of this object.
void | setEnabled(boolean b) Sets the enabled state of the object.
void | setFont(Font f) Sets the Font of this object.
void | setForeground(Color c) Sets the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Sets the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTree.AccessibleJTree.AccessibleJTreeNode

public JTree.AccessibleJTree.AccessibleJTreeNode(JTree t,
                                                 TreePath p,
                                                 Accessible ap)
Constructs an AccessibleJTreeNode
Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this tree node. In the implementation of the Java Accessibility API for this class, return this object, which is its own AccessibleContext.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this object

getAccessibleName

public String getAccessibleName()
Get the accessible name of this object.
Overrides:
getAccessibleName in class AccessibleContext
Returns:
the localized name of the object; null if this object does not have a name

setAccessibleName

public void setAccessibleName(String s)
Set the localized accessible name of this object.
Overrides:
setAccessibleName in class AccessibleContext
Parameters:
s - the new localized name of the object.

getAccessibleDescription

public String getAccessibleDescription()
Get the accessible description of this object.
Overrides:
getAccessibleDescription in class AccessibleContext
Returns:
the localized description of the object; null if this object does not have a description

setAccessibleDescription

public void setAccessibleDescription(String s)
Set the accessible description of this object.
Overrides:
setAccessibleDescription in class AccessibleContext
Parameters:
s - the new localized description of the object

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Get the state set of this object.
Overrides:
getAccessibleStateSet in class AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleParent

public Accessible getAccessibleParent()
Get the Accessible parent of this object.
Overrides:
getAccessibleParent in class AccessibleContext
Returns:
the Accessible parent of this object; null if this object does not have an Accessible parent

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Get the index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the specified Accessible child of the object.
Overrides:
getAccessibleChild in class AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object

getLocale

public Locale getLocale()
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Overrides:
getLocale in class AccessibleContext
Returns:
This component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.
See Also:
Component.setLocale(java.util.Locale)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Overrides:
addPropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class AccessibleContext
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleAction

public AccessibleAction getAccessibleAction()
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself.
Overrides:
getAccessibleAction in class AccessibleContext
Returns:
this object

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleComponent interface on behalf of itself.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
this object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Get the AccessibleSelection associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleSelection in class AccessibleContext
Returns:
the AccessibleSelection, or null

getAccessibleText

public AccessibleText getAccessibleText()
Get the AccessibleText associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleText in class AccessibleContext
Returns:
the AccessibleText, or null

getAccessibleValue

public AccessibleValue getAccessibleValue()
Get the AccessibleValue associated with this object if one exists. Otherwise return null.
Overrides:
getAccessibleValue in class AccessibleContext
Returns:
the AccessibleValue, or null

getBackground

public Color getBackground()
Get the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null

setBackground

public void setBackground(Color c)
Set the background color of this object.
Specified by:
setBackground in interface AccessibleComponent
Parameters:
c - the new Color for the background

getForeground

public Color getForeground()
Get the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null

setForeground

public void setForeground(Color c)
Description copied from interface: AccessibleComponent
Sets the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Color for the foreground
See Also:
AccessibleComponent.getForeground()

getCursor

public Cursor getCursor()
Description copied from interface: AccessibleComponent
Gets the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setCursor(java.awt.Cursor)

setCursor

public void setCursor(Cursor c)
Description copied from interface: AccessibleComponent
Sets the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Cursor for the object
See Also:
AccessibleComponent.getCursor()

getFont

public Font getFont()
Description copied from interface: AccessibleComponent
Gets the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null
See Also:
AccessibleComponent.setFont(java.awt.Font)

setFont

public void setFont(Font f)
Description copied from interface: AccessibleComponent
Sets the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the new Font for the object
See Also:
AccessibleComponent.getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Description copied from interface: AccessibleComponent
Gets the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
AccessibleComponent.getFont()

isEnabled

public boolean isEnabled()
Description copied from interface: AccessibleComponent
Determines if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSets.
Specified by:
isEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is enabled; otherwise, false
See Also:
AccessibleComponent.setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.ENABLED, AccessibleStateSet

setEnabled

public void setEnabled(boolean b)
Description copied from interface: AccessibleComponent
Sets the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it
See Also:
AccessibleComponent.isEnabled()

isVisible

public boolean isVisible()
Description copied from interface: AccessibleComponent
Determines if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use isShowing().

Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets.

Specified by:
isVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is visible; otherwise, false
See Also:
AccessibleComponent.setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE, AccessibleStateSet

setVisible

public void setVisible(boolean b)
Description copied from interface: AccessibleComponent
Sets the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it
See Also:
AccessibleComponent.isVisible()

isShowing

public boolean isShowing()
Description copied from interface: AccessibleComponent
Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note: this will return true even if the object is obscured by another (for example, it is underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Description copied from interface: AccessibleComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
See Also:
AccessibleComponent.getBounds()

getLocationOnScreen

public Point getLocationOnScreen()
Description copied from interface: AccessibleComponent
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the location of the object on screen; null if this object is not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocation()

getLocationInJTree

protected Point getLocationInJTree()

getLocation

public Point getLocation()
Description copied from interface: AccessibleComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocationOnScreen()

setLocation

public void setLocation(Point p)
Description copied from interface: AccessibleComponent
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Description copied from interface: AccessibleComponent
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
AccessibleComponent.contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Description copied from interface: AccessibleComponent
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
r - rectangle indicating this component's bounds
See Also:
AccessibleComponent.getBounds()

getSize

public Dimension getSize()
Description copied from interface: AccessibleComponent
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
AccessibleComponent.setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Description copied from interface: AccessibleComponent
Resizes this object so that it has width and height.
Specified by:
setSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
d - The dimension specifying the new size of the object.
See Also:
AccessibleComponent.getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Description copied from interface: AccessibleComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Description copied from interface: AccessibleComponent
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets.
Specified by:
isFocusTraversable in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Description copied from interface: AccessibleComponent
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.addFocusListener(java.awt.event.FocusListener)

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of items currently selected. If no items are selected, the return value will be 0.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection
Returns:
the number of items currently selected.

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected item in the object. If there isn't a selection, or there are fewer items selected than the integer passed in, the return value will be null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Returns true if the current child of this object is selected.
Specified by:
isAccessibleChildSelected in interface AccessibleSelection
Parameters:
i - the zero-based index of the child in this Accessible object.
See Also:
AccessibleContext.getAccessibleChild(int)

addAccessibleSelection

public void addAccessibleSelection(int i)
Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect.
Specified by:
addAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Removes the specified selected item in the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
Specified by:
removeAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selectable items

clearAccessibleSelection

public void clearAccessibleSelection()
Clears the selection in the object, so that nothing in the object is selected.
Specified by:
clearAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Causes every selected item in the object to be selected if the object supports multiple selections.
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of accessible actions available in this tree node. If this node is not a leaf, there is at least one action (toggle expand), in addition to any available on the object behind the TreeCellRenderer.
Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
the number of Actions in this object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a description of the specified action of the tree node. If this node is not a leaf, there is at least one action description (toggle expand), in addition to any available on the object behind the TreeCellRenderer.
Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - zero-based index of the actions
Returns:
a description of the action

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the tree node. If this node is not a leaf, there is at least one action which can be done (toggle expand), in addition to any available on the object behind the TreeCellRenderer.
Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJViewport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JViewport.AccessibleJViewport

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.JViewport.AccessibleJViewport
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JViewport
protected class JViewport.AccessibleJViewport
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JViewport class. It provides an implementation of the Java Accessibility API appropriate to viewport user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JViewport.AccessibleJViewport()
Method Summary
 AccessibleRole getAccessibleRole()
Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JViewport.AccessibleJViewport

protected JViewport.AccessibleJViewport()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJWindow

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JWindow.AccessibleJWindow

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--java.awt.Window.AccessibleAWTWindow
                          |
                          +--javax.swing.JWindow.AccessibleJWindow
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JWindow
protected class JWindow.AccessibleJWindow
extends Window.AccessibleAWTWindow

This class implements accessibility support for the JWindow class. It provides an implementation of the Java Accessibility API appropriate to window user-interface elements.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class java.awt.Container.AccessibleAWTContainer
accessibleContainerHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JWindow.AccessibleJWindow()
Methods inherited from class java.awt.Window.AccessibleAWTWindow
getAccessibleRole, getAccessibleStateSet
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, addPropertyChangeListener, contains, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JWindow.AccessibleJWindow

protected JWindow.AccessibleJWindow()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Action

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface Action

All Superinterfaces:
ActionListener, EventListener
All Known Implementing Classes:
AbstractAction
public interface Action
extends ActionListener

The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.

In addition to the actionPerformed method defined by the ActionListener interface, this interface allows the application to define, in a single place:

  • One or more text strings that describe the function. These strings can be used, for example, to display the flyover text for a button or to set the text in a menu item.
  • One or more icons that depict the function. These icons can be used for the images in a menu control, or for composite entries in a more sophisticated user interface.
  • The enabled/disabled state of the functionality. Instead of having to separately disable the menu item and the toolbar button, the application can disable the function that implements this interface. All components which are registered as listeners for the state change then know to disable event generation for that item and to modify the display accordingly.
Certain containers, including menus and tool bars, know how to add an Action object. When an Action object is added to such a container, the container:
  1. Creates a component that is appropriate for that container (a tool bar creates a button component, for example).
  2. Gets the appropriate property(s) from the Action object to customize the component (for example, the icon image and flyover text).
  3. Checks the intial state of the Action object to determine if it is enabled or disabled, and renders the component in the appropriate fashion.
  4. Registers a listener with the Action object so that is notified of state changes. When the Action object changes from enabled to disabled, or back, the container makes the appropriate revisions to the event-generation mechanisms and renders the component accordingly.
For example, both a menu item and a toolbar button could access a Cut action object. The text associated with the object is specified as "Cut", and an image depicting a pair of scissors is specified as its icon. The Cut action-object can then be added to a menu and to a tool bar. Each container does the appropriate things with the object, and invokes its actionPerformed method when the component associated with it is activated. The application can then disable or enable the application object without worrying about what user-interface components are connected to it.

This interface can be added to an existing class or used to create an adapter (typically, by subclassing AbstractActio). The Action object can then be added to multiple action-aware containers and connected to Action-capable components. The GUI controls can then be activated or deactivated all at once by invoking the Action object's setEnabled method.

Note that Action implementations tend to be more expensive in terms of storage than a typical ActionListener, which does not offer the benefits of centralized control of functionality and broadcast of property changes. For th is reason, you should take care to only use Actions where their benefits are desired, and use simple ActionListeners elsewhere.

See Also:
AbstractAction

Field Summary
static String | ACCELERATOR_KEY The key used for storing a KeyStroke to be used as the accelerator for the action.
static String | ACTION_COMMAND_KEY The key used to determine the command string for the ActionEvent that will be created when an Action is going to be notified as the result of residing in a Keymap associated with a JComponent.
static String | DEFAULT Useful constants that can be used as the storage-retrieval key when setting or getting one of this object's properties (text or icon).
static String | LONG_DESCRIPTION The key used for storing a longer description for the action, could be used for context-sensitive help.
static String | MNEMONIC_KEY The key used for storing an int key code to be used as the mnemonic for the action.
static String | NAME The key used for storing the name for the action, used for a menu or button.
static String | SHORT_DESCRIPTION The key used for storing a short description for the action, used for tooltip text.
static String | SMALL_ICON The key used for storing a small icon for the action, used for toolbar buttons.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChange listener.
Object | getValue(String key) Gets one of this object's properties using the associated key.
boolean | isEnabled() Returns the enabled state of the Action.
void | putValue(String key, Object value) Sets one of this object's properties using the associated key.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChange listener.
void | setEnabled(boolean b) Sets the enabled state of the Action.
Methods inherited from interface java.awt.event.ActionListener
actionPerformed

Field Detail

DEFAULT

public static final String DEFAULT
Useful constants that can be used as the storage-retrieval key when setting or getting one of this object's properties (text or icon).

NAME

public static final String NAME
The key used for storing the name for the action, used for a menu or button.

SHORT_DESCRIPTION

public static final String SHORT_DESCRIPTION
The key used for storing a short description for the action, used for tooltip text.

LONG_DESCRIPTION

public static final String LONG_DESCRIPTION
The key used for storing a longer description for the action, could be used for context-sensitive help.

SMALL_ICON

public static final String SMALL_ICON
The key used for storing a small icon for the action, used for toolbar buttons.

ACTION_COMMAND_KEY

public static final String ACTION_COMMAND_KEY
The key used to determine the command string for the ActionEvent that will be created when an Action is going to be notified as the result of residing in a Keymap associated with a JComponent.

ACCELERATOR_KEY

public static final String ACCELERATOR_KEY
The key used for storing a KeyStroke to be used as the accelerator for the action.

MNEMONIC_KEY

public static final String MNEMONIC_KEY
The key used for storing an int key code to be used as the mnemonic for the action.
Method Detail

getValue

public Object getValue(String key)
Gets one of this object's properties using the associated key.
See Also:
putValue(java.lang.String, java.lang.Object)

putValue

public void putValue(String key,
                     Object value)
Sets one of this object's properties using the associated key. If the value has changed, a PropertyChangeEvent is sent to listeners.
Parameters:
key - a String containing the key
value - an Object value

setEnabled

public void setEnabled(boolean b)
Sets the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method. If the value has changed, a PropertyChangeEvent is sent to listeners.
Parameters:
b - true to enable this Action, false to disable it

isEnabled

public boolean isEnabled()
Returns the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.
Returns:
true if this Action is enabled

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChange listener. Containers and attached components use these methods to register interest in this Action object. When its enabled state or other property changes, the registered listeners are informed of the change.
Parameters:
listener - a PropertyChangeListener object

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChange listener.
Parameters:
listener - a PropertyChangeListener object
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ActionMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ActionMap

java.lang.Object
  |
  +--javax.swing.ActionMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ActionMapUIResource
public class ActionMap
extends Object
implements Serializable

ActionMap provides mappings from Objects (called keys or Action names) to Actions. An ActionMap is usually used with an InputMap to locate a particular action when a key is pressed. As with InputMap, an ActionMap can have a parent that is searched for keys not defined in the ActionMap.

As with InputMap if you create a cycle, eg:

   ActionMap am = new ActionMap();
   ActionMap bm = new ActionMap():
   am.setParent(bm);
   bm.setParent(am);
some of the methods will cause a StackOverflowError to be thrown.

See Also:
Serialized Form

Constructor Summary
ActionMap()
Creates an ActionMap with no parent and no mappings.
Method Summary
Object[] | allKeys() Returns an array of the keys defined in this ActionMap and its parent.
void | clear() Removes all the mappings from this ActionMap.
Action | get(Object key) Returns the binding for key, messaging the parent ActionMap if the binding is not locally defined.
ActionMap | getParent() Returns this ActionMap's parent.
Object[] | keys() Returns the Action names that are bound in this ActionMap.
void | put(Object key, Action action) Adds a binding for key to action.
void | remove(Object key) Removes the binding for key from this ActionMap.
void | setParent(ActionMap map) Sets this ActionMap's parent.
int | size() Returns the number of KeyStroke bindings.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActionMap

public ActionMap()
Creates an ActionMap with no parent and no mappings.
Method Detail

setParent

public void setParent(ActionMap map)
Sets this ActionMap's parent.
Parameters:
map - the ActionMap that is the parent of this one

getParent

public ActionMap getParent()
Returns this ActionMap's parent.
Returns:
the ActionMap that is the parent of this one, or null if this ActionMap has no parent

put

public void put(Object key,
                Action action)
Adds a binding for key to action. If action is null, this removes the current binding for key.

In most instances, key will be action.getValue(NAME).

get

public Action get(Object key)
Returns the binding for key, messaging the parent ActionMap if the binding is not locally defined.

remove

public void remove(Object key)
Removes the binding for key from this ActionMap.

clear

public void clear()
Removes all the mappings from this ActionMap.

keys

public Object[] keys()
Returns the Action names that are bound in this ActionMap.

size

public int size()
Returns the number of KeyStroke bindings.

allKeys

public Object[] allKeys()
Returns an array of the keys defined in this ActionMap and its parent. This method differs from keys() in that this method includes the keys defined in the parent.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActiveValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface UIDefaults.ActiveValue

Enclosing class:
UIDefaults
public static interface UIDefaults.ActiveValue

This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods. Here's an example of an ActiveValue that constructs a DefaultListCellRenderer:

  Object cellRendererActiveValue = new UIDefaults.ActiveValue() {
      public Object createValue(UIDefaults table) {
          return new DefaultListCellRenderer();
      }
  };

  uiDefaultsTable.put("MyRenderer", cellRendererActiveValue);

See Also:
UIDefaults.get(java.lang.Object)

Method Summary
 Object createValue(UIDefaults table)
Creates the value retrieved from the UIDefaults table.

Method Detail

createValue

public Object createValue(UIDefaults table)
Creates the value retrieved from the UIDefaults table. The object is created each time it is accessed.
Parameters:
table - a UIDefaults table
Returns:
the created Object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.border Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.border

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.border.AbstractBorder (implements javax.swing.border.Border, java.io.Serializable)
      • class javax.swing.border.BevelBorder
        • class javax.swing.border.SoftBevelBorder
      • class javax.swing.border.CompoundBorder
      • class javax.swing.border.EmptyBorder (implements java.io.Serializable)
        • class javax.swing.border.MatteBorder
      • class javax.swing.border.EtchedBorder
      • class javax.swing.border.LineBorder
      • class javax.swing.border.TitledBorder

Interface Hierarchy

  • interface javax.swing.border.Border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.border

Provides classes and interface for drawing specialized borders around a Swing component.

See:
Description

Interface Summary
Border Interface describing an object capable of rendering a border around the edges of a swing component.

Class Summary
AbstractBorder | A class that implements an empty border with no size.
BevelBorder | A class which implements a simple 2 line bevel border.
CompoundBorder | A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
EmptyBorder | A class which provides an empty, transparent border which takes up space but does no drawing.
EtchedBorder | A class which implements a simple etched border which can either be etched-in or etched-out.
LineBorder | A class which implements a line border of arbitrary thickness and of a single color.
MatteBorder | A class which provides a matte-like border of either a solid color or a tiled icon.
SoftBevelBorder | A class which implements a raised or lowered bevel with softened corners.
TitledBorder | A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Package javax.swing.border Description

Provides classes and interface for drawing specialized borders around a Swing component. You can subclass these classes to create customized borders for your components instead of using the default borders provided by the look-and-feel being used.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use Borders, a section in The Java Tutorial.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.border

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.border

Packages that use javax.swing.border
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in javax.swing.border used by javax.swing
Border
Interface describing an object capable of rendering a border around the edges of a swing component.
CompoundBorder
A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
MatteBorder
A class which provides a matte-like border of either a solid color or a tiled icon.
TitledBorder
A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Classes in javax.swing.border used by javax.swing.border
AbstractBorder
A class that implements an empty border with no size.
BevelBorder
A class which implements a simple 2 line bevel border.
Border
Interface describing an object capable of rendering a border around the edges of a swing component.
EmptyBorder
A class which provides an empty, transparent border which takes up space but does no drawing.

Classes in javax.swing.border used by javax.swing.plaf
AbstractBorder
A class that implements an empty border with no size.
BevelBorder
A class which implements a simple 2 line bevel border.
Border
Interface describing an object capable of rendering a border around the edges of a swing component.
CompoundBorder
A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
EmptyBorder
A class which provides an empty, transparent border which takes up space but does no drawing.
EtchedBorder
A class which implements a simple etched border which can either be etched-in or etched-out.
LineBorder
A class which implements a line border of arbitrary thickness and of a single color.
MatteBorder
A class which provides a matte-like border of either a solid color or a tiled icon.
TitledBorder
A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Classes in javax.swing.border used by javax.swing.plaf.basic
AbstractBorder
A class that implements an empty border with no size.
Border
Interface describing an object capable of rendering a border around the edges of a swing component.

Classes in javax.swing.border used by javax.swing.plaf.metal
AbstractBorder
A class that implements an empty border with no size.
Border
Interface describing an object capable of rendering a border around the edges of a swing component.

Classes in javax.swing.border used by javax.swing.table
Border
Interface describing an object capable of rendering a border around the edges of a swing component.

Classes in javax.swing.border used by javax.swing.tree
Border
Interface describing an object capable of rendering a border around the edges of a swing component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractBorder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class AbstractBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BasicBorders.ButtonBorder, BasicBorders.FieldBorder, BasicBorders.MarginBorder, BasicBorders.MenuBarBorder, BevelBorder, CompoundBorder, EmptyBorder, EtchedBorder, LineBorder, MetalBorders.ButtonBorder, MetalBorders.Flush3DBorder, MetalBorders.InternalFrameBorder, MetalBorders.MenuBarBorder, MetalBorders.MenuItemBorder, MetalBorders.OptionDialogBorder, MetalBorders.PaletteBorder, MetalBorders.PopupMenuBorder, MetalBorders.ScrollPaneBorder, MetalBorders.TableHeaderBorder, MetalBorders.ToolBarBorder, TitledBorder
public abstract class AbstractBorder
extends Object
implements Border, Serializable

A class that implements an empty border with no size. This provides a convenient base class from which other border classes can be easily derived.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
AbstractBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
Insets | getBorderInsets(Component c, Insets insets) Reinitializes the insets parameter with this Border's current Insets.
static Rectangle | getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.
Rectangle | getInteriorRectangle(Component c, int x, int y, int width, int height) This convenience method calls the static method.
boolean | isBorderOpaque() This default implementation returns false.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractBorder

public AbstractBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
This default implementation does no painting.
Specified by:
paintBorder in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
This default implementation returns the value of getBorderMargins.
Specified by:
getBorderInsets in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitializes the insets parameter with this Border's current Insets.
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

isBorderOpaque

public boolean isBorderOpaque()
This default implementation returns false.
Specified by:
isBorderOpaque in interface Border

getInteriorRectangle

public Rectangle getInteriorRectangle(Component c,
                                      int x,
                                      int y,
                                      int width,
                                      int height)
This convenience method calls the static method.

getInteriorRectangle

public static Rectangle getInteriorRectangle(Component c,
                                             Border b,
                                             int x,
                                             int y,
                                             int width,
                                             int height)
Returns a rectangle using the arguments minus the insets of the border. This is useful for determining the area that components should draw in that will not intersect the border.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BevelBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class BevelBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.BevelBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.BevelBorderUIResource, SoftBevelBorder
public class BevelBorder
extends AbstractBorder

A class which implements a simple 2 line bevel border.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected int | bevelType
protected Color | highlightInner
protected Color | highlightOuter
static int | LOWERED Lowered bevel type.
static int | RAISED Raised bevel type.
protected Color | shadowInner
protected Color | shadowOuter
Constructor Summary
BevelBorder(int bevelType)
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
BevelBorder(int bevelType, Color highlight, Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
Method Summary
int | getBevelType() Returns the type of the bevel border.
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Color | getHighlightInnerColor() Returns the inner highlight color of the bevel border.
Color | getHighlightInnerColor(Component c) Returns the inner highlight color of the bevel border when rendered on the specified component.
Color | getHighlightOuterColor() Returns the outer highlight color of the bevel border.
Color | getHighlightOuterColor(Component c) Returns the outer highlight color of the bevel border when rendered on the specified component.
Color | getShadowInnerColor() Returns the inner shadow color of the bevel border.
Color | getShadowInnerColor(Component c) Returns the inner shadow color of the bevel border when rendered on the specified component.
Color | getShadowOuterColor() Returns the outer shadow color of the bevel border.
Color | getShadowOuterColor(Component c) Returns the outer shadow color of the bevel border when rendered on the specified component.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
protected void | paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
protected void | paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RAISED

public static final int RAISED
Raised bevel type.

LOWERED

public static final int LOWERED
Lowered bevel type.

bevelType

protected int bevelType

highlightOuter

protected Color highlightOuter

highlightInner

protected Color highlightInner

shadowInner

protected Color shadowInner

shadowOuter

protected Color shadowOuter
Constructor Detail

BevelBorder

public BevelBorder(int bevelType)
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
Parameters:
bevelType - the type of bevel for the border

BevelBorder

public BevelBorder(int bevelType,
                   Color highlight,
                   Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
Parameters:
bevelType - the type of bevel for the border
highlight - the color to use for the bevel highlight
shadow - the color to use for the bevel shadow

BevelBorder

public BevelBorder(int bevelType,
                   Color highlightOuterColor,
                   Color highlightInnerColor,
                   Color shadowOuterColor,
                   Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
Parameters:
bevelType - the type of bevel for the border
highlightOuterColor - the color to use for the bevel outer highlight
highlightInnerColor - the color to use for the bevel inner highlight
shadowOuterColor - the color to use for the bevel outer shadow
shadowInnerColor - the color to use for the bevel inner shadow
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

getHighlightOuterColor

public Color getHighlightOuterColor(Component c)
Returns the outer highlight color of the bevel border when rendered on the specified component. If no highlight color was specified at instantiation, the highlight color is derived from the specified component's background color.
Parameters:
c - the component for which the highlight may be derived

getHighlightInnerColor

public Color getHighlightInnerColor(Component c)
Returns the inner highlight color of the bevel border when rendered on the specified component. If no highlight color was specified at instantiation, the highlight color is derived from the specified component's background color.
Parameters:
c - the component for which the highlight may be derived

getShadowInnerColor

public Color getShadowInnerColor(Component c)
Returns the inner shadow color of the bevel border when rendered on the specified component. If no shadow color was specified at instantiation, the shadow color is derived from the specified component's background color.
Parameters:
c - the component for which the shadow may be derived

getShadowOuterColor

public Color getShadowOuterColor(Component c)
Returns the outer shadow color of the bevel border when rendered on the specified component. If no shadow color was specified at instantiation, the shadow color is derived from the specified component's background color.
Parameters:
c - the component for which the shadow may be derived

getHighlightOuterColor

public Color getHighlightOuterColor()
Returns the outer highlight color of the bevel border. Will return null if no highlight color was specified at instantiation.

getHighlightInnerColor

public Color getHighlightInnerColor()
Returns the inner highlight color of the bevel border. Will return null if no highlight color was specified at instantiation.

getShadowInnerColor

public Color getShadowInnerColor()
Returns the inner shadow color of the bevel border. Will return null if no shadow color was specified at instantiation.

getShadowOuterColor

public Color getShadowOuterColor()
Returns the outer shadow color of the bevel border. Will return null if no shadow color was specified at instantiation.

getBevelType

public int getBevelType()
Returns the type of the bevel border.

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class AbstractBorder

paintRaisedBevel

protected void paintRaisedBevel(Component c,
                                Graphics g,
                                int x,
                                int y,
                                int width,
                                int height)

paintLoweredBevel

protected void paintLoweredBevel(Component c,
                                 Graphics g,
                                 int x,
                                 int y,
                                 int width,
                                 int height)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Border

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Interface Border

All Known Implementing Classes:
AbstractBorder, BorderUIResource, BasicBorders.SplitPaneBorder
public interface Border

Interface describing an object capable of rendering a border around the edges of a swing component. For examples of using borders see How to Use Borders, a section in The Java Tutorial.

In the Swing component set, borders supercede Insets as the mechanism for creating a (decorated or plain) area around the edge of a component.

Usage Notes:

  • Use EmptyBorder to create a plain border (this mechanism replaces its predecessor, setInsets).
  • Use CompoundBorder to nest multiple border objects, creating a single, combined border.
  • Border instances are designed to be shared. Rather than creating a new border object using one of border classes, use the BorderFactory methods, which produces a shared instance of the common border types.
  • Additional border styles include BevelBorder, SoftBevelBorder, EtchedBorder, LineBorder, TitledBorder, and MatteBorder.
  • To create a new border class, subclass AbstractBorder.

See Also:
BorderFactory, EmptyBorder, CompoundBorder

Method Summary
Insets | getBorderInsets(Component c) Returns the insets of the border.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.

Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Parameters:
c - the component for which this border insets value applies

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.border.SoftBevelBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.SoftBevelBorder

No usage of javax.swing.border.SoftBevelBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.AbstractBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.AbstractBorder

Packages that use AbstractBorder
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of AbstractBorder in javax.swing.border

Subclasses of AbstractBorder in javax.swing.border
class | BevelBorder A class which implements a simple 2 line bevel border.
class | CompoundBorder A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
class | EmptyBorder A class which provides an empty, transparent border which takes up space but does no drawing.
class | EtchedBorder A class which implements a simple etched border which can either be etched-in or etched-out.
class | LineBorder A class which implements a line border of arbitrary thickness and of a single color.
class | MatteBorder A class which provides a matte-like border of either a solid color or a tiled icon.
class | SoftBevelBorder A class which implements a raised or lowered bevel with softened corners.
class | TitledBorder A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Uses of AbstractBorder in javax.swing.plaf

Subclasses of AbstractBorder in javax.swing.plaf
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource

Uses of AbstractBorder in javax.swing.plaf.basic

Subclasses of AbstractBorder in javax.swing.plaf.basic
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.ToggleButtonBorder

Uses of AbstractBorder in javax.swing.plaf.metal

Subclasses of AbstractBorder in javax.swing.plaf.metal
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TableHeaderBorder Border for a Table Header
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.BevelBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.BevelBorder

Packages that use BevelBorder
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of BevelBorder in javax.swing.border

Subclasses of BevelBorder in javax.swing.border
 class SoftBevelBorder
A class which implements a raised or lowered bevel with softened corners.

Uses of BevelBorder in javax.swing.plaf

Subclasses of BevelBorder in javax.swing.plaf
static class BorderUIResource.BevelBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.CompoundBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.CompoundBorder

Packages that use CompoundBorder
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of CompoundBorder in javax.swing

Methods in javax.swing that return CompoundBorder
static CompoundBorder | BorderFactory.createCompoundBorder() Creates a compound border with a null inside edge and a null outside edge.
static CompoundBorder | BorderFactory.createCompoundBorder(Border outsideBorder, Border insideBorder) Creates a compound border specifying the border objects to use for the outside and inside edges.

Uses of CompoundBorder in javax.swing.plaf

Subclasses of CompoundBorder in javax.swing.plaf
static class BorderUIResource.CompoundBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.EmptyBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.EmptyBorder

Packages that use EmptyBorder
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of EmptyBorder in javax.swing.border

Subclasses of EmptyBorder in javax.swing.border
 class MatteBorder
A class which provides a matte-like border of either a solid color or a tiled icon.

Uses of EmptyBorder in javax.swing.plaf

Subclasses of EmptyBorder in javax.swing.plaf
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.MatteBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.EtchedBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.EtchedBorder

Packages that use EtchedBorder
javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of EtchedBorder in javax.swing.plaf

Subclasses of EtchedBorder in javax.swing.plaf
static class BorderUIResource.EtchedBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.LineBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.LineBorder

Packages that use LineBorder
javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of LineBorder in javax.swing.plaf

Subclasses of LineBorder in javax.swing.plaf
static class BorderUIResource.LineBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.MatteBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.MatteBorder

Packages that use MatteBorder
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of MatteBorder in javax.swing

Methods in javax.swing that return MatteBorder
static MatteBorder | BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color) Creates a matte-look border using a solid color.
static MatteBorder | BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon) Creates a matte-look border that consists of multiple tiles of a specified icon.

Uses of MatteBorder in javax.swing.plaf

Subclasses of MatteBorder in javax.swing.plaf
static class BorderUIResource.MatteBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.border.TitledBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.border.TitledBorder

Packages that use TitledBorder
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of TitledBorder in javax.swing

Methods in javax.swing that return TitledBorder
static TitledBorder | BorderFactory.createTitledBorder(String title) Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border) Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title) Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition) Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.

Uses of TitledBorder in javax.swing.plaf

Subclasses of TitledBorder in javax.swing.plaf
static class BorderUIResource.TitledBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.border.Border

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.border.Border

Packages that use Border
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Border in javax.swing

Fields in javax.swing declared as Border
protected static Border DefaultListCellRenderer.noFocusBorder

Methods in javax.swing that return Border
Border | JComponent.getBorder() Returns the border of this component or null if no border is currently set.
static Border | BorderFactory.createLineBorder(Color color) Creates a line border withe the specified color.
static Border | BorderFactory.createLineBorder(Color color, int thickness) Creates a line border with the specified color and width.
static Border | BorderFactory.createRaisedBevelBorder() Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static Border | BorderFactory.createLoweredBevelBorder() Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static Border | BorderFactory.createBevelBorder(int type) Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static Border | BorderFactory.createBevelBorder(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.
static Border | BorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
static Border | BorderFactory.createEtchedBorder() Creates a border with an "etched" look using the component's current background color for highlighting and shading.
static Border | BorderFactory.createEtchedBorder(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static Border | BorderFactory.createEtchedBorder(int type) Creates a border with an "etched" look using the component's current background color for highlighting and shading.
static Border | BorderFactory.createEtchedBorder(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static Border | BorderFactory.createEmptyBorder() Creates an empty border that takes up no space.
static Border | BorderFactory.createEmptyBorder(int top, int left, int bottom, int right) Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
Border | UIDefaults.getBorder(Object key) If the value of key is a Border return it, otherwise return null.
static Border | UIManager.getBorder(Object key) Returns a border from the defaults table.
Border | JScrollPane.getViewportBorder() Returns the Border object that surrounds the viewport.

Methods in javax.swing with parameters of type Border
void | JComponent.setBorder(Border border) Sets the border of this component.
void | JViewport.setBorder(Border border) The viewport "scrolls" it's child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).
protected String | JComponent.AccessibleJComponent.getBorderTitle(Border b) Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title.
static TitledBorder | BorderFactory.createTitledBorder(Border border) Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title) Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition) Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
static TitledBorder | BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
static CompoundBorder | BorderFactory.createCompoundBorder(Border outsideBorder, Border insideBorder) Creates a compound border specifying the border objects to use for the outside and inside edges.
void | JScrollPane.setViewportBorder(Border viewportBorder) Adds a border around the viewport.

Uses of Border in javax.swing.border

Classes in javax.swing.border that implement Border
class | AbstractBorder A class that implements an empty border with no size.
class | BevelBorder A class which implements a simple 2 line bevel border.
class | CompoundBorder A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object.
class | EmptyBorder A class which provides an empty, transparent border which takes up space but does no drawing.
class | EtchedBorder A class which implements a simple etched border which can either be etched-in or etched-out.
class | LineBorder A class which implements a line border of arbitrary thickness and of a single color.
class | MatteBorder A class which provides a matte-like border of either a solid color or a tiled icon.
class | SoftBevelBorder A class which implements a raised or lowered bevel with softened corners.
class | TitledBorder A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

Fields in javax.swing.border declared as Border
protected Border | CompoundBorder.outsideBorder
protected Border | CompoundBorder.insideBorder
protected Border | TitledBorder.border

Methods in javax.swing.border that return Border
Border | CompoundBorder.getOutsideBorder() Returns the outside border object.
Border | CompoundBorder.getInsideBorder() Returns the inside border object.
static Border | LineBorder.createBlackLineBorder() Convenience method for getting the Color.black LineBorder of thickness 1.
static Border | LineBorder.createGrayLineBorder() Convenience method for getting the Color.gray LineBorder of thickness 1.
Border | TitledBorder.getBorder() Returns the border of the titled border.

Methods in javax.swing.border with parameters of type Border
static Rectangle | AbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.
void | TitledBorder.setBorder(Border border) Sets the border of the titled border.

Constructors in javax.swing.border with parameters of type Border
CompoundBorder(Border outsideBorder, Border insideBorder)
Creates a compound border with the specified outside and inside borders.
TitledBorder(Border border)
Creates a TitledBorder instance with the specified border and an empty title.
TitledBorder(Border border, String title)
Creates a TitledBorder instance with the specified border and title.
TitledBorder(Border border, String title, int titleJustification, int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.

Uses of Border in javax.swing.plaf

Classes in javax.swing.plaf that implement Border
class | BorderUIResource
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource

Methods in javax.swing.plaf that return Border
static Border | BorderUIResource.getEtchedBorderUIResource()
static Border | BorderUIResource.getLoweredBevelBorderUIResource()
static Border | BorderUIResource.getRaisedBevelBorderUIResource()
static Border | BorderUIResource.getBlackLineBorderUIResource()

Constructors in javax.swing.plaf with parameters of type Border
BorderUIResource(Border delegate)
Creates a UIResource border object which wraps an existing Border instance.
BorderUIResource.CompoundBorderUIResource(Border outsideBorder, Border insideBorder)
BorderUIResource.TitledBorderUIResource(Border border)
BorderUIResource.TitledBorderUIResource(Border border, String title)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)

Uses of Border in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Border
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.SplitPaneBorder Draws the border around the splitpane.
static class | BasicBorders.ToggleButtonBorder

Fields in javax.swing.plaf.basic declared as Border
protected static Border BasicComboBoxRenderer.noFocusBorder

Methods in javax.swing.plaf.basic that return Border
static Border | BasicBorders.getButtonBorder()
static Border | BasicBorders.getRadioButtonBorder()
static Border | BasicBorders.getToggleButtonBorder()
static Border | BasicBorders.getMenuBarBorder()
static Border | BasicBorders.getSplitPaneBorder()
static Border | BasicBorders.getSplitPaneDividerBorder() Returns a border instance for a JSplitPane divider
static Border | BasicBorders.getTextFieldBorder()
static Border | BasicBorders.getProgressBarBorder()
static Border | BasicBorders.getInternalFrameBorder()
Border | BasicSplitPaneDivider.getBorder() Returns the border of this component or null if no border is currently set.

Methods in javax.swing.plaf.basic with parameters of type Border
 void BasicSplitPaneDivider.setBorder(Border border)
Sets the border of this component.

Uses of Border in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Border
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TableHeaderBorder Border for a Table Header
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder

Methods in javax.swing.plaf.metal that return Border
static Border | MetalBorders.getButtonBorder() Returns a border instance for a JButton
static Border | MetalBorders.getTextBorder() Returns a border instance for a text component
static Border | MetalBorders.getTextFieldBorder() Returns a border instance for a JTextField
static Border | MetalBorders.getToggleButtonBorder() Returns a border instance for a JToggleButton
static Border | MetalBorders.getDesktopIconBorder() Returns a border instance for a Desktop Icon

Uses of Border in javax.swing.table

Fields in javax.swing.table declared as Border
protected static Border DefaultTableCellRenderer.noFocusBorder

Uses of Border in javax.swing.tree

Fields in javax.swing.tree declared as Border
protected  Border DefaultTreeCellEditor.DefaultTextField.border
Border to use.

Methods in javax.swing.tree that return Border
 Border DefaultTreeCellEditor.DefaultTextField.getBorder()
Overrides JComponent.getBorder to returns the current border.

Constructors in javax.swing.tree with parameters of type Border
DefaultTreeCellEditor.DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor$DefaultTextField object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CompoundBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class CompoundBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.CompoundBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.CompoundBorderUIResource
public class CompoundBorder
extends AbstractBorder

A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets of an outside Border object. For example, this class may be used to add blank margin space to a component with an existing decorative border:

    Border border = comp.getBorder();
    Border margin = new EmptyBorder(10,10,10,10);
    comp.setBorder(new CompoundBorder(border, margin));

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected Border | insideBorder
protected Border | outsideBorder
Constructor Summary
CompoundBorder()
Creates a compound border with null outside and inside borders.
CompoundBorder(Border outsideBorder, Border insideBorder)
Creates a compound border with the specified outside and inside borders.
Method Summary
Insets | getBorderInsets(Component c) Returns the insets of the composite border by adding the insets of the outside border to the insets of the inside border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Border | getInsideBorder() Returns the inside border object.
Border | getOutsideBorder() Returns the outside border object.
boolean | isBorderOpaque() Returns whether or not this compound border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

outsideBorder

protected Border outsideBorder

insideBorder

protected Border insideBorder
Constructor Detail

CompoundBorder

public CompoundBorder()
Creates a compound border with null outside and inside borders.

CompoundBorder

public CompoundBorder(Border outsideBorder,
                      Border insideBorder)
Creates a compound border with the specified outside and inside borders. Either border may be null.
Parameters:
outsideBorder - the outside border
insideBorder - the inside border to be nested
Method Detail

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not this compound border is opaque. Returns true if both the inside and outside borders are non-null and opaque; returns false otherwise.
Overrides:
isBorderOpaque in class AbstractBorder

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the composite border by adding the insets of the outside border to the insets of the inside border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getOutsideBorder

public Border getOutsideBorder()
Returns the outside border object.

getInsideBorder

public Border getInsideBorder()
Returns the inside border object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EmptyBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class EmptyBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EmptyBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.EmptyBorderUIResource, MatteBorder
public class EmptyBorder
extends AbstractBorder
implements Serializable

A class which provides an empty, transparent border which takes up space but does no drawing.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected int | bottom
protected int | left
protected int | right
protected int | top
Constructor Summary
EmptyBorder(Insets borderInsets)
Creates an empty border with the specified insets.
EmptyBorder(int top, int left, int bottom, int right)
Creates an empty border with the specified insets.
Method Summary
Insets | getBorderInsets() Returns the insets of the border.
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Does no drawing by default.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

left

protected int left

right

protected int right

top

protected int top

bottom

protected int bottom
Constructor Detail

EmptyBorder

public EmptyBorder(int top,
                   int left,
                   int bottom,
                   int right)
Creates an empty border with the specified insets.
Parameters:
top - the top inset of the border
left - the left inset of the border
bottom - the bottom inset of the border
right - the right inset of the border

EmptyBorder

public EmptyBorder(Insets borderInsets)
Creates an empty border with the specified insets.
Parameters:
borderInsets - the insets of the border
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Does no drawing by default.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

getBorderInsets

public Insets getBorderInsets()
Returns the insets of the border.

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque. Returns false by default.
Overrides:
isBorderOpaque in class AbstractBorder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EtchedBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class EtchedBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EtchedBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.EtchedBorderUIResource
public class EtchedBorder
extends AbstractBorder

A class which implements a simple etched border which can either be etched-in or etched-out. If no highlight/shadow colors are initialized when the border is created, then these colors will be dynamically derived from the background color of the component argument passed into the paintBorder() method.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected int | etchType
protected Color | highlight
static int | LOWERED Lowered etched type.
static int | RAISED Raised etched type.
protected Color | shadow
Constructor Summary
EtchedBorder()
Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedBorder(Color highlight, Color shadow)
Creates a lowered etched border with the specified highlight and shadow colors.
EtchedBorder(int etchType)
Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.
EtchedBorder(int etchType, Color highlight, Color shadow)
Creates an etched border with the specified etch-type, highlight and shadow colors.
Method Summary
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
int | getEtchType() Returns which etch-type is set on the etched border.
Color | getHighlightColor() Returns the highlight color of the etched border.
Color | getHighlightColor(Component c) Returns the highlight color of the etched border when rendered on the specified component.
Color | getShadowColor() Returns the shadow color of the etched border.
Color | getShadowColor(Component c) Returns the shadow color of the etched border when rendered on the specified component.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RAISED

public static final int RAISED
Raised etched type.

LOWERED

public static final int LOWERED
Lowered etched type.

etchType

protected int etchType

highlight

protected Color highlight

shadow

protected Color shadow
Constructor Detail

EtchedBorder

public EtchedBorder()
Creates a lowered etched border whose colors will be derived from the background color of the component passed into the paintBorder method.

EtchedBorder

public EtchedBorder(int etchType)
Creates an etched border with the specified etch-type whose colors will be derived from the background color of the component passed into the paintBorder method.
Parameters:
etchType - the type of etch to be drawn by the border

EtchedBorder

public EtchedBorder(Color highlight,
                    Color shadow)
Creates a lowered etched border with the specified highlight and shadow colors.
Parameters:
highlight - the color to use for the etched highlight
shadow - the color to use for the etched shadow

EtchedBorder

public EtchedBorder(int etchType,
                    Color highlight,
                    Color shadow)
Creates an etched border with the specified etch-type, highlight and shadow colors.
Parameters:
etchType - the type of etch to be drawn by the border
highlight - the color to use for the etched highlight
shadow - the color to use for the etched shadow
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class AbstractBorder

getEtchType

public int getEtchType()
Returns which etch-type is set on the etched border.

getHighlightColor

public Color getHighlightColor(Component c)
Returns the highlight color of the etched border when rendered on the specified component. If no highlight color was specified at instantiation, the highlight color is derived from the specified component's background color.
Parameters:
c - the component for which the highlight may be derived

getHighlightColor

public Color getHighlightColor()
Returns the highlight color of the etched border. Will return null if no highlight color was specified at instantiation.

getShadowColor

public Color getShadowColor(Component c)
Returns the shadow color of the etched border when rendered on the specified component. If no shadow color was specified at instantiation, the shadow color is derived from the specified component's background color.
Parameters:
c - the component for which the shadow may be derived

getShadowColor

public Color getShadowColor()
Returns the shadow color of the etched border. Will return null if no shadow color was specified at instantiation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class LineBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.LineBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.LineBorderUIResource
public class LineBorder
extends AbstractBorder

A class which implements a line border of arbitrary thickness and of a single color.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected Color | lineColor
protected boolean | roundedCorners
protected int | thickness
Constructor Summary
LineBorder(Color color)
Creates a line border with the specified color and a thickness = 1.
LineBorder(Color color, int thickness)
Creates a line border with the specified color and thickness.
LineBorder(Color color, int thickness, boolean roundedCorners)
Creates a line border with the specified color, thickness, and corner shape.
Method Summary
static Border | createBlackLineBorder() Convenience method for getting the Color.black LineBorder of thickness 1.
static Border | createGrayLineBorder() Convenience method for getting the Color.gray LineBorder of thickness 1.
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Color | getLineColor() Returns the color of the border.
boolean | getRoundedCorners() Returns whether this border will be drawn with rounded corners.
int | getThickness() Returns the thickness of the border.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

thickness

protected int thickness

lineColor

protected Color lineColor

roundedCorners

protected boolean roundedCorners
Constructor Detail

LineBorder

public LineBorder(Color color)
Creates a line border with the specified color and a thickness = 1.
Parameters:
color - the color for the border

LineBorder

public LineBorder(Color color,
                  int thickness)
Creates a line border with the specified color and thickness.
Parameters:
color - the color of the border
thickness - the thickness of the border

LineBorder

public LineBorder(Color color,
                  int thickness,
                  boolean roundedCorners)
Creates a line border with the specified color, thickness, and corner shape.
Parameters:
color - the color of the border
thickness - the thickness of the border
roundedCorners - whether or not border corners should be round
Since:
1.3
Method Detail

createBlackLineBorder

public static Border createBlackLineBorder()
Convenience method for getting the Color.black LineBorder of thickness 1.

createGrayLineBorder

public static Border createGrayLineBorder()
Convenience method for getting the Color.gray LineBorder of thickness 1.

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

getLineColor

public Color getLineColor()
Returns the color of the border.

getThickness

public int getThickness()
Returns the thickness of the border.

getRoundedCorners

public boolean getRoundedCorners()
Returns whether this border will be drawn with rounded corners.

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class AbstractBorder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatteBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class MatteBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EmptyBorder
              |
              +--javax.swing.border.MatteBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.MatteBorderUIResource
public class MatteBorder
extends EmptyBorder

A class which provides a matte-like border of either a solid color or a tiled icon.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected Color | color
protected Icon | tileIcon
Fields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top
Constructor Summary
MatteBorder(Icon tileIcon)
Creates a matte border with the specified tile icon.
MatteBorder(Insets borderInsets, Color matteColor)
Creates a matte border with the specified insets and color.
MatteBorder(Insets borderInsets, Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
MatteBorder(int top, int left, int bottom, int right, Color matteColor)
Creates a matte border with the specified insets and color.
MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
Method Summary
Insets | getBorderInsets() Returns the insets of the border.
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
Color | getMatteColor() Returns the color used for tiling the border or null if a tile icon is being used.
Icon | getTileIcon() Returns the icon used for tiling the border or null if a solid color is being used.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the matte border.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

color

protected Color color

tileIcon

protected Icon tileIcon
Constructor Detail

MatteBorder

public MatteBorder(int top,
                   int left,
                   int bottom,
                   int right,
                   Color matteColor)
Creates a matte border with the specified insets and color.
Parameters:
top - the top inset of the border
left - the left inset of the border
bottom - the bottom inset of the border
right - the right inset of the border
matteColor - the color rendered for the border

MatteBorder

public MatteBorder(Insets borderInsets,
                   Color matteColor)
Creates a matte border with the specified insets and color.
Parameters:
borderInsets - the insets of the border
matteColor - the color rendered for the border

MatteBorder

public MatteBorder(int top,
                   int left,
                   int bottom,
                   int right,
                   Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
Parameters:
top - the top inset of the border
left - the left inset of the border
bottom - the bottom inset of the border
right - the right inset of the border
tileIcon - the icon to be used for tiling the border

MatteBorder

public MatteBorder(Insets borderInsets,
                   Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
Parameters:
borderInsets - the insets of the border
tileIcon - the icon to be used for tiling the border

MatteBorder

public MatteBorder(Icon tileIcon)
Creates a matte border with the specified tile icon. The insets will be calculated dynamically based on the size of the tile icon, where the top and bottom will be equal to the tile icon's height, and the left and right will be equal to the tile icon's width.
Parameters:
tileIcon - the icon to be used for tiling the border
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the matte border.
Overrides:
paintBorder in class EmptyBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class EmptyBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class EmptyBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

getBorderInsets

public Insets getBorderInsets()
Returns the insets of the border.
Overrides:
getBorderInsets in class EmptyBorder

getMatteColor

public Color getMatteColor()
Returns the color used for tiling the border or null if a tile icon is being used.

getTileIcon

public Icon getTileIcon()
Returns the icon used for tiling the border or null if a solid color is being used.

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class EmptyBorder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SoftBevelBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class SoftBevelBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.BevelBorder
              |
              +--javax.swing.border.SoftBevelBorder
All Implemented Interfaces:
Border, Serializable
public class SoftBevelBorder
extends BevelBorder

A class which implements a raised or lowered bevel with softened corners.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.border.BevelBorder
bevelType, highlightInner, highlightOuter, LOWERED, RAISED, shadowInner, shadowOuter
Constructor Summary
SoftBevelBorder(int bevelType)
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
SoftBevelBorder(int bevelType, Color highlight, Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
Method Summary
Insets | getBorderInsets(Component c) Returns the insets of the border.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Methods inherited from class javax.swing.border.BevelBorder
getBevelType, getBorderInsets, getHighlightInnerColor, getHighlightInnerColor, getHighlightOuterColor, getHighlightOuterColor, getShadowInnerColor, getShadowInnerColor, getShadowOuterColor, getShadowOuterColor, paintLoweredBevel, paintRaisedBevel
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SoftBevelBorder

public SoftBevelBorder(int bevelType)
Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.
Parameters:
bevelType - the type of bevel for the border

SoftBevelBorder

public SoftBevelBorder(int bevelType,
                       Color highlight,
                       Color shadow)
Creates a bevel border with the specified type, highlight and shadow colors.
Parameters:
bevelType - the type of bevel for the border
highlight - the color to use for the bevel highlight
shadow - the color to use for the bevel shadow

SoftBevelBorder

public SoftBevelBorder(int bevelType,
                       Color highlightOuterColor,
                       Color highlightInnerColor,
                       Color shadowOuterColor,
                       Color shadowInnerColor)
Creates a bevel border with the specified type, highlight shadow colors.
Parameters:
bevelType - the type of bevel for the border
highlightOuterColor - the color to use for the bevel outer highlight
highlightInnerColor - the color to use for the bevel inner highlight
shadowOuterColor - the color to use for the bevel outer shadow
shadowInnerColor - the color to use for the bevel inner shadow
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Overrides:
paintBorder in class BevelBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class BevelBorder
Parameters:
c - the component for which this border insets value applies

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class BevelBorder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TitledBorder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.border
Class TitledBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.TitledBorder
All Implemented Interfaces:
Border, Serializable
Direct Known Subclasses:
BorderUIResource.TitledBorderUIResource
public class TitledBorder
extends AbstractBorder

A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

If the border, font, or color property values are not specified in the constuctor or by invoking the appropriate set methods, the property values will be defined by the current look and feel, using the following property names in the Defaults Table:

  • "TitledBorder.border"
  • "TitledBorder.font"
  • "TitledBorder.titleColor"

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
static int | ABOVE_BOTTOM Position the title above the border's bottom line.
static int | ABOVE_TOP Position the title above the border's top line.
static int | BELOW_BOTTOM Position the title below the border's bottom line.
static int | BELOW_TOP Position the title below the border's top line.
protected Border | border
static int | BOTTOM Position the title in the middle of the border's bottom line.
static int | CENTER Position title text in the center of the border line.
static int | DEFAULT_JUSTIFICATION Use the default justification for the title text.
static int | DEFAULT_POSITION Use the default vertical orientation for the title text.
protected static int | EDGE_SPACING
static int | LEADING Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.
static int | LEFT Position title text at the left side of the border line.
static int | RIGHT Position title text at the right side of the border line.
protected static int | TEXT_INSET_H
protected static int | TEXT_SPACING
protected String | title
protected Color | titleColor
protected Font | titleFont
protected int | titleJustification
protected int | titlePosition
static int | TOP Position the title in the middle of the border's top line.
static int | TRAILING Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.
Constructor Summary
TitledBorder(Border border)
Creates a TitledBorder instance with the specified border and an empty title.
TitledBorder(Border border, String title)
Creates a TitledBorder instance with the specified border and title.
TitledBorder(Border border, String title, int titleJustification, int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
TitledBorder(String title)
Creates a TitledBorder instance.
Method Summary
Border | getBorder() Returns the border of the titled border.
Insets | getBorderInsets(Component c) Returns the insets of the border.
Insets | getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.
protected Font | getFont(Component c)
Dimension | getMinimumSize(Component c) Returns the minimum dimensions this border requires in order to fully display the border and title.
String | getTitle() Returns the title of the titled border.
Color | getTitleColor() Returns the title-color of the titled border.
Font | getTitleFont() Returns the title-font of the titled border.
int | getTitleJustification() Returns the title-justification of the titled border.
int | getTitlePosition() Returns the title-position of the titled border.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
void | setBorder(Border border) Sets the border of the titled border.
void | setTitle(String title) Sets the title of the titled border.
void | setTitleColor(Color titleColor) Sets the title-color of the titled border.
void | setTitleFont(Font titleFont) Sets the title-font of the titled border.
void | setTitleJustification(int titleJustification) Sets the title-justification of the titled border.
void | setTitlePosition(int titlePosition) Sets the title-position of the titled border.
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

title

protected String title

border

protected Border border

titlePosition

protected int titlePosition

titleJustification

protected int titleJustification

titleFont

protected Font titleFont

titleColor

protected Color titleColor

DEFAULT_POSITION

public static final int DEFAULT_POSITION
Use the default vertical orientation for the title text.

ABOVE_TOP

public static final int ABOVE_TOP
Position the title above the border's top line.

TOP

public static final int TOP
Position the title in the middle of the border's top line.

BELOW_TOP

public static final int BELOW_TOP
Position the title below the border's top line.

ABOVE_BOTTOM

public static final int ABOVE_BOTTOM
Position the title above the border's bottom line.

BOTTOM

public static final int BOTTOM
Position the title in the middle of the border's bottom line.

BELOW_BOTTOM

public static final int BELOW_BOTTOM
Position the title below the border's bottom line.

DEFAULT_JUSTIFICATION

public static final int DEFAULT_JUSTIFICATION
Use the default justification for the title text.

LEFT

public static final int LEFT
Position title text at the left side of the border line.

CENTER

public static final int CENTER
Position title text in the center of the border line.

RIGHT

public static final int RIGHT
Position title text at the right side of the border line.

LEADING

public static final int LEADING
Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.

TRAILING

public static final int TRAILING
Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.

EDGE_SPACING

protected static final int EDGE_SPACING

TEXT_SPACING

protected static final int TEXT_SPACING

TEXT_INSET_H

protected static final int TEXT_INSET_H
Constructor Detail

TitledBorder

public TitledBorder(String title)
Creates a TitledBorder instance.
Parameters:
title - the title the border should display

TitledBorder

public TitledBorder(Border border)
Creates a TitledBorder instance with the specified border and an empty title.
Parameters:
border - the border

TitledBorder

public TitledBorder(Border border,
                    String title)
Creates a TitledBorder instance with the specified border and title.
Parameters:
border - the border
title - the title the border should display

TitledBorder

public TitledBorder(Border border,
                    String title,
                    int titleJustification,
                    int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
Parameters:
border - the border
title - the title the border should display
titleJustification - the justification for the title
titlePosition - the position for the title

TitledBorder

public TitledBorder(Border border,
                    String title,
                    int titleJustification,
                    int titlePosition,
                    Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
Parameters:
border - the border
title - the title the border should display
titleJustification - the justification for the title
titlePosition - the position for the title
titleFont - the font for rendering the title

TitledBorder

public TitledBorder(Border border,
                    String title,
                    int titleJustification,
                    int titlePosition,
                    Font titleFont,
                    Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
Parameters:
border - the border
title - the title the border should display
titleJustification - the justification for the title
titlePosition - the position for the title
titleFont - the font of the title
titleColor - the color of the title
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.
Overrides:
paintBorder in class AbstractBorder
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Returns the insets of the border.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
Overrides:
getBorderInsets in class AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized

isBorderOpaque

public boolean isBorderOpaque()
Returns whether or not the border is opaque.
Overrides:
isBorderOpaque in class AbstractBorder

getTitle

public String getTitle()
Returns the title of the titled border.

getBorder

public Border getBorder()
Returns the border of the titled border.

getTitlePosition

public int getTitlePosition()
Returns the title-position of the titled border.

getTitleJustification

public int getTitleJustification()
Returns the title-justification of the titled border.

getTitleFont

public Font getTitleFont()
Returns the title-font of the titled border.

getTitleColor

public Color getTitleColor()
Returns the title-color of the titled border.

setTitle

public void setTitle(String title)
Sets the title of the titled border. param title the title for the border

setBorder

public void setBorder(Border border)
Sets the border of the titled border.
Parameters:
border - the border

setTitlePosition

public void setTitlePosition(int titlePosition)
Sets the title-position of the titled border.
Parameters:
titlePosition - the position for the border

setTitleJustification

public void setTitleJustification(int titleJustification)
Sets the title-justification of the titled border.
Parameters:
titleJustification - the justification for the border

setTitleFont

public void setTitleFont(Font titleFont)
Sets the title-font of the titled border.
Parameters:
titleFont - the font for the border title

setTitleColor

public void setTitleColor(Color titleColor)
Sets the title-color of the titled border.
Parameters:
titleColor - the color for the border title

getMinimumSize

public Dimension getMinimumSize(Component c)
Returns the minimum dimensions this border requires in order to fully display the border and title.
Parameters:
c - the component where this border will be drawn

getFont

protected Font getFont(Component c)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BorderFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class BorderFactory

java.lang.Object
  |
  +--javax.swing.BorderFactory
public class BorderFactory
extends Object

Factory class for vending standard Border objects. Wherever possible, this factory will hand out references to shared Border instances. For further information and examples see How to Use Borders, a section in The Java Tutorial.

Method Summary
static Border | createBevelBorder(int type) Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static Border | createBevelBorder(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.
static Border | createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
static CompoundBorder | createCompoundBorder() Creates a compound border with a null inside edge and a null outside edge.
static CompoundBorder | createCompoundBorder(Border outsideBorder, Border insideBorder) Creates a compound border specifying the border objects to use for the outside and inside edges.
static Border | createEmptyBorder() Creates an empty border that takes up no space.
static Border | createEmptyBorder(int top, int left, int bottom, int right) Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
static Border | createEtchedBorder() Creates a border with an "etched" look using the component's current background color for highlighting and shading.
static Border | createEtchedBorder(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static Border | createEtchedBorder(int type) Creates a border with an "etched" look using the component's current background color for highlighting and shading.
static Border | createEtchedBorder(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.
static Border | createLineBorder(Color color) Creates a line border withe the specified color.
static Border | createLineBorder(Color color, int thickness) Creates a line border with the specified color and width.
static Border | createLoweredBevelBorder() Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static MatteBorder | createMatteBorder(int top, int left, int bottom, int right, Color color) Creates a matte-look border using a solid color.
static MatteBorder | createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon) Creates a matte-look border that consists of multiple tiles of a specified icon.
static Border | createRaisedBevelBorder() Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
static TitledBorder | createTitledBorder(Border border) Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel.
static TitledBorder | createTitledBorder(Border border, String title) Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
static TitledBorder | createTitledBorder(Border border, String title, int titleJustification, int titlePosition) Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
static TitledBorder | createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
static TitledBorder | createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
static TitledBorder | createTitledBorder(String title) Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

createLineBorder

public static Border createLineBorder(Color color)
Creates a line border withe the specified color.
Parameters:
color - a Color to use for the line
Returns:
the Border object

createLineBorder

public static Border createLineBorder(Color color,
                                      int thickness)
Creates a line border with the specified color and width. The width applies to all four sides of the border. To specify widths individually for the top, bottom, left, and right, use createMatteBorder(int,int,int,int,Color).
Parameters:
color - a Color to use for the line
thickness - an integer specifying the width in pixels
Returns:
the Border object

createRaisedBevelBorder

public static Border createRaisedBevelBorder()
Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a raised border, highlights are on top and shadows are underneath.)
Returns:
the Border object

createLoweredBevelBorder

public static Border createLoweredBevelBorder()
Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.)
Returns:
the Border object

createBevelBorder

public static Border createBevelBorder(int type)
Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.)
Parameters:
type - an integer specifying either BevelBorder.LOWERED or BevelBorder.RAISED
Returns:
the Border object

createBevelBorder

public static Border createBevelBorder(int type,
                                       Color highlight,
                                       Color shadow)
Creates a beveled border of the specified type, using the specified highlighting and shadowing. The outer edge of the highlighted area uses a brighter shade of the highlight color. The inner edge of the shadow area uses a brighter shade of the shadow color.
Parameters:
type - an integer specifying either BevelBorder.LOWERED or BevelBorder.RAISED
highlight - a Color object for highlights
shadow - a Color object for shadows
Returns:
the Border object

createBevelBorder

public static Border createBevelBorder(int type,
                                       Color highlightOuter,
                                       Color highlightInner,
                                       Color shadowOuter,
                                       Color shadowInner)
Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
Parameters:
type - an integer specifying either BevelBorder.LOWERED or BevelBorder.RAISED
highlightOuter - a Color object for the outer edge of the highlight area
highlightInner - a Color object for the inner edge of the highlight area
shadowOuter - a Color object for the outer edge of the shadow area
shadowInner - a Color object for the inner edge of the shadow area
Returns:
the Border object

createEtchedBorder

public static Border createEtchedBorder()
Creates a border with an "etched" look using the component's current background color for highlighting and shading.
Returns:
the Border object

createEtchedBorder

public static Border createEtchedBorder(Color highlight,
                                        Color shadow)
Creates a border with an "etched" look using the specified highlighting and shading colors.
Parameters:
highlight - a Color object for the border highlights
shadow - a Color object for the border shadows
Returns:
the Border object

createEtchedBorder

public static Border createEtchedBorder(int type)
Creates a border with an "etched" look using the component's current background color for highlighting and shading.
Parameters:
type - one of EtchedBorder.RAISED, or EtchedBorder.LOWERED
Returns:
the Border object
Throws:
IllegalArgumentException - if type is not either EtchedBorder.RAISED or EtchedBorder.LOWERED
Since:
1.3

createEtchedBorder

public static Border createEtchedBorder(int type,
                                        Color highlight,
                                        Color shadow)
Creates a border with an "etched" look using the specified highlighting and shading colors.
Parameters:
type - one of EtchedBorder.RAISED, or EtchedBorder.LOWERED
highlight - a Color object for the border highlights
shadow - a Color object for the border shadows
Returns:
the Border object
Since:
1.3

createTitledBorder

public static TitledBorder createTitledBorder(String title)
Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
Parameters:
title - a String containing the text of the title
Returns:
the TitledBorder object

createTitledBorder

public static TitledBorder createTitledBorder(Border border)
Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel. (The Motif and Windows look and feels use an etched border; The Java look and feel uses a gray border.)
Parameters:
border - the Border object to add the title to
Returns:
the TitledBorder object

createTitledBorder

public static TitledBorder createTitledBorder(Border border,
                                              String title)
Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.
Parameters:
border - the Border object to add the title to
title - a String containing the text of the title
Returns:
the TitledBorder object

createTitledBorder

public static TitledBorder createTitledBorder(Border border,
                                              String title,
                                              int titleJustification,
                                              int titlePosition)
Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel.
Parameters:
border - the Border object to add the title to
title - a String containing the text of the title
titleJustification - an integer specifying the justification of the title -- one of the following:
  • TitledBorder.LEFT
  • TitledBorder.CENTER
  • TitledBorder.RIGHT
  • TitledBorder.LEADING
  • TitledBorder.TRAILING
  • TitledBorder.DEFAULT_JUSTIFICATION (leading)
titlePosition - an integer specifying the vertical position of the text in relation to the border -- one of the following:
  • TitledBorder.ABOVE_TOP
  • TitledBorder.TOP (sitting on the top line)
  • TitledBorder.BELOW_TOP
  • TitledBorder.ABOVE_BOTTOM
  • TitledBorder.BOTTOM (sitting on the bottom line)
  • TitledBorder.BELOW_BOTTOM
  • TitledBorder.DEFAULT_POSITION (top)
Returns:
the TitledBorder object

createTitledBorder

public static TitledBorder createTitledBorder(Border border,
                                              String title,
                                              int titleJustification,
                                              int titlePosition,
                                              Font titleFont)
Adds a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel.
Parameters:
border - the Border object to add the title to
title - a String containing the text of the title
titleJustification - an integer specifying the justification of the title -- one of the following:
  • TitledBorder.LEFT
  • TitledBorder.CENTER
  • TitledBorder.RIGHT
  • TitledBorder.LEADING
  • TitledBorder.TRAILING
  • TitledBorder.DEFAULT_JUSTIFICATION (leading)
titlePosition - an integer specifying the vertical position of the text in relation to the border -- one of the following:
  • TitledBorder.ABOVE_TOP
  • TitledBorder.TOP (sitting on the top line)
  • TitledBorder.BELOW_TOP
  • TitledBorder.ABOVE_BOTTOM
  • TitledBorder.BOTTOM (sitting on the bottom line)
  • TitledBorder.BELOW_BOTTOM
  • TitledBorder.DEFAULT_POSITION (top)
titleFont - a Font object specifying the title font
Returns:
the TitledBorder object

createTitledBorder

public static TitledBorder createTitledBorder(Border border,
                                              String title,
                                              int titleJustification,
                                              int titlePosition,
                                              Font titleFont,
                                              Color titleColor)
Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.
Parameters:
border - the Border object to add the title to
title - a String containing the text of the title
titleJustification - an integer specifying the justification of the title -- one of the following:
  • TitledBorder.LEFT
  • TitledBorder.CENTER
  • TitledBorder.RIGHT
  • TitledBorder.LEADING
  • TitledBorder.TRAILING
  • TitledBorder.DEFAULT_JUSTIFICATION (leading)
titlePosition - an integer specifying the vertical position of the text in relation to the border -- one of the following:
  • TitledBorder.ABOVE_TOP
  • TitledBorder.TOP (sitting on the top line)
  • TitledBorder.BELOW_TOP
  • TitledBorder.ABOVE_BOTTOM
  • TitledBorder.BOTTOM (sitting on the bottom line)
  • TitledBorder.BELOW_BOTTOM
  • TitledBorder.DEFAULT_POSITION (top)
titleFont - a Font object specifying the title font
titleColor - a Color object specifying the title color
Returns:
the TitledBorder object

createEmptyBorder

public static Border createEmptyBorder()
Creates an empty border that takes up no space. (The width of the top, bottom, left, and right sides are all zero.)
Returns:
the Border object

createEmptyBorder

public static Border createEmptyBorder(int top,
                                       int left,
                                       int bottom,
                                       int right)
Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
Parameters:
top - an integer specifying the width of the top, in pixels
left - an integer specifying the width of the left side, in pixels
bottom - an integer specifying the width of the right side, in pixels
right - an integer specifying the width of the bottom, in pixels
Returns:
the Border object

createCompoundBorder

public static CompoundBorder createCompoundBorder()
Creates a compound border with a null inside edge and a null outside edge.
Returns:
the CompoundBorder object

createCompoundBorder

public static CompoundBorder createCompoundBorder(Border outsideBorder,
                                                  Border insideBorder)
Creates a compound border specifying the border objects to use for the outside and inside edges.
Parameters:
outsideBorder - a Border object for the outer edge of the compound border
insideBorder - a Border object for the inner edge of the compound border
Returns:
the CompoundBorder object

createMatteBorder

public static MatteBorder createMatteBorder(int top,
                                            int left,
                                            int bottom,
                                            int right,
                                            Color color)
Creates a matte-look border using a solid color. (The difference between this border and a line border is that you can specify the individual border dimensions.)
Parameters:
top - an integer specifying the width of the top, in pixels
left - an integer specifying the width of the left side, in pixels
bottom - an integer specifying the width of the right side, in pixels
right - an integer specifying the width of the bottom, in pixels
color - a Color to use for the border
Returns:
the MatteBorder object

createMatteBorder

public static MatteBorder createMatteBorder(int top,
                                            int left,
                                            int bottom,
                                            int right,
                                            Icon tileIcon)
Creates a matte-look border that consists of multiple tiles of a specified icon. Multiple copies of the icon are placed side-by-side to fill up the border area.

Note:
If the icon doesn't load, the border area is painted gray.

Parameters:
top - an integer specifying the width of the top, in pixels
left - an integer specifying the width of the left side, in pixels
bottom - an integer specifying the width of the right side, in pixels
right - an integer specifying the width of the bottom, in pixels
tileIcon - the Icon object used for the border tiles
Returns:
the MatteBorder object
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


BoundedRangeModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface BoundedRangeModel

All Known Implementing Classes:
DefaultBoundedRangeModel
public interface BoundedRangeModel

Defines the data model used by components like Sliders and ProgressBars. Defines four interrelated integer properties: minimum, maximum, extent and value. These four integers define two nested ranges like this:

 minimum <= value="value" <="value+extent" <="maximum"
 The outer range is minimum,maximum and the inner
 range is value,value+extent.  The inner range
 must lie within the outer one, i.e. value must be
 less than or equal to maximum and value+extent
 must greater than or equal to minimum, and maximum
 must be greater than or equal to minimum.
 There are a few features of this model that one might find a little
 surprising.  These quirks exist for the convenience of the
 Swing BoundedRangeModel clients like like  Slider and ScrollBar.

  •
   The minimum and maximum set methods "correct" the other
   three properties to acommodate their new value argument.  For
   example setting the model's minimum may change its maximum, value,
   and extent properties (in that order), to maintain the constraints
   specified above.

  •
   The value and extent set methods "correct" their argument to
   fit within the limits defined by the other three properties.
   For example if value == maximum, setExtent(10)
   would change the extent (back) to zero.

  •
   The four BoundedRangeModel values are defined as Java Beans properties
   however Swing ChangeEvents are used to notify clients of changes rather
   than PropertyChangeEvents. This was done to keep the overhead of monitoring
   a BoundedRangeModel low. Changes are often reported at MouseDragged rates.

 For an example of specifying custom bounded range models used by sliders,
 see The Anatomy of a Swing-Based Program
 in The Java Tutorial.

See Also:
DefaultBoundedRangeModel

Method Summary
void | addChangeListener(ChangeListener x) Adds a ChangeListener to the model's listener list.
int | getExtent() Returns the model's extent, the length of the inner range that begins at the model's value.
int | getMaximum() Returns the model's maximum.
int | getMinimum() Returns the minimum acceptable value.
int | getValue() Returns the model's current value.
boolean | getValueIsAdjusting() Returns true if the current changes to the value property are part of a series of changes.
void | removeChangeListener(ChangeListener x) Removes a ChangeListener from the model's listener list.
void | setExtent(int newExtent) Sets the model's extent.
void | setMaximum(int newMaximum) Sets the model's maximum to newMaximum.
void | setMinimum(int newMinimum) Sets the model's minimum to newMinimum.
void | setRangeProperties(int value, int extent, int min, int max, boolean adjusting) This method sets all of the model's data with a single method call.
void | setValue(int newValue) Sets the model's current value to newValue if newValue satisfies the model's constraints.
void | setValueIsAdjusting(boolean b) This attribute indicates that any upcoming changes to the value of the model should be considered a single event.

Method Detail

getMinimum

public int getMinimum()

Returns the minimum acceptable value.

Returns:
the value of the minimum property
See Also:
setMinimum(int)

setMinimum

public void setMinimum(int newMinimum)

Sets the model's minimum to newMinimum.   The
 other three properties may be changed as well, to ensure
 that:

 minimum <= value="value" <="value+extent" <="maximum"

 Notifies any listeners if the model changes.

Parameters:
newMinimum - the model's new minimum
See Also:
getMinimum(),
addChangeListener(javax.swing.event.ChangeListener)

getMaximum

public int getMaximum()

Returns the model's maximum.  Note that the upper
 limit on the model's value is (maximum - extent).

Returns:
the value of the maximum property.
See Also:
setMaximum(int),
setExtent(int)

setMaximum

public void setMaximum(int newMaximum)

Sets the model's maximum to newMaximum. The other
 three properties may be changed as well, to ensure that

 minimum <= value="value" <="value+extent" <="maximum"

 Notifies any listeners if the model changes.

Parameters:
newMaximum - the model's new maximum
See Also:
getMaximum(),
addChangeListener(javax.swing.event.ChangeListener)

getValue

public int getValue()

Returns the model's current value.  Note that the upper
 limit on the model's value is maximum - extent
 and the lower limit is minimum.

Returns:
the model's value
See Also:
setValue(int)

setValue

public void setValue(int newValue)

Sets the model's current value to newValue if newValue
 satisfies the model's constraints. Those constraints are:

 minimum <= value="value" <="value+extent" <="maximum"
 Otherwise, if newValue is less than minimum
 it's set to minimum, if its greater than
 maximum then it's set to maximum, and
 if it's greater than value+extent then it's set to
 value+extent.

 When a BoundedRange model is used with a scrollbar the value
 specifies the origin of the scrollbar knob (aka the "thumb" or
 "elevator").  The value usually represents the origin of the
 visible part of the object being scrolled.

 Notifies any listeners if the model changes.

Parameters:
newValue - the model's new value
See Also:
getValue()

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)

This attribute indicates that any upcoming changes to the value
 of the model should be considered a single event. This attribute
 will be set to true at the start of a series of changes to the value,
 and will be set to false when the value has finished changing.  Normally
 this allows a listener to only take action when the final value change in
 committed, instead of having to do updates for all intermediate values.

 Sliders and scrollbars use this property when a drag is underway.

Parameters:
b - true if the upcoming changes to the value property are part of a series

getValueIsAdjusting

public boolean getValueIsAdjusting()

Returns true if the current changes to the value property are part
 of a series of changes.

Returns:
the valueIsAdjustingProperty.
See Also:
setValueIsAdjusting(boolean)

getExtent

public int getExtent()

Returns the model's extent, the length of the inner range that
 begins at the model's value.

Returns:
the value of the model's extent property
See Also:
setExtent(int),
setValue(int)

setExtent

public void setExtent(int newExtent)

Sets the model's extent.  The newExtent is forced to
 be greater than or equal to zero and less than or equal to
 maximum - value.

 When a BoundedRange model is used with a scrollbar the extent
 defines the length of the scrollbar knob (aka the "thumb" or
 "elevator").  The extent usually represents how much of the
 object being scrolled is visible. When used with a slider,
 the extent determines how much the value can "jump", for
 example when the user presses PgUp or PgDn.

 Notifies any listeners if the model changes.

Parameters:
newExtent - the model's new extent
See Also:
getExtent(),
setValue(int)

setRangeProperties

public void setRangeProperties(int value,
                               int extent,
                               int min,
                               int max,
                               boolean adjusting)

This method sets all of the model's data with a single method call.
 The method results in a single change event being generated. This is
 convenient when you need to adjust all the model data simulaneously and
 do not want individual change events to occur.

Parameters:
value - an int giving the current value
extent - an int giving the amount by which the value can "jump"
min - an int giving the minimum value
max - an int giving the maximum value
isAdjusting - a boolean, true if a series of changes are in
                    progress
See Also:
setValue(int),
setExtent(int),
setMinimum(int),
setMaximum(int),
setValueIsAdjusting(boolean)

addChangeListener

public void addChangeListener(ChangeListener x)

Adds a ChangeListener to the model's listener list.

Parameters:
x - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(ChangeListener x)

Removes a ChangeListener from the model's listener list.

Parameters:
x - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener)

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


Box

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class Box

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.Box
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class Box
extends Container
implements Accessible

A lightweight container that uses a BoxLayout object as its layout manager. Box provides several class methods that are useful for containers using BoxLayout -- even non-Box containers.

The Box class can create several kinds of invisible components that affect layout: glue, struts, and rigid areas. If all the components your Box contains have a fixed size, you might want to use a glue component (returned by createGlue) to control the components' positions. If you need a fixed amount of space between two components, try using a strut (createHorizontalStrut or createVerticalStrut). If you need an invisible component that always takes up the same amount of space, get it by invoking createRigidArea.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
BoxLayout, Serialized Form

Inner Class Summary
protected class | Box.AccessibleBox This class implements accessibility support for the Box class.
static class | Box.Filler An implementation of a lightweight component that participates in layout but has no view.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  AccessibleContext accessibleContext
The currently set AccessibleContext object.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Box(int axis)
Creates a Box that displays its components along the the specified axis.
Method Summary
static Component | createGlue() Creates an invisible "glue" component that can be useful in a Box whose visible components have a maximum width (for a horizontal box) or height (for a vertical box).
static Box | createHorizontalBox() Creates a Box that displays its components from left to right.
static Component | createHorizontalGlue() Creates a horizontal glue component.
static Component | createHorizontalStrut(int width) Creates an invisible, fixed-width component.
static Component | createRigidArea(Dimension d) Creates an invisible component that's always the specified size.
static Box | createVerticalBox() Creates a Box that displays its components from top to bottom.
static Component | createVerticalGlue() Creates a vertical glue component.
static Component | createVerticalStrut(int height) Creates an invisible, fixed-height component.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Box.
void | setLayout(LayoutManager l) Throws an AWTError, since a Box can use only a BoxLayout.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

accessibleContext

protected AccessibleContext accessibleContext
The currently set AccessibleContext object.
Constructor Detail

Box

public Box(int axis)
Creates a Box that displays its components along the the specified axis.
Parameters:
axis - can be either BoxLayout.X_AXIS (to display components from left to right) or BoxLayout.Y_AXIS (to display them from top to bottom)
See Also:
createHorizontalBox(), createVerticalBox()
Method Detail

createHorizontalBox

public static Box createHorizontalBox()
Creates a Box that displays its components from left to right.
Returns:
the box

createVerticalBox

public static Box createVerticalBox()
Creates a Box that displays its components from top to bottom.
Returns:
the box

createRigidArea

public static Component createRigidArea(Dimension d)
Creates an invisible component that's always the specified size.
Parameters:
d - the dimensions of the invisible component
Returns:
the component
See Also:
createGlue(), createHorizontalStrut(int), createVerticalStrut(int)

createHorizontalStrut

public static Component createHorizontalStrut(int width)
Creates an invisible, fixed-width component. In a horizontal box, you typically use this method to force a certain amount of space between two components. In a vertical box, you might use this method to force the box to be at least the specified width. The invisible component has no height unless excess space is available, in which case it takes its share of available space, just like any other component that has no maximum height.
Parameters:
width - the width of the invisible component, in pixels >= 0
Returns:
the component
See Also:
createVerticalStrut(int), createGlue(), createRigidArea(java.awt.Dimension)

createVerticalStrut

public static Component createVerticalStrut(int height)
Creates an invisible, fixed-height component. In a vertical box, you typically use this method to force a certain amount of space between two components. In a horizontal box, you might use this method to force the box to be at least the specified height. The invisible component has no width unless excess space is available, in which case it takes its share of available space, just like any other component that has no maximum width.
Parameters:
height - the height of the invisible component, in pixels >= 0
Returns:
the component
See Also:
createHorizontalStrut(int), createGlue(), createRigidArea(java.awt.Dimension)

createGlue

public static Component createGlue()
Creates an invisible "glue" component that can be useful in a Box whose visible components have a maximum width (for a horizontal box) or height (for a vertical box). You can think of the glue component as being a gooey substance that expands as much as necessary to fill the space between its neighboring components.

For example, suppose you have a horizontal box that contains two fixed-size components. If the box gets extra space, the fixed-size components won't become larger, so where does the extra space go? Without glue, the extra space goes to the right of the second component. If you put glue between the fixed-size components, then the extra space goes there. If you put glue before the first fixed-size component, the extra space goes there, and the fixed-size components are shoved against the right edge of the box. If you put glue before the first fixed-size component and after the second fixed-size component, the fixed-size components are centered in the box.

To use glue, call Box.createGlue and add the returned component to a container. The glue component has no minimum or preferred size, so it takes no space unless excess space is available. If excess space is available, then the glue component takes its share of available horizontal or vertical space, just like any other component that has no maximum width or height.

Returns:
the component

createHorizontalGlue

public static Component createHorizontalGlue()
Creates a horizontal glue component.
Returns:
the component

createVerticalGlue

public static Component createVerticalGlue()
Creates a vertical glue component.
Returns:
the component

setLayout

public void setLayout(LayoutManager l)
Throws an AWTError, since a Box can use only a BoxLayout.
Overrides:
setLayout in class Container
Parameters:
l - the layout manager to use

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Box. For boxes, the AccessibleContext takes the form of an AccessibleBox. A new AccessibleAWTBox instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleBox that serves as the AccessibleContext of this Box
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoxLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class BoxLayout

java.lang.Object
  |
  +--javax.swing.BoxLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
Direct Known Subclasses:
DefaultMenuLayout
public class BoxLayout
extends Object
implements LayoutManager2, Serializable

A layout manager that allows multiple components to be layed out either vertically or horizontally. The components will not wrap so, for example, a vertical arrangement of components will stay vertically arranged when the frame is resized.

Nesting multiple panels with different combinations of horizontal and vertical gives an effect similar to GridBagLayout, without the complexity. The diagram shows two panels arranged horizontally, each of which contains 3 components arranged vertically.

The Box container uses BoxLayout (unlike JPanel, which defaults to flow layout). You can nest multiple boxes and add components to them to get the arrangement you want.

The BoxLayout manager that places each of its managed components from left to right or from top to bottom. When you create a BoxLayout, you specify whether its major axis is the X axis (which means left to right placement) or Y axis (top to bottom placement). Components are arranged from left to right (or top to bottom), in the same order as they were added to the container.

Instead of using BoxLayout directly, many programs use the Box class. The Box class provides a lightweight container that uses a BoxLayout. Box also provides handy methods to help you use BoxLayout well.

BoxLayout attempts to arrange components at their preferred widths (for left to right layout) or heights (for top to bottom layout). For a left to right layout, if not all the components are the same height, BoxLayout attempts to make all the components as high as the highest component. If that's not possible for a particular component, then BoxLayout aligns that component vertically, according to the component's Y alignment. By default, a component has an Y alignment of 0.5, which means that the vertical center of the component should have the same Y coordinate as the vertical centers of other components with 0.5 Y alignment.

Similarly, for a vertical layout, BoxLayout attempts to make all components in the column as wide as the widest component; if that fails, it aligns them horizontally according to their X alignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Box, Component.getAlignmentX(), Component.getAlignmentY(), Serialized Form

Field Summary
static int | X_AXIS Specifies that components should be laid out left to right.
static int | Y_AXIS Specifies that components should be laid out top to bottom.
Constructor Summary
BoxLayout(Container target, int axis)
Creates a layout manager that will lay out components either left to right or top to bottom, as specified in the axis parameter.
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Not used by this class.
void | addLayoutComponent(String name, Component comp) Not used by this class.
float | getLayoutAlignmentX(Container target) Returns the alignment along the X axis for the container.
float | getLayoutAlignmentY(Container target) Returns the alignment along the Y axis for the container.
void | invalidateLayout(Container target) Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.
void | layoutContainer(Container target) Called by the AWT when the specified container needs to be laid out.
Dimension | maximumLayoutSize(Container target) Returns the maximum dimensions the target container can use to lay out the components it contains.
Dimension | minimumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | preferredLayoutSize(Container target) Returns the preferred dimensions for this layout, given the components in the specified target container.
void | removeLayoutComponent(Component comp) Not used by this class.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

X_AXIS

public static final int X_AXIS
Specifies that components should be laid out left to right.

Y_AXIS

public static final int Y_AXIS
Specifies that components should be laid out top to bottom.
Constructor Detail

BoxLayout

public BoxLayout(Container target,
                 int axis)
Creates a layout manager that will lay out components either left to right or top to bottom, as specified in the axis parameter.
Parameters:
target - the container that needs to be laid out
axis - the axis to lay out components along. For left-to-right layout, specify BoxLayout.X_AXIS; for top-to-bottom layout, specify BoxLayout.Y_AXIS
Throws:
AWTError - if the value of axis is invalid
Method Detail

invalidateLayout

public void invalidateLayout(Container target)
Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.
Specified by:
invalidateLayout in interface LayoutManager2
Parameters:
target - the affected container
Throws:
AWTError - if the target isn't the container specified to the BoxLayout constructor

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Not used by this class.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component
comp - the component

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Not used by this class.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Not used by this class.
Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component
constraints - constraints

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout, given the components in the specified target container.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the container that needs to be laid out
Returns:
the dimensions >= 0 && <= Integer.MAX_VALUEThrows:
AWTError - if the target isn't the container specified to the BoxLayout constructor
See Also:
Container, minimumLayoutSize(java.awt.Container), maximumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the container that needs to be laid out
Returns:
the dimensions >= 0 && <= Integer.MAX_VALUEThrows:
AWTError - if the target isn't the container specified to the BoxLayout constructor
See Also:
preferredLayoutSize(java.awt.Container), maximumLayoutSize(java.awt.Container)

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum dimensions the target container can use to lay out the components it contains.
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the container that needs to be laid out
Returns:
the dimenions >= 0 && <= Integer.MAX_VALUEThrows:
AWTError - if the target isn't the container specified to the BoxLayout constructor
See Also:
preferredLayoutSize(java.awt.Container), minimumLayoutSize(java.awt.Container)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Returns the alignment along the X axis for the container. If the box is horizontal, the default alignment will be returned. Otherwise, the alignment needed to place the children along the X axis will be returned.
Specified by:
getLayoutAlignmentX in interface LayoutManager2
Parameters:
target - the container
Returns:
the alignment >= 0.0f && <= 1.0fThrows:
AWTError - if the target isn't the container specified to the BoxLayout constructor

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Returns the alignment along the Y axis for the container. If the box is vertical, the default alignment will be returned. Otherwise, the alignment needed to place the children along the Y axis will be returned.
Specified by:
getLayoutAlignmentY in interface LayoutManager2
Parameters:
target - the container
Returns:
the alignment >= 0.0f && <= 1.0fThrows:
AWTError - if the target isn't the container specified to the BoxLayout constructor

layoutContainer

public void layoutContainer(Container target)
Called by the AWT when the specified container needs to be laid out.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
target - the container to lay out
Throws:
AWTError - if the target isn't the container specified to the BoxLayout constructor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class AbstractButton.ButtonChangeListener

java.lang.Object
  |
  +--javax.swing.AbstractButton.ButtonChangeListener
All Implemented Interfaces:
ChangeListener, EventListener, Serializable
Enclosing class:
AbstractButton
protected class AbstractButton.ButtonChangeListener
extends Object
implements ChangeListener, Serializable

Extends ChangeListener to be serializable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ButtonGroup

java.lang.Object
  |
  +--javax.swing.ButtonGroup
All Implemented Interfaces:
Serializable
public class ButtonGroup
extends Object
implements Serializable

This class is used to create a multiple-exclusion scope for a set of buttons. Creating a set of buttons with the same ButtonGroup object means that turning "on" one of those buttons turns off all other buttons in the group.

A ButtonGroup can be used with any set of objects that inherit from AbstractButton. Typically a button group contains instances of JRadioButton, JRadioButtonMenuItem, or JToggleButton. It wouldn't make sense to put an instance of JButton or JMenuItem in a button group because JButton and JMenuItem don't implement the selected state.

Initially, all buttons in the group are unselected. Once any button is selected, one button is always selected in the group. There is no way to turn a button programmatically to "off", in order to clear the button group. To give the appearance of "none selected", add an invisible radio button to the group and then programmatically select that button to turn off all the displayed radio buttons. For example, a normal button with the label "none" could be wired to select the invisible radio button.

For examples and further information on using button groups see How to Use Radio Buttons, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  Vector buttons
Constructor Summary
ButtonGroup()
Creates a new ButtonGroup.
Method Summary
void | add(AbstractButton b) Adds the button to the group.
int | getButtonCount() Returns the number of buttons in the group.
Enumeration | getElements() Return all the buttons that are participating in this group.
ButtonModel | getSelection() Return the selected button model.
boolean | isSelected(ButtonModel m) Returns the selected value for the button.
void | remove(AbstractButton b) Removes the button from the group.
void | setSelected(ButtonModel m, boolean b) Sets the selected value for the button.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buttons

protected Vector buttons
Constructor Detail

ButtonGroup

public ButtonGroup()
Creates a new ButtonGroup.
Method Detail

add

public void add(AbstractButton b)
Adds the button to the group.

remove

public void remove(AbstractButton b)
Removes the button from the group.

getElements

public Enumeration getElements()
Return all the buttons that are participating in this group.

getSelection

public ButtonModel getSelection()
Return the selected button model.

setSelected

public void setSelected(ButtonModel m,
                        boolean b)
Sets the selected value for the button.

isSelected

public boolean isSelected(ButtonModel m)
Returns the selected value for the button.

getButtonCount

public int getButtonCount()
Returns the number of buttons in the group.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ButtonModel

All Superinterfaces:
ItemSelectable
All Known Implementing Classes:
DefaultButtonModel
public interface ButtonModel
extends ItemSelectable

State Model for buttons. This model is used for check boxes and radio buttons, which are special kinds of buttons, as well as for normal buttons. For check boxes and radio buttons, pressing the mouse selects the button. For normal buttons, pressing the mouse "arms" the button. Releasing the mouse over the button then initiates a button press, firing its action event. Releasing the mouse elsewhere disarms the button.

In use, a UI will invoke setSelected(boolean) when a mouse click occurs over a check box or radio button. It will invoke setArmed(boolean) when the mouse is pressed over a regular button and invoke setPressed(boolean) when the mouse is released. If the mouse travels outside the button in the meantime, setArmed(false) will tell the button not to fire when it sees setPressed. (If the mouse travels back in, the button will be rearmed.)

Note:
A button is triggered when it is both "armed" and "pressed".

Method Summary
void | addActionListener(ActionListener l) Adds an ActionListener to the button.
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | addItemListener(ItemListener l) Adds an ItemListener to the button.
String | getActionCommand() Returns the action command for this button.
int | getMnemonic() Gets the keyboard mnemonic for this model
boolean | isArmed() Indicates partial commitment towards pressing the button.
boolean | isEnabled() Indicates if the button can be selected or pressed by an input device (such as a mouse pointer).
boolean | isPressed() Indicates if button has been pressed.
boolean | isRollover() Indicates that the mouse is over the button.
boolean | isSelected() Indicates if the button has been selected.
void | removeActionListener(ActionListener l) Removes an ActionListener from the button.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | removeItemListener(ItemListener l) Removes an ItemListener from the button.
void | setActionCommand(String s) Sets the actionCommand string that gets sent as part of the event when the button is pressed.
void | setArmed(boolean b) Marks the button as "armed".
void | setEnabled(boolean b) Enables or disables the button.
void | setGroup(ButtonGroup group) Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
void | setMnemonic(int key) Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
void | setPressed(boolean b) Sets the button to pressed or unpressed.
void | setRollover(boolean b) Sets or clears the button's rollover state
void | setSelected(boolean b) Selects or deselects the button.
Methods inherited from interface java.awt.ItemSelectable
getSelectedObjects

Method Detail

isArmed

public boolean isArmed()
Indicates partial commitment towards pressing the button.
Returns:
true if the button is armed, and ready to be pressed
See Also:
setArmed(boolean)

isSelected

public boolean isSelected()
Indicates if the button has been selected. Only needed for certain types of buttons - such as radio buttons and check boxes.
Returns:
true if the button is selected

isEnabled

public boolean isEnabled()
Indicates if the button can be selected or pressed by an input device (such as a mouse pointer). (Check boxes are selected, regular buttons are "pressed".)
Returns:
true if the button is enabled, and therefore selectable (or pressable)

isPressed

public boolean isPressed()
Indicates if button has been pressed.
Returns:
true if the button has been pressed

isRollover

public boolean isRollover()
Indicates that the mouse is over the button.
Returns:
true if the mouse is over the button

setArmed

public void setArmed(boolean b)
Marks the button as "armed". If the mouse button is released while it is over this item, the button's action event fires. If the mouse button is released elsewhere, the event does not fire and the button is disarmed.
Parameters:
b - true to arm the button so it can be selected

setSelected

public void setSelected(boolean b)
Selects or deselects the button.
Parameters:
b - true selects the button, false deselects the button.

setEnabled

public void setEnabled(boolean b)
Enables or disables the button.
Parameters:
b - true to enable the button
See Also:
isEnabled()

setPressed

public void setPressed(boolean b)
Sets the button to pressed or unpressed.
Parameters:
b - true to set the button to "pressed"
See Also:
isPressed()

setRollover

public void setRollover(boolean b)
Sets or clears the button's rollover state
Parameters:
b - true to turn on rollover
See Also:
isRollover()

setMnemonic

public void setMnemonic(int key)
Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
Parameters:
key - an int specifying the accelerator key

getMnemonic

public int getMnemonic()
Gets the keyboard mnemonic for this model
Returns:
an int specifying the accelerator key
See Also:
setMnemonic(int)

setActionCommand

public void setActionCommand(String s)
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
Parameters:
s - the String that identifies the generated event

getActionCommand

public String getActionCommand()
Returns the action command for this button.
Returns:
the String that identifies the generated event
See Also:
setActionCommand(java.lang.String)

setGroup

public void setGroup(ButtonGroup group)
Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
Parameters:
group - the ButtonGroup this button belongs to

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the button.
Parameters:
l - the listener to add

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the button.
Parameters:
l - the listener to remove

addItemListener

public void addItemListener(ItemListener l)
Adds an ItemListener to the button.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the listener to add

removeItemListener

public void removeItemListener(ItemListener l)
Removes an ItemListener from the button.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the listener to remove

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Parameters:
l - the listener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Parameters:
l - the listener to remove
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CellEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface CellEditor

All Known Subinterfaces:
TableCellEditor, TreeCellEditor
All Known Implementing Classes:
AbstractCellEditor
public interface CellEditor

This interface defines the methods any general editor should be able to implement.

Having this interface enables complex components (the client of the editor) such as JList, JTree, and JTable to allow any generic editor to edit values in a table cell, or tree cell, etc. Without this generic editor interface, JTable would have to know about specific editors, such as JTextField, JCheckBox, JComboBox, etc. In addition, without this interface, clients of editors such as JTable would not be able to work with any editors developed in the future by the user or a 3rd party ISV.

To use this interface, a developer creating a new editor can have the new component implement the interface. Or the developer can choose a wrapper based approch and provide a companion object which implements the CellEditor interface (See JCellEditor for example). The wrapper approch is particularly useful if the user want to use a 3rd party ISV editor with JTable, but the ISV didn't implement the CellEditor interface. The user can simply create an object that contains an instance of the 3rd party editor object and "translate" the CellEditor API into the 3rd party editor's API.

See Also:
CellEditorListener

Method Summary
void | addCellEditorListener(CellEditorListener l) Add a listener to the list that's notified when the editor starts, stops, or cancels editing.
void | cancelCellEditing() Tell the editor to cancel editing and not accept any partially edited value.
Object | getCellEditorValue() Returns the value contained in the editor
boolean | isCellEditable(EventObject anEvent) Ask the editor if it can start editing using anEvent.
void | removeCellEditorListener(CellEditorListener l) Remove a listener from the list that's notified
boolean | shouldSelectCell(EventObject anEvent) The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not.
boolean | stopCellEditing() Tell the editor to stop editing and accept any partially edited value as the value of the editor.

Method Detail

getCellEditorValue

public Object getCellEditorValue()
Returns the value contained in the editor

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Ask the editor if it can start editing using anEvent. anEvent is in the invoking component coordinate system. The editor can not assume the Component returned by getCellEditorComponent() is installed. This method is intended for the use of client to avoid the cost of setting up and installing the editor component if editing is not possible. If editing can be started this method returns true.
Parameters:
anEvent - the event the editor should use to consider whether to begin editing or not.
Returns:
true if editing can be started.
See Also:
shouldSelectCell(java.util.EventObject)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not. Typically, the return value is true, because is most cases the editing cell should be selected. However, it is useful to return false to keep the selection from changing for some types of edits. eg. A table that contains a column of check boxes, the user might want to be able to change those checkboxes without altering the selection. (See Netscape Communicator for just such an example) Of course, it is up to the client of the editor to use the return value, but it doesn't need to if it doesn't want to.
Parameters:
anEvent - the event the editor should use to start editing.
Returns:
true if the editor would like the editing cell to be selected
See Also:
isCellEditable(java.util.EventObject)

stopCellEditing

public boolean stopCellEditing()
Tell the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped, useful for editors which validates and can not accept invalid entries.
Returns:
true if editing was stopped

cancelCellEditing

public void cancelCellEditing()
Tell the editor to cancel editing and not accept any partially edited value.

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Add a listener to the list that's notified when the editor starts, stops, or cancels editing.
Parameters:
l - the CellEditorListener

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Remove a listener from the list that's notified
Parameters:
l - the CellEditorListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CellRendererPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class CellRendererPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.CellRendererPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class CellRendererPane
extends Container
implements Accessible

This class is inserted in between cell renderers and the components that use them. It just exists to thwart the repaint() and invalidate() methods which would otherwise propogate up the tree when the renderer was configured. It's used by the implementations of JTable, JTree, and JList. For example, here's how CellRendererPane is used in the code the paints each row in a JList:

   cellRendererPane = new CellRendererPane();
   ...
   Component rendererComponent = renderer.getListCellRendererComponent();
   renderer.configureListCellRenderer(dataModel.getElementAt(row), row);
   cellRendererPane.paintComponent(g, rendererComponent, this, x, y, w, h);

A renderer component must override isShowing() and unconditionally return true to work correctly because the Swing paint does nothing for components with isShowing false.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class CellRendererPane.AccessibleCellRendererPane
This class implements accessibility support for the CellRendererPane class.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  AccessibleContext accessibleContext
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
CellRendererPane()
Construct a CellRendererPane object.
Method Summary
protected  void addImpl(Component x, Object constraints, int index)
If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).<
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this CellRendererPane.
 void invalidate()
Overridden to avoid propogating a invalidate up the tree when the cell renderer child is configured.
 void paint(Graphics g)
Shouldn't be called.
 void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Calls this.paintComponent(g, c, p, x, y, w, h, false).
 void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
Paint a cell renderer component c on graphics object g.
 void paintComponent(Graphics g, Component c, Container p, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.
 void update(Graphics g)
Shouldn't be called.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

accessibleContext

protected AccessibleContext accessibleContext
Constructor Detail

CellRendererPane

public CellRendererPane()
Construct a CellRendererPane object.
Method Detail

invalidate

public void invalidate()
Overridden to avoid propogating a invalidate up the tree when the cell renderer child is configured.
Overrides:
invalidate in class Container
Following copied from class: java.awt.Container
See Also:
Container.validate(), Container.layout(), LayoutManager

paint

public void paint(Graphics g)
Shouldn't be called.
Overrides:
paint in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

update

public void update(Graphics g)
Shouldn't be called.
Overrides:
update in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

addImpl

protected void addImpl(Component x,
                       Object constraints,
                       int index)
If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).<
Overrides:
addImpl in class Container
Following copied from class: java.awt.Container
Parameters:
comp - the component to be added.
constraints - an object expressing layout contraints for this component.
index - the position in the container's list at which to insert the component, where -1 means insert at the end.
See Also:
Container.add(java.awt.Component),
Container.add(java.awt.Component, int),
Container.add(java.awt.Component, java.lang.Object),
LayoutManager

paintComponent

public void paintComponent(Graphics g,
                           Component c,
                           Container p,
                           int x,
                           int y,
                           int w,
                           int h,
                           boolean shouldValidate)
Paint a cell renderer component c on graphics object g. Before the component is drawn it's reparented to this (if that's neccessary), it's bounds are set to w,h and the graphics object is (effectively) translated to x,y. If it's a JComponent, double buffering is temporarily turned off. After the component is painted it's bounds are reset to -w, -h, 0, 0 so that, if it's the last renderer component painted, it will not start consuming input. The Container p is the component we're actually drawing on, typically it's equal to this.getParent(). If shouldValidate is true the component c will be validated before painted.

paintComponent

public void paintComponent(Graphics g,
                           Component c,
                           Container p,
                           int x,
                           int y,
                           int w,
                           int h)
Calls this.paintComponent(g, c, p, x, y, w, h, false).

paintComponent

public void paintComponent(Graphics g,
                           Component c,
                           Container p,
                           Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this CellRendererPane. For CellRendererPanes, the AccessibleContext takes the form of an AccessibleCellRendererPane. A new AccessibleCellRendererPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleCellRendererPane that serves as the AccessibleContext of this CellRendererPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.AbstractButton.ButtonChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractButton.ButtonChangeListener

No usage of javax.swing.AbstractButton.ButtonChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.BorderFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.BorderFactory

No usage of javax.swing.BorderFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.Box.AccessibleBox

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.Box.AccessibleBox

No usage of javax.swing.Box.AccessibleBox

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.Box.Filler.AccessibleBoxFiller

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.Box.Filler.AccessibleBoxFiller

No usage of javax.swing.Box.Filler.AccessibleBoxFiller

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.CellRendererPane.AccessibleCellRendererPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.CellRendererPane.AccessibleCellRendererPane

No usage of javax.swing.CellRendererPane.AccessibleCellRendererPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DebugGraphics

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DebugGraphics

No usage of javax.swing.DebugGraphics

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultBoundedRangeModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultBoundedRangeModel

No usage of javax.swing.DefaultBoundedRangeModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultComboBoxModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultComboBoxModel

No usage of javax.swing.DefaultComboBoxModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultDesktopManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultDesktopManager

No usage of javax.swing.DefaultDesktopManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultFocusManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultFocusManager

No usage of javax.swing.DefaultFocusManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultListCellRenderer.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultListCellRenderer.UIResource

No usage of javax.swing.DefaultListCellRenderer.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultListModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultListModel

No usage of javax.swing.DefaultListModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultSingleSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultSingleSelectionModel

No usage of javax.swing.DefaultSingleSelectionModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.GrayFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.GrayFilter

No usage of javax.swing.GrayFilter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ImageIcon.AccessibleImageIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ImageIcon.AccessibleImageIcon

No usage of javax.swing.ImageIcon.AccessibleImageIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JApplet.AccessibleJApplet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JApplet.AccessibleJApplet

No usage of javax.swing.JApplet.AccessibleJApplet

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JButton.AccessibleJButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JButton.AccessibleJButton

No usage of javax.swing.JButton.AccessibleJButton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JCheckBox.AccessibleJCheckBox

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JCheckBox.AccessibleJCheckBox

No usage of javax.swing.JCheckBox.AccessibleJCheckBox

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem

No usage of javax.swing.JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JColorChooser.AccessibleJColorChooser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JColorChooser.AccessibleJColorChooser

No usage of javax.swing.JColorChooser.AccessibleJColorChooser

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComboBox.AccessibleJComboBox

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComboBox.AccessibleJComboBox

No usage of javax.swing.JComboBox.AccessibleJComboBox

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler

No usage of javax.swing.JComponent.AccessibleJComponent.AccessibleContainerHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler

No usage of javax.swing.JComponent.AccessibleJComponent.AccessibleFocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JDesktopPane.AccessibleJDesktopPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JDesktopPane.AccessibleJDesktopPane

No usage of javax.swing.JDesktopPane.AccessibleJDesktopPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JDialog.AccessibleJDialog

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JDialog.AccessibleJDialog

No usage of javax.swing.JDialog.AccessibleJDialog

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JEditorPane.AccessibleJEditorPaneHTML

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JEditorPane.AccessibleJEditorPaneHTML

No usage of javax.swing.JEditorPane.AccessibleJEditorPaneHTML

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

No usage of javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JFileChooser.AccessibleJFileChooser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JFileChooser.AccessibleJFileChooser

No usage of javax.swing.JFileChooser.AccessibleJFileChooser

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JFrame.AccessibleJFrame

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JFrame.AccessibleJFrame

No usage of javax.swing.JFrame.AccessibleJFrame

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JInternalFrame.AccessibleJInternalFrame

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JInternalFrame.AccessibleJInternalFrame

No usage of javax.swing.JInternalFrame.AccessibleJInternalFrame

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon

No usage of javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JLabel.AccessibleJLabel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JLabel.AccessibleJLabel

No usage of javax.swing.JLabel.AccessibleJLabel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JLayeredPane.AccessibleJLayeredPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JLayeredPane.AccessibleJLayeredPane

No usage of javax.swing.JLayeredPane.AccessibleJLayeredPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JList.AccessibleJList.AccessibleJListChild

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JList.AccessibleJList.AccessibleJListChild

No usage of javax.swing.JList.AccessibleJList.AccessibleJListChild

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenu.AccessibleJMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenu.AccessibleJMenu

No usage of javax.swing.JMenu.AccessibleJMenu

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenuBar.AccessibleJMenuBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenuBar.AccessibleJMenuBar

No usage of javax.swing.JMenuBar.AccessibleJMenuBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JOptionPane.AccessibleJOptionPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JOptionPane.AccessibleJOptionPane

No usage of javax.swing.JOptionPane.AccessibleJOptionPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPanel.AccessibleJPanel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPanel.AccessibleJPanel

No usage of javax.swing.JPanel.AccessibleJPanel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPasswordField.AccessibleJPasswordField

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPasswordField.AccessibleJPasswordField

No usage of javax.swing.JPasswordField.AccessibleJPasswordField

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPopupMenu.AccessibleJPopupMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPopupMenu.AccessibleJPopupMenu

No usage of javax.swing.JPopupMenu.AccessibleJPopupMenu

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPopupMenu.Separator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPopupMenu.Separator

No usage of javax.swing.JPopupMenu.Separator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JProgressBar.AccessibleJProgressBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JProgressBar.AccessibleJProgressBar

No usage of javax.swing.JProgressBar.AccessibleJProgressBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRadioButton.AccessibleJRadioButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRadioButton.AccessibleJRadioButton

No usage of javax.swing.JRadioButton.AccessibleJRadioButton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem

No usage of javax.swing.JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRootPane.AccessibleJRootPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRootPane.AccessibleJRootPane

No usage of javax.swing.JRootPane.AccessibleJRootPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRootPane.RootLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRootPane.RootLayout

No usage of javax.swing.JRootPane.RootLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JScrollBar.AccessibleJScrollBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JScrollBar.AccessibleJScrollBar

No usage of javax.swing.JScrollBar.AccessibleJScrollBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JScrollPane.AccessibleJScrollPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JScrollPane.AccessibleJScrollPane

No usage of javax.swing.JScrollPane.AccessibleJScrollPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JScrollPane.ScrollBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JScrollPane.ScrollBar

No usage of javax.swing.JScrollPane.ScrollBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSeparator.AccessibleJSeparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSeparator.AccessibleJSeparator

No usage of javax.swing.JSeparator.AccessibleJSeparator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSlider.AccessibleJSlider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSlider.AccessibleJSlider

No usage of javax.swing.JSlider.AccessibleJSlider

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSplitPane.AccessibleJSplitPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSplitPane.AccessibleJSplitPane

No usage of javax.swing.JSplitPane.AccessibleJSplitPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTabbedPane.AccessibleJTabbedPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTabbedPane.AccessibleJTabbedPane

No usage of javax.swing.JTabbedPane.AccessibleJTabbedPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTabbedPane.ModelListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTabbedPane.ModelListener

No usage of javax.swing.JTabbedPane.ModelListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTable.AccessibleJTable.AccessibleJTableCell

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTable.AccessibleJTable.AccessibleJTableCell

No usage of javax.swing.JTable.AccessibleJTable.AccessibleJTableCell

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

No usage of javax.swing.JTable.AccessibleJTable.AccessibleJTableModelChange

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTextArea.AccessibleJTextArea

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTextArea.AccessibleJTextArea

No usage of javax.swing.JTextArea.AccessibleJTextArea

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTextPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTextPane

No usage of javax.swing.JTextPane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToggleButton.ToggleButtonModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToggleButton.ToggleButtonModel

No usage of javax.swing.JToggleButton.ToggleButtonModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToolBar.AccessibleJToolBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToolBar.AccessibleJToolBar

No usage of javax.swing.JToolBar.AccessibleJToolBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToolBar.Separator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToolBar.Separator

No usage of javax.swing.JToolBar.Separator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToolTip.AccessibleJToolTip

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToolTip.AccessibleJToolTip

No usage of javax.swing.JToolTip.AccessibleJToolTip

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

No usage of javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.DynamicUtilTreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.DynamicUtilTreeNode

No usage of javax.swing.JTree.DynamicUtilTreeNode

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.TreeModelHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.TreeModelHandler

No usage of javax.swing.JTree.TreeModelHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JViewport.AccessibleJViewport

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JViewport.AccessibleJViewport

No usage of javax.swing.JViewport.AccessibleJViewport

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JWindow.AccessibleJWindow

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JWindow.AccessibleJWindow

No usage of javax.swing.JWindow.AccessibleJWindow

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.OverlayLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.OverlayLayout

No usage of javax.swing.OverlayLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ProgressMonitorInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ProgressMonitorInputStream

No usage of javax.swing.ProgressMonitorInputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ScrollPaneLayout.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ScrollPaneLayout.UIResource

No usage of javax.swing.ScrollPaneLayout.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.SizeSequence

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.SizeSequence

No usage of javax.swing.SizeSequence

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.SwingUtilities

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.SwingUtilities

No usage of javax.swing.SwingUtilities

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ToolTipManager.insideTimerAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ToolTipManager.insideTimerAction

No usage of javax.swing.ToolTipManager.insideTimerAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ToolTipManager.outsideTimerAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ToolTipManager.outsideTimerAction

No usage of javax.swing.ToolTipManager.outsideTimerAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ToolTipManager.stillInsideTimerAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ToolTipManager.stillInsideTimerAction

No usage of javax.swing.ToolTipManager.stillInsideTimerAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UIDefaults.LazyInputMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UIDefaults.LazyInputMap

No usage of javax.swing.UIDefaults.LazyInputMap

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UIDefaults.ProxyLazyValue

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UIDefaults.ProxyLazyValue

No usage of javax.swing.UIDefaults.ProxyLazyValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UIManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UIManager

No usage of javax.swing.UIManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ViewportLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ViewportLayout

No usage of javax.swing.ViewportLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.Renderer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.Renderer

No usage of javax.swing.Renderer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.UIDefaults.ActiveValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.UIDefaults.ActiveValue

No usage of javax.swing.UIDefaults.ActiveValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.AbstractAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractAction

Packages that use AbstractAction
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractAction in javax.swing.plaf.basic

Subclasses of AbstractAction in javax.swing.plaf.basic
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.

Uses of AbstractAction in javax.swing.plaf.metal

Subclasses of AbstractAction in javax.swing.plaf.metal
protected  class MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item.

Uses of AbstractAction in javax.swing.text

Subclasses of AbstractAction in javax.swing.text
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Uses of AbstractAction in javax.swing.text.html

Subclasses of AbstractAction in javax.swing.text.html
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.AbstractButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractButton

Packages that use AbstractButton
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of AbstractButton in javax.swing

Subclasses of AbstractButton in javax.swing
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuItem An implementation of an item in a menu.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JToggleButton An implementation of a two-state button.

Methods in javax.swing with parameters of type AbstractButton
void | ButtonGroup.add(AbstractButton b) Adds the button to the group.
void | ButtonGroup.remove(AbstractButton b) Removes the button from the group.

Constructors in javax.swing with parameters of type AbstractButton
AbstractButton.AccessibleAbstractButton()

Uses of AbstractButton in javax.swing.plaf.basic

Subclasses of AbstractButton in javax.swing.plaf.basic
 class BasicArrowButton
JButton object that draws a scaled Arrow in one of the cardinal directions.

Methods in javax.swing.plaf.basic with parameters of type AbstractButton
protected void | BasicButtonUI.installDefaults(AbstractButton b)
protected void | BasicButtonUI.installListeners(AbstractButton b)
protected void | BasicButtonUI.installKeyboardActions(AbstractButton b)
protected void | BasicButtonUI.uninstallKeyboardActions(AbstractButton b)
protected void | BasicButtonUI.uninstallListeners(AbstractButton b)
protected void | BasicButtonUI.uninstallDefaults(AbstractButton b)
protected BasicButtonListener | BasicButtonUI.createButtonListener(AbstractButton b)
int | BasicButtonUI.getDefaultTextIconGap(AbstractButton b)
protected void | BasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | BasicButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | BasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
protected void | BasicToggleButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
protected void | BasicToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | BasicToggleButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | BasicRadioButtonUI.installDefaults(AbstractButton b)
protected void | BasicRadioButtonUI.uninstallDefaults(AbstractButton b)
static Dimension | BasicGraphicsUtils.getPreferredButtonSize(AbstractButton b, int textIconGap)
protected void | BasicButtonListener.checkOpacity(AbstractButton b)

Constructors in javax.swing.plaf.basic with parameters of type AbstractButton
BasicButtonListener(AbstractButton b)

Uses of AbstractButton in javax.swing.plaf.metal

Subclasses of AbstractButton in javax.swing.plaf.metal
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Methods in javax.swing.plaf.metal with parameters of type AbstractButton
void | MetalToggleButtonUI.installDefaults(AbstractButton b)
protected void | MetalToggleButtonUI.uninstallDefaults(AbstractButton b)
protected void | MetalToggleButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | MetalToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
void | MetalRadioButtonUI.installDefaults(AbstractButton b)
protected void | MetalRadioButtonUI.uninstallDefaults(AbstractButton b)
void | MetalButtonUI.installDefaults(AbstractButton b)
void | MetalButtonUI.uninstallDefaults(AbstractButton b)
protected BasicButtonListener | MetalButtonUI.createButtonListener(AbstractButton b)
protected void | MetalButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
protected void | MetalButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
void | MetalCheckBoxUI.installDefaults(AbstractButton b)
protected void | MetalCheckBoxUI.uninstallDefaults(AbstractButton b)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.AbstractButton.AccessibleAbstractButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractButton.AccessibleAbstractButton

Packages that use AbstractButton.AccessibleAbstractButton
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AbstractButton.AccessibleAbstractButton in javax.swing

Subclasses of AbstractButton.AccessibleAbstractButton in javax.swing
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.AbstractCellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractCellEditor

Packages that use AbstractCellEditor
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AbstractCellEditor in javax.swing

Subclasses of AbstractCellEditor in javax.swing
 class DefaultCellEditor
The default editor for table and tree cells.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.AbstractListModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.AbstractListModel

Packages that use AbstractListModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of AbstractListModel in javax.swing

Subclasses of AbstractListModel in javax.swing
class | DefaultComboBoxModel The default model for combo boxes.
class | DefaultListModel This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.

Uses of AbstractListModel in javax.swing.plaf.basic

Subclasses of AbstractListModel in javax.swing.plaf.basic
 class BasicDirectoryModel
Basic implementation of a file list.

Uses of AbstractListModel in javax.swing.plaf.metal

Subclasses of AbstractListModel in javax.swing.plaf.metal
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ActionMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ActionMap

Packages that use ActionMap
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ActionMap in javax.swing

Methods in javax.swing that return ActionMap
ActionMap | JComponent.getActionMap() Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.
static ActionMap | SwingUtilities.getUIActionMap(JComponent component) Returns the ActionMap provided by the UI in component component.
ActionMap | ActionMap.getParent() Returns this ActionMap's parent.

Methods in javax.swing with parameters of type ActionMap
void | JComponent.setActionMap(ActionMap am) Sets the ActionMap to am.
static void | SwingUtilities.replaceUIActionMap(JComponent component, ActionMap uiActionMap) Convenience method to change the UI ActionMap for component to uiActionMap.
void | ActionMap.setParent(ActionMap map) Sets this ActionMap's parent.

Uses of ActionMap in javax.swing.plaf

Subclasses of ActionMap in javax.swing.plaf
 class ActionMapUIResource
A subclass of javax.swing.ActionMap that implements UIResource.

Uses of ActionMap in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return ActionMap
protected ActionMap | MetalFileChooserUI.getActionMap()
protected ActionMap | MetalFileChooserUI.createActionMap()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.Box

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.Box

Packages that use Box
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Box in javax.swing

Methods in javax.swing that return Box
static Box | Box.createHorizontalBox() Creates a Box that displays its components from left to right.
static Box | Box.createVerticalBox() Creates a Box that displays its components from top to bottom.

Constructors in javax.swing with parameters of type Box
Box.AccessibleBox()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.Box.Filler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.Box.Filler

Packages that use Box.Filler
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of Box.Filler in javax.swing

Constructors in javax.swing with parameters of type Box.Filler
Box.Filler.AccessibleBoxFiller()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.BoxLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.BoxLayout

Packages that use BoxLayout
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BoxLayout in javax.swing.plaf.basic

Subclasses of BoxLayout in javax.swing.plaf.basic
 class DefaultMenuLayout
The default layout manager for Popup menus and menubars.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ButtonGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ButtonGroup

Packages that use ButtonGroup
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ButtonGroup in javax.swing

Fields in javax.swing declared as ButtonGroup
protected  ButtonGroup DefaultButtonModel.group

Methods in javax.swing that return ButtonGroup
 ButtonGroup DefaultButtonModel.getGroup()
Returns the group that this button belongs to.

Methods in javax.swing with parameters of type ButtonGroup
void | ButtonModel.setGroup(ButtonGroup group) Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
void | DefaultButtonModel.setGroup(ButtonGroup group) Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.CellRendererPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.CellRendererPane

Packages that use CellRendererPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of CellRendererPane in javax.swing

Constructors in javax.swing with parameters of type CellRendererPane
CellRendererPane.AccessibleCellRendererPane()

Uses of CellRendererPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as CellRendererPane
protected CellRendererPane | BasicTableUI.rendererPane
protected CellRendererPane | BasicListUI.rendererPane
protected CellRendererPane | BasicComboBoxUI.currentValuePane
protected CellRendererPane | BasicTableHeaderUI.rendererPane
protected CellRendererPane | BasicTreeUI.rendererPane Used to paint the TreeCellRenderer.

Methods in javax.swing.plaf.basic that return CellRendererPane
protected  CellRendererPane BasicTreeUI.createCellRendererPane()
Returns the renderer pane that renderer components are placed in.

Uses of CellRendererPane in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as CellRendererPane
protected  CellRendererPane MetalComboBoxButton.rendererPane

Constructors in javax.swing.plaf.metal with parameters of type CellRendererPane
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ComponentInputMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ComponentInputMap

Packages that use ComponentInputMap
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of ComponentInputMap in javax.swing

Methods in javax.swing that return ComponentInputMap
static ComponentInputMap LookAndFeel.makeComponentInputMap(JComponent c, Object[] keys)
Creates a ComponentInputMap from keys.

Uses of ComponentInputMap in javax.swing.plaf

Subclasses of ComponentInputMap in javax.swing.plaf
 class ComponentInputMapUIResource
A subclass of javax.swing.ComponentInputMap that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultButtonModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultButtonModel

Packages that use DefaultButtonModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of DefaultButtonModel in javax.swing

Subclasses of DefaultButtonModel in javax.swing
static class JToggleButton.ToggleButtonModel
The ToggleButton model

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultCellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultCellEditor

Packages that use DefaultCellEditor
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of DefaultCellEditor in javax.swing

Constructors in javax.swing with parameters of type DefaultCellEditor
DefaultCellEditor.EditorDelegate()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultCellEditor.EditorDelegate

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultCellEditor.EditorDelegate

Packages that use DefaultCellEditor.EditorDelegate
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of DefaultCellEditor.EditorDelegate in javax.swing

Fields in javax.swing declared as DefaultCellEditor.EditorDelegate
protected  DefaultCellEditor.EditorDelegate DefaultCellEditor.delegate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultListCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultListCellRenderer

Packages that use DefaultListCellRenderer
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of DefaultListCellRenderer in javax.swing

Subclasses of DefaultListCellRenderer in javax.swing
static class DefaultListCellRenderer.UIResource
A subclass of DefaultListCellRenderer that implements UIResource.

Uses of DefaultListCellRenderer in javax.swing.plaf.metal

Subclasses of DefaultListCellRenderer in javax.swing.plaf.metal
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.DefaultListSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.DefaultListSelectionModel

Packages that use DefaultListSelectionModel
javax.swing.tree Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of DefaultListSelectionModel in javax.swing.tree

Fields in javax.swing.tree declared as DefaultListSelectionModel
protected  DefaultListSelectionModel DefaultTreeSelectionModel.listSelectionModel
Handles maintaining the list selection model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.FocusManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.FocusManager

Packages that use FocusManager
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of FocusManager in javax.swing

Subclasses of FocusManager in javax.swing
 class DefaultFocusManager
Default swing focus manager implementation.

Methods in javax.swing that return FocusManager
static FocusManager FocusManager.getCurrentManager()
Return the FocusManager for the calling thread There is one FocusManager per thread group

Methods in javax.swing with parameters of type FocusManager
static void FocusManager.setCurrentManager(FocusManager aFocusManager)
Set the FocusManager that should be used for the calling thread.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ImageIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ImageIcon

Packages that use ImageIcon
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ImageIcon in javax.swing

Constructors in javax.swing with parameters of type ImageIcon
ImageIcon.AccessibleImageIcon()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.InputMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.InputMap

Packages that use InputMap
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Uses of InputMap in javax.swing

Subclasses of InputMap in javax.swing
 class ComponentInputMap
A ComponentInputMap is an InputMap associated with a particular JComponent.

Methods in javax.swing that return InputMap
InputMap | JComponent.getInputMap(int condition) Returns the InputMap that is used during condition.
InputMap | JComponent.getInputMap() Returns the InputMap that is used when the receiver has focus.
InputMap | InputMap.getParent() Gets this InputMap's parent.
static InputMap | LookAndFeel.makeInputMap(Object[] keys) Creates a InputMap from keys.
static InputMap | SwingUtilities.getUIInputMap(JComponent component, int condition) Returns the InputMap provided by the UI for condition condition in component component.

Methods in javax.swing with parameters of type InputMap
void | JComponent.setInputMap(int condition, InputMap map) Sets the InputMap to use under the condition condition to map.
void | InputMap.setParent(InputMap map) Sets this InputMap's parent.
void | ComponentInputMap.setParent(InputMap map) Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
static void | LookAndFeel.loadKeyBindings(InputMap retMap, Object[] keys) Loads the bindings in keys into retMap.
static void | SwingUtilities.replaceUIInputMap(JComponent component, int type, InputMap uiInputMap) Convenience method to change the UI InputMap for component to uiInputMap.

Uses of InputMap in javax.swing.plaf

Subclasses of InputMap in javax.swing.plaf
class | ComponentInputMapUIResource A subclass of javax.swing.ComponentInputMap that implements UIResource.
class | InputMapUIResource A subclass of javax.swing.InputMap that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.InputVerifier

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.InputVerifier

Packages that use InputVerifier
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of InputVerifier in javax.swing

Methods in javax.swing that return InputVerifier
 InputVerifier JComponent.getInputVerifier()
Returns the input verifier for this component.

Methods in javax.swing with parameters of type InputVerifier
 void JComponent.setInputVerifier(InputVerifier inputVerifier)
Sets the input verifier for this component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JApplet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JApplet

Packages that use JApplet
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JApplet in javax.swing

Constructors in javax.swing with parameters of type JApplet
JApplet.AccessibleJApplet()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JButton

Packages that use JButton
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JButton in javax.swing

Fields in javax.swing declared as JButton
protected  JButton JRootPane.defaultButton
The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs.

Methods in javax.swing that return JButton
JButton | JToolBar.add(Action a) Adds a new JButton which dispatches the action.
protected JButton | JToolBar.createActionComponent(Action a) Factory method which creates the JButton for Actions added to the JToolBar.
JButton | JRootPane.getDefaultButton() Returns the current default button for this JRootPane.

Methods in javax.swing with parameters of type JButton
protected PropertyChangeListener | JToolBar.createActionChangeListener(JButton b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.
void | JRootPane.setDefaultButton(JButton defaultButton) Sets the current default button for this JRootPane.

Constructors in javax.swing with parameters of type JButton
JButton.AccessibleJButton()

Uses of JButton in javax.swing.plaf.basic

Subclasses of JButton in javax.swing.plaf.basic
 class BasicArrowButton
JButton object that draws a scaled Arrow in one of the cardinal directions.

Fields in javax.swing.plaf.basic declared as JButton
protected JButton | BasicInternalFrameTitlePane.iconButton
protected JButton | BasicInternalFrameTitlePane.maxButton
protected JButton | BasicInternalFrameTitlePane.closeButton
protected JButton | BasicScrollBarUI.incrButton
protected JButton | BasicScrollBarUI.decrButton
protected JButton | BasicComboBoxUI.arrowButton
protected JButton | BasicSplitPaneDivider.leftButton Button for quickly toggling the left component.
protected JButton | BasicSplitPaneDivider.rightButton Button for quickly toggling the right component.

Methods in javax.swing.plaf.basic that return JButton
protected JButton | BasicScrollBarUI.createDecreaseButton(int orientation)
protected JButton | BasicScrollBarUI.createIncreaseButton(int orientation)
protected JButton | BasicFileChooserUI.getApproveButton(JFileChooser fc)
protected JButton | BasicComboBoxUI.createArrowButton() Creates the arrow button.
protected JButton | BasicSplitPaneDivider.createLeftOneTouchButton() Creates and return an instance of JButton that can be used to collapse the left component in the split pane.
protected JButton | BasicSplitPaneDivider.createRightOneTouchButton() Creates and return an instance of JButton that can be used to collapse the right component in the split pane.

Uses of JButton in javax.swing.plaf.metal

Subclasses of JButton in javax.swing.plaf.metal
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Methods in javax.swing.plaf.metal that return JButton
protected JButton | MetalFileChooserUI.getApproveButton(JFileChooser fc)
protected JButton | MetalComboBoxUI.createArrowButton()
protected JButton | MetalScrollBarUI.createDecreaseButton(int orientation) Returns the view that represents the decrease view.
protected JButton | MetalScrollBarUI.createIncreaseButton(int orientation) Returns the view that represents the increase view.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JCheckBox

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JCheckBox

Packages that use JCheckBox
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JCheckBox in javax.swing

Constructors in javax.swing with parameters of type JCheckBox
JCheckBox.AccessibleJCheckBox()
DefaultCellEditor(JCheckBox checkBox)
Constructs a DefaultCellEditor object that uses a check box.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JCheckBoxMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JCheckBoxMenuItem

Packages that use JCheckBoxMenuItem
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JCheckBoxMenuItem in javax.swing

Constructors in javax.swing with parameters of type JCheckBoxMenuItem
JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JColorChooser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JColorChooser

Packages that use JColorChooser
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.

Uses of JColorChooser in javax.swing

Methods in javax.swing with parameters of type JColorChooser
static JDialog JColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.

Constructors in javax.swing with parameters of type JColorChooser
JColorChooser.AccessibleJColorChooser()

Uses of JColorChooser in javax.swing.colorchooser

Methods in javax.swing.colorchooser with parameters of type JColorChooser
void | AbstractColorChooserPanel.installChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is added to the chooser.
void | AbstractColorChooserPanel.uninstallChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is removed from the chooser.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComboBox

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComboBox

Packages that use JComboBox
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JComboBox in javax.swing

Constructors in javax.swing with parameters of type JComboBox
DefaultCellEditor(JComboBox comboBox)
Constructs a DefaultCellEditor object that uses a combo box.
JComboBox.AccessibleJComboBox()

Uses of JComboBox in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JComboBox
abstract void | ComboBoxUI.setPopupVisible(JComboBox c, boolean v) Set the visiblity of the popup
abstract boolean | ComboBoxUI.isPopupVisible(JComboBox c) Determine the visibility of the popup
abstract boolean | ComboBoxUI.isFocusTraversable(JComboBox c) Determine whether or not the combo box itself is traversable

Uses of JComboBox in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JComboBox
protected JComboBox | BasicComboPopup.comboBox
protected JComboBox | BasicComboBoxUI.comboBox

Methods in javax.swing.plaf.basic with parameters of type JComboBox
boolean | BasicComboBoxUI.isPopupVisible(JComboBox c) Tells if the popup is visible or not.
void | BasicComboBoxUI.setPopupVisible(JComboBox c, boolean v) Hides the popup.
boolean | BasicComboBoxUI.isFocusTraversable(JComboBox c) Determines if the JComboBox is focus traversable.

Constructors in javax.swing.plaf.basic with parameters of type JComboBox
BasicComboPopup(JComboBox combo)

Uses of JComboBox in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as JComboBox
protected  JComboBox MetalComboBoxButton.comboBox

Methods in javax.swing.plaf.metal that return JComboBox
 JComboBox MetalComboBoxButton.getComboBox()

Methods in javax.swing.plaf.metal with parameters of type JComboBox
void | MetalComboBoxButton.setComboBox(JComboBox cb)
boolean | MetalComboBoxUI.isFocusTraversable(JComboBox c)

Constructors in javax.swing.plaf.metal with parameters of type JComboBox
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)
MetalComboBoxUI.MetalComboPopup(JComboBox cBox)

Uses of JComboBox in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JComboBox
void | MultiComboBoxUI.setPopupVisible(JComboBox a, boolean b) Call setPopupVisible on each UI handled by this MultiUI.
boolean | MultiComboBoxUI.isPopupVisible(JComboBox a) Call isPopupVisible on each UI handled by this MultiUI.
boolean | MultiComboBoxUI.isFocusTraversable(JComboBox a) Call isFocusTraversable on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComponent

Packages that use JComponent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of JComponent in javax.swing

Subclasses of JComponent in javax.swing
class | AbstractButton Defines common behaviors for buttons and menu items.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
class | JComboBox A component that combines a button or text field and a drop-down list.
class | JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
class | JEditorPane A text component to edit various kinds of content.
class | JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
class | JLabel A display area for a short text string or an image, or both.
class | JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
class | JList A component that allows the user to select one or more objects from a list.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
class | JPanel JPanel is a generic lightweight container.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
class | JScrollBar An implementation of a scrollbar.
class | JScrollPane Provides a scrollable view of a component.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JSplitPane JSplitPane is used to divide two (and only two) Components.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | JToolTip Used to display a "Tip" for a Component.
class | JTree A control that displays a set of hierarchical data as an outline.
class | JViewport The "viewport" or "porthole" through which you see the underlying information.

Fields in javax.swing declared as JComponent
protected  JComponent DefaultCellEditor.editorComponent

Methods in javax.swing that return JComponent
JComponent | ComponentInputMap.getComponent() Returns the component the InputMap was created for.
JComponent | JColorChooser.getPreviewPanel() Returns the preview panel that shows a chosen color.
JComponent | JToolTip.getComponent() Returns the component the tooltip applies to.
JComponent | JFileChooser.getAccessory() Returns the accessory component.

Methods in javax.swing with parameters of type JComponent
 void ToolTipManager.registerComponent(JComponent component)
Register a component for tooltip management.
 void ToolTipManager.unregisterComponent(JComponent component)
Remove a component from tooltip control.
static void JLayeredPane.putLayer(JComponent c, int layer)
Sets the layer property on a JComponent.
static int JLayeredPane.getLayer(JComponent c)
Gets the layer property for a JComponent, it does not cause any side effects like setLayer().
static RepaintManager RepaintManager.currentManager(JComponent c)
Return the RepaintManager for the calling thread given a JComponent.
 void RepaintManager.addInvalidComponent(JComponent invalidComponent)
Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
 void RepaintManager.removeInvalidComponent(JComponent component)
Remove a component from the list of invalid components.
 void RepaintManager.addDirtyRegion(JComponent c, int x, int y, int w, int h)
Add a component in the list of components that should be refreshed.
 Rectangle RepaintManager.getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component.
 void RepaintManager.markCompletelyDirty(JComponent aComponent)
Mark a component completely dirty.
 void RepaintManager.markCompletelyClean(JComponent aComponent)
Mark a component completely clean.
 boolean RepaintManager.isCompletelyDirty(JComponent aComponent)
Convenience method that returns true if aComponent will be completely painted during the next paintDirtyRegions().
static void LookAndFeel.installColors(JComponent c, String defaultBgName, String defaultFgName)
Convenience method for initializing a component's foreground and background color properties with values from the current defaults table.
static void LookAndFeel.installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table.
static void LookAndFeel.installBorder(JComponent c, String defaultBorderName)
Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
static void LookAndFeel.uninstallBorder(JComponent c)
Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource.
static ComponentInputMap LookAndFeel.makeComponentInputMap(JComponent c, Object[] keys)
Creates a ComponentInputMap from keys.
 void JColorChooser.setPreviewPanel(JComponent preview)
Sets the current preview panel.
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static void SwingUtilities.replaceUIInputMap(JComponent component, int type, InputMap uiInputMap)
Convenience method to change the UI InputMap for component to uiInputMap.
static void SwingUtilities.replaceUIActionMap(JComponent component, ActionMap uiActionMap)
Convenience method to change the UI ActionMap for component to uiActionMap.
static InputMap SwingUtilities.getUIInputMap(JComponent component, int condition)
Returns the InputMap provided by the UI for condition condition in component component.
static ActionMap SwingUtilities.getUIActionMap(JComponent component)
Returns the ActionMap provided by the UI in component component.
abstract  boolean InputVerifier.verify(JComponent input)
Checks whether the JComponent's input is valid.
 boolean InputVerifier.shouldYieldFocus(JComponent input)
Calls verify(input) to ensure that the input is valid.
 void DesktopManager.beginDraggingFrame(JComponent f)
This method is normally called when the user has indicated that they will begin dragging a component around.
 void DesktopManager.dragFrame(JComponent f, int newX, int newY)
The user has moved the frame.
 void DesktopManager.endDraggingFrame(JComponent f)
This method signals the end of the dragging session.
 void DesktopManager.beginResizingFrame(JComponent f, int direction)
This methods is normally called when the user has indicated that they will begin resizing the frame.
 void DesktopManager.resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
The user has resized the component.
 void DesktopManager.endResizingFrame(JComponent f)
This method signals the end of the resize session.
 void DesktopManager.setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
This is a primative reshape method.
 void JToolTip.setComponent(JComponent c)
Specifies the component that the tooltip describes.
 ComponentUI UIDefaults.getUI(JComponent target)
Creates an ComponentUI implementation for the specified component.
 void DefaultDesktopManager.beginDraggingFrame(JComponent f)
 void DefaultDesktopManager.dragFrame(JComponent f, int newX, int newY)
Moves the visible location of the frame being dragged to the location specified.
 void DefaultDesktopManager.endDraggingFrame(JComponent f)
 void DefaultDesktopManager.beginResizingFrame(JComponent f, int direction)
 void DefaultDesktopManager.resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
Calls setBoundsForFrame() with the new values.
 void DefaultDesktopManager.endResizingFrame(JComponent f)
 void DefaultDesktopManager.setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
This moves the JComponent and repaints the damaged areas.
 void JFileChooser.setAccessory(JComponent newAccessory)
Sets the accessory component.
static ComponentUI UIManager.getUI(JComponent target)
Returns the L&F object that renders the target component.

Constructors in javax.swing with parameters of type JComponent
JComponent.AccessibleJComponent()
Though the class is abstract, this should be called by all sub-classes.
ComponentInputMap(JComponent component)
Creates a ComponentInputMap associated with the specified component.
DebugGraphics(Graphics graphics, JComponent component)
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.

Uses of JComponent in javax.swing.colorchooser

Subclasses of JComponent in javax.swing.colorchooser
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Methods in javax.swing.colorchooser that return JComponent
static JComponent ColorChooserComponentFactory.getPreviewPanel()

Uses of JComponent in javax.swing.event

Methods in javax.swing.event that return JComponent
 JComponent AncestorEvent.getComponent()
Returns the component that the listener was added to.

Constructors in javax.swing.event with parameters of type JComponent
AncestorEvent(JComponent source, int id, Container ancestor, Container ancestorParent)
Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status.

Uses of JComponent in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JComponent
void | ComponentUI.installUI(JComponent c)
void | ComponentUI.uninstallUI(JComponent c)
void | ComponentUI.paint(Graphics g, JComponent c)
void | ComponentUI.update(Graphics g, JComponent c)
Dimension | ComponentUI.getPreferredSize(JComponent c)
Dimension | ComponentUI.getMinimumSize(JComponent c)
Dimension | ComponentUI.getMaximumSize(JComponent c)
boolean | ComponentUI.contains(JComponent c, int x, int y)
static ComponentUI | ComponentUI.createUI(JComponent c)
int | ComponentUI.getAccessibleChildrenCount(JComponent c) Returns the number of accessible children in the object.
Accessible | ComponentUI.getAccessibleChild(JComponent c, int i) Return the nth Accessible child of the object.

Constructors in javax.swing.plaf with parameters of type JComponent
ComponentInputMapUIResource(JComponent component)

Uses of JComponent in javax.swing.plaf.basic

Subclasses of JComponent in javax.swing.plaf.basic
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane The class that manages a basic title bar
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.

Fields in javax.swing.plaf.basic declared as JComponent
protected JComponent | BasicOptionPaneUI.inputComponent JComponent provide for input if optionPane.getWantsInput() returns true.
protected JComponent | BasicInternalFrameUI.northPane
protected JComponent | BasicInternalFrameUI.southPane
protected JComponent | BasicInternalFrameUI.westPane
protected JComponent | BasicInternalFrameUI.eastPane

Methods in javax.swing.plaf.basic that return JComponent
protected JComponent | BasicInternalFrameUI.createNorthPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createSouthPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createWestPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createEastPane(JInternalFrame w)
JComponent | BasicInternalFrameUI.getNorthPane()
JComponent | BasicInternalFrameUI.getSouthPane()
JComponent | BasicInternalFrameUI.getWestPane()
JComponent | BasicInternalFrameUI.getEastPane()

Methods in javax.swing.plaf.basic with parameters of type JComponent
 void BasicTextUI.installUI(JComponent c)
Installs the UI for a component.
 void BasicTextUI.uninstallUI(JComponent c)
Deinstalls the UI for a component.
 void BasicTextUI.update(Graphics g, JComponent c)
Superclass paints background in an uncontrollable way (i.e.
 void BasicTextUI.paint(Graphics g, JComponent c)
Paints the interface.
 Dimension BasicTextUI.getPreferredSize(JComponent c)
Gets the preferred size for the editor component.
 Dimension BasicTextUI.getMinimumSize(JComponent c)
Gets the minimum size for the editor component.
 Dimension BasicTextUI.getMaximumSize(JComponent c)
Gets the maximum size for the editor component.
static ComponentUI BasicEditorPaneUI.createUI(JComponent c)
Creates a UI for the JTextPane.
static ComponentUI BasicTextPaneUI.createUI(JComponent c)
Creates a UI for the JTextPane.
static ComponentUI BasicSeparatorUI.createUI(JComponent c)
 void BasicSeparatorUI.installUI(JComponent c)
 void BasicSeparatorUI.uninstallUI(JComponent c)
 void BasicSeparatorUI.paint(Graphics g, JComponent c)
 Dimension BasicSeparatorUI.getPreferredSize(JComponent c)
 Dimension BasicSeparatorUI.getMinimumSize(JComponent c)
 Dimension BasicSeparatorUI.getMaximumSize(JComponent c)
static ComponentUI BasicMenuItemUI.createUI(JComponent c)
 void BasicMenuItemUI.installUI(JComponent c)
 void BasicMenuItemUI.uninstallUI(JComponent c)
protected  MouseInputListener BasicMenuItemUI.createMouseInputListener(JComponent c)
protected  MenuDragMouseListener BasicMenuItemUI.createMenuDragMouseListener(JComponent c)
protected  MenuKeyListener BasicMenuItemUI.createMenuKeyListener(JComponent c)
 Dimension BasicMenuItemUI.getMinimumSize(JComponent c)
 Dimension BasicMenuItemUI.getPreferredSize(JComponent c)
 Dimension BasicMenuItemUI.getMaximumSize(JComponent c)
protected  Dimension BasicMenuItemUI.getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
 void BasicMenuItemUI.update(Graphics g, JComponent c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
 void BasicMenuItemUI.paint(Graphics g, JComponent c)
protected  void BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
static ComponentUI BasicRadioButtonMenuItemUI.createUI(JComponent b)
static ComponentUI BasicButtonUI.createUI(JComponent c)
 void BasicButtonUI.installUI(JComponent c)
 void BasicButtonUI.uninstallUI(JComponent c)
 void BasicButtonUI.paint(Graphics g, JComponent c)
protected  void BasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect)
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
 Dimension BasicButtonUI.getMinimumSize(JComponent c)
 Dimension BasicButtonUI.getPreferredSize(JComponent c)
 Dimension BasicButtonUI.getMaximumSize(JComponent c)
static ComponentUI BasicToggleButtonUI.createUI(JComponent b)
 void BasicToggleButtonUI.paint(Graphics g, JComponent c)
static ComponentUI BasicRadioButtonUI.createUI(JComponent b)
 void BasicRadioButtonUI.paint(Graphics g, JComponent c)
paint the radio button
 Dimension BasicRadioButtonUI.getPreferredSize(JComponent c)
The preferred size of the radio button
static ComponentUI BasicToolBarSeparatorUI.createUI(JComponent c)
 void BasicToolBarSeparatorUI.paint(Graphics g, JComponent c)
 Dimension BasicToolBarSeparatorUI.getPreferredSize(JComponent c)
 Dimension BasicToolBarSeparatorUI.getMinimumSize(JComponent c)
 Dimension BasicToolBarSeparatorUI.getMaximumSize(JComponent c)
static ComponentUI BasicMenuUI.createUI(JComponent x)
protected  MouseInputListener BasicMenuUI.createMouseInputListener(JComponent c)
protected  MenuListener BasicMenuUI.createMenuListener(JComponent c)
protected  ChangeListener BasicMenuUI.createChangeListener(JComponent c)
protected  PropertyChangeListener BasicMenuUI.createPropertyChangeListener(JComponent c)
protected  MenuDragMouseListener BasicMenuUI.createMenuDragMouseListener(JComponent c)
protected  MenuKeyListener BasicMenuUI.createMenuKeyListener(JComponent c)
 Dimension BasicMenuUI.getMaximumSize(JComponent c)
static ComponentUI BasicProgressBarUI.createUI(JComponent x)
 void BasicProgressBarUI.installUI(JComponent c)
 void BasicProgressBarUI.uninstallUI(JComponent c)
 void BasicProgressBarUI.paint(Graphics g, JComponent c)
All purpose paint method that should do the right thing for almost all linear progress bars.
 Dimension BasicProgressBarUI.getPreferredSize(JComponent c)
 Dimension BasicProgressBarUI.getMinimumSize(JComponent c)
The Minimum size for this component is 10.
 Dimension BasicProgressBarUI.getMaximumSize(JComponent c)
static ComponentUI BasicOptionPaneUI.createUI(JComponent x)
Creates a new BasicOptionPaneUI instance.
 void BasicOptionPaneUI.installUI(JComponent c)
Installs the reciever as the L&F for the passed in JOptionPane
 void BasicOptionPaneUI.uninstallUI(JComponent c)
Removes the receiver from the L&F controller of the passed in split pane.
 Dimension BasicOptionPaneUI.getPreferredSize(JComponent c)
If c is the JOptionPane the reciever is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
 Dimension BasicOptionPaneUI.getMinimumSize(JComponent c)
Messages getPreferredSize.
 Dimension BasicOptionPaneUI.getMaximumSize(JComponent c)
Messages getPreferredSize.
static ComponentUI BasicTabbedPaneUI.createUI(JComponent c)
 void BasicTabbedPaneUI.installUI(JComponent c)
 void BasicTabbedPaneUI.uninstallUI(JComponent c)
 Dimension BasicTabbedPaneUI.getPreferredSize(JComponent c)
 Dimension BasicTabbedPaneUI.getMinimumSize(JComponent c)
 Dimension BasicTabbedPaneUI.getMaximumSize(JComponent c)
 void BasicTabbedPaneUI.paint(Graphics g, JComponent c)
static ComponentUI BasicCheckBoxMenuItemUI.createUI(JComponent c)
static ComponentUI BasicPanelUI.createUI(JComponent c)
 void BasicPanelUI.installUI(JComponent c)
 void BasicPanelUI.uninstallUI(JComponent c)
static ComponentUI BasicPopupMenuUI.createUI(JComponent x)
 void BasicPopupMenuUI.installUI(JComponent c)
 void BasicPopupMenuUI.uninstallUI(JComponent c)
 Dimension BasicPopupMenuUI.getMinimumSize(JComponent c)
 Dimension BasicPopupMenuUI.getPreferredSize(JComponent c)
 Dimension BasicPopupMenuUI.getMaximumSize(JComponent c)
static ComponentUI BasicTableUI.createUI(JComponent c)
 void BasicTableUI.installUI(JComponent c)
 void BasicTableUI.uninstallUI(JComponent c)
 Dimension BasicTableUI.getMinimumSize(JComponent c)
Return the minimum size of the table.
 Dimension BasicTableUI.getPreferredSize(JComponent c)
Return the preferred size of the table.
 Dimension BasicTableUI.getMaximumSize(JComponent c)
Return the maximum size of the table.
 void BasicTableUI.paint(Graphics g, JComponent c)
Paint a representation of the table instance that was set in installUI().
static ComponentUI BasicViewportUI.createUI(JComponent c)
 void BasicViewportUI.installUI(JComponent c)
 void BasicViewportUI.uninstallUI(JComponent c)
protected  void BasicViewportUI.installDefaults(JComponent c)
protected  void BasicViewportUI.uninstallDefaults(JComponent c)
static View BasicHTML.createHTMLView(JComponent c, String html)
Create an html renderer for the given component and string of html.
static void BasicHTML.updateRenderer(JComponent c, String text)
Stash the HTML render for the given text into the client properties of the given JComponent.
static ComponentUI BasicTextFieldUI.createUI(JComponent c)
Creates a UI for a JTextField.
static ComponentUI BasicPasswordFieldUI.createUI(JComponent c)
Creates a UI for a JPasswordField.
static ComponentUI BasicToolTipUI.createUI(JComponent c)
 void BasicToolTipUI.installUI(JComponent c)
 void BasicToolTipUI.uninstallUI(JComponent c)
protected  void BasicToolTipUI.installDefaults(JComponent c)
protected  void BasicToolTipUI.uninstallDefaults(JComponent c)
protected  void BasicToolTipUI.installListeners(JComponent c)
protected  void BasicToolTipUI.uninstallListeners(JComponent c)
 void BasicToolTipUI.paint(Graphics g, JComponent c)
 Dimension BasicToolTipUI.getPreferredSize(JComponent c)
 Dimension BasicToolTipUI.getMinimumSize(JComponent c)
 Dimension BasicToolTipUI.getMaximumSize(JComponent c)
static ComponentUI BasicScrollBarUI.createUI(JComponent c)
 void BasicScrollBarUI.installUI(JComponent c)
 void BasicScrollBarUI.uninstallUI(JComponent c)
 void BasicScrollBarUI.paint(Graphics g, JComponent c)
 Dimension BasicScrollBarUI.getPreferredSize(JComponent c)
A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb.
 Dimension BasicScrollBarUI.getMinimumSize(JComponent c)
A vertical scrollbars minimum width is the largest minimum width of the (non null) increment/decrement buttons, and the minimum width of the thumb.
 Dimension BasicScrollBarUI.getMaximumSize(JComponent c)
protected  void BasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected  void BasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
static ComponentUI BasicToolBarUI.createUI(JComponent c)
 void BasicToolBarUI.installUI(JComponent c)
 void BasicToolBarUI.uninstallUI(JComponent c)
 Dimension BasicToolBarUI.getMinimumSize(JComponent c)
 Dimension BasicToolBarUI.getPreferredSize(JComponent c)
 Dimension BasicToolBarUI.getMaximumSize(JComponent c)
 void BasicButtonListener.installKeyboardActions(JComponent c)
Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).
 void BasicButtonListener.uninstallKeyboardActions(JComponent c)
Unregister's default key actions
 void BasicFileChooserUI.installUI(JComponent c)
 void BasicFileChooserUI.uninstallUI(JComponent c)
static ComponentUI BasicInternalFrameUI.createUI(JComponent b)
 void BasicInternalFrameUI.installUI(JComponent c)
 void BasicInternalFrameUI.uninstallUI(JComponent c)
 Dimension BasicInternalFrameUI.getPreferredSize(JComponent x)
 Dimension BasicInternalFrameUI.getMinimumSize(JComponent x)
 Dimension BasicInternalFrameUI.getMaximumSize(JComponent x)
protected  void BasicInternalFrameUI.replacePane(JComponent currentPane, JComponent newPane)
Adds necessary mouseHandlers to currentPane and adds it to frame.
protected  void BasicInternalFrameUI.deinstallMouseHandlers(JComponent c)
protected  void BasicInternalFrameUI.installMouseHandlers(JComponent c)
 void BasicInternalFrameUI.setNorthPane(JComponent c)
 void BasicInternalFrameUI.setSouthPane(JComponent c)
 void BasicInternalFrameUI.setWestPane(JComponent c)
 void BasicInternalFrameUI.setEastPane(JComponent c)
static ComponentUI BasicDesktopPaneUI.createUI(JComponent c)
 void BasicDesktopPaneUI.installUI(JComponent c)
 void BasicDesktopPaneUI.uninstallUI(JComponent c)
 void BasicDesktopPaneUI.paint(Graphics g, JComponent c)
 Dimension BasicDesktopPaneUI.getPreferredSize(JComponent c)
 Dimension BasicDesktopPaneUI.getMinimumSize(JComponent c)
 Dimension BasicDesktopPaneUI.getMaximumSize(JComponent c)
 void BasicListUI.paint(Graphics g, JComponent c)
Paint the rows that intersect the Graphics objects clipRect.
 Dimension BasicListUI.getPreferredSize(JComponent c)
The preferredSize of a list is total height of the rows and the maximum width of the cells.
 Dimension BasicListUI.getMinimumSize(JComponent c)
 Dimension BasicListUI.getMaximumSize(JComponent c)
 void BasicListUI.installUI(JComponent c)
Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
 void BasicListUI.uninstallUI(JComponent c)
Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order.
static ComponentUI BasicListUI.createUI(JComponent list)
Returns a new instance of BasicListUI.
 void BasicLabelUI.paint(Graphics g, JComponent c)
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
 Dimension BasicLabelUI.getPreferredSize(JComponent c)
 Dimension BasicLabelUI.getMinimumSize(JComponent c)
 Dimension BasicLabelUI.getMaximumSize(JComponent c)
 void BasicLabelUI.installUI(JComponent c)
 void BasicLabelUI.uninstallUI(JComponent c)
static ComponentUI BasicLabelUI.createUI(JComponent c)
static ComponentUI BasicComboBoxUI.createUI(JComponent c)
 void BasicComboBoxUI.installUI(JComponent c)
 void BasicComboBoxUI.uninstallUI(JComponent c)
 void BasicComboBoxUI.paint(Graphics g, JComponent c)
 Dimension BasicComboBoxUI.getPreferredSize(JComponent c)
 Dimension BasicComboBoxUI.getMinimumSize(JComponent c)
 Dimension BasicComboBoxUI.getMaximumSize(JComponent c)
 int BasicComboBoxUI.getAccessibleChildrenCount(JComponent c)
 Accessible BasicComboBoxUI.getAccessibleChild(JComponent c, int i)
static ComponentUI BasicTableHeaderUI.createUI(JComponent h)
 void BasicTableHeaderUI.installUI(JComponent c)
 void BasicTableHeaderUI.uninstallUI(JComponent c)
 void BasicTableHeaderUI.paint(Graphics g, JComponent c)
 Dimension BasicTableHeaderUI.getMinimumSize(JComponent c)
Return the minimum size of the header.
 Dimension BasicTableHeaderUI.getPreferredSize(JComponent c)
Return the preferred size of the header.
 Dimension BasicTableHeaderUI.getMaximumSize(JComponent c)
Return the maximum size of the header.
static ComponentUI BasicMenuBarUI.createUI(JComponent x)
 void BasicMenuBarUI.installUI(JComponent c)
 void BasicMenuBarUI.uninstallUI(JComponent c)
 Dimension BasicMenuBarUI.getPreferredSize(JComponent c)
 Dimension BasicMenuBarUI.getMinimumSize(JComponent c)
 Dimension BasicMenuBarUI.getMaximumSize(JComponent c)
static ComponentUI BasicPopupMenuSeparatorUI.createUI(JComponent c)
 void BasicPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
 Dimension BasicPopupMenuSeparatorUI.getPreferredSize(JComponent c)
static ComponentUI BasicCheckBoxUI.createUI(JComponent b)
static ComponentUI BasicColorChooserUI.createUI(JComponent c)
 void BasicColorChooserUI.installUI(JComponent c)
 void BasicColorChooserUI.uninstallUI(JComponent c)
static ComponentUI BasicTreeUI.createUI(JComponent x)
 void BasicTreeUI.installUI(JComponent c)
 void BasicTreeUI.uninstallUI(JComponent c)
 void BasicTreeUI.paint(Graphics g, JComponent c)
protected  void BasicTreeUI.paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
Paints a vertical line.
protected  void BasicTreeUI.paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
Paints a horizontal line.
 Dimension BasicTreeUI.getPreferredSize(JComponent c)
Returns the preferred size to properly display the tree, this is a cover method for getPreferredSize(c, false).
 Dimension BasicTreeUI.getPreferredSize(JComponent c, boolean checkConsistancy)
Returns the preferred size to represent the tree in c.
 Dimension BasicTreeUI.getMinimumSize(JComponent c)
Returns the minimum size for this component.
 Dimension BasicTreeUI.getMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
static ComponentUI BasicSplitPaneUI.createUI(JComponent x)
Creates a new BasicSplitPaneUI instance
 void BasicSplitPaneUI.installUI(JComponent c)
Installs the UI.
 void BasicSplitPaneUI.uninstallUI(JComponent c)
Uninstalls the UI.
 void BasicSplitPaneUI.paint(Graphics g, JComponent jc)
Messaged to paint the look and feel.
 Dimension BasicSplitPaneUI.getPreferredSize(JComponent jc)
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
 Dimension BasicSplitPaneUI.getMinimumSize(JComponent jc)
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
 Dimension BasicSplitPaneUI.getMaximumSize(JComponent jc)
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
 Insets BasicSplitPaneUI.getInsets(JComponent jc)
Returns the insets.
static ComponentUI BasicScrollPaneUI.createUI(JComponent x)
 void BasicScrollPaneUI.paint(Graphics g, JComponent c)
 Dimension BasicScrollPaneUI.getPreferredSize(JComponent c)
 Dimension BasicScrollPaneUI.getMinimumSize(JComponent c)
 Dimension BasicScrollPaneUI.getMaximumSize(JComponent c)
 void BasicScrollPaneUI.installUI(JComponent x)
protected  void BasicScrollPaneUI.uninstallListeners(JComponent c)
 void BasicScrollPaneUI.uninstallUI(JComponent c)
static ComponentUI BasicRootPaneUI.createUI(JComponent c)
 void BasicRootPaneUI.installUI(JComponent c)
 void BasicRootPaneUI.uninstallUI(JComponent c)
static ComponentUI BasicTextAreaUI.createUI(JComponent ta)
Creates a UI for a JTextArea.
static ComponentUI BasicDesktopIconUI.createUI(JComponent c)
 void BasicDesktopIconUI.installUI(JComponent c)
 void BasicDesktopIconUI.uninstallUI(JComponent c)
 Dimension BasicDesktopIconUI.getPreferredSize(JComponent c)
 Dimension BasicDesktopIconUI.getMinimumSize(JComponent c)
 Dimension BasicDesktopIconUI.getMaximumSize(JComponent c)
 Insets BasicDesktopIconUI.getInsets(JComponent c)
 void BasicDesktopIconUI.MouseInputHandler.moveAndRepaint(JComponent f, int newX, int newY, int newWidth, int newHeight)
static ComponentUI BasicSliderUI.createUI(JComponent b)
 void BasicSliderUI.installUI(JComponent c)
 void BasicSliderUI.uninstallUI(JComponent c)
 Dimension BasicSliderUI.getPreferredSize(JComponent c)
 Dimension BasicSliderUI.getMinimumSize(JComponent c)
 Dimension BasicSliderUI.getMaximumSize(JComponent c)
 void BasicSliderUI.paint(Graphics g, JComponent c)

Uses of JComponent in javax.swing.plaf.metal

Subclasses of JComponent in javax.swing.plaf.metal
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalInternalFrameTitlePane Class that manages a JLF title bar
class | MetalScrollButton JButton object for Metal scrollbar arrows.

Methods in javax.swing.plaf.metal that return JComponent
protected  JComponent MetalInternalFrameUI.createNorthPane(JInternalFrame w)

Methods in javax.swing.plaf.metal with parameters of type JComponent
static ComponentUI | MetalTreeUI.createUI(JComponent x)
void | MetalTreeUI.installUI(JComponent c)
void | MetalTreeUI.uninstallUI(JComponent c)
void | MetalTreeUI.paint(Graphics g, JComponent c)
protected void | MetalTreeUI.paintHorizontalSeparators(Graphics g, JComponent c)
static ComponentUI | MetalSeparatorUI.createUI(JComponent c)
void | MetalSeparatorUI.paint(Graphics g, JComponent c)
Dimension | MetalSeparatorUI.getPreferredSize(JComponent c)
static ComponentUI | MetalPopupMenuSeparatorUI.createUI(JComponent c)
void | MetalPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
Dimension | MetalPopupMenuSeparatorUI.getPreferredSize(JComponent c)
static ComponentUI | MetalTextFieldUI.createUI(JComponent c)
void | MetalTextFieldUI.installUI(JComponent c)
static ComponentUI | MetalFileChooserUI.createUI(JComponent c)
void | MetalFileChooserUI.installUI(JComponent c)
void | MetalFileChooserUI.uninstallUI(JComponent c)
Dimension | MetalFileChooserUI.getPreferredSize(JComponent c)
Dimension | MetalFileChooserUI.getMinimumSize(JComponent c)
Dimension | MetalFileChooserUI.getMaximumSize(JComponent c)
static ComponentUI | MetalLabelUI.createUI(JComponent c)
static ComponentUI | MetalToggleButtonUI.createUI(JComponent b)
protected void | MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
static ComponentUI | MetalTabbedPaneUI.createUI(JComponent x)
void | MetalTabbedPaneUI.update(Graphics g, JComponent c)
void | MetalTabbedPaneUI.paint(Graphics g, JComponent c)
static ComponentUI | MetalRadioButtonUI.createUI(JComponent c)
void | MetalRadioButtonUI.paint(Graphics g, JComponent c)
static ComponentUI | MetalInternalFrameUI.createUI(JComponent c)
void | MetalInternalFrameUI.installUI(JComponent c)
void | MetalInternalFrameUI.uninstallUI(JComponent c)
static ComponentUI | MetalComboBoxUI.createUI(JComponent c)
void | MetalComboBoxUI.installUI(JComponent c)
void | MetalComboBoxUI.uninstallUI(JComponent c)
void | MetalComboBoxUI.paint(Graphics g, JComponent c)
Dimension | MetalComboBoxUI.getMinimumSize(JComponent c)
static ComponentUI | MetalProgressBarUI.createUI(JComponent c)
void | MetalProgressBarUI.paint(Graphics g, JComponent c) The sole reason for this paint method to even be here is that the JLF/Metal ProgressBar has a bit of special highlighting that needs to get drawn.
static ComponentUI | MetalSliderUI.createUI(JComponent c)
void | MetalSliderUI.installUI(JComponent c)
static ComponentUI | MetalScrollBarUI.createUI(JComponent c)
Dimension | MetalScrollBarUI.getPreferredSize(JComponent c)
protected void | MetalScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected void | MetalScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
static ComponentUI | MetalToolBarUI.createUI(JComponent c)
void | MetalToolBarUI.installUI(JComponent c)
void | MetalToolBarUI.uninstallUI(JComponent c)
protected void | MetalToolBarUI.installRolloverBorders(JComponent c)
protected void | MetalToolBarUI.installNonRolloverBorders(JComponent c)
protected void | MetalToolBarUI.installNormalBorders(JComponent c)
static ComponentUI | MetalDesktopIconUI.createUI(JComponent c)
Dimension | MetalDesktopIconUI.getPreferredSize(JComponent c)
static ComponentUI | MetalScrollPaneUI.createUI(JComponent x)
void | MetalScrollPaneUI.installUI(JComponent c)
void | MetalScrollPaneUI.uninstallUI(JComponent c)
static ComponentUI | MetalButtonUI.createUI(JComponent c)
protected void | MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
static ComponentUI | MetalToolTipUI.createUI(JComponent c)
void | MetalToolTipUI.installUI(JComponent c)
void | MetalToolTipUI.paint(Graphics g, JComponent c)
Dimension | MetalToolTipUI.getPreferredSize(JComponent c)
static ComponentUI | MetalCheckBoxUI.createUI(JComponent b)
static ComponentUI | MetalSplitPaneUI.createUI(JComponent x) Creates a new MetalSplitPaneUI instance

Uses of JComponent in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JComponent
void | MultiListUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiListUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiListUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiListUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiListUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiListUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiListUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiListUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiListUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiListUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiListUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiSeparatorUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiSeparatorUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiSeparatorUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSeparatorUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSeparatorUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiSeparatorUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiSeparatorUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiSeparatorUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiSeparatorUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
static ComponentUI | MultiLookAndFeel.createUIs(ComponentUI mui, Vector uis, JComponent target) Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
void | MultiLabelUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiLabelUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiLabelUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiLabelUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiLabelUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiLabelUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiLabelUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiLabelUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiLabelUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiPopupMenuUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiPopupMenuUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiPopupMenuUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiPopupMenuUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiPopupMenuUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiPopupMenuUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiPopupMenuUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiPopupMenuUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiPopupMenuUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiPanelUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiPanelUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiPanelUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiPanelUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiPanelUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiPanelUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiPanelUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiPanelUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiPanelUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiScrollBarUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiScrollBarUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiScrollBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiScrollBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiScrollBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiScrollBarUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiScrollBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiScrollBarUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiScrollBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiTextUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiTextUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiTextUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTextUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiTextUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTextUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTextUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiTextUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiTextUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiTextUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiTextUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiComboBoxUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiComboBoxUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiComboBoxUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiComboBoxUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiComboBoxUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiComboBoxUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiComboBoxUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiComboBoxUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiComboBoxUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiTableHeaderUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiTableHeaderUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiTableHeaderUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTableHeaderUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTableHeaderUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiTableHeaderUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiTableHeaderUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiTableHeaderUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiTableHeaderUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiFileChooserUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiFileChooserUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiFileChooserUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiFileChooserUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiFileChooserUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiFileChooserUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiFileChooserUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiFileChooserUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiFileChooserUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiColorChooserUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiColorChooserUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiColorChooserUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiColorChooserUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiColorChooserUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiColorChooserUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiColorChooserUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiColorChooserUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiColorChooserUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiTreeUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiTreeUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiTreeUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTreeUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTreeUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiTreeUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiTreeUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiTreeUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiTreeUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiViewportUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiViewportUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiViewportUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiViewportUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiViewportUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiViewportUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiViewportUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiViewportUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiViewportUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTabbedPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTabbedPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiTabbedPaneUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiTabbedPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiTabbedPaneUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiTabbedPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiProgressBarUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiProgressBarUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiProgressBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiProgressBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiProgressBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiProgressBarUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiProgressBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiProgressBarUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiProgressBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiScrollPaneUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiScrollPaneUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiScrollPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiScrollPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiScrollPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiScrollPaneUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiScrollPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiScrollPaneUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiScrollPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiOptionPaneUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiOptionPaneUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiOptionPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiOptionPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiOptionPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiOptionPaneUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiOptionPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiOptionPaneUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiOptionPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiSplitPaneUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiSplitPaneUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiSplitPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSplitPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSplitPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiSplitPaneUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiSplitPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiSplitPaneUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiSplitPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiButtonUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiButtonUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiButtonUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiButtonUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiButtonUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiButtonUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiButtonUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiButtonUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiButtonUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiToolBarUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiToolBarUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiToolBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiToolBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiToolBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiToolBarUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiToolBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiToolBarUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiToolBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiSliderUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiSliderUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiSliderUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiSliderUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiSliderUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiSliderUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiSliderUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiSliderUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiSliderUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiDesktopPaneUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopPaneUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiDesktopPaneUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiDesktopPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiDesktopPaneUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiDesktopPaneUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiTableUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiTableUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiTableUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiTableUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiTableUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiTableUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiTableUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiTableUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiTableUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiTableUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiTableUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiDesktopIconUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiDesktopIconUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiDesktopIconUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiDesktopIconUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiDesktopIconUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiDesktopIconUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiDesktopIconUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiDesktopIconUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiDesktopIconUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiMenuItemUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiMenuItemUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiMenuItemUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiMenuItemUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiMenuItemUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiMenuItemUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiMenuItemUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiMenuItemUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiMenuItemUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiInternalFrameUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiInternalFrameUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiInternalFrameUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiInternalFrameUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiInternalFrameUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiInternalFrameUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiInternalFrameUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiInternalFrameUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiInternalFrameUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiToolTipUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiToolTipUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiToolTipUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiToolTipUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiToolTipUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiToolTipUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiToolTipUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiToolTipUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiToolTipUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
void | MultiMenuBarUI.installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | MultiMenuBarUI.uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | MultiMenuBarUI.paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | MultiMenuBarUI.update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | MultiMenuBarUI.getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
boolean | MultiMenuBarUI.contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | MultiMenuBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
int | MultiMenuBarUI.getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Accessible | MultiMenuBarUI.getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.

Uses of JComponent in javax.swing.table

Subclasses of JComponent in javax.swing.table
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.
class | JTableHeader This is the object which manages the header of the JTable.

Uses of JComponent in javax.swing.text

Subclasses of JComponent in javax.swing.text
 class JTextComponent
JTextComponent is the base class for swing text components.

Uses of JComponent in javax.swing.tree

Subclasses of JComponent in javax.swing.tree
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JComponent.AccessibleJComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JComponent.AccessibleJComponent

Packages that use JComponent.AccessibleJComponent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of JComponent.AccessibleJComponent in javax.swing

Subclasses of JComponent.AccessibleJComponent in javax.swing
protected class | AbstractButton.AccessibleAbstractButton This class implements accessibility support for the AbstractButton class.
protected class | JButton.AccessibleJButton This class implements accessibility support for the JButton class.
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JColorChooser.AccessibleJColorChooser This class implements accessibility support for the JColorChooser class.
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
protected class | JDesktopPane.AccessibleJDesktopPane This class implements accessibility support for the JDesktopPane class.
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JFileChooser.AccessibleJFileChooser This class implements accessibility support for the JFileChooser class.
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
protected class | JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
protected class | JLabel.AccessibleJLabel The class used to obtain the accessible role for this object.
protected class | JLayeredPane.AccessibleJLayeredPane This class implements accessibility support for the JLayeredPane class.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuBar.AccessibleJMenuBar This class implements accessibility support for the JMenuBar class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JOptionPane.AccessibleJOptionPane This class implements accessibility support for the JOptionPane class.
protected class | JPanel.AccessibleJPanel This class implements accessibility support for the JPanel class.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
protected class | JProgressBar.AccessibleJProgressBar This class implements accessibility support for the JProgressBar class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JScrollBar.AccessibleJScrollBar This class implements accessibility support for the JScrollBar class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JSeparator.AccessibleJSeparator This class implements accessibility support for the JSeparator class.
protected class | JSlider.AccessibleJSlider This class implements accessibility support for the JSlider class.
protected class | JSplitPane.AccessibleJSplitPane This class implements accessibility support for the JSplitPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
protected class | JToolTip.AccessibleJToolTip This class implements accessibility support for the JToolTip class.
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.

Constructors in javax.swing with parameters of type JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler()
JComponent.AccessibleJComponent.AccessibleFocusHandler()

Uses of JComponent.AccessibleJComponent in javax.swing.table

Subclasses of JComponent.AccessibleJComponent in javax.swing.table
protected  class JTableHeader.AccessibleJTableHeader
This class implements accessibility support for the JTableHeader class.

Uses of JComponent.AccessibleJComponent in javax.swing.text

Subclasses of JComponent.AccessibleJComponent in javax.swing.text
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JDesktopPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JDesktopPane

Packages that use JDesktopPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JDesktopPane in javax.swing

Methods in javax.swing that return JDesktopPane
static JDesktopPane | JOptionPane.getDesktopPaneForComponent(Component parentComponent) Returns the specified component's desktop pane.
JDesktopPane | JInternalFrame.getDesktopPane() Convenience method that searchs the anscestor heirarchy for a JDesktop instance.
JDesktopPane | JInternalFrame.JDesktopIcon.getDesktopPane() Convience method to ask the icon for the Desktop object it belongs to.

Constructors in javax.swing with parameters of type JDesktopPane
JDesktopPane.AccessibleJDesktopPane()

Uses of JDesktopPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JDesktopPane
protected  JDesktopPane BasicDesktopPaneUI.desktop

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JDialog

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JDialog

Packages that use JDialog
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JDialog in javax.swing

Methods in javax.swing that return JDialog
JDialog | JOptionPane.createDialog(Component parentComponent, String title) Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
static JDialog | JColorChooser.createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.

Constructors in javax.swing with parameters of type JDialog
JDialog.AccessibleJDialog()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JEditorPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JEditorPane

Packages that use JEditorPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of JEditorPane in javax.swing

Subclasses of JEditorPane in javax.swing
 class JTextPane
A text component that can be marked up with attributes that are represented graphically.

Constructors in javax.swing with parameters of type JEditorPane
JEditorPane.AccessibleJEditorPane()
JEditorPane.AccessibleJEditorPaneHTML()
JEditorPane.JEditorPaneAccessibleHypertextSupport()
Make one of these puppies

Uses of JEditorPane in javax.swing.text

Methods in javax.swing.text that return JEditorPane
protected  JEditorPane StyledEditorKit.StyledTextAction.getEditor(ActionEvent e)
Gets the target editor for an action.

Methods in javax.swing.text with parameters of type JEditorPane
void | EditorKit.install(JEditorPane c) Called when the kit is being installed into the a JEditorPane.
void | EditorKit.deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
void | StyledEditorKit.install(JEditorPane c) Called when the kit is being installed into a JEditorPane.
void | StyledEditorKit.deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
protected StyledDocument | StyledEditorKit.StyledTextAction.getStyledDocument(JEditorPane e) Gets the document associated with an editor pane.
protected StyledEditorKit | StyledEditorKit.StyledTextAction.getStyledEditorKit(JEditorPane e) Gets the editor kit associated with an editor pane.
protected void | StyledEditorKit.StyledTextAction.setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to character content.
protected void | StyledEditorKit.StyledTextAction.setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to paragraphs.

Uses of JEditorPane in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type JEditorPane
void | HTMLEditorKit.install(JEditorPane c) Called when the kit is being installed into the a JEditorPane.
void | HTMLEditorKit.deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
protected void | HTMLEditorKit.LinkController.activateLink(int pos, JEditorPane editor) Calls linkActivated on the associated JEditorPane if the given position represents a link.
protected HTMLDocument | HTMLEditorKit.HTMLTextAction.getHTMLDocument(JEditorPane e)
protected HTMLEditorKit | HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(JEditorPane e)
protected void | HTMLEditorKit.InsertHTMLTextAction.insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) A cover for HTMLEditorKit.insertHTML.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JEditorPane.AccessibleJEditorPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JEditorPane.AccessibleJEditorPane

Packages that use JEditorPane.AccessibleJEditorPane
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JEditorPane.AccessibleJEditorPane in javax.swing

Subclasses of JEditorPane.AccessibleJEditorPane in javax.swing
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport

Packages that use JEditorPane.JEditorPaneAccessibleHypertextSupport
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JEditorPane.JEditorPaneAccessibleHypertextSupport in javax.swing

Constructors in javax.swing with parameters of type JEditorPane.JEditorPaneAccessibleHypertextSupport
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JFileChooser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JFileChooser

Packages that use JFileChooser
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JFileChooser in javax.swing

Constructors in javax.swing with parameters of type JFileChooser
JFileChooser.AccessibleJFileChooser()

Uses of JFileChooser in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JFileChooser
abstract FileFilter | FileChooserUI.getAcceptAllFileFilter(JFileChooser fc)
abstract FileView | FileChooserUI.getFileView(JFileChooser fc)
abstract String | FileChooserUI.getApproveButtonText(JFileChooser fc)
abstract String | FileChooserUI.getDialogTitle(JFileChooser fc)
abstract void | FileChooserUI.rescanCurrentDirectory(JFileChooser fc)
abstract void | FileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)

Uses of JFileChooser in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return JFileChooser
 JFileChooser BasicFileChooserUI.getFileChooser()

Methods in javax.swing.plaf.basic with parameters of type JFileChooser
void | BasicFileChooserUI.installComponents(JFileChooser fc)
void | BasicFileChooserUI.uninstallComponents(JFileChooser fc)
protected void | BasicFileChooserUI.installListeners(JFileChooser fc)
protected void | BasicFileChooserUI.uninstallListeners(JFileChooser fc)
protected void | BasicFileChooserUI.installDefaults(JFileChooser fc)
protected void | BasicFileChooserUI.installIcons(JFileChooser fc)
protected void | BasicFileChooserUI.installStrings(JFileChooser fc)
protected void | BasicFileChooserUI.uninstallDefaults(JFileChooser fc)
protected void | BasicFileChooserUI.uninstallIcons(JFileChooser fc)
protected void | BasicFileChooserUI.uninstallStrings(JFileChooser fc)
PropertyChangeListener | BasicFileChooserUI.createPropertyChangeListener(JFileChooser fc)
void | BasicFileChooserUI.rescanCurrentDirectory(JFileChooser fc)
void | BasicFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
protected JButton | BasicFileChooserUI.getApproveButton(JFileChooser fc)
String | BasicFileChooserUI.getApproveButtonToolTipText(JFileChooser fc)
ListSelectionListener | BasicFileChooserUI.createListSelectionListener(JFileChooser fc)
protected MouseListener | BasicFileChooserUI.createDoubleClickListener(JFileChooser fc, JList list)
FileFilter | BasicFileChooserUI.getAcceptAllFileFilter(JFileChooser fc) Returns the default accept all file filter
FileView | BasicFileChooserUI.getFileView(JFileChooser fc)
String | BasicFileChooserUI.getDialogTitle(JFileChooser fc) Returns the title of this dialog
int | BasicFileChooserUI.getApproveButtonMnemonic(JFileChooser fc)
String | BasicFileChooserUI.getApproveButtonText(JFileChooser fc)

Constructors in javax.swing.plaf.basic with parameters of type JFileChooser
BasicFileChooserUI(JFileChooser b)
BasicDirectoryModel(JFileChooser filechooser)

Uses of JFileChooser in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JFileChooser
void | MetalFileChooserUI.uninstallComponents(JFileChooser fc)
void | MetalFileChooserUI.installComponents(JFileChooser fc)
protected void | MetalFileChooserUI.installStrings(JFileChooser fc)
protected void | MetalFileChooserUI.installListeners(JFileChooser fc)
protected JPanel | MetalFileChooserUI.createList(JFileChooser fc)
PropertyChangeListener | MetalFileChooserUI.createPropertyChangeListener(JFileChooser fc)
void | MetalFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
void | MetalFileChooserUI.rescanCurrentDirectory(JFileChooser fc)
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer | MetalFileChooserUI.createDirectoryComboBoxRenderer(JFileChooser fc)
protected MetalFileChooserUI.DirectoryComboBoxModel | MetalFileChooserUI.createDirectoryComboBoxModel(JFileChooser fc)
protected JButton | MetalFileChooserUI.getApproveButton(JFileChooser fc)

Constructors in javax.swing.plaf.metal with parameters of type JFileChooser
MetalFileChooserUI(JFileChooser filechooser)

Uses of JFileChooser in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JFileChooser
FileFilter | MultiFileChooserUI.getAcceptAllFileFilter(JFileChooser a) Call getAcceptAllFileFilter on each UI handled by this MultiUI.
FileView | MultiFileChooserUI.getFileView(JFileChooser a) Call getFileView on each UI handled by this MultiUI.
String | MultiFileChooserUI.getApproveButtonText(JFileChooser a) Call getApproveButtonText on each UI handled by this MultiUI.
String | MultiFileChooserUI.getDialogTitle(JFileChooser a) Call getDialogTitle on each UI handled by this MultiUI.
void | MultiFileChooserUI.rescanCurrentDirectory(JFileChooser a) Call rescanCurrentDirectory on each UI handled by this MultiUI.
void | MultiFileChooserUI.ensureFileIsVisible(JFileChooser a, File b) Call ensureFileIsVisible on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JFrame

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JFrame

Packages that use JFrame
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JFrame in javax.swing

Constructors in javax.swing with parameters of type JFrame
JFrame.AccessibleJFrame()

Uses of JFrame in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return JFrame
protected  JFrame BasicToolBarUI.createFloatingFrame(JToolBar toolbar)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JInternalFrame

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JInternalFrame

Packages that use JInternalFrame
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JInternalFrame in javax.swing

Methods in javax.swing that return JInternalFrame
JInternalFrame | JOptionPane.createInternalFrame(Component parentComponent, String title) Creates and returns an instance of JInternalFrame.
JInternalFrame | JInternalFrame.JDesktopIcon.getInternalFrame() Returns the JInternalFrame that this DesktopIcon is associated with.
JInternalFrame[] | JDesktopPane.getAllFrames() Returns all JInternalFrames currently displayed in the desktop.
JInternalFrame | JDesktopPane.getSelectedFrame() return the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.
JInternalFrame[] | JDesktopPane.getAllFramesInLayer(int layer) Returns all JInternalFrames currently displayed in the specified layer of the desktop.

Methods in javax.swing with parameters of type JInternalFrame
 void DesktopManager.openFrame(JInternalFrame f)
If possible, display this frame in an appropriate location.
 void DesktopManager.closeFrame(JInternalFrame f)
Generally, this call should remove the frame from it's parent.
 void DesktopManager.maximizeFrame(JInternalFrame f)
Generally, the frame should be resized to match it's parents bounds.
 void DesktopManager.minimizeFrame(JInternalFrame f)
Generally, this indicates that the frame should be restored to it's size and position prior to a maximizeFrame() call.
 void DesktopManager.iconifyFrame(JInternalFrame f)
Generally, remove this frame from it's parent and add an iconic representation.
 void DesktopManager.deiconifyFrame(JInternalFrame f)
Generally, remove any iconic representation that is present and restore the frame to it's original size and location.
 void DesktopManager.activateFrame(JInternalFrame f)
Generally, indicate that this frame has focus.
 void DesktopManager.deactivateFrame(JInternalFrame f)
Generally, indicate that this frame has lost focus.
 void JInternalFrame.JDesktopIcon.setInternalFrame(JInternalFrame f)
Sets the JInternalFrame that this DesktopIcon is associated with.
 void DefaultDesktopManager.openFrame(JInternalFrame f)
Normally this method will not be called.
 void DefaultDesktopManager.closeFrame(JInternalFrame f)
Removes the frame, and if necessary the desktopIcon, from its parent.
 void DefaultDesktopManager.maximizeFrame(JInternalFrame f)
Resizes the frame to fill its parents bounds.
 void DefaultDesktopManager.minimizeFrame(JInternalFrame f)
Restores the frame back to its size and position prior to a maximizeFrame() call.
 void DefaultDesktopManager.iconifyFrame(JInternalFrame f)
Removes the frame from its parent and adds its desktopIcon to the parent.
 void DefaultDesktopManager.deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from its parent and adds its frame to the parent.
 void DefaultDesktopManager.activateFrame(JInternalFrame f)
This will activate f moving it to the front.
 void DefaultDesktopManager.deactivateFrame(JInternalFrame f)
protected  void DefaultDesktopManager.removeIconFor(JInternalFrame f)
Convience method to remove the desktopIcon of f is necessary.
protected  Rectangle DefaultDesktopManager.getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
protected  void DefaultDesktopManager.setPreviousBounds(JInternalFrame f, Rectangle r)
Stores the bounds of the component just before a maximize call.
protected  Rectangle DefaultDesktopManager.getPreviousBounds(JInternalFrame f)
protected  void DefaultDesktopManager.setWasIcon(JInternalFrame f, Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.
protected  boolean DefaultDesktopManager.wasIcon(JInternalFrame f)
 void JDesktopPane.setSelectedFrame(JInternalFrame f)
set the currently active JInternalFrame in this JDesktopPane.

Constructors in javax.swing with parameters of type JInternalFrame
JInternalFrame.AccessibleJInternalFrame()
JInternalFrame.JDesktopIcon(JInternalFrame f)
Create an icon for an internal frame

Uses of JInternalFrame in javax.swing.event

Methods in javax.swing.event that return JInternalFrame
 JInternalFrame InternalFrameEvent.getInternalFrame()
Returns the originator of the event.

Constructors in javax.swing.event with parameters of type JInternalFrame
InternalFrameEvent(JInternalFrame source, int id)
Constructs a InternalFrameEvent object.

Uses of JInternalFrame in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JInternalFrame
protected JInternalFrame | BasicInternalFrameTitlePane.frame
protected JInternalFrame | BasicInternalFrameUI.frame
protected JInternalFrame | BasicDesktopIconUI.frame

Methods in javax.swing.plaf.basic with parameters of type JInternalFrame
protected void | BasicInternalFrameTitlePane.postClosingEvent(JInternalFrame frame) Post a WINDOW_CLOSING-like event to the frame, so that it can be treated like a regular Frame.
protected JComponent | BasicInternalFrameUI.createNorthPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createSouthPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createWestPane(JInternalFrame w)
protected JComponent | BasicInternalFrameUI.createEastPane(JInternalFrame w)
protected MouseInputAdapter | BasicInternalFrameUI.createBorderListener(JInternalFrame w)
protected void | BasicInternalFrameUI.closeFrame(JInternalFrame f) This method is called when the user wants to close the frame.
protected void | BasicInternalFrameUI.maximizeFrame(JInternalFrame f) This method is called when the user wants to maximize the frame.
protected void | BasicInternalFrameUI.minimizeFrame(JInternalFrame f) This method is called when the user wants to minimize the frame.
protected void | BasicInternalFrameUI.iconifyFrame(JInternalFrame f) This method is called when the user wants to iconify the frame.
protected void | BasicInternalFrameUI.deiconifyFrame(JInternalFrame f) This method is called when the user wants to deiconify the frame.
protected void | BasicInternalFrameUI.activateFrame(JInternalFrame f) This method is called when the frame becomes selected.
protected void | BasicInternalFrameUI.deactivateFrame(JInternalFrame f) This method is called when the frame is no longer selected.

Constructors in javax.swing.plaf.basic with parameters of type JInternalFrame
BasicInternalFrameTitlePane(JInternalFrame f)
BasicInternalFrameUI(JInternalFrame b)

Uses of JInternalFrame in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JInternalFrame
protected  JComponent MetalInternalFrameUI.createNorthPane(JInternalFrame w)

Constructors in javax.swing.plaf.metal with parameters of type JInternalFrame
MetalInternalFrameTitlePane(JInternalFrame f)
MetalInternalFrameUI(JInternalFrame b)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JInternalFrame.JDesktopIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JInternalFrame.JDesktopIcon

Packages that use JInternalFrame.JDesktopIcon
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JInternalFrame.JDesktopIcon in javax.swing

Fields in javax.swing declared as JInternalFrame.JDesktopIcon
protected  JInternalFrame.JDesktopIcon JInternalFrame.desktopIcon
The icon that is displayed when the frame is iconized.

Methods in javax.swing that return JInternalFrame.JDesktopIcon
 JInternalFrame.JDesktopIcon JInternalFrame.getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.

Methods in javax.swing with parameters of type JInternalFrame.JDesktopIcon
 void JInternalFrame.setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.

Constructors in javax.swing with parameters of type JInternalFrame.JDesktopIcon
JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon()

Uses of JInternalFrame.JDesktopIcon in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JInternalFrame.JDesktopIcon
protected  JInternalFrame.JDesktopIcon BasicDesktopIconUI.desktopIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JLabel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JLabel

Packages that use JLabel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of JLabel in javax.swing

Subclasses of JLabel in javax.swing
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.

Constructors in javax.swing with parameters of type JLabel
JLabel.AccessibleJLabel()

Uses of JLabel in javax.swing.plaf.basic

Subclasses of JLabel in javax.swing.plaf.basic
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.

Methods in javax.swing.plaf.basic with parameters of type JLabel
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
protected  void BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with the labels foreground color.
protected  void BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
protected  void BasicLabelUI.installDefaults(JLabel c)
protected  void BasicLabelUI.installListeners(JLabel c)
protected  void BasicLabelUI.installComponents(JLabel c)
protected  void BasicLabelUI.installKeyboardActions(JLabel l)
protected  void BasicLabelUI.uninstallDefaults(JLabel c)
protected  void BasicLabelUI.uninstallListeners(JLabel c)
protected  void BasicLabelUI.uninstallComponents(JLabel c)
protected  void BasicLabelUI.uninstallKeyboardActions(JLabel c)

Uses of JLabel in javax.swing.plaf.metal

Subclasses of JLabel in javax.swing.plaf.metal
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.

Methods in javax.swing.plaf.metal with parameters of type JLabel
protected  void MetalLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.

Uses of JLabel in javax.swing.table

Subclasses of JLabel in javax.swing.table
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.

Uses of JLabel in javax.swing.tree

Subclasses of JLabel in javax.swing.tree
 class DefaultTreeCellRenderer
Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JLayeredPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JLayeredPane

Packages that use JLayeredPane
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JLayeredPane in javax.swing

Subclasses of JLayeredPane in javax.swing
 class JDesktopPane
A container used to create a multiple-document interface or a virtual desktop.

Fields in javax.swing declared as JLayeredPane
protected  JLayeredPane JRootPane.layeredPane
The layered pane that manages the menu bar and content pane.

Methods in javax.swing that return JLayeredPane
static JLayeredPane | JLayeredPane.getLayeredPaneAbove(Component c) Convenience method that returns the first JLayeredPane which contains the specified component.
JLayeredPane | JWindow.getLayeredPane() Returns the layeredPane object for this window.
JLayeredPane | JApplet.getLayeredPane() Returns the layeredPane object for this applet.
JLayeredPane | JInternalFrame.getLayeredPane() Returns the layeredPane object for this frame.
JLayeredPane | JFrame.getLayeredPane() Returns the layeredPane object for this frame.
JLayeredPane | RootPaneContainer.getLayeredPane() Returns the layeredPane.
protected JLayeredPane | JRootPane.createLayeredPane() Called by the constructor methods to create the default layeredPane.
JLayeredPane | JRootPane.getLayeredPane() Get the layered pane used by the root pane.
JLayeredPane | JDialog.getLayeredPane() Returns the layeredPane object for this dialog.

Methods in javax.swing with parameters of type JLayeredPane
void | JWindow.setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | JApplet.setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | JInternalFrame.setLayeredPane(JLayeredPane layered) Sets this JInternalFrame's layeredPane property.
void | JFrame.setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | RootPaneContainer.setLayeredPane(JLayeredPane layeredPane) A Container that manages the contentPane and in some cases a menu bar.
void | JRootPane.setLayeredPane(JLayeredPane layered) Set the layered pane for the root pane.
void | JDialog.setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.

Constructors in javax.swing with parameters of type JLayeredPane
JLayeredPane.AccessibleJLayeredPane()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JList

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JList

Packages that use JList
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JList in javax.swing

Methods in javax.swing with parameters of type JList
Component | DefaultListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Component | ListCellRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) Return a component that has been configured to display the specified value.

Constructors in javax.swing with parameters of type JList
JList.AccessibleJList()
JList.AccessibleJList.AccessibleJListChild(JList parent, int indexInParent)

Uses of JList in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JList
abstract int | ListUI.locationToIndex(JList list, Point location) Convert a point in JList coordinates to the index of the cell at that location.
abstract Point | ListUI.indexToLocation(JList list, int index) Returns the origin of the specified item in JList coordinates, null if index isn't valid.
abstract Rectangle | ListUI.getCellBounds(JList list, int index1, int index2) Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

Uses of JList in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JList
protected JList | BasicComboPopup.list
protected JList | BasicListUI.list
protected JList | BasicComboBoxUI.listBox

Methods in javax.swing.plaf.basic that return JList
 JList BasicComboPopup.getList()
Implementation of ComboPopup.getList().
protected  JList BasicComboPopup.createList()
Creates the JList that is used in the popup to display the items in the model.
 JList ComboPopup.getList()
Returns the list that is being used to draw the items in the JComboBox.

Methods in javax.swing.plaf.basic with parameters of type JList
Component | BasicComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
protected MouseListener | BasicFileChooserUI.createDoubleClickListener(JFileChooser fc, JList list)
int | BasicListUI.locationToIndex(JList list, Point location)
Point | BasicListUI.indexToLocation(JList list, int index)
Rectangle | BasicListUI.getCellBounds(JList list, int index1, int index2)

Constructors in javax.swing.plaf.basic with parameters of type JList
BasicFileChooserUI.DoubleClickListener(JList list)

Uses of JList in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as JList
protected  JList MetalComboBoxButton.listBox

Methods in javax.swing.plaf.metal with parameters of type JList
Component | MetalFileChooserUI.FileRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Component | MetalFileChooserUI.FilterComboBoxRenderer.getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Constructors in javax.swing.plaf.metal with parameters of type JList
MetalFileChooserUI.SingleClickListener(JList list)
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)

Uses of JList in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JList
int | MultiListUI.locationToIndex(JList a, Point b) Call locationToIndex on each UI handled by this MultiUI.
Point | MultiListUI.indexToLocation(JList a, int b) Call indexToLocation on each UI handled by this MultiUI.
Rectangle | MultiListUI.getCellBounds(JList a, int b, int c) Call getCellBounds on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JList.AccessibleJList

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JList.AccessibleJList

Packages that use JList.AccessibleJList
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JList.AccessibleJList in javax.swing

Constructors in javax.swing with parameters of type JList.AccessibleJList
JList.AccessibleJList.AccessibleJListChild(JList parent, int indexInParent)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenu

Packages that use JMenu
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JMenu in javax.swing

Methods in javax.swing that return JMenu
JMenu | JMenuBar.add(JMenu c) Appends the specified menu to the end of the menu bar.
JMenu | JMenuBar.getMenu(int index) Returns the menu at the specified position in the menu bar.
JMenu | JMenuBar.getHelpMenu() Gets the help menu for the menu bar.

Methods in javax.swing with parameters of type JMenu
JMenu | JMenuBar.add(JMenu c) Appends the specified menu to the end of the menu bar.
void | JMenuBar.setHelpMenu(JMenu menu) Sets the help menu that appears when the user selects the "help" option in the menu bar.

Constructors in javax.swing with parameters of type JMenu
JMenu.WinListener(JPopupMenu p)
Create the window listener for the specified popup.
JMenu.AccessibleJMenu()

Uses of JMenu in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JMenu
JMenu | BasicMenuUI.ChangeHandler.menu
protected JMenu | BasicInternalFrameTitlePane.windowMenu

Methods in javax.swing.plaf.basic that return JMenu
protected  JMenu BasicInternalFrameTitlePane.createSystemMenu()

Methods in javax.swing.plaf.basic with parameters of type JMenu
protected void | BasicMenuUI.setupPostTimer(JMenu menu)
protected void | BasicInternalFrameTitlePane.addSystemMenuItems(JMenu systemMenu)

Constructors in javax.swing.plaf.basic with parameters of type JMenu
BasicMenuUI.ChangeHandler(JMenu m, BasicMenuUI ui)

Uses of JMenu in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JMenu
protected  void MetalInternalFrameTitlePane.addSystemMenuItems(JMenu systemMenu)
Override the parent's method to do nothing.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenu.WinListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenu.WinListener

Packages that use JMenu.WinListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JMenu.WinListener in javax.swing

Fields in javax.swing declared as JMenu.WinListener
protected  JMenu.WinListener JMenu.popupListener
The window-closing listener for the popup.

Methods in javax.swing that return JMenu.WinListener
protected  JMenu.WinListener JMenu.createWinListener(JPopupMenu p)
Creates a window-closing listener for the popup.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenuBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenuBar

Packages that use JMenuBar
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JMenuBar in javax.swing

Fields in javax.swing declared as JMenuBar
protected  JMenuBar JRootPane.menuBar
The menu bar.

Methods in javax.swing that return JMenuBar
 JMenuBar JApplet.getJMenuBar()
Returns the menubar set on this applet.
 JMenuBar JInternalFrame.getMenuBar()
Deprecated. As of Swing version 1.0.3, replaced by getJMenuBar().
 JMenuBar JInternalFrame.getJMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
 JMenuBar JFrame.getJMenuBar()
Returns the menubar set on this frame.
 JMenuBar JRootPane.getJMenuBar()
Returns the menu bar from the layered pane.
 JMenuBar JRootPane.getMenuBar()
Deprecated. As of Swing version 1.0.3 replaced by getJMenubar().
 JMenuBar JDialog.getJMenuBar()
Returns the menubar set on this dialog.

Methods in javax.swing with parameters of type JMenuBar
void | JApplet.setJMenuBar(JMenuBar menuBar) Sets the menubar for this applet.
void | JInternalFrame.setMenuBar(JMenuBar m) Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar m).
void | JInternalFrame.setJMenuBar(JMenuBar m) Sets the JMenuBar for this JInternalFrame.
void | JFrame.setJMenuBar(JMenuBar menubar) Sets the menubar for this frame.
void | JRootPane.setJMenuBar(JMenuBar menu) Adds or changes the menu bar used in the layered pane.
void | JRootPane.setMenuBar(JMenuBar menu) Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu).
void | JDialog.setJMenuBar(JMenuBar menu) Sets the menubar for this dialog.

Constructors in javax.swing with parameters of type JMenuBar
JMenuBar.AccessibleJMenuBar()

Uses of JMenuBar in javax.swing.plaf.basic

Subclasses of JMenuBar in javax.swing.plaf.basic
 class BasicInternalFrameTitlePane.SystemMenuBar
This inner class is marked "public" due to a compiler bug.

Fields in javax.swing.plaf.basic declared as JMenuBar
protected JMenuBar | BasicInternalFrameTitlePane.menuBar
protected JMenuBar | BasicMenuBarUI.menuBar

Methods in javax.swing.plaf.basic that return JMenuBar
protected  JMenuBar BasicInternalFrameTitlePane.createSystemMenuBar()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenuItem

Packages that use JMenuItem
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JMenuItem in javax.swing

Subclasses of JMenuItem in javax.swing
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JRadioButtonMenuItem An implementation of a radio button menu item.

Methods in javax.swing that return JMenuItem
JMenuItem | JMenu.add(JMenuItem menuItem) Appends a menu item to the end of this menu.
JMenuItem | JMenu.add(String s) Creates a new menu item with the specified text and appends it to the end of this menu.
JMenuItem | JMenu.add(Action a) Creates a new menu item attached to the specified Action object and appends it to the end of this menu.
protected JMenuItem | JMenu.createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JMenu.
JMenuItem | JMenu.insert(JMenuItem mi, int pos) Inserts the specified JMenuitem at a given position.
JMenuItem | JMenu.insert(Action a, int pos) Inserts a new menu item attached to the specified Action object at a given position.
JMenuItem | JMenu.getItem(int pos) Returns the JMenuItem at the specified position.
JMenuItem | JPopupMenu.add(JMenuItem menuItem) Appends the specified menu item to the end of this menu.
JMenuItem | JPopupMenu.add(String s) Creates a new menu item with the specified text and appends it to the end of this menu.
JMenuItem | JPopupMenu.add(Action a) Appends a new menu item to the end of the menu which dispatches the specified Action object.
protected JMenuItem | JPopupMenu.createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JPopupMenu.

Methods in javax.swing with parameters of type JMenuItem
JMenuItem | JMenu.add(JMenuItem menuItem) Appends a menu item to the end of this menu.
protected PropertyChangeListener | JMenu.createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
JMenuItem | JMenu.insert(JMenuItem mi, int pos) Inserts the specified JMenuitem at a given position.
void | JMenu.remove(JMenuItem item) Removes the specified menu item from this menu.
JMenuItem | JPopupMenu.add(JMenuItem menuItem) Appends the specified menu item to the end of this menu.
protected PropertyChangeListener | JPopupMenu.createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.

Uses of JMenuItem in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JMenuItem
protected  JMenuItem BasicMenuItemUI.menuItem

Methods in javax.swing.plaf.basic with parameters of type JMenuItem
protected void | BasicMenuItemUI.installComponents(JMenuItem menuItem)
protected void | BasicMenuItemUI.uninstallComponents(JMenuItem menuItem)
void | BasicRadioButtonMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
void | BasicCheckBoxMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JMenuItem.AccessibleJMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JMenuItem.AccessibleJMenuItem

Packages that use JMenuItem.AccessibleJMenuItem
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JMenuItem.AccessibleJMenuItem in javax.swing

Subclasses of JMenuItem.AccessibleJMenuItem in javax.swing
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JOptionPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JOptionPane

Packages that use JOptionPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JOptionPane in javax.swing

Constructors in javax.swing with parameters of type JOptionPane
JOptionPane.AccessibleJOptionPane()

Uses of JOptionPane in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JOptionPane
abstract void | OptionPaneUI.selectInitialValue(JOptionPane op) Requests the component representing the default value to have focus.
abstract boolean | OptionPaneUI.containsCustomComponents(JOptionPane op) Returns true if the user has supplied instances of Component for either the options or message.

Uses of JOptionPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JOptionPane
protected  JOptionPane BasicOptionPaneUI.optionPane
JOptionPane that the reciever is providing the look and feel for.

Methods in javax.swing.plaf.basic with parameters of type JOptionPane
void | BasicOptionPaneUI.selectInitialValue(JOptionPane op) If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
boolean | BasicOptionPaneUI.containsCustomComponents(JOptionPane op) Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.

Uses of JOptionPane in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JOptionPane
void | MultiOptionPaneUI.selectInitialValue(JOptionPane a) Call selectInitialValue on each UI handled by this MultiUI.
boolean | MultiOptionPaneUI.containsCustomComponents(JOptionPane a) Call containsCustomComponents on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPanel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPanel

Packages that use JPanel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JPanel in javax.swing

Constructors in javax.swing with parameters of type JPanel
JPanel.AccessibleJPanel()

Uses of JPanel in javax.swing.colorchooser

Subclasses of JPanel in javax.swing.colorchooser
 class AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Uses of JPanel in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return JPanel
 JPanel BasicFileChooserUI.getAccessoryPanel()

Methods in javax.swing.plaf.basic with parameters of type JPanel
protected void | BasicPanelUI.installDefaults(JPanel p)
protected void | BasicPanelUI.uninstallDefaults(JPanel p)

Uses of JPanel in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return JPanel
protected JPanel | MetalFileChooserUI.getButtonPanel()
protected JPanel | MetalFileChooserUI.getBottomPanel()
protected JPanel | MetalFileChooserUI.createList(JFileChooser fc)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPasswordField

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPasswordField

Packages that use JPasswordField
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JPasswordField in javax.swing

Constructors in javax.swing with parameters of type JPasswordField
JPasswordField.AccessibleJPasswordField()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JPopupMenu

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JPopupMenu

Packages that use JPopupMenu
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JPopupMenu in javax.swing

Methods in javax.swing that return JPopupMenu
 JPopupMenu JMenu.getPopupMenu()
Returns the popupmenu associated with this menu.

Methods in javax.swing with parameters of type JPopupMenu
protected  JMenu.WinListener JMenu.createWinListener(JPopupMenu p)
Creates a window-closing listener for the popup.

Constructors in javax.swing with parameters of type JPopupMenu
JMenu.WinListener(JPopupMenu p)
Create the window listener for the specified popup.
JPopupMenu.AccessibleJPopupMenu()

Uses of JPopupMenu in javax.swing.plaf.basic

Subclasses of JPopupMenu in javax.swing.plaf.basic
 class BasicComboPopup
This is an implementation of the ComboPopup interface.

Fields in javax.swing.plaf.basic declared as JPopupMenu
protected  JPopupMenu BasicPopupMenuUI.popupMenu

Uses of JPopupMenu in javax.swing.plaf.metal

Subclasses of JPopupMenu in javax.swing.plaf.metal
 class MetalComboBoxUI.MetalComboPopup
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JProgressBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JProgressBar

Packages that use JProgressBar
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JProgressBar in javax.swing

Constructors in javax.swing with parameters of type JProgressBar
JProgressBar.AccessibleJProgressBar()

Uses of JProgressBar in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JProgressBar
protected  JProgressBar BasicProgressBarUI.progressBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRadioButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRadioButton

Packages that use JRadioButton
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JRadioButton in javax.swing

Constructors in javax.swing with parameters of type JRadioButton
JRadioButton.AccessibleJRadioButton()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRadioButtonMenuItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRadioButtonMenuItem

Packages that use JRadioButtonMenuItem
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JRadioButtonMenuItem in javax.swing

Constructors in javax.swing with parameters of type JRadioButtonMenuItem
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JRootPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JRootPane

Packages that use JRootPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JRootPane in javax.swing

Fields in javax.swing declared as JRootPane
protected JRootPane | JWindow.rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected JRootPane | JApplet.rootPane
protected JRootPane | JInternalFrame.rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected JRootPane | JFrame.rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected JRootPane | JDialog.rootPane

Methods in javax.swing that return JRootPane
JRootPane | JComponent.getRootPane() Returns the JRootPane ancestor for a component
protected JRootPane | JWindow.createRootPane() Called by the constructor methods to create the default rootPane.
JRootPane | JWindow.getRootPane() Returns the rootPane object for this window.
protected JRootPane | JApplet.createRootPane() Called by the constructor methods to create the default rootPane.
JRootPane | JApplet.getRootPane() Returns the rootPane object for this applet.
static JRootPane | SwingUtilities.getRootPane(Component c) If c is a JRootPane descendant return its JRootPane ancestor.
protected JRootPane | JInternalFrame.createRootPane() Called by the constructor to set up the JRootPane.
JRootPane | JInternalFrame.getRootPane() Returns the rootPane object for this frame.
protected JRootPane | JFrame.createRootPane() Called by the constructor methods to create the default rootPane.
JRootPane | JFrame.getRootPane() Returns the rootPane object for this frame.
JRootPane | RootPaneContainer.getRootPane() Return this component's single JRootPane child.
protected JRootPane | JDialog.createRootPane() Called by the constructor methods to create the default rootPane.
JRootPane | JDialog.getRootPane() Returns the rootPane object for this dialog.

Methods in javax.swing with parameters of type JRootPane
protected void | JWindow.setRootPane(JRootPane root) Sets the new rootPane object for this window.
protected void | JApplet.setRootPane(JRootPane root) Sets the rootPane property.
protected void | JInternalFrame.setRootPane(JRootPane root) Sets the rootPane property.
protected void | JFrame.setRootPane(JRootPane root) Sets the rootPane property.
protected void | JDialog.setRootPane(JRootPane root) Sets the rootPane property.

Constructors in javax.swing with parameters of type JRootPane
JRootPane.RootLayout()
JRootPane.AccessibleJRootPane()

Uses of JRootPane in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type JRootPane
protected void | BasicRootPaneUI.installDefaults(JRootPane c)
protected void | BasicRootPaneUI.installComponents(JRootPane root)
protected void | BasicRootPaneUI.installListeners(JRootPane root)
protected void | BasicRootPaneUI.installKeyboardActions(JRootPane root)
protected void | BasicRootPaneUI.uninstallDefaults(JRootPane root)
protected void | BasicRootPaneUI.uninstallComponents(JRootPane root)
protected void | BasicRootPaneUI.uninstallListeners(JRootPane root)
protected void | BasicRootPaneUI.uninstallKeyboardActions(JRootPane root)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JScrollBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JScrollBar

Packages that use JScrollBar
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of JScrollBar in javax.swing

Subclasses of JScrollBar in javax.swing
protected  class JScrollPane.ScrollBar
By default JScrollPane creates scrollbars that are instances of this class.

Fields in javax.swing declared as JScrollBar
protected JScrollBar | ScrollPaneLayout.vsb The scrollpanes vertical scrollbar child.
protected JScrollBar | ScrollPaneLayout.hsb The scrollpanes horizontal scrollbar child.
protected JScrollBar | JScrollPane.verticalScrollBar The scrollpane's vertical scrollbar child.
protected JScrollBar | JScrollPane.horizontalScrollBar The scrollpane's horizontal scrollbar child.

Methods in javax.swing that return JScrollBar
JScrollBar | ScrollPaneLayout.getHorizontalScrollBar() Returns the JScrollBar object that handles horizontal scrolling.
JScrollBar | ScrollPaneLayout.getVerticalScrollBar() Returns the JScrollBar object that handles vertical scrolling.
JScrollBar | JScrollPane.createHorizontalScrollBar() Returns a JScrollPane.ScrollBar by default.
JScrollBar | JScrollPane.getHorizontalScrollBar() Returns the horizontal scroll bar that controls the viewport's horizontal view position.
JScrollBar | JScrollPane.createVerticalScrollBar() Returns a JScrollPane.ScrollBar by default.
JScrollBar | JScrollPane.getVerticalScrollBar() Returns the vertical scroll bar that controls the viewports vertical view position.

Methods in javax.swing with parameters of type JScrollBar
void | JScrollPane.setHorizontalScrollBar(JScrollBar horizontalScrollBar) Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.
void | JScrollPane.setVerticalScrollBar(JScrollBar verticalScrollBar) Adds the scrollbar that controls the viewports vertical view position to the scrollpane.

Constructors in javax.swing with parameters of type JScrollBar
JScrollBar.AccessibleJScrollBar()

Uses of JScrollBar in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JScrollBar
protected JScrollBar | BasicScrollBarUI.scrollbar
protected JScrollBar | BasicTreeUI.ComponentHandler.scrollBar ScrollBar that is being adjusted.

Methods in javax.swing.plaf.basic with parameters of type JScrollBar
protected void | BasicScrollBarUI.layoutVScrollbar(JScrollBar sb)
protected void | BasicScrollBarUI.layoutHScrollbar(JScrollBar sb)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JScrollPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JScrollPane

Packages that use JScrollPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JScrollPane in javax.swing

Methods in javax.swing that return JScrollPane
static JScrollPane JTable.createScrollPaneForTable(JTable aTable)
Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).

Methods in javax.swing with parameters of type JScrollPane
 void ScrollPaneLayout.syncWithScrollPane(JScrollPane sp)
This method must be called after setting a JScrollPanes layout manager.
 Rectangle ScrollPaneLayout.getViewportBorderBounds(JScrollPane scrollpane)
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().

Constructors in javax.swing with parameters of type JScrollPane
JScrollPane.ScrollBar(int orientation)
Creates a scrollbar with the specified orientation, where the options are: JScrollPane.VERTICAL JScrollPane.HORIZONTAL
JScrollPane.AccessibleJScrollPane()
Constructor to set up listener on viewport.

Uses of JScrollPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JScrollPane
protected JScrollPane | BasicComboPopup.scroller
protected JScrollPane | BasicScrollPaneUI.scrollpane

Methods in javax.swing.plaf.basic that return JScrollPane
protected JScrollPane | BasicComboPopup.createScroller() Creates the JScrollPane that is used in the popup to hold the list.
protected JScrollPane | BasicTreeUI.ComponentHandler.getScrollPane() Returns the JScrollPane housing the JTree, or null if one isn't found.

Methods in javax.swing.plaf.basic with parameters of type JScrollPane
protected void | BasicScrollPaneUI.installDefaults(JScrollPane scrollpane)
protected void | BasicScrollPaneUI.installListeners(JScrollPane c)
protected void | BasicScrollPaneUI.installKeyboardActions(JScrollPane c)
protected void | BasicScrollPaneUI.uninstallDefaults(JScrollPane c)
protected void | BasicScrollPaneUI.uninstallKeyboardActions(JScrollPane c)

Uses of JScrollPane in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JScrollPane
void | MetalScrollPaneUI.installListeners(JScrollPane scrollPane)
void | MetalScrollPaneUI.uninstallListeners(JScrollPane scrollPane)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSeparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSeparator

Packages that use JSeparator
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JSeparator in javax.swing

Subclasses of JSeparator in javax.swing
static class | JPopupMenu.Separator A popup menu-specific separator.
static class | JToolBar.Separator A toolbar-specific separator.

Constructors in javax.swing with parameters of type JSeparator
JSeparator.AccessibleJSeparator()

Uses of JSeparator in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type JSeparator
protected void | BasicSeparatorUI.installDefaults(JSeparator s)
protected void | BasicSeparatorUI.uninstallDefaults(JSeparator s)
protected void | BasicSeparatorUI.installListeners(JSeparator s)
protected void | BasicSeparatorUI.uninstallListeners(JSeparator s)
protected void | BasicToolBarSeparatorUI.installDefaults(JSeparator s)

Uses of JSeparator in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JSeparator
protected  void MetalSeparatorUI.installDefaults(JSeparator s)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSlider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSlider

Packages that use JSlider
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JSlider in javax.swing

Constructors in javax.swing with parameters of type JSlider
JSlider.AccessibleJSlider()

Uses of JSlider in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JSlider
protected  JSlider BasicSliderUI.slider

Methods in javax.swing.plaf.basic with parameters of type JSlider
protected void | BasicSliderUI.installDefaults(JSlider slider)
protected BasicSliderUI.TrackListener | BasicSliderUI.createTrackListener(JSlider slider)
protected ChangeListener | BasicSliderUI.createChangeListener(JSlider slider)
protected ComponentListener | BasicSliderUI.createComponentListener(JSlider slider)
protected FocusListener | BasicSliderUI.createFocusListener(JSlider slider)
protected BasicSliderUI.ScrollListener | BasicSliderUI.createScrollListener(JSlider slider)
protected PropertyChangeListener | BasicSliderUI.createPropertyChangeListener(JSlider slider)
protected void | BasicSliderUI.installListeners(JSlider slider)
protected void | BasicSliderUI.uninstallListeners(JSlider slider)
protected void | BasicSliderUI.installKeyboardActions(JSlider slider)
protected void | BasicSliderUI.uninstallKeyboardActions(JSlider slider)

Constructors in javax.swing.plaf.basic with parameters of type JSlider
BasicSliderUI(JSlider b)
BasicSliderUI.ActionScroller(JSlider slider, int dir, boolean block)

Uses of JSlider in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type JSlider
protected  PropertyChangeListener MetalSliderUI.createPropertyChangeListener(JSlider slider)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JSplitPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JSplitPane

Packages that use JSplitPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JSplitPane in javax.swing

Constructors in javax.swing with parameters of type JSplitPane
JSplitPane.AccessibleJSplitPane()

Uses of JSplitPane in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JSplitPane
abstract void | SplitPaneUI.resetToPreferredSizes(JSplitPane jc) Messaged to relayout the JSplitPane based on the preferred size of the children components.
abstract void | SplitPaneUI.setDividerLocation(JSplitPane jc, int location) Sets the location of the divider to location.
abstract int | SplitPaneUI.getDividerLocation(JSplitPane jc) Returns the location of the divider.
abstract int | SplitPaneUI.getMinimumDividerLocation(JSplitPane jc) Returns the minimum possible location of the divider.
abstract int | SplitPaneUI.getMaximumDividerLocation(JSplitPane jc) Returns the maximum possible location of the divider.
abstract void | SplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g) Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.

Uses of JSplitPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JSplitPane
protected JSplitPane | BasicSplitPaneUI.splitPane JSplitPane instance this instance is providing the look and feel for.
protected JSplitPane | BasicSplitPaneDivider.splitPane JSplitPane the receiver is contained in.

Methods in javax.swing.plaf.basic that return JSplitPane
 JSplitPane BasicSplitPaneUI.getSplitPane()
Returns the splitpane this instance is currently contained in.

Methods in javax.swing.plaf.basic with parameters of type JSplitPane
void | BasicSplitPaneUI.resetToPreferredSizes(JSplitPane jc) Messaged to reset the preferred sizes.
void | BasicSplitPaneUI.setDividerLocation(JSplitPane jc, int location) Sets the location of the divider to location.
int | BasicSplitPaneUI.getDividerLocation(JSplitPane jc) Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
int | BasicSplitPaneUI.getMinimumDividerLocation(JSplitPane jc) Gets the minimum location of the divider.
int | BasicSplitPaneUI.getMaximumDividerLocation(JSplitPane jc) Gets the maximum location of the divider.
void | BasicSplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g) Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.

Uses of JSplitPane in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JSplitPane
void | MultiSplitPaneUI.resetToPreferredSizes(JSplitPane a) Call resetToPreferredSizes on each UI handled by this MultiUI.
void | MultiSplitPaneUI.setDividerLocation(JSplitPane a, int b) Call setDividerLocation on each UI handled by this MultiUI.
int | MultiSplitPaneUI.getDividerLocation(JSplitPane a) Call getDividerLocation on each UI handled by this MultiUI.
int | MultiSplitPaneUI.getMinimumDividerLocation(JSplitPane a) Call getMinimumDividerLocation on each UI handled by this MultiUI.
int | MultiSplitPaneUI.getMaximumDividerLocation(JSplitPane a) Call getMaximumDividerLocation on each UI handled by this MultiUI.
void | MultiSplitPaneUI.finishedPaintingChildren(JSplitPane a, Graphics b) Call finishedPaintingChildren on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTabbedPane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTabbedPane

Packages that use JTabbedPane
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of JTabbedPane in javax.swing

Constructors in javax.swing with parameters of type JTabbedPane
JTabbedPane.ModelListener()
JTabbedPane.AccessibleJTabbedPane()
Constructs an AccessibleJTabbedPane

Uses of JTabbedPane in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JTabbedPane
abstract int | TabbedPaneUI.tabForCoordinate(JTabbedPane pane, int x, int y)
abstract Rectangle | TabbedPaneUI.getTabBounds(JTabbedPane pane, int index)
abstract int | TabbedPaneUI.getTabRunCount(JTabbedPane pane)

Uses of JTabbedPane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JTabbedPane
protected  JTabbedPane BasicTabbedPaneUI.tabPane

Methods in javax.swing.plaf.basic with parameters of type JTabbedPane
Rectangle | BasicTabbedPaneUI.getTabBounds(JTabbedPane pane, int i)
int | BasicTabbedPaneUI.getTabRunCount(JTabbedPane pane)
int | BasicTabbedPaneUI.tabForCoordinate(JTabbedPane pane, int x, int y)

Uses of JTabbedPane in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JTabbedPane
int | MultiTabbedPaneUI.tabForCoordinate(JTabbedPane a, int b, int c) Call tabForCoordinate on each UI handled by this MultiUI.
Rectangle | MultiTabbedPaneUI.getTabBounds(JTabbedPane a, int b) Call getTabBounds on each UI handled by this MultiUI.
int | MultiTabbedPaneUI.getTabRunCount(JTabbedPane a) Call getTabRunCount on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTable

Packages that use JTable
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of JTable in javax.swing

Methods in javax.swing with parameters of type JTable
Component | DefaultCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
static JScrollPane | JTable.createScrollPaneForTable(JTable aTable) Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).

Constructors in javax.swing with parameters of type JTable
JTable.AccessibleJTable.AccessibleJTableCell(JTable t, int r, int c, int i)
Constructs an AccessibleJTableHeaderEntry

Uses of JTable in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JTable
protected  JTable BasicTableUI.table

Uses of JTable in javax.swing.table

Fields in javax.swing.table declared as JTable
protected  JTable JTableHeader.table
The table for which this object is the header; the default is null.

Methods in javax.swing.table that return JTable
 JTable JTableHeader.getTable()
Returns the table associated with this header.

Methods in javax.swing.table with parameters of type JTable
Component | TableCellEditor.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Sets an initial value for the editor.
Component | TableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the component used for drawing the cell.
void | JTableHeader.setTable(JTable table) Sets the table associated with this header.
Component | DefaultTableCellRenderer.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the default table cell renderer.

Constructors in javax.swing.table with parameters of type JTable
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
Constructs an AccessiblJTableHeaaderEntry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTable.AccessibleJTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTable.AccessibleJTable

Packages that use JTable.AccessibleJTable
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTable.AccessibleJTable in javax.swing

Constructors in javax.swing with parameters of type JTable.AccessibleJTable
JTable.AccessibleJTable.AccessibleJTableModelChange(int type, int firstRow, int lastRow, int firstColumn, int lastColumn)
JTable.AccessibleJTable.AccessibleJTableCell(JTable t, int r, int c, int i)
Constructs an AccessibleJTableHeaderEntry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTextArea

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTextArea

Packages that use JTextArea
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTextArea in javax.swing

Constructors in javax.swing with parameters of type JTextArea
JTextArea.AccessibleJTextArea()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTextField

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTextField

Packages that use JTextField
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of JTextField in javax.swing

Subclasses of JTextField in javax.swing
 class JPasswordField
JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.

Constructors in javax.swing with parameters of type JTextField
JTextField.AccessibleJTextField()
DefaultCellEditor(JTextField textField)
Constructs a DefaultCellEditor that uses a text field.

Uses of JTextField in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JTextField
protected  JTextField BasicComboBoxEditor.editor

Uses of JTextField in javax.swing.tree

Subclasses of JTextField in javax.swing.tree
 class DefaultTreeCellEditor.DefaultTextField
TextField used when no editor is supplied.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTextField.AccessibleJTextField

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTextField.AccessibleJTextField

Packages that use JTextField.AccessibleJTextField
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTextField.AccessibleJTextField in javax.swing

Subclasses of JTextField.AccessibleJTextField in javax.swing
protected  class JPasswordField.AccessibleJPasswordField
This class implements accessibility support for the JPasswordField class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToggleButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToggleButton

Packages that use JToggleButton
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JToggleButton in javax.swing

Subclasses of JToggleButton in javax.swing
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.

Constructors in javax.swing with parameters of type JToggleButton
JToggleButton.AccessibleJToggleButton()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToggleButton.AccessibleJToggleButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToggleButton.AccessibleJToggleButton

Packages that use JToggleButton.AccessibleJToggleButton
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JToggleButton.AccessibleJToggleButton in javax.swing

Subclasses of JToggleButton.AccessibleJToggleButton in javax.swing
protected class | JCheckBox.AccessibleJCheckBox This class implements accessibility support for the JCheckBox class.
protected class | JRadioButton.AccessibleJRadioButton This class implements accessibility support for the JRadioButton class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToolBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToolBar

Packages that use JToolBar
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of JToolBar in javax.swing

Constructors in javax.swing with parameters of type JToolBar
JToolBar.AccessibleJToolBar()

Uses of JToolBar in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JToolBar
protected JToolBar | BasicToolBarUI.toolBar
protected JToolBar | BasicToolBarUI.DockingListener.toolBar

Methods in javax.swing.plaf.basic with parameters of type JToolBar
protected JFrame | BasicToolBarUI.createFloatingFrame(JToolBar toolbar)
protected BasicToolBarUI.DragWindow | BasicToolBarUI.createDragWindow(JToolBar toolbar)

Constructors in javax.swing.plaf.basic with parameters of type JToolBar
BasicToolBarUI.DockingListener(JToolBar t)

Uses of JToolBar in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type JToolBar
MetalToolBarUI.MetalDockingListener(JToolBar t)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JToolTip

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JToolTip

Packages that use JToolTip
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JToolTip in javax.swing

Methods in javax.swing that return JToolTip
 JToolTip JComponent.createToolTip()
Returns the instance of JToolTip that should be used to display the tooltip.

Constructors in javax.swing with parameters of type JToolTip
JToolTip.AccessibleJToolTip()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree

Packages that use JTree
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of JTree in javax.swing

Methods in javax.swing with parameters of type JTree
 Component DefaultCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)

Constructors in javax.swing with parameters of type JTree
JTree.TreeSelectionRedirector()
JTree.TreeModelHandler()
JTree.AccessibleJTree()
JTree.AccessibleJTree.AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
Constructs an AccessibleJTreeNode

Uses of JTree in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JTree
abstract Rectangle | TreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
abstract TreePath | TreeUI.getPathForRow(JTree tree, int row) Returns the path for passed in row.
abstract int | TreeUI.getRowForPath(JTree tree, TreePath path) Returns the row that the last item identified in path is visible at.
abstract int | TreeUI.getRowCount(JTree tree) Returns the number of rows that are being displayed.
abstract TreePath | TreeUI.getClosestPathForLocation(JTree tree, int x, int y) Returns the path to the node that is closest to x,y.
abstract boolean | TreeUI.isEditing(JTree tree) Returns true if the tree is being edited.
abstract boolean | TreeUI.stopEditing(JTree tree) Stops the current editing session.
abstract void | TreeUI.cancelEditing(JTree tree) Cancels the current editing session.
abstract void | TreeUI.startEditingAtPath(JTree tree, TreePath path) Selects the last item in path and tries to edit it.
abstract TreePath | TreeUI.getEditingPath(JTree tree) Returns the path to the element that is being edited.

Uses of JTree in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JTree
protected  JTree BasicTreeUI.tree
Component that we're going to be drawing into.

Methods in javax.swing.plaf.basic with parameters of type JTree
Rectangle | BasicTreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
TreePath | BasicTreeUI.getPathForRow(JTree tree, int row) Returns the path for passed in row.
int | BasicTreeUI.getRowForPath(JTree tree, TreePath path) Returns the row that the last item identified in path is visible at.
int | BasicTreeUI.getRowCount(JTree tree) Returns the number of rows that are being displayed.
TreePath | BasicTreeUI.getClosestPathForLocation(JTree tree, int x, int y) Returns the path to the node that is closest to x,y.
boolean | BasicTreeUI.isEditing(JTree tree) Returns true if the tree is being edited.
boolean | BasicTreeUI.stopEditing(JTree tree) Stops the current editing session.
void | BasicTreeUI.cancelEditing(JTree tree) Cancels the current editing session.
void | BasicTreeUI.startEditingAtPath(JTree tree, TreePath path) Selects the last item in path and tries to edit it.
TreePath | BasicTreeUI.getEditingPath(JTree tree) Returns the path to the element that is being edited.

Uses of JTree in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JTree
Rectangle | MultiTreeUI.getPathBounds(JTree a, TreePath b) Call getPathBounds on each UI handled by this MultiUI.
TreePath | MultiTreeUI.getPathForRow(JTree a, int b) Call getPathForRow on each UI handled by this MultiUI.
int | MultiTreeUI.getRowForPath(JTree a, TreePath b) Call getRowForPath on each UI handled by this MultiUI.
int | MultiTreeUI.getRowCount(JTree a) Call getRowCount on each UI handled by this MultiUI.
TreePath | MultiTreeUI.getClosestPathForLocation(JTree a, int b, int c) Call getClosestPathForLocation on each UI handled by this MultiUI.
boolean | MultiTreeUI.isEditing(JTree a) Call isEditing on each UI handled by this MultiUI.
boolean | MultiTreeUI.stopEditing(JTree a) Call stopEditing on each UI handled by this MultiUI.
void | MultiTreeUI.cancelEditing(JTree a) Call cancelEditing on each UI handled by this MultiUI.
void | MultiTreeUI.startEditingAtPath(JTree a, TreePath b) Call startEditingAtPath on each UI handled by this MultiUI.
TreePath | MultiTreeUI.getEditingPath(JTree a) Call getEditingPath on each UI handled by this MultiUI.

Uses of JTree in javax.swing.tree

Fields in javax.swing.tree declared as JTree
protected  JTree DefaultTreeCellEditor.tree
JTree instance listening too.

Methods in javax.swing.tree with parameters of type JTree
Component | DefaultTreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) Configures the renderer based on the passed in components.
Component | TreeCellRenderer.getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Sets the value of the current tree cell to value.
Component | TreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Sets an initial value for the editor.
Component | DefaultTreeCellEditor.getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Configures the editor.
protected void | DefaultTreeCellEditor.setTree(JTree newTree) Sets the tree currently editing for.
protected void | DefaultTreeCellEditor.determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)

Constructors in javax.swing.tree with parameters of type JTree
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.AccessibleJTree

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.AccessibleJTree

Packages that use JTree.AccessibleJTree
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTree.AccessibleJTree in javax.swing

Constructors in javax.swing with parameters of type JTree.AccessibleJTree
JTree.AccessibleJTree.AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
Constructs an AccessibleJTreeNode

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.EmptySelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.EmptySelectionModel

Packages that use JTree.EmptySelectionModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTree.EmptySelectionModel in javax.swing

Fields in javax.swing declared as JTree.EmptySelectionModel
protected static JTree.EmptySelectionModel JTree.EmptySelectionModel.sharedInstance
Unique shared instance.

Methods in javax.swing that return JTree.EmptySelectionModel
static JTree.EmptySelectionModel JTree.EmptySelectionModel.sharedInstance()
Returns a shared instance of an empty selection model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JTree.TreeSelectionRedirector

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JTree.TreeSelectionRedirector

Packages that use JTree.TreeSelectionRedirector
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTree.TreeSelectionRedirector in javax.swing

Fields in javax.swing declared as JTree.TreeSelectionRedirector
protected  JTree.TreeSelectionRedirector JTree.selectionRedirector
Creates a new event and passed it off the selectionListeners.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JViewport

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JViewport

Packages that use JViewport
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JViewport in javax.swing

Fields in javax.swing declared as JViewport
protected JViewport | ScrollPaneLayout.viewport The scrollpanes viewport child.
protected JViewport | ScrollPaneLayout.rowHead The row header child.
protected JViewport | ScrollPaneLayout.colHead The column header child.
protected JViewport | JScrollPane.viewport The scrollpane's viewport child.
protected JViewport | JScrollPane.rowHeader The row header child.
protected JViewport | JScrollPane.columnHeader The column header child.
protected JViewport | JScrollPane.AccessibleJScrollPane.viewPort

Methods in javax.swing that return JViewport
JViewport | ScrollPaneLayout.getViewport() Returns the JViewport object that displays the scrollable contents.
JViewport | ScrollPaneLayout.getRowHeader() Returns the JViewport object that is the row header.
JViewport | ScrollPaneLayout.getColumnHeader() Returns the JViewport object that is the column header.
protected JViewport | JScrollPane.createViewport() Returns a new JViewport by default.
JViewport | JScrollPane.getViewport() Returns the current JViewport.
JViewport | JScrollPane.getRowHeader() Returns the row header.
JViewport | JScrollPane.getColumnHeader() Returns the column header.

Methods in javax.swing with parameters of type JViewport
void | JScrollPane.setViewport(JViewport viewport) Removes the old viewport (if there is one); forces the viewPosition of the new viewport to be in the +x,+y quadrant; syncs up the row and column headers (if there are any) with the new viewport; and finally syncs the scrollbars and headers with the new viewport.
void | JScrollPane.setRowHeader(JViewport rowHeader) Removes the old rowHeader, if it exists.
void | JScrollPane.setColumnHeader(JViewport columnHeader) Removes the old columnHeader, if it exists.

Constructors in javax.swing with parameters of type JViewport
JViewport.ViewListener()
JViewport.AccessibleJViewport()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JViewport.ViewListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JViewport.ViewListener

Packages that use JViewport.ViewListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JViewport.ViewListener in javax.swing

Methods in javax.swing that return JViewport.ViewListener
protected  JViewport.ViewListener JViewport.createViewListener()
Creates a listener for the view.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.JWindow

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.JWindow

Packages that use JWindow
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JWindow in javax.swing

Constructors in javax.swing with parameters of type JWindow
JWindow.AccessibleJWindow()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.KeyStroke

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.KeyStroke

Packages that use KeyStroke
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of KeyStroke in javax.swing

Methods in javax.swing that return KeyStroke
KeyStroke[] | JComponent.getRegisteredKeyStrokes() Returns the KeyStrokes that will initiate registered actions.
static KeyStroke | KeyStroke.getKeyStroke(char keyChar) Return a shared instance of a key stroke that is activated when the key is pressed (that is, a KeyStroke for the KEY_TYPED event).
static KeyStroke | KeyStroke.getKeyStroke(char keyChar, boolean onKeyRelease) Deprecated. use getKeyStroke(char)
static KeyStroke | KeyStroke.getKeyStroke(Character keyChar, int modifiers) Return a shared instance of a key stroke, given a character object and a set of modifiers.
static KeyStroke | KeyStroke.getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) Return a shared instance of a key stroke given a numeric keycode and a set of modifiers, specifying whether the key is activated when it is pressed or released.
static KeyStroke | KeyStroke.getKeyStroke(int keyCode, int modifiers) Return a shared instance of a key stroke given a char code and a set of modifiers -- the key is activated when it is pressed.
static KeyStroke | KeyStroke.getKeyStrokeForEvent(KeyEvent anEvent) Return a keystroke from an event.
static KeyStroke | KeyStroke.getKeyStroke(String s) Parse a string and return a KeyStroke.
KeyStroke | JMenuItem.getAccelerator() Returns the KeyStroke which serves as an accelerator for the menu item.
KeyStroke[] | InputMap.keys() Returns the KeyStrokes that are bound in this InputMap.
KeyStroke[] | InputMap.allKeys() Returns an array of the KeyStrokes defined in this InputMap and its parent.

Methods in javax.swing with parameters of type KeyStroke
 void JComponent.registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void JComponent.registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void JComponent.unregisterKeyboardAction(KeyStroke aKeyStroke)
This method is now obsolete.
 int JComponent.getConditionForKeyStroke(KeyStroke aKeyStroke)
Returns the condition that determines whether a registered action occurs in response to the specified keystroke.
 ActionListener JComponent.getActionForKeyStroke(KeyStroke aKeyStroke)
Returns the object that will perform the action registered for a given keystroke.
protected  boolean JComponent.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
Invoked to process the key bindings for ks as the result of the KeyEvent e.
 void JMenuItem.setAccelerator(KeyStroke keyStroke)
Set the key combination which invokes the Menu Item's action listeners without navigating the menu hierarchy.
 void JMenu.setAccelerator(KeyStroke keyStroke)
setAccelerator is not defined for JMenu.
 void InputMap.put(KeyStroke keyStroke, Object actionMapKey)
Adds a binding for keyStroke to actionMapKey.
 Object InputMap.get(KeyStroke keyStroke)
Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.
 void InputMap.remove(KeyStroke key)
Removes the binding for key from this InputMap.
 void ComponentInputMap.put(KeyStroke keyStroke, Object actionMapKey)
Adds a binding for keyStroke to actionMapKey.
 void ComponentInputMap.remove(KeyStroke key)
Removes the binding for key from this object.
static boolean SwingUtilities.notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers)
Invokes actionPerformed on action if action is enabled (and non null).
protected  boolean JTable.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
protected  boolean JMenuBar.processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
Subclassed to check all the child menus.

Uses of KeyStroke in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as KeyStroke
protected KeyStroke | BasicTabbedPaneUI.upKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicTabbedPaneUI.downKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicTabbedPaneUI.leftKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicTabbedPaneUI.rightKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicToolBarUI.upKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicToolBarUI.downKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicToolBarUI.leftKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicToolBarUI.rightKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicInternalFrameUI.openMenuKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicDesktopPaneUI.minimizeKey Deprecated. As of JDK version 1.3.
protected KeyStroke | BasicDesktopPaneUI.maximizeKey Deprecated. As of JDK version 1.3.
protected KeyStroke | BasicDesktopPaneUI.closeKey Deprecated. As of JDK version 1.3.
protected KeyStroke | BasicDesktopPaneUI.navigateKey Deprecated. As of JDK version 1.3.
protected KeyStroke | BasicDesktopPaneUI.navigateKey2 Deprecated. As of JDK version 1.3.
protected KeyStroke | BasicSplitPaneUI.upKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.downKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.leftKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.rightKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.homeKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.endKey Deprecated. As of Java 2 platform v1.3.
protected KeyStroke | BasicSplitPaneUI.dividerResizeToggleKey Deprecated. As of Java 2 platform v1.3.

Uses of KeyStroke in javax.swing.text

Fields in javax.swing.text declared as KeyStroke
 KeyStroke JTextComponent.KeyBinding.key
The key.

Methods in javax.swing.text that return KeyStroke
KeyStroke[] | Keymap.getBoundKeyStrokes() Fetches all of the keystrokes in this map that are bound to some action.
KeyStroke[] | Keymap.getKeyStrokesForAction(Action a) Fetches the keystrokes that will result in the given action.

Methods in javax.swing.text with parameters of type KeyStroke
Action | Keymap.getAction(KeyStroke key) Fetches the action appropriate for the given symbolic event sequence.
boolean | Keymap.isLocallyDefined(KeyStroke key) Determines if the given key sequence is locally defined.
void | Keymap.addActionForKeyStroke(KeyStroke key, Action a) Adds a binding to the keymap.
void | Keymap.removeKeyStrokeBinding(KeyStroke keys) Removes a binding from the keymap.

Constructors in javax.swing.text with parameters of type KeyStroke
JTextComponent.KeyBinding(KeyStroke key, String actionName)
Creates a new key binding.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.LookAndFeel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.LookAndFeel

Packages that use LookAndFeel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of LookAndFeel in javax.swing

Methods in javax.swing that return LookAndFeel
static LookAndFeel | UIManager.getLookAndFeel() Returns The current default look and feel, or null.
static LookAndFeel[] | UIManager.getAuxiliaryLookAndFeels() Return the list of auxiliary look and feels (can be null).

Methods in javax.swing with parameters of type LookAndFeel
static void | UIManager.setLookAndFeel(LookAndFeel newLookAndFeel) Set the current default look and feel using a LookAndFeel object.
static void | UIManager.addAuxiliaryLookAndFeel(LookAndFeel laf) Add a LookAndFeel to the list of auxiliary look and feels.
static boolean | UIManager.removeAuxiliaryLookAndFeel(LookAndFeel laf) Remove a LookAndFeel from the list of auxiliary look and feels.

Uses of LookAndFeel in javax.swing.plaf.basic

Subclasses of LookAndFeel in javax.swing.plaf.basic
 class BasicLookAndFeel
Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.

Uses of LookAndFeel in javax.swing.plaf.metal

Subclasses of LookAndFeel in javax.swing.plaf.metal
 class MetalLookAndFeel
Implements The Metal Look and Feel.

Uses of LookAndFeel in javax.swing.plaf.multi

Subclasses of LookAndFeel in javax.swing.plaf.multi
 class MultiLookAndFeel
A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.MenuSelectionManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.MenuSelectionManager

Packages that use MenuSelectionManager
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of MenuSelectionManager in javax.swing

Methods in javax.swing that return MenuSelectionManager
static MenuSelectionManager MenuSelectionManager.defaultManager()
Returns the default menu selection manager.

Methods in javax.swing with parameters of type MenuSelectionManager
void | JMenuItem.processMouseEvent(MouseEvent e, MenuElement[] path, MenuSelectionManager manager) Process a mouse event forwarded from the MenuSelectionManager.
void | JMenuItem.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Process a key event forwarded from the MenuSelectionManager.
void | JPopupMenu.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | JPopupMenu.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | JMenuBar.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | JMenuBar.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | MenuElement.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Process a mouse event.
void | MenuElement.processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager) Process a key event.

Uses of MenuSelectionManager in javax.swing.event

Methods in javax.swing.event that return MenuSelectionManager
MenuSelectionManager | MenuKeyEvent.getMenuSelectionManager() Returns the current menu selection manager.
MenuSelectionManager | MenuDragMouseEvent.getMenuSelectionManager() Returns the current menu selection manager.

Constructors in javax.swing.event with parameters of type MenuSelectionManager
MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuKeyEvent object.
MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuDragMouseEvent object.

Uses of MenuSelectionManager in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type MenuSelectionManager
void | BasicRadioButtonMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
void | BasicCheckBoxMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ProgressMonitor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ProgressMonitor

Packages that use ProgressMonitor
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ProgressMonitor in javax.swing

Methods in javax.swing that return ProgressMonitor
 ProgressMonitor ProgressMonitorInputStream.getProgressMonitor()
Get the ProgressMonitor object being used by this stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.RepaintManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.RepaintManager

Packages that use RepaintManager
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of RepaintManager in javax.swing

Methods in javax.swing that return RepaintManager
static RepaintManager | RepaintManager.currentManager(Component c) Return the RepaintManager for the calling thread given a Component.
static RepaintManager | RepaintManager.currentManager(JComponent c) Return the RepaintManager for the calling thread given a JComponent.

Methods in javax.swing with parameters of type RepaintManager
static void RepaintManager.setCurrentManager(RepaintManager aRepaintManager)
Set the RepaintManager that should be used for the calling thread.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ScrollPaneLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ScrollPaneLayout

Packages that use ScrollPaneLayout
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ScrollPaneLayout in javax.swing

Subclasses of ScrollPaneLayout in javax.swing
static class ScrollPaneLayout.UIResource
The UI resource version of ScrollPaneLayout.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.SizeRequirements

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.SizeRequirements

Packages that use SizeRequirements
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of SizeRequirements in javax.swing

Methods in javax.swing that return SizeRequirements
static SizeRequirements | SizeRequirements.getTiledSizeRequirements(SizeRequirements[] children) Determines the total space necessary to place a set of components end-to-end.
static SizeRequirements | SizeRequirements.getAlignedSizeRequirements(SizeRequirements[] children) Determines the total space necessary to align a set of components.

Methods in javax.swing with parameters of type SizeRequirements
static SizeRequirements | SizeRequirements.getTiledSizeRequirements(SizeRequirements[] children) Determines the total space necessary to place a set of components end-to-end.
static SizeRequirements | SizeRequirements.getAlignedSizeRequirements(SizeRequirements[] children) Determines the total space necessary to align a set of components.
static void | SizeRequirements.calculateTiledPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) Creates a bunch of offset/span pairs representing how to lay out a set of components end-to-end.
static void | SizeRequirements.calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) Creates a bunch of offset/span pairs specifying how to lay out a set of components with the specified alignments.
static int[] | SizeRequirements.adjustSizes(int delta, SizeRequirements[] children) Adjust a specified array of sizes by a given amount.

Uses of SizeRequirements in javax.swing.text

Methods in javax.swing.text that return SizeRequirements
protected SizeRequirements | BoxView.calculateMajorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements | BoxView.calculateMinorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements | BoxView.baselineRequirements(int axis, SizeRequirements r)
protected SizeRequirements | FlowView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate equirements along the minor axis.
protected SizeRequirements | TableView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements for the minor axis.

Methods in javax.swing.text with parameters of type SizeRequirements
protected SizeRequirements | BoxView.calculateMajorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements | BoxView.calculateMinorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements | BoxView.baselineRequirements(int axis, SizeRequirements r)
protected SizeRequirements | FlowView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate equirements along the minor axis.
protected void | TableView.layoutColumns(int targetSpan, int[] offsets, int[] spans, SizeRequirements[] reqs) Layout the columns to fit within the given target span.
protected SizeRequirements | TableView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements for the minor axis.

Uses of SizeRequirements in javax.swing.text.html

Methods in javax.swing.text.html that return SizeRequirements
protected SizeRequirements | ParagraphView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the needs for the paragraph along the minor axis.
protected SizeRequirements | BlockView.calculateMajorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the major axis (i.e.
protected SizeRequirements | BlockView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the minor axis (i.e.

Methods in javax.swing.text.html with parameters of type SizeRequirements
protected SizeRequirements | ParagraphView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the needs for the paragraph along the minor axis.
protected SizeRequirements | BlockView.calculateMajorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the major axis (i.e.
protected SizeRequirements | BlockView.calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the minor axis (i.e.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.Timer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.Timer

Packages that use Timer
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Timer in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Timer
protected Timer | BasicComboPopup.autoscrollTimer
protected Timer | BasicScrollBarUI.scrollTimer
protected Timer | BasicTreeUI.ComponentHandler.timer Timer used when inside a scrollpane and the scrollbar is adjusting.
protected Timer | BasicSliderUI.scrollTimer

Uses of Timer in javax.swing.tree

Fields in javax.swing.tree declared as Timer
protected  Timer DefaultTreeCellEditor.timer
Used before starting the editing session.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.ToolTipManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.ToolTipManager

Packages that use ToolTipManager
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ToolTipManager in javax.swing

Methods in javax.swing that return ToolTipManager
static ToolTipManager ToolTipManager.sharedInstance()
Returns a shared ToolTipManager instance.

Constructors in javax.swing with parameters of type ToolTipManager
ToolTipManager.insideTimerAction()
ToolTipManager.outsideTimerAction()
ToolTipManager.stillInsideTimerAction()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UIDefaults

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UIDefaults

Packages that use UIDefaults
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of UIDefaults in javax.swing

Methods in javax.swing that return UIDefaults
UIDefaults | LookAndFeel.getDefaults() This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
static UIDefaults | UIManager.getDefaults() Returns the default values for this look and feel.
static UIDefaults | UIManager.getLookAndFeelDefaults() Returns the default values for this look and feel.

Methods in javax.swing with parameters of type UIDefaults
Object | UIDefaults.LazyValue.createValue(UIDefaults table) Creates the actual value retrieved from the UIDefaults table.
Object | UIDefaults.ActiveValue.createValue(UIDefaults table) Creates the value retrieved from the UIDefaults table.
Object | UIDefaults.ProxyLazyValue.createValue(UIDefaults table) Creates the value retrieved from the UIDefaults table.
Object | UIDefaults.LazyInputMap.createValue(UIDefaults table) Creates an InputMap with the bindings that are passed in.

Uses of UIDefaults in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return UIDefaults
 UIDefaults BasicLookAndFeel.getDefaults()

Methods in javax.swing.plaf.basic with parameters of type UIDefaults
protected void | BasicLookAndFeel.initClassDefaults(UIDefaults table) Initialize the uiClassID to BasicComponentUI mapping.
protected void | BasicLookAndFeel.initSystemColorDefaults(UIDefaults table) Load the SystemColors into the defaults table.
protected void | BasicLookAndFeel.loadSystemColors(UIDefaults table, String[] systemColors, boolean useNative) If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants.
protected void | BasicLookAndFeel.initComponentDefaults(UIDefaults table)

Uses of UIDefaults in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return UIDefaults
 UIDefaults MetalLookAndFeel.getDefaults()

Methods in javax.swing.plaf.metal with parameters of type UIDefaults
protected void | MetalLookAndFeel.initClassDefaults(UIDefaults table) Initialize the uiClassID to BasicComponentUI mapping.
protected void | MetalLookAndFeel.initSystemColorDefaults(UIDefaults table) Load the SystemColors into the defaults table.
protected void | MetalLookAndFeel.initComponentDefaults(UIDefaults table)
void | MetalTheme.addCustomEntriesToTable(UIDefaults table)

Uses of UIDefaults in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return UIDefaults
 UIDefaults MultiLookAndFeel.getDefaults()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UIManager.LookAndFeelInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UIManager.LookAndFeelInfo

Packages that use UIManager.LookAndFeelInfo
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of UIManager.LookAndFeelInfo in javax.swing

Methods in javax.swing that return UIManager.LookAndFeelInfo
static UIManager.LookAndFeelInfo[] UIManager.getInstalledLookAndFeels()
Return an array of objects that provide some information about the LookAndFeel implementations that have been installed with this software development kit.

Methods in javax.swing with parameters of type UIManager.LookAndFeelInfo
static void UIManager.setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
Replaces the current array of installed LookAndFeelInfos.
static void UIManager.installLookAndFeel(UIManager.LookAndFeelInfo info)
Adds the specified look and feel to the current array and then calls UIManager.setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.UnsupportedLookAndFeelException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.UnsupportedLookAndFeelException

Packages that use UnsupportedLookAndFeelException
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of UnsupportedLookAndFeelException in javax.swing

Methods in javax.swing that throw UnsupportedLookAndFeelException
static void | UIManager.setLookAndFeel(LookAndFeel newLookAndFeel) Set the current default look and feel using a LookAndFeel object.
static void | UIManager.setLookAndFeel(String className) Set the current default look and feel using a class name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.Action

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.Action

Packages that use Action
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Action in javax.swing

Classes in javax.swing that implement Action
 class AbstractAction
This class provides default implementations for the JFC Action interface.

Methods in javax.swing that return Action
Action | AbstractButton.getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Action | JTextField.getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Action[] | JTextField.getActions() Fetches the command list for the editor.
Action | JComboBox.getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Action | ActionMap.get(Object key) Returns the binding for key, messaging the parent ActionMap if the binding is not locally defined.

Methods in javax.swing with parameters of type Action
void | AbstractButton.setAction(Action a) Sets the Action for the ActionEvent source.
protected void | AbstractButton.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | AbstractButton.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected void | JMenuItem.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | JMenuItem.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected void | JCheckBox.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | JCheckBox.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
void | JTextField.setAction(Action a) Sets the Action for the ActionEvent source.
protected void | JTextField.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | JTextField.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
JMenuItem | JMenu.add(Action a) Creates a new menu item attached to the specified Action object and appends it to the end of this menu.
protected JMenuItem | JMenu.createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JMenu.
JMenuItem | JMenu.insert(Action a, int pos) Inserts a new menu item attached to the specified Action object at a given position.
protected void | JButton.configurePropertiesFromAction(Action a) Factory method which sets the AbstractButton's properties according to values from the Action instance.
JMenuItem | JPopupMenu.add(Action a) Appends a new menu item to the end of the menu which dispatches the specified Action object.
protected JMenuItem | JPopupMenu.createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JPopupMenu.
void | JPopupMenu.insert(Action a, int index) Inserts a menu item for the specified Action object at a given position.
static boolean | SwingUtilities.notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers) Invokes actionPerformed on action if action is enabled (and non null).
void | JComboBox.setAction(Action a) Sets the Action for the ActionEvent source.
protected void | JComboBox.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | JComboBox.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
void | ActionMap.put(Object key, Action action) Adds a binding for key to action.
protected void | JRadioButton.configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | JRadioButton.createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
JButton | JToolBar.add(Action a) Adds a new JButton which dispatches the action.
protected JButton | JToolBar.createActionComponent(Action a) Factory method which creates the JButton for Actions added to the JToolBar.

Constructors in javax.swing with parameters of type Action
JMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
JCheckBoxMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
JToggleButton(Action a)
Creates a toggle button where properties are taken from the Action supplied.
JCheckBox(Action a)
Creates a check box where properties are taken from the Action supplied.
JMenu(Action a)
Constructs a menu whose properties are taken from the Action supplied.
JButton(Action a)
Creates a button where properties are taken from the Action supplied.
JRadioButton(Action a)
Creates a radiobutton where properties are taken from the Action supplied.
JRadioButtonMenuItem(Action a)
Creates a radio button menu item whose properties are taken from the Action supplied.

Uses of Action in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Action
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.

Fields in javax.swing.plaf.basic declared as Action
protected Action | BasicInternalFrameTitlePane.closeAction
protected Action | BasicInternalFrameTitlePane.maximizeAction
protected Action | BasicInternalFrameTitlePane.iconifyAction
protected Action | BasicInternalFrameTitlePane.restoreAction
protected Action | BasicInternalFrameTitlePane.moveAction
protected Action | BasicInternalFrameTitlePane.sizeAction
protected Action | BasicTreeUI.KeyHandler.repeatKeyAction Key code that is being generated for.

Methods in javax.swing.plaf.basic that return Action
Action | BasicFileChooserUI.getNewFolderAction()
Action | BasicFileChooserUI.getGoHomeAction()
Action | BasicFileChooserUI.getChangeToParentDirectoryAction()
Action | BasicFileChooserUI.getApproveSelectionAction()
Action | BasicFileChooserUI.getCancelSelectionAction()
Action | BasicFileChooserUI.getUpdateAction()

Uses of Action in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Action
protected  class MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item.

Uses of Action in javax.swing.text

Classes in javax.swing.text that implement Action
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
class | TextAction An Action implementation useful for key bindings that are shared across a number of different text components.

Methods in javax.swing.text that return Action
Action[] | JTextComponent.getActions() Fetches the command list for the editor.
Action | Keymap.getDefaultAction() Fetches the default action to fire if a key is typed (i.e.
Action | Keymap.getAction(KeyStroke key) Fetches the action appropriate for the given symbolic event sequence.
Action[] | Keymap.getBoundActions() Fetches all of the actions defined in this keymap.
abstract Action[] | EditorKit.getActions() Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
static Action[] | TextAction.augmentList(Action[] list1, Action[] list2) Takes one list of commands and augments it with another list of commands.
Action[] | DefaultEditorKit.getActions() Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
Action[] | StyledEditorKit.getActions() Fetches the command list for the editor.

Methods in javax.swing.text with parameters of type Action
static void | JTextComponent.loadKeymap(Keymap map, JTextComponent.KeyBinding[] bindings, Action[] actions) Loads a keymap with a bunch of bindings.
void | Keymap.setDefaultAction(Action a) Set the default action to fire if a key is typed.
KeyStroke[] | Keymap.getKeyStrokesForAction(Action a) Fetches the keystrokes that will result in the given action.
void | Keymap.addActionForKeyStroke(KeyStroke key, Action a) Adds a binding to the keymap.
static Action[] | TextAction.augmentList(Action[] list1, Action[] list2) Takes one list of commands and augments it with another list of commands.

Uses of Action in javax.swing.text.html

Classes in javax.swing.text.html that implement Action
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Methods in javax.swing.text.html that return Action
 Action[] HTMLEditorKit.getActions()
Fetches the command list for the editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.BoundedRangeModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.BoundedRangeModel

Packages that use BoundedRangeModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of BoundedRangeModel in javax.swing

Classes in javax.swing that implement BoundedRangeModel
 class DefaultBoundedRangeModel
A generic implementation of BoundedRangeModel.

Fields in javax.swing declared as BoundedRangeModel
protected BoundedRangeModel | JScrollBar.model The model that represents the scrollbar's minimum, maximum, extent (aka "visibleAmount") and current value.
protected BoundedRangeModel | JProgressBar.model The data structure that holds the various values for the progress bar.
protected BoundedRangeModel | JSlider.sliderModel The data model that handles the numeric maximum value, minimum value, and current-position value for the slider.

Methods in javax.swing that return BoundedRangeModel
BoundedRangeModel | JTextField.getHorizontalVisibility() Gets the visibility of the text field.
BoundedRangeModel | JScrollBar.getModel() Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
BoundedRangeModel | JProgressBar.getModel() Returns the data model used by the JProgressBar.
BoundedRangeModel | JSlider.getModel() Returns data model that handles the sliders three fundamental properties: minimum, maximum, value.

Methods in javax.swing with parameters of type BoundedRangeModel
void | JScrollBar.setModel(BoundedRangeModel newModel) Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
void | JProgressBar.setModel(BoundedRangeModel newModel) Sets the data model used by the JProgressBar.
void | JSlider.setModel(BoundedRangeModel newModel) Sets the model that handles the sliders three fundamental properties: minimum, maximum, value.

Constructors in javax.swing with parameters of type BoundedRangeModel
JProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar, the default orientation.
JSlider(BoundedRangeModel brm)
Creates a horizontal slider using the specified BoundedRangeModel.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ButtonModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ButtonModel

Packages that use ButtonModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of ButtonModel in javax.swing

Classes in javax.swing that implement ButtonModel
class | DefaultButtonModel The default implementation of a Button component's data model.
static class | JToggleButton.ToggleButtonModel The ToggleButton model

Fields in javax.swing declared as ButtonModel
protected  ButtonModel AbstractButton.model
The data model that determines the button's state.

Methods in javax.swing that return ButtonModel
ButtonModel | AbstractButton.getModel() Returns the model that this button represents.
ButtonModel | ButtonGroup.getSelection() Return the selected button model.

Methods in javax.swing with parameters of type ButtonModel
void | AbstractButton.setModel(ButtonModel newModel) Sets the model that this button represents.
void | JMenu.setModel(ButtonModel newModel) Sets the data model for the "menu button" -- the label that the user clicks to open or close the menu.
void | ButtonGroup.setSelected(ButtonModel m, boolean b) Sets the selected value for the button.
boolean | ButtonGroup.isSelected(ButtonModel m) Returns the selected value for the button.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.CellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.CellEditor

Packages that use CellEditor
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of CellEditor in javax.swing

Classes in javax.swing that implement CellEditor
class | AbstractCellEditor
class | DefaultCellEditor The default editor for table and tree cells.

Uses of CellEditor in javax.swing.table

Subinterfaces of CellEditor in javax.swing.table
 interface TableCellEditor
This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.

Uses of CellEditor in javax.swing.tree

Subinterfaces of CellEditor in javax.swing.tree
 interface TreeCellEditor
Adds to CellEditor the extensions necessary to configure an editor in a tree.

Classes in javax.swing.tree that implement CellEditor
 class DefaultTreeCellEditor
A TreeCellEditor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ComboBoxEditor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ComboBoxEditor

Packages that use ComboBoxEditor
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ComboBoxEditor in javax.swing

Fields in javax.swing declared as ComboBoxEditor
protected  ComboBoxEditor JComboBox.editor

Methods in javax.swing that return ComboBoxEditor
 ComboBoxEditor JComboBox.getEditor()
Returns the editor used to paint and edit the selected item in the JComboBox field.

Methods in javax.swing with parameters of type ComboBoxEditor
void | JComboBox.setEditor(ComboBoxEditor anEditor) Sets the editor used to paint and edit the selected item in the JComboBox field.
void | JComboBox.configureEditor(ComboBoxEditor anEditor, Object anItem) Initializes the editor with the specified item.

Uses of ComboBoxEditor in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ComboBoxEditor
class | BasicComboBoxEditor The default editor for editable combo boxes
static class | BasicComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.

Methods in javax.swing.plaf.basic that return ComboBoxEditor
protected  ComboBoxEditor BasicComboBoxUI.createEditor()
Creates the editor that is to be used in editable combo boxes.

Uses of ComboBoxEditor in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ComboBoxEditor
class | MetalComboBoxEditor The default editor for Metal editable combo boxes
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.

Methods in javax.swing.plaf.metal that return ComboBoxEditor
protected  ComboBoxEditor MetalComboBoxUI.createEditor()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ComboBoxModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ComboBoxModel

Packages that use ComboBoxModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ComboBoxModel in javax.swing

Subinterfaces of ComboBoxModel in javax.swing
 interface MutableComboBoxModel
A mutable version of ComboBoxModel.

Classes in javax.swing that implement ComboBoxModel
 class DefaultComboBoxModel
The default model for combo boxes.

Fields in javax.swing declared as ComboBoxModel
protected  ComboBoxModel JComboBox.dataModel

Methods in javax.swing that return ComboBoxModel
 ComboBoxModel JComboBox.getModel()
Returns the data model currently used by the JComboBox.

Methods in javax.swing with parameters of type ComboBoxModel
void | JComboBox.setModel(ComboBoxModel aModel) Sets the data model that the JComboBox uses to obtain the list of items.
int | JComboBox.KeySelectionManager.selectionForKey(char aKey, ComboBoxModel aModel) Given aKey and the model, returns the row that should become selected.

Constructors in javax.swing with parameters of type ComboBoxModel
JComboBox(ComboBoxModel aModel)
Creates a JComboBox that takes it's items from an existing ComboBoxModel.

Uses of ComboBoxModel in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ComboBoxModel
protected void | BasicComboPopup.uninstallComboBoxModelListeners(ComboBoxModel model)
protected void | BasicComboPopup.installComboBoxModelListeners(ComboBoxModel model)

Uses of ComboBoxModel in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ComboBoxModel
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.DesktopManager

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.DesktopManager

Packages that use DesktopManager
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of DesktopManager in javax.swing

Classes in javax.swing that implement DesktopManager
 class DefaultDesktopManager
This is an implementaion of the DesktopManager.

Methods in javax.swing that return DesktopManager
 DesktopManager JDesktopPane.getDesktopManager()
Returns the DesktopManger that handles desktop-specific UI actions.

Methods in javax.swing with parameters of type DesktopManager
 void JDesktopPane.setDesktopManager(DesktopManager d)
Sets the DesktopManger that will handle desktop-specific UI actions.

Uses of DesktopManager in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as DesktopManager
protected  DesktopManager BasicDesktopPaneUI.desktopManager

Methods in javax.swing.plaf.basic that return DesktopManager
protected DesktopManager | BasicInternalFrameUI.getDesktopManager() Returns the proper DesktopManager.
protected DesktopManager | BasicInternalFrameUI.createDesktopManager()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.Icon

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.Icon

Packages that use Icon
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Icon in javax.swing

Classes in javax.swing that implement Icon
 class ImageIcon
An implementation of the Icon interface that paints Icons from Images.

Fields in javax.swing declared as Icon
protected Icon | JOptionPane.icon Icon used in pane.
protected Icon | JInternalFrame.frameIcon The icon shown in the top-left corner of the frame.

Methods in javax.swing that return Icon
Icon | JTabbedPane.getIconAt(int index) Returns the tab icon at index.
Icon | JTabbedPane.getDisabledIconAt(int index) Returns the tab disabled icon at index.
Icon | AbstractButton.getIcon() Returns the default icon.
Icon | AbstractButton.getPressedIcon() Returns the pressed icon for the button.
Icon | AbstractButton.getSelectedIcon() Returns the selected icon for the button.
Icon | AbstractButton.getRolloverIcon() Returns the rollover icon for the button.
Icon | AbstractButton.getRolloverSelectedIcon() Returns the rollover selection icon for the button.
Icon | AbstractButton.getDisabledIcon() Returns the icon used by the button when it's disabled.
Icon | AbstractButton.getDisabledSelectedIcon() Returns the icon used by the button when it's disabled and selected.
Icon | JOptionPane.getIcon() Returns the icon this pane displays.
Icon | UIDefaults.getIcon(Object key) If the value of key is an Icon return it, otherwise return null.
Icon | JInternalFrame.getFrameIcon() Returns the image displayed in the title bar of the frame (usually in the top-left corner).
Icon | JLabel.getIcon() Returns the graphic image (glyph, icon) that the label displays.
Icon | JLabel.getDisabledIcon() Returns the value of the disabledIcon property if it's been set, If it hasn't been set and the value of the icon property is an ImageIcon, we compute a "grayed out" version of the icon and update the disabledIcon property with that.
Icon | JFileChooser.getIcon(File f) Returns the icon for this file or type of file, depending on the system.
static Icon | UIManager.getIcon(Object key) Returns an Icon from the defaults table.

Methods in javax.swing with parameters of type Icon
 void JTextPane.insertIcon(Icon g)
Inserts an icon into the document as a replacement for the currently selected content.
 void JTabbedPane.insertTab(String title, Icon icon, Component component, String tip, int index)
Inserts a component, at index, represented by a title and/or icon, either of which may be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component, String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Icon icon, Component component)
Adds a component represented by a title and/or icon, either of which can be null.
 void JTabbedPane.setIconAt(int index, Icon icon)
Sets the icon at index to icon which can be null.
 void JTabbedPane.setDisabledIconAt(int index, Icon disabledIcon)
Sets the disabled icon at index to icon which can be null.
 int JTabbedPane.indexOfTab(Icon icon)
Returns the first tab index with a given icon, or -1 if no tab has this icon.
 void AbstractButton.setIcon(Icon defaultIcon)
Sets the button's default icon.
 void AbstractButton.setPressedIcon(Icon pressedIcon)
Sets the pressed icon for the button.
 void AbstractButton.setSelectedIcon(Icon selectedIcon)
Sets the selected icon for the button.
 void AbstractButton.setRolloverIcon(Icon rolloverIcon)
Sets the rollover icon for the button.
 void AbstractButton.setRolloverSelectedIcon(Icon rolloverSelectedIcon)
Sets the rollover selected icon for the button.
 void AbstractButton.setDisabledIcon(Icon disabledIcon)
Sets the disabled icon for the button.
 void AbstractButton.setDisabledSelectedIcon(Icon disabledSelectedIcon)
Sets the disabled selection icon for the button.
protected  void AbstractButton.init(String text, Icon icon)
protected  void JMenuItem.init(String text, Icon icon)
Initialize the menu item with the specified text and icon.
static Object JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static void JOptionPane.showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up a dialog displaying a message, specifying all parameters.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static void JOptionPane.showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
Brings up an internal dialog panel displaying a message, specifying all parameters.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static Object JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
 void JOptionPane.setIcon(Icon newIcon)
Sets the icon to display.
static MatteBorder BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
Creates a matte-look border that consists of multiple tiles of a specified icon.
static String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
 void JInternalFrame.setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner).
 void JLabel.setIcon(Icon icon)
Defines the icon this component will display.
 void JLabel.setDisabledIcon(Icon disabledIcon)
Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).

Constructors in javax.swing with parameters of type Icon
JMenuItem(Icon icon)
Creates a menuItem with an icon.
JMenuItem(String text, Icon icon)
Creates a menu item with the supplied text and icon.
JCheckBoxMenuItem(Icon icon)
Creates an initially unselected check box menu item with an icon.
JCheckBoxMenuItem(String text, Icon icon)
Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(String text, Icon icon, boolean b)
Creates a check box menu item with the specified text, icon, and selection state.
JToggleButton(Icon icon)
Creates an initially unselected toggle button with the specified image but no text.
JToggleButton(Icon icon, boolean selected)
Creates a toggle button with the specified image and selection state, but no text.
JToggleButton(String text, Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected.
JToggleButton(String text, Icon icon, boolean selected)
Creates a toggle button with the specified text, image, and selection state.
JCheckBox(Icon icon)
Creates an initially unselected check box with an icon.
JCheckBox(Icon icon, boolean selected)
Creates a check box with an icon and specifies whether or not it is initially selected.
JCheckBox(String text, Icon icon)
Creates an initially unselected check box with the specified text and icon.
JCheckBox(String text, Icon icon, boolean selected)
Creates a check box with text and icon, and specifies whether or not it is initially selected.
JOptionPane(Object message, int messageType, int optionType, Icon icon)
Creates an instance of JOptionPane to display a message with the specified message type, options, and icon.
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options)
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options.
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options, with the initially-selected option specified.
JButton(Icon icon)
Creates a button with an icon.
JButton(String text, Icon icon)
Creates a button with initial text and an icon.
AbstractAction(String name, Icon icon)
Defines an Action object with the specified description string and a the specified icon.
JLabel(String text, Icon icon, int horizontalAlignment)
Creates a JLabel instance with the specified text, image, and horizontal alignment.
JLabel(Icon image, int horizontalAlignment)
Creates a JLabel instance with the specified image and horizontal alignment.
JLabel(Icon image)
Creates a JLabel instance with the specified image.
JRadioButton(Icon icon)
Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Icon icon, boolean selected)
Creates a radio button with the specified image and selection state, but no text.
JRadioButton(String text, Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String text, Icon icon, boolean selected)
Creates a radio button that has the specified text, image, and selection state.
JRadioButtonMenuItem(Icon icon)
Creates a JRadioButtonMenuItem with an icon.
JRadioButtonMenuItem(String text, Icon icon)
Creates a radio button menu item with the specified text and Icon.
JRadioButtonMenuItem(Icon icon, boolean selected)
Creates a radio button menu item with the specified image and selection state, but no text.
JRadioButtonMenuItem(String text, Icon icon, boolean selected)
Creates a radio button menu item that has the specified text, image, and selection state.

Uses of Icon in javax.swing.border

Fields in javax.swing.border declared as Icon
protected  Icon MatteBorder.tileIcon

Methods in javax.swing.border that return Icon
 Icon MatteBorder.getTileIcon()
Returns the icon used for tiling the border or null if a solid color is being used.

Constructors in javax.swing.border with parameters of type Icon
MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
MatteBorder(Insets borderInsets, Icon tileIcon)
Creates a matte border with the specified insets and tile icon.
MatteBorder(Icon tileIcon)
Creates a matte border with the specified tile icon.

Uses of Icon in javax.swing.colorchooser

Methods in javax.swing.colorchooser that return Icon
abstract Icon | AbstractColorChooserPanel.getSmallDisplayIcon() Returns the large display icon for the panel.
abstract Icon | AbstractColorChooserPanel.getLargeDisplayIcon() Returns the small display icon for the panel.

Uses of Icon in javax.swing.filechooser

Methods in javax.swing.filechooser that return Icon
 Icon FileView.getIcon(File f)
The icon that represents this file in the JFileChooser.

Uses of Icon in javax.swing.plaf

Classes in javax.swing.plaf that implement Icon
 class IconUIResource

Constructors in javax.swing.plaf with parameters of type Icon
BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)
BorderUIResource.MatteBorderUIResource(Icon tileIcon)
IconUIResource(Icon delegate)
Creates a UIResource icon object which wraps an existing Icon instance.

Uses of Icon in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as Icon
protected Icon | BasicMenuItemUI.arrowIcon
protected Icon | BasicMenuItemUI.checkIcon
protected Icon | BasicRadioButtonUI.icon
protected Icon | BasicInternalFrameTitlePane.maxIcon
protected Icon | BasicInternalFrameTitlePane.minIcon
protected Icon | BasicInternalFrameTitlePane.iconIcon
protected Icon | BasicInternalFrameTitlePane.closeIcon
protected Icon | BasicFileChooserUI.directoryIcon
protected Icon | BasicFileChooserUI.fileIcon
protected Icon | BasicFileChooserUI.computerIcon
protected Icon | BasicFileChooserUI.hardDriveIcon
protected Icon | BasicFileChooserUI.floppyDriveIcon
protected Icon | BasicFileChooserUI.newFolderIcon
protected Icon | BasicFileChooserUI.upFolderIcon
protected Icon | BasicFileChooserUI.homeFolderIcon
protected Icon | BasicFileChooserUI.listViewIcon
protected Icon | BasicFileChooserUI.detailsViewIcon
protected Icon | BasicTreeUI.collapsedIcon
protected Icon | BasicTreeUI.expandedIcon

Methods in javax.swing.plaf.basic that return Icon
Icon | BasicRadioButtonUI.getDefaultIcon()
static Icon | BasicIconFactory.getMenuItemCheckIcon()
static Icon | BasicIconFactory.getMenuItemArrowIcon()
static Icon | BasicIconFactory.getMenuArrowIcon()
static Icon | BasicIconFactory.getCheckBoxIcon()
static Icon | BasicIconFactory.getRadioButtonIcon()
static Icon | BasicIconFactory.getCheckBoxMenuItemIcon()
static Icon | BasicIconFactory.getRadioButtonMenuItemIcon()
static Icon | BasicIconFactory.createEmptyFrameIcon()
protected Icon | BasicOptionPaneUI.getIcon() Returns the icon from the JOptionPane the reciever is providing the look and feel for, or the default icon as returned from getDefaultIcon.
protected Icon | BasicOptionPaneUI.getIconForType(int messageType) Returns the icon to use for the passed in type.
protected Icon | BasicTabbedPaneUI.getIconForTab(int tabIndex)
Icon | BasicFileChooserUI.BasicFileView.getCachedIcon(File f)
Icon | BasicFileChooserUI.BasicFileView.getIcon(File f)
Icon | BasicTreeUI.getExpandedIcon()
Icon | BasicTreeUI.getCollapsedIcon()

Methods in javax.swing.plaf.basic with parameters of type Icon
protected  Dimension BasicMenuItemUI.getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
protected  void BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
 void BasicFileChooserUI.BasicFileView.cacheIcon(File f, Icon i)
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
 void BasicTreeUI.setExpandedIcon(Icon newG)
 void BasicTreeUI.setCollapsedIcon(Icon newG)
protected  void BasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)

Uses of Icon in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement Icon
class | MetalCheckBoxIcon CheckboxIcon implementation for OrganicCheckBoxUI
class | MetalComboBoxIcon This utility class draws the horizontal bars which indicate a MetalComboBox
static class | MetalIconFactory.FileIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.FolderIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.PaletteCloseIcon Defines an icon for Palette close
static class | MetalIconFactory.TreeControlIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeFolderIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeLeafIcon

Fields in javax.swing.plaf.metal declared as Icon
protected Icon | MetalInternalFrameTitlePane.paletteCloseIcon
protected Icon | MetalComboBoxButton.comboIcon
protected static Icon | MetalSliderUI.horizThumbIcon
protected static Icon | MetalSliderUI.vertThumbIcon

Methods in javax.swing.plaf.metal that return Icon
Icon | MetalComboBoxButton.getComboIcon()
static Icon | MetalIconFactory.getFileChooserDetailViewIcon()
static Icon | MetalIconFactory.getFileChooserHomeFolderIcon()
static Icon | MetalIconFactory.getFileChooserListViewIcon()
static Icon | MetalIconFactory.getFileChooserNewFolderIcon()
static Icon | MetalIconFactory.getFileChooserUpFolderIcon()
static Icon | MetalIconFactory.getInternalFrameAltMaximizeIcon(int size)
static Icon | MetalIconFactory.getInternalFrameCloseIcon(int size)
static Icon | MetalIconFactory.getInternalFrameDefaultMenuIcon()
static Icon | MetalIconFactory.getInternalFrameMaximizeIcon(int size)
static Icon | MetalIconFactory.getInternalFrameMinimizeIcon(int size)
static Icon | MetalIconFactory.getRadioButtonIcon()
static Icon | MetalIconFactory.getCheckBoxIcon() Returns a checkbox icon
static Icon | MetalIconFactory.getTreeComputerIcon()
static Icon | MetalIconFactory.getTreeFloppyDriveIcon()
static Icon | MetalIconFactory.getTreeFolderIcon()
static Icon | MetalIconFactory.getTreeHardDriveIcon()
static Icon | MetalIconFactory.getTreeLeafIcon()
static Icon | MetalIconFactory.getTreeControlIcon(boolean isCollapsed)
static Icon | MetalIconFactory.getMenuArrowIcon()
static Icon | MetalIconFactory.getMenuItemCheckIcon()
static Icon | MetalIconFactory.getMenuItemArrowIcon()
static Icon | MetalIconFactory.getCheckBoxMenuItemIcon()
static Icon | MetalIconFactory.getRadioButtonMenuItemIcon()
static Icon | MetalIconFactory.getHorizontalSliderThumbIcon()
static Icon | MetalIconFactory.getVerticalSliderThumbIcon()

Methods in javax.swing.plaf.metal with parameters of type Icon
 void MetalComboBoxButton.setComboIcon(Icon i)

Constructors in javax.swing.plaf.metal with parameters of type Icon
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)

Uses of Icon in javax.swing.text

Methods in javax.swing.text that return Icon
static Icon StyleConstants.getIcon(AttributeSet a)
Gets the icon setting from the attribute list.

Methods in javax.swing.text with parameters of type Icon
static void StyleConstants.setIcon(MutableAttributeSet a, Icon c)
Sets the icon attribute.

Uses of Icon in javax.swing.tree

Fields in javax.swing.tree declared as Icon
protected Icon | DefaultTreeCellRenderer.closedIcon Icon used to show non-leaf nodes that aren't expanded.
protected Icon | DefaultTreeCellRenderer.leafIcon Icon used to show leaf nodes.
protected Icon | DefaultTreeCellRenderer.openIcon Icon used to show non-leaf nodes that are expanded.
protected Icon | DefaultTreeCellEditor.editingIcon Icon to use when editing.

Methods in javax.swing.tree that return Icon
Icon | DefaultTreeCellRenderer.getDefaultOpenIcon() Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.
Icon | DefaultTreeCellRenderer.getDefaultClosedIcon() Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.
Icon | DefaultTreeCellRenderer.getDefaultLeafIcon() Returns the default icon, for the current laf, that is used to represent leaf nodes.
Icon | DefaultTreeCellRenderer.getOpenIcon() Returns the icon used to represent non-leaf nodes that are expanded.
Icon | DefaultTreeCellRenderer.getClosedIcon() Returns the icon used to represent non-leaf nodes that are not expanded.
Icon | DefaultTreeCellRenderer.getLeafIcon() Returns the icon used to represent leaf nodes.

Methods in javax.swing.tree with parameters of type Icon
void | DefaultTreeCellRenderer.setOpenIcon(Icon newIcon) Sets the icon used to represent non-leaf nodes that are expanded.
void | DefaultTreeCellRenderer.setClosedIcon(Icon newIcon) Sets the icon used to represent non-leaf nodes that are not expanded.
void | DefaultTreeCellRenderer.setLeafIcon(Icon newIcon) Sets the icon used to represent leaf nodes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.JComboBox.KeySelectionManager

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.JComboBox.KeySelectionManager

Packages that use JComboBox.KeySelectionManager
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JComboBox.KeySelectionManager in javax.swing

Fields in javax.swing declared as JComboBox.KeySelectionManager
protected  JComboBox.KeySelectionManager JComboBox.keySelectionManager

Methods in javax.swing that return JComboBox.KeySelectionManager
JComboBox.KeySelectionManager | JComboBox.getKeySelectionManager() Returns the list's key-selection manager.
protected JComboBox.KeySelectionManager | JComboBox.createDefaultKeySelectionManager() Returns an instance of the default key-selection manager.

Methods in javax.swing with parameters of type JComboBox.KeySelectionManager
 void JComboBox.setKeySelectionManager(JComboBox.KeySelectionManager aManager)
Sets the object that translates a keyboard character into a list selection.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ListCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ListCellRenderer

Packages that use ListCellRenderer
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ListCellRenderer in javax.swing

Classes in javax.swing that implement ListCellRenderer
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.

Fields in javax.swing declared as ListCellRenderer
protected  ListCellRenderer JComboBox.renderer

Methods in javax.swing that return ListCellRenderer
ListCellRenderer | JComboBox.getRenderer() Returns the renderer used to display the selected item in the JComboBox field.
ListCellRenderer | JList.getCellRenderer() Returns the object that renders the list items.

Methods in javax.swing with parameters of type ListCellRenderer
void | JComboBox.setRenderer(ListCellRenderer aRenderer) Sets the renderer that paints the item selected from the list in the JComboBox field.
void | JList.setCellRenderer(ListCellRenderer cellRenderer) Sets the delegate that's used to paint each cell in the list.

Uses of ListCellRenderer in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ListCellRenderer
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.

Methods in javax.swing.plaf.basic that return ListCellRenderer
protected  ListCellRenderer BasicComboBoxUI.createRenderer()
Creates the renderer that is to be used in the combo box.

Methods in javax.swing.plaf.basic with parameters of type ListCellRenderer
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.

Uses of ListCellRenderer in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ListCellRenderer
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ListModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ListModel

Packages that use ListModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ListModel in javax.swing

Subinterfaces of ListModel in javax.swing
interface | ComboBoxModel ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
interface | MutableComboBoxModel A mutable version of ComboBoxModel.

Classes in javax.swing that implement ListModel
class | AbstractListModel The Abstract definition for the data model the provides a List with its contents.
class | DefaultComboBoxModel The default model for combo boxes.
class | DefaultListModel This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.

Methods in javax.swing that return ListModel
 ListModel JList.getModel()
Returns the data model that holds the list of items displayed by the JList component.

Methods in javax.swing with parameters of type ListModel
 void JList.setModel(ListModel model)
Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners.

Constructors in javax.swing with parameters of type ListModel
JList(ListModel dataModel)
Constructs a JList that displays the elements in the specified, non-null model.

Uses of ListModel in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ListModel
 class BasicDirectoryModel
Basic implementation of a file list.

Methods in javax.swing.plaf.basic with parameters of type ListModel
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.

Uses of ListModel in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ListModel
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ListSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ListSelectionModel

Packages that use ListSelectionModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of ListSelectionModel in javax.swing

Classes in javax.swing that implement ListSelectionModel
 class DefaultListSelectionModel
Default data model for list selections.

Fields in javax.swing declared as ListSelectionModel
protected  ListSelectionModel JTable.selectionModel
The ListSelectionModel of the table, used to keep track of row selections.

Methods in javax.swing that return ListSelectionModel
protected ListSelectionModel | JList.createSelectionModel() Returns an instance of DefaultListSelectionModel.
ListSelectionModel | JList.getSelectionModel() Returns the value of the current selection model.
ListSelectionModel | JTable.getSelectionModel() Returns the ListSelectionModel that is used to maintain row selection state.
protected ListSelectionModel | JTable.createDefaultSelectionModel() Returns the default selection model object, which is a DefaultListSelectionModel.

Methods in javax.swing with parameters of type ListSelectionModel
void | JList.setSelectionModel(ListSelectionModel selectionModel) Sets the selectionModel for the list to a non-null ListSelectionModel implementation.
void | JTable.setSelectionModel(ListSelectionModel newModel) Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.

Constructors in javax.swing with parameters of type ListSelectionModel
JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.

Uses of ListSelectionModel in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ListSelectionModel
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.

Uses of ListSelectionModel in javax.swing.table

Fields in javax.swing.table declared as ListSelectionModel
protected  ListSelectionModel DefaultTableColumnModel.selectionModel
Model for keeping track of column selections

Methods in javax.swing.table that return ListSelectionModel
ListSelectionModel | DefaultTableColumnModel.getSelectionModel() Returns the ListSelectionModel that is used to maintain column selection state.
protected ListSelectionModel | DefaultTableColumnModel.createSelectionModel() Creates a new default list selection model.
ListSelectionModel | TableColumnModel.getSelectionModel() Returns the current selection model.

Methods in javax.swing.table with parameters of type ListSelectionModel
void | DefaultTableColumnModel.setSelectionModel(ListSelectionModel newModel) Sets the selection model for this TableColumnModel to newModel and registers for listener notifications from the new selection model.
void | TableColumnModel.setSelectionModel(ListSelectionModel newModel) Sets the selection model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.MenuElement

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.MenuElement

Packages that use MenuElement
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MenuElement in javax.swing

Classes in javax.swing that implement MenuElement
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuBar An implementation of a menu bar.
class | JMenuItem An implementation of an item in a menu.
class | JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
class | JRadioButtonMenuItem An implementation of a radio button menu item.

Methods in javax.swing that return MenuElement
MenuElement[] | JMenuItem.getSubElements() This method returns an array containing the sub-menu components for this menu component.
MenuElement[] | JMenu.getSubElements() Returns an array of MenuElements containing the submenu for this menu component.
MenuElement[] | MenuSelectionManager.getSelectedPath() Returns the path to the currently selected menu item
MenuElement[] | JPopupMenu.getSubElements() Returns an array of MenuElements containing the submenu for this menu component.
MenuElement[] | JMenuBar.getSubElements() Implemented to be a MenuElement -- returns the menus in this menu bar.
MenuElement[] | MenuElement.getSubElements() This method should return an array containing the sub-elements for the receiving menu element

Methods in javax.swing with parameters of type MenuElement
void | JMenuItem.processMouseEvent(MouseEvent e, MenuElement[] path, MenuSelectionManager manager) Process a mouse event forwarded from the MenuSelectionManager.
void | JMenuItem.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Process a key event forwarded from the MenuSelectionManager.
void | MenuSelectionManager.setSelectedPath(MenuElement[] path) Change the selection in the menu hierarchy.
void | JPopupMenu.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | JPopupMenu.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | JMenuBar.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | JMenuBar.processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | MenuElement.processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Process a mouse event.
void | MenuElement.processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager) Process a key event.

Uses of MenuElement in javax.swing.event

Methods in javax.swing.event that return MenuElement
MenuElement[] | MenuKeyEvent.getPath() Returns the path to the menu item referenced by this event.
MenuElement[] | MenuDragMouseEvent.getPath() Returns the path to the selected menu item.

Constructors in javax.swing.event with parameters of type MenuElement
MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuKeyEvent object.
MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuDragMouseEvent object.

Uses of MenuElement in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement MenuElement
class | BasicComboPopup This is an implementation of the ComboPopup interface.
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.

Methods in javax.swing.plaf.basic that return MenuElement
 MenuElement[] BasicMenuItemUI.getPath()

Methods in javax.swing.plaf.basic with parameters of type MenuElement
void | BasicRadioButtonMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
void | BasicCheckBoxMenuItemUI.processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)

Uses of MenuElement in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement MenuElement
 class MetalComboBoxUI.MetalComboPopup
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.MutableComboBoxModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.MutableComboBoxModel

Packages that use MutableComboBoxModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of MutableComboBoxModel in javax.swing

Classes in javax.swing that implement MutableComboBoxModel
 class DefaultComboBoxModel
The default model for combo boxes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.RootPaneContainer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.RootPaneContainer

Packages that use RootPaneContainer
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of RootPaneContainer in javax.swing

Classes in javax.swing that implement RootPaneContainer
class | JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
class | JDialog The main class for creating a dialog window.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
class | JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.Scrollable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.Scrollable

Packages that use Scrollable
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of Scrollable in javax.swing

Classes in javax.swing that implement Scrollable
class | JEditorPane A text component to edit various kinds of content.
class | JList A component that allows the user to select one or more objects from a list.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.
class | JTree A control that displays a set of hierarchical data as an outline.

Uses of Scrollable in javax.swing.text

Classes in javax.swing.text that implement Scrollable
 class JTextComponent
JTextComponent is the base class for swing text components.

Uses of Scrollable in javax.swing.tree

Classes in javax.swing.tree that implement Scrollable
 class DefaultTreeCellEditor.DefaultTextField
TextField used when no editor is supplied.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.ScrollPaneConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.ScrollPaneConstants

Packages that use ScrollPaneConstants
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ScrollPaneConstants in javax.swing

Classes in javax.swing that implement ScrollPaneConstants
class | JScrollPane Provides a scrollable view of a component.
class | ScrollPaneLayout The layout manager used by JScrollPane.
static class | ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.

Uses of ScrollPaneConstants in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ScrollPaneConstants
 class BasicScrollPaneUI
A default L&F implementation of ScrollPaneUI.

Uses of ScrollPaneConstants in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ScrollPaneConstants
 class MetalScrollPaneUI
A Metal L&F implementation of ScrollPaneUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.SingleSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.SingleSelectionModel

Packages that use SingleSelectionModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of SingleSelectionModel in javax.swing

Classes in javax.swing that implement SingleSelectionModel
 class DefaultSingleSelectionModel
A generic implementation of SingleSelectionModel.

Fields in javax.swing declared as SingleSelectionModel
protected  SingleSelectionModel JTabbedPane.model
The default selection model

Methods in javax.swing that return SingleSelectionModel
SingleSelectionModel | JTabbedPane.getModel() Returns the model associated with this tabbedpane.
SingleSelectionModel | JPopupMenu.getSelectionModel() Returns the model object that handles single selections.
SingleSelectionModel | JMenuBar.getSelectionModel() Returns the model object that handles single selections.

Methods in javax.swing with parameters of type SingleSelectionModel
void | JTabbedPane.setModel(SingleSelectionModel model) Sets the model to be used with this tabbedpane.
void | JPopupMenu.setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.
void | JMenuBar.setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.SwingConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.SwingConstants

Packages that use SwingConstants
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of SwingConstants in javax.swing

Classes in javax.swing that implement SwingConstants
class | AbstractButton Defines common behaviors for buttons and menu items.
class | DefaultListCellRenderer Renders an item in a list.
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
class | JButton An implementation of a "push" button.
class | JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
class | JCheckBoxMenuItem A menu item that can be selected or deselected.
class | JLabel A display area for a short text string or an image, or both.
class | JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
class | JMenuItem An implementation of an item in a menu.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
static class | JPopupMenu.Separator A popup menu-specific separator.
class | JProgressBar A component that displays an integer value within a bounded interval.
class | JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
class | JRadioButtonMenuItem An implementation of a radio button menu item.
class | JSeparator An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
class | JSlider A component that lets the user graphically select a value by slding a knob within a bounded interval.
class | JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JToggleButton An implementation of a two-state button.
class | JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
static class | JToolBar.Separator A toolbar-specific separator.
class | SwingUtilities A collection of utility methods for Swing.

Uses of SwingConstants in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement SwingConstants
class | BasicArrowButton JButton object that draws a scaled Arrow in one of the cardinal directions.
class | BasicComboBoxRenderer ComboBox renderer
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
class | BasicScrollBarUI Implementation of ScrollBarUI for the Basic Look and Feel
class | BasicTabbedPaneUI A Basic L&F implementation of TabbedPaneUI.
class | BasicToolBarUI A Basic L&F implementation of ToolBarUI.

Uses of SwingConstants in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement SwingConstants
static class | MetalBorders.ToolBarBorder
class | MetalComboBoxButton JButton subclass to help out MetalComboBoxUI
protected class | MetalFileChooserUI.FileRenderer
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
class | MetalScrollBarUI Implementation of ScrollBarUI for the Metal Look and Feel
class | MetalScrollButton JButton object for Metal scrollbar arrows.
class | MetalTabbedPaneUI The Metal subclass of BasicTabbedPaneUI.
class | MetalToolBarUI A Metal Look and Feel implementation of ToolBarUI.

Uses of SwingConstants in javax.swing.table

Classes in javax.swing.table that implement SwingConstants
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.

Uses of SwingConstants in javax.swing.text

Classes in javax.swing.text that implement SwingConstants
class | AsyncBoxView A box that does layout asynchronously.
class | BoxView A view that arranges its children into a box shape by tiling it's children along an axis.
class | ComponentView Component decorator that implements the view interface.
class | CompositeView A view that is composed of other views (has children).
class | FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
class | FlowView A View that tries to flow it's children into some partially constrained space.
class | GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
class | IconView Icon decorator that implements the view interface.
class | LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | PasswordView Implements a View suitable for use in JPasswordField UI implementations.
class | PlainView Implements View interface for a simple multi-line text view that has text in one font and color.
class | TableView Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
class | View A very important part of the text package is the View class.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
class | ZoneView ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Uses of SwingConstants in javax.swing.text.html

Classes in javax.swing.text.html that implement SwingConstants
class | BlockView A view implementation to display a block (as a box) with CSS specifications.
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
class | InlineView Displays the inline element styles based upon css attributes.
class | ListView A view implementation to display an html list
class | ObjectView Component decorator that implements the view interface for <object> elements.

Uses of SwingConstants in javax.swing.tree

Classes in javax.swing.tree that implement SwingConstants
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellRenderer Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.UIDefaults.LazyValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.UIDefaults.LazyValue

Packages that use UIDefaults.LazyValue
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of UIDefaults.LazyValue in javax.swing

Classes in javax.swing that implement UIDefaults.LazyValue
static class | UIDefaults.LazyInputMap LazyInputMap will create a InputMap in its createValue method.
static class | UIDefaults.ProxyLazyValue This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.WindowConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.WindowConstants

Packages that use WindowConstants
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of WindowConstants in javax.swing

Classes in javax.swing that implement WindowConstants
class | JDialog The main class for creating a dialog window.
class | JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
class | JInternalFrame A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


javax.swing.colorchooser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.colorchooser

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.colorchooser.ColorChooserComponentFactory
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.JPanel (implements javax.accessibility.Accessible)
            • class javax.swing.colorchooser.AbstractColorChooserPanel
    • class javax.swing.colorchooser.DefaultColorSelectionModel (implements javax.swing.colorchooser.ColorSelectionModel, java.io.Serializable)

Interface Hierarchy

  • interface javax.swing.colorchooser.ColorSelectionModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.colorchooser

Contains classes and interfaces used by the JColorChooser component.

See:
Description

Interface Summary
ColorSelectionModel A model that supports selecting a Color.

Class Summary
AbstractColorChooserPanel | This is the abstract superclass for color choosers.
ColorChooserComponentFactory | A class designed to produce preconfigured "accessory" objects to insert into color choosers.
DefaultColorSelectionModel | A generic implementation of ColorSelectionModel.

Package javax.swing.colorchooser Description

Contains classes and interfaces used by the JColorChooser component.

Related Documentation

This document forms the complete API specification. For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use Color Choosers, a section in The Java Tutorial.
  • Internationalization Documentation
  • Input Method Framework Documentation

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.colorchooser

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.colorchooser

Packages that use javax.swing.colorchooser
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Classes in javax.swing.colorchooser used by javax.swing
AbstractColorChooserPanel
This is the abstract superclass for color choosers.
ColorSelectionModel
A model that supports selecting a Color.

Classes in javax.swing.colorchooser used by javax.swing.colorchooser
AbstractColorChooserPanel
This is the abstract superclass for color choosers.
ColorSelectionModel
A model that supports selecting a Color.

Classes in javax.swing.colorchooser used by javax.swing.plaf.basic
AbstractColorChooserPanel
This is the abstract superclass for color choosers.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractColorChooserPanel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.colorchooser
Class AbstractColorChooserPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--javax.swing.colorchooser.AbstractColorChooserPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public abstract class AbstractColorChooserPanel
extends JPanel

This is the abstract superclass for color choosers. If you want to add a new color chooser panel into a JColorChooser, subclass this class.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
AbstractColorChooserPanel()
Method Summary
protected abstract void | buildChooser() Builds a new chooser panel.
protected Color | getColorFromModel() Returns the color that is currently selected.
ColorSelectionModel | getColorSelectionModel() Returns the model that the chooser panel is editing.
abstract String | getDisplayName() Returns a string containing the display name of the panel.
abstract Icon | getLargeDisplayIcon() Returns the small display icon for the panel.
abstract Icon | getSmallDisplayIcon() Returns the large display icon for the panel.
void | installChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is added to the chooser.
void | paint(Graphics g) Draws the panel.
void | uninstallChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is removed from the chooser.
abstract void | updateChooser() Invoked automatically when the model's state changes.
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractColorChooserPanel

public AbstractColorChooserPanel()
Method Detail

updateChooser

public abstract void updateChooser()
Invoked automatically when the model's state changes. It is also called by installChooserPanel to allow you to set up the initial state of your chooser. Override this method to update your ChooserPanel.

buildChooser

protected abstract void buildChooser()
Builds a new chooser panel.

getDisplayName

public abstract String getDisplayName()
Returns a string containing the display name of the panel.
Returns:
the name of the display panel

getSmallDisplayIcon

public abstract Icon getSmallDisplayIcon()
Returns the large display icon for the panel.
Returns:
the large display icon

getLargeDisplayIcon

public abstract Icon getLargeDisplayIcon()
Returns the small display icon for the panel.
Returns:
the small display icon

installChooserPanel

public void installChooserPanel(JColorChooser enclosingChooser)
Invoked when the panel is added to the chooser. If you're going to override this, be sure to call super.
Parameters:
enclosingChooser - the panel to be added
Throws:
RuntimeException - if the chooser panel has already been installed

uninstallChooserPanel

public void uninstallChooserPanel(JColorChooser enclosingChooser)
Invoked when the panel is removed from the chooser. If you're going to override this, be sure to call super.

getColorSelectionModel

public ColorSelectionModel getColorSelectionModel()
Returns the model that the chooser panel is editing.
Returns:
the ColorSelectionModel model this panel is editing

getColorFromModel

protected Color getColorFromModel()
Returns the color that is currently selected.
Returns:
the Color that is selected

paint

public void paint(Graphics g)
Draws the panel.
Overrides:
paint in class JComponent
Parameters:
g - the Graphics object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.colorchooser.ColorChooserComponentFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.colorchooser.ColorChooserComponentFactory

No usage of javax.swing.colorchooser.ColorChooserComponentFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.colorchooser.DefaultColorSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.colorchooser.DefaultColorSelectionModel

No usage of javax.swing.colorchooser.DefaultColorSelectionModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.colorchooser.AbstractColorChooserPanel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.colorchooser.AbstractColorChooserPanel

Packages that use AbstractColorChooserPanel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of AbstractColorChooserPanel in javax.swing

Methods in javax.swing that return AbstractColorChooserPanel
AbstractColorChooserPanel | JColorChooser.removeChooserPanel(AbstractColorChooserPanel panel) Removes the Color Panel specified.
AbstractColorChooserPanel[] | JColorChooser.getChooserPanels() Returns the specified color panels.

Methods in javax.swing with parameters of type AbstractColorChooserPanel
void | JColorChooser.addChooserPanel(AbstractColorChooserPanel panel) Adds a color chooser panel to the color chooser.
AbstractColorChooserPanel | JColorChooser.removeChooserPanel(AbstractColorChooserPanel panel) Removes the Color Panel specified.
void | JColorChooser.setChooserPanels(AbstractColorChooserPanel[] panels) Specifies the Color Panels used to choose a color value.

Uses of AbstractColorChooserPanel in javax.swing.colorchooser

Methods in javax.swing.colorchooser that return AbstractColorChooserPanel
static AbstractColorChooserPanel[] ColorChooserComponentFactory.getDefaultChooserPanels()

Uses of AbstractColorChooserPanel in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as AbstractColorChooserPanel
protected  AbstractColorChooserPanel[] BasicColorChooserUI.defaultChoosers

Methods in javax.swing.plaf.basic that return AbstractColorChooserPanel
protected  AbstractColorChooserPanel[] BasicColorChooserUI.createDefaultChoosers()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.colorchooser.ColorSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.colorchooser.ColorSelectionModel

Packages that use ColorSelectionModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.

Uses of ColorSelectionModel in javax.swing

Methods in javax.swing that return ColorSelectionModel
 ColorSelectionModel JColorChooser.getSelectionModel()
Returns the data model that handles color selections.

Methods in javax.swing with parameters of type ColorSelectionModel
 void JColorChooser.setSelectionModel(ColorSelectionModel newModel)
Set the model containing the selected color.

Constructors in javax.swing with parameters of type ColorSelectionModel
JColorChooser(ColorSelectionModel model)
Creates a color chooser pane with the specified ColorSelectionModel.

Uses of ColorSelectionModel in javax.swing.colorchooser

Classes in javax.swing.colorchooser that implement ColorSelectionModel
 class DefaultColorSelectionModel
A generic implementation of ColorSelectionModel.

Methods in javax.swing.colorchooser that return ColorSelectionModel
 ColorSelectionModel AbstractColorChooserPanel.getColorSelectionModel()
Returns the model that the chooser panel is editing.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ColorChooserComponentFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.colorchooser
Class ColorChooserComponentFactory

java.lang.Object
  |
  +--javax.swing.colorchooser.ColorChooserComponentFactory
public class ColorChooserComponentFactory
extends Object

A class designed to produce preconfigured "accessory" objects to insert into color choosers.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Method Summary
static AbstractColorChooserPanel[] | getDefaultChooserPanels()
static JComponent | getPreviewPanel()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getDefaultChooserPanels

public static AbstractColorChooserPanel[] getDefaultChooserPanels()

getPreviewPanel

public static JComponent getPreviewPanel()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ColorSelectionModel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.colorchooser
Interface ColorSelectionModel

All Known Implementing Classes:
DefaultColorSelectionModel
public interface ColorSelectionModel

A model that supports selecting a Color.

See Also:
Color

Method Summary
void | addChangeListener(ChangeListener listener) Adds listener as a listener to changes in the model.
Color | getSelectedColor()
void | removeChangeListener(ChangeListener listener) Removes listener as a listener to changes in the model.
void | setSelectedColor(Color color) Sets the model's selected color to color.

Method Detail

getSelectedColor

public Color getSelectedColor()
Returns:
the model's selection.
See Also:
setSelectedColor(java.awt.Color)

setSelectedColor

public void setSelectedColor(Color color)
Sets the model's selected color to color. Notifies any listeners if the model changes
See Also:
getSelectedColor(), addChangeListener(javax.swing.event.ChangeListener)

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds listener as a listener to changes in the model.

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes listener as a listener to changes in the model.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DefaultColorSelectionModel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.colorchooser
Class DefaultColorSelectionModel

java.lang.Object
  |
  +--javax.swing.colorchooser.DefaultColorSelectionModel
All Implemented Interfaces:
ColorSelectionModel, Serializable
public class DefaultColorSelectionModel
extends Object
implements ColorSelectionModel, Serializable

A generic implementation of ColorSelectionModel.

See Also:
Color, Serialized Form

Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected EventListenerList | listenerList
Constructor Summary
DefaultColorSelectionModel()
Default constructor.
DefaultColorSelectionModel(Color color)
Initializes selectedColor to color
Method Summary
 void addChangeListener(ChangeListener l)
Adds a ChangeListener to the model.
protected  void fireStateChanged()
Run each ChangeListeners stateChanged() method.
 Color getSelectedColor()
 void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the model.
 void setSelectedColor(Color color)
Sets the model's selected color to color.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".

listenerList

protected EventListenerList listenerList
Constructor Detail

DefaultColorSelectionModel

public DefaultColorSelectionModel()
Default constructor. Initializes selectedColor to Color.white

DefaultColorSelectionModel

public DefaultColorSelectionModel(Color color)
Initializes selectedColor to color
Method Detail

getSelectedColor

public Color getSelectedColor()
Specified by:
getSelectedColor in interface ColorSelectionModel
Following copied from interface: javax.swing.colorchooser.ColorSelectionModel
Returns:
the model's selection.
See Also:
ColorSelectionModel.setSelectedColor(java.awt.Color)

setSelectedColor

public void setSelectedColor(Color color)
Description copied from interface: ColorSelectionModel
Sets the model's selected color to color. Notifies any listeners if the model changes
Specified by:
setSelectedColor in interface ColorSelectionModel
Following copied from interface: javax.swing.colorchooser.ColorSelectionModel
See Also:
ColorSelectionModel.getSelectedColor(), ColorSelectionModel.addChangeListener(javax.swing.event.ChangeListener)

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the model.
Specified by:
addChangeListener in interface ColorSelectionModel

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the model.
Specified by:
removeChangeListener in interface ColorSelectionModel

fireStateChanged

protected void fireStateChanged()
Run each ChangeListeners stateChanged() method.
See Also:
EventListenerList
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ComboBoxEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ComboBoxEditor

All Known Implementing Classes:
BasicComboBoxEditor
public interface ComboBoxEditor

The editor component used for JComboBox components.

Method Summary
void | addActionListener(ActionListener l) Add an ActionListener.
Component | getEditorComponent() Return the component that should be added to the tree hierarchy for this editor
Object | getItem() Return the edited item
void | removeActionListener(ActionListener l) Remove an ActionListener
void | selectAll() Ask the editor to start editing and to select everything
void | setItem(Object anObject) Set the item that should be edited.

Method Detail

getEditorComponent

public Component getEditorComponent()
Return the component that should be added to the tree hierarchy for this editor

setItem

public void setItem(Object anObject)
Set the item that should be edited. Cancel any editing if necessary

getItem

public Object getItem()
Return the edited item

selectAll

public void selectAll()
Ask the editor to start editing and to select everything

addActionListener

public void addActionListener(ActionListener l)
Add an ActionListener. An action event is generated when the edited item changes

removeActionListener

public void removeActionListener(ActionListener l)
Remove an ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComboBoxModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ComboBoxModel

All Superinterfaces:
ListModel
All Known Subinterfaces:
MutableComboBoxModel
All Known Implementing Classes:
MetalFileChooserUI.DirectoryComboBoxModel, MetalFileChooserUI.FilterComboBoxModel
public interface ComboBoxModel
extends ListModel

ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.

Method Summary
Object | getSelectedItem() Return the selected item
void | setSelectedItem(Object anItem) Set the selected item
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener

Method Detail

setSelectedItem

public void setSelectedItem(Object anItem)
Set the selected item

getSelectedItem

public Object getSelectedItem()
Return the selected item
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentInputMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ComponentInputMap

java.lang.Object
  |
  +--javax.swing.InputMap
        |
        +--javax.swing.ComponentInputMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComponentInputMapUIResource
public class ComponentInputMap
extends InputMap

A ComponentInputMap is an InputMap associated with a particular JComponent. The component is automatically notified whenever the ComponentInputMap changes. ComponentInputMaps are used for WHEN_IN_FOCUSED_WINDOW bindings.

See Also:
Serialized Form

Constructor Summary
ComponentInputMap(JComponent component)
Creates a ComponentInputMap associated with the specified component.
Method Summary
void | clear() Removes all the mappings from this object.
JComponent | getComponent() Returns the component the InputMap was created for.
void | put(KeyStroke keyStroke, Object actionMapKey) Adds a binding for keyStroke to actionMapKey.
void | remove(KeyStroke key) Removes the binding for key from this object.
void | setParent(InputMap map) Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
Methods inherited from class javax.swing.InputMap
allKeys, get, getParent, keys, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComponentInputMap

public ComponentInputMap(JComponent component)
Creates a ComponentInputMap associated with the specified component.
Parameters:
component - a non-null JComponent
Throws:
IllegalArgumentException - if component is null
Method Detail

setParent

public void setParent(InputMap map)
Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
Overrides:
setParent in class InputMap
Parameters:
map - a ComponentInputMap
Throws:
IllegalArgumentException - if map is not a ComponentInputMap or is not associated with the same component

getComponent

public JComponent getComponent()
Returns the component the InputMap was created for.

put

public void put(KeyStroke keyStroke,
                Object actionMapKey)
Adds a binding for keyStroke to actionMapKey. If actionMapKey is null, this removes the current binding for keyStroke.
Overrides:
put in class InputMap

remove

public void remove(KeyStroke key)
Removes the binding for key from this object.
Overrides:
remove in class InputMap

clear

public void clear()
Removes all the mappings from this object.
Overrides:
clear in class InputMap
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DebugGraphics

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DebugGraphics

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--javax.swing.DebugGraphics
public class DebugGraphics
extends Graphics

Graphics subclass supporting graphics debugging. Overrides most methods from Graphics. DebugGraphics objects are rarely created by hand. They are most frequently created automatically when a JComponent's debugGraphicsOptions are changed using the setDebugGraphicsOptions() method.

NOTE: You must turn off double buffering to use DebugGraphics: RepaintManager repaintManager = RepaintManager.currentManager(component); repaintManager.setDoubleBufferingEnabled(false);

See Also:
JComponent.setDebugGraphicsOptions(int),
RepaintManager.currentManager(java.awt.Component),
RepaintManager.setDoubleBufferingEnabled(boolean)

Field Summary
static int | BUFFERED_OPTION Show buffered operations in a seperate Frame.
static int | FLASH_OPTION Flash graphics operations.
static int | LOG_OPTION Log graphics operations.
static int | NONE_OPTION Don't debug graphics operations.
Constructor Summary
DebugGraphics()
Constructs a new debug graphics context that supports slowed down drawing.
DebugGraphics(Graphics graphics)
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.
DebugGraphics(Graphics graphics, JComponent component)
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
Method Summary
void | clearRect(int x, int y, int width, int height) Overrides Graphics.clearRect.
void | clipRect(int x, int y, int width, int height) Overrides Graphics.clipRect.
void | copyArea(int x, int y, int width, int height, int destX, int destY) Overrides Graphics.copyArea.
Graphics | create() Overrides Graphics.create to return a DebugGraphics object.
Graphics | create(int x, int y, int width, int height) Overrides Graphics.create to return a DebugGraphics object.
void | dispose() Overrides Graphics.dispose.
void | draw3DRect(int x, int y, int width, int height, boolean raised) Overrides Graphics.draw3DRect.
void | drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) Overrides Graphics.drawArc.
void | drawBytes(byte[] data, int offset, int length, int x, int y) Overrides Graphics.drawBytes.
void | drawChars(char[] data, int offset, int length, int x, int y) Overrides Graphics.drawChars.
boolean | drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | drawImage(Image img, int x, int y, ImageObserver observer) Overrides Graphics.drawImage.
boolean | drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Overrides Graphics.drawImage.
boolean | drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
boolean | drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Overrides Graphics.drawImage.
void | drawLine(int x1, int y1, int x2, int y2) Overrides Graphics.drawLine.
void | drawOval(int x, int y, int width, int height) Overrides Graphics.drawOval.
void | drawPolygon(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.drawPolygon.
void | drawPolyline(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.drawPolyline.
void | drawRect(int x, int y, int width, int height) Overrides Graphics.drawRect.
void | drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Overrides Graphics.drawRoundRect.
void | drawString(AttributedCharacterIterator iterator, int x, int y) Overrides Graphics.drawString.
void | drawString(String aString, int x, int y) Overrides Graphics.drawString.
void | fill3DRect(int x, int y, int width, int height, boolean raised) Overrides Graphics.fill3DRect.
void | fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) Overrides Graphics.fillArc.
void | fillOval(int x, int y, int width, int height) Overrides Graphics.fillOval.
void | fillPolygon(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.fillPolygon.
void | fillRect(int x, int y, int width, int height) Overrides Graphics.fillRect.
void | fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Overrides Graphics.fillRoundRect.
static Color | flashColor() Returns the Color used to flash drawing operations.
static int | flashCount() Returns the number of times that drawing operations will flash.
static int | flashTime() Returns the time delay of drawing operation flashing.
Shape | getClip() Overrides Graphics.getClip.
Rectangle | getClipBounds() Overrides Graphics.getClipBounds.
Color | getColor() Returns the Color used for text drawing operations.
int | getDebugOptions() Returns the current debugging options for this DebugGraphics.
Font | getFont() Returns the Font used for text drawing operations.
FontMetrics | getFontMetrics() Overrides Graphics.getFontMetrics.
FontMetrics | getFontMetrics(Font f) Overrides Graphics.getFontMetrics.
boolean | isDrawingBuffer() Returns the drawingBuffer value.
static PrintStream | logStream() Returns the stream to which the DebugGraphics logs drawing operations.
void | setClip(int x, int y, int width, int height) Overrides Graphics.setClip.
void | setClip(Shape clip) Overrides Graphics.setClip.
void | setColor(Color aColor) Sets the color to be used for drawing and filling lines and shapes.
void | setDebugOptions(int options) Enables/disables diagnostic information about every graphics operation.
static void | setFlashColor(Color flashColor) Sets the Color used to flash drawing operations.
static void | setFlashCount(int flashCount) Sets the number of times that drawing operations will flash.
static void | setFlashTime(int flashTime) Sets the time delay of drawing operation flashing.
void | setFont(Font aFont) Sets the Font used for text drawing operations.
static void | setLogStream(PrintStream stream) Sets the stream to which the DebugGraphics logs drawing operations.
void | setPaintMode() Overrides Graphics.setPaintMode.
void | setXORMode(Color aColor) Overrides Graphics.setXORMode.
void | translate(int x, int y) Overrides Graphics.translate.
Methods inherited from class java.awt.Graphics
drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LOG_OPTION

public static final int LOG_OPTION
Log graphics operations.

FLASH_OPTION

public static final int FLASH_OPTION
Flash graphics operations.

BUFFERED_OPTION

public static final int BUFFERED_OPTION
Show buffered operations in a seperate Frame.

NONE_OPTION

public static final int NONE_OPTION
Don't debug graphics operations.
Constructor Detail

DebugGraphics

public DebugGraphics()
Constructs a new debug graphics context that supports slowed down drawing.

DebugGraphics

public DebugGraphics(Graphics graphics,
                     JComponent component)
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
Parameters:
graphics - the Graphics context to slow down
component - the JComponent to draw slowly

DebugGraphics

public DebugGraphics(Graphics graphics)
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.
Parameters:
graphics - the Graphics context to slow down
Method Detail

create

public Graphics create()
Overrides Graphics.create to return a DebugGraphics object.
Overrides:
create in class Graphics
Following copied from class: java.awt.Graphics
Returns:
a new graphics context that is a copy of this graphics context.

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Overrides Graphics.create to return a DebugGraphics object.
Overrides:
create in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate.
y - the y coordinate.
width - the width of the clipping rectangle.
height - the height of the clipping rectangle.
Returns:
a new graphics context.
See Also:
Graphics.translate(int, int), Graphics.clipRect(int, int, int, int)

setFlashColor

public static void setFlashColor(Color flashColor)
Sets the Color used to flash drawing operations.

flashColor

public static Color flashColor()
Returns the Color used to flash drawing operations.
See Also:
setFlashColor(java.awt.Color)

setFlashTime

public static void setFlashTime(int flashTime)
Sets the time delay of drawing operation flashing.

flashTime

public static int flashTime()
Returns the time delay of drawing operation flashing.
See Also:
setFlashTime(int)

setFlashCount

public static void setFlashCount(int flashCount)
Sets the number of times that drawing operations will flash.

flashCount

public static int flashCount()
Returns the number of times that drawing operations will flash.
See Also:
setFlashCount(int)

setLogStream

public static void setLogStream(PrintStream stream)
Sets the stream to which the DebugGraphics logs drawing operations.

logStream

public static PrintStream logStream()
Returns the stream to which the DebugGraphics logs drawing operations.
See Also:
setLogStream(java.io.PrintStream)

setFont

public void setFont(Font aFont)
Sets the Font used for text drawing operations.
Overrides:
setFont in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
font - the font.
See Also:
Graphics.getFont(),
Graphics.drawString(java.lang.String, int, int),
Graphics.drawBytes(byte[], int, int, int, int),
Graphics.drawChars(char[], int, int, int, int)

getFont

public Font getFont()
Returns the Font used for text drawing operations.
Overrides:
getFont in class Graphics
See Also:
setFont(java.awt.Font)

setColor

public void setColor(Color aColor)
Sets the color to be used for drawing and filling lines and shapes.
Overrides:
setColor in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
c - the new rendering color.
See Also:
Color, Graphics.getColor()

getColor

public Color getColor()
Returns the Color used for text drawing operations.
Overrides:
getColor in class Graphics
See Also:
setColor(java.awt.Color)

getFontMetrics

public FontMetrics getFontMetrics()
Overrides Graphics.getFontMetrics.
Overrides:
getFontMetrics in class Graphics
Following copied from class: java.awt.Graphics
Returns:
the font metrics of this graphics context's current font.
See Also:
Graphics.getFont(), FontMetrics, Graphics.getFontMetrics(Font)

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Overrides Graphics.getFontMetrics.
Overrides:
getFontMetrics in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
f - the specified font
Returns:
the font metrics for the specified font.
See Also:
Graphics.getFont(), FontMetrics, Graphics.getFontMetrics()

translate

public void translate(int x,
                      int y)
Overrides Graphics.translate.
Overrides:
translate in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate.
y - the y coordinate.

setPaintMode

public void setPaintMode()
Overrides Graphics.setPaintMode.
Overrides:
setPaintMode in class Graphics

setXORMode

public void setXORMode(Color aColor)
Overrides Graphics.setXORMode.
Overrides:
setXORMode in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
c1 - the XOR alternation color

getClipBounds

public Rectangle getClipBounds()
Overrides Graphics.getClipBounds.
Overrides:
getClipBounds in class Graphics
Following copied from class: java.awt.Graphics
Returns:
the bounding rectangle of the current clipping area, or null if no clip is set.
See Also:
Graphics.getClip(),
Graphics.clipRect(int, int, int, int),
Graphics.setClip(int, int, int, int),
Graphics.setClip(Shape)

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Overrides Graphics.clipRect.
Overrides:
clipRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to intersect the clip with
y - the y coordinate of the rectangle to intersect the clip with
width - the width of the rectangle to intersect the clip with
height - the height of the rectangle to intersect the clip with
See Also:
Graphics.setClip(int, int, int, int), Graphics.setClip(Shape)

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Overrides Graphics.setClip.
Overrides:
setClip in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the new clip rectangle.
y - the y coordinate of the new clip rectangle.
width - the width of the new clip rectangle.
height - the height of the new clip rectangle.
See Also:
Graphics.clipRect(int, int, int, int), Graphics.setClip(Shape)

getClip

public Shape getClip()
Overrides Graphics.getClip.
Overrides:
getClip in class Graphics
Following copied from class: java.awt.Graphics
Returns:
a Shape object representing the current clipping area, or null if no clip is set.
See Also:
Graphics.getClipBounds(),
Graphics.clipRect(int, int, int, int),
Graphics.setClip(int, int, int, int),
Graphics.setClip(Shape)

setClip

public void setClip(Shape clip)
Overrides Graphics.setClip.
Overrides:
setClip in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
clip - the Shape to use to set the clip
See Also:
Graphics.getClip(),
Graphics.clipRect(int, int, int, int),
Graphics.setClip(int, int, int, int)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Overrides Graphics.drawRect.
Overrides:
drawRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
See Also:
Graphics.fillRect(int, int, int, int), Graphics.clearRect(int, int, int, int)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Overrides Graphics.fillRect.
Overrides:
fillRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
See Also:
Graphics.clearRect(int, int, int, int), Graphics.drawRect(int, int, int, int)

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Overrides Graphics.clearRect.
Overrides:
clearRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to clear.
y - the y coordinate of the rectangle to clear.
width - the width of the rectangle to clear.
height - the height of the rectangle to clear.
See Also:
Graphics.fillRect(int, int, int, int),
Graphics.drawRect(int, int, int, int),
Graphics.setColor(java.awt.Color),
Graphics.setPaintMode(),
Graphics.setXORMode(java.awt.Color)

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides Graphics.drawRoundRect.
Overrides:
drawRoundRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
Graphics.fillRoundRect(int, int, int, int, int, int)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides Graphics.fillRoundRect.
Overrides:
fillRoundRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
Graphics.drawRoundRect(int, int, int, int, int, int)

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Overrides Graphics.drawLine.
Overrides:
drawLine in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Overrides Graphics.draw3DRect.
Overrides:
draw3DRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
See Also:
Graphics.fill3DRect(int, int, int, int, boolean)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Overrides Graphics.fill3DRect.
Overrides:
fill3DRect in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
See Also:
Graphics.draw3DRect(int, int, int, int, boolean)

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Overrides Graphics.drawOval.
Overrides:
drawOval in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
See Also:
Graphics.fillOval(int, int, int, int)

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Overrides Graphics.fillOval.
Overrides:
fillOval in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
See Also:
Graphics.drawOval(int, int, int, int)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides Graphics.drawArc.
Overrides:
drawArc in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
Graphics.fillArc(int, int, int, int, int, int)

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides Graphics.fillArc.
Overrides:
fillArc in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the upper-left corner of the arc to be filled.
y - the y coordinate of the upper-left corner of the arc to be filled.
width - the width of the arc to be filled.
height - the height of the arc to be filled.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
Graphics.drawArc(int, int, int, int, int, int)

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Overrides Graphics.drawPolyline.
Overrides:
drawPolyline in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
See Also:
Graphics.drawPolygon(int[], int[], int)

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides Graphics.drawPolygon.
Overrides:
drawPolygon in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
Graphics.fillPolygon(int[], int[], int), Graphics.drawPolyline(int[], int[], int)

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides Graphics.fillPolygon.
Overrides:
fillPolygon in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
Graphics.drawPolygon(int[], int[], int)

drawString

public void drawString(String aString,
                       int x,
                       int y)
Overrides Graphics.drawString.
Overrides:
drawString in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
See Also:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

drawString

public void drawString(AttributedCharacterIterator iterator,
                       int x,
                       int y)
Overrides Graphics.drawString.
Overrides:
drawString in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
iterator - the iterator whose text is to be drawn
x - the x coordinate.
y - the y coordinate.
See Also:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Overrides Graphics.drawBytes.
Overrides:
drawBytes in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
data - the data to be drawn
offset - the start offset in the data
length - the number of bytes that are drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
Graphics.drawChars(char[], int, int, int, int), Graphics.drawString(java.lang.String, int, int)

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Overrides Graphics.drawChars.
Overrides:
drawChars in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
data - the array of characters to be drawn
offset - the start offset in the data
length - the number of characters to be drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawString(java.lang.String, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
observer - object to be notified as more of the image is scaled and converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         Color bgcolor,
                         ImageObserver observer)
Overrides Graphics.drawImage.
Overrides:
drawImage in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is scaled and converted.
See Also:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int destX,
                     int destY)
Overrides Graphics.copyArea.
Overrides:
copyArea in class Graphics
Following copied from class: java.awt.Graphics
Parameters:
x - the x coordinate of the source rectangle.
y - the y coordinate of the source rectangle.
width - the width of the source rectangle.
height - the height of the source rectangle.
dx - the horizontal distance to copy the pixels.
dy - the vertical distance to copy the pixels.

dispose

public void dispose()
Overrides Graphics.dispose.
Overrides:
dispose in class Graphics
Following copied from class: java.awt.Graphics
See Also:
Graphics.finalize(),
Component.paint(java.awt.Graphics),
Component.update(java.awt.Graphics),
Component.getGraphics(),
Graphics.create()

isDrawingBuffer

public boolean isDrawingBuffer()
Returns the drawingBuffer value.
Returns:
true if this object is drawing from a Buffer

setDebugOptions

public void setDebugOptions(int options)
Enables/disables diagnostic information about every graphics operation. The value of options indicates how this information should be displayed. LOG_OPTION causes a text message to be printed. FLASH_OPTION causes the drawing to flash several times. BUFFERED_OPTION creates a new Frame that shows each operation on an offscreen buffer. The value of options is bitwise OR'd into the current value. To disable debugging use NONE_OPTION.

getDebugOptions

public int getDebugOptions()
Returns the current debugging options for this DebugGraphics.
See Also:
setDebugOptions(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultBoundedRangeModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultBoundedRangeModel

java.lang.Object
  |
  +--javax.swing.DefaultBoundedRangeModel
All Implemented Interfaces:
BoundedRangeModel, Serializable
public class DefaultBoundedRangeModel
extends Object
implements BoundedRangeModel, Serializable

A generic implementation of BoundedRangeModel.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
BoundedRangeModel, Serialized Form

Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected EventListenerList | listenerList The listeners waiting for model changes.
Constructor Summary
DefaultBoundedRangeModel()
Initializes all of the properties with default values.
DefaultBoundedRangeModel(int value, int extent, int min, int max)
Initializes value, extent, minimum and maximum.
Method Summary
 void addChangeListener(ChangeListener l)
Adds a ChangeListener.
protected  void fireStateChanged()
Run each ChangeListeners stateChanged() method.
 int getExtent()
Return the model's extent.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
 int getMaximum()
Return the model's maximum.
 int getMinimum()
Return the model's minimum.
 int getValue()
Return the model's current value.
 boolean getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.
 void removeChangeListener(ChangeListener l)
Removes a ChangeListener.
 void setExtent(int n)
Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
 void setMaximum(int n)
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
 void setMinimum(int n)
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
 void setRangeProperties(int newValue, int newExtent, int newMin, int newMax, boolean adjusting)
Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
 void setValue(int n)
Sets the current value of the model.
 void setValueIsAdjusting(boolean b)
Sets the valueIsAdjusting property.
 String toString()
Returns a string that displays all of the BoundedRangeModel properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".

listenerList

protected EventListenerList listenerList
The listeners waiting for model changes.
Constructor Detail

DefaultBoundedRangeModel

public DefaultBoundedRangeModel()
Initializes all of the properties with default values. Those values are:
  • value = 0
  • extent = 0
  • minimum = 0
  • maximum = 100
  • adjusting = false

DefaultBoundedRangeModel

public DefaultBoundedRangeModel(int value,
                                int extent,
                                int min,
                                int max)
Initializes value, extent, minimum and maximum. Adjusting is false. Throws an IllegalArgumentException if the following constraints aren't satisfied:
 min <= value="value" <="value+extent" <="max"
Method Detail

getValue

public int getValue()
Return the model's current value.
Specified by:
getValue in interface BoundedRangeModel
Returns:
the model's current value
See Also:
setValue(int), BoundedRangeModel.getValue()

getExtent

public int getExtent()
Return the model's extent.
Specified by:
getExtent in interface BoundedRangeModel
Returns:
the model's extent
See Also:
setExtent(int), BoundedRangeModel.getExtent()

getMinimum

public int getMinimum()
Return the model's minimum.
Specified by:
getMinimum in interface BoundedRangeModel
Returns:
the model's minimum
See Also:
setMinimum(int), BoundedRangeModel.getMinimum()

getMaximum

public int getMaximum()
Return the model's maximum.
Specified by:
getMaximum in interface BoundedRangeModel
Returns:
the model's maximum
See Also:
setMaximum(int), BoundedRangeModel.getMaximum()

setValue

public void setValue(int n)
Sets the current value of the model. For a slider, that determines where the knob appears. Ensures that the new value, n falls within the model's constraints:
     minimum <= value="value" <="value+extent" <="maximum"

Specified by:
setValue in interface BoundedRangeModel

See Also:
BoundedRangeModel.setValue(int)

setExtent

public void setExtent(int n)
Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
     minimum <= value="value" <="value+extent" <="maximum"

Specified by:
setExtent in interface BoundedRangeModel

See Also:
BoundedRangeModel.setExtent(int)

setMinimum

public void setMinimum(int n)
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
     minimum <= value="value" <="value+extent" <="maximum"

Specified by:
setMinimum in interface BoundedRangeModel

See Also:
getMinimum(),
BoundedRangeModel.setMinimum(int)

setMaximum

public void setMaximum(int n)
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
     minimum <= value="value" <="value+extent" <="maximum"

Specified by:
setMaximum in interface BoundedRangeModel

See Also:
BoundedRangeModel.setMaximum(int)

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)
Sets the valueIsAdjusting property.
Specified by:
setValueIsAdjusting in interface BoundedRangeModel
See Also:
getValueIsAdjusting(), setValue(int), BoundedRangeModel.setValueIsAdjusting(boolean)

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.
Specified by:
getValueIsAdjusting in interface BoundedRangeModel
Returns:
the value of the valueIsAdjusting property
See Also:
setValue(int), BoundedRangeModel.getValueIsAdjusting()

setRangeProperties

public void setRangeProperties(int newValue,
                               int newExtent,
                               int newMin,
                               int newMax,
                               boolean adjusting)
Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
     minimum <= value="value" <="value+extent" <="maximum"

 At most, one ChangeEvent is generated.

Specified by:
setRangeProperties in interface BoundedRangeModel

See Also:
BoundedRangeModel.setRangeProperties(int, int, int, int, boolean),
setValue(int),
setExtent(int),
setMinimum(int),
setMaximum(int),
setValueIsAdjusting(boolean)

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener. The change listeners are run each time any one of the Bounded Range model properties changes.
Specified by:
addChangeListener in interface BoundedRangeModel
Parameters:
l - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener), BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener.
Specified by:
removeChangeListener in interface BoundedRangeModel
Parameters:
l - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener), BoundedRangeModel.removeChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Run each ChangeListeners stateChanged() method.
See Also:
setRangeProperties(int, int, int, int, boolean), EventListenerList

toString

public String toString()
Returns a string that displays all of the BoundedRangeModel properties.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultButtonModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultButtonModel

java.lang.Object
  |
  +--javax.swing.DefaultButtonModel
All Implemented Interfaces:
ButtonModel, ItemSelectable, Serializable
Direct Known Subclasses:
JToggleButton.ToggleButtonModel
public class DefaultButtonModel
extends Object
implements ButtonModel, Serializable

The default implementation of a Button component's data model.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected String | actionCommand
static int | ARMED Indicates partial commitment towards choosing the button.
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
static int | ENABLED Indicates that the button can be selected by an input device (such as a mouse pointer).
protected ButtonGroup | group
protected EventListenerList | listenerList
protected int | mnemonic
static int | PRESSED Indicates that the button has been "pressed" (typically, when the mouse is released).
static int | ROLLOVER Indicates that the mouse is over the button.
static int | SELECTED Indicates that the button has been selected.
protected int | stateMask
Constructor Summary
DefaultButtonModel()
Constructs a JButtonModel
Method Summary
void | addActionListener(ActionListener l) Adds an ActionListener to the button.
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | addItemListener(ItemListener l) Adds an ItemListener to the button.
protected void | fireActionPerformed(ActionEvent e)
protected void | fireItemStateChanged(ItemEvent e)
protected void | fireStateChanged()
String | getActionCommand() Returns the action command for this button.
ButtonGroup | getGroup() Returns the group that this button belongs to.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
int | getMnemonic() Gets the keyboard mnemonic for this model
Object[] | getSelectedObjects() Overriden to return null
boolean | isArmed() Indicates partial commitment towards pressing the button.
boolean | isEnabled() Indicates if the button can be selected or pressed by an input device (such as a mouse pointer).
boolean | isPressed() Indicates if button has been pressed.
boolean | isRollover() Indicates that the mouse is over the button.
boolean | isSelected() Indicates if the button has been selected.
void | removeActionListener(ActionListener l) Removes an ActionListener from the button.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | removeItemListener(ItemListener l) Removes an ItemListener from the button.
void | setActionCommand(String actionCommand) Sets the actionCommand string that gets sent as part of the event when the button is pressed.
void | setArmed(boolean b) Marks the button as "armed".
void | setEnabled(boolean b) Enables or disables the button.
void | setGroup(ButtonGroup group) Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
void | setMnemonic(int key) Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
void | setPressed(boolean b) Sets the button to pressed or unpressed.
void | setRollover(boolean b) Sets or clears the button's rollover state
void | setSelected(boolean b) Selects or deselects the button.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

stateMask

protected int stateMask

actionCommand

protected String actionCommand

group

protected ButtonGroup group

mnemonic

protected int mnemonic

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. The source of events generated is always "this".

listenerList

protected EventListenerList listenerList

ARMED

public static final int ARMED
Indicates partial commitment towards choosing the button.

SELECTED

public static final int SELECTED
Indicates that the button has been selected. Only needed for certain types of buttons - such as RadioButton or Checkbox.

PRESSED

public static final int PRESSED
Indicates that the button has been "pressed" (typically, when the mouse is released).

ENABLED

public static final int ENABLED
Indicates that the button can be selected by an input device (such as a mouse pointer).

ROLLOVER

public static final int ROLLOVER
Indicates that the mouse is over the button.
Constructor Detail

DefaultButtonModel

public DefaultButtonModel()
Constructs a JButtonModel
Method Detail

setActionCommand

public void setActionCommand(String actionCommand)
Sets the actionCommand string that gets sent as part of the event when the button is pressed.
Specified by:
setActionCommand in interface ButtonModel
Parameters:
s - the String that identifies the generated event

getActionCommand

public String getActionCommand()
Returns the action command for this button.
Specified by:
getActionCommand in interface ButtonModel
Returns:
the String that identifies the generated event
See Also:
setActionCommand(java.lang.String)

isArmed

public boolean isArmed()
Indicates partial commitment towards pressing the button.
Specified by:
isArmed in interface ButtonModel
Returns:
true if the button is armed, and ready to be pressed
See Also:
setArmed(boolean)

isSelected

public boolean isSelected()
Indicates if the button has been selected. Only needed for certain types of buttons - such as RadioButton or Checkbox.
Specified by:
isSelected in interface ButtonModel
Returns:
true if the button is selected

isEnabled

public boolean isEnabled()
Indicates if the button can be selected or pressed by an input device (such as a mouse pointer). (Checkbox-buttons are selected, regular buttons are "pressed".)
Specified by:
isEnabled in interface ButtonModel
Returns:
true if the button is enabled, and therefore selectable (or pressable)

isPressed

public boolean isPressed()
Indicates if button has been pressed.
Specified by:
isPressed in interface ButtonModel
Returns:
true if the button has been pressed

isRollover

public boolean isRollover()
Indicates that the mouse is over the button.
Specified by:
isRollover in interface ButtonModel
Returns:
true if the mouse is over the button

setArmed

public void setArmed(boolean b)
Marks the button as "armed". If the mouse button is released while it is over this item, the button's action event fires. If the mouse button is released elsewhere, the event does not fire and the button is disarmed.
Specified by:
setArmed in interface ButtonModel
Parameters:
b - true to arm the button so it can be selected

setEnabled

public void setEnabled(boolean b)
Enables or disables the button.
Specified by:
setEnabled in interface ButtonModel
Parameters:
b - true to enable the button
See Also:
isEnabled()

setSelected

public void setSelected(boolean b)
Selects or deselects the button.
Specified by:
setSelected in interface ButtonModel
Parameters:
b - true selects the button, false deselects the button.

setPressed

public void setPressed(boolean b)
Sets the button to pressed or unpressed.
Specified by:
setPressed in interface ButtonModel
Parameters:
b - true to set the button to "pressed"
See Also:
isPressed()

setRollover

public void setRollover(boolean b)
Sets or clears the button's rollover state
Specified by:
setRollover in interface ButtonModel
Parameters:
b - true to turn on rollover
See Also:
isRollover()

setMnemonic

public void setMnemonic(int key)
Sets the keyboard mnemonic (shortcut key or accelerator key) for this button.
Specified by:
setMnemonic in interface ButtonModel
Parameters:
key - an int specifying the accelerator key

getMnemonic

public int getMnemonic()
Gets the keyboard mnemonic for this model
Specified by:
getMnemonic in interface ButtonModel
Returns:
an int specifying the accelerator key
See Also:
setMnemonic(int)

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Specified by:
addChangeListener in interface ButtonModel
Parameters:
l - the listener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Specified by:
removeChangeListener in interface ButtonModel
Parameters:
l - the listener to remove

fireStateChanged

protected void fireStateChanged()

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the button.
Specified by:
addActionListener in interface ButtonModel
Parameters:
l - the listener to add

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the button.
Specified by:
removeActionListener in interface ButtonModel
Parameters:
l - the listener to remove

fireActionPerformed

protected void fireActionPerformed(ActionEvent e)

addItemListener

public void addItemListener(ItemListener l)
Adds an ItemListener to the button.
Specified by:
addItemListener in interface ButtonModel
Parameters:
l - the listener to add

removeItemListener

public void removeItemListener(ItemListener l)
Removes an ItemListener from the button.
Specified by:
removeItemListener in interface ButtonModel
Parameters:
l - the listener to remove

fireItemStateChanged

protected void fireItemStateChanged(ItemEvent e)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3

getSelectedObjects

public Object[] getSelectedObjects()
Overriden to return null
Specified by:
getSelectedObjects in interface ItemSelectable

setGroup

public void setGroup(ButtonGroup group)
Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
Specified by:
setGroup in interface ButtonModel
Parameters:
group - the ButtonGroup this button belongs to

getGroup

public ButtonGroup getGroup()
Returns the group that this button belongs to. Normally used with radio buttons, which are mutually exclusive within their group.
Returns:
a ButtonGroup that this button belongs to
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultCellEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultCellEditor

java.lang.Object
  |
  +--javax.swing.AbstractCellEditor
        |
        +--javax.swing.DefaultCellEditor
All Implemented Interfaces:
CellEditor, Serializable, TableCellEditor, TreeCellEditor
public class DefaultCellEditor
extends AbstractCellEditor
implements TableCellEditor, TreeCellEditor

The default editor for table and tree cells.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class DefaultCellEditor.EditorDelegate
Field Summary
protected int | clickCountToStart
protected DefaultCellEditor.EditorDelegate | delegate
protected JComponent | editorComponent
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
Constructor Summary
DefaultCellEditor(JCheckBox checkBox)
Constructs a DefaultCellEditor object that uses a check box.
DefaultCellEditor(JComboBox comboBox)
Constructs a DefaultCellEditor object that uses a combo box.
DefaultCellEditor(JTextField textField)
Constructs a DefaultCellEditor that uses a text field.
Method Summary
void | cancelCellEditing() Tell the editor to cancel editing and not accept any partially edited value.
Object | getCellEditorValue() Returns the value contained in the editor
int | getClickCountToStart() ClickCountToStart controls the number of clicks required to start editing.
Component | getComponent() Returns the a reference to the editor component.
Component | getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Sets an initial value for the editor.
Component | getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Sets an initial value for the editor.
boolean | isCellEditable(EventObject anEvent) Ask the editor if it can start editing using anEvent.
void | setClickCountToStart(int count) Specifies the number of clicks needed to start editing.
boolean | shouldSelectCell(EventObject anEvent) The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not.
boolean | stopCellEditing() Tell the editor to stop editing and accept any partially edited value as the value of the editor.
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, removeCellEditorListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener

Field Detail

editorComponent

protected JComponent editorComponent

delegate

protected DefaultCellEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

DefaultCellEditor

public DefaultCellEditor(JTextField textField)
Constructs a DefaultCellEditor that uses a text field.
Parameters:
x - a JTextField object ...

DefaultCellEditor

public DefaultCellEditor(JCheckBox checkBox)
Constructs a DefaultCellEditor object that uses a check box.
Parameters:
x - a JCheckBox object ...

DefaultCellEditor

public DefaultCellEditor(JComboBox comboBox)
Constructs a DefaultCellEditor object that uses a combo box.
Parameters:
x - a JComboBox object ...
Method Detail

getComponent

public Component getComponent()
Returns the a reference to the editor component.
Returns:
the editor Component

setClickCountToStart

public void setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.
Parameters:
count - an int specifying the number of clicks needed to start editing
See Also:
getClickCountToStart()

getClickCountToStart

public int getClickCountToStart()
ClickCountToStart controls the number of clicks required to start editing.

getCellEditorValue

public Object getCellEditorValue()
Description copied from interface: CellEditor
Returns the value contained in the editor
Specified by:
getCellEditorValue in interface CellEditor

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Description copied from interface: CellEditor
Ask the editor if it can start editing using anEvent. anEvent is in the invoking component coordinate system. The editor can not assume the Component returned by getCellEditorComponent() is installed. This method is intended for the use of client to avoid the cost of setting up and installing the editor component if editing is not possible. If editing can be started this method returns true.
Specified by:
isCellEditable in interface CellEditor
Overrides:
isCellEditable in class AbstractCellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
anEvent - the event the editor should use to consider whether to begin editing or not.
Returns:
true if editing can be started.
See Also:
CellEditor.shouldSelectCell(java.util.EventObject)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Description copied from interface: CellEditor
The return value of shouldSelectCell() is a boolean indicating whether the editing cell should be selected or not. Typically, the return value is true, because is most cases the editing cell should be selected. However, it is useful to return false to keep the selection from changing for some types of edits. eg. A table that contains a column of check boxes, the user might want to be able to change those checkboxes without altering the selection. (See Netscape Communicator for just such an example) Of course, it is up to the client of the editor to use the return value, but it doesn't need to if it doesn't want to.
Specified by:
shouldSelectCell in interface CellEditor
Overrides:
shouldSelectCell in class AbstractCellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
anEvent - the event the editor should use to start editing.
Returns:
true if the editor would like the editing cell to be selected
See Also:
CellEditor.isCellEditable(java.util.EventObject)

stopCellEditing

public boolean stopCellEditing()
Description copied from interface: CellEditor
Tell the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped, useful for editors which validates and can not accept invalid entries.
Specified by:
stopCellEditing in interface CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor
Following copied from interface: javax.swing.CellEditor
Returns:
true if editing was stopped

cancelCellEditing

public void cancelCellEditing()
Description copied from interface: CellEditor
Tell the editor to cancel editing and not accept any partially edited value.
Specified by:
cancelCellEditing in interface CellEditor
Overrides:
cancelCellEditing in class AbstractCellEditor

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Description copied from interface: TreeCellEditor
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTreeCellEditorComponent in interface TreeCellEditor
Following copied from interface: javax.swing.tree.TreeCellEditor
Parameters:
table - the JTree that is asking the editor to edit This parameter can be null.
value - the value of the cell to be edited.
isSelected - true is the cell is to be renderer with selection highlighting
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - the row index of the node being edited
Returns:
the component for editing

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Description copied from interface: TableCellEditor
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Following copied from interface: javax.swing.table.TableCellEditor
Parameters:
table - the JTable that is asking the editor to edit; can be null
value - the value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with highlighting
row - the row of the cell being edited
column - the column of the cell being edited
Returns:
the component for editing
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultComboBoxModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultComboBoxModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.DefaultComboBoxModel
All Implemented Interfaces:
ComboBoxModel, ListModel, MutableComboBoxModel, Serializable
public class DefaultComboBoxModel
extends AbstractListModel
implements MutableComboBoxModel, Serializable

The default model for combo boxes.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractListModel
listenerList
Constructor Summary
DefaultComboBoxModel()
Constructs an empty DefaultComboBoxModel object.
DefaultComboBoxModel(Object[] items)
Constructs a DefaultComboBoxModel object initialized with an array of objects.
DefaultComboBoxModel(Vector v)
Constructs a DefaultComboBoxModel object initialized with a vector.
Method Summary
void | addElement(Object anObject) Adds an item to the end of the model.
Object | getElementAt(int index) Returns the value at the specified index.
int | getIndexOf(Object anObject) Returns the index-position of the specified object in the list.
Object | getSelectedItem() Return the selected item
int | getSize() Returns the length of the list.
void | insertElementAt(Object anObject, int index) Adds an item at a specific index
void | removeAllElements() Empties the list.
void | removeElement(Object anObject) Removes an item from the model.
void | removeElementAt(int index) Removes an item at a specific index
void | setSelectedItem(Object anObject) Set the selected item
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener

Constructor Detail

DefaultComboBoxModel

public DefaultComboBoxModel()
Constructs an empty DefaultComboBoxModel object.

DefaultComboBoxModel

public DefaultComboBoxModel(Object[] items)
Constructs a DefaultComboBoxModel object initialized with an array of objects.
Parameters:
items - an array of Object objects

DefaultComboBoxModel

public DefaultComboBoxModel(Vector v)
Constructs a DefaultComboBoxModel object initialized with a vector.
Parameters:
v - a Vector object ...
Method Detail

setSelectedItem

public void setSelectedItem(Object anObject)
Description copied from interface: ComboBoxModel
Set the selected item
Specified by:
setSelectedItem in interface ComboBoxModel

getSelectedItem

public Object getSelectedItem()
Description copied from interface: ComboBoxModel
Return the selected item
Specified by:
getSelectedItem in interface ComboBoxModel

getSize

public int getSize()
Description copied from interface: ListModel
Returns the length of the list.
Specified by:
getSize in interface ListModel

getElementAt

public Object getElementAt(int index)
Description copied from interface: ListModel
Returns the value at the specified index.
Specified by:
getElementAt in interface ListModel

getIndexOf

public int getIndexOf(Object anObject)
Returns the index-position of the specified object in the list.
Parameters:
anObject -
Returns:
an int representing the index position, where 0 is the first position

addElement

public void addElement(Object anObject)
Description copied from interface: MutableComboBoxModel
Adds an item to the end of the model.
Specified by:
addElement in interface MutableComboBoxModel
Following copied from interface: javax.swing.MutableComboBoxModel
Parameters:
obj - the Object to be added

insertElementAt

public void insertElementAt(Object anObject,
                            int index)
Description copied from interface: MutableComboBoxModel
Adds an item at a specific index
Specified by:
insertElementAt in interface MutableComboBoxModel
Following copied from interface: javax.swing.MutableComboBoxModel
Parameters:
obj - the Object to be added
index - location to add the object

removeElementAt

public void removeElementAt(int index)
Description copied from interface: MutableComboBoxModel
Removes an item at a specific index
Specified by:
removeElementAt in interface MutableComboBoxModel
Following copied from interface: javax.swing.MutableComboBoxModel
Parameters:
index - location of object to be removed

removeElement

public void removeElement(Object anObject)
Description copied from interface: MutableComboBoxModel
Removes an item from the model.
Specified by:
removeElement in interface MutableComboBoxModel
Following copied from interface: javax.swing.MutableComboBoxModel
Parameters:
obj - the Object to be removed

removeAllElements

public void removeAllElements()
Empties the list.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultDesktopManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultDesktopManager

java.lang.Object
  |
  +--javax.swing.DefaultDesktopManager
All Implemented Interfaces:
DesktopManager, Serializable
public class DefaultDesktopManager
extends Object
implements DesktopManager, Serializable

This is an implementaion of the DesktopManager. It currently implements a the basic behaviors for managing JInternalFrames in an arbitrary parent. JInternalFrames that are not children of a JDesktop will use this component to handle their desktop-like actions.

See Also:
JDesktopPane, JInternalFrame, Serialized Form

Constructor Summary
DefaultDesktopManager()
Method Summary
 void activateFrame(JInternalFrame f)
This will activate f moving it to the front.
 void beginDraggingFrame(JComponent f)
This method is normally called when the user has indicated that they will begin dragging a component around.
 void beginResizingFrame(JComponent f, int direction)
This methods is normally called when the user has indicated that they will begin resizing the frame.
 void closeFrame(JInternalFrame f)
Removes the frame, and if necessary the desktopIcon, from its parent.
 void deactivateFrame(JInternalFrame f)
Generally, indicate that this frame has lost focus.
 void deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from its parent and adds its frame to the parent.
 void dragFrame(JComponent f, int newX, int newY)
Moves the visible location of the frame being dragged to the location specified.
 void endDraggingFrame(JComponent f)
This method signals the end of the dragging session.
 void endResizingFrame(JComponent f)
This method signals the end of the resize session.
protected  Rectangle getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
protected  Rectangle getPreviousBounds(JInternalFrame f)
 void iconifyFrame(JInternalFrame f)
Removes the frame from its parent and adds its desktopIcon to the parent.
 void maximizeFrame(JInternalFrame f)
Resizes the frame to fill its parents bounds.
 void minimizeFrame(JInternalFrame f)
Restores the frame back to its size and position prior to a maximizeFrame() call.
 void openFrame(JInternalFrame f)
Normally this method will not be called.
protected  void removeIconFor(JInternalFrame f)
Convience method to remove the desktopIcon of f is necessary.
 void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
Calls setBoundsForFrame() with the new values.
 void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
This moves the JComponent and repaints the damaged areas.
protected  void setPreviousBounds(JInternalFrame f, Rectangle r)
Stores the bounds of the component just before a maximize call.
protected  void setWasIcon(JInternalFrame f, Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.
protected  boolean wasIcon(JInternalFrame f)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultDesktopManager

public DefaultDesktopManager()
Method Detail

openFrame

public void openFrame(JInternalFrame f)
Normally this method will not be called. If it is, it try to determine the appropriate parent from the desktopIcon of the frame. Will remove the desktopIcon from its parent if it successfully adds the frame.
Specified by:
openFrame in interface DesktopManager

closeFrame

public void closeFrame(JInternalFrame f)
Removes the frame, and if necessary the desktopIcon, from its parent.
Specified by:
closeFrame in interface DesktopManager

maximizeFrame

public void maximizeFrame(JInternalFrame f)
Resizes the frame to fill its parents bounds.
Specified by:
maximizeFrame in interface DesktopManager

minimizeFrame

public void minimizeFrame(JInternalFrame f)
Restores the frame back to its size and position prior to a maximizeFrame() call.
Specified by:
minimizeFrame in interface DesktopManager

iconifyFrame

public void iconifyFrame(JInternalFrame f)
Removes the frame from its parent and adds its desktopIcon to the parent.
Specified by:
iconifyFrame in interface DesktopManager

deiconifyFrame

public void deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from its parent and adds its frame to the parent.
Specified by:
deiconifyFrame in interface DesktopManager

activateFrame

public void activateFrame(JInternalFrame f)
This will activate f moving it to the front. It will set the current active frame (if any) IS_SELECTED_PROPERTY to false. There can be only one active frame across all Layers.
Specified by:
activateFrame in interface DesktopManager

deactivateFrame

public void deactivateFrame(JInternalFrame f)
Description copied from interface: DesktopManager
Generally, indicate that this frame has lost focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.
Specified by:
deactivateFrame in interface DesktopManager

beginDraggingFrame

public void beginDraggingFrame(JComponent f)
Description copied from interface: DesktopManager
This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.
Specified by:
beginDraggingFrame in interface DesktopManager

dragFrame

public void dragFrame(JComponent f,
                      int newX,
                      int newY)
Moves the visible location of the frame being dragged to the location specified. The means by which this occurs can vary depending on the dragging algorithm being used. The actual logical location of the frame might not change until endDraggingFrame is called.
Specified by:
dragFrame in interface DesktopManager

endDraggingFrame

public void endDraggingFrame(JComponent f)
Description copied from interface: DesktopManager
This method signals the end of the dragging session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.
Specified by:
endDraggingFrame in interface DesktopManager

beginResizingFrame

public void beginResizingFrame(JComponent f,
                               int direction)
Description copied from interface: DesktopManager
This methods is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.
Specified by:
beginResizingFrame in interface DesktopManager

resizeFrame

public void resizeFrame(JComponent f,
                        int newX,
                        int newY,
                        int newWidth,
                        int newHeight)
Calls setBoundsForFrame() with the new values.
Specified by:
resizeFrame in interface DesktopManager

endResizingFrame

public void endResizingFrame(JComponent f)
Description copied from interface: DesktopManager
This method signals the end of the resize session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.
Specified by:
endResizingFrame in interface DesktopManager

setBoundsForFrame

public void setBoundsForFrame(JComponent f,
                              int newX,
                              int newY,
                              int newWidth,
                              int newHeight)
This moves the JComponent and repaints the damaged areas.
Specified by:
setBoundsForFrame in interface DesktopManager

removeIconFor

protected void removeIconFor(JInternalFrame f)
Convience method to remove the desktopIcon of f is necessary.

getBoundsForIconOf

protected Rectangle getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.

setPreviousBounds

protected void setPreviousBounds(JInternalFrame f,
                                 Rectangle r)
Stores the bounds of the component just before a maximize call.

getPreviousBounds

protected Rectangle getPreviousBounds(JInternalFrame f)

setWasIcon

protected void setWasIcon(JInternalFrame f,
                          Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.

wasIcon

protected boolean wasIcon(JInternalFrame f)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultFocusManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultFocusManager

java.lang.Object
  |
  +--javax.swing.FocusManager
        |
        +--javax.swing.DefaultFocusManager
public class DefaultFocusManager
extends FocusManager

Default swing focus manager implementation.

Fields inherited from class javax.swing.FocusManager
FOCUS_MANAGER_CLASS_PROPERTY
Constructor Summary
DefaultFocusManager()
Method Summary
boolean | compareTabOrder(Component a, Component b) Return true if a should be before b in the "tab" order.
void | focusNextComponent(Component aComponent) Cause the focus manager to set the focus on the next focusable component
void | focusPreviousComponent(Component aComponent) Cause the focus manager to set the focus on the previous focusable component
Component | getComponentAfter(Container aContainer, Component aComponent) Return the component the should receive the focus after aComponent
Component | getComponentBefore(Container aContainer, Component aComponent) Return the component that should receive the focus before aComponent
Component | getFirstComponent(Container aContainer) Return the first component that should receive the focus
Component | getLastComponent(Container aContainer) Return the last component that should receive the focus
void | processKeyEvent(Component focusedComponent, KeyEvent anEvent) This method is called by JComponents when a key event occurs.
Methods inherited from class javax.swing.FocusManager
disableSwingFocusManager, getCurrentManager, isFocusManagerEnabled, setCurrentManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultFocusManager

public DefaultFocusManager()
Method Detail

processKeyEvent

public void processKeyEvent(Component focusedComponent,
                            KeyEvent anEvent)
Description copied from class: FocusManager
This method is called by JComponents when a key event occurs. JComponent gives key events to the focus manager first, then to key listeners, then to the keyboard UI dispatcher. This method should look at the key event and change the focused component if the key event matches the receiver's focus manager hot keys. For example the default focus manager will change the focus if the key event matches TAB or Shift + TAB. The focus manager should call consume() on anEvent if anEvent has been processed. focusedComponent is the component that currently has the focus. Note: FocusManager will receive both KEY_PRESSED and KEY_RELEASED key events. If one event is consumed, the other one should be consumed too.
Overrides:
processKeyEvent in class FocusManager

focusNextComponent

public void focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component
Overrides:
focusNextComponent in class FocusManager

focusPreviousComponent

public void focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component
Overrides:
focusPreviousComponent in class FocusManager

getFirstComponent

public Component getFirstComponent(Container aContainer)
Return the first component that should receive the focus

getLastComponent

public Component getLastComponent(Container aContainer)
Return the last component that should receive the focus

getComponentBefore

public Component getComponentBefore(Container aContainer,
                                    Component aComponent)
Return the component that should receive the focus before aComponent

getComponentAfter

public Component getComponentAfter(Container aContainer,
                                   Component aComponent)
Return the component the should receive the focus after aComponent

compareTabOrder

public boolean compareTabOrder(Component a,
                               Component b)
Return true if a should be before b in the "tab" order. Override this method if you want to change the automatic "tab" order. The default implementation will order tab to give a left to right, top down order. Override this method if another order is required.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultListCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultListCellRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.DefaultListCellRenderer
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
DefaultListCellRenderer.UIResource, MetalFileChooserUI.FileRenderer, MetalFileChooserUI.FilterComboBoxRenderer
public class DefaultListCellRenderer
extends JLabel
implements ListCellRenderer, Serializable

Renders an item in a list.

Implementation Note: This class overrides validate, revalidate, repaint, and firePropertyChange solely to improve performance. If not overridden, these frequently called methods would execute code paths that are unnecessary for the default list cell renderer. If you write your own renderer, take care to weigh the benefits and drawbacks of overriding these methods.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
static class DefaultListCellRenderer.UIResource
A subclass of DefaultListCellRenderer that implements UIResource.
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected static Border noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultListCellRenderer()
Constructs a default renderer object for an item in a list.
Method Summary
void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, byte oldValue, byte newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, char oldValue, char newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, double oldValue, double newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, float oldValue, float newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, int oldValue, int newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, long oldValue, long newValue) Overridden for performance reasons.
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, short oldValue, short newValue) Overridden for performance reasons.
Component | getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) Return a component that has been configured to display the specified value.
void | repaint(long tm, int x, int y, int width, int height) Overridden for performance reasons.
void | repaint(Rectangle r) Overridden for performance reasons.
void | revalidate() Overridden for performance reasons.
void | validate() Overridden for performance reasons.
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

noFocusBorder

protected static Border noFocusBorder
Constructor Detail

DefaultListCellRenderer

public DefaultListCellRenderer()
Constructs a default renderer object for an item in a list.
Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Description copied from interface: ListCellRenderer
Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.
Specified by:
getListCellRendererComponent in interface ListCellRenderer
Following copied from interface: javax.swing.ListCellRenderer
Parameters:
list - The JList we're painting.
value - The value returned by list.getModel().getElementAt(index).
index - The cells index.
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.
Returns:
A component whose paint() method will render the specified value.
See Also:
JList, ListSelectionModel, ListModel

validate

public void validate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
validate in class Container
Following copied from class: java.awt.Container
See Also:
Container.validate(), Component.invalidate()

revalidate

public void revalidate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
revalidate in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.invalidate(),
Container.validate(),
JComponent.isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

repaint

public void repaint(Rectangle r)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(String propertyName,
                               byte oldValue,
                               byte newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               char oldValue,
                               char newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               short oldValue,
                               short newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               int oldValue,
                               int newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               long oldValue,
                               long newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               float oldValue,
                               float newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               double oldValue,
                               double newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultListModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultListModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.DefaultListModel
All Implemented Interfaces:
ListModel, Serializable
public class DefaultListModel
extends AbstractListModel

This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur. Presently it delegates to a Vector, in a future release it will be a real Collection implementation.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractListModel
listenerList
Constructor Summary
DefaultListModel()
Method Summary
void | add(int index, Object element) Inserts the specified element at the specified position in this list.
void | addElement(Object obj) Adds the specified component to the end of this list.
int | capacity() Returns the current capacity of this list.
void | clear() Removes all of the elements from this list.
boolean | contains(Object elem) Tests if the specified object is a component in this list.
void | copyInto(Object[] anArray) Copies the components of this list into the specified array.
Object | elementAt(int index) Returns the component at the specified index.
Enumeration | elements() Returns an enumeration of the components of this list.
void | ensureCapacity(int minCapacity) Increases the capacity of this list, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
Object | firstElement() Returns the first component of this list.
Object | get(int index) Returns the element at the specified position in this list.
Object | getElementAt(int index) Returns the component at the specified index.
int | getSize() Returns the number of components in this list.
int | indexOf(Object elem) Searches for the first occurence of the given argument.
int | indexOf(Object elem, int index) Searches for the first occurence of the given argument, beginning the search at index.
void | insertElementAt(Object obj, int index) Inserts the specified object as a component in this list at the specified index.
boolean | isEmpty() Tests if this list has no components.
Object | lastElement() Returns the last component of the list.
int | lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this list.
int | lastIndexOf(Object elem, int index) Searches backwards for the specified object, starting from the specified index, and returns an index to it.
Object | remove(int index) Removes the element at the specified position in this list.
void | removeAllElements() Removes all components from this list and sets its size to zero.
boolean | removeElement(Object obj) Removes the first (lowest-indexed) occurrence of the argument from this list.
void | removeElementAt(int index) Deletes the component at the specified index.
void | removeRange(int fromIndex, int toIndex) Deletes the components at the specified range of indexes.
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
void | setElementAt(Object obj, int index) Sets the component at the specified index of this list to be the specified object.
void | setSize(int newSize) Sets the size of this list.
int | size() Returns the number of components in this list.
Object[] | toArray() Returns an array containing all of the elements in this list in the correct order.
String | toString() Returns a string that displays and identifies this object's properties.
void | trimToSize() Trims the capacity of this list to be the list's current size.
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultListModel

public DefaultListModel()
Method Detail

getSize

public int getSize()
Returns the number of components in this list.

This method is identical to size(), which implements the List interface defined in the 1.2 Collections framework. This method exists in conjunction with setSize() so that "size" is identifiable as a JavaBean property.

Returns:
the number of components in this list.
See Also:
size()

getElementAt

public Object getElementAt(int index)
Returns the component at the specified index.
Note: Although this method is not deprecated, the preferred method to use is get(int), which implements the List interface defined in the 1.2 Collections framework.
Parameters:
index - an index into this list.
Returns:
the component at the specified index.
Throws:
ArrayIndexOutOfBoundsException - if the index is negative or not less than the current size of this list. given.
See Also:
get(int)

copyInto

public void copyInto(Object[] anArray)
Copies the components of this list into the specified array. The array must be big enough to hold all the objects in this list, else an IndexOutOfBoundsException is thrown.
Parameters:
anArray - the array into which the components get copied.
See Also:
Vector.copyInto(Object[])

trimToSize

public void trimToSize()
Trims the capacity of this list to be the list's current size.
See Also:
Vector.trimToSize()

ensureCapacity

public void ensureCapacity(int minCapacity)
Increases the capacity of this list, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
Parameters:
minCapacity - the desired minimum capacity.
See Also:
Vector.ensureCapacity(int)

setSize

public void setSize(int newSize)
Sets the size of this list.
Parameters:
newSize - the new size of this list.
See Also:
Vector.setSize(int)

capacity

public int capacity()
Returns the current capacity of this list.
Returns:
the current capacity
See Also:
Vector.capacity()

size

public int size()
Returns the number of components in this list.
Returns:
the number of components in this list.
See Also:
Vector.size()

isEmpty

public boolean isEmpty()
Tests if this list has no components.
Returns:
true if and only if this list has no components, that is, its size is zero; false otherwise.
See Also:
Vector.isEmpty()

elements

public Enumeration elements()
Returns an enumeration of the components of this list.
Returns:
an enumeration of the components of this list.
See Also:
Vector.elements()

contains

public boolean contains(Object elem)
Tests if the specified object is a component in this list.
Parameters:
elem - an object.
Returns:
true if the specified object is the same as a component in this list
See Also:
Vector.contains(Object)

indexOf

public int indexOf(Object elem)
Searches for the first occurence of the given argument.
Parameters:
elem - an object.
Returns:
the index of the first occurrence of the argument in this list; returns -1 if the object is not found.
See Also:
Vector.indexOf(Object)

indexOf

public int indexOf(Object elem,
                   int index)
Searches for the first occurence of the given argument, beginning the search at index.
Parameters:
elem - an object.
index - the index to start searching from.
Returns:
the index of the first occurrence of the object argument in this list at position index or later in the list; returns -1 if the object is not found.
See Also:
Vector.indexOf(Object,int)

lastIndexOf

public int lastIndexOf(Object elem)
Returns the index of the last occurrence of the specified object in this list.
Parameters:
elem - the desired component.
Returns:
the index of the last occurrence of the specified object in this list; returns -1 if the object is not found.
See Also:
Vector.lastIndexOf(Object)

lastIndexOf

public int lastIndexOf(Object elem,
                       int index)
Searches backwards for the specified object, starting from the specified index, and returns an index to it.
Parameters:
elem - the desired component.
index - the index to start searching from.
Returns:
the index of the last occurrence of the specified object in this list at position less than index in the list; -1 if the object is not found.
See Also:
Vector.lastIndexOf(Object,int)

elementAt

public Object elementAt(int index)
Returns the component at the specified index. Throws an ArrayIndexOutOfBoundsException if the index is negative or not less than the size of the list.
Note: Although this method is not deprecated, the preferred method to use is get(int), which implements the List interface defined in the 1.2 Collections framework.
Parameters:
index - an index into this list.
Returns:
the component at the specified index.
See Also:
get(int), Vector.elementAt(int)

firstElement

public Object firstElement()
Returns the first component of this list. Throws a NoSuchElementException if this vector has no components *
Returns:
the first component of this list
See Also:
Vector.firstElement()

lastElement

public Object lastElement()
Returns the last component of the list. Throws a NoSuchElementException if this vector has no components *
Returns:
the last component of the list
See Also:
Vector.lastElement()

setElementAt

public void setElementAt(Object obj,
                         int index)
Sets the component at the specified index of this list to be the specified object. The previous component at that position is discarded.

Throws an ArrayIndexOutOfBoundsException if the index is invalid.

Note: Although this method is not deprecated, the preferred method to use is set(int,Object), which implements the List interface defined in the 1.2 Collections framework.
Parameters:
obj - what the component is to be set to.
index - the specified index.
See Also:
set(int,Object), Vector.setElementAt(Object,int)

removeElementAt

public void removeElementAt(int index)
Deletes the component at the specified index.

Throws an ArrayIndexOutOfBoundsException if the index is invalid.

Note: Although this method is not deprecated, the preferred method to use is remove(int), which implements the List interface defined in the 1.2 Collections framework.
Parameters:
index - the index of the object to remove.
See Also:
remove(int), Vector.removeElementAt(int)

insertElementAt

public void insertElementAt(Object obj,
                            int index)
Inserts the specified object as a component in this list at the specified index.

Throws an ArrayIndexOutOfBoundsException if the index is invalid.

Note: Although this method is not deprecated, the preferred method to use is add(int,Object), which implements the List interface defined in the 1.2 Collections framework.
Parameters:
obj - the component to insert.
index - where to insert the new component.
Throws:
ArrayIndexOutOfBoundsException - if the index was invalid.
See Also:
add(int,Object), Vector.insertElementAt(Object,int)

addElement

public void addElement(Object obj)
Adds the specified component to the end of this list.
Parameters:
obj - the component to be added.
See Also:
Vector.addElement(Object)

removeElement

public boolean removeElement(Object obj)
Removes the first (lowest-indexed) occurrence of the argument from this list.
Parameters:
obj - the component to be removed.
Returns:
true if the argument was a component of this list; false otherwise.
See Also:
Vector.removeElement(Object)

removeAllElements

public void removeAllElements()
Removes all components from this list and sets its size to zero.
Note: Although this method is not deprecated, the preferred method to use is clear(), which implements the List interface defined in the 1.2 Collections framework.
See Also:
clear(), Vector.removeAllElements()

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object

toArray

public Object[] toArray()
Returns an array containing all of the elements in this list in the correct order.

Throws an ArrayStoreException if the runtime type of the array a is not a supertype of the runtime type of every element in this list.

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the list.
See Also:
Vector.toArray()

get

public Object get(int index)
Returns the element at the specified position in this list.

Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

Parameters:
index - index of element to return.

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element.

Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list.

Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.

remove

public Object remove(int index)
Removes the element at the specified position in this list. Returns the element that was removed from the list.

Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

Parameters:
index - the index of the element to removed.

clear

public void clear()
Removes all of the elements from this list. The list will be empty after this call returns (unless it throws an exception).

removeRange

public void removeRange(int fromIndex,
                        int toIndex)
Deletes the components at the specified range of indexes. The removal is inclusive, so specifying a range of (1,5) removes the component at index 1 and the component at index 5, as well as all components in between.

Throws an ArrayIndexOutOfBoundsException if the index was invalid. Throws an IllegalArgumentException if fromIndex > toIndex.

Parameters:
fromIndex - the index of the lower end of the range
toIndex - the index of the upper end of the range
See Also:
remove(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultListSelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultListSelectionModel

java.lang.Object
  |
  +--javax.swing.DefaultListSelectionModel
All Implemented Interfaces:
Cloneable, ListSelectionModel, Serializable
public class DefaultListSelectionModel
extends Object
implements ListSelectionModel, Cloneable, Serializable

Default data model for list selections.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
ListSelectionModel, Serialized Form

Field Summary
protected boolean | leadAnchorNotificationEnabled
protected EventListenerList | listenerList
Fields inherited from interface javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION
Constructor Summary
DefaultListSelectionModel()
Method Summary
 void addListSelectionListener(ListSelectionListener l)
Add a listener to the list that's notified each time a change to the selection occurs.
 void addSelectionInterval(int index0, int index1)
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive.
 void clearSelection()
Change the selection to the empty set.
 Object clone()
Returns a clone of this selection model with the same selection.
protected  void fireValueChanged(boolean isAdjusting)
Notifies listeners that we have ended a series of adjustments.
protected  void fireValueChanged(int firstIndex, int lastIndex)
Notifies ListSelectionListeners that the value of the selection, in the closed interval firstIndex, lastIndex, has changed.
protected  void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting)
 int getAnchorSelectionIndex()
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
 int getLeadSelectionIndex()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
 EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
 int getMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty.
 int getMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty.
 int getSelectionMode()
Returns the selection mode.
 boolean getValueIsAdjusting()
Returns true if the value is undergoing a series of changes.
 void insertIndexInterval(int index, int length, boolean before)
Insert length indices beginning before/after index.
 boolean isLeadAnchorNotificationEnabled()
Returns the value of the leadAnchorNotificationEnabled flag.
 boolean isSelectedIndex(int index)
Returns true if the specified index is selected.
 boolean isSelectionEmpty()
Returns true if no indices are selected.
 void removeIndexInterval(int index0, int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model.
 void removeListSelectionListener(ListSelectionListener l)
Remove a listener from the list that's notified each time a change to the selection occurs.
 void removeSelectionInterval(int index0, int index1)
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.
 void setAnchorSelectionIndex(int anchorIndex)
Set the anchor selection index, leaving all selection values unchanged.
 void setLeadAnchorNotificationEnabled(boolean flag)
Sets the value of the leadAnchorNotificationEnabled flag.
 void setLeadSelectionIndex(int leadIndex)
Sets the lead selection index, ensuring that values between the anchor and the new lead are either all selected or all deselected.
 void setSelectionInterval(int index0, int index1)
Change the selection to be between index0 and index1 inclusive.
 void setSelectionMode(int selectionMode)
Sets the selection mode.
 void setValueIsAdjusting(boolean isAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event.
 String toString()
Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

listenerList

protected EventListenerList listenerList

leadAnchorNotificationEnabled

protected boolean leadAnchorNotificationEnabled
Constructor Detail

DefaultListSelectionModel

public DefaultListSelectionModel()
Method Detail

getMinSelectionIndex

public int getMinSelectionIndex()
Description copied from interface: ListSelectionModel
Returns the first selected index or -1 if the selection is empty.
Specified by:
getMinSelectionIndex in interface ListSelectionModel

getMaxSelectionIndex

public int getMaxSelectionIndex()
Description copied from interface: ListSelectionModel
Returns the last selected index or -1 if the selection is empty.
Specified by:
getMaxSelectionIndex in interface ListSelectionModel

getValueIsAdjusting

public boolean getValueIsAdjusting()
Description copied from interface: ListSelectionModel
Returns true if the value is undergoing a series of changes.
Specified by:
getValueIsAdjusting in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Returns:
true if the value is currently adjusting
See Also:
ListSelectionModel.setValueIsAdjusting(boolean)

getSelectionMode

public int getSelectionMode()
Returns the selection mode.
Specified by:
getSelectionMode in interface ListSelectionModel
Returns:
one of the these values:
  • SINGLE_SELECTION
  • SINGLE_INTERVAL_SELECTION
  • MULTIPLE_INTERVAL_SELECTION
See Also:
getSelectionMode()

setSelectionMode

public void setSelectionMode(int selectionMode)
Sets the selection mode. The default is MULTIPLE_INTERVAL_SELECTION.
Specified by:
setSelectionMode in interface ListSelectionModel
Parameters:
selectionMode - one of three values:
  • SINGLE_SELECTION
  • SINGLE_INTERVAL_SELECTION
  • MULTIPLE_INTERVAL_SELECTION
Throws:
IllegalArgumentException - if selectionMode is not one of the legal values shown above
See Also:
setSelectionMode(int)

isSelectedIndex

public boolean isSelectedIndex(int index)
Description copied from interface: ListSelectionModel
Returns true if the specified index is selected.
Specified by:
isSelectedIndex in interface ListSelectionModel

isSelectionEmpty

public boolean isSelectionEmpty()
Description copied from interface: ListSelectionModel
Returns true if no indices are selected.
Specified by:
isSelectionEmpty in interface ListSelectionModel

addListSelectionListener

public void addListSelectionListener(ListSelectionListener l)
Description copied from interface: ListSelectionModel
Add a listener to the list that's notified each time a change to the selection occurs.
Specified by:
addListSelectionListener in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
l - the ListSelectionListener
See Also:
ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener),
ListSelectionModel.setSelectionInterval(int, int),
ListSelectionModel.addSelectionInterval(int, int),
ListSelectionModel.removeSelectionInterval(int, int),
ListSelectionModel.clearSelection(),
ListSelectionModel.insertIndexInterval(int, int, boolean),
ListSelectionModel.removeIndexInterval(int, int)

removeListSelectionListener

public void removeListSelectionListener(ListSelectionListener l)
Description copied from interface: ListSelectionModel
Remove a listener from the list that's notified each time a change to the selection occurs.
Specified by:
removeListSelectionListener in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
l - the ListSelectionListener
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

fireValueChanged

protected void fireValueChanged(boolean isAdjusting)
Notifies listeners that we have ended a series of adjustments.

fireValueChanged

protected void fireValueChanged(int firstIndex,
                                int lastIndex)
Notifies ListSelectionListeners that the value of the selection, in the closed interval firstIndex, lastIndex, has changed.

fireValueChanged

protected void fireValueChanged(int firstIndex,
                                int lastIndex,
                                boolean isAdjusting)
Parameters:
firstIndex - the first index in the interval
lastIndex - the last index in the interval
isAdjusting - true if this is the final change in a series of adjustments
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
Returns:
all of the objects receiving listenerType notifications from this model
Since:
1.3

setLeadAnchorNotificationEnabled

public void setLeadAnchorNotificationEnabled(boolean flag)
Sets the value of the leadAnchorNotificationEnabled flag.
See Also:
isLeadAnchorNotificationEnabled()

isLeadAnchorNotificationEnabled

public boolean isLeadAnchorNotificationEnabled()
Returns the value of the leadAnchorNotificationEnabled flag. When leadAnchorNotificationEnabled is true the model generates notification events with bounds that cover all the changes to the selection plus the changes to the lead and anchor indices. Setting the flag to false causes a narrowing of the event's bounds to include only the elements that have been selected or deselected since the last change. Either way, the model continues to maintain the lead and anchor variables internally. The default is true.
Returns:
the value of the leadAnchorNotificationEnabled flag
See Also:
setLeadAnchorNotificationEnabled(boolean)

clearSelection

public void clearSelection()
Description copied from interface: ListSelectionModel
Change the selection to the empty set. If this represents a change to the current selection then notify each ListSelectionListener.
Specified by:
clearSelection in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

setSelectionInterval

public void setSelectionInterval(int index0,
                                 int index1)
Description copied from interface: ListSelectionModel
Change the selection to be between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Specified by:
setSelectionInterval in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

addSelectionInterval

public void addSelectionInterval(int index0,
                                 int index1)
Description copied from interface: ListSelectionModel
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Specified by:
addSelectionInterval in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Description copied from interface: ListSelectionModel
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Specified by:
removeSelectionInterval in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

insertIndexInterval

public void insertIndexInterval(int index,
                                int length,
                                boolean before)
Insert length indices beginning before/after index. If the value at index is itself selected, set all of the newly inserted items, otherwise leave them unselected. This method is typically called to sync the selection model with a corresponding change in the data model.
Specified by:
insertIndexInterval in interface ListSelectionModel

removeIndexInterval

public void removeIndexInterval(int index0,
                                int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model. This is typically called to sync the selection model width a corresponding change in the data model. Note that (as always) index0 need not be <= index1.
Specified by:
removeIndexInterval in interface ListSelectionModel

setValueIsAdjusting

public void setValueIsAdjusting(boolean isAdjusting)
Description copied from interface: ListSelectionModel
This property is true if upcoming changes to the value of the model should be considered a single event. For example if the model is being updated in response to a user drag, the value of the valueIsAdjusting property will be set to true when the drag is initiated and be set to false when the drag is finished. This property allows listeners to to update only when a change has been finalized, rather than always handling all of the intermediate values.
Specified by:
setValueIsAdjusting in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
Parameters:
valueIsAdjusting - The new value of the property.
See Also:
ListSelectionModel.getValueIsAdjusting()

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone of this selection model with the same selection. listenerLists are not duplicated.
Overrides:
clone in class Object
Throws:
CloneNotSupportedException - if the selection model does not both (a) implement the Cloneable interface and (b) define a clone method.

getAnchorSelectionIndex

public int getAnchorSelectionIndex()
Description copied from interface: ListSelectionModel
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). The most recent index0 is considered the "anchor" and the most recent index1 is considered the "lead". Some interfaces display these indices specially, e.g. Windows95 displays the lead index with a dotted yellow outline.
Specified by:
getAnchorSelectionIndex in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
See Also:
ListSelectionModel.getLeadSelectionIndex(),
ListSelectionModel.setSelectionInterval(int, int),
ListSelectionModel.addSelectionInterval(int, int)

getLeadSelectionIndex

public int getLeadSelectionIndex()
Description copied from interface: ListSelectionModel
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
Specified by:
getLeadSelectionIndex in interface ListSelectionModel
Following copied from interface: javax.swing.ListSelectionModel
See Also:
ListSelectionModel.getAnchorSelectionIndex(),
ListSelectionModel.setSelectionInterval(int, int),
ListSelectionModel.addSelectionInterval(int, int)

setAnchorSelectionIndex

public void setAnchorSelectionIndex(int anchorIndex)
Set the anchor selection index, leaving all selection values unchanged. If leadAnchorNotificationEnabled is true, send a notification covering the old and new anchor cells.
Specified by:
setAnchorSelectionIndex in interface ListSelectionModel
See Also:
getAnchorSelectionIndex(), setLeadSelectionIndex(int)

setLeadSelectionIndex

public void setLeadSelectionIndex(int leadIndex)
Sets the lead selection index, ensuring that values between the anchor and the new lead are either all selected or all deselected. If the value at the anchor index is selected, first clear all the values in the range [anchor, oldLeadIndex], then select all the values values in the range [anchor, newLeadIndex], where oldLeadIndex is the old leadIndex and newLeadIndex is the new one.

If the value at the anchor index is not selected, do the same thing in reverse selecting values in the old range and deslecting values in the new one.

Generate a single event for this change and notify all listeners. For the purposes of generating minimal bounds in this event, do the operation in a single pass; that way the first and last index inside the ListSelectionEvent that is broadcast will refer to cells that actually changed value because of this method. If, instead, this operation were done in two steps the effect on the selection state would be the same but two events would be generated and the bounds around the changed values would be wider, including cells that had been first cleared only to later be set.

This method can be used in the mouseDragged method of a UI class to extend a selection.

Specified by:
setLeadSelectionIndex in interface ListSelectionModel
See Also:
getLeadSelectionIndex(), setAnchorSelectionIndex(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultSingleSelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultSingleSelectionModel

java.lang.Object
  |
  +--javax.swing.DefaultSingleSelectionModel
All Implemented Interfaces:
Serializable, SingleSelectionModel
public class DefaultSingleSelectionModel
extends Object
implements SingleSelectionModel, Serializable

A generic implementation of SingleSelectionModel.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected ChangeEvent | changeEvent
protected EventListenerList | listenerList The collection of registered listeners
Constructor Summary
DefaultSingleSelectionModel()
Method Summary
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | clearSelection() Clears the selection (to -1).
protected void | fireStateChanged()
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
int | getSelectedIndex() Returns the model's selection.
boolean | isSelected() Returns true if the selection model currently has a selected value.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | setSelectedIndex(int index) Sets the model's selected index to index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

changeEvent

protected transient ChangeEvent changeEvent

listenerList

protected EventListenerList listenerList
The collection of registered listeners
Constructor Detail

DefaultSingleSelectionModel

public DefaultSingleSelectionModel()
Method Detail

getSelectedIndex

public int getSelectedIndex()
Description copied from interface: SingleSelectionModel
Returns the model's selection.
Specified by:
getSelectedIndex in interface SingleSelectionModel
Following copied from interface: javax.swing.SingleSelectionModel
Returns:
the model's selection, or -1 if there is no selection
See Also:
SingleSelectionModel.setSelectedIndex(int)

setSelectedIndex

public void setSelectedIndex(int index)
Description copied from interface: SingleSelectionModel
Sets the model's selected index to index. Notifies any listeners if the model changes
Specified by:
setSelectedIndex in interface SingleSelectionModel
Following copied from interface: javax.swing.SingleSelectionModel
Parameters:
an - int specifying the model selection
See Also:
SingleSelectionModel.getSelectedIndex(), SingleSelectionModel.addChangeListener(javax.swing.event.ChangeListener)

clearSelection

public void clearSelection()
Description copied from interface: SingleSelectionModel
Clears the selection (to -1).
Specified by:
clearSelection in interface SingleSelectionModel

isSelected

public boolean isSelected()
Description copied from interface: SingleSelectionModel
Returns true if the selection model currently has a selected value.
Specified by:
isSelected in interface SingleSelectionModel
Following copied from interface: javax.swing.SingleSelectionModel
Returns:
true if a value is currently selected

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Specified by:
addChangeListener in interface SingleSelectionModel
Following copied from interface: javax.swing.SingleSelectionModel
Parameters:
l - the ChangeListener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Specified by:
removeChangeListener in interface SingleSelectionModel
Following copied from interface: javax.swing.SingleSelectionModel
Parameters:
l - the ChangeListener to remove

fireStateChanged

protected void fireStateChanged()

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DesktopManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface DesktopManager

All Known Implementing Classes:
DefaultDesktopManager
public interface DesktopManager

DesktopManager objects are owned by a JDesktopPane object. They are responsible for implementing L&F specific behaviors for the JDesktopPane. JInternalFrame implementations should delegate specific behaviors to the DesktopManager. For instance, if a JInternalFrame was asked to iconify, it should try:

    getDesktopPane().getDesktopManager().iconifyFrame(frame);
This delegation allows each L&F to provide custom behaviors for desktop-specific actions. (For example, how and where the internal frame's icon would appear.)

See Also:
JDesktopPane, JInternalFrame, JInternalFrame.JDesktopIcon

Method Summary
void | activateFrame(JInternalFrame f) Generally, indicate that this frame has focus.
void | beginDraggingFrame(JComponent f) This method is normally called when the user has indicated that they will begin dragging a component around.
void | beginResizingFrame(JComponent f, int direction) This methods is normally called when the user has indicated that they will begin resizing the frame.
void | closeFrame(JInternalFrame f) Generally, this call should remove the frame from it's parent.
void | deactivateFrame(JInternalFrame f) Generally, indicate that this frame has lost focus.
void | deiconifyFrame(JInternalFrame f) Generally, remove any iconic representation that is present and restore the frame to it's original size and location.
void | dragFrame(JComponent f, int newX, int newY) The user has moved the frame.
void | endDraggingFrame(JComponent f) This method signals the end of the dragging session.
void | endResizingFrame(JComponent f) This method signals the end of the resize session.
void | iconifyFrame(JInternalFrame f) Generally, remove this frame from it's parent and add an iconic representation.
void | maximizeFrame(JInternalFrame f) Generally, the frame should be resized to match it's parents bounds.
void | minimizeFrame(JInternalFrame f) Generally, this indicates that the frame should be restored to it's size and position prior to a maximizeFrame() call.
void | openFrame(JInternalFrame f) If possible, display this frame in an appropriate location.
void | resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) The user has resized the component.
void | setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) This is a primative reshape method.

Method Detail

openFrame

public void openFrame(JInternalFrame f)
If possible, display this frame in an appropriate location. Normally, this is not called, as the creator of the JInternalFrame will add the frame to the appropriate parent.

closeFrame

public void closeFrame(JInternalFrame f)
Generally, this call should remove the frame from it's parent.

maximizeFrame

public void maximizeFrame(JInternalFrame f)
Generally, the frame should be resized to match it's parents bounds.

minimizeFrame

public void minimizeFrame(JInternalFrame f)
Generally, this indicates that the frame should be restored to it's size and position prior to a maximizeFrame() call.

iconifyFrame

public void iconifyFrame(JInternalFrame f)
Generally, remove this frame from it's parent and add an iconic representation.

deiconifyFrame

public void deiconifyFrame(JInternalFrame f)
Generally, remove any iconic representation that is present and restore the frame to it's original size and location.

activateFrame

public void activateFrame(JInternalFrame f)
Generally, indicate that this frame has focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to true.

deactivateFrame

public void deactivateFrame(JInternalFrame f)
Generally, indicate that this frame has lost focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.

beginDraggingFrame

public void beginDraggingFrame(JComponent f)
This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.

dragFrame

public void dragFrame(JComponent f,
                      int newX,
                      int newY)
The user has moved the frame. Calls to this method will be preceeded by calls to beginDraggingFrame(). Normally f will be a JInternalFrame.

endDraggingFrame

public void endDraggingFrame(JComponent f)
This method signals the end of the dragging session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.

beginResizingFrame

public void beginResizingFrame(JComponent f,
                               int direction)
This methods is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.

resizeFrame

public void resizeFrame(JComponent f,
                        int newX,
                        int newY,
                        int newWidth,
                        int newHeight)
The user has resized the component. Calls to this method will be preceeded by calls to beginResizingFrame(). Normally f will be a JInternalFrame.

endResizingFrame

public void endResizingFrame(JComponent f)
This method signals the end of the resize session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.

setBoundsForFrame

public void setBoundsForFrame(JComponent f,
                              int newX,
                              int newY,
                              int newWidth,
                              int newHeight)
This is a primative reshape method.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Component

Swing Component Keystroke Assignments

Basic Components

Component | Java Look&Feel | Motif | Windows
JApplet | Key-Java | Key-Motif | Key-Win32
JButton | Key-Java | Key-Motif | Key-Win32
JCheckBox | Key-Java | Key-Motif | Key-Win32
JRadioButton | Key-Java | Key-Motif | Key-Win32
JToggleButton | Key-Java | Key-Motif | Key-Win32
JComboBox | Key-Java | Key-Motif | Key-Win32
JList | Key-Java | Key-Motif | Key-Win32
JSlider | Key-Java | Key-Motif | Key-Win32
JTable | Key-Java | Key-Motif | Key-Win32
JTree | Key-Java | Key-Motif | Key-Win32
Menus, ToolBar and ToolTips

Component | Java Look&Feel | Motif | Windows
JMenuBar | Key-Java | Key-Motif | Key-Win32
JMenu | Key-Java | Key-Motif | Key-Win32
JMenuItem | Key-Java | Key-Motif | Key-Win32
JCheckBoxMenuItem | Key-Java | Key-Motif | Key-Win32
JRadioButtonMenuItem | Key-Java | Key-Motif | Key-Win32
JPopupMenu | Key-Java | Key-Motif | Key-Win32
JToolBar | Key-Java | Key-Motif | Key-Win32
JToolTip | Key-Java | Key-Motif | Key-Win32
Text Components

Component | Java Look&Feel | Motif | Windows
JTextField | Key-Java | Key-Motif | Key-Win32
JPasswordField | Key-Java | Key-Motif | Key-Win32
JTextArea | Key-Java | Key-Motif | Key-Win32
JTextPane | Key-Java | Key-Motif | Key-Win32
JEditorPane | Key-Java | Key-Motif | Key-Win32
Containers

Component | Java Look&Feel | Motif | Windows
JOptionPane | Key-Java | Key-Motif | Key-Win32
JDialog | Key-Java | Key-Motif | Key-Win32
JScrollPane | Key-Java | Key-Motif | Key-Win32
JSplitPane | Key-Java | Key-Motif | Key-Win32
JTabbedPane | Key-Java | Key-Motif | Key-Win32
JFrame | Key-Java | Key-Motif | Key-Win32
JInternalFrame | Key-Java | Key-Motif | Key-Win32
JDesktopPane | Key-Java | Key-Motif | Key-Win32
JWindow | Key-Java | Key-Motif | Key-Win32


Java L&F

This page gives the Java Look and Feel keystroke-actions for:

The Applet Component
Standard Components
Structured Components
Menu, Toolbar, and Tooltip Components
Text Components
Containers: Frames, Windows, Panes, and Icons

    NOTE: The following is a table in text form. The format of the table is as follows:
Component
Action1 | Key Sequence1
Action2 | Key Sequence2
...

    Previous versions of this material also contained an "Implemented" column. In order to
    simplify, and keep this information current, this column has been omitted. If
    you identify keyboard bindings that are not working, please file them as bug reports so that they
    may be addressed and repaired.

The Applet Component

JApplet (Java L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Shift+Ctrl+Tab
Activate the default button (if defined)    |  Enter

Standard Components

JButton (Java L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Activate Default    |  Enter
Activate Any        |  Spacebar
Activate Any        |  Alt+Char accelerator key, if defined
Activate Cancel or Close    |  Esc

JCheckBox (Java L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JRadioButton (Java L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
        NOTE: Navigating to a radio button selects it.
Check/Uncheck    |  Spacebar

JToggleButton (Java L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JComboBox (Java L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Post menu               |  Alt+Down
Retract menu            |  Esc
Retract menu            |  Alt+Up
Toggle menu up or down  |  Alt+Up/Down
Activate menuitem       |  Enter
Jump to menuitem without selecting it    |  Initial Char of Item
Move up or down         |  Up, Down
    NOTE A: For other navigation keys, please see JList.
    NOTE B: For more information on Edit Field, please see JTextField.

JList (Java L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Activate selection      |  Enter
Move within list        |  Up, Down
Move to beginning of list    |  Ctrl+Home
Move to end of list     |  Ctrl+End
Select all entries      |  Ctrl+A
Make a selection        | Spacebar
    NOTE: This will deselect previous selection
Select an additional item    |  Ctrl+Spacebar
Range select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to top    |  Shift+Home
Extend selection to end    |  Shift+End
Block extend up         |  Shift+PgUp
Block extend down       |  Shift+PgDn
Block move              |  PgUp, PgDn

JSlider (Java L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Increase value          |  Up, Right
Decrease value          |  Left, Down
Minimum value           |  Home
Maximum value           |  End
Block increase          |  PgUp
Block decrease          |  PgDn

Structured Components

JTable (Java L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move to next cell       |  Tab
Move to next cell       |  Right Arrow
Move to previous cell   |  Shift+Tab
Move to previous cell   |  Left Arrow
Wrap to next row        |  Tab
Wrap to next row        |  Right Arrow
Wrap to previous row    |  Shift+Tab or Left
Wrap to previous row    |  Shift+Tab or Left
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp/PgDn
Block extend left       |  Ctrl+Shift+PgUp
Block extend right      |  Ctrl+Shift+PgDn
Move to first cell in row    |  Home
Move to last cell in row     |  End
Move to first cell in table  |  Ctrl+Home
Move to last cell in table   |  Ctrl+End
Select all cells             |  Ctrl+A
Deselect current selection   |  Up/Down Arrow
Deselect current selection   |  Ctrl+Up/Down Arrow
Deselect current selection   |  Pgup/Pgdn
Deselect current selection   |  Ctrl+Pgup/Pgdn
Deselect current selection   |  Home/End
Deselect current selection   |  Ctrl+Home/End
Extend selection one row     |  Shift+Up/Down
Extend selection one column  |  Shift+Left/Right
Extend selection to beginning/end of row    |  Shift+Home/End
Extend selection to beginning/end of column    |  Ctrl+Shift+Home/End
Edit cell without overriding current contents    |  F2
Reset cell content prior to editing    |  Esc

JTree (Java L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Expand entry            |  Right
Collapse entry          |  Left
Toggle expand/collapse for entry    |  Enter
Move up/down one entry  |  Up, Down
Move to first entry     |  Home
Move to last visible entry    |  End
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp, Shift+PgDn
Select all              |  Ctrl+A
Select all              |  Ctrl+Slash
Deselect all            |  Ctrl+\
Single select           |  Ctrl+Spacebar
Range-select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to start of data    |  Shift+Home
Extend selection to end of data    |  Shift+End

Menu, Toolbar, and ToolTip Components

JMenuBar (Java L&F)
Jump to menubar    |  Alt
Navigate out       |  Esc
Navigate out       |  Alt
Navigate between items within menu    |  Arrow keys
Select first item (if no item selected)    |  F10
Select next item   |  Right
Select previous item    |  Left
Select default or selected item    |  Enter
Post menu          |  Up, Down
Post menu          |  Enter
Post menu          |  Spacebar
Post menu          |  Alt+Char accelerator key, if defined
Un-post menu       |  Esc
Un-post menu       |  Alt

JMenu (Java L&F)
Post menu    |  Enter
Post menu    |  F10
Post submenu    |  Right
Move to next item (wrap to top)    |  Down
Move to previous item (wrap to bottom)    |  Up
Retract menu    |  Esc
Retract submenu |  Left
Activate default or selected item    |  Enter

JMenuItem (Java L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Activate item  |  Enter
Activate item  |  Spacebar
Activate item  |  Alt+Char accelerator key, if defined
Post submenu   |  Right
Retract submenu    |  Left
Retract submenu    |  Esc

JCheckBoxMenuItem (Java L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JRadioButtonMenuItem (Java L&F)
Navigate in    |  Arrow keys
Navigate out  |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JPopupMenu (Java L&F)
Post menu    |  Shift+F10
Post submenu    |  Right
Close submenu    |  Left
Retract menu    |  Esc
Move within menu    |  Up, Down
Activate entry    |  Enter
Activate entry    |  Spacebar

JToolBar (Java L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Navigate within         |  Arrow Keys
Activate item           |  Enter

JToolTip (Java L&F)
Post tip    |  Ctrl+F1
Retract tip    |  Esc
Retract tip    |  Ctrl+F1

Text Components

JTextField (Java L&F)
Navigate in    |  Alt+Char accelerator key, if defined
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Move to prev/next char  |  Left, Right
Move to prev/next word  |  Ctrl+Left, Ctrl+Right
Move to start/end of field    |  Home/End
Submit entry            |  Enter
Select all              |  Ctrl+A
Deselect all            |  arrow keys
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end    |  Shift+Home, Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection        |  Ctrl+C
Cut selection         |  Ctrl+X
Paste from clipboard  |  Ctrl+V
Delete next character |  Delete
Delete previous character    |  Backspace

JPasswordField (Java L&F)
    NOTE A: for information on how to navigate/move within the field, and make selections,
    please see JTextField.

JTextArea (Java L&F)
Navigate in    |  Tab
Navigate in    |  Alt+Char Accelerator Key (if defined)
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move up/down one line        |  Up, Down
Move left/right one char     |  Left, Right
Move to start/end of line    |  Home, End
Move to prev/next word       |  Ctrl+Left/Right
Move to start/end of text area    |  Ctrl+Home/End
Block move up/down    |  PgUp, PgDn
Block move left       |  Ctrl+PgUp
Block move right      |  Ctrl+PgDn
Block extend up       |  Shift+PgUp
Block extend down     |  Shift+PgDn
Block extend left     |  Ctrl+Shift+PgUp
Block extend right    |  Ctrl+Shift+PgDn
Select all      |  Ctrl+A
Deselect all    |  arrow keys
Extend selection    |  Shift+Up, Shift+Down
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end of line    |  Shift+Home, Shift+End
Extend selection to start/end of text area    |  Ctrl+Shift+Home, Ctrl+Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection         |  Ctrl+C
Cut selection          |  Ctrl+X
Paste Selected Text    |  Ctrl+V
Delete next character        |  Delete
Delete previous character    |  Backspace
Insert line break    |  Enter
Insert tab           |  Tab

JTextPane (Java L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Navigate out backwards    |  Shift+Ctrl+Tab
Move up/down a line    |  Up/Down Arrow
Move left/right a component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to start/end of line    |  Home/End
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to start/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Select All    |  Ctrl+A
Extend selection up one line    |  Shift+Up Arrow
Extend selection down one line    |  Shift+Down Arrow
Extend selection to beginning of line    |  Shift+Home
Extend selection to end of line    |  Shift+End
Extend selection to beginning of data    |  Ctrl+Shift+Home
Extend selection to end of data    |  Ctrl+Shift+End
Extend selection left    |  Shift+Right Arrow
Extend selection right    |  Shift+Right Arrow
Extend selection up one vertical block    |  Shift+PgUp
Extend selection down one vertical block    |  Shift+PgDn
Extend selection left one block    |  Ctrl+Shift+PgUp
Extend selection right one block    |  Ctrl+Shift+PgDn
Extend selection left one word    |  Ctrl+Shift+Left Arrow
Extend selection right one word    |  Ctrl+Shift+Right Arrow

JEditorPane (Java L&F)
    NOTE A: For more information on how to navigate/move and make selections, please see
    JTextArea.
Move to next HTML link or other focusable element    |  Tab,
Move to prev HTML link or other focusable element    |  Shift+Tab
Move out of focusable elements that accept a tab     |  Ctrl+Tab, Ctrl+Shift+Tab
Activate an HTML link    |  Enter
Navigate in/out    |  Tab
Navigate out backwards    |  Shift+Tab
Move up/down one line    |  Up/Down Arrow
Move left/right one component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to beginning/end of line    |  Home/end
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to beginning/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Select All    |  Ctrl+A
Extend selection up/down one line    |  Shift+Up/Down Arrow
Extend selection left/right one component or char    |  Shift+Left/Right Arrow
Extend selection to start/end of line    |  Shift+Home/End
Extend selection to start/end of data    |  Ctrl+Shift+Home/End
Extend selection up/down one vertical block    |  Shift+PgUp/PgDn
Extend selection to previous/next word    |  Ctrl+Shift+Left/Right Arrow
Extend selection left/right one block    |  Ctrl+Shift+PgUp/PgDn

Containers: Frames, Windows, Panes, and Icons

JDesktopPane (Java L&F)
Navigate forward among open application windows, then desktop icons    |  Ctrl+Alt+F6
Navigate forward among open application windows, then desktop icons    |  Alt+Tab
Navigate forward among open application windows, then desktop icons    |  Alt+Esc
Navigate backward among open application windows, then desktop icons    |  Ctrl+Alt+Shift+F6
Navigate backward among open application windows, then desktop icons    |  Alt+Shift+Tab
Navigate forward among open associated windows    |  Ctrl+F6
Navigate forward among open associated windows    |  Alt+F6
Navigate backward among open associated windows    |  Ctrl+Shift+F6
Navigate backward among open associated windows    |  Alt+Shift+F6
Post  menu of window-options    |  Shift+Esc
Post  menu of window-options    |  Ctrl+Spacebar
Post  menu of window-options    |  Alt+Spacebar
Open window (when iconized)    |  Enter

JOptionPane (Java L&F)
Navigate in/out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JDialog (Java L&F)
Navigate out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JScrollPane (Java L&F)
Navigate out forward    |  Tab
Navigate out backward    |  Shift+Tab
Move up/down    |  Up, Down
Move left/right    |  Left, Right
Move to start/end of data    |  Ctrl+Home, Ctrl+End
Block move up/down    |  PgUp, PgDn
Block move right    |  Ctrl+PgDn
Block move left    |  Ctrl+PgUp

JSplitPane (Java L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move between panes      |  Tab
Move between panes      |  F6
Move to splitter bar    |  F8
Resize pane vertical    |  Up, Down
Resize pane horizontal  |  Left, Right
Resize to min/max       |  Home, End

JTabbedPane (Java L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Move to tab left/right    |  left, Right
Move to tab above/below    |  Up, Down
Move from tab to page    |  Enter
Move from tab to page    |  Ctrl+Down
Move from page to tab    |  Ctrl+Up
Move from page to prev page    |  Ctrl+PgUp
Move from page to next page    |  Ctrl+PgDn

JFrame (Java L&F)
Navigate out    |  Alt+Esc
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JInternalFrame (Java L&F)
Open (Restore)    |  Ctrl+F5
Open (Restore)    |  or Alt+F5
Open (Restore)    |  Enter
Close    |  Ctrl+F4
Close    |  Alt+F5
Move    |  Ctrl+F7
Move    |  Alt+F7
Resize    |  Ctrl+F8
Resize    |  Alt+F8
Minimize     |  Ctrl+F9
Minimize     |  Alt+F9
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JWindow (Java L&F)
Activate the default button (if defined)    |  Enter


Motif

This page gives the Motif Look and Feel keystroke-actions for:

The Applet Component
Standard Components
Structured Components
Menu, Toolbar, and Tooltip Components
Text Components
Containers: Frames, Windows, Panes, and Icons

    NOTE: The following is a table in text form. The format of the table is as follows:
Component
Action1 | Key Sequence1
Action2 | Key Sequence2
...

    Previous versions of this material also contained an "Implemented"
column. In order to simplify, and keep this information current, this
column has been omitted. If you identify keyboard bindings that are not
working, please file them as bug reports so that they may be addressed
and repaired.

The Applet Component

JApplet (Motif L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Shift+Ctrl+Tab
Activate the default button (if defined)    |  Enter

Standard Components

JButton (Motif L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Activate Default    |  Enter
Activate Any        |  Spacebar
Activate Any        |  Alt+Char accelerator key, if defined
Activate Cancel or Close    |  Esc

JCheckBox (Motif L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JRadioButton (Motif L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
        NOTE: Navigating to a radio button selects it.
Check/Uncheck    |  Spacebar

JToggleButton (Motif L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JComboBox (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Post menu               |  Alt+Down
Retract menu            |  Esc
Retract menu            |  Alt+Up
Toggle menu up or down  |  Alt+Up/Down
Activate menuitem       |  Enter
Jump to menuitem without selecting it    |  Initial Char of Item
Move up or down         |  Up, Down
    NOTE A: For other navigation keys, please see JList.
    NOTE B: For more information on Edit Field, please see JtextField.

JList (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Activate selection      |  Enter
Move within list        |  Up, Down
Move to beginning of list    |  Ctrl+Home
Move to end of list     |  Ctrl+End
Select all entries      |  Ctrl+A
Make a selection        | Spacebar
    NOTE: This will deselect previous selection
Select an additional item    |  Ctrl+Spacebar
Range select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to top    |  Shift+Home
Extend selection to end    |  Shift+End
Block extend up         |  Shift+PgUp
Block extend down       |  Shift+PgDn
Block move              |  PgUp, PgDn

JSlider (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Increase value          |  Up, Right
Decrease value          |  Left, Down
Minimum value           |  Home
Maximum value           |  End
Block increase          |  PgUp
Block decrease          |  PgDn

Structured Components

JTable (Motif L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move to next cell       |  Tab
Move to next cell       |  Right Arrow
Move to previous cell   |  Shift+Tab
Move to previous cell   |  Left Arrow
Wrap to next row        |  Tab
Wrap to next row        |  Right Arrow
Wrap to previous row    |  Shift+Tab or Left
Wrap to previous row    |  Shift+Tab or Left
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp/PgDn
Block extend left       |  Ctrl+Shift+PgUp
Block extend right      |  Ctrl+Shift+PgDn
Move to first cell in row    |  Home
Move to last cell in row     |  End
Move to first cell in table  |  Ctrl+Home
Move to last cell in table   |  Ctrl+End
Select all cells             |  Ctrl+A
Deselect current selection   |  Up/Down Arrow
Deselect current selection   |  Ctrl+Up/Down Arrow
Deselect current selection   |  Pgup/Pgdn
Deselect current selection   |  Ctrl+Pgup/Pgdn
Deselect current selection   |  Home/End
Deselect current selection   |  Ctrl+Home/End
Extend selection one row     |  Shift+Up/Down
Extend selection one column  |  Shift+Left/Right
Extend selection to beginning/end of row    |  Shift+Home/End
Extend selection to beginning/end of column    |  Ctrl+Shift+Home/End
Edit cell without overriding current contents    |  F2
Reset cell content prior to editing    |  Esc

JTree (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Expand entry            |  Right
Collapse entry          |  Left
Toggle expand/collapse for entry    |  Enter
Move up/down one entry  |  Up, Down
Move to first entry     |  Home
Move to last visible entry    |  End
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp, Shift+PgDn
Select all              |  Ctrl+A
Select all              |  Ctrl+Slash
Deselect all            |  Ctrl+\
Single select           |  Ctrl+Spacebar
Range-select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to start of data    |  Shift+Home
Extend selection to end of data    |  Shift+End

Menu, Toolbar, and ToolTip Components

JMenuBar (Motif L&F)
Jump to menubar    |  Alt
Navigate out       |  Esc
Navigate out       |  Alt
Navigate between items within menu    |  Arrow keys
Select first item (if no item selected)    |  F10
Select next item   |  Right
Select previous item    |  Left
Select default or selected item    |  Enter
Post menu          |  Up, Down
Post menu          |  Enter
Post menu          |  Spacebar
Post menu          |  Alt+Char accelerator key, if defined
Un-post menu       |  Esc
Un-post menu       |  Alt

JMenu (Motif L&F)
Post menu    |  Enter
Post menu    |  F10
Post submenu    |  Right
Move to next item (wrap to top)    |  Down
Move to previous item (wrap to bottom)    |  Up
Retract menu    |  Esc
Retract submenu |  Left
Activate default or selected item    |  Enter

JMenuItem (Motif L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Activate item  |  Enter
Activate item  |  Spacebar
Activate item  |  Alt+Char accelerator key, if defined
Post submenu   |  Right
Retract submenu    |  Left
Retract submenu    |  Esc

JCheckBoxMenuItem (Motif L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JRadioButtonMenuItem (Motif L&F)
Navigate in    |  Arrow keys
Navigate out  |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JPopupMenu (Motif L&F)
Post menu    |  Shift+F10
Post submenu    |  Right
Close submenu    |  Left
Retract menu    |  Esc
Move within menu    |  Up, Down
Activate entry    |  Enter
Activate entry    |  Spacebar

JToolBar (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Navigate within         |  Arrow Keys
Activate item           |  Enter

JToolTip (Motif L&F)
Post tip    |  Ctrl+F1
Retract tip    |  Esc
Retract tip    |  Ctrl+F1

Text Components

JTextField (Motif L&F)
Navigate in    |  Alt+Char accelerator key, if defined
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Move to prev/next char  |  Left, Right
Move to prev/next word  |  Ctrl+Left, Ctrl+Right
Move to start/end of field    |  Home/End
Submit entry            |  Enter
Select all              |  Ctrl+A
Deselect all            |  arrow keys
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end    |  Shift+Home, Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection        |  Ctrl+C
Cut selection         |  Ctrl+X
Paste from clipboard  |  Ctrl+V
Delete next character |  Delete
Delete previous character    |  Backspace

JPasswordField (Motif L&F)
    NOTE A: for information on how to navigate/move within the field, and make selections,               please see JTextField.

JTextArea (Motif L&F)
Navigate in    |  Tab
Navigate in    |  Alt+Char Accelerator Key (if defined)
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move up/down one line        |  Up, Down
Move left/right one char     |  Left, Right
Move to start/end of line    |  Home, End
Move to prev/next word       |  Ctrl+Left/Right
Move to start/end of text area    |  Ctrl+Home/End
Block move up/down    |  PgUp, PgDn
Block move left       |  Ctrl+PgUp
Block move right      |  Ctrl+PgDn
Block extend up       |  Shift+PgUp
Block extend down     |  Shift+PgDn
Block extend left     |  Ctrl+Shift+PgUp
Block extend right    |  Ctrl+Shift+PgDn
Select all      |  Ctrl+A
Deselect all    |  arrow keys
Extend selection    |  Shift+Up, Shift+Down
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end of line    |  Shift+Home, Shift+End
Extend selection to start/end of text area    |  Ctrl+Shift+Home, Ctrl+Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection         |  Ctrl+C
Cut selection          |  Ctrl+X
Paste Selected Text    |  Ctrl+V
Delete next character        |  Delete
Delete previous character    |  Backspace
Insert line break    |  Enter
Insert tab           |  Tab

JTextPane (Motif L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Navigate out backwards    |  Shift+Ctrl+Tab
Move up/down a line    |  Up/Down Arrow
Move left/right a component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to start/end of line    |  Home/End
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to start/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Select All    |  Ctrl+A
Extend selection up one line    |  Shift+Up Arrow
Extend selection down one line    |  Shift+Down Arrow
Extend selection to beginning of line    |  Shift+Home
Extend selection to end of line    |  Shift+End
Extend selection to beginning of data    |  Ctrl+Shift+Home
Extend selection to end of data    |  Ctrl+Shift+End
Extend selection left    |  Shift+Right Arrow
Extend selection right    |  Shift+Right Arrow
Extend selection up one vertical block    |  Shift+PgUp
Extend selection down one vertical block    |  Shift+PgDn
Extend selection left one block    |  Ctrl+Shift+PgUp
Extend selection right one block    |  Ctrl+Shift+PgDn
Extend selection left one word    |  Ctrl+Shift+Left Arrow
Extend selection right one word    |  Ctrl+Shift+Right Arrow

JEditorPane (Motif L&F)
    NOTE A: For more information on how to navigate/move and make selections, please see JTextArea.
Move to next HTML link or other focusable element    |  Tab,
Move to prev HTML link or other focusable element    |  Shift+Tab
Move out of focusable elements that accept a tab    |  Ctrl+Tab, Ctrl+Shift+Tab
Activate an HTML link    |  Enter
Navigate in/out    |  Tab
Navigate out backwards    |  Shift+Tab
Move up/down one line    |  Up/Down Arrow
Move left/right one component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to beginning/end of line    |  Home/end
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to beginning/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Activate link    |  Enter
Select All    |  Ctrl+A
Extend selection up/down one line    |  Shift+Up/Down Arrow
Extend selection left/right one component or char    |  Shift+Left/Right Arrow
Extend selection to start/end of line    |  Shift+Home/End
Extend selection to start/end of data    |  Ctrl+Shift+Home/End
Extend selection up/down one vertical block    |  Shift+PgUp/PgDn
Extend selection to previous/next word    |  Ctrl+Shift+Left/Right Arrow
Extend selection left/right one block    |  Ctrl+Shift+PgUp/PgDn

Containers: Frames, Windows, Panes, and Icons

JDesktopPane (Motif L&F)
Navigate forward among open application windows, then desktop icons    |  Ctrl+Alt+F6
Navigate forward among open application windows, then desktop icons    |  Alt+Tab
Navigate forward among open application windows, then desktop icons    |  Alt+Esc
Navigate backward among open application windows, then desktop icons    |  Ctrl+Alt+Shift+F6
Navigate backward among open application windows, then desktop icons    |  Alt+Shift+Tab
Navigate forward among open associated windows    |  Ctrl+F6
Navigate forward among open associated windows    |  Alt+F6
Navigate backward among open associated windows    |  Ctrl+Shift+F6
Navigate backward among open associated windows    |  Alt+Shift+F6
Post  menu of window-options    |  Shift+Esc
Post  menu of window-options    |  Ctrl+Spacebar
Post  menu of window-options    |  Alt+Spacebar
Open window (when iconized)    |  Enter

JOptionPane (Motif L&F)
Navigate in/out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JDialog (Motif L&F)
Navigate out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JScrollPane (Motif L&F)
Navigate out forward    |  Tab
Navigate out backward    |  Shift+Tab
Move up/down    |  Up, Down
Move left/right    |  Left, Right
Move to start/end of data    |  Ctrl+Home, Ctrl+End
Block move up/down    |  PgUp, PgDn
Block move right    |  Ctrl+PgDn
Block move left    |  Ctrl+PgUp

JSplitPane (Motif L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move between panes      |  Tab
Move between panes      |  F6
Move to splitter bar    |  F8
Resize pane vertical    |  Up, Down
Resize pane horizontal  |  Left, Right
Resize to min/max       |  Home, End

JTabbedPane (Motif L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Move to tab left/right    |  left, Right
Move to tab above/below    |  Up, Down
Move from tab to page    |  Enter
Move from tab to page    |  Ctrl+Down
Move from page to tab    |  Ctrl+Up
Move from page to prev page    |  Ctrl+PgUp
Move from page to next page    |  Ctrl+PgDn

JFrame (Motif L&F)
Navigate out    |  Alt+Esc
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JInternalFrame (Motif L&F)
Open (Restore)    |  Ctrl+F5
Open (Restore)    |  or Alt+F5
Open (Restore)    |  Enter
Close    |  Ctrl+F4
Close    |  Alt+F5
Move    |  Ctrl+F7
Move    |  Alt+F7
Resize    |  Ctrl+F8
Resize    |  Alt+F8
Minimize     |  Ctrl+F9
Minimize     |  Alt+F9
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JWindow (Motif L&F)
Activate the default button (if defined)    |  Enter


Win32

This page gives the Microsoft Windows-style keystroke-actions for:

The Applet Component
Standard Components
Structured Components
Menu, Toolbar, and Tooltip Components
Text Components
Containers: Frames, Windows, Panes, and Icons

    NOTE: The following is a table in text form. The format of the table is as follows:
Component
Action1 | Key Sequence1
Action2 | Key Sequence2
...

    Previous versions of this material also contained an "Implemented" column. In order to
    simplify, and keep this information current, this column has been omitted. If
    you identify keyboard bindings that are not working, please file them as bug reports so that they
    may be addressed and repaired.

The Applet Component

JApplet (Win32 L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Shift+Ctrl+Tab
Activate the default button (if defined)    |  Enter

Standard Components

JButton (Win32 L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Activate Default    |  Enter
Activate Any        |  Spacebar
Activate Any        |  Alt+Char accelerator key, if defined
Activate Cancel or Close    |  Esc

JCheckBox (Win32 L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JRadioButton (Win32 L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
        NOTE: Navigating to a radio button selects it.
Check/Uncheck    |  Spacebar

JToggleButton (Win32 L&F)
Navigate forward    |  Tab
Navigate backward   |  Shift+Tab
Navigate within group    |  Arrow Keys
Check/Uncheck       |  Spacebar

JComboBox (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Post menu               |  Alt+Down
Retract menu            |  Esc
Retract menu            |  Alt+Up
Toggle menu up or down  |  Alt+Up/Down
Activate menuitem       |  Enter
Jump to menuitem without selecting it    |  Initial Char of Item
Move up or down         |  Up, Down
    NOTE A: For other navigation keys, please see JList.
    NOTE B: For more information on Edit Field, please see JtextField.

JList (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Activate selection      |  Enter
Move within list        |  Up, Down
Move to beginning of list    |  Ctrl+Home
Move to end of list     |  Ctrl+End
Select all entries      |  Ctrl+A
Make a selection        | Spacebar
    NOTE: This will deselect previous selection
Select an additional item    |  Ctrl+Spacebar
Range select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to top    |  Shift+Home
Extend selection to end    |  Shift+End
Block extend up         |  Shift+PgUp
Block extend down       |  Shift+PgDn
Block move              |  PgUp, PgDn

JSlider (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Increase value          |  Up, Right
Decrease value          |  Left, Down
Minimum value           |  Home
Maximum value           |  End
Block increase          |  PgUp
Block decrease          |  PgDn

Structured Components

JTable (Win32 L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move to next cell       |  Tab
Move to next cell       |  Right Arrow
Move to previous cell   |  Shift+Tab
Move to previous cell   |  Left Arrow
Wrap to next row        |  Tab
Wrap to next row        |  Right Arrow
Wrap to previous row    |  Shift+Tab or Left
Wrap to previous row    |  Shift+Tab or Left
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp/PgDn
Block extend left       |  Ctrl+Shift+PgUp
Block extend right      |  Ctrl+Shift+PgDn
Move to first cell in row    |  Home
Move to last cell in row     |  End
Move to first cell in table  |  Ctrl+Home
Move to last cell in table   |  Ctrl+End
Select all cells             |  Ctrl+A
Deselect current selection   |  Up/Down Arrow
Deselect current selection   |  Ctrl+Up/Down Arrow
Deselect current selection   |  Pgup/Pgdn
Deselect current selection   |  Ctrl+Pgup/Pgdn
Deselect current selection   |  Home/End
Deselect current selection   |  Ctrl+Home/End
Extend selection one row     |  Shift+Up/Down
Extend selection one column   |  Shift+Left/Right
Extend selection to beginning/end of row    |  Shift+Home/End
Extend selection to beginning/end of column    |  Ctrl+Shift+Home/End
Edit cell without overriding current contents    |  F2
Reset cell content prior to editing    |  Esc

JTree (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Expand entry            |  Right
Collapse entry          |  Left
Toggle expand/collapse for entry    |  Enter
Move up/down one entry  |  Up, Down
Move to first entry     |  Home
Move to last visible entry    |  End
Block move vertical     |  PgUp, PgDn
Block move left         |  Ctrl+PgUp
Block move right        |  Ctrl+PgDn
Block extend vertical   |  Shift+PgUp, Shift+PgDn
Select all              |  Ctrl+A
Select all              |  Ctrl+Slash
Deselect all            |  Ctrl+\
Single select           |  Ctrl+Spacebar
Range-select            |  Shift+Spacebar
Extend selection up     |  Shift+Up
Extend selection down   |  Shift+Down
Extend selection to start of data    |  Shift+Home
Extend selection to end of data    |  Shift+End

Menu, Toolbar, and ToolTip Components

JMenuBar (Win32 L&F)
Jump to menubar    |  Alt
Navigate out       |  Esc
Navigate out       |  Alt
Navigate between items within menu    |  Arrow keys
Select first item (if no item selected)    |  F10
Select next item   |  Right
Select previous item    |  Left
Select default or selected item    |  Enter
Post menu          |  Up, Down
Post menu          |  Enter
Post menu          |  Spacebar
Post menu          |  Alt+Char accelerator key, if defined
Un-post menu       |  Esc
Un-post menu       |  Alt

JMenu (Win32 L&F)
Post menu    |  Enter
Post menu    |  F10
Post submenu    |  Right
Move to next item (wrap to top)    |  Down
Move to previous item (wrap to bottom)    |  Up
Retract menu    |  Esc
Retract submenu |  Left
Activate default or selected item    |  Enter

JMenuItem (Win32 L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Activate item  |  Enter
Activate item  |  Spacebar
Activate item  |  Alt+Char accelerator key, if defined
Post submenu   |  Right
Retract submenu    |  Left
Retract submenu    |  Esc

JCheckBoxMenuItem (Win32 L&F)
Navigate in    |  Arrow keys
Navigate out   |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JRadioButtonMenuItem (Win32 L&F)
Navigate in    |  Arrow keys
Navigate out  |  Arrow keys
Check/Uncheck item and retract menu    |  Enter

JPopupMenu (Win32 L&F)
Post menu    |  Shift+F10
Post submenu    |  Right
Close submenu    |  Left
Retract menu    |  Esc
Move within menu    |  Up, Down
Activate entry    |  Enter
Activate entry    |  Spacebar

JToolBar (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Navigate within         |  Arrow Keys
Activate item           |  Enter

JToolTip (Win32 L&F)
Post tip    |  Ctrl+F1
Retract tip    |  Esc
Retract tip    |  Ctrl+F1

Text Components

JTextField (Win32 L&F)
Navigate in    |  Alt+Char accelerator key, if defined
Navigate out forward    |  Tab
Navigate out backward   |  Shift+Tab
Move to prev/next char  |  Left, Right
Move to prev/next word  |  Ctrl+Left, Ctrl+Right
Move to start/end of field    |  Home/End
Submit entry            |  Enter
Select all              |  Ctrl+A
Deselect all            |  arrow keys
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end    |  Shift+Home, Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection        |  Ctrl+C
Cut selection         |  Ctrl+X
Paste from clipboard  |  Ctrl+V
Delete next character |  Delete
Delete previous character    |  Backspace

JPasswordField (Win32 L&F)
    NOTE A: for information on how to navigate/move within the field, and make selections,
    please see JTextField.

JTextArea (Win32 L&F)
Navigate in    |  Tab
Navigate in    |  Alt+Char Accelerator Key (if defined)
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move up/down one line        |  Up, Down
Move left/right one char     |  Left, Right
Move to start/end of line    |  Home, End
Move to prev/next word       |  Ctrl+Left/Right
Move to start/end of text area    |  Ctrl+Home/End
Block move up/down    |  PgUp, PgDn
Block move left       |  Ctrl+PgUp
Block move right      |  Ctrl+PgDn
Block extend up       |  Shift+PgUp
Block extend down     |  Shift+PgDn
Block extend left     |  Ctrl+Shift+PgUp
Block extend right    |  Ctrl+Shift+PgDn
Select all      |  Ctrl+A
Deselect all    |  arrow keys
Extend selection    |  Shift+Up, Shift+Down
Extend selection left/right    |  Shift+Left, Shift+Right
Extend selection to start/end of line    |  Shift+Home, Shift+End
Extend selection to start/end of text area    |  Ctrl+Shift+Home, Ctrl+Shift+End
Extend selection to prev/next word    |  Ctrl+Shift+Left, Ctrl+Shift+Right
Copy selection         |  Ctrl+C
Cut selection          |  Ctrl+X
Paste Selected Text    |  Ctrl+V
Delete next character        |  Delete
Delete previous character    |  Backspace
Insert line break    |  Enter
Insert tab           |  Tab

JTextPane (Win32 L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Navigate out backwards    |  Shift+Ctrl+Tab
Move up/down a line    |  Up/Down Arrow
Move left/right a component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to start/end of line    |  Home/End
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to start/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Select All    |  Ctrl+A
Extend selection up one line    |  Shift+Up Arrow
Extend selection down one line    |  Shift+Down Arrow
Extend selection to beginning of line    |  Shift+Home
Extend selection to end of line    |  Shift+End
Extend selection to beginning of data    |  Ctrl+Shift+Home
Extend selection to end of data    |  Ctrl+Shift+End
Extend selection left    |  Shift+Right Arrow
Extend selection right    |  Shift+Right Arrow
Extend selection up one vertical block    |  Shift+PgUp
Extend selection down one vertical block    |  Shift+PgDn
Extend selection left one block    |  Ctrl+Shift+PgUp
Extend selection right one block    |  Ctrl+Shift+PgDn
Extend selection left one word    |  Ctrl+Shift+Left Arrow
Extend selection right one word    |  Ctrl+Shift+Right Arrow

JEditorPane (Win32 L&F)
    NOTE A: For more information on how to navigate/move and make selections, please see
    JTextArea.
Move to next/prev HTML link or other focusable element    |  Ctrl+T
    Note B: The 'T' in the above and following two lines means the letter T.
    It does NOT stand for Tab.
Move to next/prev HTML link or other focusable element    |  Ctrl+Shift+T
Move out of focusable elements that accept a tab    |  Ctrl+T, Ctrl+Shift+T
Activate an HTML link    |  Ctrl+Spacebar
Navigate in/out    |  Tab
Navigate out backwards    |  Shift+Tab
Move up/down one line    |  Up/Down Arrow
Move left/right one component or char    |  Left/Right Arrow
Move up/down one vertical block    |  PgUp/PgDn
Move to beginning/end of line    |  Home/end
Move to previous/next word    |  Ctrl+Left/Right Arrow
Move to beginning/end of data    |  Ctrl+Home/End
Move left/right one block    |  Ctrl+PgUp/PgDn
Select All    |  Ctrl+A
Extend selection up/down one line    |  Shift+Up/Down Arrow
Extend selection left/right one component or char    |  Shift+Left/Right Arrow
Extend selection to start/end of line    |  Shift+Home/End
Extend selection to start/end of data    |  Ctrl+Shift+Home/End
Extend selection up/down one vertical block    |  Shift+PgUp/PgDn
Extend selection to previous/next word    |  Ctrl+Shift+Left/Right Arrow
Extend selection left/right one block    |  Ctrl+Shift+PgUp/PgDn

Containers: Frames, Windows, Panes, and Icons

JDesktopPane (Win32 L&F)
Navigate forward among open application windows, then desktop icons    |  Ctrl+Alt+F6
Navigate forward among open application windows, then desktop icons    |  Alt+Tab
Navigate forward among open application windows, then desktop icons    |  Alt+Esc
Navigate backward among open application windows, then desktop icons    |  Ctrl+Alt+Shift+F6
Navigate backward among open application windows, then desktop icons    |  Alt+Shift+Tab
Navigate forward among open associated windows    |  Ctrl+F6
Navigate forward among open associated windows    |  Alt+F6
Navigate backward among open associated windows    |  Ctrl+Shift+F6
Navigate backward among open associated windows    |  Alt+Shift+F6
Post  menu of window-options    |  Shift+Esc
Post  menu of window-options    |  Ctrl+Spacebar
Post  menu of window-options    |  Alt+Spacebar
Open window (when iconized)    |  Enter

JOptionPane (Win32 L&F)
Navigate in/out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JDialog (Win32 L&F)
Navigate out    |  Alt+F6
Retract dialog    |  Esc
Activate the default button (if defined)    |  Enter

JScrollPane (Win32 L&F)
Navigate out forward    |  Tab
Navigate out backward    |  Shift+Tab
Move up/down    |  Up, Down
Move left/right    |  Left, Right
Move to start/end of data    |  Ctrl+Home, Ctrl+End
Block move up/down    |  PgUp, PgDn
Block move right    |  Ctrl+PgDn
Block move left    |  Ctrl+PgUp

JSplitPane (Win32 L&F)
Navigate out forward    |  Tab
Navigate out forward    |  Ctrl+Tab
Navigate out backward   |  Shift+Tab
Navigate out backward   |  Ctrl+Shift+Tab
Move between panes      |  Tab
Move between panes      |  F6
Move to splitter bar    |  F8
Resize pane vertical    |  Up, Down
Resize pane horizontal  |  Left, Right
Resize to min/max       |  Home, End

JTabbedPane (Win32 L&F)
Navigate in    |  Tab
Navigate out   |  Ctrl+Tab
Move to tab left/right    |  left, Right
Move to tab above/below    |  Up, Down
Move from tab to page    |  Enter
Move from tab to page    |  Ctrl+Down
Move from page to tab    |  Ctrl+Up
Move from page to prev page    |  Ctrl+PgUp
Move from page to next page    |  Ctrl+PgDn

JFrame (Win32 L&F)
Navigate out    |  Alt+Esc
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JInternalFrame (Win32 L&F)
Open (Restore)    |  Ctrl+F5
Open (Restore)    |  or Alt+F5
Open (Restore)    |  Enter
Close    |  Ctrl+F4
Close    |  Alt+F5
Move    |  Ctrl+F7
Move    |  Alt+F7
Resize    |  Ctrl+F8
Resize    |  Alt+F8
Minimize     |  Ctrl+F9
Minimize     |  Alt+F9
Display window menu    |  Alt+Spacebar
Activate the default button (if defined)    |  Enter

JWindow (Win32 L&F)
Activate the default button (if defined)    |  Enter


DynamicUtilTreeNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.DynamicUtilTreeNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--javax.swing.JTree.DynamicUtilTreeNode
All Implemented Interfaces:
Cloneable, MutableTreeNode, Serializable, TreeNode
Enclosing class:
JTree
public static class JTree.DynamicUtilTreeNode
extends DefaultMutableTreeNode

DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary. It is dynamic in that it will only create the children as necessary.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected Object | childValue Value to create children with.
protected boolean | hasChildren Does the this JTree have children? This property is currently not implemented.
protected boolean | loadedChildren Have the children been loaded yet?
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Constructor Summary
JTree.DynamicUtilTreeNode(Object value, Object children)
Creates a node with the specified object as its value and with the specified children.
Method Summary
Enumeration | children() Subclassed to load the children, if necessary.
static void | createChildren(DefaultMutableTreeNode parent, Object children) Adds to parent all the children in children.
TreeNode | getChildAt(int index) Subclassed to load the children, if necessary.
int | getChildCount() Returns the number of child nodes.
boolean | isLeaf() Returns true if this node allows children.
protected void | loadChildren() Loads the children based on childValue.
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

hasChildren

protected boolean hasChildren
Does the this JTree have children? This property is currently not implemented.

childValue

protected Object childValue
Value to create children with.

loadedChildren

protected boolean loadedChildren
Have the children been loaded yet?
Constructor Detail

JTree.DynamicUtilTreeNode

public JTree.DynamicUtilTreeNode(Object value,
                                 Object children)
Creates a node with the specified object as its value and with the specified children. For the node to allow children, the children-object must be an array of objects, a Vector, or a Hashtable -- even if empty. Otherwise, the node is not allowed to have children.
Parameters:
value - the Object that is the value for the new node
children - an array of Objects, a Vector, or a Hashtable used to create the child nodes; if any other object is specified, or if the value is null, then the node is not allowed to have children
Method Detail

createChildren

public static void createChildren(DefaultMutableTreeNode parent,
                                  Object children)
Adds to parent all the children in children. If children is an array or vector all of its elements are added is children, otherwise if children is a hashtable all the key/value pairs are added in the order Enumeration returns them.

isLeaf

public boolean isLeaf()
Returns true if this node allows children. Whether the node allows children depends on how it was created.
Overrides:
isLeaf in class DefaultMutableTreeNode
Returns:
true if this node allows children, false otherwise
See Also:
JTree.DynamicUtilTreeNode(java.lang.Object, java.lang.Object)

getChildCount

public int getChildCount()
Returns the number of child nodes.
Overrides:
getChildCount in class DefaultMutableTreeNode
Returns:
the number of child nodes

loadChildren

protected void loadChildren()
Loads the children based on childValue. If childValue is a Vector or array each element is added as a child, if childValue is a Hashtable each key/value pair is added in the order that Enumeration returns the keys.

getChildAt

public TreeNode getChildAt(int index)
Subclassed to load the children, if necessary.
Overrides:
getChildAt in class DefaultMutableTreeNode
Following copied from class: javax.swing.tree.DefaultMutableTreeNode
Parameters:
index - an index into this node's child array
Returns:
the TreeNode in this node's child array at the specified index
Throws:
ArrayIndexOutOfBoundsException - if index is out of bounds

children

public Enumeration children()
Subclassed to load the children, if necessary.
Overrides:
children in class DefaultMutableTreeNode
Following copied from class: javax.swing.tree.DefaultMutableTreeNode
Returns:
an Enumeration of this node's children
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EditorDelegate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultCellEditor.EditorDelegate

java.lang.Object
  |
  +--javax.swing.DefaultCellEditor.EditorDelegate
All Implemented Interfaces:
ActionListener, EventListener, ItemListener, Serializable
Enclosing class:
DefaultCellEditor
protected class DefaultCellEditor.EditorDelegate
extends Object
implements ActionListener, ItemListener, Serializable

See Also:
Serialized Form

Field Summary
protected  Object value
Constructor Summary
protected DefaultCellEditor.EditorDelegate()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
void | cancelCellEditing()
Object | getCellEditorValue()
boolean | isCellEditable(EventObject anEvent)
void | itemStateChanged(ItemEvent e) Invoked when an item has been selected or deselected.
void | setValue(Object value)
boolean | shouldSelectCell(EventObject anEvent)
boolean | startCellEditing(EventObject anEvent)
boolean | stopCellEditing()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

protected Object value
Constructor Detail

DefaultCellEditor.EditorDelegate

protected DefaultCellEditor.EditorDelegate()
Method Detail

getCellEditorValue

public Object getCellEditorValue()

setValue

public void setValue(Object value)

isCellEditable

public boolean isCellEditable(EventObject anEvent)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)

startCellEditing

public boolean startCellEditing(EventObject anEvent)

stopCellEditing

public boolean stopCellEditing()

cancelCellEditing

public void cancelCellEditing()

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener

itemStateChanged

public void itemStateChanged(ItemEvent e)
Description copied from interface: ItemListener
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Specified by:
itemStateChanged in interface ItemListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EmptySelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.EmptySelectionModel

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeSelectionModel
        |
        +--javax.swing.JTree.EmptySelectionModel
All Implemented Interfaces:
Cloneable, Serializable, TreeSelectionModel
Enclosing class:
JTree
protected static class JTree.EmptySelectionModel
extends DefaultTreeSelectionModel

EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected static JTree.EmptySelectionModel sharedInstance
Unique shared instance.
Fields inherited from class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionMode
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
Constructor Summary
protected JTree.EmptySelectionModel()
Method Summary
void | addSelectionPaths(TreePath[] paths) A null implementation that adds nothing.
void | removeSelectionPaths(TreePath[] paths) A null implementation that removes nothing.
void | setSelectionPaths(TreePath[] pPaths) A null implementation that selects nothing.
static JTree.EmptySelectionModel | sharedInstance() Returns a shared instance of an empty selection model.
Methods inherited from class javax.swing.tree.DefaultTreeSelectionModel
addPropertyChangeListener, addSelectionPath, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removePropertyChangeListener, removeSelectionPath, removeTreeSelectionListener, resetRowSelection, setRowMapper, setSelectionMode, setSelectionPath, toString, updateLeadIndex
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

sharedInstance

protected static final JTree.EmptySelectionModel sharedInstance
Unique shared instance.
Constructor Detail

JTree.EmptySelectionModel

protected JTree.EmptySelectionModel()
Method Detail

sharedInstance

public static JTree.EmptySelectionModel sharedInstance()
Returns a shared instance of an empty selection model.

setSelectionPaths

public void setSelectionPaths(TreePath[] pPaths)
A null implementation that selects nothing.
Overrides:
setSelectionPaths in class DefaultTreeSelectionModel
Following copied from class: javax.swing.tree.DefaultTreeSelectionModel
Parameters:
paths - new selection

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
A null implementation that adds nothing.
Overrides:
addSelectionPaths in class DefaultTreeSelectionModel
Following copied from class: javax.swing.tree.DefaultTreeSelectionModel
Parameters:
path - the new path to add to the current selection

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
A null implementation that removes nothing.
Overrides:
removeSelectionPaths in class DefaultTreeSelectionModel
Following copied from class: javax.swing.tree.DefaultTreeSelectionModel
Parameters:
path - the path to remove from the selection
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.event Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.event

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.event.DocumentEvent.EventType
    • class javax.swing.event.EventListenerList (implements java.io.Serializable)
    • class java.util.EventObject (implements java.io.Serializable)
      • class java.awt.AWTEvent
        • class javax.swing.event.AncestorEvent
        • class java.awt.event.ComponentEvent
          • class java.awt.event.InputEvent
            • class java.awt.event.KeyEvent
              • class javax.swing.event.MenuKeyEvent
            • class java.awt.event.MouseEvent
              • class javax.swing.event.MenuDragMouseEvent
        • class javax.swing.event.InternalFrameEvent
      • class javax.swing.event.CaretEvent
      • class javax.swing.event.ChangeEvent
      • class javax.swing.event.HyperlinkEvent
      • class javax.swing.event.ListDataEvent
      • class javax.swing.event.ListSelectionEvent
      • class javax.swing.event.MenuEvent
      • class javax.swing.event.PopupMenuEvent
      • class javax.swing.event.TableColumnModelEvent
      • class javax.swing.event.TableModelEvent
      • class javax.swing.event.TreeExpansionEvent
      • class javax.swing.event.TreeModelEvent
      • class javax.swing.event.TreeSelectionEvent
      • class javax.swing.event.UndoableEditEvent
    • class javax.swing.event.HyperlinkEvent.EventType
    • class javax.swing.event.InternalFrameAdapter (implements javax.swing.event.InternalFrameListener)
    • class javax.swing.event.MouseInputAdapter (implements javax.swing.event.MouseInputListener)
    • class java.beans.PropertyChangeSupport (implements java.io.Serializable)
      • class javax.swing.event.SwingPropertyChangeSupport

Interface Hierarchy

  • interface javax.swing.event.DocumentEvent
  • interface javax.swing.event.DocumentEvent.ElementChange
  • interface java.util.EventListener
    • interface javax.swing.event.AncestorListener
    • interface javax.swing.event.CaretListener
    • interface javax.swing.event.CellEditorListener
    • interface javax.swing.event.ChangeListener
    • interface javax.swing.event.DocumentListener
    • interface javax.swing.event.HyperlinkListener
    • interface javax.swing.event.InternalFrameListener
    • interface javax.swing.event.ListDataListener
    • interface javax.swing.event.ListSelectionListener
    • interface javax.swing.event.MenuDragMouseListener
    • interface javax.swing.event.MenuKeyListener
    • interface javax.swing.event.MenuListener
    • interface java.awt.event.MouseListener
      • interface javax.swing.event.MouseInputListener (also extends java.awt.event.MouseMotionListener)
    • interface java.awt.event.MouseMotionListener
      • interface javax.swing.event.MouseInputListener (also extends java.awt.event.MouseListener)
    • interface javax.swing.event.PopupMenuListener
    • interface javax.swing.event.TableColumnModelListener
    • interface javax.swing.event.TableModelListener
    • interface javax.swing.event.TreeExpansionListener
    • interface javax.swing.event.TreeModelListener
    • interface javax.swing.event.TreeSelectionListener
    • interface javax.swing.event.TreeWillExpandListener
    • interface javax.swing.event.UndoableEditListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


MouseInputListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface MouseInputListener

All Superinterfaces:
EventListener, MouseListener, MouseMotionListener
All Known Implementing Classes:
MouseInputAdapter, BasicTableUI.MouseInputHandler, BasicToolBarUI.DockingListener, BasicInternalFrameUI.GlassPaneDispatcher, BasicListUI.MouseInputHandler, BasicTableHeaderUI.MouseInputHandler, BasicTreeUI.MouseInputHandler, BasicMenuItemUI.MouseInputHandler
public interface MouseInputListener
extends MouseListener, MouseMotionListener

A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.

Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package javax.swing.event

Provides for events fired by Swing components.

See:
Description

Interface Summary
AncestorListener | AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors.
CaretListener | Listener for changes in the caret position of a text component.
CellEditorListener | CellEditorListener defines the interface for an object that listens to changes in a CellEditor
ChangeListener | Defines an object which listens for ChangeEvents.
DocumentEvent | Interface for document change notifications.
DocumentEvent.ElementChange | Describes changes made to a specific element.
DocumentListener | Interface for an observer to register to receive notifications of changes to a text document.
HyperlinkListener | HyperlinkListener
InternalFrameListener | The listener interface for receiving internal frame events.
ListDataListener | ListDataListener
ListSelectionListener | The listener that's notified when a lists selection value changes.
MenuDragMouseListener | Defines a menu mouse-drag listener.
MenuKeyListener | MenuKeyListener
MenuListener | Defines a listener for menu events.
MouseInputListener | A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.
PopupMenuListener | A popup menu listener
TableColumnModelListener | TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.
TableModelListener | TableModelListener defines the interface for an object that listens to changes in a TableModel.
TreeExpansionListener | The listener that's notified when a tree expands or collapses a node.
TreeModelListener | Defines the interface for an object that listens to changes in a TreeModel.
TreeSelectionListener | The listener that's notified when the selection in a TreeSelectionModel changes.
TreeWillExpandListener | The listener that's notified when a tree expands or collapses a node.
UndoableEditListener | Interface implemented by a class interested in hearing about undoable operations.

Class Summary
AncestorEvent | An event reported to a child component that originated from an ancestor in the component hierarchy.
CaretEvent | CaretEvent is used to notify interested parties that the text caret has changed in the event source.
ChangeEvent | ChangeEvent is used to notify interested parties that state has changed in the event source.
DocumentEvent.EventType | Enumeration for document event types
EventListenerList | A class that holds a list of EventListeners.
HyperlinkEvent | HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
HyperlinkEvent.EventType | Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
InternalFrameAdapter | An abstract adapter class for receiving internal frame events.
InternalFrameEvent | InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
ListDataEvent | Defines an event that encapsulates changes to a list.
ListSelectionEvent | An event that characterizes a change in the current selection.
MenuDragMouseEvent | MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
MenuEvent | MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
MenuKeyEvent | MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
MouseInputAdapter | The adapter which receives mouse events and mouse motion events.
PopupMenuEvent | PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
SwingPropertyChangeSupport | This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
TableColumnModelEvent | TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
TableModelEvent | TableModelEvent is used to notify listeners that a table model has changed.
TreeExpansionEvent | An event used to identify a single path in a tree.
TreeModelEvent | Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeSelectionEvent | An event that characterizes a change in the current selection.
UndoableEditEvent | An event indicating that an operation which can be undone has occurred.

Package javax.swing.event Description

Provides for events fired by Swing components. It contains event classes and corresponding event listener interfaces for events fired by Swing components in addition to those events in the java.awt.event package.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Writing Event Listeners

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.event

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.event

Packages that use javax.swing.event
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Classes in javax.swing.event used by javax.swing
AncestorListener
AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors.
CaretListener
Listener for changes in the caret position of a text component.
CellEditorListener
CellEditorListener defines the interface for an object that listens to changes in a CellEditor
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
ChangeListener
Defines an object which listens for ChangeEvents.
DocumentListener
Interface for an observer to register to receive notifications of changes to a text document.
EventListenerList
A class that holds a list of EventListeners.
HyperlinkEvent
HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
HyperlinkListener
HyperlinkListener
InternalFrameListener
The listener interface for receiving internal frame events.
ListDataEvent
Defines an event that encapsulates changes to a list.
ListDataListener
ListDataListener
ListSelectionEvent
An event that characterizes a change in the current selection.
ListSelectionListener
The listener that's notified when a lists selection value changes.
MenuDragMouseEvent
MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
MenuDragMouseListener
Defines a menu mouse-drag listener.
MenuKeyEvent
MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
MenuKeyListener
MenuKeyListener
MenuListener
Defines a listener for menu events.
PopupMenuListener
A popup menu listener
SwingPropertyChangeSupport
This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
TableColumnModelEvent
TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
TableColumnModelListener
TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.
TableModelEvent
TableModelEvent is used to notify listeners that a table model has changed.
TableModelListener
TableModelListener defines the interface for an object that listens to changes in a TableModel.
TreeExpansionEvent
An event used to identify a single path in a tree.
TreeExpansionListener
The listener that's notified when a tree expands or collapses a node.
TreeModelEvent
Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeModelListener
Defines the interface for an object that listens to changes in a TreeModel.
TreeSelectionEvent
An event that characterizes a change in the current selection.
TreeSelectionListener
The listener that's notified when the selection in a TreeSelectionModel changes.
TreeWillExpandListener
The listener that's notified when a tree expands or collapses a node.

Classes in javax.swing.event used by javax.swing.colorchooser
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
ChangeListener
Defines an object which listens for ChangeEvents.
EventListenerList
A class that holds a list of EventListeners.

Classes in javax.swing.event used by javax.swing.event
AncestorEvent
An event reported to a child component that originated from an ancestor in the component hierarchy.
CaretEvent
CaretEvent is used to notify interested parties that the text caret has changed in the event source.
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
DocumentEvent
Interface for document change notifications.
DocumentEvent.ElementChange
Describes changes made to a specific element.
DocumentEvent.EventType
Enumeration for document event types
HyperlinkEvent
HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
HyperlinkEvent.EventType
Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
InternalFrameEvent
InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
InternalFrameListener
The listener interface for receiving internal frame events.
ListDataEvent
Defines an event that encapsulates changes to a list.
ListSelectionEvent
An event that characterizes a change in the current selection.
MenuDragMouseEvent
MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.
MenuEvent
MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.
MenuKeyEvent
MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.
MouseInputListener
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.
PopupMenuEvent
PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event
TableColumnModelEvent
TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
TableModelEvent
TableModelEvent is used to notify listeners that a table model has changed.
TreeExpansionEvent
An event used to identify a single path in a tree.
TreeModelEvent
Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeSelectionEvent
An event that characterizes a change in the current selection.
UndoableEditEvent
An event indicating that an operation which can be undone has occurred.

Classes in javax.swing.event used by javax.swing.plaf.basic
CellEditorListener
CellEditorListener defines the interface for an object that listens to changes in a CellEditor
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
ChangeListener
Defines an object which listens for ChangeEvents.
InternalFrameEvent
InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source.
InternalFrameListener
The listener interface for receiving internal frame events.
ListDataEvent
Defines an event that encapsulates changes to a list.
ListDataListener
ListDataListener
ListSelectionEvent
An event that characterizes a change in the current selection.
ListSelectionListener
The listener that's notified when a lists selection value changes.
MenuDragMouseListener
Defines a menu mouse-drag listener.
MenuKeyListener
MenuKeyListener
MenuListener
Defines a listener for menu events.
MouseInputAdapter
The adapter which receives mouse events and mouse motion events.
MouseInputListener
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.
TreeExpansionEvent
An event used to identify a single path in a tree.
TreeExpansionListener
The listener that's notified when a tree expands or collapses a node.
TreeModelEvent
Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeModelListener
Defines the interface for an object that listens to changes in a TreeModel.
TreeSelectionEvent
An event that characterizes a change in the current selection.
TreeSelectionListener
The listener that's notified when the selection in a TreeSelectionModel changes.

Classes in javax.swing.event used by javax.swing.plaf.metal
ListSelectionEvent
An event that characterizes a change in the current selection.
MouseInputListener
A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces.

Classes in javax.swing.event used by javax.swing.table
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
EventListenerList
A class that holds a list of EventListeners.
ListSelectionEvent
An event that characterizes a change in the current selection.
ListSelectionListener
The listener that's notified when a lists selection value changes.
TableColumnModelEvent
TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.
TableColumnModelListener
TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.
TableModelEvent
TableModelEvent is used to notify listeners that a table model has changed.
TableModelListener
TableModelListener defines the interface for an object that listens to changes in a TableModel.

Classes in javax.swing.event used by javax.swing.text
CaretEvent
CaretEvent is used to notify interested parties that the text caret has changed in the event source.
CaretListener
Listener for changes in the caret position of a text component.
ChangeEvent
ChangeEvent is used to notify interested parties that state has changed in the event source.
ChangeListener
Defines an object which listens for ChangeEvents.
DocumentEvent
Interface for document change notifications.
DocumentEvent.ElementChange
Describes changes made to a specific element.
DocumentEvent.EventType
Enumeration for document event types
DocumentListener
Interface for an observer to register to receive notifications of changes to a text document.
EventListenerList
A class that holds a list of EventListeners.
UndoableEditEvent
An event indicating that an operation which can be undone has occurred.
UndoableEditListener
Interface implemented by a class interested in hearing about undoable operations.

Classes in javax.swing.event used by javax.swing.text.html
DocumentEvent
Interface for document change notifications.
HyperlinkEvent
HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.
HyperlinkEvent.EventType
Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
UndoableEditEvent
An event indicating that an operation which can be undone has occurred.

Classes in javax.swing.event used by javax.swing.tree
CellEditorListener
CellEditorListener defines the interface for an object that listens to changes in a CellEditor
EventListenerList
A class that holds a list of EventListeners.
SwingPropertyChangeSupport
This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns).
TreeExpansionEvent
An event used to identify a single path in a tree.
TreeModelEvent
Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change.
TreeModelListener
Defines the interface for an object that listens to changes in a TreeModel.
TreeSelectionEvent
An event that characterizes a change in the current selection.
TreeSelectionListener
The listener that's notified when the selection in a TreeSelectionModel changes.

Classes in javax.swing.event used by javax.swing.undo
UndoableEditEvent
An event indicating that an operation which can be undone has occurred.
UndoableEditListener
Interface implemented by a class interested in hearing about undoable operations.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AncestorEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class AncestorEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--javax.swing.event.AncestorEvent
All Implemented Interfaces:
Serializable
public class AncestorEvent
extends AWTEvent

An event reported to a child component that originated from an ancestor in the component hierarchy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
static int | ANCESTOR_ADDED An ancestor-component was added to the hierarchy of visible objects (made visible), and is currently being displayed.
static int | ANCESTOR_MOVED An ancestor-component changed its position on the screen.
static int | ANCESTOR_REMOVED An ancestor-component was removed from the hierarchy of visible objects (hidden) and is no longer being displayed.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
AncestorEvent(JComponent source, int id, Container ancestor, Container ancestorParent)
Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status.
Method Summary
Container | getAncestor() Returns the ancestor that the event actually occured on.
Container | getAncestorParent() Returns the parent of the ancestor the event actually occured on.
JComponent | getComponent() Returns the component that the listener was added to.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, paramString, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ANCESTOR_ADDED

public static final int ANCESTOR_ADDED
An ancestor-component was added to the hierarchy of visible objects (made visible), and is currently being displayed.

ANCESTOR_REMOVED

public static final int ANCESTOR_REMOVED
An ancestor-component was removed from the hierarchy of visible objects (hidden) and is no longer being displayed.

ANCESTOR_MOVED

public static final int ANCESTOR_MOVED
An ancestor-component changed its position on the screen.
Constructor Detail

AncestorEvent

public AncestorEvent(JComponent source,
                     int id,
                     Container ancestor,
                     Container ancestorParent)
Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status.
Parameters:
source - the JComponent that originated the event (typically this)
id - an int specifying ANCESTOR_ADDED, ANCESTOR_REMOVED or ANCESTOR_MOVED
ancestor - a Container object specifying the ancestor-component whose display-status changed
ancestorParent - a Container object specifying the ancestor's parent
Method Detail

getAncestor

public Container getAncestor()
Returns the ancestor that the event actually occured on.

getAncestorParent

public Container getAncestorParent()
Returns the parent of the ancestor the event actually occured on. This is most interesting in an ANCESTOR_REMOVED event, as the ancestor may no longer be in the component hierarchy.

getComponent

public JComponent getComponent()
Returns the component that the listener was added to.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AncestorListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface AncestorListener

All Superinterfaces:
EventListener
public interface AncestorListener
extends EventListener

AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors. These include movement and when the component becomes visible or invisible, either by the setVisible() method or by being added or removed from the component hierarchy.

Method Summary
void | ancestorAdded(AncestorEvent event) Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.
void | ancestorMoved(AncestorEvent event) Called when either the source or one of its ancestors is moved.
void | ancestorRemoved(AncestorEvent event) Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy.

Method Detail

ancestorAdded

public void ancestorAdded(AncestorEvent event)
Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy. The method is only called if the source has actually become visible. For this to be true all its parents must be visible and it must be in a hierarchy rooted at a Window

ancestorRemoved

public void ancestorRemoved(AncestorEvent event)
Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy. The method is only called if the source has actually become invisible. For this to be true at least one of its parents must by invisible or it is not in a hierarchy rooted at a Window

ancestorMoved

public void ancestorMoved(AncestorEvent event)
Called when either the source or one of its ancestors is moved.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CaretEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class CaretEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.CaretEvent
All Implemented Interfaces:
Serializable
public abstract class CaretEvent
extends EventObject

CaretEvent is used to notify interested parties that the text caret has changed in the event source.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
CaretEvent(Object source)
Creates a new CaretEvent object.
Method Summary
abstract int | getDot() Fetches the location of the caret.
abstract int | getMark() Fetches the location of other end of a logical selection.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CaretEvent

public CaretEvent(Object source)
Creates a new CaretEvent object.
Parameters:
source - the object responsible for the event
Method Detail

getDot

public abstract int getDot()
Fetches the location of the caret.
Returns:
the dot >= 0

getMark

public abstract int getMark()
Fetches the location of other end of a logical selection. If there is no selection, this will be the same as dot.
Returns:
the mark >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CaretListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface CaretListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTextComponent.AccessibleJTextComponent
public interface CaretListener
extends EventListener

Listener for changes in the caret position of a text component.

Method Summary
 void caretUpdate(CaretEvent e)
Called when the caret position is updated.

Method Detail

caretUpdate

public void caretUpdate(CaretEvent e)
Called when the caret position is updated.
Parameters:
e - the caret event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CellEditorListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface CellEditorListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTable, JTable.AccessibleJTable, BasicTreeUI.CellEditorHandler
public interface CellEditorListener
extends EventListener

CellEditorListener defines the interface for an object that listens to changes in a CellEditor

Method Summary
void | editingCanceled(ChangeEvent e) This tells the listeners the editor has canceled editing
void | editingStopped(ChangeEvent e) This tells the listeners the editor has ended editing

Method Detail

editingStopped

public void editingStopped(ChangeEvent e)
This tells the listeners the editor has ended editing

editingCanceled

public void editingCanceled(ChangeEvent e)
This tells the listeners the editor has canceled editing
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class ChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.ChangeEvent
All Implemented Interfaces:
Serializable
public class ChangeEvent
extends EventObject

ChangeEvent is used to notify interested parties that state has changed in the event source.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
ChangeEvent(Object source)
Constructs a ChangeEvent object.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ChangeEvent

public ChangeEvent(Object source)
Constructs a ChangeEvent object.
Parameters:
source - the Object that is the source of the event (typically this)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface ChangeListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbstractButton.ButtonChangeListener, JMenuItem.AccessibleJMenuItem, JScrollPane.AccessibleJScrollPane, JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener, BasicMenuUI.ChangeHandler, BasicProgressBarUI.ChangeHandler, BasicTabbedPaneUI.TabSelectionHandler, BasicScrollBarUI.ModelListener, BasicButtonListener, BasicScrollPaneUI.ViewportChangeHandler, BasicScrollPaneUI.HSBChangeListener, BasicScrollPaneUI.VSBChangeListener, BasicSliderUI.ChangeHandler
public interface ChangeListener
extends EventListener

Defines an object which listens for ChangeEvents.

Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.

Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.event.InternalFrameAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.InternalFrameAdapter

No usage of javax.swing.event.InternalFrameAdapter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.AncestorEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.AncestorEvent

Packages that use AncestorEvent
javax.swing.event Provides for events fired by Swing components.

Uses of AncestorEvent in javax.swing.event

Methods in javax.swing.event with parameters of type AncestorEvent
void | AncestorListener.ancestorAdded(AncestorEvent event) Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.
void | AncestorListener.ancestorRemoved(AncestorEvent event) Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy.
void | AncestorListener.ancestorMoved(AncestorEvent event) Called when either the source or one of its ancestors is moved.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.CaretEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.CaretEvent

Packages that use CaretEvent
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of CaretEvent in javax.swing.event

Methods in javax.swing.event with parameters of type CaretEvent
 void CaretListener.caretUpdate(CaretEvent e)
Called when the caret position is updated.

Uses of CaretEvent in javax.swing.text

Methods in javax.swing.text with parameters of type CaretEvent
protected void | JTextComponent.fireCaretUpdate(CaretEvent e) Notifies all listeners that have registered interest for notification on this event type.
void | JTextComponent.AccessibleJTextComponent.caretUpdate(CaretEvent e) Handles caret updates (fire appropriate property change event, which are AccessibleContext.ACCESSIBLE_CARET_PROPERTY and AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.ChangeEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.ChangeEvent

Packages that use ChangeEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ChangeEvent in javax.swing

Fields in javax.swing declared as ChangeEvent
protected ChangeEvent | DefaultSingleSelectionModel.changeEvent
protected ChangeEvent | JTabbedPane.changeEvent Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property.
protected ChangeEvent | AbstractButton.changeEvent Only one ChangeEvent is needed per button instance since the event's only state is the source property.
protected ChangeEvent | DefaultBoundedRangeModel.changeEvent Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected ChangeEvent | MenuSelectionManager.changeEvent Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
protected ChangeEvent | AbstractCellEditor.changeEvent
protected ChangeEvent | DefaultButtonModel.changeEvent Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
protected ChangeEvent | JProgressBar.changeEvent Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.
protected ChangeEvent | JSlider.changeEvent Only one ChangeEvent is needed per slider instance since the event's only (read-only) state is the source property.

Methods in javax.swing with parameters of type ChangeEvent
void | JTabbedPane.ModelListener.stateChanged(ChangeEvent e)
void | JTabbedPane.AccessibleJTabbedPane.stateChanged(ChangeEvent e)
void | JMenuItem.AccessibleJMenuItem.stateChanged(ChangeEvent e) Supports the change listener interface and fires property change
void | JTable.columnMarginChanged(ChangeEvent e) Invoked when a column is moved due to a margin change.
void | JTable.editingStopped(ChangeEvent e) Invoked when editing is finished.
void | JTable.editingCanceled(ChangeEvent e) Invoked when editing is canceled.
void | JTable.AccessibleJTable.columnMarginChanged(ChangeEvent e) Track changes of a column moving due to margin changes.
void | JTable.AccessibleJTable.editingStopped(ChangeEvent e) Track changes to a cell's contents.
void | JTable.AccessibleJTable.editingCanceled(ChangeEvent e) Invoked when editing is canceled.
void | AbstractButton.ButtonChangeListener.stateChanged(ChangeEvent e)
void | JScrollPane.AccessibleJScrollPane.stateChanged(ChangeEvent e) Supports the change listener interface and fires property change

Uses of ChangeEvent in javax.swing.colorchooser

Fields in javax.swing.colorchooser declared as ChangeEvent
protected  ChangeEvent DefaultColorSelectionModel.changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.

Uses of ChangeEvent in javax.swing.event

Methods in javax.swing.event with parameters of type ChangeEvent
void | ChangeListener.stateChanged(ChangeEvent e) Invoked when the target of the listener has changed its state.
void | CellEditorListener.editingStopped(ChangeEvent e) This tells the listeners the editor has ended editing
void | CellEditorListener.editingCanceled(ChangeEvent e) This tells the listeners the editor has canceled editing
void | TableColumnModelListener.columnMarginChanged(ChangeEvent e) Tells listeners that a column was moved due to a margin change.

Uses of ChangeEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ChangeEvent
void | BasicMenuUI.ChangeHandler.stateChanged(ChangeEvent e)
void | BasicProgressBarUI.ChangeHandler.stateChanged(ChangeEvent e)
void | BasicTabbedPaneUI.TabSelectionHandler.stateChanged(ChangeEvent e)
void | BasicScrollBarUI.ModelListener.stateChanged(ChangeEvent e)
void | BasicButtonListener.stateChanged(ChangeEvent e)
void | BasicTreeUI.CellEditorHandler.editingStopped(ChangeEvent e) Messaged when editing has stopped in the tree.
void | BasicTreeUI.CellEditorHandler.editingCanceled(ChangeEvent e) Messaged when editing has been canceled in the tree.
void | BasicScrollPaneUI.ViewportChangeHandler.stateChanged(ChangeEvent e)
void | BasicScrollPaneUI.HSBChangeListener.stateChanged(ChangeEvent e)
void | BasicScrollPaneUI.VSBChangeListener.stateChanged(ChangeEvent e)
void | BasicSliderUI.ChangeHandler.stateChanged(ChangeEvent e)

Uses of ChangeEvent in javax.swing.table

Fields in javax.swing.table declared as ChangeEvent
protected  ChangeEvent DefaultTableColumnModel.changeEvent
Change event (only one needed)

Methods in javax.swing.table with parameters of type ChangeEvent
 void JTableHeader.columnMarginChanged(ChangeEvent e)
Invoked when a column is moved due to a margin change.

Uses of ChangeEvent in javax.swing.text

Fields in javax.swing.text declared as ChangeEvent
protected ChangeEvent | StyleContext.NamedStyle.changeEvent Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected ChangeEvent | DefaultCaret.changeEvent The change event for the model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.DocumentEvent.EventType

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.DocumentEvent.EventType

Packages that use DocumentEvent.EventType
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of DocumentEvent.EventType in javax.swing.event

Fields in javax.swing.event declared as DocumentEvent.EventType
static DocumentEvent.EventType | DocumentEvent.EventType.INSERT Insert type.
static DocumentEvent.EventType | DocumentEvent.EventType.REMOVE Remove type.
static DocumentEvent.EventType | DocumentEvent.EventType.CHANGE Change type.

Methods in javax.swing.event that return DocumentEvent.EventType
 DocumentEvent.EventType DocumentEvent.getType()
Gets the type of event.

Uses of DocumentEvent.EventType in javax.swing.text

Methods in javax.swing.text that return DocumentEvent.EventType
 DocumentEvent.EventType AbstractDocument.DefaultDocumentEvent.getType()
Returns the type of event.

Constructors in javax.swing.text with parameters of type DocumentEvent.EventType
AbstractDocument.DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
Constructs a change record.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.EventListenerList

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.EventListenerList

Packages that use EventListenerList
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of EventListenerList in javax.swing

Fields in javax.swing declared as EventListenerList
protected EventListenerList | DefaultSingleSelectionModel.listenerList The collection of registered listeners
protected EventListenerList | JComponent.listenerList
protected EventListenerList | DefaultBoundedRangeModel.listenerList The listeners waiting for model changes.
protected EventListenerList | AbstractListModel.listenerList
protected EventListenerList | MenuSelectionManager.listenerList
protected EventListenerList | AbstractCellEditor.listenerList
protected EventListenerList | DefaultListSelectionModel.listenerList
protected EventListenerList | Timer.listenerList
protected EventListenerList | DefaultButtonModel.listenerList

Uses of EventListenerList in javax.swing.colorchooser

Fields in javax.swing.colorchooser declared as EventListenerList
protected  EventListenerList DefaultColorSelectionModel.listenerList

Uses of EventListenerList in javax.swing.table

Fields in javax.swing.table declared as EventListenerList
protected EventListenerList | AbstractTableModel.listenerList List of listeners
protected EventListenerList | DefaultTableColumnModel.listenerList List of TableColumnModelListener

Uses of EventListenerList in javax.swing.text

Fields in javax.swing.text declared as EventListenerList
protected EventListenerList | StyleContext.NamedStyle.listenerList The change listeners for the model.
protected EventListenerList | AbstractDocument.listenerList The event listener list for the document.
protected EventListenerList | DefaultCaret.listenerList The event listener list.

Uses of EventListenerList in javax.swing.tree

Fields in javax.swing.tree declared as EventListenerList
protected EventListenerList | DefaultTreeSelectionModel.listenerList Event listener list.
protected EventListenerList | DefaultTreeModel.listenerList Listeners.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.HyperlinkEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.HyperlinkEvent

Packages that use HyperlinkEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HyperlinkEvent in javax.swing

Methods in javax.swing with parameters of type HyperlinkEvent
 void JEditorPane.fireHyperlinkUpdate(HyperlinkEvent e)
Notifies all listeners that have registered interest for notification on this event type.

Uses of HyperlinkEvent in javax.swing.event

Methods in javax.swing.event with parameters of type HyperlinkEvent
 void HyperlinkListener.hyperlinkUpdate(HyperlinkEvent e)
Called when a hypertext link is updated.

Uses of HyperlinkEvent in javax.swing.text.html

Subclasses of HyperlinkEvent in javax.swing.text.html
 class HTMLFrameHyperlinkEvent
HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.HyperlinkEvent.EventType

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.HyperlinkEvent.EventType

Packages that use HyperlinkEvent.EventType
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HyperlinkEvent.EventType in javax.swing.event

Fields in javax.swing.event declared as HyperlinkEvent.EventType
static HyperlinkEvent.EventType | HyperlinkEvent.EventType.ENTERED Entered type.
static HyperlinkEvent.EventType | HyperlinkEvent.EventType.EXITED Exited type.
static HyperlinkEvent.EventType | HyperlinkEvent.EventType.ACTIVATED Activated type.

Methods in javax.swing.event that return HyperlinkEvent.EventType
 HyperlinkEvent.EventType HyperlinkEvent.getEventType()
Gets the type of event.

Constructors in javax.swing.event with parameters of type HyperlinkEvent.EventType
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u)
Creates a new object representing a hypertext link event.
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc)
Creates a new object representing a hypertext link event.

Uses of HyperlinkEvent.EventType in javax.swing.text.html

Constructors in javax.swing.text.html with parameters of type HyperlinkEvent.EventType
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String targetFrame)
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.InternalFrameEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.InternalFrameEvent

Packages that use InternalFrameEvent
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of InternalFrameEvent in javax.swing.event

Methods in javax.swing.event with parameters of type InternalFrameEvent
void | InternalFrameAdapter.internalFrameOpened(InternalFrameEvent e) Invoked when an internal frame has been opened.
void | InternalFrameAdapter.internalFrameClosing(InternalFrameEvent e) Invoked when an internal frame is in the process of being closed.
void | InternalFrameAdapter.internalFrameClosed(InternalFrameEvent e) Invoked when an internal frame has been closed.
void | InternalFrameAdapter.internalFrameIconified(InternalFrameEvent e) Invoked when an internal frame is iconified.
void | InternalFrameAdapter.internalFrameDeiconified(InternalFrameEvent e) Invoked when an internal frame is de-iconified.
void | InternalFrameAdapter.internalFrameActivated(InternalFrameEvent e) Invoked when an internal frame is activated.
void | InternalFrameAdapter.internalFrameDeactivated(InternalFrameEvent e) Invoked when an internal frame is de-activated.
void | InternalFrameListener.internalFrameOpened(InternalFrameEvent e) Invoked when a internal frame has been opened.
void | InternalFrameListener.internalFrameClosing(InternalFrameEvent e) Invoked when an internal frame is in the process of being closed.
void | InternalFrameListener.internalFrameClosed(InternalFrameEvent e) Invoked when an internal frame has been closed.
void | InternalFrameListener.internalFrameIconified(InternalFrameEvent e) Invoked when an internal frame is iconified.
void | InternalFrameListener.internalFrameDeiconified(InternalFrameEvent e) Invoked when an internal frame is de-iconified.
void | InternalFrameListener.internalFrameActivated(InternalFrameEvent e) Invoked when an internal frame is activated.
void | InternalFrameListener.internalFrameDeactivated(InternalFrameEvent e) Invoked when an internal frame is de-activated.

Uses of InternalFrameEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type InternalFrameEvent
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameClosing(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameClosed(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameOpened(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameIconified(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameDeiconified(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameActivated(InternalFrameEvent e)
void | BasicInternalFrameUI.BasicInternalFrameListener.internalFrameDeactivated(InternalFrameEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.ListDataEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.ListDataEvent

Packages that use ListDataEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ListDataEvent in javax.swing

Methods in javax.swing with parameters of type ListDataEvent
void | JComboBox.contentsChanged(ListDataEvent e) This method is public as an implementation side effect.
void | JComboBox.intervalAdded(ListDataEvent e) Invoked items have been added to the internal data model.
void | JComboBox.intervalRemoved(ListDataEvent e) Invoked when values have been removed from the data model.
void | JList.AccessibleJList.intervalAdded(ListDataEvent e) List Data Listener interval added method.
void | JList.AccessibleJList.intervalRemoved(ListDataEvent e) List Data Listener interval removed method.
void | JList.AccessibleJList.contentsChanged(ListDataEvent e) List Data Listener contents changed method.

Uses of ListDataEvent in javax.swing.event

Methods in javax.swing.event with parameters of type ListDataEvent
void | ListDataListener.intervalAdded(ListDataEvent e) Sent after the indices in the index0,index1 interval have been inserted in the data model.
void | ListDataListener.intervalRemoved(ListDataEvent e) Sent after the indices in the index0,index1 interval have been removed from the data model.
void | ListDataListener.contentsChanged(ListDataEvent e) Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.

Uses of ListDataEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ListDataEvent
void | BasicComboPopup.ListDataHandler.contentsChanged(ListDataEvent e)
void | BasicComboPopup.ListDataHandler.intervalAdded(ListDataEvent e)
void | BasicComboPopup.ListDataHandler.intervalRemoved(ListDataEvent e)
void | BasicListUI.ListDataHandler.intervalAdded(ListDataEvent e)
void | BasicListUI.ListDataHandler.intervalRemoved(ListDataEvent e)
void | BasicListUI.ListDataHandler.contentsChanged(ListDataEvent e)
void | BasicComboBoxUI.ListDataHandler.contentsChanged(ListDataEvent e)
void | BasicComboBoxUI.ListDataHandler.intervalAdded(ListDataEvent e)
void | BasicComboBoxUI.ListDataHandler.intervalRemoved(ListDataEvent e)
void | BasicDirectoryModel.intervalAdded(ListDataEvent e)
void | BasicDirectoryModel.intervalRemoved(ListDataEvent e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.ListSelectionEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.ListSelectionEvent

Packages that use ListSelectionEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of ListSelectionEvent in javax.swing

Methods in javax.swing with parameters of type ListSelectionEvent
void | JList.AccessibleJList.valueChanged(ListSelectionEvent e) List Selection Listener value change method.
void | JTable.columnSelectionChanged(ListSelectionEvent e) Invoked when the selection model of the TableColumnModel is changed.
void | JTable.valueChanged(ListSelectionEvent e) Invoked when the row selection changes -- repaints to show the new selection.
void | JTable.AccessibleJTable.columnSelectionChanged(ListSelectionEvent e) Track that the selection model of the TableColumnModel changed.
void | JTable.AccessibleJTable.valueChanged(ListSelectionEvent e) Track changes to table cell selections

Uses of ListSelectionEvent in javax.swing.event

Methods in javax.swing.event with parameters of type ListSelectionEvent
void | ListSelectionListener.valueChanged(ListSelectionEvent e) Called whenever the value of the selection changes.
void | TableColumnModelListener.columnSelectionChanged(ListSelectionEvent e) Tells listeners that the selection model of the TableColumnModel changed.

Uses of ListSelectionEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type ListSelectionEvent
void | BasicComboPopup.ListSelectionHandler.valueChanged(ListSelectionEvent e)
void | BasicFileChooserUI.SelectionListener.valueChanged(ListSelectionEvent e)
void | BasicListUI.ListSelectionHandler.valueChanged(ListSelectionEvent e)

Uses of ListSelectionEvent in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type ListSelectionEvent
 void MetalFileChooserUI.valueChanged(ListSelectionEvent e)

Uses of ListSelectionEvent in javax.swing.table

Methods in javax.swing.table with parameters of type ListSelectionEvent
void | JTableHeader.columnSelectionChanged(ListSelectionEvent e) Invoked when the selection model of the TableColumnModel is changed.
protected void | DefaultTableColumnModel.fireColumnSelectionChanged(ListSelectionEvent e) Notifies all listeners that have registered interest for notification on this event type.
void | DefaultTableColumnModel.valueChanged(ListSelectionEvent e) A ListSelectionListener that forwards ListSelectionEvents when there is a column selection change.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.MenuDragMouseEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.MenuDragMouseEvent

Packages that use MenuDragMouseEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.

Uses of MenuDragMouseEvent in javax.swing

Methods in javax.swing with parameters of type MenuDragMouseEvent
void | JMenuItem.processMenuDragMouseEvent(MenuDragMouseEvent e) Handle mouse drag in a menu.
protected void | JMenuItem.fireMenuDragMouseEntered(MenuDragMouseEvent event)
protected void | JMenuItem.fireMenuDragMouseExited(MenuDragMouseEvent event)
protected void | JMenuItem.fireMenuDragMouseDragged(MenuDragMouseEvent event)
protected void | JMenuItem.fireMenuDragMouseReleased(MenuDragMouseEvent event)

Uses of MenuDragMouseEvent in javax.swing.event

Methods in javax.swing.event with parameters of type MenuDragMouseEvent
void | MenuDragMouseListener.menuDragMouseEntered(MenuDragMouseEvent e) Invoked when the dragged mouse has entered a menu component's display area.
void | MenuDragMouseListener.menuDragMouseExited(MenuDragMouseEvent e) Invoked when the dragged mouse has left a menu component's display area.
void | MenuDragMouseListener.menuDragMouseDragged(MenuDragMouseEvent e) Invoked when the mouse is being dragged in a menu component's display area.
void | MenuDragMouseListener.menuDragMouseReleased(MenuDragMouseEvent e) Invoked when a dragged mouse is release in a menu component's display area.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.MenuEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.MenuEvent

Packages that use MenuEvent
javax.swing.event Provides for events fired by Swing components.

Uses of MenuEvent in javax.swing.event

Methods in javax.swing.event with parameters of type MenuEvent
void | MenuListener.menuSelected(MenuEvent e) Invoked when a menu is selected.
void | MenuListener.menuDeselected(MenuEvent e) Invoked when the menu is deselected.
void | MenuListener.menuCanceled(MenuEvent e) Invoked when the menu is canceled.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.MenuKeyEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.MenuKeyEvent

Packages that use MenuKeyEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.

Uses of MenuKeyEvent in javax.swing

Methods in javax.swing with parameters of type MenuKeyEvent
void | JMenuItem.processMenuKeyEvent(MenuKeyEvent e) Handle a keystroke in a menu.
protected void | JMenuItem.fireMenuKeyPressed(MenuKeyEvent event)
protected void | JMenuItem.fireMenuKeyReleased(MenuKeyEvent event)
protected void | JMenuItem.fireMenuKeyTyped(MenuKeyEvent event)

Uses of MenuKeyEvent in javax.swing.event

Methods in javax.swing.event with parameters of type MenuKeyEvent
void | MenuKeyListener.menuKeyTyped(MenuKeyEvent e) Invoked when a key has been typed.
void | MenuKeyListener.menuKeyPressed(MenuKeyEvent e) Invoked when a key has been pressed.
void | MenuKeyListener.menuKeyReleased(MenuKeyEvent e) Invoked when a key has been released.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.MouseInputAdapter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.MouseInputAdapter

Packages that use MouseInputAdapter
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of MouseInputAdapter in javax.swing.plaf.basic

Subclasses of MouseInputAdapter in javax.swing.plaf.basic
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
class | BasicSliderUI.TrackListener Track mouse movements.

Fields in javax.swing.plaf.basic declared as MouseInputAdapter
protected  MouseInputAdapter BasicInternalFrameUI.borderListener

Methods in javax.swing.plaf.basic that return MouseInputAdapter
protected  MouseInputAdapter BasicInternalFrameUI.createBorderListener(JInternalFrame w)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.PopupMenuEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.PopupMenuEvent

Packages that use PopupMenuEvent
javax.swing.event Provides for events fired by Swing components.

Uses of PopupMenuEvent in javax.swing.event

Methods in javax.swing.event with parameters of type PopupMenuEvent
void | PopupMenuListener.popupMenuWillBecomeVisible(PopupMenuEvent e) This method is called before the popup menu becomes visible
void | PopupMenuListener.popupMenuWillBecomeInvisible(PopupMenuEvent e) This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time
void | PopupMenuListener.popupMenuCanceled(PopupMenuEvent e) This method is called when the popup menu is canceled

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.SwingPropertyChangeSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.SwingPropertyChangeSupport

Packages that use SwingPropertyChangeSupport
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of SwingPropertyChangeSupport in javax.swing

Fields in javax.swing declared as SwingPropertyChangeSupport
protected  SwingPropertyChangeSupport AbstractAction.changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.

Uses of SwingPropertyChangeSupport in javax.swing.tree

Fields in javax.swing.tree declared as SwingPropertyChangeSupport
protected  SwingPropertyChangeSupport DefaultTreeSelectionModel.changeSupport
Used to messaged registered listeners.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.TableColumnModelEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.TableColumnModelEvent

Packages that use TableColumnModelEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableColumnModelEvent in javax.swing

Methods in javax.swing with parameters of type TableColumnModelEvent
void | JTable.columnAdded(TableColumnModelEvent e) Invoked when a column is added to the table column model.
void | JTable.columnRemoved(TableColumnModelEvent e) Invoked when a column is removed from the table column model.
void | JTable.columnMoved(TableColumnModelEvent e) Invoked when a column is repositioned.
void | JTable.AccessibleJTable.columnAdded(TableColumnModelEvent e) Track changes to the table contents (column insertions)
void | JTable.AccessibleJTable.columnRemoved(TableColumnModelEvent e) Track changes to the table contents (column deletions)
void | JTable.AccessibleJTable.columnMoved(TableColumnModelEvent e) Track changes of a column repositioning.

Uses of TableColumnModelEvent in javax.swing.event

Methods in javax.swing.event with parameters of type TableColumnModelEvent
void | TableColumnModelListener.columnAdded(TableColumnModelEvent e) Tells listeners that a column was added to the model.
void | TableColumnModelListener.columnRemoved(TableColumnModelEvent e) Tells listeners that a column was removed from the model.
void | TableColumnModelListener.columnMoved(TableColumnModelEvent e) Tells listeners that a column was repositioned.

Uses of TableColumnModelEvent in javax.swing.table

Methods in javax.swing.table with parameters of type TableColumnModelEvent
void | JTableHeader.columnAdded(TableColumnModelEvent e) Invoked when a column is added to the table column model.
void | JTableHeader.columnRemoved(TableColumnModelEvent e) Invoked when a column is removed from the table column model.
void | JTableHeader.columnMoved(TableColumnModelEvent e) Invoked when a column is repositioned.
protected void | DefaultTableColumnModel.fireColumnAdded(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | DefaultTableColumnModel.fireColumnRemoved(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | DefaultTableColumnModel.fireColumnMoved(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.TableModelEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.TableModelEvent

Packages that use TableModelEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableModelEvent in javax.swing

Methods in javax.swing with parameters of type TableModelEvent
void | JTable.tableChanged(TableModelEvent e) Invoked when this table's TableModel generates a TableModelEvent.
void | JTable.AccessibleJTable.tableChanged(TableModelEvent e) Track changes to the table contents
void | JTable.AccessibleJTable.tableRowsInserted(TableModelEvent e) Track changes to the table contents (row insertions)
void | JTable.AccessibleJTable.tableRowsDeleted(TableModelEvent e) Track changes to the table contents (row deletions)

Uses of TableModelEvent in javax.swing.event

Methods in javax.swing.event with parameters of type TableModelEvent
 void TableModelListener.tableChanged(TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.

Uses of TableModelEvent in javax.swing.table

Methods in javax.swing.table with parameters of type TableModelEvent
void | AbstractTableModel.fireTableChanged(TableModelEvent e) Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model.
void | DefaultTableModel.newDataAvailable(TableModelEvent event) Equivalent to fireTableChanged.
void | DefaultTableModel.newRowsAdded(TableModelEvent event) Ensures that the new rows have the correct number of columns.
void | DefaultTableModel.rowsRemoved(TableModelEvent event) Equivalent to fireTableChanged.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.TreeExpansionEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.TreeExpansionEvent

Packages that use TreeExpansionEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeExpansionEvent in javax.swing

Methods in javax.swing with parameters of type TreeExpansionEvent
void | JTree.AccessibleJTree.treeCollapsed(TreeExpansionEvent e) Tree Collapsed notification.
void | JTree.AccessibleJTree.treeExpanded(TreeExpansionEvent e) Tree Model Expansion notification.

Uses of TreeExpansionEvent in javax.swing.event

Methods in javax.swing.event with parameters of type TreeExpansionEvent
void | TreeExpansionListener.treeExpanded(TreeExpansionEvent event) Called whenever an item in the tree has been expanded.
void | TreeExpansionListener.treeCollapsed(TreeExpansionEvent event) Called whenever an item in the tree has been collapsed.
void | TreeWillExpandListener.treeWillExpand(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be expanded.
void | TreeWillExpandListener.treeWillCollapse(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be collapsed.

Uses of TreeExpansionEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type TreeExpansionEvent
void | BasicTreeUI.TreeExpansionHandler.treeExpanded(TreeExpansionEvent event) Called whenever an item in the tree has been expanded.
void | BasicTreeUI.TreeExpansionHandler.treeCollapsed(TreeExpansionEvent event) Called whenever an item in the tree has been collapsed.

Uses of TreeExpansionEvent in javax.swing.tree

Fields in javax.swing.tree declared as TreeExpansionEvent
protected  TreeExpansionEvent ExpandVetoException.event
The event that the exception was created for.

Constructors in javax.swing.tree with parameters of type TreeExpansionEvent
ExpandVetoException(TreeExpansionEvent event)
Constructs an ExpandVetoException object with no message.
ExpandVetoException(TreeExpansionEvent event, String message)
Constructs an ExpandVetoException object with the specified message.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.TreeModelEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.TreeModelEvent

Packages that use TreeModelEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeModelEvent in javax.swing

Methods in javax.swing with parameters of type TreeModelEvent
void | JTree.TreeModelHandler.treeNodesChanged(TreeModelEvent e)
void | JTree.TreeModelHandler.treeNodesInserted(TreeModelEvent e)
void | JTree.TreeModelHandler.treeStructureChanged(TreeModelEvent e)
void | JTree.TreeModelHandler.treeNodesRemoved(TreeModelEvent e)
void | JTree.AccessibleJTree.treeNodesChanged(TreeModelEvent e) Tree Model Node change notification.
void | JTree.AccessibleJTree.treeNodesInserted(TreeModelEvent e) Tree Model Node change notification.
void | JTree.AccessibleJTree.treeNodesRemoved(TreeModelEvent e) Tree Model Node change notification.
void | JTree.AccessibleJTree.treeStructureChanged(TreeModelEvent e) Tree Model structure change change notification.

Uses of TreeModelEvent in javax.swing.event

Methods in javax.swing.event with parameters of type TreeModelEvent
void | TreeModelListener.treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | TreeModelListener.treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | TreeModelListener.treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | TreeModelListener.treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.

Uses of TreeModelEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type TreeModelEvent
void | BasicTreeUI.TreeModelHandler.treeNodesChanged(TreeModelEvent e)
void | BasicTreeUI.TreeModelHandler.treeNodesInserted(TreeModelEvent e)
void | BasicTreeUI.TreeModelHandler.treeNodesRemoved(TreeModelEvent e)
void | BasicTreeUI.TreeModelHandler.treeStructureChanged(TreeModelEvent e)

Uses of TreeModelEvent in javax.swing.tree

Methods in javax.swing.tree with parameters of type TreeModelEvent
abstract void | AbstractLayoutCache.treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
abstract void | AbstractLayoutCache.treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
abstract void | AbstractLayoutCache.treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
abstract void | AbstractLayoutCache.treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
void | VariableHeightLayoutCache.treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | VariableHeightLayoutCache.treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | VariableHeightLayoutCache.treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | VariableHeightLayoutCache.treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
void | FixedHeightLayoutCache.treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | FixedHeightLayoutCache.treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | FixedHeightLayoutCache.treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | FixedHeightLayoutCache.treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.TreeSelectionEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.TreeSelectionEvent

Packages that use TreeSelectionEvent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeSelectionEvent in javax.swing

Methods in javax.swing with parameters of type TreeSelectionEvent
protected void | JTree.fireValueChanged(TreeSelectionEvent e) Notifies all listeners that have registered interest for notification on this event type.
void | JTree.TreeSelectionRedirector.valueChanged(TreeSelectionEvent e) Invoked by the TreeSelectionModel when the selection changes.
void | JTree.AccessibleJTree.valueChanged(TreeSelectionEvent e) Tree Selection Listener value change method.

Uses of TreeSelectionEvent in javax.swing.event

Methods in javax.swing.event with parameters of type TreeSelectionEvent
 void TreeSelectionListener.valueChanged(TreeSelectionEvent e)
Called whenever the value of the selection changes.

Uses of TreeSelectionEvent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type TreeSelectionEvent
 void BasicTreeUI.TreeSelectionHandler.valueChanged(TreeSelectionEvent event)
Messaged when the selection changes in the tree we're displaying for.

Uses of TreeSelectionEvent in javax.swing.tree

Methods in javax.swing.tree with parameters of type TreeSelectionEvent
protected void | DefaultTreeSelectionModel.fireValueChanged(TreeSelectionEvent e) Notifies all listeners that are registered for tree selection events on this object.
void | DefaultTreeCellEditor.valueChanged(TreeSelectionEvent e) Resets lastPath.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.event.UndoableEditEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.event.UndoableEditEvent

Packages that use UndoableEditEvent
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of UndoableEditEvent in javax.swing.event

Methods in javax.swing.event with parameters of type UndoableEditEvent
 void UndoableEditListener.undoableEditHappened(UndoableEditEvent e)
An undoable edit happened

Uses of UndoableEditEvent in javax.swing.text

Methods in javax.swing.text with parameters of type UndoableEditEvent
protected  void AbstractDocument.fireUndoableEditUpdate(UndoableEditEvent e)
Notifies all listeners that have registered interest for notification on this event type.

Uses of UndoableEditEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type UndoableEditEvent
protected  void HTMLDocument.fireUndoableEditUpdate(UndoableEditEvent e)
Notifies all listeners that have registered interest for notification on this event type.

Uses of UndoableEditEvent in javax.swing.undo

Methods in javax.swing.undo with parameters of type UndoableEditEvent
 void UndoManager.undoableEditHappened(UndoableEditEvent e)
Called by the UndoabledEdit sources this UndoManager listens to.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.AncestorListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.AncestorListener

Packages that use AncestorListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of AncestorListener in javax.swing

Methods in javax.swing with parameters of type AncestorListener
void | JComponent.addAncestorListener(AncestorListener listener) Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible / invisible.
void | JComponent.removeAncestorListener(AncestorListener listener) Unregisters listener so that it will no longer receive AncestorEvents

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.CaretListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.CaretListener

Packages that use CaretListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of CaretListener in javax.swing

Classes in javax.swing that implement CaretListener
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.

Uses of CaretListener in javax.swing.text

Classes in javax.swing.text that implement CaretListener
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Methods in javax.swing.text with parameters of type CaretListener
void | JTextComponent.addCaretListener(CaretListener listener) Adds a caret listener for notification of any changes to the caret.
void | JTextComponent.removeCaretListener(CaretListener listener) Removes a caret listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.CellEditorListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.CellEditorListener

Packages that use CellEditorListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of CellEditorListener in javax.swing

Classes in javax.swing that implement CellEditorListener
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.

Methods in javax.swing with parameters of type CellEditorListener
void | CellEditor.addCellEditorListener(CellEditorListener l) Add a listener to the list that's notified when the editor starts, stops, or cancels editing.
void | CellEditor.removeCellEditorListener(CellEditorListener l) Remove a listener from the list that's notified
void | AbstractCellEditor.addCellEditorListener(CellEditorListener l) Adds a CellEditorListener to the listener list.
void | AbstractCellEditor.removeCellEditorListener(CellEditorListener l) Removes a CellEditorListener from the listener list.

Uses of CellEditorListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement CellEditorListener
 class BasicTreeUI.CellEditorHandler
Listener responsible for getting cell editing events and updating the tree accordingly.

Methods in javax.swing.plaf.basic that return CellEditorListener
protected  CellEditorListener BasicTreeUI.createCellEditorListener()
Creates a listener to handle events from the current editor.

Uses of CellEditorListener in javax.swing.tree

Methods in javax.swing.tree with parameters of type CellEditorListener
void | DefaultTreeCellEditor.addCellEditorListener(CellEditorListener l) Adds the CellEditorListener.
void | DefaultTreeCellEditor.removeCellEditorListener(CellEditorListener l) Removes the previously added CellEditorListener l.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.ChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.ChangeListener

Packages that use ChangeListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.colorchooser | Contains classes and interfaces used by the JColorChooser component.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ChangeListener in javax.swing

Classes in javax.swing that implement ChangeListener
protected class | AbstractButton.ButtonChangeListener Extends ChangeListener to be serializable.
protected class | JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem This class implements accessibility support for the JCheckBoxMenuItem class.
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenuItem.AccessibleJMenuItem This class implements accessibility support for the JMenuItem class.
protected class | JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem This class implements accessibility support for the JRadioButtonMenuItem class.
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTabbedPane.ModelListener We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.

Fields in javax.swing declared as ChangeListener
protected ChangeListener | JTabbedPane.changeListener The changeListener is the listener we add to the model.
protected ChangeListener | AbstractButton.changeListener The button model's changeListener.
protected ChangeListener | JProgressBar.changeListener
protected ChangeListener | JSlider.changeListener The changeListener (no suffix) is the listener we add to the Sliders model.

Methods in javax.swing that return ChangeListener
protected ChangeListener | JTabbedPane.createChangeListener() Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
protected ChangeListener | AbstractButton.createChangeListener() Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation.
protected ChangeListener | JProgressBar.createChangeListener()
protected ChangeListener | JSlider.createChangeListener() Subclasses that want to handle model ChangeEvents differently can override this method to return their own ChangeListener implementation.

Methods in javax.swing with parameters of type ChangeListener
void | DefaultSingleSelectionModel.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | DefaultSingleSelectionModel.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | JViewport.addChangeListener(ChangeListener l) Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.
void | JViewport.removeChangeListener(ChangeListener l) Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.
void | JTabbedPane.addChangeListener(ChangeListener l) Adds a ChangeListener to this tabbedpane.
void | JTabbedPane.removeChangeListener(ChangeListener l) Removes a ChangeListener from this tabbedpane.
void | SingleSelectionModel.addChangeListener(ChangeListener listener) Adds listener as a listener to changes in the model.
void | SingleSelectionModel.removeChangeListener(ChangeListener listener) Removes listener as a listener to changes in the model.
void | AbstractButton.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | AbstractButton.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | DefaultBoundedRangeModel.addChangeListener(ChangeListener l) Adds a ChangeListener.
void | DefaultBoundedRangeModel.removeChangeListener(ChangeListener l) Removes a ChangeListener.
void | MenuSelectionManager.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | MenuSelectionManager.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | ButtonModel.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | ButtonModel.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | DefaultButtonModel.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | DefaultButtonModel.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | BoundedRangeModel.addChangeListener(ChangeListener x) Adds a ChangeListener to the model's listener list.
void | BoundedRangeModel.removeChangeListener(ChangeListener x) Removes a ChangeListener from the model's listener list.
void | JProgressBar.addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | JProgressBar.removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | JSlider.addChangeListener(ChangeListener l) Adds a ChangeListener to the slider.
void | JSlider.removeChangeListener(ChangeListener l) Removes a ChangeListener from the slider.

Uses of ChangeListener in javax.swing.colorchooser

Methods in javax.swing.colorchooser with parameters of type ChangeListener
void | DefaultColorSelectionModel.addChangeListener(ChangeListener l) Adds a ChangeListener to the model.
void | DefaultColorSelectionModel.removeChangeListener(ChangeListener l) Removes a ChangeListener from the model.
void | ColorSelectionModel.addChangeListener(ChangeListener listener) Adds listener as a listener to changes in the model.
void | ColorSelectionModel.removeChangeListener(ChangeListener listener) Removes listener as a listener to changes in the model.

Uses of ChangeListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ChangeListener
class | BasicButtonListener Button Listener
class | BasicMenuUI.ChangeHandler
class | BasicProgressBarUI.ChangeHandler This inner class is marked "public" due to a compiler bug.
protected class | BasicScrollBarUI.ModelListener A listener to listen for model changes.
class | BasicScrollPaneUI.HSBChangeListener Horizontal scrollbar listener.
class | BasicScrollPaneUI.ViewportChangeHandler Listener for viewport events.
class | BasicScrollPaneUI.VSBChangeListener Vertical scrollbar listener.
class | BasicSliderUI.ChangeHandler Data model listener.
class | BasicTabbedPaneUI.TabSelectionHandler This inner class is marked "public" due to a compiler bug.

Fields in javax.swing.plaf.basic declared as ChangeListener
protected ChangeListener | BasicMenuUI.changeListener
protected ChangeListener | BasicProgressBarUI.changeListener
protected ChangeListener | BasicTabbedPaneUI.tabChangeListener
protected ChangeListener | BasicMenuBarUI.changeListener
protected ChangeListener | BasicColorChooserUI.previewListener
protected ChangeListener | BasicScrollPaneUI.vsbChangeListener
protected ChangeListener | BasicScrollPaneUI.hsbChangeListener
protected ChangeListener | BasicScrollPaneUI.viewportChangeListener
protected ChangeListener | BasicSliderUI.changeListener

Methods in javax.swing.plaf.basic that return ChangeListener
protected ChangeListener | BasicMenuUI.createChangeListener(JComponent c)
protected ChangeListener | BasicTabbedPaneUI.createChangeListener()
protected ChangeListener | BasicMenuBarUI.createChangeListener()
protected ChangeListener | BasicScrollPaneUI.createViewportChangeListener()
protected ChangeListener | BasicScrollPaneUI.createHSBChangeListener()
protected ChangeListener | BasicScrollPaneUI.createVSBChangeListener()
protected ChangeListener | BasicSliderUI.createChangeListener(JSlider slider)

Uses of ChangeListener in javax.swing.text

Methods in javax.swing.text with parameters of type ChangeListener
void | Style.addChangeListener(ChangeListener l) Adds a listener to track whenever an attribute has been changed.
void | Style.removeChangeListener(ChangeListener l) Removes a listener that was tracking attribute changes.
void | StyleContext.addChangeListener(ChangeListener l) Adds a listener to track when styles are added or removed.
void | StyleContext.removeChangeListener(ChangeListener l) Removes a listener that was tracking styles being added or removed.
void | StyleContext.NamedStyle.addChangeListener(ChangeListener l) Adds a change listener.
void | StyleContext.NamedStyle.removeChangeListener(ChangeListener l) Removes a change listener.
void | DefaultCaret.addChangeListener(ChangeListener l) Adds a listener to track whenever the caret position has been changed.
void | DefaultCaret.removeChangeListener(ChangeListener l) Removes a listener that was tracking caret position changes.
void | Caret.addChangeListener(ChangeListener l) Adds a listener to track whenever the caret position has been changed.
void | Caret.removeChangeListener(ChangeListener l) Removes a listener that was tracking caret position changes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.DocumentEvent

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.DocumentEvent

Packages that use DocumentEvent
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of DocumentEvent in javax.swing.event

Methods in javax.swing.event with parameters of type DocumentEvent
void | DocumentListener.insertUpdate(DocumentEvent e) Gives notification that there was an insert into the document.
void | DocumentListener.removeUpdate(DocumentEvent e) Gives notification that a portion of the document has been removed.
void | DocumentListener.changedUpdate(DocumentEvent e) Gives notification that an attribute or set of attributes changed.

Uses of DocumentEvent in javax.swing.text

Classes in javax.swing.text that implement DocumentEvent
 class AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being modified.

Methods in javax.swing.text with parameters of type DocumentEvent
void | JTextComponent.AccessibleJTextComponent.insertUpdate(DocumentEvent e) Handles document insert (fire appropriate property change event which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
void | JTextComponent.AccessibleJTextComponent.removeUpdate(DocumentEvent e) Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
void | JTextComponent.AccessibleJTextComponent.changedUpdate(DocumentEvent e) Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
void | View.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | View.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | View.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected boolean | View.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void | View.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | View.forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Forward the DocumentEvent to the give child view.
protected void | View.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
void | GlyphView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | GlyphView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | GlyphView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | LabelView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | BoxView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
void | FlowView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FlowView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | FlowView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | ParagraphView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | PlainView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | PlainView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | PlainView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | FieldView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FieldView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
protected void | AbstractDocument.fireInsertUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | AbstractDocument.fireChangedUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | AbstractDocument.fireRemoveUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
void | FlowView.FlowStrategy.insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was removed from the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | AsyncBoxView.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
protected void | TableView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
void | WrappedPlainView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | WrappedPlainView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | WrappedPlainView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected boolean | ZoneView.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.
void | ZoneView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | ZoneView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.

Uses of DocumentEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type DocumentEvent
void | BlockView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
void | InlineView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | HTMLDocument.fireChangedUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.DocumentEvent.ElementChange

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.DocumentEvent.ElementChange

Packages that use DocumentEvent.ElementChange
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of DocumentEvent.ElementChange in javax.swing.event

Methods in javax.swing.event that return DocumentEvent.ElementChange
 DocumentEvent.ElementChange DocumentEvent.getChange(Element elem)
Gets the change information for the given element.

Uses of DocumentEvent.ElementChange in javax.swing.text

Classes in javax.swing.text that implement DocumentEvent.ElementChange
static class AbstractDocument.ElementEdit
An implementation of ElementChange that can be added to the document event.

Methods in javax.swing.text that return DocumentEvent.ElementChange
 DocumentEvent.ElementChange AbstractDocument.DefaultDocumentEvent.getChange(Element elem)
Gets the changes for an element.

Methods in javax.swing.text with parameters of type DocumentEvent.ElementChange
protected boolean | View.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void | View.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | View.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
protected void | BoxView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | AsyncBoxView.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
protected void | TableView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
protected boolean | ZoneView.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.DocumentListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.DocumentListener

Packages that use DocumentListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of DocumentListener in javax.swing

Classes in javax.swing that implement DocumentListener
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.

Uses of DocumentListener in javax.swing.text

Classes in javax.swing.text that implement DocumentListener
 class JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.

Methods in javax.swing.text with parameters of type DocumentListener
void | Document.addDocumentListener(DocumentListener listener) Registers the given observer to begin receiving notifications when changes are made to the document.
void | Document.removeDocumentListener(DocumentListener listener) Unregisters the given observer from the notification list so it will no longer receive change updates.
void | AbstractDocument.addDocumentListener(DocumentListener listener) Adds a document listener for notification of any changes.
void | AbstractDocument.removeDocumentListener(DocumentListener listener) Removes a document listener.
void | DefaultStyledDocument.addDocumentListener(DocumentListener listener) Adds a document listener for notification of any changes.
void | DefaultStyledDocument.removeDocumentListener(DocumentListener listener) Removes a document listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.HyperlinkListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.HyperlinkListener

Packages that use HyperlinkListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of HyperlinkListener in javax.swing

Methods in javax.swing with parameters of type HyperlinkListener
void | JEditorPane.addHyperlinkListener(HyperlinkListener listener) Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.
void | JEditorPane.removeHyperlinkListener(HyperlinkListener listener) Removes a hyperlink listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.InternalFrameListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.InternalFrameListener

Packages that use InternalFrameListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of InternalFrameListener in javax.swing

Methods in javax.swing with parameters of type InternalFrameListener
void | JInternalFrame.addInternalFrameListener(InternalFrameListener l) Adds the specified internal frame listener to receive internal frame events from this internal frame.
void | JInternalFrame.removeInternalFrameListener(InternalFrameListener l) Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.

Uses of InternalFrameListener in javax.swing.event

Classes in javax.swing.event that implement InternalFrameListener
 class InternalFrameAdapter
An abstract adapter class for receiving internal frame events.

Uses of InternalFrameListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement InternalFrameListener
protected  class BasicInternalFrameUI.BasicInternalFrameListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.ListDataListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.ListDataListener

Packages that use ListDataListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of ListDataListener in javax.swing

Classes in javax.swing that implement ListDataListener
class | JComboBox A component that combines a button or text field and a drop-down list.
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.

Methods in javax.swing with parameters of type ListDataListener
void | ListModel.addListDataListener(ListDataListener l) Add a listener to the list that's notified each time a change to the data model occurs.
void | ListModel.removeListDataListener(ListDataListener l) Remove a listener from the list that's notified each time a change to the data model occurs.
void | AbstractListModel.addListDataListener(ListDataListener l) Add a listener to the list that's notified each time a change to the data model occurs.
void | AbstractListModel.removeListDataListener(ListDataListener l) Remove a listener from the list that's notified each time a change to the data model occurs.

Uses of ListDataListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ListDataListener
class | BasicComboBoxUI.ListDataHandler This listener watches for changes in the data and revalidates.
class | BasicComboPopup.ListDataHandler Keeps the selected index in the list in-sync with the combo box's selection.
class | BasicListUI.ListDataHandler The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.

Fields in javax.swing.plaf.basic declared as ListDataListener
protected ListDataListener | BasicComboPopup.listDataListener
protected ListDataListener | BasicListUI.listDataListener
protected ListDataListener | BasicComboBoxUI.listDataListener

Methods in javax.swing.plaf.basic that return ListDataListener
protected ListDataListener | BasicComboPopup.createListDataListener() Creates a list data listener that watches for inserted and removed items from the combo box model.
protected ListDataListener | BasicListUI.createListDataListener() Creates an instance of ListDataListener that's added to the JLists by model as needed.
protected ListDataListener | BasicComboBoxUI.createListDataListener() Creates the list data listener that is used for caching the preferred sizes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.ListSelectionListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.ListSelectionListener

Packages that use ListSelectionListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of ListSelectionListener in javax.swing

Classes in javax.swing that implement ListSelectionListener
protected class | JList.AccessibleJList This class implements accessibility support for the JList class.
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.

Methods in javax.swing with parameters of type ListSelectionListener
void | DefaultListSelectionModel.addListSelectionListener(ListSelectionListener l)
void | DefaultListSelectionModel.removeListSelectionListener(ListSelectionListener l)
void | JList.addListSelectionListener(ListSelectionListener listener) Adds a listener to the list that's notified each time a change to the selection occurs.
void | JList.removeListSelectionListener(ListSelectionListener listener) Removes a listener from the list that's notified each time a change to the selection occurs.
void | ListSelectionModel.addListSelectionListener(ListSelectionListener x) Add a listener to the list that's notified each time a change to the selection occurs.
void | ListSelectionModel.removeListSelectionListener(ListSelectionListener x) Remove a listener from the list that's notified each time a change to the selection occurs.

Uses of ListSelectionListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ListSelectionListener
protected class | BasicComboPopup.ListSelectionHandler This listener watches for changes in the list's selection and reports them to the combo box.
protected class | BasicFileChooserUI.SelectionListener
class | BasicListUI.ListSelectionHandler The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.

Fields in javax.swing.plaf.basic declared as ListSelectionListener
protected ListSelectionListener | BasicComboPopup.listSelectionListener
protected ListSelectionListener | BasicListUI.listSelectionListener

Methods in javax.swing.plaf.basic that return ListSelectionListener
protected ListSelectionListener | BasicComboPopup.createListSelectionListener() Creates a list selection listener that watches for selection changes in the popup's list.
ListSelectionListener | BasicFileChooserUI.createListSelectionListener(JFileChooser fc)
protected ListSelectionListener | BasicListUI.createListSelectionListener() Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed.

Uses of ListSelectionListener in javax.swing.table

Classes in javax.swing.table that implement ListSelectionListener
 class DefaultTableColumnModel
The standard column-handler for a JTable.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.MenuDragMouseListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.MenuDragMouseListener

Packages that use MenuDragMouseListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of MenuDragMouseListener in javax.swing

Methods in javax.swing with parameters of type MenuDragMouseListener
void | JMenuItem.addMenuDragMouseListener(MenuDragMouseListener l) Adds a MenuDragMouseListener to the menu item
void | JMenuItem.removeMenuDragMouseListener(MenuDragMouseListener l) Removes a MenuDragMouseListener from the menu item

Uses of MenuDragMouseListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as MenuDragMouseListener
protected  MenuDragMouseListener BasicMenuItemUI.menuDragMouseListener

Methods in javax.swing.plaf.basic that return MenuDragMouseListener
protected MenuDragMouseListener | BasicMenuItemUI.createMenuDragMouseListener(JComponent c)
protected MenuDragMouseListener | BasicMenuUI.createMenuDragMouseListener(JComponent c)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.MenuKeyListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.MenuKeyListener

Packages that use MenuKeyListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of MenuKeyListener in javax.swing

Methods in javax.swing with parameters of type MenuKeyListener
void | JMenuItem.addMenuKeyListener(MenuKeyListener l) Adds a MenuKeyListener to the menu item
void | JMenuItem.removeMenuKeyListener(MenuKeyListener l) Removes a MenuKeyListener from the menu item

Uses of MenuKeyListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as MenuKeyListener
protected  MenuKeyListener BasicMenuItemUI.menuKeyListener

Methods in javax.swing.plaf.basic that return MenuKeyListener
protected MenuKeyListener | BasicMenuItemUI.createMenuKeyListener(JComponent c)
protected MenuKeyListener | BasicMenuUI.createMenuKeyListener(JComponent c)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.MenuListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.MenuListener

Packages that use MenuListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of MenuListener in javax.swing

Methods in javax.swing with parameters of type MenuListener
void | JMenu.addMenuListener(MenuListener l) Adds a listener for menu events.
void | JMenu.removeMenuListener(MenuListener l) Removes a listener for menu events.

Uses of MenuListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as MenuListener
protected  MenuListener BasicMenuUI.menuListener

Methods in javax.swing.plaf.basic that return MenuListener
protected  MenuListener BasicMenuUI.createMenuListener(JComponent c)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.MouseInputListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.MouseInputListener

Packages that use MouseInputListener
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MouseInputListener in javax.swing.event

Classes in javax.swing.event that implement MouseInputListener
 class MouseInputAdapter
The adapter which receives mouse events and mouse motion events.

Uses of MouseInputListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement MouseInputListener
class | BasicDesktopIconUI.MouseInputHandler Listens for mouse movements and acts on them.
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
protected class | BasicMenuItemUI.MouseInputHandler
class | BasicSliderUI.TrackListener Track mouse movements.
class | BasicTableHeaderUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.

Fields in javax.swing.plaf.basic declared as MouseInputListener
protected MouseInputListener | BasicMenuItemUI.mouseInputListener
protected MouseInputListener | BasicTableUI.mouseInputListener
protected MouseInputListener | BasicToolBarUI.dockingListener
protected MouseInputListener | BasicInternalFrameUI.glassPaneDispatcher
protected MouseInputListener | BasicListUI.mouseInputListener
protected MouseInputListener | BasicTableHeaderUI.mouseInputListener

Methods in javax.swing.plaf.basic that return MouseInputListener
protected MouseInputListener | BasicMenuItemUI.createMouseInputListener(JComponent c)
protected MouseInputListener | BasicMenuUI.createMouseInputListener(JComponent c)
protected MouseInputListener | BasicTableUI.createMouseInputListener() Creates the mouse listener for the JTable.
protected MouseInputListener | BasicToolBarUI.createDockingListener()
protected MouseInputListener | BasicInternalFrameUI.createGlassPaneDispatcher()
protected MouseInputListener | BasicListUI.createMouseInputListener() Creates a delegate that implements MouseInputListener.
protected MouseInputListener | BasicTableHeaderUI.createMouseInputListener() Creates the mouse listener for the JTable.
protected MouseInputListener | BasicDesktopIconUI.createMouseInputListener()

Uses of MouseInputListener in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement MouseInputListener
protected  class MetalToolBarUI.MetalDockingListener

Methods in javax.swing.plaf.metal that return MouseInputListener
protected  MouseInputListener MetalToolBarUI.createDockingListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.PopupMenuListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.PopupMenuListener

Packages that use PopupMenuListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of PopupMenuListener in javax.swing

Methods in javax.swing with parameters of type PopupMenuListener
void | JPopupMenu.addPopupMenuListener(PopupMenuListener l) Adds a PopupMenu listener.
void | JPopupMenu.removePopupMenuListener(PopupMenuListener l) Removes a PopupMenu listener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TableColumnModelListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TableColumnModelListener

Packages that use TableColumnModelListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableColumnModelListener in javax.swing

Classes in javax.swing that implement TableColumnModelListener
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.

Uses of TableColumnModelListener in javax.swing.table

Classes in javax.swing.table that implement TableColumnModelListener
 class JTableHeader
This is the object which manages the header of the JTable.

Methods in javax.swing.table with parameters of type TableColumnModelListener
void | DefaultTableColumnModel.addColumnModelListener(TableColumnModelListener x) Adds a listener for table column model events.
void | DefaultTableColumnModel.removeColumnModelListener(TableColumnModelListener x) Removes a listener for table column model events.
void | TableColumnModel.addColumnModelListener(TableColumnModelListener x) Adds a listener for table column model events.
void | TableColumnModel.removeColumnModelListener(TableColumnModelListener x) Removes a listener for table column model events.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TableModelListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TableModelListener

Packages that use TableModelListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableModelListener in javax.swing

Classes in javax.swing that implement TableModelListener
class | JTable JTable is a user-interface component that presents data in a two-dimensional table format.
protected class | JTable.AccessibleJTable This class implements accessibility support for the JTable class.

Uses of TableModelListener in javax.swing.table

Methods in javax.swing.table with parameters of type TableModelListener
void | AbstractTableModel.addTableModelListener(TableModelListener l) Adds a listener to the list that's notified each time a change to the data model occurs.
void | AbstractTableModel.removeTableModelListener(TableModelListener l) Removes a listener from the list that's notified each time a change to the data model occurs.
void | TableModel.addTableModelListener(TableModelListener l) Adds a listener to the list that is notified each time a change to the data model occurs.
void | TableModel.removeTableModelListener(TableModelListener l) Removes a listener from the list that is notified each time a change to the data model occurs.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TreeExpansionListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TreeExpansionListener

Packages that use TreeExpansionListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of TreeExpansionListener in javax.swing

Classes in javax.swing that implement TreeExpansionListener
protected  class JTree.AccessibleJTree
This class implements accessibility support for the JTree class.

Methods in javax.swing with parameters of type TreeExpansionListener
void | JTree.addTreeExpansionListener(TreeExpansionListener tel) Adds a listener for TreeExpansion events.
void | JTree.removeTreeExpansionListener(TreeExpansionListener tel) Removes a listener for TreeExpansion events.

Uses of TreeExpansionListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement TreeExpansionListener
 class BasicTreeUI.TreeExpansionHandler
Updates the TreeState in response to nodes expanding/collapsing.

Methods in javax.swing.plaf.basic that return TreeExpansionListener
protected  TreeExpansionListener BasicTreeUI.createTreeExpansionListener()
Creates and returns the object responsible for updating the treestate when nodes expanded state changes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TreeModelListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TreeModelListener

Packages that use TreeModelListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeModelListener in javax.swing

Classes in javax.swing that implement TreeModelListener
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.TreeModelHandler Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.

Fields in javax.swing declared as TreeModelListener
protected  TreeModelListener JTree.treeModelListener
Updates the expandedState.

Methods in javax.swing that return TreeModelListener
protected  TreeModelListener JTree.createTreeModelListener()
Creates and returns an instance of TreeModelHandler.

Uses of TreeModelListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement TreeModelListener
 class BasicTreeUI.TreeModelHandler
Forwards all TreeModel events to the TreeState.

Methods in javax.swing.plaf.basic that return TreeModelListener
protected  TreeModelListener BasicTreeUI.createTreeModelListener()
Returns a listener that can update the tree when the model changes.

Uses of TreeModelListener in javax.swing.tree

Methods in javax.swing.tree with parameters of type TreeModelListener
 void TreeModel.addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
 void TreeModel.removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
 void DefaultTreeModel.addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
 void DefaultTreeModel.removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TreeSelectionListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TreeSelectionListener

Packages that use TreeSelectionListener
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeSelectionListener in javax.swing

Classes in javax.swing that implement TreeSelectionListener
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
protected class | JTree.TreeSelectionRedirector Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.

Methods in javax.swing with parameters of type TreeSelectionListener
void | JTree.addTreeSelectionListener(TreeSelectionListener tsl) Adds a listener for TreeSelection events.
void | JTree.removeTreeSelectionListener(TreeSelectionListener tsl) Removes a TreeSelection listener.

Uses of TreeSelectionListener in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement TreeSelectionListener
 class BasicTreeUI.TreeSelectionHandler
Listens for changes in the selection model and updates the display accordingly.

Methods in javax.swing.plaf.basic that return TreeSelectionListener
protected  TreeSelectionListener BasicTreeUI.createTreeSelectionListener()
Creates the listener that updates the display based on selection change methods.

Uses of TreeSelectionListener in javax.swing.tree

Classes in javax.swing.tree that implement TreeSelectionListener
 class DefaultTreeCellEditor
A TreeCellEditor.

Methods in javax.swing.tree with parameters of type TreeSelectionListener
void | DefaultTreeSelectionModel.addTreeSelectionListener(TreeSelectionListener x) Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
void | DefaultTreeSelectionModel.removeTreeSelectionListener(TreeSelectionListener x) Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
void | TreeSelectionModel.addTreeSelectionListener(TreeSelectionListener x) Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
void | TreeSelectionModel.removeTreeSelectionListener(TreeSelectionListener x) Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.TreeWillExpandListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.TreeWillExpandListener

Packages that use TreeWillExpandListener
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of TreeWillExpandListener in javax.swing

Methods in javax.swing with parameters of type TreeWillExpandListener
void | JTree.addTreeWillExpandListener(TreeWillExpandListener tel) Adds a listener for TreeWillExpand events.
void | JTree.removeTreeWillExpandListener(TreeWillExpandListener tel) Removes a listener for TreeWillExpand events.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.event.UndoableEditListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.event.UndoableEditListener

Packages that use UndoableEditListener
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of UndoableEditListener in javax.swing.text

Methods in javax.swing.text with parameters of type UndoableEditListener
void | Document.addUndoableEditListener(UndoableEditListener listener) Registers the given observer to begin receiving notifications when undoable edits are made to the document.
void | Document.removeUndoableEditListener(UndoableEditListener listener) Unregisters the given observer from the notification list so it will no longer receive updates.
void | AbstractDocument.addUndoableEditListener(UndoableEditListener listener) Adds an undo listener for notification of any changes.
void | AbstractDocument.removeUndoableEditListener(UndoableEditListener listener) Removes an undo listener.

Uses of UndoableEditListener in javax.swing.undo

Classes in javax.swing.undo that implement UndoableEditListener
 class UndoManager
Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Methods in javax.swing.undo with parameters of type UndoableEditListener
void | UndoableEditSupport.addUndoableEditListener(UndoableEditListener l) Registers an UndoableEditListener.
void | UndoableEditSupport.removeUndoableEditListener(UndoableEditListener l) Removes an UndoableEditListener.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DocumentEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface DocumentEvent

All Known Implementing Classes:
AbstractDocument.DefaultDocumentEvent
public interface DocumentEvent

Interface for document change notifications. This provides detailed information to Document observers about how the Document changed. It provides high level information such as type of change and where it occured, as well as the more detailed structural changes (What Elements were inserted and removed).

See Also:
Document, DocumentListener

Inner Class Summary
static interface | DocumentEvent.ElementChange Describes changes made to a specific element.
static class | DocumentEvent.EventType Enumeration for document event types
Method Summary
DocumentEvent.ElementChange | getChange(Element elem) Gets the change information for the given element.
Document | getDocument() Gets the document that sourced the change event.
int | getLength() Returns the length of the change.
int | getOffset() Returns the offset within the document of the start of the change.
DocumentEvent.EventType | getType() Gets the type of event.

Method Detail

getOffset

public int getOffset()
Returns the offset within the document of the start of the change.
Returns:
the offset >= 0

getLength

public int getLength()
Returns the length of the change.
Returns:
the length >= 0

getDocument

public Document getDocument()
Gets the document that sourced the change event.

getType

public DocumentEvent.EventType getType()
Gets the type of event.
Returns:
the type

getChange

public DocumentEvent.ElementChange getChange(Element elem)
Gets the change information for the given element. The change information describes what elements were added and removed and the location. If there were no changes, null is returned.

This method is for observers to discover the structural changes that were made. This means that only elements that existed prior to the mutation (and still exist after the mutatino) need to have ElementChange records. The changes made available need not be recursive.

For example, if the an element is removed from it's parent, this method should report that the parent changed and provide an ElementChange implementation that describes the change to the parent. If the child element removed had children, these elements do not need to be reported as removed.

If an child element is insert into a parent element, the parent element should report a change. If the child element also had elements inserted into it (grandchildren to the parent) these elements need not report change.

Parameters:
elem - the element
Returns:
the change information, or null if the element was not modified
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocumentListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface DocumentListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTextComponent.AccessibleJTextComponent
public interface DocumentListener
extends EventListener

Interface for an observer to register to receive notifications of changes to a text document.

The default implementation of the Document interface (AbstractDocument) supports asynchronous mutations. If this feature is used (i.e. mutations are made from a thread other than the Swing event thread), the listeners will be notified via the mutating thread. This means that if asynchronous updates are made, the implementation of this interface must be threadsafe!

The DocumentEvent notification is based upon the JavaBeans event model. There is no guarantee about the order of delivery to listeners, and all listeners must be notified prior to making further mutations to the Document. This means implementations of the DocumentListener may not mutate the source of the event (i.e. the associated Document).

See Also:
Document, StyledDocument, DocumentEvent

Method Summary
void | changedUpdate(DocumentEvent e) Gives notification that an attribute or set of attributes changed.
void | insertUpdate(DocumentEvent e) Gives notification that there was an insert into the document.
void | removeUpdate(DocumentEvent e) Gives notification that a portion of the document has been removed.

Method Detail

insertUpdate

public void insertUpdate(DocumentEvent e)
Gives notification that there was an insert into the document. The range given by the DocumentEvent bounds the freshly inserted region.
Parameters:
e - the document event

removeUpdate

public void removeUpdate(DocumentEvent e)
Gives notification that a portion of the document has been removed. The range is given in terms of what the view last saw (that is, before updating sticky positions).
Parameters:
e - the document event

changedUpdate

public void changedUpdate(DocumentEvent e)
Gives notification that an attribute or set of attributes changed.
Parameters:
e - the document event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ElementChange

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface DocumentEvent.ElementChange

All Known Implementing Classes:
AbstractDocument.ElementEdit
Enclosing class:
DocumentEvent
public static interface DocumentEvent.ElementChange

Describes changes made to a specific element.

Method Summary
Element[] | getChildrenAdded() Gets the child elements that were added to the given parent element.
Element[] | getChildrenRemoved() Gets the child elements that were removed from the given parent element.
Element | getElement() Returns the element represented.
int | getIndex() Fetches the index within the element represented.

Method Detail

getElement

public Element getElement()
Returns the element represented. This is the element that was changed.
Returns:
the element

getIndex

public int getIndex()
Fetches the index within the element represented. This is the location that children were added and/or removed.
Returns:
the index >= 0

getChildrenRemoved

public Element[] getChildrenRemoved()
Gets the child elements that were removed from the given parent element. The element array returned is sorted in the order that the elements used to lie in the document, and must be contiguous.
Returns:
the child elements

getChildrenAdded

public Element[] getChildrenAdded()
Gets the child elements that were added to the given parent element. The element array returned is in the order that the elements lie in the document, and must be contiguous.
Returns:
the child elements
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventListenerList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class EventListenerList

java.lang.Object
  |
  +--javax.swing.event.EventListenerList
All Implemented Interfaces:
Serializable
public class EventListenerList
extends Object
implements Serializable

A class that holds a list of EventListeners. A single instance can be used to hold all listeners (of all types) for the instance using the list. It is the responsiblity of the class using the EventListenerList to provide type-safe API (preferably conforming to the JavaBeans spec) and methods which dispatch event notification methods to appropriate Event Listeners on the list. The main benefits that this class provides are that it is relatively cheap in the case of no listeners, and it provides serialization for event-listener lists in a single place, as well as a degree of MT safety (when used correctly). Usage example: Say one is defining a class that sends out FooEvents, and one wants to allow users of the class to register FooListeners and receive notification when FooEvents occur. The following should be added to the class definition:

 EventListenerList listenerList = new EventListenerList();
 FooEvent fooEvent = null;

 public void addFooListener(FooListener l) {
     listenerList.add(FooListener.class, l);
 }

 public void removeFooListener(FooListener l) {
     listenerList.remove(FooListener.class, l);
 }

 // Notify all listeners that have registered interest for
 // notification on this event type.  The event instance
 // is lazily created using the parameters passed into
 // the fire method.

 protected void fireFooXXX() {
     // Guaranteed to return a non-null array
     Object[] listeners = listenerList.getListenerList();
     // Process the listeners last to first, notifying
     // those that are interested in this event
     for (int i = listeners.length-2; i>=0; i-=2) {
         if (listeners[i]==FooListener.class) {
             // Lazily create the event:
             if (fooEvent == null)
                 fooEvent = new FooEvent(this);
             ((FooListener)listeners[i+1]).fooXXX(fooEvent);
         }
     }
 }
foo should be changed to the appropriate name, and fireFooXxx to the appropriate method name. One fire method should exist for each notification method in the FooListener interface.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  Object[] listenerList
Constructor Summary
EventListenerList()
Method Summary
void | add(Class t, EventListener l) Adds the listener as a listener of the specified type.
int | getListenerCount() Returns the total number of listeners for this listener list.
int | getListenerCount(Class t) Returns the total number of listeners of the supplied type for this listener list.
Object[] | getListenerList() Passes back the event listener list as an array of ListenerType-listener pairs.
EventListener[] | getListeners(Class t) Return an array of all the listeners of the given type.
void | remove(Class t, EventListener l) Removes the listener as a listener of the specified type.
String | toString() Returns a string representation of the EventListenerList.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

listenerList

protected transient Object[] listenerList
Constructor Detail

EventListenerList

public EventListenerList()
Method Detail

getListenerList

public Object[] getListenerList()
Passes back the event listener list as an array of ListenerType-listener pairs. Note that for performance reasons, this implementation passes back the actual data structure in which the listener data is stored internally! This method is guaranteed to pass back a non-null array, so that no null-checking is required in fire methods. A zero-length array of Object should be returned if there are currently no listeners. WARNING!!! Absolutely NO modification of the data contained in this array should be made -- if any such manipulation is necessary, it should be done on a copy of the array returned rather than the array itself.

getListeners

public EventListener[] getListeners(Class t)
Return an array of all the listeners of the given type.
Since:
1.3

getListenerCount

public int getListenerCount()
Returns the total number of listeners for this listener list.

getListenerCount

public int getListenerCount(Class t)
Returns the total number of listeners of the supplied type for this listener list.

add

public void add(Class t,
                EventListener l)
Adds the listener as a listener of the specified type.
Parameters:
t - the type of the listener to be added
l - the listener to be added

remove

public void remove(Class t,
                   EventListener l)
Removes the listener as a listener of the specified type.
Parameters:
t - the type of the listener to be removed
l - the listener to be removed

toString

public String toString()
Returns a string representation of the EventListenerList.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class DocumentEvent.EventType

java.lang.Object
  |
  +--javax.swing.event.DocumentEvent.EventType
Enclosing class:
DocumentEvent
public static final class DocumentEvent.EventType
extends Object

Enumeration for document event types

Field Summary
static DocumentEvent.EventType | CHANGE Change type.
static DocumentEvent.EventType | INSERT Insert type.
static DocumentEvent.EventType | REMOVE Remove type.
Method Summary
 String toString()
Converts the type to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

INSERT

public static final DocumentEvent.EventType INSERT
Insert type.

REMOVE

public static final DocumentEvent.EventType REMOVE
Remove type.

CHANGE

public static final DocumentEvent.EventType CHANGE
Change type.
Method Detail

toString

public String toString()
Converts the type to a string.
Overrides:
toString in class Object
Returns:
the string
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class HyperlinkEvent.EventType

java.lang.Object
  |
  +--javax.swing.event.HyperlinkEvent.EventType
Enclosing class:
HyperlinkEvent
public static final class HyperlinkEvent.EventType
extends Object

Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().

Field Summary
static HyperlinkEvent.EventType | ACTIVATED Activated type.
static HyperlinkEvent.EventType | ENTERED Entered type.
static HyperlinkEvent.EventType | EXITED Exited type.
Method Summary
 String toString()
Converts the type to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ENTERED

public static final HyperlinkEvent.EventType ENTERED
Entered type.

EXITED

public static final HyperlinkEvent.EventType EXITED
Exited type.

ACTIVATED

public static final HyperlinkEvent.EventType ACTIVATED
Activated type.
Method Detail

toString

public String toString()
Converts the type to a string.
Overrides:
toString in class Object
Returns:
the string
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HyperlinkEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class HyperlinkEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.HyperlinkEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HTMLFrameHyperlinkEvent
public class HyperlinkEvent
extends EventObject

HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
static class HyperlinkEvent.EventType
Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString().
Fields inherited from class java.util.EventObject
source
Constructor Summary
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u)
Creates a new object representing a hypertext link event.
HyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL u, String desc)
Creates a new object representing a hypertext link event.
Method Summary
String | getDescription() Get the description of the link as a string.
HyperlinkEvent.EventType | getEventType() Gets the type of event.
URL | getURL() Gets the URL that the link refers to.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

HyperlinkEvent

public HyperlinkEvent(Object source,
                      HyperlinkEvent.EventType type,
                      URL u)
Creates a new object representing a hypertext link event. The other constructor is preferred, as it provides more information if a URL could not be formed. This constructor is primarily for backward compatibility.
Parameters:
source - the object responsible for the event
type - the event type
u - the affected URL

HyperlinkEvent

public HyperlinkEvent(Object source,
                      HyperlinkEvent.EventType type,
                      URL u,
                      String desc)
Creates a new object representing a hypertext link event.
Parameters:
source - the object responsible for the event
type - the event type
u - the affected URL. This may be null if a valid URL could not be created.
desc - the description of the link. This may be useful when attempting to form a URL resulted in a MalformedURLException. The description provides the text used when attempting to form the URL.
Method Detail

getEventType

public HyperlinkEvent.EventType getEventType()
Gets the type of event.
Returns:
the type

getDescription

public String getDescription()
Get the description of the link as a string. This may be useful if a URL can't be formed from the description, in which case the associated URL would be null.

getURL

public URL getURL()
Gets the URL that the link refers to.
Returns:
the URL
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HyperlinkListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface HyperlinkListener

All Superinterfaces:
EventListener
public interface HyperlinkListener
extends EventListener

HyperlinkListener

Method Summary
 void hyperlinkUpdate(HyperlinkEvent e)
Called when a hypertext link is updated.

Method Detail

hyperlinkUpdate

public void hyperlinkUpdate(HyperlinkEvent e)
Called when a hypertext link is updated.
Parameters:
e - the event responsible for the update
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class InternalFrameAdapter

java.lang.Object
  |
  +--javax.swing.event.InternalFrameAdapter
All Implemented Interfaces:
EventListener, InternalFrameListener
public abstract class InternalFrameAdapter
extends Object
implements InternalFrameListener

An abstract adapter class for receiving internal frame events. The methods in this class are empty. This class exists as convenience for creating listener objects, and is functionally equivalent to the WindowAdapter class in the AWT.

See How to Write an Internal Frame Listener in The Java Tutorial and The Java Class Libraries (update)

See Also:
InternalFrameEvent, InternalFrameListener, WindowListener

Constructor Summary
InternalFrameAdapter()
Method Summary
void | internalFrameActivated(InternalFrameEvent e) Invoked when an internal frame is activated.
void | internalFrameClosed(InternalFrameEvent e) Invoked when an internal frame has been closed.
void | internalFrameClosing(InternalFrameEvent e) Invoked when an internal frame is in the process of being closed.
void | internalFrameDeactivated(InternalFrameEvent e) Invoked when an internal frame is de-activated.
void | internalFrameDeiconified(InternalFrameEvent e) Invoked when an internal frame is de-iconified.
void | internalFrameIconified(InternalFrameEvent e) Invoked when an internal frame is iconified.
void | internalFrameOpened(InternalFrameEvent e) Invoked when an internal frame has been opened.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InternalFrameAdapter

public InternalFrameAdapter()
Method Detail

internalFrameOpened

public void internalFrameOpened(InternalFrameEvent e)
Invoked when an internal frame has been opened.
Specified by:
internalFrameOpened in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.show()

internalFrameClosing

public void internalFrameClosing(InternalFrameEvent e)
Invoked when an internal frame is in the process of being closed. The close operation can be overridden at this point.
Specified by:
internalFrameClosing in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setDefaultCloseOperation(int)

internalFrameClosed

public void internalFrameClosed(InternalFrameEvent e)
Invoked when an internal frame has been closed.
Specified by:
internalFrameClosed in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setClosed(boolean)

internalFrameIconified

public void internalFrameIconified(InternalFrameEvent e)
Invoked when an internal frame is iconified.
Specified by:
internalFrameIconified in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setIcon(boolean)

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent e)
Invoked when an internal frame is de-iconified.
Specified by:
internalFrameDeiconified in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setIcon(boolean)

internalFrameActivated

public void internalFrameActivated(InternalFrameEvent e)
Invoked when an internal frame is activated.
Specified by:
internalFrameActivated in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setSelected(boolean)

internalFrameDeactivated

public void internalFrameDeactivated(InternalFrameEvent e)
Invoked when an internal frame is de-activated.
Specified by:
internalFrameDeactivated in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setSelected(boolean)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class InternalFrameEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--javax.swing.event.InternalFrameEvent
All Implemented Interfaces:
Serializable
public class InternalFrameEvent
extends AWTEvent

InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source. This class has the same event types as WindowEvent, although different ids are used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
WindowEvent, WindowListener, Serialized Form

Field Summary
static int | INTERNAL_FRAME_ACTIVATED The window activated event type.
static int | INTERNAL_FRAME_CLOSED The window closed event.
static int | INTERNAL_FRAME_CLOSING The "window is closing" event.
static int | INTERNAL_FRAME_DEACTIVATED The window deactivated event type.
static int | INTERNAL_FRAME_DEICONIFIED The window deiconified event type.
static int | INTERNAL_FRAME_FIRST The first number in the range of ids used for window events.
static int | INTERNAL_FRAME_ICONIFIED The window iconified event.
static int | INTERNAL_FRAME_LAST The last number in the range of ids used for window events.
static int | INTERNAL_FRAME_OPENED The window opened event.
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
InternalFrameEvent(JInternalFrame source, int id)
Constructs a InternalFrameEvent object.
Method Summary
JInternalFrame | getInternalFrame() Returns the originator of the event.
String | paramString() Returns a parameter string identifying this event.
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

INTERNAL_FRAME_FIRST

public static final int INTERNAL_FRAME_FIRST
The first number in the range of ids used for window events.

INTERNAL_FRAME_LAST

public static final int INTERNAL_FRAME_LAST
The last number in the range of ids used for window events.

INTERNAL_FRAME_OPENED

public static final int INTERNAL_FRAME_OPENED
The window opened event. This event is delivered only the first time a window is made visible.

INTERNAL_FRAME_CLOSING

public static final int INTERNAL_FRAME_CLOSING
The "window is closing" event. This event is delivered when the user selects "Quit" from the window's system menu. If the program does not explicitly hide or destroy the window as while processing this event, the window close operation will be canceled.

INTERNAL_FRAME_CLOSED

public static final int INTERNAL_FRAME_CLOSED
The window closed event. This event is delivered after the window has been closed as the result of a call to hide or destroy.

INTERNAL_FRAME_ICONIFIED

public static final int INTERNAL_FRAME_ICONIFIED
The window iconified event. This event indicates that the window was shrunk down to a small icon.

INTERNAL_FRAME_DEICONIFIED

public static final int INTERNAL_FRAME_DEICONIFIED
The window deiconified event type. This event indicates that the window has been restored to its normal size.

INTERNAL_FRAME_ACTIVATED

public static final int INTERNAL_FRAME_ACTIVATED
The window activated event type. This event indicates that keystrokes and mouse clicks are directed towards this window.

INTERNAL_FRAME_DEACTIVATED

public static final int INTERNAL_FRAME_DEACTIVATED
The window deactivated event type. This event indicates that keystrokes and mouse clicks are no longer directed to the window.
Constructor Detail

InternalFrameEvent

public InternalFrameEvent(JInternalFrame source,
                          int id)
Constructs a InternalFrameEvent object.
Parameters:
source - the JInternalFrame object that originated the event
id - an integer indicating the type of event
Method Detail

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class AWTEvent
Returns:
a string identifying the event and its attributes

getInternalFrame

public JInternalFrame getInternalFrame()
Returns the originator of the event.
Returns:
the JInternalFrame object that originated the event
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface InternalFrameListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
InternalFrameAdapter, BasicInternalFrameUI.BasicInternalFrameListener
public interface InternalFrameListener
extends EventListener

The listener interface for receiving internal frame events. This class is functionally equivalent to the WindowListener class in the AWT.

See How to Write an Internal Frame Listener in The Java Tutorial and The Java Class Libraries (update) for further documentation.

See Also:
WindowListener

Method Summary
void | internalFrameActivated(InternalFrameEvent e) Invoked when an internal frame is activated.
void | internalFrameClosed(InternalFrameEvent e) Invoked when an internal frame has been closed.
void | internalFrameClosing(InternalFrameEvent e) Invoked when an internal frame is in the process of being closed.
void | internalFrameDeactivated(InternalFrameEvent e) Invoked when an internal frame is de-activated.
void | internalFrameDeiconified(InternalFrameEvent e) Invoked when an internal frame is de-iconified.
void | internalFrameIconified(InternalFrameEvent e) Invoked when an internal frame is iconified.
void | internalFrameOpened(InternalFrameEvent e) Invoked when a internal frame has been opened.

Method Detail

internalFrameOpened

public void internalFrameOpened(InternalFrameEvent e)
Invoked when a internal frame has been opened.
See Also:
JInternalFrame.show()

internalFrameClosing

public void internalFrameClosing(InternalFrameEvent e)
Invoked when an internal frame is in the process of being closed. The close operation can be overridden at this point.
See Also:
JInternalFrame.setDefaultCloseOperation(int)

internalFrameClosed

public void internalFrameClosed(InternalFrameEvent e)
Invoked when an internal frame has been closed.
See Also:
JInternalFrame.setClosed(boolean)

internalFrameIconified

public void internalFrameIconified(InternalFrameEvent e)
Invoked when an internal frame is iconified.
See Also:
JInternalFrame.setIcon(boolean)

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent e)
Invoked when an internal frame is de-iconified.
See Also:
JInternalFrame.setIcon(boolean)

internalFrameActivated

public void internalFrameActivated(InternalFrameEvent e)
Invoked when an internal frame is activated.
See Also:
JInternalFrame.setSelected(boolean)

internalFrameDeactivated

public void internalFrameDeactivated(InternalFrameEvent e)
Invoked when an internal frame is de-activated.
See Also:
JInternalFrame.setSelected(boolean)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListDataEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class ListDataEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.ListDataEvent
All Implemented Interfaces:
Serializable
public class ListDataEvent
extends EventObject

Defines an event that encapsulates changes to a list.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
static int | CONTENTS_CHANGED Identifies one or more changes in the lists contents.
static int | INTERVAL_ADDED Identifies the addition of one or more contiguous items to the list
static int | INTERVAL_REMOVED Identifies the removal of one or more contiguous items from the list
Fields inherited from class java.util.EventObject
source
Constructor Summary
ListDataEvent(Object source, int type, int index0, int index1)
Constructs a ListDataEvent object.
Method Summary
int | getIndex0() Returns the lower index of the range.
int | getIndex1() Returns the upper index of the range.
int | getType() Returns the event type.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

CONTENTS_CHANGED

public static final int CONTENTS_CHANGED
Identifies one or more changes in the lists contents.

INTERVAL_ADDED

public static final int INTERVAL_ADDED
Identifies the addition of one or more contiguous items to the list

INTERVAL_REMOVED

public static final int INTERVAL_REMOVED
Identifies the removal of one or more contiguous items from the list
Constructor Detail

ListDataEvent

public ListDataEvent(Object source,
                     int type,
                     int index0,
                     int index1)
Constructs a ListDataEvent object.
Parameters:
source - the source Object (typically this)
type - an int specifying CONTENTS_CHANGED, INTERVAL_ADDED, or INTERVAL_REMOVED
index0 - an int specifying the bottom of a range
index1 - an int specifying the top of a range
Method Detail

getType

public int getType()
Returns the event type. The possible values are:
  • CONTENTS_CHANGED
  • INTERVAL_ADDED
  • INTERVAL_REMOVED
Returns:
an int representing the type value

getIndex0

public int getIndex0()
Returns the lower index of the range. For a single element, this value is the same as that returned by getIndex1().
Returns:
an int representing the lower index value

getIndex1

public int getIndex1()
Returns the upper index of the range. For a single element, this value is the same as that returned by getIndex0().
Returns:
an int representing the upper index value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListDataListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface ListDataListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JComboBox, JList.AccessibleJList, BasicComboPopup.ListDataHandler, BasicListUI.ListDataHandler, BasicComboBoxUI.ListDataHandler
public interface ListDataListener
extends EventListener

ListDataListener

Method Summary
void | contentsChanged(ListDataEvent e) Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
void | intervalAdded(ListDataEvent e) Sent after the indices in the index0,index1 interval have been inserted in the data model.
void | intervalRemoved(ListDataEvent e) Sent after the indices in the index0,index1 interval have been removed from the data model.

Method Detail

intervalAdded

public void intervalAdded(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.
Parameters:
e - a ListDataEvent encapuslating the event information

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.
Parameters:
e - a ListDataEvent encapuslating the event information

contentsChanged

public void contentsChanged(ListDataEvent e)
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. Index0 and index1 bracket the change.
Parameters:
e - a ListDataEvent encapuslating the event information
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListSelectionEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class ListSelectionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.ListSelectionEvent
All Implemented Interfaces:
Serializable
public class ListSelectionEvent
extends EventObject

An event that characterizes a change in the current selection. The change is limited to a row interval. ListSelectionListeners will generally query the source of the event for the new selected status of each potentially changed row.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
ListSelectionModel, Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
Represents a change in selection status between firstIndex and lastIndex inclusive (firstIndex is less than or equal to lastIndex).
Method Summary
int | getFirstIndex() Returns the index of the first row whose selection may have changed.
int | getLastIndex() Returns the index of the last row whose selection may have changed.
boolean | getValueIsAdjusting() Returns true if this is one of multiple change events.
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ListSelectionEvent

public ListSelectionEvent(Object source,
                          int firstIndex,
                          int lastIndex,
                          boolean isAdjusting)
Represents a change in selection status between firstIndex and lastIndex inclusive (firstIndex is less than or equal to lastIndex). Atleast one of the rows within the range will have changed, a good ListSelectionModel implementation will keep the range as small as possible.
Parameters:
firstIndex - The first index that changed.
lastIndex - The last index that changed, lastIndex >= firstIndex.
isAdjusting - An indication that this is one of rapid a series of events
Method Detail

getFirstIndex

public int getFirstIndex()
Returns the index of the first row whose selection may have changed.
Returns:
The first row whose selection value may have changed, where zero is the first row

getLastIndex

public int getLastIndex()
Returns the index of the last row whose selection may have changed.
Returns:
The last row whose selection value may have changed, where zero is the first row

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns true if this is one of multiple change events.
Returns:
true if this is one of a rapid series of events

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class EventObject
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListSelectionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface ListSelectionListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JList.AccessibleJList, JTable, JTable.AccessibleJTable, DefaultTableColumnModel, BasicComboPopup.ListSelectionHandler, BasicFileChooserUI.SelectionListener, BasicListUI.ListSelectionHandler
public interface ListSelectionListener
extends EventListener

The listener that's notified when a lists selection value changes.

See Also:
ListSelectionModel

Method Summary
 void valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes.

Method Detail

valueChanged

public void valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes.
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuDragMouseEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class MenuDragMouseEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.InputEvent
                          |
                          +--java.awt.event.MouseEvent
                                |
                                +--javax.swing.event.MenuDragMouseEvent
All Implemented Interfaces:
Serializable
public class MenuDragMouseEvent
extends MouseEvent

MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.awt.event.MouseEvent
MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED
Fields inherited from class java.awt.event.InputEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuDragMouseEvent object.
Method Summary
MenuSelectionManager | getMenuSelectionManager() Returns the current menu selection manager.
MenuElement[] | getPath() Returns the path to the selected menu item.
Methods inherited from class java.awt.event.MouseEvent
getClickCount, getPoint, getX, getY, isPopupTrigger, paramString, translatePoint
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuDragMouseEvent

public MenuDragMouseEvent(Component source,
                          int id,
                          long when,
                          int modifiers,
                          int x,
                          int y,
                          int clickCount,
                          boolean popupTrigger,
                          MenuElement[] p,
                          MenuSelectionManager m)
Constructs a MenuDragMouseEvent object.
Parameters:
source - the Component that originated the event (typically this)
id - an int specifying the type of event, as defined in MouseEvent
when - a long identifying the time the event occurred
modifiers - an int specifying any modifier keys held down, as specified in InputEvent
x - an int specifying the horizontal position at which the event occurred, in pixels
y - an int specifying the vertical position at which the event occurred, in pixels
clickCount - an int specifying the number of mouse-clicks
popupTrigger - a boolean -- true if the event {should?/did?} trigger a popup
p - an array of MenuElement objects specifying a path to a menu item affected by the drag
m - a MenuSelectionManager object that handles selections
Method Detail

getPath

public MenuElement[] getPath()
Returns the path to the selected menu item.
Returns:
an array of MenuElement objects representing the path value

getMenuSelectionManager

public MenuSelectionManager getMenuSelectionManager()
Returns the current menu selection manager.
Returns:
a MenuSelectionManager object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuDragMouseListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface MenuDragMouseListener

All Superinterfaces:
EventListener
public interface MenuDragMouseListener
extends EventListener

Defines a menu mouse-drag listener.

Method Summary
void | menuDragMouseDragged(MenuDragMouseEvent e) Invoked when the mouse is being dragged in a menu component's display area.
void | menuDragMouseEntered(MenuDragMouseEvent e) Invoked when the dragged mouse has entered a menu component's display area.
void | menuDragMouseExited(MenuDragMouseEvent e) Invoked when the dragged mouse has left a menu component's display area.
void | menuDragMouseReleased(MenuDragMouseEvent e) Invoked when a dragged mouse is release in a menu component's display area.

Method Detail

menuDragMouseEntered

public void menuDragMouseEntered(MenuDragMouseEvent e)
Invoked when the dragged mouse has entered a menu component's display area.
Parameters:
e - a MenuDragMouseEvent object

menuDragMouseExited

public void menuDragMouseExited(MenuDragMouseEvent e)
Invoked when the dragged mouse has left a menu component's display area.
Parameters:
e - a MenuDragMouseEvent object

menuDragMouseDragged

public void menuDragMouseDragged(MenuDragMouseEvent e)
Invoked when the mouse is being dragged in a menu component's display area.
Parameters:
e - a MenuDragMouseEvent object

menuDragMouseReleased

public void menuDragMouseReleased(MenuDragMouseEvent e)
Invoked when a dragged mouse is release in a menu component's display area.
Parameters:
e - a MenuDragMouseEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class MenuEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.MenuEvent
All Implemented Interfaces:
Serializable
public class MenuEvent
extends EventObject

MenuEvent is used to notify interested parties that the menu which is the event source has been posted, selected, or canceled.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
MenuEvent(Object source)
Constructs a MenuEvent object.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuEvent

public MenuEvent(Object source)
Constructs a MenuEvent object.
Parameters:
source - the Object that originated the event (typically this)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuKeyEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class MenuKeyEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ComponentEvent
                    |
                    +--java.awt.event.InputEvent
                          |
                          +--java.awt.event.KeyEvent
                                |
                                +--javax.swing.event.MenuKeyEvent
All Implemented Interfaces:
Serializable
public class MenuKeyEvent
extends KeyEvent

MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.awt.event.KeyEvent
CHAR_UNDEFINED, KEY_FIRST, KEY_LAST, KEY_PRESSED, KEY_RELEASED, KEY_TYPED, VK_0, VK_1, VK_2, VK_3, VK_4, VK_5, VK_6, VK_7, VK_8, VK_9, VK_A, VK_ACCEPT, VK_ADD, VK_AGAIN, VK_ALL_CANDIDATES, VK_ALPHANUMERIC, VK_ALT, VK_ALT_GRAPH, VK_AMPERSAND, VK_ASTERISK, VK_AT, VK_B, VK_BACK_QUOTE, VK_BACK_SLASH, VK_BACK_SPACE, VK_BRACELEFT, VK_BRACERIGHT, VK_C, VK_CANCEL, VK_CAPS_LOCK, VK_CIRCUMFLEX, VK_CLEAR, VK_CLOSE_BRACKET, VK_CODE_INPUT, VK_COLON, VK_COMMA, VK_COMPOSE, VK_CONTROL, VK_CONVERT, VK_COPY, VK_CUT, VK_D, VK_DEAD_ABOVEDOT, VK_DEAD_ABOVERING, VK_DEAD_ACUTE, VK_DEAD_BREVE, VK_DEAD_CARON, VK_DEAD_CEDILLA, VK_DEAD_CIRCUMFLEX, VK_DEAD_DIAERESIS, VK_DEAD_DOUBLEACUTE, VK_DEAD_GRAVE, VK_DEAD_IOTA, VK_DEAD_MACRON, VK_DEAD_OGONEK, VK_DEAD_SEMIVOICED_SOUND, VK_DEAD_TILDE, VK_DEAD_VOICED_SOUND, VK_DECIMAL, VK_DELETE, VK_DIVIDE, VK_DOLLAR, VK_DOWN, VK_E, VK_END, VK_ENTER, VK_EQUALS, VK_ESCAPE, VK_EURO_SIGN, VK_EXCLAMATION_MARK, VK_F, VK_F1, VK_F10, VK_F11, VK_F12, VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F2, VK_F20, VK_F21, VK_F22, VK_F23, VK_F24, VK_F3, VK_F4, VK_F5, VK_F6, VK_F7, VK_F8, VK_F9, VK_FINAL, VK_FIND, VK_FULL_WIDTH, VK_G, VK_GREATER, VK_H, VK_HALF_WIDTH, VK_HELP, VK_HIRAGANA, VK_HOME, VK_I, VK_INPUT_METHOD_ON_OFF, VK_INSERT, VK_INVERTED_EXCLAMATION_MARK, VK_J, VK_JAPANESE_HIRAGANA, VK_JAPANESE_KATAKANA, VK_JAPANESE_ROMAN, VK_K, VK_KANA, VK_KANA_LOCK, VK_KANJI, VK_KATAKANA, VK_KP_DOWN, VK_KP_LEFT, VK_KP_RIGHT, VK_KP_UP, VK_L, VK_LEFT, VK_LEFT_PARENTHESIS, VK_LESS, VK_M, VK_META, VK_MINUS, VK_MODECHANGE, VK_MULTIPLY, VK_N, VK_NONCONVERT, VK_NUM_LOCK, VK_NUMBER_SIGN, VK_NUMPAD0, VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7, VK_NUMPAD8, VK_NUMPAD9, VK_O, VK_OPEN_BRACKET, VK_P, VK_PAGE_DOWN, VK_PAGE_UP, VK_PASTE, VK_PAUSE, VK_PERIOD, VK_PLUS, VK_PREVIOUS_CANDIDATE, VK_PRINTSCREEN, VK_PROPS, VK_Q, VK_QUOTE, VK_QUOTEDBL, VK_R, VK_RIGHT, VK_RIGHT_PARENTHESIS, VK_ROMAN_CHARACTERS, VK_S, VK_SCROLL_LOCK, VK_SEMICOLON, VK_SEPARATER, VK_SHIFT, VK_SLASH, VK_SPACE, VK_STOP, VK_SUBTRACT, VK_T, VK_TAB, VK_U, VK_UNDEFINED, VK_UNDERSCORE, VK_UNDO, VK_UP, VK_V, VK_W, VK_X, VK_Y, VK_Z
Fields inherited from class java.awt.event.InputEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
Fields inherited from class java.util.EventObject
source
Constructor Summary
MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)
Constructs a MenuKeyEvent object.
Method Summary
MenuSelectionManager | getMenuSelectionManager() Returns the current menu selection manager.
MenuElement[] | getPath() Returns the path to the menu item referenced by this event.
Methods inherited from class java.awt.event.KeyEvent
getKeyChar, getKeyCode, getKeyModifiersText, getKeyText, isActionKey, paramString, setKeyChar, setKeyCode, setModifiers, setSource
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.awt.AWTEvent
finalize, getID, toString
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MenuKeyEvent

public MenuKeyEvent(Component source,
                    int id,
                    long when,
                    int modifiers,
                    int keyCode,
                    char keyChar,
                    MenuElement[] p,
                    MenuSelectionManager m)
Constructs a MenuKeyEvent object.
Parameters:
source - the Component that originated the event (typically this)
id - an int specifying the type of event, as defined in KeyEvent
when - a long identifying the time the event occurred
modifiers - an int specifying any modifier keys held down, as specified in InputEvent
keyCode - an int specifying the specific key that was pressed
keyChar - a char specifying the key's character value, if any -- null if the key has no character value
p - an array of MenuElement objects specifying a path to a menu item affected by the drag
m - a MenuSelectionManager object that handles selections
Method Detail

getPath

public MenuElement[] getPath()
Returns the path to the menu item referenced by this event.
Returns:
an array of MenuElement objects representing the path value

getMenuSelectionManager

public MenuSelectionManager getMenuSelectionManager()
Returns the current menu selection manager.
Returns:
a MenuSelectionManager object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuKeyListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface MenuKeyListener

All Superinterfaces:
EventListener
public interface MenuKeyListener
extends EventListener

MenuKeyListener

Method Summary
void | menuKeyPressed(MenuKeyEvent e) Invoked when a key has been pressed.
void | menuKeyReleased(MenuKeyEvent e) Invoked when a key has been released.
void | menuKeyTyped(MenuKeyEvent e) Invoked when a key has been typed.

Method Detail

menuKeyTyped

public void menuKeyTyped(MenuKeyEvent e)
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.

menuKeyPressed

public void menuKeyPressed(MenuKeyEvent e)
Invoked when a key has been pressed.

menuKeyReleased

public void menuKeyReleased(MenuKeyEvent e)
Invoked when a key has been released.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface MenuListener

All Superinterfaces:
EventListener
public interface MenuListener
extends EventListener

Defines a listener for menu events.

Method Summary
void | menuCanceled(MenuEvent e) Invoked when the menu is canceled.
void | menuDeselected(MenuEvent e) Invoked when the menu is deselected.
void | menuSelected(MenuEvent e) Invoked when a menu is selected.

Method Detail

menuSelected

public void menuSelected(MenuEvent e)
Invoked when a menu is selected.
Parameters:
e - a MenuEvent object

menuDeselected

public void menuDeselected(MenuEvent e)
Invoked when the menu is deselected.
Parameters:
e - a MenuEvent object

menuCanceled

public void menuCanceled(MenuEvent e)
Invoked when the menu is canceled.
Parameters:
e - a MenuEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputAdapter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class MouseInputAdapter

java.lang.Object
  |
  +--javax.swing.event.MouseInputAdapter
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Direct Known Subclasses:
BasicDesktopIconUI.MouseInputHandler, BasicInternalFrameUI.BorderListener, BasicSliderUI.TrackListener
public abstract class MouseInputAdapter
extends Object
implements MouseInputListener

The adapter which receives mouse events and mouse motion events. The methods in this class are empty; this class is provided as a convenience for easily creating listeners by extending this class and overriding only the methods of interest.

Constructor Summary
MouseInputAdapter()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MouseInputAdapter

public MouseInputAdapter()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PopupMenuEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class PopupMenuEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.PopupMenuEvent
All Implemented Interfaces:
Serializable
public class PopupMenuEvent
extends EventObject

PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
PopupMenuEvent(Object source)
Constructs a PopupMenuEvent object.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PopupMenuEvent

public PopupMenuEvent(Object source)
Constructs a PopupMenuEvent object.
Parameters:
source - the Object that originated the event (typically this)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PopupMenuListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface PopupMenuListener

All Superinterfaces:
EventListener
public interface PopupMenuListener
extends EventListener

A popup menu listener

Method Summary
void | popupMenuCanceled(PopupMenuEvent e) This method is called when the popup menu is canceled
void | popupMenuWillBecomeInvisible(PopupMenuEvent e) This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time
void | popupMenuWillBecomeVisible(PopupMenuEvent e) This method is called before the popup menu becomes visible

Method Detail

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(PopupMenuEvent e)
This method is called before the popup menu becomes visible

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time

popupMenuCanceled

public void popupMenuCanceled(PopupMenuEvent e)
This method is called when the popup menu is canceled
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SwingPropertyChangeSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class SwingPropertyChangeSupport

java.lang.Object
  |
  +--java.beans.PropertyChangeSupport
        |
        +--javax.swing.event.SwingPropertyChangeSupport
All Implemented Interfaces:
Serializable
public final class SwingPropertyChangeSupport
extends PropertyChangeSupport

This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption, which helps performance (both big Swing concerns). Most of the overridden methods are only necessary because all of PropertyChangeSupport's instance data is private, without accessor methods.

See Also:
Serialized Form

Constructor Summary
SwingPropertyChangeSupport(Object sourceBean)
Constructs a SwingPropertyChangeSupport object.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list.
void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.
void | firePropertyChange(PropertyChangeEvent evt) Fire an existing PropertyChangeEvent to any registered listeners.
void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Report a bound property update to any registered listeners.
boolean | hasListeners(String propertyName) Check if there are any listeners for a specific property.
void | removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list.
void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
Methods inherited from class java.beans.PropertyChangeSupport
firePropertyChange, firePropertyChange
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SwingPropertyChangeSupport

public SwingPropertyChangeSupport(Object sourceBean)
Constructs a SwingPropertyChangeSupport object.
Parameters:
sourceBean - The bean to be given as the source for any events.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Overrides:
addPropertyChangeListener in class PropertyChangeSupport
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class PropertyChangeSupport
Parameters:
listener - The PropertyChangeListener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.
Overrides:
addPropertyChangeListener in class PropertyChangeSupport
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
Overrides:
removePropertyChangeListener in class PropertyChangeSupport
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
Overrides:
firePropertyChange in class PropertyChangeSupport
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.
Overrides:
firePropertyChange in class PropertyChangeSupport
Parameters:
evt - The PropertyChangeEvent object.

hasListeners

public boolean hasListeners(String propertyName)
Check if there are any listeners for a specific property.
Overrides:
hasListeners in class PropertyChangeSupport
Parameters:
propertyName - the property name.
Returns:
true if there are ore or more listeners for the given property
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableColumnModelEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class TableColumnModelEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.TableColumnModelEvent
All Implemented Interfaces:
Serializable
public class TableColumnModelEvent
extends EventObject

TableColumnModelEvent is used to notify listeners that a table column model has changed, such as a column was added, removed, or moved.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
TableColumnModelListener, Serialized Form

Field Summary
protected int | fromIndex The index of the column from where it was moved or removed
protected int | toIndex The index of the column to where it was moved or added from
Fields inherited from class java.util.EventObject
source
Constructor Summary
TableColumnModelEvent(TableColumnModel source, int from, int to)
Constructs a TableColumnModelEvent object.
Method Summary
int | getFromIndex() Returns the fromIndex.
int | getToIndex() Returns the toIndex.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

fromIndex

protected int fromIndex
The index of the column from where it was moved or removed

toIndex

protected int toIndex
The index of the column to where it was moved or added from
Constructor Detail

TableColumnModelEvent

public TableColumnModelEvent(TableColumnModel source,
                             int from,
                             int to)
Constructs a TableColumnModelEvent object.
Parameters:
source - the TableColumnModel that originated the event (typically this)
from - an int specifying the first row in a range of affected rows
to - an int specifying the last row in a range of affected rows
Method Detail

getFromIndex

public int getFromIndex()
Returns the fromIndex. Valid for removed or moved events

getToIndex

public int getToIndex()
Returns the toIndex. Valid for add and moved events
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableColumnModelListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TableColumnModelListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTable, JTable.AccessibleJTable, JTableHeader
public interface TableColumnModelListener
extends EventListener

TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel.

See Also:
TableColumnModelEvent

Method Summary
void | columnAdded(TableColumnModelEvent e) Tells listeners that a column was added to the model.
void | columnMarginChanged(ChangeEvent e) Tells listeners that a column was moved due to a margin change.
void | columnMoved(TableColumnModelEvent e) Tells listeners that a column was repositioned.
void | columnRemoved(TableColumnModelEvent e) Tells listeners that a column was removed from the model.
void | columnSelectionChanged(ListSelectionEvent e) Tells listeners that the selection model of the TableColumnModel changed.

Method Detail

columnAdded

public void columnAdded(TableColumnModelEvent e)
Tells listeners that a column was added to the model.

columnRemoved

public void columnRemoved(TableColumnModelEvent e)
Tells listeners that a column was removed from the model.

columnMoved

public void columnMoved(TableColumnModelEvent e)
Tells listeners that a column was repositioned.

columnMarginChanged

public void columnMarginChanged(ChangeEvent e)
Tells listeners that a column was moved due to a margin change.

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent e)
Tells listeners that the selection model of the TableColumnModel changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableModelEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class TableModelEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.TableModelEvent
All Implemented Interfaces:
Serializable
public class TableModelEvent
extends EventObject

TableModelEvent is used to notify listeners that a table model has changed. The model event describes changes to a TableModel and all references to rows and columns are in the co-ordinate system of the model. Depending on the parameters used in the constructors, the TableModelevent can be used to specify the following types of changes:

 TableModelEvent(source);              //  The data, ie. all rows changed
 TableModelEvent(source, HEADER_ROW);  //  Structure change, reallcoate TableColumns
 TableModelEvent(source, 1);           //  Row 1 changed
 TableModelEvent(source, 3, 6);        //  Rows 3 to 6 inclusive changed
 TableModelEvent(source, 2, 2, 6);     //  Cell at (2, 6) changed
 TableModelEvent(source, 3, 6, ALL_COLUMNS, INSERT); // Rows (3, 6) were inserted
 TableModelEvent(source, 3, 6, ALL_COLUMNS, DELETE); // Rows (3, 6) were deleted
It is possible to use other combinations of the parameters, not all of them are meaningful. By subclassing, you can add other information, for example: whether the event WILL happen or DID happen. This makes the specification of rows in DELETE events more useful but has not been included in the swing package as the JTable only needs post-event notification.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
TableModel, Serialized Form

Field Summary
static int | ALL_COLUMNS Specifies all columns in a row or rows.
protected int | column
static int | DELETE Identifies the removal of rows or columns.
protected int | firstRow
static int | HEADER_ROW Identifies the header row.
static int | INSERT Identifies the addtion of new rows or columns.
protected int | lastRow
protected int | type
static int | UPDATE Identifies a change to existing data.
Fields inherited from class java.util.EventObject
source
Constructor Summary
TableModelEvent(TableModel source)
All row data in the table has changed, listeners should discard any state that was based on the rows and requery the TableModel to get the new row count and all the appropriate values.
TableModelEvent(TableModel source, int row)
This row of data has been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow)
The data in rows [firstRow, lastRow] have been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow, int column)
The cells in column column in the range [firstRow, lastRow] have been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
The cells from (firstRow, column) to (lastRow, column) have been changed.
Method Summary
int | getColumn() Returns the column for the event.
int | getFirstRow() Returns the first row that changed.
int | getLastRow() Returns the last row that changed.
int | getType() Returns the type of event - one of: INSERT, UPDATE and DELETE.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

INSERT

public static final int INSERT
Identifies the addtion of new rows or columns.

UPDATE

public static final int UPDATE
Identifies a change to existing data.

DELETE

public static final int DELETE
Identifies the removal of rows or columns.

HEADER_ROW

public static final int HEADER_ROW
Identifies the header row.

ALL_COLUMNS

public static final int ALL_COLUMNS
Specifies all columns in a row or rows.

type

protected int type

firstRow

protected int firstRow

lastRow

protected int lastRow

column

protected int column
Constructor Detail

TableModelEvent

public TableModelEvent(TableModel source)
All row data in the table has changed, listeners should discard any state that was based on the rows and requery the TableModel to get the new row count and all the appropriate values. The JTable will repaint the entire visible region on recieving this event, querying the model for the cell values that are visble. The structure of the table ie, the column names, types and order have not changed.

TableModelEvent

public TableModelEvent(TableModel source,
                       int row)
This row of data has been updated. To denote the arrival of a completely new table with a different structure use HEADER_ROW as the value for the row. When the JTable recieves this event and its autoCreateColumnsFromModel flag is set it discards any TableColumns that it had and reallocates default ones in the order they appear in the model. This is the same as calling setModel(TableModel) on the JTable.

TableModelEvent

public TableModelEvent(TableModel source,
                       int firstRow,
                       int lastRow)
The data in rows [firstRow, lastRow] have been updated.

TableModelEvent

public TableModelEvent(TableModel source,
                       int firstRow,
                       int lastRow,
                       int column)
The cells in column column in the range [firstRow, lastRow] have been updated.

TableModelEvent

public TableModelEvent(TableModel source,
                       int firstRow,
                       int lastRow,
                       int column,
                       int type)
The cells from (firstRow, column) to (lastRow, column) have been changed. The column refers to the column index of the cell in the model's co-ordinate system. When column is ALL_COLUMNS, all cells in the specified range of rows are considered changed.

The type should be one of: INSERT, UPDATE and DELETE.

Method Detail

getFirstRow

public int getFirstRow()
Returns the first row that changed. HEADER_ROW means the meta data, ie. names, types and order of the columns.

getLastRow

public int getLastRow()
Returns the last row that changed.

getColumn

public int getColumn()
Returns the column for the event. If the return value is ALL_COLUMNS; it means every column in the specified rows changed.

getType

public int getType()
Returns the type of event - one of: INSERT, UPDATE and DELETE.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableModelListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TableModelListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTable, JTable.AccessibleJTable
public interface TableModelListener
extends EventListener

TableModelListener defines the interface for an object that listens to changes in a TableModel.

See Also:
TableModel

Method Summary
 void tableChanged(TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.

Method Detail

tableChanged

public void tableChanged(TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeExpansionEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class TreeExpansionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.TreeExpansionEvent
All Implemented Interfaces:
Serializable
public class TreeExpansionEvent
extends EventObject

An event used to identify a single path in a tree. The source returned by getSource will be an instance of JTree.

For further documentation and examples see the following sections in The Java Tutorial: How to Write a Tree Expansion Listener and How to Write a Tree-Will-Expand Listener.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  TreePath path
Path to the value this event represents.
Fields inherited from class java.util.EventObject
source
Constructor Summary
TreeExpansionEvent(Object source, TreePath path)
Constructs a TreeExpansionEvent object.
Method Summary
 TreePath getPath()
Returns the path to the value that has been expanded/collapsed.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

path

protected TreePath path
Path to the value this event represents.
Constructor Detail

TreeExpansionEvent

public TreeExpansionEvent(Object source,
                          TreePath path)
Constructs a TreeExpansionEvent object.
Parameters:
source - the Object that originated the event (typically this)
path - a TreePath object identifying the newly expanded node
Method Detail

getPath

public TreePath getPath()
Returns the path to the value that has been expanded/collapsed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeExpansionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TreeExpansionListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTree.AccessibleJTree, BasicTreeUI.TreeExpansionHandler
public interface TreeExpansionListener
extends EventListener

The listener that's notified when a tree expands or collapses a node. For further documentation and examples see How to Write a Tree Expansion Listener, a section in The Java Tutorial.

Method Summary
void | treeCollapsed(TreeExpansionEvent event) Called whenever an item in the tree has been collapsed.
void | treeExpanded(TreeExpansionEvent event) Called whenever an item in the tree has been expanded.

Method Detail

treeExpanded

public void treeExpanded(TreeExpansionEvent event)
Called whenever an item in the tree has been expanded.

treeCollapsed

public void treeCollapsed(TreeExpansionEvent event)
Called whenever an item in the tree has been collapsed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeModelEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class TreeModelEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.TreeModelEvent
All Implemented Interfaces:
Serializable
public class TreeModelEvent
extends EventObject

Encapsulates information describing changes to a tree model, and used to notify tree model listeners of the change. For more information and examples see How to Write a Tree Model Listener, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected int[] | childIndices Indices identifying the position of where the children were.
protected Object[] | children Children that have been removed.
protected TreePath | path Path to the parent of the nodes that have changed.
Fields inherited from class java.util.EventObject
source
Constructor Summary
TreeModelEvent(Object source, Object[] path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of a modified subtree as an array of Objects.
TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as an array of Objects.
TreeModelEvent(Object source, TreePath path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.
TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
Method Summary
int[] | getChildIndices() Returns the values of the child indexes.
Object[] | getChildren() Returns the objects that are children of the node identified by getPath at the locations specified by getChildIndices.
Object[] | getPath() Convenience method to get the array of objects from the TreePath instance that this event wraps.
TreePath | getTreePath() For all events, except treeStructureChanged, returns the parent of the changed nodes.
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.util.EventObject
getSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

path

protected TreePath path
Path to the parent of the nodes that have changed.

childIndices

protected int[] childIndices
Indices identifying the position of where the children were.

children

protected Object[] children
Children that have been removed.
Constructor Detail

TreeModelEvent

public TreeModelEvent(Object source,
                      Object[] path,
                      int[] childIndices,
                      Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as an array of Objects. All of the modified objects are siblings which are direct descendents (not grandchildren) of the specified parent. The positions at which the inserts, deletes, or changes occured are specified by an array of int. The indexes in that array must be in order, from lowest to highest.

For changes, the indexes in the model correspond exactly to the indexes of items currently displayed in the UI. As a result, it is not really critical if the indexes are not in their exact order. But after multiple inserts or deletes, the items currently in the UI no longer correspond to the items in the model. It is therefore critical to specify the indexes properly for inserts and deletes.

For inserts, the indexes represent the final state of the tree, after the inserts have occurred. Since the indexes must be specified in order, the most natural processing methodology is to do the inserts starting at the lowest index and working towards the highest. Accumulate a Vector of Integer objects that specify the insert-locations as you go, then convert the Vector to an array of int to create the event. When the postition-index equals zero, the node is inserted at the beginning of the list. When the position index equals the size of the list, the node is "inserted" at (appended to) the end of the list.

For deletes, the indexes represent the initial state of the tree, before the deletes have occurred. Since the indexes must be specified in order, the most natural processing methodology is to use a delete-counter. Start by initializing the counter to zero and start work through the list from lowest to higest. Every time you do a delete, add the current value of the delete-counter to the index-position where the delete occurred, and append the result to a Vector of delete-locations, using addElement(). Then increment the delete-counter. The index positions stored in the Vector therefore reflect the effects of all previous deletes, so they represent each object's position in the initial tree. (You could also start at the highest index and working back towards the lowest, accumulating a Vector of delete-locations as you go using the insertElementAt(Integer, 0).) However you produce the Vector of initial-positions, you then need to convert the Vector of Integer objects to an array of int to create the event.

Notes:

  • Like the insertNodeInto method in the DefaultTreeModel class, insertElementAt appends to the Vector when the index matches the size of the vector. So you can use insertElementAt(Integer, 0) even when the vector is empty.
      To create a node changed event for the root node, specify the parent as null and the "child" index as zero.
    Parameters:
    source - the Object responsible for generating the event (typically the creator of the event object passes this for its value)
    path - an array of Object identifying the path to the parent of the modified item(s), where the first element of the array is the Object stored at the root node and the last element is the Object stored at the parent node
    childIndices - an array of int that specifies the index values of the removed items. The indices must be in sorted order, from lowest to highest
    children - an array of Object containing the inserted, removed, or changed objects
    See Also:
    TreePath

TreeModelEvent

public TreeModelEvent(Object source,
                      TreePath path,
                      int[] childIndices,
                      Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object. For more information on how to specify the indexes and objects, see TreeModelEvent(Object,Object[],int[],Object[]).
Parameters:
source - the Object responsible for generating the event (typically the creator of the event object passes this for its value)
path - a TreePath object that identifies the path to the parent of the modified item(s)
childIndices - an array of int that specifies the index values of the modified items
children - an array of Object containing the inserted, removed, or changed objects
See Also:
TreeModelEvent(Object,Object[],int[],Object[])

TreeModelEvent

public TreeModelEvent(Object source,
                      Object[] path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of a modified subtree as an array of Objects. A structure change event might involve nodes swapping position, for example, or it might encapsulate multiple inserts and deletes in the subtree stemming from the node, where the changes may have taken place at different levels of the subtree.
Note:
JTree collapses all nodes under the specified node, so that only its immediate children are visible.
Parameters:
source - the Object responsible for generating the event (typically the creator of the event object passes this for its value)
path - an array of Object identifying the path to the root of the modified subtree, where the first element of the array is the object stored at the root node and the last element is the object stored at the changed node
See Also:
TreePath

TreeModelEvent

public TreeModelEvent(Object source,
                      TreePath path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object. For more information on this event specification, see TreeModelEvent(Object,Object[]).
Parameters:
source - the Object responsible for generating the event (typically the creator of the event object passes this for its value)
path - a TreePath object that identifies the path to the change. In the DefaultTreeModel, this object contains an array of user-data objects, but a subclass of TreePath could use some totally different mechanism -- for example, a node ID number
See Also:
TreeModelEvent(Object,Object[])
Method Detail

getTreePath

public TreePath getTreePath()
For all events, except treeStructureChanged, returns the parent of the changed nodes. For treeStructureChanged events, returns the ancestor of the structure that has changed. This and getChildIndices are used to get a list of the effected nodes.

The one exception to this is a treeNodesChanged event that is to identify the root, in which case this will return the root and getChildIndices will return null.

Returns:
the TreePath used in identifying the changed nodes.
See Also:
TreePath.getLastPathComponent()

getPath

public Object[] getPath()
Convenience method to get the array of objects from the TreePath instance that this event wraps.
Returns:
an array of Objects, where the first Object is the one stored at the root and the last object is the one stored at the node identified by the path

getChildren

public Object[] getChildren()
Returns the objects that are children of the node identified by getPath at the locations specified by getChildIndices. If this is a removal event the returned objects are no longer children of the parent node.
Returns:
an array of Object containing the children specified by the event
See Also:
getPath(), getChildIndices()

getChildIndices

public int[] getChildIndices()
Returns the values of the child indexes. If this is a removal event the indexes point to locations in the initial list where items were removed. If it is an insert, the indices point to locations in the final list where the items were added. For node changes, the indices point to the locations of the modified nodes.
Returns:
an array of int containing index locations for the children specified by the event

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class EventObject
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeModelListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TreeModelListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTree.AccessibleJTree, JTree.TreeModelHandler, BasicTreeUI.TreeModelHandler
public interface TreeModelListener
extends EventListener

Defines the interface for an object that listens to changes in a TreeModel. For further information and examples see How to Write a Tree Model Listener, a section in The Java Tutorial.

Method Summary
void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.

Method Detail

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

To indicate the root has changed, childIndices and children will be null.

Use e.getPath() to get the parent of the changed node(s). e.getChildIndices() returns the index(es) of the changed node(s).

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)

Invoked after nodes have been inserted into the tree.

Use e.getPath() to get the parent of the new node(s). e.getChildIndices() returns the index(es) of the new node(s) in ascending order.

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

Use e.getPath() to get the former parent of the deleted node(s). e.getChildIndices() returns, in ascending order, the index(es) the node(s) had before being deleted.

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

Use e.getPath() to get the path to the node. e.getChildIndices() returns null.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSelectionEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class TreeSelectionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.TreeSelectionEvent
All Implemented Interfaces:
Serializable
public class TreeSelectionEvent
extends EventObject

An event that characterizes a change in the current selection. The change is based on any number of paths. TreeSelectionListeners will generally query the source of the event for the new selected status of each potentially changed row.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
TreeSelectionListener, TreeSelectionModel, Serialized Form

Field Summary
protected boolean[] | areNew For each path identifies if that is path is in fact new.
protected TreePath | newLeadSelectionPath leadSelectionPath after the paths changed, may be null.
protected TreePath | oldLeadSelectionPath leadSelectionPath before the paths changed, may be null.
protected TreePath[] | paths Paths this event represents.
Fields inherited from class java.util.EventObject
source
Constructor Summary
TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
Method Summary
Object | cloneWithSource(Object newSource) Returns a copy of the receiver, but with the source being newSource.
TreePath | getNewLeadSelectionPath() Returns the current lead path.
TreePath | getOldLeadSelectionPath() Returns the path that was previously the lead path.
TreePath | getPath() Returns the first path element.
TreePath[] | getPaths() Returns the paths that have been added or removed from the selection.
boolean | isAddedPath() Returns true if the first path element has been added to the selection, a return value of false means the first path has been removed from the selection.
boolean | isAddedPath(int index) Returns true if the path identified by index was added to the selection.
boolean | isAddedPath(TreePath path) Returns true if the path identified by path was added to the selection.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

paths

protected TreePath[] paths
Paths this event represents.

areNew

protected boolean[] areNew
For each path identifies if that is path is in fact new.

oldLeadSelectionPath

protected TreePath oldLeadSelectionPath
leadSelectionPath before the paths changed, may be null.

newLeadSelectionPath

protected TreePath newLeadSelectionPath
leadSelectionPath after the paths changed, may be null.
Constructor Detail

TreeSelectionEvent

public TreeSelectionEvent(Object source,
                          TreePath[] paths,
                          boolean[] areNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel. paths identifies the paths that have been either added or removed from the selection.
Parameters:
source - source of event
paths - the paths that have changed in the selection

TreeSelectionEvent

public TreeSelectionEvent(Object source,
                          TreePath path,
                          boolean isNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel. path identifies the path that have been either added or removed from the selection.
Parameters:
source - source of event
path - the path that has changed in the selection
isNew - whether or not the path is new to the selection, false means path was removed from the selection.
Method Detail

getPaths

public TreePath[] getPaths()
Returns the paths that have been added or removed from the selection.

getPath

public TreePath getPath()
Returns the first path element.

isAddedPath

public boolean isAddedPath()
Returns true if the first path element has been added to the selection, a return value of false means the first path has been removed from the selection.

isAddedPath

public boolean isAddedPath(TreePath path)
Returns true if the path identified by path was added to the selection. A return value of false means the path was in the selection but is no longer in the selection. This will raise if path is not one of the paths identified by this event.

isAddedPath

public boolean isAddedPath(int index)
Returns true if the path identified by index was added to the selection. A return value of false means the path was in the selection but is no longer in the selection. This will raise if index <0 ||="||">= getPaths.length.
Since:
1.3

getOldLeadSelectionPath

public TreePath getOldLeadSelectionPath()
Returns the path that was previously the lead path.

getNewLeadSelectionPath

public TreePath getNewLeadSelectionPath()
Returns the current lead path.

cloneWithSource

public Object cloneWithSource(Object newSource)
Returns a copy of the receiver, but with the source being newSource.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSelectionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TreeSelectionListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
JTree.AccessibleJTree, JTree.TreeSelectionRedirector, DefaultTreeCellEditor, BasicTreeUI.TreeSelectionHandler
public interface TreeSelectionListener
extends EventListener

The listener that's notified when the selection in a TreeSelectionModel changes. For more information and examples see How to Write a Tree Selection Listener, a section in The Java Tutorial.

See Also:
TreeSelectionModel, JTree

Method Summary
 void valueChanged(TreeSelectionEvent e)
Called whenever the value of the selection changes.

Method Detail

valueChanged

public void valueChanged(TreeSelectionEvent e)
Called whenever the value of the selection changes.
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeWillExpandListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface TreeWillExpandListener

All Superinterfaces:
EventListener
public interface TreeWillExpandListener
extends EventListener

The listener that's notified when a tree expands or collapses a node. For further information and examples see How to Write a Tree-Will-Expand Listener, a section in The Java Tutorial.

Method Summary
void | treeWillCollapse(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be collapsed.
void | treeWillExpand(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be expanded.

Method Detail

treeWillExpand

public void treeWillExpand(TreeExpansionEvent event)
                    throws ExpandVetoException
Invoked whenever a node in the tree is about to be expanded.

treeWillCollapse

public void treeWillCollapse(TreeExpansionEvent event)
                      throws ExpandVetoException
Invoked whenever a node in the tree is about to be collapsed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UndoableEditEvent

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Class UndoableEditEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.UndoableEditEvent
All Implemented Interfaces:
Serializable
public class UndoableEditEvent
extends EventObject

An event indicating that an operation which can be undone has occurred.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
Constructor Summary
UndoableEditEvent(Object source, UndoableEdit edit)
Constructs an UndoableEditEvent object.
Method Summary
 UndoableEdit getEdit()
Returns the edit value.
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UndoableEditEvent

public UndoableEditEvent(Object source,
                         UndoableEdit edit)
Constructs an UndoableEditEvent object.
Parameters:
source - the Object that originated the event (typically this)
edit - an UndoableEdit object
Method Detail

getEdit

public UndoableEdit getEdit()
Returns the edit value.
Returns:
the UndoableEdit object encapsulating the edit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UndoableEditListener

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.event
Interface UndoableEditListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
UndoManager
public interface UndoableEditListener
extends EventListener

Interface implemented by a class interested in hearing about undoable operations.

Method Summary
 void undoableEditHappened(UndoableEditEvent e)
An undoable edit happened

Method Detail

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent e)
An undoable edit happened
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.swing.filechooser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.filechooser

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.filechooser.FileFilter
    • class javax.swing.filechooser.FileSystemView
    • class javax.swing.filechooser.FileView
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.filechooser

Contains classes and interfaces used by the JFileChooser component.

See:
Description

Class Summary
FileFilter | FileFilter is an abstract class that has no default implemention.
FileSystemView | FileSystemView is JFileChooser's gateway to the file system.
FileView | FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Package javax.swing.filechooser Description

Contains classes and interfaces used by the JFileChooser component.

Related Documentation

This document forms the complete API specification. For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use File Choosers, a section in The Java Tutorial.
  • Internationalization Documentation
  • Input Method Framework Documentation

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.filechooser

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.filechooser

Packages that use javax.swing.filechooser
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Classes in javax.swing.filechooser used by javax.swing
FileFilter
FileFilter is an abstract class that has no default implemention.
FileSystemView
FileSystemView is JFileChooser's gateway to the file system.
FileView
FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Classes in javax.swing.filechooser used by javax.swing.filechooser
FileSystemView
FileSystemView is JFileChooser's gateway to the file system.

Classes in javax.swing.filechooser used by javax.swing.plaf
FileFilter
FileFilter is an abstract class that has no default implemention.
FileView
FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Classes in javax.swing.filechooser used by javax.swing.plaf.basic
FileFilter
FileFilter is an abstract class that has no default implemention.
FileView
FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Classes in javax.swing.filechooser used by javax.swing.plaf.metal
FileFilter
FileFilter is an abstract class that has no default implemention.

Classes in javax.swing.filechooser used by javax.swing.plaf.multi
FileFilter
FileFilter is an abstract class that has no default implemention.
FileView
FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.filechooser.FileFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.filechooser.FileFilter

Packages that use FileFilter
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of FileFilter in javax.swing

Methods in javax.swing that return FileFilter
FileFilter[] | JFileChooser.getChoosableFileFilters() Gets the list of user choosable file filters.
FileFilter | JFileChooser.getAcceptAllFileFilter() Returns the AcceptAll file filter.
FileFilter | JFileChooser.getFileFilter() Returns the currently selected file filter.

Methods in javax.swing with parameters of type FileFilter
void | JFileChooser.addChoosableFileFilter(FileFilter filter) Adds a filter to the list of user choosable file filters.
boolean | JFileChooser.removeChoosableFileFilter(FileFilter f) Removes a filter from the list of user choosable file filters.
void | JFileChooser.setFileFilter(FileFilter filter) Sets the current file filter.

Uses of FileFilter in javax.swing.plaf

Methods in javax.swing.plaf that return FileFilter
abstract  FileFilter FileChooserUI.getAcceptAllFileFilter(JFileChooser fc)

Uses of FileFilter in javax.swing.plaf.basic

Subclasses of FileFilter in javax.swing.plaf.basic
protected  class BasicFileChooserUI.AcceptAllFileFilter

Methods in javax.swing.plaf.basic that return FileFilter
 FileFilter BasicFileChooserUI.getAcceptAllFileFilter(JFileChooser fc)
Returns the default accept all file filter

Uses of FileFilter in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as FileFilter
protected  FileFilter[] MetalFileChooserUI.FilterComboBoxModel.filters

Uses of FileFilter in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return FileFilter
 FileFilter MultiFileChooserUI.getAcceptAllFileFilter(JFileChooser a)
Call getAcceptAllFileFilter on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.filechooser.FileSystemView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.filechooser.FileSystemView

Packages that use FileSystemView
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.filechooser | Contains classes and interfaces used by the JFileChooser component.

Uses of FileSystemView in javax.swing

Methods in javax.swing that return FileSystemView
 FileSystemView JFileChooser.getFileSystemView()
Returns the file system view.

Methods in javax.swing with parameters of type FileSystemView
protected void | JFileChooser.setup(FileSystemView view) Performs common constructor initialization and setup.
void | JFileChooser.setFileSystemView(FileSystemView fsv) Sets the file system view that the JFileChooser uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.

Constructors in javax.swing with parameters of type FileSystemView
JFileChooser(FileSystemView fsv)
Constructs a JFileChooser using the given FileSystemView.
JFileChooser(File currentDirectory, FileSystemView fsv)
Constructs a JFileChooser using the given current directory and FileSystemView.
JFileChooser(String currentDirectoryPath, FileSystemView fsv)
Constructs a JFileChooser using the given current directory path and FileSystemView.

Uses of FileSystemView in javax.swing.filechooser

Methods in javax.swing.filechooser that return FileSystemView
static FileSystemView FileSystemView.getFileSystemView()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.filechooser.FileView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.filechooser.FileView

Packages that use FileView
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of FileView in javax.swing

Methods in javax.swing that return FileView
 FileView JFileChooser.getFileView()
Returns the current file view.

Methods in javax.swing with parameters of type FileView
 void JFileChooser.setFileView(FileView fileView)
Sets the file view to used to retrieve UI information, such as the icon that represents a file or the type description of a file.

Uses of FileView in javax.swing.plaf

Methods in javax.swing.plaf that return FileView
abstract  FileView FileChooserUI.getFileView(JFileChooser fc)

Uses of FileView in javax.swing.plaf.basic

Subclasses of FileView in javax.swing.plaf.basic
protected  class BasicFileChooserUI.BasicFileView

Methods in javax.swing.plaf.basic that return FileView
 FileView BasicFileChooserUI.getFileView(JFileChooser fc)

Uses of FileView in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return FileView
 FileView MultiFileChooserUI.getFileView(JFileChooser a)
Call getFileView on each UI handled by this MultiUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


FileFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.filechooser
Class FileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
Direct Known Subclasses:
BasicFileChooserUI.AcceptAllFileFilter
public abstract class FileFilter
extends Object

FileFilter is an abstract class that has no default implemention. A FileFilter, once implemented, can be set on a JFileChooser to keep unwanted files from appearing in the directory listing. For an example implementation of a simple file filter, see yourSDK/demo/jfc/FileChooserDemo/ExampleFileFilter.java. For more information and examples see How to Use File Choosers, a section in The Java Tutorial.

See Also:
JFileChooser.setFileFilter(javax.swing.filechooser.FileFilter), JFileChooser.addChoosableFileFilter(javax.swing.filechooser.FileFilter)

Constructor Summary
FileFilter()
Method Summary
abstract boolean | accept(File f) Whether the given file is accepted by this filter.
abstract String | getDescription() The description of this filter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileFilter

public FileFilter()
Method Detail

accept

public abstract boolean accept(File f)
Whether the given file is accepted by this filter.

getDescription

public abstract String getDescription()
The description of this filter. For example: "JPG and GIF Images"
See Also:
FileView.getName(java.io.File)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FileSystemView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.filechooser
Class FileSystemView

java.lang.Object
  |
  +--javax.swing.filechooser.FileSystemView
public abstract class FileSystemView
extends Object

FileSystemView is JFileChooser's gateway to the file system. Since the JDK1.1 File api doesn't allow access to such information as root partitians, file type information, or hidden file bits, this class is designed to intuit as much OS specific file system information as possible. FileSystemView will eventually delegate its responsibilities to io File classes when JDK1.X provides more direct access to file system information. Java Licenses may want to provide a different implemenation of FileSystemView to better handle a given operation system. PENDING(jeff) - need to provide a specification for how Mac/OS2/BeOS/etc file systems can modify FileSystemView to handle their particular type of file system.

Constructor Summary
FileSystemView()
Method Summary
File | createFileObject(File dir, String filename) Returns a File object constructed in dir from the given filename.
File | createFileObject(String path) Returns a File object constructed from the given path string.
abstract File | createNewFolder(File containingDir) creates a new folder with a default folder name.
File[] | getFiles(File dir, boolean useFileHiding) gets the list of shown (i.e.
static FileSystemView | getFileSystemView()
File | getHomeDirectory()
File | getParentDirectory(File dir) Returns the parent directory of dir.
abstract File[] | getRoots() Returns all root partitians on this system.
abstract boolean | isHiddenFile(File f) Returns whether a file is hidden or not.
abstract boolean | isRoot(File f) Determines if the given file is a root partition or drive.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileSystemView

public FileSystemView()
Method Detail

getFileSystemView

public static FileSystemView getFileSystemView()

isRoot

public abstract boolean isRoot(File f)
Determines if the given file is a root partition or drive.

createNewFolder

public abstract File createNewFolder(File containingDir)
                              throws IOException
creates a new folder with a default folder name.

isHiddenFile

public abstract boolean isHiddenFile(File f)
Returns whether a file is hidden or not.

getRoots

public abstract File[] getRoots()
Returns all root partitians on this system. For example, on Windows, this would be the A: through Z: drives.

getHomeDirectory

public File getHomeDirectory()

createFileObject

public File createFileObject(File dir,
                             String filename)
Returns a File object constructed in dir from the given filename.

createFileObject

public File createFileObject(String path)
Returns a File object constructed from the given path string.

getFiles

public File[] getFiles(File dir,
                       boolean useFileHiding)
gets the list of shown (i.e. not hidden) files

getParentDirectory

public File getParentDirectory(File dir)
Returns the parent directory of dir.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileView

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.filechooser
Class FileView

java.lang.Object
  |
  +--javax.swing.filechooser.FileView
Direct Known Subclasses:
BasicFileChooserUI.BasicFileView
public abstract class FileView
extends Object

FileView defines an abstract class that can be implemented to provide the filechooser with ui information for a File. Each L&F JFileChooserUI object implements this class to pass back the correct icons and type descriptions specific to that L&F. For example, the Windows L&F returns the generic Windows icons for directories and generic files. Additionally, you may want to provide your own FileView to JFileChooser to return different icons or additional information using JFileChooser.setFileView(javax.swing.filechooser.FileView).

JFileChooser first looks to see if there is a user defined FileView, if there is, it gets type information from there first. If FileView returns null for any method, JFileChooser then uses the L&F specific view to get the information. So, for example, if you provide a FileView class that returns an Icon for JPG files, and returns null icons for all other files, the UI's FileView will provide default icons for all other files.

For an example implementation of a simple file filter, see yourSDK/demo/jfc/FileChooserDemo/ExampleFileView.java. For more information and examples see How to Use File Choosers, a section in The Java Tutorial.

See Also:
JFileChooser

Constructor Summary
FileView()
Method Summary
String | getDescription(File f) A human readable description of the file.
Icon | getIcon(File f) The icon that represents this file in the JFileChooser.
String | getName(File f) The name of the file.
String | getTypeDescription(File f) A human readable description of the type of the file.
Boolean | isTraversable(File f) Whether the directory is traversable or not.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileView

public FileView()
Method Detail

getName

public String getName(File f)
The name of the file. Normally this would be simply f.getName()

getDescription

public String getDescription(File f)
A human readable description of the file. For example, a file named jag.jpg might have a description that read: "A JPEG image file of James Gosling's face"

getTypeDescription

public String getTypeDescription(File f)
A human readable description of the type of the file. For example, a jpg file might have a type description of: "A JPEG Compressed Image File"

getIcon

public Icon getIcon(File f)
The icon that represents this file in the JFileChooser.

isTraversable

public Boolean isTraversable(File f)
Whether the directory is traversable or not. This might be useful, for example, if you want a directory to represent a compound document and don't want the user to descend into it.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Filler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class Box.Filler

java.lang.Object
  |
  +--java.awt.Component
        |
        +--javax.swing.Box.Filler
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Enclosing class:
Box
public static class Box.Filler
extends Component
implements Accessible

An implementation of a lightweight component that participates in layout but has no view.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class Box.Filler.AccessibleBoxFiller
This class implements accessibility support for the Box.Filler class.
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  AccessibleContext accessibleContext
The currently set AccessibleContext object.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Box.Filler(Dimension min, Dimension pref, Dimension max)
Constructor to create shape with the given size ranges.
Method Summary
void | changeShape(Dimension min, Dimension pref, Dimension max) Change the size requests for this shape.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this Box.Filler.
Dimension | getMaximumSize() Returns the maximum size of the component.
Dimension | getMinimumSize() Returns the minimum size of the component.
Dimension | getPreferredSize() Returns the preferred size of the component.
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

accessibleContext

protected AccessibleContext accessibleContext
The currently set AccessibleContext object.
Constructor Detail

Box.Filler

public Box.Filler(Dimension min,
                  Dimension pref,
                  Dimension max)
Constructor to create shape with the given size ranges.
Parameters:
min - Minimum size
pref - Preferred size
max - Maximum size
Method Detail

changeShape

public void changeShape(Dimension min,
                        Dimension pref,
                        Dimension max)
Change the size requests for this shape. An invalidate() is propagated upward as a result so that layout will eventually happen with using the new sizes.
Parameters:
min - Value to return for getMinimumSize
pref - Value to return for getPreferredSize
max - Value to return for getMaximumSize

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of the component.
Overrides:
getMinimumSize in class Component
Returns:
the size

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the component.
Overrides:
getPreferredSize in class Component
Returns:
the size

getMaximumSize

public Dimension getMaximumSize()
Returns the maximum size of the component.
Overrides:
getMaximumSize in class Component
Returns:
the size

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Box.Filler. For box fillers, the AccessibleContext takes the form of an AccessibleBoxFiller. A new AccessibleAWTBoxFiller instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleBoxFiller that serves as the AccessibleContext of this Box.Filler.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class FocusManager

java.lang.Object
  |
  +--javax.swing.FocusManager
Direct Known Subclasses:
DefaultFocusManager
public abstract class FocusManager
extends Object

Swing Focus Manager

Field Summary
static String FOCUS_MANAGER_CLASS_PROPERTY
This property name is used to get the FocusManager implementation that should be used for a given UI
Constructor Summary
FocusManager()
Method Summary
static void | disableSwingFocusManager() Disable Swing's focus manager for the calling thread's thread group.
abstract void | focusNextComponent(Component aComponent) Cause the focus manager to set the focus on the next focusable component You can call this method to cause the focus manager to focus the next component
abstract void | focusPreviousComponent(Component aComponent) Cause the focus manager to set the focus on the previous focusable component You can call this methid to cause the focus manager to focus the previous component
static FocusManager | getCurrentManager() Return the FocusManager for the calling thread There is one FocusManager per thread group
static boolean | isFocusManagerEnabled() Return whether Swing's focus manager is enabled
abstract void | processKeyEvent(Component focusedComponent, KeyEvent anEvent) This method is called by JComponents when a key event occurs.
static void | setCurrentManager(FocusManager aFocusManager) Set the FocusManager that should be used for the calling thread.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FOCUS_MANAGER_CLASS_PROPERTY

public static final String FOCUS_MANAGER_CLASS_PROPERTY
This property name is used to get the FocusManager implementation that should be used for a given UI
Constructor Detail

FocusManager

public FocusManager()
Method Detail

getCurrentManager

public static FocusManager getCurrentManager()
Return the FocusManager for the calling thread There is one FocusManager per thread group

setCurrentManager

public static void setCurrentManager(FocusManager aFocusManager)
Set the FocusManager that should be used for the calling thread. aFocusManager will be the default focus manager for the calling thread's thread group.

disableSwingFocusManager

public static void disableSwingFocusManager()
Disable Swing's focus manager for the calling thread's thread group. Call this method if your application mixes java.awt components and swing's components. Your application will then use the awt focus manager.

isFocusManagerEnabled

public static boolean isFocusManagerEnabled()
Return whether Swing's focus manager is enabled

processKeyEvent

public abstract void processKeyEvent(Component focusedComponent,
                                     KeyEvent anEvent)
This method is called by JComponents when a key event occurs. JComponent gives key events to the focus manager first, then to key listeners, then to the keyboard UI dispatcher. This method should look at the key event and change the focused component if the key event matches the receiver's focus manager hot keys. For example the default focus manager will change the focus if the key event matches TAB or Shift + TAB. The focus manager should call consume() on anEvent if anEvent has been processed. focusedComponent is the component that currently has the focus. Note: FocusManager will receive both KEY_PRESSED and KEY_RELEASED key events. If one event is consumed, the other one should be consumed too.

focusNextComponent

public abstract void focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component You can call this method to cause the focus manager to focus the next component

focusPreviousComponent

public abstract void focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component You can call this methid to cause the focus manager to focus the previous component
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GrayFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class GrayFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.RGBImageFilter
              |
              +--javax.swing.GrayFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
public class GrayFilter
extends RGBImageFilter

An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image. Used by buttons to create an image for a disabled button.

Fields inherited from class java.awt.image.RGBImageFilter
canFilterIndexColorModel, newmodel, origmodel
Fields inherited from class java.awt.image.ImageFilter
consumer
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor Summary
GrayFilter(boolean b, int p)
Constructs a GrayFilter object that filters a color image to a grayscale image.
Method Summary
static Image | createDisabledImage(Image i) Creates a disabled image
int | filterRGB(int x, int y, int rgb) Overrides RGBImageFilter.filterRGB.
Methods inherited from class java.awt.image.RGBImageFilter
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GrayFilter

public GrayFilter(boolean b,
                  int p)
Constructs a GrayFilter object that filters a color image to a grayscale image. Used by buttons to create disabled ("grayed out") button images.
Parameters:
b - a boolean -- true if the pixels should be brightened
p - an int in the range 0..100 that determines the percentage of gray, where 100 is the darkest gray, and 0 is the lightest
Method Detail

createDisabledImage

public static Image createDisabledImage(Image i)
Creates a disabled image

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Overrides RGBImageFilter.filterRGB.
Overrides:
filterRGB in class RGBImageFilter
Following copied from class: java.awt.image.RGBImageFilter
See Also:
ColorModel.getRGBdefault(), RGBImageFilter.filterRGBPixels(int, int, int, int, int[], int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLLink

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

java.lang.Object
  |
  +--javax.accessibility.AccessibleHyperlink
        |
        +--javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
All Implemented Interfaces:
AccessibleAction
Enclosing class:
JEditorPane.JEditorPaneAccessibleHypertextSupport
public class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
extends AccessibleHyperlink

Constructor Summary
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)
Method Summary
boolean | doAccessibleAction(int i) Perform the specified Action on the object
Object | getAccessibleActionAnchor(int i) Return an object that represents the link anchor, as appropriate for that link.
int | getAccessibleActionCount() Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g.
String | getAccessibleActionDescription(int i) Return a String description of this particular link action.
Object | getAccessibleActionObject(int i) Returns a URL object that represents the link.
int | getEndIndex() Get the index with the hypertext document at which this link ends
int | getStartIndex() Get the index with the hypertext document at which this link begins
boolean | isValid() Since the document a link is associated with may have changed, this method returns whether this Link is valid anymore (with respect to the document it references).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

public JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)
Method Detail

isValid

public boolean isValid()
Since the document a link is associated with may have changed, this method returns whether this Link is valid anymore (with respect to the document it references).
Overrides:
isValid in class AccessibleHyperlink
Returns:
a flag indicating whether this link is still valid with respect to the AccessibleHypertext it belongs to

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of accessible actions available in this Link If there are more than one, the first one is NOT considered the "default" action of this LINK object (e.g. in an HTML imagemap). In general, links will have only one AccessibleAction in them.
Overrides:
getAccessibleActionCount in class AccessibleHyperlink
Returns:
the zero-based number of Actions in this object

doAccessibleAction

public boolean doAccessibleAction(int i)
Perform the specified Action on the object
Overrides:
doAccessibleAction in class AccessibleHyperlink
Parameters:
i - zero-based index of actions
Returns:
true if the the action was performed; else false.
See Also:
getAccessibleActionCount()

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Return a String description of this particular link action. The string returned is the text within the document associated with the element which contains this link.
Overrides:
getAccessibleActionDescription in class AccessibleHyperlink
Parameters:
i - zero-based index of the actions
Returns:
a String description of the action
See Also:
getAccessibleActionCount()

getAccessibleActionObject

public Object getAccessibleActionObject(int i)
Returns a URL object that represents the link.
Overrides:
getAccessibleActionObject in class AccessibleHyperlink
Parameters:
i - zero-based index of the actions
Returns:
an URL representing the HTML link itself
See Also:
getAccessibleActionCount()

getAccessibleActionAnchor

public Object getAccessibleActionAnchor(int i)
Return an object that represents the link anchor, as appropriate for that link. E.g. from HTML: Accessibility this method would return a String containing the text: 'Accessibility'. Similarly, from this HTML: <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a> this might return the object ImageIcon("top-hat.gif", "top hat");
Overrides:
getAccessibleActionAnchor in class AccessibleHyperlink
Parameters:
i - zero-based index of the actions
Returns:
an Object representing the hypertext anchor
See Also:
getAccessibleActionCount()

getStartIndex

public int getStartIndex()
Get the index with the hypertext document at which this link begins
Overrides:
getStartIndex in class AccessibleHyperlink
Returns:
index of start of link

getEndIndex

public int getEndIndex()
Get the index with the hypertext document at which this link ends
Overrides:
getEndIndex in class AccessibleHyperlink
Returns:
index of end of link
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Icon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface Icon

All Known Implementing Classes:
ImageIcon, IconUIResource, MetalCheckBoxIcon, MetalIconFactory.PaletteCloseIcon, MetalIconFactory.FolderIcon16, MetalIconFactory.FileIcon16, MetalIconFactory.TreeControlIcon, MetalComboBoxIcon
public interface Icon

A small fixed size picture, typically used to decorate components.

See Also:
ImageIcon

Method Summary
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.

Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

getIconWidth

public int getIconWidth()
Returns the icon's width.
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Returns the icon's height.
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ImageIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ImageIcon

java.lang.Object
  |
  +--javax.swing.ImageIcon
All Implemented Interfaces:
Accessible, Icon, Serializable
public class ImageIcon
extends Object
implements Icon, Serializable, Accessible

An implementation of the Icon interface that paints Icons from Images. Images that are created from a URL or filename are preloaded using MediaTracker to monitor the loaded state of the image.

For further information and examples of using image icons, see How to Use Icons in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class ImageIcon.AccessibleImageIcon
This class implements accessibility support for the ImageIcon class.
Field Summary
protected static Component | component
protected static MediaTracker | tracker
Constructor Summary
ImageIcon()
Creates an uninitialized image icon.
ImageIcon(byte[] imageData)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG.
ImageIcon(byte[] imageData, String description)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG.
ImageIcon(Image image)
Creates an ImageIcon from an image object.
ImageIcon(Image image, String description)
Creates an ImageIcon from the image.
ImageIcon(String filename)
Creates an ImageIcon from the specified file.
ImageIcon(String filename, String description)
Creates an ImageIcon from the specified file.
ImageIcon(URL location)
Creates an ImageIcon from the specified URL.
ImageIcon(URL location, String description)
Creates an ImageIcon from the specified URL.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this ImageIcon.
String | getDescription() Gets the description of the image.
int | getIconHeight() Gets the height of the icon.
int | getIconWidth() Gets the width of the icon.
Image | getImage() Returns this icon's Image.
int | getImageLoadStatus() Returns the status of the image loading operation.
ImageObserver | getImageObserver() Returns the image observer for the image.
protected void | loadImage(Image image) Loads the image, returning only when the image is loaded.
void | paintIcon(Component c, Graphics g, int x, int y) Paints the icon.
void | setDescription(String description) Sets the description of the image.
void | setImage(Image image) Sets the image displayed by this icon.
void | setImageObserver(ImageObserver observer) Sets the image observer for the image.
String | toString() Returns a string representation of this image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

component

protected static final Component component

tracker

protected static final MediaTracker tracker
Constructor Detail

ImageIcon

public ImageIcon(String filename,
                 String description)
Creates an ImageIcon from the specified file. The image will be preloaded by using MediaTracker to monitor the loading state of the image.
Parameters:
filename - the name of the file containing the image
description - a brief textual description of the image
See Also:
ImageIcon(String)

ImageIcon

public ImageIcon(String filename)
Creates an ImageIcon from the specified file. The image will be preloaded by using MediaTracker to monitor the loading state of the image. The specified String can be a file name or a file path. When specifying a path, use the Internet-standard forward-slash ("/") as a separator. (The string is converted to an URL, so the forward-slash works on all systems.) For example, specify:
    new ImageIcon("images/myImage.gif")
The description is initialized to the filename string.
Parameters:
filename - a String specifying a filename or path
See Also:
getDescription()

ImageIcon

public ImageIcon(URL location,
                 String description)
Creates an ImageIcon from the specified URL. The image will be preloaded by using MediaTracker to monitor the loaded state of the image.
Parameters:
location - the URL for the image
description - a brief textual description of the image
See Also:
ImageIcon(String)

ImageIcon

public ImageIcon(URL location)
Creates an ImageIcon from the specified URL. The image will be preloaded by using MediaTracker to monitor the loaded state of the image. The icon's description is initialized to be a string representation of the URL.
Parameters:
location - the URL for the image
See Also:
getDescription()

ImageIcon

public ImageIcon(Image image,
                 String description)
Creates an ImageIcon from the image.
Parameters:
image - the image
description - a brief textual description of the image

ImageIcon

public ImageIcon(Image image)
Creates an ImageIcon from an image object. If the image has a "comment" property that is a string, then the string is used as the description of this icon.
Parameters:
image - the image
See Also:
getDescription(), Image.getProperty(java.lang.String, java.awt.image.ImageObserver)

ImageIcon

public ImageIcon(byte[] imageData,
                 String description)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG. Normally this array is created by reading an image using Class.getResourceAsStream(), but the byte array may also be statically stored in a class.
Parameters:
imageData - an array of pixels in an image format supported by the AWT Toolkit, such as GIF or JPEG.
description - a brief textual description of the image
See Also:
Toolkit.createImage(java.lang.String)

ImageIcon

public ImageIcon(byte[] imageData)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG. Normally this array is created by reading an image using Class.getResourceAsStream(), but the byte array may also be statically stored in a class. If the resulting image has a "comment" property that is a string, then the string is used as the description of this icon.
Parameters:
imageData - an array of pixels in an image format supported by the AWT Toolkit, such as GIF or JPEG
See Also:
Toolkit.createImage(java.lang.String),
getDescription(),
Image.getProperty(java.lang.String, java.awt.image.ImageObserver)

ImageIcon

public ImageIcon()
Creates an uninitialized image icon.
Method Detail

loadImage

protected void loadImage(Image image)
Loads the image, returning only when the image is loaded.
Parameters:
image - the image

getImageLoadStatus

public int getImageLoadStatus()
Returns the status of the image loading operation.
Returns:
the loading status as defined by java.awt.MediaTracker
See Also:
MediaTracker.ABORTED, MediaTracker.ERRORED, MediaTracker.COMPLETE

getImage

public Image getImage()
Returns this icon's Image.
Returns:
the Image object for this ImageIcon

setImage

public void setImage(Image image)
Sets the image displayed by this icon.
Parameters:
image - the image

getDescription

public String getDescription()
Gets the description of the image. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the image. The description may be null.
Returns:
a brief textual description of the image

setDescription

public void setDescription(String description)
Sets the description of the image. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the image.
Parameters:
description - a brief textual description of the image

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Paints the icon. The top-left corner of the icon is drawn at the point (x, y) in the coordinate space of the graphics context g. If this icon has no image observer, this method uses the c component as the observer.
Specified by:
paintIcon in interface Icon
Parameters:
c - the component to be used as the observer if this icon has no image observer
g - the graphics context
x - the X coordinate of the icon's top-left corner
y - the Y coordinate of the icon's top-left corner

getIconWidth

public int getIconWidth()
Gets the width of the icon.
Specified by:
getIconWidth in interface Icon
Returns:
the width in pixels of this icon

getIconHeight

public int getIconHeight()
Gets the height of the icon.
Specified by:
getIconHeight in interface Icon
Returns:
the height in pixels of this icon

setImageObserver

public void setImageObserver(ImageObserver observer)
Sets the image observer for the image. Set this property if the ImageIcon contains an animated GIF, so the observer is notified to update its display. For example:
     icon = new ImageIcon(...)
     button.setIcon(icon);
     icon.setImageObserver(button);
Parameters:
observer - the image observer

getImageObserver

public ImageObserver getImageObserver()
Returns the image observer for the image.
Returns:
the image observer, which may be null

toString

public String toString()
Returns a string representation of this image.
Overrides:
toString in class Object
Returns:
a string representing this image

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this ImageIcon. For image icons, the AccessibleContext takes the form of an AccessibleImageIcon. A new AccessibleImageIcon instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Returns:
an AccessibleImageIcon that serves as the AccessibleContext of this ImageIcon
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class InputMap

java.lang.Object
  |
  +--javax.swing.InputMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComponentInputMap, InputMapUIResource
public class InputMap
extends Object
implements Serializable

InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object. InputMaps are usually used with an ActionMap, to determine an Action to perform when a key is pressed. An InputMap can have a parent that is searched for bindings not defined in the InputMap.

As with ActionMap if you create a cycle, eg:

   InputMap am = new InputMap();
   InputMap bm = new InputMap():
   am.setParent(bm);
   bm.setParent(am);
some of the methods will cause a StackOverflowError to be thrown.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InputMap()
Creates an InputMap with no parent and no mappings.
Method Summary
KeyStroke[] | allKeys() Returns an array of the KeyStrokes defined in this InputMap and its parent.
void | clear() Removes all the mappings from this InputMap.
Object | get(KeyStroke keyStroke) Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.
InputMap | getParent() Gets this InputMap's parent.
KeyStroke[] | keys() Returns the KeyStrokes that are bound in this InputMap.
void | put(KeyStroke keyStroke, Object actionMapKey) Adds a binding for keyStroke to actionMapKey.
void | remove(KeyStroke key) Removes the binding for key from this InputMap.
void | setParent(InputMap map) Sets this InputMap's parent.
int | size() Returns the number of KeyStroke bindings.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputMap

public InputMap()
Creates an InputMap with no parent and no mappings.
Method Detail

setParent

public void setParent(InputMap map)
Sets this InputMap's parent.
Parameters:
map - the InputMap that is the parent of this one

getParent

public InputMap getParent()
Gets this InputMap's parent.
Returns:
map the InputMap that is the parent of this one, or null if this InputMap has no parent

put

public void put(KeyStroke keyStroke,
                Object actionMapKey)
Adds a binding for keyStroke to actionMapKey. If actionMapKey is null, this removes the current binding for keyStroke.

get

public Object get(KeyStroke keyStroke)
Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.

remove

public void remove(KeyStroke key)
Removes the binding for key from this InputMap.

clear

public void clear()
Removes all the mappings from this InputMap.

keys

public KeyStroke[] keys()
Returns the KeyStrokes that are bound in this InputMap.

size

public int size()
Returns the number of KeyStroke bindings.

allKeys

public KeyStroke[] allKeys()
Returns an array of the KeyStrokes defined in this InputMap and its parent. This differs from keys() in that this method includes the keys defined in the parent.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputVerifier

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class InputVerifier

java.lang.Object
  |
  +--javax.swing.InputVerifier
public abstract class InputVerifier
extends Object

The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields. Such GUIs often need to ensure that the text entered by the user is valid (for example, that it's in the proper format) before allowing the user to navigate out of the text field. To do this, clients create a subclass of InputVerifier and, using JComponent's setInputVerifier method, attach an instance of their subclass to the JComponent whose input they want to validate. Before focus is transfered to another Swing component that requests it, the input verifier's shouldYieldFocus method is called. Focus is transfered only if that method returns true.

The following example has two text fields, with the first one expecting the string "pass" to be entered by the user. If that string is entered in the first text field, then the user can advance to the second text field either by clicking in it or by pressing TAB. However, if another string is entered in the first text field, then the user will be unable to transfer focus to the second text field.

 import java.awt.*;
 import java.util.*;
 import java.awt.event.*;
 import javax.swing.*;

 // This program demonstrates the use of the Swing InputVerifier class.
 // It creates two text fields; the first of the text fields expects the
 // string "pass" as input, and will allow focus to advance out of it
 // only after that string is typed in by the user.

 class VerifierTest extends JFrame {

  public VerifierTest () {
    JTextField tf;
    tf = new JTextField ("TextField1");

    getContentPane().add (tf, BorderLayout.NORTH);
    tf.setInputVerifier(new PassVerifier());

    tf = new JTextField ("TextField2");
    getContentPane().add (tf, BorderLayout.SOUTH);

    addWindowListener (new MyWAdapter ());
  }

   public static void main (String [] args) {
     Frame f = new VerifierTest ();
     f.pack();
     f.show();
   }

   class MyWAdapter extends WindowAdapter {

     public void windowClosing(WindowEvent event) {
       System.exit (0);
     }
   }

   class PassVerifier extends InputVerifier {

     public boolean verify(JComponent input) {
       JTextField tf = (JTextField) input;
       String pass = tf.getText();
       if (pass.equals("pass")) return true;
       else return false;
     }
   }
 }

Since:
1.3

Constructor Summary
InputVerifier()
Method Summary
boolean | shouldYieldFocus(JComponent input) Calls verify(input) to ensure that the input is valid.
abstract boolean | verify(JComponent input) Checks whether the JComponent's input is valid.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputVerifier

public InputVerifier()
Method Detail

verify

public abstract boolean verify(JComponent input)
Checks whether the JComponent's input is valid. This method should have no side effects. It returns a boolean indicating the status of the argument's input.
Parameters:
input - the JComponent to verify
Returns:
true when valid, false when invalid
See Also:
JComponent.setInputVerifier(javax.swing.InputVerifier), JComponent.getInputVerifier()

shouldYieldFocus

public boolean shouldYieldFocus(JComponent input)
Calls verify(input) to ensure that the input is valid. This method can have side effects. In particular, this method is called when the user attempts to advance focus out of the argument component into another Swing component in this window. If this method returns true, then the focus is transfered normally; if it returns false, then the focus remains in the argument component.
Parameters:
input - the JComponent to verify
Returns:
true when valid, false when invalid
See Also:
JComponent.setInputVerifier(javax.swing.InputVerifier), JComponent.getInputVerifier()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


insideTimerAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ToolTipManager.insideTimerAction

java.lang.Object
  |
  +--javax.swing.ToolTipManager.insideTimerAction
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
ToolTipManager
protected class ToolTipManager.insideTimerAction
extends Object
implements ActionListener

Constructor Summary
protected ToolTipManager.insideTimerAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToolTipManager.insideTimerAction

protected ToolTipManager.insideTimerAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JApplet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable
public class JApplet
extends Applet
implements Accessible, RootPaneContainer

An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture. You can find task-oriented documentation about using JApplet in The Java Tutorial, in the section How to Make Applets.

The JApplet class is slightly incompatible with java.applet.Applet. JApplet contains a JRootPane as it's only child. The contentPane should be the parent of any children of the JApplet. This is different than java.applet.Applet, e.g. to add a child to an an java.applet.Applet you'd write:

       applet.add(child);
However using JApplet you need to add the child to the JApplet's contentPane instead:
       applet.getContentPane().add(child);
The same is true for setting LayoutManagers, removing components, listing children, etc. All these methods should normally be sent to the contentPane() instead of the JApplet itself. The contentPane() will always be non-null. Attempting to set it to null will cause the JApplet to throw an exception. The default contentPane() will have a BorderLayout manager set on it.

Please see the JRootPane documentation for a complete description of the contentPane, glassPane, and layeredPane properties.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JApplet key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JApplet.AccessibleJApplet
This class implements accessibility support for the JApplet class.
Inner classes inherited from class java.applet.Applet
Applet.AccessibleApplet
Inner classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext
protected JRootPane | rootPane
protected boolean | rootPaneCheckingEnabled
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JApplet()
Creates a swing applet instance.
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
protected JRootPane | createRootPane() Called by the constructor methods to create the default rootPane.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JApplet.
Container | getContentPane() Returns the contentPane object for this applet.
Component | getGlassPane() Returns the glassPane object for this applet.
JMenuBar | getJMenuBar() Returns the menubar set on this applet.
JLayeredPane | getLayeredPane() Returns the layeredPane object for this applet.
JRootPane | getRootPane() Returns the rootPane object for this applet.
protected boolean | isRootPaneCheckingEnabled()
protected String | paramString() Returns a string representation of this JApplet.
protected void | processKeyEvent(KeyEvent e) Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
void | remove(Component comp) Removes the specified component from this container.
void | setContentPane(Container contentPane) Sets the contentPane property.
void | setGlassPane(Component glassPane) Sets the glassPane property.
void | setJMenuBar(JMenuBar menuBar) Sets the menubar for this applet.
void | setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
protected void | setRootPane(JRootPane root) Sets the rootPane property.
protected void | setRootPaneCheckingEnabled(boolean enabled) If true then calls to add() and setLayout() will cause an exception to be thrown.
void | update(Graphics g) Just calls paint(g).
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
Methods inherited from class java.awt.Panel
addNotify
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

rootPane

protected JRootPane rootPane
See Also:
getRootPane(), setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
See Also:
isRootPaneCheckingEnabled(), setRootPaneCheckingEnabled(boolean)

accessibleContext

protected AccessibleContext accessibleContext
Constructor Detail

JApplet

public JApplet()
Creates a swing applet instance.
Method Detail

createRootPane

protected JRootPane createRootPane()
Called by the constructor methods to create the default rootPane.

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Description copied from class: Component
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

This method is not called unless key events are enabled for this component. Key events are enabled when one of the following occurs:

  • A KeyListener object is registered via addKeyListener.
  • Key events are enabled via enableEvents.
Overrides:
processKeyEvent in class Component
Following copied from class: java.awt.Component
Parameters:
e - the key event.
See Also:
KeyEvent, KeyListener, Component.addKeyListener(java.awt.event.KeyListener), Component.enableEvents(long)

update

public void update(Graphics g)
Just calls paint(g). This method was overridden to prevent an unneccessary call to clear the background.
Overrides:
update in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

setJMenuBar

public void setJMenuBar(JMenuBar menuBar)
Sets the menubar for this applet.
Parameters:
menubar - the menubar being placed in the applet
See Also:
getJMenuBar()

getJMenuBar

public JMenuBar getJMenuBar()
Returns the menubar set on this applet.
See Also:
setJMenuBar(javax.swing.JMenuBar)

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns:
true if add and setLayout should be checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
If true then calls to add() and setLayout() will cause an exception to be thrown.
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thiComponent.getContentPane().add(child)
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
addImpl in class Container
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.
Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thiComponent.getContentPane().setLayout(new BorderLayout())
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
setLayout in class Container
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this applet.
Specified by:
getRootPane in interface RootPaneContainer
See Also:
setRootPane(javax.swing.JRootPane), RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the rootPane property. This method is called by the constructor.
Parameters:
root - the rootPane object for this applet
See Also:
getRootPane()

getContentPane

public Container getContentPane()
Returns the contentPane object for this applet.
Specified by:
getContentPane in interface RootPaneContainer
See Also:
setContentPane(java.awt.Container), RootPaneContainer.getContentPane()

setContentPane

public void setContentPane(Container contentPane)
Sets the contentPane property. This method is called by the constructor.
Specified by:
setContentPane in interface RootPaneContainer
Parameters:
contentPane - the contentPane object for this applet
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
getContentPane(), RootPaneContainer.setContentPane(java.awt.Container)

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane object for this applet.
Specified by:
getLayeredPane in interface RootPaneContainer
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
Sets the layeredPane property. This method is called by the constructor.
Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layeredPane - the layeredPane object for this applet
See Also:
getLayeredPane(), RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glassPane object for this applet.
Specified by:
getGlassPane in interface RootPaneContainer
See Also:
setGlassPane(java.awt.Component), RootPaneContainer.getGlassPane()

setGlassPane

public void setGlassPane(Component glassPane)
Sets the glassPane property. This method is called by the constructor.
Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - the glassPane object for this applet
See Also:
getGlassPane(), RootPaneContainer.setGlassPane(java.awt.Component)

paramString

protected String paramString()
Returns a string representation of this JApplet. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class Container
Returns:
a string representation of this JApplet.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JApplet. For JApplets, the AccessibleContext takes the form of an AccessibleJApplet. A new AccessibleJApplet instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Applet
Returns:
an AccessibleJApplet that serves as the AccessibleContext of this JApplet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
BasicArrowButton, MetalComboBoxButton
public class JButton
extends AbstractButton
implements Accessible

An implementation of a "push" button. See How to Use Buttons, Check Boxes, and Radio Buttons in The Java Tutorial for information and examples of using buttons.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JButton key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JButton.AccessibleJButton
This class implements accessibility support for the JButton class.
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JButton()
Creates a button with no set text or icon.
JButton(Action a)
Creates a button where properties are taken from the Action supplied.
JButton(Icon icon)
Creates a button with an icon.
JButton(String text)
Creates a button with text.
JButton(String text, Icon icon)
Creates a button with initial text and an icon.
Method Summary
protected void | configurePropertiesFromAction(Action a) Factory method which sets the AbstractButton's properties according to values from the Action instance.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JButton.
String | getUIClassID() Returns a string that specifies the name of the L&F class that renders this component.
boolean | isDefaultButton() Returns whether or not this button is the default button on the RootPane.
boolean | isDefaultCapable() Returns whether or not this button is capable of being the default button on the RootPane.
protected String | paramString() Returns a string representation of this JButton.
void | removeNotify() Overrides JComponent.removeNotify to check if this button is currently set as the default button on the RootPane, and if so, sets the RootPane's default button to null to ensure the RootPane doesn't hold onto an invalid button reference.
void | setDefaultCapable(boolean defaultCapable) Sets whether or not this button is capable of being the default button on the RootPane.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JButton

public JButton()
Creates a button with no set text or icon.

JButton

public JButton(Icon icon)
Creates a button with an icon.
Parameters:
icon - the Icon image to display on the button

JButton

public JButton(String text)
Creates a button with text.
Parameters:
text - the text of the button

JButton

public JButton(Action a)
Creates a button where properties are taken from the Action supplied.
Since:
1.3

JButton

public JButton(String text,
               Icon icon)
Creates a button with initial text and an icon.
Parameters:
text - the text of the button.
icon - the Icon image to display on the button
Method Detail

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class AbstractButton
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"ButtonUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

isDefaultButton

public boolean isDefaultButton()
Returns whether or not this button is the default button on the RootPane.
Returns:
"boolean"
See Also:
JRootPane.setDefaultButton(javax.swing.JButton)

isDefaultCapable

public boolean isDefaultCapable()
Returns whether or not this button is capable of being the default button on the RootPane.
Returns:
"boolean"
See Also:
setDefaultCapable(boolean), isDefaultButton(), JRootPane.setDefaultButton(javax.swing.JButton)

setDefaultCapable

public void setDefaultCapable(boolean defaultCapable)
Sets whether or not this button is capable of being the default button on the RootPane.
Returns:
"boolean"
See Also:
isDefaultCapable()

removeNotify

public void removeNotify()
Overrides JComponent.removeNotify to check if this button is currently set as the default button on the RootPane, and if so, sets the RootPane's default button to null to ensure the RootPane doesn't hold onto an invalid button reference.
Overrides:
removeNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the AbstractButton's properties according to values from the Action instance. The properties which get set may differ for AbstractButton subclasses. By default, the properties which get set are Text, Icon Enabled, and ToolTipText.
Overrides:
configurePropertiesFromAction in class AbstractButton
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

paramString

protected String paramString()
Returns a string representation of this JButton. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class AbstractButton
Returns:
a string representation of this JButton.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JButton. For JButtons, the AccessibleContext takes the form of an AccessibleJButton. A new AccessibleJButton instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJButton that serves as the AccessibleContext of this JButton
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JCheckBox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JCheckBox

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JToggleButton
                                |
                                +--javax.swing.JCheckBox
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
public class JCheckBox
extends JToggleButton
implements Accessible

An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user. By convention, any number of check boxes in a group can be selected. See How to Use Buttonc, Check Boxes, and Radio Buttons in The Java Tutorial for examples and information on using check boxes.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JCheckBox key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JRadioButton, Serialized Form

Inner Class Summary
protected  class JCheckBox.AccessibleJCheckBox
This class implements accessibility support for the JCheckBox class.
Inner classes inherited from class javax.swing.JToggleButton
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static String BORDER_PAINTED_FLAT_CHANGED_PROPERTY
Identifies a change to the flat property.
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JCheckBox()
Creates an initially unselected check box button with no text, no icon.
JCheckBox(Action a)
Creates a check box where properties are taken from the Action supplied.
JCheckBox(Icon icon)
Creates an initially unselected check box with an icon.
JCheckBox(Icon icon, boolean selected)
Creates a check box with an icon and specifies whether or not it is initially selected.
JCheckBox(String text)
Creates an initially unselected check box with text.
JCheckBox(String text, boolean selected)
Creates a check box with text and specifies whether or not it is initially selected.
JCheckBox(String text, Icon icon)
Creates an initially unselected check box with the specified text and icon.
JCheckBox(String text, Icon icon, boolean selected)
Creates a check box with text and icon, and specifies whether or not it is initially selected.
Method Summary
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JCheckBox.
String | getUIClassID() Returns a string that specifies the name of the L&F class that renders this component.
boolean | isBorderPaintedFlat() Returns whether the border should be painted flat.
protected String | paramString() Returns a string representation of this JCheckBox.
void | setBorderPaintedFlat(boolean b) Sets whether the border should be painted flat.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

BORDER_PAINTED_FLAT_CHANGED_PROPERTY

public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY
Identifies a change to the flat property.
Constructor Detail

JCheckBox

public JCheckBox()
Creates an initially unselected check box button with no text, no icon.

JCheckBox

public JCheckBox(Icon icon)
Creates an initially unselected check box with an icon.
Parameters:
icon - the Icon image to display

JCheckBox

public JCheckBox(Icon icon,
                 boolean selected)
Creates a check box with an icon and specifies whether or not it is initially selected.
Parameters:
icon - the Icon image to display
selected - a boolean value indicating the initial selection state. If true the check box is selected

JCheckBox

public JCheckBox(String text)
Creates an initially unselected check box with text.
Parameters:
text - the text of the check box.

JCheckBox

public JCheckBox(Action a)
Creates a check box where properties are taken from the Action supplied.
Since:
1.3

JCheckBox

public JCheckBox(String text,
                 boolean selected)
Creates a check box with text and specifies whether or not it is initially selected.
Parameters:
text - the text of the check box.
selected - a boolean value indicating the initial selection state. If true the check box is selected

JCheckBox

public JCheckBox(String text,
                 Icon icon)
Creates an initially unselected check box with the specified text and icon.
Parameters:
text - the text of the check box.
icon - the Icon image to display

JCheckBox

public JCheckBox(String text,
                 Icon icon,
                 boolean selected)
Creates a check box with text and icon, and specifies whether or not it is initially selected.
Parameters:
text - the text of the check box.
icon - the Icon image to display
selected - a boolean value indicating the initial selection state. If true the check box is selected
Method Detail

setBorderPaintedFlat

public void setBorderPaintedFlat(boolean b)
Sets whether the border should be painted flat. This is usually set to true when a JCheckBox instance is used as a renderer in a component such as a JTable or JTree.
Parameters:
b - if true, the border is painted flat.
See Also:
isBorderPaintedFlat()

isBorderPaintedFlat

public boolean isBorderPaintedFlat()
Returns whether the border should be painted flat.
See Also:
setBorderPaintedFlat(boolean)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JToggleButton
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JToggleButton
Returns:
"CheckBoxUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Text, Icon Enabled, and ToolTipText.
Overrides:
configurePropertiesFromAction in class AbstractButton
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Icon, Enabled, ToolTipText). Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.
Overrides:
createActionPropertyChangeListener in class AbstractButton
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

paramString

protected String paramString()
Returns a string representation of this JCheckBox. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null. specific new aspects of the JFC components.
Overrides:
paramString in class JToggleButton
Returns:
a string representation of this JCheckBox.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JCheckBox. For JCheckBoxes, the AccessibleContext takes the form of an AccessibleJCheckBox. A new AccessibleJCheckBox instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JToggleButton
Returns:
an AccessibleJCheckBox that serves as the AccessibleContext of this JCheckBox
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JCheckBoxMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JCheckBoxMenuItem

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JMenuItem
                                |
                                +--javax.swing.JCheckBoxMenuItem
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants
public class JCheckBoxMenuItem
extends JMenuItem
implements SwingConstants, Accessible

A menu item that can be selected or deselected. If selected, the menu item typically appears with a checkmark next to it. If unselected or deselected, the menu item appears without a checkmark. Like a regular menu item, a check box menu item can have either text or a graphic icon associated with it, or both.

Either isSelected/setSelected or getState/setState can be used to determine/specify the menu item's selection state. The preferred methods are isSelected and setSelected, which work for all menus and buttons. The getState and setState methods exist for compatibility with other component sets.

For further information and examples of using check box menu items, see How to Use Menus, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JCheckBoxMenuItem key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem
This class implements accessibility support for the JCheckBoxMenuItem class.
Inner classes inherited from class javax.swing.JMenuItem
JMenuItem.AccessibleJMenuItem
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JCheckBoxMenuItem()
Creates an initially unselected check box menu item with no set text or icon.
JCheckBoxMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
JCheckBoxMenuItem(Icon icon)
Creates an initially unselected check box menu item with an icon.
JCheckBoxMenuItem(String text)
Creates an initially unselected check box menu item with text.
JCheckBoxMenuItem(String text, boolean b)
Creates a check box menu item with the specified text and selection state.
JCheckBoxMenuItem(String text, Icon icon)
Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(String text, Icon icon, boolean b)
Creates a check box menu item with the specified text, icon, and selection state.
Method Summary
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JCheckBoxMenuItem.
 Object[] getSelectedObjects()
Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.
 boolean getState()
Returns the selected-state of the item.
 String getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String paramString()
Returns a string representation of this JCheckBoxMenuItem.
 void requestFocus()
Override JComponent.requestFocus() to prevent grabbing the focus.
 void setState(boolean b)
Sets the selected-state of the item.
Methods inherited from class javax.swing.JMenuItem
addMenuDragMouseListener, addMenuKeyListener, configurePropertiesFromAction, createActionPropertyChangeListener, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, getComponent, getSubElements, init, isArmed, menuSelectionChanged, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setAccelerator, setArmed, setEnabled, setUI, updateUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JCheckBoxMenuItem

public JCheckBoxMenuItem()
Creates an initially unselected check box menu item with no set text or icon.

JCheckBoxMenuItem

public JCheckBoxMenuItem(Icon icon)
Creates an initially unselected check box menu item with an icon.
Parameters:
icon - the icon of the CheckBoxMenuItem.

JCheckBoxMenuItem

public JCheckBoxMenuItem(String text)
Creates an initially unselected check box menu item with text.
Parameters:
text - the text of the CheckBoxMenuItem

JCheckBoxMenuItem

public JCheckBoxMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
Since:
1.3

JCheckBoxMenuItem

public JCheckBoxMenuItem(String text,
                         Icon icon)
Creates an initially unselected check box menu item with the specified text and icon.
Parameters:
text - the text of the CheckBoxMenuItem
icon - the icon of the CheckBoxMenuItem

JCheckBoxMenuItem

public JCheckBoxMenuItem(String text,
                         boolean b)
Creates a check box menu item with the specified text and selection state.
Parameters:
text - the text of the check box menu item.
b - the selected state of the check box menu item

JCheckBoxMenuItem

public JCheckBoxMenuItem(String text,
                         Icon icon,
                         boolean b)
Creates a check box menu item with the specified text, icon, and selection state.
Parameters:
text - the text of the check box menu item
icon - the icon of the check box menu item
b - the selected state of the check box menu item
Method Detail

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JMenuItem
Returns:
"CheckBoxMenuItemUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getState

public boolean getState()
Returns the selected-state of the item. This method exists for AWT compatibility only. New code should use isSelected() instead.
Returns:
true if the item is selected

setState

public void setState(boolean b)
Sets the selected-state of the item. This method exists for AWT compatibility only. New code should use setSelected() instead.
Parameters:
b - a boolean value indicating the item's selected-state, where true=selected

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.
Overrides:
getSelectedObjects in class AbstractButton
Returns:
an array containing one Object -- the text of the menu item -- if the item is selected; otherwise null

requestFocus

public void requestFocus()
Override JComponent.requestFocus() to prevent grabbing the focus.
Overrides:
requestFocus in class JComponent
Following copied from class: java.awt.Component
See Also:
FocusEvent,
Component.addFocusListener(java.awt.event.FocusListener),
Component.processFocusEvent(java.awt.event.FocusEvent),
Component.isFocusTraversable()

paramString

protected String paramString()
Returns a string representation of this JCheckBoxMenuItem. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JMenuItem
Returns:
a string representation of this JCheckBoxMenuItem.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JCheckBoxMenuItem. For JCheckBoxMenuItems, the AccessibleContext takes the form of an AccessibleJCheckBoxMenuItem. A new AccessibleJCheckBoxMenuItem instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JMenuItem
Returns:
an AccessibleJCheckBoxMenuItem that serves as the AccessibleContext of this AccessibleJCheckBoxMenuItem
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JColorChooser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JColorChooser

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JColorChooser
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JColorChooser
extends JComponent
implements Accessible

JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color. For information about using color choosers, see How to Use Color Choosers, a section in The Java Tutorial.

This class provides three levels of API:

  1. A static convenience method which shows a modal color-chooser dialog and returns the color selected by the user.
  2. A static convenience method for creating a color-chooser dialog where ActionListeners can be specified to be invoked when the user presses one of the dialog buttons.
  3. The ability to create instances of JColorChooser panes directly (within any container). PropertyChange listeners can be added to detect when the current "color" property changes.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JColorChooser.AccessibleJColorChooser
This class implements accessibility support for the JColorChooser class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext
static String | CHOOSER_PANELS_PROPERTY The chooserPanel array property name.
static String | PREVIEW_PANEL_PROPERTY The preview panel property name.
static String | SELECTION_MODEL_PROPERTY The selection model property name.
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JColorChooser()
Creates a color chooser pane with an initial color of white.
JColorChooser(Color initialColor)
Creates a color chooser pane with the specified initial color.
JColorChooser(ColorSelectionModel model)
Creates a color chooser pane with the specified ColorSelectionModel.
Method Summary
void | addChooserPanel(AbstractColorChooserPanel panel) Adds a color chooser panel to the color chooser.
static JDialog | createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JColorChooser.
AbstractColorChooserPanel[] | getChooserPanels() Returns the specified color panels.
Color | getColor() Gets the current color value from the color chooser.
JComponent | getPreviewPanel() Returns the preview panel that shows a chosen color.
ColorSelectionModel | getSelectionModel() Returns the data model that handles color selections.
ColorChooserUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
protected String | paramString() Returns a string representation of this JColorChooser.
AbstractColorChooserPanel | removeChooserPanel(AbstractColorChooserPanel panel) Removes the Color Panel specified.
void | setChooserPanels(AbstractColorChooserPanel[] panels) Specifies the Color Panels used to choose a color value.
void | setColor(Color color) Sets the current color of the color chooser to the specified color.
void | setColor(int c) Sets the current color of the color chooser to the specified color.
void | setColor(int r, int g, int b) Sets the current color of the color chooser to the specified RGB color.
void | setPreviewPanel(JComponent preview) Sets the current preview panel.
void | setSelectionModel(ColorSelectionModel newModel) Set the model containing the selected color.
void | setUI(ColorChooserUI ui) Sets the L&F object that renders this component.
static Color | showDialog(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SELECTION_MODEL_PROPERTY

public static final String SELECTION_MODEL_PROPERTY
The selection model property name.

PREVIEW_PANEL_PROPERTY

public static final String PREVIEW_PANEL_PROPERTY
The preview panel property name.

CHOOSER_PANELS_PROPERTY

public static final String CHOOSER_PANELS_PROPERTY
The chooserPanel array property name.

accessibleContext

protected AccessibleContext accessibleContext
Constructor Detail

JColorChooser

public JColorChooser()
Creates a color chooser pane with an initial color of white.

JColorChooser

public JColorChooser(Color initialColor)
Creates a color chooser pane with the specified initial color.
Parameters:
initialColor - the initial color set in the chooser

JColorChooser

public JColorChooser(ColorSelectionModel model)
Creates a color chooser pane with the specified ColorSelectionModel.
Parameters:
initialColor - the initial color set in the chooser
Method Detail

showDialog

public static Color showDialog(Component component,
                               String title,
                               Color initialColor)
Shows a modal color-chooser dialog and blocks until the dialog is hidden. If the user presses the "OK" button, then this method hides/disposes the dialog and returns the selected color. If the user presses the "Cancel" button or closes the dialog without pressing "OK", then this method hides/disposes the dialog and returns null.
Parameters:
component - the parent Component for the dialog
title - the String containing the dialog's title
initialColor - the initial Color set when the color-chooser is shown

createDialog

public static JDialog createDialog(Component c,
                                   String title,
                                   boolean modal,
                                   JColorChooser chooserPane,
                                   ActionListener okListener,
                                   ActionListener cancelListener)
Creates and returns a new dialog containing the specified ColorChooser` pane along with "OK", "Cancel", and "Reset" buttons. If the "OK" or "Cancel" buttons are pressed, the dialog is automatically hidden (but not disposed). If the "Reset" button is pressed, the color-chooser's color will be reset to the color which was set the last time show was invoked on the dialog and the dialog will remain showing.
Parameters:
c - the parent component for the dialog
title - the title for the dialog
modal - a boolean. When true, the remainder of the program is inactive until the dialog is closed.
chooserPane - the color-chooser to be placed inside the dialog
okListener - the ActionListener invoked when "OK" is pressed
cancelListener - the ActionListener invoked when "Cancel" is pressed

getUI

public ColorChooserUI getUI()
Returns the L&F object that renders this component.
Returns:
the ColorChooserUI object that renders this component

setUI

public void setUI(ColorChooserUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ColorChooserUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ColorChooserUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getColor

public Color getColor()
Gets the current color value from the color chooser. By default, this delegates to the model.
Returns:
the current color value of the color chooser

setColor

public void setColor(Color color)
Sets the current color of the color chooser to the specified color. This will fire a PropertyChangeEvent for the property named "color".
Parameters:
color - the color to be set in the color chooser
See Also:
JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

setColor

public void setColor(int r,
                     int g,
                     int b)
Sets the current color of the color chooser to the specified RGB color. Note that the values of red, green, and blue should be between the numbers 0 and 255, inclusive.
Parameters:
r - an int specifying the amount of Red
g - an int specifying the amount of Green
b - an int specifying the amount of Blue
Throws:
IllegalArgumentException - if r,g,b values are out of range
See Also:
Color

setColor

public void setColor(int c)
Sets the current color of the color chooser to the specified color.
Parameters:
c - an int value that sets the current color in the chooser where the low-order 8 bits specify the Blue value, the next 8 bits specify the Green value, and the 8 bits above that specify the Red value.

setPreviewPanel

public void setPreviewPanel(JComponent preview)
Sets the current preview panel. This will fire a PropertyChangeEvent for the property named "previewPanel".
Parameters:
color - the color to be set in the color chooser
See Also:
JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

getPreviewPanel

public JComponent getPreviewPanel()
Returns the preview panel that shows a chosen color.
Returns:
a JComponent object -- the preview panel

addChooserPanel

public void addChooserPanel(AbstractColorChooserPanel panel)
Adds a color chooser panel to the color chooser.

removeChooserPanel

public AbstractColorChooserPanel removeChooserPanel(AbstractColorChooserPanel panel)
Removes the Color Panel specified.
Parameters:
name - a string that specifies the panel to be removed
Returns:
the color panel
Throws:
IllegalArgumentException - if panel is not in list of known chooser panels

setChooserPanels

public void setChooserPanels(AbstractColorChooserPanel[] panels)
Specifies the Color Panels used to choose a color value.
Parameters:
panels - an array of AbstractColorChooserPanel object

getChooserPanels

public AbstractColorChooserPanel[] getChooserPanels()
Returns the specified color panels.
Returns:
an array of AbstractColorChooserPanel objects

getSelectionModel

public ColorSelectionModel getSelectionModel()
Returns the data model that handles color selections.
Returns:
a ColorSelectionModel object

setSelectionModel

public void setSelectionModel(ColorSelectionModel newModel)
Set the model containing the selected color.
Parameters:
newModel - the new ColorSelectionModel object

paramString

protected String paramString()
Returns a string representation of this JColorChooser. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JColorChooser

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JColorChooser. For color choosers, the AccessibleContext takes the form of an AccessibleJColorChooser. A new AccessibleJColorChooser instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJColorChooser that serves as the AccessibleContext of this JColorChooser
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JComboBox

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComboBox

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JComboBox
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, ItemSelectable, ListDataListener, MenuContainer, Serializable
public class JComboBox
extends JComponent
implements ItemSelectable, ListDataListener, ActionListener, Accessible

A component that combines a button or text field and a drop-down list. The user can select a value from the drop-down list, which appears at the user's request. If you make the combo box editable, then the combo box includes a text field into which the user can type a value. For examples and information on using combo boxes see How to Use Combo Boxes, a section in The Java Tutorial.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JComboBox key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JComboBox.AccessibleJComboBox This class implements accessibility support for the JComboBox class.
static interface | JComboBox.KeySelectionManager The interface that defines a KeySelectionManager.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected String | actionCommand
protected ComboBoxModel | dataModel
protected ComboBoxEditor | editor
protected boolean | isEditable
protected JComboBox.KeySelectionManager | keySelectionManager
protected boolean | lightWeightPopupEnabled
protected int | maximumRowCount
protected ListCellRenderer | renderer
protected Object | selectedItemReminder
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JComboBox()
Creates a JComboBox with a default data model.
JComboBox(ComboBoxModel aModel)
Creates a JComboBox that takes it's items from an existing ComboBoxModel.
JComboBox(Object[] items)
Creates a JComboBox that contains the elements in the specified array.
JComboBox(Vector items)
Creates a JComboBox that contains the elements in the specified Vector.
Method Summary
void | actionPerformed(ActionEvent e) This method is public as an implementation side effect.
void | addActionListener(ActionListener l) Adds an ActionListener.
void | addItem(Object anObject) Adds an item to the item list.
void | addItemListener(ItemListener aListener) Adds an ItemListener.
void | configureEditor(ComboBoxEditor anEditor, Object anItem) Initializes the editor with the specified item.
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
void | contentsChanged(ListDataEvent e) This method is public as an implementation side effect.
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected JComboBox.KeySelectionManager | createDefaultKeySelectionManager() Returns an instance of the default key-selection manager.
protected void | fireActionEvent() Notifies all listeners that have registered interest for notification on this event type.
protected void | fireItemStateChanged(ItemEvent e) Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JComboBox.
Action | getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
String | getActionCommand() Returns the action command that is included in the event sent to action listeners.
ComboBoxEditor | getEditor() Returns the editor used to paint and edit the selected item in the JComboBox field.
Object | getItemAt(int index) Returns the list item at the specified index.
int | getItemCount() Returns the number of items in the list.
JComboBox.KeySelectionManager | getKeySelectionManager() Returns the list's key-selection manager.
int | getMaximumRowCount() Returns the maximum number of items the combo box can display without a scrollbar
ComboBoxModel | getModel() Returns the data model currently used by the JComboBox.
ListCellRenderer | getRenderer() Returns the renderer used to display the selected item in the JComboBox field.
int | getSelectedIndex() Returns the first item in the list that matches the given item.
Object | getSelectedItem() Returns the currently selected item.
Object[] | getSelectedObjects() Returns an array containing the selected item.
ComboBoxUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
void | hidePopup() Causes the combo box to close its popup window.
void | insertItemAt(Object anObject, int index) Inserts an item into the item list at a given index.
protected void | installAncestorListener()
void | intervalAdded(ListDataEvent e) Invoked items have been added to the internal data model.
void | intervalRemoved(ListDataEvent e) Invoked when values have been removed from the data model.
boolean | isEditable() Returns true if the JComboBox is editable.
boolean | isFocusTraversable() Returns true if the component can receive the focus.
boolean | isLightWeightPopupEnabled() Returns true if lightweight (all-Java) popups are in use, or false if heavyweight (native peer) popups are being used.
boolean | isPopupVisible() Determines the visibility of the popup.
protected String | paramString() Returns a string representation of this JComboBox.
void | processKeyEvent(KeyEvent e) Handles KeyEvents, looking for the Tab key.
void | removeActionListener(ActionListener l) Removes an ActionListener.
void | removeAllItems() Removes all items from the item list.
void | removeItem(Object anObject) Removes an item from the item list.
void | removeItemAt(int anIndex) Removes the item at anIndex This method works only if the JComboBox uses the default data model.
void | removeItemListener(ItemListener aListener) Removes an ItemListener.
protected void | selectedItemChanged() This method is called when the selected item changes.
boolean | selectWithKeyChar(char keyChar) Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character.
void | setAction(Action a) Sets the Action for the ActionEvent source.
void | setActionCommand(String aCommand) Sets the action commnand that should be included in the event sent to action listeners.
void | setEditable(boolean aFlag) Determines whether the JComboBox field is editable.
void | setEditor(ComboBoxEditor anEditor) Sets the editor used to paint and edit the selected item in the JComboBox field.
void | setEnabled(boolean b) Enables the combo box so that items can be selected.
void | setKeySelectionManager(JComboBox.KeySelectionManager aManager) Sets the object that translates a keyboard character into a list selection.
void | setLightWeightPopupEnabled(boolean aFlag) When displaying the popup, JComboBox choose to use a light weight popup if it fits.
void | setMaximumRowCount(int count) Sets the maximum number of rows the JComboBox displays.
void | setModel(ComboBoxModel aModel) Sets the data model that the JComboBox uses to obtain the list of items.
void | setPopupVisible(boolean v) Sets the visibility of the popup.
void | setRenderer(ListCellRenderer aRenderer) Sets the renderer that paints the item selected from the list in the JComboBox field.
void | setSelectedIndex(int anIndex) Selects the item at index anIndex.
void | setSelectedItem(Object anObject) Sets the selected item in the JComboBox by specifying the object in the list.
void | setUI(ComboBoxUI ui) Sets the L&F object that renders this component.
void | showPopup() Causes the combo box to display its popup window.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

dataModel

protected ComboBoxModel dataModel

renderer

protected ListCellRenderer renderer

editor

protected ComboBoxEditor editor

maximumRowCount

protected int maximumRowCount

isEditable

protected boolean isEditable

selectedItemReminder

protected Object selectedItemReminder

keySelectionManager

protected JComboBox.KeySelectionManager keySelectionManager

actionCommand

protected String actionCommand

lightWeightPopupEnabled

protected boolean lightWeightPopupEnabled
Constructor Detail

JComboBox

public JComboBox(ComboBoxModel aModel)
Creates a JComboBox that takes it's items from an existing ComboBoxModel. Since the ComboBoxModel is provided, a combo box created using this constructor does not create a default combo box model and may impact how the insert, remove and add methods behave.
Parameters:
aModel - the ComboBoxModel that provides the displayed list of items
See Also:
DefaultComboBoxModel

JComboBox

public JComboBox(Object[] items)
Creates a JComboBox that contains the elements in the specified array. By default the first item in the array (and therefore the data model) becomes selected.
Parameters:
items - an array of objects to insert into the combo box
See Also:
DefaultComboBoxModel

JComboBox

public JComboBox(Vector items)
Creates a JComboBox that contains the elements in the specified Vector. By default the first item in the vector and therefore the data model) becomes selected.
Parameters:
items - an array of vectors to insert into the combo box
See Also:
DefaultComboBoxModel

JComboBox

public JComboBox()
Creates a JComboBox with a default data model. The default data model is an empty list of objects. Use addItem to add items. By default the first item in the data model becomes selected.
See Also:
DefaultComboBoxModel
Method Detail

installAncestorListener

protected void installAncestorListener()

setUI

public void setUI(ComboBoxUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ComboBoxUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ComboBoxUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getUI

public ComboBoxUI getUI()
Returns the L&F object that renders this component.
Returns:
the ComboBoxUI object that renders this component

setModel

public void setModel(ComboBoxModel aModel)
Sets the data model that the JComboBox uses to obtain the list of items.
Parameters:
aModel - the ComboBoxModel that provides the displayed list of items

getModel

public ComboBoxModel getModel()
Returns the data model currently used by the JComboBox.
Returns:
the ComboBoxModel that provides the displayed list of items

setLightWeightPopupEnabled

public void setLightWeightPopupEnabled(boolean aFlag)
When displaying the popup, JComboBox choose to use a light weight popup if it fits. This method allows you to disable this feature. You have to do disable it if your application mixes light weight and heavy weights components.

isLightWeightPopupEnabled

public boolean isLightWeightPopupEnabled()
Returns true if lightweight (all-Java) popups are in use, or false if heavyweight (native peer) popups are being used.
Returns:
true if lightweight popups are in use

setEditable

public void setEditable(boolean aFlag)
Determines whether the JComboBox field is editable. An editable JComboBox allows the user to type into the field or selected an item from the list to initialize the field, after which it can be edited. (The editing affects only the field, the list item remains intact.) A non editable JComboBox displays the selected item in the field, but the selection cannot be modified.
Parameters:
aFlag - a boolean value, where true indicates that the field is editable

isEditable

public boolean isEditable()
Returns true if the JComboBox is editable. By default, a combo box is not editable.
Returns:
true if the JComboBox is editable, else false

setMaximumRowCount

public void setMaximumRowCount(int count)
Sets the maximum number of rows the JComboBox displays. If the number of objects in the model is greater than count, the combo box uses a scrollbar.
Parameters:
count - an integer specifying the maximum number of items to display in the list before using a scrollbar

getMaximumRowCount

public int getMaximumRowCount()
Returns the maximum number of items the combo box can display without a scrollbar
Returns:
an integer specifying the maximum number of items that are displayed in the list before using a scrollbar

setRenderer

public void setRenderer(ListCellRenderer aRenderer)
Sets the renderer that paints the item selected from the list in the JComboBox field. The renderer is used if the JComboBox is not editable. If it is editable, the editor is used to render and edit the selected item.

The default renderer displays a string, obtained by calling the selected object's toString method. Other renderers can handle graphic images and composite items.

To display the selected item, aRenderer.getListCellRendererComponent is called, passing the list object and an index of -1.

Parameters:
aRenderer - the ListCellRenderer that displays the selected item
See Also:
setEditor(javax.swing.ComboBoxEditor)

getRenderer

public ListCellRenderer getRenderer()
Returns the renderer used to display the selected item in the JComboBox field.
Returns:
the ListCellRenderer that displays the selected item.

setEditor

public void setEditor(ComboBoxEditor anEditor)
Sets the editor used to paint and edit the selected item in the JComboBox field. The editor is used only if the receiving JComboBox is editable. If not editable, the combo box uses the renderer to paint the selected item.
Parameters:
anEditor - the ComboBoxEditor that displays the selected item
See Also:
setRenderer(javax.swing.ListCellRenderer)

getEditor

public ComboBoxEditor getEditor()
Returns the editor used to paint and edit the selected item in the JComboBox field.
Returns:
the ComboBoxEditor that displays the selected item

setSelectedItem

public void setSelectedItem(Object anObject)
Sets the selected item in the JComboBox by specifying the object in the list. If anObject is in the list, the list displays with anObject selected.
Parameters:
anObject - the list object to select

getSelectedItem

public Object getSelectedItem()
Returns the currently selected item.
Returns:
the currently selected list object from the data model

setSelectedIndex

public void setSelectedIndex(int anIndex)
Selects the item at index anIndex.
Parameters:
anIndex - an integer specifying the list item to select, where 0 specifies the first item in the list
Throws:
IllegalArgumentException - if anIndex <-1 or="or" anIndex is greater than or equal to size

getSelectedIndex

public int getSelectedIndex()
Returns the first item in the list that matches the given item. The result is not always defined if the JComboBox allows selected items that are not in the list. Returns -1 if there is no selected item or if the user specified an item which is not in the list.
Returns:
an integer specifying the currently selected list item, where 0 specifies the first item in the list; or -1 if no item is selected or if the currently selected item is not in the list

addItem

public void addItem(Object anObject)
Adds an item to the item list. This method works only if the JComboBox uses the default data model. JComboBox uses the default data model when created with the empty constructor and no other model has been set.

Warning: Focus and keyboard navigation problems may arise if you add duplicate String objects. A workaround is to add new objects instead of String objects and make sure that the toString() method is defined. For example:

   comboBox.addItem(makeObj("Item 1"));
   comboBox.addItem(makeObj("Item 1"));
   ...
   private Object makeObj(final String item)  {
     return new Object() { public String toString() { return item; } };
   }
Parameters:
anObject - the Object to add to the list

insertItemAt

public void insertItemAt(Object anObject,
                         int index)
Inserts an item into the item list at a given index. This method works only if the JComboBox uses the default data model. JComboBox uses the default data model when created with the empty constructor and no other model has been set.
Parameters:
anObject - the Object to add to the list
index - an integer specifying the position at which to add the item

removeItem

public void removeItem(Object anObject)
Removes an item from the item list. This method works only if the JComboBox uses the default data model. JComboBox uses the default data model when created with the empty constructor and no other model has been set.
Parameters:
anObject - the object to remove from the item list

removeItemAt

public void removeItemAt(int anIndex)
Removes the item at anIndex This method works only if the JComboBox uses the default data model. JComboBox uses the default data model when created with the empty constructor and no other model has been set.
Parameters:
anIndex - an int specifying the idex of the item to remove, where 0 indicates the first item in the list

removeAllItems

public void removeAllItems()
Removes all items from the item list.

showPopup

public void showPopup()
Causes the combo box to display its popup window.
See Also:
setPopupVisible(boolean)

hidePopup

public void hidePopup()
Causes the combo box to close its popup window.
See Also:
setPopupVisible(boolean)

setPopupVisible

public void setPopupVisible(boolean v)
Sets the visibility of the popup.

isPopupVisible

public boolean isPopupVisible()
Determines the visibility of the popup.

addItemListener

public void addItemListener(ItemListener aListener)
Adds an ItemListener. aListener will receive an event when the selected item changes.
Specified by:
addItemListener in interface ItemSelectable
Parameters:
aListener - the ItemListener that is to be notified

removeItemListener

public void removeItemListener(ItemListener aListener)
Removes an ItemListener.
Specified by:
removeItemListener in interface ItemSelectable
Parameters:
aListener - the ItemListener to remove

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener. The listener will receive an action event the user finishes making a selection.
Parameters:
l - the ActionListener that is to be notified

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener.
Parameters:
l - the ActionListener to remove

setActionCommand

public void setActionCommand(String aCommand)
Sets the action commnand that should be included in the event sent to action listeners.
Parameters:
aCommand - a string containing the "command" that is sent to action listeners; the same listener can then do different things depending on the command it receives

getActionCommand

public String getActionCommand()
Returns the action command that is included in the event sent to action listeners.
Returns:
the string containing the "command" that is sent to action listeners.

setAction

public void setAction(Action a)
Sets the Action for the ActionEvent source. The new Action replaces any previously set Action but does not affect ActionListeners independantly added with addActionListener. If the Action is already a registered ActionListener for the ActionEvent source, it is not re-registered.

A side-effect of setting the Action is that the ActionEvent source's properties are immedately set from the values in the Action (performed by the method configurePropertiesFromAction) and subsequently updated as the Action's properties change (via a PropertyChangeListener created by the method createActionPropertyChangeListener.

Parameters:
a - the Action for the JComboBox, or null.
Since:
1.3
See Also:
Action,
getAction(),
configurePropertiesFromAction(javax.swing.Action),
createActionPropertyChangeListener(javax.swing.Action)

getAction

public Action getAction()
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Returns:
the Action for this ActionEvent source; or null
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Enabled and ToolTipText.
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Icon, Enabled, ToolTipText). Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

fireItemStateChanged

protected void fireItemStateChanged(ItemEvent e)
Notifies all listeners that have registered interest for notification on this event type.
Parameters:
e - the event of interest
See Also:
EventListenerList

fireActionEvent

protected void fireActionEvent()
Notifies all listeners that have registered interest for notification on this event type.
Parameters:
e - the event of interest
See Also:
EventListenerList

selectedItemChanged

protected void selectedItemChanged()
This method is called when the selected item changes. Its default implementation notifies the item listeners.

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array containing the selected item. This method is implemented for compatibility with ItemSelectable.
Specified by:
getSelectedObjects in interface ItemSelectable

actionPerformed

public void actionPerformed(ActionEvent e)
This method is public as an implementation side effect. do not call or override.
Specified by:
actionPerformed in interface ActionListener

contentsChanged

public void contentsChanged(ListDataEvent e)
This method is public as an implementation side effect. do not call or override.
Specified by:
contentsChanged in interface ListDataListener
See Also:
ListDataListener

selectWithKeyChar

public boolean selectWithKeyChar(char keyChar)
Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character. Otherwise, returns false.
Parameters:
keyChar - a char, typically this is a keyboard key typed by the user

intervalAdded

public void intervalAdded(ListDataEvent e)
Invoked items have been added to the internal data model. The "interval" includes the first and last values added.
Specified by:
intervalAdded in interface ListDataListener
See Also:
ListDataListener

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Invoked when values have been removed from the data model. The "interval" includes the first and last values removed.
Specified by:
intervalRemoved in interface ListDataListener
See Also:
ListDataListener

setEnabled

public void setEnabled(boolean b)
Enables the combo box so that items can be selected. When the combo box is disabled, items cannot be selected and values cannot be typed into its field (if it is editable).
Overrides:
setEnabled in class JComponent
Parameters:
b - a boolean value, where true enables the component and false disables it

configureEditor

public void configureEditor(ComboBoxEditor anEditor,
                            Object anItem)
Initializes the editor with the specified item.
Parameters:
anEditor - the ComboBoxEditor that displays the list item in the combo box field and allows it to be edited
anItem - the object to display and edit in the field

processKeyEvent

public void processKeyEvent(KeyEvent e)
Handles KeyEvents, looking for the Tab key. If the Tab key is found, the popup window is closed.
Overrides:
processKeyEvent in class JComponent
Parameters:
e - the KeyEvent containing the keyboard key that was pressed

isFocusTraversable

public boolean isFocusTraversable()
Returns true if the component can receive the focus. In this case, the component returns false if it is editable, so that the Editor object receives the focus, instead of the component.
Overrides:
isFocusTraversable in class JComponent
Returns:
true if the component can receive the focus, else false

setKeySelectionManager

public void setKeySelectionManager(JComboBox.KeySelectionManager aManager)
Sets the object that translates a keyboard character into a list selection. Typically, the first selection with a matching first character becomes the selected item.

getKeySelectionManager

public JComboBox.KeySelectionManager getKeySelectionManager()
Returns the list's key-selection manager.
Returns:
the KeySelectionManager currently in use

getItemCount

public int getItemCount()
Returns the number of items in the list.
Returns:
an integer equal to the number of items in the list

getItemAt

public Object getItemAt(int index)
Returns the list item at the specified index. If index is out of range (less than zero or greater than or equal to size) it will return null.
Parameters:
index - an integer indicating the list position, where the first item starts at zero
Returns:
the Object at that list position; or null if out of range

createDefaultKeySelectionManager

protected JComboBox.KeySelectionManager createDefaultKeySelectionManager()
Returns an instance of the default key-selection manager.
Returns:
the KeySelectionManager currently used by the list
See Also:
setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager)

paramString

protected String paramString()
Returns a string representation of this JComboBox. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JComboBox

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JComboBox. For combo boxes, the AccessibleContext takes the form of an AccessibleJComboBox. A new AccessibleJComboBox instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJComboBox that serves as the AccessibleContext of this JComboBox
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JComponent

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
AbstractButton, BasicInternalFrameTitlePane, JColorChooser, JComboBox, JFileChooser, JInternalFrame, JInternalFrame.JDesktopIcon, JLabel, JLayeredPane, JList, JMenuBar, JOptionPane, JPanel, JPopupMenu, JProgressBar, JRootPane, JScrollBar, JScrollPane, JSeparator, JSlider, JSplitPane, JTabbedPane, JTable, JTableHeader, JTextComponent, JToolBar, JToolTip, JTree, JViewport
public abstract class JComponent
extends Container
implements Serializable

The base class for all Swing components except top-level containers. To use a component that inherits from JComponent, you must place the component in a containment hierarchy whose root is a top-level Swing container. Top-level Swing containers -- such as JFrame, JDialog, and JApplet -- are specialized components that provide a place for other Swing components to paint themselves. For an explanation of containment hierarchies, see Swing Components and the Containment Hierarchy, a section in The Java Tutorial.

The JComponent class provides:

  • The base class for both standard and custom components that use the Swing architecture.
  • A "pluggable look and feel" (L&F) that can be specified by the programmer or (optionally) selected by the user at runtime. See How to Set the Look and Feel in The Java Tutorial for more information.
  • Comprehensive keystroke handling. See the document Keyboard Bindings in Swing, an article in The Swing Connection, for more information.
  • Support for tool tips -- short descriptions that pop up when the cursor lingers over a component. See How to Use Tool Tips in The Java Tutorial for more information.
  • Support for accessibility. JComponent contains all of the methods in the Accessible interface, but it doesn't actually implement the interface. That is the responsibility of the individual classes that extend JComponent.
  • Support for component-specific properties. With the putClientProperty(java.lang.Object, java.lang.Object) and getClientProperty(java.lang.Object) methods, you can associate name-object pairs with any object that descends from JComponent.
  • An infrastructure for painting that includes double buffering and support for borders. For more information see Painting and How to Use Borders, both of which are sections in The Java Tutorial.
For more information on these subjects, see the Swing package description and The Java Tutorial section The JComponent Class.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
KeyStroke, Action, setBorder(javax.swing.border.Border), registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int), JOptionPane, setDebugGraphicsOptions(int), setToolTipText(java.lang.String), setAutoscrolls(boolean), Serialized Form

Inner Class Summary
 class JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for accessibility.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext The AccessibleContext associated with this JComponent.
protected EventListenerList | listenerList
static String | TOOL_TIP_TEXT_KEY The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".
protected ComponentUI | ui
static int | UNDEFINED_CONDITION Constant used by some of the APIs to mean that no condition is defined.
static int | WHEN_ANCESTOR_OF_FOCUSED_COMPONENT Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is an ancestor of the focused component or is itself the focused component.
static int | WHEN_FOCUSED Constant used for registerKeyboardAction() that means that the command should be invoked when the component has the focus.
static int | WHEN_IN_FOCUSED_WINDOW Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is in the window that has the focus or is itself the focused component.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JComponent()
Default JComponent constructor.
Method Summary
 void addAncestorListener(AncestorListener listener)
Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible / invisible.
 void addNotify()
Notifies this component that it now has a parent component.
 void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property.
 void addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener to the listener list.
 void computeVisibleRect(Rectangle visibleRect)
Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for this component and all of its ancestors.
 boolean contains(int x, int y)
Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing.
 JToolTip createToolTip()
Returns the instance of JToolTip that should be used to display the tooltip.
 void disable()
overridden to ensure Accessibility support
 void enable()
overridden to ensure Accessibility support
 void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, byte oldValue, byte newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, char oldValue, char newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, double oldValue, double newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, float oldValue, float newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, int oldValue, int newValue)
Reports a bound property change.
 void firePropertyChange(String propertyName, long oldValue, long newValue)
Reports a bound property change.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
Supports reporting bound property changes.
 void firePropertyChange(String propertyName, short oldValue, short newValue)
Reports a bound property change.
protected  void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
Supports reporting constrained property changes.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JComponent.
 ActionListener getActionForKeyStroke(KeyStroke aKeyStroke)
Returns the object that will perform the action registered for a given keystroke.
 ActionMap getActionMap()
Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.
 float getAlignmentX()
Overrides Container.getAlignmentX to return the vertical alignment.
 float getAlignmentY()
Overrides Container.getAlignmentY to return the horizontal alignment.
 boolean getAutoscrolls()
Returns true if this component automatically scrolls its contents when dragged (when contained in a component that supports scrolling, like JViewport).
 Border getBorder()
Returns the border of this component or null if no border is currently set.
 Rectangle getBounds(Rectangle rv)
Stores the bounds of this component into "return value" rv and returns rv.
 Object getClientProperty(Object key)
Returns the value of the property with the specified key.
protected  Graphics getComponentGraphics(Graphics g)
Returns the graphics object used to paint this component.
 int getConditionForKeyStroke(KeyStroke aKeyStroke)
Returns the condition that determines whether a registered action occurs in response to the specified keystroke.
 int getDebugGraphicsOptions()
Returns the state of graphics debugging.
 Graphics getGraphics()
Returns this component's graphics context, which lets you draw on a component.
 int getHeight()
Returns the current height of this component.
 InputMap getInputMap()
Returns the InputMap that is used when the receiver has focus.
 InputMap getInputMap(int condition)
Returns the InputMap that is used during condition.
 InputVerifier getInputVerifier()
Returns the input verifier for this component.
 Insets getInsets()
If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.
 Insets getInsets(Insets insets)
Returns an Insets object containing this component's inset values.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to this JComponent with addXXXListener(), where XXX is the name of the listenerType argument.
 Point getLocation(Point rv)
Stores the x,y origin of this component into "return value" rv and returns rv.
 Dimension getMaximumSize()
If the maximum size has been set to a non-null value just returns it.
 Dimension getMinimumSize()
If the minimum size has been set to a non-null value just returns it.
 Component getNextFocusableComponent()
Returns the next focusable component or null if the focus manager should choose the next focusable component automatically.
 Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just returns it.
 KeyStroke[] getRegisteredKeyStrokes()
Returns the KeyStrokes that will initiate registered actions.
 JRootPane getRootPane()
Returns the JRootPane ancestor for a component
 Dimension getSize(Dimension rv)
Stores the width/height of this component into "return value" rv and returns rv.
 Point getToolTipLocation(MouseEvent event)
Returns the tooltip location in this component's coordinate system.
 String getToolTipText()
Returns the tooltip string that has been set with setToolTipText().
 String getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event.
 Container getTopLevelAncestor()
Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
 String getUIClassID()
Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component.
 boolean getVerifyInputWhenFocusTarget()
Get the value that indicates whether the input verifier for the current focus owner will be called before this component requests focus.
 Rectangle getVisibleRect()
Returns the Component's "visible rectangle" - the intersection of this component's visible rectangle:
 int getWidth()
Returns the current width of this component.
 int getX()
Returns the current x coordinate of the component's origin.
 int getY()
Returns the current y coordinate of the component's origin.
 void grabFocus()
Sets the focus on the receiving component if it doesn't already have it.
 boolean hasFocus()
Returns true if this Component has the keyboard focus.
 void hide()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
 boolean isDoubleBuffered()
Returns whether the receiving component should use a buffer to paint.
 boolean isFocusCycleRoot()
Override this method and return true if your component is the root of of a component tree with its own focus cycle.
 boolean isFocusTraversable()
Identifies whether or not this component can receive the focus.
static boolean isLightweightComponent(Component c)
Returns true if this component is a lightweight, that is, if it doesn't have a native window system peer.
 boolean isManagingFocus()
Override this method and return true if your JComponent manages focus.
 boolean isMaximumSizeSet()
Returns true if the maximum size has been set to a non-null value otherwise returns false.
 boolean isMinimumSizeSet()
Returns true if the minimum size has been set to a non-null value otherwise returns false.
 boolean isOpaque()
Returns true if this component is completely opaque.
 boolean isOptimizedDrawingEnabled()
Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap.
 boolean isPaintingTile()
Returns true if the receiving component is currently painting a tile.
 boolean isPreferredSizeSet()
Returns true if the preferred size has been set to a non-null value otherwise returns false.
 boolean isRequestFocusEnabled()
Returns whether the receiving component can obtain the focus by calling requestFocus.
 boolean isValidateRoot()
If this method returns true, revalidate() calls by descendants of this component will cause the entire tree beginning with this root to be validated.
 void paint(Graphics g)
This method is invoked by Swing to draw components.
protected  void paintBorder(Graphics g)
Paints the component's border.
protected  void paintChildren(Graphics g)
Paints this component's children.
protected  void paintComponent(Graphics g)
If the UI delegate is non-null, calls its paint method.
 void paintImmediately(int x, int y, int w, int h)
Paints the specified region in this component and all of its descendants that overlap the region, immediately.
 void paintImmediately(Rectangle r)
Paints the specified region now.
protected  String paramString()
Returns a string representation of this JComponent.
 void print(Graphics g)
Invoke this method to print the receiver.
 void printAll(Graphics g)
Invoke this method to print the receiver.
protected  void printBorder(Graphics g)
Prints the component's border.
protected  void printChildren(Graphics g)
Prints this component's children.
protected  void printComponent(Graphics g)
This is invoked during a printing operation.
protected  void processComponentKeyEvent(KeyEvent e)
Processes any key events that the component itself recognizes.
protected  void processFocusEvent(FocusEvent e)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected  boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
Invoked to process the key bindings for ks as the result of the KeyEvent e.
protected  void processKeyEvent(KeyEvent e)
Overrides processKeyEvent to process events.
protected  void processMouseMotionEvent(MouseEvent e)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
 void putClientProperty(Object key, Object value)
Adds an arbitrary key/value "client property" to this component.
 void registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
 void removeAncestorListener(AncestorListener listener)
Unregisters listener so that it will no longer receive AncestorEvents
 void removeNotify()
Notifies this component that it no longer has a parent component.
 void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property.
 void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list.
 void repaint(long tm, int x, int y, int width, int height)
Adds the specified region to the dirty region list if the component is showing.
 void repaint(Rectangle r)
Adds the specified region to the dirty region list if the component is showing.
 boolean requestDefaultFocus()
Requests the focus for the component that should have the focus by default.
 void requestFocus()
Sets focus on the receiving component if isRequestFocusEnabled returns true and the component doesn't already have focus.
 void resetKeyboardActions()
Unregisters all the bindings in the first tier InputMaps and ActionMap.
 void reshape(int x, int y, int w, int h)
Moves and resizes this component.
 void revalidate()
Supports deferred automatic layout.
 void scrollRectToVisible(Rectangle aRect)
Forwards the scrollRectToVisible() message to the JComponent's parent.
 void setActionMap(ActionMap am)
Sets the ActionMap to am.
 void setAlignmentX(float alignmentX)
Sets the the vertical alignment.
 void setAlignmentY(float alignmentY)
Sets the the horizontal alignment.
 void setAutoscrolls(boolean autoscrolls)
If true this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling, such as JViewport.
 void setBackground(Color bg)
Sets the background color of this component.
 void setBorder(Border border)
Sets the border of this component.
 void setDebugGraphicsOptions(int debugOptions)
Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.
 void setDoubleBuffered(boolean aFlag)
Sets whether the receiving component should use a buffer to paint.
 void setEnabled(boolean enabled)
Sets whether or not this component is enabled.
 void setFont(Font font)
Sets the font for this component.
 void setForeground(Color fg)
Sets the foreground color of this component.
 void setInputMap(int condition, InputMap map)
Sets the InputMap to use under the condition condition to map.
 void setInputVerifier(InputVerifier inputVerifier)
Sets the input verifier for this component.
 void setMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value.
 void setMinimumSize(Dimension minimumSize)
Sets the minimum size of this component to a constant value.
 void setNextFocusableComponent(Component aComponent)
Specifies the next component to get the focus after this one, for example, when the tab key is pressed.
 void setOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
 void setPreferredSize(Dimension preferredSize)
Sets the preferred size of the receiving component.
 void setRequestFocusEnabled(boolean aFlag)
Sets whether the receiving component can obtain the focus by calling requestFocus.
 void setToolTipText(String text)
Registers the text to display in a tool tip.
protected  void setUI(ComponentUI newUI)
Sets the look and feel delegate for this component.
 void setVerifyInputWhenFocusTarget(boolean flag)
Set the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.
 void setVisible(boolean aFlag)
Makes the component visible or invisible.
 void unregisterKeyboardAction(KeyStroke aKeyStroke)
This method is now obsolete.
 void update(Graphics g)
Calls paint(g).
 void updateUI()
Resets the UI property to a value from the current look and feel.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ui

protected transient ComponentUI ui

listenerList

protected EventListenerList listenerList

WHEN_FOCUSED

public static final int WHEN_FOCUSED
Constant used for registerKeyboardAction() that means that the command should be invoked when the component has the focus.

WHEN_ANCESTOR_OF_FOCUSED_COMPONENT

public static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is an ancestor of the focused component or is itself the focused component.

WHEN_IN_FOCUSED_WINDOW

public static final int WHEN_IN_FOCUSED_WINDOW
Constant used for registerKeyboardAction() that means that the command should be invoked when the receiving component is in the window that has the focus or is itself the focused component.

UNDEFINED_CONDITION

public static final int UNDEFINED_CONDITION
Constant used by some of the APIs to mean that no condition is defined.

TOOL_TIP_TEXT_KEY

public static final String TOOL_TIP_TEXT_KEY
The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".

accessibleContext

protected AccessibleContext accessibleContext
The AccessibleContext associated with this JComponent.
Constructor Detail

JComponent

public JComponent()
Default JComponent constructor. This constructor does no initialization beyond calling the Container constructor. For example, the initial layout manager is null.
Method Detail

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel. JComponent subclasses must override this method like this:
   public void updateUI() {
      setUI((SliderUI)UIManager.getUI(this);
   }
See Also:
setUI(javax.swing.plaf.ComponentUI),
UIManager.getLookAndFeel(),
UIManager.getUI(javax.swing.JComponent)

setUI

protected void setUI(ComponentUI newUI)
Sets the look and feel delegate for this component. JComponent subclasses generally override this method to narrow the argument type. For example, in JSlider:
 public void setUI(SliderUI newUI) {
     super.setUI(newUI);
 }

Additionally JComponent subclasses must provide a getUI method that returns the correct type. For example:

 public SliderUI getUI() {
     return (SliderUI)ui;
 }
See Also:
updateUI(),
UIManager.getLookAndFeel(),
UIManager.getUI(javax.swing.JComponent)

getUIClassID

public String getUIClassID()
Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component. Most applications will never need to call this method. Subclasses of JComponent that support pluggable look and feel should override this method to return a UIDefaults key that maps to the ComponentUI subclass that defines their look and feel.
Returns:
The UIDefaults key for a ComponentUI subclass.
See Also:
UIDefaults.getUI(javax.swing.JComponent)

getComponentGraphics

protected Graphics getComponentGraphics(Graphics g)
Returns the graphics object used to paint this component. If DebugGraphics is turned on we create a new DebugGraphics object if necessary. Otherwise we just configure the specified graphics object's foreground and font.
Returns:
a Graphics object configured for this component

paintComponent

protected void paintComponent(Graphics g)
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
See Also:
paint(java.awt.Graphics)

paintChildren

protected void paintChildren(Graphics g)
Paints this component's children. If shouldUseBuffer is true, no component ancestor has a buffer and the component children can use a buffer if they have one. Otherwise, one ancestor has a buffer currently in use and children should not use a buffer to paint.
See Also:
paint(java.awt.Graphics), Container.paint(java.awt.Graphics)

paintBorder

protected void paintBorder(Graphics g)
Paints the component's border.
See Also:
paint(java.awt.Graphics), setBorder(javax.swing.border.Border)

update

public void update(Graphics g)
Calls paint(g). Doesn't clear the background but see ComponentUI.update(), which is called by paintComponent.
Overrides:
update in class Container
See Also:
paint(java.awt.Graphics), paintComponent(java.awt.Graphics), ComponentUI

paint

public void paint(Graphics g)
This method is invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

Overrides:
paint in class Container
See Also:
paintComponent(java.awt.Graphics),
paintBorder(java.awt.Graphics),
paintChildren(java.awt.Graphics),
getComponentGraphics(java.awt.Graphics),
repaint(long, int, int, int, int)

printAll

public void printAll(Graphics g)
Invoke this method to print the receiver. This method invokes print on the receiver.
Overrides:
printAll in class Component
See Also:
print(java.awt.Graphics),
printComponent(java.awt.Graphics),
printBorder(java.awt.Graphics),
printChildren(java.awt.Graphics)

print

public void print(Graphics g)
Invoke this method to print the receiver. This method will result in invocations to printComponent, printBorder and printChildren. It is not recommended that you override this method, instead override one of the previously metioned methods. This method sets the receivers state such that the double buffer will not be used, eg painting will be done directly on the passed in Graphics.
Overrides:
print in class Container
See Also:
printComponent(java.awt.Graphics),
printBorder(java.awt.Graphics),
printChildren(java.awt.Graphics)

printComponent

protected void printComponent(Graphics g)
This is invoked during a printing operation. This is implemented to invoke paintComponent on the receiver. Override this if you wish to add special painting behavior when printing.
Since:
1.3
See Also:
print(java.awt.Graphics)

printChildren

protected void printChildren(Graphics g)
Prints this component's children. This is implemented to invoke paintChildren on the receiver. Override this if you wish to print the children differently than painting.
Since:
1.3
See Also:
print(java.awt.Graphics)

printBorder

protected void printBorder(Graphics g)
Prints the component's border. This is implemented to invoke paintBorder on the receiver. Overrides this if you wish to print the border differently that it is painted.
Since:
1.3
See Also:
print(java.awt.Graphics)

isPaintingTile

public boolean isPaintingTile()
Returns true if the receiving component is currently painting a tile. If this method returns true, paint will be called again for another tile. This method returns false if you are not painting a tile or if the last tile is painted. Use this method to keep some state you might need between tiles.

isFocusCycleRoot

public boolean isFocusCycleRoot()
Override this method and return true if your component is the root of of a component tree with its own focus cycle.

isManagingFocus

public boolean isManagingFocus()
Override this method and return true if your JComponent manages focus. If your component manages focus, the focus manager will handle your component's children. All key event will be sent to your key listener including TAB and SHIFT+TAB. CONTROL+TAB and CONTROL+SHIFT+TAB will move the focus to the next or previous component.

setNextFocusableComponent

public void setNextFocusableComponent(Component aComponent)
Specifies the next component to get the focus after this one, for example, when the tab key is pressed. Invoke this method to override the default focus-change sequence.

getNextFocusableComponent

public Component getNextFocusableComponent()
Returns the next focusable component or null if the focus manager should choose the next focusable component automatically.

setRequestFocusEnabled

public void setRequestFocusEnabled(boolean aFlag)
Sets whether the receiving component can obtain the focus by calling requestFocus. The default value is true. Note: Setting this property to false will not prevent the focus manager from setting the focus to this component, it will prevent the component from getting the focus when the focus is requested explicitly. Override isFocusTraversable and return false if the component should never get the focus.

isRequestFocusEnabled

public boolean isRequestFocusEnabled()
Returns whether the receiving component can obtain the focus by calling requestFocus.
See Also:
setRequestFocusEnabled(boolean)

requestFocus

public void requestFocus()
Sets focus on the receiving component if isRequestFocusEnabled returns true and the component doesn't already have focus.
Overrides:
requestFocus in class Component
Following copied from class: java.awt.Component
See Also:
FocusEvent,
Component.addFocusListener(java.awt.event.FocusListener),
Component.processFocusEvent(java.awt.event.FocusEvent),
Component.isFocusTraversable()

grabFocus

public void grabFocus()
Sets the focus on the receiving component if it doesn't already have it. This method is for focus managers. You rarely want to call this method; use requestFocus() instead.

setVerifyInputWhenFocusTarget

public void setVerifyInputWhenFocusTarget(boolean flag)
Set the value to indicate whether input verifier for the current focus owner will be called before this component requests focus. The default is true. Set to false on components such as a Cancel button or a scrollbar, which should activate even if the input in the current focus owner is not "passed" by the input verifier for that component.
Parameters:
new - value for the verifyInputWhenFocusTarget property
Since:
1.3
See Also:
InputVerifier,
setInputVerifier(javax.swing.InputVerifier),
getInputVerifier(),
getVerifyInputWhenFocusTarget()

getVerifyInputWhenFocusTarget

public boolean getVerifyInputWhenFocusTarget()
Get the value that indicates whether the input verifier for the current focus owner will be called before this component requests focus.
Returns:
value of the verifyInputWhenFocusTarget property
Since:
1.3
See Also:
InputVerifier,
setInputVerifier(javax.swing.InputVerifier),
getInputVerifier(),
setVerifyInputWhenFocusTarget(boolean)

setPreferredSize

public void setPreferredSize(Dimension preferredSize)
Sets the preferred size of the receiving component. If preferredSize is null, the UI will be asked for the preferred size.

getPreferredSize

public Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getPreferredSize in class Container
Returns:
the value of the preferredSize property
See Also:
setPreferredSize(java.awt.Dimension)

setMaximumSize

public void setMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value. Subsequent calls to getMaximumSize will always return this value; the component's UI will not be asked to compute it. Setting the maximum size to null restores the default behavior.
See Also:
getMaximumSize()

getMaximumSize

public Dimension getMaximumSize()
If the maximum size has been set to a non-null value just returns it. If the UI delegate's getMaximumSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMaximumSize in class Container
Returns:
the value of the maximumSize property.
See Also:
setMaximumSize(java.awt.Dimension)

setMinimumSize

public void setMinimumSize(Dimension minimumSize)
Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value; the component's UI will not be asked to compute it. Setting the minimum size to null restores the default behavior.
See Also:
getMinimumSize()

getMinimumSize

public Dimension getMinimumSize()
If the minimum size has been set to a non-null value just returns it. If the UI delegate's getMinimumSize() method returns a non-null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMinimumSize in class Container
Returns:
the value of the minimumSize property
See Also:
setMinimumSize(java.awt.Dimension)

isMinimumSizeSet

public boolean isMinimumSizeSet()
Returns true if the minimum size has been set to a non-null value otherwise returns false.

isPreferredSizeSet

public boolean isPreferredSizeSet()
Returns true if the preferred size has been set to a non-null value otherwise returns false.

isMaximumSizeSet

public boolean isMaximumSizeSet()
Returns true if the maximum size has been set to a non-null value otherwise returns false.

contains

public boolean contains(int x,
                        int y)
Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing.
Overrides:
contains in class Component
Returns:
true if this component logically contains x,y
See Also:
Component.contains(int, int)

setBorder

public void setBorder(Border border)
Sets the border of this component. The Border object is responsible for defining the insets for the component (overriding any insets set directly on the component) and for optionally rendering any border decorations within the bounds of those insets. Borders should be used (rather than insets) for creating both decorative and non-decorative (such as margins and padding) regions for a swing component. Compound borders can be used to nest multiple borders within a single component.

This is a bound property.

Parameters:
border - the border to be rendered for this component
See Also:
Border, CompoundBorder

getBorder

public Border getBorder()
Returns the border of this component or null if no border is currently set.
Returns:
the border object for this component
See Also:
setBorder(javax.swing.border.Border)

getInsets

public Insets getInsets()
If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.
Overrides:
getInsets in class Container
Returns:
the value of the insets property
See Also:
setBorder(javax.swing.border.Border)

getInsets

public Insets getInsets(Insets insets)
Returns an Insets object containing this component's inset values. The passed-in Insets object will be reused if possible. Calling methods cannot assume that the same object will be returned, however. All existing values within this object are overwritten.
Parameters:
insets - the Insets object, which can be reused
See Also:
getInsets()

getAlignmentY

public float getAlignmentY()
Overrides Container.getAlignmentY to return the horizontal alignment.
Overrides:
getAlignmentY in class Container
Returns:
the value of the alignmentY property
See Also:
setAlignmentY(float), Component.getAlignmentY()

setAlignmentY

public void setAlignmentY(float alignmentY)
Sets the the horizontal alignment.
See Also:
getAlignmentY()

getAlignmentX

public float getAlignmentX()
Overrides Container.getAlignmentX to return the vertical alignment.
Overrides:
getAlignmentX in class Container
Returns:
the value of the alignmentX property
See Also:
setAlignmentX(float), Component.getAlignmentX()

setAlignmentX

public void setAlignmentX(float alignmentX)
Sets the the vertical alignment.
See Also:
getAlignmentX()

setInputVerifier

public void setInputVerifier(InputVerifier inputVerifier)
Sets the input verifier for this component.
Since:
1.3
See Also:
InputVerifier

getInputVerifier

public InputVerifier getInputVerifier()
Returns the input verifier for this component.
Since:
1.3
See Also:
InputVerifier

getGraphics

public Graphics getGraphics()
Returns this component's graphics context, which lets you draw on a component. Use this method get a Graphics object and then invoke oeprations on that object to draw on the component.
Overrides:
getGraphics in class Component
Following copied from class: java.awt.Component
Returns:
A graphics context for this component, or null if it has none.
See Also:
Component.paint(java.awt.Graphics)

setDebugGraphicsOptions

public void setDebugGraphicsOptions(int debugOptions)
Enables or disables diagnostic information about every graphics operation performed within the component or one of its children. The value of debugOptions determines how the component should display this information:
  • DebugGraphics.LOG_OPTION - causes a text message to be printed.
  • DebugGraphics.FLASH_OPTION - causes the drawing to flash several times.
  • DebugGraphics.BUFFERED_OPTION - creates an ExternalWindow that displays the operations performed on the View's offscreen buffer.
debug is bitwise OR'd into the current value. DebugGraphics.NONE_OPTION disables debugging. A value of 0 causes no changes to the debugging options.

getDebugGraphicsOptions

public int getDebugGraphicsOptions()
Returns the state of graphics debugging.
See Also:
setDebugGraphicsOptions(int)

registerKeyboardAction

public void registerKeyboardAction(ActionListener anAction,
                                   String aCommand,
                                   KeyStroke aKeyStroke,
                                   int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior. For example, to bind the KeyStroke aKeyStroke to the Action anAction now use:
   component.getInputMap().put(aKeyStroke, aCommand);
   component.getActionMap().put(aCommmand, anAction);
The above assumes you want the binding to be applicable for WHEN_FOCUSED. To register bindings for other focus states use the getInputMap method that takes an integer.

Register a new keyboard action. anAction will be invoked if a key event matching aKeyStroke occurs and aCondition is verified. The KeyStroke object defines a particular combination of a keyboard key and one or more modifiers (alt, shift, ctrl, meta).

The aCommand will be set in the delivered event if specified.

The Condition can be one of:

WHEN_FOCUSED
The action will be invoked only when the keystroke occurs while the component has the focus.
WHEN_IN_FOCUSED_WINDOW
The action will be invoked when the keystroke occurs while the component has the focus or if the component is in the window that has the focus. Note that the component need not be an immediate descendent of the window -- it can be anywhere in the window's containment hierarchy. In other words, whenever any component in the window has the focus, the action registered with this component is invoked.
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
The action will be invoked when the keystroke occurs while the component has the focus or if the component is an ancestor of the component that has the focus.

The combination of keystrokes and conditions lets you define high level (semantic) action events for a specified keystroke+modifier combination (using the KeyStroke class) and direct to a parent or child of a component that has the focus, or to the component itself. In other words, in any hierarchical structure of components, an arbitrary key-combination can be immediately directed to the appropriate component in the hierarchy, and cause a specific method to be invoked (usually by way of adapter objects).

If an action has already been registered for the receiving container, with the same charCode and the same modifiers, anAction will replace the action.

See Also:
KeyStroke

registerKeyboardAction

public void registerKeyboardAction(ActionListener anAction,
                                   KeyStroke aKeyStroke,
                                   int aCondition)
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.

unregisterKeyboardAction

public void unregisterKeyboardAction(KeyStroke aKeyStroke)
This method is now obsolete. To unregister an existing binding you can either remove the binding from the ActionMap/InputMap, or place a dummy binding the InputMap. Removing the binding from the InputMap allows bindings in parent InputMaps to be active, whereas putting a dummy binding in the InputMap effectively disables the binding from ever happening.

Unregisters a keyboard action. This will remove the binding from the ActionMap (if it exists) as well as the InputMaps.

getRegisteredKeyStrokes

public KeyStroke[] getRegisteredKeyStrokes()
Returns the KeyStrokes that will initiate registered actions.
Returns:
an array of KeyStroke objects
See Also:
registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

getConditionForKeyStroke

public int getConditionForKeyStroke(KeyStroke aKeyStroke)
Returns the condition that determines whether a registered action occurs in response to the specified keystroke.

For Java 2 platform v1.3, a KeyStroke can be associated with more than one condition. For example, 'a' could be bound for the two conditions WHEN_FOCUSED and WHEN_IN_FOCUSED_WINDOW condition.

Returns:
the action-keystroke condition

getActionForKeyStroke

public ActionListener getActionForKeyStroke(KeyStroke aKeyStroke)
Returns the object that will perform the action registered for a given keystroke.
Returns:
the ActionListener object invoked when the keystroke occurs

resetKeyboardActions

public void resetKeyboardActions()
Unregisters all the bindings in the first tier InputMaps and ActionMap. This has the effect of removing any local bindings, and allowing the bindings defined in parent InputMap/ActionMaps (the UI is usually defined in the second tier) to persist.

setInputMap

public final void setInputMap(int condition,
                              InputMap map)
Sets the InputMap to use under the condition condition to map. A null value implies you do not want any bindings to be used, even from the UI. This will not reinstall the UI InputMap (if there was one). Condition is one of WHEN_IN_FOCUSED_WINDOW, WHEN_FOCUSED or WHEN_ANCESTOR_OF_FOCUSED_COMPONENT. If condition is WHEN_IN_FOCUSED_WINDOW and map is not a ComponentInputMap, an IllegalArgumentException will be thrown. Similarly, if condition is not one of the values just mentioned an IllegalArgumentException will be thrown.
Parameters:
condition - one of WHEN_IN_FOCUSED_WINDOW, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
Since:
1.3

getInputMap

public final InputMap getInputMap(int condition)
Returns the InputMap that is used during condition.
Parameters:
condition - one of WHEN_IN_FOCUSED_WINDOW, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
Since:
1.3

getInputMap

public final InputMap getInputMap()
Returns the InputMap that is used when the receiver has focus. This is convenience method for getInputMap(WHEN_FOCUSED).
Since:
JDK1.3

setActionMap

public final void setActionMap(ActionMap am)
Sets the ActionMap to am. This does not set the parent of the am to be the ActionMap from the UI (if there was one), it is up to the caller to have done this.
Since:
1.3

getActionMap

public final ActionMap getActionMap()
Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding. The returned ActionMap, unless otherwise set, will have the ActionMap from the UI set as the parent.
Since:
1.3

requestDefaultFocus

public boolean requestDefaultFocus()
Requests the focus for the component that should have the focus by default. The default implementation will recursively request the focus on the first component that is focus-traversable.
Returns:
false if the focus has not been set, otherwise return true

setVisible

public void setVisible(boolean aFlag)
Makes the component visible or invisible. Overrides Component.setVisible.
Overrides:
setVisible in class Component
Parameters:
aFlag - true to make the component visible

hide

public void hide()
Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).

Overrides:
hide in class Component

setEnabled

public void setEnabled(boolean enabled)
Sets whether or not this component is enabled. A component that is enabled may respond to user input, while a component that is not enabled cannot respond to user input. Some components may alter their visual representation when they are disabled in order to provide feedback to the user that they cannot take input.
Overrides:
setEnabled in class Component
See Also:
Component.isEnabled()

setForeground

public void setForeground(Color fg)
Sets the foreground color of this component.
Overrides:
setForeground in class Component
See Also:
Component.getForeground()

setBackground

public void setBackground(Color bg)
Sets the background color of this component.
Overrides:
setBackground in class Component
See Also:
Component.getBackground()

setFont

public void setFont(Font font)
Sets the font for this component.
Overrides:
setFont in class Container
See Also:
Component.getFont()

isFocusTraversable

public boolean isFocusTraversable()
Identifies whether or not this component can receive the focus. A disabled button, for example, would return false.
Overrides:
isFocusTraversable in class Component
Returns:
true if this component can receive the focus

processFocusEvent

protected void processFocusEvent(FocusEvent e)
Description copied from class: Component
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

This method is not called unless focus events are enabled for this component. Focus events are enabled when one of the following occurs:

  • A FocusListener object is registered via addFocusListener.
  • Focus events are enabled via enableEvents.
Overrides:
processFocusEvent in class Component
Following copied from class: java.awt.Component
Parameters:
e - the focus event.
See Also:
FocusEvent, FocusListener, Component.addFocusListener(java.awt.event.FocusListener), Component.enableEvents(long)

processComponentKeyEvent

protected void processComponentKeyEvent(KeyEvent e)
Processes any key events that the component itself recognizes. This is called after the focus manager and any interested listeners have been given a chance to steal away the event. This method is called only if the event has not yet been consumed. This method is called prior to the keyboard UI logic.

This method is implemented to do nothing. Subclasses would normally override this method if they process some key events themselves. If the event is processed, it should be consumed.

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Overrides processKeyEvent to process events.
Overrides:
processKeyEvent in class Component
Following copied from class: java.awt.Component
Parameters:
e - the key event.
See Also:
KeyEvent, KeyListener, Component.addKeyListener(java.awt.event.KeyListener), Component.enableEvents(long)

processKeyBinding

protected boolean processKeyBinding(KeyStroke ks,
                                    KeyEvent e,
                                    int condition,
                                    boolean pressed)
Invoked to process the key bindings for ks as the result of the KeyEvent e. This obtains the appropriate InputMap, gets the binding, gets the action from the ActionMap, and then (if the action is found and the receiver is enabled) invokes notifyAction to notify the action.
Returns:
true if there was a binding to an action, and the action was enabled
Since:
1.3

setToolTipText

public void setToolTipText(String text)
Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

See How to Use Tool Tips in The Java Tutorial for further documentation.

Parameters:
text - the string to display; if the text is null, the tool tip is turned off for this component
See Also:
TOOL_TIP_TEXT_KEY

getToolTipText

public String getToolTipText()
Returns the tooltip string that has been set with setToolTipText().
Returns:
the text of the tool tip
See Also:
TOOL_TIP_TEXT_KEY

getToolTipText

public String getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event. By default this returns any string set using setToolTipText(). If a component provides more extensive API to support differing tooltips at different locations, this method should be overridden.

getToolTipLocation

public Point getToolTipLocation(MouseEvent event)
Returns the tooltip location in this component's coordinate system. If null is returned, Swing will choose a location. The default implementation returns null.
Parameters:
event - the MouseEvent that caused the ToolTipManager to show the tooltip

createToolTip

public JToolTip createToolTip()
Returns the instance of JToolTip that should be used to display the tooltip. Components typically would not override this method, but it can be used to cause different tooltips to be displayed differently.

scrollRectToVisible

public void scrollRectToVisible(Rectangle aRect)
Forwards the scrollRectToVisible() message to the JComponent's parent. Components that can service the request, such as JViewport, override this method and perform the scrolling.
See Also:
JViewport

setAutoscrolls

public void setAutoscrolls(boolean autoscrolls)
If true this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling, such as JViewport.
See Also:
JViewport, getAutoscrolls()

getAutoscrolls

public boolean getAutoscrolls()
Returns true if this component automatically scrolls its contents when dragged (when contained in a component that supports scrolling, like JViewport).
See Also:
JViewport, setAutoscrolls(boolean)

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e)
Description copied from class: Component
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.

This method is not called unless mouse motion events are enabled for this component. Mouse motion events are enabled when one of the following occurs:

  • A MouseMotionListener object is registered via addMouseMotionListener.
  • Mouse motion events are enabled via enableEvents.
Overrides:
processMouseMotionEvent in class Component
Following copied from class: java.awt.Component
Parameters:
e - the mouse motion event.
See Also:
java.awt.event.MouseMotionEvent, MouseMotionListener, Component.addMouseMotionListener(java.awt.event.MouseMotionListener), Component.enableEvents(long)

enable

public void enable()
overridden to ensure Accessibility support
Overrides:
enable in class Component

disable

public void disable()
overridden to ensure Accessibility support
Overrides:
disable in class Component

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JComponent.
Overrides:
getAccessibleContext in class Component
Returns:
the AccessibleContext of this JComponent

getClientProperty

public final Object getClientProperty(Object key)
Returns the value of the property with the specified key. Only properties added with putClientProperty will return a non-null value.
Returns:
the value of this property or null
See Also:
putClientProperty(java.lang.Object, java.lang.Object)

putClientProperty

public final void putClientProperty(Object key,
                                    Object value)
Adds an arbitrary key/value "client property" to this component.

The get/putClientProperty methods provide access to a small per-instance hashtable. Callers can use get/putClientProperty to annotate components that were created by another module. For example, a layout manager might store per child constraints this way. For example:

 componentA.putClientProperty("to the left of", componentB);
If value is null this method will remove the property. Changes to client properties are reported with PropertyChange events. The name of the property (for the sake of PropertyChange events) is key.toString().

The clientProperty dictionary is not intended to support large scale extensions to JComponent nor should be it considered an alternative to subclassing when designing a new component.

See Also:
getClientProperty(java.lang.Object), addPropertyChangeListener(java.beans.PropertyChangeListener)

isLightweightComponent

public static boolean isLightweightComponent(Component c)
Returns true if this component is a lightweight, that is, if it doesn't have a native window system peer.
Returns:
true if this component is a lightweight

reshape

public void reshape(int x,
                    int y,
                    int w,
                    int h)
Moves and resizes this component.
Overrides:
reshape in class Component
See Also:
Component.setBounds(int, int, int, int)

getBounds

public Rectangle getBounds(Rectangle rv)
Stores the bounds of this component into "return value" rv and returns rv. If rv is null a new Rectangle is allocated. This version of getBounds() is useful if the caller wants to avoid allocating a new Rectangle object on the heap.
Overrides:
getBounds in class Component
Parameters:
rv - the return value, modified to the component's bounds
Returns:
rv

getSize

public Dimension getSize(Dimension rv)
Stores the width/height of this component into "return value" rv and returns rv. If rv is null a new Dimension object is allocated. This version of getSize() is useful if the caller wants to avoid allocating a new Dimension object on the heap.
Overrides:
getSize in class Component
Parameters:
rv - the return value, modified to the component's size
Returns:
rv

getLocation

public Point getLocation(Point rv)
Stores the x,y origin of this component into "return value" rv and returns rv. If rv is null a new Point is allocated. This version of getLocation() is useful if the caller wants to avoid allocating a new Point object on the heap.
Overrides:
getLocation in class Component
Parameters:
rv - the return value, modified to the component's location
Returns:
rv

getX

public int getX()
Returns the current x coordinate of the component's origin. This method is preferable to writing component.getBounds().x, or component.getLocation().x because it doesn't cause any heap allocations.
Overrides:
getX in class Component
Returns:
the current x coordinate of the component's origin

getY

public int getY()
Returns the current y coordinate of the component's origin. This method is preferable to writing component.getBounds().y, or component.getLocation().y because it doesn't cause any heap allocations.
Overrides:
getY in class Component
Returns:
the current y coordinate of the component's origin

getWidth

public int getWidth()
Returns the current width of this component. This method is preferable to writing component.getBounds().width, or component.getSize().width because it doesn't cause any heap allocations.
Overrides:
getWidth in class Component
Returns:
the current width of this component.

getHeight

public int getHeight()
Returns the current height of this component. This method is preferable to writing component.getBounds().height, or component.getSize().height because it doesn't cause any heap allocations.
Overrides:
getHeight in class Component
Returns:
the current height of this component.

hasFocus

public boolean hasFocus()
Returns true if this Component has the keyboard focus.
Overrides:
hasFocus in class Component
Returns:
true if this Component has the keyboard focus.

isOpaque

public boolean isOpaque()
Returns true if this component is completely opaque.

An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency.

Subclasses that guarantee to always completely paint their contents should override this method and return true.

Overrides:
isOpaque in class Component
Returns:
true if this component is completely opaque
See Also:
setOpaque(boolean)

setOpaque

public void setOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds. Otherwise, the component may not paint some or all of its pixels, allowing the underlying pixels to show through.

The default value of this property is false for JComponent. However, the default value for this property on most standard JComponent subclasses (such as JButton and JTree) is look-and-feel dependent.

See Also:
isOpaque()

computeVisibleRect

public void computeVisibleRect(Rectangle visibleRect)
Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for this component and all of its ancestors. The return value is stored in visibleRect.
See Also:
getVisibleRect()

getVisibleRect

public Rectangle getVisibleRect()
Returns the Component's "visible rectangle" - the intersection of this component's visible rectangle:
 new Rectangle(0, 0, getWidth(), getHeight());
and all of its ancestors' visible Rectangles.
Returns:
the visible rectangle

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Supports reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEvent listener list isn't empty, then fire a PropertyChange event to each listener. This method has an overloaded method for each primitive type. For example, here's how to write a bound property set method whose value is an int:
 public void setFoo(int newValue) {
     int oldValue = foo;
     foo = newValue;
     firePropertyChange("foo", oldValue, newValue);
 }
Overrides:
firePropertyChange in class Component
Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(String propertyName,
                               byte oldValue,
                               byte newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               char oldValue,
                               char newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               short oldValue,
                               short newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               int oldValue,
                               int newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               long oldValue,
                               long newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               float oldValue,
                               float newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               double oldValue,
                               double newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
Reports a bound property change.
See Also:
firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property, such as setFont, setBackground, or setForeground. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.

Overrides:
addPropertyChangeListener in class Component
Parameters:
listener - the PropertyChangeListener to be added

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. If listener is null, no exception is thrown and no action is performed.
Overrides:
addPropertyChangeListener in class Component
Parameters:
propertyName - the name of the property to listen on
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class Component
Parameters:
listener - the PropertyChangeListener to be removed

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property. If listener is null, no exception is thrown and no action is performed.
Overrides:
removePropertyChangeListener in class Component
Parameters:
propertyName - the name of the property that was listened on
listener - the PropertyChangeListener to be removed

fireVetoableChange

protected void fireVetoableChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
                           throws PropertyVetoException
Supports reporting constrained property changes. This method can be called when a constrained property has changed and it will send the appropriate PropertyChangeEvent to any registered VetoableChangeListeners.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener to the listener list. The listener is registered for all properties.
Parameters:
listener - the VetoableChangeListener to be added

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list. This removes a VetoableChangeListener that was registered for all properties.
Parameters:
listener - the VetoableChangeListener to be removed

getTopLevelAncestor

public Container getTopLevelAncestor()
Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
Returns:
the top-level Container that this component is in

addAncestorListener

public void addAncestorListener(AncestorListener listener)
Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible / invisible. Events are also sent when the component or its ancestors are added or removed from the containment hierarchy.
See Also:
AncestorEvent

removeAncestorListener

public void removeAncestorListener(AncestorListener listener)
Unregisters listener so that it will no longer receive AncestorEvents
See Also:
addAncestorListener(javax.swing.event.AncestorListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners that were added to this JComponent with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the MouseListeners for the given Component c, one would write:
 MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class))
If no such listener list exists, then an empty array is returned.
Overrides:
getListeners in class Container
Since:
1.3

addNotify

public void addNotify()
Notifies this component that it now has a parent component. When this method is invoked, the chain of parent components is set up with KeyboardAction event listeners.
Overrides:
addNotify in class Container
See Also:
registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

removeNotify

public void removeNotify()
Notifies this component that it no longer has a parent component. When this method is invoked, any KeyboardActions set up in the the chain of parent components are removed.
Overrides:
removeNotify in class Container
See Also:
registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Adds the specified region to the dirty region list if the component is showing. The component will be repainted after all of the currently pending events have been dispatched.
Overrides:
repaint in class Component
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

repaint

public void repaint(Rectangle r)
Adds the specified region to the dirty region list if the component is showing. The component will be repainted after all of the currently pending events have been dispatched.
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

revalidate

public void revalidate()
Supports deferred automatic layout.

Calls invalidate() and then adds this component's validateRoot to a list of components that need to be validated. Validation will occur after all currently pending events have been dispatched. In other words after this method is called, the first validateRoot (if any) found when walking up the containment hierarchy of this component will be validated. By default, JRootPane, JScrollPane, and JTextField return true from isValidateRoot.

This method will automatically be called on this component when a property value changes such that size, location, or internal layout of this component has been affected. This automatic updating differs from the AWT because programs generally no longer need to invoke validate() to get the contents of the GUI to update.

See Also:
Component.invalidate(),
Container.validate(),
isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)

isValidateRoot

public boolean isValidateRoot()
If this method returns true, revalidate() calls by descendants of this component will cause the entire tree beginning with this root to be validated. Returns false by default. JScrollPane overrides this method and returns true.
Returns:
false
See Also:
revalidate(),
Component.invalidate(),
Container.validate()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap. The repainting system is substantially more efficient in this common case. JComponent subclasses that can't make this guarantee, such as JLayeredPane, should override this method to return false.
Returns:
true if this component's children don't overlap

paintImmediately

public void paintImmediately(int x,
                             int y,
                             int w,
                             int h)
Paints the specified region in this component and all of its descendants that overlap the region, immediately.

It's rarely necessary to call this method. In most cases it's more efficient to call repaint, which defers the actual painting and can collapse redundant requests into a single paint call. This method is useful if one needs to update the display while the current event is being dispatched.

See Also:
repaint(long, int, int, int, int)

paintImmediately

public void paintImmediately(Rectangle r)
Paints the specified region now.

setDoubleBuffered

public void setDoubleBuffered(boolean aFlag)
Sets whether the receiving component should use a buffer to paint. If set to true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen. Swing's painting system always use a maximum of one double buffer. If a Component is buffered and one of its ancestor is also buffered, the ancestor buffer will be used.

isDoubleBuffered

public boolean isDoubleBuffered()
Returns whether the receiving component should use a buffer to paint.
Overrides:
isDoubleBuffered in class Component
Following copied from class: java.awt.Component
Returns:
false by default

getRootPane

public JRootPane getRootPane()
Returns the JRootPane ancestor for a component
Returns:
the JRootPane that contains this component, or null if no JRootPane is found

paramString

protected String paramString()
Returns a string representation of this JComponent. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class Container
Returns:
a string representation of this JComponent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JDesktopIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JInternalFrame.JDesktopIcon

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JInternalFrame.JDesktopIcon
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Enclosing class:
JInternalFrame
public static class JInternalFrame.JDesktopIcon
extends JComponent
implements Accessible

This component represents an iconified version of a JInternalFrame. This API should NOT BE USED by Swing applications, as it will go away in future versions of Swing as its functionality is moved into JInternalFrame. This class is public only so that UI objects can display a desktop icon. If an application wants to display a desktop icon, it should create a JInternalFrame instance and iconify it.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon
This class implements accessibility support for the JInternalFrame.JDesktopIcon class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JInternalFrame.JDesktopIcon(JInternalFrame f)
Create an icon for an internal frame
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JDesktopIcon.
JDesktopPane | getDesktopPane() Convience method to ask the icon for the Desktop object it belongs to.
JInternalFrame | getInternalFrame() Returns the JInternalFrame that this DesktopIcon is associated with.
DesktopIconUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
void | setInternalFrame(JInternalFrame f) Sets the JInternalFrame that this DesktopIcon is associated with.
void | setUI(DesktopIconUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JInternalFrame.JDesktopIcon

public JInternalFrame.JDesktopIcon(JInternalFrame f)
Create an icon for an internal frame
Parameters:
f - the JInternalFrame for which the icon is created
Method Detail

getUI

public DesktopIconUI getUI()
Returns the L&F object that renders this component.
Returns:
the DesktopIconUI object that renders this component

setUI

public void setUI(DesktopIconUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the DesktopIconUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

getInternalFrame

public JInternalFrame getInternalFrame()
Returns the JInternalFrame that this DesktopIcon is associated with.
Returns:
the JInternalFrame this icon is associated with

setInternalFrame

public void setInternalFrame(JInternalFrame f)
Sets the JInternalFrame that this DesktopIcon is associated with.
Parameters:
f - the JInternalFrame this icon is associated with

getDesktopPane

public JDesktopPane getDesktopPane()
Convience method to ask the icon for the Desktop object it belongs to.
Returns:
the JDesktopPane that contains this icon's internal frame, or null if none found

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"DesktopIconUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JDesktopIcon. For desktop icons, the AccessibleContext takes the form of an AccessibleJDesktopIcon. A new AccessibleJDesktopIcon instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJDesktopIcon that serves as the AccessibleContext of this JDesktopIcon
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JDesktopPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JDesktopPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLayeredPane
                          |
                          +--javax.swing.JDesktopPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JDesktopPane
extends JLayeredPane
implements Accessible

A container used to create a multiple-document interface or a virtual desktop. You create JInternalFrame objects and add them to the JDesktopPane. JDesktopPane extends JLayeredPane to manage the potentially overlapping internal frames. It also maintains a reference to an instance of DesktopManager that is set by the UI class for the current Look and Feel (L&F).

This class is normally used as the parent of JInternalFrames to provide a pluggable DesktopManager object to the JInternalFrames. The installUI of the L&F specific implementation is responsible for setting the desktopManager variable appropriately. When the parent of a JInternalFrame is a JDesktopPane, it should delegate most of its behavior to the desktopManager (closing, resizing, etc).

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JDesktopPane key assignments. For further documentation and examples see How to Use Internal Frames, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JInternalFrame, JInternalFrame.JDesktopIcon, DesktopManager, Serialized Form

Inner Class Summary
protected  class JDesktopPane.AccessibleJDesktopPane
This class implements accessibility support for the JDesktopPane class.
Inner classes inherited from class javax.swing.JLayeredPane
JLayeredPane.AccessibleJLayeredPane
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | LIVE_DRAG_MODE Used to indicate you wish to see the entire contents of the item being dragged inside the desktop pane.
static int | OUTLINE_DRAG_MODE Used to indicate you wish to see only an outline of the item being dragged inside the desktop pane.
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JDesktopPane()
Creates a new JDesktopPane.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JDesktopPane.
JInternalFrame[] | getAllFrames() Returns all JInternalFrames currently displayed in the desktop.
JInternalFrame[] | getAllFramesInLayer(int layer) Returns all JInternalFrames currently displayed in the specified layer of the desktop.
DesktopManager | getDesktopManager() Returns the DesktopManger that handles desktop-specific UI actions.
int | getDragMode() Get the current "dragging style" used by the desktop pane.
JInternalFrame | getSelectedFrame() return the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.
DesktopPaneUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
boolean | isOpaque() Returns true to indicate that this component paints every pixel in its range.
protected String | paramString() Returns a string representation of this JDesktopPane.
void | setDesktopManager(DesktopManager d) Sets the DesktopManger that will handle desktop-specific UI actions.
void | setDragMode(int dragMode) Set the "dragging style" used by the desktop pane.
void | setSelectedFrame(JInternalFrame f) set the currently active JInternalFrame in this JDesktopPane.
void | setUI(DesktopPaneUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JLayeredPane
addImpl, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, remove, setLayer, setLayer, setPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LIVE_DRAG_MODE

public static int LIVE_DRAG_MODE
Used to indicate you wish to see the entire contents of the item being dragged inside the desktop pane.
See Also:
OUTLINE_DRAG_MODE, setDragMode(int)

OUTLINE_DRAG_MODE

public static int OUTLINE_DRAG_MODE
Used to indicate you wish to see only an outline of the item being dragged inside the desktop pane.
See Also:
LIVE_DRAG_MODE, setDragMode(int)
Constructor Detail

JDesktopPane

public JDesktopPane()
Creates a new JDesktopPane.
Method Detail

getUI

public DesktopPaneUI getUI()
Returns the L&F object that renders this component.
Returns:
the DesktopPaneUI object that renders this component

setUI

public void setUI(DesktopPaneUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the DesktopPaneUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

setDragMode

public void setDragMode(int dragMode)
Set the "dragging style" used by the desktop pane. You may want to change to one mode or another for performance or aesthetic reasons.
Parameters:
dragMode - the style of drag to use for items in the Desktop

getDragMode

public int getDragMode()
Get the current "dragging style" used by the desktop pane.
See Also:
setDragMode(int)

getDesktopManager

public DesktopManager getDesktopManager()
Returns the DesktopManger that handles desktop-specific UI actions.
Parameters:
d - the DesktopManager currently in use

setDesktopManager

public void setDesktopManager(DesktopManager d)
Sets the DesktopManger that will handle desktop-specific UI actions.
Parameters:
d - the DesktopManager to use

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"DesktopPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getAllFrames

public JInternalFrame[] getAllFrames()
Returns all JInternalFrames currently displayed in the desktop. Returns iconified frames as well as expanded frames.
Returns:
an array of JInternalFrame objects

getSelectedFrame

public JInternalFrame getSelectedFrame()
return the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.
Returns:
the currently active JInternalFrame or null
Since:
1.3

setSelectedFrame

public void setSelectedFrame(JInternalFrame f)
set the currently active JInternalFrame in this JDesktopPane.
Parameters:
f - The internal frame that's currently selected
Since:
1.3

getAllFramesInLayer

public JInternalFrame[] getAllFramesInLayer(int layer)
Returns all JInternalFrames currently displayed in the specified layer of the desktop. Returns iconified frames as well expanded frames.
Parameters:
layer - an int specifying the desktop layer
Returns:
an array of JInternalFrame objects
See Also:
JLayeredPane

isOpaque

public boolean isOpaque()
Returns true to indicate that this component paints every pixel in its range. (In other words, it does not have a transparent background or foreground.)
Overrides:
isOpaque in class JComponent
Returns:
true
See Also:
JComponent.isOpaque()

paramString

protected String paramString()
Returns a string representation of this JDesktopPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JLayeredPane
Returns:
a string representation of this JDesktopPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JDesktopPane. For desktop panes, the AccessibleContext takes the form of an AccessibleJDesktopPane. A new AccessibleJDesktopPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JLayeredPane
Returns:
an AccessibleJDesktopPane that serves as the AccessibleContext of this JDesktopPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JDialog

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
public class JDialog
extends Dialog
implements WindowConstants, Accessible, RootPaneContainer

The main class for creating a dialog window. You can use this class to create a custom dialog, or invoke the many class methods in JOptionPane to create a variety of standard dialogs. For information about creating dialogs, see The Java Tutorial section How to Make Dialogs.

The JDialog component contains a JRootPane as its only child. The contentPane should be the parent of any children of the JDialog. From the older java.awt.Window object you would normally do something like this:

       dialog.add(child);
Using JDialog the proper semantic is:
       dialog.getContentPane().add(child);
The same priniciple holds true for setting layout managers, removing components, listing children, etc. All these methods should normally be sent to the contentPane instead of to the JDialog. The contentPane is always non-null. Attempting to set it to null generates an exception. The default contentPane has a BorderLayout manager set on it.

Please see the JRootPane documentation for a complete description of the contentPane, glassPane, and layeredPane components.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JDialog key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JOptionPane, JRootPane, Serialized Form

Inner Class Summary
protected  class JDialog.AccessibleJDialog
This class implements accessibility support for the JDialog class.
Inner classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext
protected JRootPane | rootPane
protected boolean | rootPaneCheckingEnabled
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JDialog()
Creates a non-modal dialog without a title and without a specified Frame owner.
JDialog(Dialog owner)
Creates a non-modal dialog without a title with the specifed Dialog as its owner.
JDialog(Dialog owner, boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
JDialog(Dialog owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog.
JDialog(Dialog owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
JDialog(Frame owner)
Creates a non-modal dialog without a title with the specifed Frame as its owner.
JDialog(Frame owner, boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner Frame.
JDialog(Frame owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner frame.
JDialog(Frame owner, String title, boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner Frame.
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
protected JRootPane | createRootPane() Called by the constructor methods to create the default rootPane.
protected void | dialogInit() Called by the constructors to init the JDialog properly.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JDialog.
Container | getContentPane() Returns the contentPane object for this dialog.
int | getDefaultCloseOperation() Returns the operation which occurs when the user initiates a "close" on this dialog.
Component | getGlassPane() Returns the glassPane object for this dialog.
JMenuBar | getJMenuBar() Returns the menubar set on this dialog.
JLayeredPane | getLayeredPane() Returns the layeredPane object for this dialog.
JRootPane | getRootPane() Returns the rootPane object for this dialog.
protected boolean | isRootPaneCheckingEnabled() Returns true if the methods add and setLayout should be checked.
protected String | paramString() Returns a string representation of this JDialog.
protected void | processKeyEvent(KeyEvent e) Processes key events occurring on this component and, if appropriate, passes them on to components in the dialog which have registered interest in them.
protected void | processWindowEvent(WindowEvent e) Handles window events depending on the state of the defaultCloseOperation property.
void | remove(Component comp) Removes the specified component from this container.
void | setContentPane(Container contentPane) Sets the contentPane property.
void | setDefaultCloseOperation(int operation) Sets the operation which will happen by default when the user initiates a "close" on this dialog.
void | setGlassPane(Component glassPane) Sets the glassPane property.
void | setJMenuBar(JMenuBar menu) Sets the menubar for this dialog.
void | setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void | setLocationRelativeTo(Component c) Sets the location of the dialog relative to the specified component.
protected void | setRootPane(JRootPane root) Sets the rootPane property.
protected void | setRootPaneCheckingEnabled(boolean enabled) If true then calls to add and setLayout will cause an exception to be thrown.
void | update(Graphics g) Calls paint(g).
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, setModal, setResizable, setTitle, show
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

rootPane

protected JRootPane rootPane
See Also:
getRootPane(), setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
See Also:
isRootPaneCheckingEnabled(), setRootPaneCheckingEnabled(boolean)

accessibleContext

protected AccessibleContext accessibleContext
Constructor Detail

JDialog

public JDialog()
Creates a non-modal dialog without a title and without a specified Frame owner. A shared, hidden frame will be set as the owner of the dialog.

JDialog

public JDialog(Frame owner)
Creates a non-modal dialog without a title with the specifed Frame as its owner.
Parameters:
owner - the Frame from which the dialog is displayed

JDialog

public JDialog(Frame owner,
               boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner Frame.
Parameters:
owner - the Frame from which the dialog is displayed
modal - true for a modal dialog, false for one that allows others windows to be active at the same time

JDialog

public JDialog(Frame owner,
               String title)
Creates a non-modal dialog with the specified title and with the specified owner frame.
Parameters:
owner - the Frame from which the dialog is displayed
title - the String to display in the dialog's title bar

JDialog

public JDialog(Frame owner,
               String title,
               boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner Frame. All constructors defer to this one.

NOTE: Any popup components (JComboBox, JPopupMenu, JMenuBar) created within a modal dialog will be forced to be lightweight.

Parameters:
owner - the Frame from which the dialog is displayed
title - the String to display in the dialog's title bar
modal - true for a modal dialog, false for one that allows other windows to be active at the same time

JDialog

public JDialog(Dialog owner)
Creates a non-modal dialog without a title with the specifed Dialog as its owner.
Parameters:
owner - the Dialog from which the dialog is displayed

JDialog

public JDialog(Dialog owner,
               boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog.

Parameters:
owner - the Dialog from which the dialog is displayed
modal - true for a modal dialog, false for one that allows other windows to be active at the same time

JDialog

public JDialog(Dialog owner,
               String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog.
Parameters:
owner - the Dialog from which the dialog is displayed
title - the String to display in the dialog's title bar

JDialog

public JDialog(Dialog owner,
               String title,
               boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
Parameters:
owner - the Dialog from which the dialog is displayed
title - the String to display in the dialog's title bar
modal - true for a modal dialog, false for one that allows other windows to be active at the same time
Method Detail

dialogInit

protected void dialogInit()
Called by the constructors to init the JDialog properly.

createRootPane

protected JRootPane createRootPane()
Called by the constructor methods to create the default rootPane.

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Processes key events occurring on this component and, if appropriate, passes them on to components in the dialog which have registered interest in them.
Overrides:
processKeyEvent in class Component
Parameters:
e - the key event
See Also:
Component.processKeyEvent(java.awt.event.KeyEvent)

processWindowEvent

protected void processWindowEvent(WindowEvent e)
Handles window events depending on the state of the defaultCloseOperation property.
Overrides:
processWindowEvent in class Window
See Also:
setDefaultCloseOperation(int)

setDefaultCloseOperation

public void setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this dialog. The possible choices are:
  • DO_NOTHING_ON_CLOSE - do not do anything - require the program to handle the operation in the windowClosing method of a registered WindowListener object.
  • HIDE_ON_CLOSE - automatically hide the dialog after invoking any registered WindowListener objects
  • DISPOSE_ON_CLOSE - automatically hide and dispose the dialog after invoking any registered WindowListener objects

The value is set to HIDE_ON_CLOSE by default.

See Also:
Window.addWindowListener(java.awt.event.WindowListener), getDefaultCloseOperation()

getDefaultCloseOperation

public int getDefaultCloseOperation()
Returns the operation which occurs when the user initiates a "close" on this dialog.
Returns:
an integer indicating the window-close operation
See Also:
setDefaultCloseOperation(int)

update

public void update(Graphics g)
Calls paint(g). This method was overridden to prevent an unneccessary call to clear the background.
Overrides:
update in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

setJMenuBar

public void setJMenuBar(JMenuBar menu)
Sets the menubar for this dialog.
Parameters:
menubar - the menubar being placed in the dialog
See Also:
getJMenuBar()

getJMenuBar

public JMenuBar getJMenuBar()
Returns the menubar set on this dialog.
See Also:
setJMenuBar(javax.swing.JMenuBar)

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns true if the methods add and setLayout should be checked.
Returns:
true if add and setLayout should be checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
If true then calls to add and setLayout will cause an exception to be thrown.
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
An attempt to add to directly to this component will cause an runtime exception to be thrown if rootPaneCheckingEnabled is true. Subclasses can disable this behavior.
Overrides:
addImpl in class Container
Parameters:
comp - the Component to be enhanced
constraints - the constraints to be respected
index - the index (an integer)
Throws:
Error - if called with rootPaneCheckingEnabled true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.
Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thisComponent.getContentPane().setLayout(new BorderLayout())
An attempt to set the layout of this component will cause an runtime exception to be thrown if rootPaneCheckingEnabled is true. Subclasses can disable this behavior.
Overrides:
setLayout in class Container
Parameters:
manager - the LayoutManager
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this dialog.
Specified by:
getRootPane in interface RootPaneContainer
See Also:
setRootPane(javax.swing.JRootPane), RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the rootPane property. This method is called by the constructor.
Parameters:
root - the rootPane object for this dialog
See Also:
getRootPane()

getContentPane

public Container getContentPane()
Returns the contentPane object for this dialog.
Specified by:
getContentPane in interface RootPaneContainer
Returns:
the contentPane property
See Also:
setContentPane(java.awt.Container), RootPaneContainer.getContentPane()

setContentPane

public void setContentPane(Container contentPane)
Sets the contentPane property. This method is called by the constructor.
Specified by:
setContentPane in interface RootPaneContainer
Parameters:
contentPane - the contentPane object for this dialog
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
getContentPane(), RootPaneContainer.setContentPane(java.awt.Container)

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane object for this dialog.
Specified by:
getLayeredPane in interface RootPaneContainer
Returns:
the layeredPane property
See Also:
setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
Sets the layeredPane property. This method is called by the constructor.
Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layeredPane - the new layeredPane property
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
getLayeredPane(), RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glassPane object for this dialog.
Specified by:
getGlassPane in interface RootPaneContainer
Returns:
the glassPane property
See Also:
setGlassPane(java.awt.Component), RootPaneContainer.getGlassPane()

setGlassPane

public void setGlassPane(Component glassPane)
Sets the glassPane property. This method is called by the constructor.
Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - the glassPane object for this dialog
See Also:
getGlassPane(), RootPaneContainer.setGlassPane(java.awt.Component)

setLocationRelativeTo

public void setLocationRelativeTo(Component c)
Sets the location of the dialog relative to the specified component. If the component is not currently showing, the dialog is centered on the screen.
Parameters:
c - the component in relation to which the dialog's location is determined

paramString

protected String paramString()
Returns a string representation of this JDialog. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class Dialog
Returns:
a string representation of this JDialog.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JDialog. For JDialogs, the AccessibleContext takes the form of an AccessibleJDialog. A new AccessibleJDialog instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Dialog
Returns:
an AccessibleJDialog that serves as the AccessibleContext of this JDialog
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JEditorPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JEditorPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JEditorPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
Direct Known Subclasses:
JTextPane
public class JEditorPane
extends JTextComponent

A text component to edit various kinds of content. You can find how-to information and examples of using editor panes in Using Text Components, a section in The Java Tutorial.

This component uses implementations of the EditorKit to accomplish its behavior. It effectively morphs into the proper kind of text editor for the kind of content it is given. The content type that editor is bound to at any given time is determined by the EditorKit currently installed. If the content is set to a new URL, its type is used to determine the EditorKit that should be used to load the content.

By default, the following types of content are known:

text/plain
Plain text, which is the default the type given isn't recognized. The kit used in this case is an extension of DefaultEditorKit that produces a wrapped plain text view.
text/html
HTML text. The kit used in this case is the class javax.swing.text.html.HTMLEditorKit which provides HTML 3.2 support.
text/rtf
RTF text. The kit used in this case is the class javax.swing.text.rtf.RTFEditorKit which provides a limited support of the Rich Text Format.

There are several ways to load content into this component.

  1. The setText method can be used to initialize the component from a string. In this case the current EditorKit will be used, and the content type will be expected to be of this type.
  2. The read method can be used to initialize the component from a Reader. Note that if the content type is HTML, relative references (e.g. for things like images) can't be resolved unless the <base> tag is used or the Base property on HTMLDocument is set. In this case the current EditorKit will be used, and the content type will be expected to be of this type.
  3. The setPage method can be used to initialize the component from a URL. In this case, the content type will be determined from the URL, and the registered EditorKit for that content type will be set.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JEditorPane key assignments.

Some kinds of content may provide hyperlink support by generating hyperlink events. The HTML EditorKit will generate hyperlink events if the JEditorPane is not editable (JEditorPane.setEditable(false); has been called). If HTML frames are embedded in the document, the typical response would be to change a portion of the current document. The following code fragment is a possible hyperlink listener implementation, that treats HTML frame events specially, and simply displays any other activated hyperlinks.

     class Hyperactive implements HyperlinkListener {

         public void hyperlinkUpdate(HyperlinkEvent e) {
               if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
               JEditorPane pane = (JEditorPane) e.getSource();
               if (e instanceof HTMLFrameHyperlinkEvent) {
                   HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;
                   HTMLDocument doc = (HTMLDocument)pane.getDocument();
                   doc.processHTMLFrameHyperlinkEvent(evt);
               } else {
                   try {
                   pane.setPage(e.getURL());
                   } catch (Throwable t) {
                   t.printStackTrace();
                   }
               }
               }
           }
     }

Culturally dependent information in some documents is handled through a mechanism called character encoding. Character encoding is an unambiguous mapping of the members of a character set (letters, ideographs, digits, symbols, or control functions) to specific numeric code values. It represents the way the file is stored. Example character encodings are ISO-8859-1, ISO-8859-5, Shift-jis, Euc-jp, and UTF-8. When the file is passed to an user agent (JEditorPane) it is converted to the document character set (ISO-10646 aka Unicode).

There are multiple ways to get a character set mapping to happen with JEditorPane.

  1. One way is to specify the character set as a parameter of the MIME type. This will be established by a call to the setContentType method. If the content is loaded by the setPage method the content type will have been set according to the specification of the URL. It the file is loaded directly, the content type would be expected to have been set prior to loading.
  2. Another way the character set can be specified is in the document itself. This requires reading the document prior to determining the character set that is desired. To handle this, it is expected that the EditorKit.read operation throw a ChangedCharSetException which will be caught. The read is then restarted with a new Reader that uses the character set specified in the ChangedCharSetException (which is an IOException).

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JEditorPane()
Creates a new JEditorPane.
JEditorPane(String url)
Creates a JEditorPane based on a string containing a URL specification.
JEditorPane(String type, String text)
Creates a JEditorPane that has been initialized to the given text.
JEditorPane(URL initialPage)
Creates a JEditorPane based on a specified URL for input.
Method Summary
void | addHyperlinkListener(HyperlinkListener listener) Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.
protected EditorKit | createDefaultEditorKit() Creates the default editor kit (PlainEditorKit) for when the component is first created.
static EditorKit | createEditorKitForContentType(String type) Creates a handler for the given type from the default registry of editor kits.
void | fireHyperlinkUpdate(HyperlinkEvent e) Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JEditorPane.
String | getContentType() Gets the type of content that this editor is currently set to deal with.
EditorKit | getEditorKit() Fetches the currently installed kit for handling content.
static String | getEditorKitClassNameForContentType(String type) Returns the currently registered EditorKit class name for the type type.
EditorKit | getEditorKitForContentType(String type) Fetches the editor kit to use for the given type of content.
URL | getPage() Gets the current URL being displayed.
Dimension | getPreferredSize() Returns the preferred size for the JEditorPane.
boolean | getScrollableTracksViewportHeight() Returns true if a viewport should always force the height of this Scrollable to match the height of the viewport.
boolean | getScrollableTracksViewportWidth() Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.
protected InputStream | getStream(URL page) Fetches a stream for the given URL, which is about to be loaded by the setPage method.
String | getText() Returns the text contained in this TextComponent in terms of the content type of this editor.
String | getUIClassID() Gets the class ID for the UI.
boolean | isFocusCycleRoot() Makes JEditorPane be the root of a focus cycle.
boolean | isManagingFocus() Turns off tab traversal once focus is gained.
protected String | paramString() Returns a string representation of this JEditorPane.
protected void | processComponentKeyEvent(KeyEvent e) Overridden to handle processing of tab/shift tab.
protected void | processKeyEvent(KeyEvent e) Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
void | read(InputStream in, Object desc) This method initializes from a stream.
static void | registerEditorKitForContentType(String type, String classname) Establishes the default bindings of type to classname.
static void | registerEditorKitForContentType(String type, String classname, ClassLoader loader) Establishes the default bindings of type to classname.
void | removeHyperlinkListener(HyperlinkListener listener) Removes a hyperlink listener.
void | replaceSelection(String content) Replaces the currently selected content with new content represented by the given string.
protected void | scrollToReference(String reference) Scrolls the view to the given reference location (that is, the value returned by the UL.getRef method for the URL being displayed).
void | setContentType(String type) Sets the type of content that this editor handles.
void | setEditorKit(EditorKit kit) Sets the currently installed kit for handling content.
void | setEditorKitForContentType(String type, EditorKit k) Directly sets the editor kit to use for the given type.
void | setPage(String url) Sets the current URL being displayed.
void | setPage(URL page) Sets the current URL being displayed.
void | setText(String t) Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor.
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JEditorPane

public JEditorPane()
Creates a new JEditorPane. The document model is set to null.

JEditorPane

public JEditorPane(URL initialPage)
            throws IOException
Creates a JEditorPane based on a specified URL for input.
Parameters:
initialPage - the URL
Throws:
IOException - if the URL is null or cannot be accessed

JEditorPane

public JEditorPane(String url)
            throws IOException
Creates a JEditorPane based on a string containing a URL specification.
Parameters:
url - the URL
Throws:
IOException - if the URL is null or cannot be accessed

JEditorPane

public JEditorPane(String type,
                   String text)
Creates a JEditorPane that has been initialized to the given text. This is a convenience constructor that calls the setContentType and setText methods.
Parameters:
type - mime type of the given text
text - the text to initialize with
Method Detail

addHyperlinkListener

public void addHyperlinkListener(HyperlinkListener listener)
Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.
Parameters:
listener - the listener

removeHyperlinkListener

public void removeHyperlinkListener(HyperlinkListener listener)
Removes a hyperlink listener.
Parameters:
listener - the listener

fireHyperlinkUpdate

public void fireHyperlinkUpdate(HyperlinkEvent e)
Notifies all listeners that have registered interest for notification on this event type. This is normally called by the currently installed EditorKit if a content type that supports hyperlinks is currently active and there was activity with a link. The listener list is processed last to first.
Parameters:
e - the event
See Also:
EventListenerList

setPage

public void setPage(URL page)
             throws IOException
Sets the current URL being displayed. The content type of the pane is set, and if the editor kit for the pane is non-null, then a new default document is created and the URL is read into it. If the URL contains and reference location, the location will be scrolled to by calling the scrollToReference method. If the desired URL is not the one currently being displayed, the getStream method is called to give subclasses control over the stream provided.

This may load either synchronously or asynchronously depending upon the document returned by the EditorKit. If the Document is of type AbstractDocument and has a value returned by AbstractDocument.getAsynchronousLoadPriority that is greater than or equal to zero, the page will be loaded on a separate thread using that priority.

If the document is loaded synchronously, it will be filled in with the stream prior to being installed into the editor with a call to setDocument, which is bound and will fire a property change event. If an IOException is thrown the partially loaded document will be discarded and neither the document or page property change events will be fired. If the document is successfully loaded and installed, a view will be built for it by the UI which will then be scrolled if necessary, and then the page property change event will be fired.

If the document is loaded asynchronously, the document will be installed into the editor immediately using a call to setDocument which will fire a document property change event, then a thread will be created which will begin doing the actual loading. In this case, the page property change event will not be fired by the call to this method directly, but rather will be fired when the thread doing the loading has finished. Since the calling thread can not throw an IOException in the event of failure on the other thread, the page property change event will be fired when the other thread is done whether the load was successful or not.

Parameters:
page - the URL of the page
Throws:
IOException - for a null or invalid page specification, or exception from the stream being read
See Also:
getPage()

read

public void read(InputStream in,
                 Object desc)
          throws IOException
This method initializes from a stream. If the kit is set to be of type HTMLEditorKit, and the desc parameter is an HTMLDocument, then it invokes the HTMLEditorKit to initiate the read. Otherwise it calls the superclass method which loads the model as plain text.
Parameters:
in - the stream from which to read
desc - an object describing the stream
Throws:
IOException - as thrown by the stream being used to initialize
See Also:
JTextComponent.read(java.io.Reader, java.lang.Object), JTextComponent.setDocument(javax.swing.text.Document)

getStream

protected InputStream getStream(URL page)
                         throws IOException
Fetches a stream for the given URL, which is about to be loaded by the setPage method. By default, this simply opens the URL and returns the stream. This can be reimplemented to do useful things like fetch the stream from a cache, monitor the progress of the stream, etc.

This method is expected to have the the side effect of establishing the content type, and therefore setting the appropriate EditorKit to use for loading the stream.

If this the stream was an http connection, redirects will be followed and the resulting URL will be set as the Document.StreamDescriptionProperty so that relative URL's can be properly resolved.

Parameters:
page - the URL of the page

scrollToReference

protected void scrollToReference(String reference)
Scrolls the view to the given reference location (that is, the value returned by the UL.getRef method for the URL being displayed). By default, this method only knows how to locate a reference in an HTMLDocument. The implementation calls the scrollRectToVisible method to accomplish the actual scrolling. If scrolling to a reference location is needed for document types other than HTML, this method should be reimplemented. This method will have no effect if the component is not visible.
Parameters:
reference - the named location to scroll to

getPage

public URL getPage()
Gets the current URL being displayed. If a URL was not specified in the creation of the document, this will return null, and relative URL's will not be resolved.
Returns:
the URL, or null if none

setPage

public void setPage(String url)
             throws IOException
Sets the current URL being displayed.
Parameters:
url - the URL for display
Throws:
IOException - for a null or invalid URL specification

getUIClassID

public String getUIClassID()
Gets the class ID for the UI.
Overrides:
getUIClassID in class JComponent
Returns:
the string "EditorPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createDefaultEditorKit

protected EditorKit createDefaultEditorKit()
Creates the default editor kit (PlainEditorKit) for when the component is first created.
Returns:
the editor kit

getEditorKit

public EditorKit getEditorKit()
Fetches the currently installed kit for handling content. createDefaultEditorKit is called to set up a default if necessary.
Returns:
the editor kit

getContentType

public final String getContentType()
Gets the type of content that this editor is currently set to deal with. This is defined to be the type associated with the currently installed EditorKit.
Returns:
the content type, null if no editor kit set

setContentType

public final void setContentType(String type)
Sets the type of content that this editor handles. This calls getEditorKitForContentType, and then setEditorKit if an editor kit can be successfully located. This is mostly convenience method that can be used as an alternative to calling setEditorKit directly.

If there is a charset definition specified as a parameter of the content type specification, it will be used when loading input streams using the associated EditorKit. For example if the type is specified as text/html; charset=EUC-JP the content will be loaded using the EditorKit registered for text/html and the Reader provided to the EditorKit to load unicode into the document will use the EUC-JP charset for translating to unicode.

Parameters:
type - the non-null mime type for the content editing support
See Also:
getContentType()

setEditorKit

public void setEditorKit(EditorKit kit)
Sets the currently installed kit for handling content. This is the bound property that establishes the content type of the editor. Any old kit is first deinstalled, then if kit is non-null, the new kit is installed, and a default document created for it. A PropertyChange event ("editorKit") is always fired when setEditorKit is called.

NOTE: This has the side effect of changing the model, because the EditorKit is the source of how a particular type of content is modeled. This method will cause setDocument to be called on behalf of the caller to ensure integrity of the internal state.

Parameters:
kit - the desired editor behavior
See Also:
getEditorKit()

getEditorKitForContentType

public EditorKit getEditorKitForContentType(String type)
Fetches the editor kit to use for the given type of content. This is called when a type is requested that doesn't match the currently installed type. If the component doesn't have an EditorKit registered for the given type, it will try to create an EditorKit from the default EditorKit registry. If that fails, a PlainEditorKit is used on the assumption that all text documents can be represented as plain text.

This method can be reimplemented to use some other kind of type registry. This can be reimplemented to use the Java Activation Framework, for example.

Parameters:
type - the non-null content type
Returns:
the editor kit

setEditorKitForContentType

public void setEditorKitForContentType(String type,
                                       EditorKit k)
Directly sets the editor kit to use for the given type. A look-and-feel implementation might use this in conjunction with createEditorKitForContentType to install handlers for content types with a look-and-feel bias.
Parameters:
type - the non-null content type
k - the editor kit to be set

replaceSelection

public void replaceSelection(String content)
Replaces the currently selected content with new content represented by the given string. If there is no selection this amounts to an insert of the given text. If there is no replacement text (i.e. the content string is empty or null) this amounts to a removal of the current selection. The replacement text will have the attributes currently defined for input. If the component is not editable, beep and return.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Overrides:
replaceSelection in class JTextComponent
Parameters:
content - the content to replace the selection with. This value can be null

createEditorKitForContentType

public static EditorKit createEditorKitForContentType(String type)
Creates a handler for the given type from the default registry of editor kits. The registry is created if necessary. If the registered class has not yet been loaded, an attempt is made to dynamically load the prototype of the kit for the given type. If the type was registered with a ClassLoader, that ClassLoader will be used to load the prototype. If there was no registered ClassLoader, Class.forName will be used to load the prototype.

Once a prototype EditorKit instance is successfully located, it is cloned and the clone is returned.

Parameters:
type - the content type
Returns:
the editor kit, or null if there is nothing registered for the given type

registerEditorKitForContentType

public static void registerEditorKitForContentType(String type,
                                                   String classname)
Establishes the default bindings of type to classname. The class will be dynamically loaded later when actually needed, and can be safely changed before attempted uses to avoid loading unwanted classes. The prototype EditorKit will be loaded with Class.forName when registered with this method.
Parameters:
type - the non-null content type
classname - the class to load later

registerEditorKitForContentType

public static void registerEditorKitForContentType(String type,
                                                   String classname,
                                                   ClassLoader loader)
Establishes the default bindings of type to classname. The class will be dynamically loaded later when actually needed using the given ClassLoader, and can be safely changed before attempted uses to avoid loading unwanted classes.
Parameters:
type - the non-null content type
classname - the class to load later
loader - the ClassLoader to use to load the name

getEditorKitClassNameForContentType

public static String getEditorKitClassNameForContentType(String type)
Returns the currently registered EditorKit class name for the type type.
Parameters:
type - the non-null content type
Since:
1.3

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size for the JEditorPane. The preferred size for JEditorPane is slightly altered from the preferred size of the superclass. If the size of the viewport has become smaller than the minimum size of the component, the scrollable definition for tracking width or height will turn to false. The default viewport layout will give the preferred size, and that is not desired in the case where the scrollable is tracking. In that case the normal preferred size is adjusted to the minimum size. This allows things like HTML tables to shrink down to their minimum size and then be laid out at their minimum size, refusing to shrink any further.
Overrides:
getPreferredSize in class JComponent
Returns:
a Dimension containing the preferred size

isManagingFocus

public boolean isManagingFocus()
Turns off tab traversal once focus is gained.
Overrides:
isManagingFocus in class JComponent
Returns:
true, to indicate that the focus is being managed; or false otherwise

isFocusCycleRoot

public boolean isFocusCycleRoot()
Makes JEditorPane be the root of a focus cycle. This means that, by default, tabbing within the editor pane will move between components of the pane, such as form controls, but not out of the pane.

Note that this method always returns true.

Overrides:
isFocusCycleRoot in class JComponent
Returns:
true
See Also:
JComponent.isFocusCycleRoot()

processComponentKeyEvent

protected void processComponentKeyEvent(KeyEvent e)
Overridden to handle processing of tab/shift tab. If e identifies a tab, the editor pane is not editable and has components, then the FocusManager is asked to pass focus to the next/previous component.
Overrides:
processComponentKeyEvent in class JComponent
Parameters:
e - the current key event

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
Overrides:
processKeyEvent in class JComponent
Parameters:
e - the current key event

setText

public void setText(String t)
Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor. For example, if the type is set to text/html the string should be specified in terms of HTML.

This is implemented to remove the contents of the current document, and replace them by parsing the given string using the current EditorKit. This gives the semantics of the superclass by not changing out the model, while supporting the content type currently set on this component. The assumption is that the previous content is relatively small, and that the previous content doesn't have side effects. Both of those assumptions can be violated and cause undesirable results. To avoid this, create a new document, getEditorKit().createDefaultDocument(), and replace the existing Document with the new one. You are then assured the previous Document won't have any lingering state.

  1. Leaving the existing model in place means that the old view will be torn down, and a new view created, where replacing the document would avoid the tear down of the old view.
  2. Some formats (such as HTML) can install things into the document that can influence future contents. HTML can have style information embedded that would influence the next content installed unexpectedly.

An alternative way to load this component with a string would be to create a StringReader and call the read method. In this case the model would be replaced after it was initialized with the contents of the string.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Overrides:
setText in class JTextComponent
Parameters:
t - the new text to be set
See Also:
getText()

getText

public String getText()
Returns the text contained in this TextComponent in terms of the content type of this editor. If an exception is thrown while attempting to retrieve the text, null will be returned. This is implemented to call JTextComponent.write with a StringWriter.
Overrides:
getText in class JTextComponent
Returns:
the text
See Also:
setText(java.lang.String)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.
Overrides:
getScrollableTracksViewportWidth in class JTextComponent
Returns:
true if a viewport should force the Scrollables width to match its own, false otherwise

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Returns true if a viewport should always force the height of this Scrollable to match the height of the viewport.
Overrides:
getScrollableTracksViewportHeight in class JTextComponent
Returns:
true if a viewport should force the Scrollable's height to match its own, false otherwise

paramString

protected String paramString()
Returns a string representation of this JEditorPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JTextComponent
Returns:
a string representation of this JEditorPane

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JEditorPane. For editor panes, the AccessibleContext takes the form of an AccessibleJEditorPane. A new AccessibleJEditorPane instance is created if necessary.
Overrides:
getAccessibleContext in class JTextComponent
Returns:
an AccessibleJEditorPane that serves as the AccessibleContext of this JEditorPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JEditorPaneAccessibleHypertextSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JEditorPane.JEditorPaneAccessibleHypertextSupport

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
                                |
                                +--javax.swing.JEditorPane.AccessibleJEditorPane
                                      |
                                      +--javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
All Implemented Interfaces:
AccessibleComponent, AccessibleHypertext, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Enclosing class:
JEditorPane
protected class JEditorPane.JEditorPaneAccessibleHypertextSupport
extends JEditorPane.AccessibleJEditorPane
implements AccessibleHypertext

What's returned by AccessibleJEditorPaneHTML.getAccessibleText. Provides support for AccessibleHypertext in case there is an HTML document being displayed in this JEditorPane.

See Also:
Serialized Form

Inner Class Summary
 class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
JEditorPane.JEditorPaneAccessibleHypertextSupport()
Make one of these puppies
Method Summary
AccessibleHyperlink | getLink(int linkIndex) Returns the index into an array of hyperlinks that index.
int | getLinkCount() Returns the number of links within this hypertext doc.
int | getLinkIndex(int charIndex) Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
String | getLinkText(int linkIndex) Returns the contiguous text within the document that is associated with this hyperlink.
Methods inherited from class javax.swing.JEditorPane.AccessibleJEditorPane
getAccessibleDescription, getAccessibleStateSet
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent
caretUpdate, changedUpdate, getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, insertUpdate, removeUpdate
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.accessibility.AccessibleText
getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart

Constructor Detail

JEditorPane.JEditorPaneAccessibleHypertextSupport

public JEditorPane.JEditorPaneAccessibleHypertextSupport()
Make one of these puppies
Method Detail

getLinkCount

public int getLinkCount()
Returns the number of links within this hypertext doc.
Specified by:
getLinkCount in interface AccessibleHypertext
Returns:
number of links in this hypertext doc.

getLinkIndex

public int getLinkIndex(int charIndex)
Returns the index into an array of hyperlinks that is associated with this character index, or -1 if there is no hyperlink associated with this index.
Specified by:
getLinkIndex in interface AccessibleHypertext
Parameters:
character - index within the text
Returns:
index into the set of hyperlinks for this hypertext doc.

getLink

public AccessibleHyperlink getLink(int linkIndex)
Returns the index into an array of hyperlinks that index. If there is no hyperlink at this index, it returns null.
Specified by:
getLink in interface AccessibleHypertext
Parameters:
index - into the set of hyperlinks for this hypertext doc.
Returns:
string representation of the hyperlink

getLinkText

public String getLinkText(int linkIndex)
Returns the contiguous text within the document that is associated with this hyperlink.
Parameters:
index - into the set of hyperlinks for this hypertext doc.
Returns:
the contiguous text sharing the link at this index
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JFileChooser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JFileChooser

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JFileChooser
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JFileChooser
extends JComponent
implements Accessible

JFileChooser provides a simple mechanism for the user to choose a file. For information about using JFileChooser, see How to Use File Choosers, a section in The Java Tutorial.

The following code pops up a file chooser for the user's home directory that sees only .jpg and .gif images:

    JFileChooser chooser = new JFileChooser();
    // Note: source for ExampleFileFilter can be found in FileChooserDemo,
    // under the demo/jfc directory in the Java 2 SDK, Standard Edition.
    ExampleFileFilter filter = new ExampleFileFilter();
    filter.addExtension("jpg");
    filter.addExtension("gif");
    filter.setDescription("JPG & GIF Images");
    chooser.setFileFilter(filter);
    int returnVal = chooser.showOpenDialog(parent);
    if(returnVal == JFileChooser.APPROVE_OPTION) {
       System.out.println("You chose to open this file: " +
            chooser.getSelectedFile().getName());
    }

See Also:
Serialized Form

Inner Class Summary
protected  class JFileChooser.AccessibleJFileChooser
This class implements accessibility support for the JFileChooser class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static String | ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY Identifies whether a the AcceptAllFileFilter is used or not.
protected AccessibleContext | accessibleContext
static String | ACCESSORY_CHANGED_PROPERTY Says that a different accessory component is in use (for example, to preview files).
static String | APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY Identifies change in the mnemonic for the approve (yes, ok) button.
static String | APPROVE_BUTTON_TEXT_CHANGED_PROPERTY Identifies change in the text on the approve (yes, ok) button.
static String | APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY Identifies change in the tooltip text for the approve (yes, ok) button.
static int | APPROVE_OPTION Return value if approve (yes, ok) is chosen.
static String | APPROVE_SELECTION Instruction to approve the current selection (same as pressing yes or ok).
static int | CANCEL_OPTION Return value if cancel is chosen.
static String | CANCEL_SELECTION Instruction to cancel the current selection.
static String | CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY Identifies a change in the list of predefined file filters the user can choose from.
static String | CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY Instruction to display the control buttons.
static int | CUSTOM_DIALOG Type value indicating that the JFileChooser supports a developer-specified file operation.
static String | DIALOG_TITLE_CHANGED_PROPERTY Identifies a change in the dialog title.
static String | DIALOG_TYPE_CHANGED_PROPERTY Identifies a change in the type of files displayed (files only, directories only, or both files and directories).
static int | DIRECTORIES_ONLY Instruction to display only directories.
static String | DIRECTORY_CHANGED_PROPERTY Identifies user's directory change.
static int | ERROR_OPTION Return value if an error occured.
static String | FILE_FILTER_CHANGED_PROPERTY User changed the kind of files to display.
static String | FILE_HIDING_CHANGED_PROPERTY Identifies a change in the display-hidden-files property.
static String | FILE_SELECTION_MODE_CHANGED_PROPERTY Identifies a change in the kind of selection (single, multiple, etc.).
static String | FILE_SYSTEM_VIEW_CHANGED_PROPERTY Says that a different object is being used to find available drives on the system.
static String | FILE_VIEW_CHANGED_PROPERTY Says that a different object is being used to retrieve file information.
static int | FILES_AND_DIRECTORIES Instruction to display both files and directories.
static int | FILES_ONLY Instruction to display only files.
static String | MULTI_SELECTION_ENABLED_CHANGED_PROPERTY Enables multiple-file selections.
static int | OPEN_DIALOG Type value indicating that the JFileChooser supports an "Open" file operation.
static int | SAVE_DIALOG Type value indicating that the JFileChooser supports a "Save" file operation.
static String | SELECTED_FILE_CHANGED_PROPERTY Identifies change in user's single-file selection.
static String | SELECTED_FILES_CHANGED_PROPERTY Identifies change in user's multiple-file selection.
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JFileChooser()
Constructs a JFileChooser pointing to the user's home directory.
JFileChooser(File currentDirectory)
Constructs a JFileChooser using the given File as the path.
JFileChooser(File currentDirectory, FileSystemView fsv)
Constructs a JFileChooser using the given current directory and FileSystemView.
JFileChooser(FileSystemView fsv)
Constructs a JFileChooser using the given FileSystemView.
JFileChooser(String currentDirectoryPath)
Constructs a JFileChooser using the given path.
JFileChooser(String currentDirectoryPath, FileSystemView fsv)
Constructs a JFileChooser using the given current directory path and FileSystemView.
Method Summary
boolean | accept(File f) Returns true if the file should be displayed.
void | addActionListener(ActionListener l) Adds an ActionListener to the button.
void | addChoosableFileFilter(FileFilter filter) Adds a filter to the list of user choosable file filters.
void | approveSelection() Called by the UI when the user hits the Approve button (labeled "Open" or "Save", by default).
void | cancelSelection() Called by the UI when the user chooses the Cancel button.
void | changeToParentDirectory() Changes the directory to be set to the parent of the current directory.
void | ensureFileIsVisible(File f) Makes sure that the specified file is viewable, and not hidden.
protected void | fireActionPerformed(String command) Notifies all listeners that have registered interest for notification on this event type.
FileFilter | getAcceptAllFileFilter() Returns the AcceptAll file filter.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JFileChooser.
JComponent | getAccessory() Returns the accessory component.
int | getApproveButtonMnemonic() Returns the approve button's mnemonic.
String | getApproveButtonText() Returns the text used in the ApproveButton in the FileChooserUI.
String | getApproveButtonToolTipText() Returns the tooltip text used in the ApproveButton.
FileFilter[] | getChoosableFileFilters() Gets the list of user choosable file filters.
boolean | getControlButtonsAreShown() Returns a boolean indicating whether the accept and cancel buttons are shown in the file chooser.
File | getCurrentDirectory() Returns the current directory.
String | getDescription(File f) Returns the file description.
String | getDialogTitle() Gets the string that goes in the JFileChooser's titlebar.
int | getDialogType() Returns the type of this dialog.
FileFilter | getFileFilter() Returns the currently selected file filter.
int | getFileSelectionMode() Returns the current file-selection mode.
FileSystemView | getFileSystemView() Returns the file system view.
FileView | getFileView() Returns the current file view.
Icon | getIcon(File f) Returns the icon for this file or type of file, depending on the system.
String | getName(File f) Returns the filename.
File | getSelectedFile() Returns the selected file.
File[] | getSelectedFiles() Returns a list of selected files if the file chooser is set to allow multiple selection.
String | getTypeDescription(File f) Returns the file type.
FileChooserUI | getUI() Gets the UI object which implements the L&F for this component.
String | getUIClassID() Returns a string that specifies the name of the L&F class that renders this component.
boolean | isAcceptAllFileFilterUsed() Returns whether the AcceptAll FileFilter is used.
boolean | isDirectorySelectionEnabled() Convenience call that determines if directories are selectable based on the current file selection mode.
boolean | isFileHidingEnabled() Returns true if hidden files are not shown in the file chooser; otherwise, returns false.
boolean | isFileSelectionEnabled() Convenience call that determines if files are selectable based on the current file selection mode.
boolean | isMultiSelectionEnabled() Returns true if multiple files can be selected.
boolean | isTraversable(File f) Returns true if the file (directory) can be visited.
protected String | paramString() Returns a string representation of this JFileChooser.
void | removeActionListener(ActionListener l) Removes an ActionListener from the button.
boolean | removeChoosableFileFilter(FileFilter f) Removes a filter from the list of user choosable file filters.
void | rescanCurrentDirectory() Tells the UI to rescan its files list from the current directory.
void | resetChoosableFileFilters() Resets the choosable file filter list to its starting state.
void | setAcceptAllFileFilterUsed(boolean b) Determines if the AcceptAll FileFilter is used.
void | setAccessory(JComponent newAccessory) Sets the accessory component.
void | setApproveButtonMnemonic(char mnemonic) Sets the approve button's mnemonic using a character.
void | setApproveButtonMnemonic(int mnemonic) Sets the approve button's mnemonic using a numeric keycode.
void | setApproveButtonText(String approveButtonText) Sets the text used in the ApproveButton in the FileChooserUI.
void | setApproveButtonToolTipText(String toolTipText) Sets the tooltip text used in the ApproveButton.
void | setControlButtonsAreShown(boolean b) Sets whether the approve and cancel buttons are shown in the file chooser.
void | setCurrentDirectory(File dir) Sets the current directory.
void | setDialogTitle(String dialogTitle) Sets the string that goes in the JFileChooser window's title bar.
void | setDialogType(int dialogType) Sets the type of this dialog.
void | setFileFilter(FileFilter filter) Sets the current file filter.
void | setFileHidingEnabled(boolean b) Sets file hiding on or off.
void | setFileSelectionMode(int mode) Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories.
void | setFileSystemView(FileSystemView fsv) Sets the file system view that the JFileChooser uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.
void | setFileView(FileView fileView) Sets the file view to used to retrieve UI information, such as the icon that represents a file or the type description of a file.
void | setMultiSelectionEnabled(boolean b) Sets the file chooser to allow multiple file selections.
void | setSelectedFile(File file) Sets the selected file.
void | setSelectedFiles(File[] selectedFiles) Sets the list of selected files if the file chooser is set to allow multiple selection.
protected void | setup(FileSystemView view) Performs common constructor initialization and setup.
int | showDialog(Component parent, String approveButtonText) Pops a custom file chooser dialog with a custom approve button.
int | showOpenDialog(Component parent) Pops up an "Open File" file chooser dialog.
int | showSaveDialog(Component parent) Pops up a "Save File" file chooser dialog.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

OPEN_DIALOG

public static final int OPEN_DIALOG
Type value indicating that the JFileChooser supports an "Open" file operation.

SAVE_DIALOG

public static final int SAVE_DIALOG
Type value indicating that the JFileChooser supports a "Save" file operation.

CUSTOM_DIALOG

public static final int CUSTOM_DIALOG
Type value indicating that the JFileChooser supports a developer-specified file operation.

CANCEL_OPTION

public static final int CANCEL_OPTION
Return value if cancel is chosen.

APPROVE_OPTION

public static final int APPROVE_OPTION
Return value if approve (yes, ok) is chosen.

ERROR_OPTION

public static final int ERROR_OPTION
Return value if an error occured.

FILES_ONLY

public static final int FILES_ONLY
Instruction to display only files.

DIRECTORIES_ONLY

public static final int DIRECTORIES_ONLY
Instruction to display only directories.

FILES_AND_DIRECTORIES

public static final int FILES_AND_DIRECTORIES
Instruction to display both files and directories.

CANCEL_SELECTION

public static final String CANCEL_SELECTION
Instruction to cancel the current selection.

APPROVE_SELECTION

public static final String APPROVE_SELECTION
Instruction to approve the current selection (same as pressing yes or ok).

APPROVE_BUTTON_TEXT_CHANGED_PROPERTY

public static final String APPROVE_BUTTON_TEXT_CHANGED_PROPERTY
Identifies change in the text on the approve (yes, ok) button.

APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY

public static final String APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY
Identifies change in the tooltip text for the approve (yes, ok) button.

APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY

public static final String APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY
Identifies change in the mnemonic for the approve (yes, ok) button.

CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY

public static final String CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY
Instruction to display the control buttons.

DIRECTORY_CHANGED_PROPERTY

public static final String DIRECTORY_CHANGED_PROPERTY
Identifies user's directory change.

SELECTED_FILE_CHANGED_PROPERTY

public static final String SELECTED_FILE_CHANGED_PROPERTY
Identifies change in user's single-file selection.

SELECTED_FILES_CHANGED_PROPERTY

public static final String SELECTED_FILES_CHANGED_PROPERTY
Identifies change in user's multiple-file selection.

MULTI_SELECTION_ENABLED_CHANGED_PROPERTY

public static final String MULTI_SELECTION_ENABLED_CHANGED_PROPERTY
Enables multiple-file selections.

FILE_SYSTEM_VIEW_CHANGED_PROPERTY

public static final String FILE_SYSTEM_VIEW_CHANGED_PROPERTY
Says that a different object is being used to find available drives on the system.

FILE_VIEW_CHANGED_PROPERTY

public static final String FILE_VIEW_CHANGED_PROPERTY
Says that a different object is being used to retrieve file information.

FILE_HIDING_CHANGED_PROPERTY

public static final String FILE_HIDING_CHANGED_PROPERTY
Identifies a change in the display-hidden-files property.

FILE_FILTER_CHANGED_PROPERTY

public static final String FILE_FILTER_CHANGED_PROPERTY
User changed the kind of files to display.

FILE_SELECTION_MODE_CHANGED_PROPERTY

public static final String FILE_SELECTION_MODE_CHANGED_PROPERTY
Identifies a change in the kind of selection (single, multiple, etc.).

ACCESSORY_CHANGED_PROPERTY

public static final String ACCESSORY_CHANGED_PROPERTY
Says that a different accessory component is in use (for example, to preview files).

ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY

public static final String ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY
Identifies whether a the AcceptAllFileFilter is used or not.

DIALOG_TITLE_CHANGED_PROPERTY

public static final String DIALOG_TITLE_CHANGED_PROPERTY
Identifies a change in the dialog title.

DIALOG_TYPE_CHANGED_PROPERTY

public static final String DIALOG_TYPE_CHANGED_PROPERTY
Identifies a change in the type of files displayed (files only, directories only, or both files and directories).

CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY

public static final String CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
Identifies a change in the list of predefined file filters the user can choose from.

accessibleContext

protected AccessibleContext accessibleContext
Constructor Detail

JFileChooser

public JFileChooser()
Constructs a JFileChooser pointing to the user's home directory.

JFileChooser

public JFileChooser(String currentDirectoryPath)
Constructs a JFileChooser using the given path. Passing in a null string causes the file chooser to point to the user's home directory.
Parameters:
currentDirectoryPath - a String giving the path to a file or directory

JFileChooser

public JFileChooser(File currentDirectory)
Constructs a JFileChooser using the given File as the path. Passing in a null file causes the file chooser to point to the user's home directory.
Parameters:
currentDirectory - a File object specifying the path to a file or directory

JFileChooser

public JFileChooser(FileSystemView fsv)
Constructs a JFileChooser using the given FileSystemView.

JFileChooser

public JFileChooser(File currentDirectory,
                    FileSystemView fsv)
Constructs a JFileChooser using the given current directory and FileSystemView.

JFileChooser

public JFileChooser(String currentDirectoryPath,
                    FileSystemView fsv)
Constructs a JFileChooser using the given current directory path and FileSystemView.
Method Detail

setup

protected void setup(FileSystemView view)
Performs common constructor initialization and setup.

getSelectedFile

public File getSelectedFile()
Returns the selected file. This can be set either by the programmer via setFile or by a user action, such as either typing the filename into the UI or selecting the file from a list in the UI.
Returns:
the selected file
See Also:
setSelectedFile(java.io.File)

setSelectedFile

public void setSelectedFile(File file)
Sets the selected file. If the file's parent directory is not the current directory, changes the current directory to be the file's parent directory.
Parameters:
file - the selected file
See Also:
getSelectedFile()

getSelectedFiles

public File[] getSelectedFiles()
Returns a list of selected files if the file chooser is set to allow multiple selection.

setSelectedFiles

public void setSelectedFiles(File[] selectedFiles)
Sets the list of selected files if the file chooser is set to allow multiple selection.

getCurrentDirectory

public File getCurrentDirectory()
Returns the current directory.
Returns:
the current directory
See Also:
setCurrentDirectory(java.io.File)

setCurrentDirectory

public void setCurrentDirectory(File dir)
Sets the current directory. Passing in null sets the file chooser to point to the user's home directory. If the file passed in as currentDirectory is not a directory, the parent of the file will be used as the currentDirectory. If the parent is not traversable, then it will walk up the parent tree until it finds a traversable directory, or hits the root of the file system.
Parameters:
dir - the current directory to point to
See Also:
getCurrentDirectory()

changeToParentDirectory

public void changeToParentDirectory()
Changes the directory to be set to the parent of the current directory.
See Also:
getCurrentDirectory()

rescanCurrentDirectory

public void rescanCurrentDirectory()
Tells the UI to rescan its files list from the current directory.

ensureFileIsVisible

public void ensureFileIsVisible(File f)
Makes sure that the specified file is viewable, and not hidden.
Parameters:
f - a File object

showOpenDialog

public int showOpenDialog(Component parent)
Pops up an "Open File" file chooser dialog. Note that the text that appears in the approve button is determined by the L&F.
Parameters:
parent - the parent component of the dialog, can be null; see showDialog for details
Returns:
the return state of the file chooser on popdown:
  • JFileChooser.CANCEL_OPTION
  • JFileChooser.APPROVE_OPTION
  • JFileCHooser.ERROR_OPTION if an error occurs or the dialog is dismissed
See Also:
showDialog(java.awt.Component, java.lang.String)

showSaveDialog

public int showSaveDialog(Component parent)
Pops up a "Save File" file chooser dialog. Note that the text that appears in the approve button is determined by the L&F.
Parameters:
parent - the parent component of the dialog, can be null; see showDialog for details
Returns:
the return state of the file chooser on popdown:
  • JFileChooser.CANCEL_OPTION
  • JFileChooser.APPROVE_OPTION
  • JFileCHooser.ERROR_OPTION if an error occurs or the dialog is dismissed
See Also:
showDialog(java.awt.Component, java.lang.String)

showDialog

public int showDialog(Component parent,
                      String approveButtonText)
Pops a custom file chooser dialog with a custom approve button. For example, the following code pops up a file chooser with a "Run Application" button (instead of the normal "Save" or "Open" button):
 filechooser.showDialog(parentFrame, "Run Application");
Alternatively, the following code does the same thing:
    JFileChooser chooser = new JFileChooser(null);
    chooser.setApproveButtonText("Run Application");
    chooser.showDialog(parentFrame, null);

The parent argument determines two things: the frame on which the open dialog depends and the component whose position the look and feel should consider when placing the dialog. If the parent is a Frame object (such as a JFrame) then the dialog depends on the frame and the look and feel positions the dialog relative to the frame (for example, centered over the frame). If the parent is a component, then the dialog depends on the frame containing the component, and is positioned relative to the component (for example, centered over the component). If the parent is null, then the dialog depends on no visible window, and it's placed in a look-and-feel-dependent position such as the center of the screen.

Parameters:
parent - the parent component of the dialog; can be null
approveButtonText - the text of the ApproveButton
Returns:
the return state of the file chooser on popdown:
  • JFileChooser.CANCEL_OPTION
  • JFileChooser.APPROVE_OPTION
  • JFileCHooser.ERROR_OPTION if an error occurs or the dialog is dismissed

getControlButtonsAreShown

public boolean getControlButtonsAreShown()
Returns a boolean indicating whether the accept and cancel buttons are shown in the file chooser.
Returns:
true if the accept & cancel buttons are shown; otherwise, false
Since:
1.3
See Also:
setControlButtonsAreShown(boolean)

setControlButtonsAreShown

public void setControlButtonsAreShown(boolean b)
Sets whether the approve and cancel buttons are shown in the file chooser.
Since:
1.3
See Also:
getControlButtonsAreShown()

getDialogType

public int getDialogType()
Returns the type of this dialog. The default is JFileChooser.OPEN_DIALOG.
Returns:
the type of dialog to be displayed:
  • JFileChooser.OPEN_DIALOG
  • JFileChooser.SAVE_DIALOG
  • JFileChooser.CUSTOM_DIALOG
See Also:
setDialogType(int)

setDialogType

public void setDialogType(int dialogType)
Sets the type of this dialog. Use OPEN_DIALOG when you want to bring up a file chooser that the user can use to open a file. Likewise, use SAVE_DIALOG for letting the user choose a file for saving. Use CUSTOM_DIALOG when you want to use the file chooser in a context other than "Open" or "Save". For instance, you might want to bring up a file chooser that allows the user to choose a file to execute. Note that you normally would not need to set the JFileChooser to use CUSTOM_DIALOG since a call to setApproveButtonText does this for you. The default dialog type is JFileChooser.OPEN_DIALOG.
Parameters:
dialogType - the type of dialog to be displayed:
  • JFileChooser.OPEN_DIALOG
  • JFileChooser.SAVE_DIALOG
  • JFileChooser.CUSTOM_DIALOG
Throws:
IllegalArgumentException - if dialogType is not legal
See Also:
getDialogType(), setApproveButtonText(java.lang.String)

setDialogTitle

public void setDialogTitle(String dialogTitle)
Sets the string that goes in the JFileChooser window's title bar.
Parameters:
dialogTitle - the new String for the title bar
See Also:
getDialogTitle()

getDialogTitle

public String getDialogTitle()
Gets the string that goes in the JFileChooser's titlebar.
See Also:
setDialogTitle(java.lang.String)

setApproveButtonToolTipText

public void setApproveButtonToolTipText(String toolTipText)
Sets the tooltip text used in the ApproveButton. If null, the UI object will determine the button's text.
Returns:
the text used in the ApproveButton
See Also:
setApproveButtonText(java.lang.String), setDialogType(int), showDialog(java.awt.Component, java.lang.String)

getApproveButtonToolTipText

public String getApproveButtonToolTipText()
Returns the tooltip text used in the ApproveButton. If null, the UI object will determine the button's text.
Returns:
the text used in the ApproveButton
See Also:
setApproveButtonText(java.lang.String), setDialogType(int), showDialog(java.awt.Component, java.lang.String)

getApproveButtonMnemonic

public int getApproveButtonMnemonic()
Returns the approve button's mnemonic.
Returns:
an integer value for the mnemonic key
See Also:
setApproveButtonMnemonic(int)

setApproveButtonMnemonic

public void setApproveButtonMnemonic(int mnemonic)
Sets the approve button's mnemonic using a numeric keycode.
Parameters:
mnemonic - an integer value for the mnemonic key
See Also:
getApproveButtonMnemonic()

setApproveButtonMnemonic

public void setApproveButtonMnemonic(char mnemonic)
Sets the approve button's mnemonic using a character.
Parameters:
mnemonic - a character value for the mnemonic key
See Also:
getApproveButtonMnemonic()

setApproveButtonText

public void setApproveButtonText(String approveButtonText)
Sets the text used in the ApproveButton in the FileChooserUI.
Parameters:
approveButtonText - the text used in the ApproveButton
See Also:
getApproveButtonText(), setDialogType(int), showDialog(java.awt.Component, java.lang.String)

getApproveButtonText

public String getApproveButtonText()
Returns the text used in the ApproveButton in the FileChooserUI. If null, the UI object will determine the button's text. Typically, this would be "Open" or "Save".
Returns:
the text used in the ApproveButton
See Also:
setApproveButtonText(java.lang.String), setDialogType(int), showDialog(java.awt.Component, java.lang.String)

getChoosableFileFilters

public FileFilter[] getChoosableFileFilters()
Gets the list of user choosable file filters.
Returns:
a FileFilter array containing all the choosable file filters

addChoosableFileFilter

public void addChoosableFileFilter(FileFilter filter)
Adds a filter to the list of user choosable file filters.
Parameters:
filter - the FileFilter to add to the choosable file filter list

removeChoosableFileFilter

public boolean removeChoosableFileFilter(FileFilter f)
Removes a filter from the list of user choosable file filters. Returns true if the file filter was removed.

resetChoosableFileFilters

public void resetChoosableFileFilters()
Resets the choosable file filter list to its starting state. Normally, this removes all added file filters while leaving the AcceptAll file filter.
See Also:
addChoosableFileFilter(javax.swing.filechooser.FileFilter),
getChoosableFileFilters(),
removeChoosableFileFilter(javax.swing.filechooser.FileFilter)

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter()
Returns the AcceptAll file filter. For example, on Win32 this would be All Files (*.*).

isAcceptAllFileFilterUsed

public boolean isAcceptAllFileFilterUsed()
Returns whether the AcceptAll FileFilter is used.
Returns:
true if the AcceptAll FileFilter is used
Since:
1.3
See Also:
setAcceptAllFileFilterUsed(boolean)

setAcceptAllFileFilterUsed

public void setAcceptAllFileFilterUsed(boolean b)
Determines if the AcceptAll FileFilter is used.
Since:
1.3
See Also:
isAcceptAllFileFilterUsed()

getAccessory

public JComponent getAccessory()
Returns the accessory component.
Returns:
this JFileChooser's accessory component, or null
See Also:
setAccessory(javax.swing.JComponent)

setAccessory

public void setAccessory(JComponent newAccessory)
Sets the accessory component. An accessory is often used to show a preview image of the selected file; however, it can be used for anything that the programmer wishes, such as extra custom file chooser controls.

Note: if there was a previous accessory, you should unregister any listeners that the accessory might have registered with the file chooser.

setFileSelectionMode

public void setFileSelectionMode(int mode)
Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories. The default is JFilesChooser.FILES_ONLY.
Parameters:
mode - the type of files to be displayed:
  • JFileChooser.FILES_ONLY
  • JFileChooser.DIRECTORIES_ONLY
  • JFileChooser.FILES_AND_DIRECTORIES
Throws:
IllegalArgumentException - if mode is an illegal Dialog mode
See Also:
getFileSelectionMode()

getFileSelectionMode

public int getFileSelectionMode()
Returns the current file-selection mode. The default is JFilesChooser.FILES_ONLY.
Returns:
the type of files to be displayed, one of the following:
  • JFileChooser.FILES_ONLY
  • JFileChooser.DIRECTORIES_ONLY
  • JFileChooser.FILES_AND_DIRECTORIES
See Also:
setFileSelectionMode(int)

isFileSelectionEnabled

public boolean isFileSelectionEnabled()
Convenience call that determines if files are selectable based on the current file selection mode.
See Also:
setFileSelectionMode(int), getFileSelectionMode()

isDirectorySelectionEnabled

public boolean isDirectorySelectionEnabled()
Convenience call that determines if directories are selectable based on the current file selection mode.
See Also:
setFileSelectionMode(int), getFileSelectionMode()

setMultiSelectionEnabled

public void setMultiSelectionEnabled(boolean b)
Sets the file chooser to allow multiple file selections.

NOTE: this functionality is not yet implemented in the current L&Fs.

See Also:
isMultiSelectionEnabled()

isMultiSelectionEnabled

public boolean isMultiSelectionEnabled()
Returns true if multiple files can be selected.
Returns:
true if multiple files can be selected
See Also:
setMultiSelectionEnabled(boolean)

isFileHidingEnabled

public boolean isFileHidingEnabled()
Returns true if hidden files are not shown in the file chooser; otherwise, returns false.
Returns:
the status of the file hiding property
See Also:
setFileHidingEnabled(boolean)

setFileHidingEnabled

public void setFileHidingEnabled(boolean b)
Sets file hiding on or off. If true, hidden files are not shown in the file chooser. The job of determining which files are shown is done by the FileView.
Parameters:
b - the boolean value that determines whether file hiding is turned on
See Also:
isFileHidingEnabled()

setFileFilter

public void setFileFilter(FileFilter filter)
Sets the current file filter. The file filter is used by the file chooser to filter out files from the user's view.
Parameters:
filter - the new current file filter to use
See Also:
getFileFilter()

getFileFilter

public FileFilter getFileFilter()
Returns the currently selected file filter.
Returns:
the current file filter
See Also:
setFileFilter(javax.swing.filechooser.FileFilter), addChoosableFileFilter(javax.swing.filechooser.FileFilter)

setFileView

public void setFileView(FileView fileView)
Sets the file view to used to retrieve UI information, such as the icon that represents a file or the type description of a file.
See Also:
getFileView()

getFileView

public FileView getFileView()
Returns the current file view.
See Also:
setFileView(javax.swing.filechooser.FileView)

getName

public String getName(File f)
Returns the filename.
Parameters:
f - the File
Returns:
the String containing the filename for f
See Also:
FileView.getName(java.io.File)

getDescription

public String getDescription(File f)
Returns the file description.
Parameters:
f - the File
Returns:
the String containing the file description for f
See Also:
FileView.getDescription(java.io.File)

getTypeDescription

public String getTypeDescription(File f)
Returns the file type.
Parameters:
f - the File
Returns:
the String containing the file type description for f
See Also:
FileView.getTypeDescription(java.io.File)

getIcon

public Icon getIcon(File f)
Returns the icon for this file or type of file, depending on the system.
Parameters:
f - the File
Returns:
the Icon for this file, or type of file
See Also:
FileView.getIcon(java.io.File)

isTraversable

public boolean isTraversable(File f)
Returns true if the file (directory) can be visited. Returns false if the directory cannot be traversed.
Parameters:
f - the File
Returns:
true if the file/directory can be traversed, otherwise false
See Also:
FileView.isTraversable(java.io.File)

accept

public boolean accept(File f)
Returns true if the file should be displayed.
Parameters:
f - the File
Returns:
true if the file should be displayed, otherwise false
See Also:
FileFilter.accept(java.io.File)

setFileSystemView

public void setFileSystemView(FileSystemView fsv)
Sets the file system view that the JFileChooser uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.
Parameters:
fsv - the new FileSystemView
See Also:
FileSystemView

getFileSystemView

public FileSystemView getFileSystemView()
Returns the file system view.
Returns:
the FileSystemView object
See Also:
setFileSystemView(javax.swing.filechooser.FileSystemView)

approveSelection

public void approveSelection()
Called by the UI when the user hits the Approve button (labeled "Open" or "Save", by default). This can also be called by the programmer.

cancelSelection

public void cancelSelection()
Called by the UI when the user chooses the Cancel button. This can also be called by the programmer.

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the button.
Parameters:
l - the listener to be added

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the button.
Parameters:
l - the listener to be removed

fireActionPerformed

protected void fireActionPerformed(String command)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
See Also:
EventListenerList

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "FileChooserUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getUI

public FileChooserUI getUI()
Gets the UI object which implements the L&F for this component.
Returns:
the FileChooserUI object that implements the FileChooserUI L&F

paramString

protected String paramString()
Returns a string representation of this JFileChooser. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JFileChooser

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JFileChooser. For file choosers, the AccessibleContext takes the form of an AccessibleJFileChooser. A new AccessibleJFileChooser instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJFileChooser that serves as the AccessibleContext of this JFileChooser
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JFrame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
public class JFrame
extends Frame
implements WindowConstants, Accessible, RootPaneContainer

An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture. You can find task-oriented documentation about using JFrame in The Java Tutorial, in the section How to Make Frames.

The JFrame class is slightly incompatible with Frame. Like all other JFC/Swing top-level containers, a JFrame contains a JRootPane as its only child. The content pane provided by the root pane should, as a rule, contain all the non-menu components displayed by the JFrame. This is different from the AWT Frame case. For example, to add a child to an AWT frame you'd write:

       frame.add(child);
However using JFrame you need to add the child to the JFrame's content pane instead:
       frame.getContentPane().add(child);
The same is true for setting layout managers, removing components, listing children, and so on. All these methods should normally be sent to the content pane instead of the JFrame itself. The content pane will always be non-null. Attempting to set it to null will cause the JFrame to throw an exception. The default content pane will have a BorderLayout manager set on it.

Unlike a Frame, a JFrame has some notion of how to respond when the user attempts to close the window. The default behavior is to simply hide the JFrame when the user closes the window. To change the default behavior, you invoke the method setDefaultCloseOperation(int). To make the JFrame behave the same as a Frame instance, use setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE).

For more information on content panes and other features that root panes provide, see Using Top-Level Containers in The Java Tutorial.

In a multi-screen environment, you can create a JFrame on a different screen device. See Frame for more information.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JFrame key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JRootPane, setDefaultCloseOperation(int), WindowListener.windowClosing(java.awt.event.WindowEvent), Serialized Form

Inner Class Summary
protected  class JFrame.AccessibleJFrame
This class implements accessibility support for the JFrame class.
Inner classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext The accessible context property.
static int | EXIT_ON_CLOSE The exit application default window close operation.
protected JRootPane | rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected boolean | rootPaneCheckingEnabled If true then calls to add and setLayout will cause an exception to be thrown.
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JFrame()
Constructs a new frame that is initially invisible.
JFrame(GraphicsConfiguration gc)
Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.
JFrame(String title)
Creates a new, initially invisible Frame with the specified title.
JFrame(String title, GraphicsConfiguration gc)
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to this component, they must be added to its contentPane instead.
protected JRootPane | createRootPane() Called by the constructor methods to create the default rootPane.
protected void | frameInit() Called by the constructors to init the JFrame properly.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JFrame.
Container | getContentPane() Returns the contentPane object for this frame.
int | getDefaultCloseOperation() Returns the operation that occurs when the user initiates a "close" on this frame.
Component | getGlassPane() Returns the glassPane object for this frame.
JMenuBar | getJMenuBar() Returns the menubar set on this frame.
JLayeredPane | getLayeredPane() Returns the layeredPane object for this frame.
JRootPane | getRootPane() Returns the rootPane object for this frame.
protected boolean | isRootPaneCheckingEnabled() Returns whether calls to add and setLayout cause an exception to be thrown.
protected String | paramString() Returns a string representation of this JFrame.
protected void | processKeyEvent(KeyEvent e) Processes key events occurring on this component and, if appropriate, passes them on to components in the frame which have registered interest in them.
protected void | processWindowEvent(WindowEvent e) Processes window events occurring on this component.
void | remove(Component comp) Removes the specified component from this container.
void | setContentPane(Container contentPane) Sets the contentPane property.
void | setDefaultCloseOperation(int operation) Sets the operation that will happen by default when the user initiates a "close" on this frame.
void | setGlassPane(Component glassPane) Sets the glassPane property.
void | setJMenuBar(JMenuBar menubar) Sets the menubar for this frame.
void | setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
protected void | setRootPane(JRootPane root) Sets the rootPane property.
protected void | setRootPaneCheckingEnabled(boolean enabled) Determines whether calls to add and setLayout will cause an exception to be thrown.
void | update(Graphics g) Just calls paint(g).
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFont, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent

Field Detail

EXIT_ON_CLOSE

public static final int EXIT_ON_CLOSE
The exit application default window close operation. If a window has this set as the close operation and is closed in an applet, a SecurityException may be thrown. It is recommended you only use this in an application.

Since:
1.3

rootPane

protected JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
JRootPane, RootPaneContainer

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
If true then calls to add and setLayout will cause an exception to be thrown. The default is false.
See Also:
isRootPaneCheckingEnabled(), setRootPaneCheckingEnabled(boolean)

accessibleContext

protected AccessibleContext accessibleContext
The accessible context property.
Constructor Detail

JFrame

public JFrame()
Constructs a new frame that is initially invisible.
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

JFrame

public JFrame(GraphicsConfiguration gc)
Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.
Parameters:
gc - the GraphicsConfiguration that is used to construct the new Frame; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException - if gc is not from a screen device
Since:
1.3

JFrame

public JFrame(String title)
Creates a new, initially invisible Frame with the specified title.
Parameters:
title - the title for the frame
See Also:
Component.setSize(int, int), Component.setVisible(boolean)

JFrame

public JFrame(String title,
              GraphicsConfiguration gc)
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.
Parameters:
title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
gc - the GraphicsConfiguration that is used to construct the new JFrame with; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException - if gc is not from a screen device
Since:
1.3
Method Detail

frameInit

protected void frameInit()
Called by the constructors to init the JFrame properly.

createRootPane

protected JRootPane createRootPane()
Called by the constructor methods to create the default rootPane.

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Processes key events occurring on this component and, if appropriate, passes them on to components in the frame which have registered interest in them.
Overrides:
processKeyEvent in class Component
Parameters:
e - the key event
See Also:
Component.processKeyEvent(java.awt.event.KeyEvent)

processWindowEvent

protected void processWindowEvent(WindowEvent e)
Processes window events occurring on this component. Hides the window or disposes of it, as specified by the setting of the defaultCloseOperation property.
Overrides:
processWindowEvent in class Window
Parameters:
e - the window event
See Also:
setDefaultCloseOperation(int), Window.processWindowEvent(java.awt.event.WindowEvent)

setDefaultCloseOperation

public void setDefaultCloseOperation(int operation)
Sets the operation that will happen by default when the user initiates a "close" on this frame. You must specify one of the following choices:

  • DO_NOTHING_ON_CLOSE (defined in WindowConstants): Don't do anything; require the program to handle the operation in the windowClosing method of a registered WindowListener object.
  • HIDE_ON_CLOSE (defined in WindowConstants): Automatically hide the frame after invoking any registered WindowListener objects.
  • DISPOSE_ON_CLOSE (defined in WindowConstants): Automatically hide and dispose the frame after invoking any registered WindowListener objects.
  • EXIT_ON_CLOSE (defined in JFrame): Exit the application using the System exit method. Use this only in applications.

The value is set to HIDE_ON_CLOSE by default.

See Also:
Window.addWindowListener(java.awt.event.WindowListener), getDefaultCloseOperation(), WindowConstants

getDefaultCloseOperation

public int getDefaultCloseOperation()
Returns the operation that occurs when the user initiates a "close" on this frame.
Returns:
an integer indicating the window-close operation
See Also:
setDefaultCloseOperation(int)

update

public void update(Graphics g)
Just calls paint(g). This method was overridden to prevent an unnecessary call to clear the background.
Overrides:
update in class Container
Parameters:
g - the Graphics context in which to paint

setJMenuBar

public void setJMenuBar(JMenuBar menubar)
Sets the menubar for this frame.
Parameters:
menubar - the menubar being placed in the frame
See Also:
getJMenuBar()

getJMenuBar

public JMenuBar getJMenuBar()
Returns the menubar set on this frame.
Returns:
the menubar for this frame
See Also:
setJMenuBar(javax.swing.JMenuBar)

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.
Returns:
true if add and setLayout are checked; false otherwise
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout will cause an exception to be thrown.
Parameters:
enabled - true if checking is to be enabled, which causes the exceptions to be thrown
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
addImpl in class Container
Parameters:
comp - the component to be enhanced
constraints - the constraints to be respected
index - the index
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.
Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thiComponent.getContentPane().setLayout(new BorderLayout())
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
setLayout in class Container
Parameters:
manager - the LayoutManager
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this frame.
Specified by:
getRootPane in interface RootPaneContainer
Returns:
the rootPane property
See Also:
setRootPane(javax.swing.JRootPane), RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the rootPane property. This method is called by the constructor.
Parameters:
root - the rootPane object for this frame
See Also:
getRootPane()

getContentPane

public Container getContentPane()
Returns the contentPane object for this frame.
Specified by:
getContentPane in interface RootPaneContainer
Returns:
the contentPane property
See Also:
setContentPane(java.awt.Container), RootPaneContainer.getContentPane()

setContentPane

public void setContentPane(Container contentPane)
Sets the contentPane property. This method is called by the constructor.
Specified by:
setContentPane in interface RootPaneContainer
Parameters:
contentPane - the contentPane object for this frame
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
getContentPane(), RootPaneContainer.setContentPane(java.awt.Container)

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane object for this frame.
Specified by:
getLayeredPane in interface RootPaneContainer
Returns:
the layeredPane property
See Also:
setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
Sets the layeredPane property. This method is called by the constructor.
Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layeredPane - the layeredPane object for this frame
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
getLayeredPane(), RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glassPane object for this frame.
Specified by:
getGlassPane in interface RootPaneContainer
Returns:
the glassPane property
See Also:
setGlassPane(java.awt.Component), RootPaneContainer.getGlassPane()

setGlassPane

public void setGlassPane(Component glassPane)
Sets the glassPane property. This method is called by the constructor.
Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - the glassPane object for this frame
See Also:
getGlassPane(), RootPaneContainer.setGlassPane(java.awt.Component)

paramString

protected String paramString()
Returns a string representation of this JFrame. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class Frame
Returns:
a string representation of this JFrame

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JFrame. For JFrames, the AccessibleContext takes the form of an AccessibleJFrame. A new AccessibleJFrame instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Frame
Returns:
an AccessibleJFrame that serves as the AccessibleContext of this JFrame
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JInternalFrame

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JInternalFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JInternalFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
public class JInternalFrame
extends JComponent
implements Accessible, WindowConstants, RootPaneContainer

A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar. For task-oriented documentation and examples of using internal frames, see How to Use Internal Frames, a section in The Java Tutorial.

Generally, you add JInternalFrames to a JDesktopPane. The UI delegates the look-and-feel-specific actions to the DesktopManager object maintained by the JDesktopPane.

The JInternalFrame contentPane is where you add child components. So, to create a JInternalFrame that has a number of buttons arranged with a BorderLayout object, you might do something like this:

    JComponent c = (JComponent) frame.getContentPane();
    c.setLayout(new BorderLayout());
    c.add(new JButton(), BorderLayout.NORTH);
    c.add(new JButton(), BorderLayout.CENTER);
The contentPane is actually managed by an instance of JRootPane, which also manages a layoutPane, glassPane, and optional menuBar for the frame. Please see the JRootPane documentation for a complete description of these components.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JInternalFrame key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JDesktopPane, DesktopManager, JInternalFrame.JDesktopIcon, JRootPane, Serialized Form

Inner Class Summary
protected class | JInternalFrame.AccessibleJInternalFrame This class implements accessibility support for the JInternalFrame class.
static class | JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected boolean | closable The frame can be closed.
static String | CONTENT_PANE_PROPERTY Bound property name.
protected JInternalFrame.JDesktopIcon | desktopIcon The icon that is displayed when the frame is iconized.
static String | FRAME_ICON_PROPERTY Bound property name.
protected Icon | frameIcon The icon shown in the top-left corner of the frame.
static String | GLASS_PANE_PROPERTY Bound property name.
protected boolean | iconable The frame can "iconized" (shrunk down and displayed as an icon-image).
static String | IS_CLOSED_PROPERTY Constrained property name indicating that the frame is closed.
static String | IS_ICON_PROPERTY Constrained property name indicating that the frame is iconified.
static String | IS_MAXIMUM_PROPERTY Constrained property name indicating that the frame is maximized.
static String | IS_SELECTED_PROPERTY Constrained property name indicated that this frame has selected status.
protected boolean | isClosed The frame has been closed.
protected boolean | isIcon The frame has been iconized.
protected boolean | isMaximum The frame has been expanded to its maximum size.
protected boolean | isSelected The frame is currently selected.
static String | LAYERED_PANE_PROPERTY Bound property name.
protected boolean | maximizable The frame can be expanded to the size of the desktop pane.
static String | MENU_BAR_PROPERTY Bound property name.
protected boolean | resizable The frame's size can be changed.
static String | ROOT_PANE_PROPERTY Bound property name.
protected JRootPane | rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected boolean | rootPaneCheckingEnabled If true then calls to add and setLayout cause an exception to be thrown.
protected String | title The title displayed in the frame's title bar.
static String | TITLE_PROPERTY Bound property name.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.
JInternalFrame(String title)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
JInternalFrame(String title, boolean resizable)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.
JInternalFrame(String title, boolean resizable, boolean closable)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified.
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 void addInternalFrameListener(InternalFrameListener l)
Adds the specified internal frame listener to receive internal frame events from this internal frame.
protected  JRootPane createRootPane()
Called by the constructor to set up the JRootPane.
 void dispose()
Disposes of this internal frame.
 void doDefaultCloseAction()
protected  void fireInternalFrameEvent(int id)
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JInternalFrame.
 Container getContentPane()
Returns the contentPane.
 int getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.
 JInternalFrame.JDesktopIcon getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.
 JDesktopPane getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance.
 Component getFocusOwner()
If this JInternalFrame is active, return the child which has focus.
 Icon getFrameIcon()
Returns the image displayed in the title bar of the frame (usually in the top-left corner).
 Component getGlassPane()
Returns the glassPane object for this frame.
 JMenuBar getJMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
 int getLayer()
Convenience method for getting the layer attribute of this component.
 JLayeredPane getLayeredPane()
Returns the layeredPane object for this frame.
 JMenuBar getMenuBar()
Deprecated. As of Swing version 1.0.3, replaced by getJMenuBar().
 Rectangle getNormalBounds()
If the JInternalFrame is not in maximized state, return getBounds(); otherwise, return the bounds that the JInternalFrame would be restored to.
 JRootPane getRootPane()
Returns the rootPane object for this frame.
 String getTitle()
Returns the title of the JInternalFrame.
 InternalFrameUI getUI()
Returns the L&F object that renders this component.
 String getUIClassID()
Returns the name of the L&F class which renders this component.
 String getWarningString()
Gets the warning string that is displayed with this window.
 boolean isClosable()
Returns whether this JInternalFrame be closed by some user action.
 boolean isClosed()
Returns whether this JInternalFrame is currently closed.
 boolean isIcon()
Returns whether the JInternalFrame is currently iconified.
 boolean isIconifiable()
Returns whether the JInternalFrame can be iconified by some user action.
 boolean isMaximizable()
Returns whether the JInternalFrame can be maximized by some user action.
 boolean isMaximum()
Returns whether the JInternalFrame is currently maximized.
 boolean isResizable()
Returns whether the JInternalFrame can be resized by some user action.
protected  boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.
 boolean isSelected()
Returns whether the JInternalFrame is the currently "selected" or active frame.
 void moveToBack()
Convenience method that moves this component to position -1 if its parent is a JLayeredPane.
 void moveToFront()
Convenience method that moves this component to position 0 if its parent is a JLayeredPane.
 void pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
protected  void paintComponent(Graphics g)
If the UI delegate is non-null, calls its paint method.
protected  String paramString()
Returns a string representation of this JInternalFrame.
 void remove(Component comp)
Removes the specified component from this container.
 void removeInternalFrameListener(InternalFrameListener l)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
 void reshape(int x, int y, int width, int height)
Moves and resizes this component.
 void restoreSubcomponentFocus()
This method directs the internal frame to restore focus to the last subcomponent that had focus.
 void setClosable(boolean b)
Sets that this JInternalFrame can be closed by some user action.
 void setClosed(boolean b)
Calling this method with a value of true to close the frame.
 void setContentPane(Container c)
Sets this JInternalFrame's content pane.
 void setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this window.
 void setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.
 void setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner).
 void setGlassPane(Component glass)
Sets this JInternalFrame's glassPane property.
 void setIcon(boolean b)
Iconizes and de-iconizes the frame.
 void setIconifiable(boolean b)
Sets that the JInternalFrame can be made an icon by some user action.
 void setJMenuBar(JMenuBar m)
Sets the JMenuBar for this JInternalFrame.
 void setLayer(int layer)
Convenience method for setting the layer attribute of this component.
 void setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.
 void setLayeredPane(JLayeredPane layered)
Sets this JInternalFrame's layeredPane property.
 void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
 void setMaximizable(boolean b)
Sets that the JInternalFrame can be maximized by some user action.
 void setMaximum(boolean b)
Maximizes and restores the frame.
 void setMenuBar(JMenuBar m)
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar m).
 void setNormalBounds(Rectangle r)
Sets the normal bounds for this frame, the bounds that the frame would be restored to from its maximized state.
 void setResizable(boolean b)
Sets that the JInternalFrame can be resized by some user action.
protected  void setRootPane(JRootPane root)
Sets the rootPane property.
protected  void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown.
 void setSelected(boolean selected)
Selects and deselects the JInternalFrame.
 void setTitle(String title)
Sets the JInternalFrame title.
 void setUI(InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.
 void show()
Shows this internal frame, and brings it to the front.
 void toBack()
Sends this internal frame to the back.
 void toFront()
Brings this internal frame to the front.
 void updateUI()
Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

rootPane

protected JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
JRootPane, RootPaneContainer

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
If true then calls to add and setLayout cause an exception to be thrown.

closable

protected boolean closable
The frame can be closed.

isClosed

protected boolean isClosed
The frame has been closed.

maximizable

protected boolean maximizable
The frame can be expanded to the size of the desktop pane.

isMaximum

protected boolean isMaximum
The frame has been expanded to its maximum size.
See Also:
maximizable

iconable

protected boolean iconable
The frame can "iconized" (shrunk down and displayed as an icon-image).
See Also:
JInternalFrame.JDesktopIcon

isIcon

protected boolean isIcon
The frame has been iconized.
See Also:
iconable

resizable

protected boolean resizable
The frame's size can be changed.

isSelected

protected boolean isSelected
The frame is currently selected.

frameIcon

protected Icon frameIcon
The icon shown in the top-left corner of the frame.

title

protected String title
The title displayed in the frame's title bar.

desktopIcon

protected JInternalFrame.JDesktopIcon desktopIcon
The icon that is displayed when the frame is iconized.
See Also:
iconable

CONTENT_PANE_PROPERTY

public static final String CONTENT_PANE_PROPERTY
Bound property name.

MENU_BAR_PROPERTY

public static final String MENU_BAR_PROPERTY
Bound property name.

TITLE_PROPERTY

public static final String TITLE_PROPERTY
Bound property name.

LAYERED_PANE_PROPERTY

public static final String LAYERED_PANE_PROPERTY
Bound property name.

ROOT_PANE_PROPERTY

public static final String ROOT_PANE_PROPERTY
Bound property name.

GLASS_PANE_PROPERTY

public static final String GLASS_PANE_PROPERTY
Bound property name.

FRAME_ICON_PROPERTY

public static final String FRAME_ICON_PROPERTY
Bound property name.

IS_SELECTED_PROPERTY

public static final String IS_SELECTED_PROPERTY
Constrained property name indicated that this frame has selected status.

IS_CLOSED_PROPERTY

public static final String IS_CLOSED_PROPERTY
Constrained property name indicating that the frame is closed.

IS_MAXIMUM_PROPERTY

public static final String IS_MAXIMUM_PROPERTY
Constrained property name indicating that the frame is maximized.

IS_ICON_PROPERTY

public static final String IS_ICON_PROPERTY
Constrained property name indicating that the frame is iconified.
Constructor Detail

JInternalFrame

public JInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.

JInternalFrame

public JInternalFrame(String title)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
Parameters:
title - the String to display in the title bar

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.
Parameters:
title - the String to display in the title bar
resizable - if true, the frame can be resized

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.
Parameters:
title - the String to display in the title bar
resizable - if true, the frame can be resized
closable - if true, the frame can be closed

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable,
                      boolean maximizable)
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.
Parameters:
title - the String to display in the title bar
resizable - if true, the frame can be resized
closable - if true, the frame can be closed
maximizable - if true, the frame can be maximized

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable,
                      boolean maximizable,
                      boolean iconifiable)
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified. All constructors defer to this one.
Parameters:
title - the String to display in the title bar
resizable - if true, the frame can be resized
closable - if true, the frame can be closed
maximizable - if true, the frame can be maximized
iconifiable - if true, the frame can be iconified
Method Detail

createRootPane

protected JRootPane createRootPane()
Called by the constructor to set up the JRootPane.
Returns:
a new JRootPane
See Also:
JRootPane

getUI

public InternalFrameUI getUI()
Returns the L&F object that renders this component.
Returns:
the InternalFrameUI object that renders this component

setUI

public void setUI(InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class which renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "InternalFrameUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.
Returns:
true if add and setLayout are checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown.
Parameters:
enabled - a boolean value, true if checking is to be enabled, which cause the exceptions to be thrown
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
addImpl in class Container
Throws:
Error - if called with isRootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.
Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thisComponent.getContentPane().setLayout(new BorderLayout())
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
setLayout in class Container
Parameters:
manager - the LayoutManager
Throws:
Error - if called with isRootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getMenuBar

public JMenuBar getMenuBar()
Deprecated. As of Swing version 1.0.3, replaced by getJMenuBar().

Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
Returns:
the current menubar or null if none has been set

getJMenuBar

public JMenuBar getJMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
Returns:
the JMenuBar used by this frame
See Also:
setJMenuBar(javax.swing.JMenuBar)

setMenuBar

public void setMenuBar(JMenuBar m)
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar m).

Sets the JMenuBar for this JInternalFrame.
Parameters:
m - the JMenuBar to use in this frame
See Also:
getJMenuBar()

setJMenuBar

public void setJMenuBar(JMenuBar m)
Sets the JMenuBar for this JInternalFrame.
Parameters:
m - the JMenuBar to use in this frame
See Also:
getJMenuBar()

getContentPane

public Container getContentPane()
Description copied from interface: RootPaneContainer
Returns the contentPane.
Specified by:
getContentPane in interface RootPaneContainer
Following copied from interface: javax.swing.RootPaneContainer
Returns:
the value of the contentPane property.
See Also:
RootPaneContainer.setContentPane(java.awt.Container)

setContentPane

public void setContentPane(Container c)
Sets this JInternalFrame's content pane.
Specified by:
setContentPane in interface RootPaneContainer
Parameters:
c - the contentPane object for this frame
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
RootPaneContainer.getContentPane()

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane object for this frame.
Specified by:
getLayeredPane in interface RootPaneContainer
Returns:
the layeredPane object
See Also:
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layered)
Sets this JInternalFrame's layeredPane property.
Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layered - the layeredPane object for this frame
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glassPane object for this frame.
Specified by:
getGlassPane in interface RootPaneContainer
Returns:
the glassPane object
See Also:
RootPaneContainer.setGlassPane(java.awt.Component)

setGlassPane

public void setGlassPane(Component glass)
Sets this JInternalFrame's glassPane property.
Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - the glassPane object for this frame
See Also:
RootPaneContainer.getGlassPane()

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this frame.
Specified by:
getRootPane in interface RootPaneContainer
Overrides:
getRootPane in class JComponent
Returns:
the rootPane property
See Also:
RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the rootPane property. This method is called by the constructor.
Parameters:
root - the new rootPane object

setClosable

public void setClosable(boolean b)
Sets that this JInternalFrame can be closed by some user action.
Parameters:
b - a boolean value, where true means the frame can be closed

isClosable

public boolean isClosable()
Returns whether this JInternalFrame be closed by some user action.
Returns:
true if the frame can be closed

isClosed

public boolean isClosed()
Returns whether this JInternalFrame is currently closed.
Returns:
true if the frame is closed

setClosed

public void setClosed(boolean b)
               throws PropertyVetoException
Calling this method with a value of true to close the frame.
Parameters:
b - a boolean, where true means "close the frame"
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the JInternalFrame

setResizable

public void setResizable(boolean b)
Sets that the JInternalFrame can be resized by some user action.
Parameters:
b - a boolean, where true means the frame can be resized

isResizable

public boolean isResizable()
Returns whether the JInternalFrame can be resized by some user action.
Returns:
true if the frame can be resized

setIconifiable

public void setIconifiable(boolean b)
Sets that the JInternalFrame can be made an icon by some user action.
Parameters:
b - a boolean, where true means the frame can be iconified

isIconifiable

public boolean isIconifiable()
Returns whether the JInternalFrame can be iconified by some user action.
Returns:
true if the frame can be iconified

isIcon

public boolean isIcon()
Returns whether the JInternalFrame is currently iconified.
Returns:
true if the frame is iconified

setIcon

public void setIcon(boolean b)
             throws PropertyVetoException
Iconizes and de-iconizes the frame.
Parameters:
b - a boolean, where true means to iconify the frame and false means to de-iconify it
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the JInternalFrame

setMaximizable

public void setMaximizable(boolean b)
Sets that the JInternalFrame can be maximized by some user action.
Parameters:
b - a boolean where true means the frame can be maximized

isMaximizable

public boolean isMaximizable()
Returns whether the JInternalFrame can be maximized by some user action.
Returns:
true if the frame can be maximized

isMaximum

public boolean isMaximum()
Returns whether the JInternalFrame is currently maximized.
Returns:
true if the frame is maximized

setMaximum

public void setMaximum(boolean b)
                throws PropertyVetoException
Maximizes and restores the frame. A maximized frame is resized to fully fit the JDesktopPane area associated with the JInternalFrame. A restored frame's size is set to the JInternalFrame's actual size.
Parameters:
b - a boolean, where true maximizes the frame and false restores it
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the JInternalFrame

getTitle

public String getTitle()
Returns the title of the JInternalFrame.
Returns:
a String containing the frame's title
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(String title)
Sets the JInternalFrame title. title may have a null value.
Parameters:
title - the String to display in the title bar
See Also:
getTitle()

setSelected

public void setSelected(boolean selected)
                 throws PropertyVetoException
Selects and deselects the JInternalFrame. A JInternalFrame normally draws its title bar differently if it is the selected frame, which indicates to the user that this internalFrame has the focus.
Parameters:
selected - a boolean, where true means the frame is selected (currently active) and false means it is not
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

isSelected

public boolean isSelected()
Returns whether the JInternalFrame is the currently "selected" or active frame.
Returns:
true if the frame is currently selected (active)
See Also:
setSelected(boolean)

setFrameIcon

public void setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner). This image is not the desktopIcon object, which is the image displayed in the JDesktop when the frame is iconified. Passing null to this function is valid, but the L&F can choose the appropriate behavior for that situation, such as displaying no icon or a default icon for the L&F.
Parameters:
icon - the Icon to display in the title bar
See Also:
getFrameIcon()

getFrameIcon

public Icon getFrameIcon()
Returns the image displayed in the title bar of the frame (usually in the top-left corner).
Returns:
the Icon displayed in the title bar
See Also:
setFrameIcon(javax.swing.Icon)

moveToFront

public void moveToFront()
Convenience method that moves this component to position 0 if its parent is a JLayeredPane.

moveToBack

public void moveToBack()
Convenience method that moves this component to position -1 if its parent is a JLayeredPane.

setLayer

public void setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.
Parameters:
layer - an Integer object specifying this frame's desktop layer
See Also:
JLayeredPane

setLayer

public void setLayer(int layer)
Convenience method for setting the layer attribute of this component. The method setLayer(Integer) should be used for layer values predefined in JLayeredPane. When using setLayer(int), care must be taken not to accidentally clash with those values.
Parameters:
layer - an int specifying this frame's desktop layer
See Also:
setLayer(Integer), JLayeredPane

getLayer

public int getLayer()
Convenience method for getting the layer attribute of this component.
Returns:
an Integer object specifying this frame's desktop layer
See Also:
JLayeredPane

getDesktopPane

public JDesktopPane getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance. If JInternalFrame finds none, the desktopIcon tree is searched.
Returns:
the JDesktopPane this frame belongs to, or null if none is found

setDesktopIcon

public void setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.
Parameters:
d - the JDesktopIcon to display on the desktop
See Also:
getDesktopIcon()

getDesktopIcon

public JInternalFrame.JDesktopIcon getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.
Returns:
the JDesktopIcon displayed on the desktop
See Also:
setDesktopIcon(javax.swing.JInternalFrame.JDesktopIcon)

getNormalBounds

public Rectangle getNormalBounds()
If the JInternalFrame is not in maximized state, return getBounds(); otherwise, return the bounds that the JInternalFrame would be restored to.
Returns:
the bounds of this frame when in the normal state
Since:
1.3

setNormalBounds

public void setNormalBounds(Rectangle r)
Sets the normal bounds for this frame, the bounds that the frame would be restored to from its maximized state. This method is intended for use only by desktop managers.
Parameters:
r - the bounds that the frame should be restored to
Since:
1.3

getFocusOwner

public Component getFocusOwner()
If this JInternalFrame is active, return the child which has focus. Otherwise, return null.

At present, this method works only for JComponent children.

Returns:
the component with focus, or null if no children have focus assigned to them.
Since:
1.3

restoreSubcomponentFocus

public void restoreSubcomponentFocus()
This method directs the internal frame to restore focus to the last subcomponent that had focus. This is used by the UI when the user selected the frame, e.g., by clicking on the title bar.
Since:
1.3

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Moves and resizes this component. Unlike other components, this implementation also forces re-layout, so that frame decorations such as the title bar are always redisplayed.
Overrides:
reshape in class JComponent
Parameters:
x - an int giving the component's new horizontal position measured in pixels from the left of its container
y - an int giving the component's new vertical position, measured in pixels from the bottom of its container
width - an int giving the component's new width in pixels
height - an int giving the component's new height in pixels

addInternalFrameListener

public void addInternalFrameListener(InternalFrameListener l)
Adds the specified internal frame listener to receive internal frame events from this internal frame.
Parameters:
l - the internal frame listener

removeInternalFrameListener

public void removeInternalFrameListener(InternalFrameListener l)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
Parameters:
l - the internal frame listener

fireInternalFrameEvent

protected void fireInternalFrameEvent(int id)

doDefaultCloseAction

public void doDefaultCloseAction()

setDefaultCloseOperation

public void setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this window. The possible choices are:

  • DO_NOTHING_ON_CLOSE - do not do anything - require the program to handle the operation in the windowClosing method of a registered InternalFrameListener object.
  • HIDE_ON_CLOSE - automatically hide the window after invoking any registered InternalFrameListener objects
  • DISPOSE_ON_CLOSE - automatically hide and dispose the window after invoking any registered InternalFrameListener objects

The value is set to DISPOSE_ON_CLOSE by default.

See Also:
addInternalFrameListener(javax.swing.event.InternalFrameListener), getDefaultCloseOperation()

getDefaultCloseOperation

public int getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.
See Also:
setDefaultCloseOperation(int)

pack

public void pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
See Also:
Window.pack()

show

public void show()
Shows this internal frame, and brings it to the front.

If this window is not yet visible, show makes it visible. If this window is already visible, then this method brings it to the front.

Overrides:
show in class Component
See Also:
Window.show(),
Window.toFront(),
Component.setVisible(boolean)

dispose

public void dispose()
Disposes of this internal frame. If the frame is not already closed, a frame-closed event is posted.

toFront

public void toFront()
Brings this internal frame to the front. Places this internal frame at the top of the stacking order and makes the corresponding adjustment to other visible windows.
See Also:
Window.toFront(), moveToFront()

toBack

public void toBack()
Sends this internal frame to the back. Places this internal frame at the bottom of the stacking order and makes the corresponding adjustment to other visible windows.
See Also:
Window.toBack(), moveToBack()

getWarningString

public final String getWarningString()
Gets the warning string that is displayed with this window. Since an internal frame is always secure (since it's fully contained within a window which might need a warning string) this method always returns null.
Returns:
null
See Also:
Window.getWarningString()

paramString

protected String paramString()
Returns a string representation of this JInternalFrame. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JInternalFrame.

paintComponent

protected void paintComponent(Graphics g)
Description copied from class: JComponent
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
Overrides:
paintComponent in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JInternalFrame. For internal frames, the AccessibleContext takes the form of an AccessibleJInternalFrame. A new AccessibleJInternalFrame instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJInternalFrame that serves as the AccessibleContext of this JInternalFrame
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JLabel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JLabel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
BasicComboBoxRenderer, DefaultListCellRenderer, DefaultTableCellRenderer, DefaultTreeCellRenderer
public class JLabel
extends JComponent
implements SwingConstants, Accessible

A display area for a short text string or an image, or both. A label does not react to input events. As a result, it cannot get the keyboard focus. A label can, however, display a keyboard alternative as a convenience for a nearby component that has a keyboard alternative but can't display it.

A JLabel object can display either text, an image, or both. You can specify where in the label's display area the label's contents are aligned by setting the vertical and horizontal alignment. By default, labels are vertically centered in their display area. Text-only labels are leading edge aligned, by default; image-only labels are horizontally centered, by default.

You can also specify the position of the text relative to the image. By default, text is on the trailing edge of the image, with the text and image vertically aligned.

A label's leading and trailing edge are determined from the value of its ComponentOrientation property. At present, the default ComponentOrientation setting maps the leading edge to left and the trailing edge to right.

Finally, you can use the setIconTextGap method to specify how many pixels should appear between the text and the image. The default is 4 pixels.

See How to Use Labels in The Java Tutorial for further documentation.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JLabel.AccessibleJLabel
The class used to obtain the accessible role for this object.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  Component labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JLabel()
Creates a JLabel instance with no image and with an empty string for the title.
JLabel(Icon image)
Creates a JLabel instance with the specified image.
JLabel(Icon image, int horizontalAlignment)
Creates a JLabel instance with the specified image and horizontal alignment.
JLabel(String text)
Creates a JLabel instance with the specified text.
JLabel(String text, Icon icon, int horizontalAlignment)
Creates a JLabel instance with the specified text, image, and horizontal alignment.
JLabel(String text, int horizontalAlignment)
Creates a JLabel instance with the specified text and horizontal alignment.
Method Summary
protected int | checkHorizontalKey(int key, String message) Verify that key is a legal value for the horizontalAlignment properties.
protected int | checkVerticalKey(int key, String message) Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.
AccessibleContext | getAccessibleContext() Get the AccessibleContext of this object
Icon | getDisabledIcon() Returns the value of the disabledIcon property if it's been set, If it hasn't been set and the value of the icon property is an ImageIcon, we compute a "grayed out" version of the icon and update the disabledIcon property with that.
int | getDisplayedMnemonic() Return the keycode that indicates a mnemonic key.
int | getHorizontalAlignment() Returns the alignment of the label's contents along the X axis.
int | getHorizontalTextPosition() Returns the horizontal position of the label's text, relative to its image.
Icon | getIcon() Returns the graphic image (glyph, icon) that the label displays.
int | getIconTextGap() Returns the amount of space between the text and the icon displayed in this label.
Component | getLabelFor() Get the component this is labelling.
String | getText() Returns the text string that the label displays.
LabelUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns a string that specifies the name of the l&f class that renders this component.
int | getVerticalAlignment() Returns the alignment of the label's contents along the Y axis.
int | getVerticalTextPosition() Returns the vertical position of the label's text, relative to its image.
boolean | imageUpdate(Image img, int infoflags, int x, int y, int w, int h) This is overriden to return false if the current Icon's Image is not equal to the passed in Image img.
protected String | paramString() Returns a string representation of this JLabel.
void | setDisabledIcon(Icon disabledIcon) Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).
void | setDisplayedMnemonic(char aChar) Specifies the displayedMnemonic as a char value.
void | setDisplayedMnemonic(int key) Specify a keycode that indicates a mnemonic key.
void | setHorizontalAlignment(int alignment) Sets the alignment of the label's contents along the X axis.
void | setHorizontalTextPosition(int textPosition) Sets the horizontal position of the label's text, relative to its image.
void | setIcon(Icon icon) Defines the icon this component will display.
void | setIconTextGap(int iconTextGap) If both the icon and text properties are set, this property defines the space between them.
void | setLabelFor(Component c) Set the component this is labelling.
void | setText(String text) Defines the single line of text this component will display.
void | setUI(LabelUI ui) Sets the L&F object that renders this component.
void | setVerticalAlignment(int alignment) Sets the alignment of the label's contents along the Y axis.
void | setVerticalTextPosition(int textPosition) Sets the vertical position of the label's text, relative to its image.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

labelFor

protected Component labelFor
Constructor Detail

JLabel

public JLabel(String text,
              Icon icon,
              int horizontalAlignment)
Creates a JLabel instance with the specified text, image, and horizontal alignment. The label is centered vertically in its display area. The text is on the trailing edge of the image.
Parameters:
text - The text to be displayed by the label.
icon - The image to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.

JLabel

public JLabel(String text,
              int horizontalAlignment)
Creates a JLabel instance with the specified text and horizontal alignment. The label is centered vertically in its display area.
Parameters:
text - The text to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.

JLabel

public JLabel(String text)
Creates a JLabel instance with the specified text. The label is aligned against the leading edge of its display area, and centered vertically.
Parameters:
text - The text to be displayed by the label.

JLabel

public JLabel(Icon image,
              int horizontalAlignment)
Creates a JLabel instance with the specified image and horizontal alignment. The label is centered vertically in its display area.
Parameters:
icon - The image to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.

JLabel

public JLabel(Icon image)
Creates a JLabel instance with the specified image. The label is centered vertically and horizontally in its display area.
Parameters:
icon - The image to be displayed by the label.

JLabel

public JLabel()
Creates a JLabel instance with no image and with an empty string for the title. The label is centered vertically in its display area. The label's contents, once set, will be displayed on the leading edge of the label's display area.
Method Detail

getUI

public LabelUI getUI()
Returns the L&F object that renders this component.
Returns:
LabelUI object

setUI

public void setUI(LabelUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the LabelUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
String "LabelUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getText

public String getText()
Returns the text string that the label displays.
Returns:
a String
See Also:
setText(java.lang.String)

setText

public void setText(String text)
Defines the single line of text this component will display. If the value of text is null or empty string, nothing is displayed.

The default value of this property is null.

This is a JavaBeans bound property.

See Also:
setVerticalTextPosition(int), setHorizontalTextPosition(int), setIcon(javax.swing.Icon)

getIcon

public Icon getIcon()
Returns the graphic image (glyph, icon) that the label displays.
Returns:
an Icon
See Also:
setIcon(javax.swing.Icon)

setIcon

public void setIcon(Icon icon)
Defines the icon this component will display. If the value of icon is null, nothing is displayed.

The default value of this property is null.

This is a JavaBeans bound property.

See Also:
setVerticalTextPosition(int), setHorizontalTextPosition(int), getIcon()

getDisabledIcon

public Icon getDisabledIcon()
Returns the value of the disabledIcon property if it's been set, If it hasn't been set and the value of the icon property is an ImageIcon, we compute a "grayed out" version of the icon and update the disabledIcon property with that.
Returns:
The value of the disabledIcon property.
See Also:
setDisabledIcon(javax.swing.Icon), ImageIcon

setDisabledIcon

public void setDisabledIcon(Icon disabledIcon)
Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).

The default value of this property is null.

Parameters:
disabledIcon - the Icon to display when the component is disabled
See Also:
getDisabledIcon(), JComponent.setEnabled(boolean)

setDisplayedMnemonic

public void setDisplayedMnemonic(int key)
Specify a keycode that indicates a mnemonic key. This property is used when the label is part of a larger component. If the labelFor property of the label is not null, the label will call the requestFocus method of the component specified by the labelFor property when the mnemonic is activated.
See Also:
getLabelFor(), setLabelFor(java.awt.Component)

setDisplayedMnemonic

public void setDisplayedMnemonic(char aChar)
Specifies the displayedMnemonic as a char value.
Parameters:
aChar - a char specifying the mnemonic to display
See Also:
setDisplayedMnemonic(int)

getDisplayedMnemonic

public int getDisplayedMnemonic()
Return the keycode that indicates a mnemonic key. This property is used when the label is part of a larger component. If the labelFor property of the label is not null, the label will call the requestFocus method of the component specified by the labelFor property when the mnemonic is activated.
Returns:
int value for the mnemonic key
See Also:
getLabelFor(), setLabelFor(java.awt.Component)

checkHorizontalKey

protected int checkHorizontalKey(int key,
                                 String message)
Verify that key is a legal value for the horizontalAlignment properties.
Parameters:
key - the property value to check
message - the IllegalArgumentException detail message
Throws:
IllegalArgumentException - if key isn't LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalTextPosition(int), setHorizontalAlignment(int)

checkVerticalKey

protected int checkVerticalKey(int key,
                               String message)
Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.
Parameters:
key - the property value to check
message - the IllegalArgumentException detail message
Throws:
IllegalArgumentException - if key isn't TOP, CENTER, or BOTTOM.
See Also:
setVerticalAlignment(int), setVerticalTextPosition(int)

getIconTextGap

public int getIconTextGap()
Returns the amount of space between the text and the icon displayed in this label.
Returns:
an int equal to the number of pixels between the text and the icon.
See Also:
setIconTextGap(int)

setIconTextGap

public void setIconTextGap(int iconTextGap)
If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

This is a JavaBeans bound property.

See Also:
getIconTextGap()

getVerticalAlignment

public int getVerticalAlignment()
Returns the alignment of the label's contents along the Y axis.
Returns:
The value of the verticalAlignment property, one of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM.
See Also:
SwingConstants, setVerticalAlignment(int)

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the alignment of the label's contents along the Y axis.

The default value of this property is CENTER.

Parameters:
alignment - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM.
See Also:
SwingConstants, getVerticalAlignment()

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the alignment of the label's contents along the X axis.
Returns:
The value of the horizontalAlignment property, one of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalAlignment(int), SwingConstants

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the alignment of the label's contents along the X axis.

This is a JavaBeans bound property.

Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default for image-only labels), RIGHT, LEADING (the default for text-only labels) or TRAILING.
See Also:
SwingConstants, getHorizontalAlignment()

getVerticalTextPosition

public int getVerticalTextPosition()
Returns the vertical position of the label's text, relative to its image.
Returns:
One of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM.
See Also:
setVerticalTextPosition(int), SwingConstants

setVerticalTextPosition

public void setVerticalTextPosition(int textPosition)
Sets the vertical position of the label's text, relative to its image.

The default value of this property is CENTER.

This is a JavaBeans bound property.

Parameters:
textPosition - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM.
See Also:
SwingConstants, getVerticalTextPosition()

getHorizontalTextPosition

public int getHorizontalTextPosition()
Returns the horizontal position of the label's text, relative to its image.
Returns:
One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
SwingConstants

setHorizontalTextPosition

public void setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the label's text, relative to its image.
Parameters:
x - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING, or TRAILING (the default).
Throws:
IllegalArgumentException -
See Also:
SwingConstants

imageUpdate

public boolean imageUpdate(Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
This is overriden to return false if the current Icon's Image is not equal to the passed in Image img.
Overrides:
imageUpdate in class Component
See Also:
ImageObserver, Component.imageUpdate(java.awt.Image, int, int, int, int, int)

paramString

protected String paramString()
Returns a string representation of this JLabel. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JLabel.

getLabelFor

public Component getLabelFor()
Get the component this is labelling.
Returns:
the Component this is labelling. Can be null if this does not label a Component. If the displayedMnemonic property is set and the labelFor property is also set, the label will call the requestFocus method of the component specified by the labelFor property when the mnemonic is activated.
See Also:
getDisplayedMnemonic(), setDisplayedMnemonic(int)

setLabelFor

public void setLabelFor(Component c)
Set the component this is labelling. Can be null if this does not label a Component. If the displayedMnemonic property is set and the labelFor property is also set, the label will call the requestFocus method of the component specified by the labelFor property when the mnemonic is activated.
Parameters:
c - the Component this label is for, or null if the label is not the label for a component
See Also:
getDisplayedMnemonic(), setDisplayedMnemonic(int)

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext of this object
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
the AccessibleContext of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JLayeredPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JLayeredPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLayeredPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JDesktopPane
public class JLayeredPane
extends JComponent
implements Accessible

JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed. An Integer object specifies each component's depth in the container, where higher-numbered components sit "on top" of other components. For task-oriented documentation and examples of using layered panes see How to Use a Layered Pane, a section in The Java Tutorial.

For convenience, JLayeredPane divides the depth-range into several different layers. Putting a component into one of those layers makes it easy to ensure that components overlap properly, without having to worry about specifying numbers for specific depths:

DEFAULT_LAYER
The standard layer, where most components go. This the bottommost layer.
PALETTE_LAYER
The palette layer sits over the default layer. Useful for floating toolbars and palettes, so they can be positioned above other components.
MODAL_LAYER
The layer used for modal dialogs. They will appear on top of any toolbars, palettes, or standard components in the container.
POPUP_LAYER
The popup layer displays above dialogs. That way, the popup windows associated with combo boxes, tooltips, and other help text will appear above the component, palette, or dialog that generated them.
DRAG_LAYER
When dragging a component, reassigning it to the drag layer ensures that it is positioned over every other component in the container. When finished dragging, it can be reassigned to its normal layer.
The JLayeredPane methods moveToFront(Component), moveToBack(Component) and setPosition can be used to reposition a component within its layer. The setLayer method can also be used to change the component's current layer.

Details

JLayeredPane manages it's list of children like Container, but allows for the definition of a several layers within itself. Children in the same layer are managed exactly like the normal Container object, with the added feature that when children components overlap, children in higher layers display above the children in lower layers.

Each layer is a distinct integer number. The layer attribute can be set on a Component by passing an Integer object during the add call.
For example:

     layeredPane.add(child, JLayeredPane.DEFAULT_LAYER);
 or
     layeredPane.add(child, new Integer(10));
The layer attribute can also be set on a Component by calling
     layeredPaneParent.setLayer(child, 10)
on the JLayeredPane that is the parent of component. The layer should be set before adding the child to the parent.

Higher number layers display above lower number layers. So, using numbers for the layers and letters for individual components, a representative list order would look like this:

       5a, 5b, 5c, 2a, 2b, 2c, 1a
where the leftmost components are closest to the top of the display.

A component can be moved to the top or bottom position within its layer by calling moveToFront or moveToBack.

The position of a component within a layer can also be specified directly. Valid positions range from 0 up to one less than the number of components in that layer. A value of -1 indicates the bottommost position. A value of 0 indicates the topmost position. Unlike layer numbers, higher position values are lower in the display.

Note: This sequence (defined by java.awt.Container) is the reverse of the layer numbering sequence. Usually though, you will use moveToFront, moveToBack, and setLayer.
Here are some examples using the method add(Component, layer, position): Calling add(5x, 5, -1) results in:
       5a, 5b, 5c, 5x, 2a, 2b, 2c, 1a
Calling add(5z, 5, 2) results in:
       5a, 5b, 5z, 5c, 5x, 2a, 2b, 2c, 1a
Calling add(3a, 3, 7) results in:
       5a, 5b, 5z, 5c, 5x, 3a, 2a, 2b, 2c, 1a
Using normal paint/event mechanics results in 1a appearing at the bottom and 5a being above all other components.

Note: that these layers are simply a logical construct and LayoutManagers will affect all child components of this container without regard for layer settings.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JLayeredPane.AccessibleJLayeredPane
This class implements accessibility support for the JLayeredPane class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static Integer | DEFAULT_LAYER Convenience object defining the Default layer.
static Integer | DRAG_LAYER Convenience object defining the Drag layer.
static Integer | FRAME_CONTENT_LAYER Convenience object defining the Frame Content layer.
static String | LAYER_PROPERTY Bound property
static Integer | MODAL_LAYER Convenience object defining the Modal layer.
static Integer | PALETTE_LAYER Convenience object defining the Palette layer.
static Integer | POPUP_LAYER Convenience object defining the Popup layer.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JLayeredPane()
Create a new JLayeredPane
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) Adds the specified component to this container at the specified index.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JLayeredPane.
int | getComponentCountInLayer(int layer) Returns the number of children currently in the specified layer.
Component[] | getComponentsInLayer(int layer) Returns an array of the components in the specified layer.
protected Hashtable | getComponentToLayer() Returns the hashtable that maps components to layers.
int | getIndexOf(Component c) Returns the index of the specified Component.
int | getLayer(Component c) Returns the layer attribute for the specified Component.
static int | getLayer(JComponent c) Gets the layer property for a JComponent, it does not cause any side effects like setLayer().
static JLayeredPane | getLayeredPaneAbove(Component c) Convenience method that returns the first JLayeredPane which contains the specified component.
protected Integer | getObjectForLayer(int layer) Returns the Integer object associated with a specified layer.
int | getPosition(Component c) Get the relative position of the component within its layer.
int | highestLayer() Returns the highest layer value from all current children.
protected int | insertIndexForLayer(int layer, int position) Primative method that determines the proper location to insert a new child based on layer and position requests.
boolean | isOptimizedDrawingEnabled() Returns false if components in the pane can overlap, which makes optimized drawing impossible.
int | lowestLayer() Returns the lowest layer value from all current children.
void | moveToBack(Component c) Moves the component to the bottom of the components in it's current layer (position -1).
void | moveToFront(Component c) Moves the component to the top of the components in it's current layer (position 0).
void | paint(Graphics g) Paints this JLayeredPane within the specified graphics context.
protected String | paramString() Returns a string representation of this JLayeredPane.
static void | putLayer(JComponent c, int layer) Sets the layer property on a JComponent.
void | remove(int index) Remove the indexed component from this pane.
void | setLayer(Component c, int layer) Sets the layer attribute on the specified component, making it the bottommost component in that layer.
void | setLayer(Component c, int layer, int position) Sets the layer attribute for the specified component and also sets its position within that layer.
void | setPosition(Component c, int position) Moves the component to position within it's current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_LAYER

public static final Integer DEFAULT_LAYER
Convenience object defining the Default layer. Equivalent to new Integer(0).

PALETTE_LAYER

public static final Integer PALETTE_LAYER
Convenience object defining the Palette layer. Equivalent to new Integer(100).

MODAL_LAYER

public static final Integer MODAL_LAYER
Convenience object defining the Modal layer. Equivalent to new Integer(200).

POPUP_LAYER

public static final Integer POPUP_LAYER
Convenience object defining the Popup layer. Equivalent to new Integer(300).

DRAG_LAYER

public static final Integer DRAG_LAYER
Convenience object defining the Drag layer. Equivalent to new Integer(400).

FRAME_CONTENT_LAYER

public static final Integer FRAME_CONTENT_LAYER
Convenience object defining the Frame Content layer. This layer is normally only use to positon the contentPane and menuBar components of JFrame. Equivalent to new Integer(-30000).
See Also:
JFrame

LAYER_PROPERTY

public static final String LAYER_PROPERTY
Bound property
Constructor Detail

JLayeredPane

public JLayeredPane()
Create a new JLayeredPane
Method Detail

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Description copied from class: Container
Adds the specified component to this container at the specified index. This method also notifies the layout manager to add the component to this container's layout using the specified constraints object.

This is the method to override if a program needs to track every add request to a container. An overriding method should usually include a call to the superclass's version of the method:

super.addImpl(comp, constraints, index)

Overrides:
addImpl in class Container
Following copied from class: java.awt.Container
Parameters:
comp - the component to be added.
constraints - an object expressing layout contraints for this component.
index - the position in the container's list at which to insert the component, where -1 means insert at the end.
See Also:
Container.add(java.awt.Component),
Container.add(java.awt.Component, int),
Container.add(java.awt.Component, java.lang.Object),
LayoutManager

remove

public void remove(int index)
Remove the indexed component from this pane. This is the absolute index, ignoring layers.
Overrides:
remove in class Container
Parameters:
index - an int specifying the component to remove
See Also:
getIndexOf(java.awt.Component)

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
Returns false if components in the pane can overlap, which makes optimized drawing impossible. Otherwise, returns true.
Overrides:
isOptimizedDrawingEnabled in class JComponent
Returns:
false if components can overlap, else true
See Also:
JComponent.isOptimizedDrawingEnabled()

putLayer

public static void putLayer(JComponent c,
                            int layer)
Sets the layer property on a JComponent. This method does not cause any side effects like setLayer() (painting, add/remove, etc). Normally you should use the instance method setLayer(), in order to get the desired side-effects (like repainting).
Parameters:
c - the JComponent to move
layer - an int specifying the layer to move it to
See Also:
setLayer(java.awt.Component, int)

getLayer

public static int getLayer(JComponent c)
Gets the layer property for a JComponent, it does not cause any side effects like setLayer(). (painting, add/remove, etc) Normally you should use the instance method getLayer().
Parameters:
c - the JComponent to check
Returns:
an int specifying the component's layer

getLayeredPaneAbove

public static JLayeredPane getLayeredPaneAbove(Component c)
Convenience method that returns the first JLayeredPane which contains the specified component. Note that all JFrames have a JLayeredPane at their root, so any component in a JFrame will have a JLayeredPane parent.
Parameters:
c - the Component to check
Returns:
the JLayeredPane that contains the component, or null if no JLayeredPane is found in the component hierarchy
See Also:
JFrame, JRootPane

setLayer

public void setLayer(Component c,
                     int layer)
Sets the layer attribute on the specified component, making it the bottommost component in that layer. Should be called before adding to parent.
Parameters:
c - the Component to set the layer for
layer - an int specifying the layer to set, where lower numbers are closer to the bottom

setLayer

public void setLayer(Component c,
                     int layer,
                     int position)
Sets the layer attribute for the specified component and also sets its position within that layer.
Parameters:
c - the Component to set the layer for
layer - an int specifying the layer to set, where lower numbers are closer to the bottom
position - an int specifying the position within the layer, where 0 is the topmost position and -1 is the bottommost position

getLayer

public int getLayer(Component c)
Returns the layer attribute for the specified Component.
Parameters:
c - the Component to check
Returns:
an int specifying the component's current layer

getIndexOf

public int getIndexOf(Component c)
Returns the index of the specified Component. This is the absolute index, ignoring layers. Index numbers, like position numbers, have the topmost component at index zero. Larger numbers are closer to the bottom.
Parameters:
c - the Component to check
Returns:
an int specifying the component's index

moveToFront

public void moveToFront(Component c)
Moves the component to the top of the components in it's current layer (position 0).
Parameters:
c - the Component to move
See Also:
setPosition(Component, int)

moveToBack

public void moveToBack(Component c)
Moves the component to the bottom of the components in it's current layer (position -1).
Parameters:
c - the Component to move
See Also:
setPosition(Component, int)

setPosition

public void setPosition(Component c,
                        int position)
Moves the component to position within it's current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.

Note: Position numbering is defined by java.awt.Container, and is the opposite of layer numbering. Lower position numbers are closer to the top (0 is topmost), and higher position numbers are closer to the bottom.

Parameters:
c - the Component to move
position - an int in the range -1..N-1, where N is the number of components in the component's current layer

getPosition

public int getPosition(Component c)
Get the relative position of the component within its layer.
Parameters:
c - the Component to check
Returns:
an int giving the component's position, where 0 is the topmost position and the highest index value = the count count of components at that layer, minus 1
See Also:
getComponentCountInLayer(int)

highestLayer

public int highestLayer()
Returns the highest layer value from all current children. Returns 0 if there are no children.
Returns:
an int indicating the layer of the topmost component in the pane, or zero if there are no children

lowestLayer

public int lowestLayer()
Returns the lowest layer value from all current children. Returns 0 if there are no children.
Returns:
an int indicating the layer of the bottommost component in the pane, or zero if there are no children

getComponentCountInLayer

public int getComponentCountInLayer(int layer)
Returns the number of children currently in the specified layer.
Parameters:
layer - an int specifying the layer to check
Returns:
an int specifying the number of components in that layer

getComponentsInLayer

public Component[] getComponentsInLayer(int layer)
Returns an array of the components in the specified layer.
Parameters:
layer - an int specifying the layer to check
Returns:
an array of Components contained in that layer

paint

public void paint(Graphics g)
Paints this JLayeredPane within the specified graphics context.
Overrides:
paint in class JComponent
Parameters:
g - the Graphics context within which to paint

getComponentToLayer

protected Hashtable getComponentToLayer()
Returns the hashtable that maps components to layers.
Returns:
the Hashtable used to map components to their layers

getObjectForLayer

protected Integer getObjectForLayer(int layer)
Returns the Integer object associated with a specified layer.
Parameters:
layer - an int specifying the layer
Returns:
an Integer object for that layer

insertIndexForLayer

protected int insertIndexForLayer(int layer,
                                  int position)
Primative method that determines the proper location to insert a new child based on layer and position requests.
Parameters:
layer - an int specifying the layer
position - an int specifying the position within the layer
Returns:
an int giving the (absolute) insertion-index
See Also:
getIndexOf(java.awt.Component)

paramString

protected String paramString()
Returns a string representation of this JLayeredPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JLayeredPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JLayeredPane. For layered panes, the AccessibleContext takes the form of an AccessibleJLayeredPane. A new AccessibleJLayeredPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJLayeredPane that serves as the AccessibleContext of this JLayeredPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JList

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JList
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
public class JList
extends JComponent
implements Scrollable, Accessible

A component that allows the user to select one or more objects from a list. A separate model, ListModel, represents the contents of the list. It's easy to display an array or vector of objects, using a JList constructor that builds a ListModel instance for you:

 // Create a JList that displays the strings in data[]

 String[] data = {"one", "two", "three", "four"};
 JList dataList = new JList(data);

 // The value of the JList model property is an object that provides
 // a read-only view of the data.  It was constructed automatically.

 for(int i = 0; i

 JList doesn't support scrolling directly.
 To create a scrolling
 list you make the JList the viewport view of a
 JScrollPane.  For example:

 JScrollPane scrollPane = new JScrollPane(dataList);
 // Or in two steps:
 JScrollPane scrollPane = new JScrollPane();
 scrollPane.getViewport().setView(dataList);

 By default the JList selection model allows any
 combination of items to be selected at a time, using the constant
 MULTIPLE_INTERVAL_SELECTION.
 The selection state is actually managed
 by a separate delegate object, an instance of
 ListSelectionModel.
 However JList provides convenient properties for
 managing the selection.

 String[] data = {"one", "two", "three", "four"};
 JList dataList = new JList(data);

 dataList.setSelectedIndex(1);  // select "two"
 dataList.getSelectedValue();   // returns "two"

 The contents of a JList can be dynamic,
 in other words, the list elements can
 change value and the size of the list can change after the
 JList has
 been created.  The JList observes changes in its model with a
 swing.event.ListDataListener implementation.  A correct
 implementation of ListModel notifies
 it's listeners each time a change occurs.  The changes are
 characterized by a swing.event.ListDataEvent, which identifies
 the range of list indices that have been modified, added, or removed.
 Simple dynamic-content JList applications can use the
 DefaultListModel class to store list elements.  This class
 implements the ListModel interface and provides the
 java.util.Vector API as well.  Applications that need to
 provide custom ListModel implementations can subclass
 AbstractListModel, which provides basic
 ListDataListener support.  For example:

 // This list model has about 2^16 elements.  Enjoy scrolling.

 ListModel bigData = new AbstractListModel() {
     public int getSize() { return Short.MAX_VALUE; }
     public Object getElementAt(int index) { return "Index " + index; }
 };

 JList bigDataList = new JList(bigData);

 // We don't want the JList implementation to compute the width
 // or height of all of the list cells, so we give it a string
 // that's as big as we'll need for any cell.  It uses this to
 // compute values for the fixedCellWidth and fixedCellHeight
 // properties.

 bigDataList.setPrototypeCellValue("Index 1234567890");

 JList uses a java.awt.Component, provided by
 a delegate called the
 cellRendererer, to paint the visible cells in the list.
 The cell renderer component is used like a "rubber stamp" to paint
 each visible row.  Each time the JList needs to paint a cell
 it asks the cell renderer for the component, moves it into place
 using setBounds() and then draws it by calling its paint method.
 The default cell renderer uses a JLabel component to render
 the string value of each component.   You can substitute your
 own cell renderer, using code like this:

  // Display an icon and a string for each object in the list.

 class MyCellRenderer extends JLabel implements ListCellRenderer {
     final static ImageIcon longIcon = new ImageIcon("long.gif");
     final static ImageIcon shortIcon = new ImageIcon("short.gif");

     // This is the only method defined by ListCellRenderer.
     // We just reconfigure the JLabel each time we're called.

     public Component getListCellRendererComponent(
       JList list,
       Object value,            // value to display
       int index,               // cell index
       boolean isSelected,      // is the cell selected
       boolean cellHasFocus)    // the list and the cell have the focus
     {
         String s = value.toString();
         setText(s);
         setIcon((s.length() > 10) ? longIcon : shortIcon);
          if (isSelected) {
             setBackground(list.getSelectionBackground());
           setForeground(list.getSelectionForeground());
       }
         else {
           setBackground(list.getBackground());
           setForeground(list.getForeground());
       }
       setEnabled(list.isEnabled());
       setFont(list.getFont());
         return this;
     }
 }

 String[] data = {"one", "two", "three", "four"};
 JList dataList = new JList(data);
 dataList.setCellRenderer(new MyCellRenderer());

 JList doesn't provide any special support for handling double or
 triple (or N) mouse clicks however it's easy to handle them using
 a MouseListener.  Use the JList method
 locationToIndex() to
 determine what cell was clicked.  For example:

 final JList list = new JList(dataModel);
 MouseListener mouseListener = new MouseAdapter() {
     public void mouseClicked(MouseEvent e) {
         if (e.getClickCount() == 2) {
             int index = list.locationToIndex(e.getPoint());
             System.out.println("Double clicked on Item " + index);
          }
     }
 };
 list.addMouseListener(mouseListener);

 Note that in this example the dataList is final
 because it's referred to by the anonymous MouseListener class.

 For the keyboard keys used by this component in the standard look and
 feel (L&F) renditions, see the
 JList key assignments.

 Warning:
 Serialized objects of this class will not be compatible with
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.

 See How to Use Lists
 in The Java Tutorial
 for further documentation.
 Also see the article Advanced JList Programming
 in The Swing Connection.

See Also:
ListModel,
AbstractListModel,
DefaultListModel,
ListSelectionModel,
DefaultListSelectionModel,
ListCellRenderer, Serialized Form

Inner Class Summary

protected  class
JList.AccessibleJList

          This class implements accessibility support for the
 JList class.

Inner classes inherited from class javax.swing.JComponent

JComponent.AccessibleJComponent

Inner classes inherited from class java.awt.Container

Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component

Component.AccessibleAWTComponent

Fields inherited from class javax.swing.JComponent

accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

Fields inherited from class java.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

JList()

          Constructs a JList with an empty model.

JList(ListModel dataModel)

          Constructs a JList that displays the elements in the
 specified, non-null model.

JList(Object[] listData)

          Constructs a JList that displays the elements in the specified
 array.

JList(Vector listData)

          Constructs a JList that displays the elements in the specified
 Vector.

Method Summary
void | addListSelectionListener(ListSelectionListener listener) Adds a listener to the list that's notified each time a change to the selection occurs.
void | addSelectionInterval(int anchor, int lead) Sets the selection to be the union of the specified interval with current selection.
void | clearSelection() Clears the selection - after calling this method isSelectionEmpty will return true.
protected ListSelectionModel | createSelectionModel() Returns an instance of DefaultListSelectionModel.
void | ensureIndexIsVisible(int index) Scrolls the viewport to make the specified cell completely visible.
protected void | fireSelectionValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) Notifies JList ListSelectionListeners that the selection model has changed.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JList.
int | getAnchorSelectionIndex() Returns the first index argument from the most recent addSelectionModel or setSelectionInterval call.
Rectangle | getCellBounds(int index0, int index1) Returns the bounds of the specified range of items in JList coordinates.
ListCellRenderer | getCellRenderer() Returns the object that renders the list items.
int | getFirstVisibleIndex() Returns the index of the cell in the upper left corner of the JList or -1 if nothing is visible or the list is empty.
int | getFixedCellHeight() Returns the fixed cell height value -- the value specified by setting the fixedCellHeight property, rather than that calculated from the list elements.
int | getFixedCellWidth() Returns the fixed cell width value -- the value specified by setting the fixedCellWidth property, rather than that calculated from the list elements.
int | getLastVisibleIndex() Returns the index of the cell in the lower right corner of the JList or -1 if nothing is visible or the list is empty.
int | getLeadSelectionIndex() Returns the second index argument from the most recent addSelectionInterval or setSelectionInterval call.
int | getMaxSelectionIndex() Returns the largest selected cell index.
int | getMinSelectionIndex() Returns the smallest selected cell index.
ListModel | getModel() Returns the data model that holds the list of items displayed by the JList component.
Dimension | getPreferredScrollableViewportSize() Computes the size of the viewport needed to display visibleRowCount rows.
Object | getPrototypeCellValue() Returns the cell width of the "prototypical cell" -- a cell used for the calculation of cell widths, because it has the same value as all other list items.
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Returns the block increment amount.
boolean | getScrollableTracksViewportHeight() Returns true if this JList is displayed in a JViewport and the viewport is taller than JList's preferred height; otherwise returns false.
boolean | getScrollableTracksViewportWidth() Returns true if this JList is displayed in a JViewport and the viewport is wider than JList's preferred width; otherwise returns false.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Returns the distance to scroll to expose the next or previous row (for vertical scrolling) or character (for horizontal scrolling).
int | getSelectedIndex() Returns the first selected index; returns -1 if there is no selected item.
int[] | getSelectedIndices() Returns an array of all of the selected indices in increasing order.
Object | getSelectedValue() Returns the first selected value, or null if the selection is empty.
Object[] | getSelectedValues() Returns an array of the values for the selected cells.
Color | getSelectionBackground() Returns the background color for selected cells.
Color | getSelectionForeground() Returns the selection foreground color.
int | getSelectionMode() Returns whether single-item or multiple-item selections are allowed.
ListSelectionModel | getSelectionModel() Returns the value of the current selection model.
ListUI | getUI() Returns the look and feel (L&F) object that renders this component.
String | getUIClassID() Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
boolean | getValueIsAdjusting() Returns the value of the data model's isAdjusting property.
int | getVisibleRowCount() Returns the preferred number of visible rows.
Point | indexToLocation(int index) Returns the origin of the specified item in JList coordinates.
boolean | isSelectedIndex(int index) Returns true if the specified index is selected.
boolean | isSelectionEmpty() Returns true if nothing is selected.
int | locationToIndex(Point location) Converts a point in JList coordinates to the index of the cell at that location.
protected String | paramString() Returns a string representation of this JList.
void | removeListSelectionListener(ListSelectionListener listener) Removes a listener from the list that's notified each time a change to the selection occurs.
void | removeSelectionInterval(int index0, int index1) Sets the selection to be the set difference of the specified interval and the current selection.
void | setCellRenderer(ListCellRenderer cellRenderer) Sets the delegate that's used to paint each cell in the list.
void | setFixedCellHeight(int height) Sets the height of every cell in the list.
void | setFixedCellWidth(int width) Sets the width of every cell in the list.
void | setListData(Object[] listData) Constructs a ListModel from an array of objects and then applies setModel to it.
void | setListData(Vector listData) Constructs a ListModel from a Vector and then applies setModel to it.
void | setModel(ListModel model) Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners.
void | setPrototypeCellValue(Object prototypeCellValue) Computes the fixedCellWidth and fixedCellHeight properties by configuring the cellRenderer to index equals zero for the specified value and then computing the renderer component's preferred size.
void | setSelectedIndex(int index) Selects a single cell.
void | setSelectedIndices(int[] indices) Selects a set of cells.
void | setSelectedValue(Object anObject, boolean shouldScroll) Selects the specified object from the list.
void | setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.
void | setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.
void | setSelectionInterval(int anchor, int lead) Selects the specified interval.
void | setSelectionMode(int selectionMode) Determines whether single-item or multiple-item selections are allowed.
void | setSelectionModel(ListSelectionModel selectionModel) Sets the selectionModel for the list to a non-null ListSelectionModel implementation.
void | setUI(ListUI ui) Sets the look and feel (L&F) object that renders this component.
void | setValueIsAdjusting(boolean b) Sets the data model's isAdjusting property to true, so that a single event will be generated when all of the selection events have finished (for example, when the mouse is being dragged over the list in selection mode).
void | setVisibleRowCount(int visibleRowCount) Sets the preferred number of rows in the list that can be displayed without a scollbar, as determined by the nearest JViewport ancestor, if any.
void | updateUI() Sets the UI property with the "ListUI" from the current default UIFactory.

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree

Methods inherited from class java.awt.Component

action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JList

public JList(ListModel dataModel)

Constructs a JList that displays the elements in the
 specified, non-null model.  All JList constructors
 delegate to this one.

Parameters:
dataModel - the data model for this list
Throws:
IllegalArgumentException - if dataModel
                        is null

JList

public JList(Object[] listData)

Constructs a JList that displays the elements in the specified
 array.  This constructor just delegates to the ListModel
 constructor.

Parameters:
listData - the array of Objects to be loaded into the data model

JList

public JList(Vector listData)

Constructs a JList that displays the elements in the specified
 Vector.  This constructor just delegates to the
 ListModel constructor.

Parameters:
listData - the Vector to be loaded into the data model

JList

public JList()

Constructs a JList with an empty model.

Method Detail

getUI

public ListUI getUI()

Returns the look and feel (L&F) object that renders this component.

Returns:
the ListUI object that renders this component

setUI

public void setUI(ListUI ui)

Sets the look and feel (L&F) object that renders this component.

Parameters:
ui - the ListUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()

Sets the UI property with the "ListUI" from the current default
 UIFactory.  This method is called by the JList constructor
 and to update the list's look and feel at runtime.

Overrides:
updateUI in class JComponent

See Also:
UIManager.getUI(javax.swing.JComponent)

getUIClassID

public String getUIClassID()

Returns the suffix used to construct the name of the look and feel
 (L&F) class used to render this component.

Overrides:
getUIClassID in class JComponent

Returns:
the string "ListUI"
See Also:
JComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)

getPrototypeCellValue

public Object getPrototypeCellValue()

Returns the cell width of the "prototypical cell" -- a cell used
 for the calculation of cell widths, because it has the same value
 as all other list items.

Returns:
the value of the prototypeCellValue property
See Also:
setPrototypeCellValue(java.lang.Object)

setPrototypeCellValue

public void setPrototypeCellValue(Object prototypeCellValue)

Computes the fixedCellWidth and
 fixedCellHeight properties
 by configuring the cellRenderer to index equals
 zero for the specified value and then computing the renderer
 component's preferred size.  These properties are useful when the
 list is too long to allow JList to compute the
 width/height of each cell and there is a single cell value that is
 known to occupy as much space as any of the others.

 Note that we do set the fixedCellWidth and
 fixedCellHeight properties here but only a
 prototypeCellValue PropertyChangeEvent is fired.

 To see an example which sets this property,
 see the class description above.

 The default value of this property is null.

 This is a JavaBeans bound property.

Parameters:
prototypeCellValue - the value on which to base
                fixedCellWidth and
                 fixedCellHeight
See Also:
getPrototypeCellValue(),
setFixedCellWidth(int),
setFixedCellHeight(int),
JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

getFixedCellWidth

public int getFixedCellWidth()

Returns the fixed cell width value -- the value specified by setting
 the fixedCellWidth property, rather than that calculated
 from the list elements.

Returns:
the fixed cell width
See Also:
setFixedCellWidth(int)

setFixedCellWidth

public void setFixedCellWidth(int width)

Sets the width of every cell in the list.  If width is -1,
 cell widths are computed by applying getPreferredSize
 to the cellRenderer component for each list element.

 The default value of this property is -1.

 This is a JavaBeans bound property.

Parameters:
width - the width, in pixels, for all cells in this list
See Also:
getPrototypeCellValue(),
setFixedCellWidth(int),
JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

getFixedCellHeight

public int getFixedCellHeight()

Returns the fixed cell height value -- the value specified by setting
 the fixedCellHeight property,
 rather than that calculated from the list elements.

Returns:
the fixed cell height, in pixels
See Also:
setFixedCellHeight(int)

setFixedCellHeight

public void setFixedCellHeight(int height)

Sets the height of every cell in the list.  If height
 is -1, cell
 heights are computed by applying getPreferredSize
 to the cellRenderer component for each list element.

 The default value of this property is -1.

 This is a JavaBeans bound property.

Parameters:
height - an integer giving the height, in pixels, for all cells
        in this list
See Also:
getPrototypeCellValue(),
setFixedCellWidth(int),
JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

getCellRenderer

public ListCellRenderer getCellRenderer()

Returns the object that renders the list items.

Returns:
the ListCellRenderer
See Also:
setCellRenderer(javax.swing.ListCellRenderer)

setCellRenderer

public void setCellRenderer(ListCellRenderer cellRenderer)

Sets the delegate that's used to paint each cell in the list.  If
 prototypeCellValue was set then the
 fixedCellWidth and fixedCellHeight
 properties are set as well.  Only one PropertyChangeEvent
 is generated however - for the cellRenderer property.

 The default value of this property is provided by the ListUI
 delegate, i.e. by the look and feel implementation.

 To see an example which sets the cell renderer,
 see the class description above.

 This is a JavaBeans bound property.

Parameters:
cellRenderer - the ListCellRenderer
                 that paints list cells
See Also:
getCellRenderer()

getSelectionForeground

public Color getSelectionForeground()

Returns the selection foreground color.

Returns:
the Color object for the foreground property
See Also:
setSelectionForeground(java.awt.Color),
setSelectionBackground(java.awt.Color)

setSelectionForeground

public void setSelectionForeground(Color selectionForeground)

Sets the foreground color for selected cells.  Cell renderers
 can use this color to render text and graphics for selected
 cells.

 The default value of this property is defined by the look
 and feel implementation.

 This is a JavaBeans bound property.

Parameters:
selectionForeground - the Color to use in the foreground
                             for selected list items
See Also:
getSelectionForeground(),
setSelectionBackground(java.awt.Color),
JComponent.setForeground(java.awt.Color),
JComponent.setBackground(java.awt.Color),
JComponent.setFont(java.awt.Font)

getSelectionBackground

public Color getSelectionBackground()

Returns the background color for selected cells.

Returns:
the Color used for the background of
 selected list items
See Also:
setSelectionBackground(java.awt.Color),
setSelectionForeground(java.awt.Color)

setSelectionBackground

public void setSelectionBackground(Color selectionBackground)

Sets the background color for selected cells.  Cell renderers
 can use this color to the fill selected cells.

 The default value of this property is defined by the look
 and feel implementation.

 This is a JavaBeans bound property.

Parameters:
selectionBackground - the Color to use for the
                             background of selected cells
See Also:
getSelectionBackground(),
setSelectionForeground(java.awt.Color),
JComponent.setForeground(java.awt.Color),
JComponent.setBackground(java.awt.Color),
JComponent.setFont(java.awt.Font)

getVisibleRowCount

public int getVisibleRowCount()

Returns the preferred number of visible rows.

Returns:
an integer indicating the preferred number of rows to display
         without using a scroll bar
See Also:
setVisibleRowCount(int)

setVisibleRowCount

public void setVisibleRowCount(int visibleRowCount)

Sets the preferred number of rows in the list that can be displayed
 without a scollbar, as determined by the nearest
 JViewport ancestor, if any.
 The value of this property only affects the value of
 the JList's preferredScrollableViewportSize.

 The default value of this property is 8.

 This is a JavaBeans bound property.

Parameters:
visibleRowCount - an integer specifying the preferred number of
                         visible rows
See Also:
getVisibleRowCount(),
JComponent.getVisibleRect(),
JViewport

getFirstVisibleIndex

public int getFirstVisibleIndex()

Returns the index of the cell in the upper left corner of the
 JList
 or -1 if nothing is visible or the list is empty.  Note that this
 cell may only be partially visible.

Returns:
the index of the first visible cell
See Also:
getLastVisibleIndex(),
JComponent.getVisibleRect()

getLastVisibleIndex

public int getLastVisibleIndex()

Returns the index of the cell in the lower right corner of the
 JList
 or -1 if nothing is visible or the list is empty.  Note that this
 cell may only be partially visible.

Returns:
the index of the last visible cell
See Also:
getLastVisibleIndex(),
JComponent.getVisibleRect()

ensureIndexIsVisible

public void ensureIndexIsVisible(int index)

Scrolls the viewport to make the specified cell completely visible.
 Note, for this method to work, the JList must be
 displayed within a JViewport.

Parameters:
index - the index of the cell to make visible
See Also:
JComponent.scrollRectToVisible(java.awt.Rectangle),
JComponent.getVisibleRect()

locationToIndex

public int locationToIndex(Point location)

Converts a point in JList coordinates to the index
 of the cell at that location.  Returns -1 if there's no
 cell at the specified location.

Parameters:
location - the coordinates of the cell, relative to
            JList
Returns:
an integer -- the index of the cell at the given location, or -1.

indexToLocation

public Point indexToLocation(int index)

Returns the origin of the specified item in JList
 coordinates. Returns null if index isn't valid.

Parameters:
index - the index of the JList cell
Returns:
the origin of the index'th cell

getCellBounds

public Rectangle getCellBounds(int index0,
                               int index1)

Returns the bounds of the specified range of items in JList
 coordinates. Returns null if index isn't valid.

Parameters:
index0 - the index of the first JList cell in the range
index1 - the index of the last JList cell in the range
Returns:
the bounds of the indexed cells in pixels

getModel

public ListModel getModel()

Returns the data model that holds the list of items displayed
 by the JList component.

Returns:
the ListModel that provides the displayed
                list of items
See Also:
setModel(javax.swing.ListModel)

setModel

public void setModel(ListModel model)

Sets the model that represents the contents or "value" of the
 list and clears the list selection after notifying
 PropertyChangeListeners.

 This is a JavaBeans bound property.

Parameters:
model - the ListModel that provides the
                        list of items for display
Throws:
IllegalArgumentException - if model is
                        null
See Also:
getModel()

setListData

public void setListData(Object[] listData)

Constructs a ListModel from an array of objects and then
 applies setModel to it.

Parameters:
listData - an array of Objects containing the items to display
                 in the list
See Also:
setModel(javax.swing.ListModel)

setListData

public void setListData(Vector listData)

Constructs a ListModel from a Vector and then
 applies setModel to it.

Parameters:
listData - a Vector containing the items to
                        display in the list
See Also:
setModel(javax.swing.ListModel)

createSelectionModel

protected ListSelectionModel createSelectionModel()

Returns an instance of DefaultListSelectionModel.  This
 method is used by the constructor to initialize the
 selectionModel property.

Returns:
the ListSelectionModel used by this
                    JList.
See Also:
setSelectionModel(javax.swing.ListSelectionModel),
DefaultListSelectionModel

getSelectionModel

public ListSelectionModel getSelectionModel()

Returns the value of the current selection model. The selection
 model handles the task of making single selections, selections
 of contiguous ranges, and non-contiguous selections.

Returns:
the ListSelectionModel that implements
                    list selections
See Also:
setSelectionModel(javax.swing.ListSelectionModel),
ListSelectionModel

fireSelectionValueChanged

protected void fireSelectionValueChanged(int firstIndex,
                                         int lastIndex,
                                         boolean isAdjusting)

Notifies JList ListSelectionListeners that
 the selection model has changed.  It's used to forward
 ListSelectionEvents from the selectionModel
 to the ListSelectionListeners added directly to the
 JList.

Parameters:
firstIndex - the first selected index
lastIndex - the last selected index
isAdjusting - true if multiple changes are being made
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener),
removeListSelectionListener(javax.swing.event.ListSelectionListener),
EventListenerList

addListSelectionListener

public void addListSelectionListener(ListSelectionListener listener)

Adds a listener to the list that's notified each time a change
 to the selection occurs.  Listeners added directly to the
 JList
 will have their ListSelectionEvent.getSource() ==
 this JList
 (instead of the ListSelectionModel).

Parameters:
listener - the ListSelectionListener to add
See Also:
getSelectionModel()

removeListSelectionListener

public void removeListSelectionListener(ListSelectionListener listener)

Removes a listener from the list that's notified each time a
 change to the selection occurs.

Parameters:
listener - the ListSelectionListener to remove
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener),
getSelectionModel()

setSelectionModel

public void setSelectionModel(ListSelectionModel selectionModel)

Sets the selectionModel for the list to a
 non-null ListSelectionModel
 implementation. The selection model handles the task of making single
 selections, selections of contiguous ranges, and non-contiguous
 selections.

 This is a JavaBeans bound property.

Parameters:
selectionModel - the ListSelectionModel that
                implements the selections
Throws:
IllegalArgumentException - if selectionModel
                         is null
See Also:
getSelectionModel()

setSelectionMode

public void setSelectionMode(int selectionMode)

Determines whether single-item or multiple-item
 selections are allowed.
 The following selectionMode values are allowed:

  •  SINGLE_SELECTION
   Only one list index can be selected at a time.  In this
   mode the setSelectionInterval and
   addSelectionInterval
   methods are equivalent, and only the second index
   argument is used.

  •  SINGLE_INTERVAL_SELECTION
   One contiguous index interval can be selected at a time.
   In this mode setSelectionInterval and
   addSelectionInterval
   are equivalent.

  •  MULTIPLE_INTERVAL_SELECTION
   In this mode, there's no restriction on what can be selected.
   This is the default.

Parameters:
selectionMode - an integer specifying the type of selections
                         that are permissible
See Also:
getSelectionMode()

getSelectionMode

public int getSelectionMode()

Returns whether single-item or multiple-item selections are allowed.

Returns:
the value of the selectionMode property
See Also:
setSelectionMode(int)

getAnchorSelectionIndex

public int getAnchorSelectionIndex()

Returns the first index argument from the most recent
 addSelectionModel or setSelectionInterval call.
 This is a convenience method that just delegates to the
 selectionModel.

Returns:
the index that most recently anchored an interval selection
See Also:
ListSelectionModel.getAnchorSelectionIndex(),
addSelectionInterval(int, int),
setSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getLeadSelectionIndex

public int getLeadSelectionIndex()

Returns the second index argument from the most recent
 addSelectionInterval or setSelectionInterval
 call.
 This is a convenience method that just  delegates to the
 selectionModel.

Returns:
the index that most recently ended a interval selection
See Also:
ListSelectionModel.getLeadSelectionIndex(),
addSelectionInterval(int, int),
setSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getMinSelectionIndex

public int getMinSelectionIndex()

Returns the smallest selected cell index.
 This is a convenience method that just delegates to the
 selectionModel.

Returns:
the smallest selected cell index
See Also:
ListSelectionModel.getMinSelectionIndex(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getMaxSelectionIndex

public int getMaxSelectionIndex()

Returns the largest selected cell index.
 This is a convenience method that just delegates to the
 selectionModel.

Returns:
the largest selected cell index
See Also:
ListSelectionModel.getMaxSelectionIndex(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

isSelectedIndex

public boolean isSelectedIndex(int index)

Returns true if the specified index is selected.
 This is a convenience method that just delegates to the
 selectionModel.

Parameters:
index - index to be queried for selection state
Returns:
true if the specified index is selected
See Also:
ListSelectionModel.isSelectedIndex(int),
setSelectedIndex(int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

isSelectionEmpty

public boolean isSelectionEmpty()

Returns true if nothing is selected.
 This is a convenience method that just delegates to the
 selectionModel.

Returns:
true if nothing is selected
See Also:
ListSelectionModel.isSelectionEmpty(),
clearSelection(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

clearSelection

public void clearSelection()

Clears the selection - after calling this method
 isSelectionEmpty will return true.
 This is a convenience method that just delegates to the
 selectionModel.

See Also:
ListSelectionModel.clearSelection(),
isSelectionEmpty(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

setSelectionInterval

public void setSelectionInterval(int anchor,
                                 int lead)

Selects the specified interval.  Both the anchor and lead indices are
 included.  It's not neccessary for anchor to be less than lead.
 This is a convenience method that just delegates to the
 selectionModel.

Parameters:
anchor - the first index to select
lead - the last index to select
See Also:
ListSelectionModel.setSelectionInterval(int, int),
addSelectionInterval(int, int),
removeSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

addSelectionInterval

public void addSelectionInterval(int anchor,
                                 int lead)

Sets the selection to be the union of the specified interval with current
 selection.  Both the anchor and lead indices are
 included.  It's not neccessary for anchor to be less than lead.
 This is a convenience method that just delegates to the
 selectionModel.

Parameters:
anchor - the first index to add to the selection
lead - the last index to add to the selection
See Also:
ListSelectionModel.addSelectionInterval(int, int),
setSelectionInterval(int, int),
removeSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)

Sets the selection to be the set difference of the specified interval
 and the current selection.  Both the anchor and lead indices are
 removed.  It's not neccessary for anchor to be less than lead.
 This is a convenience method that just delegates to the
 selectionModel.

Parameters:
anchor - the first index to remove from the selection
lead - the last index to remove from the selection
See Also:
ListSelectionModel.removeSelectionInterval(int, int),
setSelectionInterval(int, int),
addSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)

Sets the data model's isAdjusting property to true,
 so that a single event will be generated when all of the selection
 events have finished (for example, when the mouse is being
 dragged over the list in selection mode).

Parameters:
b - the boolean value for the property value
See Also:
ListSelectionModel.setValueIsAdjusting(boolean)

getValueIsAdjusting

public boolean getValueIsAdjusting()

Returns the value of the data model's isAdjusting property.
 This value is true if multiple changes are being made.

Returns:
true if multiple selection-changes are occurring, as
         when the mouse is being dragged over the list
See Also:
ListSelectionModel.getValueIsAdjusting()

getSelectedIndices

public int[] getSelectedIndices()

Returns an array of all of the selected indices in increasing
 order.

Returns:
all of the selected indices, in increasing order
See Also:
removeSelectionInterval(int, int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

setSelectedIndex

public void setSelectedIndex(int index)

Selects a single cell.

Parameters:
index - the index of the one cell to select
See Also:
ListSelectionModel.setSelectionInterval(int, int),
isSelectedIndex(int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

setSelectedIndices

public void setSelectedIndices(int[] indices)

Selects a set of cells.

Parameters:
indices - an array of the indices of the cells to select
See Also:
ListSelectionModel.addSelectionInterval(int, int),
isSelectedIndex(int),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getSelectedValues

public Object[] getSelectedValues()

Returns an array of the values for the selected cells.
 The returned values are sorted in increasing index order.

Returns:
the selected values
See Also:
isSelectedIndex(int),
getModel(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getSelectedIndex

public int getSelectedIndex()

Returns the first selected index; returns -1 if there is no
 selected item.

Returns:
the value of getMinSelectionIndex
See Also:
getMinSelectionIndex(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

getSelectedValue

public Object getSelectedValue()

Returns the first selected value, or null if the
 selection is empty.

Returns:
the first selected value
See Also:
getMinSelectionIndex(),
getModel(),
addListSelectionListener(javax.swing.event.ListSelectionListener)

setSelectedValue

public void setSelectedValue(Object anObject,
                             boolean shouldScroll)

Selects the specified object from the list.

Parameters:
anObject - the object to select
shouldScroll - true if the list should scroll to display
                      the selected object, if one exists; otherwise false

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()

Computes the size of the viewport needed to display
 visibleRowCount
 rows.  This is trivial if
 fixedCellWidth and fixedCellHeight
 were specified.  Note that they can be specified implicitly with
 the prototypeCellValue property.
 If fixedCellWidth wasn't specified,
 it's computed by finding the widest list element.
 If fixedCellHeight
 wasn't specified then we resort to heuristics:

  •
 If the model isn't empty we just multiply the height of the first row
 by visibleRowCount.

  •
 If the model is empty, (JList.getModel().getSize() == 0),
 then we just allocate 16 pixels per visible row, and 256 pixels
 for the width (unless fixedCellWidth was set),
 and hope for the best.

Specified by:
getPreferredScrollableViewportSize in interface Scrollable

Returns:
a dimension containing the size of the viewport needed
        to display visibleRowCount rows
See Also:
getPreferredScrollableViewportSize(),
setPrototypeCellValue(java.lang.Object)

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)

Returns the distance to scroll to expose the next or previous
 row (for vertical scrolling) or character (for horizontal scrolling).
 For horizontal scrolling: return the lists font size or 1 if the font
 is null.
 We're using the font size instead of the width of some canonical string,
 e.g. "m", because it's cheaper.

 For verticaL scrolling: if we're scrolling downwards (direction is
 greater than 0), and the first row is completely visible with respect
 to visibleRect, then return its height.  If
 we're scrolling downwards and the first row is only partially visible,
 return the height of the visible part of the first row.  Similarly
 if we're scrolling upwards we return the height of the row above
 the first row, unless the first row is partially visible.

 Note that the value of visibleRect must be the equal to
 this.getVisibleRect().

Specified by:
getScrollableUnitIncrement in interface Scrollable

Parameters:
visibleRect - the visible rectangle
orientation - HORIZONTAL or VERTICAL
direction - if <= 0,="0," then="then" scroll="scroll" UP;="UP;" if="if"> 0, then scroll DOWN
Returns:
the distance, in pixels, to scroll to expose the
            next or previous unit
Throws:
IllegalArgumentException - if visibleRect is null, or
         orientation isn't one of SwingConstants.VERTICAL,
         SwingConstants.HORIZONTAL.
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)

Returns the block increment amount.

Specified by:
getScrollableBlockIncrement in interface Scrollable

Parameters:
visibleRect - the visible rectangle
orientation - HORIZONTAL or VERTICAL
direction - if <= 0,="0," then="then" scroll="scroll" UP;="UP;" if="if"> 0, then scroll DOWN
Returns:
the visibleRect.height or visibleRect.width per the orientation
Throws:
IllegalArgumentException - if visibleRect is null, or
            orientation isn't one of SwingConstants.VERTICAL,
            SwingConstants.HORIZONTAL.
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()

Returns true if this JList is displayed in a
 JViewport and the viewport is wider than
 JList's preferred width; otherwise returns false.
 If false, then don't track the viewport's width. This allows horizontal
 scrolling if the JViewport is itself embedded in a
 JScrollPane.

Specified by:
getScrollableTracksViewportWidth in interface Scrollable

Returns:
true if viewport is wider than the JList's
                preferred width, otherwise false
See Also:
Scrollable.getScrollableTracksViewportWidth()

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()

Returns true if this JList is displayed in a
 JViewport and the viewport is taller than
 JList's preferred height; otherwise returns false.
 If false, then don't track the viewport's height. This allows vertical
 scrolling if the JViewport is itself embedded in a
 JScrollPane.

Specified by:
getScrollableTracksViewportHeight in interface Scrollable

Returns:
true if viewport is taller than Jlist's
                preferred height, otherwise false
See Also:
Scrollable.getScrollableTracksViewportHeight()

paramString

protected String paramString()

Returns a string representation of this JList.
 This method
 is intended to be used only for debugging purposes, and the
 content and format of the returned string may vary between
 implementations. The returned string may be empty but may not
 be null.

Overrides:
paramString in class JComponent

Returns:
a string representation of this JList.

getAccessibleContext

public AccessibleContext getAccessibleContext()

Gets the AccessibleContext associated with this JList.
 For JLists, the AccessibleContext takes the form of an
 AccessibleJList.
 A new AccessibleJList instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent

Returns:
an AccessibleJList that serves as the
         AccessibleContext of this JList

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


JMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenu

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JMenuItem
                                |
                                +--javax.swing.JMenu
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants
public class JMenu
extends JMenuItem
implements Accessible, MenuElement

An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar. In addition to JMenuItems, a JMenu can also contain JSeparators.

In essence, a menu is a button with an associated JPopupMenu. When the "button" is pressed, the JPopupMenu appears. If the "button" is on the JMenuBar, the menu is a top-level window. If the "button" is another menu item, then the JPopupMenu is "pull-right" menu.

For information and examples of using menus see How to Use Menus, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JMenu key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JMenuItem, JSeparator, JMenuBar, JPopupMenu, Serialized Form

Inner Class Summary
protected class | JMenu.AccessibleJMenu This class implements accessibility support for the JMenu class.
protected class | JMenu.WinListener A listener class that watches for a popup window closing.
Inner classes inherited from class javax.swing.JMenuItem
JMenuItem.AccessibleJMenuItem
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  JMenu.WinListener popupListener
The window-closing listener for the popup.
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JMenu()
Constructs a new JMenu with no text.
JMenu(Action a)
Constructs a menu whose properties are taken from the Action supplied.
JMenu(String s)
Constructs a new JMenu with the supplied string as its text.
JMenu(String s, boolean b)
Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.
Method Summary
JMenuItem | add(Action a) Creates a new menu item attached to the specified Action object and appends it to the end of this menu.
Component | add(Component c) Appends a component to the end of this menu.
Component | add(Component c, int index) Adds the specified component to this container at the given position.
JMenuItem | add(JMenuItem menuItem) Appends a menu item to the end of this menu.
JMenuItem | add(String s) Creates a new menu item with the specified text and appends it to the end of this menu.
void | addMenuListener(MenuListener l) Adds a listener for menu events.
void | addSeparator() Appends a new separator to the end of the menu.
protected PropertyChangeListener | createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
protected JMenuItem | createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JMenu.
protected JMenu.WinListener | createWinListener(JPopupMenu p) Creates a window-closing listener for the popup.
void | doClick(int pressTime) Programatically performs a "click".
protected void | fireMenuCanceled() Notifies all listeners that have registered interest for notification on this event type.
protected void | fireMenuDeselected() Notifies all listeners that have registered interest for notification on this event type.
protected void | fireMenuSelected() Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JMenu.
Component | getComponent() Returns the java.awt.Component used to paint this MenuElement.
int | getDelay() Returns the suggested delay, in milliseconds, before submenus are popped up or down.
JMenuItem | getItem(int pos) Returns the JMenuItem at the specified position.
int | getItemCount() Returns the number of items on the menu, including separators.
Component | getMenuComponent(int n) Returns the component at position n.
int | getMenuComponentCount() Returns the number of components on the menu.
Component[] | getMenuComponents() Returns an array of Components of the menu's subcomponents.
JPopupMenu | getPopupMenu() Returns the popupmenu associated with this menu.
protected Point | getPopupMenuOrigin() Computes the origin for the JMenu's popup menu.
MenuElement[] | getSubElements() Returns an array of MenuElements containing the submenu for this menu component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
JMenuItem | insert(Action a, int pos) Inserts a new menu item attached to the specified Action object at a given position.
JMenuItem | insert(JMenuItem mi, int pos) Inserts the specified JMenuitem at a given position.
void | insert(String s, int pos) Inserts a new menu item with the specified text at a given position.
void | insertSeparator(int index) Inserts a separator at the specified position.
boolean | isMenuComponent(Component c) Returns true if the specified component exists in the submenu hierarchy.
boolean | isPopupMenuVisible() Returns true if the menu's popup window is visible.
boolean | isSelected() Returns true if the menu is currently selected (highlighted).
boolean | isTearOff() Returns true if the menu can be torn off.
boolean | isTopLevelMenu() Returns true if the menu is a 'top-level menu', that is, if it is the direct child of a menubar.
void | menuSelectionChanged(boolean isIncluded) Messaged when the menubar selection changes to activate or deactivate this menu.
protected String | paramString() Returns a string representation of this JMenu.
protected void | processFocusEvent(FocusEvent e) Processes any focus events, such as FocusEvent.FOCUS_GAINED or FocusEvent.FOCUS_LOST.
protected void | processKeyEvent(KeyEvent e) Processes key stroke events for this menu, such as mnemonics and accelerators.
void | remove(Component c) Removes the component c from this menu.
void | remove(int pos) Removes the menu item at the specified index from this menu.
void | remove(JMenuItem item) Removes the specified menu item from this menu.
void | removeAll() Removes all menu items from this menu.
void | removeMenuListener(MenuListener l) Removes a listener for menu events.
void | setAccelerator(KeyStroke keyStroke) setAccelerator is not defined for JMenu.
void | setDelay(int d) Sets the suggested delay before the menu's PopupMenu is popped up or down.
void | setMenuLocation(int x, int y) Sets the location of the popup component.
void | setModel(ButtonModel newModel) Sets the data model for the "menu button" -- the label that the user clicks to open or close the menu.
void | setPopupMenuVisible(boolean b) Sets the visibility of the menu's popup.
void | setSelected(boolean b) Sets the selection status of the menu.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JMenuItem
addMenuDragMouseListener, addMenuKeyListener, configurePropertiesFromAction, createActionPropertyChangeListener, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, init, isArmed, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setArmed, setEnabled, setUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.MenuElement
processKeyEvent, processMouseEvent

Field Detail

popupListener

protected JMenu.WinListener popupListener
The window-closing listener for the popup.
See Also:
JMenu.WinListener
Constructor Detail

JMenu

public JMenu()
Constructs a new JMenu with no text.

JMenu

public JMenu(String s)
Constructs a new JMenu with the supplied string as its text.
Parameters:
s - the text for the menu label

JMenu

public JMenu(Action a)
Constructs a menu whose properties are taken from the Action supplied.
Parameters:
a - an Action
Since:
1.3

JMenu

public JMenu(String s,
             boolean b)
Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.
Parameters:
s - the text for the menu label
b - can the menu be torn off (not yet implemented)
Method Detail

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JMenuItem
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JMenuItem
Returns:
the string "MenuUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setModel

public void setModel(ButtonModel newModel)
Sets the data model for the "menu button" -- the label that the user clicks to open or close the menu.
Overrides:
setModel in class AbstractButton
Parameters:
newModel - the ButtonModel
See Also:
AbstractButton.getModel()

isSelected

public boolean isSelected()
Returns true if the menu is currently selected (highlighted).
Overrides:
isSelected in class AbstractButton
Returns:
true if the menu is selected, else false

setSelected

public void setSelected(boolean b)
Sets the selection status of the menu.
Overrides:
setSelected in class AbstractButton
Parameters:
b - true to select (highlight) the menu; false to de-select the menu

isPopupMenuVisible

public boolean isPopupMenuVisible()
Returns true if the menu's popup window is visible.
Returns:
true if the menu is visible, else false

setPopupMenuVisible

public void setPopupMenuVisible(boolean b)
Sets the visibility of the menu's popup. If the menu is not enabled, this method will have no effect.
Parameters:
b - a boolean value -- true to make the menu visible, false to hide it

getPopupMenuOrigin

protected Point getPopupMenuOrigin()
Computes the origin for the JMenu's popup menu.
Returns:
a Point in the coordinate space of the menu which should be used as the origin of the JMenu's popup menu

getDelay

public int getDelay()
Returns the suggested delay, in milliseconds, before submenus are popped up or down. Each look and feel (L&F) may determine its own policy for observing the delay property. In most cases, the delay is not observed for top level menus or while dragging. The default for delay is 0. This method is a property of the look and feel code and is used to manage the idiosyncracies of the various UI implementations.
Returns:
the delay property

setDelay

public void setDelay(int d)
Sets the suggested delay before the menu's PopupMenu is popped up or down. Each look and feel (L&F) may determine it's own policy for observing the delay property. In most cases, the delay is not observed for top level menus or while dragging. This method is a property of the look and feel code and is used to manage the idiosyncracies of the various UI implementations.
Parameters:
d - the number of milliseconds to delay
Throws:
IllegalArgumentException - if d is less than 0

setMenuLocation

public void setMenuLocation(int x,
                            int y)
Sets the location of the popup component.
Parameters:
x - the x coordinate of the popup's new position
y - the y coordinate of the popup's new position

add

public JMenuItem add(JMenuItem menuItem)
Appends a menu item to the end of this menu. Returns the menu item added.
Parameters:
menuItem - the JMenuitem to be added
Returns:
the JMenuItem added

add

public Component add(Component c)
Appends a component to the end of this menu. Returns the component added.
Overrides:
add in class Container
Parameters:
c - the Component to add
Returns:
the Component added

add

public Component add(Component c,
                     int index)
Adds the specified component to this container at the given position. If index equals -1, the component will be appended to the end.
Overrides:
add in class Container
Parameters:
c - the Component to add
index - the position at which to insert the component
Returns:
the Component added
See Also:
remove(javax.swing.JMenuItem), Container.add(Component, int)

add

public JMenuItem add(String s)
Creates a new menu item with the specified text and appends it to the end of this menu.
Parameters:
s - the string for the menu item to be added

add

public JMenuItem add(Action a)
Creates a new menu item attached to the specified Action object and appends it to the end of this menu. As of JDK 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.
Parameters:
a - the Action for the menu item to be added
See Also:
Action

createActionComponent

protected JMenuItem createActionComponent(Action a)
Factory method which creates the JMenuItem for Actions added to the JMenu. As of JDK 1.3, this is no longer the preferred method. Instead it is recommended to configure a control with an action using setAction, and then adding that control directly to the Container.
Parameters:
a - the Action for the menu item to be added
Returns:
the new menu item
See Also:
Action

createActionChangeListener

protected PropertyChangeListener createActionChangeListener(JMenuItem b)
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur. As of JDK 1.3, this is no longer the preferred method for adding Actions to a Container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

addSeparator

public void addSeparator()
Appends a new separator to the end of the menu.

insert

public void insert(String s,
                   int pos)
Inserts a new menu item with the specified text at a given position.
Parameters:
s - the text for the menu item to add
pos - an integer specifying the position at which to add the new menu item
Throws:
IllegalArgumentException - when the value of pos <0< /DL="/DL">

insert

public JMenuItem insert(JMenuItem mi,
                        int pos)
Inserts the specified JMenuitem at a given position.
Parameters:
mi - the JMenuitem to add
pos - an integer specifying the position at which to add the new JMenuitem
Returns:
the new menu item
Throws:
IllegalArgumentException - if the value of pos <0< /DL="/DL">

insert

public JMenuItem insert(Action a,
                        int pos)
Inserts a new menu item attached to the specified Action object at a given position.
Parameters:
a - the Action object for the menu item to add
pos - an integer specifying the position at which to add the new menu item
Throws:
IllegalArgumentException - if the value of pos <0< /DL="/DL">

insertSeparator

public void insertSeparator(int index)
Inserts a separator at the specified position.
Parameters:
index - an integer specifying the position at which to insert the menu separator
Throws:
IllegalArgumentException - if the value of index <0< /DL="/DL">

getItem

public JMenuItem getItem(int pos)
Returns the JMenuItem at the specified position. If the component at pos is not a menu item, null is returned. This method is included for AWT compatibility.
Parameters:
pos - an integer specifying the position
Returns:
the menu item at the specified position; or null if the item as the specified position is not a menu item
Throws:
IllegalArgumentException - if the value of pos <0< /DL="/DL">

getItemCount

public int getItemCount()
Returns the number of items on the menu, including separators. This method is included for AWT compatibility.
Returns:
an integer equal to the number of items on the menu
See Also:
getMenuComponentCount()

isTearOff

public boolean isTearOff()
Returns true if the menu can be torn off. This method is not yet implemented.
Returns:
true if the menu can be torn off, else false
Throws:
Error - if invoked -- this method is not yet implemented

remove

public void remove(JMenuItem item)
Removes the specified menu item from this menu. If there is no popup menu, this method will have no effect.
Parameters:
item - the JMenuItem to be removed from the menu

remove

public void remove(int pos)
Removes the menu item at the specified index from this menu.
Overrides:
remove in class Container
Parameters:
pos - the position of the item to be removed
Throws:
IllegalArgumentException - if the value of pos <0, or="or" if="if" pos is greater than the number of menu items

remove

public void remove(Component c)
Removes the component c from this menu.
Overrides:
remove in class Container
Parameters:
c - the component to be removed

removeAll

public void removeAll()
Removes all menu items from this menu.
Overrides:
removeAll in class Container
Following copied from class: java.awt.Container
See Also:
Container.add(java.awt.Component), Container.remove(int)

getMenuComponentCount

public int getMenuComponentCount()
Returns the number of components on the menu.
Returns:
an integer containing the number of components on the menu

getMenuComponent

public Component getMenuComponent(int n)
Returns the component at position n.
Parameters:
n - the position of the component to be returned
Returns:
the component requested, or null if there is no popup menu

getMenuComponents

public Component[] getMenuComponents()
Returns an array of Components of the menu's subcomponents. Note that this returns all Components in the popup menu, including separators.
Returns:
an array of Components or an empty array if there is no popup menu

isTopLevelMenu

public boolean isTopLevelMenu()
Returns true if the menu is a 'top-level menu', that is, if it is the direct child of a menubar.
Returns:
true if the menu is activated from the menu bar; false if the menu is activated from a menu item on another menu

isMenuComponent

public boolean isMenuComponent(Component c)
Returns true if the specified component exists in the submenu hierarchy.
Parameters:
c - the Component to be tested
Returns:
true if the Component exists, false otherwise

getPopupMenu

public JPopupMenu getPopupMenu()
Returns the popupmenu associated with this menu. If there is no popupmenu, it will create one.

addMenuListener

public void addMenuListener(MenuListener l)
Adds a listener for menu events.
Parameters:
l - the listener to be added

removeMenuListener

public void removeMenuListener(MenuListener l)
Removes a listener for menu events.
Parameters:
l - the listener to be removed

fireMenuSelected

protected void fireMenuSelected()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Throws:
Error - if there is a null listener
See Also:
EventListenerList

fireMenuDeselected

protected void fireMenuDeselected()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Throws:
Error - if there is a null listener
See Also:
EventListenerList

fireMenuCanceled

protected void fireMenuCanceled()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Throws:
Error - if there is a null listener
See Also:
EventListenerList

createWinListener

protected JMenu.WinListener createWinListener(JPopupMenu p)
Creates a window-closing listener for the popup.
Parameters:
p - the JPopupMenu
Returns:
the new window-closing listener
See Also:
JMenu.WinListener

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
Messaged when the menubar selection changes to activate or deactivate this menu. Overrides JMenuItem.menuSelectionChanged.
Specified by:
menuSelectionChanged in interface MenuElement
Overrides:
menuSelectionChanged in class JMenuItem
Parameters:
isIncluded - true if this menu is active, false if it is not

getSubElements

public MenuElement[] getSubElements()
Returns an array of MenuElements containing the submenu for this menu component. If popup menu is null returns an empty array. This method is required to conform to the MenuElement interface. Note that since JSeparators do not conform to the MenuElement interface, this array will only contain JMenuItems.
Specified by:
getSubElements in interface MenuElement
Overrides:
getSubElements in class JMenuItem
Returns:
an array of MenuElement objects

getComponent

public Component getComponent()
Returns the java.awt.Component used to paint this MenuElement. The returned component is used to convert events and detect if an event is inside a menu component.
Specified by:
getComponent in interface MenuElement
Overrides:
getComponent in class JMenuItem
Following copied from interface: javax.swing.MenuElement
Returns:
the Component value

setAccelerator

public void setAccelerator(KeyStroke keyStroke)
setAccelerator is not defined for JMenu. Use setMnemonic instead.
Overrides:
setAccelerator in class JMenuItem
Parameters:
keyStroke - the keystroke combination which will invoke the JMenuItem's actionlisteners without navigating the menu hierarchy
Throws:
Error - if invoked -- this method is not defined for JMenu. Use setMnemonic instead

processFocusEvent

protected void processFocusEvent(FocusEvent e)
Processes any focus events, such as FocusEvent.FOCUS_GAINED or FocusEvent.FOCUS_LOST.
Overrides:
processFocusEvent in class JComponent
Parameters:
e - the FocusEvent
See Also:
FocusEvent

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Processes key stroke events for this menu, such as mnemonics and accelerators.
Overrides:
processKeyEvent in class JComponent
Parameters:
e - the key event to be processed

doClick

public void doClick(int pressTime)
Programatically performs a "click". This overrides the method AbstractButton.doClick in order to make the menu pop up.
Overrides:
doClick in class AbstractButton
Parameters:
pressTime - indicates the number of milliseconds the button was pressed for

paramString

protected String paramString()
Returns a string representation of this JMenu. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JMenuItem
Returns:
a string representation of this JMenu.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JMenu. For JMenus, the AccessibleContext takes the form of an AccessibleJMenu. A new AccessibleJMenu instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JMenuItem
Returns:
an AccessibleJMenu that serves as the AccessibleContext of this JMenu
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JMenuBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenuBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JMenuBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, MenuElement, Serializable
Direct Known Subclasses:
BasicInternalFrameTitlePane.SystemMenuBar
public class JMenuBar
extends JComponent
implements Accessible, MenuElement

An implementation of a menu bar. You add JMenu objects to the menu bar to construct a menu. When the user selects a JMenu object, its associated JPopupMenu is displayed, allowing the user to select one of the JMenuItems on it.

For information and examples of using menu bars see How to Use Menus, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JMenuBar key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JMenu, JPopupMenu, JMenuItem, Serialized Form

Inner Class Summary
protected  class JMenuBar.AccessibleJMenuBar
This class implements accessibility support for the JMenuBar class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JMenuBar()
Creates a new menu bar.
Method Summary
JMenu | add(JMenu c) Appends the specified menu to the end of the menu bar.
void | addNotify() Overrides JComponent.addNotify to register this menu bar with the current keyboard manager.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JMenuBar.
Component | getComponent() Implemented to be a MenuElement.
Component | getComponentAtIndex(int i) Deprecated. replaced by getComponent(int i)
int | getComponentIndex(Component c) Returns the index of the specified component.
JMenu | getHelpMenu() Gets the help menu for the menu bar.
Insets | getMargin() Returns the margin between the menubar's border and its menus.
JMenu | getMenu(int index) Returns the menu at the specified position in the menu bar.
int | getMenuCount() Returns the number of items in the menu bar.
SingleSelectionModel | getSelectionModel() Returns the model object that handles single selections.
MenuElement[] | getSubElements() Implemented to be a MenuElement -- returns the menus in this menu bar.
MenuBarUI | getUI() Returns the menubar's current UI.
String | getUIClassID() Returns the name of the L&F class that renders this component.
boolean | isBorderPainted() Returns true if the menu bars border should be painted.
boolean | isManagingFocus() Returns true to indicate that this component manages focus events internally.
boolean | isSelected() Returns true if the menu bar currently has a component selected.
void | menuSelectionChanged(boolean isIncluded) Implemented to be a MenuElement -- does nothing.
protected void | paintBorder(Graphics g) Paints the menubar's border if BorderPainted property is true.
protected String | paramString() Returns a string representation of this JMenuBar.
protected boolean | processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) Subclassed to check all the child menus.
void | processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Implemented to be a MenuElement -- does nothing.
void | removeNotify() Overrides JComponent.removeNotify to unregister this menu bar with the current keyboard manager.
void | setBorderPainted(boolean b) Sets whether the border should be painted.
void | setHelpMenu(JMenu menu) Sets the help menu that appears when the user selects the "help" option in the menu bar.
void | setMargin(Insets m) Sets the margin between the menubar's border and its menus.
void | setSelected(Component sel) Sets the currently selected component, producing a a change to the selection model.
void | setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.
void | setUI(MenuBarUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JMenuBar

public JMenuBar()
Creates a new menu bar.
Method Detail

getUI

public MenuBarUI getUI()
Returns the menubar's current UI.
See Also:
setUI(javax.swing.plaf.MenuBarUI)

setUI

public void setUI(MenuBarUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the new MenuBarUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "MenuBarUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getSelectionModel

public SingleSelectionModel getSelectionModel()
Returns the model object that handles single selections.
Returns:
the SingleSelectionModel property
See Also:
SingleSelectionModel

setSelectionModel

public void setSelectionModel(SingleSelectionModel model)
Sets the model object to handle single selections.
Parameters:
model - the SingleSelectionModel to use
See Also:
SingleSelectionModel

add

public JMenu add(JMenu c)
Appends the specified menu to the end of the menu bar.
Parameters:
c - the JMenu component to add
Returns:
the menu component

getMenu

public JMenu getMenu(int index)
Returns the menu at the specified position in the menu bar.
Parameters:
index - an integer giving the position in the menu bar, where 0 is the first position
Returns:
the JMenu at that position, or null if if there is no JMenu at that position (ie. if it is a JMenuItem)

getMenuCount

public int getMenuCount()
Returns the number of items in the menu bar.
Returns:
the number of items in the menu bar

setHelpMenu

public void setHelpMenu(JMenu menu)
Sets the help menu that appears when the user selects the "help" option in the menu bar. This method is not yet implemented and will throw an exception.
Parameters:
menu - the JMenu that delivers help to the user

getHelpMenu

public JMenu getHelpMenu()
Gets the help menu for the menu bar. This method is not yet implemented and will throw an exception.
Returns:
the JMenu that delivers help to the user

getComponentAtIndex

public Component getComponentAtIndex(int i)
Deprecated. replaced by getComponent(int i)

Returns the component at the specified index.
Parameters:
i - an integer specifying the position, where 0 is first
Returns:
the Component at the position, or null for an invalid index

getComponentIndex

public int getComponentIndex(Component c)
Returns the index of the specified component.
Parameters:
c - the Component to find
Returns:
an integer giving the component's position, where 0 is first; or -1 if it can't be found

setSelected

public void setSelected(Component sel)
Sets the currently selected component, producing a a change to the selection model.
Parameters:
sel - the Component to select

isSelected

public boolean isSelected()
Returns true if the menu bar currently has a component selected.
Returns:
true if a selection has been made, else false

isBorderPainted

public boolean isBorderPainted()
Returns true if the menu bars border should be painted.
Returns:
true if the border should be painted, else false

setBorderPainted

public void setBorderPainted(boolean b)
Sets whether the border should be painted.
Parameters:
b - if true and border property is not null, the border is painted.
See Also:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics g)
Paints the menubar's border if BorderPainted property is true.
Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics context to use for painting
See Also:
JComponent.paint(java.awt.Graphics), JComponent.setBorder(javax.swing.border.Border)

setMargin

public void setMargin(Insets m)
Sets the margin between the menubar's border and its menus. Setting to null will cause the menubar to use the default margins.
Parameters:
margin - an Insets object containing the margin values
See Also:
Insets

getMargin

public Insets getMargin()
Returns the margin between the menubar's border and its menus. If there is no previous margin, it will create a default margin with zero size.
Returns:
an Insets object containing the margin values
See Also:
Insets

processMouseEvent

public void processMouseEvent(MouseEvent event,
                              MenuElement[] path,
                              MenuSelectionManager manager)
Implemented to be a MenuElement -- does nothing.
Specified by:
processMouseEvent in interface MenuElement
See Also:
getSubElements()

processKeyEvent

public void processKeyEvent(KeyEvent e,
                            MenuElement[] path,
                            MenuSelectionManager manager)
Implemented to be a MenuElement -- does nothing.
Specified by:
processKeyEvent in interface MenuElement
See Also:
getSubElements()

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
Implemented to be a MenuElement -- does nothing.
Specified by:
menuSelectionChanged in interface MenuElement
See Also:
getSubElements()

getSubElements

public MenuElement[] getSubElements()
Implemented to be a MenuElement -- returns the menus in this menu bar. This is the reason for implementing the MenuElement interface -- so that the menu bar can be treated the same as other menu elements.
Specified by:
getSubElements in interface MenuElement
Returns:
an array of menu items in the menu bar.

getComponent

public Component getComponent()
Implemented to be a MenuElement. Returns this object.
Specified by:
getComponent in interface MenuElement
Returns:
the current Component (this)
See Also:
getSubElements()

paramString

protected String paramString()
Returns a string representation of this JMenuBar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JMenuBar

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JMenuBar. For JMenuBars, the AccessibleContext takes the form of an AccessibleJMenuBar. A new AccessibleJMenuBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJMenuBar that serves as the AccessibleContext of this JMenuBar

isManagingFocus

public boolean isManagingFocus()
Returns true to indicate that this component manages focus events internally.
Overrides:
isManagingFocus in class JComponent
Returns:
true

processKeyBinding

protected boolean processKeyBinding(KeyStroke ks,
                                    KeyEvent e,
                                    int condition,
                                    boolean pressed)
Subclassed to check all the child menus.
Overrides:
processKeyBinding in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
true if there was a binding to an action, and the action was enabled

addNotify

public void addNotify()
Overrides JComponent.addNotify to register this menu bar with the current keyboard manager.
Overrides:
addNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

removeNotify

public void removeNotify()
Overrides JComponent.removeNotify to unregister this menu bar with the current keyboard manager.
Overrides:
removeNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


JMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenuItem

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JMenuItem
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants
Direct Known Subclasses:
JCheckBoxMenuItem, JMenu, JRadioButtonMenuItem
public class JMenuItem
extends AbstractButton
implements Accessible, MenuElement

An implementation of an item in a menu. A menu item is essentially a button sitting in a list. When the user selects the "button", the action associated with the menu item is performed. A JMenuItem contained in a JPopupMenu performs exactly that function.

For further documentation and for examples, see How to Use Menus in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JMenuItem key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JPopupMenu, JMenu, JCheckBoxMenuItem, JRadioButtonMenuItem, Serialized Form

Inner Class Summary
protected  class JMenuItem.AccessibleJMenuItem
This class implements accessibility support for the JMenuItem class.
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JMenuItem()
Creates a menuItem with no set text or icon.
JMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
JMenuItem(Icon icon)
Creates a menuItem with an icon.
JMenuItem(String text)
Creates a menuItem with text.
JMenuItem(String text, Icon icon)
Creates a menu item with the supplied text and icon.
JMenuItem(String text, int mnemonic)
Creates a menuItem with the specified text and keyboard mnemonic.
Method Summary
void | addMenuDragMouseListener(MenuDragMouseListener l) Adds a MenuDragMouseListener to the menu item
void | addMenuKeyListener(MenuKeyListener l) Adds a MenuKeyListener to the menu item
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected void | fireMenuDragMouseDragged(MenuDragMouseEvent event)
protected void | fireMenuDragMouseEntered(MenuDragMouseEvent event)
protected void | fireMenuDragMouseExited(MenuDragMouseEvent event)
protected void | fireMenuDragMouseReleased(MenuDragMouseEvent event)
protected void | fireMenuKeyPressed(MenuKeyEvent event)
protected void | fireMenuKeyReleased(MenuKeyEvent event)
protected void | fireMenuKeyTyped(MenuKeyEvent event)
KeyStroke | getAccelerator() Returns the KeyStroke which serves as an accelerator for the menu item.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JMenuItem.
Component | getComponent() This method returns the java.awt.Component used to paint this object.
MenuElement[] | getSubElements() This method returns an array containing the sub-menu components for this menu component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
protected void | init(String text, Icon icon) Initialize the menu item with the specified text and icon.
boolean | isArmed() Returns whether the menu item is "armed".
void | menuSelectionChanged(boolean isIncluded) Called by the MenuSelectionManager when the MenuElement is selected or unselected.
protected String | paramString() Returns a string representation of this JMenuItem.
void | processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) Process a key event forwarded from the MenuSelectionManager.
void | processMenuDragMouseEvent(MenuDragMouseEvent e) Handle mouse drag in a menu.
void | processMenuKeyEvent(MenuKeyEvent e) Handle a keystroke in a menu.
void | processMouseEvent(MouseEvent e, MenuElement[] path, MenuSelectionManager manager) Process a mouse event forwarded from the MenuSelectionManager.
void | removeMenuDragMouseListener(MenuDragMouseListener l) Removes a MenuDragMouseListener from the menu item
void | removeMenuKeyListener(MenuKeyListener l) Removes a MenuKeyListener from the menu item
void | setAccelerator(KeyStroke keyStroke) Set the key combination which invokes the Menu Item's action listeners without navigating the menu hierarchy.
void | setArmed(boolean b) Identifies the menu item as "armed".
void | setEnabled(boolean b) Enable or disable the menu item.
void | setUI(MenuItemUI ui) Sets the L&F object that renders this component.
void | updateUI() Resets the UI property with a value from the current look and feel.
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JMenuItem

public JMenuItem()
Creates a menuItem with no set text or icon.

JMenuItem

public JMenuItem(Icon icon)
Creates a menuItem with an icon.
Parameters:
icon - the icon of the MenuItem.

JMenuItem

public JMenuItem(String text)
Creates a menuItem with text.
Parameters:
text - the text of the MenuItem.

JMenuItem

public JMenuItem(Action a)
Creates a menu item whose properties are taken from the Action supplied.
Since:
1.3

JMenuItem

public JMenuItem(String text,
                 Icon icon)
Creates a menu item with the supplied text and icon.
Parameters:
text - the text of the MenuItem.
icon - the icon of the MenuItem.

JMenuItem

public JMenuItem(String text,
                 int mnemonic)
Creates a menuItem with the specified text and keyboard mnemonic.
Parameters:
text - the text of the MenuItem.
mnemonic - the keyboard mnemonic for the MenuItem
Method Detail

init

protected void init(String text,
                    Icon icon)
Initialize the menu item with the specified text and icon.
Overrides:
init in class AbstractButton
Parameters:
text - the text of the MenuItem.
icon - the icon of the MenuItem.

setUI

public void setUI(MenuItemUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the MenuItemUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Resets the UI property with a value from the current look and feel.
Overrides:
updateUI in class AbstractButton
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"MenuItemUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setArmed

public void setArmed(boolean b)
Identifies the menu item as "armed". If the mouse button is released while it is over this item, the menu's action event will fire. If the mouse button is released elsewhere, the event will not fire and the menu item will be disarmed.
Parameters:
b - true to arm the menu item so it can be selected

isArmed

public boolean isArmed()
Returns whether the menu item is "armed".
Returns:
true if the menu item is armed, and it can be selected
See Also:
setArmed(boolean)

setEnabled

public void setEnabled(boolean b)
Enable or disable the menu item.
Overrides:
setEnabled in class AbstractButton
Parameters:
b - true to enable the item

setAccelerator

public void setAccelerator(KeyStroke keyStroke)
Set the key combination which invokes the Menu Item's action listeners without navigating the menu hierarchy. It is the UIs responsibility to do install the correct action.
Parameters:
keyStroke - the KeyStroke which will serve as an accelerator

getAccelerator

public KeyStroke getAccelerator()
Returns the KeyStroke which serves as an accelerator for the menu item.
Returns:
a KeyStroke object identifying the accelerator key

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Text, Icon
Overrides:
configurePropertiesFromAction in class AbstractButton
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.
Overrides:
createActionPropertyChangeListener in class AbstractButton
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

processMouseEvent

public void processMouseEvent(MouseEvent e,
                              MenuElement[] path,
                              MenuSelectionManager manager)
Process a mouse event forwarded from the MenuSelectionManager.
Specified by:
processMouseEvent in interface MenuElement
Parameters:
event - A MouseEvent with source being the receiving component.
componentPath - The MenuElement path array to the receiving component.
manager - The MenuSelectionManager for the menu hierarchy. This method should process the MouseEvent and change the menu selection if necessary by using MenuSelectionManager's API.

Note: you do not have to forward the event to sub-components. This is done automatically by the MenuSelectionManager

processKeyEvent

public void processKeyEvent(KeyEvent e,
                            MenuElement[] path,
                            MenuSelectionManager manager)
Process a key event forwarded from the MenuSelectionManager.
Specified by:
processKeyEvent in interface MenuElement
Parameters:
event - A KeyEvent with source being the receiving component.
componentPath - The MenuElement path array to the receiving component.
manager - The MenuSelectionManager for the menu hierarchy. This method should process the KeyEvent and change the menu selection if necessary by using MenuSelectionManager's API.

Note: you do not have to forward the event to sub-components. This is done automatically by the MenuSelectionManager

processMenuDragMouseEvent

public void processMenuDragMouseEvent(MenuDragMouseEvent e)
Handle mouse drag in a menu.
Parameters:
e - a MenuDragMouseEvent object

processMenuKeyEvent

public void processMenuKeyEvent(MenuKeyEvent e)
Handle a keystroke in a menu.
Parameters:
e - a MenuKeyEvent object

fireMenuDragMouseEntered

protected void fireMenuDragMouseEntered(MenuDragMouseEvent event)

fireMenuDragMouseExited

protected void fireMenuDragMouseExited(MenuDragMouseEvent event)

fireMenuDragMouseDragged

protected void fireMenuDragMouseDragged(MenuDragMouseEvent event)

fireMenuDragMouseReleased

protected void fireMenuDragMouseReleased(MenuDragMouseEvent event)

fireMenuKeyPressed

protected void fireMenuKeyPressed(MenuKeyEvent event)

fireMenuKeyReleased

protected void fireMenuKeyReleased(MenuKeyEvent event)

fireMenuKeyTyped

protected void fireMenuKeyTyped(MenuKeyEvent event)

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
Called by the MenuSelectionManager when the MenuElement is selected or unselected.
Specified by:
menuSelectionChanged in interface MenuElement
Parameters:
isIncluded - true if this menu item is on the part of the menu path that changed, false if this menu is part of the a menu path that changed, but this particular part of that path is still the same
See Also:
MenuSelectionManager.setSelectedPath(MenuElement[])

getSubElements

public MenuElement[] getSubElements()
This method returns an array containing the sub-menu components for this menu component.
Specified by:
getSubElements in interface MenuElement
Returns:
an array of MenuElements

getComponent

public Component getComponent()
This method returns the java.awt.Component used to paint this object. The returned component will be used to convert events and detect if an event is inside a menu component.
Specified by:
getComponent in interface MenuElement
Returns:
the Component that paints this menu item

addMenuDragMouseListener

public void addMenuDragMouseListener(MenuDragMouseListener l)
Adds a MenuDragMouseListener to the menu item

removeMenuDragMouseListener

public void removeMenuDragMouseListener(MenuDragMouseListener l)
Removes a MenuDragMouseListener from the menu item

addMenuKeyListener

public void addMenuKeyListener(MenuKeyListener l)
Adds a MenuKeyListener to the menu item

removeMenuKeyListener

public void removeMenuKeyListener(MenuKeyListener l)
Removes a MenuKeyListener from the menu item

paramString

protected String paramString()
Returns a string representation of this JMenuItem. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class AbstractButton
Returns:
a string representation of this JMenuItem.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JMenuItem. For JMenuItems, the AccessibleContext takes the form of an AccessibleJMenuItem. A new AccessibleJMenuItme instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJMenuItem that serves as the AccessibleContext of this JMenuItem
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JOptionPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JOptionPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JOptionPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JOptionPane
extends JComponent
implements Accessible

JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something. For information about using JOptionPane, see How to Make Dialogs, a section in The Java Tutorial.

While the JOptionPane class may appear complex because of the large number of methods, almost all uses of this class are one-line calls to one of the static showXxxDialog methods shown below:

showConfirmDialog | Asks a confirming question, like yes/no/cancel.
showInputDialog | Prompt for some input.
showMessageDialog | Tell the user about something that has happened.
showOptionDialog | The Grand Unification of the above three.
Each of these methods also comes in a showInternalXXX flavor, which uses an internal frame to hold the dialog box (see JInternalFrame). Multiple convenience methods have also been defined -- overloaded versions of the basic methods that use different parameter lists.

All dialogs are modal. Each showXxxDialog method blocks the current thread until the user's interaction is complete.

icon message
input value
option buttons
The basic appearance of one of these dialog boxes is generally similar to the picture at the right, although the various look-and-feels are ultimatly responsible for the final result.

Parameters:
The parameters to these methods follow consistent patterns:

parentComponent
Defines the Component that is to be the parent of this dialog box. It is used in two ways: the Frame that contains it is used as the Frame parent for the dialog box, and its screen coordinates are used in the placement of the dialog box. In general, the dialog box is placed just below the component. This parameter may be null, in which case a default Frame is used as the parent, and the dialog will be centered on the screen (depending on the L&F).
message
A descriptive message to be placed in the dialog box. In the most common usage, message is just a String or String constant. However, the type of this parameter is actually Object. Its interpretation depends on its type:
Object[]
An array of objects is interpreted as a series of messages (one per object) arranged in a vertical stack. The interpretation is recursive -- each object in the array is interpreted according to its type.
Component
The Component is displayed in the dialog.
Icon
The Icon is wrapped in a JLabel and displayed in the dialog.
others
The object is converted to a String by calling its toString method. The result is wrapped in a JLabel and displayed.
messageType
Defines the style of the message. The Look and Feel manager may lay out the dialog differently depending on this value, and will often provide a default icon. The possible values are:
  • ERROR_MESSAGE
  • INFORMATION_MESSAGE
  • WARNING_MESSAGE
  • QUESTION_MESSAGE
  • PLAIN_MESSAGE
optionType
Defines the set of option buttons that appear at the bottom of the dialog box:
  • DEFAULT_OPTION
  • YES_NO_OPTION
  • YES_NO_CANCEL_OPTION
  • OK_CANCEL_OPTION
You aren't limited to this set of option buttons. You can provide any buttons you want using the options parameter.
options
A more detailed description of the set of option buttons that will appear at the bottom of the dialog box. The usual value for the options parameter is an array of Strings. But the parameter type is an array of Objects. A button is created for each object depending on its type:
Component
The component is added to the button row directly.
Icon
A JButton is created with this as its label.
other
The Object is converted to a string using its toString method and the result is used to label a JButton.
icon
A decorative icon to be placed in the dialog box. A default value for this is determined by the messageType parameter.
title
The title for the dialog box.
initialValue
The default selection (input value).

When the selection is changed, setValue is invoked, which generates a PropertyChangeEvent.

If a JOptionPane has configured to all input setWantsInput the bound property JOptionPane.INPUT_VALUE_PROPERTY can also be listened to, to determine when the user has input or selected a value.

When one of the showXxxDialog methods returns an integer, the possible values are:

     YES_OPTION,
     NO_OPTION,
     CANCEL_OPTION,
     OK_OPTION, or
     CLOSED_OPTION.
Examples:
Show an error dialog that displays the message, 'alert':
JOptionPane.showMessageDialog(null, "alert", "alert", JOptionPane.ERROR_MESSAGE);

Show an internal information dialog with the message, 'information':
JOptionPane.showInternalMessageDialog(frame, "information",
      "information", JOptionPane.INFORMATION_MESSAGE);

Show an information panel with the options yes/no and message 'choose one':
JOptionPane.showConfirmDialog(null,
      "choose one", "choose one", JOptionPane.YES_NO_OPTION);

Show an internal information dialog with the options yes/no/cancel and message 'please choose one' and title information:
JOptionPane.showInternalConfirmDialog(frame,
      "please choose one", "information",
      JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);

Show a warning dialog with the options OK, CANCEL, title 'Warning', and message 'Click OK to continue':
Object[] options = { "OK", "CANCEL" };
JOptionPane.showOptionDialog(null, "Click OK to continue", "Warning",
      JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
      null, options, options[0]);

Show a dialog asking the user to type in a String:
String inputValue = JOptionPane.showInputDialog("Please input a value");

Show a dialog asking the user to select a String:
Object[] possibleValues = { "First", "Second", "Third" };
Object selectedValue = JOptionPane.showInputDialog(null,
      "Choose one", "Input",
      JOptionPane.INFORMATION_MESSAGE, null,
      possibleValues, possibleValues[0]);

Direct Use:
To create and use an JOptionPane directly, the standard pattern is roughly as follows:
     JOptionPane pane = new JOptionPane(arguments);
     pane.set.Xxxx(...); // Configure
     JDialog dialog = pane.createDialog(parentComponent, title);
     dialog.show();
     Object selectedValue = pane.getValue();
     if(selectedValue == null)
       return CLOSED_OPTION;
     //If there is not an array of option buttons:
     if(options == null) {
       if(selectedValue instanceof Integer)
          return ((Integer)selectedValue).intValue();
       return CLOSED_OPTION;
     }
     //If there is an array of option buttons:
     for(int counter = 0, maxCounter = options.length;
        counter

 For the keyboard keys used by this component in the standard Look and
 Feel (L&F) renditions, see the
 JOptionPane key assignments.

 Warning:
 Serialized objects of this class will not be compatible with
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.

See Also:
JInternalFrame, Serialized Form

Inner Class Summary

protected  class
JOptionPane.AccessibleJOptionPane

          This class implements accessibility support for the
 JOptionPane class.

Inner classes inherited from class javax.swing.JComponent

JComponent.AccessibleJComponent

Inner classes inherited from class java.awt.Container

Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component

Component.AccessibleAWTComponent

Field Summary
static int | CANCEL_OPTION Return value from class method if CANCEL is chosen.
static int | CLOSED_OPTION Return value from class method if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.
static int | DEFAULT_OPTION Type meaning Look and Feel should not supply any options -- only use the options from the JOptionPane.
static int | ERROR_MESSAGE Used for error messages.
protected Icon | icon Icon used in pane.
static String | ICON_PROPERTY Bound property name for icon.
static int | INFORMATION_MESSAGE Used for information messages.
static String | INITIAL_SELECTION_VALUE_PROPERTY Bound property name for initialSelectionValue.
static String | INITIAL_VALUE_PROPERTY Bounds property name for initialValue.
protected Object | initialSelectionValue Initial value to select in selectionValues.
protected Object | initialValue Value that should be initialy selected in options.
static String | INPUT_VALUE_PROPERTY Bound property name for inputValue.
protected Object | inputValue Value the user has input.
protected Object | message Message to display.
static String | MESSAGE_PROPERTY Bound property name for message.
static String | MESSAGE_TYPE_PROPERTY Bounds property name for type.
protected int | messageType Message type.
static int | NO_OPTION Return value from class method if NO is chosen.
static int | OK_CANCEL_OPTION Type used for showConfirmDialog.
static int | OK_OPTION Return value form class method if OK is chosen.
static String | OPTION_TYPE_PROPERTY Bound property name for optionType.
protected Object[] | options Options to display to the user.
static String | OPTIONS_PROPERTY Bounds property namer for option.
protected int | optionType Option type, one of DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
static int | PLAIN_MESSAGE No icon is used.
static int | QUESTION_MESSAGE Used for questions.
static String | SELECTION_VALUES_PROPERTY Bound property name for selectionValues.
protected Object[] | selectionValues Array of values the user can choose from.
static Object | UNINITIALIZED_VALUE Indicates that the user has not yet selected a value.
protected Object | value Currently selected value, will be a valid option, or UNINITIALIZED_VALUE or null.
static String | VALUE_PROPERTY Bounds property name for value.
static String | WANTS_INPUT_PROPERTY Bound property name for wantsInput.
protected boolean | wantsInput If true, a UI widget will be provided to the user to get input.
static int | WARNING_MESSAGE Used for warning messages.
static int | YES_NO_CANCEL_OPTION Type used for showConfirmDialog.
static int | YES_NO_OPTION Type used for showConfirmDialog.
static int | YES_OPTION Return value from class method if YES is chosen.

Fields inherited from class javax.swing.JComponent

accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

Fields inherited from class java.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

JOptionPane()

          Creates a JOptionPane with a test message.

JOptionPane(Object message)

          Creates a instance of JOptionPane to display a
 message using the
 plain-message message type and the default options delivered by
 the UI.

JOptionPane(Object message,
            int messageType)

          Creates an instance of JOptionPane to display a message
 with the specified message type and the default options,

JOptionPane(Object message,
            int messageType,
            int optionType)

          Creates an instance of JOptionPane to display a message
 with the specified message type and options.

JOptionPane(Object message,
            int messageType,
            int optionType,
            Icon icon)

          Creates an instance of JOptionPane to display a message
 with the specified message type, options, and icon.

JOptionPane(Object message,
            int messageType,
            int optionType,
            Icon icon,
            Object[] options)

          Creates an instance of JOptionPane to display a message
 with the specified message type, icon, and options.

JOptionPane(Object message,
            int messageType,
            int optionType,
            Icon icon,
            Object[] options,
            Object initialValue)

          Creates an instance of JOptionPane to display a message
 with the specified message type, icon, and options, with the
 initially-selected option specified.

Method Summary
JDialog | createDialog(Component parentComponent, String title) Creates and returns a new JDialog wrapping this centered on the parentComponent in the parentComponent's frame.
JInternalFrame | createInternalFrame(Component parentComponent, String title) Creates and returns an instance of JInternalFrame.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JOptionPane.
static JDesktopPane | getDesktopPaneForComponent(Component parentComponent) Returns the specified component's desktop pane.
static Frame | getFrameForComponent(Component parentComponent) Returns the specified component's Frame.
Icon | getIcon() Returns the icon this pane displays.
Object | getInitialSelectionValue() Returns the initial-selection value.
Object | getInitialValue() Returns the initial value.
Object | getInputValue() Returns the value the user has input, if wantsInput is true.
int | getMaxCharactersPerLineCount() Returns the maximum number of characters to place on a line in a message.
Object | getMessage() Returns the message-object this pane displays.
int | getMessageType() Returns the message type.
Object[] | getOptions() Returns the choices the user can make.
int | getOptionType() Returns the type of options that are displayed.
static Frame | getRootFrame() Returns the Frame to use for the class methods in which a frame is not provided.
Object[] | getSelectionValues() Returns the selection values.
OptionPaneUI | getUI() Returns the UI object which implements the L&F for this component.
String | getUIClassID() Returns the name of the UI class that implements the L&F for this component.
Object | getValue() Returns the value the user has selected.
boolean | getWantsInput() Returns true if a parentComponent will be provided for the user to input.
protected String | paramString() Returns a string representation of this JOptionPane.
void | selectInitialValue() Requests that the initial value be selected, which will set focus to the initial value.
void | setIcon(Icon newIcon) Sets the icon to display.
void | setInitialSelectionValue(Object newValue) Sets the initial selection value.
void | setInitialValue(Object newInitialValue) Sets the initial value that is to be enabled -- the Component that has the focus when the pane is initially displayed.
void | setInputValue(Object newValue) Sets the user's input-value.
void | setMessage(Object newMessage) Sets the option pane's message-object.
void | setMessageType(int newType) Sets the option pane's message type.
void | setOptions(Object[] newOptions) Sets the options this pane displays.
void | setOptionType(int newType) Sets the options to display.
static void | setRootFrame(Frame newRootFrame) Sets the frame to use for class methods in which a frame is not provided.
void | setSelectionValues(Object[] newValues) Sets the selection values for a pane that provides the user with a list of items to choose from.
void | setUI(OptionPaneUI ui) Sets the UI object which implements the L&F for this component.
void | setValue(Object newValue) Sets the value the user has chosen.
void | setWantsInput(boolean newValue) If newValue is true, a parentComponent is provided to allow the user to input a value.
static int | showConfirmDialog(Component parentComponent, Object message) Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".
static int | showConfirmDialog(Component parentComponent, Object message, String title, int optionType) Brings up a modal dialog where the number of choices is determined by the optionType parameter.
static int | showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) Brings up a modal dialog where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int | showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) Brings up a modal dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static String | showInputDialog(Component parentComponent, Object message) Shows a question-message dialog requesting input from the user parented to parentComponent.
static String | showInputDialog(Component parentComponent, Object message, String title, int messageType) Shows a dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object | showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static String | showInputDialog(Object message) Shows a question-message dialog requesting input from the user.
static int | showInternalConfirmDialog(Component parentComponent, Object message) Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, "Select an Option".
static int | showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType) Brings up a internal dialog panel where the number of choices is determined by the optionType parameter.
static int | showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) Brings up an internal dialog panel where the number of choices is determined by the optionType parameter, where the messageType parameter determines the icon to display.
static int | showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon) Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static String | showInternalInputDialog(Component parentComponent, Object message) Shows an internal question-message dialog requesting input from the user parented to parentComponent.
static String | showInternalInputDialog(Component parentComponent, Object message, String title, int messageType) Shows an internal dialog requesting input from the user parented to parentComponent with the dialog having the title title and message type messageType.
static Object | showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
static void | showInternalMessageDialog(Component parentComponent, Object message) Brings up an internal confirmation dialog panel.
static void | showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType) Brings up an internal dialog panel that displays a message using a default icon determined by the messageType parameter.
static void | showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) Brings up an internal dialog panel displaying a message, specifying all parameters.
static int | showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Brings up an internal dialog panel with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static void | showMessageDialog(Component parentComponent, Object message) Brings up a modal information-message dialog titled "Message".
static void | showMessageDialog(Component parentComponent, Object message, String title, int messageType) Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
static void | showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) Brings up a dialog displaying a message, specifying all parameters.
static int | showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
void | updateUI() Notification from the UIManager that the L&F has changed.

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree

Methods inherited from class java.awt.Component

action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

UNINITIALIZED_VALUE

public static final Object UNINITIALIZED_VALUE

Indicates that the user has not yet selected a value.

DEFAULT_OPTION

public static final int DEFAULT_OPTION

Type meaning Look and Feel should not supply any options -- only
 use the options from the JOptionPane.

YES_NO_OPTION

public static final int YES_NO_OPTION

Type used for showConfirmDialog.

YES_NO_CANCEL_OPTION

public static final int YES_NO_CANCEL_OPTION

Type used for showConfirmDialog.

OK_CANCEL_OPTION

public static final int OK_CANCEL_OPTION

Type used for showConfirmDialog.

YES_OPTION

public static final int YES_OPTION

Return value from class method if YES is chosen.

NO_OPTION

public static final int NO_OPTION

Return value from class method if NO is chosen.

CANCEL_OPTION

public static final int CANCEL_OPTION

Return value from class method if CANCEL is chosen.

OK_OPTION

public static final int OK_OPTION

Return value form class method if OK is chosen.

CLOSED_OPTION

public static final int CLOSED_OPTION

Return value from class method if user closes window without selecting
 anything, more than likely this should be treated as either a
 CANCEL_OPTION or NO_OPTION.

ERROR_MESSAGE

public static final int ERROR_MESSAGE

Used for error messages.

INFORMATION_MESSAGE

public static final int INFORMATION_MESSAGE

Used for information messages.

WARNING_MESSAGE

public static final int WARNING_MESSAGE

Used for warning messages.

QUESTION_MESSAGE

public static final int QUESTION_MESSAGE

Used for questions.

PLAIN_MESSAGE

public static final int PLAIN_MESSAGE

No icon is used.

ICON_PROPERTY

public static final String ICON_PROPERTY

Bound property name for icon.

MESSAGE_PROPERTY

public static final String MESSAGE_PROPERTY

Bound property name for message.

VALUE_PROPERTY

public static final String VALUE_PROPERTY

Bounds property name for value.

OPTIONS_PROPERTY

public static final String OPTIONS_PROPERTY

Bounds property namer for option.

INITIAL_VALUE_PROPERTY

public static final String INITIAL_VALUE_PROPERTY

Bounds property name for initialValue.

MESSAGE_TYPE_PROPERTY

public static final String MESSAGE_TYPE_PROPERTY

Bounds property name for type.

OPTION_TYPE_PROPERTY

public static final String OPTION_TYPE_PROPERTY

Bound property name for optionType.

SELECTION_VALUES_PROPERTY

public static final String SELECTION_VALUES_PROPERTY

Bound property name for selectionValues.

INITIAL_SELECTION_VALUE_PROPERTY

public static final String INITIAL_SELECTION_VALUE_PROPERTY

Bound property name for initialSelectionValue.

INPUT_VALUE_PROPERTY

public static final String INPUT_VALUE_PROPERTY

Bound property name for inputValue.

WANTS_INPUT_PROPERTY

public static final String WANTS_INPUT_PROPERTY

Bound property name for wantsInput.

icon

protected transient Icon icon

Icon used in pane.

message

protected transient Object message

Message to display.

options

protected transient Object[] options

Options to display to the user.

initialValue

protected transient Object initialValue

Value that should be initialy selected in options.

messageType

protected int messageType

Message type.

optionType

protected int optionType

Option type, one of DEFAULT_OPTION, YES_NO_OPTION,
 YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.

value

protected transient Object value

Currently selected value, will be a valid option, or
 UNINITIALIZED_VALUE or null.

selectionValues

protected transient Object[] selectionValues

Array of values the user can choose from. Look and feel will
 provide the UI component to choose this from.

inputValue

protected transient Object inputValue

Value the user has input.

initialSelectionValue

protected transient Object initialSelectionValue

Initial value to select in selectionValues.

wantsInput

protected boolean wantsInput

If true, a UI widget will be provided to the user to get input.

Constructor Detail

JOptionPane

public JOptionPane()

Creates a JOptionPane with a test message.

JOptionPane

public JOptionPane(Object message)

Creates a instance of JOptionPane to display a
 message using the
 plain-message message type and the default options delivered by
 the UI.

Parameters:
message - the Object to display

JOptionPane

public JOptionPane(Object message,
                   int messageType)

Creates an instance of JOptionPane to display a message
 with the specified message type and the default options,

Parameters:
message - the Object to display
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE

JOptionPane

public JOptionPane(Object message,
                   int messageType,
                   int optionType)

Creates an instance of JOptionPane to display a message
 with the specified message type and options.

Parameters:
message - the Object to display
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
optionType - the options to display in the pane:
                   DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
                   OK_CANCEL_OPTION

JOptionPane

public JOptionPane(Object message,
                   int messageType,
                   int optionType,
                   Icon icon)

Creates an instance of JOptionPane to display a message
 with the specified message type, options, and icon.

Parameters:
message - the Object to display
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
optionType - the options to display in the pane:
                   DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
                   OK_CANCEL_OPTION
icon - the Icon image to display

JOptionPane

public JOptionPane(Object message,
                   int messageType,
                   int optionType,
                   Icon icon,
                   Object[] options)

Creates an instance of JOptionPane to display a message
 with the specified message type, icon, and options.
 None of the options is initially selected.

 The options objects should contain either instances of
 Components, (which are added directly) or
 Strings (which are wrapped in a JButton).
 If you provide Components, you must ensure that when the
 Component is clicked it messages setValue
 in the created JOptionPane.

Parameters:
message - the Object to display
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
optionType - the options to display in the pane:
                   DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
                   OK_CANCEL_OPTION; only meaningful if the
                   options parameter is null
icon - the Icon image to display
options - the choices the user can select

JOptionPane

public JOptionPane(Object message,
                   int messageType,
                   int optionType,
                   Icon icon,
                   Object[] options,
                   Object initialValue)

Creates an instance of JOptionPane to display a message
 with the specified message type, icon, and options, with the
 initially-selected option specified.

Parameters:
message - the Object to display
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
optionType - the options to display in the pane:
                   DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
                   OK_CANCEL_OPTION; only meaningful if the
                   options parameter is null
icon - the Icon image to display
options - the choices the user can select
initialValue - the choice that is initially selected

Method Detail

showInputDialog

public static String showInputDialog(Object message)

Shows a question-message dialog requesting input from the user. The
 dialog uses the default frame, which usually means it is centered on
 the screen.

Parameters:
message - the Object to display

showInputDialog

public static String showInputDialog(Component parentComponent,
                                     Object message)

Shows a question-message dialog requesting input from the user
 parented to parentComponent.
 The dialog is displayed in the Component's
 frame, and is usually positioned below the Component.

Parameters:
parentComponent - the parent Component for the
        dialog
message - the Object to display

showInputDialog

public static String showInputDialog(Component parentComponent,
                                     Object message,
                                     String title,
                                     int messageType)

Shows a dialog requesting input from the user parented to
 parentComponent with the dialog having the title
 title and message type messageType.

Parameters:
parentComponent - the parent Component for the
            dialog
message - the Object to display
title - the String to display in the dialog
            title bar
messageType - the type of message that is to be displayed:
                 ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                 QUESTION_MESSAGE, or PLAIN_MESSAGE

showInputDialog

public static Object showInputDialog(Component parentComponent,
                                     Object message,
                                     String title,
                                     int messageType,
                                     Icon icon,
                                     Object[] selectionValues,
                                     Object initialSelectionValue)

Prompts the user for input in a blocking dialog where the
 initial selection, possible selections, and all other options can
 be specified. The user will able to choose from
 selectionValues, where null implies the
 user can input
 whatever they wish, usually by means of a JTextField.
 initialSelectionValue is the initial value to prompt
 the user with. It is up to the UI to decide how best to represent
 the selectionValues, but usually a
 JComboBox, JList, or
 JTextField will be used.

Parameters:
parentComponent - the parent Component for the
            dialog
message - the Object to display
title - the String to display in the
            dialog title bar
messageType - the type of message to be displayed:
                  ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                  QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the Icon image to display
selectionValues - an array of Objects that
            gives the possible selections
initialSelectionValue - the value used to initialize the input
                 field
Returns:
users input, or null meaning the user
            cancelled the input

showMessageDialog

public static void showMessageDialog(Component parentComponent,
                                     Object message)

Brings up a modal information-message dialog titled "Message".

Parameters:
parentComponent - determines the Frame in
        which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the Object to display

showMessageDialog

public static void showMessageDialog(Component parentComponent,
                                     Object message,
                                     String title,
                                     int messageType)

Brings up a dialog that displays a message using a default
 icon determined by the messageType parameter.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the Object to display
title - the title string for the dialog
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE

showMessageDialog

public static void showMessageDialog(Component parentComponent,
                                     Object message,
                                     String title,
                                     int messageType,
                                     Icon icon)

Brings up a dialog displaying a message, specifying all parameters.

Parameters:
parentComponent - determines the Frame in which the
            dialog is displayed; if null,
            or if the parentComponent has no
            Frame, a
                  default Frame is used
message - the Object to display
title - the title string for the dialog
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - an icon to display in the dialog that helps the user
                  identify the kind of message that is being displayed

showConfirmDialog

public static int showConfirmDialog(Component parentComponent,
                                    Object message)

Brings up a modal dialog with the options Yes, No and Cancel; with the
 title, "Select an Option".

Parameters:
parentComponent - determines the Frame in which the
            dialog is displayed; if null,
            or if the parentComponent has no
            Frame, a
                  default Frame is used
message - the Object to display
Returns:
an integer indicating the option selected by the user

showConfirmDialog

public static int showConfirmDialog(Component parentComponent,
                                    Object message,
                                    String title,
                                    int optionType)

Brings up a modal dialog where the number of choices is determined
 by the optionType parameter.

Parameters:
parentComponent - determines the Frame in which the
            dialog is displayed; if null,
            or if the parentComponent has no
            Frame, a
                  default Frame is used
message - the Object to display
title - the title string for the dialog
optionType - an int designating the options available on the dialog:
                   YES_NO_OPTION, or YES_NO_CANCEL_OPTION
Returns:
an int indicating the option selected by the user

showConfirmDialog

public static int showConfirmDialog(Component parentComponent,
                                    Object message,
                                    String title,
                                    int optionType,
                                    int messageType)

Brings up a modal dialog where the number of choices is determined
 by the optionType parameter, where the
 messageType
 parameter determines the icon to display.
 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame in
            which the dialog is displayed; if null,
            or if the parentComponent has no
            Frame, a
                  default Frame is used.
message - the Object to display
title - the title string for the dialog
optionType - an integer designating the options available
            on the dialog:
                  YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an integer designating the kind of message this is,
                  primarily used to determine the icon from the
            pluggable
                  Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
                  WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option selected by the user

showConfirmDialog

public static int showConfirmDialog(Component parentComponent,
                                    Object message,
                                    String title,
                                    int optionType,
                                    int messageType,
                                    Icon icon)

Brings up a modal dialog with a specified icon, where the number of
 choices is determined by the optionType parameter.
 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame in which the
            dialog is displayed; if null,
            or if the parentComponent has no
            Frame, a
            default Frame is used
message - The Object to display
title - the title string for the dialog
optionType - an int designating the options available on the dialog:
                   YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is,
                    primarily used to determine the icon from the pluggable
                    Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
                    WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the icon to display in the dialog
Returns:
an int indicating the option selected by the user

showOptionDialog

public static int showOptionDialog(Component parentComponent,
                                   Object message,
                                   String title,
                                   int optionType,
                                   int messageType,
                                   Icon icon,
                                   Object[] options,
                                   Object initialValue)

Brings up a modal dialog with a specified icon, where the initial
 choice is dermined by the initialValue parameter and
 the number of choices is determined by the optionType
 parameter.

 If optionType is YES_NO_OPTION, or YES_NO_CANCEL_OPTION
 and the options parameter is null,
 then the options are
 supplied by the Look and Feel.

 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame
            in which the dialog is displayed;  if
                  null, or if the
            parentComponent has no
            Frame, a
                  default Frame is used
message - the Object to display
title - the title string for the dialog
optionType - an integer designating the options available on the
            dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an integer designating the kind of message this is,
                  primarily used to determine the icon from the
            pluggable
                  Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
                  WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the icon to display in the dialog
options - an array of objects indicating the possible choices
                  the user can make; if the objects are components, they
                  are rendered properly; non-String
            objects are
                  rendered using their toString methods;
                  if this parameter is null,
            the options are determined by the Look and Feel.
initialValue - the object that represents the default selection
                     for the dialog
Returns:
an integer indicating the option chosen by the user,
         or CLOSED_OPTION if the user closed the Dialog

createDialog

public JDialog createDialog(Component parentComponent,
                            String title)

Creates and returns a new JDialog wrapping
 this centered on the parentComponent
 in the parentComponent's frame.
 title is the title of the returned dialog.
 The returned JDialog will be set up such that
 once it is closed, or the user clicks on the OK button,
 the dialog will be disposed and closed.

Parameters:
parentComponent - determines the frame in which the dialog
        is displayed; if the parentComponent has
        no Frame, a default Frame is used
title - the title string for the dialog
Returns:
a new JDialog containing this instance

showInternalMessageDialog

public static void showInternalMessageDialog(Component parentComponent,
                                             Object message)

Brings up an internal confirmation dialog panel. The dialog
 is a modal information-message dialog titled "Message".

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the object to display

showInternalMessageDialog

public static void showInternalMessageDialog(Component parentComponent,
                                             Object message,
                                             String title,
                                             int messageType)

Brings up an internal dialog panel that displays a message
 using a default icon determined by the messageType
 parameter.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the Object to display
title - the title string for the dialog
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE

showInternalMessageDialog

public static void showInternalMessageDialog(Component parentComponent,
                                             Object message,
                                             String title,
                                             int messageType,
                                             Icon icon)

Brings up an internal dialog panel displaying a message,
 specifying all parameters.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the Object to display
title - the title string for the dialog
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - an icon to display in the dialog that helps the user
                  identify the kind of message that is being displayed

showInternalConfirmDialog

public static int showInternalConfirmDialog(Component parentComponent,
                                            Object message)

Brings up an internal dialog panel with the options Yes, No
 and Cancel; with the title, "Select an Option".

Parameters:
parentComponent - determines the Frame in
        which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the Object to display
Returns:
an integer indicating the option selected by the user

showInternalConfirmDialog

public static int showInternalConfirmDialog(Component parentComponent,
                                            Object message,
                                            String title,
                                            int optionType)

Brings up a internal dialog panel where the number of choices
 is determined by the optionType parameter.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the object to display in the dialog; a
        Component object is rendered as a
        Component; a String
        object is rendered as a string; other objects
        are converted to a String using the
        toString method
title - the title string for the dialog
optionType - an integer designating the options
        available on the dialog: YES_NO_OPTION,
        or YES_NO_CANCEL_OPTION
Returns:
an integer indicating the option selected by the user

showInternalConfirmDialog

public static int showInternalConfirmDialog(Component parentComponent,
                                            Object message,
                                            String title,
                                            int optionType,
                                            int messageType)

Brings up an internal dialog panel where the number of choices
 is determined by the optionType parameter, where
 the messageType parameter determines the icon to display.
 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame in
        which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the object to display in the dialog; a
        Component object is rendered as a
        Component; a String
        object is rendered as a string; other objects are
        converted to a String using the
        toString method
title - the title string for the dialog
optionType - an integer designating the options
        available on the dialog:
        YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an integer designating the kind of message this is,
          primarily used to determine the icon from the
        pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
        WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option selected by the user

showInternalConfirmDialog

public static int showInternalConfirmDialog(Component parentComponent,
                                            Object message,
                                            String title,
                                            int optionType,
                                            int messageType,
                                            Icon icon)

Brings up an internal dialog panel with a specified icon, where
 the number of choices is determined by the optionType
 parameter.
 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no Frame, a
          default Frame is used
message - the object to display in the dialog; a
        Component object is rendered as a
        Component; a String
        object is rendered as a string; other objects are
        converted to a String using the
        toString method
title - the title string for the dialog
optionType - an integer designating the options available
        on the dialog:
          YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an integer designating the kind of message this is,
        primarily used to determine the icon from the pluggable
        Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
        WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the icon to display in the dialog
Returns:
an integer indicating the option selected by the user

showInternalOptionDialog

public static int showInternalOptionDialog(Component parentComponent,
                                           Object message,
                                           String title,
                                           int optionType,
                                           int messageType,
                                           Icon icon,
                                           Object[] options,
                                           Object initialValue)

Brings up an internal dialog panel with a specified icon, where
 the initial choice is dermined by the initialValue
 parameter and the number of choices is determined by the
 optionType parameter.

 If optionType is YES_NO_OPTION, or YES_NO_CANCEL_OPTION
 and the options parameter is null,
 then the options are supplied by the Look and Feel.

 The messageType parameter is primarily used to supply
 a default icon from the Look and Feel.

Parameters:
parentComponent - determines the Frame
        in which the dialog is displayed; if null,
        or if the parentComponent has no
        Frame, a default Frame is used
message - the object to display in the dialog; a
        Component object is rendered as a
        Component; a String
        object is rendered as a string. Other objects are
        converted to a String using the
        toString method
title - the title string for the dialog
optionType - an integer designating the options available
        on the dialog:
          YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an integer designating the kind of message this is,
        primarily used to determine the icon from the
        pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
          WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the icon to display in the dialog
options - an array of objects indicating the possible choices
          the user can make; if the objects are components, they
          are rendered properly; non-String
        objects are rendered using their toString
        methods; if this parameter is null,
        the options are determined by the Look and Feel
initialValue - the object that represents the default selection
                     for the dialog
Returns:
an integer indicating the option chosen by the user,
         or CLOSED_OPTION if the user closed the Dialog

showInternalInputDialog

public static String showInternalInputDialog(Component parentComponent,
                                             Object message)

Shows an internal question-message dialog requesting input from
 the user parented to  parentComponent. The dialog
 is displayed in the Component's frame,
 and is usually positioned below the Component.

Parameters:
parentComponent - the parent Component
        for the dialog
message - the Object to display

showInternalInputDialog

public static String showInternalInputDialog(Component parentComponent,
                                             Object message,
                                             String title,
                                             int messageType)

Shows an internal dialog requesting input from the user parented
 to parentComponent with the dialog having the title
 title and message type messageType.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the
        dialog title bar
messageType - the type of message that is to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE

showInternalInputDialog

public static Object showInternalInputDialog(Component parentComponent,
                                             Object message,
                                             String title,
                                             int messageType,
                                             Icon icon,
                                             Object[] selectionValues,
                                             Object initialSelectionValue)

Prompts the user for input in a blocking internal dialog where
 the initial selection, possible selections, and all other
 options can be specified. The user will able to choose from
 selectionValues, where null
 implies the user can input
 whatever they wish, usually by means of a JTextField.
 initialSelectionValue is the initial value to prompt
 the user with. It is up to the UI to decide how best to represent
 the selectionValues, but usually a
 JComboBox, JList, or
 JTextField will be used.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the dialog
        title bar
messageType - the type of message to be displayed:
                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                    QUESTION_MESSAGE, or PLAIN_MESSAGE
icon - the Icon image to display
selectionValues - an array of Objects that
        gives the possible selections
initialSelectionValue - the value used to initialize the input
                              field
Returns:
users input, or null meaning the user
        cancelled the input

createInternalFrame

public JInternalFrame createInternalFrame(Component parentComponent,
                                          String title)

Creates and returns an instance of JInternalFrame.
 The internal frame is created with the specified title,
 and wrapping the JOptionPane.
 The returned JInternalFrame is
 added to the JDesktopPane ancestor of
 parentComponent, or components
 parent if one its ancestors isn't a JDesktopPane,
 or if parentComponent
 doesn't have a parent then a RuntimeException is thrown.

Parameters:
parentComponent - the parent Component for
        the internal frame
title - the String to display in the
        frame's title bar
Returns:
a JInternalFrame containing a
        JOptionPane
Throws:
RuntimeException - if parentComponent does
        not have a valid parent

getFrameForComponent

public static Frame getFrameForComponent(Component parentComponent)

Returns the specified component's Frame.

Parameters:
parentComponent - the Component to check for a
        Frame
Returns:
the Frame that contains the component,
        or the default frame if the component is null,
        or does not have a valid Frame parent

getDesktopPaneForComponent

public static JDesktopPane getDesktopPaneForComponent(Component parentComponent)

Returns the specified component's desktop pane.

Parameters:
parentComponent - the Component to check for a
        desktop
Returns:
the JDesktopPane that contains the component,
        or null if the component is null
        or does not have an ancestor that is a
        JInternalFrame

setRootFrame

public static void setRootFrame(Frame newRootFrame)

Sets the frame to use for class methods in which a frame is
 not provided.

Parameters:
newRootFrame - the default Frame to use

getRootFrame

public static Frame getRootFrame()

Returns the Frame to use for the class methods in
 which a frame is not provided.

Returns:
the default Frame to use

setUI

public void setUI(OptionPaneUI ui)

Sets the UI object which implements the L&F for this component.

Parameters:
ui - the OptionPaneUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

getUI

public OptionPaneUI getUI()

Returns the UI object which implements the L&F for this component.

Returns:
the OptionPaneUI object

updateUI

public void updateUI()

Notification from the UIManager that the L&F has changed.
 Replaces the current UI object with the latest version from the
 UIManager.

Overrides:
updateUI in class JComponent

See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()

Returns the name of the UI class that implements the
 L&F for this component.

Overrides:
getUIClassID in class JComponent

Returns:
the string "OptionPaneUI"
See Also:
JComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)

setMessage

public void setMessage(Object newMessage)

Sets the option pane's message-object.

Parameters:
newMessage - the Object to display
See Also:
getMessage()

getMessage

public Object getMessage()

Returns the message-object this pane displays.

Returns:
the Object that is displayed
See Also:
setMessage(java.lang.Object)

setIcon

public void setIcon(Icon newIcon)

Sets the icon to display. If non-null, the Look and Feel
 does not provide an icon.

Parameters:
icon - the Icon to display
See Also:
getIcon()

getIcon

public Icon getIcon()

Returns the icon this pane displays.

Returns:
the Icon that is displayed
See Also:
setIcon(javax.swing.Icon)

setValue

public void setValue(Object newValue)

Sets the value the user has chosen.

Parameters:
newValue - the chosen value
See Also:
getValue()

getValue

public Object getValue()

Returns the value the user has selected. UNINITIALIZED_VALUE
 implies the user has not yet made a choice, null means the
 user closed the window with out choosing anything. Otherwise
 the returned value will be one of the options defined in this
 object.

Returns:
the Object chosen by the user, UNINITIALIZED_VALUE
         if the user has not yet made a choice, or null if
         the user closed the window without making a choice
See Also:
setValue(java.lang.Object)

setOptions

public void setOptions(Object[] newOptions)

Sets the options this pane displays. If an element in
 newOptions is a Component
 it is added directly to the pane,
 otherwise a button is created for the element.

Parameters:
newOptions - an array of Objects that create the
        buttons the user can click on, or arbitrary
        Components to add to the pane
See Also:
getOptions()

getOptions

public Object[] getOptions()

Returns the choices the user can make.

Returns:
the array of Objects that give the user's choices
See Also:
setOptions(java.lang.Object[])

setInitialValue

public void setInitialValue(Object newInitialValue)

Sets the initial value that is to be enabled -- the
 Component
 that has the focus when the pane is initially displayed.

Parameters:
newInitialValue - the Object that gets the initial
                         keyboard focus
See Also:
getInitialValue()

getInitialValue

public Object getInitialValue()

Returns the initial value.

Returns:
the Object that gets the initial keyboard focus
See Also:
setInitialValue(java.lang.Object)

setMessageType

public void setMessageType(int newType)

Sets the option pane's message type.
 The message type is used by the Look and Feel to determine the
 icon to display (if not supplied) as well as potentially how to
 lay out the parentComponent.

Parameters:
newType - an integer specifying the kind of message to display:
                ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
                QUESTION_MESSAGE, or PLAIN_MESSAGE
Throws:
RuntimeException - if newType is not one of the
        legal values listed above
See Also:
getMessageType()

getMessageType

public int getMessageType()

Returns the message type.

Returns:
an integer specifying the message type
See Also:
setMessageType(int)

setOptionType

public void setOptionType(int newType)

Sets the options to display.
 The option type is used by the Look and Feel to
 determine what buttons to show (unless options are supplied).

Parameters:
newType - an integer specifying the options the L&F is to display:
                DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION,
                or OK_CANCEL_OPTION
Throws:
RuntimeException - if newType is not one of
        the legal values listed above
See Also:
getOptionType(),
setOptions(java.lang.Object[])

getOptionType

public int getOptionType()

Returns the type of options that are displayed.

Returns:
an integer specifying the user-selectable options
See Also:
setOptionType(int)

setSelectionValues

public void setSelectionValues(Object[] newValues)

Sets the selection values for a pane that provides the user
 with a list of items to choose from. (The UI provides a widget
 for choosing one of the values.)

 Sets wantsInput to true. Use
 setInitialSelectionValue to specify the initially-chosen
 value. After the pane as been enabled, inputValue is
 set to the value the user has selected.

Parameters:
newValues - an array of Objects the user to be
            displayed
                  (usually in a list or combo-box) from which
                  the user can make a selection
See Also:
setWantsInput(boolean),
setInitialSelectionValue(java.lang.Object),
getSelectionValues()

getSelectionValues

public Object[] getSelectionValues()

Returns the selection values.

Parameters:
return - the array of Objects the user can select
See Also:
setSelectionValues(java.lang.Object[])

setInitialSelectionValue

public void setInitialSelectionValue(Object newValue)

Sets the initial selection value. Only used if wantsInput
 is true.

Parameters:
newValue - the initially selected value
See Also:
setSelectionValues(java.lang.Object[]),
getInitialSelectionValue()

getInitialSelectionValue

public Object getInitialSelectionValue()

Returns the initial-selection value.

Returns:
the initially selected value
See Also:
setInitialSelectionValue(java.lang.Object),
setSelectionValues(java.lang.Object[])

setInputValue

public void setInputValue(Object newValue)

Sets the user's input-value.

Parameters:
newValue - the Object used to initialized the
        value that the user specified (usually in a text field)
See Also:
setSelectionValues(java.lang.Object[]),
setWantsInput(boolean),
getInputValue()

getInputValue

public Object getInputValue()

Returns the value the user has input, if wantsInput
 is true.

Returns:
the Object the user specified,
        if it was one of the objects, or a
             String if it was a value typed into a
             field
See Also:
setSelectionValues(java.lang.Object[]),
setWantsInput(boolean),
setInputValue(java.lang.Object)

getMaxCharactersPerLineCount

public int getMaxCharactersPerLineCount()

Returns the maximum number of characters to place on a line in a
 message. Default is to return Integer.MAX_VALUE.
 The value can be
 changed by overriding this method in a subclass.

Returns:
an integer giving the maximum number of characters on a line

setWantsInput

public void setWantsInput(boolean newValue)

If newValue is true, a parentComponent
 is provided to
 allow the user to input a value. If getSelectionValues
 returns a non-null the input value is one of the
 objects in that
 array. Otherwise the input value is whatever the user inputs.

 This is a bound property.

See Also:
setSelectionValues(java.lang.Object[]),
setInputValue(java.lang.Object)

getWantsInput

public boolean getWantsInput()

Returns true if a parentComponent will be provided
 for the user to input.

Returns:
true if a parentComponent will be provided
See Also:
setWantsInput(boolean)

selectInitialValue

public void selectInitialValue()

Requests that the initial value be selected, which will set
 focus to the initial value. This method
 should be invoked after the window containing the option pane
 is made visible.

paramString

protected String paramString()

Returns a string representation of this JOptionPane.
 This method
 is intended to be used only for debugging purposes, and the
 content and format of the returned string may vary between
 implementations. The returned string may be empty but may not
 be null.

Overrides:
paramString in class JComponent

Returns:
a string representation of this JOptionPane

getAccessibleContext

public AccessibleContext getAccessibleContext()

Gets the AccessibleContext associated with this JOptionPane.
 For option panes, the AccessibleContext takes the form of an
 AccessibleJOptionPane.
 A new AccessibleJOptionPane instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent

Returns:
an AccessibleJOptionPane that serves as the
         AccessibleContext of this AccessibleJOptionPane

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Std. Ed. v1.3.1

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.


JPanel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
AbstractColorChooserPanel
public class JPanel
extends JComponent
implements Accessible

JPanel is a generic lightweight container. For examples and task-oriented documentation for JPanel, see How to Use Panels, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JPanel.AccessibleJPanel
This class implements accessibility support for the JPanel class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JPanel()
Create a new JPanel with a double buffer and a flow layout
JPanel(boolean isDoubleBuffered)
Create a new JPanel with FlowLayout and the specified buffering strategy.
JPanel(LayoutManager layout)
Create a new buffered JPanel with the specified layout manager
JPanel(LayoutManager layout, boolean isDoubleBuffered)
Creates a new JPanel with the specified layout manager and buffering strategy.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JPanel.
String | getUIClassID() Returns a string that specifies the name of the L&F class that renders this component.
protected String | paramString() Returns a string representation of this JPanel.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JPanel

public JPanel(LayoutManager layout,
              boolean isDoubleBuffered)
Creates a new JPanel with the specified layout manager and buffering strategy.
Parameters:
layout - the LayoutManager to use
isDoubleBuffered - a boolean, true for double-buffering, which uses additional memory space to achieve fast, flicker-free updates

JPanel

public JPanel(LayoutManager layout)
Create a new buffered JPanel with the specified layout manager
Parameters:
layout - the LayoutManager to use

JPanel

public JPanel(boolean isDoubleBuffered)
Create a new JPanel with FlowLayout and the specified buffering strategy. If isDoubleBuffered is true, the JPanel will use a double buffer.
Parameters:
layout - the LayoutManager to use
isDoubleBuffered - a boolean, true for double-buffering, which uses additional memory space to achieve fast, flicker-free updates

JPanel

public JPanel()
Create a new JPanel with a double buffer and a flow layout
Method Detail

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"PanelUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

paramString

protected String paramString()
Returns a string representation of this JPanel. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JPanel.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JPanel. For JPanels, the AccessibleContext takes the form of an AccessibleJPanel. A new AccessibleJPanel instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJPanel that serves as the AccessibleContext of this JPanel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JPasswordField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPasswordField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JTextField
                                |
                                +--javax.swing.JPasswordField
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable, SwingConstants
public class JPasswordField
extends JTextField

JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters. You can find further information and examples in How to Use Text Fields, a section in The Java Tutorial.

JPasswordField is intended to be source-compatible with java.awt.TextField used with echoChar set. It is provided seperately to make it easier to safely change the ui for the JTextField without affecting password entries.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JPasswordField key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JPasswordField.AccessibleJPasswordField
This class implements accessibility support for the JPasswordField class.
Inner classes inherited from class javax.swing.JTextField
JTextField.AccessibleJTextField
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JTextField
notifyAction
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JPasswordField()
Constructs a new JPasswordField, with a default document, null starting text string, and 0 column width.
JPasswordField(Document doc, String txt, int columns)
Constructs a new JPasswordField that uses the given text storage model and the given number of columns.
JPasswordField(int columns)
Constructs a new empty JPasswordField with the specified number of columns.
JPasswordField(String text)
Constructs a new JPasswordField initialized with the specified text.
JPasswordField(String text, int columns)
Constructs a new JPasswordField initialized with the specified text and columns.
Method Summary
 void copy()
Normally transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model.
 void cut()
Normally transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model.
 boolean echoCharIsSet()
Returns true if this JPasswordField has a character set for echoing.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JPasswordField.
 char getEchoChar()
Returns the character to be used for echoing.
 char[] getPassword()
Returns the text contained in this TextComponent.
 String getText()
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
 String getText(int offs, int len)
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
 String getUIClassID()
Returns the name of the L&F class that renders this component.
protected  String paramString()
Returns a string representation of this JPasswordField.
 void setEchoChar(char c)
Sets the echo character for this JPasswordField.
Methods inherited from class javax.swing.JTextField
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAction, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, isValidateRoot, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setFont, setHorizontalAlignment, setScrollOffset
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, fireCaretUpdate, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JPasswordField

public JPasswordField()
Constructs a new JPasswordField, with a default document, null starting text string, and 0 column width.

JPasswordField

public JPasswordField(String text)
Constructs a new JPasswordField initialized with the specified text. The document model is set to the default, and the number of columns to 0.
Parameters:
text - the text to be displayed, null if none

JPasswordField

public JPasswordField(int columns)
Constructs a new empty JPasswordField with the specified number of columns. A default model is created, and the initial string is set to null.
Parameters:
columns - the number of columns >= 0

JPasswordField

public JPasswordField(String text,
                      int columns)
Constructs a new JPasswordField initialized with the specified text and columns. The document model is set to the default.
Parameters:
text - the text to be displayed, null if none
columns - the number of columns >= 0

JPasswordField

public JPasswordField(Document doc,
                      String txt,
                      int columns)
Constructs a new JPasswordField that uses the given text storage model and the given number of columns. This is the constructor through which the other constructors feed. The echo character is set to '*'. If the document model is null, a default one will be created.
Parameters:
doc - the text storage to use
txt - the text to be displayed, null if none
columns - the number of columns to use to calculate the preferred width >= 0. If columns is set to zero, the preferred width will be whatever naturally results from the component implementation.
Method Detail

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JTextField
Returns:
"PasswordFieldUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getEchoChar

public char getEchoChar()
Returns the character to be used for echoing. The default is '*'.
Returns:
the echo character, 0 if unset
See Also:
setEchoChar(char), echoCharIsSet()

setEchoChar

public void setEchoChar(char c)
Sets the echo character for this JPasswordField. Note that this is largely a suggestion to the view as the view that gets installed can use whatever graphic techniques it desires to represent the field. Setting a value of 0 unsets the echo character.
Parameters:
c - the echo character to display
See Also:
echoCharIsSet(), getEchoChar()

echoCharIsSet

public boolean echoCharIsSet()
Returns true if this JPasswordField has a character set for echoing. A character is considered to be set if the echo character is not 0.
Returns:
true if a character is set for echoing
See Also:
setEchoChar(char), getEchoChar()

cut

public void cut()
Normally transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model. This is not a good thing for a password field and is reimplemented to simply beep.
Overrides:
cut in class JTextComponent

copy

public void copy()
Normally transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model. This is not a good thing for a password field and is reimplemented to simply beep.
Overrides:
copy in class JTextComponent

getText

public String getText()
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().

Returns the text contained in this TextComponent. If the underlying document is null, will give a NullPointerException.

For security reasons, this method is deprecated. Use the getPassword method instead.

Overrides:
getText in class JTextComponent
Returns:
the text

getText

public String getText(int offs,
                      int len)
               throws BadLocationException
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().

Fetches a portion of the text represented by the component. Returns an empty string if length is 0.

For security reasons, this method is deprecated. Use the getPassword method instead.

Overrides:
getText in class JTextComponent
Parameters:
offs - the offset >= 0
len - the length >= 0
Returns:
the text
Throws:
BadLocationException - if the offset or length are invalid

getPassword

public char[] getPassword()
Returns the text contained in this TextComponent. If the underlying document is null, will give a NullPointerException. For stronger security, it is recommended that the returned character array be cleared after use by setting each character to zero.
Returns:
the text

paramString

protected String paramString()
Returns a string representation of this JPasswordField. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JTextField
Returns:
a string representation of this JPasswordField.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JPasswordField. For password fields, the AccessibleContext takes the form of an AccessibleJPasswordField. A new AccessibleJPasswordField instance is created if necessary.
Overrides:
getAccessibleContext in class JTextField
Returns:
an AccessibleJPasswordField that serves as the AccessibleContext of this JPasswordField
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JPopupMenu

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPopupMenu

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPopupMenu
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, MenuElement, Serializable
Direct Known Subclasses:
BasicComboPopup
public class JPopupMenu
extends JComponent
implements Accessible, MenuElement

An implementation of a popup menu -- a small window that pops up and displays a series of choices. A JPopupMenu is used for the menu that appears when the user selects an item on the menu bar. It is also used for "pull-right" menu that appears when the selects a menu item that activates it. Finally, a JPopupMenu can also be used anywhere else you want a menu to appear. For example, when the user right-clicks in a specified area.

For information and examples of using popup menus, see How to Use Menus in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JPopupMenu key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JPopupMenu.AccessibleJPopupMenu This class implements accessibility support for the JPopupMenu class.
static class | JPopupMenu.Separator A popup menu-specific separator.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JPopupMenu()
Constructs a JPopupMenu without an "invoker".
JPopupMenu(String label)
Constructs a JPopupMenu with the specified title.
Method Summary
JMenuItem | add(Action a) Appends a new menu item to the end of the menu which dispatches the specified Action object.
JMenuItem | add(JMenuItem menuItem) Appends the specified menu item to the end of this menu.
JMenuItem | add(String s) Creates a new menu item with the specified text and appends it to the end of this menu.
void | addPopupMenuListener(PopupMenuListener l) Adds a PopupMenu listener.
void | addSeparator() Appends a new separator at the end of the menu.
protected PropertyChangeListener | createActionChangeListener(JMenuItem b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
protected JMenuItem | createActionComponent(Action a) Factory method which creates the JMenuItem for Actions added to the JPopupMenu.
protected void | firePopupMenuCanceled() Notifies PopupMenuListeners that this popup menu is cancelled.
protected void | firePopupMenuWillBecomeInvisible() Notifies PopupMenuListeners that this popup menu will become invisible.
protected void | firePopupMenuWillBecomeVisible() Notifies PopupMenuListeners that this popup menu will become visible.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JPopupMenu.
Component | getComponent() Returns this JPopupMenu component.
Component | getComponentAtIndex(int i) Deprecated. replaced by getComponent(int i)
int | getComponentIndex(Component c) Returns the index of the specified component.
static boolean | getDefaultLightWeightPopupEnabled() Returns true if this is a light weight popup component, false otherwise.
Component | getInvoker() Returns the component which is the 'invoker' of this popup menu.
String | getLabel() Returns the popup menu's label
Insets | getMargin() Returns the margin, in pixels, between the popup menu's border and its containees.
SingleSelectionModel | getSelectionModel() Returns the model object that handles single selections.
MenuElement[] | getSubElements() Returns an array of MenuElements containing the submenu for this menu component.
PopupMenuUI | getUI() Returns the look and feel (L&F) object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
void | insert(Action a, int index) Inserts a menu item for the specified Action object at a given position.
void | insert(Component component, int index) Inserts the specified component into the menu at a given position.
boolean | isBorderPainted() Checks whether the border should be painted.
boolean | isLightWeightPopupEnabled() Returns true if light weight (all-Java) popups are in use, or false if heavy weight (native peer) popups are being used.
boolean | isPopupTrigger(MouseEvent e) Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
boolean | isVisible() Returns true if the popup menu is visible (currently being displayed).
void | menuSelectionChanged(boolean isIncluded) Messaged when the menubar selection changes to activate or deactivate this menu.
void | pack() Lays out the container so that it uses the minimum space needed to display its contents.
protected void | paintBorder(Graphics g) Paints the popup menu's border if BorderPainted property is true.
protected String | paramString() Returns a string representation of this JPopupMenu.
void | processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) This method is required to conform to the MenuElement interface, but it not implemented.
void | remove(int pos) Removes the component at the specified index from this popup menu.
void | removePopupMenuListener(PopupMenuListener l) Removes a PopupMenu listener.
void | setBorderPainted(boolean b) Sets whether the border should be painted.
static void | setDefaultLightWeightPopupEnabled(boolean aFlag) Sets the default value for the lightWeightPopupEnabled property.
void | setInvoker(Component invoker) Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
void | setLabel(String label) Sets the popup menu's label.
void | setLightWeightPopupEnabled(boolean aFlag) When displaying the popup, JPopupMenu chooses to use a light weight popup if it fits.
void | setLocation(int x, int y) Sets the location of the upper left corner of the popup menu using x, y coordinates.
void | setPopupSize(Dimension d) Sets the size of the Popup window using a Dimension object.
void | setPopupSize(int width, int height) Sets the size of the Popup window to the specified width and height.
void | setSelected(Component sel) Sets the currently selected component, This will result in a change to the selection model.
void | setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.
void | setUI(PopupMenuUI ui) Sets the L&F object that renders this component.
void | setVisible(boolean b) Sets the visibility of the popup menu.
void | show(Component invoker, int x, int y) Displays the popup menu at the position x,y in the coordinate space of the component invoker.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JPopupMenu

public JPopupMenu()
Constructs a JPopupMenu without an "invoker".

JPopupMenu

public JPopupMenu(String label)
Constructs a JPopupMenu with the specified title.
Parameters:
label - the string that a UI may use to display as a title for the popup menu.
Method Detail

setDefaultLightWeightPopupEnabled

public static void setDefaultLightWeightPopupEnabled(boolean aFlag)
Sets the default value for the lightWeightPopupEnabled property. Lightweight popup windows are more efficient than heavy weight windows, but light weight and heavy weight components do not mix well in a GUI, and in that situation a heavy weight may be required.
Parameters:
aFlag - true if the popup is to be light weight, otherwise false
See Also:
getDefaultLightWeightPopupEnabled()

getDefaultLightWeightPopupEnabled

public static boolean getDefaultLightWeightPopupEnabled()
Returns true if this is a light weight popup component, false otherwise.
Returns:
the lightWeightPopupEnabled property
See Also:
setDefaultLightWeightPopupEnabled(boolean)

getUI

public PopupMenuUI getUI()
Returns the look and feel (L&F) object that renders this component.
Returns:
the PopupMenuUI object that renders this component

setUI

public void setUI(PopupMenuUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the new PopupMenuUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "PopupMenuUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getSelectionModel

public SingleSelectionModel getSelectionModel()
Returns the model object that handles single selections.
Returns:
the selectionModel property
See Also:
SingleSelectionModel

setSelectionModel

public void setSelectionModel(SingleSelectionModel model)
Sets the model object to handle single selections.
Parameters:
model - the new SingleSelectionModel
See Also:
SingleSelectionModel

add

public JMenuItem add(JMenuItem menuItem)
Appends the specified menu item to the end of this menu.
Parameters:
c - the JMenuItem to add
Returns:
the JMenuItem added

add

public JMenuItem add(String s)
Creates a new menu item with the specified text and appends it to the end of this menu.
Parameters:
s - the string for the menu item to be added

add

public JMenuItem add(Action a)
Appends a new menu item to the end of the menu which dispatches the specified Action object. As of JDK 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.
Parameters:
a - the Action to add to the menu
Returns:
the new menu item
See Also:
Action

createActionComponent

protected JMenuItem createActionComponent(Action a)
Factory method which creates the JMenuItem for Actions added to the JPopupMenu. As of JDK 1.3, this is no longer the preferred method, instead it is recommended to configure a control with an action using setAction, and then adding that control directly to the Container.
Parameters:
a - the Action for the menu item to be added
Returns:
the new menu item
See Also:
Action

createActionChangeListener

protected PropertyChangeListener createActionChangeListener(JMenuItem b)
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur. As of JDK 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

remove

public void remove(int pos)
Removes the component at the specified index from this popup menu.
Overrides:
remove in class Container
Parameters:
pos - the position of the item to be removed
Throws:
IllegalArgumentException - if the value of pos <0, or="or" if="if" the="the" value="value" of="of" pos is greater than the number of items

setLightWeightPopupEnabled

public void setLightWeightPopupEnabled(boolean aFlag)
When displaying the popup, JPopupMenu chooses to use a light weight popup if it fits. This method allows you to disable this feature. You have to do disable it if your application mixes light weight and heavy weights components.
Parameters:
aFlag - true if the popup is to be light weight, otherwise false

isLightWeightPopupEnabled

public boolean isLightWeightPopupEnabled()
Returns true if light weight (all-Java) popups are in use, or false if heavy weight (native peer) popups are being used.
Returns:
true if light weight popups are in use, false otherwise

getLabel

public String getLabel()
Returns the popup menu's label
Returns:
a string containing the popup menu's label
See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String label)
Sets the popup menu's label. Different look and feels may choose to display or not display this.
Parameters:
label - a string specifying the label for the popup menu
See Also:
setLabel(java.lang.String)

addSeparator

public void addSeparator()
Appends a new separator at the end of the menu.

insert

public void insert(Action a,
                   int index)
Inserts a menu item for the specified Action object at a given position.
Parameters:
a - the Action object to insert
index - specifies the position at which to insert the Action, where 0 is the first
See Also:
Action

insert

public void insert(Component component,
                   int index)
Inserts the specified component into the menu at a given position.
Parameters:
component - the Component to insert
index - specifies the position at which to insert the component, where 0 is the first
Throws:
IllegalArgumentException - if index <0< /DL="/DL">

addPopupMenuListener

public void addPopupMenuListener(PopupMenuListener l)
Adds a PopupMenu listener.
Parameters:
l - the PopupMenuListener to add

removePopupMenuListener

public void removePopupMenuListener(PopupMenuListener l)
Removes a PopupMenu listener.
Parameters:
l - the PopupMenuListener to remove

firePopupMenuWillBecomeVisible

protected void firePopupMenuWillBecomeVisible()
Notifies PopupMenuListeners that this popup menu will become visible.

firePopupMenuWillBecomeInvisible

protected void firePopupMenuWillBecomeInvisible()
Notifies PopupMenuListeners that this popup menu will become invisible.

firePopupMenuCanceled

protected void firePopupMenuCanceled()
Notifies PopupMenuListeners that this popup menu is cancelled.

pack

public void pack()
Lays out the container so that it uses the minimum space needed to display its contents.

setVisible

public void setVisible(boolean b)
Sets the visibility of the popup menu.
Overrides:
setVisible in class JComponent
Parameters:
b - true to make the popup visible, or false to hide it

isVisible

public boolean isVisible()
Returns true if the popup menu is visible (currently being displayed).
Overrides:
isVisible in class Component
Following copied from class: java.awt.Component
Returns:
true if the component is visible; false otherwise.
See Also:
Component.setVisible(boolean)

setLocation

public void setLocation(int x,
                        int y)
Sets the location of the upper left corner of the popup menu using x, y coordinates.
Overrides:
setLocation in class Component
Parameters:
x - the x coordinate of the popup's new position
y - the y coordinate of the popup's new position

getInvoker

public Component getInvoker()
Returns the component which is the 'invoker' of this popup menu.
Returns:
the Component in which the popup menu is displayed

setInvoker

public void setInvoker(Component invoker)
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
Parameters:
invoker - the Component in which the popup menu is displayed

show

public void show(Component invoker,
                 int x,
                 int y)
Displays the popup menu at the position x,y in the coordinate space of the component invoker.
Parameters:
invoker - the component in whose space the popup menu is to appear
x - the x coordinate in invoker's coordinate space at which the popup menu is to be displayed
y - the y coordinate in invoker's coordinate space at which the popup menu is to be displayed

getComponentAtIndex

public Component getComponentAtIndex(int i)
Deprecated. replaced by getComponent(int i)

Returns the component at the specified index.
Parameters:
i - the index of the component, where 0 is the first
Returns:
the Component at that index

getComponentIndex

public int getComponentIndex(Component c)
Returns the index of the specified component.
Parameters:
the - Component to find
Returns:
the index of the component, where 0 is the first; or -1 if the component is not found

setPopupSize

public void setPopupSize(Dimension d)
Sets the size of the Popup window using a Dimension object.
Parameters:
d - the Dimension specifying the new size of this component.

setPopupSize

public void setPopupSize(int width,
                         int height)
Sets the size of the Popup window to the specified width and height.
Parameters:
width - the new width of the Popup in pixels
height - the new height of the Popup in pixels

setSelected

public void setSelected(Component sel)
Sets the currently selected component, This will result in a change to the selection model.
Parameters:
sel - the Component to select

isBorderPainted

public boolean isBorderPainted()
Checks whether the border should be painted.
Returns:
true if the border is painted, false otherwise
See Also:
setBorderPainted(boolean)

setBorderPainted

public void setBorderPainted(boolean b)
Sets whether the border should be painted.
Parameters:
b - if true, the border is painted.
See Also:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics g)
Paints the popup menu's border if BorderPainted property is true.
Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics object
See Also:
JComponent.paint(java.awt.Graphics), JComponent.setBorder(javax.swing.border.Border)

getMargin

public Insets getMargin()
Returns the margin, in pixels, between the popup menu's border and its containees.
Returns:
an Insets object containing the margin values.

paramString

protected String paramString()
Returns a string representation of this JPopupMenu. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JPopupMenu.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JPopupMenu. For JPopupMenus, the AccessibleContext takes the form of an AccessibleJPopupMenu. A new AccessibleJPopupMenu instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJPopupMenu that serves as the AccessibleContext of this JPopupMenu

processMouseEvent

public void processMouseEvent(MouseEvent event,
                              MenuElement[] path,
                              MenuSelectionManager manager)
This method is required to conform to the MenuElement interface, but it not implemented.
Specified by:
processMouseEvent in interface MenuElement
See Also:
MenuElement.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager)

processKeyEvent

public void processKeyEvent(KeyEvent e,
                            MenuElement[] path,
                            MenuSelectionManager manager)
This method is required to conform to the MenuElement interface, but it not implemented.
Specified by:
processKeyEvent in interface MenuElement
See Also:
MenuElement.processKeyEvent(KeyEvent, MenuElement[], MenuSelectionManager)

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
Messaged when the menubar selection changes to activate or deactivate this menu. This implements the javax.swing.MenuElement interface. Overrides MenuElement.menuSelectionChanged.
Specified by:
menuSelectionChanged in interface MenuElement
Parameters:
isIncluded - true if this menu is active, false if it is not
See Also:
MenuElement.menuSelectionChanged(boolean)

getSubElements

public MenuElement[] getSubElements()
Returns an array of MenuElements containing the submenu for this menu component. It will only return items conforming to the JMenuElement interface. If popup menu is null returns an empty array. This method is required to conform to the MenuElement interface.
Specified by:
getSubElements in interface MenuElement
Returns:
an array of MenuElement objects
See Also:
MenuElement.getSubElements()

getComponent

public Component getComponent()
Returns this JPopupMenu component.
Specified by:
getComponent in interface MenuElement
Returns:
this JPopupMenu object
See Also:
MenuElement.getComponent()

isPopupTrigger

public boolean isPopupTrigger(MouseEvent e)
Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
Returns:
true if the mouse event is a popup trigger
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JProgressBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JProgressBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JProgressBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
public class JProgressBar
extends JComponent
implements SwingConstants, Accessible

A component that displays an integer value within a bounded interval. A progress bar typically communicates the progress of an event by displaying its percentage of completion and possibly a textual display of this percentage.

For further documentation and examples see How to Monitor Progress, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JProgressBar.AccessibleJProgressBar
This class implements accessibility support for the JProgressBar class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.
protected ChangeListener | changeListener
protected BoundedRangeModel | model The data structure that holds the various values for the progress bar.
protected int | orientation The orientation to display the progress bar.
protected boolean | paintBorder Whether to display the border around the progress bar.
protected boolean | paintString Whether to textually display a String on the progress bar.
protected String | progressString A optional String that can be displayed on the progress bar.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JProgressBar()
Creates a horizontal progress bar.
JProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar, the default orientation.
JProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be either JProgressBar.VERTICAL or JProgressBar.HORIZONTAL.
JProgressBar(int min, int max)
Creates a horizontal progress bar, which is the default.
JProgressBar(int orient, int min, int max)
Creates a progress bar using the specified orientation, minimum, and maximum.
Method Summary
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
protected ChangeListener | createChangeListener()
protected void | fireStateChanged() Notify all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JProgressBar.
int | getMaximum() Returns the model's maximum value.
int | getMinimum() Returns the model's minimum value.
BoundedRangeModel | getModel() Returns the data model used by the JProgressBar.
int | getOrientation() Returns JProgressBar.VERTICAL or JProgressBar.HORIZONTAL, depending on the orientation of the progress bar.
double | getPercentComplete() Returns the percentage/percent complete for the progress bar.
String | getString() Returns the current value of the Progress String.
ProgressBarUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
int | getValue() Returns the model's current value.
boolean | isBorderPainted() Returns true if the progress bar has a border or false if it does not.
boolean | isStringPainted() Returns true if the progress bar will render a string onto the representation of the progress bar.
protected void | paintBorder(Graphics g) Paint the progress bar's border if BorderPainted property is true.
protected String | paramString() Returns a string representation of this JProgressBar.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | setBorderPainted(boolean b) Sets whether the progress bar should paint its border.
void | setMaximum(int n) Sets the model's maximum to x.
void | setMinimum(int n) Sets the model's minimum to x.
void | setModel(BoundedRangeModel newModel) Sets the data model used by the JProgressBar.
void | setOrientation(int newOrientation) Sets the progress bar's orientation to newOrientation, which must be JProgressBar.VERTICAL or JProgressBar.HORIZONTAL.
void | setString(String s) Sets the value of the Progress String.
void | setStringPainted(boolean b) Sets whether the progress bar will render a string.
void | setUI(ProgressBarUI ui) Sets the L&F object that renders this component.
void | setValue(int n) Sets the model's current value to x.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

orientation

protected int orientation
The orientation to display the progress bar. The default is HORIZONTAL.

paintBorder

protected boolean paintBorder
Whether to display the border around the progress bar. The default is true.

model

protected BoundedRangeModel model
The data structure that holds the various values for the progress bar.

progressString

protected String progressString
A optional String that can be displayed on the progress bar. The default is null. Setting this to a non-null value does not imply that the String will be displayed.

paintString

protected boolean paintString
Whether to textually display a String on the progress bar. The default is false. Setting this to true will cause a textual display of the progress to de rendered on the progress bar. If the progressString is null, the percentage done to be displayed on the progress bar. If the progressString is non-null, it is rendered on the progress bar.

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.

changeListener

protected ChangeListener changeListener
Constructor Detail

JProgressBar

public JProgressBar()
Creates a horizontal progress bar. The default orientation for progress bars is JProgressBar.HORIZONTAL. By default, the String is set to null and the StringPainted is not painted. The border is painted by default. Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.

JProgressBar

public JProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be either JProgressBar.VERTICAL or JProgressBar.HORIZONTAL. By default, the String is set to null and the StringPainted is not painted. The border is painted by default. Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.

JProgressBar

public JProgressBar(int min,
                    int max)
Creates a horizontal progress bar, which is the default. By default, the String is set to null and the StringPainted is not painted. The border is painted by default. Uses the specified minimum and maximum. Uses the specified minimum for the initial value of the progress bar.

JProgressBar

public JProgressBar(int orient,
                    int min,
                    int max)
Creates a progress bar using the specified orientation, minimum, and maximum. By default, the String is set to null and the StringPainted is not painted. The border is painted by default. Sets the inital value of the progress bar to the specified minimum. The BoundedRangeModel that sits underneath the progress bar handles any issues that may arrise from improperly setting the minimum, value, and maximum on the progress bar.
See Also:
BoundedRangeModel, setOrientation(int), setBorderPainted(boolean), setStringPainted(boolean), setString(java.lang.String)

JProgressBar

public JProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar, the default orientation. By default, the String is set to null and the StringPainted is not painted. The border is painted by default. Uses the specified BoundedRangeModel which holds the minimum, value, and maximum.
See Also:
BoundedRangeModel, setOrientation(int), setBorderPainted(boolean), setStringPainted(boolean), setString(java.lang.String)
Method Detail

getOrientation

public int getOrientation()
Returns JProgressBar.VERTICAL or JProgressBar.HORIZONTAL, depending on the orientation of the progress bar. The default orientation is HORIZONTAL.
Returns:
HORIZONTAL or VERTICAL
See Also:
setOrientation(int)

setOrientation

public void setOrientation(int newOrientation)
Sets the progress bar's orientation to newOrientation, which must be JProgressBar.VERTICAL or JProgressBar.HORIZONTAL. The default orientation is HORIZONTAL.
Parameters:
newOrientation - HORIZONTAL or VERTICAL
Throws:
IllegalArgumentException - if newOrientation is an illegal value
See Also:
getOrientation()

isStringPainted

public boolean isStringPainted()
Returns true if the progress bar will render a string onto the representation of the progress bar. Returns false if it will not do this rendering. The default is false - the progress bar does not draw the string by default.
Returns:
whether the progress bar renders a string
See Also:
setStringPainted(boolean), setString(java.lang.String)

setStringPainted

public void setStringPainted(boolean b)
Sets whether the progress bar will render a string.
Parameters:
b - true if the progress bar will render a string.
See Also:
isStringPainted()

getString

public String getString()
Returns the current value of the Progress String. If you are providing a custom Progress String via this method, you will want to ensure that you call setString() before you call getString();
Returns:
the value of the percent string
See Also:
setString(java.lang.String)

setString

public void setString(String s)
Sets the value of the Progress String. By default, this String is set to null. If you are providing a custom Progress String via this method, you will want to ensure that you call setString() before you call getString(). If you have provided a custom String and want to revert to the built-in behavior, set the String back to null.
Parameters:
s - the value of the percent string
See Also:
getString()

getPercentComplete

public double getPercentComplete()
Returns the percentage/percent complete for the progress bar. Note that, as a double, this number is between 0.00 and 1.00.
Returns:
the percent complete for this progress bar.

isBorderPainted

public boolean isBorderPainted()
Returns true if the progress bar has a border or false if it does not. By default, this is true - the progress bar paints it's border.
Returns:
whether the progress bar paints its border
See Also:
setBorderPainted(boolean)

setBorderPainted

public void setBorderPainted(boolean b)
Sets whether the progress bar should paint its border. By default, this is true - paint the border.
Parameters:
b - true if the progress bar paints its border
See Also:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics g)
Paint the progress bar's border if BorderPainted property is true.
Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics context within which to paint the border
See Also:
JComponent.paint(java.awt.Graphics),
JComponent.setBorder(javax.swing.border.Border),
isBorderPainted(),
setBorderPainted(boolean)

getUI

public ProgressBarUI getUI()
Returns the L&F object that renders this component.
Returns:
the ProgressBarUI object that renders this component

setUI

public void setUI(ProgressBarUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ProgressBarUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"ProgressBarUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createChangeListener

protected ChangeListener createChangeListener()

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Parameters:
l - the ChangeListener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Parameters:
l - the ChangeListener to remove

fireStateChanged

protected void fireStateChanged()
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
See Also:
EventListenerList

getModel

public BoundedRangeModel getModel()
Returns the data model used by the JProgressBar.
Returns:
the BoundedRangeModel currently in use
See Also:
BoundedRangeModel

setModel

public void setModel(BoundedRangeModel newModel)
Sets the data model used by the JProgressBar.
Parameters:
newModel - the BoundedRangeModel to use
See Also:
BoundedRangeModel

getValue

public int getValue()
Returns the model's current value. The value is always between the model's minimum and maximum values, inclusive. By default, the value equals the minimum.
Returns:
the value
See Also:
setValue(int), BoundedRangeModel

getMinimum

public int getMinimum()
Returns the model's minimum value. By default, this is 0.
Returns:
an int -- the model's minimum
See Also:
setMinimum(int), BoundedRangeModel

getMaximum

public int getMaximum()
Returns the model's maximum value. By default, this is 100.
Returns:
an int -- the model's maximum
See Also:
setMaximum(int), BoundedRangeModel

setValue

public void setValue(int n)
Sets the model's current value to x. The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.
Parameters:
x - the new value
See Also:
getValue(), BoundedRangeModel.setValue(int)

setMinimum

public void setMinimum(int n)
Sets the model's minimum to x. The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.

Notifies any listeners if the data changes.

Parameters:
x - the new minimum
See Also:
getMinimum(), addChangeListener(javax.swing.event.ChangeListener), BoundedRangeModel

setMaximum

public void setMaximum(int n)
Sets the model's maximum to x. The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.

Notifies any listeners if the data changes.

Parameters:
x - the new maximum
See Also:
getMaximum(), addChangeListener(javax.swing.event.ChangeListener), BoundedRangeModel

paramString

protected String paramString()
Returns a string representation of this JProgressBar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JProgressBar.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JProgressBar. For progress bars, the AccessibleContext takes the form of an AccessibleJProgressBar. A new AccessibleJProgressBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJProgressBar that serves as the AccessibleContext of this JProgressBar
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JRadioButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRadioButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JToggleButton
                                |
                                +--javax.swing.JRadioButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
public class JRadioButton
extends JToggleButton
implements Accessible

An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user. Used with a ButtonGroup object to create a group of buttons in which only one button at a time can be selected. (Create a ButtonGroup object and use its add method to include the JRadioButton objects in the group.)

Note: The ButtonGroup object is a logical grouping -- not a physical grouping. Tocreate a button panel, you should still create a JPanel or similar container-object and add a Border to it to set it off from surrounding components.

See How to Use Buttons, Check Boxes, and Radio Buttons in The Java Tutorial for further documentation.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JRadioButton key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
ButtonGroup, JCheckBox, Serialized Form

Inner Class Summary
protected  class JRadioButton.AccessibleJRadioButton
This class implements accessibility support for the JRadioButton class.
Inner classes inherited from class javax.swing.JToggleButton
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JRadioButton()
Creates an initially unselected radio button with no set text.
JRadioButton(Action a)
Creates a radiobutton where properties are taken from the Action supplied.
JRadioButton(Icon icon)
Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Icon icon, boolean selected)
Creates a radio button with the specified image and selection state, but no text.
JRadioButton(String text)
Creates an unselected radio button with the specified text.
JRadioButton(String text, boolean selected)
Creates a radio button with the specified text and selection state.
JRadioButton(String text, Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String text, Icon icon, boolean selected)
Creates a radio button that has the specified text, image, and selection state.
Method Summary
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JRadioButton.
String | getUIClassID() Returns the name of the L&F class that renders this component.
protected String | paramString() Returns a string representation of this JRadioButton.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JRadioButton

public JRadioButton()
Creates an initially unselected radio button with no set text.

JRadioButton

public JRadioButton(Icon icon)
Creates an initially unselected radio button with the specified image but no text.
Parameters:
icon - the image that the button should display

JRadioButton

public JRadioButton(Action a)
Creates a radiobutton where properties are taken from the Action supplied.
Since:
1.3

JRadioButton

public JRadioButton(Icon icon,
                    boolean selected)
Creates a radio button with the specified image and selection state, but no text.
Parameters:
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JRadioButton

public JRadioButton(String text)
Creates an unselected radio button with the specified text.
Parameters:
text - the string displayed on the radio button

JRadioButton

public JRadioButton(String text,
                    boolean selected)
Creates a radio button with the specified text and selection state.
Parameters:
text - the string displayed on the radio button
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JRadioButton

public JRadioButton(String text,
                    Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected.
Parameters:
text - the string displayed on the radio button
icon - the image that the button should display

JRadioButton

public JRadioButton(String text,
                    Icon icon,
                    boolean selected)
Creates a radio button that has the specified text, image, and selection state.
Parameters:
text - the string displayed on the radio button
icon - the image that the button should display
Method Detail

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JToggleButton
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JToggleButton
Returns:
String "RadioButtonUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Text, Icon Enabled, and ToolTipText.
Overrides:
configurePropertiesFromAction in class AbstractButton
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Icon, Enabled, ToolTipText). Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.
Overrides:
createActionPropertyChangeListener in class AbstractButton
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)

paramString

protected String paramString()
Returns a string representation of this JRadioButton. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JToggleButton
Returns:
a string representation of this JRadioButton.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JRadioButton. For JRadioButtons, the AccessibleContext takes the form of an AccessibleJRadioButton. A new AccessibleJRadioButton instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JToggleButton
Returns:
an AccessibleJRadioButton that serves as the AccessibleContext of this JRadioButton
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JRadioButtonMenuItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRadioButtonMenuItem

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JMenuItem
                                |
                                +--javax.swing.JRadioButtonMenuItem
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants
public class JRadioButtonMenuItem
extends JMenuItem
implements Accessible

An implementation of a radio button menu item. A JRadioButtonMenuItem is a menu item that is part of a group of menu items in which only one item in the group can be selected. The selected item displays its selected state. Selecting it causes any other selected item to switch to the unselected state. To control the selected state of a group of radio button menu items, use a ButtonGroup object.

For further documentation and examples see How to Use Menus, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JRadioButtonMenuItem key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
ButtonGroup, Serialized Form

Inner Class Summary
protected  class JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
This class implements accessibility support for the JRadioButtonMenuItem class.
Inner classes inherited from class javax.swing.JMenuItem
JMenuItem.AccessibleJMenuItem
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JRadioButtonMenuItem()
Creates a JRadioButtonMenuItem with no set text or icon.
JRadioButtonMenuItem(Action a)
Creates a radio button menu item whose properties are taken from the Action supplied.
JRadioButtonMenuItem(Icon icon)
Creates a JRadioButtonMenuItem with an icon.
JRadioButtonMenuItem(Icon icon, boolean selected)
Creates a radio button menu item with the specified image and selection state, but no text.
JRadioButtonMenuItem(String text)
Creates a JRadioButtonMenuItem with text.
JRadioButtonMenuItem(String text, boolean selected)
Creates a radio button menu item with the specified text and selection state.
JRadioButtonMenuItem(String text, Icon icon)
Creates a radio button menu item with the specified text and Icon.
JRadioButtonMenuItem(String text, Icon icon, boolean selected)
Creates a radio button menu item that has the specified text, image, and selection state.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JRadioButtonMenuItem.
String | getUIClassID() Returns the name of the L&F class that renders this component.
protected String | paramString() Returns a string representation of this JRadioButtonMenuItem.
void | requestFocus() Overrides Component.requestFocus to not grab focus.
Methods inherited from class javax.swing.JMenuItem
addMenuDragMouseListener, addMenuKeyListener, configurePropertiesFromAction, createActionPropertyChangeListener, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, getComponent, getSubElements, init, isArmed, menuSelectionChanged, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setAccelerator, setArmed, setEnabled, setUI, updateUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JRadioButtonMenuItem

public JRadioButtonMenuItem()
Creates a JRadioButtonMenuItem with no set text or icon.

JRadioButtonMenuItem

public JRadioButtonMenuItem(Icon icon)
Creates a JRadioButtonMenuItem with an icon.
Parameters:
icon - the Icon to display on the JRadioButtonMenuItem

JRadioButtonMenuItem

public JRadioButtonMenuItem(String text)
Creates a JRadioButtonMenuItem with text.
Parameters:
text - the text of the JRadioButtonMenuItem

JRadioButtonMenuItem

public JRadioButtonMenuItem(Action a)
Creates a radio button menu item whose properties are taken from the Action supplied.
Parameters:
a - the Action on which to base the radio button menu item
Since:
1.3

JRadioButtonMenuItem

public JRadioButtonMenuItem(String text,
                            Icon icon)
Creates a radio button menu item with the specified text and Icon.
Parameters:
text - the text of the JRadioButtonMenuItem
icon - the icon to display on the JRadioButtonMenuItem

JRadioButtonMenuItem

public JRadioButtonMenuItem(String text,
                            boolean selected)
Creates a radio button menu item with the specified text and selection state.
Parameters:
text - the text of the CheckBoxMenuItem
selected - the selected state of the CheckBoxMenuItem

JRadioButtonMenuItem

public JRadioButtonMenuItem(Icon icon,
                            boolean selected)
Creates a radio button menu item with the specified image and selection state, but no text.
Parameters:
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JRadioButtonMenuItem

public JRadioButtonMenuItem(String text,
                            Icon icon,
                            boolean selected)
Creates a radio button menu item that has the specified text, image, and selection state. All other constructors defer to this one.
Parameters:
text - the string displayed on the radio button
icon - the image that the button should display
Method Detail

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JMenuItem
Returns:
the string "RadioButtonMenuItemUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

requestFocus

public void requestFocus()
Overrides Component.requestFocus to not grab focus.
Overrides:
requestFocus in class JComponent
Following copied from class: java.awt.Component
See Also:
FocusEvent,
Component.addFocusListener(java.awt.event.FocusListener),
Component.processFocusEvent(java.awt.event.FocusEvent),
Component.isFocusTraversable()

paramString

protected String paramString()
Returns a string representation of this JRadioButtonMenuItem. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JMenuItem
Returns:
a string representation of this JRadioButtonMenuItem

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JRadioButtonMenuItem. For JRadioButtonMenuItems, the AccessibleContext takes the form of an AccessibleJRadioButtonMenuItem. A new AccessibleJRadioButtonMenuItem instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JMenuItem
Returns:
an AccessibleJRadioButtonMenuItem that serves as the AccessibleContext of this JRadioButtonMenuItem
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JRootPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRootPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JRootPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JRootPane
extends JComponent
implements Accessible

A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame. For task-oriented information on functionality provided by root panes see How to Use Root Panes, a section in The Java Tutorial.

The following image shows the relationships between the classes that use root panes.

The "heavyweight" components (those that delegate to a peer, or native component on the host system) are shown with a darker, heavier box. The four heavyweight JFC/Swing containers (JFrame, JDialog, JWindow, and JApplet) are shown in relation to the AWT classes they extend. These four components are the only heavyweight containers in the Swing library. The lightweight container, JInternalPane, is also shown. All 5 of these JFC/Swing containers implement the RootPaneContainer interface, and they all delegate their operations to a JRootPane (shown with a little "handle" on top).
Note: The JComponent method getRootPane can be used to obtain the JRootPane that contains a given component.
The diagram at right shows the structure of a JRootPane. A JRootpane is made up of a glassPane, an optional menuBar, and a contentPane. (The JLayeredPane manages the menuBar and the contentPane.) The glassPane sits over the top of everything, where it is in a position to intercept mouse movements. Since the glassPane (like the contentPane) can be an arbitrary component, it is also possible to set up the glassPane for drawing. Lines and images on the glassPane can then range over the frames underneath without being limited by their boundaries.

Although the menuBar component is optional, the layeredPane, contentPane, and glassPane always exist. Attempting to set them to null generates an exception.

The contentPane must be the parent of any children of the JRootPane. Rather than adding directly to a JRootPane, like this:

       rootPane.add(child);
You instead add to the contentPane of the JRootPane, like this:
       rootPane.getContentPane().add(child);
The same priniciple holds true for setting layout managers, removing components, listing children, etc. All these methods are invoked on the contentPane instead of on the JRootPane.
Note: The default layout manager for the contentPane is a BorderLayout manager. However, the JRootPane uses a custom LayoutManager. So, when you want to change the layout manager for the components you added to a JRootPane, be sure to use code like this:
    rootPane.getContentPane().setLayout(new BoxLayout());
If a JMenuBar component is set on the JRootPane, it is positioned along the upper edge of the frame. The contentPane is adjusted in location and size to fill the remaining area. (The JMenuBar and the contentPane are added to the layeredPane component at the JLayeredPane.FRAME_CONTENT_LAYER layer.)

The layeredPane is the parent of all children in the JRootPane. It is an instance of JLayeredPane, which provides the ability to add components at several layers. This capability is very useful when working with menu popups, dialog boxes, and dragging -- situations in which you need to place a component on top of all other components in the pane.

The glassPane sits on top of all other components in the JRootPane. That provides a convenient place to draw above all other components, and makes it possible to intercept mouse events, which is useful both for dragging and for drawing. Developers can use setVisible on the glassPane to control when the glassPane displays over the other children. By default the glassPane is not visible.

The custom LayoutManager used by JRootPane ensures that:

  1. The glassPane, if present, fills the entire viewable area of the JRootPane (bounds - insets).
  2. The layeredPane fills the entire viewable area of the JRootPane. (bounds - insets)
  3. The menuBar is positioned at the upper edge of the layeredPane().
  4. The contentPane fills the entire viewable area, minus the MenuBar, if present.
Any other views in the JRootPane view hierarchy are ignored.

If you replace the LayoutManager of the JRootPane, you are responsible for managing all of these views. So ordinarily you will want to be sure that you change the layout manager for the contentPane rather than for the JRootPane itself!

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JLayeredPane, JMenuBar, JWindow, JFrame, JDialog, JApplet, JInternalFrame, JComponent, BoxLayout, Mixing Heavy and Light Components, Serialized Form

Inner Class Summary
protected class | JRootPane.AccessibleJRootPane This class implements accessibility support for the JRootPane class.
protected class | JRootPane.RootLayout A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected Container | contentPane The content pane.
protected JButton | defaultButton The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs.
protected javax.swing.JRootPane.DefaultAction | defaultPressAction Deprecated. As of Java 2 platform v1.3.
protected javax.swing.JRootPane.DefaultAction | defaultReleaseAction Deprecated. As of Java 2 platform v1.3.
protected Component | glassPane The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.
protected JLayeredPane | layeredPane The layered pane that manages the menu bar and content pane.
protected JMenuBar | menuBar The menu bar.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JRootPane()
Create a JRootPane, setting up its glassPane, LayeredPane, and contentPane.
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
Overridden to enforce the position of the glass component as the zero child.
 void addNotify()
Register ourselves with the SystemEventQueueUtils as a new root pane.
protected  Container createContentPane()
Called by the constructor methods to create the default contentPane.
protected  Component createGlassPane()
Called by the constructor methods to create the default glassPane.
protected  JLayeredPane createLayeredPane()
Called by the constructor methods to create the default layeredPane.
protected  LayoutManager createRootLayout()
Called by the constructor methods to create the default layoutManager.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JRootPane.
 Container getContentPane()
Returns the content pane -- the container that holds the components parented by the root pane.
 JButton getDefaultButton()
Returns the current default button for this JRootPane.
 Component getGlassPane()
Returns the current glass pane for this JRootPane.
 JMenuBar getJMenuBar()
Returns the menu bar from the layered pane.
 JLayeredPane getLayeredPane()
Get the layered pane used by the root pane.
 JMenuBar getMenuBar()
Deprecated. As of Swing version 1.0.3 replaced by getJMenubar().
 RootPaneUI getUI()
Returns the L&F object that renders this component.
 String getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
 boolean isFocusCycleRoot()
Make JRootPane be the root of a focus cycle.
 boolean isOptimizedDrawingEnabled()
The GlassPane and ContentPane have the same bounds, which means JRootPane does not tiles its children and this should return false.
 boolean isValidateRoot()
If a descendant of this JRootPane calls revalidate, validate from here on down.
protected  String paramString()
Returns a string representation of this JRootPane.
 void removeNotify()
Unregister ourselves from SystemEventQueueUtils.
 void setContentPane(Container content)
Sets the content pane -- the container that holds the components parented by the root pane.
 void setDefaultButton(JButton defaultButton)
Sets the current default button for this JRootPane.
 void setGlassPane(Component glass)
Sets a specified Component to be the glass pane for this root pane.
 void setJMenuBar(JMenuBar menu)
Adds or changes the menu bar used in the layered pane.
 void setLayeredPane(JLayeredPane layered)
Set the layered pane for the root pane.
 void setMenuBar(JMenuBar menu)
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu).
 void setUI(RootPaneUI ui)
Sets the L&F object that renders this component.
 void updateUI()
Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

menuBar

protected JMenuBar menuBar
The menu bar.

contentPane

protected Container contentPane
The content pane.

layeredPane

protected JLayeredPane layeredPane
The layered pane that manages the menu bar and content pane.

glassPane

protected Component glassPane
The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.

defaultButton

protected JButton defaultButton
The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs.

defaultPressAction

protected javax.swing.JRootPane.DefaultAction defaultPressAction
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this unusable field is no longer used. To override the default button you should replace the Action in the JRootPane's ActionMap. Please refer to the key bindings specification for further details.
See Also:
defaultButton

defaultReleaseAction

protected javax.swing.JRootPane.DefaultAction defaultReleaseAction
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this unusable field is no longer used. To override the default button you should replace the Action in the JRootPane's ActionMap. Please refer to the key bindings specification for further details.
See Also:
defaultButton
Constructor Detail

JRootPane

public JRootPane()
Create a JRootPane, setting up its glassPane, LayeredPane, and contentPane.
Method Detail

getUI

public RootPaneUI getUI()
Returns the L&F object that renders this component.
Returns:
LabelUI object
Since:
1.3

setUI

public void setUI(RootPaneUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the LabelUI L&F object
Since:
1.3
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
String "RootPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createLayeredPane

protected JLayeredPane createLayeredPane()
Called by the constructor methods to create the default layeredPane. Bt default it creates a new JLayeredPane.

createContentPane

protected Container createContentPane()
Called by the constructor methods to create the default contentPane. By default this method creates a new JComponent add sets a BorderLayout as its LayoutManager.

createGlassPane

protected Component createGlassPane()
Called by the constructor methods to create the default glassPane. By default this method creates a new JComponent with visibility set to false.

createRootLayout

protected LayoutManager createRootLayout()
Called by the constructor methods to create the default layoutManager.

setJMenuBar

public void setJMenuBar(JMenuBar menu)
Adds or changes the menu bar used in the layered pane.
Parameters:
menu - the JMenuBar to add

setMenuBar

public void setMenuBar(JMenuBar menu)
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu).

Specifies the menu bar value.

getJMenuBar

public JMenuBar getJMenuBar()
Returns the menu bar from the layered pane.
Returns:
the JMenuBar used in the pane

getMenuBar

public JMenuBar getMenuBar()
Deprecated. As of Swing version 1.0.3 replaced by getJMenubar().

Returns the menu bar value.

setContentPane

public void setContentPane(Container content)
Sets the content pane -- the container that holds the components parented by the root pane.
Parameters:
content - the Container to use for component-contents
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null

getContentPane

public Container getContentPane()
Returns the content pane -- the container that holds the components parented by the root pane.
Returns:
the Container that holds the component-contents

setLayeredPane

public void setLayeredPane(JLayeredPane layered)
Set the layered pane for the root pane. The layered pane typically holds a content pane and an optional JMenuBar.
Parameters:
layered - the JLayeredPane to use.
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null

getLayeredPane

public JLayeredPane getLayeredPane()
Get the layered pane used by the root pane. The layered pane typically holds a content pane and an optional JMenuBar.
Returns:
the JLayeredPane currently in use

setGlassPane

public void setGlassPane(Component glass)
Sets a specified Component to be the glass pane for this root pane. The glass pane should normally be a lightweight, transparent component, because it will be made visible when ever the root pane needs to grab input events. For example, only one JInternalFrame is ever active when using a DefaultDesktop, and any inactive JInternalFrames' glass panes are made visible so that clicking anywhere within an inactive JInternalFrame can activate it.
Parameters:
glass - the Component to use as the glass pane for this JRootPane.

getGlassPane

public Component getGlassPane()
Returns the current glass pane for this JRootPane.
Returns:
the current glass pane.
See Also:
setGlassPane(java.awt.Component)

isFocusCycleRoot

public boolean isFocusCycleRoot()
Make JRootPane be the root of a focus cycle. That means that, by default, tabbing within the root pane will move between components of the pane, but not out of the pane.
Overrides:
isFocusCycleRoot in class JComponent
Returns:
true
See Also:
JComponent.isFocusCycleRoot()

isValidateRoot

public boolean isValidateRoot()
If a descendant of this JRootPane calls revalidate, validate from here on down.

Deferred requests to relayout a component and it's descendants, i.e. calls to revalidate(), are pushed upwards to either a JRootPane or a JScrollPane because both classes override isValidateRoot() to return true.

Overrides:
isValidateRoot in class JComponent
Returns:
true
See Also:
JComponent.isValidateRoot()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
The GlassPane and ContentPane have the same bounds, which means JRootPane does not tiles its children and this should return false. On the other hand, the GlassPane is normally not visible, and so this can return true if the GlassPane isn't visible. Therefore, the return value here depends upon the visiblity of the GlassPane.
Overrides:
isOptimizedDrawingEnabled in class JComponent
Returns:
true if this component's children don't overlap

addNotify

public void addNotify()
Register ourselves with the SystemEventQueueUtils as a new root pane.
Overrides:
addNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

removeNotify

public void removeNotify()
Unregister ourselves from SystemEventQueueUtils.
Overrides:
removeNotify in class JComponent
See Also:
addNotify()

setDefaultButton

public void setDefaultButton(JButton defaultButton)
Sets the current default button for this JRootPane. The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the RootPane regardless of whether or not the button has keyboard focus (unless there is another component within the RootPane which consumes the activation event, such as a JTextPane). For default activation to work, the button must be an enabled descendent of the RootPane when activation occurs. To remove a default button from this RootPane, set this property to null.
Parameters:
default - the JButton which is to be the default button
See Also:
JButton.isDefaultButton()

getDefaultButton

public JButton getDefaultButton()
Returns the current default button for this JRootPane.
Returns:
the JButton which is currently the default button

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Overridden to enforce the position of the glass component as the zero child.
Overrides:
addImpl in class Container
Following copied from class: java.awt.Container
Parameters:
comp - the component to be added.
constraints - an object expressing layout contraints for this component.
index - the position in the container's list at which to insert the component, where -1 means insert at the end.
See Also:
Container.add(java.awt.Component),
Container.add(java.awt.Component, int),
Container.add(java.awt.Component, java.lang.Object),
LayoutManager

paramString

protected String paramString()
Returns a string representation of this JRootPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JRootPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JRootPane. For root panes, the AccessibleContext takes the form of an AccessibleJRootPane. A new AccessibleJRootPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJRootPane that serves as the AccessibleContext of this JRootPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JScrollBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JScrollBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JScrollBar
All Implemented Interfaces:
Accessible, Adjustable, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JScrollPane.ScrollBar
public class JScrollBar
extends JComponent
implements Adjustable, Accessible

An implementation of a scrollbar. The user positions the knob in the scrollbar to determine the contents of the viewing area. The program typically adjusts the display so that the end of the scrollbar represents the end of the displayable contents, or 100% of the contents. The start of the scrollbar is the beginning of the displayable contents, or 0%. The postion of the knob within those bounds then translates to the corresponding percentage of the displayable contents.

Typically, as the position of the knob in the scrollbar changes a corresponding change is made to the position of the JViewport on the underlying view, changing the contents of the JViewport.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JScrollPane, Serialized Form

Inner Class Summary
protected  class JScrollBar.AccessibleJScrollBar
This class implements accessibility support for the JScrollBar class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected int | blockIncrement
protected BoundedRangeModel | model The model that represents the scrollbar's minimum, maximum, extent (aka "visibleAmount") and current value.
protected int | orientation
protected int | unitIncrement
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, VERTICAL
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JScrollBar()
Creates a vertical scrollbar with the following initial values:
JScrollBar(int orientation)
Creates a scrollbar with the specified orientation and the following initial values:
JScrollBar(int orientation, int value, int extent, int min, int max)
Creates a scrollbar with the specified orientation, value, extent, mimimum, and maximum.
Method Summary
void | addAdjustmentListener(AdjustmentListener l) Adds an AdjustmentListener.
protected void | fireAdjustmentValueChanged(int id, int type, int value)
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JScrollBar.
int | getBlockIncrement() For backwards compatibility with java.awt.Scrollbar.
int | getBlockIncrement(int direction) Returns the amount to change the scrollbar's value by, given a block (usually "page") up/down request.
int | getMaximum() The maximum value of the scrollbar is maximum - extent.
Dimension | getMaximumSize() The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
int | getMinimum() Returns the minimum value supported by the scrollbar (usually zero).
Dimension | getMinimumSize() The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
BoundedRangeModel | getModel() Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
int | getOrientation() Returns the component's orientation (horizontal or vertical).
ScrollBarUI | getUI() Returns the delegate that implements the look and feel for this component.
String | getUIClassID() Returns the name of the LookAndFeel class for this component.
int | getUnitIncrement() For backwards compatibility with java.awt.Scrollbar.
int | getUnitIncrement(int direction) Returns the amount to change the scrollbar's value by, given a unit up/down request.
int | getValue() Returns the scrollbar's value.
boolean | getValueIsAdjusting() True if the scrollbar knob is being dragged.
int | getVisibleAmount() Returns the scrollbar's extent, aka its "visibleAmount".
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
protected String | paramString() Returns a string representation of this JScrollBar.
void | removeAdjustmentListener(AdjustmentListener l) Removes an AdjustmentEvent listener.
void | setBlockIncrement(int blockIncrement) Sets the blockIncrement property.
void | setEnabled(boolean x) Enables the component so that the knob position can be changed.
void | setMaximum(int maximum) Sets the model's maximum property.
void | setMinimum(int minimum) Sets the model's minimum property.
void | setModel(BoundedRangeModel newModel) Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
void | setOrientation(int orientation) Set the scrollbar's orientation to either VERTICAL or HORIZONTAL.
void | setUnitIncrement(int unitIncrement) Sets the unitIncrement property.
void | setValue(int value) Sets the scrollbar's value.
void | setValueIsAdjusting(boolean b) Sets the model's valueIsAdjusting property.
void | setValues(int newValue, int newExtent, int newMin, int newMax) Sets the four BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
void | setVisibleAmount(int extent) Set the model's extent property.
void | updateUI() Overrides JComponent.updateUI.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

model

protected BoundedRangeModel model
The model that represents the scrollbar's minimum, maximum, extent (aka "visibleAmount") and current value.
See Also:
setModel(javax.swing.BoundedRangeModel)

orientation

protected int orientation
See Also:
setOrientation(int)

unitIncrement

protected int unitIncrement
See Also:
setUnitIncrement(int)

blockIncrement

protected int blockIncrement
See Also:
setBlockIncrement(int)
Constructor Detail

JScrollBar

public JScrollBar(int orientation,
                  int value,
                  int extent,
                  int min,
                  int max)
Creates a scrollbar with the specified orientation, value, extent, mimimum, and maximum. The "extent" is the size of the viewable area. It is also known as the "visible amount".

Note: Use setBlockIncrement to set the block increment to a size slightly smaller than the view's extent. That way, when the user jumps the knob to an adjacent position, one or two lines of the original contents remain in view.

Throws:
IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL
See Also:
setOrientation(int), setValue(int), setVisibleAmount(int), setMinimum(int), setMaximum(int)

JScrollBar

public JScrollBar(int orientation)
Creates a scrollbar with the specified orientation and the following initial values:
 minimum = 0
 maximum = 100
 value = 0
 extent = 10

JScrollBar

public JScrollBar()
Creates a vertical scrollbar with the following initial values:
 minimum = 0
 maximum = 100
 value = 0
 extent = 10
Method Detail

getUI

public ScrollBarUI getUI()
Returns the delegate that implements the look and feel for this component.
See Also:
JComponent.setUI(javax.swing.plaf.ComponentUI)

updateUI

public void updateUI()
Overrides JComponent.updateUI.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the LookAndFeel class for this component.
Overrides:
getUIClassID in class JComponent
Returns:
"ScrollBarUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getOrientation

public int getOrientation()
Returns the component's orientation (horizontal or vertical).
Specified by:
getOrientation in interface Adjustable
Returns:
VERTICAL or HORIZONTAL
See Also:
setOrientation(int), Adjustable.getOrientation()

setOrientation

public void setOrientation(int orientation)
Set the scrollbar's orientation to either VERTICAL or HORIZONTAL.
Throws:
IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL
See Also:
getOrientation()

getModel

public BoundedRangeModel getModel()
Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
See Also:
setModel(javax.swing.BoundedRangeModel)

setModel

public void setModel(BoundedRangeModel newModel)
Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
See Also:
getModel()

getUnitIncrement

public int getUnitIncrement(int direction)
Returns the amount to change the scrollbar's value by, given a unit up/down request. A ScrollBarUI implementation typically calls this method when the user clicks on a scrollbar up/down arrow and uses the result to update the scrollbar's value. Subclasses my override this method to compute a value, e.g. the change required to scroll up or down one (variable height) line text or one row in a table.

The JScrollPane component creates scrollbars (by default) that override this method and delegate to the viewports Scrollable view, if it has one. The Scrollable interface provides a more specialized version of this method.

Parameters:
direction - is -1 or 1 for up/down respectively
Returns:
the value of the unitIncrement property
See Also:
setUnitIncrement(int), setValue(int), Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

setUnitIncrement

public void setUnitIncrement(int unitIncrement)
Sets the unitIncrement property.
Specified by:
setUnitIncrement in interface Adjustable
See Also:
getUnitIncrement(int)

getBlockIncrement

public int getBlockIncrement(int direction)
Returns the amount to change the scrollbar's value by, given a block (usually "page") up/down request. A ScrollBarUI implementation typically calls this method when the user clicks above or below the scrollbar "knob" to change the value up or down by large amount. Subclasses my override this method to compute a value, e.g. the change required to scroll up or down one paragraph in a text document.

The JScrollPane component creates scrollbars (by default) that override this method and delegate to the viewports Scrollable view, if it has one. The Scrollable interface provides a more specialized version of this method.

Parameters:
direction - is -1 or 1 for up/down respectively
Returns:
the value of the blockIncrement property
See Also:
setBlockIncrement(int), setValue(int), Scrollable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)

setBlockIncrement

public void setBlockIncrement(int blockIncrement)
Sets the blockIncrement property.
Specified by:
setBlockIncrement in interface Adjustable
See Also:
getBlockIncrement()

getUnitIncrement

public int getUnitIncrement()
For backwards compatibility with java.awt.Scrollbar.
Specified by:
getUnitIncrement in interface Adjustable
See Also:
Adjustable.getUnitIncrement(), getUnitIncrement(int)

getBlockIncrement

public int getBlockIncrement()
For backwards compatibility with java.awt.Scrollbar.
Specified by:
getBlockIncrement in interface Adjustable
See Also:
Adjustable.getBlockIncrement(), getBlockIncrement(int)

getValue

public int getValue()
Returns the scrollbar's value.
Specified by:
getValue in interface Adjustable
Returns:
the model's value property
See Also:
setValue(int)

setValue

public void setValue(int value)
Sets the scrollbar's value. This method just forwards the value to the model.
Specified by:
setValue in interface Adjustable
See Also:
getValue(), BoundedRangeModel.setValue(int)

getVisibleAmount

public int getVisibleAmount()
Returns the scrollbar's extent, aka its "visibleAmount". In many scrollbar look and feel implementations the size of the scrollbar "knob" or "thumb" is proportional to the extent.
Specified by:
getVisibleAmount in interface Adjustable
Returns:
the value of the model's extent property
See Also:
setVisibleAmount(int)

setVisibleAmount

public void setVisibleAmount(int extent)
Set the model's extent property.
Specified by:
setVisibleAmount in interface Adjustable
See Also:
getVisibleAmount(), BoundedRangeModel.setExtent(int)

getMinimum

public int getMinimum()
Returns the minimum value supported by the scrollbar (usually zero).
Specified by:
getMinimum in interface Adjustable
Returns:
the value of the model's minimum property
See Also:
setMinimum(int)

setMinimum

public void setMinimum(int minimum)
Sets the model's minimum property.
Specified by:
setMinimum in interface Adjustable
See Also:
getMinimum(), BoundedRangeModel.setMinimum(int)

getMaximum

public int getMaximum()
The maximum value of the scrollbar is maximum - extent.
Specified by:
getMaximum in interface Adjustable
Returns:
the value of the model's maximum property
See Also:
setMaximum(int)

setMaximum

public void setMaximum(int maximum)
Sets the model's maximum property. Note that the scrollbar's value can only be set to maximum - extent.
Specified by:
setMaximum in interface Adjustable
See Also:
getMaximum(), BoundedRangeModel.setMaximum(int)

getValueIsAdjusting

public boolean getValueIsAdjusting()
True if the scrollbar knob is being dragged.
Returns:
the value of the model's valueIsAdjusting property
See Also:
setValueIsAdjusting(boolean)

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)
Sets the model's valueIsAdjusting property. Scrollbar look and feel implementations should set this property to true when a knob drag begins, and to false when the drag ends. The scrollbar model will not generate ChangeEvents while valueIsAdjusting is true.
See Also:
getValueIsAdjusting(), BoundedRangeModel.setValueIsAdjusting(boolean)

setValues

public void setValues(int newValue,
                      int newExtent,
                      int newMin,
                      int newMax)
Sets the four BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
 minimum <= value="value" <="value+extent" <="maximum"

See Also:
BoundedRangeModel.setRangeProperties(int, int, int, int, boolean),
setValue(int),
setVisibleAmount(int),
setMinimum(int),
setMaximum(int)

addAdjustmentListener

public void addAdjustmentListener(AdjustmentListener l)
Adds an AdjustmentListener. Adjustment listeners are notified each time the scrollbar's model changes. Adjustment events are provided for backwards compatability with java.awt.Scrollbar.

Note that the AdjustmentEvents type property will always have a placeholder value of AdjustmentEvent.TRACK because all changes to a BoundedRangeModels value are considered equivalent. To change the value of a BoundedRangeModel one just sets its value property, i.e. model.setValue(123). No information about the origin of the change, e.g. it's a block decrement, is provided. We don't try fabricate the origin of the change here.

Specified by:
addAdjustmentListener in interface Adjustable
Parameters:
l - the AdjustmentLister to add
See Also:
removeAdjustmentListener(java.awt.event.AdjustmentListener), BoundedRangeModel.addChangeListener(javax.swing.event.ChangeListener)

removeAdjustmentListener

public void removeAdjustmentListener(AdjustmentListener l)
Removes an AdjustmentEvent listener.
Specified by:
removeAdjustmentListener in interface Adjustable
Parameters:
l - the AdjustmentLister to remove
See Also:
addAdjustmentListener(java.awt.event.AdjustmentListener)

fireAdjustmentValueChanged

protected void fireAdjustmentValueChanged(int id,
                                          int type,
                                          int value)

getMinimumSize

public Dimension getMinimumSize()
The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
Overrides:
getMinimumSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the minimumSize property
See Also:
JComponent.setMinimumSize(java.awt.Dimension)

getMaximumSize

public Dimension getMaximumSize()
The scrollbar is flexible along it's scrolling axis and rigid along the other axis.
Overrides:
getMaximumSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the maximumSize property.
See Also:
JComponent.setMaximumSize(java.awt.Dimension)

setEnabled

public void setEnabled(boolean x)
Enables the component so that the knob position can be changed. When the disabled, the knob position cannot be changed.
Overrides:
setEnabled in class JComponent
Parameters:
b - a boolean value, where true enables the component and false disables it

isFocusTraversable

public boolean isFocusTraversable()
Identifies whether or not this component can receive the focus. This returns false as JScrollBar's do not want to participate in focus traversal.
Overrides:
isFocusTraversable in class JComponent
Returns:
true if this component can receive the focus

paramString

protected String paramString()
Returns a string representation of this JScrollBar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JScrollBar.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JScrollBar. For JScrollBar, the AccessibleContext takes the form of an AccessibleJScrollBar. A new AccessibleJScrollBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJScrollBar that serves as the AccessibleContext of this JScrollBar
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JScrollPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JScrollPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JScrollPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, ScrollPaneConstants, Serializable
public class JScrollPane
extends JComponent
implements ScrollPaneConstants, Accessible

Provides a scrollable view of a component. A JScrollPane manages a viewport, optional vertical and horizontal scroll bars, and optional row and column heading viewports. You can find task-oriented documentation of JScrollPane in How to Use Scroll Panes, a section in The Java Tutorial.

The JViewport provides a window, or "viewport" onto a data source -- for example, a text file. That data source is the "scrollable client" (aka data model) displayed by the JViewport view. A JScrollPane basically consists of JScrollBars, a JViewport, and the wiring between them, as shown in the diagram at right.

In addition to the scroll bars and viewport, a JScrollPane can have a column header and a row header. Each of these is a JViewport object that you specify with setRowHeaderView, and setColumnHeaderView. The column header viewport automatically scrolls left and right, tracking the left-right scrolling of the main viewport. (It never scrolls vertically, however.) The row header acts in a similar fashion.

By default, the corners are empty. You can put a component into a corner using setCorner, in case you there is some function or decoration you would like to add to the scroll pane. The size of corner components is entirely determined by the size of the headers and scroll bars that surround them.

To add a border around the main viewport, you can use setViewportBorder. (Of course, you can also add a border around the whole scroll pane using setBorder.)

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JScrollPane key assignments.

A common operation to want to do is to set the background color that will be used if the main viewport view is smaller than the viewport, or is not opaque. This can be accomplished by setting the background color of the viewport, via scrollPane.getViewport().setBackground(). The reason for setting the color of the viewport and not the scrollpane is that by default JViewport is opaque which, among other things, means it will completely fill in its background using its background color. Therefore when JScrollPane draws its background the viewport will usually draw over it.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JScrollBar,
JViewport,
setViewportView(java.awt.Component),
setRowHeaderView(java.awt.Component),
setColumnHeaderView(java.awt.Component),
setCorner(java.lang.String, java.awt.Component),
setViewportBorder(javax.swing.border.Border), Serialized Form

Inner Class Summary
protected class | JScrollPane.AccessibleJScrollPane This class implements accessibility support for the JScrollPane class.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected JViewport | columnHeader The column header child.
protected JScrollBar | horizontalScrollBar The scrollpane's horizontal scrollbar child.
protected int | horizontalScrollBarPolicy The display policy for the horizontal scrollbar.
protected Component | lowerLeft The component to display in the lower left corner.
protected Component | lowerRight The component to display in the lower right corner.
protected JViewport | rowHeader The row header child.
protected Component | upperLeft The component to display in the upper left corner.
protected Component | upperRight The component to display in the upper right corner.
protected JScrollBar | verticalScrollBar The scrollpane's vertical scrollbar child.
protected int | verticalScrollBarPolicy The display policy for the vertical scrollbar.
protected JViewport | viewport The scrollpane's viewport child.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JScrollPane()
Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed.
JScrollPane(Component view)
Creates a JScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.
JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
Creates a JScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.
JScrollPane(int vsbPolicy, int hsbPolicy)
Creates an empty (no viewport view) JScrollPane with specified scrollbar policies.
Method Summary
JScrollBar | createHorizontalScrollBar() Returns a JScrollPane.ScrollBar by default.
JScrollBar | createVerticalScrollBar() Returns a JScrollPane.ScrollBar by default.
protected JViewport | createViewport() Returns a new JViewport by default.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JScrollPane.
JViewport | getColumnHeader() Returns the column header.
Component | getCorner(String key) Returns the component at the specified corner.
JScrollBar | getHorizontalScrollBar() Returns the horizontal scroll bar that controls the viewport's horizontal view position.
int | getHorizontalScrollBarPolicy() Returns the horizontal scroll bar policy value.
JViewport | getRowHeader() Returns the row header.
ScrollPaneUI | getUI() Returns the look and feel (L&F) object that renders this component.
String | getUIClassID() Returns the suffix used to construct the name of the L&F class used to render this component.
JScrollBar | getVerticalScrollBar() Returns the vertical scroll bar that controls the viewports vertical view position.
int | getVerticalScrollBarPolicy() Returns the vertical scroll bar policy value.
JViewport | getViewport() Returns the current JViewport.
Border | getViewportBorder() Returns the Border object that surrounds the viewport.
Rectangle | getViewportBorderBounds() Returns the bounds of the viewport's border.
boolean | isValidateRoot() Calls revalidate on any descendant of this JScrollPane.
protected String | paramString() Returns a string representation of this JScrollPane.
void | setColumnHeader(JViewport columnHeader) Removes the old columnHeader, if it exists.
void | setColumnHeaderView(Component view) Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane.
void | setComponentOrientation(ComponentOrientation co) Sets the orientation for the vertical and horizontal scrollbars as determined by the ComponentOrientation argument.
void | setCorner(String key, Component corner) Adds a child that will appear in one of the scroll panes corners, if there's room.
void | setHorizontalScrollBar(JScrollBar horizontalScrollBar) Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.
void | setHorizontalScrollBarPolicy(int policy) Determines when the horizontal scrollbar appears in the scrollpane.
void | setLayout(LayoutManager layout) Sets the layout manager for this JScrollPane.
void | setRowHeader(JViewport rowHeader) Removes the old rowHeader, if it exists.
void | setRowHeaderView(Component view) Creates a row-header viewport if necessary, sets its view and then adds the row-header viewport to the scrollpane.
void | setUI(ScrollPaneUI ui) Sets the ScrollPaneUI object that provides the look and feel (L&F) for this component.
void | setVerticalScrollBar(JScrollBar verticalScrollBar) Adds the scrollbar that controls the viewports vertical view position to the scrollpane.
void | setVerticalScrollBarPolicy(int policy) Determines when the vertical scrollbar appears in the scrollpane.
void | setViewport(JViewport viewport) Removes the old viewport (if there is one); forces the viewPosition of the new viewport to be in the +x,+y quadrant; syncs up the row and column headers (if there are any) with the new viewport; and finally syncs the scrollbars and headers with the new viewport.
void | setViewportBorder(Border viewportBorder) Adds a border around the viewport.
void | setViewportView(Component view) Creates a viewport if necessary and then sets its view.
void | updateUI() Replaces the current ScrollPaneUI object with a version from the current default look and feel.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

verticalScrollBarPolicy

protected int verticalScrollBarPolicy
The display policy for the vertical scrollbar. The default is JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED.
See Also:
setVerticalScrollBarPolicy(int)

horizontalScrollBarPolicy

protected int horizontalScrollBarPolicy
The display policy for the horizontal scrollbar. The default is JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED.
See Also:
setHorizontalScrollBarPolicy(int)

viewport

protected JViewport viewport
The scrollpane's viewport child. Default is an empty JViewport.
See Also:
setViewport(javax.swing.JViewport)

verticalScrollBar

protected JScrollBar verticalScrollBar
The scrollpane's vertical scrollbar child. Default is a JScrollBar.
See Also:
setVerticalScrollBar(javax.swing.JScrollBar)

horizontalScrollBar

protected JScrollBar horizontalScrollBar
The scrollpane's horizontal scrollbar child. Default is a JScrollBar.
See Also:
setHorizontalScrollBar(javax.swing.JScrollBar)

rowHeader

protected JViewport rowHeader
The row header child. Default is null.
See Also:
setRowHeader(javax.swing.JViewport)

columnHeader

protected JViewport columnHeader
The column header child. Default is null.
See Also:
setColumnHeader(javax.swing.JViewport)

lowerLeft

protected Component lowerLeft
The component to display in the lower left corner. Default is null.
See Also:
setCorner(java.lang.String, java.awt.Component)

lowerRight

protected Component lowerRight
The component to display in the lower right corner. Default is null.
See Also:
setCorner(java.lang.String, java.awt.Component)

upperLeft

protected Component upperLeft
The component to display in the upper left corner. Default is null.
See Also:
setCorner(java.lang.String, java.awt.Component)

upperRight

protected Component upperRight
The component to display in the upper right corner. Default is null.
See Also:
setCorner(java.lang.String, java.awt.Component)
Constructor Detail

JScrollPane

public JScrollPane(Component view,
                   int vsbPolicy,
                   int hsbPolicy)
Creates a JScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars. The scrollbar policies specify when the scrollbars are displayed, For example, if vsbPolicy is VERTICAL_SCROLLBAR_AS_NEEDED then the vertical scrollbar only appears if the view doesn't fit vertically. The available policy settings are listed at setVerticalScrollBarPolicy(int) and setHorizontalScrollBarPolicy(int).
Parameters:
view - the component to display in the scrollpanes viewport
vsbPolicy - an integer that specifies the vertical scrollbar policy
hsbPolicy - an integer that specifies the horizontal scrollbar policy
See Also:
setViewportView(java.awt.Component)

JScrollPane

public JScrollPane(Component view)
Creates a JScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.
Parameters:
view - the component to display in the scrollpane's viewport
See Also:
setViewportView(java.awt.Component)

JScrollPane

public JScrollPane(int vsbPolicy,
                   int hsbPolicy)
Creates an empty (no viewport view) JScrollPane with specified scrollbar policies. The available policy settings are listed at setVerticalScrollBarPolicy(int) and setHorizontalScrollBarPolicy(int).
Parameters:
vsbPolicy - an integer that specifies the vertical scrollbar policy
hsbPolicy - an integer that specifies the horizontal scrollbar policy
See Also:
setViewportView(java.awt.Component)

JScrollPane

public JScrollPane()
Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed.
Method Detail

getUI

public ScrollPaneUI getUI()
Returns the look and feel (L&F) object that renders this component.
Returns:
the ScrollPaneUI object that renders this component
See Also:
setUI(javax.swing.plaf.ScrollPaneUI)

setUI

public void setUI(ScrollPaneUI ui)
Sets the ScrollPaneUI object that provides the look and feel (L&F) for this component.
Parameters:
ui - the ScrollPaneUI L&F object
See Also:
getUI()

updateUI

public void updateUI()
Replaces the current ScrollPaneUI object with a version from the current default look and feel. To be called when the default look and feel changes.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI(), UIManager.getUI(javax.swing.JComponent)

getUIClassID

public String getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ScrollPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setLayout

public void setLayout(LayoutManager layout)
Sets the layout manager for this JScrollPane. This method overrides setLayout in java.awt.Container to ensure that only LayoutManagers which are subclasses of ScrollPaneLayout can be used in a JScrollPane.
Overrides:
setLayout in class Container
Parameters:
layout - the specified layout manager
Throws:
ClassCastException - if layout is not a ScrollPaneLayout
See Also:
Container.getLayout(), Container.setLayout(java.awt.LayoutManager)

isValidateRoot

public boolean isValidateRoot()
Calls revalidate on any descendant of this JScrollPane. For example, the viewport's view, will cause a request to be queued that will validate the JScrollPane and all its descendants.
Overrides:
isValidateRoot in class JComponent
Returns:
true
See Also:
JComponent.revalidate()

getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()
Returns the vertical scroll bar policy value.
Returns:
the verticalScrollBarPolicy property
See Also:
setVerticalScrollBarPolicy(int)

setVerticalScrollBarPolicy

public void setVerticalScrollBarPolicy(int policy)
Determines when the vertical scrollbar appears in the scrollpane. Legal values are:
  • JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
  • JScrollPane.VERTICAL_SCROLLBAR_NEVER
  • JScrollPane.VERTICAL_SCROLLBAR_ALWAYS
Parameters:
policy - one of the three values listed above
Throws:
IllegalArgumentException - if policy is not one of the legal values shown above
See Also:
getVerticalScrollBarPolicy()

getHorizontalScrollBarPolicy

public int getHorizontalScrollBarPolicy()
Returns the horizontal scroll bar policy value.
Returns:
the horizontalScrollBarPolicy property
See Also:
setHorizontalScrollBarPolicy(int)

setHorizontalScrollBarPolicy

public void setHorizontalScrollBarPolicy(int policy)
Determines when the horizontal scrollbar appears in the scrollpane. The options are:
  • JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
  • JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
  • JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS
Parameters:
policy - one of the three values listed above
Throws:
IllegalArgumentException - if policy is not one of the legal values shown above
See Also:
getHorizontalScrollBarPolicy()

getViewportBorder

public Border getViewportBorder()
Returns the Border object that surrounds the viewport.
Returns:
the viewportBorder property
See Also:
setViewportBorder(javax.swing.border.Border)

setViewportBorder

public void setViewportBorder(Border viewportBorder)
Adds a border around the viewport. Note that the border isn't set on the viewport directly, JViewport doesn't support the JComponent border property. Similarly setting the JScrollPanes viewport doesn't affect the viewportBorder property.

The default value of this property is computed by the look and feel implementation.

Parameters:
viewportBorder - the border to be added
See Also:
getViewportBorder(), setViewport(javax.swing.JViewport)

getViewportBorderBounds

public Rectangle getViewportBorderBounds()
Returns the bounds of the viewport's border.
Returns:
a Rectangle object specifying the viewport border

createHorizontalScrollBar

public JScrollBar createHorizontalScrollBar()
Returns a JScrollPane.ScrollBar by default. Subclasses may override this method to force ScrollPaneUI implementations to use a JScrollBar subclass. Used by ScrollPaneUI implementations to create the horizontal scrollbar.
Returns:
a JScrollBar with a horizontal orientation
See Also:
JScrollBar

getHorizontalScrollBar

public JScrollBar getHorizontalScrollBar()
Returns the horizontal scroll bar that controls the viewport's horizontal view position.
Returns:
the horizontalScrollBar property
See Also:
setHorizontalScrollBar(javax.swing.JScrollBar)

setHorizontalScrollBar

public void setHorizontalScrollBar(JScrollBar horizontalScrollBar)
Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane. This is usually unnecessary, as JScrollPane creates horizontal and vertical scrollbars by default.
Parameters:
horizontalScrollBar - the horizontal scrollbar to be added
See Also:
createHorizontalScrollBar(), getHorizontalScrollBar()

createVerticalScrollBar

public JScrollBar createVerticalScrollBar()
Returns a JScrollPane.ScrollBar by default. Subclasses may override this method to force ScrollPaneUI implementations to use a JScrollBar subclass. Used by ScrollPaneUI implementations to create the vertical scrollbar.
Returns:
a JScrollBar with a vertical orientation
See Also:
JScrollBar

getVerticalScrollBar

public JScrollBar getVerticalScrollBar()
Returns the vertical scroll bar that controls the viewports vertical view position.
Returns:
the verticalScrollBar property
See Also:
setVerticalScrollBar(javax.swing.JScrollBar)

setVerticalScrollBar

public void setVerticalScrollBar(JScrollBar verticalScrollBar)
Adds the scrollbar that controls the viewports vertical view position to the scrollpane. This is usually unnecessary, as JScrollPane creates vertical and horizontal scrollbars by default.
Parameters:
verticalScrollBar - the new vertical scrollbar to be added
See Also:
createVerticalScrollBar(), getVerticalScrollBar()

createViewport

protected JViewport createViewport()
Returns a new JViewport by default. Used to create the viewport (as needed) in setViewportView, setRowHeaderView, and setColumnHeaderView. Subclasses may override this method to return a subclass of JViewport.
Returns:
a new JViewport

getViewport

public JViewport getViewport()
Returns the current JViewport.
Returns:
the viewport property
See Also:
setViewport(javax.swing.JViewport)

setViewport

public void setViewport(JViewport viewport)
Removes the old viewport (if there is one); forces the viewPosition of the new viewport to be in the +x,+y quadrant; syncs up the row and column headers (if there are any) with the new viewport; and finally syncs the scrollbars and headers with the new viewport.

Most applications will find it more convenient to use setViewportView to add a viewport and a view to the scrollpane.

Parameters:
viewport - the new viewport to be used; if viewport is null, the old viewport is still removed and the new viewport is set to null
See Also:
createViewport(),
getViewport(),
setViewportView(java.awt.Component)

setViewportView

public void setViewportView(Component view)
Creates a viewport if necessary and then sets its view. Applications that don't provide the view directly to the JScrollPane constructor should use this method to specify the scrollable child that's going to be displayed in the scrollpane. For example:
 JScrollPane scrollpane = new JScrollPane();
 scrollpane.setViewportView(myBigComponentToScroll);
Applications should not add children directly to the scrollpane.
Parameters:
view - the component to add to the viewport
See Also:
setViewport(javax.swing.JViewport), JViewport.setView(java.awt.Component)

getRowHeader

public JViewport getRowHeader()
Returns the row header.
Returns:
the rowHeader property
See Also:
setRowHeader(javax.swing.JViewport)

setRowHeader

public void setRowHeader(JViewport rowHeader)
Removes the old rowHeader, if it exists. If the new rowHeader isn't null, syncs the y coordinate of its viewPosition with the viewport (if there is one) and then adds it to the scrollpane.

Most applications will find it more convenient to use setRowHeaderView to add a row header component and its viewport to the scrollpane.

Parameters:
rowHeader - the new row header to be used; if null the old row header is still removed and the new rowHeader is set to null
See Also:
getRowHeader(), setRowHeaderView(java.awt.Component)

setRowHeaderView

public void setRowHeaderView(Component view)
Creates a row-header viewport if necessary, sets its view and then adds the row-header viewport to the scrollpane. For example:
 JScrollPane scrollpane = new JScrollPane();
 scrollpane.setViewportView(myBigComponentToScroll);
 scrollpane.setRowHeaderView(myBigComponentsRowHeader);
Parameters:
view - the component to display as the row header
See Also:
setRowHeader(javax.swing.JViewport), JViewport.setView(java.awt.Component)

getColumnHeader

public JViewport getColumnHeader()
Returns the column header.
Returns:
the columnHeader property
See Also:
setColumnHeader(javax.swing.JViewport)

setColumnHeader

public void setColumnHeader(JViewport columnHeader)
Removes the old columnHeader, if it exists. If the new columnHeader isn't null, sync the x coordinate of the its viewPosition with the viewport (if there is one) and then add it to the scrollpane.

Most applications will find it more convenient to use setRowHeaderView to add a row header component and its viewport to the scrollpane.

See Also:
getColumnHeader(), setColumnHeaderView(java.awt.Component)

setColumnHeaderView

public void setColumnHeaderView(Component view)
Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane. For example:
 JScrollPane scrollpane = new JScrollPane();
 scrollpane.setViewportView(myBigComponentToScroll);
 scrollpane.setColumnHeaderView(myBigComponentsColumnHeader);
Parameters:
view - the component to display as the column header
See Also:
setColumnHeader(javax.swing.JViewport), JViewport.setView(java.awt.Component)

getCorner

public Component getCorner(String key)
Returns the component at the specified corner. The key value specifying the corner is one of:
  • JScrollPane.LOWER_LEFT_CORNER
  • JScrollPane.LOWER_RIGHT_CORNER
  • JScrollPane.UPPER_LEFT_CORNER
  • JScrollPane.UPPER_RIGHT_CORNER
  • JScrollPane.LOWER_LEADING_CORNER
  • JScrollPane.LOWER_TRAILING_CORNER
  • JScrollPane.UPPER_LEADING_CORNER
  • JScrollPane.UPPER_TRAILING_CORNER
Parameters:
key - one of the values as shown above
Returns:
one of the components listed below or null if key is invalid:
  • lowerLeft
  • lowerRight
  • upperLeft
  • upperRight
See Also:
setCorner(java.lang.String, java.awt.Component)

setCorner

public void setCorner(String key,
                      Component corner)
Adds a child that will appear in one of the scroll panes corners, if there's room. For example with both scrollbars showing (on the right and bottom edges of the scrollpane) the lower left corner component will be shown in the space between ends of the two scrollbars. Legal values for the key are:
  • JScrollPane.LOWER_LEFT_CORNER
  • JScrollPane.LOWER_RIGHT_CORNER
  • JScrollPane.UPPER_LEFT_CORNER
  • JScrollPane.UPPER_RIGHT_CORNER
  • JScrollPane.LOWER_LEADING_CORNER
  • JScrollPane.LOWER_TRAILING_CORNER
  • JScrollPane.UPPER_LEADING_CORNER
  • JScrollPane.UPPER_TRAILING_CORNER

Although "corner" doesn't match any beans property signature, PropertyChange events are generated with the property name set to the corner key.

Parameters:
key - identifies which corner the component will appear in
corner - one of the following components:
  • lowerLeft
  • lowerRight
  • upperLeft
  • upperRight
Throws:
IllegalArgumentException - if corner key is invalid

setComponentOrientation

public void setComponentOrientation(ComponentOrientation co)
Sets the orientation for the vertical and horizontal scrollbars as determined by the ComponentOrientation argument.
Overrides:
setComponentOrientation in class Component
Parameters:
co - one of the following values:
  • java.awt.ComponentOrientation.LEFT_TO_RIGHT
  • java.awt.ComponentOrientation.RIGHT_TO_LEFT
  • java.awt.ComponentOrientation.UNKNOWN
See Also:
ComponentOrientation

paramString

protected String paramString()
Returns a string representation of this JScrollPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JScrollPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JScrollPane. For scroll panes, the AccessibleContext takes the form of an AccessibleJScrollPane. A new AccessibleJScrollPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJScrollPane that serves as the AccessibleContext of this JScrollPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JSeparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSeparator

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSeparator
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
JPopupMenu.Separator, JToolBar.Separator
public class JSeparator
extends JComponent
implements SwingConstants, Accessible

An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings. Instead of using JSeparator directly, you can use the JMenu or JPopupMenu addSeparator method to create and add a separator.

For more information and examples see How to Use Menus, a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JSeparator.AccessibleJSeparator
This class implements accessibility support for the JSeparator class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JSeparator()
Creates a new horizontal separator.
JSeparator(int orientation)
Creates a new separator with the specified horizontal or vertical orientation.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JSeparator.
int | getOrientation() Returns the orientation of this separator.
SeparatorUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
protected String | paramString() Returns a string representation of this JSeparator.
void | setOrientation(int orientation) Sets the orientation of the separator.
void | setUI(SeparatorUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JSeparator

public JSeparator()
Creates a new horizontal separator.

JSeparator

public JSeparator(int orientation)
Creates a new separator with the specified horizontal or vertical orientation.
Parameters:
orientation - an integer specifying SwingConstants.HORIZONTAL or SwingConstants.VERTICAL
Throws:
IllegalArgumentException - if orientation is neither SwingConstants.HORIZONTAL nor SwingConstants.VERTICAL
Method Detail

getUI

public SeparatorUI getUI()
Returns the L&F object that renders this component.
Returns:
the SeparatorUI object that renders this component

setUI

public void setUI(SeparatorUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the SeparatorUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactorys.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "SeparatorUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getOrientation

public int getOrientation()
Returns the orientation of this separator.
Returns:
The value of the orientation property, one of the following constants defined in SwingConstants: VERTICAL, or HORIZONTAL.
See Also:
SwingConstants, setOrientation(int)

setOrientation

public void setOrientation(int orientation)
Sets the orientation of the separator. The default value of this property is HORIZONTAL.
Parameters:
orientation - either SwingConstants.HORIZONTAL or SwingConstants.VERTICAL
Throws:
IllegalArgumentException - if orientation is neither SwingConstants.HORIZONTAL nor SwingConstants.VERTICAL
See Also:
SwingConstants, getOrientation()

paramString

protected String paramString()
Returns a string representation of this JSeparator. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JSeparator

isFocusTraversable

public boolean isFocusTraversable()
Identifies whether or not this component can receive the focus. JSeparators cannot recieve focus.
Overrides:
isFocusTraversable in class JComponent
Returns:
false

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JSeparator. For separators, the AccessibleContext takes the form of an AccessibleJSeparator. A new AccessibleJSeparator instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJSeparator that serves as the AccessibleContext of this JSeparator
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JSlider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSlider

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSlider
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
public class JSlider
extends JComponent
implements SwingConstants, Accessible

A component that lets the user graphically select a value by slding a knob within a bounded interval. The slider can show both major tick marks and minor tick marks between them. The number of values between the tick marks is controlled with setMajorTickSpacing and setMinorTickSpacing.

For further information and examples see How to Use Sliders, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JSlider key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JSlider.AccessibleJSlider
This class implements accessibility support for the JSlider class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per slider instance since the event's only (read-only) state is the source property.
protected ChangeListener | changeListener The changeListener (no suffix) is the listener we add to the Sliders model.
protected int | majorTickSpacing The number of values between the major tick marks -- the larger marks that break up the minor tick marks.
protected int | minorTickSpacing The number of values between the minor tick marks -- the smaller marks that occur between the major tick marks.
protected int | orientation
protected BoundedRangeModel | sliderModel The data model that handles the numeric maximum value, minimum value, and current-position value for the slider.
protected boolean | snapToTicks If true, the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JSlider()
Creates a horizontal slider with the range 0 to 100 and an intitial value of 50.
JSlider(BoundedRangeModel brm)
Creates a horizontal slider using the specified BoundedRangeModel.
JSlider(int orientation)
Creates a slider using the specified orientation with the range 0 to 100 and an intitial value of 50.
JSlider(int min, int max)
Creates a horizontal slider using the specified min and max with an intitial value of 50.
JSlider(int min, int max, int value)
Creates a horizontal slider using the specified min, max and value.
JSlider(int orientation, int min, int max, int value)
Creates a slider with the specified orientation and the specified mimimum, maximum, and initial values.
Method Summary
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the slider.
protected ChangeListener | createChangeListener() Subclasses that want to handle model ChangeEvents differently can override this method to return their own ChangeListener implementation.
Hashtable | createStandardLabels(int increment) Creates a hashtable that will draw text labels starting at the slider minimum using the increment specified.
Hashtable | createStandardLabels(int increment, int start) Creates a hashtable that will draw text labels starting at the start point specified using the increment specified.
protected void | fireStateChanged() Send a ChangeEvent, whose source is this Slider, to each listener.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JSlider.
int | getExtent() Returns the "extent" -- the range of values "covered" by the knob.
boolean | getInverted() Returns true if the value-range shown for the slider is reversed,
Dictionary | getLabelTable() Returns the dictionary of what labels to draw at which values.
int | getMajorTickSpacing() This method returns the major tick spacing.
int | getMaximum() Returns the maximum value supported by the slider.
int | getMinimum() Returns the minimum value supported by the slider.
int | getMinorTickSpacing() This method returns the minor tick spacing.
BoundedRangeModel | getModel() Returns data model that handles the sliders three fundamental properties: minimum, maximum, value.
int | getOrientation() Return this slider's vertical or horizontal orientation.
boolean | getPaintLabels() Tells if labels are to be painted.
boolean | getPaintTicks() Tells if tick marks are to be painted.
boolean | getPaintTrack() Tells if the track (area the slider slides in) is to be painted.
boolean | getSnapToTicks() Returns true if the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
SliderUI | getUI() Gets the UI object which implements the L&F for this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
int | getValue() Returns the sliders value.
boolean | getValueIsAdjusting() True if the slider knob is being dragged.
protected String | paramString() Returns a string representation of this JSlider.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the slider.
void | setExtent(int extent) Sets the size of the range "covered" by the knob.
void | setInverted(boolean b) Specify true to reverse the value-range shown for the slider and false to put the value range in the normal order.
void | setLabelTable(Dictionary labels) Used to specify what label will be drawn at any given value.
void | setMajorTickSpacing(int n) This method sets the major tick spacing.
void | setMaximum(int maximum) Sets the models maximum property.
void | setMinimum(int minimum) Sets the models minimum property.
void | setMinorTickSpacing(int n) This method sets the minor tick spacing.
void | setModel(BoundedRangeModel newModel) Sets the model that handles the sliders three fundamental properties: minimum, maximum, value.
void | setOrientation(int orientation) Set the scrollbars orientation to either VERTICAL or HORIZONTAL.
void | setPaintLabels(boolean b) Determines whether labels are painted on the slider.
void | setPaintTicks(boolean b) Determines whether tick marks are painted on the slider.
void | setPaintTrack(boolean b) Determines whether the track is painted on the slider.
void | setSnapToTicks(boolean b) Specifying true makes the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
void | setUI(SliderUI ui) Sets the UI object which implements the L&F for this component.
void | setValue(int n) Sets the sliders current value.
void | setValueIsAdjusting(boolean b) Sets the models valueIsAdjusting property.
protected void | updateLabelUIs() Called internally to replace the label UIs with the latest versions from the UIFactory when the UIFactory notifies us via updateUI that the L&F has changed.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

sliderModel

protected BoundedRangeModel sliderModel
The data model that handles the numeric maximum value, minimum value, and current-position value for the slider.

majorTickSpacing

protected int majorTickSpacing
The number of values between the major tick marks -- the larger marks that break up the minor tick marks.

minorTickSpacing

protected int minorTickSpacing
The number of values between the minor tick marks -- the smaller marks that occur between the major tick marks.
See Also:
setMinorTickSpacing(int)

snapToTicks

protected boolean snapToTicks
If true, the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob. The default is false.
See Also:
setSnapToTicks(boolean)

orientation

protected int orientation
See Also:
setOrientation(int)

changeListener

protected ChangeListener changeListener
The changeListener (no suffix) is the listener we add to the Sliders model. By default this listener just forwards events to ChangeListeners (if any) added directly to the slider.
See Also:
addChangeListener(javax.swing.event.ChangeListener), createChangeListener()

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per slider instance since the event's only (read-only) state is the source property. The source of events generated here is always "this". The event is lazily created the first time that an event notification is fired.
See Also:
fireStateChanged()
Constructor Detail

JSlider

public JSlider()
Creates a horizontal slider with the range 0 to 100 and an intitial value of 50.

JSlider

public JSlider(int orientation)
Creates a slider using the specified orientation with the range 0 to 100 and an intitial value of 50.

JSlider

public JSlider(int min,
               int max)
Creates a horizontal slider using the specified min and max with an intitial value of 50.

JSlider

public JSlider(int min,
               int max,
               int value)
Creates a horizontal slider using the specified min, max and value.

JSlider

public JSlider(int orientation,
               int min,
               int max,
               int value)
Creates a slider with the specified orientation and the specified mimimum, maximum, and initial values.
Throws:
IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL
See Also:
setOrientation(int), setMinimum(int), setMaximum(int), setValue(int)

JSlider

public JSlider(BoundedRangeModel brm)
Creates a horizontal slider using the specified BoundedRangeModel.
Method Detail

getUI

public SliderUI getUI()
Gets the UI object which implements the L&F for this component.
Returns:
the SliderUI object that implements the Slider L&F

setUI

public void setUI(SliderUI ui)
Sets the UI object which implements the L&F for this component.
Parameters:
ui - the SliderUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the default UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
"SliderUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createChangeListener

protected ChangeListener createChangeListener()
Subclasses that want to handle model ChangeEvents differently can override this method to return their own ChangeListener implementation. The default ChangeListener just forwards ChangeEvents to the ChangeListeners added directly to the slider.
See Also:
fireStateChanged()

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the slider.
Parameters:
l - the ChangeListener to add
See Also:
fireStateChanged(), removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the slider.
Parameters:
l - the ChangeListener to remove
See Also:
fireStateChanged(), addChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Send a ChangeEvent, whose source is this Slider, to each listener. This method method is called each time a ChangeEvent is received from the model.
See Also:
addChangeListener(javax.swing.event.ChangeListener), EventListenerList

getModel

public BoundedRangeModel getModel()
Returns data model that handles the sliders three fundamental properties: minimum, maximum, value.
See Also:
setModel(javax.swing.BoundedRangeModel)

setModel

public void setModel(BoundedRangeModel newModel)
Sets the model that handles the sliders three fundamental properties: minimum, maximum, value.
See Also:
getModel()

getValue

public int getValue()
Returns the sliders value.
Returns:
the models value property
See Also:
setValue(int)

setValue

public void setValue(int n)
Sets the sliders current value. This method just forwards the value to the model.
See Also:
getValue()

getMinimum

public int getMinimum()
Returns the minimum value supported by the slider.
Returns:
the value of the models minimum property
See Also:
setMinimum(int)

setMinimum

public void setMinimum(int minimum)
Sets the models minimum property.
See Also:
getMinimum(), BoundedRangeModel.setMinimum(int)

getMaximum

public int getMaximum()
Returns the maximum value supported by the slider.
Returns:
the value of the models maximum property
See Also:
setMaximum(int)

setMaximum

public void setMaximum(int maximum)
Sets the models maximum property.
See Also:
getMaximum(), BoundedRangeModel.setMaximum(int)

getValueIsAdjusting

public boolean getValueIsAdjusting()
True if the slider knob is being dragged.
Returns:
the value of the models valueIsAdjusting property
See Also:
setValueIsAdjusting(boolean)

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)
Sets the models valueIsAdjusting property. Slider look and feel implementations should set this property to true when a knob drag begins, and to false when the drag ends. The slider model will not generate ChangeEvents while valueIsAdjusting is true.
See Also:
getValueIsAdjusting(), BoundedRangeModel.setValueIsAdjusting(boolean)

getExtent

public int getExtent()
Returns the "extent" -- the range of values "covered" by the knob.
Returns:
an int representing the extent
See Also:
setExtent(int), BoundedRangeModel.getExtent()

setExtent

public void setExtent(int extent)
Sets the size of the range "covered" by the knob. Most look and feel implementations will change the value by this amount if the user clicks on either side of the knob.
See Also:
getExtent(), BoundedRangeModel.setExtent(int)

getOrientation

public int getOrientation()
Return this slider's vertical or horizontal orientation.
Returns:
VERTICAL or HORIZONTAL
See Also:
setOrientation(int)

setOrientation

public void setOrientation(int orientation)
Set the scrollbars orientation to either VERTICAL or HORIZONTAL.
Throws:
IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL
See Also:
getOrientation()

getLabelTable

public Dictionary getLabelTable()
Returns the dictionary of what labels to draw at which values.
Returns:
the Dictionary containing labels and where to draw them

setLabelTable

public void setLabelTable(Dictionary labels)
Used to specify what label will be drawn at any given value. The key-value pairs are of this format: { Integer value, java.swing.JComponent label }.
See Also:
createStandardLabels(int), getLabelTable()

updateLabelUIs

protected void updateLabelUIs()
Called internally to replace the label UIs with the latest versions from the UIFactory when the UIFactory notifies us via updateUI that the L&F has changed.
See Also:
JComponent.updateUI()

createStandardLabels

public Hashtable createStandardLabels(int increment)
Creates a hashtable that will draw text labels starting at the slider minimum using the increment specified. If you call createStandardLabels( 10 ) and the slider minimum is zero, then it will make labels for the values 0, 10, 20, 30, and so on.
See Also:
setLabelTable(java.util.Dictionary)

createStandardLabels

public Hashtable createStandardLabels(int increment,
                                      int start)
Creates a hashtable that will draw text labels starting at the start point specified using the increment specified. If you call createStandardLabels( 10, 2 ), then it will make labels for the values 2, 12, 22, 32, and so on.
Throws:
IllegalArgumentException - if slider label start point out of range or if label increment is less than or equal to zero
See Also:
setLabelTable(java.util.Dictionary)

getInverted

public boolean getInverted()
Returns true if the value-range shown for the slider is reversed,
Returns:
true if the slider values are reversed from their normal order
See Also:
setInverted(boolean)

setInverted

public void setInverted(boolean b)
Specify true to reverse the value-range shown for the slider and false to put the value range in the normal order. The order depends on the slider's ComponentOrientation property. Normal (non-inverted) horizontal sliders with a ComponentOrientation value of LEFT_TO_RIGHT have their maximum on the right. Normal horizontal sliders with a ComponentOrientation value of RIGHT_TO_LEFT have their maximum on the left. Normal vertical sliders have their maximum on the top. These labels are reversed when the slider is inverted.
Parameters:
b - true to reverse the slider values from their normal order

getMajorTickSpacing

public int getMajorTickSpacing()
This method returns the major tick spacing. The number that is returned represents the distance, measured in values, between each major tick mark. If you have a slider with a range from 0 to 50 and the major tick spacing is set to 10, you will get major ticks next to the following values: 0, 10, 20, 30, 40, 50.
Returns:
the number of values between major ticks
See Also:
setMajorTickSpacing(int)

setMajorTickSpacing

public void setMajorTickSpacing(int n)
This method sets the major tick spacing. The number that is passed-in represents the distance, measured in values, between each major tick mark. If you have a slider with a range from 0 to 50 and the major tick spacing is set to 10, you will get major ticks next to the following values: 0, 10, 20, 30, 40, 50.
See Also:
getMajorTickSpacing()

getMinorTickSpacing

public int getMinorTickSpacing()
This method returns the minor tick spacing. The number that is returned represents the distance, measured in values, between each minor tick mark. If you have a slider with a range from 0 to 50 and the minor tick spacing is set to 10, you will get minor ticks next to the following values: 0, 10, 20, 30, 40, 50.
Returns:
the number of values between minor ticks
See Also:
getMinorTickSpacing()

setMinorTickSpacing

public void setMinorTickSpacing(int n)
This method sets the minor tick spacing. The number that is passed-in represents the distance, measured in values, between each minor tick mark. If you have a slider with a range from 0 to 50 and the minor tick spacing is set to 10, you will get minor ticks next to the following values: 0, 10, 20, 30, 40, 50.
See Also:
getMinorTickSpacing()

getSnapToTicks

public boolean getSnapToTicks()
Returns true if the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
Returns:
true if the value snaps to the nearest tick mark, else false
See Also:
setSnapToTicks(boolean)

setSnapToTicks

public void setSnapToTicks(boolean b)
Specifying true makes the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.
Parameters:
b - true to snap the knob to the nearest tick mark
See Also:
getSnapToTicks()

getPaintTicks

public boolean getPaintTicks()
Tells if tick marks are to be painted.
Returns:
true if tick marks are painted, else false
See Also:
setPaintTicks(boolean)

setPaintTicks

public void setPaintTicks(boolean b)
Determines whether tick marks are painted on the slider.
See Also:
getPaintTicks()

getPaintTrack

public boolean getPaintTrack()
Tells if the track (area the slider slides in) is to be painted.
Returns:
true if track is painted, else false
See Also:
setPaintTrack(boolean)

setPaintTrack

public void setPaintTrack(boolean b)
Determines whether the track is painted on the slider.
See Also:
getPaintTrack()

getPaintLabels

public boolean getPaintLabels()
Tells if labels are to be painted.
Returns:
true if labels are painted, else false
See Also:
setPaintLabels(boolean)

setPaintLabels

public void setPaintLabels(boolean b)
Determines whether labels are painted on the slider.
See Also:
getPaintLabels()

paramString

protected String paramString()
Returns a string representation of this JSlider. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JSlider.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JSlider. For sliders, the AccessibleContext takes the form of an AccessibleJSlider. A new AccessibleJSlider instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJSlider that serves as the AccessibleContext of this JSlider
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JSplitPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JSplitPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSplitPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JSplitPane
extends JComponent
implements Accessible

JSplitPane is used to divide two (and only two) Components. The two Components are graphically divided based on the look and feel implementation, and the two Components can then be interactively resized by the user. Information on using JSplitPane is in How to Use Split Panes in The Java Tutorial.

The two Components in a split pane can be aligned left to right using JSplitPane.HORIZONTAL_SPLIT, or top to bottom using JSplitPane.VERTICAL_SPLIT. The preferred way to change the size of the Components is to invoke setDividerLocation where location is either the new x or y position, depending on the orientation of the JSplitPane.

To resize the Components to their preferred sizes invoke resetToPreferredSizes.

When the user is resizing the Components the minimum size of the Components is used to determine the maximum/minimum position the Components can be set to. If the minimum size of the two components is greater than the size of the split pane the divider will not allow you to resize it. To alter the minimum size of a JComponent, see JComponent.setMinimumSize(java.awt.Dimension).

When the user resizes the split pane the new space is distributed between the two components based on the resizeWeight property. A value of 0, the default, indicates the right/bottom component gets all the space, where as a value of 1 indicates the left/top component gets all the space.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JSplitPane key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
setDividerLocation(double), resetToPreferredSizes(), Serialized Form

Inner Class Summary
protected  class JSplitPane.AccessibleJSplitPane
This class implements accessibility support for the JSplitPane class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static String | BOTTOM Used to add a Component below the other Component.
static String | CONTINUOUS_LAYOUT_PROPERTY Bound property name for continuousLayout.
protected boolean | continuousLayout Whether or not the views are continuously redisplayed while resizing.
static String | DIVIDER Used to add a Component that will represent the divider.
static String | DIVIDER_LOCATION_PROPERTY Bound property for the dividerLocation.
static String | DIVIDER_SIZE_PROPERTY Bound property name for border.
protected int | dividerSize Size of the divider.
static int | HORIZONTAL_SPLIT Horizontal split indicates the Components are split along the x axis.
static String | LAST_DIVIDER_LOCATION_PROPERTY Bound property for lastLocation.
protected int | lastDividerLocation Previous location of the split pane.
static String | LEFT Used to add a Component to the left of the other Component.
protected Component | leftComponent The left or top component.
static String | ONE_TOUCH_EXPANDABLE_PROPERTY Bound property for oneTouchExpandable.
protected boolean | oneTouchExpandable Is a little widget provided to quickly expand/collapse the split pane?
protected int | orientation How the views are split.
static String | ORIENTATION_PROPERTY Bound property name for orientation (horizontal or vertical).
static String | RESIZE_WEIGHT_PROPERTY Bound property for weight.
static String | RIGHT Used to add a Component to the right of the other Component.
protected Component | rightComponent The right or bottom component.
static String | TOP Used to add a Component above the other Component.
static int | VERTICAL_SPLIT Vertical split indicates the Components are split along the y axis.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JSplitPane()
Creates a new JSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.
JSplitPane(int newOrientation)
Creates a new JSplitPane configured with the specified orientation and no continuous layout.
JSplitPane(int newOrientation, boolean newContinuousLayout)
Creates a new JSplitPane with the specified orientation and redrawing style.
JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and redrawing style, and with the specified components.
JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) Adds the specified component to this split pane.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JSplitPane.
Component | getBottomComponent() Returns the component below, or to the right of the divider.
int | getDividerLocation() Returns the last value passed to setDividerLocation.
int | getDividerSize() Returns the size of the divider.
int | getLastDividerLocation() Returns the last location the divider was at.
Component | getLeftComponent() Returns the component to the left (or above) the divider.
int | getMaximumDividerLocation() Returns the maximum location of the divider from the look and feel implementation.
int | getMinimumDividerLocation() Returns the minimum location of the divider from the look and feel implementation.
int | getOrientation() Returns the orientation.
double | getResizeWeight() Returns the number that determines how extra space is distributed.
Component | getRightComponent() Returns the component to the right (or below) the divider.
Component | getTopComponent() Returns the component above, or to the left of the divider.
SplitPaneUI | getUI() Returns the SplitPaneUI that is providing the current look and feel.
String | getUIClassID() Returns the name of the L&F class that renders this component.
boolean | isContinuousLayout() Returns true if the child comopnents are continuously redisplayed and layed out during user intervention.
boolean | isOneTouchExpandable() Returns true if the pane provides a UI widget to collapse/expand the divider.
boolean | isValidateRoot() Returns true, so that calls to revalidate on any descendant of this JSplitPane will cause a request to be queued that will validate the JSplitPane and all its descendants.
protected void | paintChildren(Graphics g) Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
protected String | paramString() Returns a string representation of this JSplitPane.
void | remove(Component component) Removes the child component, component from the pane.
void | remove(int index) Removes the Component at the specified index.
void | removeAll() Removes all the child components from the split pane.
void | resetToPreferredSizes() Lays out the JSplitPane layout based on the preferred size of the children components.
void | setBottomComponent(Component comp) Sets the component below, or to the right of the divider.
void | setContinuousLayout(boolean newContinuousLayout) Sets whether or not the child components are continuously redisplayed and layed out during user intervention.
void | setDividerLocation(double proportionalLocation) Sets the divider location as a percentage of the JSplitPane's size.
void | setDividerLocation(int location) Sets the location of the divider.
void | setDividerSize(int newSize) Sets the size of the divider.
void | setLastDividerLocation(int newLastLocation) Sets the last location the divider was at to newLastLocation.
void | setLeftComponent(Component comp) Sets the component to the left (or above) the divider.
void | setOneTouchExpandable(boolean newValue) Determines whether the JSplitPane provides a UI widget on the divider to quickly expand/collapse the divider.
void | setOrientation(int orientation) Sets the orientation, or how the splitter is divided.
void | setResizeWeight(double value) Specifies how to distribute extra space when the size of the split pane changes.
void | setRightComponent(Component comp) Sets the component to the right (or below) the divider.
void | setTopComponent(Component comp) Sets the component above, or to the left of the divider.
void | setUI(SplitPaneUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

VERTICAL_SPLIT

public static final int VERTICAL_SPLIT
Vertical split indicates the Components are split along the y axis. For example the two Components will be split one on top of the other.

HORIZONTAL_SPLIT

public static final int HORIZONTAL_SPLIT
Horizontal split indicates the Components are split along the x axis. For example the two Components will be split one to the left of the other.

LEFT

public static final String LEFT
Used to add a Component to the left of the other Component.

RIGHT

public static final String RIGHT
Used to add a Component to the right of the other Component.

TOP

public static final String TOP
Used to add a Component above the other Component.

BOTTOM

public static final String BOTTOM
Used to add a Component below the other Component.

DIVIDER

public static final String DIVIDER
Used to add a Component that will represent the divider.

ORIENTATION_PROPERTY

public static final String ORIENTATION_PROPERTY
Bound property name for orientation (horizontal or vertical).

CONTINUOUS_LAYOUT_PROPERTY

public static final String CONTINUOUS_LAYOUT_PROPERTY
Bound property name for continuousLayout.

DIVIDER_SIZE_PROPERTY

public static final String DIVIDER_SIZE_PROPERTY
Bound property name for border.

ONE_TOUCH_EXPANDABLE_PROPERTY

public static final String ONE_TOUCH_EXPANDABLE_PROPERTY
Bound property for oneTouchExpandable.

LAST_DIVIDER_LOCATION_PROPERTY

public static final String LAST_DIVIDER_LOCATION_PROPERTY
Bound property for lastLocation.

DIVIDER_LOCATION_PROPERTY

public static final String DIVIDER_LOCATION_PROPERTY
Bound property for the dividerLocation.
Since:
1.3

RESIZE_WEIGHT_PROPERTY

public static final String RESIZE_WEIGHT_PROPERTY
Bound property for weight.
Since:
1.3.

orientation

protected int orientation
How the views are split.

continuousLayout

protected boolean continuousLayout
Whether or not the views are continuously redisplayed while resizing.

leftComponent

protected Component leftComponent
The left or top component.

rightComponent

protected Component rightComponent
The right or bottom component.

dividerSize

protected int dividerSize
Size of the divider.

oneTouchExpandable

protected boolean oneTouchExpandable
Is a little widget provided to quickly expand/collapse the split pane?

lastDividerLocation

protected int lastDividerLocation
Previous location of the split pane.
Constructor Detail

JSplitPane

public JSplitPane()
Creates a new JSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.

JSplitPane

public JSplitPane(int newOrientation)
Creates a new JSplitPane configured with the specified orientation and no continuous layout.
Parameters:
newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
Throws:
IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.

JSplitPane

public JSplitPane(int newOrientation,
                  boolean newContinuousLayout)
Creates a new JSplitPane with the specified orientation and redrawing style.
Parameters:
newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
newContinuousLayout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw
Throws:
IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT

JSplitPane

public JSplitPane(int newOrientation,
                  Component newLeftComponent,
                  Component newRightComponent)
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
Parameters:
newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
newLeftComponent - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane
newRightComponent - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane
Throws:
IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT

JSplitPane

public JSplitPane(int newOrientation,
                  boolean newContinuousLayout,
                  Component newLeftComponent,
                  Component newRightComponent)
Creates a new JSplitPane with the specified orientation and redrawing style, and with the specified components.
Parameters:
newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
newContinuousLayout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw
newLeftComponent - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane
newRightComponent - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane
Throws:
IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
Method Detail

setUI

public void setUI(SplitPaneUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the SplitPaneUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

getUI

public SplitPaneUI getUI()
Returns the SplitPaneUI that is providing the current look and feel.
Returns:
the SplitPaneUI object that renders this component

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "SplitPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setDividerSize

public void setDividerSize(int newSize)
Sets the size of the divider.
Parameters:
newSize - an integer giving the size of the divider in pixels

getDividerSize

public int getDividerSize()
Returns the size of the divider.
Returns:
an integer giving the size of the divider in pixels

setLeftComponent

public void setLeftComponent(Component comp)
Sets the component to the left (or above) the divider.
Parameters:
comp - the Component to display in that position

getLeftComponent

public Component getLeftComponent()
Returns the component to the left (or above) the divider.
Returns:
the Component displayed in that position

setTopComponent

public void setTopComponent(Component comp)
Sets the component above, or to the left of the divider.
Parameters:
comp - the Component to display in that position

getTopComponent

public Component getTopComponent()
Returns the component above, or to the left of the divider.
Returns:
the Component displayed in that position

setRightComponent

public void setRightComponent(Component comp)
Sets the component to the right (or below) the divider.
Parameters:
comp - the Component to display in that position

getRightComponent

public Component getRightComponent()
Returns the component to the right (or below) the divider.
Returns:
the Component displayed in that position

setBottomComponent

public void setBottomComponent(Component comp)
Sets the component below, or to the right of the divider.
Parameters:
comp - the Component to display in that position

getBottomComponent

public Component getBottomComponent()
Returns the component below, or to the right of the divider.
Returns:
the Component displayed in that position

setOneTouchExpandable

public void setOneTouchExpandable(boolean newValue)
Determines whether the JSplitPane provides a UI widget on the divider to quickly expand/collapse the divider.
Parameters:
newValue - a boolean, where true means to provide a collapse/expand widget

isOneTouchExpandable

public boolean isOneTouchExpandable()
Returns true if the pane provides a UI widget to collapse/expand the divider.
Returns:
true if the split pane provides a collapse/expand widget

setLastDividerLocation

public void setLastDividerLocation(int newLastLocation)
Sets the last location the divider was at to newLastLocation.
Parameters:
newLastLocation - an integer specifying the last divider location in pixels, from the left (or upper) edge of the pane to the left (or upper) edge of the divider

getLastDividerLocation

public int getLastDividerLocation()
Returns the last location the divider was at.
Returns:
an integer specifying the last divider location as a count of pixels from the left (or upper) edge of the pane to the left (or upper) edge of the divider

setOrientation

public void setOrientation(int orientation)
Sets the orientation, or how the splitter is divided. The options are:
  • JSplitPane.VERTICAL_SPLIT (above/below orientation of components)
  • JSplitPane.HORIZONTAL_SPLIT (left/right orientation of components)
Parameters:
orientation - an integer specifying the orientation
Throws:
IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT.

getOrientation

public int getOrientation()
Returns the orientation.
Returns:
an integer giving the orientation
See Also:
setOrientation(int)

setContinuousLayout

public void setContinuousLayout(boolean newContinuousLayout)
Sets whether or not the child components are continuously redisplayed and layed out during user intervention.
Parameters:
newContinuousLayout - a boolean, true if the components are continuously redrawn as the divider changes position

isContinuousLayout

public boolean isContinuousLayout()
Returns true if the child comopnents are continuously redisplayed and layed out during user intervention.
Returns:
true if the components are continuously redrawn as the divider changes position

setResizeWeight

public void setResizeWeight(double value)
Specifies how to distribute extra space when the size of the split pane changes. A value of 0, the default, indicates the right/bottom component gets all the extra space (the left/top component acts fixed), where as a value of 1 specifies the left/top component gets all the extra space (the right/bottom component acts fixed). Specifically, the left/top component gets (weight * diff) extra space and the right/bottom component gets (1 - weight) * diff extra space.
Parameters:
value - as described above
Throws:
IllegalArgumentException - if value is <0 or="or"> 1
Since:
1.3

getResizeWeight

public double getResizeWeight()
Returns the number that determines how extra space is distributed.
Returns:
how extra space is to be distributed on a resize of the split pane
Since:
1.3

resetToPreferredSizes

public void resetToPreferredSizes()
Lays out the JSplitPane layout based on the preferred size of the children components. This will likely result in changing the divider location.

setDividerLocation

public void setDividerLocation(double proportionalLocation)
Sets the divider location as a percentage of the JSplitPane's size.

This method is implemented in terms of setDividerLocation(int). This method immediately changes the size of the split pane based on its current size. If the split pane is not correctly realized and on screen, this method will have no effect (new divider location will become (current size * proportionalLocation) which is 0).

Parameters:
proportionalLocation - a double-precision floating point value that specifies a percentage, from zero (top/left) to 1.0 (bottom/right)
Throws:
IllegalArgumentException - if the specified location is <0 or="or"> 1.0

setDividerLocation

public void setDividerLocation(int location)
Sets the location of the divider. This is passed off to the look and feel implementation, and then listeners are notified. A value less than 0 implies the divider should be reset to a value that attempts to honor the preferred size of the left/top component. After notifying the listeners, the last divider location is updated, via setLastDividerLocation.
Parameters:
location - an int specifying a UI-specific value (typically a pixel count)

getDividerLocation

public int getDividerLocation()
Returns the last value passed to setDividerLocation. The value returned from this method may differ from the actual divider location (if setDividerLocation was passed a value bigger than the curent size).
Returns:
an integer specifying the location of the divider

getMinimumDividerLocation

public int getMinimumDividerLocation()
Returns the minimum location of the divider from the look and feel implementation.
Returns:
an integer specifying a UI-specific value for the minimum location (typically a pixel count); or -1 if the UI is null

getMaximumDividerLocation

public int getMaximumDividerLocation()
Returns the maximum location of the divider from the look and feel implementation.
Returns:
an integer specifying a UI-specific value for the maximum location (typically a pixel count); or -1 if the UI is null

remove

public void remove(Component component)
Removes the child component, component from the pane. Resets the leftComponent or rightComponent instance variable, as necessary.
Overrides:
remove in class Container
Parameters:
component - the Component to remove

remove

public void remove(int index)
Removes the Component at the specified index. Updates the leftComponent and rightComponent instance variables as necessary, and then messages super.
Overrides:
remove in class Container
Parameters:
index - an integer specifying the component to remove, where 1 specifies the left/top component and 2 specifies the bottom/right component

removeAll

public void removeAll()
Removes all the child components from the split pane. Resets the leftComonent and rightComponent instance variables.
Overrides:
removeAll in class Container
Following copied from class: java.awt.Container
See Also:
Container.add(java.awt.Component), Container.remove(int)

isValidateRoot

public boolean isValidateRoot()
Returns true, so that calls to revalidate on any descendant of this JSplitPane will cause a request to be queued that will validate the JSplitPane and all its descendants.
Overrides:
isValidateRoot in class JComponent
Returns:
true
See Also:
JComponent.revalidate()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Adds the specified component to this split pane. If constraints identifies the left/top or right/bottom child component, and a component with that identifier was previously added, it will be removed and then comp will be added in its place. If constraints is not one of the known identifers the layout manager may throw an IllegalArgumentException.

The possible constraints objects (Strings) are:

  • JSplitPane.TOP
  • JSplitPane.LEFT
  • JSplitPane.BOTTOM
  • JSplitPane.RIGHT
If the constraints object is null, the component is added in the first available position (left/top if open, else right/bottom).
Overrides:
addImpl in class Container
Parameters:
comp - the component to add
constraints - an Object specifying the layout constraints (position) for this component
index - an integer specifying the index in the container's list.
Throws:
IllegalArgumentException - if the constraints object does not match an existing component
See Also:
Container.addImpl(Component, Object, int)

paintChildren

protected void paintChildren(Graphics g)
Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
Overrides:
paintChildren in class JComponent
Parameters:
g - the Graphics context within which to paint

paramString

protected String paramString()
Returns a string representation of this JSplitPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JSplitPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JSplitPane. For split panes, the AccessibleContext takes the form of an AccessibleJSplitPane. A new AccessibleJSplitPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJSplitPane that serves as the AccessibleContext of this JSplitPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTabbedPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTabbedPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTabbedPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
public class JTabbedPane
extends JComponent
implements Serializable, Accessible, SwingConstants

A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon. For examples and information on using tabbed panes see How to Use Tabbed Panes, a section in The Java Tutorial.

Tabs/components are added to a TabbedPane object by using the addTab and insertTab methods. A tab is represented by an index corresponding to the position it was added in, where the first tab has an index equal to 0 and the last tab has an index equal to the tab count minus 1.

The TabbedPane uses a SingleSelectionModel to represent the set of tab indices and the currently selected index. If the tab count is greater than 0, then there will always be a selected index, which by default will be initialized to the first tab. If the tab count is 0, then the selected index will be -1.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTabbedPane key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
SingleSelectionModel, Serialized Form

Inner Class Summary
protected class | JTabbedPane.AccessibleJTabbedPane This class implements accessibility support for the JTabbedPane class.
protected class | JTabbedPane.ModelListener We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property.
protected ChangeListener | changeListener The changeListener is the listener we add to the model.
protected SingleSelectionModel | model The default selection model
protected int | tabPlacement Where the tabs are placed.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTabbedPane()
Creates an empty TabbedPane.
JTabbedPane(int tabPlacement)
Creates an empty TabbedPane with the specified tab placement of either: TOP, BOTTOM, LEFT, or RIGHT.
Method Summary
Component | add(Component component) Adds a component with a tab title defaulting to the name of the component.
Component | add(Component component, int index) Adds a component at the specified tab index with a tab title defaulting to the name of the component.
void | add(Component component, Object constraints) Adds a component to the tabbed pane.
void | add(Component component, Object constraints, int index) Adds a component at the specified tab index.
Component | add(String title, Component component) Adds a component with the specified tab title.
void | addChangeListener(ChangeListener l) Adds a ChangeListener to this tabbedpane.
void | addTab(String title, Component component) Adds a component represented by a title and no icon.
void | addTab(String title, Icon icon, Component component) Adds a component represented by a title and/or icon, either of which can be null.
void | addTab(String title, Icon icon, Component component, String tip) Adds a component and tip represented by a title and/or icon, either of which can be null.
protected ChangeListener | createChangeListener() Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
protected void | fireStateChanged() Send a ChangeEvent, whose source is this tabbedpane, to each listener.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTabbedPane.
Color | getBackgroundAt(int index) Returns the tab background color at index.
Rectangle | getBoundsAt(int index) Returns the tab bounds at index.
Component | getComponentAt(int index) Returns the component at index.
Icon | getDisabledIconAt(int index) Returns the tab disabled icon at index.
Color | getForegroundAt(int index) Returns the tab foreground color at index.
Icon | getIconAt(int index) Returns the tab icon at index.
SingleSelectionModel | getModel() Returns the model associated with this tabbedpane.
Component | getSelectedComponent() Returns the currently selected component for this tabbedpane.
int | getSelectedIndex() Returns the currently selected index for this tabbedpane.
int | getTabCount() Returns the number of tabs in this tabbedpane.
int | getTabPlacement() Returns the placement of the tabs for this tabbedpane.
int | getTabRunCount() Returns the number of tab runs currently used to display the tabs.
String | getTitleAt(int index) Returns the tab title at index.
String | getToolTipText(MouseEvent event) Returns the tooltip text for the component determined by the mouse event location.
String | getToolTipTextAt(int index) Returns the tab tooltip text at index.
TabbedPaneUI | getUI() Returns the UI object which implements the L&F for this component.
String | getUIClassID() Returns the name of the UI class that implements the L&F for this component.
int | indexOfComponent(Component component) Returns the index of the tab for the specified component.
int | indexOfTab(Icon icon) Returns the first tab index with a given icon, or -1 if no tab has this icon.
int | indexOfTab(String title) Returns the first tab index with a given title, or -1 if no tab has this title.
void | insertTab(String title, Icon icon, Component component, String tip, int index) Inserts a component, at index, represented by a title and/or icon, either of which may be null.
boolean | isEnabledAt(int index) Returns whether or not the tab at index is currently enabled.
protected String | paramString() Returns a string representation of this JTabbedPane.
void | remove(Component component) Removes the tab which corresponds to the specified component.
void | remove(int index) Removes the tab and component which corresponds to the specified index.
void | removeAll() Removes all the tabs and their corresponding components from the tabbedpane.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from this tabbedpane.
void | removeTabAt(int index) Removes the tab at index.
void | setBackgroundAt(int index, Color background) Sets the background color at index to background which can be null, in which case the tab's background color will default to the background color of the tabbedpane.
void | setComponentAt(int index, Component component) Sets the component at index to component.
void | setDisabledIconAt(int index, Icon disabledIcon) Sets the disabled icon at index to icon which can be null.
void | setEnabledAt(int index, boolean enabled) Sets whether or not the tab at index is enabled.
void | setForegroundAt(int index, Color foreground) Sets the foreground color at index to foreground which can be null, in which case the tab's foreground color will default to the foreground color of this tabbedpane.
void | setIconAt(int index, Icon icon) Sets the icon at index to icon which can be null.
void | setModel(SingleSelectionModel model) Sets the model to be used with this tabbedpane.
void | setSelectedComponent(Component c) Sets the selected component for this tabbedpane.
void | setSelectedIndex(int index) Sets the selected index for this tabbedpane.
void | setTabPlacement(int tabPlacement) Sets the tab placement for this tabbedpane.
void | setTitleAt(int index, String title) Sets the title at index to title which can be null.
void | setToolTipTextAt(int index, String toolTipText) Sets the tooltip text at index to toolTipText which can be null.
void | setUI(TabbedPaneUI ui) Sets the UI object which implements the L&F for this component.
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

tabPlacement

protected int tabPlacement
Where the tabs are placed.
See Also:
setTabPlacement(int)

model

protected SingleSelectionModel model
The default selection model

changeListener

protected ChangeListener changeListener
The changeListener is the listener we add to the model.

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".
Constructor Detail

JTabbedPane

public JTabbedPane()
Creates an empty TabbedPane. The default tab placement is TOP.
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)

JTabbedPane

public JTabbedPane(int tabPlacement)
Creates an empty TabbedPane with the specified tab placement of either: TOP, BOTTOM, LEFT, or RIGHT.
Parameters:
tabPlacement - the placement for the tabs relative to the content
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String)
Method Detail

getUI

public TabbedPaneUI getUI()
Returns the UI object which implements the L&F for this component.
See Also:
setUI(javax.swing.plaf.TabbedPaneUI)

setUI

public void setUI(TabbedPaneUI ui)
Sets the UI object which implements the L&F for this component.
Parameters:
ui - the new UI object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Called to replace the UI with the latest version from the default UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the UI class that implements the L&F for this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "TabbedPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createChangeListener

protected ChangeListener createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
See Also:
fireStateChanged()

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to this tabbedpane.
Parameters:
l - the ChangeListener to add
See Also:
fireStateChanged(), removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from this tabbedpane.
Parameters:
l - the ChangeListener to remove
See Also:
fireStateChanged(), addChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Send a ChangeEvent, whose source is this tabbedpane, to each listener. This method method is called each time a ChangeEvent is received from the model.
See Also:
addChangeListener(javax.swing.event.ChangeListener), EventListenerList

getModel

public SingleSelectionModel getModel()
Returns the model associated with this tabbedpane.
See Also:
setModel(javax.swing.SingleSelectionModel)

setModel

public void setModel(SingleSelectionModel model)
Sets the model to be used with this tabbedpane.
Parameters:
model - the model to be used
See Also:
getModel()

getTabPlacement

public int getTabPlacement()
Returns the placement of the tabs for this tabbedpane.
See Also:
setTabPlacement(int)

setTabPlacement

public void setTabPlacement(int tabPlacement)
Sets the tab placement for this tabbedpane. Possible values are:
  • SwingConstants.TOP
  • SwingConstants.BOTTOM
  • SwingConstants.LEFT
  • SwingConstants.RIGHT
The default value, if not set, is SwingConstants.TOP.
Parameters:
tabPlacement - the placement for the tabs relative to the content
Throws:
IllegalArgumentException - if tab placement value isn't one of the above valid values

getSelectedIndex

public int getSelectedIndex()
Returns the currently selected index for this tabbedpane. Returns -1 if there is no currently selected tab.
Returns:
the index of the selected tab
See Also:
setSelectedIndex(int)

setSelectedIndex

public void setSelectedIndex(int index)
Sets the selected index for this tabbedpane.
Parameters:
index - the index to be selected
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getSelectedIndex(), SingleSelectionModel.setSelectedIndex(int)

getSelectedComponent

public Component getSelectedComponent()
Returns the currently selected component for this tabbedpane. Returns null if there is no currently selected tab.
Returns:
the component corresponding to the selected tab
See Also:
setSelectedComponent(java.awt.Component)

setSelectedComponent

public void setSelectedComponent(Component c)
Sets the selected component for this tabbedpane. This will automatically set the selectedIndex to the index corresponding to the specified component.
Throws:
IllegalArgumentException - if component not found in tabbed pane
See Also:
getSelectedComponent()

insertTab

public void insertTab(String title,
                      Icon icon,
                      Component component,
                      String tip,
                      int index)
Inserts a component, at index, represented by a title and/or icon, either of which may be null. Uses java.util.Vector internally, see insertElementAt for details of insertion conventions.
Parameters:
title - the title to be displayed in this tab
icon - the icon to be displayed in this tab
component - The component to be displayed when this tab is clicked.
tip - the tooltip to be displayed for this tab
index - the position to insert this new tab
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String), removeTabAt(int)

addTab

public void addTab(String title,
                   Icon icon,
                   Component component,
                   String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null. Cover method for insertTab.
Parameters:
title - the title to be displayed in this tab
icon - the icon to be displayed in this tab
component - The component to be displayed when this tab is clicked.
tip - the tooltip to be displayed for this tab
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

addTab

public void addTab(String title,
                   Icon icon,
                   Component component)
Adds a component represented by a title and/or icon, either of which can be null. Cover method for insertTab.
Parameters:
title - the title to be displayed in this tab
icon - the icon to be displayed in this tab
component - the component to be displayed when this tab is clicked
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

addTab

public void addTab(String title,
                   Component component)
Adds a component represented by a title and no icon. Cover method for insertTab.
Parameters:
title - the title to be displayed in this tab
component - The component to be displayed when this tab is clicked.
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

add

public Component add(Component component)
Adds a component with a tab title defaulting to the name of the component. Cover method for insertTab.
Overrides:
add in class Container
Parameters:
component - the component to be displayed when this tab is clicked
Returns:
the component
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

add

public Component add(String title,
                     Component component)
Adds a component with the specified tab title. Cover method for insertTab.
Overrides:
add in class Container
Parameters:
title - the title to be displayed in this tab
component - the component to be displayed when this tab is clicked
Returns:
the component
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

add

public Component add(Component component,
                     int index)
Adds a component at the specified tab index with a tab title defaulting to the name of the component. Cover method for insertTab.
Overrides:
add in class Container
Parameters:
component - the component to be displayed when this tab is clicked
index - the position to insert this new tab
Returns:
the component
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

add

public void add(Component component,
                Object constraints)
Adds a component to the tabbed pane. If constraints is a String or an Icon, it will be used for the tab title, otherwise the component's name will be used as the tab title. Cover method for insertTab.
Overrides:
add in class Container
Parameters:
component - the component to be displayed when this tab is clicked
constraints - the object to be displayed in the tab
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

add

public void add(Component component,
                Object constraints,
                int index)
Adds a component at the specified tab index. If constraints is a String or an Icon, it will be used for the tab title, otherwise the component's name will be used as the tab title. Cover method for insertTab.
Overrides:
add in class Container
Parameters:
component - the component to be displayed when this tab is clicked
index - the position to insert this new tab
See Also:
insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int), removeTabAt(int)

removeTabAt

public void removeTabAt(int index)
Removes the tab at index. After the component associated with index is removed, its visibility is reset to true to ensure it will be visible if added to other containers.
Parameters:
index - the index of the tab to be removed
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String), insertTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String, int)

remove

public void remove(Component component)
Removes the tab which corresponds to the specified component.
Overrides:
remove in class Container
Parameters:
component - the component to remove from the tabbedpane
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String), removeTabAt(int)

remove

public void remove(int index)
Removes the tab and component which corresponds to the specified index.
Overrides:
remove in class Container
Parameters:
index - the index of the component to remove from the tabbedpane
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String), removeTabAt(int)

removeAll

public void removeAll()
Removes all the tabs and their corresponding components from the tabbedpane.
Overrides:
removeAll in class Container
See Also:
addTab(java.lang.String, javax.swing.Icon, java.awt.Component, java.lang.String), removeTabAt(int)

getTabCount

public int getTabCount()
Returns the number of tabs in this tabbedpane.
Returns:
an integer specifying the number of tabbed pages

getTabRunCount

public int getTabRunCount()
Returns the number of tab runs currently used to display the tabs.
Returns:
an integer giving the number of rows if the tabPlacement is TOP or BOTTOM and the number of columns if tabPlacement is LEFT or RIGHT, or 0 if there is no UI set on this tabbedpane

getTitleAt

public String getTitleAt(int index)
Returns the tab title at index.
Parameters:
index - the index of the item being queried
Returns:
the title at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setTitleAt(int, java.lang.String)

getIconAt

public Icon getIconAt(int index)
Returns the tab icon at index.
Parameters:
index - the index of the item being queried
Returns:
the icon at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setIconAt(int, javax.swing.Icon)

getDisabledIconAt

public Icon getDisabledIconAt(int index)
Returns the tab disabled icon at index.
Parameters:
index - the index of the item being queried
Returns:
the icon at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setDisabledIconAt(int, javax.swing.Icon)

getToolTipTextAt

public String getToolTipTextAt(int index)
Returns the tab tooltip text at index.
Parameters:
index - the index of the item being queried
Returns:
a string containing the tool tip text at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setToolTipTextAt(int, java.lang.String)

getBackgroundAt

public Color getBackgroundAt(int index)
Returns the tab background color at index.
Parameters:
index - the index of the item being queried
Returns:
the Color of the tab background at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setBackgroundAt(int, java.awt.Color)

getForegroundAt

public Color getForegroundAt(int index)
Returns the tab foreground color at index.
Parameters:
index - the index of the item being queried
Returns:
the Color of the tab foreground at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setForegroundAt(int, java.awt.Color)

isEnabledAt

public boolean isEnabledAt(int index)
Returns whether or not the tab at index is currently enabled.
Parameters:
index - the index of the item being queried
Returns:
true if the tab at index is enabled; false otherwise
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setEnabledAt(int, boolean)

getComponentAt

public Component getComponentAt(int index)
Returns the component at index.
Parameters:
index - the index of the item being queried
Returns:
the Component at index
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
setComponentAt(int, java.awt.Component)

getBoundsAt

public Rectangle getBoundsAt(int index)
Returns the tab bounds at index. If the tab at this index is not currently visible in the UI, then returns null. If there is no UI set on this tabbedpane, then returns null.
Parameters:
index - the index to be queried
Returns:
a Rectangle containing the tab bounds at index, or null if tab at index is not currently visible in the UI, or if there is no UI set on this tabbedpane

setTitleAt

public void setTitleAt(int index,
                       String title)
Sets the title at index to title which can be null. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the title should be set
title - the title to be displayed in the tab
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getTitleAt(int)

setIconAt

public void setIconAt(int index,
                      Icon icon)
Sets the icon at index to icon which can be null. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the icon should be set
icon - the icon to be displayed in the tab
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getIconAt(int)

setDisabledIconAt

public void setDisabledIconAt(int index,
                              Icon disabledIcon)
Sets the disabled icon at index to icon which can be null. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the disabled icon should be set
icon - the icon to be displayed in the tab when disabled
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getDisabledIconAt(int)

setToolTipTextAt

public void setToolTipTextAt(int index,
                             String toolTipText)
Sets the tooltip text at index to toolTipText which can be null. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the tooltip text should be set
toolTipText - the tooltip text to be displayed for the tab
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getToolTipTextAt(int)

setBackgroundAt

public void setBackgroundAt(int index,
                            Color background)
Sets the background color at index to background which can be null, in which case the tab's background color will default to the background color of the tabbedpane. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the background should be set
background - the color to be displayed in the tab's background
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getBackgroundAt(int)

setForegroundAt

public void setForegroundAt(int index,
                            Color foreground)
Sets the foreground color at index to foreground which can be null, in which case the tab's foreground color will default to the foreground color of this tabbedpane. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where the foreground should be set
foreground - the color to be displayed as the tab's foreground
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getForegroundAt(int)

setEnabledAt

public void setEnabledAt(int index,
                         boolean enabled)
Sets whether or not the tab at index is enabled. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index which should be enabled/disabled
enabled - whether or not the tab should be enabled
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
isEnabledAt(int)

setComponentAt

public void setComponentAt(int index,
                           Component component)
Sets the component at index to component. An internal exception is raised if there is no tab at that index.
Parameters:
index - the tab index where this component is being placed
component - the component for the tab
Throws:
IllegalArgumentException - if index is out of bounds
See Also:
getComponentAt(int)

indexOfTab

public int indexOfTab(String title)
Returns the first tab index with a given title, or -1 if no tab has this title.
Parameters:
title - the title for the tab
Returns:
the first tab index which matches title, or -1 if no tab has this title

indexOfTab

public int indexOfTab(Icon icon)
Returns the first tab index with a given icon, or -1 if no tab has this icon.
Parameters:
icon - the icon for the tab
Returns:
the first tab index which matches icon, or -1 if no tab has this icon

indexOfComponent

public int indexOfComponent(Component component)
Returns the index of the tab for the specified component. Returns -1 if there is no tab for this component.
Parameters:
component - the component for the tab
Returns:
the first tab which matches this component, or -1 if there is no tab for this component

getToolTipText

public String getToolTipText(MouseEvent event)
Returns the tooltip text for the component determined by the mouse event location.
Overrides:
getToolTipText in class JComponent
Parameters:
event - the MouseEvent that tells where the cursor is lingering
Returns:
the String containing the tooltip text
Throws:
IllegalArgumentException - if index is out of bounds

paramString

protected String paramString()
Returns a string representation of this JTabbedPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JTabbedPane.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTabbedPane. For tabbed panes, the AccessibleContext takes the form of an AccessibleJTabbedPane. A new AccessibleJTabbedPane instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJTabbedPane that serves as the AccessibleContext of this JTabbedPane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTable

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTable
All Implemented Interfaces:
Accessible, CellEditorListener, EventListener, ImageObserver, ListSelectionListener, MenuContainer, Scrollable, Serializable, TableColumnModelListener, TableModelListener
public class JTable
extends JComponent
implements TableModelListener, Scrollable, TableColumnModelListener, ListSelectionListener, CellEditorListener, Accessible

JTable is a user-interface component that presents data in a two-dimensional table format. See How to Use Tables in The Java Tutorial for task-oriented documentation and examples of using JTable.

The JTable has many facilities that make it possible to customize its rendering and editing but provides defaults for these features so that simple tables can be set up easily. For example, to set up a table with 10 rows and 10 columns of numbers:

      TableModel dataModel = new AbstractTableModel() {
          public int getColumnCount() { return 10; }
          public int getRowCount() { return 10;}
          public Object getValueAt(int row, int col) { return new Integer(row*col); }
      };
      JTable table = new JTable(dataModel);
      JScrollPane scrollpane = new JScrollPane(table);

Because the JTable is now much easier to set up with custom models the DefaultTableModel is less useful than it was in previous releases. Instead of copying the data in an application into the DefaultTableModel, we recommend wrapping it in the methods of the TableModel interface and passing the real data to the JTable as above. This technique is nearly as concise as using a DefaultTableModel and starting this way has a number of advantages over the longer term. In particular: it is a scalable technique, can more easily handle dynamic or editable tables, and often results in much more efficient applications because the model is free to choose the internal representation that best suits the data.

The "Table" directory in the examples/demo area gives a number of complete examples of JTable usage, covering how the JTable can be used to provide an editable view of data taken from a database and how to modify the columns in the display to use specialized renderers and editors. For example, overriding AbstractTableModel's getColumnClass method to return a value of ImageIcon.class for a given column allows icons to be displayed, while returning a value of Number.class allows digits to be right-justified in the column.

The JTable uses integers exclusively to refer to both the rows and the columns of the model that it displays. The JTable simply takes a tabular range of cells and uses getValueAt(int, int) to retrieve and display the appropriate values from the model.

If getTableHeader().setReorderingAllowed(boolean) is used to enable column reordering columns may be rearranged in the JTable so that the view's columns appear in a different order to the columns in the model. This does not affect the implementation of the model at all: when the columns are reordered, the JTable maintains the new order of the columns internally and converts its column indices before querying the model.

So, when writing a TableModel, it is not necessary to listen for column reordering events as the model will be queried in its own coordinate system regardless of what is happening in the view. In the examples area there is a demonstration of a sorting algorithm making use of exactly this technique to interpose yet another coordinate system where the order of the rows is changed, rather than the order of the columns.

The general rule for the JTable API and the APIs of all its associated classes, including the column model and both the row and column selection models, is: methods using integer indices for rows and columns always use the coordinate system of the view. There are three exceptions to this rule:

  • All references to rows and columns in the TableModel interface are in the coordinate system of the model.
  • The index modelIndex in the TableColumn constructors refers to the index of the column in the model, not the view.
  • All constructors for the TableModelEvent, which describes changes that have taken place in a table model, use the coordinate system of the model.
The TableColumn provides a slot for holding an identifier or "tag" for each column, and the JTable and TableColumnModel both support getColumn(Object id) conveniences for locating columns by their identifier. If no identifier is explicitly set, the TableColumn returns its header value (the name of the column) as a default. A different identifier, which can be of any type, can be set using the TableColumn's setIdentifier method. All of the JTable's functions operate correctly regardless of the type and uniqueness of these identifiers.

The convertColumnIndexToView and convertColumnIndexToModel methods have been provided to convert between the two coordinate systems but they are rarely needed during normal use.

As for all JComponent classes, you can use InputMap and ActionMap to associate an Action object with a KeyStroke and execute the action under specified conditions.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTable key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JTable.AccessibleJTable
This class implements accessibility support for the JTable class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static int | AUTO_RESIZE_ALL_COLUMNS During all resize operations, proportionately resize all columns.
static int | AUTO_RESIZE_LAST_COLUMN During all resize operations, apply adjustments to the last column only.
static int | AUTO_RESIZE_NEXT_COLUMN When a column is adjusted in the UI, adjust the next column the opposite way.
static int | AUTO_RESIZE_OFF Do not adjust column widths automatically; use a scrollbar.
static int | AUTO_RESIZE_SUBSEQUENT_COLUMNS During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.
protected boolean | autoCreateColumnsFromModel The table will query the TableModel to build the default set of columns if this is true.
protected int | autoResizeMode Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.
protected TableCellEditor | cellEditor The object that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.
protected boolean | cellSelectionEnabled Obsolete as of Java 2 platform v1.3.
protected TableColumnModel | columnModel The TableColumnModel of the table.
protected TableModel | dataModel The TableModel of the table.
protected Hashtable | defaultEditorsByColumnClass A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
protected Hashtable | defaultRenderersByColumnClass A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
protected int | editingColumn Identifies the column of the cell being edited.
protected int | editingRow Identifies the row of the cell being edited.
protected Component | editorComp If editing, the Component that is handling the editing.
protected Color | gridColor The color of the grid.
protected Dimension | preferredViewportSize Used by the Scrollable interface to determine the initial visible area.
protected int | rowHeight The height in pixels of each row in the table.
protected int | rowMargin The height in pixels of the margin between the cells in each row.
protected boolean | rowSelectionAllowed True if row selection is allowed in this table.
protected Color | selectionBackground The background color of selected cells.
protected Color | selectionForeground The foreground color of selected cells.
protected ListSelectionModel | selectionModel The ListSelectionModel of the table, used to keep track of row selections.
protected boolean | showHorizontalLines The table draws horizontal lines between cells if showHorizontalLines is true.
protected boolean | showVerticalLines The table draws vertical lines between cells if showVerticalLines is true.
protected JTableHeader | tableHeader The TableHeader working with the table.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTable()
Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
JTable(int numRows, int numColumns)
Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel.
JTable(Object[][] rowData, Object[] columnNames)
Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.
JTable(TableModel dm)
Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
JTable(TableModel dm, TableColumnModel cm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.
JTable(Vector rowData, Vector columnNames)
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.
Method Summary
void | addColumn(TableColumn aColumn) Appends aColumn to the end of the array of columns held by this JTable's column model.
void | addColumnSelectionInterval(int index0, int index1) Adds the columns from index0 to index1, inclusive, to the current selection.
void | addNotify() Calls the configureEnclosingScrollPane method.
void | addRowSelectionInterval(int index0, int index1) Adds the rows from index0 to index1, inclusive, to the current selection.
void | changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) Updates the selection models of the table, depending on the state of the two flags: toggle and extend.
void | clearSelection() Deselects all selected columns and rows.
void | columnAdded(TableColumnModelEvent e) Invoked when a column is added to the table column model.
int | columnAtPoint(Point point) Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
void | columnMarginChanged(ChangeEvent e) Invoked when a column is moved due to a margin change.
void | columnMoved(TableColumnModelEvent e) Invoked when a column is repositioned.
void | columnRemoved(TableColumnModelEvent e) Invoked when a column is removed from the table column model.
void | columnSelectionChanged(ListSelectionEvent e) Invoked when the selection model of the TableColumnModel is changed.
protected void | configureEnclosingScrollPane() If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane.
int | convertColumnIndexToModel(int viewColumnIndex) Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model.
int | convertColumnIndexToView(int modelColumnIndex) Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view.
protected TableColumnModel | createDefaultColumnModel() Returns the default column model object, which is a DefaultTableColumnModel.
void | createDefaultColumnsFromModel() Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
protected TableModel | createDefaultDataModel() Returns the default table model object, which is a DefaultTableModel.
protected void | createDefaultEditors() Creates default cell editors for objects, numbers, and boolean values.
protected void | createDefaultRenderers() Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.
protected ListSelectionModel | createDefaultSelectionModel() Returns the default selection model object, which is a DefaultListSelectionModel.
protected JTableHeader | createDefaultTableHeader() Returns the default table header object, which is a JTableHeader.
static JScrollPane | createScrollPaneForTable(JTable aTable) Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).
void | doLayout() Causes this table to lay out its rows and columns.
boolean | editCellAt(int row, int column) Programmatically starts editing the cell at row and column, if the cell is editable.
boolean | editCellAt(int row, int column, EventObject e) Programmatically starts editing the cell at row and column, if the cell is editable.
void | editingCanceled(ChangeEvent e) Invoked when editing is canceled.
void | editingStopped(ChangeEvent e) Invoked when editing is finished.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTable.
boolean | getAutoCreateColumnsFromModel() Determines whether the table will create default columns from the model.
int | getAutoResizeMode() Returns the auto resize mode of the table.
TableCellEditor | getCellEditor() Returns the cell editor.
TableCellEditor | getCellEditor(int row, int column) Returns an appropriate editor for the cell specified by row and column.
Rectangle | getCellRect(int row, int column, boolean includeSpacing) Returns a rectangle for the cell that lies at the intersection of row and column.
TableCellRenderer | getCellRenderer(int row, int column) Returns an appropriate renderer for the cell specified by this row and column.
boolean | getCellSelectionEnabled() Returns true if both row and column selection models are enabled.
TableColumn | getColumn(Object identifier) Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
Class | getColumnClass(int column) Returns the type of the column appearing in the view at column position column.
int | getColumnCount() Returns the number of columns in the column model.
TableColumnModel | getColumnModel() Returns the TableColumnModel that contains all column information of this table.
String | getColumnName(int column) Returns the name of the column appearing in the view at column position column.
boolean | getColumnSelectionAllowed() Returns true if columns can be selected.
TableCellEditor | getDefaultEditor(Class columnClass) Returns the editor to be used when no editor has been set in a TableColumn.
TableCellRenderer | getDefaultRenderer(Class columnClass) Returns the cell renderer to be used when no renderer has been set in a TableColumn.
int | getEditingColumn() Returns the index of the column that contains the cell currently being edited.
int | getEditingRow() Returns the index of the row that contains the cell currently being edited.
Component | getEditorComponent() Returns the component that is handling the editing session.
Color | getGridColor() Returns the color used to draw grid lines.
Dimension | getIntercellSpacing() Returns the horizontal and vertical space between cells.
TableModel | getModel() Returns the TableModel that provides the data displayed by this JTable.
Dimension | getPreferredScrollableViewportSize() Returns the preferred size of the viewport for this table.
int | getRowCount() Returns the number of rows in this table's model.
int | getRowHeight() Returns the height of a table row, in pixels.
int | getRowHeight(int row) Returns the height, in pixels, of the cells in row.
int | getRowMargin() Gets the amount of empty space, in pixels, between cells.
boolean | getRowSelectionAllowed() Returns true if rows can be selected.
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Returns visibleRect.height or visibleRect.width, depending on this table's orientation.
boolean | getScrollableTracksViewportHeight() Returns false to indicate that the height of the viewport does not determine the height of the table.
boolean | getScrollableTracksViewportWidth() Returns false to indicate that the width of the viewport does not determine the width of the table.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).
int | getSelectedColumn() Returns the index of the first selected column, -1 if no column is selected.
int | getSelectedColumnCount() Returns the number of selected columns.
int[] | getSelectedColumns() Returns the indices of all selected columns.
int | getSelectedRow() Returns the index of the first selected row, -1 if no row is selected.
int | getSelectedRowCount() Returns the number of selected rows.
int[] | getSelectedRows() Returns the indices of all selected rows.
Color | getSelectionBackground() Returns the background color for selected cells.
Color | getSelectionForeground() Returns the foreground color for selected cells.
ListSelectionModel | getSelectionModel() Returns the ListSelectionModel that is used to maintain row selection state.
boolean | getShowHorizontalLines() Returns true if the table draws horizontal lines between cells, false if it doesn't.
boolean | getShowVerticalLines() Returns true if the table draws vertical lines between cells, false if it doesn't.
JTableHeader | getTableHeader() Returns the tableHeader used by this JTable.
String | getToolTipText(MouseEvent event) Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.
TableUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the suffix used to construct the name of the L&F class used to render this component.
Object | getValueAt(int row, int column) Returns the cell value at row and column.
protected void | initializeLocalVars() Initializes table properties to their default values.
boolean | isCellEditable(int row, int column) Returns true if the cell at row and column is editable.
boolean | isCellSelected(int row, int column) Returns true if the cell at the specified position is selected.
boolean | isColumnSelected(int column) Returns true if the column at the specified index is selected.
boolean | isEditing() Returns true if a cell is being edited.
boolean | isFocusTraversable() We override this method, whose implementation in JComponent returns false, to return true.
boolean | isManagingFocus() We override this method, whose implementation in JComponent returns false, to return true.
boolean | isRowSelected(int row) Returns true if the row at the specified index is selected.
void | moveColumn(int column, int targetColumn) Moves the column column to the position currently occupied by the column targetColumn in the view.
protected String | paramString() Returns a string representation of this table.
Component | prepareEditor(TableCellEditor editor, int row, int column) Prepares the editor by querying the data model for the value and selection state of the cell at row, column.
Component | prepareRenderer(TableCellRenderer renderer, int row, int column) Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
protected boolean | processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) Invoked to process the key bindings for ks as the result of the KeyEvent e.
void | removeColumn(TableColumn aColumn) Removes aColumn from this JTable's array of columns.
void | removeColumnSelectionInterval(int index0, int index1) Deselects the columns from index0 to index1, inclusive.
void | removeEditor() Discards the editor object and frees the real estate it used for cell rendering.
void | removeNotify() Calls the unconfigureEnclosingScrollPane method.
void | removeRowSelectionInterval(int index0, int index1) Deselects the rows from index0 to index1, inclusive.
protected void | resizeAndRepaint() Equivalent to revalidate followed by repaint.
int | rowAtPoint(Point point) Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
void | selectAll() Selects all rows, columns, and cells in the table.
void | setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel) Sets this table's autoCreateColumnsFromModel flag.
void | setAutoResizeMode(int mode) Sets the table's auto resize mode when the table is resized.
void | setCellEditor(TableCellEditor anEditor) Sets the cellEditor variable.
void | setCellSelectionEnabled(boolean cellSelectionEnabled) Sets whether this table allows both a column selection and a row selection to exist simultaneously.
void | setColumnModel(TableColumnModel columnModel) Sets the column model for this table to newModel and registers for listener notifications from the new column model.
void | setColumnSelectionAllowed(boolean columnSelectionAllowed) Sets whether the columns in this model can be selected.
void | setColumnSelectionInterval(int index0, int index1) Selects the columns from index0 to index1, inclusive.
void | setDefaultEditor(Class columnClass, TableCellEditor editor) Sets a default cell editor to be used if no editor has been set in a TableColumn.
void | setDefaultRenderer(Class columnClass, TableCellRenderer renderer) Sets a default cell renderer to be used if no renderer has been set in a TableColumn.
void | setEditingColumn(int aColumn) Sets the editingColumn variable.
void | setEditingRow(int aRow) Sets the editingRow variable.
void | setGridColor(Color gridColor) Sets the color used to draw grid lines to gridColor and redisplays.
void | setIntercellSpacing(Dimension intercellSpacing) Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
void | setModel(TableModel dataModel) Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
void | setPreferredScrollableViewportSize(Dimension size) Sets the preferred size of the viewport for this table.
void | setRowHeight(int rowHeight) Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints.
void | setRowHeight(int row, int rowHeight) Sets the height for row to rowHeight, revalidates, and repaints.
void | setRowMargin(int rowMargin) Sets the amount of empty space between cells in adjacent rows.
void | setRowSelectionAllowed(boolean rowSelectionAllowed) Sets whether the rows in this model can be selected.
void | setRowSelectionInterval(int index0, int index1) Selects the rows from index0 to index1, inclusive.
void | setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.
void | setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.
void | setSelectionMode(int selectionMode) Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
void | setSelectionModel(ListSelectionModel newModel) Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.
void | setShowGrid(boolean showGrid) Sets whether the table draws grid lines around cells.
void | setShowHorizontalLines(boolean showHorizontalLines) Sets whether the table draws horizontal lines between cells.
void | setShowVerticalLines(boolean showVerticalLines) Sets whether the table draws vertical lines between cells.
void | setTableHeader(JTableHeader tableHeader) Sets the tableHeader working with this JTable to newHeader.
void | setUI(TableUI ui) Sets the L&F object that renders this component and repaints.
void | setValueAt(Object aValue, int row, int column) Sets the value for the cell in the table model at row and column.
void | sizeColumnsToFit(boolean lastColumnOnly) Deprecated. As of Swing version 1.0.3, replaced by sizeColumnsToFit(int).
void | sizeColumnsToFit(int resizingColumn) Resizes one or more of the columns in the table so that the total width of all of this JTable's columns is equal to the width of the table.
void | tableChanged(TableModelEvent e) Invoked when this table's TableModel generates a TableModelEvent.
protected void | unconfigureEnclosingScrollPane() Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null.
void | updateUI() Notification from the UIManager that the L&F has changed.
void | valueChanged(ListSelectionEvent e) Invoked when the row selection changes -- repaints to show the new selection.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

AUTO_RESIZE_OFF

public static final int AUTO_RESIZE_OFF
Do not adjust column widths automatically; use a scrollbar.

AUTO_RESIZE_NEXT_COLUMN

public static final int AUTO_RESIZE_NEXT_COLUMN
When a column is adjusted in the UI, adjust the next column the opposite way.

AUTO_RESIZE_SUBSEQUENT_COLUMNS

public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS
During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.

AUTO_RESIZE_LAST_COLUMN

public static final int AUTO_RESIZE_LAST_COLUMN
During all resize operations, apply adjustments to the last column only.

AUTO_RESIZE_ALL_COLUMNS

public static final int AUTO_RESIZE_ALL_COLUMNS
During all resize operations, proportionately resize all columns.

dataModel

protected TableModel dataModel
The TableModel of the table.

columnModel

protected TableColumnModel columnModel
The TableColumnModel of the table.

selectionModel

protected ListSelectionModel selectionModel
The ListSelectionModel of the table, used to keep track of row selections.

tableHeader

protected JTableHeader tableHeader
The TableHeader working with the table.

rowHeight

protected int rowHeight
The height in pixels of each row in the table.

rowMargin

protected int rowMargin
The height in pixels of the margin between the cells in each row.

gridColor

protected Color gridColor
The color of the grid.

showHorizontalLines

protected boolean showHorizontalLines
The table draws horizontal lines between cells if showHorizontalLines is true.

showVerticalLines

protected boolean showVerticalLines
The table draws vertical lines between cells if showVerticalLines is true.

autoResizeMode

protected int autoResizeMode
Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.

autoCreateColumnsFromModel

protected boolean autoCreateColumnsFromModel
The table will query the TableModel to build the default set of columns if this is true.

preferredViewportSize

protected Dimension preferredViewportSize
Used by the Scrollable interface to determine the initial visible area.

rowSelectionAllowed

protected boolean rowSelectionAllowed
True if row selection is allowed in this table.

cellSelectionEnabled

protected boolean cellSelectionEnabled
Obsolete as of Java 2 platform v1.3. Please use the rowSelectionAllowed property and the columnSelectionAllowed property of the columnModel instead. Or use the method getCellSelectionEnabled.

editorComp

protected transient Component editorComp
If editing, the Component that is handling the editing.

cellEditor

protected transient TableCellEditor cellEditor
The object that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.

editingColumn

protected transient int editingColumn
Identifies the column of the cell being edited.

editingRow

protected transient int editingRow
Identifies the row of the cell being edited.

defaultRenderersByColumnClass

protected transient Hashtable defaultRenderersByColumnClass
A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.

defaultEditorsByColumnClass

protected transient Hashtable defaultEditorsByColumnClass
A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.

selectionForeground

protected Color selectionForeground
The foreground color of selected cells.

selectionBackground

protected Color selectionBackground
The background color of selected cells.
Constructor Detail

JTable

public JTable()
Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
See Also:
createDefaultDataModel(),
createDefaultColumnModel(),
createDefaultSelectionModel()

JTable

public JTable(TableModel dm)
Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
Parameters:
dm - the data model for the table
See Also:
createDefaultColumnModel(), createDefaultSelectionModel()

JTable

public JTable(TableModel dm,
              TableColumnModel cm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
Parameters:
dm - the data model for the table
cm - the column model for the table
See Also:
createDefaultSelectionModel()

JTable

public JTable(TableModel dm,
              TableColumnModel cm,
              ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model. If any of the parameters are null this method will initialize the table with the corresponding default model. The autoCreateColumnsFromModel flag is set to false if cm is non-null, otherwise it is set to true and the column model is populated with suitable TableColumns for the columns in dm.
Parameters:
dm - the data model for the table
cm - the column model for the table
sm - the row selection model for the table
See Also:
createDefaultDataModel(),
createDefaultColumnModel(),
createDefaultSelectionModel()

JTable

public JTable(int numRows,
              int numColumns)
Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel. The columns will have names of the form "A", "B", "C", etc.
Parameters:
numRows - the number of rows the table holds
numColumns - the number of columns the table holds
See Also:
DefaultTableModel

JTable

public JTable(Vector rowData,
              Vector columnNames)
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames. The Vectors contained in rowData should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code:

((Vector)rowData.elementAt(1)).elementAt(5);

Each row must contain a value for each column or an exception will be raised.

Parameters:
rowData - the data for the new table
columnNames - names of each column

JTable

public JTable(Object[][] rowData,
              Object[] columnNames)
Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames. rowData is an array of rows, so the value of the cell at row 1, column 5 can be obtained with the following code:

 rowData[1][5];

All rows must be of the same length as columnNames.

Parameters:
rowData - the data for the new table
columnNames - names of each column
Method Detail

addNotify

public void addNotify()
Calls the configureEnclosingScrollPane method.
Overrides:
addNotify in class JComponent
See Also:
configureEnclosingScrollPane()

configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane. When a JTable is added to a JScrollPane in the usual way, using new JScrollPane(myTable), addNotify is called in the JTable (when the table is added to the viewport). JTable's addNotify method in turn calls this method, which is protected so that this default installation procedure can be overridden by a subclass.
See Also:
addNotify()

removeNotify

public void removeNotify()
Calls the unconfigureEnclosingScrollPane method.
Overrides:
removeNotify in class JComponent
See Also:
unconfigureEnclosingScrollPane()

unconfigureEnclosingScrollPane

protected void unconfigureEnclosingScrollPane()
Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null. JTable's removeNotify method calls this method, which is protected so that this default uninstallation procedure can be overridden by a subclass.
See Also:
removeNotify(), configureEnclosingScrollPane()

createScrollPaneForTable

public static JScrollPane createScrollPaneForTable(JTable aTable)
Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).

Equivalent to new JScrollPane(aTable).

setTableHeader

public void setTableHeader(JTableHeader tableHeader)
Sets the tableHeader working with this JTable to newHeader. It is legal to have a null tableHeader.
Parameters:
newHeader - new tableHeader
See Also:
getTableHeader()

getTableHeader

public JTableHeader getTableHeader()
Returns the tableHeader used by this JTable.
Returns:
the tableHeader used by this table
See Also:
setTableHeader(javax.swing.table.JTableHeader)

setRowHeight

public void setRowHeight(int rowHeight)
Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints. The height of the cells in this row will be equal to the row height minus the row margin.
Parameters:
rowHeight - new row height
Throws:
IllegalArgumentException - if rowHeight is less than 1
See Also:
getRowHeight()

getRowHeight

public int getRowHeight()
Returns the height of a table row, in pixels. The default row height is 16.0.
Returns:
the height in pixels of a table row
See Also:
setRowHeight(int)

setRowHeight

public void setRowHeight(int row,
                         int rowHeight)
Sets the height for row to rowHeight, revalidates, and repaints. The height of the cells in this row will be equal to the row height minus the row margin.
Parameters:
row - the row whose height is being changed
rowHeight - new row height, in pixels
Throws:
IllegalArgumentException - if rowHeight is less than 1

getRowHeight

public int getRowHeight(int row)
Returns the height, in pixels, of the cells in row.
Parameters:
row - the row whose height is to be returned
Returns:
the height, in pixels, of the cells in the row

setRowMargin

public void setRowMargin(int rowMargin)
Sets the amount of empty space between cells in adjacent rows.
Parameters:
rowMargin - the number of pixels between cells in a row
See Also:
getRowMargin()

getRowMargin

public int getRowMargin()
Gets the amount of empty space, in pixels, between cells. Equivalent to: getIntercellSpacing().height.
Returns:
the number of pixels between cells in a row
See Also:
setRowMargin(int)

setIntercellSpacing

public void setIntercellSpacing(Dimension intercellSpacing)
Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
Parameters:
intercellSpacing - a Dimension specifying the new width and height between cells
See Also:
getIntercellSpacing()

getIntercellSpacing

public Dimension getIntercellSpacing()
Returns the horizontal and vertical space between cells. The default spacing is (1, 1), which provides room to draw the grid.
Returns:
the horizontal and vertical spacing between cells
See Also:
setIntercellSpacing(java.awt.Dimension)

setGridColor

public void setGridColor(Color gridColor)
Sets the color used to draw grid lines to gridColor and redisplays. The default color is Color.gray.
Parameters:
gridColor - the new color of the grid lines
Throws:
IllegalArgumentException - if gridColor is null
See Also:
getGridColor()

getGridColor

public Color getGridColor()
Returns the color used to draw grid lines. The default color is Color.gray.
Returns:
the color used to draw grid lines
See Also:
setGridColor(java.awt.Color)

setShowGrid

public void setShowGrid(boolean showGrid)
Sets whether the table draws grid lines around cells. If showGrid is true it does; if it is false it doesn't. There is no getShowGrid method as this state is held in two variables -- showHorizontalLines and showVerticalLines -- each of which can be queried independently.
Parameters:
showGrid - true if table view should draw grid lines
See Also:
setShowVerticalLines(boolean), setShowHorizontalLines(boolean)

setShowHorizontalLines

public void setShowHorizontalLines(boolean showHorizontalLines)
Sets whether the table draws horizontal lines between cells. If showHorizontalLines is true it does; if it is false it doesn't.
Parameters:
showHorizontalLines - true if table view should draw horizontal lines
See Also:
getShowHorizontalLines(), setShowGrid(boolean), setShowVerticalLines(boolean)

setShowVerticalLines

public void setShowVerticalLines(boolean showVerticalLines)
Sets whether the table draws vertical lines between cells. If showVerticalLines is true it does; if it is false it doesn't.
Parameters:
showVerticalLines - true if table view should draw vertical lines
See Also:
getShowVerticalLines(), setShowGrid(boolean), setShowHorizontalLines(boolean)

getShowHorizontalLines

public boolean getShowHorizontalLines()
Returns true if the table draws horizontal lines between cells, false if it doesn't. The default is true.
Returns:
true if the table draws horizontal lines between cells, false if it doesn't
See Also:
setShowHorizontalLines(boolean)

getShowVerticalLines

public boolean getShowVerticalLines()
Returns true if the table draws vertical lines between cells, false if it doesn't. The default is true.
Returns:
true if the table draws vertical lines between cells, false if it doesn't
See Also:
setShowVerticalLines(boolean)

setAutoResizeMode

public void setAutoResizeMode(int mode)
Sets the table's auto resize mode when the table is resized.
Parameters:
mode - One of 5 legal values: AUTO_RESIZE_OFF, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_SUBSEQUENT_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_ALL_COLUMNS
See Also:
getAutoResizeMode(), sizeColumnsToFit(int)

getAutoResizeMode

public int getAutoResizeMode()
Returns the auto resize mode of the table. The default mode is AUTO_RESIZE_SUBSEQUENT_COLUMNS.
Returns:
the autoResizeMode of the table
See Also:
setAutoResizeMode(int), sizeColumnsToFit(int)

setAutoCreateColumnsFromModel

public void setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel)
Sets this table's autoCreateColumnsFromModel flag. This method calls createDefaultColumnsFromModel if autoCreateColumnsFromModel changes from false to true.
Parameters:
autoCreateColumnsFromModel - true if JTable should automatically create columns
See Also:
getAutoCreateColumnsFromModel(), createDefaultColumnsFromModel()

getAutoCreateColumnsFromModel

public boolean getAutoCreateColumnsFromModel()
Determines whether the table will create default columns from the model. If true, setModel will clear any existing columns and create new columns from the new model. Also, if the event in the tableChanged notification specifies that the entire table changed, then the columns will be rebuilt. The default is true.
Returns:
the autoCreateColumnsFromModel of the table
See Also:
setAutoCreateColumnsFromModel(boolean), createDefaultColumnsFromModel()

createDefaultColumnsFromModel

public void createDefaultColumnsFromModel()
Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.

Clears any existing columns before creating the new columns based on information from the model.

See Also:
getAutoCreateColumnsFromModel()

setDefaultRenderer

public void setDefaultRenderer(Class columnClass,
                               TableCellRenderer renderer)
Sets a default cell renderer to be used if no renderer has been set in a TableColumn. If renderer is null, removes the default renderer for this column class.
Parameters:
columnClass - set the default cell renderer for this columnClass
renderer - default cell renderer to be used for this columnClass
See Also:
getDefaultRenderer(java.lang.Class), setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor)

getDefaultRenderer

public TableCellRenderer getDefaultRenderer(Class columnClass)
Returns the cell renderer to be used when no renderer has been set in a TableColumn. During the rendering of cells the renderer is fetched from a Hashtable of entries according to the class of the cells in the column. If there is no entry for this columnClass the method returns the entry for the most specific superclass. The JTable installs entries for Object, Number, and Boolean, all of which can be modified or replaced.
Parameters:
columnClass - return the default cell renderer for this columnClass
Returns:
the renderer for this columnClass
See Also:
setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer), getColumnClass(int)

setDefaultEditor

public void setDefaultEditor(Class columnClass,
                             TableCellEditor editor)
Sets a default cell editor to be used if no editor has been set in a TableColumn. If no editing is required in a table, or a particular column in a table, uses the isCellEditable method in the TableModel interface to ensure that this JTable will not start an editor in these columns. If editor is null, removes the default editor for this column class.
Parameters:
columnClass - set the default cell editor for this columnClass
editor - default cell editor to be used for this columnClass
See Also:
TableModel.isCellEditable(int, int),
getDefaultEditor(java.lang.Class),
setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer)

getDefaultEditor

public TableCellEditor getDefaultEditor(Class columnClass)
Returns the editor to be used when no editor has been set in a TableColumn. During the editing of cells the editor is fetched from a Hashtable of entries according to the class of the cells in the column. If there is no entry for this columnClass the method returns the entry for the most specific superclass. The JTable installs entries for Object, Number, and Boolean, all of which can be modified or replaced.
Parameters:
columnClass - return the default cell editor for this columnClass
Returns:
the default cell editor to be used for this columnClass
See Also:
setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor), getColumnClass(int)

setSelectionMode

public void setSelectionMode(int selectionMode)
Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.

Note: JTable provides all the methods for handling column and row selection. When setting states, such as setSelectionMode, it not only updates the mode for the row selection model but also sets similar values in the selection model of the columnModel. If you want to have the row and column selection models operating in different modes, set them both directly.

Both the row and column selection models for JTable default to using a DefaultListSelectionModel so that JTable works the same way as the JList. See the setSelectionMode method in JList for details about the modes.

See Also:
JList.setSelectionMode(int)

setRowSelectionAllowed

public void setRowSelectionAllowed(boolean rowSelectionAllowed)
Sets whether the rows in this model can be selected.
Parameters:
rowSelectionAllowed - true if this model will allow row selection
See Also:
getRowSelectionAllowed()

getRowSelectionAllowed

public boolean getRowSelectionAllowed()
Returns true if rows can be selected.
Returns:
true if rows can be selected, otherwise false
See Also:
setRowSelectionAllowed(boolean)

setColumnSelectionAllowed

public void setColumnSelectionAllowed(boolean columnSelectionAllowed)
Sets whether the columns in this model can be selected.
Parameters:
columnSelectionAllowed - true if this model will allow column selection
See Also:
getColumnSelectionAllowed()

getColumnSelectionAllowed

public boolean getColumnSelectionAllowed()
Returns true if columns can be selected.
Returns:
true if columns can be selected, otherwise false
See Also:
setColumnSelectionAllowed(boolean)

setCellSelectionEnabled

public void setCellSelectionEnabled(boolean cellSelectionEnabled)
Sets whether this table allows both a column selection and a row selection to exist simultaneously. When set, the table treats the intersection of the row and column selection models as the selected cells. Override isCellSelected to change this default behavior. This method is equivalent to setting both the rowSelectionAllowed property and columnSelectionAllowed property of the columnModel to the supplied value.
Parameters:
cellSelectionEnabled - true if simultaneous row and column selection is allowed
See Also:
getCellSelectionEnabled(), isCellSelected(int, int)

getCellSelectionEnabled

public boolean getCellSelectionEnabled()
Returns true if both row and column selection models are enabled. Equivalent to getRowSelectionAllowed() && getColumnSelectionAllowed().
Returns:
true if both row and column selection models are enabled
See Also:
setCellSelectionEnabled(boolean)

selectAll

public void selectAll()
Selects all rows, columns, and cells in the table.

clearSelection

public void clearSelection()
Deselects all selected columns and rows.

setRowSelectionInterval

public void setRowSelectionInterval(int index0,
                                    int index1)
Selects the rows from index0 to index1, inclusive.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getRowCount()-1]

setColumnSelectionInterval

public void setColumnSelectionInterval(int index0,
                                       int index1)
Selects the columns from index0 to index1, inclusive.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getColumnCount()-1]

addRowSelectionInterval

public void addRowSelectionInterval(int index0,
                                    int index1)
Adds the rows from index0 to index1, inclusive, to the current selection.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getRowCount()-1]

addColumnSelectionInterval

public void addColumnSelectionInterval(int index0,
                                       int index1)
Adds the columns from index0 to index1, inclusive, to the current selection.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getColumnCount()-1]

removeRowSelectionInterval

public void removeRowSelectionInterval(int index0,
                                       int index1)
Deselects the rows from index0 to index1, inclusive.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getRowCount()-1]

removeColumnSelectionInterval

public void removeColumnSelectionInterval(int index0,
                                          int index1)
Deselects the columns from index0 to index1, inclusive.
Parameters:
index0 - one end of the interval
index1 - the other end of the interval
Throws:
IllegalArgumentException - if index0 or index1 lie outside [0, getColumnCount()-1]

getSelectedRow

public int getSelectedRow()
Returns the index of the first selected row, -1 if no row is selected.
Returns:
the index of the first selected row

getSelectedColumn

public int getSelectedColumn()
Returns the index of the first selected column, -1 if no column is selected.
Returns:
the index of the first selected column

getSelectedRows

public int[] getSelectedRows()
Returns the indices of all selected rows.
Returns:
an array of integers containing the indices of all selected rows, or an empty array if no row is selected
See Also:
getSelectedRow()

getSelectedColumns

public int[] getSelectedColumns()
Returns the indices of all selected columns.
Returns:
an array of integers containing the indices of all selected columns, or an empty array if no column is selected
See Also:
getSelectedColumn()

getSelectedRowCount

public int getSelectedRowCount()
Returns the number of selected rows.
Returns:
the number of selected rows, 0 if no rows are selected

getSelectedColumnCount

public int getSelectedColumnCount()
Returns the number of selected columns.
Returns:
the number of selected columns, 0 if no columns are selected

isRowSelected

public boolean isRowSelected(int row)
Returns true if the row at the specified index is selected.
Returns:
true if the row at index row is selected, where 0 is the first row
Throws:
IllegalArgumentException - if row is not in the valid range

isColumnSelected

public boolean isColumnSelected(int column)
Returns true if the column at the specified index is selected.
Parameters:
column - the column in the column model
Returns:
true if the column at index column is selected, where 0 is the first column
Throws:
IllegalArgumentException - if column is not in the valid range

isCellSelected

public boolean isCellSelected(int row,
                              int column)
Returns true if the cell at the specified position is selected.
Parameters:
row - the row being queried
column - the column being queried
Returns:
true if the cell at index (row, column) is selected, where the first row and first column are at index 0
Throws:
IllegalArgumentException - if row or column are not in the valid range

changeSelection

public void changeSelection(int rowIndex,
                            int columnIndex,
                            boolean toggle,
                            boolean extend)
Updates the selection models of the table, depending on the state of the two flags: toggle and extend. All changes to the selection that are the result of keyboard or mouse events received by the UI are channeled through this method so that the behavior may be overridden by a subclass.

This implementation uses the following conventions:

  • toggle: false, extend: false. Clear the previous selection and ensure the new cell is selected.
  • toggle: false, extend: true. Extend the previous selection to include the specified cell.
  • toggle: true, extend: false. If the specified cell is selected, deselect it. If it is not selected, select it.
  • toggle: true, extend: true. Leave the selection state as it is, but move the anchor index to the specified location.
Parameters:
rowIndex - affects the selection at row
columnIndex - affects the selection at column
toggle - see description above
extend - if true, extend the current selection

getSelectionForeground

public Color getSelectionForeground()
Returns the foreground color for selected cells.
Returns:
the Color object for the foreground property
See Also:
setSelectionForeground(java.awt.Color), setSelectionBackground(java.awt.Color)

setSelectionForeground

public void setSelectionForeground(Color selectionForeground)
Sets the foreground color for selected cells. Cell renderers can use this color to render text and graphics for selected cells.

The default value of this property is defined by the look and feel implementation.

This is a JavaBeans bound property.

Parameters:
selectionForeground - the Color to use in the foreground for selected list items
See Also:
getSelectionForeground(),
setSelectionBackground(java.awt.Color),
JComponent.setForeground(java.awt.Color),
JComponent.setBackground(java.awt.Color),
JComponent.setFont(java.awt.Font)

getSelectionBackground

public Color getSelectionBackground()
Returns the background color for selected cells.
Returns:
the Color used for the background of selected list items
See Also:
setSelectionBackground(java.awt.Color), setSelectionForeground(java.awt.Color)

setSelectionBackground

public void setSelectionBackground(Color selectionBackground)
Sets the background color for selected cells. Cell renderers can use this color to the fill selected cells.

The default value of this property is defined by the look and feel implementation.

This is a JavaBeans bound property.

Parameters:
selectionBackground - the Color to use for the background of selected cells
See Also:
getSelectionBackground(),
setSelectionForeground(java.awt.Color),
JComponent.setForeground(java.awt.Color),
JComponent.setBackground(java.awt.Color),
JComponent.setFont(java.awt.Font)

getColumn

public TableColumn getColumn(Object identifier)
Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
Parameters:
identifier - the identifier object
Returns:
the TableColumn object that matches the identifier
Throws:
IllegalArgumentException - if identifier is null or no TableColumn has this identifier

convertColumnIndexToModel

public int convertColumnIndexToModel(int viewColumnIndex)
Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model. Returns the index of the corresponding column in the model. If viewColumnIndex is less than zero, returns viewColumnIndex.
Parameters:
viewColumnIndex - the index of the column in the view
Returns:
the index of the corresponding column in the model
See Also:
convertColumnIndexToView(int)

convertColumnIndexToView

public int convertColumnIndexToView(int modelColumnIndex)
Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view. Returns the index of the corresponding column in the view; returns -1 if this column is not being displayed. If modelColumnIndex is less than zero, returns modelColumnIndex.
Parameters:
modelColumnIndex - the index of the column in the model
Returns:
the index of the corresponding column in the view
See Also:
convertColumnIndexToModel(int)

getRowCount

public int getRowCount()
Returns the number of rows in this table's model.
Returns:
the number of rows in this table's model
See Also:
getColumnCount()

getColumnCount

public int getColumnCount()
Returns the number of columns in the column model. Note that this may be different from the number of columns in the table model.
Returns:
the number of columns in the table
See Also:
getRowCount(), removeColumn(javax.swing.table.TableColumn)

getColumnName

public String getColumnName(int column)
Returns the name of the column appearing in the view at column position column.
Parameters:
column - the column in the view being queried
Returns:
the name of the column at position column in the view where the first column is column 0

getColumnClass

public Class getColumnClass(int column)
Returns the type of the column appearing in the view at column position column.
Parameters:
column - the column in the view being queried
Returns:
the type of the column at position column in the view where the first column is column 0

getValueAt

public Object getValueAt(int row,
                         int column)
Returns the cell value at row and column.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering.

Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
the Object at the specified cell

setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
Sets the value for the cell in the table model at row and column.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering. aValue is the new value.

Parameters:
aValue - the new value
row - the row of the cell to be changed
column - the column of the cell to be changed
See Also:
getValueAt(int, int)

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns true if the cell at row and column is editable. Otherwise, invoking setValueAt on the cell will have no effect.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering.

Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
true if the cell is editable
See Also:
setValueAt(java.lang.Object, int, int)

addColumn

public void addColumn(TableColumn aColumn)
Appends aColumn to the end of the array of columns held by this JTable's column model. If the column name of aColumn is null, sets the column name of aColumn to the name returned by getModel().getColumnName().

To add a column to this JTable to display the modelColumn'th column of data in the model with a given width, cellRenderer, and cellEditor you can use:

      addColumn(new TableColumn(modelColumn, width, cellRenderer, cellEditor));
[Any of the TableColumn constructors can be used instead of this one.] The model column number is stored inside the TableColumn and is used during rendering and editing to locate the appropriates data values in the model. The model column number does not change when columns are reordered in the view.
Parameters:
aColumn - the TableColumn to be added
See Also:
removeColumn(javax.swing.table.TableColumn)

removeColumn

public void removeColumn(TableColumn aColumn)
Removes aColumn from this JTable's array of columns. Note: this method does not remove the column of data from the model; it just removes the TableColumn that was responsible for displaying it.
Parameters:
aColumn - the TableColumn to be removed
See Also:
addColumn(javax.swing.table.TableColumn)

moveColumn

public void moveColumn(int column,
                       int targetColumn)
Moves the column column to the position currently occupied by the column targetColumn in the view. The old column at targetColumn is shifted left or right to make room.
Parameters:
column - the index of column to be moved
targetColumn - the new index of the column

columnAtPoint

public int columnAtPoint(Point point)
Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
Parameters:
point - the location of interest
Returns:
the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1]
See Also:
rowAtPoint(java.awt.Point)

rowAtPoint

public int rowAtPoint(Point point)
Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
Parameters:
point - the location of interest
Returns:
the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1]
See Also:
columnAtPoint(java.awt.Point)

getCellRect

public Rectangle getCellRect(int row,
                             int column,
                             boolean includeSpacing)
Returns a rectangle for the cell that lies at the intersection of row and column. If includeSpacing is true then the value returned has the full height and width of the row and column specified. If it is false, the returned rectangle is inset by the intercell spacing to return the true bounds of the rendering or editing component as it will be set during rendering.

If the column index is valid but the row index is less than zero the method returns a rectangle with the the y and height values set appropriately and the x and width values both set to zero. In general, when either the row or column indices indicate a cell outside the appropriate range, the method returns a rectangle depicting the closest edge of the closest cell that is within the table's range. When both row and column indices are out of range the returned rectangle covers the closest point of the closest cell.

In all cases, calulations that use this method to calculate results along one axix will not fail because of anomalies in calculations along other axis. When the cell is not valid the includeSpacing parameter is ignored.

Parameters:
includeSpacing - if false, return the true cell bounds - computed by subtracting the intercell spacing from the height and widths of the column and row models.
Returns:
the rectangle containing the cell at location row,column

doLayout

public void doLayout()
Causes this table to lay out its rows and columns. Overridden so that columns can be resized to accomodate a change in the size of a containing parent.
Overrides:
doLayout in class Container
Following copied from class: java.awt.Container
See Also:
LayoutManager.layoutContainer(java.awt.Container),
Container.setLayout(java.awt.LayoutManager),
Container.validate()

sizeColumnsToFit

public void sizeColumnsToFit(boolean lastColumnOnly)
Deprecated. As of Swing version 1.0.3, replaced by sizeColumnsToFit(int).

Sizes the table columns to fit the available space.
See Also:
sizeColumnsToFit(int)

sizeColumnsToFit

public void sizeColumnsToFit(int resizingColumn)
Resizes one or more of the columns in the table so that the total width of all of this JTable's columns is equal to the width of the table.

When doLayout is called on this JTable, often as a result of the resizing of an enclosing window, this method is called with resizingColumn set to -1. This means that resizing has taken place "outside" the JTable and the change - or "delta" - should be distributed to all of the columns regardless of this JTable's automatic resize mode.

If the resizingColumn is not -1, it is one of the columns in the table that has changed size rather than the table itself. In this case the auto-resize modes govern the way the extra (or deficit) space is distributed amongst the available columns.

The modes are:

  • AUTO_RESIZE_OFF: Don't automatically adjust the column's widths at all. Use a horizontal scrollbar to accomodate the columns when their sum exceeds the width of the Viewport. If the JTable is not enclosed in a JScrollPane this may leave parts of the table invisible.
  • AUTO_RESIZE_NEXT_COLUMN: Use just the column after the resizing column. This results in the "boundary" or divider between adjacent cells being independently adjustable.
  • AUTO_RESIZE_SUBSEQUENT_COLUMNS: Use all columns after the one being adjusted to absorb the changes. This is the default behavior.
  • AUTO_RESIZE_LAST_COLUMN: Automatically adjust the size of the last column only. If the bounds of the last column prevent the desired size from being allocated, set the width of the last column to the appropriate limit and make no further adjustments.
  • AUTO_RESIZE_ALL_COLUMNS: Spread the delta amongst all the columns in the JTable, including the one that is being adjusted.

Note: When a JTable makes adjustments to the widths of the columns it respects their minimum and maximum values absolutely. It is therefore possible that, even after this method is called, the total width of the columns is still not equal to the width of the table. When this happens the JTable does not put itself in AUTO_RESIZE_OFF mode to bring up a scroll bar, or break other commitments of its current auto-resize mode -- instead it allows its bounds to be set larger (or smaller) than the total of the column minimum or maximum, meaning, either that there will not be enough room to display all of the columns, or that the columns will not fill the JTable's bounds. These respectively, result in the clipping of some columns or an area being painted in the JTable's background color during painting.

The mechanism for distributing the delta amongst the available columns is provided in a private method in the JTable class:

   adjustSizes(long targetSize, final Resizable3 r, boolean inverse)
an explanation of which is provided in the following section. Resizable3 is a private interface that allows any data structure containing a collection of elements with a size, preferred size, maximum size and minimum size to have its elements manipulated by the algorithm.

Distributing the delta

Overview

Call "DELTA" the difference between the target size and the sum of the preferred sizes of the elements in r. The individual sizes are calculated by taking the original preferred sizes and adding a share of the DELTA - that share being based on how far each preferred size is from its limiting bound (minimum or maximum).

Definition

Call the individual constraints min[i], max[i], and pref[i].

Call their respective sums: MIN, MAX, and PREF.

Each new size will be calculated using:

          size[i] = pref[i] + delta[i]
where each individual delta[i] is calculated according to:

If (DELTA <0) we="we" are="are" in="in" shrink="shrink" mode="mode" where:="where:"

                        DELTA
          delta[i] = ------------ * (pref[i] - min[i])
                     (PREF - MIN)
If (DELTA > 0) we are in expand mode where:

                        DELTA
          delta[i] = ------------ * (max[i] - pref[i])
                      (MAX - PREF)

The overall effect is that the total size moves that same percentage, k, towards the total minimum or maximum and that percentage guarantees accomodation of the required space, DELTA.

Details

Naive evaluation of the formulae presented here would be subject to the aggregated rounding errors caused by doing this operation in finite precision (using ints). To deal with this, the multiplying factor above, is constantly recalculated and this takes account of the rounding errors in the previous iterations. The result is an algorithm that produces a set of integers whose values exactly sum to the supplied targetSize, and does so by spreading the rounding errors evenly over the given elements.

When the MAX and MIN bounds are hit

When targetSize is outside the [MIN, MAX] range, the algorithm sets all sizes to their appropriate limiting value (maximum or minimum).

Parameters:
resizingColumn - the column whose resizing made this adjustment necessary or -1 if there is no such column
See Also:
TableColumn.setWidth(int)

getToolTipText

public String getToolTipText(MouseEvent event)
Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.

Note: For JTable to properly display tooltips of its renderers JTable must be a registered component with the ToolTipManager. This is done automatically in initializeLocalVars, but if at a later point JTable is told setToolTipText(null) it will unregister the table component, and no tips from renderers will display anymore.

Overrides:
getToolTipText in class JComponent
See Also:
JComponent.getToolTipText()

editCellAt

public boolean editCellAt(int row,
                          int column)
Programmatically starts editing the cell at row and column, if the cell is editable.
Parameters:
row - the row to be edited
column - the column to be edited
Returns:
false if for any reason the cell cannot be edited
Throws:
IllegalArgumentException - If row or column is not in the valid range

editCellAt

public boolean editCellAt(int row,
                          int column,
                          EventObject e)
Programmatically starts editing the cell at row and column, if the cell is editable. To prevent the JTable from editing a particular table, column or cell value, return false from the isCellEditable method in the TableModel interface.
Parameters:
row - the row to be edited
column - the column to be edited
e - event to pass into shouldSelectCell
Returns:
false if for any reason the cell cannot be edited
Throws:
IllegalArgumentException - If row or column is not in the valid range

isEditing

public boolean isEditing()
Returns true if a cell is being edited.
Returns:
true if the table is editing a cell
See Also:
editingColumn, editingRow

getEditorComponent

public Component getEditorComponent()
Returns the component that is handling the editing session. If nothing is being edited, returns null.
Returns:
Component handling editing session

getEditingColumn

public int getEditingColumn()
Returns the index of the column that contains the cell currently being edited. If nothing is being edited, returns -1.
Returns:
the index of the column that contains the cell currently being edited; returns -1 if nothing being edited
See Also:
editingRow

getEditingRow

public int getEditingRow()
Returns the index of the row that contains the cell currently being edited. If nothing is being edited, returns -1.
Returns:
the index of the row that contains the cell currently being edited; returns -1 if nothing being edited
See Also:
editingColumn

getUI

public TableUI getUI()
Returns the L&F object that renders this component.
Returns:
the TableUI object that renders this component

setUI

public void setUI(TableUI ui)
Sets the L&F object that renders this component and repaints.
Parameters:
ui - the TableUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "TableUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setModel

public void setModel(TableModel dataModel)
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
Parameters:
newModel - the new data source for this table
Throws:
IllegalArgumentException - if newModel is null
See Also:
getModel()

getModel

public TableModel getModel()
Returns the TableModel that provides the data displayed by this JTable.
Returns:
the TableModel that provides the data displayed by this JTable
See Also:
setModel(javax.swing.table.TableModel)

setColumnModel

public void setColumnModel(TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model. Also sets the column model of the JTableHeader to columnModel.
Parameters:
columnModel - the new data source for this table
Throws:
IllegalArgumentException - if columnModel is null
See Also:
getColumnModel()

getColumnModel

public TableColumnModel getColumnModel()
Returns the TableColumnModel that contains all column information of this table.
Returns:
the object that provides the column state of the table
See Also:
setColumnModel(javax.swing.table.TableColumnModel)

setSelectionModel

public void setSelectionModel(ListSelectionModel newModel)
Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.
Parameters:
newModel - the new selection model
Throws:
IllegalArgumentException - if newModel is null
See Also:
getSelectionModel()

getSelectionModel

public ListSelectionModel getSelectionModel()
Returns the ListSelectionModel that is used to maintain row selection state.
Returns:
the object that provides row selection state, null if row selection is not allowed
See Also:
setSelectionModel(javax.swing.ListSelectionModel)

tableChanged

public void tableChanged(TableModelEvent e)
Invoked when this table's TableModel generates a TableModelEvent. The TableModelEvent should be constructed in the coordinate system of the model; the appropriate mapping to the view coordinate system is performed by this JTable when it receives the event.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
tableChanged in interface TableModelListener

columnAdded

public void columnAdded(TableColumnModelEvent e)
Invoked when a column is added to the table column model.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnAdded in interface TableColumnModelListener
See Also:
TableColumnModelListener

columnRemoved

public void columnRemoved(TableColumnModelEvent e)
Invoked when a column is removed from the table column model.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnRemoved in interface TableColumnModelListener
See Also:
TableColumnModelListener

columnMoved

public void columnMoved(TableColumnModelEvent e)
Invoked when a column is repositioned. If a cell is being edited, then editing is stopped and the cell is redrawn.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnMoved in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(ChangeEvent e)
Invoked when a column is moved due to a margin change. If a cell is being edited, then editing is stopped and the cell is redrawn.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnMarginChanged in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent e)
Invoked when the selection model of the TableColumnModel is changed.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnSelectionChanged in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

valueChanged

public void valueChanged(ListSelectionEvent e)
Invoked when the row selection changes -- repaints to show the new selection.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - the event received
See Also:
ListSelectionListener

editingStopped

public void editingStopped(ChangeEvent e)
Invoked when editing is finished. The changes are saved and the editor is discarded.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
editingStopped in interface CellEditorListener
Parameters:
e - the event received
See Also:
CellEditorListener

editingCanceled

public void editingCanceled(ChangeEvent e)
Invoked when editing is canceled. The editor object is discarded and the cell is rendered once again.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
editingCanceled in interface CellEditorListener
Parameters:
e - the event received
See Also:
CellEditorListener

setPreferredScrollableViewportSize

public void setPreferredScrollableViewportSize(Dimension size)
Sets the preferred size of the viewport for this table.
Parameters:
size - a Dimension object specifying the preferredSize of a JViewport whose view is this table
See Also:
Scrollable.getPreferredScrollableViewportSize()

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for this table.
Specified by:
getPreferredScrollableViewportSize in interface Scrollable
Returns:
a Dimension object containing the preferredSize of the JViewport which displays this table
See Also:
Scrollable.getPreferredScrollableViewportSize()

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).

This method is called each time the user requests a unit scroll.

Specified by:
getScrollableUnitIncrement in interface Scrollable
Parameters:
visibleRect - the view area visible within the viewport
orientation - either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
direction - less than zero to scroll up/left, greater than zero for down/right
Returns:
the "unit" increment for scrolling in the specified direction
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Returns visibleRect.height or visibleRect.width, depending on this table's orientation. Note that as of Swing 1.1.1 (Java 2 v 1.2.2) the value returned will ensure that the viewport is cleanly aligned on a row boundary.
Specified by:
getScrollableBlockIncrement in interface Scrollable
Returns:
visibleRect.height or visibleRect.width per the orientation
See Also:
Scrollable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Returns false to indicate that the width of the viewport does not determine the width of the table.
Specified by:
getScrollableTracksViewportWidth in interface Scrollable
Returns:
false
See Also:
Scrollable.getScrollableTracksViewportWidth()

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Returns false to indicate that the height of the viewport does not determine the height of the table.
Specified by:
getScrollableTracksViewportHeight in interface Scrollable
Returns:
false
See Also:
Scrollable.getScrollableTracksViewportHeight()

processKeyBinding

protected boolean processKeyBinding(KeyStroke ks,
                                    KeyEvent e,
                                    int condition,
                                    boolean pressed)
Description copied from class: JComponent
Invoked to process the key bindings for ks as the result of the KeyEvent e. This obtains the appropriate InputMap, gets the binding, gets the action from the ActionMap, and then (if the action is found and the receiver is enabled) invokes notifyAction to notify the action.
Overrides:
processKeyBinding in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
true if there was a binding to an action, and the action was enabled

createDefaultRenderers

protected void createDefaultRenderers()
Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.
See Also:
DefaultTableCellRenderer

createDefaultEditors

protected void createDefaultEditors()
Creates default cell editors for objects, numbers, and boolean values.
See Also:
DefaultCellEditor

initializeLocalVars

protected void initializeLocalVars()
Initializes table properties to their default values.

createDefaultDataModel

protected TableModel createDefaultDataModel()
Returns the default table model object, which is a DefaultTableModel. A subclass can override this method to return a different table model object.
Returns:
the default table model object
See Also:
DefaultTableModel

createDefaultColumnModel

protected TableColumnModel createDefaultColumnModel()
Returns the default column model object, which is a DefaultTableColumnModel. A subclass can override this method to return a different column model object.
Returns:
the default column model object
See Also:
DefaultTableColumnModel

createDefaultSelectionModel

protected ListSelectionModel createDefaultSelectionModel()
Returns the default selection model object, which is a DefaultListSelectionModel. A subclass can override this method to return a different selection model object.
Returns:
the default selection model object
See Also:
DefaultListSelectionModel

createDefaultTableHeader

protected JTableHeader createDefaultTableHeader()
Returns the default table header object, which is a JTableHeader. A subclass can override this method to return a different table header object.
Returns:
the default table header object
See Also:
JTableHeader

resizeAndRepaint

protected void resizeAndRepaint()
Equivalent to revalidate followed by repaint.

getCellEditor

public TableCellEditor getCellEditor()
Returns the cell editor.
Returns:
the TableCellEditor that does the editing
See Also:
cellEditor

setCellEditor

public void setCellEditor(TableCellEditor anEditor)
Sets the cellEditor variable.
Parameters:
anEditor - the TableCellEditor that does the editing
See Also:
cellEditor

setEditingColumn

public void setEditingColumn(int aColumn)
Sets the editingColumn variable.
Parameters:
aColumn - the column of the cell to be edited
See Also:
editingColumn

setEditingRow

public void setEditingRow(int aRow)
Sets the editingRow variable.
Parameters:
aRow - the row of the cell to be edited
See Also:
editingRow

getCellRenderer

public TableCellRenderer getCellRenderer(int row,
                                         int column)
Returns an appropriate renderer for the cell specified by this row and column. If the TableColumn for this column has a non-null renderer, returns that. If not, finds the class of the data in this column (using getColumnClass) and returns the default renderer for this type of data.

Note: Throughout the table package, the internal implementations always use this method to provide renderers so that this default behavior can be safely overridden by a subclass.

Parameters:
row - the row of the cell to render, where 0 is the first row
column - the column of the cell to render, where 0 is the first column
Returns:
the assigned renderer; if null returns the default renderer for this type of object
See Also:
DefaultTableCellRenderer, TableColumn.setCellRenderer(javax.swing.table.TableCellRenderer), setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer)

prepareRenderer

public Component prepareRenderer(TableCellRenderer renderer,
                                 int row,
                                 int column)
Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.

Note: Throughout the table package, the internal implementations always use this method to prepare renderers so that this default behavior can be safely overridden by a subclass.

Parameters:
renderer - the TableCellRenderer to prepare
row - the row of the cell to render, where 0 is the first row
column - the column of the cell to render, where 0 is the first column

getCellEditor

public TableCellEditor getCellEditor(int row,
                                     int column)
Returns an appropriate editor for the cell specified by row and column. If the TableColumn for this column has a non-null editor, returns that. If not, finds the class of the data in this column (using getColumnClass) and returns the default editor for this type of data.

Note: Throughout the table package, the internal implementations always use this method to provide editors so that this default behavior can be safely overridden by a subclass.

Parameters:
row - the row of the cell to edit, where 0 is the first row
column - the column of the cell to edit, where 0 is the first column
Returns:
the editor for this cell; if null return the default editor for this type of cell
See Also:
DefaultCellEditor

prepareEditor

public Component prepareEditor(TableCellEditor editor,
                               int row,
                               int column)
Prepares the editor by querying the data model for the value and selection state of the cell at row, column.

Note: Throughout the table package, the internal implementations always use this method to prepare editors so that this default behavior can be safely overridden by a subclass.

Parameters:
editor - the TableCellEditor to set up
row - the row of the cell to edit, where 0 is the first row
column - the column of the cell to edit, where 0 is the first column
Returns:
the Component being edited

removeEditor

public void removeEditor()
Discards the editor object and frees the real estate it used for cell rendering.

paramString

protected String paramString()
Returns a string representation of this table. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this table

isManagingFocus

public boolean isManagingFocus()
We override this method, whose implementation in JComponent returns false, to return true. This allows us to give a special meaning to TAB and SHIFT-TAB in the JTable.
Overrides:
isManagingFocus in class JComponent
Returns:
true

isFocusTraversable

public boolean isFocusTraversable()
We override this method, whose implementation in JComponent returns false, to return true. This indicates that the JTable is a component that should be part of a (tabbing) focus cycle by default.
Overrides:
isFocusTraversable in class JComponent
Returns:
true

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTable. For tables, the AccessibleContext takes the form of an AccessibleJTable. A new AccessibleJTable instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJTable that serves as the AccessibleContext of this JTable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTextArea

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTextArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JTextArea
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
public class JTextArea
extends JTextComponent

A TextArea is a multi-line area that displays plain text. It is intended to be a lightweight component that provides source compatibility with the java.awt.TextArea class where it can reasonably do so. You can find information and examples of using all the text components in Using Text Components, a section in The Java Tutorial.

This component has capabilities not found in the java.awt.TextArea class. The superclass should be consulted for additional capabilities. Alternative multi-line text classes with more capabilitites are JTextPane and JEditorPane.

The java.awt.TextArea internally handles scrolling. JTextArea is different in that it doesn't manage scrolling, but implements the swing Scrollable interface. This allows it to be placed inside a JScrollPane if scrolling behavior is desired, and used directly if scrolling is not desired.

The java.awt.TextArea has the ability to do line wrapping. This was controlled by the horizontal scrolling policy. Since scrolling is not done by JTextArea directly, backward compatibility must be provided another way. JTextArea has a bound property for line wrapping that controls whether or not it will wrap lines. By default, the line wrapping property is set to false (not wrapped).

java.awt.TextArea has two properties rows and columns that are used to determine the preferred size. JTextArea uses these properties to indicate the preferred size of the viewport when placed inside a JScrollPane to match the functionality provided by java.awt.TextArea. JTextArea has a preferred size of what is needed to display all of the text, so that it functions properly inside of a JScrollPane. If the value for the rows or columns is equal to zero, the preferred size along that axis is used for the viewport preferred size along the same axis.

The java.awt.TextArea could be monitored for changes by adding a TextListener for TextEvent's. In the JTextComponent based components, changes are broadcasted from the model via a DocumentEvent to DocumentListeners. The DocumentEvent gives the location of the change and the kind of change if desired. The code fragment might look something like:

    DocumentListener myListener = ??;
    JTextArea myArea = ??;
    myArea.getDocument().addDocumentListener(myListener);

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTextArea key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTextPane, JEditorPane, Serialized Form

Inner Class Summary
protected  class JTextArea.AccessibleJTextArea
This class implements accessibility support for the JTextArea class.
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTextArea()
Constructs a new TextArea.
JTextArea(Document doc)
Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0).
JTextArea(Document doc, String text, int rows, int columns)
Constructs a new JTextArea with the specified number of rows and columns, and the given model.
JTextArea(int rows, int columns)
Constructs a new empty TextArea with the specified number of rows and columns.
JTextArea(String text)
Constructs a new TextArea with the specified text displayed.
JTextArea(String text, int rows, int columns)
Constructs a new TextArea with the specified text and number of rows and columns.
Method Summary
void | append(String str) Appends the given text to the end of the document.
protected Document | createDefaultModel() Creates the default implementation of the model to be used at construction if one isn't explicitly given.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTextArea.
int | getColumns() Returns the number of columns in the TextArea.
protected int | getColumnWidth() Gets column width.
int | getLineCount() Determines the number of lines contained in the area.
int | getLineEndOffset(int line) Determines the offset of the end of the given line.
int | getLineOfOffset(int offset) Translates an offset into the components text to a line number.
int | getLineStartOffset(int line) Determines the offset of the start of the given line.
boolean | getLineWrap() Gets the line-wrapping policy of the text area.
Dimension | getPreferredScrollableViewportSize() Returns the preferred size of the viewport if this component is embedded in a JScrollPane.
Dimension | getPreferredSize() Returns the preferred size of the TextArea.
protected int | getRowHeight() Defines the meaning of the height of a row.
int | getRows() Returns the number of rows in the TextArea.
boolean | getScrollableTracksViewportWidth() Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
int | getTabSize() Gets the number of characters used to expand tabs.
String | getUIClassID() Returns the class ID for the UI.
boolean | getWrapStyleWord() Get the style of wrapping used if the text area is wrapping lines.
void | insert(String str, int pos) Inserts the specified text at the specified position.
boolean | isManagingFocus() Turns off tab traversal once focus gained.
protected String | paramString() Returns a string representation of this JTextArea.
protected void | processKeyEvent(KeyEvent e) Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
void | replaceRange(String str, int start, int end) Replaces text from the indicated start to end position with the new text specified.
void | setColumns(int columns) Sets the number of columns for this TextArea.
void | setFont(Font f) Sets the current font.
void | setLineWrap(boolean wrap) Sets the line-wrapping policy of the text area.
void | setRows(int rows) Sets the number of rows for this TextArea.
void | setTabSize(int size) Sets the number of characters to expand tabs to.
void | setWrapStyleWord(boolean word) Set the style of wrapping used if the text area is wrapping lines.
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JTextArea

public JTextArea()
Constructs a new TextArea. A default model is set, the initial string is null, and rows/columns are set to 0.

JTextArea

public JTextArea(String text)
Constructs a new TextArea with the specified text displayed. A default model is created and rows/columns are set to 0.
Parameters:
text - the text to be displayed, or null

JTextArea

public JTextArea(int rows,
                 int columns)
Constructs a new empty TextArea with the specified number of rows and columns. A default model is created, and the initial string is null.
Parameters:
rows - the number of rows >= 0
columns - the number of columns >= 0
Throws:
IllegalArgumentException - if the rows or columns arguments are negative.

JTextArea

public JTextArea(String text,
                 int rows,
                 int columns)
Constructs a new TextArea with the specified text and number of rows and columns. A default model is created.
Parameters:
text - the text to be displayed, or null
rows - the number of rows >= 0
columns - the number of columns >= 0
Throws:
IllegalArgumentException - if the rows or columns arguments are negative.

JTextArea

public JTextArea(Document doc)
Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0).
Parameters:
doc - the model to use

JTextArea

public JTextArea(Document doc,
                 String text,
                 int rows,
                 int columns)
Constructs a new JTextArea with the specified number of rows and columns, and the given model. All of the constructors feed through this constructor.
Parameters:
doc - the model to use, or create a default one if null
text - the text to be displayed, null if none
rows - the number of rows >= 0
columns - the number of columns >= 0
Throws:
IllegalArgumentException - if the rows or columns arguments are negative.
Method Detail

getUIClassID

public String getUIClassID()
Returns the class ID for the UI.
Overrides:
getUIClassID in class JComponent
Returns:
the ID ("TextAreaUI")
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

createDefaultModel

protected Document createDefaultModel()
Creates the default implementation of the model to be used at construction if one isn't explicitly given. A new instance of PlainDocument is returned.
Returns:
the default document model

setTabSize

public void setTabSize(int size)
Sets the number of characters to expand tabs to. This will be multiplied by the maximum advance for variable width fonts. A PropertyChange event ("tabSize") is fired when the tab size changes.
Parameters:
size - number of characters to expand to
See Also:
getTabSize()

getTabSize

public int getTabSize()
Gets the number of characters used to expand tabs. If the document is null or doesn't have a tab setting, return a default of 8.
Returns:
the number of characters

setLineWrap

public void setLineWrap(boolean wrap)
Sets the line-wrapping policy of the text area. If set to true the lines will be wrapped if they are too long to fit within the allocated width. If set to false, the lines will always be unwrapped. A PropertyChange event ("lineWrap") is fired when the policy is changed. By default this property is false.
Parameters:
wrap - indicates if lines should be wrapped.
See Also:
getLineWrap()

getLineWrap

public boolean getLineWrap()
Gets the line-wrapping policy of the text area. If set to true the lines will be wrapped if they are too long to fit within the allocated width. If set to false, the lines will always be unwrapped.

setWrapStyleWord

public void setWrapStyleWord(boolean word)
Set the style of wrapping used if the text area is wrapping lines. If set to true the lines will be wrapped at word boundaries (whitespace) if they are too long to fit within the allocated width. If set to false, the lines will be wrapped at character boundaries. By default this property is false.
Parameters:
word - indicates if word boundaries should be used for line wrapping.
See Also:
getWrapStyleWord()

getWrapStyleWord

public boolean getWrapStyleWord()
Get the style of wrapping used if the text area is wrapping lines. If set to true the lines will be wrapped at word boundaries (ie whitespace) if they are too long to fit within the allocated width. If set to false, the lines will be wrapped at character boundaries.
See Also:
setWrapStyleWord(boolean)

getLineOfOffset

public int getLineOfOffset(int offset)
                    throws BadLocationException
Translates an offset into the components text to a line number.
Parameters:
offset - the offset >= 0
Returns:
the line number >= 0
Throws:
BadLocationException - thrown if the offset is less than zero or greater than the document length.

getLineCount

public int getLineCount()
Determines the number of lines contained in the area.
Returns:
the number of lines >= 0

getLineStartOffset

public int getLineStartOffset(int line)
                       throws BadLocationException
Determines the offset of the start of the given line.
Parameters:
line - the line number to translate >= 0
Returns:
the offset >= 0
Throws:
BadLocationException - thrown if the line is less than zero or greater or equal to the number of lines contained in the document (as reported by getLineCount).

getLineEndOffset

public int getLineEndOffset(int line)
                     throws BadLocationException
Determines the offset of the end of the given line.
Parameters:
line - the line >= 0
Returns:
the offset >= 0
Throws:
BadLocationException - Thrown if the line is less than zero or greater or equal to the number of lines contained in the document (as reported by getLineCount).

insert

public void insert(String str,
                   int pos)
Inserts the specified text at the specified position. Does nothing if the model is null or if the text is null or empty.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
str - the text to insert
pos - the position at which to insert >= 0
Throws:
IllegalArgumentException - if pos is an invalid position in the model
See Also:
TextComponent.setText(java.lang.String), replaceRange(java.lang.String, int, int)

append

public void append(String str)
Appends the given text to the end of the document. Does nothing if the model is null or the string is null or empty.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
str - the text to insert
See Also:
insert(java.lang.String, int)

replaceRange

public void replaceRange(String str,
                         int start,
                         int end)
Replaces text from the indicated start to end position with the new text specified. Does nothing if the model is null. Simply does a delete if the new string is null or empty.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
str - the text to use as the replacement
start - the start position >= 0
end - the end position >= start
Throws:
IllegalArgumentException - if part of the range is an invalid position in the model
See Also:
insert(java.lang.String, int), replaceRange(java.lang.String, int, int)

isManagingFocus

public boolean isManagingFocus()
Turns off tab traversal once focus gained.
Overrides:
isManagingFocus in class JComponent
Returns:
true, to indicate that the focus is being managed

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Make sure that TAB and Shift-TAB events get consumed, so that awt doesn't attempt focus traversal.
Overrides:
processKeyEvent in class JComponent
Following copied from class: java.awt.Component
Parameters:
e - the key event.
See Also:
KeyEvent, KeyListener, Component.addKeyListener(java.awt.event.KeyListener), Component.enableEvents(long)

getRows

public int getRows()
Returns the number of rows in the TextArea.
Returns:
the number of rows >= 0

setRows

public void setRows(int rows)
Sets the number of rows for this TextArea. Calls invalidate() after setting the new value.
Parameters:
rows - the number of rows >= 0
Throws:
IllegalArgumentException - if rows is less than 0
See Also:
getRows()

getRowHeight

protected int getRowHeight()
Defines the meaning of the height of a row. This defaults to the height of the font.
Returns:
the height >= 1

getColumns

public int getColumns()
Returns the number of columns in the TextArea.
Returns:
number of columns >= 0

setColumns

public void setColumns(int columns)
Sets the number of columns for this TextArea. Does an invalidate() after setting the new value.
Parameters:
columns - the number of columns >= 0
Throws:
IllegalArgumentException - if columns is less than 0
See Also:
getColumns()

getColumnWidth

protected int getColumnWidth()
Gets column width. The meaning of what a column is can be considered a fairly weak notion for some fonts. This method is used to define the width of a column. By default this is defined to be the width of the character m for the font used. This method can be redefined to be some alternative amount.
Returns:
the column width >= 1

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the TextArea. This is the maximum of the size needed to display the text and the size requested for the viewport.
Overrides:
getPreferredSize in class JComponent
Returns:
the size

setFont

public void setFont(Font f)
Sets the current font. This removes cached row height and column width so the new font will be reflected, and calls revalidate().
Overrides:
setFont in class JComponent
Parameters:
f - the font to use as the current font

paramString

protected String paramString()
Returns a string representation of this JTextArea. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JTextComponent
Returns:
a string representation of this JTextArea.

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport. This is implemented to return true if the line wrapping policy is true, and false if lines are not being wrapped.
Overrides:
getScrollableTracksViewportWidth in class JTextComponent
Returns:
true if a viewport should force the Scrollables width to match its own.

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Returns the preferred size of the viewport if this component is embedded in a JScrollPane. This uses the desired column and row settings if they have been set, otherwise the superclass behavior is used.
Overrides:
getPreferredScrollableViewportSize in class JTextComponent
Returns:
The preferredSize of a JViewport whose view is this Scrollable.
See Also:
JComponent.getPreferredSize()

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation. This is implemented to use the vaules returned by the getRowHeight and getColumnWidth methods.

Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.

Overrides:
getScrollableUnitIncrement in class JTextComponent
Parameters:
visibleRect - the view area visible within the viewport
orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
direction - Less than zero to scroll up/left, greater than zero for down/right.
Returns:
The "unit" increment for scrolling in the specified direction
Throws:
IllegalArgumentException - for an invalid orientation
See Also:
JScrollBar.setUnitIncrement(int),
getRowHeight(),
getColumnWidth()

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTextArea. For JTextAreas, the AccessibleContext takes the form of an AccessibleJTextArea. A new AccessibleJTextArea instance is created if necessary.
Overrides:
getAccessibleContext in class JTextComponent
Returns:
an AccessibleJTextArea that serves as the AccessibleContext of this JTextArea
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTextField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTextField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JTextField
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable, SwingConstants
Direct Known Subclasses:
DefaultTreeCellEditor.DefaultTextField, JPasswordField
public class JTextField
extends JTextComponent
implements SwingConstants

JTextField is a lightweight component that allows the editing of a single line of text. For information on and examples of using text fields, see How to Use Text Fields in The Java Tutorial.

JTextField is intended to be source-compatible with java.awt.TextField where it is reasonable to do so. This component has capabilities not found in the java.awt.TextField class. The superclass should be consulted for additional capabilities.

JTextField has a method to establish the string used as the command string for the action event that gets fired. The java.awt.TextField used the text of the field as the command string for the ActionEvent. JTextField will use the command string set with the setActionCommand method if not null, otherwise it will use the text of the field as a compatibility with java.awt.TextField.

The method setEchoChar and getEchoChar are not provided directly to avoid a new implementation of a pluggable look-and-feel inadvertently exposing password characters. To provide password-like services a separate class JPasswordField extends JTextField to provide this service with an independently pluggable look-and-feel.

The java.awt.TextField could be monitored for changes by adding a TextListener for TextEvent's. In the JTextComponent based components, changes are broadcasted from the model via a DocumentEvent to DocumentListeners. The DocumentEvent gives the location of the change and the kind of change if desired. The code fragment might look something like:

     DocumentListener myListener = ??;
     JTextField myArea = ??;
     myArea.getDocument().addDocumentListener(myListener);

The horizontal alignment of JTextField can be set to be left justified, leading justified, centered, right justified or trailing justified. Right/trailing justification is useful if the required size of the field text is smaller than the size allocated to it. This is determined by the setHorizontalAlignment and getHorizontalAlignment methods. The default is to be leading justified.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTextField key assignments.

How the text field consumes VK_ENTER events depends on whether the text field has any action listeners. If so, then VK_ENTER results in the listeners getting an ActionEvent, and the VK_ENTER event is consumed. This is compatible with how AWT text fields handle VK_ENTER events. If the text field has no action listeners, then as of v 1.3 the VK_ENTER event is not consumed. Instead, the bindings of ancestor components are processed, which enables the default button feature of JFC/Swing to work.

Customized fields can easily be created by extending the model and changing the default model provided. For example, the following piece of code will create a field that holds only upper case characters. It will work even if text is pasted into from the clipboard or it is altered via programmatic changes.

 public class UpperCaseField extends JTextField {

     public UpperCaseField(int cols) {
         super(cols);
     }

     protected Document createDefaultModel() {
           return new UpperCaseDocument();
     }

     static class UpperCaseDocument extends PlainDocument {

         public void insertString(int offs, String str, AttributeSet a)
               throws BadLocationException {

               if (str == null) {
               return;
               }
               char[] upper = str.toCharArray();
               for (int i = 0; i

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
setActionCommand(java.lang.String), JPasswordField, addActionListener(java.awt.event.ActionListener), Serialized Form

Inner Class Summary
protected  class JTextField.AccessibleJTextField
          This class implements accessibility support for the JTextField class.

Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding

Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent

Field Summary
static String notifyAction
          Name of the action to send notification that the contents of the field have been accepted.

Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY

Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary
JTextField()
          Constructs a new TextField.
JTextField(Document doc, String text, int columns)
          Constructs a new JTextField that uses the given text storage model and the given number of columns.
JTextField(int columns)
          Constructs a new empty TextField with the specified number of columns.
JTextField(String text)
          Constructs a new TextField initialized with the specified text.
JTextField(String text, int columns)
          Constructs a new TextField initialized with the specified text and columns.

Method Summary
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this textfield.
protected void | configurePropertiesFromAction(Action a) Factory method which sets the ActionEvent source's properties according to values from the Action instance.
protected PropertyChangeListener | createActionPropertyChangeListener(Action a) Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance.
protected Document | createDefaultModel() Creates the default implementation of the model to be used at construction if one isn't explicitly given.
protected void | fireActionPerformed() Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTextField.
Action | getAction() Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Action[] | getActions() Fetches the command list for the editor.
int | getColumns() Returns the number of columns in this TextField.
protected int | getColumnWidth() Gets the column width.
int | getHorizontalAlignment() Returns the horizontal alignment of the text.
BoundedRangeModel | getHorizontalVisibility() Gets the visibility of the text field.
Dimension | getPreferredSize() Returns the preferred size Dimensions needed for this TextField.
int | getScrollOffset() Gets the scroll offset.
String | getUIClassID() Gets the class ID for a UI.
boolean | isValidateRoot() Calls to revalidate that come from within the textfield itself will be handled by validating the textfield, unless the receiver is contained within a JViewport, in which case this returns false.
protected String | paramString() Returns a string representation of this JTextField.
void | postActionEvent() Processes action events occurring on this textfield by dispatching them to any registered ActionListener objects.
void | removeActionListener(ActionListener l) Removes the specified action listener so that it no longer receives action events from this textfield.
void | scrollRectToVisible(Rectangle r) Scrolls the field left or right.
void | setAction(Action a) Sets the Action for the ActionEvent source.
void | setActionCommand(String command) Sets the command string used for action events.
void | setColumns(int columns) Sets the number of columns in this TextField, and then invalidate the layout.
void | setFont(Font f) Sets the current font.
void | setHorizontalAlignment(int alignment) Sets the horizontal alignment of the text.
void | setScrollOffset(int scrollOffset) Sets the scroll offset.

Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write

Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree

Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

notifyAction

public static final String notifyAction
Name of the action to send notification that the contents of the field have been accepted. Typically this is bound to a carriage-return.
Constructor Detail

JTextField

public JTextField()
Constructs a new TextField. A default model is created, the initial string is null, and the number of columns is set to 0.

JTextField

public JTextField(String text)
Constructs a new TextField initialized with the specified text. A default model is created and the number of columns is 0.
Parameters:
text - the text to be displayed, or null

JTextField

public JTextField(int columns)
Constructs a new empty TextField with the specified number of columns. A default model is created and the initial string is set to null.
Parameters:
columns - the number of columns to use to calculate the preferred width. If columns is set to zero, the preferred width will be whatever naturally results from the component implementation.

JTextField

public JTextField(String text,
                  int columns)
Constructs a new TextField initialized with the specified text and columns. A default model is created.
Parameters:
text - the text to be displayed, or null
columns - the number of columns to use to calculate the preferred width. If columns is set to zero, the preferred width will be whatever naturally results from the component implementation.

JTextField

public JTextField(Document doc,
                  String text,
                  int columns)
Constructs a new JTextField that uses the given text storage model and the given number of columns. This is the constructor through which the other constructors feed. If the document is null, a default model is created.
Parameters:
doc - the text storage to use. If this is null, a default will be provided by calling the createDefaultModel method.
text - the initial string to display, or null
columns - the number of columns to use to calculate the preferred width >= 0. If columns is set to zero, the preferred width will be whatever naturally results from the component implementation.
Throws:
IllegalArgumentException - if columns <0< /DL="/DL">
Method Detail

getUIClassID

public String getUIClassID()
Gets the class ID for a UI.
Overrides:
getUIClassID in class JComponent
Returns:
the ID ("TextFieldUI")
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

isValidateRoot

public boolean isValidateRoot()
Calls to revalidate that come from within the textfield itself will be handled by validating the textfield, unless the receiver is contained within a JViewport, in which case this returns false.
Overrides:
isValidateRoot in class JComponent
See Also:
JComponent.revalidate(), JComponent.isValidateRoot()

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the text. Valid keys: JTextField.LEFT, JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING and JTextField.TRAILING
Returns:
the alignment

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the text. Valid keys: JTextField.LEFT, JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING (the default) and JTextField.TRAILING. invalidate() and repaint() are called when the alignment is set, and a PropertyChange event ("horizontalAlignment") is fired.
Parameters:
alignment - the alignment
Throws:
IllegalArgumentException - if the alignment specified is not a valid key.

createDefaultModel

protected Document createDefaultModel()
Creates the default implementation of the model to be used at construction if one isn't explicitly given. An instance of PlainDocument is returned.
Returns:
the default model implementation

getColumns

public int getColumns()
Returns the number of columns in this TextField.
Returns:
the number of columns >= 0

setColumns

public void setColumns(int columns)
Sets the number of columns in this TextField, and then invalidate the layout.
Parameters:
columns - the number of columns >= 0
Throws:
IllegalArgumentException - if columns is less than 0

getColumnWidth

protected int getColumnWidth()
Gets the column width. The meaning of what a column is can be considered a fairly weak notion for some fonts. This method is used to define the width of a column. By default this is defined to be the width of the character m for the font used. This method can be redefined to be some alternative amount
Returns:
the column width >= 1

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size Dimensions needed for this TextField. If a non-zero number of columns has been set, the width is set to the columns multiplied by the column width.
Overrides:
getPreferredSize in class JComponent
Returns:
the dimensions

setFont

public void setFont(Font f)
Sets the current font. This removes cached row height and column width so the new font will be reflected. revalidate() is called after setting the font.
Overrides:
setFont in class JComponent
Parameters:
f - the new font

addActionListener

public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this textfield.
Parameters:
l - the action listener

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this textfield.
Parameters:
l - the action listener

fireActionPerformed

protected void fireActionPerformed()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in last to first order.
See Also:
EventListenerList

setActionCommand

public void setActionCommand(String command)
Sets the command string used for action events.
Parameters:
command - the command string

setAction

public void setAction(Action a)
Sets the Action for the ActionEvent source. The new Action replaces any previously set Action but does not affect ActionListeners independantly added with addActionListener(). If the Action is already a registered ActionListener for the ActionEvent source, it is not re-registered. A side-effect of setting the Action is that the ActionEvent source's properties are immediately set from the values in the Action (performed by the method configurePropertiesFromAction()) and subsequently updated as the Action's properties change (via a PropertyChangeListener created by the method createActionPropertyChangeListener().
Parameters:
a - the Action for the JTextField, or null.
Since:
1.3
See Also:
Action,
getAction(),
configurePropertiesFromAction(javax.swing.Action),
createActionPropertyChangeListener(javax.swing.Action)

getAction

public Action getAction()
Returns the currently set Action for this ActionEvent source, or null if no Action is set.
Returns:
the Action for this ActionEvent source, or null.
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action a)
Factory method which sets the ActionEvent source's properties according to values from the Action instance. The properties which are set may differ for subclasses. By default, the properties which get set are Enabled and ToolTipText.
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

createActionPropertyChangeListener

protected PropertyChangeListener createActionPropertyChangeListener(Action a)
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. Subclasses may override this in order to provide their own PropertyChangeListener if the set of properties which should be kept up to date differs from the default properties (Text, Enabled, ToolTipText). Note that PropertyChangeListeners should avoid holding strong references to the ActionEvent source, as this may hinder garbage collection of the ActionEvent source and all components in its containment hierarchy.
Since:
1.3
See Also:
Action, setAction(javax.swing.Action)

getActions

public Action[] getActions()
Fetches the command list for the editor. This is the list of commands supported by the plugged-in UI augmented by the collection of commands that the editor itself supports. These are useful for binding to events, such as in a keymap.
Overrides:
getActions in class JTextComponent
Returns:
the command list

postActionEvent

public void postActionEvent()
Processes action events occurring on this textfield by dispatching them to any registered ActionListener objects. This is normally called by the controller registered with textfield.

getHorizontalVisibility

public BoundedRangeModel getHorizontalVisibility()
Gets the visibility of the text field. This can be adjusted to change the location of the visible area if the size of the field is greater than the area that was allocated to the field. The fields look-and-feel implementation manages the values of the minimum, maximum, and extent properties on the BoundedRangeModel.
Returns:
the visibility
See Also:
BoundedRangeModel

getScrollOffset

public int getScrollOffset()
Gets the scroll offset.
Returns:
the offset >= 0

setScrollOffset

public void setScrollOffset(int scrollOffset)
Sets the scroll offset.
Parameters:
scrollOffset - the offset >= 0

scrollRectToVisible

public void scrollRectToVisible(Rectangle r)
Scrolls the field left or right.
Overrides:
scrollRectToVisible in class JComponent
Parameters:
r - the region to scroll

paramString

protected String paramString()
Returns a string representation of this JTextField. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JTextComponent
Returns:
a string representation of this JTextField.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTextField. For JTextFields, the AccessibleContext takes the form of an AccessibleJTextField. A new AccessibleJTextField instance is created if necessary.
Overrides:
getAccessibleContext in class JTextComponent
Returns:
an AccessibleJTextField that serves as the AccessibleContext of this JTextField
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


JTextPane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTextPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JEditorPane
                                |
                                +--javax.swing.JTextPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
public class JTextPane
extends JEditorPane

A text component that can be marked up with attributes that are represented graphically. You can find how-to information and examples of using text panes in Using Text Components, a section in The Java Tutorial.

This component models paragraphs that are composed of runs of character level attributes. Each paragraph may have a logical style attached to it which contains the default attributes to use if no overriden by attributes set on the paragraph or character run. Components and images may be embedded in the flow of text.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTextPane key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
StyledEditorKit, Serialized Form

Inner classes inherited from class javax.swing.JEditorPane
JEditorPane.AccessibleJEditorPane, JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTextPane()
Constructs a new JTextPane.
JTextPane(StyledDocument doc)
Constructs a new JTextPane, with a specified document model.
Method Summary
Style | addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
protected EditorKit | createDefaultEditorKit() Creates the EditorKit to use by default.
AttributeSet | getCharacterAttributes() Fetches the character attributes in effect at the current location of the caret, or null.
MutableAttributeSet | getInputAttributes() Gets the input attributes for the pane.
Style | getLogicalStyle() Fetches the logical style assigned to the paragraph represented by the current position of the caret, or null.
AttributeSet | getParagraphAttributes() Fetches the current paragraph attributes in effect at the location of the caret, or null if none.
Style | getStyle(String nm) Fetches a named non-null style previously added.
StyledDocument | getStyledDocument() Fetches the model associated with the editor.
protected StyledEditorKit | getStyledEditorKit() Gets the editor kit.
String | getUIClassID() Returns the class ID for the UI.
void | insertComponent(Component c) Inserts a component into the document as a replacement for the currently selected content.
void | insertIcon(Icon g) Inserts an icon into the document as a replacement for the currently selected content.
protected String | paramString() Returns a string representation of this JTextPane.
void | removeStyle(String nm) Removes a named non-null style previously added to the document.
void | replaceSelection(String content) Replaces the currently selected content with new content represented by the given string.
void | setCharacterAttributes(AttributeSet attr, boolean replace) Applies the given attributes to character content.
void | setDocument(Document doc) Associates the editor with a text document.
void | setEditorKit(EditorKit kit) Sets the currently installed kit for handling content.
void | setLogicalStyle(Style s) Sets the logical style to use for the paragraph at the current caret position.
void | setParagraphAttributes(AttributeSet attr, boolean replace) Applies the given attributes to paragraphs.
void | setStyledDocument(StyledDocument doc) Associates the editor with a text document.
Methods inherited from class javax.swing.JEditorPane
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getStream, getText, isFocusCycleRoot, isManagingFocus, processComponentKeyEvent, processKeyEvent, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JTextPane

public JTextPane()
Constructs a new JTextPane. A new instance of StyledEditorKit is created and set, and the document model set to null.

JTextPane

public JTextPane(StyledDocument doc)
Constructs a new JTextPane, with a specified document model. A new instance of javax.swing.text.StyledEditorKit is created and set.
Parameters:
doc - the document model
Method Detail

getUIClassID

public String getUIClassID()
Returns the class ID for the UI.
Overrides:
getUIClassID in class JEditorPane
Returns:
the ID ("TextPaneUI")
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setDocument

public void setDocument(Document doc)
Associates the editor with a text document. This must be a StyledDocument.
Overrides:
setDocument in class JTextComponent
Parameters:
doc - the document to display/edit
Throws:
IllegalArgumentException - if doc can't be narrowed to a StyledDocument which is the required type of model for this text component

setStyledDocument

public void setStyledDocument(StyledDocument doc)
Associates the editor with a text document. The currently registered factory is used to build a view for the document, which gets displayed by the editor.
Parameters:
doc - the document to display/edit

getStyledDocument

public StyledDocument getStyledDocument()
Fetches the model associated with the editor.
Returns:
the model

replaceSelection

public void replaceSelection(String content)
Replaces the currently selected content with new content represented by the given string. If there is no selection this amounts to an insert of the given text. If there is no replacement text this amounts to a removal of the current selection. The replacement text will have the attributes currently defined for input. If the document is not editable, beep and return. Then if the document is null, do nothing. If the content to insert is null or empty, ignore it.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Overrides:
replaceSelection in class JEditorPane
Parameters:
content - the content to replace the selection with

insertComponent

public void insertComponent(Component c)
Inserts a component into the document as a replacement for the currently selected content. If there is no selection the component is effectively inserted at the current position of the caret. This is represented in the associated document as an attribute of one character of content.
Parameters:
c - the component to insert

insertIcon

public void insertIcon(Icon g)
Inserts an icon into the document as a replacement for the currently selected content. If there is no selection the icon is effectively inserted at the current position of the caret. This is represented in the associated document as an attribute of one character of content.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
g - the icon to insert
See Also:
Icon

addStyle

public Style addStyle(String nm,
                      Style parent)
Adds a new style into the logical style hierarchy. Style attributes resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.
Parameters:
nm - the name of the style (must be unique within the collection of named styles). The name may be null if the style is unnamed, but the caller is responsible for managing the reference returned as an unnamed style can't be fetched by name. An unnamed style may be useful for things like character attribute overrides such as found in a style run.
parent - the parent style. This may be null if unspecified attributes need not be resolved in some other style.
Returns:
the new Style

removeStyle

public void removeStyle(String nm)
Removes a named non-null style previously added to the document.
Parameters:
nm - the name of the style to remove

getStyle

public Style getStyle(String nm)
Fetches a named non-null style previously added.
Parameters:
nm - the name of the style
Returns:
the style

setLogicalStyle

public void setLogicalStyle(Style s)
Sets the logical style to use for the paragraph at the current caret position. If attributes aren't explicitly set for character and paragraph attributes they will resolve through the logical style assigned to the paragraph, which in term may resolve through some hierarchy completely independant of the element hierarchy in the document.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
s - the logical style to assign to the paragraph, or null for no style

getLogicalStyle

public Style getLogicalStyle()
Fetches the logical style assigned to the paragraph represented by the current position of the caret, or null.
Returns:
the style

getCharacterAttributes

public AttributeSet getCharacterAttributes()
Fetches the character attributes in effect at the current location of the caret, or null.
Returns:
the attributes, or null

setCharacterAttributes

public void setCharacterAttributes(AttributeSet attr,
                                   boolean replace)
Applies the given attributes to character content. If there is a selection, the attributes are applied to the selection range. If there is no selection, the attributes are applied to the input attribute set which defines the attributes for any new text that gets inserted.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
attr - the attributes
replace - if true, then replace the existing attributes first

getParagraphAttributes

public AttributeSet getParagraphAttributes()
Fetches the current paragraph attributes in effect at the location of the caret, or null if none.
Returns:
the attributes

setParagraphAttributes

public void setParagraphAttributes(AttributeSet attr,
                                   boolean replace)
Applies the given attributes to paragraphs. If there is a selection, the attributes are applied to the paragraphs that intersect the selection. if there is no selection, the attributes are applied to the paragraph at the current caret position.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
attr - the non-null attributes
replace - if true, replace the existing attributes first

getInputAttributes

public MutableAttributeSet getInputAttributes()
Gets the input attributes for the pane.
Returns:
the attributes

getStyledEditorKit

protected final StyledEditorKit getStyledEditorKit()
Gets the editor kit.
Returns:
the editor kit.

createDefaultEditorKit

protected EditorKit createDefaultEditorKit()
Creates the EditorKit to use by default. This is implemented to return javax.swing.text.StyledEditorKit.
Overrides:
createDefaultEditorKit in class JEditorPane
Returns:
the editor kit

setEditorKit

public final void setEditorKit(EditorKit kit)
Sets the currently installed kit for handling content. This is the bound property that establishes the content type of the editor.
Overrides:
setEditorKit in class JEditorPane
Parameters:
kit - the desired editor behavior.
Throws:
IllegalArgumentException - if kit is not a StyledEditorKit

paramString

protected String paramString()
Returns a string representation of this JTextPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JEditorPane
Returns:
a string representation of this JTextPane.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JToggleButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToggleButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JToggleButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
JCheckBox, JRadioButton
public class JToggleButton
extends AbstractButton
implements Accessible

An implementation of a two-state button. The JRadioButton and JCheckBox classes are subclasses of this class. For information on using them see How to Use Buttons, Check Boxes, and Radio Buttons, a section in The Java Tutorial.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JToggleButton key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JRadioButton, JCheckBox, Serialized Form

Inner Class Summary
protected class | JToggleButton.AccessibleJToggleButton This class implements accessibility support for the JToggleButton class.
static class | JToggleButton.ToggleButtonModel The ToggleButton model
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JToggleButton()
Creates an initially unselected toggle button without setting the text or image.
JToggleButton(Action a)
Creates a toggle button where properties are taken from the Action supplied.
JToggleButton(Icon icon)
Creates an initially unselected toggle button with the specified image but no text.
JToggleButton(Icon icon, boolean selected)
Creates a toggle button with the specified image and selection state, but no text.
JToggleButton(String text)
Creates an unselected toggle button with the specified text.
JToggleButton(String text, boolean selected)
Creates a toggle button with the specified text and selection state.
JToggleButton(String text, Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected.
JToggleButton(String text, Icon icon, boolean selected)
Creates a toggle button with the specified text, image, and selection state.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JToggleButton.
String | getUIClassID() Returns a string that specifies the name of the l&f class that renders this component.
protected String | paramString() Returns a string representation of this JToggleButton.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JToggleButton

public JToggleButton()
Creates an initially unselected toggle button without setting the text or image.

JToggleButton

public JToggleButton(Icon icon)
Creates an initially unselected toggle button with the specified image but no text.
Parameters:
icon - the image that the button should display

JToggleButton

public JToggleButton(Icon icon,
                     boolean selected)
Creates a toggle button with the specified image and selection state, but no text.
Parameters:
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JToggleButton

public JToggleButton(String text)
Creates an unselected toggle button with the specified text.
Parameters:
text - the string displayed on the toggle button

JToggleButton

public JToggleButton(String text,
                     boolean selected)
Creates a toggle button with the specified text and selection state.
Parameters:
text - the string displayed on the toggle button
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JToggleButton

public JToggleButton(Action a)
Creates a toggle button where properties are taken from the Action supplied.
Since:
1.3

JToggleButton

public JToggleButton(String text,
                     Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected.
Parameters:
text - the string displayed on the button
icon - the image that the button should display

JToggleButton

public JToggleButton(String text,
                     Icon icon,
                     boolean selected)
Creates a toggle button with the specified text, image, and selection state.
Parameters:
text - the text of the toggle button
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected
Method Detail

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class AbstractButton
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
String "ToggleButtonUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

paramString

protected String paramString()
Returns a string representation of this JToggleButton. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class AbstractButton
Returns:
a string representation of this JToggleButton.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JToggleButton. For toggle buttons, the AccessibleContext takes the form of an AccessibleJToggleButton. A new AccessibleJToggleButton instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJToggleButton that serves as the AccessibleContext of this JToggleButton
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JToolBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToolBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JToolBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
public class JToolBar
extends JComponent
implements SwingConstants, Accessible

JToolBar provides a component that is useful for displaying commonly used Actions or controls. For examples and information on using tool bars see How to Use Tool Bars, a section in The Java Tutorial.

A tool bar can be dragged out into a separate window by the user (unless the floatable property is set to false). In order for drag-out to work correctly, it is recommended that you add JToolBar instances to one of the four 'sides' of a container whose layout manager is a BorderLayout, and do not add children to any of the other four 'sides'.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JToolBar key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Action, Serialized Form

Inner Class Summary
protected class | JToolBar.AccessibleJToolBar This class implements accessibility support for the JToolBar class.
static class | JToolBar.Separator A toolbar-specific separator.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JToolBar()
Creates a new toolbar; orientation defaults to HORIZONTAL.
JToolBar(int orientation)
Creates a new toolbar with the specified orientation.
JToolBar(String name)
Creates a new toolbar with the specified name.
JToolBar(String name, int orientation)
Creates a new toolbar with a specified name and orientation.
Method Summary
JButton | add(Action a) Adds a new JButton which dispatches the action.
protected void | addImpl(Component comp, Object constraints, int index) If a JButton is being added, it is initially set to be disabled.
void | addSeparator() Appends a toolbar separator of default size to the end of the toolbar.
void | addSeparator(Dimension size) Appends a toolbar separator of a specified size to the end of the toolbar.
protected PropertyChangeListener | createActionChangeListener(JButton b) Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.
protected JButton | createActionComponent(Action a) Factory method which creates the JButton for Actions added to the JToolBar.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JToolBar.
Component | getComponentAtIndex(int i) Returns the component at the specified index.
int | getComponentIndex(Component c) Returns the index of the specified component.
Insets | getMargin() Returns the margin between the toolbar's border and its buttons.
int | getOrientation() Returns the current orientation of the toolbar.
ToolBarUI | getUI() Returns the toolbar's current UI.
String | getUIClassID() Returns the name of the L&F class that renders this component.
boolean | isBorderPainted() Checks whether the border should be painted.
boolean | isFloatable() Returns true if the JToolbar can be dragged out by the user.
protected void | paintBorder(Graphics g) Paint the toolbar's border if BorderPainted property is true.
protected String | paramString() Returns a string representation of this JToolBar.
void | setBorderPainted(boolean b) Sets whether the border should be painted.
void | setFloatable(boolean b) Sets whether the toolbar can be made to float.
void | setMargin(Insets m) Sets the margin between the toolbar's border and its buttons.
void | setOrientation(int o) Sets the orientation of the toolbar.
void | setUI(ToolBarUI ui) Sets the L&F object that renders this component.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JToolBar

public JToolBar()
Creates a new toolbar; orientation defaults to HORIZONTAL.

JToolBar

public JToolBar(int orientation)
Creates a new toolbar with the specified orientation. The orientation must be either HORIZONTAL or VERTICAL.
Parameters:
orientation - the orientation desired

JToolBar

public JToolBar(String name)
Creates a new toolbar with the specified name. The name is used as the title of the undocked toolbar. The default orientation is HORIZONTAL.
Parameters:
name - the name of the toolbar
Since:
1.3

JToolBar

public JToolBar(String name,
                int orientation)
Creates a new toolbar with a specified name and orientation. All other constructors call this constructor. If orientation is an invalid value, an exception will be thrown.
Parameters:
name - the name of the toolbar
orientation - the initial orientation -- it must be either HORIZONTAL or VERTICAL
Throws:
IllegalArgumentException - if orientation is neither HORIZONTAL nor VERTICAL
Since:
1.3
Method Detail

getUI

public ToolBarUI getUI()
Returns the toolbar's current UI.
See Also:
setUI(javax.swing.plaf.ToolBarUI)

setUI

public void setUI(ToolBarUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ToolBarUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ToolBarUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getComponentIndex

public int getComponentIndex(Component c)
Returns the index of the specified component. (Note: Separators occupy index positions.)
Parameters:
c - the Component to find
Returns:
an integer indicating the component's position, where 0 is first

getComponentAtIndex

public Component getComponentAtIndex(int i)
Returns the component at the specified index.
Parameters:
i - the component's position, where 0 is first
Returns:
the Component at that position, or null for an invalid index

setMargin

public void setMargin(Insets m)
Sets the margin between the toolbar's border and its buttons. Setting to null causes the toolbar to use the default margins. The toolbar's default Border object uses this value to create the proper margin. However, if a non-default border is set on the toolbar, it is that Border object's responsibility to create the appropriate margin space (otherwise this property will effectively be ignored).
Parameters:
m - an Insets object that defines the space between the border and the buttons
See Also:
Insets

getMargin

public Insets getMargin()
Returns the margin between the toolbar's border and its buttons.
Returns:
an Insets object containing the margin values
See Also:
Insets

isBorderPainted

public boolean isBorderPainted()
Checks whether the border should be painted.
Returns:
true if the border should be painted, else false
See Also:
setBorderPainted(boolean)

setBorderPainted

public void setBorderPainted(boolean b)
Sets whether the border should be painted.
Parameters:
b - if true, the border is painted
See Also:
isBorderPainted()

paintBorder

protected void paintBorder(Graphics g)
Paint the toolbar's border if BorderPainted property is true.
Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics context in which the painting is done
See Also:
JComponent.paint(java.awt.Graphics), JComponent.setBorder(javax.swing.border.Border)

isFloatable

public boolean isFloatable()
Returns true if the JToolbar can be dragged out by the user.
Returns:
true if the JToolbar can be dragged out by the user, false otherwise

setFloatable

public void setFloatable(boolean b)
Sets whether the toolbar can be made to float.
Parameters:
b - if true, the toolbar can be dragged out; false otherwise
See Also:
isFloatable()

getOrientation

public int getOrientation()
Returns the current orientation of the toolbar. The value is either HORIZONTAL or VERTICAL.
Returns:
an integer representing the current orientation -- either HORIZONTAL or VERTICAL
See Also:
setOrientation(int)

setOrientation

public void setOrientation(int o)
Sets the orientation of the toolbar. The orientation must have either the value HORIZONTAL or VERTICAL. If orientation is an invalid value, an exception will be thrown.
Parameters:
o - the new orientation -- either HORIZONTAL or VERTICAL
Throws:
IllegalArgumentException - if orientation is neither HORIZONTAL nor VERTICAL
See Also:
getOrientation()

addSeparator

public void addSeparator()
Appends a toolbar separator of default size to the end of the toolbar. The default size is determined by the current look and feel.

addSeparator

public void addSeparator(Dimension size)
Appends a toolbar separator of a specified size to the end of the toolbar.
Parameters:
size - the Dimension of the separator

add

public JButton add(Action a)
Adds a new JButton which dispatches the action.

As of 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using using setAction, and then add that control directly to the Container.

Parameters:
a - the Action object to add as a new menu item
Returns:
the new button which dispatches the action

createActionComponent

protected JButton createActionComponent(Action a)
Factory method which creates the JButton for Actions added to the JToolBar. The default name is empty if a null action is passed.

As of 1.3, this is no longer the preferred method for adding Actions to a Container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

Parameters:
a - the Action for the button to be added
Returns:
the newly created button
See Also:
Action

createActionChangeListener

protected PropertyChangeListener createActionChangeListener(JButton b)
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.

As of 1.3, this is no longer the preferred method for adding Actions to a Container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

Returns:
null

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
If a JButton is being added, it is initially set to be disabled.
Overrides:
addImpl in class Container
Parameters:
comp - the component to be enhanced
constraints - the constraints to be enforced on the component
index - the index of the component

paramString

protected String paramString()
Returns a string representation of this JToolBar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JToolBar.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JToolBar. For tool bars, the AccessibleContext takes the form of an AccessibleJToolBar. A new AccessibleJToolBar instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJToolBar that serves as the AccessibleContext of this JToolBar
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JToolTip

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToolTip

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JToolTip
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JToolTip
extends JComponent
implements Accessible

Used to display a "Tip" for a Component. Typically components provide api to automate the process of using ToolTips. For example, any Swing component can use the JComponent setToolTipText method to specify the text for a standard tooltip. A component that wants to create a custom ToolTip display can override JComponent's createToolTip method and use a subclass of this class.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JToolTip key assignments.

See How to Use Tool Tips in The Java Tutorial for further documentation.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JComponent.setToolTipText(java.lang.String), JComponent.createToolTip(), Serialized Form

Inner Class Summary
protected  class JToolTip.AccessibleJToolTip
This class implements accessibility support for the JToolTip class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JToolTip()
Creates a tool tip.
Method Summary
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JToolTip.
JComponent | getComponent() Returns the component the tooltip applies to.
String | getTipText() Returns the text that is shown when the tool tip is displayed.
ToolTipUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
protected String | paramString() Returns a string representation of this JToolTip.
void | setComponent(JComponent c) Specifies the component that the tooltip describes.
void | setTipText(String tipText) Sets the text to show when the tool tip is displayed.
void | updateUI() Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JToolTip

public JToolTip()
Creates a tool tip.
Method Detail

getUI

public ToolTipUI getUI()
Returns the L&F object that renders this component.
Returns:
the ToolTipUI object that renders this component

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ToolTipUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setTipText

public void setTipText(String tipText)
Sets the text to show when the tool tip is displayed. The string tipText may be null.
Parameters:
tipText - the String to display

getTipText

public String getTipText()
Returns the text that is shown when the tool tip is displayed. The returned value may be null.
Returns:
the String that is displayed

setComponent

public void setComponent(JComponent c)
Specifies the component that the tooltip describes. The component c may be null and will have no effect.
Parameters:
c - the JComponent being described
See Also:
JComponent.createToolTip()

getComponent

public JComponent getComponent()
Returns the component the tooltip applies to. The returned value may be null.
Returns:
the component that the tooltip describes
See Also:
JComponent.createToolTip()

paramString

protected String paramString()
Returns a string representation of this JToolTip. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JToolTip

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JToolTip. For tool tips, the AccessibleContext takes the form of an AccessibleJToolTip. A new AccessibleJToolTip instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJToolTip that serves as the AccessibleContext of this JToolTip
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTree

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTree
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
public class JTree
extends JComponent
implements Scrollable, Accessible

A control that displays a set of hierarchical data as an outline. You can find task-oriented documentation and examples of using trees in How to Use Trees, a section in The Java Tutorial.

A specific node in a tree can be identified either by a TreePath (an object that encapsulates a node and all of its ancestors), or by its display row, where each row in the display area displays one node. An expanded node is one displays its children. A collapsed node is one which hides them. A hidden node is one which is under a collapsed ancestor. All of a viewable nodes parents are expanded, but may or may not be displayed. A displayed node is both viewable and in the display area, where it can be seen.

The following JTree methods use "visible" to mean "displayed":

  • isRootVisible()
  • setRootVisible()
  • scrollPathToVisible()
  • scrollRowToVisible()
  • getVisibleRowCount()
  • setVisibleRowCount()

The next group of JTree methods use "visible" to mean "viewable" (under an expanded parent):

  • isVisible()
  • makeVisible()

If you are interested in knowing when the selection changes implement the TreeSelectionListener interface and add the instance using the method addTreeSelectionListener. valueChanged will be invoked when the selection changes, that is if the user clicks twice on the same node valueChanged will only be invoked once.

If you are interested in detecting either double-click events or when a user clicks on a node, regardless of whether or not it was selected, we recommend you do the following:

 final JTree tree = ...;

 MouseListener ml = new MouseAdapter() {
     public void mousePressed(MouseEvent e) {
         int selRow = tree.getRowForLocation(e.getX(), e.getY());
         TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
         if(selRow != -1) {
             if(e.getClickCount() == 1) {
                 mySingleClick(selRow, selPath);
             }
             else if(e.getClickCount() == 2) {
                 myDoubleClick(selRow, selPath);
             }
         }
     }
 };
 tree.addMouseListener(ml);
NOTE: This example obtains both the path and row, but you only need to get the one you're interested in.

To use JTree to display compound nodes (for example, nodes containing both a graphic icon and text), subclass TreeCellRenderer and use setCellRenderer(javax.swing.tree.TreeCellRenderer) to tell the tree to use it. To edit such nodes, subclass TreeCellEditor and use setCellEditor(javax.swing.tree.TreeCellEditor).

Like all JComponent classes, you can use InputMap and ActionMap to associate an Action object with a KeyStroke and execute the action under specified conditions.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JTree key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | JTree.AccessibleJTree This class implements accessibility support for the JTree class.
static class | JTree.DynamicUtilTreeNode DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
protected static class | JTree.EmptySelectionModel EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
protected class | JTree.TreeModelHandler Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.
protected class | JTree.TreeSelectionRedirector Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static String | ANCHOR_SELECTION_PATH_PROPERTY Bound property name for anchor selection path.
static String | CELL_EDITOR_PROPERTY Bound property name for cellEditor.
static String | CELL_RENDERER_PROPERTY Bound property name for cellRenderer.
protected TreeCellEditor | cellEditor Editor for the entries.
protected TreeCellRenderer | cellRenderer The cell used to draw nodes.
protected boolean | editable Is the tree editable? Default is false.
static String | EDITABLE_PROPERTY Bound property name for editable.
static String | EXPANDS_SELECTED_PATHS_PROPERTY Bound property name for expands selected paths property
static String | INVOKES_STOP_CELL_EDITING_PROPERTY Bound property name for messagesStopCellEditing.
protected boolean | invokesStopCellEditing If true, when editing is to be stopped by way of selection changing, data in tree changing or other means stopCellEditing is invoked, and changes are saved.
static String | LARGE_MODEL_PROPERTY Bound property name for largeModel.
protected boolean | largeModel Is this tree a large model? This is a code-optimization setting.
static String | LEAD_SELECTION_PATH_PROPERTY Bound property name for leadSelectionPath.
static String | ROOT_VISIBLE_PROPERTY Bound property name for rootVisible.
protected boolean | rootVisible True if the root node is displayed, false if its children are the highest visible nodes.
static String | ROW_HEIGHT_PROPERTY Bound property name for rowHeight.
protected int | rowHeight Height to use for each display row.
static String | SCROLLS_ON_EXPAND_PROPERTY Bound property name for scrollsOnExpand.
protected boolean | scrollsOnExpand If true, when a node is expanded, as many of the descendants are scrolled to be visible.
static String | SELECTION_MODEL_PROPERTY Bound property name for selectionModel.
protected TreeSelectionModel | selectionModel Models the set of selected nodes in this tree.
protected JTree.TreeSelectionRedirector | selectionRedirector Creates a new event and passed it off the selectionListeners.
static String | SHOWS_ROOT_HANDLES_PROPERTY Bound property name for showsRootHandles.
protected boolean | showsRootHandles True if handles are displayed at the topmost level of the tree.
static String | TOGGLE_CLICK_COUNT_PROPERTY Bound property name for toggleClickCount.
protected int | toggleClickCount Number of mouse clicks before a node is expanded.
static String | TREE_MODEL_PROPERTY Bound property name for treeModel.
protected TreeModel | treeModel The model that defines the tree displayed by this object.
protected TreeModelListener | treeModelListener Updates the expandedState.
static String | VISIBLE_ROW_COUNT_PROPERTY Bound property name for visibleRowCount.
protected int | visibleRowCount Number of rows to make visible at one time.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTree()
Returns a JTree with a sample model.
JTree(Hashtable value)
Returns a JTree created from a Hashtable which does not display with root.
JTree(Object[] value)
Returns a JTree with each element of the specified array as the child of a new root node which is not displayed.
JTree(TreeModel newModel)
Returns an instance of JTree which displays the root node -- the tree is created using the specified data model.
JTree(TreeNode root)
Returns a JTree with the specified TreeNode as its root, which displays the root node.
JTree(TreeNode root, boolean asksAllowsChildren)
Returns a JTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
JTree(Vector value)
Returns a JTree with each element of the specified Vector as the child of a new root node which is not displayed.
Method Summary
void | addSelectionInterval(int index0, int index1) Adds the paths between index0 and index1, inclusive, to the selection.
void | addSelectionPath(TreePath path) Adds the node identified by the specified TreePath to the current selection.
void | addSelectionPaths(TreePath[] paths) Adds each path in the array of paths to the current selection.
void | addSelectionRow(int row) Adds the path at the specified row to the current selection.
void | addSelectionRows(int[] rows) Adds the paths at each of the specified rows to the current selection.
void | addTreeExpansionListener(TreeExpansionListener tel) Adds a listener for TreeExpansion events.
void | addTreeSelectionListener(TreeSelectionListener tsl) Adds a listener for TreeSelection events.
void | addTreeWillExpandListener(TreeWillExpandListener tel) Adds a listener for TreeWillExpand events.
void | cancelEditing() Cancels the current editing session.
void | clearSelection() Clears the selection.
protected void | clearToggledPaths() Clears the cache of toggled tree paths.
void | collapsePath(TreePath path) Ensures that the node identified by the specified path is collapsed and viewable.
void | collapseRow(int row) Ensures that the node in the specified row is collapsed.
String | convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Called by the renderers to convert the specified value to text.
protected static TreeModel | createTreeModel(Object value) Returns a TreeModel wrapping the specified object.
protected TreeModelListener | createTreeModelListener() Creates and returns an instance of TreeModelHandler.
void | expandPath(TreePath path) Ensures that the node identified by the specified path is expanded and viewable.
void | expandRow(int row) Ensures that the node in the specified row is expanded and viewable.
void | fireTreeCollapsed(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | fireTreeExpanded(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | fireTreeWillCollapse(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | fireTreeWillExpand(TreePath path) Notify all listeners that have registered interest for notification on this event type.
protected void | fireValueChanged(TreeSelectionEvent e) Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTree.
TreePath | getAnchorSelectionPath() Returns the path identified as the anchor.
TreeCellEditor | getCellEditor() Returns the editor used to edit entries in the tree.
TreeCellRenderer | getCellRenderer() Returns the current TreeCellRenderer that is rendering each cell.
TreePath | getClosestPathForLocation(int x, int y) Returns the path to the node that is closest to x,y.
int | getClosestRowForLocation(int x, int y) Returns the row to the node that is closest to x,y.
protected static TreeModel | getDefaultTreeModel() Creates and returns a sample TreeModel.
protected Enumeration | getDescendantToggledPaths(TreePath parent) Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
TreePath | getEditingPath() Returns the path to the element that is currently being edited.
Enumeration | getExpandedDescendants(TreePath parent) Returns an Enumeration of the descendants of the path parent that are currently expanded.
boolean | getExpandsSelectedPaths() Returns the expandsSelectedPaths property.
boolean | getInvokesStopCellEditing() Returns the indicator that tells what happens when editing is interrupted.
Object | getLastSelectedPathComponent() Returns the last path component in the first node of the current selection.
TreePath | getLeadSelectionPath() Returns the path identified as the lead.
int | getLeadSelectionRow() Returns the row index corresponding to the lead path.
int | getMaxSelectionRow() Returns the last selected row.
int | getMinSelectionRow() Gets the first selected row.
TreeModel | getModel() Returns the TreeModel that is providing the data.
protected TreePath[] | getPathBetweenRows(int index0, int index1) Returns JTreePath instances representing the path between index0 and index1 (including index1).
Rectangle | getPathBounds(TreePath path) Returns the Rectangle that the specified node will be drawn into.
TreePath | getPathForLocation(int x, int y) Returns the path for the node at the specified location.
TreePath | getPathForRow(int row) Returns the path for the specified row.
Dimension | getPreferredScrollableViewportSize() Returns the preferred display size of a JTree.
Rectangle | getRowBounds(int row) Returns the Rectangle that the node at the specified row is drawn in.
int | getRowCount() Returns the number of rows that are currently being displayed.
int | getRowForLocation(int x, int y) Returns the row for the specified location.
int | getRowForPath(TreePath path) Returns the row that displays the node identified by the specified path.
int | getRowHeight() Returns the height of each row.
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Returns the amount for a block increment, which is the height or width of visibleRect, based on orientation.
boolean | getScrollableTracksViewportHeight() Returns false to indicate that the height of the viewport does not determine the height of the table, unless the preferred height of the tree is smaller than the viewports height.
boolean | getScrollableTracksViewportWidth() Returns false to indicate that the width of the viewport does not determine the width of the table, unless the preferred width of the tree is smaller than the viewports width.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Returns the amount to increment when scrolling.
boolean | getScrollsOnExpand() Returns true if the tree scrolls to show previously hidden children.
int | getSelectionCount() Returns the number of nodes selected.
TreeSelectionModel | getSelectionModel() Returns the model for selections.
TreePath | getSelectionPath() Returns the path to the first selected node.
TreePath[] | getSelectionPaths() Returns the paths of all selected values.
int[] | getSelectionRows() Returns all of the currently selected rows.
boolean | getShowsRootHandles() Returns true if handles for the root nodes are displayed.
int | getToggleClickCount() Returns the number of mouse clicks needed to expand or close a node.
String | getToolTipText(MouseEvent event) Overrides JComponent's getToolTipText method in order to allow renderer's tips to be used if it has text set.
TreeUI | getUI() Returns the L&F object that renders this component.
String | getUIClassID() Returns the name of the L&F class that renders this component.
int | getVisibleRowCount() Returns the number of rows that are displayed in the display area.
boolean | hasBeenExpanded(TreePath path) Returns true if the node identified by the path has ever been expanded.
boolean | isCollapsed(int row) Returns true if the node at the specified display row is collapsed.
boolean | isCollapsed(TreePath path) Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
boolean | isEditable() Returns true if the tree is editable.
boolean | isEditing() Returns true if the tree is being edited.
boolean | isExpanded(int row) Returns true if the node at the specified display row is currently expanded.
boolean | isExpanded(TreePath path) Returns true if the node identified by the path is currently expanded,
boolean | isFixedRowHeight() Returns true if the height of each display row is a fixed size.
boolean | isLargeModel() Returns true if the tree is configured for a large model.
boolean | isPathEditable(TreePath path) Returns isEditable.
boolean | isPathSelected(TreePath path) Returns true if the item identified by the path is currently selected.
boolean | isRootVisible() Returns true if the root node of the tree is displayed.
boolean | isRowSelected(int row) Returns true if the node identitifed by row is selected.
boolean | isSelectionEmpty() Returns true if the selection is currently empty.
boolean | isVisible(TreePath path) Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.
void | makeVisible(TreePath path) Ensures that the node identified by path is currently viewable.
protected String | paramString() Returns a string representation of this JTree.
protected boolean | removeDescendantSelectedPaths(TreePath path, boolean includePath) Removes any paths in the selection that are descendants of path.
protected void | removeDescendantToggledPaths(Enumeration toRemove) Removes any descendants of the TreePaths in toRemove that have been expanded.
void | removeSelectionInterval(int index0, int index1) Removes the nodes between index0 and index1, inclusive, from the selection.
void | removeSelectionPath(TreePath path) Removes the node identified by the specified path from the current selection.
void | removeSelectionPaths(TreePath[] paths) Removes the nodes identified by the specified paths from the current selection.
void | removeSelectionRow(int row) Removes the path at the index row from the current selection.
void | removeSelectionRows(int[] rows) Removes the paths that are selected at each of the specified rows.
void | removeTreeExpansionListener(TreeExpansionListener tel) Removes a listener for TreeExpansion events.
void | removeTreeSelectionListener(TreeSelectionListener tsl) Removes a TreeSelection listener.
void | removeTreeWillExpandListener(TreeWillExpandListener tel) Removes a listener for TreeWillExpand events.
void | scrollPathToVisible(TreePath path) Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.
void | scrollRowToVisible(int row) Scrolls the item identified by row until it is displayed.
void | setAnchorSelectionPath(TreePath newPath) Sets the path identified as the anchor.
void | setCellEditor(TreeCellEditor cellEditor) Sets the cell editor.
void | setCellRenderer(TreeCellRenderer x) Sets the TreeCellRenderer that will be used to draw each cell.
void | setEditable(boolean flag) Determines whether the tree is editable.
protected void | setExpandedState(TreePath path, boolean state) Sets the expanded state of this JTree.
void | setExpandsSelectedPaths(boolean newValue) Configures the expandsSelectedPaths property.
void | setInvokesStopCellEditing(boolean newValue) Determines what happens when editing is interrupted by selecting another node in the tree, a change in the tree's data, or by some other means.
void | setLargeModel(boolean newValue) Specifies whether the UI should use a large model.
void | setLeadSelectionPath(TreePath newPath) Sets the path identifies as the lead.
void | setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | setRootVisible(boolean rootVisible) Determines whether or not the root node from the TreeModel is visible.
void | setRowHeight(int rowHeight) Sets the height of each cell, in pixels.
void | setScrollsOnExpand(boolean newValue) Determines whether or not when a node is expanded, as many of the descendants are scrolled to be inside the viewport as possible.
void | setSelectionInterval(int index0, int index1) Selects the nodes between index0 and index1, inclusive.
void | setSelectionModel(TreeSelectionModel selectionModel) Sets the tree's selection model.
void | setSelectionPath(TreePath path) Selects the node identified by the specified path.
void | setSelectionPaths(TreePath[] paths) Selects the nodes identified by the specified array of paths.
void | setSelectionRow(int row) Selects the node at the specified row in the display.
void | setSelectionRows(int[] rows) Selects the nodes corresponding to each of the specified rows in the display.
void | setShowsRootHandles(boolean newValue) Determines whether the node handles are to be displayed.
void | setToggleClickCount(int clickCount) Sets the number of mouse clicks before a node will expand or close.
void | setUI(TreeUI ui) Sets the L&F object that renders this component.
void | setVisibleRowCount(int newCount) Sets the number of rows that are to be displayed.
void | startEditingAtPath(TreePath path) Selects the node identified by the specified path and initiates editing.
boolean | stopEditing() Ends the current editing session.
void | treeDidChange() Sent when the tree has changed enough that we need to resize the bounds, but not enough that we need to remove the expanded node set (e.g nodes were expanded or collapsed, or nodes were inserted into the tree).
void | updateUI() Notification from the UIManager that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

treeModel

protected transient TreeModel treeModel
The model that defines the tree displayed by this object.

selectionModel

protected transient TreeSelectionModel selectionModel
Models the set of selected nodes in this tree.

rootVisible

protected boolean rootVisible
True if the root node is displayed, false if its children are the highest visible nodes.

cellRenderer

protected transient TreeCellRenderer cellRenderer
The cell used to draw nodes. If null, the UI uses a default cellRenderer.

rowHeight

protected int rowHeight
Height to use for each display row. If this is <= 0="0" the="the" renderer="renderer" determines="determines" the="the" height="height" for="for" each="each" row.

showsRootHandles

protected boolean showsRootHandles
True if handles are displayed at the topmost level of the tree.

A handle is a small icon that displays adjacent to the node which allows the user to click once to expand or collapse the node. A common interface shows a plus sign (+) for a node which can be expanded and a minus sign (-) for a node which can be collapsed. Handles are always shown for nodes below the topmost level.

If the rootVisible setting specifies that the root node is to be displayed, then that is the only node at the topmost level. If the root node is not displayed, then all of its children are at the topmost level of the tree. Handles are always displayed for nodes other than the topmost.

If the root node isn't visible, it is generally a good to make this value true. Otherwise, the tree looks exactly like a list, and users may not know that the "list entries" are actually tree nodes.

See Also:
rootVisible

selectionRedirector

protected transient JTree.TreeSelectionRedirector selectionRedirector
Creates a new event and passed it off the selectionListeners.

cellEditor

protected transient TreeCellEditor cellEditor
Editor for the entries. Default is null (tree is not editable).

editable

protected boolean editable
Is the tree editable? Default is false.

largeModel

protected boolean largeModel
Is this tree a large model? This is a code-optimization setting. A large model can be used when the cell height is the same for all nodes. The UI will then cache very little information and instead continually message the model. Without a large model the UI caches most of the information, resulting in fewer method calls to the model.

This value is only a suggestion to the UI. Not all UIs will take advantage of it. Default value is false.

visibleRowCount

protected int visibleRowCount
Number of rows to make visible at one time. This value is used for the Scrollable interface. It determines the preferred size of the display area.

invokesStopCellEditing

protected boolean invokesStopCellEditing
If true, when editing is to be stopped by way of selection changing, data in tree changing or other means stopCellEditing is invoked, and changes are saved. If false, cancelCellEditing is invoked, and changes are discarded. Default is false.

scrollsOnExpand

protected boolean scrollsOnExpand
If true, when a node is expanded, as many of the descendants are scrolled to be visible.

toggleClickCount

protected int toggleClickCount
Number of mouse clicks before a node is expanded.

treeModelListener

protected transient TreeModelListener treeModelListener
Updates the expandedState.

CELL_RENDERER_PROPERTY

public static final String CELL_RENDERER_PROPERTY
Bound property name for cellRenderer.

TREE_MODEL_PROPERTY

public static final String TREE_MODEL_PROPERTY
Bound property name for treeModel.

ROOT_VISIBLE_PROPERTY

public static final String ROOT_VISIBLE_PROPERTY
Bound property name for rootVisible.

SHOWS_ROOT_HANDLES_PROPERTY

public static final String SHOWS_ROOT_HANDLES_PROPERTY
Bound property name for showsRootHandles.

ROW_HEIGHT_PROPERTY

public static final String ROW_HEIGHT_PROPERTY
Bound property name for rowHeight.

CELL_EDITOR_PROPERTY

public static final String CELL_EDITOR_PROPERTY
Bound property name for cellEditor.

EDITABLE_PROPERTY

public static final String EDITABLE_PROPERTY
Bound property name for editable.

LARGE_MODEL_PROPERTY

public static final String LARGE_MODEL_PROPERTY
Bound property name for largeModel.

SELECTION_MODEL_PROPERTY

public static final String SELECTION_MODEL_PROPERTY
Bound property name for selectionModel.

VISIBLE_ROW_COUNT_PROPERTY

public static final String VISIBLE_ROW_COUNT_PROPERTY
Bound property name for visibleRowCount.

INVOKES_STOP_CELL_EDITING_PROPERTY

public static final String INVOKES_STOP_CELL_EDITING_PROPERTY
Bound property name for messagesStopCellEditing.

SCROLLS_ON_EXPAND_PROPERTY

public static final String SCROLLS_ON_EXPAND_PROPERTY
Bound property name for scrollsOnExpand.

TOGGLE_CLICK_COUNT_PROPERTY

public static final String TOGGLE_CLICK_COUNT_PROPERTY
Bound property name for toggleClickCount.

LEAD_SELECTION_PATH_PROPERTY

public static final String LEAD_SELECTION_PATH_PROPERTY
Bound property name for leadSelectionPath.
Since:
1.3

ANCHOR_SELECTION_PATH_PROPERTY

public static final String ANCHOR_SELECTION_PATH_PROPERTY
Bound property name for anchor selection path.
Since:
1.3

EXPANDS_SELECTED_PATHS_PROPERTY

public static final String EXPANDS_SELECTED_PATHS_PROPERTY
Bound property name for expands selected paths property
Since:
1.3
Constructor Detail

JTree

public JTree()
Returns a JTree with a sample model. The default model used by the tree defines a leaf node as any node without children.
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(Object[] value)
Returns a JTree with each element of the specified array as the child of a new root node which is not displayed. By default, the tree defines a leaf node as any node without children.
Parameters:
value - an array of Objects
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(Vector value)
Returns a JTree with each element of the specified Vector as the child of a new root node which is not displayed. By default, the tree defines a leaf node as any node without children.
Parameters:
value - a Vector
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(Hashtable value)
Returns a JTree created from a Hashtable which does not display with root. Each value-half of the key/value pairs in the HashTable becomes a child of the new root node. By default, the tree defines a leaf node as any node without children.
Parameters:
value - a Hashtable
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(TreeNode root)
Returns a JTree with the specified TreeNode as its root, which displays the root node. By default, the tree defines a leaf node as any node without children.
Parameters:
root - a TreeNode object
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(TreeNode root,
             boolean asksAllowsChildren)
Returns a JTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
Parameters:
root - a TreeNode object
asksAllowsChildren - if false, any node without children is a leaf node; if true, only nodes that do not allow children are leaf nodes
See Also:
DefaultTreeModel.asksAllowsChildren

JTree

public JTree(TreeModel newModel)
Returns an instance of JTree which displays the root node -- the tree is created using the specified data model.
Parameters:
newModel - the TreeModel to use as the data model
Method Detail

getDefaultTreeModel

protected static TreeModel getDefaultTreeModel()
Creates and returns a sample TreeModel. Used primarily for beanbuilders to show something interesting.
Returns:
the default TreeModel

createTreeModel

protected static TreeModel createTreeModel(Object value)
Returns a TreeModel wrapping the specified object. If the object is:
  • an array of Objects,
  • a Hashtable, or
  • a Vector
then a new root node is created with each of the incoming objects as children. Otherwise, a new root is created with the specified object as its value.
Parameters:
value - the Object used as the foundation for the TreeModel
Returns:
a TreeModel wrapping the specified object

getUI

public TreeUI getUI()
Returns the L&F object that renders this component.
Returns:
the TreeUI object that renders this component

setUI

public void setUI(TreeUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the TreeUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "TreeUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getCellRenderer

public TreeCellRenderer getCellRenderer()
Returns the current TreeCellRenderer that is rendering each cell.
Returns:
the TreeCellRenderer that is rendering each cell

setCellRenderer

public void setCellRenderer(TreeCellRenderer x)
Sets the TreeCellRenderer that will be used to draw each cell.
Parameters:
x - the TreeCellRenderer that is to render each cell

setEditable

public void setEditable(boolean flag)
Determines whether the tree is editable. Fires a property change event if the new setting is different from the existing setting.
Parameters:
flag - a boolean value, true if the tree is editable

isEditable

public boolean isEditable()
Returns true if the tree is editable.
Returns:
true if the tree is editable

setCellEditor

public void setCellEditor(TreeCellEditor cellEditor)
Sets the cell editor. A null value implies that the tree cannot be edited. If this represents a change in the cellEditor, the propertyChange method is invoked on all listeners.
Parameters:
cellEditor - the TreeCellEditor to use

getCellEditor

public TreeCellEditor getCellEditor()
Returns the editor used to edit entries in the tree.
Returns:
the TreeCellEditor in use, or null if the tree cannot be edited

getModel

public TreeModel getModel()
Returns the TreeModel that is providing the data.
Returns:
the TreeModel that is providing the data

setModel

public void setModel(TreeModel newModel)
Sets the TreeModel that will provide the data.
Parameters:
newModel - the TreeModel that is to provide the data

isRootVisible

public boolean isRootVisible()
Returns true if the root node of the tree is displayed.
Returns:
true if the root node of the tree is displayed
See Also:
rootVisible

setRootVisible

public void setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible.
Parameters:
rootVisible - true if the root node of the tree is to be displayed
See Also:
rootVisible

setShowsRootHandles

public void setShowsRootHandles(boolean newValue)
Determines whether the node handles are to be displayed.
Parameters:
newValue - true if root handles are to be displayed
See Also:
showsRootHandles

getShowsRootHandles

public boolean getShowsRootHandles()
Returns true if handles for the root nodes are displayed.
Returns:
true if root handles are displayed
See Also:
showsRootHandles

setRowHeight

public void setRowHeight(int rowHeight)
Sets the height of each cell, in pixels. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height.
Parameters:
rowHeight - the height of each cell, in pixels

getRowHeight

public int getRowHeight()
Returns the height of each row. If the returned value is less than or equal to 0 the height for each row is determined by the renderer.
Parameters:
the - height of each cell, in pixels; zero or negative if the height of each row is determined by the tree cell renderer

isFixedRowHeight

public boolean isFixedRowHeight()
Returns true if the height of each display row is a fixed size.
Returns:
true if the height of each row is a fixed size

setLargeModel

public void setLargeModel(boolean newValue)
Specifies whether the UI should use a large model. (Not all UIs will implement this.) Fires a property change for the LARGE_MODEL_PROPERTY.
Parameters:
newValue - true to suggest a large model to the UI
See Also:
largeModel

isLargeModel

public boolean isLargeModel()
Returns true if the tree is configured for a large model.
Returns:
true if a large model is suggested
See Also:
largeModel

setInvokesStopCellEditing

public void setInvokesStopCellEditing(boolean newValue)
Determines what happens when editing is interrupted by selecting another node in the tree, a change in the tree's data, or by some other means. Setting this property to true causes the changes to be automatically saved when editing is interrupted.

Fires a property change for the INVOKES_STOP_CELL_EDITING_PROPERTY.

Parameters:
newValue - true means that stopCellEditing is invoked when editing is interruped, and data is saved; false means that cancelCellEditing is invoked, and changes are lost

getInvokesStopCellEditing

public boolean getInvokesStopCellEditing()
Returns the indicator that tells what happens when editing is interrupted.
Returns:
the indicator that tells what happens when editing is interrupted
See Also:
setInvokesStopCellEditing(boolean)

setScrollsOnExpand

public void setScrollsOnExpand(boolean newValue)
Determines whether or not when a node is expanded, as many of the descendants are scrolled to be inside the viewport as possible. The default is true.

getScrollsOnExpand

public boolean getScrollsOnExpand()
Returns true if the tree scrolls to show previously hidden children.
Returns:
true if when a node is expanded as many of the descendants as possible are scrolled to be visible

setToggleClickCount

public void setToggleClickCount(int clickCount)
Sets the number of mouse clicks before a node will expand or close. The default is two.
Since:
1.3

getToggleClickCount

public int getToggleClickCount()
Returns the number of mouse clicks needed to expand or close a node.
Returns:
number of mouse clicks before node is expanded
Since:
1.3

setExpandsSelectedPaths

public void setExpandsSelectedPaths(boolean newValue)
Configures the expandsSelectedPaths property. If true, any time the selection is changed, either via the TreeSelectionModel, or the cover methods provided by JTree, the TreePaths parents will be expanded to make them visible (visible meaning the parent path is expanded, not necessarily in the visible rectangle of the JTree). If false, when the selection changes the nodes parent is not made visible (all its parents expanded). This is useful if you wish to have your selection model maintain paths that are not always visible (all parents expanded).
Parameters:
newValue - the new value for expandsSelectedPaths
Since:
1.3

getExpandsSelectedPaths

public boolean getExpandsSelectedPaths()
Returns the expandsSelectedPaths property.
Returns:
true if selection changes result in the parent path being expanded
Since:
1.3
See Also:
setExpandsSelectedPaths(boolean)

isPathEditable

public boolean isPathEditable(TreePath path)
Returns isEditable. This is invoked from the UI before editing begins to insure that the given path can be edited. This is provided as an entry point for subclassers to add filtered editing without having to resort to creating a new editor.
Returns:
true if every parent node and the node itself is editabled
See Also:
isEditable()

getToolTipText

public String getToolTipText(MouseEvent event)
Overrides JComponent's getToolTipText method in order to allow renderer's tips to be used if it has text set.

NOTE: For JTree to properly display tooltips of its renderers, JTree must be a registered component with the ToolTipManager. This can be done by invoking ToolTipManager.sharedInstance().registerComponent(tree). This is not done automatically!

Overrides:
getToolTipText in class JComponent
Parameters:
event - the MouseEvent that initiated the ToolTip display
Returns:
a string containing the tooltip or null if event is null

convertValueToText

public String convertValueToText(Object value,
                                 boolean selected,
                                 boolean expanded,
                                 boolean leaf,
                                 int row,
                                 boolean hasFocus)
Called by the renderers to convert the specified value to text. This implementation returns value.toString, ignoring all other arguments. To control the conversion, subclass this method and use any of the arguments you need.
Parameters:
value - the Object to convert to text
selected - true if the node is selected
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - an integer specifying the node's display row, where 0 is the first row in the display
hasFocus - true if the node has the focus
Returns:
the String representation of the node's value

getRowCount

public int getRowCount()
Returns the number of rows that are currently being displayed.
Returns:
the number of rows that are being displayed

setSelectionPath

public void setSelectionPath(TreePath path)
Selects the node identified by the specified path. If any component of the path is hidden (under a collapsed node), and getExpandsSelectedPaths is true it is exposed (made viewable).
Parameters:
path - the TreePath specifying the node to select

setSelectionPaths

public void setSelectionPaths(TreePath[] paths)
Selects the nodes identified by the specified array of paths. If any component in any of the paths is hidden (under a collapsed node), and getExpandsSelectedPaths is true it is exposed (made viewable).
Parameters:
paths - an array of TreePath objects that specifies the nodes to select

setLeadSelectionPath

public void setLeadSelectionPath(TreePath newPath)
Sets the path identifies as the lead. The lead may not be selected. The lead is not maintained by JTree, rather the UI will update it.
Parameters:
newPath - the new lead path
Since:
1.3

setAnchorSelectionPath

public void setAnchorSelectionPath(TreePath newPath)
Sets the path identified as the anchor. The anchor is not maintained by JTree, rather the UI will update it.
Parameters:
newPath - the new anchor path
Since:
1.3

setSelectionRow

public void setSelectionRow(int row)
Selects the node at the specified row in the display.
Parameters:
row - the row to select, where 0 is the first row in the display

setSelectionRows

public void setSelectionRows(int[] rows)
Selects the nodes corresponding to each of the specified rows in the display. If a particular element of rows is <0 or="or">= getRowCount, it will be ignored. If none of the elements in rows are valid rows, the selection will be cleared. That is it will be as if clearSelection was invoked.
Parameters:
rows - an array of ints specifying the rows to select, where 0 indicates the first row in the display

addSelectionPath

public void addSelectionPath(TreePath path)
Adds the node identified by the specified TreePath to the current selection. If any component of the path isn't viewable, and getExpandsSelectedPathsis true it is made viewable.
Parameters:
path - the TreePath to add

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
Adds each path in the array of paths to the current selection. If any component of any of the paths isn't viewable and getExpandsSelectedPaths is true, it is made viewable.
Parameters:
paths - an array of TreePath objects that specifies the nodes to add

addSelectionRow

public void addSelectionRow(int row)
Adds the path at the specified row to the current selection.
Parameters:
row - an integer specifying the row of the node to add, where 0 is the first row in the display

addSelectionRows

public void addSelectionRows(int[] rows)
Adds the paths at each of the specified rows to the current selection.
Parameters:
rows - an array of ints specifying the rows to add, where 0 indicates the first row in the display

getLastSelectedPathComponent

public Object getLastSelectedPathComponent()
Returns the last path component in the first node of the current selection.
Returns:
the last Object in the first selected node's TreePath, or null if nothing is selected
See Also:
TreePath.getLastPathComponent()

getLeadSelectionPath

public TreePath getLeadSelectionPath()
Returns the path identified as the lead.
Returns:
path identified as the lead

getAnchorSelectionPath

public TreePath getAnchorSelectionPath()
Returns the path identified as the anchor.
Returns:
path identified as the anchor
Since:
1.3

getSelectionPath

public TreePath getSelectionPath()
Returns the path to the first selected node.
Returns:
the TreePath for the first selected node, or null if nothing is currently selected

getSelectionPaths

public TreePath[] getSelectionPaths()
Returns the paths of all selected values.
Returns:
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected

getSelectionRows

public int[] getSelectionRows()
Returns all of the currently selected rows. This method is simply forwarded to the TreeSelectionModel. If nothing is selected null or an empty array will be returned, based on the TreeSelectionModel implementation.
Returns:
an array of integers that identifies all currently selected rows where 0 is the first row in the display

getSelectionCount

public int getSelectionCount()
Returns the number of nodes selected.
Returns:
the number of nodes selected

getMinSelectionRow

public int getMinSelectionRow()
Gets the first selected row.
Returns:
an integer designating the first selected row, where 0 is the first row in the display

getMaxSelectionRow

public int getMaxSelectionRow()
Returns the last selected row.
Returns:
an integer designating the last selected row, where 0 is the first row in the display

getLeadSelectionRow

public int getLeadSelectionRow()
Returns the row index corresponding to the lead path.
Returns:
an integer giving the row index of the lead path, where 0 is the first row in the display; or -1 if leadPath is null

isPathSelected

public boolean isPathSelected(TreePath path)
Returns true if the item identified by the path is currently selected.
Parameters:
path - a TreePath identifying a node
Returns:
true if the node is selected

isRowSelected

public boolean isRowSelected(int row)
Returns true if the node identitifed by row is selected.
Parameters:
row - an integer specifying a display row, where 0 is the first row in the display
Returns:
true if the node is selected

getExpandedDescendants

public Enumeration getExpandedDescendants(TreePath parent)
Returns an Enumeration of the descendants of the path parent that are currently expanded. If parent is not currently expanded, this will return null. If you expand/collapse nodes while iterating over the returned Enumeration this may not return all the expanded paths, or may return paths that are no longer expanded.
Parameters:
parent - the path which is to be examined
Returns:
an Enumeration of the descendents of parent, or null if parent is not currently expanded

hasBeenExpanded

public boolean hasBeenExpanded(TreePath path)
Returns true if the node identified by the path has ever been expanded.
Returns:
true if the path has ever been expanded

isExpanded

public boolean isExpanded(TreePath path)
Returns true if the node identified by the path is currently expanded,
Parameters:
path - the TreePath specifying the node to check
Returns:
false if any of the nodes in the node's path are collapsed, true if all nodes in the path are expanded

isExpanded

public boolean isExpanded(int row)
Returns true if the node at the specified display row is currently expanded.
Parameters:
row - the row to check, where 0 is the first row in the display
Returns:
true if the node is currently expanded, otherwise false

isCollapsed

public boolean isCollapsed(TreePath path)
Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
Parameters:
path - the TreePath to check
Returns:
true if any of the nodes in the node's path are collapsed, false if all nodes in the path are expanded

isCollapsed

public boolean isCollapsed(int row)
Returns true if the node at the specified display row is collapsed.
Parameters:
row - the row to check, where 0 is the first row in the display
Returns:
true if the node is currently collapsed, otherwise false

makeVisible

public void makeVisible(TreePath path)
Ensures that the node identified by path is currently viewable.
Parameters:
path - the TreePath to make visible

isVisible

public boolean isVisible(TreePath path)
Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false.
Returns:
true if the node is viewable, otherwise false

getPathBounds

public Rectangle getPathBounds(TreePath path)
Returns the Rectangle that the specified node will be drawn into. Returns null if any component in the path is hidden (under a collapsed parent).

Note:
This method returns a valid rectangle, even if the specified node is not currently displayed.

Parameters:
path - the TreePath identifying the node
Returns:
the Rectangle the node is drawn in, or null

getRowBounds

public Rectangle getRowBounds(int row)
Returns the Rectangle that the node at the specified row is drawn in.
Parameters:
row - the row to be drawn, where 0 is the first row in the display
Returns:
the Rectangle the node is drawn in

scrollPathToVisible

public void scrollPathToVisible(TreePath path)
Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed. Only works when this JTree is contained in a JScrollPane.
Parameters:
path - the TreePath identifying the node to bring into view

scrollRowToVisible

public void scrollRowToVisible(int row)
Scrolls the item identified by row until it is displayed. The minimum of amount of scrolling necessary to bring the row into view is performed. Only works when this JTree is contained in a JScrollPane.
Parameters:
row - an integer specifying the row to scroll, where 0 is the first row in the display

getPathForRow

public TreePath getPathForRow(int row)
Returns the path for the specified row. If row is not visible, null is returned.
Parameters:
row - an integer specifying a row
Returns:
the TreePath to the specified node, null if row <0< /code="/code"> or row > getRowCount()

getRowForPath

public int getRowForPath(TreePath path)
Returns the row that displays the node identified by the specified path.
Parameters:
path - the TreePath identifying a node
Returns:
an integer specifying the display row, where 0 is the first row in the display, or -1 if any of the elements in path are hidden under a collapsed parent.

expandPath

public void expandPath(TreePath path)
Ensures that the node identified by the specified path is expanded and viewable.
Parameters:
path - the TreePath identifying a node

expandRow

public void expandRow(int row)
Ensures that the node in the specified row is expanded and viewable.

If row is <0 or="or">= getRowCount this will have no effect.

Parameters:
row - an integer specifying a display row, where 0 is the first row in the display

collapsePath

public void collapsePath(TreePath path)
Ensures that the node identified by the specified path is collapsed and viewable.
Parameters:
path - the TreePath identifying a node

collapseRow

public void collapseRow(int row)
Ensures that the node in the specified row is collapsed.

If row is <0 or="or">= getRowCount this will have no effect.

Parameters:
row - an integer specifying a display row, where 0 is the first row in the display

getPathForLocation

public TreePath getPathForLocation(int x,
                                   int y)
Returns the path for the node at the specified location.
Parameters:
x - an integer giving the number of pixels horizontally from the left edge of the display area, minus any left margin
y - an integer giving the number of pixels vertically from the top of the display area, minus any top margin
Returns:
the TreePath for the node at that location

getRowForLocation

public int getRowForLocation(int x,
                             int y)
Returns the row for the specified location.
Parameters:
x - an integer giving the number of pixels horizontally from the left edge of the display area, minus any left margin
y - an integer giving the number of pixels vertically from the top of the display area, minus any top margin
Returns:
the row corresponding to the location, or -1 if the location is not within the bounds of a displayed cell
See Also:
getClosestRowForLocation(int, int)

getClosestPathForLocation

public TreePath getClosestPathForLocation(int x,
                                          int y)
Returns the path to the node that is closest to x,y. If no nodes are currently viewable, or there is no model, returns null, otherwise it always returns a valid path. To test if the node is exactly at x, y, get the node's bounds and test x, y against that.
Parameters:
x - an integer giving the number of pixels horizontally from the left edge of the display area, minus any left margin
y - an integer giving the number of pixels vertically from the top of the display area, minus any top margin
Returns:
the TreePath for the node closest to that location, null if nothing is viewable or there is no model
See Also:
getPathForLocation(int, int), getPathBounds(javax.swing.tree.TreePath)

getClosestRowForLocation

public int getClosestRowForLocation(int x,
                                    int y)
Returns the row to the node that is closest to x,y. If no nodes are viewable or there is no model, returns -1. Otherwise, it always returns a valid row. To test if the returned object is exactly at x, y, get the bounds for the node at the returned row and test x, y against that.
Parameters:
x - an integer giving the number of pixels horizontally from the left edge of the display area, minus any left margin
y - an integer giving the number of pixels vertically from the top of the display area, minus any top margin
Returns:
the row closest to the location, -1 if nothing is viewable or there is no model
See Also:
getRowForLocation(int, int), getRowBounds(int)

isEditing

public boolean isEditing()
Returns true if the tree is being edited. The item that is being edited can be obtained using getSelectionPath.
Returns:
true if the user is currently editing a node
See Also:
getSelectionPath()

stopEditing

public boolean stopEditing()
Ends the current editing session. (The DefaultTreeCellEditor object saves any edits that are currently in progress on a cell. Other implementations may operate differently.) Has no effect if the tree isn't being edited.
Note:
To make edit-saves automatic whenever the user changes their position in the tree, use setInvokesStopCellEditing(boolean).
Returns:
true if editing was in progress and is now stopped, false if editing was not in progress

cancelEditing

public void cancelEditing()
Cancels the current editing session. Has no effect if the tree isn't being edited.

startEditingAtPath

public void startEditingAtPath(TreePath path)
Selects the node identified by the specified path and initiates editing. The edit-attempt fails if the CellEditor does not allow editing for the specified item.
Parameters:
path - the TreePath identifying a node

getEditingPath

public TreePath getEditingPath()
Returns the path to the element that is currently being edited.
Returns:
the TreePath for the node being edited

setSelectionModel

public void setSelectionModel(TreeSelectionModel selectionModel)
Sets the tree's selection model. When a null value is specified an emtpy selectionModel is used, which does not allow selections.
Parameters:
selectionModel - the TreeSelectionModel to use, or null to disable selections
See Also:
TreeSelectionModel

getSelectionModel

public TreeSelectionModel getSelectionModel()
Returns the model for selections. This should always return a non-null value. If you don't want to allow anything to be selected set the selection model to null, which forces an empty selection model to be used.
Parameters:
the - TreeSelectionModel in use
See Also:
setSelectionModel(javax.swing.tree.TreeSelectionModel)

getPathBetweenRows

protected TreePath[] getPathBetweenRows(int index0,
                                        int index1)
Returns JTreePath instances representing the path between index0 and index1 (including index1). Returns null if there is no tree.
Parameters:
index0 - an integer specifying a display row, where 0 is the first row in the display
index1 - an integer specifying a second display row
Returns:
an array of TreePath objects, one for each node between index0 and index1, inclusive; or null if there is no tree

setSelectionInterval

public void setSelectionInterval(int index0,
                                 int index1)
Selects the nodes between index0 and index1, inclusive.
Parameters:
index0 - an integer specifying a display row, where 0 is the first row in the display
index1 - an integer specifying a second display row

addSelectionInterval

public void addSelectionInterval(int index0,
                                 int index1)
Adds the paths between index0 and index1, inclusive, to the selection.
Parameters:
index0 - an integer specifying a display row, where 0 is the first row in the display
index1 - an integer specifying a second display row

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Removes the nodes between index0 and index1, inclusive, from the selection.
Parameters:
index0 - an integer specifying a display row, where 0 is the first row in the display
index1 - an integer specifying a second display row

removeSelectionPath

public void removeSelectionPath(TreePath path)
Removes the node identified by the specified path from the current selection.
Parameters:
path - the TreePath identifying a node

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
Removes the nodes identified by the specified paths from the current selection.
Parameters:
paths - an array of TreePath objects that specifies the nodes to remove

removeSelectionRow

public void removeSelectionRow(int row)
Removes the path at the index row from the current selection.
Parameters:
path - the TreePath identifying the node to remove

removeSelectionRows

public void removeSelectionRows(int[] rows)
Removes the paths that are selected at each of the specified rows.
Parameters:
row - an array of ints specifying display rows, where 0 is the first row in the display

clearSelection

public void clearSelection()
Clears the selection.

isSelectionEmpty

public boolean isSelectionEmpty()
Returns true if the selection is currently empty.
Returns:
true if the selection is currently empty

addTreeExpansionListener

public void addTreeExpansionListener(TreeExpansionListener tel)
Adds a listener for TreeExpansion events.
Parameters:
tel - a TreeExpansionListener that will be notified when a tree node is expanded or collapsed (a "negative expansion")

removeTreeExpansionListener

public void removeTreeExpansionListener(TreeExpansionListener tel)
Removes a listener for TreeExpansion events.
Parameters:
tel - the TreeExpansionListener to remove

addTreeWillExpandListener

public void addTreeWillExpandListener(TreeWillExpandListener tel)
Adds a listener for TreeWillExpand events.
Parameters:
tel - a TreeWillExpandListener that will be notified when a tree node will be expanded or collapsed (a "negative expansion")

removeTreeWillExpandListener

public void removeTreeWillExpandListener(TreeWillExpandListener tel)
Removes a listener for TreeWillExpand events.
Parameters:
tel - the TreeWillExpandListener to remove

fireTreeExpanded

public void fireTreeExpanded(TreePath path)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
path - the TreePath indicating the node that was expanded
See Also:
EventListenerList

fireTreeCollapsed

public void fireTreeCollapsed(TreePath path)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
path - the TreePath indicating the node that was collapsed
See Also:
EventListenerList

fireTreeWillExpand

public void fireTreeWillExpand(TreePath path)
                        throws ExpandVetoException
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
path - the TreePath indicating the node that was expanded
See Also:
EventListenerList

fireTreeWillCollapse

public void fireTreeWillCollapse(TreePath path)
                          throws ExpandVetoException
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
path - the TreePath indicating the node that was expanded
See Also:
EventListenerList

addTreeSelectionListener

public void addTreeSelectionListener(TreeSelectionListener tsl)
Adds a listener for TreeSelection events.
Parameters:
tsl - the TreeSelectionListener that will be notified when a node is selected or deselected (a "negative selection")

removeTreeSelectionListener

public void removeTreeSelectionListener(TreeSelectionListener tsl)
Removes a TreeSelection listener.
Parameters:
tsl - the TreeSelectionListener to remove

fireValueChanged

protected void fireValueChanged(TreeSelectionEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the TreeSelectionEvent generated by the TreeSelectionModel when a node is selected or deselected
See Also:
EventListenerList

treeDidChange

public void treeDidChange()
Sent when the tree has changed enough that we need to resize the bounds, but not enough that we need to remove the expanded node set (e.g nodes were expanded or collapsed, or nodes were inserted into the tree). You should never have to invoke this, the UI will invoke this as it needs to.

setVisibleRowCount

public void setVisibleRowCount(int newCount)
Sets the number of rows that are to be displayed. This will only work if the reciever is contained in a JScrollPane, and will adjust the preferred size and size of that scrollpane.
Parameters:
newCount - the number of rows to display

getVisibleRowCount

public int getVisibleRowCount()
Returns the number of rows that are displayed in the display area.
Returns:
the number of rows displayed

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Returns the preferred display size of a JTree. The height is determined from getVisibleRowCount and the width is the current preferred width.
Specified by:
getPreferredScrollableViewportSize in interface Scrollable
Returns:
a Dimension object containing the preferred size

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Returns the amount to increment when scrolling. The amount is the height of the first displayed row that isn't completely in view or, if it is totally displayed, the height of the next row in the scrolling direction.
Specified by:
getScrollableUnitIncrement in interface Scrollable
Parameters:
visibleRect - the view area visible within the viewport
orientation - either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
direction - less than zero to scroll up/left, greater than zero for down/right
Returns:
the "unit" increment for scrolling in the specified direction
See Also:
JScrollBar.setUnitIncrement(int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Returns the amount for a block increment, which is the height or width of visibleRect, based on orientation.
Specified by:
getScrollableBlockIncrement in interface Scrollable
Parameters:
visibleRect - the view area visible within the viewport
orientation - either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
direction - less than zero to scroll up/left, greater than zero for down/right.
Returns:
the "block" increment for scrolling in the specified direction
See Also:
JScrollBar.setBlockIncrement(int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Returns false to indicate that the width of the viewport does not determine the width of the table, unless the preferred width of the tree is smaller than the viewports width. In other words: ensure that the tree is never smaller than its viewport.
Specified by:
getScrollableTracksViewportWidth in interface Scrollable
Returns:
false
See Also:
Scrollable.getScrollableTracksViewportWidth()

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Returns false to indicate that the height of the viewport does not determine the height of the table, unless the preferred height of the tree is smaller than the viewports height. In other words: ensure that the tree is never smaller than its viewport.
Specified by:
getScrollableTracksViewportHeight in interface Scrollable
Returns:
false
See Also:
Scrollable.getScrollableTracksViewportHeight()

setExpandedState

protected void setExpandedState(TreePath path,
                                boolean state)
Sets the expanded state of this JTree. If state is true, all parents of path and path are marked as expanded. If state is false, all parents of path are marked EXPANDED, but path itself is marked collapsed.

This will fail if a TreeWillExpandListener vetos it.

getDescendantToggledPaths

protected Enumeration getDescendantToggledPaths(TreePath parent)
Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.

removeDescendantToggledPaths

protected void removeDescendantToggledPaths(Enumeration toRemove)
Removes any descendants of the TreePaths in toRemove that have been expanded.

clearToggledPaths

protected void clearToggledPaths()
Clears the cache of toggled tree paths. This does NOT send out any TreeExpansionListener events.

createTreeModelListener

protected TreeModelListener createTreeModelListener()
Creates and returns an instance of TreeModelHandler. The returned object is responsible for updating the expanded state when the TreeModel changes.

For more information on what expanded state means, see the JTree description above.

removeDescendantSelectedPaths

protected boolean removeDescendantSelectedPaths(TreePath path,
                                                boolean includePath)
Removes any paths in the selection that are descendants of path. If includePath is true and path is selected, it will be removed from the selection.
Returns:
true if a descendant was selected
Since:
1.3

paramString

protected String paramString()
Returns a string representation of this JTree. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JTree.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTree. For JTrees, the AccessibleContext takes the form of an AccessibleJTree. A new AccessibleJTree instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJTree that serves as the AccessibleContext of this JTree
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
JavaTM 2 Platform
Std. Ed. v1.3.1
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


JViewport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JViewport

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JViewport
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
public class JViewport
extends JComponent
implements Accessible

The "viewport" or "porthole" through which you see the underlying information. When you scroll, what moves is the viewport. It is like peering through a camera's viewfinder. Moving the viewfinder upwards brings new things into view at the top of the picture and loses things that were at the bottom.

By default, JViewport is opaque. To change this, use the setOpaque method.

NOTE:We have implemented a faster scrolling algorithm that does not require a buffer to draw in. The algorithm works as follows:

  1. The view and parent view and checked to see if they are JComponents, if they aren't, stop and repaint the whole viewport.
  2. If the viewport is obscured by an ancestor, stop and repaint the whole viewport.
  3. Compute the region that will become visible, if it is as big as the viewport, stop and repaint the whole view region.
  4. Obtain the ancestor Windows graphics and do a copyArea on the scrolled region.
  5. Message the view to repaint the newly visible region.
  6. The next time paint is invoked on the viewport, if the clip region is smaller than the viewport size a timer is kicked off to repaint the whole region.
In general this approach is much faster. Compared to the backing store approach this avoids the overhead of maintaining an offscreen buffer and having to do two copyAreas. Compared to the non backing store case this approach will greatly reduce the painted region.

This approach can cause slower times than the backing store approach when the viewport is obscured by another window, or partially offscreen. When another window obscures the viewport the copyArea will copy garbage and a paint event will be generated by the system to inform us we need to paint the newly exposed region. The only way to handle this is to repaint the whole viewport, which can cause slower performance than the backing store case. In most applications very rarely will the user be scrolling while the viewport is obscured by another window or offscreen, so this optimization is usually worth the performance hit when obscured. Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JScrollPane, Serialized Form

Inner Class Summary
protected class | JViewport.AccessibleJViewport This class implements accessibility support for the JViewport class.
protected class | JViewport.ViewListener A listener for the view.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected boolean | backingStore Deprecated. As of Java 2 platform v1.3
static int | BACKINGSTORE_SCROLL_MODE Draws viewport contents into an offscreen image.
protected Image | backingStoreImage The view image used for a backing store.
static int | BLIT_SCROLL_MODE Use graphics.copyArea() to implement scrolling.
protected boolean | isViewSizeSet True when the viewport dimensions have been determined.
protected Point | lastPaintPosition The last viewPosition that we've painted, so we know how much of the backing store image is valid.
protected boolean | scrollUnderway The scrollUnderway flag is used for components like JList.
static int | SIMPLE_SCROLL_MODE This mode uses the very simple method of redrawing the entire contents of the scrollpane each time it is scrolled.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JViewport()
Creates a JViewport.
Method Summary
 void addChangeListener(ChangeListener l)
Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.
protected  void addImpl(Component child, Object constraints, int index)
Sets the JViewports one lightweight child, which can be null.
protected  boolean computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint)
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
protected  LayoutManager createLayoutManager()
Subclassers can override this to install a different layout manager (or null) in the constructor.
protected  JViewport.ViewListener createViewListener()
Creates a listener for the view.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
Notifies listeners of a property change.
protected  void fireStateChanged()
Notifies all ChangeListeners when the views size, position, or the viewports extent size has changed.
 AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JViewport.
 Dimension getExtentSize()
Returns the size of the visible part of the view in view coordinates.
 Insets getInsets()
Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.
 Insets getInsets(Insets insets)
Returns an Insets object containing this JViewports inset values.
 int getScrollMode()
Returns the current scrolling mode.
 ViewportUI getUI()
Returns the L&F object that renders this component.
 String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
 Component getView()
Returns the JViewports one child or null.
 Point getViewPosition()
Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.
 Rectangle getViewRect()
Returns a rectangle whose origin is getViewPosition and size is getExtentSize.
 Dimension getViewSize()
If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size.
 boolean isBackingStoreEnabled()
Deprecated. As of Java 2 platform v1.3, replaced by getScrollMode().
 boolean isOptimizedDrawingEnabled()
The JViewport overrides the default implementation of this method (in JComponent) to return false.
 void paint(Graphics g)
Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
protected  String paramString()
Returns a string representation of this JViewport.
 void remove(Component child)
Removes the Viewports one lightweight child.
 void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.
 void repaint(long tm, int x, int y, int w, int h)
Always repaint in the parents coordinate system to make sure only one paint is performed by the RepaintManager.
 void reshape(int x, int y, int w, int h)
Sets the bounds of this viewport.
 void scrollRectToVisible(Rectangle contentRect)
Overridden to scroll the view so that Rectangle within the view becomes visible.
 void setBackingStoreEnabled(boolean enabled)
Deprecated. As of Java 2 platform v1.3, replaced by setScrollMode().
 void setBorder(Border border)
The viewport "scrolls" it's child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).
 void setExtentSize(Dimension newExtent)
Sets the size of the visible part of the view using view coordinates.
 void setScrollMode(int mode)
Used to control the method of scrolling the viewport contents.
 void setUI(ViewportUI ui)
Sets the L&F object that renders this component.
 void setView(Component view)
Sets the JViewports one lightweight child (view), which can be null.
 void setViewPosition(Point p)
Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.
 void setViewSize(Dimension newSize)
Sets the view coordinates that appear in the upper left hand corner of the viewport, and the size of the view.
 Dimension toViewCoordinates(Dimension size)
Converts a size in pixel coordinates to view coordinates.
 Point toViewCoordinates(Point p)
Converts a point in pixel coordinates to view coordinates.
 void updateUI()
Notification from the UIFactory that the L&F has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

isViewSizeSet

protected boolean isViewSizeSet
True when the viewport dimensions have been determined. The default is false.

lastPaintPosition

protected Point lastPaintPosition
The last viewPosition that we've painted, so we know how much of the backing store image is valid.

backingStore

protected boolean backingStore
Deprecated. As of Java 2 platform v1.3

True when this viewport is maintaining an offscreen image of its contents, so that some scrolling can take place using fast "bit-blit" operations instead of by accessing the view object to construct the display. The default is false.
See Also:
setScrollMode(int)

backingStoreImage

protected transient Image backingStoreImage
The view image used for a backing store.

scrollUnderway

protected boolean scrollUnderway
The scrollUnderway flag is used for components like JList. When the downarrow key is pressed on a JList and the selected cell is the last in the list, the scrollpane autoscrolls. Here, the old selected cell needs repainting and so we need a flag to make the viewport do the optimized painting only when there is an explicit call to setViewPosition(Point). When setBounds is called through other routes, the flag is off and the view repaints normally. Another approach would be to remove this from the JViewport class and have the JList manage this case by using setBackingStoreEnabled. The default is false.

BLIT_SCROLL_MODE

public static final int BLIT_SCROLL_MODE
Use graphics.copyArea() to implement scrolling. This is the fastest for most applications.
See Also:
setScrollMode(int)
Since:
1.3

BACKINGSTORE_SCROLL_MODE

public static final int BACKINGSTORE_SCROLL_MODE
Draws viewport contents into an offscreen image. This was previously the default mode for JTable. This mode may offer advantages over "blit mode" in some cases, but it requires a large chunk of extra RAM.
See Also:
setScrollMode(int)
Since:
1.3

SIMPLE_SCROLL_MODE

public static final int SIMPLE_SCROLL_MODE
This mode uses the very simple method of redrawing the entire contents of the scrollpane each time it is scrolled. This was the default behavior in Swing 1.0 and Swing 1.1. Either of the other two options will provide better performance in most cases.
See Also:
setScrollMode(int)
Since:
1.3
Constructor Detail

JViewport

public JViewport()
Creates a JViewport.
Method Detail

getUI

public ViewportUI getUI()
Returns the L&F object that renders this component.
Returns:
ViewportUI object

setUI

public void setUI(ViewportUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the ViewportUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "ViewportUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

addImpl

protected void addImpl(Component child,
                       Object constraints,
                       int index)
Sets the JViewports one lightweight child, which can be null. (Since there is only one child which occupies the entire viewport, the constraints and index arguments are ignored.)
Overrides:
addImpl in class Container
Parameters:
child - the lightweight child of the viewport
constraints - the constraints to be respected
index - the index
See Also:
setView(java.awt.Component)

remove

public void remove(Component child)
Removes the Viewports one lightweight child.
Overrides:
remove in class Container
See Also:
setView(java.awt.Component)

scrollRectToVisible

public void scrollRectToVisible(Rectangle contentRect)
Overridden to scroll the view so that Rectangle within the view becomes visible.
Overrides:
scrollRectToVisible in class JComponent
Parameters:
contentRect - the Rectangle to display

setBorder

public final void setBorder(Border border)
The viewport "scrolls" it's child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll). A non-null border, or non-zero insets, isn't supported, to prevent the geometry of this component from becoming complex enough to inhibit subclassing. To create a JViewport with a border, add it to a JPanel that has a border.

Note: If border is non-null, this method will throw an exception as borders are not supported on a JViewPort.

Overrides:
setBorder in class JComponent
Parameters:
border - the Border to set
Throws:
IllegalArgumentException - this method is not implemented

getInsets

public final Insets getInsets()
Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.
Overrides:
getInsets in class JComponent
Returns:
a Rectange of zero dimension and zero origin
See Also:
setBorder(javax.swing.border.Border)

getInsets

public final Insets getInsets(Insets insets)
Returns an Insets object containing this JViewports inset values. The passed-in Insets object will be reinitialized, and all existing values within this object are overwritten.
Overrides:
getInsets in class JComponent
Parameters:
insets - the Insets object which can be reused
Returns:
this viewports inset values
See Also:
getInsets()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
The JViewport overrides the default implementation of this method (in JComponent) to return false. This ensures that the drawing machinery will call the Viewports paint implementation rather than messaging the JViewports children directly.
Overrides:
isOptimizedDrawingEnabled in class JComponent
Returns:
false

paint

public void paint(Graphics g)
Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
The term "blit" is the pronounced version of the PDP-10 BLT (BLock Transfer) instruction, which copied a block of bits. (In case you were curious.)
Overrides:
paint in class JComponent
Parameters:
g - the Graphics context within which to paint

reshape

public void reshape(int x,
                    int y,
                    int w,
                    int h)
Sets the bounds of this viewport. If the viewports width or height has changed, fire a StateChanged event.
Overrides:
reshape in class JComponent
Parameters:
x - left edge of the origin
y - top edge of the origin
w - width in pixels
h - height in pixels
See Also:
JComponent.reshape(int, int, int, int)

setScrollMode

public void setScrollMode(int mode)
Used to control the method of scrolling the viewport contents. You may want to change this mode to get maximum performance for your use case.
Parameters:
mode - one of the following values:
  • JViewport.BLIT_SCROLL_MODE
  • JViewport.BACKINGSTORE_SCROLL_MODE
  • JViewport.SIMPLE_SCROLL_MODE
Since:
1.3
See Also:
BLIT_SCROLL_MODE, BACKINGSTORE_SCROLL_MODE, SIMPLE_SCROLL_MODE

getScrollMode

public int getScrollMode()
Returns the current scrolling mode.
Returns:
the scrollMode property
Since:
1.3
See Also:
setScrollMode(int)

isBackingStoreEnabled

public boolean isBackingStoreEnabled()
Deprecated. As of Java 2 platform v1.3, replaced by getScrollMode().

Returns true if this viewport is maintaining an offscreen image of its contents.
Returns:
true if scrollMode is BACKINGSTORE_SCROLL_MODE

setBackingStoreEnabled

public void setBackingStoreEnabled(boolean enabled)
Deprecated. As of Java 2 platform v1.3, replaced by setScrollMode().

If true if this viewport will maintain an offscreen image of its contents. The image is used to reduce the cost of small one dimensional changes to the viewPosition. Rather than repainting the entire viewport we use Graphics.copyArea() to effect some of the scroll.
Parameters:
enabled - if true, maintain an offscreen backing store

getView

public Component getView()
Returns the JViewports one child or null.
Returns:
the viewports child, or null if none exists
See Also:
setView(java.awt.Component)

setView

public void setView(Component view)
Sets the JViewports one lightweight child (view), which can be null.
Parameters:
view - the viewports new lightweight child
See Also:
getView()

getViewSize

public Dimension getViewSize()
If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size. If there is no view, return 0,0.
Returns:
a Dimension object specifying the size of the view

setViewSize

public void setViewSize(Dimension newSize)
Sets the view coordinates that appear in the upper left hand corner of the viewport, and the size of the view.
Parameters:
newSize - a Dimension object specifying the size and location of the new view coordinates, or null if there is no view

getViewPosition

public Point getViewPosition()
Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.
Returns:
a Point object giving the upper left coordinates

setViewPosition

public void setViewPosition(Point p)
Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.
Parameters:
p - a Point object giving the upper left coordinates

getViewRect

public Rectangle getViewRect()
Returns a rectangle whose origin is getViewPosition and size is getExtentSize. This is the visible part of the view, in view coordinates.
Returns:
a Rectangle giving the visible part of the view using view coordinates.

computeBlit

protected boolean computeBlit(int dx,
                              int dy,
                              Point blitFrom,
                              Point blitTo,
                              Dimension blitSize,
                              Rectangle blitPaint)
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc. The parameters are modified to return the values required for the blit.
Parameters:
dx - the horizontal delta
dy - the vertical delta
blitFrom - the Point we're blitting from
blitTo - the Point we're blitting to
blitSize - the Dimension of the area to blit
blitPaint - the area to blit
Returns:
true if the parameters are modified and we're ready to blit; false otherwise

getExtentSize

public Dimension getExtentSize()
Returns the size of the visible part of the view in view coordinates.
Returns:
a Dimension object giving the size of the view

toViewCoordinates

public Dimension toViewCoordinates(Dimension size)
Converts a size in pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
Parameters:
size - a Dimension object using pixel coordinates
Returns:
a Dimension object converted to view coordinates

toViewCoordinates

public Point toViewCoordinates(Point p)
Converts a point in pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
Parameters:
p - a Point object using pixel coordinates
Returns:
a Point object converted to view coordinates

setExtentSize

public void setExtentSize(Dimension newExtent)
Sets the size of the visible part of the view using view coordinates.
Parameters:
newExtent - a Dimension object specifying the size of the view

createViewListener

protected JViewport.ViewListener createViewListener()
Creates a listener for the view.
Returns:
a ViewListener

createLayoutManager

protected LayoutManager createLayoutManager()
Subclassers can override this to install a different layout manager (or null) in the constructor. Returns a new ViewportLayout object.
Returns:
a LayoutManager

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.
Parameters:
l - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener),
setViewPosition(java.awt.Point),
setViewSize(java.awt.Dimension),
setExtentSize(java.awt.Dimension)

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.
Parameters:
l - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Notifies all ChangeListeners when the views size, position, or the viewports extent size has changed.
See Also:
addChangeListener(javax.swing.event.ChangeListener), removeChangeListener(javax.swing.event.ChangeListener), EventListenerList

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int w,
                    int h)
Always repaint in the parents coordinate system to make sure only one paint is performed by the RepaintManager.
Overrides:
repaint in class JComponent
Parameters:
tm - maximum time in milliseconds before update
x - the x coordinate (pixels over from left)
y - the y coordinate (pixels down from top)
width - the width
height - the height
See Also:
Component.update(java.awt.Graphics)

paramString

protected String paramString()
Returns a string representation of this JViewport. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class JComponent
Returns:
a string representation of this JViewport

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Notifies listeners of a property change. This is subclassed to update the windowBlit property. (The putClientProperty property is final).
Overrides:
firePropertyChange in class JComponent
Parameters:
propertyName - a string containing the property name
oldValue - the old value of the property
newValue - the new value of the property

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JViewport. For viewports, the AccessibleContext takes the form of an AccessibleJViewport. A new AccessibleJViewport instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJViewport that serves as the AccessibleContext of this JViewport
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JWindow

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--javax.swing.JWindow
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable
public class JWindow
extends Window
implements Accessible, RootPaneContainer

A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other trimmings associated with a JFrame, but it is still a "first-class citizen" of the user's desktop, and can exist anywhere on it.

The JWindow component contains a JRootPane as it's only child. The contentPane should be the parent of any children of the JWindow. From the older java.awt.Window object you would normally do something like this:

       window.add(child);
However, using JWindow you would code:
       window.getContentPane().add(child);
The same is true of setting LayoutManagers, removing components, listing children, etc. All these methods should normally be sent to the contentPane instead of the JWindow itself. The contentPane will always be non-null. Attempting to set it to null will cause the JWindow to throw an exception. The default contentPane will have a BorderLayout manager set on it.

Please see the JRootPane documentation for a complete description of the contentPane, glassPane, and layeredPane components.

In a multi-screen environment, you can create a JWindow on a different screen device. See Window for more information.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JWindow key assignments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JRootPane, Serialized Form

Inner Class Summary
protected  class JWindow.AccessibleJWindow
This class implements accessibility support for the JWindow class.
Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected AccessibleContext | accessibleContext The accessible context property.
protected JRootPane | rootPane The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
protected boolean | rootPaneCheckingEnabled If true then calls to add and setLayout will cause an exception to be thrown.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JWindow()
Creates a window with no specified owner.
JWindow(Frame owner)
Creates a window with the specified owner frame.
JWindow(GraphicsConfiguration gc)
Creates a window with the specified GraphicsConfiguration of a screen device.
JWindow(Window owner)
Creates a window with the owner and the specified GraphicsConfiguration of a screen device.
JWindow(Window owner, GraphicsConfiguration gc)
Method Summary
protected void | addImpl(Component comp, Object constraints, int index) By default, children may not be added directly to a this component, they must be added to its contentPane instead.
protected JRootPane | createRootPane() Called by the constructor methods to create the default rootPane.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JWindow.
Container | getContentPane() Returns the Container which is the contentPane for this window.
Component | getGlassPane() Returns the glassPane Component for this window.
JLayeredPane | getLayeredPane() Returns the layeredPane object for this window.
JRootPane | getRootPane() Returns the rootPane object for this window.
protected boolean | isRootPaneCheckingEnabled() Returns whether calls to add and setLayout will cause an exception to be thrown.
protected String | paramString() Returns a string representation of this JWindow.
void | remove(Component comp) Removes the specified component from this container.
void | setContentPane(Container contentPane) Sets the contentPane property for this window.
void | setGlassPane(Component glassPane) Sets the glassPane property.
void | setLayeredPane(JLayeredPane layeredPane) Sets the layeredPane property.
void | setLayout(LayoutManager manager) By default the layout of this component may not be set, the layout of its contentPane should be set instead.
protected void | setRootPane(JRootPane root) Sets the new rootPane object for this window.
protected void | setRootPaneCheckingEnabled(boolean enabled) Determines whether calls to add and setLayout will cause an exception to be thrown.
protected void | windowInit() Called by the constructors to init the JWindow properly.
Methods inherited from class java.awt.Window
addNotify, addWindowListener, applyResourceBundle, applyResourceBundle, dispose, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

rootPane

protected JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
See Also:
getRootPane(), setRootPane(javax.swing.JRootPane)

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
If true then calls to add and setLayout will cause an exception to be thrown.
See Also:
isRootPaneCheckingEnabled(), setRootPaneCheckingEnabled(boolean)

accessibleContext

protected AccessibleContext accessibleContext
The accessible context property.
Constructor Detail

JWindow

public JWindow()
Creates a window with no specified owner.

JWindow

public JWindow(GraphicsConfiguration gc)
Creates a window with the specified GraphicsConfiguration of a screen device.
Parameters:
gc - the GraphicsConfiguration that is used to construct the new window with; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException - if gc is not from a screen device.
Since:
1.3

JWindow

public JWindow(Frame owner)
Creates a window with the specified owner frame. If owner is null, the shared owner will be used.
Parameters:
owner - the frame from which the window is displayed

JWindow

public JWindow(Window owner)
Creates a window with the owner and the specified GraphicsConfiguration of a screen device.
Parameters:
owner - the window to act as owner
gc - the GraphicsConfiguration that is used to construct the new Window; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException - if gc is not from a screen device.
IllegalArgumentException - if owner is null
Since:
1.3

JWindow

public JWindow(Window owner,
               GraphicsConfiguration gc)
Method Detail

windowInit

protected void windowInit()
Called by the constructors to init the JWindow properly.

createRootPane

protected JRootPane createRootPane()
Called by the constructor methods to create the default rootPane.

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout will cause an exception to be thrown.
Returns:
true if add and setLayout are checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout will cause an exception to be thrown.
Parameters:
enabled - a boolean value, true if checking is to be enabled, which cause the exceptions to be thrown
See Also:
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
addImpl in class Container
Parameters:
comp - the component to be enhanced
constraints - the constraints to be enforced on the component
index - the index of the component
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.
Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thisComponent.getContentPane().setLayout(new BorderLayout())
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Overrides:
setLayout in class Container
Parameters:
manager - the layout manager for the window
Throws:
Error - if called with rootPaneChecking true
See Also:
setRootPaneCheckingEnabled(boolean)

getRootPane

public JRootPane getRootPane()
Returns the rootPane object for this window.
Specified by:
getRootPane in interface RootPaneContainer
Returns:
the rootPane property for this window
See Also:
setRootPane(javax.swing.JRootPane), RootPaneContainer.getRootPane()

setRootPane

protected void setRootPane(JRootPane root)
Sets the new rootPane object for this window. This method is called by the constructor.
Parameters:
root - the new rootPane property
See Also:
getRootPane()

getContentPane

public Container getContentPane()
Returns the Container which is the contentPane for this window.
Specified by:
getContentPane in interface RootPaneContainer
Returns:
the contentPane property
See Also:
setContentPane(java.awt.Container), RootPaneContainer.getContentPane()

setContentPane

public void setContentPane(Container contentPane)
Sets the contentPane property for this window. This method is called by the constructor.
Specified by:
setContentPane in interface RootPaneContainer
Parameters:
contentPane - the new contentPane
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
getContentPane(), RootPaneContainer.setContentPane(java.awt.Container)

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane object for this window.
Specified by:
getLayeredPane in interface RootPaneContainer
Returns:
the layeredPane property
See Also:
setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
Sets the layeredPane property. This method is called by the constructor.
Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layeredPane - the new layeredPane object
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
getLayeredPane(), RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)

getGlassPane

public Component getGlassPane()
Returns the glassPane Component for this window.
Specified by:
getGlassPane in interface RootPaneContainer
Returns:
the glassPane property
See Also:
setGlassPane(java.awt.Component), RootPaneContainer.getGlassPane()

setGlassPane

public void setGlassPane(Component glassPane)
Sets the glassPane property. This method is called by the constructor.
Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - the glassPane object for this window
See Also:
getGlassPane(), RootPaneContainer.setGlassPane(java.awt.Component)

paramString

protected String paramString()
Returns a string representation of this JWindow. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class Container
Returns:
a string representation of this JWindow

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JWindow. For JWindows, the AccessibleContext takes the form of an AccessibleJWindow. A new AccessibleJWindow instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Window
Returns:
an AccessibleJWindow that serves as the AccessibleContext of this JWindow
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeySelectionManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface JComboBox.KeySelectionManager

Enclosing class:
JComboBox
public static interface JComboBox.KeySelectionManager

The interface that defines a KeySelectionManager. To qualify as a KeySelectionManager, the class needs to implement the method that identifies the list index given a character and the combo box data model.

Method Summary
 int selectionForKey(char aKey, ComboBoxModel aModel)
Given aKey and the model, returns the row that should become selected.

Method Detail

selectionForKey

public int selectionForKey(char aKey,
                           ComboBoxModel aModel)
Given aKey and the model, returns the row that should become selected. Return -1 if no match was found.
Parameters:
aKey - a char value, usually indicating a keyboard key that was pressed
aModel - a ComboBoxModel -- the component's data model, containing the list of selectable items
Returns:
an int equal to the selected row, where 0 is the first item and -1 is none.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyStroke

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class KeyStroke

java.lang.Object
  |
  +--javax.swing.KeyStroke
All Implemented Interfaces:
Serializable
public class KeyStroke
extends Object
implements Serializable

A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).

KeyStroke objects are used to define high-level (semantic) action events. Instead of trapping every keystroke and throwing away the ones you are not interested in, those keystrokes you care about automatically initiate actions on the components they are registered with.

KeyStroke objects handle both character-code generating keystrokes you would trap with a KeyTyped event handler and key-code generating keystrokes (like Enter or F1) that you would trap with a KeyPressed event handler.

KeyStroke objects are immutable and unique.

All KeyStroke objects are cached. To get one, use getKeyStroke.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Keymap, getKeyStroke(char), Serialized Form

Method Summary
boolean | equals(Object anObject) Returns true if this object is identical to the specified object.
char | getKeyChar() Returns the character defined by this KeyStroke object.
int | getKeyCode() Returns the numeric keycode defined by this KeyStroke object.
static KeyStroke | getKeyStroke(char keyChar) Return a shared instance of a key stroke that is activated when the key is pressed (that is, a KeyStroke for the KEY_TYPED event).
static KeyStroke | getKeyStroke(Character keyChar, int modifiers) Return a shared instance of a key stroke, given a character object and a set of modifiers.
static KeyStroke | getKeyStroke(char keyChar, boolean onKeyRelease) Deprecated. use getKeyStroke(char)
static KeyStroke | getKeyStroke(int keyCode, int modifiers) Return a shared instance of a key stroke given a char code and a set of modifiers -- the key is activated when it is pressed.
static KeyStroke | getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) Return a shared instance of a key stroke given a numeric keycode and a set of modifiers, specifying whether the key is activated when it is pressed or released.
static KeyStroke | getKeyStroke(String s) Parse a string and return a KeyStroke.
static KeyStroke | getKeyStrokeForEvent(KeyEvent anEvent) Return a keystroke from an event.
int | getModifiers() Returns the modifier keys defined by this KeyStroke object.
int | hashCode() Returns a numeric value for this object that is likely to be reasonably unique, so it can be used as the index value in a Hashtable.
boolean | isOnKeyRelease() Returns true if this keystroke is active on key release.
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getKeyStroke

public static KeyStroke getKeyStroke(char keyChar)
Return a shared instance of a key stroke that is activated when the key is pressed (that is, a KeyStroke for the KEY_TYPED event).
Parameters:
keyChar - the character value for a keyboard key
Returns:
a KeyStroke object for that key

getKeyStroke

public static KeyStroke getKeyStroke(char keyChar,
                                     boolean onKeyRelease)
Deprecated. use getKeyStroke(char)

Return a shared instance of a key stroke, specifying whether the key is considered to be activated when it is pressed or when it is released.
Parameters:
keyChar - the character value for a keyboard key
onKeyRelease - a boolean value. When true, specifies that the key is active when it is released.
Returns:
a KeyStroke object for that key

getKeyStroke

public static KeyStroke getKeyStroke(Character keyChar,
                                     int modifiers)
Return a shared instance of a key stroke, given a character object and a set of modifiers. Note that the first parameter is of type Character rather than char. This is to avoid clashes with code that existed prior to the introduction of this method, which may have been calling getKeyStroke(int keyCode, int modifiers) with quoted characters and relying on their automatic conversion to type int. The modifiers consist of any combination of:
  • java.awt.Event.SHIFT_MASK (1)
  • java.awt.Event.CTRL_MASK (2)
  • java.awt.Event.META_MASK (4)
  • java.awt.Event.ALT_MASK (8)
Since these numbers are all different powers of two, any combination of them is an integer in which each bit represents a different modifier key.
Parameters:
keyChar - the character object for a keyboard character.
modifiers - an int specifying any combination of the key modifiers.
Returns:
a KeyStroke object for that key
Since:
1.3

getKeyStroke

public static KeyStroke getKeyStroke(int keyCode,
                                     int modifiers,
                                     boolean onKeyRelease)
Return a shared instance of a key stroke given a numeric keycode and a set of modifiers, specifying whether the key is activated when it is pressed or released.

The "virtual key" constants defined in java.awt.event.KeyEvent can be used to specify the key code. For example:

  • java.awt.event.KeyEvent.VK_ENTER
  • java.awt.event.KeyEvent.VK_TAB
  • java.awt.event.KeyEvent.VK_SPACE
The modifiers consist of any combination of:
  • java.awt.Event.SHIFT_MASK (1)
  • java.awt.Event.CTRL_MASK (2)
  • java.awt.Event.META_MASK (4)
  • java.awt.Event.ALT_MASK (8)
Since these numbers are all different powers of two, any combination of them is an integer in which each bit represents a different modifier key.
Parameters:
keyCode - an int specifying the numeric code for a keyboard key
modifiers - an int specifying any combination of the key modifiers.
onKeyRelease - a boolean value. When true, specifies that the key is active when it is released.
Returns:
a KeyStroke object for that key
See Also:
KeyEvent, Event

getKeyStroke

public static KeyStroke getKeyStroke(int keyCode,
                                     int modifiers)
Return a shared instance of a key stroke given a char code and a set of modifiers -- the key is activated when it is pressed.

The "virtual key" constants defined in java.awt.event.KeyEvent can be used to specify the key code. For example:

  • java.awt.event.KeyEvent.VK_ENTER
  • java.awt.event.KeyEvent.VK_TAB
  • java.awt.event.KeyEvent.VK_SPACE
The modifiers consist of any combination of:
  • java.awt.Event.SHIFT_MASK (1)
  • java.awt.Event.CTRL_MASK (2)
  • java.awt.Event.META_MASK (4)
  • java.awt.Event.ALT_MASK (8)
Since these numbers are all different powers of two, any combination of them is an integer in which each bit represents a different modifier key.
Parameters:
keyCode - an int specifying the numeric code for a keyboard key
modifiers - an int specifying any combination of the key modifiers.
Returns:
a KeyStroke object for that key
See Also:
KeyEvent

getKeyStrokeForEvent

public static KeyStroke getKeyStrokeForEvent(KeyEvent anEvent)
Return a keystroke from an event.

This method obtains the keyChar from a KeyTyped event, and the keyCode from a KeyPressed or KeyReleased event, so you the type of event doesn't matter.

Parameters:
anEvent - the KeyEvent to obtain the KeyStroke from
Returns:
the KeyStroke that precipitated the event

getKeyStroke

public static KeyStroke getKeyStroke(String s)
Parse a string and return a KeyStroke. The string has the following syntax:
    <modifiers>* (<typedID> | <pressedReleasedID>)
    modifiers := shift | control | meta | alt | button1 | button2 | button3
    typedID := typed <typedKey>
    typedKey := string of length 1 giving unicode character.
    pressedReleasedID := (pressed | released)? key
 key := KeyEvent keycode name, i.e. the name following "VK_".
If typed, pressed or released is not specified, pressed is assumed. Here are some examples:
     "INSERT" => new KeyStroke(0, KeyEvent.VK_INSERT);
     "control DELETE" => new KeyStroke(InputEvent.CTRL_MASK, KeyEvent.VK_DELETE);
     "alt shift X" => new KeyStroke(InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, KeyEvent.VK_X);
     "alt shift released X" => new KeyStroke(InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, KeyEvent.VK_X, true);
     "typed a" => new KeyStroke('a');
For backward compatability, this will return null if s is not in the above format.

getKeyChar

public char getKeyChar()
Returns the character defined by this KeyStroke object.
Returns:
a char value
See Also:
getKeyStroke(char)

getKeyCode

public int getKeyCode()
Returns the numeric keycode defined by this KeyStroke object.
Returns:
an int containing the keycode value
See Also:
getKeyStroke(int,int)

getModifiers

public int getModifiers()
Returns the modifier keys defined by this KeyStroke object.
Returns:
an int containing the modifiers
See Also:
getKeyStroke(int,int)

isOnKeyRelease

public boolean isOnKeyRelease()
Returns true if this keystroke is active on key release.
Returns:
true if active on key release, false if active on key press
See Also:
getKeyStroke(int,int,boolean)

hashCode

public int hashCode()
Returns a numeric value for this object that is likely to be reasonably unique, so it can be used as the index value in a Hashtable.
Overrides:
hashCode in class Object
Returns:
an int that "represents" this object
See Also:
Hashtable

equals

public boolean equals(Object anObject)
Returns true if this object is identical to the specified object.
Overrides:
equals in class Object
Parameters:
anObject - the Object to compare this object to
Returns:
true if the objects are identical

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LazyInputMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UIDefaults.LazyInputMap

java.lang.Object
  |
  +--javax.swing.UIDefaults.LazyInputMap
All Implemented Interfaces:
UIDefaults.LazyValue
Enclosing class:
UIDefaults
public static class UIDefaults.LazyInputMap
extends Object
implements UIDefaults.LazyValue

LazyInputMap will create a InputMap in its createValue method. The bindings are passed in in the constructor. The bindings are an array with the even number entries being string KeyStrokes (eg "alt SPACE") and the odd number entries being the value to use in the InputMap (and the key in the ActionMap).

Constructor Summary
UIDefaults.LazyInputMap(Object[] bindings)
Method Summary
 Object createValue(UIDefaults table)
Creates an InputMap with the bindings that are passed in.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UIDefaults.LazyInputMap

public UIDefaults.LazyInputMap(Object[] bindings)
Method Detail

createValue

public Object createValue(UIDefaults table)
Creates an InputMap with the bindings that are passed in.
Specified by:
createValue in interface UIDefaults.LazyValue
Parameters:
table - a UIDefaults table
Returns:
the InputMap
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LazyValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface UIDefaults.LazyValue

All Known Implementing Classes:
UIDefaults.ProxyLazyValue, UIDefaults.LazyInputMap
Enclosing class:
UIDefaults
public static interface UIDefaults.LazyValue

This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods. Lazy values are useful for defaults that are expensive to construct or are seldom retrieved. The first time a LazyValue is retrieved its "real value" is computed by calling LazyValue.createValue() and the real value is used to replace the LazyValue in the UIDefaults table. Subsequent lookups for the same key return the real value. Here's an example of a LazyValue that constructs a Border:

  Object borderLazyValue = new UIDefaults.LazyValue() {
      public Object createValue(UIDefaults table) {
          return new BorderFactory.createLoweredBevelBorder();
      }
  };

  uiDefaultsTable.put("MyBorder", borderLazyValue);

See Also:
UIDefaults.get(java.lang.Object)

Method Summary
 Object createValue(UIDefaults table)
Creates the actual value retrieved from the UIDefaults table.

Method Detail

createValue

public Object createValue(UIDefaults table)
Creates the actual value retrieved from the UIDefaults table. When an object that implements this interface is retrieved from the table, this method is used to create the real value, which is then stored in the table and returned to the calling method.
Parameters:
table - a UIDefaults table
Returns:
the created Object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ListCellRenderer

All Known Implementing Classes:
DefaultListCellRenderer, BasicComboBoxRenderer
public interface ListCellRenderer

Identifies components that can be used as "rubber stamps" to paint the cells in a JList. For example, to use a JLabel as a ListCellRenderer, you would write something like this:

 class MyCellRenderer extends JLabel implements ListCellRenderer {
     public MyCellRenderer() {
         setOpaque(true);
     }
     public Component getListCellRendererComponent(
         JList list,
         Object value,
         int index,
         boolean isSelected,
         boolean cellHasFocus)
     {
         setText(value.toString());
         setBackground(isSelected ? Color.red : Color.white);
         setForeground(isSelected ? Color.white : Color.black);
         return this;
     }
 }

See Also:
JList, DefaultListCellRenderer

Method Summary
 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Return a component that has been configured to display the specified value.

Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.
Parameters:
list - The JList we're painting.
value - The value returned by list.getModel().getElementAt(index).
index - The cells index.
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.
Returns:
A component whose paint() method will render the specified value.
See Also:
JList, ListSelectionModel, ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ListModel

All Known Subinterfaces:
ComboBoxModel, MutableComboBoxModel
All Known Implementing Classes:
AbstractListModel
public interface ListModel

This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list. Logically the model is a vector, indices vary from 0 to ListDataModel.getSize() - 1. Any change to the contents or length of the data model must be reported to all of the ListDataListeners.

See Also:
JList

Method Summary
void | addListDataListener(ListDataListener l) Add a listener to the list that's notified each time a change to the data model occurs.
Object | getElementAt(int index) Returns the value at the specified index.
int | getSize() Returns the length of the list.
void | removeListDataListener(ListDataListener l) Remove a listener from the list that's notified each time a change to the data model occurs.

Method Detail

getSize

public int getSize()
Returns the length of the list.

getElementAt

public Object getElementAt(int index)
Returns the value at the specified index.

addListDataListener

public void addListDataListener(ListDataListener l)
Add a listener to the list that's notified each time a change to the data model occurs.
Parameters:
l - the ListDataListener

removeListDataListener

public void removeListDataListener(ListDataListener l)
Remove a listener from the list that's notified each time a change to the data model occurs.
Parameters:
l - the ListDataListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListSelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ListSelectionModel

All Known Implementing Classes:
DefaultListSelectionModel
public interface ListSelectionModel

This interface represents the current state of the selection for any of the components that display a list of values with stable indices. The selection is modeled as a set of intervals, each interval represents a contiguous range of selected list elements. The methods for modifying the set of selected intervals all take a pair of indices, index0 and index1, that represent a closed interval, i.e. the interval includes both index0 and index1.

See Also:
DefaultListSelectionModel

Field Summary
static int | MULTIPLE_INTERVAL_SELECTION A value for the selectionMode property: select one or more contiguous ranges of indices at a time.
static int | SINGLE_INTERVAL_SELECTION A value for the selectionMode property: select one contiguous range of indices at a time.
static int | SINGLE_SELECTION A value for the selectionMode property: select one list index at a time.
Method Summary
 void addListSelectionListener(ListSelectionListener x)
Add a listener to the list that's notified each time a change to the selection occurs.
 void addSelectionInterval(int index0, int index1)
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive.
 void clearSelection()
Change the selection to the empty set.
 int getAnchorSelectionIndex()
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
 int getLeadSelectionIndex()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
 int getMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty.
 int getMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty.
 int getSelectionMode()
Returns the current selection mode.
 boolean getValueIsAdjusting()
Returns true if the value is undergoing a series of changes.
 void insertIndexInterval(int index, int length, boolean before)
Insert length indices beginning before/after index.
 boolean isSelectedIndex(int index)
Returns true if the specified index is selected.
 boolean isSelectionEmpty()
Returns true if no indices are selected.
 void removeIndexInterval(int index0, int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model.
 void removeListSelectionListener(ListSelectionListener x)
Remove a listener from the list that's notified each time a change to the selection occurs.
 void removeSelectionInterval(int index0, int index1)
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.
 void setAnchorSelectionIndex(int index)
Set the anchor selection index.
 void setLeadSelectionIndex(int index)
Set the lead selection index.
 void setSelectionInterval(int index0, int index1)
Change the selection to be between index0 and index1 inclusive.
 void setSelectionMode(int selectionMode)
Set the selection mode.
 void setValueIsAdjusting(boolean valueIsAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event.

Field Detail

SINGLE_SELECTION

public static final int SINGLE_SELECTION
A value for the selectionMode property: select one list index at a time.
See Also:
setSelectionMode(int)

SINGLE_INTERVAL_SELECTION

public static final int SINGLE_INTERVAL_SELECTION
A value for the selectionMode property: select one contiguous range of indices at a time.
See Also:
setSelectionMode(int)

MULTIPLE_INTERVAL_SELECTION

public static final int MULTIPLE_INTERVAL_SELECTION
A value for the selectionMode property: select one or more contiguous ranges of indices at a time.
See Also:
setSelectionMode(int)
Method Detail

setSelectionInterval

public void setSelectionInterval(int index0,
                                 int index1)
Change the selection to be between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)

addSelectionInterval

public void addSelectionInterval(int index0,
                                 int index1)
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. If this represents a change to the current selection, then notify each ListSelectionListener. Note that index0 doesn't have to be less than or equal to index1.
Parameters:
index0 - one end of the interval.
index1 - other end of the interval
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)

getMinSelectionIndex

public int getMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty.

getMaxSelectionIndex

public int getMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty.

isSelectedIndex

public boolean isSelectedIndex(int index)
Returns true if the specified index is selected.

getAnchorSelectionIndex

public int getAnchorSelectionIndex()
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). The most recent index0 is considered the "anchor" and the most recent index1 is considered the "lead". Some interfaces display these indices specially, e.g. Windows95 displays the lead index with a dotted yellow outline.
See Also:
getLeadSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int)

setAnchorSelectionIndex

public void setAnchorSelectionIndex(int index)
Set the anchor selection index.
See Also:
getAnchorSelectionIndex()

getLeadSelectionIndex

public int getLeadSelectionIndex()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
See Also:
getAnchorSelectionIndex(),
setSelectionInterval(int, int),
addSelectionInterval(int, int)

setLeadSelectionIndex

public void setLeadSelectionIndex(int index)
Set the lead selection index.
See Also:
getLeadSelectionIndex()

clearSelection

public void clearSelection()
Change the selection to the empty set. If this represents a change to the current selection then notify each ListSelectionListener.
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)

isSelectionEmpty

public boolean isSelectionEmpty()
Returns true if no indices are selected.

insertIndexInterval

public void insertIndexInterval(int index,
                                int length,
                                boolean before)
Insert length indices beginning before/after index. This is typically called to sync the selection model with a corresponding change in the data model.

removeIndexInterval

public void removeIndexInterval(int index0,
                                int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model. This is typically called to sync the selection model width a corresponding change in the data model.

setValueIsAdjusting

public void setValueIsAdjusting(boolean valueIsAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event. For example if the model is being updated in response to a user drag, the value of the valueIsAdjusting property will be set to true when the drag is initiated and be set to false when the drag is finished. This property allows listeners to to update only when a change has been finalized, rather than always handling all of the intermediate values.
Parameters:
valueIsAdjusting - The new value of the property.
See Also:
getValueIsAdjusting()

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns true if the value is undergoing a series of changes.
Returns:
true if the value is currently adjusting
See Also:
setValueIsAdjusting(boolean)

setSelectionMode

public void setSelectionMode(int selectionMode)
Set the selection mode. The following selectionMode values are allowed:
  • SINGLE_SELECTION Only one list index can be selected at a time. In this mode the setSelectionInterval and addSelectionInterval methods are equivalent, and only the second index argument (the "lead index") is used.
  • SINGLE_INTERVAL_SELECTION One contiguous index interval can be selected at a time. In this mode setSelectionInterval and addSelectionInterval are equivalent.
  • MULTIPLE_INTERVAL_SELECTION In this mode, there's no restriction on what can be selected.
See Also:
getSelectionMode()

getSelectionMode

public int getSelectionMode()
Returns the current selection mode.
Returns:
The value of the selectionMode property.
See Also:
setSelectionMode(int)

addListSelectionListener

public void addListSelectionListener(ListSelectionListener x)
Add a listener to the list that's notified each time a change to the selection occurs.
Parameters:
l - the ListSelectionListener
See Also:
removeListSelectionListener(javax.swing.event.ListSelectionListener),
setSelectionInterval(int, int),
addSelectionInterval(int, int),
removeSelectionInterval(int, int),
clearSelection(),
insertIndexInterval(int, int, boolean),
removeIndexInterval(int, int)

removeListSelectionListener

public void removeListSelectionListener(ListSelectionListener x)
Remove a listener from the list that's notified each time a change to the selection occurs.
Parameters:
l - the ListSelectionListener
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookAndFeel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class LookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
Direct Known Subclasses:
BasicLookAndFeel, MultiLookAndFeel
public abstract class LookAndFeel
extends Object

Completely characterizes a look and feel from the point of view of the pluggable look and feel components.

Constructor Summary
LookAndFeel()
Method Summary
 UIDefaults getDefaults()
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
abstract  String getDescription()
Return a one line description of this look and feel implementation, e.g.
abstract  String getID()
Return a string that identifies this look and feel.
abstract  String getName()
Return a short string that identifies this look and feel, e.g.
 void initialize()
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults().
static void installBorder(JComponent c, String defaultBorderName)
Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
static void installColors(JComponent c, String defaultBgName, String defaultFgName)
Convenience method for initializing a component's foreground and background color properties with values from the current defaults table.
static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table.
abstract  boolean isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
abstract  boolean isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel.
static void loadKeyBindings(InputMap retMap, Object[] keys)
Loads the bindings in keys into retMap.
static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys)
Creates a ComponentInputMap from keys.
static Object makeIcon(Class baseClass, String gifFile)
Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.
static InputMap makeInputMap(Object[] keys)
Creates a InputMap from keys.
static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList)
Convenience method for building lists of KeyBindings.
 String toString()
Returns a string that displays and identifies this object's properties.
 void uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel.
static void uninstallBorder(JComponent c)
Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LookAndFeel

public LookAndFeel()
Method Detail

installColors

public static void installColors(JComponent c,
                                 String defaultBgName,
                                 String defaultFgName)
Convenience method for initializing a component's foreground and background color properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.
Parameters:
c - the target component for installing default color/font properties
defaultBgName - the key for the default background
defaultFgName - the key for the default foreground
See Also:
installColorsAndFont(javax.swing.JComponent, java.lang.String, java.lang.String, java.lang.String), UIManager.getColor(java.lang.Object)

installColorsAndFont

public static void installColorsAndFont(JComponent c,
                                        String defaultBgName,
                                        String defaultFgName,
                                        String defaultFontName)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.
Parameters:
c - the target component for installing default color/font properties
defaultBgName - the key for the default background
defaultFgName - the key for the default foreground
defaultFontName - the key for the default font
See Also:
installColors(javax.swing.JComponent, java.lang.String, java.lang.String),
UIManager.getColor(java.lang.Object),
UIManager.getFont(java.lang.Object)

installBorder

public static void installBorder(JComponent c,
                                 String defaultBorderName)
Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
Parameters:
c - the target component for installing default border
defaultBorderName - the key specifying the default border

uninstallBorder

public static void uninstallBorder(JComponent c)
Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource.
Parameters:
c - the target component for uninstalling default border

makeKeyBindings

public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList)
Convenience method for building lists of KeyBindings.

Return an array of KeyBindings, one for each KeyStroke,Action pair in keyBindingList. A KeyStroke can either be a string in the format specified by the KeyStroke.getKeyStroke method or a KeyStroke object.

Actions are strings. Here's an example:

     JTextComponent.KeyBinding[] multilineBindings = makeKeyBindings( new Object[] {
          "UP", DefaultEditorKit.upAction,
        "DOWN", DefaultEditorKit.downAction,
     "PAGE_UP", DefaultEditorKit.pageUpAction,
   "PAGE_DOWN", DefaultEditorKit.pageDownAction,
       "ENTER", DefaultEditorKit.insertBreakAction,
         "TAB", DefaultEditorKit.insertTabAction
  });
Parameters:
keyBindingList - an array of KeyStroke,Action pairs
Returns:
an array of KeyBindings

makeInputMap

public static InputMap makeInputMap(Object[] keys)
Creates a InputMap from keys. keys describes the InputMap, with every even number item being a String giving the KeyStroke as speced in KeyStroke.getKeyStroke(String) (or a KeyStroke), and every odd number item the Object used to determine the associated Action in an ActionMap.
Since:
1.3

makeComponentInputMap

public static ComponentInputMap makeComponentInputMap(JComponent c,
                                                      Object[] keys)
Creates a ComponentInputMap from keys. keys describes the InputMap, with every even number item being a String giving the KeyStroke as speced in KeyStroke.getKeyStroke(String) (or a KeyStroke), and every odd number item the Object used to determine the associated Action in an ActionMap.
Since:
1.3

loadKeyBindings

public static void loadKeyBindings(InputMap retMap,
                                   Object[] keys)
Loads the bindings in keys into retMap. This does not remove any existing bindings in retMap. keys describes the InputMap, with every even number item being a String giving the KeyStroke as speced in KeyStroke.getKeyStroke(String) (or a KeyStroke), and every odd number item the Object used to determine the associated Action in an ActionMap.
Since:
1.3

makeIcon

public static Object makeIcon(Class baseClass,
                              String gifFile)
Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename.

getName

public abstract String getName()
Return a short string that identifies this look and feel, e.g. "CDE/Motif". This string should be appropriate for a menu item. Distinct look and feels should have different names, e.g. a subclass of MotifLookAndFeel that changes the way a few components are rendered should be called "CDE/Motif My Way"; something that would be useful to a user trying to select a L&F from a list of names.

getID

public abstract String getID()
Return a string that identifies this look and feel. This string will be used by applications/services that want to recognize well known look and feel implementations. Presently the well known names are "Motif", "Windows", "Mac", "Metal". Note that a LookAndFeel derived from a well known superclass that doesn't make any fundamental changes to the look or feel shouldn't override this method.

getDescription

public abstract String getDescription()
Return a one line description of this look and feel implementation, e.g. "The CDE/Motif Look and Feel". This string is intended for the user, e.g. in the title of a window or in a ToolTip message.

isNativeLookAndFeel

public abstract boolean isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. For example a CDE/Motif look and implementation would return true when the underlying platform was Solaris.

isSupportedLookAndFeel

public abstract boolean isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel. This method returns false if the look and feel depends on special resources or legal agreements that aren't defined for the current platform.
See Also:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

initialize

public void initialize()
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults(). Subclasses should do any one-time setup they need here, rather than in a static initializer, because look and feel class objects may be loaded just to discover that isSupportedLookAndFeel() returns false.
See Also:
uninitialize(), UIManager.setLookAndFeel(javax.swing.LookAndFeel)

uninitialize

public void uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. Subclasses may choose to free up some resources here.
See Also:
initialize()

getDefaults

public UIDefaults getDefaults()
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.
See Also:
initialize(),
uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookAndFeelInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UIManager.LookAndFeelInfo

java.lang.Object
  |
  +--javax.swing.UIManager.LookAndFeelInfo
Enclosing class:
UIManager
public static class UIManager.LookAndFeelInfo
extends Object

Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.

See Also:
UIManager.getInstalledLookAndFeels(), LookAndFeel

Constructor Summary
UIManager.LookAndFeelInfo(String name, String className)
Constructs an UIManager$LookAndFeelInfo object.
Method Summary
String | getClassName() Returns the name of the class that implements this look and feel.
String | getName() Returns the name of the look and feel in a form suitable for a menu or other presentation
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UIManager.LookAndFeelInfo

public UIManager.LookAndFeelInfo(String name,
                                 String className)
Constructs an UIManager$LookAndFeelInfo object.
Parameters:
name - a String specifying the name of the look and feel
className - a String specifiying the name of the class that implements the look and feel
Method Detail

getName

public String getName()
Returns the name of the look and feel in a form suitable for a menu or other presentation
Returns:
a String containing the name
See Also:
LookAndFeel.getName()

getClassName

public String getClassName()
Returns the name of the class that implements this look and feel.
Returns:
the name of the class that implements this LookAndFeel
See Also:
LookAndFeel

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface MenuElement

All Known Implementing Classes:
JMenu, JMenuBar, JMenuItem, JPopupMenu
public interface MenuElement

Any component that can be placed into a menu should implement this interface. This interface is used by MenuSelection to handle selection and navigation in menu hierarchies.

Method Summary
Component | getComponent() This method should return the java.awt.Component used to paint the receiving element.
MenuElement[] | getSubElements() This method should return an array containing the sub-elements for the receiving menu element
void | menuSelectionChanged(boolean isIncluded) Call by the MenuSelection when the MenuElement is added or remove from the menu selection.
void | processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager) Process a key event.
void | processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) Process a mouse event.

Method Detail

processMouseEvent

public void processMouseEvent(MouseEvent event,
                              MenuElement[] path,
                              MenuSelectionManager manager)
Process a mouse event. event is a MouseEvent with source being the receiving element's component. path is the path of the receiving element in the menu hierarchy including the receiving element itself. manager is the MenuSelectionManager for the menu hierarchy. This method should process the MouseEvent and change the menu selection if necessary by using MenuSelectionManager's API Note: you do not have to forward the event to sub-components. This is done automatically by the MenuSelectionManager

processKeyEvent

public void processKeyEvent(KeyEvent event,
                            MenuElement[] path,
                            MenuSelectionManager manager)
Process a key event.

menuSelectionChanged

public void menuSelectionChanged(boolean isIncluded)
Call by the MenuSelection when the MenuElement is added or remove from the menu selection.

getSubElements

public MenuElement[] getSubElements()
This method should return an array containing the sub-elements for the receiving menu element
Returns:
an array of MenuElements

getComponent

public Component getComponent()
This method should return the java.awt.Component used to paint the receiving element. The returned component will be used to convert events and detect if an event is inside a MenuElement's component.
Returns:
the Component value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuSelectionManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class MenuSelectionManager

java.lang.Object
  |
  +--javax.swing.MenuSelectionManager
public class MenuSelectionManager
extends Object

A MenuSelectionManager owns the selection in menu hierarchy.

Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
protected EventListenerList | listenerList
Constructor Summary
MenuSelectionManager()
Method Summary
void | addChangeListener(ChangeListener l) Adds a ChangeListener to the button.
void | clearSelectedPath() Tell the menu selection to close and unselect all the menu components.
Component | componentForPoint(Component source, Point sourcePoint) Returns the component in the currently selected path which contains sourcePoint.
static MenuSelectionManager | defaultManager() Returns the default menu selection manager.
protected void | fireStateChanged()
MenuElement[] | getSelectedPath() Returns the path to the currently selected menu item
boolean | isComponentPartOfCurrentMenu(Component c) Return true if c is part of the currently used menu
void | processKeyEvent(KeyEvent e) When a MenuElement receives an event from a KeyListener, it should never process the event directly.
void | processMouseEvent(MouseEvent event) When a MenuElement receives an event from a MouseListener, it should never process the event directly.
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from the button.
void | setSelectedPath(MenuElement[] path) Change the selection in the menu hierarchy.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. The source of events generated is always "this".

listenerList

protected EventListenerList listenerList
Constructor Detail

MenuSelectionManager

public MenuSelectionManager()
Method Detail

defaultManager

public static MenuSelectionManager defaultManager()
Returns the default menu selection manager.
Returns:
a MenuSelectionManager object

setSelectedPath

public void setSelectedPath(MenuElement[] path)
Change the selection in the menu hierarchy.
Parameters:
path - an array of MenuElement objects specifying the selected path

getSelectedPath

public MenuElement[] getSelectedPath()
Returns the path to the currently selected menu item
Returns:
an array of MenuElement objects representing the selected path

clearSelectedPath

public void clearSelectedPath()
Tell the menu selection to close and unselect all the menu components. Call this method when a choice has been made

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
Parameters:
l - the listener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button.
Parameters:
l - the listener to remove

fireStateChanged

protected void fireStateChanged()

processMouseEvent

public void processMouseEvent(MouseEvent event)
When a MenuElement receives an event from a MouseListener, it should never process the event directly. Instead all MenuElements should call this method with the event.
Parameters:
event - a MouseEvent object

componentForPoint

public Component componentForPoint(Component source,
                                   Point sourcePoint)
Returns the component in the currently selected path which contains sourcePoint.
Parameters:
source - The component in whose coordinate space sourcePoint is given
sourcePoint - The point which is being tested
Returns:
The component in the currently selected path which contains sourcePoint (relative to the source component's coordinate space. If sourcePoint is not inside a component on the currently selected path, null is returned.

processKeyEvent

public void processKeyEvent(KeyEvent e)
When a MenuElement receives an event from a KeyListener, it should never process the event directly. Instead all MenuElements should call this method with the event.
Parameters:
e - a KeyEvent object

isComponentPartOfCurrentMenu

public boolean isComponentPartOfCurrentMenu(Component c)
Return true if c is part of the currently used menu
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModelListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTabbedPane.ModelListener

java.lang.Object
  |
  +--javax.swing.JTabbedPane.ModelListener
All Implemented Interfaces:
ChangeListener, EventListener, Serializable
Enclosing class:
JTabbedPane
protected class JTabbedPane.ModelListener
extends Object
implements ChangeListener, Serializable

We pass ModelChanged events along to the listeners with the tabbedpane (instead of the model itself) as the event source.

See Also:
Serialized Form

Constructor Summary
protected JTabbedPane.ModelListener()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTabbedPane.ModelListener

protected JTabbedPane.ModelListener()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MutableComboBoxModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface MutableComboBoxModel

All Superinterfaces:
ComboBoxModel, ListModel
All Known Implementing Classes:
DefaultComboBoxModel
public interface MutableComboBoxModel
extends ComboBoxModel

A mutable version of ComboBoxModel.

Method Summary
void | addElement(Object obj) Adds an item to the end of the model.
void | insertElementAt(Object obj, int index) Adds an item at a specific index
void | removeElement(Object obj) Removes an item from the model.
void | removeElementAt(int index) Removes an item at a specific index
Methods inherited from interface javax.swing.ComboBoxModel
getSelectedItem, setSelectedItem
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener

Method Detail

addElement

public void addElement(Object obj)
Adds an item to the end of the model.
Parameters:
obj - the Object to be added

removeElement

public void removeElement(Object obj)
Removes an item from the model.
Parameters:
obj - the Object to be removed

insertElementAt

public void insertElementAt(Object obj,
                            int index)
Adds an item at a specific index
Parameters:
obj - the Object to be added
index - location to add the object

removeElementAt

public void removeElementAt(int index)
Removes an item at a specific index
Parameters:
index - location of object to be removed
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


outsideTimerAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ToolTipManager.outsideTimerAction

java.lang.Object
  |
  +--javax.swing.ToolTipManager.outsideTimerAction
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
ToolTipManager
protected class ToolTipManager.outsideTimerAction
extends Object
implements ActionListener

Constructor Summary
protected ToolTipManager.outsideTimerAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToolTipManager.outsideTimerAction

protected ToolTipManager.outsideTimerAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OverlayLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class OverlayLayout

java.lang.Object
  |
  +--javax.swing.OverlayLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
public class OverlayLayout
extends Object
implements LayoutManager2, Serializable

A layout manager to arrange components over the top of each other. The requested size of the container will be the largest requested size of the children, taking alignment needs into consideration. The alignment is based upon what is needed to properly fit the children in the allocation area. The children will be placed such that their alignment points are all on top of each other.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
OverlayLayout(Container target)
Constructs a layout manager that performs overlay arrangment of the children.
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | addLayoutComponent(String name, Component comp) Adds the specified component to the layout.
float | getLayoutAlignmentX(Container target) Returns the alignment along the x axis for the container.
float | getLayoutAlignmentY(Container target) Returns the alignment along the y axis for the container.
void | invalidateLayout(Container target) Indicates a child has changed its layout related information, which causes any cached calculations to be flushed.
void | layoutContainer(Container target) Called by the AWT when the specified container needs to be laid out.
Dimension | maximumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | minimumLayoutSize(Container target) Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension | preferredLayoutSize(Container target) Returns the preferred dimensions for this layout given the components in the specified target container.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OverlayLayout

public OverlayLayout(Container target)
Constructs a layout manager that performs overlay arrangment of the children. The layout manager created is dedicated to the given container.
Parameters:
target - The container to do layout against.
Method Detail

invalidateLayout

public void invalidateLayout(Container target)
Indicates a child has changed its layout related information, which causes any cached calculations to be flushed.
Specified by:
invalidateLayout in interface LayoutManager2
Parameters:
target - the container

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component to the layout. Not used by this class.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component
comp - the the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout. Not used by this class.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to remove

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to the layout, using the specified constraint object.
Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component to be added
constraints - where/how the component is added to the layout.

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container. Recomputes the layout if it has been invalidated. Factors in the current inset setting returned by getInsets().
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
a Dimension object containing the preferred dimensions
See Also:
minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container. Recomputes the layout if it has been invalidated, and factors in the current inset setting.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
a Dimension object containing the minimum dimensions
See Also:
preferredLayoutSize(java.awt.Container)

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container. Recomputes the layout if it has been invalidated, and factors in the inset setting returned by getInset().
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
target - the component which needs to be laid out
Returns:
a Dimension object containing the maximum dimensions
See Also:
preferredLayoutSize(java.awt.Container)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis for the container. If the major axis of the box is the x axis the default alignment will be returned, otherwise the alignment needed to place the children along the x axis will be returned.
Specified by:
getLayoutAlignmentX in interface LayoutManager2
Parameters:
target - the container
Returns:
the alignment >= 0.0f && <= 1.0f

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis for the container. If the major axis of the box is the y axis the default alignment will be returned, otherwise the alignment needed to place the children along the y axis will be returned.
Specified by:
getLayoutAlignmentY in interface LayoutManager2
Parameters:
target - the container
Returns:
the alignment >= 0.0f && <= 1.0f

layoutContainer

public void layoutContainer(Container target)
Called by the AWT when the specified container needs to be laid out.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
target - the container to lay out
Throws:
AWTError - if the target isn't the container specified to the BoxLayout constructor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package javax.swing

Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

See:
Description

Interface Summary
Action | The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
BoundedRangeModel | Defines the data model used by components like Sliders and ProgressBars.
ButtonModel | State Model for buttons.
CellEditor | This interface defines the methods any general editor should be able to implement.
ComboBoxEditor | The editor component used for JComboBox components.
ComboBoxModel | ComboBoxDataModel is a ListDataModel with a selected item This selected item is in the model since it is not always in the item list.
DesktopManager | DesktopManager objects are owned by a JDesktopPane object.
Icon | A small fixed size picture, typically used to decorate components.
JComboBox.KeySelectionManager | The interface that defines a KeySelectionManager.
ListCellRenderer | Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListModel | This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
ListSelectionModel | This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
MenuElement | Any component that can be placed into a menu should implement this interface.
MutableComboBoxModel | A mutable version of ComboBoxModel.
Renderer | Defines the requirements for an object responsible for "rendering" (displaying) a value.
RootPaneContainer | This interface is implemented by components that have a single JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
Scrollable | An interface that provides information to a scrolling container like JScrollPane.
ScrollPaneConstants | Constants used with the JScrollPane component.
SingleSelectionModel | A model that supports at most one indexed selection.
SwingConstants | A collection of constants generally used for positioning and orienting components on the screen.
UIDefaults.ActiveValue | This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
UIDefaults.LazyValue | This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
WindowConstants | Constants used to control the window-closing operation.

Class Summary
AbstractAction | This class provides default implementations for the JFC Action interface.
AbstractButton | Defines common behaviors for buttons and menu items.
AbstractCellEditor |
AbstractListModel | The Abstract definition for the data model the provides a List with its contents.
ActionMap | ActionMap provides mappings from Objects (called keys or Action names) to Actions.
BorderFactory | Factory class for vending standard Border objects.
Box | A lightweight container that uses a BoxLayout object as its layout manager.
Box.Filler | An implementation of a lightweight component that participates in layout but has no view.
BoxLayout | A layout manager that allows multiple components to be layed out either vertically or horizontally.
ButtonGroup | This class is used to create a multiple-exclusion scope for a set of buttons.
CellRendererPane | This class is inserted in between cell renderers and the components that use them.
ComponentInputMap | A ComponentInputMap is an InputMap associated with a particular JComponent.
DebugGraphics | Graphics subclass supporting graphics debugging.
DefaultBoundedRangeModel | A generic implementation of BoundedRangeModel.
DefaultButtonModel | The default implementation of a Button component's data model.
DefaultCellEditor | The default editor for table and tree cells.
DefaultComboBoxModel | The default model for combo boxes.
DefaultDesktopManager | This is an implementaion of the DesktopManager.
DefaultFocusManager | Default swing focus manager implementation.
DefaultListCellRenderer | Renders an item in a list.
DefaultListCellRenderer.UIResource | A subclass of DefaultListCellRenderer that implements UIResource.
DefaultListModel | This class implements the java.util.Vector API and notifies the ListDataListeners when changes occur.
DefaultListSelectionModel | Default data model for list selections.
DefaultSingleSelectionModel | A generic implementation of SingleSelectionModel.
FocusManager | Swing Focus Manager
GrayFilter | An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.
ImageIcon | An implementation of the Icon interface that paints Icons from Images.
InputMap | InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
InputVerifier | The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields.
JApplet | An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
JButton | An implementation of a "push" button.
JCheckBox | An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
JCheckBoxMenuItem | A menu item that can be selected or deselected.
JColorChooser | JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
JComboBox | A component that combines a button or text field and a drop-down list.
JComponent | The base class for all Swing components except top-level containers.
JDesktopPane | A container used to create a multiple-document interface or a virtual desktop.
JDialog | The main class for creating a dialog window.
JEditorPane | A text component to edit various kinds of content.
JFileChooser | JFileChooser provides a simple mechanism for the user to choose a file.
JFrame | An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
JInternalFrame | A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.
JInternalFrame.JDesktopIcon | This component represents an iconified version of a JInternalFrame.
JLabel | A display area for a short text string or an image, or both.
JLayeredPane | JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
JList | A component that allows the user to select one or more objects from a list.
JMenu | An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JMenuBar | An implementation of a menu bar.
JMenuItem | An implementation of an item in a menu.
JOptionPane | JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JPanel | JPanel is a generic lightweight container.
JPasswordField | JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
JPopupMenu | An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JPopupMenu.Separator | A popup menu-specific separator.
JProgressBar | A component that displays an integer value within a bounded interval.
JRadioButton | An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
JRadioButtonMenuItem | An implementation of a radio button menu item.
JRootPane | A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
JScrollBar | An implementation of a scrollbar.
JScrollPane | Provides a scrollable view of a component.
JSeparator | An implementation of a menu separator -- a divider between menu items that breaks them up into logical groupings.
JSlider | A component that lets the user graphically select a value by slding a knob within a bounded interval.
JSplitPane | JSplitPane is used to divide two (and only two) Components.
JTabbedPane | A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTable | JTable is a user-interface component that presents data in a two-dimensional table format.
JTextArea | A TextArea is a multi-line area that displays plain text.
JTextField | JTextField is a lightweight component that allows the editing of a single line of text.
JTextPane | A text component that can be marked up with attributes that are represented graphically.
JToggleButton | An implementation of a two-state button.
JToggleButton.ToggleButtonModel | The ToggleButton model
JToolBar | JToolBar provides a component that is useful for displaying commonly used Actions or controls.
JToolBar.Separator | A toolbar-specific separator.
JToolTip | Used to display a "Tip" for a Component.
JTree | A control that displays a set of hierarchical data as an outline.
JTree.DynamicUtilTreeNode | DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
JTree.EmptySelectionModel | EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
JViewport | The "viewport" or "porthole" through which you see the underlying information.
JWindow | A JWindow is a container that can be displayed anywhere on the user's desktop.
KeyStroke | A KeyStroke instance represents a key being typed on the keyboard -- it contains both a char code for the key and a modifier (alt, shift, ctrl, meta, or a combination).
LookAndFeel | Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
MenuSelectionManager | A MenuSelectionManager owns the selection in menu hierarchy.
OverlayLayout | A layout manager to arrange components over the top of each other.
ProgressMonitor | A class to monitor the progress of some operation.
ProgressMonitorInputStream | Monitors the progress of reading from some InputStream.
RepaintManager | This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.
ScrollPaneLayout | The layout manager used by JScrollPane.
ScrollPaneLayout.UIResource | The UI resource version of ScrollPaneLayout.
SizeRequirements | For the convenience of layout managers, calculates information about the size and position of components.
SizeSequence | A SizeSequence object efficiently maintains an ordered list of sizes and corresponding positions.
SwingUtilities | A collection of utility methods for Swing.
Timer | Causes an action to occur at a predefined rate.
ToolTipManager | Manages all the ToolTips in the system.
UIDefaults | A table of defaults for Swing components.
UIDefaults.LazyInputMap | LazyInputMap will create a InputMap in its createValue method.
UIDefaults.ProxyLazyValue | This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
UIManager | This class keeps track of the current look and feel and its defaults.
UIManager.LookAndFeelInfo | Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
ViewportLayout | The default layout manager for JViewport.

Exception Summary
UnsupportedLookAndFeelException An exception that indicates the request look & feel management classes are not present on the user's system.

Package javax.swing Description

Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. For a programmer's guide to using these components, see Creating a GUI with JFC/Swing, a trail in The Java Tutorial. For other resources, see Related Documentation.

The Swing architecture provides a number of advantages in the areas of:

  • Wide Variety of Components
  • Pluggable Look and Feel
  • MVC Architecture
  • Keystroke Handling
  • Action Objects
  • Nested Containers
  • Virtual Desktops
  • Compound Borders
  • Customized Dialogs
  • Standard Dialog Classes
  • Structured Table and Tree Components
  • Powerful Text Manipulation
  • Generic Undo Capabilities
  • Accessibility Support

Wide Variety of Components

In general, the class names that start with "J" are the components you add to an application. Examples: JButton, JLabel, JList, JPanel, JTable, JTree. The remaining files in the swing package contain the utility classes and interfaces that the components use to function.

Pluggable Look and Feel

Instead of being restricted to a single "look and feel", you can select a look and feel and "plug it in". An interface made of Swing components can look like a Win32 app, a Motif app, or a Mac app. It can use the new "Metal" look and feel. Developers can use standard Swing components and design their own look and feel (L&F) for them, and even allow users to select the look and feel they prefer. The plaf package includes the standard "Pluggable Look And Feel" classes.

MVC Architecture

The Model-View-Controller (MVC) architecture is used consistently throughout the Swing component set. The View and Controller parts of the architecture are combined in the component. Each component has an associated Model class and an interface it uses. You can provide your own data-model for a component by subclassing the Model class or by implementing the appropriate interface. For example, you could subclass DefaultListModel or implement the ListModel interface, and then use the JList setModel method to attach your data-model to the component.

Keystroke Handling

The JComponent architecture makes it easy to handle keyboard events in nested components. You register interest in a particular combination of keystrokes by creating a KeyStroke object and registering it with the component. When you register the keystroke combination and its associated action, you also specify one of the following conditions to determine when the action is initiated:

  • The component has the focus.
  • A child or grandchild of the component has the focus.
    You can use this capability to define global actions for a composite component. For example, a tree control could act on the Plus key to expand all elements in the tree, as long as any component in the tree has the focus.
  • The window the component is in has the focus.
    In other words, if the component is a child or grandchild of a window, and any component in that window has the focus, then the component receives the event. This capability is used to direct the keystroke combination Alt+C to the Cancel button in a dialog, for example, as long any component in the dialog has the focus.
For an index of the default keystroke behaviors for the Swing components in each of the standard Look and Feel implementations, see Swing Component Keystroke Assignments.

Action Objects

Action-interface objects provide a single point of control for program actions. For example, a toolbar icon and a menu item can reference the same Action object. When the Action object is disabled, the GUI items that reference it are automatically disabled. The Action interface extends ActionListener, specifying an enabled property as well as properties for text-descriptions and graphic icons.

Nested Containers

As the keystroke handling shows, Swing was designed to manage nested containers gracefully. The main "heavyweight" containers (JWindow, JFrame, JDialog, and JApplet) as well as the major "lightweight" containers (JInternalFrame and JComponent) all delegate their operations to a JRootPane. This commonality produces a high degree of regularity in container nesting. In particular, since the fundamental component class (JComponent) contains a JRootPane, virtually any component can be nested within another. It means, for example, that a graphic can be nested in a list, and a combo box can be nested in a toolbar. The JRootPane class uses a JLayeredPane to manage a content pane and an optional menu bar in a way that is virtually transparent to the developer. It also provides for a glass pane -- a single pane that can overlap multiple containers and be used for drawing or to intercept mouse actions.

Virtual Desktops

The JDesktopPane and JInternalFrame classes can be used to create a virtual desktop, or "multiple document interface". A JInternalFrame can be specified as iconizable, exandable, or closable, while the JDesktopPane provides real estate for them to operate in.

Compound Borders

Insets (the space between the edges of the component and the area it is drawn in) can be specified with a blank border. In addition, many border styles are available, which can be combined to create compound borders.

Customized Dialogs

The JOptionPane class provides a variety of static methods that you can invoke to create and display both message dialogs and user-choice dialogs in a variety of formats. The "message" displayed in the dialog can be a string, a string-generating object, or an arbitrary component. You can also replace the choice-buttons with components you specify for user-selections.

For example, the following line creates a simple message dialog that requires the user's confirmation:

JOptionPane.showMessageDialog(null, "The file will be deleted.");

Additional options for customized dialogs are described in the JOptionPane class.

Standard Dialog Classes

Standard dialogs currently available include:

  • JFileChooser
  • JColorChooser
And more standard dialogs are on the way.

Structured Table and Tree Components

The JTable class provides a data-aware matrix. JTree provides hierarchical-structuring of data elements.

Powerful Text Manipulations

In addition to single-font text fields and text areas, Swing provides a JPassword field for hidden input and a JTextPane class for displaying multi-font text. In addition, the JEditorPane class provides editing capabilities for multi-font text, while the text.html and text.rtf packages handle text encoded in HyperText Markup Language (HTML) or Rich Text Format (RTF).

Generic Undo Capabilities

The undo package provides generic undo capabilities that can be used in a variety of situations.

Accessibility Support

Swing has built-in support for developers to make products that are compatible with Assistive Technologies (for alternative interfaces like, for example, braille.) All of the Swing components implement interface Accessible.

Related Documentation

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

  • The Swing Connection
  • The Java Tutorial
  • Online Training at the Java Developer ConnectionSM
  • Java Foundation Classes (JFC) home page

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


javax.swing.plaf Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.plaf

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.border.AbstractBorder (implements javax.swing.border.Border, java.io.Serializable)
      • class javax.swing.border.BevelBorder
        • class javax.swing.plaf.BorderUIResource.BevelBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.CompoundBorder
        • class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.EmptyBorder (implements java.io.Serializable)
        • class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource (implements javax.swing.plaf.UIResource)
        • class javax.swing.border.MatteBorder
          • class javax.swing.plaf.BorderUIResource.MatteBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.EtchedBorder
        • class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.LineBorder
        • class javax.swing.plaf.BorderUIResource.LineBorderUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.border.TitledBorder
        • class javax.swing.plaf.BorderUIResource.TitledBorderUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.ActionMap (implements java.io.Serializable)
      • class javax.swing.plaf.ActionMapUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.BorderUIResource (implements javax.swing.border.Border, java.io.Serializable, javax.swing.plaf.UIResource)
    • class java.awt.Color (implements java.awt.Paint, java.io.Serializable)
      • class javax.swing.plaf.ColorUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.ButtonUI
        • class javax.swing.plaf.MenuItemUI
      • class javax.swing.plaf.ColorChooserUI
      • class javax.swing.plaf.ComboBoxUI
      • class javax.swing.plaf.DesktopIconUI
      • class javax.swing.plaf.DesktopPaneUI
      • class javax.swing.plaf.FileChooserUI
      • class javax.swing.plaf.InternalFrameUI
      • class javax.swing.plaf.LabelUI
      • class javax.swing.plaf.ListUI
      • class javax.swing.plaf.MenuBarUI
      • class javax.swing.plaf.OptionPaneUI
      • class javax.swing.plaf.PanelUI
      • class javax.swing.plaf.PopupMenuUI
      • class javax.swing.plaf.ProgressBarUI
      • class javax.swing.plaf.RootPaneUI
      • class javax.swing.plaf.ScrollBarUI
      • class javax.swing.plaf.ScrollPaneUI
      • class javax.swing.plaf.SeparatorUI
      • class javax.swing.plaf.SliderUI
      • class javax.swing.plaf.SplitPaneUI
      • class javax.swing.plaf.TabbedPaneUI
      • class javax.swing.plaf.TableHeaderUI
      • class javax.swing.plaf.TableUI
      • class javax.swing.plaf.TextUI
      • class javax.swing.plaf.ToolBarUI
      • class javax.swing.plaf.ToolTipUI
      • class javax.swing.plaf.TreeUI
      • class javax.swing.plaf.ViewportUI
    • class java.awt.geom.Dimension2D (implements java.lang.Cloneable)
      • class java.awt.Dimension (implements java.io.Serializable)
        • class javax.swing.plaf.DimensionUIResource (implements javax.swing.plaf.UIResource)
    • class java.awt.Font (implements java.io.Serializable)
      • class javax.swing.plaf.FontUIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.IconUIResource (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.InputMap (implements java.io.Serializable)
      • class javax.swing.ComponentInputMap
        • class javax.swing.plaf.ComponentInputMapUIResource (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.InputMapUIResource (implements javax.swing.plaf.UIResource)
    • class java.awt.Insets (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.plaf.InsetsUIResource (implements javax.swing.plaf.UIResource)

Interface Hierarchy

  • interface javax.swing.plaf.UIResource
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.plaf

Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

See:
Description

Interface Summary
UIResource This interface is used to mark objects created by ComponentUI delegates.

Class Summary
ActionMapUIResource | A subclass of javax.swing.ActionMap that implements UIResource.
BorderUIResource |
BorderUIResource.BevelBorderUIResource |
BorderUIResource.CompoundBorderUIResource |
BorderUIResource.EmptyBorderUIResource |
BorderUIResource.EtchedBorderUIResource |
BorderUIResource.LineBorderUIResource |
BorderUIResource.MatteBorderUIResource |
BorderUIResource.TitledBorderUIResource |
ButtonUI | Pluggable look and feel interface for JButton.
ColorChooserUI | Pluggable look and feel interface for JColorChooser.
ColorUIResource |
ComboBoxUI | Pluggable look and feel interface for JComboBox.
ComponentInputMapUIResource | A subclass of javax.swing.ComponentInputMap that implements UIResource.
ComponentUI |
DesktopIconUI | Pluggable look and feel interface for JDesktopIcon.
DesktopPaneUI | Pluggable look and feel interface for JDesktopPane.
DimensionUIResource |
FileChooserUI | Pluggable look and feel interface for JFileChooser
FontUIResource | A subclass of java.awt.Font that implements UIResource.
IconUIResource |
InputMapUIResource | A subclass of javax.swing.InputMap that implements UIResource.
InsetsUIResource |
InternalFrameUI | Pluggable look and feel interface for JInternalFrame.
LabelUI | Pluggable look and feel interface for JLabel.
ListUI | The JList pluggable look and feel delegate.
MenuBarUI | Pluggable look and feel interface for JMenuBar.
MenuItemUI | Pluggable look and feel interface for JMenuItem.
OptionPaneUI | Pluggable look and feel interface for JOptionPane.
PanelUI | Pluggable look and feel interface for Panel.
PopupMenuUI | Pluggable look and feel interface for JPopupMenu.
ProgressBarUI | Pluggable look and feel interface for JProgressBar.
RootPaneUI | Pluggable look and feel interface for JRootPane.
ScrollBarUI | Pluggable look and feel interface for JScrollBar.
ScrollPaneUI | Pluggable look and feel interface for JScrollPane.
SeparatorUI | Pluggable look and feel interface for JSeparator.
SliderUI | Pluggable look and feel interface for JSlider.
SplitPaneUI | Pluggable look and feel interface for JSplitPane.
TabbedPaneUI | Pluggable look and feel interface for JTabbedPane.
TableHeaderUI | Pluggable look and feel interface for JTableHeader.
TableUI | Pluggable look and feel interface for JTable.
TextUI | Text editor user interface
ToolBarUI | Pluggable look and feel interface for JToolBar.
ToolTipUI | Pluggable look and feel interface for JToolTip.
TreeUI | Pluggable look and feel interface for JTree.
ViewportUI | Pluggable look and feel interface for JViewport.

Package javax.swing.plaf Description

Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities. Its classes are subclassed and implemented by look-and-feel UIs like Basic and metal. This package is only used by look-and-feel developers who cannot create a new look-and-feel by subclassing existing look-and-feel components (such as Basic or metal).

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


UIResource

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Interface UIResource

All Known Implementing Classes:
ActionMapUIResource, BorderUIResource, BorderUIResource.BevelBorderUIResource, BorderUIResource.CompoundBorderUIResource, BorderUIResource.EmptyBorderUIResource, BorderUIResource.EtchedBorderUIResource, BorderUIResource.LineBorderUIResource, BorderUIResource.MatteBorderUIResource, BorderUIResource.TitledBorderUIResource, ColorUIResource, ComponentInputMapUIResource, DefaultListCellRenderer.UIResource, DefaultTableCellRenderer.UIResource, DimensionUIResource, FontUIResource, InputMapUIResource, InsetsUIResource, JScrollPane.ScrollBar, ScrollPaneLayout.UIResource, IconUIResource, DefaultMenuLayout, BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter, BasicBorders.ButtonBorder, BasicBorders.MenuBarBorder, BasicBorders.MarginBorder, BasicBorders.FieldBorder, BasicBorders.SplitPaneBorder, BasicComboBoxRenderer.UIResource, BasicComboBoxEditor.UIResource, MetalComboBoxEditor.UIResource, MetalCheckBoxIcon, MetalBorders.Flush3DBorder, MetalBorders.ButtonBorder, MetalBorders.InternalFrameBorder, MetalBorders.PaletteBorder, MetalBorders.OptionDialogBorder, MetalBorders.MenuBarBorder, MetalBorders.MenuItemBorder, MetalBorders.PopupMenuBorder, MetalBorders.ToolBarBorder, MetalBorders.ScrollPaneBorder, MetalIconFactory.PaletteCloseIcon
public interface UIResource

This interface is used to mark objects created by ComponentUI delegates. The ComponentUI.installUI() and ComponentUI.uninstallUI() methods can use this interface to decide if a properties value has been overridden. For example, the JList cellRenderer property is initialized by BasicListUI.installUI(), only if it's initial value is null:

 if (list.getCellRenderer() == null) {
     list.setCellRenderer((ListCellRenderer)(UIManager.get("List.cellRenderer")));
 }
At uninstallUI() time we reset the property to null if its value is an instance of UIResource:
 if (list.getCellRenderer() instanceof UIResource) {
     list.setCellRenderer(null);
 }
This pattern applies to all properties except the java.awt.Component properties font, foreground, and background. If one of these properties isn't initialized, or is explicitly set to null, its container provides the value. For this reason the "== null" is unreliable when installUI() is called to dynamically change a components look and feel. So at installUI() time we check to see if the current value is a UIResource:
 if (!(list.getFont() instanceof UIResource)) {
     list.setFont(UIManager.getFont("List.font"));
 }

See Also:
ComponentUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Package javax.swing.plaf

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.plaf

Packages that use javax.swing.plaf
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Classes in javax.swing.plaf used by javax.swing
ButtonUI
Pluggable look and feel interface for JButton.
ColorChooserUI
Pluggable look and feel interface for JColorChooser.
ComboBoxUI
Pluggable look and feel interface for JComboBox.
ComponentUI
DesktopIconUI
Pluggable look and feel interface for JDesktopIcon.
DesktopPaneUI
Pluggable look and feel interface for JDesktopPane.
FileChooserUI
Pluggable look and feel interface for JFileChooser
InternalFrameUI
Pluggable look and feel interface for JInternalFrame.
LabelUI
Pluggable look and feel interface for JLabel.
ListUI
The JList pluggable look and feel delegate.
MenuBarUI
Pluggable look and feel interface for JMenuBar.
MenuItemUI
Pluggable look and feel interface for JMenuItem.
OptionPaneUI
Pluggable look and feel interface for JOptionPane.
PopupMenuUI
Pluggable look and feel interface for JPopupMenu.
ProgressBarUI
Pluggable look and feel interface for JProgressBar.
RootPaneUI
Pluggable look and feel interface for JRootPane.
ScrollBarUI
Pluggable look and feel interface for JScrollBar.
ScrollPaneUI
Pluggable look and feel interface for JScrollPane.
SeparatorUI
Pluggable look and feel interface for JSeparator.
SliderUI
Pluggable look and feel interface for JSlider.
SplitPaneUI
Pluggable look and feel interface for JSplitPane.
TabbedPaneUI
Pluggable look and feel interface for JTabbedPane.
TableUI
Pluggable look and feel interface for JTable.
ToolBarUI
Pluggable look and feel interface for JToolBar.
ToolTipUI
Pluggable look and feel interface for JToolTip.
TreeUI
Pluggable look and feel interface for JTree.
UIResource
This interface is used to mark objects created by ComponentUI delegates.
ViewportUI
Pluggable look and feel interface for JViewport.

Classes in javax.swing.plaf used by javax.swing.plaf
ButtonUI
Pluggable look and feel interface for JButton.
ComponentUI
UIResource
This interface is used to mark objects created by ComponentUI delegates.

Classes in javax.swing.plaf used by javax.swing.plaf.basic
ButtonUI
Pluggable look and feel interface for JButton.
ColorChooserUI
Pluggable look and feel interface for JColorChooser.
ComboBoxUI
Pluggable look and feel interface for JComboBox.
ComponentUI
DesktopIconUI
Pluggable look and feel interface for JDesktopIcon.
DesktopPaneUI
Pluggable look and feel interface for JDesktopPane.
FileChooserUI
Pluggable look and feel interface for JFileChooser
InternalFrameUI
Pluggable look and feel interface for JInternalFrame.
LabelUI
Pluggable look and feel interface for JLabel.
ListUI
The JList pluggable look and feel delegate.
MenuBarUI
Pluggable look and feel interface for JMenuBar.
MenuItemUI
Pluggable look and feel interface for JMenuItem.
OptionPaneUI
Pluggable look and feel interface for JOptionPane.
PanelUI
Pluggable look and feel interface for Panel.
PopupMenuUI
Pluggable look and feel interface for JPopupMenu.
ProgressBarUI
Pluggable look and feel interface for JProgressBar.
RootPaneUI
Pluggable look and feel interface for JRootPane.
ScrollBarUI
Pluggable look and feel interface for JScrollBar.
ScrollPaneUI
Pluggable look and feel interface for JScrollPane.
SeparatorUI
Pluggable look and feel interface for JSeparator.
SliderUI
Pluggable look and feel interface for JSlider.
SplitPaneUI
Pluggable look and feel interface for JSplitPane.
TabbedPaneUI
Pluggable look and feel interface for JTabbedPane.
TableHeaderUI
Pluggable look and feel interface for JTableHeader.
TableUI
Pluggable look and feel interface for JTable.
TextUI
Text editor user interface
ToolBarUI
Pluggable look and feel interface for JToolBar.
ToolTipUI
Pluggable look and feel interface for JToolTip.
TreeUI
Pluggable look and feel interface for JTree.
UIResource
This interface is used to mark objects created by ComponentUI delegates.
ViewportUI
Pluggable look and feel interface for JViewport.

Classes in javax.swing.plaf used by javax.swing.plaf.metal
ButtonUI
Pluggable look and feel interface for JButton.
ColorUIResource
ComboBoxUI
Pluggable look and feel interface for JComboBox.
ComponentUI
DesktopIconUI
Pluggable look and feel interface for JDesktopIcon.
FileChooserUI
Pluggable look and feel interface for JFileChooser
FontUIResource
A subclass of java.awt.Font that implements UIResource.
InternalFrameUI
Pluggable look and feel interface for JInternalFrame.
LabelUI
Pluggable look and feel interface for JLabel.
ProgressBarUI
Pluggable look and feel interface for JProgressBar.
ScrollBarUI
Pluggable look and feel interface for JScrollBar.
ScrollPaneUI
Pluggable look and feel interface for JScrollPane.
SeparatorUI
Pluggable look and feel interface for JSeparator.
SliderUI
Pluggable look and feel interface for JSlider.
SplitPaneUI
Pluggable look and feel interface for JSplitPane.
TabbedPaneUI
Pluggable look and feel interface for JTabbedPane.
TextUI
Text editor user interface
ToolBarUI
Pluggable look and feel interface for JToolBar.
ToolTipUI
Pluggable look and feel interface for JToolTip.
TreeUI
Pluggable look and feel interface for JTree.
UIResource
This interface is used to mark objects created by ComponentUI delegates.

Classes in javax.swing.plaf used by javax.swing.plaf.multi
ButtonUI
Pluggable look and feel interface for JButton.
ColorChooserUI
Pluggable look and feel interface for JColorChooser.
ComboBoxUI
Pluggable look and feel interface for JComboBox.
ComponentUI
DesktopIconUI
Pluggable look and feel interface for JDesktopIcon.
DesktopPaneUI
Pluggable look and feel interface for JDesktopPane.
FileChooserUI
Pluggable look and feel interface for JFileChooser
InternalFrameUI
Pluggable look and feel interface for JInternalFrame.
LabelUI
Pluggable look and feel interface for JLabel.
ListUI
The JList pluggable look and feel delegate.
MenuBarUI
Pluggable look and feel interface for JMenuBar.
MenuItemUI
Pluggable look and feel interface for JMenuItem.
OptionPaneUI
Pluggable look and feel interface for JOptionPane.
PanelUI
Pluggable look and feel interface for Panel.
PopupMenuUI
Pluggable look and feel interface for JPopupMenu.
ProgressBarUI
Pluggable look and feel interface for JProgressBar.
ScrollBarUI
Pluggable look and feel interface for JScrollBar.
ScrollPaneUI
Pluggable look and feel interface for JScrollPane.
SeparatorUI
Pluggable look and feel interface for JSeparator.
SliderUI
Pluggable look and feel interface for JSlider.
SplitPaneUI
Pluggable look and feel interface for JSplitPane.
TabbedPaneUI
Pluggable look and feel interface for JTabbedPane.
TableHeaderUI
Pluggable look and feel interface for JTableHeader.
TableUI
Pluggable look and feel interface for JTable.
TextUI
Text editor user interface
ToolBarUI
Pluggable look and feel interface for JToolBar.
ToolTipUI
Pluggable look and feel interface for JToolTip.
TreeUI
Pluggable look and feel interface for JTree.
ViewportUI
Pluggable look and feel interface for JViewport.

Classes in javax.swing.plaf used by javax.swing.table
TableHeaderUI
Pluggable look and feel interface for JTableHeader.
UIResource
This interface is used to mark objects created by ComponentUI delegates.

Classes in javax.swing.plaf used by javax.swing.text
ComponentUI
TextUI
Text editor user interface

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ActionMapUIResource

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ActionMapUIResource

java.lang.Object
  |
  +--javax.swing.ActionMap
        |
        +--javax.swing.plaf.ActionMapUIResource
All Implemented Interfaces:
Serializable, UIResource
public class ActionMapUIResource
extends ActionMap
implements UIResource

A subclass of javax.swing.ActionMap that implements UIResource. UI classes which provide an ActionMap should use this class.

See Also:
Serialized Form

Constructor Summary
ActionMapUIResource()
Methods inherited from class javax.swing.ActionMap
allKeys, clear, get, getParent, keys, put, remove, setParent, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ActionMapUIResource

public ActionMapUIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.swing.plaf.basic Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.plaf.basic

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
      • class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction
      • class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction
      • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction
      • class javax.swing.plaf.basic.BasicSliderUI.ActionScroller
      • class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreePageAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
      • class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
    • class javax.swing.border.AbstractBorder (implements javax.swing.border.Border, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicBorders.ButtonBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
        • class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
      • class javax.swing.plaf.basic.BasicBorders.FieldBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.basic.BasicBorders.MarginBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.basic.BasicBorders.MenuBarBorder (implements javax.swing.plaf.UIResource)
    • class javax.swing.tree.AbstractLayoutCache.NodeDimensions
      • class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
    • class javax.swing.AbstractListModel (implements javax.swing.ListModel, java.io.Serializable)
      • class javax.swing.plaf.basic.BasicDirectoryModel (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicBorders
    • class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder (implements javax.swing.border.Border, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.basic.BasicButtonListener (implements javax.swing.event.ChangeListener, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicComboBoxEditor (implements javax.swing.ComboBoxEditor, java.awt.event.FocusListener)
      • class javax.swing.plaf.basic.BasicComboBoxEditor.UIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler (implements java.awt.event.ItemListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicComboPopup.ItemHandler (implements java.awt.event.ItemListener)
    • class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicGraphicsUtils
    • class javax.swing.plaf.basic.BasicHTML
    • class javax.swing.plaf.basic.BasicIconFactory (implements java.io.Serializable)
    • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener (implements javax.swing.event.InternalFrameListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler (implements java.awt.event.ComponentListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicListUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicListUI.ListDataHandler (implements javax.swing.event.ListDataListener)
    • class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler (implements javax.swing.event.ListSelectionListener)
    • class javax.swing.plaf.basic.BasicListUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicSliderUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicSliderUI.ScrollListener (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
      • class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
    • class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager (implements java.awt.LayoutManager2)
      • class javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout (implements java.awt.LayoutManager)
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler (implements javax.swing.event.ChangeListener)
    • class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicTableUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTableUI.KeyHandler (implements java.awt.event.KeyListener)
    • class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.DockingListener (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener (implements java.awt.event.ContainerListener)
    • class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler (implements javax.swing.event.CellEditorListener)
    • class javax.swing.plaf.basic.BasicTreeUI.FocusHandler (implements java.awt.event.FocusListener)
    • class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler (implements javax.swing.event.MouseInputListener)
    • class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler (implements java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler (implements javax.swing.event.TreeExpansionListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler (implements javax.swing.event.TreeModelListener)
    • class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler (implements javax.swing.event.TreeSelectionListener)
    • class javax.swing.BoxLayout (implements java.awt.LayoutManager2, java.io.Serializable)
      • class javax.swing.plaf.basic.DefaultMenuLayout (implements javax.swing.plaf.UIResource)
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.plaf.basic.BasicSplitPaneDivider (implements java.beans.PropertyChangeListener)
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
            • class javax.swing.JButton (implements javax.accessibility.Accessible)
              • class javax.swing.plaf.basic.BasicArrowButton (implements javax.swing.SwingConstants)
          • class javax.swing.plaf.basic.BasicInternalFrameTitlePane
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.plaf.basic.BasicComboBoxRenderer (implements javax.swing.ListCellRenderer, java.io.Serializable)
              • class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource (implements javax.swing.plaf.UIResource)
          • class javax.swing.JMenuBar (implements javax.accessibility.Accessible, javax.swing.MenuElement)
            • class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
          • class javax.swing.JPopupMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
            • class javax.swing.plaf.basic.BasicComboPopup (implements javax.swing.plaf.basic.ComboPopup)
        • class java.awt.Window (implements javax.accessibility.Accessible)
          • class javax.swing.plaf.basic.BasicToolBarUI.DragWindow
    • class java.awt.event.ComponentAdapter (implements java.awt.event.ComponentListener)
      • class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler
      • class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler (implements java.awt.event.ActionListener)
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.ButtonUI
        • class javax.swing.plaf.basic.BasicButtonUI
          • class javax.swing.plaf.basic.BasicToggleButtonUI
            • class javax.swing.plaf.basic.BasicRadioButtonUI
              • class javax.swing.plaf.basic.BasicCheckBoxUI
        • class javax.swing.plaf.MenuItemUI
          • class javax.swing.plaf.basic.BasicMenuItemUI
            • class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
            • class javax.swing.plaf.basic.BasicMenuUI
            • class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
      • class javax.swing.plaf.ColorChooserUI
        • class javax.swing.plaf.basic.BasicColorChooserUI
      • class javax.swing.plaf.ComboBoxUI
        • class javax.swing.plaf.basic.BasicComboBoxUI
      • class javax.swing.plaf.DesktopIconUI
        • class javax.swing.plaf.basic.BasicDesktopIconUI
      • class javax.swing.plaf.DesktopPaneUI
        • class javax.swing.plaf.basic.BasicDesktopPaneUI
      • class javax.swing.plaf.FileChooserUI
        • class javax.swing.plaf.basic.BasicFileChooserUI
      • class javax.swing.plaf.InternalFrameUI
        • class javax.swing.plaf.basic.BasicInternalFrameUI
      • class javax.swing.plaf.LabelUI
        • class javax.swing.plaf.basic.BasicLabelUI (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.ListUI
        • class javax.swing.plaf.basic.BasicListUI
      • class javax.swing.plaf.MenuBarUI
        • class javax.swing.plaf.basic.BasicMenuBarUI
      • class javax.swing.plaf.OptionPaneUI
        • class javax.swing.plaf.basic.BasicOptionPaneUI
      • class javax.swing.plaf.PanelUI
        • class javax.swing.plaf.basic.BasicPanelUI
      • class javax.swing.plaf.PopupMenuUI
        • class javax.swing.plaf.basic.BasicPopupMenuUI
      • class javax.swing.plaf.ProgressBarUI
        • class javax.swing.plaf.basic.BasicProgressBarUI
      • class javax.swing.plaf.RootPaneUI
        • class javax.swing.plaf.basic.BasicRootPaneUI (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.ScrollBarUI
        • class javax.swing.plaf.basic.BasicScrollBarUI (implements java.awt.LayoutManager, javax.swing.SwingConstants)
      • class javax.swing.plaf.ScrollPaneUI
        • class javax.swing.plaf.basic.BasicScrollPaneUI (implements javax.swing.ScrollPaneConstants)
      • class javax.swing.plaf.SeparatorUI
        • class javax.swing.plaf.basic.BasicSeparatorUI
          • class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
          • class javax.swing.plaf.basic.BasicToolBarSeparatorUI
      • class javax.swing.plaf.SliderUI
        • class javax.swing.plaf.basic.BasicSliderUI
      • class javax.swing.plaf.SplitPaneUI
        • class javax.swing.plaf.basic.BasicSplitPaneUI
      • class javax.swing.plaf.TabbedPaneUI
        • class javax.swing.plaf.basic.BasicTabbedPaneUI (implements javax.swing.SwingConstants)
      • class javax.swing.plaf.TableHeaderUI
        • class javax.swing.plaf.basic.BasicTableHeaderUI
      • class javax.swing.plaf.TableUI
        • class javax.swing.plaf.basic.BasicTableUI
      • class javax.swing.plaf.TextUI
        • class javax.swing.plaf.basic.BasicTextUI (implements javax.swing.text.ViewFactory)
          • class javax.swing.plaf.basic.BasicEditorPaneUI
            • class javax.swing.plaf.basic.BasicTextPaneUI
          • class javax.swing.plaf.basic.BasicTextAreaUI
          • class javax.swing.plaf.basic.BasicTextFieldUI
            • class javax.swing.plaf.basic.BasicPasswordFieldUI
      • class javax.swing.plaf.ToolBarUI
        • class javax.swing.plaf.basic.BasicToolBarUI (implements javax.swing.SwingConstants)
      • class javax.swing.plaf.ToolTipUI
        • class javax.swing.plaf.basic.BasicToolTipUI
      • class javax.swing.plaf.TreeUI
        • class javax.swing.plaf.basic.BasicTreeUI
      • class javax.swing.plaf.ViewportUI
        • class javax.swing.plaf.basic.BasicViewportUI
    • class javax.swing.filechooser.FileFilter
      • class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter
    • class javax.swing.filechooser.FileView
      • class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
    • class java.awt.event.FocusAdapter (implements java.awt.event.FocusListener)
      • class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler
      • class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
    • class java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
      • class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler
      • class javax.swing.plaf.basic.BasicTreeUI.KeyHandler
    • class javax.swing.text.LayeredHighlighter (implements javax.swing.text.Highlighter)
      • class javax.swing.text.DefaultHighlighter
        • class javax.swing.plaf.basic.BasicTextUI.BasicHighlighter (implements javax.swing.plaf.UIResource)
    • class javax.swing.LookAndFeel
      • class javax.swing.plaf.basic.BasicLookAndFeel (implements java.io.Serializable)
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler
      • class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler
      • class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener
      • class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener
      • class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler
      • class javax.swing.plaf.basic.BasicTreeUI.MouseHandler
    • class javax.swing.event.MouseInputAdapter (implements javax.swing.event.MouseInputListener)
      • class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler
      • class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener (implements javax.swing.SwingConstants)
      • class javax.swing.plaf.basic.BasicSliderUI.TrackListener
    • class java.awt.event.MouseMotionAdapter (implements java.awt.event.MouseMotionListener)
      • class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler
      • class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler
    • class java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Rectangle2D
        • class java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
          • class javax.swing.text.DefaultCaret (implements javax.swing.text.Caret, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener)
            • class javax.swing.plaf.basic.BasicTextUI.BasicCaret (implements javax.swing.plaf.UIResource)
    • class java.awt.event.WindowAdapter (implements java.awt.event.WindowListener)
      • class javax.swing.plaf.basic.BasicToolBarUI.FrameListener

Interface Hierarchy

  • interface javax.swing.plaf.basic.ComboPopup
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.plaf.basic

Provides user interface objects built according to the Basic look-and-feel.

See:
Description

Interface Summary
ComboPopup The interface which defines the kind of popup menu that BasicComboBoxUI requires.

Class Summary
BasicArrowButton | JButton object that draws a scaled Arrow in one of the cardinal directions.
BasicBorders | Factory object that can vend Borders appropriate for the basic L & F.
BasicBorders.ButtonBorder |
BasicBorders.FieldBorder |
BasicBorders.MarginBorder |
BasicBorders.MenuBarBorder |
BasicBorders.RadioButtonBorder |
BasicBorders.SplitPaneBorder | Draws the border around the splitpane.
BasicBorders.ToggleButtonBorder |
BasicButtonListener | Button Listener
BasicButtonUI | BasicButton implementation
BasicCheckBoxMenuItemUI | BasicCheckboxMenuItem implementation
BasicCheckBoxUI | CheckboxUI implementation for BasicCheckboxUI
BasicColorChooserUI | Provides the basic look and feel for a JColorChooser.
BasicComboBoxEditor | The default editor for editable combo boxes
BasicComboBoxEditor.UIResource | A subclass of BasicComboBoxEditor that implements UIResource.
BasicComboBoxRenderer | ComboBox renderer
BasicComboBoxRenderer.UIResource | A subclass of BasicComboBoxRenderer that implements UIResource.
BasicComboBoxUI | Basic UI for JComboBox.
BasicComboPopup | This is an implementation of the ComboPopup interface.
BasicDesktopIconUI | Basic L&F for a minimized window on a desktop.
BasicDesktopPaneUI | Basic L&F for a desktop.
BasicDirectoryModel | Basic implementation of a file list.
BasicEditorPaneUI | Provides the look and feel for a JEditorPane.
BasicFileChooserUI | Basic L&F implementation of a FileChooser.
BasicGraphicsUtils |
BasicHTML | Support for providing html views for the swing components.
BasicIconFactory | Factory object that can vend Icons appropriate for the basic L & F.
BasicInternalFrameTitlePane | The class that manages a basic title bar
BasicInternalFrameUI | A basic L&F implementation of JInternalFrame.
BasicLabelUI | A Windows L&F implementation of LabelUI.
BasicListUI | A Windows L&F implementation of ListUI.
BasicLookAndFeel | Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.
BasicMenuBarUI | A default L&F implementation of MenuBarUI.
BasicMenuItemUI | BasicMenuItem implementation
BasicMenuUI | A default L&F implementation of MenuUI.
BasicOptionPaneUI | Provides the basic look and feel for a JOptionPane.
BasicOptionPaneUI.ButtonAreaLayout | ButtonAreaLayout acts similiar to FlowLayout.
BasicPanelUI | BasicPanel implementation
BasicPasswordFieldUI | Provides the Windows look and feel for a password field.
BasicPopupMenuSeparatorUI | A Basic L&F implementation of PopupMenuSeparatorUI.
BasicPopupMenuUI | A Windows L&F implementation of PopupMenuUI.
BasicProgressBarUI | A Basic L&F implementation of ProgressBarUI.
BasicRadioButtonMenuItemUI | BasicRadioButtonMenuItem implementation
BasicRadioButtonUI | RadioButtonUI implementation for BasicRadioButtonUI
BasicRootPaneUI | Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
BasicScrollBarUI | Implementation of ScrollBarUI for the Basic Look and Feel
BasicScrollPaneUI | A default L&F implementation of ScrollPaneUI.
BasicSeparatorUI | A Basic L&F implementation of SeparatorUI.
BasicSliderUI | A Basic L&F implementation of SliderUI.
BasicSplitPaneDivider | Divider used by BasicSplitPaneUI.
BasicSplitPaneUI | A Basic L&F implementation of the SplitPaneUI.
BasicTabbedPaneUI | A Basic L&F implementation of TabbedPaneUI.
BasicTableHeaderUI | BasicTableHeaderUI implementation
BasicTableUI | BasicTableUI implementation
BasicTextAreaUI | Provides the look and feel for a plain text editor.
BasicTextFieldUI | Basis of a look and feel for a JTextField.
BasicTextPaneUI | Provides the look and feel for a styled text editor.
BasicTextUI | Basis of a text components look-and-feel.
BasicTextUI.BasicCaret |
BasicTextUI.BasicHighlighter |
BasicToggleButtonUI | BasicToggleButton implementation
BasicToolBarSeparatorUI | A Basic L&F implementation of ToolBarSeparatorUI.
BasicToolBarUI | A Basic L&F implementation of ToolBarUI.
BasicToolTipUI | Standard tool tip L&F.
BasicTreeUI | The basic L&F for a hierarchical data structure.
BasicViewportUI | BasicViewport implementation
DefaultMenuLayout | The default layout manager for Popup menus and menubars.

Package javax.swing.plaf.basic Description

Provides user interface objects built according to the Basic look-and-feel. The Basic look-and-feel is the default look and feel of Swing components. It contains components, layout managers, events, event listeners and adapters. You can subclass the classes in this package to create your own customized look-and-feel.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.plaf.basic

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.plaf.basic

Packages that use javax.swing.plaf.basic
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Classes in javax.swing.plaf.basic used by javax.swing.plaf.basic
BasicBorders.ButtonBorder
BasicButtonListener
Button Listener
BasicButtonUI
BasicButton implementation
BasicColorChooserUI
Provides the basic look and feel for a JColorChooser.
BasicComboBoxEditor
The default editor for editable combo boxes
BasicComboBoxRenderer
ComboBox renderer
BasicComboBoxUI
Basic UI for JComboBox.
BasicComboPopup
This is an implementation of the ComboPopup interface.
BasicDesktopIconUI
Basic L&F for a minimized window on a desktop.
BasicDesktopPaneUI
Basic L&F for a desktop.
BasicDirectoryModel
Basic implementation of a file list.
BasicEditorPaneUI
Provides the look and feel for a JEditorPane.
BasicFileChooserUI
Basic L&F implementation of a FileChooser.
BasicInternalFrameTitlePane
The class that manages a basic title bar
BasicInternalFrameUI
A basic L&F implementation of JInternalFrame.
BasicLabelUI
A Windows L&F implementation of LabelUI.
BasicListUI
A Windows L&F implementation of ListUI.
BasicMenuItemUI
BasicMenuItem implementation
BasicMenuUI
A default L&F implementation of MenuUI.
BasicOptionPaneUI
Provides the basic look and feel for a JOptionPane.
BasicProgressBarUI
A Basic L&F implementation of ProgressBarUI.
BasicRadioButtonUI
RadioButtonUI implementation for BasicRadioButtonUI
BasicScrollBarUI
Implementation of ScrollBarUI for the Basic Look and Feel
BasicScrollBarUI.ArrowButtonListener
Listener for cursor keys.
BasicScrollBarUI.ModelListener
A listener to listen for model changes.
BasicScrollBarUI.ScrollListener
Listener for scrolling events intiated in the ScrollPane.
BasicScrollBarUI.TrackListener
Track mouse drags.
BasicScrollPaneUI
A default L&F implementation of ScrollPaneUI.
BasicSeparatorUI
A Basic L&F implementation of SeparatorUI.
BasicSliderUI
A Basic L&F implementation of SliderUI.
BasicSliderUI.ScrollListener
Scroll-event listener.
BasicSliderUI.TrackListener
Track mouse movements.
BasicSplitPaneDivider
Divider used by BasicSplitPaneUI.
BasicSplitPaneDivider.DragController
Handles the events during a dragging session for a HORIZONTAL_SPLIT orientated split pane.
BasicSplitPaneDivider.MouseHandler
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
BasicSplitPaneUI
A Basic L&F implementation of the SplitPaneUI.
BasicSplitPaneUI.BasicHorizontalLayoutManager
LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
BasicTabbedPaneUI
A Basic L&F implementation of TabbedPaneUI.
BasicTableHeaderUI
BasicTableHeaderUI implementation
BasicTableUI
BasicTableUI implementation
BasicTextFieldUI
Basis of a look and feel for a JTextField.
BasicTextUI
Basis of a text components look-and-feel.
BasicToggleButtonUI
BasicToggleButton implementation
BasicToolBarUI
A Basic L&F implementation of ToolBarUI.
BasicToolBarUI.DragWindow
BasicTreeUI
The basic L&F for a hierarchical data structure.
ComboPopup
The interface which defines the kind of popup menu that BasicComboBoxUI requires.

Classes in javax.swing.plaf.basic used by javax.swing.plaf.metal
BasicArrowButton
JButton object that draws a scaled Arrow in one of the cardinal directions.
BasicButtonListener
Button Listener
BasicButtonUI
BasicButton implementation
BasicComboBoxEditor
The default editor for editable combo boxes
BasicComboBoxUI
Basic UI for JComboBox.
BasicComboBoxUI.ComboBoxLayoutManager
This layout manager handles the 'standard' layout of combo boxes.
BasicComboBoxUI.PropertyChangeHandler
This listener watches for bound properties that have changed in the JComboBox.
BasicComboPopup
This is an implementation of the ComboPopup interface.
BasicDesktopIconUI
Basic L&F for a minimized window on a desktop.
BasicFileChooserUI
Basic L&F implementation of a FileChooser.
BasicInternalFrameTitlePane
The class that manages a basic title bar
BasicInternalFrameUI
A basic L&F implementation of JInternalFrame.
BasicLabelUI
A Windows L&F implementation of LabelUI.
BasicLookAndFeel
Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived.
BasicProgressBarUI
A Basic L&F implementation of ProgressBarUI.
BasicRadioButtonUI
RadioButtonUI implementation for BasicRadioButtonUI
BasicScrollBarUI
Implementation of ScrollBarUI for the Basic Look and Feel
BasicScrollPaneUI
A default L&F implementation of ScrollPaneUI.
BasicSeparatorUI
A Basic L&F implementation of SeparatorUI.
BasicSliderUI
A Basic L&F implementation of SliderUI.
BasicSliderUI.PropertyChangeHandler
BasicSplitPaneDivider
Divider used by BasicSplitPaneUI.
BasicSplitPaneUI
A Basic L&F implementation of the SplitPaneUI.
BasicTabbedPaneUI
A Basic L&F implementation of TabbedPaneUI.
BasicTabbedPaneUI.TabbedPaneLayout
This inner class is marked "public" due to a compiler bug.
BasicTextFieldUI
Basis of a look and feel for a JTextField.
BasicTextUI
Basis of a text components look-and-feel.
BasicToggleButtonUI
BasicToggleButton implementation
BasicToolBarUI
A Basic L&F implementation of ToolBarUI.
BasicToolBarUI.DockingListener
This inner class is marked "public" due to a compiler bug.
BasicToolTipUI
Standard tool tip L&F.
BasicTreeUI
The basic L&F for a hierarchical data structure.
ComboPopup
The interface which defines the kind of popup menu that BasicComboBoxUI requires.

Classes in javax.swing.plaf.basic used by javax.swing.text
BasicTextUI
Basis of a text components look-and-feel.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AcceptAllFileFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.AcceptAllFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.AcceptAllFileFilter
extends FileFilter

Constructor Summary
BasicFileChooserUI.AcceptAllFileFilter()
Method Summary
boolean | accept(File f) Whether the given file is accepted by this filter.
String | getDescription() The description of this filter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.AcceptAllFileFilter

public BasicFileChooserUI.AcceptAllFileFilter()
Method Detail

accept

public boolean accept(File f)
Description copied from class: FileFilter
Whether the given file is accepted by this filter.
Overrides:
accept in class FileFilter

getDescription

public String getDescription()
Description copied from class: FileFilter
The description of this filter. For example: "JPG and GIF Images"
Overrides:
getDescription in class FileFilter
Following copied from class: javax.swing.filechooser.FileFilter
See Also:
FileView.getName(java.io.File)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ActionScroller

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.ActionScroller

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicSliderUI.ActionScroller
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicSliderUI
public class BasicSliderUI.ActionScroller
extends AbstractAction

As of Java 2 platform v1.3 this undocumented class is no longer used. The recommended approach to creating bindings is to use a combination of an ActionMap, to contain the action, and an InputMap to contain the mapping from KeyStroke to action description. The InputMap is is usually described in the LookAndFeel tables.

Please refer to the key bindings specification for further details.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicSliderUI.ActionScroller(JSlider slider, int dir, boolean block)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.ActionScroller

public BasicSliderUI.ActionScroller(JSlider slider,
                                    int dir,
                                    boolean block)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ApproveSelectionAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.ApproveSelectionAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.ApproveSelectionAction
extends AbstractAction

Responds to an Open or Save request

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.ApproveSelectionAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.ApproveSelectionAction

protected BasicFileChooserUI.ApproveSelectionAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArrowButtonListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI.ArrowButtonListener

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicScrollBarUI
protected class BasicScrollBarUI.ArrowButtonListener
extends MouseAdapter

Listener for cursor keys.

Constructor Summary
protected BasicScrollBarUI.ArrowButtonListener()
Method Summary
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollBarUI.ArrowButtonListener

protected BasicScrollBarUI.ArrowButtonListener()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicArrowButton

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicArrowButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
                                |
                                +--javax.swing.plaf.basic.BasicArrowButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
MetalScrollButton
public class BasicArrowButton
extends JButton
implements SwingConstants

JButton object that draws a scaled Arrow in one of the cardinal directions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JButton
JButton.AccessibleJButton
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  int direction
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicArrowButton(int direction)
Method Summary
int | getDirection()
Dimension | getMaximumSize() If the maximum size has been set to a non-null value just returns it.
Dimension | getMinimumSize() If the minimum size has been set to a non-null value just returns it.
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it.
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
void | paint(Graphics g) This method is invoked by Swing to draw components.
void | paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
void | setDirection(int dir)
Methods inherited from class javax.swing.JButton
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

direction

protected int direction
Constructor Detail

BasicArrowButton

public BasicArrowButton(int direction)
Method Detail

getDirection

public int getDirection()

setDirection

public void setDirection(int dir)

paint

public void paint(Graphics g)
Description copied from class: JComponent
This method is invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

Overrides:
paint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics),
JComponent.paintBorder(java.awt.Graphics),
JComponent.paintChildren(java.awt.Graphics),
JComponent.getComponentGraphics(java.awt.Graphics),
JComponent.repaint(long, int, int, int, int)

getPreferredSize

public Dimension getPreferredSize()
Description copied from class: JComponent
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getPreferredSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the preferredSize property
See Also:
JComponent.setPreferredSize(java.awt.Dimension)

getMinimumSize

public Dimension getMinimumSize()
Description copied from class: JComponent
If the minimum size has been set to a non-null value just returns it. If the UI delegate's getMinimumSize() method returns a non-null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMinimumSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the minimumSize property
See Also:
JComponent.setMinimumSize(java.awt.Dimension)

getMaximumSize

public Dimension getMaximumSize()
Description copied from class: JComponent
If the maximum size has been set to a non-null value just returns it. If the UI delegate's getMaximumSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMaximumSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the maximumSize property.
See Also:
JComponent.setMaximumSize(java.awt.Dimension)

isFocusTraversable

public boolean isFocusTraversable()
Description copied from class: AbstractButton
Identifies whether or not this component can receive the focus.
Overrides:
isFocusTraversable in class AbstractButton
Following copied from class: javax.swing.AbstractButton
Returns:
true if this component can receive the focus

paintTriangle

public void paintTriangle(Graphics g,
                          int x,
                          int y,
                          int size,
                          int direction,
                          boolean isEnabled)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BasicBorders

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicBorders
public class BasicBorders
extends Object

Factory object that can vend Borders appropriate for the basic L & F.

Inner Class Summary
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.SplitPaneBorder Draws the border around the splitpane.
static class | BasicBorders.ToggleButtonBorder
Constructor Summary
BasicBorders()
Method Summary
static Border | getButtonBorder()
static Border | getInternalFrameBorder()
static Border | getMenuBarBorder()
static Border | getProgressBarBorder()
static Border | getRadioButtonBorder()
static Border | getSplitPaneBorder()
static Border | getSplitPaneDividerBorder() Returns a border instance for a JSplitPane divider
static Border | getTextFieldBorder()
static Border | getToggleButtonBorder()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicBorders

public BasicBorders()
Method Detail

getButtonBorder

public static Border getButtonBorder()

getRadioButtonBorder

public static Border getRadioButtonBorder()

getToggleButtonBorder

public static Border getToggleButtonBorder()

getMenuBarBorder

public static Border getMenuBarBorder()

getSplitPaneBorder

public static Border getSplitPaneBorder()

getSplitPaneDividerBorder

public static Border getSplitPaneDividerBorder()
Returns a border instance for a JSplitPane divider
Since:
1.3

getTextFieldBorder

public static Border getTextFieldBorder()

getProgressBarBorder

public static Border getProgressBarBorder()

getInternalFrameBorder

public static Border getInternalFrameBorder()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicButtonListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicButtonListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicButtonListener
All Implemented Interfaces:
ChangeListener, EventListener, FocusListener, MouseListener, MouseMotionListener, PropertyChangeListener
public class BasicButtonListener
extends Object
implements MouseListener, MouseMotionListener, FocusListener, ChangeListener, PropertyChangeListener

Button Listener

Constructor Summary
BasicButtonListener(AbstractButton b)
Method Summary
protected void | checkOpacity(AbstractButton b)
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
void | installKeyboardActions(JComponent c) Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void | propertyChange(PropertyChangeEvent e) This method gets called when a bound property is changed.
void | stateChanged(ChangeEvent e) Invoked when the target of the listener has changed its state.
void | uninstallKeyboardActions(JComponent c) Unregister's default key actions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicButtonListener

public BasicButtonListener(AbstractButton b)
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

checkOpacity

protected void checkOpacity(AbstractButton b)

installKeyboardActions

public void installKeyboardActions(JComponent c)
Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).

uninstallKeyboardActions

public void uninstallKeyboardActions(JComponent c)
Unregister's default key actions

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
Direct Known Subclasses:
BasicToggleButtonUI, MetalButtonUI
public class BasicButtonUI
extends ButtonUI

BasicButton implementation

Field Summary
protected int | defaultTextIconGap
protected int | defaultTextShiftOffset
Constructor Summary
BasicButtonUI()
Method Summary
protected void | clearTextShiftOffset()
protected BasicButtonListener | createButtonListener(AbstractButton b)
static ComponentUI | createUI(JComponent c)
int | getDefaultTextIconGap(AbstractButton b)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected String | getPropertyPrefix()
protected int | getTextShiftOffset()
protected void | installDefaults(AbstractButton b)
protected void | installKeyboardActions(AbstractButton b)
protected void | installListeners(AbstractButton b)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
protected void | paintButtonPressed(Graphics g, AbstractButton b)
protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | paintIcon(Graphics g, JComponent c, Rectangle iconRect)
protected void | paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void | setTextShiftOffset()
protected void | uninstallDefaults(AbstractButton b)
protected void | uninstallKeyboardActions(AbstractButton b)
protected void | uninstallListeners(AbstractButton b)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

defaultTextIconGap

protected int defaultTextIconGap

defaultTextShiftOffset

protected int defaultTextShiftOffset
Constructor Detail

BasicButtonUI

public BasicButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

getPropertyPrefix

protected String getPropertyPrefix()

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults(AbstractButton b)

installListeners

protected void installListeners(AbstractButton b)

installKeyboardActions

protected void installKeyboardActions(AbstractButton b)

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallKeyboardActions

protected void uninstallKeyboardActions(AbstractButton b)

uninstallListeners

protected void uninstallListeners(AbstractButton b)

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)

createButtonListener

protected BasicButtonListener createButtonListener(AbstractButton b)

getDefaultTextIconGap

public int getDefaultTextIconGap(AbstractButton b)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

paintIcon

protected void paintIcon(Graphics g,
                         JComponent c,
                         Rectangle iconRect)

paintText

protected void paintText(Graphics g,
                         JComponent c,
                         Rectangle textRect,
                         String text)

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)

clearTextShiftOffset

protected void clearTextShiftOffset()

setTextShiftOffset

protected void setTextShiftOffset()

getTextShiftOffset

protected int getTextShiftOffset()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicCaret

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextUI.BasicCaret

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.Rectangle
                    |
                    +--javax.swing.text.DefaultCaret
                          |
                          +--javax.swing.plaf.basic.BasicTextUI.BasicCaret
All Implemented Interfaces:
Caret, Cloneable, EventListener, FocusListener, MouseListener, MouseMotionListener, Serializable, Shape, UIResource
Enclosing class:
BasicTextUI
public static class BasicTextUI.BasicCaret
extends DefaultCaret
implements UIResource

See Also:
Serialized Form

Inner classes inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
Fields inherited from class javax.swing.text.DefaultCaret
changeEvent, listenerList
Fields inherited from class java.awt.Rectangle
height, width, x, y
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor Summary
BasicTextUI.BasicCaret()
Methods inherited from class javax.swing.text.DefaultCaret
addChangeListener, adjustVisibility, damage, deinstall, equals, fireStateChanged, focusGained, focusLost, getBlinkRate, getComponent, getDot, getListeners, getMagicCaretPosition, getMark, getSelectionPainter, install, isSelectionVisible, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveCaret, moveDot, paint, positionCaret, removeChangeListener, repaint, setBlinkRate, setDot, setMagicCaretPosition, setSelectionVisible, setVisible, toString
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects

Constructor Detail

BasicTextUI.BasicCaret

public BasicTextUI.BasicCaret()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicCheckBoxMenuItemUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicCheckBoxMenuItemUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
                    |
                    +--javax.swing.plaf.basic.BasicMenuItemUI
                          |
                          +--javax.swing.plaf.basic.BasicCheckBoxMenuItemUI
public class BasicCheckBoxMenuItemUI
extends BasicMenuItemUI

BasicCheckboxMenuItem implementation

Inner classes inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
Constructor Summary
BasicCheckBoxMenuItemUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected String | getPropertyPrefix()
protected void | installDefaults()
void | processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, getMaximumSize, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installKeyboardActions, installListeners, installUI, paint, paintMenuItem, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicCheckBoxMenuItemUI

public BasicCheckBoxMenuItemUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicMenuItemUI

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicMenuItemUI

processMouseEvent

public void processMouseEvent(JMenuItem item,
                              MouseEvent e,
                              MenuElement[] path,
                              MenuSelectionManager manager)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicCheckBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicCheckBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
                          |
                          +--javax.swing.plaf.basic.BasicRadioButtonUI
                                |
                                +--javax.swing.plaf.basic.BasicCheckBoxUI
public class BasicCheckBoxUI
extends BasicRadioButtonUI

CheckboxUI implementation for BasicCheckboxUI

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
BasicCheckBoxUI()
Method Summary
static ComponentUI | createUI(JComponent b)
String | getPropertyPrefix()
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultIcon, getPreferredSize, installDefaults, paint, paintFocus, uninstallDefaults
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
paintButtonPressed, paintFocus, paintIcon, paintText
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicCheckBoxUI

public BasicCheckBoxUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

getPropertyPrefix

public String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicRadioButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicColorChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicColorChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ColorChooserUI
              |
              +--javax.swing.plaf.basic.BasicColorChooserUI
public class BasicColorChooserUI
extends ColorChooserUI

Provides the basic look and feel for a JColorChooser.

Inner Class Summary
 class BasicColorChooserUI.PropertyHandler
This inner class is marked "public" due to a compiler bug.
Field Summary
protected AbstractColorChooserPanel[] | defaultChoosers
protected ChangeListener | previewListener
protected PropertyChangeListener | propertyChangeListener
Constructor Summary
BasicColorChooserUI()
Method Summary
protected AbstractColorChooserPanel[] | createDefaultChoosers()
protected PropertyChangeListener | createPropertyChangeListener()
static ComponentUI | createUI(JComponent c)
protected void | installDefaults()
protected void | installListeners()
protected void | installPreviewPanel()
void | installUI(JComponent c)
protected void | uninstallDefaultChoosers()
protected void | uninstallDefaults()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

defaultChoosers

protected AbstractColorChooserPanel[] defaultChoosers

previewListener

protected ChangeListener previewListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Constructor Detail

BasicColorChooserUI

public BasicColorChooserUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

createDefaultChoosers

protected AbstractColorChooserPanel[] createDefaultChoosers()

uninstallDefaultChoosers

protected void uninstallDefaultChoosers()

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installPreviewPanel

protected void installPreviewPanel()

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installListeners

protected void installListeners()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

uninstallListeners

protected void uninstallListeners()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicComboBoxEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxEditor

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxEditor
All Implemented Interfaces:
ComboBoxEditor, EventListener, FocusListener
Direct Known Subclasses:
BasicComboBoxEditor.UIResource, MetalComboBoxEditor
public class BasicComboBoxEditor
extends Object
implements ComboBoxEditor, FocusListener

The default editor for editable combo boxes

Inner Class Summary
static class BasicComboBoxEditor.UIResource
A subclass of BasicComboBoxEditor that implements UIResource.
Field Summary
protected  JTextField editor
Constructor Summary
BasicComboBoxEditor()
Method Summary
void | addActionListener(ActionListener l) Add an ActionListener.
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Component | getEditorComponent() Return the component that should be added to the tree hierarchy for this editor
Object | getItem() Return the edited item
void | removeActionListener(ActionListener l) Remove an ActionListener
void | selectAll() Ask the editor to start editing and to select everything
void | setItem(Object anObject) Set the item that should be edited.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

editor

protected JTextField editor
Constructor Detail

BasicComboBoxEditor

public BasicComboBoxEditor()
Method Detail

getEditorComponent

public Component getEditorComponent()
Description copied from interface: ComboBoxEditor
Return the component that should be added to the tree hierarchy for this editor
Specified by:
getEditorComponent in interface ComboBoxEditor

setItem

public void setItem(Object anObject)
Description copied from interface: ComboBoxEditor
Set the item that should be edited. Cancel any editing if necessary
Specified by:
setItem in interface ComboBoxEditor

getItem

public Object getItem()
Description copied from interface: ComboBoxEditor
Return the edited item
Specified by:
getItem in interface ComboBoxEditor

selectAll

public void selectAll()
Description copied from interface: ComboBoxEditor
Ask the editor to start editing and to select everything
Specified by:
selectAll in interface ComboBoxEditor

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener

addActionListener

public void addActionListener(ActionListener l)
Description copied from interface: ComboBoxEditor
Add an ActionListener. An action event is generated when the edited item changes
Specified by:
addActionListener in interface ComboBoxEditor

removeActionListener

public void removeActionListener(ActionListener l)
Description copied from interface: ComboBoxEditor
Remove an ActionListener
Specified by:
removeActionListener in interface ComboBoxEditor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicComboBoxRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.plaf.basic.BasicComboBoxRenderer
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
BasicComboBoxRenderer.UIResource
public class BasicComboBoxRenderer
extends JLabel
implements ListCellRenderer, Serializable

ComboBox renderer

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
static class BasicComboBoxRenderer.UIResource
A subclass of BasicComboBoxRenderer that implements UIResource.
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected static Border noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicComboBoxRenderer()
Method Summary
Component | getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) Return a component that has been configured to display the specified value.
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it.
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

noFocusBorder

protected static Border noFocusBorder
Constructor Detail

BasicComboBoxRenderer

public BasicComboBoxRenderer()
Method Detail

getPreferredSize

public Dimension getPreferredSize()
Description copied from class: JComponent
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getPreferredSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the preferredSize property
See Also:
JComponent.setPreferredSize(java.awt.Dimension)

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Description copied from interface: ListCellRenderer
Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.
Specified by:
getListCellRendererComponent in interface ListCellRenderer
Following copied from interface: javax.swing.ListCellRenderer
Parameters:
list - The JList we're painting.
value - The value returned by list.getModel().getElementAt(index).
index - The cells index.
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.
Returns:
A component whose paint() method will render the specified value.
See Also:
JList, ListSelectionModel, ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicComboBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ComboBoxUI
              |
              +--javax.swing.plaf.basic.BasicComboBoxUI
Direct Known Subclasses:
MetalComboBoxUI
public class BasicComboBoxUI
extends ComboBoxUI

Basic UI for JComboBox. This class adds and removes components from the JComboBox. The arrow button and the editor are managed by this object. The popup menu is handled by BasicComboPopup. BasicComboPopup supplies this class with a MouseListener, MouseMotionListener, and a KeyListener. These listeners are added to the arrow button and the JComboBox by default. Subclasses of BasicComboBoxUI should attach the listeners to whichever components they like. installListeners() is where listeners get added to the JComboBox (and model). configureEditor() is where listeners get added to the editor. configureArrowButton() is where listeners get added to the arrow button. Inner classes for handling events: FocusHandler ItemHandler ListDataHandler PropertyChangeHandler KeyHandler

Inner Class Summary
class | BasicComboBoxUI.ComboBoxLayoutManager This layout manager handles the 'standard' layout of combo boxes.
class | BasicComboBoxUI.FocusHandler This listener hides the popup when the focus is lost.
class | BasicComboBoxUI.ItemHandler This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.
class | BasicComboBoxUI.KeyHandler This listener checks to see if the key event isn't a navigation key.
class | BasicComboBoxUI.ListDataHandler This listener watches for changes in the data and revalidates.
class | BasicComboBoxUI.PropertyChangeHandler This listener watches for bound properties that have changed in the JComboBox.
Field Summary
protected JButton | arrowButton
protected Dimension | cachedMinimumSize
protected JComboBox | comboBox
protected CellRendererPane | currentValuePane
protected Component | editor
protected FocusListener | focusListener
protected boolean | hasFocus
protected boolean | isMinimumSizeDirty
protected ItemListener | itemListener
protected KeyListener | keyListener
protected JList | listBox
protected ListDataListener | listDataListener
protected ComboPopup | popup
protected KeyListener | popupKeyListener
protected MouseListener | popupMouseListener
protected MouseMotionListener | popupMouseMotionListener
protected PropertyChangeListener | propertyChangeListener
Constructor Summary
BasicComboBoxUI()
Method Summary
void | addEditor() Adds the editor to the JComboBox.
void | configureArrowButton() Configures the arrow button by adding listeners.
protected void | configureEditor() Configures the editor by setting its font and adding listeners.
protected JButton | createArrowButton() Creates the arrow button.
protected ComboBoxEditor | createEditor() Creates the editor that is to be used in editable combo boxes.
protected FocusListener | createFocusListener() Creates the focus listener that hides the popup when the focus is lost.
protected ItemListener | createItemListener() Creates the item listener that watches for updates in the current selection so that it can update the display.
protected KeyListener | createKeyListener() Creates the key listener for handling type-ahead.
protected LayoutManager | createLayoutManager() Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left.
protected ListDataListener | createListDataListener() Creates the list data listener that is used for caching the preferred sizes.
protected ComboPopup | createPopup() Creates an implementation of the ComboPopup interface.
protected PropertyChangeListener | createPropertyChangeListener() Creates the list data listener that is used for caching the preferred sizes.
protected ListCellRenderer | createRenderer() Creates the renderer that is to be used in the combo box.
static ComponentUI | createUI(JComponent c)
Accessible | getAccessibleChild(JComponent c, int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount(JComponent c) Returns the number of accessible children in the object.
protected Dimension | getDefaultSize() Return the default size of an empty combo box.
protected Dimension | getDisplaySize()
protected Insets | getInsets() Gets the insets from the JComboBox.
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installComponents() The editor and arrow button are added to the JComboBox here.
protected void | installDefaults() Installs the default colors, default font, default renderer, and default editor into the JComboBox.
protected void | installKeyboardActions() Adds keyboard actions to the JComboBox.
protected void | installListeners() Attaches listeners to the JComboBox and JComboBoxModel.
void | installUI(JComponent c)
boolean | isFocusTraversable(JComboBox c) Determines if the JComboBox is focus traversable.
protected boolean | isNavigationKey(int keyCode) Returns whether or not the supplied keyCode maps to a key that is used for navigation.
boolean | isPopupVisible(JComboBox c) Tells if the popup is visible or not.
void | paint(Graphics g, JComponent c)
void | paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) Paints the currently selected item.
void | paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) Paints the background of the currently selected item.
protected Rectangle | rectangleForCurrentValue() Returns the area that is reserved for drawing the currently selected item.
void | removeEditor() Removes the editor from the JComboBox.
protected void | selectNextPossibleValue() Selects the next item in the list.
protected void | selectPreviousPossibleValue() Selects the previous item in the list.
void | setPopupVisible(JComboBox c, boolean v) Hides the popup.
protected void | toggleOpenClose() Hides the popup if it is showing and shows the popup if it is hidden.
void | unconfigureArrowButton() Unconfigures the arrow button by removing listeners.
protected void | unconfigureEditor() Unconfigures the editor by removing listeners.
protected void | uninstallComponents() The editor and/or arrow button are removed from the JComboBox here.
protected void | uninstallDefaults() Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.
protected void | uninstallKeyboardActions() Removes the focus InputMap and ActionMap.
protected void | uninstallListeners() Removes listeners from the JComboBox and JComboBoxModel.
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

comboBox

protected JComboBox comboBox

hasFocus

protected boolean hasFocus

listBox

protected JList listBox

currentValuePane

protected CellRendererPane currentValuePane

popup

protected ComboPopup popup

editor

protected Component editor

arrowButton

protected JButton arrowButton

keyListener

protected KeyListener keyListener

focusListener

protected FocusListener focusListener

itemListener

protected ItemListener itemListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

popupMouseListener

protected MouseListener popupMouseListener

popupMouseMotionListener

protected MouseMotionListener popupMouseMotionListener

popupKeyListener

protected KeyListener popupKeyListener

listDataListener

protected ListDataListener listDataListener

isMinimumSizeDirty

protected boolean isMinimumSizeDirty

cachedMinimumSize

protected Dimension cachedMinimumSize
Constructor Detail

BasicComboBoxUI

public BasicComboBoxUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()
Installs the default colors, default font, default renderer, and default editor into the JComboBox.

installListeners

protected void installListeners()
Attaches listeners to the JComboBox and JComboBoxModel.

uninstallDefaults

protected void uninstallDefaults()
Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.

uninstallListeners

protected void uninstallListeners()
Removes listeners from the JComboBox and JComboBoxModel.

createPopup

protected ComboPopup createPopup()
Creates an implementation of the ComboPopup interface. Returns an instance of BasicComboPopup.

createKeyListener

protected KeyListener createKeyListener()
Creates the key listener for handling type-ahead. Returns an instance of BasicComboBoxUI$KeyHandler.

createFocusListener

protected FocusListener createFocusListener()
Creates the focus listener that hides the popup when the focus is lost. Returns an instance of BasicComboBoxUI$FocusHandler.

createListDataListener

protected ListDataListener createListDataListener()
Creates the list data listener that is used for caching the preferred sizes. Returns an instance of BasicComboBoxUI$ListDataHandler.

createItemListener

protected ItemListener createItemListener()
Creates the item listener that watches for updates in the current selection so that it can update the display. Returns an instance of BasicComboBoxUI$ItemHandler.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates the list data listener that is used for caching the preferred sizes. Returns an instance of BasicComboBoxUI$PropertyChangeHandler.

createLayoutManager

protected LayoutManager createLayoutManager()
Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left. Returns an instance of BasicComboBoxUI$ComboBoxLayoutManager.

createRenderer

protected ListCellRenderer createRenderer()
Creates the renderer that is to be used in the combo box. This method only gets called if a custom renderer has nto already been installed in the JComboBox.

createEditor

protected ComboBoxEditor createEditor()
Creates the editor that is to be used in editable combo boxes. This method only gets called if a custom editor has not already been installed in the JComboBox.

installComponents

protected void installComponents()
The editor and arrow button are added to the JComboBox here.

uninstallComponents

protected void uninstallComponents()
The editor and/or arrow button are removed from the JComboBox here. This method calls removeAll() on the JComboBox just to make sure that everything gets removed.

addEditor

public void addEditor()
Adds the editor to the JComboBox.

removeEditor

public void removeEditor()
Removes the editor from the JComboBox. It also calls unconfigureEditor()

configureEditor

protected void configureEditor()
Configures the editor by setting its font and adding listeners.

unconfigureEditor

protected void unconfigureEditor()
Unconfigures the editor by removing listeners.

configureArrowButton

public void configureArrowButton()
Configures the arrow button by adding listeners.

unconfigureArrowButton

public void unconfigureArrowButton()
Unconfigures the arrow button by removing listeners.

createArrowButton

protected JButton createArrowButton()
Creates the arrow button. Subclasses can create any button they like. The default behavior of this class is to attach various listeners to the button returned by this method. Returns an instance of BasicArrowButton.

isPopupVisible

public boolean isPopupVisible(JComboBox c)
Tells if the popup is visible or not.
Overrides:
isPopupVisible in class ComboBoxUI

setPopupVisible

public void setPopupVisible(JComboBox c,
                            boolean v)
Hides the popup.
Overrides:
setPopupVisible in class ComboBoxUI

isFocusTraversable

public boolean isFocusTraversable(JComboBox c)
Determines if the JComboBox is focus traversable. If the JComboBox is editable this returns false, otherwise it returns true.
Overrides:
isFocusTraversable in class ComboBoxUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent c)
Description copied from class: ComponentUI
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChildrenCount() instead of using this method.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent c,
                                     int i)
Description copied from class: ComponentUI
Return the nth Accessible child of the object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChild() instead of using this method.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)

isNavigationKey

protected boolean isNavigationKey(int keyCode)
Returns whether or not the supplied keyCode maps to a key that is used for navigation. This is used for optimizing key input by only passing non- navigation keys to the type-ahead mechanism. Subclasses should override this if they change the navigation keys.

selectNextPossibleValue

protected void selectNextPossibleValue()
Selects the next item in the list. It won't change the selection if the currently selected item is already the last item.

selectPreviousPossibleValue

protected void selectPreviousPossibleValue()
Selects the previous item in the list. It won't change the selection if the currently selected item is already the first item.

toggleOpenClose

protected void toggleOpenClose()
Hides the popup if it is showing and shows the popup if it is hidden.

rectangleForCurrentValue

protected Rectangle rectangleForCurrentValue()
Returns the area that is reserved for drawing the currently selected item.

getInsets

protected Insets getInsets()
Gets the insets from the JComboBox.

paintCurrentValue

public void paintCurrentValue(Graphics g,
                              Rectangle bounds,
                              boolean hasFocus)
Paints the currently selected item.

paintCurrentValueBackground

public void paintCurrentValueBackground(Graphics g,
                                        Rectangle bounds,
                                        boolean hasFocus)
Paints the background of the currently selected item.

getDefaultSize

protected Dimension getDefaultSize()
Return the default size of an empty combo box.

getDisplaySize

protected Dimension getDisplaySize()

installKeyboardActions

protected void installKeyboardActions()
Adds keyboard actions to the JComboBox. Actions on enter and esc are already supplied. Add more actions as you need them.

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Removes the focus InputMap and ActionMap.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicComboPopup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPopupMenu
                          |
                          +--javax.swing.plaf.basic.BasicComboPopup
All Implemented Interfaces:
Accessible, ComboPopup, ImageObserver, MenuContainer, MenuElement, Serializable
Direct Known Subclasses:
MetalComboBoxUI.MetalComboPopup
public class BasicComboPopup
extends JPopupMenu
implements ComboPopup

This is an implementation of the ComboPopup interface. It is primarily for use by BasicComboBoxUI and its subclasses. BasicComboPopup extends JPopupMenu because most combo boxes use a popup menu to display the list of possible selections. BasicComboBoxUI only requires a ComboPopup, so subclasses of BasicComboBoxUI aren't required to use this class. All event handling is handled by createxxxListener() methods and internal classes. You can change the behavior of this class by overriding the createxxxListener() methods and supplying your own event listeners or subclassing from the ones supplied in this class. Inner classes for handling events: InvocationMouseHandler InvocationMouseMotionHandler InvocationKeyHandler ListSelectionHandler ListDataHandler ListMouseHandler ListMouseMotionHandler PropertyChangeHandler ItemHandler

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
class | BasicComboPopup.InvocationKeyHandler This listener watches for the spacebar being pressed and shows/hides the popup accordingly.
protected class | BasicComboPopup.InvocationMouseHandler This listener knows how and when to invoke this popup menu.
protected class | BasicComboPopup.InvocationMouseMotionHandler This listener watches for dragging and updates the current selection in the list if it is dragging over the list.
protected class | BasicComboPopup.ItemHandler This listener watches for changes in the JComboBox's selection.
class | BasicComboPopup.ListDataHandler Keeps the selected index in the list in-sync with the combo box's selection.
protected class | BasicComboPopup.ListMouseHandler This listener hides the popup when the mouse is released in the list.
protected class | BasicComboPopup.ListMouseMotionHandler This listener changes the selected item as you move the mouse over the list.
protected class | BasicComboPopup.ListSelectionHandler This listener watches for changes in the list's selection and reports them to the combo box.
protected class | BasicComboPopup.PropertyChangeHandler This listener watches for bound property changes in JComboBox.
Inner classes inherited from class javax.swing.JPopupMenu
JPopupMenu.AccessibleJPopupMenu, JPopupMenu.Separator
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected Timer | autoscrollTimer
protected JComboBox | comboBox
protected boolean | hasEntered
protected boolean | isAutoScrolling
protected ItemListener | itemListener
protected KeyListener | keyListener
protected JList | list
protected ListDataListener | listDataListener
protected MouseListener | listMouseListener
protected MouseMotionListener | listMouseMotionListener
protected ListSelectionListener | listSelectionListener
protected MouseListener | mouseListener
protected MouseMotionListener | mouseMotionListener
protected PropertyChangeListener | propertyChangeListener
protected static int | SCROLL_DOWN
protected static int | SCROLL_UP
protected int | scrollDirection
protected JScrollPane | scroller
protected boolean | valueIsAdjusting
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicComboPopup(JComboBox combo)
Method Summary
protected  void autoScrollDown()
protected  void autoScrollUp()
protected  Rectangle computePopupBounds(int px, int py, int pw, int ph)
protected  void configureList()
Called to configure the list created by createList().
protected  void configurePopup()
Called to configure this JPopupMenu (BasicComboPopup is a JPopupMenu).
protected  void configureScroller()
Called to configure the JScrollPane created by createScroller().
protected  MouseEvent convertMouseEvent(MouseEvent e)
protected  ItemListener createItemListener()
Creates an item listener that watches for changes in the selected item in the JComboBox.
protected  KeyListener createKeyListener()
Creates the key listener that is returned by ComboPopup.getKeyListener().
protected  JList createList()
Creates the JList that is used in the popup to display the items in the model.
protected  ListDataListener createListDataListener()
Creates a list data listener that watches for inserted and removed items from the combo box model.
protected  MouseListener createListMouseListener()
Creates a mouse listener that watches for mouse events in the popup's list.
protected  MouseMotionListener createListMouseMotionListener()
Creates a mouse motion listener that watches for mouse events in the popup's list.
protected  ListSelectionListener createListSelectionListener()
Creates a list selection listener that watches for selection changes in the popup's list.
protected  MouseListener createMouseListener()
Creates the mouse listener that is returned by ComboPopup.getMouseListener().
protected  MouseMotionListener createMouseMotionListener()
Creates the mouse motion listener that is returned by ComboPopup.getMouseMotionListener().
protected  PropertyChangeListener createPropertyChangeListener()
Creates a property change listener that watches for changes in the bound properties in the JComboBox.
protected  JScrollPane createScroller()
Creates the JScrollPane that is used in the popup to hold the list.
protected  void delegateFocus(MouseEvent e)
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up.
 KeyListener getKeyListener()
Implementation of ComboPopup.getKeyListener().
 JList getList()
Implementation of ComboPopup.getList().
 MouseListener getMouseListener()
Implementation of ComboPopup.getMouseListener().
 MouseMotionListener getMouseMotionListener()
Implementation of ComboPopup.getMouseMotionListener().
protected  int getPopupHeightForRowCount(int maxRowCount)
 void hide()
Implementation of ComboPopup.hide().
protected  void installComboBoxListeners()
This method adds the necessary listeners to the JComboBox.
protected  void installComboBoxModelListeners(ComboBoxModel model)
protected  void installKeyboardActions()
protected  void installListListeners()
Called by configureList() to add the necessary listeners to the list.
 boolean isFocusTraversable()
Overridden to unconditionally return false.
 void show()
Implementation of ComboPopup.show().
protected  void startAutoScrolling(int direction)
Called by BasicComboPopup$InvocationMouseMotionHandler to handle auto- scrolling the list.
protected  void stopAutoScrolling()
protected  void togglePopup()
Makes the popup visible if it is hidden and makes it hidden if it is visible.
protected  void uninstallComboBoxModelListeners(ComboBoxModel model)
 void uninstallingUI()
Called when the UI is uninstalling.
protected  void uninstallKeyboardActions()
protected  void updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll)
A utility method used by the event listeners.
Methods inherited from class javax.swing.JPopupMenu
add, add, add, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processKeyEvent, processMouseEvent, remove, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.plaf.basic.ComboPopup
isVisible

Field Detail

comboBox

protected JComboBox comboBox

list

protected JList list

scroller

protected JScrollPane scroller

valueIsAdjusting

protected boolean valueIsAdjusting

mouseMotionListener

protected MouseMotionListener mouseMotionListener

mouseListener

protected MouseListener mouseListener

keyListener

protected KeyListener keyListener

listSelectionListener

protected ListSelectionListener listSelectionListener

listDataListener

protected ListDataListener listDataListener

listMouseListener

protected MouseListener listMouseListener

listMouseMotionListener

protected MouseMotionListener listMouseMotionListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

itemListener

protected ItemListener itemListener

autoscrollTimer

protected Timer autoscrollTimer

hasEntered

protected boolean hasEntered

isAutoScrolling

protected boolean isAutoScrolling

scrollDirection

protected int scrollDirection

SCROLL_UP

protected static final int SCROLL_UP

SCROLL_DOWN

protected static final int SCROLL_DOWN
Constructor Detail

BasicComboPopup

public BasicComboPopup(JComboBox combo)
Method Detail

show

public void show()
Implementation of ComboPopup.show().
Specified by:
show in interface ComboPopup
Overrides:
show in class Component

hide

public void hide()
Implementation of ComboPopup.hide().
Specified by:
hide in interface ComboPopup
Overrides:
hide in class JComponent

getList

public JList getList()
Implementation of ComboPopup.getList().
Specified by:
getList in interface ComboPopup

getMouseListener

public MouseListener getMouseListener()
Implementation of ComboPopup.getMouseListener().
Specified by:
getMouseListener in interface ComboPopup

getMouseMotionListener

public MouseMotionListener getMouseMotionListener()
Implementation of ComboPopup.getMouseMotionListener().
Specified by:
getMouseMotionListener in interface ComboPopup

getKeyListener

public KeyListener getKeyListener()
Implementation of ComboPopup.getKeyListener().
Specified by:
getKeyListener in interface ComboPopup

uninstallingUI

public void uninstallingUI()
Called when the UI is uninstalling. Since this popup isn't in the component tree, it won't get it's uninstallUI() called. It removes the listeners that were added in addComboBoxListeners().
Specified by:
uninstallingUI in interface ComboPopup

uninstallComboBoxModelListeners

protected void uninstallComboBoxModelListeners(ComboBoxModel model)

uninstallKeyboardActions

protected void uninstallKeyboardActions()

createMouseListener

protected MouseListener createMouseListener()
Creates the mouse listener that is returned by ComboPopup.getMouseListener(). Returns an instance of BasicComboPopup$InvocationMouseHandler.

createMouseMotionListener

protected MouseMotionListener createMouseMotionListener()
Creates the mouse motion listener that is returned by ComboPopup.getMouseMotionListener(). Returns an instance of BasicComboPopup$InvocationMouseMotionListener.

createKeyListener

protected KeyListener createKeyListener()
Creates the key listener that is returned by ComboPopup.getKeyListener(). Returns an instance of BasicComboPopup$InvocationKeyHandler.

createListSelectionListener

protected ListSelectionListener createListSelectionListener()
Creates a list selection listener that watches for selection changes in the popup's list. Returns an instance of BasicComboPopup$ListSelectionHandler.

createListDataListener

protected ListDataListener createListDataListener()
Creates a list data listener that watches for inserted and removed items from the combo box model.

createListMouseListener

protected MouseListener createListMouseListener()
Creates a mouse listener that watches for mouse events in the popup's list. Returns an instance of BasicComboPopup$ListMouseHandler.

createListMouseMotionListener

protected MouseMotionListener createListMouseMotionListener()
Creates a mouse motion listener that watches for mouse events in the popup's list. Returns an instance of BasicComboPopup$ListMouseMotionHandler.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates a property change listener that watches for changes in the bound properties in the JComboBox. Returns an instance of BasicComboPopup$PropertyChangeHandler.

createItemListener

protected ItemListener createItemListener()
Creates an item listener that watches for changes in the selected item in the JComboBox. Returns an instance of BasicComboPopup$ItemHandler.

createList

protected JList createList()
Creates the JList that is used in the popup to display the items in the model.

configureList

protected void configureList()
Called to configure the list created by createList().

installListListeners

protected void installListListeners()
Called by configureList() to add the necessary listeners to the list.

createScroller

protected JScrollPane createScroller()
Creates the JScrollPane that is used in the popup to hold the list.

configureScroller

protected void configureScroller()
Called to configure the JScrollPane created by createScroller().

configurePopup

protected void configurePopup()
Called to configure this JPopupMenu (BasicComboPopup is a JPopupMenu).

installComboBoxListeners

protected void installComboBoxListeners()
This method adds the necessary listeners to the JComboBox.

installComboBoxModelListeners

protected void installComboBoxModelListeners(ComboBoxModel model)

installKeyboardActions

protected void installKeyboardActions()

isFocusTraversable

public boolean isFocusTraversable()
Overridden to unconditionally return false.
Overrides:
isFocusTraversable in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
true if this component can receive the focus

startAutoScrolling

protected void startAutoScrolling(int direction)
Called by BasicComboPopup$InvocationMouseMotionHandler to handle auto- scrolling the list.

stopAutoScrolling

protected void stopAutoScrolling()

autoScrollUp

protected void autoScrollUp()

autoScrollDown

protected void autoScrollDown()

delegateFocus

protected void delegateFocus(MouseEvent e)
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up. The standard implementation delegates the focus to the editor (if the combo box is editable) or to the JComboBox if it is not editable.

togglePopup

protected void togglePopup()
Makes the popup visible if it is hidden and makes it hidden if it is visible.

convertMouseEvent

protected MouseEvent convertMouseEvent(MouseEvent e)

getPopupHeightForRowCount

protected int getPopupHeightForRowCount(int maxRowCount)

computePopupBounds

protected Rectangle computePopupBounds(int px,
                                       int py,
                                       int pw,
                                       int ph)

updateListBoxSelectionForEvent

protected void updateListBoxSelectionForEvent(MouseEvent anEvent,
                                              boolean shouldScroll)
A utility method used by the event listeners. Given a mouse event, it changes the list selection to the list item below the mouse.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicDesktopIconUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopIconUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopIconUI
              |
              +--javax.swing.plaf.basic.BasicDesktopIconUI
Direct Known Subclasses:
MetalDesktopIconUI
public class BasicDesktopIconUI
extends DesktopIconUI

Basic L&F for a minimized window on a desktop.

Inner Class Summary
 class BasicDesktopIconUI.MouseInputHandler
Listens for mouse movements and acts on them.
Field Summary
protected JInternalFrame.JDesktopIcon | desktopIcon
protected JInternalFrame | frame
Constructor Summary
BasicDesktopIconUI()
Method Summary
protected MouseInputListener | createMouseInputListener()
static ComponentUI | createUI(JComponent c)
void | deiconize()
Insets | getInsets(JComponent c)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installComponents()
protected void | installDefaults()
protected void | installListeners()
void | installUI(JComponent c)
protected void | uninstallComponents()
protected void | uninstallDefaults()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

desktopIcon

protected JInternalFrame.JDesktopIcon desktopIcon

frame

protected JInternalFrame frame
Constructor Detail

BasicDesktopIconUI

public BasicDesktopIconUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installComponents

protected void installComponents()

uninstallComponents

protected void uninstallComponents()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

createMouseInputListener

protected MouseInputListener createMouseInputListener()

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

getInsets

public Insets getInsets(JComponent c)

deiconize

public void deiconize()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicDesktopPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopPaneUI
              |
              +--javax.swing.plaf.basic.BasicDesktopPaneUI
public class BasicDesktopPaneUI
extends DesktopPaneUI

Basic L&F for a desktop.

Inner Class Summary
protected class | BasicDesktopPaneUI.CloseAction
protected class | BasicDesktopPaneUI.MaximizeAction
protected class | BasicDesktopPaneUI.MinimizeAction
protected class | BasicDesktopPaneUI.NavigateAction
protected class | BasicDesktopPaneUI.OpenAction
Field Summary
protected KeyStroke | closeKey Deprecated. As of JDK version 1.3.
protected JDesktopPane | desktop
protected DesktopManager | desktopManager
protected KeyStroke | maximizeKey Deprecated. As of JDK version 1.3.
protected KeyStroke | minimizeKey Deprecated. As of JDK version 1.3.
protected KeyStroke | navigateKey Deprecated. As of JDK version 1.3.
protected KeyStroke | navigateKey2 Deprecated. As of JDK version 1.3.
Constructor Summary
BasicDesktopPaneUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults()
protected void | installDesktopManager()
protected void | installKeyboardActions()
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
protected void | registerKeyboardActions()
protected void | uninstallDefaults()
protected void | uninstallDesktopManager()
protected void | uninstallKeyboardActions()
void | uninstallUI(JComponent c)
protected void | unregisterKeyboardActions()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

desktop

protected JDesktopPane desktop

desktopManager

protected DesktopManager desktopManager

minimizeKey

protected KeyStroke minimizeKey
Deprecated. As of JDK version 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

maximizeKey

protected KeyStroke maximizeKey
Deprecated. As of JDK version 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

closeKey

protected KeyStroke closeKey
Deprecated. As of JDK version 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

navigateKey

protected KeyStroke navigateKey
Deprecated. As of JDK version 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

navigateKey2

protected KeyStroke navigateKey2
Deprecated. As of JDK version 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Constructor Detail

BasicDesktopPaneUI

public BasicDesktopPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installDesktopManager

protected void installDesktopManager()

uninstallDesktopManager

protected void uninstallDesktopManager()

installKeyboardActions

protected void installKeyboardActions()

registerKeyboardActions

protected void registerKeyboardActions()

unregisterKeyboardActions

protected void unregisterKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicDirectoryModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDirectoryModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.plaf.basic.BasicDirectoryModel
All Implemented Interfaces:
EventListener, ListModel, PropertyChangeListener, Serializable
public class BasicDirectoryModel
extends AbstractListModel
implements PropertyChangeListener

Basic implementation of a file list.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractListModel
listenerList
Constructor Summary
BasicDirectoryModel(JFileChooser filechooser)
Method Summary
boolean | contains(Object o)
void | fireContentsChanged()
Vector | getDirectories()
Object | getElementAt(int index) Returns the value at the specified index.
Vector | getFiles()
int | getSize() Returns the length of the list.
int | indexOf(Object o)
void | intervalAdded(ListDataEvent e)
void | intervalRemoved(ListDataEvent e)
void | invalidateFileCache()
protected boolean | lt(File a, File b)
void | propertyChange(PropertyChangeEvent e) This method gets called when a bound property is changed.
protected void | sort(Vector v)
void | validateFileCache()
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDirectoryModel

public BasicDirectoryModel(JFileChooser filechooser)
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

invalidateFileCache

public void invalidateFileCache()

getDirectories

public Vector getDirectories()

getFiles

public Vector getFiles()

validateFileCache

public void validateFileCache()

fireContentsChanged

public void fireContentsChanged()

getSize

public int getSize()
Description copied from interface: ListModel
Returns the length of the list.

contains

public boolean contains(Object o)

indexOf

public int indexOf(Object o)

getElementAt

public Object getElementAt(int index)
Description copied from interface: ListModel
Returns the value at the specified index.

intervalAdded

public void intervalAdded(ListDataEvent e)

intervalRemoved

public void intervalRemoved(ListDataEvent e)

sort

protected void sort(Vector v)

lt

protected boolean lt(File a,
                     File b)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicEditorPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicEditorPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicEditorPaneUI
All Implemented Interfaces:
ViewFactory
Direct Known Subclasses:
BasicTextPaneUI
public class BasicEditorPaneUI
extends BasicTextUI

Provides the look and feel for a JEditorPane.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
BasicEditorPaneUI()
Creates a new BasicEditorPaneUI.
Method Summary
static ComponentUI | createUI(JComponent c) Creates a UI for the JTextPane.
EditorKit | getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
protected String | getPropertyPrefix() Fetches the name used as a key to lookup properties through the UIManager.
protected void | installKeyboardActions()
protected void | propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicEditorPaneUI

public BasicEditorPaneUI()
Creates a new BasicEditorPaneUI.
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a UI for the JTextPane.
Parameters:
c - the JTextPane component
Returns:
the UI

installKeyboardActions

protected void installKeyboardActions()
Overrides:
installKeyboardActions in class BasicTextUI

getPropertyPrefix

protected String getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager. This is used as a prefix to all the standard text properties.
Overrides:
getPropertyPrefix in class BasicTextUI
Returns:
the name ("EditorPane")

getEditorKit

public EditorKit getEditorKit(JTextComponent tc)
Fetches the EditorKit for the UI. This is whatever is currently set in the associated JEditorPane.
Overrides:
getEditorKit in class BasicTextUI
Returns:
the editor capabilities
See Also:
TextUI.getEditorKit(javax.swing.text.JTextComponent)

propertyChange

protected void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. This is implemented to rebuild the ActionMap based upon an EditorKit change.
Overrides:
propertyChange in class BasicTextUI
Parameters:
evt - the property change event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicFileChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.FileChooserUI
              |
              +--javax.swing.plaf.basic.BasicFileChooserUI
Direct Known Subclasses:
MetalFileChooserUI
public class BasicFileChooserUI
extends FileChooserUI

Basic L&F implementation of a FileChooser.

Inner Class Summary
protected class | BasicFileChooserUI.AcceptAllFileFilter
protected class | BasicFileChooserUI.ApproveSelectionAction Responds to an Open or Save request
protected class | BasicFileChooserUI.BasicFileView
protected class | BasicFileChooserUI.CancelSelectionAction Responds to a cancel request.
protected class | BasicFileChooserUI.ChangeToParentDirectoryAction
protected class | BasicFileChooserUI.DoubleClickListener
protected class | BasicFileChooserUI.GoHomeAction Acts on the "home" key event or equivalent event.
protected class | BasicFileChooserUI.NewFolderAction Creates a new folder.
protected class | BasicFileChooserUI.SelectionListener
protected class | BasicFileChooserUI.UpdateAction Rescans the files in the current directory
Field Summary
protected int | cancelButtonMnemonic
protected String | cancelButtonText
protected String | cancelButtonToolTipText
protected Icon | computerIcon
protected Icon | detailsViewIcon
protected Icon | directoryIcon
protected Icon | fileIcon
protected Icon | floppyDriveIcon
protected Icon | hardDriveIcon
protected int | helpButtonMnemonic
protected String | helpButtonText
protected String | helpButtonToolTipText
protected Icon | homeFolderIcon
protected Icon | listViewIcon
protected Icon | newFolderIcon
protected int | openButtonMnemonic
protected String | openButtonText
protected String | openButtonToolTipText
protected int | saveButtonMnemonic
protected String | saveButtonText
protected String | saveButtonToolTipText
protected int | updateButtonMnemonic
protected String | updateButtonText
protected String | updateButtonToolTipText
protected Icon | upFolderIcon
Constructor Summary
BasicFileChooserUI(JFileChooser b)
Method Summary
void | clearIconCache()
protected MouseListener | createDoubleClickListener(JFileChooser fc, JList list)
ListSelectionListener | createListSelectionListener(JFileChooser fc)
protected void | createModel()
PropertyChangeListener | createPropertyChangeListener(JFileChooser fc)
void | ensureFileIsVisible(JFileChooser fc, File f)
FileFilter | getAcceptAllFileFilter(JFileChooser fc) Returns the default accept all file filter
JPanel | getAccessoryPanel()
protected JButton | getApproveButton(JFileChooser fc)
int | getApproveButtonMnemonic(JFileChooser fc)
String | getApproveButtonText(JFileChooser fc)
String | getApproveButtonToolTipText(JFileChooser fc)
Action | getApproveSelectionAction()
Action | getCancelSelectionAction()
Action | getChangeToParentDirectoryAction()
String | getDialogTitle(JFileChooser fc) Returns the title of this dialog
String | getDirectoryName()
JFileChooser | getFileChooser()
String | getFileName()
FileView | getFileView(JFileChooser fc)
Action | getGoHomeAction()
BasicDirectoryModel | getModel()
Action | getNewFolderAction()
Action | getUpdateAction()
void | installComponents(JFileChooser fc)
protected void | installDefaults(JFileChooser fc)
protected void | installIcons(JFileChooser fc)
protected void | installListeners(JFileChooser fc)
protected void | installStrings(JFileChooser fc)
void | installUI(JComponent c)
void | rescanCurrentDirectory(JFileChooser fc)
void | setDirectoryName(String dirname)
void | setFileName(String filename)
void | uninstallComponents(JFileChooser fc)
protected void | uninstallDefaults(JFileChooser fc)
protected void | uninstallIcons(JFileChooser fc)
protected void | uninstallListeners(JFileChooser fc)
protected void | uninstallStrings(JFileChooser fc)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

directoryIcon

protected Icon directoryIcon

fileIcon

protected Icon fileIcon

computerIcon

protected Icon computerIcon

hardDriveIcon

protected Icon hardDriveIcon

floppyDriveIcon

protected Icon floppyDriveIcon

newFolderIcon

protected Icon newFolderIcon

upFolderIcon

protected Icon upFolderIcon

homeFolderIcon

protected Icon homeFolderIcon

listViewIcon

protected Icon listViewIcon

detailsViewIcon

protected Icon detailsViewIcon

saveButtonMnemonic

protected int saveButtonMnemonic

openButtonMnemonic

protected int openButtonMnemonic

cancelButtonMnemonic

protected int cancelButtonMnemonic

updateButtonMnemonic

protected int updateButtonMnemonic

helpButtonMnemonic

protected int helpButtonMnemonic

saveButtonText

protected String saveButtonText

openButtonText

protected String openButtonText

cancelButtonText

protected String cancelButtonText

updateButtonText

protected String updateButtonText

helpButtonText

protected String helpButtonText

saveButtonToolTipText

protected String saveButtonToolTipText

openButtonToolTipText

protected String openButtonToolTipText

cancelButtonToolTipText

protected String cancelButtonToolTipText

updateButtonToolTipText

protected String updateButtonToolTipText

helpButtonToolTipText

protected String helpButtonToolTipText
Constructor Detail

BasicFileChooserUI

public BasicFileChooserUI(JFileChooser b)
Method Detail

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installComponents

public void installComponents(JFileChooser fc)

uninstallComponents

public void uninstallComponents(JFileChooser fc)

installListeners

protected void installListeners(JFileChooser fc)

uninstallListeners

protected void uninstallListeners(JFileChooser fc)

installDefaults

protected void installDefaults(JFileChooser fc)

installIcons

protected void installIcons(JFileChooser fc)

installStrings

protected void installStrings(JFileChooser fc)

uninstallDefaults

protected void uninstallDefaults(JFileChooser fc)

uninstallIcons

protected void uninstallIcons(JFileChooser fc)

uninstallStrings

protected void uninstallStrings(JFileChooser fc)

createModel

protected void createModel()

getModel

public BasicDirectoryModel getModel()

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)

getFileName

public String getFileName()

getDirectoryName

public String getDirectoryName()

setFileName

public void setFileName(String filename)

setDirectoryName

public void setDirectoryName(String dirname)

rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser fc)
Overrides:
rescanCurrentDirectory in class FileChooserUI

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser fc,
                                File f)
Overrides:
ensureFileIsVisible in class FileChooserUI

getFileChooser

public JFileChooser getFileChooser()

getAccessoryPanel

public JPanel getAccessoryPanel()

getApproveButton

protected JButton getApproveButton(JFileChooser fc)

getApproveButtonToolTipText

public String getApproveButtonToolTipText(JFileChooser fc)

clearIconCache

public void clearIconCache()

createListSelectionListener

public ListSelectionListener createListSelectionListener(JFileChooser fc)

createDoubleClickListener

protected MouseListener createDoubleClickListener(JFileChooser fc,
                                                  JList list)

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter(JFileChooser fc)
Returns the default accept all file filter
Overrides:
getAcceptAllFileFilter in class FileChooserUI

getFileView

public FileView getFileView(JFileChooser fc)
Overrides:
getFileView in class FileChooserUI

getDialogTitle

public String getDialogTitle(JFileChooser fc)
Returns the title of this dialog
Overrides:
getDialogTitle in class FileChooserUI

getApproveButtonMnemonic

public int getApproveButtonMnemonic(JFileChooser fc)

getApproveButtonText

public String getApproveButtonText(JFileChooser fc)
Overrides:
getApproveButtonText in class FileChooserUI

getNewFolderAction

public Action getNewFolderAction()

getGoHomeAction

public Action getGoHomeAction()

getChangeToParentDirectoryAction

public Action getChangeToParentDirectoryAction()

getApproveSelectionAction

public Action getApproveSelectionAction()

getCancelSelectionAction

public Action getCancelSelectionAction()

getUpdateAction

public Action getUpdateAction()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicFileView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.BasicFileView

java.lang.Object
  |
  +--javax.swing.filechooser.FileView
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.BasicFileView
extends FileView

Field Summary
protected  Hashtable iconCache
Constructor Summary
BasicFileChooserUI.BasicFileView()
Method Summary
void | cacheIcon(File f, Icon i)
void | clearIconCache()
Icon | getCachedIcon(File f)
String | getDescription(File f) A human readable description of the file.
Icon | getIcon(File f) The icon that represents this file in the JFileChooser.
String | getName(File f) The name of the file.
String | getTypeDescription(File f) A human readable description of the type of the file.
Boolean | isHidden(File f)
Boolean | isTraversable(File f) Whether the directory is traversable or not.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

iconCache

protected Hashtable iconCache
Constructor Detail

BasicFileChooserUI.BasicFileView

public BasicFileChooserUI.BasicFileView()
Method Detail

clearIconCache

public void clearIconCache()

getName

public String getName(File f)
Description copied from class: FileView
The name of the file. Normally this would be simply f.getName()
Overrides:
getName in class FileView

getDescription

public String getDescription(File f)
Description copied from class: FileView
A human readable description of the file. For example, a file named jag.jpg might have a description that read: "A JPEG image file of James Gosling's face"
Overrides:
getDescription in class FileView

getTypeDescription

public String getTypeDescription(File f)
Description copied from class: FileView
A human readable description of the type of the file. For example, a jpg file might have a type description of: "A JPEG Compressed Image File"
Overrides:
getTypeDescription in class FileView

getCachedIcon

public Icon getCachedIcon(File f)

cacheIcon

public void cacheIcon(File f,
                      Icon i)

getIcon

public Icon getIcon(File f)
Description copied from class: FileView
The icon that represents this file in the JFileChooser.
Overrides:
getIcon in class FileView

isTraversable

public Boolean isTraversable(File f)
Description copied from class: FileView
Whether the directory is traversable or not. This might be useful, for example, if you want a directory to represent a compound document and don't want the user to descend into it.
Overrides:
isTraversable in class FileView

isHidden

public Boolean isHidden(File f)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicGraphicsUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicGraphicsUtils

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicGraphicsUtils
public class BasicGraphicsUtils
extends Object

Constructor Summary
BasicGraphicsUtils()
Method Summary
static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void drawDashedRect(Graphics g, int x, int y, int width, int height)
static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
static void drawString(Graphics g, String text, int underlinedChar, int x, int y)
Draw a string with the graphics g at location (x,y) just like g.drawString() would.
static Insets getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()
static Insets getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()
static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicGraphicsUtils

public BasicGraphicsUtils()
Method Detail

drawEtchedRect

public static void drawEtchedRect(Graphics g,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  Color shadow,
                                  Color darkShadow,
                                  Color highlight,
                                  Color lightHighlight)

getEtchedInsets

public static Insets getEtchedInsets()
Returns the amount of space taken up by a border drawn by drawEtchedRect()
Returns:
the inset of an etched rect

drawGroove

public static void drawGroove(Graphics g,
                              int x,
                              int y,
                              int w,
                              int h,
                              Color shadow,
                              Color highlight)

getGrooveInsets

public static Insets getGrooveInsets()
Returns the amount of space taken up by a border drawn by drawGroove()
Returns:
the inset of a groove border

drawBezel

public static void drawBezel(Graphics g,
                             int x,
                             int y,
                             int w,
                             int h,
                             boolean isPressed,
                             boolean isDefault,
                             Color shadow,
                             Color darkShadow,
                             Color highlight,
                             Color lightHighlight)

drawLoweredBezel

public static void drawLoweredBezel(Graphics g,
                                    int x,
                                    int y,
                                    int w,
                                    int h,
                                    Color shadow,
                                    Color darkShadow,
                                    Color highlight,
                                    Color lightHighlight)

drawString

public static void drawString(Graphics g,
                              String text,
                              int underlinedChar,
                              int x,
                              int y)
Draw a string with the graphics g at location (x,y) just like g.drawString() would. The first occurence of underlineChar in text will be underlined. The matching is not case sensitive.

drawDashedRect

public static void drawDashedRect(Graphics g,
                                  int x,
                                  int y,
                                  int width,
                                  int height)

getPreferredButtonSize

public static Dimension getPreferredButtonSize(AbstractButton b,
                                               int textIconGap)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicHighlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextUI.BasicHighlighter

java.lang.Object
  |
  +--javax.swing.text.LayeredHighlighter
        |
        +--javax.swing.text.DefaultHighlighter
              |
              +--javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
All Implemented Interfaces:
Highlighter, UIResource
Enclosing class:
BasicTextUI
public static class BasicTextUI.BasicHighlighter
extends DefaultHighlighter
implements UIResource

Inner classes inherited from class javax.swing.text.DefaultHighlighter
DefaultHighlighter.DefaultHighlightPainter
Inner classes inherited from class javax.swing.text.LayeredHighlighter
LayeredHighlighter.LayerPainter
Inner classes inherited from class javax.swing.text.Highlighter
Highlighter.Highlight, Highlighter.HighlightPainter
Fields inherited from class javax.swing.text.DefaultHighlighter
DefaultPainter
Constructor Summary
BasicTextUI.BasicHighlighter()
Methods inherited from class javax.swing.text.DefaultHighlighter
addHighlight, changeHighlight, deinstall, getDrawsLayeredHighlights, getHighlights, install, paint, paintLayeredHighlights, removeAllHighlights, removeHighlight, setDrawsLayeredHighlights
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTextUI.BasicHighlighter

public BasicTextUI.BasicHighlighter()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicHorizontalLayoutManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.BasicHorizontalLayoutManager

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
All Implemented Interfaces:
LayoutManager, LayoutManager2
Direct Known Subclasses:
BasicSplitPaneUI.BasicVerticalLayoutManager
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.BasicHorizontalLayoutManager
extends Object
implements LayoutManager2

LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Field Summary
protected Component[] | components
protected int[] | sizes
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | addLayoutComponent(String place, Component component) Adds the component at place.
protected int | getAvailableSize(Dimension containerSize, Insets insets) Returns the available width based on the container size and Insets.
protected int | getInitialLocation(Insets insets) Returns the left inset, unless the Insets are null in which case 0 is returned.
float | getLayoutAlignmentX(Container target) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container target) Returns the alignment along the y axis.
protected int | getPreferredSizeOfComponent(Component c) Returns the width of the passed in Components preferred size.
protected int | getSizeOfComponent(Component c) Returns the width of the passed in component.
protected int[] | getSizes() Returns the sizes of the components.
void | invalidateLayout(Container c) Does nothing.
void | layoutContainer(Container container) Does the actual layout.
Dimension | maximumLayoutSize(Container target) Returns the maximum layout size, which is Integer.MAX_VALUE in both directions.
Dimension | minimumLayoutSize(Container container) Returns the minimum size needed to contain the children.
Dimension | preferredLayoutSize(Container container) Returns the preferred size needed to contain the children.
void | removeLayoutComponent(Component component) Removes the specified component from our knowledge.
protected void | resetSizeAt(int index) Resets the size of the Component at the passed in location.
void | resetToPreferredSizes() Marks the receiver so that the next time this instance is layed out it'll ask for the preferred sizes.
protected void | setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize) Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.
protected void | setSizes(int[] newSizes) Sets the sizes to newSizes.
protected void | updateComponents() Determines the components.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

sizes

protected int[] sizes

components

protected Component[] components
Method Detail

layoutContainer

public void layoutContainer(Container container)
Does the actual layout.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

addLayoutComponent

public void addLayoutComponent(String place,
                               Component component)
Adds the component at place. Place must be one of JSplitPane.LEFT, RIGHT, TOP, BOTTOM, or null (for the divider).
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

minimumLayoutSize

public Dimension minimumLayoutSize(Container container)
Returns the minimum size needed to contain the children. The width is the sum of all the childrens min widths and the height is the largest of the childrens minimum heights.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

preferredLayoutSize

public Dimension preferredLayoutSize(Container container)
Returns the preferred size needed to contain the children. The width is the sum of all the childrens preferred widths and the height is the largest of the childrens preferred heights.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(Component component)
Removes the specified component from our knowledge.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Adds the specified component to the layout, using the specified constraint object.
Specified by:
addLayoutComponent in interface LayoutManager2
Parameters:
comp - the component to be added
constraints - where/how the component is added to the layout.

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container c)
Does nothing. If the developer really wants to change the size of one of the views JSplitPane.resetToPreferredSizes should be messaged.
Specified by:
invalidateLayout in interface LayoutManager2

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum layout size, which is Integer.MAX_VALUE in both directions.
Specified by:
maximumLayoutSize in interface LayoutManager2
Following copied from interface: java.awt.LayoutManager2
See Also:
Component.getMinimumSize(), Component.getPreferredSize(), LayoutManager

resetToPreferredSizes

public void resetToPreferredSizes()
Marks the receiver so that the next time this instance is layed out it'll ask for the preferred sizes.

resetSizeAt

protected void resetSizeAt(int index)
Resets the size of the Component at the passed in location.

setSizes

protected void setSizes(int[] newSizes)
Sets the sizes to newSizes.

getSizes

protected int[] getSizes()
Returns the sizes of the components.

getPreferredSizeOfComponent

protected int getPreferredSizeOfComponent(Component c)
Returns the width of the passed in Components preferred size.

getSizeOfComponent

protected int getSizeOfComponent(Component c)
Returns the width of the passed in component.

getAvailableSize

protected int getAvailableSize(Dimension containerSize,
                               Insets insets)
Returns the available width based on the container size and Insets.

getInitialLocation

protected int getInitialLocation(Insets insets)
Returns the left inset, unless the Insets are null in which case 0 is returned.

setComponentToSize

protected void setComponentToSize(Component c,
                                  int size,
                                  int location,
                                  Insets insets,
                                  Dimension containerSize)
Sets the width of the component c to be size, placing its x location at location, y to the insets.top and height to the containersize.height less the top and bottom insets.

updateComponents

protected void updateComponents()
Determines the components. This should be called whenever a new instance of this is installed into an existing SplitPane.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicHTML

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicHTML

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicHTML
public class BasicHTML
extends Object

Support for providing html views for the swing components. This translates a simple html string to a javax.swing.text.View implementation that can render the html and provide the necessary layout semantics.

Field Summary
static String | documentBaseKey Key stored as a client property to indicate the base that relative references are resolved against.
static String | propertyKey Key to use for the html renderer when stored as a client property of a JComponent.
Constructor Summary
BasicHTML()
Method Summary
static View | createHTMLView(JComponent c, String html) Create an html renderer for the given component and string of html.
static boolean | isHTMLString(String s) Check the given string to see if it should trigger the html rendering logic in a non-text component that supports html rendering.
static void | updateRenderer(JComponent c, String text) Stash the HTML render for the given text into the client properties of the given JComponent.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

propertyKey

public static final String propertyKey
Key to use for the html renderer when stored as a client property of a JComponent.

documentBaseKey

public static final String documentBaseKey
Key stored as a client property to indicate the base that relative references are resolved against. For example, lets say you keep your images in the directory resources relative to the code path, you would use the following the set the base:
   jComponent.putClientProperty(documentBaseKey,
                                xxx.class.getResource("resources/"));
Constructor Detail

BasicHTML

public BasicHTML()
Method Detail

createHTMLView

public static View createHTMLView(JComponent c,
                                  String html)
Create an html renderer for the given component and string of html.

isHTMLString

public static boolean isHTMLString(String s)
Check the given string to see if it should trigger the html rendering logic in a non-text component that supports html rendering.

updateRenderer

public static void updateRenderer(JComponent c,
                                  String text)
Stash the HTML render for the given text into the client properties of the given JComponent. If the given text is NOT HTML the property will be cleared of any renderer.

This method is useful for ComponentUI implementations that are static (i.e. shared) and get their state entirely from the JComponent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicIconFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicIconFactory

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicIconFactory
All Implemented Interfaces:
Serializable
public class BasicIconFactory
extends Object
implements Serializable

Factory object that can vend Icons appropriate for the basic L & F.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
BasicIconFactory()
Method Summary
static Icon | createEmptyFrameIcon()
static Icon | getCheckBoxIcon()
static Icon | getCheckBoxMenuItemIcon()
static Icon | getMenuArrowIcon()
static Icon | getMenuItemArrowIcon()
static Icon | getMenuItemCheckIcon()
static Icon | getRadioButtonIcon()
static Icon | getRadioButtonMenuItemIcon()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicIconFactory

public BasicIconFactory()
Method Detail

getMenuItemCheckIcon

public static Icon getMenuItemCheckIcon()

getMenuItemArrowIcon

public static Icon getMenuItemArrowIcon()

getMenuArrowIcon

public static Icon getMenuArrowIcon()

getCheckBoxIcon

public static Icon getCheckBoxIcon()

getRadioButtonIcon

public static Icon getRadioButtonIcon()

getCheckBoxMenuItemIcon

public static Icon getCheckBoxMenuItemIcon()

getRadioButtonMenuItemIcon

public static Icon getRadioButtonMenuItemIcon()

createEmptyFrameIcon

public static Icon createEmptyFrameIcon()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicInternalFrameListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.BasicInternalFrameListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener
All Implemented Interfaces:
EventListener, InternalFrameListener
Enclosing class:
BasicInternalFrameUI
protected class BasicInternalFrameUI.BasicInternalFrameListener
extends Object
implements InternalFrameListener

Constructor Summary
protected BasicInternalFrameUI.BasicInternalFrameListener()
Method Summary
void | internalFrameActivated(InternalFrameEvent e) Invoked when an internal frame is activated.
void | internalFrameClosed(InternalFrameEvent e) Invoked when an internal frame has been closed.
void | internalFrameClosing(InternalFrameEvent e) Invoked when an internal frame is in the process of being closed.
void | internalFrameDeactivated(InternalFrameEvent e) Invoked when an internal frame is de-activated.
void | internalFrameDeiconified(InternalFrameEvent e) Invoked when an internal frame is de-iconified.
void | internalFrameIconified(InternalFrameEvent e) Invoked when an internal frame is iconified.
void | internalFrameOpened(InternalFrameEvent e) Invoked when a internal frame has been opened.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameUI.BasicInternalFrameListener

protected BasicInternalFrameUI.BasicInternalFrameListener()
Method Detail

internalFrameClosing

public void internalFrameClosing(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame is in the process of being closed. The close operation can be overridden at this point.
Specified by:
internalFrameClosing in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setDefaultCloseOperation(int)

internalFrameClosed

public void internalFrameClosed(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame has been closed.
Specified by:
internalFrameClosed in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setClosed(boolean)

internalFrameOpened

public void internalFrameOpened(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when a internal frame has been opened.
Specified by:
internalFrameOpened in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.show()

internalFrameIconified

public void internalFrameIconified(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame is iconified.
Specified by:
internalFrameIconified in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setIcon(boolean)

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame is de-iconified.
Specified by:
internalFrameDeiconified in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setIcon(boolean)

internalFrameActivated

public void internalFrameActivated(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame is activated.
Specified by:
internalFrameActivated in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setSelected(boolean)

internalFrameDeactivated

public void internalFrameDeactivated(InternalFrameEvent e)
Description copied from interface: InternalFrameListener
Invoked when an internal frame is de-activated.
Specified by:
internalFrameDeactivated in interface InternalFrameListener
Following copied from interface: javax.swing.event.InternalFrameListener
See Also:
JInternalFrame.setSelected(boolean)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicInternalFrameTitlePane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.plaf.basic.BasicInternalFrameTitlePane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
MetalInternalFrameTitlePane
public class BasicInternalFrameTitlePane
extends JComponent

The class that manages a basic title bar

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
class | BasicInternalFrameTitlePane.CloseAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.IconifyAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MaximizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.MoveAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.RestoreAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SizeAction This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.SystemMenuBar This inner class is marked "public" due to a compiler bug.
class | BasicInternalFrameTitlePane.TitlePaneLayout This inner class is marked "public" due to a compiler bug.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected static String | CLOSE_CMD
protected Action | closeAction
protected JButton | closeButton
protected Icon | closeIcon
protected JInternalFrame | frame
protected JButton | iconButton
protected Icon | iconIcon
protected static String | ICONIFY_CMD
protected Action | iconifyAction
protected JButton | maxButton
protected Icon | maxIcon
protected static String | MAXIMIZE_CMD
protected Action | maximizeAction
protected JMenuBar | menuBar
protected Icon | minIcon
protected static String | MOVE_CMD
protected Action | moveAction
protected Color | notSelectedTextColor
protected Color | notSelectedTitleColor
protected PropertyChangeListener | propertyChangeListener
protected static String | RESTORE_CMD
protected Action | restoreAction
protected Color | selectedTextColor
protected Color | selectedTitleColor
protected static String | SIZE_CMD
protected Action | sizeAction
protected JMenu | windowMenu
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicInternalFrameTitlePane(JInternalFrame f)
Method Summary
void | addNotify() Notifies this component that it now has a parent component.
protected void | addSubComponents()
protected void | addSystemMenuItems(JMenu systemMenu)
protected void | assembleSystemMenu()
protected void | createActions()
protected void | createButtons()
protected LayoutManager | createLayout()
protected PropertyChangeListener | createPropertyChangeListener()
protected JMenu | createSystemMenu()
protected JMenuBar | createSystemMenuBar()
protected void | enableActions()
protected void | installDefaults()
protected void | installListeners()
protected void | installTitlePane()
void | paintComponent(Graphics g) If the UI delegate is non-null, calls its paint method.
protected void | postClosingEvent(JInternalFrame frame) Post a WINDOW_CLOSING-like event to the frame, so that it can be treated like a regular Frame.
void | removeNotify() Notifies this component that it no longer has a parent component.
protected void | setButtonIcons()
protected void | showSystemMenu()
protected void | uninstallDefaults()
protected void | uninstallListeners()
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

menuBar

protected JMenuBar menuBar

iconButton

protected JButton iconButton

maxButton

protected JButton maxButton

closeButton

protected JButton closeButton

windowMenu

protected JMenu windowMenu

frame

protected JInternalFrame frame

selectedTitleColor

protected Color selectedTitleColor

selectedTextColor

protected Color selectedTextColor

notSelectedTitleColor

protected Color notSelectedTitleColor

notSelectedTextColor

protected Color notSelectedTextColor

maxIcon

protected Icon maxIcon

minIcon

protected Icon minIcon

iconIcon

protected Icon iconIcon

closeIcon

protected Icon closeIcon

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

closeAction

protected Action closeAction

maximizeAction

protected Action maximizeAction

iconifyAction

protected Action iconifyAction

restoreAction

protected Action restoreAction

moveAction

protected Action moveAction

sizeAction

protected Action sizeAction

CLOSE_CMD

protected static final String CLOSE_CMD

ICONIFY_CMD

protected static final String ICONIFY_CMD

RESTORE_CMD

protected static final String RESTORE_CMD

MAXIMIZE_CMD

protected static final String MAXIMIZE_CMD

MOVE_CMD

protected static final String MOVE_CMD

SIZE_CMD

protected static final String SIZE_CMD
Constructor Detail

BasicInternalFrameTitlePane

public BasicInternalFrameTitlePane(JInternalFrame f)
Method Detail

installTitlePane

protected void installTitlePane()

addSubComponents

protected void addSubComponents()

createActions

protected void createActions()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

addNotify

public void addNotify()
Description copied from class: JComponent
Notifies this component that it now has a parent component. When this method is invoked, the chain of parent components is set up with KeyboardAction event listeners.
Overrides:
addNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

removeNotify

public void removeNotify()
Description copied from class: JComponent
Notifies this component that it no longer has a parent component. When this method is invoked, any KeyboardActions set up in the the chain of parent components are removed.
Overrides:
removeNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

createButtons

protected void createButtons()

setButtonIcons

protected void setButtonIcons()

assembleSystemMenu

protected void assembleSystemMenu()

addSystemMenuItems

protected void addSystemMenuItems(JMenu systemMenu)

createSystemMenu

protected JMenu createSystemMenu()

createSystemMenuBar

protected JMenuBar createSystemMenuBar()

showSystemMenu

protected void showSystemMenu()

paintComponent

public void paintComponent(Graphics g)
Description copied from class: JComponent
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
Overrides:
paintComponent in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)

postClosingEvent

protected void postClosingEvent(JInternalFrame frame)
Post a WINDOW_CLOSING-like event to the frame, so that it can be treated like a regular Frame.

enableActions

protected void enableActions()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

createLayout

protected LayoutManager createLayout()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicInternalFrameUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.InternalFrameUI
              |
              +--javax.swing.plaf.basic.BasicInternalFrameUI
Direct Known Subclasses:
MetalInternalFrameUI
public class BasicInternalFrameUI
extends InternalFrameUI

A basic L&F implementation of JInternalFrame.

Inner Class Summary
protected class | BasicInternalFrameUI.BasicInternalFrameListener
protected class | BasicInternalFrameUI.BorderListener Listens for border adjustments.
protected class | BasicInternalFrameUI.ComponentHandler
protected class | BasicInternalFrameUI.GlassPaneDispatcher
class | BasicInternalFrameUI.InternalFrameLayout
class | BasicInternalFrameUI.InternalFramePropertyChangeListener
Field Summary
protected MouseInputAdapter | borderListener
protected ComponentListener | componentListener
protected JComponent | eastPane
protected JInternalFrame | frame
protected MouseInputListener | glassPaneDispatcher
protected LayoutManager | internalFrameLayout
protected JComponent | northPane
protected KeyStroke | openMenuKey Deprecated. As of Java 2 platform v1.3.
protected PropertyChangeListener | propertyChangeListener
protected JComponent | southPane
protected BasicInternalFrameTitlePane | titlePane
protected JComponent | westPane
Constructor Summary
BasicInternalFrameUI(JInternalFrame b)
Method Summary
protected void | activateFrame(JInternalFrame f) This method is called when the frame becomes selected.
protected void | closeFrame(JInternalFrame f) This method is called when the user wants to close the frame.
protected MouseInputAdapter | createBorderListener(JInternalFrame w)
protected ComponentListener | createComponentListener()
protected DesktopManager | createDesktopManager()
protected JComponent | createEastPane(JInternalFrame w)
protected MouseInputListener | createGlassPaneDispatcher()
protected void | createInternalFrameListener()
protected LayoutManager | createLayoutManager()
protected JComponent | createNorthPane(JInternalFrame w)
protected PropertyChangeListener | createPropertyChangeListener()
protected JComponent | createSouthPane(JInternalFrame w)
static ComponentUI | createUI(JComponent b)
protected JComponent | createWestPane(JInternalFrame w)
protected void | deactivateFrame(JInternalFrame f) This method is called when the frame is no longer selected.
protected void | deiconifyFrame(JInternalFrame f) This method is called when the user wants to deiconify the frame.
protected void | deinstallMouseHandlers(JComponent c)
protected DesktopManager | getDesktopManager() Returns the proper DesktopManager.
JComponent | getEastPane()
Dimension | getMaximumSize(JComponent x)
Dimension | getMinimumSize(JComponent x)
JComponent | getNorthPane()
Dimension | getPreferredSize(JComponent x)
JComponent | getSouthPane()
JComponent | getWestPane()
protected void | iconifyFrame(JInternalFrame f) This method is called when the user wants to iconify the frame.
protected void | installComponents()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
protected void | installMouseHandlers(JComponent c)
void | installUI(JComponent c)
boolean | isKeyBindingActive()
protected boolean | isKeyBindingRegistered()
protected void | maximizeFrame(JInternalFrame f) This method is called when the user wants to maximize the frame.
protected void | minimizeFrame(JInternalFrame f) This method is called when the user wants to minimize the frame.
protected void | replacePane(JComponent currentPane, JComponent newPane) Adds necessary mouseHandlers to currentPane and adds it to frame.
void | setEastPane(JComponent c)
protected void | setKeyBindingActive(boolean b)
protected void | setKeyBindingRegistered(boolean b)
void | setNorthPane(JComponent c)
void | setSouthPane(JComponent c)
protected void | setupMenuCloseKey()
protected void | setupMenuOpenKey()
void | setWestPane(JComponent c)
protected void | uninstallComponents()
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

frame

protected JInternalFrame frame

borderListener

protected MouseInputAdapter borderListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

internalFrameLayout

protected LayoutManager internalFrameLayout

componentListener

protected ComponentListener componentListener

glassPaneDispatcher

protected MouseInputListener glassPaneDispatcher

northPane

protected JComponent northPane

southPane

protected JComponent southPane

westPane

protected JComponent westPane

eastPane

protected JComponent eastPane

titlePane

protected BasicInternalFrameTitlePane titlePane

openMenuKey

protected KeyStroke openMenuKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Constructor Detail

BasicInternalFrameUI

public BasicInternalFrameUI(JInternalFrame b)
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

installKeyboardActions

protected void installKeyboardActions()

installComponents

protected void installComponents()

installListeners

protected void installListeners()

uninstallDefaults

protected void uninstallDefaults()

uninstallComponents

protected void uninstallComponents()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

createLayoutManager

protected LayoutManager createLayoutManager()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

getPreferredSize

public Dimension getPreferredSize(JComponent x)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent x)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent x)
Overrides:
getMaximumSize in class ComponentUI

replacePane

protected void replacePane(JComponent currentPane,
                           JComponent newPane)
Adds necessary mouseHandlers to currentPane and adds it to frame. Reverse process for the newPane.

deinstallMouseHandlers

protected void deinstallMouseHandlers(JComponent c)

installMouseHandlers

protected void installMouseHandlers(JComponent c)

createNorthPane

protected JComponent createNorthPane(JInternalFrame w)

createSouthPane

protected JComponent createSouthPane(JInternalFrame w)

createWestPane

protected JComponent createWestPane(JInternalFrame w)

createEastPane

protected JComponent createEastPane(JInternalFrame w)

createBorderListener

protected MouseInputAdapter createBorderListener(JInternalFrame w)

createInternalFrameListener

protected void createInternalFrameListener()

isKeyBindingRegistered

protected final boolean isKeyBindingRegistered()

setKeyBindingRegistered

protected final void setKeyBindingRegistered(boolean b)

isKeyBindingActive

public final boolean isKeyBindingActive()

setKeyBindingActive

protected final void setKeyBindingActive(boolean b)

setupMenuOpenKey

protected void setupMenuOpenKey()

setupMenuCloseKey

protected void setupMenuCloseKey()

getNorthPane

public JComponent getNorthPane()

setNorthPane

public void setNorthPane(JComponent c)

getSouthPane

public JComponent getSouthPane()

setSouthPane

public void setSouthPane(JComponent c)

getWestPane

public JComponent getWestPane()

setWestPane

public void setWestPane(JComponent c)

getEastPane

public JComponent getEastPane()

setEastPane

public void setEastPane(JComponent c)

getDesktopManager

protected DesktopManager getDesktopManager()
Returns the proper DesktopManager. Calls getDesktopPane() to find the JDesktop component and returns the desktopManager from it. If this fails, it will return a default DesktopManager that should work in arbitrary parents.

createDesktopManager

protected DesktopManager createDesktopManager()

closeFrame

protected void closeFrame(JInternalFrame f)
This method is called when the user wants to close the frame. This action is delegated to the desktopManager.

maximizeFrame

protected void maximizeFrame(JInternalFrame f)
This method is called when the user wants to maximize the frame. This action is delegated to the desktopManager.

minimizeFrame

protected void minimizeFrame(JInternalFrame f)
This method is called when the user wants to minimize the frame. This action is delegated to the desktopManager.

iconifyFrame

protected void iconifyFrame(JInternalFrame f)
This method is called when the user wants to iconify the frame. This action is delegated to the desktopManager.

deiconifyFrame

protected void deiconifyFrame(JInternalFrame f)
This method is called when the user wants to deiconify the frame. This action is delegated to the desktopManager.

activateFrame

protected void activateFrame(JInternalFrame f)
This method is called when the frame becomes selected. This action is delegated to the desktopManager.

deactivateFrame

protected void deactivateFrame(JInternalFrame f)
This method is called when the frame is no longer selected. This action is delegated to the desktopManager.

createComponentListener

protected ComponentListener createComponentListener()

createGlassPaneDispatcher

protected MouseInputListener createGlassPaneDispatcher()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicLabelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicLabelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.LabelUI
              |
              +--javax.swing.plaf.basic.BasicLabelUI
All Implemented Interfaces:
EventListener, PropertyChangeListener
Direct Known Subclasses:
MetalLabelUI
public class BasicLabelUI
extends LabelUI
implements PropertyChangeListener

A Windows L&F implementation of LabelUI. This implementation is completely static, i.e. there's only one UIView implementation that's shared by all JLabel objects.

Field Summary
protected static BasicLabelUI labelUI
Constructor Summary
BasicLabelUI()
Method Summary
static ComponentUI createUI(JComponent c)
 Dimension getMaximumSize(JComponent c)
 Dimension getMinimumSize(JComponent c)
 Dimension getPreferredSize(JComponent c)
protected  void installComponents(JLabel c)
protected  void installDefaults(JLabel c)
protected  void installKeyboardActions(JLabel l)
protected  void installListeners(JLabel c)
 void installUI(JComponent c)
protected  String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel().
 void paint(Graphics g, JComponent c)
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
protected  void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
protected  void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paint clippedText at textX, textY with the labels foreground color.
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
protected  void uninstallComponents(JLabel c)
protected  void uninstallDefaults(JLabel c)
protected  void uninstallKeyboardActions(JLabel c)
protected  void uninstallListeners(JLabel c)
 void uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

labelUI

protected static BasicLabelUI labelUI
Constructor Detail

BasicLabelUI

public BasicLabelUI()
Method Detail

layoutCL

protected String layoutCL(JLabel label,
                          FontMetrics fontMetrics,
                          String text,
                          Icon icon,
                          Rectangle viewR,
                          Rectangle iconR,
                          Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel(). This method is here so that a subclass could do Label specific layout and to shorten the method name a little.
See Also:
SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int)

paintEnabledText

protected void paintEnabledText(JLabel l,
                                Graphics g,
                                String s,
                                int textX,
                                int textY)
Paint clippedText at textX, textY with the labels foreground color.
See Also:
paint(java.awt.Graphics, javax.swing.JComponent), paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

paintDisabledText

protected void paintDisabledText(JLabel l,
                                 Graphics g,
                                 String s,
                                 int textX,
                                 int textY)
Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
See Also:
paint(java.awt.Graphics, javax.swing.JComponent), paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)

paint

public void paint(Graphics g,
                  JComponent c)
Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color. The Label text is drawn by paintEnabledText() or paintDisabledText(). The locations of the label parts are computed by layoutCL.
Overrides:
paint in class ComponentUI
See Also:
paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int), paintDisabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int), layoutCL(javax.swing.JLabel, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle)

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI
Returns:
getPreferredSize(c)

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Returns:
getPreferredSize(c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JLabel c)

installListeners

protected void installListeners(JLabel c)

installComponents

protected void installComponents(JLabel c)

installKeyboardActions

protected void installKeyboardActions(JLabel l)

uninstallDefaults

protected void uninstallDefaults(JLabel c)

uninstallListeners

protected void uninstallListeners(JLabel c)

uninstallComponents

protected void uninstallComponents(JLabel c)

uninstallKeyboardActions

protected void uninstallKeyboardActions(JLabel c)

createUI

public static ComponentUI createUI(JComponent c)

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicListUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ListUI
              |
              +--javax.swing.plaf.basic.BasicListUI
public class BasicListUI
extends ListUI

A Windows L&F implementation of ListUI.

Inner Class Summary
class | BasicListUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicListUI.ListDataHandler The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
class | BasicListUI.ListSelectionHandler The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
class | BasicListUI.MouseInputHandler Mouse input, and focus handling for JList.
class | BasicListUI.PropertyChangeHandler The PropertyChangeListener that's added to the JList at installUI time.
Field Summary
protected int | cellHeight
protected int[] | cellHeights
protected static int | cellRendererChanged
protected int | cellWidth
protected static int | fixedCellHeightChanged
protected static int | fixedCellWidthChanged
protected FocusListener | focusListener
protected static int | fontChanged
protected JList | list
protected ListDataListener | listDataListener
protected ListSelectionListener | listSelectionListener
protected static int | modelChanged
protected MouseInputListener | mouseInputListener
protected PropertyChangeListener | propertyChangeListener
protected static int | prototypeCellValueChanged
protected CellRendererPane | rendererPane
protected static int | selectionModelChanged
protected int | updateLayoutStateNeeded
Constructor Summary
BasicListUI()
Method Summary
protected  int convertRowToY(int row)
Return the JList relative Y coordinate of the origin of the specified row or -1 if row isn't valid.
protected  int convertYToRow(int y0)
Convert the JList relative coordinate to the row that contains it, based on the current layout.
protected  FocusListener createFocusListener()
protected  ListDataListener createListDataListener()
Creates an instance of ListDataListener that's added to the JLists by model as needed.
protected  ListSelectionListener createListSelectionListener()
Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed.
protected  MouseInputListener createMouseInputListener()
Creates a delegate that implements MouseInputListener.
protected  PropertyChangeListener createPropertyChangeListener()
Creates an instance of PropertyChangeHandler that's added to the JList by installUI().
static ComponentUI createUI(JComponent list)
Returns a new instance of BasicListUI.
 Rectangle getCellBounds(JList list, int index1, int index2)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
 Dimension getMaximumSize(JComponent c)
 Dimension getMinimumSize(JComponent c)
 Dimension getPreferredSize(JComponent c)
The preferredSize of a list is total height of the rows and the maximum width of the cells.
protected  int getRowHeight(int row)
Returns the height of the specified row based on the current layout.
 Point indexToLocation(JList list, int index)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.
protected  void installDefaults()
Initialize JList properties, e.g.
protected  void installKeyboardActions()
Register keyboard actions for the up and down arrow keys.
protected  void installListeners()
Create and install the listeners for the JList, its model, and its selectionModel.
 void installUI(JComponent c)
Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
 int locationToIndex(JList list, Point location)
Convert a point in JList coordinates to the index of the cell at that location.
protected  void maybeUpdateLayoutState()
If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded.
 void paint(Graphics g, JComponent c)
Paint the rows that intersect the Graphics objects clipRect.
protected  void paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
protected  void selectNextIndex()
Selected the previous row and force it to be visible.
protected  void selectPreviousIndex()
Selected the previous row and force it to be visible.
protected  void uninstallDefaults()
Set the JList properties that haven't been explicitly overriden to null.
protected  void uninstallKeyboardActions()
Unregister keyboard actions for the up and down arrow keys.
protected  void uninstallListeners()
Remove the listeners for the JList, its model, and its selectionModel.
 void uninstallUI(JComponent c)
Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order.
protected  void updateLayoutState()
Recompute the value of cellHeight or cellHeights based and cellWidth, based on the current font and the current values of fixedCellWidth, fixedCellHeight, and prototypeCellValue.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

list

protected JList list

rendererPane

protected CellRendererPane rendererPane

focusListener

protected FocusListener focusListener

mouseInputListener

protected MouseInputListener mouseInputListener

listSelectionListener

protected ListSelectionListener listSelectionListener

listDataListener

protected ListDataListener listDataListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

cellHeights

protected int[] cellHeights

cellHeight

protected int cellHeight

cellWidth

protected int cellWidth

updateLayoutStateNeeded

protected int updateLayoutStateNeeded

modelChanged

protected static final int modelChanged

selectionModelChanged

protected static final int selectionModelChanged

fontChanged

protected static final int fontChanged

fixedCellWidthChanged

protected static final int fixedCellWidthChanged

fixedCellHeightChanged

protected static final int fixedCellHeightChanged

prototypeCellValueChanged

protected static final int prototypeCellValueChanged

cellRendererChanged

protected static final int cellRendererChanged
Constructor Detail

BasicListUI

public BasicListUI()
Method Detail

paintCell

protected void paintCell(Graphics g,
                         int row,
                         Rectangle rowBounds,
                         ListCellRenderer cellRenderer,
                         ListModel dataModel,
                         ListSelectionModel selModel,
                         int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it. Subclasses may want to override this method rather than paint().
See Also:
paint(java.awt.Graphics, javax.swing.JComponent)

paint

public void paint(Graphics g,
                  JComponent c)
Paint the rows that intersect the Graphics objects clipRect. This method calls paintCell as necessary. Subclasses may want to override these methods.
Overrides:
paint in class ComponentUI
See Also:
paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)

getPreferredSize

public Dimension getPreferredSize(JComponent c)
The preferredSize of a list is total height of the rows and the maximum width of the cells. If JList.fixedCellHeight is specified then the total height of the rows is just (cellVerticalMargins + fixedCellHeight) * model.getSize() where rowVerticalMargins is the space we allocate for drawing the yellow focus outline. Similarly if JListfixedCellWidth is specified then we just use that plus the horizontal margins.
Overrides:
getPreferredSize in class ComponentUI
Parameters:
c - The JList component.
Returns:
The total size of the list.

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI
See Also:
getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
See Also:
getPreferredSize(javax.swing.JComponent)

selectPreviousIndex

protected void selectPreviousIndex()
Selected the previous row and force it to be visible. Called by the KeyEvent.VK_UP keyboard action.
See Also:
installKeyboardActions(), JList.ensureIndexIsVisible(int)

selectNextIndex

protected void selectNextIndex()
Selected the previous row and force it to be visible. Called by the KeyEvent.VK_DOWN keyboard action.
See Also:
installKeyboardActions(), JList.ensureIndexIsVisible(int)

installKeyboardActions

protected void installKeyboardActions()
Register keyboard actions for the up and down arrow keys. The actions just call out to protected methods, subclasses that want to override or extend keyboard behavior should consider just overriding those methods. This method is called at installUI() time.
See Also:
selectPreviousIndex(),
selectNextIndex(),
installUI(javax.swing.JComponent)

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Unregister keyboard actions for the up and down arrow keys. This method is called at uninstallUI() time - subclassess should ensure that all of the keyboard actions registered at installUI time are removed here.
See Also:
selectPreviousIndex(),
selectNextIndex(),
installUI(javax.swing.JComponent)

installListeners

protected void installListeners()
Create and install the listeners for the JList, its model, and its selectionModel. This method is called at installUI() time.
See Also:
installUI(javax.swing.JComponent), uninstallListeners()

uninstallListeners

protected void uninstallListeners()
Remove the listeners for the JList, its model, and its selectionModel. All of the listener fields, are reset to null here. This method is called at uninstallUI() time, it should be kept in sync with installListeners.
See Also:
uninstallUI(javax.swing.JComponent), installListeners()

installDefaults

protected void installDefaults()
Initialize JList properties, e.g. font, foreground, and background, and add the CellRendererPane. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.
See Also:
uninstallDefaults(), installUI(javax.swing.JComponent), CellRendererPane

uninstallDefaults

protected void uninstallDefaults()
Set the JList properties that haven't been explicitly overriden to null. A property is considered overridden if its current value is not a UIResource.
See Also:
installDefaults(), uninstallUI(javax.swing.JComponent), CellRendererPane

installUI

public void installUI(JComponent c)
Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
Overrides:
installUI in class ComponentUI
See Also:
installDefaults(),
installListeners(),
installKeyboardActions()

uninstallUI

public void uninstallUI(JComponent c)
Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order. Sets this.list to null.
Overrides:
uninstallUI in class ComponentUI
See Also:
uninstallListeners(),
uninstallKeyboardActions(),
uninstallDefaults()

createUI

public static ComponentUI createUI(JComponent list)
Returns a new instance of BasicListUI. BasicListUI delegates are allocated one per JList.
Returns:
A new ListUI implementation for the Windows look and feel.

locationToIndex

public int locationToIndex(JList list,
                           Point location)
Description copied from class: ListUI
Convert a point in JList coordinates to the index of the cell at that location. Returns -1 if there's no cell the specified location.
Overrides:
locationToIndex in class ListUI
Returns:
The index of the cell at location, or -1.
See Also:
ListUI.locationToIndex(javax.swing.JList, java.awt.Point)

indexToLocation

public Point indexToLocation(JList list,
                             int index)
Description copied from class: ListUI
Returns the origin of the specified item in JList coordinates, null if index isn't valid.
Overrides:
indexToLocation in class ListUI
Returns:
The origin of the index'th cell, null if index is invalid.
See Also:
ListUI.indexToLocation(javax.swing.JList, int)

getCellBounds

public Rectangle getCellBounds(JList list,
                               int index1,
                               int index2)
Description copied from class: ListUI
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
Overrides:
getCellBounds in class ListUI
Returns:
The bounds of the index'th cell.
See Also:
ListUI.getCellBounds(javax.swing.JList, int, int)

getRowHeight

protected int getRowHeight(int row)
Returns the height of the specified row based on the current layout.
Returns:
The specified row height or -1 if row isn't valid.
See Also:
convertYToRow(int), convertRowToY(int), updateLayoutState()

convertYToRow

protected int convertYToRow(int y0)
Convert the JList relative coordinate to the row that contains it, based on the current layout. If y0 doesn't fall within any row, return -1.
Returns:
The row that contains y0, or -1.
See Also:
getRowHeight(int), updateLayoutState()

convertRowToY

protected int convertRowToY(int row)
Return the JList relative Y coordinate of the origin of the specified row or -1 if row isn't valid.
Returns:
The Y coordinate of the origin of row, or -1.
See Also:
getRowHeight(int), updateLayoutState()

maybeUpdateLayoutState

protected void maybeUpdateLayoutState()
If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded. This method should be called by methods before doing any computation based on the geometry of the list. For example it's the first call in paint() and getPreferredSize().
See Also:
updateLayoutState()

updateLayoutState

protected void updateLayoutState()
Recompute the value of cellHeight or cellHeights based and cellWidth, based on the current font and the current values of fixedCellWidth, fixedCellHeight, and prototypeCellValue.
See Also:
maybeUpdateLayoutState()

createMouseInputListener

protected MouseInputListener createMouseInputListener()
Creates a delegate that implements MouseInputListener. The delegate is added to the corresponding java.awt.Component listener lists at installUI() time. Subclasses can override this method to return a custom MouseInputListener, e.g.
 class MyListUI extends BasicListUI {
    protected MouseInputListener createMouseInputListener() {
        return new MyMouseInputHandler();
    }
    public class MyMouseInputHandler extends MouseInputHandler {
        public void mouseMoved(MouseEvent e) {
            // do some extra work when the mouse moves
            super.mouseMoved(e);
        }
    }
 }
See Also:
BasicListUI.MouseInputHandler, installUI(javax.swing.JComponent)

createFocusListener

protected FocusListener createFocusListener()

createListSelectionListener

protected ListSelectionListener createListSelectionListener()
Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed. Subclasses can override this method to return a custom ListSelectionListener, e.g.
 class MyListUI extends BasicListUI {
    protected ListSelectionListener createListSelectionListener() {
        return new MySelectionListener();
    }
    public class MySelectionListener extends ListSelectionHandler {
        public void valueChanged(ListSelectionEvent e) {
            // do some extra work when the selection changes
            super.valueChange(e);
        }
    }
 }
See Also:
BasicListUI.ListSelectionHandler, installUI(javax.swing.JComponent)

createListDataListener

protected ListDataListener createListDataListener()
Creates an instance of ListDataListener that's added to the JLists by model as needed. Subclasses can override this method to return a custom ListDataListener, e.g.
 class MyListUI extends BasicListUI {
    protected ListDataListener createListDataListener() {
        return new MyListDataListener();
    }
    public class MyListDataListener extends ListDataHandler {
        public void contentsChanged(ListDataEvent e) {
            // do some extra work when the models contents change
            super.contentsChange(e);
        }
    }
 }
See Also:
ListDataListener, JList.getModel(), installUI(javax.swing.JComponent)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates an instance of PropertyChangeHandler that's added to the JList by installUI(). Subclasses can override this method to return a custom PropertyChangeListener, e.g.
 class MyListUI extends BasicListUI {
    protected PropertyChangeListener createPropertyChangeListener() {
        return new MyPropertyChangeListener();
    }
    public class MyPropertyChangeListener extends PropertyChangeHandler {
        public void propertyChange(PropertyChangeEvent e) {
            if (e.getPropertyName().equals("model")) {
                // do some extra work when the model changes
            }
            super.propertyChange(e);
        }
    }
 }
See Also:
PropertyChangeListener, installUI(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicLookAndFeel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicLookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
        |
        +--javax.swing.plaf.basic.BasicLookAndFeel
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MetalLookAndFeel
public abstract class BasicLookAndFeel
extends LookAndFeel
implements Serializable

Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived. This class cannot be instantiated directly, however the UI classes "Basic" defines can be.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
BasicLookAndFeel()
Method Summary
UIDefaults | getDefaults() This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
protected void | initClassDefaults(UIDefaults table) Initialize the uiClassID to BasicComponentUI mapping.
protected void | initComponentDefaults(UIDefaults table)
protected void | initSystemColorDefaults(UIDefaults table) Load the SystemColors into the defaults table.
protected void | loadSystemColors(UIDefaults table, String[] systemColors, boolean useNative) If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants.
Methods inherited from class javax.swing.LookAndFeel
getDescription, getID, getName, initialize, installBorder, installColors, installColorsAndFont, isNativeLookAndFeel, isSupportedLookAndFeel, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninitialize, uninstallBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BasicLookAndFeel

public BasicLookAndFeel()
Method Detail

getDefaults

public UIDefaults getDefaults()
Description copied from class: LookAndFeel
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.
Overrides:
getDefaults in class LookAndFeel
Following copied from class: javax.swing.LookAndFeel
See Also:
LookAndFeel.initialize(),
LookAndFeel.uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

initClassDefaults

protected void initClassDefaults(UIDefaults table)
Initialize the uiClassID to BasicComponentUI mapping. The JComponent classes define their own uiClassID constants (see AbstractComponent.getUIClassID). This table must map those constants to a BasicComponentUI class of the appropriate type.
See Also:
getDefaults()

initSystemColorDefaults

protected void initSystemColorDefaults(UIDefaults table)
Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor. If the table is being created on a native Windows platform we use the SystemColor values, otherwise we create color objects whose values match the defaults Windows95 colors.

loadSystemColors

protected void loadSystemColors(UIDefaults table,
                                String[] systemColors,
                                boolean useNative)
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants. If not we use the integer color values in the systemColors argument.

initComponentDefaults

protected void initComponentDefaults(UIDefaults table)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicMenuBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicMenuBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.MenuBarUI
              |
              +--javax.swing.plaf.basic.BasicMenuBarUI
public class BasicMenuBarUI
extends MenuBarUI

A default L&F implementation of MenuBarUI. This implementation is a "combined" view/controller.

Field Summary
protected ChangeListener | changeListener
protected ContainerListener | containerListener
protected JMenuBar | menuBar
Constructor Summary
BasicMenuBarUI()
Method Summary
protected ChangeListener | createChangeListener()
protected ContainerListener | createContainerListener()
static ComponentUI | createUI(JComponent x)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c)
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

menuBar

protected JMenuBar menuBar

containerListener

protected ContainerListener containerListener

changeListener

protected ChangeListener changeListener
Constructor Detail

BasicMenuBarUI

public BasicMenuBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults()

installListeners

protected void installListeners()

installKeyboardActions

protected void installKeyboardActions()

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

createContainerListener

protected ContainerListener createContainerListener()

createChangeListener

protected ChangeListener createChangeListener()

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicMenuItemUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicMenuItemUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
                    |
                    +--javax.swing.plaf.basic.BasicMenuItemUI
Direct Known Subclasses:
BasicCheckBoxMenuItemUI, BasicMenuUI, BasicRadioButtonMenuItemUI
public class BasicMenuItemUI
extends MenuItemUI

BasicMenuItem implementation

Inner Class Summary
protected  class BasicMenuItemUI.MouseInputHandler
Field Summary
protected Font | acceleratorFont
protected Color | acceleratorForeground
protected Color | acceleratorSelectionForeground
protected Icon | arrowIcon
protected Icon | checkIcon
protected int | defaultTextIconGap
protected Color | disabledForeground
protected MenuDragMouseListener | menuDragMouseListener
protected JMenuItem | menuItem
protected MenuKeyListener | menuKeyListener
protected MouseInputListener | mouseInputListener
protected boolean | oldBorderPainted
protected Color | selectionBackground
protected Color | selectionForeground
Constructor Summary
BasicMenuItemUI()
Method Summary
protected  MenuDragMouseListener createMenuDragMouseListener(JComponent c)
protected  MenuKeyListener createMenuKeyListener(JComponent c)
protected  MouseInputListener createMouseInputListener(JComponent c)
static ComponentUI createUI(JComponent c)
 Dimension getMaximumSize(JComponent c)
 Dimension getMinimumSize(JComponent c)
 MenuElement[] getPath()
protected  Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
 Dimension getPreferredSize(JComponent c)
protected  String getPropertyPrefix()
protected  void installComponents(JMenuItem menuItem)
protected  void installDefaults()
protected  void installKeyboardActions()
protected  void installListeners()
 void installUI(JComponent c)
 void paint(Graphics g, JComponent c)
protected  void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
protected  void uninstallComponents(JMenuItem menuItem)
protected  void uninstallDefaults()
protected  void uninstallKeyboardActions()
protected  void uninstallListeners()
 void uninstallUI(JComponent c)
 void update(Graphics g, JComponent c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

menuItem

protected JMenuItem menuItem

selectionBackground

protected Color selectionBackground

selectionForeground

protected Color selectionForeground

disabledForeground

protected Color disabledForeground

acceleratorForeground

protected Color acceleratorForeground

acceleratorSelectionForeground

protected Color acceleratorSelectionForeground

defaultTextIconGap

protected int defaultTextIconGap

acceleratorFont

protected Font acceleratorFont

mouseInputListener

protected MouseInputListener mouseInputListener

menuDragMouseListener

protected MenuDragMouseListener menuDragMouseListener

menuKeyListener

protected MenuKeyListener menuKeyListener

arrowIcon

protected Icon arrowIcon

checkIcon

protected Icon checkIcon

oldBorderPainted

protected boolean oldBorderPainted
Constructor Detail

BasicMenuItemUI

public BasicMenuItemUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults()

installComponents

protected void installComponents(JMenuItem menuItem)
Since:
1.3

getPropertyPrefix

protected String getPropertyPrefix()

installListeners

protected void installListeners()

installKeyboardActions

protected void installKeyboardActions()

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallComponents

protected void uninstallComponents(JMenuItem menuItem)
Since:
1.3

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

createMouseInputListener

protected MouseInputListener createMouseInputListener(JComponent c)

createMenuDragMouseListener

protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)

createMenuKeyListener

protected MenuKeyListener createMenuKeyListener(JComponent c)

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

getPreferredMenuItemSize

protected Dimension getPreferredMenuItemSize(JComponent c,
                                             Icon checkIcon,
                                             Icon arrowIcon,
                                             int defaultTextIconGap)

update

public void update(Graphics g,
                   JComponent c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
Overrides:
update in class ComponentUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

paintMenuItem

protected void paintMenuItem(Graphics g,
                             JComponent c,
                             Icon checkIcon,
                             Icon arrowIcon,
                             Color background,
                             Color foreground,
                             int defaultTextIconGap)

getPath

public MenuElement[] getPath()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicMenuUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicMenuUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
                    |
                    +--javax.swing.plaf.basic.BasicMenuItemUI
                          |
                          +--javax.swing.plaf.basic.BasicMenuUI
public class BasicMenuUI
extends BasicMenuItemUI

A default L&F implementation of MenuUI. This implementation is a "combined" view/controller.

Inner Class Summary
 class BasicMenuUI.ChangeHandler
Inner classes inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler
Field Summary
protected ChangeListener | changeListener
protected MenuListener | menuListener
protected PropertyChangeListener | propertyChangeListener
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
Constructor Summary
BasicMenuUI()
Method Summary
protected ChangeListener | createChangeListener(JComponent c)
protected MenuDragMouseListener | createMenuDragMouseListener(JComponent c)
protected MenuKeyListener | createMenuKeyListener(JComponent c)
protected MenuListener | createMenuListener(JComponent c)
protected MouseInputListener | createMouseInputListener(JComponent c)
protected PropertyChangeListener | createPropertyChangeListener(JComponent c)
static ComponentUI | createUI(JComponent x)
Dimension | getMaximumSize(JComponent c)
protected String | getPropertyPrefix()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
protected void | setupPostTimer(JMenu menu)
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintMenuItem, uninstallComponents, uninstallUI, update
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

changeListener

protected ChangeListener changeListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

menuListener

protected MenuListener menuListener
Constructor Detail

BasicMenuUI

public BasicMenuUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicMenuItemUI

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicMenuItemUI

installListeners

protected void installListeners()
Overrides:
installListeners in class BasicMenuItemUI

installKeyboardActions

protected void installKeyboardActions()
Overrides:
installKeyboardActions in class BasicMenuItemUI

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Overrides:
uninstallKeyboardActions in class BasicMenuItemUI

createMouseInputListener

protected MouseInputListener createMouseInputListener(JComponent c)
Overrides:
createMouseInputListener in class BasicMenuItemUI

createMenuListener

protected MenuListener createMenuListener(JComponent c)

createChangeListener

protected ChangeListener createChangeListener(JComponent c)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener(JComponent c)

uninstallDefaults

protected void uninstallDefaults()
Overrides:
uninstallDefaults in class BasicMenuItemUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class BasicMenuItemUI

createMenuDragMouseListener

protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
Overrides:
createMenuDragMouseListener in class BasicMenuItemUI

createMenuKeyListener

protected MenuKeyListener createMenuKeyListener(JComponent c)
Overrides:
createMenuKeyListener in class BasicMenuItemUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class BasicMenuItemUI

setupPostTimer

protected void setupPostTimer(JMenu menu)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicOptionPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicOptionPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.OptionPaneUI
              |
              +--javax.swing.plaf.basic.BasicOptionPaneUI
public class BasicOptionPaneUI
extends OptionPaneUI

Provides the basic look and feel for a JOptionPane. BasicMessagePaneUI provides a means to place an icon, message and buttons into a Container. The layout will look like:

        ------------------
        | i | message    |
        | c | message    |
        | o | message    |
        | n | message    |
        ------------------
        |     buttons    |
        |________________|
icon is an instance of Icon that is wraped inside a JLabel. The message is an opaque object and is tested for the following: if the message is a Component it is added to the Container, if it is an Icon it is wrapped inside a JLabel and added to the Container otherwise it is wrapped inside a JLabel.

The Container, message, icon, and buttons are all determined from abstract methods.

Inner Class Summary
class | BasicOptionPaneUI.ButtonActionListener This inner class is marked "public" due to a compiler bug.
static class | BasicOptionPaneUI.ButtonAreaLayout ButtonAreaLayout acts similiar to FlowLayout.
class | BasicOptionPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
Field Summary
protected boolean | hasCustomComponents This is set to true in validateComponent if a Component is contained in either the message or the buttons.
protected Component | initialFocusComponent Component to receive focus when messaged with selectInitialValue.
protected JComponent | inputComponent JComponent provide for input if optionPane.getWantsInput() returns true.
static int | MinimumHeight
protected Dimension | minimumSize
static int | MinimumWidth
protected JOptionPane | optionPane JOptionPane that the reciever is providing the look and feel for.
protected PropertyChangeListener | propertyChangeListener
Constructor Summary
BasicOptionPaneUI()
Method Summary
protected void | addButtonComponents(Container container, Object[] buttons, int initialIndex) Creates the appropriate object to represent each of the objects in buttons and adds it to container.
protected void | addIcon(Container top) Creates and adds a JLabel representing the icon returned from getIcon to top.
protected void | addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) Creates the appropriate object to represent msg and places it into container.
protected void | burstStringInto(Container c, String d, int maxll) Recursively creates new JLabel instances to represent d.
boolean | containsCustomComponents(JOptionPane op) Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.
protected ActionListener | createButtonActionListener(int buttonIndex)
protected Container | createButtonArea() Creates and returns a Container containin the buttons.
protected LayoutManager | createLayoutManager()
protected Container | createMessageArea() Messaged from installComponents to create a Container containing the body of the message.
protected PropertyChangeListener | createPropertyChangeListener()
protected Container | createSeparator()
static ComponentUI | createUI(JComponent x) Creates a new BasicOptionPaneUI instance.
protected Object[] | getButtons() Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for.
protected Icon | getIcon() Returns the icon from the JOptionPane the reciever is providing the look and feel for, or the default icon as returned from getDefaultIcon.
protected Icon | getIconForType(int messageType) Returns the icon to use for the passed in type.
protected int | getInitialValueIndex() Returns the initial index into the buttons to select.
protected int | getMaxCharactersPerLineCount() Returns the maximum number of characters to place on a line.
Dimension | getMaximumSize(JComponent c) Messages getPreferredSize.
protected Object | getMessage() Returns the message to display from the JOptionPane the receiver is providing the look and feel for.
Dimension | getMinimumOptionPaneSize() Returns the minimum size the option pane should be.
Dimension | getMinimumSize(JComponent c) Messages getPreferredSize.
Dimension | getPreferredSize(JComponent c) If c is the JOptionPane the reciever is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
protected boolean | getSizeButtonsToSameWidth() Returns true, basic L&F wants all the buttons to have the same width.
protected void | installComponents()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c) Installs the reciever as the L&F for the passed in JOptionPane
protected void | resetInputValue() Sets the input value in the option pane the receiver is providing the look and feel for based on the value in the inputComponent.
void | selectInitialValue(JOptionPane op) If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
protected void | uninstallComponents()
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c) Removes the receiver from the L&F controller of the passed in split pane.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MinimumWidth

public static final int MinimumWidth

MinimumHeight

public static final int MinimumHeight

optionPane

protected JOptionPane optionPane
JOptionPane that the reciever is providing the look and feel for.

minimumSize

protected Dimension minimumSize

inputComponent

protected JComponent inputComponent
JComponent provide for input if optionPane.getWantsInput() returns true.

initialFocusComponent

protected Component initialFocusComponent
Component to receive focus when messaged with selectInitialValue.

hasCustomComponents

protected boolean hasCustomComponents
This is set to true in validateComponent if a Component is contained in either the message or the buttons.

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Constructor Detail

BasicOptionPaneUI

public BasicOptionPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)
Creates a new BasicOptionPaneUI instance.

installUI

public void installUI(JComponent c)
Installs the reciever as the L&F for the passed in JOptionPane
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Removes the receiver from the L&F controller of the passed in split pane.
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installComponents

protected void installComponents()

uninstallComponents

protected void uninstallComponents()

createLayoutManager

protected LayoutManager createLayoutManager()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getMinimumOptionPaneSize

public Dimension getMinimumOptionPaneSize()
Returns the minimum size the option pane should be. Primarily provided for subclassers wishin to offer a different minimum size.

getPreferredSize

public Dimension getPreferredSize(JComponent c)
If c is the JOptionPane the reciever is contained in, the preferred size that is returned is the maximum of the preferred size of the LayoutManager for the JOptionPane, and getMinimumOptionPaneSize.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Messages getPreferredSize.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Messages getPreferredSize.
Overrides:
getMaximumSize in class ComponentUI

createMessageArea

protected Container createMessageArea()
Messaged from installComponents to create a Container containing the body of the message. The icon is the created by calling addIcon.

addMessageComponents

protected void addMessageComponents(Container container,
                                    GridBagConstraints cons,
                                    Object msg,
                                    int maxll,
                                    boolean internallyCreated)
Creates the appropriate object to represent msg and places it into container. If msg is an instance of Component, it is added directly, if it is an Icon, a JLabel is created to represent it, otherwise a JLabel is created for the string, if d is an Object[], this method will be recursively invoked for the children. internallyCreated is true if Objc is an instance of Component and was created internally by this method (this is used to correctly set hasCustomComponents only if !internallyCreated).

getMessage

protected Object getMessage()
Returns the message to display from the JOptionPane the receiver is providing the look and feel for.

addIcon

protected void addIcon(Container top)
Creates and adds a JLabel representing the icon returned from getIcon to top. This is messaged from createMessageArea

getIcon

protected Icon getIcon()
Returns the icon from the JOptionPane the reciever is providing the look and feel for, or the default icon as returned from getDefaultIcon.

getIconForType

protected Icon getIconForType(int messageType)
Returns the icon to use for the passed in type.

getMaxCharactersPerLineCount

protected int getMaxCharactersPerLineCount()
Returns the maximum number of characters to place on a line.

burstStringInto

protected void burstStringInto(Container c,
                               String d,
                               int maxll)
Recursively creates new JLabel instances to represent d. Each JLabel instance is added to c.

createSeparator

protected Container createSeparator()

createButtonArea

protected Container createButtonArea()
Creates and returns a Container containin the buttons. The buttons are created by calling getButtons.

addButtonComponents

protected void addButtonComponents(Container container,
                                   Object[] buttons,
                                   int initialIndex)
Creates the appropriate object to represent each of the objects in buttons and adds it to container. This differs from addMessageComponents in that it will recurse on buttons and that if button is not a Component it will create an instance of JButton.

createButtonActionListener

protected ActionListener createButtonActionListener(int buttonIndex)

getButtons

protected Object[] getButtons()
Returns the buttons to display from the JOptionPane the receiver is providing the look and feel for. If the JOptionPane has options set, they will be provided, otherwise if the optionType is YES_NO_OPTION, yesNoOptions is returned, if the type is YES_NO_CANCEL_OPTION yesNoCancelOptions is returned, otherwise defaultButtons are returned.

getSizeButtonsToSameWidth

protected boolean getSizeButtonsToSameWidth()
Returns true, basic L&F wants all the buttons to have the same width.

getInitialValueIndex

protected int getInitialValueIndex()
Returns the initial index into the buttons to select. The index is calculated from the initial value from the JOptionPane and options of the JOptionPane or 0.

resetInputValue

protected void resetInputValue()
Sets the input value in the option pane the receiver is providing the look and feel for based on the value in the inputComponent.

selectInitialValue

public void selectInitialValue(JOptionPane op)
If inputComponent is non-null, the focus is requested on that, otherwise request focus on the default value
Overrides:
selectInitialValue in class OptionPaneUI

containsCustomComponents

public boolean containsCustomComponents(JOptionPane op)
Returns true if in the last call to validateComponent the message or buttons contained a subclass of Component.
Overrides:
containsCustomComponents in class OptionPaneUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicPanelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicPanelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PanelUI
              |
              +--javax.swing.plaf.basic.BasicPanelUI
public class BasicPanelUI
extends PanelUI

BasicPanel implementation

Constructor Summary
BasicPanelUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected void | installDefaults(JPanel p)
void | installUI(JComponent c)
protected void | uninstallDefaults(JPanel p)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicPanelUI

public BasicPanelUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JPanel p)

uninstallDefaults

protected void uninstallDefaults(JPanel p)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicPasswordFieldUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicPasswordFieldUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicTextFieldUI
                          |
                          +--javax.swing.plaf.basic.BasicPasswordFieldUI
All Implemented Interfaces:
ViewFactory
public class BasicPasswordFieldUI
extends BasicTextFieldUI

Provides the Windows look and feel for a password field. The only difference from the standard text field is that the view of the text is simply a string of the echo character as specified in JPasswordField, rather than the real text contained in the field.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
BasicPasswordFieldUI()
Method Summary
View | create(Element elem) Creates a view (PasswordView) for an element.
static ComponentUI | createUI(JComponent c) Creates a UI for a JPasswordField.
protected String | getPropertyPrefix() Fetches the name used as a key to look up properties through the UIManager.
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
createCaret, propertyChange
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicPasswordFieldUI

public BasicPasswordFieldUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a UI for a JPasswordField.
Parameters:
c - the JPasswordField
Returns:
the UI

getPropertyPrefix

protected String getPropertyPrefix()
Fetches the name used as a key to look up properties through the UIManager. This is used as a prefix to all the standard text properties.
Overrides:
getPropertyPrefix in class BasicTextFieldUI
Returns:
the name ("PasswordField")

create

public View create(Element elem)
Creates a view (PasswordView) for an element.
Overrides:
create in class BasicTextFieldUI
Parameters:
elem - the element
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicPopupMenuSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicPopupMenuSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.basic.BasicSeparatorUI
                    |
                    +--javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
public class BasicPopupMenuSeparatorUI
extends BasicSeparatorUI

A Basic L&F implementation of PopupMenuSeparatorUI. This implementation is a "combined" view/controller.

Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI
highlight, shadow
Constructor Summary
BasicPopupMenuSeparatorUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getPreferredSize(JComponent c)
void | paint(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI
getMaximumSize, getMinimumSize, installDefaults, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicPopupMenuSeparatorUI

public BasicPopupMenuSeparatorUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicSeparatorUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicSeparatorUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicPopupMenuUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicPopupMenuUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PopupMenuUI
              |
              +--javax.swing.plaf.basic.BasicPopupMenuUI
public class BasicPopupMenuUI
extends PopupMenuUI

A Windows L&F implementation of PopupMenuUI. This implementation is a "combined" view/controller.

Field Summary
protected  JPopupMenu popupMenu
Constructor Summary
BasicPopupMenuUI()
Method Summary
static ComponentUI | createUI(JComponent x)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c)
boolean | isPopupTrigger(MouseEvent e)
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

popupMenu

protected JPopupMenu popupMenu
Constructor Detail

BasicPopupMenuUI

public BasicPopupMenuUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

public void installDefaults()

installListeners

protected void installListeners()

installKeyboardActions

protected void installKeyboardActions()

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

isPopupTrigger

public boolean isPopupTrigger(MouseEvent e)
Overrides:
isPopupTrigger in class PopupMenuUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicProgressBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicProgressBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ProgressBarUI
              |
              +--javax.swing.plaf.basic.BasicProgressBarUI
Direct Known Subclasses:
MetalProgressBarUI
public class BasicProgressBarUI
extends ProgressBarUI

A Basic L&F implementation of ProgressBarUI.

Inner Class Summary
 class BasicProgressBarUI.ChangeHandler
This inner class is marked "public" due to a compiler bug.
Field Summary
protected ChangeListener | changeListener
protected JProgressBar | progressBar
Constructor Summary
BasicProgressBarUI()
Method Summary
static ComponentUI | createUI(JComponent x)
protected int | getAmountFull(Insets b, int width, int height) This determines the amount of the progress bar that should be filled based on the percent done gathered from the model.
protected int | getCellLength() Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar.
protected int | getCellSpacing() Returns the spacing between each of the cells/units in the progress bar.
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c) The Minimum size for this component is 10.
protected Dimension | getPreferredInnerHorizontal()
protected Dimension | getPreferredInnerVertical()
Dimension | getPreferredSize(JComponent c)
protected Color | getSelectionBackground() The "selectionBackground" is the color of the text when it is drawn over an unfilled area of the progress bar.
protected Color | getSelectionForeground() The "selectionForeground" is the color of the text when it is drawn over a filled area of the progress bar.
protected Point | getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height) Designate the place where the progress string will be drawn.
protected void | installDefaults()
protected void | installListeners()
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c) All purpose paint method that should do the right thing for almost all linear progress bars.
protected void | paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected void | setCellLength(int cellLen)
protected void | setCellSpacing(int cellSpace)
protected void | uninstallDefaults()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

progressBar

protected JProgressBar progressBar

changeListener

protected ChangeListener changeListener
Constructor Detail

BasicProgressBarUI

public BasicProgressBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

getPreferredInnerHorizontal

protected Dimension getPreferredInnerHorizontal()

getPreferredInnerVertical

protected Dimension getPreferredInnerVertical()

getSelectionForeground

protected Color getSelectionForeground()
The "selectionForeground" is the color of the text when it is drawn over a filled area of the progress bar.

getSelectionBackground

protected Color getSelectionBackground()
The "selectionBackground" is the color of the text when it is drawn over an unfilled area of the progress bar.

getCellLength

protected int getCellLength()
Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar. However, for text rendering simplification and aesthetic considerations, this function will return 1 when the progress string is being rendered.
Returns:
the value representing the spacing between cells
See Also:
setCellLength(int), JProgressBar.isStringPainted()

setCellLength

protected void setCellLength(int cellLen)

getCellSpacing

protected int getCellSpacing()
Returns the spacing between each of the cells/units in the progress bar. However, for text rendering simplification and aesthetic considerations, this function will return 0 when the progress string is being rendered.
Returns:
the value representing the spacing between cells
See Also:
setCellSpacing(int), JProgressBar.isStringPainted()

setCellSpacing

protected void setCellSpacing(int cellSpace)

getAmountFull

protected int getAmountFull(Insets b,
                            int width,
                            int height)
This determines the amount of the progress bar that should be filled based on the percent done gathered from the model. This is a common operation so it was abstracted out. It assumes that your progress bar is linear. That is, if you are making a circular progress indicator, you will want to override this method.

paint

public void paint(Graphics g,
                  JComponent c)
All purpose paint method that should do the right thing for almost all linear progress bars. By setting a few values in the defaults table, things should work just fine to paint your progress bar. Naturally, override this if you are making a circular or semi-circular progress bar.
Overrides:
paint in class ComponentUI

paintString

protected void paintString(Graphics g,
                           int x,
                           int y,
                           int width,
                           int height,
                           int amountFull,
                           Insets b)

getStringPlacement

protected Point getStringPlacement(Graphics g,
                                   String progressString,
                                   int x,
                                   int y,
                                   int width,
                                   int height)
Designate the place where the progress string will be drawn. This implementation places it at the center of the progress bar (in both x and y). Override this if you want to right, left, top, or bottom align the progress string or if you need to nudge it around for any reason.

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
The Minimum size for this component is 10. The rationale here is that there should be at least one pixel per 10 percent.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicRadioButtonMenuItemUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicRadioButtonMenuItemUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
                    |
                    +--javax.swing.plaf.basic.BasicMenuItemUI
                          |
                          +--javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
public class BasicRadioButtonMenuItemUI
extends BasicMenuItemUI

BasicRadioButtonMenuItem implementation

Inner classes inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
Constructor Summary
BasicRadioButtonMenuItemUI()
Method Summary
static ComponentUI | createUI(JComponent b)
protected String | getPropertyPrefix()
protected void | installDefaults()
void | processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, getMaximumSize, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installKeyboardActions, installListeners, installUI, paint, paintMenuItem, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicRadioButtonMenuItemUI

public BasicRadioButtonMenuItemUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicMenuItemUI

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicMenuItemUI

processMouseEvent

public void processMouseEvent(JMenuItem item,
                              MouseEvent e,
                              MenuElement[] path,
                              MenuSelectionManager manager)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicRadioButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicRadioButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
                          |
                          +--javax.swing.plaf.basic.BasicRadioButtonUI
Direct Known Subclasses:
BasicCheckBoxUI, MetalRadioButtonUI
public class BasicRadioButtonUI
extends BasicToggleButtonUI

RadioButtonUI implementation for BasicRadioButtonUI

Field Summary
protected  Icon icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
BasicRadioButtonUI()
Method Summary
static ComponentUI | createUI(JComponent b)
Icon | getDefaultIcon()
Dimension | getPreferredSize(JComponent c) The preferred size of the radio button
protected String | getPropertyPrefix()
protected void | installDefaults(AbstractButton b)
void | paint(Graphics g, JComponent c) paint the radio button
protected void | paintFocus(Graphics g, Rectangle textRect, Dimension size)
protected void | uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
paintButtonPressed, paintFocus, paintIcon, paintText
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

icon

protected Icon icon
Constructor Detail

BasicRadioButtonUI

public BasicRadioButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicToggleButtonUI

installDefaults

protected void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicButtonUI

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class BasicButtonUI

getDefaultIcon

public Icon getDefaultIcon()

paint

public void paint(Graphics g,
                  JComponent c)
paint the radio button
Overrides:
paint in class BasicToggleButtonUI

paintFocus

protected void paintFocus(Graphics g,
                          Rectangle textRect,
                          Dimension size)

getPreferredSize

public Dimension getPreferredSize(JComponent c)
The preferred size of the radio button
Overrides:
getPreferredSize in class BasicButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicRootPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicRootPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.RootPaneUI
              |
              +--javax.swing.plaf.basic.BasicRootPaneUI
All Implemented Interfaces:
EventListener, PropertyChangeListener
public class BasicRootPaneUI
extends RootPaneUI
implements PropertyChangeListener

Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.

Constructor Summary
BasicRootPaneUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected void | installComponents(JRootPane root)
protected void | installDefaults(JRootPane c)
protected void | installKeyboardActions(JRootPane root)
protected void | installListeners(JRootPane root)
void | installUI(JComponent c)
void | propertyChange(PropertyChangeEvent e) Invoked when a property changes on the root pane.
protected void | uninstallComponents(JRootPane root)
protected void | uninstallDefaults(JRootPane root)
protected void | uninstallKeyboardActions(JRootPane root)
protected void | uninstallListeners(JRootPane root)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicRootPaneUI

public BasicRootPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JRootPane c)

installComponents

protected void installComponents(JRootPane root)

installListeners

protected void installListeners(JRootPane root)

installKeyboardActions

protected void installKeyboardActions(JRootPane root)

uninstallDefaults

protected void uninstallDefaults(JRootPane root)

uninstallComponents

protected void uninstallComponents(JRootPane root)

uninstallListeners

protected void uninstallListeners(JRootPane root)

uninstallKeyboardActions

protected void uninstallKeyboardActions(JRootPane root)

propertyChange

public void propertyChange(PropertyChangeEvent e)
Invoked when a property changes on the root pane. If the event indicates the defaultButton has changed, this will reinstall the keyboard actions.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicScrollBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollBarUI
              |
              +--javax.swing.plaf.basic.BasicScrollBarUI
All Implemented Interfaces:
LayoutManager, SwingConstants
Direct Known Subclasses:
MetalScrollBarUI
public class BasicScrollBarUI
extends ScrollBarUI
implements LayoutManager, SwingConstants

Implementation of ScrollBarUI for the Basic Look and Feel

Inner Class Summary
protected class | BasicScrollBarUI.ArrowButtonListener Listener for cursor keys.
protected class | BasicScrollBarUI.ModelListener A listener to listen for model changes.
class | BasicScrollBarUI.PropertyChangeHandler
protected class | BasicScrollBarUI.ScrollListener Listener for scrolling events intiated in the ScrollPane.
protected class | BasicScrollBarUI.TrackListener Track mouse drags.
Field Summary
protected BasicScrollBarUI.ArrowButtonListener | buttonListener
protected JButton | decrButton
protected static int | DECREASE_HIGHLIGHT
protected JButton | incrButton
protected static int | INCREASE_HIGHLIGHT
protected boolean | isDragging
protected Dimension | maximumThumbSize
protected Dimension | minimumThumbSize
protected BasicScrollBarUI.ModelListener | modelListener
protected static int | NO_HIGHLIGHT
protected PropertyChangeListener | propertyChangeListener
protected JScrollBar | scrollbar
protected BasicScrollBarUI.ScrollListener | scrollListener
protected Timer | scrollTimer
protected Color | thumbColor
protected Color | thumbDarkShadowColor
protected Color | thumbHighlightColor
protected Color | thumbLightShadowColor
protected Rectangle | thumbRect
protected Color | trackColor
protected int | trackHighlight
protected Color | trackHighlightColor
protected BasicScrollBarUI.TrackListener | trackListener
protected Rectangle | trackRect
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
BasicScrollBarUI()
Method Summary
void | addLayoutComponent(String name, Component child) Adds the specified component with the specified name to the layout.
protected void | configureScrollBarColors()
protected BasicScrollBarUI.ArrowButtonListener | createArrowButtonListener()
protected JButton | createDecreaseButton(int orientation)
protected JButton | createIncreaseButton(int orientation)
protected BasicScrollBarUI.ModelListener | createModelListener()
protected PropertyChangeListener | createPropertyChangeListener()
protected BasicScrollBarUI.ScrollListener | createScrollListener()
protected BasicScrollBarUI.TrackListener | createTrackListener()
static ComponentUI | createUI(JComponent c)
Dimension | getMaximumSize(JComponent c)
protected Dimension | getMaximumThumbSize() Return the largest acceptable size for the thumb.
Dimension | getMinimumSize(JComponent c) A vertical scrollbars minimum width is the largest minimum width of the (non null) increment/decrement buttons, and the minimum width of the thumb.
protected Dimension | getMinimumThumbSize() Return the smallest acceptable size for the thumb.
Dimension | getPreferredSize(JComponent c) A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb.
protected Rectangle | getThumbBounds() Return the current size/location of the thumb.
protected Rectangle | getTrackBounds() Return the current bounds of the track, i.e.
protected void | installComponents()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c)
void | layoutContainer(Container scrollbarContainer) Lays out the container in the specified panel.
protected void | layoutHScrollbar(JScrollBar sb)
protected void | layoutVScrollbar(JScrollBar sb)
Dimension | minimumLayoutSize(Container scrollbarContainer) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
void | paint(Graphics g, JComponent c)
protected void | paintDecreaseHighlight(Graphics g)
protected void | paintIncreaseHighlight(Graphics g)
protected void | paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
protected void | paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
Dimension | preferredLayoutSize(Container scrollbarContainer) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component child) Removes the specified component from the layout.
protected void | scrollByBlock(int direction)
protected void | scrollByUnit(int direction)
protected void | setThumbBounds(int x, int y, int width, int height) Set the bounds of the thumb and force a repaint that includes the old thumbBounds and the new one.
protected void | uninstallComponents()
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

minimumThumbSize

protected Dimension minimumThumbSize

maximumThumbSize

protected Dimension maximumThumbSize

thumbHighlightColor

protected Color thumbHighlightColor

thumbLightShadowColor

protected Color thumbLightShadowColor

thumbDarkShadowColor

protected Color thumbDarkShadowColor

thumbColor

protected Color thumbColor

trackColor

protected Color trackColor

trackHighlightColor

protected Color trackHighlightColor

scrollbar

protected JScrollBar scrollbar

incrButton

protected JButton incrButton

decrButton

protected JButton decrButton

isDragging

protected boolean isDragging

trackListener

protected BasicScrollBarUI.TrackListener trackListener

buttonListener

protected BasicScrollBarUI.ArrowButtonListener buttonListener

modelListener

protected BasicScrollBarUI.ModelListener modelListener

thumbRect

protected Rectangle thumbRect

trackRect

protected Rectangle trackRect

trackHighlight

protected int trackHighlight

NO_HIGHLIGHT

protected static final int NO_HIGHLIGHT

DECREASE_HIGHLIGHT

protected static final int DECREASE_HIGHLIGHT

INCREASE_HIGHLIGHT

protected static final int INCREASE_HIGHLIGHT

scrollListener

protected BasicScrollBarUI.ScrollListener scrollListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

scrollTimer

protected Timer scrollTimer
Constructor Detail

BasicScrollBarUI

public BasicScrollBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

configureScrollBarColors

protected void configureScrollBarColors()

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

installComponents

protected void installComponents()

uninstallComponents

protected void uninstallComponents()

installListeners

protected void installListeners()

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

uninstallListeners

protected void uninstallListeners()

uninstallDefaults

protected void uninstallDefaults()

createTrackListener

protected BasicScrollBarUI.TrackListener createTrackListener()

createArrowButtonListener

protected BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()

createModelListener

protected BasicScrollBarUI.ModelListener createModelListener()

createScrollListener

protected BasicScrollBarUI.ScrollListener createScrollListener()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb. The preferred height is the sum of the preferred heights of the same parts. The basis for the preferred size of a horizontal scrollbar is similar.

The preferredSize is only computed once, subequent calls to this method just return a cached size. T

Overrides:
getPreferredSize in class ComponentUI
Parameters:
c - The JScrollBar that's delegating this method to us.
Returns:
The preferred size of a Basic JScrollBar.
See Also:
getMaximumSize(javax.swing.JComponent), getMinimumSize(javax.swing.JComponent)

getMinimumSize

public Dimension getMinimumSize(JComponent c)
A vertical scrollbars minimum width is the largest minimum width of the (non null) increment/decrement buttons, and the minimum width of the thumb. The minimum height is the sum of the minimum heights of the same parts. The basis for the preferred size of a horizontal scrollbar is similar.

The minimumSize is only computed once, subequent calls to this method just return a cached size. T

Overrides:
getMinimumSize in class ComponentUI
Parameters:
c - The JScrollBar that's delegating this method to us.
Returns:
The minimum size of a Basic JScrollBar.
See Also:
getMaximumSize(javax.swing.JComponent), getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Parameters:
c - The JScrollBar that's delegating this method to us.
Returns:
new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
See Also:
getMinimumSize(javax.swing.JComponent), getPreferredSize(javax.swing.JComponent)

createDecreaseButton

protected JButton createDecreaseButton(int orientation)

createIncreaseButton

protected JButton createIncreaseButton(int orientation)

paintDecreaseHighlight

protected void paintDecreaseHighlight(Graphics g)

paintIncreaseHighlight

protected void paintIncreaseHighlight(Graphics g)

paintTrack

protected void paintTrack(Graphics g,
                          JComponent c,
                          Rectangle trackBounds)

paintThumb

protected void paintThumb(Graphics g,
                          JComponent c,
                          Rectangle thumbBounds)

getMinimumThumbSize

protected Dimension getMinimumThumbSize()
Return the smallest acceptable size for the thumb. If the scrollbar becomes so small that this size isn't available, the thumb will be hidden.

Warning : the value returned by this method should not be be modified, it's a shared static constant.

Returns:
The smallest acceptable size for the thumb.
See Also:
getMaximumThumbSize()

getMaximumThumbSize

protected Dimension getMaximumThumbSize()
Return the largest acceptable size for the thumb. To create a fixed size thumb one make this method and getMinimumThumbSize return the same value.

Warning : the value returned by this method should not be be modified, it's a shared static constant.

Returns:
The largest acceptable size for the thumb.
See Also:
getMinimumThumbSize()

addLayoutComponent

public void addLayoutComponent(String name,
                               Component child)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component child)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container scrollbarContainer)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container scrollbarContainer)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

layoutVScrollbar

protected void layoutVScrollbar(JScrollBar sb)

layoutHScrollbar

protected void layoutHScrollbar(JScrollBar sb)

layoutContainer

public void layoutContainer(Container scrollbarContainer)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

setThumbBounds

protected void setThumbBounds(int x,
                              int y,
                              int width,
                              int height)
Set the bounds of the thumb and force a repaint that includes the old thumbBounds and the new one.
See Also:
getThumbBounds()

getThumbBounds

protected Rectangle getThumbBounds()
Return the current size/location of the thumb.

Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

Returns:
The current size/location of the thumb.
See Also:
setThumbBounds(int, int, int, int)

getTrackBounds

protected Rectangle getTrackBounds()
Return the current bounds of the track, i.e. the space in between the increment and decrement buttons, less the insets. The value returned by this method is updated each time the scrollbar is layed out (validated).

Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

Returns:
The current bounds of the scrollbar track.
See Also:
layoutContainer(java.awt.Container)

scrollByBlock

protected void scrollByBlock(int direction)

scrollByUnit

protected void scrollByUnit(int direction)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicScrollPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollPaneUI
              |
              +--javax.swing.plaf.basic.BasicScrollPaneUI
All Implemented Interfaces:
ScrollPaneConstants
Direct Known Subclasses:
MetalScrollPaneUI
public class BasicScrollPaneUI
extends ScrollPaneUI
implements ScrollPaneConstants

A default L&F implementation of ScrollPaneUI.

Inner Class Summary
class | BasicScrollPaneUI.HSBChangeListener Horizontal scrollbar listener.
class | BasicScrollPaneUI.PropertyChangeHandler
class | BasicScrollPaneUI.ViewportChangeHandler Listener for viewport events.
class | BasicScrollPaneUI.VSBChangeListener Vertical scrollbar listener.
Field Summary
protected ChangeListener | hsbChangeListener
protected JScrollPane | scrollpane
protected PropertyChangeListener | spPropertyChangeListener
protected ChangeListener | viewportChangeListener
protected ChangeListener | vsbChangeListener
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor Summary
BasicScrollPaneUI()
Method Summary
protected  ChangeListener createHSBChangeListener()
protected  PropertyChangeListener createPropertyChangeListener()
Creates an instance of PropertyChangeListener that's added to the JScrollPane by installUI().
static ComponentUI createUI(JComponent x)
protected  ChangeListener createViewportChangeListener()
protected  ChangeListener createVSBChangeListener()
 Dimension getMaximumSize(JComponent c)
 Dimension getMinimumSize(JComponent c)
 Dimension getPreferredSize(JComponent c)
protected  void installDefaults(JScrollPane scrollpane)
protected  void installKeyboardActions(JScrollPane c)
protected  void installListeners(JScrollPane c)
 void installUI(JComponent x)
 void paint(Graphics g, JComponent c)
protected  void syncScrollPaneWithViewport()
protected  void uninstallDefaults(JScrollPane c)
protected  void uninstallKeyboardActions(JScrollPane c)
protected  void uninstallListeners(JComponent c)
 void uninstallUI(JComponent c)
protected  void updateColumnHeader(PropertyChangeEvent e)
protected  void updateRowHeader(PropertyChangeEvent e)
protected  void updateScrollBarDisplayPolicy(PropertyChangeEvent e)
protected  void updateViewport(PropertyChangeEvent e)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

scrollpane

protected JScrollPane scrollpane

vsbChangeListener

protected ChangeListener vsbChangeListener

hsbChangeListener

protected ChangeListener hsbChangeListener

viewportChangeListener

protected ChangeListener viewportChangeListener

spPropertyChangeListener

protected PropertyChangeListener spPropertyChangeListener
Constructor Detail

BasicScrollPaneUI

public BasicScrollPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI
Returns:
null which indicates that the LayoutManager will compute the value
See Also:
JComponent.getPreferredSize()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI
Returns:
the preferred size
See Also:
getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Returns:
new Dimension(Short.MAX_VALUE, Short.MAX_VALUE)

installDefaults

protected void installDefaults(JScrollPane scrollpane)

installListeners

protected void installListeners(JScrollPane c)

installKeyboardActions

protected void installKeyboardActions(JScrollPane c)

installUI

public void installUI(JComponent x)
Overrides:
installUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults(JScrollPane c)

uninstallListeners

protected void uninstallListeners(JComponent c)

uninstallKeyboardActions

protected void uninstallKeyboardActions(JScrollPane c)

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

syncScrollPaneWithViewport

protected void syncScrollPaneWithViewport()

createViewportChangeListener

protected ChangeListener createViewportChangeListener()

createHSBChangeListener

protected ChangeListener createHSBChangeListener()

createVSBChangeListener

protected ChangeListener createVSBChangeListener()

updateScrollBarDisplayPolicy

protected void updateScrollBarDisplayPolicy(PropertyChangeEvent e)

updateViewport

protected void updateViewport(PropertyChangeEvent e)

updateRowHeader

protected void updateRowHeader(PropertyChangeEvent e)

updateColumnHeader

protected void updateColumnHeader(PropertyChangeEvent e)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates an instance of PropertyChangeListener that's added to the JScrollPane by installUI(). Subclasses can override this method to return a custom PropertyChangeListener, e.g.
 class MyScrollPaneUI extends BasicScrollPaneUI {
    protected PropertyChangeListener createPropertyListener() {
        return new MyPropertyListener();
    }
    public class MyPropertyListener extends PropertyListener {
        public void propertyChange(PropertyChangeEvent e) {
            if (e.getPropertyName().equals("viewport")) {
                // do some extra work when the viewport changes
            }
            super.propertyChange(e);
        }
    }
 }
See Also:
PropertyListener, installUI(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.basic.BasicSeparatorUI
Direct Known Subclasses:
BasicPopupMenuSeparatorUI, BasicToolBarSeparatorUI, MetalSeparatorUI
public class BasicSeparatorUI
extends SeparatorUI

A Basic L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.

Field Summary
protected Color | highlight
protected Color | shadow
Constructor Summary
BasicSeparatorUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults(JSeparator s)
protected void | installListeners(JSeparator s)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
protected void | uninstallDefaults(JSeparator s)
protected void | uninstallListeners(JSeparator s)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

shadow

protected Color shadow

highlight

protected Color highlight
Constructor Detail

BasicSeparatorUI

public BasicSeparatorUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JSeparator s)

uninstallDefaults

protected void uninstallDefaults(JSeparator s)

installListeners

protected void installListeners(JSeparator s)

uninstallListeners

protected void uninstallListeners(JSeparator s)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicSliderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SliderUI
              |
              +--javax.swing.plaf.basic.BasicSliderUI
Direct Known Subclasses:
MetalSliderUI
public class BasicSliderUI
extends SliderUI

A Basic L&F implementation of SliderUI.

Inner Class Summary
class | BasicSliderUI.ActionScroller As of Java 2 platform v1.3 this undocumented class is no longer used.
class | BasicSliderUI.ChangeHandler Data model listener.
class | BasicSliderUI.ComponentHandler Listener for resizing events.
class | BasicSliderUI.FocusHandler Focus-change listener.
class | BasicSliderUI.PropertyChangeHandler
class | BasicSliderUI.ScrollListener Scroll-event listener.
class | BasicSliderUI.TrackListener Track mouse movements.
Field Summary
protected ChangeListener | changeListener
protected ComponentListener | componentListener
protected Rectangle | contentRect
protected Insets | focusInsets
protected FocusListener | focusListener
protected Rectangle | focusRect
protected Insets | insetCache
protected Rectangle | labelRect
protected boolean | leftToRightCache
static int | MAX_SCROLL
static int | MIN_SCROLL
static int | NEGATIVE_SCROLL
static int | POSITIVE_SCROLL
protected PropertyChangeListener | propertyChangeListener
protected BasicSliderUI.ScrollListener | scrollListener
protected Timer | scrollTimer
protected JSlider | slider
protected Rectangle | thumbRect
protected Rectangle | tickRect
protected int | trackBuffer
protected BasicSliderUI.TrackListener | trackListener
protected Rectangle | trackRect
Constructor Summary
BasicSliderUI(JSlider b)
Method Summary
protected void | calculateContentRect()
protected void | calculateFocusRect()
protected void | calculateGeometry()
protected void | calculateLabelRect()
protected void | calculateThumbLocation()
protected void | calculateThumbSize()
protected void | calculateTickRect()
protected void | calculateTrackBuffer()
protected void | calculateTrackRect()
protected ChangeListener | createChangeListener(JSlider slider)
protected ComponentListener | createComponentListener(JSlider slider)
protected FocusListener | createFocusListener(JSlider slider)
protected PropertyChangeListener | createPropertyChangeListener(JSlider slider)
protected BasicSliderUI.ScrollListener | createScrollListener(JSlider slider)
protected BasicSliderUI.TrackListener | createTrackListener(JSlider slider)
static ComponentUI | createUI(JComponent b)
protected boolean | drawInverted()
protected Color | getFocusColor()
protected int | getHeightOfHighValueLabel()
protected int | getHeightOfLowValueLabel()
protected int | getHeightOfTallestLabel()
protected Component | getHighestValueLabel() Returns the label that corresponds to the lowest slider value in the label table.
protected Color | getHighlightColor()
protected Component | getLowestValueLabel() Returns the label that corresponds to the highest slider value in the label table.
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumHorizontalSize()
Dimension | getMinimumSize(JComponent c)
Dimension | getMinimumVerticalSize()
Dimension | getPreferredHorizontalSize()
Dimension | getPreferredSize(JComponent c)
Dimension | getPreferredVerticalSize()
protected Color | getShadowColor()
protected Dimension | getThumbSize()
protected int | getTickLength() Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
protected int | getWidthOfHighValueLabel()
protected int | getWidthOfLowValueLabel()
protected int | getWidthOfWidestLabel()
protected void | installDefaults(JSlider slider)
protected void | installKeyboardActions(JSlider slider)
protected void | installListeners(JSlider slider)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
void | paintFocus(Graphics g)
protected void | paintHorizontalLabel(Graphics g, int value, Component label) Called for every label in the label table.
void | paintLabels(Graphics g)
protected void | paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
void | paintThumb(Graphics g)
void | paintTicks(Graphics g)
void | paintTrack(Graphics g)
protected void | paintVerticalLabel(Graphics g, int value, Component label) Called for every label in the label table.
protected void | recalculateIfInsetsChanged()
protected void | recalculateIfOrientationChanged()
void | scrollByBlock(int direction)
void | scrollByUnit(int direction)
protected void | scrollDueToClickInTrack(int dir) This function is called when a mousePressed was detected in the track, not in the thumb.
void | setThumbLocation(int x, int y)
protected void | uninstallKeyboardActions(JSlider slider)
protected void | uninstallListeners(JSlider slider)
void | uninstallUI(JComponent c)
int | valueForXPosition(int xPos) Returns a value give an x position.
int | valueForYPosition(int yPos) Returns a value give a y position.
protected int | xPositionForValue(int value)
protected int | yPositionForValue(int value)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

POSITIVE_SCROLL

public static final int POSITIVE_SCROLL

NEGATIVE_SCROLL

public static final int NEGATIVE_SCROLL

MIN_SCROLL

public static final int MIN_SCROLL

MAX_SCROLL

public static final int MAX_SCROLL

scrollTimer

protected Timer scrollTimer

slider

protected JSlider slider

focusInsets

protected Insets focusInsets

insetCache

protected Insets insetCache

leftToRightCache

protected boolean leftToRightCache

focusRect

protected Rectangle focusRect

contentRect

protected Rectangle contentRect

labelRect

protected Rectangle labelRect

tickRect

protected Rectangle tickRect

trackRect

protected Rectangle trackRect

thumbRect

protected Rectangle thumbRect

trackBuffer

protected int trackBuffer

trackListener

protected BasicSliderUI.TrackListener trackListener

changeListener

protected ChangeListener changeListener

componentListener

protected ComponentListener componentListener

focusListener

protected FocusListener focusListener

scrollListener

protected BasicSliderUI.ScrollListener scrollListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Constructor Detail

BasicSliderUI

public BasicSliderUI(JSlider b)
Method Detail

getShadowColor

protected Color getShadowColor()

getHighlightColor

protected Color getHighlightColor()

getFocusColor

protected Color getFocusColor()

createUI

public static ComponentUI createUI(JComponent b)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JSlider slider)

createTrackListener

protected BasicSliderUI.TrackListener createTrackListener(JSlider slider)

createChangeListener

protected ChangeListener createChangeListener(JSlider slider)

createComponentListener

protected ComponentListener createComponentListener(JSlider slider)

createFocusListener

protected FocusListener createFocusListener(JSlider slider)

createScrollListener

protected BasicSliderUI.ScrollListener createScrollListener(JSlider slider)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener(JSlider slider)

installListeners

protected void installListeners(JSlider slider)

uninstallListeners

protected void uninstallListeners(JSlider slider)

installKeyboardActions

protected void installKeyboardActions(JSlider slider)

uninstallKeyboardActions

protected void uninstallKeyboardActions(JSlider slider)

getPreferredHorizontalSize

public Dimension getPreferredHorizontalSize()

getPreferredVerticalSize

public Dimension getPreferredVerticalSize()

getMinimumHorizontalSize

public Dimension getMinimumHorizontalSize()

getMinimumVerticalSize

public Dimension getMinimumVerticalSize()

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

calculateGeometry

protected void calculateGeometry()

calculateFocusRect

protected void calculateFocusRect()

calculateThumbSize

protected void calculateThumbSize()

calculateContentRect

protected void calculateContentRect()

calculateThumbLocation

protected void calculateThumbLocation()

calculateTrackBuffer

protected void calculateTrackBuffer()

calculateTrackRect

protected void calculateTrackRect()

getTickLength

protected int getTickLength()
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle. If you want to give your ticks some room, make this larger than you need and paint your ticks away from the sides in paintTicks().

calculateTickRect

protected void calculateTickRect()

calculateLabelRect

protected void calculateLabelRect()

getThumbSize

protected Dimension getThumbSize()

getWidthOfWidestLabel

protected int getWidthOfWidestLabel()

getHeightOfTallestLabel

protected int getHeightOfTallestLabel()

getWidthOfHighValueLabel

protected int getWidthOfHighValueLabel()

getWidthOfLowValueLabel

protected int getWidthOfLowValueLabel()

getHeightOfHighValueLabel

protected int getHeightOfHighValueLabel()

getHeightOfLowValueLabel

protected int getHeightOfLowValueLabel()

drawInverted

protected boolean drawInverted()

getLowestValueLabel

protected Component getLowestValueLabel()
Returns the label that corresponds to the highest slider value in the label table.
See Also:
JSlider.setLabelTable(java.util.Dictionary)

getHighestValueLabel

protected Component getHighestValueLabel()
Returns the label that corresponds to the lowest slider value in the label table.
See Also:
JSlider.setLabelTable(java.util.Dictionary)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

recalculateIfInsetsChanged

protected void recalculateIfInsetsChanged()

recalculateIfOrientationChanged

protected void recalculateIfOrientationChanged()

paintFocus

public void paintFocus(Graphics g)

paintTrack

public void paintTrack(Graphics g)

paintTicks

public void paintTicks(Graphics g)

paintMinorTickForHorizSlider

protected void paintMinorTickForHorizSlider(Graphics g,
                                            Rectangle tickBounds,
                                            int x)

paintMajorTickForHorizSlider

protected void paintMajorTickForHorizSlider(Graphics g,
                                            Rectangle tickBounds,
                                            int x)

paintMinorTickForVertSlider

protected void paintMinorTickForVertSlider(Graphics g,
                                           Rectangle tickBounds,
                                           int y)

paintMajorTickForVertSlider

protected void paintMajorTickForVertSlider(Graphics g,
                                           Rectangle tickBounds,
                                           int y)

paintLabels

public void paintLabels(Graphics g)

paintHorizontalLabel

protected void paintHorizontalLabel(Graphics g,
                                    int value,
                                    Component label)
Called for every label in the label table. Used to draw the labels for horizontal sliders. The graphics have been translated to labelRect.y already.
See Also:
JSlider.setLabelTable(java.util.Dictionary)

paintVerticalLabel

protected void paintVerticalLabel(Graphics g,
                                  int value,
                                  Component label)
Called for every label in the label table. Used to draw the labels for vertical sliders. The graphics have been translated to labelRect.x already.
See Also:
JSlider.setLabelTable(java.util.Dictionary)

paintThumb

public void paintThumb(Graphics g)

setThumbLocation

public void setThumbLocation(int x,
                             int y)

scrollByBlock

public void scrollByBlock(int direction)

scrollByUnit

public void scrollByUnit(int direction)

scrollDueToClickInTrack

protected void scrollDueToClickInTrack(int dir)
This function is called when a mousePressed was detected in the track, not in the thumb. The default behavior is to scroll by block. You can override this method to stop it from scrolling or to add additional behavior.

xPositionForValue

protected int xPositionForValue(int value)

yPositionForValue

protected int yPositionForValue(int value)

valueForYPosition

public int valueForYPosition(int yPos)
Returns a value give a y position. If yPos is past the track at the top or the bottom it will set the value to the min or max of the slider, depending if the slider is inverted or not.

valueForXPosition

public int valueForXPosition(int xPos)
Returns a value give an x position. If xPos is past the track at the left or the right it will set the value to the min or max of the slider, depending if the slider is inverted or not.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicSplitPaneDivider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneDivider

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.plaf.basic.BasicSplitPaneDivider
All Implemented Interfaces:
EventListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable
public class BasicSplitPaneDivider
extends Container
implements PropertyChangeListener

Divider used by BasicSplitPaneUI. Subclassers may wish to override paint to do something more interesting. The border effect is drawn in BasicSplitPaneUI, so if you don't like that border, reset it there. To conditionally drag from certain areas subclass mousePressed and call super when you wish the dragging to begin.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected class | BasicSplitPaneDivider.DividerLayout Used to layout a BasicSplitPaneDivider.
protected class | BasicSplitPaneDivider.DragController Handles the events during a dragging session for a HORIZONTAL_SPLIT orientated split pane.
protected class | BasicSplitPaneDivider.MouseHandler MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.
protected class | BasicSplitPaneDivider.VerticalDragController Handles the events during a dragging session for a VERTICAL_SPLIT orientated split pane.
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected int | dividerSize Size of the divider.
protected BasicSplitPaneDivider.DragController | dragger Handles mouse dragging message to do the actual dragging.
protected Component | hiddenDivider Divider that is used for noncontinuous layout mode.
protected JButton | leftButton Button for quickly toggling the left component.
protected BasicSplitPaneDivider.MouseHandler | mouseHandler Handles mouse events from both this class, and the split pane.
protected static int | ONE_TOUCH_OFFSET
protected static int | ONE_TOUCH_SIZE Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.
protected int | orientation Orientation of the JSplitPane.
protected JButton | rightButton Button for quickly toggling the right component.
protected JSplitPane | splitPane JSplitPane the receiver is contained in.
protected BasicSplitPaneUI | splitPaneUI UI this instance was created from.
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicSplitPaneDivider(BasicSplitPaneUI ui)
Creates an instance of BasicSplitPaneDivider.
Method Summary
protected JButton | createLeftOneTouchButton() Creates and return an instance of JButton that can be used to collapse the left component in the split pane.
protected JButton | createRightOneTouchButton() Creates and return an instance of JButton that can be used to collapse the right component in the split pane.
protected void | dragDividerTo(int location) Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.
protected void | finishDraggingTo(int location) Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.
BasicSplitPaneUI | getBasicSplitPaneUI() Returns the SplitPaneUI the receiver is currently in.
Border | getBorder() Returns the border of this component or null if no border is currently set.
int | getDividerSize() Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
Insets | getInsets() If a border has been set on this component, returns the border's insets, else calls super.getInsets.
Dimension | getMinimumSize() Returns dividerSize x dividerSize
Dimension | getPreferredSize() Returns dividerSize x dividerSize
protected void | oneTouchExpandableChanged() Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes.
void | paint(Graphics g) Paints the divider.
protected void | prepareForDragging() Message to prepare for dragging.
void | propertyChange(PropertyChangeEvent e) Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
void | setBasicSplitPaneUI(BasicSplitPaneUI newUI) Sets the SplitPaneUI that is using the receiver.
void | setBorder(Border border) Sets the border of this component.
void | setDividerSize(int newSize) Sets the size of the divider to newSize.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ONE_TOUCH_SIZE

protected static final int ONE_TOUCH_SIZE
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.

ONE_TOUCH_OFFSET

protected static final int ONE_TOUCH_OFFSET

dragger

protected BasicSplitPaneDivider.DragController dragger
Handles mouse dragging message to do the actual dragging.

splitPaneUI

protected BasicSplitPaneUI splitPaneUI
UI this instance was created from.

dividerSize

protected int dividerSize
Size of the divider.

hiddenDivider

protected Component hiddenDivider
Divider that is used for noncontinuous layout mode.

splitPane

protected JSplitPane splitPane
JSplitPane the receiver is contained in.

mouseHandler

protected BasicSplitPaneDivider.MouseHandler mouseHandler
Handles mouse events from both this class, and the split pane. Mouse events are handled for the splitpane since you want to be able to drag when clicking on the border of the divider, which is not drawn by the divider.

orientation

protected int orientation
Orientation of the JSplitPane.

leftButton

protected JButton leftButton
Button for quickly toggling the left component.

rightButton

protected JButton rightButton
Button for quickly toggling the right component.
Constructor Detail

BasicSplitPaneDivider

public BasicSplitPaneDivider(BasicSplitPaneUI ui)
Creates an instance of BasicSplitPaneDivider. Registers this instance for mouse events and mouse dragged events.
Method Detail

setBasicSplitPaneUI

public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
Sets the SplitPaneUI that is using the receiver.

getBasicSplitPaneUI

public BasicSplitPaneUI getBasicSplitPaneUI()
Returns the SplitPaneUI the receiver is currently in.

setDividerSize

public void setDividerSize(int newSize)
Sets the size of the divider to newSize. That is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.

getDividerSize

public int getDividerSize()
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.

setBorder

public void setBorder(Border border)
Sets the border of this component.
Since:
1.3

getBorder

public Border getBorder()
Returns the border of this component or null if no border is currently set.
Returns:
the border object for this component
Since:
1.3
See Also:
setBorder(javax.swing.border.Border)

getInsets

public Insets getInsets()
If a border has been set on this component, returns the border's insets, else calls super.getInsets.
Overrides:
getInsets in class Container
Returns:
the value of the insets property.
See Also:
setBorder(javax.swing.border.Border)

getPreferredSize

public Dimension getPreferredSize()
Returns dividerSize x dividerSize
Overrides:
getPreferredSize in class Container
Following copied from class: java.awt.Container
Returns:
an instance of Dimension that represents the preferred size of this container.
See Also:
Container.getMinimumSize(),
Container.getLayout(),
LayoutManager.preferredLayoutSize(java.awt.Container),
Component.getPreferredSize()

getMinimumSize

public Dimension getMinimumSize()
Returns dividerSize x dividerSize
Overrides:
getMinimumSize in class Container
Following copied from class: java.awt.Container
Returns:
an instance of Dimension that represents the minimum size of this container.
See Also:
Container.getPreferredSize(),
Container.getLayout(),
LayoutManager.minimumLayoutSize(java.awt.Container),
Component.getMinimumSize()

propertyChange

public void propertyChange(PropertyChangeEvent e)
Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

paint

public void paint(Graphics g)
Paints the divider.
Overrides:
paint in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

oneTouchExpandableChanged

protected void oneTouchExpandableChanged()
Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes. Will create the leftButton and rightButton if they are null. invalidates the receiver as well.

createLeftOneTouchButton

protected JButton createLeftOneTouchButton()
Creates and return an instance of JButton that can be used to collapse the left component in the split pane.

createRightOneTouchButton

protected JButton createRightOneTouchButton()
Creates and return an instance of JButton that can be used to collapse the right component in the split pane.

prepareForDragging

protected void prepareForDragging()
Message to prepare for dragging. This messages the BasicSplitPaneUI with startDragging.

dragDividerTo

protected void dragDividerTo(int location)
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.

finishDraggingTo

protected void finishDraggingTo(int location)
Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicSplitPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SplitPaneUI
              |
              +--javax.swing.plaf.basic.BasicSplitPaneUI
Direct Known Subclasses:
MetalSplitPaneUI
public class BasicSplitPaneUI
extends SplitPaneUI

A Basic L&F implementation of the SplitPaneUI.

Inner Class Summary
class | BasicSplitPaneUI.BasicHorizontalLayoutManager LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
class | BasicSplitPaneUI.BasicVerticalLayoutManager LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
class | BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses.
class | BasicSplitPaneUI.KeyboardDownRightHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardEndHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardHomeHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardResizeToggleHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.KeyboardUpLeftHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
class | BasicSplitPaneUI.PropertyHandler Implementation of the PropertyChangeListener that the JSplitPane UI uses.
Field Summary
protected int | beginDragDividerLocation Location of the divider when the dragging session began.
protected BasicSplitPaneDivider | divider Instance of the divider for this JSplitPane.
protected KeyStroke | dividerResizeToggleKey Deprecated. As of Java 2 platform v1.3.
protected int | dividerSize The size of the divider while the dragging session is valid.
protected KeyStroke | downKey Deprecated. As of Java 2 platform v1.3.
protected boolean | draggingHW Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.
protected KeyStroke | endKey Deprecated. As of Java 2 platform v1.3.
protected FocusListener | focusListener Instance of the FocusListener for this JSplitPane.
protected KeyStroke | homeKey Deprecated. As of Java 2 platform v1.3.
protected static int | KEYBOARD_DIVIDER_MOVE_OFFSET How far (relativ) the divider does move when it is moved around by the cursor keys on the keyboard.
protected ActionListener | keyboardDownRightListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | keyboardEndListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | keyboardHomeListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | keyboardResizeToggleListener Deprecated. As of Java 2 platform v1.3.
protected ActionListener | keyboardUpLeftListener Deprecated. As of Java 2 platform v1.3.
protected BasicSplitPaneUI.BasicHorizontalLayoutManager | layoutManager LayoutManager that is created and placed into the split pane.
protected KeyStroke | leftKey Deprecated. As of Java 2 platform v1.3.
protected static String | NON_CONTINUOUS_DIVIDER The divider used for non-continuous layout is added to the split pane with this object.
protected Component | nonContinuousLayoutDivider Instance for the shadow of the divider when non continuous layout is being used.
protected PropertyChangeListener | propertyChangeListener Instance of the PropertyChangeListener for this JSplitPane.
protected KeyStroke | rightKey Deprecated. As of Java 2 platform v1.3.
protected JSplitPane | splitPane JSplitPane instance this instance is providing the look and feel for.
protected KeyStroke | upKey Deprecated. As of Java 2 platform v1.3.
Constructor Summary
BasicSplitPaneUI()
Method Summary
BasicSplitPaneDivider | createDefaultDivider() Creates the default divider.
protected Component | createDefaultNonContinuousLayoutDivider() Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.
protected FocusListener | createFocusListener() Creates a FocusListener for the JSplitPane UI.
protected ActionListener | createKeyboardDownRightListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | createKeyboardEndListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | createKeyboardHomeListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | createKeyboardResizeToggleListener() Deprecated. As of Java 2 platform v1.3.
protected ActionListener | createKeyboardUpLeftListener() Deprecated. As of Java 2 platform v1.3.
protected PropertyChangeListener | createPropertyChangeListener() Creates a PropertyChangeListener for the JSplitPane UI.
static ComponentUI | createUI(JComponent x) Creates a new BasicSplitPaneUI instance
protected void | dragDividerTo(int location) Messaged during a dragging session to move the divider to the passed in location.
protected void | finishDraggingTo(int location) Messaged to finish the dragging session.
void | finishedPaintingChildren(JSplitPane jc, Graphics g) Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
BasicSplitPaneDivider | getDivider() Returns the divider between the top Components.
protected int | getDividerBorderSize() Deprecated. As of Java 2 platform v1.3, instead set the border on the divider.
int | getDividerLocation(JSplitPane jc) Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
Insets | getInsets(JComponent jc) Returns the insets.
int | getLastDragLocation() Returns the last drag location of the JSplitPane.
int | getMaximumDividerLocation(JSplitPane jc) Gets the maximum location of the divider.
Dimension | getMaximumSize(JComponent jc) Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
int | getMinimumDividerLocation(JSplitPane jc) Gets the minimum location of the divider.
Dimension | getMinimumSize(JComponent jc) Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
Component | getNonContinuousLayoutDivider() Returns the divider to use when the splitPane is configured to not continuously layout.
int | getOrientation() Returns the orientation for the JSplitPane.
Dimension | getPreferredSize(JComponent jc) Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
JSplitPane | getSplitPane() Returns the splitpane this instance is currently contained in.
protected void | installDefaults() Installs the UI defaults.
protected void | installKeyboardActions() Installs the keyboard actions for the UI.
protected void | installListeners() Installs the event listeners for the UI.
void | installUI(JComponent c) Installs the UI.
boolean | isContinuousLayout() Determines wether the JSplitPane is set to use a continuous layout.
void | paint(Graphics g, JComponent jc) Messaged to paint the look and feel.
protected void | resetLayoutManager() Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.
void | resetToPreferredSizes(JSplitPane jc) Messaged to reset the preferred sizes.
void | setContinuousLayout(boolean b) Turn continuous layout on/off.
void | setDividerLocation(JSplitPane jc, int location) Sets the location of the divider to location.
void | setLastDragLocation(int l) Set the last drag location of the JSplitPane.
protected void | setNonContinuousLayoutDivider(Component newDivider) Sets the divider to use when the splitPane is configured to not continuously layout.
protected void | setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes) Sets the divider to use.
void | setOrientation(int orientation) Set the orientation for the JSplitPane.
protected void | startDragging() Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.
protected void | uninstallDefaults() Uninstalls the UI defaults.
protected void | uninstallKeyboardActions() Uninstalls the keyboard actions for the UI.
protected void | uninstallListeners() Uninstalls the event listeners for the UI.
void | uninstallUI(JComponent c) Uninstalls the UI.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NON_CONTINUOUS_DIVIDER

protected static final String NON_CONTINUOUS_DIVIDER
The divider used for non-continuous layout is added to the split pane with this object.

KEYBOARD_DIVIDER_MOVE_OFFSET

protected static int KEYBOARD_DIVIDER_MOVE_OFFSET
How far (relativ) the divider does move when it is moved around by the cursor keys on the keyboard.

splitPane

protected JSplitPane splitPane
JSplitPane instance this instance is providing the look and feel for.

layoutManager

protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager
LayoutManager that is created and placed into the split pane.

divider

protected BasicSplitPaneDivider divider
Instance of the divider for this JSplitPane.

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Instance of the PropertyChangeListener for this JSplitPane.

focusListener

protected FocusListener focusListener
Instance of the FocusListener for this JSplitPane.

dividerSize

protected int dividerSize
The size of the divider while the dragging session is valid.

nonContinuousLayoutDivider

protected Component nonContinuousLayoutDivider
Instance for the shadow of the divider when non continuous layout is being used.

draggingHW

protected boolean draggingHW
Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.

beginDragDividerLocation

protected int beginDragDividerLocation
Location of the divider when the dragging session began.

upKey

protected KeyStroke upKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

downKey

protected KeyStroke downKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

leftKey

protected KeyStroke leftKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

rightKey

protected KeyStroke rightKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

homeKey

protected KeyStroke homeKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

endKey

protected KeyStroke endKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

dividerResizeToggleKey

protected KeyStroke dividerResizeToggleKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardUpLeftListener

protected ActionListener keyboardUpLeftListener
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardDownRightListener

protected ActionListener keyboardDownRightListener
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardHomeListener

protected ActionListener keyboardHomeListener
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardEndListener

protected ActionListener keyboardEndListener
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardResizeToggleListener

protected ActionListener keyboardResizeToggleListener
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Constructor Detail

BasicSplitPaneUI

public BasicSplitPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)
Creates a new BasicSplitPaneUI instance

installUI

public void installUI(JComponent c)
Installs the UI.
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults()
Installs the UI defaults.

installListeners

protected void installListeners()
Installs the event listeners for the UI.

installKeyboardActions

protected void installKeyboardActions()
Installs the keyboard actions for the UI.

uninstallUI

public void uninstallUI(JComponent c)
Uninstalls the UI.
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()
Uninstalls the UI defaults.

uninstallListeners

protected void uninstallListeners()
Uninstalls the event listeners for the UI.

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Uninstalls the keyboard actions for the UI.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates a PropertyChangeListener for the JSplitPane UI.

createFocusListener

protected FocusListener createFocusListener()
Creates a FocusListener for the JSplitPane UI.

createKeyboardUpLeftListener

protected ActionListener createKeyboardUpLeftListener()
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.

createKeyboardDownRightListener

protected ActionListener createKeyboardDownRightListener()
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.

createKeyboardHomeListener

protected ActionListener createKeyboardHomeListener()
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.

createKeyboardEndListener

protected ActionListener createKeyboardEndListener()
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.

createKeyboardResizeToggleListener

protected ActionListener createKeyboardResizeToggleListener()
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.

getOrientation

public int getOrientation()
Returns the orientation for the JSplitPane.

setOrientation

public void setOrientation(int orientation)
Set the orientation for the JSplitPane.

isContinuousLayout

public boolean isContinuousLayout()
Determines wether the JSplitPane is set to use a continuous layout.

setContinuousLayout

public void setContinuousLayout(boolean b)
Turn continuous layout on/off.

getLastDragLocation

public int getLastDragLocation()
Returns the last drag location of the JSplitPane.

setLastDragLocation

public void setLastDragLocation(int l)
Set the last drag location of the JSplitPane.

getDivider

public BasicSplitPaneDivider getDivider()
Returns the divider between the top Components.

createDefaultNonContinuousLayoutDivider

protected Component createDefaultNonContinuousLayoutDivider()
Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.

setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider)
Sets the divider to use when the splitPane is configured to not continuously layout. This divider will only be used during a dragging session. It is recommended that the passed in component be a heavy weight.

setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider,
                                             boolean rememberSizes)
Sets the divider to use.

getNonContinuousLayoutDivider

public Component getNonContinuousLayoutDivider()
Returns the divider to use when the splitPane is configured to not continuously layout. This divider will only be used during a dragging session.

getSplitPane

public JSplitPane getSplitPane()
Returns the splitpane this instance is currently contained in.

createDefaultDivider

public BasicSplitPaneDivider createDefaultDivider()
Creates the default divider.

resetToPreferredSizes

public void resetToPreferredSizes(JSplitPane jc)
Messaged to reset the preferred sizes.
Overrides:
resetToPreferredSizes in class SplitPaneUI

setDividerLocation

public void setDividerLocation(JSplitPane jc,
                               int location)
Sets the location of the divider to location.
Overrides:
setDividerLocation in class SplitPaneUI

getDividerLocation

public int getDividerLocation(JSplitPane jc)
Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
Overrides:
getDividerLocation in class SplitPaneUI

getMinimumDividerLocation

public int getMinimumDividerLocation(JSplitPane jc)
Gets the minimum location of the divider.
Overrides:
getMinimumDividerLocation in class SplitPaneUI

getMaximumDividerLocation

public int getMaximumDividerLocation(JSplitPane jc)
Gets the maximum location of the divider.
Overrides:
getMaximumDividerLocation in class SplitPaneUI

finishedPaintingChildren

public void finishedPaintingChildren(JSplitPane jc,
                                     Graphics g)
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
Overrides:
finishedPaintingChildren in class SplitPaneUI

paint

public void paint(Graphics g,
                  JComponent jc)
Messaged to paint the look and feel.
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent jc)
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent jc)
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent jc)
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
Overrides:
getMaximumSize in class ComponentUI

getInsets

public Insets getInsets(JComponent jc)
Returns the insets. The insets are returned from the broder insets of the current border.

resetLayoutManager

protected void resetLayoutManager()
Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.

startDragging

protected void startDragging()
Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.

dragDividerTo

protected void dragDividerTo(int location)
Messaged during a dragging session to move the divider to the passed in location. If continuousLayout is true the location is reset and the splitPane validated.

finishDraggingTo

protected void finishDraggingTo(int location)
Messaged to finish the dragging session. If not continuous display the dividers location will be reset.

getDividerBorderSize

protected int getDividerBorderSize()
Deprecated. As of Java 2 platform v1.3, instead set the border on the divider.

As of Java 2 platform v1.3 this method is no longer used. Instead you should set the border on the divider.

Returns the width of one side of the divider border.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTabbedPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TabbedPaneUI
              |
              +--javax.swing.plaf.basic.BasicTabbedPaneUI
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
MetalTabbedPaneUI
public class BasicTabbedPaneUI
extends TabbedPaneUI
implements SwingConstants

A Basic L&F implementation of TabbedPaneUI.

Inner Class Summary
class | BasicTabbedPaneUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.MouseHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.PropertyChangeHandler This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.TabbedPaneLayout This inner class is marked "public" due to a compiler bug.
class | BasicTabbedPaneUI.TabSelectionHandler This inner class is marked "public" due to a compiler bug.
Field Summary
protected Insets | contentBorderInsets
protected Color | darkShadow
protected KeyStroke | downKey Deprecated. As of Java 2 platform v1.3.
protected Color | focus
protected FocusListener | focusListener
protected Color | highlight
protected KeyStroke | leftKey Deprecated. As of Java 2 platform v1.3.
protected Color | lightHighlight
protected int | maxTabHeight
protected int | maxTabWidth
protected MouseListener | mouseListener
protected PropertyChangeListener | propertyChangeListener
protected Rectangle[] | rects
protected KeyStroke | rightKey Deprecated. As of Java 2 platform v1.3.
protected int | runCount
protected int | selectedRun
protected Insets | selectedTabPadInsets
protected Color | shadow
protected Insets | tabAreaInsets
protected ChangeListener | tabChangeListener
protected Insets | tabInsets
protected JTabbedPane | tabPane
protected int | tabRunOverlay
protected int[] | tabRuns
protected int | textIconGap
protected KeyStroke | upKey Deprecated. As of Java 2 platform v1.3.
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
BasicTabbedPaneUI()
Method Summary
protected void | assureRectsCreated(int tabCount)
protected int | calculateMaxTabHeight(int tabPlacement)
protected int | calculateMaxTabWidth(int tabPlacement)
protected int | calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)
protected int | calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)
protected int | calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
protected int | calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
protected ChangeListener | createChangeListener()
protected FocusListener | createFocusListener()
protected LayoutManager | createLayoutManager()
protected MouseListener | createMouseListener()
protected PropertyChangeListener | createPropertyChangeListener()
static ComponentUI | createUI(JComponent c)
protected void | expandTabRunsArray()
protected Insets | getContentBorderInsets(int tabPlacement)
protected FontMetrics | getFontMetrics()
protected Icon | getIconForTab(int tabIndex)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
protected int | getNextTabIndex(int base)
Dimension | getPreferredSize(JComponent c)
protected int | getPreviousTabIndex(int base)
protected int | getRunForTab(int tabCount, int tabIndex)
protected Insets | getSelectedTabPadInsets(int tabPlacement)
protected Insets | getTabAreaInsets(int tabPlacement)
Rectangle | getTabBounds(JTabbedPane pane, int i)
protected Insets | getTabInsets(int tabPlacement, int tabIndex)
protected int | getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
protected int | getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
int | getTabRunCount(JTabbedPane pane)
protected int | getTabRunIndent(int tabPlacement, int run)
protected int | getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)
protected int | getTabRunOverlay(int tabPlacement)
protected Component | getVisibleComponent()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c)
protected int | lastTabInRun(int tabCount, int run)
protected void | layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void | navigateSelectedTab(int direction)
void | paint(Graphics g, JComponent c)
protected void | paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
protected void | paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void | paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
protected void | paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
protected void | paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected void | paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) this function draws the border around each tab note that this function does now draw the background of the tab.
protected void | paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected static void | rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)
protected void | selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)
protected void | selectNextTab(int current)
protected void | selectPreviousTab(int current)
protected void | setVisibleComponent(Component component)
protected boolean | shouldPadTabRun(int tabPlacement, int run)
protected boolean | shouldRotateTabRuns(int tabPlacement)
int | tabForCoordinate(JTabbedPane pane, int x, int y)
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

tabPane

protected JTabbedPane tabPane

highlight

protected Color highlight

lightHighlight

protected Color lightHighlight

shadow

protected Color shadow

darkShadow

protected Color darkShadow

focus

protected Color focus

textIconGap

protected int textIconGap

tabRunOverlay

protected int tabRunOverlay

tabInsets

protected Insets tabInsets

selectedTabPadInsets

protected Insets selectedTabPadInsets

tabAreaInsets

protected Insets tabAreaInsets

contentBorderInsets

protected Insets contentBorderInsets

upKey

protected KeyStroke upKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

downKey

protected KeyStroke downKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

leftKey

protected KeyStroke leftKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

rightKey

protected KeyStroke rightKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

tabRuns

protected int[] tabRuns

runCount

protected int runCount

selectedRun

protected int selectedRun

rects

protected Rectangle[] rects

maxTabHeight

protected int maxTabHeight

maxTabWidth

protected int maxTabWidth

tabChangeListener

protected ChangeListener tabChangeListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

mouseListener

protected MouseListener mouseListener

focusListener

protected FocusListener focusListener
Constructor Detail

BasicTabbedPaneUI

public BasicTabbedPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

createLayoutManager

protected LayoutManager createLayoutManager()

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

createMouseListener

protected MouseListener createMouseListener()

createFocusListener

protected FocusListener createFocusListener()

createChangeListener

protected ChangeListener createChangeListener()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

paintTab

protected void paintTab(Graphics g,
                        int tabPlacement,
                        Rectangle[] rects,
                        int tabIndex,
                        Rectangle iconRect,
                        Rectangle textRect)

layoutLabel

protected void layoutLabel(int tabPlacement,
                           FontMetrics metrics,
                           int tabIndex,
                           String title,
                           Icon icon,
                           Rectangle tabRect,
                           Rectangle iconRect,
                           Rectangle textRect,
                           boolean isSelected)

paintIcon

protected void paintIcon(Graphics g,
                         int tabPlacement,
                         int tabIndex,
                         Icon icon,
                         Rectangle iconRect,
                         boolean isSelected)

paintText

protected void paintText(Graphics g,
                         int tabPlacement,
                         Font font,
                         FontMetrics metrics,
                         int tabIndex,
                         String title,
                         Rectangle textRect,
                         boolean isSelected)

getTabLabelShiftX

protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)

getTabLabelShiftY

protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int tabPlacement,
                                   Rectangle[] rects,
                                   int tabIndex,
                                   Rectangle iconRect,
                                   Rectangle textRect,
                                   boolean isSelected)

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
this function draws the border around each tab note that this function does now draw the background of the tab. that is done elsewhere

paintTabBackground

protected void paintTabBackground(Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)

paintContentBorder

protected void paintContentBorder(Graphics g,
                                  int tabPlacement,
                                  int selectedIndex)

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)

getTabBounds

public Rectangle getTabBounds(JTabbedPane pane,
                              int i)
Overrides:
getTabBounds in class TabbedPaneUI

getTabRunCount

public int getTabRunCount(JTabbedPane pane)
Overrides:
getTabRunCount in class TabbedPaneUI

tabForCoordinate

public int tabForCoordinate(JTabbedPane pane,
                            int x,
                            int y)
Overrides:
tabForCoordinate in class TabbedPaneUI

getVisibleComponent

protected Component getVisibleComponent()

setVisibleComponent

protected void setVisibleComponent(Component component)

assureRectsCreated

protected void assureRectsCreated(int tabCount)

expandTabRunsArray

protected void expandTabRunsArray()

getRunForTab

protected int getRunForTab(int tabCount,
                           int tabIndex)

lastTabInRun

protected int lastTabInRun(int tabCount,
                           int run)

getTabRunOverlay

protected int getTabRunOverlay(int tabPlacement)

getTabRunIndent

protected int getTabRunIndent(int tabPlacement,
                              int run)

shouldPadTabRun

protected boolean shouldPadTabRun(int tabPlacement,
                                  int run)

shouldRotateTabRuns

protected boolean shouldRotateTabRuns(int tabPlacement)

getIconForTab

protected Icon getIconForTab(int tabIndex)

calculateTabHeight

protected int calculateTabHeight(int tabPlacement,
                                 int tabIndex,
                                 int fontHeight)

calculateMaxTabHeight

protected int calculateMaxTabHeight(int tabPlacement)

calculateTabWidth

protected int calculateTabWidth(int tabPlacement,
                                int tabIndex,
                                FontMetrics metrics)

calculateMaxTabWidth

protected int calculateMaxTabWidth(int tabPlacement)

calculateTabAreaHeight

protected int calculateTabAreaHeight(int tabPlacement,
                                     int horizRunCount,
                                     int maxTabHeight)

calculateTabAreaWidth

protected int calculateTabAreaWidth(int tabPlacement,
                                    int vertRunCount,
                                    int maxTabWidth)

getTabInsets

protected Insets getTabInsets(int tabPlacement,
                              int tabIndex)

getSelectedTabPadInsets

protected Insets getSelectedTabPadInsets(int tabPlacement)

getTabAreaInsets

protected Insets getTabAreaInsets(int tabPlacement)

getContentBorderInsets

protected Insets getContentBorderInsets(int tabPlacement)

getFontMetrics

protected FontMetrics getFontMetrics()

navigateSelectedTab

protected void navigateSelectedTab(int direction)

selectNextTab

protected void selectNextTab(int current)

selectPreviousTab

protected void selectPreviousTab(int current)

selectAdjacentRunTab

protected void selectAdjacentRunTab(int tabPlacement,
                                    int tabIndex,
                                    int offset)

getTabRunOffset

protected int getTabRunOffset(int tabPlacement,
                              int tabCount,
                              int tabIndex,
                              boolean forward)

getPreviousTabIndex

protected int getPreviousTabIndex(int base)

getNextTabIndex

protected int getNextTabIndex(int base)

rotateInsets

protected static void rotateInsets(Insets topInsets,
                                   Insets targetInsets,
                                   int targetPlacement)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTableHeaderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableHeaderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableHeaderUI
              |
              +--javax.swing.plaf.basic.BasicTableHeaderUI
public class BasicTableHeaderUI
extends TableHeaderUI

BasicTableHeaderUI implementation

Inner Class Summary
 class BasicTableHeaderUI.MouseInputHandler
This inner class is marked "public" due to a compiler bug.
Field Summary
protected JTableHeader | header The JTableHeader that is delegating the painting to this UI.
protected MouseInputListener | mouseInputListener
protected CellRendererPane | rendererPane
Constructor Summary
BasicTableHeaderUI()
Method Summary
protected MouseInputListener | createMouseInputListener() Creates the mouse listener for the JTable.
static ComponentUI | createUI(JComponent h)
Dimension | getMaximumSize(JComponent c) Return the maximum size of the header.
Dimension | getMinimumSize(JComponent c) Return the minimum size of the header.
Dimension | getPreferredSize(JComponent c) Return the preferred size of the header.
protected void | installDefaults() Initialize JTableHeader properties, e.g.
protected void | installKeyboardActions() Register all keyboard actions on the JTableHeader.
protected void | installListeners() Attaches listeners to the JTableHeader.
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

header

protected JTableHeader header
The JTableHeader that is delegating the painting to this UI.

rendererPane

protected CellRendererPane rendererPane

mouseInputListener

protected MouseInputListener mouseInputListener
Constructor Detail

BasicTableHeaderUI

public BasicTableHeaderUI()
Method Detail

createMouseInputListener

protected MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTable.

createUI

public static ComponentUI createUI(JComponent h)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults()
Initialize JTableHeader properties, e.g. font, foreground, and background. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.
See Also:
installUI(javax.swing.JComponent)

installListeners

protected void installListeners()
Attaches listeners to the JTableHeader.

installKeyboardActions

protected void installKeyboardActions()
Register all keyboard actions on the JTableHeader.

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Return the minimum size of the header. The minimum width is the sum of the minimum widths of each column (plus inter-cell spacing).
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Return the preferred size of the header. The preferred height is the maximum of the preferred heights of all of the components provided by the header renderers. The preferred width is the sum of the preferred widths of each column (plus inter-cell spacing).
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Return the maximum size of the header. The maximum width is the sum of the maximum widths of each column (plus inter-cell spacing).
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTableUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableUI
              |
              +--javax.swing.plaf.basic.BasicTableUI
public class BasicTableUI
extends TableUI

BasicTableUI implementation

Inner Class Summary
class | BasicTableUI.FocusHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.KeyHandler This inner class is marked "public" due to a compiler bug.
class | BasicTableUI.MouseInputHandler This inner class is marked "public" due to a compiler bug.
Field Summary
protected FocusListener | focusListener
protected KeyListener | keyListener
protected MouseInputListener | mouseInputListener
protected CellRendererPane | rendererPane
protected JTable | table
Constructor Summary
BasicTableUI()
Method Summary
protected  FocusListener createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable.
protected  KeyListener createKeyListener()
Creates the key listener for handling keyboard navigation in the JTable.
protected  MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTable.
static ComponentUI createUI(JComponent c)
 Dimension getMaximumSize(JComponent c)
Return the maximum size of the table.
 Dimension getMinimumSize(JComponent c)
Return the minimum size of the table.
 Dimension getPreferredSize(JComponent c)
Return the preferred size of the table.
protected  void installDefaults()
Initialize JTable properties, e.g.
protected  void installKeyboardActions()
Register all keyboard actions on the JTable.
protected  void installListeners()
Attaches listeners to the JTable.
 void installUI(JComponent c)
 void paint(Graphics g, JComponent c)
Paint a representation of the table instance that was set in installUI().
protected  void uninstallDefaults()
protected  void uninstallKeyboardActions()
protected  void uninstallListeners()
 void uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

table

protected JTable table

rendererPane

protected CellRendererPane rendererPane

keyListener

protected KeyListener keyListener

focusListener

protected FocusListener focusListener

mouseInputListener

protected MouseInputListener mouseInputListener
Constructor Detail

BasicTableUI

public BasicTableUI()
Method Detail

createKeyListener

protected KeyListener createKeyListener()
Creates the key listener for handling keyboard navigation in the JTable.

createFocusListener

protected FocusListener createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable.

createMouseInputListener

protected MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTable.

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults()
Initialize JTable properties, e.g. font, foreground, and background. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.
See Also:
installUI(javax.swing.JComponent)

installListeners

protected void installListeners()
Attaches listeners to the JTable.

installKeyboardActions

protected void installKeyboardActions()
Register all keyboard actions on the JTable.

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Return the minimum size of the table. The minimum height is the row height times the number of rows. The minimum width is the sum of the minimum widths of each column.
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Return the preferred size of the table. The preferred height is the row height times the number of rows. The preferred width is the sum of the preferred widths of each column.
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Return the maximum size of the table. The maximum height is the row heighttimes the number of rows. The maximum width is the sum of the maximum widths of each column.
Overrides:
getMaximumSize in class ComponentUI

paint

public void paint(Graphics g,
                  JComponent c)
Paint a representation of the table instance that was set in installUI().
Overrides:
paint in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTextAreaUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextAreaUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicTextAreaUI
All Implemented Interfaces:
ViewFactory
public class BasicTextAreaUI
extends BasicTextUI

Provides the look and feel for a plain text editor. In this implementation the default UI is extended to act as a simple view factory.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
BasicTextAreaUI()
Constructs a new BasicTextAreaUI object.
Method Summary
View | create(Element elem) Creates the view for an element.
static ComponentUI | createUI(JComponent ta) Creates a UI for a JTextArea.
protected String | getPropertyPrefix() Fetches the name used as a key to look up properties through the UIManager.
protected void | propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTextAreaUI

public BasicTextAreaUI()
Constructs a new BasicTextAreaUI object.
Method Detail

createUI

public static ComponentUI createUI(JComponent ta)
Creates a UI for a JTextArea.
Parameters:
ta - a text area
Returns:
the UI

getPropertyPrefix

protected String getPropertyPrefix()
Fetches the name used as a key to look up properties through the UIManager. This is used as a prefix to all the standard text properties.
Overrides:
getPropertyPrefix in class BasicTextUI
Returns:
the name ("TextArea")

propertyChange

protected void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. This is implemented to rebuild the View when the WrapLine or the WrapStyleWord property changes.
Overrides:
propertyChange in class BasicTextUI
Parameters:
evt - the property change event

create

public View create(Element elem)
Creates the view for an element. Returns a WrappedPlainView or PlainView.
Overrides:
create in class BasicTextUI
Parameters:
elem - the element
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTextFieldUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextFieldUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicTextFieldUI
All Implemented Interfaces:
ViewFactory
Direct Known Subclasses:
BasicPasswordFieldUI, MetalTextFieldUI
public class BasicTextFieldUI
extends BasicTextUI

Basis of a look and feel for a JTextField.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
BasicTextFieldUI()
Creates a new BasicTextFieldUI.
Method Summary
View | create(Element elem) Creates a view (FieldView) based on an element.
protected Caret | createCaret() Creates the caret for a field.
static ComponentUI | createUI(JComponent c) Creates a UI for a JTextField.
protected String | getPropertyPrefix() Fetches the name used as a key to lookup properties through the UIManager.
protected void | propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTextFieldUI

public BasicTextFieldUI()
Creates a new BasicTextFieldUI.
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a UI for a JTextField.
Parameters:
c - the text field
Returns:
the UI

propertyChange

protected void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses.
Overrides:
propertyChange in class BasicTextUI
Parameters:
evt - the property change event

getPropertyPrefix

protected String getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager. This is used as a prefix to all the standard text properties.
Overrides:
getPropertyPrefix in class BasicTextUI
Returns:
the name ("TextField")

createCaret

protected Caret createCaret()
Creates the caret for a field.
Overrides:
createCaret in class BasicTextUI
Returns:
the caret

create

public View create(Element elem)
Creates a view (FieldView) based on an element.
Overrides:
create in class BasicTextUI
Parameters:
elem - the element
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTextPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicEditorPaneUI
                          |
                          +--javax.swing.plaf.basic.BasicTextPaneUI
All Implemented Interfaces:
ViewFactory
public class BasicTextPaneUI
extends BasicEditorPaneUI

Provides the look and feel for a styled text editor.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
BasicTextPaneUI()
Creates a new BasicTextPaneUI.
Method Summary
static ComponentUI | createUI(JComponent c) Creates a UI for the JTextPane.
EditorKit | getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
protected String | getPropertyPrefix() Fetches the name used as a key to lookup properties through the UIManager.
protected void | propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
Methods inherited from class javax.swing.plaf.basic.BasicEditorPaneUI
installKeyboardActions
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTextPaneUI

public BasicTextPaneUI()
Creates a new BasicTextPaneUI.
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates a UI for the JTextPane.
Parameters:
c - the JTextPane object
Returns:
the UI

getPropertyPrefix

protected String getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager. This is used as a prefix to all the standard text properties.
Overrides:
getPropertyPrefix in class BasicEditorPaneUI
Returns:
the name ("TextPane")

getEditorKit

public EditorKit getEditorKit(JTextComponent tc)
Fetches the EditorKit for the UI. This is whatever is currently set in the associated JEditorPane.
Overrides:
getEditorKit in class BasicEditorPaneUI
Parameters:
tc - the text component for which this UI is installed
Returns:
the editor capabilities
See Also:
TextUI.getEditorKit(javax.swing.text.JTextComponent)

propertyChange

protected void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. If the font or foreground has changed, and the Document is a StyledDocument, the appropriate property is set in the default style.
Overrides:
propertyChange in class BasicEditorPaneUI
Parameters:
evt - the property change event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTextUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTextUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
All Implemented Interfaces:
ViewFactory
Direct Known Subclasses:
BasicEditorPaneUI, BasicTextAreaUI, BasicTextFieldUI, DefaultTextUI
public abstract class BasicTextUI
extends TextUI
implements ViewFactory

Basis of a text components look-and-feel. This provides the basic editor view and controller services that may be useful when creating a look-and-feel for an extension of JTextComponent.

Most state is held in the associated JTextComponent as bound properties, and the UI installs default values for the various properties. This default will install something for all of the properties. Typically, a LAF implementation will do more however. At a minimum, a LAF would generally install key bindings.

This class also provides some concurrency support if the Document associated with the JTextComponent is a subclass of AbstractDocument. Access to the View (or View hierarchy) is serialized between any thread mutating the model and the Swing event thread (which is expected to render, do model/view coordinate translation, etc). Any access to the root view should first aquire a read-lock on the AbstractDocument and release that lock in a finally block.

An important method to define is the getPropertyPrefix() method which is used as the basis of the keys used to fetch defaults from the UIManager. The string should reflect the type of TextUI (eg. TextField, TextArea, etc) without the particular LAF part of the name (eg Metal, Motif, etc).

To build a view of the model, one of the following strategies can be employed.

  1. One strategy is to simply redefine the ViewFactory interface in the UI. By default, this UI itself acts as the factory for View implementations. This is useful for simple factories. To do this reimplement the create(javax.swing.text.Element) method.
  2. A common strategy for creating more complex types of documents is to have the EditorKit implementation return a factory. Since the EditorKit ties all of the pieces necessary to maintain a type of document, the factory is typically an important part of that and should be produced by the EditorKit implementation.
  3. A less common way to create more complex types is to have the UI implementation create a. seperate object for the factory. To do this, the #createViewFactory method should be reimplemented to return some factory.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
static class | BasicTextUI.BasicCaret
static class | BasicTextUI.BasicHighlighter
Constructor Summary
BasicTextUI()
Creates a new UI.
Method Summary
View | create(Element elem) Creates a view for an element.
View | create(Element elem, int p0, int p1) Creates a view for an element.
protected Caret | createCaret() Creates the object to use for a caret.
protected Highlighter | createHighlighter() Creates the object to use for adding highlights.
protected Keymap | createKeymap() Creates the keymap to use for the text component, and installs any necessary bindings into it.
void | damageRange(JTextComponent tc, int p0, int p1) Causes the portion of the view responsible for the given part of the model to be repainted.
void | damageRange(JTextComponent t, int p0, int p1, Position.Bias p0Bias, Position.Bias p1Bias) Causes the portion of the view responsible for the given part of the model to be repainted.
protected JTextComponent | getComponent() Fetches the text component associated with this UI implementation.
EditorKit | getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
protected String | getKeymapName() Fetches the name of the keymap that will be installed/used by default for this UI.
Dimension | getMaximumSize(JComponent c) Gets the maximum size for the editor component.
Dimension | getMinimumSize(JComponent c) Gets the minimum size for the editor component.
int | getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
Dimension | getPreferredSize(JComponent c) Gets the preferred size for the editor component.
protected abstract String | getPropertyPrefix() Gets the name used as a key to look up properties through the UIManager.
View | getRootView(JTextComponent tc) Fetches a View with the allocation of the associated text component (i.e.
protected Rectangle | getVisibleEditorRect() Gets the allocation to give the root View.
protected void | installDefaults() Initializes component properties, e.g.
protected void | installKeyboardActions()
protected void | installListeners() Installs listeners for the UI.
void | installUI(JComponent c) Installs the UI for a component.
protected void | modelChanged() Flags model changes.
Rectangle | modelToView(JTextComponent tc, int pos) Converts the given location in the model to a place in the view coordinate system.
Rectangle | modelToView(JTextComponent tc, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
void | paint(Graphics g, JComponent c) Paints the interface.
protected void | paintBackground(Graphics g) Paints a background for the view.
protected void | paintSafely(Graphics g) Paints the interface safely with a guarantee that the model won't change from the view of this thread.
protected void | propertyChange(PropertyChangeEvent evt) This method gets called when a bound property is changed on the associated JTextComponent.
protected void | setView(View v) Sets the current root of the view hierarchy and calls invalidate().
protected void | uninstallDefaults() Sets the component properties that haven't been explicitly overriden to null.
protected void | uninstallKeyboardActions()
protected void | uninstallListeners() Uninstalls listeners for the UI.
void | uninstallUI(JComponent c) Deinstalls the UI for a component.
void | update(Graphics g, JComponent c) Superclass paints background in an uncontrollable way (i.e.
int | viewToModel(JTextComponent tc, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | viewToModel(JTextComponent tc, Point pt, Position.Bias[] biasReturn) Converts the given place in the view coordinate system to the nearest representative location in the model.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTextUI

public BasicTextUI()
Creates a new UI.
Method Detail

createCaret

protected Caret createCaret()
Creates the object to use for a caret. By default an instance of BasicCaret is created. This method can be redefined to provide something else that implements the InputPosition interface or a subclass of JCaret.
Returns:
the caret object

createHighlighter

protected Highlighter createHighlighter()
Creates the object to use for adding highlights. By default an instance of BasicHighlighter is created. This method can be redefined to provide something else that implements the Highlighter interface or a subclass of DefaultHighlighter.
Returns:
the highlighter

getKeymapName

protected String getKeymapName()
Fetches the name of the keymap that will be installed/used by default for this UI. This is implemented to create a name based upon the classname. The name is the the name of the class with the package prefix removed.
Returns:
the name

createKeymap

protected Keymap createKeymap()
Creates the keymap to use for the text component, and installs any necessary bindings into it. By default, the keymap is shared between all instances of this type of TextUI. The keymap has the name defined by the getKeymapName method. If the keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used.

The set of bindings used to create the keymap is fetched from the UIManager using a key formed by combining the getPropertyPrefix() method and the string .keyBindings. The type is expected to be JTextComponent.KeyBinding[].

Returns:
the keymap
See Also:
getKeymapName(), JTextComponent

propertyChange

protected void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. This is implemented to do nothing (i.e. the response to properties in JTextComponent itself are handled prior to calling this method).
Parameters:
evt - the property change event

getPropertyPrefix

protected abstract String getPropertyPrefix()
Gets the name used as a key to look up properties through the UIManager. This is used as a prefix to all the standard text properties.
Returns:
the name

installDefaults

protected void installDefaults()
Initializes component properties, e.g. font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.
See Also:
uninstallDefaults(), installUI(javax.swing.JComponent)

uninstallDefaults

protected void uninstallDefaults()
Sets the component properties that haven't been explicitly overriden to null. A property is considered overridden if its current value is not a UIResource.
See Also:
installDefaults(), uninstallUI(javax.swing.JComponent)

installListeners

protected void installListeners()
Installs listeners for the UI.

uninstallListeners

protected void uninstallListeners()
Uninstalls listeners for the UI.

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

paintBackground

protected void paintBackground(Graphics g)
Paints a background for the view. This will only be called if isOpaque() on the associated component is true. The default is to paint the background color of the component.
Parameters:
g - the graphics context

getComponent

protected final JTextComponent getComponent()
Fetches the text component associated with this UI implementation. This will be null until the ui has been installed.
Returns:
the editor component

modelChanged

protected void modelChanged()
Flags model changes. This is called whenever the model has changed. It is implemented to rebuild the view hierarchy to represent the default root element of the associated model.

setView

protected final void setView(View v)
Sets the current root of the view hierarchy and calls invalidate(). If there were any child components, they will be removed (i.e. there are assumed to have come from components embedded in views).
Parameters:
v - the root view

paintSafely

protected void paintSafely(Graphics g)
Paints the interface safely with a guarantee that the model won't change from the view of this thread. This does the following things, rendering from back to front.
  1. If the component is marked as opaque, the background is painted in the current background color of the component.
  2. The highlights (if any) are painted.
  3. The view hierarchy is painted.
  4. The caret is painted.
Parameters:
g - the graphics context

installUI

public void installUI(JComponent c)
Installs the UI for a component. This does the following things.
  1. Set the associated component to opaque (can be changed easily by a subclass or on JTextComponent directly), which is the most common case. This will cause the component's background color to be painted.
  2. Install the default caret and highlighter into the associated component.
  3. Attach to the editor and model. If there is no model, a default one is created.
  4. create the view factory and the view hierarchy used to represent the model.
Overrides:
installUI in class ComponentUI
Parameters:
c - the editor component
See Also:
ComponentUI.installUI(javax.swing.JComponent)

uninstallUI

public void uninstallUI(JComponent c)
Deinstalls the UI for a component. This removes the listeners, uninstalls the highlighter, removes views, and nulls out the keymap.
Overrides:
uninstallUI in class ComponentUI
Parameters:
c - the editor component
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent)

update

public void update(Graphics g,
                   JComponent c)
Superclass paints background in an uncontrollable way (i.e. one might want an image tiled into the background). To prevent this from happening twice, this method is reimplemented to simply paint.

NOTE: Superclass is also not thread-safe in it's rendering of the background, although that's not an issue with the default rendering.

Overrides:
update in class ComponentUI

paint

public final void paint(Graphics g,
                        JComponent c)
Paints the interface. This is routed to the paintSafely method under the guarantee that the model won't change from the view of this thread while it's rendering (if the associated model is derived from AbstractDocument). This enables the model to potentially be updated asynchronously.
Overrides:
paint in class ComponentUI
Parameters:
g - the graphics context
c - the editor component

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Gets the preferred size for the editor component. If the component has been given a size prior to receiving this request, it will set the size of the view hierarchy to reflect the size of the component before requesting the preferred size of the view hierarchy. This allows formatted views to format to the current component size before answering the request. Other views don't care about currently formatted size and give the same answer either way.
Overrides:
getPreferredSize in class ComponentUI
Parameters:
c - the editor component
Returns:
the size

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Gets the minimum size for the editor component.
Overrides:
getMinimumSize in class ComponentUI
Parameters:
c - the editor component
Returns:
the size

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Gets the maximum size for the editor component.
Overrides:
getMaximumSize in class ComponentUI
Parameters:
c - the editor component
Returns:
the size

getVisibleEditorRect

protected Rectangle getVisibleEditorRect()
Gets the allocation to give the root View. Due to an unfortunate set of historical events this method is inappropriately named. The Rectangle returned has nothing to do with visibility. The component must have a non-zero positive size for this translation to be computed.
Returns:
the bounding box for the root view

modelToView

public Rectangle modelToView(JTextComponent tc,
                             int pos)
                      throws BadLocationException
Converts the given location in the model to a place in the view coordinate system. The component must have a non-zero positive size for this translation to be computed.
Overrides:
modelToView in class TextUI
Parameters:
tc - the text component for which this UI is installed
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle, null if the model is not painted
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
TextUI.modelToView(javax.swing.text.JTextComponent, int)

modelToView

public Rectangle modelToView(JTextComponent tc,
                             int pos,
                             Position.Bias bias)
                      throws BadLocationException
Converts the given location in the model to a place in the view coordinate system. The component must have a non-zero positive size for this translation to be computed.
Overrides:
modelToView in class TextUI
Parameters:
tc - the text component for which this UI is installed
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle, null if the model is not painted
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
TextUI.modelToView(javax.swing.text.JTextComponent, int)

viewToModel

public int viewToModel(JTextComponent tc,
                       Point pt)
Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for this translation to be computed.
Overrides:
viewToModel in class TextUI
Parameters:
tc - the text component for which this UI is installed
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.
Returns:
the offset from the start of the document >= 0, -1 if not painted
See Also:
TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)

viewToModel

public int viewToModel(JTextComponent tc,
                       Point pt,
                       Position.Bias[] biasReturn)
Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for this translation to be computed.
Overrides:
viewToModel in class TextUI
Parameters:
tc - the text component for which this UI is installed
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.
Returns:
the offset from the start of the document >= 0, -1 if the component doesn't yet have a positive size.
See Also:
TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)

getNextVisualPositionFrom

public int getNextVisualPositionFrom(JTextComponent t,
                                     int pos,
                                     Position.Bias b,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Overrides:
getNextVisualPositionFrom in class TextUI
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

damageRange

public void damageRange(JTextComponent tc,
                        int p0,
                        int p1)
Causes the portion of the view responsible for the given part of the model to be repainted. Does nothing if the view is not currently painted.
Overrides:
damageRange in class TextUI
Parameters:
tc - the text component for which this UI is installed
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
See Also:
TextUI.damageRange(javax.swing.text.JTextComponent, int, int)

damageRange

public void damageRange(JTextComponent t,
                        int p0,
                        int p1,
                        Position.Bias p0Bias,
                        Position.Bias p1Bias)
Causes the portion of the view responsible for the given part of the model to be repainted.
Overrides:
damageRange in class TextUI
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

getEditorKit

public EditorKit getEditorKit(JTextComponent tc)
Fetches the EditorKit for the UI.
Overrides:
getEditorKit in class TextUI
Parameters:
tc - the text component for which this UI is installed
Returns:
the editor capabilities
See Also:
TextUI.getEditorKit(javax.swing.text.JTextComponent)

getRootView

public View getRootView(JTextComponent tc)
Fetches a View with the allocation of the associated text component (i.e. the root of the hierarchy) that can be traversed to determine how the model is being represented spatially.

NOTE:The View hierarchy can be traversed from the root view, and other things can be done as well. Things done in this way cannot be protected like simple method calls through the TextUI. Therefore, proper operation in the presence of concurrency must be arranged by any logic that calls this method!

Overrides:
getRootView in class TextUI
Parameters:
tc - the text component for which this UI is installed
Returns:
the view
See Also:
TextUI.getRootView(javax.swing.text.JTextComponent)

create

public View create(Element elem)
Creates a view for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this method. By default it simply returns null indicating it is unable to represent the element.
Specified by:
create in interface ViewFactory
Parameters:
elem - the element
Returns:
the view

create

public View create(Element elem,
                   int p0,
                   int p1)
Creates a view for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this method. By default it simply returns null indicating it is unable to represent the part of the element.
Parameters:
elem - the element
p0 - the starting offset >= 0
p1 - the ending offset >= p0
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicToggleButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToggleButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
Direct Known Subclasses:
BasicRadioButtonUI, MetalToggleButtonUI
public class BasicToggleButtonUI
extends BasicButtonUI

BasicToggleButton implementation

Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
BasicToggleButtonUI()
Method Summary
static ComponentUI | createUI(JComponent b)
protected String | getPropertyPrefix()
void | paint(Graphics g, JComponent c)
protected void | paintButtonPressed(Graphics g, AbstractButton b)
protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
protected void | paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getTextShiftOffset, installDefaults, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToggleButtonUI

public BasicToggleButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicButtonUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicButtonUI

paintIcon

protected void paintIcon(Graphics g,
                         AbstractButton b,
                         Rectangle iconRect)

paintText

protected void paintText(Graphics g,
                         AbstractButton b,
                         Rectangle textRect,
                         String text)

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Overrides:
paintFocus in class BasicButtonUI

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overrides:
paintButtonPressed in class BasicButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicToolBarSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.basic.BasicSeparatorUI
                    |
                    +--javax.swing.plaf.basic.BasicToolBarSeparatorUI
public class BasicToolBarSeparatorUI
extends BasicSeparatorUI

A Basic L&F implementation of ToolBarSeparatorUI. This implementation is a "combined" view/controller.

Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI
highlight, shadow
Constructor Summary
BasicToolBarSeparatorUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults(JSeparator s)
void | paint(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI
installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolBarSeparatorUI

public BasicToolBarSeparatorUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults(JSeparator s)
Overrides:
installDefaults in class BasicSeparatorUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicSeparatorUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicSeparatorUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class BasicSeparatorUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class BasicSeparatorUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicToolBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolBarUI
              |
              +--javax.swing.plaf.basic.BasicToolBarUI
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
MetalToolBarUI
public class BasicToolBarUI
extends ToolBarUI
implements SwingConstants

A Basic L&F implementation of ToolBarUI. This implementation is a "combined" view/controller.

Inner Class Summary
class | BasicToolBarUI.DockingListener This inner class is marked "public" due to a compiler bug.
protected class | BasicToolBarUI.DragWindow
protected class | BasicToolBarUI.FrameListener
protected class | BasicToolBarUI.PropertyListener
protected class | BasicToolBarUI.ToolBarContListener
protected class | BasicToolBarUI.ToolBarFocusListener
Field Summary
protected Color | dockingBorderColor
protected Color | dockingColor
protected MouseInputListener | dockingListener
protected KeyStroke | downKey Deprecated. As of Java 2 platform v1.3.
protected BasicToolBarUI.DragWindow | dragWindow
protected Color | floatingBorderColor
protected Color | floatingColor
protected int | focusedCompIndex
protected KeyStroke | leftKey Deprecated. As of Java 2 platform v1.3.
protected PropertyChangeListener | propertyListener
protected KeyStroke | rightKey Deprecated. As of Java 2 platform v1.3.
protected JToolBar | toolBar
protected ContainerListener | toolBarContListener
protected FocusListener | toolBarFocusListener
protected KeyStroke | upKey Deprecated. As of Java 2 platform v1.3.
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
BasicToolBarUI()
Method Summary
boolean | canDock(Component c, Point p)
protected MouseInputListener | createDockingListener()
protected BasicToolBarUI.DragWindow | createDragWindow(JToolBar toolbar)
protected JFrame | createFloatingFrame(JToolBar toolbar)
protected WindowListener | createFrameListener()
protected PropertyChangeListener | createPropertyListener()
protected ContainerListener | createToolBarContListener()
protected FocusListener | createToolBarFocusListener()
static ComponentUI | createUI(JComponent c)
protected void | dragTo(Point position, Point origin)
protected void | floatAt(Point position, Point origin)
Color | getDockingColor() Gets the color displayed when over a docking area
Color | getFloatingColor() Gets the color displayed when over a floating area
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installComponents()
protected void | installDefaults()
protected void | installKeyboardActions()
protected void | installListeners()
void | installUI(JComponent c)
boolean | isFloating()
protected void | navigateFocusedComp(int direction)
void | setDockingColor(Color c) Sets the color displayed when over a docking area
void | setFloating(boolean b, Point p)
void | setFloatingColor(Color c) Sets the color displayed when over a floating area
void | setFloatingLocation(int x, int y)
void | setOrientation(int orientation)
protected void | uninstallComponents()
protected void | uninstallDefaults()
protected void | uninstallKeyboardActions()
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

toolBar

protected JToolBar toolBar

dragWindow

protected BasicToolBarUI.DragWindow dragWindow

focusedCompIndex

protected int focusedCompIndex

dockingColor

protected Color dockingColor

floatingColor

protected Color floatingColor

dockingBorderColor

protected Color dockingBorderColor

floatingBorderColor

protected Color floatingBorderColor

dockingListener

protected MouseInputListener dockingListener

propertyListener

protected PropertyChangeListener propertyListener

toolBarContListener

protected ContainerListener toolBarContListener

toolBarFocusListener

protected FocusListener toolBarFocusListener

upKey

protected KeyStroke upKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

downKey

protected KeyStroke downKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

leftKey

protected KeyStroke leftKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

rightKey

protected KeyStroke rightKey
Deprecated. As of Java 2 platform v1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Constructor Detail

BasicToolBarUI

public BasicToolBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installComponents

protected void installComponents()

uninstallComponents

protected void uninstallComponents()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

navigateFocusedComp

protected void navigateFocusedComp(int direction)

createFloatingFrame

protected JFrame createFloatingFrame(JToolBar toolbar)

createDragWindow

protected BasicToolBarUI.DragWindow createDragWindow(JToolBar toolbar)

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

setFloatingLocation

public void setFloatingLocation(int x,
                                int y)

isFloating

public boolean isFloating()

setFloating

public void setFloating(boolean b,
                        Point p)

setOrientation

public void setOrientation(int orientation)

getDockingColor

public Color getDockingColor()
Gets the color displayed when over a docking area

setDockingColor

public void setDockingColor(Color c)
Sets the color displayed when over a docking area

getFloatingColor

public Color getFloatingColor()
Gets the color displayed when over a floating area

setFloatingColor

public void setFloatingColor(Color c)
Sets the color displayed when over a floating area

canDock

public boolean canDock(Component c,
                       Point p)

dragTo

protected void dragTo(Point position,
                      Point origin)

floatAt

protected void floatAt(Point position,
                       Point origin)

createToolBarContListener

protected ContainerListener createToolBarContListener()

createToolBarFocusListener

protected FocusListener createToolBarFocusListener()

createPropertyListener

protected PropertyChangeListener createPropertyListener()

createDockingListener

protected MouseInputListener createDockingListener()

createFrameListener

protected WindowListener createFrameListener()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicToolTipUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolTipUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolTipUI
              |
              +--javax.swing.plaf.basic.BasicToolTipUI
Direct Known Subclasses:
MetalToolTipUI
public class BasicToolTipUI
extends ToolTipUI

Standard tool tip L&F.

Constructor Summary
BasicToolTipUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults(JComponent c)
protected void | installListeners(JComponent c)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
protected void | uninstallDefaults(JComponent c)
protected void | uninstallListeners(JComponent c)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolTipUI

public BasicToolTipUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JComponent c)

uninstallDefaults

protected void uninstallDefaults(JComponent c)

installListeners

protected void installListeners(JComponent c)

uninstallListeners

protected void uninstallListeners(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicTreeUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TreeUI
              |
              +--javax.swing.plaf.basic.BasicTreeUI
Direct Known Subclasses:
MetalTreeUI
public class BasicTreeUI
extends TreeUI

The basic L&F for a hierarchical data structure.

Inner Class Summary
class | BasicTreeUI.CellEditorHandler Listener responsible for getting cell editing events and updating the tree accordingly.
class | BasicTreeUI.ComponentHandler Updates the preferred size when scrolling (if necessary).
class | BasicTreeUI.FocusHandler Repaints the lead selection row when focus is lost/gained.
class | BasicTreeUI.KeyHandler This is used to get mutliple key down events to appropriately generate events.
class | BasicTreeUI.MouseHandler TreeMouseListener is responsible for updating the selection based on mouse events.
class | BasicTreeUI.MouseInputHandler MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.
class | BasicTreeUI.NodeDimensionsHandler Class responsible for getting size of node, method is forwarded to BasicTreeUI method.
class | BasicTreeUI.PropertyChangeHandler PropertyChangeListener for the tree.
class | BasicTreeUI.SelectionModelPropertyChangeHandler Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.
class | BasicTreeUI.TreeCancelEditingAction ActionListener that invokes cancelEditing when action performed.
class | BasicTreeUI.TreeExpansionHandler Updates the TreeState in response to nodes expanding/collapsing.
class | BasicTreeUI.TreeHomeAction TreeHomeAction is used to handle end/home actions.
class | BasicTreeUI.TreeIncrementAction TreeIncrementAction is used to handle up/down actions.
class | BasicTreeUI.TreeModelHandler Forwards all TreeModel events to the TreeState.
class | BasicTreeUI.TreePageAction TreePageAction handles page up and page down events.
class | BasicTreeUI.TreeSelectionHandler Listens for changes in the selection model and updates the display accordingly.
class | BasicTreeUI.TreeToggleAction For the first selected row expandedness will be toggled.
class | BasicTreeUI.TreeTraverseAction TreeTraverseAction is the action used for left/right keys.
Field Summary
protected TreeCellEditor | cellEditor Editor for the tree.
protected Icon | collapsedIcon
protected boolean | createdCellEditor Set to true if editor that is currently in the tree was created by this instance.
protected boolean | createdRenderer Set to true if the renderer that is currently in the tree was created by this instance.
protected TreeCellRenderer | currentCellRenderer Renderer that is being used to do the actual cell drawing.
protected int | depthOffset How much the depth should be offset to properly calculate x locations.
protected Hashtable | drawingCache Used for minimizing the drawing of vertical lines.
protected Component | editingComponent When editing, this will be the Component that is doing the actual editing.
protected TreePath | editingPath Path that is being edited.
protected int | editingRow Row that is being edited.
protected boolean | editorHasDifferentSize Set to true if the editor has a different size than the renderer.
protected Icon | expandedIcon
protected boolean | largeModel True if doing optimizations for a largeModel.
protected int | lastSelectedRow Index of the row that was last selected.
protected int | leftChildIndent Distance between left margin and where verical dashes will be drawn.
protected AbstractLayoutCache.NodeDimensions | nodeDimensions Reponsible for telling the TreeState the size needed for a node.
protected Dimension | preferredMinSize Minimum preferred size.
protected Dimension | preferredSize Size needed to completely display all the nodes.
protected CellRendererPane | rendererPane Used to paint the TreeCellRenderer.
protected int | rightChildIndent Distance to add to leftChildIndent to determine where cell contents will be drawn.
protected boolean | stopEditingInCompleteEditing Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing.
protected int | totalChildIndent Total distance that will be indented.
protected JTree | tree Component that we're going to be drawing into.
protected TreeModel | treeModel Used to determine what to display.
protected TreeSelectionModel | treeSelectionModel Model maintaing the selection.
protected AbstractLayoutCache | treeState Object responsible for handling sizing and expanded issues.
protected boolean | validCachedPreferredSize Is the preferredSize valid?
Constructor Summary
BasicTreeUI()
Method Summary
 void cancelEditing(JTree tree)
Cancels the current editing session.
protected  void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)
If the mouseX and mouseY are in the expand/collapse region of the row, this will toggle the row.
protected  void completeEditing()
Messages to stop the editing session.
protected  void completeEditing(boolean messageStop, boolean messageCancel, boolean messageTree)
Stops the editing session.
protected  void completeUIInstall()
Invoked from installUI after all the defaults/listeners have been installed.
protected  void completeUIUninstall()
protected  void configureLayoutCache()
Resets the TreeState instance based on the tree we're providing the look and feel for.
protected  CellEditorListener createCellEditorListener()
Creates a listener to handle events from the current editor.
protected  CellRendererPane createCellRendererPane()
Returns the renderer pane that renderer components are placed in.
protected  ComponentListener createComponentListener()
Creates and returns a new ComponentHandler.
protected  TreeCellEditor createDefaultCellEditor()
Creates a default cell editor.
protected  TreeCellRenderer createDefaultCellRenderer()
Returns the default cell renderer that is used to do the stamping of each node.
protected  FocusListener createFocusListener()
Creates a listener that is responsible for updating the display when focus is lost/gained.
protected  KeyListener createKeyListener()
Creates the listener reponsible for getting key events from the tree.
protected  AbstractLayoutCache createLayoutCache()
Creates the object responsible for managing what is expanded, as well as the size of nodes.
protected  MouseListener createMouseListener()
Creates the listener responsible for updating the selection based on mouse events.
protected  AbstractLayoutCache.NodeDimensions createNodeDimensions()
Creates an instance of NodeDimensions that is able to determine the size of a given node in the tree.
protected  PropertyChangeListener createPropertyChangeListener()
Creates a listener that is responsible that updates the UI based on how the tree changes.
protected  PropertyChangeListener createSelectionModelPropertyChangeListener()
Creates the listener responsible for getting property change events from the selection model.
protected  TreeExpansionListener createTreeExpansionListener()
Creates and returns the object responsible for updating the treestate when nodes expanded state changes.
protected  TreeModelListener createTreeModelListener()
Returns a listener that can update the tree when the model changes.
protected  TreeSelectionListener createTreeSelectionListener()
Creates the listener that updates the display based on selection change methods.
static ComponentUI createUI(JComponent x)
protected  void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
protected  void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
protected  void drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
protected  void ensureRowsAreVisible(int beginRow, int endRow)
Ensures that the rows identified by beginRow through endRow are visible.
protected  TreeCellEditor getCellEditor()
protected  TreeCellRenderer getCellRenderer()
Return currentCellRenderer, which will either be the trees renderer, or defaultCellRenderer, which ever wasn't null.
 TreePath getClosestPathForLocation(JTree tree, int x, int y)
Returns the path to the node that is closest to x,y.
 Icon getCollapsedIcon()
 TreePath getEditingPath(JTree tree)
Returns the path to the element that is being edited.
 Icon getExpandedIcon()
protected  Color getHashColor()
protected  int getHorizontalLegBuffer()
The horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default.
protected  TreePath getLastChildPath(TreePath parent)
Returns a path to the last child of parent.
 int getLeftChildIndent()
 Dimension getMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
 Dimension getMinimumSize(JComponent c)
Returns the minimum size for this component.
protected  TreeModel getModel()
 Rectangle getPathBounds(JTree tree, TreePath path)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
 TreePath getPathForRow(JTree tree, int row)
Returns the path for passed in row.
 Dimension getPreferredMinSize()
Returns the minimum preferred size.
 Dimension getPreferredSize(JComponent c)
Returns the preferred size to properly display the tree, this is a cover method for getPreferredSize(c, false).
 Dimension getPreferredSize(JComponent c, boolean checkConsistancy)
Returns the preferred size to represent the tree in c.
 int getRightChildIndent()
 int getRowCount(JTree tree)
Returns the number of rows that are being displayed.
 int getRowForPath(JTree tree, TreePath path)
Returns the row that the last item identified in path is visible at.
protected  int getRowHeight()
protected  TreeSelectionModel getSelectionModel()
protected  boolean getShowsRootHandles()
protected  int getVerticalLegBuffer()
The vertical element of legs between nodes starts at the bottom of the parent node by default.
protected  void handleExpandControlClick(TreePath path, int mouseX, int mouseY)
Messaged when the user clicks the particular row, this invokes toggleExpandState.
protected  void installComponents()
Intalls the subcomponents of the tree, which is the renderer pane.
protected  void installDefaults()
protected  void installKeyboardActions()
protected  void installListeners()
 void installUI(JComponent c)
protected  boolean isEditable()
 boolean isEditing(JTree tree)
Returns true if the tree is being edited.
protected  boolean isLargeModel()
protected  boolean isLeaf(int row)
protected  boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY)
Returns true if mouseX and mouseY fall in the area of row that is used to expand/collapse the node and the node at row does not represent a leaf.
protected  boolean isMultiSelectEvent(MouseEvent event)
Returning true signifies a mouse event on the node should select from the anchor point.
protected  boolean isRootVisible()
protected  boolean isToggleEvent(MouseEvent event)
Returning true indicates the row under the mouse should be toggled based on the event.
protected  boolean isToggleSelectionEvent(MouseEvent event)
Returning true signifies a mouse event on the node should toggle the selection of only the row under mouse.
 void paint(Graphics g, JComponent c)
protected  void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the expand (toggle) part of a row.
protected  void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
Paints a horizontal line.
protected  void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the horizontal part of the leg.
protected  void paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Paints the renderer part of a row.
protected  void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
Paints a vertical line.
protected  void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
Paints the vertical part of the leg.
protected  void pathWasCollapsed(TreePath path)
Messaged from the VisibleTreeNode after it has collapsed.
protected  void pathWasExpanded(TreePath path)
Messaged from the VisibleTreeNode after it has been expanded.
protected  void prepareForUIInstall()
Invoked after the tree instance variable has been set, but before any defaults/listeners have been installed.
protected  void prepareForUIUninstall()
protected  void selectPathForEvent(TreePath path, MouseEvent event)
Messaged to update the selection based on a MouseEvent over a particular row.
protected  void setCellEditor(TreeCellEditor editor)
Sets the cell editor.
protected  void setCellRenderer(TreeCellRenderer tcr)
Sets the TreeCellRenderer to tcr.
 void setCollapsedIcon(Icon newG)
protected  void setEditable(boolean newValue)
Configures the receiver to allow, or not allow, editing.
 void setExpandedIcon(Icon newG)
protected  void setHashColor(Color color)
protected  void setLargeModel(boolean largeModel)
Updates the componentListener, if necessary.
 void setLeftChildIndent(int newAmount)
protected  void setModel(TreeModel model)
Sets the TreeModel.
 void setPreferredMinSize(Dimension newSize)
Sets the preferred minimum size.
 void setRightChildIndent(int newAmount)
protected  void setRootVisible(boolean newValue)
Sets the root to being visible.
protected  void setRowHeight(int rowHeight)
Sets the row height, this is forwarded to the treeState.
protected  void setSelectionModel(TreeSelectionModel newLSM)
Resets the selection model.
protected  void setShowsRootHandles(boolean newValue)
Determines whether the node handles are to be displayed.
protected  boolean shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Returns true if the expand (toggle) control should be drawn for the specified row.
protected  boolean startEditing(TreePath path, MouseEvent event)
Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
 void startEditingAtPath(JTree tree, TreePath path)
Selects the last item in path and tries to edit it.
 boolean stopEditing(JTree tree)
Stops the current editing session.
protected  void toggleExpandState(TreePath path)
Expands path if it is not expanded, or collapses row if it is expanded.
protected  void uninstallComponents()
Uninstalls the renderer pane.
protected  void uninstallDefaults()
protected  void uninstallKeyboardActions()
protected  void uninstallListeners()
 void uninstallUI(JComponent c)
protected  void updateCachedPreferredSize()
Updates the preferredSize instance variable, which is returned from getPreferredSize().
protected  void updateCellEditor()
Updates the cellEditor based on the editability of the JTree that we're contained in.
protected  void updateDepthOffset()
Updates how much each depth should be offset by.
protected  void updateExpandedDescendants(TreePath path)
Updates the expanded state of all the descendants of path by getting the expanded descendants from the tree and forwarding to the tree state.
protected  void updateLayoutCacheExpandedNodes()
Makes all the nodes that are expanded in JTree expanded in LayoutCache.
protected  void updateRenderer()
Messaged from the tree we're in when the renderer has changed.
protected  void updateSize()
Marks the cached size as being invalid, and messages the tree with treeDidChange.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

collapsedIcon

protected transient Icon collapsedIcon

expandedIcon

protected transient Icon expandedIcon

leftChildIndent

protected int leftChildIndent
Distance between left margin and where verical dashes will be drawn.

rightChildIndent

protected int rightChildIndent
Distance to add to leftChildIndent to determine where cell contents will be drawn.

totalChildIndent

protected int totalChildIndent
Total distance that will be indented. The sum of leftChildIndent and rightChildIndent.

preferredMinSize

protected Dimension preferredMinSize
Minimum preferred size.

lastSelectedRow

protected int lastSelectedRow
Index of the row that was last selected.

tree

protected JTree tree
Component that we're going to be drawing into.

currentCellRenderer

protected transient TreeCellRenderer currentCellRenderer
Renderer that is being used to do the actual cell drawing.

createdRenderer

protected boolean createdRenderer
Set to true if the renderer that is currently in the tree was created by this instance.

cellEditor

protected transient TreeCellEditor cellEditor
Editor for the tree.

createdCellEditor

protected boolean createdCellEditor
Set to true if editor that is currently in the tree was created by this instance.

stopEditingInCompleteEditing

protected boolean stopEditingInCompleteEditing
Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing.

rendererPane

protected CellRendererPane rendererPane
Used to paint the TreeCellRenderer.

preferredSize

protected Dimension preferredSize
Size needed to completely display all the nodes.

validCachedPreferredSize

protected boolean validCachedPreferredSize
Is the preferredSize valid?

treeState

protected AbstractLayoutCache treeState
Object responsible for handling sizing and expanded issues.

drawingCache

protected Hashtable drawingCache
Used for minimizing the drawing of vertical lines.

largeModel

protected boolean largeModel
True if doing optimizations for a largeModel. Subclasses that don't support this may wish to override createLayoutCache to not return a FixedHeightLayoutCache instance.

nodeDimensions

protected AbstractLayoutCache.NodeDimensions nodeDimensions
Reponsible for telling the TreeState the size needed for a node.

treeModel

protected TreeModel treeModel
Used to determine what to display.

treeSelectionModel

protected TreeSelectionModel treeSelectionModel
Model maintaing the selection.

depthOffset

protected int depthOffset
How much the depth should be offset to properly calculate x locations. This is based on whether or not the root is visible, and if the root handles are visible.

editingComponent

protected Component editingComponent
When editing, this will be the Component that is doing the actual editing.

editingPath

protected TreePath editingPath
Path that is being edited.

editingRow

protected int editingRow
Row that is being edited. Should only be referenced if editingComponent is not null.

editorHasDifferentSize

protected boolean editorHasDifferentSize
Set to true if the editor has a different size than the renderer.
Constructor Detail

BasicTreeUI

public BasicTreeUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

getHashColor

protected Color getHashColor()

setHashColor

protected void setHashColor(Color color)

setLeftChildIndent

public void setLeftChildIndent(int newAmount)

getLeftChildIndent

public int getLeftChildIndent()

setRightChildIndent

public void setRightChildIndent(int newAmount)

getRightChildIndent

public int getRightChildIndent()

setExpandedIcon

public void setExpandedIcon(Icon newG)

getExpandedIcon

public Icon getExpandedIcon()

setCollapsedIcon

public void setCollapsedIcon(Icon newG)

getCollapsedIcon

public Icon getCollapsedIcon()

setLargeModel

protected void setLargeModel(boolean largeModel)
Updates the componentListener, if necessary.

isLargeModel

protected boolean isLargeModel()

setRowHeight

protected void setRowHeight(int rowHeight)
Sets the row height, this is forwarded to the treeState.

getRowHeight

protected int getRowHeight()

setCellRenderer

protected void setCellRenderer(TreeCellRenderer tcr)
Sets the TreeCellRenderer to tcr. This invokes updateRenderer.

getCellRenderer

protected TreeCellRenderer getCellRenderer()
Return currentCellRenderer, which will either be the trees renderer, or defaultCellRenderer, which ever wasn't null.

setModel

protected void setModel(TreeModel model)
Sets the TreeModel.

getModel

protected TreeModel getModel()

setRootVisible

protected void setRootVisible(boolean newValue)
Sets the root to being visible.

isRootVisible

protected boolean isRootVisible()

setShowsRootHandles

protected void setShowsRootHandles(boolean newValue)
Determines whether the node handles are to be displayed.

getShowsRootHandles

protected boolean getShowsRootHandles()

setCellEditor

protected void setCellEditor(TreeCellEditor editor)
Sets the cell editor.

getCellEditor

protected TreeCellEditor getCellEditor()

setEditable

protected void setEditable(boolean newValue)
Configures the receiver to allow, or not allow, editing.

isEditable

protected boolean isEditable()

setSelectionModel

protected void setSelectionModel(TreeSelectionModel newLSM)
Resets the selection model. The appropriate listener are installed on the model.

getSelectionModel

protected TreeSelectionModel getSelectionModel()

getPathBounds

public Rectangle getPathBounds(JTree tree,
                               TreePath path)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. Will return null if any component in path is currently valid.
Overrides:
getPathBounds in class TreeUI

getPathForRow

public TreePath getPathForRow(JTree tree,
                              int row)
Returns the path for passed in row. If row is not visible null is returned.
Overrides:
getPathForRow in class TreeUI

getRowForPath

public int getRowForPath(JTree tree,
                         TreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
Overrides:
getRowForPath in class TreeUI

getRowCount

public int getRowCount(JTree tree)
Returns the number of rows that are being displayed.
Overrides:
getRowCount in class TreeUI

getClosestPathForLocation

public TreePath getClosestPathForLocation(JTree tree,
                                          int x,
                                          int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
Overrides:
getClosestPathForLocation in class TreeUI

isEditing

public boolean isEditing(JTree tree)
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().
Overrides:
isEditing in class TreeUI

stopEditing

public boolean stopEditing(JTree tree)
Stops the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop.
Overrides:
stopEditing in class TreeUI

cancelEditing

public void cancelEditing(JTree tree)
Cancels the current editing session.
Overrides:
cancelEditing in class TreeUI

startEditingAtPath

public void startEditingAtPath(JTree tree,
                               TreePath path)
Selects the last item in path and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.
Overrides:
startEditingAtPath in class TreeUI

getEditingPath

public TreePath getEditingPath(JTree tree)
Returns the path to the element that is being edited.
Overrides:
getEditingPath in class TreeUI

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

prepareForUIInstall

protected void prepareForUIInstall()
Invoked after the tree instance variable has been set, but before any defaults/listeners have been installed.

completeUIInstall

protected void completeUIInstall()
Invoked from installUI after all the defaults/listeners have been installed.

installDefaults

protected void installDefaults()

installListeners

protected void installListeners()

installKeyboardActions

protected void installKeyboardActions()

installComponents

protected void installComponents()
Intalls the subcomponents of the tree, which is the renderer pane.

createNodeDimensions

protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
Creates an instance of NodeDimensions that is able to determine the size of a given node in the tree.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates a listener that is responsible that updates the UI based on how the tree changes.

createMouseListener

protected MouseListener createMouseListener()
Creates the listener responsible for updating the selection based on mouse events.

createFocusListener

protected FocusListener createFocusListener()
Creates a listener that is responsible for updating the display when focus is lost/gained.

createKeyListener

protected KeyListener createKeyListener()
Creates the listener reponsible for getting key events from the tree.

createSelectionModelPropertyChangeListener

protected PropertyChangeListener createSelectionModelPropertyChangeListener()
Creates the listener responsible for getting property change events from the selection model.

createTreeSelectionListener

protected TreeSelectionListener createTreeSelectionListener()
Creates the listener that updates the display based on selection change methods.

createCellEditorListener

protected CellEditorListener createCellEditorListener()
Creates a listener to handle events from the current editor.

createComponentListener

protected ComponentListener createComponentListener()
Creates and returns a new ComponentHandler. This is used for the large model to mark the validCachedPreferredSize as invalid when the component moves.

createTreeExpansionListener

protected TreeExpansionListener createTreeExpansionListener()
Creates and returns the object responsible for updating the treestate when nodes expanded state changes.

createLayoutCache

protected AbstractLayoutCache createLayoutCache()
Creates the object responsible for managing what is expanded, as well as the size of nodes.

createCellRendererPane

protected CellRendererPane createCellRendererPane()
Returns the renderer pane that renderer components are placed in.

createDefaultCellEditor

protected TreeCellEditor createDefaultCellEditor()
Creates a default cell editor.

createDefaultCellRenderer

protected TreeCellRenderer createDefaultCellRenderer()
Returns the default cell renderer that is used to do the stamping of each node.

createTreeModelListener

protected TreeModelListener createTreeModelListener()
Returns a listener that can update the tree when the model changes.

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

prepareForUIUninstall

protected void prepareForUIUninstall()

completeUIUninstall

protected void completeUIUninstall()

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

uninstallComponents

protected void uninstallComponents()
Uninstalls the renderer pane.

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

paintHorizontalPartOfLeg

protected void paintHorizontalPartOfLeg(Graphics g,
                                        Rectangle clipBounds,
                                        Insets insets,
                                        Rectangle bounds,
                                        TreePath path,
                                        int row,
                                        boolean isExpanded,
                                        boolean hasBeenExpanded,
                                        boolean isLeaf)
Paints the horizontal part of the leg. The reciever should NOT modify clipBounds, or insets.

NOTE: parentRow can be -1 if the root is not visible.

paintVerticalPartOfLeg

protected void paintVerticalPartOfLeg(Graphics g,
                                      Rectangle clipBounds,
                                      Insets insets,
                                      TreePath path)
Paints the vertical part of the leg. The reciever should NOT modify clipBounds, insets.

paintExpandControl

protected void paintExpandControl(Graphics g,
                                  Rectangle clipBounds,
                                  Insets insets,
                                  Rectangle bounds,
                                  TreePath path,
                                  int row,
                                  boolean isExpanded,
                                  boolean hasBeenExpanded,
                                  boolean isLeaf)
Paints the expand (toggle) part of a row. The reciever should NOT modify clipBounds, or insets.

paintRow

protected void paintRow(Graphics g,
                        Rectangle clipBounds,
                        Insets insets,
                        Rectangle bounds,
                        TreePath path,
                        int row,
                        boolean isExpanded,
                        boolean hasBeenExpanded,
                        boolean isLeaf)
Paints the renderer part of a row. The reciever should NOT modify clipBounds, or insets.

shouldPaintExpandControl

protected boolean shouldPaintExpandControl(TreePath path,
                                           int row,
                                           boolean isExpanded,
                                           boolean hasBeenExpanded,
                                           boolean isLeaf)
Returns true if the expand (toggle) control should be drawn for the specified row.

paintVerticalLine

protected void paintVerticalLine(Graphics g,
                                 JComponent c,
                                 int x,
                                 int top,
                                 int bottom)
Paints a vertical line.

paintHorizontalLine

protected void paintHorizontalLine(Graphics g,
                                   JComponent c,
                                   int y,
                                   int left,
                                   int right)
Paints a horizontal line.

getVerticalLegBuffer

protected int getVerticalLegBuffer()
The vertical element of legs between nodes starts at the bottom of the parent node by default. This method makes the leg start below that.

getHorizontalLegBuffer

protected int getHorizontalLegBuffer()
The horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default. This method makes the leg end before that.

drawCentered

protected void drawCentered(Component c,
                            Graphics graphics,
                            Icon icon,
                            int x,
                            int y)

drawDashedHorizontalLine

protected void drawDashedHorizontalLine(Graphics g,
                                        int y,
                                        int x1,
                                        int x2)

drawDashedVerticalLine

protected void drawDashedVerticalLine(Graphics g,
                                      int x,
                                      int y1,
                                      int y2)

updateLayoutCacheExpandedNodes

protected void updateLayoutCacheExpandedNodes()
Makes all the nodes that are expanded in JTree expanded in LayoutCache. This invokes updateExpandedDescendants with the root path.

updateExpandedDescendants

protected void updateExpandedDescendants(TreePath path)
Updates the expanded state of all the descendants of path by getting the expanded descendants from the tree and forwarding to the tree state.

getLastChildPath

protected TreePath getLastChildPath(TreePath parent)
Returns a path to the last child of parent.

updateDepthOffset

protected void updateDepthOffset()
Updates how much each depth should be offset by.

updateCellEditor

protected void updateCellEditor()
Updates the cellEditor based on the editability of the JTree that we're contained in. If the tree is editable but doesn't have a cellEditor, a basic one will be used.

updateRenderer

protected void updateRenderer()
Messaged from the tree we're in when the renderer has changed.

configureLayoutCache

protected void configureLayoutCache()
Resets the TreeState instance based on the tree we're providing the look and feel for.

updateSize

protected void updateSize()
Marks the cached size as being invalid, and messages the tree with treeDidChange.

updateCachedPreferredSize

protected void updateCachedPreferredSize()
Updates the preferredSize instance variable, which is returned from getPreferredSize().

For left to right orientations, the size is determined from the current AbstractLayoutCache. For RTL orientations, the preferred size becomes the width minus the minimum x position.

pathWasExpanded

protected void pathWasExpanded(TreePath path)
Messaged from the VisibleTreeNode after it has been expanded.

pathWasCollapsed

protected void pathWasCollapsed(TreePath path)
Messaged from the VisibleTreeNode after it has collapsed.

ensureRowsAreVisible

protected void ensureRowsAreVisible(int beginRow,
                                    int endRow)
Ensures that the rows identified by beginRow through endRow are visible.

setPreferredMinSize

public void setPreferredMinSize(Dimension newSize)
Sets the preferred minimum size.

getPreferredMinSize

public Dimension getPreferredMinSize()
Returns the minimum preferred size.

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Returns the preferred size to properly display the tree, this is a cover method for getPreferredSize(c, false).
Overrides:
getPreferredSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c,
                                  boolean checkConsistancy)
Returns the preferred size to represent the tree in c. If checkConsistancy is true checkConsistancy is messaged first.

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Returns the minimum size for this component. Which will be the min preferred size or 0, 0.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
Overrides:
getMaximumSize in class ComponentUI

completeEditing

protected void completeEditing()
Messages to stop the editing session. If the UI the receiver is providing the look and feel for returns true from getInvokesStopCellEditing, stopCellEditing will invoked on the current editor. Then completeEditing will be messaged with false, true, false to cancel any lingering editing.

completeEditing

protected void completeEditing(boolean messageStop,
                               boolean messageCancel,
                               boolean messageTree)
Stops the editing session. If messageStop is true the editor is messaged with stopEditing, if messageCancel is true the editor is messaged with cancelEditing. If messageTree is true the treeModel is messaged with valueForPathChanged.

startEditing

protected boolean startEditing(TreePath path,
                               MouseEvent event)
Will start editing for node if there is a cellEditor and shouldSelectCell returns true.

This assumes that path is valid and visible.

checkForClickInExpandControl

protected void checkForClickInExpandControl(TreePath path,
                                            int mouseX,
                                            int mouseY)
If the mouseX and mouseY are in the expand/collapse region of the row, this will toggle the row.

isLocationInExpandControl

protected boolean isLocationInExpandControl(TreePath path,
                                            int mouseX,
                                            int mouseY)
Returns true if mouseX and mouseY fall in the area of row that is used to expand/collapse the node and the node at row does not represent a leaf.

handleExpandControlClick

protected void handleExpandControlClick(TreePath path,
                                        int mouseX,
                                        int mouseY)
Messaged when the user clicks the particular row, this invokes toggleExpandState.

toggleExpandState

protected void toggleExpandState(TreePath path)
Expands path if it is not expanded, or collapses row if it is expanded. If expanding a path and JTree scrolls on expand, ensureRowsAreVisible is invoked to scroll as many of the children to visible as possible (tries to scroll to last visible descendant of path).

isToggleSelectionEvent

protected boolean isToggleSelectionEvent(MouseEvent event)
Returning true signifies a mouse event on the node should toggle the selection of only the row under mouse.

isMultiSelectEvent

protected boolean isMultiSelectEvent(MouseEvent event)
Returning true signifies a mouse event on the node should select from the anchor point.

isToggleEvent

protected boolean isToggleEvent(MouseEvent event)
Returning true indicates the row under the mouse should be toggled based on the event. This is invoked after checkForClickInExpandControl, implying the location is not in the expand (toggle) control

selectPathForEvent

protected void selectPathForEvent(TreePath path,
                                  MouseEvent event)
Messaged to update the selection based on a MouseEvent over a particular row. If the event is a toggle selection event, the row is either selected, or deselected. If the event identifies a multi selection event, the selection is updated from the anchor point. Otherwise the row is selected, and if the event specified a toggle event the row is expanded/collapsed.

isLeaf

protected boolean isLeaf(int row)
Returns:
true if the node at row is a leaf.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicVerticalLayoutManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.BasicVerticalLayoutManager

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
        |
        +--javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager
All Implemented Interfaces:
LayoutManager, LayoutManager2
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.BasicVerticalLayoutManager
extends BasicSplitPaneUI.BasicHorizontalLayoutManager

LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Fields inherited from class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
components, sizes
Constructor Summary
BasicSplitPaneUI.BasicVerticalLayoutManager()
Methods inherited from class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
addLayoutComponent, addLayoutComponent, getAvailableSize, getInitialLocation, getLayoutAlignmentX, getLayoutAlignmentY, getPreferredSizeOfComponent, getSizeOfComponent, getSizes, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, resetSizeAt, resetToPreferredSizes, setComponentToSize, setSizes, updateComponents
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.BasicVerticalLayoutManager

public BasicSplitPaneUI.BasicVerticalLayoutManager()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BasicViewportUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicViewportUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ViewportUI
              |
              +--javax.swing.plaf.basic.BasicViewportUI
public class BasicViewportUI
extends ViewportUI

BasicViewport implementation

Constructor Summary
BasicViewportUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected void | installDefaults(JComponent c)
void | installUI(JComponent c)
protected void | uninstallDefaults(JComponent c)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicViewportUI

public BasicViewportUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

installDefaults

protected void installDefaults(JComponent c)

uninstallDefaults

protected void uninstallDefaults(JComponent c)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BorderListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.BorderListener

java.lang.Object
  |
  +--javax.swing.event.MouseInputAdapter
        |
        +--javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener, SwingConstants
Enclosing class:
BasicInternalFrameUI
protected class BasicInternalFrameUI.BorderListener
extends MouseInputAdapter
implements SwingConstants

Listens for border adjustments.

Field Summary
protected  int RESIZE_NONE
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
protected BasicInternalFrameUI.BorderListener()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseEntered
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

RESIZE_NONE

protected final int RESIZE_NONE
Constructor Detail

BasicInternalFrameUI.BorderListener

protected BasicInternalFrameUI.BorderListener()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Overrides:
mouseClicked in class MouseInputAdapter

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseInputAdapter

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseInputAdapter

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Overrides:
mouseDragged in class MouseInputAdapter

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Overrides:
mouseMoved in class MouseInputAdapter

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Overrides:
mouseExited in class MouseInputAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonActionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicOptionPaneUI.ButtonActionListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicOptionPaneUI
public class BasicOptionPaneUI.ButtonActionListener
extends Object
implements ActionListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicOptionPaneUI.

Field Summary
protected  int buttonIndex
Constructor Summary
BasicOptionPaneUI.ButtonActionListener(int buttonIndex)
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buttonIndex

protected int buttonIndex
Constructor Detail

BasicOptionPaneUI.ButtonActionListener

public BasicOptionPaneUI.ButtonActionListener(int buttonIndex)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonAreaLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicOptionPaneUI.ButtonAreaLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
BasicOptionPaneUI
public static class BasicOptionPaneUI.ButtonAreaLayout
extends Object
implements LayoutManager

ButtonAreaLayout acts similiar to FlowLayout. It lays out all components from left to right. If syncAllWidths is true, the widths of each component will be set to the largest preferred size width. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicOptionPaneUI.

Field Summary
protected boolean | centersChildren If true, children are lumped together in parent.
protected int | padding
protected boolean | syncAllWidths
Constructor Summary
BasicOptionPaneUI.ButtonAreaLayout(boolean syncAllWidths, int padding)
Method Summary
void | addLayoutComponent(String string, Component comp) Adds the specified component with the specified name to the layout.
boolean | getCentersChildren()
int | getPadding()
boolean | getSyncAllWidths()
void | layoutContainer(Container container) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container c) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container c) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
void | setCentersChildren(boolean newValue)
void | setPadding(int newPadding)
void | setSyncAllWidths(boolean newValue)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

syncAllWidths

protected boolean syncAllWidths

padding

protected int padding

centersChildren

protected boolean centersChildren
If true, children are lumped together in parent.
Constructor Detail

BasicOptionPaneUI.ButtonAreaLayout

public BasicOptionPaneUI.ButtonAreaLayout(boolean syncAllWidths,
                                          int padding)
Method Detail

setSyncAllWidths

public void setSyncAllWidths(boolean newValue)

getSyncAllWidths

public boolean getSyncAllWidths()

setPadding

public void setPadding(int newPadding)

getPadding

public int getPadding()

setCentersChildren

public void setCentersChildren(boolean newValue)

getCentersChildren

public boolean getCentersChildren()

addLayoutComponent

public void addLayoutComponent(String string,
                               Component comp)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

layoutContainer

public void layoutContainer(Container container)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

minimumLayoutSize

public Dimension minimumLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

preferredLayoutSize

public Dimension preferredLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(Component c)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.ButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.ButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Direct Known Subclasses:
BasicBorders.RadioButtonBorder, BasicBorders.ToggleButtonBorder
Enclosing class:
BasicBorders
public static class BasicBorders.ButtonBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected Color | darkShadow
protected Color | highlight
protected Color | lightHighlight
protected Color | shadow
Constructor Summary
BasicBorders.ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

shadow

protected Color shadow

darkShadow

protected Color darkShadow

highlight

protected Color highlight

lightHighlight

protected Color lightHighlight
Constructor Detail

BasicBorders.ButtonBorder

public BasicBorders.ButtonBorder(Color shadow,
                                 Color darkShadow,
                                 Color highlight,
                                 Color lightHighlight)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CancelSelectionAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.CancelSelectionAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.CancelSelectionAction
extends AbstractAction

Responds to a cancel request.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.CancelSelectionAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.CancelSelectionAction

protected BasicFileChooserUI.CancelSelectionAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CellEditorHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.CellEditorHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler
All Implemented Interfaces:
CellEditorListener, EventListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.CellEditorHandler
extends Object
implements CellEditorListener

Listener responsible for getting cell editing events and updating the tree accordingly.

Constructor Summary
BasicTreeUI.CellEditorHandler()
Method Summary
void | editingCanceled(ChangeEvent e) Messaged when editing has been canceled in the tree.
void | editingStopped(ChangeEvent e) Messaged when editing has stopped in the tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.CellEditorHandler

public BasicTreeUI.CellEditorHandler()
Method Detail

editingStopped

public void editingStopped(ChangeEvent e)
Messaged when editing has stopped in the tree.
Specified by:
editingStopped in interface CellEditorListener

editingCanceled

public void editingCanceled(ChangeEvent e)
Messaged when editing has been canceled in the tree.
Specified by:
editingCanceled in interface CellEditorListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.ChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSliderUI.ChangeHandler
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.ChangeHandler
extends Object
implements ChangeListener

Data model listener. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicSliderUI.ChangeHandler()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.ChangeHandler

public BasicSliderUI.ChangeHandler()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicMenuUI.ChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicMenuUI.ChangeHandler
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicMenuUI
public class BasicMenuUI.ChangeHandler
extends Object
implements ChangeListener

Field Summary
boolean | isSelected
JMenu | menu
BasicMenuUI | ui
Component | wasFocused
Constructor Summary
BasicMenuUI.ChangeHandler(JMenu m, BasicMenuUI ui)
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

menu

public JMenu menu

ui

public BasicMenuUI ui

isSelected

public boolean isSelected

wasFocused

public Component wasFocused
Constructor Detail

BasicMenuUI.ChangeHandler

public BasicMenuUI.ChangeHandler(JMenu m,
                                 BasicMenuUI ui)
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicProgressBarUI.ChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicProgressBarUI
public class BasicProgressBarUI.ChangeHandler
extends Object
implements ChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicProgressBarUI.

Constructor Summary
BasicProgressBarUI.ChangeHandler()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicProgressBarUI.ChangeHandler

public BasicProgressBarUI.ChangeHandler()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangeToParentDirectoryAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.ChangeToParentDirectoryAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.ChangeToParentDirectoryAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.ChangeToParentDirectoryAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.ChangeToParentDirectoryAction

protected BasicFileChooserUI.ChangeToParentDirectoryAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.plaf.basic.BasicBorders

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders

No usage of javax.swing.plaf.basic.BasicBorders

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.FieldBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.FieldBorder

No usage of javax.swing.plaf.basic.BasicBorders.FieldBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.MarginBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.MarginBorder

No usage of javax.swing.plaf.basic.BasicBorders.MarginBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.MenuBarBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.MenuBarBorder

No usage of javax.swing.plaf.basic.BasicBorders.MenuBarBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.RadioButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.RadioButtonBorder

No usage of javax.swing.plaf.basic.BasicBorders.RadioButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.SplitPaneBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.SplitPaneBorder

No usage of javax.swing.plaf.basic.BasicBorders.SplitPaneBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder

No usage of javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicCheckBoxMenuItemUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicCheckBoxMenuItemUI

No usage of javax.swing.plaf.basic.BasicCheckBoxMenuItemUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicCheckBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicCheckBoxUI

No usage of javax.swing.plaf.basic.BasicCheckBoxUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler

No usage of javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxEditor.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxEditor.UIResource

No usage of javax.swing.plaf.basic.BasicComboBoxEditor.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource

No usage of javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler

No usage of javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler

No usage of javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler

No usage of javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.ItemHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.ItemHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.ItemHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.ListDataHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.ListDataHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.ListDataHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction

No usage of javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction

No usage of javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction

No usage of javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction

No usage of javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction

No usage of javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter

No usage of javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

No usage of javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener

No usage of javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener

No usage of javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction

No usage of javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicGraphicsUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicGraphicsUtils

No usage of javax.swing.plaf.basic.BasicGraphicsUtils

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicHTML

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicHTML

No usage of javax.swing.plaf.basic.BasicHTML

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicIconFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicIconFactory

No usage of javax.swing.plaf.basic.BasicIconFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout

No usage of javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.BasicInternalFrameListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener

No usage of javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicListUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI.ListDataHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI.ListDataHandler

No usage of javax.swing.plaf.basic.BasicListUI.ListDataHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI.ListSelectionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI.ListSelectionHandler

No usage of javax.swing.plaf.basic.BasicListUI.ListSelectionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicListUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicMenuBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicMenuBarUI

No usage of javax.swing.plaf.basic.BasicMenuBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicMenuUI.ChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicMenuUI.ChangeHandler

No usage of javax.swing.plaf.basic.BasicMenuUI.ChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener

No usage of javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

No usage of javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicPanelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicPanelUI

No usage of javax.swing.plaf.basic.BasicPanelUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicPasswordFieldUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicPasswordFieldUI

No usage of javax.swing.plaf.basic.BasicPasswordFieldUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicPopupMenuSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicPopupMenuSeparatorUI

No usage of javax.swing.plaf.basic.BasicPopupMenuSeparatorUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicPopupMenuUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicPopupMenuUI

No usage of javax.swing.plaf.basic.BasicPopupMenuUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler

No usage of javax.swing.plaf.basic.BasicProgressBarUI.ChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicRadioButtonMenuItemUI

No usage of javax.swing.plaf.basic.BasicRadioButtonMenuItemUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicRootPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicRootPaneUI

No usage of javax.swing.plaf.basic.BasicRootPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener

No usage of javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler

No usage of javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener

No usage of javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.ActionScroller

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.ActionScroller

No usage of javax.swing.plaf.basic.BasicSliderUI.ActionScroller

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.ChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.ChangeHandler

No usage of javax.swing.plaf.basic.BasicSliderUI.ChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.ComponentHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.ComponentHandler

No usage of javax.swing.plaf.basic.BasicSliderUI.ComponentHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicSliderUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout

No usage of javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController

No usage of javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.BasicVerticalLayoutManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler

No usage of javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler

No usage of javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler

No usage of javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicTableUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableUI.KeyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableUI.KeyHandler

No usage of javax.swing.plaf.basic.BasicTableUI.KeyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicTableUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextAreaUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextAreaUI

No usage of javax.swing.plaf.basic.BasicTextAreaUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextPaneUI

No usage of javax.swing.plaf.basic.BasicTextPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextUI.BasicCaret

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextUI.BasicCaret

No usage of javax.swing.plaf.basic.BasicTextUI.BasicCaret

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextUI.BasicHighlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextUI.BasicHighlighter

No usage of javax.swing.plaf.basic.BasicTextUI.BasicHighlighter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarSeparatorUI

No usage of javax.swing.plaf.basic.BasicToolBarSeparatorUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.FrameListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.FrameListener

No usage of javax.swing.plaf.basic.BasicToolBarUI.FrameListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.PropertyListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.PropertyListener

No usage of javax.swing.plaf.basic.BasicToolBarUI.PropertyListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener

No usage of javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener

No usage of javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.ComponentHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.ComponentHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.ComponentHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.FocusHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.FocusHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.FocusHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.KeyHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.KeyHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.KeyHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.MouseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.MouseHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.MouseHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreePageAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreePageAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreePageAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction

No usage of javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicViewportUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicViewportUI

No usage of javax.swing.plaf.basic.BasicViewportUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.DefaultMenuLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.DefaultMenuLayout

No usage of javax.swing.plaf.basic.DefaultMenuLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicArrowButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicArrowButton

Packages that use BasicArrowButton
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicArrowButton in javax.swing.plaf.metal

Subclasses of BasicArrowButton in javax.swing.plaf.metal
 class MetalScrollButton
JButton object for Metal scrollbar arrows.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicBorders.ButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicBorders.ButtonBorder

Packages that use BasicBorders.ButtonBorder
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicBorders.ButtonBorder in javax.swing.plaf.basic

Subclasses of BasicBorders.ButtonBorder in javax.swing.plaf.basic
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.ToggleButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicButtonListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicButtonListener

Packages that use BasicButtonListener
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicButtonListener in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return BasicButtonListener
protected  BasicButtonListener BasicButtonUI.createButtonListener(AbstractButton b)

Uses of BasicButtonListener in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return BasicButtonListener
protected  BasicButtonListener MetalButtonUI.createButtonListener(AbstractButton b)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicButtonUI

Packages that use BasicButtonUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicButtonUI in javax.swing.plaf.basic

Subclasses of BasicButtonUI in javax.swing.plaf.basic
class | BasicCheckBoxUI CheckboxUI implementation for BasicCheckboxUI
class | BasicRadioButtonUI RadioButtonUI implementation for BasicRadioButtonUI
class | BasicToggleButtonUI BasicToggleButton implementation

Uses of BasicButtonUI in javax.swing.plaf.metal

Subclasses of BasicButtonUI in javax.swing.plaf.metal
class | MetalButtonUI MetalButtonUI implementation
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI
class | MetalToggleButtonUI MetalToggleButton implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicColorChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicColorChooserUI

Packages that use BasicColorChooserUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicColorChooserUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicColorChooserUI
BasicColorChooserUI.PropertyHandler()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxEditor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxEditor

Packages that use BasicComboBoxEditor
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicComboBoxEditor in javax.swing.plaf.basic

Subclasses of BasicComboBoxEditor in javax.swing.plaf.basic
static class BasicComboBoxEditor.UIResource
A subclass of BasicComboBoxEditor that implements UIResource.

Uses of BasicComboBoxEditor in javax.swing.plaf.metal

Subclasses of BasicComboBoxEditor in javax.swing.plaf.metal
class | MetalComboBoxEditor The default editor for Metal editable combo boxes
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxRenderer

Packages that use BasicComboBoxRenderer
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicComboBoxRenderer in javax.swing.plaf.basic

Subclasses of BasicComboBoxRenderer in javax.swing.plaf.basic
static class BasicComboBoxRenderer.UIResource
A subclass of BasicComboBoxRenderer that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI

Packages that use BasicComboBoxUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicComboBoxUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicComboBoxUI
BasicComboBoxUI.KeyHandler()
BasicComboBoxUI.FocusHandler()
BasicComboBoxUI.ListDataHandler()
BasicComboBoxUI.ItemHandler()
BasicComboBoxUI.PropertyChangeHandler()
BasicComboBoxUI.ComboBoxLayoutManager()

Uses of BasicComboBoxUI in javax.swing.plaf.metal

Subclasses of BasicComboBoxUI in javax.swing.plaf.metal
 class MetalComboBoxUI
Metal UI for JComboBox

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager

Packages that use BasicComboBoxUI.ComboBoxLayoutManager
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicComboBoxUI.ComboBoxLayoutManager in javax.swing.plaf.metal

Subclasses of BasicComboBoxUI.ComboBoxLayoutManager in javax.swing.plaf.metal
 class MetalComboBoxUI.MetalComboBoxLayoutManager
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler

Packages that use BasicComboBoxUI.PropertyChangeHandler
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicComboBoxUI.PropertyChangeHandler in javax.swing.plaf.metal

Subclasses of BasicComboBoxUI.PropertyChangeHandler in javax.swing.plaf.metal
 class MetalComboBoxUI.MetalPropertyChangeListener
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicComboPopup

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicComboPopup

Packages that use BasicComboPopup
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicComboPopup in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicComboPopup
BasicComboPopup.InvocationMouseHandler()
BasicComboPopup.InvocationMouseMotionHandler()
BasicComboPopup.InvocationKeyHandler()
BasicComboPopup.ListSelectionHandler()
BasicComboPopup.ListDataHandler()
BasicComboPopup.ListMouseHandler()
BasicComboPopup.ListMouseMotionHandler()
BasicComboPopup.ItemHandler()
BasicComboPopup.PropertyChangeHandler()

Uses of BasicComboPopup in javax.swing.plaf.metal

Subclasses of BasicComboPopup in javax.swing.plaf.metal
 class MetalComboBoxUI.MetalComboPopup
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopIconUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopIconUI

Packages that use BasicDesktopIconUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicDesktopIconUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicDesktopIconUI
BasicDesktopIconUI.MouseInputHandler()

Uses of BasicDesktopIconUI in javax.swing.plaf.metal

Subclasses of BasicDesktopIconUI in javax.swing.plaf.metal
 class MetalDesktopIconUI
Metal desktop icon.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDesktopPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDesktopPaneUI

Packages that use BasicDesktopPaneUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicDesktopPaneUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicDesktopPaneUI
BasicDesktopPaneUI.OpenAction()
BasicDesktopPaneUI.CloseAction()
BasicDesktopPaneUI.MinimizeAction()
BasicDesktopPaneUI.MaximizeAction()
BasicDesktopPaneUI.NavigateAction()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicDirectoryModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicDirectoryModel

Packages that use BasicDirectoryModel
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicDirectoryModel in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return BasicDirectoryModel
 BasicDirectoryModel BasicFileChooserUI.getModel()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicEditorPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicEditorPaneUI

Packages that use BasicEditorPaneUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicEditorPaneUI in javax.swing.plaf.basic

Subclasses of BasicEditorPaneUI in javax.swing.plaf.basic
 class BasicTextPaneUI
Provides the look and feel for a styled text editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicFileChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicFileChooserUI

Packages that use BasicFileChooserUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicFileChooserUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicFileChooserUI
BasicFileChooserUI.DoubleClickListener(JList list)
BasicFileChooserUI.SelectionListener()
BasicFileChooserUI.NewFolderAction()
BasicFileChooserUI.GoHomeAction()
BasicFileChooserUI.ChangeToParentDirectoryAction()
BasicFileChooserUI.ApproveSelectionAction()
BasicFileChooserUI.CancelSelectionAction()
BasicFileChooserUI.UpdateAction()
BasicFileChooserUI.AcceptAllFileFilter()
BasicFileChooserUI.BasicFileView()

Uses of BasicFileChooserUI in javax.swing.plaf.metal

Subclasses of BasicFileChooserUI in javax.swing.plaf.metal
 class MetalFileChooserUI
Metal L&F implementation of a FileChooser.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameTitlePane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameTitlePane

Packages that use BasicInternalFrameTitlePane
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicInternalFrameTitlePane in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicInternalFrameTitlePane
protected  BasicInternalFrameTitlePane BasicInternalFrameUI.titlePane

Constructors in javax.swing.plaf.basic with parameters of type BasicInternalFrameTitlePane
BasicInternalFrameTitlePane.PropertyChangeHandler()
BasicInternalFrameTitlePane.TitlePaneLayout()
BasicInternalFrameTitlePane.CloseAction()
BasicInternalFrameTitlePane.MaximizeAction()
BasicInternalFrameTitlePane.IconifyAction()
BasicInternalFrameTitlePane.RestoreAction()
BasicInternalFrameTitlePane.MoveAction()
BasicInternalFrameTitlePane.SizeAction()
BasicInternalFrameTitlePane.SystemMenuBar()

Uses of BasicInternalFrameTitlePane in javax.swing.plaf.metal

Subclasses of BasicInternalFrameTitlePane in javax.swing.plaf.metal
 class MetalInternalFrameTitlePane
Class that manages a JLF title bar

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicInternalFrameUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicInternalFrameUI

Packages that use BasicInternalFrameUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicInternalFrameUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicInternalFrameUI
BasicInternalFrameUI.InternalFramePropertyChangeListener()
BasicInternalFrameUI.InternalFrameLayout()
BasicInternalFrameUI.BorderListener()
BasicInternalFrameUI.ComponentHandler()
BasicInternalFrameUI.GlassPaneDispatcher()
BasicInternalFrameUI.BasicInternalFrameListener()

Uses of BasicInternalFrameUI in javax.swing.plaf.metal

Subclasses of BasicInternalFrameUI in javax.swing.plaf.metal
 class MetalInternalFrameUI
Metal implementation of JInternalFrame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicLabelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicLabelUI

Packages that use BasicLabelUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicLabelUI in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicLabelUI
protected static BasicLabelUI BasicLabelUI.labelUI

Uses of BasicLabelUI in javax.swing.plaf.metal

Subclasses of BasicLabelUI in javax.swing.plaf.metal
 class MetalLabelUI
A Windows L&F implementation of LabelUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicListUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicListUI

Packages that use BasicListUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicListUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicListUI
BasicListUI.MouseInputHandler()
BasicListUI.FocusHandler()
BasicListUI.ListSelectionHandler()
BasicListUI.ListDataHandler()
BasicListUI.PropertyChangeHandler()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicLookAndFeel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicLookAndFeel

Packages that use BasicLookAndFeel
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicLookAndFeel in javax.swing.plaf.metal

Subclasses of BasicLookAndFeel in javax.swing.plaf.metal
 class MetalLookAndFeel
Implements The Metal Look and Feel.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicMenuItemUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicMenuItemUI

Packages that use BasicMenuItemUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicMenuItemUI in javax.swing.plaf.basic

Subclasses of BasicMenuItemUI in javax.swing.plaf.basic
class | BasicCheckBoxMenuItemUI BasicCheckboxMenuItem implementation
class | BasicMenuUI A default L&F implementation of MenuUI.
class | BasicRadioButtonMenuItemUI BasicRadioButtonMenuItem implementation

Constructors in javax.swing.plaf.basic with parameters of type BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicMenuUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicMenuUI

Packages that use BasicMenuUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicMenuUI in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicMenuUI
 BasicMenuUI BasicMenuUI.ChangeHandler.ui

Constructors in javax.swing.plaf.basic with parameters of type BasicMenuUI
BasicMenuUI.ChangeHandler(JMenu m, BasicMenuUI ui)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicOptionPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicOptionPaneUI

Packages that use BasicOptionPaneUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicOptionPaneUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicOptionPaneUI
BasicOptionPaneUI.PropertyChangeHandler()
BasicOptionPaneUI.ButtonActionListener(int buttonIndex)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicProgressBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicProgressBarUI

Packages that use BasicProgressBarUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicProgressBarUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicProgressBarUI
BasicProgressBarUI.ChangeHandler()

Uses of BasicProgressBarUI in javax.swing.plaf.metal

Subclasses of BasicProgressBarUI in javax.swing.plaf.metal
 class MetalProgressBarUI
The Metal implementation of ProgressBarUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicRadioButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicRadioButtonUI

Packages that use BasicRadioButtonUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicRadioButtonUI in javax.swing.plaf.basic

Subclasses of BasicRadioButtonUI in javax.swing.plaf.basic
 class BasicCheckBoxUI
CheckboxUI implementation for BasicCheckboxUI

Uses of BasicRadioButtonUI in javax.swing.plaf.metal

Subclasses of BasicRadioButtonUI in javax.swing.plaf.metal
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI

Packages that use BasicScrollBarUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicScrollBarUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicScrollBarUI
BasicScrollBarUI.ModelListener()
BasicScrollBarUI.TrackListener()
BasicScrollBarUI.ArrowButtonListener()
BasicScrollBarUI.ScrollListener()
BasicScrollBarUI.ScrollListener(int dir, boolean block)
BasicScrollBarUI.PropertyChangeHandler()

Uses of BasicScrollBarUI in javax.swing.plaf.metal

Subclasses of BasicScrollBarUI in javax.swing.plaf.metal
 class MetalScrollBarUI
Implementation of ScrollBarUI for the Metal Look and Feel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener

Packages that use BasicScrollBarUI.ArrowButtonListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicScrollBarUI.ArrowButtonListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicScrollBarUI.ArrowButtonListener
protected  BasicScrollBarUI.ArrowButtonListener BasicScrollBarUI.buttonListener

Methods in javax.swing.plaf.basic that return BasicScrollBarUI.ArrowButtonListener
protected  BasicScrollBarUI.ArrowButtonListener BasicScrollBarUI.createArrowButtonListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI.ModelListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI.ModelListener

Packages that use BasicScrollBarUI.ModelListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicScrollBarUI.ModelListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicScrollBarUI.ModelListener
protected  BasicScrollBarUI.ModelListener BasicScrollBarUI.modelListener

Methods in javax.swing.plaf.basic that return BasicScrollBarUI.ModelListener
protected  BasicScrollBarUI.ModelListener BasicScrollBarUI.createModelListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener

Packages that use BasicScrollBarUI.ScrollListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicScrollBarUI.ScrollListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicScrollBarUI.ScrollListener
protected  BasicScrollBarUI.ScrollListener BasicScrollBarUI.scrollListener

Methods in javax.swing.plaf.basic that return BasicScrollBarUI.ScrollListener
protected  BasicScrollBarUI.ScrollListener BasicScrollBarUI.createScrollListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollBarUI.TrackListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollBarUI.TrackListener

Packages that use BasicScrollBarUI.TrackListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicScrollBarUI.TrackListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicScrollBarUI.TrackListener
protected  BasicScrollBarUI.TrackListener BasicScrollBarUI.trackListener

Methods in javax.swing.plaf.basic that return BasicScrollBarUI.TrackListener
protected  BasicScrollBarUI.TrackListener BasicScrollBarUI.createTrackListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicScrollPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicScrollPaneUI

Packages that use BasicScrollPaneUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicScrollPaneUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicScrollPaneUI
BasicScrollPaneUI.ViewportChangeHandler()
BasicScrollPaneUI.HSBChangeListener()
BasicScrollPaneUI.VSBChangeListener()
BasicScrollPaneUI.PropertyChangeHandler()

Uses of BasicScrollPaneUI in javax.swing.plaf.metal

Subclasses of BasicScrollPaneUI in javax.swing.plaf.metal
 class MetalScrollPaneUI
A Metal L&F implementation of ScrollPaneUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSeparatorUI

Packages that use BasicSeparatorUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicSeparatorUI in javax.swing.plaf.basic

Subclasses of BasicSeparatorUI in javax.swing.plaf.basic
class | BasicPopupMenuSeparatorUI A Basic L&F implementation of PopupMenuSeparatorUI.
class | BasicToolBarSeparatorUI A Basic L&F implementation of ToolBarSeparatorUI.

Uses of BasicSeparatorUI in javax.swing.plaf.metal

Subclasses of BasicSeparatorUI in javax.swing.plaf.metal
class | MetalPopupMenuSeparatorUI A Metal L&F implementation of PopupMenuSeparatorUI.
class | MetalSeparatorUI A Metal L&F implementation of SeparatorUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI

Packages that use BasicSliderUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicSliderUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicSliderUI
BasicSliderUI.PropertyChangeHandler()
BasicSliderUI.ChangeHandler()
BasicSliderUI.TrackListener()
BasicSliderUI.ScrollListener()
BasicSliderUI.ScrollListener(int dir, boolean block)
BasicSliderUI.ComponentHandler()
BasicSliderUI.FocusHandler()
BasicSliderUI.ActionScroller(JSlider slider, int dir, boolean block)

Uses of BasicSliderUI in javax.swing.plaf.metal

Subclasses of BasicSliderUI in javax.swing.plaf.metal
 class MetalSliderUI
A Java L&F implementation of SliderUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler

Packages that use BasicSliderUI.PropertyChangeHandler
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicSliderUI.PropertyChangeHandler in javax.swing.plaf.metal

Subclasses of BasicSliderUI.PropertyChangeHandler in javax.swing.plaf.metal
protected  class MetalSliderUI.MetalPropertyListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.ScrollListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.ScrollListener

Packages that use BasicSliderUI.ScrollListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicSliderUI.ScrollListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicSliderUI.ScrollListener
protected  BasicSliderUI.ScrollListener BasicSliderUI.scrollListener

Methods in javax.swing.plaf.basic that return BasicSliderUI.ScrollListener
protected  BasicSliderUI.ScrollListener BasicSliderUI.createScrollListener(JSlider slider)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSliderUI.TrackListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSliderUI.TrackListener

Packages that use BasicSliderUI.TrackListener
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicSliderUI.TrackListener in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicSliderUI.TrackListener
protected  BasicSliderUI.TrackListener BasicSliderUI.trackListener

Methods in javax.swing.plaf.basic that return BasicSliderUI.TrackListener
protected  BasicSliderUI.TrackListener BasicSliderUI.createTrackListener(JSlider slider)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneDivider

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneDivider

Packages that use BasicSplitPaneDivider
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicSplitPaneDivider in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicSplitPaneDivider
protected  BasicSplitPaneDivider BasicSplitPaneUI.divider
Instance of the divider for this JSplitPane.

Methods in javax.swing.plaf.basic that return BasicSplitPaneDivider
BasicSplitPaneDivider | BasicSplitPaneUI.getDivider() Returns the divider between the top Components.
BasicSplitPaneDivider | BasicSplitPaneUI.createDefaultDivider() Creates the default divider.

Constructors in javax.swing.plaf.basic with parameters of type BasicSplitPaneDivider
BasicSplitPaneDivider.MouseHandler()
BasicSplitPaneDivider.DragController(MouseEvent e)
BasicSplitPaneDivider.VerticalDragController(MouseEvent e)
BasicSplitPaneDivider.DividerLayout()

Uses of BasicSplitPaneDivider in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return BasicSplitPaneDivider
 BasicSplitPaneDivider MetalSplitPaneUI.createDefaultDivider()
Creates the default divider.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController

Packages that use BasicSplitPaneDivider.DragController
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicSplitPaneDivider.DragController in javax.swing.plaf.basic

Subclasses of BasicSplitPaneDivider.DragController in javax.swing.plaf.basic
protected  class BasicSplitPaneDivider.VerticalDragController
Handles the events during a dragging session for a VERTICAL_SPLIT orientated split pane.

Fields in javax.swing.plaf.basic declared as BasicSplitPaneDivider.DragController
protected  BasicSplitPaneDivider.DragController BasicSplitPaneDivider.dragger
Handles mouse dragging message to do the actual dragging.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler

Packages that use BasicSplitPaneDivider.MouseHandler
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicSplitPaneDivider.MouseHandler in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicSplitPaneDivider.MouseHandler
protected  BasicSplitPaneDivider.MouseHandler BasicSplitPaneDivider.mouseHandler
Handles mouse events from both this class, and the split pane.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI

Packages that use BasicSplitPaneUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicSplitPaneUI in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicSplitPaneUI
protected  BasicSplitPaneUI BasicSplitPaneDivider.splitPaneUI
UI this instance was created from.

Methods in javax.swing.plaf.basic that return BasicSplitPaneUI
 BasicSplitPaneUI BasicSplitPaneDivider.getBasicSplitPaneUI()
Returns the SplitPaneUI the receiver is currently in.

Methods in javax.swing.plaf.basic with parameters of type BasicSplitPaneUI
 void BasicSplitPaneDivider.setBasicSplitPaneUI(BasicSplitPaneUI newUI)
Sets the SplitPaneUI that is using the receiver.

Constructors in javax.swing.plaf.basic with parameters of type BasicSplitPaneUI
BasicSplitPaneUI.PropertyHandler()
BasicSplitPaneUI.FocusHandler()
BasicSplitPaneUI.KeyboardUpLeftHandler()
BasicSplitPaneUI.KeyboardDownRightHandler()
BasicSplitPaneUI.KeyboardHomeHandler()
BasicSplitPaneUI.KeyboardEndHandler()
BasicSplitPaneUI.KeyboardResizeToggleHandler()
BasicSplitPaneUI.BasicVerticalLayoutManager()
BasicSplitPaneDivider(BasicSplitPaneUI ui)
Creates an instance of BasicSplitPaneDivider.

Uses of BasicSplitPaneUI in javax.swing.plaf.metal

Subclasses of BasicSplitPaneUI in javax.swing.plaf.metal
 class MetalSplitPaneUI
Metal split pane.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager

Packages that use BasicSplitPaneUI.BasicHorizontalLayoutManager
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicSplitPaneUI.BasicHorizontalLayoutManager in javax.swing.plaf.basic

Subclasses of BasicSplitPaneUI.BasicHorizontalLayoutManager in javax.swing.plaf.basic
 class BasicSplitPaneUI.BasicVerticalLayoutManager
LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.

Fields in javax.swing.plaf.basic declared as BasicSplitPaneUI.BasicHorizontalLayoutManager
protected  BasicSplitPaneUI.BasicHorizontalLayoutManager BasicSplitPaneUI.layoutManager
LayoutManager that is created and placed into the split pane.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI

Packages that use BasicTabbedPaneUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicTabbedPaneUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicTabbedPaneUI
BasicTabbedPaneUI.TabbedPaneLayout()
BasicTabbedPaneUI.PropertyChangeHandler()
BasicTabbedPaneUI.TabSelectionHandler()
BasicTabbedPaneUI.MouseHandler()
BasicTabbedPaneUI.FocusHandler()

Uses of BasicTabbedPaneUI in javax.swing.plaf.metal

Subclasses of BasicTabbedPaneUI in javax.swing.plaf.metal
 class MetalTabbedPaneUI
The Metal subclass of BasicTabbedPaneUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout

Packages that use BasicTabbedPaneUI.TabbedPaneLayout
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicTabbedPaneUI.TabbedPaneLayout in javax.swing.plaf.metal

Subclasses of BasicTabbedPaneUI.TabbedPaneLayout in javax.swing.plaf.metal
 class MetalTabbedPaneUI.TabbedPaneLayout
This inner class is marked "public" due to a compiler bug.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableHeaderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableHeaderUI

Packages that use BasicTableHeaderUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicTableHeaderUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicTableHeaderUI
BasicTableHeaderUI.MouseInputHandler()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTableUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTableUI

Packages that use BasicTableUI
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicTableUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicTableUI
BasicTableUI.KeyHandler()
BasicTableUI.FocusHandler()
BasicTableUI.MouseInputHandler()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextFieldUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextFieldUI

Packages that use BasicTextFieldUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicTextFieldUI in javax.swing.plaf.basic

Subclasses of BasicTextFieldUI in javax.swing.plaf.basic
 class BasicPasswordFieldUI
Provides the Windows look and feel for a password field.

Uses of BasicTextFieldUI in javax.swing.plaf.metal

Subclasses of BasicTextFieldUI in javax.swing.plaf.metal
 class MetalTextFieldUI
Basis of a look and feel for a JTextField.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTextUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTextUI

Packages that use BasicTextUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of BasicTextUI in javax.swing.plaf.basic

Subclasses of BasicTextUI in javax.swing.plaf.basic
class | BasicEditorPaneUI Provides the look and feel for a JEditorPane.
class | BasicPasswordFieldUI Provides the Windows look and feel for a password field.
class | BasicTextAreaUI Provides the look and feel for a plain text editor.
class | BasicTextFieldUI Basis of a look and feel for a JTextField.
class | BasicTextPaneUI Provides the look and feel for a styled text editor.

Uses of BasicTextUI in javax.swing.plaf.metal

Subclasses of BasicTextUI in javax.swing.plaf.metal
 class MetalTextFieldUI
Basis of a look and feel for a JTextField.

Uses of BasicTextUI in javax.swing.text

Subclasses of BasicTextUI in javax.swing.text
 class DefaultTextUI
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToggleButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToggleButtonUI

Packages that use BasicToggleButtonUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicToggleButtonUI in javax.swing.plaf.basic

Subclasses of BasicToggleButtonUI in javax.swing.plaf.basic
class | BasicCheckBoxUI CheckboxUI implementation for BasicCheckboxUI
class | BasicRadioButtonUI RadioButtonUI implementation for BasicRadioButtonUI

Uses of BasicToggleButtonUI in javax.swing.plaf.metal

Subclasses of BasicToggleButtonUI in javax.swing.plaf.metal
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI
class | MetalToggleButtonUI MetalToggleButton implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI

Packages that use BasicToolBarUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicToolBarUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicToolBarUI
BasicToolBarUI.FrameListener()
BasicToolBarUI.ToolBarContListener()
BasicToolBarUI.ToolBarFocusListener()
BasicToolBarUI.PropertyListener()
BasicToolBarUI.DockingListener(JToolBar t)

Uses of BasicToolBarUI in javax.swing.plaf.metal

Subclasses of BasicToolBarUI in javax.swing.plaf.metal
 class MetalToolBarUI
A Metal Look and Feel implementation of ToolBarUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.DockingListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.DockingListener

Packages that use BasicToolBarUI.DockingListener
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicToolBarUI.DockingListener in javax.swing.plaf.metal

Subclasses of BasicToolBarUI.DockingListener in javax.swing.plaf.metal
protected  class MetalToolBarUI.MetalDockingListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolBarUI.DragWindow

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolBarUI.DragWindow

Packages that use BasicToolBarUI.DragWindow
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of BasicToolBarUI.DragWindow in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as BasicToolBarUI.DragWindow
protected  BasicToolBarUI.DragWindow BasicToolBarUI.dragWindow

Methods in javax.swing.plaf.basic that return BasicToolBarUI.DragWindow
protected  BasicToolBarUI.DragWindow BasicToolBarUI.createDragWindow(JToolBar toolbar)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicToolTipUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicToolTipUI

Packages that use BasicToolTipUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicToolTipUI in javax.swing.plaf.metal

Subclasses of BasicToolTipUI in javax.swing.plaf.metal
 class MetalToolTipUI
A Metal L&F extension of BasicToolTipUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.basic.BasicTreeUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.basic.BasicTreeUI

Packages that use BasicTreeUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of BasicTreeUI in javax.swing.plaf.basic

Constructors in javax.swing.plaf.basic with parameters of type BasicTreeUI
BasicTreeUI.TreeExpansionHandler()
BasicTreeUI.ComponentHandler()
BasicTreeUI.TreeModelHandler()
BasicTreeUI.TreeSelectionHandler()
BasicTreeUI.CellEditorHandler()
BasicTreeUI.KeyHandler()
BasicTreeUI.FocusHandler()
BasicTreeUI.NodeDimensionsHandler()
BasicTreeUI.MouseHandler()
BasicTreeUI.PropertyChangeHandler()
BasicTreeUI.SelectionModelPropertyChangeHandler()
BasicTreeUI.TreeTraverseAction(int direction, String name)
BasicTreeUI.TreePageAction(int direction, String name)
BasicTreeUI.TreeIncrementAction(int direction, String name)
BasicTreeUI.TreeHomeAction(int direction, String name)
BasicTreeUI.TreeToggleAction(String name)
BasicTreeUI.TreeCancelEditingAction(String name)
BasicTreeUI.MouseInputHandler(Component source, Component destination, MouseEvent event)

Uses of BasicTreeUI in javax.swing.plaf.metal

Subclasses of BasicTreeUI in javax.swing.plaf.metal
 class MetalTreeUI
MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.plaf.basic.ComboPopup

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.plaf.basic.ComboPopup

Packages that use ComboPopup
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ComboPopup in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ComboPopup
 class BasicComboPopup
This is an implementation of the ComboPopup interface.

Fields in javax.swing.plaf.basic declared as ComboPopup
protected  ComboPopup BasicComboBoxUI.popup

Methods in javax.swing.plaf.basic that return ComboPopup
protected  ComboPopup BasicComboBoxUI.createPopup()
Creates an implementation of the ComboPopup interface.

Uses of ComboPopup in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ComboPopup
 class MetalComboBoxUI.MetalComboPopup
This inner class is marked "public" due to a compiler bug.

Methods in javax.swing.plaf.metal that return ComboPopup
protected  ComboPopup MetalComboBoxUI.createPopup()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CloseAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI.CloseAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicDesktopPaneUI
protected class BasicDesktopPaneUI.CloseAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicDesktopPaneUI.CloseAction()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopPaneUI.CloseAction

protected BasicDesktopPaneUI.CloseAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.CloseAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.CloseAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.CloseAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.CloseAction

public BasicInternalFrameTitlePane.CloseAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComboBoxLayoutManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.ComboBoxLayoutManager

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
All Implemented Interfaces:
LayoutManager
Direct Known Subclasses:
MetalComboBoxUI.MetalComboBoxLayoutManager
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.ComboBoxLayoutManager
extends Object
implements LayoutManager

This layout manager handles the 'standard' layout of combo boxes. It puts the arrow button to the right and the editor to the left. If there is no editor it still keeps the arrow button to the right. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.ComboBoxLayoutManager()
Method Summary
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
void | layoutContainer(Container parent) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.ComboBoxLayoutManager

public BasicComboBoxUI.ComboBoxLayoutManager()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(Container parent)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComboPopup

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Interface ComboPopup

All Known Implementing Classes:
BasicComboPopup
public interface ComboPopup

The interface which defines the kind of popup menu that BasicComboBoxUI requires. Classes that implement this interface don't have to extend JPopupMenu. This interface demands very little so alternatives to JPopupMenu can be used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Method Summary
KeyListener | getKeyListener() Returns a key listener that shows and hides the popup.
JList | getList() Returns the list that is being used to draw the items in the JComboBox.
MouseListener | getMouseListener() Returns a mouse listener that shows and hides the popup.
MouseMotionListener | getMouseMotionListener() Returns a mouse motion listener that makes the popup act like a menu.
void | hide() Hides the popup
boolean | isVisible() Returns whether or not the popup is visible
void | show() Shows the popup
void | uninstallingUI() Called to inform the ComboPopup that the UI is uninstalling.

Method Detail

show

public void show()
Shows the popup

hide

public void hide()
Hides the popup

isVisible

public boolean isVisible()
Returns whether or not the popup is visible

getList

public JList getList()
Returns the list that is being used to draw the items in the JComboBox.

getMouseListener

public MouseListener getMouseListener()
Returns a mouse listener that shows and hides the popup.

getMouseMotionListener

public MouseMotionListener getMouseMotionListener()
Returns a mouse motion listener that makes the popup act like a menu.

getKeyListener

public KeyListener getKeyListener()
Returns a key listener that shows and hides the popup.

uninstallingUI

public void uninstallingUI()
Called to inform the ComboPopup that the UI is uninstalling. If the ComboPopup added any listeners in the component, it should remove them here.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ComponentHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.ComponentHandler

java.lang.Object
  |
  +--java.awt.event.ComponentAdapter
        |
        +--javax.swing.plaf.basic.BasicTreeUI.ComponentHandler
All Implemented Interfaces:
ActionListener, ComponentListener, EventListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.ComponentHandler
extends ComponentAdapter
implements ActionListener

Updates the preferred size when scrolling (if necessary).

Field Summary
protected JScrollBar | scrollBar ScrollBar that is being adjusted.
protected Timer | timer Timer used when inside a scrollpane and the scrollbar is adjusting.
Constructor Summary
BasicTreeUI.ComponentHandler()
Method Summary
void | actionPerformed(ActionEvent ae) Public as a result of Timer.
void | componentMoved(ComponentEvent e) Invoked when the component's position changes.
protected JScrollPane | getScrollPane() Returns the JScrollPane housing the JTree, or null if one isn't found.
protected void | startTimer() Creates, if necessary, and starts a Timer to check if need to resize the bounds.
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentResized, componentShown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

timer

protected Timer timer
Timer used when inside a scrollpane and the scrollbar is adjusting.

scrollBar

protected JScrollBar scrollBar
ScrollBar that is being adjusted.
Constructor Detail

BasicTreeUI.ComponentHandler

public BasicTreeUI.ComponentHandler()
Method Detail

componentMoved

public void componentMoved(ComponentEvent e)
Description copied from class: ComponentAdapter
Invoked when the component's position changes.
Overrides:
componentMoved in class ComponentAdapter

startTimer

protected void startTimer()
Creates, if necessary, and starts a Timer to check if need to resize the bounds.

getScrollPane

protected JScrollPane getScrollPane()
Returns the JScrollPane housing the JTree, or null if one isn't found.

actionPerformed

public void actionPerformed(ActionEvent ae)
Public as a result of Timer. If the scrollBar is null, or not adjusting, this stops the timer and updates the sizing.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.ComponentHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler
All Implemented Interfaces:
ComponentListener, EventListener
Enclosing class:
BasicInternalFrameUI
protected class BasicInternalFrameUI.ComponentHandler
extends Object
implements ComponentListener

Constructor Summary
protected BasicInternalFrameUI.ComponentHandler()
Method Summary
void | componentHidden(ComponentEvent e) Invoked when the component has been made invisible.
void | componentMoved(ComponentEvent e) Invoked when the component's position changes.
void | componentResized(ComponentEvent e) Invoked when a JInternalFrame's parent's size changes.
void | componentShown(ComponentEvent e) Invoked when the component has been made visible.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameUI.ComponentHandler

protected BasicInternalFrameUI.ComponentHandler()
Method Detail

componentResized

public void componentResized(ComponentEvent e)
Invoked when a JInternalFrame's parent's size changes.
Specified by:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's position changes.
Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made visible.
Specified by:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made invisible.
Specified by:
componentHidden in interface ComponentListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.ComponentHandler

java.lang.Object
  |
  +--java.awt.event.ComponentAdapter
        |
        +--javax.swing.plaf.basic.BasicSliderUI.ComponentHandler
All Implemented Interfaces:
ComponentListener, EventListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.ComponentHandler
extends ComponentAdapter

Listener for resizing events.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicSliderUI.ComponentHandler()
Method Summary
 void componentResized(ComponentEvent e)
Invoked when the component's size changes.
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentMoved, componentShown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.ComponentHandler

public BasicSliderUI.ComponentHandler()
Method Detail

componentResized

public void componentResized(ComponentEvent e)
Description copied from class: ComponentAdapter
Invoked when the component's size changes.
Overrides:
componentResized in class ComponentAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultMenuLayout

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class DefaultMenuLayout

java.lang.Object
  |
  +--javax.swing.BoxLayout
        |
        +--javax.swing.plaf.basic.DefaultMenuLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable, UIResource
public class DefaultMenuLayout
extends BoxLayout
implements UIResource

The default layout manager for Popup menus and menubars. This class is an extension of BoxLayout which adds the UIResource tag so that plauggable L&Fs can distinguish it from user-installed layout managers on menus.

See Also:
Serialized Form

Fields inherited from class javax.swing.BoxLayout
X_AXIS, Y_AXIS
Constructor Summary
DefaultMenuLayout(Container target, int axis)
Methods inherited from class javax.swing.BoxLayout
addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultMenuLayout

public DefaultMenuLayout(Container target,
                         int axis)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DividerLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneDivider.DividerLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneDivider.DividerLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
BasicSplitPaneDivider
protected class BasicSplitPaneDivider.DividerLayout
extends Object
implements LayoutManager

Used to layout a BasicSplitPaneDivider. Layout for the divider involves appropraitely moving the left/right buttons around.

Constructor Summary
protected BasicSplitPaneDivider.DividerLayout()
Method Summary
void | addLayoutComponent(String string, Component c) Adds the specified component with the specified name to the layout.
void | layoutContainer(Container c) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container c) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container c) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneDivider.DividerLayout

protected BasicSplitPaneDivider.DividerLayout()
Method Detail

layoutContainer

public void layoutContainer(Container c)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

minimumLayoutSize

public Dimension minimumLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

preferredLayoutSize

public Dimension preferredLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(Component c)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

addLayoutComponent

public void addLayoutComponent(String string,
                               Component c)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DockingListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.DockingListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicToolBarUI.DockingListener
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Direct Known Subclasses:
MetalToolBarUI.MetalDockingListener
Enclosing class:
BasicToolBarUI
public class BasicToolBarUI.DockingListener
extends Object
implements MouseInputListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicToolBarUI.

Field Summary
protected boolean | isDragging
protected Point | origin
protected JToolBar | toolBar
Constructor Summary
BasicToolBarUI.DockingListener(JToolBar t)
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

toolBar

protected JToolBar toolBar

isDragging

protected boolean isDragging

origin

protected Point origin
Constructor Detail

BasicToolBarUI.DockingListener

public BasicToolBarUI.DockingListener(JToolBar t)
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleClickListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.DoubleClickListener

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.DoubleClickListener
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.DoubleClickListener
extends MouseAdapter

Constructor Summary
BasicFileChooserUI.DoubleClickListener(JList list)
Method Summary
 void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.DoubleClickListener

public BasicFileChooserUI.DoubleClickListener(JList list)
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when the mouse has been clicked on a component.
Overrides:
mouseClicked in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragController

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneDivider.DragController

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Direct Known Subclasses:
BasicSplitPaneDivider.VerticalDragController
Enclosing class:
BasicSplitPaneDivider
protected class BasicSplitPaneDivider.DragController
extends Object

Handles the events during a dragging session for a HORIZONTAL_SPLIT orientated split pane. This continually messages dragDividerTo and then when done messages finishDraggingTo. When an instance is created it should be messaged with isValid() to insure that dragging can happen (dragging won't be allowed if the two views can not be resized).

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Constructor Summary
protected BasicSplitPaneDivider.DragController(MouseEvent e)
Method Summary
protected void | completeDrag(int x, int y)
protected void | completeDrag(MouseEvent e) Messages finishDraggingTo with the new location for the mouse event.
protected void | continueDrag(int newX, int newY)
protected void | continueDrag(MouseEvent e) Messages dragDividerTo with the new location for the mouse event.
protected int | getNeededLocation(int x, int y) Returns the x argument, since this is used for horizontal splits.
protected boolean | isValid() Returns true if the dragging session is valid.
protected int | positionForMouseEvent(MouseEvent e) Returns the new position to put the divider at based on the passed in MouseEvent.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneDivider.DragController

protected BasicSplitPaneDivider.DragController(MouseEvent e)
Method Detail

isValid

protected boolean isValid()
Returns true if the dragging session is valid.

positionForMouseEvent

protected int positionForMouseEvent(MouseEvent e)
Returns the new position to put the divider at based on the passed in MouseEvent.

getNeededLocation

protected int getNeededLocation(int x,
                                int y)
Returns the x argument, since this is used for horizontal splits.

continueDrag

protected void continueDrag(int newX,
                            int newY)

continueDrag

protected void continueDrag(MouseEvent e)
Messages dragDividerTo with the new location for the mouse event.

completeDrag

protected void completeDrag(int x,
                            int y)

completeDrag

protected void completeDrag(MouseEvent e)
Messages finishDraggingTo with the new location for the mouse event.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DragWindow

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.DragWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--javax.swing.plaf.basic.BasicToolBarUI.DragWindow
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Enclosing class:
BasicToolBarUI
protected class BasicToolBarUI.DragWindow
extends Window

See Also:
Serialized Form

Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Method Summary
Color | getBorderColor()
Insets | getInsets() Determines the insets of this container, which indicate the size of the container's border.
Point | getOffset()
void | paint(Graphics g) Paints the container.
void | setBorderColor(Color c)
void | setOffset(Point p)
void | setOrientation(int o)
Methods inherited from class java.awt.Window
addNotify, addWindowListener, applyResourceBundle, applyResourceBundle, dispose, finalize, getAccessibleContext, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

setOrientation

public void setOrientation(int o)

getOffset

public Point getOffset()

setOffset

public void setOffset(Point p)

setBorderColor

public void setBorderColor(Color c)

getBorderColor

public Color getBorderColor()

paint

public void paint(Graphics g)
Description copied from class: Container
Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.
Overrides:
paint in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

getInsets

public Insets getInsets()
Description copied from class: Container
Determines the insets of this container, which indicate the size of the container's border.

A Frame object, for example, has a top inset that corresponds to the height of the frame's title bar.

Overrides:
getInsets in class Container
Following copied from class: java.awt.Container
Returns:
the insets of this container.
See Also:
Insets, LayoutManager
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.FieldBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.FieldBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.FieldBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected Color | darkShadow
protected Color | highlight
protected Color | lightHighlight
protected Color | shadow
Constructor Summary
BasicBorders.FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

shadow

protected Color shadow

darkShadow

protected Color darkShadow

highlight

protected Color highlight

lightHighlight

protected Color lightHighlight
Constructor Detail

BasicBorders.FieldBorder

public BasicBorders.FieldBorder(Color shadow,
                                Color darkShadow,
                                Color highlight,
                                Color lightHighlight)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.FocusHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.FocusHandler
extends Object
implements FocusListener

This listener hides the popup when the focus is lost. It also repaints when focus is gained or lost. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.FocusHandler

public BasicComboBoxUI.FocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI.FocusHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicListUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicListUI
public class BasicListUI.FocusHandler
extends Object
implements FocusListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTableUI.

Constructor Summary
BasicListUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
protected void | repaintCellFocus()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicListUI.FocusHandler

public BasicListUI.FocusHandler()
Method Detail

repaintCellFocus

protected void repaintCellFocus()

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.FocusHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.FocusHandler
extends Object
implements FocusListener

Repaints the lead selection row when focus is lost/gained.

Constructor Summary
BasicTreeUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when focus is activated on the tree we're in, redraws the lead row.
void | focusLost(FocusEvent e) Invoked when focus is activated on the tree we're in, redraws the lead row.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.FocusHandler

public BasicTreeUI.FocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Invoked when focus is activated on the tree we're in, redraws the lead row.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Invoked when focus is activated on the tree we're in, redraws the lead row.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.FocusHandler

java.lang.Object
  |
  +--java.awt.event.FocusAdapter
        |
        +--javax.swing.plaf.basic.BasicSplitPaneUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.FocusHandler
extends FocusAdapter

Implementation of the FocusListener that the JSplitPane UI uses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.FocusHandler()
Method Summary
 void focusLost(FocusEvent ev)
Invoked when a component loses the keyboard focus.
Methods inherited from class java.awt.event.FocusAdapter
focusGained
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.FocusHandler

public BasicSplitPaneUI.FocusHandler()
Method Detail

focusLost

public void focusLost(FocusEvent ev)
Description copied from class: FocusAdapter
Invoked when a component loses the keyboard focus.
Overrides:
focusLost in class FocusAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableUI.FocusHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTableUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicTableUI
public class BasicTableUI.FocusHandler
extends Object
implements FocusListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTableUI.

Constructor Summary
BasicTableUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTableUI.FocusHandler

public BasicTableUI.FocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.FocusHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSliderUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.FocusHandler
extends Object
implements FocusListener

Focus-change listener.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicSliderUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.FocusHandler

public BasicSliderUI.FocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FocusHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI.FocusHandler

java.lang.Object
  |
  +--java.awt.event.FocusAdapter
        |
        +--javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicTabbedPaneUI
public class BasicTabbedPaneUI.FocusHandler
extends FocusAdapter

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI.

Constructor Summary
BasicTabbedPaneUI.FocusHandler()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTabbedPaneUI.FocusHandler

public BasicTabbedPaneUI.FocusHandler()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Description copied from class: FocusAdapter
Invoked when a component gains the keyboard focus.
Overrides:
focusGained in class FocusAdapter

focusLost

public void focusLost(FocusEvent e)
Description copied from class: FocusAdapter
Invoked when a component loses the keyboard focus.
Overrides:
focusLost in class FocusAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrameListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.FrameListener

java.lang.Object
  |
  +--java.awt.event.WindowAdapter
        |
        +--javax.swing.plaf.basic.BasicToolBarUI.FrameListener
All Implemented Interfaces:
EventListener, WindowListener
Enclosing class:
BasicToolBarUI
protected class BasicToolBarUI.FrameListener
extends WindowAdapter

Constructor Summary
protected BasicToolBarUI.FrameListener()
Method Summary
 void windowClosing(WindowEvent w)
Invoked when a window is in the process of being closed.
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolBarUI.FrameListener

protected BasicToolBarUI.FrameListener()
Method Detail

windowClosing

public void windowClosing(WindowEvent w)
Description copied from class: WindowAdapter
Invoked when a window is in the process of being closed. The close operation can be overridden at this point.
Overrides:
windowClosing in class WindowAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GlassPaneDispatcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.GlassPaneDispatcher

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameUI.GlassPaneDispatcher
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicInternalFrameUI
protected class BasicInternalFrameUI.GlassPaneDispatcher
extends Object
implements MouseInputListener

Constructor Summary
protected BasicInternalFrameUI.GlassPaneDispatcher()
Method Summary
void | mouseClicked(MouseEvent e) Ignore mouseClicked events.
void | mouseDragged(MouseEvent e) Ignore mouseDragged events.
void | mouseEntered(MouseEvent e) Forward the mouseEntered event to the underlying child container.
void | mouseExited(MouseEvent e) Forward the mouseExited event to the underlying child container.
void | mouseMoved(MouseEvent e) Forward the mouseMoved event to the underlying child container.
void | mousePressed(MouseEvent e) When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component.
void | mouseReleased(MouseEvent e) Ignore mouseReleased events.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameUI.GlassPaneDispatcher

protected BasicInternalFrameUI.GlassPaneDispatcher()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component. In keeping with the MDI messaging model (which JInternalFrame emulates), only the mousePressed event is forwarded to the UI to activate the frame. The mouseEntered, mouseMoved, and MouseExited events are forwarded to the underlying child component, using methods derived from those in Container. The other mouse events are purposely ignored, since they have no meaning to either the frame or its children when the frame is inactive.
Specified by:
mousePressed in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Forward the mouseEntered event to the underlying child container.
Specified by:
mouseEntered in interface MouseListener
See Also:
mousePressed(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(MouseEvent e)
Forward the mouseMoved event to the underlying child container.
Specified by:
mouseMoved in interface MouseMotionListener
See Also:
mousePressed(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(MouseEvent e)
Forward the mouseExited event to the underlying child container.
Specified by:
mouseExited in interface MouseListener
See Also:
mousePressed(java.awt.event.MouseEvent)

mouseClicked

public void mouseClicked(MouseEvent e)
Ignore mouseClicked events.
Specified by:
mouseClicked in interface MouseListener
See Also:
mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent e)
Ignore mouseReleased events.
Specified by:
mouseReleased in interface MouseListener
See Also:
mousePressed(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
Ignore mouseDragged events.
Specified by:
mouseDragged in interface MouseMotionListener
See Also:
mousePressed(java.awt.event.MouseEvent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GoHomeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.GoHomeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.GoHomeAction
extends AbstractAction

Acts on the "home" key event or equivalent event.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.GoHomeAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.GoHomeAction

protected BasicFileChooserUI.GoHomeAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HSBChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollPaneUI.HSBChangeListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicScrollPaneUI
public class BasicScrollPaneUI.HSBChangeListener
extends Object
implements ChangeListener

Horizontal scrollbar listener.

Constructor Summary
BasicScrollPaneUI.HSBChangeListener()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollPaneUI.HSBChangeListener

public BasicScrollPaneUI.HSBChangeListener()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IconifyAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.IconifyAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.IconifyAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.IconifyAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.IconifyAction

public BasicInternalFrameTitlePane.IconifyAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.InternalFrameLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameUI.InternalFrameLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
BasicInternalFrameUI
public class BasicInternalFrameUI.InternalFrameLayout
extends Object
implements LayoutManager

Constructor Summary
BasicInternalFrameUI.InternalFrameLayout()
Method Summary
void | addLayoutComponent(String name, Component c) Adds the specified component with the specified name to the layout.
void | layoutContainer(Container c) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container c) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container c) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameUI.InternalFrameLayout

public BasicInternalFrameUI.InternalFrameLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component c)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component c)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(Container c)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFramePropertyChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameUI.InternalFramePropertyChangeListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicInternalFrameUI
public class BasicInternalFrameUI.InternalFramePropertyChangeListener
extends Object
implements PropertyChangeListener

Constructor Summary
BasicInternalFrameUI.InternalFramePropertyChangeListener()
Method Summary
 void propertyChange(PropertyChangeEvent evt)
Detects changes in state from the JInternalFrame and handles actions.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameUI.InternalFramePropertyChangeListener

public BasicInternalFrameUI.InternalFramePropertyChangeListener()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Detects changes in state from the JInternalFrame and handles actions.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationKeyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.InvocationKeyHandler

java.lang.Object
  |
  +--java.awt.event.KeyAdapter
        |
        +--javax.swing.plaf.basic.BasicComboPopup.InvocationKeyHandler
All Implemented Interfaces:
EventListener, KeyListener
Enclosing class:
BasicComboPopup
public class BasicComboPopup.InvocationKeyHandler
extends KeyAdapter

This listener watches for the spacebar being pressed and shows/hides the popup accordingly.

Constructor Summary
BasicComboPopup.InvocationKeyHandler()
Method Summary
 void keyReleased(KeyEvent e)
Invoked when a key has been released.
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyTyped
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.InvocationKeyHandler

public BasicComboPopup.InvocationKeyHandler()
Method Detail

keyReleased

public void keyReleased(KeyEvent e)
Description copied from class: KeyAdapter
Invoked when a key has been released.
Overrides:
keyReleased in class KeyAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationMouseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.InvocationMouseHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicComboPopup.InvocationMouseHandler
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.InvocationMouseHandler
extends MouseAdapter

This listener knows how and when to invoke this popup menu. It also helps with click-and-drag scenarios by setting the selection if the mouse was released over the list during a drag.

Constructor Summary
protected BasicComboPopup.InvocationMouseHandler()
Method Summary
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.InvocationMouseHandler

protected BasicComboPopup.InvocationMouseHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationMouseMotionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.InvocationMouseMotionHandler

java.lang.Object
  |
  +--java.awt.event.MouseMotionAdapter
        |
        +--javax.swing.plaf.basic.BasicComboPopup.InvocationMouseMotionHandler
All Implemented Interfaces:
EventListener, MouseMotionListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.InvocationMouseMotionHandler
extends MouseMotionAdapter

This listener watches for dragging and updates the current selection in the list if it is dragging over the list.

Constructor Summary
protected BasicComboPopup.InvocationMouseMotionHandler()
Method Summary
 void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged.
Methods inherited from class java.awt.event.MouseMotionAdapter
mouseMoved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.InvocationMouseMotionHandler

protected BasicComboPopup.InvocationMouseMotionHandler()
Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from class: MouseMotionAdapter
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Overrides:
mouseDragged in class MouseMotionAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItemHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.ItemHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboPopup.ItemHandler
All Implemented Interfaces:
EventListener, ItemListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.ItemHandler
extends Object
implements ItemListener

This listener watches for changes in the JComboBox's selection. It updates the list accordingly.

Constructor Summary
protected BasicComboPopup.ItemHandler()
Method Summary
 void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.ItemHandler

protected BasicComboPopup.ItemHandler()
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)
Description copied from interface: ItemListener
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Specified by:
itemStateChanged in interface ItemListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItemHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.ItemHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler
All Implemented Interfaces:
EventListener, ItemListener
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.ItemHandler
extends Object
implements ItemListener

This listener watches for changes to the selection in the combo box and updates the display of the currently selected item. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.ItemHandler()
Method Summary
 void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.ItemHandler

public BasicComboBoxUI.ItemHandler()
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)
Description copied from interface: ItemListener
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Specified by:
itemStateChanged in interface ItemListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyboardDownRightHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.KeyboardDownRightHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.KeyboardDownRightHandler
extends Object
implements ActionListener

Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.KeyboardDownRightHandler()
Method Summary
 void actionPerformed(ActionEvent ev)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.KeyboardDownRightHandler

public BasicSplitPaneUI.KeyboardDownRightHandler()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyboardEndHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.KeyboardEndHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.KeyboardEndHandler
extends Object
implements ActionListener

Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.KeyboardEndHandler()
Method Summary
 void actionPerformed(ActionEvent ev)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.KeyboardEndHandler

public BasicSplitPaneUI.KeyboardEndHandler()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyboardHomeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.KeyboardHomeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.KeyboardHomeHandler
extends Object
implements ActionListener

Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.KeyboardHomeHandler()
Method Summary
 void actionPerformed(ActionEvent ev)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.KeyboardHomeHandler

public BasicSplitPaneUI.KeyboardHomeHandler()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyboardResizeToggleHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.KeyboardResizeToggleHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.KeyboardResizeToggleHandler
extends Object
implements ActionListener

Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.KeyboardResizeToggleHandler()
Method Summary
 void actionPerformed(ActionEvent ev)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.KeyboardResizeToggleHandler

public BasicSplitPaneUI.KeyboardResizeToggleHandler()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyboardUpLeftHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.KeyboardUpLeftHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.KeyboardUpLeftHandler
extends Object
implements ActionListener

Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.KeyboardUpLeftHandler()
Method Summary
 void actionPerformed(ActionEvent ev)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.KeyboardUpLeftHandler

public BasicSplitPaneUI.KeyboardUpLeftHandler()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableUI.KeyHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTableUI.KeyHandler
All Implemented Interfaces:
EventListener, KeyListener
Enclosing class:
BasicTableUI
public class BasicTableUI.KeyHandler
extends Object
implements KeyListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTableUI.

As of Java 2 platform v1.3 this class is no longer used. Instead JTable overrides processKeyBinding to dispatch the event to the current TableCellEditor.

Constructor Summary
BasicTableUI.KeyHandler()
Method Summary
void | keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | keyReleased(KeyEvent e) Invoked when a key has been released.
void | keyTyped(KeyEvent e) Invoked when a key has been typed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTableUI.KeyHandler

public BasicTableUI.KeyHandler()
Method Detail

keyPressed

public void keyPressed(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a key has been pressed.
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a key has been released.
Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.
Specified by:
keyTyped in interface KeyListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.KeyHandler

java.lang.Object
  |
  +--java.awt.event.KeyAdapter
        |
        +--javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
All Implemented Interfaces:
EventListener, KeyListener
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.KeyHandler
extends KeyAdapter

This listener checks to see if the key event isn't a navigation key. If it finds a key event that wasn't a navigation key it dispatches it to JComboBox.selectWithKeyChar() so that it can do type-ahead. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.KeyHandler()
Method Summary
 void keyPressed(KeyEvent e)
Invoked when a key has been pressed.
Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.KeyHandler

public BasicComboBoxUI.KeyHandler()
Method Detail

keyPressed

public void keyPressed(KeyEvent e)
Description copied from class: KeyAdapter
Invoked when a key has been pressed.
Overrides:
keyPressed in class KeyAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.KeyHandler

java.lang.Object
  |
  +--java.awt.event.KeyAdapter
        |
        +--javax.swing.plaf.basic.BasicTreeUI.KeyHandler
All Implemented Interfaces:
EventListener, KeyListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.KeyHandler
extends KeyAdapter

This is used to get mutliple key down events to appropriately generate events.

Field Summary
protected boolean | isKeyDown Set to true while keyPressed is active.
protected Action | repeatKeyAction Key code that is being generated for.
Constructor Summary
BasicTreeUI.KeyHandler()
Method Summary
void | keyPressed(KeyEvent e) Invoked when a key has been pressed.
void | keyReleased(KeyEvent e) Invoked when a key has been released.
Methods inherited from class java.awt.event.KeyAdapter
keyTyped
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

repeatKeyAction

protected Action repeatKeyAction
Key code that is being generated for.

isKeyDown

protected boolean isKeyDown
Set to true while keyPressed is active.
Constructor Detail

BasicTreeUI.KeyHandler

public BasicTreeUI.KeyHandler()
Method Detail

keyPressed

public void keyPressed(KeyEvent e)
Description copied from class: KeyAdapter
Invoked when a key has been pressed.
Overrides:
keyPressed in class KeyAdapter

keyReleased

public void keyReleased(KeyEvent e)
Description copied from class: KeyAdapter
Invoked when a key has been released.
Overrides:
keyReleased in class KeyAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListDataHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI.ListDataHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicListUI.ListDataHandler
All Implemented Interfaces:
EventListener, ListDataListener
Enclosing class:
BasicListUI
public class BasicListUI.ListDataHandler
extends Object
implements ListDataListener

The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JList.getModel(),
BasicListUI.maybeUpdateLayoutState(),
BasicListUI.createListDataListener(),
BasicListUI.installUI(javax.swing.JComponent)

Constructor Summary
BasicListUI.ListDataHandler()
Method Summary
void | contentsChanged(ListDataEvent e) Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
void | intervalAdded(ListDataEvent e) Sent after the indices in the index0,index1 interval have been inserted in the data model.
void | intervalRemoved(ListDataEvent e) Sent after the indices in the index0,index1 interval have been removed from the data model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicListUI.ListDataHandler

public BasicListUI.ListDataHandler()
Method Detail

intervalAdded

public void intervalAdded(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.
Specified by:
intervalAdded in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.
Specified by:
intervalRemoved in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

contentsChanged

public void contentsChanged(ListDataEvent e)
Description copied from interface: ListDataListener
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. Index0 and index1 bracket the change.
Specified by:
contentsChanged in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListDataHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.ListDataHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
All Implemented Interfaces:
EventListener, ListDataListener
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.ListDataHandler
extends Object
implements ListDataListener

This listener watches for changes in the data and revalidates. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.ListDataHandler()
Method Summary
void | contentsChanged(ListDataEvent e) Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
void | intervalAdded(ListDataEvent e) Sent after the indices in the index0,index1 interval have been inserted in the data model.
void | intervalRemoved(ListDataEvent e) Sent after the indices in the index0,index1 interval have been removed from the data model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.ListDataHandler

public BasicComboBoxUI.ListDataHandler()
Method Detail

contentsChanged

public void contentsChanged(ListDataEvent e)
Description copied from interface: ListDataListener
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. Index0 and index1 bracket the change.
Specified by:
contentsChanged in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

intervalAdded

public void intervalAdded(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.
Specified by:
intervalAdded in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.
Specified by:
intervalRemoved in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListDataHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.ListDataHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboPopup.ListDataHandler
All Implemented Interfaces:
EventListener, ListDataListener
Enclosing class:
BasicComboPopup
public class BasicComboPopup.ListDataHandler
extends Object
implements ListDataListener

Keeps the selected index in the list in-sync with the combo box's selection.

Constructor Summary
BasicComboPopup.ListDataHandler()
Method Summary
void | contentsChanged(ListDataEvent e) Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
void | intervalAdded(ListDataEvent e) Sent after the indices in the index0,index1 interval have been inserted in the data model.
void | intervalRemoved(ListDataEvent e) Sent after the indices in the index0,index1 interval have been removed from the data model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.ListDataHandler

public BasicComboPopup.ListDataHandler()
Method Detail

contentsChanged

public void contentsChanged(ListDataEvent e)
Description copied from interface: ListDataListener
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. Index0 and index1 bracket the change.
Specified by:
contentsChanged in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

intervalAdded

public void intervalAdded(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.
Specified by:
intervalAdded in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.
Specified by:
intervalRemoved in interface ListDataListener
Following copied from interface: javax.swing.event.ListDataListener
Parameters:
e - a ListDataEvent encapuslating the event information
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListMouseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.ListMouseHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicComboPopup.ListMouseHandler
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.ListMouseHandler
extends MouseAdapter

This listener hides the popup when the mouse is released in the list.

Constructor Summary
protected BasicComboPopup.ListMouseHandler()
Method Summary
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent anEvent) Invoked when a mouse button has been released on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.ListMouseHandler

protected BasicComboPopup.ListMouseHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent anEvent)
Description copied from class: MouseAdapter
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListMouseMotionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.ListMouseMotionHandler

java.lang.Object
  |
  +--java.awt.event.MouseMotionAdapter
        |
        +--javax.swing.plaf.basic.BasicComboPopup.ListMouseMotionHandler
All Implemented Interfaces:
EventListener, MouseMotionListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.ListMouseMotionHandler
extends MouseMotionAdapter

This listener changes the selected item as you move the mouse over the list. The selection change is not committed to the model, this is for user feedback only.

Constructor Summary
protected BasicComboPopup.ListMouseMotionHandler()
Method Summary
 void mouseMoved(MouseEvent anEvent)
Invoked when the mouse button has been moved on a component (with no buttons no down).
Methods inherited from class java.awt.event.MouseMotionAdapter
mouseDragged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.ListMouseMotionHandler

protected BasicComboPopup.ListMouseMotionHandler()
Method Detail

mouseMoved

public void mouseMoved(MouseEvent anEvent)
Description copied from class: MouseMotionAdapter
Invoked when the mouse button has been moved on a component (with no buttons no down).
Overrides:
mouseMoved in class MouseMotionAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListSelectionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.ListSelectionHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboPopup.ListSelectionHandler
All Implemented Interfaces:
EventListener, ListSelectionListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.ListSelectionHandler
extends Object
implements ListSelectionListener

This listener watches for changes in the list's selection and reports them to the combo box.

Constructor Summary
protected BasicComboPopup.ListSelectionHandler()
Method Summary
 void valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.ListSelectionHandler

protected BasicComboPopup.ListSelectionHandler()
Method Detail

valueChanged

public void valueChanged(ListSelectionEvent e)
Description copied from interface: ListSelectionListener
Called whenever the value of the selection changes.
Specified by:
valueChanged in interface ListSelectionListener
Following copied from interface: javax.swing.event.ListSelectionListener
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListSelectionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI.ListSelectionHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicListUI.ListSelectionHandler
All Implemented Interfaces:
EventListener, ListSelectionListener
Enclosing class:
BasicListUI
public class BasicListUI.ListSelectionHandler
extends Object
implements ListSelectionListener

The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes. When the selection changes we repaint the affected rows.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
BasicListUI.createListSelectionListener(),
BasicListUI.getCellBounds(javax.swing.JList, int, int),
BasicListUI.installUI(javax.swing.JComponent)

Constructor Summary
BasicListUI.ListSelectionHandler()
Method Summary
 void valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicListUI.ListSelectionHandler

public BasicListUI.ListSelectionHandler()
Method Detail

valueChanged

public void valueChanged(ListSelectionEvent e)
Description copied from interface: ListSelectionListener
Called whenever the value of the selection changes.
Specified by:
valueChanged in interface ListSelectionListener
Following copied from interface: javax.swing.event.ListSelectionListener
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MarginBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.MarginBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.MarginBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.MarginBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
BasicBorders.MarginBorder()
Method Summary
 Insets getBorderInsets(Component c)
This default implementation returns the value of getBorderMargins.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque, paintBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicBorders.MarginBorder

public BasicBorders.MarginBorder()
Method Detail

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MaximizeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI.MaximizeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicDesktopPaneUI
protected class BasicDesktopPaneUI.MaximizeAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicDesktopPaneUI.MaximizeAction()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopPaneUI.MaximizeAction

protected BasicDesktopPaneUI.MaximizeAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MaximizeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.MaximizeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.MaximizeAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.MaximizeAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.MaximizeAction

public BasicInternalFrameTitlePane.MaximizeAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuBarBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.MenuBarBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.MenuBarBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.MenuBarBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
BasicBorders.MenuBarBorder(Color shadow, Color highlight)
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicBorders.MenuBarBorder

public BasicBorders.MenuBarBorder(Color shadow,
                                  Color highlight)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MinimizeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI.MinimizeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicDesktopPaneUI
protected class BasicDesktopPaneUI.MinimizeAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicDesktopPaneUI.MinimizeAction()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopPaneUI.MinimizeAction

protected BasicDesktopPaneUI.MinimizeAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModelListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI.ModelListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollBarUI.ModelListener
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicScrollBarUI
protected class BasicScrollBarUI.ModelListener
extends Object
implements ChangeListener

A listener to listen for model changes.

Constructor Summary
protected BasicScrollBarUI.ModelListener()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollBarUI.ModelListener

protected BasicScrollBarUI.ModelListener()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneDivider.MouseHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicSplitPaneDivider.MouseHandler
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
Enclosing class:
BasicSplitPaneDivider
protected class BasicSplitPaneDivider.MouseHandler
extends MouseAdapter
implements MouseMotionListener

MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.

Constructor Summary
protected BasicSplitPaneDivider.MouseHandler()
Method Summary
void | mouseDragged(MouseEvent e) If dragger is not null it is messaged with continueDrag.
void | mouseMoved(MouseEvent e) Resets the cursor based on the orientation.
void | mousePressed(MouseEvent e) Starts the dragging session by creating the appropriate instance of DragController.
void | mouseReleased(MouseEvent e) If dragger is not null it is messaged with completeDrag.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneDivider.MouseHandler

protected BasicSplitPaneDivider.MouseHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Starts the dragging session by creating the appropriate instance of DragController.
Overrides:
mousePressed in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent e)
If dragger is not null it is messaged with completeDrag.
Overrides:
mouseReleased in class MouseAdapter

mouseDragged

public void mouseDragged(MouseEvent e)
If dragger is not null it is messaged with continueDrag.
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Resets the cursor based on the orientation.
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI.MouseHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicTabbedPaneUI
public class BasicTabbedPaneUI.MouseHandler
extends MouseAdapter

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI.

Constructor Summary
BasicTabbedPaneUI.MouseHandler()
Method Summary
 void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTabbedPaneUI.MouseHandler

public BasicTabbedPaneUI.MouseHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.MouseHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicTreeUI.MouseHandler
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.MouseHandler
extends MouseAdapter

TreeMouseListener is responsible for updating the selection based on mouse events.

Constructor Summary
BasicTreeUI.MouseHandler()
Method Summary
 void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.MouseHandler

public BasicTreeUI.MouseHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableHeaderUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicTableHeaderUI
public class BasicTableHeaderUI.MouseInputHandler
extends Object
implements MouseInputListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTableUI.

Constructor Summary
BasicTableHeaderUI.MouseInputHandler()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTableHeaderUI.MouseInputHandler

public BasicTableHeaderUI.MouseInputHandler()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicListUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicListUI
public class BasicListUI.MouseInputHandler
extends Object
implements MouseInputListener

Mouse input, and focus handling for JList. An instance of this class is added to the appropriate java.awt.Component lists at installUI() time. Note keyboard input is handled with JComponent KeyboardActions, see installKeyboardActions().

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
BasicListUI.createMouseInputListener(),
BasicListUI.installKeyboardActions(),
BasicListUI.installUI(javax.swing.JComponent)

Constructor Summary
BasicListUI.MouseInputHandler()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicListUI.MouseInputHandler

public BasicListUI.MouseInputHandler()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.MouseInputHandler
extends Object
implements MouseInputListener

MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with. It is assumed all the events are currently target at source.

Field Summary
protected Component | destination Destination that recieves all events.
protected Component | source Source that events are coming from.
Constructor Summary
BasicTreeUI.MouseInputHandler(Component source, Component destination, MouseEvent event)
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
protected void | removeFromSource()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

source

protected Component source
Source that events are coming from.

destination

protected Component destination
Destination that recieves all events.
Constructor Detail

BasicTreeUI.MouseInputHandler

public BasicTreeUI.MouseInputHandler(Component source,
                                     Component destination,
                                     MouseEvent event)
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

removeFromSource

protected void removeFromSource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicMenuItemUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicMenuItemUI
protected class BasicMenuItemUI.MouseInputHandler
extends Object
implements MouseInputListener

Constructor Summary
protected BasicMenuItemUI.MouseInputHandler()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicMenuItemUI.MouseInputHandler

protected BasicMenuItemUI.MouseInputHandler()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTableUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicTableUI
public class BasicTableUI.MouseInputHandler
extends Object
implements MouseInputListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTableUI.

Constructor Summary
BasicTableUI.MouseInputHandler()
Method Summary
void | mouseClicked(MouseEvent e) Invoked when the mouse has been clicked on a component.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent e) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent e) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTableUI.MouseInputHandler

public BasicTableUI.MouseInputHandler()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse has been clicked on a component.
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Description copied from interface: MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseInputHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopIconUI.MouseInputHandler

java.lang.Object
  |
  +--javax.swing.event.MouseInputAdapter
        |
        +--javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicDesktopIconUI
public class BasicDesktopIconUI.MouseInputHandler
extends MouseInputAdapter

Listens for mouse movements and acts on them. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicDesktopIconUI.MouseInputHandler()
Method Summary
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void | moveAndRepaint(JComponent f, int newX, int newY, int newWidth, int newHeight)
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopIconUI.MouseInputHandler

public BasicDesktopIconUI.MouseInputHandler()
Method Detail

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseInputAdapter

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseInputAdapter

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Overrides:
mouseMoved in class MouseInputAdapter

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Overrides:
mouseDragged in class MouseInputAdapter

moveAndRepaint

public void moveAndRepaint(JComponent f,
                           int newX,
                           int newY,
                           int newWidth,
                           int newHeight)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MoveAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.MoveAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.MoveAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.MoveAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.MoveAction

public BasicInternalFrameTitlePane.MoveAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NavigateAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI.NavigateAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicDesktopPaneUI
protected class BasicDesktopPaneUI.NavigateAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicDesktopPaneUI.NavigateAction()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopPaneUI.NavigateAction

protected BasicDesktopPaneUI.NavigateAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewFolderAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.NewFolderAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.NewFolderAction
extends AbstractAction

Creates a new folder.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.NewFolderAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.NewFolderAction

protected BasicFileChooserUI.NewFolderAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NodeDimensionsHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.NodeDimensionsHandler

java.lang.Object
  |
  +--javax.swing.tree.AbstractLayoutCache.NodeDimensions
        |
        +--javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
Enclosing class:
BasicTreeUI
public class BasicTreeUI.NodeDimensionsHandler
extends AbstractLayoutCache.NodeDimensions

Class responsible for getting size of node, method is forwarded to BasicTreeUI method. X location does not include insets, that is handled in getPathBounds.

Constructor Summary
BasicTreeUI.NodeDimensionsHandler()
Method Summary
Rectangle | getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) Responsible for getting the size of a particular node.
protected int | getRowX(int row, int depth)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.NodeDimensionsHandler

public BasicTreeUI.NodeDimensionsHandler()
Method Detail

getNodeDimensions

public Rectangle getNodeDimensions(Object value,
                                   int row,
                                   int depth,
                                   boolean expanded,
                                   Rectangle size)
Responsible for getting the size of a particular node.
Overrides:
getNodeDimensions in class AbstractLayoutCache.NodeDimensions

getRowX

protected int getRowX(int row,
                      int depth)
Returns:
amount to indent the given row.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicDesktopPaneUI.OpenAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicDesktopPaneUI
protected class BasicDesktopPaneUI.OpenAction
extends AbstractAction

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicDesktopPaneUI.OpenAction()
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicDesktopPaneUI.OpenAction

protected BasicDesktopPaneUI.OpenAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicScrollBarUI
public class BasicScrollBarUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

Constructor Summary
BasicScrollBarUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollBarUI.PropertyChangeHandler

public BasicScrollBarUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.PropertyChangeHandler
extends Object
implements PropertyChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicInternalFrameTitlePane.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.PropertyChangeHandler

public BasicInternalFrameTitlePane.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicTabbedPaneUI
public class BasicTabbedPaneUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI.

Constructor Summary
BasicTabbedPaneUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTabbedPaneUI.PropertyChangeHandler

public BasicTabbedPaneUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboPopup.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboPopup.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicComboPopup
protected class BasicComboPopup.PropertyChangeHandler
extends Object
implements PropertyChangeListener

This listener watches for bound property changes in JComboBox. If the model or the renderer changes, the popup hides itself.

Constructor Summary
protected BasicComboPopup.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboPopup.PropertyChangeHandler

protected BasicComboPopup.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

PropertyChangeListener for the tree. Updates the appropriate varaible, or TreeState, based on what changes.

Constructor Summary
BasicTreeUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent event)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.PropertyChangeHandler

public BasicTreeUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Direct Known Subclasses:
MetalComboBoxUI.MetalPropertyChangeListener
Enclosing class:
BasicComboBoxUI
public class BasicComboBoxUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

This listener watches for bound properties that have changed in the JComboBox. It looks for the model and editor being swapped-out and updates appropriately. It also looks for changes in the editable, enabled, and maximumRowCount properties. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicComboBoxUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxUI.PropertyChangeHandler

public BasicComboBoxUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Direct Known Subclasses:
MetalSliderUI.MetalPropertyListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

Constructor Summary
BasicSliderUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.PropertyChangeHandler

public BasicSliderUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicOptionPaneUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicOptionPaneUI
public class BasicOptionPaneUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicOptionPaneUI.

Constructor Summary
BasicOptionPaneUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
If the source of the PropertyChangeEvent e equals the optionPane and is one of the ICON_PROPERTY, MESSAGE_PROPERTY, OPTIONS_PROPERTY or INITIAL_VALUE_PROPERTY, validateComponent is invoked.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicOptionPaneUI.PropertyChangeHandler

public BasicOptionPaneUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
If the source of the PropertyChangeEvent e equals the optionPane and is one of the ICON_PROPERTY, MESSAGE_PROPERTY, OPTIONS_PROPERTY or INITIAL_VALUE_PROPERTY, validateComponent is invoked.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollPaneUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicScrollPaneUI
public class BasicScrollPaneUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

Constructor Summary
BasicScrollPaneUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollPaneUI.PropertyChangeHandler

public BasicScrollPaneUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicListUI.PropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicListUI
public class BasicListUI.PropertyChangeHandler
extends Object
implements PropertyChangeListener

The PropertyChangeListener that's added to the JList at installUI time. When the value of a JList property that affects layout changes, we set a bit in updateLayoutStateNeeded. If the JLists model changes we additionally remove our listeners from the old model. Likewise for the JList selectionModel.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
BasicListUI.maybeUpdateLayoutState(),
BasicListUI.createPropertyChangeListener(),
BasicListUI.installUI(javax.swing.JComponent)

Constructor Summary
BasicListUI.PropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicListUI.PropertyChangeHandler

public BasicListUI.PropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneUI.PropertyHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.PropertyHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicSplitPaneUI
public class BasicSplitPaneUI.PropertyHandler
extends Object
implements PropertyChangeListener

Implementation of the PropertyChangeListener that the JSplitPane UI uses.

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicSplitPaneUI.

Constructor Summary
BasicSplitPaneUI.PropertyHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
Messaged from the JSplitPane the reciever is contained in.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneUI.PropertyHandler

public BasicSplitPaneUI.PropertyHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Messaged from the JSplitPane the reciever is contained in. May potentially reset the layout manager and cause a validate() to be sent.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicColorChooserUI.PropertyHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicColorChooserUI.PropertyHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicColorChooserUI
public class BasicColorChooserUI.PropertyHandler
extends Object
implements PropertyChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicColorChooserUI.PropertyHandler()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicColorChooserUI.PropertyHandler

public BasicColorChooserUI.PropertyHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PropertyListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.PropertyListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicToolBarUI.PropertyListener
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicToolBarUI
protected class BasicToolBarUI.PropertyListener
extends Object
implements PropertyChangeListener

Constructor Summary
protected BasicToolBarUI.PropertyListener()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolBarUI.PropertyListener

protected BasicToolBarUI.PropertyListener()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RadioButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.RadioButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.ButtonBorder
              |
              +--javax.swing.plaf.basic.BasicBorders.RadioButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.RadioButtonBorder
extends BasicBorders.ButtonBorder

See Also:
Serialized Form

Fields inherited from class javax.swing.plaf.basic.BasicBorders.ButtonBorder
darkShadow, highlight, lightHighlight, shadow
Constructor Summary
BasicBorders.RadioButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicBorders.RadioButtonBorder

public BasicBorders.RadioButtonBorder(Color shadow,
                                      Color darkShadow,
                                      Color highlight,
                                      Color lightHighlight)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class BasicBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class BasicBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RestoreAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.RestoreAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.RestoreAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.RestoreAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.RestoreAction

public BasicInternalFrameTitlePane.RestoreAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI.ScrollListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicScrollBarUI
protected class BasicScrollBarUI.ScrollListener
extends Object
implements ActionListener

Listener for scrolling events intiated in the ScrollPane.

Constructor Summary
BasicScrollBarUI.ScrollListener()
BasicScrollBarUI.ScrollListener(int dir, boolean block)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
void | setDirection(int direction)
void | setScrollByBlock(boolean block)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollBarUI.ScrollListener

public BasicScrollBarUI.ScrollListener()

BasicScrollBarUI.ScrollListener

public BasicScrollBarUI.ScrollListener(int dir,
                                       boolean block)
Method Detail

setDirection

public void setDirection(int direction)

setScrollByBlock

public void setScrollByBlock(boolean block)

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.ScrollListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSliderUI.ScrollListener
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.ScrollListener
extends Object
implements ActionListener

Scroll-event listener. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicSliderUI.ScrollListener()
BasicSliderUI.ScrollListener(int dir, boolean block)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
void | setDirection(int direction)
void | setScrollByBlock(boolean block)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSliderUI.ScrollListener

public BasicSliderUI.ScrollListener()

BasicSliderUI.ScrollListener

public BasicSliderUI.ScrollListener(int dir,
                                    boolean block)
Method Detail

setDirection

public void setDirection(int direction)

setScrollByBlock

public void setScrollByBlock(boolean block)

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SelectionListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.SelectionListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicFileChooserUI.SelectionListener
All Implemented Interfaces:
EventListener, ListSelectionListener
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.SelectionListener
extends Object
implements ListSelectionListener

Constructor Summary
protected BasicFileChooserUI.SelectionListener()
Method Summary
 void valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.SelectionListener

protected BasicFileChooserUI.SelectionListener()
Method Detail

valueChanged

public void valueChanged(ListSelectionEvent e)
Description copied from interface: ListSelectionListener
Called whenever the value of the selection changes.
Specified by:
valueChanged in interface ListSelectionListener
Following copied from interface: javax.swing.event.ListSelectionListener
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SelectionModelPropertyChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.SelectionModelPropertyChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.SelectionModelPropertyChangeHandler
extends Object
implements PropertyChangeListener

Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change.

Constructor Summary
BasicTreeUI.SelectionModelPropertyChangeHandler()
Method Summary
 void propertyChange(PropertyChangeEvent event)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.SelectionModelPropertyChangeHandler

public BasicTreeUI.SelectionModelPropertyChangeHandler()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SizeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.SizeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.SizeAction
extends AbstractAction

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicInternalFrameTitlePane.SizeAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.SizeAction

public BasicInternalFrameTitlePane.SizeAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SplitPaneBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.SplitPaneBorder

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicBorders.SplitPaneBorder
All Implemented Interfaces:
Border, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.SplitPaneBorder
extends Object
implements Border, UIResource

Draws the border around the splitpane. To work correctly you shoudl also install a border on the divider (property SplitPaneDivider.border).

Field Summary
protected Color | highlight
protected Color | shadow
Constructor Summary
BasicBorders.SplitPaneBorder(Color highlight, Color shadow)
Method Summary
Insets | getBorderInsets(Component c) Returns the insets of the border.
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

highlight

protected Color highlight

shadow

protected Color shadow
Constructor Detail

BasicBorders.SplitPaneBorder

public BasicBorders.SplitPaneBorder(Color highlight,
                                    Color shadow)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from interface: Border
Paints the border for the specified component with the specified position and size.
Specified by:
paintBorder in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from interface: Border
Returns the insets of the border.
Specified by:
getBorderInsets in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies

isBorderOpaque

public boolean isBorderOpaque()
Description copied from interface: Border
Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.
Specified by:
isBorderOpaque in interface Border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemMenuBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.SystemMenuBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JMenuBar
                          |
                          +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, MenuElement, Serializable
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.SystemMenuBar
extends JMenuBar

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JMenuBar
JMenuBar.AccessibleJMenuBar
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicInternalFrameTitlePane.SystemMenuBar()
Method Summary
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
boolean | isOpaque() Returns true if this component is completely opaque.
void | paint(Graphics g) This method is invoked by Swing to draw components.
void | requestFocus() Sets focus on the receiving component if isRequestFocusEnabled returns true and the component doesn't already have focus.
Methods inherited from class javax.swing.JMenuBar
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isManagingFocus, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.SystemMenuBar

public BasicInternalFrameTitlePane.SystemMenuBar()
Method Detail

isFocusTraversable

public boolean isFocusTraversable()
Description copied from class: JComponent
Identifies whether or not this component can receive the focus. A disabled button, for example, would return false.
Overrides:
isFocusTraversable in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
true if this component can receive the focus

requestFocus

public void requestFocus()
Description copied from class: JComponent
Sets focus on the receiving component if isRequestFocusEnabled returns true and the component doesn't already have focus.
Overrides:
requestFocus in class JComponent
Following copied from class: java.awt.Component
See Also:
FocusEvent,
Component.addFocusListener(java.awt.event.FocusListener),
Component.processFocusEvent(java.awt.event.FocusEvent),
Component.isFocusTraversable()

paint

public void paint(Graphics g)
Description copied from class: JComponent
This method is invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

Overrides:
paint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics),
JComponent.paintBorder(java.awt.Graphics),
JComponent.paintChildren(java.awt.Graphics),
JComponent.getComponentGraphics(java.awt.Graphics),
JComponent.repaint(long, int, int, int, int)

isOpaque

public boolean isOpaque()
Description copied from class: JComponent
Returns true if this component is completely opaque.

An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency.

Subclasses that guarantee to always completely paint their contents should override this method and return true.

Overrides:
isOpaque in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
true if this component is completely opaque
See Also:
JComponent.setOpaque(boolean)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabbedPaneLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI.TabbedPaneLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
All Implemented Interfaces:
LayoutManager
Direct Known Subclasses:
MetalTabbedPaneUI.TabbedPaneLayout
Enclosing class:
BasicTabbedPaneUI
public class BasicTabbedPaneUI.TabbedPaneLayout
extends Object
implements LayoutManager

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI.

Constructor Summary
BasicTabbedPaneUI.TabbedPaneLayout()
Method Summary
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
void | calculateLayoutInfo()
protected Dimension | calculateSize(boolean minimum)
protected void | calculateTabRects(int tabPlacement, int tabCount)
void | layoutContainer(Container parent) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
protected void | normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
protected void | padSelectedTab(int tabPlacement, int selectedIndex)
protected void | padTabRun(int tabPlacement, int start, int end, int max)
Dimension | preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
protected int | preferredTabAreaHeight(int tabPlacement, int width)
protected int | preferredTabAreaWidth(int tabPlacement, int height)
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
protected void | rotateTabRuns(int tabPlacement, int selectedRun)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTabbedPaneUI.TabbedPaneLayout

public BasicTabbedPaneUI.TabbedPaneLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

calculateSize

protected Dimension calculateSize(boolean minimum)

preferredTabAreaHeight

protected int preferredTabAreaHeight(int tabPlacement,
                                     int width)

preferredTabAreaWidth

protected int preferredTabAreaWidth(int tabPlacement,
                                    int height)

layoutContainer

public void layoutContainer(Container parent)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

calculateLayoutInfo

public void calculateLayoutInfo()

calculateTabRects

protected void calculateTabRects(int tabPlacement,
                                 int tabCount)

rotateTabRuns

protected void rotateTabRuns(int tabPlacement,
                             int selectedRun)

normalizeTabRuns

protected void normalizeTabRuns(int tabPlacement,
                                int tabCount,
                                int start,
                                int max)

padTabRun

protected void padTabRun(int tabPlacement,
                         int start,
                         int end,
                         int max)

padSelectedTab

protected void padSelectedTab(int tabPlacement,
                              int selectedIndex)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabSelectionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTabbedPaneUI.TabSelectionHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicTabbedPaneUI
public class BasicTabbedPaneUI.TabSelectionHandler
extends Object
implements ChangeListener

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI.

Constructor Summary
BasicTabbedPaneUI.TabSelectionHandler()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTabbedPaneUI.TabSelectionHandler

public BasicTabbedPaneUI.TabSelectionHandler()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TitlePaneLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicInternalFrameTitlePane.TitlePaneLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane.TitlePaneLayout
extends Object
implements LayoutManager

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
BasicInternalFrameTitlePane.TitlePaneLayout()
Method Summary
void | addLayoutComponent(String name, Component c) Adds the specified component with the specified name to the layout.
void | layoutContainer(Container c) Lays out the container in the specified panel.
Dimension | minimumLayoutSize(Container c) Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Dimension | preferredLayoutSize(Container c) Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicInternalFrameTitlePane.TitlePaneLayout

public BasicInternalFrameTitlePane.TitlePaneLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component c)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component c)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container c)
Description copied from interface: LayoutManager
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(Container c)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Specified by:
layoutContainer in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToggleButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicBorders.ToggleButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.basic.BasicBorders.ButtonBorder
              |
              +--javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BasicBorders
public static class BasicBorders.ToggleButtonBorder
extends BasicBorders.ButtonBorder

See Also:
Serialized Form

Fields inherited from class javax.swing.plaf.basic.BasicBorders.ButtonBorder
darkShadow, highlight, lightHighlight, shadow
Constructor Summary
BasicBorders.ToggleButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicBorders.ToggleButtonBorder

public BasicBorders.ToggleButtonBorder(Color shadow,
                                       Color darkShadow,
                                       Color highlight,
                                       Color lightHighlight)
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class BasicBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class BasicBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolBarContListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.ToolBarContListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicToolBarUI.ToolBarContListener
All Implemented Interfaces:
ContainerListener, EventListener
Enclosing class:
BasicToolBarUI
protected class BasicToolBarUI.ToolBarContListener
extends Object
implements ContainerListener

Constructor Summary
protected BasicToolBarUI.ToolBarContListener()
Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolBarUI.ToolBarContListener

protected BasicToolBarUI.ToolBarContListener()
Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface ContainerListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolBarFocusListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicToolBarUI.ToolBarFocusListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicToolBarUI.ToolBarFocusListener
All Implemented Interfaces:
EventListener, FocusListener
Enclosing class:
BasicToolBarUI
protected class BasicToolBarUI.ToolBarFocusListener
extends Object
implements FocusListener

Constructor Summary
protected BasicToolBarUI.ToolBarFocusListener()
Method Summary
void | focusGained(FocusEvent e) Invoked when a component gains the keyboard focus.
void | focusLost(FocusEvent e) Invoked when a component loses the keyboard focus.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicToolBarUI.ToolBarFocusListener

protected BasicToolBarUI.ToolBarFocusListener()
Method Detail

focusGained

public void focusGained(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component gains the keyboard focus.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Description copied from interface: FocusListener
Invoked when a component loses the keyboard focus.
Specified by:
focusLost in interface FocusListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrackListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollBarUI.TrackListener

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
Enclosing class:
BasicScrollBarUI
protected class BasicScrollBarUI.TrackListener
extends MouseAdapter
implements MouseMotionListener

Track mouse drags.

Field Summary
protected int | currentMouseX
protected int | currentMouseY
protected int | offset
Constructor Summary
protected BasicScrollBarUI.TrackListener()
Method Summary
void | mouseDragged(MouseEvent e) Set the models value to the position of the top/left of the thumb relative to the origin of the track.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

offset

protected transient int offset

currentMouseX

protected transient int currentMouseX

currentMouseY

protected transient int currentMouseY
Constructor Detail

BasicScrollBarUI.TrackListener

protected BasicScrollBarUI.TrackListener()
Method Detail

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseAdapter

mousePressed

public void mousePressed(MouseEvent e)
If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page. If there is no thumb then page up if the mouse is in the upper half of the track.
Overrides:
mousePressed in class MouseAdapter

mouseDragged

public void mouseDragged(MouseEvent e)
Set the models value to the position of the top/left of the thumb relative to the origin of the track.
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrackListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSliderUI.TrackListener

java.lang.Object
  |
  +--javax.swing.event.MouseInputAdapter
        |
        +--javax.swing.plaf.basic.BasicSliderUI.TrackListener
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
BasicSliderUI
public class BasicSliderUI.TrackListener
extends MouseInputAdapter

Track mouse movements. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Field Summary
protected int | currentMouseX
protected int | currentMouseY
protected int | offset
Constructor Summary
BasicSliderUI.TrackListener()
Method Summary
void | mouseDragged(MouseEvent e) Set the models value to the position of the top/left of the thumb relative to the origin of the track.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent e) If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page.
void | mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
boolean | shouldScroll(int direction)
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseEntered, mouseExited
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

offset

protected transient int offset

currentMouseX

protected transient int currentMouseX

currentMouseY

protected transient int currentMouseY
Constructor Detail

BasicSliderUI.TrackListener

public BasicSliderUI.TrackListener()
Method Detail

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseInputAdapter

mousePressed

public void mousePressed(MouseEvent e)
If the mouse is pressed above the "thumb" component then reduce the scrollbars value by one page ("page up"), otherwise increase it by one page. If there is no thumb then page up if the mouse is in the upper half of the track.
Overrides:
mousePressed in class MouseInputAdapter

shouldScroll

public boolean shouldScroll(int direction)

mouseDragged

public void mouseDragged(MouseEvent e)
Set the models value to the position of the top/left of the thumb relative to the origin of the track.
Overrides:
mouseDragged in class MouseInputAdapter

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Overrides:
mouseMoved in class MouseInputAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeCancelEditingAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeCancelEditingAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeCancelEditingAction
extends AbstractAction

ActionListener that invokes cancelEditing when action performed.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreeCancelEditingAction(String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.TreeCancelEditingAction

public BasicTreeUI.TreeCancelEditingAction(String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeExpansionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeExpansionHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler
All Implemented Interfaces:
EventListener, TreeExpansionListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeExpansionHandler
extends Object
implements TreeExpansionListener

Updates the TreeState in response to nodes expanding/collapsing.

Constructor Summary
BasicTreeUI.TreeExpansionHandler()
Method Summary
void | treeCollapsed(TreeExpansionEvent event) Called whenever an item in the tree has been collapsed.
void | treeExpanded(TreeExpansionEvent event) Called whenever an item in the tree has been expanded.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.TreeExpansionHandler

public BasicTreeUI.TreeExpansionHandler()
Method Detail

treeExpanded

public void treeExpanded(TreeExpansionEvent event)
Called whenever an item in the tree has been expanded.
Specified by:
treeExpanded in interface TreeExpansionListener

treeCollapsed

public void treeCollapsed(TreeExpansionEvent event)
Called whenever an item in the tree has been collapsed.
Specified by:
treeCollapsed in interface TreeExpansionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeHomeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeHomeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeHomeAction
extends AbstractAction

TreeHomeAction is used to handle end/home actions. Scrolls either the first or last cell to be visible based on direction.

See Also:
Serialized Form

Field Summary
protected  int direction
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreeHomeAction(int direction, String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

direction

protected int direction
Constructor Detail

BasicTreeUI.TreeHomeAction

public BasicTreeUI.TreeHomeAction(int direction,
                                  String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeIncrementAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeIncrementAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeIncrementAction
extends AbstractAction

TreeIncrementAction is used to handle up/down actions. Selection is moved up or down based on direction.

See Also:
Serialized Form

Field Summary
protected  int direction
Specifies the direction to adjust the selection by.
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreeIncrementAction(int direction, String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

direction

protected int direction
Specifies the direction to adjust the selection by.
Constructor Detail

BasicTreeUI.TreeIncrementAction

public BasicTreeUI.TreeIncrementAction(int direction,
                                       String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeModelHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeModelHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler
All Implemented Interfaces:
EventListener, TreeModelListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeModelHandler
extends Object
implements TreeModelListener

Forwards all TreeModel events to the TreeState.

Constructor Summary
BasicTreeUI.TreeModelHandler()
Method Summary
void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.TreeModelHandler

public BasicTreeUI.TreeModelHandler()
Method Detail

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

To indicate the root has changed, childIndices and children will be null.

Use e.getPath() to get the parent of the changed node(s). e.getChildIndices() returns the index(es) of the changed node(s).

Specified by:
treeNodesChanged in interface TreeModelListener

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after nodes have been inserted into the tree.

Use e.getPath() to get the parent of the new node(s). e.getChildIndices() returns the index(es) of the new node(s) in ascending order.

Specified by:
treeNodesInserted in interface TreeModelListener

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

Use e.getPath() to get the former parent of the deleted node(s). e.getChildIndices() returns, in ascending order, the index(es) the node(s) had before being deleted.

Specified by:
treeNodesRemoved in interface TreeModelListener

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

Use e.getPath() to get the path to the node. e.getChildIndices() returns null.

Specified by:
treeStructureChanged in interface TreeModelListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreePageAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreePageAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreePageAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreePageAction
extends AbstractAction

TreePageAction handles page up and page down events.

See Also:
Serialized Form

Field Summary
protected  int direction
Specifies the direction to adjust the selection by.
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreePageAction(int direction, String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

direction

protected int direction
Specifies the direction to adjust the selection by.
Constructor Detail

BasicTreeUI.TreePageAction

public BasicTreeUI.TreePageAction(int direction,
                                  String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSelectionHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeSelectionHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler
All Implemented Interfaces:
EventListener, TreeSelectionListener
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeSelectionHandler
extends Object
implements TreeSelectionListener

Listens for changes in the selection model and updates the display accordingly.

Constructor Summary
BasicTreeUI.TreeSelectionHandler()
Method Summary
 void valueChanged(TreeSelectionEvent event)
Messaged when the selection changes in the tree we're displaying for.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.TreeSelectionHandler

public BasicTreeUI.TreeSelectionHandler()
Method Detail

valueChanged

public void valueChanged(TreeSelectionEvent event)
Messaged when the selection changes in the tree we're displaying for. Stops editing, messages super and displays the changed paths.
Specified by:
valueChanged in interface TreeSelectionListener
Following copied from interface: javax.swing.event.TreeSelectionListener
Parameters:
e - the event that characterizes the change.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeToggleAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeToggleAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeToggleAction
extends AbstractAction

For the first selected row expandedness will be toggled.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreeToggleAction(String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicTreeUI.TreeToggleAction

public BasicTreeUI.TreeToggleAction(String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeTraverseAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicTreeUI.TreeTraverseAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicTreeUI
public class BasicTreeUI.TreeTraverseAction
extends AbstractAction

TreeTraverseAction is the action used for left/right keys. Will toggle the expandedness of a node, as well as potentially incrementing the selection.

See Also:
Serialized Form

Field Summary
protected  int direction
Determines direction to traverse, 1 means expand, -1 means collapse.
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
BasicTreeUI.TreeTraverseAction(int direction, String name)
Method Summary
void | actionPerformed(ActionEvent e) Invoked when an action occurs.
boolean | isEnabled() Returns true if the action is enabled.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

direction

protected int direction
Determines direction to traverse, 1 means expand, -1 means collapse.
Constructor Detail

BasicTreeUI.TreeTraverseAction

public BasicTreeUI.TreeTraverseAction(int direction,
                                      String name)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.

isEnabled

public boolean isEnabled()
Description copied from class: AbstractAction
Returns true if the action is enabled.
Overrides:
isEnabled in class AbstractAction
Following copied from class: javax.swing.AbstractAction
Returns:
true if the action is enabled, false otherwise
See Also:
Action.isEnabled()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxEditor.UIResource

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxEditor
        |
        +--javax.swing.plaf.basic.BasicComboBoxEditor.UIResource
All Implemented Interfaces:
ComboBoxEditor, EventListener, FocusListener, UIResource
Enclosing class:
BasicComboBoxEditor
public static class BasicComboBoxEditor.UIResource
extends BasicComboBoxEditor
implements UIResource

A subclass of BasicComboBoxEditor that implements UIResource. BasicComboBoxEditor doesn't implement UIResource directly so that applications can safely override the cellRenderer property with BasicListCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
BasicComboBoxEditor.UIResource
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
editor
Constructor Summary
BasicComboBoxEditor.UIResource()
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
addActionListener, focusGained, focusLost, getEditorComponent, getItem, removeActionListener, selectAll, setItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicComboBoxEditor.UIResource

public BasicComboBoxEditor.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicComboBoxRenderer.UIResource

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.plaf.basic.BasicComboBoxRenderer
                                |
                                +--javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants, UIResource
Enclosing class:
BasicComboBoxRenderer
public static class BasicComboBoxRenderer.UIResource
extends BasicComboBoxRenderer
implements UIResource

A subclass of BasicComboBoxRenderer that implements UIResource. BasicComboBoxRenderer doesn't implement UIResource directly so that applications can safely override the cellRenderer property with BasicListCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.plaf.basic.BasicComboBoxRenderer
BasicComboBoxRenderer.UIResource
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxRenderer
noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BasicComboBoxRenderer.UIResource()
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxRenderer
getListCellRendererComponent, getPreferredSize
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BasicComboBoxRenderer.UIResource

public BasicComboBoxRenderer.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UpdateAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicFileChooserUI.UpdateAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
BasicFileChooserUI
protected class BasicFileChooserUI.UpdateAction
extends AbstractAction

Rescans the files in the current directory

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected BasicFileChooserUI.UpdateAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicFileChooserUI.UpdateAction

protected BasicFileChooserUI.UpdateAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VerticalDragController

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicSplitPaneDivider.VerticalDragController

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
        |
        +--javax.swing.plaf.basic.BasicSplitPaneDivider.VerticalDragController
Enclosing class:
BasicSplitPaneDivider
protected class BasicSplitPaneDivider.VerticalDragController
extends BasicSplitPaneDivider.DragController

Handles the events during a dragging session for a VERTICAL_SPLIT orientated split pane. This continually messages dragDividerTo and then when done messages finishDraggingTo. When an instance is created it should be messaged with isValid() to insure that dragging can happen (dragging won't be allowed if the two views can not be resized).

Constructor Summary
protected BasicSplitPaneDivider.VerticalDragController(MouseEvent e)
Method Summary
protected int | getNeededLocation(int x, int y) Returns the y argument, since this is used for vertical splits.
protected int | positionForMouseEvent(MouseEvent e) Returns the new position to put the divider at based on the passed in MouseEvent.
Methods inherited from class javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
completeDrag, completeDrag, continueDrag, continueDrag, isValid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicSplitPaneDivider.VerticalDragController

protected BasicSplitPaneDivider.VerticalDragController(MouseEvent e)
Method Detail

getNeededLocation

protected int getNeededLocation(int x,
                                int y)
Returns the y argument, since this is used for vertical splits.
Overrides:
getNeededLocation in class BasicSplitPaneDivider.DragController

positionForMouseEvent

protected int positionForMouseEvent(MouseEvent e)
Returns the new position to put the divider at based on the passed in MouseEvent.
Overrides:
positionForMouseEvent in class BasicSplitPaneDivider.DragController
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ViewportChangeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollPaneUI.ViewportChangeHandler

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicScrollPaneUI
public class BasicScrollPaneUI.ViewportChangeHandler
extends Object
implements ChangeListener

Listener for viewport events.

Constructor Summary
BasicScrollPaneUI.ViewportChangeHandler()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollPaneUI.ViewportChangeHandler

public BasicScrollPaneUI.ViewportChangeHandler()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VSBChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.basic
Class BasicScrollPaneUI.VSBChangeListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener
All Implemented Interfaces:
ChangeListener, EventListener
Enclosing class:
BasicScrollPaneUI
public class BasicScrollPaneUI.VSBChangeListener
extends Object
implements ChangeListener

Vertical scrollbar listener.

Constructor Summary
BasicScrollPaneUI.VSBChangeListener()
Method Summary
 void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicScrollPaneUI.VSBChangeListener

public BasicScrollPaneUI.VSBChangeListener()
Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when the target of the listener has changed its state.
Specified by:
stateChanged in interface ChangeListener
Following copied from interface: javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BevelBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.BevelBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.BevelBorder
              |
              +--javax.swing.plaf.BorderUIResource.BevelBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.BevelBorderUIResource
extends BevelBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.BevelBorder
bevelType, highlightInner, highlightOuter, LOWERED, RAISED, shadowInner, shadowOuter
Constructor Summary
BorderUIResource.BevelBorderUIResource(int bevelType)
BorderUIResource.BevelBorderUIResource(int bevelType, Color highlight, Color shadow)
BorderUIResource.BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
Methods inherited from class javax.swing.border.BevelBorder
getBevelType, getBorderInsets, getBorderInsets, getHighlightInnerColor, getHighlightInnerColor, getHighlightOuterColor, getHighlightOuterColor, getShadowInnerColor, getShadowInnerColor, getShadowOuterColor, getShadowOuterColor, isBorderOpaque, paintBorder, paintLoweredBevel, paintRaisedBevel
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.BevelBorderUIResource

public BorderUIResource.BevelBorderUIResource(int bevelType)

BorderUIResource.BevelBorderUIResource

public BorderUIResource.BevelBorderUIResource(int bevelType,
                                              Color highlight,
                                              Color shadow)

BorderUIResource.BevelBorderUIResource

public BorderUIResource.BevelBorderUIResource(int bevelType,
                                              Color highlightOuter,
                                              Color highlightInner,
                                              Color shadowOuter,
                                              Color shadowInner)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource

java.lang.Object
  |
  +--javax.swing.plaf.BorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
public class BorderUIResource
extends Object
implements Border, UIResource, Serializable

See Also:
Serialized Form

Inner Class Summary
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource
Constructor Summary
BorderUIResource(Border delegate)
Creates a UIResource border object which wraps an existing Border instance.
Method Summary
static Border | getBlackLineBorderUIResource()
Insets | getBorderInsets(Component c) Returns the insets of the border.
static Border | getEtchedBorderUIResource()
static Border | getLoweredBevelBorderUIResource()
static Border | getRaisedBevelBorderUIResource()
boolean | isBorderOpaque() Returns whether or not the border is opaque.
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource

public BorderUIResource(Border delegate)
Creates a UIResource border object which wraps an existing Border instance.
Parameters:
delegate - the border being wrapped
Method Detail

getEtchedBorderUIResource

public static Border getEtchedBorderUIResource()

getLoweredBevelBorderUIResource

public static Border getLoweredBevelBorderUIResource()

getRaisedBevelBorderUIResource

public static Border getRaisedBevelBorderUIResource()

getBlackLineBorderUIResource

public static Border getBlackLineBorderUIResource()

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Description copied from interface: Border
Paints the border for the specified component with the specified position and size.
Specified by:
paintBorder in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from interface: Border
Returns the insets of the border.
Specified by:
getBorderInsets in interface Border
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies

isBorderOpaque

public boolean isBorderOpaque()
Description copied from interface: Border
Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.
Specified by:
isBorderOpaque in interface Border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
Direct Known Subclasses:
BasicButtonUI, MenuItemUI, MultiButtonUI
public abstract class ButtonUI
extends ComponentUI

Pluggable look and feel interface for JButton.

Constructor Summary
ButtonUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ButtonUI

public ButtonUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.plaf.ActionMapUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ActionMapUIResource

No usage of javax.swing.plaf.ActionMapUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource

No usage of javax.swing.plaf.BorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.BevelBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.BevelBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.BevelBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.CompoundBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.CompoundBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.CompoundBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.EmptyBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.EmptyBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.EmptyBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.EtchedBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.EtchedBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.EtchedBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.LineBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.LineBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.LineBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.MatteBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.MatteBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.MatteBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.BorderUIResource.TitledBorderUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.BorderUIResource.TitledBorderUIResource

No usage of javax.swing.plaf.BorderUIResource.TitledBorderUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ComponentInputMapUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ComponentInputMapUIResource

No usage of javax.swing.plaf.ComponentInputMapUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.DimensionUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.DimensionUIResource

No usage of javax.swing.plaf.DimensionUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.IconUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.IconUIResource

No usage of javax.swing.plaf.IconUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.InputMapUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.InputMapUIResource

No usage of javax.swing.plaf.InputMapUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.InsetsUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.InsetsUIResource

No usage of javax.swing.plaf.InsetsUIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ButtonUI

Packages that use ButtonUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ButtonUI in javax.swing

Methods in javax.swing that return ButtonUI
 ButtonUI AbstractButton.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type ButtonUI
 void AbstractButton.setUI(ButtonUI ui)
Sets the L&F object that renders this component.

Uses of ButtonUI in javax.swing.plaf

Subclasses of ButtonUI in javax.swing.plaf
 class MenuItemUI
Pluggable look and feel interface for JMenuItem.

Uses of ButtonUI in javax.swing.plaf.basic

Subclasses of ButtonUI in javax.swing.plaf.basic
class | BasicButtonUI BasicButton implementation
class | BasicCheckBoxMenuItemUI BasicCheckboxMenuItem implementation
class | BasicCheckBoxUI CheckboxUI implementation for BasicCheckboxUI
class | BasicMenuItemUI BasicMenuItem implementation
class | BasicMenuUI A default L&F implementation of MenuUI.
class | BasicRadioButtonMenuItemUI BasicRadioButtonMenuItem implementation
class | BasicRadioButtonUI RadioButtonUI implementation for BasicRadioButtonUI
class | BasicToggleButtonUI BasicToggleButton implementation

Uses of ButtonUI in javax.swing.plaf.metal

Subclasses of ButtonUI in javax.swing.plaf.metal
class | MetalButtonUI MetalButtonUI implementation
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI
class | MetalToggleButtonUI MetalToggleButton implementation

Uses of ButtonUI in javax.swing.plaf.multi

Subclasses of ButtonUI in javax.swing.plaf.multi
class | MultiButtonUI MultiButtonUI implementation
class | MultiMenuItemUI MultiMenuItemUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ColorChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ColorChooserUI

Packages that use ColorChooserUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ColorChooserUI in javax.swing

Methods in javax.swing that return ColorChooserUI
 ColorChooserUI JColorChooser.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type ColorChooserUI
 void JColorChooser.setUI(ColorChooserUI ui)
Sets the L&F object that renders this component.

Uses of ColorChooserUI in javax.swing.plaf.basic

Subclasses of ColorChooserUI in javax.swing.plaf.basic
 class BasicColorChooserUI
Provides the basic look and feel for a JColorChooser.

Uses of ColorChooserUI in javax.swing.plaf.multi

Subclasses of ColorChooserUI in javax.swing.plaf.multi
 class MultiColorChooserUI
MultiColorChooserUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ColorUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ColorUIResource

Packages that use ColorUIResource
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of ColorUIResource in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return ColorUIResource
static ColorUIResource | MetalLookAndFeel.getDesktopColor()
static ColorUIResource | MetalLookAndFeel.getFocusColor()
static ColorUIResource | MetalLookAndFeel.getWhite()
static ColorUIResource | MetalLookAndFeel.getBlack()
static ColorUIResource | MetalLookAndFeel.getControl()
static ColorUIResource | MetalLookAndFeel.getControlShadow()
static ColorUIResource | MetalLookAndFeel.getControlDarkShadow()
static ColorUIResource | MetalLookAndFeel.getControlInfo()
static ColorUIResource | MetalLookAndFeel.getControlHighlight()
static ColorUIResource | MetalLookAndFeel.getControlDisabled()
static ColorUIResource | MetalLookAndFeel.getPrimaryControl()
static ColorUIResource | MetalLookAndFeel.getPrimaryControlShadow()
static ColorUIResource | MetalLookAndFeel.getPrimaryControlDarkShadow()
static ColorUIResource | MetalLookAndFeel.getPrimaryControlInfo()
static ColorUIResource | MetalLookAndFeel.getPrimaryControlHighlight()
static ColorUIResource | MetalLookAndFeel.getSystemTextColor()
static ColorUIResource | MetalLookAndFeel.getControlTextColor()
static ColorUIResource | MetalLookAndFeel.getInactiveControlTextColor()
static ColorUIResource | MetalLookAndFeel.getInactiveSystemTextColor()
static ColorUIResource | MetalLookAndFeel.getUserTextColor()
static ColorUIResource | MetalLookAndFeel.getTextHighlightColor()
static ColorUIResource | MetalLookAndFeel.getHighlightedTextColor()
static ColorUIResource | MetalLookAndFeel.getWindowBackground()
static ColorUIResource | MetalLookAndFeel.getWindowTitleBackground()
static ColorUIResource | MetalLookAndFeel.getWindowTitleForeground()
static ColorUIResource | MetalLookAndFeel.getWindowTitleInactiveBackground()
static ColorUIResource | MetalLookAndFeel.getWindowTitleInactiveForeground()
static ColorUIResource | MetalLookAndFeel.getMenuBackground()
static ColorUIResource | MetalLookAndFeel.getMenuForeground()
static ColorUIResource | MetalLookAndFeel.getMenuSelectedBackground()
static ColorUIResource | MetalLookAndFeel.getMenuSelectedForeground()
static ColorUIResource | MetalLookAndFeel.getMenuDisabledForeground()
static ColorUIResource | MetalLookAndFeel.getSeparatorBackground()
static ColorUIResource | MetalLookAndFeel.getSeparatorForeground()
static ColorUIResource | MetalLookAndFeel.getAcceleratorForeground()
static ColorUIResource | MetalLookAndFeel.getAcceleratorSelectedForeground()
protected abstract ColorUIResource | MetalTheme.getPrimary1()
protected abstract ColorUIResource | MetalTheme.getPrimary2()
protected abstract ColorUIResource | MetalTheme.getPrimary3()
protected abstract ColorUIResource | MetalTheme.getSecondary1()
protected abstract ColorUIResource | MetalTheme.getSecondary2()
protected abstract ColorUIResource | MetalTheme.getSecondary3()
protected ColorUIResource | MetalTheme.getWhite()
protected ColorUIResource | MetalTheme.getBlack()
ColorUIResource | MetalTheme.getFocusColor()
ColorUIResource | MetalTheme.getDesktopColor()
ColorUIResource | MetalTheme.getControl()
ColorUIResource | MetalTheme.getControlShadow()
ColorUIResource | MetalTheme.getControlDarkShadow()
ColorUIResource | MetalTheme.getControlInfo()
ColorUIResource | MetalTheme.getControlHighlight()
ColorUIResource | MetalTheme.getControlDisabled()
ColorUIResource | MetalTheme.getPrimaryControl()
ColorUIResource | MetalTheme.getPrimaryControlShadow()
ColorUIResource | MetalTheme.getPrimaryControlDarkShadow()
ColorUIResource | MetalTheme.getPrimaryControlInfo()
ColorUIResource | MetalTheme.getPrimaryControlHighlight()
ColorUIResource | MetalTheme.getSystemTextColor()
ColorUIResource | MetalTheme.getControlTextColor()
ColorUIResource | MetalTheme.getInactiveControlTextColor()
ColorUIResource | MetalTheme.getInactiveSystemTextColor()
ColorUIResource | MetalTheme.getUserTextColor()
ColorUIResource | MetalTheme.getTextHighlightColor()
ColorUIResource | MetalTheme.getHighlightedTextColor()
ColorUIResource | MetalTheme.getWindowBackground()
ColorUIResource | MetalTheme.getWindowTitleBackground()
ColorUIResource | MetalTheme.getWindowTitleForeground()
ColorUIResource | MetalTheme.getWindowTitleInactiveBackground()
ColorUIResource | MetalTheme.getWindowTitleInactiveForeground()
ColorUIResource | MetalTheme.getMenuBackground()
ColorUIResource | MetalTheme.getMenuForeground()
ColorUIResource | MetalTheme.getMenuSelectedBackground()
ColorUIResource | MetalTheme.getMenuSelectedForeground()
ColorUIResource | MetalTheme.getMenuDisabledForeground()
ColorUIResource | MetalTheme.getSeparatorBackground()
ColorUIResource | MetalTheme.getSeparatorForeground()
ColorUIResource | MetalTheme.getAcceleratorForeground()
ColorUIResource | MetalTheme.getAcceleratorSelectedForeground()
protected ColorUIResource | DefaultMetalTheme.getPrimary1()
protected ColorUIResource | DefaultMetalTheme.getPrimary2()
protected ColorUIResource | DefaultMetalTheme.getPrimary3()
protected ColorUIResource | DefaultMetalTheme.getSecondary1()
protected ColorUIResource | DefaultMetalTheme.getSecondary2()
protected ColorUIResource | DefaultMetalTheme.getSecondary3()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ComboBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ComboBoxUI

Packages that use ComboBoxUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ComboBoxUI in javax.swing

Methods in javax.swing that return ComboBoxUI
 ComboBoxUI JComboBox.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type ComboBoxUI
 void JComboBox.setUI(ComboBoxUI ui)
Sets the L&F object that renders this component.

Uses of ComboBoxUI in javax.swing.plaf.basic

Subclasses of ComboBoxUI in javax.swing.plaf.basic
 class BasicComboBoxUI
Basic UI for JComboBox.

Uses of ComboBoxUI in javax.swing.plaf.metal

Subclasses of ComboBoxUI in javax.swing.plaf.metal
 class MetalComboBoxUI
Metal UI for JComboBox

Uses of ComboBoxUI in javax.swing.plaf.multi

Subclasses of ComboBoxUI in javax.swing.plaf.multi
 class MultiComboBoxUI
MultiComboBoxUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ComponentUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ComponentUI

Packages that use ComponentUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ComponentUI in javax.swing

Fields in javax.swing declared as ComponentUI
protected  ComponentUI JComponent.ui

Methods in javax.swing that return ComponentUI
ComponentUI | UIDefaults.getUI(JComponent target) Creates an ComponentUI implementation for the specified component.
static ComponentUI | UIManager.getUI(JComponent target) Returns the L&F object that renders the target component.

Methods in javax.swing with parameters of type ComponentUI
protected  void JComponent.setUI(ComponentUI newUI)
Sets the look and feel delegate for this component.

Uses of ComponentUI in javax.swing.plaf

Subclasses of ComponentUI in javax.swing.plaf
class | ButtonUI Pluggable look and feel interface for JButton.
class | ColorChooserUI Pluggable look and feel interface for JColorChooser.
class | ComboBoxUI Pluggable look and feel interface for JComboBox.
class | DesktopIconUI Pluggable look and feel interface for JDesktopIcon.
class | DesktopPaneUI Pluggable look and feel interface for JDesktopPane.
class | FileChooserUI Pluggable look and feel interface for JFileChooser
class | InternalFrameUI Pluggable look and feel interface for JInternalFrame.
class | LabelUI Pluggable look and feel interface for JLabel.
class | ListUI The JList pluggable look and feel delegate.
class | MenuBarUI Pluggable look and feel interface for JMenuBar.
class | MenuItemUI Pluggable look and feel interface for JMenuItem.
class | OptionPaneUI Pluggable look and feel interface for JOptionPane.
class | PanelUI Pluggable look and feel interface for Panel.
class | PopupMenuUI Pluggable look and feel interface for JPopupMenu.
class | ProgressBarUI Pluggable look and feel interface for JProgressBar.
class | RootPaneUI Pluggable look and feel interface for JRootPane.
class | ScrollBarUI Pluggable look and feel interface for JScrollBar.
class | ScrollPaneUI Pluggable look and feel interface for JScrollPane.
class | SeparatorUI Pluggable look and feel interface for JSeparator.
class | SliderUI Pluggable look and feel interface for JSlider.
class | SplitPaneUI Pluggable look and feel interface for JSplitPane.
class | TabbedPaneUI Pluggable look and feel interface for JTabbedPane.
class | TableHeaderUI Pluggable look and feel interface for JTableHeader.
class | TableUI Pluggable look and feel interface for JTable.
class | TextUI Text editor user interface
class | ToolBarUI Pluggable look and feel interface for JToolBar.
class | ToolTipUI Pluggable look and feel interface for JToolTip.
class | TreeUI Pluggable look and feel interface for JTree.
class | ViewportUI Pluggable look and feel interface for JViewport.

Methods in javax.swing.plaf that return ComponentUI
static ComponentUI ComponentUI.createUI(JComponent c)

Uses of ComponentUI in javax.swing.plaf.basic

Subclasses of ComponentUI in javax.swing.plaf.basic
class | BasicButtonUI BasicButton implementation
class | BasicCheckBoxMenuItemUI BasicCheckboxMenuItem implementation
class | BasicCheckBoxUI CheckboxUI implementation for BasicCheckboxUI
class | BasicColorChooserUI Provides the basic look and feel for a JColorChooser.
class | BasicComboBoxUI Basic UI for JComboBox.
class | BasicDesktopIconUI Basic L&F for a minimized window on a desktop.
class | BasicDesktopPaneUI Basic L&F for a desktop.
class | BasicEditorPaneUI Provides the look and feel for a JEditorPane.
class | BasicFileChooserUI Basic L&F implementation of a FileChooser.
class | BasicInternalFrameUI A basic L&F implementation of JInternalFrame.
class | BasicLabelUI A Windows L&F implementation of LabelUI.
class | BasicListUI A Windows L&F implementation of ListUI.
class | BasicMenuBarUI A default L&F implementation of MenuBarUI.
class | BasicMenuItemUI BasicMenuItem implementation
class | BasicMenuUI A default L&F implementation of MenuUI.
class | BasicOptionPaneUI Provides the basic look and feel for a JOptionPane.
class | BasicPanelUI BasicPanel implementation
class | BasicPasswordFieldUI Provides the Windows look and feel for a password field.
class | BasicPopupMenuSeparatorUI A Basic L&F implementation of PopupMenuSeparatorUI.
class | BasicPopupMenuUI A Windows L&F implementation of PopupMenuUI.
class | BasicProgressBarUI A Basic L&F implementation of ProgressBarUI.
class | BasicRadioButtonMenuItemUI BasicRadioButtonMenuItem implementation
class | BasicRadioButtonUI RadioButtonUI implementation for BasicRadioButtonUI
class | BasicRootPaneUI Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
class | BasicScrollBarUI Implementation of ScrollBarUI for the Basic Look and Feel
class | BasicScrollPaneUI A default L&F implementation of ScrollPaneUI.
class | BasicSeparatorUI A Basic L&F implementation of SeparatorUI.
class | BasicSliderUI A Basic L&F implementation of SliderUI.
class | BasicSplitPaneUI A Basic L&F implementation of the SplitPaneUI.
class | BasicTabbedPaneUI A Basic L&F implementation of TabbedPaneUI.
class | BasicTableHeaderUI BasicTableHeaderUI implementation
class | BasicTableUI BasicTableUI implementation
class | BasicTextAreaUI Provides the look and feel for a plain text editor.
class | BasicTextFieldUI Basis of a look and feel for a JTextField.
class | BasicTextPaneUI Provides the look and feel for a styled text editor.
class | BasicTextUI Basis of a text components look-and-feel.
class | BasicToggleButtonUI BasicToggleButton implementation
class | BasicToolBarSeparatorUI A Basic L&F implementation of ToolBarSeparatorUI.
class | BasicToolBarUI A Basic L&F implementation of ToolBarUI.
class | BasicToolTipUI Standard tool tip L&F.
class | BasicTreeUI The basic L&F for a hierarchical data structure.
class | BasicViewportUI BasicViewport implementation

Methods in javax.swing.plaf.basic that return ComponentUI
static ComponentUI | BasicEditorPaneUI.createUI(JComponent c) Creates a UI for the JTextPane.
static ComponentUI | BasicTextPaneUI.createUI(JComponent c) Creates a UI for the JTextPane.
static ComponentUI | BasicSeparatorUI.createUI(JComponent c)
static ComponentUI | BasicMenuItemUI.createUI(JComponent c)
static ComponentUI | BasicRadioButtonMenuItemUI.createUI(JComponent b)
static ComponentUI | BasicButtonUI.createUI(JComponent c)
static ComponentUI | BasicToggleButtonUI.createUI(JComponent b)
static ComponentUI | BasicRadioButtonUI.createUI(JComponent b)
static ComponentUI | BasicToolBarSeparatorUI.createUI(JComponent c)
static ComponentUI | BasicMenuUI.createUI(JComponent x)
static ComponentUI | BasicProgressBarUI.createUI(JComponent x)
static ComponentUI | BasicOptionPaneUI.createUI(JComponent x) Creates a new BasicOptionPaneUI instance.
static ComponentUI | BasicTabbedPaneUI.createUI(JComponent c)
static ComponentUI | BasicCheckBoxMenuItemUI.createUI(JComponent c)
static ComponentUI | BasicPanelUI.createUI(JComponent c)
static ComponentUI | BasicPopupMenuUI.createUI(JComponent x)
static ComponentUI | BasicTableUI.createUI(JComponent c)
static ComponentUI | BasicViewportUI.createUI(JComponent c)
static ComponentUI | BasicTextFieldUI.createUI(JComponent c) Creates a UI for a JTextField.
static ComponentUI | BasicPasswordFieldUI.createUI(JComponent c) Creates a UI for a JPasswordField.
static ComponentUI | BasicToolTipUI.createUI(JComponent c)
static ComponentUI | BasicScrollBarUI.createUI(JComponent c)
static ComponentUI | BasicToolBarUI.createUI(JComponent c)
static ComponentUI | BasicInternalFrameUI.createUI(JComponent b)
static ComponentUI | BasicDesktopPaneUI.createUI(JComponent c)
static ComponentUI | BasicListUI.createUI(JComponent list) Returns a new instance of BasicListUI.
static ComponentUI | BasicLabelUI.createUI(JComponent c)
static ComponentUI | BasicComboBoxUI.createUI(JComponent c)
static ComponentUI | BasicTableHeaderUI.createUI(JComponent h)
static ComponentUI | BasicMenuBarUI.createUI(JComponent x)
static ComponentUI | BasicPopupMenuSeparatorUI.createUI(JComponent c)
static ComponentUI | BasicCheckBoxUI.createUI(JComponent b)
static ComponentUI | BasicColorChooserUI.createUI(JComponent c)
static ComponentUI | BasicTreeUI.createUI(JComponent x)
static ComponentUI | BasicSplitPaneUI.createUI(JComponent x) Creates a new BasicSplitPaneUI instance
static ComponentUI | BasicScrollPaneUI.createUI(JComponent x)
static ComponentUI | BasicRootPaneUI.createUI(JComponent c)
static ComponentUI | BasicTextAreaUI.createUI(JComponent ta) Creates a UI for a JTextArea.
static ComponentUI | BasicDesktopIconUI.createUI(JComponent c)
static ComponentUI | BasicSliderUI.createUI(JComponent b)

Uses of ComponentUI in javax.swing.plaf.metal

Subclasses of ComponentUI in javax.swing.plaf.metal
class | MetalButtonUI MetalButtonUI implementation
class | MetalCheckBoxUI CheckboxUI implementation for MetalCheckboxUI
class | MetalComboBoxUI Metal UI for JComboBox
class | MetalDesktopIconUI Metal desktop icon.
class | MetalFileChooserUI Metal L&F implementation of a FileChooser.
class | MetalInternalFrameUI Metal implementation of JInternalFrame.
class | MetalLabelUI A Windows L&F implementation of LabelUI.
class | MetalPopupMenuSeparatorUI A Metal L&F implementation of PopupMenuSeparatorUI.
class | MetalProgressBarUI The Metal implementation of ProgressBarUI.
class | MetalRadioButtonUI RadioButtonUI implementation for MetalRadioButtonUI
class | MetalScrollBarUI Implementation of ScrollBarUI for the Metal Look and Feel
class | MetalScrollPaneUI A Metal L&F implementation of ScrollPaneUI.
class | MetalSeparatorUI A Metal L&F implementation of SeparatorUI.
class | MetalSliderUI A Java L&F implementation of SliderUI.
class | MetalSplitPaneUI Metal split pane.
class | MetalTabbedPaneUI The Metal subclass of BasicTabbedPaneUI.
class | MetalTextFieldUI Basis of a look and feel for a JTextField.
class | MetalToggleButtonUI MetalToggleButton implementation
class | MetalToolBarUI A Metal Look and Feel implementation of ToolBarUI.
class | MetalToolTipUI A Metal L&F extension of BasicToolTipUI.
class | MetalTreeUI MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.

Methods in javax.swing.plaf.metal that return ComponentUI
static ComponentUI | MetalTreeUI.createUI(JComponent x)
static ComponentUI | MetalSeparatorUI.createUI(JComponent c)
static ComponentUI | MetalPopupMenuSeparatorUI.createUI(JComponent c)
static ComponentUI | MetalTextFieldUI.createUI(JComponent c)
static ComponentUI | MetalFileChooserUI.createUI(JComponent c)
static ComponentUI | MetalLabelUI.createUI(JComponent c)
static ComponentUI | MetalToggleButtonUI.createUI(JComponent b)
static ComponentUI | MetalTabbedPaneUI.createUI(JComponent x)
static ComponentUI | MetalRadioButtonUI.createUI(JComponent c)
static ComponentUI | MetalInternalFrameUI.createUI(JComponent c)
static ComponentUI | MetalComboBoxUI.createUI(JComponent c)
static ComponentUI | MetalProgressBarUI.createUI(JComponent c)
static ComponentUI | MetalSliderUI.createUI(JComponent c)
static ComponentUI | MetalScrollBarUI.createUI(JComponent c)
static ComponentUI | MetalToolBarUI.createUI(JComponent c)
static ComponentUI | MetalDesktopIconUI.createUI(JComponent c)
static ComponentUI | MetalScrollPaneUI.createUI(JComponent x)
static ComponentUI | MetalButtonUI.createUI(JComponent c)
static ComponentUI | MetalToolTipUI.createUI(JComponent c)
static ComponentUI | MetalCheckBoxUI.createUI(JComponent b)
static ComponentUI | MetalSplitPaneUI.createUI(JComponent x) Creates a new MetalSplitPaneUI instance

Uses of ComponentUI in javax.swing.plaf.multi

Subclasses of ComponentUI in javax.swing.plaf.multi
class | MultiButtonUI MultiButtonUI implementation
class | MultiColorChooserUI MultiColorChooserUI implementation
class | MultiComboBoxUI MultiComboBoxUI implementation
class | MultiDesktopIconUI MultiDesktopIconUI implementation
class | MultiDesktopPaneUI MultiDesktopPaneUI implementation
class | MultiFileChooserUI MultiFileChooserUI implementation
class | MultiInternalFrameUI MultiInternalFrameUI implementation
class | MultiLabelUI MultiLabelUI implementation
class | MultiListUI MultiListUI implementation
class | MultiMenuBarUI MultiMenuBarUI implementation
class | MultiMenuItemUI MultiMenuItemUI implementation
class | MultiOptionPaneUI MultiOptionPaneUI implementation
class | MultiPanelUI MultiPanelUI implementation
class | MultiPopupMenuUI MultiPopupMenuUI implementation
class | MultiProgressBarUI MultiProgressBarUI implementation
class | MultiScrollBarUI MultiScrollBarUI implementation
class | MultiScrollPaneUI MultiScrollPaneUI implementation
class | MultiSeparatorUI MultiSeparatorUI implementation
class | MultiSliderUI MultiSliderUI implementation
class | MultiSplitPaneUI MultiSplitPaneUI implementation
class | MultiTabbedPaneUI MultiTabbedPaneUI implementation
class | MultiTableHeaderUI MultiTableHeaderUI implementation
class | MultiTableUI MultiTableUI implementation
class | MultiTextUI MultiTextUI implementation
class | MultiToolBarUI MultiToolBarUI implementation
class | MultiToolTipUI MultiToolTipUI implementation
class | MultiTreeUI MultiTreeUI implementation
class | MultiViewportUI MultiViewportUI implementation

Methods in javax.swing.plaf.multi that return ComponentUI
ComponentUI[] | MultiListUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiListUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiSeparatorUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiSeparatorUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
static ComponentUI | MultiLookAndFeel.createUIs(ComponentUI mui, Vector uis, JComponent target) Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
protected static ComponentUI[] | MultiLookAndFeel.uisToArray(Vector uis) Turn the Vector of UI's into an array.
ComponentUI[] | MultiLabelUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiLabelUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiPopupMenuUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiPopupMenuUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiPanelUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiPanelUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiScrollBarUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiScrollBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiTextUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiTextUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiComboBoxUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiComboBoxUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiTableHeaderUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiTableHeaderUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiFileChooserUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiFileChooserUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiColorChooserUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiColorChooserUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiTreeUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiTreeUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiViewportUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiViewportUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiTabbedPaneUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiTabbedPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiProgressBarUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiProgressBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiScrollPaneUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiScrollPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiOptionPaneUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiOptionPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiSplitPaneUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiSplitPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiButtonUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiButtonUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiToolBarUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiToolBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiSliderUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiSliderUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiDesktopPaneUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiDesktopPaneUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiTableUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiTableUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiDesktopIconUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiDesktopIconUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiMenuItemUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiMenuItemUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiInternalFrameUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiInternalFrameUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiToolTipUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiToolTipUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
ComponentUI[] | MultiMenuBarUI.getUIs() Return the list of UI's associated with this multiplexing UI.
static ComponentUI | MultiMenuBarUI.createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.

Methods in javax.swing.plaf.multi with parameters of type ComponentUI
static ComponentUI MultiLookAndFeel.createUIs(ComponentUI mui, Vector uis, JComponent target)
Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.

Uses of ComponentUI in javax.swing.text

Subclasses of ComponentUI in javax.swing.text
 class DefaultTextUI
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.DesktopIconUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.DesktopIconUI

Packages that use DesktopIconUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of DesktopIconUI in javax.swing

Methods in javax.swing that return DesktopIconUI
 DesktopIconUI JInternalFrame.JDesktopIcon.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type DesktopIconUI
 void JInternalFrame.JDesktopIcon.setUI(DesktopIconUI ui)
Sets the L&F object that renders this component.

Uses of DesktopIconUI in javax.swing.plaf.basic

Subclasses of DesktopIconUI in javax.swing.plaf.basic
 class BasicDesktopIconUI
Basic L&F for a minimized window on a desktop.

Uses of DesktopIconUI in javax.swing.plaf.metal

Subclasses of DesktopIconUI in javax.swing.plaf.metal
 class MetalDesktopIconUI
Metal desktop icon.

Uses of DesktopIconUI in javax.swing.plaf.multi

Subclasses of DesktopIconUI in javax.swing.plaf.multi
 class MultiDesktopIconUI
MultiDesktopIconUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.DesktopPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.DesktopPaneUI

Packages that use DesktopPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of DesktopPaneUI in javax.swing

Methods in javax.swing that return DesktopPaneUI
 DesktopPaneUI JDesktopPane.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type DesktopPaneUI
 void JDesktopPane.setUI(DesktopPaneUI ui)
Sets the L&F object that renders this component.

Uses of DesktopPaneUI in javax.swing.plaf.basic

Subclasses of DesktopPaneUI in javax.swing.plaf.basic
 class BasicDesktopPaneUI
Basic L&F for a desktop.

Uses of DesktopPaneUI in javax.swing.plaf.multi

Subclasses of DesktopPaneUI in javax.swing.plaf.multi
 class MultiDesktopPaneUI
MultiDesktopPaneUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.FileChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.FileChooserUI

Packages that use FileChooserUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of FileChooserUI in javax.swing

Methods in javax.swing that return FileChooserUI
 FileChooserUI JFileChooser.getUI()
Gets the UI object which implements the L&F for this component.

Uses of FileChooserUI in javax.swing.plaf.basic

Subclasses of FileChooserUI in javax.swing.plaf.basic
 class BasicFileChooserUI
Basic L&F implementation of a FileChooser.

Uses of FileChooserUI in javax.swing.plaf.metal

Subclasses of FileChooserUI in javax.swing.plaf.metal
 class MetalFileChooserUI
Metal L&F implementation of a FileChooser.

Uses of FileChooserUI in javax.swing.plaf.multi

Subclasses of FileChooserUI in javax.swing.plaf.multi
 class MultiFileChooserUI
MultiFileChooserUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.FontUIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.FontUIResource

Packages that use FontUIResource
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of FontUIResource in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return FontUIResource
static FontUIResource | MetalLookAndFeel.getControlTextFont()
static FontUIResource | MetalLookAndFeel.getSystemTextFont()
static FontUIResource | MetalLookAndFeel.getUserTextFont()
static FontUIResource | MetalLookAndFeel.getMenuTextFont()
static FontUIResource | MetalLookAndFeel.getWindowTitleFont()
static FontUIResource | MetalLookAndFeel.getSubTextFont()
abstract FontUIResource | MetalTheme.getControlTextFont()
abstract FontUIResource | MetalTheme.getSystemTextFont()
abstract FontUIResource | MetalTheme.getUserTextFont()
abstract FontUIResource | MetalTheme.getMenuTextFont()
abstract FontUIResource | MetalTheme.getWindowTitleFont()
abstract FontUIResource | MetalTheme.getSubTextFont()
FontUIResource | DefaultMetalTheme.getControlTextFont()
FontUIResource | DefaultMetalTheme.getSystemTextFont()
FontUIResource | DefaultMetalTheme.getUserTextFont()
FontUIResource | DefaultMetalTheme.getMenuTextFont()
FontUIResource | DefaultMetalTheme.getWindowTitleFont()
FontUIResource | DefaultMetalTheme.getSubTextFont()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.InternalFrameUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.InternalFrameUI

Packages that use InternalFrameUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of InternalFrameUI in javax.swing

Methods in javax.swing that return InternalFrameUI
 InternalFrameUI JInternalFrame.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type InternalFrameUI
 void JInternalFrame.setUI(InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.

Uses of InternalFrameUI in javax.swing.plaf.basic

Subclasses of InternalFrameUI in javax.swing.plaf.basic
 class BasicInternalFrameUI
A basic L&F implementation of JInternalFrame.

Uses of InternalFrameUI in javax.swing.plaf.metal

Subclasses of InternalFrameUI in javax.swing.plaf.metal
 class MetalInternalFrameUI
Metal implementation of JInternalFrame.

Uses of InternalFrameUI in javax.swing.plaf.multi

Subclasses of InternalFrameUI in javax.swing.plaf.multi
 class MultiInternalFrameUI
MultiInternalFrameUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.LabelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.LabelUI

Packages that use LabelUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of LabelUI in javax.swing

Methods in javax.swing that return LabelUI
 LabelUI JLabel.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type LabelUI
 void JLabel.setUI(LabelUI ui)
Sets the L&F object that renders this component.

Uses of LabelUI in javax.swing.plaf.basic

Subclasses of LabelUI in javax.swing.plaf.basic
 class BasicLabelUI
A Windows L&F implementation of LabelUI.

Uses of LabelUI in javax.swing.plaf.metal

Subclasses of LabelUI in javax.swing.plaf.metal
 class MetalLabelUI
A Windows L&F implementation of LabelUI.

Uses of LabelUI in javax.swing.plaf.multi

Subclasses of LabelUI in javax.swing.plaf.multi
 class MultiLabelUI
MultiLabelUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ListUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ListUI

Packages that use ListUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ListUI in javax.swing

Methods in javax.swing that return ListUI
 ListUI JList.getUI()
Returns the look and feel (L&F) object that renders this component.

Methods in javax.swing with parameters of type ListUI
 void JList.setUI(ListUI ui)
Sets the look and feel (L&F) object that renders this component.

Uses of ListUI in javax.swing.plaf.basic

Subclasses of ListUI in javax.swing.plaf.basic
 class BasicListUI
A Windows L&F implementation of ListUI.

Uses of ListUI in javax.swing.plaf.multi

Subclasses of ListUI in javax.swing.plaf.multi
 class MultiListUI
MultiListUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.MenuBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.MenuBarUI

Packages that use MenuBarUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of MenuBarUI in javax.swing

Methods in javax.swing that return MenuBarUI
 MenuBarUI JMenuBar.getUI()
Returns the menubar's current UI.

Methods in javax.swing with parameters of type MenuBarUI
 void JMenuBar.setUI(MenuBarUI ui)
Sets the L&F object that renders this component.

Uses of MenuBarUI in javax.swing.plaf.basic

Subclasses of MenuBarUI in javax.swing.plaf.basic
 class BasicMenuBarUI
A default L&F implementation of MenuBarUI.

Uses of MenuBarUI in javax.swing.plaf.multi

Subclasses of MenuBarUI in javax.swing.plaf.multi
 class MultiMenuBarUI
MultiMenuBarUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.MenuItemUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.MenuItemUI

Packages that use MenuItemUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of MenuItemUI in javax.swing

Methods in javax.swing with parameters of type MenuItemUI
 void JMenuItem.setUI(MenuItemUI ui)
Sets the L&F object that renders this component.

Uses of MenuItemUI in javax.swing.plaf.basic

Subclasses of MenuItemUI in javax.swing.plaf.basic
class | BasicCheckBoxMenuItemUI BasicCheckboxMenuItem implementation
class | BasicMenuItemUI BasicMenuItem implementation
class | BasicMenuUI A default L&F implementation of MenuUI.
class | BasicRadioButtonMenuItemUI BasicRadioButtonMenuItem implementation

Uses of MenuItemUI in javax.swing.plaf.multi

Subclasses of MenuItemUI in javax.swing.plaf.multi
 class MultiMenuItemUI
MultiMenuItemUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.OptionPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.OptionPaneUI

Packages that use OptionPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of OptionPaneUI in javax.swing

Methods in javax.swing that return OptionPaneUI
 OptionPaneUI JOptionPane.getUI()
Returns the UI object which implements the L&F for this component.

Methods in javax.swing with parameters of type OptionPaneUI
 void JOptionPane.setUI(OptionPaneUI ui)
Sets the UI object which implements the L&F for this component.

Uses of OptionPaneUI in javax.swing.plaf.basic

Subclasses of OptionPaneUI in javax.swing.plaf.basic
 class BasicOptionPaneUI
Provides the basic look and feel for a JOptionPane.

Uses of OptionPaneUI in javax.swing.plaf.multi

Subclasses of OptionPaneUI in javax.swing.plaf.multi
 class MultiOptionPaneUI
MultiOptionPaneUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.PanelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.PanelUI

Packages that use PanelUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of PanelUI in javax.swing.plaf.basic

Subclasses of PanelUI in javax.swing.plaf.basic
 class BasicPanelUI
BasicPanel implementation

Uses of PanelUI in javax.swing.plaf.multi

Subclasses of PanelUI in javax.swing.plaf.multi
 class MultiPanelUI
MultiPanelUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.PopupMenuUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.PopupMenuUI

Packages that use PopupMenuUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of PopupMenuUI in javax.swing

Methods in javax.swing that return PopupMenuUI
 PopupMenuUI JPopupMenu.getUI()
Returns the look and feel (L&F) object that renders this component.

Methods in javax.swing with parameters of type PopupMenuUI
 void JPopupMenu.setUI(PopupMenuUI ui)
Sets the L&F object that renders this component.

Uses of PopupMenuUI in javax.swing.plaf.basic

Subclasses of PopupMenuUI in javax.swing.plaf.basic
 class BasicPopupMenuUI
A Windows L&F implementation of PopupMenuUI.

Uses of PopupMenuUI in javax.swing.plaf.multi

Subclasses of PopupMenuUI in javax.swing.plaf.multi
 class MultiPopupMenuUI
MultiPopupMenuUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ProgressBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ProgressBarUI

Packages that use ProgressBarUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ProgressBarUI in javax.swing

Methods in javax.swing that return ProgressBarUI
 ProgressBarUI JProgressBar.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type ProgressBarUI
 void JProgressBar.setUI(ProgressBarUI ui)
Sets the L&F object that renders this component.

Uses of ProgressBarUI in javax.swing.plaf.basic

Subclasses of ProgressBarUI in javax.swing.plaf.basic
 class BasicProgressBarUI
A Basic L&F implementation of ProgressBarUI.

Uses of ProgressBarUI in javax.swing.plaf.metal

Subclasses of ProgressBarUI in javax.swing.plaf.metal
 class MetalProgressBarUI
The Metal implementation of ProgressBarUI.

Uses of ProgressBarUI in javax.swing.plaf.multi

Subclasses of ProgressBarUI in javax.swing.plaf.multi
 class MultiProgressBarUI
MultiProgressBarUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.RootPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.RootPaneUI

Packages that use RootPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.

Uses of RootPaneUI in javax.swing

Methods in javax.swing that return RootPaneUI
 RootPaneUI JRootPane.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type RootPaneUI
 void JRootPane.setUI(RootPaneUI ui)
Sets the L&F object that renders this component.

Uses of RootPaneUI in javax.swing.plaf.basic

Subclasses of RootPaneUI in javax.swing.plaf.basic
 class BasicRootPaneUI
Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ScrollBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ScrollBarUI

Packages that use ScrollBarUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ScrollBarUI in javax.swing

Methods in javax.swing that return ScrollBarUI
 ScrollBarUI JScrollBar.getUI()
Returns the delegate that implements the look and feel for this component.

Uses of ScrollBarUI in javax.swing.plaf.basic

Subclasses of ScrollBarUI in javax.swing.plaf.basic
 class BasicScrollBarUI
Implementation of ScrollBarUI for the Basic Look and Feel

Uses of ScrollBarUI in javax.swing.plaf.metal

Subclasses of ScrollBarUI in javax.swing.plaf.metal
 class MetalScrollBarUI
Implementation of ScrollBarUI for the Metal Look and Feel

Uses of ScrollBarUI in javax.swing.plaf.multi

Subclasses of ScrollBarUI in javax.swing.plaf.multi
 class MultiScrollBarUI
MultiScrollBarUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ScrollPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ScrollPaneUI

Packages that use ScrollPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ScrollPaneUI in javax.swing

Methods in javax.swing that return ScrollPaneUI
 ScrollPaneUI JScrollPane.getUI()
Returns the look and feel (L&F) object that renders this component.

Methods in javax.swing with parameters of type ScrollPaneUI
 void JScrollPane.setUI(ScrollPaneUI ui)
Sets the ScrollPaneUI object that provides the look and feel (L&F) for this component.

Uses of ScrollPaneUI in javax.swing.plaf.basic

Subclasses of ScrollPaneUI in javax.swing.plaf.basic
 class BasicScrollPaneUI
A default L&F implementation of ScrollPaneUI.

Uses of ScrollPaneUI in javax.swing.plaf.metal

Subclasses of ScrollPaneUI in javax.swing.plaf.metal
 class MetalScrollPaneUI
A Metal L&F implementation of ScrollPaneUI.

Uses of ScrollPaneUI in javax.swing.plaf.multi

Subclasses of ScrollPaneUI in javax.swing.plaf.multi
 class MultiScrollPaneUI
MultiScrollPaneUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.SeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.SeparatorUI

Packages that use SeparatorUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of SeparatorUI in javax.swing

Methods in javax.swing that return SeparatorUI
 SeparatorUI JSeparator.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type SeparatorUI
 void JSeparator.setUI(SeparatorUI ui)
Sets the L&F object that renders this component.

Uses of SeparatorUI in javax.swing.plaf.basic

Subclasses of SeparatorUI in javax.swing.plaf.basic
class | BasicPopupMenuSeparatorUI A Basic L&F implementation of PopupMenuSeparatorUI.
class | BasicSeparatorUI A Basic L&F implementation of SeparatorUI.
class | BasicToolBarSeparatorUI A Basic L&F implementation of ToolBarSeparatorUI.

Uses of SeparatorUI in javax.swing.plaf.metal

Subclasses of SeparatorUI in javax.swing.plaf.metal
class | MetalPopupMenuSeparatorUI A Metal L&F implementation of PopupMenuSeparatorUI.
class | MetalSeparatorUI A Metal L&F implementation of SeparatorUI.

Uses of SeparatorUI in javax.swing.plaf.multi

Subclasses of SeparatorUI in javax.swing.plaf.multi
 class MultiSeparatorUI
MultiSeparatorUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.SliderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.SliderUI

Packages that use SliderUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of SliderUI in javax.swing

Methods in javax.swing that return SliderUI
 SliderUI JSlider.getUI()
Gets the UI object which implements the L&F for this component.

Methods in javax.swing with parameters of type SliderUI
 void JSlider.setUI(SliderUI ui)
Sets the UI object which implements the L&F for this component.

Uses of SliderUI in javax.swing.plaf.basic

Subclasses of SliderUI in javax.swing.plaf.basic
 class BasicSliderUI
A Basic L&F implementation of SliderUI.

Uses of SliderUI in javax.swing.plaf.metal

Subclasses of SliderUI in javax.swing.plaf.metal
 class MetalSliderUI
A Java L&F implementation of SliderUI.

Uses of SliderUI in javax.swing.plaf.multi

Subclasses of SliderUI in javax.swing.plaf.multi
 class MultiSliderUI
MultiSliderUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.SplitPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.SplitPaneUI

Packages that use SplitPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of SplitPaneUI in javax.swing

Methods in javax.swing that return SplitPaneUI
 SplitPaneUI JSplitPane.getUI()
Returns the SplitPaneUI that is providing the current look and feel.

Methods in javax.swing with parameters of type SplitPaneUI
 void JSplitPane.setUI(SplitPaneUI ui)
Sets the L&F object that renders this component.

Uses of SplitPaneUI in javax.swing.plaf.basic

Subclasses of SplitPaneUI in javax.swing.plaf.basic
 class BasicSplitPaneUI
A Basic L&F implementation of the SplitPaneUI.

Uses of SplitPaneUI in javax.swing.plaf.metal

Subclasses of SplitPaneUI in javax.swing.plaf.metal
 class MetalSplitPaneUI
Metal split pane.

Uses of SplitPaneUI in javax.swing.plaf.multi

Subclasses of SplitPaneUI in javax.swing.plaf.multi
 class MultiSplitPaneUI
MultiSplitPaneUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.TabbedPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.TabbedPaneUI

Packages that use TabbedPaneUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of TabbedPaneUI in javax.swing

Methods in javax.swing that return TabbedPaneUI
 TabbedPaneUI JTabbedPane.getUI()
Returns the UI object which implements the L&F for this component.

Methods in javax.swing with parameters of type TabbedPaneUI
 void JTabbedPane.setUI(TabbedPaneUI ui)
Sets the UI object which implements the L&F for this component.

Uses of TabbedPaneUI in javax.swing.plaf.basic

Subclasses of TabbedPaneUI in javax.swing.plaf.basic
 class BasicTabbedPaneUI
A Basic L&F implementation of TabbedPaneUI.

Uses of TabbedPaneUI in javax.swing.plaf.metal

Subclasses of TabbedPaneUI in javax.swing.plaf.metal
 class MetalTabbedPaneUI
The Metal subclass of BasicTabbedPaneUI.

Uses of TabbedPaneUI in javax.swing.plaf.multi

Subclasses of TabbedPaneUI in javax.swing.plaf.multi
 class MultiTabbedPaneUI
MultiTabbedPaneUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.TableHeaderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.TableHeaderUI

Packages that use TableHeaderUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableHeaderUI in javax.swing.plaf.basic

Subclasses of TableHeaderUI in javax.swing.plaf.basic
 class BasicTableHeaderUI
BasicTableHeaderUI implementation

Uses of TableHeaderUI in javax.swing.plaf.multi

Subclasses of TableHeaderUI in javax.swing.plaf.multi
 class MultiTableHeaderUI
MultiTableHeaderUI implementation

Uses of TableHeaderUI in javax.swing.table

Methods in javax.swing.table that return TableHeaderUI
 TableHeaderUI JTableHeader.getUI()
Returns the look and feel (L&F) object that renders this component.

Methods in javax.swing.table with parameters of type TableHeaderUI
 void JTableHeader.setUI(TableHeaderUI ui)
Sets the look and feel (L&F) object that renders this component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.TableUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.TableUI

Packages that use TableUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of TableUI in javax.swing

Methods in javax.swing that return TableUI
 TableUI JTable.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type TableUI
 void JTable.setUI(TableUI ui)
Sets the L&F object that renders this component and repaints.

Uses of TableUI in javax.swing.plaf.basic

Subclasses of TableUI in javax.swing.plaf.basic
 class BasicTableUI
BasicTableUI implementation

Uses of TableUI in javax.swing.plaf.multi

Subclasses of TableUI in javax.swing.plaf.multi
 class MultiTableUI
MultiTableUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.TextUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.TextUI

Packages that use TextUI
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TextUI in javax.swing.plaf.basic

Subclasses of TextUI in javax.swing.plaf.basic
class | BasicEditorPaneUI Provides the look and feel for a JEditorPane.
class | BasicPasswordFieldUI Provides the Windows look and feel for a password field.
class | BasicTextAreaUI Provides the look and feel for a plain text editor.
class | BasicTextFieldUI Basis of a look and feel for a JTextField.
class | BasicTextPaneUI Provides the look and feel for a styled text editor.
class | BasicTextUI Basis of a text components look-and-feel.

Uses of TextUI in javax.swing.plaf.metal

Subclasses of TextUI in javax.swing.plaf.metal
 class MetalTextFieldUI
Basis of a look and feel for a JTextField.

Uses of TextUI in javax.swing.plaf.multi

Subclasses of TextUI in javax.swing.plaf.multi
 class MultiTextUI
MultiTextUI implementation

Uses of TextUI in javax.swing.text

Subclasses of TextUI in javax.swing.text
 class DefaultTextUI
Deprecated.

Methods in javax.swing.text that return TextUI
 TextUI JTextComponent.getUI()
Fetches the user-interface factory for this text-oriented editor.

Methods in javax.swing.text with parameters of type TextUI
 void JTextComponent.setUI(TextUI ui)
Sets the user-interface factory for this text-oriented editor

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ToolBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ToolBarUI

Packages that use ToolBarUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ToolBarUI in javax.swing

Methods in javax.swing that return ToolBarUI
 ToolBarUI JToolBar.getUI()
Returns the toolbar's current UI.

Methods in javax.swing with parameters of type ToolBarUI
 void JToolBar.setUI(ToolBarUI ui)
Sets the L&F object that renders this component.

Uses of ToolBarUI in javax.swing.plaf.basic

Subclasses of ToolBarUI in javax.swing.plaf.basic
 class BasicToolBarUI
A Basic L&F implementation of ToolBarUI.

Uses of ToolBarUI in javax.swing.plaf.metal

Subclasses of ToolBarUI in javax.swing.plaf.metal
 class MetalToolBarUI
A Metal Look and Feel implementation of ToolBarUI.

Uses of ToolBarUI in javax.swing.plaf.multi

Subclasses of ToolBarUI in javax.swing.plaf.multi
 class MultiToolBarUI
MultiToolBarUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ToolTipUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ToolTipUI

Packages that use ToolTipUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ToolTipUI in javax.swing

Methods in javax.swing that return ToolTipUI
 ToolTipUI JToolTip.getUI()
Returns the L&F object that renders this component.

Uses of ToolTipUI in javax.swing.plaf.basic

Subclasses of ToolTipUI in javax.swing.plaf.basic
 class BasicToolTipUI
Standard tool tip L&F.

Uses of ToolTipUI in javax.swing.plaf.metal

Subclasses of ToolTipUI in javax.swing.plaf.metal
 class MetalToolTipUI
A Metal L&F extension of BasicToolTipUI.

Uses of ToolTipUI in javax.swing.plaf.multi

Subclasses of ToolTipUI in javax.swing.plaf.multi
 class MultiToolTipUI
MultiToolTipUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.TreeUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.TreeUI

Packages that use TreeUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of TreeUI in javax.swing

Methods in javax.swing that return TreeUI
 TreeUI JTree.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type TreeUI
 void JTree.setUI(TreeUI ui)
Sets the L&F object that renders this component.

Uses of TreeUI in javax.swing.plaf.basic

Subclasses of TreeUI in javax.swing.plaf.basic
 class BasicTreeUI
The basic L&F for a hierarchical data structure.

Uses of TreeUI in javax.swing.plaf.metal

Subclasses of TreeUI in javax.swing.plaf.metal
 class MetalTreeUI
MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.

Uses of TreeUI in javax.swing.plaf.multi

Subclasses of TreeUI in javax.swing.plaf.multi
 class MultiTreeUI
MultiTreeUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.ViewportUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.ViewportUI

Packages that use ViewportUI
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

Uses of ViewportUI in javax.swing

Methods in javax.swing that return ViewportUI
 ViewportUI JViewport.getUI()
Returns the L&F object that renders this component.

Methods in javax.swing with parameters of type ViewportUI
 void JViewport.setUI(ViewportUI ui)
Sets the L&F object that renders this component.

Uses of ViewportUI in javax.swing.plaf.basic

Subclasses of ViewportUI in javax.swing.plaf.basic
 class BasicViewportUI
BasicViewport implementation

Uses of ViewportUI in javax.swing.plaf.multi

Subclasses of ViewportUI in javax.swing.plaf.multi
 class MultiViewportUI
MultiViewportUI implementation

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.plaf.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.plaf.UIResource

Packages that use UIResource
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of UIResource in javax.swing

Classes in javax.swing that implement UIResource
static class | DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
protected class | JScrollPane.ScrollBar By default JScrollPane creates scrollbars that are instances of this class.
static class | ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.

Uses of UIResource in javax.swing.plaf

Classes in javax.swing.plaf that implement UIResource
class | ActionMapUIResource A subclass of javax.swing.ActionMap that implements UIResource.
class | BorderUIResource
static class | BorderUIResource.BevelBorderUIResource
static class | BorderUIResource.CompoundBorderUIResource
static class | BorderUIResource.EmptyBorderUIResource
static class | BorderUIResource.EtchedBorderUIResource
static class | BorderUIResource.LineBorderUIResource
static class | BorderUIResource.MatteBorderUIResource
static class | BorderUIResource.TitledBorderUIResource
class | ColorUIResource
class | ComponentInputMapUIResource A subclass of javax.swing.ComponentInputMap that implements UIResource.
class | DimensionUIResource
class | FontUIResource A subclass of java.awt.Font that implements UIResource.
class | IconUIResource
class | InputMapUIResource A subclass of javax.swing.InputMap that implements UIResource.
class | InsetsUIResource

Uses of UIResource in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement UIResource
static class | BasicBorders.ButtonBorder
static class | BasicBorders.FieldBorder
static class | BasicBorders.MarginBorder
static class | BasicBorders.MenuBarBorder
static class | BasicBorders.RadioButtonBorder
static class | BasicBorders.SplitPaneBorder Draws the border around the splitpane.
static class | BasicBorders.ToggleButtonBorder
static class | BasicComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
static class | BasicComboBoxRenderer.UIResource A subclass of BasicComboBoxRenderer that implements UIResource.
static class | BasicTextUI.BasicCaret
static class | BasicTextUI.BasicHighlighter
class | DefaultMenuLayout The default layout manager for Popup menus and menubars.

Uses of UIResource in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement UIResource
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder
class | MetalCheckBoxIcon CheckboxIcon implementation for OrganicCheckBoxUI
static class | MetalComboBoxEditor.UIResource A subclass of BasicComboBoxEditor that implements UIResource.
static class | MetalIconFactory.PaletteCloseIcon Defines an icon for Palette close

Uses of UIResource in javax.swing.table

Classes in javax.swing.table that implement UIResource
static class DefaultTableCellRenderer.UIResource
A subclass of DefaultTableCellRenderer that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ColorChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ColorChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ColorChooserUI
Direct Known Subclasses:
BasicColorChooserUI, MultiColorChooserUI
public abstract class ColorChooserUI
extends ComponentUI

Pluggable look and feel interface for JColorChooser.

Constructor Summary
ColorChooserUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ColorChooserUI

public ColorChooserUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ColorUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ColorUIResource

java.lang.Object
  |
  +--java.awt.Color
        |
        +--javax.swing.plaf.ColorUIResource
All Implemented Interfaces:
Paint, Serializable, Transparency, UIResource
public class ColorUIResource
extends Color
implements UIResource

See Also:
Serialized Form

Fields inherited from class java.awt.Color
black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
Constructor Summary
ColorUIResource(Color c)
ColorUIResource(float r, float g, float b)
ColorUIResource(int rgb)
ColorUIResource(int r, int g, int b)
Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ColorUIResource

public ColorUIResource(int r,
                       int g,
                       int b)

ColorUIResource

public ColorUIResource(int rgb)

ColorUIResource

public ColorUIResource(float r,
                       float g,
                       float b)

ColorUIResource

public ColorUIResource(Color c)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComboBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ComboBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ComboBoxUI
Direct Known Subclasses:
BasicComboBoxUI, MultiComboBoxUI
public abstract class ComboBoxUI
extends ComponentUI

Pluggable look and feel interface for JComboBox.

Constructor Summary
ComboBoxUI()
Method Summary
abstract boolean | isFocusTraversable(JComboBox c) Determine whether or not the combo box itself is traversable
abstract boolean | isPopupVisible(JComboBox c) Determine the visibility of the popup
abstract void | setPopupVisible(JComboBox c, boolean v) Set the visiblity of the popup
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComboBoxUI

public ComboBoxUI()
Method Detail

setPopupVisible

public abstract void setPopupVisible(JComboBox c,
                                     boolean v)
Set the visiblity of the popup

isPopupVisible

public abstract boolean isPopupVisible(JComboBox c)
Determine the visibility of the popup

isFocusTraversable

public abstract boolean isFocusTraversable(JComboBox c)
Determine whether or not the combo box itself is traversable
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentInputMapUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ComponentInputMapUIResource

java.lang.Object
  |
  +--javax.swing.InputMap
        |
        +--javax.swing.ComponentInputMap
              |
              +--javax.swing.plaf.ComponentInputMapUIResource
All Implemented Interfaces:
Serializable, UIResource
public class ComponentInputMapUIResource
extends ComponentInputMap
implements UIResource

A subclass of javax.swing.ComponentInputMap that implements UIResource. UI classes which provide a ComponentInputMap should use this class.

See Also:
Serialized Form

Constructor Summary
ComponentInputMapUIResource(JComponent component)
Methods inherited from class javax.swing.ComponentInputMap
clear, getComponent, put, remove, setParent
Methods inherited from class javax.swing.InputMap
allKeys, get, getParent, keys, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComponentInputMapUIResource

public ComponentInputMapUIResource(JComponent component)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ComponentUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
Direct Known Subclasses:
ButtonUI, ColorChooserUI, ComboBoxUI, DesktopIconUI, DesktopPaneUI, FileChooserUI, InternalFrameUI, LabelUI, ListUI, MenuBarUI, OptionPaneUI, PanelUI, PopupMenuUI, ProgressBarUI, RootPaneUI, ScrollBarUI, ScrollPaneUI, SeparatorUI, SliderUI, SplitPaneUI, TabbedPaneUI, TableHeaderUI, TableUI, TextUI, ToolBarUI, ToolTipUI, TreeUI, ViewportUI
public abstract class ComponentUI
extends Object

Constructor Summary
ComponentUI()
Method Summary
boolean | contains(JComponent c, int x, int y)
static ComponentUI | createUI(JComponent c)
Accessible | getAccessibleChild(JComponent c, int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount(JComponent c) Returns the number of accessible children in the object.
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
void | uninstallUI(JComponent c)
void | update(Graphics g, JComponent c)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComponentUI

public ComponentUI()
Method Detail

installUI

public void installUI(JComponent c)

uninstallUI

public void uninstallUI(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)

update

public void update(Graphics g,
                   JComponent c)

getPreferredSize

public Dimension getPreferredSize(JComponent c)

getMinimumSize

public Dimension getMinimumSize(JComponent c)

getMaximumSize

public Dimension getMaximumSize(JComponent c)

contains

public boolean contains(JComponent c,
                        int x,
                        int y)

createUI

public static ComponentUI createUI(JComponent c)

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent c)
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChildrenCount() instead of using this method.
Returns:
the number of accessible children in the object.
See Also:
getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent c,
                                     int i)
Return the nth Accessible child of the object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChild() instead of using this method.
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompoundBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.CompoundBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.CompoundBorder
              |
              +--javax.swing.plaf.BorderUIResource.CompoundBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.CompoundBorderUIResource
extends CompoundBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.CompoundBorder
insideBorder, outsideBorder
Constructor Summary
BorderUIResource.CompoundBorderUIResource(Border outsideBorder, Border insideBorder)
Methods inherited from class javax.swing.border.CompoundBorder
getBorderInsets, getBorderInsets, getInsideBorder, getOutsideBorder, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.CompoundBorderUIResource

public BorderUIResource.CompoundBorderUIResource(Border outsideBorder,
                                                 Border insideBorder)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DesktopIconUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class DesktopIconUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopIconUI
Direct Known Subclasses:
BasicDesktopIconUI, MultiDesktopIconUI
public abstract class DesktopIconUI
extends ComponentUI

Pluggable look and feel interface for JDesktopIcon.

Constructor Summary
DesktopIconUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DesktopIconUI

public DesktopIconUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DesktopPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class DesktopPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopPaneUI
Direct Known Subclasses:
BasicDesktopPaneUI, MultiDesktopPaneUI
public abstract class DesktopPaneUI
extends ComponentUI

Pluggable look and feel interface for JDesktopPane.

Constructor Summary
DesktopPaneUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DesktopPaneUI

public DesktopPaneUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DimensionUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class DimensionUIResource

java.lang.Object
  |
  +--java.awt.geom.Dimension2D
        |
        +--java.awt.Dimension
              |
              +--javax.swing.plaf.DimensionUIResource
All Implemented Interfaces:
Cloneable, Serializable, UIResource
public class DimensionUIResource
extends Dimension
implements UIResource

See Also:
Serialized Form

Fields inherited from class java.awt.Dimension
height, width
Constructor Summary
DimensionUIResource(int width, int height)
Methods inherited from class java.awt.Dimension
equals, getHeight, getSize, getWidth, hashCode, setSize, setSize, setSize, toString
Methods inherited from class java.awt.geom.Dimension2D
clone, setSize
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DimensionUIResource

public DimensionUIResource(int width,
                           int height)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EmptyBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.EmptyBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EmptyBorder
              |
              +--javax.swing.plaf.BorderUIResource.EmptyBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.EmptyBorderUIResource
extends EmptyBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top
Constructor Summary
BorderUIResource.EmptyBorderUIResource(Insets insets)
BorderUIResource.EmptyBorderUIResource(int top, int left, int bottom, int right)
Methods inherited from class javax.swing.border.EmptyBorder
getBorderInsets, getBorderInsets, getBorderInsets, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.EmptyBorderUIResource

public BorderUIResource.EmptyBorderUIResource(int top,
                                              int left,
                                              int bottom,
                                              int right)

BorderUIResource.EmptyBorderUIResource

public BorderUIResource.EmptyBorderUIResource(Insets insets)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EtchedBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.EtchedBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EtchedBorder
              |
              +--javax.swing.plaf.BorderUIResource.EtchedBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.EtchedBorderUIResource
extends EtchedBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.EtchedBorder
etchType, highlight, LOWERED, RAISED, shadow
Constructor Summary
BorderUIResource.EtchedBorderUIResource()
BorderUIResource.EtchedBorderUIResource(Color highlight, Color shadow)
BorderUIResource.EtchedBorderUIResource(int etchType)
BorderUIResource.EtchedBorderUIResource(int etchType, Color highlight, Color shadow)
Methods inherited from class javax.swing.border.EtchedBorder
getBorderInsets, getBorderInsets, getEtchType, getHighlightColor, getHighlightColor, getShadowColor, getShadowColor, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.EtchedBorderUIResource

public BorderUIResource.EtchedBorderUIResource()

BorderUIResource.EtchedBorderUIResource

public BorderUIResource.EtchedBorderUIResource(int etchType)

BorderUIResource.EtchedBorderUIResource

public BorderUIResource.EtchedBorderUIResource(Color highlight,
                                               Color shadow)

BorderUIResource.EtchedBorderUIResource

public BorderUIResource.EtchedBorderUIResource(int etchType,
                                               Color highlight,
                                               Color shadow)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class FileChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.FileChooserUI
Direct Known Subclasses:
BasicFileChooserUI, MultiFileChooserUI
public abstract class FileChooserUI
extends ComponentUI

Pluggable look and feel interface for JFileChooser

Constructor Summary
FileChooserUI()
Method Summary
abstract void | ensureFileIsVisible(JFileChooser fc, File f)
abstract FileFilter | getAcceptAllFileFilter(JFileChooser fc)
abstract String | getApproveButtonText(JFileChooser fc)
abstract String | getDialogTitle(JFileChooser fc)
abstract FileView | getFileView(JFileChooser fc)
abstract void | rescanCurrentDirectory(JFileChooser fc)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileChooserUI

public FileChooserUI()
Method Detail

getAcceptAllFileFilter

public abstract FileFilter getAcceptAllFileFilter(JFileChooser fc)

getFileView

public abstract FileView getFileView(JFileChooser fc)

getApproveButtonText

public abstract String getApproveButtonText(JFileChooser fc)

getDialogTitle

public abstract String getDialogTitle(JFileChooser fc)

rescanCurrentDirectory

public abstract void rescanCurrentDirectory(JFileChooser fc)

ensureFileIsVisible

public abstract void ensureFileIsVisible(JFileChooser fc,
                                         File f)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class FontUIResource

java.lang.Object
  |
  +--java.awt.Font
        |
        +--javax.swing.plaf.FontUIResource
All Implemented Interfaces:
Serializable, UIResource
public class FontUIResource
extends Font
implements UIResource

A subclass of java.awt.Font that implements UIResource. UI classes which set default font properties should use this class.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
UIResource, Serialized Form

Fields inherited from class java.awt.Font
BOLD, CENTER_BASELINE, HANGING_BASELINE, ITALIC, name, PLAIN, pointSize, ROMAN_BASELINE, size, style, TRUETYPE_FONT
Constructor Summary
FontUIResource(Font font)
FontUIResource(String name, int style, int size)
Methods inherited from class java.awt.Font
canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, equals, finalize, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getName, getNumGlyphs, getPeer, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hashCode, hasUniformLineMetrics, isBold, isItalic, isPlain, toString
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FontUIResource

public FontUIResource(String name,
                      int style,
                      int size)

FontUIResource

public FontUIResource(Font font)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IconUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class IconUIResource

java.lang.Object
  |
  +--javax.swing.plaf.IconUIResource
All Implemented Interfaces:
Icon, Serializable, UIResource
public class IconUIResource
extends Object
implements Icon, UIResource, Serializable

See Also:
Serialized Form

Constructor Summary
IconUIResource(Icon delegate)
Creates a UIResource icon object which wraps an existing Icon instance.
Method Summary
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IconUIResource

public IconUIResource(Icon delegate)
Creates a UIResource icon object which wraps an existing Icon instance.
Parameters:
delegate - the icon being wrapped
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputMapUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class InputMapUIResource

java.lang.Object
  |
  +--javax.swing.InputMap
        |
        +--javax.swing.plaf.InputMapUIResource
All Implemented Interfaces:
Serializable, UIResource
public class InputMapUIResource
extends InputMap
implements UIResource

A subclass of javax.swing.InputMap that implements UIResource. UI classes which provide a InputMap should use this class.

See Also:
Serialized Form

Constructor Summary
InputMapUIResource()
Methods inherited from class javax.swing.InputMap
allKeys, clear, get, getParent, keys, put, remove, setParent, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputMapUIResource

public InputMapUIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsetsUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class InsetsUIResource

java.lang.Object
  |
  +--java.awt.Insets
        |
        +--javax.swing.plaf.InsetsUIResource
All Implemented Interfaces:
Cloneable, Serializable, UIResource
public class InsetsUIResource
extends Insets
implements UIResource

See Also:
Serialized Form

Fields inherited from class java.awt.Insets
bottom, left, right, top
Constructor Summary
InsetsUIResource(int top, int left, int bottom, int right)
Methods inherited from class java.awt.Insets
clone, equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

InsetsUIResource

public InsetsUIResource(int top,
                        int left,
                        int bottom,
                        int right)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class InternalFrameUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.InternalFrameUI
Direct Known Subclasses:
BasicInternalFrameUI, MultiInternalFrameUI
public abstract class InternalFrameUI
extends ComponentUI

Pluggable look and feel interface for JInternalFrame.

Constructor Summary
InternalFrameUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InternalFrameUI

public InternalFrameUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LabelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class LabelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.LabelUI
Direct Known Subclasses:
BasicLabelUI, MultiLabelUI
public abstract class LabelUI
extends ComponentUI

Pluggable look and feel interface for JLabel.

Constructor Summary
LabelUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LabelUI

public LabelUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.LineBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.LineBorder
              |
              +--javax.swing.plaf.BorderUIResource.LineBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.LineBorderUIResource
extends LineBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.LineBorder
lineColor, roundedCorners, thickness
Constructor Summary
BorderUIResource.LineBorderUIResource(Color color)
BorderUIResource.LineBorderUIResource(Color color, int thickness)
Methods inherited from class javax.swing.border.LineBorder
createBlackLineBorder, createGrayLineBorder, getBorderInsets, getBorderInsets, getLineColor, getRoundedCorners, getThickness, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.LineBorderUIResource

public BorderUIResource.LineBorderUIResource(Color color)

BorderUIResource.LineBorderUIResource

public BorderUIResource.LineBorderUIResource(Color color,
                                             int thickness)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ListUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ListUI
Direct Known Subclasses:
BasicListUI, MultiListUI
public abstract class ListUI
extends ComponentUI

The JList pluggable look and feel delegate. This interface adds methods that allow the JList component to map locations, e.g. mouse coordinates, to list cells and from cell indices to the bounds of the cell.

Constructor Summary
ListUI()
Method Summary
abstract Rectangle | getCellBounds(JList list, int index1, int index2) Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
abstract Point | indexToLocation(JList list, int index) Returns the origin of the specified item in JList coordinates, null if index isn't valid.
abstract int | locationToIndex(JList list, Point location) Convert a point in JList coordinates to the index of the cell at that location.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ListUI

public ListUI()
Method Detail

locationToIndex

public abstract int locationToIndex(JList list,
                                    Point location)
Convert a point in JList coordinates to the index of the cell at that location. Returns -1 if there's no cell the specified location.
Parameters:
location - The JList relative coordinates of the cell
Returns:
The index of the cell at location, or -1.

indexToLocation

public abstract Point indexToLocation(JList list,
                                      int index)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.
Parameters:
index - The index of the JList cell.
Returns:
The origin of the index'th cell.

getCellBounds

public abstract Rectangle getCellBounds(JList list,
                                        int index1,
                                        int index2)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
Parameters:
index - The index of the JList cell.
Returns:
The bounds of the index'th cell.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatteBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.MatteBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EmptyBorder
              |
              +--javax.swing.border.MatteBorder
                    |
                    +--javax.swing.plaf.BorderUIResource.MatteBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.MatteBorderUIResource
extends MatteBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.MatteBorder
color, tileIcon
Fields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top
Constructor Summary
BorderUIResource.MatteBorderUIResource(Icon tileIcon)
BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)
Methods inherited from class javax.swing.border.MatteBorder
getBorderInsets, getBorderInsets, getBorderInsets, getMatteColor, getTileIcon, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.MatteBorderUIResource

public BorderUIResource.MatteBorderUIResource(int top,
                                              int left,
                                              int bottom,
                                              int right,
                                              Color color)

BorderUIResource.MatteBorderUIResource

public BorderUIResource.MatteBorderUIResource(int top,
                                              int left,
                                              int bottom,
                                              int right,
                                              Icon tileIcon)

BorderUIResource.MatteBorderUIResource

public BorderUIResource.MatteBorderUIResource(Icon tileIcon)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class MenuBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.MenuBarUI
Direct Known Subclasses:
BasicMenuBarUI, MultiMenuBarUI
public abstract class MenuBarUI
extends ComponentUI

Pluggable look and feel interface for JMenuBar.

Constructor Summary
MenuBarUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MenuBarUI

public MenuBarUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuItemUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class MenuItemUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
Direct Known Subclasses:
BasicMenuItemUI, MultiMenuItemUI
public abstract class MenuItemUI
extends ButtonUI

Pluggable look and feel interface for JMenuItem.

Constructor Summary
MenuItemUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MenuItemUI

public MenuItemUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.plaf.metal Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.plaf.metal

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction
    • class javax.swing.border.AbstractBorder (implements javax.swing.border.Border, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalBorders.ButtonBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder
        • class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder
      • class javax.swing.plaf.metal.MetalBorders.Flush3DBorder (implements javax.swing.plaf.UIResource)
        • class javax.swing.plaf.metal.MetalBorders.TextFieldBorder
      • class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.MenuBarBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.MenuItemBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.PaletteBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder (implements javax.swing.plaf.UIResource)
      • class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
      • class javax.swing.plaf.metal.MetalBorders.ToolBarBorder (implements javax.swing.SwingConstants, javax.swing.plaf.UIResource)
    • class javax.swing.AbstractListModel (implements javax.swing.ListModel, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel (implements javax.swing.ComboBoxModel)
      • class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel (implements javax.swing.ComboBoxModel, java.beans.PropertyChangeListener)
    • class javax.swing.plaf.basic.BasicComboBoxEditor (implements javax.swing.ComboBoxEditor, java.awt.event.FocusListener)
      • class javax.swing.plaf.metal.MetalComboBoxEditor
        • class javax.swing.plaf.metal.MetalComboBoxEditor.UIResource (implements javax.swing.plaf.UIResource)
    • class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager (implements java.awt.LayoutManager)
      • class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager
    • class javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener
    • class javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler (implements java.beans.PropertyChangeListener)
      • class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener
    • class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout (implements java.awt.LayoutManager)
      • class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
    • class javax.swing.plaf.basic.BasicToolBarUI.DockingListener (implements javax.swing.event.MouseInputListener)
      • class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
            • class javax.swing.JButton (implements javax.accessibility.Accessible)
              • class javax.swing.plaf.basic.BasicArrowButton (implements javax.swing.SwingConstants)
                • class javax.swing.plaf.metal.MetalScrollButton
              • class javax.swing.plaf.metal.MetalComboBoxButton
          • class javax.swing.plaf.basic.BasicInternalFrameTitlePane
            • class javax.swing.plaf.metal.MetalInternalFrameTitlePane
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.DefaultListCellRenderer (implements javax.swing.ListCellRenderer, java.io.Serializable)
              • class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer
              • class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer
          • class javax.swing.JPopupMenu (implements javax.accessibility.Accessible, javax.swing.MenuElement)
            • class javax.swing.plaf.basic.BasicComboPopup (implements javax.swing.plaf.basic.ComboPopup)
              • class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.ButtonUI
        • class javax.swing.plaf.basic.BasicButtonUI
          • class javax.swing.plaf.basic.BasicToggleButtonUI
            • class javax.swing.plaf.basic.BasicRadioButtonUI
              • class javax.swing.plaf.metal.MetalRadioButtonUI
                • class javax.swing.plaf.metal.MetalCheckBoxUI
            • class javax.swing.plaf.metal.MetalToggleButtonUI
          • class javax.swing.plaf.metal.MetalButtonUI
      • class javax.swing.plaf.ComboBoxUI
        • class javax.swing.plaf.basic.BasicComboBoxUI
          • class javax.swing.plaf.metal.MetalComboBoxUI
      • class javax.swing.plaf.DesktopIconUI
        • class javax.swing.plaf.basic.BasicDesktopIconUI
          • class javax.swing.plaf.metal.MetalDesktopIconUI
      • class javax.swing.plaf.FileChooserUI
        • class javax.swing.plaf.basic.BasicFileChooserUI
          • class javax.swing.plaf.metal.MetalFileChooserUI
      • class javax.swing.plaf.InternalFrameUI
        • class javax.swing.plaf.basic.BasicInternalFrameUI
          • class javax.swing.plaf.metal.MetalInternalFrameUI
      • class javax.swing.plaf.LabelUI
        • class javax.swing.plaf.basic.BasicLabelUI (implements java.beans.PropertyChangeListener)
          • class javax.swing.plaf.metal.MetalLabelUI
      • class javax.swing.plaf.ProgressBarUI
        • class javax.swing.plaf.basic.BasicProgressBarUI
          • class javax.swing.plaf.metal.MetalProgressBarUI
      • class javax.swing.plaf.ScrollBarUI
        • class javax.swing.plaf.basic.BasicScrollBarUI (implements java.awt.LayoutManager, javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalScrollBarUI
      • class javax.swing.plaf.ScrollPaneUI
        • class javax.swing.plaf.basic.BasicScrollPaneUI (implements javax.swing.ScrollPaneConstants)
          • class javax.swing.plaf.metal.MetalScrollPaneUI
      • class javax.swing.plaf.SeparatorUI
        • class javax.swing.plaf.basic.BasicSeparatorUI
          • class javax.swing.plaf.metal.MetalSeparatorUI
            • class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
      • class javax.swing.plaf.SliderUI
        • class javax.swing.plaf.basic.BasicSliderUI
          • class javax.swing.plaf.metal.MetalSliderUI
      • class javax.swing.plaf.SplitPaneUI
        • class javax.swing.plaf.basic.BasicSplitPaneUI
          • class javax.swing.plaf.metal.MetalSplitPaneUI
      • class javax.swing.plaf.TabbedPaneUI
        • class javax.swing.plaf.basic.BasicTabbedPaneUI (implements javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalTabbedPaneUI
      • class javax.swing.plaf.TextUI
        • class javax.swing.plaf.basic.BasicTextUI (implements javax.swing.text.ViewFactory)
          • class javax.swing.plaf.basic.BasicTextFieldUI
            • class javax.swing.plaf.metal.MetalTextFieldUI
      • class javax.swing.plaf.ToolBarUI
        • class javax.swing.plaf.basic.BasicToolBarUI (implements javax.swing.SwingConstants)
          • class javax.swing.plaf.metal.MetalToolBarUI
      • class javax.swing.plaf.ToolTipUI
        • class javax.swing.plaf.basic.BasicToolTipUI
          • class javax.swing.plaf.metal.MetalToolTipUI
      • class javax.swing.plaf.TreeUI
        • class javax.swing.plaf.basic.BasicTreeUI
          • class javax.swing.plaf.metal.MetalTreeUI
    • class javax.swing.LookAndFeel
      • class javax.swing.plaf.basic.BasicLookAndFeel (implements java.io.Serializable)
        • class javax.swing.plaf.metal.MetalLookAndFeel
    • class javax.swing.plaf.metal.MetalBorders
    • class javax.swing.plaf.metal.MetalCheckBoxIcon (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.metal.MetalComboBoxIcon (implements javax.swing.Icon, java.io.Serializable)
    • class javax.swing.plaf.metal.MetalIconFactory (implements java.io.Serializable)
    • class javax.swing.plaf.metal.MetalIconFactory.FileIcon16 (implements javax.swing.Icon, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon
    • class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16 (implements javax.swing.Icon, java.io.Serializable)
      • class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon
    • class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon (implements javax.swing.Icon, java.io.Serializable, javax.swing.plaf.UIResource)
    • class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon (implements javax.swing.Icon, java.io.Serializable)
    • class javax.swing.plaf.metal.MetalTheme
      • class javax.swing.plaf.metal.DefaultMetalTheme
    • class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener (implements java.awt.event.ContainerListener)
    • class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener (implements java.beans.PropertyChangeListener)
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
      • class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.plaf.metal

Provides user interface objects built according to the ``metal'' look-and-feel.

See:
Description

Class Summary
DefaultMetalTheme | This class describes the default Metal Theme.
MetalBorders | Factory object that can vend Borders appropriate for the metal L & F.
MetalBorders.ButtonBorder |
MetalBorders.Flush3DBorder |
MetalBorders.InternalFrameBorder |
MetalBorders.MenuBarBorder |
MetalBorders.MenuItemBorder |
MetalBorders.OptionDialogBorder |
MetalBorders.PaletteBorder | Border for a Palatte.
MetalBorders.PopupMenuBorder |
MetalBorders.RolloverButtonBorder |
MetalBorders.ScrollPaneBorder |
MetalBorders.TableHeaderBorder | Border for a Table Header
MetalBorders.TextFieldBorder |
MetalBorders.ToggleButtonBorder |
MetalBorders.ToolBarBorder |
MetalButtonUI | MetalButtonUI implementation
MetalCheckBoxIcon | CheckboxIcon implementation for OrganicCheckBoxUI
MetalCheckBoxUI | CheckboxUI implementation for MetalCheckboxUI
MetalComboBoxButton | JButton subclass to help out MetalComboBoxUI
MetalComboBoxEditor | The default editor for Metal editable combo boxes
MetalComboBoxEditor.UIResource | A subclass of BasicComboBoxEditor that implements UIResource.
MetalComboBoxIcon | This utility class draws the horizontal bars which indicate a MetalComboBox
MetalComboBoxUI | Metal UI for JComboBox
MetalDesktopIconUI | Metal desktop icon.
MetalFileChooserUI | Metal L&F implementation of a FileChooser.
MetalIconFactory | Factory object that can vend Icons appropriate for Metal.
MetalIconFactory.FileIcon16 | Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.FolderIcon16 | Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.PaletteCloseIcon | Defines an icon for Palette close
MetalIconFactory.TreeControlIcon | Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.TreeFolderIcon | Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.TreeLeafIcon |
MetalInternalFrameTitlePane | Class that manages a JLF title bar
MetalInternalFrameUI | Metal implementation of JInternalFrame.
MetalLabelUI | A Windows L&F implementation of LabelUI.
MetalLookAndFeel | Implements The Metal Look and Feel.
MetalPopupMenuSeparatorUI | A Metal L&F implementation of PopupMenuSeparatorUI.
MetalProgressBarUI | The Metal implementation of ProgressBarUI.
MetalRadioButtonUI | RadioButtonUI implementation for MetalRadioButtonUI
MetalScrollBarUI | Implementation of ScrollBarUI for the Metal Look and Feel
MetalScrollButton | JButton object for Metal scrollbar arrows.
MetalScrollPaneUI | A Metal L&F implementation of ScrollPaneUI.
MetalSeparatorUI | A Metal L&F implementation of SeparatorUI.
MetalSliderUI | A Java L&F implementation of SliderUI.
MetalSplitPaneUI | Metal split pane.
MetalTabbedPaneUI | The Metal subclass of BasicTabbedPaneUI.
MetalTextFieldUI | Basis of a look and feel for a JTextField.
MetalTheme | This interface acts as a generic way to describe the colors used by Metal.
MetalToggleButtonUI | MetalToggleButton implementation
MetalToolBarUI | A Metal Look and Feel implementation of ToolBarUI.
MetalToolTipUI | A Metal L&F extension of BasicToolTipUI.
MetalTreeUI | MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw.

Package javax.swing.plaf.metal Description

Provides user interface objects built according to the ``metal'' look-and-feel.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.plaf.metal

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.plaf.metal

Packages that use javax.swing.plaf.metal
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Classes in javax.swing.plaf.metal used by javax.swing.plaf.metal
MetalBorders.ButtonBorder
MetalBorders.Flush3DBorder
MetalComboBoxEditor
The default editor for Metal editable combo boxes
MetalComboBoxUI
Metal UI for JComboBox
MetalComboBoxUI.MetalComboBoxLayoutManager
This inner class is marked "public" due to a compiler bug.
MetalFileChooserUI
Metal L&F implementation of a FileChooser.
MetalFileChooserUI.DirectoryComboBoxModel
Data model for a type-face selection combo-box.
MetalFileChooserUI.FilterComboBoxModel
Data model for a type-face selection combo-box.
MetalFileChooserUI.FilterComboBoxRenderer
Render different type sizes and styles.
MetalIconFactory.FileIcon16
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalIconFactory.FolderIcon16
Warning: Serialized objects of this class will not be compatible with future Swing releases.
MetalLabelUI
A Windows L&F implementation of LabelUI.
MetalRadioButtonUI
RadioButtonUI implementation for MetalRadioButtonUI
MetalScrollButton
JButton object for Metal scrollbar arrows.
MetalSeparatorUI
A Metal L&F implementation of SeparatorUI.
MetalSliderUI
A Java L&F implementation of SliderUI.
MetalTabbedPaneUI
The Metal subclass of BasicTabbedPaneUI.
MetalTheme
This interface acts as a generic way to describe the colors used by Metal.
MetalToolBarUI
A Metal Look and Feel implementation of ToolBarUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.ButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.ButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Direct Known Subclasses:
MetalBorders.RolloverButtonBorder, MetalBorders.ToggleButtonBorder
Enclosing class:
MetalBorders
public static class MetalBorders.ButtonBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected static Insets borderInsets
Constructor Summary
MetalBorders.ButtonBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

borderInsets

protected static Insets borderInsets
Constructor Detail

MetalBorders.ButtonBorder

public MetalBorders.ButtonBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.plaf.metal.DefaultMetalTheme

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.DefaultMetalTheme

No usage of javax.swing.plaf.metal.DefaultMetalTheme

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders

No usage of javax.swing.plaf.metal.MetalBorders

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.InternalFrameBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.InternalFrameBorder

No usage of javax.swing.plaf.metal.MetalBorders.InternalFrameBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.MenuBarBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.MenuBarBorder

No usage of javax.swing.plaf.metal.MetalBorders.MenuBarBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.MenuItemBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.MenuItemBorder

No usage of javax.swing.plaf.metal.MetalBorders.MenuItemBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.OptionDialogBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.OptionDialogBorder

No usage of javax.swing.plaf.metal.MetalBorders.OptionDialogBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.PaletteBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.PaletteBorder

No usage of javax.swing.plaf.metal.MetalBorders.PaletteBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.PopupMenuBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.PopupMenuBorder

No usage of javax.swing.plaf.metal.MetalBorders.PopupMenuBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder

No usage of javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder

No usage of javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.TableHeaderBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.TableHeaderBorder

No usage of javax.swing.plaf.metal.MetalBorders.TableHeaderBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.TextFieldBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.TextFieldBorder

No usage of javax.swing.plaf.metal.MetalBorders.TextFieldBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder

No usage of javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.ToolBarBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.ToolBarBorder

No usage of javax.swing.plaf.metal.MetalBorders.ToolBarBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalButtonUI

No usage of javax.swing.plaf.metal.MetalButtonUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalCheckBoxIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalCheckBoxIcon

No usage of javax.swing.plaf.metal.MetalCheckBoxIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalCheckBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalCheckBoxUI

No usage of javax.swing.plaf.metal.MetalCheckBoxUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxButton

No usage of javax.swing.plaf.metal.MetalComboBoxButton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxEditor.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxEditor.UIResource

No usage of javax.swing.plaf.metal.MetalComboBoxEditor.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxIcon

No usage of javax.swing.plaf.metal.MetalComboBoxIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup

No usage of javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener

No usage of javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalDesktopIconUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalDesktopIconUI

No usage of javax.swing.plaf.metal.MetalDesktopIconUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction

No usage of javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer

No usage of javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener

No usage of javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory

No usage of javax.swing.plaf.metal.MetalIconFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

No usage of javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

No usage of javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon

No usage of javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon

No usage of javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalInternalFrameTitlePane

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalInternalFrameTitlePane

No usage of javax.swing.plaf.metal.MetalInternalFrameTitlePane

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalInternalFrameUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalInternalFrameUI

No usage of javax.swing.plaf.metal.MetalInternalFrameUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalLookAndFeel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalLookAndFeel

No usage of javax.swing.plaf.metal.MetalLookAndFeel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalPopupMenuSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalPopupMenuSeparatorUI

No usage of javax.swing.plaf.metal.MetalPopupMenuSeparatorUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalProgressBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalProgressBarUI

No usage of javax.swing.plaf.metal.MetalProgressBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalScrollBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalScrollBarUI

No usage of javax.swing.plaf.metal.MetalScrollBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalScrollPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalScrollPaneUI

No usage of javax.swing.plaf.metal.MetalScrollPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener

No usage of javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalSplitPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalSplitPaneUI

No usage of javax.swing.plaf.metal.MetalSplitPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout

No usage of javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalTextFieldUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalTextFieldUI

No usage of javax.swing.plaf.metal.MetalTextFieldUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToggleButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToggleButtonUI

No usage of javax.swing.plaf.metal.MetalToggleButtonUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener

No usage of javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

No usage of javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener

No usage of javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToolTipUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToolTipUI

No usage of javax.swing.plaf.metal.MetalToolTipUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalTreeUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalTreeUI

No usage of javax.swing.plaf.metal.MetalTreeUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.ButtonBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.ButtonBorder

Packages that use MetalBorders.ButtonBorder
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalBorders.ButtonBorder in javax.swing.plaf.metal

Subclasses of MetalBorders.ButtonBorder in javax.swing.plaf.metal
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ToggleButtonBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalBorders.Flush3DBorder

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalBorders.Flush3DBorder

Packages that use MetalBorders.Flush3DBorder
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalBorders.Flush3DBorder in javax.swing.plaf.metal

Subclasses of MetalBorders.Flush3DBorder in javax.swing.plaf.metal
static class MetalBorders.TextFieldBorder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxEditor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxEditor

Packages that use MetalComboBoxEditor
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalComboBoxEditor in javax.swing.plaf.metal

Subclasses of MetalComboBoxEditor in javax.swing.plaf.metal
static class MetalComboBoxEditor.UIResource
A subclass of BasicComboBoxEditor that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxUI

Packages that use MetalComboBoxUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalComboBoxUI in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type MetalComboBoxUI
MetalComboBoxUI.MetalPropertyChangeListener()
MetalComboBoxUI.MetalComboBoxLayoutManager()
MetalComboBoxUI.MetalComboPopup(JComboBox cBox)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager

Packages that use MetalComboBoxUI.MetalComboBoxLayoutManager
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalComboBoxUI.MetalComboBoxLayoutManager in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type MetalComboBoxUI.MetalComboBoxLayoutManager
 void MetalComboBoxUI.layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI

Packages that use MetalFileChooserUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalFileChooserUI in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type MetalFileChooserUI
MetalFileChooserUI.SingleClickListener(JList list)
MetalFileChooserUI.FileRenderer()
MetalFileChooserUI.DirectoryComboBoxModel()
MetalFileChooserUI.FilterComboBoxRenderer()
MetalFileChooserUI.FilterComboBoxModel()
MetalFileChooserUI.DirectoryComboBoxAction()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel

Packages that use MetalFileChooserUI.DirectoryComboBoxModel
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalFileChooserUI.DirectoryComboBoxModel in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return MetalFileChooserUI.DirectoryComboBoxModel
protected  MetalFileChooserUI.DirectoryComboBoxModel MetalFileChooserUI.createDirectoryComboBoxModel(JFileChooser fc)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel

Packages that use MetalFileChooserUI.FilterComboBoxModel
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalFileChooserUI.FilterComboBoxModel in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return MetalFileChooserUI.FilterComboBoxModel
protected  MetalFileChooserUI.FilterComboBoxModel MetalFileChooserUI.createFilterComboBoxModel()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer

Packages that use MetalFileChooserUI.FilterComboBoxRenderer
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalFileChooserUI.FilterComboBoxRenderer in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal that return MetalFileChooserUI.FilterComboBoxRenderer
protected  MetalFileChooserUI.FilterComboBoxRenderer MetalFileChooserUI.createFilterComboBoxRenderer()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.FileIcon16

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.FileIcon16

Packages that use MetalIconFactory.FileIcon16
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalIconFactory.FileIcon16 in javax.swing.plaf.metal

Subclasses of MetalIconFactory.FileIcon16 in javax.swing.plaf.metal
static class MetalIconFactory.TreeLeafIcon

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalIconFactory.FolderIcon16

Packages that use MetalIconFactory.FolderIcon16
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalIconFactory.FolderIcon16 in javax.swing.plaf.metal

Subclasses of MetalIconFactory.FolderIcon16 in javax.swing.plaf.metal
static class MetalIconFactory.TreeFolderIcon
Warning: Serialized objects of this class will not be compatible with future Swing releases.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalLabelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalLabelUI

Packages that use MetalLabelUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalLabelUI in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as MetalLabelUI
protected static MetalLabelUI MetalLabelUI.metalLabelUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalRadioButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalRadioButtonUI

Packages that use MetalRadioButtonUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalRadioButtonUI in javax.swing.plaf.metal

Subclasses of MetalRadioButtonUI in javax.swing.plaf.metal
 class MetalCheckBoxUI
CheckboxUI implementation for MetalCheckboxUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalScrollButton

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalScrollButton

Packages that use MetalScrollButton
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalScrollButton in javax.swing.plaf.metal

Fields in javax.swing.plaf.metal declared as MetalScrollButton
protected MetalScrollButton | MetalScrollBarUI.increaseButton
protected MetalScrollButton | MetalScrollBarUI.decreaseButton

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalSeparatorUI

Packages that use MetalSeparatorUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalSeparatorUI in javax.swing.plaf.metal

Subclasses of MetalSeparatorUI in javax.swing.plaf.metal
 class MetalPopupMenuSeparatorUI
A Metal L&F implementation of PopupMenuSeparatorUI.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalSliderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalSliderUI

Packages that use MetalSliderUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalSliderUI in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type MetalSliderUI
MetalSliderUI.MetalPropertyListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalTabbedPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalTabbedPaneUI

Packages that use MetalTabbedPaneUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalTabbedPaneUI in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type MetalTabbedPaneUI
MetalTabbedPaneUI.TabbedPaneLayout()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalTheme

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalTheme

Packages that use MetalTheme
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalTheme in javax.swing.plaf.metal

Subclasses of MetalTheme in javax.swing.plaf.metal
 class DefaultMetalTheme
This class describes the default Metal Theme.

Methods in javax.swing.plaf.metal with parameters of type MetalTheme
static void MetalLookAndFeel.setCurrentTheme(MetalTheme theme)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.metal.MetalToolBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.metal.MetalToolBarUI

Packages that use MetalToolBarUI
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel.

Uses of MetalToolBarUI in javax.swing.plaf.metal

Constructors in javax.swing.plaf.metal with parameters of type MetalToolBarUI
MetalToolBarUI.MetalContainerListener()
MetalToolBarUI.MetalRolloverListener()
MetalToolBarUI.MetalDockingListener(JToolBar t)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DefaultMetalTheme

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class DefaultMetalTheme

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalTheme
        |
        +--javax.swing.plaf.metal.DefaultMetalTheme
public class DefaultMetalTheme
extends MetalTheme

This class describes the default Metal Theme.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Constructor Summary
DefaultMetalTheme()
Method Summary
FontUIResource | getControlTextFont()
FontUIResource | getMenuTextFont()
String | getName()
protected ColorUIResource | getPrimary1()
protected ColorUIResource | getPrimary2()
protected ColorUIResource | getPrimary3()
protected ColorUIResource | getSecondary1()
protected ColorUIResource | getSecondary2()
protected ColorUIResource | getSecondary3()
FontUIResource | getSubTextFont()
FontUIResource | getSystemTextFont()
FontUIResource | getUserTextFont()
FontUIResource | getWindowTitleFont()
Methods inherited from class javax.swing.plaf.metal.MetalTheme
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultMetalTheme

public DefaultMetalTheme()
Method Detail

getName

public String getName()
Overrides:
getName in class MetalTheme

getPrimary1

protected ColorUIResource getPrimary1()
Overrides:
getPrimary1 in class MetalTheme

getPrimary2

protected ColorUIResource getPrimary2()
Overrides:
getPrimary2 in class MetalTheme

getPrimary3

protected ColorUIResource getPrimary3()
Overrides:
getPrimary3 in class MetalTheme

getSecondary1

protected ColorUIResource getSecondary1()
Overrides:
getSecondary1 in class MetalTheme

getSecondary2

protected ColorUIResource getSecondary2()
Overrides:
getSecondary2 in class MetalTheme

getSecondary3

protected ColorUIResource getSecondary3()
Overrides:
getSecondary3 in class MetalTheme

getControlTextFont

public FontUIResource getControlTextFont()
Overrides:
getControlTextFont in class MetalTheme

getSystemTextFont

public FontUIResource getSystemTextFont()
Overrides:
getSystemTextFont in class MetalTheme

getUserTextFont

public FontUIResource getUserTextFont()
Overrides:
getUserTextFont in class MetalTheme

getMenuTextFont

public FontUIResource getMenuTextFont()
Overrides:
getMenuTextFont in class MetalTheme

getWindowTitleFont

public FontUIResource getWindowTitleFont()
Overrides:
getWindowTitleFont in class MetalTheme

getSubTextFont

public FontUIResource getSubTextFont()
Overrides:
getSubTextFont in class MetalTheme
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DirectoryComboBoxAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.DirectoryComboBoxAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
MetalFileChooserUI
protected class MetalFileChooserUI.DirectoryComboBoxAction
extends AbstractAction

Acts when DirectoryComboBox has changed the selected item.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected MetalFileChooserUI.DirectoryComboBoxAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalFileChooserUI.DirectoryComboBoxAction

protected MetalFileChooserUI.DirectoryComboBoxAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectoryComboBoxModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.DirectoryComboBoxModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel
All Implemented Interfaces:
ComboBoxModel, ListModel, Serializable
Enclosing class:
MetalFileChooserUI
protected class MetalFileChooserUI.DirectoryComboBoxModel
extends AbstractListModel
implements ComboBoxModel

Data model for a type-face selection combo-box.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractListModel
listenerList
Constructor Summary
MetalFileChooserUI.DirectoryComboBoxModel()
Method Summary
Object | getElementAt(int index) Returns the value at the specified index.
Object | getSelectedItem() Return the selected item
int | getSize() Returns the length of the list.
void | setSelectedItem(Object selectedDirectory) Set the selected item
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener

Constructor Detail

MetalFileChooserUI.DirectoryComboBoxModel

public MetalFileChooserUI.DirectoryComboBoxModel()
Method Detail

setSelectedItem

public void setSelectedItem(Object selectedDirectory)
Description copied from interface: ComboBoxModel
Set the selected item
Specified by:
setSelectedItem in interface ComboBoxModel

getSelectedItem

public Object getSelectedItem()
Description copied from interface: ComboBoxModel
Return the selected item
Specified by:
getSelectedItem in interface ComboBoxModel

getSize

public int getSize()
Description copied from interface: ListModel
Returns the length of the list.
Specified by:
getSize in interface ListModel

getElementAt

public Object getElementAt(int index)
Description copied from interface: ListModel
Returns the value at the specified index.
Specified by:
getElementAt in interface ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileIcon16

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.FileIcon16

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.FileIcon16
All Implemented Interfaces:
Icon, Serializable
Direct Known Subclasses:
MetalIconFactory.TreeLeafIcon
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.FileIcon16
extends Object
implements Icon, Serializable

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
MetalIconFactory.FileIcon16()
Method Summary
int | getAdditionalHeight()
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
int | getShift()
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalIconFactory.FileIcon16

public MetalIconFactory.FileIcon16()
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

getShift

public int getShift()

getAdditionalHeight

public int getAdditionalHeight()

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.FileRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.DefaultListCellRenderer
                                |
                                +--javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants
Enclosing class:
MetalFileChooserUI
protected class MetalFileChooserUI.FileRenderer
extends DefaultListCellRenderer

See Also:
Serialized Form

Inner classes inherited from class javax.swing.DefaultListCellRenderer
DefaultListCellRenderer.UIResource
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.DefaultListCellRenderer
noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
protected MetalFileChooserUI.FileRenderer()
Method Summary
 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Return a component that has been configured to display the specified value.
Methods inherited from class javax.swing.DefaultListCellRenderer
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, repaint, repaint, revalidate, validate
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MetalFileChooserUI.FileRenderer

protected MetalFileChooserUI.FileRenderer()
Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Description copied from interface: ListCellRenderer
Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.
Overrides:
getListCellRendererComponent in class DefaultListCellRenderer
Following copied from interface: javax.swing.ListCellRenderer
Parameters:
list - The JList we're painting.
value - The value returned by list.getModel().getElementAt(index).
index - The cells index.
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.
Returns:
A component whose paint() method will render the specified value.
See Also:
JList, ListSelectionModel, ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterComboBoxModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.FilterComboBoxModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel
All Implemented Interfaces:
ComboBoxModel, EventListener, ListModel, PropertyChangeListener, Serializable
Enclosing class:
MetalFileChooserUI
protected class MetalFileChooserUI.FilterComboBoxModel
extends AbstractListModel
implements ComboBoxModel, PropertyChangeListener

Data model for a type-face selection combo-box.

See Also:
Serialized Form

Field Summary
protected  FileFilter[] filters
Fields inherited from class javax.swing.AbstractListModel
listenerList
Constructor Summary
protected MetalFileChooserUI.FilterComboBoxModel()
Method Summary
Object | getElementAt(int index) Returns the value at the specified index.
Object | getSelectedItem() Return the selected item
int | getSize() Returns the length of the list.
void | propertyChange(PropertyChangeEvent e) This method gets called when a bound property is changed.
void | setSelectedItem(Object filter) Set the selected item
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener

Field Detail

filters

protected FileFilter[] filters
Constructor Detail

MetalFileChooserUI.FilterComboBoxModel

protected MetalFileChooserUI.FilterComboBoxModel()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

setSelectedItem

public void setSelectedItem(Object filter)
Description copied from interface: ComboBoxModel
Set the selected item
Specified by:
setSelectedItem in interface ComboBoxModel

getSelectedItem

public Object getSelectedItem()
Description copied from interface: ComboBoxModel
Return the selected item
Specified by:
getSelectedItem in interface ComboBoxModel

getSize

public int getSize()
Description copied from interface: ListModel
Returns the length of the list.
Specified by:
getSize in interface ListModel

getElementAt

public Object getElementAt(int index)
Description copied from interface: ListModel
Returns the value at the specified index.
Specified by:
getElementAt in interface ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterComboBoxRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.FilterComboBoxRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.DefaultListCellRenderer
                                |
                                +--javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants
Enclosing class:
MetalFileChooserUI
public class MetalFileChooserUI.FilterComboBoxRenderer
extends DefaultListCellRenderer

Render different type sizes and styles.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.DefaultListCellRenderer
DefaultListCellRenderer.UIResource
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.DefaultListCellRenderer
noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MetalFileChooserUI.FilterComboBoxRenderer()
Method Summary
 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Return a component that has been configured to display the specified value.
Methods inherited from class javax.swing.DefaultListCellRenderer
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, repaint, repaint, revalidate, validate
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MetalFileChooserUI.FilterComboBoxRenderer

public MetalFileChooserUI.FilterComboBoxRenderer()
Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Description copied from interface: ListCellRenderer
Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.
Overrides:
getListCellRendererComponent in class DefaultListCellRenderer
Following copied from interface: javax.swing.ListCellRenderer
Parameters:
list - The JList we're painting.
value - The value returned by list.getModel().getElementAt(index).
index - The cells index.
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.
Returns:
A component whose paint() method will render the specified value.
See Also:
JList, ListSelectionModel, ListModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Flush3DBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.Flush3DBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.Flush3DBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Direct Known Subclasses:
MetalBorders.TextFieldBorder
Enclosing class:
MetalBorders
public static class MetalBorders.Flush3DBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
MetalBorders.Flush3DBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.Flush3DBorder

public MetalBorders.Flush3DBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FolderIcon16

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.FolderIcon16

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.FolderIcon16
All Implemented Interfaces:
Icon, Serializable
Direct Known Subclasses:
MetalIconFactory.TreeFolderIcon
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.FolderIcon16
extends Object
implements Icon, Serializable

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
MetalIconFactory.FolderIcon16()
Method Summary
int | getAdditionalHeight()
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
int | getShift()
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalIconFactory.FolderIcon16

public MetalIconFactory.FolderIcon16()
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

getShift

public int getShift()

getAdditionalHeight

public int getAdditionalHeight()

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalFrameBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.InternalFrameBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.InternalFrameBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.InternalFrameBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
MetalBorders.InternalFrameBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.InternalFrameBorder

public MetalBorders.InternalFrameBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuBarBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.MenuBarBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.MenuBarBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.MenuBarBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected static Insets borderInsets
Constructor Summary
MetalBorders.MenuBarBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

borderInsets

protected static Insets borderInsets
Constructor Detail

MetalBorders.MenuBarBorder

public MetalBorders.MenuBarBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MenuItemBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.MenuItemBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.MenuItemBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.MenuItemBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected static Insets borderInsets
Constructor Summary
MetalBorders.MenuItemBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

borderInsets

protected static Insets borderInsets
Constructor Detail

MetalBorders.MenuItemBorder

public MetalBorders.MenuItemBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalBorders

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalBorders
public class MetalBorders
extends Object

Factory object that can vend Borders appropriate for the metal L & F.

Inner Class Summary
static class | MetalBorders.ButtonBorder
static class | MetalBorders.Flush3DBorder
static class | MetalBorders.InternalFrameBorder
static class | MetalBorders.MenuBarBorder
static class | MetalBorders.MenuItemBorder
static class | MetalBorders.OptionDialogBorder
static class | MetalBorders.PaletteBorder Border for a Palatte.
static class | MetalBorders.PopupMenuBorder
static class | MetalBorders.RolloverButtonBorder
static class | MetalBorders.ScrollPaneBorder
static class | MetalBorders.TableHeaderBorder Border for a Table Header
static class | MetalBorders.TextFieldBorder
static class | MetalBorders.ToggleButtonBorder
static class | MetalBorders.ToolBarBorder
Constructor Summary
MetalBorders()
Method Summary
static Border | getButtonBorder() Returns a border instance for a JButton
static Border | getDesktopIconBorder() Returns a border instance for a Desktop Icon
static Border | getTextBorder() Returns a border instance for a text component
static Border | getTextFieldBorder() Returns a border instance for a JTextField
static Border | getToggleButtonBorder() Returns a border instance for a JToggleButton
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders

public MetalBorders()
Method Detail

getButtonBorder

public static Border getButtonBorder()
Returns a border instance for a JButton
Since:
1.3

getTextBorder

public static Border getTextBorder()
Returns a border instance for a text component
Since:
1.3

getTextFieldBorder

public static Border getTextFieldBorder()
Returns a border instance for a JTextField
Since:
1.3

getToggleButtonBorder

public static Border getToggleButtonBorder()
Returns a border instance for a JToggleButton
Since:
1.3

getDesktopIconBorder

public static Border getDesktopIconBorder()
Returns a border instance for a Desktop Icon
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.metal.MetalButtonUI
public class MetalButtonUI
extends BasicButtonUI

MetalButtonUI implementation

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
protected Color | disabledTextColor
protected Color | focusColor
protected Color | selectColor
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
MetalButtonUI()
Method Summary
protected BasicButtonListener | createButtonListener(AbstractButton b)
static ComponentUI | createUI(JComponent c)
protected Color | getDisabledTextColor()
protected Color | getFocusColor()
protected Color | getSelectColor()
void | installDefaults(AbstractButton b)
protected void | paintButtonPressed(Graphics g, AbstractButton b)
protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | paintText(Graphics g, JComponent c, Rectangle textRect, String text)
void | uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paint, paintIcon, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

focusColor

protected Color focusColor

selectColor

protected Color selectColor

disabledTextColor

protected Color disabledTextColor
Constructor Detail

MetalButtonUI

public MetalButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicButtonUI

uninstallDefaults

public void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class BasicButtonUI

createButtonListener

protected BasicButtonListener createButtonListener(AbstractButton b)
Overrides:
createButtonListener in class BasicButtonUI

getSelectColor

protected Color getSelectColor()

getDisabledTextColor

protected Color getDisabledTextColor()

getFocusColor

protected Color getFocusColor()

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overrides:
paintButtonPressed in class BasicButtonUI

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Overrides:
paintFocus in class BasicButtonUI

paintText

protected void paintText(Graphics g,
                         JComponent c,
                         Rectangle textRect,
                         String text)
Overrides:
paintText in class BasicButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalCheckBoxIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalCheckBoxIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalCheckBoxIcon
All Implemented Interfaces:
Icon, Serializable, UIResource
public class MetalCheckBoxIcon
extends Object
implements Icon, UIResource, Serializable

CheckboxIcon implementation for OrganicCheckBoxUI

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
MetalCheckBoxIcon()
Method Summary
protected void | drawCheck(Component c, Graphics g, int x, int y)
protected int | getControlSize()
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalCheckBoxIcon

public MetalCheckBoxIcon()
Method Detail

getControlSize

protected int getControlSize()

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

drawCheck

protected void drawCheck(Component c,
                         Graphics g,
                         int x,
                         int y)

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalCheckBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalCheckBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
                          |
                          +--javax.swing.plaf.basic.BasicRadioButtonUI
                                |
                                +--javax.swing.plaf.metal.MetalRadioButtonUI
                                      |
                                      +--javax.swing.plaf.metal.MetalCheckBoxUI
public class MetalCheckBoxUI
extends MetalRadioButtonUI

CheckboxUI implementation for MetalCheckboxUI

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Fields inherited from class javax.swing.plaf.metal.MetalRadioButtonUI
disabledTextColor, focusColor, selectColor
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
MetalCheckBoxUI()
Method Summary
static ComponentUI | createUI(JComponent b)
String | getPropertyPrefix()
void | installDefaults(AbstractButton b)
protected void | uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.metal.MetalRadioButtonUI
getDisabledTextColor, getFocusColor, getSelectColor, paint, paintFocus
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultIcon, getPreferredSize
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
paintButtonPressed, paintFocus, paintIcon, paintText
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalCheckBoxUI

public MetalCheckBoxUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

getPropertyPrefix

public String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicRadioButtonUI

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class MetalRadioButtonUI

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class MetalRadioButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboBoxButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
                                |
                                +--javax.swing.plaf.metal.MetalComboBoxButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
public class MetalComboBoxButton
extends JButton

JButton subclass to help out MetalComboBoxUI

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
MetalComboBoxButton, Serialized Form

Inner classes inherited from class javax.swing.JButton
JButton.AccessibleJButton
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected JComboBox | comboBox
protected Icon | comboIcon
protected boolean | iconOnly
protected JList | listBox
protected CellRendererPane | rendererPane
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
Method Summary
JComboBox | getComboBox()
Icon | getComboIcon()
boolean | isFocusTraversable() Identifies whether or not this component can receive the focus.
boolean | isIconOnly()
void | paintComponent(Graphics g) If the UI delegate is non-null, calls its paint method.
void | setComboBox(JComboBox cb)
void | setComboIcon(Icon i)
void | setIconOnly(boolean isIconOnly)
Methods inherited from class javax.swing.JButton
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

comboBox

protected JComboBox comboBox

listBox

protected JList listBox

rendererPane

protected CellRendererPane rendererPane

comboIcon

protected Icon comboIcon

iconOnly

protected boolean iconOnly
Constructor Detail

MetalComboBoxButton

public MetalComboBoxButton(JComboBox cb,
                           Icon i,
                           CellRendererPane pane,
                           JList list)

MetalComboBoxButton

public MetalComboBoxButton(JComboBox cb,
                           Icon i,
                           boolean onlyIcon,
                           CellRendererPane pane,
                           JList list)
Method Detail

getComboBox

public final JComboBox getComboBox()

setComboBox

public final void setComboBox(JComboBox cb)

getComboIcon

public final Icon getComboIcon()

setComboIcon

public final void setComboIcon(Icon i)

isIconOnly

public final boolean isIconOnly()

setIconOnly

public final void setIconOnly(boolean isIconOnly)

isFocusTraversable

public boolean isFocusTraversable()
Description copied from class: AbstractButton
Identifies whether or not this component can receive the focus.
Overrides:
isFocusTraversable in class AbstractButton
Following copied from class: javax.swing.AbstractButton
Returns:
true if this component can receive the focus

paintComponent

public void paintComponent(Graphics g)
Description copied from class: JComponent
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
Overrides:
paintComponent in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboBoxEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxEditor

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxEditor
        |
        +--javax.swing.plaf.metal.MetalComboBoxEditor
All Implemented Interfaces:
ComboBoxEditor, EventListener, FocusListener
Direct Known Subclasses:
MetalComboBoxEditor.UIResource
public class MetalComboBoxEditor
extends BasicComboBoxEditor

The default editor for Metal editable combo boxes

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
static class MetalComboBoxEditor.UIResource
A subclass of BasicComboBoxEditor that implements UIResource.
Inner classes inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
BasicComboBoxEditor.UIResource
Field Summary
protected static Insets editorBorderInsets
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
editor
Constructor Summary
MetalComboBoxEditor()
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
addActionListener, focusGained, focusLost, getEditorComponent, getItem, removeActionListener, selectAll, setItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

editorBorderInsets

protected static Insets editorBorderInsets
Constructor Detail

MetalComboBoxEditor

public MetalComboBoxEditor()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboBoxIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalComboBoxIcon
All Implemented Interfaces:
Icon, Serializable
public class MetalComboBoxIcon
extends Object
implements Icon, Serializable

This utility class draws the horizontal bars which indicate a MetalComboBox

See Also:
MetalComboBoxUI, Serialized Form

Constructor Summary
MetalComboBoxIcon()
Method Summary
int | getIconHeight() stubbed to statify the interface.
int | getIconWidth() stubbed to statify the interface.
void | paintIcon(Component c, Graphics g, int x, int y) Paints the horizontal bars for the
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalComboBoxIcon

public MetalComboBoxIcon()
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Paints the horizontal bars for the
Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()
stubbed to statify the interface.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
stubbed to statify the interface.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboBoxLayoutManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxUI.MetalComboBoxLayoutManager

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
        |
        +--javax.swing.plaf.metal.MetalComboBoxUI.MetalComboBoxLayoutManager
All Implemented Interfaces:
LayoutManager
Enclosing class:
MetalComboBoxUI
public class MetalComboBoxUI.MetalComboBoxLayoutManager
extends BasicComboBoxUI.ComboBoxLayoutManager

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
MetalComboBoxUI.MetalComboBoxLayoutManager()
Method Summary
void | layoutContainer(Container parent) Lays out the container in the specified panel.
void | superLayout(Container parent)
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
addLayoutComponent, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalComboBoxUI.MetalComboBoxLayoutManager

public MetalComboBoxUI.MetalComboBoxLayoutManager()
Method Detail

layoutContainer

public void layoutContainer(Container parent)
Description copied from interface: LayoutManager
Lays out the container in the specified panel.
Overrides:
layoutContainer in class BasicComboBoxUI.ComboBoxLayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

superLayout

public void superLayout(Container parent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ComboBoxUI
              |
              +--javax.swing.plaf.basic.BasicComboBoxUI
                    |
                    +--javax.swing.plaf.metal.MetalComboBoxUI
public class MetalComboBoxUI
extends BasicComboBoxUI

Metal UI for JComboBox

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
MetalComboBoxListCellRenderer, MetalPopupMenuBorder

Inner Class Summary
class | MetalComboBoxUI.MetalComboBoxLayoutManager This inner class is marked "public" due to a compiler bug.
class | MetalComboBoxUI.MetalComboPopup This inner class is marked "public" due to a compiler bug.
class | MetalComboBoxUI.MetalPropertyChangeListener This inner class is marked "public" due to a compiler bug.
Inner classes inherited from class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener
Constructor Summary
MetalComboBoxUI()
Method Summary
void | configureArrowButton() Configures the arrow button by adding listeners.
void | configureEditor() Configures the editor by setting its font and adding listeners.
protected JButton | createArrowButton() Creates the arrow button.
protected ComboBoxEditor | createEditor() Creates the editor that is to be used in editable combo boxes.
protected LayoutManager | createLayoutManager() Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left.
protected ComboPopup | createPopup() Creates an implementation of the ComboPopup interface.
PropertyChangeListener | createPropertyChangeListener() Creates the list data listener that is used for caching the preferred sizes.
static ComponentUI | createUI(JComponent c)
protected void | editablePropertyChanged(PropertyChangeEvent e)
Dimension | getMinimumSize(JComponent c)
protected void | installListeners() Attaches listeners to the JComboBox and JComboBoxModel.
void | installUI(JComponent c)
boolean | isFocusTraversable(JComboBox c) Determines if the JComboBox is focus traversable.
void | layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
void | paint(Graphics g, JComponent c)
protected void | removeListeners()
protected void | selectNextPossibleValue() Selects the next item in the list.
protected void | selectPreviousPossibleValue() Selects the previous item in the list.
void | unconfigureArrowButton() Unconfigures the arrow button by removing listeners.
void | unconfigureEditor() Unconfigures the editor by removing listeners.
protected void | uninstallListeners() Removes listeners from the JComboBox and JComboBoxModel.
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI
addEditor, createFocusListener, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, isNavigationKey, isPopupVisible, paintCurrentValue, paintCurrentValueBackground, rectangleForCurrentValue, removeEditor, setPopupVisible, toggleOpenClose, uninstallComponents, uninstallDefaults, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.ComponentUI
contains, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalComboBoxUI

public MetalComboBoxUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicComboBoxUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicComboBoxUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicComboBoxUI

createEditor

protected ComboBoxEditor createEditor()
Description copied from class: BasicComboBoxUI
Creates the editor that is to be used in editable combo boxes. This method only gets called if a custom editor has not already been installed in the JComboBox.
Overrides:
createEditor in class BasicComboBoxUI

createPopup

protected ComboPopup createPopup()
Description copied from class: BasicComboBoxUI
Creates an implementation of the ComboPopup interface. Returns an instance of BasicComboPopup.
Overrides:
createPopup in class BasicComboBoxUI

createArrowButton

protected JButton createArrowButton()
Description copied from class: BasicComboBoxUI
Creates the arrow button. Subclasses can create any button they like. The default behavior of this class is to attach various listeners to the button returned by this method. Returns an instance of BasicArrowButton.
Overrides:
createArrowButton in class BasicComboBoxUI

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener()
Description copied from class: BasicComboBoxUI
Creates the list data listener that is used for caching the preferred sizes. Returns an instance of BasicComboBoxUI$PropertyChangeHandler.
Overrides:
createPropertyChangeListener in class BasicComboBoxUI

editablePropertyChanged

protected void editablePropertyChanged(PropertyChangeEvent e)

createLayoutManager

protected LayoutManager createLayoutManager()
Description copied from class: BasicComboBoxUI
Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left. Returns an instance of BasicComboBoxUI$ComboBoxLayoutManager.
Overrides:
createLayoutManager in class BasicComboBoxUI

layoutComboBox

public void layoutComboBox(Container parent,
                           MetalComboBoxUI.MetalComboBoxLayoutManager manager)

isFocusTraversable

public boolean isFocusTraversable(JComboBox c)
Description copied from class: BasicComboBoxUI
Determines if the JComboBox is focus traversable. If the JComboBox is editable this returns false, otherwise it returns true.
Overrides:
isFocusTraversable in class BasicComboBoxUI

installListeners

protected void installListeners()
Description copied from class: BasicComboBoxUI
Attaches listeners to the JComboBox and JComboBoxModel.
Overrides:
installListeners in class BasicComboBoxUI

uninstallListeners

protected void uninstallListeners()
Description copied from class: BasicComboBoxUI
Removes listeners from the JComboBox and JComboBoxModel.
Overrides:
uninstallListeners in class BasicComboBoxUI

removeListeners

protected void removeListeners()

configureEditor

public void configureEditor()
Description copied from class: BasicComboBoxUI
Configures the editor by setting its font and adding listeners.
Overrides:
configureEditor in class BasicComboBoxUI

unconfigureEditor

public void unconfigureEditor()
Description copied from class: BasicComboBoxUI
Unconfigures the editor by removing listeners.
Overrides:
unconfigureEditor in class BasicComboBoxUI

configureArrowButton

public void configureArrowButton()
Description copied from class: BasicComboBoxUI
Configures the arrow button by adding listeners.
Overrides:
configureArrowButton in class BasicComboBoxUI

unconfigureArrowButton

public void unconfigureArrowButton()
Description copied from class: BasicComboBoxUI
Unconfigures the arrow button by removing listeners.
Overrides:
unconfigureArrowButton in class BasicComboBoxUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class BasicComboBoxUI

selectNextPossibleValue

protected void selectNextPossibleValue()
Description copied from class: BasicComboBoxUI
Selects the next item in the list. It won't change the selection if the currently selected item is already the last item.
Overrides:
selectNextPossibleValue in class BasicComboBoxUI

selectPreviousPossibleValue

protected void selectPreviousPossibleValue()
Description copied from class: BasicComboBoxUI
Selects the previous item in the list. It won't change the selection if the currently selected item is already the first item.
Overrides:
selectPreviousPossibleValue in class BasicComboBoxUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalComboPopup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxUI.MetalComboPopup

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPopupMenu
                          |
                          +--javax.swing.plaf.basic.BasicComboPopup
                                |
                                +--javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup
All Implemented Interfaces:
Accessible, ComboPopup, ImageObserver, MenuContainer, MenuElement, Serializable
Enclosing class:
MetalComboBoxUI
public class MetalComboBoxUI.MetalComboPopup
extends BasicComboPopup

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

See Also:
Serialized Form

Inner classes inherited from class javax.swing.plaf.basic.BasicComboPopup
BasicComboPopup.InvocationKeyHandler, BasicComboPopup.InvocationMouseHandler, BasicComboPopup.InvocationMouseMotionHandler, BasicComboPopup.ItemHandler, BasicComboPopup.ListDataHandler, BasicComboPopup.ListMouseHandler, BasicComboPopup.ListMouseMotionHandler, BasicComboPopup.ListSelectionHandler, BasicComboPopup.PropertyChangeHandler
Inner classes inherited from class javax.swing.JPopupMenu
JPopupMenu.AccessibleJPopupMenu, JPopupMenu.Separator
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.plaf.basic.BasicComboPopup
autoscrollTimer, comboBox, hasEntered, isAutoScrolling, itemListener, keyListener, list, listDataListener, listMouseListener, listMouseMotionListener, listSelectionListener, mouseListener, mouseMotionListener, propertyChangeListener, SCROLL_DOWN, SCROLL_UP, scrollDirection, scroller, valueIsAdjusting
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MetalComboBoxUI.MetalComboPopup(JComboBox cBox)
Method Summary
 void delegateFocus(MouseEvent e)
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up.
Methods inherited from class javax.swing.plaf.basic.BasicComboPopup
autoScrollDown, autoScrollUp, computePopupBounds, configureList, configurePopup, configureScroller, convertMouseEvent, createItemListener, createKeyListener, createList, createListDataListener, createListMouseListener, createListMouseMotionListener, createListSelectionListener, createMouseListener, createMouseMotionListener, createPropertyChangeListener, createScroller, getKeyListener, getList, getMouseListener, getMouseMotionListener, getPopupHeightForRowCount, hide, installComboBoxListeners, installComboBoxModelListeners, installKeyboardActions, installListListeners, isFocusTraversable, show, startAutoScrolling, stopAutoScrolling, togglePopup, uninstallComboBoxModelListeners, uninstallingUI, uninstallKeyboardActions, updateListBoxSelectionForEvent
Methods inherited from class javax.swing.JPopupMenu
add, add, add, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processKeyEvent, processMouseEvent, remove, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.plaf.basic.ComboPopup
isVisible

Constructor Detail

MetalComboBoxUI.MetalComboPopup

public MetalComboBoxUI.MetalComboPopup(JComboBox cBox)
Method Detail

delegateFocus

public void delegateFocus(MouseEvent e)
Description copied from class: BasicComboPopup
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up. The standard implementation delegates the focus to the editor (if the combo box is editable) or to the JComboBox if it is not editable.
Overrides:
delegateFocus in class BasicComboPopup
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalContainerListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToolBarUI.MetalContainerListener

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalToolBarUI.MetalContainerListener
All Implemented Interfaces:
ContainerListener, EventListener
Enclosing class:
MetalToolBarUI
protected class MetalToolBarUI.MetalContainerListener
extends Object
implements ContainerListener

Constructor Summary
protected MetalToolBarUI.MetalContainerListener()
Method Summary
void | componentAdded(ContainerEvent e) Invoked when a component has been added to the container.
void | componentRemoved(ContainerEvent e) Invoked when a component has been removed from the container.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalToolBarUI.MetalContainerListener

protected MetalToolBarUI.MetalContainerListener()
Method Detail

componentAdded

public void componentAdded(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Description copied from interface: ContainerListener
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface ContainerListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalDesktopIconUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalDesktopIconUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopIconUI
              |
              +--javax.swing.plaf.basic.BasicDesktopIconUI
                    |
                    +--javax.swing.plaf.metal.MetalDesktopIconUI
public class MetalDesktopIconUI
extends BasicDesktopIconUI

Metal desktop icon.

Inner classes inherited from class javax.swing.plaf.basic.BasicDesktopIconUI
BasicDesktopIconUI.MouseInputHandler
Fields inherited from class javax.swing.plaf.basic.BasicDesktopIconUI
desktopIcon, frame
Constructor Summary
MetalDesktopIconUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installComponents()
protected void | installDefaults()
protected void | uninstallComponents()
Methods inherited from class javax.swing.plaf.basic.BasicDesktopIconUI
createMouseInputListener, deiconize, getInsets, getMaximumSize, getMinimumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalDesktopIconUI

public MetalDesktopIconUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicDesktopIconUI

installComponents

protected void installComponents()
Overrides:
installComponents in class BasicDesktopIconUI

uninstallComponents

protected void uninstallComponents()
Overrides:
uninstallComponents in class BasicDesktopIconUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicDesktopIconUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalDockingListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToolBarUI.MetalDockingListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicToolBarUI.DockingListener
        |
        +--javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener
Enclosing class:
MetalToolBarUI
protected class MetalToolBarUI.MetalDockingListener
extends BasicToolBarUI.DockingListener

Fields inherited from class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
isDragging, origin, toolBar
Constructor Summary
MetalToolBarUI.MetalDockingListener(JToolBar t)
Method Summary
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalToolBarUI.MetalDockingListener

public MetalToolBarUI.MetalDockingListener(JToolBar t)
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Description copied from interface: MouseListener
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class BasicToolBarUI.DockingListener

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Overrides:
mouseDragged in class BasicToolBarUI.DockingListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalFileChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.FileChooserUI
              |
              +--javax.swing.plaf.basic.BasicFileChooserUI
                    |
                    +--javax.swing.plaf.metal.MetalFileChooserUI
public class MetalFileChooserUI
extends BasicFileChooserUI

Metal L&F implementation of a FileChooser.

Inner Class Summary
protected class | MetalFileChooserUI.DirectoryComboBoxAction Acts when DirectoryComboBox has changed the selected item.
protected class | MetalFileChooserUI.DirectoryComboBoxModel Data model for a type-face selection combo-box.
protected class | MetalFileChooserUI.FileRenderer
protected class | MetalFileChooserUI.FilterComboBoxModel Data model for a type-face selection combo-box.
class | MetalFileChooserUI.FilterComboBoxRenderer Render different type sizes and styles.
protected class | MetalFileChooserUI.SingleClickListener
Inner classes inherited from class javax.swing.plaf.basic.BasicFileChooserUI
BasicFileChooserUI.AcceptAllFileFilter, BasicFileChooserUI.ApproveSelectionAction, BasicFileChooserUI.BasicFileView, BasicFileChooserUI.CancelSelectionAction, BasicFileChooserUI.ChangeToParentDirectoryAction, BasicFileChooserUI.DoubleClickListener, BasicFileChooserUI.GoHomeAction, BasicFileChooserUI.NewFolderAction, BasicFileChooserUI.SelectionListener, BasicFileChooserUI.UpdateAction
Fields inherited from class javax.swing.plaf.basic.BasicFileChooserUI
cancelButtonMnemonic, cancelButtonText, cancelButtonToolTipText, computerIcon, detailsViewIcon, directoryIcon, fileIcon, floppyDriveIcon, hardDriveIcon, helpButtonMnemonic, helpButtonText, helpButtonToolTipText, homeFolderIcon, listViewIcon, newFolderIcon, openButtonMnemonic, openButtonText, openButtonToolTipText, saveButtonMnemonic, saveButtonText, saveButtonToolTipText, updateButtonMnemonic, updateButtonText, updateButtonToolTipText, upFolderIcon
Constructor Summary
MetalFileChooserUI(JFileChooser filechooser)
Method Summary
protected void | addControlButtons()
protected ActionMap | createActionMap()
protected MetalFileChooserUI.DirectoryComboBoxModel | createDirectoryComboBoxModel(JFileChooser fc)
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer | createDirectoryComboBoxRenderer(JFileChooser fc)
protected MetalFileChooserUI.FilterComboBoxModel | createFilterComboBoxModel()
protected MetalFileChooserUI.FilterComboBoxRenderer | createFilterComboBoxRenderer()
protected JPanel | createList(JFileChooser fc)
PropertyChangeListener | createPropertyChangeListener(JFileChooser fc)
static ComponentUI | createUI(JComponent c)
void | ensureFileIsVisible(JFileChooser fc, File f)
protected ActionMap | getActionMap()
protected JButton | getApproveButton(JFileChooser fc)
protected JPanel | getBottomPanel()
protected JPanel | getButtonPanel()
String | getDirectoryName()
String | getFileName()
Dimension | getMaximumSize(JComponent c)
Dimension | getMinimumSize(JComponent c)
Dimension | getPreferredSize(JComponent c)
void | installComponents(JFileChooser fc)
protected void | installListeners(JFileChooser fc)
protected void | installStrings(JFileChooser fc)
void | installUI(JComponent c)
protected void | removeControlButtons()
void | rescanCurrentDirectory(JFileChooser fc)
void | setDirectoryName(String dirname)
void | setFileName(String filename)
void | uninstallComponents(JFileChooser fc)
void | uninstallUI(JComponent c)
void | valueChanged(ListSelectionEvent e)
Methods inherited from class javax.swing.plaf.basic.BasicFileChooserUI
clearIconCache, createDoubleClickListener, createListSelectionListener, createModel, getAcceptAllFileFilter, getAccessoryPanel, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getApproveSelectionAction, getCancelSelectionAction, getChangeToParentDirectoryAction, getDialogTitle, getFileChooser, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installDefaults, installIcons, uninstallDefaults, uninstallIcons, uninstallListeners, uninstallStrings
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalFileChooserUI

public MetalFileChooserUI(JFileChooser filechooser)
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicFileChooserUI

uninstallComponents

public void uninstallComponents(JFileChooser fc)
Overrides:
uninstallComponents in class BasicFileChooserUI

installComponents

public void installComponents(JFileChooser fc)
Overrides:
installComponents in class BasicFileChooserUI

getButtonPanel

protected JPanel getButtonPanel()

getBottomPanel

protected JPanel getBottomPanel()

installStrings

protected void installStrings(JFileChooser fc)
Overrides:
installStrings in class BasicFileChooserUI

installListeners

protected void installListeners(JFileChooser fc)
Overrides:
installListeners in class BasicFileChooserUI

getActionMap

protected ActionMap getActionMap()

createActionMap

protected ActionMap createActionMap()

createList

protected JPanel createList(JFileChooser fc)

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicFileChooserUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
Overrides:
createPropertyChangeListener in class BasicFileChooserUI

removeControlButtons

protected void removeControlButtons()

addControlButtons

protected void addControlButtons()

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser fc,
                                File f)
Overrides:
ensureFileIsVisible in class BasicFileChooserUI

rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser fc)
Overrides:
rescanCurrentDirectory in class BasicFileChooserUI

getFileName

public String getFileName()
Overrides:
getFileName in class BasicFileChooserUI

setFileName

public void setFileName(String filename)
Overrides:
setFileName in class BasicFileChooserUI

getDirectoryName

public String getDirectoryName()
Overrides:
getDirectoryName in class BasicFileChooserUI

setDirectoryName

public void setDirectoryName(String dirname)
Overrides:
setDirectoryName in class BasicFileChooserUI

createDirectoryComboBoxRenderer

protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)

createDirectoryComboBoxModel

protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)

createFilterComboBoxRenderer

protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()

createFilterComboBoxModel

protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()

valueChanged

public void valueChanged(ListSelectionEvent e)

getApproveButton

protected JButton getApproveButton(JFileChooser fc)
Overrides:
getApproveButton in class BasicFileChooserUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalIconFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory
All Implemented Interfaces:
Serializable
public class MetalIconFactory
extends Object
implements Serializable

Factory object that can vend Icons appropriate for Metal. These are used extensively in Metal via the defaults mechanism. While other Look and Feels use GIFs for some of these, doing this work in code facilitates things when switching to other Themes.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
static class | MetalIconFactory.FileIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.FolderIcon16 Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.PaletteCloseIcon Defines an icon for Palette close
static class | MetalIconFactory.TreeControlIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeFolderIcon Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class | MetalIconFactory.TreeLeafIcon
Field Summary
static boolean | DARK
static boolean | LIGHT
Constructor Summary
MetalIconFactory()
Method Summary
static Icon | getCheckBoxIcon() Returns a checkbox icon
static Icon | getCheckBoxMenuItemIcon()
static Icon | getFileChooserDetailViewIcon()
static Icon | getFileChooserHomeFolderIcon()
static Icon | getFileChooserListViewIcon()
static Icon | getFileChooserNewFolderIcon()
static Icon | getFileChooserUpFolderIcon()
static Icon | getHorizontalSliderThumbIcon()
static Icon | getInternalFrameAltMaximizeIcon(int size)
static Icon | getInternalFrameCloseIcon(int size)
static Icon | getInternalFrameDefaultMenuIcon()
static Icon | getInternalFrameMaximizeIcon(int size)
static Icon | getInternalFrameMinimizeIcon(int size)
static Icon | getMenuArrowIcon()
static Icon | getMenuItemArrowIcon()
static Icon | getMenuItemCheckIcon()
static Icon | getRadioButtonIcon()
static Icon | getRadioButtonMenuItemIcon()
static Icon | getTreeComputerIcon()
static Icon | getTreeControlIcon(boolean isCollapsed)
static Icon | getTreeFloppyDriveIcon()
static Icon | getTreeFolderIcon()
static Icon | getTreeHardDriveIcon()
static Icon | getTreeLeafIcon()
static Icon | getVerticalSliderThumbIcon()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DARK

public static final boolean DARK

LIGHT

public static final boolean LIGHT
Constructor Detail

MetalIconFactory

public MetalIconFactory()
Method Detail

getFileChooserDetailViewIcon

public static Icon getFileChooserDetailViewIcon()

getFileChooserHomeFolderIcon

public static Icon getFileChooserHomeFolderIcon()

getFileChooserListViewIcon

public static Icon getFileChooserListViewIcon()

getFileChooserNewFolderIcon

public static Icon getFileChooserNewFolderIcon()

getFileChooserUpFolderIcon

public static Icon getFileChooserUpFolderIcon()

getInternalFrameAltMaximizeIcon

public static Icon getInternalFrameAltMaximizeIcon(int size)

getInternalFrameCloseIcon

public static Icon getInternalFrameCloseIcon(int size)

getInternalFrameDefaultMenuIcon

public static Icon getInternalFrameDefaultMenuIcon()

getInternalFrameMaximizeIcon

public static Icon getInternalFrameMaximizeIcon(int size)

getInternalFrameMinimizeIcon

public static Icon getInternalFrameMinimizeIcon(int size)

getRadioButtonIcon

public static Icon getRadioButtonIcon()

getCheckBoxIcon

public static Icon getCheckBoxIcon()
Returns a checkbox icon
Since:
1.3

getTreeComputerIcon

public static Icon getTreeComputerIcon()

getTreeFloppyDriveIcon

public static Icon getTreeFloppyDriveIcon()

getTreeFolderIcon

public static Icon getTreeFolderIcon()

getTreeHardDriveIcon

public static Icon getTreeHardDriveIcon()

getTreeLeafIcon

public static Icon getTreeLeafIcon()

getTreeControlIcon

public static Icon getTreeControlIcon(boolean isCollapsed)

getMenuArrowIcon

public static Icon getMenuArrowIcon()

getMenuItemCheckIcon

public static Icon getMenuItemCheckIcon()

getMenuItemArrowIcon

public static Icon getMenuItemArrowIcon()

getCheckBoxMenuItemIcon

public static Icon getCheckBoxMenuItemIcon()

getRadioButtonMenuItemIcon

public static Icon getRadioButtonMenuItemIcon()

getHorizontalSliderThumbIcon

public static Icon getHorizontalSliderThumbIcon()

getVerticalSliderThumbIcon

public static Icon getVerticalSliderThumbIcon()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalInternalFrameTitlePane

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalInternalFrameTitlePane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.plaf.basic.BasicInternalFrameTitlePane
                          |
                          +--javax.swing.plaf.metal.MetalInternalFrameTitlePane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
public class MetalInternalFrameTitlePane
extends BasicInternalFrameTitlePane

Class that manages a JLF title bar

Since:
1.3
See Also:
Serialized Form

Inner classes inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
BasicInternalFrameTitlePane.CloseAction, BasicInternalFrameTitlePane.IconifyAction, BasicInternalFrameTitlePane.MaximizeAction, BasicInternalFrameTitlePane.MoveAction, BasicInternalFrameTitlePane.PropertyChangeHandler, BasicInternalFrameTitlePane.RestoreAction, BasicInternalFrameTitlePane.SizeAction, BasicInternalFrameTitlePane.SystemMenuBar, BasicInternalFrameTitlePane.TitlePaneLayout
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected boolean | isPalette
protected Icon | paletteCloseIcon
protected int | paletteTitleHeight
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
CLOSE_CMD, closeAction, closeButton, closeIcon, frame, iconButton, iconIcon, ICONIFY_CMD, iconifyAction, maxButton, maxIcon, MAXIMIZE_CMD, maximizeAction, menuBar, minIcon, MOVE_CMD, moveAction, notSelectedTextColor, notSelectedTitleColor, propertyChangeListener, RESTORE_CMD, restoreAction, selectedTextColor, selectedTitleColor, SIZE_CMD, sizeAction, windowMenu
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MetalInternalFrameTitlePane(JInternalFrame f)
Method Summary
protected void | addSubComponents() Override the parent's method avoid creating a menu bar.
protected void | addSystemMenuItems(JMenu systemMenu) Override the parent's method to do nothing.
protected void | assembleSystemMenu() Override the parent's method to do nothing.
protected void | createButtons()
protected LayoutManager | createLayout()
protected PropertyChangeListener | createPropertyChangeListener()
protected void | installDefaults()
void | paintComponent(Graphics g) If the UI delegate is non-null, calls its paint method.
void | paintPalette(Graphics g)
void | setPalette(boolean b)
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
addNotify, createActions, createSystemMenu, createSystemMenuBar, enableActions, installListeners, installTitlePane, postClosingEvent, removeNotify, setButtonIcons, showSystemMenu, uninstallDefaults, uninstallListeners
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

isPalette

protected boolean isPalette

paletteCloseIcon

protected Icon paletteCloseIcon

paletteTitleHeight

protected int paletteTitleHeight
Constructor Detail

MetalInternalFrameTitlePane

public MetalInternalFrameTitlePane(JInternalFrame f)
Method Detail

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicInternalFrameTitlePane

createButtons

protected void createButtons()
Overrides:
createButtons in class BasicInternalFrameTitlePane

assembleSystemMenu

protected void assembleSystemMenu()
Override the parent's method to do nothing. Metal frames do not have system menus.
Overrides:
assembleSystemMenu in class BasicInternalFrameTitlePane

addSystemMenuItems

protected void addSystemMenuItems(JMenu systemMenu)
Override the parent's method to do nothing. Metal frames do not have system menus.
Overrides:
addSystemMenuItems in class BasicInternalFrameTitlePane

addSubComponents

protected void addSubComponents()
Override the parent's method avoid creating a menu bar. Metal frames do not have system menus.
Overrides:
addSubComponents in class BasicInternalFrameTitlePane

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Overrides:
createPropertyChangeListener in class BasicInternalFrameTitlePane

createLayout

protected LayoutManager createLayout()
Overrides:
createLayout in class BasicInternalFrameTitlePane

paintPalette

public void paintPalette(Graphics g)

paintComponent

public void paintComponent(Graphics g)
Description copied from class: JComponent
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
Overrides:
paintComponent in class BasicInternalFrameTitlePane
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)

setPalette

public void setPalette(boolean b)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalInternalFrameUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalInternalFrameUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.InternalFrameUI
              |
              +--javax.swing.plaf.basic.BasicInternalFrameUI
                    |
                    +--javax.swing.plaf.metal.MetalInternalFrameUI
public class MetalInternalFrameUI
extends BasicInternalFrameUI

Metal implementation of JInternalFrame.

Inner classes inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
BasicInternalFrameUI.BasicInternalFrameListener, BasicInternalFrameUI.BorderListener, BasicInternalFrameUI.ComponentHandler, BasicInternalFrameUI.GlassPaneDispatcher, BasicInternalFrameUI.InternalFrameLayout, BasicInternalFrameUI.InternalFramePropertyChangeListener
Field Summary
protected static String IS_PALETTE
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
borderListener, componentListener, eastPane, frame, glassPaneDispatcher, internalFrameLayout, northPane, openMenuKey, propertyChangeListener, southPane, titlePane, westPane
Constructor Summary
MetalInternalFrameUI(JInternalFrame b)
Method Summary
protected JComponent | createNorthPane(JInternalFrame w)
static ComponentUI | createUI(JComponent c)
protected void | installKeyboardActions()
void | installUI(JComponent c)
void | setPalette(boolean isPalette)
protected void | uninstallKeyboardActions()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
activateFrame, closeFrame, createBorderListener, createComponentListener, createDesktopManager, createEastPane, createGlassPaneDispatcher, createInternalFrameListener, createLayoutManager, createPropertyChangeListener, createSouthPane, createWestPane, deactivateFrame, deiconifyFrame, deinstallMouseHandlers, getDesktopManager, getEastPane, getMaximumSize, getMinimumSize, getNorthPane, getPreferredSize, getSouthPane, getWestPane, iconifyFrame, installComponents, installDefaults, installListeners, installMouseHandlers, isKeyBindingActive, isKeyBindingRegistered, maximizeFrame, minimizeFrame, replacePane, setEastPane, setKeyBindingActive, setKeyBindingRegistered, setNorthPane, setSouthPane, setupMenuCloseKey, setupMenuOpenKey, setWestPane, uninstallComponents, uninstallDefaults, uninstallListeners
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

IS_PALETTE

protected static String IS_PALETTE
Constructor Detail

MetalInternalFrameUI

public MetalInternalFrameUI(JInternalFrame b)
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicInternalFrameUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicInternalFrameUI

installKeyboardActions

protected void installKeyboardActions()
Overrides:
installKeyboardActions in class BasicInternalFrameUI

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Overrides:
uninstallKeyboardActions in class BasicInternalFrameUI

createNorthPane

protected JComponent createNorthPane(JInternalFrame w)
Overrides:
createNorthPane in class BasicInternalFrameUI

setPalette

public void setPalette(boolean isPalette)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalLabelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalLabelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.LabelUI
              |
              +--javax.swing.plaf.basic.BasicLabelUI
                    |
                    +--javax.swing.plaf.metal.MetalLabelUI
All Implemented Interfaces:
EventListener, PropertyChangeListener
public class MetalLabelUI
extends BasicLabelUI

A Windows L&F implementation of LabelUI. This implementation is completely static, i.e. there's only one UIView implementation that's shared by all JLabel objects.

Field Summary
protected static MetalLabelUI metalLabelUI
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI
Constructor Summary
MetalLabelUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected void | paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY) Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, layoutCL, paint, paintEnabledText, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

metalLabelUI

protected static MetalLabelUI metalLabelUI
Constructor Detail

MetalLabelUI

public MetalLabelUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paintDisabledText

protected void paintDisabledText(JLabel l,
                                 Graphics g,
                                 String s,
                                 int textX,
                                 int textY)
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
Overrides:
paintDisabledText in class BasicLabelUI
See Also:
BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent), BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalLookAndFeel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalLookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
        |
        +--javax.swing.plaf.basic.BasicLookAndFeel
              |
              +--javax.swing.plaf.metal.MetalLookAndFeel
All Implemented Interfaces:
Serializable
public class MetalLookAndFeel
extends BasicLookAndFeel

Implements The Metal Look and Feel.

For the keyboard keys defined for each component in this Look and Feel (L&F), see Component Keystroke Actions for the Metal L&F.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
MetalLookAndFeel()
Method Summary
protected void | createDefaultTheme()
static ColorUIResource | getAcceleratorForeground()
static ColorUIResource | getAcceleratorSelectedForeground()
static ColorUIResource | getBlack()
static ColorUIResource | getControl()
static ColorUIResource | getControlDarkShadow()
static ColorUIResource | getControlDisabled()
static ColorUIResource | getControlHighlight()
static ColorUIResource | getControlInfo()
static ColorUIResource | getControlShadow()
static ColorUIResource | getControlTextColor()
static FontUIResource | getControlTextFont()
UIDefaults | getDefaults() This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
String | getDescription() Return a one line description of this look and feel implementation, e.g.
static ColorUIResource | getDesktopColor()
static ColorUIResource | getFocusColor()
static ColorUIResource | getHighlightedTextColor()
String | getID() Return a string that identifies this look and feel.
static ColorUIResource | getInactiveControlTextColor()
static ColorUIResource | getInactiveSystemTextColor()
static ColorUIResource | getMenuBackground()
static ColorUIResource | getMenuDisabledForeground()
static ColorUIResource | getMenuForeground()
static ColorUIResource | getMenuSelectedBackground()
static ColorUIResource | getMenuSelectedForeground()
static FontUIResource | getMenuTextFont()
String | getName() Return a short string that identifies this look and feel, e.g.
static ColorUIResource | getPrimaryControl()
static ColorUIResource | getPrimaryControlDarkShadow()
static ColorUIResource | getPrimaryControlHighlight()
static ColorUIResource | getPrimaryControlInfo()
static ColorUIResource | getPrimaryControlShadow()
static ColorUIResource | getSeparatorBackground()
static ColorUIResource | getSeparatorForeground()
static FontUIResource | getSubTextFont()
static ColorUIResource | getSystemTextColor()
static FontUIResource | getSystemTextFont()
static ColorUIResource | getTextHighlightColor()
static ColorUIResource | getUserTextColor()
static FontUIResource | getUserTextFont()
static ColorUIResource | getWhite()
static ColorUIResource | getWindowBackground()
static ColorUIResource | getWindowTitleBackground()
static FontUIResource | getWindowTitleFont()
static ColorUIResource | getWindowTitleForeground()
static ColorUIResource | getWindowTitleInactiveBackground()
static ColorUIResource | getWindowTitleInactiveForeground()
protected void | initClassDefaults(UIDefaults table) Initialize the uiClassID to BasicComponentUI mapping.
protected void | initComponentDefaults(UIDefaults table)
protected void | initSystemColorDefaults(UIDefaults table) Load the SystemColors into the defaults table.
boolean | isNativeLookAndFeel() If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
boolean | isSupportedLookAndFeel() Return true if the underlying platform supports and or permits this look and feel.
static void | setCurrentTheme(MetalTheme theme)
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
loadSystemColors
Methods inherited from class javax.swing.LookAndFeel
initialize, installBorder, installColors, installColorsAndFont, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninitialize, uninstallBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MetalLookAndFeel

public MetalLookAndFeel()
Method Detail

getName

public String getName()
Description copied from class: LookAndFeel
Return a short string that identifies this look and feel, e.g. "CDE/Motif". This string should be appropriate for a menu item. Distinct look and feels should have different names, e.g. a subclass of MotifLookAndFeel that changes the way a few components are rendered should be called "CDE/Motif My Way"; something that would be useful to a user trying to select a L&F from a list of names.
Overrides:
getName in class LookAndFeel

getID

public String getID()
Description copied from class: LookAndFeel
Return a string that identifies this look and feel. This string will be used by applications/services that want to recognize well known look and feel implementations. Presently the well known names are "Motif", "Windows", "Mac", "Metal". Note that a LookAndFeel derived from a well known superclass that doesn't make any fundamental changes to the look or feel shouldn't override this method.
Overrides:
getID in class LookAndFeel

getDescription

public String getDescription()
Description copied from class: LookAndFeel
Return a one line description of this look and feel implementation, e.g. "The CDE/Motif Look and Feel". This string is intended for the user, e.g. in the title of a window or in a ToolTip message.
Overrides:
getDescription in class LookAndFeel

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Description copied from class: LookAndFeel
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. For example a CDE/Motif look and implementation would return true when the underlying platform was Solaris.
Overrides:
isNativeLookAndFeel in class LookAndFeel

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Description copied from class: LookAndFeel
Return true if the underlying platform supports and or permits this look and feel. This method returns false if the look and feel depends on special resources or legal agreements that aren't defined for the current platform.
Overrides:
isSupportedLookAndFeel in class LookAndFeel
Following copied from class: javax.swing.LookAndFeel
See Also:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

initClassDefaults

protected void initClassDefaults(UIDefaults table)
Initialize the uiClassID to BasicComponentUI mapping. The JComponent classes define their own uiClassID constants (see AbstractComponent.getUIClassID). This table must map those constants to a BasicComponentUI class of the appropriate type.
Overrides:
initClassDefaults in class BasicLookAndFeel
See Also:
BasicLookAndFeel.getDefaults()

initSystemColorDefaults

protected void initSystemColorDefaults(UIDefaults table)
Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor.
Overrides:
initSystemColorDefaults in class BasicLookAndFeel

initComponentDefaults

protected void initComponentDefaults(UIDefaults table)
Overrides:
initComponentDefaults in class BasicLookAndFeel

createDefaultTheme

protected void createDefaultTheme()

getDefaults

public UIDefaults getDefaults()
Description copied from class: LookAndFeel
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.
Overrides:
getDefaults in class BasicLookAndFeel
Following copied from class: javax.swing.LookAndFeel
See Also:
LookAndFeel.initialize(),
LookAndFeel.uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

setCurrentTheme

public static void setCurrentTheme(MetalTheme theme)

getControlTextFont

public static FontUIResource getControlTextFont()

getSystemTextFont

public static FontUIResource getSystemTextFont()

getUserTextFont

public static FontUIResource getUserTextFont()

getMenuTextFont

public static FontUIResource getMenuTextFont()

getWindowTitleFont

public static FontUIResource getWindowTitleFont()

getSubTextFont

public static FontUIResource getSubTextFont()

getDesktopColor

public static ColorUIResource getDesktopColor()

getFocusColor

public static ColorUIResource getFocusColor()

getWhite

public static ColorUIResource getWhite()

getBlack

public static ColorUIResource getBlack()

getControl

public static ColorUIResource getControl()

getControlShadow

public static ColorUIResource getControlShadow()

getControlDarkShadow

public static ColorUIResource getControlDarkShadow()

getControlInfo

public static ColorUIResource getControlInfo()

getControlHighlight

public static ColorUIResource getControlHighlight()

getControlDisabled

public static ColorUIResource getControlDisabled()

getPrimaryControl

public static ColorUIResource getPrimaryControl()

getPrimaryControlShadow

public static ColorUIResource getPrimaryControlShadow()

getPrimaryControlDarkShadow

public static ColorUIResource getPrimaryControlDarkShadow()

getPrimaryControlInfo

public static ColorUIResource getPrimaryControlInfo()

getPrimaryControlHighlight

public static ColorUIResource getPrimaryControlHighlight()

getSystemTextColor

public static ColorUIResource getSystemTextColor()

getControlTextColor

public static ColorUIResource getControlTextColor()

getInactiveControlTextColor

public static ColorUIResource getInactiveControlTextColor()

getInactiveSystemTextColor

public static ColorUIResource getInactiveSystemTextColor()

getUserTextColor

public static ColorUIResource getUserTextColor()

getTextHighlightColor

public static ColorUIResource getTextHighlightColor()

getHighlightedTextColor

public static ColorUIResource getHighlightedTextColor()

getWindowBackground

public static ColorUIResource getWindowBackground()

getWindowTitleBackground

public static ColorUIResource getWindowTitleBackground()

getWindowTitleForeground

public static ColorUIResource getWindowTitleForeground()

getWindowTitleInactiveBackground

public static ColorUIResource getWindowTitleInactiveBackground()

getWindowTitleInactiveForeground

public static ColorUIResource getWindowTitleInactiveForeground()

getMenuBackground

public static ColorUIResource getMenuBackground()

getMenuForeground

public static ColorUIResource getMenuForeground()

getMenuSelectedBackground

public static ColorUIResource getMenuSelectedBackground()

getMenuSelectedForeground

public static ColorUIResource getMenuSelectedForeground()

getMenuDisabledForeground

public static ColorUIResource getMenuDisabledForeground()

getSeparatorBackground

public static ColorUIResource getSeparatorBackground()

getSeparatorForeground

public static ColorUIResource getSeparatorForeground()

getAcceleratorForeground

public static ColorUIResource getAcceleratorForeground()

getAcceleratorSelectedForeground

public static ColorUIResource getAcceleratorSelectedForeground()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalPopupMenuSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalPopupMenuSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.basic.BasicSeparatorUI
                    |
                    +--javax.swing.plaf.metal.MetalSeparatorUI
                          |
                          +--javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
public class MetalPopupMenuSeparatorUI
extends MetalSeparatorUI

A Metal L&F implementation of PopupMenuSeparatorUI. This implementation is a "combined" view/controller.

Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI
highlight, shadow
Constructor Summary
MetalPopupMenuSeparatorUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getPreferredSize(JComponent c)
void | paint(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.metal.MetalSeparatorUI
installDefaults
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI
getMaximumSize, getMinimumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalPopupMenuSeparatorUI

public MetalPopupMenuSeparatorUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class MetalSeparatorUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class MetalSeparatorUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalProgressBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalProgressBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ProgressBarUI
              |
              +--javax.swing.plaf.basic.BasicProgressBarUI
                    |
                    +--javax.swing.plaf.metal.MetalProgressBarUI
public class MetalProgressBarUI
extends BasicProgressBarUI

The Metal implementation of ProgressBarUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicProgressBarUI
BasicProgressBarUI.ChangeHandler
Fields inherited from class javax.swing.plaf.basic.BasicProgressBarUI
changeListener, progressBar
Constructor Summary
MetalProgressBarUI()
Method Summary
static ComponentUI | createUI(JComponent c)
void | paint(Graphics g, JComponent c) The sole reason for this paint method to even be here is that the JLF/Metal ProgressBar has a bit of special highlighting that needs to get drawn.
Methods inherited from class javax.swing.plaf.basic.BasicProgressBarUI
getAmountFull, getCellLength, getCellSpacing, getMaximumSize, getMinimumSize, getPreferredInnerHorizontal, getPreferredInnerVertical, getPreferredSize, getSelectionBackground, getSelectionForeground, getStringPlacement, installDefaults, installListeners, installUI, paintString, setCellLength, setCellSpacing, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalProgressBarUI

public MetalProgressBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)
The sole reason for this paint method to even be here is that the JLF/Metal ProgressBar has a bit of special highlighting that needs to get drawn. The core painting is defered to the BasicProgressBar's paint method.
Overrides:
paint in class BasicProgressBarUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalPropertyChangeListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxUI.MetalPropertyChangeListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
        |
        +--javax.swing.plaf.metal.MetalComboBoxUI.MetalPropertyChangeListener
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
MetalComboBoxUI
public class MetalComboBoxUI.MetalPropertyChangeListener
extends BasicComboBoxUI.PropertyChangeHandler

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Constructor Summary
MetalComboBoxUI.MetalPropertyChangeListener()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalComboBoxUI.MetalPropertyChangeListener

public MetalComboBoxUI.MetalPropertyChangeListener()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Overrides:
propertyChange in class BasicComboBoxUI.PropertyChangeHandler
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalPropertyListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalSliderUI.MetalPropertyListener

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler
        |
        +--javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
MetalSliderUI
protected class MetalSliderUI.MetalPropertyListener
extends BasicSliderUI.PropertyChangeHandler

Constructor Summary
protected MetalSliderUI.MetalPropertyListener()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalSliderUI.MetalPropertyListener

protected MetalSliderUI.MetalPropertyListener()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Overrides:
propertyChange in class BasicSliderUI.PropertyChangeHandler
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalRadioButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalRadioButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
                          |
                          +--javax.swing.plaf.basic.BasicRadioButtonUI
                                |
                                +--javax.swing.plaf.metal.MetalRadioButtonUI
Direct Known Subclasses:
MetalCheckBoxUI
public class MetalRadioButtonUI
extends BasicRadioButtonUI

RadioButtonUI implementation for MetalRadioButtonUI

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
protected Color | disabledTextColor
protected Color | focusColor
protected Color | selectColor
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
MetalRadioButtonUI()
Method Summary
static ComponentUI | createUI(JComponent c)
protected Color | getDisabledTextColor()
protected Color | getFocusColor()
protected Color | getSelectColor()
void | installDefaults(AbstractButton b)
void | paint(Graphics g, JComponent c) paint the radio button
protected void | paintFocus(Graphics g, Rectangle t, Dimension d)
protected void | uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultIcon, getPreferredSize, getPropertyPrefix
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
paintButtonPressed, paintFocus, paintIcon, paintText
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

focusColor

protected Color focusColor

selectColor

protected Color selectColor

disabledTextColor

protected Color disabledTextColor
Constructor Detail

MetalRadioButtonUI

public MetalRadioButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicRadioButtonUI

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class BasicRadioButtonUI

getSelectColor

protected Color getSelectColor()

getDisabledTextColor

protected Color getDisabledTextColor()

getFocusColor

protected Color getFocusColor()

paint

public void paint(Graphics g,
                  JComponent c)
Description copied from class: BasicRadioButtonUI
paint the radio button
Overrides:
paint in class BasicRadioButtonUI

paintFocus

protected void paintFocus(Graphics g,
                          Rectangle t,
                          Dimension d)
Overrides:
paintFocus in class BasicRadioButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalRolloverListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToolBarUI.MetalRolloverListener

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalToolBarUI.MetalRolloverListener
All Implemented Interfaces:
EventListener, PropertyChangeListener
Enclosing class:
MetalToolBarUI
protected class MetalToolBarUI.MetalRolloverListener
extends Object
implements PropertyChangeListener

Constructor Summary
protected MetalToolBarUI.MetalRolloverListener()
Method Summary
 void propertyChange(PropertyChangeEvent e)
This method gets called when a bound property is changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalToolBarUI.MetalRolloverListener

protected MetalToolBarUI.MetalRolloverListener()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from interface: PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalScrollBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalScrollBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollBarUI
              |
              +--javax.swing.plaf.basic.BasicScrollBarUI
                    |
                    +--javax.swing.plaf.metal.MetalScrollBarUI
All Implemented Interfaces:
LayoutManager, SwingConstants
public class MetalScrollBarUI
extends BasicScrollBarUI

Implementation of ScrollBarUI for the Metal Look and Feel

Inner classes inherited from class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
Field Summary
protected javax.swing.plaf.metal.MetalBumps | bumps
protected MetalScrollButton | decreaseButton
static String | FREE_STANDING_PROP
protected MetalScrollButton | increaseButton
protected boolean | isFreeStanding
protected int | scrollBarWidth
Fields inherited from class javax.swing.plaf.basic.BasicScrollBarUI
buttonListener, decrButton, DECREASE_HIGHLIGHT, incrButton, INCREASE_HIGHLIGHT, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollListener, scrollTimer, thumbColor, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
MetalScrollBarUI()
Method Summary
protected void | configureScrollBarColors()
protected JButton | createDecreaseButton(int orientation) Returns the view that represents the decrease view.
protected JButton | createIncreaseButton(int orientation) Returns the view that represents the increase view.
protected PropertyChangeListener | createPropertyChangeListener()
static ComponentUI | createUI(JComponent c)
protected Dimension | getMinimumThumbSize() Return the smallest acceptable size for the thumb.
Dimension | getPreferredSize(JComponent c) A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb.
protected void | installDefaults()
protected void | installListeners()
protected void | paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
protected void | paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected void | setThumbBounds(int x, int y, int width, int height) This is overridden only to increase the invalid area.
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getMinimumSize, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

bumps

protected javax.swing.plaf.metal.MetalBumps bumps

increaseButton

protected MetalScrollButton increaseButton

decreaseButton

protected MetalScrollButton decreaseButton

scrollBarWidth

protected int scrollBarWidth

FREE_STANDING_PROP

public static final String FREE_STANDING_PROP

isFreeStanding

protected boolean isFreeStanding
Constructor Detail

MetalScrollBarUI

public MetalScrollBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicScrollBarUI

installListeners

protected void installListeners()
Overrides:
installListeners in class BasicScrollBarUI

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Overrides:
createPropertyChangeListener in class BasicScrollBarUI

configureScrollBarColors

protected void configureScrollBarColors()
Overrides:
configureScrollBarColors in class BasicScrollBarUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Description copied from class: BasicScrollBarUI
A vertical scrollbars preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb. The preferred height is the sum of the preferred heights of the same parts. The basis for the preferred size of a horizontal scrollbar is similar.

The preferredSize is only computed once, subequent calls to this method just return a cached size. T

Overrides:
getPreferredSize in class BasicScrollBarUI
Following copied from class: javax.swing.plaf.basic.BasicScrollBarUI
Parameters:
c - The JScrollBar that's delegating this method to us.
Returns:
The preferred size of a Basic JScrollBar.
See Also:
BasicScrollBarUI.getMaximumSize(javax.swing.JComponent), BasicScrollBarUI.getMinimumSize(javax.swing.JComponent)

createDecreaseButton

protected JButton createDecreaseButton(int orientation)
Returns the view that represents the decrease view.
Overrides:
createDecreaseButton in class BasicScrollBarUI

createIncreaseButton

protected JButton createIncreaseButton(int orientation)
Returns the view that represents the increase view.
Overrides:
createIncreaseButton in class BasicScrollBarUI

paintTrack

protected void paintTrack(Graphics g,
                          JComponent c,
                          Rectangle trackBounds)
Overrides:
paintTrack in class BasicScrollBarUI

paintThumb

protected void paintThumb(Graphics g,
                          JComponent c,
                          Rectangle thumbBounds)
Overrides:
paintThumb in class BasicScrollBarUI

getMinimumThumbSize

protected Dimension getMinimumThumbSize()
Description copied from class: BasicScrollBarUI
Return the smallest acceptable size for the thumb. If the scrollbar becomes so small that this size isn't available, the thumb will be hidden.

Warning : the value returned by this method should not be be modified, it's a shared static constant.

Overrides:
getMinimumThumbSize in class BasicScrollBarUI
Following copied from class: javax.swing.plaf.basic.BasicScrollBarUI
Returns:
The smallest acceptable size for the thumb.
See Also:
BasicScrollBarUI.getMaximumThumbSize()

setThumbBounds

protected void setThumbBounds(int x,
                              int y,
                              int width,
                              int height)
This is overridden only to increase the invalid area. This ensures that the "Shadow" below the thumb is invalidated
Overrides:
setThumbBounds in class BasicScrollBarUI
Following copied from class: javax.swing.plaf.basic.BasicScrollBarUI
See Also:
BasicScrollBarUI.getThumbBounds()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalScrollButton

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalScrollButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.AbstractButton
                          |
                          +--javax.swing.JButton
                                |
                                +--javax.swing.plaf.basic.BasicArrowButton
                                      |
                                      +--javax.swing.plaf.metal.MetalScrollButton
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants
public class MetalScrollButton
extends BasicArrowButton

JButton object for Metal scrollbar arrows.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JButton
JButton.AccessibleJButton
Inner classes inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.plaf.basic.BasicArrowButton
direction
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MetalScrollButton(int direction, int width, boolean freeStanding)
Method Summary
int | getButtonWidth()
Dimension | getMaximumSize() If the maximum size has been set to a non-null value just returns it.
Dimension | getMinimumSize() If the minimum size has been set to a non-null value just returns it.
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it.
void | paint(Graphics g) This method is invoked by Swing to draw components.
void | setFreeStanding(boolean freeStanding)
Methods inherited from class javax.swing.plaf.basic.BasicArrowButton
getDirection, isFocusTraversable, paintTriangle, setDirection
Methods inherited from class javax.swing.JButton
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MetalScrollButton

public MetalScrollButton(int direction,
                         int width,
                         boolean freeStanding)
Method Detail

setFreeStanding

public void setFreeStanding(boolean freeStanding)

paint

public void paint(Graphics g)
Description copied from class: JComponent
This method is invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

Overrides:
paint in class BasicArrowButton
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics),
JComponent.paintBorder(java.awt.Graphics),
JComponent.paintChildren(java.awt.Graphics),
JComponent.getComponentGraphics(java.awt.Graphics),
JComponent.repaint(long, int, int, int, int)

getPreferredSize

public Dimension getPreferredSize()
Description copied from class: JComponent
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getPreferredSize in class BasicArrowButton
Following copied from class: javax.swing.JComponent
Returns:
the value of the preferredSize property
See Also:
JComponent.setPreferredSize(java.awt.Dimension)

getMinimumSize

public Dimension getMinimumSize()
Description copied from class: JComponent
If the minimum size has been set to a non-null value just returns it. If the UI delegate's getMinimumSize() method returns a non-null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMinimumSize in class BasicArrowButton
Following copied from class: javax.swing.JComponent
Returns:
the value of the minimumSize property
See Also:
JComponent.setMinimumSize(java.awt.Dimension)

getMaximumSize

public Dimension getMaximumSize()
Description copied from class: JComponent
If the maximum size has been set to a non-null value just returns it. If the UI delegate's getMaximumSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Overrides:
getMaximumSize in class BasicArrowButton
Following copied from class: javax.swing.JComponent
Returns:
the value of the maximumSize property.
See Also:
JComponent.setMaximumSize(java.awt.Dimension)

getButtonWidth

public int getButtonWidth()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalScrollPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalScrollPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollPaneUI
              |
              +--javax.swing.plaf.basic.BasicScrollPaneUI
                    |
                    +--javax.swing.plaf.metal.MetalScrollPaneUI
All Implemented Interfaces:
ScrollPaneConstants
public class MetalScrollPaneUI
extends BasicScrollPaneUI

A Metal L&F implementation of ScrollPaneUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
BasicScrollPaneUI.HSBChangeListener, BasicScrollPaneUI.PropertyChangeHandler, BasicScrollPaneUI.ViewportChangeHandler, BasicScrollPaneUI.VSBChangeListener
Fields inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
hsbChangeListener, scrollpane, spPropertyChangeListener, viewportChangeListener, vsbChangeListener
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor Summary
MetalScrollPaneUI()
Method Summary
protected PropertyChangeListener | createScrollBarSwapListener()
static ComponentUI | createUI(JComponent x)
void | installListeners(JScrollPane scrollPane)
void | installUI(JComponent c)
void | uninstallListeners(JScrollPane scrollPane)
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
createHSBChangeListener, createPropertyChangeListener, createViewportChangeListener, createVSBChangeListener, getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installKeyboardActions, paint, syncScrollPaneWithViewport, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateColumnHeader, updateRowHeader, updateScrollBarDisplayPolicy, updateViewport
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalScrollPaneUI

public MetalScrollPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicScrollPaneUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicScrollPaneUI

installListeners

public void installListeners(JScrollPane scrollPane)
Overrides:
installListeners in class BasicScrollPaneUI

uninstallListeners

public void uninstallListeners(JScrollPane scrollPane)

createScrollBarSwapListener

protected PropertyChangeListener createScrollBarSwapListener()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.basic.BasicSeparatorUI
                    |
                    +--javax.swing.plaf.metal.MetalSeparatorUI
Direct Known Subclasses:
MetalPopupMenuSeparatorUI
public class MetalSeparatorUI
extends BasicSeparatorUI

A Metal L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI
highlight, shadow
Constructor Summary
MetalSeparatorUI()
Method Summary
static ComponentUI | createUI(JComponent c)
Dimension | getPreferredSize(JComponent c)
protected void | installDefaults(JSeparator s)
void | paint(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI
getMaximumSize, getMinimumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalSeparatorUI

public MetalSeparatorUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults(JSeparator s)
Overrides:
installDefaults in class BasicSeparatorUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicSeparatorUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicSeparatorUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalSliderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalSliderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SliderUI
              |
              +--javax.swing.plaf.basic.BasicSliderUI
                    |
                    +--javax.swing.plaf.metal.MetalSliderUI
public class MetalSliderUI
extends BasicSliderUI

A Java L&F implementation of SliderUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
protected  class MetalSliderUI.MetalPropertyListener
Inner classes inherited from class javax.swing.plaf.basic.BasicSliderUI
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
Field Summary
protected static Color | darkShadowColor
protected boolean | filledSlider
protected static Color | highlightColor
protected static Icon | horizThumbIcon
protected String | SLIDER_FILL
protected static Color | thumbColor
protected int | TICK_BUFFER
protected static int | tickLength
protected static int | trackWidth
protected static Icon | vertThumbIcon
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
Constructor Summary
MetalSliderUI()
Method Summary
protected PropertyChangeListener | createPropertyChangeListener(JSlider slider)
static ComponentUI | createUI(JComponent c)
protected int | getThumbOverhang() Returns the amount that the thumb goes past the slide bar.
protected Dimension | getThumbSize()
int | getTickLength() Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
protected int | getTrackLength() Returns the longer dimension of the slide bar.
protected int | getTrackWidth() Returns the shorter dimension of the track.
void | installUI(JComponent c)
void | paintFocus(Graphics g)
protected void | paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
protected void | paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
protected void | paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
void | paintThumb(Graphics g)
void | paintTrack(Graphics g)
protected void | scrollDueToClickInTrack(int dir) This function is called when a mousePressed was detected in the track, not in the thumb.
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValueLabel, getHighlightColor, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, paint, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TICK_BUFFER

protected final int TICK_BUFFER

filledSlider

protected boolean filledSlider

thumbColor

protected static Color thumbColor

highlightColor

protected static Color highlightColor

darkShadowColor

protected static Color darkShadowColor

trackWidth

protected static int trackWidth

tickLength

protected static int tickLength

horizThumbIcon

protected static Icon horizThumbIcon

vertThumbIcon

protected static Icon vertThumbIcon

SLIDER_FILL

protected final String SLIDER_FILL
Constructor Detail

MetalSliderUI

public MetalSliderUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicSliderUI

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
Overrides:
createPropertyChangeListener in class BasicSliderUI

paintThumb

public void paintThumb(Graphics g)
Overrides:
paintThumb in class BasicSliderUI

paintTrack

public void paintTrack(Graphics g)
Overrides:
paintTrack in class BasicSliderUI

paintFocus

public void paintFocus(Graphics g)
Overrides:
paintFocus in class BasicSliderUI

getThumbSize

protected Dimension getThumbSize()
Overrides:
getThumbSize in class BasicSliderUI

getTickLength

public int getTickLength()
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle.
Overrides:
getTickLength in class BasicSliderUI

getTrackWidth

protected int getTrackWidth()
Returns the shorter dimension of the track.

getTrackLength

protected int getTrackLength()
Returns the longer dimension of the slide bar. (The slide bar is only the part that runs directly under the thumb)

getThumbOverhang

protected int getThumbOverhang()
Returns the amount that the thumb goes past the slide bar.

scrollDueToClickInTrack

protected void scrollDueToClickInTrack(int dir)
Description copied from class: BasicSliderUI
This function is called when a mousePressed was detected in the track, not in the thumb. The default behavior is to scroll by block. You can override this method to stop it from scrolling or to add additional behavior.
Overrides:
scrollDueToClickInTrack in class BasicSliderUI

paintMinorTickForHorizSlider

protected void paintMinorTickForHorizSlider(Graphics g,
                                            Rectangle tickBounds,
                                            int x)
Overrides:
paintMinorTickForHorizSlider in class BasicSliderUI

paintMajorTickForHorizSlider

protected void paintMajorTickForHorizSlider(Graphics g,
                                            Rectangle tickBounds,
                                            int x)
Overrides:
paintMajorTickForHorizSlider in class BasicSliderUI

paintMinorTickForVertSlider

protected void paintMinorTickForVertSlider(Graphics g,
                                           Rectangle tickBounds,
                                           int y)
Overrides:
paintMinorTickForVertSlider in class BasicSliderUI

paintMajorTickForVertSlider

protected void paintMajorTickForVertSlider(Graphics g,
                                           Rectangle tickBounds,
                                           int y)
Overrides:
paintMajorTickForVertSlider in class BasicSliderUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalSplitPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalSplitPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SplitPaneUI
              |
              +--javax.swing.plaf.basic.BasicSplitPaneUI
                    |
                    +--javax.swing.plaf.metal.MetalSplitPaneUI
public class MetalSplitPaneUI
extends BasicSplitPaneUI

Metal split pane.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
BasicSplitPaneUI.BasicHorizontalLayoutManager, BasicSplitPaneUI.BasicVerticalLayoutManager, BasicSplitPaneUI.FocusHandler, BasicSplitPaneUI.KeyboardDownRightHandler, BasicSplitPaneUI.KeyboardEndHandler, BasicSplitPaneUI.KeyboardHomeHandler, BasicSplitPaneUI.KeyboardResizeToggleHandler, BasicSplitPaneUI.KeyboardUpLeftHandler, BasicSplitPaneUI.PropertyHandler
Fields inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
beginDragDividerLocation, divider, dividerResizeToggleKey, dividerSize, downKey, draggingHW, endKey, focusListener, homeKey, KEYBOARD_DIVIDER_MOVE_OFFSET, keyboardDownRightListener, keyboardEndListener, keyboardHomeListener, keyboardResizeToggleListener, keyboardUpLeftListener, layoutManager, leftKey, NON_CONTINUOUS_DIVIDER, nonContinuousLayoutDivider, propertyChangeListener, rightKey, splitPane, upKey
Constructor Summary
MetalSplitPaneUI()
Method Summary
BasicSplitPaneDivider | createDefaultDivider() Creates the default divider.
static ComponentUI | createUI(JComponent x) Creates a new MetalSplitPaneUI instance
Methods inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
createDefaultNonContinuousLayoutDivider, createFocusListener, createKeyboardDownRightListener, createKeyboardEndListener, createKeyboardHomeListener, createKeyboardResizeToggleListener, createKeyboardUpLeftListener, createPropertyChangeListener, dragDividerTo, finishDraggingTo, finishedPaintingChildren, getDivider, getDividerBorderSize, getDividerLocation, getInsets, getLastDragLocation, getMaximumDividerLocation, getMaximumSize, getMinimumDividerLocation, getMinimumSize, getNonContinuousLayoutDivider, getOrientation, getPreferredSize, getSplitPane, installDefaults, installKeyboardActions, installListeners, installUI, isContinuousLayout, paint, resetLayoutManager, resetToPreferredSizes, setContinuousLayout, setDividerLocation, setLastDragLocation, setNonContinuousLayoutDivider, setNonContinuousLayoutDivider, setOrientation, startDragging, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalSplitPaneUI

public MetalSplitPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)
Creates a new MetalSplitPaneUI instance

createDefaultDivider

public BasicSplitPaneDivider createDefaultDivider()
Creates the default divider.
Overrides:
createDefaultDivider in class BasicSplitPaneUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalTabbedPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalTabbedPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TabbedPaneUI
              |
              +--javax.swing.plaf.basic.BasicTabbedPaneUI
                    |
                    +--javax.swing.plaf.metal.MetalTabbedPaneUI
All Implemented Interfaces:
SwingConstants
public class MetalTabbedPaneUI
extends BasicTabbedPaneUI

The Metal subclass of BasicTabbedPaneUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
 class MetalTabbedPaneUI.TabbedPaneLayout
This inner class is marked "public" due to a compiler bug.
Inner classes inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandler
Field Summary
protected int | minTabWidth
protected Color | selectColor
protected Color | selectHighlight
protected Color | tabAreaBackground
Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
MetalTabbedPaneUI()
Method Summary
protected int | calculateMaxTabHeight(int tabPlacement)
protected LayoutManager | createLayoutManager()
static ComponentUI | createUI(JComponent x)
protected Color | getColorForGap(int currentRun, int x, int y)
protected int | getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) Overidden to do nothing for the Java L&F.
protected int | getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) Overidden to do nothing for the Java L&F.
protected int | getTabRunOverlay(int tabPlacement)
protected void | installDefaults()
void | paint(Graphics g, JComponent c)
protected void | paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void | paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void | paintHighlightBelowTab()
protected void | paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void | paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected void | paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) this function draws the border around each tab note that this function does now draw the background of the tab.
protected void | paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected boolean | shouldFillGap(int currentRun, int tabIndex, int x, int y)
protected boolean | shouldPadTabRun(int tabPlacement, int run)
protected boolean | shouldRotateTabRuns(int tabPlacement, int selectedRun)
void | update(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createMouseListener, createPropertyChangeListener, expandTabRunsArray, getContentBorderInsets, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getPreferredSize, getPreviousTabIndex, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getVisibleComponent, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintIcon, paintTab, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectPreviousTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

minTabWidth

protected int minTabWidth

tabAreaBackground

protected Color tabAreaBackground

selectColor

protected Color selectColor

selectHighlight

protected Color selectHighlight
Constructor Detail

MetalTabbedPaneUI

public MetalTabbedPaneUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

createLayoutManager

protected LayoutManager createLayoutManager()
Overrides:
createLayoutManager in class BasicTabbedPaneUI

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicTabbedPaneUI

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
Description copied from class: BasicTabbedPaneUI
this function draws the border around each tab note that this function does now draw the background of the tab. that is done elsewhere
Overrides:
paintTabBorder in class BasicTabbedPaneUI

paintTopTabBorder

protected void paintTopTabBorder(int tabIndex,
                                 Graphics g,
                                 int x,
                                 int y,
                                 int w,
                                 int h,
                                 int btm,
                                 int rght,
                                 boolean isSelected)

shouldFillGap

protected boolean shouldFillGap(int currentRun,
                                int tabIndex,
                                int x,
                                int y)

getColorForGap

protected Color getColorForGap(int currentRun,
                               int x,
                               int y)

paintLeftTabBorder

protected void paintLeftTabBorder(int tabIndex,
                                  Graphics g,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  int btm,
                                  int rght,
                                  boolean isSelected)

paintBottomTabBorder

protected void paintBottomTabBorder(int tabIndex,
                                    Graphics g,
                                    int x,
                                    int y,
                                    int w,
                                    int h,
                                    int btm,
                                    int rght,
                                    boolean isSelected)

paintRightTabBorder

protected void paintRightTabBorder(int tabIndex,
                                   Graphics g,
                                   int x,
                                   int y,
                                   int w,
                                   int h,
                                   int btm,
                                   int rght,
                                   boolean isSelected)

update

public void update(Graphics g,
                   JComponent c)
Overrides:
update in class ComponentUI

paintTabBackground

protected void paintTabBackground(Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)
Overrides:
paintTabBackground in class BasicTabbedPaneUI

getTabLabelShiftX

protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overidden to do nothing for the Java L&F.
Overrides:
getTabLabelShiftX in class BasicTabbedPaneUI

getTabLabelShiftY

protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overidden to do nothing for the Java L&F.
Overrides:
getTabLabelShiftY in class BasicTabbedPaneUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicTabbedPaneUI

paintHighlightBelowTab

protected void paintHighlightBelowTab()

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int tabPlacement,
                                   Rectangle[] rects,
                                   int tabIndex,
                                   Rectangle iconRect,
                                   Rectangle textRect,
                                   boolean isSelected)
Overrides:
paintFocusIndicator in class BasicTabbedPaneUI

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)
Overrides:
paintContentBorderTopEdge in class BasicTabbedPaneUI

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
Overrides:
paintContentBorderBottomEdge in class BasicTabbedPaneUI

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
Overrides:
paintContentBorderLeftEdge in class BasicTabbedPaneUI

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
Overrides:
paintContentBorderRightEdge in class BasicTabbedPaneUI

calculateMaxTabHeight

protected int calculateMaxTabHeight(int tabPlacement)
Overrides:
calculateMaxTabHeight in class BasicTabbedPaneUI

getTabRunOverlay

protected int getTabRunOverlay(int tabPlacement)
Overrides:
getTabRunOverlay in class BasicTabbedPaneUI

shouldRotateTabRuns

protected boolean shouldRotateTabRuns(int tabPlacement,
                                      int selectedRun)

shouldPadTabRun

protected boolean shouldPadTabRun(int tabPlacement,
                                  int run)
Overrides:
shouldPadTabRun in class BasicTabbedPaneUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalTextFieldUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalTextFieldUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.plaf.basic.BasicTextFieldUI
                          |
                          +--javax.swing.plaf.metal.MetalTextFieldUI
All Implemented Interfaces:
ViewFactory
public class MetalTextFieldUI
extends BasicTextFieldUI

Basis of a look and feel for a JTextField.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
MetalTextFieldUI()
Method Summary
static ComponentUI | createUI(JComponent c) Creates a UI for a JTextField.
void | installUI(JComponent c) Installs the UI for a component.
void | propertyChange(PropertyChangeEvent e) This method gets called when a bound property is changed on the associated JTextComponent.
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
create, createCaret, getPropertyPrefix
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalTextFieldUI

public MetalTextFieldUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Description copied from class: BasicTextFieldUI
Creates a UI for a JTextField.
Following copied from class: javax.swing.plaf.basic.BasicTextFieldUI
Parameters:
c - the text field
Returns:
the UI

installUI

public void installUI(JComponent c)
Description copied from class: BasicTextUI
Installs the UI for a component. This does the following things.
  1. Set the associated component to opaque (can be changed easily by a subclass or on JTextComponent directly), which is the most common case. This will cause the component's background color to be painted.
  2. Install the default caret and highlighter into the associated component.
  3. Attach to the editor and model. If there is no model, a default one is created.
  4. create the view factory and the view hierarchy used to represent the model.
Overrides:
installUI in class BasicTextUI
Following copied from class: javax.swing.plaf.basic.BasicTextUI
Parameters:
c - the editor component
See Also:
ComponentUI.installUI(javax.swing.JComponent)

propertyChange

public void propertyChange(PropertyChangeEvent e)
Description copied from class: BasicTextFieldUI
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses.
Overrides:
propertyChange in class BasicTextFieldUI
Following copied from class: javax.swing.plaf.basic.BasicTextFieldUI
Parameters:
evt - the property change event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalTheme

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalTheme

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalTheme
Direct Known Subclasses:
DefaultMetalTheme
public abstract class MetalTheme
extends Object

This interface acts as a generic way to describe the colors used by Metal. Classes which implement this interface can be used to swap the colors in a Metal application.

Constructor Summary
MetalTheme()
Method Summary
void | addCustomEntriesToTable(UIDefaults table)
ColorUIResource | getAcceleratorForeground()
ColorUIResource | getAcceleratorSelectedForeground()
protected ColorUIResource | getBlack()
ColorUIResource | getControl()
ColorUIResource | getControlDarkShadow()
ColorUIResource | getControlDisabled()
ColorUIResource | getControlHighlight()
ColorUIResource | getControlInfo()
ColorUIResource | getControlShadow()
ColorUIResource | getControlTextColor()
abstract FontUIResource | getControlTextFont()
ColorUIResource | getDesktopColor()
ColorUIResource | getFocusColor()
ColorUIResource | getHighlightedTextColor()
ColorUIResource | getInactiveControlTextColor()
ColorUIResource | getInactiveSystemTextColor()
ColorUIResource | getMenuBackground()
ColorUIResource | getMenuDisabledForeground()
ColorUIResource | getMenuForeground()
ColorUIResource | getMenuSelectedBackground()
ColorUIResource | getMenuSelectedForeground()
abstract FontUIResource | getMenuTextFont()
abstract String | getName()
protected abstract ColorUIResource | getPrimary1()
protected abstract ColorUIResource | getPrimary2()
protected abstract ColorUIResource | getPrimary3()
ColorUIResource | getPrimaryControl()
ColorUIResource | getPrimaryControlDarkShadow()
ColorUIResource | getPrimaryControlHighlight()
ColorUIResource | getPrimaryControlInfo()
ColorUIResource | getPrimaryControlShadow()
protected abstract ColorUIResource | getSecondary1()
protected abstract ColorUIResource | getSecondary2()
protected abstract ColorUIResource | getSecondary3()
ColorUIResource | getSeparatorBackground()
ColorUIResource | getSeparatorForeground()
abstract FontUIResource | getSubTextFont()
ColorUIResource | getSystemTextColor()
abstract FontUIResource | getSystemTextFont()
ColorUIResource | getTextHighlightColor()
ColorUIResource | getUserTextColor()
abstract FontUIResource | getUserTextFont()
protected ColorUIResource | getWhite()
ColorUIResource | getWindowBackground()
ColorUIResource | getWindowTitleBackground()
abstract FontUIResource | getWindowTitleFont()
ColorUIResource | getWindowTitleForeground()
ColorUIResource | getWindowTitleInactiveBackground()
ColorUIResource | getWindowTitleInactiveForeground()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalTheme

public MetalTheme()
Method Detail

getName

public abstract String getName()

getPrimary1

protected abstract ColorUIResource getPrimary1()

getPrimary2

protected abstract ColorUIResource getPrimary2()

getPrimary3

protected abstract ColorUIResource getPrimary3()

getSecondary1

protected abstract ColorUIResource getSecondary1()

getSecondary2

protected abstract ColorUIResource getSecondary2()

getSecondary3

protected abstract ColorUIResource getSecondary3()

getControlTextFont

public abstract FontUIResource getControlTextFont()

getSystemTextFont

public abstract FontUIResource getSystemTextFont()

getUserTextFont

public abstract FontUIResource getUserTextFont()

getMenuTextFont

public abstract FontUIResource getMenuTextFont()

getWindowTitleFont

public abstract FontUIResource getWindowTitleFont()

getSubTextFont

public abstract FontUIResource getSubTextFont()

getWhite

protected ColorUIResource getWhite()

getBlack

protected ColorUIResource getBlack()

getFocusColor

public ColorUIResource getFocusColor()

getDesktopColor

public ColorUIResource getDesktopColor()

getControl

public ColorUIResource getControl()

getControlShadow

public ColorUIResource getControlShadow()

getControlDarkShadow

public ColorUIResource getControlDarkShadow()

getControlInfo

public ColorUIResource getControlInfo()

getControlHighlight

public ColorUIResource getControlHighlight()

getControlDisabled

public ColorUIResource getControlDisabled()

getPrimaryControl

public ColorUIResource getPrimaryControl()

getPrimaryControlShadow

public ColorUIResource getPrimaryControlShadow()

getPrimaryControlDarkShadow

public ColorUIResource getPrimaryControlDarkShadow()

getPrimaryControlInfo

public ColorUIResource getPrimaryControlInfo()

getPrimaryControlHighlight

public ColorUIResource getPrimaryControlHighlight()

getSystemTextColor

public ColorUIResource getSystemTextColor()

getControlTextColor

public ColorUIResource getControlTextColor()

getInactiveControlTextColor

public ColorUIResource getInactiveControlTextColor()

getInactiveSystemTextColor

public ColorUIResource getInactiveSystemTextColor()

getUserTextColor

public ColorUIResource getUserTextColor()

getTextHighlightColor

public ColorUIResource getTextHighlightColor()

getHighlightedTextColor

public ColorUIResource getHighlightedTextColor()

getWindowBackground

public ColorUIResource getWindowBackground()

getWindowTitleBackground

public ColorUIResource getWindowTitleBackground()

getWindowTitleForeground

public ColorUIResource getWindowTitleForeground()

getWindowTitleInactiveBackground

public ColorUIResource getWindowTitleInactiveBackground()

getWindowTitleInactiveForeground

public ColorUIResource getWindowTitleInactiveForeground()

getMenuBackground

public ColorUIResource getMenuBackground()

getMenuForeground

public ColorUIResource getMenuForeground()

getMenuSelectedBackground

public ColorUIResource getMenuSelectedBackground()

getMenuSelectedForeground

public ColorUIResource getMenuSelectedForeground()

getMenuDisabledForeground

public ColorUIResource getMenuDisabledForeground()

getSeparatorBackground

public ColorUIResource getSeparatorBackground()

getSeparatorForeground

public ColorUIResource getSeparatorForeground()

getAcceleratorForeground

public ColorUIResource getAcceleratorForeground()

getAcceleratorSelectedForeground

public ColorUIResource getAcceleratorSelectedForeground()

addCustomEntriesToTable

public void addCustomEntriesToTable(UIDefaults table)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalToggleButtonUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToggleButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.basic.BasicButtonUI
                    |
                    +--javax.swing.plaf.basic.BasicToggleButtonUI
                          |
                          +--javax.swing.plaf.metal.MetalToggleButtonUI
public class MetalToggleButtonUI
extends BasicToggleButtonUI

MetalToggleButton implementation

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
protected Color | disabledTextColor
protected Color | focusColor
protected Color | selectColor
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
MetalToggleButtonUI()
Method Summary
static ComponentUI | createUI(JComponent b)
protected Color | getDisabledTextColor()
protected Color | getFocusColor()
protected Color | getSelectColor()
void | installDefaults(AbstractButton b)
protected void | paintButtonPressed(Graphics g, AbstractButton b)
protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void | paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void | uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getPropertyPrefix, paint, paintIcon, paintText
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

focusColor

protected Color focusColor

selectColor

protected Color selectColor

disabledTextColor

protected Color disabledTextColor
Constructor Detail

MetalToggleButtonUI

public MetalToggleButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicButtonUI

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class BasicButtonUI

getSelectColor

protected Color getSelectColor()

getDisabledTextColor

protected Color getDisabledTextColor()

getFocusColor

protected Color getFocusColor()

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overrides:
paintButtonPressed in class BasicToggleButtonUI

paintText

protected void paintText(Graphics g,
                         JComponent c,
                         Rectangle textRect,
                         String text)
Overrides:
paintText in class BasicButtonUI

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Overrides:
paintFocus in class BasicToggleButtonUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalToolBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToolBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolBarUI
              |
              +--javax.swing.plaf.basic.BasicToolBarUI
                    |
                    +--javax.swing.plaf.metal.MetalToolBarUI
All Implemented Interfaces:
SwingConstants
public class MetalToolBarUI
extends BasicToolBarUI

A Metal Look and Feel implementation of ToolBarUI. This implementation is a "combined" view/controller.

Inner Class Summary
protected class | MetalToolBarUI.MetalContainerListener
protected class | MetalToolBarUI.MetalDockingListener
protected class | MetalToolBarUI.MetalRolloverListener
Inner classes inherited from class javax.swing.plaf.basic.BasicToolBarUI
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener
Field Summary
protected ContainerListener | contListener
protected PropertyChangeListener | rolloverListener
Fields inherited from class javax.swing.plaf.basic.BasicToolBarUI
dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKey
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
MetalToolBarUI()
Method Summary
protected ContainerListener | createContainerListener()
protected MouseInputListener | createDockingListener()
protected PropertyChangeListener | createRolloverListener()
static ComponentUI | createUI(JComponent c)
protected void | installListeners()
protected void | installNonRolloverBorders(JComponent c)
protected void | installNormalBorders(JComponent c)
protected void | installRolloverBorders(JComponent c)
void | installUI(JComponent c)
boolean | isRolloverBorders()
protected void | setBorderToNonRollover(Component c)
protected void | setBorderToNormal(Component c)
protected void | setBorderToRollover(Component c)
protected void | setDragOffset(Point p)
void | setRolloverBorders(boolean rollover)
protected void | uninstallListeners()
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI
canDock, createDragWindow, createFloatingFrame, createFrameListener, createPropertyListener, createToolBarContListener, createToolBarFocusListener, dragTo, floatAt, getDockingColor, getFloatingColor, getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, isFloating, navigateFocusedComp, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setOrientation, uninstallComponents, uninstallDefaults, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

contListener

protected ContainerListener contListener

rolloverListener

protected PropertyChangeListener rolloverListener
Constructor Detail

MetalToolBarUI

public MetalToolBarUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicToolBarUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicToolBarUI

installListeners

protected void installListeners()
Overrides:
installListeners in class BasicToolBarUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class BasicToolBarUI

createContainerListener

protected ContainerListener createContainerListener()

createRolloverListener

protected PropertyChangeListener createRolloverListener()

createDockingListener

protected MouseInputListener createDockingListener()
Overrides:
createDockingListener in class BasicToolBarUI

setDragOffset

protected void setDragOffset(Point p)

isRolloverBorders

public boolean isRolloverBorders()

setRolloverBorders

public void setRolloverBorders(boolean rollover)

installRolloverBorders

protected void installRolloverBorders(JComponent c)

installNonRolloverBorders

protected void installNonRolloverBorders(JComponent c)

installNormalBorders

protected void installNormalBorders(JComponent c)

setBorderToRollover

protected void setBorderToRollover(Component c)

setBorderToNonRollover

protected void setBorderToNonRollover(Component c)

setBorderToNormal

protected void setBorderToNormal(Component c)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalToolTipUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalToolTipUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolTipUI
              |
              +--javax.swing.plaf.basic.BasicToolTipUI
                    |
                    +--javax.swing.plaf.metal.MetalToolTipUI
public class MetalToolTipUI
extends BasicToolTipUI

A Metal L&F extension of BasicToolTipUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
static int padSpaceBetweenStrings
Constructor Summary
MetalToolTipUI()
Method Summary
static ComponentUI | createUI(JComponent c)
String | getAcceleratorString()
Dimension | getPreferredSize(JComponent c)
void | installUI(JComponent c)
void | paint(Graphics g, JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicToolTipUI
getMaximumSize, getMinimumSize, installDefaults, installListeners, uninstallDefaults, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

padSpaceBetweenStrings

public static final int padSpaceBetweenStrings
Constructor Detail

MetalToolTipUI

public MetalToolTipUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicToolTipUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicToolTipUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicToolTipUI

getAcceleratorString

public String getAcceleratorString()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MetalTreeUI

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalTreeUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TreeUI
              |
              +--javax.swing.plaf.basic.BasicTreeUI
                    |
                    +--javax.swing.plaf.metal.MetalTreeUI
public class MetalTreeUI
extends BasicTreeUI

MetalTreeUI supports the client property "value-add" system of customization It uses it to determine what style of line to draw. There are three choices. The default choice is to draw no lines. Also available is a more variant with angled legs running from parent to child. Lastly you can choose an option with horizonl lines be lines at all. Here is some code to turn on angled legs. tree.putClientProperty("JTree.lineStyle", "Angled"); Here is some code to turn on horizontal lines between root nodes. tree.putClientProperty("JTree.lineStyle", "Horizontal"); Here is some code to turn off lines all together (which is the default). tree.putClientProperty("JTree.lineStyle", "None");

Inner classes inherited from class javax.swing.plaf.basic.BasicTreeUI
BasicTreeUI.CellEditorHandler, BasicTreeUI.ComponentHandler, BasicTreeUI.FocusHandler, BasicTreeUI.KeyHandler, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, BasicTreeUI.NodeDimensionsHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeExpansionHandler, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreeModelHandler, BasicTreeUI.TreePageAction, BasicTreeUI.TreeSelectionHandler, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction
Fields inherited from class javax.swing.plaf.basic.BasicTreeUI
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize
Constructor Summary
MetalTreeUI()
Method Summary
static ComponentUI | createUI(JComponent x)
protected void | decodeLineStyle(Object lineStyleFlag) this function converts between the string passed into the client property and the internal representation (currently and int)
protected int | getHorizontalLegBuffer() The horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default.
void | installUI(JComponent c)
protected boolean | isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)
void | paint(Graphics g, JComponent c)
protected void | paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the horizontal part of the leg.
protected void | paintHorizontalSeparators(Graphics g, JComponent c)
protected void | paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) Paints the vertical part of the leg.
void | uninstallUI(JComponent c)
Methods inherited from class javax.swing.plaf.basic.BasicTreeUI
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createDefaultCellRenderer, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getLastChildPath, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installDefaults, installKeyboardActions, installListeners, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintExpandControl, paintHorizontalLine, paintRow, paintVerticalLine, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateRenderer, updateSize
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalTreeUI

public MetalTreeUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)

getHorizontalLegBuffer

protected int getHorizontalLegBuffer()
Description copied from class: BasicTreeUI
The horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default. This method makes the leg end before that.
Overrides:
getHorizontalLegBuffer in class BasicTreeUI

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicTreeUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicTreeUI

decodeLineStyle

protected void decodeLineStyle(Object lineStyleFlag)
this function converts between the string passed into the client property and the internal representation (currently and int)

isLocationInExpandControl

protected boolean isLocationInExpandControl(int row,
                                            int rowLevel,
                                            int mouseX,
                                            int mouseY)

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicTreeUI

paintHorizontalSeparators

protected void paintHorizontalSeparators(Graphics g,
                                         JComponent c)

paintVerticalPartOfLeg

protected void paintVerticalPartOfLeg(Graphics g,
                                      Rectangle clipBounds,
                                      Insets insets,
                                      TreePath path)
Description copied from class: BasicTreeUI
Paints the vertical part of the leg. The reciever should NOT modify clipBounds, insets.

Overrides:
paintVerticalPartOfLeg in class BasicTreeUI

paintHorizontalPartOfLeg

protected void paintHorizontalPartOfLeg(Graphics g,
                                        Rectangle clipBounds,
                                        Insets insets,
                                        Rectangle bounds,
                                        TreePath path,
                                        int row,
                                        boolean isExpanded,
                                        boolean hasBeenExpanded,
                                        boolean isLeaf)
Description copied from class: BasicTreeUI
Paints the horizontal part of the leg. The reciever should NOT modify clipBounds, or insets.

NOTE: parentRow can be -1 if the root is not visible.

Overrides:
paintHorizontalPartOfLeg in class BasicTreeUI
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


OptionDialogBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.OptionDialogBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.OptionDialogBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.OptionDialogBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
MetalBorders.OptionDialogBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.OptionDialogBorder

public MetalBorders.OptionDialogBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PaletteBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.PaletteBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.PaletteBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.PaletteBorder
extends AbstractBorder
implements UIResource

Border for a Palatte.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
MetalBorders.PaletteBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.PaletteBorder

public MetalBorders.PaletteBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PaletteCloseIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.PaletteCloseIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon
All Implemented Interfaces:
Icon, Serializable, UIResource
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.PaletteCloseIcon
extends Object
implements Icon, UIResource, Serializable

Defines an icon for Palette close

Since:
1.3
See Also:
Serialized Form

Constructor Summary
MetalIconFactory.PaletteCloseIcon()
Method Summary
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalIconFactory.PaletteCloseIcon

public MetalIconFactory.PaletteCloseIcon()
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PopupMenuBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.PopupMenuBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.PopupMenuBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.PopupMenuBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Field Summary
protected static Insets borderInsets
Constructor Summary
MetalBorders.PopupMenuBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

borderInsets

protected static Insets borderInsets
Constructor Detail

MetalBorders.PopupMenuBorder

public MetalBorders.PopupMenuBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RolloverButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.RolloverButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.ButtonBorder
              |
              +--javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.RolloverButtonBorder
extends MetalBorders.ButtonBorder

See Also:
Serialized Form

Fields inherited from class javax.swing.plaf.metal.MetalBorders.ButtonBorder
borderInsets
Constructor Summary
MetalBorders.RolloverButtonBorder()
Method Summary
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
This default implementation does no painting.
Methods inherited from class javax.swing.plaf.metal.MetalBorders.ButtonBorder
getBorderInsets
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.RolloverButtonBorder

public MetalBorders.RolloverButtonBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class MetalBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollPaneBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.ScrollPaneBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.ScrollPaneBorder
extends AbstractBorder
implements UIResource

See Also:
Serialized Form

Constructor Summary
MetalBorders.ScrollPaneBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.ScrollPaneBorder

public MetalBorders.ScrollPaneBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleClickListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalFileChooserUI.SingleClickListener

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.plaf.metal.MetalFileChooserUI.SingleClickListener
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
MetalFileChooserUI
protected class MetalFileChooserUI.SingleClickListener
extends MouseAdapter

Constructor Summary
MetalFileChooserUI.SingleClickListener(JList list)
Method Summary
 void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalFileChooserUI.SingleClickListener

public MetalFileChooserUI.SingleClickListener(JList list)
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Description copied from class: MouseAdapter
Invoked when the mouse has been clicked on a component.
Overrides:
mouseClicked in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabbedPaneLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalTabbedPaneUI.TabbedPaneLayout

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
        |
        +--javax.swing.plaf.metal.MetalTabbedPaneUI.TabbedPaneLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
MetalTabbedPaneUI
public class MetalTabbedPaneUI.TabbedPaneLayout
extends BasicTabbedPaneUI.TabbedPaneLayout

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of MetalTabbedPaneUI.

Constructor Summary
MetalTabbedPaneUI.TabbedPaneLayout()
Method Summary
protected void | normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
protected void | padSelectedTab(int tabPlacement, int selectedIndex)
protected void | rotateTabRuns(int tabPlacement, int selectedRun)
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
addLayoutComponent, calculateLayoutInfo, calculateSize, calculateTabRects, layoutContainer, minimumLayoutSize, padTabRun, preferredLayoutSize, preferredTabAreaHeight, preferredTabAreaWidth, removeLayoutComponent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalTabbedPaneUI.TabbedPaneLayout

public MetalTabbedPaneUI.TabbedPaneLayout()
Method Detail

normalizeTabRuns

protected void normalizeTabRuns(int tabPlacement,
                                int tabCount,
                                int start,
                                int max)
Overrides:
normalizeTabRuns in class BasicTabbedPaneUI.TabbedPaneLayout

rotateTabRuns

protected void rotateTabRuns(int tabPlacement,
                             int selectedRun)
Overrides:
rotateTabRuns in class BasicTabbedPaneUI.TabbedPaneLayout

padSelectedTab

protected void padSelectedTab(int tabPlacement,
                              int selectedIndex)
Overrides:
padSelectedTab in class BasicTabbedPaneUI.TabbedPaneLayout
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableHeaderBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.TableHeaderBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.TableHeaderBorder
All Implemented Interfaces:
Border, Serializable
Enclosing class:
MetalBorders
public static class MetalBorders.TableHeaderBorder
extends AbstractBorder

Border for a Table Header

Since:
1.3
See Also:
Serialized Form

Field Summary
protected  Insets editorBorderInsets
Constructor Summary
MetalBorders.TableHeaderBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

editorBorderInsets

protected Insets editorBorderInsets
Constructor Detail

MetalBorders.TableHeaderBorder

public MetalBorders.TableHeaderBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextFieldBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.TextFieldBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.Flush3DBorder
              |
              +--javax.swing.plaf.metal.MetalBorders.TextFieldBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.TextFieldBorder
extends MetalBorders.Flush3DBorder

See Also:
Serialized Form

Constructor Summary
MetalBorders.TextFieldBorder()
Method Summary
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
This default implementation does no painting.
Methods inherited from class javax.swing.plaf.metal.MetalBorders.Flush3DBorder
getBorderInsets
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.TextFieldBorder

public MetalBorders.TextFieldBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class MetalBorders.Flush3DBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToggleButtonBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.ToggleButtonBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.ButtonBorder
              |
              +--javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.ToggleButtonBorder
extends MetalBorders.ButtonBorder

See Also:
Serialized Form

Fields inherited from class javax.swing.plaf.metal.MetalBorders.ButtonBorder
borderInsets
Constructor Summary
MetalBorders.ToggleButtonBorder()
Method Summary
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
This default implementation does no painting.
Methods inherited from class javax.swing.plaf.metal.MetalBorders.ButtonBorder
getBorderInsets
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalBorders.ToggleButtonBorder

public MetalBorders.ToggleButtonBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class MetalBorders.ButtonBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolBarBorder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalBorders.ToolBarBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.plaf.metal.MetalBorders.ToolBarBorder
All Implemented Interfaces:
Border, Serializable, SwingConstants, UIResource
Enclosing class:
MetalBorders
public static class MetalBorders.ToolBarBorder
extends AbstractBorder
implements UIResource, SwingConstants

See Also:
Serialized Form

Field Summary
protected  javax.swing.plaf.metal.MetalBumps bumps
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
MetalBorders.ToolBarBorder()
Method Summary
Insets | getBorderInsets(Component c) This default implementation returns the value of getBorderMargins.
void | paintBorder(Component c, Graphics g, int x, int y, int w, int h) This default implementation does no painting.
Methods inherited from class javax.swing.border.AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

bumps

protected javax.swing.plaf.metal.MetalBumps bumps
Constructor Detail

MetalBorders.ToolBarBorder

public MetalBorders.ToolBarBorder()
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Description copied from class: AbstractBorder
This default implementation does no painting.
Overrides:
paintBorder in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets

public Insets getBorderInsets(Component c)
Description copied from class: AbstractBorder
This default implementation returns the value of getBorderMargins.
Overrides:
getBorderInsets in class AbstractBorder
Following copied from interface: javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeControlIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.TreeControlIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon
All Implemented Interfaces:
Icon, Serializable
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.TreeControlIcon
extends Object
implements Icon, Serializable

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  boolean isLight
Constructor Summary
MetalIconFactory.TreeControlIcon(boolean isCollapsed)
Method Summary
int | getIconHeight() Returns the icon's height.
int | getIconWidth() Returns the icon's width.
void | paintIcon(Component c, Graphics g, int x, int y) Draw the icon at the specified location.
void | paintMe(Component c, Graphics g, int x, int y)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

isLight

protected boolean isLight
Constructor Detail

MetalIconFactory.TreeControlIcon

public MetalIconFactory.TreeControlIcon(boolean isCollapsed)
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.
Specified by:
paintIcon in interface Icon

paintMe

public void paintMe(Component c,
                    Graphics g,
                    int x,
                    int y)

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.
Specified by:
getIconWidth in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.
Specified by:
getIconHeight in interface Icon
Following copied from interface: javax.swing.Icon
Returns:
an int specifying the fixed height of the icon.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeFolderIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.TreeFolderIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.FolderIcon16
        |
        +--javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon
All Implemented Interfaces:
Icon, Serializable
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.TreeFolderIcon
extends MetalIconFactory.FolderIcon16

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
MetalIconFactory.TreeFolderIcon()
Method Summary
int | getAdditionalHeight()
int | getShift()
Methods inherited from class javax.swing.plaf.metal.MetalIconFactory.FolderIcon16
getIconHeight, getIconWidth, paintIcon
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalIconFactory.TreeFolderIcon

public MetalIconFactory.TreeFolderIcon()
Method Detail

getShift

public int getShift()
Overrides:
getShift in class MetalIconFactory.FolderIcon16

getAdditionalHeight

public int getAdditionalHeight()
Overrides:
getAdditionalHeight in class MetalIconFactory.FolderIcon16
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeLeafIcon

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalIconFactory.TreeLeafIcon

java.lang.Object
  |
  +--javax.swing.plaf.metal.MetalIconFactory.FileIcon16
        |
        +--javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon
All Implemented Interfaces:
Icon, Serializable
Enclosing class:
MetalIconFactory
public static class MetalIconFactory.TreeLeafIcon
extends MetalIconFactory.FileIcon16

See Also:
Serialized Form

Constructor Summary
MetalIconFactory.TreeLeafIcon()
Method Summary
int | getAdditionalHeight()
int | getShift()
Methods inherited from class javax.swing.plaf.metal.MetalIconFactory.FileIcon16
getIconHeight, getIconWidth, paintIcon
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalIconFactory.TreeLeafIcon

public MetalIconFactory.TreeLeafIcon()
Method Detail

getShift

public int getShift()
Overrides:
getShift in class MetalIconFactory.FileIcon16

getAdditionalHeight

public int getAdditionalHeight()
Overrides:
getAdditionalHeight in class MetalIconFactory.FileIcon16
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.metal
Class MetalComboBoxEditor.UIResource

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicComboBoxEditor
        |
        +--javax.swing.plaf.metal.MetalComboBoxEditor
              |
              +--javax.swing.plaf.metal.MetalComboBoxEditor.UIResource
All Implemented Interfaces:
ComboBoxEditor, EventListener, FocusListener, UIResource
Enclosing class:
MetalComboBoxEditor
public static class MetalComboBoxEditor.UIResource
extends MetalComboBoxEditor
implements UIResource

A subclass of BasicComboBoxEditor that implements UIResource. BasicComboBoxEditor doesn't implement UIResource directly so that applications can safely override the cellRenderer property with BasicListCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.plaf.metal.MetalComboBoxEditor
MetalComboBoxEditor.UIResource
Inner classes inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
BasicComboBoxEditor.UIResource
Fields inherited from class javax.swing.plaf.metal.MetalComboBoxEditor
editorBorderInsets
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
editor
Constructor Summary
MetalComboBoxEditor.UIResource()
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
addActionListener, focusGained, focusLost, getEditorComponent, getItem, removeActionListener, selectAll, setItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MetalComboBoxEditor.UIResource

public MetalComboBoxEditor.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.plaf.multi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.plaf.multi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.ButtonUI
        • class javax.swing.plaf.MenuItemUI
          • class javax.swing.plaf.multi.MultiMenuItemUI
        • class javax.swing.plaf.multi.MultiButtonUI
      • class javax.swing.plaf.ColorChooserUI
        • class javax.swing.plaf.multi.MultiColorChooserUI
      • class javax.swing.plaf.ComboBoxUI
        • class javax.swing.plaf.multi.MultiComboBoxUI
      • class javax.swing.plaf.DesktopIconUI
        • class javax.swing.plaf.multi.MultiDesktopIconUI
      • class javax.swing.plaf.DesktopPaneUI
        • class javax.swing.plaf.multi.MultiDesktopPaneUI
      • class javax.swing.plaf.FileChooserUI
        • class javax.swing.plaf.multi.MultiFileChooserUI
      • class javax.swing.plaf.InternalFrameUI
        • class javax.swing.plaf.multi.MultiInternalFrameUI
      • class javax.swing.plaf.LabelUI
        • class javax.swing.plaf.multi.MultiLabelUI
      • class javax.swing.plaf.ListUI
        • class javax.swing.plaf.multi.MultiListUI
      • class javax.swing.plaf.MenuBarUI
        • class javax.swing.plaf.multi.MultiMenuBarUI
      • class javax.swing.plaf.OptionPaneUI
        • class javax.swing.plaf.multi.MultiOptionPaneUI
      • class javax.swing.plaf.PanelUI
        • class javax.swing.plaf.multi.MultiPanelUI
      • class javax.swing.plaf.PopupMenuUI
        • class javax.swing.plaf.multi.MultiPopupMenuUI
      • class javax.swing.plaf.ProgressBarUI
        • class javax.swing.plaf.multi.MultiProgressBarUI
      • class javax.swing.plaf.ScrollBarUI
        • class javax.swing.plaf.multi.MultiScrollBarUI
      • class javax.swing.plaf.ScrollPaneUI
        • class javax.swing.plaf.multi.MultiScrollPaneUI
      • class javax.swing.plaf.SeparatorUI
        • class javax.swing.plaf.multi.MultiSeparatorUI
      • class javax.swing.plaf.SliderUI
        • class javax.swing.plaf.multi.MultiSliderUI
      • class javax.swing.plaf.SplitPaneUI
        • class javax.swing.plaf.multi.MultiSplitPaneUI
      • class javax.swing.plaf.TabbedPaneUI
        • class javax.swing.plaf.multi.MultiTabbedPaneUI
      • class javax.swing.plaf.TableHeaderUI
        • class javax.swing.plaf.multi.MultiTableHeaderUI
      • class javax.swing.plaf.TableUI
        • class javax.swing.plaf.multi.MultiTableUI
      • class javax.swing.plaf.TextUI
        • class javax.swing.plaf.multi.MultiTextUI
      • class javax.swing.plaf.ToolBarUI
        • class javax.swing.plaf.multi.MultiToolBarUI
      • class javax.swing.plaf.ToolTipUI
        • class javax.swing.plaf.multi.MultiToolTipUI
      • class javax.swing.plaf.TreeUI
        • class javax.swing.plaf.multi.MultiTreeUI
      • class javax.swing.plaf.ViewportUI
        • class javax.swing.plaf.multi.MultiViewportUI
    • class javax.swing.LookAndFeel
      • class javax.swing.plaf.multi.MultiLookAndFeel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.plaf.multi

The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.

See:
Description

Class Summary
MultiButtonUI | MultiButtonUI implementation
MultiColorChooserUI | MultiColorChooserUI implementation
MultiComboBoxUI | MultiComboBoxUI implementation
MultiDesktopIconUI | MultiDesktopIconUI implementation
MultiDesktopPaneUI | MultiDesktopPaneUI implementation
MultiFileChooserUI | MultiFileChooserUI implementation
MultiInternalFrameUI | MultiInternalFrameUI implementation
MultiLabelUI | MultiLabelUI implementation
MultiListUI | MultiListUI implementation
MultiLookAndFeel | A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.
MultiMenuBarUI | MultiMenuBarUI implementation
MultiMenuItemUI | MultiMenuItemUI implementation
MultiOptionPaneUI | MultiOptionPaneUI implementation
MultiPanelUI | MultiPanelUI implementation
MultiPopupMenuUI | MultiPopupMenuUI implementation
MultiProgressBarUI | MultiProgressBarUI implementation
MultiScrollBarUI | MultiScrollBarUI implementation
MultiScrollPaneUI | MultiScrollPaneUI implementation
MultiSeparatorUI | MultiSeparatorUI implementation
MultiSliderUI | MultiSliderUI implementation
MultiSplitPaneUI | MultiSplitPaneUI implementation
MultiTabbedPaneUI | MultiTabbedPaneUI implementation
MultiTableHeaderUI | MultiTableHeaderUI implementation
MultiTableUI | MultiTableUI implementation
MultiTextUI | MultiTextUI implementation
MultiToolBarUI | MultiToolBarUI implementation
MultiToolTipUI | MultiToolTipUI implementation
MultiTreeUI | MultiTreeUI implementation
MultiViewportUI | MultiViewportUI implementation

Package javax.swing.plaf.multi Description

The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel. For example, a user could use an auxiliary audio look and feel in combination with the Motif look and feel. When a component instance asks for its UI, the Multiplexing Look and Feel returns a Multiplexing UI that handles all communications with both the auxiliary and the default look and feels. For example, JButton.getUI may get an instance of MultiButtonUI, which would handle both a MotifButtonUI and an AudioButtonUI.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.plaf.multi

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.plaf.multi

No usage of javax.swing.plaf.multi

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiButtonUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiButtonUI

No usage of javax.swing.plaf.multi.MultiButtonUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiColorChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiColorChooserUI

No usage of javax.swing.plaf.multi.MultiColorChooserUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiComboBoxUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiComboBoxUI

No usage of javax.swing.plaf.multi.MultiComboBoxUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiDesktopIconUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiDesktopIconUI

No usage of javax.swing.plaf.multi.MultiDesktopIconUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiDesktopPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiDesktopPaneUI

No usage of javax.swing.plaf.multi.MultiDesktopPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiFileChooserUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiFileChooserUI

No usage of javax.swing.plaf.multi.MultiFileChooserUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiInternalFrameUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiInternalFrameUI

No usage of javax.swing.plaf.multi.MultiInternalFrameUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiLabelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiLabelUI

No usage of javax.swing.plaf.multi.MultiLabelUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiListUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiListUI

No usage of javax.swing.plaf.multi.MultiListUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiLookAndFeel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiLookAndFeel

No usage of javax.swing.plaf.multi.MultiLookAndFeel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiMenuBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiMenuBarUI

No usage of javax.swing.plaf.multi.MultiMenuBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiMenuItemUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiMenuItemUI

No usage of javax.swing.plaf.multi.MultiMenuItemUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiOptionPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiOptionPaneUI

No usage of javax.swing.plaf.multi.MultiOptionPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiPanelUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiPanelUI

No usage of javax.swing.plaf.multi.MultiPanelUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiPopupMenuUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiPopupMenuUI

No usage of javax.swing.plaf.multi.MultiPopupMenuUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiProgressBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiProgressBarUI

No usage of javax.swing.plaf.multi.MultiProgressBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiScrollBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiScrollBarUI

No usage of javax.swing.plaf.multi.MultiScrollBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiScrollPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiScrollPaneUI

No usage of javax.swing.plaf.multi.MultiScrollPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiSeparatorUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiSeparatorUI

No usage of javax.swing.plaf.multi.MultiSeparatorUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiSliderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiSliderUI

No usage of javax.swing.plaf.multi.MultiSliderUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiSplitPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiSplitPaneUI

No usage of javax.swing.plaf.multi.MultiSplitPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiTabbedPaneUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiTabbedPaneUI

No usage of javax.swing.plaf.multi.MultiTabbedPaneUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiTableHeaderUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiTableHeaderUI

No usage of javax.swing.plaf.multi.MultiTableHeaderUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiTableUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiTableUI

No usage of javax.swing.plaf.multi.MultiTableUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiTextUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiTextUI

No usage of javax.swing.plaf.multi.MultiTextUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiToolBarUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiToolBarUI

No usage of javax.swing.plaf.multi.MultiToolBarUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiToolTipUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiToolTipUI

No usage of javax.swing.plaf.multi.MultiToolTipUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiTreeUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiTreeUI

No usage of javax.swing.plaf.multi.MultiTreeUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.plaf.multi.MultiViewportUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.plaf.multi.MultiViewportUI

No usage of javax.swing.plaf.multi.MultiViewportUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


MultiButtonUI

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiButtonUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.multi.MultiButtonUI
public class MultiButtonUI
extends ButtonUI

MultiButtonUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiButtonUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiButtonUI

public MultiButtonUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MultiColorChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiColorChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ColorChooserUI
              |
              +--javax.swing.plaf.multi.MultiColorChooserUI
public class MultiColorChooserUI
extends ColorChooserUI

MultiColorChooserUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiColorChooserUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiColorChooserUI

public MultiColorChooserUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiComboBoxUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiComboBoxUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ComboBoxUI
              |
              +--javax.swing.plaf.multi.MultiComboBoxUI
public class MultiComboBoxUI
extends ComboBoxUI

MultiComboBoxUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiComboBoxUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
boolean | isFocusTraversable(JComboBox a) Call isFocusTraversable on each UI handled by this MultiUI.
boolean | isPopupVisible(JComboBox a) Call isPopupVisible on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | setPopupVisible(JComboBox a, boolean b) Call setPopupVisible on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiComboBoxUI

public MultiComboBoxUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

setPopupVisible

public void setPopupVisible(JComboBox a,
                            boolean b)
Call setPopupVisible on each UI handled by this MultiUI.
Overrides:
setPopupVisible in class ComboBoxUI

isPopupVisible

public boolean isPopupVisible(JComboBox a)
Call isPopupVisible on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
isPopupVisible in class ComboBoxUI

isFocusTraversable

public boolean isFocusTraversable(JComboBox a)
Call isFocusTraversable on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
isFocusTraversable in class ComboBoxUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiDesktopIconUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiDesktopIconUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopIconUI
              |
              +--javax.swing.plaf.multi.MultiDesktopIconUI
public class MultiDesktopIconUI
extends DesktopIconUI

MultiDesktopIconUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiDesktopIconUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiDesktopIconUI

public MultiDesktopIconUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiDesktopPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiDesktopPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.DesktopPaneUI
              |
              +--javax.swing.plaf.multi.MultiDesktopPaneUI
public class MultiDesktopPaneUI
extends DesktopPaneUI

MultiDesktopPaneUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiDesktopPaneUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiDesktopPaneUI

public MultiDesktopPaneUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiFileChooserUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiFileChooserUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.FileChooserUI
              |
              +--javax.swing.plaf.multi.MultiFileChooserUI
public class MultiFileChooserUI
extends FileChooserUI

MultiFileChooserUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiFileChooserUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
void | ensureFileIsVisible(JFileChooser a, File b) Call ensureFileIsVisible on each UI handled by this MultiUI.
FileFilter | getAcceptAllFileFilter(JFileChooser a) Call getAcceptAllFileFilter on each UI handled by this MultiUI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
String | getApproveButtonText(JFileChooser a) Call getApproveButtonText on each UI handled by this MultiUI.
String | getDialogTitle(JFileChooser a) Call getDialogTitle on each UI handled by this MultiUI.
FileView | getFileView(JFileChooser a) Call getFileView on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | rescanCurrentDirectory(JFileChooser a) Call rescanCurrentDirectory on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiFileChooserUI

public MultiFileChooserUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter(JFileChooser a)
Call getAcceptAllFileFilter on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAcceptAllFileFilter in class FileChooserUI

getFileView

public FileView getFileView(JFileChooser a)
Call getFileView on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getFileView in class FileChooserUI

getApproveButtonText

public String getApproveButtonText(JFileChooser a)
Call getApproveButtonText on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getApproveButtonText in class FileChooserUI

getDialogTitle

public String getDialogTitle(JFileChooser a)
Call getDialogTitle on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getDialogTitle in class FileChooserUI

rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser a)
Call rescanCurrentDirectory on each UI handled by this MultiUI.
Overrides:
rescanCurrentDirectory in class FileChooserUI

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser a,
                                File b)
Call ensureFileIsVisible on each UI handled by this MultiUI.
Overrides:
ensureFileIsVisible in class FileChooserUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiInternalFrameUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiInternalFrameUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.InternalFrameUI
              |
              +--javax.swing.plaf.multi.MultiInternalFrameUI
public class MultiInternalFrameUI
extends InternalFrameUI

MultiInternalFrameUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiInternalFrameUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiInternalFrameUI

public MultiInternalFrameUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiLabelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiLabelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.LabelUI
              |
              +--javax.swing.plaf.multi.MultiLabelUI
public class MultiLabelUI
extends LabelUI

MultiLabelUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiLabelUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiLabelUI

public MultiLabelUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiListUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiListUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ListUI
              |
              +--javax.swing.plaf.multi.MultiListUI
public class MultiListUI
extends ListUI

MultiListUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiListUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Rectangle | getCellBounds(JList a, int b, int c) Call getCellBounds on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
Point | indexToLocation(JList a, int b) Call indexToLocation on each UI handled by this MultiUI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
int | locationToIndex(JList a, Point b) Call locationToIndex on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiListUI

public MultiListUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

locationToIndex

public int locationToIndex(JList a,
                           Point b)
Call locationToIndex on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
locationToIndex in class ListUI
Following copied from class: javax.swing.plaf.ListUI
Parameters:
location - The JList relative coordinates of the cell
Returns:
The index of the cell at location, or -1.

indexToLocation

public Point indexToLocation(JList a,
                             int b)
Call indexToLocation on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
indexToLocation in class ListUI
Following copied from class: javax.swing.plaf.ListUI
Parameters:
index - The index of the JList cell.
Returns:
The origin of the index'th cell.

getCellBounds

public Rectangle getCellBounds(JList a,
                               int b,
                               int c)
Call getCellBounds on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getCellBounds in class ListUI
Following copied from class: javax.swing.plaf.ListUI
Parameters:
index - The index of the JList cell.
Returns:
The bounds of the index'th cell.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiLookAndFeel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiLookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
        |
        +--javax.swing.plaf.multi.MultiLookAndFeel
public class MultiLookAndFeel
extends LookAndFeel

A Multiplexing UI Look and Feel that allows more than one UI to be associated with a component at the same time.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Constructor Summary
MultiLookAndFeel()
Method Summary
static ComponentUI | createUIs(ComponentUI mui, Vector uis, JComponent target) Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
UIDefaults | getDefaults() This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
String | getDescription() Return a one line description of this look and feel implementation, e.g.
String | getID() Return a string that identifies this look and feel.
String | getName() Return a short string that identifies this look and feel, e.g.
boolean | isNativeLookAndFeel() If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
boolean | isSupportedLookAndFeel() Return true if the underlying platform supports and or permits this look and feel.
protected static ComponentUI[] | uisToArray(Vector uis) Turn the Vector of UI's into an array.
Methods inherited from class javax.swing.LookAndFeel
initialize, installBorder, installColors, installColorsAndFont, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninitialize, uninstallBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MultiLookAndFeel

public MultiLookAndFeel()
Method Detail

getName

public String getName()
Description copied from class: LookAndFeel
Return a short string that identifies this look and feel, e.g. "CDE/Motif". This string should be appropriate for a menu item. Distinct look and feels should have different names, e.g. a subclass of MotifLookAndFeel that changes the way a few components are rendered should be called "CDE/Motif My Way"; something that would be useful to a user trying to select a L&F from a list of names.
Overrides:
getName in class LookAndFeel

getID

public String getID()
Description copied from class: LookAndFeel
Return a string that identifies this look and feel. This string will be used by applications/services that want to recognize well known look and feel implementations. Presently the well known names are "Motif", "Windows", "Mac", "Metal". Note that a LookAndFeel derived from a well known superclass that doesn't make any fundamental changes to the look or feel shouldn't override this method.
Overrides:
getID in class LookAndFeel

getDescription

public String getDescription()
Description copied from class: LookAndFeel
Return a one line description of this look and feel implementation, e.g. "The CDE/Motif Look and Feel". This string is intended for the user, e.g. in the title of a window or in a ToolTip message.
Overrides:
getDescription in class LookAndFeel

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Description copied from class: LookAndFeel
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. For example a CDE/Motif look and implementation would return true when the underlying platform was Solaris.
Overrides:
isNativeLookAndFeel in class LookAndFeel

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Description copied from class: LookAndFeel
Return true if the underlying platform supports and or permits this look and feel. This method returns false if the look and feel depends on special resources or legal agreements that aren't defined for the current platform.
Overrides:
isSupportedLookAndFeel in class LookAndFeel
Following copied from class: javax.swing.LookAndFeel
See Also:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

getDefaults

public UIDefaults getDefaults()
Description copied from class: LookAndFeel
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.
Overrides:
getDefaults in class LookAndFeel
Following copied from class: javax.swing.LookAndFeel
See Also:
LookAndFeel.initialize(),
LookAndFeel.uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)

createUIs

public static ComponentUI createUIs(ComponentUI mui,
                                    Vector uis,
                                    JComponent target)
Create the real UI's from the default and auxiliary look and feels, placing the results in the uis vector passed in.
Returns:
the ComponentUI for the component.

uisToArray

protected static ComponentUI[] uisToArray(Vector uis)
Turn the Vector of UI's into an array.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiMenuBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiMenuBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.MenuBarUI
              |
              +--javax.swing.plaf.multi.MultiMenuBarUI
public class MultiMenuBarUI
extends MenuBarUI

MultiMenuBarUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiMenuBarUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiMenuBarUI

public MultiMenuBarUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiMenuItemUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiMenuItemUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ButtonUI
              |
              +--javax.swing.plaf.MenuItemUI
                    |
                    +--javax.swing.plaf.multi.MultiMenuItemUI
public class MultiMenuItemUI
extends MenuItemUI

MultiMenuItemUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiMenuItemUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiMenuItemUI

public MultiMenuItemUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiOptionPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiOptionPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.OptionPaneUI
              |
              +--javax.swing.plaf.multi.MultiOptionPaneUI
public class MultiOptionPaneUI
extends OptionPaneUI

MultiOptionPaneUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiOptionPaneUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
boolean | containsCustomComponents(JOptionPane a) Call containsCustomComponents on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | selectInitialValue(JOptionPane a) Call selectInitialValue on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiOptionPaneUI

public MultiOptionPaneUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

selectInitialValue

public void selectInitialValue(JOptionPane a)
Call selectInitialValue on each UI handled by this MultiUI.
Overrides:
selectInitialValue in class OptionPaneUI

containsCustomComponents

public boolean containsCustomComponents(JOptionPane a)
Call containsCustomComponents on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
containsCustomComponents in class OptionPaneUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPanelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiPanelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PanelUI
              |
              +--javax.swing.plaf.multi.MultiPanelUI
public class MultiPanelUI
extends PanelUI

MultiPanelUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiPanelUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiPanelUI

public MultiPanelUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPopupMenuUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiPopupMenuUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PopupMenuUI
              |
              +--javax.swing.plaf.multi.MultiPopupMenuUI
public class MultiPopupMenuUI
extends PopupMenuUI

MultiPopupMenuUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiPopupMenuUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class javax.swing.plaf.PopupMenuUI
isPopupTrigger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiPopupMenuUI

public MultiPopupMenuUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiProgressBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiProgressBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ProgressBarUI
              |
              +--javax.swing.plaf.multi.MultiProgressBarUI
public class MultiProgressBarUI
extends ProgressBarUI

MultiProgressBarUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiProgressBarUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiProgressBarUI

public MultiProgressBarUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiScrollBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiScrollBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollBarUI
              |
              +--javax.swing.plaf.multi.MultiScrollBarUI
public class MultiScrollBarUI
extends ScrollBarUI

MultiScrollBarUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiScrollBarUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiScrollBarUI

public MultiScrollBarUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiScrollPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiScrollPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollPaneUI
              |
              +--javax.swing.plaf.multi.MultiScrollPaneUI
public class MultiScrollPaneUI
extends ScrollPaneUI

MultiScrollPaneUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiScrollPaneUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiScrollPaneUI

public MultiScrollPaneUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiSeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiSeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
              |
              +--javax.swing.plaf.multi.MultiSeparatorUI
public class MultiSeparatorUI
extends SeparatorUI

MultiSeparatorUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiSeparatorUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiSeparatorUI

public MultiSeparatorUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiSliderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiSliderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SliderUI
              |
              +--javax.swing.plaf.multi.MultiSliderUI
public class MultiSliderUI
extends SliderUI

MultiSliderUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiSliderUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiSliderUI

public MultiSliderUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiSplitPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiSplitPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SplitPaneUI
              |
              +--javax.swing.plaf.multi.MultiSplitPaneUI
public class MultiSplitPaneUI
extends SplitPaneUI

MultiSplitPaneUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiSplitPaneUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
void | finishedPaintingChildren(JSplitPane a, Graphics b) Call finishedPaintingChildren on each UI handled by this MultiUI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
int | getDividerLocation(JSplitPane a) Call getDividerLocation on each UI handled by this MultiUI.
int | getMaximumDividerLocation(JSplitPane a) Call getMaximumDividerLocation on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
int | getMinimumDividerLocation(JSplitPane a) Call getMinimumDividerLocation on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | resetToPreferredSizes(JSplitPane a) Call resetToPreferredSizes on each UI handled by this MultiUI.
void | setDividerLocation(JSplitPane a, int b) Call setDividerLocation on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiSplitPaneUI

public MultiSplitPaneUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

resetToPreferredSizes

public void resetToPreferredSizes(JSplitPane a)
Call resetToPreferredSizes on each UI handled by this MultiUI.
Overrides:
resetToPreferredSizes in class SplitPaneUI

setDividerLocation

public void setDividerLocation(JSplitPane a,
                               int b)
Call setDividerLocation on each UI handled by this MultiUI.
Overrides:
setDividerLocation in class SplitPaneUI

getDividerLocation

public int getDividerLocation(JSplitPane a)
Call getDividerLocation on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getDividerLocation in class SplitPaneUI

getMinimumDividerLocation

public int getMinimumDividerLocation(JSplitPane a)
Call getMinimumDividerLocation on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumDividerLocation in class SplitPaneUI

getMaximumDividerLocation

public int getMaximumDividerLocation(JSplitPane a)
Call getMaximumDividerLocation on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumDividerLocation in class SplitPaneUI

finishedPaintingChildren

public void finishedPaintingChildren(JSplitPane a,
                                     Graphics b)
Call finishedPaintingChildren on each UI handled by this MultiUI.
Overrides:
finishedPaintingChildren in class SplitPaneUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTabbedPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiTabbedPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TabbedPaneUI
              |
              +--javax.swing.plaf.multi.MultiTabbedPaneUI
public class MultiTabbedPaneUI
extends TabbedPaneUI

MultiTabbedPaneUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiTabbedPaneUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
Rectangle | getTabBounds(JTabbedPane a, int b) Call getTabBounds on each UI handled by this MultiUI.
int | getTabRunCount(JTabbedPane a) Call getTabRunCount on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
int | tabForCoordinate(JTabbedPane a, int b, int c) Call tabForCoordinate on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiTabbedPaneUI

public MultiTabbedPaneUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

tabForCoordinate

public int tabForCoordinate(JTabbedPane a,
                            int b,
                            int c)
Call tabForCoordinate on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
tabForCoordinate in class TabbedPaneUI

getTabBounds

public Rectangle getTabBounds(JTabbedPane a,
                              int b)
Call getTabBounds on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getTabBounds in class TabbedPaneUI

getTabRunCount

public int getTabRunCount(JTabbedPane a)
Call getTabRunCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getTabRunCount in class TabbedPaneUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTableHeaderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiTableHeaderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableHeaderUI
              |
              +--javax.swing.plaf.multi.MultiTableHeaderUI
public class MultiTableHeaderUI
extends TableHeaderUI

MultiTableHeaderUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiTableHeaderUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiTableHeaderUI

public MultiTableHeaderUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTableUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiTableUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableUI
              |
              +--javax.swing.plaf.multi.MultiTableUI
public class MultiTableUI
extends TableUI

MultiTableUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiTableUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiTableUI

public MultiTableUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTextUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiTextUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.multi.MultiTextUI
public class MultiTextUI
extends TextUI

MultiTextUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiTextUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
void | damageRange(JTextComponent a, int b, int c) Call damageRange on each UI handled by this MultiUI.
void | damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
EditorKit | getEditorKit(JTextComponent a) Call getEditorKit on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
int | getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
View | getRootView(JTextComponent a) Call getRootView on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
Rectangle | modelToView(JTextComponent a, int b) Call modelToView on each UI handled by this MultiUI.
Rectangle | modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
int | viewToModel(JTextComponent a, Point b) Call viewToModel on each UI handled by this MultiUI.
int | viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiTextUI

public MultiTextUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

modelToView

public Rectangle modelToView(JTextComponent a,
                             int b)
                      throws BadLocationException
Call modelToView on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
modelToView in class TextUI
Following copied from class: javax.swing.plaf.TextUI
Parameters:
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document

modelToView

public Rectangle modelToView(JTextComponent t,
                             int pos,
                             Position.Bias bias)
                      throws BadLocationException
Converts the given location in the model to a place in the view coordinate system.
Overrides:
modelToView in class TextUI
Parameters:
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document

viewToModel

public int viewToModel(JTextComponent a,
                       Point b)
Call viewToModel on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
viewToModel in class TextUI
Following copied from class: javax.swing.plaf.TextUI
Parameters:
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.

viewToModel

public int viewToModel(JTextComponent t,
                       Point pt,
                       Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.
Overrides:
viewToModel in class TextUI
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

getNextVisualPositionFrom

public int getNextVisualPositionFrom(JTextComponent t,
                                     int pos,
                                     Position.Bias b,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Overrides:
getNextVisualPositionFrom in class TextUI
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

damageRange

public void damageRange(JTextComponent a,
                        int b,
                        int c)
Call damageRange on each UI handled by this MultiUI.
Overrides:
damageRange in class TextUI
Following copied from class: javax.swing.plaf.TextUI
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

damageRange

public void damageRange(JTextComponent t,
                        int p0,
                        int p1,
                        Position.Bias firstBias,
                        Position.Bias secondBias)
Causes the portion of the view responsible for the given part of the model to be repainted.
Overrides:
damageRange in class TextUI
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

getEditorKit

public EditorKit getEditorKit(JTextComponent a)
Call getEditorKit on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getEditorKit in class TextUI
Following copied from class: javax.swing.plaf.TextUI
Returns:
the editor kit binding

getRootView

public View getRootView(JTextComponent a)
Call getRootView on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getRootView in class TextUI
Following copied from class: javax.swing.plaf.TextUI
Returns:
the view

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiToolBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiToolBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolBarUI
              |
              +--javax.swing.plaf.multi.MultiToolBarUI
public class MultiToolBarUI
extends ToolBarUI

MultiToolBarUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiToolBarUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiToolBarUI

public MultiToolBarUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiToolTipUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiToolTipUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolTipUI
              |
              +--javax.swing.plaf.multi.MultiToolTipUI
public class MultiToolTipUI
extends ToolTipUI

MultiToolTipUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiToolTipUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiToolTipUI

public MultiToolTipUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTreeUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiTreeUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TreeUI
              |
              +--javax.swing.plaf.multi.MultiTreeUI
public class MultiTreeUI
extends TreeUI

MultiTreeUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiTreeUI()
Method Summary
void | cancelEditing(JTree a) Call cancelEditing on each UI handled by this MultiUI.
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
TreePath | getClosestPathForLocation(JTree a, int b, int c) Call getClosestPathForLocation on each UI handled by this MultiUI.
TreePath | getEditingPath(JTree a) Call getEditingPath on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Rectangle | getPathBounds(JTree a, TreePath b) Call getPathBounds on each UI handled by this MultiUI.
TreePath | getPathForRow(JTree a, int b) Call getPathForRow on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
int | getRowCount(JTree a) Call getRowCount on each UI handled by this MultiUI.
int | getRowForPath(JTree a, TreePath b) Call getRowForPath on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
boolean | isEditing(JTree a) Call isEditing on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | startEditingAtPath(JTree a, TreePath b) Call startEditingAtPath on each UI handled by this MultiUI.
boolean | stopEditing(JTree a) Call stopEditing on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiTreeUI

public MultiTreeUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

getPathBounds

public Rectangle getPathBounds(JTree a,
                               TreePath b)
Call getPathBounds on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPathBounds in class TreeUI

getPathForRow

public TreePath getPathForRow(JTree a,
                              int b)
Call getPathForRow on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPathForRow in class TreeUI

getRowForPath

public int getRowForPath(JTree a,
                         TreePath b)
Call getRowForPath on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getRowForPath in class TreeUI

getRowCount

public int getRowCount(JTree a)
Call getRowCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getRowCount in class TreeUI

getClosestPathForLocation

public TreePath getClosestPathForLocation(JTree a,
                                          int b,
                                          int c)
Call getClosestPathForLocation on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getClosestPathForLocation in class TreeUI

isEditing

public boolean isEditing(JTree a)
Call isEditing on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
isEditing in class TreeUI

stopEditing

public boolean stopEditing(JTree a)
Call stopEditing on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
stopEditing in class TreeUI

cancelEditing

public void cancelEditing(JTree a)
Call cancelEditing on each UI handled by this MultiUI.
Overrides:
cancelEditing in class TreeUI

startEditingAtPath

public void startEditingAtPath(JTree a,
                               TreePath b)
Call startEditingAtPath on each UI handled by this MultiUI.
Overrides:
startEditingAtPath in class TreeUI

getEditingPath

public TreePath getEditingPath(JTree a)
Call getEditingPath on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getEditingPath in class TreeUI

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiViewportUI

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf.multi
Class MultiViewportUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ViewportUI
              |
              +--javax.swing.plaf.multi.MultiViewportUI
public class MultiViewportUI
extends ViewportUI

MultiViewportUI implementation

This file was automatically generated by AutoMulti.

Field Summary
protected  Vector uis
The Vector containing the real UI's.
Constructor Summary
MultiViewportUI()
Method Summary
boolean | contains(JComponent a, int b, int c) Call contains on each UI handled by this MultiUI.
static ComponentUI | createUI(JComponent a) Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI.
Accessible | getAccessibleChild(JComponent a, int b) Call getAccessibleChild on each UI handled by this MultiUI.
int | getAccessibleChildrenCount(JComponent a) Call getAccessibleChildrenCount on each UI handled by this MultiUI.
Dimension | getMaximumSize(JComponent a) Call getMaximumSize on each UI handled by this MultiUI.
Dimension | getMinimumSize(JComponent a) Call getMinimumSize on each UI handled by this MultiUI.
Dimension | getPreferredSize(JComponent a) Call getPreferredSize on each UI handled by this MultiUI.
ComponentUI[] | getUIs() Return the list of UI's associated with this multiplexing UI.
void | installUI(JComponent a) Call installUI on each UI handled by this MultiUI.
void | paint(Graphics a, JComponent b) Call paint on each UI handled by this MultiUI.
void | uninstallUI(JComponent a) Call uninstallUI on each UI handled by this MultiUI.
void | update(Graphics a, JComponent b) Call update on each UI handled by this MultiUI.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

uis

protected Vector uis
The Vector containing the real UI's. This is populated in the call to createUI, and can be obtained by calling getUIs. The first element is guaranteed to the real UI obtained from the default look and feel.
Constructor Detail

MultiViewportUI

public MultiViewportUI()
Method Detail

getUIs

public ComponentUI[] getUIs()
Return the list of UI's associated with this multiplexing UI. This allows processing of the UI's by an application aware of multiplexing UI's on components.

installUI

public void installUI(JComponent a)
Call installUI on each UI handled by this MultiUI.
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent a)
Call uninstallUI on each UI handled by this MultiUI.
Overrides:
uninstallUI in class ComponentUI

paint

public void paint(Graphics a,
                  JComponent b)
Call paint on each UI handled by this MultiUI.
Overrides:
paint in class ComponentUI

update

public void update(Graphics a,
                   JComponent b)
Call update on each UI handled by this MultiUI.
Overrides:
update in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent a)
Call getPreferredSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getPreferredSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent a)
Call getMinimumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMinimumSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent a)
Call getMaximumSize on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getMaximumSize in class ComponentUI

contains

public boolean contains(JComponent a,
                        int b,
                        int c)
Call contains on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
contains in class ComponentUI

createUI

public static ComponentUI createUI(JComponent a)
Return a multiplexing UI instance if any of the auxiliary LookAndFeels support this UI. Otherwise, just return a UI obtained using the normal methods.

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent a)
Call getAccessibleChildrenCount on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChildrenCount in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object.
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent a,
                                     int b)
Call getAccessibleChild on each UI handled by this MultiUI. Return only the value obtained from the first UI, which is the UI obtained from the default LookAndFeel.
Overrides:
getAccessibleChild in class ComponentUI
Following copied from class: javax.swing.plaf.ComponentUI
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


OptionPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class OptionPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.OptionPaneUI
Direct Known Subclasses:
BasicOptionPaneUI, MultiOptionPaneUI
public abstract class OptionPaneUI
extends ComponentUI

Pluggable look and feel interface for JOptionPane.

Constructor Summary
OptionPaneUI()
Method Summary
abstract boolean | containsCustomComponents(JOptionPane op) Returns true if the user has supplied instances of Component for either the options or message.
abstract void | selectInitialValue(JOptionPane op) Requests the component representing the default value to have focus.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OptionPaneUI

public OptionPaneUI()
Method Detail

selectInitialValue

public abstract void selectInitialValue(JOptionPane op)
Requests the component representing the default value to have focus.

containsCustomComponents

public abstract boolean containsCustomComponents(JOptionPane op)
Returns true if the user has supplied instances of Component for either the options or message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PanelUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class PanelUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PanelUI
Direct Known Subclasses:
BasicPanelUI, MultiPanelUI
public abstract class PanelUI
extends ComponentUI

Pluggable look and feel interface for Panel.

Constructor Summary
PanelUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PanelUI

public PanelUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PopupMenuUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class PopupMenuUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.PopupMenuUI
Direct Known Subclasses:
BasicPopupMenuUI, MultiPopupMenuUI
public abstract class PopupMenuUI
extends ComponentUI

Pluggable look and feel interface for JPopupMenu.

Constructor Summary
PopupMenuUI()
Method Summary
 boolean isPopupTrigger(MouseEvent e)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PopupMenuUI

public PopupMenuUI()
Method Detail

isPopupTrigger

public boolean isPopupTrigger(MouseEvent e)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProgressBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ProgressBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ProgressBarUI
Direct Known Subclasses:
BasicProgressBarUI, MultiProgressBarUI
public abstract class ProgressBarUI
extends ComponentUI

Pluggable look and feel interface for JProgressBar.

Constructor Summary
ProgressBarUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ProgressBarUI

public ProgressBarUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RootPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class RootPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.RootPaneUI
Direct Known Subclasses:
BasicRootPaneUI
public abstract class RootPaneUI
extends ComponentUI

Pluggable look and feel interface for JRootPane.

Constructor Summary
RootPaneUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RootPaneUI

public RootPaneUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ScrollBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollBarUI
Direct Known Subclasses:
BasicScrollBarUI, MultiScrollBarUI
public abstract class ScrollBarUI
extends ComponentUI

Pluggable look and feel interface for JScrollBar.

Constructor Summary
ScrollBarUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScrollBarUI

public ScrollBarUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ScrollPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ScrollPaneUI
Direct Known Subclasses:
BasicScrollPaneUI, MultiScrollPaneUI
public abstract class ScrollPaneUI
extends ComponentUI

Pluggable look and feel interface for JScrollPane.

Constructor Summary
ScrollPaneUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScrollPaneUI

public ScrollPaneUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SeparatorUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class SeparatorUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SeparatorUI
Direct Known Subclasses:
BasicSeparatorUI, MultiSeparatorUI
public abstract class SeparatorUI
extends ComponentUI

Pluggable look and feel interface for JSeparator.

Constructor Summary
SeparatorUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SeparatorUI

public SeparatorUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SliderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class SliderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SliderUI
Direct Known Subclasses:
BasicSliderUI, MultiSliderUI
public abstract class SliderUI
extends ComponentUI

Pluggable look and feel interface for JSlider.

Constructor Summary
SliderUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SliderUI

public SliderUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SplitPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class SplitPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.SplitPaneUI
Direct Known Subclasses:
BasicSplitPaneUI, MultiSplitPaneUI
public abstract class SplitPaneUI
extends ComponentUI

Pluggable look and feel interface for JSplitPane.

Constructor Summary
SplitPaneUI()
Method Summary
abstract void | finishedPaintingChildren(JSplitPane jc, Graphics g) Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
abstract int | getDividerLocation(JSplitPane jc) Returns the location of the divider.
abstract int | getMaximumDividerLocation(JSplitPane jc) Returns the maximum possible location of the divider.
abstract int | getMinimumDividerLocation(JSplitPane jc) Returns the minimum possible location of the divider.
abstract void | resetToPreferredSizes(JSplitPane jc) Messaged to relayout the JSplitPane based on the preferred size of the children components.
abstract void | setDividerLocation(JSplitPane jc, int location) Sets the location of the divider to location.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SplitPaneUI

public SplitPaneUI()
Method Detail

resetToPreferredSizes

public abstract void resetToPreferredSizes(JSplitPane jc)
Messaged to relayout the JSplitPane based on the preferred size of the children components.

setDividerLocation

public abstract void setDividerLocation(JSplitPane jc,
                                        int location)
Sets the location of the divider to location.

getDividerLocation

public abstract int getDividerLocation(JSplitPane jc)
Returns the location of the divider.

getMinimumDividerLocation

public abstract int getMinimumDividerLocation(JSplitPane jc)
Returns the minimum possible location of the divider.

getMaximumDividerLocation

public abstract int getMaximumDividerLocation(JSplitPane jc)
Returns the maximum possible location of the divider.

finishedPaintingChildren

public abstract void finishedPaintingChildren(JSplitPane jc,
                                              Graphics g)
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabbedPaneUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class TabbedPaneUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TabbedPaneUI
Direct Known Subclasses:
BasicTabbedPaneUI, MultiTabbedPaneUI
public abstract class TabbedPaneUI
extends ComponentUI

Pluggable look and feel interface for JTabbedPane.

Constructor Summary
TabbedPaneUI()
Method Summary
abstract Rectangle | getTabBounds(JTabbedPane pane, int index)
abstract int | getTabRunCount(JTabbedPane pane)
abstract int | tabForCoordinate(JTabbedPane pane, int x, int y)
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TabbedPaneUI

public TabbedPaneUI()
Method Detail

tabForCoordinate

public abstract int tabForCoordinate(JTabbedPane pane,
                                     int x,
                                     int y)

getTabBounds

public abstract Rectangle getTabBounds(JTabbedPane pane,
                                       int index)

getTabRunCount

public abstract int getTabRunCount(JTabbedPane pane)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableHeaderUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class TableHeaderUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableHeaderUI
Direct Known Subclasses:
BasicTableHeaderUI, MultiTableHeaderUI
public abstract class TableHeaderUI
extends ComponentUI

Pluggable look and feel interface for JTableHeader.

Constructor Summary
TableHeaderUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TableHeaderUI

public TableHeaderUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class TableUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableUI
Direct Known Subclasses:
BasicTableUI, MultiTableUI
public abstract class TableUI
extends ComponentUI

Pluggable look and feel interface for JTable.

Constructor Summary
TableUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TableUI

public TableUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class TextUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
Direct Known Subclasses:
BasicTextUI, MultiTextUI
public abstract class TextUI
extends ComponentUI

Text editor user interface

Constructor Summary
TextUI()
Method Summary
abstract void | damageRange(JTextComponent t, int p0, int p1) Causes the portion of the view responsible for the given part of the model to be repainted.
abstract void | damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.
abstract EditorKit | getEditorKit(JTextComponent t) Fetches the binding of services that set a policy for the type of document being edited.
abstract int | getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract View | getRootView(JTextComponent t) Fetches a View with the allocation of the associated text component (i.e.
abstract Rectangle | modelToView(JTextComponent t, int pos) Converts the given location in the model to a place in the view coordinate system.
abstract Rectangle | modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
abstract int | viewToModel(JTextComponent t, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
abstract int | viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TextUI

public TextUI()
Method Detail

modelToView

public abstract Rectangle modelToView(JTextComponent t,
                                      int pos)
                               throws BadLocationException
Converts the given location in the model to a place in the view coordinate system.
Parameters:
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document

modelToView

public abstract Rectangle modelToView(JTextComponent t,
                                      int pos,
                                      Position.Bias bias)
                               throws BadLocationException
Converts the given location in the model to a place in the view coordinate system.
Parameters:
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document

viewToModel

public abstract int viewToModel(JTextComponent t,
                                Point pt)
Converts the given place in the view coordinate system to the nearest representative location in the model.
Parameters:
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.

viewToModel

public abstract int viewToModel(JTextComponent t,
                                Point pt,
                                Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

getNextVisualPositionFrom

public abstract int getNextVisualPositionFrom(JTextComponent t,
                                              int pos,
                                              Position.Bias b,
                                              int direction,
                                              Position.Bias[] biasRet)
                                       throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

damageRange

public abstract void damageRange(JTextComponent t,
                                 int p0,
                                 int p1)
Causes the portion of the view responsible for the given part of the model to be repainted.
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

damageRange

public abstract void damageRange(JTextComponent t,
                                 int p0,
                                 int p1,
                                 Position.Bias firstBias,
                                 Position.Bias secondBias)
Causes the portion of the view responsible for the given part of the model to be repainted.
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

getEditorKit

public abstract EditorKit getEditorKit(JTextComponent t)
Fetches the binding of services that set a policy for the type of document being edited. This contains things like the commands available, stream readers and writers, etc.
Returns:
the editor kit binding

getRootView

public abstract View getRootView(JTextComponent t)
Fetches a View with the allocation of the associated text component (i.e. the root of the hierarchy) that can be traversed to determine how the model is being represented spatially.
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TitledBorderUIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class BorderUIResource.TitledBorderUIResource

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.TitledBorder
              |
              +--javax.swing.plaf.BorderUIResource.TitledBorderUIResource
All Implemented Interfaces:
Border, Serializable, UIResource
Enclosing class:
BorderUIResource
public static class BorderUIResource.TitledBorderUIResource
extends TitledBorder
implements UIResource

See Also:
Serialized Form

Fields inherited from class javax.swing.border.TitledBorder
ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILING
Constructor Summary
BorderUIResource.TitledBorderUIResource(Border border)
BorderUIResource.TitledBorderUIResource(Border border, String title)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
BorderUIResource.TitledBorderUIResource(String title)
Methods inherited from class javax.swing.border.TitledBorder
getBorder, getBorderInsets, getBorderInsets, getFont, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, paintBorder, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePosition
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(String title)

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(Border border)

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(Border border,
                                               String title)

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(Border border,
                                               String title,
                                               int titleJustification,
                                               int titlePosition)

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(Border border,
                                               String title,
                                               int titleJustification,
                                               int titlePosition,
                                               Font titleFont)

BorderUIResource.TitledBorderUIResource

public BorderUIResource.TitledBorderUIResource(Border border,
                                               String title,
                                               int titleJustification,
                                               int titlePosition,
                                               Font titleFont,
                                               Color titleColor)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolBarUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ToolBarUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolBarUI
Direct Known Subclasses:
BasicToolBarUI, MultiToolBarUI
public abstract class ToolBarUI
extends ComponentUI

Pluggable look and feel interface for JToolBar.

Constructor Summary
ToolBarUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToolBarUI

public ToolBarUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolTipUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ToolTipUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ToolTipUI
Direct Known Subclasses:
BasicToolTipUI, MultiToolTipUI
public abstract class ToolTipUI
extends ComponentUI

Pluggable look and feel interface for JToolTip.

Constructor Summary
ToolTipUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToolTipUI

public ToolTipUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class TreeUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TreeUI
Direct Known Subclasses:
BasicTreeUI, MultiTreeUI
public abstract class TreeUI
extends ComponentUI

Pluggable look and feel interface for JTree.

Constructor Summary
TreeUI()
Method Summary
abstract void | cancelEditing(JTree tree) Cancels the current editing session.
abstract TreePath | getClosestPathForLocation(JTree tree, int x, int y) Returns the path to the node that is closest to x,y.
abstract TreePath | getEditingPath(JTree tree) Returns the path to the element that is being edited.
abstract Rectangle | getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
abstract TreePath | getPathForRow(JTree tree, int row) Returns the path for passed in row.
abstract int | getRowCount(JTree tree) Returns the number of rows that are being displayed.
abstract int | getRowForPath(JTree tree, TreePath path) Returns the row that the last item identified in path is visible at.
abstract boolean | isEditing(JTree tree) Returns true if the tree is being edited.
abstract void | startEditingAtPath(JTree tree, TreePath path) Selects the last item in path and tries to edit it.
abstract boolean | stopEditing(JTree tree) Stops the current editing session.
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TreeUI

public TreeUI()
Method Detail

getPathBounds

public abstract Rectangle getPathBounds(JTree tree,
                                        TreePath path)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. Will return null if any component in path is currently valid.

getPathForRow

public abstract TreePath getPathForRow(JTree tree,
                                       int row)
Returns the path for passed in row. If row is not visible null is returned.

getRowForPath

public abstract int getRowForPath(JTree tree,
                                  TreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.

getRowCount

public abstract int getRowCount(JTree tree)
Returns the number of rows that are being displayed.

getClosestPathForLocation

public abstract TreePath getClosestPathForLocation(JTree tree,
                                                   int x,
                                                   int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.

isEditing

public abstract boolean isEditing(JTree tree)
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().

stopEditing

public abstract boolean stopEditing(JTree tree)
Stops the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop.

cancelEditing

public abstract void cancelEditing(JTree tree)
Cancels the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop.

startEditingAtPath

public abstract void startEditingAtPath(JTree tree,
                                        TreePath path)
Selects the last item in path and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.

getEditingPath

public abstract TreePath getEditingPath(JTree tree)
Returns the path to the element that is being edited.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ViewportUI

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.plaf
Class ViewportUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.ViewportUI
Direct Known Subclasses:
BasicViewportUI, MultiViewportUI
public abstract class ViewportUI
extends ComponentUI

Pluggable look and feel interface for JViewport.

Constructor Summary
ViewportUI()
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ViewportUI

public ViewportUI()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ProgressMonitor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ProgressMonitor

java.lang.Object
  |
  +--javax.swing.ProgressMonitor
public class ProgressMonitor
extends Object

A class to monitor the progress of some operation. If it looks like the operation will take a while, a progress dialog will be popped up. When the ProgressMonitor is created it is given a numeric range and a descriptive string. As the operation progresses, call the setProgress method to indicate how far along the [min,max] range the operation is. Initially, there is no ProgressDialog. After the first millisToDecideToPopup milliseconds (default 500) the progress monitor will predict how long the operation will take. If it is longer than millisToPopup (default 2000, 2 seconds) a ProgressDialog will be popped up.

From time to time, when the Dialog box is visible, the progress bar will be updated when setProgress is called. setProgress won't always update the progress bar, it will only be done if the amount of progress is visibly significant.

For further documentation and examples see How to Monitor Progress, a section in The Java Tutorial.

See Also:
ProgressMonitorInputStream

Constructor Summary
ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
Method Summary
void | close() Indicate that the operation is complete.
int | getMaximum() Returns the maximum value -- the higher end of the progress value.
int | getMillisToDecideToPopup() Returns the amount of time this object waits before deciding whether or not to popup a progress monitor.
int | getMillisToPopup() Returns the amount of time it will take for the popup to appear.
int | getMinimum() Returns the minimum value -- the lower end of the progress value.
String | getNote() Specifies the additional note that is displayed along with the progress message.
boolean | isCanceled() Returns true if the user hits the Cancel button in the progress dialog.
void | setMaximum(int m) Specifies the maximum value.
void | setMillisToDecideToPopup(int millisToDecideToPopup) Specifies the amount of time to wait before deciding whether or not to popup a progress monitor.
void | setMillisToPopup(int millisToPopup) Specifies the amount of time it will take for the popup to appear.
void | setMinimum(int m) Specifies the minimum value.
void | setNote(String note) Specifies the additional note that is displayed along with the progress message.
void | setProgress(int nv) Indicate the progress of the operation being monitored.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ProgressMonitor

public ProgressMonitor(Component parentComponent,
                       Object message,
                       String note,
                       int min,
                       int max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
Parameters:
parentComponent - the parent component for the dialog box
message - a descriptive message that will be shown to the user to indicate what operation is being monitored. This does not change as the operation progresses. See the message parameters to methods in JOptionPane.message for the range of values.
note - a short note describing the state of the operation. As the operation progresses, you can call setNote to change the note displayed. This is used, for example, in operations that iterate through a list of files to show the name of the file being processes. If note is initially null, there will be no note line in the dialog box and setNote will be ineffective
min - the lower bound of the range
max - the upper bound of the range
See Also:
JDialog, JOptionPane
Method Detail

setProgress

public void setProgress(int nv)
Indicate the progress of the operation being monitored. If the specified value is >= the maximum, the progress monitor is closed.
Parameters:
nv - an int specifying the current value, between the maximum and minimum specified for this component
See Also:
setMinimum(int), setMaximum(int), close()

close

public void close()
Indicate that the operation is complete. This happens automatically when the value set by setProgress is >= max, but it may be called earlier if the operation ends early.

getMinimum

public int getMinimum()
Returns the minimum value -- the lower end of the progress value.
Returns:
an int representing the minimum value
See Also:
setMinimum(int)

setMinimum

public void setMinimum(int m)
Specifies the minimum value.
Parameters:
m - an int specifying the minimum value
See Also:
getMinimum()

getMaximum

public int getMaximum()
Returns the maximum value -- the higher end of the progress value.
Returns:
an int representing the maximum value
See Also:
setMaximum(int)

setMaximum

public void setMaximum(int m)
Specifies the maximum value.
Parameters:
m - an int specifying the maximum value
See Also:
getMaximum()

isCanceled

public boolean isCanceled()
Returns true if the user hits the Cancel button in the progress dialog.

setMillisToDecideToPopup

public void setMillisToDecideToPopup(int millisToDecideToPopup)
Specifies the amount of time to wait before deciding whether or not to popup a progress monitor.
Parameters:
millisToDecideToPopup - an int specifying the time to wait, in milliseconds
See Also:
getMillisToDecideToPopup()

getMillisToDecideToPopup

public int getMillisToDecideToPopup()
Returns the amount of time this object waits before deciding whether or not to popup a progress monitor.
Parameters:
millisToDecideToPopup - an int specifying waiting time, in milliseconds
See Also:
setMillisToDecideToPopup(int)

setMillisToPopup

public void setMillisToPopup(int millisToPopup)
Specifies the amount of time it will take for the popup to appear. (If the predicted time remaining is less than this time, the popup won't be displayed.)
Parameters:
millisToPopup - an int specifying the time in milliseconds
See Also:
getMillisToPopup()

getMillisToPopup

public int getMillisToPopup()
Returns the amount of time it will take for the popup to appear.
Parameters:
millisToPopup - an int specifying the time in milliseconds
See Also:
setMillisToPopup(int)

setNote

public void setNote(String note)
Specifies the additional note that is displayed along with the progress message. Used, for example, to show which file the is currently being copied during a multiple-file copy.
Parameters:
note - a String specifying the note to display
See Also:
getNote()

getNote

public String getNote()
Specifies the additional note that is displayed along with the progress message.
Returns:
a String specifying the note to display
See Also:
setNote(java.lang.String)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProgressMonitorInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ProgressMonitorInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--javax.swing.ProgressMonitorInputStream
public class ProgressMonitorInputStream
extends FilterInputStream

Monitors the progress of reading from some InputStream. This ProgressMonitor is normally invoked in roughly this form:

 InputStream in = new BufferedInputStream(
                          new ProgressMonitorInputStream(
                                  parentComponent,
                                  "Reading " + fileName,
                                  new FileInputStream(fileName)));

This creates a progress monitor to monitor the progress of reading the input stream. If it's taking a while, a ProgressDialog will be popped up to inform the user. If the user hits the Cancel button an InterruptedIOException will be thrown on the next read. All the right cleanup is done when the stream is closed.

For further documentation and examples see How to Monitor Progress, a section in The Java Tutorial.

See Also:
ProgressMonitor, JOptionPane

Fields inherited from class java.io.FilterInputStream
in
Constructor Summary
ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
Constructs an object to monitor the progress of an input stream.
Method Summary
void | close() Overrides FilterInputStream.close to close the progress monitor as well as the stream.
ProgressMonitor | getProgressMonitor() Get the ProgressMonitor object being used by this stream.
int | read() Overrides FilterInputStream.read to update the progress monitor after the read.
int | read(byte[] b) Overrides FilterInputStream.read to update the progress monitor after the read.
int | read(byte[] b, int off, int len) Overrides FilterInputStream.read to update the progress monitor after the read.
void | reset() Overrides FilterInputStream.reset to reset the progress monitor as well as the stream.
long | skip(long n) Overrides FilterInputStream.skip to update the progress monitor after the skip.
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ProgressMonitorInputStream

public ProgressMonitorInputStream(Component parentComponent,
                                  Object message,
                                  InputStream in)
Constructs an object to monitor the progress of an input stream.
Parameters:
message - Descriptive text to be placed in the dialog box if one is popped up.
parentComponent - The component triggering the operation being monitored.
in - The input stream to be monitored.
Method Detail

getProgressMonitor

public ProgressMonitor getProgressMonitor()
Get the ProgressMonitor object being used by this stream. Normally this isn't needed unless you want to do something like change the descriptive text partway through reading the file.
Returns:
the ProgressMonitor object used by this object

read

public int read()
         throws IOException
Overrides FilterInputStream.read to update the progress monitor after the read.
Overrides:
read in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

read

public int read(byte[] b)
         throws IOException
Overrides FilterInputStream.read to update the progress monitor after the read.
Overrides:
read in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.read(byte[], int, int)

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides FilterInputStream.read to update the progress monitor after the read.
Overrides:
read in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

skip

public long skip(long n)
          throws IOException
Overrides FilterInputStream.skip to update the progress monitor after the skip.
Overrides:
skip in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Overrides FilterInputStream.close to close the progress monitor as well as the stream.
Overrides:
close in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

reset

public void reset()
           throws IOException
Overrides FilterInputStream.reset to reset the progress monitor as well as the stream.
Overrides:
reset in class FilterInputStream
Following copied from class: java.io.FilterInputStream
Throws:
IOException - if the stream has not been marked or if the mark has been invalidated.
See Also:
FilterInputStream.in, FilterInputStream.mark(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProxyLazyValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UIDefaults.ProxyLazyValue

java.lang.Object
  |
  +--javax.swing.UIDefaults.ProxyLazyValue
All Implemented Interfaces:
UIDefaults.LazyValue
Enclosing class:
UIDefaults
public static class UIDefaults.ProxyLazyValue
extends Object
implements UIDefaults.LazyValue

This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created. It also avoids creation of an anonymous inner class for the LazyValue subclass. Both of these improve performance at the time that a a Look and Feel is loaded, at the cost of a slight performance reduction the first time createValue is called (since Reflection APIs are used).

Constructor Summary
UIDefaults.ProxyLazyValue(String c)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, Object[] o)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, String m)
Creates a LazyValue which will construct an instance when asked.
UIDefaults.ProxyLazyValue(String c, String m, Object[] o)
Creates a LazyValue which will construct an instance when asked.
Method Summary
 Object createValue(UIDefaults table)
Creates the value retrieved from the UIDefaults table.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UIDefaults.ProxyLazyValue

public UIDefaults.ProxyLazyValue(String c)
Creates a LazyValue which will construct an instance when asked.
Parameters:
c - a String specifying the classname of the instance to be created on demand

UIDefaults.ProxyLazyValue

public UIDefaults.ProxyLazyValue(String c,
                                 String m)
Creates a LazyValue which will construct an instance when asked.
Parameters:
c - a String specifying the classname of the class containing a static method to be called for instance creation
m - a String specifying the static method to be called on class c

UIDefaults.ProxyLazyValue

public UIDefaults.ProxyLazyValue(String c,
                                 Object[] o)
Creates a LazyValue which will construct an instance when asked.
Parameters:
c - a String specifying the classname of the instance to be created on demand
o - an array of Objects to be passed as paramaters to the constructor in class c

UIDefaults.ProxyLazyValue

public UIDefaults.ProxyLazyValue(String c,
                                 String m,
                                 Object[] o)
Creates a LazyValue which will construct an instance when asked.
Parameters:
c - a String specifying the classname of the class containing a static method to be called for instance creation.
m - a String specifying the static method to be called on class c
o - an array of Objects to be passed as paramaters to the static method in class c
Method Detail

createValue

public Object createValue(UIDefaults table)
Creates the value retrieved from the UIDefaults table. The object is created each time it is accessed.
Specified by:
createValue in interface UIDefaults.LazyValue
Parameters:
table - a UIDefaults table
Returns:
the created Object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Renderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface Renderer

public interface Renderer

Defines the requirements for an object responsible for "rendering" (displaying) a value.

Method Summary
Component | getComponent() Returns the component used to render the value.
void | setValue(Object aValue, boolean isSelected) Specifies the value to display and whether or not the value should be portrayed as "currently selected".

Method Detail

setValue

public void setValue(Object aValue,
                     boolean isSelected)
Specifies the value to display and whether or not the value should be portrayed as "currently selected".
Parameters:
aValue - an Object object
isSelected - a boolean

getComponent

public Component getComponent()
Returns the component used to render the value.
Returns:
the Component responsible for displaying the value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepaintManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class RepaintManager

java.lang.Object
  |
  +--javax.swing.RepaintManager
public class RepaintManager
extends Object

This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.

Constructor Summary
RepaintManager()
Create a new RepaintManager instance.
Method Summary
void | addDirtyRegion(JComponent c, int x, int y, int w, int h) Add a component in the list of components that should be refreshed.
void | addInvalidComponent(JComponent invalidComponent) Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
static RepaintManager | currentManager(Component c) Return the RepaintManager for the calling thread given a Component.
static RepaintManager | currentManager(JComponent c) Return the RepaintManager for the calling thread given a JComponent.
Rectangle | getDirtyRegion(JComponent aComponent) Return the current dirty region for a component.
Dimension | getDoubleBufferMaximumSize() Returns the maximum double buffer size.
Image | getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight) Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
boolean | isCompletelyDirty(JComponent aComponent) Convenience method that returns true if aComponent will be completely painted during the next paintDirtyRegions().
boolean | isDoubleBufferingEnabled() Returns true if this object is double buffered.
void | markCompletelyClean(JComponent aComponent) Mark a component completely clean.
void | markCompletelyDirty(JComponent aComponent) Mark a component completely dirty.
void | paintDirtyRegions() Paint all of the components that have been marked dirty.
void | removeInvalidComponent(JComponent component) Remove a component from the list of invalid components.
static void | setCurrentManager(RepaintManager aRepaintManager) Set the RepaintManager that should be used for the calling thread.
void | setDoubleBufferingEnabled(boolean aFlag) Enables or disables double buffering.
void | setDoubleBufferMaximumSize(Dimension d) Set the maximum double buffer size.
String | toString() Returns a string that displays and identifies this object's properties.
void | validateInvalidComponents() Validate all of the components that have been marked invalid.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepaintManager

public RepaintManager()
Create a new RepaintManager instance. You rarely call this constructor. directly. To get the default RepaintManager, use RepaintManager.currentManager(JComponent) (normally "this").
Method Detail

currentManager

public static RepaintManager currentManager(Component c)
Return the RepaintManager for the calling thread given a Component.
Parameters:
c - a Component -- unused in the default implementation, but could be used by an overridden version to return a different RepaintManager depending on the Component
Returns:
the RepaintManager object

currentManager

public static RepaintManager currentManager(JComponent c)
Return the RepaintManager for the calling thread given a JComponent.

Note: This method exists for backward binary compatibility with earlier versions of the Swing library. It simply returns the result returned by currentManager(Component).

Parameters:
c - a JComponent -- unused
Returns:
the RepaintManager object

setCurrentManager

public static void setCurrentManager(RepaintManager aRepaintManager)
Set the RepaintManager that should be used for the calling thread. aRepaintManager will become the current RepaintManager for the calling thread's thread group.
Parameters:
aRepaintManager - the RepaintManager object to use

addInvalidComponent

public void addInvalidComponent(JComponent invalidComponent)
Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
See Also:
JComponent.isValidateRoot(), removeInvalidComponent(javax.swing.JComponent)

removeInvalidComponent

public void removeInvalidComponent(JComponent component)
Remove a component from the list of invalid components.
See Also:
addInvalidComponent(javax.swing.JComponent)

addDirtyRegion

public void addDirtyRegion(JComponent c,
                           int x,
                           int y,
                           int w,
                           int h)
Add a component in the list of components that should be refreshed. If c already has a dirty region, the rectangle (x,y,w,h) will be unioned with the region that should be redrawn.
See Also:
JComponent.repaint(long, int, int, int, int)

getDirtyRegion

public Rectangle getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component. Return an empty rectangle if the component is not dirty.

markCompletelyDirty

public void markCompletelyDirty(JComponent aComponent)
Mark a component completely dirty. aComponent will be completely painted during the next paintDirtyRegions() call.

markCompletelyClean

public void markCompletelyClean(JComponent aComponent)
Mark a component completely clean. aComponent will not get painted during the next paintDirtyRegions() call.

isCompletelyDirty

public boolean isCompletelyDirty(JComponent aComponent)
Convenience method that returns true if aComponent will be completely painted during the next paintDirtyRegions(). If computing dirty regions is expensive for your component, use this method and avoid computing dirty region if it return true.

validateInvalidComponents

public void validateInvalidComponents()
Validate all of the components that have been marked invalid.
See Also:
addInvalidComponent(javax.swing.JComponent)

paintDirtyRegions

public void paintDirtyRegions()
Paint all of the components that have been marked dirty.
See Also:
addDirtyRegion(javax.swing.JComponent, int, int, int, int)

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object

getOffscreenBuffer

public Image getOffscreenBuffer(Component c,
                                int proposedWidth,
                                int proposedHeight)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager. The buffer might be smaller than (proposedWidth,proposedHeight) This happens when the maximum double buffer size as been set for the receiving repaint manager.

setDoubleBufferMaximumSize

public void setDoubleBufferMaximumSize(Dimension d)
Set the maximum double buffer size.

getDoubleBufferMaximumSize

public Dimension getDoubleBufferMaximumSize()
Returns the maximum double buffer size.
Returns:
a Dimension object representing the maximum size

setDoubleBufferingEnabled

public void setDoubleBufferingEnabled(boolean aFlag)
Enables or disables double buffering.
Parameters:
aFlag - true to activate double buffering

isDoubleBufferingEnabled

public boolean isDoubleBufferingEnabled()
Returns true if this object is double buffered.
Returns:
true if this object is double buffered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RootLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JRootPane.RootLayout

java.lang.Object
  |
  +--javax.swing.JRootPane.RootLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
Enclosing class:
JRootPane
protected class JRootPane.RootLayout
extends Object
implements LayoutManager2, Serializable

A custom layout manager that is responsible for the layout of layeredPane, glassPane, and menuBar.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
protected JRootPane.RootLayout()
Method Summary
void | addLayoutComponent(Component comp, Object constraints) Adds the specified component to the layout, using the specified constraint object.
void | addLayoutComponent(String name, Component comp) Adds the specified component with the specified name to the layout.
float | getLayoutAlignmentX(Container target) Returns the alignment along the x axis.
float | getLayoutAlignmentY(Container target) Returns the alignment along the y axis.
void | invalidateLayout(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
void | layoutContainer(Container parent) Instructs the layout manager to perform the layout for the specified container.
Dimension | maximumLayoutSize(Container target) Returns the maximum amount of space the layout can use.
Dimension | minimumLayoutSize(Container parent) Returns the minimum amount of space the layout needs.
Dimension | preferredLayoutSize(Container parent) Returns the amount of space the layout would like to have.
void | removeLayoutComponent(Component comp) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JRootPane.RootLayout

protected JRootPane.RootLayout()
Method Detail

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Returns the amount of space the layout would like to have.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
the - Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's preferred size

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Returns the minimum amount of space the layout needs.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
the - Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's minimum size

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum amount of space the layout can use.
Specified by:
maximumLayoutSize in interface LayoutManager2
Parameters:
the - Container for which this layout manager is being used
Returns:
a Dimension object containing the layout's maximum size

layoutContainer

public void layoutContainer(Container parent)
Instructs the layout manager to perform the layout for the specified container.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
the - Container for which this layout manager is being used

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Description copied from interface: LayoutManager
Adds the specified component with the specified name to the layout.
Specified by:
addLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Description copied from interface: LayoutManager
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Following copied from interface: java.awt.LayoutManager
Parameters:
comp - the component to be removed

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Description copied from interface: LayoutManager2
Adds the specified component to the layout, using the specified constraint object.
Specified by:
addLayoutComponent in interface LayoutManager2
Following copied from interface: java.awt.LayoutManager2
Parameters:
comp - the component to be added
constraints - where/how the component is added to the layout.

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Description copied from interface: LayoutManager2
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Description copied from interface: LayoutManager2
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Description copied from interface: LayoutManager2
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Specified by:
invalidateLayout in interface LayoutManager2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RootPaneContainer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface RootPaneContainer

All Known Implementing Classes:
JApplet, JFrame, JInternalFrame, JWindow, JDialog
public interface RootPaneContainer

This interface is implemented by components that have a single JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame. The methods in this interface are just covers for the JRootPane properties, e.g. getContentPane() is generally implemented like this:

     public Container getContentPane() {
         return getRootPane().getContentPane();
     }
This interface serves as a marker for Swing GUI builders that need to treat components like JFrame, that contain a single JRootPane, specially. For example in a GUI builder, dropping a component on a RootPaneContainer would be interpreted as frame.getContentPane().add(child).

See Also:
JRootPane, JFrame, JDialog, JWindow, JApplet, JInternalFrame

Method Summary
Container | getContentPane() Returns the contentPane.
Component | getGlassPane() Returns the glassPane.
JLayeredPane | getLayeredPane() Returns the layeredPane.
JRootPane | getRootPane() Return this component's single JRootPane child.
void | setContentPane(Container contentPane) The "contentPane" is the primary container for application specific components.
void | setGlassPane(Component glassPane) The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane.
void | setLayeredPane(JLayeredPane layeredPane) A Container that manages the contentPane and in some cases a menu bar.

Method Detail

getRootPane

public JRootPane getRootPane()
Return this component's single JRootPane child. A conventional implementation of this interface will have all of the other methods indirect through this one. The rootPane has two children: the glassPane and the layeredPane.
Returns:
this components single JRootPane child.
See Also:
JRootPane

setContentPane

public void setContentPane(Container contentPane)
The "contentPane" is the primary container for application specific components. Applications should add children to the contentPane, set its layout manager, and so on.

The contentPane my not be null.

Generally implemented with getRootPane().setContentPane(contentPane);

Parameters:
contentPane - the Container to use for the contents of this JRootPane
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
JRootPane.getContentPane(), getContentPane()

getContentPane

public Container getContentPane()
Returns the contentPane.
Returns:
the value of the contentPane property.
See Also:
setContentPane(java.awt.Container)

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
A Container that manages the contentPane and in some cases a menu bar. The layeredPane can be used by descendants that want to add a child to the RootPaneContainer that isn't layout managed. For example an internal dialog or a drag and drop effect component.

The layeredPane may not be null.

Generally implemented with

    getRootPane().setLayeredPane(layeredPane);
Throws:
IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
getLayeredPane(), JRootPane.getLayeredPane()

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane.
Returns:
the value of the layeredPane property.
See Also:
setLayeredPane(javax.swing.JLayeredPane)

setGlassPane

public void setGlassPane(Component glassPane)
The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane. By default it's transparent and not visible. It can be used to temporarily grab all keyboard and mouse input by adding listeners and then making it visible. by default it's not visible.

The glassPane may not be null.

Generally implemented with getRootPane().setGlassPane(glassPane);

See Also:
getGlassPane(), JRootPane.setGlassPane(java.awt.Component)

getGlassPane

public Component getGlassPane()
Returns the glassPane.
Returns:
the value of the glassPane property.
See Also:
setGlassPane(java.awt.Component)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Scrollable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface Scrollable

All Known Implementing Classes:
JList, JTextComponent, JTree, JTable
public interface Scrollable

An interface that provides information to a scrolling container like JScrollPane. A complex component that's likely to be used as a viewin a JScrollPane viewport (or other scrolling container) should implement this interface.

See Also:
JViewport, JScrollPane, JScrollBar

Method Summary
Dimension | getPreferredScrollableViewportSize() Returns the preferred size of the viewport for a view component.
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
boolean | getScrollableTracksViewportHeight() Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.
boolean | getScrollableTracksViewportWidth() Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.

Method Detail

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for a view component. For example the preferredSize of a JList component is the size required to acommodate all of the cells in its list however the value of preferredScrollableViewportSize is the size required for JList.getVisibleRowCount() rows. A component without any properties that would effect the viewport size should just return getPreferredSize() here.
Returns:
The preferredSize of a JViewport whose view is this Scrollable.
See Also:
JComponent.getPreferredSize()

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation. Ideally, components should handle a partially exposed row or column by returning the distance required to completely expose the item.

Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.

Parameters:
visibleRect - The view area visible within the viewport
orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
direction - Less than zero to scroll up/left, greater than zero for down/right.
Returns:
The "unit" increment for scrolling in the specified direction
See Also:
JScrollBar.setUnitIncrement(int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.

Scrolling containers, like JScrollPane, will use this method each time the user requests a block scroll.

Parameters:
visibleRect - The view area visible within the viewport
orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
direction - Less than zero to scroll up/left, greater than zero for down/right.
Returns:
The "block" increment for scrolling in the specified direction.
See Also:
JScrollBar.setBlockIncrement(int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport. For example a noraml text view that supported line wrapping would return true here, since it would be undesirable for wrapped lines to disappear beyond the right edge of the viewport. Note that returning true for a Scrollable whose ancestor is a JScrollPane effectively disables horizontal scrolling.

Scrolling containers, like JViewport, will use this method each time they are validated.

Returns:
True if a viewport should force the Scrollables width to match its own.

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport. For example a columnar text view that flowed text in left to right columns could effectively disable vertical scrolling by returning true here.

Scrolling containers, like JViewport, will use this method each time they are validated.

Returns:
True if a viewport should force the Scrollables height to match its own.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollBar

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JScrollPane.ScrollBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JScrollBar
                          |
                          +--javax.swing.JScrollPane.ScrollBar
All Implemented Interfaces:
Accessible, Adjustable, ImageObserver, MenuContainer, Serializable, UIResource
Enclosing class:
JScrollPane
protected class JScrollPane.ScrollBar
extends JScrollBar
implements UIResource

By default JScrollPane creates scrollbars that are instances of this class. Scrollbar overrides the getUnitIncrement and getBlockIncrement methods so that, if the viewport's view is a Scrollable, the view is asked to compute these values. Unless the unit/block increment have been explicitly set.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Scrollable, JScrollPane.createVerticalScrollBar(), JScrollPane.createHorizontalScrollBar(), Serialized Form

Inner classes inherited from class javax.swing.JScrollBar
JScrollBar.AccessibleJScrollBar
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JScrollBar
blockIncrement, model, orientation, unitIncrement
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, VERTICAL
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JScrollPane.ScrollBar(int orientation)
Creates a scrollbar with the specified orientation, where the options are: JScrollPane.VERTICAL JScrollPane.HORIZONTAL
Method Summary
int | getBlockIncrement(int direction) Computes the block increment for scrolling if the viewport's view is a Scrollable object.
int | getUnitIncrement(int direction) Computes the unit increment for scrolling if the viewport's view is a Scrollable object.
void | setBlockIncrement(int blockIncrement) Messages super to set the value, and resets the blockIncrementSet instance variable to true.
void | setUnitIncrement(int unitIncrement) Messages super to set the value, and resets the unitIncrementSet instance variable to true.
Methods inherited from class javax.swing.JScrollBar
addAdjustmentListener, fireAdjustmentValueChanged, getAccessibleContext, getBlockIncrement, getMaximum, getMaximumSize, getMinimum, getMinimumSize, getModel, getOrientation, getUI, getUIClassID, getUnitIncrement, getValue, getValueIsAdjusting, getVisibleAmount, isFocusTraversable, paramString, removeAdjustmentListener, setEnabled, setMaximum, setMinimum, setModel, setOrientation, setValue, setValueIsAdjusting, setValues, setVisibleAmount, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JScrollPane.ScrollBar

public JScrollPane.ScrollBar(int orientation)
Creates a scrollbar with the specified orientation, where the options are:
  • JScrollPane.VERTICAL
  • JScrollPane.HORIZONTAL
Parameters:
orientation - an integer specifying one of the legal orientation values shown above
Method Detail

setUnitIncrement

public void setUnitIncrement(int unitIncrement)
Messages super to set the value, and resets the unitIncrementSet instance variable to true.
Overrides:
setUnitIncrement in class JScrollBar
Parameters:
unitIncrement - the new unit increment value, in pixels

getUnitIncrement

public int getUnitIncrement(int direction)
Computes the unit increment for scrolling if the viewport's view is a Scrollable object. Otherwise return super.getUnitIncrement.
Overrides:
getUnitIncrement in class JScrollBar
Parameters:
direction - less than zero to scroll up/left, greater than zero for down/right
Returns:
an integer, in pixels, containing the unit increment
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

setBlockIncrement

public void setBlockIncrement(int blockIncrement)
Messages super to set the value, and resets the blockIncrementSet instance variable to true.
Overrides:
setBlockIncrement in class JScrollBar
Parameters:
blockIncrement - the new block increment value, in pixels

getBlockIncrement

public int getBlockIncrement(int direction)
Computes the block increment for scrolling if the viewport's view is a Scrollable object. Otherwise the blockIncrement equals the viewport's width or height. If there's no viewport return super.getBlockIncrement.
Overrides:
getBlockIncrement in class JScrollBar
Parameters:
direction - less than zero to scroll up/left, greater than zero for down/right
Returns:
an integer, in pixels, containing the block increment
See Also:
Scrollable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollPaneConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface ScrollPaneConstants

All Known Implementing Classes:
ScrollPaneLayout, JScrollPane, BasicScrollPaneUI
public interface ScrollPaneConstants

Constants used with the JScrollPane component.

Field Summary
static String | COLUMN_HEADER Identifies the area at the top the viewport between the upper left corner and the upper right corner.
static String | HORIZONTAL_SCROLLBAR Identifies a horizonal scrollbar.
static int | HORIZONTAL_SCROLLBAR_ALWAYS Used to set the horizontal scroll bar policy so that horizontal scrollbars are always displayed.
static int | HORIZONTAL_SCROLLBAR_AS_NEEDED Used to set the horizontal scroll bar policy so that horizontal scrollbars are displayed only when needed.
static int | HORIZONTAL_SCROLLBAR_NEVER Used to set the horizontal scroll bar policy so that horizontal scrollbars are never displayed.
static String | HORIZONTAL_SCROLLBAR_POLICY Identifies the horizontal scroll bar policy property.
static String | LOWER_LEADING_CORNER Identifies the lower leading edge corner of the viewport.
static String | LOWER_LEFT_CORNER Identifies the lower left corner of the viewport.
static String | LOWER_RIGHT_CORNER Identifies the lower right corner of the viewport.
static String | LOWER_TRAILING_CORNER Identifies the lower trailing edge corner of the viewport.
static String | ROW_HEADER Identifies the area along the left side of the viewport between the upper left corner and the lower left corner.
static String | UPPER_LEADING_CORNER Identifies the upper leading edge corner of the viewport.
static String | UPPER_LEFT_CORNER Identifies the upper left corner of the viewport.
static String | UPPER_RIGHT_CORNER Identifies the upper right corner of the viewport.
static String | UPPER_TRAILING_CORNER Identifies the upper trailing edge corner of the viewport.
static String | VERTICAL_SCROLLBAR Identifies a vertical scrollbar.
static int | VERTICAL_SCROLLBAR_ALWAYS Used to set the vertical scroll bar policy so that vertical scrollbars are always displayed.
static int | VERTICAL_SCROLLBAR_AS_NEEDED Used to set the vertical scroll bar policy so that vertical scrollbars are displayed only when needed.
static int | VERTICAL_SCROLLBAR_NEVER Used to set the vertical scroll bar policy so that vertical scrollbars are never displayed.
static String | VERTICAL_SCROLLBAR_POLICY Identifies the vertical scroll bar policy property.
static String | VIEWPORT Identifies a "viewport" or display area, within which scrolled contents are visible.

Field Detail

VIEWPORT

public static final String VIEWPORT
Identifies a "viewport" or display area, within which scrolled contents are visible.

VERTICAL_SCROLLBAR

public static final String VERTICAL_SCROLLBAR
Identifies a vertical scrollbar.

HORIZONTAL_SCROLLBAR

public static final String HORIZONTAL_SCROLLBAR
Identifies a horizonal scrollbar.

ROW_HEADER

public static final String ROW_HEADER
Identifies the area along the left side of the viewport between the upper left corner and the lower left corner.

COLUMN_HEADER

public static final String COLUMN_HEADER
Identifies the area at the top the viewport between the upper left corner and the upper right corner.

LOWER_LEFT_CORNER

public static final String LOWER_LEFT_CORNER
Identifies the lower left corner of the viewport.

LOWER_RIGHT_CORNER

public static final String LOWER_RIGHT_CORNER
Identifies the lower right corner of the viewport.

UPPER_LEFT_CORNER

public static final String UPPER_LEFT_CORNER
Identifies the upper left corner of the viewport.

UPPER_RIGHT_CORNER

public static final String UPPER_RIGHT_CORNER
Identifies the upper right corner of the viewport.

LOWER_LEADING_CORNER

public static final String LOWER_LEADING_CORNER
Identifies the lower leading edge corner of the viewport. The leading edge is determined relative to the Scroll Pane's ComponentOrientation property.

LOWER_TRAILING_CORNER

public static final String LOWER_TRAILING_CORNER
Identifies the lower trailing edge corner of the viewport. The trailing edge is determined relative to the Scroll Pane's ComponentOrientation property.

UPPER_LEADING_CORNER

public static final String UPPER_LEADING_CORNER
Identifies the upper leading edge corner of the viewport. The leading edge is determined relative to the Scroll Pane's ComponentOrientation property.

UPPER_TRAILING_CORNER

public static final String UPPER_TRAILING_CORNER
Identifies the upper trailing edge corner of the viewport. The trailing edge is determined relative to the Scroll Pane's ComponentOrientation property.

VERTICAL_SCROLLBAR_POLICY

public static final String VERTICAL_SCROLLBAR_POLICY
Identifies the vertical scroll bar policy property.

HORIZONTAL_SCROLLBAR_POLICY

public static final String HORIZONTAL_SCROLLBAR_POLICY
Identifies the horizontal scroll bar policy property.

VERTICAL_SCROLLBAR_AS_NEEDED

public static final int VERTICAL_SCROLLBAR_AS_NEEDED
Used to set the vertical scroll bar policy so that vertical scrollbars are displayed only when needed.

VERTICAL_SCROLLBAR_NEVER

public static final int VERTICAL_SCROLLBAR_NEVER
Used to set the vertical scroll bar policy so that vertical scrollbars are never displayed.

VERTICAL_SCROLLBAR_ALWAYS

public static final int VERTICAL_SCROLLBAR_ALWAYS
Used to set the vertical scroll bar policy so that vertical scrollbars are always displayed.

HORIZONTAL_SCROLLBAR_AS_NEEDED

public static final int HORIZONTAL_SCROLLBAR_AS_NEEDED
Used to set the horizontal scroll bar policy so that horizontal scrollbars are displayed only when needed.

HORIZONTAL_SCROLLBAR_NEVER

public static final int HORIZONTAL_SCROLLBAR_NEVER
Used to set the horizontal scroll bar policy so that horizontal scrollbars are never displayed.

HORIZONTAL_SCROLLBAR_ALWAYS

public static final int HORIZONTAL_SCROLLBAR_ALWAYS
Used to set the horizontal scroll bar policy so that horizontal scrollbars are always displayed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScrollPaneLayout

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ScrollPaneLayout

java.lang.Object
  |
  +--javax.swing.ScrollPaneLayout
All Implemented Interfaces:
LayoutManager, ScrollPaneConstants, Serializable
Direct Known Subclasses:
ScrollPaneLayout.UIResource
public class ScrollPaneLayout
extends Object
implements LayoutManager, ScrollPaneConstants, Serializable

The layout manager used by JScrollPane. JScrollPaneLayout is responsible for nine components: a viewport, two scrollbars, a row header, a column header, and four "corner" components.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JScrollPane, JViewport, Serialized Form

Inner Class Summary
static class ScrollPaneLayout.UIResource
The UI resource version of ScrollPaneLayout.
Field Summary
protected JViewport | colHead The column header child.
protected JScrollBar | hsb The scrollpanes horizontal scrollbar child.
protected int | hsbPolicy The display policy for the horizontal scrollbar.
protected Component | lowerLeft The component to display in the lower left corner.
protected Component | lowerRight The component to display in the lower right corner.
protected JViewport | rowHead The row header child.
protected Component | upperLeft The component to display in the upper left corner.
protected Component | upperRight The component to display in the upper right corner.
protected JViewport | viewport The scrollpanes viewport child.
protected JScrollBar | vsb The scrollpanes vertical scrollbar child.
protected int | vsbPolicy The display policy for the vertical scrollbar.
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor Summary
ScrollPaneLayout()
Method Summary
void | addLayoutComponent(String s, Component c) Adds the specified component to the layout.
protected Component | addSingletonComponent(Component oldC, Component newC) The method used to remove an existing component.
JViewport | getColumnHeader() Returns the JViewport object that is the column header.
Component | getCorner(String key) Returns the Component at the specified corner.
JScrollBar | getHorizontalScrollBar() Returns the JScrollBar object that handles horizontal scrolling.
int | getHorizontalScrollBarPolicy() Returns the horizontal scrollbar-display policy.
JViewport | getRowHeader() Returns the JViewport object that is the row header.
JScrollBar | getVerticalScrollBar() Returns the JScrollBar object that handles vertical scrolling.
int | getVerticalScrollBarPolicy() Returns the vertical scrollbar-display policy.
JViewport | getViewport() Returns the JViewport object that displays the scrollable contents.
Rectangle | getViewportBorderBounds(JScrollPane scrollpane) Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().
void | layoutContainer(Container parent) Lay out the scrollpane.
Dimension | minimumLayoutSize(Container parent) The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
Dimension | preferredLayoutSize(Container parent) The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
void | setHorizontalScrollBarPolicy(int x) Sets the horizontal scrollbar-display policy.
void | setVerticalScrollBarPolicy(int x) Sets the vertical scrollbar-display policy.
void | syncWithScrollPane(JScrollPane sp) This method must be called after setting a JScrollPanes layout manager.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

viewport

protected JViewport viewport
The scrollpanes viewport child. Default is an empty JViewport.
See Also:
JScrollPane.setViewport(javax.swing.JViewport)

vsb

protected JScrollBar vsb
The scrollpanes vertical scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setVerticalScrollBar(javax.swing.JScrollBar)

hsb

protected JScrollBar hsb
The scrollpanes horizontal scrollbar child. Default is a JScrollBar.
See Also:
JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar)

rowHead

protected JViewport rowHead
The row header child. Default is null.
See Also:
JScrollPane.setRowHeader(javax.swing.JViewport)

colHead

protected JViewport colHead
The column header child. Default is null.
See Also:
JScrollPane.setColumnHeader(javax.swing.JViewport)

lowerLeft

protected Component lowerLeft
The component to display in the lower left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

lowerRight

protected Component lowerRight
The component to display in the lower right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperLeft

protected Component upperLeft
The component to display in the upper left corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

upperRight

protected Component upperRight
The component to display in the upper right corner. Default is null.
See Also:
JScrollPane.setCorner(java.lang.String, java.awt.Component)

vsbPolicy

protected int vsbPolicy
The display policy for the vertical scrollbar. The default is JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED.

This field is obsolete, please use the JScrollPane field instead.

See Also:
JScrollPane.setVerticalScrollBarPolicy(int)

hsbPolicy

protected int hsbPolicy
The display policy for the horizontal scrollbar. The default is JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED.

This field is obsolete, please use the JScrollPane field instead.

See Also:
JScrollPane.setHorizontalScrollBarPolicy(int)
Constructor Detail

ScrollPaneLayout

public ScrollPaneLayout()
Method Detail

syncWithScrollPane

public void syncWithScrollPane(JScrollPane sp)
This method must be called after setting a JScrollPanes layout manager. It initializes all of the internal fields that are ordinarily set by addLayoutComponent(). For example:
 ScrollPaneLayout mySPLayout = new ScrollPanelLayout() {
     public void layoutContainer(Container p) {
         super.layoutContainer(p);
         // do some extra work here ...
     }
 };
 scrollpane.setLayout(mySPLayout):
 mySPLayout.syncWithScrollPane(scrollpane);

addSingletonComponent

protected Component addSingletonComponent(Component oldC,
                                          Component newC)
The method used to remove an existing component. Since there can be one and only one left corner, vertical scrollbar, and so on. So only one of each subcomponent is allowed, the old one is removed (if it exists) when a new one is added.

This method returns newC. If oldC is not equal to newC and is non-null, it will be removed from its parent.

Parameters:
oldC - the Component to replace
newC - the Component to add
Returns:
the newC

addLayoutComponent

public void addLayoutComponent(String s,
                               Component c)
Adds the specified component to the layout. The layout is identified using one of:
  • JScrollPane.VIEWPORT
  • JScrollPane.VERTICAL_SCROLLBAR
  • JScrollPane.HORIZONTAL_SCROLLBAR
  • JScrollPane.ROW_HEADER
  • JScrollPane.COLUMN_HEADER
  • JScrollPane.LOWER_LEFT_CORNER
  • JScrollPane.LOWER_RIGHT_CORNER
  • JScrollPane.UPPER_LEFT_CORNER
  • JScrollPane.UPPER_RIGHT_CORNER
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
s - the component identifier
comp - the the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component c)
Removes the specified component from the layout.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
c - the component to remove

getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()
Returns the vertical scrollbar-display policy.
Returns:
an int giving the display policy
See Also:
setVerticalScrollBarPolicy(int)

setVerticalScrollBarPolicy

public void setVerticalScrollBarPolicy(int x)
Sets the vertical scrollbar-display policy. The options are:
  • JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
  • JScrollPane.VERTICAL_SCROLLBAR_NEVER
  • JScrollPane.VERTICAL_SCROLLBAR_ALWAYS
Note: Applications should use the JScrollPane version of this method. It only exists for backwards compatibility with the Swing 1.0.2 (and earlier) versions of this class.
Parameters:
x - an int giving the display policy

getHorizontalScrollBarPolicy

public int getHorizontalScrollBarPolicy()
Returns the horizontal scrollbar-display policy.
Returns:
an int giving the display policy
See Also:
setHorizontalScrollBarPolicy(int)

setHorizontalScrollBarPolicy

public void setHorizontalScrollBarPolicy(int x)
Sets the horizontal scrollbar-display policy. The options are:
  • JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
  • JScrollPane.HOTRIZONTAL_SCROLLBAR_NEVER
  • JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS
Note: Applications should use the JScrollPane version of this method. It only exists for backwards compatibility with the Swing 1.0.2 (and earlier) versions of this class.
Parameters:
x - an int giving the display policy

getViewport

public JViewport getViewport()
Returns the JViewport object that displays the scrollable contents.
Returns:
the JViewport object that displays the scrollable contents
See Also:
JScrollPane.getViewport()

getHorizontalScrollBar

public JScrollBar getHorizontalScrollBar()
Returns the JScrollBar object that handles horizontal scrolling.
Returns:
the JScrollBar object that handles horizontal scrolling
See Also:
JScrollPane.getHorizontalScrollBar()

getVerticalScrollBar

public JScrollBar getVerticalScrollBar()
Returns the JScrollBar object that handles vertical scrolling.
Returns:
the JScrollBar object that handles vertical scrolling
See Also:
JScrollPane.getVerticalScrollBar()

getRowHeader

public JViewport getRowHeader()
Returns the JViewport object that is the row header.
Returns:
the JViewport object that is the row header
See Also:
JScrollPane.getRowHeader()

getColumnHeader

public JViewport getColumnHeader()
Returns the JViewport object that is the column header.
Returns:
the JViewport object that is the column header
See Also:
JScrollPane.getColumnHeader()

getCorner

public Component getCorner(String key)
Returns the Component at the specified corner.
Parameters:
key - the String specifying the corner
Returns:
the Component at the specified corner, as defined in ScrollPaneConstants
See Also:
JScrollPane.getCorner(java.lang.String)

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the Container that will be laid out
Returns:
a Dimension object specifying the preferred size of the viewport and any scrollbars.
See Also:
ViewportLayout, LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the Container that will be laid out
Returns:
a Dimension object specifying the minimum size

layoutContainer

public void layoutContainer(Container parent)
Lay out the scrollpane. The positioning of components depends on the following constraints:
  • The row header, if present and visible, gets its preferred height and the viewports width.
  • The column header, if present and visible, gets its preferred width and the viewports height.
  • If a vertical scrollbar is needed, i.e. if the viewports extent height is smaller than its view height or if the displayPolicy is ALWAYS, it's treated like the row header wrt it's dimensions and it's made visible.
  • If a horizontal scrollbar is needed it's treated like the column header (and see the vertical scrollbar item).
  • If the scrollpane has a non-null viewportBorder, then space is allocated for that.
  • The viewport gets the space available after accounting for the previous constraints.
  • The corner components, if provided, are aligned with the ends of the scrollbars and headers. If there's a vertical scrollbar the right corners appear, if there's a horizontal scrollbar the lower corners appear, a row header gets left corners and a column header gets upper corners.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the Container to lay out

getViewportBorderBounds

public Rectangle getViewportBorderBounds(JScrollPane scrollpane)
Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().

Returns the bounds of the border around the specified scroll pane's viewport.
Returns:
the size and position of the viewport border
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Separator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JPopupMenu.Separator

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSeparator
                          |
                          +--javax.swing.JPopupMenu.Separator
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
Enclosing class:
JPopupMenu
public static class JPopupMenu.Separator
extends JSeparator

A popup menu-specific separator.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JSeparator
JSeparator.AccessibleJSeparator
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JPopupMenu.Separator()
Method Summary
 String getUIClassID()
Returns the name of the L&F class that renders this component.
Methods inherited from class javax.swing.JSeparator
getAccessibleContext, getOrientation, getUI, isFocusTraversable, paramString, setOrientation, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JPopupMenu.Separator

public JPopupMenu.Separator()
Method Detail

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JSeparator
Returns:
the string "PopupMenuSeparatorUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Separator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToolBar.Separator

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSeparator
                          |
                          +--javax.swing.JToolBar.Separator
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
Enclosing class:
JToolBar
public static class JToolBar.Separator
extends JSeparator

A toolbar-specific separator. An object with dimension but no contents used to divide buttons on a toolbar into groups.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JSeparator
JSeparator.AccessibleJSeparator
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JToolBar.Separator()
Creates a new toolbar separator with the default size as defined by the current look and feel.
JToolBar.Separator(Dimension size)
Creates a new toolbar separator with the specified size.
Method Summary
Dimension | getMaximumSize() Returns the maximum size for the separator.
Dimension | getMinimumSize() Returns the minimum size for the separator.
Dimension | getPreferredSize() Returns the preferred size for the separator.
Dimension | getSeparatorSize() Returns the size of the separator
String | getUIClassID() Returns the name of the L&F class that renders this component.
void | setSeparatorSize(Dimension size) Sets the size of the separator.
Methods inherited from class javax.swing.JSeparator
getAccessibleContext, getOrientation, getUI, isFocusTraversable, paramString, setOrientation, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JToolBar.Separator

public JToolBar.Separator()
Creates a new toolbar separator with the default size as defined by the current look and feel.

JToolBar.Separator

public JToolBar.Separator(Dimension size)
Creates a new toolbar separator with the specified size.
Parameters:
size - the Dimension of the separator
Method Detail

getUIClassID

public String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class JSeparator
Returns:
the string "ToolBarSeparatorUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setSeparatorSize

public void setSeparatorSize(Dimension size)
Sets the size of the separator.
Parameters:
size - the new Dimension of the separator

getSeparatorSize

public Dimension getSeparatorSize()
Returns the size of the separator
Returns:
the Dimension object containing the separator's size (This is a reference, NOT a copy!)

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size for the separator.
Overrides:
getMinimumSize in class JComponent
Returns:
the Dimension object containing the separator's minimum size

getMaximumSize

public Dimension getMaximumSize()
Returns the maximum size for the separator.
Overrides:
getMaximumSize in class JComponent
Returns:
the Dimension object containing the separator's maximum size

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size for the separator.
Overrides:
getPreferredSize in class JComponent
Returns:
the Dimension object containing the separator's preferred size
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleSelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface SingleSelectionModel

All Known Implementing Classes:
DefaultSingleSelectionModel
public interface SingleSelectionModel

A model that supports at most one indexed selection.

Method Summary
void | addChangeListener(ChangeListener listener) Adds listener as a listener to changes in the model.
void | clearSelection() Clears the selection (to -1).
int | getSelectedIndex() Returns the model's selection.
boolean | isSelected() Returns true if the selection model currently has a selected value.
void | removeChangeListener(ChangeListener listener) Removes listener as a listener to changes in the model.
void | setSelectedIndex(int index) Sets the model's selected index to index.

Method Detail

getSelectedIndex

public int getSelectedIndex()
Returns the model's selection.
Returns:
the model's selection, or -1 if there is no selection
See Also:
setSelectedIndex(int)

setSelectedIndex

public void setSelectedIndex(int index)
Sets the model's selected index to index. Notifies any listeners if the model changes
Parameters:
an - int specifying the model selection
See Also:
getSelectedIndex(), addChangeListener(javax.swing.event.ChangeListener)

clearSelection

public void clearSelection()
Clears the selection (to -1).

isSelected

public boolean isSelected()
Returns true if the selection model currently has a selected value.
Returns:
true if a value is currently selected

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds listener as a listener to changes in the model.
Parameters:
l - the ChangeListener to add

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes listener as a listener to changes in the model.
Parameters:
l - the ChangeListener to remove
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SizeRequirements

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class SizeRequirements

java.lang.Object
  |
  +--javax.swing.SizeRequirements
All Implemented Interfaces:
Serializable
public class SizeRequirements
extends Object
implements Serializable

For the convenience of layout managers, calculates information about the size and position of components. All size and position calculation methods are class methods that take arrays of SizeRequirements as arguments. The SizeRequirements class supports two types of layout:

tiled
The components are placed end-to-end, starting at coordinate 0 (the leftmost or topmost position).
aligned
The components are aligned as specified by each component's X or Y alignment value.

Each SizeRequirements object contains information about either the width (and X alignment) or height (and Y alignment) of a single component or a group of components:

minimum
The smallest reasonable width/height of the component or component group, in pixels.
preferred
The natural width/height of the component or component group, in pixels.
maximum
The largest reasonable width/height of the component or component group, in pixels.
alignment
The X/Y alignment of the component or component group.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Component.getMinimumSize(),
Component.getPreferredSize(),
Component.getMaximumSize(),
Component.getAlignmentX(),
Component.getAlignmentY(), Serialized Form

Field Summary
float | alignment The alignment, specified as a value between 0.0 and 1.0, inclusive.
int | maximum The maximum size allowed.
int | minimum The minimum size required.
int | preferred The preferred (natural) size.
Constructor Summary
SizeRequirements()
Creates a SizeRequirements object with the minimum, preferred, and maximum sizes set to zero and an alignment value of 0.5 (centered).
SizeRequirements(int min, int pref, int max, float a)
Creates a SizeRequirements object with the specified minimum, preferred, and maximum sizes and the specified alignment.
Method Summary
static int[] | adjustSizes(int delta, SizeRequirements[] children) Adjust a specified array of sizes by a given amount.
static void | calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) Creates a bunch of offset/span pairs specifying how to lay out a set of components with the specified alignments.
static void | calculateTiledPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) Creates a bunch of offset/span pairs representing how to lay out a set of components end-to-end.
static SizeRequirements | getAlignedSizeRequirements(SizeRequirements[] children) Determines the total space necessary to align a set of components.
static SizeRequirements | getTiledSizeRequirements(SizeRequirements[] children) Determines the total space necessary to place a set of components end-to-end.
String | toString() Returns a string describing the minimum, preferred, and maximum size requirements, along with the alignment.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

minimum

public int minimum
The minimum size required. For a component comp, this should be equal to either comp.getMinimumSize().width or comp.getMinimumSize().height.

preferred

public int preferred
The preferred (natural) size. For a component comp, this should be equal to either comp.getPreferredSize().width or comp.getPreferredSize().height.

maximum

public int maximum
The maximum size allowed. For a component comp, this should be equal to either comp.getMaximumSize().width or comp.getMaximumSize().height.

alignment

public float alignment
The alignment, specified as a value between 0.0 and 1.0, inclusive. To specify centering, the alignment should be 0.5.
Constructor Detail

SizeRequirements

public SizeRequirements()
Creates a SizeRequirements object with the minimum, preferred, and maximum sizes set to zero and an alignment value of 0.5 (centered).

SizeRequirements

public SizeRequirements(int min,
                        int pref,
                        int max,
                        float a)
Creates a SizeRequirements object with the specified minimum, preferred, and maximum sizes and the specified alignment.
Parameters:
min - the minimum size >= 0
pref - the preferred size >= 0
max - the maximum size >= 0
a - the alignment >= 0.0f && <= 1.0f
Method Detail

toString

public String toString()
Returns a string describing the minimum, preferred, and maximum size requirements, along with the alignment.
Overrides:
toString in class Object
Returns:
the string

getTiledSizeRequirements

public static SizeRequirements getTiledSizeRequirements(SizeRequirements[] children)
Determines the total space necessary to place a set of components end-to-end. The needs of each component in the set are represented by an entry in the passed-in SizeRequirements array. The returned SizeRequirements object has an alignment of 0.5 (centered). The space requirement is never more than Integer.MAX_VALUE.
Parameters:
children - the space requirements for a set of components. The vector may be of zero length, which will result in a default SizeRequirements object instance being passed back.
Returns:
the total space requirements.

getAlignedSizeRequirements

public static SizeRequirements getAlignedSizeRequirements(SizeRequirements[] children)
Determines the total space necessary to align a set of components. The needs of each component in the set are represented by an entry in the passed-in SizeRequirements array. The total space required will never be more than Integer.MAX_VALUE.
Parameters:
children - the set of child requirements. If of zero length, the returns result will be a default instance of SizeRequirements.
Returns:
the total space requirements.

calculateTiledPositions

public static void calculateTiledPositions(int allocated,
                                           SizeRequirements total,
                                           SizeRequirements[] children,
                                           int[] offsets,
                                           int[] spans)
Creates a bunch of offset/span pairs representing how to lay out a set of components end-to-end. This method requires that you specify the total amount of space to be allocated, the size requirements for each component to be placed (specified as an array of SizeRequirements), and the total size requirement of the set of components. You can get the total size requirement by invoking the getTiledSizeRequirements method.
Parameters:
allocated - the total span to be allocated >= 0.
total - the total of the children requests. This argument is optional and may be null.
children - the size requirements for each component.
offsets - the offset from 0 for each child where the spans were allocated (determines placement of the span).
spans - the span allocated for each child to make the total target span.

calculateAlignedPositions

public static void calculateAlignedPositions(int allocated,
                                             SizeRequirements total,
                                             SizeRequirements[] children,
                                             int[] offsets,
                                             int[] spans)
Creates a bunch of offset/span pairs specifying how to lay out a set of components with the specified alignments. The resulting span allocations will overlap, with each one fitting as well as possible into the given total allocation. This method requires that you specify the total amount of space to be allocated, the size requirements for each component to be placed (specified as an array of SizeRequirements), and the total size requirements of the set of components (only the alignment field of which is actually used). You can get the total size requirement by invoking getAlignedSizeRequirements.
Parameters:
allocated - the total span to be allocated >= 0.
total - the total of the children requests.
children - the size requirements for each component.
offsets - the offset from 0 for each child where the spans were allocated (determines placement of the span).
spans - the span allocated for each child to make the total target span.

adjustSizes

public static int[] adjustSizes(int delta,
                                SizeRequirements[] children)
Adjust a specified array of sizes by a given amount.
Parameters:
delta - an int specifying the size difference
children - an array of SizeRequirements objects
Returns:
an array of ints containing the final size for each item
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SizeSequence

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class SizeSequence

java.lang.Object
  |
  +--javax.swing.SizeSequence
public class SizeSequence
extends Object

A SizeSequence object efficiently maintains an ordered list of sizes and corresponding positions. One situation for which SizeSequence might be appropriate is in a component that displays multiple rows of unequal size. In this case, a single SizeSequence object could be used to track the heights and Y positions of all rows.

Another example would be a multi-column component, such as a JTable, in which the column sizes are not all equal. The JTable might use a single SizeSequence object to store the widths and X positions of all the columns. The JTable could then use the SizeSequence object to find the column corresponding to a certain position. The JTable could update the SizeSequence object whenever one or more column sizes changed.

The following figure shows the relationship between size and position data for a multi-column component.

The first item begins at position 0, the second at the position equal to the size of the previous item, and so on.

In the figure, the first index (0) corresponds to the first column, the second index (1) to the second column, and so on. The first column's position starts at 0, and the column occupies size0 pixels, where size0 is the value returned by getSize(0). Thus, the first column ends at size0 - 1. The second column then begins at the position size0 and occupies size1 (getSize(1)) pixels.

Note that a SizeSequence object simply represents intervals along an axis. In our examples, the intervals represent height or width in pixels. However, any other unit of measure (for example, time in days) could be just as valid.

Implementation Notes

Normally when storing the size and position of entries, one would choose between storing the sizes or storing their positions instead. The two common operations that are needed during rendering are: getIndex(position) and setSize(index, size). Whichever choice of internal format is made one of these operations is costly when the number of entries becomes large. If sizes are stored, finding the index of the entry that encloses a particular position is linear in the number of entries. If positions are stored instead, setting the size of an entry at a particular index requires updating the positions of the affected entries, which is also a linear calculation.

Like the above techniques this class holds an array of N integers internally but uses a hybrid encoding, which is halfway between the size-based and positional-based approaches. The result is a data structure that takes the same space to store the information but can perform most operations in Log(N) time instead of O(N), where N is the number of entries in the list.

Two operations that remain O(N) in the number of entries are the insertEntries and removeEntries methods, both of which are implemented by converting the internal array to a set of integer sizes, copying it into the new array, and then reforming the hybrid representation in place.

Constructor Summary
SizeSequence()
Creates a new SizeSequence object that contains no entries.
SizeSequence(int numEntries)
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size 0.
SizeSequence(int[] sizes)
Creates a new SizeSequence object that contains the specified sizes.
SizeSequence(int numEntries, int value)
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size value.
Method Summary
int | getIndex(int position) Returns the index of the entry that corresponds to the specified position.
int | getPosition(int index) Returns the start position for the specified entry.
int | getSize(int index) Returns the size of the specified entry.
int[] | getSizes() Returns the size of all entries.
void | insertEntries(int start, int length, int value) Adds a contiguous group of entries to this SizeSequence.
void | removeEntries(int start, int length) Removes a contiguous group of entries from this SizeSequence.
void | setSize(int index, int size) Sets the size of the specified entry.
void | setSizes(int[] sizes) Resets this SizeSequence object, using the data in the sizes argument.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SizeSequence

public SizeSequence()
Creates a new SizeSequence object that contains no entries. To add entries, you can use insertEntries or setSizes.
See Also:
insertEntries(int, int, int), setSizes(int[])

SizeSequence

public SizeSequence(int numEntries)
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size 0.
Parameters:
numEntries - the number of sizes to track

SizeSequence

public SizeSequence(int numEntries,
                    int value)
Creates a new SizeSequence object that contains the specified number of entries, all initialized to have size value.
Parameters:
numEntries - the number of sizes to track
value - the initial value of each size

SizeSequence

public SizeSequence(int[] sizes)
Creates a new SizeSequence object that contains the specified sizes.
Parameters:
sizes - the array of sizes to be contained in the SizeSequence
Method Detail

setSizes

public void setSizes(int[] sizes)
Resets this SizeSequence object, using the data in the sizes argument. This method reinitializes this object so that it contains as many entries as the sizes array. Each entry's size is initialized to the value of the corresponding item in sizes.
Parameters:
sizes - the array of sizes to be contained in this SizeSequence

getSizes

public int[] getSizes()
Returns the size of all entries.
Returns:
a new array containing the sizes in this object

getPosition

public int getPosition(int index)
Returns the start position for the specified entry.
 For example, getPosition(0) returns 0,
 getPosition(1) is equal to
   getSize(0),
 getPosition(2) is equal to
   getSize(0) + getSize(1),
 and so on.
Parameters:
index - the index of the entry whose position is desired
Returns:
the starting position of the specified entry

getIndex

public int getIndex(int position)
Returns the index of the entry that corresponds to the specified position. For example, getIndex(0) is 0, since the first entry always starts at position 0.
Parameters:
position - the position of the entry
Returns:
the index of the entry that occupies the specified position

getSize

public int getSize(int index)
Returns the size of the specified entry.
Parameters:
index - the index corresponding to the entry
Returns:
the size of the entry

setSize

public void setSize(int index,
                    int size)
Sets the size of the specified entry.
Parameters:
index - the index corresponding to the entry
size - the size of the entry

insertEntries

public void insertEntries(int start,
                          int length,
                          int value)
Adds a contiguous group of entries to this SizeSequence.
Parameters:
start - the index to be assigned to the first entry in the group
length - the number of entries in the group
value - the size to be assigned to each new entry

removeEntries

public void removeEntries(int start,
                          int length)
Removes a contiguous group of entries from this SizeSequence.
Parameters:
start - the index of the first entry to be removed
length - the number of entries to be removed
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


stillInsideTimerAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ToolTipManager.stillInsideTimerAction

java.lang.Object
  |
  +--javax.swing.ToolTipManager.stillInsideTimerAction
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
ToolTipManager
protected class ToolTipManager.stillInsideTimerAction
extends Object
implements ActionListener

Constructor Summary
protected ToolTipManager.stillInsideTimerAction()
Method Summary
 void actionPerformed(ActionEvent e)
Invoked when an action occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToolTipManager.stillInsideTimerAction

protected ToolTipManager.stillInsideTimerAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Description copied from interface: ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface ActionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SwingConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface SwingConstants

All Known Implementing Classes:
JTabbedPane, AbstractButton, JCheckBoxMenuItem, JTextField, JSeparator, SwingUtilities, JLabel, JToolBar, JProgressBar, JSlider, View, BasicTabbedPaneUI, BasicScrollBarUI, BasicToolBarUI, BasicInternalFrameUI.BorderListener, BasicArrowButton, MetalBorders.ToolBarBorder
public interface SwingConstants

A collection of constants generally used for positioning and orienting components on the screen.

Field Summary
static int | BOTTOM Box-orientation constant used to specify the bottom of a box.
static int | CENTER The central position in an area.
static int | EAST Compass-direction east (right).
static int | HORIZONTAL Horizontal orientation.
static int | LEADING Identifies the leading edge of text for use with left-to-right and right-to-left languages.
static int | LEFT Box-orientation constant used to specify the left side of a box.
static int | NORTH Compass-direction North (up).
static int | NORTH_EAST Compass-direction north-east (upper right).
static int | NORTH_WEST Compass-direction north west (upper left).
static int | RIGHT Box-orientation constant used to specify the right side of a box.
static int | SOUTH Compass-direction south (down).
static int | SOUTH_EAST Compass-direction south-east (lower right).
static int | SOUTH_WEST Compass-direction south-west (lower left).
static int | TOP Box-orientation constant used to specify the top of a box.
static int | TRAILING Identifies the trailing edge of text for use with left-to-right and right-to-left languages.
static int | VERTICAL Vertical orientation.
static int | WEST Compass-direction west (left).

Field Detail

CENTER

public static final int CENTER
The central position in an area. Used for both compass-direction constants (NORTH, etc.) and box-orientation constants (TOP, etc.).

TOP

public static final int TOP
Box-orientation constant used to specify the top of a box.

LEFT

public static final int LEFT
Box-orientation constant used to specify the left side of a box.

BOTTOM

public static final int BOTTOM
Box-orientation constant used to specify the bottom of a box.

RIGHT

public static final int RIGHT
Box-orientation constant used to specify the right side of a box.

NORTH

public static final int NORTH
Compass-direction North (up).

NORTH_EAST

public static final int NORTH_EAST
Compass-direction north-east (upper right).

EAST

public static final int EAST
Compass-direction east (right).

SOUTH_EAST

public static final int SOUTH_EAST
Compass-direction south-east (lower right).

SOUTH

public static final int SOUTH
Compass-direction south (down).

SOUTH_WEST

public static final int SOUTH_WEST
Compass-direction south-west (lower left).

WEST

public static final int WEST
Compass-direction west (left).

NORTH_WEST

public static final int NORTH_WEST
Compass-direction north west (upper left).

HORIZONTAL

public static final int HORIZONTAL
Horizontal orientation. Used for scrollbars and sliders.

VERTICAL

public static final int VERTICAL
Vertical orientation. Used for scrollbars and sliders.

LEADING

public static final int LEADING
Identifies the leading edge of text for use with left-to-right and right-to-left languages. Used by buttons and labels.

TRAILING

public static final int TRAILING
Identifies the trailing edge of text for use with left-to-right and right-to-left languages. Used by buttons and labels.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SwingUtilities

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class SwingUtilities

java.lang.Object
  |
  +--javax.swing.SwingUtilities
All Implemented Interfaces:
SwingConstants
public class SwingUtilities
extends Object
implements SwingConstants

A collection of utility methods for Swing.

Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Method Summary
static Rectangle[] | computeDifference(Rectangle rectA, Rectangle rectB) Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB.
static Rectangle | computeIntersection(int x, int y, int width, int height, Rectangle dest) Convenience to calculate the intersection of two rectangles without allocating a new rectangle.
static int | computeStringWidth(FontMetrics fm, String str) Compute the width of the string using a font with the specified "metrics" (sizes).
static Rectangle | computeUnion(int x, int y, int width, int height, Rectangle dest) Convenience to calculate the union of two rectangles without allocating a new rectangle Return dest
static MouseEvent | convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination) Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system.
static Point | convertPoint(Component source, int x, int y, Component destination) Convert the point (x,y) in source coordinate system to destination coordinate system.
static Point | convertPoint(Component source, Point aPoint, Component destination) Convert a aPoint in source coordinate system to destination coordinate system.
static void | convertPointFromScreen(Point p, Component c) Convert a point from a screen coordinates to a component's coordinate system
static void | convertPointToScreen(Point p, Component c) Convert a point from a component's coordinate system to screen coordinates.
static Rectangle | convertRectangle(Component source, Rectangle aRectangle, Component destination) Convert the rectangle aRectangle in source coordinate system to destination coordinate system.
static Component | findFocusOwner(Component c) Return the child component which has focus, if any.
static Accessible | getAccessibleAt(Component c, Point p) Returns the Accessible child contained at the local coordinate Point, if one exists.
static Accessible | getAccessibleChild(Component c, int i) Return the nth Accessible child of the object.
static int | getAccessibleChildrenCount(Component c) Returns the number of accessible children in the object.
static int | getAccessibleIndexInParent(Component c) Get the index of this object in its accessible parent.
static AccessibleStateSet | getAccessibleStateSet(Component c) Get the state of this object.
static Container | getAncestorNamed(String name, Component comp) Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds.
static Container | getAncestorOfClass(Class c, Component comp) Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds.
static Component | getDeepestComponentAt(Component parent, int x, int y) Returns the deepest visible descendent Component of parent that contains the location x, y.
static Rectangle | getLocalBounds(Component aComponent) Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent
static Component | getRoot(Component c) Returns the root component for the current component tree.
static JRootPane | getRootPane(Component c) If c is a JRootPane descendant return its JRootPane ancestor.
static ActionMap | getUIActionMap(JComponent component) Returns the ActionMap provided by the UI in component component.
static InputMap | getUIInputMap(JComponent component, int condition) Returns the InputMap provided by the UI for condition condition in component component.
static Window | getWindowAncestor(Component c)
static void | invokeAndWait(Runnable doRun) Causes doRun.run() to be executed synchronously on the AWT event dispatching thread.
static void | invokeLater(Runnable doRun) Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread.
static boolean | isDescendingFrom(Component a, Component b) Return true if a component a descends from a component b
static boolean | isEventDispatchThread() Returns true if the current thread is an AWT event dispatching thread.
static boolean | isLeftMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the left mouse button.
static boolean | isMiddleMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the middle mouse button.
static boolean | isRectangleContainingRectangle(Rectangle a, Rectangle b) Return true if a contains b
static boolean | isRightMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the right mouse button.
static String | layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static String | layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
static boolean | notifyAction(Action action, KeyStroke ks, KeyEvent event, Object sender, int modifiers) Invokes actionPerformed on action if action is enabled (and non null).
static void | paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
static void | paintComponent(Graphics g, Component c, Container p, Rectangle r) Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object.
static void | replaceUIActionMap(JComponent component, ActionMap uiActionMap) Convenience method to change the UI ActionMap for component to uiActionMap.
static void | replaceUIInputMap(JComponent component, int type, InputMap uiInputMap) Convenience method to change the UI InputMap for component to uiInputMap.
static void | updateComponentTreeUI(Component c) A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.
static Window | windowForComponent(Component aComponent) Return aComponent's window
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

isRectangleContainingRectangle

public static final boolean isRectangleContainingRectangle(Rectangle a,
                                                           Rectangle b)
Return true if a contains b

getLocalBounds

public static Rectangle getLocalBounds(Component aComponent)
Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent

getWindowAncestor

public static Window getWindowAncestor(Component c)
Returns:
the first Window ancestor of c, or null if component is not contained inside a window

convertPoint

public static Point convertPoint(Component source,
                                 Point aPoint,
                                 Component destination)
Convert a aPoint in source coordinate system to destination coordinate system. If source>is null,aPoint is assumed to be in destination's root component coordinate system. If destinationis null, aPoint will be converted to source's root component coordinate system. If both source and destination are null, return aPoint without any conversion.

convertPoint

public static Point convertPoint(Component source,
                                 int x,
                                 int y,
                                 Component destination)
Convert the point (x,y) in source coordinate system to destination coordinate system. If source>is null,(x,y) is assumed to be in destination's root component coordinate system. If destinationis null, (x,y) will be converted to source's root component coordinate system. If both source and destination are null, return (x,y) without any conversion.

convertRectangle

public static Rectangle convertRectangle(Component source,
                                         Rectangle aRectangle,
                                         Component destination)
Convert the rectangle aRectangle in source coordinate system to destination coordinate system. If source>is null,aRectangle is assumed to be in destination's root component coordinate system. If destinationis null, aRectangle will be converted to source's root component coordinate system. If both source and destination are null, return aRectangle without any conversion.

getAncestorOfClass

public static Container getAncestorOfClass(Class c,
                                           Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds. Can return null, if a class c cannot be found.

getAncestorNamed

public static Container getAncestorNamed(String name,
                                         Component comp)
Convenience method for searching above comp in the component hierarchy and returns the first object of name it finds. Can return null, if name cannot be found.

getDeepestComponentAt

public static Component getDeepestComponentAt(Component parent,
                                              int x,
                                              int y)
Returns the deepest visible descendent Component of parent that contains the location x, y. If parent does not contain the specified location, then null is returned. If parent is not a container, or none of parent's visible descendents contain the specified location, parent is returned.
Parameters:
parent - the root component to begin the search
x - the x target location
y - the y target location

convertMouseEvent

public static MouseEvent convertMouseEvent(Component source,
                                           MouseEvent sourceEvent,
                                           Component destination)
Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination's coordinate system. If source is null, sourceEvent x and y members are assumed to be into destination's root component coordinate system. If destination is null, the returned MouseEvent will be in source's coordinate system. sourceEvent will not be changed. A new event is returned. the source field of the returned event will be set to destination if destination is non null use the translateMouseEvent() method to translate a mouse event from one component to another without changing the source.

convertPointToScreen

public static void convertPointToScreen(Point p,
                                        Component c)
Convert a point from a component's coordinate system to screen coordinates.
Parameters:
p - a Point object (converted to the new coordinate system)
c - a Component object

convertPointFromScreen

public static void convertPointFromScreen(Point p,
                                          Component c)
Convert a point from a screen coordinates to a component's coordinate system
Parameters:
p - a Point object (converted to the new coordinate system)
c - a Component object

windowForComponent

public static Window windowForComponent(Component aComponent)
Return aComponent's window

isDescendingFrom

public static boolean isDescendingFrom(Component a,
                                       Component b)
Return true if a component a descends from a component b

computeIntersection

public static Rectangle computeIntersection(int x,
                                            int y,
                                            int width,
                                            int height,
                                            Rectangle dest)
Convenience to calculate the intersection of two rectangles without allocating a new rectangle. If the two rectangles don't intersect, then the returned rectangle begins at (0,0) and has zero width and height.
Parameters:
x - the X coordinate of the first rectangle's top-left point
y - the Y coordinate of the first rectangle's top-left point
width - the width of the first rectangle
height - the height of the first rectangle
dest - the second rectangle
Returns:
dest, modified to specify the intersection

computeUnion

public static Rectangle computeUnion(int x,
                                     int y,
                                     int width,
                                     int height,
                                     Rectangle dest)
Convenience to calculate the union of two rectangles without allocating a new rectangle Return dest

computeDifference

public static Rectangle[] computeDifference(Rectangle rectA,
                                            Rectangle rectB)
Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB. If the two Rects do not overlap, returns an empty array

isLeftMouseButton

public static boolean isLeftMouseButton(MouseEvent anEvent)
Returns true if the mouse event specifies the left mouse button.
Parameters:
anEvent - a MouseEvent object
Returns:
true if the left mouse button was active

isMiddleMouseButton

public static boolean isMiddleMouseButton(MouseEvent anEvent)
Returns true if the mouse event specifies the middle mouse button.
Parameters:
anEvent - a MouseEvent object
Returns:
true if the middle mouse button was active

isRightMouseButton

public static boolean isRightMouseButton(MouseEvent anEvent)
Returns true if the mouse event specifies the right mouse button.
Parameters:
anEvent - a MouseEvent object
Returns:
true if the right mouse button was active

computeStringWidth

public static int computeStringWidth(FontMetrics fm,
                                     String str)
Compute the width of the string using a font with the specified "metrics" (sizes).
Parameters:
fm - a FontMetrics object to compute with
str - the String to compute
Returns:
an int containing the string width

layoutCompoundLabel

public static String layoutCompoundLabel(JComponent c,
                                         FontMetrics fm,
                                         String text,
                                         Icon icon,
                                         int verticalAlignment,
                                         int horizontalAlignment,
                                         int verticalTextPosition,
                                         int horizontalTextPosition,
                                         Rectangle viewR,
                                         Rectangle iconR,
                                         Rectangle textR,
                                         int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. Locations are computed relative to the viewR rectangle. The JComponents orientation (LEADING/TRAILING) will also be taken into account and translated into LEFT/RIGHT values accordingly.

layoutCompoundLabel

public static String layoutCompoundLabel(FontMetrics fm,
                                         String text,
                                         Icon icon,
                                         int verticalAlignment,
                                         int horizontalAlignment,
                                         int verticalTextPosition,
                                         int horizontalTextPosition,
                                         Rectangle viewR,
                                         Rectangle iconR,
                                         Rectangle textR,
                                         int textIconGap)
Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. Locations are computed relative to the viewR rectangle. This layoutCompoundLabel() does not know how to handle LEADING/TRAILING values in horizontalTextPosition (they will default to RIGHT) and in horizontalAlignment (they will default to CENTER). Use the other version of layoutCompoundLabel() instead.

paintComponent

public static void paintComponent(Graphics g,
                                  Component c,
                                  Container p,
                                  int x,
                                  int y,
                                  int w,
                                  int h)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size. The component is reparented to a private container (whose parent becomes p) which prevents c.validate() and and c.repaint() calls from propogating up the tree. The intermediate container has no other effect.
Parameters:
g - the Graphics object to draw on
c - the Component to draw
p - the intermedate Container
x - an int specifying the left side of the area draw in, in pixels, measured from the left edge of the graphics context
y - an int specifying the top of the area to draw in, in pixels measured down from the top edge of the graphics context
w - an int specifying the width of the area draw in, in pixels
h - an int specifying the height of the area draw in, in pixels

paintComponent

public static void paintComponent(Graphics g,
                                  Component c,
                                  Container p,
                                  Rectangle r)
Paint a component c on an abitrary graphics g in the specified rectangle, specifying a Rectangle object. The component is reparented to a private container (whose parent becomes p) which prevents c.validate() and and c.repaint() calls from propogating up the tree. The intermediate container has no other effect.
Parameters:
g - the Graphics object to draw on
c - the Component to draw
p - the intermedate Container
r - the Rectangle to draw in

updateComponentTreeUI

public static void updateComponentTreeUI(Component c)
A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.

invokeLater

public static void invokeLater(Runnable doRun)
Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread. This will happen after all pending AWT events have been processed. This method should be used when an application thread needs to update the GUI. In the following example the invokeLater call queues the Runnable object doHelloWorld on the event dispatching thread and then prints a message.
 Runnable doHelloWorld = new Runnable() {
     public void run() {
         System.out.println("Hello World on " + Thread.currentThread());
     }
 };

 SwingUtilities.invokeLater(doHelloWorld);
 System.out.println("This might well be displayed before the other message.");
If invokeLater is called from the event dispatching thread -- for example, from a JButton's ActionListener -- the doRun.run() will still be deferred until all pending events have been processed. Note that if the doRun.run() throws an uncaught exception the event dispatching thread will unwind (not the current thread).

Additional documentation and examples for this method can be found in How to Use Threads, in The Java Tutorial.

As of 1.3 this method is just a cover for java.awt.EventQueue.invokeLater().

See Also:
invokeAndWait(java.lang.Runnable)

invokeAndWait

public static void invokeAndWait(Runnable doRun)
                          throws InterruptedException,
                                 InvocationTargetException
Causes doRun.run() to be executed synchronously on the AWT event dispatching thread. This call will block until all pending AWT events have been processed and (then) doRun.run() returns. This method should be used when an application thread needs to update the GUI. It should not be called from the EventDispatchThread. Here's an example that creates a new application thread that uses invokeAndWait() to print a string from the event dispatching thread and then, when that's finished, print a string from the application thread.
 final Runnable doHelloWorld = new Runnable() {
     public void run() {
         System.out.println("Hello World on " + Thread.currentThread());
     }
 };

 Thread appThread = new Thread() {
     public void run() {
         try {
             SwingUtilities.invokeAndWait(doHelloWorld);
         }
         catch (Exception e) {
             e.printStackTrace();
         }
         System.out.println("Finished on " + Thread.currentThread());
     }
 };
 appThread.start();
Note that if the Runnable.run() method throws an uncaught exception (on the event dispatching thread) it's caught and rethrown, as an InvocationTargetException, on the callers thread.

Additional documentation and examples for this method can be found in How to Use Threads, in The Java Tutorial.

As of 1.3 this method is just a cover for java.awt.EventQueue.invokeAndWait().

Throws:
InterruptedException - if we're interrupted while waiting for the event dispatching thread to finish excecuting doRun.run()
InvocationTargetException - if doRun.run() throws
See Also:
invokeLater(java.lang.Runnable)

isEventDispatchThread

public static boolean isEventDispatchThread()
Returns true if the current thread is an AWT event dispatching thread.

As of 1.3 this method is just a cover for java.awt.EventQueue.isEventDispatchThread().

Returns:
true if the current thread is an AWT event dispatching thread

getAccessibleIndexInParent

public static int getAccessibleIndexInParent(Component c)
Get the index of this object in its accessible parent.

Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead of using this method.

Returns:
-1 of this object does not have an accessible parent. Otherwise, the index of the child in its accessible parent.

getAccessibleAt

public static Accessible getAccessibleAt(Component c,
                                         Point p)
Returns the Accessible child contained at the local coordinate Point, if one exists.
Returns:
the Accessible at the specified location, if it exists

getAccessibleStateSet

public static AccessibleStateSet getAccessibleStateSet(Component c)
Get the state of this object.

Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead of using this method.

Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleState

getAccessibleChildrenCount

public static int getAccessibleChildrenCount(Component c)
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.

Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead of using this method.

Returns:
the number of accessible children in the object.

getAccessibleChild

public static Accessible getAccessibleChild(Component c,
                                            int i)
Return the nth Accessible child of the object.

Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead of using this method.

Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object

findFocusOwner

public static Component findFocusOwner(Component c)
Return the child component which has focus, if any. The HotJava SecurityManager forbids applet access to getFocusOwner(), so if the component is an applet, we check whether a JComponent has focus. Non-Swing components in an applet on HotJava are out-of-luck, unfortunately.

getRootPane

public static JRootPane getRootPane(Component c)
If c is a JRootPane descendant return its JRootPane ancestor. If c is a RootPaneContainer then return its JRootPane.
Returns:
the JRootPane for Component c or null.

getRoot

public static Component getRoot(Component c)
Returns the root component for the current component tree.
Returns:
the first ancestor of c that's a Window or the last Applet ancestor

notifyAction

public static boolean notifyAction(Action action,
                                   KeyStroke ks,
                                   KeyEvent event,
                                   Object sender,
                                   int modifiers)
Invokes actionPerformed on action if action is enabled (and non null). The command for the ActionEvent is determined by:
  1. If the action was registered via registerKeyboardAction, then the command string passed in (null will be used if null was passed in).
  2. Action value with name Action.ACTION_COMMAND_KEY, unless null.
  3. String value of the KeyEvent, unless getKeyChar returns KeyEvent.CHAR_UNDEFINED..
This will return true if action is non-null and actionPerformed is invoked on it.
Since:
1.3

replaceUIInputMap

public static void replaceUIInputMap(JComponent component,
                                     int type,
                                     InputMap uiInputMap)
Convenience method to change the UI InputMap for component to uiInputMap. If uiInputMap is null, this removes any previously installed UI InputMap.
Since:
1.3

replaceUIActionMap

public static void replaceUIActionMap(JComponent component,
                                      ActionMap uiActionMap)
Convenience method to change the UI ActionMap for component to uiActionMap. If uiActionMap is null, this removes any previously installed UI ActionMap.
Since:
1.3

getUIInputMap

public static InputMap getUIInputMap(JComponent component,
                                     int condition)
Returns the InputMap provided by the UI for condition condition in component component.

This will return null if the UI has not installed a InputMap of the specified type.

Since:
1.3

getUIActionMap

public static ActionMap getUIActionMap(JComponent component)
Returns the ActionMap provided by the UI in component component.

This will return null if the UI has not installed an ActionMap.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.table Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.table

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)
      • class javax.swing.table.DefaultTableModel (implements java.io.Serializable)
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class java.awt.Container.AccessibleAWTContainer
          • class javax.swing.JComponent.AccessibleJComponent
            • class javax.swing.table.JTableHeader.AccessibleJTableHeader
      • class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry (implements javax.accessibility.Accessible, javax.accessibility.AccessibleComponent)
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.table.DefaultTableCellRenderer (implements java.io.Serializable, javax.swing.table.TableCellRenderer)
              • class javax.swing.table.DefaultTableCellRenderer.UIResource (implements javax.swing.plaf.UIResource)
          • class javax.swing.table.JTableHeader (implements javax.accessibility.Accessible, javax.swing.event.TableColumnModelListener)
    • class javax.swing.table.DefaultTableColumnModel (implements javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.table.TableColumnModel)
    • class javax.swing.table.TableColumn (implements java.io.Serializable)

Interface Hierarchy

  • interface javax.swing.CellEditor
    • interface javax.swing.table.TableCellEditor
  • interface javax.swing.table.TableCellRenderer
  • interface javax.swing.table.TableColumnModel
  • interface javax.swing.table.TableModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.table

Provides classes and interfaces for dealing with javax.swing.JTable.

See:
Description

Interface Summary
TableCellEditor | This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.
TableCellRenderer | This interface defines the method required by any object that would like to be a renderer for cells in a JTable.
TableColumnModel | Defines the requirements for a table column model object suitable for use with JTable.
TableModel | The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.

Class Summary
AbstractTableModel | This abstract class provides default implementations for most of the methods in the TableModel interface.
DefaultTableCellRenderer | The standard class for rendering (displaying) individual cells in a JTable.
DefaultTableCellRenderer.UIResource | A subclass of DefaultTableCellRenderer that implements UIResource.
DefaultTableColumnModel | The standard column-handler for a JTable.
DefaultTableModel | This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.
JTableHeader | This is the object which manages the header of the JTable.
TableColumn | A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.

Package javax.swing.table Description

Provides classes and interfaces for dealing with javax.swing.JTable. JTable is Swing's grid or tabular view for constructing user interfaces for tabular data structures inside an application. Use this package if you want control over how tables are constructed, updated, and rendered, as well as how data associated with the tables are viewed and managed.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use Tables, a section in The Java Tutorial.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.table

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.table

Packages that use javax.swing.table
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Classes in javax.swing.table used by javax.swing
JTableHeader
This is the object which manages the header of the JTable.
TableCellEditor
This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.
TableCellRenderer
This interface defines the method required by any object that would like to be a renderer for cells in a JTable.
TableColumn
A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.
TableColumnModel
Defines the requirements for a table column model object suitable for use with JTable.
TableModel
The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.

Classes in javax.swing.table used by javax.swing.event
TableColumnModel
Defines the requirements for a table column model object suitable for use with JTable.
TableModel
The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.

Classes in javax.swing.table used by javax.swing.plaf.basic
JTableHeader
This is the object which manages the header of the JTable.

Classes in javax.swing.table used by javax.swing.table
AbstractTableModel
This abstract class provides default implementations for most of the methods in the TableModel interface.
DefaultTableCellRenderer
The standard class for rendering (displaying) individual cells in a JTable.
JTableHeader
This is the object which manages the header of the JTable.
JTableHeader.AccessibleJTableHeader
This class implements accessibility support for the JTableHeader class.
TableCellEditor
This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.
TableCellRenderer
This interface defines the method required by any object that would like to be a renderer for cells in a JTable.
TableColumn
A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width.
TableColumnModel
Defines the requirements for a table column model object suitable for use with JTable.
TableModel
The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractTableModel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class AbstractTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
All Implemented Interfaces:
Serializable, TableModel
Direct Known Subclasses:
DefaultTableModel
public abstract class AbstractTableModel
extends Object
implements TableModel, Serializable

This abstract class provides default implementations for most of the methods in the TableModel interface. It takes care of the management of listeners and provides some conveniences for generating TableModelEvents and dispatching them to the listeners. To create a concrete TableModel as a sublcass of AbstractTableModel you need only provide implementations for the following three methods:

  public int getRowCount();
  public int getColumnCount();
  public Object getValueAt(int row, int column);

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  EventListenerList listenerList
List of listeners
Constructor Summary
AbstractTableModel()
Method Summary
void | addTableModelListener(TableModelListener l) Adds a listener to the list that's notified each time a change to the data model occurs.
int | findColumn(String columnName) Returns a column given its name.
void | fireTableCellUpdated(int row, int column) Notifies all listeners that the value of the cell at [row, column] has been updated.
void | fireTableChanged(TableModelEvent e) Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model.
void | fireTableDataChanged() Notifies all listeners that all cell values in the table's rows may have changed.
void | fireTableRowsDeleted(int firstRow, int lastRow) Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted.
void | fireTableRowsInserted(int firstRow, int lastRow) Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted.
void | fireTableRowsUpdated(int firstRow, int lastRow) Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been updated.
void | fireTableStructureChanged() Notifies all listeners that the table's structure has changed.
Class | getColumnClass(int columnIndex) Returns Object.class regardless of columnIndex.
String | getColumnName(int column) Returns a default name for the column using spreadsheet conventions: A, B, C, ...
EventListener[] | getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
boolean | isCellEditable(int rowIndex, int columnIndex) Returns false.
void | removeTableModelListener(TableModelListener l) Removes a listener from the list that's notified each time a change to the data model occurs.
void | setValueAt(Object aValue, int rowIndex, int columnIndex) This empty implementation is provided so users don't have to implement this method if their data model is not editable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.table.TableModel
getColumnCount, getRowCount, getValueAt

Field Detail

listenerList

protected EventListenerList listenerList
List of listeners
Constructor Detail

AbstractTableModel

public AbstractTableModel()
Method Detail

getColumnName

public String getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.
Specified by:
getColumnName in interface TableModel
Parameters:
column - the column being queried
Returns:
a string containing the default name of column

findColumn

public int findColumn(String columnName)
Returns a column given its name. Implementation is naive so this should be overridden if this method is to be called often. This method is not in the TableModel interface and is not used by the JTable.
Parameters:
columnName - string containing name of column to be located
Returns:
the column with columnName, or -1 if not found

getColumnClass

public Class getColumnClass(int columnIndex)
Returns Object.class regardless of columnIndex.
Specified by:
getColumnClass in interface TableModel
Parameters:
columnIndex - the column being queried
Returns:
the Object.class

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns false. This is the default implementation for all cells.
Specified by:
isCellEditable in interface TableModel
Parameters:
rowIndex - the row being queried
columnIndex - the column being queried
Returns:
false

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
This empty implementation is provided so users don't have to implement this method if their data model is not editable.
Specified by:
setValueAt in interface TableModel
Parameters:
aValue - value to assign to cell
rowIndex - row of cell
columnIndex - column of cell

addTableModelListener

public void addTableModelListener(TableModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs.
Specified by:
addTableModelListener in interface TableModel
Parameters:
l - the TableModelListener

removeTableModelListener

public void removeTableModelListener(TableModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs.
Specified by:
removeTableModelListener in interface TableModel
Parameters:
l - the TableModelListener

fireTableDataChanged

public void fireTableDataChanged()
Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.
See Also:
TableModelEvent, EventListenerList

fireTableStructureChanged

public void fireTableStructureChanged()
Notifies all listeners that the table's structure has changed. The number of columns in the table, and the names and types of the new columns may be different from the previous state. If the JTable receives this event and its autoCreateColumnsFromModel flag is set it discards any table columns that it had and reallocates default columns in the order they appear in the model. This is the same as calling setModel(TableModel) on the JTable.
See Also:
TableModelEvent, EventListenerList

fireTableRowsInserted

public void fireTableRowsInserted(int firstRow,
                                  int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted.
Parameters:
firstRow - the first row
lastRow - the last row
See Also:
TableModelEvent, EventListenerList

fireTableRowsUpdated

public void fireTableRowsUpdated(int firstRow,
                                 int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been updated.
Parameters:
firstRow - the first row
lastRow - the last row
See Also:
TableModelEvent, EventListenerList

fireTableRowsDeleted

public void fireTableRowsDeleted(int firstRow,
                                 int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted.
Parameters:
firstRow - the first row
lastRow - the last row
See Also:
TableModelEvent, EventListenerList

fireTableCellUpdated

public void fireTableCellUpdated(int row,
                                 int column)
Notifies all listeners that the value of the cell at [row, column] has been updated.
Parameters:
row - row of cell which has been updated
column - column of cell which has been updated
See Also:
TableModelEvent, EventListenerList

fireTableChanged

public void fireTableChanged(TableModelEvent e)
Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model.
Parameters:
e - the event to be forwarded
See Also:
addTableModelListener(javax.swing.event.TableModelListener), TableModelEvent, EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AccessibleJTableHeader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class JTableHeader.AccessibleJTableHeader

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.table.JTableHeader.AccessibleJTableHeader
All Implemented Interfaces:
AccessibleComponent, Serializable
Enclosing class:
JTableHeader
protected class JTableHeader.AccessibleJTableHeader
extends JComponent.AccessibleJComponent

This class implements accessibility support for the JTableHeader class. It provides an implementation of the Java Accessibility API appropriate to table header user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
protected  class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.
Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
protected JTableHeader.AccessibleJTableHeader()
Method Summary
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Return the nth Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children in the object.
AccessibleRole | getAccessibleRole() Get the role of this object.
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleDescription, getAccessibleName, getAccessibleStateSet, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTableHeader.AccessibleJTableHeader

protected JTableHeader.AccessibleJTableHeader()
Method Detail

getAccessibleRole

public AccessibleRole getAccessibleRole()
Get the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Overrides:
getAccessibleAt in class Container.AccessibleAWTContainer
Parameters:
p - The point defining the top-left corner of the Accessible, given in the coordinate space of the object's parent.
Returns:
the Accessible, if it exists, at the specified location; else null

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Overrides:
getAccessibleChildrenCount in class JComponent.AccessibleJComponent
Returns:
the number of accessible children in the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Return the nth Accessible child of the object.
Overrides:
getAccessibleChild in class JComponent.AccessibleJComponent
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTableHeaderEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
All Implemented Interfaces:
Accessible, AccessibleComponent
Enclosing class:
JTableHeader.AccessibleJTableHeader
protected class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry
extends AccessibleContext
implements Accessible, AccessibleComponent

This class provides an implementation of the Java Accessibility API appropropriate for JTableHeader entries.

Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Constructor Summary
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
Constructs an AccessiblJTableHeaaderEntry
Method Summary
void | addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component.
void | addPropertyChangeListener(PropertyChangeListener l) Adds a PropertyChangeListener to the listener list.
boolean | contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
AccessibleAction | getAccessibleAction() Gets the AccessibleAction associated with this object that supports one or more actions.
Accessible | getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point.
Accessible | getAccessibleChild(int i) Returns the specified Accessible child of the object.
int | getAccessibleChildrenCount() Returns the number of accessible children of the object.
AccessibleComponent | getAccessibleComponent() Get the AccessibleComponent associated with this object.
AccessibleContext | getAccessibleContext() Get the AccessibleContext associated with this object.
String | getAccessibleDescription() Gets the accessibleDescription property of this object.
int | getAccessibleIndexInParent() Gets the 0-based index of this object in its accessible parent.
String | getAccessibleName() Gets the accessibleName property of this object.
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleSelection | getAccessibleSelection() Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of this object.
AccessibleText | getAccessibleText() Gets the AccessibleText associated with this object presently editable text on the display.
AccessibleValue | getAccessibleValue() Gets the AccessibleValue associated with this object that supports a Numerical value.
Color | getBackground() Gets the background color of this object.
Rectangle | getBounds() Gets the bounds of this object in the form of a Rectangle object.
Cursor | getCursor() Gets the Cursor of this object.
Font | getFont() Gets the Font of this object.
FontMetrics | getFontMetrics(Font f) Gets the FontMetrics of this object.
Color | getForeground() Gets the foreground color of this object.
Locale | getLocale() Gets the locale of the component.
Point | getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Point | getLocationOnScreen() Returns the location of the object on the screen.
Dimension | getSize() Returns the size of this object in the form of a Dimension object.
boolean | isEnabled() Determines if the object is enabled.
boolean | isFocusTraversable() Returns whether this object can accept focus or not.
boolean | isShowing() Determines if the object is showing.
boolean | isVisible() Determines if the object is visible.
void | removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component.
void | removePropertyChangeListener(PropertyChangeListener l) Removes a PropertyChangeListener from the listener list.
void | requestFocus() Requests focus for this object.
void | setAccessibleDescription(String s) Sets the accessible description of this object.
void | setAccessibleName(String s) Sets the localized accessible name of this object.
void | setBackground(Color c) Sets the background color of this object.
void | setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object.
void | setCursor(Cursor c) Sets the Cursor of this object.
void | setEnabled(boolean b) Sets the enabled state of the object.
void | setFont(Font f) Sets the Font of this object.
void | setForeground(Color c) Sets the foreground color of this object.
void | setLocation(Point p) Sets the location of the object relative to the parent.
void | setSize(Dimension d) Resizes this object so that it has width and height.
void | setVisible(boolean b) Sets the visible state of the object.
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleIcon, getAccessibleParent, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

public JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(int c,
                                                                       JTableHeader p,
                                                                       JTable t)
Constructs an AccessiblJTableHeaaderEntry
Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this object. In the implementation of the Java Accessibility API for this class, returns this object, which serves as its own AccessibleContext.
Specified by:
getAccessibleContext in interface Accessible
Returns:
this object

getAccessibleName

public String getAccessibleName()
Description copied from class: AccessibleContext
Gets the accessibleName property of this object. The accessibleName property of an object is a localized String that designates the purpose of the object. For example, the accessibleName property of a label or button might be the text of the label or button itself. In the case of an object that doesn't display its name, the accessibleName should still be set. For example, in the case of a text field used to enter the name of a city, the accessibleName for the en_US locale could be 'city.'
Overrides:
getAccessibleName in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the localized name of the object; null if this object does not have a name
See Also:
AccessibleContext.setAccessibleName(java.lang.String)

setAccessibleName

public void setAccessibleName(String s)
Description copied from class: AccessibleContext
Sets the localized accessible name of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_NAME_PROPERTY property.
Overrides:
setAccessibleName in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
s - the new localized name of the object.
See Also:
AccessibleContext.getAccessibleName(), AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleDescription

public String getAccessibleDescription()
Description copied from class: AccessibleContext
Gets the accessibleDescription property of this object. The accessibleDescription property of this object is a short localized phrase describing the purpose of the object. For example, in the case of a 'Cancel' button, the accessibleDescription could be 'Ignore changes and close dialog box.'
Overrides:
getAccessibleDescription in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the localized description of the object; null if this object does not have a description
See Also:
AccessibleContext.setAccessibleDescription(java.lang.String)

setAccessibleDescription

public void setAccessibleDescription(String s)
Description copied from class: AccessibleContext
Sets the accessible description of this object. Changing the name will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_DESCRIPTION_PROPERTY property.
Overrides:
setAccessibleDescription in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
s - the new localized description of the object
See Also:
AccessibleContext.setAccessibleName(java.lang.String), AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Description copied from class: AccessibleContext
Gets the role of this object. The role of the object is the generic purpose or use of the class of this object. For example, the role of a push button is AccessibleRole.PUSH_BUTTON. The roles in AccessibleRole are provided so component developers can pick from a set of predefined roles. This enables assistive technologies to provide a consistent interface to various tweaked subclasses of components (e.g., use AccessibleRole.PUSH_BUTTON for all components that act like a push button) as well as distinguish between sublasses that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes and AccessibleRole.RADIO_BUTTON for radio buttons).

Note that the AccessibleRole class is also extensible, so custom component developers can define their own AccessibleRole's if the set of predefined roles is inadequate.

Overrides:
getAccessibleRole in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRole

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Description copied from class: AccessibleContext
Gets the state set of this object. The AccessibleStateSet of an object is composed of a set of unique AccessibleStates. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the ACCESSIBLE_STATE_PROPERTY property.
Overrides:
getAccessibleStateSet in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleIndexInParent

public int getAccessibleIndexInParent()
Description copied from class: AccessibleContext
Gets the 0-based index of this object in its accessible parent.
Overrides:
getAccessibleIndexInParent in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the 0-based index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
AccessibleContext.getAccessibleParent(),
AccessibleContext.getAccessibleChildrenCount(),
AccessibleContext.getAccessibleChild(int)

getAccessibleChildrenCount

public int getAccessibleChildrenCount()
Description copied from class: AccessibleContext
Returns the number of accessible children of the object.
Overrides:
getAccessibleChildrenCount in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
the number of accessible children of the object.

getAccessibleChild

public Accessible getAccessibleChild(int i)
Description copied from class: AccessibleContext
Returns the specified Accessible child of the object. The Accessible children of an Accessible object are zero-based, so the first child of an Accessible child is at index 0, the second child is at index 1, and so on.
Overrides:
getAccessibleChild in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
i - zero-based index of child
Returns:
the Accessible child of the object
See Also:
AccessibleContext.getAccessibleChildrenCount()

getLocale

public Locale getLocale()
Description copied from class: AccessibleContext
Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned.
Overrides:
getLocale in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
this component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from class: AccessibleContext
Adds a PropertyChangeListener to the listener list. The listener is registered for all Accessible properties and will be called when those properties change.
Overrides:
addPropertyChangeListener in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
listener - The PropertyChangeListener to be added
See Also:
AccessibleContext.ACCESSIBLE_NAME_PROPERTY, AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, AccessibleContext.ACCESSIBLE_TEXT_PROPERTY, AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Description copied from class: AccessibleContext
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Overrides:
removePropertyChangeListener in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Parameters:
listener - The PropertyChangeListener to be removed

getAccessibleAction

public AccessibleAction getAccessibleAction()
Description copied from class: AccessibleContext
Gets the AccessibleAction associated with this object that supports one or more actions.
Overrides:
getAccessibleAction in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleAction if supported by object; else return null
See Also:
AccessibleAction

getAccessibleComponent

public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleComponent interface on behalf of itself.
Overrides:
getAccessibleComponent in class AccessibleContext
Returns:
this object

getAccessibleSelection

public AccessibleSelection getAccessibleSelection()
Description copied from class: AccessibleContext
Gets the AccessibleSelection associated with this object which allows its Accessible children to be selected.
Overrides:
getAccessibleSelection in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleSelection if supported by object; else return null
See Also:
AccessibleSelection

getAccessibleText

public AccessibleText getAccessibleText()
Description copied from class: AccessibleContext
Gets the AccessibleText associated with this object presently editable text on the display.
Overrides:
getAccessibleText in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleText if supported by object; else return null
See Also:
AccessibleText

getAccessibleValue

public AccessibleValue getAccessibleValue()
Description copied from class: AccessibleContext
Gets the AccessibleValue associated with this object that supports a Numerical value.
Overrides:
getAccessibleValue in class AccessibleContext
Following copied from class: javax.accessibility.AccessibleContext
Returns:
AccessibleValue if supported by object; else return null
See Also:
AccessibleValue

getBackground

public Color getBackground()
Description copied from interface: AccessibleComponent
Gets the background color of this object.
Specified by:
getBackground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the background color, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setBackground(java.awt.Color)

setBackground

public void setBackground(Color c)
Description copied from interface: AccessibleComponent
Sets the background color of this object.
Specified by:
setBackground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Color for the background
See Also:
AccessibleComponent.setBackground(java.awt.Color)

getForeground

public Color getForeground()
Description copied from interface: AccessibleComponent
Gets the foreground color of this object.
Specified by:
getForeground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the foreground color, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setForeground(java.awt.Color)

setForeground

public void setForeground(Color c)
Description copied from interface: AccessibleComponent
Sets the foreground color of this object.
Specified by:
setForeground in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Color for the foreground
See Also:
AccessibleComponent.getForeground()

getCursor

public Cursor getCursor()
Description copied from interface: AccessibleComponent
Gets the Cursor of this object.
Specified by:
getCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Cursor, if supported, of the object; otherwise, null
See Also:
AccessibleComponent.setCursor(java.awt.Cursor)

setCursor

public void setCursor(Cursor c)
Description copied from interface: AccessibleComponent
Sets the Cursor of this object.
Specified by:
setCursor in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
c - the new Cursor for the object
See Also:
AccessibleComponent.getCursor()

getFont

public Font getFont()
Description copied from interface: AccessibleComponent
Gets the Font of this object.
Specified by:
getFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the Font,if supported, for the object; otherwise, null
See Also:
AccessibleComponent.setFont(java.awt.Font)

setFont

public void setFont(Font f)
Description copied from interface: AccessibleComponent
Sets the Font of this object.
Specified by:
setFont in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the new Font for the object
See Also:
AccessibleComponent.getFont()

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Description copied from interface: AccessibleComponent
Gets the FontMetrics of this object.
Specified by:
getFontMetrics in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
f - the Font
Returns:
the FontMetrics, if supported, the object; otherwise, null
See Also:
AccessibleComponent.getFont()

isEnabled

public boolean isEnabled()
Description copied from interface: AccessibleComponent
Determines if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSets.
Specified by:
isEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is enabled; otherwise, false
See Also:
AccessibleComponent.setEnabled(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.ENABLED, AccessibleStateSet

setEnabled

public void setEnabled(boolean b)
Description copied from interface: AccessibleComponent
Sets the enabled state of the object.
Specified by:
setEnabled in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, enables this object; otherwise, disables it
See Also:
AccessibleComponent.isEnabled()

isVisible

public boolean isVisible()
Description copied from interface: AccessibleComponent
Determines if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use isShowing().

Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets.

Specified by:
isVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is visible; otherwise, false
See Also:
AccessibleComponent.setVisible(boolean), AccessibleContext.getAccessibleStateSet(), AccessibleState.VISIBLE, AccessibleStateSet

setVisible

public void setVisible(boolean b)
Description copied from interface: AccessibleComponent
Sets the visible state of the object.
Specified by:
setVisible in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
b - if true, shows this object; otherwise, hides it
See Also:
AccessibleComponent.isVisible()

isShowing

public boolean isShowing()
Description copied from interface: AccessibleComponent
Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note: this will return true even if the object is obscured by another (for example, it is underneath a menu that was pulled down).
Specified by:
isShowing in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object is showing; otherwise, false

contains

public boolean contains(Point p)
Description copied from interface: AccessibleComponent
Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object.
Specified by:
contains in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the Point relative to the coordinate system of the object
Returns:
true if object contains Point; otherwise false
See Also:
AccessibleComponent.getBounds()

getLocationOnScreen

public Point getLocationOnScreen()
Description copied from interface: AccessibleComponent
Returns the location of the object on the screen.
Specified by:
getLocationOnScreen in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
the location of the object on screen; null if this object is not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocation()

getLocation

public Point getLocation()
Description copied from interface: AccessibleComponent
Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space.
Specified by:
getLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen
See Also:
AccessibleComponent.getBounds(), AccessibleComponent.getLocationOnScreen()

setLocation

public void setLocation(Point p)
Description copied from interface: AccessibleComponent
Sets the location of the object relative to the parent.
Specified by:
setLocation in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - the new position for the top-left corner
See Also:
AccessibleComponent.getLocation()

getBounds

public Rectangle getBounds()
Description copied from interface: AccessibleComponent
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
getBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
See Also:
AccessibleComponent.contains(java.awt.Point)

setBounds

public void setBounds(Rectangle r)
Description copied from interface: AccessibleComponent
Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.
Specified by:
setBounds in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
r - rectangle indicating this component's bounds
See Also:
AccessibleComponent.getBounds()

getSize

public Dimension getSize()
Description copied from interface: AccessibleComponent
Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width.
Specified by:
getSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
A Dimension object that indicates the size of this component; null if this object is not on the screen
See Also:
AccessibleComponent.setSize(java.awt.Dimension)

setSize

public void setSize(Dimension d)
Description copied from interface: AccessibleComponent
Resizes this object so that it has width and height.
Specified by:
setSize in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
d - The dimension specifying the new size of the object.
See Also:
AccessibleComponent.getSize()

getAccessibleAt

public Accessible getAccessibleAt(Point p)
Description copied from interface: AccessibleComponent
Returns the Accessible child, if one exists, contained at the local coordinate Point.
Specified by:
getAccessibleAt in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
p - The point relative to the coordinate system of this object.
Returns:
the Accessible, if it exists, at the specified location; otherwise null

isFocusTraversable

public boolean isFocusTraversable()
Description copied from interface: AccessibleComponent
Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets.
Specified by:
isFocusTraversable in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Returns:
true if object can accept focus; otherwise false
See Also:
AccessibleContext.getAccessibleStateSet(), AccessibleState.FOCUSABLE, AccessibleState.FOCUSED, AccessibleStateSet

requestFocus

public void requestFocus()
Description copied from interface: AccessibleComponent
Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus.
Specified by:
requestFocus in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
See Also:
AccessibleComponent.isFocusTraversable()

addFocusListener

public void addFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Adds the specified focus listener to receive focus events from this component.
Specified by:
addFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.removeFocusListener(java.awt.event.FocusListener)

removeFocusListener

public void removeFocusListener(FocusListener l)
Description copied from interface: AccessibleComponent
Removes the specified focus listener so it no longer receives focus events from this component.
Specified by:
removeFocusListener in interface AccessibleComponent
Following copied from interface: javax.accessibility.AccessibleComponent
Parameters:
l - the focus listener
See Also:
AccessibleComponent.addFocusListener(java.awt.event.FocusListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.table.DefaultTableCellRenderer.UIResource

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.DefaultTableCellRenderer.UIResource

No usage of javax.swing.table.DefaultTableCellRenderer.UIResource

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.DefaultTableColumnModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.DefaultTableColumnModel

No usage of javax.swing.table.DefaultTableColumnModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.DefaultTableModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.DefaultTableModel

No usage of javax.swing.table.DefaultTableModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

No usage of javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.AbstractTableModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.AbstractTableModel

Packages that use AbstractTableModel
javax.swing.table Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of AbstractTableModel in javax.swing.table

Subclasses of AbstractTableModel in javax.swing.table
 class DefaultTableModel
This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.DefaultTableCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.DefaultTableCellRenderer

Packages that use DefaultTableCellRenderer
javax.swing.table Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of DefaultTableCellRenderer in javax.swing.table

Subclasses of DefaultTableCellRenderer in javax.swing.table
static class DefaultTableCellRenderer.UIResource
A subclass of DefaultTableCellRenderer that implements UIResource.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.JTableHeader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.JTableHeader

Packages that use JTableHeader
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of JTableHeader in javax.swing

Fields in javax.swing declared as JTableHeader
protected  JTableHeader JTable.tableHeader
The TableHeader working with the table.

Methods in javax.swing that return JTableHeader
JTableHeader | JTable.getTableHeader() Returns the tableHeader used by this JTable.
protected JTableHeader | JTable.createDefaultTableHeader() Returns the default table header object, which is a JTableHeader.

Methods in javax.swing with parameters of type JTableHeader
 void JTable.setTableHeader(JTableHeader tableHeader)
Sets the tableHeader working with this JTable to newHeader.

Uses of JTableHeader in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as JTableHeader
protected  JTableHeader BasicTableHeaderUI.header
The JTableHeader that is delegating the painting to this UI.

Uses of JTableHeader in javax.swing.table

Constructors in javax.swing.table with parameters of type JTableHeader
JTableHeader.AccessibleJTableHeader()
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
Constructs an AccessiblJTableHeaaderEntry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.JTableHeader.AccessibleJTableHeader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.JTableHeader.AccessibleJTableHeader

Packages that use JTableHeader.AccessibleJTableHeader
javax.swing.table Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of JTableHeader.AccessibleJTableHeader in javax.swing.table

Constructors in javax.swing.table with parameters of type JTableHeader.AccessibleJTableHeader
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
Constructs an AccessiblJTableHeaaderEntry

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.table.TableColumn

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.table.TableColumn

Packages that use TableColumn
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableColumn in javax.swing

Methods in javax.swing that return TableColumn
 TableColumn JTable.getColumn(Object identifier)
Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.

Methods in javax.swing with parameters of type TableColumn
void | JTable.addColumn(TableColumn aColumn) Appends aColumn to the end of the array of columns held by this JTable's column model.
void | JTable.removeColumn(TableColumn aColumn) Removes aColumn from this JTable's array of columns.

Uses of TableColumn in javax.swing.table

Fields in javax.swing.table declared as TableColumn
protected TableColumn | JTableHeader.resizingColumn The index of the column being resized.
protected TableColumn | JTableHeader.draggedColumn The index of the column being dragged.

Methods in javax.swing.table that return TableColumn
TableColumn | JTableHeader.getDraggedColumn() Returns the the dragged column, if and only if, a drag is in process, otherwise returns null.
TableColumn | JTableHeader.getResizingColumn() Returns the resizing column.
TableColumn | DefaultTableColumnModel.getColumn(int columnIndex) Returns the TableColumn object for the column at columnIndex.
TableColumn | TableColumnModel.getColumn(int columnIndex) Returns the TableColumn object for the column at columnIndex.

Methods in javax.swing.table with parameters of type TableColumn
void | JTableHeader.setDraggedColumn(TableColumn aColumn) Sets the header's draggedColumn to aColumn
void | JTableHeader.setResizingColumn(TableColumn aColumn) Sets the header's resizingColumn to aColumn.
void | DefaultTableColumnModel.addColumn(TableColumn aColumn) Appends aColumn to the end of the tableColumns array.
void | DefaultTableColumnModel.removeColumn(TableColumn column) Deletes the column from the tableColumns array.
void | TableColumnModel.addColumn(TableColumn aColumn) Appends aColumn to the end of the tableColumns array.
void | TableColumnModel.removeColumn(TableColumn column) Deletes the TableColumn column from the tableColumns array.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.table.TableCellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.table.TableCellEditor

Packages that use TableCellEditor
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableCellEditor in javax.swing

Classes in javax.swing that implement TableCellEditor
 class DefaultCellEditor
The default editor for table and tree cells.

Fields in javax.swing declared as TableCellEditor
protected  TableCellEditor JTable.cellEditor
The object that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.

Methods in javax.swing that return TableCellEditor
TableCellEditor | JTable.getDefaultEditor(Class columnClass) Returns the editor to be used when no editor has been set in a TableColumn.
TableCellEditor | JTable.getCellEditor() Returns the cell editor.
TableCellEditor | JTable.getCellEditor(int row, int column) Returns an appropriate editor for the cell specified by row and column.

Methods in javax.swing with parameters of type TableCellEditor
void | JTable.setDefaultEditor(Class columnClass, TableCellEditor editor) Sets a default cell editor to be used if no editor has been set in a TableColumn.
void | JTable.setCellEditor(TableCellEditor anEditor) Sets the cellEditor variable.
Component | JTable.prepareEditor(TableCellEditor editor, int row, int column) Prepares the editor by querying the data model for the value and selection state of the cell at row, column.

Uses of TableCellEditor in javax.swing.table

Fields in javax.swing.table declared as TableCellEditor
protected  TableCellEditor TableColumn.cellEditor
The editor used to edit the data cells of the column.

Methods in javax.swing.table that return TableCellEditor
 TableCellEditor TableColumn.getCellEditor()
Returns the TableCellEditor used by the JTable to edit values for this column.

Methods in javax.swing.table with parameters of type TableCellEditor
 void TableColumn.setCellEditor(TableCellEditor cellEditor)
Sets the editor to used by when a cell in this column is edited.

Constructors in javax.swing.table with parameters of type TableCellEditor
TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
Creates and initializes an instance of TableColumn with modelIndex.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.table.TableCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.table.TableCellRenderer

Packages that use TableCellRenderer
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableCellRenderer in javax.swing

Methods in javax.swing that return TableCellRenderer
TableCellRenderer | JTable.getDefaultRenderer(Class columnClass) Returns the cell renderer to be used when no renderer has been set in a TableColumn.
TableCellRenderer | JTable.getCellRenderer(int row, int column) Returns an appropriate renderer for the cell specified by this row and column.

Methods in javax.swing with parameters of type TableCellRenderer
void | JTable.setDefaultRenderer(Class columnClass, TableCellRenderer renderer) Sets a default cell renderer to be used if no renderer has been set in a TableColumn.
Component | JTable.prepareRenderer(TableCellRenderer renderer, int row, int column) Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.

Uses of TableCellRenderer in javax.swing.table

Classes in javax.swing.table that implement TableCellRenderer
class | DefaultTableCellRenderer The standard class for rendering (displaying) individual cells in a JTable.
static class | DefaultTableCellRenderer.UIResource A subclass of DefaultTableCellRenderer that implements UIResource.

Fields in javax.swing.table declared as TableCellRenderer
protected TableCellRenderer | TableColumn.headerRenderer The renderer used to draw the header of the column.
protected TableCellRenderer | TableColumn.cellRenderer The renderer used to draw the data cells of the column.

Methods in javax.swing.table that return TableCellRenderer
TableCellRenderer | TableColumn.getHeaderRenderer() Returns the TableCellRenderer used to draw the header of the TableColumn.
TableCellRenderer | TableColumn.getCellRenderer() Returns the TableCellRenderer used by the JTable to draw values for this column.
protected TableCellRenderer | TableColumn.createDefaultHeaderRenderer() As of Java 2 platform v1.3, this method is not called by the TableColumn constructor.
TableCellRenderer | JTableHeader.getDefaultRenderer() Returns the default renderer used when no headerRenderer is defined by a TableColumn.
protected TableCellRenderer | JTableHeader.createDefaultRenderer() Returns a default renderer to be used when no header renderer is defined by a TableColumn.

Methods in javax.swing.table with parameters of type TableCellRenderer
void | TableColumn.setHeaderRenderer(TableCellRenderer headerRenderer) Sets the TableCellRenderer used to draw the TableColumn's header to headerRenderer.
void | TableColumn.setCellRenderer(TableCellRenderer cellRenderer) Sets the TableCellRenderer used by JTable to draw individual values for this column.
void | JTableHeader.setDefaultRenderer(TableCellRenderer defaultRenderer) Sets the default renderer to be used when no headerRenderer is defined by a TabelColumn.

Constructors in javax.swing.table with parameters of type TableCellRenderer
TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
Creates and initializes an instance of TableColumn with modelIndex.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.table.TableColumnModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.table.TableColumnModel

Packages that use TableColumnModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableColumnModel in javax.swing

Fields in javax.swing declared as TableColumnModel
protected  TableColumnModel JTable.columnModel
The TableColumnModel of the table.

Methods in javax.swing that return TableColumnModel
TableColumnModel | JTable.getColumnModel() Returns the TableColumnModel that contains all column information of this table.
protected TableColumnModel | JTable.createDefaultColumnModel() Returns the default column model object, which is a DefaultTableColumnModel.

Methods in javax.swing with parameters of type TableColumnModel
 void JTable.setColumnModel(TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model.

Constructors in javax.swing with parameters of type TableColumnModel
JTable(TableModel dm, TableColumnModel cm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.

Uses of TableColumnModel in javax.swing.event

Constructors in javax.swing.event with parameters of type TableColumnModel
TableColumnModelEvent(TableColumnModel source, int from, int to)
Constructs a TableColumnModelEvent object.

Uses of TableColumnModel in javax.swing.table

Classes in javax.swing.table that implement TableColumnModel
 class DefaultTableColumnModel
The standard column-handler for a JTable.

Fields in javax.swing.table declared as TableColumnModel
protected  TableColumnModel JTableHeader.columnModel
The TableColumnModel of the table header.

Methods in javax.swing.table that return TableColumnModel
TableColumnModel | JTableHeader.getColumnModel() Returns the TableColumnModel that contains all column information of this table header.
protected TableColumnModel | JTableHeader.createDefaultColumnModel() Returns the default column model object which is a DefaultTableColumnModel.

Methods in javax.swing.table with parameters of type TableColumnModel
 void JTableHeader.setColumnModel(TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model.

Constructors in javax.swing.table with parameters of type TableColumnModel
JTableHeader(TableColumnModel cm)
Constructs a JTableHeader which is initialized with cm as the column model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.table.TableModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.table.TableModel

Packages that use TableModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.table | Provides classes and interfaces for dealing with javax.swing.JTable.

Uses of TableModel in javax.swing

Fields in javax.swing declared as TableModel
protected  TableModel JTable.dataModel
The TableModel of the table.

Methods in javax.swing that return TableModel
TableModel | JTable.getModel() Returns the TableModel that provides the data displayed by this JTable.
protected TableModel | JTable.createDefaultDataModel() Returns the default table model object, which is a DefaultTableModel.

Methods in javax.swing with parameters of type TableModel
 void JTable.setModel(TableModel dataModel)
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.

Constructors in javax.swing with parameters of type TableModel
JTable(TableModel dm)
Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
JTable(TableModel dm, TableColumnModel cm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.

Uses of TableModel in javax.swing.event

Constructors in javax.swing.event with parameters of type TableModel
TableModelEvent(TableModel source)
All row data in the table has changed, listeners should discard any state that was based on the rows and requery the TableModel to get the new row count and all the appropriate values.
TableModelEvent(TableModel source, int row)
This row of data has been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow)
The data in rows [firstRow, lastRow] have been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow, int column)
The cells in column column in the range [firstRow, lastRow] have been updated.
TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
The cells from (firstRow, column) to (lastRow, column) have been changed.

Uses of TableModel in javax.swing.table

Classes in javax.swing.table that implement TableModel
class | AbstractTableModel This abstract class provides default implementations for most of the methods in the TableModel interface.
class | DefaultTableModel This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DefaultTableCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class DefaultTableCellRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.table.DefaultTableCellRenderer
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants, TableCellRenderer
Direct Known Subclasses:
DefaultTableCellRenderer.UIResource
public class DefaultTableCellRenderer
extends JLabel
implements TableCellRenderer, Serializable

The standard class for rendering (displaying) individual cells in a JTable.

Implementation Note: This class inherits from JLabel, a standard component class. However JTable employs a unique mechanism for rendering its cells and therefore requires some slightly modified behavior from its cell renderer. The table class defines a single cell renderer and uses it as a as a rubber-stamp for rendering all cells in the table; it renders the first cell, changes the contents of that cell renderer, shifts the origin to the new location, re-draws it, and so on. The standard JLabel component was not designed to be used this way and we want to avoid triggering a revalidate each time the cell is drawn. This would greatly decrease performance because the revalidate message would be passed up the hierarchy of the container to determine whether any other components would be affected. So this class overrides the validate, revalidate, repaint, and firePropertyChange methods to be no-ops. If you write your own renderer, please keep this performance consideration in mind.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTable, Serialized Form

Inner Class Summary
static class DefaultTableCellRenderer.UIResource
A subclass of DefaultTableCellRenderer that implements UIResource.
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected static Border noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultTableCellRenderer()
Creates a default table cell renderer.
Method Summary
void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Overridden for performance reasons.
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
Component | getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the default table cell renderer.
void | repaint(long tm, int x, int y, int width, int height) Overridden for performance reasons.
void | repaint(Rectangle r) Overridden for performance reasons.
void | revalidate() Overridden for performance reasons.
void | setBackground(Color c) Overrides JComponent.setForeground to assign the unselected-background color to the specified color.
void | setForeground(Color c) Overrides JComponent.setForeground to assign the unselected-foreground color to the specified color.
protected void | setValue(Object value) Sets the string for the cell being rendered to value.
void | updateUI() Notification from the UIManager that the look and feel [L&F] has changed.
void | validate() Overridden for performance reasons.
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

noFocusBorder

protected static Border noFocusBorder
Constructor Detail

DefaultTableCellRenderer

public DefaultTableCellRenderer()
Creates a default table cell renderer.
Method Detail

setForeground

public void setForeground(Color c)
Overrides JComponent.setForeground to assign the unselected-foreground color to the specified color.
Overrides:
setForeground in class JComponent
Parameters:
c - set the foreground color to this value

setBackground

public void setBackground(Color c)
Overrides JComponent.setForeground to assign the unselected-background color to the specified color.
Overrides:
setBackground in class JComponent
Parameters:
c - set the background color to this value

updateUI

public void updateUI()
Notification from the UIManager that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JLabel
See Also:
JComponent.updateUI()

getTableCellRendererComponent

public Component getTableCellRendererComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               boolean hasFocus,
                                               int row,
                                               int column)
Returns the default table cell renderer.
Specified by:
getTableCellRendererComponent in interface TableCellRenderer
Parameters:
table - the JTable
value - the value to assign to the cell at [row, column]
isSelected - true if cell is selected
isFocus - true if cell has focus
row - the row of the cell to render
column - the column of the cell to render
Returns:
the default table cell renderer

validate

public void validate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
validate in class Container
Following copied from class: java.awt.Container
See Also:
Container.validate(), Component.invalidate()

revalidate

public void revalidate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
revalidate in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.invalidate(),
Container.validate(),
JComponent.isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

repaint

public void repaint(Rectangle r)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

setValue

protected void setValue(Object value)
Sets the string for the cell being rendered to value.
Parameters:
value - the string value for this cell; if value is null it sets the text value to an empty string
See Also:
JLabel.setText(java.lang.String)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTableColumnModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class DefaultTableColumnModel

java.lang.Object
  |
  +--javax.swing.table.DefaultTableColumnModel
All Implemented Interfaces:
EventListener, ListSelectionListener, PropertyChangeListener, Serializable, TableColumnModel
public class DefaultTableColumnModel
extends Object
implements TableColumnModel, PropertyChangeListener, ListSelectionListener, Serializable

The standard column-handler for a JTable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTable, Serialized Form

Field Summary
protected ChangeEvent | changeEvent Change event (only one needed)
protected int | columnMargin Width margin between each column
protected boolean | columnSelectionAllowed Column selection allowed in this column model
protected EventListenerList | listenerList List of TableColumnModelListener
protected ListSelectionModel | selectionModel Model for keeping track of column selections
protected Vector | tableColumns Array of TableColumn objects in this model
protected int | totalColumnWidth A local cache of the combined width of all columns
Constructor Summary
DefaultTableColumnModel()
Creates a default table column model.
Method Summary
void | addColumn(TableColumn aColumn) Appends aColumn to the end of the tableColumns array.
void | addColumnModelListener(TableColumnModelListener x) Adds a listener for table column model events.
protected ListSelectionModel | createSelectionModel() Creates a new default list selection model.
protected void | fireColumnAdded(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireColumnMarginChanged() Notifies all listeners that have registered interest for notification on this event type.
protected void | fireColumnMoved(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireColumnRemoved(TableColumnModelEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireColumnSelectionChanged(ListSelectionEvent e) Notifies all listeners that have registered interest for notification on this event type.
TableColumn | getColumn(int columnIndex) Returns the TableColumn object for the column at columnIndex.
int | getColumnCount() Returns the number of columns in the tableColumns array.
int | getColumnIndex(Object identifier) Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.
int | getColumnIndexAtX(int x) Returns the index of the column that lies at position x, or -1 if no column covers this point.
int | getColumnMargin() Returns the width margin for TableColumn.
Enumeration | getColumns() Returns an Enumeration of all the columns in the model.
boolean | getColumnSelectionAllowed() Returns true if column selection is allowed, otherwise false.
EventListener[] | getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
int | getSelectedColumnCount() Returns the number of columns selected.
int[] | getSelectedColumns() Returns an array of selected columns.
ListSelectionModel | getSelectionModel() Returns the ListSelectionModel that is used to maintain column selection state.
int | getTotalColumnWidth() Returns the total combined width of all columns.
void | moveColumn(int columnIndex, int newIndex) Moves the column and heading at columnIndex to newIndex.
void | propertyChange(PropertyChangeEvent evt) Property Change Listener change method.
protected void | recalcWidthCache() Recalculates the total combined width of all columns.
void | removeColumn(TableColumn column) Deletes the column from the tableColumns array.
void | removeColumnModelListener(TableColumnModelListener x) Removes a listener for table column model events.
void | setColumnMargin(int newMargin) Sets the column margin to newMargin.
void | setColumnSelectionAllowed(boolean flag) Sets whether column selection is allowed.
void | setSelectionModel(ListSelectionModel newModel) Sets the selection model for this TableColumnModel to newModel and registers for listener notifications from the new selection model.
void | valueChanged(ListSelectionEvent e) A ListSelectionListener that forwards ListSelectionEvents when there is a column selection change.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

tableColumns

protected Vector tableColumns
Array of TableColumn objects in this model

selectionModel

protected ListSelectionModel selectionModel
Model for keeping track of column selections

columnMargin

protected int columnMargin
Width margin between each column

listenerList

protected EventListenerList listenerList
List of TableColumnModelListener

changeEvent

protected transient ChangeEvent changeEvent
Change event (only one needed)

columnSelectionAllowed

protected boolean columnSelectionAllowed
Column selection allowed in this column model

totalColumnWidth

protected int totalColumnWidth
A local cache of the combined width of all columns
Constructor Detail

DefaultTableColumnModel

public DefaultTableColumnModel()
Creates a default table column model.
Method Detail

addColumn

public void addColumn(TableColumn aColumn)
Appends aColumn to the end of the tableColumns array. This method also posts the columnAdded event to its listeners.
Specified by:
addColumn in interface TableColumnModel
Parameters:
column - the TableColumn to be added
Throws:
IllegalArgumentException - if aColumn is null
See Also:
removeColumn(javax.swing.table.TableColumn)

removeColumn

public void removeColumn(TableColumn column)
Deletes the column from the tableColumns array. This method will do nothing if column is not in the table's columns list. tile is called to resize both the header and table views. This method also posts a columnRemoved event to its listeners.
Specified by:
removeColumn in interface TableColumnModel
Parameters:
column - the TableColumn to be removed
See Also:
addColumn(javax.swing.table.TableColumn)

moveColumn

public void moveColumn(int columnIndex,
                       int newIndex)
Moves the column and heading at columnIndex to newIndex. The old column at columnIndex will now be found at newIndex. The column that used to be at newIndex is shifted left or right to make room. This will not move any columns if columnIndex equals newIndex. This method also posts a columnMoved event to its listeners.
Specified by:
moveColumn in interface TableColumnModel
Parameters:
columnIndex - the index of column to be moved
newIndex - new index to move the column
Throws:
IllegalArgumentException - if column or newIndex are not in the valid range

setColumnMargin

public void setColumnMargin(int newMargin)
Sets the column margin to newMargin. This method also posts a columnMarginChanged event to its listeners.
Specified by:
setColumnMargin in interface TableColumnModel
Parameters:
newMargin - the new margin width, in pixels
See Also:
getColumnMargin(), getTotalColumnWidth()

getColumnCount

public int getColumnCount()
Returns the number of columns in the tableColumns array.
Specified by:
getColumnCount in interface TableColumnModel
Returns:
the number of columns in the tableColumns array
See Also:
getColumns()

getColumns

public Enumeration getColumns()
Returns an Enumeration of all the columns in the model.
Specified by:
getColumns in interface TableColumnModel
Returns:
an Enumeration of the columns in the model

getColumnIndex

public int getColumnIndex(Object identifier)
Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.
Specified by:
getColumnIndex in interface TableColumnModel
Parameters:
identifier - the identifier object
Returns:
the index of the first column in the tableColumns array whose identifier is equal to identifier
Throws:
IllegalArgumentException - if identifier is null, or if no TableColumn has this identifier
See Also:
getColumn(int)

getColumn

public TableColumn getColumn(int columnIndex)
Returns the TableColumn object for the column at columnIndex.
Specified by:
getColumn in interface TableColumnModel
Parameters:
columnIndex - the index of the column desired
Returns:
the TableColumn object for the column at columnIndex

getColumnMargin

public int getColumnMargin()
Returns the width margin for TableColumn. The default columnMargin is 1.
Specified by:
getColumnMargin in interface TableColumnModel
Returns:
the maximum width for the TableColumn
See Also:
setColumnMargin(int)

getColumnIndexAtX

public int getColumnIndexAtX(int x)
Returns the index of the column that lies at position x, or -1 if no column covers this point.
Specified by:
getColumnIndexAtX in interface TableColumnModel
Parameters:
x - the horizontal location of interest
Returns:
the index of the column or -1 if no column is found

getTotalColumnWidth

public int getTotalColumnWidth()
Returns the total combined width of all columns.
Specified by:
getTotalColumnWidth in interface TableColumnModel
Returns:
the totalColumnWidth property

setSelectionModel

public void setSelectionModel(ListSelectionModel newModel)
Sets the selection model for this TableColumnModel to newModel and registers for listener notifications from the new selection model. If newModel is null, an exception is thrown.
Specified by:
setSelectionModel in interface TableColumnModel
Parameters:
newModel - the new selection model
Throws:
IllegalArgumentException - if newModel is null
See Also:
getSelectionModel()

getSelectionModel

public ListSelectionModel getSelectionModel()
Returns the ListSelectionModel that is used to maintain column selection state.
Specified by:
getSelectionModel in interface TableColumnModel
Returns:
the object that provides column selection state. Or null if row selection is not allowed.
See Also:
setSelectionModel(javax.swing.ListSelectionModel)

setColumnSelectionAllowed

public void setColumnSelectionAllowed(boolean flag)
Sets whether column selection is allowed. The default is false.
Specified by:
setColumnSelectionAllowed in interface TableColumnModel
Parameters:
true - if column selection will be allowed, false otherwise

getColumnSelectionAllowed

public boolean getColumnSelectionAllowed()
Returns true if column selection is allowed, otherwise false. The default is false.
Specified by:
getColumnSelectionAllowed in interface TableColumnModel
Returns:
the columnSelectionAllowed property

getSelectedColumns

public int[] getSelectedColumns()
Returns an array of selected columns. If selectionModel is null, returns an empty array.
Specified by:
getSelectedColumns in interface TableColumnModel
Returns:
an array of selected columns or an empty array if nothing is selected or the selectionModel is null

getSelectedColumnCount

public int getSelectedColumnCount()
Returns the number of columns selected.
Specified by:
getSelectedColumnCount in interface TableColumnModel
Returns:
the number of columns selected

addColumnModelListener

public void addColumnModelListener(TableColumnModelListener x)
Adds a listener for table column model events.
Specified by:
addColumnModelListener in interface TableColumnModel
Parameters:
x - a TableColumnModelListener object

removeColumnModelListener

public void removeColumnModelListener(TableColumnModelListener x)
Removes a listener for table column model events.
Specified by:
removeColumnModelListener in interface TableColumnModel
Parameters:
x - a TableColumnModelListener object

fireColumnAdded

protected void fireColumnAdded(TableColumnModelEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event received
See Also:
EventListenerList

fireColumnRemoved

protected void fireColumnRemoved(TableColumnModelEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event received
See Also:
EventListenerList

fireColumnMoved

protected void fireColumnMoved(TableColumnModelEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event received
See Also:
EventListenerList

fireColumnSelectionChanged

protected void fireColumnSelectionChanged(ListSelectionEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event received
See Also:
EventListenerList

fireColumnMarginChanged

protected void fireColumnMarginChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event received
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
Parameters:
listenerType - the listener class to match
Returns:
all of the objects receiving listenerType notifications from this model
Since:
1.3

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Property Change Listener change method. Used to track changes to the column width or preferred column width.
Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - PropertyChangeEvent

valueChanged

public void valueChanged(ListSelectionEvent e)
A ListSelectionListener that forwards ListSelectionEvents when there is a column selection change.
Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - the change event

createSelectionModel

protected ListSelectionModel createSelectionModel()
Creates a new default list selection model.

recalcWidthCache

protected void recalcWidthCache()
Recalculates the total combined width of all columns. Updates the totalColumnWidth property.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTableModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class DefaultTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--javax.swing.table.DefaultTableModel
All Implemented Interfaces:
Serializable, TableModel
public class DefaultTableModel
extends AbstractTableModel
implements Serializable

This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
TableModel, getDataVector(), Serialized Form

Field Summary
protected Vector | columnIdentifiers The Vector of column identifiers.
protected Vector | dataVector The Vector of Vectors of Object values.
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
Constructor Summary
DefaultTableModel()
Constructs a default DefaultTableModel which is a table of zero columns and zero rows.
DefaultTableModel(int numRows, int numColumns)
Constructs a DefaultTableModel with numRows and numColumns of null object values.
DefaultTableModel(Object[][] data, Object[] columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
DefaultTableModel(Object[] columnNames, int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Vector columnNames, int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values.
DefaultTableModel(Vector data, Vector columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
Method Summary
void | addColumn(Object columnName) Adds a column to the model.
void | addColumn(Object columnName, Object[] columnData) Adds a column to the model.
void | addColumn(Object columnName, Vector columnData) Adds a column to the model.
void | addRow(Object[] rowData) Adds a row to the end of the model.
void | addRow(Vector rowData) Adds a row to the end of the model.
protected static Vector | convertToVector(Object[] anArray) Returns a vector that contains the same objects as the array.
protected static Vector | convertToVector(Object[][] anArray) Returns a vector of vectors that contains the same objects as the array.
int | getColumnCount() Returns the number of columns in this data table.
String | getColumnName(int column) Returns the column name.
Vector | getDataVector() Returns the Vector of Vectors that contains the table's data values.
int | getRowCount() Returns the number of rows in this data table.
Object | getValueAt(int row, int column) Returns an attribute value for the cell at row and column.
void | insertRow(int row, Object[] rowData) Inserts a row at row in the model.
void | insertRow(int row, Vector rowData) Inserts a row at row in the model.
boolean | isCellEditable(int row, int column) Returns true regardless of parameter values.
void | moveRow(int startIndex, int endIndex, int toIndex) Moves one or more rows starting at startIndex to endIndex in the model to the toIndex.
void | newDataAvailable(TableModelEvent event) Equivalent to fireTableChanged.
void | newRowsAdded(TableModelEvent event) Ensures that the new rows have the correct number of columns.
void | removeRow(int row) Removes the row at row from the model.
void | rowsRemoved(TableModelEvent event) Equivalent to fireTableChanged.
void | setColumnCount(int columnCount) Sets the number of columns in the model.
void | setColumnIdentifiers(Object[] newIdentifiers) Replaces the column identifiers in the model.
void | setColumnIdentifiers(Vector newIdentifiers) Replaces the column identifiers in the model.
void | setDataVector(Object[][] newData, Object[] columnNames) Replaces the value in the dataVector instance variable with the values in the array newData.
void | setDataVector(Vector newData, Vector columnNames) Replaces the current dataVector instance variable with the new Vector of rows, newData.
void | setNumRows(int newSize) Obsolete as of Java 2 platform v1.3.
void | setRowCount(int rowCount) Sets the number of rows in the model.
void | setValueAt(Object aValue, int row, int column) Sets the object value for the cell at column and row.
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, removeTableModelListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

dataVector

protected Vector dataVector
The Vector of Vectors of Object values.

columnIdentifiers

protected Vector columnIdentifiers
The Vector of column identifiers.
Constructor Detail

DefaultTableModel

public DefaultTableModel()
Constructs a default DefaultTableModel which is a table of zero columns and zero rows.

DefaultTableModel

public DefaultTableModel(int numRows,
                         int numColumns)
Constructs a DefaultTableModel with numRows and numColumns of null object values.
Parameters:
numRows - the number of rows the table holds
numColumns - the number of columns the table holds
See Also:
setValueAt(java.lang.Object, int, int)

DefaultTableModel

public DefaultTableModel(Vector columnNames,
                         int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values. Each column's name will be taken from the columnNames vector.
Parameters:
columnNames - vector containing the names of the new columns. If this is null then the model has no columns
numRows - the number of rows the table holds
See Also:
setDataVector(java.util.Vector, java.util.Vector), setValueAt(java.lang.Object, int, int)

DefaultTableModel

public DefaultTableModel(Object[] columnNames,
                         int numRows)
Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values. Each column's name will be taken from the columnNames array.
Parameters:
columnNames - array containing the names of the new columns. If this is null then the model has no columns
numRows - the number of rows the table holds
See Also:
setDataVector(java.util.Vector, java.util.Vector), setValueAt(java.lang.Object, int, int)

DefaultTableModel

public DefaultTableModel(Vector data,
                         Vector columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
Parameters:
data - the data of the table
columnNames - vector containing the names of the new columns
See Also:
getDataVector(), setDataVector(java.util.Vector, java.util.Vector)

DefaultTableModel

public DefaultTableModel(Object[][] data,
                         Object[] columnNames)
Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method. The first index in the Object[][] array is the row index and the second is the column index.
Parameters:
data - the data of the table
columnNames - the names of the columns
See Also:
getDataVector(), setDataVector(java.util.Vector, java.util.Vector)
Method Detail

getDataVector

public Vector getDataVector()
Returns the Vector of Vectors that contains the table's data values. The vectors contained in the outer vector are each a single row of values. In other words, to get to the cell at row 1, column 5:

((Vector)getDataVector().elementAt(1)).elementAt(5);

Returns:
the vector of vectors containing the tables data values
See Also:
newDataAvailable(javax.swing.event.TableModelEvent),
newRowsAdded(javax.swing.event.TableModelEvent),
setDataVector(java.util.Vector, java.util.Vector)

setDataVector

public void setDataVector(Vector newData,
                          Vector columnNames)
Replaces the current dataVector instance variable with the new Vector of rows, newData. columnNames are the names of the new columns. The first name in columnNames is mapped to column 0 in newData. Each row in newData is adjusted to match the number of columns in columnNames either by truncating the Vector if it is too long, or adding null values if it is too short.

Parameters:
newData - the new data vector
columnNames - the names of the columns
See Also:
newDataAvailable(javax.swing.event.TableModelEvent), getDataVector()

setDataVector

public void setDataVector(Object[][] newData,
                          Object[] columnNames)
Replaces the value in the dataVector instance variable with the values in the array newData. The first index in the Object[][] array is the row index and the second is the column index. columnNames are the names of the new columns.
Parameters:
newData - the new data vector
columnNames - the names of the columns
See Also:
setDataVector(Vector, Vector)

newDataAvailable

public void newDataAvailable(TableModelEvent event)
Equivalent to fireTableChanged.
Parameters:
event - the change event

newRowsAdded

public void newRowsAdded(TableModelEvent event)
Ensures that the new rows have the correct number of columns. This is accomplished by using the setSize method in Vector which truncates vectors which are too long, and appends nulls if they are too short. This method also sends out a tableChanged notification message to all the listeners.
Parameters:
event - this TableModelEvent describes where the rows were added. If null it assumes all the rows were newly added
See Also:
getDataVector()

rowsRemoved

public void rowsRemoved(TableModelEvent event)
Equivalent to fireTableChanged.
Parameters:
event - the change event

setColumnIdentifiers

public void setColumnIdentifiers(Vector newIdentifiers)
Replaces the column identifiers in the model. If the number of newIdentifiers is greater than the current number of columns, new columns are added to the end of each row in the model. If the number of newIdentifiers is less than the current number of columns, all the extra columns at the end of a row are discarded.

Parameters:
newIdentifiers - vector of column identifiers. If null, set the model to zero columns
See Also:
setNumRows(int)

setColumnIdentifiers

public void setColumnIdentifiers(Object[] newIdentifiers)
Replaces the column identifiers in the model. If the number of newIdentifiers is greater than the current number of columns, new columns are added to the end of each row in the model. If the number of newIdentifiers is less than the current number of columns, all the extra columns at the end of a row are discarded.

Parameters:
newIdentifiers - array of column identifiers. If null, set the model to zero columns
See Also:
setNumRows(int)

setNumRows

public void setNumRows(int newSize)
Obsolete as of Java 2 platform v1.3. Please use setRowCount instead.

setRowCount

public void setRowCount(int rowCount)
Sets the number of rows in the model. If the new size is greater than the current size, new rows are added to the end of the model If the new size is less than the current size, all rows at index rowCount and greater are discarded.

See Also:
setColumnCount(int)

setColumnCount

public void setColumnCount(int columnCount)
Sets the number of columns in the model. If the new size is greater than the current size, new columns are added to the end of the model with null cell values. If the new size is less than the current size, all columns at index columnCount and greater are discarded.
Parameters:
columnCount - the new number of columns in the model
See Also:
setColumnCount(int)

addColumn

public void addColumn(Object columnName)
Adds a column to the model. The new column will have the identifier columnName. This method will send a tableChanged notification message to all the listeners. This method is a cover for addColumn(Object, Vector) which uses null as the data vector.
Parameters:
columnName - the identifier of the column being added
Throws:
IllegalArgumentException - if columnName is null

addColumn

public void addColumn(Object columnName,
                      Vector columnData)
Adds a column to the model. The new column will have the identifier columnName. columnData is the optional vector of data for the column. If it is null the column is filled with null values. Otherwise, the new data will be added to model starting with the first element going to row 0, etc. This method will send a tableChanged notification message to all the listeners.
Parameters:
columnName - the identifier of the column being added
columnData - optional data of the column being added
Throws:
IllegalArgumentException - if columnName is null

addColumn

public void addColumn(Object columnName,
                      Object[] columnData)
Adds a column to the model. The new column will have the identifier columnName. columnData is the optional array of data for the column. If it is null the column is filled with null values. Otherwise, the new data will be added to model starting with the first element going to row 0, etc. This method will send a tableChanged notification message to all the listeners.
See Also:
addColumn(Object, Vector)

addRow

public void addRow(Vector rowData)
Adds a row to the end of the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.
Parameters:
rowData - optional data of the row being added

addRow

public void addRow(Object[] rowData)
Adds a row to the end of the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.
Parameters:
rowData - optional data of the row being added

insertRow

public void insertRow(int row,
                      Vector rowData)
Inserts a row at row in the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.
Parameters:
row - the row index of the row to be inserted
rowData - optional data of the row being added
Throws:
ArrayIndexOutOfBoundsException - if the row was invalid

insertRow

public void insertRow(int row,
                      Object[] rowData)
Inserts a row at row in the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.
Parameters:
row - the row index of the row to be inserted
rowData - optional data of the row being added
Throws:
ArrayIndexOutOfBoundsException - if the row was invalid

moveRow

public void moveRow(int startIndex,
                    int endIndex,
                    int toIndex)
Moves one or more rows starting at startIndex to endIndex in the model to the toIndex. This method will send a tableChanged notification message to all the listeners.

  Examples of moves:

  1. moveRow(1,3,5);

          a|B|C|D|e|f|g|h|i|j|k   - before
          a|e|f|B|C|D|g|h|i|j|k   - after

  2. moveRow(6,7,1);

          a|b|c|d|e|f|G|H|i|j|k   - before
          a|G|H|b|c|d|e|f|i|j|k   - after
Parameters:
startIndex - the starting row index to be moved
endIndex - the ending row index to be moved
toIndex - the destination of the rows to be moved
Throws:
ArrayIndexOutOfBoundsException - if any of the indices are out of range; or if endIndex is less than startIndex

removeRow

public void removeRow(int row)
Removes the row at row from the model. Notification of the row being removed will be sent to all the listeners.
Parameters:
row - the row index of the row to be removed
Throws:
ArrayIndexOutOfBoundsException - if the row was invalid

getRowCount

public int getRowCount()
Returns the number of rows in this data table.
Returns:
the number of rows in the model

getColumnCount

public int getColumnCount()
Returns the number of columns in this data table.
Returns:
the number of columns in the model

getColumnName

public String getColumnName(int column)
Returns the column name.
Overrides:
getColumnName in class AbstractTableModel
Returns:
a name for this column using the string value of the appropriate member in columnIdentifiers. If columnIdentifiers is null or does not have an entry for this index, returns the default name provided by the superclass

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns true regardless of parameter values.
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
true
See Also:
setValueAt(java.lang.Object, int, int)

getValueAt

public Object getValueAt(int row,
                         int column)
Returns an attribute value for the cell at row and column.
Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
the value Object at the specified cell
Throws:
ArrayIndexOutOfBoundsException - if an invalid row or column was given

setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
Sets the object value for the cell at column and row. aValue is the new value. This method will generate a tableChanged notification.
Overrides:
setValueAt in class AbstractTableModel
Parameters:
aValue - the new value; this can be null
row - the row whose value is to be changed
column - the column whose value is to be changed
Throws:
ArrayIndexOutOfBoundsException - if an invalid row or column was given

convertToVector

protected static Vector convertToVector(Object[] anArray)
Returns a vector that contains the same objects as the array.
Parameters:
anArray - the array to be converted
Returns:
the new vector; if anArray is null, returns null

convertToVector

protected static Vector convertToVector(Object[][] anArray)
Returns a vector of vectors that contains the same objects as the array.
Parameters:
anArray - the double array to be converted
Returns:
the new vector of vectors; if anArray is null, returns null
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTableHeader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class JTableHeader

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.table.JTableHeader
All Implemented Interfaces:
Accessible, EventListener, ImageObserver, MenuContainer, Serializable, TableColumnModelListener
public class JTableHeader
extends JComponent
implements TableColumnModelListener, Accessible

This is the object which manages the header of the JTable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTable, Serialized Form

Inner Class Summary
protected  class JTableHeader.AccessibleJTableHeader
This class implements accessibility support for the JTableHeader class.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected TableColumnModel | columnModel The TableColumnModel of the table header.
protected TableColumn | draggedColumn The index of the column being dragged.
protected int | draggedDistance The distance from its original position the column has been dragged.
protected boolean | reorderingAllowed If true, reordering of columns are allowed by the user; the default is true.
protected boolean | resizingAllowed If true, resizing of columns are allowed by the user; the default is true.
protected TableColumn | resizingColumn The index of the column being resized.
protected JTable | table The table for which this object is the header; the default is null.
protected boolean | updateTableInRealTime Obsolete as of Java 2 platform v1.3.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTableHeader()
Constructs a JTableHeader with a default TableColumnModel.
JTableHeader(TableColumnModel cm)
Constructs a JTableHeader which is initialized with cm as the column model.
Method Summary
void | columnAdded(TableColumnModelEvent e) Invoked when a column is added to the table column model.
int | columnAtPoint(Point point) Returns the index of the column that point lies in, or -1 if it lies out of bounds.
void | columnMarginChanged(ChangeEvent e) Invoked when a column is moved due to a margin change.
void | columnMoved(TableColumnModelEvent e) Invoked when a column is repositioned.
void | columnRemoved(TableColumnModelEvent e) Invoked when a column is removed from the table column model.
void | columnSelectionChanged(ListSelectionEvent e) Invoked when the selection model of the TableColumnModel is changed.
protected TableColumnModel | createDefaultColumnModel() Returns the default column model object which is a DefaultTableColumnModel.
protected TableCellRenderer | createDefaultRenderer() Returns a default renderer to be used when no header renderer is defined by a TableColumn.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTableHeader.
TableColumnModel | getColumnModel() Returns the TableColumnModel that contains all column information of this table header.
TableCellRenderer | getDefaultRenderer() Returns the default renderer used when no headerRenderer is defined by a TableColumn.
TableColumn | getDraggedColumn() Returns the the dragged column, if and only if, a drag is in process, otherwise returns null.
int | getDraggedDistance() Returns the column's horizontal distance from its original position, if and only if, a drag is in process.
Rectangle | getHeaderRect(int column) Returns the rectangle containing the header tile at column.
boolean | getReorderingAllowed() Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise.
boolean | getResizingAllowed() Returns true if the user is allowed to resize columns by dragging between their headers, false otherwise.
TableColumn | getResizingColumn() Returns the resizing column.
JTable | getTable() Returns the table associated with this header.
String | getToolTipText(MouseEvent event) Allows the renderer's tips to be used if there is text set.
TableHeaderUI | getUI() Returns the look and feel (L&F) object that renders this component.
String | getUIClassID() Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
boolean | getUpdateTableInRealTime() Obsolete as of Java 2 platform v1.3.
protected void | initializeLocalVars() Initializes the local variables and properties with default values.
protected String | paramString() Returns a string representation of this JTableHeader.
void | resizeAndRepaint() Sizes the header and marks it as needing display.
void | setColumnModel(TableColumnModel columnModel) Sets the column model for this table to newModel and registers for listener notifications from the new column model.
void | setDefaultRenderer(TableCellRenderer defaultRenderer) Sets the default renderer to be used when no headerRenderer is defined by a TabelColumn.
void | setDraggedColumn(TableColumn aColumn) Sets the header's draggedColumn to aColumn
void | setDraggedDistance(int distance) Sets the header's draggedDistance to distance.
void | setReorderingAllowed(boolean reorderingAllowed) Sets whether the user can drag column headers to reorder columns.
void | setResizingAllowed(boolean resizingAllowed) Sets whether the user can resize columns by dragging between headers.
void | setResizingColumn(TableColumn aColumn) Sets the header's resizingColumn to aColumn.
void | setTable(JTable table) Sets the table associated with this header.
void | setUI(TableHeaderUI ui) Sets the look and feel (L&F) object that renders this component.
void | setUpdateTableInRealTime(boolean flag) Obsolete as of Java 2 platform v1.3.
void | updateUI() Notification from the UIManager that the look and feel (L&F) has changed.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

table

protected JTable table
The table for which this object is the header; the default is null.

columnModel

protected TableColumnModel columnModel
The TableColumnModel of the table header.

reorderingAllowed

protected boolean reorderingAllowed
If true, reordering of columns are allowed by the user; the default is true.

resizingAllowed

protected boolean resizingAllowed
If true, resizing of columns are allowed by the user; the default is true.

updateTableInRealTime

protected boolean updateTableInRealTime
Obsolete as of Java 2 platform v1.3. Real time repaints, in response to column dragging or resizing, are now unconditional.

resizingColumn

protected transient TableColumn resizingColumn
The index of the column being resized. null if not resizing.

draggedColumn

protected transient TableColumn draggedColumn
The index of the column being dragged. null if not dragging.

draggedDistance

protected transient int draggedDistance
The distance from its original position the column has been dragged.
Constructor Detail

JTableHeader

public JTableHeader()
Constructs a JTableHeader with a default TableColumnModel.
See Also:
createDefaultColumnModel()

JTableHeader

public JTableHeader(TableColumnModel cm)
Constructs a JTableHeader which is initialized with cm as the column model. If cm is null this method will initialize the table header with a default TableColumnModel.
Parameters:
cm - the column model for the table
See Also:
createDefaultColumnModel()
Method Detail

setTable

public void setTable(JTable table)
Sets the table associated with this header.
Parameters:
table - the new table

getTable

public JTable getTable()
Returns the table associated with this header.
Returns:
the table property

setReorderingAllowed

public void setReorderingAllowed(boolean reorderingAllowed)
Sets whether the user can drag column headers to reorder columns.
Parameters:
reorderingAllowed - true if the table view should allow reordering; otherwise false
See Also:
getReorderingAllowed()

getReorderingAllowed

public boolean getReorderingAllowed()
Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise. The default is true. You can rearrange columns programmatically regardless of this setting.
Returns:
the reorderingAllowed property
See Also:
setReorderingAllowed(boolean)

setResizingAllowed

public void setResizingAllowed(boolean resizingAllowed)
Sets whether the user can resize columns by dragging between headers.
Parameters:
resizingAllowed - true if table view should allow resizing
See Also:
getResizingAllowed()

getResizingAllowed

public boolean getResizingAllowed()
Returns true if the user is allowed to resize columns by dragging between their headers, false otherwise. The default is true. You can resize columns programmatically regardless of this setting.
Returns:
the resizingAllowed property
See Also:
setResizingAllowed(boolean)

getDraggedColumn

public TableColumn getDraggedColumn()
Returns the the dragged column, if and only if, a drag is in process, otherwise returns null.
Returns:
the dragged column, if a drag is in process, otherwise returns null
See Also:
getDraggedDistance()

getDraggedDistance

public int getDraggedDistance()
Returns the column's horizontal distance from its original position, if and only if, a drag is in process. Otherwise, the the return value is meaningless.
Returns:
the column's horizontal distance from its original position, if a drag is in process, otherwise the return value is meaningless
See Also:
getDraggedColumn()

getResizingColumn

public TableColumn getResizingColumn()
Returns the resizing column. If no column is being resized this method returns null.
Returns:
the resizing column

setUpdateTableInRealTime

public void setUpdateTableInRealTime(boolean flag)
Obsolete as of Java 2 platform v1.3. Real time repaints, in response to column dragging or resizing, are now unconditional.

getUpdateTableInRealTime

public boolean getUpdateTableInRealTime()
Obsolete as of Java 2 platform v1.3. Real time repaints, in response to column dragging or resizing, are now unconditional.

setDefaultRenderer

public void setDefaultRenderer(TableCellRenderer defaultRenderer)
Sets the default renderer to be used when no headerRenderer is defined by a TabelColumn.
Parameters:
defaultRenderer - the default renderer

getDefaultRenderer

public TableCellRenderer getDefaultRenderer()
Returns the default renderer used when no headerRenderer is defined by a TableColumn.
Returns:
the default renderer

columnAtPoint

public int columnAtPoint(Point point)
Returns the index of the column that point lies in, or -1 if it lies out of bounds.
Returns:
the index of the column that point lies in, or -1 if it lies out of bounds

getHeaderRect

public Rectangle getHeaderRect(int column)
Returns the rectangle containing the header tile at column. When the column parameter is out of bounds this method uses the same conventions as the JTable method getCellRect.
Returns:
the rectangle containing the header tile at column
See Also:
JTable.getCellRect(int, int, boolean)

getToolTipText

public String getToolTipText(MouseEvent event)
Allows the renderer's tips to be used if there is text set.
Overrides:
getToolTipText in class JComponent
Parameters:
event - the location of the event identifies the proper renderer and, therefore, the proper tip
Returns:
the tool tip for this component

getUI

public TableHeaderUI getUI()
Returns the look and feel (L&F) object that renders this component.
Returns:
the TableHeaderUI object that renders this component

setUI

public void setUI(TableHeaderUI ui)
Sets the look and feel (L&F) object that renders this component.
Parameters:
ui - the TableHeaderUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Notification from the UIManager that the look and feel (L&F) has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
Overrides:
getUIClassID in class JComponent
Returns:
the string "TableHeaderUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setColumnModel

public void setColumnModel(TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model.
Parameters:
columnModel - the new data source for this table
Throws:
IllegalArgumentException - if newModel is null
See Also:
getColumnModel()

getColumnModel

public TableColumnModel getColumnModel()
Returns the TableColumnModel that contains all column information of this table header.
Returns:
the columnModel property
See Also:
setColumnModel(javax.swing.table.TableColumnModel)

columnAdded

public void columnAdded(TableColumnModelEvent e)
Invoked when a column is added to the table column model.

Application code will not use these methods explicitly, they are used internally by Jtable.

Specified by:
columnAdded in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnRemoved

public void columnRemoved(TableColumnModelEvent e)
Invoked when a column is removed from the table column model.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnRemoved in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnMoved

public void columnMoved(TableColumnModelEvent e)
Invoked when a column is repositioned.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnMoved in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(ChangeEvent e)
Invoked when a column is moved due to a margin change.

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnMarginChanged in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent e)
Invoked when the selection model of the TableColumnModel is changed. This method currently has no effect (the header is not redrawn).

Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnSelectionChanged in interface TableColumnModelListener
Parameters:
e - the event received
See Also:
TableColumnModelListener

createDefaultColumnModel

protected TableColumnModel createDefaultColumnModel()
Returns the default column model object which is a DefaultTableColumnModel. A subclass can override this method to return a different column model object
Returns:
the default column model object

createDefaultRenderer

protected TableCellRenderer createDefaultRenderer()
Returns a default renderer to be used when no header renderer is defined by a TableColumn.
Parameters:
default - renderer to be used when there is no header renderer

initializeLocalVars

protected void initializeLocalVars()
Initializes the local variables and properties with default values. Used by the constructor methods.

resizeAndRepaint

public void resizeAndRepaint()
Sizes the header and marks it as needing display. Equivalent to revalidate followed by repaint.

setDraggedColumn

public void setDraggedColumn(TableColumn aColumn)
Sets the header's draggedColumn to aColumn
Parameters:
aColumn - the new value for draggedColumn

setDraggedDistance

public void setDraggedDistance(int distance)
Sets the header's draggedDistance to distance.
Parameters:
distance - the distance dragged

setResizingColumn

public void setResizingColumn(TableColumn aColumn)
Sets the header's resizingColumn to aColumn.
Parameters:
aColumn - the column being resized

paramString

protected String paramString()
Returns a string representation of this JTableHeader. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overriding paramString to provide information about the specific new aspects of the JFC components.

Overrides:
paramString in class JComponent
Returns:
a string representation of this JTableHeader

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTableHeader. For JTableHeaders, the AccessibleContext takes the form of an AccessibleJTableHeader. A new AccessibleJTableHeader instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJTableHeader that serves as the AccessibleContext of this JTableHeader
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableCellEditor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Interface TableCellEditor

All Superinterfaces:
CellEditor
All Known Implementing Classes:
DefaultCellEditor
public interface TableCellEditor
extends CellEditor

This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement.

Method Summary
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
Sets an initial value for the editor.
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing

Method Detail

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Parameters:
table - the JTable that is asking the editor to edit; can be null
value - the value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with highlighting
row - the row of the cell being edited
column - the column of the cell being edited
Returns:
the component for editing
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TableCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Interface TableCellRenderer

All Known Implementing Classes:
DefaultTableCellRenderer
public interface TableCellRenderer

This interface defines the method required by any object that would like to be a renderer for cells in a JTable.

Method Summary
 Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Returns the component used for drawing the cell.

Method Detail

getTableCellRendererComponent

public Component getTableCellRendererComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               boolean hasFocus,
                                               int row,
                                               int column)
Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing.
Parameters:
table - the JTable that is asking the renderer to draw; can be null
value - the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with the selection highlighted; otherwise false
hasFocus - if true, render cell appropriately. For example, put a special border on the cell, if the cell can be edited, render in the color used to indicate editing
row - the row index of the cell being drawn. When drawing the header, the value of row is -1
column - the column index of the cell being drawn
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableColumn

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class TableColumn

java.lang.Object
  |
  +--javax.swing.table.TableColumn
All Implemented Interfaces:
Serializable
public class TableColumn
extends Object
implements Serializable

A TableColumn represents all the attributes of a column in a JTable, such as width, resizibility, minimum and maximum width. In addition, the TableColumn provides slots for a renderer and an editor that can be used to display and edit the values in this column.

It is also possible to specify renderers and editors on a per type basis rather than a per column basis - see the setDefaultRenderer method in the JTable class. This default mechanism is only used when the renderer (or editor) in the TableColumn is null.

The TableColumn stores the link between the columns in the JTable and the columns in the TableModel. The modelIndex is the column in the TableModel, which will be queried for the data values for the cells in this column. As the column moves around in the view this modelIndex does not change.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
TableColumnModel,
DefaultTableColumnModel,
JTableHeader.getDefaultRenderer(),
JTable.getDefaultRenderer(Class),
JTable.getDefaultEditor(Class),
JTable.getCellRenderer(int, int),
JTable.getCellEditor(int, int), Serialized Form

Field Summary
static String | CELL_RENDERER_PROPERTY Obsolete as of Java 2 platform v1.3.
protected TableCellEditor | cellEditor The editor used to edit the data cells of the column.
protected TableCellRenderer | cellRenderer The renderer used to draw the data cells of the column.
static String | COLUMN_WIDTH_PROPERTY Obsolete as of Java 2 platform v1.3.
static String | HEADER_RENDERER_PROPERTY Obsolete as of Java 2 platform v1.3.
static String | HEADER_VALUE_PROPERTY Obsolete as of Java 2 platform v1.3.
protected TableCellRenderer | headerRenderer The renderer used to draw the header of the column.
protected Object | headerValue The header value of the column.
protected Object | identifier This object is not used internally by the drawing machinery of the JTable; identifiers may be set in the TableColumn as as an optional way to tag and locate table columns.
protected boolean | isResizable If true, the user is allowed to resize the column; the default is true.
protected int | maxWidth The maximum width of the column.
protected int | minWidth The minimum width of the column.
protected int | modelIndex The index of the column in the model which is to be displayed by this TableColumn.
protected int | resizedPostingDisableCount Deprecated. as of Java 2 platform v1.3
protected int | width The width of the column.
Constructor Summary
TableColumn()
Cover method, using a default model index of 0, default width of 75, a null renderer and a null editor.
TableColumn(int modelIndex)
Cover method, using a default width of 75, a null renderer and a null editor.
TableColumn(int modelIndex, int width)
Cover method, using a null renderer and a null editor.
TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
Creates and initializes an instance of TableColumn with modelIndex.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
protected TableCellRenderer | createDefaultHeaderRenderer() As of Java 2 platform v1.3, this method is not called by the TableColumn constructor.
void | disableResizedPosting() Deprecated. as of Java 2 platform v1.3
void | enableResizedPosting() Deprecated. as of Java 2 platform v1.3
TableCellEditor | getCellEditor() Returns the TableCellEditor used by the JTable to edit values for this column.
TableCellRenderer | getCellRenderer() Returns the TableCellRenderer used by the JTable to draw values for this column.
TableCellRenderer | getHeaderRenderer() Returns the TableCellRenderer used to draw the header of the TableColumn.
Object | getHeaderValue() Returns the Object used as the value for the header renderer.
Object | getIdentifier() Returns the identifier object for this column.
int | getMaxWidth() Returns the maximum width for the TableColumn.
int | getMinWidth() Returns the minimum width for the TableColumn.
int | getModelIndex() Returns the model index for this column.
int | getPreferredWidth() Returns the preferred width of the TableColumn.
boolean | getResizable() Returns true if the user is allowed to resize the TableColumn's width, false otherwise.
int | getWidth() Returns the width of the TableColumn.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | setCellEditor(TableCellEditor cellEditor) Sets the editor to used by when a cell in this column is edited.
void | setCellRenderer(TableCellRenderer cellRenderer) Sets the TableCellRenderer used by JTable to draw individual values for this column.
void | setHeaderRenderer(TableCellRenderer headerRenderer) Sets the TableCellRenderer used to draw the TableColumn's header to headerRenderer.
void | setHeaderValue(Object headerValue) Sets the Object whose string representation will be used as the value for the headerRenderer.
void | setIdentifier(Object identifier) Sets the TableColumn's identifier to anIdentifier.
void | setMaxWidth(int maxWidth) Sets the TableColumn's maximum width to maxWidth; also adjusts the width and preferred width if they are greater than this value.
void | setMinWidth(int minWidth) Sets the TableColumn's minimum width to minWidth; also adjusts the current width and preferred width if they are less than this value.
void | setModelIndex(int modelIndex) Sets the model index for this column.
void | setPreferredWidth(int preferredWidth) Sets this column's preferred width to preferredWidth.
void | setResizable(boolean isResizable) Sets whether this column can be resized.
void | setWidth(int width) This method should not be used to set the widths of columns in the JTable, use setPreferredWidth instead.
void | sizeWidthToFit() Resizes the TableColumn to fit the width of its header cell.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

COLUMN_WIDTH_PROPERTY

public static final String COLUMN_WIDTH_PROPERTY
Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.

HEADER_VALUE_PROPERTY

public static final String HEADER_VALUE_PROPERTY
Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.

HEADER_RENDERER_PROPERTY

public static final String HEADER_RENDERER_PROPERTY
Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.

CELL_RENDERER_PROPERTY

public static final String CELL_RENDERER_PROPERTY
Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.

modelIndex

protected int modelIndex
The index of the column in the model which is to be displayed by this TableColumn. As columns are moved around in the view modelIndex remains constant.

identifier

protected Object identifier
This object is not used internally by the drawing machinery of the JTable; identifiers may be set in the TableColumn as as an optional way to tag and locate table columns. The table package does not modify or invoke any methods in these identifer objects other than the equals method which is used in the getColumnIndex() method in the DefaultTableColumnModel.

width

protected int width
The width of the column.

minWidth

protected int minWidth
The minimum width of the column.

maxWidth

protected int maxWidth
The maximum width of the column.

headerRenderer

protected TableCellRenderer headerRenderer
The renderer used to draw the header of the column.

headerValue

protected Object headerValue
The header value of the column.

cellRenderer

protected TableCellRenderer cellRenderer
The renderer used to draw the data cells of the column.

cellEditor

protected TableCellEditor cellEditor
The editor used to edit the data cells of the column.

isResizable

protected boolean isResizable
If true, the user is allowed to resize the column; the default is true.

resizedPostingDisableCount

protected transient int resizedPostingDisableCount
Deprecated. as of Java 2 platform v1.3

This field was not used in previous releases and there are currently no plans to support it in the future.
Constructor Detail

TableColumn

public TableColumn()
Cover method, using a default model index of 0, default width of 75, a null renderer and a null editor. This method is intended for serialization.
See Also:
TableColumn(int, int, TableCellRenderer, TableCellEditor)

TableColumn

public TableColumn(int modelIndex)
Cover method, using a default width of 75, a null renderer and a null editor.
See Also:
TableColumn(int, int, TableCellRenderer, TableCellEditor)

TableColumn

public TableColumn(int modelIndex,
                   int width)
Cover method, using a null renderer and a null editor.
See Also:
TableColumn(int, int, TableCellRenderer, TableCellEditor)

TableColumn

public TableColumn(int modelIndex,
                   int width,
                   TableCellRenderer cellRenderer,
                   TableCellEditor cellEditor)
Creates and initializes an instance of TableColumn with modelIndex. All TableColumn constructors delegate to this one. The modelIndex is the index of the column in the model which will supply the data for this column in the table. The modelIndex does not change as the columns are reordered in the view. The width parameter is used to set both the preferredWidth for this column and the initial width. The renderer and editor are the objects used respectively to render and edit values in this column. When these are null, default values, provided by the getDefaultRenderer and getDefaultEditor methods in the JTable class are used to provide defaults based on the type of the data in this column. This column-centric rendering strategy can be circumvented by overriding the getCellRenderer methods in the JTable.

See Also:
JTable.getDefaultRenderer(Class),
JTable.getDefaultEditor(Class),
JTable.getCellRenderer(int, int),
JTable.getCellEditor(int, int)
Method Detail

setModelIndex

public void setModelIndex(int modelIndex)
Sets the model index for this column. The model index is the index of the column in the model that will be displayed by this TableColumn. As the TableColumn is moved around in the view the model index remains constant.
Parameters:
modelIndex - the new modelIndex

getModelIndex

public int getModelIndex()
Returns the model index for this column.
Returns:
the modelIndex property

setIdentifier

public void setIdentifier(Object identifier)
Sets the TableColumn's identifier to anIdentifier.

Note: identifiers are not used by the JTable, they are purely a convenience for the external tagging and location of columns.

Parameters:
identifier - an identifier for this column
See Also:
getIdentifier()

getIdentifier

public Object getIdentifier()
Returns the identifier object for this column. Note identifiers are not used by JTable, they are purely a convenience for external use. If the identifier is null, getIdentifier() returns getHeaderValue as a default.
Returns:
the identifier property
See Also:
setIdentifier(java.lang.Object)

setHeaderValue

public void setHeaderValue(Object headerValue)
Sets the Object whose string representation will be used as the value for the headerRenderer. When the TableColumn is created, the default headerValue is null.
Parameters:
headerValue - the new headerValue
See Also:
getHeaderValue()

getHeaderValue

public Object getHeaderValue()
Returns the Object used as the value for the header renderer.
Returns:
the headerValue property
See Also:
setHeaderValue(java.lang.Object)

setHeaderRenderer

public void setHeaderRenderer(TableCellRenderer headerRenderer)
Sets the TableCellRenderer used to draw the TableColumn's header to headerRenderer.
Parameters:
headerRenderer - the new headerRenderer
See Also:
getHeaderRenderer()

getHeaderRenderer

public TableCellRenderer getHeaderRenderer()
Returns the TableCellRenderer used to draw the header of the TableColumn. When the headerRenderer is null, the JTableHeader uses its defaultRenderer. The default value for a headerRenderer is null.
Returns:
the headerRenderer property
See Also:
setHeaderRenderer(javax.swing.table.TableCellRenderer),
setHeaderValue(java.lang.Object),
JTableHeader.getDefaultRenderer()

setCellRenderer

public void setCellRenderer(TableCellRenderer cellRenderer)
Sets the TableCellRenderer used by JTable to draw individual values for this column.
Parameters:
cellRenderer - the new cellRenderer
See Also:
getCellRenderer()

getCellRenderer

public TableCellRenderer getCellRenderer()
Returns the TableCellRenderer used by the JTable to draw values for this column. The cellRenderer of the column not only controls the visual look for the column, but is also used to interpret the value object supplied by the TableModel. When the cellRenderer is null, the JTable uses a default renderer based on the class of the cells in that column. The default value for a cellRenderer is null.
Returns:
the cellRenderer property
See Also:
setCellRenderer(javax.swing.table.TableCellRenderer), JTable.setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer)

setCellEditor

public void setCellEditor(TableCellEditor cellEditor)
Sets the editor to used by when a cell in this column is edited.
Parameters:
cellEditor - the new cellEditor
See Also:
getCellEditor()

getCellEditor

public TableCellEditor getCellEditor()
Returns the TableCellEditor used by the JTable to edit values for this column. When the cellEditor is null, the JTable uses a default editor based on the class of the cells in that column. The default value for a cellEditor is null.
Returns:
the cellEditor property
See Also:
setCellEditor(javax.swing.table.TableCellEditor), JTable.setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor)

setWidth

public void setWidth(int width)
This method should not be used to set the widths of columns in the JTable, use setPreferredWidth instead. Like a layout manager in the AWT, the JTable adjusts a column's width automatically whenever the table itself changes size, or a column's preferred width is changed. Setting widths programmatically therefore has no long term effect.

This method sets this column's width to width. If width exceeds the minimum or maximum width, it is adjusted to the appropriate limiting value.

Parameters:
width - the new width
See Also:
getWidth(), setMinWidth(int), setMaxWidth(int), setPreferredWidth(int), JTable.sizeColumnsToFit(int)

getWidth

public int getWidth()
Returns the width of the TableColumn. The default width is 75.
Returns:
the width property
See Also:
setWidth(int)

setPreferredWidth

public void setPreferredWidth(int preferredWidth)
Sets this column's preferred width to preferredWidth. If preferredWidth exceeds the minimum or maximum width, it is adjusted to the appropriate limiting value.

For details on how the widths of columns in the JTable (and JTableHeader) are calculated from the preferredWidth, see the sizeColumnsToFit method in JTable.

Parameters:
preferredWidth - the new preferred width
See Also:
getPreferredWidth(), JTable.sizeColumnsToFit(int)

getPreferredWidth

public int getPreferredWidth()
Returns the preferred width of the TableColumn. The default preferred width is 75.
Returns:
the preferredWidth property
See Also:
setPreferredWidth(int)

setMinWidth

public void setMinWidth(int minWidth)
Sets the TableColumn's minimum width to minWidth; also adjusts the current width and preferred width if they are less than this value.
Parameters:
minWidth - the new minimum width
See Also:
getMinWidth(), setPreferredWidth(int), setMaxWidth(int)

getMinWidth

public int getMinWidth()
Returns the minimum width for the TableColumn. The TableColumn's width can't be made less than this either by the user or programmatically. The default minWidth is 15.
Returns:
the minWidth property
See Also:
setMinWidth(int)

setMaxWidth

public void setMaxWidth(int maxWidth)
Sets the TableColumn's maximum width to maxWidth; also adjusts the width and preferred width if they are greater than this value.
Parameters:
maxWidth - the new maximum width
See Also:
getMaxWidth(), setPreferredWidth(int), setMinWidth(int)

getMaxWidth

public int getMaxWidth()
Returns the maximum width for the TableColumn. The TableColumn's width can't be made larger than this either by the user or programmatically. The default maxWidth is Integer.MAX_VALUE.
Returns:
the maxWidth property
See Also:
setMaxWidth(int)

setResizable

public void setResizable(boolean isResizable)
Sets whether this column can be resized.
Parameters:
isResizable - if true, resizing is allowed; otherwise false
See Also:
getResizable()

getResizable

public boolean getResizable()
Returns true if the user is allowed to resize the TableColumn's width, false otherwise. You can change the width programmatically regardless of this setting. The default is true.
Returns:
the isResizable property
See Also:
setResizable(boolean)

sizeWidthToFit

public void sizeWidthToFit()
Resizes the TableColumn to fit the width of its header cell. This method does nothing if the header renderer is null (the default case).
See Also:
setPreferredWidth(int)

disableResizedPosting

public void disableResizedPosting()
Deprecated. as of Java 2 platform v1.3

This field was not used in previous releases and there are currently no plans to support it in the future.

enableResizedPosting

public void enableResizedPosting()
Deprecated. as of Java 2 platform v1.3

This field was not used in previous releases and there are currently no plans to support it in the future.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit call to setFont, setBackground, or setForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.

Parameters:
listener - the listener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. The PropertyChangeListener to be removed was registered for all properties.
Parameters:
listener - the listener to be removed

createDefaultHeaderRenderer

protected TableCellRenderer createDefaultHeaderRenderer()
As of Java 2 platform v1.3, this method is not called by the TableColumn constructor. Previously this method was used by the TableColumn to create a default header renderer. As of Java 2 platform v1.3, the default header renderer is null. JTableHeader now provides its own shared default renderer, just as the JTable does for its cell renderers.
Returns:
the default header renderer
See Also:
JTableHeader.createDefaultRenderer()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TableColumnModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Interface TableColumnModel

All Known Implementing Classes:
DefaultTableColumnModel
public interface TableColumnModel

Defines the requirements for a table column model object suitable for use with JTable.

See Also:
DefaultTableColumnModel

Method Summary
void | addColumn(TableColumn aColumn) Appends aColumn to the end of the tableColumns array.
void | addColumnModelListener(TableColumnModelListener x) Adds a listener for table column model events.
TableColumn | getColumn(int columnIndex) Returns the TableColumn object for the column at columnIndex.
int | getColumnCount() Returns the number of columns in the model.
int | getColumnIndex(Object columnIdentifier) Returns the index of the first column in the table whose identifier is equal to identifier, when compared using equals.
int | getColumnIndexAtX(int xPosition) Returns the index of the column that lies on the horizontal point, xPosition; or -1 if it lies outside the any of the column's bounds.
int | getColumnMargin() Returns the width between the cells in each column.
Enumeration | getColumns() Returns an Enumeration of all the columns in the model.
boolean | getColumnSelectionAllowed() Returns true if columns may be selected.
int | getSelectedColumnCount() Returns the number of selected columns.
int[] | getSelectedColumns() Returns an array of indicies of all selected columns.
ListSelectionModel | getSelectionModel() Returns the current selection model.
int | getTotalColumnWidth() Returns the total width of all the columns.
void | moveColumn(int columnIndex, int newIndex) Moves the column and its header at columnIndex to newIndex.
void | removeColumn(TableColumn column) Deletes the TableColumn column from the tableColumns array.
void | removeColumnModelListener(TableColumnModelListener x) Removes a listener for table column model events.
void | setColumnMargin(int newMargin) Sets the TableColumn's column margin to newMargin.
void | setColumnSelectionAllowed(boolean flag) Sets whether the columns in this model may be selected.
void | setSelectionModel(ListSelectionModel newModel) Sets the selection model.

Method Detail

addColumn

public void addColumn(TableColumn aColumn)
Appends aColumn to the end of the tableColumns array. This method posts a columnAdded event to its listeners.
Parameters:
aColumn - the TableColumn to be added
See Also:
removeColumn(javax.swing.table.TableColumn)

removeColumn

public void removeColumn(TableColumn column)
Deletes the TableColumn column from the tableColumns array. This method will do nothing if column is not in the table's column list. This method posts a columnRemoved event to its listeners.
Parameters:
column - the TableColumn to be removed
See Also:
addColumn(javax.swing.table.TableColumn)

moveColumn

public void moveColumn(int columnIndex,
                       int newIndex)
Moves the column and its header at columnIndex to newIndex. The old column at columnIndex will now be found at newIndex. The column that used to be at newIndex is shifted left or right to make room. This will not move any columns if columnIndex equals newIndex. This method posts a columnMoved event to its listeners.
Parameters:
columnIndex - the index of column to be moved
newIndex - index of the column's new location
Throws:
IllegalArgumentException - if columnIndex or newIndex are not in the valid range

setColumnMargin

public void setColumnMargin(int newMargin)
Sets the TableColumn's column margin to newMargin. This method posts a columnMarginChanged event to its listeners.
Parameters:
newMargin - the width, in pixels, of the new column margins
See Also:
getColumnMargin()

getColumnCount

public int getColumnCount()
Returns the number of columns in the model.
Returns:
the number of columns in the model

getColumns

public Enumeration getColumns()
Returns an Enumeration of all the columns in the model.
Returns:
an Enumeration of all the columns in the model

getColumnIndex

public int getColumnIndex(Object columnIdentifier)
Returns the index of the first column in the table whose identifier is equal to identifier, when compared using equals.
Parameters:
columnIdentifier - the identifier object
Returns:
the index of the first table column whose identifier is equal to identifier
Throws:
IllegalArgumentException - if identifier is null, or no TableColumn has this identifier
See Also:
getColumn(int)

getColumn

public TableColumn getColumn(int columnIndex)
Returns the TableColumn object for the column at columnIndex.
Parameters:
columnIndex - the index of the desired column
Returns:
the TableColumn object for the column at columnIndex

getColumnMargin

public int getColumnMargin()
Returns the width between the cells in each column.
Returns:
the margin, in pixels, between the cells

getColumnIndexAtX

public int getColumnIndexAtX(int xPosition)
Returns the index of the column that lies on the horizontal point, xPosition; or -1 if it lies outside the any of the column's bounds.
Returns:
the index of the column; or -1 if no column is found

getTotalColumnWidth

public int getTotalColumnWidth()
Returns the total width of all the columns.
Returns:
the total computed width of all columns

setColumnSelectionAllowed

public void setColumnSelectionAllowed(boolean flag)
Sets whether the columns in this model may be selected.
Parameters:
flag - true if columns may be selected; otherwise false
See Also:
getColumnSelectionAllowed()

getColumnSelectionAllowed

public boolean getColumnSelectionAllowed()
Returns true if columns may be selected.
Returns:
true if columns may be selected
See Also:
setColumnSelectionAllowed(boolean)

getSelectedColumns

public int[] getSelectedColumns()
Returns an array of indicies of all selected columns.
Returns:
an array of integers containing the indicies of all selected columns; or an empty array if nothing is selected

getSelectedColumnCount

public int getSelectedColumnCount()
Returns the number of selected columns.
Returns:
the number of selected columns; or 0 if no columns are selected

setSelectionModel

public void setSelectionModel(ListSelectionModel newModel)
Sets the selection model.
Parameters:
newModel - a ListSelectionModel object
See Also:
getSelectionModel()

getSelectionModel

public ListSelectionModel getSelectionModel()
Returns the current selection model.
Returns:
a ListSelectionModel object
See Also:
setSelectionModel(javax.swing.ListSelectionModel)

addColumnModelListener

public void addColumnModelListener(TableColumnModelListener x)
Adds a listener for table column model events.
Parameters:
x - a TableColumnModelListener object

removeColumnModelListener

public void removeColumnModelListener(TableColumnModelListener x)
Removes a listener for table column model events.
Parameters:
x - a TableColumnModelListener object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableModel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Interface TableModel

All Known Implementing Classes:
AbstractTableModel
public interface TableModel

The TableModel interface specifies the methods the JTable will use to interrogate a tabular data model.

The JTable can be set up to display any data model which implements the TableModel interface with a couple of lines of code:

      TableModel myData = new MyTableModel();
      JTable table = new JTable(myData);

For further documentation, see Creating a Table Model in The Java Tutorial.

See Also:
JTable

Method Summary
void | addTableModelListener(TableModelListener l) Adds a listener to the list that is notified each time a change to the data model occurs.
Class | getColumnClass(int columnIndex) Returns the most specific superclass for all the cell values in the column.
int | getColumnCount() Returns the number of columns in the model.
String | getColumnName(int columnIndex) Returns the name of the column at columnIndex.
int | getRowCount() Returns the number of rows in the model.
Object | getValueAt(int rowIndex, int columnIndex) Returns the value for the cell at columnIndex and rowIndex.
boolean | isCellEditable(int rowIndex, int columnIndex) Returns true if the cell at rowIndex and columnIndex is editable.
void | removeTableModelListener(TableModelListener l) Removes a listener from the list that is notified each time a change to the data model occurs.
void | setValueAt(Object aValue, int rowIndex, int columnIndex) Sets the value in the cell at columnIndex and rowIndex to aValue.

Method Detail

getRowCount

public int getRowCount()
Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.
Returns:
the number of rows in the model
See Also:
getColumnCount()

getColumnCount

public int getColumnCount()
Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.
Returns:
the number of columns in the model
See Also:
getRowCount()

getColumnName

public String getColumnName(int columnIndex)
Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.
Parameters:
columnIndex - the index of the column
Returns:
the name of the column

getColumnClass

public Class getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values in the column. This is used by the JTable to set up a default renderer and editor for the column.
Parameters:
columnIndex - the index of the column
Returns:
the common ancestor class of the object values in the model.

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable. Otherwise, setValueAt on the cell will not change the value of that cell.
Parameters:
rowIndex - the row whose value to be queried
columnIndex - the column whose value to be queried
Returns:
true if the cell is editable
See Also:
setValueAt(java.lang.Object, int, int)

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Returns the value for the cell at columnIndex and rowIndex.
Parameters:
rowIndex - the row whose value is to be queried
columnIndex - the column whose value is to be queried
Returns:
the value Object at the specified cell

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Sets the value in the cell at columnIndex and rowIndex to aValue.
Parameters:
aValue - the new value
rowIndex - the row whose value is to be changed
columnIndex - the column whose value is to be changed
See Also:
getValueAt(int, int), isCellEditable(int, int)

addTableModelListener

public void addTableModelListener(TableModelListener l)
Adds a listener to the list that is notified each time a change to the data model occurs.
Parameters:
l - the TableModelListener

removeTableModelListener

public void removeTableModelListener(TableModelListener l)
Removes a listener from the list that is notified each time a change to the data model occurs.
Parameters:
l - the TableModelListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.table
Class DefaultTableCellRenderer.UIResource

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.table.DefaultTableCellRenderer
                                |
                                +--javax.swing.table.DefaultTableCellRenderer.UIResource
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants, TableCellRenderer, UIResource
Enclosing class:
DefaultTableCellRenderer
public static class DefaultTableCellRenderer.UIResource
extends DefaultTableCellRenderer
implements UIResource

A subclass of DefaultTableCellRenderer that implements UIResource. DefaultTableCellRenderer doesn't implement UIResource directly so that applications can safely override the cellRenderer property with DefaultTableCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.table.DefaultTableCellRenderer
DefaultTableCellRenderer.UIResource
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.table.DefaultTableCellRenderer
noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultTableCellRenderer.UIResource()
Methods inherited from class javax.swing.table.DefaultTableCellRenderer
firePropertyChange, firePropertyChange, getTableCellRendererComponent, repaint, repaint, revalidate, setBackground, setForeground, setValue, updateUI, validate
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultTableCellRenderer.UIResource

public DefaultTableCellRenderer.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharacterAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AttributeSet.CharacterAttribute

All Known Implementing Classes:
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants
Enclosing class:
AttributeSet
public static interface AttributeSet.CharacterAttribute

This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation. This would be any attribute that applies to a so-called run of style.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ColorAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AttributeSet.ColorAttribute

All Known Implementing Classes:
StyleConstants.ColorConstants
Enclosing class:
AttributeSet
public static interface AttributeSet.ColorAttribute

This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AttributeSet.FontAttribute

All Known Implementing Classes:
StyleConstants.FontConstants
Enclosing class:
AttributeSet
public static interface AttributeSet.FontAttribute

This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text. This is not considered to be a closed set, the definition can change across version of the platform and can be ammended by additional user added entries that correspond to logical settings that are specific to some type of content.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.text Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.text

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.TextAction
        • class javax.swing.text.DefaultEditorKit.BeepAction
        • class javax.swing.text.DefaultEditorKit.CopyAction
        • class javax.swing.text.DefaultEditorKit.CutAction
        • class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
        • class javax.swing.text.DefaultEditorKit.InsertBreakAction
        • class javax.swing.text.DefaultEditorKit.InsertContentAction
        • class javax.swing.text.DefaultEditorKit.InsertTabAction
        • class javax.swing.text.DefaultEditorKit.PasteAction
        • class javax.swing.text.StyledEditorKit.StyledTextAction
          • class javax.swing.text.StyledEditorKit.AlignmentAction
          • class javax.swing.text.StyledEditorKit.BoldAction
          • class javax.swing.text.StyledEditorKit.FontFamilyAction
          • class javax.swing.text.StyledEditorKit.FontSizeAction
          • class javax.swing.text.StyledEditorKit.ForegroundAction
          • class javax.swing.text.StyledEditorKit.ItalicAction
          • class javax.swing.text.StyledEditorKit.UnderlineAction
    • class javax.swing.text.AbstractDocument (implements javax.swing.text.Document, java.io.Serializable)
      • class javax.swing.text.DefaultStyledDocument (implements javax.swing.text.StyledDocument)
      • class javax.swing.text.PlainDocument
    • class javax.swing.text.AbstractDocument.AbstractElement (implements javax.swing.text.Element, javax.swing.text.MutableAttributeSet, java.io.Serializable, javax.swing.tree.TreeNode)
      • class javax.swing.text.AbstractDocument.BranchElement
        • class javax.swing.text.DefaultStyledDocument.SectionElement
      • class javax.swing.text.AbstractDocument.LeafElement
    • class javax.swing.undo.AbstractUndoableEdit (implements java.io.Serializable, javax.swing.undo.UndoableEdit)
      • class javax.swing.text.AbstractDocument.ElementEdit (implements javax.swing.event.DocumentEvent.ElementChange)
      • class javax.swing.undo.CompoundEdit
        • class javax.swing.text.AbstractDocument.DefaultDocumentEvent (implements javax.swing.event.DocumentEvent)
      • class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
    • class javax.swing.text.AbstractWriter
    • class javax.accessibility.AccessibleContext
      • class java.awt.Component.AccessibleAWTComponent (implements javax.accessibility.AccessibleComponent, java.io.Serializable)
        • class java.awt.Container.AccessibleAWTContainer
          • class javax.swing.JComponent.AccessibleJComponent
            • class javax.swing.text.JTextComponent.AccessibleJTextComponent (implements javax.accessibility.AccessibleText, javax.swing.event.CaretListener, javax.swing.event.DocumentListener)
    • class javax.swing.text.AsyncBoxView.ChildLocator
    • class javax.swing.text.AsyncBoxView.ChildState (implements java.lang.Runnable)
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
    • class javax.swing.plaf.ComponentUI
      • class javax.swing.plaf.TextUI
        • class javax.swing.plaf.basic.BasicTextUI (implements javax.swing.text.ViewFactory)
          • class javax.swing.text.DefaultTextUI
    • class javax.swing.text.DefaultStyledDocument.ElementBuffer (implements java.io.Serializable)
    • class javax.swing.text.DefaultStyledDocument.ElementSpec
    • class javax.swing.text.EditorKit (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.DefaultEditorKit
        • class javax.swing.text.StyledEditorKit
    • class javax.swing.text.ElementIterator (implements java.lang.Cloneable)
    • class javax.swing.text.FlowView.FlowStrategy
    • class javax.swing.text.GapVector (implements java.io.Serializable)
      • class javax.swing.text.GapContent (implements javax.swing.text.AbstractDocument.Content, java.io.Serializable)
    • class javax.swing.text.GlyphView.GlyphPainter
    • class javax.swing.text.JTextComponent.KeyBinding
    • class javax.swing.text.LayeredHighlighter (implements javax.swing.text.Highlighter)
      • class javax.swing.text.DefaultHighlighter
    • class javax.swing.text.LayeredHighlighter.LayerPainter (implements javax.swing.text.Highlighter.HighlightPainter)
      • class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
    • class javax.swing.text.LayoutQueue
    • class javax.swing.text.Position.Bias
    • class java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
      • class java.awt.geom.Rectangle2D
        • class java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
          • class javax.swing.text.DefaultCaret (implements javax.swing.text.Caret, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener)
    • class javax.swing.text.Segment (implements java.text.CharacterIterator, java.lang.Cloneable)
    • class javax.swing.text.SimpleAttributeSet (implements java.lang.Cloneable, javax.swing.text.MutableAttributeSet, java.io.Serializable)
    • class javax.swing.text.StringContent (implements javax.swing.text.AbstractDocument.Content, java.io.Serializable)
    • class javax.swing.text.StyleConstants
      • class javax.swing.text.StyleConstants.CharacterConstants (implements javax.swing.text.AttributeSet.CharacterAttribute)
      • class javax.swing.text.StyleConstants.ColorConstants (implements javax.swing.text.AttributeSet.CharacterAttribute, javax.swing.text.AttributeSet.ColorAttribute)
      • class javax.swing.text.StyleConstants.FontConstants (implements javax.swing.text.AttributeSet.CharacterAttribute, javax.swing.text.AttributeSet.FontAttribute)
      • class javax.swing.text.StyleConstants.ParagraphConstants (implements javax.swing.text.AttributeSet.ParagraphAttribute)
    • class javax.swing.text.StyleContext (implements javax.swing.text.AbstractDocument.AttributeContext, java.io.Serializable)
    • class javax.swing.text.StyleContext.NamedStyle (implements java.io.Serializable, javax.swing.text.Style)
    • class javax.swing.text.StyleContext.SmallAttributeSet (implements javax.swing.text.AttributeSet)
    • class javax.swing.text.TabSet (implements java.io.Serializable)
    • class javax.swing.text.TabStop (implements java.io.Serializable)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.swing.text.BadLocationException
        • class java.io.IOException
          • class javax.swing.text.ChangedCharSetException
    • class javax.swing.text.Utilities
    • class javax.swing.text.View (implements javax.swing.SwingConstants)
      • class javax.swing.text.AsyncBoxView
      • class javax.swing.text.ComponentView
      • class javax.swing.text.CompositeView
        • class javax.swing.text.BoxView
          • class javax.swing.text.FlowView
            • class javax.swing.text.ParagraphView (implements javax.swing.text.TabExpander)
          • class javax.swing.text.TableView
          • class javax.swing.text.TableView.TableCell (implements javax.swing.text.TableView.GridCell)
          • class javax.swing.text.TableView.TableRow
          • class javax.swing.text.WrappedPlainView (implements javax.swing.text.TabExpander)
          • class javax.swing.text.ZoneView
      • class javax.swing.text.GlyphView (implements java.lang.Cloneable, javax.swing.text.TabableView)
        • class javax.swing.text.LabelView (implements javax.swing.text.TabableView)
      • class javax.swing.text.IconView
      • class javax.swing.text.PlainView (implements javax.swing.text.TabExpander)
        • class javax.swing.text.FieldView
          • class javax.swing.text.PasswordView

Interface Hierarchy

  • interface javax.swing.text.AbstractDocument.AttributeContext
  • interface javax.swing.text.AbstractDocument.Content
  • interface javax.swing.text.AttributeSet
    • interface javax.swing.text.MutableAttributeSet
      • interface javax.swing.text.Style
  • interface javax.swing.text.AttributeSet.CharacterAttribute
  • interface javax.swing.text.AttributeSet.ColorAttribute
  • interface javax.swing.text.AttributeSet.FontAttribute
  • interface javax.swing.text.AttributeSet.ParagraphAttribute
  • interface javax.swing.text.Caret
  • interface javax.swing.text.Document
    • interface javax.swing.text.StyledDocument
  • interface javax.swing.text.Element
  • interface javax.swing.text.Highlighter
  • interface javax.swing.text.Highlighter.Highlight
  • interface javax.swing.text.Highlighter.HighlightPainter
  • interface javax.swing.text.Keymap
  • interface javax.swing.text.Position
  • interface javax.swing.text.TabableView
  • interface javax.swing.text.TabExpander
  • interface javax.swing.text.ViewFactory
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.text

Provides classes and interfaces that deal with editable and noneditable text components.

See:
Description

Interface Summary
AbstractDocument.AttributeContext | An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
AbstractDocument.Content | Interface to describe a sequence of character content that can be edited.
AttributeSet | A collection of unique attributes.
AttributeSet.CharacterAttribute | This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
AttributeSet.ColorAttribute | This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
AttributeSet.FontAttribute | This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text.
AttributeSet.ParagraphAttribute | This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
Caret | A place within a document view that represents where things can be inserted into the document model.
Document | The Document is a container for text that serves as the model for swing text components.
Element | Interface to describe a structural piece of a document.
Highlighter | An interface for an object that allows one to mark up the background with colored areas.
Highlighter.Highlight |
Highlighter.HighlightPainter | Highlight renderer.
Keymap | A collection of bindings of KeyStrokes to actions.
MutableAttributeSet | A generic interface for a mutable collection of unique attributes.
Position | Represents a location within a document.
Style | A collection of attributes to associate with an element in a document.
StyledDocument | Interface for a generic styled document.
TabableView | Interface for View's that have size dependant upon tabs.
TabExpander | Simple interface to allow for different types of implementations of tab expansion.
ViewFactory | A factory to create a view of some portion of document subject.

Class Summary
AbstractDocument | An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.ElementEdit | An implementation of ElementChange that can be added to the document event.
AbstractWriter | AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
AsyncBoxView | A box that does layout asynchronously.
BoxView | A view that arranges its children into a box shape by tiling it's children along an axis.
ComponentView | Component decorator that implements the view interface.
CompositeView | A view that is composed of other views (has children).
DefaultCaret | A default implementation of Caret.
DefaultEditorKit | This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
DefaultEditorKit.BeepAction | Creates a beep.
DefaultEditorKit.CopyAction | Coies the selected region and place its contents into the system clipboard.
DefaultEditorKit.CutAction | Cuts the selected region and place its contents into the system clipboard.
DefaultEditorKit.DefaultKeyTypedAction | The action that is executed by default if a key typed event is received and there is no keymap entry.
DefaultEditorKit.InsertBreakAction | Places a line/paragraph break into the document.
DefaultEditorKit.InsertContentAction | Places content into the associated document.
DefaultEditorKit.InsertTabAction | Places a tab character into the document.
DefaultEditorKit.PasteAction | Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
DefaultHighlighter | Implements the Highlighter interfaces.
DefaultHighlighter.DefaultHighlightPainter | Simple highlight painter that fills a highlighted area with a solid color.
DefaultStyledDocument | A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
DefaultStyledDocument.AttributeUndoableEdit | An UndoableEdit used to remember AttributeSet changes to an Element.
DefaultStyledDocument.ElementSpec | Specification for building elements.
DefaultTextUI | Deprecated.
EditorKit | Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
ElementIterator | ElementIterator, as the name suggests, iteratates over the Element tree.
FieldView | Extends the multi-line plain text view to be suitable for a single-line editor view.
FlowView | A View that tries to flow it's children into some partially constrained space.
FlowView.FlowStrategy | Strategy for maintaining the physical form of the flow.
GapContent | An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
GlyphView | A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
GlyphView.GlyphPainter | A class to perform rendering of the glyphs.
IconView | Icon decorator that implements the view interface.
JTextComponent | JTextComponent is the base class for swing text components.
JTextComponent.KeyBinding | Binding record for creating key bindings.
LabelView | A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
LayeredHighlighter |
LayeredHighlighter.LayerPainter | Layered highlight renderer.
LayoutQueue | A queue of text layout tasks.
ParagraphView | View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
PasswordView | Implements a View suitable for use in JPasswordField UI implementations.
PlainDocument | A plain document that maintains no character attributes.
PlainView | Implements View interface for a simple multi-line text view that has text in one font and color.
Position.Bias | A typesafe enumeration to indicate bias to a position in the model.
Segment | A segment of a character array representing a fragment of text.
SimpleAttributeSet | A straightforward implementation of MutableAttributeSet using a hash table.
StringContent | An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
StyleConstants | A collection of well known or common attribute keys and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.
StyleConstants.CharacterConstants | This is a typesafe enumeration of the well-known attributes that contribute to a character style.
StyleConstants.ColorConstants | This is a typesafe enumeration of the well-known attributes that contribute to a color.
StyleConstants.FontConstants | This is a typesafe enumeration of the well-known attributes that contribute to a font.
StyleConstants.ParagraphConstants | This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
StyleContext | A pool of styles and their associated resources.
StyledEditorKit | This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
StyledEditorKit.AlignmentAction | An action to set paragraph alignment.
StyledEditorKit.BoldAction | An action to toggle the bold attribute.
StyledEditorKit.FontFamilyAction | An action to set the font family in the associated JEditorPane.
StyledEditorKit.FontSizeAction | An action to set the font size in the associated JEditorPane.
StyledEditorKit.ForegroundAction | An action to set foreground color.
StyledEditorKit.ItalicAction | An action to toggle the italic attribute.
StyledEditorKit.StyledTextAction | An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
StyledEditorKit.UnderlineAction | An action to toggle the underline attribute.
TableView | Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
TabSet | A TabSet is comprised of many TabStops.
TabStop | This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
TextAction | An Action implementation useful for key bindings that are shared across a number of different text components.
Utilities | A collection of methods to deal with various text related activities.
View | A very important part of the text package is the View class.
WrappedPlainView | View of plain text (text with only one font and color) that does line-wrapping.
ZoneView | ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Exception Summary
BadLocationException | This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
ChangedCharSetException | ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.

Package javax.swing.text Description

Provides classes and interfaces that deal with editable and noneditable text components. Examples of text components are text fields and text areas, of which password fields and document editors are special instantiations. Features that are supported by this package include selection/highlighting, editing, style, and key mapping.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Using Text Components, a section in The Java Tutorial.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


ParagraphAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AttributeSet.ParagraphAttribute

All Known Implementing Classes:
StyleConstants.ParagraphConstants
Enclosing class:
AttributeSet
public static interface AttributeSet.ParagraphAttribute

This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package javax.swing.text

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.text

Packages that use javax.swing.text
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in javax.swing.text used by java.awt
AttributeSet
A collection of unique attributes.

Classes in javax.swing.text used by javax.accessibility
AttributeSet
A collection of unique attributes.

Classes in javax.swing.text used by javax.swing
AttributeSet
A collection of unique attributes.
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
Document
The Document is a container for text that serves as the model for swing text components.
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
Element
Interface to describe a structural piece of a document.
JTextComponent
JTextComponent is the base class for swing text components.
JTextComponent.AccessibleJTextComponent
This class implements accessibility support for the JTextComponent class.
JTextComponent.KeyBinding
Binding record for creating key bindings.
MutableAttributeSet
A generic interface for a mutable collection of unique attributes.
Style
A collection of attributes to associate with an element in a document.
StyledDocument
Interface for a generic styled document.
StyledEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.

Classes in javax.swing.text used by javax.swing.event
Document
The Document is a container for text that serves as the model for swing text components.
Element
Interface to describe a structural piece of a document.

Classes in javax.swing.text used by javax.swing.plaf
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
JTextComponent
JTextComponent is the base class for swing text components.
Position.Bias
A typesafe enumeration to indicate bias to a position in the model.
View
A very important part of the text package is the View class.

Classes in javax.swing.text used by javax.swing.plaf.basic
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
Caret
A place within a document view that represents where things can be inserted into the document model.
DefaultCaret
A default implementation of Caret.
DefaultHighlighter
Implements the Highlighter interfaces.
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
Element
Interface to describe a structural piece of a document.
Highlighter
An interface for an object that allows one to mark up the background with colored areas.
JTextComponent
JTextComponent is the base class for swing text components.
Keymap
A collection of bindings of KeyStrokes to actions.
LayeredHighlighter
Position.Bias
A typesafe enumeration to indicate bias to a position in the model.
View
A very important part of the text package is the View class.
ViewFactory
A factory to create a view of some portion of document subject.

Classes in javax.swing.text used by javax.swing.plaf.metal
ViewFactory
A factory to create a view of some portion of document subject.

Classes in javax.swing.text used by javax.swing.plaf.multi
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
JTextComponent
JTextComponent is the base class for swing text components.
Position.Bias
A typesafe enumeration to indicate bias to a position in the model.
View
A very important part of the text package is the View class.

Classes in javax.swing.text used by javax.swing.text
AbstractDocument
An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.AbstractElement
Implements the abstract part of an element.
AbstractDocument.AttributeContext
An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
AbstractDocument.BranchElement
Implements a composite element that contains other elements.
AbstractDocument.Content
Interface to describe a sequence of character content that can be edited.
AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being modified.
AsyncBoxView
A box that does layout asynchronously.
AsyncBoxView.ChildLocator
A class to manage the effective position of the child views in a localized area while changes are being made around the localized area.
AsyncBoxView.ChildState
A record representing the layout state of a child view.
AttributeSet
A collection of unique attributes.
AttributeSet.CharacterAttribute
This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
AttributeSet.ColorAttribute
This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
AttributeSet.FontAttribute
This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text.
AttributeSet.ParagraphAttribute
This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
BoxView
A view that arranges its children into a box shape by tiling it's children along an axis.
Caret
A place within a document view that represents where things can be inserted into the document model.
CompositeView
A view that is composed of other views (has children).
DefaultEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
DefaultStyledDocument
A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
DefaultStyledDocument.ElementBuffer
Class to manage changes to the element hierarchy.
DefaultStyledDocument.ElementSpec
Specification for building elements.
Document
The Document is a container for text that serves as the model for swing text components.
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
Element
Interface to describe a structural piece of a document.
ElementIterator
ElementIterator, as the name suggests, iteratates over the Element tree.
FieldView
Extends the multi-line plain text view to be suitable for a single-line editor view.
FlowView
A View that tries to flow it's children into some partially constrained space.
FlowView.FlowStrategy
Strategy for maintaining the physical form of the flow.
GlyphView
A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
GlyphView.GlyphPainter
A class to perform rendering of the glyphs.
Highlighter
An interface for an object that allows one to mark up the background with colored areas.
Highlighter.Highlight
Highlighter.HighlightPainter
Highlight renderer.
JTextComponent
JTextComponent is the base class for swing text components.
JTextComponent.KeyBinding
Binding record for creating key bindings.
Keymap
A collection of bindings of KeyStrokes to actions.
LayeredHighlighter
LayeredHighlighter.LayerPainter
Layered highlight renderer.
LayoutQueue
A queue of text layout tasks.
MutableAttributeSet
A generic interface for a mutable collection of unique attributes.
PlainView
Implements View interface for a simple multi-line text view that has text in one font and color.
Position
Represents a location within a document.
Position.Bias
A typesafe enumeration to indicate bias to a position in the model.
Segment
A segment of a character array representing a fragment of text.
Style
A collection of attributes to associate with an element in a document.
StyleConstants
A collection of well known or common attribute keys and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.
StyleContext
A pool of styles and their associated resources.
StyleContext.SmallAttributeSet
This class holds a small number of attributes in an array.
StyledDocument
Interface for a generic styled document.
StyledEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
StyledEditorKit.StyledTextAction
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
TabableView
Interface for View's that have size dependant upon tabs.
TabExpander
Simple interface to allow for different types of implementations of tab expansion.
TableView
Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
TableView.TableCell
Deprecated. A table cell can now be any View implementation.
TableView.TableRow
View of a row in a row-centric table.
TabSet
A TabSet is comprised of many TabStops.
TabStop
This class encapsulates a single tab stop (basically as tab stops are thought of by RTF).
TextAction
An Action implementation useful for key bindings that are shared across a number of different text components.
View
A very important part of the text package is the View class.
ViewFactory
A factory to create a view of some portion of document subject.

Classes in javax.swing.text used by javax.swing.text.html
AbstractDocument
An implementation of the document interface to serve as a basis for implementing various kinds of documents.
AbstractDocument.AbstractElement
Implements the abstract part of an element.
AbstractDocument.AttributeContext
An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
AbstractDocument.BranchElement
Implements a composite element that contains other elements.
AbstractDocument.Content
Interface to describe a sequence of character content that can be edited.
AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being modified.
AbstractDocument.LeafElement
Implements an element that directly represents content of some kind.
AbstractWriter
AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes.
AttributeSet
A collection of unique attributes.
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
BoxView
A view that arranges its children into a box shape by tiling it's children along an axis.
ComponentView
Component decorator that implements the view interface.
CompositeView
A view that is composed of other views (has children).
DefaultEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
DefaultStyledDocument
A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
DefaultStyledDocument.ElementSpec
Specification for building elements.
Document
The Document is a container for text that serves as the model for swing text components.
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
Element
Interface to describe a structural piece of a document.
GlyphView
A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
LabelView
A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
MutableAttributeSet
A generic interface for a mutable collection of unique attributes.
ParagraphView
View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
Style
A collection of attributes to associate with an element in a document.
StyleContext
A pool of styles and their associated resources.
StyleContext.SmallAttributeSet
This class holds a small number of attributes in an array.
StyledDocument
Interface for a generic styled document.
StyledEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
StyledEditorKit.StyledTextAction
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
TabableView
Interface for View's that have size dependant upon tabs.
TextAction
An Action implementation useful for key bindings that are shared across a number of different text components.
View
A very important part of the text package is the View class.
ViewFactory
A factory to create a view of some portion of document subject.

Classes in javax.swing.text used by javax.swing.text.html.parser
ChangedCharSetException
ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.
SimpleAttributeSet
A straightforward implementation of MutableAttributeSet using a hash table.

Classes in javax.swing.text used by javax.swing.text.rtf
BadLocationException
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).
DefaultEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
Document
The Document is a container for text that serves as the model for swing text components.
EditorKit
Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content.
StyledEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.

Classes in javax.swing.text used by javax.swing.tree
JTextComponent
JTextComponent is the base class for swing text components.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractDocument

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
All Implemented Interfaces:
Document, Serializable
Direct Known Subclasses:
DefaultStyledDocument, PlainDocument
public abstract class AbstractDocument
extends Object
implements Document, Serializable

An implementation of the document interface to serve as a basis for implementing various kinds of documents. At this level there is very little policy, so there is a corresponding increase in difficulty of use.

This class implements a locking mechanism for the document. It allows multiple readers or one writer, and writers must wait until all observers of the document have been notified of a previous change before beginning another mutation to the document. The read lock is aquired and released using the render method. A write lock is aquired by the methods that mutate the document, and are held for the duration of the method call. Notification is done on the thread that produced the mutation, and the thread has full read access to the document for the duration of the notification, but other readers are kept out until the notification has finished. The notification is a beans event notification which does not allow any further mutations until all listeners have been notified.

Any models subclassed from this class and used in conjunction with a text component that has a look and feel implementation that is derived from BasicTextUI may be safely updated asynchronously, because all access to the View hierarchy is serialized by BasicTextUI if the document is of type AbstractDocument. The locking assumes that an independant thread will access the View hierarchy only from the DocumentListener methods, and that there will be only one event thread active at a time.

If concurrency support is desired, there are the following additional implications. The code path for any DocumentListener implementation and any UndoListener implementation must be threadsafe, and not access the component lock if trying to be safe from deadlocks. The repaint and revalidate methods on JComponent are safe.

AbstractDocument models an implied break at the end of the document. Among other things this allows you to position the caret after the last character. As a result of this, getLength returns one less than the length of the Content. If you create your own Content, be sure and initialize it to have an additional character. Refer to StringContent and GapContent for examples of this. Another implication of this is that Elements that model the implied end character will have an endOffset == (getLength() + 1). For example, in DefaultStyledDocument getParagraphElement(getLength()).getEndOffset() == getLength() + 1 .

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
static interface | AbstractDocument.AttributeContext An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
static interface | AbstractDocument.Content Interface to describe a sequence of character content that can be edited.
class | AbstractDocument.DefaultDocumentEvent Stores document changes as the document is being modified.
static class | AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
Field Summary
protected static String | BAD_LOCATION Error message to indicate a bad location.
static String | BidiElementName Name of elements used to hold a unidirectional run
static String | ContentElementName Name of elements used to represent content
static String | ElementNameAttribute Name of the attribute used to specify element names.
protected EventListenerList | listenerList The event listener list for the document.
static String | ParagraphElementName Name of elements used to represent paragraphs
static String | SectionElementName Name of elements used to hold sections (lines/paragraphs).
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Constructor Summary
protected | AbstractDocument(AbstractDocument.Content data) Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
protected | AbstractDocument(AbstractDocument.Content data, AbstractDocument.AttributeContext context) Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
Method Summary
void | addDocumentListener(DocumentListener listener) Adds a document listener for notification of any changes.
void | addUndoableEditListener(UndoableEditListener listener) Adds an undo listener for notification of any changes.
protected Element | createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
protected Element | createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element.
Position | createPosition(int offs) Returns a position that will track change as the document is altered.
void | dump(PrintStream out) Gives a diagnostic dump.
protected void | fireChangedUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireInsertUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireRemoveUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireUndoableEditUpdate(UndoableEditEvent e) Notifies all listeners that have registered interest for notification on this event type.
int | getAsynchronousLoadPriority() Get the asynchronous loading priority.
protected AbstractDocument.AttributeContext | getAttributeContext() Fetches the context for managing attributes.
Element | getBidiRootElement() Returns the root element of the bidirectional structure for this document.
protected AbstractDocument.Content | getContent() Gets the content for the document.
protected Thread | getCurrentWriter() Fetches the current writing thread if there is one.
abstract Element | getDefaultRootElement() Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided.
Dictionary | getDocumentProperties() Support for managing a set of properties.
Position | getEndPosition() Returns a position that represents the end of the document.
int | getLength() Returns the length of the data.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
abstract Element | getParagraphElement(int pos) Get the paragraph element containing the given position.
Object | getProperty(Object key) A convenience method for looking up a property value.
Element[] | getRootElements() Gets all root elements defined.
Position | getStartPosition() Returns a position that represents the start of the document.
String | getText(int offset, int length) Gets a sequence of text from the document.
void | getText(int offset, int length, Segment txt) Gets some text from the document potentially without making a copy.
void | insertString(int offs, String str, AttributeSet a) Inserts some content into the document.
protected void | insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected void | postRemoveUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
void | putProperty(Object key, Object value) A convenience method for storing up a property value.
void | readLock() Acquires a lock to begin reading some state from the document.
void | readUnlock() Does a read unlock.
void | remove(int offs, int len) Removes some content from the document.
void | removeDocumentListener(DocumentListener listener) Removes a document listener.
void | removeUndoableEditListener(UndoableEditListener listener) Removes an undo listener.
protected void | removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
void | render(Runnable r) This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.
void | setAsynchronousLoadPriority(int p) Set the asynchronous loading priority.
void | setDocumentProperties(Dictionary x) Replace the document properties dictionary for this document.
protected void | writeLock() Acquires a lock to begin mutating the document this lock protects.
protected void | writeUnlock() Releases the write lock held because the write operation is finished.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

listenerList

protected EventListenerList listenerList
The event listener list for the document.

BAD_LOCATION

protected static final String BAD_LOCATION
Error message to indicate a bad location.

ParagraphElementName

public static final String ParagraphElementName
Name of elements used to represent paragraphs

ContentElementName

public static final String ContentElementName
Name of elements used to represent content

SectionElementName

public static final String SectionElementName
Name of elements used to hold sections (lines/paragraphs).

BidiElementName

public static final String BidiElementName
Name of elements used to hold a unidirectional run

ElementNameAttribute

public static final String ElementNameAttribute
Name of the attribute used to specify element names.
Constructor Detail

AbstractDocument

protected AbstractDocument(AbstractDocument.Content data)
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
Parameters:
data - the content

AbstractDocument

protected AbstractDocument(AbstractDocument.Content data,
                           AbstractDocument.AttributeContext context)
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
Parameters:
data - the content
context - the attribute context
Method Detail

getDocumentProperties

public Dictionary getDocumentProperties()
Support for managing a set of properties. Callers can use the documentProperties dictionary to annotate the document with document-wide properties.
Returns:
a non null Dictionary
See Also:
setDocumentProperties(java.util.Dictionary)

setDocumentProperties

public void setDocumentProperties(Dictionary x)
Replace the document properties dictionary for this document.
Parameters:
x - the new dictionary
See Also:
getDocumentProperties()

fireInsertUpdate

protected void fireInsertUpdate(DocumentEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event
See Also:
EventListenerList

fireChangedUpdate

protected void fireChangedUpdate(DocumentEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event
See Also:
EventListenerList

fireRemoveUpdate

protected void fireRemoveUpdate(DocumentEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event
See Also:
EventListenerList

fireUndoableEditUpdate

protected void fireUndoableEditUpdate(UndoableEditEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
e - the event
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3

getAsynchronousLoadPriority

public int getAsynchronousLoadPriority()
Get the asynchronous loading priority. If less than zero, the document should not be loaded asynchronously.

setAsynchronousLoadPriority

public void setAsynchronousLoadPriority(int p)
Set the asynchronous loading priority.

render

public void render(Runnable r)
This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously. The given runnable will be executed in a way that allows it to safely read the model with no changes while the runnable is being executed. The runnable itself may not make any mutations.

This is implemented to aquire a read lock for the duration of the runnables execution. There may be multiple runnables executing at the same time, and all writers will be blocked while there are active rendering runnables. If the runnable throws an exception, its lock will be safely released. There is no protection against a runnable that never exits, which will effectively leave the document locked for it's lifetime.

If the given runnable attempts to make any mutations in this implementation, a deadlock will occur. There is no tracking of individual rendering threads to enable detecting this situation, but a subclass could incur the overhead of tracking them and throwing an error.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
render in interface Document
Parameters:
r - the renderer to execute.

getLength

public int getLength()
Returns the length of the data. This is the number of characters of content that represents the users data.
Specified by:
getLength in interface Document
Returns:
the length >= 0
See Also:
Document.getLength()

addDocumentListener

public void addDocumentListener(DocumentListener listener)
Adds a document listener for notification of any changes.
Specified by:
addDocumentListener in interface Document
Parameters:
listener - the listener
See Also:
Document.addDocumentListener(javax.swing.event.DocumentListener)

removeDocumentListener

public void removeDocumentListener(DocumentListener listener)
Removes a document listener.
Specified by:
removeDocumentListener in interface Document
Parameters:
listener - the listener
See Also:
Document.removeDocumentListener(javax.swing.event.DocumentListener)

addUndoableEditListener

public void addUndoableEditListener(UndoableEditListener listener)
Adds an undo listener for notification of any changes. Undo/Redo operations performed on the UndoableEdit will cause the appropriate DocumentEvent to be fired to keep the view(s) in sync with the model.
Specified by:
addUndoableEditListener in interface Document
Parameters:
listener - the listener
See Also:
Document.addUndoableEditListener(javax.swing.event.UndoableEditListener)

removeUndoableEditListener

public void removeUndoableEditListener(UndoableEditListener listener)
Removes an undo listener.
Specified by:
removeUndoableEditListener in interface Document
Parameters:
listener - the listener
See Also:
Document.removeDocumentListener(javax.swing.event.DocumentListener)

getProperty

public final Object getProperty(Object key)
A convenience method for looking up a property value. It is equivalent to:
 getDocumentProperties().get(key);
Specified by:
getProperty in interface Document
Parameters:
key - the non-null property key
Returns:
the value of this property or null
See Also:
getDocumentProperties()

putProperty

public final void putProperty(Object key,
                              Object value)
A convenience method for storing up a property value. It is equivalent to:
 getDocumentProperties().put(key, value);
If value is null this method will remove the property
Specified by:
putProperty in interface Document
Parameters:
key - the non-null key
value - the value
See Also:
getDocumentProperties()

remove

public void remove(int offs,
                   int len)
            throws BadLocationException
Removes some content from the document. Removing content causes a write lock to be held while the actual changes are taking place. Observers are notified of the change on the thread that called this method.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
remove in interface Document
Parameters:
offs - the starting offset >= 0
len - the number of characters to remove >= 0
Throws:
BadLocationException - the given remove position is not a valid position within the document
See Also:
Document.remove(int, int)

insertString

public void insertString(int offs,
                         String str,
                         AttributeSet a)
                  throws BadLocationException
Inserts some content into the document. Inserting content causes a write lock to be held while the actual changes are taking place, followed by notification to the observers on the thread that grabbed the write lock.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
insertString in interface Document
Parameters:
offs - the starting offset >= 0
str - the string to insert; does nothing with null/empty strings
a - the attributes for the inserted content
Throws:
BadLocationException - the given insert position is not a valid position within the document
See Also:
Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)

getText

public String getText(int offset,
                      int length)
               throws BadLocationException
Gets a sequence of text from the document.
Specified by:
getText in interface Document
Parameters:
offset - the starting offset >= 0
length - the number of characters to retrieve >= 0
Returns:
the text
Throws:
BadLocationException - the range given includes a position that is not a valid position within the document
See Also:
Document.getText(int, int)

getText

public void getText(int offset,
                    int length,
                    Segment txt)
             throws BadLocationException
Gets some text from the document potentially without making a copy. The character array returned in the given Segment should never be mutated. This kind of access to the characters of the document is provided to help make the rendering potentially more efficient. The caller should make no assumptions about the lifetime of the returned character array, which should be copied if needed beyond the use for rendering.
Specified by:
getText in interface Document
Parameters:
offset - the starting offset >= 0
length - the number of characters to retrieve >= 0
txt - the Segment object to retrieve the text into
Throws:
BadLocationException - the range given includes a position that is not a valid position within the document

createPosition

public Position createPosition(int offs)
                        throws BadLocationException
Returns a position that will track change as the document is altered.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
createPosition in interface Document
Parameters:
offs - the position in the model >= 0
Returns:
the position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
Document.createPosition(int)

getStartPosition

public final Position getStartPosition()
Returns a position that represents the start of the document. The position returned can be counted on to track change and stay located at the beginning of the document.
Specified by:
getStartPosition in interface Document
Returns:
the position

getEndPosition

public final Position getEndPosition()
Returns a position that represents the end of the document. The position returned can be counted on to track change and stay located at the end of the document.
Specified by:
getEndPosition in interface Document
Returns:
the position

getRootElements

public Element[] getRootElements()
Gets all root elements defined. Typically, there will only be one so the default implementation is to return the default root element.
Specified by:
getRootElements in interface Document
Returns:
the root element

getDefaultRootElement

public abstract Element getDefaultRootElement()
Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided.
Specified by:
getDefaultRootElement in interface Document
Returns:
the root element
See Also:
Document.getDefaultRootElement()

getBidiRootElement

public Element getBidiRootElement()
Returns the root element of the bidirectional structure for this document. Its children represent character runs with a given Unicode bidi level.

getParagraphElement

public abstract Element getParagraphElement(int pos)
Get the paragraph element containing the given position. Sub-classes must define for themselves what exactly constitutes a paragraph. They should keep in mind however that a paragraph should at least be the unit of text over which to run the Unicode bidirectional algorithm.
Parameters:
pos - the starting offset >= 0
Returns:
the element

getAttributeContext

protected final AbstractDocument.AttributeContext getAttributeContext()
Fetches the context for managing attributes. This method effectively establishes the strategy used for compressing AttributeSet information.
Returns:
the context

insertUpdate

protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,
                            AttributeSet attr)
Updates document structure as a result of text insertion. This will happen within a write lock. If a subclass of this class reimplements this method, it should delegate to the superclass as well.
Parameters:
chng - a description of the change
attr - the attributes for the change

removeUpdate

protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng)
Updates any document structure as a result of text removal. This method is called before the text is actually removed from the Content. This will happen within a write lock. If a subclass of this class reimplements this method, it should delegate to the superclass as well.
Parameters:
chng - a description of the change

postRemoveUpdate

protected void postRemoveUpdate(AbstractDocument.DefaultDocumentEvent chng)
Updates any document structure as a result of text removal. This method is called after the text has been removed from the Content. This will happen within a write lock. If a subclass of this class reimplements this method, it should delegate to the superclass as well.
Parameters:
chng - a description of the change

dump

public void dump(PrintStream out)
Gives a diagnostic dump.
Parameters:
out - the output stream

getContent

protected final AbstractDocument.Content getContent()
Gets the content for the document.
Returns:
the content

createLeafElement

protected Element createLeafElement(Element parent,
                                    AttributeSet a,
                                    int p0,
                                    int p1)
Creates a document leaf element. Hook through which elements are created to represent the document structure. Because this implementation keeps structure and content seperate, elements grow automatically when content is extended so splits of existing elements follow. The document itself gets to decide how to generate elements to give flexibility in the type of elements used.
Parameters:
parent - the parent element
a - the attributes for the element
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
Returns:
the new element

createBranchElement

protected Element createBranchElement(Element parent,
                                      AttributeSet a)
Creates a document branch element, that can contain other elements.
Parameters:
parent - the parent element
a - the attributes
Returns:
the element

getCurrentWriter

protected final Thread getCurrentWriter()
Fetches the current writing thread if there is one. This can be used to distinguish whether a method is being called as part of an existing modification or if a lock needs to be acquired and a new transaction started.

writeLock

protected final void writeLock()
Acquires a lock to begin mutating the document this lock protects. There can be no writing, notification of changes, or reading going on in order to gain the lock.
Throws:
IllegalStateException - thrown on illegal lock attempt. If the document is implemented properly, this can only happen if a document listener attempts to mutate the document. This situation violates the bean event model where order of delivery is not guaranteed and all listeners should be notified before further mutations are allowed.

writeUnlock

protected final void writeUnlock()
Releases the write lock held because the write operation is finished. This allows either a new writer or readers to aquire a lock.

readLock

public final void readLock()
Acquires a lock to begin reading some state from the document. There can be multiple readers at the same time. Writing blocks the readers until notification of the change to the listeners has been completed. This method should be used very carefully to avoid unintended compromise of the document. It should always be balanced with a readUnlock.
See Also:
readUnlock()

readUnlock

public final void readUnlock()
Does a read unlock. This signals that one of the readers is done. If there are no more readers then writing can begin again. This should be balanced with a readLock, and should occur in a finally statement so that the balance is guaranteed. The following is an example.

     readLock();
     try {
         // do something
     } finally {
         readUnlock();
     }
See Also:
readLock()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AbstractElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument.AbstractElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Direct Known Subclasses:
AbstractDocument.BranchElement, AbstractDocument.LeafElement
Enclosing class:
AbstractDocument
public abstract class AbstractDocument.AbstractElement
extends Object
implements Element, MutableAttributeSet, Serializable, TreeNode

Implements the abstract part of an element. By default elements support attributes by having a field that represents the immutable part of the current attribute set for the element. The element itself implements MutableAttributeSet which can be used to modify the set by fetching a new immutable set. The immutable sets are provided by the AttributeContext associated with the document.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
AbstractDocument.AbstractElement(Element parent, AttributeSet a)
Creates a new AbstractElement.
Method Summary
void | addAttribute(Object name, Object value) Adds an attribute to the element.
void | addAttributes(AttributeSet attr) Adds a set of attributes to the element.
abstract Enumeration | children() Returns the children of the reciever as an Enumeration.
boolean | containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
boolean | containsAttributes(AttributeSet attrs) Checks whether the element contains all the attributes.
AttributeSet | copyAttributes() Copies a set of attributes.
void | dump(PrintStream psOut, int indentAmount) Dumps a debugging representation of the element hierarchy.
protected void | finalize() Finalizes an AbstractElement.
abstract boolean | getAllowsChildren() Returns true if the receiver allows children.
Object | getAttribute(Object attrName) Gets the value of an attribute.
int | getAttributeCount() Gets the number of attributes that are defined.
Enumeration | getAttributeNames() Gets the names of all attributes.
AttributeSet | getAttributes() Gets the attributes for the element.
TreeNode | getChildAt(int childIndex) Returns the child TreeNode at index childIndex.
int | getChildCount() Returns the number of children TreeNodes the receiver contains.
Document | getDocument() Retrieves the underlying model.
abstract Element | getElement(int index) Gets a child element.
abstract int | getElementCount() Gets the number of children for the element.
abstract int | getElementIndex(int offset) Gets the child element index closest to the given model offset.
abstract int | getEndOffset() Gets the ending offset in the model for the element.
int | getIndex(TreeNode node) Returns the index of node in the receivers children.
String | getName() Gets the name of the element.
TreeNode | getParent() Returns the parent TreeNode of the receiver.
Element | getParentElement() Gets the parent of the element.
AttributeSet | getResolveParent() Gets the resolving parent.
abstract int | getStartOffset() Gets the starting offset in the model for the element.
boolean | isDefined(Object attrName) Checks whether a given attribute is defined.
boolean | isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
abstract boolean | isLeaf() Checks whether the element is a leaf.
void | removeAttribute(Object name) Removes an attribute from the set.
void | removeAttributes(AttributeSet attrs) Removes a set of attributes for the element.
void | removeAttributes(Enumeration names) Removes a set of attributes for the element.
void | setResolveParent(AttributeSet parent) Sets the resolving parent.
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractDocument.AbstractElement

public AbstractDocument.AbstractElement(Element parent,
                                        AttributeSet a)
Creates a new AbstractElement.
Parameters:
parent - the parent element
a - the attributes for the element
Method Detail

dump

public void dump(PrintStream psOut,
                 int indentAmount)
Dumps a debugging representation of the element hierarchy.
Parameters:
out - the output stream
indentAmount - the indentation level >= 0

finalize

protected void finalize()
                 throws Throwable
Finalizes an AbstractElement.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

getAttributeCount

public int getAttributeCount()
Gets the number of attributes that are defined.
Specified by:
getAttributeCount in interface AttributeSet
Returns:
the number of attributes >= 0
See Also:
AttributeSet.getAttributeCount()

isDefined

public boolean isDefined(Object attrName)
Checks whether a given attribute is defined.
Specified by:
isDefined in interface AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
true if the attribute is defined
See Also:
AttributeSet.isDefined(java.lang.Object)

isEqual

public boolean isEqual(AttributeSet attr)
Checks whether two attribute sets are equal.
Specified by:
isEqual in interface AttributeSet
Parameters:
attr - the attribute set to check against
Returns:
true if the same
See Also:
AttributeSet.isEqual(javax.swing.text.AttributeSet)

copyAttributes

public AttributeSet copyAttributes()
Copies a set of attributes.
Specified by:
copyAttributes in interface AttributeSet
Returns:
the copy
See Also:
AttributeSet.copyAttributes()

getAttribute

public Object getAttribute(Object attrName)
Gets the value of an attribute.
Specified by:
getAttribute in interface AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
the attribute value
See Also:
AttributeSet.getAttribute(java.lang.Object)

getAttributeNames

public Enumeration getAttributeNames()
Gets the names of all attributes.
Specified by:
getAttributeNames in interface AttributeSet
Returns:
the attribute names as an enumeration
See Also:
AttributeSet.getAttributeNames()

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Checks whether a given attribute name/value is defined.
Specified by:
containsAttribute in interface AttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
Returns:
true if the name/value is defined
See Also:
AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)

containsAttributes

public boolean containsAttributes(AttributeSet attrs)
Checks whether the element contains all the attributes.
Specified by:
containsAttributes in interface AttributeSet
Parameters:
attrs - the attributes to check
Returns:
true if the element contains all the attributes
See Also:
AttributeSet.containsAttributes(javax.swing.text.AttributeSet)

getResolveParent

public AttributeSet getResolveParent()
Gets the resolving parent. If not overriden, the resolving parent defaults to the parent element.
Specified by:
getResolveParent in interface AttributeSet
Returns:
the attributes from the parent, null if none
See Also:
AttributeSet.getResolveParent()

addAttribute

public void addAttribute(Object name,
                         Object value)
Adds an attribute to the element.
Specified by:
addAttribute in interface MutableAttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public void addAttributes(AttributeSet attr)
Adds a set of attributes to the element.
Specified by:
addAttributes in interface MutableAttributeSet
Parameters:
attr - the attributes to add
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public void removeAttribute(Object name)
Removes an attribute from the set.
Specified by:
removeAttribute in interface MutableAttributeSet
Parameters:
name - the non-null attribute name
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public void removeAttributes(Enumeration names)
Removes a set of attributes for the element.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
names - the attribute names
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public void removeAttributes(AttributeSet attrs)
Removes a set of attributes for the element.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
attrs - the attributes
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

setResolveParent

public void setResolveParent(AttributeSet parent)
Sets the resolving parent.
Specified by:
setResolveParent in interface MutableAttributeSet
Parameters:
parent - the parent, null if none
See Also:
MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)

getDocument

public Document getDocument()
Retrieves the underlying model.
Specified by:
getDocument in interface Element
Returns:
the model

getParentElement

public Element getParentElement()
Gets the parent of the element.
Specified by:
getParentElement in interface Element
Returns:
the parent

getAttributes

public AttributeSet getAttributes()
Gets the attributes for the element.
Specified by:
getAttributes in interface Element
Returns:
the attribute set

getName

public String getName()
Gets the name of the element.
Specified by:
getName in interface Element
Returns:
the name, null if none

getStartOffset

public abstract int getStartOffset()
Gets the starting offset in the model for the element.
Specified by:
getStartOffset in interface Element
Returns:
the offset >= 0

getEndOffset

public abstract int getEndOffset()
Gets the ending offset in the model for the element.
Specified by:
getEndOffset in interface Element
Returns:
the offset >= 0

getElement

public abstract Element getElement(int index)
Gets a child element.
Specified by:
getElement in interface Element
Parameters:
index - the child index, >= 0 && Returns:
the child element

getElementCount

public abstract int getElementCount()
Gets the number of children for the element.
Specified by:
getElementCount in interface Element
Returns:
the number of children >= 0

getElementIndex

public abstract int getElementIndex(int offset)
Gets the child element index closest to the given model offset.
Specified by:
getElementIndex in interface Element
Parameters:
offset - the offset >= 0
Returns:
the element index >= 0

isLeaf

public abstract boolean isLeaf()
Checks whether the element is a leaf.
Specified by:
isLeaf in interface Element
Returns:
true if a leaf

getChildAt

public TreeNode getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Returns the number of children TreeNodes the receiver contains.
Specified by:
getChildCount in interface TreeNode

getParent

public TreeNode getParent()
Returns the parent TreeNode of the receiver.
Specified by:
getParent in interface TreeNode

getIndex

public int getIndex(TreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.
Specified by:
getIndex in interface TreeNode

getAllowsChildren

public abstract boolean getAllowsChildren()
Returns true if the receiver allows children.
Specified by:
getAllowsChildren in interface TreeNode

children

public abstract Enumeration children()
Returns the children of the reciever as an Enumeration.
Specified by:
children in interface TreeNode
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractWriter

java.lang.Object
  |
  +--javax.swing.text.AbstractWriter
Direct Known Subclasses:
HTMLWriter, MinimalHTMLWriter
public abstract class AbstractWriter
extends Object

AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes. In terms of how much is written out per line, the writer defaults to 100. But this value can be set by subclasses.

Field Summary
protected static char NEWLINE
How the text packages models newlines.
Constructor Summary
protected | AbstractWriter(Writer w, Document doc) Creates a new AbstractWriter.
protected | AbstractWriter(Writer w, Document doc, int pos, int len) Creates a new AbstractWriter.
protected | AbstractWriter(Writer w, Element root) Creates a new AbstractWriter.
protected | AbstractWriter(Writer w, Element root, int pos, int len) Creates a new AbstractWriter.
Method Summary
protected void | decrIndent() Decrements the indent level.
protected boolean | getCanWrapLines() Returns whether or not the lines can be wrapped.
protected int | getCurrentLineLength() Returns the current line length.
protected Document | getDocument() Fetches the document.
protected ElementIterator | getElementIterator() Fetches the ElementIterator.
int | getEndOffset() Returns the last offset to be output.
protected int | getIndentLevel() Returns the current indentation level.
protected int | getIndentSpace() Returns the amount of space to indent.
protected int | getLineLength() Returns the maximum line length.
String | getLineSeparator() Returns the string used to represent newlines.
int | getStartOffset() Returns the first offset to be output.
protected String | getText(Element elem) Returns the text associated with the element.
protected Writer | getWriter() Returns the Writer that is used to output the content.
protected void | incrIndent() Increments the indent level.
protected void | indent() Does indentation.
protected boolean | inRange(Element next) This method determines whether the current element is in the range specified.
protected boolean | isLineEmpty() Returns true if the current line should be considered empty.
protected void | output(char[] content, int start, int length) The last stop in writing out content.
protected void | setCanWrapLines(boolean newValue) Sets whether or not lines can be wrapped.
protected void | setCurrentLineLength(int length) Sets the current line length.
protected void | setIndentSpace(int space) Enables subclasses to specify how many spaces an indent maps to.
protected void | setLineLength(int l) Enables subclasses to set the number of characters they want written per line.
void | setLineSeparator(String value) Sets the String used to reprsent newlines.
protected void | text(Element elem) Writes out text.
protected abstract void | write() This abstract method needs to be implemented by subclasses.
protected void | write(char ch) Writes out a character.
protected void | write(char[] chars, int startIndex, int length) All write methods call into this one.
protected void | write(String content) Writes out a string.
protected void | writeAttributes(AttributeSet attr) Writes out the set of attributes as " =" pairs.
protected void | writeLineSeparator() Writes the line separator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NEWLINE

protected static final char NEWLINE
How the text packages models newlines.
See Also:
getLineSeparator()
Constructor Detail

AbstractWriter

protected AbstractWriter(Writer w,
                         Document doc)
Creates a new AbstractWriter. Initializes the ElementIterator with the default root of the document.
Parameters:
a - Writer.
a - Document

AbstractWriter

protected AbstractWriter(Writer w,
                         Document doc,
                         int pos,
                         int len)
Creates a new AbstractWriter. Initializes the ElementIterator with the element passed in.
Parameters:
a - Writer
an - Element
pos - The location in the document to fetch the content.
len - The amount to write out.

AbstractWriter

protected AbstractWriter(Writer w,
                         Element root)
Creates a new AbstractWriter. Initializes the ElementIterator with the element passed in.
Parameters:
a - Writer
an - Element

AbstractWriter

protected AbstractWriter(Writer w,
                         Element root,
                         int pos,
                         int len)
Creates a new AbstractWriter. Initializes the ElementIterator with the element passed in.
Parameters:
a - Writer
an - Element
pos - The location in the document to fetch the content.
len - The amount to write out.
Method Detail

getStartOffset

public int getStartOffset()
Returns the first offset to be output.
Since:
1.3

getEndOffset

public int getEndOffset()
Returns the last offset to be output.
Since:
1.3

getElementIterator

protected ElementIterator getElementIterator()
Fetches the ElementIterator.
Returns:
the ElementIterator.

getWriter

protected Writer getWriter()
Returns the Writer that is used to output the content.
Since:
1.3

getDocument

protected Document getDocument()
Fetches the document.
Returns:
the Document.

inRange

protected boolean inRange(Element next)
This method determines whether the current element is in the range specified. When no range is specified, the range is initialized to be the entire document. inRange() returns true if the range specified intersects with the element's range.
Parameters:
an - Element.
Returns:
boolean that indicates whether the element is in the range.

write

protected abstract void write()
                       throws IOException,
                              BadLocationException
This abstract method needs to be implemented by subclasses. Its responsibility is to iterate over the elements and use the write() methods to generate output in the desired format.

getText

protected String getText(Element elem)
                  throws BadLocationException
Returns the text associated with the element. The assumption here is that the element is a leaf element. Throws a BadLocationException when encountered.
Parameters:
an - Element.
Throws:
BadLocationException - if pos represents an invalid location within the document.

text

protected void text(Element elem)
             throws BadLocationException,
                    IOException
Writes out text. If a range is specified when the constructor is invoked, then only the appropriate range of text is written out.
Parameters:
an - Element.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

setLineLength

protected void setLineLength(int l)
Enables subclasses to set the number of characters they want written per line. The default is 100.
Parameters:
the - maximum line length.

getLineLength

protected int getLineLength()
Returns the maximum line length.
Since:
1.3

setCurrentLineLength

protected void setCurrentLineLength(int length)
Sets the current line length.
Since:
1.3.

getCurrentLineLength

protected int getCurrentLineLength()
Returns the current line length.
Since:
1.3.

isLineEmpty

protected boolean isLineEmpty()
Returns true if the current line should be considered empty. This is true when getCurrentLineLength == 0 || indent has been invoked on an empty line.
Since:
1.3

setCanWrapLines

protected void setCanWrapLines(boolean newValue)
Sets whether or not lines can be wrapped. This can be toggled during the writing of lines. For example, outputting HTML might set this to false when outputting a quoted string.
Since:
1.3

getCanWrapLines

protected boolean getCanWrapLines()
Returns whether or not the lines can be wrapped. If this is false no lineSeparator's will be output.
Since:
1.3

setIndentSpace

protected void setIndentSpace(int space)
Enables subclasses to specify how many spaces an indent maps to. When indentation takes place, the indent level is multiplied by this mapping. The default is 2.
Parameters:
an - int representing the space to indent mapping.

getIndentSpace

protected int getIndentSpace()
Returns the amount of space to indent.
Since:
1.3

setLineSeparator

public void setLineSeparator(String value)
Sets the String used to reprsent newlines. This is initialized in the constructor from either the Document, or the System property line.separator.
Since:
1.3

getLineSeparator

public String getLineSeparator()
Returns the string used to represent newlines.
Since:
1.3

incrIndent

protected void incrIndent()
Increments the indent level. If indenting would cause getIndentSpace() *getIndentLevel() to be > than getLineLength() this will not cause an indent.

decrIndent

protected void decrIndent()
Decrements the indent level.

getIndentLevel

protected int getIndentLevel()
Returns the current indentation level. That is, the number of times incrIndent has been invoked minus the number of times decrIndent has been invoked.
Since:
1.3

indent

protected void indent()
               throws IOException
Does indentation. The number of spaces written out is indent level times the space to map mapping. If the current line is empty, this will not make it so that the current line is still considered empty.
Throws:
IOException - on any I/O error

write

protected void write(char ch)
              throws IOException
Writes out a character. This is implemented to invoke the write method that takes a char[].
Parameters:
a - char.
Throws:
IOException - on any I/O error

write

protected void write(String content)
              throws IOException
Writes out a string. This is implemented to invoke the write method that takes a char[].
Parameters:
a - String.
Throws:
IOException - on any I/O error

writeLineSeparator

protected void writeLineSeparator()
                           throws IOException
Writes the line separator. This invokes output directly as well as setting the lineLength to 0.
Since:
1.3

write

protected void write(char[] chars,
                     int startIndex,
                     int length)
              throws IOException
All write methods call into this one. If getCanWrapLines() returns false, this will call output with each sequence of chars that doesn't contain a NEWLINE, followed by a call to writeLineSeparator. On the other hand, if getCanWrapLines() returns true, this will split the string, as necessary, so getLineLength is honored. The only exception is if the current string contains no whitespace, and won't fit in which case the line length will exceed getLineLength.
Since:
1.3

writeAttributes

protected void writeAttributes(AttributeSet attr)
                        throws IOException
Writes out the set of attributes as " =" pairs. It throws an IOException when encountered.
Parameters:
an - AttributeSet.
Throws:
IOException - on any I/O error

output

protected void output(char[] content,
                      int start,
                      int length)
               throws IOException
The last stop in writing out content. All the write methods eventually make it to this method, which invokes write on the Writer.

This method also updates the line length based on length. If this is invoked to output a newline, the current line length will need to be reset as will no longer be valid. If it is up to the caller to do this. Use writeLineSeparator to write out a newline, which will property update the current line length.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessibleJTextComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class JTextComponent.AccessibleJTextComponent

java.lang.Object
  |
  +--javax.accessibility.AccessibleContext
        |
        +--java.awt.Component.AccessibleAWTComponent
              |
              +--java.awt.Container.AccessibleAWTContainer
                    |
                    +--javax.swing.JComponent.AccessibleJComponent
                          |
                          +--javax.swing.text.JTextComponent.AccessibleJTextComponent
All Implemented Interfaces:
AccessibleComponent, AccessibleText, CaretListener, DocumentListener, EventListener, Serializable
Direct Known Subclasses:
JEditorPane.AccessibleJEditorPane, JTextArea.AccessibleJTextArea, JTextField.AccessibleJTextField
Enclosing class:
JTextComponent
public class JTextComponent.AccessibleJTextComponent
extends JComponent.AccessibleJComponent
implements AccessibleText, CaretListener, DocumentListener

This class implements accessibility support for the JTextComponent class. It provides an implementation of the Java Accessibility API appropriate to menu user-interface elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Inner classes inherited from class java.awt.Container.AccessibleAWTContainer
Container.AccessibleAWTContainer.AccessibleContainerHandler
Inner classes inherited from class java.awt.Component.AccessibleAWTComponent
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
Fields inherited from class java.awt.Component.AccessibleAWTComponent
accessibleAWTComponentHandler, accessibleAWTFocusHandler
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
Constructor Summary
JTextComponent.AccessibleJTextComponent()
Constructs an AccessibleJTextComponent.
Method Summary
void | caretUpdate(CaretEvent e) Handles caret updates (fire appropriate property change event, which are AccessibleContext.ACCESSIBLE_CARET_PROPERTY and AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY).
void | changedUpdate(DocumentEvent e) Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
AccessibleRole | getAccessibleRole() Gets the role of this object.
AccessibleStateSet | getAccessibleStateSet() Gets the state set of the JTextComponent.
AccessibleText | getAccessibleText() Get the AccessibleText associated with this object.
String | getAfterIndex(int part, int index) Returns the String after a given index.
String | getAtIndex(int part, int index) Returns the String at a given index.
String | getBeforeIndex(int part, int index) Returns the String before a given index.
int | getCaretPosition() Returns the zero-based offset of the caret.
AttributeSet | getCharacterAttribute(int i) Returns the AttributeSet for a given character (at a given index).
Rectangle | getCharacterBounds(int i) Determines the bounding box of the character at the given index into the string.
int | getCharCount() Returns the number of characters (valid indicies)
int | getIndexAtPoint(Point p) Given a point in local coordinates, return the zero-based index of the character under that Point.
String | getSelectedText() Returns the portion of the text that is selected.
int | getSelectionEnd() Returns the end offset within the selected text.
int | getSelectionStart() Returns the start offset within the selected text.
void | insertUpdate(DocumentEvent e) Handles document insert (fire appropriate property change event which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
void | removeUpdate(DocumentEvent e) Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY).
Methods inherited from class javax.swing.JComponent.AccessibleJComponent
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleName, getBorderTitle, removePropertyChangeListener
Methods inherited from class java.awt.Container.AccessibleAWTContainer
getAccessibleAt
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTextComponent.AccessibleJTextComponent

public JTextComponent.AccessibleJTextComponent()
Constructs an AccessibleJTextComponent. Adds a listener to track caret change.
Method Detail

caretUpdate

public void caretUpdate(CaretEvent e)
Handles caret updates (fire appropriate property change event, which are AccessibleContext.ACCESSIBLE_CARET_PROPERTY and AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY). This keeps track of the dot position internally. When the caret moves, the internal position is updated after firing the event.
Specified by:
caretUpdate in interface CaretListener
Parameters:
e - the CaretEvent

insertUpdate

public void insertUpdate(DocumentEvent e)
Handles document insert (fire appropriate property change event which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY). This tracks the changed offset via the event.
Specified by:
insertUpdate in interface DocumentListener
Parameters:
e - the DocumentEvent

removeUpdate

public void removeUpdate(DocumentEvent e)
Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY). This tracks the changed offset via the event.
Specified by:
removeUpdate in interface DocumentListener
Parameters:
e - the DocumentEvent

changedUpdate

public void changedUpdate(DocumentEvent e)
Handles document remove (fire appropriate property change event, which is AccessibleContext.ACCESSIBLE_TEXT_PROPERTY). This tracks the changed offset via the event.
Specified by:
changedUpdate in interface DocumentListener
Parameters:
e - the DocumentEvent

getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()
Gets the state set of the JTextComponent. The AccessibleStateSet of an object is composed of a set of unique AccessibleState's. A change in the AccessibleStateSet of an object will cause a PropertyChangeEvent to be fired for the AccessibleContext.ACCESSIBLE_STATE_PROPERTY property.
Overrides:
getAccessibleStateSet in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStateSet, AccessibleState, JComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)

getAccessibleRole

public AccessibleRole getAccessibleRole()
Gets the role of this object.
Overrides:
getAccessibleRole in class JComponent.AccessibleJComponent
Returns:
an instance of AccessibleRole describing the role of the object (AccessibleRole.TEXT)
See Also:
AccessibleRole

getAccessibleText

public AccessibleText getAccessibleText()
Get the AccessibleText associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleText interface on behalf of itself.
Overrides:
getAccessibleText in class AccessibleContext
Returns:
this object

getIndexAtPoint

public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index of the character under that Point. If the point is invalid, this method returns -1.
Specified by:
getIndexAtPoint in interface AccessibleText
Parameters:
p - the Point in local coordinates
Returns:
the zero-based index of the character under Point p.

getCharacterBounds

public Rectangle getCharacterBounds(int i)
Determines the bounding box of the character at the given index into the string. The bounds are returned in local coordinates. If the index is invalid a null rectangle is returned. Note: the JTextComponent must have a valid size (e.g. have been added to a parent container whose ancestor container is a valid top-level window) for this method to be able to return a meaningful (non-null) value.
Specified by:
getCharacterBounds in interface AccessibleText
Parameters:
i - the index into the String >= 0
Returns:
the screen coordinates of the character's bounding box

getCharCount

public int getCharCount()
Returns the number of characters (valid indicies)
Specified by:
getCharCount in interface AccessibleText
Returns:
the number of characters >= 0

getCaretPosition

public int getCaretPosition()
Returns the zero-based offset of the caret. Note: The character to the right of the caret will have the same index value as the offset (the caret is between two characters).
Specified by:
getCaretPosition in interface AccessibleText
Returns:
the zero-based offset of the caret.

getCharacterAttribute

public AttributeSet getCharacterAttribute(int i)
Returns the AttributeSet for a given character (at a given index).
Specified by:
getCharacterAttribute in interface AccessibleText
Parameters:
i - the zero-based index into the text
Returns:
the AttributeSet of the character

getSelectionStart

public int getSelectionStart()
Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.
Specified by:
getSelectionStart in interface AccessibleText
Returns:
the index into the text of the start of the selection >= 0

getSelectionEnd

public int getSelectionEnd()
Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.
Specified by:
getSelectionEnd in interface AccessibleText
Returns:
the index into teh text of the end of the selection >= 0

getSelectedText

public String getSelectedText()
Returns the portion of the text that is selected.
Specified by:
getSelectedText in interface AccessibleText
Returns:
the text, null if no selection

getAtIndex

public String getAtIndex(int part,
                         int index)
Returns the String at a given index.
Specified by:
getAtIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getAfterIndex

public String getAfterIndex(int part,
                            int index)
Returns the String after a given index.
Specified by:
getAfterIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part

getBeforeIndex

public String getBeforeIndex(int part,
                             int index)
Returns the String before a given index.
Specified by:
getBeforeIndex in interface AccessibleText
Parameters:
part - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve
index - an index within the text >= 0
Returns:
the letter, word, or sentence, null for an invalid index or part
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AlignmentAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.AlignmentAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.AlignmentAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.AlignmentAction
extends StyledEditorKit.StyledTextAction

An action to set paragraph alignment. This sets the StyleConstants.Alignment attribute for the currently selected range of the target JEditorPane. This is done by calling StyledDocument.setParagraphAttributes on the styled document associated with the target JEditorPane.

If the target text component is specified as the source of the ActionEvent and there is a command string, the command string will be interpreted as an integer that should be one of the legal values for the StyleConstants.Alignment attribute.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.AlignmentAction(String nm, int a)
Creates a new AlignmentAction.
Method Summary
 void actionPerformed(ActionEvent e)
Sets the alignment.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.AlignmentAction

public StyledEditorKit.AlignmentAction(String nm,
                                       int a)
Creates a new AlignmentAction.
Parameters:
nm - the action name
a - the alignment >= 0
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Sets the alignment.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AsyncBoxView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AsyncBoxView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.AsyncBoxView
All Implemented Interfaces:
SwingConstants
public class AsyncBoxView
extends View

A box that does layout asynchronously. This is useful to keep the GUI event thread moving by not doing any layout on it. The layout is done on a granularity of operations on the child views. After each child view is accessed for some part of layout (a potentially time consuming operation) the remaining tasks can be abandoned or a new higher priority task (i.e. to service a synchronous request or a visible area) can be taken on.

While the child view is being accessed a read lock is aquired on the associated document so that the model is stable while being accessed.

Since:
1.3

Inner Class Summary
class | AsyncBoxView.ChildLocator A class to manage the effective position of the child views in a localized area while changes are being made around the localized area.
class | AsyncBoxView.ChildState A record representing the layout state of a child view.
Field Summary
protected  AsyncBoxView.ChildLocator locator
Object that manages the offsets of the children.
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
AsyncBoxView(Element elem, int axis)
Construct a box view that does asynchronous layout.
Method Summary
protected AsyncBoxView.ChildState | createChildState(View v) New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more
protected void | flushRequirementChanges() Publish the changes in preferences upward to the parent view.
float | getBottomInset() Get the bottom part of the margin around the view.
Shape | getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
protected AsyncBoxView.ChildState | getChildState(int index) Fetch the object representing the layout state of of the child at the given index.
protected LayoutQueue | getLayoutQueue() Fetch the queue to use for layout.
float | getLeftInset() Get the left part of the margin around the view.
int | getMajorAxis() Fetch the major axis (the axis the children are tiled along).
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
int | getMinorAxis() Fetch the minor axis (the axis orthoginal to the tiled axis).
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
float | getRightInset() Get the right part of the margin around the view.
float | getTopInset() Get the top part of the margin around the view.
View | getView(int n) Gets the nth child view.
int | getViewCount() Returns the number of views in this view.
int | getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
protected int | getViewIndexAtPosition(int pos, Position.Bias b) Fetches the child view index representing the given position in the model.
protected void | loadChildren(ViewFactory f) Loads all of the children to initialize the view.
protected void | majorRequirementChange(AsyncBoxView.ChildState cs, float delta) Requirements changed along the major axis.
protected void | minorRequirementChange(AsyncBoxView.ChildState cs) Requirements changed along the minor axis.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | paint(Graphics g, Shape alloc) Render the view using the given allocation and rendering surface.
void | preferenceChanged(View child, boolean width, boolean height) Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
void | replace(int offset, int length, View[] views) Calls the superclass to update the child views, and updates the status records for the children.
void | setBottomInset(float i) Set the bottom part of the margin around the view.
void | setLeftInset(float i) Set the left part of the margin around the view.
void | setParent(View parent) Sets the parent of the view.
void | setRightInset(float i) Set the right part of the margin around the view.
void | setSize(float width, float height) Sets the size of the view.
void | setTopInset(float i) Set the top part of the margin around the view.
protected void | updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
int | viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, modelToView, remove, removeAll, removeUpdate, updateChildren, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

locator

protected AsyncBoxView.ChildLocator locator
Object that manages the offsets of the children. All locking for management of child locations is on this object.
Constructor Detail

AsyncBoxView

public AsyncBoxView(Element elem,
                    int axis)
Construct a box view that does asynchronous layout.
Parameters:
elem - the element of the model to represent
axis - the axis to tile along. This can be either X_AXIS or Y_AXIS.
Method Detail

getMajorAxis

public int getMajorAxis()
Fetch the major axis (the axis the children are tiled along). This will have a value of either X_AXIS or Y_AXIS.

getMinorAxis

public int getMinorAxis()
Fetch the minor axis (the axis orthoginal to the tiled axis). This will have a value of either X_AXIS or Y_AXIS.

getTopInset

public float getTopInset()
Get the top part of the margin around the view.

setTopInset

public void setTopInset(float i)
Set the top part of the margin around the view.
Parameters:
i - the value of the inset

getBottomInset

public float getBottomInset()
Get the bottom part of the margin around the view.

setBottomInset

public void setBottomInset(float i)
Set the bottom part of the margin around the view.
Parameters:
i - the value of the inset

getLeftInset

public float getLeftInset()
Get the left part of the margin around the view.

setLeftInset

public void setLeftInset(float i)
Set the left part of the margin around the view.
Parameters:
i - the value of the inset

getRightInset

public float getRightInset()
Get the right part of the margin around the view.

setRightInset

public void setRightInset(float i)
Set the right part of the margin around the view.
Parameters:
i - the value of the inset

getChildState

protected AsyncBoxView.ChildState getChildState(int index)
Fetch the object representing the layout state of of the child at the given index.
Parameters:
index - the child index. This should be a value >= 0 and

getLayoutQueue

protected LayoutQueue getLayoutQueue()
Fetch the queue to use for layout.

createChildState

protected AsyncBoxView.ChildState createChildState(View v)
New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more

majorRequirementChange

protected void majorRequirementChange(AsyncBoxView.ChildState cs,
                                      float delta)
Requirements changed along the major axis. This is called by the thread doing layout for the given ChildState object when it has completed fetching the child views new preferences. Typically this would be the layout thread, but might be the GUI thread if it is trying to update something immediately (such as to perform a model/view translation).

minorRequirementChange

protected void minorRequirementChange(AsyncBoxView.ChildState cs)
Requirements changed along the minor axis. This is called by the thread doing layout for the given ChildState object when it has completed fetching the child views new preferences. Typically this would be the layout thread, but might be the GUI thread if it is trying to update something immediately (such as to perform a model/view translation).

flushRequirementChanges

protected void flushRequirementChanges()
Publish the changes in preferences upward to the parent view. This is called by the layout thread.

replace

public void replace(int offset,
                    int length,
                    View[] views)
Calls the superclass to update the child views, and updates the status records for the children. This is expected to be called while a write lock is held on the model so that interaction with the layout thread will not happen (i.e. the layout thread acquires a read lock before doing anything).
Overrides:
replace in class View
Parameters:
offset - the starting offset into the child views >= 0
length - the number of existing views to replace >= 0
views - the child views to insert

loadChildren

protected void loadChildren(ViewFactory f)
Loads all of the children to initialize the view. This is called by the setParent method. Subclasses can reimplement this to initialize their child views in a different manner. The default implementation creates a child view for each child element.

Normally a write-lock is held on the Document while the children are being changed, which keeps the rendering and layout threads safe. The exception to this is when the view is initialized to represent an existing element (via this method), so it is synchronized to exclude preferenceChanged while we are initializing.

Parameters:
f - the view factory
See Also:
setParent(javax.swing.text.View)

getViewIndexAtPosition

protected int getViewIndexAtPosition(int pos,
                                     Position.Bias b)
Fetches the child view index representing the given position in the model. This is implemented to fetch the view in the case where there is a child view for each child element.
Parameters:
pos - the position >= 0

updateLayout

protected void updateLayout(DocumentEvent.ElementChange ec,
                            DocumentEvent e,
                            Shape a)
Update the layout in response to receiving notification of change from the model. This is implemented to note the change on the ChildLocator so that offsets of the children will be correctly computed.
Overrides:
updateLayout in class View
Parameters:
ec - changes to the element this view is responsible for (may be null if there were no changes).
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

setParent

public void setParent(View parent)
Sets the parent of the view. This is reimplemented to provide the superclass behavior as well as calling the loadChildren method if this view does not already have children. The children should not be loaded in the constructor because the act of setting the parent may cause them to try to search up the hierarchy (to get the hosting Container for example). If this view has children (the view is being moved from one place in the view hierarchy to another), the loadChildren method will not be called.
Overrides:
setParent in class View
Parameters:
parent - the parent of the view, null if none

preferenceChanged

public void preferenceChanged(View child,
                              boolean width,
                              boolean height)
Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout. This is reimplemented to queue new work on the layout thread. This method gets messaged from multiple threads via the children.
Overrides:
preferenceChanged in class View
Parameters:
child - the child view
width - true if the width preference has changed
height - true if the height preference has changed
See Also:
JComponent.revalidate()

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. This should cause layout of the view, if it has any layout duties.

This is implemented to check and see if there has been a change in the minor span (since the view is flexible along the minor axis). If there has been a change, this will add a high priorty task on the layout thread that will mark all of the ChildState records as needing to resize the child, and to spawn a bunch of low priority tasks to fixup the children.

This method will normally be called by the GUI event thread, which we don't want to slow down in any way if we can help it. Pushing the potentially time consuming task of marking each record frees the GUI thread, but also leaves the view open to paint attempts that can't be satisfied. The view is marked as resizing and the ResizeTask will turn off the flag when the children have all been marked.

Overrides:
setSize in class View
Parameters:
width - the width >= 0
height - the height >= 0

paint

public void paint(Graphics g,
                  Shape alloc)
Render the view using the given allocation and rendering surface.

This is implemented to determine whether or not the desired region to be rendered (i.e. the unclipped area) is up to date or not. If up-to-date the children are rendered. If not up-to-date, a task to build the desired area is placed on the layout queue as a high priority task. This keeps by event thread moving by rendering if ready, and postponing until a later time if not ready (since paint requests can be rescheduled).

Overrides:
paint in class View
Parameters:
g - the rendering surface to use
alloc - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis.
Overrides:
getMinimumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis.
Overrides:
getMaximumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

getViewCount

public int getViewCount()
Returns the number of views in this view. Since the default is to not be a composite view this returns 0.
Overrides:
getViewCount in class View
Returns:
the number of views >= 0
See Also:
View.getViewCount()

getView

public View getView(int n)
Gets the nth child view. Since there are no children by default, this returns null.
Overrides:
getView in class View
Parameters:
n - the number of the view to get, >= 0 && Returns:
the view

getChildAllocation

public Shape getChildAllocation(int index,
                                Shape a)
Fetches the allocation for the given child view. This enables finding out where various views are located, without assuming the views store their location. This returns null since the default is to not have any child views.
Overrides:
getChildAllocation in class View
Parameters:
index - the index of the child, >= 0 && a - the allocation to this view.
Returns:
the allocation to the child

getViewIndex

public int getViewIndex(int pos,
                        Position.Bias b)
Returns the child view index representing the given position in the model. By default a view has no children so this is implemented to return -1 to indicate there is no valid child index for any position.
Overrides:
getViewIndex in class View
Parameters:
pos - the position >= 0
Returns:
index of the view representing the given position, or -1 if no view represents that position
Since:
1.3

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views.
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
IllegalArgumentException - for an invalid bias argument
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

This is expected to be called by the GUI thread, holding a read-lock on the associated model. It is implemented to locate the child view and determine it's allocation with a lock on the ChildLocator object, and to call viewToModel on the child view with a lock on the ChildState object to avoid interaction with the layout thread.

Overrides:
viewToModel in class View
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeContext

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AbstractDocument.AttributeContext

All Known Implementing Classes:
StyleContext
Enclosing class:
AbstractDocument
public static interface AbstractDocument.AttributeContext

An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques. Each mutation of the attribute set can be used to exchange a previous AttributeSet instance with another, preserving the possibility of the AttributeSet remaining immutable. An implementation is provided by the StyleContext class. The Element implementations provided by this class use this interface to provide their MutableAttributeSet implementations, so that different AttributeSet compression techniques can be employed. The method getAttributeContext should be implemented to return the object responsible for implementing the desired compression technique.

See Also:
StyleContext

Method Summary
AttributeSet | addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | getEmptySet() Fetches an empty AttributeSet.
void | reclaim(AttributeSet a) Reclaims an attribute set.
AttributeSet | removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
AttributeSet | removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.

Method Detail

addAttribute

public AttributeSet addAttribute(AttributeSet old,
                                 Object name,
                                 Object value)
Adds an attribute to the given set, and returns the new representative set.
Parameters:
old - the old attribute set
name - the non-null attribute name
value - the attribute value
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public AttributeSet addAttributes(AttributeSet old,
                                  AttributeSet attr)
Adds a set of attributes to the element.
Parameters:
old - the old attribute set
attr - the attributes to add
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public AttributeSet removeAttribute(AttributeSet old,
                                    Object name)
Removes an attribute from the set.
Parameters:
old - the old attribute set
name - the non-null attribute name
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     Enumeration names)
Removes a set of attributes for the element.
Parameters:
old - the old attribute set
names - the attribute names
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     AttributeSet attrs)
Removes a set of attributes for the element.
Parameters:
old - the old attribute set
attrs - the attributes
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

getEmptySet

public AttributeSet getEmptySet()
Fetches an empty AttributeSet.
Returns:
the attribute set

reclaim

public void reclaim(AttributeSet a)
Reclaims an attribute set. This is a way for a MutableAttributeSet to mark that it no longer need a particular immutable set. This is only necessary in 1.1 where there are no weak references. A 1.1 implementation would call this in its finalize method.
Parameters:
a - the attribute set to reclaim
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AttributeSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AttributeSet

All Known Subinterfaces:
MutableAttributeSet, Style
All Known Implementing Classes:
StyleContext.SmallAttributeSet
public interface AttributeSet

A collection of unique attributes. This is a read-only, immutable interface. An attribute is basically a key and a value assigned to the key. The collection may represent something like a style run, a logical style, etc. These are generally used to describe features that will contribute to some graphical representation such as a font. The set of possible keys is unbounded and can be anything. Typically View implementations will respond to attribute definitions and render something to represent the attributes.

Attributes can potentially resolve in a hierarchy. If a key doesn't resolve locally, and a resolving parent exists, the key will be resolved through the parent.

See Also:
MutableAttributeSet

Inner Class Summary
static interface | AttributeSet.CharacterAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation.
static interface | AttributeSet.ColorAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color.
static interface | AttributeSet.FontAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text.
static interface | AttributeSet.ParagraphAttribute This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation.
Field Summary
static Object | NameAttribute Attribute name used to name the collection of attributes.
static Object | ResolveAttribute Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
Method Summary
boolean | containsAttribute(Object name, Object value) Returns true if this set contains this attribute with an equal value.
boolean | containsAttributes(AttributeSet attributes) Returns true if this set contains all the attributes with equal values.
AttributeSet | copyAttributes() Returns an attribute set that is guaranteed not to change over time.
Object | getAttribute(Object key) Fetches the value of the given attribute.
int | getAttributeCount() Returns the number of attributes contained in this set.
Enumeration | getAttributeNames() Returns an enumeration over the names of the attributes in the set.
AttributeSet | getResolveParent() Gets the resolving parent.
boolean | isDefined(Object attrName) Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
boolean | isEqual(AttributeSet attr) Determines if the two attribute sets are equivalent.

Field Detail

NameAttribute

public static final Object NameAttribute
Attribute name used to name the collection of attributes.

ResolveAttribute

public static final Object ResolveAttribute
Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
Method Detail

getAttributeCount

public int getAttributeCount()
Returns the number of attributes contained in this set.
Returns:
the number of attributes >= 0

isDefined

public boolean isDefined(Object attrName)
Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
Parameters:
attrName - the attribute name
Returns:
true if the attribute has a value specified

isEqual

public boolean isEqual(AttributeSet attr)
Determines if the two attribute sets are equivalent.
Parameters:
attr - an attribute set
Returns:
true if the sets are equivalent

copyAttributes

public AttributeSet copyAttributes()
Returns an attribute set that is guaranteed not to change over time.
Returns:
a copy of the attribute set

getAttribute

public Object getAttribute(Object key)
Fetches the value of the given attribute. If the value is not found locally, the search is continued upward through the resolving parent (if one exists) until the value is either found or there are no more parents. If the value is not found, null is returned.
Parameters:
key - the non-null key of the attribute binding
Returns:
the value

getAttributeNames

public Enumeration getAttributeNames()
Returns an enumeration over the names of the attributes in the set. The elements of the enumeration are all Strings. The set does not include the resolving parent, if one is defined.
Returns:
the names

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Returns true if this set contains this attribute with an equal value.
Parameters:
name - the non-null attribute name
value - the value
Returns:
true if the set contains the attribute with an equal value

containsAttributes

public boolean containsAttributes(AttributeSet attributes)
Returns true if this set contains all the attributes with equal values.
Parameters:
attributes - the set of attributes to check against
Returns:
true if this set contains all the attributes with equal values

getResolveParent

public AttributeSet getResolveParent()
Gets the resolving parent.
Returns:
the parent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeUndoableEdit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultStyledDocument.AttributeUndoableEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
All Implemented Interfaces:
Serializable, UndoableEdit
Enclosing class:
DefaultStyledDocument
public static class DefaultStyledDocument.AttributeUndoableEdit
extends AbstractUndoableEdit

An UndoableEdit used to remember AttributeSet changes to an Element.

See Also:
Serialized Form

Field Summary
protected AttributeSet | copy
protected Element | element
protected boolean | isReplacing
protected AttributeSet | newAttributes
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
DefaultStyledDocument.AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)
Method Summary
void | redo() Redoes a change.
void | undo() Undoes a change.
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

newAttributes

protected AttributeSet newAttributes

copy

protected AttributeSet copy

isReplacing

protected boolean isReplacing

element

protected Element element
Constructor Detail

DefaultStyledDocument.AttributeUndoableEdit

public DefaultStyledDocument.AttributeUndoableEdit(Element element,
                                                   AttributeSet newAttributes,
                                                   boolean isReplacing)
Method Detail

redo

public void redo()
          throws CannotRedoException
Redoes a change.
Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException - if the change cannot be redone

undo

public void undo()
          throws CannotUndoException
Undoes a change.
Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException - if the change cannot be undone
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BadLocationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class BadLocationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.swing.text.BadLocationException
All Implemented Interfaces:
Serializable
public class BadLocationException
extends Exception

This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
BadLocationException(String s, int offs)
Creates a new BadLocationException object.
Method Summary
 int offsetRequested()
Returns the offset into the document that was not legal.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BadLocationException

public BadLocationException(String s,
                            int offs)
Creates a new BadLocationException object.
Parameters:
s - a string indicating what was wrong with the arguments
offs - offset within the document that was requested >= 0
Method Detail

offsetRequested

public int offsetRequested()
Returns the offset into the document that was not legal.
Returns:
the offset >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BeepAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.BeepAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.BeepAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.BeepAction
extends TextAction

Creates a beep.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.beepAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.BeepAction()
Create this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.BeepAction

public DefaultEditorKit.BeepAction()
Create this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bias

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class Position.Bias

java.lang.Object
  |
  +--javax.swing.text.Position.Bias
Enclosing class:
Position
public static final class Position.Bias
extends Object

A typesafe enumeration to indicate bias to a position in the model. A position indicates a location between two characters. The bias can be used to indicate an interest toward one of the two sides of the position in boundary conditions where a simple offset is ambiguous.

Field Summary
static Position.Bias | Backward Indicates a bias toward the previous character in the model.
static Position.Bias | Forward Indicates to bias toward the next character in the model.
Method Summary
 String toString()
string representation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

Forward

public static final Position.Bias Forward
Indicates to bias toward the next character in the model.

Backward

public static final Position.Bias Backward
Indicates a bias toward the previous character in the model.
Method Detail

toString

public String toString()
string representation
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoldAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.BoldAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.BoldAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.BoldAction
extends StyledEditorKit.StyledTextAction

An action to toggle the bold attribute.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.BoldAction()
Constructs a new BoldAction.
Method Summary
 void actionPerformed(ActionEvent e)
Toggles the bold attribute.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.BoldAction

public StyledEditorKit.BoldAction()
Constructs a new BoldAction.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Toggles the bold attribute.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoxView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class BoxView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
BlockView, FlowView, TableView, TableView.TableCell, TableView.TableRow, WrappedPlainView, ZoneView
public class BoxView
extends CompositeView

A view that arranges its children into a box shape by tiling it's children along an axis. The box is somewhat like that found in TeX where there is alignment of the children, flexibility of the children is considered, etc. This is considered an useful building block that might be useful to represent things like a collection of lines, paragraphs, lists, columns, pages, etc.

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
BoxView(Element elem, int axis)
Constructs a BoxView.
Method Summary
protected void | baselineLayout(int targetSpan, int axis, int[] offsets, int[] spans)
protected SizeRequirements | baselineRequirements(int axis, SizeRequirements r)
protected SizeRequirements | calculateMajorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r)
protected void | childAllocation(int index, Rectangle alloc) Allocates a region for a child view.
protected boolean | flipEastAndWestAtEnds(int position, Position.Bias bias) Subclasses may wish to subclass this and conditionally return true based on the position.
protected void | forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
int | getAxis() Fetch the axis property.
Shape | getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
int | getHeight() The current height of the box.
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
protected int | getOffset(int axis, int childIndex) Fetch the offset of a particular childs current layout
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
int | getResizeWeight(int axis) Gets the resize weight.
protected int | getSpan(int axis, int childIndex) Fetch the span of a particular childs current layout
protected View | getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
int | getWidth() The current width of the box.
protected boolean | isAfter(int x, int y, Rectangle innerAlloc) Determines if a point falls after an allocated region.
protected boolean | isAllocationValid() Are the allocations for the children still valid?
protected boolean | isBefore(int x, int y, Rectangle innerAlloc) Determines if a point falls before an allocated region.
protected void | layout(int width, int height) Performs layout of the children.
void | layoutChanged(int axis) Invalidate the layout along an axis.
protected void | layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the major axis of the box (i.e.
protected void | layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the minor axis of the box (i.e.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
protected void | paintChild(Graphics g, Rectangle alloc, int index) Paints a child.
void | preferenceChanged(View child, boolean width, boolean height) This is called by a child to indicated its preferred span has changed.
void | replace(int index, int length, View[] elems) Invalidates the layout and resizes the cache of requests/allocations.
void | setAxis(int axis) Set the axis property.
void | setSize(float width, float height) Sets the size of the view.
int | viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BoxView

public BoxView(Element elem,
               int axis)
Constructs a BoxView.
Parameters:
elem - the element this view is responsible for
axis - either View.X_AXIS or View.Y_AXIS
Method Detail

getAxis

public int getAxis()
Fetch the axis property.
Returns:
the major axis of the box, either View.X_AXIS or View.Y_AXIS.

setAxis

public void setAxis(int axis)
Set the axis property.
Parameters:
axis - either View.X_AXIS or View.Y_AXIS

layoutChanged

public void layoutChanged(int axis)
Invalidate the layout along an axis. This happens automatically if the preferences have changed for any of the child views. In some cases the layout may need to be recalculated when the preferences have not changed. The layout can be marked as invalid by calling this method. The layout will be updated the next time the setSize method is called on this view (typically in paint).
Parameters:
axis - either View.X_AXIS or View.Y_AXIS

paintChild

protected void paintChild(Graphics g,
                          Rectangle alloc,
                          int index)
Paints a child. By default that is all it does, but a subclass can use this to paint things relative to the child.
Parameters:
g - the graphics context
alloc - the allocated region to paint into
index - the child index, >= 0 &&

replace

public void replace(int index,
                    int length,
                    View[] elems)
Invalidates the layout and resizes the cache of requests/allocations. The child allocations can still be accessed for the old layout, but the new children will have an offset and span of 0.
Overrides:
replace in class CompositeView
Parameters:
index - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount.length - the number of existing child views to remove. This should be a value >= 0 and <= (getViewCount()="(getViewCount()" -="-" offset).views - the child views to add. This value can be null to indicate no children are being added (useful to remove).

forwardUpdate

protected void forwardUpdate(DocumentEvent.ElementChange ec,
                             DocumentEvent e,
                             Shape a,
                             ViewFactory f)
Forward the given DocumentEvent to the child views that need to be notified of the change to the model. If a child changed it's requirements and the allocation was valid prior to forwarding the portion of the box from the starting child to the end of the box will be repainted.
Overrides:
forwardUpdate in class View
Parameters:
ec - changes to the element this view is responsible for (may be null if there were no changes).
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

preferenceChanged

public void preferenceChanged(View child,
                              boolean width,
                              boolean height)
This is called by a child to indicated its preferred span has changed. This is implemented to throw away cached layout information so that new calculations will be done the next time the children need an allocation.
Overrides:
preferenceChanged in class View
Parameters:
child - the child view
width - true if the width preference should change
height - true if the height preference should change

getResizeWeight

public int getResizeWeight(int axis)
Gets the resize weight. A value of 0 or less is not resizable.
Overrides:
getResizeWeight in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Returns:
the weight
Throws:
IllegalArgumentException - for an invalid axis

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. If the size has changed, layout is redone. The size is the full size of the view including the inset areas.
Overrides:
setSize in class View
Parameters:
width - the width >= 0
height - the height >= 0

paint

public void paint(Graphics g,
                  Shape allocation)
Renders using the given rendering surface and area on that surface. Only the children that intersect the clip bounds of the given Graphics will be rendered.
Overrides:
paint in class View
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getChildAllocation

public Shape getChildAllocation(int index,
                                Shape a)
Fetches the allocation for the given child view. This enables finding out where various views are located. This is implemented to return null if the layout is invalid, otherwise the superclass behavior is executed.
Overrides:
getChildAllocation in class CompositeView
Parameters:
index - the index of the child, >= 0 && a - the allocation to this view.
Returns:
the allocation to the child

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. This makes sure the allocation is valid before letting the superclass do its thing.
Overrides:
modelToView in class CompositeView
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class CompositeView
Parameters:
x - x coordinate of the view location to convert >= 0
y - y coordinate of the view location to convert >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. This is implemented to give the total alignment needed to position the children with the alignment points lined up along the axis orthoginal to the axis that is being tiled. The axis being tiled will request to be centered (i.e. 0.5f).
Overrides:
getAlignment in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis.
Overrides:
getMinimumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis.
Overrides:
getMaximumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis type

isAllocationValid

protected boolean isAllocationValid()
Are the allocations for the children still valid?
Returns:
true if allocations still valid

isBefore

protected boolean isBefore(int x,
                           int y,
                           Rectangle innerAlloc)
Determines if a point falls before an allocated region.
Overrides:
isBefore in class CompositeView
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
innerAlloc - the allocated region. This is the area inside of the insets.
Returns:
true if the point lies before the region else false

isAfter

protected boolean isAfter(int x,
                          int y,
                          Rectangle innerAlloc)
Determines if a point falls after an allocated region.
Overrides:
isAfter in class CompositeView
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
innerAlloc - the allocated region. This is the area inside of the insets.
Returns:
true if the point lies after the region else false

getViewAtPoint

protected View getViewAtPoint(int x,
                              int y,
                              Rectangle alloc)
Fetches the child view at the given point.
Overrides:
getViewAtPoint in class CompositeView
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
alloc - the parents inner allocation on entry, which should be changed to the childs allocation on exit.
Returns:
the view

childAllocation

protected void childAllocation(int index,
                               Rectangle alloc)
Allocates a region for a child view.
Overrides:
childAllocation in class CompositeView
Parameters:
index - the index of the child view to allocate, >= 0 && alloc - the allocated region

layout

protected void layout(int width,
                      int height)
Performs layout of the children. The size is the area inside of the insets. This method calls the methods layoutMajorAxis and layoutMinorAxis as needed. To change how layout is done those methods should be reimplemented.
Parameters:
width - the width >= 0
height - the height >= 0

getWidth

public int getWidth()
The current width of the box. This is the width that it was last allocated.

getHeight

public int getHeight()
The current height of the box. This is the height that it was last allocated.

layoutMajorAxis

protected void layoutMajorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the major axis of the box (i.e. the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the major axis.
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis.
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

calculateMajorAxisRequirements

protected SizeRequirements calculateMajorAxisRequirements(int axis,
                                                          SizeRequirements r)

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)

baselineLayout

protected void baselineLayout(int targetSpan,
                              int axis,
                              int[] offsets,
                              int[] spans)

baselineRequirements

protected SizeRequirements baselineRequirements(int axis,
                                                SizeRequirements r)

getOffset

protected int getOffset(int axis,
                        int childIndex)
Fetch the offset of a particular childs current layout

getSpan

protected int getSpan(int axis,
                      int childIndex)
Fetch the span of a particular childs current layout

flipEastAndWestAtEnds

protected boolean flipEastAndWestAtEnds(int position,
                                        Position.Bias bias)
Description copied from class: CompositeView
Subclasses may wish to subclass this and conditionally return true based on the position. A return value of true indicates that when a View returns -1 from getNextVisualPositionFrom the next view for east should be the current index offset by -1, and for west it means offset by 1. The normal direction (for left to right text) is to offset east by 1 and west by -1.
Overrides:
flipEastAndWestAtEnds in class CompositeView
Following copied from class: javax.swing.text.CompositeView
Returns:
false
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BranchElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument.BranchElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.BranchElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Direct Known Subclasses:
DefaultStyledDocument.SectionElement, HTMLDocument.BlockElement
Enclosing class:
AbstractDocument
public class AbstractDocument.BranchElement
extends AbstractDocument.AbstractElement

Implements a composite element that contains other elements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
AbstractDocument.BranchElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
Method Summary
Enumeration | children() Returns the children of the reciever as an Enumeration.
boolean | getAllowsChildren() Returns true if the receiver allows children.
Element | getElement(int index) Gets a child element.
int | getElementCount() Gets the number of children for the element.
int | getElementIndex(int offset) Gets the child element index closest to the given model offset.
int | getEndOffset() Gets the ending offset in the model for the element.
String | getName() Gets the element name.
int | getStartOffset() Gets the starting offset in the model for the element.
boolean | isLeaf() Checks whether the element is a leaf.
Element | positionToElement(int pos) Gets the child element that contains the given model position.
void | replace(int offset, int length, Element[] elems) Replaces content with a new set of elements.
String | toString() Converts the element to a string.
Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractDocument.BranchElement

public AbstractDocument.BranchElement(Element parent,
                                      AttributeSet a)
Constructs a composite element that initially contains no children.
Parameters:
parent - The parent element
a - the attributes for the element
Method Detail

positionToElement

public Element positionToElement(int pos)
Gets the child element that contains the given model position.
Parameters:
pos - the position >= 0
Returns:
the element, null if none

replace

public void replace(int offset,
                    int length,
                    Element[] elems)
Replaces content with a new set of elements.
Parameters:
offset - the starting offset >= 0
length - the length to replace >= 0
elems - the new elements

toString

public String toString()
Converts the element to a string.
Overrides:
toString in class Object
Returns:
the string

getName

public String getName()
Gets the element name.
Overrides:
getName in class AbstractDocument.AbstractElement
Returns:
the element name

getStartOffset

public int getStartOffset()
Gets the starting offset in the model for the element.
Overrides:
getStartOffset in class AbstractDocument.AbstractElement
Returns:
the offset >= 0

getEndOffset

public int getEndOffset()
Gets the ending offset in the model for the element.
Overrides:
getEndOffset in class AbstractDocument.AbstractElement
Returns:
the offset >= 0

getElement

public Element getElement(int index)
Gets a child element.
Overrides:
getElement in class AbstractDocument.AbstractElement
Parameters:
index - the child index, >= 0 && Returns:
the child element, null if none

getElementCount

public int getElementCount()
Gets the number of children for the element.
Overrides:
getElementCount in class AbstractDocument.AbstractElement
Returns:
the number of children >= 0

getElementIndex

public int getElementIndex(int offset)
Gets the child element index closest to the given model offset.
Overrides:
getElementIndex in class AbstractDocument.AbstractElement
Parameters:
offset - the offset >= 0
Returns:
the element index >= 0

isLeaf

public boolean isLeaf()
Checks whether the element is a leaf.
Overrides:
isLeaf in class AbstractDocument.AbstractElement
Returns:
true if a leaf

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children.
Overrides:
getAllowsChildren in class AbstractDocument.AbstractElement

children

public Enumeration children()
Returns the children of the reciever as an Enumeration.
Overrides:
children in class AbstractDocument.AbstractElement
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Caret

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Caret

All Known Implementing Classes:
DefaultCaret
public interface Caret

A place within a document view that represents where things can be inserted into the document model. A caret has a position in the document referred to as a dot. The dot is where the caret is currently located in the model. There is a second position maintained by the caret that represents the other end of a selection called mark. If there is no selection the dot and mark will be equal. If a selection exists, the two values will be different.

The dot can be placed by either calling setDot or moveDot. Setting the dot has the effect of removing any selection that may have previously existed. The dot and mark will be equal. Moving the dot has the effect of creating a selection as the mark is left at whatever position it previously had.

Method Summary
void | addChangeListener(ChangeListener l) Adds a listener to track whenever the caret position has been changed.
void | deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
int | getBlinkRate() Gets the blink rate of the caret.
int | getDot() Fetches the current position of the caret.
Point | getMagicCaretPosition() Gets the current caret visual location.
int | getMark() Fetches the current position of the mark.
void | install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
boolean | isSelectionVisible() Determines if the selection is currently visible.
boolean | isVisible() Determines if the caret is currently visible.
void | moveDot(int dot) Moves the caret position (dot) to some other position, leaving behind the mark.
void | paint(Graphics g) Renders the caret.
void | removeChangeListener(ChangeListener l) Removes a listener that was tracking caret position changes.
void | setBlinkRate(int rate) Sets the blink rate of the caret.
void | setDot(int dot) Sets the caret position to some position.
void | setMagicCaretPosition(Point p) Set the current caret visual location.
void | setSelectionVisible(boolean v) Sets the visibility of the selection
void | setVisible(boolean v) Sets the visibility of the caret.

Method Detail

install

public void install(JTextComponent c)
Called when the UI is being installed into the interface of a JTextComponent. This can be used to gain access to the model that is being navigated by the implementation of this interface.
Parameters:
c - the JTextComponent

deinstall

public void deinstall(JTextComponent c)
Called when the UI is being removed from the interface of a JTextComponent. This is used to unregister any listeners that were attached.
Parameters:
c - the JTextComponent

paint

public void paint(Graphics g)
Renders the caret.
Parameters:
g - the graphics context

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener to track whenever the caret position has been changed.
Parameters:
l - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a listener that was tracking caret position changes.
Parameters:
l - the change listener

isVisible

public boolean isVisible()
Determines if the caret is currently visible.
Returns:
true if the caret is visible else false

setVisible

public void setVisible(boolean v)
Sets the visibility of the caret.
Parameters:
v - true if the caret should be shown, and false if the caret should be hidden

isSelectionVisible

public boolean isSelectionVisible()
Determines if the selection is currently visible.
Returns:
true if the caret is visible else false

setSelectionVisible

public void setSelectionVisible(boolean v)
Sets the visibility of the selection
Parameters:
v - true if the caret should be shown, and false if the caret should be hidden

setMagicCaretPosition

public void setMagicCaretPosition(Point p)
Set the current caret visual location. This can be used when moving between lines that have uneven end positions (such as when caret up or down actions occur). If text flows left-to-right or right-to-left the x-coordinate will indicate the desired navigation location for vertical movement. If the text flow is top-to-bottom, the y-coordinate will indicate the desired navigation location for horizontal movement.
Parameters:
p - the Point to use for the saved position. This can be null to indicate there is no visual location.

getMagicCaretPosition

public Point getMagicCaretPosition()
Gets the current caret visual location.
Returns:
the visual position.
See Also:
setMagicCaretPosition(java.awt.Point)

setBlinkRate

public void setBlinkRate(int rate)
Sets the blink rate of the caret. This determines if and how fast the caret blinks, commonly used as one way to attract attention to the caret.
Parameters:
rate - the delay in milliseconds >= 0. If this is zero the caret will not blink.

getBlinkRate

public int getBlinkRate()
Gets the blink rate of the caret. This determines if and how fast the caret blinks, commonly used as one way to attract attention to the caret.

getDot

public int getDot()
Fetches the current position of the caret.
Returns:
the position >= 0

getMark

public int getMark()
Fetches the current position of the mark. If there is a selection, the mark will not be the same as the dot.
Returns:
the position >= 0

setDot

public void setDot(int dot)
Sets the caret position to some position. This causes the mark to become the same as the dot, effectively setting the selection range to zero.
Parameters:
dot - the new position to set the caret to >= 0

moveDot

public void moveDot(int dot)
Moves the caret position (dot) to some other position, leaving behind the mark. This is useful for making selections.
Parameters:
dot - the new position to move the caret to >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChangedCharSetException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class ChangedCharSetException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--javax.swing.text.ChangedCharSetException
All Implemented Interfaces:
Serializable
public class ChangedCharSetException
extends IOException

ChangedCharSetException as the name indicates is an exception thrown when the charset is changed.

See Also:
Serialized Form

Constructor Summary
ChangedCharSetException(String charSetSpec, boolean charSetKey)
Method Summary
String | getCharSetSpec()
boolean | keyEqualsCharSet()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ChangedCharSetException

public ChangedCharSetException(String charSetSpec,
                               boolean charSetKey)
Method Detail

getCharSetSpec

public String getCharSetSpec()

keyEqualsCharSet

public boolean keyEqualsCharSet()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CharacterConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleConstants.CharacterConstants

java.lang.Object
  |
  +--javax.swing.text.StyleConstants
        |
        +--javax.swing.text.StyleConstants.CharacterConstants
All Implemented Interfaces:
AttributeSet.CharacterAttribute
Enclosing class:
StyleConstants
public static class StyleConstants.CharacterConstants
extends StyleConstants
implements AttributeSet.CharacterAttribute

This is a typesafe enumeration of the well-known attributes that contribute to a character style. These are aliased by the outer class for general presentation.

Inner classes inherited from class javax.swing.text.StyleConstants
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants
Field Summary
static Object | Background Name of the background color attribute.
static Object | BidiLevel Bidirectional level of a character as assigned by the Unicode bidi algorithm.
static Object | Bold Name of the bold attribute.
static Object | ComponentAttribute Name of the component attribute.
static Object | Family Name of the font family.
static Object | Foreground Name of the foreground color attribute.
static Object | IconAttribute Name of the icon attribute.
static Object | Italic Name of the italic attribute.
static Object | Size Name of the font size.
static Object | StrikeThrough Name of the strikethrough attribute.
static Object | Subscript Name of the subscript attribute.
static Object | Superscript Name of the superscript attribute.
static Object | Underline Name of the underline attribute.
Fields inherited from class javax.swing.text.StyleConstants
ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_LEFT, ALIGN_RIGHT, Alignment, ComponentElementName, ComposedTextAttribute, FirstLineIndent, FontFamily, FontSize, IconElementName, LeftIndent, LineSpacing, ModelAttribute, NameAttribute, Orientation, ResolveAttribute, RightIndent, SpaceAbove, SpaceBelow, TabSet
Methods inherited from class javax.swing.text.StyleConstants
getAlignment, getBackground, getBidiLevel, getComponent, getFirstLineIndent, getFontFamily, getFontSize, getForeground, getIcon, getLeftIndent, getLineSpacing, getRightIndent, getSpaceAbove, getSpaceBelow, getTabSet, isBold, isItalic, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setAlignment, setBackground, setBidiLevel, setBold, setComponent, setFirstLineIndent, setFontFamily, setFontSize, setForeground, setIcon, setItalic, setLeftIndent, setLineSpacing, setRightIndent, setSpaceAbove, setSpaceBelow, setStrikeThrough, setSubscript, setSuperscript, setTabSet, setUnderline, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

Underline

public static final Object Underline
Name of the underline attribute.

StrikeThrough

public static final Object StrikeThrough
Name of the strikethrough attribute.

Superscript

public static final Object Superscript
Name of the superscript attribute.

Subscript

public static final Object Subscript
Name of the subscript attribute.

ComponentAttribute

public static final Object ComponentAttribute
Name of the component attribute.

IconAttribute

public static final Object IconAttribute
Name of the icon attribute.

BidiLevel

public static final Object BidiLevel
Bidirectional level of a character as assigned by the Unicode bidi algorithm.

Family

public static final Object Family
Name of the font family.

Size

public static final Object Size
Name of the font size.

Bold

public static final Object Bold
Name of the bold attribute.

Italic

public static final Object Italic
Name of the italic attribute.

Foreground

public static final Object Foreground
Name of the foreground color attribute.

Background

public static final Object Background
Name of the background color attribute.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChildLocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AsyncBoxView.ChildLocator

java.lang.Object
  |
  +--javax.swing.text.AsyncBoxView.ChildLocator
Enclosing class:
AsyncBoxView
public class AsyncBoxView.ChildLocator
extends Object

A class to manage the effective position of the child views in a localized area while changes are being made around the localized area. The AsyncBoxView may be continuously changing, but the visible area needs to remain fairly stable until the layout thread decides to publish an update to the parent.

Field Summary
protected Rectangle | childAlloc A shape to use for the child allocation to avoid creating a lot of garbage.
protected Rectangle | lastAlloc The last seen allocation (for repainting when changes are flushed upward).
protected AsyncBoxView.ChildState | lastValidOffset The location of the last offset calculation that is valid.
Constructor Summary
AsyncBoxView.ChildLocator()
construct a child locator.
Method Summary
void | childChanged(AsyncBoxView.ChildState cs) Notification that a child changed.
protected Shape | getChildAllocation(int index) Fetch the allocation to use for a child view.
Shape | getChildAllocation(int index, Shape a) Fetch the allocation to use for a child view.
int | getViewIndexAtPoint(float x, float y, Shape a) Fetches the child view index at the given point.
protected int | getViewIndexAtVisualOffset(float targetOffset) Locate the view responsible for an offset into the box along the major axis.
void | paintChildren(Graphics g) Paint the children that intersect the clip area.
protected void | setAllocation(Shape a) Copy the currently allocated shape into the Rectangle used to store the current allocation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lastValidOffset

protected AsyncBoxView.ChildState lastValidOffset
The location of the last offset calculation that is valid.

lastAlloc

protected Rectangle lastAlloc
The last seen allocation (for repainting when changes are flushed upward).

childAlloc

protected Rectangle childAlloc
A shape to use for the child allocation to avoid creating a lot of garbage.
Constructor Detail

AsyncBoxView.ChildLocator

public AsyncBoxView.ChildLocator()
construct a child locator.
Method Detail

childChanged

public void childChanged(AsyncBoxView.ChildState cs)
Notification that a child changed. This can effect whether or not new offset calculations are needed. This is called by a ChildState object that has changed it's major span. This can therefore be called by multiple threads.

paintChildren

public void paintChildren(Graphics g)
Paint the children that intersect the clip area.

getChildAllocation

public Shape getChildAllocation(int index,
                                Shape a)
Fetch the allocation to use for a child view. This will update the offsets for all children not yet updated before the given index.

getViewIndexAtPoint

public int getViewIndexAtPoint(float x,
                               float y,
                               Shape a)
Fetches the child view index at the given point. This is called by the various View methods that need to calculate which child to forward a message to. This should be called by a block synchronized on this object, and would typically be followed with one or more calls to getChildAllocation that should also be in the synchronized block.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocation to the View
Returns:
the nearest child index

getChildAllocation

protected Shape getChildAllocation(int index)
Fetch the allocation to use for a child view. This does not update the offsets in the ChildState records.

setAllocation

protected void setAllocation(Shape a)
Copy the currently allocated shape into the Rectangle used to store the current allocation. This would be a floating point rectangle in a Java2D-specific implmentation.

getViewIndexAtVisualOffset

protected int getViewIndexAtVisualOffset(float targetOffset)
Locate the view responsible for an offset into the box along the major axis. Make sure that offsets are set on the ChildState objects up to the given target span past the desired offset.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChildState

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AsyncBoxView.ChildState

java.lang.Object
  |
  +--javax.swing.text.AsyncBoxView.ChildState
All Implemented Interfaces:
Runnable
Enclosing class:
AsyncBoxView
public class AsyncBoxView.ChildState
extends Object
implements Runnable

A record representing the layout state of a child view. It is runnable as a task on another thread. All access to the child view that is based upon a read-lock on the model should synchronize on this object (i.e. The layout thread and the GUI thread can both have a read lock on the model at the same time and are not protected from each other). Access to a child view hierarchy is serialized via synchronization on the ChildState instance.

Constructor Summary
AsyncBoxView.ChildState(View v)
Construct a child status.
Method Summary
View | getChildView() Fetch the child view this record represents
float | getMajorOffset() Get the offset along the major axis
float | getMajorSpan() What is the span along the major axis.
float | getMinorOffset() What is the offset along the minor axis
float | getMinorSpan() What is the span along the minor axis.
boolean | isLayoutValid() Has the child view been laid out.
void | preferenceChanged(boolean width, boolean height) Mark preferences changed for this child.
void | run() Update the child state.
void | setMajorOffset(float offs) This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AsyncBoxView.ChildState

public AsyncBoxView.ChildState(View v)
Construct a child status. This needs to start out as fairly large so we don't falsely begin with the idea that all of the children are visible.
Method Detail

getChildView

public View getChildView()
Fetch the child view this record represents

run

public void run()
Update the child state. This should be called by the thread that desires to spend time updating the child state (intended to be the layout thread).

This aquires a read lock on the associated document for the duration of the update to ensure the model is not changed while it is operating. The first thing to do would be to see if any work actually needs to be done. The following could have conceivably happened while the state was waiting to be updated:

  1. The child may have been removed from the view hierarchy.
  2. The child may have been updated by a higher priority operation (i.e. the child may have become visible).
Specified by:
run in interface Runnable
Following copied from interface: java.lang.Runnable
See Also:
Thread.run()

getMinorSpan

public float getMinorSpan()
What is the span along the minor axis.

getMinorOffset

public float getMinorOffset()
What is the offset along the minor axis

getMajorSpan

public float getMajorSpan()
What is the span along the major axis.

getMajorOffset

public float getMajorOffset()
Get the offset along the major axis

setMajorOffset

public void setMajorOffset(float offs)
This method should only be called by the ChildLocator, it is simply a convenient place to hold the cached location.

preferenceChanged

public void preferenceChanged(boolean width,
                              boolean height)
Mark preferences changed for this child.
Parameters:
width - true if the width preference has changed
height - true if the height preference has changed
See Also:
JComponent.revalidate()

isLayoutValid

public boolean isLayoutValid()
Has the child view been laid out.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.text.AbstractDocument.ElementEdit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument.ElementEdit

No usage of javax.swing.text.AbstractDocument.ElementEdit

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.BeepAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.BeepAction

No usage of javax.swing.text.DefaultEditorKit.BeepAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.CopyAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.CopyAction

No usage of javax.swing.text.DefaultEditorKit.CopyAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.CutAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.CutAction

No usage of javax.swing.text.DefaultEditorKit.CutAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction

No usage of javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.InsertBreakAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.InsertBreakAction

No usage of javax.swing.text.DefaultEditorKit.InsertBreakAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.InsertContentAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.InsertContentAction

No usage of javax.swing.text.DefaultEditorKit.InsertContentAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.InsertTabAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.InsertTabAction

No usage of javax.swing.text.DefaultEditorKit.InsertTabAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit.PasteAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit.PasteAction

No usage of javax.swing.text.DefaultEditorKit.PasteAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter

No usage of javax.swing.text.DefaultHighlighter.DefaultHighlightPainter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit

No usage of javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultStyledDocument.SectionElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultStyledDocument.SectionElement

No usage of javax.swing.text.DefaultStyledDocument.SectionElement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultTextUI

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultTextUI

No usage of javax.swing.text.DefaultTextUI

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.GapContent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.GapContent

No usage of javax.swing.text.GapContent

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.IconView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.IconView

No usage of javax.swing.text.IconView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.PasswordView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.PasswordView

No usage of javax.swing.text.PasswordView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.PlainDocument

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.PlainDocument

No usage of javax.swing.text.PlainDocument

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StringContent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StringContent

No usage of javax.swing.text.StringContent

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleConstants.CharacterConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleConstants.CharacterConstants

No usage of javax.swing.text.StyleConstants.CharacterConstants

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleConstants.ColorConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleConstants.ColorConstants

No usage of javax.swing.text.StyleConstants.ColorConstants

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleConstants.FontConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleConstants.FontConstants

No usage of javax.swing.text.StyleConstants.FontConstants

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleConstants.ParagraphConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleConstants.ParagraphConstants

No usage of javax.swing.text.StyleConstants.ParagraphConstants

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleContext.NamedStyle

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleContext.NamedStyle

No usage of javax.swing.text.StyleContext.NamedStyle

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.AlignmentAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.AlignmentAction

No usage of javax.swing.text.StyledEditorKit.AlignmentAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.BoldAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.BoldAction

No usage of javax.swing.text.StyledEditorKit.BoldAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.FontFamilyAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.FontFamilyAction

No usage of javax.swing.text.StyledEditorKit.FontFamilyAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.FontSizeAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.FontSizeAction

No usage of javax.swing.text.StyledEditorKit.FontSizeAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.ForegroundAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.ForegroundAction

No usage of javax.swing.text.StyledEditorKit.ForegroundAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.ItalicAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.ItalicAction

No usage of javax.swing.text.StyledEditorKit.ItalicAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.UnderlineAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.UnderlineAction

No usage of javax.swing.text.StyledEditorKit.UnderlineAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.Utilities

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.Utilities

No usage of javax.swing.text.Utilities

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.WrappedPlainView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.WrappedPlainView

No usage of javax.swing.text.WrappedPlainView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.ZoneView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.ZoneView

No usage of javax.swing.text.ZoneView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractDocument

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument

Packages that use AbstractDocument
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument in javax.swing.text

Subclasses of AbstractDocument in javax.swing.text
class | DefaultStyledDocument A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
class | PlainDocument A plain document that maintains no character attributes.

Constructors in javax.swing.text with parameters of type AbstractDocument
AbstractDocument.AbstractElement(Element parent, AttributeSet a)
Creates a new AbstractElement.
AbstractDocument.BranchElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
AbstractDocument.DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
Constructs a change record.

Uses of AbstractDocument in javax.swing.text.html

Subclasses of AbstractDocument in javax.swing.text.html
 class HTMLDocument
A document that models HTML.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractDocument.AbstractElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument.AbstractElement

Packages that use AbstractDocument.AbstractElement
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.AbstractElement in javax.swing.text

Subclasses of AbstractDocument.AbstractElement in javax.swing.text
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...

Methods in javax.swing.text that return AbstractDocument.AbstractElement
protected AbstractDocument.AbstractElement | PlainDocument.createDefaultRoot() Creates the root element to be used to represent the default document structure.
protected AbstractDocument.AbstractElement | DefaultStyledDocument.createDefaultRoot() Creates the root element to be used to represent the default document structure.

Uses of AbstractDocument.AbstractElement in javax.swing.text.html

Subclasses of AbstractDocument.AbstractElement in javax.swing.text.html
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Methods in javax.swing.text.html that return AbstractDocument.AbstractElement
protected  AbstractDocument.AbstractElement HTMLDocument.createDefaultRoot()
Creates the root element to be used to represent the default document structure.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractDocument.BranchElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument.BranchElement

Packages that use AbstractDocument.BranchElement
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.BranchElement in javax.swing.text

Subclasses of AbstractDocument.BranchElement in javax.swing.text
protected  class DefaultStyledDocument.SectionElement
Default root element for a document...

Uses of AbstractDocument.BranchElement in javax.swing.text.html

Subclasses of AbstractDocument.BranchElement in javax.swing.text.html
 class HTMLDocument.BlockElement
An element that represents a structural block of HTML.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractDocument.DefaultDocumentEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument.DefaultDocumentEvent

Packages that use AbstractDocument.DefaultDocumentEvent
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.DefaultDocumentEvent in javax.swing.text

Methods in javax.swing.text with parameters of type AbstractDocument.DefaultDocumentEvent
protected void | AbstractDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected void | AbstractDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
protected void | AbstractDocument.postRemoveUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
protected void | PlainDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected void | PlainDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
protected void | DefaultStyledDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected void | DefaultStyledDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates document structure as a result of text removal.
void | DefaultStyledDocument.ElementBuffer.insert(int offset, int length, DefaultStyledDocument.ElementSpec[] data, AbstractDocument.DefaultDocumentEvent de) Inserts new content.
void | DefaultStyledDocument.ElementBuffer.remove(int offset, int length, AbstractDocument.DefaultDocumentEvent de) Removes content.
void | DefaultStyledDocument.ElementBuffer.change(int offset, int length, AbstractDocument.DefaultDocumentEvent de) Changes content.

Uses of AbstractDocument.DefaultDocumentEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type AbstractDocument.DefaultDocumentEvent
protected  void HTMLDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
Updates document structure as a result of text insertion.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractDocument.LeafElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractDocument.LeafElement

Packages that use AbstractDocument.LeafElement
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.LeafElement in javax.swing.text.html

Subclasses of AbstractDocument.LeafElement in javax.swing.text.html
 class HTMLDocument.RunElement
An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AbstractWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AbstractWriter

Packages that use AbstractWriter
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractWriter in javax.swing.text.html

Subclasses of AbstractWriter in javax.swing.text.html
class | HTMLWriter This is a writer for HTMLDocuments.
class | MinimalHTMLWriter MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AsyncBoxView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AsyncBoxView

Packages that use AsyncBoxView
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AsyncBoxView in javax.swing.text

Constructors in javax.swing.text with parameters of type AsyncBoxView
AsyncBoxView.ChildLocator()
construct a child locator.
AsyncBoxView.ChildState(View v)
Construct a child status.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AsyncBoxView.ChildLocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AsyncBoxView.ChildLocator

Packages that use AsyncBoxView.ChildLocator
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AsyncBoxView.ChildLocator in javax.swing.text

Fields in javax.swing.text declared as AsyncBoxView.ChildLocator
protected  AsyncBoxView.ChildLocator AsyncBoxView.locator
Object that manages the offsets of the children.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.AsyncBoxView.ChildState

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.AsyncBoxView.ChildState

Packages that use AsyncBoxView.ChildState
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AsyncBoxView.ChildState in javax.swing.text

Fields in javax.swing.text declared as AsyncBoxView.ChildState
protected  AsyncBoxView.ChildState AsyncBoxView.ChildLocator.lastValidOffset
The location of the last offset calculation that is valid.

Methods in javax.swing.text that return AsyncBoxView.ChildState
protected AsyncBoxView.ChildState | AsyncBoxView.getChildState(int index) Fetch the object representing the layout state of of the child at the given index.
protected AsyncBoxView.ChildState | AsyncBoxView.createChildState(View v) New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more

Methods in javax.swing.text with parameters of type AsyncBoxView.ChildState
protected void | AsyncBoxView.majorRequirementChange(AsyncBoxView.ChildState cs, float delta) Requirements changed along the major axis.
protected void | AsyncBoxView.minorRequirementChange(AsyncBoxView.ChildState cs) Requirements changed along the minor axis.
void | AsyncBoxView.ChildLocator.childChanged(AsyncBoxView.ChildState cs) Notification that a child changed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.BadLocationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.BadLocationException

Packages that use BadLocationException
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of BadLocationException in javax.swing

Methods in javax.swing that throw BadLocationException
 String JPasswordField.getText(int offs, int len)
Deprecated. As of Java 2 platform v1.2, replaced by getPassword().
 int JTextArea.getLineOfOffset(int offset)
Translates an offset into the components text to a line number.
 int JTextArea.getLineStartOffset(int line)
Determines the offset of the start of the given line.
 int JTextArea.getLineEndOffset(int line)
Determines the offset of the end of the given line.

Uses of BadLocationException in javax.swing.plaf

Methods in javax.swing.plaf that throw BadLocationException
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos) Converts the given location in the model to a place in the view coordinate system.
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
abstract int | TextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.

Uses of BadLocationException in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that throw BadLocationException
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos) Converts the given location in the model to a place in the view coordinate system.
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | BasicTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.

Uses of BadLocationException in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that throw BadLocationException
Rectangle | MultiTextUI.modelToView(JTextComponent a, int b) Call modelToView on each UI handled by this MultiUI.
Rectangle | MultiTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | MultiTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.

Uses of BadLocationException in javax.swing.text

Methods in javax.swing.text that throw BadLocationException
String | JTextComponent.getText(int offs, int len) Fetches a portion of the text represented by the component.
Rectangle | JTextComponent.modelToView(int pos) Converts the given location in the model to a place in the view coordinate system.
int | View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract Shape | View.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int pos, Shape a) Deprecated.
Shape | CompositeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
protected int | CompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
protected int | CompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
void | Document.remove(int offs, int len) Removes a portion of the content of the document.
void | Document.insertString(int offset, String str, AttributeSet a) Inserts a string of content.
String | Document.getText(int offset, int length) Fetches the text contained within the given portion of the document.
void | Document.getText(int offset, int length, Segment txt) Fetches the text contained within the given portion of the document.
Position | Document.createPosition(int offs) This method allows an application to mark a place in a sequence of character content.
Shape | GlyphView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | GlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract void | EditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
abstract void | EditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
Object | Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
void | Highlighter.changeHighlight(Object tag, int p0, int p1) Changes the given highlight to span a different portion of the document.
Shape | BoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
protected int | ParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Overriden from CompositeView.
protected int | ParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position to x.
protected abstract void | AbstractWriter.write() This abstract method needs to be implemented by subclasses.
protected String | AbstractWriter.getText(Element elem) Returns the text associated with the element.
protected void | AbstractWriter.text(Element elem) Writes out text.
protected int | PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
Shape | PlainView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | FieldView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | DefaultEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream, which will be treated as plain text.
void | DefaultEditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream as plain text.
void | AbstractDocument.remove(int offs, int len) Removes some content from the document.
void | AbstractDocument.insertString(int offs, String str, AttributeSet a) Inserts some content into the document.
String | AbstractDocument.getText(int offset, int length) Gets a sequence of text from the document.
void | AbstractDocument.getText(int offset, int length, Segment txt) Gets some text from the document potentially without making a copy.
Position | AbstractDocument.createPosition(int offs) Returns a position that will track change as the document is altered.
Position | AbstractDocument.Content.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
UndoableEdit | AbstractDocument.Content.insertString(int where, String str) Inserts a string of characters into the sequence.
UndoableEdit | AbstractDocument.Content.remove(int where, int nitems) Removes some portion of the sequence.
String | AbstractDocument.Content.getString(int where, int len) Fetches a string of characters contained in the sequence.
void | AbstractDocument.Content.getChars(int where, int len, Segment txt) Gets a sequence of characters and copies them into a Segment.
Object | DefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
void | DefaultHighlighter.changeHighlight(Object tag, int p0, int p1) Changes a highlight.
UndoableEdit | StringContent.insertString(int where, String str) Inserts a string into the content.
UndoableEdit | StringContent.remove(int where, int nitems) Removes part of the content.
String | StringContent.getString(int where, int len) Retrieves a portion of the content.
void | StringContent.getChars(int where, int len, Segment chars) Retrieves a portion of the content.
Position | StringContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
protected int | PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
Shape | PasswordView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract Shape | GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
Shape | AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
UndoableEdit | GapContent.insertString(int where, String str) Inserts a string into the content.
UndoableEdit | GapContent.remove(int where, int nitems) Removes part of the content.
String | GapContent.getString(int where, int len) Retrieves a portion of the content.
void | GapContent.getChars(int where, int len, Segment chars) Retrieves a portion of the content.
Position | GapContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
Shape | ComponentView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.
Shape | IconView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
protected int | WrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected int | WrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
static int | Utilities.getRowStart(JTextComponent c, int offs) Determines the starting row model position of the row that contains the specified model position.
static int | Utilities.getRowEnd(JTextComponent c, int offs) Determines the ending row model position of the row that contains the specified model position.
static int | Utilities.getPositionAbove(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row above.
static int | Utilities.getPositionBelow(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row below.
static int | Utilities.getWordStart(JTextComponent c, int offs) Determines the start of a word for the given model location.
static int | Utilities.getWordEnd(JTextComponent c, int offs) Determines the end of a word for the given location.
static int | Utilities.getNextWord(JTextComponent c, int offs) Determines the start of the next word for the given location.
static int | Utilities.getPreviousWord(JTextComponent c, int offs) Determine the start of the prev word for the given location.
protected void | DefaultStyledDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.

Uses of BadLocationException in javax.swing.text.html

Methods in javax.swing.text.html that throw BadLocationException
protected void | HTMLDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.
void | HTMLDocument.setInnerHTML(Element elem, String htmlText) Replaces the children of the given element with the contents specified as an HTML string.
void | HTMLDocument.setOuterHTML(Element elem, String htmlText) Replaces the given element in the parent with the contents specified as an HTML string.
void | HTMLDocument.insertAfterStart(Element elem, String htmlText) Inserts the HTML specified as a string at the start of the element.
void | HTMLDocument.insertBeforeEnd(Element elem, String htmlText) Inserts the HTML specified as a string at the end of the element.
void | HTMLDocument.insertBeforeStart(Element elem, String htmlText) Inserts the HTML specified as string before the start of the given element.
void | HTMLDocument.insertAfterEnd(Element elem, String htmlText) Inserts the HTML specified as a string after the the end of the given element.
void | HTMLEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream.
void | HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.
void | HTMLEditorKit.write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
void | HTMLEditorKit.ParserCallback.flush()
void | HTMLDocument.HTMLReader.flush() The last method called on the reader.
void | HTMLWriter.write() Iterates over the Element tree and controls the writing out of all the tags and its attributes.
protected void | HTMLWriter.emptyTag(Element elem) Writes out all empty elements (all tags that have no corresponding end tag).
protected void | HTMLWriter.startTag(Element elem) Writes out a start tag for the element.
protected void | HTMLWriter.textAreaContent(AttributeSet attr) Writes out text that is contained in a TEXTAREA form element.
protected void | HTMLWriter.text(Element elem) Writes out text.
protected void | HTMLWriter.comment(Element elem) Writes out comments.
void | MinimalHTMLWriter.write() Generates HTML output from a StyledDocument.
protected void | MinimalHTMLWriter.text(Element elem) Writes out text.
protected void | MinimalHTMLWriter.writeBody() Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
protected void | MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting) Writes out the attribute set in an HTML-compliant manner.

Uses of BadLocationException in javax.swing.text.rtf

Methods in javax.swing.text.rtf that throw BadLocationException
void | RTFEditorKit.read(InputStream in, Document doc, int pos) Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | RTFEditorKit.write(OutputStream out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
void | RTFEditorKit.read(Reader in, Document doc, int pos) Insert content from the given stream, which will be treated as plain text.
void | RTFEditorKit.write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream as plain text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.BoxView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.BoxView

Packages that use BoxView
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of BoxView in javax.swing.text

Subclasses of BoxView in javax.swing.text
class | FlowView A View that tries to flow it's children into some partially constrained space.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | TableView Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
class | ZoneView ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Uses of BoxView in javax.swing.text.html

Subclasses of BoxView in javax.swing.text.html
class | BlockView A view implementation to display a block (as a box) with CSS specifications.
class | ListView A view implementation to display an html list

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.ChangedCharSetException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.ChangedCharSetException

Packages that use ChangedCharSetException
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of ChangedCharSetException in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that throw ChangedCharSetException
protected void | Parser.handleEmptyTag(TagElement tag) Called when an empty tag is encountered.
protected void | Parser.startTag(TagElement tag) Handle a start tag.
protected void | DocumentParser.handleEmptyTag(TagElement tag) Handle Empty Tag.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.ComponentView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.ComponentView

Packages that use ComponentView
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of ComponentView in javax.swing.text.html

Subclasses of ComponentView in javax.swing.text.html
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
class | ObjectView Component decorator that implements the view interface for <object> elements.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.CompositeView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.CompositeView

Packages that use CompositeView
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of CompositeView in javax.swing.text

Subclasses of CompositeView in javax.swing.text
class | BoxView A view that arranges its children into a box shape by tiling it's children along an axis.
class | FlowView A View that tries to flow it's children into some partially constrained space.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | TableView Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
class | ZoneView ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Uses of CompositeView in javax.swing.text.html

Subclasses of CompositeView in javax.swing.text.html
class | BlockView A view implementation to display a block (as a box) with CSS specifications.
class | ListView A view implementation to display an html list

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultCaret

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultCaret

Packages that use DefaultCaret
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of DefaultCaret in javax.swing.plaf.basic

Subclasses of DefaultCaret in javax.swing.plaf.basic
static class BasicTextUI.BasicCaret

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultEditorKit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultEditorKit

Packages that use DefaultEditorKit
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of DefaultEditorKit in javax.swing.text

Subclasses of DefaultEditorKit in javax.swing.text
 class StyledEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.

Uses of DefaultEditorKit in javax.swing.text.html

Subclasses of DefaultEditorKit in javax.swing.text.html
 class HTMLEditorKit
The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.

Uses of DefaultEditorKit in javax.swing.text.rtf

Subclasses of DefaultEditorKit in javax.swing.text.rtf
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultHighlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultHighlighter

Packages that use DefaultHighlighter
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel.

Uses of DefaultHighlighter in javax.swing.plaf.basic

Subclasses of DefaultHighlighter in javax.swing.plaf.basic
static class BasicTextUI.BasicHighlighter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultStyledDocument

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultStyledDocument

Packages that use DefaultStyledDocument
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of DefaultStyledDocument in javax.swing.text

Constructors in javax.swing.text with parameters of type DefaultStyledDocument
DefaultStyledDocument.SectionElement()
Creates a new SectionElement.
DefaultStyledDocument.ElementBuffer(Element root)
Creates a new ElementBuffer.

Uses of DefaultStyledDocument in javax.swing.text.html

Subclasses of DefaultStyledDocument in javax.swing.text.html
 class HTMLDocument
A document that models HTML.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultStyledDocument.ElementBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultStyledDocument.ElementBuffer

Packages that use DefaultStyledDocument.ElementBuffer
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of DefaultStyledDocument.ElementBuffer in javax.swing.text

Fields in javax.swing.text declared as DefaultStyledDocument.ElementBuffer
protected  DefaultStyledDocument.ElementBuffer DefaultStyledDocument.buffer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.DefaultStyledDocument.ElementSpec

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.DefaultStyledDocument.ElementSpec

Packages that use DefaultStyledDocument.ElementSpec
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of DefaultStyledDocument.ElementSpec in javax.swing.text

Methods in javax.swing.text with parameters of type DefaultStyledDocument.ElementSpec
protected void | DefaultStyledDocument.create(DefaultStyledDocument.ElementSpec[] data) Initialize the document to reflect the given element structure (i.e.
protected void | DefaultStyledDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.
void | DefaultStyledDocument.ElementBuffer.insert(int offset, int length, DefaultStyledDocument.ElementSpec[] data, AbstractDocument.DefaultDocumentEvent de) Inserts new content.
protected void | DefaultStyledDocument.ElementBuffer.insertUpdate(DefaultStyledDocument.ElementSpec[] data) Inserts an update into the document.

Uses of DefaultStyledDocument.ElementSpec in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type DefaultStyledDocument.ElementSpec
protected void | HTMLDocument.insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.
protected void | HTMLDocument.create(DefaultStyledDocument.ElementSpec[] data) Replaces the contents of the document with the given element specifications.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.EditorKit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.EditorKit

Packages that use EditorKit
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of EditorKit in javax.swing

Methods in javax.swing that return EditorKit
protected EditorKit | JEditorPane.createDefaultEditorKit() Creates the default editor kit (PlainEditorKit) for when the component is first created.
EditorKit | JEditorPane.getEditorKit() Fetches the currently installed kit for handling content.
EditorKit | JEditorPane.getEditorKitForContentType(String type) Fetches the editor kit to use for the given type of content.
static EditorKit | JEditorPane.createEditorKitForContentType(String type) Creates a handler for the given type from the default registry of editor kits.
protected EditorKit | JTextPane.createDefaultEditorKit() Creates the EditorKit to use by default.

Methods in javax.swing with parameters of type EditorKit
void | JEditorPane.setEditorKit(EditorKit kit) Sets the currently installed kit for handling content.
void | JEditorPane.setEditorKitForContentType(String type, EditorKit k) Directly sets the editor kit to use for the given type.
void | JTextPane.setEditorKit(EditorKit kit) Sets the currently installed kit for handling content.

Uses of EditorKit in javax.swing.plaf

Methods in javax.swing.plaf that return EditorKit
abstract  EditorKit TextUI.getEditorKit(JTextComponent t)
Fetches the binding of services that set a policy for the type of document being edited.

Uses of EditorKit in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return EditorKit
EditorKit | BasicTextUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
EditorKit | BasicEditorPaneUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
EditorKit | BasicTextPaneUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.

Uses of EditorKit in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return EditorKit
 EditorKit MultiTextUI.getEditorKit(JTextComponent a)
Call getEditorKit on each UI handled by this MultiUI.

Uses of EditorKit in javax.swing.text

Subclasses of EditorKit in javax.swing.text
class | DefaultEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.
class | StyledEditorKit This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document.

Uses of EditorKit in javax.swing.text.html

Subclasses of EditorKit in javax.swing.text.html
 class HTMLEditorKit
The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.

Uses of EditorKit in javax.swing.text.rtf

Subclasses of EditorKit in javax.swing.text.rtf
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.ElementIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.ElementIterator

Packages that use ElementIterator
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of ElementIterator in javax.swing.text

Methods in javax.swing.text that return ElementIterator
protected  ElementIterator AbstractWriter.getElementIterator()
Fetches the ElementIterator.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.FieldView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.FieldView

Packages that use FieldView
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FieldView in javax.swing.text

Subclasses of FieldView in javax.swing.text
 class PasswordView
Implements a View suitable for use in JPasswordField UI implementations.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.FlowView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.FlowView

Packages that use FlowView
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FlowView in javax.swing.text

Subclasses of FlowView in javax.swing.text
 class ParagraphView
View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.

Methods in javax.swing.text with parameters of type FlowView
void | FlowView.FlowStrategy.insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was removed from the document in a location that the given flow view is responsible for.
void | FlowView.FlowStrategy.changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected View | FlowView.FlowStrategy.getLogicalView(FlowView fv) This method gives flow strategies access to the logical view of the FlowView.
void | FlowView.FlowStrategy.layout(FlowView fv) Update the flow on the given FlowView.
protected int | FlowView.FlowStrategy.layoutRow(FlowView fv, int rowIndex, int pos) Creates a row of views that will fit within the layout span of the row.
protected void | FlowView.FlowStrategy.adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x) Adjusts the given row if possible to fit within the layout span.
protected View | FlowView.FlowStrategy.createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) Creates a view that can be used to represent the current piece of the flow.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.FlowView.FlowStrategy

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.FlowView.FlowStrategy

Packages that use FlowView.FlowStrategy
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of FlowView.FlowStrategy in javax.swing.text

Fields in javax.swing.text declared as FlowView.FlowStrategy
protected  FlowView.FlowStrategy FlowView.strategy
The behavior for keeping the flow updated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.GlyphView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.GlyphView

Packages that use GlyphView
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of GlyphView in javax.swing.text

Subclasses of GlyphView in javax.swing.text
 class LabelView
A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.

Methods in javax.swing.text with parameters of type GlyphView
abstract float | GlyphView.GlyphPainter.getSpan(GlyphView v, int p0, int p1, TabExpander e, float x) Determine the span the glyphs given a start location (for tab expansion).
abstract float | GlyphView.GlyphPainter.getHeight(GlyphView v)
abstract float | GlyphView.GlyphPainter.getAscent(GlyphView v)
abstract float | GlyphView.GlyphPainter.getDescent(GlyphView v)
abstract void | GlyphView.GlyphPainter.paint(GlyphView v, Graphics g, Shape a, int p0, int p1) Paint the glyphs representing the given range.
abstract Shape | GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract int | GlyphView.GlyphPainter.viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract int | GlyphView.GlyphPainter.getBoundedPosition(GlyphView v, int p0, float x, float len) Determines the model location that represents the maximum advance that fits within the given span.
GlyphView.GlyphPainter | GlyphView.GlyphPainter.getPainter(GlyphView v, int p0, int p1) Create a painter to use for the given GlyphView.
int | GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.

Uses of GlyphView in javax.swing.text.html

Subclasses of GlyphView in javax.swing.text.html
 class InlineView
Displays the inline element styles based upon css attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.GlyphView.GlyphPainter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.GlyphView.GlyphPainter

Packages that use GlyphView.GlyphPainter
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of GlyphView.GlyphPainter in javax.swing.text

Methods in javax.swing.text that return GlyphView.GlyphPainter
GlyphView.GlyphPainter | GlyphView.getGlyphPainter() Fetch the currently installed glyph painter.
GlyphView.GlyphPainter | GlyphView.GlyphPainter.getPainter(GlyphView v, int p0, int p1) Create a painter to use for the given GlyphView.

Methods in javax.swing.text with parameters of type GlyphView.GlyphPainter
 void GlyphView.setGlyphPainter(GlyphView.GlyphPainter p)
Sets the painter to use for rendering glyphs.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.JTextComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.JTextComponent

Packages that use JTextComponent
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of JTextComponent in javax.swing

Subclasses of JTextComponent in javax.swing
class | JEditorPane A text component to edit various kinds of content.
class | JPasswordField JPasswordField is a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.
class | JTextArea A TextArea is a multi-line area that displays plain text.
class | JTextField JTextField is a lightweight component that allows the editing of a single line of text.
class | JTextPane A text component that can be marked up with attributes that are represented graphically.

Uses of JTextComponent in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type JTextComponent
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos) Converts the given location in the model to a place in the view coordinate system.
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
abstract int | TextUI.viewToModel(JTextComponent t, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
abstract int | TextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract int | TextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract void | TextUI.damageRange(JTextComponent t, int p0, int p1) Causes the portion of the view responsible for the given part of the model to be repainted.
abstract void | TextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.
abstract EditorKit | TextUI.getEditorKit(JTextComponent t) Fetches the binding of services that set a policy for the type of document being edited.
abstract View | TextUI.getRootView(JTextComponent t) Fetches a View with the allocation of the associated text component (i.e.

Uses of JTextComponent in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return JTextComponent
protected  JTextComponent BasicTextUI.getComponent()
Fetches the text component associated with this UI implementation.

Methods in javax.swing.plaf.basic with parameters of type JTextComponent
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos) Converts the given location in the model to a place in the view coordinate system.
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | BasicTextUI.viewToModel(JTextComponent tc, Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | BasicTextUI.viewToModel(JTextComponent tc, Point pt, Position.Bias[] biasReturn) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | BasicTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
void | BasicTextUI.damageRange(JTextComponent tc, int p0, int p1) Causes the portion of the view responsible for the given part of the model to be repainted.
void | BasicTextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias p0Bias, Position.Bias p1Bias) Causes the portion of the view responsible for the given part of the model to be repainted.
EditorKit | BasicTextUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
View | BasicTextUI.getRootView(JTextComponent tc) Fetches a View with the allocation of the associated text component (i.e.
EditorKit | BasicEditorPaneUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.
EditorKit | BasicTextPaneUI.getEditorKit(JTextComponent tc) Fetches the EditorKit for the UI.

Uses of JTextComponent in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type JTextComponent
Rectangle | MultiTextUI.modelToView(JTextComponent a, int b) Call modelToView on each UI handled by this MultiUI.
Rectangle | MultiTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | MultiTextUI.viewToModel(JTextComponent a, Point b) Call viewToModel on each UI handled by this MultiUI.
int | MultiTextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | MultiTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
void | MultiTextUI.damageRange(JTextComponent a, int b, int c) Call damageRange on each UI handled by this MultiUI.
void | MultiTextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.
EditorKit | MultiTextUI.getEditorKit(JTextComponent a) Call getEditorKit on each UI handled by this MultiUI.
View | MultiTextUI.getRootView(JTextComponent a) Call getRootView on each UI handled by this MultiUI.

Uses of JTextComponent in javax.swing.text

Methods in javax.swing.text that return JTextComponent
protected JTextComponent | TextAction.getTextComponent(ActionEvent e) Determines the component to use for the action.
protected JTextComponent | TextAction.getFocusedComponent() Fetches the text component that currently has focus.
protected JTextComponent | DefaultCaret.getComponent() Gets the text editor component that this caret is is bound to.

Methods in javax.swing.text with parameters of type JTextComponent
void | Highlighter.install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | Highlighter.deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
void | Highlighter.HighlightPainter.paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) Renders the highlight.
abstract void | LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
void | DefaultHighlighter.install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | DefaultHighlighter.deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
void | DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
abstract Shape | LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
void | DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c) Paints a highlight.
Shape | DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
void | DefaultCaret.install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | DefaultCaret.deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
void | Caret.install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | Caret.deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
static int | Utilities.getRowStart(JTextComponent c, int offs) Determines the starting row model position of the row that contains the specified model position.
static int | Utilities.getRowEnd(JTextComponent c, int offs) Determines the ending row model position of the row that contains the specified model position.
static int | Utilities.getPositionAbove(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row above.
static int | Utilities.getPositionBelow(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row below.
static int | Utilities.getWordStart(JTextComponent c, int offs) Determines the start of a word for the given model location.
static int | Utilities.getWordEnd(JTextComponent c, int offs) Determines the end of a word for the given location.
static int | Utilities.getNextWord(JTextComponent c, int offs) Determines the start of the next word for the given location.
static int | Utilities.getPreviousWord(JTextComponent c, int offs) Determine the start of the prev word for the given location.
static Element | Utilities.getParagraphElement(JTextComponent c, int offs) Determines the element to use for a paragraph/line.

Constructors in javax.swing.text with parameters of type JTextComponent
JTextComponent.AccessibleJTextComponent()
Constructs an AccessibleJTextComponent.

Uses of JTextComponent in javax.swing.tree

Subclasses of JTextComponent in javax.swing.tree
 class DefaultTreeCellEditor.DefaultTextField
TextField used when no editor is supplied.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.JTextComponent.AccessibleJTextComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.JTextComponent.AccessibleJTextComponent

Packages that use JTextComponent.AccessibleJTextComponent
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of JTextComponent.AccessibleJTextComponent in javax.swing

Subclasses of JTextComponent.AccessibleJTextComponent in javax.swing
protected class | JEditorPane.AccessibleJEditorPane This class implements accessibility support for the JEditorPane class.
protected class | JEditorPane.AccessibleJEditorPaneHTML This class provides support for AccessibleHypertext, and is used in instances where the EditorKit installed in this JEditorPane is an instance of HTMLEditorKit.
protected class | JEditorPane.JEditorPaneAccessibleHypertextSupport What's returned by AccessibleJEditorPaneHTML.getAccessibleText.
protected class | JPasswordField.AccessibleJPasswordField This class implements accessibility support for the JPasswordField class.
protected class | JTextArea.AccessibleJTextArea This class implements accessibility support for the JTextArea class.
protected class | JTextField.AccessibleJTextField This class implements accessibility support for the JTextField class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.JTextComponent.KeyBinding

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.JTextComponent.KeyBinding

Packages that use JTextComponent.KeyBinding
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of JTextComponent.KeyBinding in javax.swing

Methods in javax.swing that return JTextComponent.KeyBinding
static JTextComponent.KeyBinding[] LookAndFeel.makeKeyBindings(Object[] keyBindingList)
Convenience method for building lists of KeyBindings.

Uses of JTextComponent.KeyBinding in javax.swing.text

Methods in javax.swing.text with parameters of type JTextComponent.KeyBinding
static void JTextComponent.loadKeymap(Keymap map, JTextComponent.KeyBinding[] bindings, Action[] actions)
Loads a keymap with a bunch of bindings.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.LabelView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.LabelView

Packages that use LabelView
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of LabelView in javax.swing.text.html

Subclasses of LabelView in javax.swing.text.html
 class InlineView
Displays the inline element styles based upon css attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.LayeredHighlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.LayeredHighlighter

Packages that use LayeredHighlighter
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of LayeredHighlighter in javax.swing.plaf.basic

Subclasses of LayeredHighlighter in javax.swing.plaf.basic
static class BasicTextUI.BasicHighlighter

Uses of LayeredHighlighter in javax.swing.text

Subclasses of LayeredHighlighter in javax.swing.text
 class DefaultHighlighter
Implements the Highlighter interfaces.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.LayeredHighlighter.LayerPainter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.LayeredHighlighter.LayerPainter

Packages that use LayeredHighlighter.LayerPainter
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of LayeredHighlighter.LayerPainter in javax.swing.text

Subclasses of LayeredHighlighter.LayerPainter in javax.swing.text
static class DefaultHighlighter.DefaultHighlightPainter
Simple highlight painter that fills a highlighted area with a solid color.

Fields in javax.swing.text declared as LayeredHighlighter.LayerPainter
static LayeredHighlighter.LayerPainter DefaultHighlighter.DefaultPainter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.LayoutQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.LayoutQueue

Packages that use LayoutQueue
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of LayoutQueue in javax.swing.text

Methods in javax.swing.text that return LayoutQueue
static LayoutQueue | LayoutQueue.getDefaultQueue() Fetch the default layout queue.
protected LayoutQueue | AsyncBoxView.getLayoutQueue() Fetch the queue to use for layout.

Methods in javax.swing.text with parameters of type LayoutQueue
static void LayoutQueue.setDefaultQueue(LayoutQueue q)
Set the default layout queue.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.ParagraphView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.ParagraphView

Packages that use ParagraphView
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of ParagraphView in javax.swing.text.html

Subclasses of ParagraphView in javax.swing.text.html
 class ParagraphView
Displays the a paragraph, and uses css attributes for its configuration.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.PlainView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.PlainView

Packages that use PlainView
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of PlainView in javax.swing.text

Subclasses of PlainView in javax.swing.text
class | FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
class | PasswordView Implements a View suitable for use in JPasswordField UI implementations.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.Position.Bias

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.Position.Bias

Packages that use Position.Bias
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Position.Bias in javax.swing.plaf

Methods in javax.swing.plaf with parameters of type Position.Bias
abstract Rectangle | TextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
abstract int | TextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract int | TextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract void | TextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.

Uses of Position.Bias in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type Position.Bias
Rectangle | BasicTextUI.modelToView(JTextComponent tc, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | BasicTextUI.viewToModel(JTextComponent tc, Point pt, Position.Bias[] biasReturn) Converts the given place in the view coordinate system to the nearest representative location in the model.
int | BasicTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
void | BasicTextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias p0Bias, Position.Bias p1Bias) Causes the portion of the view responsible for the given part of the model to be repainted.

Uses of Position.Bias in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type Position.Bias
Rectangle | MultiTextUI.modelToView(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system.
int | MultiTextUI.viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | MultiTextUI.getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
void | MultiTextUI.damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias) Causes the portion of the view responsible for the given part of the model to be repainted.

Uses of Position.Bias in javax.swing.text

Fields in javax.swing.text declared as Position.Bias
static Position.Bias | Position.Bias.Forward Indicates to bias toward the next character in the model.
static Position.Bias | Position.Bias.Backward Indicates a bias toward the previous character in the model.

Methods in javax.swing.text with parameters of type Position.Bias
int | View.getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
int | View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
abstract Shape | View.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract int | View.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | CompositeView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | CompositeView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
int | CompositeView.getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
protected int | CompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
protected int | CompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
protected boolean | CompositeView.flipEastAndWestAtEnds(int position, Position.Bias bias) Subclasses may wish to subclass this and conditionally return true based on the position.
Shape | GlyphView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | GlyphView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | GlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
Shape | BoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | BoxView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
protected boolean | BoxView.flipEastAndWestAtEnds(int position, Position.Bias bias)
protected int | ParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Overriden from CompositeView.
protected int | ParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position to x.
protected boolean | ParagraphView.flipEastAndWestAtEnds(int position, Position.Bias bias)
Shape | PlainView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | PlainView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | FieldView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | FieldView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | PasswordView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | PasswordView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
abstract Shape | GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract int | GlyphView.GlyphPainter.viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
int | GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
protected int | AsyncBoxView.getViewIndexAtPosition(int pos, Position.Bias b) Fetches the child view index representing the given position in the model.
int | AsyncBoxView.getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
Shape | AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | AsyncBoxView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | ComponentView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.
int | ComponentView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Shape | IconView.modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | IconView.viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.Segment

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.Segment

Packages that use Segment
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Segment in javax.swing.text

Methods in javax.swing.text that return Segment
Segment | GlyphView.getText(int p0, int p1) Fetch a reference to the text that occupies the given range.
protected Segment | PlainView.getLineBuffer() Gives access to a buffer that can be used to fetch text from the associated document.
protected Segment | WrappedPlainView.getLineBuffer() Gives access to a buffer that can be used to fetch text from the associated document.

Methods in javax.swing.text with parameters of type Segment
void | Document.getText(int offset, int length, Segment txt) Fetches the text contained within the given portion of the document.
void | AbstractDocument.getText(int offset, int length, Segment txt) Gets some text from the document potentially without making a copy.
void | AbstractDocument.Content.getChars(int where, int len, Segment txt) Gets a sequence of characters and copies them into a Segment.
void | StringContent.getChars(int where, int len, Segment chars) Retrieves a portion of the content.
void | GapContent.getChars(int where, int len, Segment chars) Retrieves a portion of the content.
static int | Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
static int | Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determines the relative offset into the given text that best represents the given span in the view coordinate system.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
static int | Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determine where to break the given text to fit within the the given span.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.SimpleAttributeSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.SimpleAttributeSet

Packages that use SimpleAttributeSet
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of SimpleAttributeSet in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that return SimpleAttributeSet
protected  SimpleAttributeSet Parser.getAttributes()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleConstants

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleConstants

Packages that use StyleConstants
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of StyleConstants in javax.swing.text

Subclasses of StyleConstants in javax.swing.text
static class | StyleConstants.CharacterConstants This is a typesafe enumeration of the well-known attributes that contribute to a character style.
static class | StyleConstants.ColorConstants This is a typesafe enumeration of the well-known attributes that contribute to a color.
static class | StyleConstants.FontConstants This is a typesafe enumeration of the well-known attributes that contribute to a font.
static class | StyleConstants.ParagraphConstants This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleContext

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleContext

Packages that use StyleContext
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyleContext in javax.swing.text

Methods in javax.swing.text that return StyleContext
static StyleContext StyleContext.getDefaultStyleContext()
Returns default AttributeContext shared by all documents that don't bother to define/supply their own context.

Constructors in javax.swing.text with parameters of type StyleContext
StyleContext.SmallAttributeSet(Object[] attributes)
StyleContext.SmallAttributeSet(AttributeSet attrs)
StyleContext.NamedStyle(String name, Style parent)
Creates a new named style.
StyleContext.NamedStyle(Style parent)
Creates a new named style.
StyleContext.NamedStyle()
Creates a new named style, with a null name and parent.
DefaultStyledDocument(AbstractDocument.Content c, StyleContext styles)
Constructs a styled document.
DefaultStyledDocument(StyleContext styles)
Constructs a styled document with the default content storage implementation and a shared set of styles.

Uses of StyleContext in javax.swing.text.html

Subclasses of StyleContext in javax.swing.text.html
 class StyleSheet
Support for defining the visual characteristics of HTML views being rendered.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyleContext.SmallAttributeSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyleContext.SmallAttributeSet

Packages that use StyleContext.SmallAttributeSet
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyleContext.SmallAttributeSet in javax.swing.text

Methods in javax.swing.text that return StyleContext.SmallAttributeSet
protected  StyleContext.SmallAttributeSet StyleContext.createSmallAttributeSet(AttributeSet a)
Create a compact set of attributes that might be shared.

Uses of StyleContext.SmallAttributeSet in javax.swing.text.html

Methods in javax.swing.text.html that return StyleContext.SmallAttributeSet
protected  StyleContext.SmallAttributeSet StyleSheet.createSmallAttributeSet(AttributeSet a)
Creates a compact set of attributes that might be shared.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit

Packages that use StyledEditorKit
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of StyledEditorKit in javax.swing

Methods in javax.swing that return StyledEditorKit
protected  StyledEditorKit JTextPane.getStyledEditorKit()
Gets the editor kit.

Uses of StyledEditorKit in javax.swing.text

Methods in javax.swing.text that return StyledEditorKit
protected  StyledEditorKit StyledEditorKit.StyledTextAction.getStyledEditorKit(JEditorPane e)
Gets the editor kit associated with an editor pane.

Uses of StyledEditorKit in javax.swing.text.html

Subclasses of StyledEditorKit in javax.swing.text.html
 class HTMLEditorKit
The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.

Uses of StyledEditorKit in javax.swing.text.rtf

Subclasses of StyledEditorKit in javax.swing.text.rtf
 class RTFEditorKit
This is the default implementation of RTF editing functionality.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.StyledEditorKit.StyledTextAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.StyledEditorKit.StyledTextAction

Packages that use StyledEditorKit.StyledTextAction
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyledEditorKit.StyledTextAction in javax.swing.text

Subclasses of StyledEditorKit.StyledTextAction in javax.swing.text
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.

Uses of StyledEditorKit.StyledTextAction in javax.swing.text.html

Subclasses of StyledEditorKit.StyledTextAction in javax.swing.text.html
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TableView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TableView

Packages that use TableView
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TableView in javax.swing.text

Constructors in javax.swing.text with parameters of type TableView
TableView.TableRow(Element elem)
Constructs a TableView for the given element.
TableView.TableCell(Element elem)
Deprecated. Constructs a TableCell for the given element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TableView.TableCell

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TableView.TableCell

Packages that use TableView.TableCell
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TableView.TableCell in javax.swing.text

Methods in javax.swing.text that return TableView.TableCell
protected  TableView.TableCell TableView.createTableCell(Element elem)
Deprecated. Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TableView.TableRow

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TableView.TableRow

Packages that use TableView.TableRow
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TableView.TableRow in javax.swing.text

Methods in javax.swing.text that return TableView.TableRow
protected  TableView.TableRow TableView.createTableRow(Element elem)
Creates a new table row.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TabSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TabSet

Packages that use TabSet
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TabSet in javax.swing.text

Methods in javax.swing.text that return TabSet
static TabSet | StyleConstants.getTabSet(AttributeSet a) Gets the TabSet.
protected TabSet | ParagraphView.getTabSet() Gets the Tabset to be used in calculating tabs.

Methods in javax.swing.text with parameters of type TabSet
static void StyleConstants.setTabSet(MutableAttributeSet a, TabSet tabs)
Sets the TabSet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TabStop

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TabStop

Packages that use TabStop
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TabStop in javax.swing.text

Methods in javax.swing.text that return TabStop
TabStop | TabSet.getTab(int index) Returns the TabStop at index index.
TabStop | TabSet.getTabAfter(float location) Returns the Tab instance after location.

Methods in javax.swing.text with parameters of type TabStop
 int TabSet.getTabIndex(TabStop tab)

Constructors in javax.swing.text with parameters of type TabStop
TabSet(TabStop[] tabs)
Creates and returns an instance of TabSet.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.TextAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.TextAction

Packages that use TextAction
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of TextAction in javax.swing.text

Subclasses of TextAction in javax.swing.text
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.

Uses of TextAction in javax.swing.text.html

Subclasses of TextAction in javax.swing.text.html
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.View

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.View

Packages that use View
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of View in javax.swing.plaf

Methods in javax.swing.plaf that return View
abstract  View TextUI.getRootView(JTextComponent t)
Fetches a View with the allocation of the associated text component (i.e.

Uses of View in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return View
View | BasicTextUI.getRootView(JTextComponent tc) Fetches a View with the allocation of the associated text component (i.e.
View | BasicTextUI.create(Element elem) Creates a view for an element.
View | BasicTextUI.create(Element elem, int p0, int p1) Creates a view for an element.
static View | BasicHTML.createHTMLView(JComponent c, String html) Create an html renderer for the given component and string of html.
View | BasicTextFieldUI.create(Element elem) Creates a view (FieldView) based on an element.
View | BasicPasswordFieldUI.create(Element elem) Creates a view (PasswordView) for an element.
View | BasicTextAreaUI.create(Element elem) Creates the view for an element.

Methods in javax.swing.plaf.basic with parameters of type View
protected  void BasicTextUI.setView(View v)
Sets the current root of the view hierarchy and calls invalidate().

Uses of View in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return View
 View MultiTextUI.getRootView(JTextComponent a)
Call getRootView on each UI handled by this MultiUI.

Uses of View in javax.swing.text

Subclasses of View in javax.swing.text
class | AsyncBoxView A box that does layout asynchronously.
class | BoxView A view that arranges its children into a box shape by tiling it's children along an axis.
class | ComponentView Component decorator that implements the view interface.
class | CompositeView A view that is composed of other views (has children).
class | FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
class | FlowView A View that tries to flow it's children into some partially constrained space.
class | GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
class | IconView Icon decorator that implements the view interface.
class | LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | PasswordView Implements a View suitable for use in JPasswordField UI implementations.
class | PlainView Implements View interface for a simple multi-line text view that has text in one font and color.
class | TableView Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells.
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.
class | ZoneView ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations.

Fields in javax.swing.text declared as View
protected  View FlowView.layoutPool
These are the views that represent the child elements of the element this view represents (The logical view to translate to a physical view).

Methods in javax.swing.text that return View
View | View.getParent() Returns the parent of the view.
View | View.getView(int n) Gets the nth child view.
View | View.breakView(int axis, int offset, float pos, float len) Tries to break this view on the given axis.
View | View.createFragment(int p0, int p1) Create a view that represents a portion of the element.
View | CompositeView.getView(int n) Gets the n-th view in this container.
protected abstract View | CompositeView.getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
protected View | CompositeView.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
View | GlyphView.breakView(int axis, int p0, float pos, float len) Breaks this view on the given axis at the given length.
View | GlyphView.createFragment(int p0, int p1) Creates a view that represents a portion of the element.
View | ViewFactory.create(Element elem) Creates a view from the given structural element of a document.
protected View | BoxView.getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
protected abstract View | FlowView.createRow() Create a View that should be used to hold a a rows worth of children in a flow.
protected View | ParagraphView.getLayoutView(int index) The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements.
protected View | ParagraphView.createRow() Create a View that should be used to hold a a rows worth of children in a flow.
View | ParagraphView.breakView(int axis, float len, Shape a) Breaks this view on the given axis at the given length.
protected View | FlowView.FlowStrategy.getLogicalView(FlowView fv) This method gives flow strategies access to the logical view of the FlowView.
protected View | FlowView.FlowStrategy.createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) Creates a view that can be used to represent the current piece of the flow.
View | AsyncBoxView.getView(int n) Gets the nth child view.
View | AsyncBoxView.ChildState.getChildView() Fetch the child view this record represents
protected View | TableView.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected View | TableView.TableRow.getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected View | ZoneView.createZone(int p0, int p1) Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility).

Methods in javax.swing.text with parameters of type View
void | View.preferenceChanged(View child, boolean width, boolean height) Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
void | View.setParent(View parent) Establishes the parent view for this view.
void | View.insert(int offs, View v) Inserts a single child view.
void | View.append(View v) Appends a single child view.
void | View.replace(int offset, int length, View[] views) Replace child views.
protected void | View.forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Forward the DocumentEvent to the give child view.
void | CompositeView.setParent(View parent) Sets the parent of the view.
void | CompositeView.replace(int offset, int length, View[] views) Replace child views.
void | BoxView.replace(int index, int length, View[] elems) Invalidates the layout and resizes the cache of requests/allocations.
void | BoxView.preferenceChanged(View child, boolean width, boolean height) This is called by a child to indicated its preferred span has changed.
abstract void | LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
void | DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
abstract Shape | LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
Shape | DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
protected AsyncBoxView.ChildState | AsyncBoxView.createChildState(View v) New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more
void | AsyncBoxView.replace(int offset, int length, View[] views) Calls the superclass to update the child views, and updates the status records for the children.
void | AsyncBoxView.setParent(View parent) Sets the parent of the view.
void | AsyncBoxView.preferenceChanged(View child, boolean width, boolean height) Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
void | TableView.replace(int offset, int length, View[] views) Change the child views.
void | TableView.TableRow.replace(int offset, int length, View[] views) Change the child views.
void | ComponentView.setParent(View p) Sets the parent for a child view.
protected void | ZoneView.zoneWasLoaded(View zone) Called by a zone when it gets loaded.
protected void | ZoneView.unloadZone(View zone) Unload a zone (Convert the zone to its memory saving state).
protected boolean | ZoneView.isZoneLoaded(View zone) Determine if a zone is in the loaded state.

Constructors in javax.swing.text with parameters of type View
AsyncBoxView.ChildState(View v)
Construct a child status.

Uses of View in javax.swing.text.html

Subclasses of View in javax.swing.text.html
class | BlockView A view implementation to display a block (as a box) with CSS specifications.
class | FormView Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
class | InlineView Displays the inline element styles based upon css attributes.
class | ListView A view implementation to display an html list
class | ObjectView Component decorator that implements the view interface for <object> elements.

Methods in javax.swing.text.html that return View
 View HTMLEditorKit.HTMLFactory.create(Element elem)
Creates a view from an element.

Methods in javax.swing.text.html with parameters of type View
AttributeSet | StyleSheet.getViewAttributes(View v) Fetches a set of attributes to use in the view for displaying.
float | StyleSheet.BoxPainter.getInset(int side, View v) Fetches the inset needed on a given side to account for the margin, border, and padding.
void | StyleSheet.BoxPainter.paint(Graphics g, float x, float y, float w, float h, View v) Paints the CSS box according to the attributes given.
void | StyleSheet.ListPainter.paint(Graphics g, float x, float y, float w, float h, View v, int item) Paints the CSS list decoration according to the attributes given.
void | ParagraphView.setParent(View parent) Establishes the parent view for this view.
void | BlockView.setParent(View parent) Establishes the parent view for this view.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AbstractDocument.AttributeContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AbstractDocument.AttributeContext

Packages that use AbstractDocument.AttributeContext
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.AttributeContext in javax.swing.text

Classes in javax.swing.text that implement AbstractDocument.AttributeContext
 class StyleContext
A pool of styles and their associated resources.

Methods in javax.swing.text that return AbstractDocument.AttributeContext
protected  AbstractDocument.AttributeContext AbstractDocument.getAttributeContext()
Fetches the context for managing attributes.

Constructors in javax.swing.text with parameters of type AbstractDocument.AttributeContext
AbstractDocument(AbstractDocument.Content data, AbstractDocument.AttributeContext context)
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.

Uses of AbstractDocument.AttributeContext in javax.swing.text.html

Classes in javax.swing.text.html that implement AbstractDocument.AttributeContext
 class StyleSheet
Support for defining the visual characteristics of HTML views being rendered.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AbstractDocument.Content

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AbstractDocument.Content

Packages that use AbstractDocument.Content
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AbstractDocument.Content in javax.swing.text

Classes in javax.swing.text that implement AbstractDocument.Content
class | GapContent An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs.
class | StringContent An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.

Methods in javax.swing.text that return AbstractDocument.Content
protected  AbstractDocument.Content AbstractDocument.getContent()
Gets the content for the document.

Constructors in javax.swing.text with parameters of type AbstractDocument.Content
AbstractDocument(AbstractDocument.Content data)
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
AbstractDocument(AbstractDocument.Content data, AbstractDocument.AttributeContext context)
Constructs a new AbstractDocument, wrapped around some specified content storage mechanism.
PlainDocument(AbstractDocument.Content c)
Constructs a plain text document.
DefaultStyledDocument(AbstractDocument.Content c, StyleContext styles)
Constructs a styled document.

Uses of AbstractDocument.Content in javax.swing.text.html

Constructors in javax.swing.text.html with parameters of type AbstractDocument.Content
HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
Constructs an HTML document with the given content storage implementation and the given style/attribute storage mechanism.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AttributeSet

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AttributeSet

Packages that use AttributeSet
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
javax.accessibility | Defines a contract between user-interface components and an assistive technology that provides access to those components.
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of AttributeSet in java.awt

Methods in java.awt that return AttributeSet
 AttributeSet TextComponent.AccessibleAWTTextComponent.getCharacterAttribute(int i)
Returns the AttributeSet for a given character (at a given index).

Uses of AttributeSet in javax.accessibility

Methods in javax.accessibility that return AttributeSet
 AttributeSet AccessibleText.getCharacterAttribute(int i)
Returns the AttributeSet for a given character at a given index

Uses of AttributeSet in javax.swing

Methods in javax.swing that return AttributeSet
AttributeSet | JTextPane.getCharacterAttributes() Fetches the character attributes in effect at the current location of the caret, or null.
AttributeSet | JTextPane.getParagraphAttributes() Fetches the current paragraph attributes in effect at the location of the caret, or null if none.
AttributeSet | AbstractButton.AccessibleAbstractButton.getCharacterAttribute(int i) Return the AttributeSet for a given character at a given index
AttributeSet | JLabel.AccessibleJLabel.getCharacterAttribute(int i) Return the AttributeSet for a given character at a given index

Methods in javax.swing with parameters of type AttributeSet
void | JTextPane.setCharacterAttributes(AttributeSet attr, boolean replace) Applies the given attributes to character content.
void | JTextPane.setParagraphAttributes(AttributeSet attr, boolean replace) Applies the given attributes to paragraphs.

Uses of AttributeSet in javax.swing.text

Subinterfaces of AttributeSet in javax.swing.text
interface | MutableAttributeSet A generic interface for a mutable collection of unique attributes.
interface | Style A collection of attributes to associate with an element in a document.

Classes in javax.swing.text that implement AttributeSet
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...
class | SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
class | StyleContext.NamedStyle A collection of attributes, typically used to represent character and paragraph styles.
class | StyleContext.SmallAttributeSet This class holds a small number of attributes in an array.

Fields in javax.swing.text declared as AttributeSet
static AttributeSet | SimpleAttributeSet.EMPTY An empty attribute set.
protected AttributeSet | DefaultStyledDocument.AttributeUndoableEdit.newAttributes
protected AttributeSet | DefaultStyledDocument.AttributeUndoableEdit.copy

Methods in javax.swing.text that return AttributeSet
AttributeSet | JTextComponent.AccessibleJTextComponent.getCharacterAttribute(int i) Returns the AttributeSet for a given character (at a given index).
AttributeSet | View.getAttributes() Fetches the attributes to use when rendering.
AttributeSet | Element.getAttributes() Fetches the collection of attributes this element contains.
AttributeSet | SimpleAttributeSet.copyAttributes() Makes a copy of the attributes.
AttributeSet | SimpleAttributeSet.getResolveParent() Gets the resolving parent.
AttributeSet | StyleContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleContext.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | StyleContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | StyleContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | StyleContext.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
AttributeSet | StyleContext.getEmptySet() Fetches an empty AttributeSet.
AttributeSet | StyleContext.SmallAttributeSet.copyAttributes() Copies a set of attributes.
AttributeSet | StyleContext.SmallAttributeSet.getResolveParent() If not overriden, the resolving parent defaults to the parent element.
AttributeSet | StyleContext.NamedStyle.copyAttributes() Copies a set of attributes.
AttributeSet | StyleContext.NamedStyle.getResolveParent() Gets attributes from the parent.
AttributeSet | AbstractDocument.AttributeContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | AbstractDocument.AttributeContext.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | AbstractDocument.AttributeContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
AttributeSet | AbstractDocument.AttributeContext.getEmptySet() Fetches an empty AttributeSet.
AttributeSet | AbstractDocument.AbstractElement.copyAttributes() Copies a set of attributes.
AttributeSet | AbstractDocument.AbstractElement.getResolveParent() Gets the resolving parent.
AttributeSet | AbstractDocument.AbstractElement.getAttributes() Gets the attributes for the element.
AttributeSet | AttributeSet.copyAttributes() Returns an attribute set that is guaranteed not to change over time.
AttributeSet | AttributeSet.getResolveParent() Gets the resolving parent.
AttributeSet | DefaultStyledDocument.ElementSpec.getAttributes() Gets the element attributes.

Methods in javax.swing.text with parameters of type AttributeSet
protected void | CompositeView.setParagraphInsets(AttributeSet attr) Sets the insets from the paragraph attributes specified in the given attributes.
void | Document.insertString(int offset, String str, AttributeSet a) Inserts a string of content.
boolean | SimpleAttributeSet.isEqual(AttributeSet attr) Compares two attribute sets.
boolean | SimpleAttributeSet.containsAttributes(AttributeSet attributes) Checks whether the attribute list contains all the specified name/value pairs.
void | SimpleAttributeSet.addAttributes(AttributeSet attributes) Adds a set of attributes to the list.
void | SimpleAttributeSet.removeAttributes(AttributeSet attributes) Removes a set of attributes from the list.
void | SimpleAttributeSet.setResolveParent(AttributeSet parent) Sets the resolving parent.
Font | StyleContext.getFont(AttributeSet attr) Gets the font from an attribute set.
Color | StyleContext.getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
Color | StyleContext.getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
AttributeSet | StyleContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleContext.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | StyleContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | StyleContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | StyleContext.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
void | StyleContext.reclaim(AttributeSet a) Returns a set no longer needed by the MutableAttributeSet implmentation.
protected StyleContext.SmallAttributeSet | StyleContext.createSmallAttributeSet(AttributeSet a) Create a compact set of attributes that might be shared.
protected MutableAttributeSet | StyleContext.createLargeAttributeSet(AttributeSet a) Create a large set of attributes that should trade off space for time.
void | StyleContext.writeAttributes(ObjectOutputStream out, AttributeSet a) Context-specific handling of writing out attributes
static void | StyleContext.writeAttributeSet(ObjectOutputStream out, AttributeSet a) Writes a set of attributes to the given object stream for the purpose of serialization.
boolean | StyleContext.SmallAttributeSet.isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
boolean | StyleContext.SmallAttributeSet.containsAttributes(AttributeSet attrs) Checks whether the attribute set contains all of the given attributes.
boolean | StyleContext.NamedStyle.isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
boolean | StyleContext.NamedStyle.containsAttributes(AttributeSet attrs) Checks whether the element contains all the attributes.
void | StyleContext.NamedStyle.addAttributes(AttributeSet attr) Adds a set of attributes to the element.
void | StyleContext.NamedStyle.removeAttributes(AttributeSet attrs) Removes a set of attributes for the element.
void | StyleContext.NamedStyle.setResolveParent(AttributeSet parent) Sets the resolving parent.
static int | StyleConstants.getBidiLevel(AttributeSet a) Gets the BidiLevel setting.
static Component | StyleConstants.getComponent(AttributeSet a) Gets the component setting from the attribute list.
static Icon | StyleConstants.getIcon(AttributeSet a) Gets the icon setting from the attribute list.
static String | StyleConstants.getFontFamily(AttributeSet a) Gets the font family setting from the attribute list.
static int | StyleConstants.getFontSize(AttributeSet a) Gets the font size setting from the attribute list.
static boolean | StyleConstants.isBold(AttributeSet a) Checks whether the bold attribute is set.
static boolean | StyleConstants.isItalic(AttributeSet a) Checks whether the italic attribute is set.
static boolean | StyleConstants.isUnderline(AttributeSet a) Checks whether the underline attribute is set.
static boolean | StyleConstants.isStrikeThrough(AttributeSet a) Checks whether the strikethrough attribute is set.
static boolean | StyleConstants.isSuperscript(AttributeSet a) Checks whether the superscript attribute is set.
static boolean | StyleConstants.isSubscript(AttributeSet a) Checks whether the subscript attribute is set.
static Color | StyleConstants.getForeground(AttributeSet a) Gets the foreground color setting from the attribute list.
static Color | StyleConstants.getBackground(AttributeSet a) Gets the background color setting from the attribute list.
static float | StyleConstants.getFirstLineIndent(AttributeSet a) Gets the first line indent setting.
static float | StyleConstants.getRightIndent(AttributeSet a) Gets the right indent setting.
static float | StyleConstants.getLeftIndent(AttributeSet a) Gets the left indent setting.
static float | StyleConstants.getLineSpacing(AttributeSet a) Gets the line spacing setting.
static float | StyleConstants.getSpaceAbove(AttributeSet a) Gets the space above setting.
static float | StyleConstants.getSpaceBelow(AttributeSet a) Gets the space below setting.
static int | StyleConstants.getAlignment(AttributeSet a) Gets the alignment setting.
static TabSet | StyleConstants.getTabSet(AttributeSet a) Gets the TabSet.
protected void | AbstractWriter.writeAttributes(AttributeSet attr) Writes out the set of attributes as " =" pairs.
void | MutableAttributeSet.addAttributes(AttributeSet attributes) Creates a new attribute set similar to this one except that it contains the given attributes and values.
void | MutableAttributeSet.removeAttributes(AttributeSet attributes) Creates a new attribute set similar to this one except that it contains no attribute with any of the given names and values.
void | MutableAttributeSet.setResolveParent(AttributeSet parent) Sets the resolving parent.
void | AbstractDocument.insertString(int offs, String str, AttributeSet a) Inserts some content into the document.
protected void | AbstractDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected Element | AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element.
protected Element | AbstractDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
AttributeSet | AbstractDocument.AttributeContext.addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | AbstractDocument.AttributeContext.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | AbstractDocument.AttributeContext.removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | AbstractDocument.AttributeContext.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
void | AbstractDocument.AttributeContext.reclaim(AttributeSet a) Reclaims an attribute set.
boolean | AbstractDocument.AbstractElement.isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
boolean | AbstractDocument.AbstractElement.containsAttributes(AttributeSet attrs) Checks whether the element contains all the attributes.
void | AbstractDocument.AbstractElement.addAttributes(AttributeSet attr) Adds a set of attributes to the element.
void | AbstractDocument.AbstractElement.removeAttributes(AttributeSet attrs) Removes a set of attributes for the element.
void | AbstractDocument.AbstractElement.setResolveParent(AttributeSet parent) Sets the resolving parent.
protected void | StyledEditorKit.StyledTextAction.setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to character content.
protected void | StyledEditorKit.StyledTextAction.setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to paragraphs.
boolean | AttributeSet.isEqual(AttributeSet attr) Determines if the two attribute sets are equivalent.
boolean | AttributeSet.containsAttributes(AttributeSet attributes) Returns true if this set contains all the attributes with equal values.
void | StyledDocument.setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) Changes the content element attributes used for the given range of existing content in the document.
void | StyledDocument.setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets paragraph attributes.
Color | StyledDocument.getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
Color | StyledDocument.getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
Font | StyledDocument.getFont(AttributeSet attr) Takes a set of attributes and turn it into a font specification.
protected void | PlainDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
void | DefaultStyledDocument.setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for some part of the document.
void | DefaultStyledDocument.setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for a paragraph.
protected void | DefaultStyledDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
Color | DefaultStyledDocument.getForeground(AttributeSet attr) Gets the foreground color from an attribute set.
Color | DefaultStyledDocument.getBackground(AttributeSet attr) Gets the background color from an attribute set.
Font | DefaultStyledDocument.getFont(AttributeSet attr) Gets the font from an attribute set.

Constructors in javax.swing.text with parameters of type AttributeSet
SimpleAttributeSet(AttributeSet source)
Creates a new attribute set based on a supplied set of attributes.
StyleContext.SmallAttributeSet(AttributeSet attrs)
AbstractDocument.AbstractElement(Element parent, AttributeSet a)
Creates a new AbstractElement.
AbstractDocument.BranchElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
DefaultStyledDocument.ElementSpec(AttributeSet a, short type)
Constructor useful for markup when the markup will not be stored in the document.
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, int len)
Constructor for parsing inside the document when the data has already been added, but len information is needed.
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
Constructor for creating a spec externally for batch input of content and markup into the document.
DefaultStyledDocument.AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)

Uses of AttributeSet in javax.swing.text.html

Classes in javax.swing.text.html that implement AttributeSet
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Methods in javax.swing.text.html that return AttributeSet
AttributeSet | StyleSheet.getDeclaration(String decl) Translates a CSS declaration to an AttributeSet that represents the CSS declaration.
AttributeSet | StyleSheet.getViewAttributes(View v) Fetches a set of attributes to use in the view for displaying.
AttributeSet | StyleSheet.translateHTMLToCSS(AttributeSet htmlAttrSet) Converts a set of HTML attributes to an equivalent set of CSS attributes.
AttributeSet | StyleSheet.addAttribute(AttributeSet old, Object key, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleSheet.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | StyleSheet.removeAttribute(AttributeSet old, Object key) Removes an attribute from the set.
AttributeSet | StyleSheet.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | StyleSheet.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes.
AttributeSet | Option.getAttributes() Fetch the attributes associated with this option.
AttributeSet | ParagraphView.getAttributes() Fetches the attributes to use when rendering.
AttributeSet | BlockView.getAttributes() Fetches the attributes to use when rendering.
AttributeSet | InlineView.getAttributes() Fetches the attributes to use when rendering.
abstract AttributeSet | HTMLDocument.Iterator.getAttributes() Fetch the attributes for this tag.
AttributeSet | HTMLDocument.RunElement.getResolveParent() Gets the resolving parent.
AttributeSet | HTMLDocument.BlockElement.getResolveParent() Gets the resolving parent.

Methods in javax.swing.text.html with parameters of type AttributeSet
AttributeSet | StyleSheet.translateHTMLToCSS(AttributeSet htmlAttrSet) Converts a set of HTML attributes to an equivalent set of CSS attributes.
AttributeSet | StyleSheet.addAttribute(AttributeSet old, Object key, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | StyleSheet.addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
AttributeSet | StyleSheet.removeAttribute(AttributeSet old, Object key) Removes an attribute from the set.
AttributeSet | StyleSheet.removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
AttributeSet | StyleSheet.removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes.
protected StyleContext.SmallAttributeSet | StyleSheet.createSmallAttributeSet(AttributeSet a) Creates a compact set of attributes that might be shared.
protected MutableAttributeSet | StyleSheet.createLargeAttributeSet(AttributeSet a) Creates a large set of attributes that should trade off space for time.
Font | StyleSheet.getFont(AttributeSet a) Fetches the font to use for the given set of attributes.
Color | StyleSheet.getForeground(AttributeSet a) Takes a set of attributes and turn it into a foreground color specification.
Color | StyleSheet.getBackground(AttributeSet a) Takes a set of attributes and turn it into a background color specification.
StyleSheet.BoxPainter | StyleSheet.getBoxPainter(AttributeSet a) Fetches the box formatter to use for the given set of CSS attributes.
StyleSheet.ListPainter | StyleSheet.getListPainter(AttributeSet a) Fetches the list formatter to use for the given set of CSS attributes.
static int | HTML.getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def) Fetch an integer attribute value.
protected void | HTMLDocument.insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
void | HTMLDocument.setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for a paragraph.
protected Element | HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element that directly represents text (doesn't have any children).
protected Element | HTMLDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
protected void | HTMLWriter.writeAttributes(AttributeSet attr) Writes out the attribute set.
protected boolean | HTMLWriter.isBlockTag(AttributeSet attr) Determines if the HTML.Tag associated with the element is a block tag.
protected void | HTMLWriter.textAreaContent(AttributeSet attr) Writes out text that is contained in a TEXTAREA form element.
protected void | HTMLWriter.selectContent(AttributeSet attr) Writes out the content of the SELECT form element.
protected boolean | HTMLWriter.matchNameAttribute(AttributeSet attr, HTML.Tag tag) Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.
protected void | HTMLWriter.writeEmbeddedTags(AttributeSet attr) Searches for embedded tags in the AttributeSet and writes them out.
protected void | HTMLWriter.closeOutUnwantedEmbeddedTags(AttributeSet attr) Searches the attribute set and for each tag that is stored in the tag vector.
protected void | MinimalHTMLWriter.writeAttributes(AttributeSet attr) Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.
protected void | MinimalHTMLWriter.writeHTMLTags(AttributeSet attr) Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
protected void | MinimalHTMLWriter.writeNonHTMLAttributes(AttributeSet attr) Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.

Constructors in javax.swing.text.html with parameters of type AttributeSet
Option(AttributeSet attr)
Creates a new Option object.
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
HTMLDocument.BlockElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AttributeSet.CharacterAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AttributeSet.CharacterAttribute

Packages that use AttributeSet.CharacterAttribute
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AttributeSet.CharacterAttribute in javax.swing.text

Classes in javax.swing.text that implement AttributeSet.CharacterAttribute
static class | StyleConstants.CharacterConstants This is a typesafe enumeration of the well-known attributes that contribute to a character style.
static class | StyleConstants.ColorConstants This is a typesafe enumeration of the well-known attributes that contribute to a color.
static class | StyleConstants.FontConstants This is a typesafe enumeration of the well-known attributes that contribute to a font.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AttributeSet.ColorAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AttributeSet.ColorAttribute

Packages that use AttributeSet.ColorAttribute
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AttributeSet.ColorAttribute in javax.swing.text

Classes in javax.swing.text that implement AttributeSet.ColorAttribute
static class StyleConstants.ColorConstants
This is a typesafe enumeration of the well-known attributes that contribute to a color.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AttributeSet.FontAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AttributeSet.FontAttribute

Packages that use AttributeSet.FontAttribute
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AttributeSet.FontAttribute in javax.swing.text

Classes in javax.swing.text that implement AttributeSet.FontAttribute
static class StyleConstants.FontConstants
This is a typesafe enumeration of the well-known attributes that contribute to a font.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.AttributeSet.ParagraphAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.AttributeSet.ParagraphAttribute

Packages that use AttributeSet.ParagraphAttribute
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of AttributeSet.ParagraphAttribute in javax.swing.text

Classes in javax.swing.text that implement AttributeSet.ParagraphAttribute
static class StyleConstants.ParagraphConstants
This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Caret

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Caret

Packages that use Caret
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Caret in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Caret
static class BasicTextUI.BasicCaret

Methods in javax.swing.plaf.basic that return Caret
protected Caret | BasicTextUI.createCaret() Creates the object to use for a caret.
protected Caret | BasicTextFieldUI.createCaret() Creates the caret for a field.

Uses of Caret in javax.swing.text

Classes in javax.swing.text that implement Caret
 class DefaultCaret
A default implementation of Caret.

Methods in javax.swing.text that return Caret
Caret | JTextComponent.getCaret() Fetches the caret that allows text-oriented navigation over the view.
abstract Caret | EditorKit.createCaret() Fetches a caret that can navigate through views produced by the associated ViewFactory.
Caret | DefaultEditorKit.createCaret() Fetches a caret that can navigate through views produced by the associated ViewFactory.

Methods in javax.swing.text with parameters of type Caret
 void JTextComponent.setCaret(Caret c)
Sets the caret to be used.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Document

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Document

Packages that use Document
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.rtf | Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Uses of Document in javax.swing

Methods in javax.swing that return Document
protected Document | JTextField.createDefaultModel() Creates the default implementation of the model to be used at construction if one isn't explicitly given.
protected Document | JTextArea.createDefaultModel() Creates the default implementation of the model to be used at construction if one isn't explicitly given.

Methods in javax.swing with parameters of type Document
 void JTextPane.setDocument(Document doc)
Associates the editor with a text document.

Constructors in javax.swing with parameters of type Document
JTextField(Document doc, String text, int columns)
Constructs a new JTextField that uses the given text storage model and the given number of columns.
JPasswordField(Document doc, String txt, int columns)
Constructs a new JPasswordField that uses the given text storage model and the given number of columns.
JTextArea(Document doc)
Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0).
JTextArea(Document doc, String text, int rows, int columns)
Constructs a new JTextArea with the specified number of rows and columns, and the given model.

Uses of Document in javax.swing.event

Methods in javax.swing.event that return Document
 Document DocumentEvent.getDocument()
Gets the document that sourced the change event.

Uses of Document in javax.swing.text

Subinterfaces of Document in javax.swing.text
 interface StyledDocument
Interface for a generic styled document.

Classes in javax.swing.text that implement Document
class | AbstractDocument An implementation of the document interface to serve as a basis for implementing various kinds of documents.
class | DefaultStyledDocument A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.
class | PlainDocument A plain document that maintains no character attributes.

Methods in javax.swing.text that return Document
Document | JTextComponent.getDocument() Fetches the model associated with the editor.
Document | View.getDocument() Fetches the model associated with the view.
Document | Element.getDocument() Fetches the document associated with this element.
abstract Document | EditorKit.createDefaultDocument() Creates an uninitialized text storage model that is appropriate for this type of editor.
protected Document | AbstractWriter.getDocument() Fetches the document.
Document | DefaultEditorKit.createDefaultDocument() Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.
Document | AbstractDocument.AbstractElement.getDocument() Retrieves the underlying model.
Document | AbstractDocument.DefaultDocumentEvent.getDocument() Gets the document that sourced the change event.
Document | StyledEditorKit.createDefaultDocument() Creates an uninitialized text storage model that is appropriate for this type of editor.

Methods in javax.swing.text with parameters of type Document
void | JTextComponent.setDocument(Document doc) Associates the editor with a text document.
abstract void | EditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
abstract void | EditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | EditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | DefaultEditorKit.write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | DefaultEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream, which will be treated as plain text.
void | DefaultEditorKit.write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream as plain text.

Constructors in javax.swing.text with parameters of type Document
ElementIterator(Document document)
Creates a new ElementIterator.
AbstractWriter(Writer w, Document doc)
Creates a new AbstractWriter.
AbstractWriter(Writer w, Document doc, int pos, int len)
Creates a new AbstractWriter.

Uses of Document in javax.swing.text.html

Classes in javax.swing.text.html that implement Document
 class HTMLDocument
A document that models HTML.

Methods in javax.swing.text.html that return Document
 Document HTMLEditorKit.createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.

Methods in javax.swing.text.html with parameters of type Document
void | HTMLEditorKit.read(Reader in, Document doc, int pos) Inserts content from the given stream.
void | HTMLEditorKit.write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.

Uses of Document in javax.swing.text.rtf

Methods in javax.swing.text.rtf with parameters of type Document
void | RTFEditorKit.read(InputStream in, Document doc, int pos) Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | RTFEditorKit.write(OutputStream out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
void | RTFEditorKit.read(Reader in, Document doc, int pos) Insert content from the given stream, which will be treated as plain text.
void | RTFEditorKit.write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream as plain text.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Element

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Element

Packages that use Element
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Element in javax.swing

Constructors in javax.swing with parameters of type Element
JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink(Element e)

Uses of Element in javax.swing.event

Methods in javax.swing.event that return Element
Element | DocumentEvent.ElementChange.getElement() Returns the element represented.
Element[] | DocumentEvent.ElementChange.getChildrenRemoved() Gets the child elements that were removed from the given parent element.
Element[] | DocumentEvent.ElementChange.getChildrenAdded() Gets the child elements that were added to the given parent element.

Methods in javax.swing.event with parameters of type Element
 DocumentEvent.ElementChange DocumentEvent.getChange(Element elem)
Gets the change information for the given element.

Uses of Element in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic with parameters of type Element
View | BasicTextUI.create(Element elem) Creates a view for an element.
View | BasicTextUI.create(Element elem, int p0, int p1) Creates a view for an element.
View | BasicTextFieldUI.create(Element elem) Creates a view (FieldView) based on an element.
View | BasicPasswordFieldUI.create(Element elem) Creates a view (PasswordView) for an element.
View | BasicTextAreaUI.create(Element elem) Creates the view for an element.

Uses of Element in javax.swing.text

Classes in javax.swing.text that implement Element
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...

Fields in javax.swing.text declared as Element
protected  Element DefaultStyledDocument.AttributeUndoableEdit.element

Methods in javax.swing.text that return Element
Element | ElementIterator.first() Fetches the first element.
Element | ElementIterator.current() Fetches the current Element.
Element | ElementIterator.next() Fetches the next Element.
Element | ElementIterator.previous() Fetches the previous Element.
Element | View.getElement() Fetches the structural portion of the subject that this view is mapped to.
Element | Element.getParentElement() Fetches the parent element.
Element | Element.getElement(int index) Fetches the child element at the given index.
Element[] | Document.getRootElements() Returns all of the root elements that are defined.
Element | Document.getDefaultRootElement() Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided.
Element[] | AbstractDocument.getRootElements() Gets all root elements defined.
abstract Element | AbstractDocument.getDefaultRootElement() Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided.
Element | AbstractDocument.getBidiRootElement() Returns the root element of the bidirectional structure for this document.
abstract Element | AbstractDocument.getParagraphElement(int pos) Get the paragraph element containing the given position.
protected Element | AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element.
protected Element | AbstractDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
Element | AbstractDocument.AbstractElement.getParentElement() Gets the parent of the element.
abstract Element | AbstractDocument.AbstractElement.getElement(int index) Gets a child element.
Element | AbstractDocument.BranchElement.positionToElement(int pos) Gets the child element that contains the given model position.
Element | AbstractDocument.BranchElement.getElement(int index) Gets a child element.
Element | AbstractDocument.LeafElement.getElement(int index) Gets a child element.
Element | AbstractDocument.ElementEdit.getElement() Returns the underlying element.
Element[] | AbstractDocument.ElementEdit.getChildrenRemoved() Gets a list of children that were removed.
Element[] | AbstractDocument.ElementEdit.getChildrenAdded() Gets a list of children that were added.
Element | StyledEditorKit.getCharacterAttributeRun() Fetches the element representing the current run of character attributes for the caret.
Element | StyledDocument.getParagraphElement(int pos) Gets the element that represents the paragraph that encloses the given offset within the document.
Element | StyledDocument.getCharacterElement(int pos) Gets the element that represents the character that is at the given offset within the document.
Element | PlainDocument.getDefaultRootElement() Gets the default root element for the document model.
Element | PlainDocument.getParagraphElement(int pos) Get the paragraph element containing the given position.
static Element | Utilities.getParagraphElement(JTextComponent c, int offs) Determines the element to use for a paragraph/line.
Element | DefaultStyledDocument.getDefaultRootElement() Gets the default root element.
Element | DefaultStyledDocument.getParagraphElement(int pos) Gets the paragraph element at the offset pos.
Element | DefaultStyledDocument.getCharacterElement(int pos) Gets a character element based on a position.
Element | DefaultStyledDocument.ElementBuffer.getRootElement() Gets the root element.
Element | DefaultStyledDocument.ElementBuffer.clone(Element parent, Element clonee) Creates a copy of this element, with a different parent.

Methods in javax.swing.text with parameters of type Element
View | ViewFactory.create(Element elem) Creates a view from the given structural element of a document.
protected boolean | AbstractWriter.inRange(Element next) This method determines whether the current element is in the range specified.
protected String | AbstractWriter.getText(Element elem) Returns the text associated with the element.
protected void | AbstractWriter.text(Element elem) Writes out text.
protected Element | AbstractDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element.
protected Element | AbstractDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
void | AbstractDocument.BranchElement.replace(int offset, int length, Element[] elems) Replaces content with a new set of elements.
DocumentEvent.ElementChange | AbstractDocument.DefaultDocumentEvent.getChange(Element elem) Gets the changes for an element.
protected void | StyledEditorKit.createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.
protected TableView.TableRow | TableView.createTableRow(Element elem) Creates a new table row.
protected TableView.TableCell | TableView.createTableCell(Element elem) Deprecated. Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.
Element | DefaultStyledDocument.ElementBuffer.clone(Element parent, Element clonee) Creates a copy of this element, with a different parent.

Constructors in javax.swing.text with parameters of type Element
ElementIterator(Element root)
Creates a new ElementIterator.
View(Element elem)
Creates a new View object.
CompositeView(Element elem)
Constructs a CompositeView for the given element.
GlyphView(Element elem)
Constructs a new view wrapped on an element.
LabelView(Element elem)
Constructs a new view wrapped on an element.
BoxView(Element elem, int axis)
Constructs a BoxView.
FlowView(Element elem, int axis)
Constructs a FlowView for the given element.
ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
AbstractWriter(Writer w, Element root)
Creates a new AbstractWriter.
AbstractWriter(Writer w, Element root, int pos, int len)
Creates a new AbstractWriter.
PlainView(Element elem)
Constructs a new PlainView wrapped on an element.
FieldView(Element elem)
Constructs a new FieldView wrapped on an element.
AbstractDocument.AbstractElement(Element parent, AttributeSet a)
Creates a new AbstractElement.
AbstractDocument.BranchElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
AbstractDocument.ElementEdit(Element e, int index, Element[] removed, Element[] added)
Constructs an edit record.
PasswordView(Element elem)
Constructs a new view wrapped on an element.
AsyncBoxView(Element elem, int axis)
Construct a box view that does asynchronous layout.
TableView(Element elem)
Constructs a TableView for the given element.
TableView.TableRow(Element elem)
Constructs a TableView for the given element.
TableView.TableCell(Element elem)
Deprecated. Constructs a TableCell for the given element.
ComponentView(Element elem)
Creates a new ComponentView object.
IconView(Element elem)
Creates a new icon view that represents an element.
WrappedPlainView(Element elem)
Creates a new WrappedPlainView.
WrappedPlainView(Element elem, boolean wordWrap)
Creates a new WrappedPlainView.
ZoneView(Element elem, int axis)
Constructs a ZoneView.
DefaultStyledDocument.ElementBuffer(Element root)
Creates a new ElementBuffer.
DefaultStyledDocument.AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)

Uses of Element in javax.swing.text.html

Classes in javax.swing.text.html that implement Element
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Methods in javax.swing.text.html that return Element
protected Element | HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element that directly represents text (doesn't have any children).
protected Element | HTMLDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
Element | HTMLDocument.getElement(String id) Fetches the element that has the given id attribute.
Element | HTMLDocument.getElement(Element e, Object attribute, Object value) Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found.
Element | HTMLFrameHyperlinkEvent.getSourceElement() returns the element that corresponds to the source of the event.
protected Element[] | HTMLEditorKit.HTMLTextAction.getElementsAt(HTMLDocument doc, int offset) Returns an array of the Elements that contain offset.
protected Element | HTMLEditorKit.HTMLTextAction.findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns the deepest element at offset matching tag.

Methods in javax.swing.text.html with parameters of type Element
Style | StyleSheet.getRule(HTML.Tag t, Element e) Fetches the style to use to render the given type of HTML tag.
protected Element | HTMLDocument.createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element that directly represents text (doesn't have any children).
protected Element | HTMLDocument.createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
void | HTMLDocument.setInnerHTML(Element elem, String htmlText) Replaces the children of the given element with the contents specified as an HTML string.
void | HTMLDocument.setOuterHTML(Element elem, String htmlText) Replaces the given element in the parent with the contents specified as an HTML string.
void | HTMLDocument.insertAfterStart(Element elem, String htmlText) Inserts the HTML specified as a string at the start of the element.
void | HTMLDocument.insertBeforeEnd(Element elem, String htmlText) Inserts the HTML specified as a string at the end of the element.
void | HTMLDocument.insertBeforeStart(Element elem, String htmlText) Inserts the HTML specified as string before the start of the given element.
void | HTMLDocument.insertAfterEnd(Element elem, String htmlText) Inserts the HTML specified as a string after the the end of the given element.
Element | HTMLDocument.getElement(Element e, Object attribute, Object value) Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found.
protected void | HTMLEditorKit.createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.
protected void | HTMLWriter.emptyTag(Element elem) Writes out all empty elements (all tags that have no corresponding end tag).
protected void | HTMLWriter.startTag(Element elem) Writes out a start tag for the element.
protected void | HTMLWriter.text(Element elem) Writes out text.
protected void | HTMLWriter.endTag(Element elem) Writes out an end tag for the element.
protected void | HTMLWriter.comment(Element elem) Writes out comments.
protected boolean | HTMLWriter.synthesizedElement(Element elem) Returns true if the element is a synthesized element.
protected void | MinimalHTMLWriter.text(Element elem) Writes out text.
protected void | MinimalHTMLWriter.writeStartParagraph(Element elem) Emits the start tag for a paragraph.
protected void | MinimalHTMLWriter.writeLeaf(Element elem) Responsible for writing out other non-text leaf elements.
protected void | MinimalHTMLWriter.writeImage(Element elem) Responsible for handling Icon Elements; deliberately unimplemented.
protected void | MinimalHTMLWriter.writeComponent(Element elem) Responsible for handling Component Elements; deliberately unimplemented.
protected boolean | MinimalHTMLWriter.isText(Element elem) Returns true if the element is a text element.
protected void | MinimalHTMLWriter.writeContent(Element elem, boolean needsIndenting) Writes out the attribute set in an HTML-compliant manner.
View | HTMLEditorKit.HTMLFactory.create(Element elem) Creates a view from an element.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary

Constructors in javax.swing.text.html with parameters of type Element
ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
BlockView(Element elem, int axis)
Creates a new view that represents an html box.
InlineView(Element elem)
Constructs a new view wrapped on an element.
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
HTMLDocument.BlockElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
FormView(Element elem)
Creates a new FormView object.
ObjectView(Element elem)
Creates a new ObjectView object.
ListView(Element elem)
Creates a new view that represents a list element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Highlighter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Highlighter

Packages that use Highlighter
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Highlighter in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement Highlighter
static class BasicTextUI.BasicHighlighter

Methods in javax.swing.plaf.basic that return Highlighter
protected  Highlighter BasicTextUI.createHighlighter()
Creates the object to use for adding highlights.

Uses of Highlighter in javax.swing.text

Classes in javax.swing.text that implement Highlighter
class | DefaultHighlighter Implements the Highlighter interfaces.
class | LayeredHighlighter

Methods in javax.swing.text that return Highlighter
 Highlighter JTextComponent.getHighlighter()
Fetches the object responsible for making highlights.

Methods in javax.swing.text with parameters of type Highlighter
 void JTextComponent.setHighlighter(Highlighter h)
Sets the highlighter to be used.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Highlighter.Highlight

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Highlighter.Highlight

Packages that use Highlighter.Highlight
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Highlighter.Highlight in javax.swing.text

Methods in javax.swing.text that return Highlighter.Highlight
Highlighter.Highlight[] | Highlighter.getHighlights() Fetches the current list of highlights.
Highlighter.Highlight[] | DefaultHighlighter.getHighlights() Makes a copy of the highlights.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Highlighter.HighlightPainter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Highlighter.HighlightPainter

Packages that use Highlighter.HighlightPainter
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Highlighter.HighlightPainter in javax.swing.text

Classes in javax.swing.text that implement Highlighter.HighlightPainter
static class | DefaultHighlighter.DefaultHighlightPainter Simple highlight painter that fills a highlighted area with a solid color.
static class | LayeredHighlighter.LayerPainter Layered highlight renderer.

Methods in javax.swing.text that return Highlighter.HighlightPainter
Highlighter.HighlightPainter | Highlighter.Highlight.getPainter() Gets the painter for the highlighter.
protected Highlighter.HighlightPainter | DefaultCaret.getSelectionPainter() Gets the painter for the Highlighter.

Methods in javax.swing.text with parameters of type Highlighter.HighlightPainter
Object | Highlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
Object | DefaultHighlighter.addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Keymap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Keymap

Packages that use Keymap
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Keymap in javax.swing.plaf.basic

Methods in javax.swing.plaf.basic that return Keymap
protected  Keymap BasicTextUI.createKeymap()
Creates the keymap to use for the text component, and installs any necessary bindings into it.

Uses of Keymap in javax.swing.text

Methods in javax.swing.text that return Keymap
Keymap | JTextComponent.getKeymap() Fetches the keymap currently active in this text component.
static Keymap | JTextComponent.addKeymap(String nm, Keymap parent) Adds a new keymap into the keymap hierarchy.
static Keymap | JTextComponent.removeKeymap(String nm) Removes a named keymap previously added to the document.
static Keymap | JTextComponent.getKeymap(String nm) Fetches a named keymap previously added to the document.
Keymap | Keymap.getResolveParent() Fetches the parent keymap used to resolve key-bindings.

Methods in javax.swing.text with parameters of type Keymap
void | JTextComponent.setKeymap(Keymap map) Sets the keymap to use for binding events to actions.
static Keymap | JTextComponent.addKeymap(String nm, Keymap parent) Adds a new keymap into the keymap hierarchy.
static void | JTextComponent.loadKeymap(Keymap map, JTextComponent.KeyBinding[] bindings, Action[] actions) Loads a keymap with a bunch of bindings.
void | Keymap.setResolveParent(Keymap parent) Sets the parent keymap, which will be used to resolve key-bindings.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.MutableAttributeSet

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.MutableAttributeSet

Packages that use MutableAttributeSet
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of MutableAttributeSet in javax.swing

Methods in javax.swing that return MutableAttributeSet
 MutableAttributeSet JTextPane.getInputAttributes()
Gets the input attributes for the pane.

Uses of MutableAttributeSet in javax.swing.text

Subinterfaces of MutableAttributeSet in javax.swing.text
 interface Style
A collection of attributes to associate with an element in a document.

Classes in javax.swing.text that implement MutableAttributeSet
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...
class | SimpleAttributeSet A straightforward implementation of MutableAttributeSet using a hash table.
class | StyleContext.NamedStyle A collection of attributes, typically used to represent character and paragraph styles.

Methods in javax.swing.text that return MutableAttributeSet
protected MutableAttributeSet | StyleContext.createLargeAttributeSet(AttributeSet a) Create a large set of attributes that should trade off space for time.
MutableAttributeSet | StyledEditorKit.getInputAttributes() Gets the input attributes for the pane.

Methods in javax.swing.text with parameters of type MutableAttributeSet
void | StyleContext.readAttributes(ObjectInputStream in, MutableAttributeSet a) Context-specific handling of reading in attributes
static void | StyleContext.readAttributeSet(ObjectInputStream in, MutableAttributeSet a) Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.
static void | StyleConstants.setBidiLevel(MutableAttributeSet a, int o) Sets the BidiLevel.
static void | StyleConstants.setComponent(MutableAttributeSet a, Component c) Sets the component attribute.
static void | StyleConstants.setIcon(MutableAttributeSet a, Icon c) Sets the icon attribute.
static void | StyleConstants.setFontFamily(MutableAttributeSet a, String fam) Sets the font attribute.
static void | StyleConstants.setFontSize(MutableAttributeSet a, int s) Sets the font size attribute.
static void | StyleConstants.setBold(MutableAttributeSet a, boolean b) Sets the bold attribute.
static void | StyleConstants.setItalic(MutableAttributeSet a, boolean b) Sets the italic attribute.
static void | StyleConstants.setUnderline(MutableAttributeSet a, boolean b) Sets the underline attribute.
static void | StyleConstants.setStrikeThrough(MutableAttributeSet a, boolean b) Sets the strikethrough attribute.
static void | StyleConstants.setSuperscript(MutableAttributeSet a, boolean b) Sets the superscript attribute.
static void | StyleConstants.setSubscript(MutableAttributeSet a, boolean b) Sets the subscript attribute.
static void | StyleConstants.setForeground(MutableAttributeSet a, Color fg) Sets the foreground color.
static void | StyleConstants.setBackground(MutableAttributeSet a, Color fg) Sets the background color.
static void | StyleConstants.setFirstLineIndent(MutableAttributeSet a, float i) Sets the first line indent.
static void | StyleConstants.setRightIndent(MutableAttributeSet a, float i) Sets right indent.
static void | StyleConstants.setLeftIndent(MutableAttributeSet a, float i) Sets left indent.
static void | StyleConstants.setLineSpacing(MutableAttributeSet a, float i) Sets line spacing.
static void | StyleConstants.setSpaceAbove(MutableAttributeSet a, float i) Sets space above.
static void | StyleConstants.setSpaceBelow(MutableAttributeSet a, float i) Sets space below.
static void | StyleConstants.setAlignment(MutableAttributeSet a, int align) Sets alignment.
static void | StyleConstants.setTabSet(MutableAttributeSet a, TabSet tabs) Sets the TabSet.
protected void | StyledEditorKit.createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.

Uses of MutableAttributeSet in javax.swing.text.html

Classes in javax.swing.text.html that implement MutableAttributeSet
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Fields in javax.swing.text.html declared as MutableAttributeSet
protected  MutableAttributeSet HTMLDocument.HTMLReader.charAttr

Methods in javax.swing.text.html that return MutableAttributeSet
protected MutableAttributeSet | StyleSheet.createLargeAttributeSet(AttributeSet a) Creates a large set of attributes that should trade off space for time.
MutableAttributeSet | HTMLEditorKit.getInputAttributes() Gets the input attributes used for the styled editing actions.

Methods in javax.swing.text.html with parameters of type MutableAttributeSet
void | StyleSheet.addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
boolean | StyleSheet.addCSSAttributeFromHTML(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
protected void | HTMLEditorKit.createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.
void | HTMLEditorKit.ParserCallback.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | HTMLEditorKit.ParserCallback.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | HTMLDocument.HTMLReader.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
void | HTMLDocument.HTMLReader.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
protected void | HTMLDocument.HTMLReader.blockOpen(HTML.Tag t, MutableAttributeSet attr) Adds an instruction to the parse buffer to create a block element with the given attributes.
protected void | HTMLDocument.HTMLReader.addSpecialElement(HTML.Tag t, MutableAttributeSet a) Adds content that is basically specified entirely in the attribute set.
void | HTMLDocument.HTMLReader.TagAction.start(HTML.Tag t, MutableAttributeSet a) Called when a start tag is seen for the type of tag this action was registered to.
void | HTMLDocument.HTMLReader.BlockAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.ParagraphAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.SpecialAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.IsindexAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.HiddenAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.PreAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.CharacterAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.FormAction.start(HTML.Tag t, MutableAttributeSet attr)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Position

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Position

Packages that use Position
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of Position in javax.swing.text

Methods in javax.swing.text that return Position
Position | Document.getStartPosition() Returns a position that represents the start of the document.
Position | Document.getEndPosition() Returns a position that represents the end of the document.
Position | Document.createPosition(int offs) This method allows an application to mark a place in a sequence of character content.
Position | AbstractDocument.createPosition(int offs) Returns a position that will track change as the document is altered.
Position | AbstractDocument.getStartPosition() Returns a position that represents the start of the document.
Position | AbstractDocument.getEndPosition() Returns a position that represents the end of the document.
Position | AbstractDocument.Content.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
Position | StringContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
Position | GapContent.createPosition(int offset) Creates a position within the content that will track change as the content is mutated.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.Style

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.Style

Packages that use Style
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Style in javax.swing

Methods in javax.swing that return Style
Style | JTextPane.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
Style | JTextPane.getStyle(String nm) Fetches a named non-null style previously added.
Style | JTextPane.getLogicalStyle() Fetches the logical style assigned to the paragraph represented by the current position of the caret, or null.

Methods in javax.swing with parameters of type Style
Style | JTextPane.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
void | JTextPane.setLogicalStyle(Style s) Sets the logical style to use for the paragraph at the current caret position.

Uses of Style in javax.swing.text

Classes in javax.swing.text that implement Style
 class StyleContext.NamedStyle
A collection of attributes, typically used to represent character and paragraph styles.

Methods in javax.swing.text that return Style
Style | StyleContext.addStyle(String nm, Style parent) Adds a new style into the style hierarchy.
Style | StyleContext.getStyle(String nm) Fetches a named style previously added to the document
Style | StyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
Style | StyledDocument.getStyle(String nm) Fetches a named style previously added.
Style | StyledDocument.getLogicalStyle(int p) Gets a logical style for a given position in a paragraph.
Style | DefaultStyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
Style | DefaultStyledDocument.getStyle(String nm) Fetches a named style previously added.
Style | DefaultStyledDocument.getLogicalStyle(int p) Fetches the logical style assigned to the paragraph represented by the given position.

Methods in javax.swing.text with parameters of type Style
Style | StyleContext.addStyle(String nm, Style parent) Adds a new style into the style hierarchy.
Style | StyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
void | StyledDocument.setLogicalStyle(int pos, Style s) Sets the logical style to use for the paragraph at the given position.
Style | DefaultStyledDocument.addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
void | DefaultStyledDocument.setLogicalStyle(int pos, Style s) Sets the logical style to use for the paragraph at the given position.
protected void | DefaultStyledDocument.styleChanged(Style style) Creates a change event for the whole document and propagates it to the listeners.

Constructors in javax.swing.text with parameters of type Style
StyleContext.NamedStyle(String name, Style parent)
Creates a new named style.
StyleContext.NamedStyle(Style parent)
Creates a new named style.

Uses of Style in javax.swing.text.html

Methods in javax.swing.text.html that return Style
Style | StyleSheet.getRule(HTML.Tag t, Element e) Fetches the style to use to render the given type of HTML tag.
Style | StyleSheet.getRule(String selector) Fetches the rule that best matches the selector given in string form.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.StyledDocument

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.StyledDocument

Packages that use StyledDocument
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyledDocument in javax.swing

Methods in javax.swing that return StyledDocument
 StyledDocument JTextPane.getStyledDocument()
Fetches the model associated with the editor.

Methods in javax.swing with parameters of type StyledDocument
 void JTextPane.setStyledDocument(StyledDocument doc)
Associates the editor with a text document.

Constructors in javax.swing with parameters of type StyledDocument
JTextPane(StyledDocument doc)
Constructs a new JTextPane, with a specified document model.

Uses of StyledDocument in javax.swing.text

Classes in javax.swing.text that implement StyledDocument
 class DefaultStyledDocument
A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format.

Methods in javax.swing.text that return StyledDocument
protected  StyledDocument StyledEditorKit.StyledTextAction.getStyledDocument(JEditorPane e)
Gets the document associated with an editor pane.

Uses of StyledDocument in javax.swing.text.html

Classes in javax.swing.text.html that implement StyledDocument
 class HTMLDocument
A document that models HTML.

Constructors in javax.swing.text.html with parameters of type StyledDocument
MinimalHTMLWriter(Writer w, StyledDocument doc)
Creates a new MinimalHTMLWriter.
MinimalHTMLWriter(Writer w, StyledDocument doc, int pos, int len)
Creates a new MinimalHTMLWriter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.TabableView

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.TabableView

Packages that use TabableView
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of TabableView in javax.swing.text

Classes in javax.swing.text that implement TabableView
class | GlyphView A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model.
class | LabelView A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.

Uses of TabableView in javax.swing.text.html

Classes in javax.swing.text.html that implement TabableView
 class InlineView
Displays the inline element styles based upon css attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.TabExpander

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.TabExpander

Packages that use TabExpander
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.

Uses of TabExpander in javax.swing.text

Classes in javax.swing.text that implement TabExpander
class | FieldView Extends the multi-line plain text view to be suitable for a single-line editor view.
class | ParagraphView View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc.
class | PasswordView Implements a View suitable for use in JPasswordField UI implementations.
class | PlainView Implements View interface for a simple multi-line text view that has text in one font and color.
class | WrappedPlainView View of plain text (text with only one font and color) that does line-wrapping.

Methods in javax.swing.text that return TabExpander
 TabExpander GlyphView.getTabExpander()
Fetch the TabExpander to use if tabs are present in this view.

Methods in javax.swing.text with parameters of type TabExpander
float | GlyphView.getTabbedSpan(float x, TabExpander e) Determines the desired span when using the given tab expansion implementation.
abstract float | GlyphView.GlyphPainter.getSpan(GlyphView v, int p0, int p1, TabExpander e, float x) Determine the span the glyphs given a start location (for tab expansion).
float | TabableView.getTabbedSpan(float x, TabExpander e) Determines the desired span when using the given tab expansion implementation.
static int | Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
static int | Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determines the relative offset into the given text that best represents the given span in the view coordinate system.
static int | Utilities.getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
static int | Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determine where to break the given text to fit within the the given span.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.ViewFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.ViewFactory

Packages that use ViewFactory
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of ViewFactory in javax.swing.plaf.basic

Classes in javax.swing.plaf.basic that implement ViewFactory
class | BasicEditorPaneUI Provides the look and feel for a JEditorPane.
class | BasicPasswordFieldUI Provides the Windows look and feel for a password field.
class | BasicTextAreaUI Provides the look and feel for a plain text editor.
class | BasicTextFieldUI Basis of a look and feel for a JTextField.
class | BasicTextPaneUI Provides the look and feel for a styled text editor.
class | BasicTextUI Basis of a text components look-and-feel.

Uses of ViewFactory in javax.swing.plaf.metal

Classes in javax.swing.plaf.metal that implement ViewFactory
 class MetalTextFieldUI
Basis of a look and feel for a JTextField.

Uses of ViewFactory in javax.swing.text

Classes in javax.swing.text that implement ViewFactory
 class DefaultTextUI
Deprecated.

Methods in javax.swing.text that return ViewFactory
ViewFactory | View.getViewFactory() Fetches the ViewFactory implementation that is feeding the view hierarchy.
abstract ViewFactory | EditorKit.getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
ViewFactory | DefaultEditorKit.getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
ViewFactory | StyledEditorKit.getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.

Methods in javax.swing.text with parameters of type ViewFactory
void | View.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | View.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | View.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected boolean | View.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void | View.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | View.forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Forward the DocumentEvent to the give child view.
protected void | CompositeView.loadChildren(ViewFactory f) Loads all of the children to initialize the view.
void | GlyphView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | GlyphView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | GlyphView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | LabelView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | BoxView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | FlowView.loadChildren(ViewFactory f) Loads all of the children to initialize the view.
void | FlowView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FlowView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | FlowView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | ParagraphView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | PlainView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | PlainView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | PlainView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
void | FieldView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | FieldView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
protected void | AsyncBoxView.loadChildren(ViewFactory f) Loads all of the children to initialize the view.
protected void | TableView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
protected void | WrappedPlainView.loadChildren(ViewFactory f) Loads all of the children to initialize the view.
void | WrappedPlainView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | WrappedPlainView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | WrappedPlainView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | ZoneView.loadChildren(ViewFactory f) Loads all of the children to initialize the view.
protected boolean | ZoneView.updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.
void | ZoneView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
void | ZoneView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.

Uses of ViewFactory in javax.swing.text.html

Classes in javax.swing.text.html that implement ViewFactory
static class HTMLEditorKit.HTMLFactory
A factory to build views for HTML.

Methods in javax.swing.text.html that return ViewFactory
 ViewFactory HTMLEditorKit.getViewFactory()
Fetch a factory that is suitable for producing views of any models that are produced by this kit.

Methods in javax.swing.text.html with parameters of type ViewFactory
void | BlockView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
void | InlineView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ColorConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleConstants.ColorConstants

java.lang.Object
  |
  +--javax.swing.text.StyleConstants
        |
        +--javax.swing.text.StyleConstants.ColorConstants
All Implemented Interfaces:
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute
Enclosing class:
StyleConstants
public static class StyleConstants.ColorConstants
extends StyleConstants
implements AttributeSet.ColorAttribute, AttributeSet.CharacterAttribute

This is a typesafe enumeration of the well-known attributes that contribute to a color. These are aliased by the outer class for general presentation.

Inner classes inherited from class javax.swing.text.StyleConstants
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants
Field Summary
static Object | Background Name of the background color attribute.
static Object | Foreground Name of the foreground color attribute.
Fields inherited from class javax.swing.text.StyleConstants
ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_LEFT, ALIGN_RIGHT, Alignment, BidiLevel, Bold, ComponentAttribute, ComponentElementName, ComposedTextAttribute, FirstLineIndent, FontFamily, FontSize, IconAttribute, IconElementName, Italic, LeftIndent, LineSpacing, ModelAttribute, NameAttribute, Orientation, ResolveAttribute, RightIndent, SpaceAbove, SpaceBelow, StrikeThrough, Subscript, Superscript, TabSet, Underline
Methods inherited from class javax.swing.text.StyleConstants
getAlignment, getBackground, getBidiLevel, getComponent, getFirstLineIndent, getFontFamily, getFontSize, getForeground, getIcon, getLeftIndent, getLineSpacing, getRightIndent, getSpaceAbove, getSpaceBelow, getTabSet, isBold, isItalic, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setAlignment, setBackground, setBidiLevel, setBold, setComponent, setFirstLineIndent, setFontFamily, setFontSize, setForeground, setIcon, setItalic, setLeftIndent, setLineSpacing, setRightIndent, setSpaceAbove, setSpaceBelow, setStrikeThrough, setSubscript, setSuperscript, setTabSet, setUnderline, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

Foreground

public static final Object Foreground
Name of the foreground color attribute.

Background

public static final Object Background
Name of the background color attribute.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComponentView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class ComponentView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.ComponentView
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
FormView, ObjectView
public class ComponentView
extends View

Component decorator that implements the view interface. The entire element is used to represent the component. This acts as a gateway from the display-only View implementations to interactive lightweight components (ie it allows components to be embedded into the View hierarchy).

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ComponentView(Element elem)
Creates a new ComponentView object.
Method Summary
protected Component | createComponent() Create the component that is associated with this view.
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
Component | getComponent() Fetch the component associated with the view.
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the coordinate space of the model to that of the view.
void | paint(Graphics g, Shape a) The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).
void | setParent(View p) Sets the parent for a child view.
void | setSize(float width, float height) Sets the size of the view.
int | viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComponentView

public ComponentView(Element elem)
Creates a new ComponentView object.
Parameters:
elem - the element to decorate
Method Detail

createComponent

protected Component createComponent()
Create the component that is associated with this view. This will be called when it has been determined that a new component is needed. This would result from a call to setParent or as a result of being notified that attributes have changed.

getComponent

public final Component getComponent()
Fetch the component associated with the view.

paint

public void paint(Graphics g,
                  Shape a)
The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view). This is implemented to do nothing.
Overrides:
paint in class View
Parameters:
g - the graphics context
a - the shape
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis. This is implemented to return the value returned by Component.getPreferredSize along the axis of interest.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. This is implemented to return the value returned by Component.getMinimumSize along the axis of interest.
Overrides:
getMinimumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. This is implemented to return the value returned by Component.getMaximumSize along the axis of interest.
Overrides:
getMaximumSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. This is implemented to give the alignment of the embedded component.
Overrides:
getAlignment in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. This is implemented to do nothing since the component itself will get its size established by the LayoutManager installed on the hosting Container.
Overrides:
setSize in class View
Parameters:
width - the width >= 0
height - the height >= 0

setParent

public void setParent(View p)
Sets the parent for a child view. The parent calls this on the child to tell it who its parent is, giving the view access to things like the hosting Container. The superclass behavior is executed, followed by a call to createComponent if a component has not yet been created and the embedded components parent is set to the value returned by getContainer.

The changing of the component hierarhcy will touch the component lock, which is the one thing that is not safe from the View hierarchy. Therefore, this functionality is executed immediately if on the event thread, or is queued on the event queue if called from another thread (notification of change from an asynchronous update).

Overrides:
setParent in class View
Parameters:
p - the parent

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the coordinate space of the model to that of the view.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class View
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompositeView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class CompositeView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
BoxView
public abstract class CompositeView
extends View

A view that is composed of other views (has children). As a container of children, the composite view needs to provide:

services to manage the collection of children
The following methods can be used to manage the collection.
  • removeAll
  • insert
  • append
  • replace
  • getViewCount
  • getView
  • loadChildren
layout of the children
This class does not implement a layout policy as it is abstract. A subclass will determine how the children are laid out by implementing the setSize method to position the children when the size has been changed.
paint the children
This class does not attempt to paint the children. Subclasses will want to use the layout information and call paint on the children that are visible (intersect the clipping region) with the Shape argument set to the location of the child view.
propagation of DocumentEvent information to the appropriate children.
propagation of model/view translation to the proper child.

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
CompositeView(Element elem)
Constructs a CompositeView for the given element.
Method Summary
protected abstract void | childAllocation(int index, Rectangle a) Returns the allocation for a given child.
protected boolean | flipEastAndWestAtEnds(int position, Position.Bias bias) Subclasses may wish to subclass this and conditionally return true based on the position.
protected short | getBottomInset() Gets the bottom inset.
Shape | getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
protected Rectangle | getInsideAllocation(Shape a) Translates the immutable allocation given to the view to a mutable allocation that represents the interior allocation (i.e.
protected short | getLeftInset() Gets the left inset.
protected int | getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
protected int | getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction.
int | getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
protected short | getRightInset() Gets the right inset.
protected short | getTopInset() Gets the top inset.
View | getView(int n) Gets the n-th view in this container.
protected abstract View | getViewAtPoint(int x, int y, Rectangle alloc) Fetches the child view at the given point.
protected View | getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
int | getViewCount() Returns the number of child views of this view.
int | getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
protected int | getViewIndexAtPosition(int pos) Fetches the child view index representing the given position in the model.
protected abstract boolean | isAfter(int x, int y, Rectangle alloc) Tests whether a point lies after the rectangle range.
protected abstract boolean | isBefore(int x, int y, Rectangle alloc) Tests whether a point lies before the rectangle range.
protected void | loadChildren(ViewFactory f) Loads all of the children to initialize the view.
Shape | modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | replace(int offset, int length, View[] views) Replace child views.
protected void | setInsets(short top, short left, short bottom, short right) Sets the insets for the view.
protected void | setParagraphInsets(AttributeSet attr) Sets the insets from the paragraph attributes specified in the given attributes.
void | setParent(View parent) Sets the parent of the view.
int | viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getPreferredSpan, getResizeWeight, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, paint, preferenceChanged, remove, removeAll, removeUpdate, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompositeView

public CompositeView(Element elem)
Constructs a CompositeView for the given element.
Parameters:
elem - the element this view is responsible for
Method Detail

loadChildren

protected void loadChildren(ViewFactory f)
Loads all of the children to initialize the view. This is called by the setParent method. Subclasses can reimplement this to initialize their child views in a different manner. The default implementation creates a child view for each child element.
Parameters:
f - the view factory
See Also:
setParent(javax.swing.text.View)

setParent

public void setParent(View parent)
Sets the parent of the view. This is reimplemented to provide the superclass behavior as well as calling the loadChildren method if this view does not already have children. The children should not be loaded in the constructor because the act of setting the parent may cause them to try to search up the hierarchy (to get the hosting Container for example). If this view has children (the view is being moved from one place in the view hierarchy to another), the loadChildren method will not be called.
Overrides:
setParent in class View
Parameters:
parent - the parent of the view, null if none

getViewCount

public int getViewCount()
Returns the number of child views of this view.
Overrides:
getViewCount in class View
Returns:
the number of views >= 0
See Also:
getView(int)

getView

public View getView(int n)
Gets the n-th view in this container.
Overrides:
getView in class View
Parameters:
n - the number of the view to get, >= 0 && Returns:
the view

replace

public void replace(int offset,
                    int length,
                    View[] views)
Replace child views. If there are no views to remove this acts as an insert. If there are no views to add this acts as a remove. Views being removed will have the parent set to null, and the internal reference to them removed so that they can be garbage collected.
Overrides:
replace in class View
Parameters:
index - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount.length - the number of existing child views to remove. This should be a value >= 0 and <= (getViewCount()="(getViewCount()" -="-" offset).views - the child views to add. This value can be null to indicate no children are being added (useful to remove).

getChildAllocation

public Shape getChildAllocation(int index,
                                Shape a)
Fetches the allocation for the given child view. This enables finding out where various views are located.
Overrides:
getChildAllocation in class View
Parameters:
index - the index of the child, >= 0 && a - the allocation to this view.
Returns:
the allocation to the child

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

modelToView

public Shape modelToView(int p0,
                         Position.Bias b0,
                         int p1,
                         Position.Bias b1,
                         Shape a)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
p0 - the position to convert >= 0
b0 - the bias toward the previous character or the next character represented by p0, in case the position is a boundary of two views.
p1 - the position to convert >= 0
b1 - the bias toward the previous character or the next character represented by p1, in case the position is a boundary of two views.
a - the allocated region to render into
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
IllegalArgumentException - for an invalid bias argument
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class View
Parameters:
x - x coordinate of the view location to convert >= 0
y - y coordinate of the view location to convert >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

getNextVisualPositionFrom

public int getNextVisualPositionFrom(int pos,
                                     Position.Bias b,
                                     Shape a,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Overrides:
getNextVisualPositionFrom in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

getViewIndex

public int getViewIndex(int pos,
                        Position.Bias b)
Returns the child view index representing the given position in the model. This is implemented to call the getViewIndexByPosition method for backward compatibility.
Overrides:
getViewIndex in class View
Parameters:
pos - the position >= 0

isBefore

protected abstract boolean isBefore(int x,
                                    int y,
                                    Rectangle alloc)
Tests whether a point lies before the rectangle range.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
alloc - the rectangle
Returns:
true if the point is before the specified range

isAfter

protected abstract boolean isAfter(int x,
                                   int y,
                                   Rectangle alloc)
Tests whether a point lies after the rectangle range.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
alloc - the rectangle
Returns:
true if the point is after the specified range

getViewAtPoint

protected abstract View getViewAtPoint(int x,
                                       int y,
                                       Rectangle alloc)
Fetches the child view at the given point.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
alloc - the parent's allocation on entry, which should be changed to the child's allocation on exit
Returns:
the child view

childAllocation

protected abstract void childAllocation(int index,
                                        Rectangle a)
Returns the allocation for a given child.
Parameters:
index - the index of the child, >= 0 && a - the allocation to the interior of the box on entry, and the allocation of the child view at the index on exit.

getViewAtPosition

protected View getViewAtPosition(int pos,
                                 Rectangle a)
Fetches the child view that represents the given position in the model. This is implemented to fetch the view in the case where there is a child view for each child element.
Parameters:
pos - the position >= 0
a - the allocation to the interior of the box on entry, and the allocation of the view containing the position on exit

getViewIndexAtPosition

protected int getViewIndexAtPosition(int pos)
Fetches the child view index representing the given position in the model. This is implemented to fetch the view in the case where there is a child view for each child element.
Parameters:
pos - the position >= 0

getInsideAllocation

protected Rectangle getInsideAllocation(Shape a)
Translates the immutable allocation given to the view to a mutable allocation that represents the interior allocation (i.e. the bounds of the given allocation with the top, left, bottom, and right insets removed. It is expected that the returned value would be further mutated to represent an allocation to a child view. This is implemented to reuse an instance variable so it avoids creating excessive Rectangles. Typically the result of calling this method would be fed to the childAllocation method.
Parameters:
a - The allocation given to the view.

setParagraphInsets

protected void setParagraphInsets(AttributeSet attr)
Sets the insets from the paragraph attributes specified in the given attributes.
Parameters:
attr - the attributes

setInsets

protected void setInsets(short top,
                         short left,
                         short bottom,
                         short right)
Sets the insets for the view.
Parameters:
top - the top inset >= 0
left - the left inset >= 0
bottom - the bottom inset >= 0
right - the right inset >= 0

getLeftInset

protected short getLeftInset()
Gets the left inset.
Returns:
the inset >= 0

getRightInset

protected short getRightInset()
Gets the right inset.
Returns:
the inset >= 0

getTopInset

protected short getTopInset()
Gets the top inset.
Returns:
the inset >= 0

getBottomInset

protected short getBottomInset()
Gets the bottom inset.
Returns:
the inset >= 0

getNextNorthSouthVisualPositionFrom

protected int getNextNorthSouthVisualPositionFrom(int pos,
                                                  Position.Bias b,
                                                  Shape a,
                                                  int direction,
                                                  Position.Bias[] biasRet)
                                           throws BadLocationException
Returns the next visual position for the cursor, in either the east or west direction.
Returns:
next position west of the passed in position.

getNextEastWestVisualPositionFrom

protected int getNextEastWestVisualPositionFrom(int pos,
                                                Position.Bias b,
                                                Shape a,
                                                int direction,
                                                Position.Bias[] biasRet)
                                         throws BadLocationException
Returns the next visual position for the cursor, in either the east or west direction.
Returns:
next position west of the passed in position.

flipEastAndWestAtEnds

protected boolean flipEastAndWestAtEnds(int position,
                                        Position.Bias bias)
Subclasses may wish to subclass this and conditionally return true based on the position. A return value of true indicates that when a View returns -1 from getNextVisualPositionFrom the next view for east should be the current index offset by -1, and for west it means offset by 1. The normal direction (for left to right text) is to offset east by 1 and west by -1.
Returns:
false
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Content

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface AbstractDocument.Content

All Known Implementing Classes:
StringContent, GapContent
Enclosing class:
AbstractDocument
public static interface AbstractDocument.Content

Interface to describe a sequence of character content that can be edited. Implementations may or may not support a history mechanism which will be reflected by whether or not mutations return an UndoableEdit implementation.

See Also:
AbstractDocument

Method Summary
Position | createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
void | getChars(int where, int len, Segment txt) Gets a sequence of characters and copies them into a Segment.
String | getString(int where, int len) Fetches a string of characters contained in the sequence.
UndoableEdit | insertString(int where, String str) Inserts a string of characters into the sequence.
int | length() Current length of the sequence of character content.
UndoableEdit | remove(int where, int nitems) Removes some portion of the sequence.

Method Detail

createPosition

public Position createPosition(int offset)
                        throws BadLocationException
Creates a position within the content that will track change as the content is mutated.
Parameters:
offset - the offset in the content >= 0
Returns:
a Position
Throws:
BadLocationException - for an invalid offset

length

public int length()
Current length of the sequence of character content.
Returns:
the length >= 0

insertString

public UndoableEdit insertString(int where,
                                 String str)
                          throws BadLocationException
Inserts a string of characters into the sequence.
Parameters:
where - Offset into the sequence to make the insertion >= 0.
str - String to insert.
Returns:
If the implementation supports a history mechansim, a reference to an Edit implementation will be returned, otherwise null.
Throws:
BadLocationException - Thrown if the area covered by the arguments is not contained in the character sequence.

remove

public UndoableEdit remove(int where,
                           int nitems)
                    throws BadLocationException
Removes some portion of the sequence.
Parameters:
where - The offset into the sequence to make the insertion >= 0.
nitems - The number of items in the sequence to remove >= 0.
Returns:
If the implementation supports a history mechansim, a reference to an Edit implementation will be returned, otherwise null.
Throws:
BadLocationException - Thrown if the area covered by the arguments is not contained in the character sequence.

getString

public String getString(int where,
                        int len)
                 throws BadLocationException
Fetches a string of characters contained in the sequence.
Parameters:
where - Offset into the sequence to fetch >= 0.
len - number of characters to copy >= 0.
Returns:
the string
Throws:
BadLocationException - Thrown if the area covered by the arguments is not contained in the character sequence.

getChars

public void getChars(int where,
                     int len,
                     Segment txt)
              throws BadLocationException
Gets a sequence of characters and copies them into a Segment.
Parameters:
where - the starting offset >= 0
len - the number of characters >= 0
txt - the target location to copy into
Throws:
BadLocationException - Thrown if the area covered by the arguments is not contained in the character sequence.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CopyAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.CopyAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.CopyAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.CopyAction
extends TextAction

Coies the selected region and place its contents into the system clipboard.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.copyAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.CopyAction()
Create this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.CopyAction

public DefaultEditorKit.CopyAction()
Create this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CutAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.CutAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.CutAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.CutAction
extends TextAction

Cuts the selected region and place its contents into the system clipboard.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.cutAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.CutAction()
Create this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.CutAction

public DefaultEditorKit.CutAction()
Create this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultCaret

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultCaret

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.Rectangle
                    |
                    +--javax.swing.text.DefaultCaret
All Implemented Interfaces:
Caret, Cloneable, EventListener, FocusListener, MouseListener, MouseMotionListener, Serializable, Shape
Direct Known Subclasses:
BasicTextUI.BasicCaret
public class DefaultCaret
extends Rectangle
implements Caret, FocusListener, MouseListener, MouseMotionListener

A default implementation of Caret. The caret is rendered as a vertical line in the color specified by the CaretColor property of the associated JTextComponent. It can blink at the rate specified by the BlinkRate property.

This implementation expects two sources of asynchronous notification. The timer thread fires asynchronously, and causes the caret to simply repaint the most recent bounding box. The caret also tracks change as the document is modified. Typically this will happen on the event thread as a result of some mouse or keyboard event. Updates can also occur from some other thread mutating the document. There is a property AsynchronousMovement that determines if the caret will move on asynchronous updates. The default behavior is to not update on asynchronous updates. If asynchronous updates are allowed, the update thread will fire the caret position change to listeners asynchronously. The repaint of the new caret location will occur on the event thread in any case, as calls to modelToView are only safe on the event thread.

The caret acts as a mouse and focus listener on the text component it has been installed in, and defines the caret semantics based upon those events. The listener methods can be reimplemented to change the semantics. By default, the first mouse button will be used to set focus and caret position. Dragging the mouse pointer with the first mouse button will sweep out a selection that is contiguous in the model. If the associated text component is editable, the caret will become visible when focus is gained, and invisible when focus is lost.

The Highlighter bound to the associated text component is used to render the selection by default. Selection appearance can be customized by supplying a painter to use for the highlights. By default a painter is used that will render a solid color as specified in the associated text component in the SelectionColor property. This can easily be changed by reimplementing the getSelectionHighlighter method.

A customized caret appearance can be achieved by reimplementing the paint method. If the paint method is changed, the damage method should also be reimplemented to cause a repaint for the area needed to render the caret. The caret extends the Rectangle class which is used to hold the bounding box for where the caret was last rendered. This enables the caret to repaint in a thread-safe manner when the caret moves without making a call to modelToView which is unstable between model updates and view repair (i.e. the order of delivery to DocumentListeners is not guaranteed).

The magic caret position is set to null when the caret position changes. A timer is used to determine the new location (after the caret change). When the timer fires, if the magic caret position is still null it is reset to the current caret position. Any actions that change the caret position and want the magic caret position to remain the same, must remember the magic caret position, change the cursor, and then set the magic caret position to its original value. This has the benefit that only actions that want the magic caret position to persist (such as open/down) need to know about it.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Caret, Serialized Form

Inner classes inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
Field Summary
protected ChangeEvent | changeEvent The change event for the model.
protected EventListenerList | listenerList The event listener list.
Fields inherited from class java.awt.Rectangle
height, width, x, y
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor Summary
DefaultCaret()
Constructs a default caret.
Method Summary
void | addChangeListener(ChangeListener l) Adds a listener to track whenever the caret position has been changed.
protected void | adjustVisibility(Rectangle nloc) Scrolls the associated view (if necessary) to make the caret visible.
protected void | damage(Rectangle r) Damages the area surrounding the caret to cause it to be repainted in a new location.
void | deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
boolean | equals(Object obj) Compares this object to the specifed object.
protected void | fireStateChanged() Notifies all listeners that have registered interest for notification on this event type.
void | focusGained(FocusEvent e) Called when the component containing the caret gains focus.
void | focusLost(FocusEvent e) Called when the component containing the caret loses focus.
int | getBlinkRate() Gets the caret blink rate.
protected JTextComponent | getComponent() Gets the text editor component that this caret is is bound to.
int | getDot() Fetches the current position of the caret.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
Point | getMagicCaretPosition() Gets the saved caret position.
int | getMark() Fetches the current position of the mark.
protected Highlighter.HighlightPainter | getSelectionPainter() Gets the painter for the Highlighter.
void | install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
boolean | isSelectionVisible() Checks whether the current selection is visible.
boolean | isVisible() Determines if the caret is currently visible.
void | mouseClicked(MouseEvent e) Called when the mouse is clicked.
void | mouseDragged(MouseEvent e) Moves the caret position according to the mouse pointer's current location.
void | mouseEntered(MouseEvent e) Called when the mouse enters a region.
void | mouseExited(MouseEvent e) Called when the mouse exits a region.
void | mouseMoved(MouseEvent e) Called when the mouse is moved.
void | mousePressed(MouseEvent e) If button 1 is pressed, this is implemented to request focus on the associated text component, and to set the caret position.
void | mouseReleased(MouseEvent e) Called when the mouse is released.
protected void | moveCaret(MouseEvent e) Tries to move the position of the caret from the coordinates of a mouse event, using viewToModel().
void | moveDot(int dot) Moves the caret position to some other position.
void | paint(Graphics g) Renders the caret as a vertical line.
protected void | positionCaret(MouseEvent e) Tries to set the position of the caret from the coordinates of a mouse event, using viewToModel().
void | removeChangeListener(ChangeListener l) Removes a listener that was tracking caret position changes.
protected void | repaint() Cause the caret to be painted.
void | setBlinkRate(int rate) Sets the caret blink rate.
void | setDot(int dot) Sets the caret position and mark to some position.
void | setMagicCaretPosition(Point p) Saves the current caret position.
void | setSelectionVisible(boolean vis) Changes the selection visibility.
void | setVisible(boolean e) Sets the caret visibility, and repaints the caret.
String | toString() Returns a String representing this Rectangle and its values.
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects

Field Detail

listenerList

protected EventListenerList listenerList
The event listener list.

changeEvent

protected transient ChangeEvent changeEvent
The change event for the model. Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".
Constructor Detail

DefaultCaret

public DefaultCaret()
Constructs a default caret.
Method Detail

getComponent

protected final JTextComponent getComponent()
Gets the text editor component that this caret is is bound to.
Returns:
the component

repaint

protected final void repaint()
Cause the caret to be painted. The repaint area is the bounding box of the caret (i.e. the caret rectangle or this).

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

damage

protected void damage(Rectangle r)
Damages the area surrounding the caret to cause it to be repainted in a new location. If paint() is reimplemented, this method should also be reimplemented. This method should update the caret bounds (x, y, width, and height).
Parameters:
r - the current location of the caret
See Also:
paint(java.awt.Graphics)

adjustVisibility

protected void adjustVisibility(Rectangle nloc)
Scrolls the associated view (if necessary) to make the caret visible. Since how this should be done is somewhat of a policy, this method can be reimplemented to change the behavior. By default the scrollRectToVisible method is called on the associated component.
Parameters:
nloc - the new position to scroll to

getSelectionPainter

protected Highlighter.HighlightPainter getSelectionPainter()
Gets the painter for the Highlighter.
Returns:
the painter

positionCaret

protected void positionCaret(MouseEvent e)
Tries to set the position of the caret from the coordinates of a mouse event, using viewToModel().
Parameters:
e - the mouse event

moveCaret

protected void moveCaret(MouseEvent e)
Tries to move the position of the caret from the coordinates of a mouse event, using viewToModel(). This will cause a selection if the dot and mark are different.
Parameters:
e - the mouse event

focusGained

public void focusGained(FocusEvent e)
Called when the component containing the caret gains focus. This is implemented to set the caret to visible if the component is editable.
Specified by:
focusGained in interface FocusListener
Parameters:
e - the focus event
See Also:
FocusListener.focusGained(java.awt.event.FocusEvent)

focusLost

public void focusLost(FocusEvent e)
Called when the component containing the caret loses focus. This is implemented to set the caret to visibility to false.
Specified by:
focusLost in interface FocusListener
Parameters:
e - the focus event
See Also:
FocusListener.focusLost(java.awt.event.FocusEvent)

mouseClicked

public void mouseClicked(MouseEvent e)
Called when the mouse is clicked. If the click was generated from button1, a double click selects a word, and a triple click the current line.
Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the mouse event
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mousePressed

public void mousePressed(MouseEvent e)
If button 1 is pressed, this is implemented to request focus on the associated text component, and to set the caret position. If the shift key is held down, the caret will be moved, potentially resulting in a selection, otherwise the caret position will be set to the new location. If the component is not enabled, there will be no request for focus.
Specified by:
mousePressed in interface MouseListener
Parameters:
e - the mouse event
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent e)
Called when the mouse is released.
Specified by:
mouseReleased in interface MouseListener
Parameters:
e - the mouse event
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent e)
Called when the mouse enters a region.
Specified by:
mouseEntered in interface MouseListener
Parameters:
e - the mouse event
See Also:
MouseListener.mouseEntered(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(MouseEvent e)
Called when the mouse exits a region.
Specified by:
mouseExited in interface MouseListener
Parameters:
e - the mouse event
See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
Moves the caret position according to the mouse pointer's current location. This effectively extends the selection. By default, this is only done for mouse button 1.
Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - the mouse event
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(MouseEvent e)
Called when the mouse is moved.
Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - the mouse event
See Also:
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)

paint

public void paint(Graphics g)
Renders the caret as a vertical line. If this is reimplemented the damage method should also be reimplemented as it assumes the shape of the caret is a vertical line. Sets the caret color to the value returned by getCaretColor().

If there are multiple text directions present in the associated document, a flag indicating the caret bias will be rendered. This will occur only if the associated document is a subclass of AbstractDocument and there are multiple bidi levels present in the bidi element structure (i.e. the text has multiple directions associated with it).

Specified by:
paint in interface Caret
Parameters:
g - the graphics context
See Also:
damage(java.awt.Rectangle)

install

public void install(JTextComponent c)
Called when the UI is being installed into the interface of a JTextComponent. This can be used to gain access to the model that is being navigated by the implementation of this interface. Sets the dot and mark to 0, and establishes document, property change, focus, mouse, and mouse motion listeners.
Specified by:
install in interface Caret
Parameters:
c - the component
See Also:
Caret.install(javax.swing.text.JTextComponent)

deinstall

public void deinstall(JTextComponent c)
Called when the UI is being removed from the interface of a JTextComponent. This is used to unregister any listeners that were attached.
Specified by:
deinstall in interface Caret
Parameters:
c - the component
See Also:
Caret.deinstall(javax.swing.text.JTextComponent)

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener to track whenever the caret position has been changed.
Specified by:
addChangeListener in interface Caret
Parameters:
l - the listener
See Also:
Caret.addChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a listener that was tracking caret position changes.
Specified by:
removeChangeListener in interface Caret
Parameters:
l - the listener
See Also:
Caret.removeChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed last to first.
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3

setSelectionVisible

public void setSelectionVisible(boolean vis)
Changes the selection visibility.
Specified by:
setSelectionVisible in interface Caret
Parameters:
vis - the new visibility

isSelectionVisible

public boolean isSelectionVisible()
Checks whether the current selection is visible.
Specified by:
isSelectionVisible in interface Caret
Returns:
true if the selection is visible

isVisible

public boolean isVisible()
Determines if the caret is currently visible.
Specified by:
isVisible in interface Caret
Returns:
true if visible else false
See Also:
Caret.isVisible()

setVisible

public void setVisible(boolean e)
Sets the caret visibility, and repaints the caret.
Specified by:
setVisible in interface Caret
Parameters:
e - the visibility specifier
See Also:
Caret.setVisible(boolean)

setBlinkRate

public void setBlinkRate(int rate)
Sets the caret blink rate.
Specified by:
setBlinkRate in interface Caret
Parameters:
rate - the rate in milliseconds, 0 to stop blinking
See Also:
Caret.setBlinkRate(int)

getBlinkRate

public int getBlinkRate()
Gets the caret blink rate.
Specified by:
getBlinkRate in interface Caret
See Also:
Caret.getBlinkRate()

getDot

public int getDot()
Fetches the current position of the caret.
Specified by:
getDot in interface Caret
Returns:
the position >= 0
See Also:
Caret.getDot()

getMark

public int getMark()
Fetches the current position of the mark. If there is a selection, the dot and mark will not be the same.
Specified by:
getMark in interface Caret
Returns:
the position >= 0
See Also:
Caret.getMark()

setDot

public void setDot(int dot)
Sets the caret position and mark to some position. This implicitly sets the selection range to zero.
Specified by:
setDot in interface Caret
Parameters:
dot - the position >= 0
See Also:
Caret.setDot(int)

moveDot

public void moveDot(int dot)
Moves the caret position to some other position.
Specified by:
moveDot in interface Caret
Parameters:
dot - the position >= 0
See Also:
Caret.moveDot(int)

setMagicCaretPosition

public void setMagicCaretPosition(Point p)
Saves the current caret position. This is used when caret up/down actions occur, moving between lines that have uneven end positions.
Specified by:
setMagicCaretPosition in interface Caret
Parameters:
p - the position
See Also:
getMagicCaretPosition()

getMagicCaretPosition

public Point getMagicCaretPosition()
Gets the saved caret position.
Specified by:
getMagicCaretPosition in interface Caret
Returns:
the position see #setMagicCaretPosition

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The superclass behavior of comparing rectangles is not desired, so this is changed to the Object behavior.
Overrides:
equals in class Rectangle
Parameters:
obj - the object to compare this font with.
Returns:
true if the objects are equal; false otherwise.

toString

public String toString()
Description copied from class: Rectangle
Returns a String representing this Rectangle and its values.
Overrides:
toString in class Rectangle
Following copied from class: java.awt.Rectangle
Returns:
a String representing this Rectangle object's coordinate and size values.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultDocumentEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument.DefaultDocumentEvent

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
              |
              +--javax.swing.text.AbstractDocument.DefaultDocumentEvent
All Implemented Interfaces:
DocumentEvent, Serializable, UndoableEdit
Enclosing class:
AbstractDocument
public class AbstractDocument.DefaultDocumentEvent
extends CompoundEdit
implements DocumentEvent

Stores document changes as the document is being modified. Can subsequently be used for change notification when done with the document modification transaction. This is used by the AbstractDocument class and its extensions for broadcasting change information to the document listeners.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.event.DocumentEvent
DocumentEvent.ElementChange, DocumentEvent.EventType
Fields inherited from class javax.swing.undo.CompoundEdit
edits
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
AbstractDocument.DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
Constructs a change record.
Method Summary
boolean | addEdit(UndoableEdit anEdit) Adds a document edit.
DocumentEvent.ElementChange | getChange(Element elem) Gets the changes for an element.
Document | getDocument() Gets the document that sourced the change event.
int | getLength() Returns the length of the change.
int | getOffset() Returns the offset within the document of the start of the change.
String | getPresentationName() Provides a localized, human readable description of this edit suitable for use in, say, a change log.
String | getRedoPresentationName() Provides a localized, human readable description of the redoable form of this edit, e.g.
DocumentEvent.EventType | getType() Returns the type of event.
String | getUndoPresentationName() Provides a localized, human readable description of the undoable form of this edit, e.g.
boolean | isSignificant() DefaultDocument events are significant.
void | redo() Redoes a change.
String | toString() Returns a string description of the change event.
void | undo() Undoes a change.
Methods inherited from class javax.swing.undo.CompoundEdit
canRedo, canUndo, die, end, isInProgress, lastEdit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractDocument.DefaultDocumentEvent

public AbstractDocument.DefaultDocumentEvent(int offs,
                                             int len,
                                             DocumentEvent.EventType type)
Constructs a change record.
Parameters:
offs - the offset into the document of the change >= 0
len - the length of the change >= 0
type - the type of event (DocumentEvent.EventType)
Method Detail

toString

public String toString()
Returns a string description of the change event.
Overrides:
toString in class CompoundEdit
Returns:
a string

addEdit

public boolean addEdit(UndoableEdit anEdit)
Adds a document edit. If the number of edits crosses a threshold, this switches on a hashtable lookup for ElementChange implementations since access of these needs to be relatively quick.
Overrides:
addEdit in class CompoundEdit
Parameters:
anEdit - a document edit record
Returns:
true if the edit was added

redo

public void redo()
          throws CannotRedoException
Redoes a change.
Overrides:
redo in class CompoundEdit
Throws:
CannotRedoException - if the change cannot be redone

undo

public void undo()
          throws CannotUndoException
Undoes a change.
Overrides:
undo in class CompoundEdit
Throws:
CannotUndoException - if the change cannot be undone

isSignificant

public boolean isSignificant()
DefaultDocument events are significant. If you wish to aggregate DefaultDocumentEvents to present them as a single edit to the user place them into a CompoundEdit.
Overrides:
isSignificant in class CompoundEdit
Returns:
whether the event is significant for edit undo purposes

getPresentationName

public String getPresentationName()
Provides a localized, human readable description of this edit suitable for use in, say, a change log.
Overrides:
getPresentationName in class CompoundEdit
Returns:
the description

getUndoPresentationName

public String getUndoPresentationName()
Provides a localized, human readable description of the undoable form of this edit, e.g. for use as an Undo menu item. Typically derived from getDescription();
Overrides:
getUndoPresentationName in class CompoundEdit
Returns:
the description

getRedoPresentationName

public String getRedoPresentationName()
Provides a localized, human readable description of the redoable form of this edit, e.g. for use as a Redo menu item. Typically derived from getPresentationName();
Overrides:
getRedoPresentationName in class CompoundEdit
Returns:
the description

getType

public DocumentEvent.EventType getType()
Returns the type of event.
Specified by:
getType in interface DocumentEvent
Returns:
the event type as a DocumentEvent.EventType
See Also:
DocumentEvent.getType()

getOffset

public int getOffset()
Returns the offset within the document of the start of the change.
Specified by:
getOffset in interface DocumentEvent
Returns:
the offset >= 0
See Also:
DocumentEvent.getOffset()

getLength

public int getLength()
Returns the length of the change.
Specified by:
getLength in interface DocumentEvent
Returns:
the length >= 0
See Also:
DocumentEvent.getLength()

getDocument

public Document getDocument()
Gets the document that sourced the change event.
Specified by:
getDocument in interface DocumentEvent
Returns:
the document
See Also:
DocumentEvent.getDocument()

getChange

public DocumentEvent.ElementChange getChange(Element elem)
Gets the changes for an element.
Specified by:
getChange in interface DocumentEvent
Parameters:
elem - the element
Returns:
the changes
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultEditorKit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
StyledEditorKit
public class DefaultEditorKit
extends EditorKit

This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document. This implementation provides a default implementation which treats text as plain text and provides a minimal set of actions for a simple editor.

See Also:
Serialized Form

Inner Class Summary
static class | DefaultEditorKit.BeepAction Creates a beep.
static class | DefaultEditorKit.CopyAction Coies the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.CutAction Cuts the selected region and place its contents into the system clipboard.
static class | DefaultEditorKit.DefaultKeyTypedAction The action that is executed by default if a key typed event is received and there is no keymap entry.
static class | DefaultEditorKit.InsertBreakAction Places a line/paragraph break into the document.
static class | DefaultEditorKit.InsertContentAction Places content into the associated document.
static class | DefaultEditorKit.InsertTabAction Places a tab character into the document.
static class | DefaultEditorKit.PasteAction Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
Field Summary
static String | backwardAction Name of the Action for moving the caret logically backward one position.
static String | beepAction Name of the action to create a beep.
static String | beginAction Name of the Action for moving the caret to the begining of the document.
static String | beginLineAction Name of the Action for moving the caret to the begining of a line.
static String | beginParagraphAction Name of the Action for moving the caret to the begining of a paragraph.
static String | beginWordAction Name of the Action for moving the caret to the begining of a word.
static String | copyAction Name of the action to copy the selected region and place the contents into the system clipboard.
static String | cutAction Name of the action to cut the selected region and place the contents into the system clipboard.
static String | defaultKeyTypedAction Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
static String | deleteNextCharAction Name of the action to delete the character of content that follows the current caret position.
static String | deletePrevCharAction Name of the action to delete the character of content that precedes the current caret position.
static String | downAction Name of the Action for moving the caret logically downward one position.
static String | endAction Name of the Action for moving the caret to the end of the document.
static String | endLineAction Name of the Action for moving the caret to the end of a line.
static String | EndOfLineStringProperty When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".
static String | endParagraphAction Name of the Action for moving the caret to the end of a paragraph.
static String | endWordAction Name of the Action for moving the caret to the end of a word.
static String | forwardAction Name of the Action for moving the caret logically forward one position.
static String | insertBreakAction Name of the action to place a line/paragraph break into the document.
static String | insertContentAction Name of the action to place content into the associated document.
static String | insertTabAction Name of the action to place a tab character into the document.
static String | nextWordAction Name of the Action for moving the caret to the begining of the next word.
static String | pageDownAction Name of the action to page down vertically.
static String | pageUpAction Name of the action to page up vertically.
static String | pasteAction Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
static String | previousWordAction Name of the Action for moving the caret to the begining of the previous word.
static String | readOnlyAction Name of the action to set the editor into read-only mode.
static String | selectAllAction Name of the Action for selecting the entire document
static String | selectionBackwardAction Name of the Action for extending the selection by moving the caret logically backward one position.
static String | selectionBeginAction Name of the Action for moving the caret to the begining of the document.
static String | selectionBeginLineAction Name of the Action for moving the caret to the begining of a line, extending the selection.
static String | selectionBeginParagraphAction Name of the Action for moving the caret to the begining of a paragraph, extending the selection.
static String | selectionBeginWordAction Name of the Action for moving the caret to the begining of a word, extending the selection.
static String | selectionDownAction Name of the Action for moving the caret logically downward one position, extending the selection.
static String | selectionEndAction Name of the Action for moving the caret to the end of the document.
static String | selectionEndLineAction Name of the Action for moving the caret to the end of a line, extending the selection.
static String | selectionEndParagraphAction Name of the Action for moving the caret to the end of a paragraph, extending the selection.
static String | selectionEndWordAction Name of the Action for moving the caret to the end of a word, extending the selection.
static String | selectionForwardAction Name of the Action for extending the selection by moving the caret logically forward one position.
static String | selectionNextWordAction Name of the Action for moving the selection to the begining of the next word, extending the selection.
static String | selectionPreviousWordAction Name of the Action for moving the selection to the begining of the previous word, extending the selection.
static String | selectionUpAction Name of the Action for moving the caret logically upward one position, extending the selection.
static String | selectLineAction Name of the Action for selecting a line around the caret.
static String | selectParagraphAction Name of the Action for selecting a paragraph around the caret.
static String | selectWordAction Name of the Action for selecting a word around the caret.
static String | upAction Name of the Action for moving the caret logically upward one position.
static String | writableAction Name of the action to set the editor into writeable mode.
Constructor Summary
DefaultEditorKit()
default constructor for DefaultEditorKit
Method Summary
Caret | createCaret() Fetches a caret that can navigate through views produced by the associated ViewFactory.
Document | createDefaultDocument() Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.
Action[] | getActions() Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
String | getContentType() Gets the MIME type of the data that this kit represents support for.
ViewFactory | getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
void | read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | read(Reader in, Document doc, int pos) Inserts content from the given stream, which will be treated as plain text.
void | write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
void | write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream as plain text.
Methods inherited from class javax.swing.text.EditorKit
clone, deinstall, install
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EndOfLineStringProperty

public static final String EndOfLineStringProperty
When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".

insertContentAction

public static final String insertContentAction
Name of the action to place content into the associated document. If there is a selection, it is removed before the new content is added.
See Also:
getActions()

insertBreakAction

public static final String insertBreakAction
Name of the action to place a line/paragraph break into the document. If there is a selection, it is removed before the break is added.
See Also:
getActions()

insertTabAction

public static final String insertTabAction
Name of the action to place a tab character into the document. If there is a selection, it is removed before the tab is added.
See Also:
getActions()

deletePrevCharAction

public static final String deletePrevCharAction
Name of the action to delete the character of content that precedes the current caret position.
See Also:
getActions()

deleteNextCharAction

public static final String deleteNextCharAction
Name of the action to delete the character of content that follows the current caret position.
See Also:
getActions()

readOnlyAction

public static final String readOnlyAction
Name of the action to set the editor into read-only mode.
See Also:
getActions()

writableAction

public static final String writableAction
Name of the action to set the editor into writeable mode.
See Also:
getActions()

cutAction

public static final String cutAction
Name of the action to cut the selected region and place the contents into the system clipboard.
See Also:
JTextComponent.cut(), getActions()

copyAction

public static final String copyAction
Name of the action to copy the selected region and place the contents into the system clipboard.
See Also:
JTextComponent.copy(), getActions()

pasteAction

public static final String pasteAction
Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
See Also:
JTextComponent.paste(), getActions()

beepAction

public static final String beepAction
Name of the action to create a beep.
See Also:
getActions()

pageUpAction

public static final String pageUpAction
Name of the action to page up vertically.
See Also:
getActions()

pageDownAction

public static final String pageDownAction
Name of the action to page down vertically.
See Also:
getActions()

forwardAction

public static final String forwardAction
Name of the Action for moving the caret logically forward one position.
See Also:
getActions()

backwardAction

public static final String backwardAction
Name of the Action for moving the caret logically backward one position.
See Also:
getActions()

selectionForwardAction

public static final String selectionForwardAction
Name of the Action for extending the selection by moving the caret logically forward one position.
See Also:
getActions()

selectionBackwardAction

public static final String selectionBackwardAction
Name of the Action for extending the selection by moving the caret logically backward one position.
See Also:
getActions()

upAction

public static final String upAction
Name of the Action for moving the caret logically upward one position.
See Also:
getActions()

downAction

public static final String downAction
Name of the Action for moving the caret logically downward one position.
See Also:
getActions()

selectionUpAction

public static final String selectionUpAction
Name of the Action for moving the caret logically upward one position, extending the selection.
See Also:
getActions()

selectionDownAction

public static final String selectionDownAction
Name of the Action for moving the caret logically downward one position, extending the selection.
See Also:
getActions()

beginWordAction

public static final String beginWordAction
Name of the Action for moving the caret to the begining of a word.
See Also:
getActions()

endWordAction

public static final String endWordAction
Name of the Action for moving the caret to the end of a word.
See Also:
getActions()

selectionBeginWordAction

public static final String selectionBeginWordAction
Name of the Action for moving the caret to the begining of a word, extending the selection.
See Also:
getActions()

selectionEndWordAction

public static final String selectionEndWordAction
Name of the Action for moving the caret to the end of a word, extending the selection.
See Also:
getActions()

previousWordAction

public static final String previousWordAction
Name of the Action for moving the caret to the begining of the previous word.
See Also:
getActions()

nextWordAction

public static final String nextWordAction
Name of the Action for moving the caret to the begining of the next word. to the next of the document.
See Also:
getActions()

selectionPreviousWordAction

public static final String selectionPreviousWordAction
Name of the Action for moving the selection to the begining of the previous word, extending the selection.
See Also:
getActions()

selectionNextWordAction

public static final String selectionNextWordAction
Name of the Action for moving the selection to the begining of the next word, extending the selection.
See Also:
getActions()

beginLineAction

public static final String beginLineAction
Name of the Action for moving the caret to the begining of a line.
See Also:
getActions()

endLineAction

public static final String endLineAction
Name of the Action for moving the caret to the end of a line.
See Also:
getActions()

selectionBeginLineAction

public static final String selectionBeginLineAction
Name of the Action for moving the caret to the begining of a line, extending the selection.
See Also:
getActions()

selectionEndLineAction

public static final String selectionEndLineAction
Name of the Action for moving the caret to the end of a line, extending the selection.
See Also:
getActions()

beginParagraphAction

public static final String beginParagraphAction
Name of the Action for moving the caret to the begining of a paragraph.
See Also:
getActions()

endParagraphAction

public static final String endParagraphAction
Name of the Action for moving the caret to the end of a paragraph.
See Also:
getActions()

selectionBeginParagraphAction

public static final String selectionBeginParagraphAction
Name of the Action for moving the caret to the begining of a paragraph, extending the selection.
See Also:
getActions()

selectionEndParagraphAction

public static final String selectionEndParagraphAction
Name of the Action for moving the caret to the end of a paragraph, extending the selection.
See Also:
getActions()

beginAction

public static final String beginAction
Name of the Action for moving the caret to the begining of the document.
See Also:
getActions()

endAction

public static final String endAction
Name of the Action for moving the caret to the end of the document.
See Also:
getActions()

selectionBeginAction

public static final String selectionBeginAction
Name of the Action for moving the caret to the begining of the document.
See Also:
getActions()

selectionEndAction

public static final String selectionEndAction
Name of the Action for moving the caret to the end of the document.
See Also:
getActions()

selectWordAction

public static final String selectWordAction
Name of the Action for selecting a word around the caret.
See Also:
getActions()

selectLineAction

public static final String selectLineAction
Name of the Action for selecting a line around the caret.
See Also:
getActions()

selectParagraphAction

public static final String selectParagraphAction
Name of the Action for selecting a paragraph around the caret.
See Also:
getActions()

selectAllAction

public static final String selectAllAction
Name of the Action for selecting the entire document
See Also:
getActions()

defaultKeyTypedAction

public static final String defaultKeyTypedAction
Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
See Also:
getActions()
Constructor Detail

DefaultEditorKit

public DefaultEditorKit()
default constructor for DefaultEditorKit
Method Detail

getContentType

public String getContentType()
Gets the MIME type of the data that this kit represents support for. The default is text/plain.
Overrides:
getContentType in class EditorKit
Returns:
the type

getViewFactory

public ViewFactory getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit. The default is to have the UI produce the factory, so this method has no implementation.
Overrides:
getViewFactory in class EditorKit
Returns:
the view factory

getActions

public Action[] getActions()
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
Overrides:
getActions in class EditorKit
Returns:
the command list

createCaret

public Caret createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory.
Overrides:
createCaret in class EditorKit
Returns:
the caret

createDefaultDocument

public Document createDefaultDocument()
Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.
Overrides:
createDefaultDocument in class EditorKit
Returns:
the model

read

public void read(InputStream in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
Overrides:
read in class EditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public void write(OutputStream out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
Writes content from a document to the given stream in a format appropriate for this kind of content handler.
Overrides:
write in class EditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content >= 0.
len - The amount to write out >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

read

public void read(Reader in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Inserts content from the given stream, which will be treated as plain text.
Overrides:
read in class EditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public void write(Writer out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
Writes content from a document to the given stream as plain text.
Overrides:
write in class EditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content from >= 0.
len - The amount to write out >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos is not within 0 and the length of the document.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultHighlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultHighlighter

java.lang.Object
  |
  +--javax.swing.text.LayeredHighlighter
        |
        +--javax.swing.text.DefaultHighlighter
All Implemented Interfaces:
Highlighter
Direct Known Subclasses:
BasicTextUI.BasicHighlighter
public class DefaultHighlighter
extends LayeredHighlighter

Implements the Highlighter interfaces. Implements a simple highlight painter that renders in a solid color.

See Also:
Highlighter

Inner Class Summary
static class DefaultHighlighter.DefaultHighlightPainter
Simple highlight painter that fills a highlighted area with a solid color.
Inner classes inherited from class javax.swing.text.LayeredHighlighter
LayeredHighlighter.LayerPainter
Inner classes inherited from class javax.swing.text.Highlighter
Highlighter.Highlight, Highlighter.HighlightPainter
Field Summary
static LayeredHighlighter.LayerPainter DefaultPainter
Constructor Summary
DefaultHighlighter()
Creates a new DefaultHighlighther object.
Method Summary
Object | addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
void | changeHighlight(Object tag, int p0, int p1) Changes a highlight.
void | deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
boolean | getDrawsLayeredHighlights()
Highlighter.Highlight[] | getHighlights() Makes a copy of the highlights.
void | install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | paint(Graphics g) Renders the highlights.
void | paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) When leaf Views (such as LabelView) are rendering they should call into this method.
void | removeAllHighlights() Removes all highlights.
void | removeHighlight(Object tag) Removes a highlight from the view.
void | setDrawsLayeredHighlights(boolean newValue) If true, highlights are drawn as the Views draw the text.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DefaultPainter

public static LayeredHighlighter.LayerPainter DefaultPainter
Constructor Detail

DefaultHighlighter

public DefaultHighlighter()
Creates a new DefaultHighlighther object.
Method Detail

paint

public void paint(Graphics g)
Renders the highlights.
Parameters:
g - the graphics context

install

public void install(JTextComponent c)
Called when the UI is being installed into the interface of a JTextComponent. Installs the editor, and removes any existing highlights.
Parameters:
c - the editor component
See Also:
Highlighter.install(javax.swing.text.JTextComponent)

deinstall

public void deinstall(JTextComponent c)
Called when the UI is being removed from the interface of a JTextComponent.
Parameters:
c - the component
See Also:
Highlighter.deinstall(javax.swing.text.JTextComponent)

addHighlight

public Object addHighlight(int p0,
                           int p1,
                           Highlighter.HighlightPainter p)
                    throws BadLocationException
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.
Parameters:
p0 - the start offset of the range to highlight >= 0
p1 - the end offset of the range to highlight >= p0
p - the painter to use to actually render the highlight
Throws:
BadLocationException - if the specified location is invalid

removeHighlight

public void removeHighlight(Object tag)
Removes a highlight from the view.
Parameters:
tag - the reference to the highlight

removeAllHighlights

public void removeAllHighlights()
Removes all highlights.

changeHighlight

public void changeHighlight(Object tag,
                            int p0,
                            int p1)
                     throws BadLocationException
Changes a highlight.
Parameters:
tag - the highlight tag
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
Throws:
BadLocationException - if the specified location is invalid

getHighlights

public Highlighter.Highlight[] getHighlights()
Makes a copy of the highlights. Does not actually clone each highlight, but only makes references to them.
Returns:
the copy
See Also:
Highlighter.getHighlights()

paintLayeredHighlights

public void paintLayeredHighlights(Graphics g,
                                   int p0,
                                   int p1,
                                   Shape viewBounds,
                                   JTextComponent editor,
                                   View view)
When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately.
Overrides:
paintLayeredHighlights in class LayeredHighlighter
Parameters:
g - Graphics used to draw
p0 - starting offset of view
p1 - ending offset of view
viewBounds - Bounds of View
editor - JTextComponent
view - View instance being rendered

setDrawsLayeredHighlights

public void setDrawsLayeredHighlights(boolean newValue)
If true, highlights are drawn as the Views draw the text. That is the Views will call into paintLayeredHighlight which will result in a rectangle being drawn before the text is drawn (if the offsets are in a highlighted region that is). For this to work the painter supplied must be an instance of LayeredHighlightPainter.

getDrawsLayeredHighlights

public boolean getDrawsLayeredHighlights()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultHighlightPainter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultHighlighter.DefaultHighlightPainter

java.lang.Object
  |
  +--javax.swing.text.LayeredHighlighter.LayerPainter
        |
        +--javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
All Implemented Interfaces:
Highlighter.HighlightPainter
Enclosing class:
DefaultHighlighter
public static class DefaultHighlighter.DefaultHighlightPainter
extends LayeredHighlighter.LayerPainter

Simple highlight painter that fills a highlighted area with a solid color.

Constructor Summary
DefaultHighlighter.DefaultHighlightPainter(Color c)
Constructs a new highlight painter.
Method Summary
Color | getColor() Returns the color of the highlight.
void | paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c) Paints a highlight.
Shape | paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultHighlighter.DefaultHighlightPainter

public DefaultHighlighter.DefaultHighlightPainter(Color c)
Constructs a new highlight painter. If c is null, the JTextComponent will be queried for its selection color.
Parameters:
c - the color for the highlight
Method Detail

getColor

public Color getColor()
Returns the color of the highlight.
Returns:
the color

paint

public void paint(Graphics g,
                  int offs0,
                  int offs1,
                  Shape bounds,
                  JTextComponent c)
Paints a highlight.
Parameters:
g - the graphics context
offs0 - the starting model offset >= 0
offs1 - the ending model offset >= offs1
bounds - the bounding box for the highlight
c - the editor

paintLayer

public Shape paintLayer(Graphics g,
                        int offs0,
                        int offs1,
                        Shape bounds,
                        JTextComponent c,
                        View view)
Paints a portion of a highlight.
Overrides:
paintLayer in class LayeredHighlighter.LayerPainter
Parameters:
g - the graphics context
offs0 - the starting model offset >= 0
offs1 - the ending model offset >= offs1
bounds - the bounding box of the view, which is not necessarily the region to paint.
c - the editor
view - View painting for
Returns:
region drawing occured in
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultKeyTypedAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.DefaultKeyTypedAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.DefaultKeyTypedAction
extends TextAction

The action that is executed by default if a key typed event is received and there is no keymap entry. There is a variation across different VM's in what gets sent as a key typed event, and this action tries to filter out the undesired events. This filters the control characters and those with the ALT modifier. It allows Control-Alt sequences through as these form legitimate unicode characters on some PC keyboards.

If the event doesn't get filtered, it will try to insert content into the text editor. The content is fetched from the command string of the ActionEvent. The text entry is done through the replaceSelection method on the target text component. This is the action that will be fired for most text entry tasks.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.defaultKeyTypedAction,
DefaultEditorKit.getActions(),
Keymap.setDefaultAction(javax.swing.Action),
Keymap.getDefaultAction(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.DefaultKeyTypedAction()
Creates this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.DefaultKeyTypedAction

public DefaultEditorKit.DefaultKeyTypedAction()
Creates this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultStyledDocument

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultStyledDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.DefaultStyledDocument
All Implemented Interfaces:
Document, Serializable, StyledDocument
Direct Known Subclasses:
HTMLDocument
public class DefaultStyledDocument
extends AbstractDocument
implements StyledDocument

A document that can be marked up with character and paragraph styles in a manner similar to the Rich Text Format. The element structure for this document represents style crossings for style runs. These style runs are mapped into a paragraph element structure (which may reside in some other structure). The style runs break at paragraph boundaries since logical styles are assigned to paragraph boundaries.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Document, AbstractDocument, Serialized Form

Inner Class Summary
static class | DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.
class | DefaultStyledDocument.ElementBuffer Class to manage changes to the element hierarchy.
static class | DefaultStyledDocument.ElementSpec Specification for building elements.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...
Inner classes inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Field Summary
protected DefaultStyledDocument.ElementBuffer | buffer
static int | BUFFER_SIZE_DEFAULT The default size of the initial content buffer.
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Constructor Summary
DefaultStyledDocument()
Constructs a default styled document.
DefaultStyledDocument(AbstractDocument.Content c, StyleContext styles)
Constructs a styled document.
DefaultStyledDocument(StyleContext styles)
Constructs a styled document with the default content storage implementation and a shared set of styles.
Method Summary
void | addDocumentListener(DocumentListener listener) Adds a document listener for notification of any changes.
Style | addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
protected void | create(DefaultStyledDocument.ElementSpec[] data) Initialize the document to reflect the given element structure (i.e.
protected AbstractDocument.AbstractElement | createDefaultRoot() Creates the root element to be used to represent the default document structure.
Color | getBackground(AttributeSet attr) Gets the background color from an attribute set.
Element | getCharacterElement(int pos) Gets a character element based on a position.
Element | getDefaultRootElement() Gets the default root element.
Font | getFont(AttributeSet attr) Gets the font from an attribute set.
Color | getForeground(AttributeSet attr) Gets the foreground color from an attribute set.
Style | getLogicalStyle(int p) Fetches the logical style assigned to the paragraph represented by the given position.
Element | getParagraphElement(int pos) Gets the paragraph element at the offset pos.
Style | getStyle(String nm) Fetches a named style previously added.
Enumeration | getStyleNames() Fetches the list of of style names.
protected void | insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.
protected void | insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
void | removeDocumentListener(DocumentListener listener) Removes a document listener.
void | removeStyle(String nm) Removes a named style previously added to the document.
protected void | removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates document structure as a result of text removal.
void | setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for some part of the document.
void | setLogicalStyle(int pos, Style s) Sets the logical style to use for the paragraph at the given position.
void | setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for a paragraph.
protected void | styleChanged(Style style) Creates a change event for the whole document and propagates it to the listeners.
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, setAsynchronousLoadPriority, setDocumentProperties, writeLock, writeUnlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render

Field Detail

BUFFER_SIZE_DEFAULT

public static final int BUFFER_SIZE_DEFAULT
The default size of the initial content buffer.

buffer

protected DefaultStyledDocument.ElementBuffer buffer
Constructor Detail

DefaultStyledDocument

public DefaultStyledDocument(AbstractDocument.Content c,
                             StyleContext styles)
Constructs a styled document.
Parameters:
c - the container for the content
styles - resources and style definitions which may be shared across documents

DefaultStyledDocument

public DefaultStyledDocument(StyleContext styles)
Constructs a styled document with the default content storage implementation and a shared set of styles.
Parameters:
styles - the styles

DefaultStyledDocument

public DefaultStyledDocument()
Constructs a default styled document. This buffers input content by a size of BUFFER_SIZE_DEFAULT and has a style context that is scoped by the lifetime of the document and is not shared with other documents.
Method Detail

getDefaultRootElement

public Element getDefaultRootElement()
Gets the default root element.
Specified by:
getDefaultRootElement in interface Document
Overrides:
getDefaultRootElement in class AbstractDocument
Returns:
the root
See Also:
Document.getDefaultRootElement()

create

protected void create(DefaultStyledDocument.ElementSpec[] data)
Initialize the document to reflect the given element structure (i.e. the structure reported by the getDefaultRootElement method. If the document contained any data it will first be removed.

insert

protected void insert(int offset,
                      DefaultStyledDocument.ElementSpec[] data)
               throws BadLocationException
Inserts new elements in bulk. This is useful to allow parsing with the document in an unlocked state and prepare an element structure modification. This method takes an array of tokens that describe how to update an element structure so the time within a write lock can be greatly reduced in an asynchronous update situation.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
offset - the starting offset >= 0
data - the element data
Throws:
BadLocationException - for an invalid starting offset

addStyle

public Style addStyle(String nm,
                      Style parent)
Adds a new style into the logical style hierarchy. Style attributes resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.
Specified by:
addStyle in interface StyledDocument
Parameters:
nm - the name of the style (must be unique within the collection of named styles). The name may be null if the style is unnamed, but the caller is responsible for managing the reference returned as an unnamed style can't be fetched by name. An unnamed style may be useful for things like character attribute overrides such as found in a style run.
parent - the parent style. This may be null if unspecified attributes need not be resolved in some other style.
Returns:
the style

removeStyle

public void removeStyle(String nm)
Removes a named style previously added to the document.
Specified by:
removeStyle in interface StyledDocument
Parameters:
nm - the name of the style to remove

getStyle

public Style getStyle(String nm)
Fetches a named style previously added.
Specified by:
getStyle in interface StyledDocument
Parameters:
nm - the name of the style
Returns:
the style

getStyleNames

public Enumeration getStyleNames()
Fetches the list of of style names.

setLogicalStyle

public void setLogicalStyle(int pos,
                            Style s)
Sets the logical style to use for the paragraph at the given position. If attributes aren't explicitly set for character and paragraph attributes they will resolve through the logical style assigned to the paragraph, which in turn may resolve through some hierarchy completely independent of the element hierarchy in the document.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
setLogicalStyle in interface StyledDocument
Parameters:
pos - the offset from the start of the document >= 0
s - the logical style to assign to the paragraph, null if none

getLogicalStyle

public Style getLogicalStyle(int p)
Fetches the logical style assigned to the paragraph represented by the given position.
Specified by:
getLogicalStyle in interface StyledDocument
Parameters:
p - the location to translate to a paragraph and determine the logical style assigned >= 0. This is an offset from the start of the document.
Returns:
the style, null if none

setCharacterAttributes

public void setCharacterAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)
Sets attributes for some part of the document. A write lock is held by this operation while changes are being made, and a DocumentEvent is sent to the listeners after the change has been successfully completed.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
setCharacterAttributes in interface StyledDocument
Parameters:
offset - the offset in the document >= 0
length - the length >= 0
s - the attributes
replace - true if the previous attributes should be replaced before setting the new attributes

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)
Sets attributes for a paragraph.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
setParagraphAttributes in interface StyledDocument
Parameters:
offset - the offset into the paragraph >= 0
length - the number of characters affected >= 0
s - the attributes
replace - whether to replace existing attributes, or merge them

getParagraphElement

public Element getParagraphElement(int pos)
Gets the paragraph element at the offset pos. A paragraph consists of at least one child Element, which is usually a leaf.
Specified by:
getParagraphElement in interface StyledDocument
Overrides:
getParagraphElement in class AbstractDocument
Parameters:
pos - the starting offset >= 0
Returns:
the element

getCharacterElement

public Element getCharacterElement(int pos)
Gets a character element based on a position.
Specified by:
getCharacterElement in interface StyledDocument
Parameters:
pos - the position in the document >= 0
Returns:
the element

insertUpdate

protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,
                            AttributeSet attr)
Updates document structure as a result of text insertion. This will happen within a write lock. This implementation simply parses the inserted content for line breaks and builds up a set of instructions for the element buffer.
Overrides:
insertUpdate in class AbstractDocument
Parameters:
chng - a description of the document change
attr - the attributes

removeUpdate

protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng)
Updates document structure as a result of text removal.
Overrides:
removeUpdate in class AbstractDocument
Parameters:
chng - a description of the document change

createDefaultRoot

protected AbstractDocument.AbstractElement createDefaultRoot()
Creates the root element to be used to represent the default document structure.
Returns:
the element base

getForeground

public Color getForeground(AttributeSet attr)
Gets the foreground color from an attribute set.
Specified by:
getForeground in interface StyledDocument
Parameters:
attr - the attribute set
Returns:
the color

getBackground

public Color getBackground(AttributeSet attr)
Gets the background color from an attribute set.
Specified by:
getBackground in interface StyledDocument
Parameters:
attr - the attribute set
Returns:
the color

getFont

public Font getFont(AttributeSet attr)
Gets the font from an attribute set.
Specified by:
getFont in interface StyledDocument
Parameters:
attr - the attribute set
Returns:
the font

styleChanged

protected void styleChanged(Style style)
Creates a change event for the whole document and propagates it to the listeners. Subclasses may wish to be inteligent about what gets damaged.
Parameters:
style - The Style that has changed.

addDocumentListener

public void addDocumentListener(DocumentListener listener)
Adds a document listener for notification of any changes.
Specified by:
addDocumentListener in interface Document
Overrides:
addDocumentListener in class AbstractDocument
Parameters:
listener - the listener
See Also:
Document.addDocumentListener(javax.swing.event.DocumentListener)

removeDocumentListener

public void removeDocumentListener(DocumentListener listener)
Removes a document listener.
Specified by:
removeDocumentListener in interface Document
Overrides:
removeDocumentListener in class AbstractDocument
Parameters:
listener - the listener
See Also:
Document.removeDocumentListener(javax.swing.event.DocumentListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTextUI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultTextUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TextUI
              |
              +--javax.swing.plaf.basic.BasicTextUI
                    |
                    +--javax.swing.text.DefaultTextUI
All Implemented Interfaces:
ViewFactory

public abstract class DefaultTextUI
extends BasicTextUI

This class has been deprecated and should no longer be used. The basis of the various TextUI implementations can be found in the javax.swing.plaf.basic package and the class BasicTextUI replaces this class.

Inner classes inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
DefaultTextUI()
Deprecated.
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getPropertyPrefix, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, propertyChange, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultTextUI

public DefaultTextUI()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Document

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Document

All Known Subinterfaces:
StyledDocument
All Known Implementing Classes:
AbstractDocument
public interface Document

The Document is a container for text that serves as the model for swing text components. The goal for this interface is to scale from very simple needs (plain text textfield) to complex needs (HTML or XML documents for example).

Content

At the simplest level, text can be modeled as a linear sequence of characters. To support internationalization, the Swing text model uses unicode characters. The sequence of characters displayed in a text component is generally referred to as the component's content.

To refer to locations within the sequence, the coordinates used are the location between two characters. As the diagram below shows, a location in a text document can be referred to as a position, or an offset. This position is zero-based.

In the example, if the content of a document is the sequence "The quick brown fox," as shown in the preceding diagram, the location just before the word "The" is 0, and the location after the word "The" and before the whitespace that follows it is 3. The entire sequence of characters in the sequence "The" is called a range.

The following methods give access to the character data that makes up the content.

  • getLength
  • getText(int, int)
  • getText(int, int, Segment)

Structure

Text is rarely represented simply as featureless content. Rather, text typically has some sort of structure associated with it. Exactly what structure is modeled is up to a particular Document implementation. It might be as simple as no structure (i.e. a simple text field), or it might be something like diagram below.

The unit of structure (i.e. a node of the tree) is referred to by the Element interface. Each Element can be tagged with a set of attributes. These attributes (name/value pairs) are defined by the AttributeSet interface.

The following methods give access to the document structure.

  • getDefaultRootElement
  • getRootElements

Mutations

All documents need to be able to add and remove simple text. Typically, text is inserted and removed via gestures from a keyboard or a mouse. What effect the insertion or removal has upon the document structure is entirely up to the implementation of the document.

The following methods are related to mutation of the document content:

  • insertString
  • remove
  • createPosition

Notification

Mutations to the Document must be communicated to interested observers. The notification of change follows the event model guidelines that are specified for JavaBeans. In the JavaBeans event model, once an event notification is dispatched, all listeners must be notified before any further mutations occur to the source of the event. Further, order of delivery is not guaranteed.

Notification is provided as two seperate events, DocumentEvent, and UndoableEditEvent. If a mutation is made to a Document through its api, a DocumentEvent will be sent to all of the registered DocumentListeners. If the Document implementation supports undo/redo capabilities, an UndoableEditEvent will be sent to all of the registered UndoableEditListeners. If an undoable edit is undone, a DocumentEvent should be fired from the Document to indicate it has changed again. In this case however, there should be no UndoableEditEvent generated since that edit is actually the source of the change rather than a mutation to the Document made through it's api.

Referring to the above diagram, suppose that the component shown on the left mutates the document object represented by the blue rectangle. The document responds by dispatching a DocumentEvent to both component views and sends an UndoableEditEvent to the listening logic, which maintains a history buffer.

Now suppose that the component shown on the right mutates the same document. Again, the document dispatches a DocumentEvent to both component views and sends an UndoableEditEvent to the listening logic that is maintaining the history buffer.

If the history buffer is then rolled back (i.e. the last UndoableEdit undone), a DocumentEvent is sent to both views, causing both of them to reflect the undone mutation to the document (that is, the removal of the right component's mutation). If the history buffer again rolls back another change, another DocumentEvent is sent to both views, causing them to reflect the undone mutation to the document -- that is, the removal of the left component's mutation.

The methods related to observing mutations to the document are:

  • addDocumentListener
  • removeDocumentListener
  • addUndoableEditListener
  • removeUndoableEditListener

Properties

Document implementations will generally have some set of properties associated with them at runtime. Two well known properties are the StreamDescriptionProperty which can be used to describe where the Document came from, and TitleProperty which can be used to name the Document. The methods related to the properties are:

  • getProperty
  • putProperty

See Also:
DocumentEvent, DocumentListener, UndoableEditEvent, UndoableEditListener, Element, Position, AttributeSet

Field Summary
static String | StreamDescriptionProperty The property name for the description of the stream used to initialize the document.
static String | TitleProperty The property name for the title of the document, if there is one.
Method Summary
void | addDocumentListener(DocumentListener listener) Registers the given observer to begin receiving notifications when changes are made to the document.
void | addUndoableEditListener(UndoableEditListener listener) Registers the given observer to begin receiving notifications when undoable edits are made to the document.
Position | createPosition(int offs) This method allows an application to mark a place in a sequence of character content.
Element | getDefaultRootElement() Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided.
Position | getEndPosition() Returns a position that represents the end of the document.
int | getLength() Returns number of characters of content currently in the document.
Object | getProperty(Object key) Gets properties associated with the document.
Element[] | getRootElements() Returns all of the root elements that are defined.
Position | getStartPosition() Returns a position that represents the start of the document.
String | getText(int offset, int length) Fetches the text contained within the given portion of the document.
void | getText(int offset, int length, Segment txt) Fetches the text contained within the given portion of the document.
void | insertString(int offset, String str, AttributeSet a) Inserts a string of content.
void | putProperty(Object key, Object value) Puts a new property on the list.
void | remove(int offs, int len) Removes a portion of the content of the document.
void | removeDocumentListener(DocumentListener listener) Unregisters the given observer from the notification list so it will no longer receive change updates.
void | removeUndoableEditListener(UndoableEditListener listener) Unregisters the given observer from the notification list so it will no longer receive updates.
void | render(Runnable r) This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.

Field Detail

StreamDescriptionProperty

public static final String StreamDescriptionProperty
The property name for the description of the stream used to initialize the document. This should be used if the document was initialized from a stream and anything is known about the stream.

TitleProperty

public static final String TitleProperty
The property name for the title of the document, if there is one.
Method Detail

getLength

public int getLength()
Returns number of characters of content currently in the document.
Returns:
number of characters >= 0

addDocumentListener

public void addDocumentListener(DocumentListener listener)
Registers the given observer to begin receiving notifications when changes are made to the document.
Parameters:
listener - the observer to register
See Also:
removeDocumentListener(javax.swing.event.DocumentListener)

removeDocumentListener

public void removeDocumentListener(DocumentListener listener)
Unregisters the given observer from the notification list so it will no longer receive change updates.
Parameters:
listener - the observer to register
See Also:
addDocumentListener(javax.swing.event.DocumentListener)

addUndoableEditListener

public void addUndoableEditListener(UndoableEditListener listener)
Registers the given observer to begin receiving notifications when undoable edits are made to the document.
Parameters:
listener - the observer to register
See Also:
UndoableEditEvent

removeUndoableEditListener

public void removeUndoableEditListener(UndoableEditListener listener)
Unregisters the given observer from the notification list so it will no longer receive updates.
Parameters:
listener - the observer to register
See Also:
UndoableEditEvent

getProperty

public Object getProperty(Object key)
Gets properties associated with the document. Allows one to store things like the document title, author, etc.
Parameters:
key - a non-null property
Returns:
the properties

putProperty

public void putProperty(Object key,
                        Object value)
Puts a new property on the list.
Parameters:
key - the non-null property key
value - the property value

remove

public void remove(int offs,
                   int len)
            throws BadLocationException
Removes a portion of the content of the document. This will cause a DocumentEvent of type DocumentEvent.EventType.REMOVE to be sent to the registered DocumentListeners, unless an exception is thrown. The notification will be sent to the listeners by calling the removeUpdate method on the DocumentListeners.

To ensure reasonable behavior in the face of concurrency, the event is dispatched after the mutation has occurred. This means that by the time a notification of removal is dispatched, the document has already been updated and any marks created by createPosition have already changed. For a removal, the end of the removal range is collapsed down to the start of the range, and any marks in the removal range are collapsed down to the start of the range.

If the Document structure changed as result of the removal, the details of what Elements were inserted and removed in response to the change will also be contained in the generated DocumentEvent. It is up to the implementation of a Document to decide how the structure should change in response to a remove.

If the Document supports undo/redo, an UndoableEditEvent will also be generated.

Parameters:
offs - the offset from the begining >= 0
len - the number of characters to remove >= 0
Throws:
BadLocationException - some portion of the removal range was not a valid part of the document. The location in the exception is the first bad position encountered.
See Also:
DocumentEvent, DocumentListener, UndoableEditEvent, UndoableEditListener

insertString

public void insertString(int offset,
                         String str,
                         AttributeSet a)
                  throws BadLocationException
Inserts a string of content. This will cause a DocumentEvent of type DocumentEvent.EventType.INSERT to be sent to the registered DocumentListers, unless an exception is thrown. The DocumentEvent will be delivered by calling the insertUpdate method on the DocumentListener. The offset and length of the generated DocumentEvent will indicate what change was actually made to the Document.

If the Document structure changed as result of the insertion, the details of what Elements were inserted and removed in response to the change will also be contained in the generated DocumentEvent. It is up to the implementation of a Document to decide how the structure should change in response to an insertion.

If the Document supports undo/redo, an UndoableEditEvent will also be generated.

Parameters:
offset - the offset into the document to insert the content >= 0. All positions that track change at or after the given location will move.
str - the string to insert
a - the attributes to associate with the inserted content. This may be null if there are no attributes.
Throws:
BadLocationException - the given insert position is not a valid position within the document
See Also:
DocumentEvent, DocumentListener, UndoableEditEvent, UndoableEditListener

getText

public String getText(int offset,
                      int length)
               throws BadLocationException
Fetches the text contained within the given portion of the document.
Parameters:
offset - the offset into the document representing the desired start of the text >= 0
length - the length of the desired string >= 0
Returns:
the text, in a String of length >= 0
Throws:
BadLocationException - some portion of the given range was not a valid part of the document. The location in the exception is the first bad position encountered.

getText

public void getText(int offset,
                    int length,
                    Segment txt)
             throws BadLocationException
Fetches the text contained within the given portion of the document.
Parameters:
offset - the offset into the document representing the desired start of the text >= 0
length - the length of the desired string >= 0
txt - the Segment object to return the text in
Throws:
BadLocationException - Some portion of the given range was not a valid part of the document. The location in the exception is the first bad position encountered.

getStartPosition

public Position getStartPosition()
Returns a position that represents the start of the document. The position returned can be counted on to track change and stay located at the beginning of the document.
Returns:
the position

getEndPosition

public Position getEndPosition()
Returns a position that represents the end of the document. The position returned can be counted on to track change and stay located at the end of the document.
Returns:
the position

createPosition

public Position createPosition(int offs)
                        throws BadLocationException
This method allows an application to mark a place in a sequence of character content. This mark can then be used to tracks change as insertions and removals are made in the content. The policy is that insertions always occur prior to the current position (the most common case) unless the insertion location is zero, in which case the insertion is forced to a position that follows the original position.
Parameters:
offs - the offset from the start of the document >= 0
Returns:
the position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document

getRootElements

public Element[] getRootElements()
Returns all of the root elements that are defined.

Typically there will be only one document structure, but the interface supports building an arbitrary number of structural projections over the text data. The document can have multiple root elements to support multiple document structures. Some examples might be:

  • Text direction.
  • Lexical token streams.
  • Parse trees.
  • Conversions to formats other than the native format.
  • Modification specifications.
  • Annotations.
Returns:
the root element

getDefaultRootElement

public Element getDefaultRootElement()
Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided.
Returns:
the root element

render

public void render(Runnable r)
This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously. The given runnable will be executed in a way that allows it to safely read the model with no changes while the runnable is being executed. The runnable itself may not make any mutations.
Parameters:
r - a Runnable used to render the model
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EditorKit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class EditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
DefaultEditorKit
public abstract class EditorKit
extends Object
implements Cloneable, Serializable

Establishes the set of things needed by a text component to be a reasonably functioning editor for some type of text content. The EditorKit acts as a factory for some kind of policy. For example, an implementation of html and rtf can be provided that is replaceable with other implementations.

A kit can safely store editing state as an instance of the kit will be dedicated to a text component. New kits will normally be created by cloning a prototype kit. The kit will have it's setComponent method called to establish it's relationship with a JTextComponent.

See Also:
Serialized Form

Constructor Summary
EditorKit()
Construct an EditorKit.
Method Summary
Object | clone() Creates a copy of the editor kit.
abstract Caret | createCaret() Fetches a caret that can navigate through views produced by the associated ViewFactory.
abstract Document | createDefaultDocument() Creates an uninitialized text storage model that is appropriate for this type of editor.
void | deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
abstract Action[] | getActions() Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
abstract String | getContentType() Gets the MIME type of the data that this kit represents support for.
abstract ViewFactory | getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
void | install(JEditorPane c) Called when the kit is being installed into the a JEditorPane.
abstract void | read(InputStream in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | read(Reader in, Document doc, int pos) Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
abstract void | write(OutputStream out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
abstract void | write(Writer out, Document doc, int pos, int len) Writes content from a document to the given stream in a format appropriate for this kind of content handler.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EditorKit

public EditorKit()
Construct an EditorKit.
Method Detail

clone

public Object clone()
Creates a copy of the editor kit. This is implemented to use Object.clone. If the kit cannot be cloned, null is returned.
Overrides:
clone in class Object
Returns:
the copy

install

public void install(JEditorPane c)
Called when the kit is being installed into the a JEditorPane.
Parameters:
c - the JEditorPane

deinstall

public void deinstall(JEditorPane c)
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
Parameters:
c - the JEditorPane

getContentType

public abstract String getContentType()
Gets the MIME type of the data that this kit represents support for.
Returns:
the type

getViewFactory

public abstract ViewFactory getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit.
Returns:
the factory

getActions

public abstract Action[] getActions()
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
Returns:
the set of actions

createCaret

public abstract Caret createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory.
Returns:
the caret

createDefaultDocument

public abstract Document createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.
Returns:
the model

read

public abstract void read(InputStream in,
                          Document doc,
                          int pos)
                   throws IOException,
                          BadLocationException
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public abstract void write(OutputStream out,
                           Document doc,
                           int pos,
                           int len)
                    throws IOException,
                           BadLocationException
Writes content from a document to the given stream in a format appropriate for this kind of content handler.
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content from >= 0.
len - The amount to write out >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

read

public abstract void read(Reader in,
                          Document doc,
                          int pos)
                   throws IOException,
                          BadLocationException
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.

Since actual text editing is unicode based, this would generally be the preferred way to read in the data. Some types of content are stored in an 8-bit form however, and will favor the InputStream.

Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public abstract void write(Writer out,
                           Document doc,
                           int pos,
                           int len)
                    throws IOException,
                           BadLocationException
Writes content from a document to the given stream in a format appropriate for this kind of content handler.

Since actual text editing is unicode based, this would generally be the preferred way to write the data. Some types of content are stored in an 8-bit form however, and will favor the OutputStream.

Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content >= 0.
len - The amount to write out >= 0.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Element

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Element

All Known Implementing Classes:
AbstractDocument.AbstractElement
public interface Element

Interface to describe a structural piece of a document. It is intended to capture the spirit of an SGML element.

Method Summary
AttributeSet | getAttributes() Fetches the collection of attributes this element contains.
Document | getDocument() Fetches the document associated with this element.
Element | getElement(int index) Fetches the child element at the given index.
int | getElementCount() Gets the number of child elements contained by this element.
int | getElementIndex(int offset) Gets the child element index closest to the given offset.
int | getEndOffset() Fetches the offset from the beginning of the document that this element ends at.
String | getName() Fetches the name of the element.
Element | getParentElement() Fetches the parent element.
int | getStartOffset() Fetches the offset from the beginning of the document that this element begins at.
boolean | isLeaf() Is this element a leaf element?

Method Detail

getDocument

public Document getDocument()
Fetches the document associated with this element.
Returns:
the document

getParentElement

public Element getParentElement()
Fetches the parent element. If the element is a root level element returns null.
Returns:
the parent element

getName

public String getName()
Fetches the name of the element. If the element is used to represent some type of structure, this would be the type name.
Returns:
the element name

getAttributes

public AttributeSet getAttributes()
Fetches the collection of attributes this element contains.
Returns:
the attributes for the element

getStartOffset

public int getStartOffset()
Fetches the offset from the beginning of the document that this element begins at. If this element has children, this will be the offset of the first child.
Returns:
the starting offset >= 0

getEndOffset

public int getEndOffset()
Fetches the offset from the beginning of the document that this element ends at. If this element has children, this will be the end offset of the last child.

All the default Document implementations descend from AbstractDocument. AbstractDocument models an implied break at the end of the document. As a result of this, it is possible for this to return a value greater than the length of the document.

Returns:
the ending offset >= 0
See Also:
AbstractDocument

getElementIndex

public int getElementIndex(int offset)
Gets the child element index closest to the given offset. The offset is specified relative to the begining of the document.
Parameters:
offset - the specified offset >= 0
Returns:
the element index >= 0

getElementCount

public int getElementCount()
Gets the number of child elements contained by this element. If this element is a leaf, a count of zero is returned.
Returns:
the number of child elements >= 0

getElement

public Element getElement(int index)
Fetches the child element at the given index.
Parameters:
index - the specified index >= 0
Returns:
the child element

isLeaf

public boolean isLeaf()
Is this element a leaf element?
Returns:
true if a leaf element else false
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ElementBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultStyledDocument.ElementBuffer

java.lang.Object
  |
  +--javax.swing.text.DefaultStyledDocument.ElementBuffer
All Implemented Interfaces:
Serializable
Enclosing class:
DefaultStyledDocument
public class DefaultStyledDocument.ElementBuffer
extends Object
implements Serializable

Class to manage changes to the element hierarchy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
DefaultStyledDocument.ElementBuffer(Element root)
Creates a new ElementBuffer.
Method Summary
void | change(int offset, int length, AbstractDocument.DefaultDocumentEvent de) Changes content.
protected void | changeUpdate() Updates the element structure in response to a change in the document.
Element | clone(Element parent, Element clonee) Creates a copy of this element, with a different parent.
Element | getRootElement() Gets the root element.
void | insert(int offset, int length, DefaultStyledDocument.ElementSpec[] data, AbstractDocument.DefaultDocumentEvent de) Inserts new content.
protected void | insertUpdate(DefaultStyledDocument.ElementSpec[] data) Inserts an update into the document.
void | remove(int offset, int length, AbstractDocument.DefaultDocumentEvent de) Removes content.
protected void | removeUpdate() Updates the element structure in response to a removal from the associated sequence in the document.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultStyledDocument.ElementBuffer

public DefaultStyledDocument.ElementBuffer(Element root)
Creates a new ElementBuffer.
Parameters:
root - the root element
Method Detail

getRootElement

public Element getRootElement()
Gets the root element.
Returns:
the root element

insert

public void insert(int offset,
                   int length,
                   DefaultStyledDocument.ElementSpec[] data,
                   AbstractDocument.DefaultDocumentEvent de)
Inserts new content.
Parameters:
offset - the starting offset >= 0
length - the length >= 0
data - the data to insert
de - the event capturing this edit

remove

public void remove(int offset,
                   int length,
                   AbstractDocument.DefaultDocumentEvent de)
Removes content.
Parameters:
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit

change

public void change(int offset,
                   int length,
                   AbstractDocument.DefaultDocumentEvent de)
Changes content.
Parameters:
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit

insertUpdate

protected void insertUpdate(DefaultStyledDocument.ElementSpec[] data)
Inserts an update into the document.
Parameters:
data - the elements to insert

removeUpdate

protected void removeUpdate()
Updates the element structure in response to a removal from the associated sequence in the document. Any elements consumed by the span of the removal are removed.

changeUpdate

protected void changeUpdate()
Updates the element structure in response to a change in the document.

clone

public Element clone(Element parent,
                     Element clonee)
Creates a copy of this element, with a different parent.
Parameters:
parent - the parent element
clonee - the element to be cloned
Returns:
the copy
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ElementEdit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument.ElementEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.text.AbstractDocument.ElementEdit
All Implemented Interfaces:
DocumentEvent.ElementChange, Serializable, UndoableEdit
Enclosing class:
AbstractDocument
public static class AbstractDocument.ElementEdit
extends AbstractUndoableEdit
implements DocumentEvent.ElementChange

An implementation of ElementChange that can be added to the document event.

See Also:
Serialized Form

Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
AbstractDocument.ElementEdit(Element e, int index, Element[] removed, Element[] added)
Constructs an edit record.
Method Summary
Element[] | getChildrenAdded() Gets a list of children that were added.
Element[] | getChildrenRemoved() Gets a list of children that were removed.
Element | getElement() Returns the underlying element.
int | getIndex() Returns the index into the list of elements.
void | redo() Redoes a change.
void | undo() Undoes a change.
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractDocument.ElementEdit

public AbstractDocument.ElementEdit(Element e,
                                    int index,
                                    Element[] removed,
                                    Element[] added)
Constructs an edit record. This does not modify the element so it can safely be used to catch up a view to the current model state for views that just attached to a model.
Parameters:
e - the element
index - the index into the model >= 0
removed - a set of elements that were removed
added - a set of elements that were added
Method Detail

getElement

public Element getElement()
Returns the underlying element.
Specified by:
getElement in interface DocumentEvent.ElementChange
Returns:
the element

getIndex

public int getIndex()
Returns the index into the list of elements.
Specified by:
getIndex in interface DocumentEvent.ElementChange
Returns:
the index >= 0

getChildrenRemoved

public Element[] getChildrenRemoved()
Gets a list of children that were removed.
Specified by:
getChildrenRemoved in interface DocumentEvent.ElementChange
Returns:
the list

getChildrenAdded

public Element[] getChildrenAdded()
Gets a list of children that were added.
Specified by:
getChildrenAdded in interface DocumentEvent.ElementChange
Returns:
the list

redo

public void redo()
          throws CannotRedoException
Redoes a change.
Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException - if the change cannot be redone

undo

public void undo()
          throws CannotUndoException
Undoes a change.
Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException - if the change cannot be undone
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ElementIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class ElementIterator

java.lang.Object
  |
  +--javax.swing.text.ElementIterator
All Implemented Interfaces:
Cloneable
public class ElementIterator
extends Object
implements Cloneable

ElementIterator, as the name suggests, iteratates over the Element tree. The constructor can be invoked with either Document or an Element as an argument. If the constructor is invoked with a Document as an argument then the root of the iteration is the return value of document.getDefaultRootElement(). The iteration happens in a depth-first manner. In terms of how boundary conditions are handled: a) if next() is called before first() or current(), the root will be returned. b) next() returns null to indicate the end of the list. c) previous() returns null when the current element is the root or next() has returned null. The ElementIterator does no locking of the Element tree. This means that it does not track any changes. It is the responsibility of the user of this class, to ensure that no changes happen during element iteration. Simple usage example: public void iterate() { ElementIterator it = new ElementIterator(root); Element elem; while (true) { if ((elem = next()) != null) { // process element System.out.println("elem: " + elem.getName()); } else { break; } } }

Constructor Summary
ElementIterator(Document document)
Creates a new ElementIterator.
ElementIterator(Element root)
Creates a new ElementIterator.
Method Summary
Object | clone() Clones the ElementIterator.
Element | current() Fetches the current Element.
int | depth() Fetches the current depth of element tree.
Element | first() Fetches the first element.
Element | next() Fetches the next Element.
Element | previous() Fetches the previous Element.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ElementIterator

public ElementIterator(Document document)
Creates a new ElementIterator. The root element is taken to get the default root element of the document.
Parameters:
a - Document.

ElementIterator

public ElementIterator(Element root)
Creates a new ElementIterator.
Parameters:
the - root Element.
Method Detail

clone

public Object clone()
Clones the ElementIterator.
Overrides:
clone in class Object
Returns:
a cloned ElementIterator Object.

first

public Element first()
Fetches the first element.
Returns:
an Element.

depth

public int depth()
Fetches the current depth of element tree.
Returns:
the depth.

current

public Element current()
Fetches the current Element.

next

public Element next()
Fetches the next Element. The strategy used to locate the next element is a depth-first search.

previous

public Element previous()
Fetches the previous Element. If howver the current element is the last element, or the current element is null, then null is returned.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ElementSpec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultStyledDocument.ElementSpec

java.lang.Object
  |
  +--javax.swing.text.DefaultStyledDocument.ElementSpec
Enclosing class:
DefaultStyledDocument
public static class DefaultStyledDocument.ElementSpec
extends Object

Specification for building elements.

Warning: * Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
static short | ContentType A possible value for getType.
static short | EndTagType A possible value for getType.
static short | JoinFractureDirection A possible value for getDirection.
static short | JoinNextDirection A possible value for getDirection.
static short | JoinPreviousDirection A possible value for getDirection.
static short | OriginateDirection A possible value for getDirection.
static short | StartTagType A possible value for getType.
Constructor Summary
DefaultStyledDocument.ElementSpec(AttributeSet a, short type)
Constructor useful for markup when the markup will not be stored in the document.
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
Constructor for creating a spec externally for batch input of content and markup into the document.
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, int len)
Constructor for parsing inside the document when the data has already been added, but len information is needed.
Method Summary
char[] | getArray() Gets the array of characters.
AttributeSet | getAttributes() Gets the element attributes.
short | getDirection() Gets the direction.
int | getLength() Gets the length.
int | getOffset() Gets the starting offset.
short | getType() Gets the element type.
void | setDirection(short direction) Sets the direction.
void | setType(short type) Sets the element type.
String | toString() Converts the element to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

StartTagType

public static final short StartTagType
A possible value for getType. This specifies that this record type is a start tag and represents markup that specifies the start of an element.

EndTagType

public static final short EndTagType
A possible value for getType. This specifies that this record type is a end tag and represents markup that specifies the end of an element.

ContentType

public static final short ContentType
A possible value for getType. This specifies that this record type represents content.

JoinPreviousDirection

public static final short JoinPreviousDirection
A possible value for getDirection. This specifies that the data associated with this record should be joined to what precedes it.

JoinNextDirection

public static final short JoinNextDirection
A possible value for getDirection. This specifies that the data associated with this record should be joined to what follows it.

OriginateDirection

public static final short OriginateDirection
A possible value for getDirection. This specifies that the data associated with this record should be used to originate a new element. This would be the normal value.

JoinFractureDirection

public static final short JoinFractureDirection
A possible value for getDirection. This specifies that the data associated with this record should be joined to the fractured element.
Constructor Detail

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type)
Constructor useful for markup when the markup will not be stored in the document.
Parameters:
a - the attributes for the element
type - the type of the element (StartTagType, EndTagType, ContentType)

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         int len)
Constructor for parsing inside the document when the data has already been added, but len information is needed.
Parameters:
a - the attributes for the element
type - the type of the element (StartTagType, EndTagType, ContentType)
len - the length >= 0

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         char[] txt,
                                         int offs,
                                         int len)
Constructor for creating a spec externally for batch input of content and markup into the document.
Parameters:
a - the attributes for the element
type - the type of the element (StartTagType, EndTagType, ContentType)
txt - the text for the element
offs - the offset into the text >= 0
len - the length of the text >= 0
Method Detail

setType

public void setType(short type)
Sets the element type.
Parameters:
type - the type of the element (StartTagType, EndTagType, ContentType)

getType

public short getType()
Gets the element type.
Returns:
the type of the element (StartTagType, EndTagType, ContentType)

setDirection

public void setDirection(short direction)
Sets the direction.
Parameters:
direction - the direction (JoinPreviousDirection, JoinNextDirection)

getDirection

public short getDirection()
Gets the direction.
Returns:
the direction (JoinPreviousDirection, JoinNextDirection)

getAttributes

public AttributeSet getAttributes()
Gets the element attributes.
Returns:
the attribute set

getArray

public char[] getArray()
Gets the array of characters.
Returns:
the array

getOffset

public int getOffset()
Gets the starting offset.
Returns:
the offset >= 0

getLength

public int getLength()
Gets the length.
Returns:
the length >= 0

toString

public String toString()
Converts the element to a string.
Overrides:
toString in class Object
Returns:
the string
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class FieldView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.PlainView
              |
              +--javax.swing.text.FieldView
All Implemented Interfaces:
SwingConstants, TabExpander
Direct Known Subclasses:
PasswordView
public class FieldView
extends PlainView

Extends the multi-line plain text view to be suitable for a single-line editor view. If the view is allocated extra space, the field must adjust for it. If the hosting component is a JTextField, this view will manage the ranges of the associated BoundedRangeModel and will adjust the horizontal allocation to match the current visibility settings of the JTextField.

See Also:
View

Fields inherited from class javax.swing.text.PlainView
metrics
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
FieldView(Element elem)
Constructs a new FieldView wrapped on an element.
Method Summary
protected Shape | adjustAllocation(Shape a) Adjusts the allocation given to the view to be a suitable allocation for a text field.
protected FontMetrics | getFontMetrics() Fetches the font metrics associated with the component hosting this view.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
int | getResizeWeight(int axis) Determines the resizability of the view along the given axis.
void | insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
int | viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.PlainView
changedUpdate, drawLine, drawSelectedText, drawUnselectedText, getLineBuffer, getTabSize, nextTabStop
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldView

public FieldView(Element elem)
Constructs a new FieldView wrapped on an element.
Parameters:
elem - the element
Method Detail

getFontMetrics

protected FontMetrics getFontMetrics()
Fetches the font metrics associated with the component hosting this view.
Returns:
the metrics

adjustAllocation

protected Shape adjustAllocation(Shape a)
Adjusts the allocation given to the view to be a suitable allocation for a text field. If the view has been allocated more than the preferred span vertically, the allocation is changed to be centered vertically. Horizontally the view is adjusted according to the horizontal alignment property set on the associated JTextField (if that is the type of the hosting component).
Parameters:
a - the allocation given to the view, which may need to be adjusted.
Returns:
the allocation that the superclass should use.

paint

public void paint(Graphics g,
                  Shape a)
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
Overrides:
paint in class PlainView
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class PlainView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

getResizeWeight

public int getResizeWeight(int axis)
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
Overrides:
getResizeWeight in class View
Parameters:
axis - View.X_AXIS or View.Y_AXIS
Returns:
the weight -> 1 for View.X_AXIS, else 0

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class PlainView
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float fx,
                       float fy,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class PlainView
Parameters:
fx - the X coordinate >= 0.0f
fy - the Y coordinate >= 0.0f
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

insertUpdate

public void insertUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for.
Overrides:
insertUpdate in class PlainView
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for.
Overrides:
removeUpdate in class PlainView
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlowStrategy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class FlowView.FlowStrategy

java.lang.Object
  |
  +--javax.swing.text.FlowView.FlowStrategy
Enclosing class:
FlowView
public static class FlowView.FlowStrategy
extends Object

Strategy for maintaining the physical form of the flow. The default implementation is completely stateless, and recalculates the entire flow if the layout is invalid on the given FlowView. Alternative strategies can be implemented by subclassing, and might perform incrementatal repair to the layout or alternative breaking behavior.

Constructor Summary
FlowView.FlowStrategy()
Method Summary
protected void | adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x) Adjusts the given row if possible to fit within the layout span.
void | changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected View | createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) Creates a view that can be used to represent the current piece of the flow.
protected View | getLogicalView(FlowView fv) This method gives flow strategies access to the logical view of the FlowView.
void | insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was inserted into the document in a location that the given flow view is responsible for.
void | layout(FlowView fv) Update the flow on the given FlowView.
protected int | layoutRow(FlowView fv, int rowIndex, int pos) Creates a row of views that will fit within the layout span of the row.
void | removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Gives notification that something was removed from the document in a location that the given flow view is responsible for.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FlowView.FlowStrategy

public FlowView.FlowStrategy()
Method Detail

insertUpdate

public void insertUpdate(FlowView fv,
                         DocumentEvent e,
                         Rectangle alloc)
Gives notification that something was inserted into the document in a location that the given flow view is responsible for. The strategy should update the appropriate changed region (which depends upon the strategy used for repair).
Parameters:
e - the change information from the associated document
alloc - the current allocation of the view inside of the insets. This value will be null if the view has not yet been displayed.
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(FlowView fv,
                         DocumentEvent e,
                         Rectangle alloc)
Gives notification that something was removed from the document in a location that the given flow view is responsible for.
Parameters:
e - the change information from the associated document
alloc - the current allocation of the view inside of the insets.
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(FlowView fv,
                          DocumentEvent e,
                          Rectangle alloc)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

getLogicalView

protected View getLogicalView(FlowView fv)
This method gives flow strategies access to the logical view of the FlowView.

layout

public void layout(FlowView fv)
Update the flow on the given FlowView. By default, this causes all of the rows (child views) to be rebuilt to match the given constraints for each row. This is called by a FlowView.layout to update the child views in the flow.
Parameters:
v - the view to reflow

layoutRow

protected int layoutRow(FlowView fv,
                        int rowIndex,
                        int pos)
Creates a row of views that will fit within the layout span of the row. This is called by the layout method. This is implemented to fill the row by repeatedly calling the createView method until the available span has been exhausted, a forced break was encountered, or the createView method returned null. If the remaining span was exhaused, the adjustRow method will be called to perform adjustments to the row to try and make it fit into the given span.
Parameters:
rowIndex - the index of the row to fill in with views. The row is assumed to be empty on entry.
pos - The current position in the children of this views element from which to start.

adjustRow

protected void adjustRow(FlowView fv,
                         int rowIndex,
                         int desiredSpan,
                         int x)
Adjusts the given row if possible to fit within the layout span. By default this will try to find the highest break weight possible nearest the end of the row. If a forced break is encountered, the break will be positioned there.
Parameters:
r - the row to adjust to the current layout span.
desiredSpan - the current layout span >= 0
x - the location r starts at.

createView

protected View createView(FlowView fv,
                          int startOffset,
                          int spanLeft,
                          int rowIndex)
Creates a view that can be used to represent the current piece of the flow. This can be either an entire view from the logical view, or a fragment of the logical view.
Parameters:
fv - the view holding the flow
startOffset - the start location for the view being created
spanLeft - the about of span left to fill in the row
rowIndex - the row the view will be placed into
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlowView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class FlowView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.FlowView
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
ParagraphView
public abstract class FlowView
extends BoxView

A View that tries to flow it's children into some partially constrained space. This can be used to build things like paragraphs, pages, etc. The flow is made up of the following pieces of functionality.

  • A logical set of child views, which as used as a layout pool from which a physical view is formed.
  • A strategy for translating the logical view to a physical (flowed) view.
  • Constraints for the strategy to work against.
  • A physical structure, that represents the flow. The children of this view are where the pieces of of the logical views are placed to create the flow.

See Also:
View

Inner Class Summary
static class FlowView.FlowStrategy
Strategy for maintaining the physical form of the flow.
Field Summary
protected View | layoutPool These are the views that represent the child elements of the element this view represents (The logical view to translate to a physical view).
protected int | layoutSpan Default constraint against which the flow is created against.
protected FlowView.FlowStrategy | strategy The behavior for keeping the flow updated.
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
FlowView(Element elem, int axis)
Constructs a FlowView for the given element.
Method Summary
protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate equirements along the minor axis.
void | changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected abstract View | createRow() Create a View that should be used to hold a a rows worth of children in a flow.
int | getFlowAxis() Fetch the axis along which views should be flowed.
int | getFlowSpan(int index) Fetch the constraining span to flow against for the given child index.
int | getFlowStart(int index) Fetch the location along the flow axis that the flow span will start at.
protected int | getViewIndexAtPosition(int pos) Fetches the child view index representing the given position in the model.
void | insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
protected void | layout(int width, int height) Lays out the children.
protected void | loadChildren(ViewFactory f) Loads all of the children to initialize the view.
void | removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

layoutSpan

protected int layoutSpan
Default constraint against which the flow is created against.

layoutPool

protected View layoutPool
These are the views that represent the child elements of the element this view represents (The logical view to translate to a physical view). These are not directly children of this view. These are either placed into the rows directly or used for the purpose of breaking into smaller chunks, to form the physical view.

strategy

protected FlowView.FlowStrategy strategy
The behavior for keeping the flow updated. By default this is a singleton shared by all instances of FlowView (FlowStrategy is stateless). Subclasses can create an alternative strategy, which might keep state.
Constructor Detail

FlowView

public FlowView(Element elem,
                int axis)
Constructs a FlowView for the given element.
Parameters:
elem - the element that this view is responsible for
axis - may be either View.X_AXIS or View.Y_AXIS
Method Detail

getFlowAxis

public int getFlowAxis()
Fetch the axis along which views should be flowed. By default, this will be the axis orthoginal to the axis along which the flow rows are tiled (the axis of the default flow rows themselves). This is typically used by the FlowStrategy.

getFlowSpan

public int getFlowSpan(int index)
Fetch the constraining span to flow against for the given child index. This is called by the FlowStrategy while it is updating the flow. A flow can be shaped by providing different values for the row constraints. By default, the entire span inside of the insets along the flow axis is returned.
Parameters:
index - the index of the row being updated. This should be a value >= 0 and See Also:
getFlowStart(int)

getFlowStart

public int getFlowStart(int index)
Fetch the location along the flow axis that the flow span will start at. This is called by the FlowStrategy while it is updating the flow. A flow can be shaped by providing different values for the row constraints.
Parameters:
index - the index of the row being updated. This should be a value >= 0 and See Also:
getFlowSpan(int)

createRow

protected abstract View createRow()
Create a View that should be used to hold a a rows worth of children in a flow. This is called by the FlowStrategy when new children are added or removed (i.e. rows are added or removed) in the process of updating the flow.

loadChildren

protected void loadChildren(ViewFactory f)
Loads all of the children to initialize the view. This is called by the setParent method. This is reimplemented to not load any children directly (as they are created in the process of formatting). If the layoutPool variable is null, an instance of LogicalView is created to represent the logical view that is used in the process of formatting.
Overrides:
loadChildren in class CompositeView
Parameters:
f - the view factory

getViewIndexAtPosition

protected int getViewIndexAtPosition(int pos)
Fetches the child view index representing the given position in the model.
Overrides:
getViewIndexAtPosition in class CompositeView
Parameters:
pos - the position >= 0

layout

protected void layout(int width,
                      int height)
Lays out the children. If the span along the flow axis has changed, layout is marked as invalid which which will cause the superclass behavior to recalculate the layout along the box axis. If the FlowStrategy reports that a layout is needed, the FlowStrategy.layout method will be called to rebuild the flow rows as appropriate. If the height of this view changes (determined by the perferred size along the box axis), a preferenceChanged is messaged. Following all of that, the normal box layout of the superclass is performed.
Overrides:
layout in class BoxView
Parameters:
width - the width to lay out against >= 0. This is the width inside of the inset area.
height - the height to lay out against >= 0 This is the height inside of the inset area.

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)
Calculate equirements along the minor axis. This is implemented to forward the request to the logical view by calling getMinimumSpan, getPreferredSpan, and getMaximumSpan on it.
Overrides:
calculateMinorAxisRequirements in class BoxView

insertUpdate

public void insertUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for.
Overrides:
insertUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for.
Overrides:
removeUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(DocumentEvent changes,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleConstants.FontConstants

java.lang.Object
  |
  +--javax.swing.text.StyleConstants
        |
        +--javax.swing.text.StyleConstants.FontConstants
All Implemented Interfaces:
AttributeSet.CharacterAttribute, AttributeSet.FontAttribute
Enclosing class:
StyleConstants
public static class StyleConstants.FontConstants
extends StyleConstants
implements AttributeSet.FontAttribute, AttributeSet.CharacterAttribute

This is a typesafe enumeration of the well-known attributes that contribute to a font. These are aliased by the outer class for general presentation.

Inner classes inherited from class javax.swing.text.StyleConstants
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants
Field Summary
static Object | Bold Name of the bold attribute.
static Object | Family Name of the font family.
static Object | Italic Name of the italic attribute.
static Object | Size Name of the font size.
Fields inherited from class javax.swing.text.StyleConstants
ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_LEFT, ALIGN_RIGHT, Alignment, Background, BidiLevel, ComponentAttribute, ComponentElementName, ComposedTextAttribute, FirstLineIndent, FontFamily, FontSize, Foreground, IconAttribute, IconElementName, LeftIndent, LineSpacing, ModelAttribute, NameAttribute, Orientation, ResolveAttribute, RightIndent, SpaceAbove, SpaceBelow, StrikeThrough, Subscript, Superscript, TabSet, Underline
Methods inherited from class javax.swing.text.StyleConstants
getAlignment, getBackground, getBidiLevel, getComponent, getFirstLineIndent, getFontFamily, getFontSize, getForeground, getIcon, getLeftIndent, getLineSpacing, getRightIndent, getSpaceAbove, getSpaceBelow, getTabSet, isBold, isItalic, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setAlignment, setBackground, setBidiLevel, setBold, setComponent, setFirstLineIndent, setFontFamily, setFontSize, setForeground, setIcon, setItalic, setLeftIndent, setLineSpacing, setRightIndent, setSpaceAbove, setSpaceBelow, setStrikeThrough, setSubscript, setSuperscript, setTabSet, setUnderline, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

Family

public static final Object Family
Name of the font family.

Size

public static final Object Size
Name of the font size.

Bold

public static final Object Bold
Name of the bold attribute.

Italic

public static final Object Italic
Name of the italic attribute.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontFamilyAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.FontFamilyAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.FontFamilyAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.FontFamilyAction
extends StyledEditorKit.StyledTextAction

An action to set the font family in the associated JEditorPane. This will use the family specified as the command string on the ActionEvent if there is one, otherwise the family that was initialized with will be used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.FontFamilyAction(String nm, String family)
Creates a new FontFamilyAction.
Method Summary
 void actionPerformed(ActionEvent e)
Sets the font family.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.FontFamilyAction

public StyledEditorKit.FontFamilyAction(String nm,
                                        String family)
Creates a new FontFamilyAction.
Parameters:
nm - the action name
family - the font family
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Sets the font family.
Parameters:
e - the event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FontSizeAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.FontSizeAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.FontSizeAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.FontSizeAction
extends StyledEditorKit.StyledTextAction

An action to set the font size in the associated JEditorPane. This will use the size specified as the command string on the ActionEvent if there is one, otherwise the size that was initialized with will be used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.FontSizeAction(String nm, int size)
Creates a new FontSizeAction.
Method Summary
 void actionPerformed(ActionEvent e)
Sets the font size.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.FontSizeAction

public StyledEditorKit.FontSizeAction(String nm,
                                      int size)
Creates a new FontSizeAction.
Parameters:
nm - the action name
size - the font size
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Sets the font size.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ForegroundAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.ForegroundAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.ForegroundAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.ForegroundAction
extends StyledEditorKit.StyledTextAction

An action to set foreground color. This sets the StyleConstants.Foreground attribute for the currently selected range of the target JEditorPane. This is done by calling StyledDocument.setCharacterAttributes on the styled document associated with the target JEditorPane.

If the target text component is specified as the source of the ActionEvent and there is a command string, the command string will be interpreted as the foreground color. It will be interpreted by called Color.decode, and should therefore be legal input for that method.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.ForegroundAction(String nm, Color fg)
Creates a new ForegroundAction.
Method Summary
 void actionPerformed(ActionEvent e)
Sets the foreground color.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.ForegroundAction

public StyledEditorKit.ForegroundAction(String nm,
                                        Color fg)
Creates a new ForegroundAction.
Parameters:
nm - the action name
fg - the foreground color
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Sets the foreground color.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GapContent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class GapContent

java.lang.Object
  |
  +--javax.swing.text.GapVector
        |
        +--javax.swing.text.GapContent
All Implemented Interfaces:
AbstractDocument.Content, Serializable
public class GapContent
extends javax.swing.text.GapVector
implements AbstractDocument.Content, Serializable

An implementation of the AbstractDocument.Content interface implemented using a gapped buffer similar to that used by emacs. The underlying storage is a array of unicode characters with a gap somewhere. The gap is moved to the location of changes to take advantage of common behavior where most changes are in the same location. Changes that occur at a gap boundary are generally cheap and moving the gap is generally cheaper than moving the array contents directly to accomodate the change.

The positions tracking change are also generally cheap to maintain. The Position implementations (marks) store the array index and can easily calculate the sequential position from the current gap location. Changes only require update to the the marks between the old and new gap boundaries when the gap is moved, so generally updating the marks is pretty cheap. The marks are stored sorted so they can be located quickly with a binary search. This increases the cost of adding a mark, and decreases the cost of keeping the mark updated.

See Also:
Serialized Form

Constructor Summary
GapContent()
Creates a new GapContent object.
GapContent(int initialLength)
Creates a new GapContent object, with the initial size specified.
Method Summary
protected Object | allocateArray(int len) Allocate an array to store items of the type appropriate (which is determined by the subclass).
Position | createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
protected Object | getArray() Access to the array.
protected int | getArrayLength() Get the length of the allocated array.
void | getChars(int where, int len, Segment chars) Retrieves a portion of the content.
protected int | getGapEnd() Access to the end of the gap.
protected int | getGapStart() Access to the start of the gap.
protected Vector | getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
String | getString(int where, int len) Retrieves a portion of the content.
UndoableEdit | insertString(int where, String str) Inserts a string into the content.
int | length() Returns the length of the content.
UndoableEdit | remove(int where, int nitems) Removes part of the content.
protected void | replace(int position, int rmSize, Object addItems, int addSize) Replace the given logical position in the storage with the given new items.
protected void | resetMarksAtZero() Resets all the marks that have an offset of 0 to have an index of zero as well.
protected void | shiftEnd(int newSize) Make the gap bigger, moving any necessary data and updating the appropriate marks
protected void | shiftGap(int newGapStart) Move the start of the gap to a new location, without changing the size of the gap.
protected void | shiftGapEndUp(int newGapEnd) Adjust the gap end upward.
protected void | shiftGapStartDown(int newGapStart) Adjust the gap end downward.
protected void | updateUndoPositions(Vector positions, int offset, int length) Resets the location for all the UndoPosRef instances in positions.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GapContent

public GapContent()
Creates a new GapContent object. Initial size defaults to 10.

GapContent

public GapContent(int initialLength)
Creates a new GapContent object, with the initial size specified. The initial size will not be allowed to go below 2, to give room for the implied break and the gap.
Parameters:
initialLength - the initial size
Method Detail

allocateArray

protected Object allocateArray(int len)
Allocate an array to store items of the type appropriate (which is determined by the subclass).
Overrides:
allocateArray in class javax.swing.text.GapVector

getArrayLength

protected int getArrayLength()
Get the length of the allocated array.
Overrides:
getArrayLength in class javax.swing.text.GapVector

length

public int length()
Returns the length of the content.
Specified by:
length in interface AbstractDocument.Content
Returns:
the length >= 1
See Also:
AbstractDocument.Content.length()

insertString

public UndoableEdit insertString(int where,
                                 String str)
                          throws BadLocationException
Inserts a string into the content.
Specified by:
insertString in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0, str - the non-null string to insert
Returns:
an UndoableEdit object for undoing
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.insertString(int, java.lang.String)

remove

public UndoableEdit remove(int where,
                           int nitems)
                    throws BadLocationException
Removes part of the content.
Specified by:
remove in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0, where + nitems nitems - the number of characters to remove >= 0
Returns:
an UndoableEdit object for undoing
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.remove(int, int)

getString

public String getString(int where,
                        int len)
                 throws BadLocationException
Retrieves a portion of the content.
Specified by:
getString in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0
len - the length to retrieve >= 0
Returns:
a string representing the content
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.getString(int, int)

getChars

public void getChars(int where,
                     int len,
                     Segment chars)
              throws BadLocationException
Retrieves a portion of the content. If the desired content spans the gap, we copy the content. If the desired content does not span the gap, the actual store is returned to avoid the copy since it is contiguous.
Specified by:
getChars in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0, where + len <= length()len - the number of characters to retrieve >= 0
chars - the Segment object to return the characters in
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.getChars(int, int, javax.swing.text.Segment)

createPosition

public Position createPosition(int offset)
                        throws BadLocationException
Creates a position within the content that will track change as the content is mutated.
Specified by:
createPosition in interface AbstractDocument.Content
Parameters:
offset - the offset to track >= 0
Returns:
the position
Throws:
BadLocationException - if the specified position is invalid

shiftEnd

protected void shiftEnd(int newSize)
Make the gap bigger, moving any necessary data and updating the appropriate marks
Overrides:
shiftEnd in class javax.swing.text.GapVector

shiftGap

protected void shiftGap(int newGapStart)
Move the start of the gap to a new location, without changing the size of the gap. This moves the data in the array and updates the marks accordingly.
Overrides:
shiftGap in class javax.swing.text.GapVector

resetMarksAtZero

protected void resetMarksAtZero()
Resets all the marks that have an offset of 0 to have an index of zero as well.

shiftGapStartDown

protected void shiftGapStartDown(int newGapStart)
Adjust the gap end downward. This doesn't move any data, but it does update any marks affected by the boundary change. All marks from the old gap start down to the new gap start are squeezed to the end of the gap (their location has been removed).
Overrides:
shiftGapStartDown in class javax.swing.text.GapVector

shiftGapEndUp

protected void shiftGapEndUp(int newGapEnd)
Adjust the gap end upward. This doesn't move any data, but it does update any marks affected by the boundary change. All marks from the old gap end up to the new gap end are squeezed to the end of the gap (their location has been removed).
Overrides:
shiftGapEndUp in class javax.swing.text.GapVector

getPositionsInRange

protected Vector getPositionsInRange(Vector v,
                                     int offset,
                                     int length)
Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length. If v is not null the matching Positions are placed in there. The vector with the resulting Positions are returned.
Parameters:
v - the Vector to use, with a new one created on null
offset - the starting offset >= 0
length - the length >= 0
Returns:
the set of instances

updateUndoPositions

protected void updateUndoPositions(Vector positions,
                                   int offset,
                                   int length)
Resets the location for all the UndoPosRef instances in positions.
Parameters:
positions - the UndoPosRef instances to reset

getArray

protected final Object getArray()
Access to the array. The actual type of the array is known only by the subclass.

getGapStart

protected final int getGapStart()
Access to the start of the gap.

getGapEnd

protected final int getGapEnd()
Access to the end of the gap.

replace

protected void replace(int position,
                       int rmSize,
                       Object addItems,
                       int addSize)
Replace the given logical position in the storage with the given new items. This will move the gap to the area being changed if the gap is not currently located at the change location.
Parameters:
position - the location to make the replacement. This is not the location in the underlying storage array, but the location in the contiguous space being modeled.
rmSize - the number of items to remove
addItems - the new items to place in storage.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GlyphPainter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class GlyphView.GlyphPainter

java.lang.Object
  |
  +--javax.swing.text.GlyphView.GlyphPainter
Enclosing class:
GlyphView
public abstract static class GlyphView.GlyphPainter
extends Object

A class to perform rendering of the glyphs. This can be implemented to be stateless, or to hold some information as a cache to facilitate faster rendering and model/view translation. At a minimum, the GlyphPainter allows a View implementation to perform its duties independant of a particular version of JVM and selection of capabilities (i.e. shaping for i18n, etc).

Constructor Summary
GlyphView.GlyphPainter()
Method Summary
abstract float | getAscent(GlyphView v)
abstract int | getBoundedPosition(GlyphView v, int p0, float x, float len) Determines the model location that represents the maximum advance that fits within the given span.
abstract float | getDescent(GlyphView v)
abstract float | getHeight(GlyphView v)
int | getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
GlyphView.GlyphPainter | getPainter(GlyphView v, int p0, int p1) Create a painter to use for the given GlyphView.
abstract float | getSpan(GlyphView v, int p0, int p1, TabExpander e, float x) Determine the span the glyphs given a start location (for tab expansion).
abstract Shape | modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract void | paint(GlyphView v, Graphics g, Shape a, int p0, int p1) Paint the glyphs representing the given range.
abstract int | viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GlyphView.GlyphPainter

public GlyphView.GlyphPainter()
Method Detail

getSpan

public abstract float getSpan(GlyphView v,
                              int p0,
                              int p1,
                              TabExpander e,
                              float x)
Determine the span the glyphs given a start location (for tab expansion).

getHeight

public abstract float getHeight(GlyphView v)

getAscent

public abstract float getAscent(GlyphView v)

getDescent

public abstract float getDescent(GlyphView v)

paint

public abstract void paint(GlyphView v,
                           Graphics g,
                           Shape a,
                           int p0,
                           int p1)
Paint the glyphs representing the given range.

modelToView

public abstract Shape modelToView(GlyphView v,
                                  int pos,
                                  Position.Bias bias,
                                  Shape a)
                           throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. This is shared by the broken views.
Parameters:
pos - the position to convert
a - the allocated region to render into
rightToLeft - true if the text is rendered right to left.
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public abstract int viewToModel(GlyphView v,
                                float x,
                                float y,
                                Shape a,
                                Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Parameters:
x - the X coordinate
y - the Y coordinate
a - the allocated region to render into
rightToLeft - true if the text is rendered right to left
Returns:
the location within the model that best represents the given point of view
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

getBoundedPosition

public abstract int getBoundedPosition(GlyphView v,
                                       int p0,
                                       float x,
                                       float len)
Determines the model location that represents the maximum advance that fits within the given span. This could be used to break the given view. The result should be a location just shy of the given advance. This differs from viewToModel which returns the closest position which might be proud of the maximum advance.
Parameters:
v - the view to find the model location to break at.
p0 - the location in the model where the fragment should start it's representation >= 0.
pos - the graphic location along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations.
len - specifies the distance into the view where a potential break is desired >= 0.
Returns:
the maximum model location possible for a break.
See Also:
View.breakView(int, int, float, float)

getPainter

public GlyphView.GlyphPainter getPainter(GlyphView v,
                                         int p0,
                                         int p1)
Create a painter to use for the given GlyphView. If the painter carries state it can create another painter to represent a new GlyphView that is being created. If the painter doesn't hold any significant state, it can return itself. The default behavior is to return itself.

getNextVisualPositionFrom

public int getNextVisualPositionFrom(GlyphView v,
                                     int pos,
                                     Position.Bias b,
                                     Shape a,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Parameters:
v - the view to use
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GlyphView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class GlyphView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.GlyphView
All Implemented Interfaces:
Cloneable, SwingConstants, TabableView
Direct Known Subclasses:
LabelView
public class GlyphView
extends View
implements TabableView, Cloneable

A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model. This view is generally responsible for displaying text glyphs using character level attributes in some way. An implementation of the GlyphPainter class is used to do the actual rendering and model/view translations. This separates rendering from layout and management of the association with the model.

The view supports breaking for the purpose of formatting. The fragments produced by breaking share the view that has primary responsibility for the element (i.e. they are nested classes and carry only a small amount of state of their own) so they can share its resources.

Since this view represents text that may have tabs embedded in it, it implements the TabableView interface. Tabs will only be expanded if this view is embedded in a container that does tab expansion. ParagraphView is an example of a container that does tab expansion.

Inner Class Summary
static class GlyphView.GlyphPainter
A class to perform rendering of the glyphs.
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
GlyphView(Element elem)
Constructs a new view wrapped on an element.
Method Summary
View | breakView(int axis, int p0, float pos, float len) Breaks this view on the given axis at the given length.
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | checkPainter() Check to see that a glyph painter exists.
protected Object | clone() Creates a shallow copy.
View | createFragment(int p0, int p1) Creates a view that represents a portion of the element.
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
Color | getBackground() Fetch the background color to use to render the glyphs.
int | getBreakWeight(int axis, float pos, float len) Determines how attractive a break opportunity in this view is.
int | getEndOffset() Fetches the portion of the model that this view is responsible for.
Font | getFont() Fetch the font that the glyphs should be based upon.
Color | getForeground() Fetch the foreground color to use to render the glyphs.
GlyphView.GlyphPainter | getGlyphPainter() Fetch the currently installed glyph painter.
int | getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
float | getPartialSpan(int p0, int p1) Determines the span along the same axis as tab expansion for a portion of the view.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
int | getStartOffset() Fetches the portion of the model that this view is responsible for.
float | getTabbedSpan(float x, TabExpander e) Determines the desired span when using the given tab expansion implementation.
TabExpander | getTabExpander() Fetch the TabExpander to use if tabs are present in this view.
Segment | getText(int p0, int p1) Fetch a reference to the text that occupies the given range.
void | insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
boolean | isStrikeThrough() Determine if the glyphs should have a strikethrough line.
boolean | isSubscript() Determine if the glyphs should be rendered as superscript.
boolean | isSuperscript() Determine if the glyphs should be rendered as subscript.
boolean | isUnderline() Determine if the glyphs should be underlined.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | paint(Graphics g, Shape a) Renders a portion of a text style run.
void | removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | setGlyphPainter(GlyphView.GlyphPainter p) Sets the painter to use for rendering glyphs.
int | viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, forwardUpdate, forwardUpdateToView, getAttributes, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GlyphView

public GlyphView(Element elem)
Constructs a new view wrapped on an element.
Parameters:
elem - the element
Method Detail

clone

protected final Object clone()
Creates a shallow copy. This is used by the createFragment and breakView methods.
Overrides:
clone in class Object
Returns:
the copy

getGlyphPainter

public GlyphView.GlyphPainter getGlyphPainter()
Fetch the currently installed glyph painter. If a painter has not yet been installed, and a default was not yet needed, null is returned.

setGlyphPainter

public void setGlyphPainter(GlyphView.GlyphPainter p)
Sets the painter to use for rendering glyphs.

getText

public Segment getText(int p0,
                       int p1)
Fetch a reference to the text that occupies the given range. This is normally used by the GlyphPainter to determine what characters it should render glyphs for.

getBackground

public Color getBackground()
Fetch the background color to use to render the glyphs. If there is no background color, null should be returned. This is implemented to call StyledDocument.getBackground if the associated document is a styled document, otherwise it returns null.

getForeground

public Color getForeground()
Fetch the foreground color to use to render the glyphs. If there is no foreground color, null should be returned. This is implemented to call StyledDocument.getBackground if the associated document is a StyledDocument. If the associated document is not a StyledDocument, the associated components foreground color is used. If there is no associated component, null is returned.

getFont

public Font getFont()
Fetch the font that the glyphs should be based upon. This is implemented to call StyledDocument.getFont if the associated document is a StyledDocument. If the associated document is not a StyledDocument, the associated components font is used. If there is no associated component, null is returned.

isUnderline

public boolean isUnderline()
Determine if the glyphs should be underlined. If true, an underline should be drawn through the baseline.

isStrikeThrough

public boolean isStrikeThrough()
Determine if the glyphs should have a strikethrough line. If true, a line should be drawn through the center of the glyphs.

isSubscript

public boolean isSubscript()
Determine if the glyphs should be rendered as superscript.

isSuperscript

public boolean isSuperscript()
Determine if the glyphs should be rendered as subscript.

getTabExpander

public TabExpander getTabExpander()
Fetch the TabExpander to use if tabs are present in this view.

checkPainter

protected void checkPainter()
Check to see that a glyph painter exists. If a painter doesn't exist, a default glyph painter will be installed.

getTabbedSpan

public float getTabbedSpan(float x,
                           TabExpander e)
Determines the desired span when using the given tab expansion implementation.
Specified by:
getTabbedSpan in interface TabableView
Parameters:
x - the position the view would be located at for the purpose of tab expansion >= 0.
e - how to expand the tabs when encountered.
Returns:
the desired span >= 0
See Also:
TabableView.getTabbedSpan(float, javax.swing.text.TabExpander)

getPartialSpan

public float getPartialSpan(int p0,
                            int p1)
Determines the span along the same axis as tab expansion for a portion of the view. This is intended for use by the TabExpander for cases where the tab expansion involves aligning the portion of text that doesn't have whitespace relative to the tab stop. There is therefore an assumption that the range given does not contain tabs.

This method can be called while servicing the getTabbedSpan or getPreferredSize. It has to arrange for its own text buffer to make the measurements.

Specified by:
getPartialSpan in interface TabableView
Parameters:
p0 - the starting document offset >= 0
p1 - the ending document offset >= p0
Returns:
the span >= 0

getStartOffset

public int getStartOffset()
Fetches the portion of the model that this view is responsible for.
Overrides:
getStartOffset in class View
Returns:
the starting offset into the model
See Also:
View.getStartOffset()

getEndOffset

public int getEndOffset()
Fetches the portion of the model that this view is responsible for.
Overrides:
getEndOffset in class View
Returns:
the ending offset into the model
See Also:
View.getEndOffset()

paint

public void paint(Graphics g,
                  Shape a)
Renders a portion of a text style run.
Overrides:
paint in class View
Parameters:
g - the rendering surface to use
a - the allocated region to render into

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. For the label, the alignment is along the font baseline for the y axis, and the superclasses alignment along the x axis.
Overrides:
getAlignment in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class View
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point of view >= 0
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

getBreakWeight

public int getBreakWeight(int axis,
                          float pos,
                          float len)
Determines how attractive a break opportunity in this view is. This can be used for determining which view is the most attractive to call breakView on in the process of formatting. The higher the weight, the more attractive the break. A value equal to or lower than View.BadBreakWeight should not be considered for a break. A value greater than or equal to View.ForcedBreakWeight should be broken.

This is implemented to forward to the superclass for the Y_AXIS. Along the X_AXIS the following values may be returned.

View.ExcellentBreakWeight
if there is whitespace proceeding the desired break location.
View.BadBreakWeight
if the desired break location results in a break location of the starting offset.
View.GoodBreakWeight
if the other conditions don't occur.
This will normally result in the behavior of breaking on a whitespace location if one can be found, otherwise breaking between characters.
Overrides:
getBreakWeight in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
pos - the potential location of the start of the broken view >= 0. This may be useful for calculating tab positions.
len - specifies the relative length from pos where a potential break is desired >= 0.
Returns:
the weight, which should be a value between View.ForcedBreakWeight and View.BadBreakWeight.
See Also:
LabelView, ParagraphView, View.BadBreakWeight, View.GoodBreakWeight, View.ExcellentBreakWeight, View.ForcedBreakWeight

breakView

public View breakView(int axis,
                      int p0,
                      float pos,
                      float len)
Breaks this view on the given axis at the given length. This is implemented to attempt to break on a whitespace location, and returns a fragment with the whitespace at the end. If a whitespace location can't be found, the nearest character is used.
Overrides:
breakView in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
p0 - the location in the model where the fragment should start it's representation >= 0.
pos - the position along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations.
len - specifies the distance along the axis where a potential break is desired >= 0.
Returns:
the fragment of the view that represents the given span, if the view can be broken. If the view doesn't support breaking behavior, the view itself is returned.
See Also:
View.breakView(int, int, float, float)

createFragment

public View createFragment(int p0,
                           int p1)
Creates a view that represents a portion of the element. This is potentially useful during formatting operations for taking measurements of fragments of the view. If the view doesn't support fragmenting (the default), it should return itself.

This view does support fragmenting. It is implemented to return a nested class that shares state in this view representing only a portion of the view.

Overrides:
createFragment in class View
Parameters:
p0 - the starting offset >= 0. This should be a value greater or equal to the element starting offset and less than the element ending offset.
p1 - the ending offset > p0. This should be a value less than or equal to the elements end offset and greater than the elements starting offset.
See Also:
LabelView

getNextVisualPositionFrom

public int getNextVisualPositionFrom(int pos,
                                     Position.Bias b,
                                     Shape a,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Overrides:
getNextVisualPositionFrom in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

insertUpdate

public void insertUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for. This is implemented to call preferenceChanged along the axis the glyphs are rendered.
Overrides:
insertUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for. This is implemented to call preferenceChanged along the axis the glyphs are rendered.
Overrides:
removeUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. This is implemented to call preferenceChanged along both the horizontal and vertical axis.
Overrides:
changedUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Highlight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Highlighter.Highlight

Enclosing class:
Highlighter
public static interface Highlighter.Highlight

Method Summary
int | getEndOffset() Gets the ending model offset for the highlight.
Highlighter.HighlightPainter | getPainter() Gets the painter for the highlighter.
int | getStartOffset() Gets the starting model offset for the highlight.

Method Detail

getStartOffset

public int getStartOffset()
Gets the starting model offset for the highlight.
Returns:
the starting offset >= 0

getEndOffset

public int getEndOffset()
Gets the ending model offset for the highlight.
Returns:
the ending offset >= 0

getPainter

public Highlighter.HighlightPainter getPainter()
Gets the painter for the highlighter.
Returns:
the painter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Highlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Highlighter

All Known Implementing Classes:
LayeredHighlighter
public interface Highlighter

An interface for an object that allows one to mark up the background with colored areas.

Inner Class Summary
static interface | Highlighter.Highlight
static interface | Highlighter.HighlightPainter Highlight renderer.
Method Summary
Object | addHighlight(int p0, int p1, Highlighter.HighlightPainter p) Adds a highlight to the view.
void | changeHighlight(Object tag, int p0, int p1) Changes the given highlight to span a different portion of the document.
void | deinstall(JTextComponent c) Called when the UI is being removed from the interface of a JTextComponent.
Highlighter.Highlight[] | getHighlights() Fetches the current list of highlights.
void | install(JTextComponent c) Called when the UI is being installed into the interface of a JTextComponent.
void | paint(Graphics g) Renders the highlights.
void | removeAllHighlights() Removes all highlights this highlighter is responsible for.
void | removeHighlight(Object tag) Removes a highlight from the view.

Method Detail

install

public void install(JTextComponent c)
Called when the UI is being installed into the interface of a JTextComponent. This can be used to gain access to the model that is being navigated by the implementation of this interface.
Parameters:
c - the JTextComponent editor

deinstall

public void deinstall(JTextComponent c)
Called when the UI is being removed from the interface of a JTextComponent. This is used to unregister any listeners that were attached.
Parameters:
c - the JTextComponent editor

paint

public void paint(Graphics g)
Renders the highlights.
Parameters:
g - the graphics context.

addHighlight

public Object addHighlight(int p0,
                           int p1,
                           Highlighter.HighlightPainter p)
                    throws BadLocationException
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
p - the painter to use for the actual highlighting
Returns:
an object that refers to the highlight
Throws:
BadLocationException - for an invalid range specification

removeHighlight

public void removeHighlight(Object tag)
Removes a highlight from the view.
Parameters:
tag - which highlight to remove

removeAllHighlights

public void removeAllHighlights()
Removes all highlights this highlighter is responsible for.

changeHighlight

public void changeHighlight(Object tag,
                            int p0,
                            int p1)
                     throws BadLocationException
Changes the given highlight to span a different portion of the document. This may be more efficient than a remove/add when a selection is expanding/shrinking (such as a sweep with a mouse) by damaging only what changed.
Parameters:
tag - which highlight to change
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
Throws:
BadLocationException - for an invalid range specification

getHighlights

public Highlighter.Highlight[] getHighlights()
Fetches the current list of highlights.
Returns:
the highlight list
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HighlightPainter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Highlighter.HighlightPainter

All Known Implementing Classes:
LayeredHighlighter.LayerPainter
Enclosing class:
Highlighter
public static interface Highlighter.HighlightPainter

Highlight renderer.

Method Summary
 void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
Renders the highlight.

Method Detail

paint

public void paint(Graphics g,
                  int p0,
                  int p1,
                  Shape bounds,
                  JTextComponent c)
Renders the highlight.
Parameters:
g - the graphics context
p0 - the starting offset in the model >= 0
p1 - the ending offset in the model >= p0
bounds - the bounding box for the highlight
c - the editor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.text.html Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.text.html

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.TextAction
        • class javax.swing.text.StyledEditorKit.StyledTextAction
          • class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
            • class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
    • class javax.swing.text.AbstractDocument (implements javax.swing.text.Document, java.io.Serializable)
      • class javax.swing.text.DefaultStyledDocument (implements javax.swing.text.StyledDocument)
        • class javax.swing.text.html.HTMLDocument
    • class javax.swing.text.AbstractDocument.AbstractElement (implements javax.swing.text.Element, javax.swing.text.MutableAttributeSet, java.io.Serializable, javax.swing.tree.TreeNode)
      • class javax.swing.text.AbstractDocument.BranchElement
        • class javax.swing.text.html.HTMLDocument.BlockElement
      • class javax.swing.text.AbstractDocument.LeafElement
        • class javax.swing.text.html.HTMLDocument.RunElement
    • class javax.swing.text.AbstractWriter
      • class javax.swing.text.html.HTMLWriter
      • class javax.swing.text.html.MinimalHTMLWriter
    • class javax.swing.text.html.CSS (implements java.io.Serializable)
    • class javax.swing.text.html.CSS.Attribute
    • class javax.swing.text.EditorKit (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.DefaultEditorKit
        • class javax.swing.text.StyledEditorKit
          • class javax.swing.text.html.HTMLEditorKit
    • class java.util.EventObject (implements java.io.Serializable)
      • class javax.swing.event.HyperlinkEvent
        • class javax.swing.text.html.HTMLFrameHyperlinkEvent
    • class javax.swing.text.html.HTML
    • class javax.swing.text.html.HTML.Attribute
    • class javax.swing.text.html.HTML.Tag
      • class javax.swing.text.html.HTML.UnknownTag (implements java.io.Serializable)
    • class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction
      • class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction
        • class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction
    • class javax.swing.text.html.HTMLDocument.Iterator
    • class javax.swing.text.html.HTMLEditorKit.HTMLFactory (implements javax.swing.text.ViewFactory)
    • class javax.swing.text.html.HTMLEditorKit.Parser
    • class javax.swing.text.html.HTMLEditorKit.ParserCallback
      • class javax.swing.text.html.HTMLDocument.HTMLReader
    • class java.awt.event.MouseAdapter (implements java.awt.event.MouseListener)
      • class javax.swing.text.html.FormView.MouseEventListener
      • class javax.swing.text.html.HTMLEditorKit.LinkController (implements java.awt.event.MouseMotionListener, java.io.Serializable)
    • class javax.swing.text.html.Option
    • class javax.swing.text.StyleContext (implements javax.swing.text.AbstractDocument.AttributeContext, java.io.Serializable)
      • class javax.swing.text.html.StyleSheet
    • class javax.swing.text.html.StyleSheet.BoxPainter (implements java.io.Serializable)
    • class javax.swing.text.html.StyleSheet.ListPainter (implements java.io.Serializable)
    • class javax.swing.text.View (implements javax.swing.SwingConstants)
      • class javax.swing.text.ComponentView
        • class javax.swing.text.html.FormView (implements java.awt.event.ActionListener)
        • class javax.swing.text.html.ObjectView
      • class javax.swing.text.CompositeView
        • class javax.swing.text.BoxView
          • class javax.swing.text.html.BlockView
            • class javax.swing.text.html.ListView
          • class javax.swing.text.FlowView
            • class javax.swing.text.ParagraphView (implements javax.swing.text.TabExpander)
              • class javax.swing.text.html.ParagraphView
      • class javax.swing.text.GlyphView (implements java.lang.Cloneable, javax.swing.text.TabableView)
        • class javax.swing.text.LabelView (implements javax.swing.text.TabableView)
          • class javax.swing.text.html.InlineView
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.text.html

Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

See:
Description

Class Summary
BlockView | A view implementation to display a block (as a box) with CSS specifications.
CSS | Defines a set of CSS attributes as a typesafe enumeration.
CSS.Attribute | Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
FormView | Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
HTML | Constants used in the HTMLDocument.
HTML.Attribute | Typesafe enumeration representing an html attribute.
HTML.Tag | Typesafe enumeration for an html tag.
HTML.UnknownTag |
HTMLDocument | A document that models HTML.
HTMLDocument.Iterator | An iterator to iterate over a particular type of tag.
HTMLEditorKit | The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
HTMLEditorKit.HTMLFactory | A factory to build views for HTML.
HTMLEditorKit.HTMLTextAction | An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
HTMLEditorKit.InsertHTMLTextAction | InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
HTMLEditorKit.LinkController | Class to watch the associated component and fire hyperlink events on it when appropriate.
HTMLEditorKit.Parser | Interface to be supported by the parser.
HTMLEditorKit.ParserCallback | The result of parsing drives these callback methods.
HTMLFrameHyperlinkEvent | HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.
HTMLWriter | This is a writer for HTMLDocuments.
InlineView | Displays the inline element styles based upon css attributes.
ListView | A view implementation to display an html list
MinimalHTMLWriter | MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit.
ObjectView | Component decorator that implements the view interface for <object> elements.
Option | Value for the ListModel used to represent <option> elements.
ParagraphView | Displays the a paragraph, and uses css attributes for its configuration.
StyleSheet | Support for defining the visual characteristics of HTML views being rendered.
StyleSheet.BoxPainter | Class to carry out some of the duties of CSS formatting.
StyleSheet.ListPainter | Class to carry out some of the duties of CSS list formatting.

Package javax.swing.text.html Description

Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Package Specification

  • HTML 3.2 Reference Specification - The HTML specification on which HTMLEditorKit is based.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.text.html

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.text.html

Packages that use javax.swing.text.html
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Classes in javax.swing.text.html used by javax.swing.text.html
BlockView
A view implementation to display a block (as a box) with CSS specifications.
CSS.Attribute
Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
FormView
Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>.
HTML.Attribute
Typesafe enumeration representing an html attribute.
HTML.Tag
Typesafe enumeration for an html tag.
HTMLDocument
A document that models HTML.
HTMLDocument.HTMLReader
An HTML reader to load an HTML document with an HTML element structure.
HTMLDocument.HTMLReader.BlockAction
HTMLDocument.HTMLReader.SpecialAction
HTMLDocument.HTMLReader.TagAction
An action to be performed in response to parsing a tag.
HTMLDocument.Iterator
An iterator to iterate over a particular type of tag.
HTMLEditorKit
The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit.
HTMLEditorKit.HTMLTextAction
An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
HTMLEditorKit.Parser
Interface to be supported by the parser.
HTMLEditorKit.ParserCallback
The result of parsing drives these callback methods.
HTMLFrameHyperlinkEvent
HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.
Option
Value for the ListModel used to represent <option> elements.
StyleSheet
Support for defining the visual characteristics of HTML views being rendered.
StyleSheet.BoxPainter
Class to carry out some of the duties of CSS formatting.
StyleSheet.ListPainter
Class to carry out some of the duties of CSS list formatting.

Classes in javax.swing.text.html used by javax.swing.text.html.parser
HTML.Tag
Typesafe enumeration for an html tag.
HTMLEditorKit.Parser
Interface to be supported by the parser.
HTMLEditorKit.ParserCallback
The result of parsing drives these callback methods.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Attribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTML.Attribute

java.lang.Object
  |
  +--javax.swing.text.html.HTML.Attribute
Enclosing class:
HTML
public static final class HTML.Attribute
extends Object

Typesafe enumeration representing an html attribute.

Field Summary
static HTML.Attribute | ACTION
static HTML.Attribute | ALIGN
static HTML.Attribute | ALINK
static HTML.Attribute | ALT
static HTML.Attribute | ARCHIVE
static HTML.Attribute | BACKGROUND
static HTML.Attribute | BGCOLOR
static HTML.Attribute | BORDER
static HTML.Attribute | CELLPADDING
static HTML.Attribute | CELLSPACING
static HTML.Attribute | CHECKED
static HTML.Attribute | CLASS
static HTML.Attribute | CLASSID
static HTML.Attribute | CLEAR
static HTML.Attribute | CODE
static HTML.Attribute | CODEBASE
static HTML.Attribute | CODETYPE
static HTML.Attribute | COLOR
static HTML.Attribute | COLS
static HTML.Attribute | COLSPAN
static HTML.Attribute | COMMENT
static HTML.Attribute | COMPACT
static HTML.Attribute | CONTENT
static HTML.Attribute | COORDS
static HTML.Attribute | DATA
static HTML.Attribute | DECLARE
static HTML.Attribute | DIR
static HTML.Attribute | DUMMY
static HTML.Attribute | ENCTYPE
static HTML.Attribute | ENDTAG
static HTML.Attribute | FACE
static HTML.Attribute | FRAMEBORDER
static HTML.Attribute | HALIGN
static HTML.Attribute | HEIGHT
static HTML.Attribute | HREF
static HTML.Attribute | HSPACE
static HTML.Attribute | HTTPEQUIV
static HTML.Attribute | ID
static HTML.Attribute | ISMAP
static HTML.Attribute | LANG
static HTML.Attribute | LANGUAGE
static HTML.Attribute | LINK
static HTML.Attribute | LOWSRC
static HTML.Attribute | MARGINHEIGHT
static HTML.Attribute | MARGINWIDTH
static HTML.Attribute | MAXLENGTH
static HTML.Attribute | METHOD
static HTML.Attribute | MULTIPLE
static HTML.Attribute | N
static HTML.Attribute | NAME
static HTML.Attribute | NOHREF
static HTML.Attribute | NORESIZE
static HTML.Attribute | NOSHADE
static HTML.Attribute | NOWRAP
static HTML.Attribute | PROMPT
static HTML.Attribute | REL
static HTML.Attribute | REV
static HTML.Attribute | ROWS
static HTML.Attribute | ROWSPAN
static HTML.Attribute | SCROLLING
static HTML.Attribute | SELECTED
static HTML.Attribute | SHAPE
static HTML.Attribute | SHAPES
static HTML.Attribute | SIZE
static HTML.Attribute | SRC
static HTML.Attribute | STANDBY
static HTML.Attribute | START
static HTML.Attribute | STYLE
static HTML.Attribute | TARGET
static HTML.Attribute | TEXT
static HTML.Attribute | TITLE
static HTML.Attribute | TYPE
static HTML.Attribute | USEMAP
static HTML.Attribute | VALIGN
static HTML.Attribute | VALUE
static HTML.Attribute | VALUETYPE
static HTML.Attribute | VERSION
static HTML.Attribute | VLINK
static HTML.Attribute | VSPACE
static HTML.Attribute | WIDTH
Method Summary
 String toString()
Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SIZE

public static final HTML.Attribute SIZE

COLOR

public static final HTML.Attribute COLOR

CLEAR

public static final HTML.Attribute CLEAR

BACKGROUND

public static final HTML.Attribute BACKGROUND

BGCOLOR

public static final HTML.Attribute BGCOLOR

TEXT

public static final HTML.Attribute TEXT

LINK

public static final HTML.Attribute LINK

VLINK

public static final HTML.Attribute VLINK

ALINK

public static final HTML.Attribute ALINK

WIDTH

public static final HTML.Attribute WIDTH

HEIGHT

public static final HTML.Attribute HEIGHT

ALIGN

public static final HTML.Attribute ALIGN

NAME

public static final HTML.Attribute NAME

HREF

public static final HTML.Attribute HREF

REL

public static final HTML.Attribute REL

REV

public static final HTML.Attribute REV

TITLE

public static final HTML.Attribute TITLE

TARGET

public static final HTML.Attribute TARGET

SHAPE

public static final HTML.Attribute SHAPE

COORDS

public static final HTML.Attribute COORDS

ISMAP

public static final HTML.Attribute ISMAP

NOHREF

public static final HTML.Attribute NOHREF

ALT

public static final HTML.Attribute ALT

ID

public static final HTML.Attribute ID

SRC

public static final HTML.Attribute SRC

HSPACE

public static final HTML.Attribute HSPACE

VSPACE

public static final HTML.Attribute VSPACE

USEMAP

public static final HTML.Attribute USEMAP

LOWSRC

public static final HTML.Attribute LOWSRC

CODEBASE

public static final HTML.Attribute CODEBASE

CODE

public static final HTML.Attribute CODE

ARCHIVE

public static final HTML.Attribute ARCHIVE

VALUE

public static final HTML.Attribute VALUE

VALUETYPE

public static final HTML.Attribute VALUETYPE

TYPE

public static final HTML.Attribute TYPE

CLASS

public static final HTML.Attribute CLASS

STYLE

public static final HTML.Attribute STYLE

LANG

public static final HTML.Attribute LANG

FACE

public static final HTML.Attribute FACE

DIR

public static final HTML.Attribute DIR

DECLARE

public static final HTML.Attribute DECLARE

CLASSID

public static final HTML.Attribute CLASSID

DATA

public static final HTML.Attribute DATA

CODETYPE

public static final HTML.Attribute CODETYPE

STANDBY

public static final HTML.Attribute STANDBY

BORDER

public static final HTML.Attribute BORDER

SHAPES

public static final HTML.Attribute SHAPES

NOSHADE

public static final HTML.Attribute NOSHADE

COMPACT

public static final HTML.Attribute COMPACT

START

public static final HTML.Attribute START

ACTION

public static final HTML.Attribute ACTION

METHOD

public static final HTML.Attribute METHOD

ENCTYPE

public static final HTML.Attribute ENCTYPE

CHECKED

public static final HTML.Attribute CHECKED

MAXLENGTH

public static final HTML.Attribute MAXLENGTH

MULTIPLE

public static final HTML.Attribute MULTIPLE

SELECTED

public static final HTML.Attribute SELECTED

ROWS

public static final HTML.Attribute ROWS

COLS

public static final HTML.Attribute COLS

DUMMY

public static final HTML.Attribute DUMMY

CELLSPACING

public static final HTML.Attribute CELLSPACING

CELLPADDING

public static final HTML.Attribute CELLPADDING

VALIGN

public static final HTML.Attribute VALIGN

HALIGN

public static final HTML.Attribute HALIGN

NOWRAP

public static final HTML.Attribute NOWRAP

ROWSPAN

public static final HTML.Attribute ROWSPAN

COLSPAN

public static final HTML.Attribute COLSPAN

PROMPT

public static final HTML.Attribute PROMPT

HTTPEQUIV

public static final HTML.Attribute HTTPEQUIV

CONTENT

public static final HTML.Attribute CONTENT

LANGUAGE

public static final HTML.Attribute LANGUAGE

VERSION

public static final HTML.Attribute VERSION

N

public static final HTML.Attribute N

FRAMEBORDER

public static final HTML.Attribute FRAMEBORDER

MARGINWIDTH

public static final HTML.Attribute MARGINWIDTH

MARGINHEIGHT

public static final HTML.Attribute MARGINHEIGHT

SCROLLING

public static final HTML.Attribute SCROLLING

NORESIZE

public static final HTML.Attribute NORESIZE

ENDTAG

public static final HTML.Attribute ENDTAG

COMMENT

public static final HTML.Attribute COMMENT
Method Detail

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Attribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class CSS.Attribute

java.lang.Object
  |
  +--javax.swing.text.html.CSS.Attribute
Enclosing class:
CSS
public static final class CSS.Attribute
extends Object

Definitions to be used as a key on AttributeSet's that might hold CSS attributes. Since this is a closed set (i.e. defined exactly by the specification), it is final and cannot be extended.

Field Summary
static CSS.Attribute | BACKGROUND
static CSS.Attribute | BACKGROUND_ATTACHMENT
static CSS.Attribute | BACKGROUND_COLOR
static CSS.Attribute | BACKGROUND_IMAGE
static CSS.Attribute | BACKGROUND_POSITION
static CSS.Attribute | BACKGROUND_REPEAT
static CSS.Attribute | BORDER
static CSS.Attribute | BORDER_BOTTOM
static CSS.Attribute | BORDER_BOTTOM_WIDTH
static CSS.Attribute | BORDER_COLOR
static CSS.Attribute | BORDER_LEFT
static CSS.Attribute | BORDER_LEFT_WIDTH
static CSS.Attribute | BORDER_RIGHT
static CSS.Attribute | BORDER_RIGHT_WIDTH
static CSS.Attribute | BORDER_STYLE
static CSS.Attribute | BORDER_TOP
static CSS.Attribute | BORDER_TOP_WIDTH
static CSS.Attribute | BORDER_WIDTH
static CSS.Attribute | CLEAR
static CSS.Attribute | COLOR
static CSS.Attribute | DISPLAY
static CSS.Attribute | FLOAT
static CSS.Attribute | FONT
static CSS.Attribute | FONT_FAMILY
static CSS.Attribute | FONT_SIZE
static CSS.Attribute | FONT_STYLE
static CSS.Attribute | FONT_VARIANT
static CSS.Attribute | FONT_WEIGHT
static CSS.Attribute | HEIGHT
static CSS.Attribute | LETTER_SPACING
static CSS.Attribute | LINE_HEIGHT
static CSS.Attribute | LIST_STYLE
static CSS.Attribute | LIST_STYLE_IMAGE
static CSS.Attribute | LIST_STYLE_POSITION
static CSS.Attribute | LIST_STYLE_TYPE
static CSS.Attribute | MARGIN
static CSS.Attribute | MARGIN_BOTTOM
static CSS.Attribute | MARGIN_LEFT
static CSS.Attribute | MARGIN_RIGHT
static CSS.Attribute | MARGIN_TOP
static CSS.Attribute | PADDING
static CSS.Attribute | PADDING_BOTTOM
static CSS.Attribute | PADDING_LEFT
static CSS.Attribute | PADDING_RIGHT
static CSS.Attribute | PADDING_TOP
static CSS.Attribute | TEXT_ALIGN
static CSS.Attribute | TEXT_DECORATION
static CSS.Attribute | TEXT_INDENT
static CSS.Attribute | TEXT_TRANSFORM
static CSS.Attribute | VERTICAL_ALIGN
static CSS.Attribute | WHITE_SPACE
static CSS.Attribute | WIDTH
static CSS.Attribute | WORD_SPACING
Method Summary
String | getDefaultValue() Fetch the default value for the attribute.
boolean | isInherited() Indicates if the attribute should be inherited from the parent or not.
String | toString() The string representation of the attribute.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

BACKGROUND

public static final CSS.Attribute BACKGROUND

BACKGROUND_ATTACHMENT

public static final CSS.Attribute BACKGROUND_ATTACHMENT

BACKGROUND_COLOR

public static final CSS.Attribute BACKGROUND_COLOR

BACKGROUND_IMAGE

public static final CSS.Attribute BACKGROUND_IMAGE

BACKGROUND_POSITION

public static final CSS.Attribute BACKGROUND_POSITION

BACKGROUND_REPEAT

public static final CSS.Attribute BACKGROUND_REPEAT

BORDER

public static final CSS.Attribute BORDER

BORDER_BOTTOM

public static final CSS.Attribute BORDER_BOTTOM

BORDER_BOTTOM_WIDTH

public static final CSS.Attribute BORDER_BOTTOM_WIDTH

BORDER_COLOR

public static final CSS.Attribute BORDER_COLOR

BORDER_LEFT

public static final CSS.Attribute BORDER_LEFT

BORDER_LEFT_WIDTH

public static final CSS.Attribute BORDER_LEFT_WIDTH

BORDER_RIGHT

public static final CSS.Attribute BORDER_RIGHT

BORDER_RIGHT_WIDTH

public static final CSS.Attribute BORDER_RIGHT_WIDTH

BORDER_STYLE

public static final CSS.Attribute BORDER_STYLE

BORDER_TOP

public static final CSS.Attribute BORDER_TOP

BORDER_TOP_WIDTH

public static final CSS.Attribute BORDER_TOP_WIDTH

BORDER_WIDTH

public static final CSS.Attribute BORDER_WIDTH

CLEAR

public static final CSS.Attribute CLEAR

COLOR

public static final CSS.Attribute COLOR

DISPLAY

public static final CSS.Attribute DISPLAY

FLOAT

public static final CSS.Attribute FLOAT

FONT

public static final CSS.Attribute FONT

FONT_FAMILY

public static final CSS.Attribute FONT_FAMILY

FONT_SIZE

public static final CSS.Attribute FONT_SIZE

FONT_STYLE

public static final CSS.Attribute FONT_STYLE

FONT_VARIANT

public static final CSS.Attribute FONT_VARIANT

FONT_WEIGHT

public static final CSS.Attribute FONT_WEIGHT

HEIGHT

public static final CSS.Attribute HEIGHT

LETTER_SPACING

public static final CSS.Attribute LETTER_SPACING

LINE_HEIGHT

public static final CSS.Attribute LINE_HEIGHT

LIST_STYLE

public static final CSS.Attribute LIST_STYLE

LIST_STYLE_IMAGE

public static final CSS.Attribute LIST_STYLE_IMAGE

LIST_STYLE_POSITION

public static final CSS.Attribute LIST_STYLE_POSITION

LIST_STYLE_TYPE

public static final CSS.Attribute LIST_STYLE_TYPE

MARGIN

public static final CSS.Attribute MARGIN

MARGIN_BOTTOM

public static final CSS.Attribute MARGIN_BOTTOM

MARGIN_LEFT

public static final CSS.Attribute MARGIN_LEFT

MARGIN_RIGHT

public static final CSS.Attribute MARGIN_RIGHT

MARGIN_TOP

public static final CSS.Attribute MARGIN_TOP

PADDING

public static final CSS.Attribute PADDING

PADDING_BOTTOM

public static final CSS.Attribute PADDING_BOTTOM

PADDING_LEFT

public static final CSS.Attribute PADDING_LEFT

PADDING_RIGHT

public static final CSS.Attribute PADDING_RIGHT

PADDING_TOP

public static final CSS.Attribute PADDING_TOP

TEXT_ALIGN

public static final CSS.Attribute TEXT_ALIGN

TEXT_DECORATION

public static final CSS.Attribute TEXT_DECORATION

TEXT_INDENT

public static final CSS.Attribute TEXT_INDENT

TEXT_TRANSFORM

public static final CSS.Attribute TEXT_TRANSFORM

VERTICAL_ALIGN

public static final CSS.Attribute VERTICAL_ALIGN

WORD_SPACING

public static final CSS.Attribute WORD_SPACING

WHITE_SPACE

public static final CSS.Attribute WHITE_SPACE

WIDTH

public static final CSS.Attribute WIDTH
Method Detail

toString

public String toString()
The string representation of the attribute. This should exactly match the string specified in the CSS specification.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

getDefaultValue

public String getDefaultValue()
Fetch the default value for the attribute. If there is no default value (such as for composite attributes), null will be returned.

isInherited

public boolean isInherited()
Indicates if the attribute should be inherited from the parent or not.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BlockAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.BlockAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
Direct Known Subclasses:
HTMLDocument.HTMLReader.ParagraphAction, HTMLDocument.HTMLReader.PreAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.BlockAction
extends HTMLDocument.HTMLReader.TagAction

Constructor Summary
HTMLDocument.HTMLReader.BlockAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet attr) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.BlockAction

public HTMLDocument.HTMLReader.BlockAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet attr)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.TagAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BlockElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.BlockElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.BranchElement
              |
              +--javax.swing.text.html.HTMLDocument.BlockElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Enclosing class:
HTMLDocument
public class HTMLDocument.BlockElement
extends AbstractDocument.BranchElement

An element that represents a structural block of HTML.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
HTMLDocument.BlockElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
Method Summary
String | getName() Gets the name of the element.
AttributeSet | getResolveParent() Gets the resolving parent.
Methods inherited from class javax.swing.text.AbstractDocument.BranchElement
children, getAllowsChildren, getElement, getElementCount, getElementIndex, getEndOffset, getStartOffset, isLeaf, positionToElement, replace, toString
Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

HTMLDocument.BlockElement

public HTMLDocument.BlockElement(Element parent,
                                 AttributeSet a)
Constructs a composite element that initially contains no children.
Parameters:
parent - the parent element
a - the attributes for the element
Method Detail

getName

public String getName()
Gets the name of the element.
Overrides:
getName in class AbstractDocument.BranchElement
Returns:
the name, null if none

getResolveParent

public AttributeSet getResolveParent()
Gets the resolving parent. HTML attributes are not inherited at the model level so we override this to return null.
Overrides:
getResolveParent in class AbstractDocument.AbstractElement
Returns:
null, there are none
See Also:
AttributeSet.getResolveParent()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BlockView

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class BlockView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.html.BlockView
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
ListView
public class BlockView
extends BoxView

A view implementation to display a block (as a box) with CSS specifications.

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
BlockView(Element elem, int axis)
Creates a new view that represents an html box.
Method Summary
protected SizeRequirements | calculateMajorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the major axis (i.e.
protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements of the block along the minor axis (i.e.
void | changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
float | getAlignment(int axis) Gets the alignment.
AttributeSet | getAttributes() Fetches the attributes to use when rendering.
int | getResizeWeight(int axis) Gets the resize weight.
protected StyleSheet | getStyleSheet()
protected void | layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the minor axis of the box (i.e.
void | paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
void | setParent(View parent) Establishes the parent view for this view.
protected void | setPropertiesFromAttributes() Update any cached values that come from attributes.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BlockView

public BlockView(Element elem,
                 int axis)
Creates a new view that represents an html box. This can be used for a number of elements.
Parameters:
elem - the element to create a view for
axis - either View.X_AXIS or View.Y_AXIS
Method Detail

setParent

public void setParent(View parent)
Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly.

This is implemented to forward to the superclass as well as call the setPropertiesFromAttributes method to set the paragraph properties from the css attributes. The call is made at this time to ensure the ability to resolve upward through the parents view attributes.

Overrides:
setParent in class CompositeView
Parameters:
parent - the new parent, or null if the view is being removed from a parent it was previously added to

calculateMajorAxisRequirements

protected SizeRequirements calculateMajorAxisRequirements(int axis,
                                                          SizeRequirements r)
Calculate the requirements of the block along the major axis (i.e. the axis along with it tiles). This is implemented to provide the superclass behavior and then adjust it if the CSS width or height attribute is specified and applicable to the axis.
Overrides:
calculateMajorAxisRequirements in class BoxView

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)
Calculate the requirements of the block along the minor axis (i.e. the axis orthoginal to the axis along with it tiles). This is implemented to provide the superclass behavior and then adjust it if the CSS width or height attribute is specified and applicable to the axis.
Overrides:
calculateMinorAxisRequirements in class BoxView

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis.
Overrides:
layoutMinorAxis in class BoxView
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

paint

public void paint(Graphics g,
                  Shape allocation)
Renders using the given rendering surface and area on that surface. This is implemented to delegate to the css box painter to paint the border and background prior to the interior.
Overrides:
paint in class BoxView
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getAttributes

public AttributeSet getAttributes()
Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet.
Overrides:
getAttributes in class View

getResizeWeight

public int getResizeWeight(int axis)
Gets the resize weight.
Overrides:
getResizeWeight in class BoxView
Parameters:
axis - may be either X_AXIS or Y_AXIS
Returns:
the weight
Throws:
IllegalArgumentException - for an invalid axis

getAlignment

public float getAlignment(int axis)
Gets the alignment.
Overrides:
getAlignment in class BoxView
Parameters:
axis - may be either X_AXIS or Y_AXIS
Returns:
the alignment

changedUpdate

public void changedUpdate(DocumentEvent changes,
                          Shape a,
                          ViewFactory f)
Description copied from class: View
Gives notification from the document that attributes were changed in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
  1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
  2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
  3. updateLayout is called to give the view a chance to either repair it's layout, to reschedule layout, or do nothing.
Overrides:
changedUpdate in class View
Following copied from class: javax.swing.text.View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Update any cached values that come from attributes.

getStyleSheet

protected StyleSheet getStyleSheet()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BoxPainter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class StyleSheet.BoxPainter

java.lang.Object
  |
  +--javax.swing.text.html.StyleSheet.BoxPainter
All Implemented Interfaces:
Serializable
Enclosing class:
StyleSheet
public static class StyleSheet.BoxPainter
extends Object
implements Serializable

Class to carry out some of the duties of CSS formatting. Implementations of this class enable views to present the CSS formatting while not knowing anything about how the CSS values are being cached.

As a delegate of Views, this object is responsible for the insets of a View and making sure the background is maintained according to the CSS attributes.

See Also:
Serialized Form

Method Summary
float | getInset(int side, View v) Fetches the inset needed on a given side to account for the margin, border, and padding.
void | paint(Graphics g, float x, float y, float w, float h, View v) Paints the CSS box according to the attributes given.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getInset

public float getInset(int side,
                      View v)
Fetches the inset needed on a given side to account for the margin, border, and padding.
Parameters:
side - The size of the box to fetch the inset for. This can be View.TOP, View.LEFT, View.BOTTOM, or View.RIGHT.
v - the view making the request. This is used to get the AttributeSet, and may be used to resolve percentage arguments.
Throws:
IllegalArgumentException - for an invalid direction

paint

public void paint(Graphics g,
                  float x,
                  float y,
                  float w,
                  float h,
                  View v)
Paints the CSS box according to the attributes given. This should paint the border, padding, and background.
Parameters:
g - the rendering surface.
x - the x coordinate of the allocated area to render into.
y - the y coordinate of the allocated area to render into.
w - the width of the allocated area to render into.
h - the height of the allocated area to render into.
v - the view making the request. This is used to get the AttributeSet, and may be used to resolve percentage arguments.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharacterAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.CharacterAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.CharacterAction
extends HTMLDocument.HTMLReader.TagAction

Constructor Summary
HTMLDocument.HTMLReader.CharacterAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet attr) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.CharacterAction

public HTMLDocument.HTMLReader.CharacterAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet attr)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.TagAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.text.html.CSS

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.CSS

No usage of javax.swing.text.html.CSS

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.FormView.MouseEventListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.FormView.MouseEventListener

No usage of javax.swing.text.html.FormView.MouseEventListener

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTML

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTML

No usage of javax.swing.text.html.HTML

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTML.UnknownTag

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTML.UnknownTag

No usage of javax.swing.text.html.HTML.UnknownTag

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.BlockElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.BlockElement

No usage of javax.swing.text.html.HTMLDocument.BlockElement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.FormAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.FormAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.FormAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.PreAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.PreAction

No usage of javax.swing.text.html.HTMLDocument.HTMLReader.PreAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.RunElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.RunElement

No usage of javax.swing.text.html.HTMLDocument.RunElement

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.HTMLFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.HTMLFactory

No usage of javax.swing.text.html.HTMLEditorKit.HTMLFactory

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction

No usage of javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.LinkController

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.LinkController

No usage of javax.swing.text.html.HTMLEditorKit.LinkController

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLWriter

No usage of javax.swing.text.html.HTMLWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.InlineView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.InlineView

No usage of javax.swing.text.html.InlineView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.ListView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.ListView

No usage of javax.swing.text.html.ListView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.MinimalHTMLWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.MinimalHTMLWriter

No usage of javax.swing.text.html.MinimalHTMLWriter

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.ObjectView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.ObjectView

No usage of javax.swing.text.html.ObjectView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.ParagraphView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.ParagraphView

No usage of javax.swing.text.html.ParagraphView

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.BlockView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.BlockView

Packages that use BlockView
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of BlockView in javax.swing.text.html

Subclasses of BlockView in javax.swing.text.html
 class ListView
A view implementation to display an html list

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.CSS.Attribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.CSS.Attribute

Packages that use CSS.Attribute
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of CSS.Attribute in javax.swing.text.html

Fields in javax.swing.text.html declared as CSS.Attribute
static CSS.Attribute | CSS.Attribute.BACKGROUND
static CSS.Attribute | CSS.Attribute.BACKGROUND_ATTACHMENT
static CSS.Attribute | CSS.Attribute.BACKGROUND_COLOR
static CSS.Attribute | CSS.Attribute.BACKGROUND_IMAGE
static CSS.Attribute | CSS.Attribute.BACKGROUND_POSITION
static CSS.Attribute | CSS.Attribute.BACKGROUND_REPEAT
static CSS.Attribute | CSS.Attribute.BORDER
static CSS.Attribute | CSS.Attribute.BORDER_BOTTOM
static CSS.Attribute | CSS.Attribute.BORDER_BOTTOM_WIDTH
static CSS.Attribute | CSS.Attribute.BORDER_COLOR
static CSS.Attribute | CSS.Attribute.BORDER_LEFT
static CSS.Attribute | CSS.Attribute.BORDER_LEFT_WIDTH
static CSS.Attribute | CSS.Attribute.BORDER_RIGHT
static CSS.Attribute | CSS.Attribute.BORDER_RIGHT_WIDTH
static CSS.Attribute | CSS.Attribute.BORDER_STYLE
static CSS.Attribute | CSS.Attribute.BORDER_TOP
static CSS.Attribute | CSS.Attribute.BORDER_TOP_WIDTH
static CSS.Attribute | CSS.Attribute.BORDER_WIDTH
static CSS.Attribute | CSS.Attribute.CLEAR
static CSS.Attribute | CSS.Attribute.COLOR
static CSS.Attribute | CSS.Attribute.DISPLAY
static CSS.Attribute | CSS.Attribute.FLOAT
static CSS.Attribute | CSS.Attribute.FONT
static CSS.Attribute | CSS.Attribute.FONT_FAMILY
static CSS.Attribute | CSS.Attribute.FONT_SIZE
static CSS.Attribute | CSS.Attribute.FONT_STYLE
static CSS.Attribute | CSS.Attribute.FONT_VARIANT
static CSS.Attribute | CSS.Attribute.FONT_WEIGHT
static CSS.Attribute | CSS.Attribute.HEIGHT
static CSS.Attribute | CSS.Attribute.LETTER_SPACING
static CSS.Attribute | CSS.Attribute.LINE_HEIGHT
static CSS.Attribute | CSS.Attribute.LIST_STYLE
static CSS.Attribute | CSS.Attribute.LIST_STYLE_IMAGE
static CSS.Attribute | CSS.Attribute.LIST_STYLE_POSITION
static CSS.Attribute | CSS.Attribute.LIST_STYLE_TYPE
static CSS.Attribute | CSS.Attribute.MARGIN
static CSS.Attribute | CSS.Attribute.MARGIN_BOTTOM
static CSS.Attribute | CSS.Attribute.MARGIN_LEFT
static CSS.Attribute | CSS.Attribute.MARGIN_RIGHT
static CSS.Attribute | CSS.Attribute.MARGIN_TOP
static CSS.Attribute | CSS.Attribute.PADDING
static CSS.Attribute | CSS.Attribute.PADDING_BOTTOM
static CSS.Attribute | CSS.Attribute.PADDING_LEFT
static CSS.Attribute | CSS.Attribute.PADDING_RIGHT
static CSS.Attribute | CSS.Attribute.PADDING_TOP
static CSS.Attribute | CSS.Attribute.TEXT_ALIGN
static CSS.Attribute | CSS.Attribute.TEXT_DECORATION
static CSS.Attribute | CSS.Attribute.TEXT_INDENT
static CSS.Attribute | CSS.Attribute.TEXT_TRANSFORM
static CSS.Attribute | CSS.Attribute.VERTICAL_ALIGN
static CSS.Attribute | CSS.Attribute.WORD_SPACING
static CSS.Attribute | CSS.Attribute.WHITE_SPACE
static CSS.Attribute | CSS.Attribute.WIDTH

Methods in javax.swing.text.html that return CSS.Attribute
static CSS.Attribute[] | CSS.getAllAttributeKeys() Return the set of all possible CSS attribute keys.
static CSS.Attribute | CSS.getAttribute(String name) Translate a string to a CSS.Attribute object.

Methods in javax.swing.text.html with parameters of type CSS.Attribute
void | StyleSheet.addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
boolean | StyleSheet.addCSSAttributeFromHTML(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.FormView

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.FormView

Packages that use FormView
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of FormView in javax.swing.text.html

Constructors in javax.swing.text.html with parameters of type FormView
FormView.MouseEventListener()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTML.Attribute

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTML.Attribute

Packages that use HTML.Attribute
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTML.Attribute in javax.swing.text.html

Fields in javax.swing.text.html declared as HTML.Attribute
static HTML.Attribute | HTML.Attribute.SIZE
static HTML.Attribute | HTML.Attribute.COLOR
static HTML.Attribute | HTML.Attribute.CLEAR
static HTML.Attribute | HTML.Attribute.BACKGROUND
static HTML.Attribute | HTML.Attribute.BGCOLOR
static HTML.Attribute | HTML.Attribute.TEXT
static HTML.Attribute | HTML.Attribute.LINK
static HTML.Attribute | HTML.Attribute.VLINK
static HTML.Attribute | HTML.Attribute.ALINK
static HTML.Attribute | HTML.Attribute.WIDTH
static HTML.Attribute | HTML.Attribute.HEIGHT
static HTML.Attribute | HTML.Attribute.ALIGN
static HTML.Attribute | HTML.Attribute.NAME
static HTML.Attribute | HTML.Attribute.HREF
static HTML.Attribute | HTML.Attribute.REL
static HTML.Attribute | HTML.Attribute.REV
static HTML.Attribute | HTML.Attribute.TITLE
static HTML.Attribute | HTML.Attribute.TARGET
static HTML.Attribute | HTML.Attribute.SHAPE
static HTML.Attribute | HTML.Attribute.COORDS
static HTML.Attribute | HTML.Attribute.ISMAP
static HTML.Attribute | HTML.Attribute.NOHREF
static HTML.Attribute | HTML.Attribute.ALT
static HTML.Attribute | HTML.Attribute.ID
static HTML.Attribute | HTML.Attribute.SRC
static HTML.Attribute | HTML.Attribute.HSPACE
static HTML.Attribute | HTML.Attribute.VSPACE
static HTML.Attribute | HTML.Attribute.USEMAP
static HTML.Attribute | HTML.Attribute.LOWSRC
static HTML.Attribute | HTML.Attribute.CODEBASE
static HTML.Attribute | HTML.Attribute.CODE
static HTML.Attribute | HTML.Attribute.ARCHIVE
static HTML.Attribute | HTML.Attribute.VALUE
static HTML.Attribute | HTML.Attribute.VALUETYPE
static HTML.Attribute | HTML.Attribute.TYPE
static HTML.Attribute | HTML.Attribute.CLASS
static HTML.Attribute | HTML.Attribute.STYLE
static HTML.Attribute | HTML.Attribute.LANG
static HTML.Attribute | HTML.Attribute.FACE
static HTML.Attribute | HTML.Attribute.DIR
static HTML.Attribute | HTML.Attribute.DECLARE
static HTML.Attribute | HTML.Attribute.CLASSID
static HTML.Attribute | HTML.Attribute.DATA
static HTML.Attribute | HTML.Attribute.CODETYPE
static HTML.Attribute | HTML.Attribute.STANDBY
static HTML.Attribute | HTML.Attribute.BORDER
static HTML.Attribute | HTML.Attribute.SHAPES
static HTML.Attribute | HTML.Attribute.NOSHADE
static HTML.Attribute | HTML.Attribute.COMPACT
static HTML.Attribute | HTML.Attribute.START
static HTML.Attribute | HTML.Attribute.ACTION
static HTML.Attribute | HTML.Attribute.METHOD
static HTML.Attribute | HTML.Attribute.ENCTYPE
static HTML.Attribute | HTML.Attribute.CHECKED
static HTML.Attribute | HTML.Attribute.MAXLENGTH
static HTML.Attribute | HTML.Attribute.MULTIPLE
static HTML.Attribute | HTML.Attribute.SELECTED
static HTML.Attribute | HTML.Attribute.ROWS
static HTML.Attribute | HTML.Attribute.COLS
static HTML.Attribute | HTML.Attribute.DUMMY
static HTML.Attribute | HTML.Attribute.CELLSPACING
static HTML.Attribute | HTML.Attribute.CELLPADDING
static HTML.Attribute | HTML.Attribute.VALIGN
static HTML.Attribute | HTML.Attribute.HALIGN
static HTML.Attribute | HTML.Attribute.NOWRAP
static HTML.Attribute | HTML.Attribute.ROWSPAN
static HTML.Attribute | HTML.Attribute.COLSPAN
static HTML.Attribute | HTML.Attribute.PROMPT
static HTML.Attribute | HTML.Attribute.HTTPEQUIV
static HTML.Attribute | HTML.Attribute.CONTENT
static HTML.Attribute | HTML.Attribute.LANGUAGE
static HTML.Attribute | HTML.Attribute.VERSION
static HTML.Attribute | HTML.Attribute.N
static HTML.Attribute | HTML.Attribute.FRAMEBORDER
static HTML.Attribute | HTML.Attribute.MARGINWIDTH
static HTML.Attribute | HTML.Attribute.MARGINHEIGHT
static HTML.Attribute | HTML.Attribute.SCROLLING
static HTML.Attribute | HTML.Attribute.NORESIZE
static HTML.Attribute | HTML.Attribute.ENDTAG
static HTML.Attribute | HTML.Attribute.COMMENT

Methods in javax.swing.text.html that return HTML.Attribute
static HTML.Attribute[] | HTML.getAllAttributeKeys() This is the set of html attributes recognized.
static HTML.Attribute | HTML.getAttributeKey(String attName) Fetch an attribute constant for a well-known attribute name (i.e.

Methods in javax.swing.text.html with parameters of type HTML.Attribute
static int HTML.getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
Fetch an integer attribute value.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTML.Tag

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTML.Tag

Packages that use HTML.Tag
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Uses of HTML.Tag in javax.swing.text.html

Subclasses of HTML.Tag in javax.swing.text.html
static class HTML.UnknownTag

Fields in javax.swing.text.html declared as HTML.Tag
static HTML.Tag | HTML.Tag.A
static HTML.Tag | HTML.Tag.ADDRESS
static HTML.Tag | HTML.Tag.APPLET
static HTML.Tag | HTML.Tag.AREA
static HTML.Tag | HTML.Tag.B
static HTML.Tag | HTML.Tag.BASE
static HTML.Tag | HTML.Tag.BASEFONT
static HTML.Tag | HTML.Tag.BIG
static HTML.Tag | HTML.Tag.BLOCKQUOTE
static HTML.Tag | HTML.Tag.BODY
static HTML.Tag | HTML.Tag.BR
static HTML.Tag | HTML.Tag.CAPTION
static HTML.Tag | HTML.Tag.CENTER
static HTML.Tag | HTML.Tag.CITE
static HTML.Tag | HTML.Tag.CODE
static HTML.Tag | HTML.Tag.DD
static HTML.Tag | HTML.Tag.DFN
static HTML.Tag | HTML.Tag.DIR
static HTML.Tag | HTML.Tag.DIV
static HTML.Tag | HTML.Tag.DL
static HTML.Tag | HTML.Tag.DT
static HTML.Tag | HTML.Tag.EM
static HTML.Tag | HTML.Tag.FONT
static HTML.Tag | HTML.Tag.FORM
static HTML.Tag | HTML.Tag.FRAME
static HTML.Tag | HTML.Tag.FRAMESET
static HTML.Tag | HTML.Tag.H1
static HTML.Tag | HTML.Tag.H2
static HTML.Tag | HTML.Tag.H3
static HTML.Tag | HTML.Tag.H4
static HTML.Tag | HTML.Tag.H5
static HTML.Tag | HTML.Tag.H6
static HTML.Tag | HTML.Tag.HEAD
static HTML.Tag | HTML.Tag.HR
static HTML.Tag | HTML.Tag.HTML
static HTML.Tag | HTML.Tag.I
static HTML.Tag | HTML.Tag.IMG
static HTML.Tag | HTML.Tag.INPUT
static HTML.Tag | HTML.Tag.ISINDEX
static HTML.Tag | HTML.Tag.KBD
static HTML.Tag | HTML.Tag.LI
static HTML.Tag | HTML.Tag.LINK
static HTML.Tag | HTML.Tag.MAP
static HTML.Tag | HTML.Tag.MENU
static HTML.Tag | HTML.Tag.META
static HTML.Tag | HTML.Tag.NOFRAMES
static HTML.Tag | HTML.Tag.OBJECT
static HTML.Tag | HTML.Tag.OL
static HTML.Tag | HTML.Tag.OPTION
static HTML.Tag | HTML.Tag.P
static HTML.Tag | HTML.Tag.PARAM
static HTML.Tag | HTML.Tag.PRE
static HTML.Tag | HTML.Tag.SAMP
static HTML.Tag | HTML.Tag.SCRIPT
static HTML.Tag | HTML.Tag.SELECT
static HTML.Tag | HTML.Tag.SMALL
static HTML.Tag | HTML.Tag.SPAN
static HTML.Tag | HTML.Tag.STRIKE
static HTML.Tag | HTML.Tag.S
static HTML.Tag | HTML.Tag.STRONG
static HTML.Tag | HTML.Tag.STYLE
static HTML.Tag | HTML.Tag.SUB
static HTML.Tag | HTML.Tag.SUP
static HTML.Tag | HTML.Tag.TABLE
static HTML.Tag | HTML.Tag.TD
static HTML.Tag | HTML.Tag.TEXTAREA
static HTML.Tag | HTML.Tag.TH
static HTML.Tag | HTML.Tag.TITLE
static HTML.Tag | HTML.Tag.TR
static HTML.Tag | HTML.Tag.TT
static HTML.Tag | HTML.Tag.U
static HTML.Tag | HTML.Tag.UL
static HTML.Tag | HTML.Tag.VAR
static HTML.Tag | HTML.Tag.IMPLIED All text content must be in a paragraph element.
static HTML.Tag | HTML.Tag.CONTENT All text content is labeled with this tag.
static HTML.Tag | HTML.Tag.COMMENT All comments are labeled with this tag.
protected HTML.Tag | HTMLEditorKit.InsertHTMLTextAction.parentTag Tag to check for in the document.
protected HTML.Tag | HTMLEditorKit.InsertHTMLTextAction.addTag Tag in HTML to start adding tags from.
protected HTML.Tag | HTMLEditorKit.InsertHTMLTextAction.alternateParentTag Alternate Tag to check for in the document if parentTag is not found.
protected HTML.Tag | HTMLEditorKit.InsertHTMLTextAction.alternateAddTag Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.

Methods in javax.swing.text.html that return HTML.Tag
static HTML.Tag[] | HTML.getAllTags() This is the set of actual html tags that are known about the the default html reader.
static HTML.Tag | HTML.getTag(String tagName) Fetch a tag constant for a well-known tag name (i.e.
abstract HTML.Tag | HTMLDocument.Iterator.getTag() Type of tag this iterator represents.

Methods in javax.swing.text.html with parameters of type HTML.Tag
Style | StyleSheet.getRule(HTML.Tag t, Element e) Fetches the style to use to render the given type of HTML tag.
HTMLEditorKit.ParserCallback | HTMLDocument.getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag) Fetches the reader for the parser to use to load the document with HTML.
HTMLDocument.Iterator | HTMLDocument.getIterator(HTML.Tag t) Fetches an iterator for the following kind of HTML tag.
void | HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.
void | HTMLEditorKit.ParserCallback.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | HTMLEditorKit.ParserCallback.handleEndTag(HTML.Tag t, int pos)
void | HTMLEditorKit.ParserCallback.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | HTMLDocument.HTMLReader.handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
void | HTMLDocument.HTMLReader.handleEndTag(HTML.Tag t, int pos) Callback from the parser.
void | HTMLDocument.HTMLReader.handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
protected void | HTMLDocument.HTMLReader.registerTag(HTML.Tag t, HTMLDocument.HTMLReader.TagAction a) Registers a handler for the given tag.
protected void | HTMLDocument.HTMLReader.blockOpen(HTML.Tag t, MutableAttributeSet attr) Adds an instruction to the parse buffer to create a block element with the given attributes.
protected void | HTMLDocument.HTMLReader.blockClose(HTML.Tag t) Adds an instruction to the parse buffer to close out a block element of the given type.
protected void | HTMLDocument.HTMLReader.addSpecialElement(HTML.Tag t, MutableAttributeSet a) Adds content that is basically specified entirely in the attribute set.
void | HTMLDocument.HTMLReader.TagAction.start(HTML.Tag t, MutableAttributeSet a) Called when a start tag is seen for the type of tag this action was registered to.
void | HTMLDocument.HTMLReader.TagAction.end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | HTMLDocument.HTMLReader.BlockAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.BlockAction.end(HTML.Tag t)
void | HTMLDocument.HTMLReader.ParagraphAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.ParagraphAction.end(HTML.Tag t)
void | HTMLDocument.HTMLReader.SpecialAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.IsindexAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.HiddenAction.start(HTML.Tag t, MutableAttributeSet a)
void | HTMLDocument.HTMLReader.HiddenAction.end(HTML.Tag t)
void | HTMLDocument.HTMLReader.PreAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.PreAction.end(HTML.Tag t)
void | HTMLDocument.HTMLReader.CharacterAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.CharacterAction.end(HTML.Tag t)
void | HTMLDocument.HTMLReader.FormAction.start(HTML.Tag t, MutableAttributeSet attr)
void | HTMLDocument.HTMLReader.FormAction.end(HTML.Tag t)
protected boolean | HTMLWriter.matchNameAttribute(AttributeSet attr, HTML.Tag tag) Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.
protected int | HTMLEditorKit.HTMLTextAction.elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
protected Element | HTMLEditorKit.HTMLTextAction.findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns the deepest element at offset matching tag.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) A cover for HTMLEditorKit.insertHTML.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary

Constructors in javax.swing.text.html with parameters of type HTML.Tag
HTMLDocument.HTMLReader(int offset, int popDepth, int pushDepth, HTML.Tag insertTag)
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag)
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag, HTML.Tag alternateParentTag, HTML.Tag alternateAddTag)

Uses of HTML.Tag in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that return HTML.Tag
 HTML.Tag TagElement.getHTMLTag()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument

Packages that use HTMLDocument
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument in javax.swing.text.html

Methods in javax.swing.text.html that return HTMLDocument
protected  HTMLDocument HTMLEditorKit.HTMLTextAction.getHTMLDocument(JEditorPane e)

Methods in javax.swing.text.html with parameters of type HTMLDocument
void | HTMLEditorKit.insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.
protected Element[] | HTMLEditorKit.HTMLTextAction.getElementsAt(HTMLDocument doc, int offset) Returns an array of the Elements that contain offset.
protected int | HTMLEditorKit.HTMLTextAction.elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
protected Element | HTMLEditorKit.HTMLTextAction.findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns the deepest element at offset matching tag.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) A cover for HTMLEditorKit.insertHTML.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary

Constructors in javax.swing.text.html with parameters of type HTMLDocument
HTMLDocument.HTMLReader(int offset)
HTMLDocument.HTMLReader(int offset, int popDepth, int pushDepth, HTML.Tag insertTag)
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
HTMLDocument.BlockElement(Element parent, AttributeSet a)
Constructs a composite element that initially contains no children.
HTMLWriter(Writer w, HTMLDocument doc)
Creates a new HTMLWriter.
HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)
Creates a new HTMLWriter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader

Packages that use HTMLDocument.HTMLReader
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument.HTMLReader in javax.swing.text.html

Constructors in javax.swing.text.html with parameters of type HTMLDocument.HTMLReader
HTMLDocument.HTMLReader.TagAction()
HTMLDocument.HTMLReader.BlockAction()
HTMLDocument.HTMLReader.ParagraphAction()
HTMLDocument.HTMLReader.SpecialAction()
HTMLDocument.HTMLReader.IsindexAction()
HTMLDocument.HTMLReader.HiddenAction()
HTMLDocument.HTMLReader.PreAction()
HTMLDocument.HTMLReader.CharacterAction()
HTMLDocument.HTMLReader.FormAction()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction

Packages that use HTMLDocument.HTMLReader.BlockAction
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument.HTMLReader.BlockAction in javax.swing.text.html

Subclasses of HTMLDocument.HTMLReader.BlockAction in javax.swing.text.html
class | HTMLDocument.HTMLReader.ParagraphAction
class | HTMLDocument.HTMLReader.PreAction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction

Packages that use HTMLDocument.HTMLReader.SpecialAction
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument.HTMLReader.SpecialAction in javax.swing.text.html

Subclasses of HTMLDocument.HTMLReader.SpecialAction in javax.swing.text.html
 class HTMLDocument.HTMLReader.FormAction
Action to support forms by building all of the elements used to represent form controls.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.HTMLReader.TagAction

Packages that use HTMLDocument.HTMLReader.TagAction
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument.HTMLReader.TagAction in javax.swing.text.html

Subclasses of HTMLDocument.HTMLReader.TagAction in javax.swing.text.html
class | HTMLDocument.HTMLReader.BlockAction
class | HTMLDocument.HTMLReader.CharacterAction
class | HTMLDocument.HTMLReader.FormAction Action to support forms by building all of the elements used to represent form controls.
class | HTMLDocument.HTMLReader.HiddenAction
class | HTMLDocument.HTMLReader.IsindexAction
class | HTMLDocument.HTMLReader.ParagraphAction
class | HTMLDocument.HTMLReader.PreAction
class | HTMLDocument.HTMLReader.SpecialAction

Methods in javax.swing.text.html with parameters of type HTMLDocument.HTMLReader.TagAction
protected  void HTMLDocument.HTMLReader.registerTag(HTML.Tag t, HTMLDocument.HTMLReader.TagAction a)
Registers a handler for the given tag.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLDocument.Iterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLDocument.Iterator

Packages that use HTMLDocument.Iterator
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLDocument.Iterator in javax.swing.text.html

Methods in javax.swing.text.html that return HTMLDocument.Iterator
 HTMLDocument.Iterator HTMLDocument.getIterator(HTML.Tag t)
Fetches an iterator for the following kind of HTML tag.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit

Packages that use HTMLEditorKit
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLEditorKit in javax.swing.text.html

Methods in javax.swing.text.html that return HTMLEditorKit
protected  HTMLEditorKit HTMLEditorKit.HTMLTextAction.getHTMLEditorKit(JEditorPane e)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.HTMLTextAction

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.HTMLTextAction

Packages that use HTMLEditorKit.HTMLTextAction
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLEditorKit.HTMLTextAction in javax.swing.text.html

Subclasses of HTMLEditorKit.HTMLTextAction in javax.swing.text.html
static class HTMLEditorKit.InsertHTMLTextAction
InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.Parser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.Parser

Packages that use HTMLEditorKit.Parser
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Uses of HTMLEditorKit.Parser in javax.swing.text.html

Methods in javax.swing.text.html that return HTMLEditorKit.Parser
HTMLEditorKit.Parser | HTMLDocument.getParser() Returns the parser that is used when inserting HTML into the existing document.
protected HTMLEditorKit.Parser | HTMLEditorKit.getParser() Fetch the parser to use for reading HTML streams.

Methods in javax.swing.text.html with parameters of type HTMLEditorKit.Parser
 void HTMLDocument.setParser(HTMLEditorKit.Parser parser)
Sets the parser that is used by the methods that insert html into the existing document, eg setInnerHTML, setOuterHTML...

Uses of HTMLEditorKit.Parser in javax.swing.text.html.parser

Subclasses of HTMLEditorKit.Parser in javax.swing.text.html.parser
 class ParserDelegator
Responsible for starting up a new DocumentParser each time its parse method is invoked.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLEditorKit.ParserCallback

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLEditorKit.ParserCallback

Packages that use HTMLEditorKit.ParserCallback
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser | Provides the default HTML parser, along with support classes.

Uses of HTMLEditorKit.ParserCallback in javax.swing.text.html

Subclasses of HTMLEditorKit.ParserCallback in javax.swing.text.html
 class HTMLDocument.HTMLReader
An HTML reader to load an HTML document with an HTML element structure.

Methods in javax.swing.text.html that return HTMLEditorKit.ParserCallback
HTMLEditorKit.ParserCallback | HTMLDocument.getReader(int pos) Fetches the reader for the parser to use to load the document with HTML.
HTMLEditorKit.ParserCallback | HTMLDocument.getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag) Fetches the reader for the parser to use to load the document with HTML.

Methods in javax.swing.text.html with parameters of type HTMLEditorKit.ParserCallback
abstract  void HTMLEditorKit.Parser.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
Parse the given stream and drive the given callback with the results of the parse.

Uses of HTMLEditorKit.ParserCallback in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser with parameters of type HTMLEditorKit.ParserCallback
void | ParserDelegator.parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
void | DocumentParser.parse(Reader in, HTMLEditorKit.ParserCallback callback, boolean ignoreCharSet)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.HTMLFrameHyperlinkEvent

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.HTMLFrameHyperlinkEvent

Packages that use HTMLFrameHyperlinkEvent
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of HTMLFrameHyperlinkEvent in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type HTMLFrameHyperlinkEvent
 void HTMLDocument.processHTMLFrameHyperlinkEvent(HTMLFrameHyperlinkEvent e)
Processes HyperlinkEvents that are generated by documents in an HTML frame.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.Option

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.Option

Packages that use Option
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of Option in javax.swing.text.html

Methods in javax.swing.text.html with parameters of type Option
protected  void HTMLWriter.writeOption(Option option)
Writes out the content of the Option form element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.StyleSheet

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.StyleSheet

Packages that use StyleSheet
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyleSheet in javax.swing.text.html

Methods in javax.swing.text.html that return StyleSheet
StyleSheet[] | StyleSheet.getStyleSheets() Returns an array of the linked StyleSheets.
protected StyleSheet | ParagraphView.getStyleSheet()
protected StyleSheet | BlockView.getStyleSheet()
protected StyleSheet | InlineView.getStyleSheet()
StyleSheet | HTMLDocument.getStyleSheet() Fetches the StyleSheet with the document-specific display rules (CSS) that were specified in the HTML document itself.
StyleSheet | HTMLEditorKit.getStyleSheet() Get the set of styles currently being used to render the HTML elements.

Methods in javax.swing.text.html with parameters of type StyleSheet
void | StyleSheet.addStyleSheet(StyleSheet ss) Adds the rules from the StyleSheet ss to those of the receiver.
void | StyleSheet.removeStyleSheet(StyleSheet ss) Removes the StyleSheet ss from those of the receiver.
void | HTMLEditorKit.setStyleSheet(StyleSheet s) Set the set of styles to be used to render the various HTML elements.

Constructors in javax.swing.text.html with parameters of type StyleSheet
HTMLDocument(StyleSheet styles)
Constructs an HTML document with the default content storage implementation and the given style/attribute storage mechanism.
HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
Constructs an HTML document with the given content storage implementation and the given style/attribute storage mechanism.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.StyleSheet.BoxPainter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.StyleSheet.BoxPainter

Packages that use StyleSheet.BoxPainter
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyleSheet.BoxPainter in javax.swing.text.html

Methods in javax.swing.text.html that return StyleSheet.BoxPainter
 StyleSheet.BoxPainter StyleSheet.getBoxPainter(AttributeSet a)
Fetches the box formatter to use for the given set of CSS attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.StyleSheet.ListPainter

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.StyleSheet.ListPainter

Packages that use StyleSheet.ListPainter
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.

Uses of StyleSheet.ListPainter in javax.swing.text.html

Methods in javax.swing.text.html that return StyleSheet.ListPainter
 StyleSheet.ListPainter StyleSheet.getListPainter(AttributeSet a)
Fetches the list formatter to use for the given set of CSS attributes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CSS

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class CSS

java.lang.Object
  |
  +--javax.swing.text.html.CSS
All Implemented Interfaces:
Serializable
public class CSS
extends Object
implements Serializable

Defines a set of CSS attributes as a typesafe enumeration. The HTML View implementations use CSS attributes to determine how they will render. This also defines methods to map between CSS/HTML/StyleConstants. Any shorthand properties, such as font, are mapped to the intrinsic properties.

The following describes the CSS properties that are suppored by the rendering engine:

  • font-family
  • font-style
  • font-size (supports relative units)
  • font-weight
  • font
  • color
  • background-color (with the exception of transparent)
  • background-image
  • background-repeat
  • background-position
  • background
  • background-repeat
  • text-decoration (with the exception of blink and overline)
  • vertical-align (only sup and super)
  • text-align (justify is treated as center)
  • margin-top
  • margin-right
  • margin-bottom
  • margin-left
  • margin
  • padding-top
  • padding-right
  • padding-bottom
  • padding-left
  • border-style (only supports inset, outset and none)
  • list-style-type
  • list-style-position
The following are modeled, but currently not rendered.
  • font-variant
  • background-attachment (background always treated as scroll)
  • word-spacing
  • letter-spacing
  • text-indent
  • text-transform
  • line-height
  • border-top-width (this is used to indicate if a border should be used)
  • border-right-width
  • border-bottom-width
  • border-left-width
  • border-width
  • border-top
  • border-right
  • border-bottom
  • border-left
  • border
  • width
  • height
  • float
  • clear
  • display
  • white-space
  • list-style

Note: for the time being we do not fully support relative units, unless noted, so that p { margin-top: 10% } will be treated as if no margin-top was specified.

See Also:
StyleSheet, Serialized Form

Inner Class Summary
static class CSS.Attribute
Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
Constructor Summary
CSS()
Method Summary
static CSS.Attribute[] | getAllAttributeKeys() Return the set of all possible CSS attribute keys.
static CSS.Attribute | getAttribute(String name) Translate a string to a CSS.Attribute object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CSS

public CSS()
Method Detail

getAllAttributeKeys

public static CSS.Attribute[] getAllAttributeKeys()
Return the set of all possible CSS attribute keys.

getAttribute

public static final CSS.Attribute getAttribute(String name)
Translate a string to a CSS.Attribute object. This will return null if there is no attribute by the given name.
Parameters:
name - the name of the CSS attribute to fetch the typesafe enumeration for.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FormAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.FormAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction
              |
              +--javax.swing.text.html.HTMLDocument.HTMLReader.FormAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.FormAction
extends HTMLDocument.HTMLReader.SpecialAction

Action to support forms by building all of the elements used to represent form controls. This will process the <INPUT>, <TEXTAREA>, <SELECT>, and <OPTION> tags. The element created by this action is expected to have the attribute StyleConstants.ModelAttribute set to the model that holds the state for the form control. This enables multiple views, and allows document to be iterated over picking up the data of the form. The following are the model assignments for the various type of form elements.
Element Type | Model Type
input, type button | DefaultButtonModel
input, type checkbox | JToggleButton.ToggleButtonModel
input, type image | DefaultButtonModel
input, type password | PlainDocument
input, type radio | JToggleButton.ToggleButtonModel
input, type reset | DefaultButtonModel
input, type submit | DefaultButtonModel
input, type text or type is null. | PlainDocument
select | OptionComboBoxModel or an OptionListBoxModel, with an item type of Option
textarea | TextAreaDocument

Constructor Summary
HTMLDocument.HTMLReader.FormAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet attr) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.FormAction

public HTMLDocument.HTMLReader.FormAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet attr)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.SpecialAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FormView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class FormView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.ComponentView
              |
              +--javax.swing.text.html.FormView
All Implemented Interfaces:
ActionListener, EventListener, SwingConstants
public class FormView
extends ComponentView
implements ActionListener

Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>. The model for the component is stored as an attribute of the the element (using StyleConstants.ModelAttribute), and is used to build the component of the view. The type of the model is assumed to of the type that would be set by HTMLDocument.HTMLReader.FormAction. If there are multiple views mapped over the document, they will share the embedded component models.

The following table shows what components get built by this view.
Element Type | Component built
input, type button | JButton
input, type checkbox | JCheckBox
input, type image | JButton
input, type password | JPasswordField
input, type radio | JRadioButton
input, type reset | JButton
input, type submit | JButton
input, type text | JTextField
select, size > 1 or multiple attribute defined | JList in a JScrollPane
select, size unspecified or 1 | JComboBox
textarea | JTextArea in a JScrollPane

Inner Class Summary
protected  class FormView.MouseEventListener
MouseEventListener class to handle form submissions when an input with type equal to image is clicked on.
Field Summary
static String | RESET Deprecated. As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText
static String | SUBMIT Deprecated. As of 1.3, value now comes from UIManager property FormView.submitButtonText
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
FormView(Element elem)
Creates a new FormView object.
Method Summary
void | actionPerformed(ActionEvent evt) Responsible for processeing the ActionEvent.
protected Component | createComponent() Create the component.
protected void | imageSubmit(String imageData) This method is called to submit a form in response to a click on an image -- an <INPUT> form element of type "image".
protected void | submitData(String data) This method is responsible for submitting the form data.
Methods inherited from class javax.swing.text.ComponentView
getAlignment, getComponent, getMaximumSpan, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, setSize, viewToModel
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SUBMIT

public static final String SUBMIT
Deprecated. As of 1.3, value now comes from UIManager property FormView.submitButtonText

If a value attribute is not specified for a FORM input element of type "submit", then this default string is used.

RESET

public static final String RESET
Deprecated. As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText

If a value attribute is not specified for a FORM input element of type "reset", then this default string is used.
Constructor Detail

FormView

public FormView(Element elem)
Creates a new FormView object.
Parameters:
elem - the element to decorate
Method Detail

createComponent

protected Component createComponent()
Create the component. This is basically a big switch statement based upon the tag type and html attributes of the associated element.
Overrides:
createComponent in class ComponentView

actionPerformed

public void actionPerformed(ActionEvent evt)
Responsible for processeing the ActionEvent. If the element associated with the FormView, has a type of "submit", "reset", "text" or "password" then the action is processed. In the case of a "submit" the form is submitted. In the case of a "reset" the form is reset to its original state. In the case of "text" or "password", if the element is the last one of type "text" or "password", the form is submitted. Otherwise, focus is transferred to the next component in the form.
Specified by:
actionPerformed in interface ActionListener
Parameters:
evt - the ActionEvent.

submitData

protected void submitData(String data)
This method is responsible for submitting the form data. A thread is forked to undertake the submission.

imageSubmit

protected void imageSubmit(String imageData)
This method is called to submit a form in response to a click on an image -- an <INPUT> form element of type "image".
Parameters:
the - mouse click coordinates.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HiddenAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.HiddenAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.HiddenAction
extends HTMLDocument.HTMLReader.TagAction

Constructor Summary
HTMLDocument.HTMLReader.HiddenAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet a) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.HiddenAction

public HTMLDocument.HTMLReader.HiddenAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet a)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.TagAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTML

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTML

java.lang.Object
  |
  +--javax.swing.text.html.HTML
public class HTML
extends Object

Constants used in the HTMLDocument. These are basically tag and attribute definitions.

Inner Class Summary
static class | HTML.Attribute Typesafe enumeration representing an html attribute.
static class | HTML.Tag Typesafe enumeration for an html tag.
static class | HTML.UnknownTag
Field Summary
static String NULL_ATTRIBUTE_VALUE
Constructor Summary
HTML()
Method Summary
static HTML.Attribute[] | getAllAttributeKeys() This is the set of html attributes recognized.
static HTML.Tag[] | getAllTags() This is the set of actual html tags that are known about the the default html reader.
static HTML.Attribute | getAttributeKey(String attName) Fetch an attribute constant for a well-known attribute name (i.e.
static int | getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def) Fetch an integer attribute value.
static HTML.Tag | getTag(String tagName) Fetch a tag constant for a well-known tag name (i.e.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NULL_ATTRIBUTE_VALUE

public static final String NULL_ATTRIBUTE_VALUE
Constructor Detail

HTML

public HTML()
Method Detail

getAllTags

public static HTML.Tag[] getAllTags()
This is the set of actual html tags that are known about the the default html reader. This set does not include tags that are manufactured by the reader.

getTag

public static HTML.Tag getTag(String tagName)
Fetch a tag constant for a well-known tag name (i.e. one of the tags in the set allTags). If the given name does not represent one of the well-known tags, then null will be returned.

getIntegerAttributeValue

public static int getIntegerAttributeValue(AttributeSet attr,
                                           HTML.Attribute key,
                                           int def)
Fetch an integer attribute value. Attribute values are stored as a string, and this is a convenience method to convert to an actual integer.
Parameters:
attr - the set of attributes to use to try to fetch a value
key - the key to use to fetch the value.
def - the default value to use if the attribute isn't defined or there is an error converting to an integer.

getAllAttributeKeys

public static HTML.Attribute[] getAllAttributeKeys()
This is the set of html attributes recognized.

getAttributeKey

public static HTML.Attribute getAttributeKey(String attName)
Fetch an attribute constant for a well-known attribute name (i.e. one of the attributes in the set allAttributes). If the given name does not represent one of the well-known attributes, then null will be returned.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLDocument

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.DefaultStyledDocument
              |
              +--javax.swing.text.html.HTMLDocument
All Implemented Interfaces:
Document, Serializable, StyledDocument
public class HTMLDocument
extends DefaultStyledDocument

A document that models HTML. The purpose of this model is to support both browsing and editing. As a result, the structure described by an HTML document is not exactly replicated by default. The element structure that is modeled by default, is built by the class HTMLDocument.HTMLReader, which implements the HTMLEditorKit.ParserCallback protocol that the parser expects. To change the structure one can subclass HTMLReader, and reimplement the method getReader to return the new reader implementation. The documentation for HTMLReader should be consulted for the details of the default structure created. The intent is that the document be non-lossy (although reproducing the HTML format may result in a different format).

The document models only HTML, and makes no attempt to store view attributes in it. The elements are identified by the StyleContext.NameAttribute attribute, which should always have a value of type HTML.Tag that identifies the kind of element. Some of the elements (such as comments) are synthesized. The HTMLFactory uses this attribute to determine what kind of view to build.

This document supports incremental loading. The TokenThreshold property controls how much of the parse is buffered before trying to update the element structure of the document. This property is set by the EditorKit so that subclasses can disable it.

The Base property determines the URL against which relative URLs are resolved. By default, this will be the Document.StreamDescriptionProperty if the value of the property is a URL. If a <BASE> tag is encountered, the base will become the URL specified by that tag. Because the base URL is a property, it can of course be set directly.

The default content storage mechanism for this document is a gap buffer (GapContent). Alternatives can be supplied by using the constructor that takes a Content implementation.

See Also:
Serialized Form

Inner Class Summary
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.HTMLReader An HTML reader to load an HTML document with an HTML element structure.
static class | HTMLDocument.Iterator An iterator to iterate over a particular type of tag.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.
Inner classes inherited from class javax.swing.text.DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement
Inner classes inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Field Summary
static String AdditionalComments
Document property key value.
Fields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Constructor Summary
HTMLDocument()
Constructs an HTML document.
HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
Constructs an HTML document with the given content storage implementation and the given style/attribute storage mechanism.
HTMLDocument(StyleSheet styles)
Constructs an HTML document with the default content storage implementation and the given style/attribute storage mechanism.
Method Summary
protected void | create(DefaultStyledDocument.ElementSpec[] data) Replaces the contents of the document with the given element specifications.
protected Element | createBranchElement(Element parent, AttributeSet a) Creates a document branch element, that can contain other elements.
protected AbstractDocument.AbstractElement | createDefaultRoot() Creates the root element to be used to represent the default document structure.
protected Element | createLeafElement(Element parent, AttributeSet a, int p0, int p1) Creates a document leaf element that directly represents text (doesn't have any children).
protected void | fireChangedUpdate(DocumentEvent e) Notifies all listeners that have registered interest for notification on this event type.
protected void | fireUndoableEditUpdate(UndoableEditEvent e) Notifies all listeners that have registered interest for notification on this event type.
URL | getBase() Gets the location to resolve relative URLs against.
Element | getElement(Element e, Object attribute, Object value) Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found.
Element | getElement(String id) Fetches the element that has the given id attribute.
HTMLDocument.Iterator | getIterator(HTML.Tag t) Fetches an iterator for the following kind of HTML tag.
HTMLEditorKit.Parser | getParser() Returns the parser that is used when inserting HTML into the existing document.
boolean | getPreservesUnknownTags()
HTMLEditorKit.ParserCallback | getReader(int pos) Fetches the reader for the parser to use to load the document with HTML.
HTMLEditorKit.ParserCallback | getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag) Fetches the reader for the parser to use to load the document with HTML.
StyleSheet | getStyleSheet() Fetches the StyleSheet with the document-specific display rules (CSS) that were specified in the HTML document itself.
int | getTokenThreshold() Gets the number of tokens to buffer before trying to update the documents element structure.
protected void | insert(int offset, DefaultStyledDocument.ElementSpec[] data) Inserts new elements in bulk.
void | insertAfterEnd(Element elem, String htmlText) Inserts the HTML specified as a string after the the end of the given element.
void | insertAfterStart(Element elem, String htmlText) Inserts the HTML specified as a string at the start of the element.
void | insertBeforeEnd(Element elem, String htmlText) Inserts the HTML specified as a string at the end of the element.
void | insertBeforeStart(Element elem, String htmlText) Inserts the HTML specified as string before the start of the given element.
protected void | insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
void | processHTMLFrameHyperlinkEvent(HTMLFrameHyperlinkEvent e) Processes HyperlinkEvents that are generated by documents in an HTML frame.
void | setBase(URL u) Sets the location to resolve relative URLs against.
void | setInnerHTML(Element elem, String htmlText) Replaces the children of the given element with the contents specified as an HTML string.
void | setOuterHTML(Element elem, String htmlText) Replaces the given element in the parent with the contents specified as an HTML string.
void | setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets attributes for a paragraph.
void | setParser(HTMLEditorKit.Parser parser) Sets the parser that is used by the methods that insert html into the existing document, eg setInnerHTML, setOuterHTML...
void | setPreservesUnknownTags(boolean preservesTags) Sets how unknown tags are handled.
void | setTokenThreshold(int n) Sets the number of tokens to buffer before trying to update the documents element structure.
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, styleChanged
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createPosition, dump, fireInsertUpdate, fireRemoveUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, setAsynchronousLoadPriority, setDocumentProperties, writeLock, writeUnlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render

Field Detail

AdditionalComments

public static final String AdditionalComments
Document property key value. The value for the key will be a Vector of Strings that are comments not found in the body.
Constructor Detail

HTMLDocument

public HTMLDocument()
Constructs an HTML document.

HTMLDocument

public HTMLDocument(StyleSheet styles)
Constructs an HTML document with the default content storage implementation and the given style/attribute storage mechanism.
Parameters:
styles - the styles

HTMLDocument

public HTMLDocument(AbstractDocument.Content c,
                    StyleSheet styles)
Constructs an HTML document with the given content storage implementation and the given style/attribute storage mechanism.
Parameters:
c - the container for the content
styles - the styles
Method Detail

getReader

public HTMLEditorKit.ParserCallback getReader(int pos)
Fetches the reader for the parser to use to load the document with HTML. This is implemented to return an instance of HTMLDocument.HTMLReader. Subclasses can reimplement this method to change how the document get structured if desired (e.g. to handle custom tags, structurally represent character style elements, etc.).

getReader

public HTMLEditorKit.ParserCallback getReader(int pos,
                                              int popDepth,
                                              int pushDepth,
                                              HTML.Tag insertTag)
Fetches the reader for the parser to use to load the document with HTML. This is implemented to return an instance of HTMLDocument.HTMLReader. Subclasses can reimplement this method to change how the document get structured if desired (e.g. to handle custom tags, structurally represent character style elements, etc.).
Parameters:
popDepth - the number of ElementSpec.EndTagTypes to generate before inserting
pushDepth - the number of ElementSpec.StartTagTypes with a direction of ElementSpec.JoinNextDirection that should be generated before inserting, but after the end tags have been generated
insertTag - the first tag to start inserting into document

getBase

public URL getBase()
Gets the location to resolve relative URLs against. By default this will be the document's URL if the document was loaded from a URL. If a base tag is found and can be parsed, it will be used as the base location.

setBase

public void setBase(URL u)
Sets the location to resolve relative URLs against. By default this will be the document's URL if the document was loaded from a URL. If a base tag is found and can be parsed, it will be used as the base location.

This also sets the base of the StyleSheet to be u as well as the receiver.

insert

protected void insert(int offset,
                      DefaultStyledDocument.ElementSpec[] data)
               throws BadLocationException
Inserts new elements in bulk. This is how elements get created in the document. The parsing determines what structure is needed and creates the specification as a set of tokens that describe the edit while leaving the document free of a write-lock. This method can then be called in bursts by the reader to acquire a write-lock for a shorter duration (i.e. while the document is actually being altered).
Overrides:
insert in class DefaultStyledDocument
Parameters:
offset - the starting offset
data - the element data
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document.

insertUpdate

protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,
                            AttributeSet attr)
Updates document structure as a result of text insertion. This will happen within a write lock. This implementation simply parses the inserted content for line breaks and builds up a set of instructions for the element buffer.
Overrides:
insertUpdate in class DefaultStyledDocument
Parameters:
chng - a description of the document change
attr - the attributes

create

protected void create(DefaultStyledDocument.ElementSpec[] data)
Replaces the contents of the document with the given element specifications. This is called before insert if the loading is done in bursts. This is the only method called if loading the document entirely in one burst.
Overrides:
create in class DefaultStyledDocument

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)
Sets attributes for a paragraph.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Overrides:
setParagraphAttributes in class DefaultStyledDocument
Parameters:
offset - the offset into the paragraph (must be at least 0)
length - the number of characters affected (must be at least 0)
s - the attributes
replace - whether to replace existing attributes, or merge them

getStyleSheet

public StyleSheet getStyleSheet()
Fetches the StyleSheet with the document-specific display rules (CSS) that were specified in the HTML document itself.

getIterator

public HTMLDocument.Iterator getIterator(HTML.Tag t)
Fetches an iterator for the following kind of HTML tag. This can be used for things like iterating over the set of anchors contained, iterating over the input elements, etc.

createLeafElement

protected Element createLeafElement(Element parent,
                                    AttributeSet a,
                                    int p0,
                                    int p1)
Creates a document leaf element that directly represents text (doesn't have any children). This is implemented to return an element of type HTMLDocument.RunElement.
Overrides:
createLeafElement in class AbstractDocument
Parameters:
parent - the parent element
a - the attributes for the element
p0 - the beginning of the range (must be at least 0)
p1 - the end of the range (must be at least p0)
Returns:
the new element

createBranchElement

protected Element createBranchElement(Element parent,
                                      AttributeSet a)
Creates a document branch element, that can contain other elements. This is implemented to return an element of type HTMLDocument.BlockElement.
Overrides:
createBranchElement in class AbstractDocument
Parameters:
parent - the parent element
a - the attributes
Returns:
the element

createDefaultRoot

protected AbstractDocument.AbstractElement createDefaultRoot()
Creates the root element to be used to represent the default document structure.
Overrides:
createDefaultRoot in class DefaultStyledDocument
Returns:
the element base

setTokenThreshold

public void setTokenThreshold(int n)
Sets the number of tokens to buffer before trying to update the documents element structure.

getTokenThreshold

public int getTokenThreshold()
Gets the number of tokens to buffer before trying to update the documents element structure. By default, this will be Integer.MAX_VALUE.

setPreservesUnknownTags

public void setPreservesUnknownTags(boolean preservesTags)
Sets how unknown tags are handled. If set to true, unknown tags are put in the model, otherwise they are dropped.

getPreservesUnknownTags

public boolean getPreservesUnknownTags()
Returns:
true if unknown tags are to be preserved when parsing.

processHTMLFrameHyperlinkEvent

public void processHTMLFrameHyperlinkEvent(HTMLFrameHyperlinkEvent e)
Processes HyperlinkEvents that are generated by documents in an HTML frame. The HyperlinkEvent type, as the parameter suggests, is HTMLFrameHyperlinkEvent. In addition to the typical information contained in a HyperlinkEvent, this event contains the element that corresponds to the frame in which the click happened (the source element) and the target name. The target name has 4 possible values:
  • _self
  • _parent
  • _top
  • a named frame
If target is _self, the action is to change the value of the HTML.Attribute.SRC attribute and fires a ChangedUpdate event. If the target is _parent, then it deletes the parent element, which is a <FRAMESET> element, and inserts a new <FRAME> element and sets its HTML.Attribute.SRC attribute to have a value equal to the destination URL and fire a RemovedUpdate and InsertUpdate. If the target is _top, this method does nothing. In the implementation of the view for a frame, namely the FrameView, the processing of _top is handled. Given that _top implies replacing the entire document, it made sense to handle this outside of the document that it will replace. If the target is a named frame, then the element hierarchy is searched for an element with a name equal to the target, its HTML.Attribute.SRC attribute is updated and a ChangedUpdate event is fired.
Parameters:
e - the event

setParser

public void setParser(HTMLEditorKit.Parser parser)
Sets the parser that is used by the methods that insert html into the existing document, eg setInnerHTML, setOuterHTML...

HTMLEditorKit.createDefaultDocument will set the parser for you. If you create an HTMLDocument by hand, be sure and set the parser accordingly.

Since:
1.3

getParser

public HTMLEditorKit.Parser getParser()
Returns the parser that is used when inserting HTML into the existing document.
Since:
1.3

setInnerHTML

public void setInnerHTML(Element elem,
                         String htmlText)
                  throws BadLocationException,
                         IOException
Replaces the children of the given element with the contents specified as an HTML string.

This will be seen as at least two events, n inserts followed by a remove.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalArgumentException - is elem is a leaf
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

setOuterHTML

public void setOuterHTML(Element elem,
                         String htmlText)
                  throws BadLocationException,
                         IOException
Replaces the given element in the parent with the contents specified as an HTML string.

This will be seen as at least two events, n inserts followed by a remove.

When replacing a leaf this will attempt to make sure there is a newline present if one is needed. This may result in an additional element being inserted. Consider, if you were to replace a character element that contained a newline with <img> this would create two elements, one for the image, ane one for the newline.

If you try to replace the element at length you will most likely end up with two elements, eg setOuterHTML(getCharacterElement (getLength()), "blah") will result in two leaf elements at the end, one representing 'blah', and the other representing the end element.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

insertAfterStart

public void insertAfterStart(Element elem,
                             String htmlText)
                      throws BadLocationException,
                             IOException
Inserts the HTML specified as a string at the start of the element.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

insertBeforeEnd

public void insertBeforeEnd(Element elem,
                            String htmlText)
                     throws BadLocationException,
                            IOException
Inserts the HTML specified as a string at the end of the element.

If elem's children are leafs, at the character at a elem.getEndOffset() - 1 is a newline, this will insert before the newline so that there isn't text after the newline.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

insertBeforeStart

public void insertBeforeStart(Element elem,
                              String htmlText)
                       throws BadLocationException,
                              IOException
Inserts the HTML specified as string before the start of the given element.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

insertAfterEnd

public void insertAfterEnd(Element elem,
                           String htmlText)
                    throws BadLocationException,
                           IOException
Inserts the HTML specified as a string after the the end of the given element.

For this to work correcty, the receiver must have an HTMLEditorKit.Parser set. This will be the case if the receiver was created from an HTMLEditorKit via the createDefaultDocument method.

Throws:
IllegalStateException - if an HTMLEditorKit.Parser has not been set on the receiver.
Since:
1.3

getElement

public Element getElement(String id)
Fetches the element that has the given id attribute. If the element can't be found, null is returned. This is not thread-safe.
Since:
1.3

getElement

public Element getElement(Element e,
                          Object attribute,
                          Object value)
Returns the child element of e that contains the attribute, attribute with value value, or null if one isn't found. This is not thread-safe.
Since:
1.3

fireChangedUpdate

protected void fireChangedUpdate(DocumentEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Overrides:
fireChangedUpdate in class AbstractDocument
Parameters:
e - the event
See Also:
EventListenerList

fireUndoableEditUpdate

protected void fireUndoableEditUpdate(UndoableEditEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Overrides:
fireUndoableEditUpdate in class AbstractDocument
Parameters:
e - the event
See Also:
EventListenerList
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLEditorKit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--javax.swing.text.StyledEditorKit
                    |
                    +--javax.swing.text.html.HTMLEditorKit
All Implemented Interfaces:
Cloneable, Serializable
public class HTMLEditorKit
extends StyledEditorKit

The Swing JEditorPane text component supports different kinds of content via a plug-in mechanism called an EditorKit. Because HTML is a very popular format of content, some support is provided by default. The default support is provided by this class, which supports HTML version 3.2 (with some extensions), and is migrating toward version 4.0. The <applet> tag is not supported, but some support is provided for the <object> tag.

There are several goals of the HTML EditorKit provided, that have an effect upon the way that HTML is modeled. These have influenced its design in a substantial way.

Support editing
It might seem fairly obvious that a plug-in for JEditorPane should provide editing support, but that fact has several design considerations. There are a substantial number of HTML documents that don't properly conform to an HTML specification. These must be normalized somewhat into a correct form if one is to edit them. Additionally, users don't like to be presented with an excessive amount of structure editing, so using traditional text editing gestures is preferred over using the HTML structure exactly as defined in the HTML document.

The modeling of HTML is provided by the class HTMLDocument. Its documention describes the details of how the HTML is modeled. The editing support leverages heavily off of the text package.

Extendable/Scalable
To maximize the usefulness of this kit, a great deal of effort has gone into making it extendable. These are some of the features.
  1. The parser is replacable. The default parser is the Hot Java parser which is DTD based. A different DTD can be used, or an entirely different parser can be used. To change the parser, reimplement the getParser method. The default parser is dynamically loaded when first asked for, so the class files will never be loaded if an alternative parser is used. The default parser is in a seperate package called parser below this package.
  2. The parser drives the ParserCallback, which is provided by HTMLDocument. To change the callback, subclass HTMLDocument and reimplement the createDefaultDocument method to return document that produces a different reader. The reader controls how the document is structured. Although the Document provides HTML support by default, there is nothing preventing support of non-HTML tags that result in alternative element structures.
  3. The default view of the models are provided as a hierarchy of View implementations, so one can easily customize how a particular element is displayed or add capabilities for new kinds of elements by providing new View implementations. The default set of views are provided by the HTMLFactory class. This can be easily changed by subclassing or replacing the HTMLFactory and reimplementing the getViewFactory method to return the alternative factory.
  4. The View implementations work primarily off of CSS attributes, which are kept in the views. This makes it possible to have multiple views mapped over the same model that appear substantially different. This can be especially useful for printing. For most HTML attributes, the HTML attributes are converted to CSS attributes for display. This helps make the View implementations more general purpose

Asynchronous Loading
Larger documents involve a lot of parsing and take some time to load. By default, this kit produces documents that will be loaded asynchronously if loaded using JEditorPane.setPage. This is controlled by a property on the document. The method createDefaultDocument can be overriden to change this. The batching of work is done by the HTMLDocument.HTMLReader class. The actual work is done by the DefaultStyledDocument and AbstractDocument classes in the text package.

Customization from current LAF
HTML provides a well known set of features without exactly specifying the display characteristics. Swing has a theme mechanism for its look-and-feel implementations. It is desirable for the look-and-feel to feed display characteristics into the HTML views. An user with poor vision for example would want high contrast and larger than typical fonts.

The support for this is provided by the StyleSheet class. The presentation of the HTML can be heavily influenced by the setting of the StyleSheet property on the EditorKit.

Not lossy
An EditorKit has the ability to be read and save documents. It is generally the most pleasing to users if there is no loss of data between the two operation. The policy of the HTMLEditorKit will be to store things not recognized or not necessarily visible so they can be subsequently written out. The model of the HTML document should therefore contain all information discovered while reading the document. This is constrained in some ways by the need to support editing (i.e. incorrect documents sometimes must be normalized). The guiding principle is that information shouldn't be lost, but some might be synthesized to produce a more correct model or it might be rearranged.

See Also:
Serialized Form

Inner Class Summary
static class | HTMLEditorKit.HTMLFactory A factory to build views for HTML.
static class | HTMLEditorKit.HTMLTextAction An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.
static class | HTMLEditorKit.InsertHTMLTextAction InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document.
static class | HTMLEditorKit.LinkController Class to watch the associated component and fire hyperlink events on it when appropriate.
static class | HTMLEditorKit.Parser Interface to be supported by the parser.
static class | HTMLEditorKit.ParserCallback The result of parsing drives these callback methods.
Inner classes inherited from class javax.swing.text.StyledEditorKit
StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineAction
Inner classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
Field Summary
static String | BOLD_ACTION The bold action identifier
static String | COLOR_ACTION The Color choice action identifier The color is passed as an argument
static String | DEFAULT_CSS Default Cascading Style Sheet file that sets up the tag views.
static String | FONT_CHANGE_BIGGER The font size increase to next value action identifier
static String | FONT_CHANGE_SMALLER The font size decrease to next value action identifier
static String | IMG_ALIGN_BOTTOM Align images at the bottom.
static String | IMG_ALIGN_MIDDLE Align images in the middle.
static String | IMG_ALIGN_TOP Align images at the top.
static String | IMG_BORDER Align images at the border.
static String | ITALIC_ACTION The italic action identifier
static String | LOGICAL_STYLE_ACTION The logical style choice action identifier The logical style is passed in as an argument
static String | PARA_INDENT_LEFT The paragraph left indent action identifier
static String | PARA_INDENT_RIGHT The paragraph right indent action identifier
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
Constructor Summary
HTMLEditorKit()
Constructs an HTMLEditorKit, creates a StyleContext, and loads the style sheet.
Method Summary
Object | clone() Create a copy of the editor kit.
Document | createDefaultDocument() Create an uninitialized text storage model that is appropriate for this type of editor.
protected void | createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.
void | deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
Action[] | getActions() Fetches the command list for the editor.
String | getContentType() Get the MIME type of the data that this kit represents support for.
Cursor | getDefaultCursor() Returns the default cursor.
MutableAttributeSet | getInputAttributes() Gets the input attributes used for the styled editing actions.
Cursor | getLinkCursor() Returns the cursor to use over hyper links.
protected HTMLEditorKit.Parser | getParser() Fetch the parser to use for reading HTML streams.
StyleSheet | getStyleSheet() Get the set of styles currently being used to render the HTML elements.
ViewFactory | getViewFactory() Fetch a factory that is suitable for producing views of any models that are produced by this kit.
void | insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) Inserts HTML into an existing document.
void | install(JEditorPane c) Called when the kit is being installed into the a JEditorPane.
void | read(Reader in, Document doc, int pos) Inserts content from the given stream.
void | setDefaultCursor(Cursor cursor) Sets the default cursor.
void | setLinkCursor(Cursor cursor) Sets the cursor to use over links.
void | setStyleSheet(StyleSheet s) Set the set of styles to be used to render the various HTML elements.
void | write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
Methods inherited from class javax.swing.text.StyledEditorKit
getCharacterAttributeRun
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, read, write
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_CSS

public static final String DEFAULT_CSS
Default Cascading Style Sheet file that sets up the tag views.

BOLD_ACTION

public static final String BOLD_ACTION
The bold action identifier

ITALIC_ACTION

public static final String ITALIC_ACTION
The italic action identifier

PARA_INDENT_LEFT

public static final String PARA_INDENT_LEFT
The paragraph left indent action identifier

PARA_INDENT_RIGHT

public static final String PARA_INDENT_RIGHT
The paragraph right indent action identifier

FONT_CHANGE_BIGGER

public static final String FONT_CHANGE_BIGGER
The font size increase to next value action identifier

FONT_CHANGE_SMALLER

public static final String FONT_CHANGE_SMALLER
The font size decrease to next value action identifier

COLOR_ACTION

public static final String COLOR_ACTION
The Color choice action identifier The color is passed as an argument

LOGICAL_STYLE_ACTION

public static final String LOGICAL_STYLE_ACTION
The logical style choice action identifier The logical style is passed in as an argument

IMG_ALIGN_TOP

public static final String IMG_ALIGN_TOP
Align images at the top.

IMG_ALIGN_MIDDLE

public static final String IMG_ALIGN_MIDDLE
Align images in the middle.

IMG_ALIGN_BOTTOM

public static final String IMG_ALIGN_BOTTOM
Align images at the bottom.

IMG_BORDER

public static final String IMG_BORDER
Align images at the border.
Constructor Detail

HTMLEditorKit

public HTMLEditorKit()
Constructs an HTMLEditorKit, creates a StyleContext, and loads the style sheet.
Method Detail

clone

public Object clone()
Create a copy of the editor kit. This allows an implementation to serve as a prototype for others, so that they can be quickly created.
Overrides:
clone in class StyledEditorKit
Returns:
the copy

getContentType

public String getContentType()
Get the MIME type of the data that this kit represents support for. This kit supports the type text/html.
Overrides:
getContentType in class DefaultEditorKit
Returns:
the type

getViewFactory

public ViewFactory getViewFactory()
Fetch a factory that is suitable for producing views of any models that are produced by this kit.
Overrides:
getViewFactory in class StyledEditorKit
Returns:
the factory

createDefaultDocument

public Document createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.
Overrides:
createDefaultDocument in class StyledEditorKit
Returns:
the model

read

public void read(Reader in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Inserts content from the given stream. If doc is an instance of HTMLDocument, this will read HTML 3.2 text. Inserting HTML into a non-empty document must be inside the body Element, if you do not insert into the body an exception will be thrown. When inserting into a non-empty document all tags outside of the body (head, title) will be dropped.
Overrides:
read in class DefaultEditorKit
Parameters:
in - the stream to read from
doc - the destination for the insertion
pos - the location in the document to place the content
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document
RuntimeException - (will eventually be a BadLocationException) if pos is invalid

insertHTML

public void insertHTML(HTMLDocument doc,
                       int offset,
                       String html,
                       int popDepth,
                       int pushDepth,
                       HTML.Tag insertTag)
                throws BadLocationException,
                       IOException
Inserts HTML into an existing document.
Parameters:
doc - the document to insert into
offset - the offset to insert HTML at
popDepth - the number of ElementSpec.EndTagTypes to generate before inserting
pushDepth - the number of ElementSpec.StartTagTypes with a direction of ElementSpec.JoinNextDirection that should be generated before inserting, but after the end tags have been generated
insertTag - the first tag to start inserting into document
Throws:
RuntimeException - (will eventually be a BadLocationException) if pos is invalid

write

public void write(Writer out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
Write content from a document to the given stream in a format appropriate for this kind of content handler.
Overrides:
write in class DefaultEditorKit
Parameters:
out - the stream to write to
doc - the source for the write
pos - the location in the document to fetch the content
len - the amount to write out
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document

install

public void install(JEditorPane c)
Called when the kit is being installed into the a JEditorPane.
Overrides:
install in class StyledEditorKit
Parameters:
c - the JEditorPane

deinstall

public void deinstall(JEditorPane c)
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
Overrides:
deinstall in class StyledEditorKit
Parameters:
c - the JEditorPane

setStyleSheet

public void setStyleSheet(StyleSheet s)
Set the set of styles to be used to render the various HTML elements. These styles are specified in terms of CSS specifications. Each document produced by the kit will have a copy of the sheet which it can add the document specific styles to. By default, the StyleSheet specified is shared by all HTMLEditorKit instances. This should be reimplemented to provide a finer granularity if desired.

getStyleSheet

public StyleSheet getStyleSheet()
Get the set of styles currently being used to render the HTML elements. By default the resource specified by DEFAULT_CSS gets loaded, and is shared by all HTMLEditorKit instances.

getActions

public Action[] getActions()
Fetches the command list for the editor. This is the list of commands supported by the superclass augmented by the collection of commands defined locally for style operations.
Overrides:
getActions in class StyledEditorKit
Returns:
the command list

createInputAttributes

protected void createInputAttributes(Element element,
                                     MutableAttributeSet set)
Copies the key/values in elements AttributeSet into set. This does not copy component, icon, or element names attributes. Subclasses may wish to refine what is and what isn't copied here. But be sure to first remove all the attributes that are in set.

This is called anytime the caret moves over a different location.

Overrides:
createInputAttributes in class StyledEditorKit

getInputAttributes

public MutableAttributeSet getInputAttributes()
Gets the input attributes used for the styled editing actions.
Overrides:
getInputAttributes in class StyledEditorKit
Returns:
the attribute set

setDefaultCursor

public void setDefaultCursor(Cursor cursor)
Sets the default cursor.
Since:
1.3

getDefaultCursor

public Cursor getDefaultCursor()
Returns the default cursor.
Since:
1.3

setLinkCursor

public void setLinkCursor(Cursor cursor)
Sets the cursor to use over links.
Since:
1.3

getLinkCursor

public Cursor getLinkCursor()
Returns the cursor to use over hyper links.

getParser

protected HTMLEditorKit.Parser getParser()
Fetch the parser to use for reading HTML streams. This can be reimplemented to provide a different parser. The default implementation is loaded dynamically to avoid the overhead of loading the default parser if it's not used. The default parser is the HotJava parser using an HTML 3.2 DTD.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.HTMLFactory

java.lang.Object
  |
  +--javax.swing.text.html.HTMLEditorKit.HTMLFactory
All Implemented Interfaces:
ViewFactory
Enclosing class:
HTMLEditorKit
public static class HTMLEditorKit.HTMLFactory
extends Object
implements ViewFactory

A factory to build views for HTML. The following table describes what this factory will build by default.
Tag | View created
HTML.Tag.CONTENT | InlineView
HTML.Tag.IMPLIED | javax.swing.text.html.ParagraphView
HTML.Tag.P | javax.swing.text.html.ParagraphView
HTML.Tag.H1 | javax.swing.text.html.ParagraphView
HTML.Tag.H2 | javax.swing.text.html.ParagraphView
HTML.Tag.H3 | javax.swing.text.html.ParagraphView
HTML.Tag.H4 | javax.swing.text.html.ParagraphView
HTML.Tag.H5 | javax.swing.text.html.ParagraphView
HTML.Tag.H6 | javax.swing.text.html.ParagraphView
HTML.Tag.DT | javax.swing.text.html.ParagraphView
HTML.Tag.MENU | ListView
HTML.Tag.DIR | ListView
HTML.Tag.UL | ListView
HTML.Tag.OL | ListView
HTML.Tag.LI | BlockView
HTML.Tag.DL | BlockView
HTML.Tag.DD | BlockView
HTML.Tag.BODY | BlockView
HTML.Tag.HTML | BlockView
HTML.Tag.CENTER | BlockView
HTML.Tag.DIV | BlockView
HTML.Tag.BLOCKQUOTE | BlockView
HTML.Tag.PRE | BlockView
HTML.Tag.BLOCKQUOTE | BlockView
HTML.Tag.PRE | BlockView
HTML.Tag.IMG | ImageView
HTML.Tag.HR | HRuleView
HTML.Tag.BR | BRView
HTML.Tag.TABLE | javax.swing.text.html.TableView
HTML.Tag.INPUT | FormView
HTML.Tag.SELECT | FormView
HTML.Tag.TEXTAREA | FormView
HTML.Tag.OBJECT | ObjectView
HTML.Tag.FRAMESET | FrameSetView
HTML.Tag.FRAME | FrameView

Constructor Summary
HTMLEditorKit.HTMLFactory()
Method Summary
 View create(Element elem)
Creates a view from an element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLEditorKit.HTMLFactory

public HTMLEditorKit.HTMLFactory()
Method Detail

create

public View create(Element elem)
Creates a view from an element.
Specified by:
create in interface ViewFactory
Parameters:
elem - the element
Returns:
the view
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLFrameHyperlinkEvent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLFrameHyperlinkEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.swing.event.HyperlinkEvent
              |
              +--javax.swing.text.html.HTMLFrameHyperlinkEvent
All Implemented Interfaces:
Serializable
public class HTMLFrameHyperlinkEvent
extends HyperlinkEvent

HTMLFrameHyperlinkEvent is used to notify interested parties that link was activated in a frame.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.event.HyperlinkEvent
HyperlinkEvent.EventType
Fields inherited from class java.util.EventObject
source
Constructor Summary
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String targetFrame)
Creates a new object representing a html frame hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, Element sourceElement, String targetFrame)
Creates a new object representing a hypertext link event.
HTMLFrameHyperlinkEvent(Object source, HyperlinkEvent.EventType type, URL targetURL, String desc, String targetFrame)
Creates a new object representing a hypertext link event.
Method Summary
Element | getSourceElement() returns the element that corresponds to the source of the event.
String | getTarget() returns the target for the link.
Methods inherited from class javax.swing.event.HyperlinkEvent
getDescription, getEventType, getURL
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

HTMLFrameHyperlinkEvent

public HTMLFrameHyperlinkEvent(Object source,
                               HyperlinkEvent.EventType type,
                               URL targetURL,
                               String targetFrame)
Creates a new object representing a html frame hypertext link event.
Parameters:
source - the object responsible for the event
type - the event type
targetURL - the affected URL
targetFrame - the Frame to display the document in

HTMLFrameHyperlinkEvent

public HTMLFrameHyperlinkEvent(Object source,
                               HyperlinkEvent.EventType type,
                               URL targetURL,
                               String desc,
                               String targetFrame)
Creates a new object representing a hypertext link event.
Parameters:
source - the object responsible for the event
type - the event type
targetURL - the affected URL
desc - a description
targetFrame - the Frame to display the document in

HTMLFrameHyperlinkEvent

public HTMLFrameHyperlinkEvent(Object source,
                               HyperlinkEvent.EventType type,
                               URL targetURL,
                               Element sourceElement,
                               String targetFrame)
Creates a new object representing a hypertext link event.
Parameters:
source - the object responsible for the event
type - the event type
targetURL - the affected URL
sourceElement - the element that corresponds to the source of the event
targetFrame - the Frame to display the document in

HTMLFrameHyperlinkEvent

public HTMLFrameHyperlinkEvent(Object source,
                               HyperlinkEvent.EventType type,
                               URL targetURL,
                               String desc,
                               Element sourceElement,
                               String targetFrame)
Creates a new object representing a hypertext link event.
Parameters:
source - the object responsible for the event
type - the event type
targetURL - the affected URL
desc - a desription
sourceElement - the element that corresponds to the source of the event
targetFrame - the Frame to display the document in
Method Detail

getSourceElement

public Element getSourceElement()
returns the element that corresponds to the source of the event. This would always be the leaf element whose tag is HTML.Tag.FRAME.

getTarget

public String getTarget()
returns the target for the link.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader

java.lang.Object
  |
  +--javax.swing.text.html.HTMLEditorKit.ParserCallback
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader
Enclosing class:
HTMLDocument
public class HTMLDocument.HTMLReader
extends HTMLEditorKit.ParserCallback

An HTML reader to load an HTML document with an HTML element structure. This is a set of callbacks from the parser, implemented to create a set of elements tagged with attributes. The parse builds up tokens (ElementSpec) that describe the element subtree desired, and burst it into the document under the protection of a write lock using the insert method on the document outer class.

The reader can be configured by registering actions (of type HTMLDocument.HTMLReader.TagAction) that describe how to handle the action. The idea behind the actions provided is that the most natural text editing operations can be provided if the element structure boils down to paragraphs with runs of some kind of style in them. Some things are more naturally specified structurally, so arbitrary structure should be allowed above the paragraphs, but will need to be edited with structural actions. The implication of this is that some of the HTML elements specified in the stream being parsed will be collapsed into attributes, and in some cases paragraphs will be synthesized. When HTML elements have been converted to attributes, the attribute key will be of type HTML.Tag, and the value will be of type AttributeSet so that no information is lost. This enables many of the existing actions to work so that the user can type input, hit the return key, backspace, delete, etc and have a reasonable result. Selections can be created, and attributes applied or removed, etc. With this in mind, the work done by the reader can be categorized into the following kinds of tasks:

Block
Build the structure like it's specified in the stream. This produces elements that contain other elements.
Paragraph
Like block except that it's expected that the element will be used with a paragraph view so a paragraph element won't need to be synthesized.
Character
Contribute the element as an attribute that will start and stop at arbitrary text locations. This will ultimately be mixed into a run of text, with all of the currently flattened HTML character elements.
Special
Produce an embedded graphical element.
Form
Produce an element that is like the embedded graphical element, except that it also has a component model associated with it.
Hidden
Create an element that is hidden from view when the document is being viewed read-only, and visible when the document is being edited. This is useful to keep the model from losing information, and used to store things like comments and unrecognized tags.

Currently, <APPLET>, <PARAM>, <MAP>, <AREA>, <LINK>, <SCRIPT> and <STYLE> are unsupported.

The assignment of the actions described is shown in the following table for the tags defined in HTML.Tag.
HTML.Tag.A | CharacterAction
HTML.Tag.ADDRESS | CharacterAction
HTML.Tag.APPLET | HiddenAction
HTML.Tag.AREA | AreaAction
HTML.Tag.B | CharacterAction
HTML.Tag.BASE | BaseAction
HTML.Tag.BASEFONT | CharacterAction
HTML.Tag.BIG | CharacterAction
HTML.Tag.BLOCKQUOTE | BlockAction
HTML.Tag.BODY | BlockAction
HTML.Tag.BR | SpecialAction
HTML.Tag.CAPTION | BlockAction
HTML.Tag.CENTER | BlockAction
HTML.Tag.CITE | CharacterAction
HTML.Tag.CODE | CharacterAction
HTML.Tag.DD | BlockAction
HTML.Tag.DFN | CharacterAction
HTML.Tag.DIR | BlockAction
HTML.Tag.DIV | BlockAction
HTML.Tag.DL | BlockAction
HTML.Tag.DT | ParagraphAction
HTML.Tag.EM | CharacterAction
HTML.Tag.FONT | CharacterAction
HTML.Tag.FORM | CharacterAction
HTML.Tag.FRAME | SpecialAction
HTML.Tag.FRAMESET | BlockAction
HTML.Tag.H1 | ParagraphAction
HTML.Tag.H2 | ParagraphAction
HTML.Tag.H3 | ParagraphAction
HTML.Tag.H4 | ParagraphAction
HTML.Tag.H5 | ParagraphAction
HTML.Tag.H6 | ParagraphAction
HTML.Tag.HEAD | HeadAction
HTML.Tag.HR | SpecialAction
HTML.Tag.HTML | BlockAction
HTML.Tag.I | CharacterAction
HTML.Tag.IMG | SpecialAction
HTML.Tag.INPUT | FormAction
HTML.Tag.ISINDEX | IsndexAction
HTML.Tag.KBD | CharacterAction
HTML.Tag.LI | BlockAction
HTML.Tag.LINK | LinkAction
HTML.Tag.MAP | MapAction
HTML.Tag.MENU | BlockAction
HTML.Tag.META | MetaAction
HTML.Tag.NOFRAMES | BlockAction
HTML.Tag.OBJECT | SpecialAction
HTML.Tag.OL | BlockAction
HTML.Tag.OPTION | FormAction
HTML.Tag.P | ParagraphAction
HTML.Tag.PARAM | HiddenAction
HTML.Tag.PRE | PreAction
HTML.Tag.SAMP | CharacterAction
HTML.Tag.SCRIPT | HiddenAction
HTML.Tag.SELECT | FormAction
HTML.Tag.SMALL | CharacterAction
HTML.Tag.STRIKE | CharacterAction
HTML.Tag.S | CharacterAction
HTML.Tag.STRONG | CharacterAction
HTML.Tag.STYLE | StyleAction
HTML.Tag.SUB | CharacterAction
HTML.Tag.SUP | CharacterAction
HTML.Tag.TABLE | BlockAction
HTML.Tag.TD | BlockAction
HTML.Tag.TEXTAREA | FormAction
HTML.Tag.TH | BlockAction
HTML.Tag.TITLE | TitleAction
HTML.Tag.TR | BlockAction
HTML.Tag.TT | CharacterAction
HTML.Tag.U | CharacterAction
HTML.Tag.UL | BlockAction
HTML.Tag.VAR | CharacterAction

Inner Class Summary
class | HTMLDocument.HTMLReader.BlockAction
class | HTMLDocument.HTMLReader.CharacterAction
class | HTMLDocument.HTMLReader.FormAction Action to support forms by building all of the elements used to represent form controls.
class | HTMLDocument.HTMLReader.HiddenAction
class | HTMLDocument.HTMLReader.IsindexAction
class | HTMLDocument.HTMLReader.ParagraphAction
class | HTMLDocument.HTMLReader.PreAction
class | HTMLDocument.HTMLReader.SpecialAction
class | HTMLDocument.HTMLReader.TagAction An action to be performed in response to parsing a tag.
Field Summary
protected MutableAttributeSet | charAttr
protected Vector | parseBuffer
Fields inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback
IMPLIED
Constructor Summary
HTMLDocument.HTMLReader(int offset)
HTMLDocument.HTMLReader(int offset, int popDepth, int pushDepth, HTML.Tag insertTag)
Method Summary
protected void | addContent(char[] data, int offs, int length) Adds some text with the current character attributes.
protected void | addContent(char[] data, int offs, int length, boolean generateImpliedPIfNecessary) Adds some text with the current character attributes.
protected void | addSpecialElement(HTML.Tag t, MutableAttributeSet a) Adds content that is basically specified entirely in the attribute set.
protected void | blockClose(HTML.Tag t) Adds an instruction to the parse buffer to close out a block element of the given type.
protected void | blockOpen(HTML.Tag t, MutableAttributeSet attr) Adds an instruction to the parse buffer to create a block element with the given attributes.
void | flush() The last method called on the reader.
void | handleComment(char[] data, int pos)
void | handleEndOfLineString(String eol) This is invoked after the stream has been parsed, but before flush.
void | handleEndTag(HTML.Tag t, int pos) Callback from the parser.
void | handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
void | handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) Callback from the parser.
void | handleText(char[] data, int pos) Called by the parser to indicate a block of text was encountered.
protected void | popCharacterStyle() Pops a previously pushed character style off the stack to return to a previous style.
protected void | preContent(char[] data) Adds the given content that was encountered in a PRE element.
protected void | pushCharacterStyle() Pushes the current character style on a stack in preparation for forming a new nested character style.
protected void | registerTag(HTML.Tag t, HTMLDocument.HTMLReader.TagAction a) Registers a handler for the given tag.
protected void | textAreaContent(char[] data) Adds the given content to the textarea document.
Methods inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

parseBuffer

protected Vector parseBuffer

charAttr

protected MutableAttributeSet charAttr
Constructor Detail

HTMLDocument.HTMLReader

public HTMLDocument.HTMLReader(int offset)

HTMLDocument.HTMLReader

public HTMLDocument.HTMLReader(int offset,
                               int popDepth,
                               int pushDepth,
                               HTML.Tag insertTag)
Method Detail

flush

public void flush()
           throws BadLocationException
The last method called on the reader. It allows any pending changes to be flushed into the document. Since this is currently loading synchronously, the entire set of changes are pushed in at this point.
Overrides:
flush in class HTMLEditorKit.ParserCallback

handleText

public void handleText(char[] data,
                       int pos)
Called by the parser to indicate a block of text was encountered.
Overrides:
handleText in class HTMLEditorKit.ParserCallback

handleStartTag

public void handleStartTag(HTML.Tag t,
                           MutableAttributeSet a,
                           int pos)
Callback from the parser. Route to the appropriate handler for the tag.
Overrides:
handleStartTag in class HTMLEditorKit.ParserCallback

handleComment

public void handleComment(char[] data,
                          int pos)
Overrides:
handleComment in class HTMLEditorKit.ParserCallback

handleEndTag

public void handleEndTag(HTML.Tag t,
                         int pos)
Callback from the parser. Route to the appropriate handler for the tag.
Overrides:
handleEndTag in class HTMLEditorKit.ParserCallback

handleSimpleTag

public void handleSimpleTag(HTML.Tag t,
                            MutableAttributeSet a,
                            int pos)
Callback from the parser. Route to the appropriate handler for the tag.
Overrides:
handleSimpleTag in class HTMLEditorKit.ParserCallback

handleEndOfLineString

public void handleEndOfLineString(String eol)
This is invoked after the stream has been parsed, but before flush. eol will be one of \n, \r or \r\n, which ever is encountered the most in parsing the stream.
Overrides:
handleEndOfLineString in class HTMLEditorKit.ParserCallback
Since:
1.3

registerTag

protected void registerTag(HTML.Tag t,
                           HTMLDocument.HTMLReader.TagAction a)
Registers a handler for the given tag. By default all of the well-known tags will have been registered. This can be used to change the handling of a particular tag or to add support for custom tags.

pushCharacterStyle

protected void pushCharacterStyle()
Pushes the current character style on a stack in preparation for forming a new nested character style.

popCharacterStyle

protected void popCharacterStyle()
Pops a previously pushed character style off the stack to return to a previous style.

textAreaContent

protected void textAreaContent(char[] data)
Adds the given content to the textarea document. This method gets called when we are in a textarea context. Therefore all text that is seen belongs to the text area and is hence added to the TextAreaDocument associated with the text area.

preContent

protected void preContent(char[] data)
Adds the given content that was encountered in a PRE element. This synthesizes lines to hold the runs of text, and makes calls to addContent to actually add the text.

blockOpen

protected void blockOpen(HTML.Tag t,
                         MutableAttributeSet attr)
Adds an instruction to the parse buffer to create a block element with the given attributes.

blockClose

protected void blockClose(HTML.Tag t)
Adds an instruction to the parse buffer to close out a block element of the given type.

addContent

protected void addContent(char[] data,
                          int offs,
                          int length)
Adds some text with the current character attributes.
Parameters:
embedded - the attributes of an embedded object.

addContent

protected void addContent(char[] data,
                          int offs,
                          int length,
                          boolean generateImpliedPIfNecessary)
Adds some text with the current character attributes.
Parameters:
embedded - the attributes of an embedded object.

addSpecialElement

protected void addSpecialElement(HTML.Tag t,
                                 MutableAttributeSet a)
Adds content that is basically specified entirely in the attribute set.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLTextAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.HTMLTextAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.html.HTMLEditorKit.HTMLTextAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
HTMLEditorKit.InsertHTMLTextAction
Enclosing class:
HTMLEditorKit
public abstract static class HTMLEditorKit.HTMLTextAction
extends StyledEditorKit.StyledTextAction

An abstract Action providing some convenience methods that may be useful in inserting HTML into an existing document.

NOTE: None of the convenience methods obtain a lock on the document. If you have another thread modifying the text these methods may have inconsistant behavior, or return the wrong thing.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
HTMLEditorKit.HTMLTextAction(String name)
Method Summary
protected int | elementCountToTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag.
protected Element | findElementMatchingTag(HTMLDocument doc, int offset, HTML.Tag tag) Returns the deepest element at offset matching tag.
protected Element[] | getElementsAt(HTMLDocument doc, int offset) Returns an array of the Elements that contain offset.
protected HTMLDocument | getHTMLDocument(JEditorPane e)
protected HTMLEditorKit | getHTMLEditorKit(JEditorPane e)
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed

Constructor Detail

HTMLEditorKit.HTMLTextAction

public HTMLEditorKit.HTMLTextAction(String name)
Method Detail

getHTMLDocument

protected HTMLDocument getHTMLDocument(JEditorPane e)
Returns:
HTMLDocument of e.

getHTMLEditorKit

protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
Returns:
HTMLEditorKit for e.

getElementsAt

protected Element[] getElementsAt(HTMLDocument doc,
                                  int offset)
Returns an array of the Elements that contain offset. The first elements corresponds to the root.

elementCountToTag

protected int elementCountToTag(HTMLDocument doc,
                                int offset,
                                HTML.Tag tag)
Returns number of elements, starting at the deepest leaf, needed to get to an element representing tag. This will return -1 if no elements is found representing tag, or 0 if the parent of the leaf at offset represents tag.

findElementMatchingTag

protected Element findElementMatchingTag(HTMLDocument doc,
                                         int offset,
                                         HTML.Tag tag)
Returns the deepest element at offset matching tag.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLWriter

java.lang.Object
  |
  +--javax.swing.text.AbstractWriter
        |
        +--javax.swing.text.html.HTMLWriter
public class HTMLWriter
extends AbstractWriter

This is a writer for HTMLDocuments.

Fields inherited from class javax.swing.text.AbstractWriter
NEWLINE
Constructor Summary
HTMLWriter(Writer w, HTMLDocument doc)
Creates a new HTMLWriter.
HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)
Creates a new HTMLWriter.
Method Summary
protected void | closeOutUnwantedEmbeddedTags(AttributeSet attr) Searches the attribute set and for each tag that is stored in the tag vector.
protected void | comment(Element elem) Writes out comments.
protected void | emptyTag(Element elem) Writes out all empty elements (all tags that have no corresponding end tag).
protected void | endTag(Element elem) Writes out an end tag for the element.
protected boolean | isBlockTag(AttributeSet attr) Determines if the HTML.Tag associated with the element is a block tag.
protected boolean | matchNameAttribute(AttributeSet attr, HTML.Tag tag) Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.
protected void | output(char[] chars, int start, int length) This method is overriden to map any character entities, such as < to &lt;.
protected void | selectContent(AttributeSet attr) Writes out the content of the SELECT form element.
protected void | startTag(Element elem) Writes out a start tag for the element.
protected boolean | synthesizedElement(Element elem) Returns true if the element is a synthesized element.
protected void | text(Element elem) Writes out text.
protected void | textAreaContent(AttributeSet attr) Writes out text that is contained in a TEXTAREA form element.
void | write() Iterates over the Element tree and controls the writing out of all the tags and its attributes.
protected void | writeAttributes(AttributeSet attr) Writes out the attribute set.
protected void | writeEmbeddedTags(AttributeSet attr) Searches for embedded tags in the AttributeSet and writes them out.
protected void | writeLineSeparator() Writes the line separator.
protected void | writeOption(Option option) Writes out the content of the Option form element.
Methods inherited from class javax.swing.text.AbstractWriter
decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, indent, inRange, isLineEmpty, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLWriter

public HTMLWriter(Writer w,
                  HTMLDocument doc)
Creates a new HTMLWriter.
Parameters:
w - a Writer
doc - an HTMLDocument

HTMLWriter

public HTMLWriter(Writer w,
                  HTMLDocument doc,
                  int pos,
                  int len)
Creates a new HTMLWriter.
Parameters:
w - a Writer
doc - an HTMLDocument
pos - the document location from which to fetch the content
len - the amount to write out
Method Detail

write

public void write()
           throws IOException,
                  BadLocationException
Iterates over the Element tree and controls the writing out of all the tags and its attributes.
Overrides:
write in class AbstractWriter
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

writeAttributes

protected void writeAttributes(AttributeSet attr)
                        throws IOException
Writes out the attribute set. Ignores all attributes with a key of type HTML.Tag, attributes with a key of type StyleConstants, and attributes with a key of type HTML.Attribute.ENDTAG.
Overrides:
writeAttributes in class AbstractWriter
Parameters:
attr - an AttributeSet
Throws:
IOException - on any I/O error

emptyTag

protected void emptyTag(Element elem)
                 throws BadLocationException,
                        IOException
Writes out all empty elements (all tags that have no corresponding end tag).
Parameters:
elem - an Element
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

isBlockTag

protected boolean isBlockTag(AttributeSet attr)
Determines if the HTML.Tag associated with the element is a block tag.
Parameters:
attr - an AttributeSet
Returns:
true if tag is block tag, false otherwise.

startTag

protected void startTag(Element elem)
                 throws IOException,
                        BadLocationException
Writes out a start tag for the element. Ignores all synthesized elements.
Parameters:
elem - an Element
Throws:
IOException - on any I/O error

textAreaContent

protected void textAreaContent(AttributeSet attr)
                        throws BadLocationException,
                               IOException
Writes out text that is contained in a TEXTAREA form element.
Parameters:
attr - an AttributeSet
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

text

protected void text(Element elem)
             throws BadLocationException,
                    IOException
Writes out text. If a range is specified when the constructor is invoked, then only the appropriate range of text is written out.
Overrides:
text in class AbstractWriter
Parameters:
elem - an Element
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

selectContent

protected void selectContent(AttributeSet attr)
                      throws IOException
Writes out the content of the SELECT form element.
Parameters:
attr - the AttributeSet associated with the form element
Throws:
IOException - on any I/O error

writeOption

protected void writeOption(Option option)
                    throws IOException
Writes out the content of the Option form element.
Parameters:
option - an Option
Throws:
IOException - on any I/O error

endTag

protected void endTag(Element elem)
               throws IOException
Writes out an end tag for the element.
Parameters:
elem - an Element
Throws:
IOException - on any I/O error

comment

protected void comment(Element elem)
                throws BadLocationException,
                       IOException
Writes out comments.
Parameters:
elem - an Element
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

synthesizedElement

protected boolean synthesizedElement(Element elem)
Returns true if the element is a synthesized element. Currently we are only testing for the p-implied tag.

matchNameAttribute

protected boolean matchNameAttribute(AttributeSet attr,
                                     HTML.Tag tag)
Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.

writeEmbeddedTags

protected void writeEmbeddedTags(AttributeSet attr)
                          throws IOException
Searches for embedded tags in the AttributeSet and writes them out. It also stores these tags in a vector so that when appropriate the corresponding end tags can be written out.
Throws:
IOException - on any I/O error

closeOutUnwantedEmbeddedTags

protected void closeOutUnwantedEmbeddedTags(AttributeSet attr)
                                     throws IOException
Searches the attribute set and for each tag that is stored in the tag vector. If the tag isnt found, then the tag is removed from the vector and a corresponding end tag is written out.
Throws:
IOException - on any I/O error

writeLineSeparator

protected void writeLineSeparator()
                           throws IOException
Writes the line separator. This is overriden to make sure we don't replace the newline content in case it is outside normal ascii.
Overrides:
writeLineSeparator in class AbstractWriter

output

protected void output(char[] chars,
                      int start,
                      int length)
               throws IOException
This method is overriden to map any character entities, such as < to &lt;. super.output will be invoked to write the content.
Overrides:
output in class AbstractWriter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InlineView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class InlineView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.GlyphView
              |
              +--javax.swing.text.LabelView
                    |
                    +--javax.swing.text.html.InlineView
All Implemented Interfaces:
Cloneable, SwingConstants, TabableView
public class InlineView
extends LabelView

Displays the inline element styles based upon css attributes.

Inner classes inherited from class javax.swing.text.GlyphView
GlyphView.GlyphPainter
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
InlineView(Element elem)
Constructs a new view wrapped on an element.
Method Summary
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
AttributeSet | getAttributes() Fetches the attributes to use when rendering.
int | getBreakWeight(int axis, float pos, float len) Determines how attractive a break opportunity in this view is.
protected StyleSheet | getStyleSheet()
protected void | setPropertiesFromAttributes() Set the cached properties from the attributes.
Methods inherited from class javax.swing.text.LabelView
getBackground, getFont, getFontMetrics, getForeground, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setStrikeThrough, setSubscript, setSuperscript, setUnderline
Methods inherited from class javax.swing.text.GlyphView
breakView, checkPainter, clone, createFragment, getAlignment, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, insertUpdate, modelToView, paint, removeUpdate, setGlyphPainter, viewToModel
Methods inherited from class javax.swing.text.View
append, forwardUpdate, forwardUpdateToView, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.TabableView
getPartialSpan, getTabbedSpan

Constructor Detail

InlineView

public InlineView(Element elem)
Constructs a new view wrapped on an element.
Parameters:
elem - the element
Method Detail

changedUpdate

public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class LabelView
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

getAttributes

public AttributeSet getAttributes()
Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet.
Overrides:
getAttributes in class View

getBreakWeight

public int getBreakWeight(int axis,
                          float pos,
                          float len)
Determines how attractive a break opportunity in this view is. This can be used for determining which view is the most attractive to call breakView on in the process of formatting. A view that represents text that has whitespace in it might be more attractive than a view that has no whitespace, for example. The higher the weight, the more attractive the break. A value equal to or lower than BadBreakWeight should not be considered for a break. A value greater than or equal to ForcedBreakWeight should be broken.

This is implemented to provide the default behavior of returning BadBreakWeight unless the length is greater than the length of the view in which case the entire view represents the fragment. Unless a view has been written to support breaking behavior, it is not attractive to try and break the view. An example of a view that does support breaking is LabelView. An example of a view that uses break weight is ParagraphView.

Overrides:
getBreakWeight in class GlyphView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
pos - the potential location of the start of the broken view >= 0. This may be useful for calculating tab positions.
len - specifies the relative length from pos where a potential break is desired >= 0.
Returns:
the weight, which should be a value between ForcedBreakWeight and BadBreakWeight.
See Also:
LabelView, ParagraphView, View.BadBreakWeight, View.GoodBreakWeight, View.ExcellentBreakWeight, View.ForcedBreakWeight

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Set the cached properties from the attributes.
Overrides:
setPropertiesFromAttributes in class LabelView

getStyleSheet

protected StyleSheet getStyleSheet()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsertHTMLTextAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.InsertHTMLTextAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.html.HTMLEditorKit.HTMLTextAction
                          |
                          +--javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
HTMLEditorKit
public static class HTMLEditorKit.InsertHTMLTextAction
extends HTMLEditorKit.HTMLTextAction

InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document. At least two HTML.Tags need to be supplied. The first Tag, parentTag, identifies the parent in the document to add the elements to. The second tag, addTag, identifies the first tag that should be added to the document as seen in the HTML string. One important thing to remember, is that the parser is going to generate all the appropriate tags, even if they aren't in the HTML string passed in.

For example, lets say you wanted to create an action to insert a table into the body. The parentTag would be HTML.Tag.BODY, addTag would be HTML.Tag.TABLE, and the string could be something like <table><tr><td></td></tr></table>.

There is also an option to supply an alternate parentTag and addTag. These will be checked for if there is no parentTag at offset.

See Also:
Serialized Form

Field Summary
protected HTML.Tag | addTag Tag in HTML to start adding tags from.
protected HTML.Tag | alternateAddTag Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.
protected HTML.Tag | alternateParentTag Alternate Tag to check for in the document if parentTag is not found.
protected String | html HTML to insert.
protected HTML.Tag | parentTag Tag to check for in the document.
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag)
HTMLEditorKit.InsertHTMLTextAction(String name, String html, HTML.Tag parentTag, HTML.Tag addTag, HTML.Tag alternateParentTag, HTML.Tag alternateAddTag)
Method Summary
void | actionPerformed(ActionEvent ae) Inserts the HTML into the document.
protected void | insertAtBoundary(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) This is invoked when inserting at a boundary.
protected void | insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag) Deprecated. As of Java 2 platform v1.3, use insertAtBoundary
protected void | insertHTML(JEditorPane editor, HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag addTag) A cover for HTMLEditorKit.insertHTML.
Methods inherited from class javax.swing.text.html.HTMLEditorKit.HTMLTextAction
elementCountToTag, findElementMatchingTag, getElementsAt, getHTMLDocument, getHTMLEditorKit
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

html

protected String html
HTML to insert.

parentTag

protected HTML.Tag parentTag
Tag to check for in the document.

addTag

protected HTML.Tag addTag
Tag in HTML to start adding tags from.

alternateParentTag

protected HTML.Tag alternateParentTag
Alternate Tag to check for in the document if parentTag is not found.

alternateAddTag

protected HTML.Tag alternateAddTag
Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.
Constructor Detail

HTMLEditorKit.InsertHTMLTextAction

public HTMLEditorKit.InsertHTMLTextAction(String name,
                                          String html,
                                          HTML.Tag parentTag,
                                          HTML.Tag addTag)

HTMLEditorKit.InsertHTMLTextAction

public HTMLEditorKit.InsertHTMLTextAction(String name,
                                          String html,
                                          HTML.Tag parentTag,
                                          HTML.Tag addTag,
                                          HTML.Tag alternateParentTag,
                                          HTML.Tag alternateAddTag)
Method Detail

insertHTML

protected void insertHTML(JEditorPane editor,
                          HTMLDocument doc,
                          int offset,
                          String html,
                          int popDepth,
                          int pushDepth,
                          HTML.Tag addTag)
A cover for HTMLEditorKit.insertHTML. If an exception it thrown it is wrapped in a RuntimeException and thrown.

insertAtBoundary

protected void insertAtBoundary(JEditorPane editor,
                                HTMLDocument doc,
                                int offset,
                                Element insertElement,
                                String html,
                                HTML.Tag parentTag,
                                HTML.Tag addTag)
This is invoked when inserting at a boundary. It determines the number of pops, and then the number of pushes that need to be performed, and then invokes insertHTML.
Since:
1.3

insertAtBoundry

protected void insertAtBoundry(JEditorPane editor,
                               HTMLDocument doc,
                               int offset,
                               Element insertElement,
                               String html,
                               HTML.Tag parentTag,
                               HTML.Tag addTag)
Deprecated. As of Java 2 platform v1.3, use insertAtBoundary

This is invoked when inserting at a boundary. It determines the number of pops, and then the number of pushes that need to be performed, and then invokes insertHTML.

actionPerformed

public void actionPerformed(ActionEvent ae)
Inserts the HTML into the document.
Parameters:
ae - the event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IsindexAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.IsindexAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.IsindexAction
extends HTMLDocument.HTMLReader.TagAction

Constructor Summary
HTMLDocument.HTMLReader.IsindexAction()
Method Summary
 void start(HTML.Tag t, MutableAttributeSet a)
Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
end
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.IsindexAction

public HTMLDocument.HTMLReader.IsindexAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet a)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Iterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.Iterator

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.Iterator
Enclosing class:
HTMLDocument
public abstract static class HTMLDocument.Iterator
extends Object

An iterator to iterate over a particular type of tag. The iterator is not thread safe. If reliable access to the document is not already ensured by the context under which the iterator is being used, its use should be performed under the protection of Document.render.

Constructor Summary
HTMLDocument.Iterator()
Method Summary
abstract AttributeSet | getAttributes() Fetch the attributes for this tag.
abstract int | getEndOffset() End of the range for which the current occurence of the tag is defined and has the same attributes.
abstract int | getStartOffset() Start of the range for which the current occurence of the tag is defined and has the same attributes.
abstract HTML.Tag | getTag() Type of tag this iterator represents.
abstract boolean | isValid() Indicates if the iterator is currently representing an occurence of a tag.
abstract void | next() Move the iterator forward to the next occurence of the tag it represents.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.Iterator

public HTMLDocument.Iterator()
Method Detail

getAttributes

public abstract AttributeSet getAttributes()
Fetch the attributes for this tag.

getStartOffset

public abstract int getStartOffset()
Start of the range for which the current occurence of the tag is defined and has the same attributes.

getEndOffset

public abstract int getEndOffset()
End of the range for which the current occurence of the tag is defined and has the same attributes.

next

public abstract void next()
Move the iterator forward to the next occurence of the tag it represents.

isValid

public abstract boolean isValid()
Indicates if the iterator is currently representing an occurence of a tag. If false there are no more tags for this iterator.

getTag

public abstract HTML.Tag getTag()
Type of tag this iterator represents.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LinkController

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.LinkController

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.text.html.HTMLEditorKit.LinkController
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener, Serializable
Enclosing class:
HTMLEditorKit
public static class HTMLEditorKit.LinkController
extends MouseAdapter
implements MouseMotionListener, Serializable

Class to watch the associated component and fire hyperlink events on it when appropriate.

See Also:
Serialized Form

Constructor Summary
HTMLEditorKit.LinkController()
Method Summary
protected void | activateLink(int pos, JEditorPane editor) Calls linkActivated on the associated JEditorPane if the given position represents a link.
void | mouseClicked(MouseEvent e) Called for a mouse click event.
void | mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseMoved(MouseEvent e) Invoked when the mouse button has been moved on a component (with no buttons no down).
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLEditorKit.LinkController

public HTMLEditorKit.LinkController()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Called for a mouse click event. If the component is read-only (ie a browser) then the clicked event is used to drive an attempt to follow the reference specified by a link.
Overrides:
mouseClicked in class MouseAdapter
Parameters:
e - the mouse event
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener

activateLink

protected void activateLink(int pos,
                            JEditorPane editor)
Calls linkActivated on the associated JEditorPane if the given position represents a link.

This is implemented to forward to the method with the same name, but with the following args both == -1.

Parameters:
pos - the position
html - the editor pane
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListPainter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class StyleSheet.ListPainter

java.lang.Object
  |
  +--javax.swing.text.html.StyleSheet.ListPainter
All Implemented Interfaces:
Serializable
Enclosing class:
StyleSheet
public static class StyleSheet.ListPainter
extends Object
implements Serializable

Class to carry out some of the duties of CSS list formatting. Implementations of this class enable views to present the CSS formatting while not knowing anything about how the CSS values are being cached.

See Also:
Serialized Form

Method Summary
 void paint(Graphics g, float x, float y, float w, float h, View v, int item)
Paints the CSS list decoration according to the attributes given.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

paint

public void paint(Graphics g,
                  float x,
                  float y,
                  float w,
                  float h,
                  View v,
                  int item)
Paints the CSS list decoration according to the attributes given.
Parameters:
g - the rendering surface.
x - the x coordinate of the list item allocation
y - the y coordinate of the list item allocation
w - the width of the list item allocation
h - the height of the list item allocation
s - the allocated area to paint into.
item - which list item is being painted. This is a number greater than or equal to 0.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ListView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class ListView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.html.BlockView
                          |
                          +--javax.swing.text.html.ListView
All Implemented Interfaces:
SwingConstants
public class ListView
extends BlockView

A view implementation to display an html list

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ListView(Element elem)
Creates a new view that represents a list element.
Method Summary
 float getAlignment(int axis)
Calculates the desired shape of the list.
 void paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.
protected  void paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint().
protected  void setPropertiesFromAttributes()
Update any cached values that come from attributes.
Methods inherited from class javax.swing.text.html.BlockView
calculateMajorAxisRequirements, calculateMinorAxisRequirements, changedUpdate, getAttributes, getResizeWeight, getStyleSheet, layoutMinorAxis, setParent
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, modelToView, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ListView

public ListView(Element elem)
Creates a new view that represents a list element.
Parameters:
elem - the element to create a view for
Method Detail

getAlignment

public float getAlignment(int axis)
Calculates the desired shape of the list.
Overrides:
getAlignment in class BlockView
Returns:
the desired span
See Also:
View.getPreferredSpan(int)

paint

public void paint(Graphics g,
                  Shape allocation)
Renders using the given rendering surface and area on that surface.
Overrides:
paint in class BlockView
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

paintChild

protected void paintChild(Graphics g,
                          Rectangle alloc,
                          int index)
Paints one of the children; called by paint(). By default that is all it does, but a subclass can use this to paint things relative to the child.
Overrides:
paintChild in class BoxView
Parameters:
g - the graphics context
alloc - the allocated region to render the child into
index - the index of the child

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Description copied from class: BlockView
Update any cached values that come from attributes.
Overrides:
setPropertiesFromAttributes in class BlockView
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MinimalHTMLWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class MinimalHTMLWriter

java.lang.Object
  |
  +--javax.swing.text.AbstractWriter
        |
        +--javax.swing.text.html.MinimalHTMLWriter
public class MinimalHTMLWriter
extends AbstractWriter

MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit. The format for the document is:

 <html>
   <head>
     <style>
        <!-- list of named styles
         p.normal {
            font-family: SansSerif;
          margin-height: 0;
          font-size: 14
       }
        -->
      </style>
   </head>
   <body>
    <p style=normal>
        Bold, italic, and underline attributes
        of the run are emitted as HTML tags.
        The remaining attributes are emitted as
        part of the style attribute of a <span> tag.
        The syntax is similar to inline styles.
    </p>
   </body>
 </html>

Fields inherited from class javax.swing.text.AbstractWriter
NEWLINE
Constructor Summary
MinimalHTMLWriter(Writer w, StyledDocument doc)
Creates a new MinimalHTMLWriter.
MinimalHTMLWriter(Writer w, StyledDocument doc, int pos, int len)
Creates a new MinimalHTMLWriter.
Method Summary
protected  void endFontTag()
This is no longer used, instead <span> will be written out.
protected  boolean inFontTag()
Returns true if we are currently in a <font> tag.
protected  boolean isText(Element elem)
Returns true if the element is a text element.
protected  void startFontTag(String style)
This is no longer used, instead <span> will be written out.
protected  void text(Element elem)
Writes out text.
 void write()
Generates HTML output from a StyledDocument.
protected  void writeAttributes(AttributeSet attr)
Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.
protected  void writeBody()
Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
protected  void writeComponent(Element elem)
Responsible for handling Component Elements; deliberately unimplemented.
protected  void writeContent(Element elem, boolean needsIndenting)
Writes out the attribute set in an HTML-compliant manner.
protected  void writeEndParagraph()
Emits an end tag for a <p> tag.
protected  void writeEndTag(String endTag)
Writes out an end tag appropriately indented.
protected  void writeHeader()
Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag.
protected  void writeHTMLTags(AttributeSet attr)
Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
protected  void writeImage(Element elem)
Responsible for handling Icon Elements; deliberately unimplemented.
protected  void writeLeaf(Element elem)
Responsible for writing out other non-text leaf elements.
protected  void writeNonHTMLAttributes(AttributeSet attr)
Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.
protected  void writeStartParagraph(Element elem)
Emits the start tag for a paragraph.
protected  void writeStartTag(String tag)
Writes out a start tag appropriately indented.
protected  void writeStyles()
Writes out all the named styles as the content of the <style> tag.
Methods inherited from class javax.swing.text.AbstractWriter
decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, indent, inRange, isLineEmpty, output, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write, write, writeLineSeparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MinimalHTMLWriter

public MinimalHTMLWriter(Writer w,
                         StyledDocument doc)
Creates a new MinimalHTMLWriter.
Parameters:
w - Writer
doc - StyledDocument

MinimalHTMLWriter

public MinimalHTMLWriter(Writer w,
                         StyledDocument doc,
                         int pos,
                         int len)
Creates a new MinimalHTMLWriter.
Parameters:
w - Writer
doc - StyledDocument
pos - The location in the document to fetch the content.
len - The amount to write out.
Method Detail

write

public void write()
           throws IOException,
                  BadLocationException
Generates HTML output from a StyledDocument.
Overrides:
write in class AbstractWriter
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

writeAttributes

protected void writeAttributes(AttributeSet attr)
                        throws IOException
Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants. The attribute name and value are separated by a colon. Each pair is separated by a semicolon.
Overrides:
writeAttributes in class AbstractWriter
Throws:
IOException - on any I/O error

text

protected void text(Element elem)
             throws IOException,
                    BadLocationException
Writes out text.
Overrides:
text in class AbstractWriter
Throws:
IOException - on any I/O error

writeStartTag

protected void writeStartTag(String tag)
                      throws IOException
Writes out a start tag appropriately indented. Also increments the indent level.
Throws:
IOException - on any I/O error

writeEndTag

protected void writeEndTag(String endTag)
                    throws IOException
Writes out an end tag appropriately indented. Also decrements the indent level.
Throws:
IOException - on any I/O error

writeHeader

protected void writeHeader()
                    throws IOException
Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag. The content is surrounded by valid HTML comment markers to ensure that the document is viewable in applications/browsers that do not support the tag.
Throws:
IOException - on any I/O error

writeStyles

protected void writeStyles()
                    throws IOException
Writes out all the named styles as the content of the <style> tag.
Throws:
IOException - on any I/O error

writeBody

protected void writeBody()
                  throws IOException,
                         BadLocationException
Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements. This method specially handles leaf elements that are text.
Throws:
IOException - on any I/O error

writeEndParagraph

protected void writeEndParagraph()
                          throws IOException
Emits an end tag for a <p> tag. Before writing out the tag, this method ensures that all other tags that have been opened are appropriately closed off.
Throws:
IOException - on any I/O error

writeStartParagraph

protected void writeStartParagraph(Element elem)
                            throws IOException
Emits the start tag for a paragraph. If the paragraph has a named style associated with it, then this method also generates a class attribute for the <p> tag and sets its value to be the name of the style.
Throws:
IOException - on any I/O error

writeLeaf

protected void writeLeaf(Element elem)
                  throws IOException
Responsible for writing out other non-text leaf elements.
Throws:
IOException - on any I/O error

writeImage

protected void writeImage(Element elem)
                   throws IOException
Responsible for handling Icon Elements; deliberately unimplemented. How to implement this method is an issue of policy. For example, if you're generating an <img> tag, how should you represent the src attribute (the location of the image)? In certain cases it could be a URL, in others it could be read from a stream.
Parameters:
elem - element of type StyleConstants.IconElementName

writeComponent

protected void writeComponent(Element elem)
                       throws IOException
Responsible for handling Component Elements; deliberately unimplemented. How this method is implemented is a matter of policy.

isText

protected boolean isText(Element elem)
Returns true if the element is a text element.

writeContent

protected void writeContent(Element elem,
                            boolean needsIndenting)
                     throws IOException,
                            BadLocationException
Writes out the attribute set in an HTML-compliant manner.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

writeHTMLTags

protected void writeHTMLTags(AttributeSet attr)
                      throws IOException
Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
Throws:
IOException - on any I/O error

writeNonHTMLAttributes

protected void writeNonHTMLAttributes(AttributeSet attr)
                               throws IOException
Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way. Given that attributes such as font family and font size have no direct mapping to HTML tags, a <span> tag is generated and its style attribute is set to contain the list of remaining attributes just like inline styles.
Throws:
IOException - on any I/O error

inFontTag

protected boolean inFontTag()
Returns true if we are currently in a <font> tag.

endFontTag

protected void endFontTag()
                   throws IOException
This is no longer used, instead <span> will be written out.

Writes out an end tag for the <font> tag.

Throws:
IOException - on any I/O error

startFontTag

protected void startFontTag(String style)
                     throws IOException
This is no longer used, instead <span> will be written out.

Writes out a start tag for the <font> tag. Because font tags cannot be nested, this method closes out any enclosing font tag before writing out a new start tag.

Throws:
IOException - on any I/O error
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MouseEventListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class FormView.MouseEventListener

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.text.html.FormView.MouseEventListener
All Implemented Interfaces:
EventListener, MouseListener
Enclosing class:
FormView
protected class FormView.MouseEventListener
extends MouseAdapter

MouseEventListener class to handle form submissions when an input with type equal to image is clicked on. A MouseListener is necessary since along with the image data the coordinates associated with the mouse click need to be submitted.

Constructor Summary
protected FormView.MouseEventListener()
Method Summary
 void mouseReleased(MouseEvent evt)
Invoked when a mouse button has been released on a component.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FormView.MouseEventListener

protected FormView.MouseEventListener()
Method Detail

mouseReleased

public void mouseReleased(MouseEvent evt)
Description copied from class: MouseAdapter
Invoked when a mouse button has been released on a component.
Overrides:
mouseReleased in class MouseAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class ObjectView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.ComponentView
              |
              +--javax.swing.text.html.ObjectView
All Implemented Interfaces:
SwingConstants
public class ObjectView
extends ComponentView

Component decorator that implements the view interface for <object> elements.

This view will try to load the class specified by the classid attribute. If possible, the Classloader used to load the associated Document is used. This would typically be the same as the ClassLoader used to load the EditorKit. If the documents ClassLoader is null, Class.forName is used.

If the class can successfully be loaded, an attempt will be made to create an instance of it by calling Class.newInstance. An attempt will be made to narrow the instance to type java.awt.Component to display the object.

This view can also manage a set of parameters with limitations. The parameters to the <object> element are expected to be present on the associated elements attribute set as simple strings. Each bean property will be queried as a key on the AttributeSet, with the expectation that a non-null value (of type String) will be present if there was a parameter specification for the property. Reflection is used to set the parameter. Currently, this is limited to a very simple single parameter of type String.

A simple example html invocation is:

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ObjectView(Element elem)
Creates a new ObjectView object.
Method Summary
protected  Component createComponent()
Create the component.
Methods inherited from class javax.swing.text.ComponentView
getAlignment, getComponent, getMaximumSpan, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, setSize, viewToModel
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ObjectView

public ObjectView(Element elem)
Creates a new ObjectView object.
Parameters:
elem - the element to decorate
Method Detail

createComponent

protected Component createComponent()
Create the component. The classid is used as a specification of the classname, which we try to load.
Overrides:
createComponent in class ComponentView
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Option

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class Option

java.lang.Object
  |
  +--javax.swing.text.html.Option
public class Option
extends Object

Value for the ListModel used to represent <option> elements. This is the object installed as items of the DefaultComboBoxModel used to represent the <select> element.

Constructor Summary
Option(AttributeSet attr)
Creates a new Option object.
Method Summary
AttributeSet | getAttributes() Fetch the attributes associated with this option.
String | getLabel() Fetch the label associated with the option.
String | getValue() Convenience method to return the string associated with the value attribute.
boolean | isSelected() Fetches the selection state associated with this option.
void | setLabel(String label) Sets the label to be used for the option.
protected void | setSelection(boolean state) Sets the selected state.
String | toString() String representation is the label.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Option

public Option(AttributeSet attr)
Creates a new Option object.
Parameters:
attr - the attributes associated with the option element. The attributes are copied to ensure they won't change.
Method Detail

setLabel

public void setLabel(String label)
Sets the label to be used for the option.

getLabel

public String getLabel()
Fetch the label associated with the option.

getAttributes

public AttributeSet getAttributes()
Fetch the attributes associated with this option.

toString

public String toString()
String representation is the label.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

setSelection

protected void setSelection(boolean state)
Sets the selected state.

isSelected

public boolean isSelected()
Fetches the selection state associated with this option.

getValue

public String getValue()
Convenience method to return the string associated with the value attribute. If the value has not been specified, the label will be returned.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParagraphAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.ParagraphAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
              |
              +--javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.ParagraphAction
extends HTMLDocument.HTMLReader.BlockAction

Constructor Summary
HTMLDocument.HTMLReader.ParagraphAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet a) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.ParagraphAction

public HTMLDocument.HTMLReader.ParagraphAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet a)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.BlockAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.BlockAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParagraphView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class ParagraphView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.FlowView
                          |
                          +--javax.swing.text.ParagraphView
                                |
                                +--javax.swing.text.html.ParagraphView
All Implemented Interfaces:
SwingConstants, TabExpander
public class ParagraphView
extends ParagraphView

Displays the a paragraph, and uses css attributes for its configuration.

Inner classes inherited from class javax.swing.text.FlowView
FlowView.FlowStrategy
Fields inherited from class javax.swing.text.ParagraphView
firstLineIndent
Fields inherited from class javax.swing.text.FlowView
layoutPool, layoutSpan, strategy
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
Method Summary
protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the needs for the paragraph along the minor axis.
AttributeSet | getAttributes() Fetches the attributes to use when rendering.
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
float | getPreferredSpan(int axis) Determines the preferred span for this view.
protected StyleSheet | getStyleSheet()
boolean | isVisible() Indicates whether or not this view should be displayed.
void | paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | setParent(View parent) Establishes the parent view for this view.
protected void | setPropertiesFromAttributes() Sets up the paragraph from css attributes instead of the values found in StyleConstants (i.e.
Methods inherited from class javax.swing.text.ParagraphView
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowSpan, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, setFirstLineIndent, setJustification, setLineSpacing
Methods inherited from class javax.swing.text.FlowView
getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParagraphView

public ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
Parameters:
elem - the element that this view is responsible for
Method Detail

setParent

public void setParent(View parent)
Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly.

This is implemented to forward to the superclass as well as call the setPropertiesFromAttributes method to set the paragraph properties from the css attributes. The call is made at this time to ensure the ability to resolve upward through the parents view attributes.

Overrides:
setParent in class CompositeView
Parameters:
parent - the new parent, or null if the view is being removed from a parent it was previously added to

getAttributes

public AttributeSet getAttributes()
Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet.
Overrides:
getAttributes in class View

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Sets up the paragraph from css attributes instead of the values found in StyleConstants (i.e. which are used by the superclass). Since
Overrides:
setPropertiesFromAttributes in class ParagraphView

getStyleSheet

protected StyleSheet getStyleSheet()

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)
Calculate the needs for the paragraph along the minor axis. This implemented to use the requirements of the superclass, modified slightly to set a minimum span allowed. Typical html rendering doesn't let the view size shrink smaller than the length of the longest word.
Overrides:
calculateMinorAxisRequirements in class FlowView

isVisible

public boolean isVisible()
Indicates whether or not this view should be displayed. If none of the children wish to be displayed and the only visible child is the break that ends the paragraph, the paragraph will not be considered visible. Otherwise, it will be considered visible and return true.
Overrides:
isVisible in class View
Following copied from class: javax.swing.text.View
Returns:
boolean value.

paint

public void paint(Graphics g,
                  Shape a)
Renders using the given rendering surface and area on that surface. This is implemented to delgate to the superclass after stashing the base coordinate for tab calculations.
Overrides:
paint in class ParagraphView
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view. Returns 0 if the view is not visible, otherwise it calls the superclass method to get the preferred span. axis.
Overrides:
getPreferredSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
BoxView.getPreferredSpan(int)

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. Returns 0 if the view is not visible, otherwise it calls the superclass method to get the minimum span.
Overrides:
getMinimumSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
BoxView.getMinimumSpan(int)

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. Returns 0 if the view is not visible, otherwise it calls the superclass method ot get the maximum span.
Overrides:
getMaximumSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
BoxView.getMaximumSpan(int)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Parser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.Parser

java.lang.Object
  |
  +--javax.swing.text.html.HTMLEditorKit.Parser
Direct Known Subclasses:
ParserDelegator
Enclosing class:
HTMLEditorKit
public abstract static class HTMLEditorKit.Parser
extends Object

Interface to be supported by the parser. This enables providing a different parser while reusing some of the implementation provided by this editor kit.

Constructor Summary
HTMLEditorKit.Parser()
Method Summary
abstract  void parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
Parse the given stream and drive the given callback with the results of the parse.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLEditorKit.Parser

public HTMLEditorKit.Parser()
Method Detail

parse

public abstract void parse(Reader r,
                           HTMLEditorKit.ParserCallback cb,
                           boolean ignoreCharSet)
                    throws IOException
Parse the given stream and drive the given callback with the results of the parse. This method should be implemented to be thread-safe.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.text.html.parser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.text.html.parser

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.text.html.parser.AttributeList (implements javax.swing.text.html.parser.DTDConstants, java.io.Serializable)
    • class javax.swing.text.html.parser.ContentModel (implements java.io.Serializable)
    • class javax.swing.text.html.parser.DTD (implements javax.swing.text.html.parser.DTDConstants)
    • class javax.swing.text.html.parser.Element (implements javax.swing.text.html.parser.DTDConstants, java.io.Serializable)
    • class javax.swing.text.html.parser.Entity (implements javax.swing.text.html.parser.DTDConstants)
    • class javax.swing.text.html.HTMLEditorKit.Parser
      • class javax.swing.text.html.parser.ParserDelegator (implements java.io.Serializable)
    • class javax.swing.text.html.parser.Parser (implements javax.swing.text.html.parser.DTDConstants)
      • class javax.swing.text.html.parser.DocumentParser
    • class javax.swing.text.html.parser.TagElement

Interface Hierarchy

  • interface javax.swing.text.html.parser.DTDConstants
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.text.html.parser

Provides the default HTML parser, along with support classes.

See:
Description

Interface Summary
DTDConstants SGML constants used in a DTD.

Class Summary
AttributeList | This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
ContentModel | A representation of a content model.
DocumentParser | A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing).
DTD | The representation of an SGML DTD.
Element | An element as described in a DTD using the ELEMENT construct.
Entity | An entity in as described in a DTD using the ENTITY construct.
Parser | A simple DTD-driven HTML parser.
ParserDelegator | Responsible for starting up a new DocumentParser each time its parse method is invoked.
TagElement | A generic HTML TagElement class.

Package javax.swing.text.html.parser Description

Provides the default HTML parser, along with support classes. As the stream is parsed, the parser notifies a delegate, which must implement the HTMLEditorKit.ParserCallback interface.

Since:
1.2
See Also:
HTMLEditorKit.ParserCallback
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.text.html.parser

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.text.html.parser

Packages that use javax.swing.text.html.parser
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Classes in javax.swing.text.html.parser used by javax.swing.text.html.parser
AttributeList
This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
ContentModel
A representation of a content model.
DTD
The representation of an SGML DTD.
DTDConstants
SGML constants used in a DTD.
Element
An element as described in a DTD using the ELEMENT construct.
Entity
An entity in as described in a DTD using the ENTITY construct.
Parser
A simple DTD-driven HTML parser.
TagElement
A generic HTML TagElement class.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AttributeList

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class AttributeList

java.lang.Object
  |
  +--javax.swing.text.html.parser.AttributeList
All Implemented Interfaces:
DTDConstants, Serializable
public final class AttributeList
extends Object
implements DTDConstants, Serializable

This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct. An AttributeList can be obtained from the Element class using the getAttributes() method.

It is actually an element in a linked list. Use the getNext() method repeatedly to enumerate all the attributes of an element.

See Also:
Element, Serialized Form

Field Summary
int | modifier
String | name
AttributeList | next
int | type
String | value
Vector | values
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Constructor Summary
AttributeList(String name)
Create an attribute list element.
AttributeList(String name, int type, int modifier, String value, Vector values, AttributeList next)
Create an attribute list element.
Method Summary
int | getModifier()
String | getName()
AttributeList | getNext()
int | getType()
String | getValue()
Enumeration | getValues()
static int | name2type(String nm)
String | toString() Returns a string representation of the object.
static String | type2name(int tp)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

name

public String name

type

public int type

values

public Vector values

modifier

public int modifier

value

public String value

next

public AttributeList next
Constructor Detail

AttributeList

public AttributeList(String name)
Create an attribute list element.

AttributeList

public AttributeList(String name,
                     int type,
                     int modifier,
                     String value,
                     Vector values,
                     AttributeList next)
Create an attribute list element.
Method Detail

getName

public String getName()
Returns:
attribute name

getType

public int getType()
Returns:
attribute type
See Also:
DTDConstants

getModifier

public int getModifier()
Returns:
attribute modifer
See Also:
DTDConstants

getValues

public Enumeration getValues()
Returns:
possible attribute values

getValue

public String getValue()
Returns:
default attribute value

getNext

public AttributeList getNext()
Returns:
the next attribute in the list

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Returns:
string representation

name2type

public static int name2type(String nm)

type2name

public static String type2name(int tp)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.text.html.parser.DocumentParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.DocumentParser

No usage of javax.swing.text.html.parser.DocumentParser

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.ParserDelegator

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.ParserDelegator

No usage of javax.swing.text.html.parser.ParserDelegator

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.AttributeList

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.AttributeList

Packages that use AttributeList
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of AttributeList in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as AttributeList
AttributeList | AttributeList.next
AttributeList | Element.atts

Methods in javax.swing.text.html.parser that return AttributeList
AttributeList | AttributeList.getNext()
protected AttributeList | DTD.defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) Define an attribute list
AttributeList | Element.getAttributes() Get the attributes.
AttributeList | Element.getAttribute(String name) Get an attribute by name.
AttributeList | Element.getAttributeByValue(String name) Get an attribute by value.

Methods in javax.swing.text.html.parser with parameters of type AttributeList
Element | DTD.defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Define an element.
void | DTD.defineAttributes(String name, AttributeList atts) Define the attributes of an element.
protected Element | DTD.defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Define an element.
protected AttributeList | DTD.defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) Define an attribute list

Constructors in javax.swing.text.html.parser with parameters of type AttributeList
AttributeList(String name, int type, int modifier, String value, Vector values, AttributeList next)
Create an attribute list element.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.ContentModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.ContentModel

Packages that use ContentModel
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of ContentModel in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as ContentModel
ContentModel | ContentModel.next The next content model (in a ',', '|' or '&' expression).
ContentModel | Element.content

Methods in javax.swing.text.html.parser that return ContentModel
protected ContentModel | DTD.defContentModel(int type, Object obj, ContentModel next) Define a content model
ContentModel | Element.getContent() Get content model

Methods in javax.swing.text.html.parser with parameters of type ContentModel
Element | DTD.defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Define an element.
protected Element | DTD.defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Define an element.
protected ContentModel | DTD.defContentModel(int type, Object obj, ContentModel next) Define a content model

Constructors in javax.swing.text.html.parser with parameters of type ContentModel
ContentModel(int type, ContentModel content)
Create a content model of a particular type.
ContentModel(int type, Object content, ContentModel next)
Create a content model of a particular type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.DTD

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.DTD

Packages that use DTD
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of DTD in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as DTD
protected  DTD Parser.dtd

Methods in javax.swing.text.html.parser that return DTD
static DTD | DTD.getDTD(String name) Get a DTD.
protected static DTD | ParserDelegator.createDTD(DTD dtd, String name)

Methods in javax.swing.text.html.parser with parameters of type DTD
static void | DTD.putDTDHash(String name, DTD dtd)
protected static DTD | ParserDelegator.createDTD(DTD dtd, String name)

Constructors in javax.swing.text.html.parser with parameters of type DTD
Parser(DTD dtd)
DocumentParser(DTD dtd)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.Element

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.Element

Packages that use Element
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of Element in javax.swing.text.html.parser

Fields in javax.swing.text.html.parser declared as Element
Element | DTD.pcdata
Element | DTD.html
Element | DTD.meta
Element | DTD.base
Element | DTD.isindex
Element | DTD.head
Element | DTD.body
Element | DTD.applet
Element | DTD.param
Element | DTD.p
Element | DTD.title

Methods in javax.swing.text.html.parser that return Element
Element | DTD.getElement(String name) Get an element by name.
Element | DTD.getElement(int index) Get an element by index.
Element | DTD.defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Define an element.
protected Element | DTD.defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Define an element.
Element | ContentModel.first() Return the element that must be next.
Element | TagElement.getElement()

Methods in javax.swing.text.html.parser with parameters of type Element
protected TagElement | Parser.makeTag(Element elem, boolean fictional) Makes a TagElement.
protected TagElement | Parser.makeTag(Element elem)
protected void | Parser.markFirstTime(Element elem) Marks the first time a tag has been seen in a document

Constructors in javax.swing.text.html.parser with parameters of type Element
ContentModel(Element content)
Create a content model for an element.
TagElement(Element elem)
TagElement(Element elem, boolean fictional)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.Entity

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.Entity

Packages that use Entity
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of Entity in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that return Entity
Entity | DTD.getEntity(String name) Get an entity by name.
Entity | DTD.getEntity(int ch) Get a character entity.
Entity | DTD.defineEntity(String name, int type, char[] data) Define an entity.
Entity | DTD.defEntity(String name, int type, int ch) Define a character entity.
protected Entity | DTD.defEntity(String name, int type, String str) Define an entity.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.Parser

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.Parser

Packages that use Parser
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of Parser in javax.swing.text.html.parser

Subclasses of Parser in javax.swing.text.html.parser
 class DocumentParser
A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing).

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.html.parser.TagElement

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.html.parser.TagElement

Packages that use TagElement
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of TagElement in javax.swing.text.html.parser

Methods in javax.swing.text.html.parser that return TagElement
protected TagElement | Parser.makeTag(Element elem, boolean fictional) Makes a TagElement.
protected TagElement | Parser.makeTag(Element elem)

Methods in javax.swing.text.html.parser with parameters of type TagElement
protected void | Parser.handleEmptyTag(TagElement tag) Called when an empty tag is encountered.
protected void | Parser.handleStartTag(TagElement tag) Called when a start tag is encountered.
protected void | Parser.handleEndTag(TagElement tag) Called when an end tag is encountered.
protected void | Parser.startTag(TagElement tag) Handle a start tag.
protected void | DocumentParser.handleStartTag(TagElement tag) Handle Start Tag.
protected void | DocumentParser.handleEmptyTag(TagElement tag) Handle Empty Tag.
protected void | DocumentParser.handleEndTag(TagElement tag) Handle End Tag.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.text.html.parser.DTDConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.text.html.parser.DTDConstants

Packages that use DTDConstants
javax.swing.text.html.parser Provides the default HTML parser, along with support classes.

Uses of DTDConstants in javax.swing.text.html.parser

Classes in javax.swing.text.html.parser that implement DTDConstants
class | AttributeList This class defines the attributes of an SGML element as described in a DTD using the ATTLIST construct.
class | DocumentParser A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing).
class | DTD The representation of an SGML DTD.
class | Element An element as described in a DTD using the ELEMENT construct.
class | Entity An entity in as described in a DTD using the ENTITY construct.
class | Parser A simple DTD-driven HTML parser.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ContentModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class ContentModel

java.lang.Object
  |
  +--javax.swing.text.html.parser.ContentModel
All Implemented Interfaces:
Serializable
public final class ContentModel
extends Object
implements Serializable

A representation of a content model. A content model is basically a restricted BNF expression. It is restricted in the sense that it must be deterministic. This means that you don't have to represent it as a finite state automata.

See Annex H on page 556 of the SGML handbook for more information.

See Also:
Serialized Form

Field Summary
Object | content The content.
ContentModel | next The next content model (in a ',', '|' or '&' expression).
int | type Type.
Constructor Summary
ContentModel()
ContentModel(Element content)
Create a content model for an element.
ContentModel(int type, ContentModel content)
Create a content model of a particular type.
ContentModel(int type, Object content, ContentModel next)
Create a content model of a particular type.
Method Summary
boolean | empty() Return true if the content model could match an empty input stream.
Element | first() Return the element that must be next.
boolean | first(Object token) Return true if the token could potentially be the first token in the input stream.
void | getElements(Vector elemVec) Update elemVec with the list of elements that are part of the this contentModel.
String | toString() Convert to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

type

public int type
Type. Either '*', '?', '+', ',', '|', '&'.

content

public Object content
The content. Either an Element or a ContentModel.

next

public ContentModel next
The next content model (in a ',', '|' or '&' expression).
Constructor Detail

ContentModel

public ContentModel()

ContentModel

public ContentModel(Element content)
Create a content model for an element.

ContentModel

public ContentModel(int type,
                    ContentModel content)
Create a content model of a particular type.

ContentModel

public ContentModel(int type,
                    Object content,
                    ContentModel next)
Create a content model of a particular type.
Method Detail

empty

public boolean empty()
Return true if the content model could match an empty input stream.

getElements

public void getElements(Vector elemVec)
Update elemVec with the list of elements that are part of the this contentModel.

first

public boolean first(Object token)
Return true if the token could potentially be the first token in the input stream.

first

public Element first()
Return the element that must be next.

toString

public String toString()
Convert to a string.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocumentParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class DocumentParser

java.lang.Object
  |
  +--javax.swing.text.html.parser.Parser
        |
        +--javax.swing.text.html.parser.DocumentParser
All Implemented Interfaces:
DTDConstants
public class DocumentParser
extends Parser

A Parser for HTML Documents (actually, you can specify a DTD, but you should really only use this class with the html dtd in swing). Reads an InputStream of HTML and invokes the appropriate methods in the ParserCallback class. This is the default parser used by HTMLEditorKit to parse HTML url's.

This will message the callback for all valid tags, as well as tags that are implied but not explicitly specified. For example, the html string (<p>blah) only has a p tag defined. The callback will see the following methods:

  1. handleStartTag(html, ...)
  2. handleStartTag(head, ...)
  3. handleEndTag(head)
  4. handleStartTag(body, ...)
  5. handleStartTag(p, ...)
  6. handleText(...)
  7. handleEndTag(p)
  8. handleEndTag(body)
  9. handleEndTag(html)
The items in italic are implied, that is, although they were not explicitly specified, to be correct html they should have been present (head isn't necessary, but it is still generated). For tags that are implied, the AttributeSet argument will have a value of Boolean.TRUE for the key HTMLEditorKit.ParserCallback.IMPLIED.

HTML.Attributes defines a type safe enumeration of html attributes. If an attribute key of a tag is defined in HTML.Attribute, the HTML.Attribute will be used as the key, otherwise a String will be used. For example <p foo=bar class=neat> has two attributes. foo is not defined in HTML.Attribute, where as class is, therefore the AttributeSet will have two values in it, HTML.Attribute.CLASS with a String value of 'neat' and the String key 'foo' with a String value of 'bar'.

The position argument will indicate the start of the tag, comment or text. Similiar to arrays, the first character in the stream has a position of 0. For tags that are implied the position will indicate the location of the next encountered tag. In the first example, the implied start body and html tags will have the same position as the p tag, and the implied end p, html and body tags will all have the same position.

As html skips whitespace the position for text will be the position of the first valid character, eg in the string '\n\n\nblah' the text 'blah' will have a position of 3, the newlines are skipped.

For attributes that do not have a value, eg in the html string <foo blah> the attribute blah does not have a value, there are two possible values that will be placed in the AttributeSet's value:

  • If the DTD does not contain an definition for the element, or the definition does not have an explicit value then the value in the AttributeSet will be HTML.NULL_ATTRIBUTE_VALUE.
  • If the DTD contains an explicit value, as in: <!ATTLIST OPTION selected (selected) #IMPLIED> this value from the dtd (in this case selected) will be used.

Once the stream has been parsed, the callback is notified of the most likely end of line string. The end of line string will be one of \n, \r or \r\n, which ever is encountered the most in parsing the stream.

Fields inherited from class javax.swing.text.html.parser.Parser
dtd, strict
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Constructor Summary
DocumentParser(DTD dtd)
Method Summary
protected void | handleComment(char[] text) Called when an HTML comment is encountered.
protected void | handleEmptyTag(TagElement tag) Handle Empty Tag.
protected void | handleEndTag(TagElement tag) Handle End Tag.
protected void | handleError(int ln, String errorMsg) An error has occurred.
protected void | handleStartTag(TagElement tag) Handle Start Tag.
protected void | handleText(char[] data) Handle Text.
void | parse(Reader in, HTMLEditorKit.ParserCallback callback, boolean ignoreCharSet)
Methods inherited from class javax.swing.text.html.parser.Parser
endTag, error, error, error, error, flushAttributes, getAttributes, getCurrentLine, getCurrentPos, handleEOFInComment, handleTitle, makeTag, makeTag, markFirstTime, parse, parseDTDMarkup, parseMarkupDeclarations, startTag
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DocumentParser

public DocumentParser(DTD dtd)
Method Detail

parse

public void parse(Reader in,
                  HTMLEditorKit.ParserCallback callback,
                  boolean ignoreCharSet)
           throws IOException

handleStartTag

protected void handleStartTag(TagElement tag)
Handle Start Tag.
Overrides:
handleStartTag in class Parser

handleComment

protected void handleComment(char[] text)
Description copied from class: Parser
Called when an HTML comment is encountered.
Overrides:
handleComment in class Parser

handleEmptyTag

protected void handleEmptyTag(TagElement tag)
                       throws ChangedCharSetException
Handle Empty Tag.
Overrides:
handleEmptyTag in class Parser

handleEndTag

protected void handleEndTag(TagElement tag)
Handle End Tag.
Overrides:
handleEndTag in class Parser

handleText

protected void handleText(char[] data)
Handle Text.
Overrides:
handleText in class Parser

handleError

protected void handleError(int ln,
                           String errorMsg)
Description copied from class: Parser
An error has occurred.
Overrides:
handleError in class Parser
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DTD

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class DTD

java.lang.Object
  |
  +--javax.swing.text.html.parser.DTD
All Implemented Interfaces:
DTDConstants
public class DTD
extends Object
implements DTDConstants

The representation of an SGML DTD. This is produced by the DTDParser. The resulting DTD object describes a document syntax and is needed to parser HTML documents using the Parser. It contains a list of elements and their attributes as well as a list of entities defined in the DTD.

See Also:
Element, AttributeList, ContentModel, DTDParser, Parser

Field Summary
Element | applet
Element | base
Element | body
Hashtable | elementHash
Vector | elements
Hashtable | entityHash
static int | FILE_VERSION
Element | head
Element | html
Element | isindex
Element | meta
String | name
Element | p
Element | param
Element | pcdata
Element | title
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Constructor Summary
protected DTD(String name)
Create a new DTD.
Method Summary
protected AttributeList | defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) Define an attribute list
protected ContentModel | defContentModel(int type, Object obj, ContentModel next) Define a content model
protected Element | defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Define an element.
Entity | defEntity(String name, int type, int ch) Define a character entity.
protected Entity | defEntity(String name, int type, String str) Define an entity.
void | defineAttributes(String name, AttributeList atts) Define the attributes of an element.
Element | defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Define an element.
Entity | defineEntity(String name, int type, char[] data) Define an entity.
static DTD | getDTD(String name) Get a DTD.
Element | getElement(int index) Get an element by index.
Element | getElement(String name) Get an element by name.
Entity | getEntity(int ch) Get a character entity.
Entity | getEntity(String name) Get an entity by name.
String | getName() Get the name of the DTD.
static void | putDTDHash(String name, DTD dtd)
void | read(DataInputStream in)
String | toString() Return a string representation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

name

public String name

elements

public Vector elements

elementHash

public Hashtable elementHash

entityHash

public Hashtable entityHash

pcdata

public final Element pcdata

html

public final Element html

meta

public final Element meta

base

public final Element base

isindex

public final Element isindex

head

public final Element head

body

public final Element body

applet

public final Element applet

param

public final Element param

p

public final Element p

title

public final Element title

FILE_VERSION

public static int FILE_VERSION
Constructor Detail

DTD

protected DTD(String name)
Create a new DTD.
Method Detail

getName

public String getName()
Get the name of the DTD.

getEntity

public Entity getEntity(String name)
Get an entity by name.

getEntity

public Entity getEntity(int ch)
Get a character entity.

getElement

public Element getElement(String name)
Get an element by name. A new element is created if the element doesn't exist.

getElement

public Element getElement(int index)
Get an element by index.

defineEntity

public Entity defineEntity(String name,
                           int type,
                           char[] data)
Define an entity.

defineElement

public Element defineElement(String name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel content,
                             BitSet exclusions,
                             BitSet inclusions,
                             AttributeList atts)
Define an element.

defineAttributes

public void defineAttributes(String name,
                             AttributeList atts)
Define the attributes of an element.

defEntity

public Entity defEntity(String name,
                        int type,
                        int ch)
Define a character entity.

defEntity

protected Entity defEntity(String name,
                           int type,
                           String str)
Define an entity.

defElement

protected Element defElement(String name,
                             int type,
                             boolean omitStart,
                             boolean omitEnd,
                             ContentModel content,
                             String[] exclusions,
                             String[] inclusions,
                             AttributeList atts)
Define an element.

defAttributeList

protected AttributeList defAttributeList(String name,
                                         int type,
                                         int modifier,
                                         String value,
                                         String values,
                                         AttributeList atts)
Define an attribute list

defContentModel

protected ContentModel defContentModel(int type,
                                       Object obj,
                                       ContentModel next)
Define a content model

toString

public String toString()
Return a string representation.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

putDTDHash

public static void putDTDHash(String name,
                              DTD dtd)

getDTD

public static DTD getDTD(String name)
                  throws IOException
Get a DTD.

read

public void read(DataInputStream in)
          throws IOException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DTDConstants

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Interface DTDConstants

All Known Implementing Classes:
AttributeList, DTD, Element, Parser, Entity
public interface DTDConstants

SGML constants used in a DTD. The names of the constants correspond the the equivalent SGML constructs as described in "The SGML Handbook" by Charles F. Goldfarb.

See Also:
DTD, Element

Field Summary
static int | ANY
static int | CDATA
static int | CONREF
static int | CURRENT
static int | DEFAULT
static int | EMPTY
static int | ENDTAG
static int | ENTITIES
static int | ENTITY
static int | FIXED
static int | GENERAL
static int | ID
static int | IDREF
static int | IDREFS
static int | IMPLIED
static int | MD
static int | MODEL
static int | MS
static int | NAME
static int | NAMES
static int | NMTOKEN
static int | NMTOKENS
static int | NOTATION
static int | NUMBER
static int | NUMBERS
static int | NUTOKEN
static int | NUTOKENS
static int | PARAMETER
static int | PI
static int | PUBLIC
static int | RCDATA
static int | REQUIRED
static int | SDATA
static int | STARTTAG
static int | SYSTEM

Field Detail

CDATA

public static final int CDATA

ENTITY

public static final int ENTITY

ENTITIES

public static final int ENTITIES

ID

public static final int ID

IDREF

public static final int IDREF

IDREFS

public static final int IDREFS

NAME

public static final int NAME

NAMES

public static final int NAMES

NMTOKEN

public static final int NMTOKEN

NMTOKENS

public static final int NMTOKENS

NOTATION

public static final int NOTATION

NUMBER

public static final int NUMBER

NUMBERS

public static final int NUMBERS

NUTOKEN

public static final int NUTOKEN

NUTOKENS

public static final int NUTOKENS

RCDATA

public static final int RCDATA

EMPTY

public static final int EMPTY

MODEL

public static final int MODEL

ANY

public static final int ANY

FIXED

public static final int FIXED

REQUIRED

public static final int REQUIRED

CURRENT

public static final int CURRENT

CONREF

public static final int CONREF

IMPLIED

public static final int IMPLIED

PUBLIC

public static final int PUBLIC

SDATA

public static final int SDATA

PI

public static final int PI

STARTTAG

public static final int STARTTAG

ENDTAG

public static final int ENDTAG

MS

public static final int MS

MD

public static final int MD

SYSTEM

public static final int SYSTEM

GENERAL

public static final int GENERAL

DEFAULT

public static final int DEFAULT

PARAMETER

public static final int PARAMETER
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Element

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class Element

java.lang.Object
  |
  +--javax.swing.text.html.parser.Element
All Implemented Interfaces:
DTDConstants, Serializable
public final class Element
extends Object
implements DTDConstants, Serializable

An element as described in a DTD using the ELEMENT construct. This is essentiall the description of a tag. It describes the type, content model, attributes, attribute types etc. It is used to correctly parse a document by the Parser.

See Also:
DTD, AttributeList, Serialized Form

Field Summary
AttributeList | atts
ContentModel | content
Object | data A field to store user data.
BitSet | exclusions
BitSet | inclusions
int | index
String | name
boolean | oEnd
boolean | oStart
int | type
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Method Summary
AttributeList | getAttribute(String name) Get an attribute by name.
AttributeList | getAttributeByValue(String name) Get an attribute by value.
AttributeList | getAttributes() Get the attributes.
ContentModel | getContent() Get content model
int | getIndex() Get index.
String | getName() Get the name of the element.
int | getType() Get type.
boolean | isEmpty() Check if empty
static int | name2type(String nm)
boolean | omitEnd() Return true if the end tag can be omitted.
boolean | omitStart() Return true if the start tag can be omitted.
String | toString() Convert to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

index

public int index

name

public String name

oStart

public boolean oStart

oEnd

public boolean oEnd

inclusions

public BitSet inclusions

exclusions

public BitSet exclusions

type

public int type

content

public ContentModel content

atts

public AttributeList atts

data

public Object data
A field to store user data. Mostly used to store style sheets.
Method Detail

getName

public String getName()
Get the name of the element.

omitStart

public boolean omitStart()
Return true if the start tag can be omitted.

omitEnd

public boolean omitEnd()
Return true if the end tag can be omitted.

getType

public int getType()
Get type.

getContent

public ContentModel getContent()
Get content model

getAttributes

public AttributeList getAttributes()
Get the attributes.

getIndex

public int getIndex()
Get index.

isEmpty

public boolean isEmpty()
Check if empty

toString

public String toString()
Convert to a string.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

getAttribute

public AttributeList getAttribute(String name)
Get an attribute by name.

getAttributeByValue

public AttributeList getAttributeByValue(String name)
Get an attribute by value.

name2type

public static int name2type(String nm)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Entity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class Entity

java.lang.Object
  |
  +--javax.swing.text.html.parser.Entity
All Implemented Interfaces:
DTDConstants
public final class Entity
extends Object
implements DTDConstants

An entity in as described in a DTD using the ENTITY construct. It defines the type and value of the the entity.

See Also:
DTD

Field Summary
char[] | data
String | name
int | type
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Constructor Summary
Entity(String name, int type, char[] data)
Create an entity.
Method Summary
char[] | getData() Return the data.
String | getName() Get the name of the entity.
String | getString() Return the data as a string.
int | getType() Get the type of the entity.
boolean | isGeneral() Return true if it is a parameter entity.
boolean | isParameter() Return true if it is a parameter entity.
static int | name2type(String nm)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name

type

public int type

data

public char[] data
Constructor Detail

Entity

public Entity(String name,
              int type,
              char[] data)
Create an entity.
Method Detail

getName

public String getName()
Get the name of the entity.

getType

public int getType()
Get the type of the entity.

isParameter

public boolean isParameter()
Return true if it is a parameter entity.

isGeneral

public boolean isGeneral()
Return true if it is a parameter entity.

getData

public char[] getData()
Return the data.

getString

public String getString()
Return the data as a string.

name2type

public static int name2type(String nm)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Parser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class Parser

java.lang.Object
  |
  +--javax.swing.text.html.parser.Parser
All Implemented Interfaces:
DTDConstants
Direct Known Subclasses:
DocumentParser
public class Parser
extends Object
implements DTDConstants

A simple DTD-driven HTML parser. The parser reads an HTML file from an InputStream and calls various methods (which should be overridden in a subclass) when tags and data are encountered.

Unfortunately there are many badly implemented HTML parsers out there, and as a result there are many badly formatted HTML files. This parser attempts to parse most HTML files. This means that the implementation sometimes deviates from the SGML specification in favor of HTML.

The parser treats \r and \r\n as \n. Newlines after starttags and before end tags are ignored just as specified in the SGML/HTML specification.

See Also:
DTD, TagElement, SimpleAttributeSet

Field Summary
protected DTD | dtd
protected boolean | strict This flag determines whether or not the Parser will be strict in enforcing SGML compatibility.
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
Constructor Summary
Parser(DTD dtd)
Method Summary
protected void | endTag(boolean omitted) Handle an end tag.
protected void | error(String err)
protected void | error(String err, String arg1)
protected void | error(String err, String arg1, String arg2)
protected void | error(String err, String arg1, String arg2, String arg3) Invoke the error handler.
protected void | flushAttributes()
protected SimpleAttributeSet | getAttributes()
protected int | getCurrentLine()
protected int | getCurrentPos()
protected void | handleComment(char[] text) Called when an HTML comment is encountered.
protected void | handleEmptyTag(TagElement tag) Called when an empty tag is encountered.
protected void | handleEndTag(TagElement tag) Called when an end tag is encountered.
protected void | handleEOFInComment()
protected void | handleError(int ln, String msg) An error has occurred.
protected void | handleStartTag(TagElement tag) Called when a start tag is encountered.
protected void | handleText(char[] text) Called when PCDATA is encountered.
protected void | handleTitle(char[] text) Called when an HTML title tag is encountered.
protected TagElement | makeTag(Element elem)
protected TagElement | makeTag(Element elem, boolean fictional) Makes a TagElement.
protected void | markFirstTime(Element elem) Marks the first time a tag has been seen in a document
void | parse(Reader in) Parse an HTML stream, given a DTD.
String | parseDTDMarkup() Parses th Document Declaration Type markup declaration.
protected boolean | parseMarkupDeclarations(StringBuffer strBuff) Parse markup declarations.
protected void | startTag(TagElement tag) Handle a start tag.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

dtd

protected DTD dtd

strict

protected boolean strict
This flag determines whether or not the Parser will be strict in enforcing SGML compatibility. If false, it will be lenient with certain common classes of erroneous HTML constructs. Strict or not, in either case an error will be recorded.
Constructor Detail

Parser

public Parser(DTD dtd)
Method Detail

getCurrentLine

protected int getCurrentLine()
Returns:
the line number of the line currently being parsed

makeTag

protected TagElement makeTag(Element elem,
                             boolean fictional)
Makes a TagElement.

makeTag

protected TagElement makeTag(Element elem)

getAttributes

protected SimpleAttributeSet getAttributes()

flushAttributes

protected void flushAttributes()

handleText

protected void handleText(char[] text)
Called when PCDATA is encountered.

handleTitle

protected void handleTitle(char[] text)
Called when an HTML title tag is encountered.

handleComment

protected void handleComment(char[] text)
Called when an HTML comment is encountered.

handleEOFInComment

protected void handleEOFInComment()

handleEmptyTag

protected void handleEmptyTag(TagElement tag)
                       throws ChangedCharSetException
Called when an empty tag is encountered.

handleStartTag

protected void handleStartTag(TagElement tag)
Called when a start tag is encountered.

handleEndTag

protected void handleEndTag(TagElement tag)
Called when an end tag is encountered.

handleError

protected void handleError(int ln,
                           String msg)
An error has occurred.

error

protected void error(String err,
                     String arg1,
                     String arg2,
                     String arg3)
Invoke the error handler.

error

protected void error(String err,
                     String arg1,
                     String arg2)

error

protected void error(String err,
                     String arg1)

error

protected void error(String err)

startTag

protected void startTag(TagElement tag)
                 throws ChangedCharSetException
Handle a start tag. The new tag is pushed onto the tag stack. The attribute list is checked for required attributes.

endTag

protected void endTag(boolean omitted)
Handle an end tag. The end tag is popped from the tag stack.

markFirstTime

protected void markFirstTime(Element elem)
Marks the first time a tag has been seen in a document

parseDTDMarkup

public String parseDTDMarkup()
                      throws IOException
Parses th Document Declaration Type markup declaration. Currently ignores it.

parseMarkupDeclarations

protected boolean parseMarkupDeclarations(StringBuffer strBuff)
                                   throws IOException
Parse markup declarations. Currently only handles the Document Type Declaration markup. Returns true if it is a markup declaration false otherwise.

parse

public void parse(Reader in)
           throws IOException
Parse an HTML stream, given a DTD.

getCurrentPos

protected int getCurrentPos()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParserDelegator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class ParserDelegator

java.lang.Object
  |
  +--javax.swing.text.html.HTMLEditorKit.Parser
        |
        +--javax.swing.text.html.parser.ParserDelegator
All Implemented Interfaces:
Serializable
public class ParserDelegator
extends HTMLEditorKit.Parser
implements Serializable

Responsible for starting up a new DocumentParser each time its parse method is invoked. Stores a reference to the dtd.

See Also:
Serialized Form

Constructor Summary
ParserDelegator()
Method Summary
protected static DTD | createDTD(DTD dtd, String name)
void | parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet) Parse the given stream and drive the given callback with the results of the parse.
protected static void | setDefaultDTD()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParserDelegator

public ParserDelegator()
Method Detail

setDefaultDTD

protected static void setDefaultDTD()

createDTD

protected static DTD createDTD(DTD dtd,
                               String name)

parse

public void parse(Reader r,
                  HTMLEditorKit.ParserCallback cb,
                  boolean ignoreCharSet)
           throws IOException
Description copied from class: HTMLEditorKit.Parser
Parse the given stream and drive the given callback with the results of the parse. This method should be implemented to be thread-safe.
Overrides:
parse in class HTMLEditorKit.Parser
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagElement

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html.parser
Class TagElement

java.lang.Object
  |
  +--javax.swing.text.html.parser.TagElement
public class TagElement
extends Object

A generic HTML TagElement class. The methods define how white space is interpreted around the tag.

Constructor Summary
TagElement(Element elem)
TagElement(Element elem, boolean fictional)
Method Summary
boolean | breaksFlow()
boolean | fictional()
Element | getElement()
HTML.Tag | getHTMLTag()
boolean | isPreformatted()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagElement

public TagElement(Element elem)

TagElement

public TagElement(Element elem,
                  boolean fictional)
Method Detail

breaksFlow

public boolean breaksFlow()

isPreformatted

public boolean isPreformatted()

getElement

public Element getElement()

getHTMLTag

public HTML.Tag getHTMLTag()

fictional

public boolean fictional()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ParserCallback

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLEditorKit.ParserCallback

java.lang.Object
  |
  +--javax.swing.text.html.HTMLEditorKit.ParserCallback
Direct Known Subclasses:
HTMLDocument.HTMLReader
Enclosing class:
HTMLEditorKit
public static class HTMLEditorKit.ParserCallback
extends Object

The result of parsing drives these callback methods. The open and close actions should be balanced. The flush method will be the last method called, to give the receiver a chance to flush any pending data into the document.

Refer to DocumentParser, the default parser used, for further information on the contents of the AttributeSets, the positions, and other info.

See Also:
DocumentParser

Field Summary
static Object IMPLIED
This is passed as an attribute in the attributeset to indicate the element is implied eg, the string '<>foo<\t>' contains an implied html element and an implied body element.
Constructor Summary
HTMLEditorKit.ParserCallback()
Method Summary
void | flush()
void | handleComment(char[] data, int pos)
void | handleEndOfLineString(String eol) This is invoked after the stream has been parsed, but before flush.
void | handleEndTag(HTML.Tag t, int pos)
void | handleError(String errorMsg, int pos)
void | handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
void | handleText(char[] data, int pos)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

IMPLIED

public static final Object IMPLIED
This is passed as an attribute in the attributeset to indicate the element is implied eg, the string '<>foo<\t>' contains an implied html element and an implied body element.
Since:
1.3
Constructor Detail

HTMLEditorKit.ParserCallback

public HTMLEditorKit.ParserCallback()
Method Detail

flush

public void flush()
           throws BadLocationException

handleText

public void handleText(char[] data,
                       int pos)

handleComment

public void handleComment(char[] data,
                          int pos)

handleStartTag

public void handleStartTag(HTML.Tag t,
                           MutableAttributeSet a,
                           int pos)

handleEndTag

public void handleEndTag(HTML.Tag t,
                         int pos)

handleSimpleTag

public void handleSimpleTag(HTML.Tag t,
                            MutableAttributeSet a,
                            int pos)

handleError

public void handleError(String errorMsg,
                        int pos)

handleEndOfLineString

public void handleEndOfLineString(String eol)
This is invoked after the stream has been parsed, but before flush. eol will be one of \n, \r or \r\n, which ever is encountered the most in parsing the stream.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PreAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.PreAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction
              |
              +--javax.swing.text.html.HTMLDocument.HTMLReader.PreAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.PreAction
extends HTMLDocument.HTMLReader.BlockAction

Constructor Summary
HTMLDocument.HTMLReader.PreAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet attr) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.PreAction

public HTMLDocument.HTMLReader.PreAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet attr)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.BlockAction

end

public void end(HTML.Tag t)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
end in class HTMLDocument.HTMLReader.BlockAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RunElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.RunElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.LeafElement
              |
              +--javax.swing.text.html.HTMLDocument.RunElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Enclosing class:
HTMLDocument
public class HTMLDocument.RunElement
extends AbstractDocument.LeafElement

An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
HTMLDocument.RunElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
Method Summary
String | getName() Gets the name of the element.
AttributeSet | getResolveParent() Gets the resolving parent.
Methods inherited from class javax.swing.text.AbstractDocument.LeafElement
children, getAllowsChildren, getElement, getElementCount, getElementIndex, getEndOffset, getStartOffset, isLeaf, toString
Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

HTMLDocument.RunElement

public HTMLDocument.RunElement(Element parent,
                               AttributeSet a,
                               int offs0,
                               int offs1)
Constructs an element that represents content within the document (has no children).
Parameters:
parent - the parent element
a - the element attributes
offs0 - the start offset (must be at least 0)
offs1 - the end offset (must be at least offs0)
Method Detail

getName

public String getName()
Gets the name of the element.
Overrides:
getName in class AbstractDocument.LeafElement
Returns:
the name, null if none

getResolveParent

public AttributeSet getResolveParent()
Gets the resolving parent. HTML attributes are not inherited at the model level so we override this to return null.
Overrides:
getResolveParent in class AbstractDocument.AbstractElement
Returns:
null, there are none
See Also:
AttributeSet.getResolveParent()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpecialAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.SpecialAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
        |
        +--javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction
Direct Known Subclasses:
HTMLDocument.HTMLReader.FormAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.SpecialAction
extends HTMLDocument.HTMLReader.TagAction

Constructor Summary
HTMLDocument.HTMLReader.SpecialAction()
Method Summary
 void start(HTML.Tag t, MutableAttributeSet a)
Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
end
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.SpecialAction

public HTMLDocument.HTMLReader.SpecialAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet a)
Description copied from class: HTMLDocument.HTMLReader.TagAction
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overrides:
start in class HTMLDocument.HTMLReader.TagAction
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyleSheet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class StyleSheet

java.lang.Object
  |
  +--javax.swing.text.StyleContext
        |
        +--javax.swing.text.html.StyleSheet
All Implemented Interfaces:
AbstractDocument.AttributeContext, Serializable
public class StyleSheet
extends StyleContext

Support for defining the visual characteristics of HTML views being rendered. The StyleSheet is used to translate the HTML model into visual characteristics. This enables views to be customized by a look-and-feel, multiple views over the same model can be rendered differently, etc. This can be thought of as a CSS rule repository. The key for CSS attributes is an object of type CSS.Attribute. The type of the value is up to the StyleSheet implementation, but the toString method is required to return a string representation of CSS value.

The primary entry point for HTML View implementations to get their attributes is the getViewAttributes method. This should be implemented to establish the desired policy used to associate attributes with the view. Each HTMLEditorKit (i.e. and therefore each associated JEditorPane) can have its own StyleSheet, but by default one sheet will be shared by all of the HTMLEditorKit instances. HTMLDocument instance can also have a StyleSheet, which holds the document-specific CSS specifications.

In order for Views to store less state and therefore be more lightweight, the StyleSheet can act as a factory for painters that handle some of the rendering tasks. This allows implementations to determine what they want to cache and have the sharing potentially at the level that a selector is common to multiple views. Since the StyleSheet may be used by views over multiple documents and typically the HTML attributes don't effect the selector being used, the potential for sharing is significant.

The rules are stored as named styles, and other information is stored to translate the context of an element to a rule quickly. The following code fragment will display the named styles, and therefore the CSS rules contained.

   import java.util.*;
   import javax.swing.text.*;
   import javax.swing.text.html.*;

   public class ShowStyles {

       public static void main(String[] args) {
       HTMLEditorKit kit = new HTMLEditorKit();
       HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument();
       StyleSheet styles = doc.getStyleSheet();

       Enumeration rules = styles.getStyleNames();
       while (rules.hasMoreElements()) {
           String name = (String) rules.nextElement();
           Style rule = styles.getStyle(name);
           System.out.println(rule.toString());
       }
       System.exit(0);
       }
   }

The semantics for when a CSS style should overide visual attributes defined by an element are not well defined. For example, the html <body bgcolor=red> makes the body have a red background. But if the html file also contains the CSS rule body { background: blue } it becomes less clear as to what color the background of the body should be. The current implemention gives visual attributes defined in the element the highest precedence, that is they are always checked before any styles. Therefore, in the previous example the background would have a red color as the body element defines the background color to be red.

As already mentioned this supports CSS. We don't support the full CSS spec. Refer to the javadoc of the CSS class to see what properties we support. The two major CSS parsing related concepts we do not currently support are pseudo selectors, such as A:link { color: red }, and the important modifier.

Note: This implementation is currently incomplete. It can be replaced with alternative implementations that are complete. Future versions of this class will provide better CSS support.

See Also:
Serialized Form

Inner Class Summary
static class | StyleSheet.BoxPainter Class to carry out some of the duties of CSS formatting.
static class | StyleSheet.ListPainter Class to carry out some of the duties of CSS list formatting.
Inner classes inherited from class javax.swing.text.StyleContext
StyleContext.NamedStyle, StyleContext.SmallAttributeSet
Fields inherited from class javax.swing.text.StyleContext
DEFAULT_STYLE
Constructor Summary
StyleSheet()
Construct a StyleSheet
Method Summary
AttributeSet | addAttribute(AttributeSet old, Object key, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
void | addCSSAttribute(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
boolean | addCSSAttributeFromHTML(MutableAttributeSet attr, CSS.Attribute key, String value) Adds a CSS attribute to the given set.
void | addRule(String rule) Adds a set of rules to the sheet.
void | addStyleSheet(StyleSheet ss) Adds the rules from the StyleSheet ss to those of the receiver.
protected MutableAttributeSet | createLargeAttributeSet(AttributeSet a) Creates a large set of attributes that should trade off space for time.
protected StyleContext.SmallAttributeSet | createSmallAttributeSet(AttributeSet a) Creates a compact set of attributes that might be shared.
Color | getBackground(AttributeSet a) Takes a set of attributes and turn it into a background color specification.
URL | getBase() Returns the base.
StyleSheet.BoxPainter | getBoxPainter(AttributeSet a) Fetches the box formatter to use for the given set of CSS attributes.
AttributeSet | getDeclaration(String decl) Translates a CSS declaration to an AttributeSet that represents the CSS declaration.
Font | getFont(AttributeSet a) Fetches the font to use for the given set of attributes.
Color | getForeground(AttributeSet a) Takes a set of attributes and turn it into a foreground color specification.
static int | getIndexOfSize(float pt)
StyleSheet.ListPainter | getListPainter(AttributeSet a) Fetches the list formatter to use for the given set of CSS attributes.
float | getPointSize(int index) Returns the point size, given a size index.
float | getPointSize(String size) Given a string such as "+2", "-2", or "2", returns a point size value.
Style | getRule(HTML.Tag t, Element e) Fetches the style to use to render the given type of HTML tag.
Style | getRule(String selector) Fetches the rule that best matches the selector given in string form.
StyleSheet[] | getStyleSheets() Returns an array of the linked StyleSheets.
AttributeSet | getViewAttributes(View v) Fetches a set of attributes to use in the view for displaying.
void | importStyleSheet(URL url) Imports a style sheet from url.
void | loadRules(Reader in, URL ref) Loads a set of rules that have been specified in terms of CSS1 grammar.
AttributeSet | removeAttribute(AttributeSet old, Object key) Removes an attribute from the set.
AttributeSet | removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes.
AttributeSet | removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
void | removeStyle(String nm) Removes a named style previously added to the document.
void | removeStyleSheet(StyleSheet ss) Removes the StyleSheet ss from those of the receiver.
void | setBase(URL base) Sets the base.
void | setBaseFontSize(int sz)
void | setBaseFontSize(String size)
Color | stringToColor(String string) Converts a color string such as "RED" or "#NNNNNN" to a Color.
AttributeSet | translateHTMLToCSS(AttributeSet htmlAttrSet) Converts a set of HTML attributes to an equivalent set of CSS attributes.
Methods inherited from class javax.swing.text.StyleContext
addChangeListener, addStyle, getCompressionThreshold, getDefaultStyleContext, getEmptySet, getFont, getFontMetrics, getStaticAttribute, getStaticAttributeKey, getStyle, getStyleNames, readAttributes, readAttributeSet, reclaim, registerStaticAttributeKey, removeChangeListener, toString, writeAttributes, writeAttributeSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StyleSheet

public StyleSheet()
Construct a StyleSheet
Method Detail

getRule

public Style getRule(HTML.Tag t,
                     Element e)
Fetches the style to use to render the given type of HTML tag. The element given is representing the tag and can be used to determine the nesting for situations where the attributes will differ if nesting inside of elements.
Parameters:
t - the type to translate to visual attributes.
e - the element representing the tag. The element can be used to determine the nesting for situations where the attributes will differ if nested inside of other elements.

getRule

public Style getRule(String selector)
Fetches the rule that best matches the selector given in string form. Where selector is a space separated String of the element names. For example, selector might be 'html body tr td''

The attributes of the returned Style will change as rules are added and removed. That is if you to ask for a rule with a selector "table p" and a new rule was added with a selector of "p" the returned Style would include the new attributes from the rule "p".

addRule

public void addRule(String rule)
Adds a set of rules to the sheet. The rules are expected to be in valid CSS format. Typically this would be called as a result of parsing a <style> tag.

getDeclaration

public AttributeSet getDeclaration(String decl)
Translates a CSS declaration to an AttributeSet that represents the CSS declaration. Typically this would be called as a result of encountering an HTML style attribute.

loadRules

public void loadRules(Reader in,
                      URL ref)
               throws IOException
Loads a set of rules that have been specified in terms of CSS1 grammar. If there are collisions with existing rules, the newly specified rule will win.
Parameters:
in - the stream to read the CSS grammar from
ref - the reference URL. This value represents the location of the stream and may be null. All relative URLs specified in the stream will be based upon this parameter.

getViewAttributes

public AttributeSet getViewAttributes(View v)
Fetches a set of attributes to use in the view for displaying. This is basically a set of attributes that can be used for View.getAttributes.

removeStyle

public void removeStyle(String nm)
Removes a named style previously added to the document.
Overrides:
removeStyle in class StyleContext
Parameters:
nm - the name of the style to remove

addStyleSheet

public void addStyleSheet(StyleSheet ss)
Adds the rules from the StyleSheet ss to those of the receiver. ss's rules will override the rules of any previously added style sheets. An added StyleSheet will never override the rules of the receiving style sheet.
Since:
1.3

removeStyleSheet

public void removeStyleSheet(StyleSheet ss)
Removes the StyleSheet ss from those of the receiver.
Since:
1.3

getStyleSheets

public StyleSheet[] getStyleSheets()
Returns an array of the linked StyleSheets. Will return null if there are no linked StyleSheets.
Since:
1.3

importStyleSheet

public void importStyleSheet(URL url)
Imports a style sheet from url. The resulting rules are directly added to the receiver. If you do not want the rules to become part of the receiver, create a new StyleSheet and use addStyleSheet to link it in.
Since:
1.3

setBase

public void setBase(URL base)
Sets the base. All import statements that are relative, will be relative to base.
Since:
1.3

getBase

public URL getBase()
Returns the base.
Since:
1.3

addCSSAttribute

public void addCSSAttribute(MutableAttributeSet attr,
                            CSS.Attribute key,
                            String value)
Adds a CSS attribute to the given set.
Since:
1.3

addCSSAttributeFromHTML

public boolean addCSSAttributeFromHTML(MutableAttributeSet attr,
                                       CSS.Attribute key,
                                       String value)
Adds a CSS attribute to the given set.
Since:
1.3

translateHTMLToCSS

public AttributeSet translateHTMLToCSS(AttributeSet htmlAttrSet)
Converts a set of HTML attributes to an equivalent set of CSS attributes.
Parameters:
AttributeSet - containing the HTML attributes.
AttributeSet - containing the corresponding CSS attributes. The AttributeSet will be empty if there are no mapping CSS attributes.

addAttribute

public AttributeSet addAttribute(AttributeSet old,
                                 Object key,
                                 Object value)
Adds an attribute to the given set, and returns the new representative set. This is reimplemented to convert StyleConstant attributes to CSS prior to forwarding to the superclass behavior. The StyleConstants attribute has no corresponding CSS entry, the StyleConstants attribute is stored (but will likely be unused).
Overrides:
addAttribute in class StyleContext
Parameters:
old - the old attribute set
key - the non-null attribute key
value - the attribute value
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public AttributeSet addAttributes(AttributeSet old,
                                  AttributeSet attr)
Adds a set of attributes to the element. If any of these attributes are StyleConstants attributes, they will be converted to CSS prior to forwarding to the superclass behavior.
Overrides:
addAttributes in class StyleContext
Parameters:
old - the old attribute set
attr - the attributes to add
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public AttributeSet removeAttribute(AttributeSet old,
                                    Object key)
Removes an attribute from the set. If the attribute is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.
Overrides:
removeAttribute in class StyleContext
Parameters:
old - the old set of attributes
key - the non-null attribute name
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     Enumeration names)
Removes a set of attributes for the element. If any of the attributes is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.
Overrides:
removeAttributes in class StyleContext
Parameters:
old - the old attribute set
names - the attribute names
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     AttributeSet attrs)
Removes a set of attributes. If any of the attributes is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.
Overrides:
removeAttributes in class StyleContext
Parameters:
old - the old attribute set
attrs - the attributes
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

createSmallAttributeSet

protected StyleContext.SmallAttributeSet createSmallAttributeSet(AttributeSet a)
Creates a compact set of attributes that might be shared. This is a hook for subclasses that want to alter the behavior of SmallAttributeSet. This can be reimplemented to return an AttributeSet that provides some sort of attribute conversion.
Overrides:
createSmallAttributeSet in class StyleContext
Parameters:
a - The set of attributes to be represented in the the compact form.

createLargeAttributeSet

protected MutableAttributeSet createLargeAttributeSet(AttributeSet a)
Creates a large set of attributes that should trade off space for time. This set will not be shared. This is a hook for subclasses that want to alter the behavior of the larger attribute storage format (which is SimpleAttributeSet by default). This can be reimplemented to return a MutableAttributeSet that provides some sort of attribute conversion.
Overrides:
createLargeAttributeSet in class StyleContext
Parameters:
a - The set of attributes to be represented in the the larger form.

getFont

public Font getFont(AttributeSet a)
Fetches the font to use for the given set of attributes.
Overrides:
getFont in class StyleContext
Following copied from class: javax.swing.text.StyleContext
Parameters:
attr - the attribute set
Returns:
the font

getForeground

public Color getForeground(AttributeSet a)
Takes a set of attributes and turn it into a foreground color specification. This might be used to specify things like brighter, more hue, etc.
Overrides:
getForeground in class StyleContext
Parameters:
a - the set of attributes
Returns:
the color

getBackground

public Color getBackground(AttributeSet a)
Takes a set of attributes and turn it into a background color specification. This might be used to specify things like brighter, more hue, etc.
Overrides:
getBackground in class StyleContext
Parameters:
attr - the set of attributes
Returns:
the color

getBoxPainter

public StyleSheet.BoxPainter getBoxPainter(AttributeSet a)
Fetches the box formatter to use for the given set of CSS attributes.

getListPainter

public StyleSheet.ListPainter getListPainter(AttributeSet a)
Fetches the list formatter to use for the given set of CSS attributes.

setBaseFontSize

public void setBaseFontSize(int sz)

setBaseFontSize

public void setBaseFontSize(String size)

getIndexOfSize

public static int getIndexOfSize(float pt)

getPointSize

public float getPointSize(int index)
Returns the point size, given a size index.

getPointSize

public float getPointSize(String size)
Given a string such as "+2", "-2", or "2", returns a point size value.

stringToColor

public Color stringToColor(String string)
Converts a color string such as "RED" or "#NNNNNN" to a Color. Note: This will only convert the HTML3.2 color strings or a string of length 7; otherwise, it will return null.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Tag

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTML.Tag

java.lang.Object
  |
  +--javax.swing.text.html.HTML.Tag
Direct Known Subclasses:
HTML.UnknownTag
Enclosing class:
HTML
public static class HTML.Tag
extends Object

Typesafe enumeration for an html tag. Although the set of html tags is a closed set, we have let the set open so that people can add their own tag types to their custom parser and still communicate to the reader.

Field Summary
static HTML.Tag | A
static HTML.Tag | ADDRESS
static HTML.Tag | APPLET
static HTML.Tag | AREA
static HTML.Tag | B
static HTML.Tag | BASE
static HTML.Tag | BASEFONT
static HTML.Tag | BIG
static HTML.Tag | BLOCKQUOTE
static HTML.Tag | BODY
static HTML.Tag | BR
static HTML.Tag | CAPTION
static HTML.Tag | CENTER
static HTML.Tag | CITE
static HTML.Tag | CODE
static HTML.Tag | COMMENT All comments are labeled with this tag.
static HTML.Tag | CONTENT All text content is labeled with this tag.
static HTML.Tag | DD
static HTML.Tag | DFN
static HTML.Tag | DIR
static HTML.Tag | DIV
static HTML.Tag | DL
static HTML.Tag | DT
static HTML.Tag | EM
static HTML.Tag | FONT
static HTML.Tag | FORM
static HTML.Tag | FRAME
static HTML.Tag | FRAMESET
static HTML.Tag | H1
static HTML.Tag | H2
static HTML.Tag | H3
static HTML.Tag | H4
static HTML.Tag | H5
static HTML.Tag | H6
static HTML.Tag | HEAD
static HTML.Tag | HR
static HTML.Tag | HTML
static HTML.Tag | I
static HTML.Tag | IMG
static HTML.Tag | IMPLIED All text content must be in a paragraph element.
static HTML.Tag | INPUT
static HTML.Tag | ISINDEX
static HTML.Tag | KBD
static HTML.Tag | LI
static HTML.Tag | LINK
static HTML.Tag | MAP
static HTML.Tag | MENU
static HTML.Tag | META
static HTML.Tag | NOFRAMES
static HTML.Tag | OBJECT
static HTML.Tag | OL
static HTML.Tag | OPTION
static HTML.Tag | P
static HTML.Tag | PARAM
static HTML.Tag | PRE
static HTML.Tag | S
static HTML.Tag | SAMP
static HTML.Tag | SCRIPT
static HTML.Tag | SELECT
static HTML.Tag | SMALL
static HTML.Tag | SPAN
static HTML.Tag | STRIKE
static HTML.Tag | STRONG
static HTML.Tag | STYLE
static HTML.Tag | SUB
static HTML.Tag | SUP
static HTML.Tag | TABLE
static HTML.Tag | TD
static HTML.Tag | TEXTAREA
static HTML.Tag | TH
static HTML.Tag | TITLE
static HTML.Tag | TR
static HTML.Tag | TT
static HTML.Tag | U
static HTML.Tag | UL
static HTML.Tag | VAR
Constructor Summary
 | HTML.Tag()
protected | HTML.Tag(String id)
protected | HTML.Tag(String id, boolean causesBreak, boolean isBlock)
Method Summary
boolean | breaksFlow() If the tag causes a line break, to the flow of data, then this method will return true.
boolean | isBlock() Block tags are tags that add structure to a document.
boolean | isPreformatted()
String | toString() Return the string representation of the tag.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

A

public static final HTML.Tag A

ADDRESS

public static final HTML.Tag ADDRESS

APPLET

public static final HTML.Tag APPLET

AREA

public static final HTML.Tag AREA

B

public static final HTML.Tag B

BASE

public static final HTML.Tag BASE

BASEFONT

public static final HTML.Tag BASEFONT

BIG

public static final HTML.Tag BIG

BLOCKQUOTE

public static final HTML.Tag BLOCKQUOTE

BODY

public static final HTML.Tag BODY

BR

public static final HTML.Tag BR

CAPTION

public static final HTML.Tag CAPTION

CENTER

public static final HTML.Tag CENTER

CITE

public static final HTML.Tag CITE

CODE

public static final HTML.Tag CODE

DD

public static final HTML.Tag DD

DFN

public static final HTML.Tag DFN

DIR

public static final HTML.Tag DIR

DIV

public static final HTML.Tag DIV

DL

public static final HTML.Tag DL

DT

public static final HTML.Tag DT

EM

public static final HTML.Tag EM

FONT

public static final HTML.Tag FONT

FORM

public static final HTML.Tag FORM

FRAME

public static final HTML.Tag FRAME

FRAMESET

public static final HTML.Tag FRAMESET

H1

public static final HTML.Tag H1

H2

public static final HTML.Tag H2

H3

public static final HTML.Tag H3

H4

public static final HTML.Tag H4

H5

public static final HTML.Tag H5

H6

public static final HTML.Tag H6

HEAD

public static final HTML.Tag HEAD

HR

public static final HTML.Tag HR

HTML

public static final HTML.Tag HTML

I

public static final HTML.Tag I

IMG

public static final HTML.Tag IMG

INPUT

public static final HTML.Tag INPUT

ISINDEX

public static final HTML.Tag ISINDEX

KBD

public static final HTML.Tag KBD

LI

public static final HTML.Tag LI

LINK

public static final HTML.Tag LINK

MAP

public static final HTML.Tag MAP

MENU

public static final HTML.Tag MENU

META

public static final HTML.Tag META

NOFRAMES

public static final HTML.Tag NOFRAMES

OBJECT

public static final HTML.Tag OBJECT

OL

public static final HTML.Tag OL

OPTION

public static final HTML.Tag OPTION

P

public static final HTML.Tag P

PARAM

public static final HTML.Tag PARAM

PRE

public static final HTML.Tag PRE

SAMP

public static final HTML.Tag SAMP

SCRIPT

public static final HTML.Tag SCRIPT

SELECT

public static final HTML.Tag SELECT

SMALL

public static final HTML.Tag SMALL

SPAN

public static final HTML.Tag SPAN

STRIKE

public static final HTML.Tag STRIKE

S

public static final HTML.Tag S

STRONG

public static final HTML.Tag STRONG

STYLE

public static final HTML.Tag STYLE

SUB

public static final HTML.Tag SUB

SUP

public static final HTML.Tag SUP

TABLE

public static final HTML.Tag TABLE

TD

public static final HTML.Tag TD

TEXTAREA

public static final HTML.Tag TEXTAREA

TH

public static final HTML.Tag TH

TITLE

public static final HTML.Tag TITLE

TR

public static final HTML.Tag TR

TT

public static final HTML.Tag TT

U

public static final HTML.Tag U

UL

public static final HTML.Tag UL

VAR

public static final HTML.Tag VAR

IMPLIED

public static final HTML.Tag IMPLIED
All text content must be in a paragraph element. If a paragraph didn't exist when content was encountered, a paragraph is manufactured.

This is a tag synthesized by the html reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

CONTENT

public static final HTML.Tag CONTENT
All text content is labeled with this tag.

This is a tag synthesized by the html reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

COMMENT

public static final HTML.Tag COMMENT
All comments are labeled with this tag.

This is a tag synthesized by the html reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

Constructor Detail

HTML.Tag

public HTML.Tag()

HTML.Tag

protected HTML.Tag(String id)

HTML.Tag

protected HTML.Tag(String id,
                   boolean causesBreak,
                   boolean isBlock)
Method Detail

isBlock

public boolean isBlock()
Block tags are tags that add structure to a document.

breaksFlow

public boolean breaksFlow()
If the tag causes a line break, to the flow of data, then this method will return true.

isPreformatted

public boolean isPreformatted()

toString

public String toString()
Return the string representation of the tag.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTMLDocument.HTMLReader.TagAction

java.lang.Object
  |
  +--javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
Direct Known Subclasses:
HTMLDocument.HTMLReader.BlockAction, HTMLDocument.HTMLReader.CharacterAction, HTMLDocument.HTMLReader.HiddenAction, HTMLDocument.HTMLReader.IsindexAction, HTMLDocument.HTMLReader.SpecialAction
Enclosing class:
HTMLDocument.HTMLReader
public class HTMLDocument.HTMLReader.TagAction
extends Object

An action to be performed in response to parsing a tag. This allows customization of how each tag is handled and avoids a large switch statement.

Constructor Summary
HTMLDocument.HTMLReader.TagAction()
Method Summary
void | end(HTML.Tag t) Called when an end tag is seen for the type of tag this action was registered to.
void | start(HTML.Tag t, MutableAttributeSet a) Called when a start tag is seen for the type of tag this action was registered to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLDocument.HTMLReader.TagAction

public HTMLDocument.HTMLReader.TagAction()
Method Detail

start

public void start(HTML.Tag t,
                  MutableAttributeSet a)
Called when a start tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.

end

public void end(HTML.Tag t)
Called when an end tag is seen for the type of tag this action was registered to. The tag argument indicates the actual tag for those actions that are shared across many tags. By default this does nothing and completely ignores the tag.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownTag

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.html
Class HTML.UnknownTag

java.lang.Object
  |
  +--javax.swing.text.html.HTML.Tag
        |
        +--javax.swing.text.html.HTML.UnknownTag
All Implemented Interfaces:
Serializable
Enclosing class:
HTML
public static class HTML.UnknownTag
extends HTML.Tag
implements Serializable

See Also:
Serialized Form

Fields inherited from class javax.swing.text.html.HTML.Tag
A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BR, CAPTION, CENTER, CITE, CODE, COMMENT, CONTENT, DD, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IMG, IMPLIED, INPUT, ISINDEX, KBD, LI, LINK, MAP, MENU, META, NOFRAMES, OBJECT, OL, OPTION, P, PARAM, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TD, TEXTAREA, TH, TITLE, TR, TT, U, UL, VAR
Constructor Summary
HTML.UnknownTag(String id)
Method Summary
boolean | equals(Object obj) Compares this object to the specifed object.
int | hashCode() Returns a hash code value for the object.
Methods inherited from class javax.swing.text.html.HTML.Tag
breaksFlow, isBlock, isPreformatted, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HTML.UnknownTag

public HTML.UnknownTag(String id)
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if and only if the argument is not null and is a UnknownTag object with the same name.
Overrides:
equals in class Object
Parameters:
obj - the object to compare this tag with.
Returns:
true if the objects are equal; false otherwise.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IconView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class IconView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.IconView
All Implemented Interfaces:
SwingConstants
public class IconView
extends View

Icon decorator that implements the view interface. The entire element is used to represent the icon. This acts as a gateway from the display-only View implementations to interactive lightweight icons (that is, it allows icons to be embedded into the View hierarchy. The parent of the icon is the container that is handed out by the associated view factory.

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
IconView(Element elem)
Creates a new icon view that represents an element.
Method Summary
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
void | paint(Graphics g, Shape a) Paints the icon.
void | setSize(float width, float height) Sets the size of the view.
int | viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setParent, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IconView

public IconView(Element elem)
Creates a new icon view that represents an element.
Parameters:
elem - the element to create a view for
Method Detail

paint

public void paint(Graphics g,
                  Shape a)
Paints the icon. The real paint behavior occurs naturally from the association that the icon has with its parent container (the same container hosting this view), so this simply allows us to position the icon properly relative to the view. Since the coordinate system for the view is simply the parent containers, positioning the child icon is easy.
Overrides:
paint in class View
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the bottom of the icon along the y axis, and the default along the x axis.
Overrides:
getAlignment in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class View
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point of view >= 0
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. Since Icon doesn't support this functionality, there is nothing we can do.
Overrides:
setSize in class View
Parameters:
width - the width
height - the height
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsertBreakAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.InsertBreakAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.InsertBreakAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.InsertBreakAction
extends TextAction

Places a line/paragraph break into the document. If there is a selection, it is removed before the break is added.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.insertBreakAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.InsertBreakAction()
Creates this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.InsertBreakAction

public DefaultEditorKit.InsertBreakAction()
Creates this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsertContentAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.InsertContentAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.InsertContentAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.InsertContentAction
extends TextAction

Places content into the associated document. If there is a selection, it is removed before the new content is added.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.insertContentAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.InsertContentAction()
Creates this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.InsertContentAction

public DefaultEditorKit.InsertContentAction()
Creates this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InsertTabAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.InsertTabAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.InsertTabAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.InsertTabAction
extends TextAction

Places a tab character into the document. If there is a selection, it is removed before the tab is added.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.insertTabAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.InsertTabAction()
Creates this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.InsertTabAction

public DefaultEditorKit.InsertTabAction()
Creates this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItalicAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.ItalicAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.ItalicAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.ItalicAction
extends StyledEditorKit.StyledTextAction

An action to toggle the italic attribute.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.ItalicAction()
Constructs a new ItalicAction.
Method Summary
 void actionPerformed(ActionEvent e)
Toggles the italic attribute.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.ItalicAction

public StyledEditorKit.ItalicAction()
Constructs a new ItalicAction.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Toggles the italic attribute.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JTextComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class JTextComponent

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable
Direct Known Subclasses:
JEditorPane, JTextArea, JTextField
public abstract class JTextComponent
extends JComponent
implements Scrollable, Accessible

JTextComponent is the base class for swing text components. It tries to be compatible with the java.awt.TextComponent class where it can reasonably do so. Also provided are other services for additional flexibility (beyond the pluggable UI and bean support). You can find information on how to use the functionality this class provides in General Rules for Using Text Components, a section in The Java Tutorial.

Caret Changes
The caret is a pluggable object in swing text components. Notification of changes to the caret position and the selection are sent to implementations of the CaretListener interface that have been registered with the text component. The UI will install a default caret unless a customized caret has been set.

Commands
Text components provide a number of commands that can be used to manipulate the component. This is essentially the way that the component expresses its capabilities. These are expressed in terms of the swing Action interface, using the TextAction implementation. The set of commands supported by the text component can be found with the getActions() method. These actions can be bound to key events, fired from buttons, etc.

Text Input
The text components support flexible and internationalized text input, using keymaps and the input method framework, while maintaining compatibility with the AWT listener model.

A Keymap lets an application bind key strokes to actions. In order to allow keymaps to be shared across multiple text components, they can use actions that extend TextAction. TextAction can determine which JTextComponent most recently has or had focus and therefore is the subject of the action (In the case that the ActionEvent sent to the action doesn't contain the target text component as its source).

The input method framework lets text components interact with input methods, separate software components that preprocess events to let users enter thousands of different characters using keyboards with far fewer keys. JTextComponent is an active client of the framework, so it implements the preferred user interface for interacting with input methods. As a consequence, some key events do not reach the text component because they are handled by an input method, and some text input reaches the text component as committed text within an InputMethodEvent instead of as a key event. The complete text input is the combination of the characters in keyTyped key events and committed text in input method events.

The AWT listener model lets applications attach event listeners to components in order to bind events to actions. Swing encourages the use of keymaps instead of listeners, but maintains compatibility with listeners by giving the listeners a chance to steal an event by consuming it.

Keyboard event and input method events are handled in the following stages, with each stage capable of consuming the event:
Stage | KeyEvent | InputMethodEvent
1. | input methods | (generated here)
2. | focus manager
3. | registered key listeners | registered input method listeners
4. | input method handling in JTextComponent
5. | keymap handling using the current keymap
6. | keyboard handling in JComponent (e.g. accelerators, component navigation, etc.)

To maintain compatibility with applications that listen to key events but are not aware of input method events, the input method handling in stage 4 provides a compatibility mode for components that do not process input method events. For these components, the committed text is converted to keyTyped key events and processed in the key event pipeline starting at stage 3 instead of in the input method event pipeline.

By default the component will create a keymap (named DEFAULT_KEYMAP) that is shared by all JTextComponent instances as the default keymap. Typically a look-and-feel implementation will install a different keymap that resolves to the default keymap for those bindings not found in the different keymap. The minimal bindings include:

  • inserting content into the editor for the printable keys.
  • removing content with the backspace and del keys.
  • caret movement forward and backward

Model/View Split
The text components have a model-view split. A text component pulls together the objects used to represent the model, view, and controller. The text document model may be shared by other views which act as observers of the model (e.g. a document may be shared by multiple components).

The model is defined by the Document interface. This is intended to provide a flexible text storage mechanism that tracks change during edits and can be extended to more sophisticated models. The model interfaces are meant to capture the capabilities of expression given by SGML, a system used to express a wide variety of content. Each modification to the document causes notification of the details of the change to be sent to all observers in the form of a DocumentEvent which allows the views to stay up to date with the model. This event is sent to observers that have implemented the DocumentListener interface and registered interest with the model being observed.

Location Information
The capability of determining the location of text in the view is provided. There are two methods, modelToView(int) and viewToModel(java.awt.Point) for determining this information.

Undo/Redo support
Support for an edit history mechanism is provided to allow undo/redo operations. The text component does not itself provide the history buffer by default, but does provide the UndoableEdit records that can be used in conjunction with a history buffer to provide the undo/redo support. The support is provided by the Document model, which allows one to attach UndoableEditListener implementations.

Thread Safety
The swing text components provide some support of thread safe operations. Because of the high level of configurability of the text components, it is possible to circumvent the protection provided. The protection primarily comes from the model, so the documentation of AbstractDocument describes the assumptions of the protection provided. The methods that are safe to call asynchronously are marked with comments.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Document, DocumentEvent, DocumentListener, Caret, CaretEvent, CaretListener, TextUI, View, /, Serialized Form

Inner Class Summary
class | JTextComponent.AccessibleJTextComponent This class implements accessibility support for the JTextComponent class.
static class | JTextComponent.KeyBinding Binding record for creating key bindings.
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
static String | DEFAULT_KEYMAP This is the name of the default keymap that will be shared by all JTextComponent instances unless they have had a different keymap set.
static String | FOCUS_ACCELERATOR_KEY The bound property name for the focus accelerator.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JTextComponent()
Creates a new JTextComponent.
Method Summary
void | addCaretListener(CaretListener listener) Adds a caret listener for notification of any changes to the caret.
void | addInputMethodListener(InputMethodListener l) Adds the specified input method listener to receive input method events from this component.
static Keymap | addKeymap(String nm, Keymap parent) Adds a new keymap into the keymap hierarchy.
void | copy() Transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model.
void | cut() Transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model.
protected void | fireCaretUpdate(CaretEvent e) Notifies all listeners that have registered interest for notification on this event type.
AccessibleContext | getAccessibleContext() Gets the AccessibleContext associated with this JTextComponent.
Action[] | getActions() Fetches the command list for the editor.
Caret | getCaret() Fetches the caret that allows text-oriented navigation over the view.
Color | getCaretColor() Fetches the current color used to render the caret.
int | getCaretPosition() Returns the position of the text insertion caret for the text component.
Color | getDisabledTextColor() Fetches the current color used to render the selected text.
Document | getDocument() Fetches the model associated with the editor.
char | getFocusAccelerator() Returns the key accelerator that will cause the receiving text component to get the focus.
Highlighter | getHighlighter() Fetches the object responsible for making highlights.
InputMethodRequests | getInputMethodRequests() Gets the input method request handler which supports requests from input methods for this component.
Keymap | getKeymap() Fetches the keymap currently active in this text component.
static Keymap | getKeymap(String nm) Fetches a named keymap previously added to the document.
Insets | getMargin() Returns the margin between the text component's border and its text.
Dimension | getPreferredScrollableViewportSize() Returns the preferred size of the viewport for a view component.
int | getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
boolean | getScrollableTracksViewportHeight() Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.
boolean | getScrollableTracksViewportWidth() Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
int | getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.
String | getSelectedText() Returns the selected text contained in this TextComponent.
Color | getSelectedTextColor() Fetches the current color used to render the selected text.
Color | getSelectionColor() Fetches the current color used to render the selection.
int | getSelectionEnd() Returns the selected text's end position.
int | getSelectionStart() Returns the selected text's start position.
String | getText() Returns the text contained in this TextComponent.
String | getText(int offs, int len) Fetches a portion of the text represented by the component.
TextUI | getUI() Fetches the user-interface factory for this text-oriented editor.
boolean | isEditable() Returns the boolean indicating whether this TextComponent is editable or not.
boolean | isFocusTraversable() Returns true if the focus can be traversed.
static void | loadKeymap(Keymap map, JTextComponent.KeyBinding[] bindings, Action[] actions) Loads a keymap with a bunch of bindings.
Rectangle | modelToView(int pos) Converts the given location in the model to a place in the view coordinate system.
void | moveCaretPosition(int pos) Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called.
protected String | paramString() Returns a string representation of this JTextComponent.
void | paste() Transfers the contents of the system clipboard into the associated text model.
protected void | processInputMethodEvent(InputMethodEvent e) Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
void | read(Reader in, Object desc) Initializes from a stream.
void | removeCaretListener(CaretListener listener) Removes a caret listener.
static Keymap | removeKeymap(String nm) Removes a named keymap previously added to the document.
void | removeNotify() Notifies this component that it has been removed from its container.
void | replaceSelection(String content) Replaces the currently selected content with new content represented by the given string.
void | select(int selectionStart, int selectionEnd) Selects the text found between the specified start and end locations.
void | selectAll() Selects all the text in the TextComponent.
void | setCaret(Caret c) Sets the caret to be used.
void | setCaretColor(Color c) Sets the current color used to render the caret.
void | setCaretPosition(int position) Sets the position of the text insertion caret for the TextComponent.
void | setDisabledTextColor(Color c) Sets the current color used to render the disabled text.
void | setDocument(Document doc) Associates the editor with a text document.
void | setEditable(boolean b) Sets the specified boolean to indicate whether or not this TextComponent should be editable.
void | setFocusAccelerator(char aKey) Sets the key accelerator that will cause the receiving text component to get the focus.
void | setHighlighter(Highlighter h) Sets the highlighter to be used.
void | setKeymap(Keymap map) Sets the keymap to use for binding events to actions.
void | setMargin(Insets m) Sets margin space between the text component's border and its text.
void | setSelectedTextColor(Color c) Sets the current color used to render the selected text.
void | setSelectionColor(Color c) Sets the current color used to render the selection.
void | setSelectionEnd(int selectionEnd) Sets the selection end to the specified position.
void | setSelectionStart(int selectionStart) Sets the selection start to the specified position.
void | setText(String t) Sets the text of this TextComponent to the specified text.
void | setUI(TextUI ui) Sets the user-interface factory for this text-oriented editor
void | updateUI() Reloads the pluggable UI.
int | viewToModel(Point pt) Converts the given place in the view coordinate system to the nearest representative location in the model.
void | write(Writer out) Stores the contents of the model into the given stream.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

FOCUS_ACCELERATOR_KEY

public static final String FOCUS_ACCELERATOR_KEY
The bound property name for the focus accelerator.

DEFAULT_KEYMAP

public static final String DEFAULT_KEYMAP
This is the name of the default keymap that will be shared by all JTextComponent instances unless they have had a different keymap set.
Constructor Detail

JTextComponent

public JTextComponent()
Creates a new JTextComponent. Listeners for caret events are established, and the pluggable UI installed. The component is marked as editable. No layout manager is used, because layout is managed by the view subsystem of text. The document model is set to null.
Method Detail

getUI

public TextUI getUI()
Fetches the user-interface factory for this text-oriented editor.
Returns:
the factory

setUI

public void setUI(TextUI ui)
Sets the user-interface factory for this text-oriented editor
Parameters:
ui - the factory

updateUI

public void updateUI()
Reloads the pluggable UI. The key used to fetch the new interface is getUIClassID(). The type of the UI is TextUI. invalidate() is called after setting the UI.
Overrides:
updateUI in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.setUI(javax.swing.plaf.ComponentUI),
UIManager.getLookAndFeel(),
UIManager.getUI(javax.swing.JComponent)

addCaretListener

public void addCaretListener(CaretListener listener)
Adds a caret listener for notification of any changes to the caret.
Parameters:
listener - the listener
See Also:
CaretEvent

removeCaretListener

public void removeCaretListener(CaretListener listener)
Removes a caret listener.
Parameters:
listener - the listener
See Also:
CaretEvent

fireCaretUpdate

protected void fireCaretUpdate(CaretEvent e)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in a last-to-first manner.
Parameters:
e - the event
See Also:
EventListenerList

setDocument

public void setDocument(Document doc)
Associates the editor with a text document. The currently registered factory is used to build a view for the document, which gets displayed by the editor after revalidation. A PropertyChange event ("document") is propagated to each listener.
Parameters:
doc - the document to display/edit
See Also:
getDocument()

getDocument

public Document getDocument()
Fetches the model associated with the editor. This is primarily for the UI to get at the minimal amount of state required to be a text editor. Subclasses will return the actual type of the model which will typically be something that extends Document.
Returns:
the model

getActions

public Action[] getActions()
Fetches the command list for the editor. This is the list of commands supported by the plugged-in UI augmented by the collection of commands that the editor itself supports. These are useful for binding to events, such as in a keymap.
Returns:
the command list

setMargin

public void setMargin(Insets m)
Sets margin space between the text component's border and its text. The text component's default Border object will use this value to create the proper margin. However, if a non-default border is set on the text component, it is that Border object's responsibility to create the appropriate margin space (else this property will effectively be ignored). This causes a redraw of the component. A PropertyChange event ("margin") is sent to all listeners.
Parameters:
m - the space between the border and the text

getMargin

public Insets getMargin()
Returns the margin between the text component's border and its text.
Returns:
the margin

getCaret

public Caret getCaret()
Fetches the caret that allows text-oriented navigation over the view.
Returns:
the caret

setCaret

public void setCaret(Caret c)
Sets the caret to be used. By default this will be set by the UI that gets installed. This can be changed to a custom caret if desired. Setting the caret results in a PropertyChange event ("caret") being fired.
Parameters:
c - the caret
See Also:
getCaret()

getHighlighter

public Highlighter getHighlighter()
Fetches the object responsible for making highlights.
Returns:
the highlighter

setHighlighter

public void setHighlighter(Highlighter h)
Sets the highlighter to be used. By default this will be set by the UI that gets installed. This can be changed to a custom highlighter if desired. The highlighter can be set to null to disable it. A PropertyChange event ("highlighter") is fired when a new highlighter is installed.
Parameters:
h - the highlighter
See Also:
getHighlighter()

setKeymap

public void setKeymap(Keymap map)
Sets the keymap to use for binding events to actions. Setting to null effectively disables keyboard input. A PropertyChange event ("keymap") is fired when a new keymap is installed.
Parameters:
map - the keymap
See Also:
getKeymap()

getKeymap

public Keymap getKeymap()
Fetches the keymap currently active in this text component.
Returns:
the keymap

addKeymap

public static Keymap addKeymap(String nm,
                               Keymap parent)
Adds a new keymap into the keymap hierarchy. Keymap bindings resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.
Parameters:
nm - the name of the keymap (must be unique within the collection of named keymaps in the document). The name may be null if the keymap is unnamed, but the caller is responsible for managing the reference returned as an unnamed keymap can't be fetched by name.
parent - the parent keymap. This may be null if unspecified bindings need not be resolved in some other keymap.
Returns:
the keymap

removeKeymap

public static Keymap removeKeymap(String nm)
Removes a named keymap previously added to the document. Keymaps with null names may not be removed in this way.
Parameters:
nm - the name of the keymap to remove
Returns:
the keymap that was removed

getKeymap

public static Keymap getKeymap(String nm)
Fetches a named keymap previously added to the document. This does not work with null-named keymaps.
Parameters:
nm - the name of the keymap
Returns:
the keymap

loadKeymap

public static void loadKeymap(Keymap map,
                              JTextComponent.KeyBinding[] bindings,
                              Action[] actions)

Loads a keymap with a bunch of bindings. This can be used to take a static table of definitions and load them into some keymap. The following example illustrates an example of binding some keys to the cut, copy, and paste actions associated with a JTextComponent. A code fragment to accomplish this might look as follows:

   static final JTextComponent.KeyBinding[] defaultBindings = {
     new JTextComponent.KeyBinding(
       KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),
       DefaultEditorKit.copyAction),
     new JTextComponent.KeyBinding(
       KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK),
       DefaultEditorKit.pasteAction),
     new JTextComponent.KeyBinding(
       KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK),
       DefaultEditorKit.cutAction),
   };

   JTextComponent c = new JTextPane();
   Keymap k = c.getKeymap();
   JTextComponent.loadKeymap(k, defaultBindings, c.getActions());
The sets of bindings and actions may be empty but must be non-null.
Parameters:
map - the keymap
bindings - the bindings
actions - the set of actions

getCaretColor

public Color getCaretColor()
Fetches the current color used to render the caret.
Returns:
the color

setCaretColor

public void setCaretColor(Color c)
Sets the current color used to render the caret. Setting to null effectively restores the default color. Setting the color results in a PropertyChange event ("caretColor") being fired.
Parameters:
c - the color
See Also:
getCaretColor()

getSelectionColor

public Color getSelectionColor()
Fetches the current color used to render the selection.
Returns:
the color

setSelectionColor

public void setSelectionColor(Color c)
Sets the current color used to render the selection. Setting the color to null is the same as setting Color.white. Setting the color results in a PropertyChange event ("selectionColor").
Parameters:
c - the color
See Also:
getSelectionColor()

getSelectedTextColor

public Color getSelectedTextColor()
Fetches the current color used to render the selected text.
Returns:
the color

setSelectedTextColor

public void setSelectedTextColor(Color c)
Sets the current color used to render the selected text. Setting the color to null is the same as Color.black. Setting the color results in a PropertyChange event ("selectedTextColor") being fired.
Parameters:
c - the color
See Also:
getSelectedTextColor()

getDisabledTextColor

public Color getDisabledTextColor()
Fetches the current color used to render the selected text.
Returns:
the color

setDisabledTextColor

public void setDisabledTextColor(Color c)
Sets the current color used to render the disabled text. Setting the color fires off a PropertyChange event ("disabledTextColor").
Parameters:
c - the color
See Also:
getDisabledTextColor()

replaceSelection

public void replaceSelection(String content)
Replaces the currently selected content with new content represented by the given string. If there is no selection this amounts to an insert of the given text. If there is no replacement text this amounts to a removal of the current selection.

This is the method that is used by the default implementation of the action for inserting content that gets bound to the keymap actions.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
content - the content to replace the selection with

getText

public String getText(int offs,
                      int len)
               throws BadLocationException
Fetches a portion of the text represented by the component. Returns an empty string if length is 0.
Parameters:
offs - the offset >= 0
len - the length >= 0
Returns:
the text
Throws:
BadLocationException - if the offset or length are invalid

modelToView

public Rectangle modelToView(int pos)
                      throws BadLocationException
Converts the given location in the model to a place in the view coordinate system. The component must have a positive size for this translation to be computed (i.e. layout cannot be computed until the component has been sized). The component does not have to be visible or painted.
Parameters:
pos - the position >= 0
Returns:
the coordinates as a rectangle, with (r.x, r.y) as the location in the coordinate system, or null if the component does not yet have a positive size.
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
TextUI.modelToView(javax.swing.text.JTextComponent, int)

viewToModel

public int viewToModel(Point pt)
Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a positive size for this translation to be computed (i.e. layout cannot be computed until the component has been sized). The component does not have to be visible or painted.
Parameters:
pt - the location in the view to translate
Returns:
the offset >= 0 from the start of the document, or -1 if the component does not yet have a positive size.
See Also:
TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)

cut

public void cut()
Transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the model. The current selection is reset. Does nothing for null selections.

copy

public void copy()
Transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model. The current selection is remains intact. Does nothing for null selections.

paste

public void paste()
Transfers the contents of the system clipboard into the associated text model. If there is a selection in the associated view, it is replaced with the contents of the clipboard. If there is no selection, the clipboard contents are inserted in front of the current insert position in the associated view. If the clipboard is empty, does nothing.
See Also:
replaceSelection(java.lang.String)

moveCaretPosition

public void moveCaretPosition(int pos)
Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called. This forms a selection.
Parameters:
pos - the position
See Also:
setCaretPosition(int)

setFocusAccelerator

public void setFocusAccelerator(char aKey)
Sets the key accelerator that will cause the receiving text component to get the focus. The accelerator will be the key combination of the alt key and the character given (converted to upper case). By default, there is no focus accelerator key. Any previous key accelerator setting will be superseded. A '\0' key setting will be registered, and has the effect of turning off the focus accelerator. When the new key is set, a PropertyChange event (FOCUS_ACCELERATOR_KEY) will be fired.
Parameters:
aKey - the key
See Also:
getFocusAccelerator()

getFocusAccelerator

public char getFocusAccelerator()
Returns the key accelerator that will cause the receiving text component to get the focus. Return '\0' if no focus accelerator has been set.
Returns:
the key

read

public void read(Reader in,
                 Object desc)
          throws IOException
Initializes from a stream. This creates a model of the type appropriate for the component and initializes the model from the stream. By default this will load the model as plain text. Previous contents of the model are discarded.
Parameters:
in - The stream to read from
desc - An object describing the stream. This might be a string, a File, a URL, etc. Some kinds of documents (such as html for example) might be able to make use of this information. If non-null, it is added as a property of the document.
Throws:
IOException - as thrown by the stream being used to initialize.
See Also:
EditorKit.createDefaultDocument(), setDocument(javax.swing.text.Document), PlainDocument

write

public void write(Writer out)
           throws IOException
Stores the contents of the model into the given stream. By default this will store the model as plain text.
Parameters:
out - the output stream
Throws:
IOException - on any I/O error

removeNotify

public void removeNotify()
Notifies this component that it has been removed from its container. This is used to remove the reference to this component as the last focused component, if such a reference exists (i.e. to support TextAction).
Overrides:
removeNotify in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

isFocusTraversable

public boolean isFocusTraversable()
Returns true if the focus can be traversed. This would be false for components like a disabled button.
Overrides:
isFocusTraversable in class JComponent
Returns:
true if the focus is traversable

setCaretPosition

public void setCaretPosition(int position)
Sets the position of the text insertion caret for the TextComponent. Note that the caret tracks change, so this may move if the underlying text of the component is changed. If the document is null, does nothing.
Parameters:
position - the position

getCaretPosition

public int getCaretPosition()
Returns the position of the text insertion caret for the text component.
Returns:
the position of the text insertion caret for the text component >= 0

setText

public void setText(String t)
Sets the text of this TextComponent to the specified text. If the text is null or empty, has the effect of simply deleting the old text.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Parameters:
t - the new text to be set
See Also:
getText(int, int)

getText

public String getText()
Returns the text contained in this TextComponent. If the underlying document is null, will give a NullPointerException.
Returns:
the text
See Also:
setText(java.lang.String)

getSelectedText

public String getSelectedText()
Returns the selected text contained in this TextComponent. If the selection is null or the document empty, returns null.
Returns:
the text
Throws:
IllegalArgumentException - if the selection doesn't have a valid mapping into the document for some reason
See Also:
setText(java.lang.String)

isEditable

public boolean isEditable()
Returns the boolean indicating whether this TextComponent is editable or not.
Returns:
the boolean value
See Also:
setEditable(boolean)

setEditable

public void setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable. A PropertyChange event ("editable") is fired when the state is changed.
Parameters:
b - the boolean to be set
See Also:
isEditable()

getSelectionStart

public int getSelectionStart()
Returns the selected text's start position. Return 0 for an empty document, or the value of dot if no selection.
Returns:
the start position >= 0

setSelectionStart

public void setSelectionStart(int selectionStart)
Sets the selection start to the specified position. The new starting point is constrained to be before or at the current selection end.

This is available for backward compatiblitity to code that called this method on java.awt.TextComponent. This is implemented to forward to the Caret implementation which is where the actual selection is maintained.

Parameters:
selectionStart - the start position of the text >= 0

getSelectionEnd

public int getSelectionEnd()
Returns the selected text's end position. Return 0 if the document is empty, or the value of dot if there is no selection.
Returns:
the end position >= 0

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Sets the selection end to the specified position. The new end point is constrained to be at or after the current selection start.

This is available for backward compatiblitity to code that called this method on java.awt.TextComponent. This is implemented to forward to the Caret implementation which is where the actual selection is maintained.

Parameters:
selectionEnd - the end position of the text >= 0

select

public void select(int selectionStart,
                   int selectionEnd)
Selects the text found between the specified start and end locations. This call is provided for backward compatibility. It is routed to a call to setCaretPosition followed by a call to moveCaretPostion. The preferred way to manage selection is by calling those methods directly.
Parameters:
selectionStart - the start position of the text >= 0
selectionEnd - the end position of the text >= 0
See Also:
setCaretPosition(int), moveCaretPosition(int)

selectAll

public void selectAll()
Selects all the text in the TextComponent. Does nothing on a null or empty document.

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for a view component. This is implemented to do the default behavior of returning the preferred size of the component.
Specified by:
getPreferredScrollableViewportSize in interface Scrollable
Returns:
The preferredSize of a JViewport whose view is this Scrollable.

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation. Ideally, components should handle a partially exposed row or column by returning the distance required to completely expose the item.

The default implementation of this is to simply return 10% of the visible area. Subclasses are likely to be able to provide a much more reasonable value.

Specified by:
getScrollableUnitIncrement in interface Scrollable
Parameters:
visibleRect - The view area visible within the viewport
orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
direction - Less than zero to scroll up/left, greater than zero for down/right.
Returns:
The "unit" increment for scrolling in the specified direction
Throws:
IllegalArgumentException - for an invalid orientation
See Also:
JScrollBar.setUnitIncrement(int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.

The default implementation of this is to simply return the visible area. Subclasses will likely be able to provide a much more reasonable value.

Specified by:
getScrollableBlockIncrement in interface Scrollable
Parameters:
visibleRect - The view area visible within the viewport
orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
direction - Less than zero to scroll up/left, greater than zero for down/right.
Returns:
The "block" increment for scrolling in the specified direction.
Throws:
IllegalArgumentException - for an invalid orientation
See Also:
JScrollBar.setBlockIncrement(int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport. For example a normal text view that supported line wrapping would return true here, since it would be undesirable for wrapped lines to disappear beyond the right edge of the viewport. Note that returning true for a Scrollable whose ancestor is a JScrollPane effectively disables horizontal scrolling.

Scrolling containers, like JViewport, will use this method each time they are validated.

Specified by:
getScrollableTracksViewportWidth in interface Scrollable
Returns:
true if a viewport should force the Scrollables width to match its own.

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport. For example a columnar text view that flowed text in left to right columns could effectively disable vertical scrolling by returning true here.

Scrolling containers, like JViewport, will use this method each time they are validated.

Specified by:
getScrollableTracksViewportHeight in interface Scrollable
Returns:
true if a viewport should force the Scrollables height to match its own.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JTextComponent. For text components, the AccessibleContext takes the form of an AccessibleJTextComponent. A new AccessibleJTextComponent instance is created if necessary.
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJTextComponent that serves as the AccessibleContext of this JTextComponent

paramString

protected String paramString()
Returns a string representation of this JTextComponent. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overriding paramString() to provide information about the specific new aspects of the JFC components.

Overrides:
paramString in class JComponent
Returns:
a string representation of this JTextComponent.

processInputMethodEvent

protected void processInputMethodEvent(InputMethodEvent e)
Description copied from class: Component
Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.

This method is not called unless input method events are enabled for this component. Input method events are enabled when one of the following occurs:

  • An InputMethodListener object is registered via addInputMethodListener.
  • Input method events are enabled via enableEvents.
Overrides:
processInputMethodEvent in class Component
Following copied from class: java.awt.Component
Parameters:
e - the input method event
See Also:
InputMethodEvent, InputMethodListener, Component.addInputMethodListener(java.awt.event.InputMethodListener), Component.enableEvents(long)

getInputMethodRequests

public InputMethodRequests getInputMethodRequests()
Description copied from class: Component
Gets the input method request handler which supports requests from input methods for this component. A component that supports on-the-spot text input must override this method to return an InputMethodRequests instance. At the same time, it also has to handle input method events.
Overrides:
getInputMethodRequests in class Component
Following copied from class: java.awt.Component
Returns:
the input method request handler for this component, null by default.
See Also:
Component.addInputMethodListener(java.awt.event.InputMethodListener)

addInputMethodListener

public void addInputMethodListener(InputMethodListener l)
Description copied from class: Component
Adds the specified input method listener to receive input method events from this component. A component will only receive input method events from input methods if it also overrides getInputMethodRequests to return an InputMethodRequests instance. If l is null, no exception is thrown and no action is performed.
Overrides:
addInputMethodListener in class Component
Following copied from class: java.awt.Component
Parameters:
l - the input method listener.
See Also:
InputMethodEvent, InputMethodListener, Component.removeInputMethodListener(java.awt.event.InputMethodListener), Component.getInputMethodRequests()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeyBinding

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class JTextComponent.KeyBinding

java.lang.Object
  |
  +--javax.swing.text.JTextComponent.KeyBinding
Enclosing class:
JTextComponent
public static class JTextComponent.KeyBinding
extends Object

Binding record for creating key bindings.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Field Summary
String | actionName The name of the action for the key.
KeyStroke | key The key.
Constructor Summary
JTextComponent.KeyBinding(KeyStroke key, String actionName)
Creates a new key binding.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

key

public KeyStroke key
The key.

actionName

public String actionName
The name of the action for the key.
Constructor Detail

JTextComponent.KeyBinding

public JTextComponent.KeyBinding(KeyStroke key,
                                 String actionName)
Creates a new key binding.
Parameters:
key - the key
actionName - the name of the action for the key
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Keymap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Keymap

public interface Keymap

A collection of bindings of KeyStrokes to actions. The bindings are basically name-value pairs that potentially resolve in a hierarchy.

Method Summary
void | addActionForKeyStroke(KeyStroke key, Action a) Adds a binding to the keymap.
Action | getAction(KeyStroke key) Fetches the action appropriate for the given symbolic event sequence.
Action[] | getBoundActions() Fetches all of the actions defined in this keymap.
KeyStroke[] | getBoundKeyStrokes() Fetches all of the keystrokes in this map that are bound to some action.
Action | getDefaultAction() Fetches the default action to fire if a key is typed (i.e.
KeyStroke[] | getKeyStrokesForAction(Action a) Fetches the keystrokes that will result in the given action.
String | getName() Fetches the name of the set of key-bindings.
Keymap | getResolveParent() Fetches the parent keymap used to resolve key-bindings.
boolean | isLocallyDefined(KeyStroke key) Determines if the given key sequence is locally defined.
void | removeBindings() Removes all bindings from the keymap.
void | removeKeyStrokeBinding(KeyStroke keys) Removes a binding from the keymap.
void | setDefaultAction(Action a) Set the default action to fire if a key is typed.
void | setResolveParent(Keymap parent) Sets the parent keymap, which will be used to resolve key-bindings.

Method Detail

getName

public String getName()
Fetches the name of the set of key-bindings.
Returns:
the name

getDefaultAction

public Action getDefaultAction()
Fetches the default action to fire if a key is typed (i.e. a KEY_TYPED KeyEvent is received) and there is no binding for it. Typically this would be some action that inserts text so that the keymap doesn't require an action for each possible key.
Returns:
the default action

setDefaultAction

public void setDefaultAction(Action a)
Set the default action to fire if a key is typed.
Parameters:
a - the action

getAction

public Action getAction(KeyStroke key)
Fetches the action appropriate for the given symbolic event sequence. This is used by JTextController to determine how to interpret key sequences. If the binding is not resolved locally, an attempt is made to resolve through the parent keymap, if one is set.
Parameters:
key - the key sequence

getBoundKeyStrokes

public KeyStroke[] getBoundKeyStrokes()
Fetches all of the keystrokes in this map that are bound to some action.
Returns:
the list of keystrokes

getBoundActions

public Action[] getBoundActions()
Fetches all of the actions defined in this keymap.
Returns:
the list of actions

getKeyStrokesForAction

public KeyStroke[] getKeyStrokesForAction(Action a)
Fetches the keystrokes that will result in the given action.
Parameters:
a - the action
Returns:
the list of keystrokes

isLocallyDefined

public boolean isLocallyDefined(KeyStroke key)
Determines if the given key sequence is locally defined.
Parameters:
key - the key sequence
Returns:
true if the key sequence is locally defined else false

addActionForKeyStroke

public void addActionForKeyStroke(KeyStroke key,
                                  Action a)
Adds a binding to the keymap.
Parameters:
key - the key sequence
a - the action

removeKeyStrokeBinding

public void removeKeyStrokeBinding(KeyStroke keys)
Removes a binding from the keymap.
Parameters:
keys - the key sequence

removeBindings

public void removeBindings()
Removes all bindings from the keymap.

getResolveParent

public Keymap getResolveParent()
Fetches the parent keymap used to resolve key-bindings.
Returns:
the keymap

setResolveParent

public void setResolveParent(Keymap parent)
Sets the parent keymap, which will be used to resolve key-bindings.
Parameters:
parent - the parent keymap
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LabelView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class LabelView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.GlyphView
              |
              +--javax.swing.text.LabelView
All Implemented Interfaces:
Cloneable, SwingConstants, TabableView
Direct Known Subclasses:
InlineView
public class LabelView
extends GlyphView
implements TabableView

A LabelView is a styled chunk of text that represents a view mapped over an element in the text model. It caches the character level attributes used for rendering.

Inner classes inherited from class javax.swing.text.GlyphView
GlyphView.GlyphPainter
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
LabelView(Element elem)
Constructs a new view wrapped on an element.
Method Summary
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
Color | getBackground() Fetch the background color to use to render the glyphs.
Font | getFont() Fetch the font that the glyphs should be based upon.
protected FontMetrics | getFontMetrics() Deprecated. FontMetrics are not used for glyph rendering when running in the Java2 SDK.
Color | getForeground() Fetch the foreground color to use to render the glyphs.
boolean | isStrikeThrough() Determine if the glyphs should have a strikethrough line.
boolean | isSubscript() Determine if the glyphs should be rendered as superscript.
boolean | isSuperscript() Determine if the glyphs should be rendered as subscript.
boolean | isUnderline() Determine if the glyphs should be underlined.
protected void | setPropertiesFromAttributes() Set the cached properties from the attributes.
protected void | setStrikeThrough(boolean s) Set whether or not the view has a strike/line through it.
protected void | setSubscript(boolean s) Set whether or not the view represents a subscript.
protected void | setSuperscript(boolean s) Set whether or not the view represents a superscript.
protected void | setUnderline(boolean u) Set whether or not the view is underlined.
Methods inherited from class javax.swing.text.GlyphView
breakView, checkPainter, clone, createFragment, getAlignment, getBreakWeight, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, insertUpdate, modelToView, paint, removeUpdate, setGlyphPainter, viewToModel
Methods inherited from class javax.swing.text.View
append, forwardUpdate, forwardUpdateToView, getAttributes, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.TabableView
getPartialSpan, getTabbedSpan

Constructor Detail

LabelView

public LabelView(Element elem)
Constructs a new view wrapped on an element.
Parameters:
elem - the element
Method Detail

setUnderline

protected void setUnderline(boolean u)
Set whether or not the view is underlined.

setStrikeThrough

protected void setStrikeThrough(boolean s)
Set whether or not the view has a strike/line through it.

setSuperscript

protected void setSuperscript(boolean s)
Set whether or not the view represents a superscript.

setSubscript

protected void setSubscript(boolean s)
Set whether or not the view represents a subscript.

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Set the cached properties from the attributes.

getFontMetrics

protected FontMetrics getFontMetrics()
Deprecated. FontMetrics are not used for glyph rendering when running in the Java2 SDK.

Fetch the FontMetrics used for this view.

getBackground

public Color getBackground()
Fetch the background color to use to render the glyphs. If there is no background color, null should be returned. This is implemented to return a cached background color.
Overrides:
getBackground in class GlyphView

getForeground

public Color getForeground()
Fetch the foreground color to use to render the glyphs. If there is no foreground color, null should be returned. This is implemented to return a cached foreground color.
Overrides:
getForeground in class GlyphView

getFont

public Font getFont()
Fetch the font that the glyphs should be based upon. This is implemented to return a cached font.
Overrides:
getFont in class GlyphView

isUnderline

public boolean isUnderline()
Determine if the glyphs should be underlined. If true, an underline should be drawn through the baseline.
Overrides:
isUnderline in class GlyphView

isStrikeThrough

public boolean isStrikeThrough()
Determine if the glyphs should have a strikethrough line. If true, a line should be drawn through the center of the glyphs.
Overrides:
isStrikeThrough in class GlyphView

isSubscript

public boolean isSubscript()
Determine if the glyphs should be rendered as superscript.
Overrides:
isSubscript in class GlyphView

isSuperscript

public boolean isSuperscript()
Determine if the glyphs should be rendered as subscript.
Overrides:
isSuperscript in class GlyphView

changedUpdate

public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class GlyphView
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LayeredHighlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class LayeredHighlighter

java.lang.Object
  |
  +--javax.swing.text.LayeredHighlighter
All Implemented Interfaces:
Highlighter
Direct Known Subclasses:
DefaultHighlighter
public abstract class LayeredHighlighter
extends Object
implements Highlighter

See Also:
Highlighter

Inner Class Summary
static class LayeredHighlighter.LayerPainter
Layered highlight renderer.
Inner classes inherited from class javax.swing.text.Highlighter
Highlighter.Highlight, Highlighter.HighlightPainter
Constructor Summary
LayeredHighlighter()
Method Summary
abstract  void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
When leaf Views (such as LabelView) are rendering they should call into this method.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.Highlighter
addHighlight, changeHighlight, deinstall, getHighlights, install, paint, removeAllHighlights, removeHighlight

Constructor Detail

LayeredHighlighter

public LayeredHighlighter()
Method Detail

paintLayeredHighlights

public abstract void paintLayeredHighlights(Graphics g,
                                            int p0,
                                            int p1,
                                            Shape viewBounds,
                                            JTextComponent editor,
                                            View view)
When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately.
Parameters:
g - Graphics used to draw
p0 - starting offset of view
p1 - ending offset of view
viewBounds - Bounds of View
editor - JTextComponent
view - View instance being rendered
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LayerPainter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class LayeredHighlighter.LayerPainter

java.lang.Object
  |
  +--javax.swing.text.LayeredHighlighter.LayerPainter
All Implemented Interfaces:
Highlighter.HighlightPainter
Direct Known Subclasses:
DefaultHighlighter.DefaultHighlightPainter
Enclosing class:
LayeredHighlighter
public abstract static class LayeredHighlighter.LayerPainter
extends Object
implements Highlighter.HighlightPainter

Layered highlight renderer.

Constructor Summary
LayeredHighlighter.LayerPainter()
Method Summary
abstract  Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.Highlighter.HighlightPainter
paint

Constructor Detail

LayeredHighlighter.LayerPainter

public LayeredHighlighter.LayerPainter()
Method Detail

paintLayer

public abstract Shape paintLayer(Graphics g,
                                 int p0,
                                 int p1,
                                 Shape viewBounds,
                                 JTextComponent editor,
                                 View view)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LayoutQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class LayoutQueue

java.lang.Object
  |
  +--javax.swing.text.LayoutQueue
public class LayoutQueue
extends Object

A queue of text layout tasks.

Since:
1.3
See Also:
AsyncBoxView

Constructor Summary
LayoutQueue()
Construct a layout queue.
Method Summary
void | addTask(Runnable task) Add a task that is not needed immediately because the results are not believed to be visible.
static LayoutQueue | getDefaultQueue() Fetch the default layout queue.
static void | setDefaultQueue(LayoutQueue q) Set the default layout queue.
protected Runnable | waitForWork() Used by the worker thread to get a new task to execute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LayoutQueue

public LayoutQueue()
Construct a layout queue.
Method Detail

getDefaultQueue

public static LayoutQueue getDefaultQueue()
Fetch the default layout queue.

setDefaultQueue

public static void setDefaultQueue(LayoutQueue q)
Set the default layout queue.
Parameters:
q - the new queue.

addTask

public void addTask(Runnable task)
Add a task that is not needed immediately because the results are not believed to be visible.

waitForWork

protected Runnable waitForWork()
Used by the worker thread to get a new task to execute
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LeafElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class AbstractDocument.LeafElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.LeafElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Direct Known Subclasses:
HTMLDocument.RunElement
Enclosing class:
AbstractDocument
public class AbstractDocument.LeafElement
extends AbstractDocument.AbstractElement

Implements an element that directly represents content of some kind.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Element, Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
AbstractDocument.LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
Constructs an element that represents content within the document (has no children).
Method Summary
Enumeration | children() Returns the children of the reciever as an Enumeration.
boolean | getAllowsChildren() Returns true if the receiver allows children.
Element | getElement(int index) Gets a child element.
int | getElementCount() Returns the number of child elements.
int | getElementIndex(int pos) Gets the child element index closest to the given model offset.
int | getEndOffset() Gets the ending offset in the model for the element.
String | getName() Gets the element name.
int | getStartOffset() Gets the starting offset in the model for the element.
boolean | isLeaf() Checks whether the element is a leaf.
String | toString() Converts the element to a string.
Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbstractDocument.LeafElement

public AbstractDocument.LeafElement(Element parent,
                                    AttributeSet a,
                                    int offs0,
                                    int offs1)
Constructs an element that represents content within the document (has no children).
Parameters:
parent - The parent element
a - The element attributes
offs0 - The start offset >= 0
offs1 - The end offset >= offs0
Method Detail

toString

public String toString()
Converts the element to a string.
Overrides:
toString in class Object
Returns:
the string

getStartOffset

public int getStartOffset()
Gets the starting offset in the model for the element.
Overrides:
getStartOffset in class AbstractDocument.AbstractElement
Returns:
the offset >= 0

getEndOffset

public int getEndOffset()
Gets the ending offset in the model for the element.
Overrides:
getEndOffset in class AbstractDocument.AbstractElement
Returns:
the offset >= 0

getName

public String getName()
Gets the element name.
Overrides:
getName in class AbstractDocument.AbstractElement
Returns:
the name

getElementIndex

public int getElementIndex(int pos)
Gets the child element index closest to the given model offset.
Overrides:
getElementIndex in class AbstractDocument.AbstractElement
Parameters:
pos - the offset >= 0
Returns:
the element index >= 0

getElement

public Element getElement(int index)
Gets a child element.
Overrides:
getElement in class AbstractDocument.AbstractElement
Parameters:
index - the child index, >= 0 && Returns:
the child element

getElementCount

public int getElementCount()
Returns the number of child elements.
Overrides:
getElementCount in class AbstractDocument.AbstractElement
Returns:
the number of children >= 0

isLeaf

public boolean isLeaf()
Checks whether the element is a leaf.
Overrides:
isLeaf in class AbstractDocument.AbstractElement
Returns:
true if a leaf

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children.
Overrides:
getAllowsChildren in class AbstractDocument.AbstractElement

children

public Enumeration children()
Returns the children of the reciever as an Enumeration.
Overrides:
children in class AbstractDocument.AbstractElement
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MutableAttributeSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface MutableAttributeSet

All Superinterfaces:
AttributeSet
All Known Subinterfaces:
Style
All Known Implementing Classes:
SimpleAttributeSet, AbstractDocument.AbstractElement
public interface MutableAttributeSet
extends AttributeSet

A generic interface for a mutable collection of unique attributes. Implementations will probably want to provide a constructor of the form: public XXXAttributeSet(ConstAttributeSet source);

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Method Summary
void | addAttribute(Object name, Object value) Creates a new attribute set similar to this one except that it contains an attribute with the given name and value.
void | addAttributes(AttributeSet attributes) Creates a new attribute set similar to this one except that it contains the given attributes and values.
void | removeAttribute(Object name) Creates a new attribute set similar to this one except that it contains no attribute with the given name.
void | removeAttributes(AttributeSet attributes) Creates a new attribute set similar to this one except that it contains no attribute with any of the given names and values.
void | removeAttributes(Enumeration names) Creates a new attribute set similar to this one except that it contains no attribute with any of the given names.
void | setResolveParent(AttributeSet parent) Sets the resolving parent.
Methods inherited from interface javax.swing.text.AttributeSet
containsAttribute, containsAttributes, copyAttributes, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, isDefined, isEqual

Method Detail

addAttribute

public void addAttribute(Object name,
                         Object value)
Creates a new attribute set similar to this one except that it contains an attribute with the given name and value. The object must be immutable, or not mutated by any client.
Parameters:
name - the name
value - the value

addAttributes

public void addAttributes(AttributeSet attributes)
Creates a new attribute set similar to this one except that it contains the given attributes and values.
Parameters:
attributes - the set of attributes

removeAttribute

public void removeAttribute(Object name)
Creates a new attribute set similar to this one except that it contains no attribute with the given name.
Parameters:
name - the attribute name

removeAttributes

public void removeAttributes(Enumeration names)
Creates a new attribute set similar to this one except that it contains no attribute with any of the given names.
Parameters:
names - the set of names

removeAttributes

public void removeAttributes(AttributeSet attributes)
Creates a new attribute set similar to this one except that it contains no attribute with any of the given names and values. Existing attributes with the same name and different value will remain.
Parameters:
attributes - the set of attributes

setResolveParent

public void setResolveParent(AttributeSet parent)
Sets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally.
Parameters:
parent - the parent
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamedStyle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleContext.NamedStyle

java.lang.Object
  |
  +--javax.swing.text.StyleContext.NamedStyle
All Implemented Interfaces:
AttributeSet, MutableAttributeSet, Serializable, Style
Enclosing class:
StyleContext
public class StyleContext.NamedStyle
extends Object
implements Style, Serializable

A collection of attributes, typically used to represent character and paragraph styles. This is an implementation of MutableAttributeSet that can be observed if desired. These styles will take advantage of immutability while the sets are small enough, and may be substantially more efficient than something like SimpleAttributeSet.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Field Summary
protected ChangeEvent | changeEvent Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected EventListenerList | listenerList The change listeners for the model.
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
StyleContext.NamedStyle()
Creates a new named style, with a null name and parent.
StyleContext.NamedStyle(String name, Style parent)
Creates a new named style.
StyleContext.NamedStyle(Style parent)
Creates a new named style.
Method Summary
void | addAttribute(Object name, Object value) Adds an attribute.
void | addAttributes(AttributeSet attr) Adds a set of attributes to the element.
void | addChangeListener(ChangeListener l) Adds a change listener.
boolean | containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
boolean | containsAttributes(AttributeSet attrs) Checks whether the element contains all the attributes.
AttributeSet | copyAttributes() Copies a set of attributes.
protected void | fireStateChanged() Notifies all listeners that have registered interest for notification on this event type.
Object | getAttribute(Object attrName) Gets the value of an attribute.
int | getAttributeCount() Gets the number of attributes that are defined.
Enumeration | getAttributeNames() Gets the names of all attributes.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
String | getName() Fetches the name of the style.
AttributeSet | getResolveParent() Gets attributes from the parent.
boolean | isDefined(Object attrName) Checks whether a given attribute is defined.
boolean | isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
void | removeAttribute(Object name) Removes an attribute from the set.
void | removeAttributes(AttributeSet attrs) Removes a set of attributes for the element.
void | removeAttributes(Enumeration names) Removes a set of attributes for the element.
void | removeChangeListener(ChangeListener l) Removes a change listener.
void | setName(String name) Changes the name of the style.
void | setResolveParent(AttributeSet parent) Sets the resolving parent.
String | toString() Converts the style to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

listenerList

protected EventListenerList listenerList
The change listeners for the model.

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".
Constructor Detail

StyleContext.NamedStyle

public StyleContext.NamedStyle(String name,
                               Style parent)
Creates a new named style.
Parameters:
name - the style name, null for unnamed
parent - the parent style, null if none

StyleContext.NamedStyle

public StyleContext.NamedStyle(Style parent)
Creates a new named style.
Parameters:
parent - the parent style, null if none

StyleContext.NamedStyle

public StyleContext.NamedStyle()
Creates a new named style, with a null name and parent.
Method Detail

toString

public String toString()
Converts the style to a string.
Overrides:
toString in class Object
Returns:
the string

getName

public String getName()
Fetches the name of the style. A style is not required to be named, so null is returned if there is no name associated with the style.
Specified by:
getName in interface Style
Returns:
the name

setName

public void setName(String name)
Changes the name of the style. Does nothing with a null name.
Parameters:
name - the new name

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a change listener.
Specified by:
addChangeListener in interface Style
Parameters:
l - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a change listener.
Specified by:
removeChangeListener in interface Style
Parameters:
l - the change listener

fireStateChanged

protected void fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3

getAttributeCount

public int getAttributeCount()
Gets the number of attributes that are defined.
Specified by:
getAttributeCount in interface AttributeSet
Returns:
the number of attributes >= 0
See Also:
AttributeSet.getAttributeCount()

isDefined

public boolean isDefined(Object attrName)
Checks whether a given attribute is defined.
Specified by:
isDefined in interface AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
true if the attribute is defined
See Also:
AttributeSet.isDefined(java.lang.Object)

isEqual

public boolean isEqual(AttributeSet attr)
Checks whether two attribute sets are equal.
Specified by:
isEqual in interface AttributeSet
Parameters:
attr - the attribute set to check against
Returns:
true if the same
See Also:
AttributeSet.isEqual(javax.swing.text.AttributeSet)

copyAttributes

public AttributeSet copyAttributes()
Copies a set of attributes.
Specified by:
copyAttributes in interface AttributeSet
Returns:
the copy
See Also:
AttributeSet.copyAttributes()

getAttribute

public Object getAttribute(Object attrName)
Gets the value of an attribute.
Specified by:
getAttribute in interface AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
the attribute value
See Also:
AttributeSet.getAttribute(java.lang.Object)

getAttributeNames

public Enumeration getAttributeNames()
Gets the names of all attributes.
Specified by:
getAttributeNames in interface AttributeSet
Returns:
the attribute names as an enumeration
See Also:
AttributeSet.getAttributeNames()

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Checks whether a given attribute name/value is defined.
Specified by:
containsAttribute in interface AttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
Returns:
true if the name/value is defined
See Also:
AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)

containsAttributes

public boolean containsAttributes(AttributeSet attrs)
Checks whether the element contains all the attributes.
Specified by:
containsAttributes in interface AttributeSet
Parameters:
attrs - the attributes to check
Returns:
true if the element contains all the attributes
See Also:
AttributeSet.containsAttributes(javax.swing.text.AttributeSet)

getResolveParent

public AttributeSet getResolveParent()
Gets attributes from the parent. If not overriden, the resolving parent defaults to the parent element.
Specified by:
getResolveParent in interface AttributeSet
Returns:
the attributes from the parent
See Also:
AttributeSet.getResolveParent()

addAttribute

public void addAttribute(Object name,
                         Object value)
Adds an attribute.
Specified by:
addAttribute in interface MutableAttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public void addAttributes(AttributeSet attr)
Adds a set of attributes to the element.
Specified by:
addAttributes in interface MutableAttributeSet
Parameters:
attr - the attributes to add
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public void removeAttribute(Object name)
Removes an attribute from the set.
Specified by:
removeAttribute in interface MutableAttributeSet
Parameters:
name - the non-null attribute name
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public void removeAttributes(Enumeration names)
Removes a set of attributes for the element.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
names - the attribute names
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public void removeAttributes(AttributeSet attrs)
Removes a set of attributes for the element.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
attrs - the attributes
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

setResolveParent

public void setResolveParent(AttributeSet parent)
Sets the resolving parent.
Specified by:
setResolveParent in interface MutableAttributeSet
Parameters:
parent - the parent, null if none
See Also:
MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParagraphConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleConstants.ParagraphConstants

java.lang.Object
  |
  +--javax.swing.text.StyleConstants
        |
        +--javax.swing.text.StyleConstants.ParagraphConstants
All Implemented Interfaces:
AttributeSet.ParagraphAttribute
Enclosing class:
StyleConstants
public static class StyleConstants.ParagraphConstants
extends StyleConstants
implements AttributeSet.ParagraphAttribute

This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style. These are aliased by the outer class for general presentation.

Inner classes inherited from class javax.swing.text.StyleConstants
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants
Field Summary
static Object | Alignment Alignment for the paragraph.
static Object | FirstLineIndent The amount of space to indent the first line of the paragraph.
static Object | LeftIndent The amount to indent the left side of the paragraph.
static Object | LineSpacing The amount of space between lines of the paragraph.
static Object | Orientation Orientation for the paragraph.
static Object | RightIndent The amount to indent the right side of the paragraph.
static Object | SpaceAbove The amount of space above the paragraph.
static Object | SpaceBelow The amount of space below the paragraph.
static Object | TabSet TabSet for the paragraph.
Fields inherited from class javax.swing.text.StyleConstants
ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_LEFT, ALIGN_RIGHT, Background, BidiLevel, Bold, ComponentAttribute, ComponentElementName, ComposedTextAttribute, FontFamily, FontSize, Foreground, IconAttribute, IconElementName, Italic, ModelAttribute, NameAttribute, ResolveAttribute, StrikeThrough, Subscript, Superscript, Underline
Methods inherited from class javax.swing.text.StyleConstants
getAlignment, getBackground, getBidiLevel, getComponent, getFirstLineIndent, getFontFamily, getFontSize, getForeground, getIcon, getLeftIndent, getLineSpacing, getRightIndent, getSpaceAbove, getSpaceBelow, getTabSet, isBold, isItalic, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setAlignment, setBackground, setBidiLevel, setBold, setComponent, setFirstLineIndent, setFontFamily, setFontSize, setForeground, setIcon, setItalic, setLeftIndent, setLineSpacing, setRightIndent, setSpaceAbove, setSpaceBelow, setStrikeThrough, setSubscript, setSuperscript, setTabSet, setUnderline, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

FirstLineIndent

public static final Object FirstLineIndent
The amount of space to indent the first line of the paragraph. This value may be negative to offset in the reverse direction. The type is Float and specifies the size of the space in points.

LeftIndent

public static final Object LeftIndent
The amount to indent the left side of the paragraph. Type is float and specifies the size in points.

RightIndent

public static final Object RightIndent
The amount to indent the right side of the paragraph. Type is float and specifies the size in points.

LineSpacing

public static final Object LineSpacing
The amount of space between lines of the paragraph. Type is float and specifies the size in points.

SpaceAbove

public static final Object SpaceAbove
The amount of space above the paragraph. Type is float and specifies the size in points.

SpaceBelow

public static final Object SpaceBelow
The amount of space below the paragraph. Type is float and specifies the size in points.

Alignment

public static final Object Alignment
Alignment for the paragraph. The type is Integer. Valid values are:
  • ALIGN_LEFT
  • ALIGN_RIGHT
  • ALIGN_CENTER
  • ALIGN_JUSTIFED

TabSet

public static final Object TabSet
TabSet for the paragraph.

Orientation

public static final Object Orientation
Orientation for the paragraph.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParagraphView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class ParagraphView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.FlowView
                          |
                          +--javax.swing.text.ParagraphView
All Implemented Interfaces:
SwingConstants, TabExpander
Direct Known Subclasses:
ParagraphView
public class ParagraphView
extends FlowView
implements TabExpander

View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc. It is basically a vertical box with a margin around it. The contents of the box are a bunch of rows which are special horizontal boxes. This view creates a collection of views that represent the child elements of the paragraph element. Each of these views are placed into a row directly if they will fit, otherwise the breakView method is called to try and carve the view into pieces that fit.

See Also:
View

Inner classes inherited from class javax.swing.text.FlowView
FlowView.FlowStrategy
Field Summary
protected  int firstLineIndent
Indentation for the first line, from the left inset.
Fields inherited from class javax.swing.text.FlowView
layoutPool, layoutSpan, strategy
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
Method Summary
protected void | adjustRow(javax.swing.text.ParagraphView.Row r, int desiredSpan, int x) Adjusts the given row if possible to fit within the layout span.
View | breakView(int axis, float len, Shape a) Breaks this view on the given axis at the given length.
void | changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected View | createRow() Create a View that should be used to hold a a rows worth of children in a flow.
protected int | findOffsetToCharactersInString(char[] string, int start) Finds the next character in the document with a character in string, starting at offset start.
protected boolean | flipEastAndWestAtEnds(int position, Position.Bias bias) Subclasses may wish to subclass this and conditionally return true based on the position.
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
int | getBreakWeight(int axis, float len) Gets the break weight for a given location.
protected int | getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position to x.
int | getFlowSpan(int index) Fetch the constraining span to flow against for the given child index.
int | getFlowStart(int index) Fetch the location along the flow axis that the flow span will start at.
protected View | getLayoutView(int index) The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements.
protected int | getLayoutViewCount() The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements.
protected int | getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Overriden from CompositeView.
protected float | getPartialSize(int startOffset, int endOffset) Returns the size used by the views between startOffset and endOffset.
protected float | getTabBase()
protected TabSet | getTabSet() Gets the Tabset to be used in calculating tabs.
float | nextTabStop(float x, int tabOffset) Returns the next tab stop position given a reference position.
void | paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
protected void | setFirstLineIndent(float fi) Set the indent on the first line
protected void | setJustification(int j) Set the type of justification.
protected void | setLineSpacing(float ls) Set the line spacing.
protected void | setPropertiesFromAttributes()
Methods inherited from class javax.swing.text.FlowView
calculateMinorAxisRequirements, getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

firstLineIndent

protected int firstLineIndent
Indentation for the first line, from the left inset.
Constructor Detail

ParagraphView

public ParagraphView(Element elem)
Constructs a ParagraphView for the given element.
Parameters:
elem - the element that this view is responsible for
Method Detail

setJustification

protected void setJustification(int j)
Set the type of justification.

setLineSpacing

protected void setLineSpacing(float ls)
Set the line spacing.
Parameters:
ls - the value in points

setFirstLineIndent

protected void setFirstLineIndent(float fi)
Set the indent on the first line
Parameters:
ls - the value in points

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()

getLayoutViewCount

protected int getLayoutViewCount()
The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements. This is the number of views that have been tiled in two dimensions, and should be equivalent to the number of child elements to the element this view is responsible for.

getLayoutView

protected View getLayoutView(int index)
The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements. This methods returns the view responsible for the child element index (prior to breaking). These are the Views that were produced from a factory (to represent the child elements) and used for layout.

adjustRow

protected void adjustRow(javax.swing.text.ParagraphView.Row r,
                         int desiredSpan,
                         int x)
Adjusts the given row if possible to fit within the layout span. By default this will try to find the highest break weight possible nearest the end of the row. If a forced break is encountered, the break will be positioned there.
Parameters:
r - the row to adjust to the current layout span.
desiredSpan - the current layout span >= 0
x - the location r starts at.

getNextNorthSouthVisualPositionFrom

protected int getNextNorthSouthVisualPositionFrom(int pos,
                                                  Position.Bias b,
                                                  Shape a,
                                                  int direction,
                                                  Position.Bias[] biasRet)
                                           throws BadLocationException
Overriden from CompositeView.
Overrides:
getNextNorthSouthVisualPositionFrom in class CompositeView
Following copied from class: javax.swing.text.CompositeView
Returns:
next position west of the passed in position.

getClosestPositionTo

protected int getClosestPositionTo(int pos,
                                   Position.Bias b,
                                   Shape a,
                                   int direction,
                                   Position.Bias[] biasRet,
                                   int rowIndex,
                                   int x)
                            throws BadLocationException
Returns the closest model position to x. rowIndex gives the index of the view that corresponds that should be looked in.

flipEastAndWestAtEnds

protected boolean flipEastAndWestAtEnds(int position,
                                        Position.Bias bias)
Description copied from class: CompositeView
Subclasses may wish to subclass this and conditionally return true based on the position. A return value of true indicates that when a View returns -1 from getNextVisualPositionFrom the next view for east should be the current index offset by -1, and for west it means offset by 1. The normal direction (for left to right text) is to offset east by 1 and west by -1.
Overrides:
flipEastAndWestAtEnds in class BoxView
Following copied from class: javax.swing.text.CompositeView
Returns:
false

getFlowSpan

public int getFlowSpan(int index)
Fetch the constraining span to flow against for the given child index.
Overrides:
getFlowSpan in class FlowView
Following copied from class: javax.swing.text.FlowView
Parameters:
index - the index of the row being updated. This should be a value >= 0 and See Also:
FlowView.getFlowStart(int)

getFlowStart

public int getFlowStart(int index)
Fetch the location along the flow axis that the flow span will start at.
Overrides:
getFlowStart in class FlowView
Following copied from class: javax.swing.text.FlowView
Parameters:
index - the index of the row being updated. This should be a value >= 0 and See Also:
FlowView.getFlowSpan(int)

createRow

protected View createRow()
Create a View that should be used to hold a a rows worth of children in a flow.
Overrides:
createRow in class FlowView

nextTabStop

public float nextTabStop(float x,
                         int tabOffset)
Returns the next tab stop position given a reference position. This view implements the tab coordinate system, and calls getTabbedSpan on the logical children in the process of layout to determine the desired span of the children. The logical children can delegate their tab expansion upward to the paragraph which knows how to expand tabs. LabelView is an example of a view that delegates its tab expansion needs upward to the paragraph.

This is implemented to try and locate a TabSet in the paragraph element's attribute set. If one can be found, its settings will be used, otherwise a default expansion will be provided. The base location for for tab expansion is the left inset from the paragraphs most recent allocation (which is what the layout of the children is based upon).

Specified by:
nextTabStop in interface TabExpander
Parameters:
x - the X reference position
tabOffset - the position within the text stream that the tab occurred at >= 0.
Returns:
the trailing end of the tab expansion >= 0
See Also:
TabSet, TabStop, LabelView

getTabSet

protected TabSet getTabSet()
Gets the Tabset to be used in calculating tabs.
Returns:
the TabSet

getPartialSize

protected float getPartialSize(int startOffset,
                               int endOffset)
Returns the size used by the views between startOffset and endOffset. This uses getPartialView to calculate the size if the child view implements the TabableView interface. If a size is needed and a View does not implement the TabableView interface, the preferredSpan will be used.
Parameters:
startOffset - the starting document offset >= 0
endOffset - the ending document offset >= startOffset
Returns:
the size >= 0

findOffsetToCharactersInString

protected int findOffsetToCharactersInString(char[] string,
                                             int start)
Finds the next character in the document with a character in string, starting at offset start. If there are no characters found, -1 will be returned.
Parameters:
string - the string of characters
start - where to start in the model >= 0
Returns:
the document offset or -1

getTabBase

protected float getTabBase()
Returns:
where tabs are calculated from.

paint

public void paint(Graphics g,
                  Shape a)
Renders using the given rendering surface and area on that surface. This is implemented to delgate to the superclass after stashing the base coordinate for tab calculations.
Overrides:
paint in class BoxView
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the center of the first row along the y axis, and the default along the x axis.
Overrides:
getAlignment in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

breakView

public View breakView(int axis,
                      float len,
                      Shape a)
Breaks this view on the given axis at the given length.

ParagraphView instances are breakable along the Y_AXIS only, and only if len is after the first line.

Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
len - specifies where a potential break is desired along the given axis >= 0
a - the current allocation of the view
Returns:
the fragment of the view that represents the given span, if the view can be broken. If the view doesn't support breaking behavior, the view itself is returned.
See Also:
View.breakView(int, int, float, float)

getBreakWeight

public int getBreakWeight(int axis,
                          float len)
Gets the break weight for a given location. ParagraphView instances are breakable along the Y_AXIS only, and only if len is after the first row. If the length is less than one row, a value of BadBreakWeight is returned.
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
len - specifies where a potential break is desired >= 0
Returns:
a value indicating the attractiveness of breaking here
See Also:
View.getBreakWeight(int, float, float)

changedUpdate

public void changedUpdate(DocumentEvent changes,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class FlowView
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PasswordView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class PasswordView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.PlainView
              |
              +--javax.swing.text.FieldView
                    |
                    +--javax.swing.text.PasswordView
All Implemented Interfaces:
SwingConstants, TabExpander
public class PasswordView
extends FieldView

Implements a View suitable for use in JPasswordField UI implementations. This is basically a field ui that renders its contents as the echo character specified in the associated component (if it can narrow the component to a JPasswordField).

See Also:
View

Fields inherited from class javax.swing.text.PlainView
metrics
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
PasswordView(Element elem)
Constructs a new view wrapped on an element.
Method Summary
protected int | drawEchoCharacter(Graphics g, int x, int y, char c) Renders the echo character, or whatever graphic should be used to display the password characters.
protected int | drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
protected int | drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
int | viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.FieldView
adjustAllocation, getFontMetrics, getPreferredSpan, getResizeWeight, insertUpdate, paint, removeUpdate
Methods inherited from class javax.swing.text.PlainView
changedUpdate, drawLine, getLineBuffer, getTabSize, nextTabStop
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PasswordView

public PasswordView(Element elem)
Constructs a new view wrapped on an element.
Parameters:
elem - the element
Method Detail

drawUnselectedText

protected int drawUnselectedText(Graphics g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws BadLocationException
Renders the given range in the model as normal unselected text. This sets the foreground color and echos the characters using the value returned by getEchoChar().
Overrides:
drawUnselectedText in class PlainView
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the starting offset in the model >= 0
p1 - the ending offset in the model >= p0
Throws:
BadLocationException - if p0 or p1 are out of range

drawSelectedText

protected int drawSelectedText(Graphics g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws BadLocationException
Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background. Uses the result of getEchoChar() to display the characters.
Overrides:
drawSelectedText in class PlainView
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the starting offset in the model >= 0
p1 - the ending offset in the model >= p0
Throws:
BadLocationException - if p0 or p1 are out of range

drawEchoCharacter

protected int drawEchoCharacter(Graphics g,
                                int x,
                                int y,
                                char c)
Renders the echo character, or whatever graphic should be used to display the password characters. The color in the Graphics object is set to the appropriate foreground color for selected or unselected text.
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
c - the echo character
Returns:
the updated X position >= 0

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class FieldView
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float fx,
                       float fy,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class FieldView
Parameters:
fx - the X coordinate >= 0.0f
fy - the Y coordinate >= 0.0f
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PasteAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultEditorKit.PasteAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.DefaultEditorKit.PasteAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
DefaultEditorKit
public static class DefaultEditorKit.PasteAction
extends TextAction

Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
DefaultEditorKit.pasteAction, DefaultEditorKit.getActions(), Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
DefaultEditorKit.PasteAction()
Create this object with the appropriate identifier.
Method Summary
 void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEditorKit.PasteAction

public DefaultEditorKit.PasteAction()
Create this object with the appropriate identifier.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
The operation to perform when this action is triggered.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PlainDocument

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class PlainDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.PlainDocument
All Implemented Interfaces:
Document, Serializable
public class PlainDocument
extends AbstractDocument

A plain document that maintains no character attributes. The default element structure for this document is a map of the lines in the text. The Element returned by getDefaultRootElement is a map of the lines, and each child element represents a line. This model does not maintain any character level attributes, but each line can be tagged with an arbitrary set of attributes. Line to offset, and offset to line translations can be quickly performed using the default root element. The structure information of the DocumentEvent's fired by edits will indicate the line structure changes.

The default content storage management is performed by a gapped buffer implementation (GapContent). It supports editing reasonably large documents with good efficiency when the edits are contiguous or clustered, as is typical.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Document, AbstractDocument, Serialized Form

Inner classes inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Field Summary
static String | lineLimitAttribute Name of the attribute that specifies the maximum length of a line, if there is a maximum length.
static String | tabSizeAttribute Name of the attribute that specifies the tab size for tabs contained in the content.
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Constructor Summary
 | PlainDocument() Constructs a plain text document.
protected | PlainDocument(AbstractDocument.Content c) Constructs a plain text document.
Method Summary
protected AbstractDocument.AbstractElement | createDefaultRoot() Creates the root element to be used to represent the default document structure.
Element | getDefaultRootElement() Gets the default root element for the document model.
Element | getParagraphElement(int pos) Get the paragraph element containing the given position.
protected void | insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) Updates document structure as a result of text insertion.
protected void | removeUpdate(AbstractDocument.DefaultDocumentEvent chng) Updates any document structure as a result of text removal.
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, setAsynchronousLoadPriority, setDocumentProperties, writeLock, writeUnlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

tabSizeAttribute

public static final String tabSizeAttribute
Name of the attribute that specifies the tab size for tabs contained in the content. The type for the value is Integer.

lineLimitAttribute

public static final String lineLimitAttribute
Name of the attribute that specifies the maximum length of a line, if there is a maximum length. The type for the value is Integer.
Constructor Detail

PlainDocument

public PlainDocument()
Constructs a plain text document. A default model using StringContent is constructed and set.

PlainDocument

protected PlainDocument(AbstractDocument.Content c)
Constructs a plain text document. A default root element is created, and the tab size set to 8.
Parameters:
c - the container for the content
Method Detail

getDefaultRootElement

public Element getDefaultRootElement()
Gets the default root element for the document model.
Overrides:
getDefaultRootElement in class AbstractDocument
Returns:
the root
See Also:
Document.getDefaultRootElement()

createDefaultRoot

protected AbstractDocument.AbstractElement createDefaultRoot()
Creates the root element to be used to represent the default document structure.
Returns:
the element base

getParagraphElement

public Element getParagraphElement(int pos)
Get the paragraph element containing the given position. Since this document only models lines, it returns the line instead.
Overrides:
getParagraphElement in class AbstractDocument
Following copied from class: javax.swing.text.AbstractDocument
Parameters:
pos - the starting offset >= 0
Returns:
the element

insertUpdate

protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,
                            AttributeSet attr)
Updates document structure as a result of text insertion. This will happen within a write lock. Since this document simply maps out lines, we refresh the line map.
Overrides:
insertUpdate in class AbstractDocument
Parameters:
chng - the change event describing the dit
attr - the set of attributes for the inserted text

removeUpdate

protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng)
Updates any document structure as a result of text removal. This will happen within a write lock. Since the structure represents a line map, this just checks to see if the removal spans lines. If it does, the two lines outside of the removal area are joined together.
Overrides:
removeUpdate in class AbstractDocument
Parameters:
chng - the change event describing the edit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PlainView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class PlainView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.PlainView
All Implemented Interfaces:
SwingConstants, TabExpander
Direct Known Subclasses:
FieldView
public class PlainView
extends View
implements TabExpander

Implements View interface for a simple multi-line text view that has text in one font and color. The view represents each child element as a line of text.

See Also:
View

Field Summary
protected  FontMetrics metrics
Font metrics for the currrent font.
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
PlainView(Element elem)
Constructs a new PlainView wrapped on an element.
Method Summary
void | changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | drawLine(int lineIndex, Graphics g, int x, int y) Renders a line of text, suppressing whitespace at the end and exanding any tabs.
protected int | drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
protected int | drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected Segment | getLineBuffer() Gives access to a buffer that can be used to fetch text from the associated document.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
protected int | getTabSize() Returns the tab size set for the document, defaulting to 8.
void | insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
float | nextTabStop(float x, int tabOffset) Returns the next tab stop position after a given reference position.
void | paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
int | viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

metrics

protected FontMetrics metrics
Font metrics for the currrent font.
Constructor Detail

PlainView

public PlainView(Element elem)
Constructs a new PlainView wrapped on an element.
Parameters:
elem - the element
Method Detail

getTabSize

protected int getTabSize()
Returns the tab size set for the document, defaulting to 8.
Returns:
the tab size

drawLine

protected void drawLine(int lineIndex,
                        Graphics g,
                        int x,
                        int y)
Renders a line of text, suppressing whitespace at the end and exanding any tabs. This is implemented to make calls to the methods drawUnselectedText and drawSelectedText so that the way selected and unselected text are rendered can be customized.
Parameters:
lineIndex - the line to draw >= 0
g - the graphics context
x - the starting X position >= 0
y - the starting Y position >= 0
See Also:
drawUnselectedText(java.awt.Graphics, int, int, int, int), drawSelectedText(java.awt.Graphics, int, int, int, int)

drawUnselectedText

protected int drawUnselectedText(Graphics g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws BadLocationException
Renders the given range in the model as normal unselected text. Uses the foreground or disabled color to render the text.
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the beginning position in the model >= 0
p1 - the ending position in the model >= 0
Throws:
BadLocationException - if the range is invalid

drawSelectedText

protected int drawSelectedText(Graphics g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws BadLocationException
Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background.
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the beginning position in the model >= 0
p1 - the ending position in the model >= 0
Throws:
BadLocationException - if the range is invalid

getLineBuffer

protected final Segment getLineBuffer()
Gives access to a buffer that can be used to fetch text from the associated document.

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Overrides:
getPreferredSpan in class View
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Throws:
IllegalArgumentException - for an invalid axis

paint

public void paint(Graphics g,
                  Shape a)
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
Overrides:
paint in class View
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Overrides:
modelToView in class View
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float fx,
                       float fy,
                       Shape a,
                       Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Overrides:
viewToModel in class View
Parameters:
fx - the X coordinate >= 0
fy - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

insertUpdate

public void insertUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for.
Overrides:
insertUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for.
Overrides:
removeUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(DocumentEvent changes,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

nextTabStop

public float nextTabStop(float x,
                         int tabOffset)
Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.
Specified by:
nextTabStop in interface TabExpander
Parameters:
x - the current position >= 0
tabOffset - the position within the text stream that the tab occurred at >= 0.
Returns:
the tab stop, measured in points >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Position

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Position

public interface Position

Represents a location within a document. It is intended to abstract away implementation details of the document and enable specification of positions within the document that are capable of tracking of change as the document is edited (i.e. offsets are fragile).

Inner Class Summary
static class Position.Bias
A typesafe enumeration to indicate bias to a position in the model.
Method Summary
 int getOffset()
Fetches the current offset within the document.

Method Detail

getOffset

public int getOffset()
Fetches the current offset within the document.
Returns:
the offset >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.text.rtf Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.text.rtf

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.text.EditorKit (implements java.lang.Cloneable, java.io.Serializable)
      • class javax.swing.text.DefaultEditorKit
        • class javax.swing.text.StyledEditorKit
          • class javax.swing.text.rtf.RTFEditorKit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.text.rtf

Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

See:
Description

Class Summary
RTFEditorKit This is the default implementation of RTF editing functionality.

Package javax.swing.text.rtf Description

Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.

Since:
TBD
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.text.rtf

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.text.rtf

No usage of javax.swing.text.rtf

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.text.rtf.RTFEditorKit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.text.rtf.RTFEditorKit

No usage of javax.swing.text.rtf.RTFEditorKit

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


RTFEditorKit

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text.rtf
Class RTFEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--javax.swing.text.StyledEditorKit
                    |
                    +--javax.swing.text.rtf.RTFEditorKit
All Implemented Interfaces:
Cloneable, Serializable
public class RTFEditorKit
extends StyledEditorKit

This is the default implementation of RTF editing functionality. The RTF support was not written by the Swing team. In the future we hope to improve the support provided.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.StyledEditorKit
StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineAction
Inner classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
Constructor Summary
RTFEditorKit()
Constructs an RTFEditorKit.
Method Summary
Object | clone() Create a copy of the editor kit.
String | getContentType() Get the MIME type of the data that this kit represents support for.
void | read(InputStream in, Document doc, int pos) Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
void | read(Reader in, Document doc, int pos) Insert content from the given stream, which will be treated as plain text.
void | write(OutputStream out, Document doc, int pos, int len) Write content from a document to the given stream in a format appropriate for this kind of content handler.
void | write(Writer out, Document doc, int pos, int len) Write content from a document to the given stream as plain text.
Methods inherited from class javax.swing.text.StyledEditorKit
createDefaultDocument, createInputAttributes, deinstall, getActions, getCharacterAttributeRun, getInputAttributes, getViewFactory, install
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RTFEditorKit

public RTFEditorKit()
Constructs an RTFEditorKit.
Method Detail

clone

public Object clone()
Create a copy of the editor kit. This allows an implementation to serve as a prototype for others, so that they can be quickly created.
Overrides:
clone in class StyledEditorKit
Returns:
the copy

getContentType

public String getContentType()
Get the MIME type of the data that this kit represents support for. This kit supports the type text/rtf.
Overrides:
getContentType in class DefaultEditorKit
Returns:
the type

read

public void read(InputStream in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Insert content from the given stream which is expected to be in a format appropriate for this kind of content handler.
Overrides:
read in class DefaultEditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public void write(OutputStream out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
Write content from a document to the given stream in a format appropriate for this kind of content handler.
Overrides:
write in class DefaultEditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content.
len - The amount to write out.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

read

public void read(Reader in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Insert content from the given stream, which will be treated as plain text.
Overrides:
read in class DefaultEditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.

write

public void write(Writer out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
Write content from a document to the given stream as plain text.
Overrides:
write in class DefaultEditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content.
len - The amount to write out.
Throws:
IOException - on any I/O error
BadLocationException - if pos represents an invalid location within the document.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SectionElement

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class DefaultStyledDocument.SectionElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.BranchElement
              |
              +--javax.swing.text.DefaultStyledDocument.SectionElement
All Implemented Interfaces:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
Enclosing class:
DefaultStyledDocument
protected class DefaultStyledDocument.SectionElement
extends AbstractDocument.BranchElement

Default root element for a document... maps out the paragraphs/lines contained.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
DefaultStyledDocument.SectionElement()
Creates a new SectionElement.
Method Summary
 String getName()
Gets the name of the element.
Methods inherited from class javax.swing.text.AbstractDocument.BranchElement
children, getAllowsChildren, getElement, getElementCount, getElementIndex, getEndOffset, getStartOffset, isLeaf, positionToElement, replace, toString
Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultStyledDocument.SectionElement

public DefaultStyledDocument.SectionElement()
Creates a new SectionElement.
Method Detail

getName

public String getName()
Gets the name of the element.
Overrides:
getName in class AbstractDocument.BranchElement
Returns:
the name
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Segment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class Segment

java.lang.Object
  |
  +--javax.swing.text.Segment
All Implemented Interfaces:
CharacterIterator, Cloneable
public class Segment
extends Object
implements Cloneable, CharacterIterator

A segment of a character array representing a fragment of text. It should be treated as immutable even though the array is directly accessable. This gives fast access to fragments of text without the overhead of copying around characters. This is effectively an unprotected String.

The Segment implements the java.text.CharacterIterator interface to support use with the i18n support without copying text into a string.

Field Summary
char[] | array This is the array containing the text of interest.
int | count This is the number of array elements that make up the text of interest.
int | offset This is the offset into the array that the desired text begins.
Fields inherited from interface java.text.CharacterIterator
DONE
Constructor Summary
Segment()
Creates a new segment.
Segment(char[] array, int offset, int count)
Creates a new segment referring to an existing array.
Method Summary
 Object clone()
Creates a shallow copy.
 char current()
Gets the character at the current position (as returned by getIndex()).
 char first()
Sets the position to getBeginIndex() and returns the character at that position.
 int getBeginIndex()
Returns the start index of the text.
 int getEndIndex()
Returns the end index of the text.
 int getIndex()
Returns the current index.
 char last()
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
 char next()
Increments the iterator's index by one and returns the character at the new index.
 char previous()
Decrements the iterator's index by one and returns the character at the new index.
 char setIndex(int position)
Sets the position to the specified position in the text and returns that character.
 String toString()
Converts a segment into a String.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

array

public char[] array
This is the array containing the text of interest. This array should never be modified; it is available only for efficiency.

offset

public int offset
This is the offset into the array that the desired text begins.

count

public int count
This is the number of array elements that make up the text of interest.
Constructor Detail

Segment

public Segment()
Creates a new segment.

Segment

public Segment(char[] array,
               int offset,
               int count)
Creates a new segment referring to an existing array.
Parameters:
array - the array to refer to
offset - the offset into the array
count - the number of characters
Method Detail

toString

public String toString()
Converts a segment into a String.
Overrides:
toString in class Object
Returns:
the string

first

public char first()
Sets the position to getBeginIndex() and returns the character at that position.
Specified by:
first in interface CharacterIterator
Returns:
the first character in the text, or DONE if the text is empty
See Also:
getBeginIndex()

last

public char last()
Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
Specified by:
last in interface CharacterIterator
Returns:
the last character in the text, or DONE if the text is empty
See Also:
getEndIndex()

current

public char current()
Gets the character at the current position (as returned by getIndex()).
Specified by:
current in interface CharacterIterator
Returns:
the character at the current position or DONE if the current position is off the end of the text.
See Also:
getIndex()

next

public char next()
Increments the iterator's index by one and returns the character at the new index. If the resulting index is greater or equal to getEndIndex(), the current index is reset to getEndIndex() and a value of DONE is returned.
Specified by:
next in interface CharacterIterator
Returns:
the character at the new position or DONE if the new position is off the end of the text range.

previous

public char previous()
Decrements the iterator's index by one and returns the character at the new index. If the current index is getBeginIndex(), the index remains at getBeginIndex() and a value of DONE is returned.
Specified by:
previous in interface CharacterIterator
Returns:
the character at the new position or DONE if the current position is equal to getBeginIndex().

setIndex

public char setIndex(int position)
Sets the position to the specified position in the text and returns that character.
Specified by:
setIndex in interface CharacterIterator
Parameters:
position - the position within the text. Valid values range from getBeginIndex() to getEndIndex(). An IllegalArgumentException is thrown if an invalid value is supplied.
Returns:
the character at the specified position or DONE if the specified position is equal to getEndIndex()

getBeginIndex

public int getBeginIndex()
Returns the start index of the text.
Specified by:
getBeginIndex in interface CharacterIterator
Returns:
the index at which the text begins.

getEndIndex

public int getEndIndex()
Returns the end index of the text. This index is the index of the first character following the end of the text.
Specified by:
getEndIndex in interface CharacterIterator
Returns:
the index after the last character in the text

getIndex

public int getIndex()
Returns the current index.
Specified by:
getIndex in interface CharacterIterator
Returns:
the current index.

clone

public Object clone()
Creates a shallow copy.
Specified by:
clone in interface CharacterIterator
Overrides:
clone in class Object
Returns:
the copy
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleAttributeSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class SimpleAttributeSet

java.lang.Object
  |
  +--javax.swing.text.SimpleAttributeSet
All Implemented Interfaces:
AttributeSet, Cloneable, MutableAttributeSet, Serializable
public class SimpleAttributeSet
extends Object
implements MutableAttributeSet, Serializable, Cloneable

A straightforward implementation of MutableAttributeSet using a hash table.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Field Summary
static AttributeSet EMPTY
An empty attribute set.
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
SimpleAttributeSet()
Creates a new attribute set.
SimpleAttributeSet(AttributeSet source)
Creates a new attribute set based on a supplied set of attributes.
Method Summary
void | addAttribute(Object name, Object value) Adds an attribute to the list.
void | addAttributes(AttributeSet attributes) Adds a set of attributes to the list.
Object | clone() Clones a set of attributes.
boolean | containsAttribute(Object name, Object value) Checks whether the attribute list contains a specified attribute name/value pair.
boolean | containsAttributes(AttributeSet attributes) Checks whether the attribute list contains all the specified name/value pairs.
AttributeSet | copyAttributes() Makes a copy of the attributes.
boolean | equals(Object obj) Compares this object to the specifed object.
Object | getAttribute(Object name) Gets the value of an attribute.
int | getAttributeCount() Gets a count of the number of attributes.
Enumeration | getAttributeNames() Gets the names of the attributes in the set.
AttributeSet | getResolveParent() Gets the resolving parent.
int | hashCode() Returns a hashcode for this set of attributes.
boolean | isDefined(Object attrName) Tells whether a given attribute is defined.
boolean | isEmpty() Checks whether the set of attributes is empty.
boolean | isEqual(AttributeSet attr) Compares two attribute sets.
void | removeAttribute(Object name) Removes an attribute from the list.
void | removeAttributes(AttributeSet attributes) Removes a set of attributes from the list.
void | removeAttributes(Enumeration names) Removes a set of attributes from the list.
void | setResolveParent(AttributeSet parent) Sets the resolving parent.
String | toString() Converts the attribute set to a String.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

EMPTY

public static final AttributeSet EMPTY
An empty attribute set.
Constructor Detail

SimpleAttributeSet

public SimpleAttributeSet()
Creates a new attribute set.

SimpleAttributeSet

public SimpleAttributeSet(AttributeSet source)
Creates a new attribute set based on a supplied set of attributes.
Parameters:
source - the set of attributes
Method Detail

isEmpty

public boolean isEmpty()
Checks whether the set of attributes is empty.
Returns:
true if the set is empty else false

getAttributeCount

public int getAttributeCount()
Gets a count of the number of attributes.
Specified by:
getAttributeCount in interface AttributeSet
Returns:
the count

isDefined

public boolean isDefined(Object attrName)
Tells whether a given attribute is defined.
Specified by:
isDefined in interface AttributeSet
Parameters:
attrName - the attribute name
Returns:
true if the attribute is defined

isEqual

public boolean isEqual(AttributeSet attr)
Compares two attribute sets.
Specified by:
isEqual in interface AttributeSet
Parameters:
attr - the second attribute set
Returns:
true if equathe listl

copyAttributes

public AttributeSet copyAttributes()
Makes a copy of the attributes.
Specified by:
copyAttributes in interface AttributeSet
Returns:
the copy

getAttributeNames

public Enumeration getAttributeNames()
Gets the names of the attributes in the set.
Specified by:
getAttributeNames in interface AttributeSet
Returns:
the names as an Enumeration

getAttribute

public Object getAttribute(Object name)
Gets the value of an attribute.
Specified by:
getAttribute in interface AttributeSet
Parameters:
name - the attribute name
Returns:
the value

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Checks whether the attribute list contains a specified attribute name/value pair.
Specified by:
containsAttribute in interface AttributeSet
Parameters:
name - the name
value - the value
Returns:
true if the name/value pair is in the list

containsAttributes

public boolean containsAttributes(AttributeSet attributes)
Checks whether the attribute list contains all the specified name/value pairs.
Specified by:
containsAttributes in interface AttributeSet
Parameters:
attributes - the attribute list
Returns:
true if the list contains all the name/value pairs

addAttribute

public void addAttribute(Object name,
                         Object value)
Adds an attribute to the list.
Specified by:
addAttribute in interface MutableAttributeSet
Parameters:
name - the attribute name
value - the attribute value

addAttributes

public void addAttributes(AttributeSet attributes)
Adds a set of attributes to the list.
Specified by:
addAttributes in interface MutableAttributeSet
Parameters:
attributes - the set of attributes to add

removeAttribute

public void removeAttribute(Object name)
Removes an attribute from the list.
Specified by:
removeAttribute in interface MutableAttributeSet
Parameters:
name - the attribute name

removeAttributes

public void removeAttributes(Enumeration names)
Removes a set of attributes from the list.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
names - the set of names to remove

removeAttributes

public void removeAttributes(AttributeSet attributes)
Removes a set of attributes from the list.
Specified by:
removeAttributes in interface MutableAttributeSet
Parameters:
attributes - the set of attributes to remove

getResolveParent

public AttributeSet getResolveParent()
Gets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally. This is null if there are no other sets of attributes to resolve through.
Specified by:
getResolveParent in interface AttributeSet
Returns:
the parent

setResolveParent

public void setResolveParent(AttributeSet parent)
Sets the resolving parent.
Specified by:
setResolveParent in interface MutableAttributeSet
Parameters:
parent - the parent

clone

public Object clone()
Clones a set of attributes.
Overrides:
clone in class Object
Returns:
the new set of attributes

hashCode

public int hashCode()
Returns a hashcode for this set of attributes.
Overrides:
hashCode in class Object
Returns:
a hashcode value for this set of attributes.

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if the object is an equivalent set of attributes.
Overrides:
equals in class Object
Parameters:
obj - the object to compare this font with.
Returns:
true if the objects are equal; false otherwise.

toString

public String toString()
Converts the attribute set to a String.
Overrides:
toString in class Object
Returns:
the string
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SmallAttributeSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleContext.SmallAttributeSet

java.lang.Object
  |
  +--javax.swing.text.StyleContext.SmallAttributeSet
All Implemented Interfaces:
AttributeSet
Enclosing class:
StyleContext
public class StyleContext.SmallAttributeSet
extends Object
implements AttributeSet

This class holds a small number of attributes in an array. The storage format is key, value, key, value, etc. The size of the set is the length of the array divided by two. By default, this is the class that will be used to store attributes when held in the compact sharable form.

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Constructor Summary
StyleContext.SmallAttributeSet(AttributeSet attrs)
StyleContext.SmallAttributeSet(Object[] attributes)
Method Summary
Object | clone() Clones a set of attributes.
boolean | containsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.
boolean | containsAttributes(AttributeSet attrs) Checks whether the attribute set contains all of the given attributes.
AttributeSet | copyAttributes() Copies a set of attributes.
boolean | equals(Object obj) Compares this object to the specifed object.
Object | getAttribute(Object key) Gets the value of an attribute.
int | getAttributeCount() Gets the number of attributes that are defined.
Enumeration | getAttributeNames() Gets the names of all attributes.
AttributeSet | getResolveParent() If not overriden, the resolving parent defaults to the parent element.
int | hashCode() Returns a hashcode for this set of attributes.
boolean | isDefined(Object key) Checks whether a given attribute is defined.
boolean | isEqual(AttributeSet attr) Checks whether two attribute sets are equal.
String | toString() Returns a string showing the key/value pairs
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StyleContext.SmallAttributeSet

public StyleContext.SmallAttributeSet(Object[] attributes)

StyleContext.SmallAttributeSet

public StyleContext.SmallAttributeSet(AttributeSet attrs)
Method Detail

toString

public String toString()
Returns a string showing the key/value pairs
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

hashCode

public int hashCode()
Returns a hashcode for this set of attributes.
Overrides:
hashCode in class Object
Returns:
a hashcode value for this set of attributes.

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if the object is an equivalent set of attributes.
Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are equal; false otherwise.

clone

public Object clone()
Clones a set of attributes. Since the set is immutable, a clone is basically the same set.
Overrides:
clone in class Object
Returns:
the set of attributes

getAttributeCount

public int getAttributeCount()
Gets the number of attributes that are defined.
Specified by:
getAttributeCount in interface AttributeSet
Returns:
the number of attributes
See Also:
AttributeSet.getAttributeCount()

isDefined

public boolean isDefined(Object key)
Checks whether a given attribute is defined.
Specified by:
isDefined in interface AttributeSet
Parameters:
key - the attribute key
Returns:
true if the attribute is defined
See Also:
AttributeSet.isDefined(java.lang.Object)

isEqual

public boolean isEqual(AttributeSet attr)
Checks whether two attribute sets are equal.
Specified by:
isEqual in interface AttributeSet
Parameters:
attr - the attribute set to check against
Returns:
true if the same
See Also:
AttributeSet.isEqual(javax.swing.text.AttributeSet)

copyAttributes

public AttributeSet copyAttributes()
Copies a set of attributes.
Specified by:
copyAttributes in interface AttributeSet
Returns:
the copy
See Also:
AttributeSet.copyAttributes()

getAttribute

public Object getAttribute(Object key)
Gets the value of an attribute.
Specified by:
getAttribute in interface AttributeSet
Parameters:
key - the attribute name
Returns:
the attribute value
See Also:
AttributeSet.getAttribute(java.lang.Object)

getAttributeNames

public Enumeration getAttributeNames()
Gets the names of all attributes.
Specified by:
getAttributeNames in interface AttributeSet
Returns:
the attribute names
See Also:
AttributeSet.getAttributeNames()

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Checks whether a given attribute name/value is defined.
Specified by:
containsAttribute in interface AttributeSet
Parameters:
name - the attribute name
value - the attribute value
Returns:
true if the name/value is defined
See Also:
AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)

containsAttributes

public boolean containsAttributes(AttributeSet attrs)
Checks whether the attribute set contains all of the given attributes.
Specified by:
containsAttributes in interface AttributeSet
Parameters:
attrs - the attributes to check
Returns:
true if the element contains all the attributes
See Also:
AttributeSet.containsAttributes(javax.swing.text.AttributeSet)

getResolveParent

public AttributeSet getResolveParent()
If not overriden, the resolving parent defaults to the parent element.
Specified by:
getResolveParent in interface AttributeSet
Returns:
the attributes from the parent
See Also:
AttributeSet.getResolveParent()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringContent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StringContent

java.lang.Object
  |
  +--javax.swing.text.StringContent
All Implemented Interfaces:
AbstractDocument.Content, Serializable
public final class StringContent
extends Object
implements AbstractDocument.Content, Serializable

An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging. It manages the character content as a simple character array. It is also quite inefficient.

It is generally recommended that the gap buffer or piece table implementations be used instead. This buffer does not scale up to large sizes.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
StringContent()
Creates a new StringContent object.
StringContent(int initialLength)
Creates a new StringContent object, with the initial size specified.
Method Summary
Position | createPosition(int offset) Creates a position within the content that will track change as the content is mutated.
void | getChars(int where, int len, Segment chars) Retrieves a portion of the content.
protected Vector | getPositionsInRange(Vector v, int offset, int length) Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
String | getString(int where, int len) Retrieves a portion of the content.
UndoableEdit | insertString(int where, String str) Inserts a string into the content.
int | length() Returns the length of the content.
UndoableEdit | remove(int where, int nitems) Removes part of the content.
protected void | updateUndoPositions(Vector positions) Resets the location for all the UndoPosRef instances in positions.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringContent

public StringContent()
Creates a new StringContent object. Initial size defaults to 10.

StringContent

public StringContent(int initialLength)
Creates a new StringContent object, with the initial size specified. If the length is <1, a="a" size="size" of="of" 1="1" is="is" used.
Parameters:
initialLength - the initial size
Method Detail

length

public int length()
Returns the length of the content.
Specified by:
length in interface AbstractDocument.Content
Returns:
the length >= 1
See Also:
AbstractDocument.Content.length()

insertString

public UndoableEdit insertString(int where,
                                 String str)
                          throws BadLocationException
Inserts a string into the content.
Specified by:
insertString in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0 && str - the non-null string to insert
Returns:
an UndoableEdit object for undoing
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.insertString(int, java.lang.String)

remove

public UndoableEdit remove(int where,
                           int nitems)
                    throws BadLocationException
Removes part of the content. where + nitems must be
Specified by:
remove in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0
nitems - the number of characters to remove >= 0
Returns:
an UndoableEdit object for undoing
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.remove(int, int)

getString

public String getString(int where,
                        int len)
                 throws BadLocationException
Retrieves a portion of the content. where + len must be <= length().
Specified by:
getString in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0
len - the length to retrieve >= 0
Returns:
a string representing the content; may be empty
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.getString(int, int)

getChars

public void getChars(int where,
                     int len,
                     Segment chars)
              throws BadLocationException
Retrieves a portion of the content. where + len must be <= length()
Specified by:
getChars in interface AbstractDocument.Content
Parameters:
where - the starting position >= 0
len - the number of characters to retrieve >= 0
chars - the Segment object to return the characters in
Throws:
BadLocationException - if the specified position is invalid
See Also:
AbstractDocument.Content.getChars(int, int, javax.swing.text.Segment)

createPosition

public Position createPosition(int offset)
                        throws BadLocationException
Creates a position within the content that will track change as the content is mutated.
Specified by:
createPosition in interface AbstractDocument.Content
Parameters:
offset - the offset to create a position for >= 0
Returns:
the position
Throws:
BadLocationException - if the specified position is invalid

getPositionsInRange

protected Vector getPositionsInRange(Vector v,
                                     int offset,
                                     int length)
Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length. If v is not null the matching Positions are placed in there. The vector with the resulting Positions are returned.
Parameters:
v - the Vector to use, with a new one created on null
offset - the starting offset >= 0
length - the length >= 0
Returns:
the set of instances

updateUndoPositions

protected void updateUndoPositions(Vector positions)
Resets the location for all the UndoPosRef instances in positions.
Parameters:
positions - the positions of the instances
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Style

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface Style

All Superinterfaces:
AttributeSet, MutableAttributeSet
All Known Implementing Classes:
StyleContext.NamedStyle
public interface Style
extends MutableAttributeSet

A collection of attributes to associate with an element in a document. Since these are typically used to associate character and paragraph styles with the element, operations for this are provided. Other customized attributes that get associated with the element will effectively be name-value pairs that live in a hierarchy and if a name (key) is not found locally, the request is forwarded to the parent. Commonly used attributes are seperated out to facilitate alternative implementations that are more efficient.

Inner classes inherited from class javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
Method Summary
void | addChangeListener(ChangeListener l) Adds a listener to track whenever an attribute has been changed.
String | getName() Fetches the name of the style.
void | removeChangeListener(ChangeListener l) Removes a listener that was tracking attribute changes.
Methods inherited from interface javax.swing.text.MutableAttributeSet
addAttribute, addAttributes, removeAttribute, removeAttributes, removeAttributes, setResolveParent
Methods inherited from interface javax.swing.text.AttributeSet
containsAttribute, containsAttributes, copyAttributes, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, isDefined, isEqual

Method Detail

getName

public String getName()
Fetches the name of the style. A style is not required to be named, so null is returned if there is no name associated with the style.
Returns:
the name

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener to track whenever an attribute has been changed.
Parameters:
l - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a listener that was tracking attribute changes.
Parameters:
l - the change listener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyleConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleConstants

java.lang.Object
  |
  +--javax.swing.text.StyleConstants
Direct Known Subclasses:
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants
public class StyleConstants
extends Object

A collection of well known or common attribute keys and methods to apply to an AttributeSet or MutableAttributeSet to get/set the properties in a typesafe manner.

The paragraph attributes form the definition of a paragraph to be rendered. All sizes are specified in points (such as found in postscript), a device independent measure.

Inner Class Summary
static class | StyleConstants.CharacterConstants This is a typesafe enumeration of the well-known attributes that contribute to a character style.
static class | StyleConstants.ColorConstants This is a typesafe enumeration of the well-known attributes that contribute to a color.
static class | StyleConstants.FontConstants This is a typesafe enumeration of the well-known attributes that contribute to a font.
static class | StyleConstants.ParagraphConstants This is a typesafe enumeration of the well-known attributes that contribute to a paragraph style.
Field Summary
static int | ALIGN_CENTER A possible value for paragraph alignment.
static int | ALIGN_JUSTIFIED A possible value for paragraph alignment.
static int | ALIGN_LEFT A possible value for paragraph alignment.
static int | ALIGN_RIGHT A possible value for paragraph alignment.
static Object | Alignment Alignment for the paragraph.
static Object | Background Name of the background color attribute.
static Object | BidiLevel Bidirectional level of a character as assigned by the Unicode bidi algorithm.
static Object | Bold Name of the bold attribute.
static Object | ComponentAttribute Name of the component attribute.
static String | ComponentElementName Name of elements used to represent components.
static Object | ComposedTextAttribute Name of the input method composed text attribute.
static Object | FirstLineIndent The amount of space to indent the first line of the paragraph.
static Object | FontFamily Name of the font family.
static Object | FontSize Name of the font size.
static Object | Foreground Name of the foreground color attribute.
static Object | IconAttribute Name of the icon attribute.
static String | IconElementName Name of elements used to represent icons.
static Object | Italic Name of the italic attribute.
static Object | LeftIndent The amount to indent the left side of the paragraph.
static Object | LineSpacing The amount of space between lines of the paragraph.
static Object | ModelAttribute Attribute used to identify the model for embedded objects that have a model view separation.
static Object | NameAttribute Attribute name used to name the collection of attributes.
static Object | Orientation Orientation for a paragraph.
static Object | ResolveAttribute Attribute name used to identifiy the resolving parent set of attributes, if one is defined.
static Object | RightIndent The amount to indent the right side of the paragraph.
static Object | SpaceAbove The amount of space above the paragraph.
static Object | SpaceBelow The amount of space below the paragraph.
static Object | StrikeThrough Name of the Strikethrough attribute.
static Object | Subscript Name of the Subscript attribute.
static Object | Superscript Name of the Superscript attribute.
static Object | TabSet TabSet for the paragraph, type is a TabSet containing TabStops.
static Object | Underline Name of the underline attribute.
Method Summary
static int | getAlignment(AttributeSet a) Gets the alignment setting.
static Color | getBackground(AttributeSet a) Gets the background color setting from the attribute list.
static int | getBidiLevel(AttributeSet a) Gets the BidiLevel setting.
static Component | getComponent(AttributeSet a) Gets the component setting from the attribute list.
static float | getFirstLineIndent(AttributeSet a) Gets the first line indent setting.
static String | getFontFamily(AttributeSet a) Gets the font family setting from the attribute list.
static int | getFontSize(AttributeSet a) Gets the font size setting from the attribute list.
static Color | getForeground(AttributeSet a) Gets the foreground color setting from the attribute list.
static Icon | getIcon(AttributeSet a) Gets the icon setting from the attribute list.
static float | getLeftIndent(AttributeSet a) Gets the left indent setting.
static float | getLineSpacing(AttributeSet a) Gets the line spacing setting.
static float | getRightIndent(AttributeSet a) Gets the right indent setting.
static float | getSpaceAbove(AttributeSet a) Gets the space above setting.
static float | getSpaceBelow(AttributeSet a) Gets the space below setting.
static TabSet | getTabSet(AttributeSet a) Gets the TabSet.
static boolean | isBold(AttributeSet a) Checks whether the bold attribute is set.
static boolean | isItalic(AttributeSet a) Checks whether the italic attribute is set.
static boolean | isStrikeThrough(AttributeSet a) Checks whether the strikethrough attribute is set.
static boolean | isSubscript(AttributeSet a) Checks whether the subscript attribute is set.
static boolean | isSuperscript(AttributeSet a) Checks whether the superscript attribute is set.
static boolean | isUnderline(AttributeSet a) Checks whether the underline attribute is set.
static void | setAlignment(MutableAttributeSet a, int align) Sets alignment.
static void | setBackground(MutableAttributeSet a, Color fg) Sets the background color.
static void | setBidiLevel(MutableAttributeSet a, int o) Sets the BidiLevel.
static void | setBold(MutableAttributeSet a, boolean b) Sets the bold attribute.
static void | setComponent(MutableAttributeSet a, Component c) Sets the component attribute.
static void | setFirstLineIndent(MutableAttributeSet a, float i) Sets the first line indent.
static void | setFontFamily(MutableAttributeSet a, String fam) Sets the font attribute.
static void | setFontSize(MutableAttributeSet a, int s) Sets the font size attribute.
static void | setForeground(MutableAttributeSet a, Color fg) Sets the foreground color.
static void | setIcon(MutableAttributeSet a, Icon c) Sets the icon attribute.
static void | setItalic(MutableAttributeSet a, boolean b) Sets the italic attribute.
static void | setLeftIndent(MutableAttributeSet a, float i) Sets left indent.
static void | setLineSpacing(MutableAttributeSet a, float i) Sets line spacing.
static void | setRightIndent(MutableAttributeSet a, float i) Sets right indent.
static void | setSpaceAbove(MutableAttributeSet a, float i) Sets space above.
static void | setSpaceBelow(MutableAttributeSet a, float i) Sets space below.
static void | setStrikeThrough(MutableAttributeSet a, boolean b) Sets the strikethrough attribute.
static void | setSubscript(MutableAttributeSet a, boolean b) Sets the subscript attribute.
static void | setSuperscript(MutableAttributeSet a, boolean b) Sets the superscript attribute.
static void | setTabSet(MutableAttributeSet a, TabSet tabs) Sets the TabSet.
static void | setUnderline(MutableAttributeSet a, boolean b) Sets the underline attribute.
String | toString() Returns the string representation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ComponentElementName

public static final String ComponentElementName
Name of elements used to represent components.

IconElementName

public static final String IconElementName
Name of elements used to represent icons.

NameAttribute

public static final Object NameAttribute
Attribute name used to name the collection of attributes.

ResolveAttribute

public static final Object ResolveAttribute
Attribute name used to identifiy the resolving parent set of attributes, if one is defined.

ModelAttribute

public static final Object ModelAttribute
Attribute used to identify the model for embedded objects that have a model view separation.

BidiLevel

public static final Object BidiLevel
Bidirectional level of a character as assigned by the Unicode bidi algorithm.

FontFamily

public static final Object FontFamily
Name of the font family.

FontSize

public static final Object FontSize
Name of the font size.

Bold

public static final Object Bold
Name of the bold attribute.

Italic

public static final Object Italic
Name of the italic attribute.

Underline

public static final Object Underline
Name of the underline attribute.

StrikeThrough

public static final Object StrikeThrough
Name of the Strikethrough attribute.

Superscript

public static final Object Superscript
Name of the Superscript attribute.

Subscript

public static final Object Subscript
Name of the Subscript attribute.

Foreground

public static final Object Foreground
Name of the foreground color attribute.

Background

public static final Object Background
Name of the background color attribute.

ComponentAttribute

public static final Object ComponentAttribute
Name of the component attribute.

IconAttribute

public static final Object IconAttribute
Name of the icon attribute.

ComposedTextAttribute

public static final Object ComposedTextAttribute
Name of the input method composed text attribute. The value of this attribute is an instance of AttributedString which represents the composed text.

FirstLineIndent

public static final Object FirstLineIndent
The amount of space to indent the first line of the paragraph. This value may be negative to offset in the reverse direction. The type is Float and specifies the size of the space in points.

LeftIndent

public static final Object LeftIndent
The amount to indent the left side of the paragraph. Type is float and specifies the size in points.

RightIndent

public static final Object RightIndent
The amount to indent the right side of the paragraph. Type is float and specifies the size in points.

LineSpacing

public static final Object LineSpacing
The amount of space between lines of the paragraph. Type is float and specifies the size in points.

SpaceAbove

public static final Object SpaceAbove
The amount of space above the paragraph. Type is float and specifies the size in points.

SpaceBelow

public static final Object SpaceBelow
The amount of space below the paragraph. Type is float and specifies the size in points.

Alignment

public static final Object Alignment
Alignment for the paragraph. The type is Integer. Valid values are:
  • ALIGN_LEFT
  • ALIGN_RIGHT
  • ALIGN_CENTER
  • ALIGN_JUSTIFED

TabSet

public static final Object TabSet
TabSet for the paragraph, type is a TabSet containing TabStops.

Orientation

public static final Object Orientation
Orientation for a paragraph.

ALIGN_LEFT

public static final int ALIGN_LEFT
A possible value for paragraph alignment. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right.

ALIGN_CENTER

public static final int ALIGN_CENTER
A possible value for paragraph alignment. This specifies that the text is aligned to the center and extra whitespace should be placed equally on the left and right.

ALIGN_RIGHT

public static final int ALIGN_RIGHT
A possible value for paragraph alignment. This specifies that the text is aligned to the right indent and extra whitespace should be placed on the left.

ALIGN_JUSTIFIED

public static final int ALIGN_JUSTIFIED
A possible value for paragraph alignment. This specifies that extra whitespace should be spread out through the rows of the paragraph with the text lined up with the left and right indent except on the last line which should be aligned to the left.
Method Detail

toString

public String toString()
Returns the string representation.
Overrides:
toString in class Object
Returns:
the string

getBidiLevel

public static int getBidiLevel(AttributeSet a)
Gets the BidiLevel setting.
Parameters:
a - the attribute set

setBidiLevel

public static void setBidiLevel(MutableAttributeSet a,
                                int o)
Sets the BidiLevel.
Parameters:
a - the attribute set
o - the bidi level value

getComponent

public static Component getComponent(AttributeSet a)
Gets the component setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the component, null if none

setComponent

public static void setComponent(MutableAttributeSet a,
                                Component c)
Sets the component attribute.
Parameters:
a - the attribute set
c - the component

getIcon

public static Icon getIcon(AttributeSet a)
Gets the icon setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the icon, null if none

setIcon

public static void setIcon(MutableAttributeSet a,
                           Icon c)
Sets the icon attribute.
Parameters:
a - the attribute set
c - the icon

getFontFamily

public static String getFontFamily(AttributeSet a)
Gets the font family setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the font family, "Monospaced" as the default

setFontFamily

public static void setFontFamily(MutableAttributeSet a,
                                 String fam)
Sets the font attribute.
Parameters:
a - the attribute set
fam - the font

getFontSize

public static int getFontSize(AttributeSet a)
Gets the font size setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the font size, 12 as the default

setFontSize

public static void setFontSize(MutableAttributeSet a,
                               int s)
Sets the font size attribute.
Parameters:
a - the attribute set
s - the font size

isBold

public static boolean isBold(AttributeSet a)
Checks whether the bold attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

setBold

public static void setBold(MutableAttributeSet a,
                           boolean b)
Sets the bold attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

isItalic

public static boolean isItalic(AttributeSet a)
Checks whether the italic attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

setItalic

public static void setItalic(MutableAttributeSet a,
                             boolean b)
Sets the italic attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

isUnderline

public static boolean isUnderline(AttributeSet a)
Checks whether the underline attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

isStrikeThrough

public static boolean isStrikeThrough(AttributeSet a)
Checks whether the strikethrough attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

isSuperscript

public static boolean isSuperscript(AttributeSet a)
Checks whether the superscript attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

isSubscript

public static boolean isSubscript(AttributeSet a)
Checks whether the subscript attribute is set.
Parameters:
a - the attribute set
Returns:
true if set else false

setUnderline

public static void setUnderline(MutableAttributeSet a,
                                boolean b)
Sets the underline attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

setStrikeThrough

public static void setStrikeThrough(MutableAttributeSet a,
                                    boolean b)
Sets the strikethrough attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

setSuperscript

public static void setSuperscript(MutableAttributeSet a,
                                  boolean b)
Sets the superscript attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

setSubscript

public static void setSubscript(MutableAttributeSet a,
                                boolean b)
Sets the subscript attribute.
Parameters:
a - the attribute set
b - specifies true/false for setting the attribute

getForeground

public static Color getForeground(AttributeSet a)
Gets the foreground color setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the color, Color.black as the default

setForeground

public static void setForeground(MutableAttributeSet a,
                                 Color fg)
Sets the foreground color.
Parameters:
a - the attribute set
fg - the color

getBackground

public static Color getBackground(AttributeSet a)
Gets the background color setting from the attribute list.
Parameters:
a - the attribute set
Returns:
the color, Color.black as the default

setBackground

public static void setBackground(MutableAttributeSet a,
                                 Color fg)
Sets the background color.
Parameters:
a - the attribute set
fg - the color

getFirstLineIndent

public static float getFirstLineIndent(AttributeSet a)
Gets the first line indent setting.
Parameters:
a - the attribute set

setFirstLineIndent

public static void setFirstLineIndent(MutableAttributeSet a,
                                      float i)
Sets the first line indent.
Parameters:
a - the attribute set
i - the value

getRightIndent

public static float getRightIndent(AttributeSet a)
Gets the right indent setting.
Parameters:
a - the attribute set

setRightIndent

public static void setRightIndent(MutableAttributeSet a,
                                  float i)
Sets right indent.
Parameters:
a - the attribute set
i - the value

getLeftIndent

public static float getLeftIndent(AttributeSet a)
Gets the left indent setting.
Parameters:
a - the attribute set

setLeftIndent

public static void setLeftIndent(MutableAttributeSet a,
                                 float i)
Sets left indent.
Parameters:
a - the attribute set
i - the value

getLineSpacing

public static float getLineSpacing(AttributeSet a)
Gets the line spacing setting.
Parameters:
a - the attribute set

setLineSpacing

public static void setLineSpacing(MutableAttributeSet a,
                                  float i)
Sets line spacing.
Parameters:
a - the attribute set
i - the value

getSpaceAbove

public static float getSpaceAbove(AttributeSet a)
Gets the space above setting.
Parameters:
a - the attribute set

setSpaceAbove

public static void setSpaceAbove(MutableAttributeSet a,
                                 float i)
Sets space above.
Parameters:
a - the attribute set
i - the value

getSpaceBelow

public static float getSpaceBelow(AttributeSet a)
Gets the space below setting.
Parameters:
a - the attribute set

setSpaceBelow

public static void setSpaceBelow(MutableAttributeSet a,
                                 float i)
Sets space below.
Parameters:
a - the attribute set
i - the value

getAlignment

public static int getAlignment(AttributeSet a)
Gets the alignment setting.
Parameters:
a - the attribute set

setAlignment

public static void setAlignment(MutableAttributeSet a,
                                int align)
Sets alignment.
Parameters:
a - the attribute set
align - the alignment value

getTabSet

public static TabSet getTabSet(AttributeSet a)
Gets the TabSet.
Parameters:
a - the attribute set

setTabSet

public static void setTabSet(MutableAttributeSet a,
                             TabSet tabs)
Sets the TabSet.
Parameters:
a - the attribute set.
tabs - the TabSet
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyleContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyleContext

java.lang.Object
  |
  +--javax.swing.text.StyleContext
All Implemented Interfaces:
AbstractDocument.AttributeContext, Serializable
Direct Known Subclasses:
StyleSheet
public class StyleContext
extends Object
implements Serializable, AbstractDocument.AttributeContext

A pool of styles and their associated resources. This class determines the lifetime of a group of resources by being a container that holds caches for various resources such as font and color that get reused by the various style definitions. This can be shared by multiple documents if desired to maximize the sharing of related resources.

This class also provides efficient support for small sets of attributes and compresses them by sharing across uses and taking advantage of their immutable nature. Since many styles are replicated, the potential for sharing is significant, and copies can be extremely cheap. Larger sets reduce the possibility of sharing, and therefore revert automatically to a less space-efficient implementation.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
class | StyleContext.NamedStyle A collection of attributes, typically used to represent character and paragraph styles.
class | StyleContext.SmallAttributeSet This class holds a small number of attributes in an array.
Field Summary
static String DEFAULT_STYLE
The name given to the default logical style attached to paragraphs.
Constructor Summary
StyleContext()
Creates a new StyleContext object.
Method Summary
AttributeSet | addAttribute(AttributeSet old, Object name, Object value) Adds an attribute to the given set, and returns the new representative set.
AttributeSet | addAttributes(AttributeSet old, AttributeSet attr) Adds a set of attributes to the element.
void | addChangeListener(ChangeListener l) Adds a listener to track when styles are added or removed.
Style | addStyle(String nm, Style parent) Adds a new style into the style hierarchy.
protected MutableAttributeSet | createLargeAttributeSet(AttributeSet a) Create a large set of attributes that should trade off space for time.
protected StyleContext.SmallAttributeSet | createSmallAttributeSet(AttributeSet a) Create a compact set of attributes that might be shared.
Color | getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
protected int | getCompressionThreshold() Returns the maximum number of key/value pairs to try and compress into unique/immutable sets.
static StyleContext | getDefaultStyleContext() Returns default AttributeContext shared by all documents that don't bother to define/supply their own context.
AttributeSet | getEmptySet() Fetches an empty AttributeSet.
Font | getFont(AttributeSet attr) Gets the font from an attribute set.
Font | getFont(String family, int style, int size) Gets a new font.
FontMetrics | getFontMetrics(Font f) Returns font metrics for a font.
Color | getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
static Object | getStaticAttribute(Object key) Returns the object previously registered with registerStaticAttributeKey.
static Object | getStaticAttributeKey(Object key) Returns the String that key will be registered with
Style | getStyle(String nm) Fetches a named style previously added to the document
Enumeration | getStyleNames() Fetches the names of the styles defined.
void | readAttributes(ObjectInputStream in, MutableAttributeSet a) Context-specific handling of reading in attributes
static void | readAttributeSet(ObjectInputStream in, MutableAttributeSet a) Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet.
void | reclaim(AttributeSet a) Returns a set no longer needed by the MutableAttributeSet implmentation.
static void | registerStaticAttributeKey(Object key) Registers an object as a static object that is being used as a key in attribute sets.
AttributeSet | removeAttribute(AttributeSet old, Object name) Removes an attribute from the set.
AttributeSet | removeAttributes(AttributeSet old, AttributeSet attrs) Removes a set of attributes for the element.
AttributeSet | removeAttributes(AttributeSet old, Enumeration names) Removes a set of attributes for the element.
void | removeChangeListener(ChangeListener l) Removes a listener that was tracking styles being added or removed.
void | removeStyle(String nm) Removes a named style previously added to the document.
String | toString() Converts a StyleContext to a String.
void | writeAttributes(ObjectOutputStream out, AttributeSet a) Context-specific handling of writing out attributes
static void | writeAttributeSet(ObjectOutputStream out, AttributeSet a) Writes a set of attributes to the given object stream for the purpose of serialization.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_STYLE

public static final String DEFAULT_STYLE
The name given to the default logical style attached to paragraphs.
Constructor Detail

StyleContext

public StyleContext()
Creates a new StyleContext object.
Method Detail

getDefaultStyleContext

public static final StyleContext getDefaultStyleContext()
Returns default AttributeContext shared by all documents that don't bother to define/supply their own context.
Returns:
the context

addStyle

public Style addStyle(String nm,
                      Style parent)
Adds a new style into the style hierarchy. Style attributes resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.
Parameters:
nm - the name of the style (must be unique within the collection of named styles in the document). The name may be null if the style is unnamed, but the caller is responsible for managing the reference returned as an unnamed style can't be fetched by name. An unnamed style may be useful for things like character attribute overrides such as found in a style run.
parent - the parent style. This may be null if unspecified attributes need not be resolved in some other style.
Returns:
the created style

removeStyle

public void removeStyle(String nm)
Removes a named style previously added to the document.
Parameters:
nm - the name of the style to remove

getStyle

public Style getStyle(String nm)
Fetches a named style previously added to the document
Parameters:
nm - the name of the style
Returns:
the style

getStyleNames

public Enumeration getStyleNames()
Fetches the names of the styles defined.
Returns:
the list of names as an enumeration

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener to track when styles are added or removed.
Parameters:
l - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a listener that was tracking styles being added or removed.
Parameters:
l - the change listener

getFont

public Font getFont(AttributeSet attr)
Gets the font from an attribute set. This is implemented to try and fetch a cached font for the given AttributeSet, and if that fails the font features are resolved and the font is fetched from the low-level font cache.
Parameters:
attr - the attribute set
Returns:
the font

getForeground

public Color getForeground(AttributeSet attr)
Takes a set of attributes and turn it into a foreground color specification. This might be used to specify things like brighter, more hue, etc. By default it simply returns the value specified by the StyleConstants.Foreground attribute.
Parameters:
attr - the set of attributes
Returns:
the color

getBackground

public Color getBackground(AttributeSet attr)
Takes a set of attributes and turn it into a background color specification. This might be used to specify things like brighter, more hue, etc. By default it simply returns the value specified by the StyleConstants.Background attribute.
Parameters:
attr - the set of attributes
Returns:
the color

getFont

public Font getFont(String family,
                    int style,
                    int size)
Gets a new font. This returns a Font from a cache if a cached font exists. If not, a Font is added to the cache. This is basically a low-level cache for 1.1 font features.
Parameters:
family - the font family (such as "Monospaced")
style - the style of the font (such as Font.PLAIN)
size - the point size >= 1
Returns:
the new font

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Returns font metrics for a font.
Parameters:
f - the font
Returns:
the metrics

addAttribute

public AttributeSet addAttribute(AttributeSet old,
                                 Object name,
                                 Object value)
Adds an attribute to the given set, and returns the new representative set.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
addAttribute in interface AbstractDocument.AttributeContext
Parameters:
old - the old attribute set
name - the non-null attribute name
value - the attribute value
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes

public AttributeSet addAttributes(AttributeSet old,
                                  AttributeSet attr)
Adds a set of attributes to the element.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
addAttributes in interface AbstractDocument.AttributeContext
Parameters:
old - the old attribute set
attr - the attributes to add
Returns:
the updated attribute set
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute

public AttributeSet removeAttribute(AttributeSet old,
                                    Object name)
Removes an attribute from the set.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
removeAttribute in interface AbstractDocument.AttributeContext
Parameters:
old - the old set of attributes
name - the non-null attribute name
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     Enumeration names)
Removes a set of attributes for the element.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
removeAttributes in interface AbstractDocument.AttributeContext
Parameters:
old - the old attribute set
names - the attribute names
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     AttributeSet attrs)
Removes a set of attributes for the element.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
removeAttributes in interface AbstractDocument.AttributeContext
Parameters:
old - the old attribute set
attrs - the attributes
Returns:
the updated attribute set
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration)

getEmptySet

public AttributeSet getEmptySet()
Fetches an empty AttributeSet.
Specified by:
getEmptySet in interface AbstractDocument.AttributeContext
Returns:
the set

reclaim

public void reclaim(AttributeSet a)
Returns a set no longer needed by the MutableAttributeSet implmentation. This is useful for operation under 1.1 where there are no weak references. This would typically be called by the finalize method of the MutableAttributeSet implementation.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
reclaim in interface AbstractDocument.AttributeContext
Parameters:
a - the set to reclaim

getCompressionThreshold

protected int getCompressionThreshold()
Returns the maximum number of key/value pairs to try and compress into unique/immutable sets. Any sets above this limit will use hashtables and be a MutableAttributeSet.
Returns:
the threshold

createSmallAttributeSet

protected StyleContext.SmallAttributeSet createSmallAttributeSet(AttributeSet a)
Create a compact set of attributes that might be shared. This is a hook for subclasses that want to alter the behavior of SmallAttributeSet. This can be reimplemented to return an AttributeSet that provides some sort of attribute conversion.
Parameters:
a - The set of attributes to be represented in the the compact form.

createLargeAttributeSet

protected MutableAttributeSet createLargeAttributeSet(AttributeSet a)
Create a large set of attributes that should trade off space for time. This set will not be shared. This is a hook for subclasses that want to alter the behavior of the larger attribute storage format (which is SimpleAttributeSet by default). This can be reimplemented to return a MutableAttributeSet that provides some sort of attribute conversion.
Parameters:
a - The set of attributes to be represented in the the larger form.

toString

public String toString()
Converts a StyleContext to a String.
Overrides:
toString in class Object
Returns:
the string

writeAttributes

public void writeAttributes(ObjectOutputStream out,
                            AttributeSet a)
                     throws IOException
Context-specific handling of writing out attributes

readAttributes

public void readAttributes(ObjectInputStream in,
                           MutableAttributeSet a)
                    throws ClassNotFoundException,
                           IOException
Context-specific handling of reading in attributes

writeAttributeSet

public static void writeAttributeSet(ObjectOutputStream out,
                                     AttributeSet a)
                              throws IOException
Writes a set of attributes to the given object stream for the purpose of serialization. This will take special care to deal with static attribute keys that have been registered wit the registerStaticAttributeKey method. Any attribute key not regsitered as a static key will be serialized directly. All values are expected to be serializable.
Parameters:
out - the output stream
a - the attribute set
Throws:
IOException - on any I/O error

readAttributeSet

public static void readAttributeSet(ObjectInputStream in,
                                    MutableAttributeSet a)
                             throws ClassNotFoundException,
                                    IOException
Reads a set of attributes from the given object input stream that have been previously written out with writeAttributeSet. This will try to restore keys that were static objects to the static objects in the current virtual machine considering only those keys that have been registered with the registerStaticAttributeKey method. The attributes retrieved from the stream will be placed into the given mutable set.
Parameters:
in - the object stream to read the attribute data from.
a - the attribute set to place the attribute definitions in.
Throws:
ClassNotFoundException - passed upward if encountered when reading the object stream.
IOException - passed upward if encountered when reading the object stream.

registerStaticAttributeKey

public static void registerStaticAttributeKey(Object key)
Registers an object as a static object that is being used as a key in attribute sets. This allows the key to be treated specially for serialization.

For operation under a 1.1 virtual machine, this uses the value returned by toString concatenated to the classname. The value returned by toString should not have the class reference in it (ie it should be reimplemented from the definition in Object) in order to be the same when recomputed later.

Parameters:
key - the non-null object key

getStaticAttribute

public static Object getStaticAttribute(Object key)
Returns the object previously registered with registerStaticAttributeKey.

getStaticAttributeKey

public static Object getStaticAttributeKey(Object key)
Returns the String that key will be registered with
See Also:
getStaticAttribute(java.lang.Object), registerStaticAttributeKey(java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyledDocument

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface StyledDocument

All Superinterfaces:
Document
All Known Implementing Classes:
DefaultStyledDocument
public interface StyledDocument
extends Document

Interface for a generic styled document.

Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Method Summary
Style | addStyle(String nm, Style parent) Adds a new style into the logical style hierarchy.
Color | getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.
Element | getCharacterElement(int pos) Gets the element that represents the character that is at the given offset within the document.
Font | getFont(AttributeSet attr) Takes a set of attributes and turn it into a font specification.
Color | getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.
Style | getLogicalStyle(int p) Gets a logical style for a given position in a paragraph.
Element | getParagraphElement(int pos) Gets the element that represents the paragraph that encloses the given offset within the document.
Style | getStyle(String nm) Fetches a named style previously added.
void | removeStyle(String nm) Removes a named style previously added to the document.
void | setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) Changes the content element attributes used for the given range of existing content in the document.
void | setLogicalStyle(int pos, Style s) Sets the logical style to use for the paragraph at the given position.
void | setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Sets paragraph attributes.
Methods inherited from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render

Method Detail

addStyle

public Style addStyle(String nm,
                      Style parent)
Adds a new style into the logical style hierarchy. Style attributes resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.
Parameters:
nm - the name of the style (must be unique within the collection of named styles). The name may be null if the style is unnamed, but the caller is responsible for managing the reference returned as an unnamed style can't be fetched by name. An unnamed style may be useful for things like character attribute overrides such as found in a style run.
parent - the parent style. This may be null if unspecified attributes need not be resolved in some other style.
Returns:
the style

removeStyle

public void removeStyle(String nm)
Removes a named style previously added to the document.
Parameters:
nm - the name of the style to remove

getStyle

public Style getStyle(String nm)
Fetches a named style previously added.
Parameters:
nm - the name of the style
Returns:
the style

setCharacterAttributes

public void setCharacterAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)
Changes the content element attributes used for the given range of existing content in the document. All of the attributes defined in the given Attributes argument are applied to the given range. This method can be used to completely remove all content level attributes for the given range by giving an Attributes argument that has no attributes defined and setting replace to true.
Parameters:
offset - the start of the change >= 0
length - the length of the change >= 0
s - the non-null attributes to change to. Any attributes defined will be applied to the text for the given range.
replace - indicates whether or not the previous attributes should be cleared before the new attributes as set. If true, the operation will replace the previous attributes entirely. If false, the new attributes will be merged with the previous attributes.

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   AttributeSet s,
                                   boolean replace)
Sets paragraph attributes.
Parameters:
offset - the start of the change >= 0
length - the length of the change >= 0
s - the non-null attributes to change to. Any attributes defined will be applied to the text for the given range.
replace - indicates whether or not the previous attributes should be cleared before the new attributes are set. If true, the operation will replace the previous attributes entirely. If false, the new attributes will be merged with the previous attributes.

setLogicalStyle

public void setLogicalStyle(int pos,
                            Style s)
Sets the logical style to use for the paragraph at the given position. If attributes aren't explicitly set for character and paragraph attributes they will resolve through the logical style assigned to the paragraph, which in turn may resolve through some hierarchy completely independent of the element hierarchy in the document.
Parameters:
pos - the starting position >= 0
s - the style to set

getLogicalStyle

public Style getLogicalStyle(int p)
Gets a logical style for a given position in a paragraph.
Parameters:
p - the position >= 0
Returns:
the style

getParagraphElement

public Element getParagraphElement(int pos)
Gets the element that represents the paragraph that encloses the given offset within the document.
Parameters:
pos - the offset >= 0
Returns:
the element

getCharacterElement

public Element getCharacterElement(int pos)
Gets the element that represents the character that is at the given offset within the document.
Parameters:
pos - the offset >= 0
Returns:
the element

getForeground

public Color getForeground(AttributeSet attr)
Takes a set of attributes and turn it into a foreground color specification. This might be used to specify things like brighter, more hue, etc.
Parameters:
attr - the set of attributes
Returns:
the color

getBackground

public Color getBackground(AttributeSet attr)
Takes a set of attributes and turn it into a background color specification. This might be used to specify things like brighter, more hue, etc.
Parameters:
attr - the set of attributes
Returns:
the color

getFont

public Font getFont(AttributeSet attr)
Takes a set of attributes and turn it into a font specification. This can be used to turn things like family, style, size, etc into a font that is available on the system the document is currently being used on.
Parameters:
attr - the set of attributes
Returns:
the font
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyledEditorKit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--javax.swing.text.StyledEditorKit
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
HTMLEditorKit, RTFEditorKit
public class StyledEditorKit
extends DefaultEditorKit

This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document. This implementation provides a default implementation which treats text as styled text and provides a minimal set of actions for editing styled text.

See Also:
Serialized Form

Inner Class Summary
static class | StyledEditorKit.AlignmentAction An action to set paragraph alignment.
static class | StyledEditorKit.BoldAction An action to toggle the bold attribute.
static class | StyledEditorKit.FontFamilyAction An action to set the font family in the associated JEditorPane.
static class | StyledEditorKit.FontSizeAction An action to set the font size in the associated JEditorPane.
static class | StyledEditorKit.ForegroundAction An action to set foreground color.
static class | StyledEditorKit.ItalicAction An action to toggle the italic attribute.
static class | StyledEditorKit.StyledTextAction An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static class | StyledEditorKit.UnderlineAction An action to toggle the underline attribute.
Inner classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
Constructor Summary
StyledEditorKit()
Method Summary
Object | clone() Create a copy of the editor kit.
Document | createDefaultDocument() Creates an uninitialized text storage model that is appropriate for this type of editor.
protected void | createInputAttributes(Element element, MutableAttributeSet set) Copies the key/values in elements AttributeSet into set.
void | deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane.
Action[] | getActions() Fetches the command list for the editor.
Element | getCharacterAttributeRun() Fetches the element representing the current run of character attributes for the caret.
MutableAttributeSet | getInputAttributes() Gets the input attributes for the pane.
ViewFactory | getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
void | install(JEditorPane c) Called when the kit is being installed into a JEditorPane.
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, getContentType, read, read, write, write
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit

public StyledEditorKit()
Method Detail

getInputAttributes

public MutableAttributeSet getInputAttributes()
Gets the input attributes for the pane. When the caret moves and there is no selection, the input attributes are automatically mutated to reflect the character attributes of the current caret location. The styled editing actions use the input attributes to carry out their actions.
Returns:
the attribute set

getCharacterAttributeRun

public Element getCharacterAttributeRun()
Fetches the element representing the current run of character attributes for the caret.
Returns:
the element

clone

public Object clone()
Create a copy of the editor kit. This allows an implementation to serve as a prototype for others, so that they can be quickly created.
Overrides:
clone in class EditorKit
Returns:
the copy

getActions

public Action[] getActions()
Fetches the command list for the editor. This is the list of commands supported by the superclass augmented by the collection of commands defined locally for style operations.
Overrides:
getActions in class DefaultEditorKit
Returns:
the command list

createDefaultDocument

public Document createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.
Overrides:
createDefaultDocument in class DefaultEditorKit
Returns:
the model

install

public void install(JEditorPane c)
Called when the kit is being installed into a JEditorPane.
Overrides:
install in class EditorKit
Parameters:
c - the JEditorPane

deinstall

public void deinstall(JEditorPane c)
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
Overrides:
deinstall in class EditorKit
Parameters:
c - the JEditorPane

getViewFactory

public ViewFactory getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit. This is implemented to return View implementations for the following kinds of elements:
  • AbstractDocument.ContentElementName
  • AbstractDocument.ParagraphElementName
  • AbstractDocument.SectionElementName
  • StyleConstants.ComponentElementName
  • StyleConstants.IconElementName
Overrides:
getViewFactory in class DefaultEditorKit
Returns:
the factory

createInputAttributes

protected void createInputAttributes(Element element,
                                     MutableAttributeSet set)
Copies the key/values in elements AttributeSet into set. This does not copy component, icon, or element names attributes. Subclasses may wish to refine what is and what isn't copied here. But be sure to first remove all the attributes that are in set.

This is called anytime the caret moves over a different location.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StyledTextAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.StyledTextAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
HTMLEditorKit.HTMLTextAction, StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.UnderlineAction
Enclosing class:
StyledEditorKit
public abstract static class StyledEditorKit.StyledTextAction
extends TextAction

An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed. This has some convenience methods for causing character or paragraph level attribute changes. The convenience methods will throw an IllegalArgumentException if the assumption of a StyledDocument, a JEditorPane, or a StyledEditorKit fail to be true.

The component that gets acted upon by the action will be the source of the ActionEvent if the source can be narrowed to a JEditorPane type. If the source can't be narrowed, the most recently focused text component is changed. If neither of these are the case, the action cannot be performed.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.StyledTextAction(String nm)
Creates a new StyledTextAction from a string action name.
Method Summary
protected JEditorPane | getEditor(ActionEvent e) Gets the target editor for an action.
protected StyledDocument | getStyledDocument(JEditorPane e) Gets the document associated with an editor pane.
protected StyledEditorKit | getStyledEditorKit(JEditorPane e) Gets the editor kit associated with an editor pane.
protected void | setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to character content.
protected void | setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace) Applies the given attributes to paragraphs.
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed

Constructor Detail

StyledEditorKit.StyledTextAction

public StyledEditorKit.StyledTextAction(String nm)
Creates a new StyledTextAction from a string action name.
Parameters:
nm - the name of the action
Method Detail

getEditor

protected final JEditorPane getEditor(ActionEvent e)
Gets the target editor for an action.
Parameters:
e - the action event
Returns:
the editor

getStyledDocument

protected final StyledDocument getStyledDocument(JEditorPane e)
Gets the document associated with an editor pane.
Parameters:
e - the editor
Returns:
the document
Throws:
IllegalArgumentException - for the wrong document type

getStyledEditorKit

protected final StyledEditorKit getStyledEditorKit(JEditorPane e)
Gets the editor kit associated with an editor pane.
Parameters:
e - the editor pane
Returns:
the kit
Throws:
IllegalArgumentException - for the wrong document type

setCharacterAttributes

protected final void setCharacterAttributes(JEditorPane editor,
                                            AttributeSet attr,
                                            boolean replace)
Applies the given attributes to character content. If there is a selection, the attributes are applied to the selection range. If there is no selection, the attributes are applied to the input attribute set which defines the attributes for any new text that gets inserted.
Parameters:
editor - the editor
attr - the attributes
replace - if true, then replace the existing attributes first

setParagraphAttributes

protected final void setParagraphAttributes(JEditorPane editor,
                                            AttributeSet attr,
                                            boolean replace)
Applies the given attributes to paragraphs. If there is a selection, the attributes are applied to the paragraphs that intersect the selection. if there is no selection, the attributes are applied to the paragraph at the current caret position.
Parameters:
editor - the editor
attr - the attributes
replace - if true, replace the existing attributes first
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabableView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface TabableView

All Known Implementing Classes:
GlyphView, LabelView
public interface TabableView

Interface for View's that have size dependant upon tabs.

See Also:
TabExpander, LabelView, ParagraphView

Method Summary
float | getPartialSpan(int p0, int p1) Determines the span along the same axis as tab expansion for a portion of the view.
float | getTabbedSpan(float x, TabExpander e) Determines the desired span when using the given tab expansion implementation.

Method Detail

getTabbedSpan

public float getTabbedSpan(float x,
                           TabExpander e)
Determines the desired span when using the given tab expansion implementation. If a container calls this method, it will do so prior to the normal layout which would call getPreferredSpan. A view implementing this should give the same result in any subsequent calls to getPreferredSpan along the axis of tab expansion.
Parameters:
x - the position the view would be located at for the purpose of tab expansion >= 0.
e - how to expand the tabs when encountered.
Returns:
the desired span >= 0

getPartialSpan

public float getPartialSpan(int p0,
                            int p1)
Determines the span along the same axis as tab expansion for a portion of the view. This is intended for use by the TabExpander for cases where the tab expansion involves aligning the portion of text that doesn't have whitespace relative to the tab stop. There is therefore an assumption that the range given does not contain tabs.
Parameters:
p0 - the starting location in the text document >= 0
p1 - the ending location in the text document >= p0
Returns:
the span >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabExpander

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface TabExpander

All Known Implementing Classes:
ParagraphView, PlainView, WrappedPlainView
public interface TabExpander

Simple interface to allow for different types of implementations of tab expansion.

Method Summary
 float nextTabStop(float x, int tabOffset)
Returns the next tab stop position given a reference position.

Method Detail

nextTabStop

public float nextTabStop(float x,
                         int tabOffset)
Returns the next tab stop position given a reference position. Values are expressed in points.
Parameters:
x - the position in points >= 0
tabOffset - the position within the text stream that the tab occurred at >= 0.
Returns:
the next tab stop >= 0
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableCell

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TableView.TableCell

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.TableView.TableCell
All Implemented Interfaces:
SwingConstants, javax.swing.text.TableView.GridCell
Enclosing class:
TableView
Deprecated. A table cell can now be any View implementation.

public class TableView.TableCell
extends BoxView
implements javax.swing.text.TableView.GridCell

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
TableView.TableCell(Element elem)
Deprecated. Constructs a TableCell for the given element.
Method Summary
int | getColumnCount() Deprecated. Gets the number of columns this cell spans (e.g.
int | getGridColumn() Deprecated. Gets the column of the grid location
int | getGridRow() Deprecated. Gets the row of the grid location
int | getRowCount() Deprecated. Gets the number of rows this cell spans (that is, the grid height).
void | setGridLocation(int row, int col) Deprecated. Sets the grid location.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TableView.TableCell

public TableView.TableCell(Element elem)
Deprecated.
Constructs a TableCell for the given element.
Parameters:
elem - the element that this view is responsible for
Method Detail

getColumnCount

public int getColumnCount()
Deprecated.
Gets the number of columns this cell spans (e.g. the grid width).
Specified by:
getColumnCount in interface javax.swing.text.TableView.GridCell
Returns:
the number of columns

getRowCount

public int getRowCount()
Deprecated.
Gets the number of rows this cell spans (that is, the grid height).
Specified by:
getRowCount in interface javax.swing.text.TableView.GridCell
Returns:
the number of rows

setGridLocation

public void setGridLocation(int row,
                            int col)
Deprecated.
Sets the grid location.
Specified by:
setGridLocation in interface javax.swing.text.TableView.GridCell
Parameters:
row - the row >= 0
col - the column >= 0

getGridRow

public int getGridRow()
Deprecated.
Gets the row of the grid location
Specified by:
getGridRow in interface javax.swing.text.TableView.GridCell

getGridColumn

public int getGridColumn()
Deprecated.
Gets the column of the grid location
Specified by:
getGridColumn in interface javax.swing.text.TableView.GridCell
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableRow

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TableView.TableRow

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.TableView.TableRow
All Implemented Interfaces:
SwingConstants
Enclosing class:
TableView
public class TableView.TableRow
extends BoxView

View of a row in a row-centric table.

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
TableView.TableRow(Element elem)
Constructs a TableView for the given element.
Method Summary
int | getResizeWeight(int axis) Determines the resizability of the view along the given axis.
protected View | getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected void | layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the major axis of the box (i.e.
protected void | layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the minor axis of the box (i.e.
void | replace(int offset, int length, View[] views) Change the child views.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, modelToView, paint, paintChild, preferenceChanged, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TableView.TableRow

public TableView.TableRow(Element elem)
Constructs a TableView for the given element.
Parameters:
elem - the element that this view is responsible for
Method Detail

replace

public void replace(int offset,
                    int length,
                    View[] views)
Change the child views. This is implemented to provide the superclass behavior and invalidate the grid so that rows and columns will be recalculated.
Overrides:
replace in class BoxView
Following copied from class: javax.swing.text.BoxView
Parameters:
index - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount.length - the number of existing child views to remove. This should be a value >= 0 and <= (getViewCount()="(getViewCount()" -="-" offset).views - the child views to add. This value can be null to indicate no children are being added (useful to remove).

layoutMajorAxis

protected void layoutMajorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the major axis of the box (i.e. the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the major axis.

This is re-implemented to give each child the span of the column width for the table, and to give cells that span multiple columns the multi-column span.

Overrides:
layoutMajorAxis in class BoxView
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis. This is called by the superclass whenever the layout needs to be updated along the minor axis.

This is implemented to delegate to the superclass, then adjust the span for any cell that spans multiple rows.

Overrides:
layoutMinorAxis in class BoxView
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

getResizeWeight

public int getResizeWeight(int axis)
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
Overrides:
getResizeWeight in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Returns:
the resize weight
Throws:
IllegalArgumentException - for an invalid axis

getViewAtPosition

protected View getViewAtPosition(int pos,
                                 Rectangle a)
Fetches the child view that represents the given position in the model. This is implemented to walk through the children looking for a range that contains the given position. In this view the children do not necessarily have a one to one mapping with the child elements.
Overrides:
getViewAtPosition in class CompositeView
Parameters:
pos - the search position >= 0
a - the allocation to the table on entry, and the allocation of the view containing the position on exit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TableView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TableView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.TableView
All Implemented Interfaces:
SwingConstants
public abstract class TableView
extends BoxView

Implements View interface for a table, that is composed of an element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells. The cell elements can have an arbitrary element structure under them, which will be built with the ViewFactory returned by the getViewFactory method.

    TABLE
      ROW
        CELL
        CELL
      ROW
        CELL
        CELL

This is implemented as a hierarchy of boxes, the table itself is a vertical box, the rows are horizontal boxes, and the cells are vertical boxes. The cells are allowed to span multiple columns and rows. By default, the table can be thought of as being formed over a grid (i.e. somewhat like one would find in gridbag layout), where table cells can request to span more than one grid cell. The default horizontal span of table cells will be based upon this grid, but can be changed by reimplementing the requested span of the cell (i.e. table cells can have independant spans if desired).

See Also:
View

Inner Class Summary
class | TableView.TableCell Deprecated. A table cell can now be any View implementation.
class | TableView.TableRow View of a row in a row-centric table.
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
TableView(Element elem)
Constructs a TableView for the given element.
Method Summary
protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the requirements for the minor axis.
protected TableView.TableCell | createTableCell(Element elem) Deprecated. Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.
protected TableView.TableRow | createTableRow(Element elem) Creates a new table row.
protected void | forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected View | getViewAtPosition(int pos, Rectangle a) Fetches the child view that represents the given position in the model.
protected void | layoutColumns(int targetSpan, int[] offsets, int[] spans, SizeRequirements[] reqs) Layout the columns to fit within the given target span.
protected void | layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Perform layout for the minor axis of the box (i.e.
void | replace(int offset, int length, View[] views) Change the child views.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, flipEastAndWestAtEnds, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, modelToView, paint, paintChild, preferenceChanged, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TableView

public TableView(Element elem)
Constructs a TableView for the given element.
Parameters:
elem - the element that this view is responsible for
Method Detail

createTableRow

protected TableView.TableRow createTableRow(Element elem)
Creates a new table row.
Parameters:
elem - an element
Returns:
the row

createTableCell

protected TableView.TableCell createTableCell(Element elem)
Deprecated. Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.

Parameters:
elem - an element
Returns:
the cell

forwardUpdate

protected void forwardUpdate(DocumentEvent.ElementChange ec,
                             DocumentEvent e,
                             Shape a,
                             ViewFactory f)
Description copied from class: BoxView
Forward the given DocumentEvent to the child views that need to be notified of the change to the model. If a child changed it's requirements and the allocation was valid prior to forwarding the portion of the box from the starting child to the end of the box will be repainted.
Overrides:
forwardUpdate in class BoxView
Following copied from class: javax.swing.text.BoxView
Parameters:
ec - changes to the element this view is responsible for (may be null if there were no changes).
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

replace

public void replace(int offset,
                    int length,
                    View[] views)
Change the child views. This is implemented to provide the superclass behavior and invalidate the grid so that rows and columns will be recalculated.
Overrides:
replace in class BoxView
Following copied from class: javax.swing.text.BoxView
Parameters:
index - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount.length - the number of existing child views to remove. This should be a value >= 0 and <= (getViewCount()="(getViewCount()" -="-" offset).views - the child views to add. This value can be null to indicate no children are being added (useful to remove).

layoutColumns

protected void layoutColumns(int targetSpan,
                             int[] offsets,
                             int[] spans,
                             SizeRequirements[] reqs)
Layout the columns to fit within the given target span.
Parameters:
targetSpan - the given span for total of all the table columns.
reqs - the requirements desired for each column. This is the column maximum of the cells minimum, preferred, and maximum requested span.
spans - the return value of how much to allocated to each column.
offsets - the return value of the offset from the origin for each column.

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis. This is called by the superclass whenever the layout needs to be updated along the minor axis.

This is implemented to call the layoutColumns method, and then forward to the superclass to actually carry out the layout of the tables rows.

Overrides:
layoutMinorAxis in class BoxView
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the children.
axis - the axis being layed out.
offsets - the offsets from the origin of the view for each of the child views. This is a return value and is filled in by the implementation of this method.
spans - the span of each child view. This is a return value and is filled in by the implementation of this method.

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)
Calculate the requirements for the minor axis. This is called by the superclass whenever the requirements need to be updated (i.e. a preferenceChanged was messaged through this view).

This is implemented to calculate the requirements as the sum of the requirements of the columns.

Overrides:
calculateMinorAxisRequirements in class BoxView

getViewAtPosition

protected View getViewAtPosition(int pos,
                                 Rectangle a)
Fetches the child view that represents the given position in the model. This is implemented to walk through the children looking for a range that contains the given position. In this view the children do not necessarily have a one to one mapping with the child elements.
Overrides:
getViewAtPosition in class CompositeView
Parameters:
pos - the search position >= 0
a - the allocation to the table on entry, and the allocation of the view containing the position on exit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TabSet

java.lang.Object
  |
  +--javax.swing.text.TabSet
All Implemented Interfaces:
Serializable
public class TabSet
extends Object
implements Serializable

A TabSet is comprised of many TabStops. It offers methods for locating the closest TabStop to a given position and finding all the potential TabStops. It is also immutable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
TabSet(TabStop[] tabs)
Creates and returns an instance of TabSet.
Method Summary
TabStop | getTab(int index) Returns the TabStop at index index.
TabStop | getTabAfter(float location) Returns the Tab instance after location.
int | getTabCount() Returns the number of Tab instances the receiver contains.
int | getTabIndex(TabStop tab)
int | getTabIndexAfter(float location) Returns the index of the Tab to be used after location.
String | toString() Returns the string representation of the set of tabs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TabSet

public TabSet(TabStop[] tabs)
Creates and returns an instance of TabSet. The array of Tabs passed in must be sorted in ascending order.
Method Detail

getTabCount

public int getTabCount()
Returns the number of Tab instances the receiver contains.

getTab

public TabStop getTab(int index)
Returns the TabStop at index index. This will throw an IllegalArgumentException if index is outside the range of tabs.

getTabAfter

public TabStop getTabAfter(float location)
Returns the Tab instance after location. This will return null if there are no tabs after location.

getTabIndex

public int getTabIndex(TabStop tab)
Returns:
the index of the TabStop tab, or -1 if tab is not contained in the receiver.

getTabIndexAfter

public int getTabIndexAfter(float location)
Returns the index of the Tab to be used after location. This will return -1 if there are no tabs after location.

toString

public String toString()
Returns the string representation of the set of tabs.
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TabStop

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TabStop

java.lang.Object
  |
  +--javax.swing.text.TabStop
All Implemented Interfaces:
Serializable
public class TabStop
extends Object
implements Serializable

This class encapsulates a single tab stop (basically as tab stops are thought of by RTF). A tab stop is at a specified distance from the left margin, aligns text in a specified way, and has a specified leader. TabStops are immutable, and usually contained in TabSets.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
static int | ALIGN_BAR
static int | ALIGN_CENTER Characters following tab are positioned such that all following characters up to next tab/newline are centered around the tabs location.
static int | ALIGN_DECIMAL Characters following tab are aligned such that next decimal/tab/newline is at the tab location, very similiar to RIGHT_TAB, just includes decimal as additional character to look for.
static int | ALIGN_LEFT Character following tab is positioned at location.
static int | ALIGN_RIGHT Characters following tab are positioned such that all following characters up to next tab/newline end at location.
static int | LEAD_DOTS
static int | LEAD_EQUALS
static int | LEAD_HYPHENS
static int | LEAD_NONE
static int | LEAD_THICKLINE
static int | LEAD_UNDERLINE
Constructor Summary
TabStop(float pos)
Creates a tab at position pos with a default alignment and default leader.
TabStop(float pos, int align, int leader)
Creates a tab with the specified position pos, alignment align and leader leader.
Method Summary
boolean | equals(Object other) Returns true if other equals the receiver.
int | getAlignment()
int | getLeader()
float | getPosition()
int | hashCode() Returns the hashCode for the object.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
Character following tab is positioned at location.

ALIGN_RIGHT

public static final int ALIGN_RIGHT
Characters following tab are positioned such that all following characters up to next tab/newline end at location.

ALIGN_CENTER

public static final int ALIGN_CENTER
Characters following tab are positioned such that all following characters up to next tab/newline are centered around the tabs location.

ALIGN_DECIMAL

public static final int ALIGN_DECIMAL
Characters following tab are aligned such that next decimal/tab/newline is at the tab location, very similiar to RIGHT_TAB, just includes decimal as additional character to look for.

ALIGN_BAR

public static final int ALIGN_BAR

LEAD_NONE

public static final int LEAD_NONE

LEAD_DOTS

public static final int LEAD_DOTS

LEAD_HYPHENS

public static final int LEAD_HYPHENS

LEAD_UNDERLINE

public static final int LEAD_UNDERLINE

LEAD_THICKLINE

public static final int LEAD_THICKLINE

LEAD_EQUALS

public static final int LEAD_EQUALS
Constructor Detail

TabStop

public TabStop(float pos)
Creates a tab at position pos with a default alignment and default leader.

TabStop

public TabStop(float pos,
               int align,
               int leader)
Creates a tab with the specified position pos, alignment align and leader leader.
Method Detail

getPosition

public float getPosition()
Returns:
the postion of the tab.

getAlignment

public int getAlignment()
Returns:
the alignment of the tab.

getLeader

public int getLeader()
Returns:
the leader of the tab.

equals

public boolean equals(Object other)
Returns true if other equals the receiver.
Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns the hashCode for the object. This must be defined here to ensure 100% pure.
Overrides:
hashCode in class Object
Returns:
the hashCode for the object

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
Overrides:
toString in class Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class TextAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction, StyledEditorKit.StyledTextAction
public abstract class TextAction
extends AbstractAction

An Action implementation useful for key bindings that are shared across a number of different text components. Because the action is shared, it must have a way of getting it's target to act upon. This class provides support to try and find a text component to operate on. The preferred way of getting the component to act upon is through the ActionEvent that is received. If the Object returned by getSource can be narrowed to a text component, it will be used. If the action event is null or can't be narrowed, the last focused text component is tried. This is determined by being used in conjunction with a JTextController which arranges to share that information with a TextAction.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
TextAction(String name)
Creates a new JTextAction object.
Method Summary
static Action[] | augmentList(Action[] list1, Action[] list2) Takes one list of commands and augments it with another list of commands.
protected JTextComponent | getFocusedComponent() Fetches the text component that currently has focus.
protected JTextComponent | getTextComponent(ActionEvent e) Determines the component to use for the action.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed

Constructor Detail

TextAction

public TextAction(String name)
Creates a new JTextAction object.
Parameters:
name - the name of the action
Method Detail

getTextComponent

protected final JTextComponent getTextComponent(ActionEvent e)
Determines the component to use for the action. This if fetched from the source of the ActionEvent if it's not null and can be narrowed. Otherwise, the last focused component is used.
Parameters:
e - the ActionEvent
Returns:
the component

augmentList

public static final Action[] augmentList(Action[] list1,
                                         Action[] list2)
Takes one list of commands and augments it with another list of commands. The second list is considered to be higher priority than the first list and commands with the same name will both lists will only have the dominate command found in the second list in the returned list.
Parameters:
list1 - the first list, may be empty but not null
list2 - the second list, may be empty but not null
Returns:
the augmented list

getFocusedComponent

protected final JTextComponent getFocusedComponent()
Fetches the text component that currently has focus. This allows actions to be shared across text components which is useful for key-bindings where a large set of actions are defined, but generally used the same way across many different components.
Returns:
the component
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnderlineAction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class StyledEditorKit.UnderlineAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--javax.swing.text.TextAction
              |
              +--javax.swing.text.StyledEditorKit.StyledTextAction
                    |
                    +--javax.swing.text.StyledEditorKit.UnderlineAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Enclosing class:
StyledEditorKit
public static class StyledEditorKit.UnderlineAction
extends StyledEditorKit.StyledTextAction

An action to toggle the underline attribute.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
StyledEditorKit.UnderlineAction()
Constructs a new UnderlineAction.
Method Summary
 void actionPerformed(ActionEvent e)
Toggles the Underline attribute.
Methods inherited from class javax.swing.text.StyledEditorKit.StyledTextAction
getEditor, getStyledDocument, getStyledEditorKit, setCharacterAttributes, setParagraphAttributes
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StyledEditorKit.UnderlineAction

public StyledEditorKit.UnderlineAction()
Constructs a new UnderlineAction.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Toggles the Underline attribute.
Parameters:
e - the action event
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Utilities

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class Utilities

java.lang.Object
  |
  +--javax.swing.text.Utilities
public class Utilities
extends Object

A collection of methods to deal with various text related activities.

Constructor Summary
Utilities()
Method Summary
static int | drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
static int | getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determine where to break the given text to fit within the the given span.
static int | getNextWord(JTextComponent c, int offs) Determines the start of the next word for the given location.
static Element | getParagraphElement(JTextComponent c, int offs) Determines the element to use for a paragraph/line.
static int | getPositionAbove(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row above.
static int | getPositionBelow(JTextComponent c, int offs, int x) Determines the position in the model that is closest to the given view location in the row below.
static int | getPreviousWord(JTextComponent c, int offs) Determine the start of the prev word for the given location.
static int | getRowEnd(JTextComponent c, int offs) Determines the ending row model position of the row that contains the specified model position.
static int | getRowStart(JTextComponent c, int offs) Determines the starting row model position of the row that contains the specified model position.
static int | getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Determines the relative offset into the given text that best represents the given span in the view coordinate system.
static int | getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
static int | getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.
static int | getWordEnd(JTextComponent c, int offs) Determines the end of a word for the given location.
static int | getWordStart(JTextComponent c, int offs) Determines the start of a word for the given model location.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Utilities

public Utilities()
Method Detail

drawTabbedText

public static final int drawTabbedText(Segment s,
                                       int x,
                                       int y,
                                       Graphics g,
                                       TabExpander e,
                                       int startOffset)
Draws the given text, expanding any tabs that are contained using the given tab expansion technique. This particular implementation renders in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
Parameters:
s - the source of the text
x - the X origin >= 0
y - the Y origin >= 0
g - the graphics context
e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
startOffset - starting offset of the text in the document >= 0

getTabbedTextWidth

public static final int getTabbedTextWidth(Segment s,
                                           FontMetrics metrics,
                                           int x,
                                           TabExpander e,
                                           int startOffset)
Determines the width of the given segment of text taking tabs into consideration. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
Parameters:
s - the source of the text
metrics - the font metrics to use for the calculation
x - the X origin >= 0
e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
startOffset - starting offset of the text in the document >= 0

getTabbedTextOffset

public static final int getTabbedTextOffset(Segment s,
                                            FontMetrics metrics,
                                            int x0,
                                            int x,
                                            TabExpander e,
                                            int startOffset)
Determines the relative offset into the given text that best represents the given span in the view coordinate system. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
Parameters:
s - the source of the text
metrics - the font metrics to use for the calculation
x0 - the starting view location representing the start of the given text >= 0.
x - the target view location to translate to an offset into the text >= 0.
e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
startOffset - starting offset of the text in the document >= 0

getTabbedTextOffset

public static final int getTabbedTextOffset(Segment s,
                                            FontMetrics metrics,
                                            int x0,
                                            int x,
                                            TabExpander e,
                                            int startOffset,
                                            boolean round)

getBreakLocation

public static final int getBreakLocation(Segment s,
                                         FontMetrics metrics,
                                         int x0,
                                         int x,
                                         TabExpander e,
                                         int startOffset)
Determine where to break the given text to fit within the the given span. This tries to find a whitespace boundary.
Parameters:
s - the source of the text
metrics - the font metrics to use for the calculation
x0 - the starting view location representing the start of the given text.
x - the target view location to translate to an offset into the text.
e - how to expand the tabs. If this value is null, tabs will be expanded as a space character.
startOffset - starting offset in the document of the text

getRowStart

public static final int getRowStart(JTextComponent c,
                                    int offs)
                             throws BadLocationException
Determines the starting row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
Parameters:
c - the editor
offs - the offset in the document >= 0
Returns:
the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
Throws:
BadLocationException - if the offset is out of range

getRowEnd

public static final int getRowEnd(JTextComponent c,
                                  int offs)
                           throws BadLocationException
Determines the ending row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
Parameters:
c - the editor
offs - the offset in the document >= 0
Returns:
the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
Throws:
BadLocationException - if the offset is out of range

getPositionAbove

public static final int getPositionAbove(JTextComponent c,
                                         int offs,
                                         int x)
                                  throws BadLocationException
Determines the position in the model that is closest to the given view location in the row above. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
Parameters:
c - the editor
offs - the offset in the document >= 0
x - the X coordinate >= 0
Returns:
the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
Throws:
BadLocationException - if the offset is out of range

getPositionBelow

public static final int getPositionBelow(JTextComponent c,
                                         int offs,
                                         int x)
                                  throws BadLocationException
Determines the position in the model that is closest to the given view location in the row below. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
Parameters:
c - the editor
offs - the offset in the document >= 0
x - the X coordinate >= 0
Returns:
the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.
Throws:
BadLocationException - if the offset is out of range

getWordStart

public static final int getWordStart(JTextComponent c,
                                     int offs)
                              throws BadLocationException
Determines the start of a word for the given model location. Uses BreakIterator.getWordInstance() to actually get the words.
Parameters:
c - the editor
offs - the offset in the document >= 0
Throws:
BadLocationException - if the offset is out of range

getWordEnd

public static final int getWordEnd(JTextComponent c,
                                   int offs)
                            throws BadLocationException
Determines the end of a word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
Parameters:
c - the editor
offs - the offset in the document >= 0
Throws:
BadLocationException - if the offset is out of range

getNextWord

public static final int getNextWord(JTextComponent c,
                                    int offs)
                             throws BadLocationException
Determines the start of the next word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
Parameters:
c - the editor
offs - the offset in the document >= 0
Throws:
BadLocationException - if the offset is out of range

getPreviousWord

public static final int getPreviousWord(JTextComponent c,
                                        int offs)
                                 throws BadLocationException
Determine the start of the prev word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
Parameters:
c - the editor
offs - the offset in the document >= 0
Throws:
BadLocationException - if the offset is out of range

getParagraphElement

public static final Element getParagraphElement(JTextComponent c,
                                                int offs)
Determines the element to use for a paragraph/line.
Parameters:
c - the editor
offs - the starting offset in the document >= 0
Returns:
the element
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


View

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class View

java.lang.Object
  |
  +--javax.swing.text.View
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
AsyncBoxView, ComponentView, CompositeView, GlyphView, IconView, PlainView
public abstract class View
extends Object
implements SwingConstants

A very important part of the text package is the View class. As the name suggests it represents a view of the text model, or a piece of the text model. It is this class that is responsible for the look of the text component. The view is not intended to be some completely new thing that one must learn, but rather is much like a lightweight component. In fact, the original View implementation was a lightweight component. There were several reasons why the Component implementation was abandoned in favor of an alternative.

  1. There was barely had time to get the lightweight component support in the 1.1 version of the JDK. There simply wasn't time to lighten up the component further to where it would need to be to be used for text purposes. The additions made to JComponent increased the memory consumption, and as it currently stands it's much too heavy for representing text.

  2. The layout semantics aren't quite right for text, and changing the current layout semantics of component might break existing applications.

  3. The component api uses integers, but in 1.2 one can use floating point device independent coordinates. An api that works in both 1.1 and 1.2 would be convenient for minimizing transition difficulties. The View class uses the Shape interface and float arguments to enable View implementations for the Java 2 platform v1.2 and later while still functioning in the older 1.1 JDK.

By default, a view is very light. It contains a reference to the parent view from which it can fetch many things without holding state, and it contains a reference to a portion of the model (Element). A view does not have to exactly represent an element in the model, that is simply a typical and therefore convenient mapping. A view can alternatively maintain a couple of Position objects to maintain it's location in the model (i.e. represent a fragment of an element). This is typically the result of formatting where views have been broken down into pieces. The convenience of a substantial relationship to the element makes it easier to build factories to produce the views, and makes it easier to keep track of the view pieces as the model is changed and the view must be changed to reflect the model. Simple views therefore represent an Element directly and complex views do not.

A view has the following responsibilities:

Participate in layout.

The view has a setSize method which is like doLayout and setSize in Component combined. The view has a preferenceChanged method which is like invalidate in Component except that one can invalidate just one axis and the child requesting the change is identified.

A View expresses the size that it would like to be in terms of three values, a minimum, a preferred, and a maximum span. Layout in a view is can be done independantly upon each axis. For a properly functioning View implementation, the minimum span will be <= the preferred span which in turn will be <= the maximum span.

The minimum set of methods for layout are:

  • getMinimumSpan
  • getPreferredSpan
  • getMaximumSpan
  • getAlignment
  • preferenceChanged
  • setSize

The setSize method should be prepared to be called a number of times (i.e. It may be called even if the size didn't change). The setSize method is generally called to make sure the View layout is complete prior to trying to perform an operation on it that requires an up-to-date layout. A views size should always be set to a value within the minimum and maximum span specified by that view. Additionally, the view must always call the preferenceChanged method on the parent if it has changed the values for the layout it would like, and expects the parent to honor. The parent View is not required to recognize a change until the preferenceChanged has been sent. This allows parent View implementations to cache the child requirements if desired. The calling sequence looks something like the following:

The exact calling sequence is up to the layout functionality of the parent view (if the view has any children). The view may collect the preferences of the children prior to determining what it will give each child, or it might iteratively update the children one at a time.

Render a portion of the model.

This is done in the paint method, which is pretty much like a component paint method. Views are expected to potentially populate a fairly large tree. A View has the following semantics for rendering:

  • The view gets it's allocation from the parent at paint time, so it must be prepared to redo layout if the allocated area is different from what it is prepared to deal with.
  • The coordinate system is the same as the hosting Component (i.e. the Component returned by the getContainer method). This means a child view lives in the same coordinate system as the parent view unless the parent has explicitly changed the coordinate system. To schedule itself to be repainted a view can call repaint on the hosting Component.
  • The default is to not clip the children. It is more effecient to allow a view to clip only if it really feels it needs clipping.
  • The Graphics object given is not initialized in any way. A view should set any settings needed.
  • A View is inherently transparent. While a view may render into it's entire allocation, typically a view does not. Rendering is performed by tranversing down the tree of View implementations. Each View is responsible for rendering it's children. This behavior is depended upon for thread safety. While view implementations do not necessarily have to be implemented with thread safety in mind, other view implementations that do make use of concurrency can depend upon a tree traversal to guarantee thread safety.
  • The order of views relative to the model is up to the implementation. Although child views will typically be arranged in the same order that they occur in the model, they may be visually arranged in an entirely different order. View implementations may have Z-Order associated with them if the children are overlapping.

The methods for rendering are:

  • paint

Translate between the model and view coordinate systems.

Because the view objects are produced from a factory and therefore cannot necessarily be counted upon to be in a particular pattern, one must be able to perform translation to properly locate spatial representation of the model. The methods for doing this are:

  • modelToView
  • viewToModel
  • getDocument
  • getElement
  • getStartOffset
  • getEndOffset

The layout must be valid prior to attempting to make the translation. The translation is not valid, and must not be attempted while changes are being broadcasted from the model via a DocumentEvent.

Respond to changes from the model.

If the overall view is represented by many pieces (which is the best situation if one want to be able to change the view and write the least amount of new code), it would be impractical to have a huge number of DocumentListeners. If each view listened to the model, only a few would actually be interested in the changes broadcasted at any given time. Since the model has no knowledge of views, it has no way to filter the broadcast of change information. The view hierarchy itself is instead responsible for propagating the change information. At any level in the view hierarchy, that view knows enough about it's children to best distribute the change information further. Changes are therefore broadcasted starting from the root of the view hierarchy. The methods for doing this are:

  • insertUpdate
  • removeUpdate
  • changedUpdate

Field Summary
static int | BadBreakWeight The weight to indicate a view is a bad break opportunity for the purpose of formatting.
static int | ExcellentBreakWeight The weight to indicate a view supports breaking, and this represents a very attractive place to break.
static int | ForcedBreakWeight The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats it's children by breaking them.
static int | GoodBreakWeight The weight to indicate a view supports breaking, but better opportunities probably exist.
static int | X_AXIS Axis for format/break operations.
static int | Y_AXIS Axis for format/break operations.
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
View(Element elem)
Creates a new View object.
Method Summary
void | append(View v) Appends a single child view.
View | breakView(int axis, int offset, float pos, float len) Tries to break this view on the given axis.
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
View | createFragment(int p0, int p1) Create a view that represents a portion of the element.
protected void | forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) Forward the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void | forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Forward the DocumentEvent to the give child view.
float | getAlignment(int axis) Determines the desired alignment for this view along an axis.
AttributeSet | getAttributes() Fetches the attributes to use when rendering.
int | getBreakWeight(int axis, float pos, float len) Determines how attractive a break opportunity in this view is.
Shape | getChildAllocation(int index, Shape a) Fetches the allocation for the given child view.
Container | getContainer() Fetches the container hosting the view.
Document | getDocument() Fetches the model associated with the view.
Element | getElement() Fetches the structural portion of the subject that this view is mapped to.
int | getEndOffset() Fetches the portion of the model that this view is responsible for.
Graphics | getGraphics() Fetch a Graphics for rendering.
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
int | getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Provides a way to determine the next visually represented model location that one might place a caret.
View | getParent() Returns the parent of the view.
abstract float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
int | getResizeWeight(int axis) Determines the resizability of the view along the given axis.
int | getStartOffset() Fetches the portion of the model that this view is responsible for.
View | getView(int n) Gets the nth child view.
int | getViewCount() Returns the number of views in this view.
ViewFactory | getViewFactory() Fetches the ViewFactory implementation that is feeding the view hierarchy.
int | getViewIndex(int pos, Position.Bias b) Returns the child view index representing the given position in the model.
void | insert(int offs, View v) Inserts a single child view.
void | insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
boolean | isVisible() Returns a boolean that indicates whether the view is visible or not.
Shape | modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Shape | modelToView(int pos, Shape a) Deprecated.
abstract Shape | modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
abstract void | paint(Graphics g, Shape allocation) Renders using the given rendering surface and area on that surface.
void | preferenceChanged(View child, boolean width, boolean height) Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
void | remove(int i) Removes one of the children at the given position.
void | removeAll() Removes all of the children.
void | removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | replace(int offset, int length, View[] views) Replace child views.
void | setParent(View parent) Establishes the parent view for this view.
void | setSize(float width, float height) Sets the size of the view.
protected boolean | updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void | updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) Update the layout in response to receiving notification of change from the model.
int | viewToModel(float x, float y, Shape a) Deprecated.
abstract int | viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BadBreakWeight

public static final int BadBreakWeight
The weight to indicate a view is a bad break opportunity for the purpose of formatting. This value indicates that no attempt should be made to break the view into fragments as the view has not been written to support fragmenting.
See Also:
getBreakWeight(int, float, float), GoodBreakWeight, ExcellentBreakWeight, ForcedBreakWeight

GoodBreakWeight

public static final int GoodBreakWeight
The weight to indicate a view supports breaking, but better opportunities probably exist.
See Also:
getBreakWeight(int, float, float), BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight

ExcellentBreakWeight

public static final int ExcellentBreakWeight
The weight to indicate a view supports breaking, and this represents a very attractive place to break.
See Also:
getBreakWeight(int, float, float), BadBreakWeight, GoodBreakWeight, ForcedBreakWeight

ForcedBreakWeight

public static final int ForcedBreakWeight
The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats it's children by breaking them.
See Also:
getBreakWeight(int, float, float), BadBreakWeight, GoodBreakWeight, ExcellentBreakWeight

X_AXIS

public static final int X_AXIS
Axis for format/break operations.

Y_AXIS

public static final int Y_AXIS
Axis for format/break operations.
Constructor Detail

View

public View(Element elem)
Creates a new View object.
Parameters:
elem - the element to represent
Method Detail

getParent

public View getParent()
Returns the parent of the view.
Returns:
the parent, null if none

isVisible

public boolean isVisible()
Returns a boolean that indicates whether the view is visible or not. By default all views are visible.
Returns:
boolean value.

getPreferredSpan

public abstract float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
getPreferredSpan(int)

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis.
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
getPreferredSpan(int)

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis.
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
getPreferredSpan(int)

preferenceChanged

public void preferenceChanged(View child,
                              boolean width,
                              boolean height)
Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout. By default this just propagates upward to the next parent. The root view will call revalidate on the associated text component.
Parameters:
child - the child view
width - true if the width preference has changed
height - true if the height preference has changed
See Also:
JComponent.revalidate()

getAlignment

public float getAlignment(int axis)
Determines the desired alignment for this view along an axis. By default this is simply centered.
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS

paint

public abstract void paint(Graphics g,
                           Shape allocation)
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into
See Also:
paint(java.awt.Graphics, java.awt.Shape)

setParent

public void setParent(View parent)
Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly. This is also the last method called, since it is called to indicate the view has been removed from the hierarchy as well. If this is reimplemented, super.setParent() should be called.
Parameters:
parent - the new parent, or null if the view is being removed from a parent it was previously added to

getViewCount

public int getViewCount()
Returns the number of views in this view. Since the default is to not be a composite view this returns 0.
Returns:
the number of views >= 0
See Also:
getViewCount()

getView

public View getView(int n)
Gets the nth child view. Since there are no children by default, this returns null.
Parameters:
n - the number of the view to get, >= 0 && Returns:
the view

removeAll

public void removeAll()
Removes all of the children. This is a convenience call to replace.
Since:
1.3

remove

public void remove(int i)
Removes one of the children at the given position. This is a convenience call to replace.
Since:
1.3

insert

public void insert(int offs,
                   View v)
Inserts a single child view. This is a convenience call to replace.
Parameters:
offs - the offset of the view to insert before >= 0
v - the view
Since:
1.3
See Also:
replace(int, int, javax.swing.text.View[])

append

public void append(View v)
Appends a single child view. This is a convenience call to replace.
Parameters:
v - the view
Since:
1.3
See Also:
replace(int, int, javax.swing.text.View[])

replace

public void replace(int offset,
                    int length,
                    View[] views)
Replace child views. If there are no views to remove this acts as an insert. If there are no views to add this acts as a remove. Views being removed will have the parent set to null, and the internal reference to them removed so that they can be garbage collected. This is implemented to do nothing, because by default a view has no children.
Parameters:
index - the starting index into the child views to insert the new views. This should be a value >= 0 and <= getViewCount.length - the number of existing child views to remove. This should be a value >= 0 and <= (getViewCount()="(getViewCount()" -="-" offset).views - the child views to add. This value can be null to indicate no children are being added (useful to remove).
Since:
1.3

getViewIndex

public int getViewIndex(int pos,
                        Position.Bias b)
Returns the child view index representing the given position in the model. By default a view has no children so this is implemented to return -1 to indicate there is no valid child index for any position.
Parameters:
pos - the position >= 0
Since:
1.3

getChildAllocation

public Shape getChildAllocation(int index,
                                Shape a)
Fetches the allocation for the given child view. This enables finding out where various views are located, without assuming the views store their location. This returns null since the default is to not have any child views.
Parameters:
index - the index of the child, >= 0 && a - the allocation to this view.
Returns:
the allocation to the child

getNextVisualPositionFrom

public int getNextVisualPositionFrom(int pos,
                                     Position.Bias b,
                                     Shape a,
                                     int direction,
                                     Position.Bias[] biasRet)
                              throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException -
IllegalArgumentException - for an invalid direction

modelToView

public abstract Shape modelToView(int pos,
                                  Shape a,
                                  Position.Bias b)
                           throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views.
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
IllegalArgumentException - for an invalid bias argument
See Also:
viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

modelToView

public Shape modelToView(int p0,
                         Position.Bias b0,
                         int p1,
                         Position.Bias b1,
                         Shape a)
                  throws BadLocationException
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
Parameters:
p0 - the position to convert >= 0
b0 - the bias toward the previous character or the next character represented by p0, in case the position is a boundary of two views.
p1 - the position to convert >= 0
b1 - the bias toward the previous character or the next character represented by p1, in case the position is a boundary of two views.
a - the allocated region to render into
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
IllegalArgumentException - for an invalid bias argument
See Also:
viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

viewToModel

public abstract int viewToModel(float x,
                                float y,
                                Shape a,
                                Position.Bias[] biasReturn)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

insertUpdate

public void insertUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
  1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
  2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
  3. updateLayout is called to give the view a chance to either repair it's layout, to reschedule layout, or do nothing.
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
  1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
  2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
  3. updateLayout is called to give the view a chance to either repair it's layout, to reschedule layout, or do nothing.
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
  1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
  2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
  3. updateLayout is called to give the view a chance to either repair it's layout, to reschedule layout, or do nothing.
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

getDocument

public Document getDocument()
Fetches the model associated with the view.
Returns:
the view model, null if none
See Also:
getDocument()

getStartOffset

public int getStartOffset()
Fetches the portion of the model that this view is responsible for.
Returns:
the starting offset into the model >= 0
See Also:
getStartOffset()

getEndOffset

public int getEndOffset()
Fetches the portion of the model that this view is responsible for.
Returns:
the ending offset into the model >= 0
See Also:
getEndOffset()

getElement

public Element getElement()
Fetches the structural portion of the subject that this view is mapped to. The view may not be responsible for the entire portion of the element.
Returns:
the subject
See Also:
getElement()

getGraphics

public Graphics getGraphics()
Fetch a Graphics for rendering. This can be used to determine font characteristics, and will be different for a print view than a component view.
Since:
1.3

getAttributes

public AttributeSet getAttributes()
Fetches the attributes to use when rendering. By default this simply returns the attributes of the associated element. This method should be used rather than using the element directly to obtain access to the attributes to allow view-specific attributes to be mixed in or to allow the view to have view-specific conversion of attributes by subclasses. Each view should document what attributes it recognizes for the purpose of rendering or layout, and should always access them through the AttributeSet returned by this method.

breakView

public View breakView(int axis,
                      int offset,
                      float pos,
                      float len)
Tries to break this view on the given axis. This is called by views that try to do formatting of their children. For example, a view of a paragraph will typically try to place its children into row and views representing chunks of text can sometimes be broken down into smaller pieces.

This is implemented to return the view itself, which represents the default behavior on not being breakable. If the view does support breaking, the starting offset of the view returned should be the given offset, and the end offset should be less than or equal to the end offset of the view being broken.

Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
offset - the location in the document model that a broken fragment would occupy >= 0. This would be the starting offset of the fragment returned.
pos - the position along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations.
len - specifies the distance along the axis where a potential break is desired >= 0.
Returns:
the fragment of the view that represents the given span, if the view can be broken. If the view doesn't support breaking behavior, the view itself is returned.
See Also:
ParagraphView

createFragment

public View createFragment(int p0,
                           int p1)
Create a view that represents a portion of the element. This is potentially useful during formatting operations for taking measurements of fragments of the view. If the view doesn't support fragmenting (the default), it should return itself.
Parameters:
p0 - the starting offset >= 0. This should be a value greater or equal to the element starting offset and less than the element ending offset.
p1 - the ending offset > p0. This should be a value less than or equal to the elements end offset and greater than the elements starting offset.
See Also:
LabelView

getBreakWeight

public int getBreakWeight(int axis,
                          float pos,
                          float len)
Determines how attractive a break opportunity in this view is. This can be used for determining which view is the most attractive to call breakView on in the process of formatting. A view that represents text that has whitespace in it might be more attractive than a view that has no whitespace, for example. The higher the weight, the more attractive the break. A value equal to or lower than BadBreakWeight should not be considered for a break. A value greater than or equal to ForcedBreakWeight should be broken.

This is implemented to provide the default behavior of returning BadBreakWeight unless the length is greater than the length of the view in which case the entire view represents the fragment. Unless a view has been written to support breaking behavior, it is not attractive to try and break the view. An example of a view that does support breaking is LabelView. An example of a view that uses break weight is ParagraphView.

Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
pos - the potential location of the start of the broken view >= 0. This may be useful for calculating tab positions.
len - specifies the relative length from pos where a potential break is desired >= 0.
Returns:
the weight, which should be a value between ForcedBreakWeight and BadBreakWeight.
See Also:
LabelView, ParagraphView, BadBreakWeight, GoodBreakWeight, ExcellentBreakWeight, ForcedBreakWeight

getResizeWeight

public int getResizeWeight(int axis)
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
Parameters:
axis - View.X_AXIS or View.Y_AXIS
Returns:
the weight

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. This should cause layout of the view, if it has any layout duties. The default is to do nothing.
Parameters:
width - the width >= 0
height - the height >= 0

getContainer

public Container getContainer()
Fetches the container hosting the view. This is useful for things like scheduling a repaint, finding out the host components font, etc. The default implementation of this is to forward the query to the parent view.
Returns:
the container, null if none

getViewFactory

public ViewFactory getViewFactory()
Fetches the ViewFactory implementation that is feeding the view hierarchy. Normally the views are given this as an argument to updates from the model when they are most likely to need the factory, but this method serves to provide it at other times.
Returns:
the factory, null if none

updateChildren

protected boolean updateChildren(DocumentEvent.ElementChange ec,
                                 DocumentEvent e,
                                 ViewFactory f)
Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for. This is implemented to assume the child views are directly responsible for the child elements of the element this view represents. The ViewFactory is used to create child views for each element specified as added in the ElementChange, starting at the index specified in the given ElementChange. The number of child views representing the removed elements specified are removed.
Parameters:
ec - The change information for the element this view is responsible for. This should not be null if this method gets called.
e - the change information from the associated document
f - the factory to use to build child views
Returns:
whether or not the child views represent the child elements of the element this view is responsible for. Some views create children that represent a portion of the element they are responsible for, and should return false. This information is used to determine if views in the range of the added elements should be forwarded to or not.
Since:
1.3
See Also:
insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

forwardUpdate

protected void forwardUpdate(DocumentEvent.ElementChange ec,
                             DocumentEvent e,
                             Shape a,
                             ViewFactory f)
Forward the given DocumentEvent to the child views that need to be notified of the change to the model. If there were changes to the element this view is responsible for, that should be considered when forwarding (i.e. new child views should not get notified).
Parameters:
ec - changes to the element this view is responsible for (may be null if there were no changes).
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
Since:
1.3
See Also:
insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

forwardUpdateToView

protected void forwardUpdateToView(View v,
                                   DocumentEvent e,
                                   Shape a,
                                   ViewFactory f)
Forward the DocumentEvent to the give child view. This simply messages the view with a call to insertUpdate, removeUpdate, or changedUpdate depending upon the type of the event. This is called by forwardUpdate to forward the event to children that need it.
Parameters:
v - the child view to forward the event to.
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
Since:
1.3
See Also:
forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

updateLayout

protected void updateLayout(DocumentEvent.ElementChange ec,
                            DocumentEvent e,
                            Shape a)
Update the layout in response to receiving notification of change from the model. This is implemented to call preferenceChanged to reschedule a new layout if the ElementChange record is not null.
Parameters:
ec - changes to the element this view is responsible for (may be null if there were no changes).
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
Since:
1.3
See Also:
insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

modelToView

public Shape modelToView(int pos,
                         Shape a)
                  throws BadLocationException
Deprecated.

Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. This is implemented to default the bias to Position.Bias.Forward which was previously implied.
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
Returns:
the bounding box of the given position is returned
Throws:
BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a)
Deprecated.

Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Parameters:
x - the X coordinate >= 0
y - the Y coordinate >= 0
a - the allocated region to render into
Returns:
the location within the model that best represents the given point in the view >= 0
See Also:
viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ViewFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Interface ViewFactory

All Known Implementing Classes:
BasicTextUI, HTMLEditorKit.HTMLFactory
public interface ViewFactory

A factory to create a view of some portion of document subject. This is intended to enable customization of how views get mapped over a document model.

Method Summary
 View create(Element elem)
Creates a view from the given structural element of a document.

Method Detail

create

public View create(Element elem)
Creates a view from the given structural element of a document.
Parameters:
elem - the piece of the document to build a view of
Returns:
the view
See Also:
View
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WrappedPlainView

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class WrappedPlainView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.WrappedPlainView
All Implemented Interfaces:
SwingConstants, TabExpander
public class WrappedPlainView
extends BoxView
implements TabExpander

View of plain text (text with only one font and color) that does line-wrapping. This view expects that its associated element has child elements that represent the lines it should be wrapping. It is implemented as a vertical box that contains logical line views. The logical line views are nested classes that render the logical line as multiple physical line if the logical line is too wide to fit within the allocation. The line views draw upon the outer class for its state to reduce their memory requirements.

The line views do all of their rendering through the drawLine method which in turn does all of its rendering through the drawSelectedText and drawUnselectedText methods. This enables subclasses to easily specialize the rendering without concern for the layout aspects.

See Also:
View

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
WrappedPlainView(Element elem)
Creates a new WrappedPlainView.
WrappedPlainView(Element elem, boolean wordWrap)
Creates a new WrappedPlainView.
Method Summary
protected int | calculateBreakPosition(int p0, int p1) This is called by the nested wrapped line views to determine the break location.
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void | drawLine(int p0, int p1, Graphics g, int x, int y) Renders a line of text, suppressing whitespace at the end and expanding any tabs.
protected int | drawSelectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as selected text.
protected int | drawUnselectedText(Graphics g, int x, int y, int p0, int p1) Renders the given range in the model as normal unselected text.
protected Segment | getLineBuffer() Gives access to a buffer that can be used to fetch text from the associated document.
float | getMaximumSpan(int axis) Determines the maximum span for this view along an axis.
float | getMinimumSpan(int axis) Determines the minimum span for this view along an axis.
float | getPreferredSpan(int axis) Determines the preferred span for this view along an axis.
protected int | getTabSize() Returns the tab size set for the document, defaulting to 8.
void | insertUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
protected void | loadChildren(ViewFactory f) Loads all of the children to initialize the view.
float | nextTabStop(float x, int tabOffset) Returns the next tab stop position after a given reference position.
void | paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface.
void | removeUpdate(DocumentEvent e, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | setSize(float width, float height) Sets the size of the view.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WrappedPlainView

public WrappedPlainView(Element elem)
Creates a new WrappedPlainView. Lines will be wrapped on character boundaries.
Parameters:
elem - the element underlying the view

WrappedPlainView

public WrappedPlainView(Element elem,
                        boolean wordWrap)
Creates a new WrappedPlainView. Lines can be wrapped on either character or word boundaries depending upon the setting of the wordWrap parameter.
Parameters:
elem - the element underlying the view
wordWrap - should lines be wrapped on word boundaries?
Method Detail

getTabSize

protected int getTabSize()
Returns the tab size set for the document, defaulting to 8.
Returns:
the tab size

drawLine

protected void drawLine(int p0,
                        int p1,
                        Graphics g,
                        int x,
                        int y)
Renders a line of text, suppressing whitespace at the end and expanding any tabs. This is implemented to make calls to the methods drawUnselectedText and drawSelectedText so that the way selected and unselected text are rendered can be customized.
Parameters:
p0 - the starting document location to use >= 0
p1 - the ending document location to use >= p1
g - the graphics context
x - the starting X position >= 0
y - the starting Y position >= 0
See Also:
drawUnselectedText(java.awt.Graphics, int, int, int, int), drawSelectedText(java.awt.Graphics, int, int, int, int)

drawUnselectedText

protected int drawUnselectedText(Graphics g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws BadLocationException
Renders the given range in the model as normal unselected text.
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the beginning position in the model >= 0
p1 - the ending position in the model >= p0
Throws:
BadLocationException - if the range is invalid

drawSelectedText

protected int drawSelectedText(Graphics g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws BadLocationException
Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background.
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the beginning position in the model >= 0
p1 - the ending position in the model >= p0
Throws:
BadLocationException - if the range is invalid

getLineBuffer

protected final Segment getLineBuffer()
Gives access to a buffer that can be used to fetch text from the associated document.

calculateBreakPosition

protected int calculateBreakPosition(int p0,
                                     int p1)
This is called by the nested wrapped line views to determine the break location. This can be reimplemented to alter the breaking behavior. It will either break at word or character boundaries depending upon the break argument given at construction.

loadChildren

protected void loadChildren(ViewFactory f)
Loads all of the children to initialize the view. This is called by the setParent method. Subclasses can reimplement this to initialize their child views in a different manner. The default implementation creates a child view for each child element.
Overrides:
loadChildren in class CompositeView
Parameters:
f - the view factory

nextTabStop

public float nextTabStop(float x,
                         int tabOffset)
Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.
Specified by:
nextTabStop in interface TabExpander
Parameters:
x - the current position >= 0
tabOffset - the position within the text stream that the tab occurred at >= 0.
Returns:
the tab stop, measured in points >= 0

paint

public void paint(Graphics g,
                  Shape a)
Renders using the given rendering surface and area on that surface. This is implemented to stash the selection positions, selection colors, and font metrics for the nested lines to use.
Overrides:
paint in class BoxView
Parameters:
g - the rendering surface to use
a - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape)

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. If the size has changed, layout is redone. The size is the full size of the view including the inset areas.
Overrides:
setSize in class BoxView
Parameters:
width - the width >= 0
height - the height >= 0

getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
Overrides:
getPreferredSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
View.getPreferredSpan(int)

getMinimumSpan

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
Overrides:
getMinimumSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
View.getMinimumSpan(int)

getMaximumSpan

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. This is implemented to provide the superclass behavior after first making sure that the current font metrics are cached (for the nested lines which use the metrics to determine the height of the potentially wrapped lines).
Overrides:
getMaximumSpan in class BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
See Also:
View.getMaximumSpan(int)

insertUpdate

public void insertUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for. This is implemented to simply update the children.
Overrides:
insertUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent e,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for. This is implemented to simply update the children.
Overrides:
removeUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

public void changedUpdate(DocumentEvent e,
                          Shape a,
                          ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for.
Overrides:
changedUpdate in class View
Parameters:
e - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ZoneView

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.text
Class ZoneView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--javax.swing.text.ZoneView
All Implemented Interfaces:
SwingConstants
public class ZoneView
extends BoxView

ZoneView is a View implementation that creates zones for which the child views are not created or stored until they are needed for display or model/view translations. This enables a substantial reduction in memory consumption for situations where the model being represented is very large, by building view objects only for the region being actively viewed/edited. The size of the children can be estimated in some way, or calculated asynchronously with only the result being saved.

ZoneView extends BoxView to provide a box that implements zones for it's children. The zones are special View implementations (the children of an instance of this class) that represent only a portion of the model that an instance of ZoneView is responsible for. The zones don't create child views until an attempt is made to display them. A box shaped view is well suited to this because:

  • Boxes are a heavily used view, and having a box that provides this behavior gives substantial opportunity to plug the behavior into a view hierarchy from the view factory.
  • Boxes are tiled in one direction, so it is easy to divide them into zones in a reliable way.
  • Boxes typically have a simple relationship to the model (i.e. they create child views that directly represent the child elements).
  • Boxes are easier to estimate the size of than some other shapes.

The default behavior is controled by two properties, maxZoneSize and maxZonesLoaded. Setting maxZoneSize to Integer.MAX_VALUE would have the effect of causing only one zone to be created. This would effectively turn the view into an implementation of the decorator pattern. Setting maxZonesLoaded to a value of Integer.MAX_VALUE would cause zones to never be unloaded. For simplicity, zones are created on boundaries represented by the child elements of the element the view is responsible for. The zones can be any View implementation, but the default implementation is based upon AsyncBoxView which supports fairly large zones efficiently.

Since:
1.3
See Also:
View

Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor Summary
ZoneView(Element elem, int axis)
Constructs a ZoneView.
Method Summary
protected View | createZone(int p0, int p1) Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility).
int | getMaximumZoneSize() Get the current maximum zone size.
int | getMaxZonesLoaded() Get the current setting of the number of zones allowed to be loaded at the same time.
protected int | getViewIndexAtPosition(int pos) Fetches the child view index representing the given position in the model.
void | insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was inserted into the document in a location that this view is responsible for.
protected boolean | isZoneLoaded(View zone) Determine if a zone is in the loaded state.
protected void | loadChildren(ViewFactory f) Loads all of the children to initialize the view.
void | removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification that something was removed from the document in a location that this view is responsible for.
void | setMaximumZoneSize(int size) Set the desired maximum zone size.
void | setMaxZonesLoaded(int mzl) Set the current setting of the number of zones allowed to be loaded at the same time.
protected void | unloadZone(View zone) Unload a zone (Convert the zone to its memory saving state).
protected boolean | updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f) The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element.
protected void | zoneWasLoaded(View zone) Called by a zone when it gets loaded.
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, isVisible, modelToView, remove, removeAll, updateLayout, viewToModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ZoneView

public ZoneView(Element elem,
                int axis)
Constructs a ZoneView.
Parameters:
elem - the element this view is responsible for
axis - either View.X_AXIS or View.Y_AXIS
Method Detail

getMaximumZoneSize

public int getMaximumZoneSize()
Get the current maximum zone size.

setMaximumZoneSize

public void setMaximumZoneSize(int size)
Set the desired maximum zone size. A zone may get larger than this size if a single child view is larger than this size since zones are formed on child view boundaries.
Parameters:
size - the number of characters the zone may represent before attempting to break the zone into a smaller size.

getMaxZonesLoaded

public int getMaxZonesLoaded()
Get the current setting of the number of zones allowed to be loaded at the same time.

setMaxZonesLoaded

public void setMaxZonesLoaded(int mzl)
Set the current setting of the number of zones allowed to be loaded at the same time.
Parameters:
mzl - the desired maximum number of zones to be actively loaded.

zoneWasLoaded

protected void zoneWasLoaded(View zone)
Called by a zone when it gets loaded. This happens when an attempt is made to display or perform a model/view translation on a zone that was in an unloaded state. This is imlemented to check if the maximum number of zones was reached and to unload the oldest zone if so.
Parameters:
zone - the child view that was just loaded.

unloadZone

protected void unloadZone(View zone)
Unload a zone (Convert the zone to its memory saving state). The zones are expected to represent a subset of the child elements of the element this view is responsible for. Therefore, the default implementation is to simple remove all the children.
Parameters:
zone - the child view desired to be set to an unloaded state.

isZoneLoaded

protected boolean isZoneLoaded(View zone)
Determine if a zone is in the loaded state. The zones are expected to represent a subset of the child elements of the element this view is responsible for. Therefore, the default implementation is to return true if the view has children.

createZone

protected View createZone(int p0,
                          int p1)
Create a view to represent a zone for the given range within the model (which should be within the range of this objects responsibility). This is called by the zone management logic to create new zones. Subclasses can provide a different implementation for a zone by changing this method.
Parameters:
p0 - the start of the desired zone. This should be >= getStartOffset() and p1 - the end of the desired zone. This should be > getStartOffset() and <= getEndOffset().="getEndOffset()." This="This" value="value" should="should" also="also" be="be"> p0.

loadChildren

protected void loadChildren(ViewFactory f)
Loads all of the children to initialize the view. This is called by the setParent method. This is reimplemented to not load any children directly (as they are created by the zones). This method creates the initial set of zones. Zones don't actually get populated however until an attempt is made to display them or to do model/view coordinate translation.
Overrides:
loadChildren in class CompositeView
Parameters:
f - the view factory

getViewIndexAtPosition

protected int getViewIndexAtPosition(int pos)
Fetches the child view index representing the given position in the model.
Overrides:
getViewIndexAtPosition in class CompositeView
Parameters:
pos - the position >= 0

updateChildren

protected boolean updateChildren(DocumentEvent.ElementChange ec,
                                 DocumentEvent e,
                                 ViewFactory f)
The superclass behavior will try to update the child views which is not desired in this case, since the children are zones and not directly effected by the changes to the associated element. This is reimplemented to do nothing and return false.
Overrides:
updateChildren in class View
Following copied from class: javax.swing.text.View
Parameters:
ec - The change information for the element this view is responsible for. This should not be null if this method gets called.
e - the change information from the associated document
f - the factory to use to build child views
Returns:
whether or not the child views represent the child elements of the element this view is responsible for. Some views create children that represent a portion of the element they are responsible for, and should return false. This information is used to determine if views in the range of the added elements should be forwarded to or not.
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

insertUpdate

public void insertUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was inserted into the document in a location that this view is responsible for. This is largely delegated to the superclass, but is reimplemented to update the relevant zone (i.e. determine if a zone needs to be split into a set of 2 or more zones).
Overrides:
insertUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(DocumentEvent changes,
                         Shape a,
                         ViewFactory f)
Gives notification that something was removed from the document in a location that this view is responsible for. This is largely delegated to the superclass, but is reimplemented to update the relevant zones (i.e. determine if zones need to be removed or joined with another zone).
Overrides:
removeUpdate in class View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Timer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class Timer

java.lang.Object
  |
  +--javax.swing.Timer
All Implemented Interfaces:
Serializable
public class Timer
extends Object
implements Serializable

Causes an action to occur at a predefined rate. For example, an animation object can use a Timer as the trigger for drawing its next frame. For documentation and examples of using timers, see How to Use Timers in The Java Tutorial.

Each Timer has a list of ActionListeners and a delay (the time between actionPerformed() calls). When delay milliseconds have passed, a Timer sends the actionPerformed() message to its listeners. This cycle repeats until stop() is called, or halts immediately if the Timer is configured to send its message just once.

Using a Timer involves first creating it, then starting it using the start() method.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected  EventListenerList listenerList
Constructor Summary
Timer(int delay, ActionListener listener)
Creates a Timer that will notify its listeners every delay milliseconds.
Method Summary
 void addActionListener(ActionListener listener)
Adds an actionListener to the Timer
protected  void fireActionPerformed(ActionEvent e)
Notify all listeners that have registered interest for notification on this event type.
 int getDelay()
Returns the Timer's delay.
 int getInitialDelay()
Returns the Timer's initial delay.
 EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this timer.
static boolean getLogTimers()
Returns true if logging is enabled.
 boolean isCoalesce()
Returns true if the Timer coalesces multiple pending performCommand() messages.
 boolean isRepeats()
Returns true if the Timer will send a actionPerformed() message to its listeners multiple times.
 boolean isRunning()
Returns true if the Timer is running.
 void removeActionListener(ActionListener listener)
Removes an ActionListener from the Timer.
 void restart()
Restarts a Timer, canceling any pending firings, and causing it to fire with its initial dely.
 void setCoalesce(boolean flag)
Sets whether the Timer coalesces multiple pending ActionEvent firings.
 void setDelay(int delay)
Sets the Timer's delay, the number of milliseconds between successive actionPerfomed() messages to its listeners
 void setInitialDelay(int initialDelay)
Sets the Timer's initial delay.
static void setLogTimers(boolean flag)
Enables or disables the timer log.
 void setRepeats(boolean flag)
If flag is false, instructs the Timer to send actionPerformed() to its listeners only once, and then stop.
 void start()
Starts the Timer, causing it to send actionPerformed() messages to its listeners.
 void stop()
Stops a Timer, causing it to stop sending actionPerformed() messages to its Target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

listenerList

protected EventListenerList listenerList
Constructor Detail

Timer

public Timer(int delay,
             ActionListener listener)
Creates a Timer that will notify its listeners every delay milliseconds.
Parameters:
delay - The number of milliseconds between listener notification
listener - An initial listener
See Also:
setInitialDelay(int), setRepeats(boolean)
Method Detail

addActionListener

public void addActionListener(ActionListener listener)
Adds an actionListener to the Timer

removeActionListener

public void removeActionListener(ActionListener listener)
Removes an ActionListener from the Timer.

fireActionPerformed

protected void fireActionPerformed(ActionEvent e)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
See Also:
EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this timer.
Since:
1.3

setLogTimers

public static void setLogTimers(boolean flag)
Enables or disables the timer log. When enabled, a message is posted to System.out whenever the timer goes off.
Parameters:
flag - true to enable logging
See Also:
getLogTimers()

getLogTimers

public static boolean getLogTimers()
Returns true if logging is enabled.
Returns:
true if logging is enabled
See Also:
setLogTimers(boolean)

setDelay

public void setDelay(int delay)
Sets the Timer's delay, the number of milliseconds between successive actionPerfomed() messages to its listeners
See Also:
setInitialDelay(int)

getDelay

public int getDelay()
Returns the Timer's delay.
See Also:
setDelay(int)

setInitialDelay

public void setInitialDelay(int initialDelay)
Sets the Timer's initial delay. This will be used for the first "ringing" of the Timer only. Subsequent ringings will be spaced using the delay property.
See Also:
setDelay(int)

getInitialDelay

public int getInitialDelay()
Returns the Timer's initial delay.
See Also:
setDelay(int)

setRepeats

public void setRepeats(boolean flag)
If flag is false, instructs the Timer to send actionPerformed() to its listeners only once, and then stop.

isRepeats

public boolean isRepeats()
Returns true if the Timer will send a actionPerformed() message to its listeners multiple times.
See Also:
setRepeats(boolean)

setCoalesce

public void setCoalesce(boolean flag)
Sets whether the Timer coalesces multiple pending ActionEvent firings. A busy application may not be able to keep up with a Timer's message generation, causing multiple actionPerformed() message sends to be queued. When processed, the application sends these messages one after the other, causing the Timer's listeners to receive a sequence of actionPerformed() messages with no delay between them. Coalescing avoids this situation by reducing multiple pending messages to a single message send. Timers coalesce their message sends by default.

isCoalesce

public boolean isCoalesce()
Returns true if the Timer coalesces multiple pending performCommand() messages.
See Also:
setCoalesce(boolean)

start

public void start()
Starts the Timer, causing it to send actionPerformed() messages to its listeners.
See Also:
stop()

isRunning

public boolean isRunning()
Returns true if the Timer is running.
See Also:
start()

stop

public void stop()
Stops a Timer, causing it to stop sending actionPerformed() messages to its Target.
See Also:
start()

restart

public void restart()
Restarts a Timer, canceling any pending firings, and causing it to fire with its initial dely.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToggleButtonModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JToggleButton.ToggleButtonModel

java.lang.Object
  |
  +--javax.swing.DefaultButtonModel
        |
        +--javax.swing.JToggleButton.ToggleButtonModel
All Implemented Interfaces:
ButtonModel, ItemSelectable, Serializable
Enclosing class:
JToggleButton
public static class JToggleButton.ToggleButtonModel
extends DefaultButtonModel

The ToggleButton model

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.DefaultButtonModel
actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask
Constructor Summary
JToggleButton.ToggleButtonModel()
Creates a new ToggleButton Model
Method Summary
boolean | isSelected() Checks if the button is selected.
void | setPressed(boolean b) Sets the pressed state of the toggle button.
void | setSelected(boolean b) Sets the selected state of the button.
Methods inherited from class javax.swing.DefaultButtonModel
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getGroup, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JToggleButton.ToggleButtonModel

public JToggleButton.ToggleButtonModel()
Creates a new ToggleButton Model
Method Detail

isSelected

public boolean isSelected()
Checks if the button is selected.
Overrides:
isSelected in class DefaultButtonModel
Following copied from class: javax.swing.DefaultButtonModel
Returns:
true if the button is selected

setSelected

public void setSelected(boolean b)
Sets the selected state of the button.
Overrides:
setSelected in class DefaultButtonModel
Parameters:
b - true selects the toggle button, false deselects the toggle button.

setPressed

public void setPressed(boolean b)
Sets the pressed state of the toggle button.
Overrides:
setPressed in class DefaultButtonModel
Following copied from class: javax.swing.DefaultButtonModel
Parameters:
b - true to set the button to "pressed"
See Also:
DefaultButtonModel.isPressed()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToolTipManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ToolTipManager

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--javax.swing.ToolTipManager
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
public class ToolTipManager
extends MouseAdapter
implements MouseMotionListener

Manages all the ToolTips in the system.

See Also:
JComponent.createToolTip()

Inner Class Summary
protected class | ToolTipManager.insideTimerAction
protected class | ToolTipManager.outsideTimerAction
protected class | ToolTipManager.stillInsideTimerAction
Field Summary
protected boolean | heavyWeightPopupEnabled
protected boolean | lightWeightPopupEnabled
Method Summary
int | getDismissDelay() Returns the dismisal delay value.
int | getInitialDelay() Returns the initial delay value.
int | getReshowDelay() Returns the reshow delay value.
boolean | isEnabled() Returns true if this object is enabled.
boolean | isLightWeightPopupEnabled() Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used.
void | mouseDragged(MouseEvent event) Invoked when a mouse button is pressed on a component and then dragged.
void | mouseEntered(MouseEvent event) Invoked when the mouse enters a component.
void | mouseExited(MouseEvent event) Invoked when the mouse exits a component.
void | mouseMoved(MouseEvent event) Invoked when the mouse button has been moved on a component (with no buttons no down).
void | mousePressed(MouseEvent event) Invoked when a mouse button has been pressed on a component.
void | registerComponent(JComponent component) Register a component for tooltip management.
void | setDismissDelay(int milliseconds) Specifies the dismisal delay value.
void | setEnabled(boolean flag) Enables or disables the tooltip.
void | setInitialDelay(int milliseconds) Specifies the initial delay value.
void | setLightWeightPopupEnabled(boolean aFlag) When displaying the JToolTip, the ToolTipManager choose to use a light weight JPanel if it fits.
void | setReshowDelay(int milliseconds) Specifies the time to delay before reshowing the tooltip.
static ToolTipManager | sharedInstance() Returns a shared ToolTipManager instance.
void | unregisterComponent(JComponent component) Remove a component from tooltip control.
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lightWeightPopupEnabled

protected boolean lightWeightPopupEnabled

heavyWeightPopupEnabled

protected boolean heavyWeightPopupEnabled
Method Detail

setEnabled

public void setEnabled(boolean flag)
Enables or disables the tooltip.
Parameters:
flag - true to enable the tip

isEnabled

public boolean isEnabled()
Returns true if this object is enabled.
Returns:
true if this object is enabled

setLightWeightPopupEnabled

public void setLightWeightPopupEnabled(boolean aFlag)
When displaying the JToolTip, the ToolTipManager choose to use a light weight JPanel if it fits. This method allows you to disable this feature. You have to do disable it if your application mixes light weight and heavy weights components.

isLightWeightPopupEnabled

public boolean isLightWeightPopupEnabled()
Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used.
Returns:
true if lightweight ToolTips are in use

setInitialDelay

public void setInitialDelay(int milliseconds)
Specifies the initial delay value.
Parameters:
milliseconds - the number of milliseconds to delay (after the cursor has paused) before displaying the tooltip
See Also:
getInitialDelay()

getInitialDelay

public int getInitialDelay()
Returns the initial delay value.
Returns:
an int representing the initial delay value
See Also:
setInitialDelay(int)

setDismissDelay

public void setDismissDelay(int milliseconds)
Specifies the dismisal delay value.
Parameters:
milliseconds - the number of milliseconds to delay (after the cursor has moved on) before taking away the tooltip
See Also:
getDismissDelay()

getDismissDelay

public int getDismissDelay()
Returns the dismisal delay value.
Returns:
an int representing the dismisal delay value
See Also:
setDismissDelay(int)

setReshowDelay

public void setReshowDelay(int milliseconds)
Specifies the time to delay before reshowing the tooltip.
Parameters:
milliseconds - the time in milliseconds to delay before reshowing the tooltip if the cursor stops again
See Also:
getReshowDelay()

getReshowDelay

public int getReshowDelay()
Returns the reshow delay value.
Returns:
an int representing the reshow delay value
See Also:
setReshowDelay(int)

sharedInstance

public static ToolTipManager sharedInstance()
Returns a shared ToolTipManager instance.
Returns:
a shared ToolTipManager object

registerComponent

public void registerComponent(JComponent component)
Register a component for tooltip management.

This will register key bindings to show and hide the tooltip text only if component has focus bindings. This is done so that components that are not normally focus traversable, such as JLabel, are not made focus traversable as a result of invoking this method.

Parameters:
component - a JComponent object
See Also:
JComponent.isFocusTraversable()

unregisterComponent

public void unregisterComponent(JComponent component)
Remove a component from tooltip control.
Parameters:
component - a JComponent object

mouseEntered

public void mouseEntered(MouseEvent event)
Description copied from class: MouseAdapter
Invoked when the mouse enters a component.
Overrides:
mouseEntered in class MouseAdapter

mouseExited

public void mouseExited(MouseEvent event)
Description copied from class: MouseAdapter
Invoked when the mouse exits a component.
Overrides:
mouseExited in class MouseAdapter

mousePressed

public void mousePressed(MouseEvent event)
Description copied from class: MouseAdapter
Invoked when a mouse button has been pressed on a component.
Overrides:
mousePressed in class MouseAdapter

mouseDragged

public void mouseDragged(MouseEvent event)
Description copied from interface: MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent event)
Description copied from interface: MouseMotionListener
Invoked when the mouse button has been moved on a component (with no buttons no down).
Specified by:
mouseMoved in interface MouseMotionListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.tree Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.tree

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.tree.AbstractLayoutCache (implements javax.swing.tree.RowMapper)
      • class javax.swing.tree.FixedHeightLayoutCache
      • class javax.swing.tree.VariableHeightLayoutCache
    • class javax.swing.tree.AbstractLayoutCache.NodeDimensions
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class java.awt.Container
        • class javax.swing.tree.DefaultTreeCellEditor.EditorContainer
        • class javax.swing.JComponent (implements java.io.Serializable)
          • class javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)
            • class javax.swing.tree.DefaultTreeCellRenderer (implements javax.swing.tree.TreeCellRenderer)
          • class javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
            • class javax.swing.JTextField (implements javax.swing.SwingConstants)
              • class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
    • class javax.swing.tree.DefaultMutableTreeNode (implements java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable)
    • class javax.swing.tree.DefaultTreeCellEditor (implements java.awt.event.ActionListener, javax.swing.tree.TreeCellEditor, javax.swing.event.TreeSelectionListener)
    • class javax.swing.tree.DefaultTreeModel (implements java.io.Serializable, javax.swing.tree.TreeModel)
    • class javax.swing.tree.DefaultTreeSelectionModel (implements java.lang.Cloneable, java.io.Serializable, javax.swing.tree.TreeSelectionModel)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.swing.tree.ExpandVetoException
    • class javax.swing.tree.TreePath (implements java.io.Serializable)

Interface Hierarchy

  • interface javax.swing.CellEditor
    • interface javax.swing.tree.TreeCellEditor
  • interface javax.swing.tree.RowMapper
  • interface javax.swing.tree.TreeCellRenderer
  • interface javax.swing.tree.TreeModel
  • interface javax.swing.tree.TreeNode
    • interface javax.swing.tree.MutableTreeNode
  • interface javax.swing.tree.TreeSelectionModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.tree

Provides classes and interfaces for dealing with javax.swing.JTree.

See:
Description

Interface Summary
MutableTreeNode | Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
RowMapper | Defines the requirements for an object that translates paths in the tree into display rows.
TreeCellEditor | Adds to CellEditor the extensions necessary to configure an editor in a tree.
TreeCellRenderer | Defines the requirements for an object that displays a tree node.
TreeModel | The interface that defines a suitable data model for a JTree.
TreeNode | Defines the requirements for an object that can be used as a tree node in a JTree.
TreeSelectionModel | This interface represents the current state of the selection for the tree component.

Class Summary
AbstractLayoutCache | Warning: Serialized objects of this class will not be compatible with future Swing releases.
AbstractLayoutCache.NodeDimensions | Used by AbstractLayoutCache to determing the size and x origin of a particular node.
DefaultMutableTreeNode | A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
DefaultTreeCellEditor | A TreeCellEditor.
DefaultTreeCellRenderer | Displays an entry in a tree.
DefaultTreeModel | A simple tree data model that uses TreeNodes.
DefaultTreeSelectionModel | Default implementation of TreeSelectionModel.
FixedHeightLayoutCache | NOTE: This will become more open in a future release.
TreePath | Represents a path to a node.
VariableHeightLayoutCache | NOTE: This will become more open in a future release.

Exception Summary
ExpandVetoException Exception used to stop and expand/collapse from happening.

Package javax.swing.tree Description

Provides classes and interfaces for dealing with javax.swing.JTree. You use these classes and interfaces if you want control over how trees are constructed, updated, and rendered, as well as how data associated with the tree nodes are viewed and managed.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • How to Use Trees, a section in The Java Tutorial.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.tree

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.tree

Packages that use javax.swing.tree
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Classes in javax.swing.tree used by javax.swing
DefaultMutableTreeNode
A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
DefaultTreeSelectionModel
Default implementation of TreeSelectionModel.
ExpandVetoException
Exception used to stop and expand/collapse from happening.
MutableTreeNode
Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
TreeCellEditor
Adds to CellEditor the extensions necessary to configure an editor in a tree.
TreeCellRenderer
Defines the requirements for an object that displays a tree node.
TreeModel
The interface that defines a suitable data model for a JTree.
TreeNode
Defines the requirements for an object that can be used as a tree node in a JTree.
TreePath
Represents a path to a node.
TreeSelectionModel
This interface represents the current state of the selection for the tree component.

Classes in javax.swing.tree used by javax.swing.event
ExpandVetoException
Exception used to stop and expand/collapse from happening.
TreePath
Represents a path to a node.

Classes in javax.swing.tree used by javax.swing.plaf
TreePath
Represents a path to a node.

Classes in javax.swing.tree used by javax.swing.plaf.basic
AbstractLayoutCache
Warning: Serialized objects of this class will not be compatible with future Swing releases.
AbstractLayoutCache.NodeDimensions
Used by AbstractLayoutCache to determing the size and x origin of a particular node.
TreeCellEditor
Adds to CellEditor the extensions necessary to configure an editor in a tree.
TreeCellRenderer
Defines the requirements for an object that displays a tree node.
TreeModel
The interface that defines a suitable data model for a JTree.
TreePath
Represents a path to a node.
TreeSelectionModel
This interface represents the current state of the selection for the tree component.

Classes in javax.swing.tree used by javax.swing.plaf.metal
TreePath
Represents a path to a node.

Classes in javax.swing.tree used by javax.swing.plaf.multi
TreePath
Represents a path to a node.

Classes in javax.swing.tree used by javax.swing.text
TreeNode
Defines the requirements for an object that can be used as a tree node in a JTree.

Classes in javax.swing.tree used by javax.swing.text.html
TreeNode
Defines the requirements for an object that can be used as a tree node in a JTree.

Classes in javax.swing.tree used by javax.swing.tree
AbstractLayoutCache
Warning: Serialized objects of this class will not be compatible with future Swing releases.
AbstractLayoutCache.NodeDimensions
Used by AbstractLayoutCache to determing the size and x origin of a particular node.
DefaultMutableTreeNode
A DefaultMutableTreeNode is a general-purpose node in a tree data structure.
DefaultTreeCellEditor
A TreeCellEditor.
DefaultTreeCellRenderer
Displays an entry in a tree.
MutableTreeNode
Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.
RowMapper
Defines the requirements for an object that translates paths in the tree into display rows.
TreeCellEditor
Adds to CellEditor the extensions necessary to configure an editor in a tree.
TreeCellRenderer
Defines the requirements for an object that displays a tree node.
TreeModel
The interface that defines a suitable data model for a JTree.
TreeNode
Defines the requirements for an object that can be used as a tree node in a JTree.
TreePath
Represents a path to a node.
TreeSelectionModel
This interface represents the current state of the selection for the tree component.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractLayoutCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class AbstractLayoutCache

java.lang.Object
  |
  +--javax.swing.tree.AbstractLayoutCache
All Implemented Interfaces:
RowMapper
Direct Known Subclasses:
FixedHeightLayoutCache, VariableHeightLayoutCache
public abstract class AbstractLayoutCache
extends Object
implements RowMapper

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
static class AbstractLayoutCache.NodeDimensions
Used by AbstractLayoutCache to determing the size and x origin of a particular node.
Field Summary
protected AbstractLayoutCache.NodeDimensions | nodeDimensions Object responsible for getting the size of a node.
protected boolean | rootVisible True if the root node is displayed, false if its children are the highest visible nodes.
protected int | rowHeight Height to use for each row.
protected TreeModel | treeModel Model providing information.
protected TreeSelectionModel | treeSelectionModel Selection model.
Constructor Summary
AbstractLayoutCache()
Method Summary
abstract Rectangle | getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
abstract boolean | getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
TreeModel | getModel() Returns the TreeModel that is providing the data.
AbstractLayoutCache.NodeDimensions | getNodeDimensions() Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
protected Rectangle | getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle placeIn) Returns, by reference in size, the size needed to reprensent value.
abstract TreePath | getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
abstract TreePath | getPathForRow(int row) Returns the path for passed in row.
int | getPreferredHeight() Returns the preferred height.
int | getPreferredWidth(Rectangle bounds) Returns the preferred width for the passed in region.
abstract int | getRowCount() Number of rows being displayed.
abstract int | getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
int | getRowHeight() Returns the height of each row.
int[] | getRowsForPaths(TreePath[] paths) Returns the rows that the TreePath instances in path are being displayed at.
TreeSelectionModel | getSelectionModel() Returns the model used to maintain the selection.
abstract int | getVisibleChildCount(TreePath path) Returns the number of visible children for row.
abstract Enumeration | getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
abstract void | invalidatePathBounds(TreePath path) Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
abstract void | invalidateSizes() Informs the TreeState that it needs to recalculate all the sizes it is referencing.
abstract boolean | isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
protected boolean | isFixedRowHeight() Returns true if the height of each row is a fixed size.
boolean | isRootVisible() Returns true if the root node of the tree is displayed.
abstract void | setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
void | setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | setNodeDimensions(AbstractLayoutCache.NodeDimensions nd) Sets the renderer that is responsible for drawing nodes in the tree and which is threfore responsible foc calculating the dimensions of individual nodes.
void | setRootVisible(boolean rootVisible) Determines whether or not the root node from the TreeModel is visible.
void | setRowHeight(int rowHeight) Sets the height of each cell.
void | setSelectionModel(TreeSelectionModel newLSM) Sets the TreeSelectionModel used to manage the selection to new LSM.
abstract void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
abstract void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
abstract void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
abstract void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

nodeDimensions

protected AbstractLayoutCache.NodeDimensions nodeDimensions
Object responsible for getting the size of a node.

treeModel

protected TreeModel treeModel
Model providing information.

treeSelectionModel

protected TreeSelectionModel treeSelectionModel
Selection model.

rootVisible

protected boolean rootVisible
True if the root node is displayed, false if its children are the highest visible nodes.

rowHeight

protected int rowHeight
Height to use for each row. If this is <= 0="0" the="the" renderer="renderer" will="will" be="be" used="used" to="to" determine="determine" the="the" height="height" for="for" each="each" row.
Constructor Detail

AbstractLayoutCache

public AbstractLayoutCache()
Method Detail

setNodeDimensions

public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
Sets the renderer that is responsible for drawing nodes in the tree and which is threfore responsible foc calculating the dimensions of individual nodes.
Parameters:
nd - a NodeDimensions object

getNodeDimensions

public AbstractLayoutCache.NodeDimensions getNodeDimensions()
Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.
Returns:
the NodeDimensions object

setModel

public void setModel(TreeModel newModel)
Sets the TreeModel that will provide the data.
Parameters:
newModel - the TreeModel that is to provide the data

getModel

public TreeModel getModel()
Returns the TreeModel that is providing the data.
Returns:
the TreeModel that is providing the data

setRootVisible

public void setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible.
Parameters:
rootVisible - true if the root node of the tree is to be displayed
See Also:
rootVisible

isRootVisible

public boolean isRootVisible()
Returns true if the root node of the tree is displayed.
Returns:
true if the root node of the tree is displayed
See Also:
rootVisible

setRowHeight

public void setRowHeight(int rowHeight)
Sets the height of each cell. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height.
Parameters:
rowHeight - the height of each cell, in pixels

getRowHeight

public int getRowHeight()
Returns the height of each row. If the returned value is less than or equal to 0 the height for each row is determined by the renderer.
Parameters:
the - height of each cell, in pixels. Zero or negative if the height of each row is determined by the tree cell renderer

setSelectionModel

public void setSelectionModel(TreeSelectionModel newLSM)
Sets the TreeSelectionModel used to manage the selection to new LSM.

getSelectionModel

public TreeSelectionModel getSelectionModel()
Returns the model used to maintain the selection.

getPreferredHeight

public int getPreferredHeight()
Returns the preferred height.

getPreferredWidth

public int getPreferredWidth(Rectangle bounds)
Returns the preferred width for the passed in region. If bounds is null, the preferred width for all the nodes will be returned (and this may be VERY expensive).

isExpanded

public abstract boolean isExpanded(TreePath path)
Returns true if the value identified by row is currently expanded.

getBounds

public abstract Rectangle getBounds(TreePath path,
                                    Rectangle placeIn)
Returns a rectangle giving the bounds needed to draw path.
Parameters:
path - a TreePath specifying a node
placeIn - a Rectangle object giving the available space
Returns:
a Rectangle object specifying the space to be used

getPathForRow

public abstract TreePath getPathForRow(int row)
Returns the path for passed in row. If row is not visible null is returned.

getRowForPath

public abstract int getRowForPath(TreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.

getPathClosestTo

public abstract TreePath getPathClosestTo(int x,
                                          int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.

getVisiblePathsFrom

public abstract Enumeration getVisiblePathsFrom(TreePath path)
Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed. The first element of the returned enumeration will be path, unless it isn't visible, in which case null will be returned.

getVisibleChildCount

public abstract int getVisibleChildCount(TreePath path)
Returns the number of visible children for row.

setExpandedState

public abstract void setExpandedState(TreePath path,
                                      boolean isExpanded)
Marks the path path expanded state to isExpanded.

getExpandedState

public abstract boolean getExpandedState(TreePath path)
Returns true if the path is expanded, and visible.

getRowCount

public abstract int getRowCount()
Number of rows being displayed.

invalidateSizes

public abstract void invalidateSizes()
Informs the TreeState that it needs to recalculate all the sizes it is referencing.

invalidatePathBounds

public abstract void invalidatePathBounds(TreePath path)
Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.

treeNodesChanged

public abstract void treeNodesChanged(TreeModelEvent e)

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

e.path() returns the path the parent of the changed node(s).

e.childIndices() returns the index(es) of the changed node(s).

treeNodesInserted

public abstract void treeNodesInserted(TreeModelEvent e)

Invoked after nodes have been inserted into the tree.

e.path() returns the parent of the new nodes

e.childIndices() returns the indices of the new nodes in ascending order.

treeNodesRemoved

public abstract void treeNodesRemoved(TreeModelEvent e)

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

e.path() returns the former parent of the deleted nodes.

e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

treeStructureChanged

public abstract void treeStructureChanged(TreeModelEvent e)

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

e.path() holds the path to the node.

e.childIndices() returns null.

getRowsForPaths

public int[] getRowsForPaths(TreePath[] paths)
Returns the rows that the TreePath instances in path are being displayed at. The receiver should return an array of the same length as that passed in, and if one of the TreePaths in path is not valid its entry in the array should be set to -1.
Specified by:
getRowsForPaths in interface RowMapper

getNodeDimensions

protected Rectangle getNodeDimensions(Object value,
                                      int row,
                                      int depth,
                                      boolean expanded,
                                      Rectangle placeIn)
Returns, by reference in size, the size needed to reprensent value. If size is null, a newly created Dimension should be returned, otherwise the value should be placed in size and returned. This will return null if there is no renderer.

isFixedRowHeight

protected boolean isFixedRowHeight()
Returns true if the height of each row is a fixed size.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

No usage of javax.swing.tree.DefaultTreeCellEditor.DefaultTextField

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultTreeCellEditor.EditorContainer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeCellEditor.EditorContainer

No usage of javax.swing.tree.DefaultTreeCellEditor.EditorContainer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultTreeModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeModel

No usage of javax.swing.tree.DefaultTreeModel

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.FixedHeightLayoutCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.FixedHeightLayoutCache

No usage of javax.swing.tree.FixedHeightLayoutCache

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.VariableHeightLayoutCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.VariableHeightLayoutCache

No usage of javax.swing.tree.VariableHeightLayoutCache

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.AbstractLayoutCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.AbstractLayoutCache

Packages that use AbstractLayoutCache
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of AbstractLayoutCache in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as AbstractLayoutCache
protected  AbstractLayoutCache BasicTreeUI.treeState
Object responsible for handling sizing and expanded issues.

Methods in javax.swing.plaf.basic that return AbstractLayoutCache
protected  AbstractLayoutCache BasicTreeUI.createLayoutCache()
Creates the object responsible for managing what is expanded, as well as the size of nodes.

Uses of AbstractLayoutCache in javax.swing.tree

Subclasses of AbstractLayoutCache in javax.swing.tree
class | FixedHeightLayoutCache NOTE: This will become more open in a future release.
class | VariableHeightLayoutCache NOTE: This will become more open in a future release.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.AbstractLayoutCache.NodeDimensions

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.AbstractLayoutCache.NodeDimensions

Packages that use AbstractLayoutCache.NodeDimensions
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of AbstractLayoutCache.NodeDimensions in javax.swing.plaf.basic

Subclasses of AbstractLayoutCache.NodeDimensions in javax.swing.plaf.basic
 class BasicTreeUI.NodeDimensionsHandler
Class responsible for getting size of node, method is forwarded to BasicTreeUI method.

Fields in javax.swing.plaf.basic declared as AbstractLayoutCache.NodeDimensions
protected  AbstractLayoutCache.NodeDimensions BasicTreeUI.nodeDimensions
Reponsible for telling the TreeState the size needed for a node.

Methods in javax.swing.plaf.basic that return AbstractLayoutCache.NodeDimensions
protected  AbstractLayoutCache.NodeDimensions BasicTreeUI.createNodeDimensions()
Creates an instance of NodeDimensions that is able to determine the size of a given node in the tree.

Uses of AbstractLayoutCache.NodeDimensions in javax.swing.tree

Fields in javax.swing.tree declared as AbstractLayoutCache.NodeDimensions
protected  AbstractLayoutCache.NodeDimensions AbstractLayoutCache.nodeDimensions
Object responsible for getting the size of a node.

Methods in javax.swing.tree that return AbstractLayoutCache.NodeDimensions
 AbstractLayoutCache.NodeDimensions AbstractLayoutCache.getNodeDimensions()
Returns the object that renders nodes in the tree, and which is responsible for calculating the dimensions of individual nodes.

Methods in javax.swing.tree with parameters of type AbstractLayoutCache.NodeDimensions
void | AbstractLayoutCache.setNodeDimensions(AbstractLayoutCache.NodeDimensions nd) Sets the renderer that is responsible for drawing nodes in the tree and which is threfore responsible foc calculating the dimensions of individual nodes.
void | VariableHeightLayoutCache.setNodeDimensions(AbstractLayoutCache.NodeDimensions nd) Sets the renderer that is responsible for drawing nodes in the tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultMutableTreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultMutableTreeNode

Packages that use DefaultMutableTreeNode
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of DefaultMutableTreeNode in javax.swing

Subclasses of DefaultMutableTreeNode in javax.swing
static class JTree.DynamicUtilTreeNode
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.

Methods in javax.swing with parameters of type DefaultMutableTreeNode
static void JTree.DynamicUtilTreeNode.createChildren(DefaultMutableTreeNode parent, Object children)
Adds to parent all the children in children.

Uses of DefaultMutableTreeNode in javax.swing.tree

Methods in javax.swing.tree that return DefaultMutableTreeNode
DefaultMutableTreeNode | DefaultMutableTreeNode.getNextNode() Returns the node that follows this node in a preorder traversal of this node's tree.
DefaultMutableTreeNode | DefaultMutableTreeNode.getPreviousNode() Returns the node that precedes this node in a preorder traversal of this node's tree.
DefaultMutableTreeNode | DefaultMutableTreeNode.getNextSibling() Returns the next sibling of this node in the parent's children array.
DefaultMutableTreeNode | DefaultMutableTreeNode.getPreviousSibling() Returns the previous sibling of this node in the parent's children array.
DefaultMutableTreeNode | DefaultMutableTreeNode.getFirstLeaf() Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf.
DefaultMutableTreeNode | DefaultMutableTreeNode.getLastLeaf() Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf.
DefaultMutableTreeNode | DefaultMutableTreeNode.getNextLeaf() Returns the leaf after this node or null if this node is the last leaf in the tree.
DefaultMutableTreeNode | DefaultMutableTreeNode.getPreviousLeaf() Returns the leaf before this node or null if this node is the first leaf in the tree.

Methods in javax.swing.tree with parameters of type DefaultMutableTreeNode
boolean | DefaultMutableTreeNode.isNodeDescendant(DefaultMutableTreeNode anotherNode) Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children.
TreeNode | DefaultMutableTreeNode.getSharedAncestor(DefaultMutableTreeNode aNode) Returns the nearest common ancestor to this node and aNode.
boolean | DefaultMutableTreeNode.isNodeRelated(DefaultMutableTreeNode aNode) Returns true if and only if aNode is in the same tree as this node.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultTreeCellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeCellEditor

Packages that use DefaultTreeCellEditor
javax.swing.tree Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of DefaultTreeCellEditor in javax.swing.tree

Constructors in javax.swing.tree with parameters of type DefaultTreeCellEditor
DefaultTreeCellEditor.DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor$DefaultTextField object.
DefaultTreeCellEditor.EditorContainer()
Constructs an EditorContainer object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultTreeCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeCellRenderer

Packages that use DefaultTreeCellRenderer
javax.swing.tree Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of DefaultTreeCellRenderer in javax.swing.tree

Fields in javax.swing.tree declared as DefaultTreeCellRenderer
protected  DefaultTreeCellRenderer DefaultTreeCellEditor.renderer
Renderer, used to get border and offsets from.

Constructors in javax.swing.tree with parameters of type DefaultTreeCellRenderer
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.DefaultTreeSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.DefaultTreeSelectionModel

Packages that use DefaultTreeSelectionModel
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Uses of DefaultTreeSelectionModel in javax.swing

Subclasses of DefaultTreeSelectionModel in javax.swing
protected static class JTree.EmptySelectionModel
EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.ExpandVetoException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.ExpandVetoException

Packages that use ExpandVetoException
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.

Uses of ExpandVetoException in javax.swing

Methods in javax.swing that throw ExpandVetoException
void | JTree.fireTreeWillExpand(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | JTree.fireTreeWillCollapse(TreePath path) Notify all listeners that have registered interest for notification on this event type.

Uses of ExpandVetoException in javax.swing.event

Methods in javax.swing.event that throw ExpandVetoException
void | TreeWillExpandListener.treeWillExpand(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be expanded.
void | TreeWillExpandListener.treeWillCollapse(TreeExpansionEvent event) Invoked whenever a node in the tree is about to be collapsed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.tree.TreePath

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.tree.TreePath

Packages that use TreePath
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.event | Provides for events fired by Swing components.
javax.swing.plaf | Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.plaf.metal | Provides user interface objects built according to the ``metal'' look-and-feel.
javax.swing.plaf.multi | The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreePath in javax.swing

Methods in javax.swing that return TreePath
TreePath | JTree.getLeadSelectionPath() Returns the path identified as the lead.
TreePath | JTree.getAnchorSelectionPath() Returns the path identified as the anchor.
TreePath | JTree.getSelectionPath() Returns the path to the first selected node.
TreePath[] | JTree.getSelectionPaths() Returns the paths of all selected values.
TreePath | JTree.getPathForRow(int row) Returns the path for the specified row.
TreePath | JTree.getPathForLocation(int x, int y) Returns the path for the node at the specified location.
TreePath | JTree.getClosestPathForLocation(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | JTree.getEditingPath() Returns the path to the element that is currently being edited.
protected TreePath[] | JTree.getPathBetweenRows(int index0, int index1) Returns JTreePath instances representing the path between index0 and index1 (including index1).

Methods in javax.swing with parameters of type TreePath
boolean | JTree.isPathEditable(TreePath path) Returns isEditable.
void | JTree.setSelectionPath(TreePath path) Selects the node identified by the specified path.
void | JTree.setSelectionPaths(TreePath[] paths) Selects the nodes identified by the specified array of paths.
void | JTree.setLeadSelectionPath(TreePath newPath) Sets the path identifies as the lead.
void | JTree.setAnchorSelectionPath(TreePath newPath) Sets the path identified as the anchor.
void | JTree.addSelectionPath(TreePath path) Adds the node identified by the specified TreePath to the current selection.
void | JTree.addSelectionPaths(TreePath[] paths) Adds each path in the array of paths to the current selection.
boolean | JTree.isPathSelected(TreePath path) Returns true if the item identified by the path is currently selected.
Enumeration | JTree.getExpandedDescendants(TreePath parent) Returns an Enumeration of the descendants of the path parent that are currently expanded.
boolean | JTree.hasBeenExpanded(TreePath path) Returns true if the node identified by the path has ever been expanded.
boolean | JTree.isExpanded(TreePath path) Returns true if the node identified by the path is currently expanded,
boolean | JTree.isCollapsed(TreePath path) Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
void | JTree.makeVisible(TreePath path) Ensures that the node identified by path is currently viewable.
boolean | JTree.isVisible(TreePath path) Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.
Rectangle | JTree.getPathBounds(TreePath path) Returns the Rectangle that the specified node will be drawn into.
void | JTree.scrollPathToVisible(TreePath path) Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.
int | JTree.getRowForPath(TreePath path) Returns the row that displays the node identified by the specified path.
void | JTree.expandPath(TreePath path) Ensures that the node identified by the specified path is expanded and viewable.
void | JTree.collapsePath(TreePath path) Ensures that the node identified by the specified path is collapsed and viewable.
void | JTree.startEditingAtPath(TreePath path) Selects the node identified by the specified path and initiates editing.
void | JTree.removeSelectionPath(TreePath path) Removes the node identified by the specified path from the current selection.
void | JTree.removeSelectionPaths(TreePath[] paths) Removes the nodes identified by the specified paths from the current selection.
void | JTree.fireTreeExpanded(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | JTree.fireTreeCollapsed(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | JTree.fireTreeWillExpand(TreePath path) Notify all listeners that have registered interest for notification on this event type.
void | JTree.fireTreeWillCollapse(TreePath path) Notify all listeners that have registered interest for notification on this event type.
protected void | JTree.setExpandedState(TreePath path, boolean state) Sets the expanded state of this JTree.
protected Enumeration | JTree.getDescendantToggledPaths(TreePath parent) Returns an Enumeration of TreePaths that have been expanded that are descendants of parent.
protected boolean | JTree.removeDescendantSelectedPaths(TreePath path, boolean includePath) Removes any paths in the selection that are descendants of path.
void | JTree.EmptySelectionModel.setSelectionPaths(TreePath[] pPaths) A null implementation that selects nothing.
void | JTree.EmptySelectionModel.addSelectionPaths(TreePath[] paths) A null implementation that adds nothing.
void | JTree.EmptySelectionModel.removeSelectionPaths(TreePath[] paths) A null implementation that removes nothing.

Constructors in javax.swing with parameters of type TreePath
JTree.AccessibleJTree.AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
Constructs an AccessibleJTreeNode

Uses of TreePath in javax.swing.event

Fields in javax.swing.event declared as TreePath
protected TreePath[] | TreeSelectionEvent.paths Paths this event represents.
protected TreePath | TreeSelectionEvent.oldLeadSelectionPath leadSelectionPath before the paths changed, may be null.
protected TreePath | TreeSelectionEvent.newLeadSelectionPath leadSelectionPath after the paths changed, may be null.
protected TreePath | TreeExpansionEvent.path Path to the value this event represents.
protected TreePath | TreeModelEvent.path Path to the parent of the nodes that have changed.

Methods in javax.swing.event that return TreePath
TreePath[] | TreeSelectionEvent.getPaths() Returns the paths that have been added or removed from the selection.
TreePath | TreeSelectionEvent.getPath() Returns the first path element.
TreePath | TreeSelectionEvent.getOldLeadSelectionPath() Returns the path that was previously the lead path.
TreePath | TreeSelectionEvent.getNewLeadSelectionPath() Returns the current lead path.
TreePath | TreeExpansionEvent.getPath() Returns the path to the value that has been expanded/collapsed.
TreePath | TreeModelEvent.getTreePath() For all events, except treeStructureChanged, returns the parent of the changed nodes.

Methods in javax.swing.event with parameters of type TreePath
 boolean TreeSelectionEvent.isAddedPath(TreePath path)
Returns true if the path identified by path was added to the selection.

Constructors in javax.swing.event with parameters of type TreePath
TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
Represents a change in the selection of a TreeSelectionModel.
TreeExpansionEvent(Object source, TreePath path)
Constructs a TreeExpansionEvent object.
TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
TreeModelEvent(Object source, TreePath path)
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.

Uses of TreePath in javax.swing.plaf

Methods in javax.swing.plaf that return TreePath
abstract TreePath | TreeUI.getPathForRow(JTree tree, int row) Returns the path for passed in row.
abstract TreePath | TreeUI.getClosestPathForLocation(JTree tree, int x, int y) Returns the path to the node that is closest to x,y.
abstract TreePath | TreeUI.getEditingPath(JTree tree) Returns the path to the element that is being edited.

Methods in javax.swing.plaf with parameters of type TreePath
abstract Rectangle | TreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
abstract int | TreeUI.getRowForPath(JTree tree, TreePath path) Returns the row that the last item identified in path is visible at.
abstract void | TreeUI.startEditingAtPath(JTree tree, TreePath path) Selects the last item in path and tries to edit it.

Uses of TreePath in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as TreePath
protected  TreePath BasicTreeUI.editingPath
Path that is being edited.

Methods in javax.swing.plaf.basic that return TreePath
TreePath | BasicTreeUI.getPathForRow(JTree tree, int row) Returns the path for passed in row.
TreePath | BasicTreeUI.getClosestPathForLocation(JTree tree, int x, int y) Returns the path to the node that is closest to x,y.
TreePath | BasicTreeUI.getEditingPath(JTree tree) Returns the path to the element that is being edited.
protected TreePath | BasicTreeUI.getLastChildPath(TreePath parent) Returns a path to the last child of parent.

Methods in javax.swing.plaf.basic with parameters of type TreePath
Rectangle | BasicTreeUI.getPathBounds(JTree tree, TreePath path) Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
int | BasicTreeUI.getRowForPath(JTree tree, TreePath path) Returns the row that the last item identified in path is visible at.
void | BasicTreeUI.startEditingAtPath(JTree tree, TreePath path) Selects the last item in path and tries to edit it.
protected void | BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the horizontal part of the leg.
protected void | BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) Paints the vertical part of the leg.
protected void | BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the expand (toggle) part of a row.
protected void | BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the renderer part of a row.
protected boolean | BasicTreeUI.shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Returns true if the expand (toggle) control should be drawn for the specified row.
protected void | BasicTreeUI.updateExpandedDescendants(TreePath path) Updates the expanded state of all the descendants of path by getting the expanded descendants from the tree and forwarding to the tree state.
protected TreePath | BasicTreeUI.getLastChildPath(TreePath parent) Returns a path to the last child of parent.
protected void | BasicTreeUI.pathWasExpanded(TreePath path) Messaged from the VisibleTreeNode after it has been expanded.
protected void | BasicTreeUI.pathWasCollapsed(TreePath path) Messaged from the VisibleTreeNode after it has collapsed.
protected boolean | BasicTreeUI.startEditing(TreePath path, MouseEvent event) Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
protected void | BasicTreeUI.checkForClickInExpandControl(TreePath path, int mouseX, int mouseY) If the mouseX and mouseY are in the expand/collapse region of the row, this will toggle the row.
protected boolean | BasicTreeUI.isLocationInExpandControl(TreePath path, int mouseX, int mouseY) Returns true if mouseX and mouseY fall in the area of row that is used to expand/collapse the node and the node at row does not represent a leaf.
protected void | BasicTreeUI.handleExpandControlClick(TreePath path, int mouseX, int mouseY) Messaged when the user clicks the particular row, this invokes toggleExpandState.
protected void | BasicTreeUI.toggleExpandState(TreePath path) Expands path if it is not expanded, or collapses row if it is expanded.
protected void | BasicTreeUI.selectPathForEvent(TreePath path, MouseEvent event) Messaged to update the selection based on a MouseEvent over a particular row.

Uses of TreePath in javax.swing.plaf.metal

Methods in javax.swing.plaf.metal with parameters of type TreePath
protected void | MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
protected void | MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)

Uses of TreePath in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi that return TreePath
TreePath | MultiTreeUI.getPathForRow(JTree a, int b) Call getPathForRow on each UI handled by this MultiUI.
TreePath | MultiTreeUI.getClosestPathForLocation(JTree a, int b, int c) Call getClosestPathForLocation on each UI handled by this MultiUI.
TreePath | MultiTreeUI.getEditingPath(JTree a) Call getEditingPath on each UI handled by this MultiUI.

Methods in javax.swing.plaf.multi with parameters of type TreePath
Rectangle | MultiTreeUI.getPathBounds(JTree a, TreePath b) Call getPathBounds on each UI handled by this MultiUI.
int | MultiTreeUI.getRowForPath(JTree a, TreePath b) Call getRowForPath on each UI handled by this MultiUI.
void | MultiTreeUI.startEditingAtPath(JTree a, TreePath b) Call startEditingAtPath on each UI handled by this MultiUI.

Uses of TreePath in javax.swing.tree

Fields in javax.swing.tree declared as TreePath
protected TreePath[] | DefaultTreeSelectionModel.selection Paths that are currently selected.
protected TreePath | DefaultTreeSelectionModel.leadPath Last path that was added.
protected TreePath | DefaultTreeCellEditor.lastPath last path that was selected.

Methods in javax.swing.tree that return TreePath
TreePath | DefaultTreeSelectionModel.getSelectionPath() Returns the first path in the selection.
TreePath[] | DefaultTreeSelectionModel.getSelectionPaths() Returns the paths in the selection.
TreePath | DefaultTreeSelectionModel.getLeadSelectionPath() Returns the last path that was added.
abstract TreePath | AbstractLayoutCache.getPathForRow(int row) Returns the path for passed in row.
abstract TreePath | AbstractLayoutCache.getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | VariableHeightLayoutCache.getPathForRow(int row) Returns the path for passed in row.
TreePath | VariableHeightLayoutCache.getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | TreeSelectionModel.getSelectionPath() Returns the first path in the selection.
TreePath[] | TreeSelectionModel.getSelectionPaths() Returns the paths in the selection.
TreePath | TreeSelectionModel.getLeadSelectionPath() Returns the last path that was added.
TreePath | FixedHeightLayoutCache.getPathForRow(int row) Returns the path for passed in row.
TreePath | FixedHeightLayoutCache.getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | TreePath.pathByAddingChild(Object child) Returns a new path containing all the elements of this object plus child.
TreePath | TreePath.getParentPath() Returns a path containing all the elements of this object, except the last path component.

Methods in javax.swing.tree with parameters of type TreePath
void | DefaultTreeSelectionModel.setSelectionPath(TreePath path) Sets the selection to path.
void | DefaultTreeSelectionModel.setSelectionPaths(TreePath[] pPaths) Sets the selection to the paths in paths.
void | DefaultTreeSelectionModel.addSelectionPath(TreePath path) Adds path to the current selection.
void | DefaultTreeSelectionModel.addSelectionPaths(TreePath[] paths) Adds paths to the current selection.
void | DefaultTreeSelectionModel.removeSelectionPath(TreePath path) Removes path from the selection.
void | DefaultTreeSelectionModel.removeSelectionPaths(TreePath[] paths) Removes paths from the selection.
boolean | DefaultTreeSelectionModel.isPathSelected(TreePath path) Returns true if the path, path, is in the current selection.
protected boolean | DefaultTreeSelectionModel.arePathsContiguous(TreePath[] paths) Returns true if the paths are contiguous, or this object has no RowMapper.
protected boolean | DefaultTreeSelectionModel.canPathsBeAdded(TreePath[] paths) Used to test if a particular set of TreePaths can be added.
protected boolean | DefaultTreeSelectionModel.canPathsBeRemoved(TreePath[] paths) Returns true if the paths can be removed without breaking the continuity of the model.
protected void | DefaultTreeSelectionModel.notifyPathChange(Vector changedPaths, TreePath oldLeadSelection) Notifies listeners of a change in path.
abstract boolean | AbstractLayoutCache.isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
abstract Rectangle | AbstractLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
abstract int | AbstractLayoutCache.getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
abstract Enumeration | AbstractLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
abstract int | AbstractLayoutCache.getVisibleChildCount(TreePath path) Returns the number of visible children for row.
abstract void | AbstractLayoutCache.setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
abstract boolean | AbstractLayoutCache.getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
abstract void | AbstractLayoutCache.invalidatePathBounds(TreePath path) Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
int[] | AbstractLayoutCache.getRowsForPaths(TreePath[] paths) Returns the rows that the TreePath instances in path are being displayed at.
void | VariableHeightLayoutCache.setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
boolean | VariableHeightLayoutCache.getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
Rectangle | VariableHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
int | VariableHeightLayoutCache.getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
void | VariableHeightLayoutCache.invalidatePathBounds(TreePath path) Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
Enumeration | VariableHeightLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
int | VariableHeightLayoutCache.getVisibleChildCount(TreePath path) Returns the number of visible children for row.
boolean | VariableHeightLayoutCache.isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
int[] | RowMapper.getRowsForPaths(TreePath[] path) Returns the rows that the TreePath instances in path are being displayed at.
void | TreeModel.valueForPathChanged(TreePath path, Object newValue) Messaged when the user has altered the value for the item identified by path to newValue.
void | TreeSelectionModel.setSelectionPath(TreePath path) Sets the selection to path.
void | TreeSelectionModel.setSelectionPaths(TreePath[] paths) Sets the selection to path.
void | TreeSelectionModel.addSelectionPath(TreePath path) Adds path to the current selection.
void | TreeSelectionModel.addSelectionPaths(TreePath[] paths) Adds paths to the current selection.
void | TreeSelectionModel.removeSelectionPath(TreePath path) Removes path from the selection.
void | TreeSelectionModel.removeSelectionPaths(TreePath[] paths) Removes paths from the selection.
boolean | TreeSelectionModel.isPathSelected(TreePath path) Returns true if the path, path, is in the current selection.
void | FixedHeightLayoutCache.invalidatePathBounds(TreePath path) Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
boolean | FixedHeightLayoutCache.isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
Rectangle | FixedHeightLayoutCache.getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
int | FixedHeightLayoutCache.getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
int | FixedHeightLayoutCache.getVisibleChildCount(TreePath path) Returns the number of visible children for row.
Enumeration | FixedHeightLayoutCache.getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
void | FixedHeightLayoutCache.setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
boolean | FixedHeightLayoutCache.getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
void | DefaultTreeModel.valueForPathChanged(TreePath path, Object newValue) This sets the user object of the TreeNode identified by path and posts a node changed.
boolean | TreePath.isDescendant(TreePath aTreePath) Returns true if aTreePath is a descendant of this TreePath.

Constructors in javax.swing.tree with parameters of type TreePath
TreePath(TreePath parent, Object lastElement)
Constructs a new TreePath, which is the path identified by parent ending in lastElement.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.MutableTreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.MutableTreeNode

Packages that use MutableTreeNode
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of MutableTreeNode in javax.swing

Classes in javax.swing that implement MutableTreeNode
static class JTree.DynamicUtilTreeNode
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.

Uses of MutableTreeNode in javax.swing.tree

Classes in javax.swing.tree that implement MutableTreeNode
 class DefaultMutableTreeNode
A DefaultMutableTreeNode is a general-purpose node in a tree data structure.

Fields in javax.swing.tree declared as MutableTreeNode
protected  MutableTreeNode DefaultMutableTreeNode.parent
this node's parent, or null if this node has no parent

Methods in javax.swing.tree with parameters of type MutableTreeNode
void | DefaultMutableTreeNode.insert(MutableTreeNode newChild, int childIndex) Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.
void | DefaultMutableTreeNode.setParent(MutableTreeNode newParent) Sets this node's parent to newParent but does not change the parent's child array.
void | DefaultMutableTreeNode.remove(MutableTreeNode aChild) Removes aChild from this node's child array, giving it a null parent.
void | DefaultMutableTreeNode.add(MutableTreeNode newChild) Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
void | MutableTreeNode.insert(MutableTreeNode child, int index) Adds child to the receiver at index.
void | MutableTreeNode.remove(MutableTreeNode node) Removes node from the receiver.
void | MutableTreeNode.setParent(MutableTreeNode newParent) Sets the parent of the receiver to newParent.
void | DefaultTreeModel.insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index) Invoked this to insert newChild at location index in parents children.
void | DefaultTreeModel.removeNodeFromParent(MutableTreeNode node) Message this to remove node from its parent.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.RowMapper

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.RowMapper

Packages that use RowMapper
javax.swing.tree Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of RowMapper in javax.swing.tree

Classes in javax.swing.tree that implement RowMapper
class | AbstractLayoutCache Warning: Serialized objects of this class will not be compatible with future Swing releases.
class | FixedHeightLayoutCache NOTE: This will become more open in a future release.
class | VariableHeightLayoutCache NOTE: This will become more open in a future release.

Fields in javax.swing.tree declared as RowMapper
protected  RowMapper DefaultTreeSelectionModel.rowMapper
Provides a row for a given path.

Methods in javax.swing.tree that return RowMapper
RowMapper | DefaultTreeSelectionModel.getRowMapper() Returns the RowMapper instance that is able to map a TreePath to a row.
RowMapper | TreeSelectionModel.getRowMapper() Returns the RowMapper instance that is able to map a TreePath to a row.

Methods in javax.swing.tree with parameters of type RowMapper
void | DefaultTreeSelectionModel.setRowMapper(RowMapper newMapper) Sets the RowMapper instance.
void | TreeSelectionModel.setRowMapper(RowMapper newMapper) Sets the RowMapper instance.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.TreeCellEditor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.TreeCellEditor

Packages that use TreeCellEditor
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeCellEditor in javax.swing

Classes in javax.swing that implement TreeCellEditor
 class DefaultCellEditor
The default editor for table and tree cells.

Fields in javax.swing declared as TreeCellEditor
protected  TreeCellEditor JTree.cellEditor
Editor for the entries.

Methods in javax.swing that return TreeCellEditor
 TreeCellEditor JTree.getCellEditor()
Returns the editor used to edit entries in the tree.

Methods in javax.swing with parameters of type TreeCellEditor
 void JTree.setCellEditor(TreeCellEditor cellEditor)
Sets the cell editor.

Uses of TreeCellEditor in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as TreeCellEditor
protected  TreeCellEditor BasicTreeUI.cellEditor
Editor for the tree.

Methods in javax.swing.plaf.basic that return TreeCellEditor
protected TreeCellEditor | BasicTreeUI.getCellEditor()
protected TreeCellEditor | BasicTreeUI.createDefaultCellEditor() Creates a default cell editor.

Methods in javax.swing.plaf.basic with parameters of type TreeCellEditor
protected  void BasicTreeUI.setCellEditor(TreeCellEditor editor)
Sets the cell editor.

Uses of TreeCellEditor in javax.swing.tree

Classes in javax.swing.tree that implement TreeCellEditor
 class DefaultTreeCellEditor
A TreeCellEditor.

Fields in javax.swing.tree declared as TreeCellEditor
protected  TreeCellEditor DefaultTreeCellEditor.realEditor
Editor handling the editing.

Methods in javax.swing.tree that return TreeCellEditor
protected  TreeCellEditor DefaultTreeCellEditor.createTreeCellEditor()
This is invoked if a TreeCellEditor is not supplied in the constructor.

Constructors in javax.swing.tree with parameters of type TreeCellEditor
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.TreeCellRenderer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.TreeCellRenderer

Packages that use TreeCellRenderer
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeCellRenderer in javax.swing

Fields in javax.swing declared as TreeCellRenderer
protected  TreeCellRenderer JTree.cellRenderer
The cell used to draw nodes.

Methods in javax.swing that return TreeCellRenderer
 TreeCellRenderer JTree.getCellRenderer()
Returns the current TreeCellRenderer that is rendering each cell.

Methods in javax.swing with parameters of type TreeCellRenderer
 void JTree.setCellRenderer(TreeCellRenderer x)
Sets the TreeCellRenderer that will be used to draw each cell.

Uses of TreeCellRenderer in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as TreeCellRenderer
protected  TreeCellRenderer BasicTreeUI.currentCellRenderer
Renderer that is being used to do the actual cell drawing.

Methods in javax.swing.plaf.basic that return TreeCellRenderer
protected TreeCellRenderer | BasicTreeUI.getCellRenderer() Return currentCellRenderer, which will either be the trees renderer, or defaultCellRenderer, which ever wasn't null.
protected TreeCellRenderer | BasicTreeUI.createDefaultCellRenderer() Returns the default cell renderer that is used to do the stamping of each node.

Methods in javax.swing.plaf.basic with parameters of type TreeCellRenderer
protected  void BasicTreeUI.setCellRenderer(TreeCellRenderer tcr)
Sets the TreeCellRenderer to tcr.

Uses of TreeCellRenderer in javax.swing.tree

Classes in javax.swing.tree that implement TreeCellRenderer
 class DefaultTreeCellRenderer
Displays an entry in a tree.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.TreeModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.TreeModel

Packages that use TreeModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeModel in javax.swing

Fields in javax.swing declared as TreeModel
protected  TreeModel JTree.treeModel
The model that defines the tree displayed by this object.

Methods in javax.swing that return TreeModel
protected static TreeModel | JTree.getDefaultTreeModel() Creates and returns a sample TreeModel.
protected static TreeModel | JTree.createTreeModel(Object value) Returns a TreeModel wrapping the specified object.
TreeModel | JTree.getModel() Returns the TreeModel that is providing the data.

Methods in javax.swing with parameters of type TreeModel
 void JTree.setModel(TreeModel newModel)
Sets the TreeModel that will provide the data.

Constructors in javax.swing with parameters of type TreeModel
JTree(TreeModel newModel)
Returns an instance of JTree which displays the root node -- the tree is created using the specified data model.

Uses of TreeModel in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as TreeModel
protected  TreeModel BasicTreeUI.treeModel
Used to determine what to display.

Methods in javax.swing.plaf.basic that return TreeModel
protected  TreeModel BasicTreeUI.getModel()

Methods in javax.swing.plaf.basic with parameters of type TreeModel
protected  void BasicTreeUI.setModel(TreeModel model)
Sets the TreeModel.

Uses of TreeModel in javax.swing.tree

Classes in javax.swing.tree that implement TreeModel
 class DefaultTreeModel
A simple tree data model that uses TreeNodes.

Fields in javax.swing.tree declared as TreeModel
protected  TreeModel AbstractLayoutCache.treeModel
Model providing information.

Methods in javax.swing.tree that return TreeModel
 TreeModel AbstractLayoutCache.getModel()
Returns the TreeModel that is providing the data.

Methods in javax.swing.tree with parameters of type TreeModel
void | AbstractLayoutCache.setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | VariableHeightLayoutCache.setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | FixedHeightLayoutCache.setModel(TreeModel newModel) Sets the TreeModel that will provide the data.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.TreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.TreeNode

Packages that use TreeNode
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.text.html | Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeNode in javax.swing

Classes in javax.swing that implement TreeNode
static class JTree.DynamicUtilTreeNode
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.

Methods in javax.swing that return TreeNode
 TreeNode JTree.DynamicUtilTreeNode.getChildAt(int index)
Subclassed to load the children, if necessary.

Constructors in javax.swing with parameters of type TreeNode
JTree(TreeNode root)
Returns a JTree with the specified TreeNode as its root, which displays the root node.
JTree(TreeNode root, boolean asksAllowsChildren)
Returns a JTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.

Uses of TreeNode in javax.swing.text

Classes in javax.swing.text that implement TreeNode
class | AbstractDocument.AbstractElement Implements the abstract part of an element.
class | AbstractDocument.BranchElement Implements a composite element that contains other elements.
class | AbstractDocument.LeafElement Implements an element that directly represents content of some kind.
protected class | DefaultStyledDocument.SectionElement Default root element for a document...

Methods in javax.swing.text that return TreeNode
TreeNode | AbstractDocument.AbstractElement.getChildAt(int childIndex) Returns the child TreeNode at index childIndex.
TreeNode | AbstractDocument.AbstractElement.getParent() Returns the parent TreeNode of the receiver.

Methods in javax.swing.text with parameters of type TreeNode
 int AbstractDocument.AbstractElement.getIndex(TreeNode node)
Returns the index of node in the receivers children.

Uses of TreeNode in javax.swing.text.html

Classes in javax.swing.text.html that implement TreeNode
class | HTMLDocument.BlockElement An element that represents a structural block of HTML.
class | HTMLDocument.RunElement An element that represents a chunk of text that has a set of HTML character level attributes assigned to it.

Uses of TreeNode in javax.swing.tree

Subinterfaces of TreeNode in javax.swing.tree
 interface MutableTreeNode
Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.

Classes in javax.swing.tree that implement TreeNode
 class DefaultMutableTreeNode
A DefaultMutableTreeNode is a general-purpose node in a tree data structure.

Fields in javax.swing.tree declared as TreeNode
protected  TreeNode DefaultTreeModel.root
Root of the tree.

Methods in javax.swing.tree that return TreeNode
TreeNode | DefaultMutableTreeNode.getParent() Returns this node's parent or null if this node has no parent.
TreeNode | DefaultMutableTreeNode.getChildAt(int index) Returns the child at the specified index in this node's child array.
TreeNode | DefaultMutableTreeNode.getSharedAncestor(DefaultMutableTreeNode aNode) Returns the nearest common ancestor to this node and aNode.
TreeNode[] | DefaultMutableTreeNode.getPath() Returns the path from the root, to get to this node.
protected TreeNode[] | DefaultMutableTreeNode.getPathToRoot(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
TreeNode | DefaultMutableTreeNode.getRoot() Returns the root of the tree that contains this node.
TreeNode | DefaultMutableTreeNode.getFirstChild() Returns this node's first child.
TreeNode | DefaultMutableTreeNode.getLastChild() Returns this node's last child.
TreeNode | DefaultMutableTreeNode.getChildAfter(TreeNode aChild) Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
TreeNode | DefaultMutableTreeNode.getChildBefore(TreeNode aChild) Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
TreeNode[] | DefaultTreeModel.getPathToRoot(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
protected TreeNode[] | DefaultTreeModel.getPathToRoot(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
TreeNode | TreeNode.getChildAt(int childIndex) Returns the child TreeNode at index childIndex.
TreeNode | TreeNode.getParent() Returns the parent TreeNode of the receiver.

Methods in javax.swing.tree with parameters of type TreeNode
int | DefaultMutableTreeNode.getIndex(TreeNode aChild) Returns the index of the specified child in this node's child array.
boolean | DefaultMutableTreeNode.isNodeAncestor(TreeNode anotherNode) Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.
protected TreeNode[] | DefaultMutableTreeNode.getPathToRoot(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
Enumeration | DefaultMutableTreeNode.pathFromAncestorEnumeration(TreeNode ancestor) Creates and returns an enumeration that follows the path from ancestor to this node.
boolean | DefaultMutableTreeNode.isNodeChild(TreeNode aNode) Returns true if aNode is a child of this node.
TreeNode | DefaultMutableTreeNode.getChildAfter(TreeNode aChild) Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
TreeNode | DefaultMutableTreeNode.getChildBefore(TreeNode aChild) Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
boolean | DefaultMutableTreeNode.isNodeSibling(TreeNode anotherNode) Returns true if anotherNode is a sibling of (has the same parent as) this node.
void | DefaultTreeModel.setRoot(TreeNode root) Sets the root to root.
void | DefaultTreeModel.nodeChanged(TreeNode node) Invoke this method after you've changed how node is to be represented in the tree.
void | DefaultTreeModel.reload(TreeNode node) Invoke this method if you've modified the TreeNodes upon which this model depends.
void | DefaultTreeModel.nodesWereInserted(TreeNode node, int[] childIndices) Invoke this method after you've inserted some TreeNodes into node.
void | DefaultTreeModel.nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren) Invoke this method after you've removed some TreeNodes from node.
void | DefaultTreeModel.nodesChanged(TreeNode node, int[] childIndices) Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
void | DefaultTreeModel.nodeStructureChanged(TreeNode node) Invoke this method if you've totally changed the children of node and its childrens children...
TreeNode[] | DefaultTreeModel.getPathToRoot(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
protected TreeNode[] | DefaultTreeModel.getPathToRoot(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
int | TreeNode.getIndex(TreeNode node) Returns the index of node in the receivers children.

Constructors in javax.swing.tree with parameters of type TreeNode
DefaultTreeModel(TreeNode root)
Creates a tree in which any node can have children.
DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.tree.TreeSelectionModel

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.tree.TreeSelectionModel

Packages that use TreeSelectionModel
javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.plaf.basic | Provides user interface objects built according to the Basic look-and-feel.
javax.swing.tree | Provides classes and interfaces for dealing with javax.swing.JTree.

Uses of TreeSelectionModel in javax.swing

Classes in javax.swing that implement TreeSelectionModel
protected static class JTree.EmptySelectionModel
EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.

Fields in javax.swing declared as TreeSelectionModel
protected  TreeSelectionModel JTree.selectionModel
Models the set of selected nodes in this tree.

Methods in javax.swing that return TreeSelectionModel
 TreeSelectionModel JTree.getSelectionModel()
Returns the model for selections.

Methods in javax.swing with parameters of type TreeSelectionModel
 void JTree.setSelectionModel(TreeSelectionModel selectionModel)
Sets the tree's selection model.

Uses of TreeSelectionModel in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic declared as TreeSelectionModel
protected  TreeSelectionModel BasicTreeUI.treeSelectionModel
Model maintaing the selection.

Methods in javax.swing.plaf.basic that return TreeSelectionModel
protected  TreeSelectionModel BasicTreeUI.getSelectionModel()

Methods in javax.swing.plaf.basic with parameters of type TreeSelectionModel
protected  void BasicTreeUI.setSelectionModel(TreeSelectionModel newLSM)
Resets the selection model.

Uses of TreeSelectionModel in javax.swing.tree

Classes in javax.swing.tree that implement TreeSelectionModel
 class DefaultTreeSelectionModel
Default implementation of TreeSelectionModel.

Fields in javax.swing.tree declared as TreeSelectionModel
protected  TreeSelectionModel AbstractLayoutCache.treeSelectionModel
Selection model.

Methods in javax.swing.tree that return TreeSelectionModel
 TreeSelectionModel AbstractLayoutCache.getSelectionModel()
Returns the model used to maintain the selection.

Methods in javax.swing.tree with parameters of type TreeSelectionModel
 void AbstractLayoutCache.setSelectionModel(TreeSelectionModel newLSM)
Sets the TreeSelectionModel used to manage the selection to new LSM.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


DefaultMutableTreeNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultMutableTreeNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
All Implemented Interfaces:
Cloneable, MutableTreeNode, Serializable, TreeNode
Direct Known Subclasses:
JTree.DynamicUtilTreeNode
public class DefaultMutableTreeNode
extends Object
implements Cloneable, MutableTreeNode, Serializable

A DefaultMutableTreeNode is a general-purpose node in a tree data structure. For examples of using default mutable tree nodes, see How to Use Trees in The Java Tutorial.

A tree node may have at most one parent and 0 or more children. DefaultMutableTreeNode provides operations for examining and modifying a node's parent and children and also operations for examining the tree that the node is a part of. A node's tree is the set of all nodes that can be reached by starting at the node and following all the possible links to parents and children. A node with no parent is the root of its tree; a node with no children is a leaf. A tree may consist of many subtrees, each node acting as the root for its own subtree.

This class provides enumerations for efficiently traversing a tree or subtree in various orders or for following the path between two nodes. A DefaultMutableTreeNode may also hold a reference to a user object, the use of which is left to the user. Asking a DefaultMutableTreeNode for its string representation with toString() returns the string representation of its user object.

This is not a thread safe class.If you intend to use a DefaultMutableTreeNode (or a tree of TreeNodes) in more than one thread, you need to do your own synchronizing. A good convention to adopt is synchronizing on the root node of a tree.

While DefaultMutableTreeNode implements the MutableTreeNode interface and will allow you to add in any implementation of MutableTreeNode not all of the methods in DefaultMutableTreeNode will be applicable to all MutableTreeNodes implementations. Especially with some of the enumerations that are provided, using some of these methods assumes the DefaultMutableTreeNode contains only DefaultMutableNode instances. All of the TreeNode/MutableTreeNode methods will behave as defined no matter what implementations are added.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
MutableTreeNode, Serialized Form

Field Summary
protected boolean | allowsChildren true if the node is able to have children
protected Vector | children array of children, may be null if this node has no children
static Enumeration | EMPTY_ENUMERATION An enumeration that is always empty.
protected MutableTreeNode | parent this node's parent, or null if this node has no parent
protected Object | userObject optional user object
Constructor Summary
DefaultMutableTreeNode()
Creates a tree node that has no parent and no children, but which allows children.
DefaultMutableTreeNode(Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
DefaultMutableTreeNode(Object userObject, boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
Method Summary
 void add(MutableTreeNode newChild)
Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
 Enumeration breadthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.
 Enumeration children()
Creates and returns a forward-order enumeration of this node's children.
 Object clone()
Overridden to make clone public.
 Enumeration depthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.
 boolean getAllowsChildren()
Returns true if this node is allowed to have children.
 TreeNode getChildAfter(TreeNode aChild)
Returns the child in this node's child array that immediately follows aChild, which must be a child of this node.
 TreeNode getChildAt(int index)
Returns the child at the specified index in this node's child array.
 TreeNode getChildBefore(TreeNode aChild)
Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node.
 int getChildCount()
Returns the number of children of this node.
 int getDepth()
Returns the depth of the tree rooted at this node -- the longest distance from this node to a leaf.
 TreeNode getFirstChild()
Returns this node's first child.
 DefaultMutableTreeNode getFirstLeaf()
Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf.
 int getIndex(TreeNode aChild)
Returns the index of the specified child in this node's child array.
 TreeNode getLastChild()
Returns this node's last child.
 DefaultMutableTreeNode getLastLeaf()
Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf.
 int getLeafCount()
Returns the total number of leaves that are descendants of this node.
 int getLevel()
Returns the number of levels above this node -- the distance from the root to this node.
 DefaultMutableTreeNode getNextLeaf()
Returns the leaf after this node or null if this node is the last leaf in the tree.
 DefaultMutableTreeNode getNextNode()
Returns the node that follows this node in a preorder traversal of this node's tree.
 DefaultMutableTreeNode getNextSibling()
Returns the next sibling of this node in the parent's children array.
 TreeNode getParent()
Returns this node's parent or null if this node has no parent.
 TreeNode[] getPath()
Returns the path from the root, to get to this node.
protected  TreeNode[] getPathToRoot(TreeNode aNode, int depth)
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
 DefaultMutableTreeNode getPreviousLeaf()
Returns the leaf before this node or null if this node is the first leaf in the tree.
 DefaultMutableTreeNode getPreviousNode()
Returns the node that precedes this node in a preorder traversal of this node's tree.
 DefaultMutableTreeNode getPreviousSibling()
Returns the previous sibling of this node in the parent's children array.
 TreeNode getRoot()
Returns the root of the tree that contains this node.
 TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)
Returns the nearest common ancestor to this node and aNode.
 int getSiblingCount()
Returns the number of siblings of this node.
 Object getUserObject()
Returns this node's user object.
 Object[] getUserObjectPath()
Returns the user object path, from the root, to get to this node.
 void insert(MutableTreeNode newChild, int childIndex)
Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.
 boolean isLeaf()
Returns true if this node has no children.
 boolean isNodeAncestor(TreeNode anotherNode)
Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.
 boolean isNodeChild(TreeNode aNode)
Returns true if aNode is a child of this node.
 boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)
Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children.
 boolean isNodeRelated(DefaultMutableTreeNode aNode)
Returns true if and only if aNode is in the same tree as this node.
 boolean isNodeSibling(TreeNode anotherNode)
Returns true if anotherNode is a sibling of (has the same parent as) this node.
 boolean isRoot()
Returns true if this node is the root of the tree.
 Enumeration pathFromAncestorEnumeration(TreeNode ancestor)
Creates and returns an enumeration that follows the path from ancestor to this node.
 Enumeration postorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.
 Enumeration preorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.
 void remove(int childIndex)
Removes the child at the specified index from this node's children and sets that node's parent to null.
 void remove(MutableTreeNode aChild)
Removes aChild from this node's child array, giving it a null parent.
 void removeAllChildren()
Removes all of this node's children, setting their parents to null.
 void removeFromParent()
Removes the subtree rooted at this node from the tree, giving this node a null parent.
 void setAllowsChildren(boolean allows)
Determines whether or not this node is allowed to have children.
 void setParent(MutableTreeNode newParent)
Sets this node's parent to newParent but does not change the parent's child array.
 void setUserObject(Object userObject)
Sets the user object for this node to userObject.
 String toString()
Returns the result of sending toString() to this node's user object, or null if this node has no user object.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

EMPTY_ENUMERATION

public static final Enumeration EMPTY_ENUMERATION
An enumeration that is always empty. This is used when an enumeration of a leaf node's children is requested.

parent

protected MutableTreeNode parent
this node's parent, or null if this node has no parent

children

protected Vector children
array of children, may be null if this node has no children

userObject

protected transient Object userObject
optional user object

allowsChildren

protected boolean allowsChildren
true if the node is able to have children
Constructor Detail

DefaultMutableTreeNode

public DefaultMutableTreeNode()
Creates a tree node that has no parent and no children, but which allows children.

DefaultMutableTreeNode

public DefaultMutableTreeNode(Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
Parameters:
userObject - an Object provided by the user that constitutes the node's data

DefaultMutableTreeNode

public DefaultMutableTreeNode(Object userObject,
                              boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
Parameters:
userObject - an Object provided by the user that constitutes the node's data
allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node
Method Detail

insert

public void insert(MutableTreeNode newChild,
                   int childIndex)
Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex. newChild must not be null and must not be an ancestor of this node.
Specified by:
insert in interface MutableTreeNode
Parameters:
newChild - the MutableTreeNode to insert under this node
childIndex - the index in this node's child array where this node is to be inserted
Throws:
ArrayIndexOutOfBoundsException - if childIndex is out of bounds
IllegalArgumentException - if newChild is null or is an ancestor of this node
IllegalStateException - if this node does not allow children
See Also:
isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

remove

public void remove(int childIndex)
Removes the child at the specified index from this node's children and sets that node's parent to null. The child node to remove must be a MutableTreeNode.
Specified by:
remove in interface MutableTreeNode
Parameters:
childIndex - the index in this node's child array of the child to remove
Throws:
ArrayIndexOutOfBoundsException - if childIndex is out of bounds

setParent

public void setParent(MutableTreeNode newParent)
Sets this node's parent to newParent but does not change the parent's child array. This method is called from insert() and remove() to reassign a child's parent, it should not be messaged from anywhere else.
Specified by:
setParent in interface MutableTreeNode
Parameters:
newParent - this node's new parent

getParent

public TreeNode getParent()
Returns this node's parent or null if this node has no parent.
Specified by:
getParent in interface TreeNode
Returns:
this node's parent TreeNode, or null if this node has no parent

getChildAt

public TreeNode getChildAt(int index)
Returns the child at the specified index in this node's child array.
Specified by:
getChildAt in interface TreeNode
Parameters:
index - an index into this node's child array
Returns:
the TreeNode in this node's child array at the specified index
Throws:
ArrayIndexOutOfBoundsException - if index is out of bounds

getChildCount

public int getChildCount()
Returns the number of children of this node.
Specified by:
getChildCount in interface TreeNode
Returns:
an int giving the number of children of this node

getIndex

public int getIndex(TreeNode aChild)
Returns the index of the specified child in this node's child array. If the specified node is not a child of this node, returns -1. This method performs a linear search and is O(n) where n is the number of children.
Specified by:
getIndex in interface TreeNode
Parameters:
aChild - the TreeNode to search for among this node's children
Returns:
an int giving the index of the node in this node's child array, or -1 if the specified node is a not a child of this node
Throws:
IllegalArgumentException - if aChild is null

children

public Enumeration children()
Creates and returns a forward-order enumeration of this node's children. Modifying this node's child array invalidates any child enumerations created before the modification.
Specified by:
children in interface TreeNode
Returns:
an Enumeration of this node's children

setAllowsChildren

public void setAllowsChildren(boolean allows)
Determines whether or not this node is allowed to have children. If allows is false, all of this node's children are removed.

Note: By default, a node allows children.

Parameters:
allows - true if this node is allowed to have children

getAllowsChildren

public boolean getAllowsChildren()
Returns true if this node is allowed to have children.
Specified by:
getAllowsChildren in interface TreeNode
Returns:
true if this node allows children, else false

setUserObject

public void setUserObject(Object userObject)
Sets the user object for this node to userObject.
Specified by:
setUserObject in interface MutableTreeNode
Parameters:
userObject - the Object that constitutes this node's user-specified data
See Also:
getUserObject(), toString()

getUserObject

public Object getUserObject()
Returns this node's user object.
Returns:
the Object stored at this node by the user
See Also:
setUserObject(java.lang.Object), toString()

removeFromParent

public void removeFromParent()
Removes the subtree rooted at this node from the tree, giving this node a null parent. Does nothing if this node is the root of its tree.
Specified by:
removeFromParent in interface MutableTreeNode

remove

public void remove(MutableTreeNode aChild)
Removes aChild from this node's child array, giving it a null parent.
Specified by:
remove in interface MutableTreeNode
Parameters:
aChild - a child of this node to remove
Throws:
IllegalArgumentException - if aChild is null or is not a child of this node

removeAllChildren

public void removeAllChildren()
Removes all of this node's children, setting their parents to null. If this node has no children, this method does nothing.

add

public void add(MutableTreeNode newChild)
Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
Parameters:
newChild - node to add as a child of this node
Throws:
IllegalArgumentException - if newChild is null
IllegalStateException - if this node does not allow children
See Also:
insert(javax.swing.tree.MutableTreeNode, int)

isNodeAncestor

public boolean isNodeAncestor(TreeNode anotherNode)
Returns true if anotherNode is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent. (Note that a node is considered an ancestor of itself.) If anotherNode is null, this method returns false. This operation is at worst O(h) where h is the distance from the root to this node.
Parameters:
anotherNode - node to test as an ancestor of this node
Returns:
true if this node is a descendant of anotherNode
See Also:
isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode), getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode)

isNodeDescendant

public boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)
Returns true if anotherNode is a descendant of this node -- if it is this node, one of this node's children, or a descendant of one of this node's children. Note that a node is considered a descendant of itself. If anotherNode is null, returns false. This operation is at worst O(h) where h is the distance from the root to anotherNode.
Parameters:
anotherNode - node to test as descendant of this node
Returns:
true if this node is an ancestor of anotherNode
See Also:
isNodeAncestor(javax.swing.tree.TreeNode), getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode)

getSharedAncestor

public TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)
Returns the nearest common ancestor to this node and aNode. Returns null, if no such ancestor exists -- if this node and aNode are in different trees or if aNode is null. A node is considered an ancestor of itself.
Parameters:
aNode - node to find common ancestor with
Returns:
nearest ancestor common to this node and aNode, or null if none
See Also:
isNodeAncestor(javax.swing.tree.TreeNode), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

isNodeRelated

public boolean isNodeRelated(DefaultMutableTreeNode aNode)
Returns true if and only if aNode is in the same tree as this node. Returns false if aNode is null.
Returns:
true if aNode is in the same tree as this node; false if aNode is null
See Also:
getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode), getRoot()

getDepth

public int getDepth()
Returns the depth of the tree rooted at this node -- the longest distance from this node to a leaf. If this node has no children, returns 0. This operation is much more expensive than getLevel() because it must effectively traverse the entire tree rooted at this node.
Returns:
the depth of the tree whose root is this node
See Also:
getLevel()

getLevel

public int getLevel()
Returns the number of levels above this node -- the distance from the root to this node. If this node is the root, returns 0.
Returns:
the number of levels above this node
See Also:
getDepth()

getPath

public TreeNode[] getPath()
Returns the path from the root, to get to this node. The last element in the path is this node.
Returns:
an array of TreeNode objects giving the path, where the first element in the path is the root and the last element is this node.

getPathToRoot

protected TreeNode[] getPathToRoot(TreeNode aNode,
                                   int depth)
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
Parameters:
aNode - the TreeNode to get the path for
depth - an int giving the number of steps already taken towards the root (on recursive calls), used to size the returned array
Returns:
an array of TreeNodes giving the path from the root to the specified node

getUserObjectPath

public Object[] getUserObjectPath()
Returns the user object path, from the root, to get to this node. If some of the TreeNodes in the path have null user objects, the returned path will contain nulls.

getRoot

public TreeNode getRoot()
Returns the root of the tree that contains this node. The root is the ancestor with a null parent.
Returns:
the root of the tree that contains this node
See Also:
isNodeAncestor(javax.swing.tree.TreeNode)

isRoot

public boolean isRoot()
Returns true if this node is the root of the tree. The root is the only node in the tree with a null parent; every tree has exactly one root.
Returns:
true if this node is the root of its tree

getNextNode

public DefaultMutableTreeNode getNextNode()
Returns the node that follows this node in a preorder traversal of this node's tree. Returns null if this node is the last node of the traversal. This is an inefficient way to traverse the entire tree; use an enumeration, instead.
Returns:
the node that follows this node in a preorder traversal, or null if this node is last
See Also:
preorderEnumeration()

getPreviousNode

public DefaultMutableTreeNode getPreviousNode()
Returns the node that precedes this node in a preorder traversal of this node's tree. Returns null if this node is the first node of the traveral -- the root of the tree. This is an inefficient way to traverse the entire tree; use an enumeration, instead.
Returns:
the node that precedes this node in a preorder traversal, or null if this node is the first
See Also:
preorderEnumeration()

preorderEnumeration

public Enumeration preorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in preorder. The first node returned by the enumeration's nextElement() method is this node.

Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

Returns:
an enumeration for traversing the tree in preorder
See Also:
postorderEnumeration()

postorderEnumeration

public Enumeration postorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in postorder. The first node returned by the enumeration's nextElement() method is the leftmost leaf. This is the same as a depth-first traversal.

Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

Returns:
an enumeration for traversing the tree in postorder
See Also:
depthFirstEnumeration(), preorderEnumeration()

breadthFirstEnumeration

public Enumeration breadthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order. The first node returned by the enumeration's nextElement() method is this node.

Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

Returns:
an enumeration for traversing the tree in breadth-first order
See Also:
depthFirstEnumeration()

depthFirstEnumeration

public Enumeration depthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order. The first node returned by the enumeration's nextElement() method is the leftmost leaf. This is the same as a postorder traversal.

Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

Returns:
an enumeration for traversing the tree in depth-first order
See Also:
breadthFirstEnumeration(), postorderEnumeration()

pathFromAncestorEnumeration

public Enumeration pathFromAncestorEnumeration(TreeNode ancestor)
Creates and returns an enumeration that follows the path from ancestor to this node. The enumeration's nextElement() method first returns ancestor, then the child of ancestor that is an ancestor of this node, and so on, and finally returns this node. Creation of the enumeration is O(m) where m is the number of nodes between this node and ancestor, inclusive. Each nextElement() message is O(1).

Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modification.

Returns:
an enumeration for following the path from an ancestor of this node to this one
Throws:
IllegalArgumentException - if ancestor is not an ancestor of this node
See Also:
isNodeAncestor(javax.swing.tree.TreeNode), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

isNodeChild

public boolean isNodeChild(TreeNode aNode)
Returns true if aNode is a child of this node. If aNode is null, this method returns false.
Returns:
true if aNode is a child of this node; false if aNode is null

getFirstChild

public TreeNode getFirstChild()
Returns this node's first child. If this node has no children, throws NoSuchElementException.
Returns:
the first child of this node
Throws:
NoSuchElementException - if this node has no children

getLastChild

public TreeNode getLastChild()
Returns this node's last child. If this node has no children, throws NoSuchElementException.
Returns:
the last child of this node
Throws:
NoSuchElementException - if this node has no children

getChildAfter

public TreeNode getChildAfter(TreeNode aChild)
Returns the child in this node's child array that immediately follows aChild, which must be a child of this node. If aChild is the last child, returns null. This method performs a linear search of this node's children for aChild and is O(n) where n is the number of children; to traverse the entire array of children, use an enumeration instead.
Returns:
the child of this node that immediately follows aChild
Throws:
IllegalArgumentException - if aChild is null or is not a child of this node
See Also:
children

getChildBefore

public TreeNode getChildBefore(TreeNode aChild)
Returns the child in this node's child array that immediately precedes aChild, which must be a child of this node. If aChild is the first child, returns null. This method performs a linear search of this node's children for aChild and is O(n) where n is the number of children.
Returns:
the child of this node that immediately precedes aChild
Throws:
IllegalArgumentException - if aChild is null or is not a child of this node

isNodeSibling

public boolean isNodeSibling(TreeNode anotherNode)
Returns true if anotherNode is a sibling of (has the same parent as) this node. A node is its own sibling. If anotherNode is null, returns false.
Parameters:
anotherNode - node to test as sibling of this node
Returns:
true if anotherNode is a sibling of this node

getSiblingCount

public int getSiblingCount()
Returns the number of siblings of this node. A node is its own sibling (if it has no parent or no siblings, this method returns 1).
Returns:
the number of siblings of this node

getNextSibling

public DefaultMutableTreeNode getNextSibling()
Returns the next sibling of this node in the parent's children array. Returns null if this node has no parent or is the parent's last child. This method performs a linear search that is O(n) where n is the number of children; to traverse the entire array, use the parent's child enumeration instead.
Returns:
the sibling of this node that immediately follows this node
See Also:
children

getPreviousSibling

public DefaultMutableTreeNode getPreviousSibling()
Returns the previous sibling of this node in the parent's children array. Returns null if this node has no parent or is the parent's first child. This method performs a linear search that is O(n) where n is the number of children.
Returns:
the sibling of this node that immediately precedes this node

isLeaf

public boolean isLeaf()
Returns true if this node has no children. To distinguish between nodes that have no children and nodes that cannot have children (e.g. to distinguish files from empty directories), use this method in conjunction with getAllowsChildren
Specified by:
isLeaf in interface TreeNode
Returns:
true if this node has no children
See Also:
getAllowsChildren()

getFirstLeaf

public DefaultMutableTreeNode getFirstLeaf()
Finds and returns the first leaf that is a descendant of this node -- either this node or its first child's first leaf. Returns this node if it is a leaf.
Returns:
the first leaf in the subtree rooted at this node
See Also:
isLeaf(), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

getLastLeaf

public DefaultMutableTreeNode getLastLeaf()
Finds and returns the last leaf that is a descendant of this node -- either this node or its last child's last leaf. Returns this node if it is a leaf.
Returns:
the last leaf in the subtree rooted at this node
See Also:
isLeaf(), isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)

getNextLeaf

public DefaultMutableTreeNode getNextLeaf()
Returns the leaf after this node or null if this node is the last leaf in the tree.

In this implementation of the MutableNode interface, this operation is very inefficient. In order to determine the next node, this method first performs a linear search in the parent's child-list in order to find the current node.

That implementation makes the operation suitable for short traversals from a known position. But to traverse all of the leaves in the tree, you should use depthFirstEnumeration to enumerate the nodes in the tree and use isLeaf on each node to determine which are leaves.

Returns:
returns the next leaf past this node
See Also:
depthFirstEnumeration(), isLeaf()

getPreviousLeaf

public DefaultMutableTreeNode getPreviousLeaf()
Returns the leaf before this node or null if this node is the first leaf in the tree.

In this implementation of the MutableNode interface, this operation is very inefficient. In order to determine the previous node, this method first performs a linear search in the parent's child-list in order to find the current node.

That implementation makes the operation suitable for short traversals from a known position. But to traverse all of the leaves in the tree, you should use depthFirstEnumeration to enumerate the nodes in the tree and use isLeaf on each node to determine which are leaves.

Returns:
returns the leaf before this node
See Also:
depthFirstEnumeration(), isLeaf()

getLeafCount

public int getLeafCount()
Returns the total number of leaves that are descendants of this node. If this node is a leaf, returns 1. This method is O(n) where n is the number of descendants of this node.
Returns:
the number of leaves beneath this node
See Also:
isNodeAncestor(javax.swing.tree.TreeNode)

toString

public String toString()
Returns the result of sending toString() to this node's user object, or null if this node has no user object.
Overrides:
toString in class Object
See Also:
getUserObject()

clone

public Object clone()
Overridden to make clone public. Returns a shallow copy of this node; the new node has no parent or children and has a reference to the same user object, if any.
Overrides:
clone in class Object
Returns:
a copy of this node
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTextField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeCellEditor.DefaultTextField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JTextField
                                |
                                +--javax.swing.tree.DefaultTreeCellEditor.DefaultTextField
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable, SwingConstants
Enclosing class:
DefaultTreeCellEditor
public class DefaultTreeCellEditor.DefaultTextField
extends JTextField

TextField used when no editor is supplied. This textfield locks into the border it is constructed with. It also prefers its parents font over its font. And if the renderer is not null and no font has been specified the preferred height is that of the renderer.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTextField
JTextField.AccessibleJTextField
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected  Border border
Border to use.
Fields inherited from class javax.swing.JTextField
notifyAction
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultTreeCellEditor.DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor$DefaultTextField object.
Method Summary
Border | getBorder() Overrides JComponent.getBorder to returns the current border.
Font | getFont() Gets the font of this component.
Dimension | getPreferredSize() Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
Methods inherited from class javax.swing.JTextField
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setFont, setHorizontalAlignment, setScrollOffset
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

border

protected Border border
Border to use.
Constructor Detail

DefaultTreeCellEditor.DefaultTextField

public DefaultTreeCellEditor.DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor$DefaultTextField object.
Parameters:
border - a Border object
Method Detail

getBorder

public Border getBorder()
Overrides JComponent.getBorder to returns the current border.
Overrides:
getBorder in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the border object for this component
See Also:
JComponent.setBorder(javax.swing.border.Border)

getFont

public Font getFont()
Description copied from class: Component
Gets the font of this component.
Overrides:
getFont in class Component
Following copied from class: java.awt.Component
Returns:
This component's font. If a font has not been set for this component, the font of its parent is returned.
See Also:
Component.setFont(java.awt.Font)

getPreferredSize

public Dimension getPreferredSize()
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
Overrides:
getPreferredSize in class JTextField
Following copied from class: javax.swing.JTextField
Returns:
the dimensions
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTreeCellEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeCellEditor

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeCellEditor
All Implemented Interfaces:
ActionListener, CellEditor, EventListener, TreeCellEditor, TreeSelectionListener
public class DefaultTreeCellEditor
extends Object
implements ActionListener, TreeCellEditor, TreeSelectionListener

A TreeCellEditor. You need to supply an instance of DefaultTreeCellRenderer so that the icons can be obtained. You can optionaly supply a TreeCellEditor that will be layed out according to the icon in the DefaultTreeCellRenderer. If you do not supply a TreeCellEditor, a TextField will be used. Editing is started on a triple mouse click, or after a click, pause, click and a delay of 1200 miliseconds.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTree

Inner Class Summary
class | DefaultTreeCellEditor.DefaultTextField TextField used when no editor is supplied.
class | DefaultTreeCellEditor.EditorContainer Container responsible for placing the editingComponent.
Field Summary
protected Color | borderSelectionColor True if the border selection color should be drawn.
protected boolean | canEdit Should isCellEditable return true? This is set in configure...
protected Component | editingComponent Component used in editing, obtained from the editingContainer.
protected Container | editingContainer Editing container, will contain the editorComponent.
protected Icon | editingIcon Icon to use when editing.
protected Font | font Font to paint with, null indicates font of renderer is to be used.
protected TreePath | lastPath last path that was selected.
protected int | lastRow Row that was last passed into getTreeCellEditorComponent.
protected int | offset Used in editing.
protected TreeCellEditor | realEditor Editor handling the editing.
protected DefaultTreeCellRenderer | renderer Renderer, used to get border and offsets from.
protected Timer | timer Used before starting the editing session.
protected JTree | tree JTree instance listening too.
Constructor Summary
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor.
DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor.
Method Summary
void | actionPerformed(ActionEvent e) Messaged when the timer fires, this will start the editing session.
void | addCellEditorListener(CellEditorListener l) Adds the CellEditorListener.
void | cancelCellEditing() Messages cancelCellEditing to the realEditor and removes it from this instance.
protected boolean | canEditImmediately(EventObject event) Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.
protected Container | createContainer() Creates the container to manage placement of editingComponent.
protected TreeCellEditor | createTreeCellEditor() This is invoked if a TreeCellEditor is not supplied in the constructor.
protected void | determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Color | getBorderSelectionColor() Returns the color the border is drawn.
Object | getCellEditorValue() Returns the value currently being edited.
Font | getFont() Gets the font used for editing.
Component | getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Configures the editor.
protected boolean | inHitRegion(int x, int y) Should return true if the passed in location is a valid mouse location to start editing from.
boolean | isCellEditable(EventObject event) If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
protected void | prepareForEditing() Invoked just before editing is to start.
void | removeCellEditorListener(CellEditorListener l) Removes the previously added CellEditorListener l.
void | setBorderSelectionColor(Color newColor) Sets the color to use for the border.
void | setFont(Font font) Sets the font to edit with.
protected void | setTree(JTree newTree) Sets the tree currently editing for.
boolean | shouldSelectCell(EventObject event) Messages the realEditor for the return value.
protected boolean | shouldStartEditingTimer(EventObject event) Returns true if event is a MouseEvent and the click count is 1.
protected void | startEditingTimer() Starts the editing timer.
boolean | stopCellEditing() If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
void | valueChanged(TreeSelectionEvent e) Resets lastPath.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

realEditor

protected TreeCellEditor realEditor
Editor handling the editing.

renderer

protected DefaultTreeCellRenderer renderer
Renderer, used to get border and offsets from.

editingContainer

protected Container editingContainer
Editing container, will contain the editorComponent.

editingComponent

protected transient Component editingComponent
Component used in editing, obtained from the editingContainer.

canEdit

protected boolean canEdit
Should isCellEditable return true? This is set in configure... based on the path being edited and the selected selected path.

offset

protected transient int offset
Used in editing. Indicates x position to place editingComponent.

tree

protected transient JTree tree
JTree instance listening too.

lastPath

protected transient TreePath lastPath
last path that was selected.

timer

protected transient Timer timer
Used before starting the editing session.

lastRow

protected transient int lastRow
Row that was last passed into getTreeCellEditorComponent.

borderSelectionColor

protected Color borderSelectionColor
True if the border selection color should be drawn.

editingIcon

protected transient Icon editingIcon
Icon to use when editing.

font

protected Font font
Font to paint with, null indicates font of renderer is to be used.
Constructor Detail

DefaultTreeCellEditor

public DefaultTreeCellEditor(JTree tree,
                             DefaultTreeCellRenderer renderer)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and a default editor. (Use this constructor for normal editing.)
Parameters:
tree - a JTree object
renderer - a DefaultTreeCellRenderer object

DefaultTreeCellEditor

public DefaultTreeCellEditor(JTree tree,
                             DefaultTreeCellRenderer renderer,
                             TreeCellEditor editor)
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.)
Parameters:
tree - a JTree object
renderer - a DefaultTreeCellRenderer object
editor - a TreeCellEditor object
Method Detail

setBorderSelectionColor

public void setBorderSelectionColor(Color newColor)
Sets the color to use for the border.

getBorderSelectionColor

public Color getBorderSelectionColor()
Returns the color the border is drawn.

setFont

public void setFont(Font font)
Sets the font to edit with. null indicates the renderers font should be used. This will NOT override any font you have set in the editor the receiver was instantied with. If null for an editor was passed in a default editor will be created that will pick up this font.
Parameters:
font - the editing Font
See Also:
getFont()

getFont

public Font getFont()
Gets the font used for editing.
Returns:
the editing Font
See Also:
setFont(java.awt.Font)

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Configures the editor. Passed onto the realEditor.
Specified by:
getTreeCellEditorComponent in interface TreeCellEditor
Following copied from interface: javax.swing.tree.TreeCellEditor
Parameters:
table - the JTree that is asking the editor to edit This parameter can be null.
value - the value of the cell to be edited.
isSelected - true is the cell is to be renderer with selection highlighting
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - the row index of the node being edited
Returns:
the component for editing

getCellEditorValue

public Object getCellEditorValue()
Returns the value currently being edited.
Specified by:
getCellEditorValue in interface CellEditor

isCellEditable

public boolean isCellEditable(EventObject event)
If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
Specified by:
isCellEditable in interface CellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
anEvent - the event the editor should use to consider whether to begin editing or not.
Returns:
true if editing can be started.
See Also:
CellEditor.shouldSelectCell(java.util.EventObject)

shouldSelectCell

public boolean shouldSelectCell(EventObject event)
Messages the realEditor for the return value.
Specified by:
shouldSelectCell in interface CellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
anEvent - the event the editor should use to start editing.
Returns:
true if the editor would like the editing cell to be selected
See Also:
CellEditor.isCellEditable(java.util.EventObject)

stopCellEditing

public boolean stopCellEditing()
If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
Specified by:
stopCellEditing in interface CellEditor
Following copied from interface: javax.swing.CellEditor
Returns:
true if editing was stopped

cancelCellEditing

public void cancelCellEditing()
Messages cancelCellEditing to the realEditor and removes it from this instance.
Specified by:
cancelCellEditing in interface CellEditor

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Adds the CellEditorListener.
Specified by:
addCellEditorListener in interface CellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
l - the CellEditorListener

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Removes the previously added CellEditorListener l.
Specified by:
removeCellEditorListener in interface CellEditor
Following copied from interface: javax.swing.CellEditor
Parameters:
l - the CellEditorListener

valueChanged

public void valueChanged(TreeSelectionEvent e)
Resets lastPath.
Specified by:
valueChanged in interface TreeSelectionListener
Following copied from interface: javax.swing.event.TreeSelectionListener
Parameters:
e - the event that characterizes the change.

actionPerformed

public void actionPerformed(ActionEvent e)
Messaged when the timer fires, this will start the editing session.
Specified by:
actionPerformed in interface ActionListener

setTree

protected void setTree(JTree newTree)
Sets the tree currently editing for. This is needed to add a selection listener.

shouldStartEditingTimer

protected boolean shouldStartEditingTimer(EventObject event)
Returns true if event is a MouseEvent and the click count is 1.

startEditingTimer

protected void startEditingTimer()
Starts the editing timer.

canEditImmediately

protected boolean canEditImmediately(EventObject event)
Returns true if event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.

inHitRegion

protected boolean inHitRegion(int x,
                              int y)
Should return true if the passed in location is a valid mouse location to start editing from. This is implemented to return false if x is <= the="the" width="width" of="of" the="the" icon="icon" and="and" icon="icon" gap="gap" displayed="displayed" by="by" the="the" renderer.="renderer." In="In" other="other" words="words" this="this" returns="returns" true="true" if="if" the="the" user="user" clicks="clicks" over="over" the="the" text="text" part="part" displayed="displayed" by="by" the="the" renderer,="renderer," and="and" false="false" otherwise.

determineOffset

protected void determineOffset(JTree tree,
                               Object value,
                               boolean isSelected,
                               boolean expanded,
                               boolean leaf,
                               int row)

prepareForEditing

protected void prepareForEditing()
Invoked just before editing is to start. Will add the editingComponent to the editingContainer.

createContainer

protected Container createContainer()
Creates the container to manage placement of editingComponent.

createTreeCellEditor

protected TreeCellEditor createTreeCellEditor()
This is invoked if a TreeCellEditor is not supplied in the constructor. It returns a TextField editor.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTreeCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeCellRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.tree.DefaultTreeCellRenderer
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants, TreeCellRenderer
public class DefaultTreeCellRenderer
extends JLabel
implements TreeCellRenderer

Displays an entry in a tree. See How to Use Trees in The Java Tutorial for examples of customizing node display using this class.

Implementation Note: This class overrides validate, revalidate, repaint, and firePropertyChange solely to improve performance. If not overridden, these frequently called methods would execute code paths that are unnecessary for the default tree cell renderer. If you write your own renderer, take care to weigh the benefits and drawbacks of overriding these methods.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Field Summary
protected Color | backgroundNonSelectionColor Color to use for the background when the node isn't selected.
protected Color | backgroundSelectionColor Color to use for the background when a node is selected.
protected Color | borderSelectionColor Color to use for the background when the node isn't selected.
protected Icon | closedIcon Icon used to show non-leaf nodes that aren't expanded.
protected boolean | hasFocus True if has focus.
protected Icon | leafIcon Icon used to show leaf nodes.
protected Icon | openIcon Icon used to show non-leaf nodes that are expanded.
protected boolean | selected Is the value currently selected.
protected Color | textNonSelectionColor Color to use for the foreground for non-selected nodes.
protected Color | textSelectionColor Color to use for the foreground for selected nodes.
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultTreeCellRenderer()
Returns a new instance of DefaultTreeCellRenderer.
Method Summary
void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, byte oldValue, byte newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, char oldValue, char newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, double oldValue, double newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, float oldValue, float newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, int oldValue, int newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, long oldValue, long newValue) Overridden for performance reasons.
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Overridden for performance reasons.
void | firePropertyChange(String propertyName, short oldValue, short newValue) Overridden for performance reasons.
Color | getBackgroundNonSelectionColor() Returns the background color to be used for non selected nodes.
Color | getBackgroundSelectionColor() Returns the color to use for the background if node is selected.
Color | getBorderSelectionColor() Returns the color the border is drawn.
Icon | getClosedIcon() Returns the icon used to represent non-leaf nodes that are not expanded.
Icon | getDefaultClosedIcon() Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.
Icon | getDefaultLeafIcon() Returns the default icon, for the current laf, that is used to represent leaf nodes.
Icon | getDefaultOpenIcon() Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.
Icon | getLeafIcon() Returns the icon used to represent leaf nodes.
Icon | getOpenIcon() Returns the icon used to represent non-leaf nodes that are expanded.
Dimension | getPreferredSize() Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
Color | getTextNonSelectionColor() Returns the color the text is drawn with when the node isn't selected.
Color | getTextSelectionColor() Returns the color the text is drawn with when the node is selected.
Component | getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) Configures the renderer based on the passed in components.
void | paint(Graphics g) Paints the value.
void | repaint(long tm, int x, int y, int width, int height) Overridden for performance reasons.
void | repaint(Rectangle r) Overridden for performance reasons.
void | revalidate() Overridden for performance reasons.
void | setBackground(Color color) Subclassed to map ColorUIResources to null.
void | setBackgroundNonSelectionColor(Color newColor) Sets the background color to be used for non selected nodes.
void | setBackgroundSelectionColor(Color newColor) Sets the color to use for the background if node is selected.
void | setBorderSelectionColor(Color newColor) Sets the color to use for the border.
void | setClosedIcon(Icon newIcon) Sets the icon used to represent non-leaf nodes that are not expanded.
void | setFont(Font font) Subclassed to map FontUIResources to null.
void | setLeafIcon(Icon newIcon) Sets the icon used to represent leaf nodes.
void | setOpenIcon(Icon newIcon) Sets the icon used to represent non-leaf nodes that are expanded.
void | setTextNonSelectionColor(Color newColor) Sets the color the text is drawn with when the node isn't selected.
void | setTextSelectionColor(Color newColor) Sets the color the text is drawn with when the node is selected.
void | validate() Overridden for performance reasons.
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

selected

protected boolean selected
Is the value currently selected.

hasFocus

protected boolean hasFocus
True if has focus.

closedIcon

protected transient Icon closedIcon
Icon used to show non-leaf nodes that aren't expanded.

leafIcon

protected transient Icon leafIcon
Icon used to show leaf nodes.

openIcon

protected transient Icon openIcon
Icon used to show non-leaf nodes that are expanded.

textSelectionColor

protected Color textSelectionColor
Color to use for the foreground for selected nodes.

textNonSelectionColor

protected Color textNonSelectionColor
Color to use for the foreground for non-selected nodes.

backgroundSelectionColor

protected Color backgroundSelectionColor
Color to use for the background when a node is selected.

backgroundNonSelectionColor

protected Color backgroundNonSelectionColor
Color to use for the background when the node isn't selected.

borderSelectionColor

protected Color borderSelectionColor
Color to use for the background when the node isn't selected.
Constructor Detail

DefaultTreeCellRenderer

public DefaultTreeCellRenderer()
Returns a new instance of DefaultTreeCellRenderer. Alignment is set to left aligned. Icons and text color are determined from the UIManager.
Method Detail

getDefaultOpenIcon

public Icon getDefaultOpenIcon()
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.

getDefaultClosedIcon

public Icon getDefaultClosedIcon()
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.

getDefaultLeafIcon

public Icon getDefaultLeafIcon()
Returns the default icon, for the current laf, that is used to represent leaf nodes.

setOpenIcon

public void setOpenIcon(Icon newIcon)
Sets the icon used to represent non-leaf nodes that are expanded.

getOpenIcon

public Icon getOpenIcon()
Returns the icon used to represent non-leaf nodes that are expanded.

setClosedIcon

public void setClosedIcon(Icon newIcon)
Sets the icon used to represent non-leaf nodes that are not expanded.

getClosedIcon

public Icon getClosedIcon()
Returns the icon used to represent non-leaf nodes that are not expanded.

setLeafIcon

public void setLeafIcon(Icon newIcon)
Sets the icon used to represent leaf nodes.

getLeafIcon

public Icon getLeafIcon()
Returns the icon used to represent leaf nodes.

setTextSelectionColor

public void setTextSelectionColor(Color newColor)
Sets the color the text is drawn with when the node is selected.

getTextSelectionColor

public Color getTextSelectionColor()
Returns the color the text is drawn with when the node is selected.

setTextNonSelectionColor

public void setTextNonSelectionColor(Color newColor)
Sets the color the text is drawn with when the node isn't selected.

getTextNonSelectionColor

public Color getTextNonSelectionColor()
Returns the color the text is drawn with when the node isn't selected.

setBackgroundSelectionColor

public void setBackgroundSelectionColor(Color newColor)
Sets the color to use for the background if node is selected.

getBackgroundSelectionColor

public Color getBackgroundSelectionColor()
Returns the color to use for the background if node is selected.

setBackgroundNonSelectionColor

public void setBackgroundNonSelectionColor(Color newColor)
Sets the background color to be used for non selected nodes.

getBackgroundNonSelectionColor

public Color getBackgroundNonSelectionColor()
Returns the background color to be used for non selected nodes.

setBorderSelectionColor

public void setBorderSelectionColor(Color newColor)
Sets the color to use for the border.

getBorderSelectionColor

public Color getBorderSelectionColor()
Returns the color the border is drawn.

setFont

public void setFont(Font font)
Subclassed to map FontUIResources to null. If font is null, or a FontUIResource, this has the effect of letting the font of the JTree show through. On the other hand, if font is non-null, and not a FontUIResource, the font becomes font.
Overrides:
setFont in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.getFont()

setBackground

public void setBackground(Color color)
Subclassed to map ColorUIResources to null. If color is null, or a ColorUIResource, this has the effect of letting the background color of the JTree show through. On the other hand, if color is non-null, and not a ColorUIResource, the background becomes color.
Overrides:
setBackground in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.getBackground()

getTreeCellRendererComponent

public Component getTreeCellRendererComponent(JTree tree,
                                              Object value,
                                              boolean sel,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus)
Configures the renderer based on the passed in components. The value is set from messaging the tree with convertValueToText, which ultimately invokes toString on value. The foreground color is set based on the selection and the icon is set based on on leaf and expanded.
Specified by:
getTreeCellRendererComponent in interface TreeCellRenderer
Following copied from interface: javax.swing.tree.TreeCellRenderer
Returns:
Component that the renderer uses to draw the value.

paint

public void paint(Graphics g)
Paints the value. The background is filled based on selected.
Overrides:
paint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics),
JComponent.paintBorder(java.awt.Graphics),
JComponent.paintChildren(java.awt.Graphics),
JComponent.getComponentGraphics(java.awt.Graphics),
JComponent.repaint(long, int, int, int, int)

getPreferredSize

public Dimension getPreferredSize()
Overrides JComponent.getPreferredSize to return slightly wider preferred size value.
Overrides:
getPreferredSize in class JComponent
Following copied from class: javax.swing.JComponent
Returns:
the value of the preferredSize property
See Also:
JComponent.setPreferredSize(java.awt.Dimension)

validate

public void validate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
validate in class Container
Following copied from class: java.awt.Container
See Also:
Container.validate(), Component.invalidate()

revalidate

public void revalidate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
revalidate in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.invalidate(),
Container.validate(),
JComponent.isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

repaint

public void repaint(Rectangle r)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
Component.isShowing(), RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(String propertyName,
                               byte oldValue,
                               byte newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               char oldValue,
                               char newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               short oldValue,
                               short newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               int oldValue,
                               int newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               long oldValue,
                               long newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               float oldValue,
                               float newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               double oldValue,
                               double newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

firePropertyChange

public void firePropertyChange(String propertyName,
                               boolean oldValue,
                               boolean newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTreeModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeModel

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeModel
All Implemented Interfaces:
Serializable, TreeModel
public class DefaultTreeModel
extends Object
implements Serializable, TreeModel

A simple tree data model that uses TreeNodes. For further information and examples that use DefaultTreeModel, see How to Use Trees in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Field Summary
protected boolean | asksAllowsChildren Determines how the isLeaf method figures out if a node is a leaf node.
protected EventListenerList | listenerList Listeners.
protected TreeNode | root Root of the tree.
Constructor Summary
DefaultTreeModel(TreeNode root)
Creates a tree in which any node can have children.
DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.
Method Summary
void | addTreeModelListener(TreeModelListener l) Adds a listener for the TreeModelEvent posted after the tree changes.
boolean | asksAllowsChildren() Tells how leaf nodes are determined.
protected void | fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
protected void | fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
Object | getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
int | getChildCount(Object parent) Returns the number of children of parent.
int | getIndexOfChild(Object parent, Object child) Returns the index of child in parent.
EventListener[] | getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model.
TreeNode[] | getPathToRoot(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
protected TreeNode[] | getPathToRoot(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
Object | getRoot() Returns the root of the tree.
void | insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index) Invoked this to insert newChild at location index in parents children.
boolean | isLeaf(Object node) Returns whether the specified node is a leaf node.
void | nodeChanged(TreeNode node) Invoke this method after you've changed how node is to be represented in the tree.
void | nodesChanged(TreeNode node, int[] childIndices) Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
void | nodeStructureChanged(TreeNode node) Invoke this method if you've totally changed the children of node and its childrens children...
void | nodesWereInserted(TreeNode node, int[] childIndices) Invoke this method after you've inserted some TreeNodes into node.
void | nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren) Invoke this method after you've removed some TreeNodes from node.
void | reload() Invoke this method if you've modified the TreeNodes upon which this model depends.
void | reload(TreeNode node) Invoke this method if you've modified the TreeNodes upon which this model depends.
void | removeNodeFromParent(MutableTreeNode node) Message this to remove node from its parent.
void | removeTreeModelListener(TreeModelListener l) Removes a listener previously added with addTreeModelListener().
void | setAsksAllowsChildren(boolean newValue) Sets whether or not to test leafness by asking getAllowsChildren() or isLeaf() to the TreeNodes.
void | setRoot(TreeNode root) Sets the root to root.
void | valueForPathChanged(TreePath path, Object newValue) This sets the user object of the TreeNode identified by path and posts a node changed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

root

protected TreeNode root
Root of the tree.

listenerList

protected EventListenerList listenerList
Listeners.

asksAllowsChildren

protected boolean asksAllowsChildren
Determines how the isLeaf method figures out if a node is a leaf node. If true, a node is a leaf node if it does not allow children. (If it allows children, it is not a leaf node, even if no children are present.) That lets you distinguish between folder nodes and file nodes in a file system, for example.

If this value is false, then any node which has no children is a leaf node, and any node may acquire children.

See Also:
TreeNode.getAllowsChildren(),
TreeModel.isLeaf(java.lang.Object),
setAsksAllowsChildren(boolean)
Constructor Detail

DefaultTreeModel

public DefaultTreeModel(TreeNode root)
Creates a tree in which any node can have children.
Parameters:
root - a TreeNode object that is the root of the tree
See Also:
DefaultTreeModel(TreeNode, boolean)

DefaultTreeModel

public DefaultTreeModel(TreeNode root,
                        boolean asksAllowsChildren)
Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.
Parameters:
root - a TreeNode object that is the root of the tree
askAllowsChildren - a boolean, false if any node can have children, true if each node is asked to see if it can have children
See Also:
asksAllowsChildren
Method Detail

setAsksAllowsChildren

public void setAsksAllowsChildren(boolean newValue)
Sets whether or not to test leafness by asking getAllowsChildren() or isLeaf() to the TreeNodes. If newvalue is true, getAllowsChildren() is messaged, otherwise isLeaf() is messaged.

asksAllowsChildren

public boolean asksAllowsChildren()
Tells how leaf nodes are determined.
Returns:
true if only nodes which do not allow children are leaf nodes, false if nodes which have no children (even if allowed) are leaf nodes
See Also:
asksAllowsChildren

setRoot

public void setRoot(TreeNode root)
Sets the root to root. This will throw an IllegalArgumentException if root is null.

getRoot

public Object getRoot()
Returns the root of the tree. Returns null only if the tree has no nodes.
Specified by:
getRoot in interface TreeModel
Returns:
the root of the tree

getIndexOfChild

public int getIndexOfChild(Object parent,
                           Object child)
Returns the index of child in parent.
Specified by:
getIndexOfChild in interface TreeModel

getChild

public Object getChild(Object parent,
                       int index)
Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index parent)).
Specified by:
getChild in interface TreeModel
Parameters:
parent - a node in the tree, obtained from this data source
Returns:
the child of parent at index index

getChildCount

public int getChildCount(Object parent)
Returns the number of children of parent. Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
Specified by:
getChildCount in interface TreeModel
Parameters:
parent - a node in the tree, obtained from this data source
Returns:
the number of children of the node parent

isLeaf

public boolean isLeaf(Object node)
Returns whether the specified node is a leaf node. The way the test is performed depends on the askAllowsChildren setting.
Specified by:
isLeaf in interface TreeModel
Parameters:
node - the node to check
Returns:
true if the node is a leaf node
See Also:
asksAllowsChildren, TreeModel.isLeaf(java.lang.Object)

reload

public void reload()
Invoke this method if you've modified the TreeNodes upon which this model depends. The model will notify all of its listeners that the model has changed.

valueForPathChanged

public void valueForPathChanged(TreePath path,
                                Object newValue)
This sets the user object of the TreeNode identified by path and posts a node changed. If you use custom user objects in the TreeModel you're going to need to subclass this and set the user object of the changed node to something meaningful.
Specified by:
valueForPathChanged in interface TreeModel
Following copied from interface: javax.swing.tree.TreeModel
Parameters:
path - path to the node that the user has altered.
newValue - the new value from the TreeCellEditor.

insertNodeInto

public void insertNodeInto(MutableTreeNode newChild,
                           MutableTreeNode parent,
                           int index)
Invoked this to insert newChild at location index in parents children. This will then message nodesWereInserted to create the appropriate event. This is the preferred way to add children as it will create the appropriate event.

removeNodeFromParent

public void removeNodeFromParent(MutableTreeNode node)
Message this to remove node from its parent. This will message nodesWereRemoved to create the appropriate event. This is the preferred way to remove a node as it handles the event creation for you.

nodeChanged

public void nodeChanged(TreeNode node)
Invoke this method after you've changed how node is to be represented in the tree.

reload

public void reload(TreeNode node)
Invoke this method if you've modified the TreeNodes upon which this model depends. The model will notify all of its listeners that the model has changed below the node node (PENDING).

nodesWereInserted

public void nodesWereInserted(TreeNode node,
                              int[] childIndices)
Invoke this method after you've inserted some TreeNodes into node. childIndices should be the index of the new elements and must be sorted in ascending order.

nodesWereRemoved

public void nodesWereRemoved(TreeNode node,
                             int[] childIndices,
                             Object[] removedChildren)
Invoke this method after you've removed some TreeNodes from node. childIndices should be the index of the removed elements and must be sorted in ascending order. And removedChildren should be the array of the children objects that were removed.

nodesChanged

public void nodesChanged(TreeNode node,
                         int[] childIndices)
Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.

nodeStructureChanged

public void nodeStructureChanged(TreeNode node)
Invoke this method if you've totally changed the children of node and its childrens children... This will post a treeStructureChanged event.

getPathToRoot

public TreeNode[] getPathToRoot(TreeNode aNode)
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
Parameters:
aNode - the TreeNode to get the path for
an - array of TreeNodes giving the path from the root to the specified node.

getPathToRoot

protected TreeNode[] getPathToRoot(TreeNode aNode,
                                   int depth)
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
Parameters:
aNode - the TreeNode to get the path for
depth - an int giving the number of steps already taken towards the root (on recursive calls), used to size the returned array
Returns:
an array of TreeNodes giving the path from the root to the specified node

addTreeModelListener

public void addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
Specified by:
addTreeModelListener in interface TreeModel
Parameters:
l - the listener to add
See Also:
removeTreeModelListener(javax.swing.event.TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
Specified by:
removeTreeModelListener in interface TreeModel
Parameters:
l - the listener to remove
See Also:
addTreeModelListener(javax.swing.event.TreeModelListener)

fireTreeNodesChanged

protected void fireTreeNodesChanged(Object source,
                                    Object[] path,
                                    int[] childIndices,
                                    Object[] children)

fireTreeNodesInserted

protected void fireTreeNodesInserted(Object source,
                                     Object[] path,
                                     int[] childIndices,
                                     Object[] children)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(Object source,
                                    Object[] path,
                                    int[] childIndices,
                                    Object[] children)

fireTreeStructureChanged

protected void fireTreeStructureChanged(Object source,
                                        Object[] path,
                                        int[] childIndices,
                                        Object[] children)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model.
Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultTreeSelectionModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeSelectionModel

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeSelectionModel
All Implemented Interfaces:
Cloneable, Serializable, TreeSelectionModel
Direct Known Subclasses:
JTree.EmptySelectionModel
public class DefaultTreeSelectionModel
extends Object
implements Cloneable, Serializable, TreeSelectionModel

Default implementation of TreeSelectionModel. Listeners are notified whenever the paths in the selection change, not the rows. In order to be able to track row changes you may wish to become a listener for expansion events on the tree and test for changes from there.

resetRowSelection is called from any of the methods that update the selected paths. If you subclass any of these methods to filter what is allowed to be selected, be sure and message resetRowSelection if you do not message super.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
JTree, Serialized Form

Field Summary
protected SwingPropertyChangeSupport | changeSupport Used to messaged registered listeners.
protected int | leadIndex Index of the lead path in selection.
protected TreePath | leadPath Last path that was added.
protected int | leadRow Lead row.
protected EventListenerList | listenerList Event listener list.
protected DefaultListSelectionModel | listSelectionModel Handles maintaining the list selection model.
protected RowMapper | rowMapper Provides a row for a given path.
protected TreePath[] | selection Paths that are currently selected.
static String | SELECTION_MODE_PROPERTY Property name for selectionMode.
protected int | selectionMode Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
Constructor Summary
DefaultTreeSelectionModel()
Creates a new instance of DefaultTreeSelectionModel that is empty, with a selection mode of DISCONTIGUOUS_TREE_SELECTION.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | addSelectionPath(TreePath path) Adds path to the current selection.
void | addSelectionPaths(TreePath[] paths) Adds paths to the current selection.
void | addTreeSelectionListener(TreeSelectionListener x) Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
protected boolean | arePathsContiguous(TreePath[] paths) Returns true if the paths are contiguous, or this object has no RowMapper.
protected boolean | canPathsBeAdded(TreePath[] paths) Used to test if a particular set of TreePaths can be added.
protected boolean | canPathsBeRemoved(TreePath[] paths) Returns true if the paths can be removed without breaking the continuity of the model.
void | clearSelection() Empties the current selection.
Object | clone() Returns a clone of this object with the same selection.
protected void | fireValueChanged(TreeSelectionEvent e) Notifies all listeners that are registered for tree selection events on this object.
TreePath | getLeadSelectionPath() Returns the last path that was added.
int | getLeadSelectionRow() Returns the lead selection index.
EventListener[] | getListeners(Class listenerType) Returns an array of all the listeners of the given type that were added to this model.
int | getMaxSelectionRow() Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
int | getMinSelectionRow() Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
RowMapper | getRowMapper() Returns the RowMapper instance that is able to map a TreePath to a row.
int | getSelectionCount() Returns the number of paths that are selected.
int | getSelectionMode() Returns the selection mode, one of SINGLE_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION or CONTIGUOUS_TREE_SELECTION.
TreePath | getSelectionPath() Returns the first path in the selection.
TreePath[] | getSelectionPaths() Returns the paths in the selection.
int[] | getSelectionRows() Returns all of the currently selected rows.
protected void | insureRowContinuity() Makes sure the currently selected TreePaths are valid for the current selection mode.
protected void | insureUniqueness() This method is obsolete and its implementation is now a noop.
boolean | isPathSelected(TreePath path) Returns true if the path, path, is in the current selection.
boolean | isRowSelected(int row) Returns true if the row identitifed by row is selected.
boolean | isSelectionEmpty() Returns true if the selection is currently empty.
protected void | notifyPathChange(Vector changedPaths, TreePath oldLeadSelection) Notifies listeners of a change in path.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | removeSelectionPath(TreePath path) Removes path from the selection.
void | removeSelectionPaths(TreePath[] paths) Removes paths from the selection.
void | removeTreeSelectionListener(TreeSelectionListener x) Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
void | resetRowSelection() Updates this object's mapping from TreePath to rows.
void | setRowMapper(RowMapper newMapper) Sets the RowMapper instance.
void | setSelectionMode(int mode) Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
void | setSelectionPath(TreePath path) Sets the selection to path.
void | setSelectionPaths(TreePath[] pPaths) Sets the selection to the paths in paths.
String | toString() Returns a string that displays and identifies this object's properties.
protected void | updateLeadIndex() Updates the leadIndex instance variable.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SELECTION_MODE_PROPERTY

public static final String SELECTION_MODE_PROPERTY
Property name for selectionMode.

changeSupport

protected SwingPropertyChangeSupport changeSupport
Used to messaged registered listeners.

selection

protected TreePath[] selection
Paths that are currently selected. Will be null if nothing is currently selected.

listenerList

protected EventListenerList listenerList
Event listener list.

rowMapper

protected transient RowMapper rowMapper
Provides a row for a given path.

listSelectionModel

protected DefaultListSelectionModel listSelectionModel
Handles maintaining the list selection model. The RowMapper is used to map from a TreePath to a row, and the value is then placed here.

selectionMode

protected int selectionMode
Mode for the selection, will be either SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

leadPath

protected TreePath leadPath
Last path that was added.

leadIndex

protected int leadIndex
Index of the lead path in selection.

leadRow

protected int leadRow
Lead row.
Constructor Detail

DefaultTreeSelectionModel

public DefaultTreeSelectionModel()
Creates a new instance of DefaultTreeSelectionModel that is empty, with a selection mode of DISCONTIGUOUS_TREE_SELECTION.
Method Detail

setRowMapper

public void setRowMapper(RowMapper newMapper)
Sets the RowMapper instance. This instance is used to determine the row for a particular TreePath.
Specified by:
setRowMapper in interface TreeSelectionModel

getRowMapper

public RowMapper getRowMapper()
Returns the RowMapper instance that is able to map a TreePath to a row.
Specified by:
getRowMapper in interface TreeSelectionModel

setSelectionMode

public void setSelectionMode(int mode)
Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION. If mode is not one of the defined value, DISCONTIGUOUS_TREE_SELECTION is assumed.

This may change the selection if the current selection is not valid for the new mode. For example, if three TreePaths are selected when the mode is changed to SINGLE_TREE_SELECTION, only one TreePath will remain selected. It is up to the particular implementation to decide what TreePath remains selected.

Setting the mode to something other than the defined types will result in the mode becoming DISCONTIGUOUS_TREE_SELECTION.

Specified by:
setSelectionMode in interface TreeSelectionModel

getSelectionMode

public int getSelectionMode()
Returns the selection mode, one of SINGLE_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION or CONTIGUOUS_TREE_SELECTION.
Specified by:
getSelectionMode in interface TreeSelectionModel

setSelectionPath

public void setSelectionPath(TreePath path)
Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If path is null, this has the same effect as invoking clearSelection.
Specified by:
setSelectionPath in interface TreeSelectionModel
Parameters:
path - new path to select

setSelectionPaths

public void setSelectionPaths(TreePath[] pPaths)
Sets the selection to the paths in paths. If this represents a change the TreeSelectionListeners are notified. Potentially paths will be held by this object; in other words don't change any of the objects in the array once passed in.

If paths is null, this has the same effect as invoking clearSelection.

The lead path is set to the last path in pPaths.

If the selection mode is CONTIGUOUS_TREE_SELECTION, and adding the new paths would make the selection discontiguous, the selection is reset to the first TreePath in paths.

Specified by:
setSelectionPaths in interface TreeSelectionModel
Parameters:
paths - new selection

addSelectionPath

public void addSelectionPath(TreePath path)
Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified. This has no effect if path is null.
Specified by:
addSelectionPath in interface TreeSelectionModel
Parameters:
path - the new path to add to the current selection

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
Adds paths to the current selection. If any of the paths in paths are not currently in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.

The lead path is set to the last element in paths.

If the selection mode is CONTIGUOUS_TREE_SELECTION, and adding the new paths would make the selection discontiguous. Then two things can result: if the TreePaths in paths are contiguous, then the selection becomes these TreePaths, otherwise the TreePaths aren't contiguous and the selection becomes the first TreePath in paths.

Specified by:
addSelectionPaths in interface TreeSelectionModel
Parameters:
path - the new path to add to the current selection

removeSelectionPath

public void removeSelectionPath(TreePath path)
Removes path from the selection. If path is in the selection The TreeSelectionListeners are notified. This has no effect if path is null.
Specified by:
removeSelectionPath in interface TreeSelectionModel
Parameters:
path - the path to remove from the selection

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
Removes paths from the selection. If any of the paths in paths are in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.
Specified by:
removeSelectionPaths in interface TreeSelectionModel
Parameters:
path - the path to remove from the selection

getSelectionPath

public TreePath getSelectionPath()
Returns the first path in the selection. This is useful if there if only one item currently selected.
Specified by:
getSelectionPath in interface TreeSelectionModel

getSelectionPaths

public TreePath[] getSelectionPaths()
Returns the paths in the selection. This will return null (or an empty array) if nothing is currently selected.
Specified by:
getSelectionPaths in interface TreeSelectionModel

getSelectionCount

public int getSelectionCount()
Returns the number of paths that are selected.
Specified by:
getSelectionCount in interface TreeSelectionModel

isPathSelected

public boolean isPathSelected(TreePath path)
Returns true if the path, path, is in the current selection.
Specified by:
isPathSelected in interface TreeSelectionModel

isSelectionEmpty

public boolean isSelectionEmpty()
Returns true if the selection is currently empty.
Specified by:
isSelectionEmpty in interface TreeSelectionModel

clearSelection

public void clearSelection()
Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.
Specified by:
clearSelection in interface TreeSelectionModel

addTreeSelectionListener

public void addTreeSelectionListener(TreeSelectionListener x)
Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
Specified by:
addTreeSelectionListener in interface TreeSelectionModel
Parameters:
x - the new listener to be added

removeTreeSelectionListener

public void removeTreeSelectionListener(TreeSelectionListener x)
Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
Specified by:
removeTreeSelectionListener in interface TreeSelectionModel
Parameters:
x - the listener to remove

fireValueChanged

protected void fireValueChanged(TreeSelectionEvent e)
Notifies all listeners that are registered for tree selection events on this object.
See Also:
addTreeSelectionListener, EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.
Returns:
all of the objects receiving listenerType notifications from this model
Since:
1.3

getSelectionRows

public int[] getSelectionRows()
Returns all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set. This may return an array of length less that than of the selected TreePaths if some of the rows are not visible (that is the RowMapper returned -1 for the row corresponding to the TreePath).
Specified by:
getSelectionRows in interface TreeSelectionModel

getMinSelectionRow

public int getMinSelectionRow()
Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.
Specified by:
getMinSelectionRow in interface TreeSelectionModel

getMaxSelectionRow

public int getMaxSelectionRow()
Returns the largest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.
Specified by:
getMaxSelectionRow in interface TreeSelectionModel

isRowSelected

public boolean isRowSelected(int row)
Returns true if the row identitifed by row is selected.
Specified by:
isRowSelected in interface TreeSelectionModel

resetRowSelection

public void resetRowSelection()
Updates this object's mapping from TreePath to rows. This should be invoked when the mapping from TreePaths to integers has changed (for example, a node has been expanded).

You do not normally have to call this, JTree and its associated Listeners will invoke this for you. If you are implementing your own View class, then you will have to invoke this.

This will invoke insureRowContinuity to make sure the currently selected TreePaths are still valid based on the selection mode.

Specified by:
resetRowSelection in interface TreeSelectionModel

getLeadSelectionRow

public int getLeadSelectionRow()
Returns the lead selection index. That is the last index that was added.
Specified by:
getLeadSelectionRow in interface TreeSelectionModel

getLeadSelectionPath

public TreePath getLeadSelectionPath()
Returns the last path that was added. This may differ from the leadSelectionPath property maintained by the JTree.
Specified by:
getLeadSelectionPath in interface TreeSelectionModel

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired when the selection mode changes.

Specified by:
addPropertyChangeListener in interface TreeSelectionModel
Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Specified by:
removePropertyChangeListener in interface TreeSelectionModel
Parameters:
listener - the PropertyChangeListener to be removed

insureRowContinuity

protected void insureRowContinuity()
Makes sure the currently selected TreePaths are valid for the current selection mode. If the selection mode is CONTIGUOUS_TREE_SELECTION and a RowMapper exists, this will make sure all the rows are contiguous. If the selection isn't contiguous, the selection is reset to contain the first set of contiguous paths.

If the selection mode is SINGLE_TREE_SELECTION and more than one TreePath is selected, the selection is reset to contain the first path currently selected.

arePathsContiguous

protected boolean arePathsContiguous(TreePath[] paths)
Returns true if the paths are contiguous, or this object has no RowMapper.

canPathsBeAdded

protected boolean canPathsBeAdded(TreePath[] paths)
Used to test if a particular set of TreePaths can be added. This will return true if paths is null (or empty), or this object has no RowMapper, or nothing is currently selected, or the selection mode is DISCONTIGUOUS_TREE_SELECTION, or adding the paths to the current selection still results in a contiguous set of TreePaths.

canPathsBeRemoved

protected boolean canPathsBeRemoved(TreePath[] paths)
Returns true if the paths can be removed without breaking the continuity of the model. This is rather expensive.

notifyPathChange

protected void notifyPathChange(Vector changedPaths,
                                TreePath oldLeadSelection)
Notifies listeners of a change in path. changePaths should contain instances of PathPlaceHolder.

updateLeadIndex

protected void updateLeadIndex()
Updates the leadIndex instance variable.

insureUniqueness

protected void insureUniqueness()
This method is obsolete and its implementation is now a noop. It's still called by setSelectionPaths and addSelectionPaths, but only for backwards compatability.

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone of this object with the same selection. This method does not duplicate selection listeners and property listeners.
Overrides:
clone in class Object
Throws:
CloneNotSupportedException - never thrown by instances of this class
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EditorContainer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class DefaultTreeCellEditor.EditorContainer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.tree.DefaultTreeCellEditor.EditorContainer
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Enclosing class:
DefaultTreeCellEditor
public class DefaultTreeCellEditor.EditorContainer
extends Container

Container responsible for placing the editingComponent.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultTreeCellEditor.EditorContainer()
Constructs an EditorContainer object.
Method Summary
void | doLayout() Lays out this Container.
void | EditorContainer()
Dimension | getPreferredSize() Returns the preferred size for the Container.
void | paint(Graphics g) Overrides Container.paint to paint the node's icon and use the selection color for the background.
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultTreeCellEditor.EditorContainer

public DefaultTreeCellEditor.EditorContainer()
Constructs an EditorContainer object.
Method Detail

EditorContainer

public void EditorContainer()

paint

public void paint(Graphics g)
Overrides Container.paint to paint the node's icon and use the selection color for the background.
Overrides:
paint in class Container
Following copied from class: java.awt.Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(java.awt.Graphics)

doLayout

public void doLayout()
Lays out this Container. If editing, the editor will be placed at offset in the x direction and 0 for y.
Overrides:
doLayout in class Container
Following copied from class: java.awt.Container
See Also:
LayoutManager.layoutContainer(java.awt.Container),
Container.setLayout(java.awt.LayoutManager),
Container.validate()

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size for the Container. This will be the preferred size of the editor offset by offset.
Overrides:
getPreferredSize in class Container
Following copied from class: java.awt.Container
Returns:
an instance of Dimension that represents the preferred size of this container.
See Also:
Container.getMinimumSize(),
Container.getLayout(),
LayoutManager.preferredLayoutSize(java.awt.Container),
Component.getPreferredSize()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ExpandVetoException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class ExpandVetoException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.swing.tree.ExpandVetoException
All Implemented Interfaces:
Serializable
public class ExpandVetoException
extends Exception

Exception used to stop and expand/collapse from happening. See How to Write a Tree-Will-Expand Listener in The Java Tutorial for further information and examples.

See Also:
Serialized Form

Field Summary
protected  TreeExpansionEvent event
The event that the exception was created for.
Constructor Summary
ExpandVetoException(TreeExpansionEvent event)
Constructs an ExpandVetoException object with no message.
ExpandVetoException(TreeExpansionEvent event, String message)
Constructs an ExpandVetoException object with the specified message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

event

protected TreeExpansionEvent event
The event that the exception was created for.
Constructor Detail

ExpandVetoException

public ExpandVetoException(TreeExpansionEvent event)
Constructs an ExpandVetoException object with no message.
Parameters:
event - a TreeExpansionEvent object

ExpandVetoException

public ExpandVetoException(TreeExpansionEvent event,
                           String message)
Constructs an ExpandVetoException object with the specified message.
Parameters:
event - a TreeExpansionEvent object
message - a String containing the message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FixedHeightLayoutCache

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class FixedHeightLayoutCache

java.lang.Object
  |
  +--javax.swing.tree.AbstractLayoutCache
        |
        +--javax.swing.tree.FixedHeightLayoutCache
All Implemented Interfaces:
RowMapper
public class FixedHeightLayoutCache
extends AbstractLayoutCache

NOTE: This will become more open in a future release.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.tree.AbstractLayoutCache
AbstractLayoutCache.NodeDimensions
Fields inherited from class javax.swing.tree.AbstractLayoutCache
nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel
Constructor Summary
FixedHeightLayoutCache()
Method Summary
Rectangle | getBounds(TreePath path, Rectangle placeIn) Returns a rectangle giving the bounds needed to draw path.
boolean | getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
TreePath | getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | getPathForRow(int row) Returns the path for passed in row.
int | getRowCount() Returns the number of visible rows.
int | getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
int | getVisibleChildCount(TreePath path) Returns the number of visible children for row.
Enumeration | getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
void | invalidatePathBounds(TreePath path) Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
void | invalidateSizes() Informs the TreeState that it needs to recalculate all the sizes it is referencing.
boolean | isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
void | setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
void | setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | setRootVisible(boolean rootVisible) Determines whether or not the root node from the TreeModel is visible.
void | setRowHeight(int rowHeight) Sets the height of each cell.
void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
Methods inherited from class javax.swing.tree.AbstractLayoutCache
getModel, getNodeDimensions, getNodeDimensions, getPreferredHeight, getPreferredWidth, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setNodeDimensions, setSelectionModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FixedHeightLayoutCache

public FixedHeightLayoutCache()
Method Detail

setModel

public void setModel(TreeModel newModel)
Sets the TreeModel that will provide the data.
Overrides:
setModel in class AbstractLayoutCache
Parameters:
newModel - the TreeModel that is to provide the data

setRootVisible

public void setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible.
Overrides:
setRootVisible in class AbstractLayoutCache
Parameters:
rootVisible - true if the root node of the tree is to be displayed
See Also:
AbstractLayoutCache.rootVisible

setRowHeight

public void setRowHeight(int rowHeight)
Sets the height of each cell. If rowHeight is less than or equal to 0 this will throw an IllegalArgumentException.
Overrides:
setRowHeight in class AbstractLayoutCache
Parameters:
rowHeight - the height of each cell, in pixels

getRowCount

public int getRowCount()
Returns the number of visible rows.
Overrides:
getRowCount in class AbstractLayoutCache

invalidatePathBounds

public void invalidatePathBounds(TreePath path)
Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
Overrides:
invalidatePathBounds in class AbstractLayoutCache

invalidateSizes

public void invalidateSizes()
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
Overrides:
invalidateSizes in class AbstractLayoutCache

isExpanded

public boolean isExpanded(TreePath path)
Returns true if the value identified by row is currently expanded.
Overrides:
isExpanded in class AbstractLayoutCache

getBounds

public Rectangle getBounds(TreePath path,
                           Rectangle placeIn)
Returns a rectangle giving the bounds needed to draw path.
Overrides:
getBounds in class AbstractLayoutCache
Parameters:
path - a TreePath specifying a node
placeIn - a Rectangle object giving the available space
Returns:
a Rectangle object specifying the space to be used

getPathForRow

public TreePath getPathForRow(int row)
Returns the path for passed in row. If row is not visible null is returned.
Overrides:
getPathForRow in class AbstractLayoutCache

getRowForPath

public int getRowForPath(TreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
Overrides:
getRowForPath in class AbstractLayoutCache

getPathClosestTo

public TreePath getPathClosestTo(int x,
                                 int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
Overrides:
getPathClosestTo in class AbstractLayoutCache

getVisibleChildCount

public int getVisibleChildCount(TreePath path)
Returns the number of visible children for row.
Overrides:
getVisibleChildCount in class AbstractLayoutCache

getVisiblePathsFrom

public Enumeration getVisiblePathsFrom(TreePath path)
Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed.
Overrides:
getVisiblePathsFrom in class AbstractLayoutCache

setExpandedState

public void setExpandedState(TreePath path,
                             boolean isExpanded)
Marks the path path expanded state to isExpanded.
Overrides:
setExpandedState in class AbstractLayoutCache

getExpandedState

public boolean getExpandedState(TreePath path)
Returns true if the path is expanded, and visible.
Overrides:
getExpandedState in class AbstractLayoutCache

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

e.path() returns the path the parent of the changed node(s).

e.childIndices() returns the index(es) of the changed node(s).

Overrides:
treeNodesChanged in class AbstractLayoutCache

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)

Invoked after nodes have been inserted into the tree.

e.path() returns the parent of the new nodes

e.childIndices() returns the indices of the new nodes in ascending order.

Overrides:
treeNodesInserted in class AbstractLayoutCache

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

e.path() returns the former parent of the deleted nodes.

e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

Overrides:
treeNodesRemoved in class AbstractLayoutCache

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

e.path() holds the path to the node.

e.childIndices() returns null.

Overrides:
treeStructureChanged in class AbstractLayoutCache
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MutableTreeNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface MutableTreeNode

All Superinterfaces:
TreeNode
All Known Implementing Classes:
DefaultMutableTreeNode
public interface MutableTreeNode
extends TreeNode

Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.

See Also:
DefaultMutableTreeNode, JTree

Method Summary
void | insert(MutableTreeNode child, int index) Adds child to the receiver at index.
void | remove(int index) Removes the child at index from the receiver.
void | remove(MutableTreeNode node) Removes node from the receiver.
void | removeFromParent() Removes the receiver from its parent.
void | setParent(MutableTreeNode newParent) Sets the parent of the receiver to newParent.
void | setUserObject(Object object) Resets the user object of the receiver to object.
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf

Method Detail

insert

public void insert(MutableTreeNode child,
                   int index)
Adds child to the receiver at index. child will be messaged with setParent.

remove

public void remove(int index)
Removes the child at index from the receiver.

remove

public void remove(MutableTreeNode node)
Removes node from the receiver. setParent will be messaged on node.

setUserObject

public void setUserObject(Object object)
Resets the user object of the receiver to object.

removeFromParent

public void removeFromParent()
Removes the receiver from its parent.

setParent

public void setParent(MutableTreeNode newParent)
Sets the parent of the receiver to newParent.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NodeDimensions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class AbstractLayoutCache.NodeDimensions

java.lang.Object
  |
  +--javax.swing.tree.AbstractLayoutCache.NodeDimensions
Direct Known Subclasses:
BasicTreeUI.NodeDimensionsHandler
Enclosing class:
AbstractLayoutCache
public abstract static class AbstractLayoutCache.NodeDimensions
extends Object

Used by AbstractLayoutCache to determing the size and x origin of a particular node.

Constructor Summary
AbstractLayoutCache.NodeDimensions()
Method Summary
abstract  Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds)
Returns, by reference in bounds, the size and x origin to place value at.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractLayoutCache.NodeDimensions

public AbstractLayoutCache.NodeDimensions()
Method Detail

getNodeDimensions

public abstract Rectangle getNodeDimensions(Object value,
                                            int row,
                                            int depth,
                                            boolean expanded,
                                            Rectangle bounds)
Returns, by reference in bounds, the size and x origin to place value at. The receiver is responsible for determing the Y location. If bounds is null, a newly created Rectangle should be returned, otherwise the value should be placed in bounds and returned.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RowMapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface RowMapper

All Known Implementing Classes:
AbstractLayoutCache
public interface RowMapper

Defines the requirements for an object that translates paths in the tree into display rows.

Method Summary
 int[] getRowsForPaths(TreePath[] path)
Returns the rows that the TreePath instances in path are being displayed at.

Method Detail

getRowsForPaths

public int[] getRowsForPaths(TreePath[] path)
Returns the rows that the TreePath instances in path are being displayed at. The receiver should return an array of the same length as that passed in, and if one of the TreePaths in path is not valid its entry in the array should be set to -1.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeCellEditor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface TreeCellEditor

All Superinterfaces:
CellEditor
All Known Implementing Classes:
DefaultCellEditor, DefaultTreeCellEditor
public interface TreeCellEditor
extends CellEditor

Adds to CellEditor the extensions necessary to configure an editor in a tree.

See Also:
JTree

Method Summary
 Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Sets an initial value for the editor.
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing

Method Detail

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Parameters:
table - the JTree that is asking the editor to edit This parameter can be null.
value - the value of the cell to be edited.
isSelected - true is the cell is to be renderer with selection highlighting
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - the row index of the node being edited
Returns:
the component for editing
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeCellRenderer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface TreeCellRenderer

All Known Implementing Classes:
DefaultTreeCellRenderer
public interface TreeCellRenderer

Defines the requirements for an object that displays a tree node. See How to Use Trees in The Java Tutorial for an example of implementing a tree cell renderer that displays custom icons.

Method Summary
 Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
Sets the value of the current tree cell to value.

Method Detail

getTreeCellRendererComponent

public Component getTreeCellRendererComponent(JTree tree,
                                              Object value,
                                              boolean selected,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus)
Sets the value of the current tree cell to value. If selected is true, the cell will be drawn as if selected. If expanded is true the node is currently expanded and if leaf is true the node represets a leaf anf if hasFocus is true the node currently has focus. tree is the JTree the receiver is being configured for. Returns the Component that the renderer uses to draw the value.
Returns:
Component that the renderer uses to draw the value.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeModel

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface TreeModel

All Known Implementing Classes:
DefaultTreeModel
public interface TreeModel

The interface that defines a suitable data model for a JTree. For further information on tree models, including an example of a custom implementation, see How to Use Trees in The Java Tutorial.

Method Summary
void | addTreeModelListener(TreeModelListener l) Adds a listener for the TreeModelEvent posted after the tree changes.
Object | getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array.
int | getChildCount(Object parent) Returns the number of children of parent.
int | getIndexOfChild(Object parent, Object child) Returns the index of child in parent.
Object | getRoot() Returns the root of the tree.
boolean | isLeaf(Object node) Returns true if node is a leaf.
void | removeTreeModelListener(TreeModelListener l) Removes a listener previously added with addTreeModelListener().
void | valueForPathChanged(TreePath path, Object newValue) Messaged when the user has altered the value for the item identified by path to newValue.

Method Detail

getRoot

public Object getRoot()
Returns the root of the tree. Returns null only if the tree has no nodes.
Returns:
the root of the tree

getChild

public Object getChild(Object parent,
                       int index)
Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index parent)).
Parameters:
parent - a node in the tree, obtained from this data source
Returns:
the child of parent at index index

getChildCount

public int getChildCount(Object parent)
Returns the number of children of parent. Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
Parameters:
parent - a node in the tree, obtained from this data source
Returns:
the number of children of the node parent

isLeaf

public boolean isLeaf(Object node)
Returns true if node is a leaf. It is possible for this method to return false even if node has no children. A directory in a filesystem, for example, may contain no files; the node representing the directory is not a leaf, but it also has no children.
Parameters:
node - a node in the tree, obtained from this data source
Returns:
true if node is a leaf

valueForPathChanged

public void valueForPathChanged(TreePath path,
                                Object newValue)
Messaged when the user has altered the value for the item identified by path to newValue. If newValue signifies a truly new value the model should post a treeNodesChanged event.
Parameters:
path - path to the node that the user has altered.
newValue - the new value from the TreeCellEditor.

getIndexOfChild

public int getIndexOfChild(Object parent,
                           Object child)
Returns the index of child in parent.

addTreeModelListener

public void addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
Parameters:
l - the listener to add
See Also:
removeTreeModelListener(javax.swing.event.TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
Parameters:
l - the listener to remove
See Also:
addTreeModelListener(javax.swing.event.TreeModelListener)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface TreeNode

All Known Subinterfaces:
MutableTreeNode
All Known Implementing Classes:
AbstractDocument.AbstractElement
public interface TreeNode

Defines the requirements for an object that can be used as a tree node in a JTree.

For further information and examples of using tree nodes, see How to Use Tree Nodes in The Java Tutorial.

Method Summary
Enumeration | children() Returns the children of the reciever as an Enumeration.
boolean | getAllowsChildren() Returns true if the receiver allows children.
TreeNode | getChildAt(int childIndex) Returns the child TreeNode at index childIndex.
int | getChildCount() Returns the number of children TreeNodes the receiver contains.
int | getIndex(TreeNode node) Returns the index of node in the receivers children.
TreeNode | getParent() Returns the parent TreeNode of the receiver.
boolean | isLeaf() Returns true if the receiver is a leaf.

Method Detail

getChildAt

public TreeNode getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.

getChildCount

public int getChildCount()
Returns the number of children TreeNodes the receiver contains.

getParent

public TreeNode getParent()
Returns the parent TreeNode of the receiver.

getIndex

public int getIndex(TreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children.

isLeaf

public boolean isLeaf()
Returns true if the receiver is a leaf.

children

public Enumeration children()
Returns the children of the reciever as an Enumeration.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreePath

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class TreePath

java.lang.Object
  |
  +--javax.swing.tree.TreePath
All Implemented Interfaces:
Serializable
public class TreePath
extends Object
implements Serializable

Represents a path to a node. A TreePath is an array of Objects that are vended from a TreeModel. The elements of the array are ordered such that the root is always the first element (index 0) of the array. TreePath is Serializable, but if any components of the path are not serializable, it will not be written out.

For further information and examples of using tree paths, see How to Use Trees in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
protected | TreePath() Primarily provided for subclasses that represent paths in a different manner.
 | TreePath(Object singlePath) Constructs a TreePath containing only a single element.
 | TreePath(Object[] path) Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model.
protected | TreePath(Object[] path, int length) Constructs a new TreePath with the identified path components of length length.
protected | TreePath(TreePath parent, Object lastElement) Constructs a new TreePath, which is the path identified by parent ending in lastElement.
Method Summary
boolean | equals(Object o) Tests two TreePaths for equality by checking each element of the paths for equality.
Object | getLastPathComponent() Returns the last component of this path.
TreePath | getParentPath() Returns a path containing all the elements of this object, except the last path component.
Object[] | getPath() Returns an ordered array of Objects containing the components of this TreePath.
Object | getPathComponent(int element) Returns the path component at the specified index.
int | getPathCount() Returns the number of elements in the path.
int | hashCode() Returns the hashCode for the object.
boolean | isDescendant(TreePath aTreePath) Returns true if aTreePath is a descendant of this TreePath.
TreePath | pathByAddingChild(Object child) Returns a new path containing all the elements of this object plus child.
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TreePath

public TreePath(Object[] path)
Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model.

The model is free to return an array of any Objects it needs to represent the path. The DefaultTreeModel returns an array of TreeNode objects. The first TreeNode in the path is the root of the tree, the last TreeNode is the node identified by the path.

Parameters:
path - an array of Objects representing the path to a node

TreePath

public TreePath(Object singlePath)
Constructs a TreePath containing only a single element. This is usually used to construct a TreePath for the the root of the TreeModel.

Parameters:
singlePath - an Object representing the path to a node
See Also:
TreePath(Object[])

TreePath

protected TreePath(TreePath parent,
                   Object lastElement)
Constructs a new TreePath, which is the path identified by parent ending in lastElement.

TreePath

protected TreePath(Object[] path,
                   int length)
Constructs a new TreePath with the identified path components of length length.

TreePath

protected TreePath()
Primarily provided for subclasses that represent paths in a different manner. If a subclass uses this constructor, it should also override the getPath, getPathCount, and getPathComponent methods, and possibly the equals method.
Method Detail

getPath

public Object[] getPath()
Returns an ordered array of Objects containing the components of this TreePath. The first element (index 0) is the root.
Returns:
an array of Objects representing the TreePath
See Also:
TreePath(Object[])

getLastPathComponent

public Object getLastPathComponent()
Returns the last component of this path. For a path returned by DefaultTreeModel this will return an instance of TreeNode.
Returns:
the Object at the end of the path
See Also:
TreePath(Object[])

getPathCount

public int getPathCount()
Returns the number of elements in the path.
Returns:
an int giving a count of items the path

getPathComponent

public Object getPathComponent(int element)
Returns the path component at the specified index.
Parameters:
element - an int specifying an element in the path, where 0 is the first element in the path
Returns:
the Object at that index location
Throws:
IllegalArgumentException - if the index is beyond the length of the path
See Also:
TreePath(Object[])

equals

public boolean equals(Object o)
Tests two TreePaths for equality by checking each element of the paths for equality. Two paths are considered equal if they are of the same length, and contain the same elements (.equals).
Overrides:
equals in class Object
Parameters:
o - the Object to compare

hashCode

public int hashCode()
Returns the hashCode for the object. The hash code of a TreePath is defined to be the hash code of the last component in the path.
Overrides:
hashCode in class Object
Returns:
the hashCode for the object

isDescendant

public boolean isDescendant(TreePath aTreePath)
Returns true if aTreePath is a descendant of this TreePath. A TreePath P1 is a descendent of a TreePath P2 if P1 contains all of the components that make up P2's path. For example, if this object has the path [a, b], and aTreePath has the path [a, b, c], then aTreePath is a descendant of this object. However, if aTreePath has the path [a], then it is not a descendant of this object.
Returns:
true if aTreePath is a descendant of this path

pathByAddingChild

public TreePath pathByAddingChild(Object child)
Returns a new path containing all the elements of this object plus child. child will be the last element of the newly created TreePath. This will throw a NullPointerException if child is null.

getParentPath

public TreePath getParentPath()
Returns a path containing all the elements of this object, except the last path component.

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSelectionModel

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Interface TreeSelectionModel

All Known Implementing Classes:
DefaultTreeSelectionModel
public interface TreeSelectionModel

This interface represents the current state of the selection for the tree component. For information and examples of using tree selection models, see How to Use Trees in The Java Tutorial.

The state of the tree selection is characterized by a set of TreePaths, and optionally a set of integers. The mapping from TreePath to integer is done by way of an instance of RowMapper. It is not necessary for a TreeSelectionModel to have a RowMapper to correctly operate, but without a RowMapper getSelectionRows will return null.

A TreeSelectionModel can be configured to allow only one path (SINGLE_TREE_SELECTION) a number of continguous paths (CONTIGUOUS_TREE_SELECTION) or a number of discontiguous paths (DISCONTIGUOUS_TREE_SELECTION). A RowMapper is used to determine if TreePaths are contiguous. In the absence of a RowMapper CONTIGUOUS_TREE_SELECTION and DISCONTIGUOUS_TREE_SELECTION behave the same, that is they allow any number of paths to be contained in the TreeSelectionModel.

For a selection model of CONTIGUOUS_TREE_SELECTION any time the paths are changed (setSelectionPath, addSelectionPath ...) the TreePaths are again checked to make they are contiguous. A check of the TreePaths can also be forced by invoking resetRowSelection. How a set of discontiguous TreePaths is mapped to a contiguous set is left to implementors of this interface to enforce a particular policy.

Implementations should combine duplicate TreePaths that are added to the selection. For example, the following code

   TreePath[] paths = new TreePath[] { treePath, treePath };
   treeSelectionModel.setSelectionPaths(paths);
should result in only one path being selected: treePath, and not two copies of treePath.

The lead TreePath is the last path that was added (or set). The lead row is then the row that corresponds to the TreePath as determined from the RowMapper.

Field Summary
static int | CONTIGUOUS_TREE_SELECTION Selection can only be contiguous.
static int | DISCONTIGUOUS_TREE_SELECTION Selection can contain any number of items that are not necessarily contiguous.
static int | SINGLE_TREE_SELECTION Selection can only contain one path at a time.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
void | addSelectionPath(TreePath path) Adds path to the current selection.
void | addSelectionPaths(TreePath[] paths) Adds paths to the current selection.
void | addTreeSelectionListener(TreeSelectionListener x) Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
void | clearSelection() Empties the current selection.
TreePath | getLeadSelectionPath() Returns the last path that was added.
int | getLeadSelectionRow() Returns the lead selection index.
int | getMaxSelectionRow() Returns the largest value obtained from the RowMapper for the current set of selected TreePaths.
int | getMinSelectionRow() Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths.
RowMapper | getRowMapper() Returns the RowMapper instance that is able to map a TreePath to a row.
int | getSelectionCount() Returns the number of paths that are selected.
int | getSelectionMode() Returns the current selection mode, one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
TreePath | getSelectionPath() Returns the first path in the selection.
TreePath[] | getSelectionPaths() Returns the paths in the selection.
int[] | getSelectionRows() Returns all of the currently selected rows.
boolean | isPathSelected(TreePath path) Returns true if the path, path, is in the current selection.
boolean | isRowSelected(int row) Returns true if the row identitifed by row is selected.
boolean | isSelectionEmpty() Returns true if the selection is currently empty.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
void | removeSelectionPath(TreePath path) Removes path from the selection.
void | removeSelectionPaths(TreePath[] paths) Removes paths from the selection.
void | removeTreeSelectionListener(TreeSelectionListener x) Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
void | resetRowSelection() Updates this object's mapping from TreePaths to rows.
void | setRowMapper(RowMapper newMapper) Sets the RowMapper instance.
void | setSelectionMode(int mode) Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
void | setSelectionPath(TreePath path) Sets the selection to path.
void | setSelectionPaths(TreePath[] paths) Sets the selection to path.

Field Detail

SINGLE_TREE_SELECTION

public static final int SINGLE_TREE_SELECTION
Selection can only contain one path at a time.

CONTIGUOUS_TREE_SELECTION

public static final int CONTIGUOUS_TREE_SELECTION
Selection can only be contiguous. This will only be enforced if a RowMapper instance is provided. That is, if no RowMapper is set this behaves the same as DISCONTIGUOUS_TREE_SELECTION.

DISCONTIGUOUS_TREE_SELECTION

public static final int DISCONTIGUOUS_TREE_SELECTION
Selection can contain any number of items that are not necessarily contiguous.
Method Detail

setSelectionMode

public void setSelectionMode(int mode)
Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

This may change the selection if the current selection is not valid for the new mode. For example, if three TreePaths are selected when the mode is changed to SINGLE_TREE_SELECTION, only one TreePath will remain selected. It is up to the particular implementation to decide what TreePath remains selected.

getSelectionMode

public int getSelectionMode()
Returns the current selection mode, one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

setSelectionPath

public void setSelectionPath(TreePath path)
Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If path is null, this has the same effect as invoking clearSelection.
Parameters:
path - new path to select

setSelectionPaths

public void setSelectionPaths(TreePath[] paths)
Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If paths is null, this has the same effect as invoking clearSelection.
Parameters:
paths - new selection

addSelectionPath

public void addSelectionPath(TreePath path)
Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified. This has no effect if path is null.
Parameters:
path - the new path to add to the current selection

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
Adds paths to the current selection. If any of the paths in paths are not currently in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.
Parameters:
path - the new path to add to the current selection

removeSelectionPath

public void removeSelectionPath(TreePath path)
Removes path from the selection. If path is in the selection The TreeSelectionListeners are notified. This has no effect if path is null.
Parameters:
path - the path to remove from the selection

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
Removes paths from the selection. If any of the paths in paths are in the selection, the TreeSelectionListeners are notified. This method has no effect if paths is null.
Parameters:
paths - the path to remove from the selection

getSelectionPath

public TreePath getSelectionPath()
Returns the first path in the selection. How first is defined is up to implementors, and may not necessarily be the TreePath with the smallest integer value as determined from the RowMapper.

getSelectionPaths

public TreePath[] getSelectionPaths()
Returns the paths in the selection. This will return null (or an empty array) if nothing is currently selected.

getSelectionCount

public int getSelectionCount()
Returns the number of paths that are selected.

isPathSelected

public boolean isPathSelected(TreePath path)
Returns true if the path, path, is in the current selection.

isSelectionEmpty

public boolean isSelectionEmpty()
Returns true if the selection is currently empty.

clearSelection

public void clearSelection()
Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.

setRowMapper

public void setRowMapper(RowMapper newMapper)
Sets the RowMapper instance. This instance is used to determine the row for a particular TreePath.

getRowMapper

public RowMapper getRowMapper()
Returns the RowMapper instance that is able to map a TreePath to a row.

getSelectionRows

public int[] getSelectionRows()
Returns all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set.

getMinSelectionRow

public int getMinSelectionRow()
Returns the smallest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.

getMaxSelectionRow

public int getMaxSelectionRow()
Returns the largest value obtained from the RowMapper for the current set of selected TreePaths. If nothing is selected, or there is no RowMapper, this will return -1.

isRowSelected

public boolean isRowSelected(int row)
Returns true if the row identitifed by row is selected.

resetRowSelection

public void resetRowSelection()
Updates this object's mapping from TreePaths to rows. This should be invoked when the mapping from TreePaths to integers has changed (for example, a node has been expanded).

You do not normally have to call this; JTree and its associated listeners will invoke this for you. If you are implementing your own view class, then you will have to invoke this.

getLeadSelectionRow

public int getLeadSelectionRow()
Returns the lead selection index. That is the last index that was added.

getLeadSelectionPath

public TreePath getLeadSelectionPath()
Returns the last path that was added. This may differ from the leadSelectionPath property maintained by the JTree.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired when the selection mode changes.

Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - the PropertyChangeListener to be removed

addTreeSelectionListener

public void addTreeSelectionListener(TreeSelectionListener x)
Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
Parameters:
x - the new listener to be added

removeTreeSelectionListener

public void removeTreeSelectionListener(TreeSelectionListener x)
Removes x from the list of listeners that are notified each time the set of selected TreePaths changes.
Parameters:
x - the listener to remove
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VariableHeightLayoutCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.tree
Class VariableHeightLayoutCache

java.lang.Object
  |
  +--javax.swing.tree.AbstractLayoutCache
        |
        +--javax.swing.tree.VariableHeightLayoutCache
All Implemented Interfaces:
RowMapper
public class VariableHeightLayoutCache
extends AbstractLayoutCache

NOTE: This will become more open in a future release.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner classes inherited from class javax.swing.tree.AbstractLayoutCache
AbstractLayoutCache.NodeDimensions
Fields inherited from class javax.swing.tree.AbstractLayoutCache
nodeDimensions, rootVisible, rowHeight, treeModel, treeSelectionModel
Constructor Summary
VariableHeightLayoutCache()
Method Summary
Rectangle | getBounds(TreePath path, Rectangle placeIn) Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
boolean | getExpandedState(TreePath path) Returns true if the path is expanded, and visible.
TreePath | getPathClosestTo(int x, int y) Returns the path to the node that is closest to x,y.
TreePath | getPathForRow(int row) Returns the path for passed in row.
int | getPreferredHeight() Returns the preferred height.
int | getPreferredWidth(Rectangle bounds) Returns the preferred width and height for the region in visibleRegion.
int | getRowCount() Returns the number of visible rows.
int | getRowForPath(TreePath path) Returns the row that the last item identified in path is visible at.
int | getVisibleChildCount(TreePath path) Returns the number of visible children for row.
Enumeration | getVisiblePathsFrom(TreePath path) Returns an Enumerator that increments over the visible paths starting at the passed in location.
void | invalidatePathBounds(TreePath path) Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
void | invalidateSizes() Informs the TreeState that it needs to recalculate all the sizes it is referencing.
boolean | isExpanded(TreePath path) Returns true if the value identified by row is currently expanded.
void | setExpandedState(TreePath path, boolean isExpanded) Marks the path path expanded state to isExpanded.
void | setModel(TreeModel newModel) Sets the TreeModel that will provide the data.
void | setNodeDimensions(AbstractLayoutCache.NodeDimensions nd) Sets the renderer that is responsible for drawing nodes in the tree.
void | setRootVisible(boolean rootVisible) Determines whether or not the root node from the TreeModel is visible.
void | setRowHeight(int rowHeight) Sets the height of each cell.
void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
Methods inherited from class javax.swing.tree.AbstractLayoutCache
getModel, getNodeDimensions, getNodeDimensions, getRowHeight, getRowsForPaths, getSelectionModel, isFixedRowHeight, isRootVisible, setSelectionModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VariableHeightLayoutCache

public VariableHeightLayoutCache()
Method Detail

setModel

public void setModel(TreeModel newModel)
Sets the TreeModel that will provide the data.
Overrides:
setModel in class AbstractLayoutCache
Parameters:
newModel - the TreeModel that is to provide the data

setRootVisible

public void setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible.
Overrides:
setRootVisible in class AbstractLayoutCache
Parameters:
rootVisible - true if the root node of the tree is to be displayed
See Also:
AbstractLayoutCache.rootVisible

setRowHeight

public void setRowHeight(int rowHeight)
Sets the height of each cell. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height.
Overrides:
setRowHeight in class AbstractLayoutCache
Parameters:
rowHeight - the height of each cell, in pixels

setNodeDimensions

public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd)
Sets the renderer that is responsible for drawing nodes in the tree.
Overrides:
setNodeDimensions in class AbstractLayoutCache
Following copied from class: javax.swing.tree.AbstractLayoutCache
Parameters:
nd - a NodeDimensions object

setExpandedState

public void setExpandedState(TreePath path,
                             boolean isExpanded)
Marks the path path expanded state to isExpanded.
Overrides:
setExpandedState in class AbstractLayoutCache

getExpandedState

public boolean getExpandedState(TreePath path)
Returns true if the path is expanded, and visible.
Overrides:
getExpandedState in class AbstractLayoutCache

getBounds

public Rectangle getBounds(TreePath path,
                           Rectangle placeIn)
Returns the Rectangle enclosing the label portion that the item identified by row will be drawn into.
Overrides:
getBounds in class AbstractLayoutCache
Following copied from class: javax.swing.tree.AbstractLayoutCache
Parameters:
path - a TreePath specifying a node
placeIn - a Rectangle object giving the available space
Returns:
a Rectangle object specifying the space to be used

getPathForRow

public TreePath getPathForRow(int row)
Returns the path for passed in row. If row is not visible null is returned.
Overrides:
getPathForRow in class AbstractLayoutCache

getRowForPath

public int getRowForPath(TreePath path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
Overrides:
getRowForPath in class AbstractLayoutCache

getRowCount

public int getRowCount()
Returns the number of visible rows.
Overrides:
getRowCount in class AbstractLayoutCache

invalidatePathBounds

public void invalidatePathBounds(TreePath path)
Instructs the LayoutCache that the bounds for path are invalid, and need to be updated.
Overrides:
invalidatePathBounds in class AbstractLayoutCache

getPreferredHeight

public int getPreferredHeight()
Returns the preferred height.
Overrides:
getPreferredHeight in class AbstractLayoutCache

getPreferredWidth

public int getPreferredWidth(Rectangle bounds)
Returns the preferred width and height for the region in visibleRegion.
Overrides:
getPreferredWidth in class AbstractLayoutCache

getPathClosestTo

public TreePath getPathClosestTo(int x,
                                 int y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
Overrides:
getPathClosestTo in class AbstractLayoutCache

getVisiblePathsFrom

public Enumeration getVisiblePathsFrom(TreePath path)
Returns an Enumerator that increments over the visible paths starting at the passed in location. The ordering of the enumeration is based on how the paths are displayed.
Overrides:
getVisiblePathsFrom in class AbstractLayoutCache

getVisibleChildCount

public int getVisibleChildCount(TreePath path)
Returns the number of visible children for row.
Overrides:
getVisibleChildCount in class AbstractLayoutCache

invalidateSizes

public void invalidateSizes()
Informs the TreeState that it needs to recalculate all the sizes it is referencing.
Overrides:
invalidateSizes in class AbstractLayoutCache

isExpanded

public boolean isExpanded(TreePath path)
Returns true if the value identified by row is currently expanded.
Overrides:
isExpanded in class AbstractLayoutCache

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

e.path() returns the path the parent of the changed node(s).

e.childIndices() returns the index(es) of the changed node(s).

Overrides:
treeNodesChanged in class AbstractLayoutCache

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)

Invoked after nodes have been inserted into the tree.

e.path() returns the parent of the new nodes

e.childIndices() returns the indices of the new nodes in ascending order.

Overrides:
treeNodesInserted in class AbstractLayoutCache

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

e.path() returns the former parent of the deleted nodes.

e.childIndices() returns the indices the nodes had before they were deleted in ascending order.

Overrides:
treeNodesRemoved in class AbstractLayoutCache

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

e.path() holds the path to the node.

e.childIndices() returns null.

Overrides:
treeStructureChanged in class AbstractLayoutCache
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TreeModelHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.TreeModelHandler

java.lang.Object
  |
  +--javax.swing.JTree.TreeModelHandler
All Implemented Interfaces:
EventListener, TreeModelListener
Enclosing class:
JTree
protected class JTree.TreeModelHandler
extends Object
implements TreeModelListener

Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.

Constructor Summary
protected JTree.TreeModelHandler()
Method Summary
void | treeNodesChanged(TreeModelEvent e) Invoked after a node (or a set of siblings) has changed in some way.
void | treeNodesInserted(TreeModelEvent e) Invoked after nodes have been inserted into the tree.
void | treeNodesRemoved(TreeModelEvent e) Invoked after nodes have been removed from the tree.
void | treeStructureChanged(TreeModelEvent e) Invoked after the tree has drastically changed structure from a given node down.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTree.TreeModelHandler

protected JTree.TreeModelHandler()
Method Detail

treeNodesChanged

public void treeNodesChanged(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.

To indicate the root has changed, childIndices and children will be null.

Use e.getPath() to get the parent of the changed node(s). e.getChildIndices() returns the index(es) of the changed node(s).

Specified by:
treeNodesChanged in interface TreeModelListener

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after nodes have been inserted into the tree.

Use e.getPath() to get the parent of the new node(s). e.getChildIndices() returns the index(es) of the new node(s) in ascending order.

Specified by:
treeNodesInserted in interface TreeModelListener

treeStructureChanged

public void treeStructureChanged(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

Use e.getPath() to get the path to the node. e.getChildIndices() returns null.

Specified by:
treeStructureChanged in interface TreeModelListener

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent e)
Description copied from interface: TreeModelListener

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.

Use e.getPath() to get the former parent of the deleted node(s). e.getChildIndices() returns, in ascending order, the index(es) the node(s) had before being deleted.

Specified by:
treeNodesRemoved in interface TreeModelListener
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TreeSelectionRedirector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JTree.TreeSelectionRedirector

java.lang.Object
  |
  +--javax.swing.JTree.TreeSelectionRedirector
All Implemented Interfaces:
EventListener, Serializable, TreeSelectionListener
Enclosing class:
JTree
protected class JTree.TreeSelectionRedirector
extends Object
implements Serializable, TreeSelectionListener

Handles creating a new TreeSelectionEvent with the JTree as the source and passing it off to all the listeners.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
protected JTree.TreeSelectionRedirector()
Method Summary
 void valueChanged(TreeSelectionEvent e)
Invoked by the TreeSelectionModel when the selection changes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JTree.TreeSelectionRedirector

protected JTree.TreeSelectionRedirector()
Method Detail

valueChanged

public void valueChanged(TreeSelectionEvent e)
Invoked by the TreeSelectionModel when the selection changes.
Specified by:
valueChanged in interface TreeSelectionListener
Parameters:
e - the TreeSelectionEvent generated by the TreeSelectionModel
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIDefaults

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UIDefaults

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--javax.swing.UIDefaults
All Implemented Interfaces:
Cloneable, Map, Serializable
public class UIDefaults
extends Hashtable

A table of defaults for Swing components. Applications can set/get default values via the UIManager.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
UIManager, Serialized Form

Inner Class Summary
static interface | UIDefaults.ActiveValue This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
static class | UIDefaults.LazyInputMap LazyInputMap will create a InputMap in its createValue method.
static interface | UIDefaults.LazyValue This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
static class | UIDefaults.ProxyLazyValue This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
Inner classes inherited from class java.util.Map
Map.Entry
Constructor Summary
UIDefaults()
Create an empty defaults table.
UIDefaults(Object[] keyValueList)
Create a defaults table initialized with the specified key/value pairs.
Method Summary
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list.
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes.
Object | get(Object key) Returns the value for key.
Border | getBorder(Object key) If the value of key is a Border return it, otherwise return null.
Color | getColor(Object key) If the value of key is a Color return it, otherwise return null.
Dimension | getDimension(Object key) If the value of key is a Dimension return it, otherwise return null.
Font | getFont(Object key) If the value of key is a Font return it, otherwise return null.
Icon | getIcon(Object key) If the value of key is an Icon return it, otherwise return null.
Insets | getInsets(Object key) If the value of key is an Insets return it, otherwise return null.
int | getInt(Object key) If the value of key is an Integer return its integer value, otherwise return 0.
String | getString(Object key) If the value of key is a String return it, otherwise return null.
ComponentUI | getUI(JComponent target) Creates an ComponentUI implementation for the specified component.
Class | getUIClass(String uiClassID) Returns the L&F class that renders this component.
Class | getUIClass(String uiClassID, ClassLoader uiClassLoader) The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
protected void | getUIError(String msg) If getUI() fails for any reason, it calls this method before returning null.
Object | put(Object key, Object value) Sets the value of key to value.
void | putDefaults(Object[] keyValueList) Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent.
void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list.
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

UIDefaults

public UIDefaults()
Create an empty defaults table.

UIDefaults

public UIDefaults(Object[] keyValueList)
Create a defaults table initialized with the specified key/value pairs. For example:
Object[] uiDefaults = {
"Font", new Font("Dialog", Font.BOLD, 12),
"Color", Color.red,
"five", new Integer(5)
}
UIDefaults myDefaults = new UIDefaults(uiDefaults);
Parameters:
keyValueList - an array of objects containing the key/value pairs
Method Detail

get

public Object get(Object key)
Returns the value for key. If the value is a UIDefaults.LazyValue then the real value is computed with LazyValue.createValue(), the table entry is replaced, and the real value is returned. If the value is an UIDefaults.ActiveValue the table entry is not replaced - the value is computed with ActiveValue.createValue() for each get() call.
Overrides:
get in class Hashtable
Parameters:
key - the desired key
Returns:
the value for key
See Also:
UIDefaults.LazyValue, UIDefaults.ActiveValue, Hashtable.get(java.lang.Object)

put

public Object put(Object key,
                  Object value)
Sets the value of key to value. If key is a string and the new value isn't equal to the old one, fire a PropertyChangeEvent. If value is null, the key is removed from the table.
Overrides:
put in class Hashtable
Parameters:
key - the unique Object who's value will be used to retrieve the data value associated with it
value - the new Object to store as data under that key
Returns:
the previous Object value, or null
See Also:
putDefaults(java.lang.Object[]), Hashtable.put(java.lang.Object, java.lang.Object)

putDefaults

public void putDefaults(Object[] keyValueList)
Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent. The events oldValue and newValue will be null and its propertyName will be "UIDefaults".
Parameters:
keyValueList - an array of key/value pairs
See Also:
put(java.lang.Object, java.lang.Object), Hashtable.put(java.lang.Object, java.lang.Object)

getFont

public Font getFont(Object key)
If the value of key is a Font return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is a Font, return the Font object; otherwise return null

getColor

public Color getColor(Object key)
If the value of key is a Color return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is a Color, return the Color object; otherwise return null

getIcon

public Icon getIcon(Object key)
If the value of key is an Icon return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is an Icon, return the Icon object; otherwise return null

getBorder

public Border getBorder(Object key)
If the value of key is a Border return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is a Border, return the Border object; otherwise return null

getString

public String getString(Object key)
If the value of key is a String return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is a String, return the String object; otherwise return null

getInt

public int getInt(Object key)
If the value of key is an Integer return its integer value, otherwise return 0.
Parameters:
key - the desired key
Returns:
if the value for key is an Integer, return its value, otherwise return 0

getInsets

public Insets getInsets(Object key)
If the value of key is an Insets return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is an Insets, return the Insets object; otherwise return null

getDimension

public Dimension getDimension(Object key)
If the value of key is a Dimension return it, otherwise return null.
Parameters:
key - the desired key
Returns:
if the value for key is a Dimension, return the Dimension object; otherwise return null

getUIClass

public Class getUIClass(String uiClassID,
                        ClassLoader uiClassLoader)
The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class. If the class hasn't been loaded before, this method looks up the class with uiClassLoader.loadClass() if a non null class loader is provided, classForName() otherwise.

If a mapping for uiClassID exists or if the specified class can't be found, return null.

This method is used by getUI, it's usually not neccessary to call it directly.

Parameters:
uiClassID - a string containing the class ID
uiClassLoader - the object which will load the class
Returns:
the value of Class.forName(get(uidClassID))
See Also:
getUI(javax.swing.JComponent)

getUIClass

public Class getUIClass(String uiClassID)
Returns the L&F class that renders this component.
Parameters:
uiClassID - a string containing the class ID
Returns:
the Class object returned by getUIClass(uiClassID, null)

getUIError

protected void getUIError(String msg)
If getUI() fails for any reason, it calls this method before returning null. Subclasses may choose to do more or less here.
Parameters:
msg - message string to print
See Also:
getUI(javax.swing.JComponent)

getUI

public ComponentUI getUI(JComponent target)
Creates an ComponentUI implementation for the specified component. In other words create the look and feel specific delegate object for target. This is done in two steps:
  • Look up the name of the ComponentUI implementation class under the value returned by target.getUIClassID().
  • Use the implementation classes static createUI() method to construct a look and feel delegate.
Parameters:
target - the JComponent which needs a UI
Returns:
the ComponentUI object

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired whenever a default is changed.

Parameters:
listener - the PropertyChangeListener to be added
See Also:
PropertyChangeSupport

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - the PropertyChangeListener to be removed
See Also:
PropertyChangeSupport

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEventx listener list isn't empty, then fire a PropertyChange event to each listener.
Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UIManager

java.lang.Object
  |
  +--javax.swing.UIManager
All Implemented Interfaces:
Serializable
public class UIManager
extends Object
implements Serializable

This class keeps track of the current look and feel and its defaults.

We manage three levels of defaults: user defaults, look and feel defaults, system defaults. A call to UIManager.get() checks all three levels in order and returns the first non-null value for a key, if any. A call to UIManager.put() just affects the user defaults. Note that a call to setLookAndFeel() doesn't affect the user defaults, it just replaces the middle defaults "level".

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner Class Summary
static class UIManager.LookAndFeelInfo
Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
Constructor Summary
UIManager()
Method Summary
static void addAuxiliaryLookAndFeel(LookAndFeel laf)
Add a LookAndFeel to the list of auxiliary look and feels.
static void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
static Object get(Object key)
Returns an object from the defaults table.
static LookAndFeel[] getAuxiliaryLookAndFeels()
Return the list of auxiliary look and feels (can be null).
static Border getBorder(Object key)
Returns a border from the defaults table.
static Color getColor(Object key)
Returns a drawing color from the defaults table.
static String getCrossPlatformLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF).
static UIDefaults getDefaults()
Returns the default values for this look and feel.
static Dimension getDimension(Object key)
Returns a dimension from the defaults table.
static Font getFont(Object key)
Returns a drawing font from the defaults table.
static Icon getIcon(Object key)
Returns an Icon from the defaults table.
static Insets getInsets(Object key)
Returns an Insets object from the defaults table.
static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
Return an array of objects that provide some information about the LookAndFeel implementations that have been installed with this software development kit.
static int getInt(Object key)
Returns an int from the defaults table.
static LookAndFeel getLookAndFeel()
Returns The current default look and feel, or null.
static UIDefaults getLookAndFeelDefaults()
Returns the default values for this look and feel.
static String getString(Object key)
Returns a string from the defaults table.
static String getSystemLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
static ComponentUI getUI(JComponent target)
Returns the L&F object that renders the target component.
static void installLookAndFeel(String name, String className)
Creates a new look and feel and adds it to the current array.
static void installLookAndFeel(UIManager.LookAndFeelInfo info)
Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
static Object put(Object key, Object value)
Stores an object in the defaults table.
static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
Remove a LookAndFeel from the list of auxiliary look and feels.
static void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
Replaces the current array of installed LookAndFeelInfos.
static void setLookAndFeel(LookAndFeel newLookAndFeel)
Set the current default look and feel using a LookAndFeel object.
static void setLookAndFeel(String className)
Set the current default look and feel using a class name.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UIManager

public UIManager()
Method Detail

getInstalledLookAndFeels

public static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
Return an array of objects that provide some information about the LookAndFeel implementations that have been installed with this software development kit. The LookAndFeel info objects can be used by an application to construct a menu of look and feel options for the user or to set the look and feel at start up time. Note that we do not return the LookAndFeel classes themselves here to avoid the cost of unnecessarily loading them.

Given a LookAndFeelInfo object one can set the current look and feel like this:

 UIManager.setLookAndFeel(info.getClassName());
See Also:
setLookAndFeel(javax.swing.LookAndFeel)

setInstalledLookAndFeels

public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
                                     throws SecurityException
Replaces the current array of installed LookAndFeelInfos.
See Also:
getInstalledLookAndFeels()

installLookAndFeel

public static void installLookAndFeel(UIManager.LookAndFeelInfo info)
Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
Parameters:
info - a LookAndFeelInfo object that names the look and feel and identifies that class that implements it

installLookAndFeel

public static void installLookAndFeel(String name,
                                      String className)
Creates a new look and feel and adds it to the current array. Then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
Parameters:
name - a String specifying the name of the look and feel
className - a String specifying the class name that implements the look and feel

getLookAndFeel

public static LookAndFeel getLookAndFeel()
Returns The current default look and feel, or null.
Returns:
The current default look and feel, or null.
See Also:
setLookAndFeel(javax.swing.LookAndFeel)

setLookAndFeel

public static void setLookAndFeel(LookAndFeel newLookAndFeel)
                           throws UnsupportedLookAndFeelException
Set the current default look and feel using a LookAndFeel object.

This is a JavaBeans bound property.

Parameters:
newLookAndFeel - the LookAndFeel object
Throws:
UnsupportedLookAndFeelException - If lnf.isSupportedLookAndFeel() is false.
See Also:
getLookAndFeel()

setLookAndFeel

public static void setLookAndFeel(String className)
                           throws ClassNotFoundException,
                                  InstantiationException,
                                  IllegalAccessException,
                                  UnsupportedLookAndFeelException
Set the current default look and feel using a class name.
Parameters:
className - a string specifying the name of the class that implements the look and feel
Throws:
ClassNotFoundException - If the LookAndFeel class could not be found.
InstantiationException - If a new instance of the class couldn't be creatd.
IllegalAccessException - If the class or initializer isn't accessible.
UnsupportedLookAndFeelException - If lnf.isSupportedLookAndFeel() is false.

getSystemLookAndFeelClassName

public static String getSystemLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
See Also:
setLookAndFeel(javax.swing.LookAndFeel), getCrossPlatformLookAndFeelClassName()

getCrossPlatformLookAndFeelClassName

public static String getCrossPlatformLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the default cross platform look and feel -- the Java Look and Feel (JLF).
Returns:
a string with the JLF implementation-class
See Also:
setLookAndFeel(javax.swing.LookAndFeel), getSystemLookAndFeelClassName()

getDefaults

public static UIDefaults getDefaults()
Returns the default values for this look and feel.
Returns:
an UIDefaults object containing the default values

getFont

public static Font getFont(Object key)
Returns a drawing font from the defaults table.
Parameters:
key - an Object specifying the font
Returns:
the Font object

getColor

public static Color getColor(Object key)
Returns a drawing color from the defaults table.
Parameters:
key - an Object specifying the color
Returns:
the Color object

getIcon

public static Icon getIcon(Object key)
Returns an Icon from the defaults table.
Parameters:
key - an Object specifying the icon
Returns:
the Icon object

getBorder

public static Border getBorder(Object key)
Returns a border from the defaults table.
Parameters:
key - an Object specifying the border
Returns:
the Border object

getString

public static String getString(Object key)
Returns a string from the defaults table.
Parameters:
key - an Object specifying the string
Returns:
the String

getInt

public static int getInt(Object key)
Returns an int from the defaults table.
Parameters:
key - an Object specifying the int
Returns:
the int

getInsets

public static Insets getInsets(Object key)
Returns an Insets object from the defaults table.
Parameters:
key - an Object specifying the Insets object
Returns:
the Insets object

getDimension

public static Dimension getDimension(Object key)
Returns a dimension from the defaults table.
Parameters:
key - an Object specifying the dimension object
Returns:
the Dimension object

get

public static Object get(Object key)
Returns an object from the defaults table.
Parameters:
key - an Object specifying the desired object
Returns:
the Object

put

public static Object put(Object key,
                         Object value)
Stores an object in the defaults table.
Parameters:
key - an Object specifying the retrieval key
value - the Object to store
Returns:
the Object returned by UIDefaults.put(java.lang.Object, java.lang.Object)

getUI

public static ComponentUI getUI(JComponent target)
Returns the L&F object that renders the target component.
Parameters:
target - the JComponent to render
Returns:
the ComponentUI object that renders the target component

getLookAndFeelDefaults

public static UIDefaults getLookAndFeelDefaults()
Returns the default values for this look and feel.
Returns:
an UIDefaults object containing the default values

addAuxiliaryLookAndFeel

public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
Add a LookAndFeel to the list of auxiliary look and feels. The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI. The change will only take effect when a new UI class is created or when the default look and feel is changed on a component instance.

Note these are not the same as the installed look and feels.

Parameters:
laf - the LookAndFeel object
See Also:
removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
setLookAndFeel(javax.swing.LookAndFeel),
getAuxiliaryLookAndFeels(),
getInstalledLookAndFeels()

removeAuxiliaryLookAndFeel

public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
Remove a LookAndFeel from the list of auxiliary look and feels. The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI. The change will only take effect when a new UI class is created or when the default look and feel is changed on a component instance.

Note these are not the same as the installed look and feels.

Returns:
true if the LookAndFeel was removed from the list
See Also:
removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
getAuxiliaryLookAndFeels(),
setLookAndFeel(javax.swing.LookAndFeel),
getInstalledLookAndFeels()

getAuxiliaryLookAndFeels

public static LookAndFeel[] getAuxiliaryLookAndFeels()
Return the list of auxiliary look and feels (can be null). The auxiliary look and feels tell the multiplexing look and feel what other LookAndFeel classes for a component instance are to be used in addition to the default LookAndFeel class when creating a multiplexing UI.

Note these are not the same as the installed look and feels.

See Also:
addAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
removeAuxiliaryLookAndFeel(javax.swing.LookAndFeel),
setLookAndFeel(javax.swing.LookAndFeel),
getInstalledLookAndFeels()

addPropertyChangeListener

public static void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
Parameters:
listener - The PropertyChangeListener to be added
See Also:
PropertyChangeSupport

removePropertyChangeListener

public static void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
listener - The PropertyChangeListener to be removed
See Also:
PropertyChangeSupport
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ScrollPaneLayout.UIResource

java.lang.Object
  |
  +--javax.swing.ScrollPaneLayout
        |
        +--javax.swing.ScrollPaneLayout.UIResource
All Implemented Interfaces:
LayoutManager, ScrollPaneConstants, Serializable, UIResource
Enclosing class:
ScrollPaneLayout
public static class ScrollPaneLayout.UIResource
extends ScrollPaneLayout
implements UIResource

The UI resource version of ScrollPaneLayout.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.ScrollPaneLayout
ScrollPaneLayout.UIResource
Fields inherited from class javax.swing.ScrollPaneLayout
colHead, hsb, hsbPolicy, lowerLeft, lowerRight, rowHead, upperLeft, upperRight, viewport, vsb, vsbPolicy
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor Summary
ScrollPaneLayout.UIResource()
Methods inherited from class javax.swing.ScrollPaneLayout
addLayoutComponent, addSingletonComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy, syncWithScrollPane
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScrollPaneLayout.UIResource

public ScrollPaneLayout.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UIResource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class DefaultListCellRenderer.UIResource

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.DefaultListCellRenderer
                                |
                                +--javax.swing.DefaultListCellRenderer.UIResource
All Implemented Interfaces:
Accessible, ImageObserver, ListCellRenderer, MenuContainer, Serializable, SwingConstants, UIResource
Enclosing class:
DefaultListCellRenderer
public static class DefaultListCellRenderer.UIResource
extends DefaultListCellRenderer
implements UIResource

A subclass of DefaultListCellRenderer that implements UIResource. DefaultListCellRenderer doesn't implement UIResource directly so that applications can safely override the cellRenderer property with DefaultListCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.DefaultListCellRenderer
DefaultListCellRenderer.UIResource
Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
Fields inherited from class javax.swing.DefaultListCellRenderer
noFocusBorder
Fields inherited from class javax.swing.JLabel
labelFor
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DefaultListCellRenderer.UIResource()
Methods inherited from class javax.swing.DefaultListCellRenderer
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getListCellRendererComponent, repaint, repaint, revalidate, validate
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultListCellRenderer.UIResource

public DefaultListCellRenderer.UIResource()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.swing.undo Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.swing.undo

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.swing.undo.AbstractUndoableEdit (implements java.io.Serializable, javax.swing.undo.UndoableEdit)
      • class javax.swing.undo.CompoundEdit
        • class javax.swing.undo.UndoManager (implements javax.swing.event.UndoableEditListener)
      • class javax.swing.undo.StateEdit
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class javax.swing.undo.CannotRedoException
          • class javax.swing.undo.CannotUndoException
    • class javax.swing.undo.UndoableEditSupport

Interface Hierarchy

  • interface javax.swing.undo.StateEditable
  • interface javax.swing.undo.UndoableEdit
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.swing.undo

Provides support for undo/redo capabilities in an application such as a text editor.

See:
Description

Interface Summary
StateEditable | StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
UndoableEdit | An object representing an edit that has been done, and that can be undone and redone

Class Summary
AbstractUndoableEdit | An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
CompoundEdit | A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
StateEdit | StateEdit is a general edit for objects that change state.
UndoableEditSupport | A support class used for managing UndoableEdit listeners.
UndoManager | Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Exception Summary
CannotRedoException | Thrown when an UndoableEdit is told to redo() and can't.
CannotUndoException | Thrown when an UndoableEdit is told to undo() and can't.

Package javax.swing.undo Description

Provides support for undo/redo capabilities in an application such as a text editor. It is for developers that provide undo/redo capabilities in their application.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • Implementing Undo and Redo, a section in The Java Tutorial.

Since:
1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.swing.undo

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.swing.undo

Packages that use javax.swing.undo
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Classes in javax.swing.undo used by javax.swing.event
UndoableEdit
An object representing an edit that has been done, and that can be undone and redone

Classes in javax.swing.undo used by javax.swing.text
AbstractUndoableEdit
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
CannotRedoException
Thrown when an UndoableEdit is told to redo() and can't.
CannotUndoException
Thrown when an UndoableEdit is told to undo() and can't.
CompoundEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
UndoableEdit
An object representing an edit that has been done, and that can be undone and redone

Classes in javax.swing.undo used by javax.swing.undo
AbstractUndoableEdit
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
CannotRedoException
Thrown when an UndoableEdit is told to redo() and can't.
CannotUndoException
Thrown when an UndoableEdit is told to undo() and can't.
CompoundEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
StateEditable
StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.
UndoableEdit
An object representing an edit that has been done, and that can be undone and redone

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AbstractUndoableEdit

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class AbstractUndoableEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
All Implemented Interfaces:
Serializable, UndoableEdit
Direct Known Subclasses:
AbstractDocument.ElementEdit, CompoundEdit, DefaultStyledDocument.AttributeUndoableEdit, StateEdit
public class AbstractUndoableEdit
extends Object
implements UndoableEdit, Serializable

An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.

See Also:
Serialized Form

Field Summary
protected static String | RedoName String returned by getRedoPresentationName()
protected static String | UndoName String returned by getUndoPresentationName()
Constructor Summary
AbstractUndoableEdit()
Method Summary
 boolean addEdit(UndoableEdit anEdit)
This default implementation returns false.
 boolean canRedo()
Returns true if this edit is alive and hasBeenDone is false.
 boolean canUndo()
Returns true if this edit is alive and hasBeenDone is true.
 void die()
Sets alive to false.
 String getPresentationName()
This default implementation returns "".
 String getRedoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName.
 String getUndoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName.
 boolean isSignificant()
This default implementation returns true.
 void redo()
Throws CannotRedoException if canRedo() returns false.
 boolean replaceEdit(UndoableEdit anEdit)
This default implementation returns false.
 String toString()
Returns a string that displays and identifies this object's properties.
 void undo()
Throws CannotUndoException if canUndo() returns false.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

UndoName

protected static final String UndoName
String returned by getUndoPresentationName()
See Also:
UIDefaults

RedoName

protected static final String RedoName
String returned by getRedoPresentationName()
See Also:
UIDefaults
Constructor Detail

AbstractUndoableEdit

public AbstractUndoableEdit()
Method Detail

die

public void die()
Sets alive to false. Note that this is a one way operation: dead edits cannot be resurrected. Sending undo() or redo() to a dead edit results in an exception being thrown. Typically an edit is killed when it is consolidated by another edit's addEdit() or replaceEdit() method, or when it is dequeued from an UndoManager
Specified by:
die in interface UndoableEdit
Following copied from interface: javax.swing.undo.UndoableEdit
See Also:
CompoundEdit.die()

undo

public void undo()
          throws CannotUndoException
Throws CannotUndoException if canUndo() returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.
Specified by:
undo in interface UndoableEdit
See Also:
canUndo()

canUndo

public boolean canUndo()
Returns true if this edit is alive and hasBeenDone is true.
Specified by:
canUndo in interface UndoableEdit
See Also:
die(),
undo(),
redo()

redo

public void redo()
          throws CannotRedoException
Throws CannotRedoException if canRedo() returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.
Specified by:
redo in interface UndoableEdit
See Also:
canRedo()

canRedo

public boolean canRedo()
Returns true if this edit is alive and hasBeenDone is false.
Specified by:
canRedo in interface UndoableEdit
See Also:
die(),
undo(),
redo()

addEdit

public boolean addEdit(UndoableEdit anEdit)
This default implementation returns false.
Specified by:
addEdit in interface UndoableEdit
See Also:
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)

replaceEdit

public boolean replaceEdit(UndoableEdit anEdit)
This default implementation returns false.
Specified by:
replaceEdit in interface UndoableEdit
See Also:
UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)

isSignificant

public boolean isSignificant()
This default implementation returns true.
Specified by:
isSignificant in interface UndoableEdit
See Also:
UndoableEdit.isSignificant()

getPresentationName

public String getPresentationName()
This default implementation returns "". Used by getUndoPresentationName() and getRedoPresentationName() to construct the strings they return. Subclasses shoul override to return an appropriate description of the operation this edit represents.
Specified by:
getPresentationName in interface UndoableEdit
See Also:
getUndoPresentationName(), getRedoPresentationName()

getUndoPresentationName

public String getUndoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName. Otherwise returns AbstractUndoableEdit.UndoName followed by a space and getPresentationName()
Specified by:
getUndoPresentationName in interface UndoableEdit
See Also:
getPresentationName()

getRedoPresentationName

public String getRedoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName. Otherwise returns AbstractUndoableEdit.RedoName followed by a space and getPresentationName()
Specified by:
getRedoPresentationName in interface UndoableEdit
See Also:
getPresentationName()

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CannotRedoException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class CannotRedoException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--javax.swing.undo.CannotRedoException
All Implemented Interfaces:
Serializable
public class CannotRedoException
extends RuntimeException

Thrown when an UndoableEdit is told to redo() and can't.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
CannotRedoException()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CannotRedoException

public CannotRedoException()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CannotUndoException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class CannotUndoException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--javax.swing.undo.CannotUndoException
All Implemented Interfaces:
Serializable
public class CannotUndoException
extends RuntimeException

Thrown when an UndoableEdit is told to undo() and can't.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
CannotUndoException()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CannotUndoException

public CannotUndoException()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class javax.swing.undo.StateEdit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.StateEdit

No usage of javax.swing.undo.StateEdit

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.UndoableEditSupport

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.UndoableEditSupport

No usage of javax.swing.undo.UndoableEditSupport

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.UndoManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.UndoManager

No usage of javax.swing.undo.UndoManager

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.AbstractUndoableEdit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.AbstractUndoableEdit

Packages that use AbstractUndoableEdit
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of AbstractUndoableEdit in javax.swing.text

Subclasses of AbstractUndoableEdit in javax.swing.text
class | AbstractDocument.DefaultDocumentEvent Stores document changes as the document is being modified.
static class | AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
static class | DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.

Uses of AbstractUndoableEdit in javax.swing.undo

Subclasses of AbstractUndoableEdit in javax.swing.undo
class | CompoundEdit A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
class | StateEdit StateEdit is a general edit for objects that change state.
class | UndoManager Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.CannotRedoException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.CannotRedoException

Packages that use CannotRedoException
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of CannotRedoException in javax.swing.text

Methods in javax.swing.text that throw CannotRedoException
void | AbstractDocument.DefaultDocumentEvent.redo() Redoes a change.
void | AbstractDocument.ElementEdit.redo() Redoes a change.
void | DefaultStyledDocument.AttributeUndoableEdit.redo() Redoes a change.

Uses of CannotRedoException in javax.swing.undo

Methods in javax.swing.undo that throw CannotRedoException
 void AbstractUndoableEdit.redo()
Throws CannotRedoException if canRedo() returns false.
 void CompoundEdit.redo()
Sends redo() to all contained UndoableEdits in the order in which they were added.
protected  void UndoManager.redoTo(UndoableEdit edit)
Redoes all changes from indexOfNextAdd to edit.
 void UndoManager.undoOrRedo()
Undo or redo as appropriate.
 void UndoManager.redo()
If this UndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it.
 void UndoableEdit.redo()
Re-apply the edit, assuming that it has been undone.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.CannotUndoException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.CannotUndoException

Packages that use CannotUndoException
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of CannotUndoException in javax.swing.text

Methods in javax.swing.text that throw CannotUndoException
void | AbstractDocument.DefaultDocumentEvent.undo() Undoes a change.
void | AbstractDocument.ElementEdit.undo() Undoes a change.
void | DefaultStyledDocument.AttributeUndoableEdit.undo() Undoes a change.

Uses of CannotUndoException in javax.swing.undo

Methods in javax.swing.undo that throw CannotUndoException
 void AbstractUndoableEdit.undo()
Throws CannotUndoException if canUndo() returns false.
 void CompoundEdit.undo()
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.
protected  void UndoManager.undoTo(UndoableEdit edit)
Undoes all changes from indexOfNextAdd to edit.
 void UndoManager.undoOrRedo()
Undo or redo as appropriate.
 void UndoManager.undo()
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it.
 void UndoableEdit.undo()
Undo the edit that was made.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.swing.undo.CompoundEdit

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.swing.undo.CompoundEdit

Packages that use CompoundEdit
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of CompoundEdit in javax.swing.text

Subclasses of CompoundEdit in javax.swing.text
 class AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being modified.

Uses of CompoundEdit in javax.swing.undo

Subclasses of CompoundEdit in javax.swing.undo
 class UndoManager
Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Fields in javax.swing.undo declared as CompoundEdit
protected  CompoundEdit UndoableEditSupport.compoundEdit

Methods in javax.swing.undo that return CompoundEdit
protected  CompoundEdit UndoableEditSupport.createCompoundEdit()
Called only from beginUpdate.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.undo.StateEditable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.undo.StateEditable

Packages that use StateEditable
javax.swing.undo Provides support for undo/redo capabilities in an application such as a text editor.

Uses of StateEditable in javax.swing.undo

Fields in javax.swing.undo declared as StateEditable
protected  StateEditable StateEdit.object
The object being edited

Methods in javax.swing.undo with parameters of type StateEditable
protected  void StateEdit.init(StateEditable anObject, String name)

Constructors in javax.swing.undo with parameters of type StateEditable
StateEdit(StateEditable anObject)
Create and return a new StateEdit.
StateEdit(StateEditable anObject, String name)
Create and return a new StateEdit with a presentation name.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface javax.swing.undo.UndoableEdit

PREV NEXT FRAMES NO FRAMES

Uses of Interface
javax.swing.undo.UndoableEdit

Packages that use UndoableEdit
javax.swing.event | Provides for events fired by Swing components.
javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.
javax.swing.undo | Provides support for undo/redo capabilities in an application such as a text editor.

Uses of UndoableEdit in javax.swing.event

Methods in javax.swing.event that return UndoableEdit
 UndoableEdit UndoableEditEvent.getEdit()
Returns the edit value.

Constructors in javax.swing.event with parameters of type UndoableEdit
UndoableEditEvent(Object source, UndoableEdit edit)
Constructs an UndoableEditEvent object.

Uses of UndoableEdit in javax.swing.text

Classes in javax.swing.text that implement UndoableEdit
class | AbstractDocument.DefaultDocumentEvent Stores document changes as the document is being modified.
static class | AbstractDocument.ElementEdit An implementation of ElementChange that can be added to the document event.
static class | DefaultStyledDocument.AttributeUndoableEdit An UndoableEdit used to remember AttributeSet changes to an Element.

Methods in javax.swing.text that return UndoableEdit
UndoableEdit | AbstractDocument.Content.insertString(int where, String str) Inserts a string of characters into the sequence.
UndoableEdit | AbstractDocument.Content.remove(int where, int nitems) Removes some portion of the sequence.
UndoableEdit | StringContent.insertString(int where, String str) Inserts a string into the content.
UndoableEdit | StringContent.remove(int where, int nitems) Removes part of the content.
UndoableEdit | GapContent.insertString(int where, String str) Inserts a string into the content.
UndoableEdit | GapContent.remove(int where, int nitems) Removes part of the content.

Methods in javax.swing.text with parameters of type UndoableEdit
 boolean AbstractDocument.DefaultDocumentEvent.addEdit(UndoableEdit anEdit)
Adds a document edit.

Uses of UndoableEdit in javax.swing.undo

Classes in javax.swing.undo that implement UndoableEdit
class | AbstractUndoableEdit An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
class | CompoundEdit A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
class | StateEdit StateEdit is a general edit for objects that change state.
class | UndoManager Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time.

Methods in javax.swing.undo that return UndoableEdit
protected UndoableEdit | CompoundEdit.lastEdit() Returns the last UndoableEdit in edits, or null if edits is empty
protected UndoableEdit | UndoManager.editToBeUndone() Returns the the next significant edit to be undone if undo is called.
protected UndoableEdit | UndoManager.editToBeRedone() Returns the the next significant edit to be redone if redo is called.

Methods in javax.swing.undo with parameters of type UndoableEdit
boolean | AbstractUndoableEdit.addEdit(UndoableEdit anEdit) This default implementation returns false.
boolean | AbstractUndoableEdit.replaceEdit(UndoableEdit anEdit) This default implementation returns false.
boolean | CompoundEdit.addEdit(UndoableEdit anEdit) If this edit is inProgress, accepts anEdit and returns true.
protected void | UndoManager.undoTo(UndoableEdit edit) Undoes all changes from indexOfNextAdd to edit.
protected void | UndoManager.redoTo(UndoableEdit edit) Redoes all changes from indexOfNextAdd to edit.
boolean | UndoManager.addEdit(UndoableEdit anEdit) If inProgress, inserts anEdit at indexOfNextAdd, and removes any old edits that were at indexOfNextAdd or later.
protected void | UndoableEditSupport._postEdit(UndoableEdit e) Called only from postEdit and endUpdate.
void | UndoableEditSupport.postEdit(UndoableEdit e) DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
boolean | UndoableEdit.addEdit(UndoableEdit anEdit) This UndoableEdit should absorb anEdit if it can.
boolean | UndoableEdit.replaceEdit(UndoableEdit anEdit) Return true if this UndoableEdit should replace anEdit.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


CompoundEdit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class CompoundEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
All Implemented Interfaces:
Serializable, UndoableEdit
Direct Known Subclasses:
AbstractDocument.DefaultDocumentEvent, UndoManager
public class CompoundEdit
extends AbstractUndoableEdit

A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.

See Also:
Serialized Form

Field Summary
protected  Vector edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
CompoundEdit()
Method Summary
 boolean addEdit(UndoableEdit anEdit)
If this edit is inProgress, accepts anEdit and returns true.
 boolean canRedo()
Returns false if isInProgress or if super does.
 boolean canUndo()
Returns false if isInProgress or if super does.
 void die()
Send die to each subedit, in the reverse of the order that they were added
 void end()
Sets inProgress to false.
 String getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits.
 String getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits.
 String getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits.
 boolean isInProgress()
Returns true if this edit is in progress--that is, it has not received end.
 boolean isSignificant()
Returns true if any of the UndoableEdits in edits do.
protected  UndoableEdit lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty
 void redo()
Sends redo() to all contained UndoableEdits in the order in which they were added.
 String toString()
Returns a string that displays and identifies this object's properties.
 void undo()
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

edits

protected Vector edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit
Constructor Detail

CompoundEdit

public CompoundEdit()
Method Detail

undo

public void undo()
          throws CannotUndoException
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.
Overrides:
undo in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canUndo()

redo

public void redo()
          throws CannotRedoException
Sends redo() to all contained UndoableEdits in the order in which they were added.
Overrides:
redo in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canRedo()

lastEdit

protected UndoableEdit lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty

die

public void die()
Send die to each subedit, in the reverse of the order that they were added
Overrides:
die in class AbstractUndoableEdit
Following copied from interface: javax.swing.undo.UndoableEdit
See Also:
die()

addEdit

public boolean addEdit(UndoableEdit anEdit)
If this edit is inProgress, accepts anEdit and returns true.

The last edit added to this CompoundEdit is given a chance to addEdit(anEdit). If it refuses (returns false), anEdit is given a chance to replaceEdit the last edit. If anEdit returns false here, it is added to edits.

Overrides:
addEdit in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)

end

public void end()
Sets inProgress to false.
See Also:
canUndo(), canRedo()

canUndo

public boolean canUndo()
Returns false if isInProgress or if super does.
Overrides:
canUndo in class AbstractUndoableEdit
See Also:
isInProgress()

canRedo

public boolean canRedo()
Returns false if isInProgress or if super does.
Overrides:
canRedo in class AbstractUndoableEdit
See Also:
isInProgress()

isInProgress

public boolean isInProgress()
Returns true if this edit is in progress--that is, it has not received end. This generally means that edits are still being added to it.
See Also:
end()

isSignificant

public boolean isSignificant()
Returns true if any of the UndoableEdits in edits do. Returns false if they all return false.
Overrides:
isSignificant in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
UndoableEdit.isSignificant()

getPresentationName

public String getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
Overrides:
getPresentationName in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.getUndoPresentationName(), AbstractUndoableEdit.getRedoPresentationName()

getUndoPresentationName

public String getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
Overrides:
getUndoPresentationName in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.getPresentationName()

getRedoPresentationName

public String getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
Overrides:
getRedoPresentationName in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.getPresentationName()

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class AbstractUndoableEdit
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StateEdit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class StateEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.StateEdit
All Implemented Interfaces:
Serializable, UndoableEdit
public class StateEdit
extends AbstractUndoableEdit

StateEdit is a general edit for objects that change state. Objects being edited must conform to the StateEditable interface.

This edit class works by asking an object to store it's state in Hashtables before and after editing occurs. Upon undo or redo the object is told to restore it's state from these Hashtables.

A state edit is used as follows:
    // Create the edit during the "before" state of the object
    StateEdit newEdit = new StateEdit(myObject);
    // Modify the object
    myObject.someStateModifyingMethod();
    // "end" the edit when you are done modifying the object
    newEdit.end();

Note that when a StateEdit ends, it removes redundant state from the Hashtables - A state Hashtable is not guaranteed to contain all keys/values placed into it when the state is stored!

See Also:
StateEditable, Serialized Form

Field Summary
protected StateEditable | object The object being edited
protected Hashtable | postState The state information after the edit
protected Hashtable | preState The state information prior to the edit
protected static String | RCSID
protected String | undoRedoName The undo/redo presentation name
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
StateEdit(StateEditable anObject)
Create and return a new StateEdit.
StateEdit(StateEditable anObject, String name)
Create and return a new StateEdit with a presentation name.
Method Summary
void | end() Gets the post-edit state of the StateEditable object and ends the edit.
String | getPresentationName() Gets the presentation name for this edit
protected void | init(StateEditable anObject, String name)
void | redo() Tells the edited object to apply the state after the edit
protected void | removeRedundantState() Remove redundant key/values in state hashtables.
void | undo() Tells the edited object to apply the state prior to the edit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

RCSID

protected static final String RCSID

object

protected StateEditable object
The object being edited

preState

protected Hashtable preState
The state information prior to the edit

postState

protected Hashtable postState
The state information after the edit

undoRedoName

protected String undoRedoName
The undo/redo presentation name
Constructor Detail

StateEdit

public StateEdit(StateEditable anObject)
Create and return a new StateEdit.
Parameters:
anObject - The object to watch for changing state
See Also:
StateEdit

StateEdit

public StateEdit(StateEditable anObject,
                 String name)
Create and return a new StateEdit with a presentation name.
Parameters:
anObject - The object to watch for changing state
name - The presentation name to be used for this edit
See Also:
StateEdit
Method Detail

init

protected void init(StateEditable anObject,
                    String name)

end

public void end()
Gets the post-edit state of the StateEditable object and ends the edit.

undo

public void undo()
Tells the edited object to apply the state prior to the edit
Overrides:
undo in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canUndo()

redo

public void redo()
Tells the edited object to apply the state after the edit
Overrides:
redo in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canRedo()

getPresentationName

public String getPresentationName()
Gets the presentation name for this edit
Overrides:
getPresentationName in class AbstractUndoableEdit
Following copied from class: javax.swing.undo.AbstractUndoableEdit
See Also:
AbstractUndoableEdit.getUndoPresentationName(), AbstractUndoableEdit.getRedoPresentationName()

removeRedundantState

protected void removeRedundantState()
Remove redundant key/values in state hashtables.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StateEditable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Interface StateEditable

public interface StateEditable

StateEditable defines the interface for objects that can have their state undone/redone by a StateEdit.

See Also:
StateEdit

Field Summary
static String RCSID
Resource ID for this class.
Method Summary
void | restoreState(Hashtable state) Upon receiving this message the receiver should extract any relevant state out of state.
void | storeState(Hashtable state) Upon receiving this message the receiver should place any relevant state into state.

Field Detail

RCSID

public static final String RCSID
Resource ID for this class.
Method Detail

storeState

public void storeState(Hashtable state)
Upon receiving this message the receiver should place any relevant state into state.

restoreState

public void restoreState(Hashtable state)
Upon receiving this message the receiver should extract any relevant state out of state.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UndoableEdit

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Interface UndoableEdit

All Known Implementing Classes:
AbstractUndoableEdit
public interface UndoableEdit

An object representing an edit that has been done, and that can be undone and redone

Method Summary
boolean | addEdit(UndoableEdit anEdit) This UndoableEdit should absorb anEdit if it can.
boolean | canRedo() True if it is still possible to redo this operation
boolean | canUndo() True if it is still possible to undo this operation
void | die() May be sent to inform an edit that it should no longer be used.
String | getPresentationName() Provide a localized, human readable description of this edit suitable for use in, say, a change log.
String | getRedoPresentationName() Provide a localized, human readable description of the redoable form of this edit, e.g.
String | getUndoPresentationName() Provide a localized, human readable description of the undoable form of this edit, e.g.
boolean | isSignificant() Return false if this edit is insignificant--for example one that maintains the user's selection, but does not change any model state.
void | redo() Re-apply the edit, assuming that it has been undone.
boolean | replaceEdit(UndoableEdit anEdit) Return true if this UndoableEdit should replace anEdit.
void | undo() Undo the edit that was made.

Method Detail

undo

public void undo()
          throws CannotUndoException
Undo the edit that was made.

canUndo

public boolean canUndo()
True if it is still possible to undo this operation

redo

public void redo()
          throws CannotRedoException
Re-apply the edit, assuming that it has been undone.

canRedo

public boolean canRedo()
True if it is still possible to redo this operation

die

public void die()
May be sent to inform an edit that it should no longer be used. This is a useful hook for cleaning up state no longer needed once undoing or redoing is impossible--for example, deleting file resources used by objects that can no longer be undeleted. UndoManager calls this before it dequeues edits. Note that this is a one-way operation. There is no "undie" method.
See Also:
CompoundEdit.die()

addEdit

public boolean addEdit(UndoableEdit anEdit)
This UndoableEdit should absorb anEdit if it can. Return true if anEdit has been incoporated, false if it has not.

Typically the receiver is already in the queue of a UndoManager (or other UndoableEditListener), and is being given a chance to incorporate anEdit rather than letting it be added to the queue in turn.

If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().

replaceEdit

public boolean replaceEdit(UndoableEdit anEdit)
Return true if this UndoableEdit should replace anEdit. The receiver should incorporate anEdit's state before returning true.

This message is the opposite of addEdit--anEdit has typically already been queued in a UndoManager (or other UndoableEditListener), and the receiver is being given a chance to take its place.

If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().

isSignificant

public boolean isSignificant()
Return false if this edit is insignificant--for example one that maintains the user's selection, but does not change any model state. This status can be used by an UndoableEditListener (like UndoManager) when deciding which UndoableEdits to present to the user as Undo/Redo options, and which to perform as side effects of undoing or redoing other events.

getPresentationName

public String getPresentationName()
Provide a localized, human readable description of this edit suitable for use in, say, a change log.

getUndoPresentationName

public String getUndoPresentationName()
Provide a localized, human readable description of the undoable form of this edit, e.g. for use as an Undo menu item. Typically derived from getDescription();

getRedoPresentationName

public String getRedoPresentationName()
Provide a localized, human readable description of the redoable form of this edit, e.g. for use as a Redo menu item. Typically derived from getPresentationName();
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UndoableEditSupport

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class UndoableEditSupport

java.lang.Object
  |
  +--javax.swing.undo.UndoableEditSupport
public class UndoableEditSupport
extends Object

A support class used for managing UndoableEdit listeners.

Field Summary
protected CompoundEdit | compoundEdit
protected Vector | listeners
protected Object | realSource
protected int | updateLevel
Constructor Summary
UndoableEditSupport()
Constructs an UndoableEditSupport object.
UndoableEditSupport(Object r)
Constructs an UndoableEditSupport object.
Method Summary
protected void | _postEdit(UndoableEdit e) Called only from postEdit and endUpdate.
void | addUndoableEditListener(UndoableEditListener l) Registers an UndoableEditListener.
void | beginUpdate()
protected CompoundEdit | createCompoundEdit() Called only from beginUpdate.
void | endUpdate() DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
int | getUpdateLevel() Returns the update level value.
void | postEdit(UndoableEdit e) DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
void | removeUndoableEditListener(UndoableEditListener l) Removes an UndoableEditListener.
String | toString() Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

updateLevel

protected int updateLevel

compoundEdit

protected CompoundEdit compoundEdit

listeners

protected Vector listeners

realSource

protected Object realSource
Constructor Detail

UndoableEditSupport

public UndoableEditSupport()
Constructs an UndoableEditSupport object.

UndoableEditSupport

public UndoableEditSupport(Object r)
Constructs an UndoableEditSupport object.
Parameters:
r - an Object
Method Detail

addUndoableEditListener

public void addUndoableEditListener(UndoableEditListener l)
Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone.
Parameters:
l - an UndoableEditListener object
See Also:
removeUndoableEditListener(javax.swing.event.UndoableEditListener)

removeUndoableEditListener

public void removeUndoableEditListener(UndoableEditListener l)
Removes an UndoableEditListener.
Parameters:
l - an UndoableEditListener object
See Also:
addUndoableEditListener(javax.swing.event.UndoableEditListener)

_postEdit

protected void _postEdit(UndoableEdit e)
Called only from postEdit and endUpdate. Calls undoableEditHappened in all listeners. No synchronization is performed here, since the two calling methods are synchonized.

postEdit

public void postEdit(UndoableEdit e)
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.

getUpdateLevel

public int getUpdateLevel()
Returns the update level value.
Returns:
an int representing the update level

beginUpdate

public void beginUpdate()

createCompoundEdit

protected CompoundEdit createCompoundEdit()
Called only from beginUpdate. Exposed here for subclasses' use

endUpdate

public void endUpdate()
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UndoManager

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing.undo
Class UndoManager

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
              |
              +--javax.swing.undo.UndoManager
All Implemented Interfaces:
EventListener, Serializable, UndoableEdit, UndoableEditListener
public class UndoManager
extends CompoundEdit
implements UndoableEditListener

Concrete subclass of CompoundEdit which can serve as an UndoableEditListener, consolidating the UndoableEditEvents from a variety of sources, and undoing or redoing them one at a time. Unlike AbstractUndoableEdit and CompoundEdit, the public methods of this class are synchronized, and should be safe to call from multiple threads. This should make UndoManager a convenient marshall for sets of undoable JavaBeans.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Fields inherited from class javax.swing.undo.CompoundEdit
edits
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
Constructor Summary
UndoManager()
Method Summary
 boolean addEdit(UndoableEdit anEdit)
If inProgress, inserts anEdit at indexOfNextAdd, and removes any old edits that were at indexOfNextAdd or later.
 boolean canRedo()
Overridden to preserve usual semantics: returns true if a redo operation would be successful now, false otherwise
 boolean canUndo()
Overridden to preserve usual semantics: returns true if an undo operation would be successful now, false otherwise
 boolean canUndoOrRedo()
Return true if calling undoOrRedo will undo or redo.
 void discardAllEdits()
Empty the undo manager, sending each edit a die message in the process.
protected  UndoableEdit editToBeRedone()
Returns the the next significant edit to be redone if redo is called.
protected  UndoableEdit editToBeUndone()
Returns the the next significant edit to be undone if undo is called.
 void end()
Sending end() to an UndoManager turns it into a plain old (ended) CompoundEdit.
 int getLimit()
Returns the maximum number of edits this UndoManager will hold.
 String getRedoPresentationName()
If inProgress, returns getRedoPresentationName of the significant edit that will be redone when redo() is invoked.
 String getUndoOrRedoPresentationName()
Return the appropriate name for a command that toggles between undo and redo.
 String getUndoPresentationName()
If inProgress, returns getUndoPresentationName of the significant edit that will be undone when undo() is invoked.
 void redo()
If this UndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it.
protected  void redoTo(UndoableEdit edit)
Redoes all changes from indexOfNextAdd to edit.
 void setLimit(int l)
Set the maximum number of edits this UndoManager will hold.
 String toString()
Returns a string that displays and identifies this object's properties.
protected  void trimEdits(int from, int to)
Tell the edits in the given range (inclusive) to die, and remove them from edits.
protected  void trimForLimit()
Reduce the number of queued edits to a range of size limit, centered on indexOfNextAdd.
 void undo()
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it.
 void undoableEditHappened(UndoableEditEvent e)
Called by the UndoabledEdit sources this UndoManager listens to.
 void undoOrRedo()
Undo or redo as appropriate.
protected  void undoTo(UndoableEdit edit)
Undoes all changes from indexOfNextAdd to edit.
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UndoManager

public UndoManager()
Method Detail

getLimit

public int getLimit()
Returns the maximum number of edits this UndoManager will hold. Default value is 100.
See Also:
addEdit(javax.swing.undo.UndoableEdit), setLimit(int)

discardAllEdits

public void discardAllEdits()
Empty the undo manager, sending each edit a die message in the process.

trimForLimit

protected void trimForLimit()
Reduce the number of queued edits to a range of size limit, centered on indexOfNextAdd.

trimEdits

protected void trimEdits(int from,
                         int to)
Tell the edits in the given range (inclusive) to die, and remove them from edits. from > to is a no-op.

setLimit

public void setLimit(int l)
Set the maximum number of edits this UndoManager will hold. If edits need to be discarded to shrink the limit, they will be told to die in the reverse of the order that they were added.
See Also:
addEdit(javax.swing.undo.UndoableEdit), getLimit()

editToBeUndone

protected UndoableEdit editToBeUndone()
Returns the the next significant edit to be undone if undo is called. May return null

editToBeRedone

protected UndoableEdit editToBeRedone()
Returns the the next significant edit to be redone if redo is called. May return null

undoTo

protected void undoTo(UndoableEdit edit)
               throws CannotUndoException
Undoes all changes from indexOfNextAdd to edit. Updates indexOfNextAdd accordingly.

redoTo

protected void redoTo(UndoableEdit edit)
               throws CannotRedoException
Redoes all changes from indexOfNextAdd to edit. Updates indexOfNextAdd accordingly.

undoOrRedo

public void undoOrRedo()
                throws CannotRedoException,
                       CannotUndoException
Undo or redo as appropriate. Suitable for binding to an action that toggles between these two functions. Only makes sense to send this if limit == 1.
See Also:
canUndoOrRedo(), getUndoOrRedoPresentationName()

canUndoOrRedo

public boolean canUndoOrRedo()
Return true if calling undoOrRedo will undo or redo. Suitable for deciding to enable a command that toggles between the two functions, which only makes sense to use if limit == 1.
See Also:
undoOrRedo()

undo

public void undo()
          throws CannotUndoException
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it. Updates indexOfNextAdd accordingly.

If not inProgress, indexOfNextAdd is ignored and super's routine is called.

Overrides:
undo in class CompoundEdit
See Also:
CompoundEdit.end()

canUndo

public boolean canUndo()
Overridden to preserve usual semantics: returns true if an undo operation would be successful now, false otherwise
Overrides:
canUndo in class CompoundEdit
Following copied from class: javax.swing.undo.CompoundEdit
See Also:
CompoundEdit.isInProgress()

redo

public void redo()
          throws CannotRedoException
If this UndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it. Updates indexOfNextAdd accordingly.

If not inProgress, indexOfNextAdd is ignored and super's routine is called.

Overrides:
redo in class CompoundEdit
See Also:
CompoundEdit.end()

canRedo

public boolean canRedo()
Overridden to preserve usual semantics: returns true if a redo operation would be successful now, false otherwise
Overrides:
canRedo in class CompoundEdit
Following copied from class: javax.swing.undo.CompoundEdit
See Also:
CompoundEdit.isInProgress()

addEdit

public boolean addEdit(UndoableEdit anEdit)
If inProgress, inserts anEdit at indexOfNextAdd, and removes any old edits that were at indexOfNextAdd or later. The die method is called on each edit that is removed is sent, in the reverse of the order the edits were added. Updates indexOfNextAdd.

If not inProgress, acts as a CompoundEdit

Overrides:
addEdit in class CompoundEdit
See Also:
CompoundEdit.end(), CompoundEdit.addEdit(javax.swing.undo.UndoableEdit)

end

public void end()
Sending end() to an UndoManager turns it into a plain old (ended) CompoundEdit.

Calls super's end() method (making inProgress false), then sends die() to the unreachable edits at indexOfNextAdd and beyond, in the reverse of the order in which they were added.

Overrides:
end in class CompoundEdit
See Also:
CompoundEdit.end()

getUndoOrRedoPresentationName

public String getUndoOrRedoPresentationName()
Return the appropriate name for a command that toggles between undo and redo. Only makes sense to use such a command if limit == 1 and we're not in progress.

getUndoPresentationName

public String getUndoPresentationName()
If inProgress, returns getUndoPresentationName of the significant edit that will be undone when undo() is invoked. If there is none, returns AbstractUndoableEdit.undoText from the defaults table.

If not inProgress, acts as a CompoundEdit

Overrides:
getUndoPresentationName in class CompoundEdit
See Also:
undo(), CompoundEdit.getUndoPresentationName()

getRedoPresentationName

public String getRedoPresentationName()
If inProgress, returns getRedoPresentationName of the significant edit that will be redone when redo() is invoked. If there is none, returns AbstractUndoableEdit.redoText from the defaults table.

If not inProgress, acts as a CompoundEdit

Overrides:
getRedoPresentationName in class CompoundEdit
See Also:
redo(), CompoundEdit.getUndoPresentationName()

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent e)
Called by the UndoabledEdit sources this UndoManager listens to. Calls addEdit with e.getEdit().
Specified by:
undoableEditHappened in interface UndoableEditListener
See Also:
addEdit(javax.swing.undo.UndoableEdit)

toString

public String toString()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class CompoundEdit
Returns:
a String representation of this object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnsupportedLookAndFeelException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class UnsupportedLookAndFeelException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.swing.UnsupportedLookAndFeelException
All Implemented Interfaces:
Serializable
public class UnsupportedLookAndFeelException
extends Exception

An exception that indicates the request look & feel management classes are not present on the user's system.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
UnsupportedLookAndFeelException(String s)
Constructs an UnsupportedLookAndFeelException object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnsupportedLookAndFeelException

public UnsupportedLookAndFeelException(String s)
Constructs an UnsupportedLookAndFeelException object.
Parameters:
s - a message String
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ViewListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JViewport.ViewListener

java.lang.Object
  |
  +--java.awt.event.ComponentAdapter
        |
        +--javax.swing.JViewport.ViewListener
All Implemented Interfaces:
ComponentListener, EventListener, Serializable
Enclosing class:
JViewport
protected class JViewport.ViewListener
extends ComponentAdapter
implements Serializable

A listener for the view.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
protected JViewport.ViewListener()
Method Summary
 void componentResized(ComponentEvent e)
Invoked when the component's size changes.
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentMoved, componentShown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JViewport.ViewListener

protected JViewport.ViewListener()
Method Detail

componentResized

public void componentResized(ComponentEvent e)
Description copied from class: ComponentAdapter
Invoked when the component's size changes.
Overrides:
componentResized in class ComponentAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ViewportLayout

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class ViewportLayout

java.lang.Object
  |
  +--javax.swing.ViewportLayout
All Implemented Interfaces:
LayoutManager, Serializable
public class ViewportLayout
extends Object
implements LayoutManager, Serializable

The default layout manager for JViewport. ViewportLayout defines a policy for layout that should be useful for most applications. The viewport makes its view the same size as the viewport, however it will not make the view smaller than its minimum size. As the viewport grows the view is kept bottom justified until the entire view is visible, subsequently the view is kept top justified.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
ViewportLayout()
Method Summary
void | addLayoutComponent(String name, Component c) Adds the specified component to the layout.
void | layoutContainer(Container parent) Called by the AWT when the specified container needs to be laid out.
Dimension | minimumLayoutSize(Container parent) Returns the minimum dimensions needed to layout the components contained in the specified target container.
Dimension | preferredLayoutSize(Container parent) Returns the preferred dimensions for this layout given the components in the specified target container.
void | removeLayoutComponent(Component c) Removes the specified component from the layout.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ViewportLayout

public ViewportLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component c)
Adds the specified component to the layout. Not used by this class.
Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component
comp - the the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component c)
Removes the specified component from the layout. Not used by this class.
Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to remove

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Returns the preferred dimensions for this layout given the components in the specified target container.
Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
a Dimension object containing the preferred dimensions
See Also:
minimumLayoutSize(java.awt.Container)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
target - the component which needs to be laid out
Returns:
a Dimension object containing the minimum dimensions
See Also:
preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(Container parent)
Called by the AWT when the specified container needs to be laid out.
Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the container to lay out
Throws:
AWTError - if the target isn't the container specified to the BoxLayout constructor
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WindowConstants

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.swing
Interface WindowConstants

All Known Implementing Classes:
JInternalFrame, JFrame, JDialog
public interface WindowConstants

Constants used to control the window-closing operation. The setDefaultCloseOperation and getDefaultCloseOperation methods provided by JFrame, JInternalFrame, and JDialog use these constants. For examples of setting the default window-closing operation, see Responding to Window-Closing Events, a section in The Java Tutorial.

Field Summary
static int | DISPOSE_ON_CLOSE The dispose-window default window close operation
static int | DO_NOTHING_ON_CLOSE The do-nothing default window close operation
static int | HIDE_ON_CLOSE The hide-window default window close operation

Field Detail

DO_NOTHING_ON_CLOSE

public static final int DO_NOTHING_ON_CLOSE
The do-nothing default window close operation

HIDE_ON_CLOSE

public static final int HIDE_ON_CLOSE
The hide-window default window close operation

DISPOSE_ON_CLOSE

public static final int DISPOSE_ON_CLOSE
The dispose-window default window close operation
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WinListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.swing
Class JMenu.WinListener

java.lang.Object
  |
  +--java.awt.event.WindowAdapter
        |
        +--javax.swing.JMenu.WinListener
All Implemented Interfaces:
EventListener, Serializable, WindowListener
Enclosing class:
JMenu
protected class JMenu.WinListener
extends WindowAdapter
implements Serializable

A listener class that watches for a popup window closing. When the popup is closing, the listener deselects the menu.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
JMenu.WinListener(JPopupMenu p)
Create the window listener for the specified popup.
Method Summary
 void windowClosing(WindowEvent e)
Deselect the menu when the popup is closed from outside.
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JMenu.WinListener

public JMenu.WinListener(JPopupMenu p)
Create the window listener for the specified popup.
Method Detail

windowClosing

public void windowClosing(WindowEvent e)
Deselect the menu when the popup is closed from outside.
Overrides:
windowClosing in class WindowAdapter
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


javax.transaction Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package javax.transaction

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.io.IOException
          • class java.rmi.RemoteException
            • class javax.transaction.InvalidTransactionException
            • class javax.transaction.TransactionRequiredException
            • class javax.transaction.TransactionRolledbackException
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package javax.transaction

Contains three exceptions thrown by the ORB machinery during unmarshalling.

See:
Description

Exception Summary
InvalidTransactionException | This exception indicates that the request carried an invalid transaction context.
TransactionRequiredException | This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.
TransactionRolledbackException | This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back.

Package javax.transaction Description

Contains three exceptions thrown by the ORB machinery during unmarshalling.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package javax.transaction

PREV NEXT FRAMES NO FRAMES

Uses of Package
javax.transaction

No usage of javax.transaction

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.transaction.InvalidTransactionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.transaction.InvalidTransactionException

No usage of javax.transaction.InvalidTransactionException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.transaction.TransactionRequiredException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.transaction.TransactionRequiredException

No usage of javax.transaction.TransactionRequiredException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class javax.transaction.TransactionRolledbackException

PREV NEXT FRAMES NO FRAMES

Uses of Class
javax.transaction.TransactionRolledbackException

No usage of javax.transaction.TransactionRolledbackException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


InvalidTransactionException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.transaction
Class InvalidTransactionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--javax.transaction.InvalidTransactionException
All Implemented Interfaces:
Serializable
public class InvalidTransactionException
extends RemoteException

This exception indicates that the request carried an invalid transaction context. For example, this exception could be raised if an error occured when trying to register a resource.

See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
InvalidTransactionException()
InvalidTransactionException(String msg)
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidTransactionException

public InvalidTransactionException()

InvalidTransactionException

public InvalidTransactionException(String msg)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TransactionRequiredException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.transaction
Class TransactionRequiredException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--javax.transaction.TransactionRequiredException
All Implemented Interfaces:
Serializable
public class TransactionRequiredException
extends RemoteException

This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction.

See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
TransactionRequiredException()
TransactionRequiredException(String msg)
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TransactionRequiredException

public TransactionRequiredException()

TransactionRequiredException

public TransactionRequiredException(String msg)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TransactionRolledbackException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.transaction
Class TransactionRolledbackException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--java.rmi.RemoteException
                          |
                          +--javax.transaction.TransactionRolledbackException
All Implemented Interfaces:
Serializable
public class TransactionRolledbackException
extends RemoteException

This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back. Thus the requested operation either could not be performed or was not performed because further computation on behalf of the transaction would be fruitless

See Also:
Serialized Form

Fields inherited from class java.rmi.RemoteException
detail
Constructor Summary
TransactionRolledbackException()
TransactionRolledbackException(String msg)
Methods inherited from class java.rmi.RemoteException
getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TransactionRolledbackException

public TransactionRolledbackException()

TransactionRolledbackException

public TransactionRolledbackException(String msg)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


_PolicyStub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class _PolicyStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA._PolicyStub
All Implemented Interfaces:
IDLEntity, Object, Policy, PolicyOperations, Serializable
public class _PolicyStub
extends ObjectImpl
implements Policy

org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl. Saturday, July 17, 1999 12:26:20 AM PDT

See Also:
Serialized Form

Constructor Summary
_PolicyStub()
Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.
_PolicyStub(Delegate delegate)
Constructs a _PolicyStub object initialized with the given Delegate object.
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
Policy | copy() Copies the policy object.
void | destroy() Destroys the policy object.
int | policy_type() Returns the constant value that corresponds to the type of the policy object.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_PolicyStub

public _PolicyStub()
Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.

_PolicyStub

public _PolicyStub(Delegate delegate)
Constructs a _PolicyStub object initialized with the given Delegate object.
Parameters:
delegate - a Delegate Object
Method Detail

policy_type

public int policy_type()
Returns the constant value that corresponds to the type of the policy object. The values of the polivy objectys are allocated by the OMG. New values for PolicyType should be obtained from the OMG by sending mail to request@omg.org. In general the constant values that are allocated are defined in conjunction with the definition of the corresponding policy object.
Specified by:
policy_type in interface PolicyOperations
Returns:
the constant value that corresponds to the type of the policy object.

copy

public Policy copy()
Copies the policy object. The copy does not retain any relationships that the policy had with any domain or object.
Specified by:
copy in interface PolicyOperations
Returns:
the copy of the policy object.

destroy

public void destroy()
Destroys the policy object. It is the responsibility of the policy object to determine whether it can be destroyed.
Specified by:
destroy in interface PolicyOperations

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Current

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface Current

All Superinterfaces:
CurrentOperations, IDLEntity, Object, Serializable
public interface Current
extends CurrentOperations, Object, IDLEntity

org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.

Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CurrentOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface CurrentOperations

All Known Subinterfaces:
Current
public interface CurrentOperations

org/omg/CORBA/CurrentOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


_IDLTypeStub

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class _IDLTypeStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA._IDLTypeStub
All Implemented Interfaces:
IDLEntity, IDLType, IDLTypeOperations, IRObject, IRObjectOperations, Object, Serializable
public class _IDLTypeStub
extends ObjectImpl
implements IDLType

org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl. 03 June 1999 11:33:44 o'clock GMT+00:00

See Also:
Serialized Form

Constructor Summary
_IDLTypeStub()
Constructs a default _IDLTypeStub object.
_IDLTypeStub(Delegate delegate)
Constructs an _IDLTypeStub object initialized with the given Delegate object.
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
DefinitionKind | def_kind() Returns the DefinitionKind corresponding to this Interface Repository object.
void | destroy() Destroys this object.
TypeCode | type() The type attribute describes the type defined by an object derived from IDLType.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_IDLTypeStub

public _IDLTypeStub()
Constructs a default _IDLTypeStub object. NOTE: If the default constructor is used, the object is useless until the method _set_delegate has been called.

_IDLTypeStub

public _IDLTypeStub(Delegate delegate)
Constructs an _IDLTypeStub object initialized with the given Delegate object.
Parameters:
delegate - a Delegate object
Method Detail

type

public TypeCode type()
Description copied from interface: IDLTypeOperations
The type attribute describes the type defined by an object derived from IDLType.
Specified by:
type in interface IDLTypeOperations
Following copied from interface: org.omg.CORBA.IDLTypeOperations
Returns:
the TypeCode defined by this object.

def_kind

public DefinitionKind def_kind()
Description copied from interface: IRObjectOperations
Returns the DefinitionKind corresponding to this Interface Repository object.
Specified by:
def_kind in interface IRObjectOperations
Following copied from interface: org.omg.CORBA.IRObjectOperations
Returns:
the DefinitionKind corresponding to this Interface Repository object.

destroy

public void destroy()
Description copied from interface: IRObjectOperations
Destroys this object. If the object is a Container, this method is applied to all its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed. If the method is invoked on a Repository or on a PrimitiveDef then the BAD_INV_ORDER exception is raised with minor value 2. An attempt to destroy an object that would leave the repository in an incoherent state causes BAD_INV_ORDER exception to be raised with the minor code 1.
Specified by:
destroy in interface IRObjectOperations
Following copied from interface: org.omg.CORBA.IRObjectOperations
Throws:
BAD_INV_ORDER -

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DomainManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DomainManager

All Superinterfaces:
DomainManagerOperations, IDLEntity, Object, Serializable
public interface DomainManager
extends DomainManagerOperations, Object, IDLEntity

The DomainManager has associated with it the policy objects for a particular domain. The domain manager also records the membership of the domain and provides the means to add and remove members. The domain manager is itself a member of a domain, possibly the domain it manages. The domain manager provides mechanisms for establishing and navigating relationships to superior and subordinate domains and creating and accessing policies.

Methods inherited from interface org.omg.CORBA.DomainManagerOperations
get_domain_policy
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IDLType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface IDLType

All Superinterfaces:
IDLEntity, IDLTypeOperations, IRObject, IRObjectOperations, Object, Serializable
All Known Implementing Classes:
_IDLTypeStub
public interface IDLType
extends IDLTypeOperations, IRObject, IDLEntity

An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types. It provides access to the TypeCode object describing the type and is used in defining the other interfaces wherever definitions of IDLType must be referenced.

Methods inherited from interface org.omg.CORBA.IDLTypeOperations
type
Methods inherited from interface org.omg.CORBA.IRObjectOperations
def_kind, destroy
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IRObject

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface IRObject

All Superinterfaces:
IDLEntity, IRObjectOperations, Object, Serializable
All Known Subinterfaces:
IDLType, Repository
public interface IRObject
extends IRObjectOperations, Object, IDLEntity

An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.

Methods inherited from interface org.omg.CORBA.IRObjectOperations
def_kind, destroy
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Object

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface Object

All Known Implementing Classes:
ObjectImpl
public interface Object

The definition for a CORBA object reference.

A CORBA object reference is a handle for a particular CORBA object implemented by a server. A CORBA object reference identifies the same CORBA object each time the reference is used to invoke a method on the object. A CORBA object may have multiple, distinct object references.

The org.omg.CORBA.Object interface is the root of the inheritance hierarchy for all CORBA object references in the Java programming language, analogous to java.rmi.Remote for RMI remote objects.

A CORBA object may be either local or remote. If it is a local object (that is, running in the same VM as the client), invocations may be directly serviced by the object instance, and the object reference could point to the actual instance of the object implementation class. If a CORBA object is a remote object (that is, running in a different VM from the client), the object reference points to a stub (proxy) which uses the ORB machinery to make a remote invocation on the server where the object implementation resides.

Default implementations of the methods in the interface org.omg.CORBA.Object are provided in the class org.omg.CORBA.portable.ObjectImpl, which is the base class for stubs and object implementations.

See Also:
ObjectImpl

Method Summary
Request | _create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
Object | _duplicate() Returns a duplicate of this CORBA object reference.
DomainManager[] | _get_domain_managers() Retrieves the DomainManagers of this object.
Object | _get_interface_def() Obtains an InterfaceDef for the object implementation referenced by this object reference.
Policy | _get_policy(int policy_type) Returns the Policy object of the specified type which applies to this object.
int | _hash(int maximum) Returns an ORB-internal identifier for this object reference.
boolean | _is_a(String repositoryIdentifier) Checks whether this object is an instance of a class that implements the given interface.
boolean | _is_equivalent(Object other) Determines whether the two object references are equivalent, so far as the ORB can easily determine.
boolean | _non_existent() Determines whether the server object for this object reference has been destroyed.
void | _release() Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released.
Request | _request(String operation) Creates a Request instance for use in the Dynamic Invocation Interface.
Object | _set_policy_override(Policy[] policies, SetOverrideType set_add) Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.

Method Detail

_is_a

public boolean _is_a(String repositoryIdentifier)
Checks whether this object is an instance of a class that implements the given interface.
Parameters:
repositoryIdentifier - the interface to check against
Returns:
true if this object reference is an instance of a class that implements the interface; false otherwise

_is_equivalent

public boolean _is_equivalent(Object other)
Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive.
Parameters:
other - the other object reference with which to check for equivalence
Returns:
true if this object reference is known to be equivalent to the given object reference. Note that false indicates only that the two object references are distinct, not necessarily that they reference distinct objects.

_non_existent

public boolean _non_existent()
Determines whether the server object for this object reference has been destroyed.
Returns:
true if the ORB knows authoritatively that the server object does not exist; false otherwise

_hash

public int _hash(int maximum)
Returns an ORB-internal identifier for this object reference. This is a hash identifier, which does not change during the lifetime of the object reference, and so neither will any hash function of that identifier change. The value returned is not guaranteed to be unique; in other words, another object reference may have the same hash value. If two object references hash differently, then they are distinct object references; however, both may still refer to the same CORBA object.
Parameters:
maximum - the upper bound on the hash value returned by the ORB
Returns:
the ORB-internal hash identifier for this object reference

_duplicate

public Object _duplicate()
Returns a duplicate of this CORBA object reference. The server object implementation is not involved in creating the duplicate, and the implementation cannot distinguish whether the original object reference or a duplicate was used to make a request.

Note that this method is not very useful in the Java platform, since memory management is handled by the VM. It is included for compliance with the CORBA APIs.

The method _duplicate may return this object reference itself.

Returns:
a duplicate of this object reference or this object reference itself

_release

public void _release()
Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released. Note that the object implementation is not involved in this operation, and other references to the same object are not affected.

_get_interface_def

public Object _get_interface_def()
Obtains an InterfaceDef for the object implementation referenced by this object reference. The InterfaceDef object may be used to introspect on the methods, attributes, and other type information for the object referred to by this object reference.
Returns:
the InterfaceDef object in the Interface Repository which provides type information about the object referred to by this object reference

_request

public Request _request(String operation)
Creates a Request instance for use in the Dynamic Invocation Interface.
Parameters:
operation - the name of the method to be invoked using the Request instance
Returns:
the newly-created Request instance

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Parameters:
ctx - a Context object containing a list of properties
operation - the name of the method to be invoked
arg_list - an NVList containing the actual arguments to the method being invoked
result - a NamedValue object to serve as a container for the method's return value
Returns:
the newly-created Request object
See Also:
Request, NVList, NamedValue

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result,
                               ExceptionList exclist,
                               ContextList ctxlist)
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
Parameters:
ctx - a Context object containing a list of properties
operation - the name of the method to be invoked
arg_list - an NVList containing the actual arguments to the method being invoked
result - a NamedValue object to serve as a container for the method's return value
exclist - an ExceptionList object containing a list of possible exceptions the method can throw
ctxlist - a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
Returns:
the newly-created Request object
See Also:
Request, NVList, NamedValue, ExceptionList, ContextList

_get_policy

public Policy _get_policy(int policy_type)
Returns the Policy object of the specified type which applies to this object.
Parameters:
policy_type - the type of policy to be obtained
Returns:
A Policy object of the type specified by the policy_type parameter
Throws:
BAD_PARAM - when the value of policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object

_get_domain_managers

public DomainManager[] _get_domain_managers()
Retrieves the DomainManagers of this object. This allows administration services (and applications) to retrieve the domain managers, and hence the security and other policies applicable to individual objects that are members of the domain.
Returns:
the list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.

_set_policy_override

public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
Parameters:
policies - an array of Policy objects containing the policies to be added or to be used as replacements
set_add - either SetOverrideType.SET_OVERRIDE, indicating that the given policies will replace any existing ones, or SetOverrideType.ADD_OVERRIDE, indicating that the given policies should be added to any existing ones
Returns:
a new Object with the given policies replacing or added to those in this Object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CORBA.Any (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.AnyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.AnySeqHelper
    • class org.omg.CORBA.AnySeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.BooleanHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.BooleanSeqHelper
    • class org.omg.CORBA.BooleanSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ByteHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.CharHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.CharSeqHelper
    • class org.omg.CORBA.CharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.CompletionStatus (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.CompletionStatusHelper
    • class org.omg.CORBA.Context
    • class org.omg.CORBA.ContextList
    • class org.omg.CORBA.CurrentHelper
    • class org.omg.CORBA.CurrentHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.DefinitionKind (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.DefinitionKindHelper
    • class org.omg.CORBA.DoubleHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.DoubleSeqHelper
    • class org.omg.CORBA.DoubleSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.Environment
    • class org.omg.CORBA.ExceptionList
    • class org.omg.CORBA.FieldNameHelper
    • class org.omg.CORBA.FixedHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.FloatHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.FloatSeqHelper
    • class org.omg.CORBA.FloatSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.IdentifierHelper
    • class org.omg.CORBA.IDLTypeHelper
    • class org.omg.CORBA.Initializer (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.IntHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.LongHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.LongLongSeqHelper
    • class org.omg.CORBA.LongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.LongSeqHelper
    • class org.omg.CORBA.LongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.NamedValue
    • class org.omg.CORBA.NameValuePair (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.NameValuePairHelper
    • class org.omg.CORBA.NVList
    • class org.omg.CORBA.ObjectHelper
    • class org.omg.CORBA.ObjectHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CORBA._IDLTypeStub (implements org.omg.CORBA.IDLType)
      • class org.omg.CORBA._PolicyStub (implements org.omg.CORBA.Policy)
      • class org.omg.CORBA.DynamicImplementation
    • class org.omg.CORBA.OctetSeqHelper
    • class org.omg.CORBA.OctetSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ORB
    • class org.omg.CORBA.PolicyHelper
    • class org.omg.CORBA.PolicyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.PolicyListHelper
    • class org.omg.CORBA.PolicyListHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.PolicyTypeHelper
    • class org.omg.CORBA.Principal
    • class org.omg.CORBA.PrincipalHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.RepositoryIdHelper
    • class org.omg.CORBA.Request
    • class org.omg.CORBA.ServerRequest
    • class org.omg.CORBA.ServiceDetail (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ServiceDetailHelper
    • class org.omg.CORBA.ServiceInformation (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ServiceInformationHelper
    • class org.omg.CORBA.ServiceInformationHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.SetOverrideType (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.SetOverrideTypeHelper
    • class org.omg.CORBA.ShortHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ShortSeqHelper
    • class org.omg.CORBA.ShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.StringHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.StringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)
    • class org.omg.CORBA.StructMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.StructMemberHelper
    • class org.omg.CORBA.TCKind
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class org.omg.CORBA.SystemException
            • class org.omg.CORBA.BAD_CONTEXT
            • class org.omg.CORBA.BAD_INV_ORDER
            • class org.omg.CORBA.BAD_OPERATION
            • class org.omg.CORBA.BAD_PARAM
            • class org.omg.CORBA.BAD_TYPECODE
            • class org.omg.CORBA.COMM_FAILURE
            • class org.omg.CORBA.DATA_CONVERSION
            • class org.omg.CORBA.FREE_MEM
            • class org.omg.CORBA.IMP_LIMIT
            • class org.omg.CORBA.INITIALIZE
            • class org.omg.CORBA.INTERNAL
            • class org.omg.CORBA.INTF_REPOS
            • class org.omg.CORBA.INV_FLAG
            • class org.omg.CORBA.INV_IDENT
            • class org.omg.CORBA.INV_OBJREF
            • class org.omg.CORBA.INV_POLICY
            • class org.omg.CORBA.INVALID_TRANSACTION
            • class org.omg.CORBA.MARSHAL
            • class org.omg.CORBA.NO_IMPLEMENT
            • class org.omg.CORBA.NO_MEMORY
            • class org.omg.CORBA.NO_PERMISSION
            • class org.omg.CORBA.NO_RESOURCES
            • class org.omg.CORBA.NO_RESPONSE
            • class org.omg.CORBA.OBJ_ADAPTER
            • class org.omg.CORBA.OBJECT_NOT_EXIST
            • class org.omg.CORBA.PERSIST_STORE
            • class org.omg.CORBA.TRANSACTION_REQUIRED
            • class org.omg.CORBA.TRANSACTION_ROLLEDBACK
            • class org.omg.CORBA.TRANSIENT
            • class org.omg.CORBA.UNKNOWN
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.Bounds
          • class org.omg.CORBA.PolicyError
          • class org.omg.CORBA.UnknownUserException
          • class org.omg.CORBA.WrongTransaction
    • class org.omg.CORBA.TypeCode (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.TypeCodeHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ULongLongSeqHelper
    • class org.omg.CORBA.ULongLongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ULongSeqHelper
    • class org.omg.CORBA.ULongSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.UnionMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.UnionMemberHelper
    • class org.omg.CORBA.UShortSeqHelper
    • class org.omg.CORBA.UShortSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ValueBaseHelper
    • class org.omg.CORBA.ValueBaseHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.ValueMember (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CORBA.ValueMemberHelper
    • class org.omg.CORBA.VersionSpecHelper
    • class org.omg.CORBA.VisibilityHelper
    • class org.omg.CORBA.WCharSeqHelper
    • class org.omg.CORBA.WCharSeqHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.WStringValueHelper (implements org.omg.CORBA.portable.BoxedValueHelper)

Interface Hierarchy

  • interface org.omg.CORBA.ARG_IN
  • interface org.omg.CORBA.ARG_INOUT
  • interface org.omg.CORBA.ARG_OUT
  • interface org.omg.CORBA.BAD_POLICY
  • interface org.omg.CORBA.BAD_POLICY_TYPE
  • interface org.omg.CORBA.BAD_POLICY_VALUE
  • interface org.omg.CORBA.CTX_RESTRICT_SCOPE
  • interface org.omg.CORBA.CurrentOperations
    • interface org.omg.CORBA.Current (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface org.omg.CORBA.CustomMarshal
  • interface org.omg.CORBA.IRObjectOperations
    • interface org.omg.CORBA.IDLTypeOperations
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObject)
    • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
  • interface org.omg.CORBA.Object
    • interface org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.DomainManagerOperations
      • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
    • interface org.omg.CORBA.DynAny
      • interface org.omg.CORBA.DynArray (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynEnum (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynFixed (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynSequence (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynStruct (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynUnion (also extends org.omg.CORBA.Object)
      • interface org.omg.CORBA.DynValue (also extends org.omg.CORBA.Object)
    • interface org.omg.CORBA.DynArray (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynEnum (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynFixed (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynSequence (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynStruct (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynUnion (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.DynValue (also extends org.omg.CORBA.DynAny)
    • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IRObjectOperations)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.PolicyOperations)
  • interface org.omg.CORBA.OMGVMCID
  • interface org.omg.CORBA.PolicyOperations
    • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface org.omg.CORBA.PRIVATE_MEMBER
  • interface org.omg.CORBA.PUBLIC_MEMBER
  • interface java.io.Serializable
    • interface org.omg.CORBA.portable.IDLEntity
      • interface org.omg.CORBA.Current (also extends org.omg.CORBA.CurrentOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.DomainManager (also extends org.omg.CORBA.DomainManagerOperations, org.omg.CORBA.Object)
      • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.IDLTypeOperations, org.omg.CORBA.IRObject)
      • interface org.omg.CORBA.IRObject (also extends org.omg.CORBA.IRObjectOperations, org.omg.CORBA.Object)
        • interface org.omg.CORBA.IDLType (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.IDLTypeOperations)
        • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.portable.IDLEntity)
      • interface org.omg.CORBA.Policy (also extends org.omg.CORBA.Object, org.omg.CORBA.PolicyOperations)
      • interface org.omg.CORBA.Repository (also extends org.omg.CORBA.IRObject)
      • interface org.omg.CORBA.portable.ValueBase
        • interface org.omg.CORBA.DataInputStream
        • interface org.omg.CORBA.DataOutputStream
  • interface org.omg.CORBA.UNSUPPORTED_POLICY
  • interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE
  • interface org.omg.CORBA.VM_ABSTRACT
  • interface org.omg.CORBA.VM_CUSTOM
  • interface org.omg.CORBA.VM_NONE
  • interface org.omg.CORBA.VM_TRUNCATABLE
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Policy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface Policy

All Superinterfaces:
IDLEntity, Object, PolicyOperations, Serializable
All Known Implementing Classes:
_PolicyStub
public interface Policy
extends PolicyOperations, Object, IDLEntity

org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Methods inherited from interface org.omg.CORBA.PolicyOperations
copy, destroy, policy_type
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Repository

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface Repository

All Superinterfaces:
IDLEntity, IRObject, IRObjectOperations, Object, Serializable
public interface Repository
extends IRObject, IDLEntity

This is the interface which defines the interface repository. (>>>Internal Note: The interface as defined here will be modified to meet the standard, before Kestrel.))

Methods inherited from interface org.omg.CORBA.IRObjectOperations
def_kind, destroy
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package org.omg.CORBA

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA

Packages that use org.omg.CORBA
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in org.omg.CORBA used by javax.rmi.CORBA
Object
The definition for a CORBA object reference.
ORB
A class providing APIs for the CORBA Object Request Broker features.
SystemException
The root class for all CORBA standard exceptions.

Classes in org.omg.CORBA used by org.omg.CORBA
Any
Serves as a container for any data that can be described in IDL or for any IDL primitive type.
AnySeqHolder
org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
BAD_OPERATION
The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
BAD_PARAM
The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
BooleanSeqHolder
org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
Bounds
A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
CharSeqHolder
org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
CompletionStatus
An object that indicates whether a method had completed running when a SystemException was thrown.
Context
An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
ContextList
An object containing a modifiable list of String objects that represent property names.
Current
org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
CurrentOperations
org/omg/CORBA/CurrentOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
DATA_CONVERSION
The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
DataInputStream
Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
DataOutputStream
Defines the methods used to write primitive data types to output streams for marshalling custom value types.
DefinitionKind
The class that provides the constants used to identify the type of an Interface Repository object.
DomainManager
The DomainManager has associated with it the policy objects for a particular domain.
DomainManagerOperations
The DomainManager has associated with it the policy objects for a particular domain.
DoubleSeqHolder
org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
DynAny
org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynArray
The DynArray interface represents a DynAny object which is associated with an array.
DynEnum
The DynEnum interface represents a DynAny object which is associated with an IDL enum.
DynSequence
The representation of a DynAny object that is associated with an IDL sequence.
DynStruct
The representation of a DynAny object that is associated with an IDL struct.
DynUnion
The DynUnion interface represents a DynAny object that is associated with an IDL union.
Environment
A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
ExceptionList
An object used in Request operations to describe the exceptions that can be thrown by a method.
FloatSeqHolder
org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
IDLType
An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
IDLTypeOperations
This interface must be implemented by all IDLType objects.
IRObject
An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
IRObjectOperations
This is the Operations interface for the mapping from IRObject.
LongLongSeqHolder
org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongSeqHolder
org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
MARSHAL
The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
NamedValue
An object used in the DII and DSI to describe arguments and return values.
NameValuePair
The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
NVList
A modifiable list containing NamedValue objects.
Object
The definition for a CORBA object reference.
OctetSeqHolder
org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
Policy
org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyError
An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
PolicyOperations
org/omg/CORBA/PolicyOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
Principal
Deprecated. Deprecated by CORBA 2.2.
Request
An object containing the information necessary for invoking a method.
ServerRequest
An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
ServiceDetail
An object that represents an ORB service.
ServiceInformation
ServiceInformation is an IDL struct in the CORBA module.
ServiceInformationHolder
A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods.
SetOverrideType
The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
ShortSeqHolder
org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
StructMember
A description of a member of an IDL struct.
SystemException
The root class for all CORBA standard exceptions.
TCKind
The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
TypeCode
A container for information about a specific CORBA data type.
ULongLongSeqHolder
org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
ULongSeqHolder
org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
UnionMember
A description in the Interface Repository of a member of an IDL union.
UserException
The root class for CORBA IDL-defined user exceptions.
UShortSeqHolder
org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ValueMember
A description in the Interface Repository of a member of a value object.
WCharSeqHolder
org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
WrongTransaction
The CORBA WrongTransaction user-defined exception.

Classes in org.omg.CORBA used by org.omg.CORBA_2_3
BAD_PARAM
The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
ORB
A class providing APIs for the CORBA Object Request Broker features.

Classes in org.omg.CORBA used by org.omg.CORBA.DynAnyPackage
UserException
The root class for CORBA IDL-defined user exceptions.

Classes in org.omg.CORBA used by org.omg.CORBA.ORBPackage
UserException
The root class for CORBA IDL-defined user exceptions.

Classes in org.omg.CORBA used by org.omg.CORBA.portable
Any
Serves as a container for any data that can be described in IDL or for any IDL primitive type.
Context
An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
ContextList
An object containing a modifiable list of String objects that represent property names.
CustomMarshal
The CustomMarshal is an abstract value type that is meant to be used by the ORB, not the user.
DomainManager
The DomainManager has associated with it the policy objects for a particular domain.
ExceptionList
An object used in Request operations to describe the exceptions that can be thrown by a method.
NamedValue
An object used in the DII and DSI to describe arguments and return values.
NVList
A modifiable list containing NamedValue objects.
Object
The definition for a CORBA object reference.
ORB
A class providing APIs for the CORBA Object Request Broker features.
Policy
org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
Principal
Deprecated. Deprecated by CORBA 2.2.
Request
An object containing the information necessary for invoking a method.
SetOverrideType
The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
SystemException
The root class for all CORBA standard exceptions.
TypeCode
A container for information about a specific CORBA data type.

Classes in org.omg.CORBA used by org.omg.CORBA.TypeCodePackage
UserException
The root class for CORBA IDL-defined user exceptions.

Classes in org.omg.CORBA used by org.omg.CosNaming
Any
Serves as a container for any data that can be described in IDL or for any IDL primitive type.
BAD_PARAM
The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
DynamicImplementation
The base class for all object implementations using the DSI.
Object
The definition for a CORBA object reference.
ServerRequest
An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
TypeCode
A container for information about a specific CORBA data type.

Classes in org.omg.CORBA used by org.omg.CosNaming.NamingContextPackage
Any
Serves as a container for any data that can be described in IDL or for any IDL primitive type.
BAD_PARAM
The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
TypeCode
A container for information about a specific CORBA data type.
UserException
The root class for CORBA IDL-defined user exceptions.

Classes in org.omg.CORBA used by org.omg.SendingContext
Object
The definition for a CORBA object reference.

Classes in org.omg.CORBA used by org.omg.stub.java.rmi
Object
The definition for a CORBA object reference.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Any

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Any

java.lang.Object
  |
  +--org.omg.CORBA.Any
All Implemented Interfaces:
IDLEntity, Serializable
public abstract class Any
extends Object
implements IDLEntity

Serves as a container for any data that can be described in IDL or for any IDL primitive type. An Any object is used as a component of a NamedValue object, which provides information about arguments or return values in requests, and which is used to define name/value pairs in Context objects.

An Any object consists of two parts:

  1. a data value
  2. a TypeCode object describing the type of the data value contained in the Any object. For example, a TypeCode object for an array contains a field for the length of the array and a field for the type of elements in the array. (Note that in this case, the second field of the TypeCode object is itself a TypeCode object.)

A large part of the Any class consists of pairs of methods for inserting values into and extracting values from an Any object.

For a given primitive type X, these methods are:

void insert_X(X x)
This method allows the insertion of an instance x of primitive type X into the value field of the Any object. Note that the method insert_X also resets the Any object's type field if necessary.
X extract_X()
This method allows the extraction of an instance of type X from the Any object.

This method throws the exception BAD_OPERATION under two conditions:

  1. the type of the element contained in the Any object is not X
  2. the method extract_X is called before the value field of the Any object has been set

There are distinct method pairs for each primitive IDL data type (insert_long and extract_long, insert_string and extract_string, and so on).

The class Any also has methods for getting and setting the type code, for testing two Any objects for equality, and for reading an Any object from a stream or writing it to a stream.

Since:
JDK1.2
See Also:
Serialized Form

Constructor Summary
Any()
Method Summary
abstract InputStream | create_input_stream() Creates an input stream from which this Any object's value can be unmarshalled.
abstract OutputStream | create_output_stream() Creates an output stream into which this Any object's value can be marshalled.
abstract boolean | equal(Any a) Checks for equality between this Any object and the given Any object.
abstract Any | extract_any() Extracts the Any object in this Any object's value field.
abstract boolean | extract_boolean() Extracts the boolean in this Any object's value field.
abstract char | extract_char() Extracts the char in this Any object's value field.
abstract double | extract_double() Extracts the double in this Any object's value field.
BigDecimal | extract_fixed() Extracts the java.math.BigDecimal object in this Any object's value field.
abstract float | extract_float() Extracts the float in this Any object's value field.
abstract int | extract_long() Extracts the int in this Any object's value field.
abstract long | extract_longlong() Extracts the long in this Any object's value field.
abstract Object | extract_Object() Extracts the org.omg.CORBA.Object in this Any object's value field.
abstract byte | extract_octet() Extracts the byte in this Any object's value field.
abstract Principal | extract_Principal() Deprecated. Deprecated by CORBA 2.2.
abstract short | extract_short() Extracts the short in this Any object's value field.
abstract String | extract_string() Extracts the String object in this Any object's value field.
abstract TypeCode | extract_TypeCode() Extracts the TypeCode object in this Any object's value field.
abstract int | extract_ulong() Extracts the int in this Any object's value field.
abstract long | extract_ulonglong() Extracts the long in this Any object's value field.
abstract short | extract_ushort() Extracts the short in this Any object's value field.
Serializable | extract_Value() Extracts the java.io.Serializable object in this Any object's value field.
abstract char | extract_wchar() Extracts the char in this Any object's value field.
abstract String | extract_wstring() Extracts the String object in this Any object's value field.
abstract void | insert_any(Any a) Inserts the given Any object into this Any object's value field.
abstract void | insert_boolean(boolean b) Inserts the given boolean into this Any object's value field.
abstract void | insert_char(char c) Inserts the given char into this Any object's value field.
abstract void | insert_double(double d) Inserts the given double into this Any object's value field.
void | insert_fixed(BigDecimal value) Inserts the given java.math.BigDecimal object into this Any object's value field.
void | insert_fixed(BigDecimal value, TypeCode type) Inserts the given java.math.BigDecimal object into this Any object's value field.
abstract void | insert_float(float f) Inserts the given float into this Any object's value field.
abstract void | insert_long(int l) Inserts the given int into this Any object's value field.
abstract void | insert_longlong(long l) Inserts the given long into this Any object's value field.
abstract void | insert_Object(Object o) Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract void | insert_Object(Object o, TypeCode t) Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract void | insert_octet(byte b) Inserts the given byte into this Any object's value field.
abstract void | insert_Principal(Principal p) Deprecated. Deprecated by CORBA 2.2.
abstract void | insert_short(short s) Inserts the given short into this Any object's value field.
abstract void | insert_Streamable(Streamable s) Inserts the given Streamable object into this Any object's value field.
abstract void | insert_string(String s) Inserts the given String object into this Any object's value field.
abstract void | insert_TypeCode(TypeCode t) Inserts the given TypeCode object into this Any object's value field.
abstract void | insert_ulong(int l) Inserts the given int into this Any object's value field.
abstract void | insert_ulonglong(long l) Inserts the given long into this Any object's value field.
abstract void | insert_ushort(short s) Inserts the given short into this Any object's value field.
void | insert_Value(Serializable v) Inserts the given java.io.Serializable object into this Any object's value field.
void | insert_Value(Serializable v, TypeCode t) Inserts the given java.io.Serializable object into this Any object's value field.
abstract void | insert_wchar(char c) Inserts the given char into this Any object's value field.
abstract void | insert_wstring(String s) Inserts the given String object into this Any object's value field.
abstract void | read_value(InputStream is, TypeCode t) Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
abstract TypeCode | type() Returns type information for the element contained in this Any object.
abstract void | type(TypeCode t) Sets this Any object's type field to the given TypeCode object and clears its value.
abstract void | write_value(OutputStream os) Writes out to the given output stream the typecode and value of this Any object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Any

public Any()
Method Detail

type

public abstract TypeCode type()
Returns type information for the element contained in this Any object.
Returns:
the TypeCode object containing type information about the value contained in this Any object

type

public abstract void type(TypeCode t)
Sets this Any object's type field to the given TypeCode object and clears its value.

Note that using this method to set the type code wipes out the value if there is one. The method is provided primarily so that the type may be set properly for IDL out parameters. Generally, setting the type is done by the insert_X methods, which will set the type to X if it is not already set to X.

Parameters:
t - the TypeCode object giving information for the value in this Any object

equal

public abstract boolean equal(Any a)
Checks for equality between this Any object and the given Any object. Two Any objects are equal if both their values and type codes are equal.
Parameters:
a - the Any object to test for equality
Returns:
true if the Any objects are equal; false otherwise
See Also:
CORBA package comments for unimplemented features

read_value

public abstract void read_value(InputStream is,
                                TypeCode t)
                         throws MARSHAL
Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
Parameters:
is - the org.omg.CORBA.portable.InputStream object from which to read the value contained in this Any object
t - a TypeCode object containing type information about the value to be read
Throws:
MARSHAL - when the given TypeCode object is not consistent with the value that was contained in the input stream

write_value

public abstract void write_value(OutputStream os)
Writes out to the given output stream the typecode and value of this Any object.

If this method is called on an Any object that has not had a value inserted into its value field, it will throw the exception java.lang.NullPointerException.

Parameters:
os - the org.omg.CORBA.portable.OutputStream object into which to marshal the value and typecode of this Any object

create_output_stream

public abstract OutputStream create_output_stream()
Creates an output stream into which this Any object's value can be marshalled.
Returns:
the newly-created OutputStream

create_input_stream

public abstract InputStream create_input_stream()
Creates an input stream from which this Any object's value can be unmarshalled.
Returns:
the newly-created InputStream

insert_Streamable

public abstract void insert_Streamable(Streamable s)
Inserts the given Streamable object into this Any object's value field. This method allows the insertion of non-primitive IDL types.
Parameters:
s - the Streamable object to insert into this Any object; may be a non-primitive IDL type

extract_short

public abstract short extract_short()
                             throws BAD_OPERATION
Extracts the short in this Any object's value field.
Returns:
the short stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

insert_short

public abstract void insert_short(short s)
Inserts the given short into this Any object's value field.
Parameters:
s - the short to insert into this Any object

extract_long

public abstract int extract_long()
                          throws BAD_OPERATION
Extracts the int in this Any object's value field.
Returns:
the int stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

insert_long

public abstract void insert_long(int l)
Inserts the given int into this Any object's value field.
Parameters:
l - the int to insert into this Any object

extract_longlong

public abstract long extract_longlong()
                               throws BAD_OPERATION
Extracts the long in this Any object's value field.
Returns:
the long stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

insert_longlong

public abstract void insert_longlong(long l)
Inserts the given long into this Any object's value field.
Parameters:
l - the long to insert into this Any object

extract_ushort

public abstract short extract_ushort()
                              throws BAD_OPERATION
Extracts the short in this Any object's value field.
Returns:
the short stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a short or the value field has not yet been set

insert_ushort

public abstract void insert_ushort(short s)
Inserts the given short into this Any object's value field.
Parameters:
s - the short to insert into this Any object

extract_ulong

public abstract int extract_ulong()
                           throws BAD_OPERATION
Extracts the int in this Any object's value field.
Returns:
the int stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than an int or the value field has not yet been set

insert_ulong

public abstract void insert_ulong(int l)
Inserts the given int into this Any object's value field.
Parameters:
l - the int to insert into this Any object

extract_ulonglong

public abstract long extract_ulonglong()
                                throws BAD_OPERATION
Extracts the long in this Any object's value field.
Returns:
the long stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a long or the value field has not yet been set

insert_ulonglong

public abstract void insert_ulonglong(long l)
Inserts the given long into this Any object's value field.
Parameters:
l - the long to insert into this Any object

extract_float

public abstract float extract_float()
                             throws BAD_OPERATION
Extracts the float in this Any object's value field.
Returns:
the float stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a float or the value field has not yet been set

insert_float

public abstract void insert_float(float f)
Inserts the given float into this Any object's value field.
Parameters:
f - the float to insert into this Any object

extract_double

public abstract double extract_double()
                               throws BAD_OPERATION
Extracts the double in this Any object's value field.
Returns:
the double stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a double or the value field has not yet been set

insert_double

public abstract void insert_double(double d)
Inserts the given double into this Any object's value field.
Parameters:
d - the double to insert into this Any object

extract_boolean

public abstract boolean extract_boolean()
                                 throws BAD_OPERATION
Extracts the boolean in this Any object's value field.
Returns:
the boolean stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a boolean or the value field has not yet been set

insert_boolean

public abstract void insert_boolean(boolean b)
Inserts the given boolean into this Any object's value field.
Parameters:
b - the boolean to insert into this Any object

extract_char

public abstract char extract_char()
                           throws BAD_OPERATION
Extracts the char in this Any object's value field.
Returns:
the char stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

insert_char

public abstract void insert_char(char c)
                          throws DATA_CONVERSION
Inserts the given char into this Any object's value field.
Parameters:
c - the char to insert into this Any object
Throws:
DATA_CONVERSION - if there is a data conversion error

extract_octet

public abstract byte extract_octet()
                            throws BAD_OPERATION
Extracts the byte in this Any object's value field.
Returns:
the byte stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a byte or the value field has not yet been set

insert_octet

public abstract void insert_octet(byte b)
Inserts the given byte into this Any object's value field.
Parameters:
b - the byte to insert into this Any object

extract_wchar

public abstract char extract_wchar()
                            throws BAD_OPERATION
Extracts the char in this Any object's value field.
Returns:
the char stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a char or the value field has not yet been set

insert_wchar

public abstract void insert_wchar(char c)
Inserts the given char into this Any object's value field.
Parameters:
c - the char to insert into this Any object

extract_any

public abstract Any extract_any()
                         throws BAD_OPERATION
Extracts the Any object in this Any object's value field.
Returns:
the Any object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than an Any object or the value field has not yet been set

insert_any

public abstract void insert_any(Any a)
Inserts the given Any object into this Any object's value field.
Parameters:
a - the Any object to insert into this Any object

extract_string

public abstract String extract_string()
                               throws BAD_OPERATION
Extracts the String object in this Any object's value field.
Returns:
the String object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

insert_string

public abstract void insert_string(String s)
                            throws DATA_CONVERSION,
                                   MARSHAL
Inserts the given String object into this Any object's value field.
Parameters:
s - the String object to insert into this Any object
Throws:
DATA_CONVERSION - if there is a data conversion error
MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

extract_wstring

public abstract String extract_wstring()
                                throws BAD_OPERATION
Extracts the String object in this Any object's value field.
Returns:
the String object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a String object or the value field has not yet been set

insert_wstring

public abstract void insert_wstring(String s)
                             throws MARSHAL
Inserts the given String object into this Any object's value field.
Parameters:
s - the String object to insert into this Any object
Throws:
MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters

extract_Object

public abstract Object extract_Object()
                               throws BAD_OPERATION
Extracts the org.omg.CORBA.Object in this Any object's value field.
Returns:
the org.omg.CORBA.Object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than an org.omg.CORBA.Object or the value field has not yet been set

insert_Object

public abstract void insert_Object(Object o)
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
Parameters:
o - the org.omg.CORBA.Object object to insert into this Any object

insert_Object

public abstract void insert_Object(Object o,
                                   TypeCode t)
                            throws BAD_OPERATION
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
Parameters:
o - the org.omg.CORBA.Object instance to insert into this Any object
t - the TypeCode object that is to be inserted into this Any object and that describes the Object being inserted
Throws:
BAD_OPERATION - if this method is invalid for this Any object

extract_TypeCode

public abstract TypeCode extract_TypeCode()
                                   throws BAD_OPERATION
Extracts the TypeCode object in this Any object's value field.
Returns:
the TypeCode object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a TypeCode object or the value field has not yet been set

insert_TypeCode

public abstract void insert_TypeCode(TypeCode t)
Inserts the given TypeCode object into this Any object's value field.
Parameters:
t - the TypeCode object to insert into this Any object

extract_Principal

public abstract Principal extract_Principal()
                                     throws BAD_OPERATION
Deprecated. Deprecated by CORBA 2.2.

Extracts the Principal object in this Any object's value field. Note that the class Principal has been deprecated.
Returns:
the Principal object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a Principal object or the value field has not yet been set

insert_Principal

public abstract void insert_Principal(Principal p)
Deprecated. Deprecated by CORBA 2.2.

Inserts the given Principal object into this Any object's value field. Note that the class Principal has been deprecated.
Parameters:
p - the Principal object to insert into this Any object

extract_fixed

public BigDecimal extract_fixed()
Extracts the java.math.BigDecimal object in this Any object's value field.
Returns:
the java.math.BigDecimal object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a java.math.BigDecimal object or the value field has not yet been set

insert_fixed

public void insert_fixed(BigDecimal value)
Inserts the given java.math.BigDecimal object into this Any object's value field.
Parameters:
value - the java.math.BigDecimal object to insert into this Any object

insert_fixed

public void insert_fixed(BigDecimal value,
                         TypeCode type)
Inserts the given java.math.BigDecimal object into this Any object's value field.
Parameters:
value - the java.math.BigDecimal object to insert into this Any object
type - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.math.BigDecimal object being inserted

extract_Value

public Serializable extract_Value()
                           throws BAD_OPERATION
Extracts the java.io.Serializable object in this Any object's value field.
Returns:
the java.io.Serializable object stored in this Any object
Throws:
BAD_OPERATION - if this Any object contains something other than a java.io.Serializable object or the value field has not yet been set

insert_Value

public void insert_Value(Serializable v)
Inserts the given java.io.Serializable object into this Any object's value field.
Parameters:
v - the java.io.Serializable object to insert into this Any object

insert_Value

public void insert_Value(Serializable v,
                         TypeCode t)
                  throws MARSHAL
Inserts the given java.io.Serializable object into this Any object's value field.
Parameters:
v - the java.io.Serializable object to insert into this Any object
t - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.io.Serializable object being inserted
Throws:
MARSHAL - if the ORB has a problem marshalling or unmarshalling parameters
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AnyHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class AnyHolder

java.lang.Object
  |
  +--org.omg.CORBA.AnyHolder
All Implemented Interfaces:
Streamable
public final class AnyHolder
extends Object
implements Streamable

A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL any as an "out" or "inout" parameter, the programmer must pass an instance of AnyHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myAnyHolder is an instance of AnyHolder, the value stored in its value field can be accessed with myAnyHolder.value.

Since:
JDK1.2

Field Summary
 Any value
The Any value held by this AnyHolder object.
Constructor Summary
AnyHolder()
Constructs a new AnyHolder object with its value field initialized to null.
AnyHolder(Any initial)
Constructs a new AnyHolder object for the given Any object.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
TypeCode | _type() Returns the TypeCode object corresponding to the value held in this AnyHolder object.
void | _write(OutputStream output) Marshals to output the value in this AnyHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Any value
The Any value held by this AnyHolder object.
Constructor Detail

AnyHolder

public AnyHolder()
Constructs a new AnyHolder object with its value field initialized to null.

AnyHolder

public AnyHolder(Any initial)
Constructs a new AnyHolder object for the given Any object.
Parameters:
initial - the Any object with which to initialize the value field of the new AnyHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire.

_write

public void _write(OutputStream output)
Marshals to output the value in this AnyHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data.

_type

public TypeCode _type()
Returns the TypeCode object corresponding to the value held in this AnyHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this AnyHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AnySeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class AnySeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.AnySeqHelper
public final class AnySeqHelper
extends Object

org/omg/CORBA/AnySeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
AnySeqHelper()
Method Summary
static Any[] | extract(Any a)
static String | id()
static void | insert(Any a, Any[] that)
static Any[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Any[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AnySeqHelper

public AnySeqHelper()
Method Detail

insert

public static void insert(Any a,
                          Any[] that)

extract

public static Any[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Any[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Any[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AnySeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class AnySeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.AnySeqHolder
All Implemented Interfaces:
Streamable
public final class AnySeqHolder
extends Object
implements Streamable

org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 Any[] value
Constructor Summary
AnySeqHolder()
AnySeqHolder(Any[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Any[] value
Constructor Detail

AnySeqHolder

public AnySeqHolder()

AnySeqHolder

public AnySeqHolder(Any[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ARG_IN

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface ARG_IN

public interface ARG_IN

Signifies an "input" argument to an invocation, meaning that the argument is being passed from the client to the server. ARG_IN.value is one of the possible values used to indicate the direction in which a parameter is being passed during an invocation performed using the Dynamic Invocation Interface (DII).

The code fragment below shows a typical usage:

    ORB orb = ORB.init(args, null);
    org.omg.CORBA.NamedValue nv = orb.create_named_value(
         "IDLArgumentIdentifier", myAny, org.omg.CORBA.ARG_IN.value);

Since:
JDK1.2
See Also:
NamedValue

Field Summary
static int value
The value indicating an input argument.

Field Detail

value

public static final int value
The value indicating an input argument.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ARG_INOUT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface ARG_INOUT

public interface ARG_INOUT

Signifies an argument used for both input and output in an invocation, meaning that the argument is being passed from the client to the server and then back from the server to the client. ARG_INOUT.value is one of the possible values used to indicate the direction in which a parameter is being passed during a dynamic invocation using the Dynamic Invocation Interface (DII).

The code fragment below shows a typical usage:

  ORB orb = ORB.init(args, null);
  org.omg.CORBA.NamedValue nv = orb.create_named_value(
        "argumentIdentifier", myAny, org.omg.CORBA.ARG_INOUT.value);

Since:
JDK1.2
See Also:
NamedValue

Field Summary
static int value
The constant value indicating an argument used for both input and output.

Field Detail

value

public static final int value
The constant value indicating an argument used for both input and output.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ARG_OUT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface ARG_OUT

public interface ARG_OUT

A constant that signifies an "output" argument to an invocation, meaning that the argument is being passed from the server to the client. ARG_OUT.value is one of the possible values used to indicate the direction in which a parameter is being passed during a dynamic invocation using the Dynamic Invocation Interface (DII).

The code fragment below shows a typical usage:

  ORB orb = ORB.init(args, null);
  org.omg.CORBA.NamedValue nv = orb.create_named_value(
        "argumentIdentifier", myAny, org.omg.CORBA.ARG_OUT.value);

Since:
JDK1.2
See Also:
NamedValue

Field Summary
static int value
The constant value indicating an output argument.

Field Detail

value

public static final int value
The constant value indicating an output argument.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_CONTEXT

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BAD_CONTEXT

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.BAD_CONTEXT
All Implemented Interfaces:
Serializable
public final class BAD_CONTEXT
extends SystemException

The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
BAD_CONTEXT()
Constructs a BAD_CONTEXT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_CONTEXT(int minor, CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
BAD_CONTEXT(String s)
Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
BAD_CONTEXT(String s, int minor, CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BAD_CONTEXT

public BAD_CONTEXT()
Constructs a BAD_CONTEXT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

BAD_CONTEXT

public BAD_CONTEXT(String s)
Constructs a BAD_CONTEXT exception with the specified detail message, a minor code of 0 and a completion state of COMPLETED_NO.
Parameters:
s - a String object containing a detail message

BAD_CONTEXT

public BAD_CONTEXT(int minor,
                   CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status

BAD_CONTEXT

public BAD_CONTEXT(String s,
                   int minor,
                   CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BAD_INV_ORDER

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BAD_INV_ORDER

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.BAD_INV_ORDER
All Implemented Interfaces:
Serializable
public final class BAD_INV_ORDER
extends SystemException

The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
BAD_INV_ORDER()
Constructs a BAD_INV_ORDER exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_INV_ORDER(int minor, CompletionStatus completed)
Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
BAD_INV_ORDER(String s)
Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_INV_ORDER(String s, int minor, CompletionStatus completed)
Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BAD_INV_ORDER

public BAD_INV_ORDER()
Constructs a BAD_INV_ORDER exception with a default minor code of 0 and a completion state of COMPLETED_NO.

BAD_INV_ORDER

public BAD_INV_ORDER(String s)
Constructs a BAD_INV_ORDER exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

BAD_INV_ORDER

public BAD_INV_ORDER(int minor,
                     CompletionStatus completed)
Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status

BAD_INV_ORDER

public BAD_INV_ORDER(String s,
                     int minor,
                     CompletionStatus completed)
Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_OPERATION

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BAD_OPERATION

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.BAD_OPERATION
All Implemented Interfaces:
Serializable
public final class BAD_OPERATION
extends SystemException

The CORBA BAD_OPERATION exception, which is thrown when a method is invalid. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
BAD_OPERATION()
Constructs a BAD_OPERATION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_OPERATION(int minor, CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified minor code and completion status.
BAD_OPERATION(String s)
Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_OPERATION(String s, int minor, CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BAD_OPERATION

public BAD_OPERATION()
Constructs a BAD_OPERATION exception with a default minor code of 0 and a completion state of COMPLETED_NO.

BAD_OPERATION

public BAD_OPERATION(String s)
Constructs a BAD_OPERATION exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

BAD_OPERATION

public BAD_OPERATION(int minor,
                     CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status

BAD_OPERATION

public BAD_OPERATION(String s,
                     int minor,
                     CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_PARAM

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BAD_PARAM

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.BAD_PARAM
All Implemented Interfaces:
Serializable
public final class BAD_PARAM
extends SystemException

The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, meaning of minor codes, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
BAD_PARAM()
Constructs a BAD_PARAM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_PARAM(int minor, CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified minor code and completion status.
BAD_PARAM(String s)
Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_PARAM(String s, int minor, CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BAD_PARAM

public BAD_PARAM()
Constructs a BAD_PARAM exception with a default minor code of 0 and a completion state of COMPLETED_NO.

BAD_PARAM

public BAD_PARAM(String s)
Constructs a BAD_PARAM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message describing this exception

BAD_PARAM

public BAD_PARAM(int minor,
                 CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

BAD_PARAM

public BAD_PARAM(String s,
                 int minor,
                 CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_POLICY

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface BAD_POLICY

public interface BAD_POLICY

BAD_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception.

Field Summary
static short value
The Error code in PolicyError exception.

Field Detail

value

public static final short value
The Error code in PolicyError exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_POLICY_TYPE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface BAD_POLICY_TYPE

public interface BAD_POLICY_TYPE

BAD_POLICY_TYPE is one of the PolicyErrorCodes which would be filled in the PolicyError exception.

Field Summary
static short value
The Error code in PolicyError exception.

Field Detail

value

public static final short value
The Error code in PolicyError exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_POLICY_VALUE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface BAD_POLICY_VALUE

public interface BAD_POLICY_VALUE

Contains the value used to indicate a policy value that is incorrect for a valid policy type in a call to the create_policy method defined in the ORB class.

Field Summary
static short value
The value used to represent a bad policy value error in a PolicyError exception.

Field Detail

value

public static final short value
The value used to represent a bad policy value error in a PolicyError exception.
See Also:
PolicyError
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BAD_TYPECODE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BAD_TYPECODE

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.BAD_TYPECODE
All Implemented Interfaces:
Serializable
public final class BAD_TYPECODE
extends SystemException

The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
BAD_TYPECODE()
Constructs a BAD_TYPECODE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
BAD_TYPECODE(int minor, CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
BAD_TYPECODE(String s)
Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
BAD_TYPECODE(String s, int minor, CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BAD_TYPECODE

public BAD_TYPECODE()
Constructs a BAD_TYPECODE exception with a default minor code of 0 and a completion state of COMPLETED_NO.

BAD_TYPECODE

public BAD_TYPECODE(String s)
Constructs a BAD_TYPECODE exception with the specified detail, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

BAD_TYPECODE

public BAD_TYPECODE(int minor,
                    CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status

BAD_TYPECODE

public BAD_TYPECODE(String s,
                    int minor,
                    CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BooleanHolder

java.lang.Object
  |
  +--org.omg.CORBA.BooleanHolder
All Implemented Interfaces:
Streamable
public final class BooleanHolder
extends Object
implements Streamable

A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL boolean as an "out" or "inout" parameter, the programmer must pass an instance of BooleanHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myBooleanHolder is an instance of BooleanHolder, the value stored in its value field can be accessed with myBooleanHolder.value.

Since:
JDK1.2

Field Summary
 boolean value
The boolean value held by this BooleanHolder object.
Constructor Summary
BooleanHolder()
Constructs a new BooleanHolder object with its value field initialized to false.
BooleanHolder(boolean initial)
Constructs a new BooleanHolder object with its value field initialized with the given boolean.
Method Summary
void | _read(InputStream input) Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
TypeCode | _type() Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
void | _write(OutputStream output) Marshals the value in this BooleanHolder object's value field to the output stream output.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public boolean value
The boolean value held by this BooleanHolder object.
Constructor Detail

BooleanHolder

public BooleanHolder()
Constructs a new BooleanHolder object with its value field initialized to false.

BooleanHolder

public BooleanHolder(boolean initial)
Constructs a new BooleanHolder object with its value field initialized with the given boolean.
Parameters:
initial - the boolean with which to initialize the value field of the newly-created BooleanHolder object
Method Detail

_read

public void _read(InputStream input)
Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream object containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals the value in this BooleanHolder object's value field to the output stream output.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data

_type

public TypeCode _type()
Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode for the value held in this BooleanHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BooleanSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.BooleanSeqHelper
public final class BooleanSeqHelper
extends Object

org/omg/CORBA/BooleanSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
BooleanSeqHelper()
Method Summary
static boolean[] | extract(Any a)
static String | id()
static void | insert(Any a, boolean[] that)
static boolean[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, boolean[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanSeqHelper

public BooleanSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          boolean[] that)

extract

public static boolean[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static boolean[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         boolean[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class BooleanSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.BooleanSeqHolder
All Implemented Interfaces:
Streamable
public final class BooleanSeqHolder
extends Object
implements Streamable

org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 boolean[] value
Constructor Summary
BooleanSeqHolder()
BooleanSeqHolder(boolean[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public boolean[] value
Constructor Detail

BooleanSeqHolder

public BooleanSeqHolder()

BooleanSeqHolder

public BooleanSeqHolder(boolean[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bounds

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Bounds

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.Bounds
All Implemented Interfaces:
IDLEntity, Serializable
public final class Bounds
extends UserException

A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.

See Also:
documentation on Java IDL exceptions, Serialized Form

Constructor Summary
Bounds()
Constructs an Bounds with no specified detail message.
Bounds(String reason)
Constructs an Bounds with the specified detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Bounds

public Bounds()
Constructs an Bounds with no specified detail message.

Bounds

public Bounds(String reason)
Constructs an Bounds with the specified detail message.
Parameters:
reason - the detail message.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ByteHolder

java.lang.Object
  |
  +--org.omg.CORBA.ByteHolder
All Implemented Interfaces:
Streamable
public final class ByteHolder
extends Object
implements Streamable

A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL octet as an "out" or "inout" parameter, the programmer must pass an instance of ByteHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myByteHolder is an instance of ByteHolder, the value stored in its value field can be accessed with myByteHolder.value.

Since:
JDK1.2

Field Summary
 byte value
The byte value held by this ByteHolder object.
Constructor Summary
ByteHolder()
Constructs a new ByteHolder object with its value field initialized to 0.
ByteHolder(byte initial)
Constructs a new ByteHolder object for the given byte.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
TypeCode | _type() Returns the TypeCode corresponding to the value held in this ByteHolder object.
void | _write(OutputStream output) Marshals to output the value in this ByteHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public byte value
The byte value held by this ByteHolder object.
Constructor Detail

ByteHolder

public ByteHolder()
Constructs a new ByteHolder object with its value field initialized to 0.

ByteHolder

public ByteHolder(byte initial)
Constructs a new ByteHolder object for the given byte.
Parameters:
initial - the byte with which to initialize the value field of the new ByteHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire.

_write

public void _write(OutputStream output)
Marshals to output the value in this ByteHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data.

_type

public TypeCode _type()
Returns the TypeCode corresponding to the value held in this ByteHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this ByteHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CharHolder

java.lang.Object
  |
  +--org.omg.CORBA.CharHolder
All Implemented Interfaces:
Streamable
public final class CharHolder
extends Object
implements Streamable

A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL char as an "out" or "inout" parameter, the programmer must pass an instance of CharHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myCharHolder is an instance of CharHolder, the value stored in its value field can be accessed with myCharHolder.value.

Since:
JDK1.2

Field Summary
 char value
The char value held by this CharHolder object.
Constructor Summary
CharHolder()
Constructs a new CharHolder object with its value field initialized to 0.
CharHolder(char initial)
Constructs a new CharHolder object for the given char.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
TypeCode | _type() Returns the TypeCode object corresponding to the value held in this CharHolder object.
void | _write(OutputStream output) Marshals to output the value in this CharHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public char value
The char value held by this CharHolder object.
Constructor Detail

CharHolder

public CharHolder()
Constructs a new CharHolder object with its value field initialized to 0.

CharHolder

public CharHolder(char initial)
Constructs a new CharHolder object for the given char.
Parameters:
initial - the char with which to initialize the value field of the new CharHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals to output the value in this CharHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data

_type

public TypeCode _type()
Returns the TypeCode object corresponding to the value held in this CharHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this CharHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CharSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.CharSeqHelper
public final class CharSeqHelper
extends Object

org/omg/CORBA/CharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
CharSeqHelper()
Method Summary
static char[] | extract(Any a)
static String | id()
static void | insert(Any a, char[] that)
static char[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, char[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CharSeqHelper

public CharSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          char[] that)

extract

public static char[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static char[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         char[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CharSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.CharSeqHolder
All Implemented Interfaces:
Streamable
public final class CharSeqHolder
extends Object
implements Streamable

org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 char[] value
Constructor Summary
CharSeqHolder()
CharSeqHolder(char[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public char[] value
Constructor Detail

CharSeqHolder

public CharSeqHolder()

CharSeqHolder

public CharSeqHolder(char[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.omg.CORBA.AnyHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.AnyHolder

No usage of org.omg.CORBA.AnyHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.AnySeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.AnySeqHelper

No usage of org.omg.CORBA.AnySeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BAD_CONTEXT

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BAD_CONTEXT

No usage of org.omg.CORBA.BAD_CONTEXT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BAD_INV_ORDER

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BAD_INV_ORDER

No usage of org.omg.CORBA.BAD_INV_ORDER

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BAD_TYPECODE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BAD_TYPECODE

No usage of org.omg.CORBA.BAD_TYPECODE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BooleanHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BooleanHolder

No usage of org.omg.CORBA.BooleanHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BooleanSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BooleanSeqHelper

No usage of org.omg.CORBA.BooleanSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ByteHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ByteHolder

No usage of org.omg.CORBA.ByteHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CharHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CharHolder

No usage of org.omg.CORBA.CharHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CharSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CharSeqHelper

No usage of org.omg.CORBA.CharSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.COMM_FAILURE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.COMM_FAILURE

No usage of org.omg.CORBA.COMM_FAILURE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CompletionStatusHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CompletionStatusHelper

No usage of org.omg.CORBA.CompletionStatusHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CurrentHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CurrentHelper

No usage of org.omg.CORBA.CurrentHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CurrentHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CurrentHolder

No usage of org.omg.CORBA.CurrentHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DefinitionKindHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DefinitionKindHelper

No usage of org.omg.CORBA.DefinitionKindHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DoubleHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DoubleHolder

No usage of org.omg.CORBA.DoubleHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DoubleSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DoubleSeqHelper

No usage of org.omg.CORBA.DoubleSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FieldNameHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FieldNameHelper

No usage of org.omg.CORBA.FieldNameHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FixedHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FixedHolder

No usage of org.omg.CORBA.FixedHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FloatHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FloatHolder

No usage of org.omg.CORBA.FloatHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FloatSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FloatSeqHelper

No usage of org.omg.CORBA.FloatSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FREE_MEM

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FREE_MEM

No usage of org.omg.CORBA.FREE_MEM

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.IdentifierHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.IdentifierHelper

No usage of org.omg.CORBA.IdentifierHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.IDLTypeHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.IDLTypeHelper

No usage of org.omg.CORBA.IDLTypeHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.IMP_LIMIT

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.IMP_LIMIT

No usage of org.omg.CORBA.IMP_LIMIT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INITIALIZE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INITIALIZE

No usage of org.omg.CORBA.INITIALIZE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Initializer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Initializer

No usage of org.omg.CORBA.Initializer

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INTERNAL

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INTERNAL

No usage of org.omg.CORBA.INTERNAL

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INTF_REPOS

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INTF_REPOS

No usage of org.omg.CORBA.INTF_REPOS

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.IntHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.IntHolder

No usage of org.omg.CORBA.IntHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INVALID_TRANSACTION

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INVALID_TRANSACTION

No usage of org.omg.CORBA.INVALID_TRANSACTION

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INV_FLAG

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INV_FLAG

No usage of org.omg.CORBA.INV_FLAG

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INV_IDENT

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INV_IDENT

No usage of org.omg.CORBA.INV_IDENT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INV_OBJREF

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INV_OBJREF

No usage of org.omg.CORBA.INV_OBJREF

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.INV_POLICY

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.INV_POLICY

No usage of org.omg.CORBA.INV_POLICY

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.LongHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.LongHolder

No usage of org.omg.CORBA.LongHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.LongLongSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.LongLongSeqHelper

No usage of org.omg.CORBA.LongLongSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.LongSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.LongSeqHelper

No usage of org.omg.CORBA.LongSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NameValuePairHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NameValuePairHelper

No usage of org.omg.CORBA.NameValuePairHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NO_IMPLEMENT

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NO_IMPLEMENT

No usage of org.omg.CORBA.NO_IMPLEMENT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NO_MEMORY

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NO_MEMORY

No usage of org.omg.CORBA.NO_MEMORY

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NO_PERMISSION

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NO_PERMISSION

No usage of org.omg.CORBA.NO_PERMISSION

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NO_RESOURCES

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NO_RESOURCES

No usage of org.omg.CORBA.NO_RESOURCES

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NO_RESPONSE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NO_RESPONSE

No usage of org.omg.CORBA.NO_RESPONSE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ObjectHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ObjectHelper

No usage of org.omg.CORBA.ObjectHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ObjectHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ObjectHolder

No usage of org.omg.CORBA.ObjectHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.OBJECT_NOT_EXIST

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.OBJECT_NOT_EXIST

No usage of org.omg.CORBA.OBJECT_NOT_EXIST

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.OBJ_ADAPTER

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.OBJ_ADAPTER

No usage of org.omg.CORBA.OBJ_ADAPTER

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.OctetSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.OctetSeqHelper

No usage of org.omg.CORBA.OctetSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PERSIST_STORE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PERSIST_STORE

No usage of org.omg.CORBA.PERSIST_STORE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyHelper

No usage of org.omg.CORBA.PolicyHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyHolder

No usage of org.omg.CORBA.PolicyHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyListHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyListHelper

No usage of org.omg.CORBA.PolicyListHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyListHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyListHolder

No usage of org.omg.CORBA.PolicyListHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyTypeHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyTypeHelper

No usage of org.omg.CORBA.PolicyTypeHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PrincipalHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PrincipalHolder

No usage of org.omg.CORBA.PrincipalHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.RepositoryIdHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.RepositoryIdHelper

No usage of org.omg.CORBA.RepositoryIdHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServiceDetailHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServiceDetailHelper

No usage of org.omg.CORBA.ServiceDetailHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServiceInformationHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServiceInformationHelper

No usage of org.omg.CORBA.ServiceInformationHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.SetOverrideTypeHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.SetOverrideTypeHelper

No usage of org.omg.CORBA.SetOverrideTypeHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ShortHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ShortHolder

No usage of org.omg.CORBA.ShortHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ShortSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ShortSeqHelper

No usage of org.omg.CORBA.ShortSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.StringHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.StringHolder

No usage of org.omg.CORBA.StringHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.StringValueHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.StringValueHelper

No usage of org.omg.CORBA.StringValueHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.StructMemberHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.StructMemberHelper

No usage of org.omg.CORBA.StructMemberHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TRANSACTION_REQUIRED

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TRANSACTION_REQUIRED

No usage of org.omg.CORBA.TRANSACTION_REQUIRED

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TRANSACTION_ROLLEDBACK

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TRANSACTION_ROLLEDBACK

No usage of org.omg.CORBA.TRANSACTION_ROLLEDBACK

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TRANSIENT

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TRANSIENT

No usage of org.omg.CORBA.TRANSIENT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TypeCodeHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TypeCodeHolder

No usage of org.omg.CORBA.TypeCodeHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ULongLongSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ULongLongSeqHelper

No usage of org.omg.CORBA.ULongLongSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ULongSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ULongSeqHelper

No usage of org.omg.CORBA.ULongSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UnionMemberHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UnionMemberHelper

No usage of org.omg.CORBA.UnionMemberHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UNKNOWN

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UNKNOWN

No usage of org.omg.CORBA.UNKNOWN

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UnknownUserException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UnknownUserException

No usage of org.omg.CORBA.UnknownUserException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UShortSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UShortSeqHelper

No usage of org.omg.CORBA.UShortSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ValueBaseHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ValueBaseHelper

No usage of org.omg.CORBA.ValueBaseHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ValueBaseHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ValueBaseHolder

No usage of org.omg.CORBA.ValueBaseHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ValueMemberHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ValueMemberHelper

No usage of org.omg.CORBA.ValueMemberHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.VersionSpecHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.VersionSpecHelper

No usage of org.omg.CORBA.VersionSpecHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.VisibilityHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.VisibilityHelper

No usage of org.omg.CORBA.VisibilityHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.WCharSeqHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.WCharSeqHelper

No usage of org.omg.CORBA.WCharSeqHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.WStringValueHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.WStringValueHelper

No usage of org.omg.CORBA.WStringValueHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA._IDLTypeStub

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA._IDLTypeStub

No usage of org.omg.CORBA._IDLTypeStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA._PolicyStub

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA._PolicyStub

No usage of org.omg.CORBA._PolicyStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.ARG_IN

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.ARG_IN

No usage of org.omg.CORBA.ARG_IN

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.ARG_INOUT

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.ARG_INOUT

No usage of org.omg.CORBA.ARG_INOUT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.ARG_OUT

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.ARG_OUT

No usage of org.omg.CORBA.ARG_OUT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.BAD_POLICY

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.BAD_POLICY

No usage of org.omg.CORBA.BAD_POLICY

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.BAD_POLICY_TYPE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.BAD_POLICY_TYPE

No usage of org.omg.CORBA.BAD_POLICY_TYPE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.BAD_POLICY_VALUE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.BAD_POLICY_VALUE

No usage of org.omg.CORBA.BAD_POLICY_VALUE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.CTX_RESTRICT_SCOPE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.CTX_RESTRICT_SCOPE

No usage of org.omg.CORBA.CTX_RESTRICT_SCOPE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynFixed

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynFixed

No usage of org.omg.CORBA.DynFixed

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynValue

No usage of org.omg.CORBA.DynValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.OMGVMCID

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.OMGVMCID

No usage of org.omg.CORBA.OMGVMCID

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.PRIVATE_MEMBER

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.PRIVATE_MEMBER

No usage of org.omg.CORBA.PRIVATE_MEMBER

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.PUBLIC_MEMBER

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.PUBLIC_MEMBER

No usage of org.omg.CORBA.PUBLIC_MEMBER

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.Repository

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.Repository

No usage of org.omg.CORBA.Repository

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.UNSUPPORTED_POLICY

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.UNSUPPORTED_POLICY

No usage of org.omg.CORBA.UNSUPPORTED_POLICY

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.UNSUPPORTED_POLICY_VALUE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.UNSUPPORTED_POLICY_VALUE

No usage of org.omg.CORBA.UNSUPPORTED_POLICY_VALUE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.VM_ABSTRACT

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.VM_ABSTRACT

No usage of org.omg.CORBA.VM_ABSTRACT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.VM_CUSTOM

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.VM_CUSTOM

No usage of org.omg.CORBA.VM_CUSTOM

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.VM_NONE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.VM_NONE

No usage of org.omg.CORBA.VM_NONE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.VM_TRUNCATABLE

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.VM_TRUNCATABLE

No usage of org.omg.CORBA.VM_TRUNCATABLE

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Any

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Any

Packages that use Any
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of Any in org.omg.CORBA

Fields in org.omg.CORBA declared as Any
Any | AnyHolder.value The Any value held by this AnyHolder object.
Any | UnionMember.label The label of the union member described by this UnionMember object.
Any[] | AnySeqHolder.value
Any | NameValuePair.value The value to be associated with a name by this NameValuePair object.
Any | UnknownUserException.except The Any instance that contains the actual user exception thrown by the server.

Methods in org.omg.CORBA that return Any
Any | DynAny.to_any() Convert a DynAny object to an Any object.
Any | DynAny.get_any() Retrieves the org.omg.CORBA.Any contained in this DynAny object.
abstract Any | Any.extract_any() Extracts the Any object in this Any object's value field.
abstract Any | NamedValue.value() Retrieves the value for this NamedValue object.
Any[] | DynArray.get_elements() Returns the value of all the elements of this array.
abstract Any | TypeCode.member_label(int index) Retrieves the label of the union member identified by the given index.
Any | DataInputStream.read_any() Reads an IDL Any value from the input stream.
abstract Any | Request.add_in_arg() Creates an input argument and adds it to this Request object.
abstract Any | Request.add_named_in_arg(String name) Creates an input argument with the given name and adds it to this Request object.
abstract Any | Request.add_inout_arg() Adds an input/output argument to this Request object.
abstract Any | Request.add_named_inout_arg(String name) Adds an input/output argument with the given name to this Request object.
abstract Any | Request.add_out_arg() Adds an output argument to this Request object.
abstract Any | Request.add_named_out_arg(String name) Adds an output argument with the given name to this Request object.
abstract Any | Request.return_value() Returns the Any object that contains the value for the result of the method.
abstract Any | ORB.create_any() Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
Any[] | DynSequence.get_elements() Returns the value of every element in this sequence.
static Any[] | AnySeqHelper.extract(Any a)
static Any[] | AnySeqHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type Any
 void DynAny.from_any(Any value)
Make a DynAny object from an Any object.
 void DynAny.insert_any(Any value)
Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
static void UnionMemberHelper.insert(Any a, UnionMember that)
static UnionMember UnionMemberHelper.extract(Any a)
static ServiceInformation ServiceInformationHelper.extract(Any a)
static void ServiceInformationHelper.insert(Any a, ServiceInformation that)
static void PolicyListHelper.insert(Any a, Policy[] that)
static Policy[] PolicyListHelper.extract(Any a)
abstract  boolean Any.equal(Any a)
Checks for equality between this Any object and the given Any object.
abstract  void Any.insert_any(Any a)
Inserts the given Any object into this Any object's value field.
static void NameValuePairHelper.insert(Any a, NameValuePair that)
static NameValuePair NameValuePairHelper.extract(Any a)
static void LongSeqHelper.insert(Any a, int[] that)
static int[] LongSeqHelper.extract(Any a)
static void OctetSeqHelper.insert(Any a, byte[] that)
static byte[] OctetSeqHelper.extract(Any a)
static void IdentifierHelper.insert(Any a, String that)
static String IdentifierHelper.extract(Any a)
static void FloatSeqHelper.insert(Any a, float[] that)
static float[] FloatSeqHelper.extract(Any a)
static ServiceDetail ServiceDetailHelper.extract(Any a)
static void ServiceDetailHelper.insert(Any a, ServiceDetail that)
static void BooleanSeqHelper.insert(Any a, boolean[] that)
static boolean[] BooleanSeqHelper.extract(Any a)
static void VisibilityHelper.insert(Any a, short that)
static short VisibilityHelper.extract(Any a)
static void ULongSeqHelper.insert(Any a, int[] that)
static int[] ULongSeqHelper.extract(Any a)
static void StringValueHelper.insert(Any a, String that)
static String StringValueHelper.extract(Any a)
static void CharSeqHelper.insert(Any a, char[] that)
static char[] CharSeqHelper.extract(Any a)
 void DynArray.set_elements(Any[] value)
Sets the value of this DynArray object to the given array.
static void SetOverrideTypeHelper.insert(Any a, SetOverrideType that)
static SetOverrideType SetOverrideTypeHelper.extract(Any a)
static void VersionSpecHelper.insert(Any a, String that)
static String VersionSpecHelper.extract(Any a)
static void DefinitionKindHelper.insert(Any a, DefinitionKind that)
static DefinitionKind DefinitionKindHelper.extract(Any a)
static void StructMemberHelper.insert(Any a, StructMember that)
static StructMember StructMemberHelper.extract(Any a)
static void IDLTypeHelper.insert(Any a, IDLType that)
static IDLType IDLTypeHelper.extract(Any a)
static void UShortSeqHelper.insert(Any a, short[] that)
static short[] UShortSeqHelper.extract(Any a)
static void WCharSeqHelper.insert(Any a, char[] that)
static char[] WCharSeqHelper.extract(Any a)
 void DataOutputStream.write_any(Any value)
Writes the Any value to the output stream.
 void DataOutputStream.write_any_array(Any[] seq, int offset, int length)
Writes the array of IDL Anys from offset for length elements to the output stream.
static void DoubleSeqHelper.insert(Any a, double[] that)
static double[] DoubleSeqHelper.extract(Any a)
static void WStringValueHelper.insert(Any a, String that)
static String WStringValueHelper.extract(Any a)
static void PolicyTypeHelper.insert(Any a, int that)
static int PolicyTypeHelper.extract(Any a)
 void ServerRequest.result(Any any)
Deprecated. use the method set_result
 void ServerRequest.set_result(Any any)
Specifies any return value for the call.
 void ServerRequest.except(Any any)
Deprecated. use set_exception()
 void ServerRequest.set_exception(Any any)
Returns the given exception to the client.
static void ULongLongSeqHelper.insert(Any a, long[] that)
static long[] ULongLongSeqHelper.extract(Any a)
static void RepositoryIdHelper.insert(Any a, String that)
static String RepositoryIdHelper.extract(Any a)
static void ShortSeqHelper.insert(Any a, short[] that)
static short[] ShortSeqHelper.extract(Any a)
abstract  NamedValue ORB.create_named_value(String s, Any any, int flags)
Creates a NamedValue object using the given name, value, and argument mode flags.
 DynAny ORB.create_dyn_any(Any value)
See package comments regarding unimplemented features.
 Policy ORB.create_policy(int type, Any val)
See package comments regarding unimplemented features.
static void ObjectHelper.insert(Any a, Object that)
static Object ObjectHelper.extract(Any a)
static void CurrentHelper.insert(Any a, Current that)
static Current CurrentHelper.extract(Any a)
static void LongLongSeqHelper.insert(Any a, long[] that)
static long[] LongLongSeqHelper.extract(Any a)
abstract  void Context.set_one_value(String propname, Any propvalue)
Creates a NamedValue object and adds it to this Context object.
abstract  NamedValue NVList.add_value(String item_name, Any val, int flags)
Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
 void DynSequence.set_elements(Any[] value)
Sets the values of all elements in this sequence with the given array.
static void CompletionStatusHelper.insert(Any a, CompletionStatus that)
static CompletionStatus CompletionStatusHelper.extract(Any a)
static void FieldNameHelper.insert(Any a, String that)
static String FieldNameHelper.extract(Any a)
static void ValueBaseHelper.insert(Any a, Serializable that)
static Serializable ValueBaseHelper.extract(Any a)
static void PolicyHelper.insert(Any a, Policy that)
static Policy PolicyHelper.extract(Any a)
static void AnySeqHelper.insert(Any a, Any[] that)
static Any[] AnySeqHelper.extract(Any a)
static void AnySeqHelper.write(OutputStream ostream, Any[] value)
static void ValueMemberHelper.insert(Any a, ValueMember that)
static ValueMember ValueMemberHelper.extract(Any a)

Constructors in org.omg.CORBA with parameters of type Any
AnyHolder(Any initial)
Constructs a new AnyHolder object for the given Any object.
UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
AnySeqHolder(Any[] initialValue)
NameValuePair(String __id, Any __value)
Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
UnknownUserException(Any a)
Constructs an UnknownUserException object that contains the given Any object.

Uses of Any in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Any
abstract  Any InputStream.read_any()
Reads an Any from this input stream.

Methods in org.omg.CORBA.portable with parameters of type Any
abstract  void OutputStream.write_any(Any value)
Writes an Any on this output stream.

Uses of Any in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type Any
static NameComponent[] | NameHelper.extract(Any a)
static void | NameHelper.insert(Any a, NameComponent[] that)
static String | IstringHelper.extract(Any a)
static void | IstringHelper.insert(Any a, String that)
static Binding[] | BindingListHelper.extract(Any a)
static void | BindingListHelper.insert(Any a, Binding[] that)
static BindingIterator | BindingIteratorHelper.extract(Any a)
static void | BindingIteratorHelper.insert(Any a, BindingIterator that)
static NameComponent | NameComponentHelper.extract(Any a)
static void | NameComponentHelper.insert(Any a, NameComponent that)
static BindingType | BindingTypeHelper.extract(Any a)
static void | BindingTypeHelper.insert(Any a, BindingType that)
static NamingContext | NamingContextHelper.extract(Any a)
static void | NamingContextHelper.insert(Any a, NamingContext that)
static Binding | BindingHelper.extract(Any a)
static void | BindingHelper.insert(Any a, Binding that)

Uses of Any in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type Any
static AlreadyBound | AlreadyBoundHelper.extract(Any a)
static void | AlreadyBoundHelper.insert(Any a, AlreadyBound that)
static NotFoundReason | NotFoundReasonHelper.extract(Any a)
static void | NotFoundReasonHelper.insert(Any a, NotFoundReason that)
static NotFound | NotFoundHelper.extract(Any a)
static void | NotFoundHelper.insert(Any a, NotFound that)
static CannotProceed | CannotProceedHelper.extract(Any a)
static void | CannotProceedHelper.insert(Any a, CannotProceed that)
static InvalidName | InvalidNameHelper.extract(Any a)
static void | InvalidNameHelper.insert(Any a, InvalidName that)
static NotEmpty | NotEmptyHelper.extract(Any a)
static void | NotEmptyHelper.insert(Any a, NotEmpty that)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.AnySeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.AnySeqHolder

Packages that use AnySeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of AnySeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type AnySeqHolder
 void DataInputStream.read_any_array(AnySeqHolder seq, int offset, int length)
Reads array of IDL Anys from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BAD_OPERATION

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BAD_OPERATION

Packages that use BAD_OPERATION
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of BAD_OPERATION in org.omg.CORBA

Methods in org.omg.CORBA that throw BAD_OPERATION
abstract short | Any.extract_short() Extracts the short in this Any object's value field.
abstract int | Any.extract_long() Extracts the int in this Any object's value field.
abstract long | Any.extract_longlong() Extracts the long in this Any object's value field.
abstract short | Any.extract_ushort() Extracts the short in this Any object's value field.
abstract int | Any.extract_ulong() Extracts the int in this Any object's value field.
abstract long | Any.extract_ulonglong() Extracts the long in this Any object's value field.
abstract float | Any.extract_float() Extracts the float in this Any object's value field.
abstract double | Any.extract_double() Extracts the double in this Any object's value field.
abstract boolean | Any.extract_boolean() Extracts the boolean in this Any object's value field.
abstract char | Any.extract_char() Extracts the char in this Any object's value field.
abstract byte | Any.extract_octet() Extracts the byte in this Any object's value field.
abstract char | Any.extract_wchar() Extracts the char in this Any object's value field.
abstract Any | Any.extract_any() Extracts the Any object in this Any object's value field.
abstract String | Any.extract_string() Extracts the String object in this Any object's value field.
abstract String | Any.extract_wstring() Extracts the String object in this Any object's value field.
abstract Object | Any.extract_Object() Extracts the org.omg.CORBA.Object in this Any object's value field.
abstract void | Any.insert_Object(Object o, TypeCode t) Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract TypeCode | Any.extract_TypeCode() Extracts the TypeCode object in this Any object's value field.
abstract Principal | Any.extract_Principal() Deprecated. Deprecated by CORBA 2.2.
Serializable | Any.extract_Value() Extracts the java.io.Serializable object in this Any object's value field.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BAD_PARAM

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BAD_PARAM

Packages that use BAD_PARAM
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of BAD_PARAM in org.omg.CORBA

Methods in org.omg.CORBA that throw BAD_PARAM
static SetOverrideType | SetOverrideType.from_int(int i) Converts the given int to the corresponding SetOverrideType instance.
static TCKind | TCKind.from_int(int i) Converts the given int to the corresponding TCKind instance.
static CompletionStatus | CompletionStatus.from_int(int i) Creates a CompletionStatus object from the given int.
static DefinitionKind | DefinitionKind.from_int(int i) Creates a DefinitionKind instance corresponding to the given code .

Uses of BAD_PARAM in org.omg.CORBA_2_3

Methods in org.omg.CORBA_2_3 that throw BAD_PARAM
 Object ORB.get_value_def(String repid)

Uses of BAD_PARAM in org.omg.CosNaming

Methods in org.omg.CosNaming that throw BAD_PARAM
static BindingIterator | BindingIteratorHelper.narrow(Object that)
static NamingContext | NamingContextHelper.narrow(Object that)
static BindingType | BindingType.from_int(int i)

Uses of BAD_PARAM in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage that throw BAD_PARAM
static NotFoundReason NotFoundReason.from_int(int i)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.BooleanSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.BooleanSeqHolder

Packages that use BooleanSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of BooleanSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type BooleanSeqHolder
 void DataInputStream.read_boolean_array(BooleanSeqHolder seq, int offset, int length)
Reads array of IDL booleans from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Bounds

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Bounds

Packages that use Bounds
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Bounds in org.omg.CORBA

Methods in org.omg.CORBA that throw Bounds
abstract String | ContextList.item(int index) Returns the String object at the given index.
abstract void | ContextList.remove(int index) Removes the String object at the given index.
abstract TypeCode | ExceptionList.item(int index) Returns the TypeCode object at the given index.
abstract void | ExceptionList.remove(int index) Removes the TypeCode object at the given index.
abstract NamedValue | NVList.item(int index) Retrieves the NamedValue object at the given index.
abstract void | NVList.remove(int index) Removes the NamedValue object at the given index.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CharSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CharSeqHolder

Packages that use CharSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of CharSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type CharSeqHolder
 void DataInputStream.read_char_array(CharSeqHolder seq, int offset, int length)
Reads array of IDL characters from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.CompletionStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.CompletionStatus

Packages that use CompletionStatus
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of CompletionStatus in org.omg.CORBA

Fields in org.omg.CORBA declared as CompletionStatus
CompletionStatus | SystemException.completed The status of the operation that threw this exception.
static CompletionStatus | CompletionStatus.COMPLETED_YES An instance of CompletionStatus initialized with the constant _COMPLETED_YES.
static CompletionStatus | CompletionStatus.COMPLETED_NO An instance of CompletionStatus initialized with the constant _COMPLETED_NO.
static CompletionStatus | CompletionStatus.COMPLETED_MAYBE An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.

Methods in org.omg.CORBA that return CompletionStatus
static CompletionStatus | CompletionStatus.from_int(int i) Creates a CompletionStatus object from the given int.
static CompletionStatus | CompletionStatusHelper.extract(Any a)
static CompletionStatus | CompletionStatusHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type CompletionStatus
static void | CompletionStatusHelper.insert(Any a, CompletionStatus that)
static void | CompletionStatusHelper.write(OutputStream ostream, CompletionStatus value)

Constructors in org.omg.CORBA with parameters of type CompletionStatus
SystemException(String reason, int minor, CompletionStatus completed)
Constructs a SystemException exception with the specified detail message, minor code, and completion status.
MARSHAL(int minor, CompletionStatus completed)
Constructs a MARSHAL exception with the specified minor code and completion status.
MARSHAL(String s, int minor, CompletionStatus completed)
Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
UNKNOWN(int minor, CompletionStatus completed)
Constructs an UNKNOWN exception with the specified minor code and completion status.
UNKNOWN(String s, int minor, CompletionStatus completed)
Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
TRANSACTION_ROLLEDBACK(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
OBJECT_NOT_EXIST(int minor, CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
OBJECT_NOT_EXIST(String s, int minor, CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
IMP_LIMIT(int minor, CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified minor code and completion status.
IMP_LIMIT(String s, int minor, CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.
INV_OBJREF(int minor, CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified minor code and completion status.
INV_OBJREF(String s, int minor, CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.
INV_FLAG(int minor, CompletionStatus completed)
Constructs an INV_FLAG exception with the specified minor code and completion status.
INV_FLAG(String s, int minor, CompletionStatus completed)
Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.
INTERNAL(int minor, CompletionStatus completed)
Constructs an INTERNAL exception with the specified minor code and completion status.
INTERNAL(String s, int minor, CompletionStatus completed)
Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.
TRANSIENT(int minor, CompletionStatus completed)
Constructs a TRANSIENT exception with the specified minor code and completion status.
TRANSIENT(String s, int minor, CompletionStatus completed)
Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
INV_IDENT(int minor, CompletionStatus completed)
Constructs an INV_IDENT exception with the specified minor code and completion status.
INV_IDENT(String s, int minor, CompletionStatus completed)
Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.
BAD_PARAM(int minor, CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified minor code and completion status.
BAD_PARAM(String s, int minor, CompletionStatus completed)
Constructs a BAD_PARAM exception with the specified detail message, minor code, and completion status.
INTF_REPOS(int minor, CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified minor code and completion status.
INTF_REPOS(String s, int minor, CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.
OBJ_ADAPTER(int minor, CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
OBJ_ADAPTER(String s, int minor, CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
NO_PERMISSION(int minor, CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified minor code and completion status.
NO_PERMISSION(String s, int minor, CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
INV_POLICY(int minor, CompletionStatus completed)
Constructs a INV_POLICY exception with the specified minor code and completion status.
INV_POLICY(String s, int minor, CompletionStatus completed)
Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
INITIALIZE(int minor, CompletionStatus completed)
Constructs an INITIALIZE exception with the specified minor code and completion status.
INITIALIZE(String s, int minor, CompletionStatus completed)
Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.
NO_IMPLEMENT(int minor, CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
NO_IMPLEMENT(String s, int minor, CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
INVALID_TRANSACTION(int minor, CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
INVALID_TRANSACTION(String s, int minor, CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.
DATA_CONVERSION(int minor, CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
DATA_CONVERSION(String s, int minor, CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.
BAD_OPERATION(int minor, CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified minor code and completion status.
BAD_OPERATION(String s, int minor, CompletionStatus completed)
Constructs a BAD_OPERATION exception with the specified detail message, minor code, and completion status.
NO_MEMORY(int minor, CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified minor code and completion status.
NO_MEMORY(String s, int minor, CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
PERSIST_STORE(int minor, CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified minor code and completion status.
PERSIST_STORE(String s, int minor, CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
BAD_CONTEXT(int minor, CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified minor code and completion status.
BAD_CONTEXT(String s, int minor, CompletionStatus completed)
Constructs a BAD_CONTEXT exception with the specified detail message, minor code, and completion status.
BAD_INV_ORDER(int minor, CompletionStatus completed)
Constructs a BAD_INV_ORDER exceptionBAD_INV_ORDER with the specified minor code and completion status.
BAD_INV_ORDER(String s, int minor, CompletionStatus completed)
Constructs a BAD_INV_ORDER exception with the specified detail message, minor code, and completion status.
FREE_MEM(int minor, CompletionStatus completed)
Constructs a FREE_MEM exception with the specified minor code and completion status.
FREE_MEM(String s, int minor, CompletionStatus completed)
Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.
TRANSACTION_REQUIRED(int minor, CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
TRANSACTION_REQUIRED(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
NO_RESPONSE(int minor, CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified minor code and completion status.
NO_RESPONSE(String s, int minor, CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
BAD_TYPECODE(int minor, CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified minor code and completion status.
BAD_TYPECODE(String s, int minor, CompletionStatus completed)
Constructs a BAD_TYPECODE exception with the specified detail message, minor code, and completion status.
NO_RESOURCES(int minor, CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified minor code and completion status.
NO_RESOURCES(String s, int minor, CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
COMM_FAILURE(int minor, CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified minor code and completion status.
COMM_FAILURE(String s, int minor, CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Context

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Context

Packages that use Context
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of Context in org.omg.CORBA

Methods in org.omg.CORBA that return Context
abstract Context | ServerRequest.ctx() Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference.
abstract Context | Request.ctx() Retrieves the Context object for this request.
abstract Context | ORB.get_default_context() Gets the default Context object.
abstract Context | Context.parent() Retrieves the parent of this Context object.
abstract Context | Context.create_child(String child_ctx_name) Creates a Context object with the given string as its name and with this Context object set as its parent.

Methods in org.omg.CORBA with parameters of type Context
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
abstract void | Request.ctx(Context c) Sets this request's Context object to the one given.

Uses of Context in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Context
 Context InputStream.read_Context()
Reads a CORBA context from the stream.

Methods in org.omg.CORBA.portable with parameters of type Context
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
void | OutputStream.write_Context(Context ctx, ContextList contexts) Writes a CORBA context on this stream.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ContextList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ContextList

Packages that use ContextList
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ContextList in org.omg.CORBA

Methods in org.omg.CORBA that return ContextList
abstract ContextList | Request.contexts() Retrieves the ContextList object for this request.
abstract ContextList | ORB.create_context_list() Creates an empty ContextList object.

Methods in org.omg.CORBA with parameters of type ContextList
 Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.

Uses of ContextList in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type ContextList
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
void | OutputStream.write_Context(Context ctx, ContextList contexts) Writes a CORBA context on this stream.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DATA_CONVERSION

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DATA_CONVERSION

Packages that use DATA_CONVERSION
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DATA_CONVERSION in org.omg.CORBA

Methods in org.omg.CORBA that throw DATA_CONVERSION
abstract void | Any.insert_char(char c) Inserts the given char into this Any object's value field.
abstract void | Any.insert_string(String s) Inserts the given String object into this Any object's value field.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DefinitionKind

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DefinitionKind

Packages that use DefinitionKind
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DefinitionKind in org.omg.CORBA

Fields in org.omg.CORBA declared as DefinitionKind
static DefinitionKind | DefinitionKind.dk_none The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.
static DefinitionKind | DefinitionKind.dk_all The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate.
static DefinitionKind | DefinitionKind.dk_Attribute The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.
static DefinitionKind | DefinitionKind.dk_Constant The static instance of DefinitionKind indicating that an Interface Repository object is a constant.
static DefinitionKind | DefinitionKind.dk_Exception The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.
static DefinitionKind | DefinitionKind.dk_Interface The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.
static DefinitionKind | DefinitionKind.dk_Module The static instance of DefinitionKind indicating that an Interface Repository object is a Module.
static DefinitionKind | DefinitionKind.dk_Operation The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.
static DefinitionKind | DefinitionKind.dk_Typedef The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.
static DefinitionKind | DefinitionKind.dk_Alias The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.
static DefinitionKind | DefinitionKind.dk_Struct The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.
static DefinitionKind | DefinitionKind.dk_Union The static instance of DefinitionKind indicating that an Interface Repository object is a Union.
static DefinitionKind | DefinitionKind.dk_Enum The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.
static DefinitionKind | DefinitionKind.dk_Primitive The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.
static DefinitionKind | DefinitionKind.dk_String The static instance of DefinitionKind indicating that an Interface Repository object is a String.
static DefinitionKind | DefinitionKind.dk_Sequence The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.
static DefinitionKind | DefinitionKind.dk_Array The static instance of DefinitionKind indicating that an Interface Repository object is an Array.
static DefinitionKind | DefinitionKind.dk_Repository The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.
static DefinitionKind | DefinitionKind.dk_Wstring The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.
static DefinitionKind | DefinitionKind.dk_Fixed The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.
static DefinitionKind | DefinitionKind.dk_Value The static instance of DefinitionKind indicating that an Interface Repository object is a Value.
static DefinitionKind | DefinitionKind.dk_ValueBox The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.
static DefinitionKind | DefinitionKind.dk_ValueMember The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.
static DefinitionKind | DefinitionKind.dk_Native The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.

Methods in org.omg.CORBA that return DefinitionKind
static DefinitionKind | DefinitionKindHelper.extract(Any a)
static DefinitionKind | DefinitionKindHelper.read(InputStream istream)
DefinitionKind | IRObjectOperations.def_kind() Returns the DefinitionKind corresponding to this Interface Repository object.
DefinitionKind | _IDLTypeStub.def_kind()
static DefinitionKind | DefinitionKind.from_int(int i) Creates a DefinitionKind instance corresponding to the given code .

Methods in org.omg.CORBA with parameters of type DefinitionKind
static void | DefinitionKindHelper.insert(Any a, DefinitionKind that)
static void | DefinitionKindHelper.write(OutputStream ostream, DefinitionKind value)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DoubleSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DoubleSeqHolder

Packages that use DoubleSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DoubleSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type DoubleSeqHolder
 void DataInputStream.read_double_array(DoubleSeqHolder seq, int offset, int length)
Reads array of IDL doubles from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DynamicImplementation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DynamicImplementation

Packages that use DynamicImplementation
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of DynamicImplementation in org.omg.CosNaming

Subclasses of DynamicImplementation in org.omg.CosNaming
class | _BindingIteratorImplBase
class | _NamingContextImplBase

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Environment

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Environment

Packages that use Environment
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Environment in org.omg.CORBA

Methods in org.omg.CORBA that return Environment
abstract Environment | Request.env() Retrieves the Environment object for this request.
abstract Environment | ORB.create_environment() Creates an Environment object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ExceptionList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ExceptionList

Packages that use ExceptionList
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ExceptionList in org.omg.CORBA

Methods in org.omg.CORBA that return ExceptionList
abstract ExceptionList | Request.exceptions() Retrieves the ExceptionList object for this request.
abstract ExceptionList | ORB.create_exception_list() Creates an empty ExceptionList object.

Methods in org.omg.CORBA with parameters of type ExceptionList
 Request Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.

Uses of ExceptionList in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type ExceptionList
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.FloatSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.FloatSeqHolder

Packages that use FloatSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of FloatSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type FloatSeqHolder
 void DataInputStream.read_float_array(FloatSeqHolder seq, int offset, int length)
Reads array of IDL floats from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.LongLongSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.LongLongSeqHolder

Packages that use LongLongSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of LongLongSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type LongLongSeqHolder
 void DataInputStream.read_longlong_array(LongLongSeqHolder seq, int offset, int length)
Reads array of IDL long longs from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.LongSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.LongSeqHolder

Packages that use LongSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of LongSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type LongSeqHolder
 void DataInputStream.read_long_array(LongSeqHolder seq, int offset, int length)
Reads array of IDL longs from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.MARSHAL

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.MARSHAL

Packages that use MARSHAL
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of MARSHAL in org.omg.CORBA

Methods in org.omg.CORBA that throw MARSHAL
abstract void | Any.read_value(InputStream is, TypeCode t) Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
abstract void | Any.insert_string(String s) Inserts the given String object into this Any object's value field.
abstract void | Any.insert_wstring(String s) Inserts the given String object into this Any object's value field.
void | Any.insert_Value(Serializable v, TypeCode t) Inserts the given java.io.Serializable object into this Any object's value field.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NamedValue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NamedValue

Packages that use NamedValue
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of NamedValue in org.omg.CORBA

Methods in org.omg.CORBA that return NamedValue
abstract NamedValue | Request.result() Retrieves the NamedValue object containing the return value for the method.
abstract NamedValue | ORB.create_named_value(String s, Any any, int flags) Creates a NamedValue object using the given name, value, and argument mode flags.
abstract NamedValue | NVList.add(int flags) Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
abstract NamedValue | NVList.add_item(String item_name, int flags) Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
abstract NamedValue | NVList.add_value(String item_name, Any val, int flags) Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
abstract NamedValue | NVList.item(int index) Retrieves the NamedValue object at the given index.

Methods in org.omg.CORBA with parameters of type NamedValue
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.

Uses of NamedValue in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type NamedValue
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NameValuePair

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NameValuePair

Packages that use NameValuePair
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of NameValuePair in org.omg.CORBA

Methods in org.omg.CORBA that return NameValuePair
static NameValuePair | NameValuePairHelper.extract(Any a)
static NameValuePair | NameValuePairHelper.read(InputStream istream)
NameValuePair[] | DynStruct.get_members() Returns an array containing all the members of the stored struct.
NameValuePair[] | DynValue.get_members() Returns an array containing all the members of the value object stored in this DynValue.

Methods in org.omg.CORBA with parameters of type NameValuePair
static void | NameValuePairHelper.insert(Any a, NameValuePair that)
static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
void | DynStruct.set_members(NameValuePair[] value) Set the members of the struct.
void | DynValue.set_members(NameValuePair[] value) Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.NVList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.NVList

Packages that use NVList
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of NVList in org.omg.CORBA

Methods in org.omg.CORBA that return NVList
abstract NVList | Request.arguments() Retrieves the NVList object containing the arguments to the method being invoked.
abstract NVList | ORB.create_list(int count) Allocates an NVList with (probably) enough space for the specified number of NamedValue objects.
NVList | ORB.create_operation_list(Object oper) Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
abstract NVList | Context.get_values(String start_scope, int op_flags, String pattern) Retrieves the NamedValue objects whose name field matches the given name or name pattern.

Methods in org.omg.CORBA with parameters of type NVList
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
void | ServerRequest.params(NVList params) Deprecated. use the method arguments
void | ServerRequest.arguments(NVList args) Specifies method parameter types and retrieves "in" and "inout" argument values.
abstract void | Context.set_values(NVList values) I Sets one or more property values in this Context object.

Uses of NVList in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type NVList
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.OctetSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.OctetSeqHolder

Packages that use OctetSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of OctetSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type OctetSeqHolder
 void DataInputStream.read_octet_array(OctetSeqHolder seq, int offset, int length)
Reads array of IDL octets from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ORB

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ORB

Packages that use ORB
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ORB in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return ORB
 ORB Tie.orb()
Returns the ORB for this tie.

Methods in javax.rmi.CORBA with parameters of type ORB
static Object[] Util.copyObjects(Object[] obj, ORB orb)
Copies or connects an array of objects.
static Object Util.copyObject(Object obj, ORB orb)
Copies or connects an object.
 void Stub.connect(ORB orb)
Connects this stub to an ORB.
 void Tie.orb(ORB orb)
Sets the ORB for this tie.
 void StubDelegate.connect(Stub self, ORB orb)
Delegation call for Stub.connect(org.omg.CORBA.ORB).
 Object UtilDelegate.copyObject(Object obj, ORB orb)
Delegation call for Util.copyObject(java.lang.Object, org.omg.CORBA.ORB).
 Object[] UtilDelegate.copyObjects(Object[] obj, ORB orb)
Delegation call for Util.copyObjects(java.lang.Object[], org.omg.CORBA.ORB).

Uses of ORB in org.omg.CORBA

Methods in org.omg.CORBA that return ORB
static ORB | ORB.init() Returns the ORB singleton object.
static ORB | ORB.init(String[] args, Properties props) Creates a new ORB instance for a standalone application.
static ORB | ORB.init(Applet app, Properties props) Creates a new ORB instance for an applet.

Uses of ORB in org.omg.CORBA_2_3

Subclasses of ORB in org.omg.CORBA_2_3
 class ORB
A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

Uses of ORB in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return ORB
ORB | ObjectImpl._orb() Returns a reference to the ORB associated with this object and its delegate.
ORB | OutputStream.orb() Returns the ORB that created this OutputStream.
ORB | InputStream.orb() Returns the ORB that created this InputStream.
ORB | Delegate.orb(Object obj) Provides a reference to the orb associated with its parameter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.PolicyError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.PolicyError

Packages that use PolicyError
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of PolicyError in org.omg.CORBA

Methods in org.omg.CORBA that throw PolicyError
 Policy ORB.create_policy(int type, Any val)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Principal

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Principal

Packages that use Principal
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of Principal in org.omg.CORBA

Fields in org.omg.CORBA declared as Principal
 Principal PrincipalHolder.value
Deprecated. The Principal value held by this PrincipalHolder object.

Methods in org.omg.CORBA that return Principal
abstract  Principal Any.extract_Principal()
Deprecated. Deprecated by CORBA 2.2.

Methods in org.omg.CORBA with parameters of type Principal
abstract  void Any.insert_Principal(Principal p)
Deprecated. Deprecated by CORBA 2.2.

Constructors in org.omg.CORBA with parameters of type Principal
PrincipalHolder(Principal initial)
Deprecated. Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.

Uses of Principal in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Principal
abstract  Principal InputStream.read_Principal()
Deprecated. Deprecated by CORBA 2.2.

Methods in org.omg.CORBA.portable with parameters of type Principal
abstract  void OutputStream.write_Principal(Principal value)
Deprecated. Deprecated by CORBA 2.2.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.Request

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.Request

Packages that use Request
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of Request in org.omg.CORBA

Methods in org.omg.CORBA that return Request
Request | Object._request(String operation) Creates a Request instance for use in the Dynamic Invocation Interface.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
Request | Object._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
abstract Request | ORB.get_next_response() Gets the next Request instance for which a response has been received.

Methods in org.omg.CORBA with parameters of type Request
abstract void | ORB.send_multiple_requests_oneway(Request[] req) Sends multiple dynamic (DII) requests asynchronously without expecting any responses.
abstract void | ORB.send_multiple_requests_deferred(Request[] req) Sends multiple dynamic (DII) requests asynchronously.

Uses of Request in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Request
Request | ObjectImpl._request(String operation) Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | ObjectImpl._create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
abstract Request | Delegate.request(Object obj, String operation) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.
abstract Request | Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServerRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServerRequest

Packages that use ServerRequest
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CosNaming | Provides the naming service for Java IDL.

Uses of ServerRequest in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type ServerRequest
abstract  void DynamicImplementation.invoke(ServerRequest request)
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception.

Uses of ServerRequest in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type ServerRequest
void | _BindingIteratorImplBase.invoke(ServerRequest r)
void | _NamingContextImplBase.invoke(ServerRequest r)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServiceDetail

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServiceDetail

Packages that use ServiceDetail
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ServiceDetail in org.omg.CORBA

Fields in org.omg.CORBA declared as ServiceDetail
 ServiceDetail[] ServiceInformation.service_details

Methods in org.omg.CORBA that return ServiceDetail
static ServiceDetail | ServiceDetailHelper.read(InputStream in)
static ServiceDetail | ServiceDetailHelper.extract(Any a)

Methods in org.omg.CORBA with parameters of type ServiceDetail
static void | ServiceDetailHelper.write(OutputStream out, ServiceDetail that)
static void | ServiceDetailHelper.insert(Any a, ServiceDetail that)

Constructors in org.omg.CORBA with parameters of type ServiceDetail
ServiceInformation(int[] __service_options, ServiceDetail[] __service_details)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServiceInformation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServiceInformation

Packages that use ServiceInformation
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ServiceInformation in org.omg.CORBA

Fields in org.omg.CORBA declared as ServiceInformation
 ServiceInformation ServiceInformationHolder.value
The ServiceInformation value held by this ServiceInformationHolder object in its value field.

Methods in org.omg.CORBA that return ServiceInformation
static ServiceInformation | ServiceInformationHelper.read(InputStream in)
static ServiceInformation | ServiceInformationHelper.extract(Any a)

Methods in org.omg.CORBA with parameters of type ServiceInformation
static void | ServiceInformationHelper.write(OutputStream out, ServiceInformation that)
static void | ServiceInformationHelper.insert(Any a, ServiceInformation that)

Constructors in org.omg.CORBA with parameters of type ServiceInformation
ServiceInformationHolder(ServiceInformation arg)
Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ServiceInformationHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ServiceInformationHolder

Packages that use ServiceInformationHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ServiceInformationHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type ServiceInformationHolder
 boolean ORB.get_service_information(short service_type, ServiceInformationHolder service_info)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.SetOverrideType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.SetOverrideType

Packages that use SetOverrideType
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of SetOverrideType in org.omg.CORBA

Fields in org.omg.CORBA declared as SetOverrideType
static SetOverrideType | SetOverrideType.SET_OVERRIDE The SetOverrideType constant for the enum value SET_OVERRIDE.
static SetOverrideType | SetOverrideType.ADD_OVERRIDE The SetOverrideType constant for the enum value ADD_OVERRIDE.

Methods in org.omg.CORBA that return SetOverrideType
static SetOverrideType | SetOverrideType.from_int(int i) Converts the given int to the corresponding SetOverrideType instance.
static SetOverrideType | SetOverrideTypeHelper.extract(Any a)
static SetOverrideType | SetOverrideTypeHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type SetOverrideType
Object | Object._set_policy_override(Policy[] policies, SetOverrideType set_add) Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
static void | SetOverrideTypeHelper.insert(Any a, SetOverrideType that)
static void | SetOverrideTypeHelper.write(OutputStream ostream, SetOverrideType value)

Uses of SetOverrideType in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type SetOverrideType
Object | ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add) Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
Object | Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add) Associates the policies passed in with a newly created object reference that it returns.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ShortSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ShortSeqHolder

Packages that use ShortSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ShortSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type ShortSeqHolder
 void DataInputStream.read_short_array(ShortSeqHolder seq, int offset, int length)
Reads array of IDL shorts from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.StructMember

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.StructMember

Packages that use StructMember
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of StructMember in org.omg.CORBA

Fields in org.omg.CORBA declared as StructMember
 StructMember[] Initializer.members
members contains the reference to all the Initializers of non abstract value types.

Methods in org.omg.CORBA that return StructMember
static StructMember | StructMemberHelper.extract(Any a)
static StructMember | StructMemberHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type StructMember
static void | StructMemberHelper.insert(Any a, StructMember that)
static void | StructMemberHelper.write(OutputStream ostream, StructMember value)
abstract TypeCode | ORB.create_struct_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL struct.
abstract TypeCode | ORB.create_exception_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL exception.

Constructors in org.omg.CORBA with parameters of type StructMember
Initializer(StructMember[] _members)
Constructs an Initializer object and assigns the members attribute with the given parameter.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.SystemException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.SystemException

Packages that use SystemException
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of SystemException in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type SystemException
static RemoteException Util.mapSystemException(SystemException ex)
Maps a SystemException to a RemoteException.
 RemoteException UtilDelegate.mapSystemException(SystemException ex)
Delegation call for Util.mapSystemException(org.omg.CORBA.SystemException).

Uses of SystemException in org.omg.CORBA

Subclasses of SystemException in org.omg.CORBA
class | BAD_CONTEXT The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
class | BAD_INV_ORDER The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
class | BAD_OPERATION The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
class | BAD_PARAM The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
class | BAD_TYPECODE The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
class | COMM_FAILURE The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
class | DATA_CONVERSION The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
class | FREE_MEM The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
class | IMP_LIMIT The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
class | INITIALIZE The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
class | INTERNAL The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
class | INTF_REPOS The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
class | INV_FLAG The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
class | INV_IDENT The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
class | INV_OBJREF The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
class | INV_POLICY The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
class | INVALID_TRANSACTION The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
class | MARSHAL The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
class | NO_IMPLEMENT The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
class | NO_MEMORY The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
class | NO_PERMISSION The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
class | NO_RESOURCES The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
class | NO_RESPONSE The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
class | OBJ_ADAPTER The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
class | OBJECT_NOT_EXIST The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
class | PERSIST_STORE The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
class | TRANSACTION_REQUIRED The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
class | TRANSACTION_ROLLEDBACK The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
class | TRANSIENT The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
class | UNKNOWN The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.

Uses of SystemException in org.omg.CORBA.portable

Subclasses of SystemException in org.omg.CORBA.portable
class | IndirectionException The Indirection exception is a Java specific system exception.
class | UnknownException The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Methods in org.omg.CORBA.portable that throw SystemException
 OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
Invoked by the ORB to dispatch a request to the servant.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TCKind

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TCKind

Packages that use TCKind
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of TCKind in org.omg.CORBA

Fields in org.omg.CORBA declared as TCKind
static TCKind | TCKind.tk_null The TCKind constant whose value field is initialized with TCKind._tk_null.
static TCKind | TCKind.tk_void The TCKind constant whose value field is initialized with TCKind._tk_void.
static TCKind | TCKind.tk_short The TCKind constant whose value field is initialized with TCKind._tk_short.
static TCKind | TCKind.tk_long The TCKind constant whose value field is initialized with TCKind._tk_long.
static TCKind | TCKind.tk_ushort The TCKind constant whose value field is initialized with TCKind._tk_ushort.
static TCKind | TCKind.tk_ulong The TCKind constant whose value field is initialized with TCKind._tk_ulong.
static TCKind | TCKind.tk_float The TCKind constant whose value field is initialized with TCKind._tk_float.
static TCKind | TCKind.tk_double The TCKind constant whose value field is initialized with TCKind._tk_double.
static TCKind | TCKind.tk_boolean The TCKind constant whose value field is initialized with TCKind._tk_boolean.
static TCKind | TCKind.tk_char The TCKind constant whose value field is initialized with TCKind._tk_char.
static TCKind | TCKind.tk_octet The TCKind constant whose value field is initialized with TCKind._tk_octet.
static TCKind | TCKind.tk_any The TCKind constant whose value field is initialized with TCKind._tk_any.
static TCKind | TCKind.tk_TypeCode The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.
static TCKind | TCKind.tk_Principal The TCKind constant whose value field is initialized with TCKind._tk_Principal.
static TCKind | TCKind.tk_objref The TCKind constant whose value field is initialized with TCKind._tk_objref.
static TCKind | TCKind.tk_struct The TCKind constant whose value field is initialized with TCKind._tk_struct.
static TCKind | TCKind.tk_union The TCKind constant whose value field is initialized with TCKind._tk_union.
static TCKind | TCKind.tk_enum The TCKind constant whose value field is initialized with TCKind._tk_enum.
static TCKind | TCKind.tk_string The TCKind constant whose value field is initialized with TCKind._tk_string.
static TCKind | TCKind.tk_sequence The TCKind constant whose value field is initialized with TCKind._tk_sequence.
static TCKind | TCKind.tk_array The TCKind constant whose value field is initialized with TCKind._tk_array.
static TCKind | TCKind.tk_alias The TCKind constant whose value field is initialized with TCKind._tk_alias.
static TCKind | TCKind.tk_except The TCKind constant whose value field is initialized with TCKind._tk_except.
static TCKind | TCKind.tk_longlong The TCKind constant whose value field is initialized with TCKind._tk_longlong.
static TCKind | TCKind.tk_ulonglong The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.
static TCKind | TCKind.tk_longdouble The TCKind constant whose value field is initialized with TCKind._tk_longdouble.
static TCKind | TCKind.tk_wchar The TCKind constant whose value field is initialized with TCKind._tk_wchar.
static TCKind | TCKind.tk_wstring The TCKind constant whose value field is initialized with TCKind._tk_wstring.
static TCKind | TCKind.tk_fixed The TCKind constant whose value field is initialized with TCKind._tk_fixed.
static TCKind | TCKind.tk_value The TCKind constant whose value field is initialized with TCKind._tk_value.
static TCKind | TCKind.tk_value_box The TCKind constant whose value field is initialized with TCKind._tk_value_box.
static TCKind | TCKind.tk_native The TCKind constant whose value field is initialized with TCKind._tk_native.
static TCKind | TCKind.tk_abstract_interface The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.

Methods in org.omg.CORBA that return TCKind
static TCKind | TCKind.from_int(int i) Converts the given int to the corresponding TCKind instance.
TCKind | DynStruct.current_member_kind() Returns the TCKind object that describes the kind of the current member.
TCKind | DynUnion.discriminator_kind() Returns the TCKind object associated with the discriminator of this union.
TCKind | DynUnion.member_kind() Returns the TCKind associated with the member of this union.
abstract TCKind | TypeCode.kind() Retrieves the kind of this TypeCode object.
TCKind | DynValue.current_member_kind() Returns the TCKind object that describes the current member.

Methods in org.omg.CORBA with parameters of type TCKind
abstract  TypeCode ORB.get_primitive_tc(TCKind tcKind)
Retrieves the TypeCode object that represents the given primitive IDL type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TypeCode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TypeCode

Packages that use TypeCode
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of TypeCode in org.omg.CORBA

Fields in org.omg.CORBA declared as TypeCode
TypeCode | UnionMember.type The type of the union member described by this UnionMember object.
TypeCode | StructMember.type The type of the struct member described by this StructMember object.
TypeCode | TypeCodeHolder.value The TypeCode value held by this TypeCodeHolder object.
TypeCode | ValueMember.type The type of the value member described by this ValueMember object.

Methods in org.omg.CORBA that return TypeCode
TypeCode | UShortSeqHolder._type()
TypeCode | DynAny.type() Returns the TypeCode of the object inserted into this DynAny.
TypeCode | DynAny.get_typecode() Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
TypeCode | DoubleHolder._type() Return the TypeCode of this holder object.
TypeCode | AnyHolder._type() Returns the TypeCode object corresponding to the value held in this AnyHolder object.
static TypeCode | UnionMemberHelper.type()
static TypeCode | ServiceInformationHelper.type()
TypeCode | DoubleSeqHolder._type()
static TypeCode | PolicyListHelper.type()
abstract TypeCode | Any.type() Returns type information for the element contained in this Any object.
abstract TypeCode | Any.extract_TypeCode() Extracts the TypeCode object in this Any object's value field.
TypeCode | ShortSeqHolder._type()
TypeCode | ObjectHolder._type() Returns the TypeCode corresponding to the value held in this ObjectHolder object
TypeCode | LongLongSeqHolder._type()
TypeCode | ShortHolder._type() Returns the TypeCode corresponding to the value held in this ShortHolder object.
static TypeCode | NameValuePairHelper.type()
static TypeCode | LongSeqHelper.type()
TypeCode | ULongLongSeqHolder._type()
TypeCode | CurrentHolder._type()
TypeCode | CharHolder._type() Returns the TypeCode object corresponding to the value held in this CharHolder object.
TypeCode | PrincipalHolder._type() Deprecated.
TypeCode | ValueBaseHolder._type() Returns the TypeCode object corresponding to the value held in the Holder.
static TypeCode | OctetSeqHelper.type()
static TypeCode | IdentifierHelper.type()
TypeCode | PolicyHolder._type()
static TypeCode | FloatSeqHelper.type()
TypeCode | AnySeqHolder._type()
static TypeCode | ServiceDetailHelper.type()
TypeCode | PolicyListHolder._type()
static TypeCode | BooleanSeqHelper.type()
static TypeCode | VisibilityHelper.type()
static TypeCode | ULongSeqHelper.type()
static TypeCode | StringValueHelper.type()
static TypeCode | CharSeqHelper.type()
static TypeCode | SetOverrideTypeHelper.type()
TypeCode | ServiceInformationHolder._type() Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
TypeCode | IntHolder._type() Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
static TypeCode | VersionSpecHelper.type()
static TypeCode | DefinitionKindHelper.type()
static TypeCode | StructMemberHelper.type()
TypeCode | LongSeqHolder._type()
TypeCode | StringHolder._type() Retreives the TypeCode object that corresponds to the value held in this StringHolder object.
TypeCode | FixedHolder._type() Return the TypeCode of this holder object.
static TypeCode | IDLTypeHelper.type()
static TypeCode | UShortSeqHelper.type()
TypeCode | TypeCodeHolder._type() Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
static TypeCode | WCharSeqHelper.type()
TypeCode | OctetSeqHolder._type()
TypeCode | TypeCode.get_compact_typecode() Strips out all optional name and member name fields, but leaves all alias typecodes intact.
abstract TypeCode | TypeCode.member_type(int index) Retrieves the TypeCode object describing the type of the member identified by the given index.
abstract TypeCode | TypeCode.discriminator_type() Returns a TypeCode object describing all non-default member labels.
abstract TypeCode | TypeCode.content_type() Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
TypeCode | TypeCode.concrete_base_type() Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
static TypeCode | DoubleSeqHelper.type()
TypeCode | DataInputStream.read_TypeCode() Reads an IDL typecode from the input stream.
static TypeCode | WStringValueHelper.type()
static TypeCode | PolicyTypeHelper.type()
TypeCode | BooleanSeqHolder._type()
TypeCode | FloatSeqHolder._type()
static TypeCode | ULongLongSeqHelper.type()
abstract TypeCode | ExceptionList.item(int index) Returns the TypeCode object at the given index.
static TypeCode | RepositoryIdHelper.type()
static TypeCode | ShortSeqHelper.type()
TypeCode | ULongSeqHolder._type()
abstract TypeCode | ORB.get_primitive_tc(TCKind tcKind) Retrieves the TypeCode object that represents the given primitive IDL type.
abstract TypeCode | ORB.create_struct_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL struct.
abstract TypeCode | ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Creates a TypeCode object representing an IDL union.
abstract TypeCode | ORB.create_enum_tc(String id, String name, String[] members) Creates a TypeCode object representing an IDL enum.
abstract TypeCode | ORB.create_alias_tc(String id, String name, TypeCode original_type) Creates a TypeCode object representing an IDL alias (typedef).
abstract TypeCode | ORB.create_exception_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL exception.
abstract TypeCode | ORB.create_interface_tc(String id, String name) Creates a TypeCode object representing an IDL interface.
abstract TypeCode | ORB.create_string_tc(int bound) Creates a TypeCode object representing a bounded IDL string.
abstract TypeCode | ORB.create_wstring_tc(int bound) Creates a TypeCode object representing a bounded IDL wstring (wide string).
abstract TypeCode | ORB.create_sequence_tc(int bound, TypeCode element_type) Creates a TypeCode object representing an IDL sequence.
abstract TypeCode | ORB.create_recursive_sequence_tc(int bound, int offset) Deprecated.
abstract TypeCode | ORB.create_array_tc(int length, TypeCode element_type) Creates a TypeCode object representing an IDL array.
TypeCode | ORB.create_native_tc(String id, String name) Create a TypeCode object for an IDL native type.
TypeCode | ORB.create_abstract_interface_tc(String id, String name) Create a TypeCode object for an IDL abstract interface.
TypeCode | ORB.create_fixed_tc(short digits, short scale) Create a TypeCode object for an IDL fixed type.
TypeCode | ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create a TypeCode object for an IDL value type.
TypeCode | ORB.create_recursive_tc(String id) Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
TypeCode | ORB.create_value_box_tc(String id, String name, TypeCode boxed_type) Creates a TypeCode object for an IDL value box.
TypeCode | FloatHolder._type() Return the TypeCode of this Streamable.
static TypeCode | ObjectHelper.type()
static TypeCode | CurrentHelper.type()
static TypeCode | LongLongSeqHelper.type()
TypeCode | ByteHolder._type() Returns the TypeCode corresponding to the value held in this ByteHolder object.
TypeCode | _IDLTypeStub.type()
TypeCode | BooleanHolder._type() Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
TypeCode | CharSeqHolder._type()
static TypeCode | CompletionStatusHelper.type()
TypeCode | LongHolder._type() Returns the TypeCode object corresponding to the value held in the Holder.
TypeCode | IDLTypeOperations.type() The type attribute describes the type defined by an object derived from IDLType.
static TypeCode | FieldNameHelper.type()
static TypeCode | ValueBaseHelper.type()
TypeCode | WCharSeqHolder._type()
static TypeCode | PolicyHelper.type()
static TypeCode | AnySeqHelper.type()
static TypeCode | ValueMemberHelper.type()

Methods in org.omg.CORBA with parameters of type TypeCode
void | DynAny.insert_typecode(TypeCode value) Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
abstract void | Any.type(TypeCode t) Sets this Any object's type field to the given TypeCode object and clears its value.
abstract void | Any.read_value(InputStream is, TypeCode t) Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
abstract void | Any.insert_Object(Object o, TypeCode t) Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract void | Any.insert_TypeCode(TypeCode t) Inserts the given TypeCode object into this Any object's value field.
void | Any.insert_fixed(BigDecimal value, TypeCode type) Inserts the given java.math.BigDecimal object into this Any object's value field.
void | Any.insert_Value(Serializable v, TypeCode t) Inserts the given java.io.Serializable object into this Any object's value field.
void | DataOutputStream.write_TypeCode(TypeCode value) Writes the typecode to the output stream.
abstract boolean | TypeCode.equal(TypeCode tc) Compares this TypeCode object with the given one, testing for equality.
boolean | TypeCode.equivalent(TypeCode tc) Tests to see if the given TypeCode object is equivalent to this TypeCode object.
abstract void | ExceptionList.add(TypeCode exc) Adds a TypeCode object describing an exception to this ExceptionList object.
abstract void | Request.set_return_type(TypeCode tc) Sets the typecode for the return value of the method.
abstract TypeCode | ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Creates a TypeCode object representing an IDL union.
abstract TypeCode | ORB.create_alias_tc(String id, String name, TypeCode original_type) Creates a TypeCode object representing an IDL alias (typedef).
abstract TypeCode | ORB.create_sequence_tc(int bound, TypeCode element_type) Creates a TypeCode object representing an IDL sequence.
abstract TypeCode | ORB.create_array_tc(int length, TypeCode element_type) Creates a TypeCode object representing an IDL array.
TypeCode | ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create a TypeCode object for an IDL value type.
TypeCode | ORB.create_value_box_tc(String id, String name, TypeCode boxed_type) Creates a TypeCode object for an IDL value box.
DynAny | ORB.create_basic_dyn_any(TypeCode type) See package comments regarding unimplemented features.
DynStruct | ORB.create_dyn_struct(TypeCode type) See package comments regarding unimplemented features.
DynSequence | ORB.create_dyn_sequence(TypeCode type) See package comments regarding unimplemented features.
DynArray | ORB.create_dyn_array(TypeCode type) See package comments regarding unimplemented features.
DynUnion | ORB.create_dyn_union(TypeCode type) See package comments regarding unimplemented features.
DynEnum | ORB.create_dyn_enum(TypeCode type) See package comments regarding unimplemented features.

Constructors in org.omg.CORBA with parameters of type TypeCode
UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
StructMember(String __name, TypeCode __type, IDLType __type_def)
Constructs a StructMember object initialized with the given values.
TypeCodeHolder(TypeCode initial)
Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
Constructs a ValueMember object initialized with the given values.

Uses of TypeCode in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return TypeCode
TypeCode | Streamable._type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
abstract TypeCode | InputStream.read_TypeCode() Reads a TypeCode from this input stream.

Methods in org.omg.CORBA.portable with parameters of type TypeCode
abstract  void OutputStream.write_TypeCode(TypeCode value)
Writes a TypeCode on this output stream.

Uses of TypeCode in org.omg.CosNaming

Methods in org.omg.CosNaming that return TypeCode
static TypeCode | NameHelper.type()
TypeCode | BindingIteratorHolder._type()
static TypeCode | IstringHelper.type()
TypeCode | NameComponentHolder._type()
static TypeCode | BindingListHelper.type()
TypeCode | BindingTypeHolder._type()
TypeCode | BindingListHolder._type()
static TypeCode | BindingIteratorHelper.type()
TypeCode | BindingHolder._type()
TypeCode | NameHolder._type()
static TypeCode | NameComponentHelper.type()
static TypeCode | BindingTypeHelper.type()
static TypeCode | NamingContextHelper.type()
static TypeCode | BindingHelper.type()
TypeCode | NamingContextHolder._type()

Uses of TypeCode in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage that return TypeCode
static TypeCode | AlreadyBoundHelper.type()
static TypeCode | NotFoundReasonHelper.type()
static TypeCode | NotFoundHelper.type()
TypeCode | AlreadyBoundHolder._type()
TypeCode | NotFoundReasonHolder._type()
TypeCode | InvalidNameHolder._type()
static TypeCode | CannotProceedHelper.type()
TypeCode | CannotProceedHolder._type()
TypeCode | NotFoundHolder._type()
static TypeCode | InvalidNameHelper.type()
static TypeCode | NotEmptyHelper.type()
TypeCode | NotEmptyHolder._type()

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ULongLongSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ULongLongSeqHolder

Packages that use ULongLongSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ULongLongSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type ULongLongSeqHolder
 void DataInputStream.read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned long longs from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ULongSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ULongSeqHolder

Packages that use ULongSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ULongSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type ULongSeqHolder
 void DataInputStream.read_ulong_array(ULongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned longs from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UnionMember

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UnionMember

Packages that use UnionMember
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of UnionMember in org.omg.CORBA

Methods in org.omg.CORBA that return UnionMember
static UnionMember | UnionMemberHelper.extract(Any a)
static UnionMember | UnionMemberHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type UnionMember
static void | UnionMemberHelper.insert(Any a, UnionMember that)
static void | UnionMemberHelper.write(OutputStream ostream, UnionMember value)
abstract TypeCode | ORB.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Creates a TypeCode object representing an IDL union.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UserException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UserException

Packages that use UserException
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of UserException in org.omg.CORBA

Subclasses of UserException in org.omg.CORBA
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | UnknownUserException A class that contains user exceptions returned by the server.
class | WrongTransaction The CORBA WrongTransaction user-defined exception.

Uses of UserException in org.omg.CORBA.DynAnyPackage

Subclasses of UserException in org.omg.CORBA.DynAnyPackage
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of UserException in org.omg.CORBA.ORBPackage

Subclasses of UserException in org.omg.CORBA.ORBPackage
class | InconsistentTypeCode InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
class | InvalidName The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Uses of UserException in org.omg.CORBA.TypeCodePackage

Subclasses of UserException in org.omg.CORBA.TypeCodePackage
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of UserException in org.omg.CosNaming.NamingContextPackage

Subclasses of UserException in org.omg.CosNaming.NamingContextPackage
class | AlreadyBound
class | CannotProceed
class | NotEmpty
class | NotFound

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.UShortSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.UShortSeqHolder

Packages that use UShortSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of UShortSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type UShortSeqHolder
 void DataInputStream.read_ushort_array(UShortSeqHolder seq, int offset, int length)
Reads array of IDL unsigned shorts from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ValueMember

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ValueMember

Packages that use ValueMember
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of ValueMember in org.omg.CORBA

Methods in org.omg.CORBA that return ValueMember
static ValueMember | ValueMemberHelper.extract(Any a)
static ValueMember | ValueMemberHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type ValueMember
TypeCode | ORB.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create a TypeCode object for an IDL value type.
static void | ValueMemberHelper.insert(Any a, ValueMember that)
static void | ValueMemberHelper.write(OutputStream ostream, ValueMember value)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.WCharSeqHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.WCharSeqHolder

Packages that use WCharSeqHolder
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of WCharSeqHolder in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type WCharSeqHolder
 void DataInputStream.read_wchar_array(WCharSeqHolder seq, int offset, int length)
Reads array of IDL wide characters from offset for length elements from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.WrongTransaction

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.WrongTransaction

Packages that use WrongTransaction
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of WrongTransaction in org.omg.CORBA

Methods in org.omg.CORBA that throw WrongTransaction
abstract void | Request.get_response() Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
abstract Request | ORB.get_next_response() Gets the next Request instance for which a response has been received.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.Current

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.Current

Packages that use Current
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Current in org.omg.CORBA

Fields in org.omg.CORBA declared as Current
 Current CurrentHolder.value

Methods in org.omg.CORBA that return Current
Current | ORB.get_current() Deprecated. use resolve_initial_references.
static Current | CurrentHelper.extract(Any a)
static Current | CurrentHelper.read(InputStream istream)
static Current | CurrentHelper.narrow(Object obj)

Methods in org.omg.CORBA with parameters of type Current
static void | CurrentHelper.insert(Any a, Current that)
static void | CurrentHelper.write(OutputStream ostream, Current value)

Constructors in org.omg.CORBA with parameters of type Current
CurrentHolder(Current initialValue)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.CurrentOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.CurrentOperations

Packages that use CurrentOperations
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of CurrentOperations in org.omg.CORBA

Subinterfaces of CurrentOperations in org.omg.CORBA
 interface Current
org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.CustomMarshal

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.CustomMarshal

Packages that use CustomMarshal
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of CustomMarshal in org.omg.CORBA.portable

Subinterfaces of CustomMarshal in org.omg.CORBA.portable
 interface CustomValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DataInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DataInputStream

Packages that use DataInputStream
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DataInputStream in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type DataInputStream
 void CustomMarshal.unmarshal(DataInputStream is)
Unmarshal method has to be implemented by the Customized Marshal class This is the method invoked for Unmarshalling.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DataOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DataOutputStream

Packages that use DataOutputStream
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DataOutputStream in org.omg.CORBA

Methods in org.omg.CORBA with parameters of type DataOutputStream
 void CustomMarshal.marshal(DataOutputStream os)
Marshal method has to be implemented by the Customized Marshal class This is the method invoked for Marshalling.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DomainManager

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DomainManager

Packages that use DomainManager
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of DomainManager in org.omg.CORBA

Methods in org.omg.CORBA that return DomainManager
 DomainManager[] Object._get_domain_managers()
Retrieves the DomainManagers of this object.

Uses of DomainManager in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return DomainManager
DomainManager[] | ObjectImpl._get_domain_managers() Retrieves a list of the domain managers for this ObjectImpl object.
DomainManager[] | Delegate.get_domain_managers(Object self) Retrieves the DomainManagers of this object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DomainManagerOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DomainManagerOperations

Packages that use DomainManagerOperations
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DomainManagerOperations in org.omg.CORBA

Subinterfaces of DomainManagerOperations in org.omg.CORBA
 interface DomainManager
The DomainManager has associated with it the policy objects for a particular domain.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynAny

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynAny

Packages that use DynAny
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynAny in org.omg.CORBA

Subinterfaces of DynAny in org.omg.CORBA
interface | DynArray The DynArray interface represents a DynAny object which is associated with an array.
interface | DynEnum The DynEnum interface represents a DynAny object which is associated with an IDL enum.
interface | DynFixed Represents a DynAny object that is associated with an IDL fixed type.
interface | DynSequence The representation of a DynAny object that is associated with an IDL sequence.
interface | DynStruct The representation of a DynAny object that is associated with an IDL struct.
interface | DynUnion The DynUnion interface represents a DynAny object that is associated with an IDL union.
interface | DynValue The representation of a DynAny object that is associated with an IDL value type.

Methods in org.omg.CORBA that return DynAny
DynAny | DynAny.copy() Clones this DynAny object.
DynAny | DynAny.current_component() Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
DynAny | DynUnion.discriminator() Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
DynAny | DynUnion.member() Returns a DynAny object reference that is used in order to insert/get a member of this union.
DynAny | ORB.create_dyn_any(Any value) See package comments regarding unimplemented features.
DynAny | ORB.create_basic_dyn_any(TypeCode type) See package comments regarding unimplemented features.

Methods in org.omg.CORBA with parameters of type DynAny
 void DynAny.assign(DynAny dyn_any)
Copy the contents from one Dynamic Any into another.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynArray

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynArray

Packages that use DynArray
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynArray in org.omg.CORBA

Methods in org.omg.CORBA that return DynArray
 DynArray ORB.create_dyn_array(TypeCode type)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynEnum

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynEnum

Packages that use DynEnum
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynEnum in org.omg.CORBA

Methods in org.omg.CORBA that return DynEnum
 DynEnum ORB.create_dyn_enum(TypeCode type)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynSequence

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynSequence

Packages that use DynSequence
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynSequence in org.omg.CORBA

Methods in org.omg.CORBA that return DynSequence
 DynSequence ORB.create_dyn_sequence(TypeCode type)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynStruct

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynStruct

Packages that use DynStruct
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynStruct in org.omg.CORBA

Methods in org.omg.CORBA that return DynStruct
 DynStruct ORB.create_dyn_struct(TypeCode type)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.DynUnion

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.DynUnion

Packages that use DynUnion
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of DynUnion in org.omg.CORBA

Methods in org.omg.CORBA that return DynUnion
 DynUnion ORB.create_dyn_union(TypeCode type)
See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.IDLType

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.IDLType

Packages that use IDLType
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of IDLType in org.omg.CORBA

Classes in org.omg.CORBA that implement IDLType
 class _IDLTypeStub
org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.

Fields in org.omg.CORBA declared as IDLType
IDLType | UnionMember.type_def The typedef that represents the IDL type of the union member described by this UnionMember object.
IDLType | StructMember.type_def The typedef that represents the IDL type of the struct member described by this StructMember object.
IDLType | ValueMember.type_def The typedef that represents the IDL type of the value member described by this ValueMember object.

Methods in org.omg.CORBA that return IDLType
static IDLType | IDLTypeHelper.extract(Any a)
static IDLType | IDLTypeHelper.read(InputStream istream)
static IDLType | IDLTypeHelper.narrow(Object obj)

Methods in org.omg.CORBA with parameters of type IDLType
static void | IDLTypeHelper.insert(Any a, IDLType that)
static void | IDLTypeHelper.write(OutputStream ostream, IDLType value)

Constructors in org.omg.CORBA with parameters of type IDLType
UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
StructMember(String __name, TypeCode __type, IDLType __type_def)
Constructs a StructMember object initialized with the given values.
ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
Constructs a ValueMember object initialized with the given values.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.IDLTypeOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.IDLTypeOperations

Packages that use IDLTypeOperations
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of IDLTypeOperations in org.omg.CORBA

Subinterfaces of IDLTypeOperations in org.omg.CORBA
 interface IDLType
An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.

Classes in org.omg.CORBA that implement IDLTypeOperations
 class _IDLTypeStub
org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.IRObject

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.IRObject

Packages that use IRObject
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of IRObject in org.omg.CORBA

Subinterfaces of IRObject in org.omg.CORBA
interface | IDLType An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
interface | Repository This is the interface which defines the interface repository.

Classes in org.omg.CORBA that implement IRObject
 class _IDLTypeStub
org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.IRObjectOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.IRObjectOperations

Packages that use IRObjectOperations
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of IRObjectOperations in org.omg.CORBA

Subinterfaces of IRObjectOperations in org.omg.CORBA
interface | IDLType An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
interface | IDLTypeOperations This interface must be implemented by all IDLType objects.
interface | IRObject An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
interface | Repository This is the interface which defines the interface repository.

Classes in org.omg.CORBA that implement IRObjectOperations
 class _IDLTypeStub
org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.Object

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.Object

Packages that use Object
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of Object in javax.rmi.CORBA

Classes in javax.rmi.CORBA that implement Object
 class Stub
Base class from which all RMI-IIOP stubs must inherit.

Methods in javax.rmi.CORBA that return Object
 Object Tie.thisObject()
Returns an object reference for the target object represented by this tie.

Uses of Object in org.omg.CORBA

Subinterfaces of Object in org.omg.CORBA
interface | Current org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
interface | DomainManager The DomainManager has associated with it the policy objects for a particular domain.
interface | DomainManagerOperations The DomainManager has associated with it the policy objects for a particular domain.
interface | DynAny org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
interface | DynArray The DynArray interface represents a DynAny object which is associated with an array.
interface | DynEnum The DynEnum interface represents a DynAny object which is associated with an IDL enum.
interface | DynFixed Represents a DynAny object that is associated with an IDL fixed type.
interface | DynSequence The representation of a DynAny object that is associated with an IDL sequence.
interface | DynStruct The representation of a DynAny object that is associated with an IDL struct.
interface | DynUnion The DynUnion interface represents a DynAny object that is associated with an IDL union.
interface | DynValue The representation of a DynAny object that is associated with an IDL value type.
interface | IDLType An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
interface | IRObject An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
interface | Policy org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
interface | Repository This is the interface which defines the interface repository.

Classes in org.omg.CORBA that implement Object
class | _IDLTypeStub org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
class | _PolicyStub org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
class | DynamicImplementation The base class for all object implementations using the DSI.

Fields in org.omg.CORBA declared as Object
 Object ObjectHolder.value
The Object value held by this ObjectHolder object.

Methods in org.omg.CORBA that return Object
 Object DynAny.get_reference()
Retrieves the org.omg.CORBA.Other contained in this DynAny object.
 Object Object._duplicate()
Returns a duplicate of this CORBA object reference.
 Object Object._get_interface_def()
Obtains an InterfaceDef for the object implementation referenced by this object reference.
 Object Object._set_policy_override(Policy[] policies, SetOverrideType set_add)
Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
abstract  Object Any.extract_Object()
Extracts the org.omg.CORBA.Object in this Any object's value field.
 Object DataInputStream.read_Object()
Reads an IDL CORBA::Object from the input stream.
abstract  Object Request.target()
Retrieves the the target object reference.
abstract  Object ORB.resolve_initial_references(String object_name)
Resolves a specific object reference from the set of available initial service names.
abstract  Object ORB.string_to_object(String str)
Converts a string produced by the method object_to_string back to a CORBA object reference.
static Object ObjectHelper.extract(Any a)
static Object ObjectHelper.read(InputStream istream)

Methods in org.omg.CORBA with parameters of type Object
 void DynAny.insert_reference(Object value)
Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
 boolean Object._is_equivalent(Object other)
Determines whether the two object references are equivalent, so far as the ORB can easily determine.
abstract  void Any.insert_Object(Object o)
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
abstract  void Any.insert_Object(Object o, TypeCode t)
Inserts the given org.omg.CORBA.Object object into this Any object's value field.
static IDLType IDLTypeHelper.narrow(Object obj)
 void DataOutputStream.write_Object(Object value)
Writes the IDL CORBA::Object value to the output stream.
 void ORB.connect(Object obj)
Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.
 void ORB.disconnect(Object obj)
Disconnects the given servant object from the ORB.
abstract  String ORB.object_to_string(Object obj)
Converts the given CORBA object reference to a string.
 NVList ORB.create_operation_list(Object oper)
Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
static void ObjectHelper.insert(Any a, Object that)
static void ObjectHelper.write(OutputStream ostream, Object value)
static Current CurrentHelper.narrow(Object obj)
static Policy PolicyHelper.narrow(Object obj)

Constructors in org.omg.CORBA with parameters of type Object
ObjectHolder(Object initial)
Constructs a new ObjectHolder object with its value field initialized to the given Object.

Uses of Object in org.omg.CORBA_2_3

Methods in org.omg.CORBA_2_3 that return Object
 Object ORB.get_value_def(String repid)

Uses of Object in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable with parameters of type Object
 String Delegate.get_codebase(Object self)
Returns the codebase for object reference provided.

Uses of Object in org.omg.CORBA.portable

Classes in org.omg.CORBA.portable that implement Object
 class ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.

Methods in org.omg.CORBA.portable that return Object
Object | ObjectImpl._duplicate() Returns a duplicate of this ObjectImpl object.
Object | ObjectImpl._get_interface_def() Retrieves the interface definition for this ObjectImpl object.
Object | ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add) Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
abstract Object | InputStream.read_Object() Reads a CORBA object from this input stream.
Object | InputStream.read_Object(Class clz) read_Object unmarshals an object and returns a CORBA Object which is an instance of the class passed as its argument.
Object | Delegate.get_interface_def(Object self) Return an InterfaceDef for the object reference provided.
abstract Object | Delegate.duplicate(Object obj) Returns a duplicate of the object reference provided.
Object | Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add) Associates the policies passed in with a newly created object reference that it returns.

Methods in org.omg.CORBA.portable with parameters of type Object
 boolean ObjectImpl._is_equivalent(Object that)
Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
abstract  void OutputStream.write_Object(Object value)
Writes a CORBA Object on this output stream.
 Object Delegate.get_interface_def(Object self)
Return an InterfaceDef for the object reference provided.
abstract  Object Delegate.duplicate(Object obj)
Returns a duplicate of the object reference provided.
abstract  void Delegate.release(Object obj)
Releases resources associated with the object reference provided.
abstract  boolean Delegate.is_a(Object obj, String repository_id)
Checks if the object reference is an instance of the given interface.
abstract  boolean Delegate.non_existent(Object obj)
Determines whether the server object for the object reference has been destroyed.
abstract  boolean Delegate.is_equivalent(Object obj, Object other)
Determines if the two object references are equivalent.
abstract  int Delegate.hash(Object obj, int max)
Returns an ORB-internal identifier (hashcode) for this object reference.
abstract  Request Delegate.request(Object obj, String operation)
Creates a Request instance for use in the Dynamic Invocation Interface.
abstract  Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
Creates a Request instance for use in the Dynamic Invocation Interface.
abstract  Request Delegate.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
Creates a Request instance for use in the Dynamic Invocation Interface.
 ORB Delegate.orb(Object obj)
Provides a reference to the orb associated with its parameter.
 Policy Delegate.get_policy(Object self, int policy_type)
Returns the Policy object of the specified type which applies to this object.
 DomainManager[] Delegate.get_domain_managers(Object self)
Retrieves the DomainManagers of this object.
 Object Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
Associates the policies passed in with a newly created object reference that it returns.
 boolean Delegate.is_local(Object self)
Returns true if this object is implemented by a local servant.
 ServantObject Delegate.servant_preinvoke(Object self, String operation, Class expectedType)
Returns a Java reference to the servant which should be used for this request.
 void Delegate.servant_postinvoke(Object self, ServantObject servant)
servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
 OutputStream Delegate.request(Object self, String operation, boolean responseExpected)
request is called by a stub to obtain an OutputStream for marshaling arguments.
 InputStream Delegate.invoke(Object self, OutputStream output)
invoke is called by a stub to invoke an operation.
 void Delegate.releaseReply(Object self, InputStream input)
releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
 String Delegate.toString(Object self)
Provide the implementation to override the toString() method of the delegating CORBA object.
 int Delegate.hashCode(Object self)
Provide the implementation to override the hashCode() method of the delegating CORBA object.
 boolean Delegate.equals(Object self, Object obj)
Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.

Uses of Object in org.omg.CosNaming

Subinterfaces of Object in org.omg.CosNaming
interface | BindingIterator The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
interface | NamingContext A naming context is an object that contains a set of name bindings in which each name is unique.

Classes in org.omg.CosNaming that implement Object
class | _BindingIteratorImplBase
class | _BindingIteratorStub
class | _NamingContextImplBase
class | _NamingContextStub

Methods in org.omg.CosNaming that return Object
Object | _NamingContextStub.resolve(NameComponent[] n)
Object | NamingContextOperations.resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.

Methods in org.omg.CosNaming with parameters of type Object
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.rebind(NameComponent[] n, Object obj)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
static BindingIterator | BindingIteratorHelper.narrow(Object that)
static NamingContext | NamingContextHelper.narrow(Object that)

Uses of Object in org.omg.SendingContext

Subinterfaces of Object in org.omg.SendingContext
 interface RunTime
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Uses of Object in org.omg.stub.java.rmi

Classes in org.omg.stub.java.rmi that implement Object
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.Policy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.Policy

Packages that use Policy
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of Policy in org.omg.CORBA

Classes in org.omg.CORBA that implement Policy
 class _PolicyStub
org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.

Fields in org.omg.CORBA declared as Policy
Policy | PolicyHolder.value
Policy[] | PolicyListHolder.value

Methods in org.omg.CORBA that return Policy
Policy | Object._get_policy(int policy_type) Returns the Policy object of the specified type which applies to this object.
static Policy[] | PolicyListHelper.extract(Any a)
static Policy[] | PolicyListHelper.read(InputStream istream)
Policy | PolicyOperations.copy() Copies the policy object.
Policy | _PolicyStub.copy() Copies the policy object.
Policy | DomainManagerOperations.get_domain_policy(int policy_type) This returns the policy of the specified type for objects in this domain.
Policy | ORB.create_policy(int type, Any val) See package comments regarding unimplemented features.
static Policy | PolicyHelper.extract(Any a)
static Policy | PolicyHelper.read(InputStream istream)
static Policy | PolicyHelper.narrow(Object obj)

Methods in org.omg.CORBA with parameters of type Policy
Object | Object._set_policy_override(Policy[] policies, SetOverrideType set_add) Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
static void | PolicyListHelper.insert(Any a, Policy[] that)
static void | PolicyListHelper.write(OutputStream ostream, Policy[] value)
static void | PolicyHelper.insert(Any a, Policy that)
static void | PolicyHelper.write(OutputStream ostream, Policy value)

Constructors in org.omg.CORBA with parameters of type Policy
PolicyHolder(Policy initialValue)
PolicyListHolder(Policy[] initialValue)

Uses of Policy in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Policy
Policy | ObjectImpl._get_policy(int policy_type) Retrieves the Policy object for this ObjectImpl object that has the given policy type.
Policy | Delegate.get_policy(Object self, int policy_type) Returns the Policy object of the specified type which applies to this object.

Methods in org.omg.CORBA.portable with parameters of type Policy
Object | ObjectImpl._set_policy_override(Policy[] policies, SetOverrideType set_add) Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
Object | Delegate.set_policy_override(Object self, Policy[] policies, SetOverrideType set_add) Associates the policies passed in with a newly created object reference that it returns.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.PolicyOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.PolicyOperations

Packages that use PolicyOperations
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of PolicyOperations in org.omg.CORBA

Subinterfaces of PolicyOperations in org.omg.CORBA
 interface Policy
org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Classes in org.omg.CORBA that implement PolicyOperations
 class _PolicyStub
org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


COMM_FAILURE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class COMM_FAILURE

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.COMM_FAILURE
All Implemented Interfaces:
Serializable
public final class COMM_FAILURE
extends SystemException

The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section meaning of minor codes to see the minor codes for this exception.

Since:
JDK1.2
See Also:
meaning of minor codes, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
COMM_FAILURE()
Constructs a COMM_FAILURE exception with a default minor code of 0 and a completion state of COMPLETED_NO.
COMM_FAILURE(int minor, CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified minor code and completion status.
COMM_FAILURE(String s)
Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
COMM_FAILURE(String s, int minor, CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

COMM_FAILURE

public COMM_FAILURE()
Constructs a COMM_FAILURE exception with a default minor code of 0 and a completion state of COMPLETED_NO.

COMM_FAILURE

public COMM_FAILURE(String s)
Constructs a COMM_FAILURE exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message describing this exception

COMM_FAILURE

public COMM_FAILURE(int minor,
                    CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status, which must be one of COMPLETED_YES, COMPLETED_NO, or COMPLETED_MAYBE.

COMM_FAILURE

public COMM_FAILURE(String s,
                    int minor,
                    CompletionStatus completed)
Constructs a COMM_FAILURE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status, which must be one of COMPLETED_YES, COMPLETED_NO, or COMPLETED_MAYBE.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompletionStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CompletionStatus

java.lang.Object
  |
  +--org.omg.CORBA.CompletionStatus
All Implemented Interfaces:
IDLEntity, Serializable
public class CompletionStatus
extends Object
implements IDLEntity

An object that indicates whether a method had completed running when a SystemException was thrown.

The class CompletionStatus contains three CompletionStatus instances, which are constants representing each possible completion status: COMPLETED_MAYBE, COMPLETED_NO, and COMPLETED_YES. It also contains three int members, each a constant corresponding to one of the CompletionStatus instances. These int members make it possible to use a switch statement.

The class also contains two methods:

  • public int value() -- which accesses the value field of a CompletionStatus object
  • public static CompletionStatus from_int(int i) -- for creating an instance from one of the int members

Since:
JDK1.2
See Also:
SystemException, Serialized Form

Field Summary
static int | _COMPLETED_MAYBE The constant indicating that a method completed running before a SystemException was thrown.
static int | _COMPLETED_NO The constant indicating that a method completed running before a SystemException was thrown.
static int | _COMPLETED_YES The constant indicating that a method completed running before a SystemException was thrown.
static CompletionStatus | COMPLETED_MAYBE An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.
static CompletionStatus | COMPLETED_NO An instance of CompletionStatus initialized with the constant _COMPLETED_NO.
static CompletionStatus | COMPLETED_YES An instance of CompletionStatus initialized with the constant _COMPLETED_YES.
Constructor Summary
protected CompletionStatus(int _value)
Creates a CompletionStatus object from the given int.
Method Summary
static CompletionStatus | from_int(int i) Creates a CompletionStatus object from the given int.
int | value() Retrieves the value of this CompletionStatus object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_COMPLETED_YES

public static final int _COMPLETED_YES
The constant indicating that a method completed running before a SystemException was thrown.

_COMPLETED_NO

public static final int _COMPLETED_NO
The constant indicating that a method completed running before a SystemException was thrown.

_COMPLETED_MAYBE

public static final int _COMPLETED_MAYBE
The constant indicating that a method completed running before a SystemException was thrown.

COMPLETED_YES

public static final CompletionStatus COMPLETED_YES
An instance of CompletionStatus initialized with the constant _COMPLETED_YES.

COMPLETED_NO

public static final CompletionStatus COMPLETED_NO
An instance of CompletionStatus initialized with the constant _COMPLETED_NO.

COMPLETED_MAYBE

public static final CompletionStatus COMPLETED_MAYBE
An instance of CompletionStatus initialized with the constant _COMPLETED_MAYBE.
Constructor Detail

CompletionStatus

protected CompletionStatus(int _value)
Creates a CompletionStatus object from the given int.
Parameters:
_value - one of _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE
Method Detail

value

public int value()
Retrieves the value of this CompletionStatus object.
Returns:
one of the possible CompletionStatus values: _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE

from_int

public static CompletionStatus from_int(int i)
                                 throws BAD_PARAM
Creates a CompletionStatus object from the given int.
Parameters:
i - one of _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE
Returns:
one of the possible CompletionStatus objects with values: _COMPLETED_YES, _COMPLETED_NO, or _COMPLETED_MAYBE
Throws:
BAD_PARAM - if the argument given is not one of the int constants defined in CompletionStatus
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompletionStatusHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CompletionStatusHelper

java.lang.Object
  |
  +--org.omg.CORBA.CompletionStatusHelper
public abstract class CompletionStatusHelper
extends Object

org/omg/CORBA/CompletionStatusHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

Constructor Summary
CompletionStatusHelper()
Method Summary
static CompletionStatus | extract(Any a)
static String | id()
static void | insert(Any a, CompletionStatus that)
static CompletionStatus | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, CompletionStatus value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompletionStatusHelper

public CompletionStatusHelper()
Method Detail

insert

public static void insert(Any a,
                          CompletionStatus that)

extract

public static CompletionStatus extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static CompletionStatus read(InputStream istream)

write

public static void write(OutputStream ostream,
                         CompletionStatus value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Context

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Context

java.lang.Object
  |
  +--org.omg.CORBA.Context
public abstract class Context
extends Object

An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation. A Context object contains a list of properties in the form of NamedValue objects. These properties represent information about the client, the environment, or the circumstances of a request and generally are properties that might be inconvenient to pass as parameters.

A Context object is created by first calling the ORB method get_default_context and then calling the method create_child on the default context.

Each property in a Context object is represented by a NamedValue object. The property name is contained in the NamedValue object's name field, and the value associated with the name is contained in the Any object that was assigned to the NamedValue object's value field.

Context properties can represent a portion of a client's or application's environment that is meant to be propagated to (and made implicitly part of) a server's environment. (Examples might be a window identifier or user preference information). Once a server has been invoked (that is, after the properties are propagated), the server may query its Context object for these properties using the method get_values.

When an operation declaration includes a context clause, the stubs and skeletons will have an additional argument added for the context. When an operation invocation occurs, the ORB causes the properties that were named in the operation definition in IDL and that are present in the client's Context object to be provided in the Context object parameter to the invoked method.

Context property names (which are strings) typically have the form of an OMG IDL identifier or a series of OMG IDL identifiers separated by periods. A context property name pattern is either a property name or a property name followed by a single "*". A property name pattern without a trailing "*" is said to match only itself. A property name pattern of the form "<name>*" matches any property name that starts with <name> and continues with zero or more additional characters.

Property name patterns are used in the context clause of an operation definition and as a parameter for the method Context.get_values.

Context objects may be "chained" together to achieve a particular defaulting behavior. A Context object created with the method create_child will be chained to its parent (the Context object that created it), and that means that the parent will be searched after the child in a search for property names.

Properties defined in a particular Context object effectively override those properties in the next higher level. The scope used in a search for properties may be restricted by specifying a starting scope and by using the flag CTX_RESTRICT_SCOPE when invoking the method get_values.

A Context object may be named for purposes of specifying a starting search scope.

Since:
JDK1.2

Constructor Summary
Context()
Method Summary
abstract String | context_name() Retrieves the name of this Context object.
abstract Context | create_child(String child_ctx_name) Creates a Context object with the given string as its name and with this Context object set as its parent.
abstract void | delete_values(String propname) Deletes from this Context object the NamedValue object(s) whose name field matches the given property name.
abstract NVList | get_values(String start_scope, int op_flags, String pattern) Retrieves the NamedValue objects whose name field matches the given name or name pattern.
abstract Context | parent() Retrieves the parent of this Context object.
abstract void | set_one_value(String propname, Any propvalue) Creates a NamedValue object and adds it to this Context object.
abstract void | set_values(NVList values) I Sets one or more property values in this Context object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Context

public Context()
Method Detail

context_name

public abstract String context_name()
Retrieves the name of this Context object.
Returns:
the name of this Context object

parent

public abstract Context parent()
Retrieves the parent of this Context object.
Returns:
the Context object that is the parent of this Context object

create_child

public abstract Context create_child(String child_ctx_name)
Creates a Context object with the given string as its name and with this Context object set as its parent.

The new Context object is chained into its parent Context object. This means that in a search for matching property names, if a match is not found in this context, the search will continue in the parent. If that is not successful, the search will continue in the grandparent, if there is one, and so on.

Parameters:
child_ctx_name - the String object to be set as the name of the new Context object
Returns:
the newly-created child Context object initialized with the specified name

set_one_value

public abstract void set_one_value(String propname,
                                   Any propvalue)
Creates a NamedValue object and adds it to this Context object. The name field of the new NamedValue object is set to the given string, the value field is set to the given Any object, and the flags field is set to zero.
Parameters:
propname - the name of the property to be set
propvalue - the Any object to which the value of the property will be set. The Any object's value field contains the value to be associated with the given propname; the kind field must be set to TCKind.tk_string.

set_values

public abstract void set_values(NVList values)
I Sets one or more property values in this Context object. The NVList supplied to this method contains one or more NamedValue objects. In each NamedValue object, the name field holds the name of the property, and the flags field must be set to zero. The NamedValue object's value field contains an Any object, which, in turn, contains the value for the property. Since the value is always a string, the Any object must have the kind field of its TypeCode set to TCKind.tk_string.
Parameters:
values - an NVList containing the property names and associated values to be set
See Also:
NamedValue, Any

delete_values

public abstract void delete_values(String propname)
Deletes from this Context object the NamedValue object(s) whose name field matches the given property name. If the String object supplied for propname has a trailing wildcard character ("*"), then all NamedValue objects whose name fields match will be deleted. The search scope is always limited to this Context object.

If no matching property is found, an exception is returned.

Parameters:
propname - name of the property to be deleted

get_values

public abstract NVList get_values(String start_scope,
                                  int op_flags,
                                  String pattern)
Retrieves the NamedValue objects whose name field matches the given name or name pattern. This method allows for wildcard searches, which means that there can be multiple matches and therefore multiple values returned. If the property is not found at the indicated level, the search continues up the context object tree until a match is found or all Context objects in the chain have been exhausted.

If no match is found, an error is returned and no property list is returned.

Parameters:
start_scope - a String object indicating the context object level at which to initiate the search for the specified properties (for example, "_USER", "_GROUP", "_SYSTEM"). Valid scope names are implementation-specific. If a scope name is omitted, the search begins with the specified context object. If the specified scope name is not found, an exception is returned.
op_flags - an operation flag. The one flag that may be specified is CTX_RESTRICT_SCOPE. If this flag is specified, searching is limited to the specified start_scope or this Context object.
pattern - the property name whose values are to be retrieved. pattern may be a name or a name with a trailing wildcard character ("*").
Returns:
an NVList containing all the property values (in the form of NamedValue objects) whose associated property name matches the given name or name pattern
See Also:
NamedValue
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContextList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ContextList

java.lang.Object
  |
  +--org.omg.CORBA.ContextList
public abstract class ContextList
extends Object

An object containing a modifiable list of String objects that represent property names. This class is used in Request operations to describe the contexts that need to be resolved and sent with the invocation. (A context is resolved by giving a property name and getting back the value associated with it.) This is done by calling the Context method get_values and supplying a string from a ContextList object as the third parameter. The method get_values returns an NVList object containing the NamedValue objects that hold the value(s) identified by the given string.

A ContextList object is created by the ORB, as illustrated here:

   ORB orb = ORB.init(args, null);
   org.omg.CORBA.ContextList ctxList = orb.create_context_list();
The variable ctxList represents an empty ContextList object. Strings are added to the list with the method add, accessed with the method item, and removed with the method remove.

Since:
JDK1.2
See Also:
Context

Constructor Summary
ContextList()
Method Summary
abstract void | add(String ctx) Adds a String object to this ContextList object.
abstract int | count() Returns the number of String objects in this ContextList object.
abstract String | item(int index) Returns the String object at the given index.
abstract void | remove(int index) Removes the String object at the given index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ContextList

public ContextList()
Method Detail

count

public abstract int count()
Returns the number of String objects in this ContextList object.
Returns:
an int representing the number of Strings in this ContextList object

add

public abstract void add(String ctx)
Adds a String object to this ContextList object.
Parameters:
ctx - the String object to be added

item

public abstract String item(int index)
                     throws Bounds
Returns the String object at the given index.
Parameters:
index - the index of the string desired, with 0 being the index of the first string
Returns:
the string at the given index
Throws:
Bounds - if the index is greater than or equal to the number of strings in this ContextList object

remove

public abstract void remove(int index)
                     throws Bounds
Removes the String object at the given index. Note that the indices of all strings following the one removed are shifted down by one.
Parameters:
index - the index of the String object to be removed, with 0 designating the first string
Throws:
Bounds - if the index is greater than or equal to the number of String objects in this ContextList object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CTX_RESTRICT_SCOPE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface CTX_RESTRICT_SCOPE

public interface CTX_RESTRICT_SCOPE

A flag that can be used as the second parameter to the method Context.get_values to restrict the search scope. When this flag is used, it restricts the search for context values to this particular Context object or to the scope specified in the first parameter to Context.get_values.

Usage:

     NVList props = myContext.get_values("_USER",
                     CTX_RESTRICT_SCOPE.value, "id*");

Since:
JDK1.2
See Also:
Context.get_values(String, int, String)

Field Summary
static int value
The field containing the int value of a CTX_RESTRICT_SCOPE flag.

Field Detail

value

public static final int value
The field containing the int value of a CTX_RESTRICT_SCOPE flag.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CurrentHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CurrentHelper

java.lang.Object
  |
  +--org.omg.CORBA.CurrentHelper
public abstract class CurrentHelper
extends Object

org/omg/CORBA/CurrentHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

Constructor Summary
CurrentHelper()
Method Summary
static Current | extract(Any a)
static String | id()
static void | insert(Any a, Current that)
static Current | narrow(Object obj)
static Current | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Current value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CurrentHelper

public CurrentHelper()
Method Detail

insert

public static void insert(Any a,
                          Current that)

extract

public static Current extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Current read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Current value)

narrow

public static Current narrow(Object obj)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CurrentHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class CurrentHolder

java.lang.Object
  |
  +--org.omg.CORBA.CurrentHolder
All Implemented Interfaces:
Streamable
public final class CurrentHolder
extends Object
implements Streamable

org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

Field Summary
 Current value
Constructor Summary
CurrentHolder()
CurrentHolder(Current initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Current value
Constructor Detail

CurrentHolder

public CurrentHolder()

CurrentHolder

public CurrentHolder(Current initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CustomMarshal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface CustomMarshal

All Known Subinterfaces:
CustomValue
public interface CustomMarshal

The CustomMarshal is an abstract value type that is meant to be used by the ORB, not the user. Semantically it is treated as a custom valuetype's implicit base class, although the custom valutype does not actually inherit it in IDL. The implementer of a custom value type shall provide an implementation of the CustomMarshal operations. The manner in which this is done is specified in the IDL to Java langague mapping. Each custom marshaled value type shall have its own implementation.

See Also:
DataOuputStream, DataInputStream

Method Summary
void | marshal(DataOutputStream os) Marshal method has to be implemented by the Customized Marshal class This is the method invoked for Marshalling.
void | unmarshal(DataInputStream is) Unmarshal method has to be implemented by the Customized Marshal class This is the method invoked for Unmarshalling.

Method Detail

marshal

public void marshal(DataOutputStream os)
Marshal method has to be implemented by the Customized Marshal class This is the method invoked for Marshalling.
Parameters:
os - a DataOutputStream

unmarshal

public void unmarshal(DataInputStream is)
Unmarshal method has to be implemented by the Customized Marshal class This is the method invoked for Unmarshalling.
Parameters:
is - a DataInputStream
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DataInputStream

All Superinterfaces:
IDLEntity, Serializable, ValueBase
public interface DataInputStream
extends ValueBase

Defines the methods used to read primitive data types from input streams for unmarshaling custom value types. This interface is used by user written custom unmarshaling code for custom value types.

See Also:
DataOutputStream, CustomMarshal

Method Summary
 Object read_Abstract()
Reads an IDL Abstract interface from the input stream.
 void read_any_array(AnySeqHolder seq, int offset, int length)
Reads array of IDL Anys from offset for length elements from the input stream.
 Any read_any()
Reads an IDL Any value from the input stream.
 void read_boolean_array(BooleanSeqHolder seq, int offset, int length)
Reads array of IDL booleans from offset for length elements from the input stream.
 boolean read_boolean()
Reads an IDL boolean value from the input stream.
 void read_char_array(CharSeqHolder seq, int offset, int length)
Reads array of IDL characters from offset for length elements from the input stream.
 char read_char()
Reads an IDL character value from the input stream.
 void read_double_array(DoubleSeqHolder seq, int offset, int length)
Reads array of IDL doubles from offset for length elements from the input stream.
 double read_double()
Reads an IDL double from the input stream.
 void read_float_array(FloatSeqHolder seq, int offset, int length)
Reads array of IDL floats from offset for length elements from the input stream.
 float read_float()
Reads an IDL float from the input stream.
 void read_long_array(LongSeqHolder seq, int offset, int length)
Reads array of IDL longs from offset for length elements from the input stream.
 int read_long()
Reads an IDL long from the input stream.
 void read_longlong_array(LongLongSeqHolder seq, int offset, int length)
Reads array of IDL long longs from offset for length elements from the input stream.
 long read_longlong()
Reads an IDL long long from the input stream.
 Object read_Object()
Reads an IDL CORBA::Object from the input stream.
 void read_octet_array(OctetSeqHolder seq, int offset, int length)
Reads array of IDL octets from offset for length elements from the input stream.
 byte read_octet()
Reads an IDL octet value from the input stream.
 void read_short_array(ShortSeqHolder seq, int offset, int length)
Reads array of IDL shorts from offset for length elements from the input stream.
 short read_short()
Reads an IDL short from the input stream.
 String read_string()
Reads an IDL string from the input stream.
 TypeCode read_TypeCode()
Reads an IDL typecode from the input stream.
 void read_ulong_array(ULongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned longs from offset for length elements from the input stream.
 int read_ulong()
Reads an IDL unsigned long from the input stream.
 void read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned long longs from offset for length elements from the input stream.
 long read_ulonglong()
Reads an unsigned IDL long long from the input stream.
 void read_ushort_array(UShortSeqHolder seq, int offset, int length)
Reads array of IDL unsigned shorts from offset for length elements from the input stream.
 short read_ushort()
Reads an IDL unsigned short from the input stream.
 Serializable read_Value()
Reads an IDL value type from the input stream.
 void read_wchar_array(WCharSeqHolder seq, int offset, int length)
Reads array of IDL wide characters from offset for length elements from the input stream.
 char read_wchar()
Reads an IDL wide character value from the input stream.
 String read_wstring()
Reads an IDL wide string from the input stream.
Methods inherited from interface org.omg.CORBA.portable.ValueBase
_truncatable_ids

Method Detail

read_any

public Any read_any()
Reads an IDL Any value from the input stream.
Returns:
the Any read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_boolean

public boolean read_boolean()
Reads an IDL boolean value from the input stream.
Returns:
the boolean read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_char

public char read_char()
Reads an IDL character value from the input stream.
Returns:
the character read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_wchar

public char read_wchar()
Reads an IDL wide character value from the input stream.
Returns:
the wide character read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_octet

public byte read_octet()
Reads an IDL octet value from the input stream.
Returns:
the octet value read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_short

public short read_short()
Reads an IDL short from the input stream.
Returns:
the short read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ushort

public short read_ushort()
Reads an IDL unsigned short from the input stream.
Returns:
the unsigned short read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_long

public int read_long()
Reads an IDL long from the input stream.
Returns:
the long read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ulong

public int read_ulong()
Reads an IDL unsigned long from the input stream.
Returns:
the unsigned long read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_longlong

public long read_longlong()
Reads an IDL long long from the input stream.
Returns:
the long long read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ulonglong

public long read_ulonglong()
Reads an unsigned IDL long long from the input stream.
Returns:
the unsigned long long read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_float

public float read_float()
Reads an IDL float from the input stream.
Returns:
the float read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_double

public double read_double()
Reads an IDL double from the input stream.
Returns:
the double read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_string

public String read_string()
Reads an IDL string from the input stream.
Returns:
the string read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_wstring

public String read_wstring()
Reads an IDL wide string from the input stream.
Returns:
the wide string read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_Object

public Object read_Object()
Reads an IDL CORBA::Object from the input stream.
Returns:
the CORBA::Object read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_Abstract

public Object read_Abstract()
Reads an IDL Abstract interface from the input stream.
Returns:
the Abstract interface read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_Value

public Serializable read_Value()
Reads an IDL value type from the input stream.
Returns:
the value type read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_TypeCode

public TypeCode read_TypeCode()
Reads an IDL typecode from the input stream.
Returns:
the typecode read.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_any_array

public void read_any_array(AnySeqHolder seq,
                           int offset,
                           int length)
Reads array of IDL Anys from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_boolean_array

public void read_boolean_array(BooleanSeqHolder seq,
                               int offset,
                               int length)
Reads array of IDL booleans from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_char_array

public void read_char_array(CharSeqHolder seq,
                            int offset,
                            int length)
Reads array of IDL characters from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_wchar_array

public void read_wchar_array(WCharSeqHolder seq,
                             int offset,
                             int length)
Reads array of IDL wide characters from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_octet_array

public void read_octet_array(OctetSeqHolder seq,
                             int offset,
                             int length)
Reads array of IDL octets from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_short_array

public void read_short_array(ShortSeqHolder seq,
                             int offset,
                             int length)
Reads array of IDL shorts from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ushort_array

public void read_ushort_array(UShortSeqHolder seq,
                              int offset,
                              int length)
Reads array of IDL unsigned shorts from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_long_array

public void read_long_array(LongSeqHolder seq,
                            int offset,
                            int length)
Reads array of IDL longs from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ulong_array

public void read_ulong_array(ULongSeqHolder seq,
                             int offset,
                             int length)
Reads array of IDL unsigned longs from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_ulonglong_array

public void read_ulonglong_array(ULongLongSeqHolder seq,
                                 int offset,
                                 int length)
Reads array of IDL unsigned long longs from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_longlong_array

public void read_longlong_array(LongLongSeqHolder seq,
                                int offset,
                                int length)
Reads array of IDL long longs from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_float_array

public void read_float_array(FloatSeqHolder seq,
                             int offset,
                             int length)
Reads array of IDL floats from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.

read_double_array

public void read_double_array(DoubleSeqHolder seq,
                              int offset,
                              int length)
Reads array of IDL doubles from offset for length elements from the input stream.
Parameters:
seq - The out parameter holder for the array to be read.
offset - The index into seq of the first element to read from the input stream.
length - The number of elements to read from the input stream.
Throws:
org.omg.CORBA.MARSHAL - If an inconsistency is detected, including not having registered a streaming policy, then the standard system exception MARSHAL is raised.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DataOutputStream

All Superinterfaces:
IDLEntity, Serializable, ValueBase
public interface DataOutputStream
extends ValueBase

Defines the methods used to write primitive data types to output streams for marshalling custom value types. This interface is used by user written custom marshalling code for custom value types.

See Also:
DataInputStream, CustomMarshal

Method Summary
void | write_Abstract(Object value) Writes the IDL Abstract interface type to the output stream.
void | write_any_array(Any[] seq, int offset, int length) Writes the array of IDL Anys from offset for length elements to the output stream.
void | write_any(Any value) Writes the Any value to the output stream.
void | write_boolean_array(boolean[] seq, int offset, int length) Writes the array of IDL booleans from offset for length elements to the output stream.
void | write_boolean(boolean value) Writes the boolean value to the output stream.
void | write_char_array(char[] seq, int offset, int length) Writes the array of IDL characters from offset for length elements to the output stream.
void | write_char(char value) Writes the IDL character value to the output stream.
void | write_double_array(double[] seq, int offset, int length) Writes the array of IDL doubles from offset for length elements to the output stream.
void | write_double(double value) Writes the IDL double value to the output stream.
void | write_float_array(float[] seq, int offset, int length) Writes the array of IDL floats from offset for length elements to the output stream.
void | write_float(float value) Writes the IDL float value to the output stream.
void | write_long_array(int[] seq, int offset, int length) Writes the array of IDL longs from offset for length elements to the output stream.
void | write_long(int value) Writes the IDL long value (represented as a Java int) to the output stream.
void | write_longlong_array(long[] seq, int offset, int length) Writes the array of IDL long longs from offset for length elements to the output stream.
void | write_longlong(long value) Writes the IDL long long value (represented as a Java long) to the output stream.
void | write_Object(Object value) Writes the IDL CORBA::Object value to the output stream.
void | write_octet_array(byte[] seq, int offset, int length) Writes the array of IDL octets from offset for length elements to the output stream.
void | write_octet(byte value) Writes the IDL octet value (represented as a Java byte) to the output stream.
void | write_short_array(short[] seq, int offset, int length) Writes the array of IDL shorts from offset for length elements to the output stream.
void | write_short(short value) Writes the IDL short value to the output stream.
void | write_string(String value) Writes the IDL string value to the output stream.
void | write_TypeCode(TypeCode value) Writes the typecode to the output stream.
void | write_ulong_array(int[] seq, int offset, int length) Writes the array of IDL unsigned longs (represented as Java ints) from offset for length elements to the output stream.
void | write_ulong(int value) Writes the IDL unsigned long value (represented as a Java int) to the output stream.
void | write_ulonglong_array(long[] seq, int offset, int length) Writes the array of IDL unsigned long longs (represented as Java longs) from offset for length elements to the output stream.
void | write_ulonglong(long value) Writes the IDL unsigned long long value (represented as a Java long) to the output stream.
void | write_ushort_array(short[] seq, int offset, int length) Writes the array of IDL unsigned shorts (represented as Java shorts) from offset for length elements to the output stream.
void | write_ushort(short value) Writes the IDL unsigned short value (represented as a Java short value) to the output stream.
void | write_Value(Serializable value) Writes the IDL value type value to the output stream.
void | write_wchar_array(char[] seq, int offset, int length) Writes the array of IDL wide characters from offset for length elements to the output stream.
void | write_wchar(char value) Writes the IDL wide character value to the output stream.
void | write_wstring(String value) Writes the IDL wide string value (represented as a Java String) to the output stream.
Methods inherited from interface org.omg.CORBA.portable.ValueBase
_truncatable_ids

Method Detail

write_any

public void write_any(Any value)
Writes the Any value to the output stream.
Parameters:
value - The value to be written.

write_boolean

public void write_boolean(boolean value)
Writes the boolean value to the output stream.
Parameters:
value - The value to be written.

write_char

public void write_char(char value)
Writes the IDL character value to the output stream.
Parameters:
value - The value to be written.

write_wchar

public void write_wchar(char value)
Writes the IDL wide character value to the output stream.
Parameters:
value - The value to be written.

write_octet

public void write_octet(byte value)
Writes the IDL octet value (represented as a Java byte) to the output stream.
Parameters:
value - The value to be written.

write_short

public void write_short(short value)
Writes the IDL short value to the output stream.
Parameters:
value - The value to be written.

write_ushort

public void write_ushort(short value)
Writes the IDL unsigned short value (represented as a Java short value) to the output stream.
Parameters:
value - The value to be written.

write_long

public void write_long(int value)
Writes the IDL long value (represented as a Java int) to the output stream.
Parameters:
value - The value to be written.

write_ulong

public void write_ulong(int value)
Writes the IDL unsigned long value (represented as a Java int) to the output stream.
Parameters:
value - The value to be written.

write_longlong

public void write_longlong(long value)
Writes the IDL long long value (represented as a Java long) to the output stream.
Parameters:
value - The value to be written.

write_ulonglong

public void write_ulonglong(long value)
Writes the IDL unsigned long long value (represented as a Java long) to the output stream.
Parameters:
value - The value to be written.

write_float

public void write_float(float value)
Writes the IDL float value to the output stream.
Parameters:
value - The value to be written.

write_double

public void write_double(double value)
Writes the IDL double value to the output stream.
Parameters:
value - The value to be written.

write_string

public void write_string(String value)
Writes the IDL string value to the output stream.
Parameters:
value - The value to be written.

write_wstring

public void write_wstring(String value)
Writes the IDL wide string value (represented as a Java String) to the output stream.
Parameters:
value - The value to be written.

write_Object

public void write_Object(Object value)
Writes the IDL CORBA::Object value to the output stream.
Parameters:
value - The value to be written.

write_Abstract

public void write_Abstract(Object value)
Writes the IDL Abstract interface type to the output stream.
Parameters:
value - The value to be written.

write_Value

public void write_Value(Serializable value)
Writes the IDL value type value to the output stream.
Parameters:
value - The value to be written.

write_TypeCode

public void write_TypeCode(TypeCode value)
Writes the typecode to the output stream.
Parameters:
value - The value to be written.

write_any_array

public void write_any_array(Any[] seq,
                            int offset,
                            int length)
Writes the array of IDL Anys from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_boolean_array

public void write_boolean_array(boolean[] seq,
                                int offset,
                                int length)
Writes the array of IDL booleans from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_char_array

public void write_char_array(char[] seq,
                             int offset,
                             int length)
Writes the array of IDL characters from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_wchar_array

public void write_wchar_array(char[] seq,
                              int offset,
                              int length)
Writes the array of IDL wide characters from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_octet_array

public void write_octet_array(byte[] seq,
                              int offset,
                              int length)
Writes the array of IDL octets from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_short_array

public void write_short_array(short[] seq,
                              int offset,
                              int length)
Writes the array of IDL shorts from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_ushort_array

public void write_ushort_array(short[] seq,
                               int offset,
                               int length)
Writes the array of IDL unsigned shorts (represented as Java shorts) from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_long_array

public void write_long_array(int[] seq,
                             int offset,
                             int length)
Writes the array of IDL longs from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_ulong_array

public void write_ulong_array(int[] seq,
                              int offset,
                              int length)
Writes the array of IDL unsigned longs (represented as Java ints) from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_ulonglong_array

public void write_ulonglong_array(long[] seq,
                                  int offset,
                                  int length)
Writes the array of IDL unsigned long longs (represented as Java longs) from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_longlong_array

public void write_longlong_array(long[] seq,
                                 int offset,
                                 int length)
Writes the array of IDL long longs from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_float_array

public void write_float_array(float[] seq,
                              int offset,
                              int length)
Writes the array of IDL floats from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.

write_double_array

public void write_double_array(double[] seq,
                               int offset,
                               int length)
Writes the array of IDL doubles from offset for length elements to the output stream.
Parameters:
seq - The array to be written.
offset - The index into seq of the first element to write to the output stream.
length - The number of elements to write to the output stream.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DATA_CONVERSION

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DATA_CONVERSION

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.DATA_CONVERSION
All Implemented Interfaces:
Serializable
public final class DATA_CONVERSION
extends SystemException

The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section meaning of minor codes to see the minor codes for this exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
DATA_CONVERSION()
Constructs a DATA_CONVERSION exception with a default minor code of 0 and a completion state of COMPLETED_NO.
DATA_CONVERSION(int minor, CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
DATA_CONVERSION(String s)
Constructs a DATA_CONVERSION exception with the specified detail.
DATA_CONVERSION(String s, int minor, CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DATA_CONVERSION

public DATA_CONVERSION()
Constructs a DATA_CONVERSION exception with a default minor code of 0 and a completion state of COMPLETED_NO.

DATA_CONVERSION

public DATA_CONVERSION(String s)
Constructs a DATA_CONVERSION exception with the specified detail.
Parameters:
s - the String containing a detail message

DATA_CONVERSION

public DATA_CONVERSION(int minor,
                       CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

DATA_CONVERSION

public DATA_CONVERSION(String s,
                       int minor,
                       CompletionStatus completed)
Constructs a DATA_CONVERSION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefinitionKind

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DefinitionKind

java.lang.Object
  |
  +--org.omg.CORBA.DefinitionKind
All Implemented Interfaces:
IDLEntity, Serializable
public class DefinitionKind
extends Object
implements IDLEntity

The class that provides the constants used to identify the type of an Interface Repository object. This class contains two kinds of constants, those that are an int and those that are an instance of the class DefinitionKind. This class provides the method from_int, which given one of the int constants, creates the corresponding DefinitionKind instance. It also provides the method value, which returns the int constant that is the value for a DefinitionKind instance.

See Also:
IRObject, Serialized Form

Field Summary
static int | _dk_Alias The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_all The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Array The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Attribute The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Constant The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Enum The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Exception The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Fixed The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Interface The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Module The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Native The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_none The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Operation The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Primitive The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Repository The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Sequence The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_String The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Struct The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Typedef The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Union The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Value The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_ValueBox The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_ValueMember The constant that indicates that an Interface Repository object does not have a definition kind.
static int | _dk_Wstring The constant that indicates that an Interface Repository object does not have a definition kind.
static DefinitionKind | dk_Alias The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.
static DefinitionKind | dk_all The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate.
static DefinitionKind | dk_Array The static instance of DefinitionKind indicating that an Interface Repository object is an Array.
static DefinitionKind | dk_Attribute The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.
static DefinitionKind | dk_Constant The static instance of DefinitionKind indicating that an Interface Repository object is a constant.
static DefinitionKind | dk_Enum The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.
static DefinitionKind | dk_Exception The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.
static DefinitionKind | dk_Fixed The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.
static DefinitionKind | dk_Interface The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.
static DefinitionKind | dk_Module The static instance of DefinitionKind indicating that an Interface Repository object is a Module.
static DefinitionKind | dk_Native The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.
static DefinitionKind | dk_none The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.
static DefinitionKind | dk_Operation The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.
static DefinitionKind | dk_Primitive The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.
static DefinitionKind | dk_Repository The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.
static DefinitionKind | dk_Sequence The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.
static DefinitionKind | dk_String The static instance of DefinitionKind indicating that an Interface Repository object is a String.
static DefinitionKind | dk_Struct The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.
static DefinitionKind | dk_Typedef The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.
static DefinitionKind | dk_Union The static instance of DefinitionKind indicating that an Interface Repository object is a Union.
static DefinitionKind | dk_Value The static instance of DefinitionKind indicating that an Interface Repository object is a Value.
static DefinitionKind | dk_ValueBox The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.
static DefinitionKind | dk_ValueMember The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.
static DefinitionKind | dk_Wstring The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.
Constructor Summary
protected DefinitionKind(int _value)
Constructs a DefinitionKind object with its _value field initialized with the given value.
Method Summary
static DefinitionKind | from_int(int i) Creates a DefinitionKind instance corresponding to the given code .
int | value() Returns the int constant identifying the type of an IR object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_dk_none

public static final int _dk_none
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_all

public static final int _dk_all
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Attribute

public static final int _dk_Attribute
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Constant

public static final int _dk_Constant
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Exception

public static final int _dk_Exception
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Interface

public static final int _dk_Interface
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Module

public static final int _dk_Module
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Operation

public static final int _dk_Operation
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Typedef

public static final int _dk_Typedef
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Alias

public static final int _dk_Alias
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Struct

public static final int _dk_Struct
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Union

public static final int _dk_Union
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Enum

public static final int _dk_Enum
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Primitive

public static final int _dk_Primitive
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_String

public static final int _dk_String
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Sequence

public static final int _dk_Sequence
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Array

public static final int _dk_Array
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Repository

public static final int _dk_Repository
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Wstring

public static final int _dk_Wstring
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Fixed

public static final int _dk_Fixed
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Value

public static final int _dk_Value
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_ValueBox

public static final int _dk_ValueBox
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_ValueMember

public static final int _dk_ValueMember
The constant that indicates that an Interface Repository object does not have a definition kind.

_dk_Native

public static final int _dk_Native
The constant that indicates that an Interface Repository object does not have a definition kind.

dk_none

public static final DefinitionKind dk_none
The static instance of DefinitionKind indicating that an Interface Repository object has no definition kind.

dk_all

public static final DefinitionKind dk_all
The wildcard DefinitionKind constant, useful in all occasions where any DefinitionKind is appropriate. The Container's contents method makes use of this constant to return all contained definitions of any kind.

dk_Attribute

public static final DefinitionKind dk_Attribute
The static instance of DefinitionKind indicating that an Interface Repository object is an Attribute.

dk_Constant

public static final DefinitionKind dk_Constant
The static instance of DefinitionKind indicating that an Interface Repository object is a constant.

dk_Exception

public static final DefinitionKind dk_Exception
The static instance of DefinitionKind indicating that an Interface Repository object is an Exception.

dk_Interface

public static final DefinitionKind dk_Interface
The static instance of DefinitionKind indicating that an Interface Repository object is an Interface.

dk_Module

public static final DefinitionKind dk_Module
The static instance of DefinitionKind indicating that an Interface Repository object is a Module.

dk_Operation

public static final DefinitionKind dk_Operation
The static instance of DefinitionKind indicating that an Interface Repository object is an Operation.

dk_Typedef

public static final DefinitionKind dk_Typedef
The static instance of DefinitionKind indicating that an Interface Repository object is a Typedef.

dk_Alias

public static final DefinitionKind dk_Alias
The static instance of DefinitionKind indicating that an Interface Repository object is an Alias.

dk_Struct

public static final DefinitionKind dk_Struct
The static instance of DefinitionKind indicating that an Interface Repository object is a Struct.

dk_Union

public static final DefinitionKind dk_Union
The static instance of DefinitionKind indicating that an Interface Repository object is a Union.

dk_Enum

public static final DefinitionKind dk_Enum
The static instance of DefinitionKind indicating that an Interface Repository object is an Enum.

dk_Primitive

public static final DefinitionKind dk_Primitive
The static instance of DefinitionKind indicating that an Interface Repository object is a Primitive.

dk_String

public static final DefinitionKind dk_String
The static instance of DefinitionKind indicating that an Interface Repository object is a String.

dk_Sequence

public static final DefinitionKind dk_Sequence
The static instance of DefinitionKind indicating that an Interface Repository object is a Sequence.

dk_Array

public static final DefinitionKind dk_Array
The static instance of DefinitionKind indicating that an Interface Repository object is an Array.

dk_Repository

public static final DefinitionKind dk_Repository
The static instance of DefinitionKind indicating that an Interface Repository object is a Repository.

dk_Wstring

public static final DefinitionKind dk_Wstring
The static instance of DefinitionKind indicating that an Interface Repository object is a Wstring.

dk_Fixed

public static final DefinitionKind dk_Fixed
The static instance of DefinitionKind indicating that an Interface Repository object is a Fixed value.

dk_Value

public static final DefinitionKind dk_Value
The static instance of DefinitionKind indicating that an Interface Repository object is a Value.

dk_ValueBox

public static final DefinitionKind dk_ValueBox
The static instance of DefinitionKind indicating that an Interface Repository object is a ValueBox.

dk_ValueMember

public static final DefinitionKind dk_ValueMember
The static instance of DefinitionKind indicating that an Interface Repository object is a ValueMember.

dk_Native

public static final DefinitionKind dk_Native
The static instance of DefinitionKind indicating that an Interface Repository object is a Native value.
Constructor Detail

DefinitionKind

protected DefinitionKind(int _value)
Constructs a DefinitionKind object with its _value field initialized with the given value.
Parameters:
_value - one of the int constants defined in the class DefinitionKind
Method Detail

value

public int value()
Returns the int constant identifying the type of an IR object.
Returns:
the int constant from the class DefinitionKind that is the value of this DefinitionKind instance

from_int

public static DefinitionKind from_int(int i)
                               throws BAD_PARAM
Creates a DefinitionKind instance corresponding to the given code .
Parameters:
i - one of the int constants from the class DefinitionKind
Returns:
the DefinitionKind instance corresponding to the given code
Throws:
BAD_PARAM - if the given parameter is not one of the int constants from the class DefinitionKind
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefinitionKindHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DefinitionKindHelper

java.lang.Object
  |
  +--org.omg.CORBA.DefinitionKindHelper
public abstract class DefinitionKindHelper
extends Object

org/omg/CORBA/DefinitionKindHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

Constructor Summary
DefinitionKindHelper()
Method Summary
static DefinitionKind | extract(Any a)
static String | id()
static void | insert(Any a, DefinitionKind that)
static DefinitionKind | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, DefinitionKind value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefinitionKindHelper

public DefinitionKindHelper()
Method Detail

insert

public static void insert(Any a,
                          DefinitionKind that)

extract

public static DefinitionKind extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static DefinitionKind read(InputStream istream)

write

public static void write(OutputStream ostream,
                         DefinitionKind value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DomainManagerOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DomainManagerOperations

All Superinterfaces:
Object
All Known Subinterfaces:
DomainManager
public interface DomainManagerOperations
extends Object

The DomainManager has associated with it the policy objects for a particular domain. The domain manager also records the membership of the domain and provides the means to add and remove members. The domain manager is itself a member of a domain, possibly the domain it manages. The domain manager provides mechanisms for establishing and navigating relationships to superior and subordinate domains and creating and accessing policies.

Method Summary
 Policy get_domain_policy(int policy_type)
This returns the policy of the specified type for objects in this domain.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Method Detail

get_domain_policy

public Policy get_domain_policy(int policy_type)
This returns the policy of the specified type for objects in this domain.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DoubleHolder

java.lang.Object
  |
  +--org.omg.CORBA.DoubleHolder
All Implemented Interfaces:
Streamable
public final class DoubleHolder
extends Object
implements Streamable

A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL double as an "out" or "inout" parameter, the programmer must pass an instance of DoubleHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myDoubleHolder is an instance of DoubleHolder, the value stored in its value field can be accessed with myDoubleHolder.value.

Since:
JDK1.2

Field Summary
 double value
The double value held by this DoubleHolder object.
Constructor Summary
DoubleHolder()
Constructs a new DoubleHolder object with its value field initialized to 0.0.
DoubleHolder(double initial)
Constructs a new DoubleHolder object for the given double.
Method Summary
void | _read(InputStream input) Read a double value from the input stream and store it in the value member.
TypeCode | _type() Return the TypeCode of this holder object.
void | _write(OutputStream output) Write the double value stored in this holder to an OutputStream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public double value
The double value held by this DoubleHolder object.
Constructor Detail

DoubleHolder

public DoubleHolder()
Constructs a new DoubleHolder object with its value field initialized to 0.0.

DoubleHolder

public DoubleHolder(double initial)
Constructs a new DoubleHolder object for the given double.
Parameters:
initial - the double with which to initialize the value field of the new DoubleHolder object
Method Detail

_read

public void _read(InputStream input)
Read a double value from the input stream and store it in the value member.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream to read from.

_write

public void _write(OutputStream output)
Write the double value stored in this holder to an OutputStream.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream to write into.

_type

public TypeCode _type()
Return the TypeCode of this holder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DoubleSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.DoubleSeqHelper
public final class DoubleSeqHelper
extends Object

org/omg/CORBA/DoubleSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Constructor Summary
DoubleSeqHelper()
Method Summary
static double[] | extract(Any a)
static String | id()
static void | insert(Any a, double[] that)
static double[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, double[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DoubleSeqHelper

public DoubleSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          double[] that)

extract

public static double[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static double[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         double[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DoubleSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.DoubleSeqHolder
All Implemented Interfaces:
Streamable
public final class DoubleSeqHolder
extends Object
implements Streamable

org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Field Summary
 double[] value
Constructor Summary
DoubleSeqHolder()
DoubleSeqHolder(double[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public double[] value
Constructor Detail

DoubleSeqHolder

public DoubleSeqHolder()

DoubleSeqHolder

public DoubleSeqHolder(double[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynamicImplementation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class DynamicImplementation

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA.DynamicImplementation
All Implemented Interfaces:
Object
Direct Known Subclasses:
_BindingIteratorImplBase, _NamingContextImplBase
public abstract class DynamicImplementation
extends ObjectImpl

The base class for all object implementations using the DSI. It defines a single abstract method, invoke, that a dynamic servant needs to implement. DynamicImplementation has been deprecated by the OMG in favor of the Portable Object Adapter.

Since:
JDK1.2
See Also:
ServerRequest

Constructor Summary
DynamicImplementation()
Method Summary
abstract  void invoke(ServerRequest request)
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DynamicImplementation

public DynamicImplementation()
Method Detail

invoke

public abstract void invoke(ServerRequest request)
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception. Deprecated by the Portable Object Adapter.
Parameters:
request - a ServerRequest object representing the request to be invoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynAny

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynAny

All Superinterfaces:
Object
All Known Subinterfaces:
DynArray, DynEnum, DynFixed, DynSequence, DynStruct, DynUnion, DynValue
public interface DynAny
extends Object

org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which may correspond to a copy of the value inserted into an Any. The DynAny APIs enable traversal of the data value associated with an Any at runtime and extraction of the primitive constituents of the data value.

Method Summary
void | assign(DynAny dyn_any) Copy the contents from one Dynamic Any into another.
DynAny | copy() Clones this DynAny object.
DynAny | current_component() Returns a DynAny object reference that can be used to get/set the value of the component currently accessed.
void | destroy() Destroys this DynAny object and frees any resources used to represent the data value associated with it.
void | from_any(Any value) Make a DynAny object from an Any object.
Any | get_any() Retrieves the org.omg.CORBA.Any contained in this DynAny object.
boolean | get_boolean() Retrieves the boolean contained in this DynAny object.
char | get_char() Retrieves the char contained in this DynAny object.
double | get_double() Retrieves the double contained in this DynAny object.
float | get_float() Retrieves the float contained in this DynAny object.
int | get_long() Retrieves the int contained in this DynAny object.
long | get_longlong() Retrieves the long contained in this DynAny object.
byte | get_octet() Retrieves the byte contained in this DynAny object.
Object | get_reference() Retrieves the org.omg.CORBA.Other contained in this DynAny object.
short | get_short() Retrieves the short contained in this DynAny object.
String | get_string() Retrieves the String contained in this DynAny object.
TypeCode | get_typecode() Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
int | get_ulong() Retrieves the int contained in this DynAny object.
long | get_ulonglong() Retrieves the long contained in this DynAny object.
short | get_ushort() Retrieves the short contained in this DynAny object.
Serializable | get_val() Retrieves the java.io.Serializable object contained in this DynAny object.
char | get_wchar() Retrieves the char contained in this DynAny object.
String | get_wstring() Retrieves the String contained in this DynAny object.
void | insert_any(Any value) Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
void | insert_boolean(boolean value) Inserts the given boolean as the value for this DynAny object.
void | insert_char(char value) Inserts the given char as the value for this DynAny object.
void | insert_double(double value) Inserts the given double as the value for this DynAny object.
void | insert_float(float value) Inserts the given float as the value for this DynAny object.
void | insert_long(int value) Inserts the given int as the value for this DynAny object.
void | insert_longlong(long value) Inserts the given long as the value for this DynAny object.
void | insert_octet(byte value) Inserts the given byte as the value for this DynAny object.
void | insert_reference(Object value) Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
void | insert_short(short value) Inserts the given short as the value for this DynAny object.
void | insert_string(String value) Inserts the given String object as the value for this DynAny object.
void | insert_typecode(TypeCode value) Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
void | insert_ulong(int value) Inserts the given int as the value for this DynAny object.
void | insert_ulonglong(long value) Inserts the given long as the value for this DynAny object.
void | insert_ushort(short value) Inserts the given short as the value for this DynAny object.
void | insert_val(Serializable value) Inserts the given java.io.Serializable object as the value for this DynAny object.
void | insert_wchar(char value) Inserts the given char as the value for this DynAny object.
void | insert_wstring(String value) Inserts the given String as the value for this DynAny object.
boolean | next() Moves to the next component of this DynAny object.
void | rewind() Moves the internal pointer to the first component.
boolean | seek(int index) Moves the internal pointer to the given index.
Any | to_any() Convert a DynAny object to an Any object.
TypeCode | type() Returns the TypeCode of the object inserted into this DynAny.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Method Detail

type

public TypeCode type()
Returns the TypeCode of the object inserted into this DynAny.
Returns:
the TypeCode object.

assign

public void assign(DynAny dyn_any)
            throws Invalid
Copy the contents from one Dynamic Any into another.
Parameters:
dyn_any - the DynAny object whose contents are assigned to this DynAny.
Throws:
Invalid - if the source DynAny is invalid

from_any

public void from_any(Any value)
              throws Invalid
Make a DynAny object from an Any object.
Parameters:
value - the Any object.
Throws:
Invalid - if the source Any object is empty or bad

to_any

public Any to_any()
           throws Invalid
Convert a DynAny object to an Any object.
Returns:
the Any object.
Throws:
Invalid - if this DynAny is empty or bad. created or does not contain a meaningful value

destroy

public void destroy()
Destroys this DynAny object and frees any resources used to represent the data value associated with it. This method also destroys all DynAny objects obtained from it.

Destruction of DynAny objects should be handled with care, taking into account issues dealing with the representation of data values associated with DynAny objects. A programmer who wants to destroy a DynAny object but still be able to manipulate some component of the data value associated with it, should first create a DynAny object for the component and then make a copy of the created DynAny object.

copy

public DynAny copy()
Clones this DynAny object.
Returns:
a copy of this DynAny object

insert_boolean

public void insert_boolean(boolean value)
                    throws InvalidValue
Inserts the given boolean as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the boolean to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_octet

public void insert_octet(byte value)
                  throws InvalidValue
Inserts the given byte as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the byte to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_char

public void insert_char(char value)
                 throws InvalidValue
Inserts the given char as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the char to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_short

public void insert_short(short value)
                  throws InvalidValue
Inserts the given short as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the short to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ushort

public void insert_ushort(short value)
                   throws InvalidValue
Inserts the given short as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the short to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_long

public void insert_long(int value)
                 throws InvalidValue
Inserts the given int as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the int to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ulong

public void insert_ulong(int value)
                  throws InvalidValue
Inserts the given int as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the int to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_float

public void insert_float(float value)
                  throws InvalidValue
Inserts the given float as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the float to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_double

public void insert_double(double value)
                   throws InvalidValue
Inserts the given double as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the double to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_string

public void insert_string(String value)
                   throws InvalidValue
Inserts the given String object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the String to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_reference

public void insert_reference(Object value)
                      throws InvalidValue
Inserts the given org.omg.CORBA.Object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.Object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_typecode

public void insert_typecode(TypeCode value)
                     throws InvalidValue
Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.TypeCode to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_longlong

public void insert_longlong(long value)
                     throws InvalidValue
Inserts the given long as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the long to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_ulonglong

public void insert_ulonglong(long value)
                      throws InvalidValue
Inserts the given long as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the long to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_wchar

public void insert_wchar(char value)
                  throws InvalidValue
Inserts the given char as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the char to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_wstring

public void insert_wstring(String value)
                    throws InvalidValue
Inserts the given String as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the String to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_any

public void insert_any(Any value)
                throws InvalidValue
Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the org.omg.CORBA.Any object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

insert_val

public void insert_val(Serializable value)
                throws InvalidValue
Inserts the given java.io.Serializable object as the value for this DynAny object.

If this method is called on a constructed DynAny object, it initializes the next component of the constructed data value associated with this DynAny object.

Parameters:
value - the java.io.Serializable object to insert into this DynAny object
Throws:
InvalidValue - if the value inserted is not consistent with the type of the accessed component in this DynAny object

get_val

public Serializable get_val()
                     throws TypeMismatch
Retrieves the java.io.Serializable object contained in this DynAny object.
Returns:
the java.io.Serializable object that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a java.io.Serializable object

get_boolean

public boolean get_boolean()
                    throws TypeMismatch
Retrieves the boolean contained in this DynAny object.
Returns:
the boolean that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a boolean

get_octet

public byte get_octet()
               throws TypeMismatch
Retrieves the byte contained in this DynAny object.
Returns:
the byte that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a byte

get_char

public char get_char()
              throws TypeMismatch
Retrieves the char contained in this DynAny object.
Returns:
the char that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

get_short

public short get_short()
                throws TypeMismatch
Retrieves the short contained in this DynAny object.
Returns:
the short that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

get_ushort

public short get_ushort()
                 throws TypeMismatch
Retrieves the short contained in this DynAny object.
Returns:
the short that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a short

get_long

public int get_long()
             throws TypeMismatch
Retrieves the int contained in this DynAny object.
Returns:
the int that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

get_ulong

public int get_ulong()
              throws TypeMismatch
Retrieves the int contained in this DynAny object.
Returns:
the int that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a int

get_float

public float get_float()
                throws TypeMismatch
Retrieves the float contained in this DynAny object.
Returns:
the float that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a float

get_double

public double get_double()
                  throws TypeMismatch
Retrieves the double contained in this DynAny object.
Returns:
the double that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a double

get_string

public String get_string()
                  throws TypeMismatch
Retrieves the String contained in this DynAny object.
Returns:
the String that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

get_reference

public Object get_reference()
                     throws TypeMismatch
Retrieves the org.omg.CORBA.Other contained in this DynAny object.
Returns:
the org.omg.CORBA.Other that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Other

get_typecode

public TypeCode get_typecode()
                      throws TypeMismatch
Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
Returns:
the org.omg.CORBA.TypeCode that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a org.omg.CORBA.TypeCode

get_longlong

public long get_longlong()
                  throws TypeMismatch
Retrieves the long contained in this DynAny object.
Returns:
the long that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

get_ulonglong

public long get_ulonglong()
                   throws TypeMismatch
Retrieves the long contained in this DynAny object.
Returns:
the long that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a long

get_wchar

public char get_wchar()
               throws TypeMismatch
Retrieves the char contained in this DynAny object.
Returns:
the char that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a char

get_wstring

public String get_wstring()
                   throws TypeMismatch
Retrieves the String contained in this DynAny object.
Returns:
the String that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for a String

get_any

public Any get_any()
            throws TypeMismatch
Retrieves the org.omg.CORBA.Any contained in this DynAny object.
Returns:
the org.omg.CORBA.Any that is the value for this DynAny object
Throws:
TypeMismatch - if the type code of the accessed component in this DynAny object is not equivalent to the type code for an org.omg.CORBA.Any

current_component

public DynAny current_component()
Returns a DynAny object reference that can be used to get/set the value of the component currently accessed. The appropriate insert method can be called on the resulting DynAny object to initialize the component. The appropriate get method can be called on the resulting DynAny object to extract the value of the component.
Returns:
a DynAny object reference that can be used to retrieve or set the value of the component currently accessed

next

public boolean next()
Moves to the next component of this DynAny object. This method is used for iterating through the components of a constructed type, effectively moving a pointer from one component to the next. The pointer starts out on the first component when a DynAny object is created.
Returns:
true if the pointer points to a component; false if there are no more components or this DynAny is associated with a basic type rather than a constructed type

seek

public boolean seek(int index)
Moves the internal pointer to the given index. Logically, this method sets a new offset for this pointer.
Parameters:
index - an int indicating the position to which the pointer should move. The first position is 0.
Returns:
true if the pointer points to a component; false if there is no component at the designated index. If this DynAny object is associated with a basic type, this method returns false for any index other than 0.

rewind

public void rewind()
Moves the internal pointer to the first component.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA.DynAnyPackage Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA.DynAnyPackage

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.DynAnyPackage.Invalid
          • class org.omg.CORBA.DynAnyPackage.InvalidSeq
          • class org.omg.CORBA.DynAnyPackage.InvalidValue
          • class org.omg.CORBA.DynAnyPackage.TypeMismatch
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CORBA.DynAnyPackage

Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).

See:
Description

Exception Summary
Invalid | Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
InvalidSeq | The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
InvalidValue |
TypeMismatch | TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Package org.omg.CORBA.DynAnyPackage Description

Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CORBA.DynAnyPackage

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA.DynAnyPackage

Packages that use org.omg.CORBA.DynAnyPackage
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Classes in org.omg.CORBA.DynAnyPackage used by org.omg.CORBA
Invalid
Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
InvalidSeq
The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
InvalidValue
TypeMismatch
TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DynAnyPackage.Invalid

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DynAnyPackage.Invalid

Packages that use Invalid
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Invalid in org.omg.CORBA

Methods in org.omg.CORBA that throw Invalid
void | DynAny.assign(DynAny dyn_any) Copy the contents from one Dynamic Any into another.
void | DynAny.from_any(Any value) Make a DynAny object from an Any object.
Any | DynAny.to_any() Convert a DynAny object to an Any object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DynAnyPackage.InvalidSeq

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DynAnyPackage.InvalidSeq

Packages that use InvalidSeq
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of InvalidSeq in org.omg.CORBA

Methods in org.omg.CORBA that throw InvalidSeq
void | DynStruct.set_members(NameValuePair[] value) Set the members of the struct.
void | DynArray.set_elements(Any[] value) Sets the value of this DynArray object to the given array.
void | DynValue.set_members(NameValuePair[] value) Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
void | DynSequence.set_elements(Any[] value) Sets the values of all elements in this sequence with the given array.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DynAnyPackage.InvalidValue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DynAnyPackage.InvalidValue

Packages that use InvalidValue
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of InvalidValue in org.omg.CORBA

Methods in org.omg.CORBA that throw InvalidValue
void | DynAny.insert_boolean(boolean value) Inserts the given boolean as the value for this DynAny object.
void | DynAny.insert_octet(byte value) Inserts the given byte as the value for this DynAny object.
void | DynAny.insert_char(char value) Inserts the given char as the value for this DynAny object.
void | DynAny.insert_short(short value) Inserts the given short as the value for this DynAny object.
void | DynAny.insert_ushort(short value) Inserts the given short as the value for this DynAny object.
void | DynAny.insert_long(int value) Inserts the given int as the value for this DynAny object.
void | DynAny.insert_ulong(int value) Inserts the given int as the value for this DynAny object.
void | DynAny.insert_float(float value) Inserts the given float as the value for this DynAny object.
void | DynAny.insert_double(double value) Inserts the given double as the value for this DynAny object.
void | DynAny.insert_string(String value) Inserts the given String object as the value for this DynAny object.
void | DynAny.insert_reference(Object value) Inserts the given org.omg.CORBA.Object as the value for this DynAny object.
void | DynAny.insert_typecode(TypeCode value) Inserts the given org.omg.CORBA.TypeCode as the value for this DynAny object.
void | DynAny.insert_longlong(long value) Inserts the given long as the value for this DynAny object.
void | DynAny.insert_ulonglong(long value) Inserts the given long as the value for this DynAny object.
void | DynAny.insert_wchar(char value) Inserts the given char as the value for this DynAny object.
void | DynAny.insert_wstring(String value) Inserts the given String as the value for this DynAny object.
void | DynAny.insert_any(Any value) Inserts the given org.omg.CORBA.Any object as the value for this DynAny object.
void | DynAny.insert_val(Serializable value) Inserts the given java.io.Serializable object as the value for this DynAny object.
void | DynFixed.set_value(byte[] val) Sets the given fixed type instance as the value for this DynFixed object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.DynAnyPackage.TypeMismatch

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.DynAnyPackage.TypeMismatch

Packages that use TypeMismatch
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of TypeMismatch in org.omg.CORBA

Methods in org.omg.CORBA that throw TypeMismatch
Serializable | DynAny.get_val() Retrieves the java.io.Serializable object contained in this DynAny object.
boolean | DynAny.get_boolean() Retrieves the boolean contained in this DynAny object.
byte | DynAny.get_octet() Retrieves the byte contained in this DynAny object.
char | DynAny.get_char() Retrieves the char contained in this DynAny object.
short | DynAny.get_short() Retrieves the short contained in this DynAny object.
short | DynAny.get_ushort() Retrieves the short contained in this DynAny object.
int | DynAny.get_long() Retrieves the int contained in this DynAny object.
int | DynAny.get_ulong() Retrieves the int contained in this DynAny object.
float | DynAny.get_float() Retrieves the float contained in this DynAny object.
double | DynAny.get_double() Retrieves the double contained in this DynAny object.
String | DynAny.get_string() Retrieves the String contained in this DynAny object.
Object | DynAny.get_reference() Retrieves the org.omg.CORBA.Other contained in this DynAny object.
TypeCode | DynAny.get_typecode() Retrieves the org.omg.CORBA.TypeCode contained in this DynAny object.
long | DynAny.get_longlong() Retrieves the long contained in this DynAny object.
long | DynAny.get_ulonglong() Retrieves the long contained in this DynAny object.
char | DynAny.get_wchar() Retrieves the char contained in this DynAny object.
String | DynAny.get_wstring() Retrieves the String contained in this DynAny object.
Any | DynAny.get_any() Retrieves the org.omg.CORBA.Any contained in this DynAny object.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Invalid

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.DynAnyPackage
Class Invalid

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.DynAnyPackage.Invalid
All Implemented Interfaces:
IDLEntity, Serializable
public final class Invalid
extends UserException

Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.

See Also:
Serialized Form

Constructor Summary
Invalid()
Constructs an Invalid object.
Invalid(String reason)
Constructs an Invalid object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Invalid

public Invalid()
Constructs an Invalid object.

Invalid

public Invalid(String reason)
Constructs an Invalid object.
Parameters:
reason - a String giving more information regarding the bad parameter passed to a dynamic any operation.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidSeq

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.DynAnyPackage
Class InvalidSeq

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.DynAnyPackage.InvalidSeq
All Implemented Interfaces:
IDLEntity, Serializable
public final class InvalidSeq
extends UserException

The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.

See Also:
Serialized Form

Constructor Summary
InvalidSeq()
Constructs an InvalidSeq object.
InvalidSeq(String reason)
Constructs an InvalidSeq object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidSeq

public InvalidSeq()
Constructs an InvalidSeq object.

InvalidSeq

public InvalidSeq(String reason)
Constructs an InvalidSeq object.
Parameters:
reason - a String giving more information regarding the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.DynAnyPackage
Class InvalidValue

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.DynAnyPackage.InvalidValue
All Implemented Interfaces:
IDLEntity, Serializable
public final class InvalidValue
extends UserException

See Also:
Serialized Form

Constructor Summary
InvalidValue()
Constructs an InvalidValue object.
InvalidValue(String reason)
Constructs an InvalidValue object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidValue

public InvalidValue()
Constructs an InvalidValue object.

InvalidValue

public InvalidValue(String reason)
Constructs an InvalidValue object.
Parameters:
reason - a String giving more information regarding the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeMismatch

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.DynAnyPackage
Class TypeMismatch

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.DynAnyPackage.TypeMismatch
All Implemented Interfaces:
IDLEntity, Serializable
public final class TypeMismatch
extends UserException

TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

See Also:
Serialized Form

Constructor Summary
TypeMismatch()
Constructs a TypeMismatch object.
TypeMismatch(String reason)
Constructs a TypeMismatch object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TypeMismatch

public TypeMismatch()
Constructs a TypeMismatch object.

TypeMismatch

public TypeMismatch(String reason)
Constructs a TypeMismatch object.
Parameters:
reason - a String giving more information regarding the exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DynArray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynArray

All Superinterfaces:
DynAny, Object
public interface DynArray
extends Object, DynAny

The DynArray interface represents a DynAny object which is associated with an array.

Method Summary
Any[] | get_elements() Returns the value of all the elements of this array.
void | set_elements(Any[] value) Sets the value of this DynArray object to the given array.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

get_elements

public Any[] get_elements()
Returns the value of all the elements of this array.
Returns:
the array of Any objects that is the value for this DynArray object
See Also:
set_elements(org.omg.CORBA.Any[])

set_elements

public void set_elements(Any[] value)
                  throws InvalidSeq
Sets the value of this DynArray object to the given array.
Parameters:
value - the array of Any objects
Throws:
InvalidSeq - if the sequence is bad
See Also:
get_elements()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynEnum

All Superinterfaces:
DynAny, Object
public interface DynEnum
extends Object, DynAny

The DynEnum interface represents a DynAny object which is associated with an IDL enum.

Method Summary
String | value_as_string() Return the value of the IDL enum stored in this DynEnum as a string.
void | value_as_string(String arg) Set a particular enum in this DynEnum.
int | value_as_ulong() Return the value of the IDL enum as a Java int.
void | value_as_ulong(int arg) Set the value of the IDL enum.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

value_as_string

public String value_as_string()
Return the value of the IDL enum stored in this DynEnum as a string.
Returns:
the stringified value.

value_as_string

public void value_as_string(String arg)
Set a particular enum in this DynEnum.
Parameters:
arg - the string corresponding to the value.

value_as_ulong

public int value_as_ulong()
Return the value of the IDL enum as a Java int.
Returns:
the integer value.

value_as_ulong

public void value_as_ulong(int arg)
Set the value of the IDL enum.
Parameters:
arg - the int value of the enum.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynFixed

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynFixed

All Superinterfaces:
DynAny, Object
public interface DynFixed
extends Object, DynAny

Represents a DynAny object that is associated with an IDL fixed type.

Method Summary
byte[] | get_value() Returns the value of the fixed type represented in this DynFixed object.
void | set_value(byte[] val) Sets the given fixed type instance as the value for this DynFixed object.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

get_value

public byte[] get_value()
Returns the value of the fixed type represented in this DynFixed object.
Returns:
the value as a byte array
See Also:
set_value(byte[])

set_value

public void set_value(byte[] val)
               throws InvalidValue
Sets the given fixed type instance as the value for this DynFixed object.
Parameters:
val - the value of the fixed type as a byte array
Throws:
InvalidValue - if the given argument is bad
See Also:
get_value()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynSequence

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynSequence

All Superinterfaces:
DynAny, Object
public interface DynSequence
extends Object, DynAny

The representation of a DynAny object that is associated with an IDL sequence.

Method Summary
Any[] | get_elements() Returns the value of every element in this sequence.
int | length() Returns the length of the sequence represented by this DynFixed object.
void | length(int arg) Sets the length of the sequence represented by this DynFixed object to the given argument.
void | set_elements(Any[] value) Sets the values of all elements in this sequence with the given array.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

length

public int length()
Returns the length of the sequence represented by this DynFixed object.
Returns:
the length of the sequence

length

public void length(int arg)
Sets the length of the sequence represented by this DynFixed object to the given argument.
Parameters:
arg - the length of the sequence

get_elements

public Any[] get_elements()
Returns the value of every element in this sequence.
Returns:
an array of Any objects containing the values in the sequence
See Also:
set_elements(org.omg.CORBA.Any[])

set_elements

public void set_elements(Any[] value)
                  throws InvalidSeq
Sets the values of all elements in this sequence with the given array.
Parameters:
value - the array of Any objects to be set
Throws:
InvalidSeq - if the array of values is bad
See Also:
get_elements()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynStruct

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynStruct

All Superinterfaces:
DynAny, Object
public interface DynStruct
extends Object, DynAny

The representation of a DynAny object that is associated with an IDL struct.

Method Summary
TCKind | current_member_kind() Returns the TCKind object that describes the kind of the current member.
String | current_member_name() During a traversal, returns the name of the current member.
NameValuePair[] | get_members() Returns an array containing all the members of the stored struct.
void | set_members(NameValuePair[] value) Set the members of the struct.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

current_member_name

public String current_member_name()
During a traversal, returns the name of the current member.
Returns:
the string name of the current member

current_member_kind

public TCKind current_member_kind()
Returns the TCKind object that describes the kind of the current member.
Returns:
the TCKind object that describes the current member

get_members

public NameValuePair[] get_members()
Returns an array containing all the members of the stored struct.
Returns:
the array of name-value pairs
See Also:
set_members(org.omg.CORBA.NameValuePair[])

set_members

public void set_members(NameValuePair[] value)
                 throws InvalidSeq
Set the members of the struct.
Parameters:
value - the array of name-value pairs.
Throws:
InvalidSeq - if the given argument is invalid
See Also:
get_members()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynUnion

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynUnion

All Superinterfaces:
DynAny, Object
public interface DynUnion
extends Object, DynAny

The DynUnion interface represents a DynAny object that is associated with an IDL union. Union values can be traversed using the operations defined in DynAny. The first component in the union corresponds to the discriminator; the second corresponds to the actual value of the union. Calling the method next() twice allows you to access both components.

Method Summary
TCKind | discriminator_kind() Returns the TCKind object associated with the discriminator of this union.
DynAny | discriminator() Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
TCKind | member_kind() Returns the TCKind associated with the member of this union.
String | member_name() Allows for the inspection of the name of this union member without checking the value of the discriminator.
void | member_name(String arg) Allows for the assignment of the name of this union member.
DynAny | member() Returns a DynAny object reference that is used in order to insert/get a member of this union.
boolean | set_as_default() Determines whether the discriminator associated with this union has been assigned a valid default value.
void | set_as_default(boolean arg) Determines whether the discriminator associated with this union gets assigned a valid default value.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

set_as_default

public boolean set_as_default()
Determines whether the discriminator associated with this union has been assigned a valid default value.
Returns:
true if the discriminator has a default value; false otherwise

set_as_default

public void set_as_default(boolean arg)
Determines whether the discriminator associated with this union gets assigned a valid default value.
Parameters:
arg - true if the discriminator gets assigned a default value

discriminator

public DynAny discriminator()
Returns a DynAny object reference that must be narrowed to the type of the discriminator in order to insert/get the discriminator value.
Returns:
a DynAny object reference representing the discriminator value

discriminator_kind

public TCKind discriminator_kind()
Returns the TCKind object associated with the discriminator of this union.
Returns:
the TCKind object associated with the discriminator of this union

member

public DynAny member()
Returns a DynAny object reference that is used in order to insert/get a member of this union.
Returns:
the DynAny object representing a member of this union

member_name

public String member_name()
Allows for the inspection of the name of this union member without checking the value of the discriminator.
Returns:
the name of this union member

member_name

public void member_name(String arg)
Allows for the assignment of the name of this union member.
Parameters:
arg - the new name of this union member

member_kind

public TCKind member_kind()
Returns the TCKind associated with the member of this union.
Returns:
the TCKind object associated with the member of this union
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface DynValue

All Superinterfaces:
DynAny, Object
public interface DynValue
extends Object, DynAny

The representation of a DynAny object that is associated with an IDL value type.

Method Summary
TCKind | current_member_kind() Returns the TCKind object that describes the current member.
String | current_member_name() Returns the name of the current member while traversing a DynAny object that represents a Value object.
NameValuePair[] | get_members() Returns an array containing all the members of the value object stored in this DynValue.
void | set_members(NameValuePair[] value) Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
Methods inherited from interface org.omg.CORBA.DynAny
assign, copy, current_component, destroy, from_any, get_any, get_boolean, get_char, get_double, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type

Method Detail

current_member_name

public String current_member_name()
Returns the name of the current member while traversing a DynAny object that represents a Value object.
Returns:
the name of the current member

current_member_kind

public TCKind current_member_kind()
Returns the TCKind object that describes the current member.
Returns:
the TCKind object corresponding to the current member

get_members

public NameValuePair[] get_members()
Returns an array containing all the members of the value object stored in this DynValue.
Returns:
an array of name-value pairs.
See Also:
set_members(org.omg.CORBA.NameValuePair[])

set_members

public void set_members(NameValuePair[] value)
                 throws InvalidSeq
Sets the members of the value object this DynValue object represents to the given array of NameValuePair objects.
Parameters:
value - the array of name-value pairs to be set
Throws:
InvalidSeq - if an inconsistent value is part of the given array
See Also:
get_members()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Environment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Environment

java.lang.Object
  |
  +--org.omg.CORBA.Environment
public abstract class Environment
extends Object

A container (holder) for an exception that is used in Request operations to make exceptions available to the client. An Environment object is created with the ORB method create_environment.

Since:
JDK1.2

Constructor Summary
Environment()
Method Summary
abstract void | clear() Clears this Environment object of its exception.
abstract Exception | exception() Retrieves the exception in this Environment object.
abstract void | exception(Exception except) Inserts the given exception into this Environment object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Environment

public Environment()
Method Detail

exception

public abstract Exception exception()
Retrieves the exception in this Environment object.
Returns:
the exception in this Environment object

exception

public abstract void exception(Exception except)
Inserts the given exception into this Environment object.
Parameters:
except - the exception to be set

clear

public abstract void clear()
Clears this Environment object of its exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ExceptionList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ExceptionList

java.lang.Object
  |
  +--org.omg.CORBA.ExceptionList
public abstract class ExceptionList
extends Object

An object used in Request operations to describe the exceptions that can be thrown by a method. It maintains a modifiable list of TypeCodes of the exceptions.

The following code fragment demonstrates creating an ExceptionList object:

    ORB orb = ORB.init(args, null);
    org.omg.CORBA.ExceptionList excList = orb.create_exception_list();
The variable excList represents an ExceptionList object with no TypeCode objects in it.

To add items to the list, you first create a TypeCode object for the exception you want to include, using the ORB method create_exception_tc. Then you use the ExceptionList method add to add it to the list. The class ExceptionList has a method for getting the number of TypeCode objects in the list, and after items have been added, it is possible to call methods for accessing or deleting an item at a designated index.

Since:
JDK1.2

Constructor Summary
ExceptionList()
Method Summary
abstract void | add(TypeCode exc) Adds a TypeCode object describing an exception to this ExceptionList object.
abstract int | count() Retrieves the number of TypeCode objects in this ExceptionList object.
abstract TypeCode | item(int index) Returns the TypeCode object at the given index.
abstract void | remove(int index) Removes the TypeCode object at the given index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExceptionList

public ExceptionList()
Method Detail

count

public abstract int count()
Retrieves the number of TypeCode objects in this ExceptionList object.
Returns:
the number of TypeCode objects in this ExceptionList object

add

public abstract void add(TypeCode exc)
Adds a TypeCode object describing an exception to this ExceptionList object.
Parameters:
exc - the TypeCode object to be added

item

public abstract TypeCode item(int index)
                       throws Bounds
Returns the TypeCode object at the given index. The first item is at index 0.
Parameters:
index - the index of the TypeCode object desired. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
Returns:
the TypeCode object at the given index
Throws:
Bounds - if the index given is greater than or equal to the number of TypeCode objects in this ExceptionList object

remove

public abstract void remove(int index)
                     throws Bounds
Removes the TypeCode object at the given index. Note that the indices of all the TypeCoded objects following the one deleted are shifted down by one.
Parameters:
index - the index of the TypeCode object to be removed. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
Throws:
Bounds - if the index is greater than or equal to the number of TypeCode objects in this ExceptionList object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldNameHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FieldNameHelper

java.lang.Object
  |
  +--org.omg.CORBA.FieldNameHelper
public abstract class FieldNameHelper
extends Object

org/omg/CORBA/FieldNameHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

Constructor Summary
FieldNameHelper()
Method Summary
static String | extract(Any a)
static String | id()
static void | insert(Any a, String that)
static String | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldNameHelper

public FieldNameHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

write

public static void write(OutputStream ostream,
                         String value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FixedHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FixedHolder

java.lang.Object
  |
  +--org.omg.CORBA.FixedHolder
All Implemented Interfaces:
Streamable
public final class FixedHolder
extends Object
implements Streamable

FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal. It is usually used to store "out" and "inout" IDL method parameters. If an IDL method signature has a fixed as an "out" or "inout" parameter, the programmer must pass an instance of FixedHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the contained value corresponding to the "out" value returned from the server.

Field Summary
 BigDecimal value
The value held by the FixedHolder
Constructor Summary
FixedHolder()
Construct the FixedHolder without initializing the contained value.
FixedHolder(BigDecimal initial)
Construct the FixedHolder and initialize it with the given value.
Method Summary
void | _read(InputStream input) Read a fixed point value from the input stream and store it in the value member.
TypeCode | _type() Return the TypeCode of this holder object.
void | _write(OutputStream output) Write the fixed point value stored in this holder to an OutputStream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public BigDecimal value
The value held by the FixedHolder
Constructor Detail

FixedHolder

public FixedHolder()
Construct the FixedHolder without initializing the contained value.

FixedHolder

public FixedHolder(BigDecimal initial)
Construct the FixedHolder and initialize it with the given value.
Parameters:
initial - the value used to initialize the FixedHolder
Method Detail

_read

public void _read(InputStream input)
Read a fixed point value from the input stream and store it in the value member.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream to read from.

_write

public void _write(OutputStream output)
Write the fixed point value stored in this holder to an OutputStream.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream to write into.

_type

public TypeCode _type()
Return the TypeCode of this holder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FloatHolder

java.lang.Object
  |
  +--org.omg.CORBA.FloatHolder
All Implemented Interfaces:
Streamable
public final class FloatHolder
extends Object
implements Streamable

A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL float as an "out" or "inout" parameter, the programmer must pass an instance of FloatHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myFloatHolder is an instance of FloatHolder, the value stored in its value field can be accessed with myFloatHolder.value.

Since:
JDK1.2

Field Summary
 float value
The float value held by this FloatHolder object.
Constructor Summary
FloatHolder()
Constructs a new FloatHolder object with its value field initialized to 0.0.
FloatHolder(float initial)
Constructs a new FloatHolder object for the given float.
Method Summary
void | _read(InputStream input) Read a float from an input stream and initialize the value member with the float value.
TypeCode | _type() Return the TypeCode of this Streamable.
void | _write(OutputStream output) Write the float value into an output stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public float value
The float value held by this FloatHolder object.
Constructor Detail

FloatHolder

public FloatHolder()
Constructs a new FloatHolder object with its value field initialized to 0.0.

FloatHolder

public FloatHolder(float initial)
Constructs a new FloatHolder object for the given float.
Parameters:
initial - the float with which to initialize the value field of the new FloatHolder object
Method Detail

_read

public void _read(InputStream input)
Read a float from an input stream and initialize the value member with the float value.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream to read from.

_write

public void _write(OutputStream output)
Write the float value into an output stream.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream to write into.

_type

public TypeCode _type()
Return the TypeCode of this Streamable.
Specified by:
_type in interface Streamable
Returns:
the TypeCode object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FloatSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.FloatSeqHelper
public final class FloatSeqHelper
extends Object

org/omg/CORBA/FloatSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Constructor Summary
FloatSeqHelper()
Method Summary
static float[] | extract(Any a)
static String | id()
static void | insert(Any a, float[] that)
static float[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, float[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FloatSeqHelper

public FloatSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          float[] that)

extract

public static float[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static float[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         float[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FloatSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.FloatSeqHolder
All Implemented Interfaces:
Streamable
public final class FloatSeqHolder
extends Object
implements Streamable

org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Field Summary
 float[] value
Constructor Summary
FloatSeqHolder()
FloatSeqHolder(float[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public float[] value
Constructor Detail

FloatSeqHolder

public FloatSeqHolder()

FloatSeqHolder

public FloatSeqHolder(float[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FREE_MEM

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class FREE_MEM

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.FREE_MEM
All Implemented Interfaces:
Serializable
public final class FREE_MEM
extends SystemException

The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
FREE_MEM()
Constructs a FREE_MEM exception with a default minor code of 0 and a completion state of COMPLETED_NO.
FREE_MEM(int minor, CompletionStatus completed)
Constructs a FREE_MEM exception with the specified minor code and completion status.
FREE_MEM(String s)
Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
FREE_MEM(String s, int minor, CompletionStatus completed)
Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FREE_MEM

public FREE_MEM()
Constructs a FREE_MEM exception with a default minor code of 0 and a completion state of COMPLETED_NO.

FREE_MEM

public FREE_MEM(String s)
Constructs a FREE_MEM exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

FREE_MEM

public FREE_MEM(int minor,
                CompletionStatus completed)
Constructs a FREE_MEM exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

FREE_MEM

public FREE_MEM(String s,
                int minor,
                CompletionStatus completed)
Constructs a FREE_MEM exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IdentifierHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class IdentifierHelper

java.lang.Object
  |
  +--org.omg.CORBA.IdentifierHelper
public abstract class IdentifierHelper
extends Object

org/omg/CORBA/IdentifierHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:42 o'clock GMT+00:00

Constructor Summary
IdentifierHelper()
Method Summary
static String | extract(Any a)
static String | id()
static void | insert(Any a, String that)
static String | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IdentifierHelper

public IdentifierHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

write

public static void write(OutputStream ostream,
                         String value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IDLTypeHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class IDLTypeHelper

java.lang.Object
  |
  +--org.omg.CORBA.IDLTypeHelper
public abstract class IDLTypeHelper
extends Object

org/omg/CORBA/IDLTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

Constructor Summary
IDLTypeHelper()
Method Summary
static IDLType | extract(Any a)
static String | id()
static void | insert(Any a, IDLType that)
static IDLType | narrow(Object obj)
static IDLType | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, IDLType value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IDLTypeHelper

public IDLTypeHelper()
Method Detail

insert

public static void insert(Any a,
                          IDLType that)

extract

public static IDLType extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static IDLType read(InputStream istream)

write

public static void write(OutputStream ostream,
                         IDLType value)

narrow

public static IDLType narrow(Object obj)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IDLTypeOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface IDLTypeOperations

All Superinterfaces:
IRObjectOperations
All Known Subinterfaces:
IDLType
public interface IDLTypeOperations
extends IRObjectOperations

This interface must be implemented by all IDLType objects. The IDLType is inherited by all IR objects that represent IDL types, including interfaces, typedefs, and anonymous types.

See Also:
IDLType, IRObject, IRObjectOperations

Method Summary
 TypeCode type()
The type attribute describes the type defined by an object derived from IDLType.
Methods inherited from interface org.omg.CORBA.IRObjectOperations
def_kind, destroy

Method Detail

type

public TypeCode type()
The type attribute describes the type defined by an object derived from IDLType.
Returns:
the TypeCode defined by this object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IMP_LIMIT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class IMP_LIMIT

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.IMP_LIMIT
All Implemented Interfaces:
Serializable
public final class IMP_LIMIT
extends SystemException

The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
IMP_LIMIT()
Constructs an IMP_LIMIT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
IMP_LIMIT(int minor, CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified minor code and completion status.
IMP_LIMIT(String s)
Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
IMP_LIMIT(String s, int minor, CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IMP_LIMIT

public IMP_LIMIT()
Constructs an IMP_LIMIT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

IMP_LIMIT

public IMP_LIMIT(String s)
Constructs an IMP_LIMIT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

IMP_LIMIT

public IMP_LIMIT(int minor,
                 CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

IMP_LIMIT

public IMP_LIMIT(String s,
                 int minor,
                 CompletionStatus completed)
Constructs an IMP_LIMIT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INITIALIZE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INITIALIZE

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INITIALIZE
All Implemented Interfaces:
Serializable
public final class INITIALIZE
extends SystemException

The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INITIALIZE()
Constructs an INITIALIZE exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO.
INITIALIZE(int minor, CompletionStatus completed)
Constructs an INITIALIZE exception with the specified minor code and completion status.
INITIALIZE(String s)
Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
INITIALIZE(String s, int minor, CompletionStatus completed)
Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INITIALIZE

public INITIALIZE()
Constructs an INITIALIZE exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO.

INITIALIZE

public INITIALIZE(String s)
Constructs an INITIALIZE exception with the specified detail message, a minor code of 0, and a completion state of CompletionStatus.COMPLETED_NO.
Parameters:
s - the String containing a detail message

INITIALIZE

public INITIALIZE(int minor,
                  CompletionStatus completed)
Constructs an INITIALIZE exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status of the method that threw this exception

INITIALIZE

public INITIALIZE(String s,
                  int minor,
                  CompletionStatus completed)
Constructs an INITIALIZE exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status of the method that threw this exception
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Initializer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Initializer

java.lang.Object
  |
  +--org.omg.CORBA.Initializer
All Implemented Interfaces:
IDLEntity, Serializable
public final class Initializer
extends Object
implements IDLEntity

This is the mapping for an IDL structure which specifies an initializer for a value type. A value can contain all the elements that an interface can as well as the definition of state members, and initializers for that state. In order to ensure portability of value implementations, designers may also define the signatures of initializers (or constructors) for non abstract value types. Syntactically these look like local operations except that they use the keyword init for the "name" of the operation, have no return type, and must use only in parameters. There may be any number of init declarations, as long as the signatures of all the initializers declared within the same scope are unique. Using the same signature as one found in a less-derived type is allowed. The mapping of initializers is language specific and may not always result in a one to one correspondence between initializer signatures and the programming language constructs into which they map. This is because the mapping from IDL types into programming language types is not isomorphic; several different IDL types may map to the same programming language type. Hence defining initializers with the same number of parameters with types that are "similar" (e.g. char and wchar, signed and unsigned integers, etc.) should be done with care. Value types may also be abstract. They are called abstract because an abstract value type may not be instantiated. No or may be specified. However, local operations may be specified. Essentially they are a bundle of operation signatures with a purely local implementation. Note that a concrete value type with an empty state is not an abstract value type. The following shows an example of defining a value type with an initializer. Example: valuetype EmployeeRecord { private string name; private string email; private string SSN; init(in string name, in string SSN); }; Value types do not map to org.omg.CORBA.Object's.

See Also:
Serialized Form

Field Summary
 StructMember[] members
members contains the reference to all the Initializers of non abstract value types.
Constructor Summary
Initializer()
Constructs an Initializer object with the members attribute null.
Initializer(StructMember[] _members)
Constructs an Initializer object and assigns the members attribute with the given parameter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

members

public StructMember[] members
members contains the reference to all the Initializers of non abstract value types.
Constructor Detail

Initializer

public Initializer()
Constructs an Initializer object with the members attribute null.

Initializer

public Initializer(StructMember[] _members)
Constructs an Initializer object and assigns the members attribute with the given parameter.
Parameters:
_members - an array of StructMember Objects.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INTERNAL

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INTERNAL

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INTERNAL
All Implemented Interfaces:
Serializable
public final class INTERNAL
extends SystemException

The CORBA INTERNAL exception, which is thrown when there is an ORB internal error. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section meaning of minor codes to see the minor codes for this exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INTERNAL()
Constructs an INTERNAL exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INTERNAL(int minor, CompletionStatus completed)
Constructs an INTERNAL exception with the specified minor code and completion status.
INTERNAL(String s)
Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INTERNAL(String s, int minor, CompletionStatus completed)
Constructs an INTERNAL exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INTERNAL

public INTERNAL()
Constructs an INTERNAL exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.

INTERNAL

public INTERNAL(String s)
Constructs an INTERNAL exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

INTERNAL

public INTERNAL(int minor,
                CompletionStatus completed)
Constructs an INTERNAL exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus that indicates the completion status of the method that threw this exception

INTERNAL

public INTERNAL(String s,
                int minor,
                CompletionStatus completed)
Constructs an INTERNAL exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus that indicates the completion status of the method that threw this exception
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INTF_REPOS

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INTF_REPOS

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INTF_REPOS
All Implemented Interfaces:
Serializable
public final class INTF_REPOS
extends SystemException

The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INTF_REPOS()
Constructs an INTF_REPOS exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INTF_REPOS(int minor, CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified minor code and completion status.
INTF_REPOS(String s)
Constructs an INTF_REPOS exception with the specified detail.
INTF_REPOS(String s, int minor, CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INTF_REPOS

public INTF_REPOS()
Constructs an INTF_REPOS exception with a default minor code of 0 and a completion state of COMPLETED_NO.

INTF_REPOS

public INTF_REPOS(String s)
Constructs an INTF_REPOS exception with the specified detail.
Parameters:
s - the String containing a detail message

INTF_REPOS

public INTF_REPOS(int minor,
                  CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

INTF_REPOS

public INTF_REPOS(String s,
                  int minor,
                  CompletionStatus completed)
Constructs an INTF_REPOS exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class IntHolder

java.lang.Object
  |
  +--org.omg.CORBA.IntHolder
All Implemented Interfaces:
Streamable
public final class IntHolder
extends Object
implements Streamable

A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL long as an "out" or "inout" parameter, the programmer must pass an instance of IntHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myIntHolder is an instance of IntHolder, the value stored in its value field can be accessed with myIntHolder.value.

Since:
JDK1.2

Field Summary
 int value
The int value held by this IntHolder object in its value field.
Constructor Summary
IntHolder()
Constructs a new IntHolder object with its value field initialized to 0.
IntHolder(int initial)
Constructs a new IntHolder object with its value field initialized to the given int.
Method Summary
void | _read(InputStream input) Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
TypeCode | _type() Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
void | _write(OutputStream output) Marshals the value in this IntHolder object's value field to the output stream output.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public int value
The int value held by this IntHolder object in its value field.
Constructor Detail

IntHolder

public IntHolder()
Constructs a new IntHolder object with its value field initialized to 0.

IntHolder

public IntHolder(int initial)
Constructs a new IntHolder object with its value field initialized to the given int.
Parameters:
initial - the int with which to initialize the value field of the newly-created IntHolder object
Method Detail

_read

public void _read(InputStream input)
Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream object containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals the value in this IntHolder object's value field to the output stream output.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream object that will contain the CDR formatted data

_type

public TypeCode _type()
Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
Specified by:
_type in interface Streamable
Returns:
the type code for the value held in this IntHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INVALID_TRANSACTION

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INVALID_TRANSACTION

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INVALID_TRANSACTION
All Implemented Interfaces:
Serializable
public final class INVALID_TRANSACTION
extends SystemException

The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INVALID_TRANSACTION()
Constructs an INVALID_TRANSACTION exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INVALID_TRANSACTION(int minor, CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
INVALID_TRANSACTION(String s)
Constructs an INVALID_TRANSACTION exception with the specified detail message.
INVALID_TRANSACTION(String s, int minor, CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INVALID_TRANSACTION

public INVALID_TRANSACTION()
Constructs an INVALID_TRANSACTION exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.

INVALID_TRANSACTION

public INVALID_TRANSACTION(String s)
Constructs an INVALID_TRANSACTION exception with the specified detail message.
Parameters:
s - the String containing a detail message

INVALID_TRANSACTION

public INVALID_TRANSACTION(int minor,
                           CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

INVALID_TRANSACTION

public INVALID_TRANSACTION(String s,
                           int minor,
                           CompletionStatus completed)
Constructs an INVALID_TRANSACTION exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INV_FLAG

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INV_FLAG

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INV_FLAG
All Implemented Interfaces:
Serializable
public final class INV_FLAG
extends SystemException

The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INV_FLAG()
Constructs an INV_FLAG exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INV_FLAG(int minor, CompletionStatus completed)
Constructs an INV_FLAG exception with the specified minor code and completion status.
INV_FLAG(String s)
Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_FLAG(String s, int minor, CompletionStatus completed)
Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INV_FLAG

public INV_FLAG()
Constructs an INV_FLAG exception with a default minor code of 0 and a completion state of COMPLETED_NO.

INV_FLAG

public INV_FLAG(String s)
Constructs an INV_FLAG exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

INV_FLAG

public INV_FLAG(int minor,
                CompletionStatus completed)
Constructs an INV_FLAG exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status

INV_FLAG

public INV_FLAG(String s,
                int minor,
                CompletionStatus completed)
Constructs an INV_FLAG exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - an instance of CompletionStatus indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INV_IDENT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INV_IDENT

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INV_IDENT
All Implemented Interfaces:
Serializable
public final class INV_IDENT
extends SystemException

The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INV_IDENT()
Constructs an INV_IDENT exception with a default minor code of 0 and a completion state of COMPLETED_NO.
INV_IDENT(int minor, CompletionStatus completed)
Constructs an INV_IDENT exception with the specified minor code and completion status.
INV_IDENT(String s)
Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_IDENT(String s, int minor, CompletionStatus completed)
Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INV_IDENT

public INV_IDENT()
Constructs an INV_IDENT exception with a default minor code of 0 and a completion state of COMPLETED_NO.

INV_IDENT

public INV_IDENT(String s)
Constructs an INV_IDENT exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

INV_IDENT

public INV_IDENT(int minor,
                 CompletionStatus completed)
Constructs an INV_IDENT exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - a CompletionStatus object indicating the completion status

INV_IDENT

public INV_IDENT(String s,
                 int minor,
                 CompletionStatus completed)
Constructs an INV_IDENT exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - a CompletionStatus object indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INV_OBJREF

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INV_OBJREF

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INV_OBJREF
All Implemented Interfaces:
Serializable
public final class INV_OBJREF
extends SystemException

The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INV_OBJREF()
Constructs an INV_OBJREF exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.
INV_OBJREF(int minor, CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified minor code and completion status.
INV_OBJREF(String s)
Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_OBJREF(String s, int minor, CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INV_OBJREF

public INV_OBJREF()
Constructs an INV_OBJREF exception with a default minor code of 0 and a completion state of COMPLETED_MAYBE.

INV_OBJREF

public INV_OBJREF(String s)
Constructs an INV_OBJREF exception with the specified detail message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

INV_OBJREF

public INV_OBJREF(int minor,
                  CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - a CompletionStatus instance indicating the completion status

INV_OBJREF

public INV_OBJREF(String s,
                  int minor,
                  CompletionStatus completed)
Constructs an INV_OBJREF exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
s - the String containing a detail message
minor - the minor code
completed - a CompletionStatus instance indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


INV_POLICY

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class INV_POLICY

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.INV_POLICY
All Implemented Interfaces:
Serializable
public class INV_POLICY
extends SystemException

The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
INV_POLICY()
Constructs a INV_POLICY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
INV_POLICY(int minor, CompletionStatus completed)
Constructs a INV_POLICY exception with the specified minor code and completion status.
INV_POLICY(String s)
Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
INV_POLICY(String s, int minor, CompletionStatus completed)
Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

INV_POLICY

public INV_POLICY()
Constructs a INV_POLICY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

INV_POLICY

public INV_POLICY(String s)
Constructs a INV_POLICY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

INV_POLICY

public INV_POLICY(int minor,
                  CompletionStatus completed)
Constructs a INV_POLICY exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

INV_POLICY

public INV_POLICY(String s,
                  int minor,
                  CompletionStatus completed)
Constructs a INV_POLICY exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IRObjectOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface IRObjectOperations

All Known Subinterfaces:
IDLType, IDLTypeOperations, IRObject, Repository
public interface IRObjectOperations

This is the Operations interface for the mapping from IRObject. Several interfaces are used as base interfaces for objects in the Interface Repository (IR). These base interfaces are not instantiable. A common set of operations is used to locate objects within the Interface Repository. Some of these operations are defined in the IRObject. All IR objects inherit from the IRObject interface, which provides an operation for identifying the actual type of the object. (The IDL base interface IRObject represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.) All java implementations of IR objects must implement the IRObjectOperations interface.

See Also:
IDLTypeOperations, IDLType, IRObject

Method Summary
DefinitionKind | def_kind() Returns the DefinitionKind corresponding to this Interface Repository object.
void | destroy() Destroys this object.

Method Detail

def_kind

public DefinitionKind def_kind()
Returns the DefinitionKind corresponding to this Interface Repository object.
Returns:
the DefinitionKind corresponding to this Interface Repository object.

destroy

public void destroy()
Destroys this object. If the object is a Container, this method is applied to all its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed. If the method is invoked on a Repository or on a PrimitiveDef then the BAD_INV_ORDER exception is raised with minor value 2. An attempt to destroy an object that would leave the repository in an incoherent state causes BAD_INV_ORDER exception to be raised with the minor code 1.
Throws:
BAD_INV_ORDER -
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class LongHolder

java.lang.Object
  |
  +--org.omg.CORBA.LongHolder
All Implemented Interfaces:
Streamable
public final class LongHolder
extends Object
implements Streamable

A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL long long as an "out" or "inout" parameter, the programmer must pass an instance of LongHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myLongHolder is an instance of LongHolder, the value stored in its value field can be accessed with myLongHolder.value.

Since:
JDK1.2

Field Summary
 long value
The long value held by this LongHolder object.
Constructor Summary
LongHolder()
Constructs a new LongHolder object with its value field initialized to 0.
LongHolder(long initial)
Constructs a new LongHolder object with its value field initialized to the given long.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
TypeCode | _type() Returns the TypeCode object corresponding to the value held in the Holder.
void | _write(OutputStream output) Marshals to output the value in the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public long value
The long value held by this LongHolder object.
Constructor Detail

LongHolder

public LongHolder()
Constructs a new LongHolder object with its value field initialized to 0.

LongHolder

public LongHolder(long initial)
Constructs a new LongHolder object with its value field initialized to the given long.
Parameters:
initial - the long with which to initialize the value field of the newly-created LongHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals to output the value in the Holder.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data

_type

public TypeCode _type()
Returns the TypeCode object corresponding to the value held in the Holder.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongLongSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class LongLongSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.LongLongSeqHelper
public final class LongLongSeqHelper
extends Object

org/omg/CORBA/LongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Constructor Summary
LongLongSeqHelper()
Method Summary
static long[] | extract(Any a)
static String | id()
static void | insert(Any a, long[] that)
static long[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, long[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LongLongSeqHelper

public LongLongSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          long[] that)

extract

public static long[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static long[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         long[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongLongSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class LongLongSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.LongLongSeqHolder
All Implemented Interfaces:
Streamable
public final class LongLongSeqHolder
extends Object
implements Streamable

org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 long[] value
Constructor Summary
LongLongSeqHolder()
LongLongSeqHolder(long[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public long[] value
Constructor Detail

LongLongSeqHolder

public LongLongSeqHolder()

LongLongSeqHolder

public LongLongSeqHolder(long[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class LongSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.LongSeqHelper
public final class LongSeqHelper
extends Object

org/omg/CORBA/LongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
LongSeqHelper()
Method Summary
static int[] | extract(Any a)
static String | id()
static void | insert(Any a, int[] that)
static int[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, int[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LongSeqHelper

public LongSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          int[] that)

extract

public static int[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static int[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         int[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class LongSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.LongSeqHolder
All Implemented Interfaces:
Streamable
public final class LongSeqHolder
extends Object
implements Streamable

org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 int[] value
Constructor Summary
LongSeqHolder()
LongSeqHolder(int[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public int[] value
Constructor Detail

LongSeqHolder

public LongSeqHolder()

LongSeqHolder

public LongSeqHolder(int[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MARSHAL

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class MARSHAL

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.MARSHAL
All Implemented Interfaces:
Serializable
public final class MARSHAL
extends SystemException

The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

Since:
JDK1.2
See Also:
Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
MARSHAL()
Constructs a MARSHAL exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
MARSHAL(int minor, CompletionStatus completed)
Constructs a MARSHAL exception with the specified minor code and completion status.
MARSHAL(String s)
Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
MARSHAL(String s, int minor, CompletionStatus completed)
Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MARSHAL

public MARSHAL()
Constructs a MARSHAL exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

MARSHAL

public MARSHAL(String s)
Constructs a MARSHAL exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description of the exception

MARSHAL

public MARSHAL(int minor,
               CompletionStatus completed)
Constructs a MARSHAL exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

MARSHAL

public MARSHAL(String s,
               int minor,
               CompletionStatus completed)
Constructs a MARSHAL exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamedValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NamedValue

java.lang.Object
  |
  +--org.omg.CORBA.NamedValue
public abstract class NamedValue
extends Object

An object used in the DII and DSI to describe arguments and return values. NamedValue objects are also used in the Context object routines to pass lists of property names and values.

A NamedValue object contains:

  • a name -- If the NamedValue object is used to describe arguments to a request, the name will be an argument identifier specified in the OMG IDL interface definition for the operation being described.
  • a value -- an Any object
  • an argument mode flag -- one of the following:
    • ARG_IN.value
    • ARG_OUT.value
    • ARG_INOUT.value
    • zero -- if this NamedValue object represents a property in a Context object rather than a parameter or return value

The class NamedValue has three methods, which access its fields. The following code fragment demonstrates creating a NamedValue object and then accessing its fields:

    ORB orb = ORB.init(args, null);
    String s = "argument_1";
    org.omg.CORBA.Any myAny = orb.create_any();
    myAny.insert_long(12345);
    int in = org.omg.CORBA.ARG_IN.value;

    org.omg.CORBA.NamedValue nv = orb.create_named_value(
        s, myAny, in);
    System.out.println("This nv name is " + nv.name());
    try {
        System.out.println("This nv value is " + nv.value().extract_long());
        System.out.println("This nv flag is " + nv.flags());
    } catch (org.omg.CORBA.BAD_OPERATION b) {
      System.out.println("extract failed");
    }

If this code fragment were put into a main method, the output would be something like the following:

    This nv name is argument_1
    This nv value is 12345
    This nv flag is 1

Note that the method value returns an Any object. In order to access the long contained in the Any object, we used the method extract_long.

Since:
JDK1.2
See Also:
Any, ARG_IN, ARG_INOUT, ARG_OUT

Constructor Summary
NamedValue()
Method Summary
abstract int | flags() Retrieves the argument mode flag for this NamedValue object.
abstract String | name() Retrieves the name for this NamedValue object.
abstract Any | value() Retrieves the value for this NamedValue object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NamedValue

public NamedValue()
Method Detail

name

public abstract String name()
Retrieves the name for this NamedValue object.
Returns:
a String object representing the name of this NamedValue object

value

public abstract Any value()
Retrieves the value for this NamedValue object.
Returns:
an Any object containing the value of this NamedValue object

flags

public abstract int flags()
Retrieves the argument mode flag for this NamedValue object.
Returns:
an int representing the argument mode for this NamedValue object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameValuePair

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NameValuePair

java.lang.Object
  |
  +--org.omg.CORBA.NameValuePair
All Implemented Interfaces:
IDLEntity, Serializable
public final class NameValuePair
extends Object
implements IDLEntity

The NameValuePair interface associates a name with a value that is an attribute of an IDL struct. This interface is used in the DynStruct APIs.

See Also:
Serialized Form

Field Summary
String | id The name to be associated with a value by this NameValuePair object.
Any | value The value to be associated with a name by this NameValuePair object.
Constructor Summary
NameValuePair()
Constructs an empty NameValuePair object.
NameValuePair(String __id, Any __value)
Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

id

public String id
The name to be associated with a value by this NameValuePair object.

value

public Any value
The value to be associated with a name by this NameValuePair object.
Constructor Detail

NameValuePair

public NameValuePair()
Constructs an empty NameValuePair object. To associate a name with a value after using this constructor, the fields of this object have to be accessed individually.

NameValuePair

public NameValuePair(String __id,
                     Any __value)
Constructs a NameValuePair object that associates the given name with the given org.omg.CORBA.Any object.
Parameters:
__id - the name to be associated with the given Any object
__value - the Any object to be associated with the given name
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameValuePairHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NameValuePairHelper

java.lang.Object
  |
  +--org.omg.CORBA.NameValuePairHelper
public abstract class NameValuePairHelper
extends Object

org/omg/CORBA/NameValuePairHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

Constructor Summary
NameValuePairHelper()
Method Summary
static NameValuePair | extract(Any a)
static String | id()
static void | insert(Any a, NameValuePair that)
static NameValuePair | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, NameValuePair value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NameValuePairHelper

public NameValuePairHelper()
Method Detail

insert

public static void insert(Any a,
                          NameValuePair that)

extract

public static NameValuePair extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static NameValuePair read(InputStream istream)

write

public static void write(OutputStream ostream,
                         NameValuePair value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NO_IMPLEMENT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NO_IMPLEMENT

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.NO_IMPLEMENT
All Implemented Interfaces:
Serializable
public final class NO_IMPLEMENT
extends SystemException

The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

Since:
JDK1.2
See Also:
Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
NO_IMPLEMENT()
Constructs a NO_IMPLEMENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_IMPLEMENT(int minor, CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
NO_IMPLEMENT(String s)
Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_IMPLEMENT(String s, int minor, CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NO_IMPLEMENT

public NO_IMPLEMENT()
Constructs a NO_IMPLEMENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

NO_IMPLEMENT

public NO_IMPLEMENT(String s)
Constructs a NO_IMPLEMENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description of the exception

NO_IMPLEMENT

public NO_IMPLEMENT(int minor,
                    CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - a CompletionStatus instance indicating the completion status

NO_IMPLEMENT

public NO_IMPLEMENT(String s,
                    int minor,
                    CompletionStatus completed)
Constructs a NO_IMPLEMENT exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
completed - a CompletionStatus instance indicating the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NO_MEMORY

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NO_MEMORY

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.NO_MEMORY
All Implemented Interfaces:
Serializable
public final class NO_MEMORY
extends SystemException

The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
NO_MEMORY()
Constructs a NO_MEMORY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_MEMORY(int minor, CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified minor code and completion status.
NO_MEMORY(String s)
Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_MEMORY(String s, int minor, CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NO_MEMORY

public NO_MEMORY()
Constructs a NO_MEMORY exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

NO_MEMORY

public NO_MEMORY(String s)
Constructs a NO_MEMORY exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

NO_MEMORY

public NO_MEMORY(int minor,
                 CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

NO_MEMORY

public NO_MEMORY(String s,
                 int minor,
                 CompletionStatus completed)
Constructs a NO_MEMORY exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NO_PERMISSION

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NO_PERMISSION

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.NO_PERMISSION
All Implemented Interfaces:
Serializable
public final class NO_PERMISSION
extends SystemException

The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
NO_PERMISSION()
Constructs a NO_PERMISSION exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_PERMISSION(int minor, CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified minor code and completion status.
NO_PERMISSION(String s)
Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_PERMISSION(String s, int minor, CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NO_PERMISSION

public NO_PERMISSION()
Constructs a NO_PERMISSION exception with a default minor code of 0 and a completion state of CompletionStatus.COMPLETED_NO, and a null description.

NO_PERMISSION

public NO_PERMISSION(String s)
Constructs a NO_PERMISSION exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

NO_PERMISSION

public NO_PERMISSION(int minor,
                     CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

NO_PERMISSION

public NO_PERMISSION(String s,
                     int minor,
                     CompletionStatus completed)
Constructs a NO_PERMISSION exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NO_RESOURCES

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NO_RESOURCES

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.NO_RESOURCES
All Implemented Interfaces:
Serializable
public final class NO_RESOURCES
extends SystemException

The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
NO_RESOURCES()
Constructs a NO_RESOURCES exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_RESOURCES(int minor, CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified minor code and completion status.
NO_RESOURCES(String s)
Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESOURCES(String s, int minor, CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NO_RESOURCES

public NO_RESOURCES()
Constructs a NO_RESOURCES exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

NO_RESOURCES

public NO_RESOURCES(String s)
Constructs a NO_RESOURCES exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

NO_RESOURCES

public NO_RESOURCES(int minor,
                    CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

NO_RESOURCES

public NO_RESOURCES(String s,
                    int minor,
                    CompletionStatus completed)
Constructs a NO_RESOURCES exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NO_RESPONSE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NO_RESPONSE

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.NO_RESPONSE
All Implemented Interfaces:
Serializable
public final class NO_RESPONSE
extends SystemException

The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
NO_RESPONSE()
Constructs a NO_RESPONSE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
NO_RESPONSE(int minor, CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified minor code and completion status.
NO_RESPONSE(String s)
Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
NO_RESPONSE(String s, int minor, CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NO_RESPONSE

public NO_RESPONSE()
Constructs a NO_RESPONSE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

NO_RESPONSE

public NO_RESPONSE(String s)
Constructs a NO_RESPONSE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

NO_RESPONSE

public NO_RESPONSE(int minor,
                   CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

NO_RESPONSE

public NO_RESPONSE(String s,
                   int minor,
                   CompletionStatus completed)
Constructs a NO_RESPONSE exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NVList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class NVList

java.lang.Object
  |
  +--org.omg.CORBA.NVList
public abstract class NVList
extends Object

A modifiable list containing NamedValue objects.

The class NVList is used as follows:

  • to describe arguments for a Request object in the Dynamic Invocation Interface and the Dynamic Skeleton Interface
  • to describe context values in a Context object

Each NamedValue object consists of the following:

  • a name, which is a String object
  • a value, as an Any object
  • an argument mode flag

An NVList object may be created using one of the following ORB methods:

  1. org.omg.CORBA.ORB.create_list
        org.omg.CORBA.NVList nv = orb.create_list(3);
    The variable nv represents a newly-created NVList object. The argument is a memory-management hint to the orb and does not imply the actual length of the list. If, for example, you want to use an NVList object in a request, and the method being invoked takes three parameters, you might optimize by supplying 3 to the method create_list. Note that the new NVList will not necessarily have a length of 3; it could have a length of 2 or 4, for instance. Note also that you can add any number of NamedValue objects to this list regardless of its original length.

  2. org.omg.CORBA.ORB.create_operation_list
        org.omg.CORBA.NVList nv = orb.create_operation_list(myOperationDef);
    The variable nv represents a newly-created NVList object that contains descriptions of the arguments to the method described in the given OperationDef object.

The methods in the class NVList all deal with the NamedValue objects in the list. There are three methods for adding a NamedValue object, a method for getting the count of NamedValue objects in the list, a method for retrieving a NamedValue object at a given index, and a method for removing a NamedValue object at a given index.

Since:
JDK1.2
See Also:
Request, ServerRequest, NamedValue, Context

Constructor Summary
NVList()
Method Summary
abstract NamedValue | add_item(String item_name, int flags) Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
abstract NamedValue | add_value(String item_name, Any val, int flags) Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
abstract NamedValue | add(int flags) Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
abstract int | count() Returns the number of NamedValue objects that have been added to this NVList object.
abstract NamedValue | item(int index) Retrieves the NamedValue object at the given index.
abstract void | remove(int index) Removes the NamedValue object at the given index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NVList

public NVList()
Method Detail

count

public abstract int count()
Returns the number of NamedValue objects that have been added to this NVList object.
Returns:
an int indicating the number of NamedValue objects in this NVList.

add

public abstract NamedValue add(int flags)
Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
Parameters:
flags - one of the argument mode flags
Returns:
the newly-created NamedValue object

add_item

public abstract NamedValue add_item(String item_name,
                                    int flags)
Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
Parameters:
item_name - the name for the new NamedValue object
flags - one of the argument mode flags
Returns:
the newly-created NamedValue object

add_value

public abstract NamedValue add_value(String item_name,
                                     Any val,
                                     int flags)
Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
Parameters:
item_name - the name for the new NamedValue object
value - an Any object containing the value for the new NamedValue object
flags - one of the argument mode flags
Returns:
the newly-created NamedValue object

item

public abstract NamedValue item(int index)
                         throws Bounds
Retrieves the NamedValue object at the given index.
Parameters:
index - the index of the desired NamedValue object, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.
Returns:
the NamedValue object at the given index
Throws:
Bounds - if the index is greater than or equal to number of NamedValue objects

remove

public abstract void remove(int index)
                     throws Bounds
Removes the NamedValue object at the given index. Note that the indices of all NamedValue objects following the one removed are shifted down by one.
Parameters:
index - the index of the NamedValue object to be removed, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.
Throws:
Bounds - if the index is greater than or equal to number of NamedValue objects in the list
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ObjectHelper

java.lang.Object
  |
  +--org.omg.CORBA.ObjectHelper
public abstract class ObjectHelper
extends Object

Constructor Summary
ObjectHelper()
Method Summary
static Object | extract(Any a)
static String | id()
static void | insert(Any a, Object that)
static Object | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Object value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ObjectHelper

public ObjectHelper()
Method Detail

insert

public static void insert(Any a,
                          Object that)

extract

public static Object extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Object read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Object value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ObjectHolder

java.lang.Object
  |
  +--org.omg.CORBA.ObjectHolder
All Implemented Interfaces:
Streamable
public final class ObjectHolder
extends Object
implements Streamable

A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object). It is usually used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has a CORBA Object reference as an "out" or "inout" parameter, the programmer must pass an instance of ObjectHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myObjectHolder is an instance of ObjectHolder, the value stored in its value field can be accessed with myObjectHolder.value.

Since:
JDK1.2

Field Summary
 Object value
The Object value held by this ObjectHolder object.
Constructor Summary
ObjectHolder()
Constructs a new ObjectHolder object with its value field initialized to null.
ObjectHolder(Object initial)
Constructs a new ObjectHolder object with its value field initialized to the given Object.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
TypeCode | _type() Returns the TypeCode corresponding to the value held in this ObjectHolder object
void | _write(OutputStream output) Marshals to output the value in this ObjectHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Object value
The Object value held by this ObjectHolder object.
Constructor Detail

ObjectHolder

public ObjectHolder()
Constructs a new ObjectHolder object with its value field initialized to null.

ObjectHolder

public ObjectHolder(Object initial)
Constructs a new ObjectHolder object with its value field initialized to the given Object.
Parameters:
initial - the Object with which to initialize the value field of the newly-created ObjectHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire.

_write

public void _write(OutputStream output)
Marshals to output the value in this ObjectHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data.

_type

public TypeCode _type()
Returns the TypeCode corresponding to the value held in this ObjectHolder object
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this ObjectHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OBJECT_NOT_EXIST

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class OBJECT_NOT_EXIST

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.OBJECT_NOT_EXIST
All Implemented Interfaces:
Serializable
public final class OBJECT_NOT_EXIST
extends SystemException

The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
OBJECT_NOT_EXIST()
Constructs an OBJECT_NOT_EXIST exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
OBJECT_NOT_EXIST(int minor, CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
OBJECT_NOT_EXIST(String s)
Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJECT_NOT_EXIST(String s, int minor, CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OBJECT_NOT_EXIST

public OBJECT_NOT_EXIST()
Constructs an OBJECT_NOT_EXIST exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

OBJECT_NOT_EXIST

public OBJECT_NOT_EXIST(String s)
Constructs an OBJECT_NOT_EXIST exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

OBJECT_NOT_EXIST

public OBJECT_NOT_EXIST(int minor,
                        CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

OBJECT_NOT_EXIST

public OBJECT_NOT_EXIST(String s,
                        int minor,
                        CompletionStatus completed)
Constructs an OBJECT_NOT_EXIST exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OBJ_ADAPTER

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class OBJ_ADAPTER

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.OBJ_ADAPTER
All Implemented Interfaces:
Serializable
public final class OBJ_ADAPTER
extends SystemException

The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

Since:
JDK1.2
See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
OBJ_ADAPTER()
Constructs an OBJ_ADAPTER exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
OBJ_ADAPTER(int minor, CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
OBJ_ADAPTER(String s)
Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
OBJ_ADAPTER(String s, int minor, CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OBJ_ADAPTER

public OBJ_ADAPTER()
Constructs an OBJ_ADAPTER exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

OBJ_ADAPTER

public OBJ_ADAPTER(String s)
Constructs an OBJ_ADAPTER exception with the specified description, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a description message

OBJ_ADAPTER

public OBJ_ADAPTER(int minor,
                   CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

OBJ_ADAPTER

public OBJ_ADAPTER(String s,
                   int minor,
                   CompletionStatus completed)
Constructs an OBJ_ADAPTER exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OctetSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class OctetSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.OctetSeqHelper
public final class OctetSeqHelper
extends Object

org/omg/CORBA/OctetSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
OctetSeqHelper()
Method Summary
static byte[] | extract(Any a)
static String | id()
static void | insert(Any a, byte[] that)
static byte[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, byte[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OctetSeqHelper

public OctetSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          byte[] that)

extract

public static byte[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static byte[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         byte[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OctetSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class OctetSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.OctetSeqHolder
All Implemented Interfaces:
Streamable
public final class OctetSeqHolder
extends Object
implements Streamable

org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 byte[] value
Constructor Summary
OctetSeqHolder()
OctetSeqHolder(byte[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public byte[] value
Constructor Detail

OctetSeqHolder

public OctetSeqHolder()

OctetSeqHolder

public OctetSeqHolder(byte[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OMGVMCID

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface OMGVMCID

public interface OMGVMCID

The vendor minor code ID reserved for OMG. Minor codes for the standard exceptions are prefaced by the VMCID assigned to OMG, defined as the constant OMGVMCID, which, like all VMCIDs, occupies the high order 20 bits.

Field Summary
static int value
The vendor minor code ID reserved for OMG.

Field Detail

value

public static final int value
The vendor minor code ID reserved for OMG. This value is or'd with the high order 20 bits of the minor code to produce the minor value in a system exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ORB

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ORB

java.lang.Object
  |
  +--org.omg.CORBA.ORB
Direct Known Subclasses:
ORB
public abstract class ORB
extends Object

A class providing APIs for the CORBA Object Request Broker features. The ORB class also provides "pluggable ORB implementation" APIs that allow another vendor's ORB implementation to be used.

An ORB makes it possible for CORBA objects to communicate with each other by connecting objects making requests (clients) with objects servicing requests (servers).

The ORB class, which encapsulates generic CORBA functionality, does the following: (Note that items 5 and 6, which include most of the methods in the class ORB, are typically used with the Dynamic Invocation Interface (DII) and the Dynamic Skeleton Interface (DSI). These interfaces may be used by a developer directly, but most commonly they are used by the ORB internally and are not seen by the general programmer.)

  1. initializes the ORB implementation by supplying values for predefined properties and environmental parameters
  2. obtains initial object references to services such as the NameService using the method resolve_initial_references
  3. converts object references to strings and back
  4. connects the ORB to a servant (an instance of a CORBA object implementation) and disconnects the ORB from a servant
  5. creates objects such as
    • TypeCode
    • Any
    • NamedValue
    • Context
    • Environment
    • lists (such as NVList) containing these objects
  6. sends multiple messages in the DII

The ORB class can be used to obtain references to objects implemented anywhere on the network.

An application or applet gains access to the CORBA environment by initializing itself into an ORB using one of three init methods. Two of the three methods use the properties (associations of a name with a value) shown in the table below.
Standard Java CORBA Properties:
Property Name | Property Value
org.omg.CORBA.ORBClass | class name of an ORB implementation
org.omg.CORBA.ORBSingletonClass | class name of the ORB returned by init()

These properties allow a different vendor's ORB implementation to be "plugged in."

When an ORB instance is being created, the class name of the ORB implementation is located using the following standard search order:

  1. check in Applet parameter or application string array, if any
  2. check in properties parameter, if any
  3. check in the System properties
  4. check in the orb.properties file located in the java.home/lib directory
  5. fall back on a hardcoded default behavior (use the Java IDL implementation)

Note that Java IDL provides a default implementation for the fully-functional ORB and for the Singleton ORB. When the method init is given no parameters, the default Singleton ORB is returned. When the method init is given parameters but no ORB class is specified, the Java IDL ORB implementation is returned.

The following code fragment creates an ORB object initialized with the default ORB Singleton. This ORB has a restricted implementation to prevent malicious applets from doing anything beyond creating typecodes. It is called a singleton because there is only one instance for an entire virtual machine.

    ORB orb = ORB.init();

The following code fragment creates an ORB object for an application. The parameter args represents the arguments supplied to the application's main method. Since the property specifies the ORB class to be "SomeORBImplementation", the new ORB will be initialized with that ORB implementation. If p had been null, and the arguments had not specified an ORB class, the new ORB would have been initialized with the default Java IDL implementation.

    Properties p = new Properties();
    p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation");
    ORB orb = ORB.init(args, p);

The following code fragment creates an ORB object for the applet supplied as the first parameter. If the given applet does not specify an ORB class, the new ORB will be initialized with the default Java IDL implementation.

    ORB orb = ORB.init(myApplet, null);

An application or applet can be initialized in one or more ORBs. ORB initialization is a bootstrap call into the CORBA world.

Since:
JDK1.2

Constructor Summary
ORB()
Method Summary
void | connect(Object obj) Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.
TypeCode | create_abstract_interface_tc(String id, String name) Create a TypeCode object for an IDL abstract interface.
abstract TypeCode | create_alias_tc(String id, String name, TypeCode original_type) Creates a TypeCode object representing an IDL alias (typedef).
abstract Any | create_any() Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
abstract TypeCode | create_array_tc(int length, TypeCode element_type) Creates a TypeCode object representing an IDL array.
DynAny | create_basic_dyn_any(TypeCode type) See package comments regarding unimplemented features.
abstract ContextList | create_context_list() Creates an empty ContextList object.
DynAny | create_dyn_any(Any value) See package comments regarding unimplemented features.
DynArray | create_dyn_array(TypeCode type) See package comments regarding unimplemented features.
DynEnum | create_dyn_enum(TypeCode type) See package comments regarding unimplemented features.
DynSequence | create_dyn_sequence(TypeCode type) See package comments regarding unimplemented features.
DynStruct | create_dyn_struct(TypeCode type) See package comments regarding unimplemented features.
DynUnion | create_dyn_union(TypeCode type) See package comments regarding unimplemented features.
abstract TypeCode | create_enum_tc(String id, String name, String[] members) Creates a TypeCode object representing an IDL enum.
abstract Environment | create_environment() Creates an Environment object.
abstract ExceptionList | create_exception_list() Creates an empty ExceptionList object.
abstract TypeCode | create_exception_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL exception.
TypeCode | create_fixed_tc(short digits, short scale) Create a TypeCode object for an IDL fixed type.
abstract TypeCode | create_interface_tc(String id, String name) Creates a TypeCode object representing an IDL interface.
abstract NVList | create_list(int count) Allocates an NVList with (probably) enough space for the specified number of NamedValue objects.
abstract NamedValue | create_named_value(String s, Any any, int flags) Creates a NamedValue object using the given name, value, and argument mode flags.
TypeCode | create_native_tc(String id, String name) Create a TypeCode object for an IDL native type.
NVList | create_operation_list(Object oper) Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object.
abstract OutputStream | create_output_stream() Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
Policy | create_policy(int type, Any val) See package comments regarding unimplemented features.
abstract TypeCode | create_recursive_sequence_tc(int bound, int offset) Deprecated.
TypeCode | create_recursive_tc(String id) Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.
abstract TypeCode | create_sequence_tc(int bound, TypeCode element_type) Creates a TypeCode object representing an IDL sequence.
abstract TypeCode | create_string_tc(int bound) Creates a TypeCode object representing a bounded IDL string.
abstract TypeCode | create_struct_tc(String id, String name, StructMember[] members) Creates a TypeCode object representing an IDL struct.
abstract TypeCode | create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Creates a TypeCode object representing an IDL union.
TypeCode | create_value_box_tc(String id, String name, TypeCode boxed_type) Creates a TypeCode object for an IDL value box.
TypeCode | create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create a TypeCode object for an IDL value type.
abstract TypeCode | create_wstring_tc(int bound) Creates a TypeCode object representing a bounded IDL wstring (wide string).
void | destroy() Destroys the ORB instance and frees all the resources under an ORB instance.
void | disconnect(Object obj) Disconnects the given servant object from the ORB.
Current | get_current() Deprecated. use resolve_initial_references.
abstract Context | get_default_context() Gets the default Context object.
abstract Request | get_next_response() Gets the next Request instance for which a response has been received.
abstract TypeCode | get_primitive_tc(TCKind tcKind) Retrieves the TypeCode object that represents the given primitive IDL type.
boolean | get_service_information(short service_type, ServiceInformationHolder service_info) See package comments regarding unimplemented features.
static ORB | init() Returns the ORB singleton object.
static ORB | init(Applet app, Properties props) Creates a new ORB instance for an applet.
static ORB | init(String[] args, Properties props) Creates a new ORB instance for a standalone application.
abstract String[] | list_initial_services() Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
abstract String | object_to_string(Object obj) Converts the given CORBA object reference to a string.
void | perform_work() Performs an implementation-dependent unit of work if called by the main thread.
abstract boolean | poll_next_response() Finds out if any of the deferred (asynchronous) invocations have a response yet.
abstract Object | resolve_initial_references(String object_name) Resolves a specific object reference from the set of available initial service names.
void | run() This operation returns when the ORB has shutdown.
abstract void | send_multiple_requests_deferred(Request[] req) Sends multiple dynamic (DII) requests asynchronously.
abstract void | send_multiple_requests_oneway(Request[] req) Sends multiple dynamic (DII) requests asynchronously without expecting any responses.
protected abstract void | set_parameters(Applet app, Properties props) Allows the ORB implementation to be initialized with the given applet and parameters.
protected abstract void | set_parameters(String[] args, Properties props) Allows the ORB implementation to be initialized with the given parameters and properties.
void | shutdown(boolean wait_for_completion) Instructs the ORB to shut down, which causes all object adapters to shut down.
abstract Object | string_to_object(String str) Converts a string produced by the method object_to_string back to a CORBA object reference.
boolean | work_pending() Returns true if the ORB needs the main thread to perform some work, and false if the ORB does not need the main thread.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ORB

public ORB()
Method Detail

init

public static ORB init()
Returns the ORB singleton object. This method always returns the same ORB instance, which is an instance of the class described by the org.omg.CORBA.ORBSingletonClass system property.

This no-argument version of the method init is used primarily as a factory for TypeCode objects, which are used by Helper classes to implement the method type. It is also used to create Any objects that are used to describe union labels (as part of creating a TypeCode object for a union).

This method is not intended to be used by applets, and in the event that it is called in an applet environment, the ORB it returns is restricted so that it can be used only as a factory for TypeCode objects. Any TypeCode objects it produces can be safely shared among untrusted applets.

If an ORB is created using this method from an applet, a system exception will be thrown if methods other than those for creating TypeCode objects are invoked.

Returns:
the singleton ORB

init

public static ORB init(String[] args,
                       Properties props)
Creates a new ORB instance for a standalone application. This method may be called from applications only and returns a new fully functional ORB object each time it is called.
Parameters:
args - command-line arguments for the application's main method; may be null
props - application-specific properties; may be null
Returns:
the newly-created ORB instance

init

public static ORB init(Applet app,
                       Properties props)
Creates a new ORB instance for an applet. This method may be called from applets only and returns a new fully-functional ORB object each time it is called.
Parameters:
app - the applet; may be null
props - applet-specific properties; may be null
Returns:
the newly-created ORB instance

set_parameters

protected abstract void set_parameters(String[] args,
                                       Properties props)
Allows the ORB implementation to be initialized with the given parameters and properties. This method, used in applications only, is implemented by subclass ORB implementations and called by the appropriate init method to pass in its parameters.
Parameters:
args - command-line arguments for the application's main method; may be null
props - application-specific properties; may be null

set_parameters

protected abstract void set_parameters(Applet app,
                                       Properties props)
Allows the ORB implementation to be initialized with the given applet and parameters. This method, used in applets only, is implemented by subclass ORB implementations and called by the appropriate init method to pass in its parameters.
Parameters:
app - the applet; may be null
props - applet-specific properties; may be null

connect

public void connect(Object obj)
Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB. The servant class must extend the ImplBase class corresponding to the interface that is supported by the server. The servant must thus be a CORBA object reference, and inherit from org.omg.CORBA.Object. Servants created by the user can start receiving remote invocations after the method connect has been called. A servant may also be automatically and implicitly connected to the ORB if it is passed as an IDL parameter in an IDL method invocation on a non-local object, that is, if the servant object has to be marshalled and sent outside of the process address space.

Calling the method connect has no effect when the servant object is already connected to the ORB.

Deprecated by the OMG in favor of the Portable Object Adapter APIs.

Parameters:
obj - the servant object reference
See Also:
CORBA package comments for unimplemented features

destroy

public void destroy()
Destroys the ORB instance and frees all the resources under an ORB instance. The method is not implemented, The API is provided to conform with the OMG spec.

disconnect

public void disconnect(Object obj)
Disconnects the given servant object from the ORB. After this method returns, the ORB will reject incoming remote requests for the disconnected servant and will send the exception org.omg.CORBA.OBJECT_NOT_EXIST back to the remote client. Thus the object appears to be destroyed from the point of view of remote clients. Note, however, that local requests issued using the servant directly do not pass through the ORB; hence, they will continue to be processed by the servant.

Calling the method disconnect has no effect if the servant is not connected to the ORB.

Deprecated by the OMG in favor of the Portable Object Adapter APIs.

Parameters:
obj - The servant object to be disconnected from the ORB
See Also:
CORBA package comments for unimplemented features

list_initial_services

public abstract String[] list_initial_services()
Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository".
Returns:
an array of String objects that represent the object references for CORBA services that are initially available with this ORB

resolve_initial_references

public abstract Object resolve_initial_references(String object_name)
                                           throws InvalidName
Resolves a specific object reference from the set of available initial service names.
Parameters:
object_name - the name of the initial service as a string
Returns:
the object reference associated with the given name
Throws:
InvalidName - if the given name is not associated with a known service

object_to_string

public abstract String object_to_string(Object obj)
Converts the given CORBA object reference to a string. Note that the format of this string is predefined by IIOP, allowing strings generated by a different ORB to be converted back into an object reference.

The resulting String object may be stored or communicated in any way that a String object can be manipulated.

Parameters:
obj - the object reference to stringify
Returns:
the string representing the object reference

string_to_object

public abstract Object string_to_object(String str)
Converts a string produced by the method object_to_string back to a CORBA object reference.
Parameters:
str - the string to be converted back to an object reference. It must be the result of converting an object reference to a string using the method object_to_string.
Returns:
the object reference

create_list

public abstract NVList create_list(int count)
Allocates an NVList with (probably) enough space for the specified number of NamedValue objects. Note that the specified size is only a hint to help with storage allocation and does not imply the maximum size of the list.
Parameters:
count - suggested number of NamedValue objects for which to allocate space
Returns:
the newly-created NVList
See Also:
NVList

create_operation_list

public NVList create_operation_list(Object oper)
Creates an NVList initialized with argument descriptions for the operation described in the given OperationDef object. This OperationDef object is obtained from an Interface Repository. The arguments in the returned NVList object are in the same order as in the original IDL operation definition, which makes it possible for the list to be used in dynamic invocation requests.
Parameters:
oper - the OperationDef object to use to create the list
Returns:
a newly-created NVList object containing descriptions of the arguments to the method described in the given OperationDef object
See Also:
NVList

create_named_value

public abstract NamedValue create_named_value(String s,
                                              Any any,
                                              int flags)
Creates a NamedValue object using the given name, value, and argument mode flags.

A NamedValue object serves as (1) a parameter or return value or (2) a context property. It may be used by itself or as an element in an NVList object.

Parameters:
s - the name of the NamedValue object
any - the Any value to be inserted into the NamedValue object
flags - the argument mode flags for the NamedValue: one of ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
Returns:
the newly-created NamedValue object
See Also:
NamedValue

create_exception_list

public abstract ExceptionList create_exception_list()
Creates an empty ExceptionList object.
Returns:
the newly-created ExceptionList object

create_context_list

public abstract ContextList create_context_list()
Creates an empty ContextList object.
Returns:
the newly-created ContextList object
See Also:
ContextList, Context

get_default_context

public abstract Context get_default_context()
Gets the default Context object.
Returns:
the default Context object
See Also:
Context

create_environment

public abstract Environment create_environment()
Creates an Environment object.
Returns:
the newly-created Environment object
See Also:
Environment

create_output_stream

public abstract OutputStream create_output_stream()
Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
Returns:
the newly-created org.omg.CORBA.portable.OutputStream object

send_multiple_requests_oneway

public abstract void send_multiple_requests_oneway(Request[] req)
Sends multiple dynamic (DII) requests asynchronously without expecting any responses. Note that oneway invocations are not guaranteed to reach the server.
Parameters:
req - an array of request objects

send_multiple_requests_deferred

public abstract void send_multiple_requests_deferred(Request[] req)
Sends multiple dynamic (DII) requests asynchronously.
Parameters:
req - an array of Request objects

poll_next_response

public abstract boolean poll_next_response()
Finds out if any of the deferred (asynchronous) invocations have a response yet.
Returns:
true if there is a response available; false otherwise

get_next_response

public abstract Request get_next_response()
                                   throws WrongTransaction
Gets the next Request instance for which a response has been received.
Returns:
the next Request object ready with a response
Throws:
WrongTransaction - if the method get_next_response is called from a transaction scope different from the one from which the original request was sent. See the OMG Transaction Service specification for details.

get_primitive_tc

public abstract TypeCode get_primitive_tc(TCKind tcKind)
Retrieves the TypeCode object that represents the given primitive IDL type.
Parameters:
tcKind - the TCKind instance corresponding to the desired primitive type
Returns:
the requested TypeCode object

create_struct_tc

public abstract TypeCode create_struct_tc(String id,
                                          String name,
                                          StructMember[] members)
Creates a TypeCode object representing an IDL struct. The TypeCode object is initialized with the given id, name, and members.
Parameters:
id - the repository id for the struct
name - the name of the struct
members - an array describing the members of the struct
Returns:
a newly-created TypeCode object describing an IDL struct

create_union_tc

public abstract TypeCode create_union_tc(String id,
                                         String name,
                                         TypeCode discriminator_type,
                                         UnionMember[] members)
Creates a TypeCode object representing an IDL union. The TypeCode object is initialized with the given id, name, discriminator type, and members.
Parameters:
id - the repository id of the union
name - the name of the union
discriminator_type - the type of the union discriminator
members - an array describing the members of the union
Returns:
a newly-created TypeCode object describing an IDL union

create_enum_tc

public abstract TypeCode create_enum_tc(String id,
                                        String name,
                                        String[] members)
Creates a TypeCode object representing an IDL enum. The TypeCode object is initialized with the given id, name, and members.
Parameters:
id - the repository id for the enum
name - the name for the enum
members - an array describing the members of the enum
Returns:
a newly-created TypeCode object describing an IDL enum

create_alias_tc

public abstract TypeCode create_alias_tc(String id,
                                         String name,
                                         TypeCode original_type)
Creates a TypeCode object representing an IDL alias (typedef). The TypeCode object is initialized with the given id, name, and original type.
Parameters:
id - the repository id for the alias
name - the name for the alias
original_type - the TypeCode object describing the original type for which this is an alias
Returns:
a newly-created TypeCode object describing an IDL alias

create_exception_tc

public abstract TypeCode create_exception_tc(String id,
                                             String name,
                                             StructMember[] members)
Creates a TypeCode object representing an IDL exception. The TypeCode object is initialized with the given id, name, and members.
Parameters:
id - the repository id for the exception
name - the name for the exception
members - an array describing the members of the exception
Returns:
a newly-created TypeCode object describing an IDL exception

create_interface_tc

public abstract TypeCode create_interface_tc(String id,
                                             String name)
Creates a TypeCode object representing an IDL interface. The TypeCode object is initialized with the given id and name.
Parameters:
id - the repository id for the interface
name - the name for the interface
Returns:
a newly-created TypeCode object describing an IDL interface

create_string_tc

public abstract TypeCode create_string_tc(int bound)
Creates a TypeCode object representing a bounded IDL string. The TypeCode object is initialized with the given bound, which represents the maximum length of the string. Zero indicates that the string described by this type code is unbounded.
Parameters:
bound - the bound for the string; cannot be negative
Returns:
a newly-created TypeCode object describing a bounded IDL string
Throws:
BAD_PARAM - if bound is a negative value

create_wstring_tc

public abstract TypeCode create_wstring_tc(int bound)
Creates a TypeCode object representing a bounded IDL wstring (wide string). The TypeCode object is initialized with the given bound, which represents the maximum length of the wide string. Zero indicates that the string described by this type code is unbounded.
Parameters:
bound - the bound for the wstring; cannot be negative
Returns:
a newly-created TypeCode object describing a bounded IDL wstring
Throws:
BAD_PARAM - if bound is a negative value

create_sequence_tc

public abstract TypeCode create_sequence_tc(int bound,
                                            TypeCode element_type)
Creates a TypeCode object representing an IDL sequence. The TypeCode object is initialized with the given bound and element type.
Parameters:
bound - the bound for the sequence
element_type - the TypeCode object describing the elements contained in the sequence
Returns:
a newly-created TypeCode object describing an IDL sequence

create_recursive_sequence_tc

public abstract TypeCode create_recursive_sequence_tc(int bound,
                                                      int offset)
Deprecated.

Creates a TypeCode object representing a a recursive IDL sequence.

For the IDL struct Foo in following code fragment, the offset parameter for creating its sequence would be 1:

    Struct Foo {
        long value;
        Sequence <Foo> Chain;
    };
Parameters:
bound - the bound for the sequence
offset - the index to the enclosing TypeCode object that describes the elements of this sequence
Returns:
a newly-created TypeCode object describing a recursive sequence

create_array_tc

public abstract TypeCode create_array_tc(int length,
                                         TypeCode element_type)
Creates a TypeCode object representing an IDL array. The TypeCode object is initialized with the given length and element type.
Parameters:
length - the length of the array
element_type - a TypeCode object describing the type of element contained in the array
Returns:
a newly-created TypeCode object describing an IDL array

create_native_tc

public TypeCode create_native_tc(String id,
                                 String name)
Create a TypeCode object for an IDL native type.
Parameters:
id - the logical id for the native type.
name - the name of the native type.
Returns:
the requested TypeCode.
See Also:
CORBA package comments for unimplemented features

create_abstract_interface_tc

public TypeCode create_abstract_interface_tc(String id,
                                             String name)
Create a TypeCode object for an IDL abstract interface.
Parameters:
id - the logical id for the abstract interface type.
name - the name of the abstract interface type.
Returns:
the requested TypeCode.
See Also:
CORBA package comments for unimplemented features

create_fixed_tc

public TypeCode create_fixed_tc(short digits,
                                short scale)
Create a TypeCode object for an IDL fixed type.
Parameters:
digits - specifies the total number of decimal digits in the number and must be from 1 to 31 inclusive.
scale - specifies the position of the decimal point.
Returns:
the requested TypeCode.
See Also:
CORBA package comments for unimplemented features

create_value_tc

public TypeCode create_value_tc(String id,
                                String name,
                                short type_modifier,
                                TypeCode concrete_base,
                                ValueMember[] members)
Create a TypeCode object for an IDL value type. The concrete_base parameter is the TypeCode for the immediate concrete valuetype base of the valuetype for which the TypeCode is being created. It may be null if the valuetype does not have a concrete base.
Parameters:
id - the logical id for the value type.
name - the name of the value type.
type_modifier - one of the value type modifier constants: VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE
concrete_base - a TypeCode object describing the concrete valuetype base
members - an array containing the members of the value type
Returns:
the requested TypeCode
See Also:
CORBA package comments for unimplemented features

create_recursive_tc

public TypeCode create_recursive_tc(String id)
Create a recursive TypeCode object which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion. The id parameter specifies the repository id of the type for which the recursive TypeCode is serving as a placeholder. Once the recursive TypeCode has been properly embedded in the enclosing TypeCode which corresponds to the specified repository id, it will function as a normal TypeCode. Invoking operations on the recursive TypeCode before it has been embedded in the enclosing TypeCode will result in undefined behavior.

For example, the following IDL type declarations contain recursion:

    Struct Foo {
        long value;
        Sequence <Foo> Chain;
    };
    Struct Bar {
        public Bar member;
    };

To create a TypeCode for struct Bar, you would invoke the TypeCode creation operations as shown below:

 String barID = "IDL:Bar:1.0";
 TypeCode recursiveTC = orb.create_recursive_tc(barID);
 StructMember[] members = { new StructMember("member", recursiveTC, null) };
 TypeCode structBarTC = orb.create_struct_tc(barID, "Bar", members);
Parameters:
id - the logical id of the referenced type
Returns:
the requested TypeCode
See Also:
CORBA package comments for unimplemented features

create_value_box_tc

public TypeCode create_value_box_tc(String id,
                                    String name,
                                    TypeCode boxed_type)
Creates a TypeCode object for an IDL value box.
Parameters:
id - the logical id for the value type
name - the name of the value type
boxed_type - the TypeCode for the type
Returns:
the requested TypeCode
See Also:
CORBA package comments for unimplemented features

create_any

public abstract Any create_any()
Creates an IDL Any object initialized to contain a Typecode object whose kind field is set to TCKind.tc_null.
Returns:
a newly-created Any object

get_current

public Current get_current()
Deprecated. use resolve_initial_references.

Retrieves a Current object. The Current interface is used to manage thread-specific information for use by services such as transactions and security.
Returns:
a newly-created Current object
See Also:
CORBA package comments for unimplemented features, CORBA package comments for unimplemented features

run

public void run()
This operation returns when the ORB has shutdown. If called by the main thread, it enables the ORB to perform work using the main thread. Otherwise it simply waits until the ORB has shutdown.
See Also:
CORBA package comments for unimplemented features

shutdown

public void shutdown(boolean wait_for_completion)
Instructs the ORB to shut down, which causes all object adapters to shut down. If the wait_for_completion parameter is true, this operation blocks until all ORB processing (including processing of currently executing requests, object deactivation, and other object adapter operations) has completed. The ORB.run method will return after shutdown has been called.
Parameters:
wait_for_completion - true to indicate that the ORB should complete processing before shutting down; false to indicate that the ORB should shut down immediately
See Also:
CORBA package comments for unimplemented features

work_pending

public boolean work_pending()
Returns true if the ORB needs the main thread to perform some work, and false if the ORB does not need the main thread.
Returns:
true if there is work pending, meaning that the ORB needs the main thread to perform some work; false if there is no work pending and thus the ORB does not need the main thread
See Also:
CORBA package comments for unimplemented features

perform_work

public void perform_work()
Performs an implementation-dependent unit of work if called by the main thread. Otherwise it does nothing. The methods work_pending and perform_work can be used in conjunction to implement a simple polling loop that multiplexes the main thread among the ORB and other activities.
See Also:
CORBA package comments for unimplemented features

get_service_information

public boolean get_service_information(short service_type,
                                       ServiceInformationHolder service_info)
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_any

public DynAny create_dyn_any(Any value)
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_basic_dyn_any

public DynAny create_basic_dyn_any(TypeCode type)
                            throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_struct

public DynStruct create_dyn_struct(TypeCode type)
                            throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_sequence

public DynSequence create_dyn_sequence(TypeCode type)
                                throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_array

public DynArray create_dyn_array(TypeCode type)
                          throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_union

public DynUnion create_dyn_union(TypeCode type)
                          throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_dyn_enum

public DynEnum create_dyn_enum(TypeCode type)
                        throws InconsistentTypeCode
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features

create_policy

public Policy create_policy(int type,
                            Any val)
                     throws PolicyError
See package comments regarding unimplemented features.
See Also:
CORBA package comments for unimplemented features
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA.ORBPackage Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA.ORBPackage

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.ORBPackage.InconsistentTypeCode
          • class org.omg.CORBA.ORBPackage.InvalidName
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CORBA.ORBPackage

Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.

See:
Description

Exception Summary
InconsistentTypeCode | InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
InvalidName | The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Package org.omg.CORBA.ORBPackage Description

Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.

Related Documentation

For an overview, please see:
  • comments on the CORBA package

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CORBA.ORBPackage

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA.ORBPackage

Packages that use org.omg.CORBA.ORBPackage
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Classes in org.omg.CORBA.ORBPackage used by org.omg.CORBA
InconsistentTypeCode
InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.
InvalidName
The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ORBPackage.InconsistentTypeCode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ORBPackage.InconsistentTypeCode

Packages that use InconsistentTypeCode
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of InconsistentTypeCode in org.omg.CORBA

Methods in org.omg.CORBA that throw InconsistentTypeCode
DynAny | ORB.create_basic_dyn_any(TypeCode type) See package comments regarding unimplemented features.
DynStruct | ORB.create_dyn_struct(TypeCode type) See package comments regarding unimplemented features.
DynSequence | ORB.create_dyn_sequence(TypeCode type) See package comments regarding unimplemented features.
DynArray | ORB.create_dyn_array(TypeCode type) See package comments regarding unimplemented features.
DynUnion | ORB.create_dyn_union(TypeCode type) See package comments regarding unimplemented features.
DynEnum | ORB.create_dyn_enum(TypeCode type) See package comments regarding unimplemented features.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.ORBPackage.InvalidName

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.ORBPackage.InvalidName

Packages that use InvalidName
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of InvalidName in org.omg.CORBA

Methods in org.omg.CORBA that throw InvalidName
abstract  Object ORB.resolve_initial_references(String object_name)
Resolves a specific object reference from the set of available initial service names.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


InconsistentTypeCode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.ORBPackage
Class InconsistentTypeCode

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.ORBPackage.InconsistentTypeCode
All Implemented Interfaces:
IDLEntity, Serializable
public final class InconsistentTypeCode
extends UserException

InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.

See Also:
Serialized Form

Constructor Summary
InconsistentTypeCode()
Constructs an InconsistentTypeCode user exception with no reason message.
InconsistentTypeCode(String reason)
Constructs an InconsistentTypeCode user exception with the specified reason message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InconsistentTypeCode

public InconsistentTypeCode()
Constructs an InconsistentTypeCode user exception with no reason message.

InconsistentTypeCode

public InconsistentTypeCode(String reason)
Constructs an InconsistentTypeCode user exception with the specified reason message.
Parameters:
reason - The String containing a reason message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InvalidName

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.ORBPackage
Class InvalidName

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.ORBPackage.InvalidName
All Implemented Interfaces:
IDLEntity, Serializable
public class InvalidName
extends UserException

The InvalidName exception is raised when ORB.resolve_initial_references is passed a name for which there is no initial reference.

Since:
JDK1.2
See Also:
ORB.resolve_initial_references(String), Serialized Form

Constructor Summary
InvalidName()
Constructs an InvalidName exception with no reason message.
InvalidName(String reason)
Constructs an InvalidName exception with the specified reason message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidName

public InvalidName()
Constructs an InvalidName exception with no reason message.

InvalidName

public InvalidName(String reason)
Constructs an InvalidName exception with the specified reason message.
Parameters:
reason - the String containing a reason message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package org.omg.CORBA

Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

See:
Description

Interface Summary
ARG_IN | Signifies an "input" argument to an invocation, meaning that the argument is being passed from the client to the server.
ARG_INOUT | Signifies an argument used for both input and output in an invocation, meaning that the argument is being passed from the client to the server and then back from the server to the client.
ARG_OUT | A constant that signifies an "output" argument to an invocation, meaning that the argument is being passed from the server to the client.
BAD_POLICY | BAD_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
BAD_POLICY_TYPE | BAD_POLICY_TYPE is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
BAD_POLICY_VALUE | Contains the value used to indicate a policy value that is incorrect for a valid policy type in a call to the create_policy method defined in the ORB class.
CTX_RESTRICT_SCOPE | A flag that can be used as the second parameter to the method Context.get_values to restrict the search scope.
Current | org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
CurrentOperations | org/omg/CORBA/CurrentOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
CustomMarshal | The CustomMarshal is an abstract value type that is meant to be used by the ORB, not the user.
DataInputStream | Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
DataOutputStream | Defines the methods used to write primitive data types to output streams for marshalling custom value types.
DomainManager | The DomainManager has associated with it the policy objects for a particular domain.
DomainManagerOperations | The DomainManager has associated with it the policy objects for a particular domain.
DynAny | org.omg.CORBA.Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynArray | The DynArray interface represents a DynAny object which is associated with an array.
DynEnum | The DynEnum interface represents a DynAny object which is associated with an IDL enum.
DynFixed | Represents a DynAny object that is associated with an IDL fixed type.
DynSequence | The representation of a DynAny object that is associated with an IDL sequence.
DynStruct | The representation of a DynAny object that is associated with an IDL struct.
DynUnion | The DynUnion interface represents a DynAny object that is associated with an IDL union.
DynValue | The representation of a DynAny object that is associated with an IDL value type.
IDLType | An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
IDLTypeOperations | This interface must be implemented by all IDLType objects.
IRObject | An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
IRObjectOperations | This is the Operations interface for the mapping from IRObject.
Object | The definition for a CORBA object reference.
OMGVMCID | The vendor minor code ID reserved for OMG.
Policy | org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyOperations | org/omg/CORBA/PolicyOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PRIVATE_MEMBER | PRIVATE_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type.
PUBLIC_MEMBER | PUBLIC_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type.
Repository | This is the interface which defines the interface repository.
UNSUPPORTED_POLICY | UNSUPPORTED_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
UNSUPPORTED_POLICY_VALUE | UNSUPPORTED_POLICY_VALUE is one of the PolicyErrorCodes which would be filled in the PolicyError exception.
VM_ABSTRACT |
VM_CUSTOM | Defines the code used to represent a custom marshalled value type in a typecode.
VM_NONE | Defines the code used to represent the one of the values of a value type in a typecode.
VM_TRUNCATABLE | Defines the code used to represent a truncatable value type in a typecode.

Class Summary
_IDLTypeStub | org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
_PolicyStub | org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
Any | Serves as a container for any data that can be described in IDL or for any IDL primitive type.
AnyHolder | A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods.
AnySeqHelper | org/omg/CORBA/AnySeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
AnySeqHolder | org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
BooleanHolder | A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods.
BooleanSeqHelper | org/omg/CORBA/BooleanSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
BooleanSeqHolder | org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ByteHolder | A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods.
CharHolder | A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods.
CharSeqHelper | org/omg/CORBA/CharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
CharSeqHolder | org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
CompletionStatus | An object that indicates whether a method had completed running when a SystemException was thrown.
CompletionStatusHelper | org/omg/CORBA/CompletionStatusHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
Context | An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation.
ContextList | An object containing a modifiable list of String objects that represent property names.
CurrentHelper | org/omg/CORBA/CurrentHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
CurrentHolder | org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
DefinitionKind | The class that provides the constants used to identify the type of an Interface Repository object.
DefinitionKindHelper | org/omg/CORBA/DefinitionKindHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
DoubleHolder | A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods.
DoubleSeqHelper | org/omg/CORBA/DoubleSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
DoubleSeqHolder | org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
DynamicImplementation | The base class for all object implementations using the DSI.
Environment | A container (holder) for an exception that is used in Request operations to make exceptions available to the client.
ExceptionList | An object used in Request operations to describe the exceptions that can be thrown by a method.
FieldNameHelper | org/omg/CORBA/FieldNameHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
FixedHolder | FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal.
FloatHolder | A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods.
FloatSeqHelper | org/omg/CORBA/FloatSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
FloatSeqHolder | org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
IdentifierHelper | org/omg/CORBA/IdentifierHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:42 o'clock GMT+00:00
IDLTypeHelper | org/omg/CORBA/IDLTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
Initializer | This is the mapping for an IDL structure which specifies an initializer for a value type.
IntHolder | A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods.
LongHolder | A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods.
LongLongSeqHelper | org/omg/CORBA/LongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
LongLongSeqHolder | org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongSeqHelper | org/omg/CORBA/LongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
LongSeqHolder | org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
NamedValue | An object used in the DII and DSI to describe arguments and return values.
NameValuePair | The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
NameValuePairHelper | org/omg/CORBA/NameValuePairHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
NVList | A modifiable list containing NamedValue objects.
ObjectHelper |
ObjectHolder | A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object).
OctetSeqHelper | org/omg/CORBA/OctetSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
OctetSeqHolder | org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ORB | A class providing APIs for the CORBA Object Request Broker features.
PolicyHelper | org/omg/CORBA/PolicyHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyHolder | org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
PolicyListHelper | org/omg/CORBA/PolicyListHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
PolicyListHolder | org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
PolicyTypeHelper | org/omg/CORBA/PolicyTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
Principal | Deprecated. Deprecated by CORBA 2.2.
PrincipalHolder | Deprecated. Deprecated by CORBA 2.2.
RepositoryIdHelper | org/omg/CORBA/RepositoryIdHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
Request | An object containing the information necessary for invoking a method.
ServerRequest | An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI).
ServiceDetail | An object that represents an ORB service.
ServiceDetailHelper |
ServiceInformation | ServiceInformation is an IDL struct in the CORBA module.
ServiceInformationHelper |
ServiceInformationHolder | A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods.
SetOverrideType | The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
SetOverrideTypeHelper | org/omg/CORBA/SetOverrideTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00
ShortHolder | A Holder class for a short that is used to store "out" and "inout" parameters in IDL operations.
ShortSeqHelper | org/omg/CORBA/ShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ShortSeqHolder | org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
StringHolder | A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations.
StringValueHelper | org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00
StructMember | A description of a member of an IDL struct.
StructMemberHelper | org/omg/CORBA/StructMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
TCKind | The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object.
TypeCode | A container for information about a specific CORBA data type.
TypeCodeHolder | A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations.
ULongLongSeqHelper | org/omg/CORBA/ULongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
ULongLongSeqHolder | org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
ULongSeqHelper | org/omg/CORBA/ULongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ULongSeqHolder | org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
UnionMember | A description in the Interface Repository of a member of an IDL union.
UnionMemberHelper | org/omg/CORBA/UnionMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
UShortSeqHelper | org/omg/CORBA/UShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
UShortSeqHolder | org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
ValueBaseHelper |
ValueBaseHolder | A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods.
ValueMember | A description in the Interface Repository of a member of a value object.
ValueMemberHelper | org/omg/CORBA/ValueMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
VersionSpecHelper | org/omg/CORBA/VersionSpecHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00
VisibilityHelper | org/omg/CORBA/VisibilityHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00
WCharSeqHelper | org/omg/CORBA/WCharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
WCharSeqHolder | org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
WStringValueHelper | org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00

Exception Summary
BAD_CONTEXT | The CORBA BAD_CONTEXT exception, which is thrown when there is an error processing a context object.
BAD_INV_ORDER | The CORBA BAD_INV_ORDER exception, which is thrown when methods are called out of order.
BAD_OPERATION | The CORBA BAD_OPERATION exception, which is thrown when a method is invalid.
BAD_PARAM | The CORBA BAD_PARAM exception, which is thrown when an invalid parameter is passed to a method.
BAD_TYPECODE | The CORBA BAD_TYPECODE exception, which is thrown when the specified typecode is invalid.
Bounds | A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
COMM_FAILURE | The CORBA COMM_FAILURE exception, which is thrown when there is a communication failure.
DATA_CONVERSION | The CORBA DATA_CONVERSION exception, which is thrown when there is a data conversion error.
FREE_MEM | The CORBA FREE_MEM exception, which is thrown when the system is unable to free memory.
IMP_LIMIT | The CORBA IMP_LIMIT exception, which is thrown when the implementation limit has been violated.
INITIALIZE | The CORBA INITIALIZE exception, which is thrown when there is an ORB initialization error.
INTERNAL | The CORBA INTERNAL exception, which is thrown when there is an ORB internal error.
INTF_REPOS | The CORBA INTF_REPOS exception, which is thrown when there is an error accessing the interface repository.
INV_FLAG | The CORBA INV_FLAG exception, which is thrown when an invalid flag is specified.
INV_IDENT | The CORBA INV_IDENT exception, which is thrown when identifier syntax is invalid.
INV_OBJREF | The CORBA INV_OBJREF exception, which is thrown when an invalid object reference is specified.
INV_POLICY | The CORBA INV_POLICY standard exception, which is thrown when an invocation cannot be made because of an incompatibility between Policy overrides.
INVALID_TRANSACTION | The CORBA INVALID_TRANSACTION exception, which is thrown when there is a transaction error.
MARSHAL | The CORBA MARSHAL exception, which is thrown when the ORB has a problem marshalling or unmarshalling parameters.
NO_IMPLEMENT | The CORBA NO_IMPLEMENT exception, which is thrown when the implementation for a method is not available.
NO_MEMORY | The CORBA NO_MEMORY exception, which may be thrown by either the client or the server when there is not enough memory for a dynamic memory allocation.
NO_PERMISSION | The CORBA NO_PERMISSION exception, which is thrown if the client does not have permission to perform the request.
NO_RESOURCES | The CORBA NO_RESOURCES exception, which is thrown when either the client or the server does not have sufficient resources to perform the request.
NO_RESPONSE | The CORBA NO_RESPONSE exception, which is thrown when a response to the request is not yet available.
OBJ_ADAPTER | The CORBA OBJ_ADAPTER exception, which is thrown by the object adapter on the server to indicate some error.
OBJECT_NOT_EXIST | The CORBA OBJECT_NOT_EXIST exception, which is usually thrown from the server to indicate that the target object does not exist.
PERSIST_STORE | The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server.
PolicyError | An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
SystemException | The root class for all CORBA standard exceptions.
TRANSACTION_REQUIRED | The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction.
TRANSACTION_ROLLEDBACK | The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back.
TRANSIENT | The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried.
UNKNOWN | The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB.
UnknownUserException | A class that contains user exceptions returned by the server.
UserException | The root class for CORBA IDL-defined user exceptions.
WrongTransaction | The CORBA WrongTransaction user-defined exception.

Package org.omg.CORBA Description

Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

An ORB handles (or brokers) method invocations between a client and the method's implementation on a server. Because the client and server may be anywhere on a network, and because the invocation and implementation may be written in different programming languages, an ORB does a great deal of work behind the scenes to accomplish this communication.

What the General User Needs to Know

Most of what an ORB does is completely transparent to the user, and a major portion of the CORBA package consists of classes used by the ORB behind the scenes. The result is that most programmers will use only a small part of this package directly. In fact, most programmers will use only a few methods from the ORB class, some exceptions, and occasionally, a holder class.

ORB Methods

These are the ORB methods that a general user might invoke:
  • connect()
  • disconnect()
  • init()
  • init(String [] args, Properties props)
  • init(Applet app, Properties props)
  • list_initial_services()
  • resolve_initial_references(String name)
  • object_to_string(Object obj)
  • string_to_object(String str)

Exceptions

Exceptions in Java IDL are similar to those in any code written in the Java programming language. If a method is defined to throw an exception, then any code using that method must have a try/catch block and handle that exception when it is thrown.

The documentation on Java IDL exceptions has more information and explains the difference between system exceptions and user-defined exceptions.

The following is a list of the system exceptions (which are unchecked exceptions inheriting through org.omg.CORBA.SystemException from java.lang.RuntimeException) that are defined in the package org.omg.CORBA:

        BAD_CONTEXT
        BAD_INV_ORDER
        BAD_OPERATION
        BAD_PARAM
        BAD_TYPECODE
        COMM_FAILURE
        DATA_CONVERSION
        FREE_MEM
        IMP_LIMIT
        INITIALIZE
        INTERNAL
        INTF_REPOS
        INVALID_TRANSACTION
        INV_FLAG
        INV_IDENT
        INV_OBJREF
        INV_POLICY
        MARSHAL
        NO_IMPLEMENT
        NO_MEMORY
        NO_PERMISSION
        NO_RESOURCES
        NO_RESPONSE
        OBJECT_NOT_EXIST
        OBJ_ADAPTER
        PERSIST_STORE
        TRANSACTION_REQUIRED
        TRANSACTION_ROLLEDBACK
        TRANSIENT
        UNKNOWN

The following is a list of user-defined exceptions defined in the package org.omg.CORBA.

        Bounds
        UnknownUserException
        WrongTransaction
        PolicyError
Note that there are some packages inside the CORBA package with "Package" as part of their names. These packages are generally quite small because all they do is provide exceptions or classes for use by interfaces and classes in the CORBA package.

For example, the package org.omg.CORBA.TypeCodePackage contains two exceptions thrown by methods in the class TypeCode. These exceptions are:

  • BadKind
  • Bounds
The package org.omg.CORBA.ORBPackage contains two exceptions:
  • InvalidName
  • InconsistentTypeCode
The package org.omg.CORBA.DynAnyPackage contains four exceptions:
  • InvalidValue, thrown by methods in
    • DynAny
    • DynFixed
  • Invalid, thrown by methods in
    • DynAny
  • TypeMismatch, thrown by methods in
    • DynAny
  • InvalidSeq, thrown by methods in
    • DynArray
    • DynSequence
    • DynStruct
    • DynValue

Holder classes

Holder classes are generated by the idltojava compiler as support for out and inout parameter passing modes. Because the Java programming language does not support out or inout parameters, holder classes are needed as a means of passing a parameter that can be modified. Holder classes implement the org.omg.CORBA.portable.Streamable interface in order to support portable stubs and skeletons.

Holder classes are named by appending "Holder" to the name of the type. Note that the name of the type refers to its name in the Java programming langua ge. For example, a holder class for the interface named Account in the Java programming language would be named AccountHolder.

There are holder classes available for all of the basic IDL data types in the org.omg.CORBA package. So, for instance, there are classes already defined for IntHolder, ShortHolder, LongHolder, FloatHolder, ByteHolder, CharHolder, and so on. New holder classes are generated for all named user-defined IDL types except those defined by a typedef.

Each holder class contains the following:

  • a constructor from an instance
  • a default constructor
  • a public field, value, which contains an instance of the typed value
  • a method for reading an input stream and assigning the contents to the type 's value field
  • a method for writing the value of the value field to an output stream
  • a method for getting the type code of the type

The default constructor for a holder class sets the value field to the default value for the type as defined by the Java programming language. These default values are:

  • false for boolean types
  • 0 for numeric and char types
  • null for strings
  • null for object references

As an example, if the interface Account, defined in OMG IDL, were mapped to the Java programming language, the following holder class would be generated:

final public class AccountHolder implements
          org.omg.CORBA.portable.Streamable {
    public Account value;
         // the field that holds an Account object
        public AccountHolder() {}
         // the default constructor
        public AccountHolder(Account initial) {...}
         // creates a new AccountHolder from initial
        public void _read(org.omg.CORBA.portable.InputStream is) {...}
         // reads the contents of is and assigns the contents to value
        public void _write(org.omg.CORBA.portable.OutputStream os) {...}
         // writes value to os
        public org.omg.CORBA.TypeCode _type() {...}
         // returns the type code for Account
}

The Holder classes defined in the package org.omg.CORBA are:

     AnyHolder
     AnySeqHelper
     BooleanHolder
     BooleanSeqHolder
     ByteHolder
     CharHolder
     CharSeqHolder
     DoubleHolder
     DoubleSeqHolder
     FixedHolder
     FloatHolder
     FloatSeqHolder
     IntHolder
     LongHolder
     LongLongSeqHolder
     LongSeqHolder
     ObjectHolder
     OctetSeqHolder
     PrincipalHolder
     ServiceInformationHolder
     ShortHolder
     ShortSeqHolder
     StringHolder
     TypeCodeHolder
     ULongLongSeqHolder
     ULongSeqHolder
     UShortSeqHolder
     ValueBaseHolder
     WCharSeqHolder

Helper Classes

Some of the classes in this package are "helper" classes. These classes fall into two broad categories, helpers for value types and helpers for non value types. Because all of the helper classes in one category provide the same methods, one generic explanation of each category of helper classes is presented here.

Note that, generally, the only helper method an application programmer uses is the narrow method. The other methods are normally used behind the scenes and are transparent to the programmer.

When OMG IDL is mapped to the Java programming language, a "helper" class is generated for each user-defined type. This generated class will have the name of the user-defined type with the suffix Helper appended. For example, if the interface Account is defined in OMG IDL, the idltojava compiler will automatically generate a class named AccountHelper. The AccountHelper class will contain the static methods needed for manipulating instances of the type, in this case, Account objects. These methods provide the means to insert the type into an Any object, extract the type from an Any object, get the type code for the type, get the type's repository id, read the type from an input stream, and write the type to an output stream. Every user-defined type's helper class will include these basic methods. If a user-defined type is a value type IDL type, it's helper class also has to implement the ValueHelper interface, so this category of helper classes will contain additional methods.

In addition, if the IDL type maps to an interface in the Java programming language, the helper class will also contain a method for casting an object (narrowing it) to the type.

The narrow Method

When an object is the return value for a method, it is returned in the form of a generic object, either an org.omg.CORBA.Object object or a java.lang.Object object. This object must be cast to its more specific type before it can be operated on. For example, an Account object will be returned as a generic object and must be narrowed to an Account object so that Account methods may be called on it.

The narrow method has two forms, one that takes an org.omg.CORBA.Object object and one that takes a java.lang.Object object. Whether the interface is abstract or not determines which narrow method its helper class will provide. The helper class for an interface that is not abstract will have a narrow method that takes a CORBA object, whereas the narrow method for an interface that is abstract will take an object in the Java programming language. The helper class for a non-abstract interface that has at least one abstract base interface will provide both versions of the narrow method.

Example of a Basic Helper Class

A basic helper class, for purposes of this explanation, is one with the methods that are provided by every helper class, plus a narrow method if the type defined in OMG IDL maps to an interface in the Java programming language. Types that are not value types will have a basic helper class generated for them.

For example, assuming that the interface Account is not a value type IDL type and is also not an abstract interface and has no abstract base interfaces, its AccountHelper class will include the following methods:

  • public static void insert(org.omg.CORBA.Any a, Account ac)
    Inserts an Account object into an Any object.
    Parameters:
   a	the Any object into which the Account
        object will be inserted
   ac	the Account object to be inserted
  • public static Account extract(org.omg.CORBA.Any a)
    Extracts an Account object from an Any object.
    Parameters:
   a	the Any object from which the Account
         object will be extracted
Returns:
   the Account object that is the value for the given Any
   object
  • public static org.omg.CORBA.TypeCode type()
    Gets the typecode for this type.
    Returns:
   the typecode for an Account object
  • public static String id()
    Gets the repository id for this type.
    Returns:
   the repository id of an Account object
  • public static Account read(org.omg.CORBA.portable.InputStream istream)
    Reads an Account object from an input stream.
    Parameters:
   istream	the input stream from which the Account
             object will be read
Returns:
   the Account object that was contained in the input stream
  • public static void write(org.omg.CORBA.portable.OutputStream ostream)
    Writes an Account object to an output stream.
    Parameters:
   ostream	the output stream to which the Account
             object will be written
  • public static Account narrow(org.omg.CORBA.Object obj)
    Converts (narrows) an Object object to an Account object.
    Parameters:
   obj	the CORBA Object that will be narrowed to this type
Returns:
   the CORBA Object as an Account object

Additional Methods for Value Type Helper Classes

A helper class for a value type includes some additional methods because it must implement the org.omg.CORBA.portable.ValueHelper interface. The main difference is that value types are types that can be passed by value as parameters or return values of a method, which means that they must be serializable.

Assuming that Address is a value type, the AddressHelper class will include the following additional methods:

  • public static ValueHelper get_instance()
    Gets an instance of AddressHelper, creating it if necessary.
    Returns:
   an AddressHelper object, which implements the interface
   ValueHelper
  • public java.io.Serializable read_Value(org.omg.CORBA.portable.InputStream istream)
    Reads a serializable instance of Address from the given input stream.
    Parameters:
   istream	the input stream from which the Address object will
             be read
Returns:
   the serialized Address object
  • public void write_Value(org.omg.CORBA.portable.OutputStream os, java.io.Serializable obj)
    Writes a serializable instance of Address to the given output stream.
    Parameters:
   ostream	the output stream to which the Address object will
               be written
   obj		the serialized Address object that will be written
  • public Class get_class()
    Returns the class for an instance of Address.
    Returns:
   the Class object for this type
  • public String get_id()
    Gets the repository id for an instance of Address.
    Returns:
   the repository id for this type
  • public String [] get_truncatable_base_ids()
    Gets an array of the truncatable base repository ids for an instance of Address.
    Returns:
   an array of String objects containing the truncatable base
   repository ids for this type
  • public org.omg.CORBA.TypeCode get_type()
    Gets the typecode for the type Address.
    Returns:
   the TypeCode object indicating the type of an
   Address object

The Helper classes defined in the package org.omg.CORBA are:

     AnySeqHelper
     AttrDescriptionSeqHelper
     AttributeDescriptionHelper
     AttributeModeHelper
     BooleanSeqHelper
     CharSeqHelper
     CompletionStatusHelper
     ContextIdSeqHelper
     DefinitionKindHelper
     DoubleSeqHelper
     ExcDescriptionSeqHelper
     ExceptionDescriptionHelper
     FieldNameHelper
     FloatSeqHelper
     IDLTypeHelper
     IdentifierHelper
     LongLongSeqHelper
     LongSeqHelper
     NameValuePairHelper
     ObjectHelper
     OctetSeqHelper
     OperationDescriptionHelper
     OperationModeHelper
     ParDescriptionSeqHelper
     ParameterDescriptionHelper
     ParameterModeHelper
     RepositoryIdHelper
     ServiceDetailHelper
     ServiceInformationHelper
     SetOverrideTypeHelper
     ShortSeqHelper
     StringValueHelper
     StructMemberHelper
     ULongLongSeqHelper
     ULongSeqHelper
     UShortSeqHelper
     UnionMemberHelper
     ValueBaseHelper
     ValueMemberHelper
     VersionSpecHelper
     VisibilityHelper
     WCharSeqHelper
     WStringValueHelper

For Advanced Users

The other classes and interfaces in the CORBA package, which are used behind the scenes, can be put into four groups. Three of the groups are used with requests in some capacity, and the fourth group, concerning the Interface Repository, is a category by itself.

Classes Created by an ORB

The first group contains classes that are created by an ORB and contain information used in request operations. They are listed in roughly increasing order of complexity:
  • TCKind -- indicates the kind (datatype) for a TypeCode object>
  • TypeCode -- indicates a datatype and possibly other information>
  • Any -- contains a value and its typecode>
  • NamedValue -- contains a name, an Any object, and an argument mode flag. NamedValue objects contain information about method arguments, method return values, or a context.
  • ContextList -- a list of strings that describe the contexts that need to be resolved and sent with an invocation>
  • ExceptionList -- a list of TypeCodes for exceptions that may be thrown by a method>
  • Environment -- a container for the exception thrown during a method invocation>
  • Context -- a list of NamedValue objects used to pass auxiliary information from client to server>
  • NVList -- a list of NamedValue objects, used to pass arguments or get results>

Classes That Deal with Requests

The second group of classes deals with requests:
  • Object -- the base class for all CORBA object references>
  • Request -- the main class in the DII, which contains methods for adding arguments to the request, for accessing information about the method being invoked (the method name, its arguments, exceptions it throws, and so on), and for making invocations on the request>
  • DynamicImplementation -- the base class for server implementations using the DSI. It has the method invoke, which is used by an implementation of this class to determine the state of a ServerRequest object and to set its result or exception>
  • ServerRequest -- captures the explicit state of a request for the Dynamic Skeleton Interface>

Interfaces That Serve as Constants

The third group contains interfaces that serve as constants. The IDL-to-Java mapping mandates that IDL enums are mapped to a Java class with the enumerated values represented as public static final fields in that class (e.g. DefinitionKind). On the other hand IDL constants defined outside of an IDL interface are mapped to a Java interface for each constant.

This is why several interfaces in the org.omg.CORBA package consist of a single field, value, which is a short. This field is a constant used for such things as an error code or value modifier. For example, the value field of the interface BAD_POLICY is one of the possible reasons for the exception PolicyError to be thrown. To specify this error code, you would use BAD_POLICY.value.

The exception PolicyError uses the value field of the following interfaces as its possible error codes.

  • BAD_POLICY
  • BAD_POLICY_TYPE
  • BAD_POLICY_VALUE
  • UNSUPPORTED_POLICY
  • UNSUPPORTED_POLICY_VALUE
The method TypeCode.type_modifier returns the value field of one of the following interfaces. The VM in the names of these interfaces stands for "value modifier."
  • VM_NONE
  • VM_ABSTRACT
  • VM_CUSTOM
  • VM_TRUNCATABLE
The following constants are returned by a ValueMember object's access method to denote the visibility of the ValueMember object.
  • PRIVATE_MEMBER
  • PUBLIC_MEMBER
These flags, used in NamedValue objects or as parameters to methods, are defined in the following interfaces:
  • ARG_IN
  • ARG_INOUT
  • ARG_OUT
  • CTX_RESTRICT_SCOPE

Interface Repository Interfaces and Classes

A fourth group contains the Interface Repository interfaces and classes, which are generated by the idltojava compiler from the OMG IDL interface ir.idl. The purpose of the Interface Repository is to identify the interfaces stored in it so that they can be accessed by an ORB. Each module, type, interface, attribute, operation, parameter, exception, constant, and so on is described completely by the Interface Repository API.

An ORB does not require that there be an interface repository, and Java IDL does not include one. Even though this release does not include an implementation of an interface repository, the following IR classes and interfaces have been included for the purpose of creating type codes (see create_value_tc, create_struct_tc, create_union_tc and create_exception_tc methods in interface org.omg.CORBA.ORB)
&nbs

  • IRObject
  • IDLType
  • DefinitionKind
  • StructMember
  • UnionMember
  • ValueMember

Related Documentation

For overviews, guides, and a tutorial, please see:
  • Java IDL home page

CORBA Features Not Implemented in Java IDL

Some of the API included in org.omg.CORBA is provided for conformance with the current OMG CORBA specification but is not implemented in Sun's release of the JDKTM. This enables other JDK licensees to provide implementations of this API in standard extensions and products.

General Summary of Features or API Not Implemented in This Release:

  • Interface Repository. An Interface Repository is not required for normal operation of Java IDL. Java IDL clients can access an Interface Repository provided by another Java or C++ ORB.
  • RMI/IIOP>
  • Objects-by-Value>
  • Of the recently added type extensions to IDL, only longlong (signed and unsigned) is supported. The wide character IDL types wchar and wstring are not supported. The types long double and fixed are also not supported.
  • The method org.omg.CORBA.Any.equal is not implemented for complex TypeCodes (tk_objref, tk_Principal, tk_struct, tk_union, tk_sequence, tk_array, tk_alias, and tk_except), extended TypeCodes (tk_longdouble, tk_wchar, tk_wstring) and value TypeCodes (tk_value, tk_value_box).
  • There is no implementation for org.omg.CORBA.DynAny and other dynamic-Any interfaces.
  • The API for org.omg.CORBA.Context is not implemented.
    NOTE: Abstract classes, such as Context, by definition have methods that are not implemented.
  • Policies (org.omg.CORBA.Policy) and methods for getting them are not implemented.
  • Domain managers (org.omg.CORBA.DomainManager) and methods for getting them are not implemented.
  • org.omg.CORBA.ServiceInformation and ORB methods for getting these objects are not implemented.
  • org.omg.CORBA.portable.ServantObject and Delegate/ObjectImpl methods _servant_preinvoke, _servant_postinvoke and _is_local are not implemented.
  • ORB methods for supporting single-threading (perform_work, work_pending) are not implemented.

Specific List of Unimplemented Features in Package org.omg.CORBA

Unimplemented Interfaces in package org.omg.CORBA:

  • Current
  • DynAny
  • DynStruct
  • DynEnum
  • DynArray
  • DomainManager
  • Policy
  • DynFixed
  • DynUnion
  • DynSequence
  • DynValue
  • IRObject
  • IDLType

Unimplemented Methods in package org.omg.CORBA:

  • ORB
    • public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    • public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws
    • public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type)
    • public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type)
    • public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type)
    • public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type)
    • public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type)
    • public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value)
    • public boolean get_service_information(short service_type, ServiceInformationHolder service_info)
    • public void perform_work()
    • public boolean work_pending()
    • public void shutdown(boolean wait_for_completion)
    • public void run()
    • public org.omg.CORBA.Current get_current()
  • Any
    • public void insert_Value(java.io.Serializable v, TypeCode t)
    • public void insert_Value(java.io.Serializable v)
    • public java.io.Serializable extract_Value()
    • public void insert_fixed(java.math.BigDecimal value, org.omg.CORBA.TypeCode type)
    • public void insert_fixed(java.math.BigDecimal value)
    • public java.math.BigDecimal extract_fixed()
  • ServerRequest
    • public void set_exception(Any any)
    • public void set_result(org.omg.CORBA.Any any)
    • public void arguments(org.omg.CORBA.NVList args)
    • public String operation()

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


PERSIST_STORE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PERSIST_STORE

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.PERSIST_STORE
All Implemented Interfaces:
Serializable
public final class PERSIST_STORE
extends SystemException

The CORBA PERSIST_STORE exception, which is thrown when there is an error with the persistent storage on the server. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
PERSIST_STORE()
Constructs a PERSIST_STORE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
PERSIST_STORE(int minor, CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified minor code and completion status.
PERSIST_STORE(String s)
Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
PERSIST_STORE(String s, int minor, CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PERSIST_STORE

public PERSIST_STORE()
Constructs a PERSIST_STORE exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

PERSIST_STORE

public PERSIST_STORE(String s)
Constructs a PERSIST_STORE exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

PERSIST_STORE

public PERSIST_STORE(int minor,
                     CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

PERSIST_STORE

public PERSIST_STORE(String s,
                     int minor,
                     CompletionStatus completed)
Constructs a PERSIST_STORE exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyError

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.PolicyError
All Implemented Interfaces:
IDLEntity, Serializable
public final class PolicyError
extends UserException

An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE

See Also:
Serialized Form

Field Summary
 short reason
The reason for the PolicyError exception being thrown.
Constructor Summary
PolicyError()
Constructs a default PolicyError user exception with no reason code and an empty reason detail message.
PolicyError(short __reason)
Constructs a PolicyError user exception initialized with the given reason code and an empty reason detail message.
PolicyError(String reason_string, short __reason)
Constructs a PolicyError user exception initialized with the given reason detail message and reason code.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

reason

public short reason
The reason for the PolicyError exception being thrown.
Constructor Detail

PolicyError

public PolicyError()
Constructs a default PolicyError user exception with no reason code and an empty reason detail message.

PolicyError

public PolicyError(short __reason)
Constructs a PolicyError user exception initialized with the given reason code and an empty reason detail message.
Parameters:
__reason - the reason code.

PolicyError

public PolicyError(String reason_string,
                   short __reason)
Constructs a PolicyError user exception initialized with the given reason detail message and reason code.
Parameters:
reason_string - the reason detail message.
__reason - the reason code.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyHelper

java.lang.Object
  |
  +--org.omg.CORBA.PolicyHelper
public abstract class PolicyHelper
extends Object

org/omg/CORBA/PolicyHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Constructor Summary
PolicyHelper()
Method Summary
static Policy | extract(Any a)
static String | id()
static void | insert(Any a, Policy that)
static Policy | narrow(Object obj)
static Policy | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Policy value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PolicyHelper

public PolicyHelper()
Method Detail

insert

public static void insert(Any a,
                          Policy that)

extract

public static Policy extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Policy read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Policy value)

narrow

public static Policy narrow(Object obj)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyHolder

java.lang.Object
  |
  +--org.omg.CORBA.PolicyHolder
All Implemented Interfaces:
Streamable
public final class PolicyHolder
extends Object
implements Streamable

org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Field Summary
 Policy value
Constructor Summary
PolicyHolder()
PolicyHolder(Policy initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Policy value
Constructor Detail

PolicyHolder

public PolicyHolder()

PolicyHolder

public PolicyHolder(Policy initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyListHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyListHelper

java.lang.Object
  |
  +--org.omg.CORBA.PolicyListHelper
public abstract class PolicyListHelper
extends Object

org/omg/CORBA/PolicyListHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

Constructor Summary
PolicyListHelper()
Method Summary
static Policy[] | extract(Any a)
static String | id()
static void | insert(Any a, Policy[] that)
static Policy[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Policy[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PolicyListHelper

public PolicyListHelper()
Method Detail

insert

public static void insert(Any a,
                          Policy[] that)

extract

public static Policy[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Policy[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Policy[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyListHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyListHolder

java.lang.Object
  |
  +--org.omg.CORBA.PolicyListHolder
All Implemented Interfaces:
Streamable
public final class PolicyListHolder
extends Object
implements Streamable

org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT

Field Summary
 Policy[] value
Constructor Summary
PolicyListHolder()
PolicyListHolder(Policy[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Policy[] value
Constructor Detail

PolicyListHolder

public PolicyListHolder()

PolicyListHolder

public PolicyListHolder(Policy[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface PolicyOperations

All Known Subinterfaces:
Policy
public interface PolicyOperations

org/omg/CORBA/PolicyOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Method Summary
Policy | copy() Copies the policy object.
void | destroy() Destroys the policy object.
int | policy_type() Return the constant value that corresponds to the type of the policy object.

Method Detail

policy_type

public int policy_type()
Return the constant value that corresponds to the type of the policy object. The values of the polivy objectys are allocated by the OMG. New values for PolicyType should be obtained from the OMG by sending mail to request@omg.org. In general the constant values that are allocated are defined in conjunction with the definition of the corresponding policy object.
Returns:
the constant value that corresponds to the type of the policy object.

copy

public Policy copy()
Copies the policy object. The copy does not retain any relationships that the policy had with any domain or object.
Returns:
the copy of the policy object.

destroy

public void destroy()
Destroys the policy object. It is the responsibility of the policy object to determine whether it can be destroyed.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PolicyTypeHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PolicyTypeHelper

java.lang.Object
  |
  +--org.omg.CORBA.PolicyTypeHelper
public abstract class PolicyTypeHelper
extends Object

org/omg/CORBA/PolicyTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT

Constructor Summary
PolicyTypeHelper()
Method Summary
static int | extract(Any a)
static String | id()
static void | insert(Any a, int that)
static int | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, int value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PolicyTypeHelper

public PolicyTypeHelper()
Method Detail

insert

public static void insert(Any a,
                          int that)

extract

public static int extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static int read(InputStream istream)

write

public static void write(OutputStream ostream,
                         int value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CustomValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface CustomValue

All Superinterfaces:
CustomMarshal, IDLEntity, Serializable, ValueBase
public interface CustomValue
extends ValueBase, CustomMarshal

Methods inherited from interface org.omg.CORBA.portable.ValueBase
_truncatable_ids
Methods inherited from interface org.omg.CORBA.CustomMarshal
marshal, unmarshal

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IDLEntity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface IDLEntity

All Superinterfaces:
Serializable
All Known Subinterfaces:
BindingIterator, Current, CustomValue, DataInputStream, DataOutputStream, DomainManager, IDLType, IRObject, NamingContext, Policy, Repository, RunTime, StreamableValue, ValueBase
All Known Implementing Classes:
Any, CompletionStatus, DefinitionKind, Initializer, NameValuePair, ServiceDetail, ServiceInformation, SetOverrideType, StructMember, TypeCode, UnionMember, UserException, ValueMember, NameComponent, Binding, BindingType, NotEmpty, InvalidName, NotFoundReason, NotFound, CannotProceed, AlreadyBound
public interface IDLEntity
extends Serializable

An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class. RMI IIOP serialization looks for such a marker to perform marshalling/unmarshalling.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvokeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface InvokeHandler

All Known Subinterfaces:
Tie
public interface InvokeHandler

This interface provides a dispatching mechanism for an incoming call. It is invoked by the ORB to dispatch a request to a servant.

Method Summary
 OutputStream _invoke(String method, InputStream input, ResponseHandler handler)
Invoked by the ORB to dispatch a request to the servant.

Method Detail

_invoke

public OutputStream _invoke(String method,
                            InputStream input,
                            ResponseHandler handler)
                     throws SystemException
Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

1. Determine correct method, and unmarshal parameters from InputStream.

2. Invoke method implementation.

3. If no user exception, create a normal reply using ResponseHandler.

4. If user exception occurred, create exception reply using ResponseHandler.

5. Marshal reply into OutputStream returned by ResponseHandler.

6. Return OutputStream to ORB.

Parameters:
method - The method name.
input - The InputStream containing the marshalled arguments.
handler - The ResponseHandler which the servant uses to construct a proper reply
Returns:
The OutputStream created by the ResponseHandler which contains the marshalled reply
Throws:
SystemException - is thrown when invocation fails due to a CORBA system exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA.portable Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA.portable

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CORBA.portable.Delegate
    • class java.io.InputStream
      • class org.omg.CORBA.portable.InputStream
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
    • class java.io.OutputStream
      • class org.omg.CORBA.portable.OutputStream
    • class org.omg.CORBA.portable.ServantObject
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class org.omg.CORBA.portable.ApplicationException
        • class org.omg.CORBA.portable.RemarshalException
        • class java.lang.RuntimeException
          • class org.omg.CORBA.SystemException
            • class org.omg.CORBA.portable.IndirectionException
            • class org.omg.CORBA.portable.UnknownException

Interface Hierarchy

  • interface org.omg.CORBA.portable.BoxedValueHelper
  • interface org.omg.CORBA.CustomMarshal
    • interface org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.portable.ValueBase)
  • interface org.omg.CORBA.portable.InvokeHandler
  • interface org.omg.CORBA.portable.ResponseHandler
  • interface java.io.Serializable
    • interface org.omg.CORBA.portable.IDLEntity
      • interface org.omg.CORBA.portable.ValueBase
        • interface org.omg.CORBA.portable.CustomValue (also extends org.omg.CORBA.CustomMarshal)
        • interface org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.Streamable)
  • interface org.omg.CORBA.portable.Streamable
    • interface org.omg.CORBA.portable.StreamableValue (also extends org.omg.CORBA.portable.ValueBase)
  • interface org.omg.CORBA.portable.ValueFactory
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Streamable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface Streamable

All Known Subinterfaces:
StreamableValue
All Known Implementing Classes:
AnyHolder, AnySeqHolder, BooleanHolder, BooleanSeqHolder, ByteHolder, CharHolder, CharSeqHolder, CurrentHolder, DoubleHolder, DoubleSeqHolder, FixedHolder, FloatHolder, FloatSeqHolder, IntHolder, LongHolder, LongLongSeqHolder, LongSeqHolder, ObjectHolder, OctetSeqHolder, PolicyHolder, PolicyListHolder, PrincipalHolder, ServiceInformationHolder, ShortHolder, ShortSeqHolder, StringHolder, TypeCodeHolder, ULongLongSeqHolder, ULongSeqHolder, UShortSeqHolder, ValueBaseHolder, WCharSeqHolder, BindingIteratorHolder, NameComponentHolder, BindingTypeHolder, BindingListHolder, BindingHolder, NameHolder, NamingContextHolder, AlreadyBoundHolder, NotFoundReasonHolder, InvalidNameHolder, CannotProceedHolder, NotFoundHolder, NotEmptyHolder
public interface Streamable

The base class for the Holder classess of all complex IDL types. The ORB treats all generated Holders as Streamable to invoke the methods for marshalling and unmarshalling.

Since:
JDK1.2

Method Summary
void | _read(InputStream istream) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream ostream) Marshals to ostream the value in the value field of the Holder.

Method Detail

_read

public void _read(InputStream istream)
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream ostream)
Marshals to ostream the value in the value field of the Holder.
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StreamableValue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface StreamableValue

All Superinterfaces:
IDLEntity, Serializable, Streamable, ValueBase
public interface StreamableValue
extends Streamable, ValueBase

Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled. All value types implement ValueBase either directly or indirectly by implementing either the StreamableValue or CustomValue interface.

Methods inherited from interface org.omg.CORBA.portable.Streamable
_read, _type, _write
Methods inherited from interface org.omg.CORBA.portable.ValueBase
_truncatable_ids

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package org.omg.CORBA.portable

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA.portable

Packages that use org.omg.CORBA.portable
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3 | The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in org.omg.CORBA.portable used by javax.rmi.CORBA
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
InvokeHandler
This interface provides a dispatching mechanism for an incoming call.
ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.

Classes in org.omg.CORBA.portable used by org.omg.CORBA
BoxedValueHelper
Delegate
Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.
Streamable
The base class for the Holder classess of all complex IDL types.
ValueBase
The generated Java classes corresponding to valuetype IDL types implement this interface.

Classes in org.omg.CORBA.portable used by org.omg.CORBA_2_3
ValueFactory
The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory.

Classes in org.omg.CORBA.portable used by org.omg.CORBA_2_3.portable
BoxedValueHelper
Delegate
Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.

Classes in org.omg.CORBA.portable used by org.omg.CORBA.DynAnyPackage
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.

Classes in org.omg.CORBA.portable used by org.omg.CORBA.ORBPackage
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.

Classes in org.omg.CORBA.portable used by org.omg.CORBA.portable
ApplicationException
This class is used for reporting application level exceptions between ORBs and stubs.
Delegate
Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.
RemarshalException
This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
ResponseHandler
This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
ServantObject
This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.
Streamable
The base class for the Holder classess of all complex IDL types.
ValueBase
The generated Java classes corresponding to valuetype IDL types implement this interface.

Classes in org.omg.CORBA.portable used by org.omg.CORBA.TypeCodePackage
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.

Classes in org.omg.CORBA.portable used by org.omg.CosNaming
Delegate
Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.
Streamable
The base class for the Holder classess of all complex IDL types.

Classes in org.omg.CORBA.portable used by org.omg.CosNaming.NamingContextPackage
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
InputStream
InputStream is the Java API for reading IDL types from CDR marshal streams.
OutputStream
OuputStream is the Java API for writing IDL types to CDR marshal streams.
Streamable
The base class for the Holder classess of all complex IDL types.

Classes in org.omg.CORBA.portable used by org.omg.SendingContext
IDLEntity
An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.

Classes in org.omg.CORBA.portable used by org.omg.stub.java.rmi
ObjectImpl
The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ValueBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface ValueBase

All Superinterfaces:
IDLEntity, Serializable
All Known Subinterfaces:
CustomValue, DataInputStream, DataOutputStream, StreamableValue
public interface ValueBase
extends IDLEntity

The generated Java classes corresponding to valuetype IDL types implement this interface. In other words, the Java mapping of valuetype objects implement the ValueBase interface. The generated Java class for valuetype's shall provide an implementation of the ValueBase interface for the corresponding value type. For value types that are streamable (i.e. non-custom), the generated Java class shall also provide an implementation for the org.omg.CORBA.portable.Streamable interface. (CORBA::ValueBase is mapped to java.io.Serializable.)

Method Summary
 String[] _truncatable_ids()
Provides truncatable repository ids.

Method Detail

_truncatable_ids

public String[] _truncatable_ids()
Provides truncatable repository ids.
Returns:
a String array--list of truncatable repository ids.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ApplicationException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class ApplicationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.portable.ApplicationException
All Implemented Interfaces:
Serializable
public class ApplicationException
extends Exception

This class is used for reporting application level exceptions between ORBs and stubs.

See Also:
Serialized Form

Constructor Summary
ApplicationException(String id, InputStream ins)
Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.
Method Summary
String | getId() Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.
InputStream | getInputStream() Returns the input stream from which the exception data can be read as its parameters.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ApplicationException

public ApplicationException(String id,
                            InputStream ins)
Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.
Parameters:
id - the repository id of the user exception
ins - the stream which contains the user exception data
Method Detail

getId

public String getId()
Returns the CORBA repository ID of the exception without removing it from the exceptions input stream.
Returns:
The CORBA repository ID of this exception

getInputStream

public InputStream getInputStream()
Returns the input stream from which the exception data can be read as its parameters.
Returns:
The stream which contains the user exception data
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BoxedValueHelper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface BoxedValueHelper

All Known Implementing Classes:
StringValueHelper, WStringValueHelper
public interface BoxedValueHelper

Method Summary
String | get_id()
Serializable | read_value(InputStream is)
void | write_value(OutputStream os, Serializable value)

Method Detail

read_value

public Serializable read_value(InputStream is)

write_value

public void write_value(OutputStream os,
                        Serializable value)

get_id

public String get_id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.omg.CORBA.portable.IndirectionException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.IndirectionException

No usage of org.omg.CORBA.portable.IndirectionException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.UnknownException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.UnknownException

No usage of org.omg.CORBA.portable.UnknownException

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.CustomValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.CustomValue

No usage of org.omg.CORBA.portable.CustomValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.StreamableValue

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.StreamableValue

No usage of org.omg.CORBA.portable.StreamableValue

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.ApplicationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.ApplicationException

Packages that use ApplicationException
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ApplicationException in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that throw ApplicationException
InputStream | ObjectImpl._invoke(OutputStream output) Invokes an operation and returns an InputStream object for reading the response.
InputStream | Delegate.invoke(Object self, OutputStream output) invoke is called by a stub to invoke an operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.Delegate

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.Delegate

Packages that use Delegate
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.

Uses of Delegate in org.omg.CORBA

Constructors in org.omg.CORBA with parameters of type Delegate
_PolicyStub(Delegate delegate)
Constructs a _PolicyStub object initialized with the given Delegate object.
_IDLTypeStub(Delegate delegate)
Constructs an _IDLTypeStub object initialized with the given Delegate object.

Uses of Delegate in org.omg.CORBA_2_3.portable

Subclasses of Delegate in org.omg.CORBA_2_3.portable
 class Delegate
Delegate class provides the ORB vendor specific implementation of CORBA object.

Uses of Delegate in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return Delegate
 Delegate ObjectImpl._get_delegate()
Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.

Methods in org.omg.CORBA.portable with parameters of type Delegate
 void ObjectImpl._set_delegate(Delegate delegate)
Sets the Delegate for this ObjectImpl instance to the given Delegate object.

Uses of Delegate in org.omg.CosNaming

Constructors in org.omg.CosNaming with parameters of type Delegate
_NamingContextStub(Delegate d)
_BindingIteratorStub(Delegate d)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.InputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.InputStream

Packages that use InputStream
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of InputStream in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type InputStream
static Object Util.readAny(InputStream in)
Reads a java.lang.Object as a CORBA any.
 Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
Reads a value from the stream using Java semantics.
 Object UtilDelegate.readAny(InputStream in)
Delegation call for Util.readAny(org.omg.CORBA.portable.InputStream).

Uses of InputStream in org.omg.CORBA

Methods in org.omg.CORBA that return InputStream
abstract  InputStream Any.create_input_stream()
Creates an input stream from which this Any object's value can be unmarshalled.

Methods in org.omg.CORBA with parameters of type InputStream
void | UShortSeqHolder._read(InputStream i)
void | DoubleHolder._read(InputStream input) Read a double value from the input stream and store it in the value member.
void | AnyHolder._read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
static UnionMember | UnionMemberHelper.read(InputStream istream)
static ServiceInformation | ServiceInformationHelper.read(InputStream in)
void | DoubleSeqHolder._read(InputStream i)
static Policy[] | PolicyListHelper.read(InputStream istream)
abstract void | Any.read_value(InputStream is, TypeCode t) Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
void | ShortSeqHolder._read(InputStream i)
void | ObjectHolder._read(InputStream input) Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
void | LongLongSeqHolder._read(InputStream i)
void | ShortHolder._read(InputStream input) Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
static NameValuePair | NameValuePairHelper.read(InputStream istream)
static int[] | LongSeqHelper.read(InputStream istream)
void | ULongLongSeqHolder._read(InputStream i)
void | CurrentHolder._read(InputStream i)
void | CharHolder._read(InputStream input) Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
void | PrincipalHolder._read(InputStream input) Deprecated.
void | ValueBaseHolder._read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
static byte[] | OctetSeqHelper.read(InputStream istream)
static String | IdentifierHelper.read(InputStream istream)
void | PolicyHolder._read(InputStream i)
static float[] | FloatSeqHelper.read(InputStream istream)
void | AnySeqHolder._read(InputStream i)
static ServiceDetail | ServiceDetailHelper.read(InputStream in)
void | PolicyListHolder._read(InputStream i)
static boolean[] | BooleanSeqHelper.read(InputStream istream)
static short | VisibilityHelper.read(InputStream istream)
static int[] | ULongSeqHelper.read(InputStream istream)
static String | StringValueHelper.read(InputStream istream)
Serializable | StringValueHelper.read_value(InputStream istream)
static char[] | CharSeqHelper.read(InputStream istream)
static SetOverrideType | SetOverrideTypeHelper.read(InputStream istream)
void | ServiceInformationHolder._read(InputStream in) Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
void | IntHolder._read(InputStream input) Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
static String | VersionSpecHelper.read(InputStream istream)
static DefinitionKind | DefinitionKindHelper.read(InputStream istream)
static StructMember | StructMemberHelper.read(InputStream istream)
void | LongSeqHolder._read(InputStream i)
void | StringHolder._read(InputStream input) Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
void | FixedHolder._read(InputStream input) Read a fixed point value from the input stream and store it in the value member.
static IDLType | IDLTypeHelper.read(InputStream istream)
static short[] | UShortSeqHelper.read(InputStream istream)
void | TypeCodeHolder._read(InputStream input) Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
static char[] | WCharSeqHelper.read(InputStream istream)
void | OctetSeqHolder._read(InputStream i)
static double[] | DoubleSeqHelper.read(InputStream istream)
static String | WStringValueHelper.read(InputStream istream)
Serializable | WStringValueHelper.read_value(InputStream istream)
static int | PolicyTypeHelper.read(InputStream istream)
void | BooleanSeqHolder._read(InputStream i)
void | FloatSeqHolder._read(InputStream i)
static long[] | ULongLongSeqHelper.read(InputStream istream)
static String | RepositoryIdHelper.read(InputStream istream)
static short[] | ShortSeqHelper.read(InputStream istream)
void | ULongSeqHolder._read(InputStream i)
void | FloatHolder._read(InputStream input) Read a float from an input stream and initialize the value member with the float value.
static Object | ObjectHelper.read(InputStream istream)
static Current | CurrentHelper.read(InputStream istream)
static long[] | LongLongSeqHelper.read(InputStream istream)
void | ByteHolder._read(InputStream input) Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
void | BooleanHolder._read(InputStream input) Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
void | CharSeqHolder._read(InputStream i)
static CompletionStatus | CompletionStatusHelper.read(InputStream istream)
void | LongHolder._read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
static String | FieldNameHelper.read(InputStream istream)
static Serializable | ValueBaseHelper.read(InputStream istream)
void | WCharSeqHolder._read(InputStream i)
static Policy | PolicyHelper.read(InputStream istream)
static Any[] | AnySeqHelper.read(InputStream istream)
static ValueMember | ValueMemberHelper.read(InputStream istream)

Uses of InputStream in org.omg.CORBA_2_3.portable

Subclasses of InputStream in org.omg.CORBA_2_3.portable
 class InputStream
InputStream provides for the reading of all of the mapped IDL types from the stream.

Uses of InputStream in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return InputStream
InputStream | ObjectImpl._invoke(OutputStream output) Invokes an operation and returns an InputStream object for reading the response.
abstract InputStream | OutputStream.create_input_stream() Returns an input stream with the same buffer.
InputStream | Delegate.invoke(Object self, OutputStream output) invoke is called by a stub to invoke an operation.
InputStream | ApplicationException.getInputStream() Returns the input stream from which the exception data can be read as its parameters.

Methods in org.omg.CORBA.portable with parameters of type InputStream
void | ObjectImpl._releaseReply(InputStream input) Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
void | Streamable._read(InputStream istream) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Serializable | BoxedValueHelper.read_value(InputStream is)
void | Delegate.releaseReply(Object self, InputStream input) releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
OutputStream | InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler) Invoked by the ORB to dispatch a request to the servant.

Constructors in org.omg.CORBA.portable with parameters of type InputStream
ApplicationException(String id, InputStream ins)
Constructs an ApplicationException from the CORBA repository ID of the exception and an input stream from which the exception data can be read as its parameters.

Uses of InputStream in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type InputStream
static NameComponent[] | NameHelper.read(InputStream in)
void | BindingIteratorHolder._read(InputStream in)
static String | IstringHelper.read(InputStream in)
void | NameComponentHolder._read(InputStream in)
static Binding[] | BindingListHelper.read(InputStream in)
void | BindingTypeHolder._read(InputStream in)
void | BindingListHolder._read(InputStream in)
static BindingIterator | BindingIteratorHelper.read(InputStream in)
void | BindingHolder._read(InputStream in)
void | NameHolder._read(InputStream in)
static NameComponent | NameComponentHelper.read(InputStream in)
static BindingType | BindingTypeHelper.read(InputStream in)
static NamingContext | NamingContextHelper.read(InputStream in)
static Binding | BindingHelper.read(InputStream in)
void | NamingContextHolder._read(InputStream in)

Uses of InputStream in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type InputStream
static AlreadyBound | AlreadyBoundHelper.read(InputStream in)
static NotFoundReason | NotFoundReasonHelper.read(InputStream in)
static NotFound | NotFoundHelper.read(InputStream in)
void | AlreadyBoundHolder._read(InputStream in)
void | NotFoundReasonHolder._read(InputStream in)
void | InvalidNameHolder._read(InputStream in)
static CannotProceed | CannotProceedHelper.read(InputStream in)
void | CannotProceedHolder._read(InputStream in)
void | NotFoundHolder._read(InputStream in)
static InvalidName | InvalidNameHelper.read(InputStream in)
static NotEmpty | NotEmptyHelper.read(InputStream in)
void | NotEmptyHolder._read(InputStream in)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.ObjectImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.ObjectImpl

Packages that use ObjectImpl
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of ObjectImpl in javax.rmi.CORBA

Subclasses of ObjectImpl in javax.rmi.CORBA
 class Stub
Base class from which all RMI-IIOP stubs must inherit.

Uses of ObjectImpl in org.omg.CORBA

Subclasses of ObjectImpl in org.omg.CORBA
class | _IDLTypeStub org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
class | _PolicyStub org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
class | DynamicImplementation The base class for all object implementations using the DSI.

Uses of ObjectImpl in org.omg.CORBA_2_3.portable

Subclasses of ObjectImpl in org.omg.CORBA_2_3.portable
 class ObjectImpl
ObjectImpl class is the base class for all stubs.

Uses of ObjectImpl in org.omg.CosNaming

Subclasses of ObjectImpl in org.omg.CosNaming
class | _BindingIteratorImplBase
class | _BindingIteratorStub
class | _NamingContextImplBase
class | _NamingContextStub

Uses of ObjectImpl in org.omg.stub.java.rmi

Subclasses of ObjectImpl in org.omg.stub.java.rmi
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.OutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.OutputStream

Packages that use OutputStream
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of OutputStream in javax.rmi.CORBA

Methods in javax.rmi.CORBA with parameters of type OutputStream
static void Util.writeAny(OutputStream out, Object obj)
Writes any java.lang.Object as a CORBA any.
static void Util.writeRemoteObject(OutputStream out, Object obj)
Writes a java.lang.Object as a CORBA Object.
static void Util.writeAbstractObject(OutputStream out, Object obj)
Writes a java.lang.Object as either a value or a CORBA Object.
 void ValueHandler.writeValue(OutputStream out, Serializable value)
Writes a value to the stream using Java semantics.
 void UtilDelegate.writeAny(OutputStream out, Object obj)
Delegation call for Util.writeAny(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void UtilDelegate.writeRemoteObject(OutputStream out, Object obj)
Delegation call for Util.writeRemoteObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).
 void UtilDelegate.writeAbstractObject(OutputStream out, Object obj)
Delegation call for Util.writeAbstractObject(org.omg.CORBA.portable.OutputStream, java.lang.Object).

Uses of OutputStream in org.omg.CORBA

Methods in org.omg.CORBA that return OutputStream
abstract OutputStream | Any.create_output_stream() Creates an output stream into which this Any object's value can be marshalled.
abstract OutputStream | ORB.create_output_stream() Creates a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.

Methods in org.omg.CORBA with parameters of type OutputStream
void | UShortSeqHolder._write(OutputStream o)
void | DoubleHolder._write(OutputStream output) Write the double value stored in this holder to an OutputStream.
void | AnyHolder._write(OutputStream output) Marshals to output the value in this AnyHolder object.
static void | UnionMemberHelper.write(OutputStream ostream, UnionMember value)
static void | ServiceInformationHelper.write(OutputStream out, ServiceInformation that)
void | DoubleSeqHolder._write(OutputStream o)
static void | PolicyListHelper.write(OutputStream ostream, Policy[] value)
abstract void | Any.write_value(OutputStream os) Writes out to the given output stream the typecode and value of this Any object.
void | ShortSeqHolder._write(OutputStream o)
void | ObjectHolder._write(OutputStream output) Marshals to output the value in this ObjectHolder object.
void | LongLongSeqHolder._write(OutputStream o)
void | ShortHolder._write(OutputStream output) Marshals to output the value in this ShortHolder object.
static void | NameValuePairHelper.write(OutputStream ostream, NameValuePair value)
static void | LongSeqHelper.write(OutputStream ostream, int[] value)
void | ULongLongSeqHolder._write(OutputStream o)
void | CurrentHolder._write(OutputStream o)
void | CharHolder._write(OutputStream output) Marshals to output the value in this CharHolder object.
void | PrincipalHolder._write(OutputStream output) Deprecated.
void | ValueBaseHolder._write(OutputStream output) Marshals to output the value in the Holder.
static void | OctetSeqHelper.write(OutputStream ostream, byte[] value)
static void | IdentifierHelper.write(OutputStream ostream, String value)
void | PolicyHolder._write(OutputStream o)
static void | FloatSeqHelper.write(OutputStream ostream, float[] value)
void | AnySeqHolder._write(OutputStream o)
static void | ServiceDetailHelper.write(OutputStream out, ServiceDetail that)
void | PolicyListHolder._write(OutputStream o)
static void | BooleanSeqHelper.write(OutputStream ostream, boolean[] value)
static void | VisibilityHelper.write(OutputStream ostream, short value)
static void | ULongSeqHelper.write(OutputStream ostream, int[] value)
static void | StringValueHelper.write(OutputStream ostream, String value)
void | StringValueHelper.write_value(OutputStream ostream, Serializable value)
static void | CharSeqHelper.write(OutputStream ostream, char[] value)
static void | SetOverrideTypeHelper.write(OutputStream ostream, SetOverrideType value)
void | ServiceInformationHolder._write(OutputStream out) Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
void | IntHolder._write(OutputStream output) Marshals the value in this IntHolder object's value field to the output stream output.
static void | VersionSpecHelper.write(OutputStream ostream, String value)
static void | DefinitionKindHelper.write(OutputStream ostream, DefinitionKind value)
static void | StructMemberHelper.write(OutputStream ostream, StructMember value)
void | LongSeqHolder._write(OutputStream o)
void | StringHolder._write(OutputStream output) Marshals the value held by this StringHolder object to the output stream output.
void | FixedHolder._write(OutputStream output) Write the fixed point value stored in this holder to an OutputStream.
static void | IDLTypeHelper.write(OutputStream ostream, IDLType value)
static void | UShortSeqHelper.write(OutputStream ostream, short[] value)
void | TypeCodeHolder._write(OutputStream output) Marshals to output the value in this TypeCodeHolder object.
static void | WCharSeqHelper.write(OutputStream ostream, char[] value)
void | OctetSeqHolder._write(OutputStream o)
static void | DoubleSeqHelper.write(OutputStream ostream, double[] value)
static void | WStringValueHelper.write(OutputStream ostream, String value)
void | WStringValueHelper.write_value(OutputStream ostream, Serializable value)
static void | PolicyTypeHelper.write(OutputStream ostream, int value)
void | BooleanSeqHolder._write(OutputStream o)
void | FloatSeqHolder._write(OutputStream o)
static void | ULongLongSeqHelper.write(OutputStream ostream, long[] value)
static void | RepositoryIdHelper.write(OutputStream ostream, String value)
static void | ShortSeqHelper.write(OutputStream ostream, short[] value)
void | ULongSeqHolder._write(OutputStream o)
void | FloatHolder._write(OutputStream output) Write the float value into an output stream.
static void | ObjectHelper.write(OutputStream ostream, Object value)
static void | CurrentHelper.write(OutputStream ostream, Current value)
static void | LongLongSeqHelper.write(OutputStream ostream, long[] value)
void | ByteHolder._write(OutputStream output) Marshals to output the value in this ByteHolder object.
void | BooleanHolder._write(OutputStream output) Marshals the value in this BooleanHolder object's value field to the output stream output.
void | CharSeqHolder._write(OutputStream o)
static void | CompletionStatusHelper.write(OutputStream ostream, CompletionStatus value)
void | LongHolder._write(OutputStream output) Marshals to output the value in the Holder.
static void | FieldNameHelper.write(OutputStream ostream, String value)
static void | ValueBaseHelper.write(OutputStream ostream, Serializable value)
void | WCharSeqHolder._write(OutputStream o)
static void | PolicyHelper.write(OutputStream ostream, Policy value)
static void | AnySeqHelper.write(OutputStream ostream, Any[] value)
static void | ValueMemberHelper.write(OutputStream ostream, ValueMember value)

Uses of OutputStream in org.omg.CORBA_2_3.portable

Subclasses of OutputStream in org.omg.CORBA_2_3.portable
 class OutputStream
OutputStream provides interface for writing of all of the mapped IDL type to the stream.

Uses of OutputStream in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return OutputStream
OutputStream | ObjectImpl._request(String operation, boolean responseExpected) Returns an OutputStream object to use for marshalling the arguments of the given method.
OutputStream | ResponseHandler.createReply() Called by the servant during a method invocation.
OutputStream | ResponseHandler.createExceptionReply() Called by the servant during a method invocation.
OutputStream | Delegate.request(Object self, String operation, boolean responseExpected) request is called by a stub to obtain an OutputStream for marshaling arguments.
OutputStream | InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler) Invoked by the ORB to dispatch a request to the servant.

Methods in org.omg.CORBA.portable with parameters of type OutputStream
InputStream | ObjectImpl._invoke(OutputStream output) Invokes an operation and returns an InputStream object for reading the response.
void | Streamable._write(OutputStream ostream) Marshals to ostream the value in the value field of the Holder.
void | BoxedValueHelper.write_value(OutputStream os, Serializable value)
InputStream | Delegate.invoke(Object self, OutputStream output) invoke is called by a stub to invoke an operation.

Uses of OutputStream in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type OutputStream
static void | NameHelper.write(OutputStream out, NameComponent[] that)
void | BindingIteratorHolder._write(OutputStream out)
static void | IstringHelper.write(OutputStream out, String that)
void | NameComponentHolder._write(OutputStream out)
static void | BindingListHelper.write(OutputStream out, Binding[] that)
void | BindingTypeHolder._write(OutputStream out)
void | BindingListHolder._write(OutputStream out)
static void | BindingIteratorHelper.write(OutputStream out, BindingIterator that)
void | BindingHolder._write(OutputStream out)
void | NameHolder._write(OutputStream out)
static void | NameComponentHelper.write(OutputStream out, NameComponent that)
static void | BindingTypeHelper.write(OutputStream out, BindingType that)
static void | NamingContextHelper.write(OutputStream out, NamingContext that)
static void | BindingHelper.write(OutputStream out, Binding that)
void | NamingContextHolder._write(OutputStream out)

Uses of OutputStream in org.omg.CosNaming.NamingContextPackage

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type OutputStream
static void | AlreadyBoundHelper.write(OutputStream out, AlreadyBound that)
static void | NotFoundReasonHelper.write(OutputStream out, NotFoundReason that)
static void | NotFoundHelper.write(OutputStream out, NotFound that)
void | AlreadyBoundHolder._write(OutputStream out)
void | NotFoundReasonHolder._write(OutputStream out)
void | InvalidNameHolder._write(OutputStream out)
static void | CannotProceedHelper.write(OutputStream out, CannotProceed that)
void | CannotProceedHolder._write(OutputStream out)
void | NotFoundHolder._write(OutputStream out)
static void | InvalidNameHelper.write(OutputStream out, InvalidName that)
static void | NotEmptyHelper.write(OutputStream out, NotEmpty that)
void | NotEmptyHolder._write(OutputStream out)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.RemarshalException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.RemarshalException

Packages that use RemarshalException
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of RemarshalException in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that throw RemarshalException
InputStream | ObjectImpl._invoke(OutputStream output) Invokes an operation and returns an InputStream object for reading the response.
InputStream | Delegate.invoke(Object self, OutputStream output) invoke is called by a stub to invoke an operation.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.portable.ServantObject

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.portable.ServantObject

Packages that use ServantObject
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ServantObject in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable that return ServantObject
ServantObject | ObjectImpl._servant_preinvoke(String operation, Class expectedType) Returns a Java reference to the local servant that should be used for sending a request for the method specified.
ServantObject | Delegate.servant_preinvoke(Object self, String operation, Class expectedType) Returns a Java reference to the servant which should be used for this request.

Methods in org.omg.CORBA.portable with parameters of type ServantObject
 void ObjectImpl._servant_postinvoke(ServantObject servant)
Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
 void Delegate.servant_postinvoke(Object self, ServantObject servant)
servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.BoxedValueHelper

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.BoxedValueHelper

Packages that use BoxedValueHelper
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA_2_3.portable | Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

Uses of BoxedValueHelper in org.omg.CORBA

Classes in org.omg.CORBA that implement BoxedValueHelper
class | StringValueHelper org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00
class | WStringValueHelper org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00

Uses of BoxedValueHelper in org.omg.CORBA_2_3.portable

Methods in org.omg.CORBA_2_3.portable with parameters of type BoxedValueHelper
void | OutputStream.write_value(Serializable value, BoxedValueHelper factory) marshals a value type to the output stream.
Serializable | InputStream.read_value(BoxedValueHelper factory) unmarshalls a value type from the input stream.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.IDLEntity

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.IDLEntity

Packages that use IDLEntity
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.DynAnyPackage | Provides the exceptions used with the DynAny interface (InvalidValue, Invalid, InvalidSeq, and TypeMismatch).
org.omg.CORBA.ORBPackage | Provides the exception InvalidName, which is thrown by the method ORB.resolve_initial_references and the exception InconsistentTypeCode, which is thrown by the Dynamic Any creation methods in the ORB class.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CORBA.TypeCodePackage | Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.
org.omg.SendingContext | Provides support for the marshalling of value types.

Uses of IDLEntity in org.omg.CORBA

Subinterfaces of IDLEntity in org.omg.CORBA
interface | Current org/omg/CORBA/Current.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT.
interface | DataInputStream Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
interface | DataOutputStream Defines the methods used to write primitive data types to output streams for marshalling custom value types.
interface | DomainManager The DomainManager has associated with it the policy objects for a particular domain.
interface | IDLType An abstract interface inherited by all Interface Repository (IR) objects that represent OMG IDL types.
interface | IRObject An IRObject IDL interface represents the most generic interface from which all other Interface Repository interfaces are derived, even the Repository itself.
interface | Policy org/omg/CORBA/Policy.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
interface | Repository This is the interface which defines the interface repository.

Classes in org.omg.CORBA that implement IDLEntity
class | _IDLTypeStub org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
class | _PolicyStub org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
class | Any Serves as a container for any data that can be described in IDL or for any IDL primitive type.
class | Bounds A user exception thrown when a parameter is not within the legal bounds for the object that a method is trying to access.
class | CompletionStatus An object that indicates whether a method had completed running when a SystemException was thrown.
class | DefinitionKind The class that provides the constants used to identify the type of an Interface Repository object.
class | Initializer This is the mapping for an IDL structure which specifies an initializer for a value type.
class | NameValuePair The NameValuePair interface associates a name with a value that is an attribute of an IDL struct.
class | PolicyError An exception carrying one of the following policy error reason codes defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE, BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE
class | ServiceDetail An object that represents an ORB service.
class | ServiceInformation ServiceInformation is an IDL struct in the CORBA module.
class | SetOverrideType The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.
class | StructMember A description of a member of an IDL struct.
class | TypeCode A container for information about a specific CORBA data type.
class | UnionMember A description in the Interface Repository of a member of an IDL union.
class | UnknownUserException A class that contains user exceptions returned by the server.
class | UserException The root class for CORBA IDL-defined user exceptions.
class | ValueMember A description in the Interface Repository of a member of a value object.
class | WrongTransaction The CORBA WrongTransaction user-defined exception.

Uses of IDLEntity in org.omg.CORBA.DynAnyPackage

Classes in org.omg.CORBA.DynAnyPackage that implement IDLEntity
class | Invalid Invalid is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
class | InvalidSeq The InvalidSeq exception is thrown by all operations on dynamic anys that take a sequence (Java array) as an argument, when that sequence is invalid.
class | InvalidValue
class | TypeMismatch TypeMismatch is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.

Uses of IDLEntity in org.omg.CORBA.ORBPackage

Classes in org.omg.CORBA.ORBPackage that implement IDLEntity
 class InconsistentTypeCode
InconsistentTypeCode is thrown when an attempt is made to create a dynamic any with a type code that does not match the particular subclass of DynAny.

Uses of IDLEntity in org.omg.CORBA.portable

Subinterfaces of IDLEntity in org.omg.CORBA.portable
interface | CustomValue
interface | StreamableValue Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
interface | ValueBase The generated Java classes corresponding to valuetype IDL types implement this interface.

Uses of IDLEntity in org.omg.CORBA.TypeCodePackage

Classes in org.omg.CORBA.TypeCodePackage that implement IDLEntity
 class BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.

Uses of IDLEntity in org.omg.CosNaming

Subinterfaces of IDLEntity in org.omg.CosNaming
interface | BindingIterator The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
interface | NamingContext A naming context is an object that contains a set of name bindings in which each name is unique.

Classes in org.omg.CosNaming that implement IDLEntity
class | _BindingIteratorImplBase
class | _BindingIteratorStub
class | _NamingContextImplBase
class | _NamingContextStub
class | Binding
class | BindingType
class | NameComponent

Uses of IDLEntity in org.omg.CosNaming.NamingContextPackage

Classes in org.omg.CosNaming.NamingContextPackage that implement IDLEntity
class | AlreadyBound
class | CannotProceed
class | InvalidName
class | NotEmpty
class | NotFound
class | NotFoundReason

Uses of IDLEntity in org.omg.SendingContext

Subinterfaces of IDLEntity in org.omg.SendingContext
 interface RunTime
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.InvokeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.InvokeHandler

Packages that use InvokeHandler
javax.rmi.CORBA Contains portability APIs for RMI-IIOP.

Uses of InvokeHandler in javax.rmi.CORBA

Subinterfaces of InvokeHandler in javax.rmi.CORBA
 interface Tie
Defines methods which all RMI-IIOP server side ties must implement.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.ResponseHandler

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.ResponseHandler

Packages that use ResponseHandler
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ResponseHandler in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type ResponseHandler
 OutputStream InvokeHandler._invoke(String method, InputStream input, ResponseHandler handler)
Invoked by the ORB to dispatch a request to the servant.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.Streamable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.Streamable

Packages that use Streamable
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of Streamable in org.omg.CORBA

Classes in org.omg.CORBA that implement Streamable
class | AnyHolder A Holder class for Any objects that is used to store "out" and "inout" parameters in IDL methods.
class | AnySeqHolder org/omg/CORBA/AnySeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | BooleanHolder A Holder class for a boolean that is used to store "out" and "inout" parameters in IDL methods.
class | BooleanSeqHolder org/omg/CORBA/BooleanSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ByteHolder A Holder class for a byte that is used to store "out" and "inout" parameters in IDL methods.
class | CharHolder A Holder class for a char that is used to store "out" and "inout" parameters in IDL methods.
class | CharSeqHolder org/omg/CORBA/CharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | CurrentHolder org/omg/CORBA/CurrentHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | DoubleHolder A Holder class for a double that is used to store "out" and "inout" parameters in IDL methods.
class | DoubleSeqHolder org/omg/CORBA/DoubleSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | FixedHolder FixedHolder is a container class for values of IDL type "fixed", which is mapped to the Java class java.math.BigDecimal.
class | FloatHolder A Holder class for a float that is used to store "out" and "inout" parameters in IDL methods.
class | FloatSeqHolder org/omg/CORBA/FloatSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | IntHolder A Holder class for an int that is used to store "out" and "inout" parameters in IDL methods.
class | LongHolder A Holder class for a long that is used to store "out" and "inout" parameters in IDL methods.
class | LongLongSeqHolder org/omg/CORBA/LongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | LongSeqHolder org/omg/CORBA/LongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ObjectHolder A Holder class for a CORBA object reference (a value of type org.omg.CORBA.Object).
class | OctetSeqHolder org/omg/CORBA/OctetSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | PolicyHolder org/omg/CORBA/PolicyHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:20 AM PDT
class | PolicyListHolder org/omg/CORBA/PolicyListHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl Saturday, July 17, 1999 12:26:21 AM PDT
class | PrincipalHolder Deprecated. Deprecated by CORBA 2.2.
class | ServiceInformationHolder A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods.
class | ShortHolder A Holder class for a short that is used to store "out" and "inout" parameters in IDL operations.
class | ShortSeqHolder org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | StringHolder A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations.
class | TypeCodeHolder A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations.
class | ULongLongSeqHolder org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00
class | ULongSeqHolder org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | UShortSeqHolder org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00
class | ValueBaseHolder A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods.
class | WCharSeqHolder org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Methods in org.omg.CORBA with parameters of type Streamable
abstract  void Any.insert_Streamable(Streamable s)
Inserts the given Streamable object into this Any object's value field.

Uses of Streamable in org.omg.CORBA.portable

Subinterfaces of Streamable in org.omg.CORBA.portable
 interface StreamableValue
Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.

Uses of Streamable in org.omg.CosNaming

Classes in org.omg.CosNaming that implement Streamable
class | BindingHolder
class | BindingIteratorHolder
class | BindingListHolder
class | BindingTypeHolder
class | NameComponentHolder
class | NameHolder
class | NamingContextHolder

Uses of Streamable in org.omg.CosNaming.NamingContextPackage

Classes in org.omg.CosNaming.NamingContextPackage that implement Streamable
class | AlreadyBoundHolder
class | CannotProceedHolder
class | InvalidNameHolder
class | NotEmptyHolder
class | NotFoundHolder
class | NotFoundReasonHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.ValueBase

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.ValueBase

Packages that use ValueBase
org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of ValueBase in org.omg.CORBA

Subinterfaces of ValueBase in org.omg.CORBA
interface | DataInputStream Defines the methods used to read primitive data types from input streams for unmarshaling custom value types.
interface | DataOutputStream Defines the methods used to write primitive data types to output streams for marshalling custom value types.

Uses of ValueBase in org.omg.CORBA.portable

Subinterfaces of ValueBase in org.omg.CORBA.portable
interface | CustomValue
interface | StreamableValue Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CORBA.portable.ValueFactory

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CORBA.portable.ValueFactory

Packages that use ValueFactory
org.omg.CORBA_2_3 The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

Uses of ValueFactory in org.omg.CORBA_2_3

Methods in org.omg.CORBA_2_3 that return ValueFactory
ValueFactory | ORB.register_value_factory(String id, ValueFactory factory)
ValueFactory | ORB.lookup_value_factory(String id)

Methods in org.omg.CORBA_2_3 with parameters of type ValueFactory
 ValueFactory ORB.register_value_factory(String id, ValueFactory factory)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Delegate

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class Delegate

java.lang.Object
  |
  +--org.omg.CORBA.portable.Delegate
Direct Known Subclasses:
Delegate
public abstract class Delegate
extends Object

Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods. Each stub (proxy) contains a delegate object, to which all org.omg.CORBA.Object methods are forwarded. This allows a stub generated by one vendor's ORB to work with the delegate from another vendor's ORB.

See Also:
Object

Constructor Summary
Delegate()
Method Summary
abstract  Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result)
Creates a Request instance for use in the Dynamic Invocation Interface.
abstract  Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
Creates a Request instance for use in the Dynamic Invocation Interface.
abstract  Object duplicate(Object obj)
Returns a duplicate of the object reference provided.
 boolean equals(Object self, Object obj)
Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
 DomainManager[] get_domain_managers(Object self)
Retrieves the DomainManagers of this object.
 Object get_interface_def(Object self)
Return an InterfaceDef for the object reference provided.
 Policy get_policy(Object self, int policy_type)
Returns the Policy object of the specified type which applies to this object.
abstract  int hash(Object obj, int max)
Returns an ORB-internal identifier (hashcode) for this object reference.
 int hashCode(Object self)
Provide the implementation to override the hashCode() method of the delegating CORBA object.
 InputStream invoke(Object self, OutputStream output)
invoke is called by a stub to invoke an operation.
abstract  boolean is_a(Object obj, String repository_id)
Checks if the object reference is an instance of the given interface.
abstract  boolean is_equivalent(Object obj, Object other)
Determines if the two object references are equivalent.
 boolean is_local(Object self)
Returns true if this object is implemented by a local servant.
abstract  boolean non_existent(Object obj)
Determines whether the server object for the object reference has been destroyed.
 ORB orb(Object obj)
Provides a reference to the orb associated with its parameter.
abstract  void release(Object obj)
Releases resources associated with the object reference provided.
 void releaseReply(Object self, InputStream input)
releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.
abstract  Request request(Object obj, String operation)
Creates a Request instance for use in the Dynamic Invocation Interface.
 OutputStream request(Object self, String operation, boolean responseExpected)
request is called by a stub to obtain an OutputStream for marshaling arguments.
 void servant_postinvoke(Object self, ServantObject servant)
servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.
 ServantObject servant_preinvoke(Object self, String operation, Class expectedType)
Returns a Java reference to the servant which should be used for this request.
 Object set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
Associates the policies passed in with a newly created object reference that it returns.
 String toString(Object self)
Provide the implementation to override the toString() method of the delegating CORBA object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Delegate

public Delegate()
Method Detail

get_interface_def

public Object get_interface_def(Object self)
Return an InterfaceDef for the object reference provided.
Parameters:
self - The object reference whose InterfaceDef needs to be returned
Returns:
the InterfaceDef

duplicate

public abstract Object duplicate(Object obj)
Returns a duplicate of the object reference provided.
Parameters:
obj - The object reference whose duplicate needs to be returned
Returns:
the duplicate object reference

release

public abstract void release(Object obj)
Releases resources associated with the object reference provided.
Parameters:
obj - The object reference whose resources need to be released

is_a

public abstract boolean is_a(Object obj,
                             String repository_id)
Checks if the object reference is an instance of the given interface.
Parameters:
obj - The object reference to be checked.
repository_id - The repository identifier of the interface to check against.
Returns:
true if the object reference supports the interface

non_existent

public abstract boolean non_existent(Object obj)
Determines whether the server object for the object reference has been destroyed.
Parameters:
obj - The object reference which delegated to this delegate.
Returns:
true if the ORB knows authoritatively that the server object does not exist, false otherwise

is_equivalent

public abstract boolean is_equivalent(Object obj,
                                      Object other)
Determines if the two object references are equivalent.
Parameters:
obj - The object reference which delegated to this delegate.
other - The object reference to check equivalence against.
Returns:
true if the objects are CORBA-equivalent.

hash

public abstract int hash(Object obj,
                         int max)
Returns an ORB-internal identifier (hashcode) for this object reference.
Parameters:
obj - The object reference which delegated to this delegate.
max - specifies an upper bound on the hash value returned by the ORB.
Returns:
ORB-internal hash identifier for object reference

request

public abstract Request request(Object obj,
                                String operation)
Creates a Request instance for use in the Dynamic Invocation Interface.
Parameters:
obj - The object reference which delegated to this delegate.
operation - The name of the operation to be invoked using the Request instance.
Returns:
the created Request instance

create_request

public abstract Request create_request(Object obj,
                                       Context ctx,
                                       String operation,
                                       NVList arg_list,
                                       NamedValue result)
Creates a Request instance for use in the Dynamic Invocation Interface.
Parameters:
obj - The object reference which delegated to this delegate.
ctx - The context to be used.
operation - The name of the operation to be invoked.
arg_list - The arguments to the operation in the form of an NVList.
result - A container for the result as a NamedValue.
Returns:
The created Request object.

create_request

public abstract Request create_request(Object obj,
                                       Context ctx,
                                       String operation,
                                       NVList arg_list,
                                       NamedValue result,
                                       ExceptionList exclist,
                                       ContextList ctxlist)
Creates a Request instance for use in the Dynamic Invocation Interface.
Parameters:
obj - The object reference which delegated to this delegate.
ctx - The context to be used.
operation - The name of the operation to be invoked.
arg_list - The arguments to the operation in the form of an NVList.
result - A container for the result as a NamedValue.
exclist - A list of possible exceptions the operation can throw.
ctxlist - A list of context strings that need to be resolved and sent with the Request.
Returns:
The created Request object.

orb

public ORB orb(Object obj)
Provides a reference to the orb associated with its parameter.
Parameters:
obj - the object reference which delegated to this delegate.
Returns:
the associated orb.
See Also:
portable package comments for unimplemented features

get_policy

public Policy get_policy(Object self,
                         int policy_type)
Returns the Policy object of the specified type which applies to this object.
Parameters:
self - The object reference which delegated to this delegate.
policy_type - The type of policy to be obtained.
Returns:
A Policy object of the type specified by the policy_type parameter.
Throws:
BAD_PARAM - raised when the value of policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object.
See Also:
portable package comments for unimplemented features

get_domain_managers

public DomainManager[] get_domain_managers(Object self)
Retrieves the DomainManagers of this object. This allows administration services (and applications) to retrieve the domain managers, and hence the security and other policies applicable to individual objects that are members of the domain.
Parameters:
self - The object reference which delegated to this delegate.
Returns:
The list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.
See Also:
portable package comments for unimplemented features

set_policy_override

public Object set_policy_override(Object self,
                                  Policy[] policies,
                                  SetOverrideType set_add)
Associates the policies passed in with a newly created object reference that it returns. Only certain policies that pertain to the invocation of an operation at the client end can be overridden using this operation. Attempts to override any other policy will result in the raising of the CORBA::NO_PERMISSION exception.
Parameters:
self - The object reference which delegated to this delegate.
policies - A sequence of references to Policy objects.
set_add - Indicates whether these policies should be added onto any otheroverrides that already exist (ADD_OVERRIDE) in the object reference, or they should be added to a clean override free object reference (SET_OVERRIDE).
Returns:
A new object reference with the new policies associated with it.
See Also:
portable package comments for unimplemented features

is_local

public boolean is_local(Object self)
Returns true if this object is implemented by a local servant.
Parameters:
self - The object reference which delegated to this delegate.
Returns:
true only if the servant incarnating this object is located in this Java VM. Return false if the servant is not local or the ORB does not support local stubs for this particular servant. The default behavior of is_local() is to return false.

servant_preinvoke

public ServantObject servant_preinvoke(Object self,
                                       String operation,
                                       Class expectedType)
Returns a Java reference to the servant which should be used for this request. servant_preinvoke() is invoked by a local stub. If a ServantObject object is returned, then its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation, and cannot be used for more than one invocation.
Parameters:
self - The object reference which delegated to this delegate.
operation - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.
expectedType - a Class object representing the expected type of the servant. The expected type is the Class object associated with the operations class of the stub's interface (e.g. A stub for an interface Foo, would pass the Class object for the FooOperations interface).
Returns:
a ServantObject object. The method may return a null value if it does not wish to support this optimization (e.g. due to security, transactions, etc). The method must return null if the servant is not of the expected type.

servant_postinvoke

public void servant_postinvoke(Object self,
                               ServantObject servant)
servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant. This method must be called if servant_preinvoke() returned a non-null value, even if an exception was thrown by the servant's method. For this reason, the call to servant_postinvoke() should be placed in a Java finally clause.
Parameters:
self - The object reference which delegated to this delegate.
servant - the instance of the ServantObject returned from the servant_preinvoke() method.

request

public OutputStream request(Object self,
                            String operation,
                            boolean responseExpected)
request is called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).
Parameters:
self - The object reference which delegated to this delegate.
operation - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.
responseExpected - false if the operation is a one way operation, and true otherwise.
Returns:
OutputStream the OutputStream into which request arguments can be marshaled.
See Also:
portable package comments for unimplemented features

invoke

public InputStream invoke(Object self,
                          OutputStream output)
                   throws ApplicationException,
                          RemarshalException
invoke is called by a stub to invoke an operation. The stub provides an OutputStream that was previously returned by a request() call. invoke returns an InputStream which contains the marshaled reply. If an exception occurs, invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
Parameters:
self - The object reference which delegated to this delegate.
output - the OutputStream which contains marshaled arguments
Returns:
input the InputStream from which reply parameters can be unmarshaled.
Throws:
ApplicationException - thrown when implementation throws (upon invocation) an exception defined as part of its remote method definition.
RemarshalException - thrown when remarshalling fails.
See Also:
portable package comments for unimplemented features

releaseReply

public void releaseReply(Object self,
                         InputStream input)
releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. The stub passes the InputStream returned by invoke() or ApplicationException.getInputStream(). A null value may also be passed to releaseReply, in which case the method is a noop.
Parameters:
self - The object reference which delegated to this delegate.
input - the InputStream returned from invoke().
See Also:
portable package comments for unimplemented features

toString

public String toString(Object self)
Provide the implementation to override the toString() method of the delegating CORBA object.
Parameters:
self - The object reference which delegated to this delegate.

hashCode

public int hashCode(Object self)
Provide the implementation to override the hashCode() method of the delegating CORBA object.
Parameters:
self - The object reference which delegated to this delegate.

equals

public boolean equals(Object self,
                      Object obj)
Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.
Parameters:
self - The object reference which delegated to this delegate.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IndirectionException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class IndirectionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.portable.IndirectionException
All Implemented Interfaces:
Serializable
public class IndirectionException
extends SystemException

The Indirection exception is a Java specific system exception. It is thrown when the ORB's input stream is called to demarshal a value that is encoded as an indirection that is in the process of being demarshaled. This can occur when the ORB input stream calls the ValueHandler to demarshal an RMI value whose state contains a recursive reference to itself. Because the top-level ValueHandler.read_value() call has not yet returned a value, the ORB input stream's indirection table does not contain an entry for an object with the stream offset specified by the indirection tag. The stream offset is returned in the exception's offset field.

See Also:
InputStream, org.omg.CORBA_2_3.portable.OuputStream, Serialized Form

Field Summary
 int offset
Points to the stream's offset.
Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
IndirectionException(int offset)
Creates an IndirectionException with the right offset value.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

offset

public int offset
Points to the stream's offset.
Constructor Detail

IndirectionException

public IndirectionException(int offset)
Creates an IndirectionException with the right offset value. The stream offset is returned in the exception's offset field. This exception is constructed and thrown during reading recursively defined values off of a stream.
Parameters:
offset - the stream offset where recursion is detected.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class InputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.omg.CORBA.portable.InputStream
Direct Known Subclasses:
InputStream
public abstract class InputStream
extends InputStream

InputStream is the Java API for reading IDL types from CDR marshal streams. These methods are used by the ORB to unmarshal IDL types as well as to extract IDL types out of Anys. The _array versions of the methods can be directly used to read sequences and arrays of IDL types.

Since:
JDK1.2

Constructor Summary
InputStream()
Method Summary
ORB | orb() Returns the ORB that created this InputStream.
abstract Any | read_any() Reads an Any from this input stream.
abstract void | read_boolean_array(boolean[] value, int offset, int length) Reads an array of booleans from this input stream.
abstract boolean | read_boolean() Reads a boolean value from this input stream.
abstract void | read_char_array(char[] value, int offset, int length) Reads an array of chars from this input stream.
abstract char | read_char() Reads a char value from this input stream.
Context | read_Context() Reads a CORBA context from the stream.
abstract void | read_double_array(double[] value, int offset, int length) Reads an array of boubles from this input stream.
abstract double | read_double() Reads a double value from this input stream.
BigDecimal | read_fixed() Reads a BigDecimal number.
abstract void | read_float_array(float[] value, int offset, int length) Reads an array of floats from this input stream.
abstract float | read_float() Reads a float value from this input stream.
abstract void | read_long_array(int[] value, int offset, int length) Reads an array of CORBA longs (i.e.
abstract int | read_long() Reads a CORBA long (i.e.
abstract void | read_longlong_array(long[] value, int offset, int length) Reads an array of CORBA longlongs (i.e.
abstract long | read_longlong() Reads a CORBA longlong (i.e.
abstract Object | read_Object() Reads a CORBA object from this input stream.
Object | read_Object(Class clz) read_Object unmarshals an object and returns a CORBA Object which is an instance of the class passed as its argument.
abstract void | read_octet_array(byte[] value, int offset, int length) Reads an array of octets (i.e.
abstract byte | read_octet() Reads an octet (i.e.
abstract Principal | read_Principal() Deprecated. Deprecated by CORBA 2.2.
abstract void | read_short_array(short[] value, int offset, int length) Reads an array of shorts from this input stream.
abstract short | read_short() Reads a short value from this input stream.
abstract String | read_string() Reads a string value from this input stream.
abstract TypeCode | read_TypeCode() Reads a TypeCode from this input stream.
abstract void | read_ulong_array(int[] value, int offset, int length) Reads an array of unsigned CORBA longs (i.e.
abstract int | read_ulong() Reads an unsigned CORBA long (i.e.
abstract void | read_ulonglong_array(long[] value, int offset, int length) Reads an array of unsigned CORBA longlongs (i.e.
abstract long | read_ulonglong() Reads a CORBA unsigned longlong (i.e.
abstract void | read_ushort_array(short[] value, int offset, int length) Reads an array of unsigned shorts from this input stream.
abstract short | read_ushort() Reads a unsigned short value from this input stream.
abstract void | read_wchar_array(char[] value, int offset, int length) Reads an array of wide chars from this input stream.
abstract char | read_wchar() Reads a wide char value from this input stream.
abstract String | read_wstring() Reads a wide string value from this input stream.
int | read() Reads the next byte of data from the input stream.
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputStream

public InputStream()
Method Detail

read_boolean

public abstract boolean read_boolean()
Reads a boolean value from this input stream.

read_char

public abstract char read_char()
Reads a char value from this input stream.

read_wchar

public abstract char read_wchar()
Reads a wide char value from this input stream.

read_octet

public abstract byte read_octet()
Reads an octet (i.e. a byte) value from this input stream.

read_short

public abstract short read_short()
Reads a short value from this input stream.

read_ushort

public abstract short read_ushort()
Reads a unsigned short value from this input stream.

read_long

public abstract int read_long()
Reads a CORBA long (i.e. Java int) value from this input stream.

read_ulong

public abstract int read_ulong()
Reads an unsigned CORBA long (i.e. Java int) value from this input stream.

read_longlong

public abstract long read_longlong()
Reads a CORBA longlong (i.e. Java long) value from this input stream.

read_ulonglong

public abstract long read_ulonglong()
Reads a CORBA unsigned longlong (i.e. Java long) value from this input stream.

read_float

public abstract float read_float()
Reads a float value from this input stream.

read_double

public abstract double read_double()
Reads a double value from this input stream.

read_string

public abstract String read_string()
Reads a string value from this input stream.

read_wstring

public abstract String read_wstring()
Reads a wide string value from this input stream.

read_boolean_array

public abstract void read_boolean_array(boolean[] value,
                                        int offset,
                                        int length)
Reads an array of booleans from this input stream.
Parameters:
value - returned array of booleans.
offset - offset on the stream.
length - length of buffer to read

read_char_array

public abstract void read_char_array(char[] value,
                                     int offset,
                                     int length)
Reads an array of chars from this input stream.
Parameters:
value - returned array of chars.
offset - offset on the stream.
length - length of buffer to read

read_wchar_array

public abstract void read_wchar_array(char[] value,
                                      int offset,
                                      int length)
Reads an array of wide chars from this input stream.
Parameters:
value - returned array of wide chars.
offset - offset on the stream.
length - length of buffer to read

read_octet_array

public abstract void read_octet_array(byte[] value,
                                      int offset,
                                      int length)
Reads an array of octets (i.e. bytes) from this input stream.
Parameters:
value - returned array of octets (i.e. bytes).
offset - offset on the stream.
length - length of buffer to read

read_short_array

public abstract void read_short_array(short[] value,
                                      int offset,
                                      int length)
Reads an array of shorts from this input stream.
Parameters:
value - returned array of shorts.
offset - offset on the stream.
length - length of buffer to read

read_ushort_array

public abstract void read_ushort_array(short[] value,
                                       int offset,
                                       int length)
Reads an array of unsigned shorts from this input stream.
Parameters:
value - returned array of shorts.
offset - offset on the stream.
length - length of buffer to read

read_long_array

public abstract void read_long_array(int[] value,
                                     int offset,
                                     int length)
Reads an array of CORBA longs (i.e. Java ints) from this input stream.
Parameters:
value - returned array of CORBA longs (i.e. Java ints).
offset - offset on the stream.
length - length of buffer to read

read_ulong_array

public abstract void read_ulong_array(int[] value,
                                      int offset,
                                      int length)
Reads an array of unsigned CORBA longs (i.e. Java ints) from this input stream.
Parameters:
value - returned array of CORBA longs (i.e. Java ints).
offset - offset on the stream.
length - length of buffer to read

read_longlong_array

public abstract void read_longlong_array(long[] value,
                                         int offset,
                                         int length)
Reads an array of CORBA longlongs (i.e. Java longs) from this input stream.
Parameters:
value - returned array of CORBA longs (i.e. Java longs).
offset - offset on the stream.
length - length of buffer to read

read_ulonglong_array

public abstract void read_ulonglong_array(long[] value,
                                          int offset,
                                          int length)
Reads an array of unsigned CORBA longlongs (i.e. Java longs) from this input stream.
Parameters:
value - returned array of CORBA longs (i.e. Java longs).
offset - offset on the stream.
length - length of buffer to read

read_float_array

public abstract void read_float_array(float[] value,
                                      int offset,
                                      int length)
Reads an array of floats from this input stream.
Parameters:
value - returned array of floats.
offset - offset on the stream.
length - length of buffer to read

read_double_array

public abstract void read_double_array(double[] value,
                                       int offset,
                                       int length)
Reads an array of boubles from this input stream.
Parameters:
value - returned array of doubles.
offset - offset on the stream.
length - length of buffer to read

read_Object

public abstract Object read_Object()
Reads a CORBA object from this input stream.

read_TypeCode

public abstract TypeCode read_TypeCode()
Reads a TypeCode from this input stream.

read_any

public abstract Any read_any()
Reads an Any from this input stream.

read_Principal

public abstract Principal read_Principal()
Deprecated. Deprecated by CORBA 2.2.

Returns principle for invocation.
Returns:
Principle for invocation.

read

public int read()
         throws IOException
Description copied from class: InputStream
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

A subclass must provide an implementation of this method.

Overrides:
read in class InputStream
See Also:
portable package comments for unimplemented features

read_fixed

public BigDecimal read_fixed()
Reads a BigDecimal number.
Returns:
a java.math.BigDecimal number.
See Also:
portable package comments for unimplemented features

read_Context

public Context read_Context()
Reads a CORBA context from the stream.
Returns:
a CORBA context.
See Also:
portable package comments for unimplemented features

read_Object

public Object read_Object(Class clz)
read_Object unmarshals an object and returns a CORBA Object which is an instance of the class passed as its argument. This class is the stub class of the expected type.
Parameters:
clz - a Class object, one of whose instances this method will read and return from the stream.
Returns:
an Object instance of clz read from this stream.
See Also:
portable package comments for unimplemented features

orb

public ORB orb()
Returns the ORB that created this InputStream.
Returns:
an ORB object.
See Also:
portable package comments for unimplemented features
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class ObjectImpl

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
All Implemented Interfaces:
Object
Direct Known Subclasses:
_BindingIteratorStub, _IDLTypeStub, _NamingContextStub, _PolicyStub, DynamicImplementation, ObjectImpl
public abstract class ObjectImpl
extends Object
implements Object

The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods. All method implementations are forwarded to a Delegate object stored in the ObjectImpl instance. ObjectImpl allows for portable stubs because the Delegate can be implemented by a different vendor-specific ORB.

Constructor Summary
ObjectImpl()
Method Summary
Request | _create_request(Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request object that contains the given context, method, argument list, and container for the result.
Request | _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
Object | _duplicate() Returns a duplicate of this ObjectImpl object.
Delegate | _get_delegate() Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
DomainManager[] | _get_domain_managers() Retrieves a list of the domain managers for this ObjectImpl object.
Object | _get_interface_def() Retrieves the interface definition for this ObjectImpl object.
Policy | _get_policy(int policy_type) Retrieves the Policy object for this ObjectImpl object that has the given policy type.
int | _hash(int maximum) Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
abstract String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
InputStream | _invoke(OutputStream output) Invokes an operation and returns an InputStream object for reading the response.
boolean | _is_a(String repository_id) Checks whether the object identified by the given repository identifier is an ObjectImpl object.
boolean | _is_equivalent(Object that) Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
boolean | _is_local() Checks whether this ObjectImpl object is implemented by a local servant.
boolean | _non_existent() Checks whether the server object for this ObjectImpl object has been destroyed.
ORB | _orb() Returns a reference to the ORB associated with this object and its delegate.
void | _release() Releases the resources associated with this ObjectImpl object.
void | _releaseReply(InputStream input) Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
Request | _request(String operation) Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
OutputStream | _request(String operation, boolean responseExpected) Returns an OutputStream object to use for marshalling the arguments of the given method.
void | _servant_postinvoke(ServantObject servant) Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
ServantObject | _servant_preinvoke(String operation, Class expectedType) Returns a Java reference to the local servant that should be used for sending a request for the method specified.
void | _set_delegate(Delegate delegate) Sets the Delegate for this ObjectImpl instance to the given Delegate object.
Object | _set_policy_override(Policy[] policies, SetOverrideType set_add) Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
boolean | equals(Object obj) Compares this ObjectImpl object with the given one for equality.
int | hashCode() Returns the hash code for this ObjectImpl object.
String | toString() Returns a String object that represents this ObjectImpl object.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectImpl

public ObjectImpl()
Method Detail

_get_delegate

public Delegate _get_delegate()
Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
Returns:
the Delegate contained in this ObjectImpl instance
Throws:
BAD_OPERATION - if the delegate has not been set
See Also:
_set_delegate(org.omg.CORBA.portable.Delegate)

_set_delegate

public void _set_delegate(Delegate delegate)
Sets the Delegate for this ObjectImpl instance to the given Delegate object. All method invocations on this ObjectImpl object will be forwarded to this delegate.
Parameters:
delegate - the Delegate instance to which all method calls on this ObjectImpl object will be delegated; may be implemented by a third-party ORB
See Also:
_get_delegate()

_ids

public abstract String[] _ids()
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Returns:
the array of all repository identifiers supported by this ObjectImpl instance

_duplicate

public Object _duplicate()
Returns a duplicate of this ObjectImpl object.
Specified by:
_duplicate in interface Object
Returns:
an orb.omg.CORBA.Object object that is a duplicate of this object

_release

public void _release()
Releases the resources associated with this ObjectImpl object.
Specified by:
_release in interface Object

_is_a

public boolean _is_a(String repository_id)
Checks whether the object identified by the given repository identifier is an ObjectImpl object.
Specified by:
_is_a in interface Object
Parameters:
repository_id - a String object with the repository identifier to check
Returns:
true if the object identified by the given repository id is an instance of ObjectImpl; false otherwise

_is_equivalent

public boolean _is_equivalent(Object that)
Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
Specified by:
_is_equivalent in interface Object
Parameters:
that - an instance of ObjectImpl to compare with this ObjectImpl object
Returns:
true if the given object is equivalent to this ObjectImpl object; false otherwise

_non_existent

public boolean _non_existent()
Checks whether the server object for this ObjectImpl object has been destroyed.
Specified by:
_non_existent in interface Object
Returns:
true if the ORB knows authoritatively that the server object does not exist; false otherwise

_hash

public int _hash(int maximum)
Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
Specified by:
_hash in interface Object
Parameters:
maximum - an int indicating the upper bound on the hash value returned by the ORB
Returns:
an int representing the hash code for this ObjectImpl object

_request

public Request _request(String operation)
Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
Specified by:
_request in interface Object
Parameters:
operation - the method to be invoked by the new Request object
Returns:
a new Request object initialized with the given method

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
Creates a Request object that contains the given context, method, argument list, and container for the result.
Specified by:
_create_request in interface Object
Parameters:
ctx - the Context for the request
operation - the method that the new Request object will invoke
arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
result - a NamedValue object to be used for returning the result of executing the request's method
Returns:
a new Request object initialized with the given context, method, argument list, and container for the return value

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result,
                               ExceptionList exceptions,
                               ContextList contexts)
Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings. This Request object is for use in the Dynamic Invocation Interface.
Specified by:
_create_request in interface Object
Parameters:
ctx - the Context object that contains the context strings that must be resolved before they are sent along with the request
operation - the method that the new Request object will invoke
arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
result - a NamedValue object to be used for returning the result of executing the request's method
exceptions - a list of the exceptions that the given method throws
contexts - a list of the properties that are needed to resolve the contexts in ctx; the strings in contexts are used as arguments to the method Context.get_values, which returns the value associated with the given property
Returns:
a new Request object initialized with the given context strings to resolve, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings

_get_interface_def

public Object _get_interface_def()
Retrieves the interface definition for this ObjectImpl object.
Specified by:
_get_interface_def in interface Object
Returns:
the org.omg.CORBA.Object instance that is the interface definition for this ObjectImpl object

_orb

public ORB _orb()
Returns a reference to the ORB associated with this object and its delegate. This is the ORB object that created the delegate.
Returns:
the ORB instance that created the Delegate object contained in this ObjectImpl object

_get_policy

public Policy _get_policy(int policy_type)
Retrieves the Policy object for this ObjectImpl object that has the given policy type.
Specified by:
_get_policy in interface Object
Parameters:
policy_type - an int indicating the policy type
Returns:
the Policy object that is the specified policy type and that applies to this ObjectImpl object
See Also:
PolicyOperations.policy_type()

_get_domain_managers

public DomainManager[] _get_domain_managers()
Retrieves a list of the domain managers for this ObjectImpl object.
Specified by:
_get_domain_managers in interface Object
Returns:
an array containing the DomainManager objects for this instance of ObjectImpl

_set_policy_override

public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
Specified by:
_set_policy_override in interface Object
Parameters:
policies - an array of Policy objects with the policies that will replace the current policies or be added to the current policies
set_add - either SetOverrideType.SET_OVERRIDE, indicating that the given policies will replace any existing ones, or SetOverrideType.ADD_OVERRIDE, indicating that the given policies should be added to any existing ones
Returns:
an Object with the given policies replacing or added to its previous policies

_is_local

public boolean _is_local()
Checks whether this ObjectImpl object is implemented by a local servant. If so, local invocation API's may be used.
Returns:
true if this object is implemented by a local servant; false otherwise

_servant_preinvoke

public ServantObject _servant_preinvoke(String operation,
                                        Class expectedType)
Returns a Java reference to the local servant that should be used for sending a request for the method specified. If this ObjectImpl object is a local stub, it will invoke the _servant_preinvoke method before sending a request in order to obtain the ServantObject instance to use.

If a ServantObject object is returned, its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation and cannot be used for more than one invocation.

Parameters:
operation - a String containing the name of the method to be invoked. This name should correspond to the method name as it would be encoded in a GIOP request.
expectedType - a Class object representing the expected type of the servant that is returned. This expected type is the Class object associated with the operations class for the stub's interface. For example, a stub for an interface Foo would pass the Class object for the FooOperations interface.
Returns:
(1) a ServantObject object, which may or may not be the actual servant instance, or (2) null if (a) the servant is not local or (b) the servant has ceased to be local due to a ForwardRequest from a POA ServantManager
Throws:
BAD_PARAM - if the servant is not the expected type

_servant_postinvoke

public void _servant_postinvoke(ServantObject servant)
Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke. The _servant_postinvoke method must be called if the _servant_preinvoke method returned a non-null value, even if an exception was thrown by the method invoked by the servant. For this reason, the call to the method _servant_postinvoke should be placed in a Java finally clause.
Parameters:
servant - the instance of the ServantObject returned by the _servant_preinvoke method

_request

public OutputStream _request(String operation,
                             boolean responseExpected)
Returns an OutputStream object to use for marshalling the arguments of the given method. This method is called by a stub, which must indicate if a response is expected, that is, whether or not the call is oneway.
Parameters:
operation - a String giving the name of the method
responseExpected - a boolean -- true if the request is not one way, that is, a response is expected
Returns:
an OutputStream object for dispatching the request

_invoke

public InputStream _invoke(OutputStream output)
                    throws ApplicationException,
                           RemarshalException
Invokes an operation and returns an InputStream object for reading the response. The stub provides the OutputStream object that was previously returned by a call to the _request method. The method specified as an argument to _request when it was called previously is the method that this method invokes.

If an exception occurs, the _invoke method may throw an ApplicationException object that contains an InputStream from which the user exception state may be unmarshalled.

Parameters:
output - an OutputStream object for dispatching the request
Returns:
an InputStream object containing the marshalled response to the method invoked
Throws:
ApplicationException - if the invocation meets application-defined exception
RemarshalException - if the invocation leads to a remarshalling error
See Also:
_request(java.lang.String)

_releaseReply

public void _releaseReply(InputStream input)
Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke. Calling this method is optional for the stub.
Parameters:
input - the InputStream object that was returned by the _invoke method or the ApplicationException.getInputStream method; may be null, in which case this method does nothing
See Also:
_invoke(org.omg.CORBA.portable.OutputStream)

toString

public String toString()
Returns a String object that represents this ObjectImpl object.
Overrides:
toString in class Object
Returns:
the String representation of this object

hashCode

public int hashCode()
Returns the hash code for this ObjectImpl object.
Overrides:
hashCode in class Object
Returns:
the hash code for this object

equals

public boolean equals(Object obj)
Compares this ObjectImpl object with the given one for equality.
Overrides:
equals in class Object
Parameters:
obj - the object with which to compare this object
Returns:
true if the two objects are equal; false otherwise
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class OutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--org.omg.CORBA.portable.OutputStream
Direct Known Subclasses:
OutputStream
public abstract class OutputStream
extends OutputStream

OuputStream is the Java API for writing IDL types to CDR marshal streams. These methods are used by the ORB to marshal IDL types as well as to insert IDL types into Anys. The _array versions of the methods can be directly used to write sequences and arrays of IDL types.

Since:
JDK1.2

Constructor Summary
OutputStream()
Method Summary
abstract InputStream | create_input_stream() Returns an input stream with the same buffer.
ORB | orb() Returns the ORB that created this OutputStream.
abstract void | write_any(Any value) Writes an Any on this output stream.
abstract void | write_boolean_array(boolean[] value, int offset, int length) Writes an array of booleans on this output stream.
abstract void | write_boolean(boolean value) Writes a boolean value to this stream.
abstract void | write_char_array(char[] value, int offset, int length) Writes an array of chars on this output stream.
abstract void | write_char(char value) Writes a char value to this stream.
void | write_Context(Context ctx, ContextList contexts) Writes a CORBA context on this stream.
abstract void | write_double_array(double[] value, int offset, int length) Writes an array of doubles on this output stream.
abstract void | write_double(double value) Writes a double value to this stream.
void | write_fixed(BigDecimal value) Writes a BigDecimal number.
abstract void | write_float_array(float[] value, int offset, int length) Writes an array of floats on this output stream.
abstract void | write_float(float value) Writes a float value to this stream.
abstract void | write_long_array(int[] value, int offset, int length) Writes an array of CORBA longs (i.e.
abstract void | write_long(int value) Writes a CORBA long (i.e.
abstract void | write_longlong_array(long[] value, int offset, int length) Writes an array of CORBA longlongs (i.e.
abstract void | write_longlong(long value) Writes a CORBA longlong (i.e.
abstract void | write_Object(Object value) Writes a CORBA Object on this output stream.
abstract void | write_octet_array(byte[] value, int offset, int length) Writes an array of CORBA octets (bytes) on this output stream.
abstract void | write_octet(byte value) Writes a CORBA octet (i.e.
abstract void | write_Principal(Principal value) Deprecated. Deprecated by CORBA 2.2.
abstract void | write_short_array(short[] value, int offset, int length) Writes an array of shorts on this output stream.
abstract void | write_short(short value) Writes a short value to this stream.
abstract void | write_string(String value) Writes a string value to this stream.
abstract void | write_TypeCode(TypeCode value) Writes a TypeCode on this output stream.
abstract void | write_ulong_array(int[] value, int offset, int length) Writes an array of unsigned CORBA longs (i.e.
abstract void | write_ulong(int value) Writes an unsigned CORBA long (i.e.
abstract void | write_ulonglong_array(long[] value, int offset, int length) Writes an array of unsigned CORBA longlongs (i.e.
abstract void | write_ulonglong(long value) Writes an unsigned CORBA longlong (i.e.
abstract void | write_ushort_array(short[] value, int offset, int length) Writes an array of unsigned shorts on this output stream.
abstract void | write_ushort(short value) Writes an unsigned short value to this stream.
abstract void | write_wchar_array(char[] value, int offset, int length) Writes an array of wide chars on this output stream.
abstract void | write_wchar(char value) Writes a wide char value to this stream.
abstract void | write_wstring(String value) Writes a wide string value to this stream.
void | write(int b) Writes an integer (length of arrays) onto this stream.
Methods inherited from class java.io.OutputStream
close, flush, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OutputStream

public OutputStream()
Method Detail

create_input_stream

public abstract InputStream create_input_stream()
Returns an input stream with the same buffer.
Returns:
an input stream with the same buffer.

write_boolean

public abstract void write_boolean(boolean value)
Writes a boolean value to this stream.
Parameters:
value - the value to be written.

write_char

public abstract void write_char(char value)
Writes a char value to this stream.
Parameters:
value - the value to be written.

write_wchar

public abstract void write_wchar(char value)
Writes a wide char value to this stream.
Parameters:
value - the value to be written.

write_octet

public abstract void write_octet(byte value)
Writes a CORBA octet (i.e. byte) value to this stream.
Parameters:
value - the value to be written.

write_short

public abstract void write_short(short value)
Writes a short value to this stream.
Parameters:
value - the value to be written.

write_ushort

public abstract void write_ushort(short value)
Writes an unsigned short value to this stream.
Parameters:
value - the value to be written.

write_long

public abstract void write_long(int value)
Writes a CORBA long (i.e. Java int) value to this stream.
Parameters:
value - the value to be written.

write_ulong

public abstract void write_ulong(int value)
Writes an unsigned CORBA long (i.e. Java int) value to this stream.
Parameters:
value - the value to be written.

write_longlong

public abstract void write_longlong(long value)
Writes a CORBA longlong (i.e. Java long) value to this stream.
Parameters:
value - the value to be written.

write_ulonglong

public abstract void write_ulonglong(long value)
Writes an unsigned CORBA longlong (i.e. Java long) value to this stream.
Parameters:
value - the value to be written.

write_float

public abstract void write_float(float value)
Writes a float value to this stream.
Parameters:
value - the value to be written.

write_double

public abstract void write_double(double value)
Writes a double value to this stream.
Parameters:
value - the value to be written.

write_string

public abstract void write_string(String value)
Writes a string value to this stream.
Parameters:
value - the value to be written.

write_wstring

public abstract void write_wstring(String value)
Writes a wide string value to this stream.
Parameters:
value - the value to be written.

write_boolean_array

public abstract void write_boolean_array(boolean[] value,
                                         int offset,
                                         int length)
Writes an array of booleans on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_char_array

public abstract void write_char_array(char[] value,
                                      int offset,
                                      int length)
Writes an array of chars on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_wchar_array

public abstract void write_wchar_array(char[] value,
                                       int offset,
                                       int length)
Writes an array of wide chars on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_octet_array

public abstract void write_octet_array(byte[] value,
                                       int offset,
                                       int length)
Writes an array of CORBA octets (bytes) on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_short_array

public abstract void write_short_array(short[] value,
                                       int offset,
                                       int length)
Writes an array of shorts on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_ushort_array

public abstract void write_ushort_array(short[] value,
                                        int offset,
                                        int length)
Writes an array of unsigned shorts on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_long_array

public abstract void write_long_array(int[] value,
                                      int offset,
                                      int length)
Writes an array of CORBA longs (i.e. Java ints) on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_ulong_array

public abstract void write_ulong_array(int[] value,
                                       int offset,
                                       int length)
Writes an array of unsigned CORBA longs (i.e. Java ints) on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_longlong_array

public abstract void write_longlong_array(long[] value,
                                          int offset,
                                          int length)
Writes an array of CORBA longlongs (i.e. Java longs) on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_ulonglong_array

public abstract void write_ulonglong_array(long[] value,
                                           int offset,
                                           int length)
Writes an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_float_array

public abstract void write_float_array(float[] value,
                                       int offset,
                                       int length)
Writes an array of floats on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_double_array

public abstract void write_double_array(double[] value,
                                        int offset,
                                        int length)
Writes an array of doubles on this output stream.
Parameters:
value - the array to be written.
offset - offset on the stream.
length - length of buffer to write.

write_Object

public abstract void write_Object(Object value)
Writes a CORBA Object on this output stream.
Parameters:
value - the value to be written.

write_TypeCode

public abstract void write_TypeCode(TypeCode value)
Writes a TypeCode on this output stream.
Parameters:
value - the value to be written.

write_any

public abstract void write_any(Any value)
Writes an Any on this output stream.
Parameters:
value - the value to be written.

write_Principal

public abstract void write_Principal(Principal value)
Deprecated. Deprecated by CORBA 2.2.

Writes a Principle on this output stream.
Parameters:
value - the value to be written.

write

public void write(int b)
           throws IOException
Writes an integer (length of arrays) onto this stream.
Overrides:
write in class OutputStream
Parameters:
b - the value to be written.
See Also:
portable package comments for unimplemented features

write_fixed

public void write_fixed(BigDecimal value)
Writes a BigDecimal number.
Parameters:
value - a BidDecimal--value to be written.
See Also:
portable package comments for unimplemented features

write_Context

public void write_Context(Context ctx,
                          ContextList contexts)
Writes a CORBA context on this stream. The Context is marshaled as a sequence of strings. Only those Context values specified in the contexts parameter are actually written.
Parameters:
a - CORBA context.
See Also:
portable package comments for unimplemented features

orb

public ORB orb()
Returns the ORB that created this OutputStream.
Returns:
the ORB that created this OutputStream.
See Also:
portable package comments for unimplemented features
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package org.omg.CORBA.portable

Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

See:
Description

Interface Summary
BoxedValueHelper |
CustomValue |
IDLEntity | An interface with no members whose only purpose is to serve as a marker indicating that an implementing class is a Java value type from IDL that has a corresponding Helper class.
InvokeHandler | This interface provides a dispatching mechanism for an incoming call.
ResponseHandler | This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.
Streamable | The base class for the Holder classess of all complex IDL types.
StreamableValue | Defines the base type for all non-boxed IDL valuetypes that are not custom marshaled.
ValueBase | The generated Java classes corresponding to valuetype IDL types implement this interface.
ValueFactory | The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory.

Class Summary
Delegate | Specifies a portable API for ORB-vendor-specific implementation of the org.omg.CORBA.Object methods.
InputStream | InputStream is the Java API for reading IDL types from CDR marshal streams.
ObjectImpl | The common base class for all stub classes; provides default implementations of the org.omg.CORBA.Object methods.
OutputStream | OuputStream is the Java API for writing IDL types to CDR marshal streams.
ServantObject | This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e.

Exception Summary
ApplicationException | This class is used for reporting application level exceptions between ORBs and stubs.
IndirectionException | The Indirection exception is a Java specific system exception.
RemarshalException | This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB.
UnknownException | The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs.

Package org.omg.CORBA.portable Description

Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB. Stubs and other code, generated either from IDL or interfaces written in the Java programming language, can call into these ORB APIs.

CORBA Features Not Implemented in Java IDL

Some of the API included in org.omg.CORBA is provided for conformance with the current OMG CORBA specification but is not implemented in Sun's release of the JDKTM. This enables other JDK licensees to provide implementations of this API in standard extensions and products.

List of Unimplemented Features in Package org.omg.CORBA.portable

Unimplemented Interfaces in package org.omg.CORBA.portable

  • InvokeHandler
  • ResponseHandler

Unimplemented Methods in package org.omg.CORBA.portable

  • InputStream
    • public int read()
    • public.math.BigDecimal read_fixed()
    • public org.omg.CORBA.Context read_Context()
    • public org.omg.CORBA.Object read_Object(java.lang.Class clz)
    • public org.omg.CORBA.ORB orb()
  • OutputStream
    • public org.omg.CORBA.ORB orb()
    • public void write_Context(org.omg.CORBA.Context ctx, org.omg.CORBA.ContextList contexts)
    • public void write_fixed(java.math.BigDecimal value)
    • public void write(int b)
  • Delegate
    • public void releaseReply(org.omg.CORBA.Object self, InputStream input)
    • public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    • public OutputStream request(org.omg.CORBA.Object self, String operation, boolean responseExpected)
    • public org.omg.CORBA.Object set_policy_override(org.omg.CORBA.Object self, org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)
    • public org.omg.CORBA.DomainManager[] get_domain_managers( org.omg.CORBA.Object self)
    • public org.omg.CORBA.Policy get_policy(org.omg.CORBA.Object self, int policy_type)

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


RemarshalException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class RemarshalException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.portable.RemarshalException
All Implemented Interfaces:
Serializable
public final class RemarshalException
extends Exception

This class is used for reporting locate forward exceptions and object forward GIOP messages back to the ORB. In this case the ORB must remarshal the request before trying again. Stubs which use the stream-based model shall catch the RemarshalException which is potentially thrown from the _invoke() method of ObjectImpl. Upon catching the exception, the stub shall immediately remarshal the request by calling _request(), marshalling the arguments (if any), and then calling _invoke(). The stub shall repeat this process until _invoke() returns normally or raises some exception other than RemarshalException.

See Also:
Serialized Form

Constructor Summary
RemarshalException()
Constructs a RemarshalException.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RemarshalException

public RemarshalException()
Constructs a RemarshalException.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResponseHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface ResponseHandler

public interface ResponseHandler

This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results.

Method Summary
OutputStream | createExceptionReply() Called by the servant during a method invocation.
OutputStream | createReply() Called by the servant during a method invocation.

Method Detail

createReply

public OutputStream createReply()
Called by the servant during a method invocation. The servant should call this method to create a reply marshal buffer if no exception occurred.
Returns:
an OutputStream suitable for marshalling the reply.
See Also:
portable package comments for unimplemented features

createExceptionReply

public OutputStream createExceptionReply()
Called by the servant during a method invocation. The servant should call this method to create a reply marshal buffer if a user exception occurred.
Returns:
an OutputStream suitable for marshalling the exception ID and the user exception body.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServantObject

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class ServantObject

java.lang.Object
  |
  +--org.omg.CORBA.portable.ServantObject
public class ServantObject
extends Object

This class is part of the local stub API, the purpose of which is to provide high performance calls for collocated clients and servers (i.e. clients and servers residing in the same Java VM). The local stub API is supported via three additional methods on ObjectImpl and Delegate. ORB vendors may subclass this class to return additional request state that may be required by their implementations.

See Also:
ObjectImpl, Delegate

Field Summary
 Object servant
The real servant.
Constructor Summary
ServantObject()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

servant

public Object servant
The real servant. The local stub may cast this field to the expected type, and then invoke the operation directly. Note, the object may or may not be the actual servant instance.
Constructor Detail

ServantObject

public ServantObject()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UnknownException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Class UnknownException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.portable.UnknownException
All Implemented Interfaces:
Serializable
public class UnknownException
extends SystemException

The org.omg.CORBA.portable.UnknownException is used for reporting unknown exceptions between ties and ORBs and between ORBs and stubs. It provides a Java representation of an UNKNOWN system exception that has an UnknownExceptionInfo service context. If the CORBA system exception org.omg.CORBA.portable.UnknownException is thrown, then the stub does one of the following: (1) Translates it to org.omg.CORBA.UNKNOWN. (2) Translates it to the nested exception that the UnknownException contains. (3) Passes it on directly to the user.

See Also:
Serialized Form

Field Summary
 Throwable originalEx
A throwable--the original exception that was wrapped in a CORBA UnknownException.
Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
UnknownException(Throwable ex)
Constructs an UnknownException object.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

originalEx

public Throwable originalEx
A throwable--the original exception that was wrapped in a CORBA UnknownException.
Constructor Detail

UnknownException

public UnknownException(Throwable ex)
Constructs an UnknownException object.
Parameters:
ex - a Throwable object--to be wrapped in this exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ValueFactory

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable
Interface ValueFactory

public interface ValueFactory

The ValueFactory interface is the native mapping for the IDL type CORBA::ValueFactory. The read_value() method is called by the ORB runtime while in the process of unmarshaling a value type. A user shall implement this method as part of implementing a type specific value factory. In the implementation, the user shall call is.read_value(java.io.Serializable) with a uninitialized valuetype to use for unmarshaling. The value returned by the stream is the same value passed in, with all the data unmarshaled.

See Also:
ORB

Method Summary
 Serializable read_value(InputStream is)
Is called by the ORB runtime while in the process of unmarshaling a value type.

Method Detail

read_value

public Serializable read_value(InputStream is)
Is called by the ORB runtime while in the process of unmarshaling a value type. A user shall implement this method as part of implementing a type specific value factory.
Parameters:
is - an InputStream object--from which the value will be read.
Returns:
a Serializable object--the value read off of "is" Input stream.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Principal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Principal

java.lang.Object
  |
  +--org.omg.CORBA.Principal
Deprecated. Deprecated by CORBA 2.2.

public abstract class Principal
extends Object

A class that contains information about the identity of the client, for access control and other purposes. It contains a single attribute, the name of the Principal, encoded as a sequence of bytes.

Constructor Summary
Principal()
Deprecated.
Method Summary
abstract byte[] | name() Deprecated. Deprecated by CORBA 2.2.
abstract void | name(byte[] value) Deprecated. Deprecated by CORBA 2.2.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Principal

public Principal()
Deprecated.
Method Detail

name

public abstract void name(byte[] value)
Deprecated. Deprecated by CORBA 2.2.

Sets the name of this Principal object to the given value.
Parameters:
value - the value to be set in the Principal

name

public abstract byte[] name()
Deprecated. Deprecated by CORBA 2.2.

Gets the name of this Principal object.
Returns:
the name of this Principal object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrincipalHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class PrincipalHolder

java.lang.Object
  |
  +--org.omg.CORBA.PrincipalHolder
All Implemented Interfaces:
Streamable
Deprecated. Deprecated by CORBA 2.2.

public final class PrincipalHolder
extends Object
implements Streamable

A container class for values of type Principal that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL Principal as an "out" or "inout" parameter, the programmer must pass an instance of PrincipalHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myPrincipalHolder is an instance of PrincipalHolder, the value stored in its value field can be accessed with myPrincipalHolder.value.

Since:
JDK1.2

Field Summary
 Principal value
Deprecated. The Principal value held by this PrincipalHolder object.
Constructor Summary
PrincipalHolder()
Deprecated. Constructs a new PrincipalHolder object with its value field initialized to null.
PrincipalHolder(Principal initial)
Deprecated. Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.
Method Summary
void | _read(InputStream input) Deprecated. Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Deprecated. Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream output) Deprecated. Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Principal value
Deprecated.
The Principal value held by this PrincipalHolder object.
Constructor Detail

PrincipalHolder

public PrincipalHolder()
Deprecated.
Constructs a new PrincipalHolder object with its value field initialized to null.

PrincipalHolder

public PrincipalHolder(Principal initial)
Deprecated.
Constructs a new PrincipalHolder object with its value field initialized to the given Principal object.
Parameters:
initial - the Principal with which to initialize the value field of the newly-created PrincipalHolder object
Method Detail

_read

public void _read(InputStream input)
Deprecated.
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream output)
Deprecated.
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Deprecated.
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PRIVATE_MEMBER

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface PRIVATE_MEMBER

public interface PRIVATE_MEMBER

PRIVATE_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type. The other constant is PUBLIC_MEMBER.

Field Summary
static short value
Constant to define a private member in the ValueMember class

Field Detail

value

public static final short value
Constant to define a private member in the ValueMember class
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PUBLIC_MEMBER

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface PUBLIC_MEMBER

public interface PUBLIC_MEMBER

PUBLIC_MEMBER is one of the two constants of typedef Visibility used in the interface repository to identify visibility of a ValueMember type. The other constant is PRIVATE_MEMBER.

Field Summary
static short value
Constant to define a public member in the ValueMember class

Field Detail

value

public static final short value
Constant to define a public member in the ValueMember class
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepositoryIdHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class RepositoryIdHelper

java.lang.Object
  |
  +--org.omg.CORBA.RepositoryIdHelper
public abstract class RepositoryIdHelper
extends Object

org/omg/CORBA/RepositoryIdHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

Constructor Summary
RepositoryIdHelper()
Method Summary
static String | extract(Any a)
static String | id()
static void | insert(Any a, String that)
static String | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RepositoryIdHelper

public RepositoryIdHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

write

public static void write(OutputStream ostream,
                         String value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Request

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class Request

java.lang.Object
  |
  +--org.omg.CORBA.Request
public abstract class Request
extends Object

An object containing the information necessary for invoking a method. This class is the cornerstone of the ORB Dynamic Invocation Interface (DII), which allows dynamic creation and invocation of requests. A server cannot tell the difference between a client invocation using a client stub and a request using the DII.

A Request object consists of:

  • the name of the operation to be invoked
  • an NVList containing arguments for the operation.
    Each item in the list is a NamedValue object, which has three parts:
    1. the name of the argument
    2. the value of the argument (as an Any object)
    3. the argument mode flag indicating whether the argument is for input, output, or both

Request objects may also contain additional information, depending on how an operation was defined in the original IDL interface definition. For example, where appropriate, they may contain a NamedValue object to hold the return value or exception, a context, a list of possible exceptions, and a list of context strings that need to be resolved.

New Request objects are created using one of the create_request methods in the Object class. In other words, a create_request method is performed on the object which is to be invoked.

See Also:
NamedValue

Constructor Summary
Request()
Method Summary
abstract Any | add_in_arg() Creates an input argument and adds it to this Request object.
abstract Any | add_inout_arg() Adds an input/output argument to this Request object.
abstract Any | add_named_in_arg(String name) Creates an input argument with the given name and adds it to this Request object.
abstract Any | add_named_inout_arg(String name) Adds an input/output argument with the given name to this Request object.
abstract Any | add_named_out_arg(String name) Adds an output argument with the given name to this Request object.
abstract Any | add_out_arg() Adds an output argument to this Request object.
abstract NVList | arguments() Retrieves the NVList object containing the arguments to the method being invoked.
abstract ContextList | contexts() Retrieves the ContextList object for this request.
abstract Context | ctx() Retrieves the Context object for this request.
abstract void | ctx(Context c) Sets this request's Context object to the one given.
abstract Environment | env() Retrieves the Environment object for this request.
abstract ExceptionList | exceptions() Retrieves the ExceptionList object for this request.
abstract void | get_response() Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
abstract void | invoke() Makes a synchronous invocation using the information in the Request object.
abstract String | operation() Retrieves the name of the method to be invoked.
abstract boolean | poll_response() Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
abstract NamedValue | result() Retrieves the NamedValue object containing the return value for the method.
abstract Any | return_value() Returns the Any object that contains the value for the result of the method.
abstract void | send_deferred() Makes an asynchronous invocation on the request.
abstract void | send_oneway() Makes a oneway invocation on the request.
abstract void | set_return_type(TypeCode tc) Sets the typecode for the return value of the method.
abstract Object | target() Retrieves the the target object reference.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Request

public Request()
Method Detail

target

public abstract Object target()
Retrieves the the target object reference.
Returns:
the object reference that points to the object implementation for the method to be invoked

operation

public abstract String operation()
Retrieves the name of the method to be invoked.
Returns:
the name of the method to be invoked

arguments

public abstract NVList arguments()
Retrieves the NVList object containing the arguments to the method being invoked. The elements in the list are NamedValue objects, with each one describing an argument to the method.
Returns:
the NVList object containing the arguments for the method

result

public abstract NamedValue result()
Retrieves the NamedValue object containing the return value for the method.
Returns:
the NamedValue object containing the result of the method

env

public abstract Environment env()
Retrieves the Environment object for this request. It contains the exception that the method being invoked has thrown (after the invocation returns).
Returns:
the Environment object for this request

exceptions

public abstract ExceptionList exceptions()
Retrieves the ExceptionList object for this request. This list contains TypeCode objects describing the exceptions that may be thrown by the method being invoked.
Returns:
the ExceptionList object describing the exceptions that may be thrown by the method being invoked

contexts

public abstract ContextList contexts()
Retrieves the ContextList object for this request. This list contains context Strings that need to be resolved and sent with the invocation.
Returns:
the list of context strings whose values need to be resolved and sent with the invocation.

ctx

public abstract Context ctx()
Retrieves the Context object for this request. This is a list of properties giving information about the client, the environment, or the circumstances of this request.
Returns:
the Context object that is to be used to resolve any context strings whose values need to be sent with the invocation

ctx

public abstract void ctx(Context c)
Sets this request's Context object to the one given.
Parameters:
c - the new Context object to be used for resolving context strings

add_in_arg

public abstract Any add_in_arg()
Creates an input argument and adds it to this Request object.
Returns:
an Any object that contains the value and typecode for the input argument added

add_named_in_arg

public abstract Any add_named_in_arg(String name)
Creates an input argument with the given name and adds it to this Request object.
Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the input argument added

add_inout_arg

public abstract Any add_inout_arg()
Adds an input/output argument to this Request object.
Returns:
an Any object that contains the value and typecode for the input/output argument added

add_named_inout_arg

public abstract Any add_named_inout_arg(String name)
Adds an input/output argument with the given name to this Request object.
Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the input/output argument added

add_out_arg

public abstract Any add_out_arg()
Adds an output argument to this Request object.
Returns:
an Any object that contains the value and typecode for the output argument added

add_named_out_arg

public abstract Any add_named_out_arg(String name)
Adds an output argument with the given name to this Request object.
Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the output argument added

set_return_type

public abstract void set_return_type(TypeCode tc)
Sets the typecode for the return value of the method.
Parameters:
tc - the TypeCode object containing type information for the return value

return_value

public abstract Any return_value()
Returns the Any object that contains the value for the result of the method.
Returns:
an Any object containing the value and typecode for the return value

invoke

public abstract void invoke()
Makes a synchronous invocation using the information in the Request object. Exception information is placed into the Request object's environment object.

send_oneway

public abstract void send_oneway()
Makes a oneway invocation on the request. In other words, it does not expect or wait for a response. Note that this can be used even if the operation was not declared as oneway in the IDL declaration. No response or exception information is returned.

send_deferred

public abstract void send_deferred()
Makes an asynchronous invocation on the request. In other words, it does not wait for a response before it returns to the user. The user can then later use the methods poll_response and get_response to get the result or exception information for the invocation.

poll_response

public abstract boolean poll_response()
Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
Returns:
true if the method response has been received; false otherwise

get_response

public abstract void get_response()
                           throws WrongTransaction
Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
Throws:
WrongTransaction - if the method get_response was invoked from a different transaction's scope than the one from which the request was originally sent. See the OMG Transaction Service specification for details.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServerRequest

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServerRequest

java.lang.Object
  |
  +--org.omg.CORBA.ServerRequest
public abstract class ServerRequest
extends Object

An object that captures the explicit state of a request for the Dynamic Skeleton Interface (DSI). This class, the cornerstone of the DSI, is analogous to the Request object in the DII.

The ORB is responsible for creating this embodiment of a request, and delivering it to a Dynamic Implementation Routine (DIR). A dynamic servant (a DIR) is created by implementing the DynamicImplementation class, which has a single invoke method. This method accepts a ServerRequest object. The abstract class ServerRequest defines methods for accessing the method name, the arguments and the context of the request, as well as methods for setting the result of the request either as a return value or an exception.

A subtlety with accessing the arguments of the request is that the DIR needs to provide type information about the expected arguments, since there is no compiled information about these. This information is provided through an NVList, which is a list of NamedValue objects. Each NamedValue object contains an Any object, which in turn has a TypeCode object representing the type of the argument.

Similarly, type information needs to be provided for the response, for either the expected result or for an exception, so the methods result and except take an Any object as a parameter.

See Also:
DynamicImplementation, NVList, NamedValue

Constructor Summary
ServerRequest()
Method Summary
 void arguments(NVList args)
Specifies method parameter types and retrieves "in" and "inout" argument values.
abstract  Context ctx()
Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference.
 void except(Any any)
Deprecated. use set_exception()
 String op_name()
Deprecated. use operation()
 String operation()
Retrieves the name of the operation being invoked.
 void params(NVList params)
Deprecated. use the method arguments
 void result(Any any)
Deprecated. use the method set_result
 void set_exception(Any any)
Returns the given exception to the client.
 void set_result(Any any)
Specifies any return value for the call.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ServerRequest

public ServerRequest()
Method Detail

op_name

public String op_name()
Deprecated. use operation()

Retrieves the name of the operation being invoked. According to OMG IDL's rules, these names must be unique among all operations supported by this object's "most-derived" interface. Note that the operation names for getting and setting attributes are _get_<attribute_name> and _set_<attribute_name>, respectively.
Returns:
the name of the operation to be invoked

operation

public String operation()
Retrieves the name of the operation being invoked. According to OMG IDL's rules, these names must be unique among all operations supported by this object's "most-derived" interface. Note that the operation names for getting and setting attributes are _get_ and _set_, respectively.
Returns:
the name of the operation to be invoked
See Also:
CORBA package comments for unimplemented features

params

public void params(NVList params)
Deprecated. use the method arguments

Specifies method parameter types and retrieves "in" and "inout" argument values.

Note that this method is deprecated; use the method arguments in its place.

Unless it calls the method set_exception, the DIR must call this method exactly once, even if the method signature contains no parameters. Once the method arguments or set_exception has been called, calling arguments on the same ServerRequest object will result in a BAD_INV_ORDER system exception. The DIR must pass in to the method arguments an NVList initialized with TypeCodes and Flags describing the parameter types for the operation, in the order in which they appear in the IDL specification (left to right). A potentially-different NVList will be returned from arguments, with the "in" and "inout" argument values supplied. If it does not call the method set_exception, the DIR must supply the returned NVList with return values for any "out" arguments before returning, and may also change the return values for any "inout" arguments.

Parameters:
params - the arguments of the method, in the form of an NVList object

arguments

public void arguments(NVList args)
Specifies method parameter types and retrieves "in" and "inout" argument values. Unless it calls the method set_exception, the DIR must call this method exactly once, even if the method signature contains no parameters. Once the method arguments or set_exception has been called, calling arguments on the same ServerRequest object will result in a BAD_INV_ORDER system exception. The DIR must pass in to the method arguments an NVList initialized with TypeCodes and Flags describing the parameter types for the operation, in the order in which they appear in the IDL specification (left to right). A potentially-different NVList will be returned from arguments, with the "in" and "inout" argument values supplied. If it does not call the method set_exception, the DIR must supply the returned NVList with return values for any "out" arguments before returning, and it may also change the return values for any "inout" arguments.
Parameters:
args - the arguments of the method, in the form of an NVList
See Also:
CORBA package comments for unimplemented features

result

public void result(Any any)
Deprecated. use the method set_result

Specifies any return value for the call.

Note that this method is deprecated; use the method set_result in its place.

Unless the method set_exception is called, if the invoked method has a non-void result type, the method set_result must be called exactly once before the DIR returns. If the operation has a void result type, the method set_result may optionally be called once with an Any object whose type is tk_void. Calling the method set_result before the method arguments has been called or after the method set_result or set_exception has been called will result in a BAD_INV_ORDER exception. Calling the method set_result without having previously called the method ctx when the IDL operation contains a context expression, or when the NVList passed to arguments did not describe all parameters passed by the client, may result in a MARSHAL system exception.

set_result

public void set_result(Any any)
Specifies any return value for the call. Unless the method set_exception is called, if the invoked method has a non-void result type, the method set_result must be called exactly once before the DIR returns. If the operation has a void result type, the method set_result may optionally be called once with an Any object whose type is tk_void. Calling the method set_result before the method arguments has been called or after the method set_result or set_exception has been called will result in a BAD_INV_ORDER exception. Calling the method set_result without having previously called the method ctx when the IDL operation contains a context expression, or when the NVList passed to arguments did not describe all parameters passed by the client, may result in a MARSHAL system exception.
See Also:
CORBA package comments for unimplemented features

except

public void except(Any any)
Deprecated. use set_exception()

The DIR may call set_exception at any time to return an exception to the client. The Any passed to set_exception must contain either a system exception or a user exception specified in the raises expression of the invoked operation's IDL definition. Passing in an Any that does not contain an exception will result in a BAD_PARAM system exception. Passing in an unlisted user exception will result in either the DIR receiving a BAD_PARAM system exception or in the client receiving an UNKNOWN_EXCEPTION system exception.
Parameters:
any - the Any object containing the exception

set_exception

public void set_exception(Any any)
Returns the given exception to the client. This method is invoked by the DIR, which may call it at any time. The Any object passed to this method must contain either a system exception or one of the user exceptions specified in the invoked operation's IDL definition. Passing in an Any object that does not contain an exception will cause a BAD_PARAM system exception to be thrown. Passing in an unlisted user exception will result in either the DIR receiving a BAD_PARAM system exception or in the client receiving an UNKNOWN_EXCEPTION system exception.
Parameters:
any - the Any object containing the exception
Throws:
BAD_PARAM - if the given Any object does not contain an exception or the exception is an unlisted user exception
UNKNOWN_EXCEPTION - if the given exception is an unlisted user exception and the DIR did not receive a BAD_PARAM exception
See Also:
CORBA package comments for unimplemented features

ctx

public abstract Context ctx()
Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nil Context reference. Calling the method ctx before the method arguments has been called or after the method ctx, set_result, or set_exception has been called will result in a BAD_INV_ORDER system exception.
Returns:
the context object that is to be used to resolve any context strings whose values need to be sent with the invocation.
Throws:
BAD_INV_ORDER - if (1) the method ctx is called before the method arguments or (2) the method ctx is called after calling set_result or set_exception
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceDetail

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServiceDetail

java.lang.Object
  |
  +--org.omg.CORBA.ServiceDetail
All Implemented Interfaces:
IDLEntity, Serializable
public final class ServiceDetail
extends Object
implements IDLEntity

An object that represents an ORB service. Its service_detail_type field contains the type of the ORB service, and its service_detail field contains a description of the ORB service..

See Also:
Serialized Form

Field Summary
byte[] | service_detail The data describing the ORB service that this ServiceDetail object represents.
int | service_detail_type The type of the ORB service that this ServiceDetail object represents.
Constructor Summary
ServiceDetail()
Constructs a ServiceDetail object with 0 for the type of ORB service and an empty description.
ServiceDetail(int service_detail_type, byte[] service_detail)
Constructs a ServiceDetail object with the given ORB service type and the given description.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

service_detail_type

public int service_detail_type
The type of the ORB service that this ServiceDetail object represents.

service_detail

public byte[] service_detail
The data describing the ORB service that this ServiceDetail object represents.
Constructor Detail

ServiceDetail

public ServiceDetail()
Constructs a ServiceDetail object with 0 for the type of ORB service and an empty description.

ServiceDetail

public ServiceDetail(int service_detail_type,
                     byte[] service_detail)
Constructs a ServiceDetail object with the given ORB service type and the given description.
Parameters:
service_detail_type - an int specifying the type of ORB service
service_detail - a byte array describing the ORB service
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceDetailHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServiceDetailHelper

java.lang.Object
  |
  +--org.omg.CORBA.ServiceDetailHelper
public class ServiceDetailHelper
extends Object

Method Summary
static ServiceDetail | extract(Any a)
static String | id()
static void | insert(Any a, ServiceDetail that)
static ServiceDetail | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, ServiceDetail that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         ServiceDetail that)

read

public static ServiceDetail read(InputStream in)

extract

public static ServiceDetail extract(Any a)

insert

public static void insert(Any a,
                          ServiceDetail that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceInformation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServiceInformation

java.lang.Object
  |
  +--org.omg.CORBA.ServiceInformation
All Implemented Interfaces:
IDLEntity, Serializable
public final class ServiceInformation
extends Object
implements IDLEntity

ServiceInformation is an IDL struct in the CORBA module. It stores information about a CORBA service available in the ORB implementation. It is obtained from the ORB.get_service_information method.

See Also:
Serialized Form

Field Summary
ServiceDetail[] | service_details
int[] | service_options
Constructor Summary
ServiceInformation()
ServiceInformation(int[] __service_options, ServiceDetail[] __service_details)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

service_options

public int[] service_options

service_details

public ServiceDetail[] service_details
Constructor Detail

ServiceInformation

public ServiceInformation()

ServiceInformation

public ServiceInformation(int[] __service_options,
                          ServiceDetail[] __service_details)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceInformationHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServiceInformationHelper

java.lang.Object
  |
  +--org.omg.CORBA.ServiceInformationHelper
public class ServiceInformationHelper
extends Object

Method Summary
static ServiceInformation | extract(Any a)
static String | id()
static void | insert(Any a, ServiceInformation that)
static ServiceInformation | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, ServiceInformation that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         ServiceInformation that)

read

public static ServiceInformation read(InputStream in)

extract

public static ServiceInformation extract(Any a)

insert

public static void insert(Any a,
                          ServiceInformation that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ServiceInformationHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ServiceInformationHolder

java.lang.Object
  |
  +--org.omg.CORBA.ServiceInformationHolder
All Implemented Interfaces:
Streamable
public final class ServiceInformationHolder
extends Object
implements Streamable

A Holder class for a ServiceInformation object that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL xxx as an "out" or "inout" parameter, the programmer must pass an instance of ServiceInformationHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myServiceInformationHolder is an instance of ServiceInformationHolder, the value stored in its value field can be accessed with myServiceInformationHolder.value.

Field Summary
 ServiceInformation value
The ServiceInformation value held by this ServiceInformationHolder object in its value field.
Constructor Summary
ServiceInformationHolder()
Constructs a new ServiceInformationHolder object with its value field initialized to null.
ServiceInformationHolder(ServiceInformation arg)
Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.
Method Summary
void | _read(InputStream in) Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
TypeCode | _type() Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
void | _write(OutputStream out) Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public ServiceInformation value
The ServiceInformation value held by this ServiceInformationHolder object in its value field.
Constructor Detail

ServiceInformationHolder

public ServiceInformationHolder()
Constructs a new ServiceInformationHolder object with its value field initialized to null.

ServiceInformationHolder

public ServiceInformationHolder(ServiceInformation arg)
Constructs a new ServiceInformationHolder object with its value field initialized to the given ServiceInformation object.
Parameters:
arg - the ServiceInformation object with which to initialize the value field of the newly-created ServiceInformationHolder object
Method Detail

_write

public void _write(OutputStream out)
Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
Specified by:
_write in interface Streamable
Parameters:
out - the OutputStream object that will contain the CDR formatted data

_read

public void _read(InputStream in)
Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
Specified by:
_read in interface Streamable
Parameters:
in - the InputStream object containing CDR formatted data from the wire

_type

public TypeCode _type()
Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
Specified by:
_type in interface Streamable
Returns:
the type code for the value held in this ServiceInformationHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SetOverrideType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class SetOverrideType

java.lang.Object
  |
  +--org.omg.CORBA.SetOverrideType
All Implemented Interfaces:
IDLEntity, Serializable
public class SetOverrideType
extends Object
implements IDLEntity

The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.

The method omg.org.CORBA.Object._set_policy_override takes either SetOverrideType.SET_OVERRIDE or SetOverrideType.ADD_OVERRIDE as its second argument. The method _set_policy_override creates a new Object initialized with the Policy objects supplied as the first argument. If the second argument is ADD_OVERRIDE, the new policies are added to those of the Object instance that is calling the _set_policy_override method. If SET_OVERRIDE is given instead, the existing policies are replaced with the given ones.

Since:
JDK1.2
See Also:
Serialized Form

Field Summary
static int | _ADD_OVERRIDE The int constant for the enum value ADD_OVERRIDE.
static int | _SET_OVERRIDE The int constant for the enum value SET_OVERRIDE.
static SetOverrideType | ADD_OVERRIDE The SetOverrideType constant for the enum value ADD_OVERRIDE.
static SetOverrideType | SET_OVERRIDE The SetOverrideType constant for the enum value SET_OVERRIDE.
Constructor Summary
protected SetOverrideType(int _value)
Constructs the SetOverrideType instance given a int.
Method Summary
static SetOverrideType | from_int(int i) Converts the given int to the corresponding SetOverrideType instance.
int | value() Retrieves the value of this SetOverrideType instance.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_SET_OVERRIDE

public static final int _SET_OVERRIDE
The int constant for the enum value SET_OVERRIDE.

_ADD_OVERRIDE

public static final int _ADD_OVERRIDE
The int constant for the enum value ADD_OVERRIDE.

SET_OVERRIDE

public static final SetOverrideType SET_OVERRIDE
The SetOverrideType constant for the enum value SET_OVERRIDE.

ADD_OVERRIDE

public static final SetOverrideType ADD_OVERRIDE
The SetOverrideType constant for the enum value ADD_OVERRIDE.
Constructor Detail

SetOverrideType

protected SetOverrideType(int _value)
Constructs the SetOverrideType instance given a int.
Parameters:
_value - the value that is passed in could be one of SET_OVERRIDE or ADD_OVERRIDE
Method Detail

value

public int value()
Retrieves the value of this SetOverrideType instance.
Returns:
the int for this SetOverrideType instance.

from_int

public static SetOverrideType from_int(int i)
                                throws BAD_PARAM
Converts the given int to the corresponding SetOverrideType instance.
Parameters:
i - the int to convert. It must be one of the int constants in the class SetOverrideType.
Returns:
the SetOverrideType instance whose value matches the given int
Throws:
BAD_PARAM - if the given int does not match the value of any SetOverrideType instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SetOverrideTypeHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class SetOverrideTypeHelper

java.lang.Object
  |
  +--org.omg.CORBA.SetOverrideTypeHelper
public abstract class SetOverrideTypeHelper
extends Object

org/omg/CORBA/SetOverrideTypeHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" 03 June 1999 11:52:03 o'clock GMT+00:00

Constructor Summary
SetOverrideTypeHelper()
Method Summary
static SetOverrideType | extract(Any a)
static String | id()
static void | insert(Any a, SetOverrideType that)
static SetOverrideType | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, SetOverrideType value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SetOverrideTypeHelper

public SetOverrideTypeHelper()
Method Detail

insert

public static void insert(Any a,
                          SetOverrideType that)

extract

public static SetOverrideType extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static SetOverrideType read(InputStream istream)

write

public static void write(OutputStream ostream,
                         SetOverrideType value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ShortHolder

java.lang.Object
  |
  +--org.omg.CORBA.ShortHolder
All Implemented Interfaces:
Streamable
public final class ShortHolder
extends Object
implements Streamable

A Holder class for a short that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL short as an "out" or "inout" parameter, the programmer must pass an instance of ShortHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myShortHolder is an instance of ShortHolder, the value stored in its value field can be accessed with myShortHolder.value.

Since:
JDK1.2

Field Summary
 short value
The short value held by this ShortHolder object.
Constructor Summary
ShortHolder()
Constructs a new ShortHolder object with its value field initialized to 0.
ShortHolder(short initial)
Constructs a new ShortHolder object with its value field initialized to the given short.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
TypeCode | _type() Returns the TypeCode corresponding to the value held in this ShortHolder object.
void | _write(OutputStream output) Marshals to output the value in this ShortHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public short value
The short value held by this ShortHolder object.
Constructor Detail

ShortHolder

public ShortHolder()
Constructs a new ShortHolder object with its value field initialized to 0.

ShortHolder

public ShortHolder(short initial)
Constructs a new ShortHolder object with its value field initialized to the given short.
Parameters:
initial - the short with which to initialize the value field of the newly-created ShortHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire.

_write

public void _write(OutputStream output)
Marshals to output the value in this ShortHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data.

_type

public TypeCode _type()
Returns the TypeCode corresponding to the value held in this ShortHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this ShortHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ShortSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.ShortSeqHelper
public final class ShortSeqHelper
extends Object

org/omg/CORBA/ShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
ShortSeqHelper()
Method Summary
static short[] | extract(Any a)
static String | id()
static void | insert(Any a, short[] that)
static short[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, short[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShortSeqHelper

public ShortSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          short[] that)

extract

public static short[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static short[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         short[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ShortSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.ShortSeqHolder
All Implemented Interfaces:
Streamable
public final class ShortSeqHolder
extends Object
implements Streamable

org/omg/CORBA/ShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 short[] value
Constructor Summary
ShortSeqHolder()
ShortSeqHolder(short[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public short[] value
Constructor Detail

ShortSeqHolder

public ShortSeqHolder()

ShortSeqHolder

public ShortSeqHolder(short[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class StringHolder

java.lang.Object
  |
  +--org.omg.CORBA.StringHolder
All Implemented Interfaces:
Streamable
public final class StringHolder
extends Object
implements Streamable

A Holder class for a String that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL string as an "out" or "inout" parameter, the programmer must pass an instance of StringHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myStringHolder is an instance of StringHolder, the value stored in its value field can be accessed with myStringHolder.value.

Since:
JDK1.2

Field Summary
 String value
The String value held by this StringHolder object.
Constructor Summary
StringHolder()
Constructs a new StringHolder object with its value field initialized to null.
StringHolder(String initial)
Constructs a new StringHolder object with its value field initialized to the given String.
Method Summary
void | _read(InputStream input) Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
TypeCode | _type() Retreives the TypeCode object that corresponds to the value held in this StringHolder object.
void | _write(OutputStream output) Marshals the value held by this StringHolder object to the output stream output.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public String value
The String value held by this StringHolder object.
Constructor Detail

StringHolder

public StringHolder()
Constructs a new StringHolder object with its value field initialized to null.

StringHolder

public StringHolder(String initial)
Constructs a new StringHolder object with its value field initialized to the given String.
Parameters:
initial - the String with which to initialize the value field of the newly-created StringHolder object
Method Detail

_read

public void _read(InputStream input)
Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire.

_write

public void _write(OutputStream output)
Marshals the value held by this StringHolder object to the output stream output.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data.

_type

public TypeCode _type()
Retreives the TypeCode object that corresponds to the value held in this StringHolder object.
Specified by:
_type in interface Streamable
Returns:
the type code of the value held in this StringHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringValueHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class StringValueHelper

java.lang.Object
  |
  +--org.omg.CORBA.StringValueHelper
All Implemented Interfaces:
BoxedValueHelper
public final class StringValueHelper
extends Object
implements BoxedValueHelper

org/omg/CORBA/StringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00

Constructor Summary
StringValueHelper()
Method Summary
static String | extract(Any a)
String | get_id()
static String | id()
static void | insert(Any a, String that)
Serializable | read_value(InputStream istream)
static String | read(InputStream istream)
static TypeCode | type()
void | write_value(OutputStream ostream, Serializable value)
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringValueHelper

public StringValueHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

read_value

public Serializable read_value(InputStream istream)
Specified by:
read_value in interface BoxedValueHelper

write

public static void write(OutputStream ostream,
                         String value)

write_value

public void write_value(OutputStream ostream,
                        Serializable value)
Specified by:
write_value in interface BoxedValueHelper

get_id

public String get_id()
Specified by:
get_id in interface BoxedValueHelper
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StructMember

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class StructMember

java.lang.Object
  |
  +--org.omg.CORBA.StructMember
All Implemented Interfaces:
IDLEntity, Serializable
public final class StructMember
extends Object
implements IDLEntity

A description of a member of an IDL struct.

See Also:
Serialized Form

Field Summary
String | name The name of the struct member described by this StructMember object.
TypeCode | type The type of the struct member described by this StructMember object.
IDLType | type_def The typedef that represents the IDL type of the struct member described by this StructMember object.
Constructor Summary
StructMember()
Constructs a default StructMember object.
StructMember(String __name, TypeCode __type, IDLType __type_def)
Constructs a StructMember object initialized with the given values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name
The name of the struct member described by this StructMember object.

type

public TypeCode type
The type of the struct member described by this StructMember object.

type_def

public IDLType type_def
The typedef that represents the IDL type of the struct member described by this StructMember object.
Constructor Detail

StructMember

public StructMember()
Constructs a default StructMember object.

StructMember

public StructMember(String __name,
                    TypeCode __type,
                    IDLType __type_def)
Constructs a StructMember object initialized with the given values.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StructMemberHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class StructMemberHelper

java.lang.Object
  |
  +--org.omg.CORBA.StructMemberHelper
public abstract class StructMemberHelper
extends Object

org/omg/CORBA/StructMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

Constructor Summary
StructMemberHelper()
Method Summary
static StructMember | extract(Any a)
static String | id()
static void | insert(Any a, StructMember that)
static StructMember | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, StructMember value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StructMemberHelper

public StructMemberHelper()
Method Detail

insert

public static void insert(Any a,
                          StructMember that)

extract

public static StructMember extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static StructMember read(InputStream istream)

write

public static void write(OutputStream ostream,
                         StructMember value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class SystemException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BAD_CONTEXT, BAD_INV_ORDER, BAD_OPERATION, BAD_PARAM, BAD_TYPECODE, COMM_FAILURE, DATA_CONVERSION, FREE_MEM, IMP_LIMIT, IndirectionException, INITIALIZE, INTERNAL, INTF_REPOS, INV_FLAG, INV_IDENT, INV_OBJREF, INV_POLICY, INVALID_TRANSACTION, MARSHAL, NO_IMPLEMENT, NO_MEMORY, NO_PERMISSION, NO_RESOURCES, NO_RESPONSE, OBJ_ADAPTER, OBJECT_NOT_EXIST, PERSIST_STORE, TRANSACTION_REQUIRED, TRANSACTION_ROLLEDBACK, TRANSIENT, UNKNOWN, UnknownException
public abstract class SystemException
extends RuntimeException

The root class for all CORBA standard exceptions. These exceptions may be thrown as a result of any CORBA operation invocation and may also be returned by many standard CORBA API methods. The standard exceptions contain a minor code, allowing more detailed specification, and a completion status. This class is subclassed to generate each one of the set of standard ORB exceptions. SystemException extends java.lang.RuntimeException; thus none of the SystemException exceptions need to be declared in signatures of the Java methods mapped from operations in IDL interfaces.

See Also:
documentation on Java IDL exceptions, Serialized Form

Field Summary
CompletionStatus | completed The status of the operation that threw this exception.
int | minor The CORBA Exception minor code.
Constructor Summary
protected SystemException(String reason, int minor, CompletionStatus completed)
Constructs a SystemException exception with the specified detail message, minor code, and completion status.
Method Summary
 String toString()
Converts this exception to a representative string.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

minor

public int minor
The CORBA Exception minor code.

completed

public CompletionStatus completed
The status of the operation that threw this exception.
Constructor Detail

SystemException

protected SystemException(String reason,
                          int minor,
                          CompletionStatus completed)
Constructs a SystemException exception with the specified detail message, minor code, and completion status. A detail message is a String that describes this particular exception.
Parameters:
reason - the String containing a detail message
minor - the minor code
completed - the completion status
Method Detail

toString

public String toString()
Converts this exception to a representative string.
Overrides:
toString in class Throwable
Following copied from class: java.lang.Throwable
Returns:
a string representation of this Throwable.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TCKind

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TCKind

java.lang.Object
  |
  +--org.omg.CORBA.TCKind
public class TCKind
extends Object

The Java mapping of the IDL enum TCKind, which specifies the kind of a TypeCode object. There is one kind for each primitive and essential IDL datatype.

The class TCKind consists of:

  • a set of int constants, one for each kind of IDL data type. These int constants make it possible to use a switch statement.
  • a set of TCKind constants, one for each kind of IDL data type. The value field for each TCKind instance is initialized with the int constant that corresponds with the IDL data type that the instance represents.
  • the method from_intfor converting an int to its corresponding TCKind instance

    Example:

          org.omg.CORBA.TCKind k = org.omg.CORBA.TCKind.from_int(
                         org.omg.CORBA.TCKind._tk_string);
    The variable k represents the TCKind instance for the IDL type string, which is tk_string.

  • the method value for accessing the _value field of a TCKind constant

    Example:

       int i = org.omg.CORBA.TCKind.tk_char.value();
    The variable i represents 9, the value for the IDL data type char.

The value field of a TCKind instance is the CDR encoding used for a TypeCode object in an IIOP message.

Field Summary
static int | _tk_abstract_interface The int constant for the IDL data type abstract interface.
static int | _tk_alias The int constant for the IDL data type alias.
static int | _tk_any The int constant for the IDL data type any.
static int | _tk_array The int constant for the IDL data type array.
static int | _tk_boolean The int constant for the IDL data type boolean.
static int | _tk_char The int constant for the IDL data type char.
static int | _tk_double The int constant for the IDL data type double.
static int | _tk_enum The int constant for the IDL data type enum.
static int | _tk_except The int constant for the IDL data type except.
static int | _tk_fixed The int constant for the IDL data type fixed.
static int | _tk_float The int constant for the IDL data type float.
static int | _tk_long The int constant for the IDL data type long.
static int | _tk_longdouble The int constant for the IDL data type longdouble.
static int | _tk_longlong The int constant for the IDL data type longlong.
static int | _tk_native The int constant for the IDL data type native.
static int | _tk_null The int constant for a null IDL data type.
static int | _tk_objref The int constant for the IDL data type objref.
static int | _tk_octet The int constant for the IDL data type octet.
static int | _tk_Principal The int constant for the IDL data type Principal.
static int | _tk_sequence The int constant for the IDL data type sequence.
static int | _tk_short The int constant for the IDL data type short.
static int | _tk_string The int constant for the IDL data type string.
static int | _tk_struct The int constant for the IDL data type struct.
static int | _tk_TypeCode The int constant for the IDL data type TypeCode.
static int | _tk_ulong The int constant for the IDL data type ulong.
static int | _tk_ulonglong The int constant for the IDL data type ulonglong.
static int | _tk_union The int constant for the IDL data type union.
static int | _tk_ushort The int constant for the IDL data type ushort.
static int | _tk_value The int constant for the IDL data type value.
static int | _tk_value_box The int constant for the IDL data type value_box.
static int | _tk_void The int constant for the IDL data type void.
static int | _tk_wchar The int constant for the IDL data type wchar.
static int | _tk_wstring The int constant for the IDL data type wstring.
static TCKind | tk_abstract_interface The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.
static TCKind | tk_alias The TCKind constant whose value field is initialized with TCKind._tk_alias.
static TCKind | tk_any The TCKind constant whose value field is initialized with TCKind._tk_any.
static TCKind | tk_array The TCKind constant whose value field is initialized with TCKind._tk_array.
static TCKind | tk_boolean The TCKind constant whose value field is initialized with TCKind._tk_boolean.
static TCKind | tk_char The TCKind constant whose value field is initialized with TCKind._tk_char.
static TCKind | tk_double The TCKind constant whose value field is initialized with TCKind._tk_double.
static TCKind | tk_enum The TCKind constant whose value field is initialized with TCKind._tk_enum.
static TCKind | tk_except The TCKind constant whose value field is initialized with TCKind._tk_except.
static TCKind | tk_fixed The TCKind constant whose value field is initialized with TCKind._tk_fixed.
static TCKind | tk_float The TCKind constant whose value field is initialized with TCKind._tk_float.
static TCKind | tk_long The TCKind constant whose value field is initialized with TCKind._tk_long.
static TCKind | tk_longdouble The TCKind constant whose value field is initialized with TCKind._tk_longdouble.
static TCKind | tk_longlong The TCKind constant whose value field is initialized with TCKind._tk_longlong.
static TCKind | tk_native The TCKind constant whose value field is initialized with TCKind._tk_native.
static TCKind | tk_null The TCKind constant whose value field is initialized with TCKind._tk_null.
static TCKind | tk_objref The TCKind constant whose value field is initialized with TCKind._tk_objref.
static TCKind | tk_octet The TCKind constant whose value field is initialized with TCKind._tk_octet.
static TCKind | tk_Principal The TCKind constant whose value field is initialized with TCKind._tk_Principal.
static TCKind | tk_sequence The TCKind constant whose value field is initialized with TCKind._tk_sequence.
static TCKind | tk_short The TCKind constant whose value field is initialized with TCKind._tk_short.
static TCKind | tk_string The TCKind constant whose value field is initialized with TCKind._tk_string.
static TCKind | tk_struct The TCKind constant whose value field is initialized with TCKind._tk_struct.
static TCKind | tk_TypeCode The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.
static TCKind | tk_ulong The TCKind constant whose value field is initialized with TCKind._tk_ulong.
static TCKind | tk_ulonglong The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.
static TCKind | tk_union The TCKind constant whose value field is initialized with TCKind._tk_union.
static TCKind | tk_ushort The TCKind constant whose value field is initialized with TCKind._tk_ushort.
static TCKind | tk_value The TCKind constant whose value field is initialized with TCKind._tk_value.
static TCKind | tk_value_box The TCKind constant whose value field is initialized with TCKind._tk_value_box.
static TCKind | tk_void The TCKind constant whose value field is initialized with TCKind._tk_void.
static TCKind | tk_wchar The TCKind constant whose value field is initialized with TCKind._tk_wchar.
static TCKind | tk_wstring The TCKind constant whose value field is initialized with TCKind._tk_wstring.
Constructor Summary
protected TCKind(int _value)
Deprecated. Do not use this constructor as this method should be private according to the OMG specification. Use from_int(int) instead.
Method Summary
static TCKind | from_int(int i) Converts the given int to the corresponding TCKind instance.
int | value() Retrieves the value of this TCKind instance.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_tk_null

public static final int _tk_null
The int constant for a null IDL data type.

_tk_void

public static final int _tk_void
The int constant for the IDL data type void.

_tk_short

public static final int _tk_short
The int constant for the IDL data type short.

_tk_long

public static final int _tk_long
The int constant for the IDL data type long.

_tk_ushort

public static final int _tk_ushort
The int constant for the IDL data type ushort.

_tk_ulong

public static final int _tk_ulong
The int constant for the IDL data type ulong.

_tk_float

public static final int _tk_float
The int constant for the IDL data type float.

_tk_double

public static final int _tk_double
The int constant for the IDL data type double.

_tk_boolean

public static final int _tk_boolean
The int constant for the IDL data type boolean.

_tk_char

public static final int _tk_char
The int constant for the IDL data type char.

_tk_octet

public static final int _tk_octet
The int constant for the IDL data type octet.

_tk_any

public static final int _tk_any
The int constant for the IDL data type any.

_tk_TypeCode

public static final int _tk_TypeCode
The int constant for the IDL data type TypeCode.

_tk_Principal

public static final int _tk_Principal
The int constant for the IDL data type Principal.

_tk_objref

public static final int _tk_objref
The int constant for the IDL data type objref.

_tk_struct

public static final int _tk_struct
The int constant for the IDL data type struct.

_tk_union

public static final int _tk_union
The int constant for the IDL data type union.

_tk_enum

public static final int _tk_enum
The int constant for the IDL data type enum.

_tk_string

public static final int _tk_string
The int constant for the IDL data type string.

_tk_sequence

public static final int _tk_sequence
The int constant for the IDL data type sequence.

_tk_array

public static final int _tk_array
The int constant for the IDL data type array.

_tk_alias

public static final int _tk_alias
The int constant for the IDL data type alias.

_tk_except

public static final int _tk_except
The int constant for the IDL data type except.

_tk_longlong

public static final int _tk_longlong
The int constant for the IDL data type longlong.

_tk_ulonglong

public static final int _tk_ulonglong
The int constant for the IDL data type ulonglong.

_tk_longdouble

public static final int _tk_longdouble
The int constant for the IDL data type longdouble.

_tk_wchar

public static final int _tk_wchar
The int constant for the IDL data type wchar.

_tk_wstring

public static final int _tk_wstring
The int constant for the IDL data type wstring.

_tk_fixed

public static final int _tk_fixed
The int constant for the IDL data type fixed.

_tk_value

public static final int _tk_value
The int constant for the IDL data type value.

_tk_value_box

public static final int _tk_value_box
The int constant for the IDL data type value_box.

_tk_native

public static final int _tk_native
The int constant for the IDL data type native.

_tk_abstract_interface

public static final int _tk_abstract_interface
The int constant for the IDL data type abstract interface.

tk_null

public static final TCKind tk_null
The TCKind constant whose value field is initialized with TCKind._tk_null.

tk_void

public static final TCKind tk_void
The TCKind constant whose value field is initialized with TCKind._tk_void.

tk_short

public static final TCKind tk_short
The TCKind constant whose value field is initialized with TCKind._tk_short.

tk_long

public static final TCKind tk_long
The TCKind constant whose value field is initialized with TCKind._tk_long.

tk_ushort

public static final TCKind tk_ushort
The TCKind constant whose value field is initialized with TCKind._tk_ushort.

tk_ulong

public static final TCKind tk_ulong
The TCKind constant whose value field is initialized with TCKind._tk_ulong.

tk_float

public static final TCKind tk_float
The TCKind constant whose value field is initialized with TCKind._tk_float.

tk_double

public static final TCKind tk_double
The TCKind constant whose value field is initialized with TCKind._tk_double.

tk_boolean

public static final TCKind tk_boolean
The TCKind constant whose value field is initialized with TCKind._tk_boolean.

tk_char

public static final TCKind tk_char
The TCKind constant whose value field is initialized with TCKind._tk_char.

tk_octet

public static final TCKind tk_octet
The TCKind constant whose value field is initialized with TCKind._tk_octet.

tk_any

public static final TCKind tk_any
The TCKind constant whose value field is initialized with TCKind._tk_any.

tk_TypeCode

public static final TCKind tk_TypeCode
The TCKind constant whose value field is initialized with TCKind._tk_TypeCode.

tk_Principal

public static final TCKind tk_Principal
The TCKind constant whose value field is initialized with TCKind._tk_Principal.

tk_objref

public static final TCKind tk_objref
The TCKind constant whose value field is initialized with TCKind._tk_objref.

tk_struct

public static final TCKind tk_struct
The TCKind constant whose value field is initialized with TCKind._tk_struct.

tk_union

public static final TCKind tk_union
The TCKind constant whose value field is initialized with TCKind._tk_union.

tk_enum

public static final TCKind tk_enum
The TCKind constant whose value field is initialized with TCKind._tk_enum.

tk_string

public static final TCKind tk_string
The TCKind constant whose value field is initialized with TCKind._tk_string.

tk_sequence

public static final TCKind tk_sequence
The TCKind constant whose value field is initialized with TCKind._tk_sequence.

tk_array

public static final TCKind tk_array
The TCKind constant whose value field is initialized with TCKind._tk_array.

tk_alias

public static final TCKind tk_alias
The TCKind constant whose value field is initialized with TCKind._tk_alias.

tk_except

public static final TCKind tk_except
The TCKind constant whose value field is initialized with TCKind._tk_except.

tk_longlong

public static final TCKind tk_longlong
The TCKind constant whose value field is initialized with TCKind._tk_longlong.

tk_ulonglong

public static final TCKind tk_ulonglong
The TCKind constant whose value field is initialized with TCKind._tk_ulonglong.

tk_longdouble

public static final TCKind tk_longdouble
The TCKind constant whose value field is initialized with TCKind._tk_longdouble.

tk_wchar

public static final TCKind tk_wchar
The TCKind constant whose value field is initialized with TCKind._tk_wchar.

tk_wstring

public static final TCKind tk_wstring
The TCKind constant whose value field is initialized with TCKind._tk_wstring.

tk_fixed

public static final TCKind tk_fixed
The TCKind constant whose value field is initialized with TCKind._tk_fixed.

tk_value

public static final TCKind tk_value
The TCKind constant whose value field is initialized with TCKind._tk_value.

tk_value_box

public static final TCKind tk_value_box
The TCKind constant whose value field is initialized with TCKind._tk_value_box.

tk_native

public static final TCKind tk_native
The TCKind constant whose value field is initialized with TCKind._tk_native.

tk_abstract_interface

public static final TCKind tk_abstract_interface
The TCKind constant whose value field is initialized with TCKind._tk_abstract_interface.
Constructor Detail

TCKind

protected TCKind(int _value)
Deprecated. Do not use this constructor as this method should be private according to the OMG specification. Use from_int(int) instead.

Creates a new TCKind instance initialized with the given int.
Parameters:
the - int to convert. It must be one of the int constants in the class TCKind.
Method Detail

value

public int value()
Retrieves the value of this TCKind instance.
Returns:
the int that represents the kind of IDL data type for this TCKind instance

from_int

public static TCKind from_int(int i)
                       throws BAD_PARAM
Converts the given int to the corresponding TCKind instance.
Parameters:
the - int to convert. It must be one of the int constants in the class TCKind.
Returns:
the TCKind instance whose value field matches the given int
Throws:
BAD_PARAM - if the given int does not match the _value field of any TCKind instance
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TRANSACTION_REQUIRED

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TRANSACTION_REQUIRED

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.TRANSACTION_REQUIRED
All Implemented Interfaces:
Serializable
public final class TRANSACTION_REQUIRED
extends SystemException

The CORBA TRANSACTION_REQUIRED exception, which is thrown by the ORB on the client or server during the processing of a request that is required to be enclosed in a transaction. It contains a minor code, which gives information about what caused the exception, and a completion status. It may also contain a string describing the exception. The OMG Transaction Service specfication has details.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
TRANSACTION_REQUIRED()
Constructs a TRANSACTION_REQUIRED exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSACTION_REQUIRED(int minor, CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
TRANSACTION_REQUIRED(String s)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_REQUIRED(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TRANSACTION_REQUIRED

public TRANSACTION_REQUIRED()
Constructs a TRANSACTION_REQUIRED exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

TRANSACTION_REQUIRED

public TRANSACTION_REQUIRED(String s)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

TRANSACTION_REQUIRED

public TRANSACTION_REQUIRED(int minor,
                            CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

TRANSACTION_REQUIRED

public TRANSACTION_REQUIRED(String s,
                            int minor,
                            CompletionStatus completed)
Constructs a TRANSACTION_REQUIRED exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TRANSACTION_ROLLEDBACK

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TRANSACTION_ROLLEDBACK

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.TRANSACTION_ROLLEDBACK
All Implemented Interfaces:
Serializable
public final class TRANSACTION_ROLLEDBACK
extends SystemException

The CORBA TRANSACTION_ROLLEDBACK exception, which is thrown when a transactional operation did not complete because the transaction was rolled back. See the OMG Transaction Service specification for details. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
TRANSACTION_ROLLEDBACK()
Constructs a TRANSACTION_ROLLEDBACK exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
TRANSACTION_ROLLEDBACK(String s)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSACTION_ROLLEDBACK(String s, int minor, CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TRANSACTION_ROLLEDBACK

public TRANSACTION_ROLLEDBACK()
Constructs a TRANSACTION_ROLLEDBACK exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

TRANSACTION_ROLLEDBACK

public TRANSACTION_ROLLEDBACK(String s)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

TRANSACTION_ROLLEDBACK

public TRANSACTION_ROLLEDBACK(int minor,
                              CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

TRANSACTION_ROLLEDBACK

public TRANSACTION_ROLLEDBACK(String s,
                              int minor,
                              CompletionStatus completed)
Constructs a TRANSACTION_ROLLEDBACK exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TRANSIENT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TRANSIENT

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.TRANSIENT
All Implemented Interfaces:
Serializable
public final class TRANSIENT
extends SystemException

The CORBA TRANSIENT exception, which is thrown by the server to signal a transient failure that might not occur again if the request is retried. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
TRANSIENT()
Constructs a TRANSIENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
TRANSIENT(int minor, CompletionStatus completed)
Constructs a TRANSIENT exception with the specified minor code and completion status.
TRANSIENT(String s)
Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
TRANSIENT(String s, int minor, CompletionStatus completed)
Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TRANSIENT

public TRANSIENT()
Constructs a TRANSIENT exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

TRANSIENT

public TRANSIENT(String s)
Constructs a TRANSIENT exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

TRANSIENT

public TRANSIENT(int minor,
                 CompletionStatus completed)
Constructs a TRANSIENT exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

TRANSIENT

public TRANSIENT(String s,
                 int minor,
                 CompletionStatus completed)
Constructs a TRANSIENT exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeCode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TypeCode

java.lang.Object
  |
  +--org.omg.CORBA.TypeCode
All Implemented Interfaces:
IDLEntity, Serializable
public abstract class TypeCode
extends Object
implements IDLEntity

A container for information about a specific CORBA data type.

TypeCode objects are used:

  • in the Dynamic Invocation Interface -- to indicate the types of the actual arguments or the type of the return value.
    NamedValue objects are used to represent arguments and return values. One of their components is an Any object, which in turn has as one of its components a TypeCode object.
  • by an Interface Repository to represent the type specifications that are part of many OMG IDL declarations

The representation of a TypeCode object is opaque, but abstractly, a TypeCode object consists of:

  • a kind field, which is set to an instance of the class TCKind
  • zero or more additional fields appropriate for the particular kind. For example, the TypeCode object describing the OMG IDL type 1ong has kind TCKind.tk_long and no additional fields. The TypeCode describing OMG IDL type sequence<boolean, 10> has a kind field with the value TCKind.tk_sequence and also fields with the values boolean and 10 for the type of sequence elements and the length of the sequence.

TypeCode objects can be obtained in various ways:
  1. from a call to the method Any.insert_X, where X is a basic IDL type. This method creates a TypeCode object for type X and assigns it to the Any object's type field.
  2. from invocations of methods in the ORB class

    For example, the following creates a TypeCode object for a string with a maximum of 30 characters:

       org.omg.CORBA.TypeCode tcString = orb.create_string_tc(30);

    The following creates a TypeCode object for an array of five strings:

       org.omg.CORBA.TypeCode tcArray = orb.create_array_tc(
                                       5, TCKind.tk_string);

    The following creates a TypeCode object for an interface named "Account":

       org.omg.CORBA.TypeCode tcInterface = orb.create_interface_tc(
                                                 "thisId", "Account");
  3. as the return value from the _type method in Holder classes for user-defined IDL types. These Holder classes are generated by the idltojava compiler.
  4. from a CORBA Interface Repository

Most of the methods in the class TypeCode are accessors, and the information contained in a TypeCode object is specific to a particular type. Therefore, methods must be invoked only on the kind of type codes to which they apply. If an accessor method tries to access information from an inappropriate kind of type code, it will throw the exception TypeCodePackage.BadKind. For example, if the method discriminator_type is called on anything other than a union, it will throw BadKind because only unions have a discriminator. The following list shows which methods apply to which kinds of type codes:

These methods may be invoked on all TypeCode kinds:

  • equal
  • kind

These methods may be invoked on objref, struct, union, enum, alias, exception, value, value_box, native, and abstract_interface:

  • id
  • name

These methods may be invoked on struct, union, enum, and exception:

  • member_count
  • member_name

These methods may be invoked on struct, union, and exception:

  • member_type(int index)

These methods may be invoked on union:

  • member_label
  • discriminator_type
  • default_index

These methods may be invoked on string, sequence, and array:

  • length

These methods may be invoked on alias, sequence, array, and value_box:

  • content_type

Unlike other CORBA pseudo-objects, TypeCode objects can be passed as general IDL parameters.

The methods parameter and param_count, which are deprecated, are not mapped.

Java IDL extends the CORBA specification to allow all operations permitted on a struct TypeCode to be permitted on an exception TypeCode as well.

See Also:
Serialized Form

Constructor Summary
TypeCode()
Method Summary
TypeCode | concrete_base_type() Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.
abstract TypeCode | content_type() Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
abstract int | default_index() Returns the index of the default member, or -1 if there is no default member.
abstract TypeCode | discriminator_type() Returns a TypeCode object describing all non-default member labels.
abstract boolean | equal(TypeCode tc) Compares this TypeCode object with the given one, testing for equality.
boolean | equivalent(TypeCode tc) Tests to see if the given TypeCode object is equivalent to this TypeCode object.
short | fixed_digits() Returns the number of digits in the fixed type described by this TypeCode object.
short | fixed_scale() Returns the scale of the fixed type described by this TypeCode object.
TypeCode | get_compact_typecode() Strips out all optional name and member name fields, but leaves all alias typecodes intact.
abstract String | id() Retrieves the RepositoryId globally identifying the type of this TypeCode object.
abstract TCKind | kind() Retrieves the kind of this TypeCode object.
abstract int | length() Returns the number of elements in the type described by this TypeCode object.
abstract int | member_count() Retrieves the number of members in the type described by this TypeCode object.
abstract Any | member_label(int index) Retrieves the label of the union member identified by the given index.
abstract String | member_name(int index) Retrieves the simple name of the member identified by the given index.
abstract TypeCode | member_type(int index) Retrieves the TypeCode object describing the type of the member identified by the given index.
short | member_visibility(int index) Returns the constant that indicates the visibility of the member at the given index.
abstract String | name() Retrieves the simple name identifying this TypeCode object within its enclosing scope.
short | type_modifier() Returns a constant indicating the modifier of the value type that this TypeCode object describes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TypeCode

public TypeCode()
Method Detail

equal

public abstract boolean equal(TypeCode tc)
Compares this TypeCode object with the given one, testing for equality. TypeCode objects are equal if they are interchangeable and give identical results when TypeCode operations are applied to them.
Parameters:
tc - the TypeCode object to compare against
Returns:
true if the type codes are equal; false otherwise

equivalent

public boolean equivalent(TypeCode tc)
Tests to see if the given TypeCode object is equivalent to this TypeCode object.

Not implemented; see package comments.

Parameters:
tc - the typecode to compare with this typecode
Returns:
true if the given typecode is equivalent to this typecode; false otherwise
See Also:
CORBA package comments for unimplemented features

get_compact_typecode

public TypeCode get_compact_typecode()
Strips out all optional name and member name fields, but leaves all alias typecodes intact.
Returns:
a TypeCode object with optional name and member name fields stripped out, except for alias typecodes, which are left intact
See Also:
CORBA package comments for unimplemented features

kind

public abstract TCKind kind()
Retrieves the kind of this TypeCode object. The kind of a type code determines which TypeCode methods may legally be invoked on it.

The method kind may be invoked on any TypeCode object.

Returns:
the TCKind instance indicating the value of the kind field of this TypeCode object

id

public abstract String id()
                   throws BadKind
Retrieves the RepositoryId globally identifying the type of this TypeCode object.

The method id can be invoked on object reference, structure, union, enumeration, alias, exception, valuetype, boxed valuetype, native, and abstract interface type codes. Object reference, exception, valuetype, boxed valuetype, native, and abstract interface TypeCode objects always have a RepositoryId. Structure, union, enumeration, and alias TypeCode objects obtained from the Interface Repository or the method ORB.create_operation_list also always have a RepositoryId. If there is no RepositoryId, the method can return an empty string.

Returns:
the RepositoryId for this TypeCode object or an empty string if there is no RepositoryID
Throws:
BadKind - if the method is invoked on an inappropriate kind ofTypeCode object

name

public abstract String name()
                     throws BadKind
Retrieves the simple name identifying this TypeCode object within its enclosing scope. Since names are local to a Repository, the name returned from a TypeCode object may not match the name of the type in any particular Repository, and may even be an empty string.

The method name can be invoked on object reference, structure, union, enumeration, alias, exception, valuetype, boxed valuetype, native, and abstract interface TypeCode objects.

Returns:
the name identifying this TypeCode object or an empty string
Throws:
BadKind - if the method is invoked on an inappropriate kind ofTypeCode object

member_count

public abstract int member_count()
                          throws BadKind
Retrieves the number of members in the type described by this TypeCode object.

The method member_count can be invoked on structure, union, and enumeration TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

Returns:
the number of members constituting the type described by this TypeCode object
Throws:
BadKind - if the method is invoked on an inappropriate kind of TypeCode object

member_name

public abstract String member_name(int index)
                            throws BadKind,
                                   Bounds
Retrieves the simple name of the member identified by the given index. Since names are local to a Repository, the name returned from a TypeCode object may not match the name of the member in any particular Repository, and may even be an empty string.

The method member_name can be invoked on structure, union, and enumeration TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

Parameters:
index - index of the member for which a name is being reqested
Returns:
simple name of the member identified by the index or an empty string
Throws:
Bounds - if the index is equal to or greater than the number of members constituting the type
BadKind - if the method is invoked on an inappropriate kind of TypeCode object

member_type

public abstract TypeCode member_type(int index)
                              throws BadKind,
                                     Bounds
Retrieves the TypeCode object describing the type of the member identified by the given index.

The method member_type can be invoked on structure and union TypeCode objects. Java IDL extends the CORBA specification to allow this method to operate on exceptions as well.

Parameters:
index - index of the member for which type information is begin requested
Returns:
the TypeCode object describing the member at the given index
Throws:
Bounds - if the index is equal to or greater than the number of members constituting the type
BadKind - if the method is invoked on an inappropriate kind of TypeCode object

member_label

public abstract Any member_label(int index)
                          throws BadKind,
                                 Bounds
Retrieves the label of the union member identified by the given index. For the default member, the label is the zero octet.

The method member_label can only be invoked on union TypeCode objects.

Parameters:
index - index of the union member for which the label is being requested
Returns:
an Any object describing the label of the requested union member or the zero octet for the default member
Throws:
Bounds - if the index is equal to or greater than the number of members constituting the union
BadKind - if the method is invoked on a non-union TypeCode object

discriminator_type

public abstract TypeCode discriminator_type()
                                     throws BadKind
Returns a TypeCode object describing all non-default member labels. The method discriminator_type can be invoked only on union TypeCode objects.
Returns:
the TypeCode object describing the non-default member labels
Throws:
BadKind - if the method is invoked on a non-union TypeCode object

default_index

public abstract int default_index()
                           throws BadKind
Returns the index of the default member, or -1 if there is no default member.

The method default_index can be invoked only on union TypeCode objects.

Returns:
the index of the default member, or -1 if there is no default member
Throws:
BadKind - if the method is invoked on a non-union TypeCode object

length

public abstract int length()
                    throws BadKind
Returns the number of elements in the type described by this TypeCode object. For strings and sequences, it returns the bound, with zero indicating an unbounded string or sequence. For arrays, it returns the number of elements in the array.

The method length can be invoked on string, sequence, and array TypeCode objects.

Returns:
the bound for strings and sequences, or the number of elements for arrays
Throws:
BadKind - if the method is invoked on an inappropriate kind of TypeCode object

content_type

public abstract TypeCode content_type()
                               throws BadKind
Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object. For sequences and arrays, it returns the element type. For aliases, it returns the original type. Note that multidimensional arrays are represented by nesting TypeCode objects, one per dimension. For boxed valuetypes, it returns the boxed type.

The method content_type can be invoked on sequence, array, alias, and boxed valuetype TypeCode objects.

Returns:
a TypeCode object representing the element type for sequences and arrays, the original type for aliases, or the boxed type for boxed valuetypes.
Throws:
BadKind - if the method is invoked on an inappropriate kind of TypeCode object

fixed_digits

public short fixed_digits()
                   throws BadKind
Returns the number of digits in the fixed type described by this TypeCode object. For example, the typecode for the number 3000.275d could be fixed<7,3>, where 7 is the precision and 3 is the scale.
Returns:
the total number of digits
Throws:
BadKind - if this method is invoked on an inappropriate kind of TypeCode object
See Also:
CORBA package comments for unimplemented features

fixed_scale

public short fixed_scale()
                  throws BadKind
Returns the scale of the fixed type described by this TypeCode object. A positive number indicates the number of digits to the right of the decimal point. For example, the number 3000d could have the typecode fixed<4,0>, where the first number is the precision and the second number is the scale. A negative number is also possible and adds zeroes to the left of the decimal point. In this case, fixed<1,-3>, could be the typecode for the number 3000d.
Returns:
the scale of the fixed type that this TypeCode object describes
Throws:
BadKind - if this method is invoked on an inappropriate kind of TypeCode object
See Also:
CORBA package comments for unimplemented features

member_visibility

public short member_visibility(int index)
                        throws BadKind,
                               Bounds
Returns the constant that indicates the visibility of the member at the given index. This operation can only be invoked on non-boxed value TypeCode objects.
Parameters:
index - an int indicating the index into the value
Returns:
either PRIVATE_MEMBER.value or PUBLIC_MEMBER.value
Throws:
BadKind - if this method is invoked on a non-value type TypeCode object
Bounds - if the given index is out of bounds
See Also:
CORBA package comments for unimplemented features

type_modifier

public short type_modifier()
                    throws BadKind
Returns a constant indicating the modifier of the value type that this TypeCode object describes. The constant returned must be one of the following: VM_NONE.value, VM_ABSTRACT.value, VM_CUSTOM.value, or VM_TRUNCATABLE.value,
Returns:
a constant describing the value type that this TypeCode object describes
Throws:
BadKind - if this method is invoked on a non-value type TypeCode object
See Also:
CORBA package comments for unimplemented features

concrete_base_type

public TypeCode concrete_base_type()
                            throws BadKind
Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes. Returns null if it doesn't have a concrete base type.
Returns:
the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes
Throws:
BadKind - if this method is invoked on a non-boxed value type TypeCode object
See Also:
CORBA package comments for unimplemented features
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeCodeHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class TypeCodeHolder

java.lang.Object
  |
  +--org.omg.CORBA.TypeCodeHolder
All Implemented Interfaces:
Streamable
public final class TypeCodeHolder
extends Object
implements Streamable

A Holder class for a TypeCode object that is used to store "out" and "inout" parameters in IDL operations. If an IDL operation signature has an IDL TypeCode as an "out" or "inout" parameter, the programmer must pass an instance of TypeCodeHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myTypeCodeHolder is an instance of TypeCodeHolder, the value stored in its value field can be accessed with myTypeCodeHolder.value.

Since:
JDK1.2

Field Summary
 TypeCode value
The TypeCode value held by this TypeCodeHolder object.
Constructor Summary
TypeCodeHolder()
Constructs a new TypeCodeHolder object with its value field initialized to null.
TypeCodeHolder(TypeCode initial)
Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
TypeCode | _type() Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
void | _write(OutputStream output) Marshals to output the value in this TypeCodeHolder object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public TypeCode value
The TypeCode value held by this TypeCodeHolder object.
Constructor Detail

TypeCodeHolder

public TypeCodeHolder()
Constructs a new TypeCodeHolder object with its value field initialized to null.

TypeCodeHolder

public TypeCodeHolder(TypeCode initial)
Constructs a new TypeCodeHolder object with its value field initialized to the given TypeCode object.
Parameters:
initial - the TypeCode object with which to initialize the value field of the newly-created TypeCodeHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals to output the value in this TypeCodeHolder object.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data

_type

public TypeCode _type()
Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in this TypeCodeHolder object
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA.TypeCodePackage Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA.TypeCodePackage

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CORBA.TypeCodePackage.BadKind
          • class org.omg.CORBA.TypeCodePackage.Bounds
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CORBA.TypeCodePackage

Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.

See:
Description

Exception Summary
BadKind | The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.
Bounds | Provides the TypeCode operations member_name(), member_type(), and member_label.

Package org.omg.CORBA.TypeCodePackage Description

Provides the user-defined exceptions BadKind and Bounds, which are thrown by methods in in the class TypeCode.

Related Documentation

For an overview, please see:
  • comments on the CORBA package

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CORBA.TypeCodePackage

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA.TypeCodePackage

Packages that use org.omg.CORBA.TypeCodePackage
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Classes in org.omg.CORBA.TypeCodePackage used by org.omg.CORBA
BadKind
The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object.
Bounds
Provides the TypeCode operations member_name(), member_type(), and member_label.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


BadKind

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.TypeCodePackage
Class BadKind

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.TypeCodePackage.BadKind
All Implemented Interfaces:
IDLEntity, Serializable
public final class BadKind
extends UserException

The exception BadKind is thrown when an inappropriate operation is invoked on a TypeCode object. For example, invoking the method discriminator_type() on an instance of TypeCode that does not represent an IDL union will cause the exception BadKind to be thrown.

Since:
JDK1.2
See Also:
TypeCode, Serialized Form

Constructor Summary
BadKind()
Constructs a BadKind exception with no reason message.
BadKind(String reason)
Constructs a BadKind exception with the specified reason message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BadKind

public BadKind()
Constructs a BadKind exception with no reason message.

BadKind

public BadKind(String reason)
Constructs a BadKind exception with the specified reason message.
Parameters:
reason - the String containing a reason message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Bounds

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.TypeCodePackage
Class Bounds

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.TypeCodePackage.Bounds
All Implemented Interfaces:
IDLEntity, Serializable
public final class Bounds
extends UserException

Provides the TypeCode operations member_name(), member_type(), and member_label. These methods raise Bounds when the index parameter is greater than or equal to the number of members constituting the type.

Since:
JDK1.2
See Also:
Serialized Form

Constructor Summary
Bounds()
Constructs a Bounds exception with no reason message.
Bounds(String reason)
Constructs a Bounds exception with the specified reason message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Bounds

public Bounds()
Constructs a Bounds exception with no reason message.

Bounds

public Bounds(String reason)
Constructs a Bounds exception with the specified reason message.
Parameters:
reason - the String containing a reason message
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.omg.CORBA.TypeCodePackage.BadKind

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TypeCodePackage.BadKind

Packages that use BadKind
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of BadKind in org.omg.CORBA

Methods in org.omg.CORBA that throw BadKind
abstract String | TypeCode.id() Retrieves the RepositoryId globally identifying the type of this TypeCode object.
abstract String | TypeCode.name() Retrieves the simple name identifying this TypeCode object within its enclosing scope.
abstract int | TypeCode.member_count() Retrieves the number of members in the type described by this TypeCode object.
abstract String | TypeCode.member_name(int index) Retrieves the simple name of the member identified by the given index.
abstract TypeCode | TypeCode.member_type(int index) Retrieves the TypeCode object describing the type of the member identified by the given index.
abstract Any | TypeCode.member_label(int index) Retrieves the label of the union member identified by the given index.
abstract TypeCode | TypeCode.discriminator_type() Returns a TypeCode object describing all non-default member labels.
abstract int | TypeCode.default_index() Returns the index of the default member, or -1 if there is no default member.
abstract int | TypeCode.length() Returns the number of elements in the type described by this TypeCode object.
abstract TypeCode | TypeCode.content_type() Returns the TypeCode object representing the IDL type for the members of the object described by this TypeCode object.
short | TypeCode.fixed_digits() Returns the number of digits in the fixed type described by this TypeCode object.
short | TypeCode.fixed_scale() Returns the scale of the fixed type described by this TypeCode object.
short | TypeCode.member_visibility(int index) Returns the constant that indicates the visibility of the member at the given index.
short | TypeCode.type_modifier() Returns a constant indicating the modifier of the value type that this TypeCode object describes.
TypeCode | TypeCode.concrete_base_type() Returns the TypeCode object that describes the concrete base type of the value type that this TypeCode object describes.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA.TypeCodePackage.Bounds

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA.TypeCodePackage.Bounds

Packages that use Bounds
org.omg.CORBA Provides the mapping of the OMG CORBA APIs to the JavaTM programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB).

Uses of Bounds in org.omg.CORBA

Methods in org.omg.CORBA that throw Bounds
abstract String | TypeCode.member_name(int index) Retrieves the simple name of the member identified by the given index.
abstract TypeCode | TypeCode.member_type(int index) Retrieves the TypeCode object describing the type of the member identified by the given index.
abstract Any | TypeCode.member_label(int index) Retrieves the label of the union member identified by the given index.
short | TypeCode.member_visibility(int index) Returns the constant that indicates the visibility of the member at the given index.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ULongLongSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ULongLongSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.ULongLongSeqHelper
public final class ULongLongSeqHelper
extends Object

org/omg/CORBA/ULongLongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Constructor Summary
ULongLongSeqHelper()
Method Summary
static long[] | extract(Any a)
static String | id()
static void | insert(Any a, long[] that)
static long[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, long[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ULongLongSeqHelper

public ULongLongSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          long[] that)

extract

public static long[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static long[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         long[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ULongLongSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ULongLongSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.ULongLongSeqHolder
All Implemented Interfaces:
Streamable
public final class ULongLongSeqHolder
extends Object
implements Streamable

org/omg/CORBA/ULongLongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:37 o'clock GMT+00:00

Field Summary
 long[] value
Constructor Summary
ULongLongSeqHolder()
ULongLongSeqHolder(long[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public long[] value
Constructor Detail

ULongLongSeqHolder

public ULongLongSeqHolder()

ULongLongSeqHolder

public ULongLongSeqHolder(long[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ULongSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ULongSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.ULongSeqHelper
public final class ULongSeqHelper
extends Object

org/omg/CORBA/ULongSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
ULongSeqHelper()
Method Summary
static int[] | extract(Any a)
static String | id()
static void | insert(Any a, int[] that)
static int[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, int[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ULongSeqHelper

public ULongSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          int[] that)

extract

public static int[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static int[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         int[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ULongSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ULongSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.ULongSeqHolder
All Implemented Interfaces:
Streamable
public final class ULongSeqHolder
extends Object
implements Streamable

org/omg/CORBA/ULongSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 int[] value
Constructor Summary
ULongSeqHolder()
ULongSeqHolder(int[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public int[] value
Constructor Detail

ULongSeqHolder

public ULongSeqHolder()

ULongSeqHolder

public ULongSeqHolder(int[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnionMember

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UnionMember

java.lang.Object
  |
  +--org.omg.CORBA.UnionMember
All Implemented Interfaces:
IDLEntity, Serializable
public final class UnionMember
extends Object
implements IDLEntity

A description in the Interface Repository of a member of an IDL union.

See Also:
Serialized Form

Field Summary
Any | label The label of the union member described by this UnionMember object.
String | name The name of the union member described by this UnionMember object.
TypeCode | type The type of the union member described by this UnionMember object.
IDLType | type_def The typedef that represents the IDL type of the union member described by this UnionMember object.
Constructor Summary
UnionMember()
Constructs a new UnionMember object with its fields initialized to null.
UnionMember(String __name, Any __label, TypeCode __type, IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name
The name of the union member described by this UnionMember object.

label

public Any label
The label of the union member described by this UnionMember object.

type

public TypeCode type
The type of the union member described by this UnionMember object.

type_def

public IDLType type_def
The typedef that represents the IDL type of the union member described by this UnionMember object.
Constructor Detail

UnionMember

public UnionMember()
Constructs a new UnionMember object with its fields initialized to null.

UnionMember

public UnionMember(String __name,
                   Any __label,
                   TypeCode __type,
                   IDLType __type_def)
Constructs a new UnionMember object with its fields initialized to the given values.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnionMemberHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UnionMemberHelper

java.lang.Object
  |
  +--org.omg.CORBA.UnionMemberHelper
public abstract class UnionMemberHelper
extends Object

org/omg/CORBA/UnionMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

Constructor Summary
UnionMemberHelper()
Method Summary
static UnionMember | extract(Any a)
static String | id()
static void | insert(Any a, UnionMember that)
static UnionMember | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, UnionMember value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UnionMemberHelper

public UnionMemberHelper()
Method Detail

insert

public static void insert(Any a,
                          UnionMember that)

extract

public static UnionMember extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static UnionMember read(InputStream istream)

write

public static void write(OutputStream ostream,
                         UnionMember value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UNKNOWN

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UNKNOWN

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.omg.CORBA.SystemException
                          |
                          +--org.omg.CORBA.UNKNOWN
All Implemented Interfaces:
Serializable
public final class UNKNOWN
extends SystemException

The CORBA UNKNOWN exception, which is thrown when there is an error whose cause is unknown to the ORB. It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception.

See the section Minor Code Meanings to see the minor codes for this exception.

See Also:
documentation on Java IDL exceptions, Serialized Form

Fields inherited from class org.omg.CORBA.SystemException
completed, minor
Constructor Summary
UNKNOWN()
Constructs an UNKNOWN exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.
UNKNOWN(int minor, CompletionStatus completed)
Constructs an UNKNOWN exception with the specified minor code and completion status.
UNKNOWN(String s)
Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
UNKNOWN(String s, int minor, CompletionStatus completed)
Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
Methods inherited from class org.omg.CORBA.SystemException
toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UNKNOWN

public UNKNOWN()
Constructs an UNKNOWN exception with a default minor code of 0, a completion state of CompletionStatus.COMPLETED_NO, and a null description.

UNKNOWN

public UNKNOWN(String s)
Constructs an UNKNOWN exception with the specified description message, a minor code of 0, and a completion state of COMPLETED_NO.
Parameters:
s - the String containing a detail message

UNKNOWN

public UNKNOWN(int minor,
               CompletionStatus completed)
Constructs an UNKNOWN exception with the specified minor code and completion status.
Parameters:
minor - the minor code
completed - the completion status

UNKNOWN

public UNKNOWN(String s,
               int minor,
               CompletionStatus completed)
Constructs an UNKNOWN exception with the specified description message, minor code, and completion status.
Parameters:
s - the String containing a description message
minor - the minor code
completed - the completion status
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownUserException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UnknownUserException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.UnknownUserException
All Implemented Interfaces:
IDLEntity, Serializable
public final class UnknownUserException
extends UserException

A class that contains user exceptions returned by the server. When the client uses the DII to make an invocation, any user exception returned from the server is enclosed in an Any object contained in the UnknownUserException object. This is available from the Environment object returned by the method Request.env.

See Also:
documentation on Java IDL exceptions, Request, Serialized Form

Field Summary
 Any except
The Any instance that contains the actual user exception thrown by the server.
Constructor Summary
UnknownUserException()
Constructs an UnknownUserException object.
UnknownUserException(Any a)
Constructs an UnknownUserException object that contains the given Any object.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

except

public Any except
The Any instance that contains the actual user exception thrown by the server.
Constructor Detail

UnknownUserException

public UnknownUserException()
Constructs an UnknownUserException object.

UnknownUserException

public UnknownUserException(Any a)
Constructs an UnknownUserException object that contains the given Any object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UNSUPPORTED_POLICY

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface UNSUPPORTED_POLICY

public interface UNSUPPORTED_POLICY

UNSUPPORTED_POLICY is one of the PolicyErrorCodes which would be filled in the PolicyError exception. UNSUPPORTED_POLICY - the requested Policy is understood to be valid by the ORB, but is not currently supported.

Field Summary
static short value
The Error code for PolicyError exception.

Field Detail

value

public static final short value
The Error code for PolicyError exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UNSUPPORTED_POLICY_VALUE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface UNSUPPORTED_POLICY_VALUE

public interface UNSUPPORTED_POLICY_VALUE

UNSUPPORTED_POLICY_VALUE is one of the PolicyErrorCodes which would be filled in the PolicyError exception. UNSUPPORTED_POLICY_VALUE - The value requested for the Policy is of a valid type and within the valid range for that type, but this valid value is not currently supported.

Field Summary
static short value
The Error code for PolicyError exception.

Field Detail

value

public static final short value
The Error code for PolicyError exception.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UserException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UserException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
All Implemented Interfaces:
IDLEntity, Serializable
Direct Known Subclasses:
AlreadyBound, BadKind, Bounds, Bounds, CannotProceed, InconsistentTypeCode, Invalid, InvalidName, InvalidName, InvalidSeq, InvalidValue, NotEmpty, NotFound, PolicyError, TypeMismatch, UnknownUserException, WrongTransaction
public abstract class UserException
extends Exception
implements IDLEntity

The root class for CORBA IDL-defined user exceptions. All CORBA user exceptions are checked exceptions, which means that they need to be declared in method signatures.

See Also:
documentation on Java IDL exceptions, Serialized Form

Constructor Summary
protected | UserException() Constructs a UserException object.
protected | UserException(String reason) Constructs a UserException object with a detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UserException

protected UserException()
Constructs a UserException object. This method is called only by subclasses.

UserException

protected UserException(String reason)
Constructs a UserException object with a detail message. This method is called only by subclasses.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UShortSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UShortSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.UShortSeqHelper
public final class UShortSeqHelper
extends Object

org/omg/CORBA/UShortSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
UShortSeqHelper()
Method Summary
static short[] | extract(Any a)
static String | id()
static void | insert(Any a, short[] that)
static short[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, short[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UShortSeqHelper

public UShortSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          short[] that)

extract

public static short[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static short[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         short[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UShortSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class UShortSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.UShortSeqHolder
All Implemented Interfaces:
Streamable
public final class UShortSeqHolder
extends Object
implements Streamable

org/omg/CORBA/UShortSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 short[] value
Constructor Summary
UShortSeqHolder()
UShortSeqHolder(short[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public short[] value
Constructor Detail

UShortSeqHolder

public UShortSeqHolder()

UShortSeqHolder

public UShortSeqHolder(short[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueBaseHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ValueBaseHelper

java.lang.Object
  |
  +--org.omg.CORBA.ValueBaseHelper
public abstract class ValueBaseHelper
extends Object

Constructor Summary
ValueBaseHelper()
Method Summary
static Serializable | extract(Any a)
static String | id()
static void | insert(Any a, Serializable that)
static Serializable | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, Serializable value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ValueBaseHelper

public ValueBaseHelper()
Method Detail

insert

public static void insert(Any a,
                          Serializable that)

extract

public static Serializable extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static Serializable read(InputStream istream)

write

public static void write(OutputStream ostream,
                         Serializable value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueBaseHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ValueBaseHolder

java.lang.Object
  |
  +--org.omg.CORBA.ValueBaseHolder
All Implemented Interfaces:
Streamable
public final class ValueBaseHolder
extends Object
implements Streamable

A Holder class for a java.io.Serializable that is used to store "out" and "inout" parameters in IDL methods. If an IDL method signature has an IDL ValueBase as an "out" or "inout" parameter, the programmer must pass an instance of ValueBaseHolder as the corresponding parameter in the method invocation; for "inout" parameters, the programmer must also fill the "in" value to be sent to the server. Before the method invocation returns, the ORB will fill in the value corresponding to the "out" value returned from the server.

If myValueBaseHolder is an instance of ValueBaseHolder, the value stored in its value field can be accessed with myValueBaseHolder.value.

Field Summary
 Serializable value
The java.io.Serializable value held by this ValueBaseHolder object.
Constructor Summary
ValueBaseHolder()
Constructs a new ValueBaseHolder object with its value field initialized to 0.
ValueBaseHolder(Serializable initial)
Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.
Method Summary
void | _read(InputStream input) Reads from input and initalizes the value in the Holder with the unmarshalled data.
TypeCode | _type() Returns the TypeCode object corresponding to the value held in the Holder.
void | _write(OutputStream output) Marshals to output the value in the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Serializable value
The java.io.Serializable value held by this ValueBaseHolder object.
Constructor Detail

ValueBaseHolder

public ValueBaseHolder()
Constructs a new ValueBaseHolder object with its value field initialized to 0.

ValueBaseHolder

public ValueBaseHolder(Serializable initial)
Constructs a new ValueBaseHolder object with its value field initialized to the given java.io.Serializable.
Parameters:
initial - the java.io.Serializable with which to initialize the value field of the newly-created ValueBaseHolder object
Method Detail

_read

public void _read(InputStream input)
Reads from input and initalizes the value in the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Parameters:
input - the InputStream containing CDR formatted data from the wire

_write

public void _write(OutputStream output)
Marshals to output the value in the Holder.
Specified by:
_write in interface Streamable
Parameters:
output - the OutputStream which will contain the CDR formatted data

_type

public TypeCode _type()
Returns the TypeCode object corresponding to the value held in the Holder.
Specified by:
_type in interface Streamable
Returns:
the TypeCode of the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueMember

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ValueMember

java.lang.Object
  |
  +--org.omg.CORBA.ValueMember
All Implemented Interfaces:
IDLEntity, Serializable
public final class ValueMember
extends Object
implements IDLEntity

A description in the Interface Repository of a member of a value object.

See Also:
Serialized Form

Field Summary
short | access The type of access (public, private) for the value member described by this ValueMember object.
String | defined_in The name of the value member described by this ValueMember object.
String | id The name of the value member described by this ValueMember object.
String | name The name of the value member described by this ValueMember object.
TypeCode | type The type of the value member described by this ValueMember object.
IDLType | type_def The typedef that represents the IDL type of the value member described by this ValueMember object.
String | version The name of the value member described by this ValueMember object.
Constructor Summary
ValueMember()
Constructs a default ValueMember object.
ValueMember(String __name, String __id, String __defined_in, String __version, TypeCode __type, IDLType __type_def, short __access)
Constructs a ValueMember object initialized with the given values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name
The name of the value member described by this ValueMember object.

id

public String id
The name of the value member described by this ValueMember object.

defined_in

public String defined_in
The name of the value member described by this ValueMember object.

version

public String version
The name of the value member described by this ValueMember object.

type

public TypeCode type
The type of the value member described by this ValueMember object.

type_def

public IDLType type_def
The typedef that represents the IDL type of the value member described by this ValueMember object.

access

public short access
The type of access (public, private) for the value member described by this ValueMember object.
Constructor Detail

ValueMember

public ValueMember()
Constructs a default ValueMember object.

ValueMember

public ValueMember(String __name,
                   String __id,
                   String __defined_in,
                   String __version,
                   TypeCode __type,
                   IDLType __type_def,
                   short __access)
Constructs a ValueMember object initialized with the given values.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueMemberHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class ValueMemberHelper

java.lang.Object
  |
  +--org.omg.CORBA.ValueMemberHelper
public abstract class ValueMemberHelper
extends Object

org/omg/CORBA/ValueMemberHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

Constructor Summary
ValueMemberHelper()
Method Summary
static ValueMember | extract(Any a)
static String | id()
static void | insert(Any a, ValueMember that)
static ValueMember | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, ValueMember value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ValueMemberHelper

public ValueMemberHelper()
Method Detail

insert

public static void insert(Any a,
                          ValueMember that)

extract

public static ValueMember extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static ValueMember read(InputStream istream)

write

public static void write(OutputStream ostream,
                         ValueMember value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VersionSpecHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class VersionSpecHelper

java.lang.Object
  |
  +--org.omg.CORBA.VersionSpecHelper
public abstract class VersionSpecHelper
extends Object

org/omg/CORBA/VersionSpecHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:43 o'clock GMT+00:00

Constructor Summary
VersionSpecHelper()
Method Summary
static String | extract(Any a)
static String | id()
static void | insert(Any a, String that)
static String | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VersionSpecHelper

public VersionSpecHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

write

public static void write(OutputStream ostream,
                         String value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VisibilityHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class VisibilityHelper

java.lang.Object
  |
  +--org.omg.CORBA.VisibilityHelper
public abstract class VisibilityHelper
extends Object

org/omg/CORBA/VisibilityHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl 03 June 1999 11:33:44 o'clock GMT+00:00

Constructor Summary
VisibilityHelper()
Method Summary
static short | extract(Any a)
static String | id()
static void | insert(Any a, short that)
static short | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, short value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VisibilityHelper

public VisibilityHelper()
Method Detail

insert

public static void insert(Any a,
                          short that)

extract

public static short extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static short read(InputStream istream)

write

public static void write(OutputStream ostream,
                         short value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VM_ABSTRACT

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface VM_ABSTRACT

public interface VM_ABSTRACT

Field Summary
static short value

Field Detail

value

public static final short value
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VM_CUSTOM

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface VM_CUSTOM

public interface VM_CUSTOM

Defines the code used to represent a custom marshalled value type in a typecode. This is one of the possible results of the type_modifier method on the TypeCode interface.

See Also:
TypeCode

Field Summary
static short value
The value representing a custom marshalled value type in a typecode.

Field Detail

value

public static final short value
The value representing a custom marshalled value type in a typecode.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VM_NONE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface VM_NONE

public interface VM_NONE

Defines the code used to represent the one of the values of a value type in a typecode.

Since:
JDK1.2
See Also:
TypeCode

Field Summary
static short value
The value representing the value type in a typecode as per CORBA 2.3 spec.

Field Detail

value

public static final short value
The value representing the value type in a typecode as per CORBA 2.3 spec.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VM_TRUNCATABLE

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Interface VM_TRUNCATABLE

public interface VM_TRUNCATABLE

Defines the code used to represent a truncatable value type in a typecode. A value type is truncatable if it inherits "safely" from another value type, which means it can be cast to a more general inherited type. This is one of the possible results of the type_modifier method on the TypeCode interface.

See Also:
TypeCode

Field Summary
static short value
The value representing a truncatable value type in a typecode.

Field Detail

value

public static final short value
The value representing a truncatable value type in a typecode.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WCharSeqHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class WCharSeqHelper

java.lang.Object
  |
  +--org.omg.CORBA.WCharSeqHelper
public final class WCharSeqHelper
extends Object

org/omg/CORBA/WCharSeqHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Constructor Summary
WCharSeqHelper()
Method Summary
static char[] | extract(Any a)
static String | id()
static void | insert(Any a, char[] that)
static char[] | read(InputStream istream)
static TypeCode | type()
static void | write(OutputStream ostream, char[] value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WCharSeqHelper

public WCharSeqHelper()
Method Detail

insert

public static void insert(Any a,
                          char[] that)

extract

public static char[] extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static char[] read(InputStream istream)

write

public static void write(OutputStream ostream,
                         char[] value)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WCharSeqHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class WCharSeqHolder

java.lang.Object
  |
  +--org.omg.CORBA.WCharSeqHolder
All Implemented Interfaces:
Streamable
public final class WCharSeqHolder
extends Object
implements Streamable

org/omg/CORBA/WCharSeqHolder.java Generated by the IDL-to-Java compiler (portable), version "3.0" from streams.idl 13 May 1999 22:41:36 o'clock GMT+00:00

Field Summary
 char[] value
Constructor Summary
WCharSeqHolder()
WCharSeqHolder(char[] initialValue)
Method Summary
void | _read(InputStream i) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream o) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public char[] value
Constructor Detail

WCharSeqHolder

public WCharSeqHolder()

WCharSeqHolder

public WCharSeqHolder(char[] initialValue)
Method Detail

_read

public void _read(InputStream i)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_write

public void _write(OutputStream o)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WrongTransaction

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class WrongTransaction

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CORBA.WrongTransaction
All Implemented Interfaces:
IDLEntity, Serializable
public class WrongTransaction
extends UserException

The CORBA WrongTransaction user-defined exception. This exception is thrown only by the methods Request.get_response and ORB.get_next_response when they are invoked from a transaction scope that is different from the one in which the client originally sent the request. See the OMG Transaction Service Specification for details.

See Also:
documentation on Java IDL exceptions, Serialized Form

Constructor Summary
WrongTransaction()
Constructs a WrongTransaction object with an empty detail message.
WrongTransaction(String reason)
Constructs a WrongTransaction object with the given detail message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

WrongTransaction

public WrongTransaction()
Constructs a WrongTransaction object with an empty detail message.

WrongTransaction

public WrongTransaction(String reason)
Constructs a WrongTransaction object with the given detail message.
Parameters:
reason - The detail message explaining what caused this exception to be thrown.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


WStringValueHelper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA
Class WStringValueHelper

java.lang.Object
  |
  +--org.omg.CORBA.WStringValueHelper
All Implemented Interfaces:
BoxedValueHelper
public final class WStringValueHelper
extends Object
implements BoxedValueHelper

org/omg/CORBA/WStringValueHelper.java Generated by the IDL-to-Java compiler (portable), version "3.0" from orb.idl 31 May 1999 22:27:30 o'clock GMT+00:00

Constructor Summary
WStringValueHelper()
Method Summary
static String | extract(Any a)
String | get_id()
static String | id()
static void | insert(Any a, String that)
Serializable | read_value(InputStream istream)
static String | read(InputStream istream)
static TypeCode | type()
void | write_value(OutputStream ostream, Serializable value)
static void | write(OutputStream ostream, String value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WStringValueHelper

public WStringValueHelper()
Method Detail

insert

public static void insert(Any a,
                          String that)

extract

public static String extract(Any a)

type

public static TypeCode type()

id

public static String id()

read

public static String read(InputStream istream)

read_value

public Serializable read_value(InputStream istream)
Specified by:
read_value in interface BoxedValueHelper

write

public static void write(OutputStream ostream,
                         String value)

write_value

public void write_value(OutputStream ostream,
                        Serializable value)
Specified by:
write_value in interface BoxedValueHelper

get_id

public String get_id()
Specified by:
get_id in interface BoxedValueHelper
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


org.omg.CORBA_2_3 Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA_2_3

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CORBA.ORB
      • class org.omg.CORBA_2_3.ORB
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Package org.omg.CORBA_2_3

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA_2_3

No usage of org.omg.CORBA_2_3

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA_2_3.ORB

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA_2_3.ORB

No usage of org.omg.CORBA_2_3.ORB

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


ORB

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA_2_3
Class ORB

java.lang.Object
  |
  +--org.omg.CORBA.ORB
        |
        +--org.omg.CORBA_2_3.ORB
public abstract class ORB
extends ORB

A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

Constructor Summary
ORB()
Method Summary
Object | get_value_def(String repid)
ValueFactory | lookup_value_factory(String id)
ValueFactory | register_value_factory(String id, ValueFactory factory)
void | set_delegate(Object wrapper)
void | unregister_value_factory(String id)
Methods inherited from class org.omg.CORBA.ORB
connect, create_abstract_interface_tc, create_alias_tc, create_any, create_array_tc, create_basic_dyn_any, create_context_list, create_dyn_any, create_dyn_array, create_dyn_enum, create_dyn_sequence, create_dyn_struct, create_dyn_union, create_enum_tc, create_environment, create_exception_list, create_exception_tc, create_fixed_tc, create_interface_tc, create_list, create_named_value, create_native_tc, create_operation_list, create_output_stream, create_policy, create_recursive_sequence_tc, create_recursive_tc, create_sequence_tc, create_string_tc, create_struct_tc, create_union_tc, create_value_box_tc, create_value_tc, create_wstring_tc, destroy, disconnect, get_current, get_default_context, get_next_response, get_primitive_tc, get_service_information, init, init, init, list_initial_services, object_to_string, perform_work, poll_next_response, resolve_initial_references, run, send_multiple_requests_deferred, send_multiple_requests_oneway, set_parameters, set_parameters, shutdown, string_to_object, work_pending
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ORB

public ORB()
Method Detail

register_value_factory

public ValueFactory register_value_factory(String id,
                                           ValueFactory factory)
See Also:
CORBA_2_3 package comments for unimplemented features

unregister_value_factory

public void unregister_value_factory(String id)
See Also:
CORBA_2_3 package comments for unimplemented features

lookup_value_factory

public ValueFactory lookup_value_factory(String id)
See Also:
CORBA_2_3 package comments for unimplemented features

get_value_def

public Object get_value_def(String repid)
                     throws BAD_PARAM
See Also:
CORBA_2_3 package comments for unimplemented features

set_delegate

public void set_delegate(Object wrapper)
See Also:
CORBA_2_3 package comments for unimplemented features
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package org.omg.CORBA_2_3

The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

See:
Description

Class Summary
ORB A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.

Package org.omg.CORBA_2_3 Description

The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java 2 Standard Edition. These changes occurred in recent revisions to the CORBA API defined by the OMG. The new methods were added to interfaces derived from the corresponding interfaces in the CORBA package. This provides backward compatibility and avoids breaking the JCK tests.

The following methods in the abstract class org.omg.CORBA_2_3.ORB are unimplemented:

  • public org.omg.CORBA.portable.ValueFactory register_value_factory(String id, org.omg.CORBA.portable.ValueFactory factory)
  • public void unregister_value_factory(String id)
  • public org.omg.CORBA.portable.ValueFactory lookup_value_factory(String id)
  • public org.omg.CORBA.Object get_value_def(String repid)
  • public void set_delegate(java.lang.Object wrapper)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


org.omg.CORBA_2_3.portable Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CORBA_2_3.portable

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CORBA.portable.Delegate
      • class org.omg.CORBA_2_3.portable.Delegate
    • class java.io.InputStream
      • class org.omg.CORBA.portable.InputStream
        • class org.omg.CORBA_2_3.portable.InputStream
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CORBA_2_3.portable.ObjectImpl
    • class java.io.OutputStream
      • class org.omg.CORBA.portable.OutputStream
        • class org.omg.CORBA_2_3.portable.OutputStream
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CORBA_2_3.portable

Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

See:
Description

Class Summary
Delegate | Delegate class provides the ORB vendor specific implementation of CORBA object.
InputStream | InputStream provides for the reading of all of the mapped IDL types from the stream.
ObjectImpl | ObjectImpl class is the base class for all stubs.
OutputStream | OutputStream provides interface for writing of all of the mapped IDL type to the stream.

Package org.omg.CORBA_2_3.portable Description

Provides methods for the input and output of value types, and contains other updates to the org/omg/CORBA/portable package.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CORBA_2_3.portable

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CORBA_2_3.portable

Packages that use org.omg.CORBA_2_3.portable
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Classes in org.omg.CORBA_2_3.portable used by javax.rmi.CORBA
ObjectImpl
ObjectImpl class is the base class for all stubs.

Classes in org.omg.CORBA_2_3.portable used by org.omg.CORBA.portable
InputStream
InputStream provides for the reading of all of the mapped IDL types from the stream.

Classes in org.omg.CORBA_2_3.portable used by org.omg.stub.java.rmi
ObjectImpl
ObjectImpl class is the base class for all stubs.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA_2_3.portable.Delegate

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA_2_3.portable.Delegate

No usage of org.omg.CORBA_2_3.portable.Delegate

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA_2_3.portable.OutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA_2_3.portable.OutputStream

No usage of org.omg.CORBA_2_3.portable.OutputStream

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA_2_3.portable.InputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA_2_3.portable.InputStream

Packages that use InputStream
org.omg.CORBA.portable Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated by one vendor to run on another vendor's ORB.

Uses of InputStream in org.omg.CORBA.portable

Methods in org.omg.CORBA.portable with parameters of type InputStream
 Serializable ValueFactory.read_value(InputStream is)
Is called by the ORB runtime while in the process of unmarshaling a value type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CORBA_2_3.portable.ObjectImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CORBA_2_3.portable.ObjectImpl

Packages that use ObjectImpl
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.stub.java.rmi | Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Uses of ObjectImpl in javax.rmi.CORBA

Subclasses of ObjectImpl in javax.rmi.CORBA
 class Stub
Base class from which all RMI-IIOP stubs must inherit.

Uses of ObjectImpl in org.omg.stub.java.rmi

Subclasses of ObjectImpl in org.omg.stub.java.rmi
 class _Remote_Stub
This class provides the Stub for the Remote Type.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Delegate

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA_2_3.portable
Class Delegate

java.lang.Object
  |
  +--org.omg.CORBA.portable.Delegate
        |
        +--org.omg.CORBA_2_3.portable.Delegate
public abstract class Delegate
extends Delegate

Delegate class provides the ORB vendor specific implementation of CORBA object. It extends org.omg.CORBA.portable.Delegate and provides new methods that were defined by CORBA 2.3.

Since:
JDK1.2
See Also:
Delegate

Constructor Summary
Delegate()
Method Summary
 String get_codebase(Object self)
Returns the codebase for object reference provided.
Methods inherited from class org.omg.CORBA.portable.Delegate
create_request, create_request, duplicate, equals, get_domain_managers, get_interface_def, get_policy, hash, hashCode, invoke, is_a, is_equivalent, is_local, non_existent, orb, release, releaseReply, request, request, servant_postinvoke, servant_preinvoke, set_policy_override, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Delegate

public Delegate()
Method Detail

get_codebase

public String get_codebase(Object self)
Returns the codebase for object reference provided.
Parameters:
self - the object reference whose codebase needs to be returned.
Returns:
the codebase as a space delimited list of url strings or null if none.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA_2_3.portable
Class InputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.omg.CORBA.portable.InputStream
              |
              +--org.omg.CORBA_2_3.portable.InputStream
public abstract class InputStream
extends InputStream

InputStream provides for the reading of all of the mapped IDL types from the stream. It extends org.omg.CORBA.portable.InputStream. This class defines new methods that were added for CORBA 2.3.

Since:
JDK1.2
See Also:
InputStream

Constructor Summary
InputStream()
Method Summary
Object | read_abstract_interface() unmarshal the value object or a suitable stub object.
Object | read_abstract_interface(Class clz) unmarshal the class object or the stub class corresponding to the passed type.
Serializable | read_value() unmarshalls a value type from the input stream.
Serializable | read_value(BoxedValueHelper factory) unmarshalls a value type from the input stream.
Serializable | read_value(Class clz) unmarshalls a value type from the input stream.
Serializable | read_value(Serializable value) unmarshalls a value type from the input stream.
Serializable | read_value(String rep_id) unmarshalls a value type from the input stream.
Methods inherited from class org.omg.CORBA.portable.InputStream
orb, read_any, read_boolean_array, read_boolean, read_char_array, read_char, read_Context, read_double_array, read_double, read_fixed, read_float_array, read_float, read_long_array, read_long, read_longlong_array, read_longlong, read_Object, read_Object, read_octet_array, read_octet, read_Principal, read_short_array, read_short, read_string, read_TypeCode, read_ulong_array, read_ulong, read_ulonglong_array, read_ulonglong, read_ushort_array, read_ushort, read_wchar_array, read_wchar, read_wstring, read
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputStream

public InputStream()
Method Detail

read_value

public Serializable read_value()
unmarshalls a value type from the input stream.

read_value

public Serializable read_value(Class clz)
unmarshalls a value type from the input stream.
Parameters:
clz - is the declared type of the value to be unmarshalled
Returns:
the value unmarshalled from the input stream

read_value

public Serializable read_value(BoxedValueHelper factory)
unmarshalls a value type from the input stream.
Parameters:
factory - is the instance fo the helper to be used for unmarshalling the value type
Returns:
the value unmarshalled from the input stream

read_value

public Serializable read_value(String rep_id)
unmarshalls a value type from the input stream.
Parameters:
rep_id - identifies the type of the value to be unmarshalled
Returns:
value type unmarshalled from the input stream

read_value

public Serializable read_value(Serializable value)
unmarshalls a value type from the input stream.
Parameters:
value - is an uninitialized value which is added to the orb's indirection table before calling Streamable._read() or CustomMarshal.unmarshal() to unmarshal the value.
Returns:
value type unmarshalled from the input stream

read_abstract_interface

public Object read_abstract_interface()
unmarshal the value object or a suitable stub object.
Returns:
ORB runtime returns the value object or a suitable stub object.

read_abstract_interface

public Object read_abstract_interface(Class clz)
unmarshal the class object or the stub class corresponding to the passed type.
Parameters:
clz - is the Class object for the stub class which corresponds to the type that is statically expected.
Returns:
ORB runtime returns the value object or a suitable stub object.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA_2_3.portable
Class ObjectImpl

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA_2_3.portable.ObjectImpl
All Implemented Interfaces:
Object
Direct Known Subclasses:
Stub
public abstract class ObjectImpl
extends ObjectImpl

ObjectImpl class is the base class for all stubs. It provides the basic delegation mechanism. It extends org.omg.CORBA.portable.ObjectImpl and provides new methods defined by CORBA 2.3.

Since:
JDK1.2
See Also:
ObjectImpl

Constructor Summary
ObjectImpl()
Method Summary
 String _get_codebase()
Returns the codebase for this object reference.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectImpl

public ObjectImpl()
Method Detail

_get_codebase

public String _get_codebase()
Returns the codebase for this object reference.
Returns:
the codebase as a space delimited list of url strings or null if none.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutputStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA_2_3.portable
Class OutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--org.omg.CORBA.portable.OutputStream
              |
              +--org.omg.CORBA_2_3.portable.OutputStream
public abstract class OutputStream
extends OutputStream

OutputStream provides interface for writing of all of the mapped IDL type to the stream. It extends org.omg.CORBA.portable.OutputStream, and defines new methods defined by CORBA 2.3.

Since:
JDK1.2
See Also:
OutputStream

Constructor Summary
OutputStream()
Method Summary
void | write_abstract_interface(Object obj) marshals a value object or a stub object.
void | write_value(Serializable value) marshals a value type to the output stream.
void | write_value(Serializable value, BoxedValueHelper factory) marshals a value type to the output stream.
void | write_value(Serializable value, Class clz) marshals a value type to the output stream.
void | write_value(Serializable value, String repository_id) marshals a value type to the output stream.
Methods inherited from class org.omg.CORBA.portable.OutputStream
create_input_stream, orb, write_any, write_boolean_array, write_boolean, write_char_array, write_char, write_Context, write_double_array, write_double, write_fixed, write_float_array, write_float, write_long_array, write_long, write_longlong_array, write_longlong, write_Object, write_octet_array, write_octet, write_Principal, write_short_array, write_short, write_string, write_TypeCode, write_ulong_array, write_ulong, write_ulonglong_array, write_ulonglong, write_ushort_array, write_ushort, write_wchar_array, write_wchar, write_wstring, write
Methods inherited from class java.io.OutputStream
close, flush, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OutputStream

public OutputStream()
Method Detail

write_value

public void write_value(Serializable value)
marshals a value type to the output stream.
Parameters:
value - is the acutal value to write

write_value

public void write_value(Serializable value,
                        Class clz)
marshals a value type to the output stream.
Parameters:
value - is the acutal value to write
clz - is the declared type of the value to be marshaled

write_value

public void write_value(Serializable value,
                        String repository_id)
marshals a value type to the output stream.
Parameters:
value - is the acutal value to write
repository_id - identifies the type of the value type to be marshaled

write_value

public void write_value(Serializable value,
                        BoxedValueHelper factory)
marshals a value type to the output stream.
Parameters:
value - is the acutal value to write
factory - is the instance of the helper to be used for marshaling the boxed value

write_abstract_interface

public void write_abstract_interface(Object obj)
marshals a value object or a stub object.
Parameters:
the - actual value object or the stub to marshal to be marshalled
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


_NamingContextStub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class _NamingContextStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CosNaming._NamingContextStub
All Implemented Interfaces:
IDLEntity, NamingContext, NamingContextOperations, Object, Serializable
public class _NamingContextStub
extends ObjectImpl
implements NamingContext

See Also:
Serialized Form

Constructor Summary
_NamingContextStub(Delegate d)
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
void | bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
NamingContext | bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.
void | bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | destroy() The destroy operation deletes a naming context.
void | list(int how_many, BindingListHolder bl, BindingIteratorHolder bi) The list operation allows a client to iterate through a set of bindings in a naming context.
NamingContext | new_context() This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
void | rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
void | rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
Object | resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | unbind(NameComponent[] n) The unbind operation removes a name binding from a context.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_NamingContextStub

public _NamingContextStub(Delegate d)
Method Detail

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance

bind

public void bind(NameComponent[] n,
                 Object obj)
          throws NotFound,
                 CannotProceed,
                 InvalidName,
                 AlreadyBound
Description copied from interface: NamingContextOperations
Creates a binding of a name and an object in the naming context. Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved.
Specified by:
bind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

obj - The Object to bind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

AlreadyBound - Indicates an object is already bound to the specified name.

bind_context

public void bind_context(NameComponent[] n,
                         NamingContext nc)
                  throws NotFound,
                         CannotProceed,
                         InvalidName,
                         AlreadyBound
Description copied from interface: NamingContextOperations
Names an object that is a naming context. Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved.
Specified by:
bind_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

nc - NamingContect object to bind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

AlreadyBound - Indicates an object is already bound to the specified name.

rebind

public void rebind(NameComponent[] n,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Description copied from interface: NamingContextOperations
Creates a binding of a name and an object in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.
Specified by:
rebind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

rebind_context

public void rebind_context(NameComponent[] n,
                           NamingContext nc)
                    throws NotFound,
                           CannotProceed,
                           InvalidName
Description copied from interface: NamingContextOperations
Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.
Specified by:
rebind_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

nc - NamingContect object to rebind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

resolve

public Object resolve(NameComponent[] n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
Description copied from interface: NamingContextOperations
The resolve operation is the process of retrieving an object bound to a name in a given context. The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface.
Specified by:
resolve in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

unbind

public void unbind(NameComponent[] n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Description copied from interface: NamingContextOperations
The unbind operation removes a name binding from a context.
Specified by:
unbind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

list

public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
Description copied from interface: NamingContextOperations
The list operation allows a client to iterate through a set of bindings in a naming context.

The list operation returns at most the requested number of bindings in BindingList bl.

  • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
  • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
Specified by:
list in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
how_many - the maximum number of bindings to return

bl - the returned list of bindings

bi - the returned binding iterator

new_context

public NamingContext new_context()
Description copied from interface: NamingContextOperations
This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. The new context is not bound to any name.
Specified by:
new_context in interface NamingContextOperations

bind_new_context

public NamingContext bind_new_context(NameComponent[] n)
                               throws NotFound,
                                      AlreadyBound,
                                      CannotProceed,
                                      InvalidName
Description copied from interface: NamingContextOperations
This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component).
Specified by:
bind_new_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

AlreadyBound - Indicates an object is already bound to the specified name.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

destroy

public void destroy()
             throws NotEmpty
Description copied from interface: NamingContextOperations
The destroy operation deletes a naming context. If the naming context contains bindings, the NotEmpty exception is raised.
Specified by:
destroy in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Throws:
NotEmpty - Indicates that the Naming Context contains bindings.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Interface BindingIterator

All Superinterfaces:
BindingIteratorOperations, IDLEntity, Object, Serializable
All Known Implementing Classes:
_BindingIteratorImplBase, _BindingIteratorStub
public interface BindingIterator
extends BindingIteratorOperations, Object, IDLEntity

The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations. The bindings iterator is obtained by using the list method on the NamingContext.

See Also:
NamingContextOperations.list(int, org.omg.CosNaming.BindingListHolder, org.omg.CosNaming.BindingIteratorHolder)

Methods inherited from interface org.omg.CosNaming.BindingIteratorOperations
destroy, next_n, next_one
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


_BindingIteratorStub

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class _BindingIteratorStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CosNaming._BindingIteratorStub
All Implemented Interfaces:
BindingIterator, BindingIteratorOperations, IDLEntity, Object, Serializable
public class _BindingIteratorStub
extends ObjectImpl
implements BindingIterator

See Also:
Serialized Form

Constructor Summary
_BindingIteratorStub(Delegate d)
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
void | destroy() This operation destroys the iterator.
boolean | next_n(int how_many, BindingListHolder bl) This operation returns at most the requested number of bindings.
boolean | next_one(BindingHolder b) This operation returns the next binding.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_BindingIteratorStub

public _BindingIteratorStub(Delegate d)
Method Detail

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance

next_one

public boolean next_one(BindingHolder b)
Description copied from interface: BindingIteratorOperations
This operation returns the next binding. If there are no more bindings, false is returned.
Specified by:
next_one in interface BindingIteratorOperations
Following copied from interface: org.omg.CosNaming.BindingIteratorOperations
Parameters:
b - the returned binding

next_n

public boolean next_n(int how_many,
                      BindingListHolder bl)
Description copied from interface: BindingIteratorOperations
This operation returns at most the requested number of bindings.
Specified by:
next_n in interface BindingIteratorOperations
Following copied from interface: org.omg.CosNaming.BindingIteratorOperations
Parameters:
how_many - the maximum number of bindings tro return

bl - the returned bindings

destroy

public void destroy()
Description copied from interface: BindingIteratorOperations
This operation destroys the iterator.
Specified by:
destroy in interface BindingIteratorOperations
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


_NamingContextImplBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class _NamingContextImplBase

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA.DynamicImplementation
              |
              +--org.omg.CosNaming._NamingContextImplBase
All Implemented Interfaces:
IDLEntity, NamingContext, NamingContextOperations, Object, Serializable
public abstract class _NamingContextImplBase
extends DynamicImplementation
implements NamingContext

See Also:
Serialized Form

Constructor Summary
_NamingContextImplBase()
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
void | invoke(ServerRequest r) Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CosNaming.NamingContextOperations
bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_NamingContextImplBase

public _NamingContextImplBase()
Method Detail

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance

invoke

public void invoke(ServerRequest r)
Description copied from class: DynamicImplementation
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception. Deprecated by the Portable Object Adapter.
Overrides:
invoke in class DynamicImplementation
Following copied from class: org.omg.CORBA.DynamicImplementation
Parameters:
request - a ServerRequest object representing the request to be invoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


_BindingIteratorImplBase

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class _BindingIteratorImplBase

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA.DynamicImplementation
              |
              +--org.omg.CosNaming._BindingIteratorImplBase
All Implemented Interfaces:
BindingIterator, BindingIteratorOperations, IDLEntity, Object, Serializable
public abstract class _BindingIteratorImplBase
extends DynamicImplementation
implements BindingIterator

See Also:
Serialized Form

Constructor Summary
_BindingIteratorImplBase()
Method Summary
String[] | _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
void | invoke(ServerRequest r) Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception.
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.omg.CosNaming.BindingIteratorOperations
destroy, next_n, next_one
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Constructor Detail

_BindingIteratorImplBase

public _BindingIteratorImplBase()
Method Detail

_ids

public String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
Overrides:
_ids in class ObjectImpl
Following copied from class: org.omg.CORBA.portable.ObjectImpl
Returns:
the array of all repository identifiers supported by this ObjectImpl instance

invoke

public void invoke(ServerRequest r)
Description copied from class: DynamicImplementation
Accepts a ServerRequest object and uses its methods to determine the request target, operation, and parameters, and to set the result or exception. Deprecated by the Portable Object Adapter.
Overrides:
invoke in class DynamicImplementation
Following copied from class: org.omg.CORBA.DynamicImplementation
Parameters:
request - a ServerRequest object representing the request to be invoked
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NamingContext

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Interface NamingContext

All Superinterfaces:
IDLEntity, NamingContextOperations, Object, Serializable
All Known Implementing Classes:
_NamingContextStub, _NamingContextImplBase
public interface NamingContext
extends NamingContextOperations, Object, IDLEntity

A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

See CORBA COS Naming Specification.

Methods inherited from interface org.omg.CosNaming.NamingContextOperations
bind_context, bind_new_context, bind, destroy, list, new_context, rebind_context, rebind, resolve, unbind
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


org.omg.CosNaming Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CosNaming

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CosNaming.Binding (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.BindingHelper
    • class org.omg.CosNaming.BindingHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingIteratorHelper
    • class org.omg.CosNaming.BindingIteratorHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingListHelper
    • class org.omg.CosNaming.BindingListHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.BindingType (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.BindingTypeHelper
    • class org.omg.CosNaming.BindingTypeHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.IstringHelper
    • class org.omg.CosNaming.NameComponent (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.NameComponentHelper
    • class org.omg.CosNaming.NameComponentHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NameHelper
    • class org.omg.CosNaming.NameHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextHelper
    • class org.omg.CosNaming.NamingContextHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CosNaming._BindingIteratorStub (implements org.omg.CosNaming.BindingIterator)
      • class org.omg.CosNaming._NamingContextStub (implements org.omg.CosNaming.NamingContext)
      • class org.omg.CORBA.DynamicImplementation
        • class org.omg.CosNaming._BindingIteratorImplBase (implements org.omg.CosNaming.BindingIterator)
        • class org.omg.CosNaming._NamingContextImplBase (implements org.omg.CosNaming.NamingContext)

Interface Hierarchy

  • interface org.omg.CosNaming.BindingIteratorOperations
    • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface org.omg.CosNaming.NamingContextOperations
    • interface org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface org.omg.CORBA.Object
    • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.portable.IDLEntity)
    • interface org.omg.CosNaming.NamingContext (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CosNaming.NamingContextOperations)
  • interface java.io.Serializable
    • interface org.omg.CORBA.portable.IDLEntity
      • interface org.omg.CosNaming.BindingIterator (also extends org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.Object)
      • interface org.omg.CosNaming.NamingContext (also extends org.omg.CosNaming.NamingContextOperations, org.omg.CORBA.Object)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CosNaming

Provides the naming service for Java IDL.

See:
Description

Interface Summary
BindingIterator | The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
BindingIteratorOperations | org/omg/CosNaming/BindingIteratorOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:52 PM PST
NamingContext | A naming context is an object that contains a set of name bindings in which each name is unique.
NamingContextOperations | org/omg/CosNaming/NamingContextOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:53 PM PST

Class Summary
_BindingIteratorImplBase
_BindingIteratorStub
_NamingContextImplBase
_NamingContextStub
Binding
BindingHelper
BindingHolder
BindingIteratorHelper
BindingIteratorHolder
BindingListHelper
BindingListHolder
BindingType
BindingTypeHelper
BindingTypeHolder
IstringHelper
NameComponent
NameComponentHelper
NameComponentHolder
NameHelper
NameHolder
NamingContextHelper
NamingContextHolder

Package org.omg.CosNaming Description

Provides the naming service for Java IDL.

The package and all its classes and interfaces were generated by running the tool idltojava on the file nameservice.idl, which is a module written in OMG IDL.

Interfaces

The package org.omg.CosNaming contains two public interfaces and several auxiliary classes.

The interfaces are:

  • NamingContext
  • BindingIterator

These two interfaces provide the means to bind/unbind names and object references, to retrieve bound object references, and to iterate through a list of bindings. The NamingContext interface supplies the main functionality for the naming service, and BindingIterator provides a means of iterating through a list of name/object reference bindings.

Auxiliary Classes

In order to map an OMG IDL interface to the Java programming language, the idltojava compiler creates Java classes that can be thought of as auxiliary classes. Comments for the generated auxiliary classes used by the interfaces NamingContext and BindingIterator are included here.

Classes Used by NamingContext and BindingIterator

The following are classes used by the naming service. (Helper and holder classes, which are generated for each of the classes listed here, are discussed below.)
  • public final class NameComponent -- a building block for names. (Names are bound to object references in a naming context.)

    A name is an array of one or more NameComponent objects. A name with a single NameComponent is called a simple name; a name with multiple NameComponent objects is called a compound name.

    A NameComponent object consists of two fields:

    1. id -- a String used as an identifier
    2. kind -- a String that can be used for any descriptive purpose. Its importance is that it can be used to describe an object without affecting syntax. The C programming language, for example, uses the the syntactic convention of appending the extension ".c" to a file name to indicate that it is a source code file. In a NameComponent object, the kind field can be used to describe the type of object rather than a file extension or some other syntactic convention. Examples of the value of the kind field include the strings "c_source", "object_code", "executable", "postscript", and "". It is not unusual for the kind field to be the empty string.

    In a name, each NameComponent object except the last denotes a NamingContext object; the last NameComponent object denotes the bound object reference. This is similar to a path name, in which the last name is the file name, and all names before it are directory names.

  • public final class Binding -- an object that associates a name with an object reference or a naming context. A Binding object has two fields:
    1. binding_name - an array of one or more NameComponent objects that represents the bound name
    2. binding_type - a BindingType object indicating whether the binding is between a name and an object reference or between a name and a naming context

    The interface NamingContext has methods for binding/unbinding names with object references or naming contexts, for listing bindings, and for resolving bindings (given a name, the method resolve returns the object reference bound to it).

  • public final class BindingType -- an object that specifies whether the given Binding object is a binding between a name and an object reference (that is, not a naming context) or between a name and a naming context.

    The classBindingType consists of two methods and four constants. Two of these constants are BindingType objects, and two are ints.

    The BindingType objects can be passed to the constructor for the class Binding or used as parameters or return values. These BindingType objects are:

    • public static final BindingType nobject -- to indicate that the binding is with an object reference
    • public static final BindingType ncontext -- to indicate that the binding is with a naming context

    The int constants can be supplied to the method from_int to create BindingType objects, or they can be return values for the method value. These constants are:

    • public static final int _nobject
    • public static final int _ncontext
    If the method from_int is supplied with anything other than _nobject or _ncontext, it will throw the exception org.omg.CORBA.BAD_PARAM.

    Usage is as follows:

           BindingType btObject = from_int(_nobject);
       BindingType btContext = from_int(_ncontext);
    The variable btObject refers to a BindingType object initialized to represent a binding with an object reference. The variable btContext refers to a BindingType object initialized to represent a binding with a NamingContex object.

    The method value returns either _nobject or _ncontext, so in the following line of code, the variable bt will contain _nobject or _ncontext:

           int bt = BindingType.value();

Holder Classes

OMG IDL uses OUT and INOUT parameters for returning values from operations. The mapping to the Java programming language, which does not have OUT and INOUT parameters, creates a special class for each type, called a holder class. An instance of a holder class can be passed to a Java method as a parameter, and a value can be assigned to its value field. This allows it to perform the function of an OUT or INOUT parameter.

The following holder classes are generated for the package org.omg.CosNaming:

  • NamingContextHolder
  • BindingIteratorHolder
  • BindingHolder
  • BindingListHolder
  • BindingTypeHolder
  • NameComponentHolder
  • NameHolder

Note that in the org.omg.CORBA package, there is a holder class for each of the basic Java types: IntHolder, ShortHolder, StringHolder, and so on.

Note also that there is a NameHolder class even though there is no Name class; similarly, there is a BindingListHolder class even though there is no BindingList class. This is true because in the OMG IDL interface, Name and BindingList are typedefs. There is no mapping from an IDL typedef to a Java construct, but holder classes are generated if the typedef is for a sequence or an array. As mapped to the Java programming language, Name is an array of NameComponent objects, and a BindingList is an array of Binding objects. All holder classes have at least two constructors and one field:

  • value field -- an instance of the type being used as an OUT or INOUT parameter. For example, the value field of a NamingContextHolder will be a NamingContext object.
  • default constructor -- a constructor that creates a new holder object initialized with the default value for the type. For example, a new BindingHolder object created with the default constructor will have its value field set to null because that is the default value for an object. Other defaults are false for boolean, 0 for numeric and char types, and null for object references.
  • constructor from an instance -- a constructor that creates a new holder object whose value field is initialized with the instance supplied

A holder class for a user-defined type (a Java class) has three more methods, but application developers do not use them directly.

Helper Classes

Helper classes, which are generated for all user-defined types in an OMG IDL interface, supply static methods needed to manipulate those types.

There is only one method in a helper class that an application programmer uses: the method narrow. Only Java interfaces mapped from IDL interfaces will have a helper class that includes a narrow method, so in the CosNaming package, only the classes NamingContextHelper and BindingIteratorHelper have a narrow method.

  • public static NamingContext narrow(org.omg.CORBA.Object obj) -- converts the given CORBA object to a NamingContext object
  • public static BindingIterator narrow(org.omg.CORBA.Object obj) -- converts the given CORBA object to a BindingIterator object

Package org.omg.CosNaming.NamingContextPackage

This package supplies Helper and Holder classes for the exceptions used in the package org.omg.CosNaming and also for the class NotFoundReason, which supplies a reason for the exception NotFound.

There are Helper and Holder classes for the following exceptions:

  • AlreadyBound
  • CannotProceed
  • InvalidName
  • NotEmpty
  • NotFound

Naming Service Compatibility

Sun's implementation of the CosNaming package complies with the OMG COSNaming specification. In other words, the APIs in Sun's naming service are implemented according to the guidelines for a naming service provided by OMG. Therefore, if a third-party vendor has implemented a naming service that is OMG compliant, it is possible to switch between Sun's implementation of CosNaming and the third-party vendor's implementation. However, it is important to understand that there can be minor variations in the way different vendors implement the naming service, such as differences in the exception strings.

Instructions for Using a Third Party's Naming Service

Although we encourage using an ORB and ORB services that are both from one vendor, it is possible to plug in a third party's COSNaming implementation with Sun's RMI-IIOP ORB. Here are the steps to follow:
  1. Create a properties file for the Bootstrap server and give it two entries. For example, you could call this properties file /tmp/services and put the following in it: NameService, .

    This associates NameService with the Root Naming Context of the CosNaming implementation that you want to use.

  2. Start the standalone Bootstrap server using the following command:

      java -classpath $(CLASSPATH)
      com.sun.corba.ee.internal.CosNaming.BootstrapServer -InitialServicesFile
      "/tmp/services" [-ORBInitialPort port]

    Note that the square brackets at the end of the command indicate that specifying a port number is optional.

Now when an application calls the method org.omg.CORBA.ORB.resolve_initial_references, CORBA processes will contact the Bootstrap Server to get the Root Naming Context.

Package Specification

  • OMG Naming Service Specification in pdf format
  • OMG Naming Service Specification in ps format

Related Documentation

For an overview and examples of how to use the CosNaming API, please see:
  • Naming Service

For an overview of Java IDL, please see:

  • Java IDL home page

Since:
JDK1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CosNaming

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CosNaming

Packages that use org.omg.CosNaming
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Classes in org.omg.CosNaming used by org.omg.CosNaming
Binding
BindingHolder
BindingIterator
The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.
BindingIteratorHolder
BindingIteratorOperations
org/omg/CosNaming/BindingIteratorOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:52 PM PST
BindingListHolder
BindingType
NameComponent
NamingContext
A naming context is an object that contains a set of name bindings in which each name is unique.
NamingContextOperations
org/omg/CosNaming/NamingContextOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:53 PM PST

Classes in org.omg.CosNaming used by org.omg.CosNaming.NamingContextPackage
NameComponent
NamingContext
A naming context is an object that contains a set of name bindings in which each name is unique.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Binding

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class Binding

java.lang.Object
  |
  +--org.omg.CosNaming.Binding
All Implemented Interfaces:
IDLEntity, Serializable
public final class Binding
extends Object
implements IDLEntity

See Also:
Serialized Form

Field Summary
NameComponent[] | binding_name
BindingType | binding_type
Constructor Summary
Binding()
Binding(NameComponent[] __binding_name, BindingType __binding_type)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

binding_name

public NameComponent[] binding_name

binding_type

public BindingType binding_type
Constructor Detail

Binding

public Binding()

Binding

public Binding(NameComponent[] __binding_name,
               BindingType __binding_type)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingHelper

java.lang.Object
  |
  +--org.omg.CosNaming.BindingHelper
public class BindingHelper
extends Object

Method Summary
static Binding | extract(Any a)
static String | id()
static void | insert(Any a, Binding that)
static Binding | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, Binding that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         Binding that)

read

public static Binding read(InputStream in)

extract

public static Binding extract(Any a)

insert

public static void insert(Any a,
                          Binding that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingHolder

java.lang.Object
  |
  +--org.omg.CosNaming.BindingHolder
All Implemented Interfaces:
Streamable
public final class BindingHolder
extends Object
implements Streamable

Field Summary
 Binding value
Constructor Summary
BindingHolder()
BindingHolder(Binding __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Binding value
Constructor Detail

BindingHolder

public BindingHolder()

BindingHolder

public BindingHolder(Binding __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingIteratorHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingIteratorHelper

java.lang.Object
  |
  +--org.omg.CosNaming.BindingIteratorHelper
public class BindingIteratorHelper
extends Object

Method Summary
static BindingIterator | extract(Any a)
static String | id()
static void | insert(Any a, BindingIterator that)
static BindingIterator | narrow(Object that)
static BindingIterator | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, BindingIterator that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         BindingIterator that)

read

public static BindingIterator read(InputStream in)

extract

public static BindingIterator extract(Any a)

insert

public static void insert(Any a,
                          BindingIterator that)

type

public static TypeCode type()

id

public static String id()

narrow

public static BindingIterator narrow(Object that)
                              throws BAD_PARAM
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingIteratorHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingIteratorHolder

java.lang.Object
  |
  +--org.omg.CosNaming.BindingIteratorHolder
All Implemented Interfaces:
Streamable
public final class BindingIteratorHolder
extends Object
implements Streamable

Field Summary
 BindingIterator value
Constructor Summary
BindingIteratorHolder()
BindingIteratorHolder(BindingIterator __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public BindingIterator value
Constructor Detail

BindingIteratorHolder

public BindingIteratorHolder()

BindingIteratorHolder

public BindingIteratorHolder(BindingIterator __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingIteratorOperations

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Interface BindingIteratorOperations

All Known Subinterfaces:
BindingIterator
public interface BindingIteratorOperations

org/omg/CosNaming/BindingIteratorOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:52 PM PST

Method Summary
void | destroy() This operation destroys the iterator.
boolean | next_n(int how_many, BindingListHolder bl) This operation returns at most the requested number of bindings.
boolean | next_one(BindingHolder b) This operation returns the next binding.

Method Detail

next_one

public boolean next_one(BindingHolder b)
This operation returns the next binding. If there are no more bindings, false is returned.
Parameters:
b - the returned binding

next_n

public boolean next_n(int how_many,
                      BindingListHolder bl)
This operation returns at most the requested number of bindings.
Parameters:
how_many - the maximum number of bindings tro return

bl - the returned bindings

destroy

public void destroy()
This operation destroys the iterator.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingListHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingListHelper

java.lang.Object
  |
  +--org.omg.CosNaming.BindingListHelper
public class BindingListHelper
extends Object

Method Summary
static Binding[] | extract(Any a)
static String | id()
static void | insert(Any a, Binding[] that)
static Binding[] | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, Binding[] that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         Binding[] that)

read

public static Binding[] read(InputStream in)

extract

public static Binding[] extract(Any a)

insert

public static void insert(Any a,
                          Binding[] that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingListHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingListHolder

java.lang.Object
  |
  +--org.omg.CosNaming.BindingListHolder
All Implemented Interfaces:
Streamable
public final class BindingListHolder
extends Object
implements Streamable

Field Summary
 Binding[] value
Constructor Summary
BindingListHolder()
BindingListHolder(Binding[] __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public Binding[] value
Constructor Detail

BindingListHolder

public BindingListHolder()

BindingListHolder

public BindingListHolder(Binding[] __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingType

java.lang.Object
  |
  +--org.omg.CosNaming.BindingType
All Implemented Interfaces:
IDLEntity, Serializable
public final class BindingType
extends Object
implements IDLEntity

See Also:
Serialized Form

Field Summary
static int | _ncontext
static int | _nobject
static BindingType | ncontext
static BindingType | nobject
Method Summary
static BindingType | from_int(int i)
int | value()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_nobject

public static final int _nobject

_ncontext

public static final int _ncontext

nobject

public static final BindingType nobject

ncontext

public static final BindingType ncontext
Method Detail

value

public int value()

from_int

public static final BindingType from_int(int i)
                                  throws BAD_PARAM
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingTypeHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingTypeHelper

java.lang.Object
  |
  +--org.omg.CosNaming.BindingTypeHelper
public class BindingTypeHelper
extends Object

Method Summary
static BindingType | extract(Any a)
static String | id()
static void | insert(Any a, BindingType that)
static BindingType | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, BindingType that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         BindingType that)

read

public static BindingType read(InputStream in)

extract

public static BindingType extract(Any a)

insert

public static void insert(Any a,
                          BindingType that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BindingTypeHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class BindingTypeHolder

java.lang.Object
  |
  +--org.omg.CosNaming.BindingTypeHolder
All Implemented Interfaces:
Streamable
public final class BindingTypeHolder
extends Object
implements Streamable

Field Summary
 BindingType value
Constructor Summary
BindingTypeHolder()
BindingTypeHolder(BindingType __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public BindingType value
Constructor Detail

BindingTypeHolder

public BindingTypeHolder()

BindingTypeHolder

public BindingTypeHolder(BindingType __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.omg.CosNaming.BindingHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingHelper

No usage of org.omg.CosNaming.BindingHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingIteratorHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingIteratorHelper

No usage of org.omg.CosNaming.BindingIteratorHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingListHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingListHelper

No usage of org.omg.CosNaming.BindingListHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingTypeHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingTypeHelper

No usage of org.omg.CosNaming.BindingTypeHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingTypeHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingTypeHolder

No usage of org.omg.CosNaming.BindingTypeHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.IstringHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.IstringHelper

No usage of org.omg.CosNaming.IstringHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NameComponentHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NameComponentHelper

No usage of org.omg.CosNaming.NameComponentHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NameComponentHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NameComponentHolder

No usage of org.omg.CosNaming.NameComponentHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NameHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NameHelper

No usage of org.omg.CosNaming.NameHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NameHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NameHolder

No usage of org.omg.CosNaming.NameHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextHelper

No usage of org.omg.CosNaming.NamingContextHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextHolder

No usage of org.omg.CosNaming.NamingContextHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming._BindingIteratorImplBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming._BindingIteratorImplBase

No usage of org.omg.CosNaming._BindingIteratorImplBase

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming._BindingIteratorStub

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming._BindingIteratorStub

No usage of org.omg.CosNaming._BindingIteratorStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming._NamingContextImplBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming._NamingContextImplBase

No usage of org.omg.CosNaming._NamingContextImplBase

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming._NamingContextStub

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming._NamingContextStub

No usage of org.omg.CosNaming._NamingContextStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.Binding

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.Binding

Packages that use Binding
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of Binding in org.omg.CosNaming

Fields in org.omg.CosNaming declared as Binding
Binding[] | BindingListHolder.value
Binding | BindingHolder.value

Methods in org.omg.CosNaming that return Binding
static Binding[] | BindingListHelper.read(InputStream in)
static Binding[] | BindingListHelper.extract(Any a)
static Binding | BindingHelper.read(InputStream in)
static Binding | BindingHelper.extract(Any a)

Methods in org.omg.CosNaming with parameters of type Binding
static void | BindingListHelper.write(OutputStream out, Binding[] that)
static void | BindingListHelper.insert(Any a, Binding[] that)
static void | BindingHelper.write(OutputStream out, Binding that)
static void | BindingHelper.insert(Any a, Binding that)

Constructors in org.omg.CosNaming with parameters of type Binding
BindingListHolder(Binding[] __arg)
BindingHolder(Binding __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingHolder

Packages that use BindingHolder
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingHolder in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type BindingHolder
boolean | BindingIteratorOperations.next_one(BindingHolder b) This operation returns the next binding.
boolean | _BindingIteratorStub.next_one(BindingHolder b)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingIteratorHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingIteratorHolder

Packages that use BindingIteratorHolder
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingIteratorHolder in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type BindingIteratorHolder
void | _NamingContextStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
void | NamingContextOperations.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi) The list operation allows a client to iterate through a set of bindings in a naming context.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingListHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingListHolder

Packages that use BindingListHolder
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingListHolder in org.omg.CosNaming

Methods in org.omg.CosNaming with parameters of type BindingListHolder
void | _NamingContextStub.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
void | NamingContextOperations.list(int how_many, BindingListHolder bl, BindingIteratorHolder bi) The list operation allows a client to iterate through a set of bindings in a naming context.
boolean | BindingIteratorOperations.next_n(int how_many, BindingListHolder bl) This operation returns at most the requested number of bindings.
boolean | _BindingIteratorStub.next_n(int how_many, BindingListHolder bl)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.BindingType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.BindingType

Packages that use BindingType
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingType in org.omg.CosNaming

Fields in org.omg.CosNaming declared as BindingType
BindingType | BindingTypeHolder.value
BindingType | Binding.binding_type
static BindingType | BindingType.nobject
static BindingType | BindingType.ncontext

Methods in org.omg.CosNaming that return BindingType
static BindingType | BindingTypeHelper.read(InputStream in)
static BindingType | BindingTypeHelper.extract(Any a)
static BindingType | BindingType.from_int(int i)

Methods in org.omg.CosNaming with parameters of type BindingType
static void | BindingTypeHelper.write(OutputStream out, BindingType that)
static void | BindingTypeHelper.insert(Any a, BindingType that)

Constructors in org.omg.CosNaming with parameters of type BindingType
BindingTypeHolder(BindingType __arg)
Binding(NameComponent[] __binding_name, BindingType __binding_type)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NameComponent

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NameComponent

Packages that use NameComponent
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of NameComponent in org.omg.CosNaming

Fields in org.omg.CosNaming declared as NameComponent
NameComponent | NameComponentHolder.value
NameComponent[] | Binding.binding_name
NameComponent[] | NameHolder.value

Methods in org.omg.CosNaming that return NameComponent
static NameComponent[] | NameHelper.read(InputStream in)
static NameComponent[] | NameHelper.extract(Any a)
static NameComponent | NameComponentHelper.read(InputStream in)
static NameComponent | NameComponentHelper.extract(Any a)

Methods in org.omg.CosNaming with parameters of type NameComponent
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
void | _NamingContextStub.rebind(NameComponent[] n, Object obj)
void | _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
Object | _NamingContextStub.resolve(NameComponent[] n)
void | _NamingContextStub.unbind(NameComponent[] n)
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
static void | NameHelper.write(OutputStream out, NameComponent[] that)
static void | NameHelper.insert(Any a, NameComponent[] that)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
void | NamingContextOperations.rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
void | NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
Object | NamingContextOperations.resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | NamingContextOperations.unbind(NameComponent[] n) The unbind operation removes a name binding from a context.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.
static void | NameComponentHelper.write(OutputStream out, NameComponent that)
static void | NameComponentHelper.insert(Any a, NameComponent that)

Constructors in org.omg.CosNaming with parameters of type NameComponent
NameComponentHolder(NameComponent __arg)
Binding(NameComponent[] __binding_name, BindingType __binding_type)
NameHolder(NameComponent[] __arg)

Uses of NameComponent in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as NameComponent
NameComponent[] | NotFound.rest_of_name
NameComponent[] | CannotProceed.rest_of_name

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NameComponent
NotFound(NotFoundReason __why, NameComponent[] __rest_of_name)
CannotProceed(NamingContext __cxt, NameComponent[] __rest_of_name)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CosNaming.BindingIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CosNaming.BindingIterator

Packages that use BindingIterator
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingIterator in org.omg.CosNaming

Classes in org.omg.CosNaming that implement BindingIterator
class | _BindingIteratorImplBase
class | _BindingIteratorStub

Fields in org.omg.CosNaming declared as BindingIterator
 BindingIterator BindingIteratorHolder.value

Methods in org.omg.CosNaming that return BindingIterator
static BindingIterator | BindingIteratorHelper.read(InputStream in)
static BindingIterator | BindingIteratorHelper.extract(Any a)
static BindingIterator | BindingIteratorHelper.narrow(Object that)

Methods in org.omg.CosNaming with parameters of type BindingIterator
static void | BindingIteratorHelper.write(OutputStream out, BindingIterator that)
static void | BindingIteratorHelper.insert(Any a, BindingIterator that)

Constructors in org.omg.CosNaming with parameters of type BindingIterator
BindingIteratorHolder(BindingIterator __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CosNaming.BindingIteratorOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CosNaming.BindingIteratorOperations

Packages that use BindingIteratorOperations
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of BindingIteratorOperations in org.omg.CosNaming

Subinterfaces of BindingIteratorOperations in org.omg.CosNaming
 interface BindingIterator
The BindingIterator interface allows a client to iterate through the bindings using the next_one or next_n operations.

Classes in org.omg.CosNaming that implement BindingIteratorOperations
class | _BindingIteratorImplBase
class | _BindingIteratorStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CosNaming.NamingContext

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CosNaming.NamingContext

Packages that use NamingContext
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of NamingContext in org.omg.CosNaming

Classes in org.omg.CosNaming that implement NamingContext
class | _NamingContextImplBase
class | _NamingContextStub

Fields in org.omg.CosNaming declared as NamingContext
 NamingContext NamingContextHolder.value

Methods in org.omg.CosNaming that return NamingContext
NamingContext | _NamingContextStub.new_context()
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
NamingContext | NamingContextOperations.new_context() This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.
static NamingContext | NamingContextHelper.read(InputStream in)
static NamingContext | NamingContextHelper.extract(Any a)
static NamingContext | NamingContextHelper.narrow(Object that)

Methods in org.omg.CosNaming with parameters of type NamingContext
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
void | _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
void | NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
static void | NamingContextHelper.write(OutputStream out, NamingContext that)
static void | NamingContextHelper.insert(Any a, NamingContext that)

Constructors in org.omg.CosNaming with parameters of type NamingContext
NamingContextHolder(NamingContext __arg)

Uses of NamingContext in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as NamingContext
 NamingContext CannotProceed.cxt

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NamingContext
CannotProceed(NamingContext __cxt, NameComponent[] __rest_of_name)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.CosNaming.NamingContextOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.CosNaming.NamingContextOperations

Packages that use NamingContextOperations
org.omg.CosNaming Provides the naming service for Java IDL.

Uses of NamingContextOperations in org.omg.CosNaming

Subinterfaces of NamingContextOperations in org.omg.CosNaming
 interface NamingContext
A naming context is an object that contains a set of name bindings in which each name is unique.

Classes in org.omg.CosNaming that implement NamingContextOperations
class | _NamingContextImplBase
class | _NamingContextStub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


IstringHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class IstringHelper

java.lang.Object
  |
  +--org.omg.CosNaming.IstringHelper
public class IstringHelper
extends Object

Method Summary
static String | extract(Any a)
static String | id()
static void | insert(Any a, String that)
static String | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, String that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         String that)

read

public static String read(InputStream in)

extract

public static String extract(Any a)

insert

public static void insert(Any a,
                          String that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameComponent

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NameComponent

java.lang.Object
  |
  +--org.omg.CosNaming.NameComponent
All Implemented Interfaces:
IDLEntity, Serializable
public final class NameComponent
extends Object
implements IDLEntity

See Also:
Serialized Form

Field Summary
String | id
String | kind
Constructor Summary
NameComponent()
NameComponent(String __id, String __kind)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

id

public String id

kind

public String kind
Constructor Detail

NameComponent

public NameComponent()

NameComponent

public NameComponent(String __id,
                     String __kind)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameComponentHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NameComponentHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NameComponentHelper
public class NameComponentHelper
extends Object

Method Summary
static NameComponent | extract(Any a)
static String | id()
static void | insert(Any a, NameComponent that)
static NameComponent | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NameComponent that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NameComponent that)

read

public static NameComponent read(InputStream in)

extract

public static NameComponent extract(Any a)

insert

public static void insert(Any a,
                          NameComponent that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameComponentHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NameComponentHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NameComponentHolder
All Implemented Interfaces:
Streamable
public final class NameComponentHolder
extends Object
implements Streamable

Field Summary
 NameComponent value
Constructor Summary
NameComponentHolder()
NameComponentHolder(NameComponent __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NameComponent value
Constructor Detail

NameComponentHolder

public NameComponentHolder()

NameComponentHolder

public NameComponentHolder(NameComponent __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NameHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NameHelper
public class NameHelper
extends Object

Method Summary
static NameComponent[] | extract(Any a)
static String | id()
static void | insert(Any a, NameComponent[] that)
static NameComponent[] | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NameComponent[] that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NameComponent[] that)

read

public static NameComponent[] read(InputStream in)

extract

public static NameComponent[] extract(Any a)

insert

public static void insert(Any a,
                          NameComponent[] that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NameHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NameHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NameHolder
All Implemented Interfaces:
Streamable
public final class NameHolder
extends Object
implements Streamable

Field Summary
 NameComponent[] value
Constructor Summary
NameHolder()
NameHolder(NameComponent[] __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NameComponent[] value
Constructor Detail

NameHolder

public NameHolder()

NameHolder

public NameHolder(NameComponent[] __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingContextHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NamingContextHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextHelper
public class NamingContextHelper
extends Object

Method Summary
static NamingContext | extract(Any a)
static String | id()
static void | insert(Any a, NamingContext that)
static NamingContext | narrow(Object that)
static NamingContext | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NamingContext that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NamingContext that)

read

public static NamingContext read(InputStream in)

extract

public static NamingContext extract(Any a)

insert

public static void insert(Any a,
                          NamingContext that)

type

public static TypeCode type()

id

public static String id()

narrow

public static NamingContext narrow(Object that)
                            throws BAD_PARAM
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamingContextHolder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Class NamingContextHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextHolder
All Implemented Interfaces:
Streamable
public final class NamingContextHolder
extends Object
implements Streamable

Field Summary
 NamingContext value
Constructor Summary
NamingContextHolder()
NamingContextHolder(NamingContext __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NamingContext value
Constructor Detail

NamingContextHolder

public NamingContextHolder()

NamingContextHolder

public NamingContextHolder(NamingContext __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NamingContextOperations

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming
Interface NamingContextOperations

All Known Subinterfaces:
NamingContext
public interface NamingContextOperations

org/omg/CosNaming/NamingContextOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from nameservice.idl Wednesday, January 26, 2000 3:34:53 PM PST

Method Summary
void | bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
NamingContext | bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.
void | bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | destroy() The destroy operation deletes a naming context.
void | list(int how_many, BindingListHolder bl, BindingIteratorHolder bi) The list operation allows a client to iterate through a set of bindings in a naming context.
NamingContext | new_context() This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
void | rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
void | rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
Object | resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | unbind(NameComponent[] n) The unbind operation removes a name binding from a context.

Method Detail

bind

public void bind(NameComponent[] n,
                 Object obj)
          throws NotFound,
                 CannotProceed,
                 InvalidName,
                 AlreadyBound
Creates a binding of a name and an object in the naming context. Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved.
Parameters:
n - Name of the object

obj - The Object to bind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

AlreadyBound - Indicates an object is already bound to the specified name.

bind_context

public void bind_context(NameComponent[] n,
                         NamingContext nc)
                  throws NotFound,
                         CannotProceed,
                         InvalidName,
                         AlreadyBound
Names an object that is a naming context. Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved.
Parameters:
n - Name of the object

nc - NamingContect object to bind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

AlreadyBound - Indicates an object is already bound to the specified name.

rebind

public void rebind(NameComponent[] n,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Creates a binding of a name and an object in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

rebind_context

public void rebind_context(NameComponent[] n,
                           NamingContext nc)
                    throws NotFound,
                           CannotProceed,
                           InvalidName
Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.
Parameters:
n - Name of the object

nc - NamingContect object to rebind with the given name

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

resolve

public Object resolve(NameComponent[] n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
The resolve operation is the process of retrieving an object bound to a name in a given context. The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface.
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

unbind

public void unbind(NameComponent[] n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
The unbind operation removes a name binding from a context.
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

list

public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
The list operation allows a client to iterate through a set of bindings in a naming context.

The list operation returns at most the requested number of bindings in BindingList bl.

  • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
  • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
Parameters:
how_many - the maximum number of bindings to return

bl - the returned list of bindings

bi - the returned binding iterator

new_context

public NamingContext new_context()
This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. The new context is not bound to any name.

bind_new_context

public NamingContext bind_new_context(NameComponent[] n)
                               throws NotFound,
                                      AlreadyBound,
                                      CannotProceed,
                                      InvalidName
This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component).
Parameters:
n - Name of the object

Throws:
NotFound - Indicates the name does not identify a binding.

AlreadyBound - Indicates an object is already bound to the specified name.

CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.

InvalidName - Indicates that the name is invalid.

destroy

public void destroy()
             throws NotEmpty
The destroy operation deletes a naming context. If the naming context contains bindings, the NotEmpty exception is raised.
Throws:
NotEmpty - Indicates that the Naming Context contains bindings.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


org.omg.CosNaming.NamingContextPackage Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.CosNaming.NamingContextPackage

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
    • class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
    • class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
    • class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
    • class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundHelper
    • class org.omg.CosNaming.NamingContextPackage.NotFoundHolder (implements org.omg.CORBA.portable.Streamable)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReason (implements org.omg.CORBA.portable.IDLEntity)
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
    • class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder (implements org.omg.CORBA.portable.Streamable)
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class org.omg.CORBA.UserException (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.AlreadyBound (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.CannotProceed (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.InvalidName (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.NotEmpty (implements org.omg.CORBA.portable.IDLEntity)
          • class org.omg.CosNaming.NamingContextPackage.NotFound (implements org.omg.CORBA.portable.IDLEntity)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.CosNaming.NamingContextPackage

Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

See:
Description

Class Summary
AlreadyBoundHelper
AlreadyBoundHolder
CannotProceedHelper
CannotProceedHolder
InvalidNameHelper
InvalidNameHolder
NotEmptyHelper
NotEmptyHolder
NotFoundHelper
NotFoundHolder
NotFoundReason
NotFoundReasonHelper
NotFoundReasonHolder

Exception Summary
AlreadyBound
CannotProceed
InvalidName
NotEmpty
NotFound

Package org.omg.CosNaming.NamingContextPackage Description

Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions. It also provides Helper and Holder classes for the class NotFoundReason, which supplies a reason for the exception NotFound.

Related Documentation

For an overview, please see:
  • Comments for package org.omg.CosNaming
  • OMG CORBA/IIOP 2.2 Specification

Since:
JDK1.2
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.CosNaming.NamingContextPackage

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.CosNaming.NamingContextPackage

Packages that use org.omg.CosNaming.NamingContextPackage
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Classes in org.omg.CosNaming.NamingContextPackage used by org.omg.CosNaming
AlreadyBound
CannotProceed
InvalidName
NotEmpty
NotFound

Classes in org.omg.CosNaming.NamingContextPackage used by org.omg.CosNaming.NamingContextPackage
AlreadyBound
CannotProceed
InvalidName
NotEmpty
NotFound
NotFoundReason

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


AlreadyBound

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class AlreadyBound

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CosNaming.NamingContextPackage.AlreadyBound
All Implemented Interfaces:
IDLEntity, Serializable
public final class AlreadyBound
extends UserException
implements IDLEntity

See Also:
Serialized Form

Constructor Summary
AlreadyBound()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AlreadyBound

public AlreadyBound()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AlreadyBoundHelper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class AlreadyBoundHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper
public class AlreadyBoundHelper
extends Object

Method Summary
static AlreadyBound | extract(Any a)
static String | id()
static void | insert(Any a, AlreadyBound that)
static AlreadyBound | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, AlreadyBound that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         AlreadyBound that)

read

public static AlreadyBound read(InputStream in)

extract

public static AlreadyBound extract(Any a)

insert

public static void insert(Any a,
                          AlreadyBound that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AlreadyBoundHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class AlreadyBoundHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
All Implemented Interfaces:
Streamable
public final class AlreadyBoundHolder
extends Object
implements Streamable

Field Summary
 AlreadyBound value
Constructor Summary
AlreadyBoundHolder()
AlreadyBoundHolder(AlreadyBound __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public AlreadyBound value
Constructor Detail

AlreadyBoundHolder

public AlreadyBoundHolder()

AlreadyBoundHolder

public AlreadyBoundHolder(AlreadyBound __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CannotProceed

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class CannotProceed

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CosNaming.NamingContextPackage.CannotProceed
All Implemented Interfaces:
IDLEntity, Serializable
public final class CannotProceed
extends UserException
implements IDLEntity

See Also:
Serialized Form

Field Summary
NamingContext | cxt
NameComponent[] | rest_of_name
Constructor Summary
CannotProceed()
CannotProceed(NamingContext __cxt, NameComponent[] __rest_of_name)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

cxt

public NamingContext cxt

rest_of_name

public NameComponent[] rest_of_name
Constructor Detail

CannotProceed

public CannotProceed()

CannotProceed

public CannotProceed(NamingContext __cxt,
                     NameComponent[] __rest_of_name)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CannotProceedHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class CannotProceedHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.CannotProceedHelper
public class CannotProceedHelper
extends Object

Method Summary
static CannotProceed | extract(Any a)
static String | id()
static void | insert(Any a, CannotProceed that)
static CannotProceed | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, CannotProceed that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         CannotProceed that)

read

public static CannotProceed read(InputStream in)

extract

public static CannotProceed extract(Any a)

insert

public static void insert(Any a,
                          CannotProceed that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CannotProceedHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class CannotProceedHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
All Implemented Interfaces:
Streamable
public final class CannotProceedHolder
extends Object
implements Streamable

Field Summary
 CannotProceed value
Constructor Summary
CannotProceedHolder()
CannotProceedHolder(CannotProceed __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public CannotProceed value
Constructor Detail

CannotProceedHolder

public CannotProceedHolder()

CannotProceedHolder

public CannotProceedHolder(CannotProceed __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

No usage of org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder

No usage of org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

No usage of org.omg.CosNaming.NamingContextPackage.CannotProceedHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceedHolder

No usage of org.omg.CosNaming.NamingContextPackage.CannotProceedHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

No usage of org.omg.CosNaming.NamingContextPackage.InvalidNameHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidNameHolder

No usage of org.omg.CosNaming.NamingContextPackage.InvalidNameHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotEmptyHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmptyHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotEmptyHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder

No usage of org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.AlreadyBound

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.AlreadyBound

Packages that use AlreadyBound
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of AlreadyBound in org.omg.CosNaming

Methods in org.omg.CosNaming that throw AlreadyBound
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.

Uses of AlreadyBound in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as AlreadyBound
 AlreadyBound AlreadyBoundHolder.value

Methods in org.omg.CosNaming.NamingContextPackage that return AlreadyBound
static AlreadyBound | AlreadyBoundHelper.read(InputStream in)
static AlreadyBound | AlreadyBoundHelper.extract(Any a)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type AlreadyBound
static void | AlreadyBoundHelper.write(OutputStream out, AlreadyBound that)
static void | AlreadyBoundHelper.insert(Any a, AlreadyBound that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type AlreadyBound
AlreadyBoundHolder(AlreadyBound __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.CannotProceed

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.CannotProceed

Packages that use CannotProceed
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of CannotProceed in org.omg.CosNaming

Methods in org.omg.CosNaming that throw CannotProceed
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
void | _NamingContextStub.rebind(NameComponent[] n, Object obj)
void | _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
Object | _NamingContextStub.resolve(NameComponent[] n)
void | _NamingContextStub.unbind(NameComponent[] n)
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
void | NamingContextOperations.rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
void | NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
Object | NamingContextOperations.resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | NamingContextOperations.unbind(NameComponent[] n) The unbind operation removes a name binding from a context.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.

Uses of CannotProceed in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as CannotProceed
 CannotProceed CannotProceedHolder.value

Methods in org.omg.CosNaming.NamingContextPackage that return CannotProceed
static CannotProceed | CannotProceedHelper.read(InputStream in)
static CannotProceed | CannotProceedHelper.extract(Any a)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type CannotProceed
static void | CannotProceedHelper.write(OutputStream out, CannotProceed that)
static void | CannotProceedHelper.insert(Any a, CannotProceed that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type CannotProceed
CannotProceedHolder(CannotProceed __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.InvalidName

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.InvalidName

Packages that use InvalidName
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of InvalidName in org.omg.CosNaming

Methods in org.omg.CosNaming that throw InvalidName
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
void | _NamingContextStub.rebind(NameComponent[] n, Object obj)
void | _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
Object | _NamingContextStub.resolve(NameComponent[] n)
void | _NamingContextStub.unbind(NameComponent[] n)
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
void | NamingContextOperations.rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
void | NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
Object | NamingContextOperations.resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | NamingContextOperations.unbind(NameComponent[] n) The unbind operation removes a name binding from a context.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.

Uses of InvalidName in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as InvalidName
 InvalidName InvalidNameHolder.value

Methods in org.omg.CosNaming.NamingContextPackage that return InvalidName
static InvalidName | InvalidNameHelper.read(InputStream in)
static InvalidName | InvalidNameHelper.extract(Any a)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type InvalidName
static void | InvalidNameHelper.write(OutputStream out, InvalidName that)
static void | InvalidNameHelper.insert(Any a, InvalidName that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type InvalidName
InvalidNameHolder(InvalidName __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotEmpty

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotEmpty

Packages that use NotEmpty
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of NotEmpty in org.omg.CosNaming

Methods in org.omg.CosNaming that throw NotEmpty
void | _NamingContextStub.destroy()
void | NamingContextOperations.destroy() The destroy operation deletes a naming context.

Uses of NotEmpty in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as NotEmpty
 NotEmpty NotEmptyHolder.value

Methods in org.omg.CosNaming.NamingContextPackage that return NotEmpty
static NotEmpty | NotEmptyHelper.read(InputStream in)
static NotEmpty | NotEmptyHelper.extract(Any a)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotEmpty
static void | NotEmptyHelper.write(OutputStream out, NotEmpty that)
static void | NotEmptyHelper.insert(Any a, NotEmpty that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotEmpty
NotEmptyHolder(NotEmpty __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFound

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFound

Packages that use NotFound
org.omg.CosNaming | Provides the naming service for Java IDL.
org.omg.CosNaming.NamingContextPackage | Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of NotFound in org.omg.CosNaming

Methods in org.omg.CosNaming that throw NotFound
void | _NamingContextStub.bind(NameComponent[] n, Object obj)
void | _NamingContextStub.bind_context(NameComponent[] n, NamingContext nc)
void | _NamingContextStub.rebind(NameComponent[] n, Object obj)
void | _NamingContextStub.rebind_context(NameComponent[] n, NamingContext nc)
Object | _NamingContextStub.resolve(NameComponent[] n)
void | _NamingContextStub.unbind(NameComponent[] n)
NamingContext | _NamingContextStub.bind_new_context(NameComponent[] n)
void | NamingContextOperations.bind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context.
void | NamingContextOperations.bind_context(NameComponent[] n, NamingContext nc) Names an object that is a naming context.
void | NamingContextOperations.rebind(NameComponent[] n, Object obj) Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
void | NamingContextOperations.rebind_context(NameComponent[] n, NamingContext nc) Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
Object | NamingContextOperations.resolve(NameComponent[] n) The resolve operation is the process of retrieving an object bound to a name in a given context.
void | NamingContextOperations.unbind(NameComponent[] n) The unbind operation removes a name binding from a context.
NamingContext | NamingContextOperations.bind_new_context(NameComponent[] n) This operation creates a new context and binds it to the name supplied as an argument.

Uses of NotFound in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as NotFound
 NotFound NotFoundHolder.value

Methods in org.omg.CosNaming.NamingContextPackage that return NotFound
static NotFound | NotFoundHelper.read(InputStream in)
static NotFound | NotFoundHelper.extract(Any a)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotFound
static void | NotFoundHelper.write(OutputStream out, NotFound that)
static void | NotFoundHelper.insert(Any a, NotFound that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotFound
NotFoundHolder(NotFound __arg)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.CosNaming.NamingContextPackage.NotFoundReason

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.CosNaming.NamingContextPackage.NotFoundReason

Packages that use NotFoundReason
org.omg.CosNaming.NamingContextPackage Provides the exceptions used in the package org.omg.CosNaming (AlreadyBound, CannotProceed, InvalidName, NotEmpty, and NotFound) and also the Helper and Holder classes for those exceptions.

Uses of NotFoundReason in org.omg.CosNaming.NamingContextPackage

Fields in org.omg.CosNaming.NamingContextPackage declared as NotFoundReason
NotFoundReason | NotFoundReasonHolder.value
static NotFoundReason | NotFoundReason.missing_node
static NotFoundReason | NotFoundReason.not_context
static NotFoundReason | NotFoundReason.not_object
NotFoundReason | NotFound.why

Methods in org.omg.CosNaming.NamingContextPackage that return NotFoundReason
static NotFoundReason | NotFoundReasonHelper.read(InputStream in)
static NotFoundReason | NotFoundReasonHelper.extract(Any a)
static NotFoundReason | NotFoundReason.from_int(int i)

Methods in org.omg.CosNaming.NamingContextPackage with parameters of type NotFoundReason
static void | NotFoundReasonHelper.write(OutputStream out, NotFoundReason that)
static void | NotFoundReasonHelper.insert(Any a, NotFoundReason that)

Constructors in org.omg.CosNaming.NamingContextPackage with parameters of type NotFoundReason
NotFoundReasonHolder(NotFoundReason __arg)
NotFound(NotFoundReason __why, NameComponent[] __rest_of_name)

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


InvalidName

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class InvalidName

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CosNaming.NamingContextPackage.InvalidName
All Implemented Interfaces:
IDLEntity, Serializable
public final class InvalidName
extends UserException
implements IDLEntity

See Also:
Serialized Form

Constructor Summary
InvalidName()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidName

public InvalidName()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidNameHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class InvalidNameHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.InvalidNameHelper
public class InvalidNameHelper
extends Object

Method Summary
static InvalidName | extract(Any a)
static String | id()
static void | insert(Any a, InvalidName that)
static InvalidName | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, InvalidName that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         InvalidName that)

read

public static InvalidName read(InputStream in)

extract

public static InvalidName extract(Any a)

insert

public static void insert(Any a,
                          InvalidName that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidNameHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class InvalidNameHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
All Implemented Interfaces:
Streamable
public final class InvalidNameHolder
extends Object
implements Streamable

Field Summary
 InvalidName value
Constructor Summary
InvalidNameHolder()
InvalidNameHolder(InvalidName __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public InvalidName value
Constructor Detail

InvalidNameHolder

public InvalidNameHolder()

InvalidNameHolder

public InvalidNameHolder(InvalidName __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotEmpty

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotEmpty

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CosNaming.NamingContextPackage.NotEmpty
All Implemented Interfaces:
IDLEntity, Serializable
public final class NotEmpty
extends UserException
implements IDLEntity

See Also:
Serialized Form

Constructor Summary
NotEmpty()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotEmpty

public NotEmpty()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotEmptyHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotEmptyHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotEmptyHelper
public class NotEmptyHelper
extends Object

Method Summary
static NotEmpty | extract(Any a)
static String | id()
static void | insert(Any a, NotEmpty that)
static NotEmpty | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NotEmpty that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NotEmpty that)

read

public static NotEmpty read(InputStream in)

extract

public static NotEmpty extract(Any a)

insert

public static void insert(Any a,
                          NotEmpty that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotEmptyHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotEmptyHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
All Implemented Interfaces:
Streamable
public final class NotEmptyHolder
extends Object
implements Streamable

Field Summary
 NotEmpty value
Constructor Summary
NotEmptyHolder()
NotEmptyHolder(NotEmpty __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NotEmpty value
Constructor Detail

NotEmptyHolder

public NotEmptyHolder()

NotEmptyHolder

public NotEmptyHolder(NotEmpty __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotFound

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFound

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.omg.CORBA.UserException
                    |
                    +--org.omg.CosNaming.NamingContextPackage.NotFound
All Implemented Interfaces:
IDLEntity, Serializable
public final class NotFound
extends UserException
implements IDLEntity

See Also:
Serialized Form

Field Summary
NameComponent[] | rest_of_name
NotFoundReason | why
Constructor Summary
NotFound()
NotFound(NotFoundReason __why, NameComponent[] __rest_of_name)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

why

public NotFoundReason why

rest_of_name

public NameComponent[] rest_of_name
Constructor Detail

NotFound

public NotFound()

NotFound

public NotFound(NotFoundReason __why,
                NameComponent[] __rest_of_name)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NotFoundHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFoundHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotFoundHelper
public class NotFoundHelper
extends Object

Method Summary
static NotFound | extract(Any a)
static String | id()
static void | insert(Any a, NotFound that)
static NotFound | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NotFound that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NotFound that)

read

public static NotFound read(InputStream in)

extract

public static NotFound extract(Any a)

insert

public static void insert(Any a,
                          NotFound that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotFoundHolder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFoundHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotFoundHolder
All Implemented Interfaces:
Streamable
public final class NotFoundHolder
extends Object
implements Streamable

Field Summary
 NotFound value
Constructor Summary
NotFoundHolder()
NotFoundHolder(NotFound __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NotFound value
Constructor Detail

NotFoundHolder

public NotFoundHolder()

NotFoundHolder

public NotFoundHolder(NotFound __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotFoundReason

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFoundReason

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotFoundReason
All Implemented Interfaces:
IDLEntity, Serializable
public final class NotFoundReason
extends Object
implements IDLEntity

See Also:
Serialized Form

Field Summary
static int | _missing_node
static int | _not_context
static int | _not_object
static NotFoundReason | missing_node
static NotFoundReason | not_context
static NotFoundReason | not_object
Method Summary
static NotFoundReason | from_int(int i)
int | value()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_missing_node

public static final int _missing_node

_not_context

public static final int _not_context

_not_object

public static final int _not_object

missing_node

public static final NotFoundReason missing_node

not_context

public static final NotFoundReason not_context

not_object

public static final NotFoundReason not_object
Method Detail

value

public int value()

from_int

public static final NotFoundReason from_int(int i)
                                     throws BAD_PARAM
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotFoundReasonHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFoundReasonHelper

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotFoundReasonHelper
public class NotFoundReasonHelper
extends Object

Method Summary
static NotFoundReason | extract(Any a)
static String | id()
static void | insert(Any a, NotFoundReason that)
static NotFoundReason | read(InputStream in)
static TypeCode | type()
static void | write(OutputStream out, NotFoundReason that)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

write

public static void write(OutputStream out,
                         NotFoundReason that)

read

public static NotFoundReason read(InputStream in)

extract

public static NotFoundReason extract(Any a)

insert

public static void insert(Any a,
                          NotFoundReason that)

type

public static TypeCode type()

id

public static String id()
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotFoundReasonHolder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.CosNaming.NamingContextPackage
Class NotFoundReasonHolder

java.lang.Object
  |
  +--org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
All Implemented Interfaces:
Streamable
public final class NotFoundReasonHolder
extends Object
implements Streamable

Field Summary
 NotFoundReason value
Constructor Summary
NotFoundReasonHolder()
NotFoundReasonHolder(NotFoundReason __arg)
Method Summary
void | _read(InputStream in) Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
TypeCode | _type() Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
void | _write(OutputStream out) Marshals to ostream the value in the value field of the Holder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

value

public NotFoundReason value
Constructor Detail

NotFoundReasonHolder

public NotFoundReasonHolder()

NotFoundReasonHolder

public NotFoundReasonHolder(NotFoundReason __arg)
Method Detail

_write

public void _write(OutputStream out)
Description copied from interface: Streamable
Marshals to ostream the value in the value field of the Holder.
Specified by:
_write in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
ostream - the CDR OutputStream

_read

public void _read(InputStream in)
Description copied from interface: Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
Specified by:
_read in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Parameters:
istream - the InputStream that represents the CDR data from the wire.

_type

public TypeCode _type()
Description copied from interface: Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
Specified by:
_type in interface Streamable
Following copied from interface: org.omg.CORBA.portable.Streamable
Returns:
the TypeCode object for the value held in the holder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


org.omg.SendingContext Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.SendingContext

Package Hierarchies:
All Packages

Interface Hierarchy

  • interface org.omg.CORBA.Object
    • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.SendingContext.RunTimeOperations)
  • interface org.omg.SendingContext.RunTimeOperations
    • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object)
  • interface java.io.Serializable
    • interface org.omg.CORBA.portable.IDLEntity
      • interface org.omg.SendingContext.RunTime (also extends org.omg.CORBA.Object, org.omg.SendingContext.RunTimeOperations)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.SendingContext

Provides support for the marshalling of value types.

See:
Description

Interface Summary
RunTime | org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT
RunTimeOperations | org/omg/SendingContext/RunTimeOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Package org.omg.SendingContext Description

Provides support for the marshalling of value types. Value type marshalling may require access to an implementation of the value type or to meta information about the value type. This information is passed between the sending context and the receiving context using a particular service context containing an instance of the SendingContext.RunTime interface.

A sending context may be either the client side or the server side of an invocation, depending on which contains a value type. The sending context is the client side of an invocation if the request contains a value type. It is the server side if the reply contains a value type. The other party in the communication is the receiving context.

The service context marshalled for SendingContext consists of an encapsulated IOR for the SendingContext.RunTime interface. RunTime is just a marker interface defined to allow extensibility in the future. There is currently only one subinterface of RunTime defined: the SendingContext.CodeBase interface. The interface CodeBase defines operations to obtain code URLs and meta-information about a value type received from the sending context.

Note that these classes are currently defined in the com.sun.org.omg.SendingContext package rather than in the package org.omg.SendingContext. This has been done to avoid including large parts of the interface repository in the JDK core, since the interface repository is still evolving in response to the needs of the CORBA Components work.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


RunTime

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.SendingContext
Interface RunTime

All Superinterfaces:
IDLEntity, Object, RunTimeOperations, Serializable
public interface RunTime
extends RunTimeOperations, Object, IDLEntity

org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RunTimeOperations

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.SendingContext
Interface RunTimeOperations

All Known Subinterfaces:
RunTime
public interface RunTimeOperations

org/omg/SendingContext/RunTimeOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Package org.omg.SendingContext

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.SendingContext

Packages that use org.omg.SendingContext
javax.rmi.CORBA | Contains portability APIs for RMI-IIOP.
org.omg.SendingContext | Provides support for the marshalling of value types.

Classes in org.omg.SendingContext used by javax.rmi.CORBA
RunTime
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Classes in org.omg.SendingContext used by org.omg.SendingContext
RunTimeOperations
org/omg/SendingContext/RunTimeOperations.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.SendingContext.RunTime

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.SendingContext.RunTime

Packages that use RunTime
javax.rmi.CORBA Contains portability APIs for RMI-IIOP.

Uses of RunTime in javax.rmi.CORBA

Methods in javax.rmi.CORBA that return RunTime
 RunTime ValueHandler.getRunTimeCodeBase()
Returns the CodeBase for this ValueHandler.

Methods in javax.rmi.CORBA with parameters of type RunTime
 Serializable ValueHandler.readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender)
Reads a value from the stream using Java semantics.

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.omg.SendingContext.RunTimeOperations

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.omg.SendingContext.RunTimeOperations

Packages that use RunTimeOperations
org.omg.SendingContext Provides support for the marshalling of value types.

Uses of RunTimeOperations in org.omg.SendingContext

Subinterfaces of RunTimeOperations in org.omg.SendingContext
 interface RunTime
org/omg/SendingContext/RunTime.java Generated by the IDL-to-Java compiler (portable), version "3.0" from rt.idl Thursday, April 8, 1999 1:18:26 o'clock PM PDT

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


org.omg.stub.java.rmi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.omg.stub.java.rmi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class org.omg.CORBA.portable.ObjectImpl (implements org.omg.CORBA.Object)
      • class org.omg.CORBA_2_3.portable.ObjectImpl
        • class javax.rmi.CORBA.Stub (implements java.io.Serializable)
          • class org.omg.stub.java.rmi._Remote_Stub (implements java.rmi.Remote)
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Package org.omg.stub.java.rmi

Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

See:
Description

Class Summary
_Remote_Stub This class provides the Stub for the Remote Type.

Package org.omg.stub.java.rmi Description

Contains RMI-IIOP Stubs for the Remote types that occur in the java.rmi package.

Since:
1.3
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package org.omg.stub.java.rmi

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.omg.stub.java.rmi

No usage of org.omg.stub.java.rmi

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Uses of Class org.omg.stub.java.rmi._Remote_Stub

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.omg.stub.java.rmi._Remote_Stub

No usage of org.omg.stub.java.rmi._Remote_Stub

Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV NEXT FRAMES NO FRAMES


Java 2D API Specification

Java

Java 2DTM API Specification

 Documentation Contents
The following list contains all of the packages and classes included in the Java 2D API. Each item in the list is linked to its respective API documentation.

  • java.awt.color
      Provides classes for color spaces and color profiles based on the ICC Profile Format Specification.
  • java.awt.font
      Provides classes and interfaces relating to fonts and support for representing Type 1, Type 1 Multiple Master, OpenType, and TrueType fonts.
  • java.awt.geom
      Provides classes for defining and performing operations on two-dimensional geometric objects.
  • java.awt.print
      Provides classes and interfaces for printing two-dimensional objects and includes support for specifying document types, controlling page setup and page formats, and managing job control dialogs.
  • com.sun.image.codec.jpeg
      Provides classes for encoding and decoding JPEG images.
  • java.awt.image.renderable
      Provides classes and interfaces for producing rendering-independent images.
The java.awt and java.awt.image packages also include classes that are part of the Java 2D API:
  • java.awt - Contains classes for generating user interfaces and painting graphics and images. The following awt classes are part of the Java 2D API.
    • java.awt.AlphaComposite
    • java.awt.BasicStroke
    • java.awt.Color
    • java.awt.Composite
    • java.awt.CompositeContext
    • java.awt.Font
    • java.awt.GradientPaint
    • java.awt.Graphics2D
    • java.awt.GraphicsConfiguration
    • java.awt.GraphicsDevice
    • java.awt.GraphicsEnvironment
    • java.awt.Paint
    • java.awt.PaintContext
    • java.awt.Rectangle
    • java.awt.Shape
    • java.awt.Stroke
    • java.awt.TexturePaint
    • java.awt.Toolkit
    • java.awt.Transparency

  • java.awt.image - Provides classes for creating and modifying images, as well as image producers, consumers and filters for configuring image processing. The following image classes are part of the Java 2D API.
    • java.awt.image.AffineTransformOp
    • java.awt.image.BandCombineOp
    • java.awt.image.BandedSampleModel
    • java.awt.image.BufferedImage
    • java.awt.image.BufferedImageFilter
    • java.awt.image.BufferedImageOp
    • java.awt.image.ByteLookupTable
    • java.awt.image.ColorConvertOp
    • java.awt.image.ColorModel
    • java.awt.image.ComponentColorModel
    • java.awt.image.ComponentSampleModel
    • java.awt.image.ConvolveOp
    • java.awt.image.DataBuffer
    • java.awt.image.DataBufferByte
    • java.awt.image.DataBufferInt
    • java.awt.image.DataBufferShort
    • java.awt.image.DirectColorModel
    • java.awt.image.IndexColorModel
    • java.awt.image.Kernel
    • java.awt.image.LookupOp
    • java.awt.image.LookupTable
    • java.awt.image.MultiPixelPackedSampleModel
    • java.awt.image.PackedColorModel
    • java.awt.image.Raster
    • java.awt.image.RasterformatException
    • java.awt.image.RasterOp
    • java.awt.image.RenderedImage
    • java.awt.image.RescaleOp
    • java.awt.image.SampleModel
    • java.awt.image.ShortLookupTable
    • java.awt.image.SinglePixelPackedSampleModel
    • java.awt.image.WritableRaster

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java2d-comments@sun.com 		Sun Microsystems, Inc
Java Software


Accessibility Properties

Indicating the Presence of a Screen Magnifier

The javax.accessibility package provides the screen_magnifier_present property. When set to true, this property lets the Java platform libraries know that a screen magnifier is present on the system. Application developers can check this property, and if a screen magnifier is present, developers should make sure their applications are compatible with screen magnification. For example, on Microsoft Windows operating systems, the reference implementation of the Java 2DTM API checks this property and if true, turns off Microsoft DirectDraw to avoid problems with the screen magnifier. (Some screen magnifiers may not be able to magnify DirectDraw graphics.)

You can set the screen_magnifier_present property at run time or in a properties file. To set the property at run time, enter a command such as the following:

java -Djavax.accessibility.screen_magnifier_present=true foo.class

The reference implementation includes an accessibility.properties file in the jre/lib directory. To set the screen_magnifier_present property to true in the accessibility.properties file, add the following line:

screen_magnifier_present=true

Copyright © 2001 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: access@sun.com 		Sun


Accessibility - New Features

Java

Accessibility

New Features in the JavaTM 2 Platform, v1.3

 Java 2 SDK Contents

Contents

API Enhancements
Accessible Icon
Accessible Relation and Accessible Relation Set
Accessible Table
Accessible Table Model Change
AWT Accessibility Support for Lightweight Components
Accessible Applet
AWT Robot

API Enhancements

 The following new classes and interfaces have been added to the JavaTM Accessibility API in version 1.3 of the Java 2 Platform:
  • javax.accessibility.AccessibleIcon
  • javax.accessibility.AccessibleRelation
  • javax.accessibility.AccessibleRelationSet
  • javax.accessibility.AccessibleTable
  • javax.accessibility.AccessibleTableModelChange
In addition, javax.accessibility.AccessibleContext was updated to reflect the new classes and interfaces.

Accessible Icon

 AccessibleIcon provides information about an icon's description and dimension. It also allows these properties to be set by the application developer. This feature is implemented by Swing icons.

Accessible Relation and Accessible Relation Set

AccessibleRelation and AccessibleRelationSet provide information about the ways user interface objects are related to each other. Each relation is captured in an AccessibleRelation object, and the full set of relations that any given user interface object is involved in are expressed in that object's AccessibleRelationSet.

Unlike most of the rest of the Accessibility API, there is currently no built-in support for having AccessibleRelations set automatically by Swing. This means that even if a programmer is doing nothing out of the ordinary - using standard components in standard ways - the AccessibleRelation information will have to be specifically included by the programmer.

The only exception to this is if the programmer uses the JLabel.setLabelFor() method to link a label to the thing it labels. This will cause an accessible relationship to be created.

Accessible Table

AccessibleTable provides information about tables, and is implemented by Swing's JTable.AccessibleJTable class. It allows a range of table-specific attributes to be identified adn manipulated. Such properties include text selections, the first and last row and column of the table, its total number of rows and columns, the text of its captions and headers, and other descriptions about its contents and format. As in the AccessibleIcon interface, these kinds of properties (descriptions, captions, and headers) can be set or modified by users and developers.

Accessible Table Model Change

 AccessibleTableModelChange is a helper class which encapsulates a change to the model of a table. Such changes can inlcude insertions, deletions, and data updates.

AWT Accessibililty Support for Lightweight Components

 The core accessibility support which was provided in the Java 2 Platform has been moved up the inheritance tree. This means that it is not only present in Swing components, it is also part of all lightweight AWT components.

Prior to version 1.3 of the Java 2 Platform, if a developer wished to create an accessible custom component, s/he had two options.

  • To extend one of the Swing components.
  • To extend one of the AWT components--a task that involved more work.

Now that accessibility support has been included in both AWT Component and AWT Container, the task of implementing the accessibility API on non-Swing components is easier.

It is important to note that this accessibility support has not yet been incorporated into AWTList, some portions of AWT Text, AWT Menu, and AWT Combobox/Popup Menu. In addition, further work needs to be done in areas where the modification of native code is required. For the present, the necessary API is there, but it returns a null value. It is hoped that support for "heavyweight" components will be integrated into subsequent versions of the Java 2 Platform.

Accessible Applet

This work is similar to the changes made for the AWT accessibility support described above.

AWT Robot

 The AWT's new Robot class provides a way to insert keystrokes and mouse events at the system level. This feature enhances accessibility because it allows the physical on-screen mouse cursor to be moved. This enables screen magnification software for native environments to recognize and respond to mouse movements that could not previously be identified by assistive technologies outside of the virtual machine.

It is important to note that, although this improves overall accessibility, it is not a comprehensive solution. For instance, the AWT Robot does not allow native assistive technologies to track the focus or the caret.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: access@sun.com 		Sun
Java Software


Java Accessibility - Overview

Java

Java Accessibility Overview

Java Accessibility provides the technology that allows assistive technologies to obtain accessible information about the user interface objects in the Java Virtual Machine. Java Accessibility supports version 1.1 and up of the Java platform and is provided in several ways:

  1. A Java Accessibility API toolkit that provides "boiler plate" interfaces for UI components. These interfaces allow the user to obtain information that is common to all "accessible" components (such as AccessibleName and AccessibleDescription), as well as information that is more component specific (such as AccessibleValue and AccessibleSelection).
  2. Utilities that support assistive technology developers.
  3. Support for keyboard navigation of graphical user interface components.
  4. The accessible design of the Java Foundation Classes include the ability to "plug in" an alternative look and feel for an application without requiring changes to be made in the application.
Explanation of API Packages, Interfaces, and Classes

The following are brief descriptions of the Java 2 Platform's accessibility API. More information can be found in the API documentation for the javax.accessibility package.

Package javax.accessibility

Defines a contract between user-interface components and an assistive technology that provides access to those components.
Interface Accessible
Interface Accessible is the main interface for the Accessibility package.
Interface AccessibleAction
The AccessibleAction interface should be supported by any object that can perform one or more actions.
Interface AccessibleComponent
The AccessibleComponent interface should be supported by any object that is rendered on the screen.
Interface AccessibleHypertext
The AccessibleHypertext class is the base class for all classes that present hypertext information on the display.
Interface AccessibleIcon
The AccessibleIcon interface should be supported by any object that has an associated icon (for example, buttons).
Interface AccessibleSelection
The AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set.
Interface AccessibleTableModelChange
The AccessibleTableModelChange interface describes a change to the table model.
Interface AccessibleText
The AccessibleText interface should be implemented by all classes that present textual information on the display.
Interface AccessibleValue
The AccessibleValue interface should be supported by any object that supports a numerical value (for example, a scroll bar).
Class AccessibleBundle
Base class used to maintain a strongly typed enumeration.
Class AccessibleContext
AccessibleContext represents the minimum information all accessible objects return.
Class AccessibleHyperlink
Encapsulation of a link, or set of links.
Class AccessibleRelation
Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects.
Class AccessibleRelationSet
Class AccessibleRelationSet determines a component's relation set.
Class AccessibleResourceBundle
A resource bundle containing the localized strings in the accessibility package.
Class AccessibleRole
Class AccessibleRole determines the role of a component.
Class AccessibleState
Class AccessibleState describes a components particular state.
Class AccessibleStateSet
Class AccessibleStateSet determines a components state set.
Class AccessibleTable
Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format.
The Java Accessibility Utilities
The Java Accessibility Utilities are delivered by Sun as a separately downloadable package for use by assistive technology vendors in their products which provide access to Java applications running in a Java Virtual Machine. This package provides the necessary support for assistive technologies to locate and query user interface objects inside a Java application running in a Java Virtual Machine. It also provides support for installing "event listeners" into these objects. These event listeners allow objects to learn about specific events occurring in other objects using the peer-to-peer approach defined by the delegation event model introduced in JDK1.1.

To date the Accessibility Utilities are as follows.

  • AwtMonitor
  • Ferret
  • JavaMonitor
  • Linker
  • Monkey
For more information, see Java Accessibility Utilities.
Keyboard Navigation Support
The interactive user interface components provide a full set of keyboard bindings that enable mouseless navigation, edit, and control of the components. No special efforts are required of the developer to enable these capabilities and if the developer so desires they can easily change any keybinding.
Pluggable Look and Feel
The Java Foundation Classes (JFC) implement a Pluggable Look and Feel architecture. This architecture allows non-visual manifestations of a user interface to replace or enhance the visual presentation of an application. The expression of the user interface is separated from the underlying structure and data of each individual component. This is accomplished by separating the user interface of the component from its model. The model of a component is the structure which encapsulates the state and information that is presented to the user by the user interface. More information on this architecture can be found in The Swing Connection.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: access@sun.com 		Sun
Java Software


A-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

A

addMarkerData(int, byte[]) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Appends 'data' to the array of byte[] associated with marker.
APP0_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP0 marker - JFIF info
APP1_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP1 marker
APP2_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP2 marker
APP3_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP3 marker
APP4_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP4 marker
APP5_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP5 marker
APP6_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP6 marker
APP7_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP7 marker
APP8_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP8 marker
APP9_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP9 marker
APPA_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPA marker
APPB_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPB marker
APPC_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPC marker
APPD_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPD marker
APPE_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPE marker - Adobe info
APPF_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPF marker
Overview Package Class Use Tree Deprecated Index Help
PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


API Help

PREV NEXT FRAMES NO FRAMES

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Inner Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


C-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

C

clone() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
clone() - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
COLOR_ID_CMYK - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
CMYK
COLOR_ID_GRAY - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Monochrome
COLOR_ID_PYCC - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
PhotoYCC
COLOR_ID_PYCCA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
PhotoYCC-Alpha
COLOR_ID_RGB - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Red, Green, and Blue
COLOR_ID_RGBA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
RGB-Alpha
COLOR_ID_RGBA_INVERTED - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
RGB-Alpha with R, G, and B inverted.
COLOR_ID_UNKNOWN - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Unknown or Undefined Color ID
COLOR_ID_YCbCr - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr
COLOR_ID_YCbCrA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr-Alpha
COLOR_ID_YCbCrA_INVERTED - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr-Alpha with Y, Cb, and Cr inverted.
COLOR_ID_YCCK - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCrK
com.sun.image.codec.jpeg - package com.sun.image.codec.jpeg
Provides classes for encoding and decoding JPEG images.
COMMENT_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Adobe marker indicates presence/need for Adobe marker.
createJPEGDecoder(InputStream) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
createJPEGDecoder(InputStream, JPEGDecodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
createJPEGEncoder(OutputStream) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
createJPEGEncoder(OutputStream, JPEGEncodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


D-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

D

decodeAsBufferedImage() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Decodes the current JPEG data stream.
decodeAsRaster() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Decode the JPEG stream that was passed as part of construction.
DENSITY_UNIT_ASPECT_RATIO - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
The X and Y units simply indicate the aspect ratio of the pixels.
DENSITY_UNIT_DOTS_CM - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Pixel density is in pixels per centemeter.
DENSITY_UNIT_DOTS_INCH - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Pixel density is in pixels per inch.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Deprecated List

PREV NEXT FRAMES NO FRAMES

Deprecated API

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


E-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

E

encode(BufferedImage) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a BufferedImage as a JPEG data stream.
encode(BufferedImage, JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a BufferedImage as a JPEG data stream.
encode(Raster) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a Raster as a JPEG data stream.
encode(Raster, JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a Raster as a JPEG data stream.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


G-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

G

getACHuffmanComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the AC Huffman table that will be used for a particular component.
getACHuffmanTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the AC Huffman coding table requested or null if not defined
getACHuffmanTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the AC Huffman coding table for the requested component.
getBufferedImage() - Method in class com.sun.image.codec.jpeg.TruncatedFileException
Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
getDCHuffmanComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the DC Huffman table that will be used for a particular component.
getDCHuffmanTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the DC Huffman coding table requested or null if not defined
getDCHuffmanTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the DC Huffman coding table for the requested component.
getDefaultColorId(ColorModel) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Returns the 'default' encoded COLOR_ID for a given ColorModel.
getDefaultJPEGEncodeParam(BufferedImage) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(BufferedImage) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(int, int) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(JPEGDecodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
getDefaultJPEGEncodeParam(JPEGDecodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
getDefaultJPEGEncodeParam(Raster, int) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(Raster, int) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDensityUnit() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the code for pixel size units This value is copied from the APP0 marker.
getEncodedColorID() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the JPEG Encoded color id.
getHeight() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the image height
getHorizontalSubsampling(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Return the Horizontal subsampling factor for requested Component.
getInputStream() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Get the input stream that decoding will occur from.
getJPEGDecodeParam() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Returns the JPEGDecodeParam object that resulted from the most recent decoding event.
getJPEGEncodeParam() - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This returns a copy of the current JPEGEncodeParam object, if you want changes to affect the encoding process you must 'set' it back into the encoder (either through setJPEGEncodeParam or by providing the modified param object in the call to encode.
getLengths() - Method in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Return a copy of the array containing the number of symbols for each length in the Huffman table.
getMarker(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if at least one instance of the marker is present in the Parameter object.
getMarkerData(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns a 'byte[][]' associated with the requested marker in the parameter object.
getNumComponents() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the number of components for the current encoding COLOR_ID.
getOutputStream() - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Return the stream the Encoder is currenlt associated with.
getQTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the coefficient quantization tables or NULL if not defined.
getQTableComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the quantization table that will be used for a particular component.
getQTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the Quantization table for the requested component.
getRaster() - Method in class com.sun.image.codec.jpeg.TruncatedFileException
Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
getRestartInterval() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the MCUs per restart marker.
getScaledInstance(float, boolean) - Method in class com.sun.image.codec.jpeg.JPEGQTable
Returns a new Quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is 'true').
getSymbols() - Method in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Return an array containing the Huffman symbols arranged by increasing length.
getTable() - Method in class com.sun.image.codec.jpeg.JPEGQTable
Returns the current quantization table as an array of ints in zig zag order.
getVerticalSubsampling(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Return the Vertical subsampling factor for requested Component.
getWidth() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the image width
getXDensity() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the horizontal pixel density This value is copied from the APP0 marker.
getYDensity() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the vertical pixel density This value is copied into the APP0 marker.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Package Hierarchies:
com.sun.image.codec.jpeg

Class Hierarchy

  • class java.lang.Object
    • class com.sun.image.codec.jpeg.JPEGCodec
    • class com.sun.image.codec.jpeg.JPEGHuffmanTable
    • class com.sun.image.codec.jpeg.JPEGQTable
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class com.sun.image.codec.jpeg.ImageFormatException
          • class com.sun.image.codec.jpeg.TruncatedFileException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface com.sun.image.codec.jpeg.JPEGDecodeParam
      • interface com.sun.image.codec.jpeg.JPEGEncodeParam (also extends java.lang.Cloneable)
    • interface com.sun.image.codec.jpeg.JPEGEncodeParam (also extends com.sun.image.codec.jpeg.JPEGDecodeParam)
  • interface com.sun.image.codec.jpeg.JPEGImageDecoder
  • interface com.sun.image.codec.jpeg.JPEGImageEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


I-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

I

ImageFormatException - exception com.sun.image.codec.jpeg.ImageFormatException.
Signals that an Image Format exception of some sort has occurred.
ImageFormatException() - Constructor for class com.sun.image.codec.jpeg.ImageFormatException
Constructs an ImageFormatException with no detail message.
ImageFormatException(String) - Constructor for class com.sun.image.codec.jpeg.ImageFormatException
Constructs an ImageFormatException with the specified detailed message.
isImageInfoValid() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if the image information in the ParamBlock is currently valid.
isTableInfoValid() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if the tables in the ParamBlock are currently valid.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Index

Overview Package Class Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
A C D E G I J N S T

A

addMarkerData(int, byte[]) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Appends 'data' to the array of byte[] associated with marker.
APP0_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP0 marker - JFIF info
APP1_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP1 marker
APP2_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP2 marker
APP3_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP3 marker
APP4_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP4 marker
APP5_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP5 marker
APP6_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP6 marker
APP7_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP7 marker
APP8_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP8 marker
APP9_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP9 marker
APPA_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPA marker
APPB_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPB marker
APPC_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPC marker
APPD_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPD marker
APPE_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPE marker - Adobe info
APPF_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
APPF marker

C

clone() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
clone() - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
COLOR_ID_CMYK - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
CMYK
COLOR_ID_GRAY - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Monochrome
COLOR_ID_PYCC - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
PhotoYCC
COLOR_ID_PYCCA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
PhotoYCC-Alpha
COLOR_ID_RGB - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Red, Green, and Blue
COLOR_ID_RGBA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
RGB-Alpha
COLOR_ID_RGBA_INVERTED - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
RGB-Alpha with R, G, and B inverted.
COLOR_ID_UNKNOWN - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Unknown or Undefined Color ID
COLOR_ID_YCbCr - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr
COLOR_ID_YCbCrA - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr-Alpha
COLOR_ID_YCbCrA_INVERTED - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCr-Alpha with Y, Cb, and Cr inverted.
COLOR_ID_YCCK - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
YCbCrK
com.sun.image.codec.jpeg - package com.sun.image.codec.jpeg
Provides classes for encoding and decoding JPEG images.
COMMENT_MARKER - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Adobe marker indicates presence/need for Adobe marker.
createJPEGDecoder(InputStream) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
createJPEGDecoder(InputStream, JPEGDecodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
createJPEGEncoder(OutputStream) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
createJPEGEncoder(OutputStream, JPEGEncodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.

D

decodeAsBufferedImage() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Decodes the current JPEG data stream.
decodeAsRaster() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Decode the JPEG stream that was passed as part of construction.
DENSITY_UNIT_ASPECT_RATIO - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
The X and Y units simply indicate the aspect ratio of the pixels.
DENSITY_UNIT_DOTS_CM - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Pixel density is in pixels per centemeter.
DENSITY_UNIT_DOTS_INCH - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Pixel density is in pixels per inch.

E

encode(BufferedImage) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a BufferedImage as a JPEG data stream.
encode(BufferedImage, JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a BufferedImage as a JPEG data stream.
encode(Raster) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a Raster as a JPEG data stream.
encode(Raster, JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Encode a Raster as a JPEG data stream.

G

getACHuffmanComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the AC Huffman table that will be used for a particular component.
getACHuffmanTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the AC Huffman coding table requested or null if not defined
getACHuffmanTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the AC Huffman coding table for the requested component.
getBufferedImage() - Method in class com.sun.image.codec.jpeg.TruncatedFileException
Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
getDCHuffmanComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the DC Huffman table that will be used for a particular component.
getDCHuffmanTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the DC Huffman coding table requested or null if not defined
getDCHuffmanTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the DC Huffman coding table for the requested component.
getDefaultColorId(ColorModel) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Returns the 'default' encoded COLOR_ID for a given ColorModel.
getDefaultJPEGEncodeParam(BufferedImage) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(BufferedImage) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(int, int) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(JPEGDecodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
getDefaultJPEGEncodeParam(JPEGDecodeParam) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
getDefaultJPEGEncodeParam(Raster, int) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This is a factory method for creating JPEGEncodeParam objects.
getDefaultJPEGEncodeParam(Raster, int) - Static method in class com.sun.image.codec.jpeg.JPEGCodec
This is a factory method for creating JPEGEncodeParam objects.
getDensityUnit() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the code for pixel size units This value is copied from the APP0 marker.
getEncodedColorID() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the JPEG Encoded color id.
getHeight() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the image height
getHorizontalSubsampling(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Return the Horizontal subsampling factor for requested Component.
getInputStream() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Get the input stream that decoding will occur from.
getJPEGDecodeParam() - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Returns the JPEGDecodeParam object that resulted from the most recent decoding event.
getJPEGEncodeParam() - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
This returns a copy of the current JPEGEncodeParam object, if you want changes to affect the encoding process you must 'set' it back into the encoder (either through setJPEGEncodeParam or by providing the modified param object in the call to encode.
getLengths() - Method in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Return a copy of the array containing the number of symbols for each length in the Huffman table.
getMarker(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if at least one instance of the marker is present in the Parameter object.
getMarkerData(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns a 'byte[][]' associated with the requested marker in the parameter object.
getNumComponents() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the number of components for the current encoding COLOR_ID.
getOutputStream() - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Return the stream the Encoder is currenlt associated with.
getQTable(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the coefficient quantization tables or NULL if not defined.
getQTableComponentMapping(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the number of the quantization table that will be used for a particular component.
getQTableForComponent(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns the Quantization table for the requested component.
getRaster() - Method in class com.sun.image.codec.jpeg.TruncatedFileException
Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
getRestartInterval() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the MCUs per restart marker.
getScaledInstance(float, boolean) - Method in class com.sun.image.codec.jpeg.JPEGQTable
Returns a new Quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is 'true').
getSymbols() - Method in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Return an array containing the Huffman symbols arranged by increasing length.
getTable() - Method in class com.sun.image.codec.jpeg.JPEGQTable
Returns the current quantization table as an array of ints in zig zag order.
getVerticalSubsampling(int) - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Return the Vertical subsampling factor for requested Component.
getWidth() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the image width
getXDensity() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the horizontal pixel density This value is copied from the APP0 marker.
getYDensity() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Get the vertical pixel density This value is copied into the APP0 marker.

I

ImageFormatException - exception com.sun.image.codec.jpeg.ImageFormatException.
Signals that an Image Format exception of some sort has occurred.
ImageFormatException() - Constructor for class com.sun.image.codec.jpeg.ImageFormatException
Constructs an ImageFormatException with no detail message.
ImageFormatException(String) - Constructor for class com.sun.image.codec.jpeg.ImageFormatException
Constructs an ImageFormatException with the specified detailed message.
isImageInfoValid() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if the image information in the ParamBlock is currently valid.
isTableInfoValid() - Method in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Returns true if the tables in the ParamBlock are currently valid.

J

JPEGCodec - class com.sun.image.codec.jpeg.JPEGCodec.
This class is a factory for implementations of the JPEG Image Decoder/Encoder.
JPEGDecodeParam - interface com.sun.image.codec.jpeg.JPEGDecodeParam.
JPEGDecodeParam encapsulates tables and options necessary to control decoding JPEG datastreams.
JPEGEncodeParam - interface com.sun.image.codec.jpeg.JPEGEncodeParam.
JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams.
JPEGHuffmanTable - class com.sun.image.codec.jpeg.JPEGHuffmanTable.
A class to encapsulate a JPEG Huffman table.
JPEGHuffmanTable(short[], short[]) - Constructor for class com.sun.image.codec.jpeg.JPEGHuffmanTable
Creates a Huffman Table and initializes it.
JPEGImageDecoder - interface com.sun.image.codec.jpeg.JPEGImageDecoder.
This interface describes a JPEG data stream decoder.
JPEGImageEncoder - interface com.sun.image.codec.jpeg.JPEGImageEncoder.
JPEGImageEncoder encodes buffers of image data into JPEG data streams.
JPEGQTable - class com.sun.image.codec.jpeg.JPEGQTable.
Class to encapsulate the JPEG quantization tables.
JPEGQTable(int[]) - Constructor for class com.sun.image.codec.jpeg.JPEGQTable
Constructs an quantization table from the array that was passed.

N

NUM_COLOR_ID - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Number of color ids defined.
NUM_DENSITY_UNIT - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
The max known value for DENSITY_UNIT
NUM_TABLES - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Number of allowed Huffman and Quantization Tables

S

setACHuffmanComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's AC Huffman Table.
setACHuffmanTable(int, JPEGHuffmanTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the AC Huffman coding table at index to the table provided.
setDCHuffmanComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's DC Huffman Table.
setDCHuffmanTable(int, JPEGHuffmanTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the DC Huffman coding table at index to the table provided.
setDensityUnit(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the pixel size units This value is copied into the APP0 marker (if that marker is written).
setHorizontalSubsampling(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the horizontal subsample factor for the given component.
setImageInfoValid(boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the flag indicating the validity of the table information in the ParamBlock.
setJPEGDecodeParam(JPEGDecodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data.
setJPEGEncodeParam(JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Set the JPEGEncodeParam object that is to be used for future encoding operations.
setMarkerData(int, byte[][]) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the marker data to be written to the output data stream.
setQTable(int, JPEGQTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the coefficient quantization tables at index passed.
setQTableComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's Quantization Table.
setQuality(float, boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
This creates new Quantization tables that replace the currently installed Quantization tables.
setRestartInterval(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the MCUs per restart, or 0 for no restart markers.
setTableInfoValid(boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the flag indicating the validity of the image information in the ParamBlock.
setVerticalSubsampling(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the vertical subsample factor for the given component.
setXDensity(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the horizontal pixel density This value is written into the APP0 marker.
setYDensity(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the vertical pixel density.
StdACChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdACLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGQTable
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
StdDCChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdDCLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGQTable
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.

T

TruncatedFileException - exception com.sun.image.codec.jpeg.TruncatedFileException.
Signals that a truncated file was detected.
TruncatedFileException(BufferedImage) - Constructor for class com.sun.image.codec.jpeg.TruncatedFileException
Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
TruncatedFileException(Raster) - Constructor for class com.sun.image.codec.jpeg.TruncatedFileException
Constructs an TruncatedFileException with the partially decoded Raster
A C D E G I J N S T
Overview  Package  Class  Tree  Deprecated   Index  Help
 PREV   NEXT FRAMES    NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


J-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

J

JPEGCodec - class com.sun.image.codec.jpeg.JPEGCodec.
This class is a factory for implementations of the JPEG Image Decoder/Encoder.
JPEGDecodeParam - interface com.sun.image.codec.jpeg.JPEGDecodeParam.
JPEGDecodeParam encapsulates tables and options necessary to control decoding JPEG datastreams.
JPEGEncodeParam - interface com.sun.image.codec.jpeg.JPEGEncodeParam.
JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams.
JPEGHuffmanTable - class com.sun.image.codec.jpeg.JPEGHuffmanTable.
A class to encapsulate a JPEG Huffman table.
JPEGHuffmanTable(short[], short[]) - Constructor for class com.sun.image.codec.jpeg.JPEGHuffmanTable
Creates a Huffman Table and initializes it.
JPEGImageDecoder - interface com.sun.image.codec.jpeg.JPEGImageDecoder.
This interface describes a JPEG data stream decoder.
JPEGImageEncoder - interface com.sun.image.codec.jpeg.JPEGImageEncoder.
JPEGImageEncoder encodes buffers of image data into JPEG data streams.
JPEGQTable - class com.sun.image.codec.jpeg.JPEGQTable.
Class to encapsulate the JPEG quantization tables.
JPEGQTable(int[]) - Constructor for class com.sun.image.codec.jpeg.JPEGQTable
Constructs an quantization table from the array that was passed.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


N-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

N

NUM_COLOR_ID - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Number of color ids defined.
NUM_DENSITY_UNIT - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
The max known value for DENSITY_UNIT
NUM_TABLES - Static variable in interface com.sun.image.codec.jpeg.JPEGDecodeParam
Number of allowed Huffman and Quantization Tables
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Overview

PREV NEXT FRAMES NO FRAMES

Other API Bundled with the Java 2 SDK

This document contains API that are not part of the Java 2 Platform.

See:
Description

Packages
com.sun.image.codec.jpeg Provides classes for encoding and decoding JPEG images.

This document contains API that are not part of the Java 2 Platform. While they may be a part of Sun's Java 2 SDK and Java 2 Runtime Environment distributions, developers cannot depend on their availability in non-Sun implementations.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


S-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

S

setACHuffmanComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's AC Huffman Table.
setACHuffmanTable(int, JPEGHuffmanTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the AC Huffman coding table at index to the table provided.
setDCHuffmanComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's DC Huffman Table.
setDCHuffmanTable(int, JPEGHuffmanTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the DC Huffman coding table at index to the table provided.
setDensityUnit(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the pixel size units This value is copied into the APP0 marker (if that marker is written).
setHorizontalSubsampling(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the horizontal subsample factor for the given component.
setImageInfoValid(boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the flag indicating the validity of the table information in the ParamBlock.
setJPEGDecodeParam(JPEGDecodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageDecoder
Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data.
setJPEGEncodeParam(JPEGEncodeParam) - Method in interface com.sun.image.codec.jpeg.JPEGImageEncoder
Set the JPEGEncodeParam object that is to be used for future encoding operations.
setMarkerData(int, byte[][]) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the marker data to be written to the output data stream.
setQTable(int, JPEGQTable) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the coefficient quantization tables at index passed.
setQTableComponentMapping(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Sets the mapping between a component and it's Quantization Table.
setQuality(float, boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
This creates new Quantization tables that replace the currently installed Quantization tables.
setRestartInterval(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the MCUs per restart, or 0 for no restart markers.
setTableInfoValid(boolean) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the flag indicating the validity of the image information in the ParamBlock.
setVerticalSubsampling(int, int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the vertical subsample factor for the given component.
setXDensity(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the horizontal pixel density This value is written into the APP0 marker.
setYDensity(int) - Method in interface com.sun.image.codec.jpeg.JPEGEncodeParam
Set the vertical pixel density.
StdACChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdACLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGQTable
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
StdDCChrominance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdDCLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGHuffmanTable
Standard Huffman table ( JPEG standard section K.3 )
StdLuminance - Static variable in class com.sun.image.codec.jpeg.JPEGQTable
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
Overview Package Class Use Tree Deprecated Index Help
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Serialized Form

Package com.sun.image.codec.jpeg

Class com.sun.image.codec.jpeg.ImageFormatException implements Serializable

Class com.sun.image.codec.jpeg.TruncatedFileException implements Serializable

Serialized Fields

ras

Raster ras

bi

BufferedImage bi

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


T-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
A C D E G I J N S T

T

TruncatedFileException - exception com.sun.image.codec.jpeg.TruncatedFileException.
Signals that a truncated file was detected.
TruncatedFileException(BufferedImage) - Constructor for class com.sun.image.codec.jpeg.TruncatedFileException
Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
TruncatedFileException(Raster) - Constructor for class com.sun.image.codec.jpeg.TruncatedFileException
Constructs an TruncatedFileException with the partially decoded Raster
Overview  Package  Class  Use  Tree  Deprecated   Index  Help
 PREV LETTER   NEXT LETTER FRAMES    NO FRAMES
A C D E G I J N S T
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


com.sun.image.codec.jpeg Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.image.codec.jpeg

Class Hierarchy

  • class java.lang.Object
    • class com.sun.image.codec.jpeg.JPEGCodec
    • class com.sun.image.codec.jpeg.JPEGHuffmanTable
    • class com.sun.image.codec.jpeg.JPEGQTable
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class com.sun.image.codec.jpeg.ImageFormatException
          • class com.sun.image.codec.jpeg.TruncatedFileException

Interface Hierarchy

  • interface java.lang.Cloneable
    • interface com.sun.image.codec.jpeg.JPEGDecodeParam
      • interface com.sun.image.codec.jpeg.JPEGEncodeParam (also extends java.lang.Cloneable)
    • interface com.sun.image.codec.jpeg.JPEGEncodeParam (also extends com.sun.image.codec.jpeg.JPEGDecodeParam)
  • interface com.sun.image.codec.jpeg.JPEGImageDecoder
  • interface com.sun.image.codec.jpeg.JPEGImageEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Package com.sun.image.codec.jpeg

Provides classes for encoding and decoding JPEG images.

See:
Description

Interface Summary
JPEGDecodeParam | JPEGDecodeParam encapsulates tables and options necessary to control decoding JPEG datastreams.
JPEGEncodeParam | JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams.
JPEGImageDecoder | This interface describes a JPEG data stream decoder.
JPEGImageEncoder | JPEGImageEncoder encodes buffers of image data into JPEG data streams.

Class Summary
JPEGCodec | This class is a factory for implementations of the JPEG Image Decoder/Encoder.
JPEGHuffmanTable | A class to encapsulate a JPEG Huffman table.
JPEGQTable | Class to encapsulate the JPEG quantization tables.

Exception Summary
ImageFormatException | Signals that an Image Format exception of some sort has occurred.
TruncatedFileException | Signals that a truncated file was detected.

Package com.sun.image.codec.jpeg Description

Provides classes for encoding and decoding JPEG images.

Overview Package Class Use Tree Deprecated Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Package com.sun.image.codec.jpeg

PREV NEXT FRAMES NO FRAMES

Uses of Package
com.sun.image.codec.jpeg

Classes in com.sun.image.codec.jpeg used by com.sun.image.codec.jpeg
ImageFormatException
Signals that an Image Format exception of some sort has occurred.
JPEGDecodeParam
JPEGDecodeParam encapsulates tables and options necessary to control decoding JPEG datastreams.
JPEGEncodeParam
JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams.
JPEGHuffmanTable
A class to encapsulate a JPEG Huffman table.
JPEGImageDecoder
This interface describes a JPEG data stream decoder.
JPEGImageEncoder
JPEGImageEncoder encodes buffers of image data into JPEG data streams.
JPEGQTable
Class to encapsulate the JPEG quantization tables.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Class com.sun.image.codec.jpeg.JPEGCodec

PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.image.codec.jpeg.JPEGCodec

No usage of com.sun.image.codec.jpeg.JPEGCodec

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Class com.sun.image.codec.jpeg.TruncatedFileException

PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.image.codec.jpeg.TruncatedFileException

No usage of com.sun.image.codec.jpeg.TruncatedFileException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Class com.sun.image.codec.jpeg.ImageFormatException

PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.image.codec.jpeg.ImageFormatException

Uses of ImageFormatException in com.sun.image.codec.jpeg

Methods in com.sun.image.codec.jpeg that throw ImageFormatException
Raster | JPEGImageDecoder.decodeAsRaster() Decode the JPEG stream that was passed as part of construction.
BufferedImage | JPEGImageDecoder.decodeAsBufferedImage() Decodes the current JPEG data stream.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(BufferedImage bi) This is a factory method for creating JPEGEncodeParam objects.
void | JPEGImageEncoder.encode(BufferedImage bi) Encode a BufferedImage as a JPEG data stream.
void | JPEGImageEncoder.encode(BufferedImage bi, JPEGEncodeParam jep) Encode a BufferedImage as a JPEG data stream.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(Raster ras, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
void | JPEGImageEncoder.encode(Raster ras) Encode a Raster as a JPEG data stream.
void | JPEGImageEncoder.encode(Raster ras, JPEGEncodeParam jep) Encode a Raster as a JPEG data stream.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Class com.sun.image.codec.jpeg.JPEGHuffmanTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.image.codec.jpeg.JPEGHuffmanTable

Uses of JPEGHuffmanTable in com.sun.image.codec.jpeg

Fields in com.sun.image.codec.jpeg declared as JPEGHuffmanTable
static JPEGHuffmanTable | JPEGHuffmanTable.StdDCLuminance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | JPEGHuffmanTable.StdDCChrominance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | JPEGHuffmanTable.StdACLuminance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | JPEGHuffmanTable.StdACChrominance Standard Huffman table ( JPEG standard section K.3 )

Methods in com.sun.image.codec.jpeg that return JPEGHuffmanTable
JPEGHuffmanTable | JPEGDecodeParam.getDCHuffmanTable(int tableNum) Returns the DC Huffman coding table requested or null if not defined
JPEGHuffmanTable | JPEGDecodeParam.getDCHuffmanTableForComponent(int component) Returns the DC Huffman coding table for the requested component.
JPEGHuffmanTable | JPEGDecodeParam.getACHuffmanTable(int tableNum) Returns the AC Huffman coding table requested or null if not defined
JPEGHuffmanTable | JPEGDecodeParam.getACHuffmanTableForComponent(int component) Returns the AC Huffman coding table for the requested component.

Methods in com.sun.image.codec.jpeg with parameters of type JPEGHuffmanTable
void | JPEGEncodeParam.setDCHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) Sets the DC Huffman coding table at index to the table provided.
void | JPEGEncodeParam.setACHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) Sets the AC Huffman coding table at index to the table provided.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Class com.sun.image.codec.jpeg.JPEGQTable

PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.image.codec.jpeg.JPEGQTable

Uses of JPEGQTable in com.sun.image.codec.jpeg

Fields in com.sun.image.codec.jpeg declared as JPEGQTable
static JPEGQTable | JPEGQTable.StdLuminance This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
static JPEGQTable | JPEGQTable.StdChrominance This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.

Methods in com.sun.image.codec.jpeg that return JPEGQTable
JPEGQTable | JPEGDecodeParam.getQTable(int tableNum) Returns the coefficient quantization tables or NULL if not defined.
JPEGQTable | JPEGDecodeParam.getQTableForComponent(int component) Returns the Quantization table for the requested component.
JPEGQTable | JPEGQTable.getScaledInstance(float scaleFactor, boolean forceBaseline) Returns a new Quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is 'true').

Methods in com.sun.image.codec.jpeg with parameters of type JPEGQTable
 void JPEGEncodeParam.setQTable(int tableNum, JPEGQTable qTable)
Sets the coefficient quantization tables at index passed.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Interface com.sun.image.codec.jpeg.JPEGDecodeParam

PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.image.codec.jpeg.JPEGDecodeParam

Uses of JPEGDecodeParam in com.sun.image.codec.jpeg

Subinterfaces of JPEGDecodeParam in com.sun.image.codec.jpeg
 interface JPEGEncodeParam
JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams.

Methods in com.sun.image.codec.jpeg that return JPEGDecodeParam
 JPEGDecodeParam JPEGImageDecoder.getJPEGDecodeParam()
Returns the JPEGDecodeParam object that resulted from the most recent decoding event.

Methods in com.sun.image.codec.jpeg with parameters of type JPEGDecodeParam
void | JPEGImageDecoder.setJPEGDecodeParam(JPEGDecodeParam jdp) Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
static JPEGImageDecoder | JPEGCodec.createJPEGDecoder(InputStream src, JPEGDecodeParam jdp) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Interface com.sun.image.codec.jpeg.JPEGEncodeParam

PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.image.codec.jpeg.JPEGEncodeParam

Uses of JPEGEncodeParam in com.sun.image.codec.jpeg

Methods in com.sun.image.codec.jpeg that return JPEGEncodeParam
JPEGEncodeParam | JPEGImageEncoder.getJPEGEncodeParam() This returns a copy of the current JPEGEncodeParam object, if you want changes to affect the encoding process you must 'set' it back into the encoder (either through setJPEGEncodeParam or by providing the modified param object in the call to encode.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(BufferedImage bi) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(Raster ras, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | JPEGImageEncoder.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(BufferedImage bi) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(Raster ras, int colorID) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | JPEGCodec.getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.

Methods in com.sun.image.codec.jpeg with parameters of type JPEGEncodeParam
void | JPEGImageEncoder.setJPEGEncodeParam(JPEGEncodeParam jep) Set the JPEGEncodeParam object that is to be used for future encoding operations.
void | JPEGImageEncoder.encode(BufferedImage bi, JPEGEncodeParam jep) Encode a BufferedImage as a JPEG data stream.
void | JPEGImageEncoder.encode(Raster ras, JPEGEncodeParam jep) Encode a Raster as a JPEG data stream.
static JPEGImageEncoder | JPEGCodec.createJPEGEncoder(OutputStream dest, JPEGEncodeParam jep) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Interface com.sun.image.codec.jpeg.JPEGImageDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.image.codec.jpeg.JPEGImageDecoder

Uses of JPEGImageDecoder in com.sun.image.codec.jpeg

Methods in com.sun.image.codec.jpeg that return JPEGImageDecoder
static JPEGImageDecoder | JPEGCodec.createJPEGDecoder(InputStream src) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
static JPEGImageDecoder | JPEGCodec.createJPEGDecoder(InputStream src, JPEGDecodeParam jdp) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


Uses of Interface com.sun.image.codec.jpeg.JPEGImageEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.image.codec.jpeg.JPEGImageEncoder

Uses of JPEGImageEncoder in com.sun.image.codec.jpeg

Methods in com.sun.image.codec.jpeg that return JPEGImageEncoder
static JPEGImageEncoder | JPEGCodec.createJPEGEncoder(OutputStream dest) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
static JPEGImageEncoder | JPEGCodec.createJPEGEncoder(OutputStream dest, JPEGEncodeParam jep) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


ImageFormatException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Class ImageFormatException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.image.codec.jpeg.ImageFormatException
All Implemented Interfaces:
Serializable
public class ImageFormatException
extends RuntimeException

Signals that an Image Format exception of some sort has occurred.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Since:
JDK1.2
See Also:
JPEGImageEncoder, JPEGImageDecoder, Serialized Form

Constructor Summary
ImageFormatException()
Constructs an ImageFormatException with no detail message.
ImageFormatException(String s)
Constructs an ImageFormatException with the specified detailed message.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ImageFormatException

public ImageFormatException()
Constructs an ImageFormatException with no detail message.

ImageFormatException

public ImageFormatException(String s)
Constructs an ImageFormatException with the specified detailed message.
Parameters:
s - the message.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGCodec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Class JPEGCodec

java.lang.Object
  |
  +--com.sun.image.codec.jpeg.JPEGCodec
public class JPEGCodec
extends Object

This class is a factory for implementations of the JPEG Image Decoder/Encoder.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

See Also:
JPEGImageDecoder, JPEGImageEncoder

Method Summary
static JPEGImageDecoder | createJPEGDecoder(InputStream src) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
static JPEGImageDecoder | createJPEGDecoder(InputStream src, JPEGDecodeParam jdp) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
static JPEGImageEncoder | createJPEGEncoder(OutputStream dest) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
static JPEGImageEncoder | createJPEGEncoder(OutputStream dest, JPEGEncodeParam jep) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.
static JPEGEncodeParam | getDefaultJPEGEncodeParam(BufferedImage bi) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
static JPEGEncodeParam | getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
static JPEGEncodeParam | getDefaultJPEGEncodeParam(Raster ras, int colorID) This is a factory method for creating JPEGEncodeParam objects.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

createJPEGDecoder

public static JPEGImageDecoder createJPEGDecoder(InputStream src)
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.

createJPEGDecoder

public static JPEGImageDecoder createJPEGDecoder(InputStream src,
                                                 JPEGDecodeParam jdp)
This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.

createJPEGEncoder

public static JPEGImageEncoder createJPEGEncoder(OutputStream dest)
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.

createJPEGEncoder

public static JPEGImageEncoder createJPEGEncoder(OutputStream dest,
                                                 JPEGEncodeParam jep)
This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams.

getDefaultJPEGEncodeParam

public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
This is a factory method for creating JPEGEncodeParam objects. The returned object should do a credible job of encoding the given BufferedImage.
Parameters:
bi - A BufferedImage that is similar to the BufferedImage(s) that will encoded using the returned JPEGEncodeParam object.

getDefaultJPEGEncodeParam

public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
                                                        int colorID)
This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the data contained in the Raster. Failure to do so may lead to either poor compression or poor image quality. If you don't understand much about JPEG it is strongly recommended that you stick to the BufferedImage interface.
Parameters:
ras - Raster that is similar to those to be encoded later.
colorID - the COLOR_ID for the encoded data. This should match the data in the raster.

getDefaultJPEGEncodeParam

public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
                                                        int colorID)
                                                 throws ImageFormatException
This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the given number of bands, which should match the data being encoded. Failure to do so may lead to poor compression and/or poor image quality. If you don't understand much about JPEG it is strongly recommended that you stick to the BufferedImage interface. This can also be used as a factory for a JPEGDecodeParam object. However this usage is extremely rare, as one needs to be decoding abbreviated JPEG streams where the JPEG tables are coming from some source other than a JPEG tables only stream.
Parameters:
numBands - the number of bands that will be encoded (max of four).
colorID - the COLOR_ID for the encoded data. This is used to set reasonable defaults in the parameter object. This must match the number of bands given.

getDefaultJPEGEncodeParam

public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
                                                 throws ImageFormatException
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam. This will return a new JPEGEncodeParam object that is initialized from the JPEGDecodeParam object. All major pieces of information will be initialized from the DecodeParam (Markers, Tables, mappings).
Parameters:
jdp - The JPEGDecodeParam object to copy.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGDecodeParam

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Interface JPEGDecodeParam

All Superinterfaces:
Cloneable
All Known Subinterfaces:
JPEGEncodeParam
public interface JPEGDecodeParam
extends Cloneable

JPEGDecodeParam encapsulates tables and options necessary to control decoding JPEG datastreams. Parameters are either set explicitly by the application for encoding, or read from the JPEG header for decoding. In the case of decoding abbreviated data streams the application may need to set some/all of the values it's self.

When working with BufferedImages (@see JPEGImageDecoder.decodeBufferedImage), the codec will attempt to generate an appropriate ColorModel for the JPEG COLOR_ID. This is not always possible (example mappings are listed below) . In cases where unsupported conversions are required, or unknown encoded COLOR_ID's are in use, the user must request the data as a Raster and perform the transformations themselves. When decoding into a raster (@see JPEGImageDecoder.decodeRaster) no ColorSpace adjustments are made. Note: The color ids described herein are simply enumerated values that influence data processing by the JPEG codec. JPEG compression is by definition color blind. These values are used as hints when decompressing JPEG data. Of particular interest is the default conversion from YCbCr to sRGB when decoding buffered Images.

Note: because JPEG is mostly color-blind color fidelity can not be garunteed. This will hopefully be rectified in the near future by the wide spread inclusion of ICC-profiles in the JPEG data stream (as a special marker). The following is an example of the conversions that take place. This is only a guide to the types of conversions that are allowed. This list is likely to change in the future so it is strongly recommended that you check for thrown ImageFormatExceptions and check the actual ColorModel associated with the BufferedImage returned rather than make assumtions.

DECODING:

JPEG (Encoded) Color ID         BufferedImage ColorSpace
=======================         ========================
COLOR_ID_UNKNOWN                ** Invalid **
COLOR_ID_GRAY                   CS_GRAY
COLOR_ID_RGB                    CS_sRGB
COLOR_ID_YCbCr                  CS_sRGB
COLOR_ID_CMYK                   ** Invalid **
COLOR_ID_PYCC                   CS_PYCC
COLOR_ID_RGBA                   CS_sRGB (w/ alpha)
COLOR_ID_YCbCrA                 CS_sRGB (w/ alpha)
COLOR_ID_RGBA_INVERTED          ** Invalid **
COLOR_ID_YCbCrA_INVERTED        ** Invalid **
COLOR_ID_PYCCA                  CS_PYCC (w/ alpha)
COLOR_ID_YCCK                   ** Invalid **
If the user needs better control over conversion, the user must request the data as a Raster and handle the conversion of the image data themselves.

When decoding JFIF files the encoded COLOR_ID will always be one of: COLOR_ID_UNKNOWN, COLOR_ID_GRAY, COLOR_ID_RGB, COLOR_ID_YCbCr, COLOR_ID_CMYK, or COLOR_ID_YCCK

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Field Summary
static int | APP0_MARKER APP0 marker - JFIF info
static int | APP1_MARKER APP1 marker
static int | APP2_MARKER APP2 marker
static int | APP3_MARKER APP3 marker
static int | APP4_MARKER APP4 marker
static int | APP5_MARKER APP5 marker
static int | APP6_MARKER APP6 marker
static int | APP7_MARKER APP7 marker
static int | APP8_MARKER APP8 marker
static int | APP9_MARKER APP9 marker
static int | APPA_MARKER APPA marker
static int | APPB_MARKER APPB marker
static int | APPC_MARKER APPC marker
static int | APPD_MARKER APPD marker
static int | APPE_MARKER APPE marker - Adobe info
static int | APPF_MARKER APPF marker
static int | COLOR_ID_CMYK CMYK
static int | COLOR_ID_GRAY Monochrome
static int | COLOR_ID_PYCC PhotoYCC
static int | COLOR_ID_PYCCA PhotoYCC-Alpha
static int | COLOR_ID_RGB Red, Green, and Blue
static int | COLOR_ID_RGBA RGB-Alpha
static int | COLOR_ID_RGBA_INVERTED RGB-Alpha with R, G, and B inverted.
static int | COLOR_ID_UNKNOWN Unknown or Undefined Color ID
static int | COLOR_ID_YCbCr YCbCr
static int | COLOR_ID_YCbCrA YCbCr-Alpha
static int | COLOR_ID_YCbCrA_INVERTED YCbCr-Alpha with Y, Cb, and Cr inverted.
static int | COLOR_ID_YCCK YCbCrK
static int | COMMENT_MARKER Adobe marker indicates presence/need for Adobe marker.
static int | DENSITY_UNIT_ASPECT_RATIO The X and Y units simply indicate the aspect ratio of the pixels.
static int | DENSITY_UNIT_DOTS_CM Pixel density is in pixels per centemeter.
static int | DENSITY_UNIT_DOTS_INCH Pixel density is in pixels per inch.
static int | NUM_COLOR_ID Number of color ids defined.
static int | NUM_DENSITY_UNIT The max known value for DENSITY_UNIT
static int | NUM_TABLES Number of allowed Huffman and Quantization Tables
Method Summary
Object | clone()
int | getACHuffmanComponentMapping(int component) Get the number of the AC Huffman table that will be used for a particular component.
JPEGHuffmanTable | getACHuffmanTable(int tableNum) Returns the AC Huffman coding table requested or null if not defined
JPEGHuffmanTable | getACHuffmanTableForComponent(int component) Returns the AC Huffman coding table for the requested component.
int | getDCHuffmanComponentMapping(int component) Get the number of the DC Huffman table that will be used for a particular component.
JPEGHuffmanTable | getDCHuffmanTable(int tableNum) Returns the DC Huffman coding table requested or null if not defined
JPEGHuffmanTable | getDCHuffmanTableForComponent(int component) Returns the DC Huffman coding table for the requested component.
int | getDensityUnit() Get the code for pixel size units This value is copied from the APP0 marker.
int | getEncodedColorID() Returns the JPEG Encoded color id.
int | getHeight() Get the image height
int | getHorizontalSubsampling(int component) Return the Horizontal subsampling factor for requested Component.
boolean | getMarker(int marker) Returns true if at least one instance of the marker is present in the Parameter object.
byte[][] | getMarkerData(int marker) Returns a 'byte[][]' associated with the requested marker in the parameter object.
int | getNumComponents() Returns the number of components for the current encoding COLOR_ID.
JPEGQTable | getQTable(int tableNum) Returns the coefficient quantization tables or NULL if not defined.
int | getQTableComponentMapping(int component) Get the number of the quantization table that will be used for a particular component.
JPEGQTable | getQTableForComponent(int component) Returns the Quantization table for the requested component.
int | getRestartInterval() Get the MCUs per restart marker.
int | getVerticalSubsampling(int component) Return the Vertical subsampling factor for requested Component.
int | getWidth() Get the image width
int | getXDensity() Get the horizontal pixel density This value is copied from the APP0 marker.
int | getYDensity() Get the vertical pixel density This value is copied into the APP0 marker.
boolean | isImageInfoValid() Returns true if the image information in the ParamBlock is currently valid.
boolean | isTableInfoValid() Returns true if the tables in the ParamBlock are currently valid.

Field Detail

COLOR_ID_UNKNOWN

public static final int COLOR_ID_UNKNOWN
Unknown or Undefined Color ID

COLOR_ID_GRAY

public static final int COLOR_ID_GRAY
Monochrome

COLOR_ID_RGB

public static final int COLOR_ID_RGB
Red, Green, and Blue

COLOR_ID_YCbCr

public static final int COLOR_ID_YCbCr
YCbCr

COLOR_ID_CMYK

public static final int COLOR_ID_CMYK
CMYK

COLOR_ID_PYCC

public static final int COLOR_ID_PYCC
PhotoYCC

COLOR_ID_RGBA

public static final int COLOR_ID_RGBA
RGB-Alpha

COLOR_ID_YCbCrA

public static final int COLOR_ID_YCbCrA
YCbCr-Alpha

COLOR_ID_RGBA_INVERTED

public static final int COLOR_ID_RGBA_INVERTED
RGB-Alpha with R, G, and B inverted.

COLOR_ID_YCbCrA_INVERTED

public static final int COLOR_ID_YCbCrA_INVERTED
YCbCr-Alpha with Y, Cb, and Cr inverted.

COLOR_ID_PYCCA

public static final int COLOR_ID_PYCCA
PhotoYCC-Alpha

COLOR_ID_YCCK

public static final int COLOR_ID_YCCK
YCbCrK

NUM_COLOR_ID

public static final int NUM_COLOR_ID
Number of color ids defined.

NUM_TABLES

public static final int NUM_TABLES
Number of allowed Huffman and Quantization Tables

DENSITY_UNIT_ASPECT_RATIO

public static final int DENSITY_UNIT_ASPECT_RATIO
The X and Y units simply indicate the aspect ratio of the pixels.

DENSITY_UNIT_DOTS_INCH

public static final int DENSITY_UNIT_DOTS_INCH
Pixel density is in pixels per inch.

DENSITY_UNIT_DOTS_CM

public static final int DENSITY_UNIT_DOTS_CM
Pixel density is in pixels per centemeter.

NUM_DENSITY_UNIT

public static final int NUM_DENSITY_UNIT
The max known value for DENSITY_UNIT

APP0_MARKER

public static final int APP0_MARKER
APP0 marker - JFIF info

APP1_MARKER

public static final int APP1_MARKER
APP1 marker

APP2_MARKER

public static final int APP2_MARKER
APP2 marker

APP3_MARKER

public static final int APP3_MARKER
APP3 marker

APP4_MARKER

public static final int APP4_MARKER
APP4 marker

APP5_MARKER

public static final int APP5_MARKER
APP5 marker

APP6_MARKER

public static final int APP6_MARKER
APP6 marker

APP7_MARKER

public static final int APP7_MARKER
APP7 marker

APP8_MARKER

public static final int APP8_MARKER
APP8 marker

APP9_MARKER

public static final int APP9_MARKER
APP9 marker

APPA_MARKER

public static final int APPA_MARKER
APPA marker

APPB_MARKER

public static final int APPB_MARKER
APPB marker

APPC_MARKER

public static final int APPC_MARKER
APPC marker

APPD_MARKER

public static final int APPD_MARKER
APPD marker

APPE_MARKER

public static final int APPE_MARKER
APPE marker - Adobe info

APPF_MARKER

public static final int APPF_MARKER
APPF marker

COMMENT_MARKER

public static final int COMMENT_MARKER
Adobe marker indicates presence/need for Adobe marker.
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

getWidth

public int getWidth()
Get the image width
Returns:
int the width of the image data in pixels.

getHeight

public int getHeight()
Get the image height
Returns:
The height of the image data in pixels.

getHorizontalSubsampling

public int getHorizontalSubsampling(int component)
Return the Horizontal subsampling factor for requested Component. The Subsample factor is the number of input pixels that contribute to each output pixel. This is distinct from the way the JPEG to each output pixel. This is distinct from the way the JPEG standard defines this quantity, because fractional subsampling factors are not allowed, and it was felt
Parameters:
component - The component of the encoded image to return the subsampling factor for.
Returns:
The subsample factor.

getVerticalSubsampling

public int getVerticalSubsampling(int component)
Return the Vertical subsampling factor for requested Component. The Subsample factor is the number of input pixels that contribute to each output pixel. This is distinct from the way the JPEG to each output pixel. This is distinct from the way the JPEG standard defines this quantity, because fractional subsampling factors are not allowed, and it was felt
Parameters:
component - The component of the encoded image to return the subsampling factor for.
Returns:
The subsample factor.

getQTable

public JPEGQTable getQTable(int tableNum)
Returns the coefficient quantization tables or NULL if not defined. tableNum must range in value from 0 - 3.
Parameters:
tableNum - the index of the table to be returned.
Returns:
Quantization table stored at index tableNum.

getQTableForComponent

public JPEGQTable getQTableForComponent(int component)
Returns the Quantization table for the requested component.
Parameters:
component - the image component of interest.
Returns:
Quantization table associated with component

getDCHuffmanTable

public JPEGHuffmanTable getDCHuffmanTable(int tableNum)
Returns the DC Huffman coding table requested or null if not defined
Parameters:
tableNum - the index of the table to be returned.
Returns:
Huffman table stored at index tableNum.

getDCHuffmanTableForComponent

public JPEGHuffmanTable getDCHuffmanTableForComponent(int component)
Returns the DC Huffman coding table for the requested component.
Parameters:
component - the image component of interest.
Returns:
Huffman table associated with component

getACHuffmanTable

public JPEGHuffmanTable getACHuffmanTable(int tableNum)
Returns the AC Huffman coding table requested or null if not defined
Parameters:
tableNum - the index of the table to be returned.
Returns:
Huffman table stored at index tableNum.

getACHuffmanTableForComponent

public JPEGHuffmanTable getACHuffmanTableForComponent(int component)
Returns the AC Huffman coding table for the requested component.
Parameters:
component - the image component of interest.
Returns:
Huffman table associated with component

getDCHuffmanComponentMapping

public int getDCHuffmanComponentMapping(int component)
Get the number of the DC Huffman table that will be used for a particular component.
Parameters:
component - The Component of interest.
Returns:
The table number of the DC Huffman table for component.

getACHuffmanComponentMapping

public int getACHuffmanComponentMapping(int component)
Get the number of the AC Huffman table that will be used for a particular component.
Parameters:
component - The Component of interest.
Returns:
The table number of the AC Huffman table for component.

getQTableComponentMapping

public int getQTableComponentMapping(int component)
Get the number of the quantization table that will be used for a particular component.
Parameters:
component - The Component of interest.
Returns:
The table number of the Quantization table for component.

isImageInfoValid

public boolean isImageInfoValid()
Returns true if the image information in the ParamBlock is currently valid. This indicates if image data was read from the stream for decoding and weather image data should be written when encoding.

isTableInfoValid

public boolean isTableInfoValid()
Returns true if the tables in the ParamBlock are currently valid. This indicates that tables were read from the stream for decoding. When encoding this indicates wether tables should be written to the stream.

getMarker

public boolean getMarker(int marker)
Returns true if at least one instance of the marker is present in the Parameter object. For encoding returns true if there is at least one instance of the marker to be written.
Parameters:
marker - The marker of interest.

getMarkerData

public byte[][] getMarkerData(int marker)
Returns a 'byte[][]' associated with the requested marker in the parameter object. Each entry in the 'byte[][]' is the data associated with one instance of the marker (each marker can theoretically appear any number of times in a stream).
Parameters:
marker - The marker of interest.
Returns:
The 'byte[][]' for this marker or null if none available.

getEncodedColorID

public int getEncodedColorID()
Returns the JPEG Encoded color id. This is generally speaking only used if you are decoding into Rasters. Note that when decoding into a Raster no color conversion is performed.
Returns:
The value of the JPEG encoded data's color id.

getNumComponents

public int getNumComponents()
Returns the number of components for the current encoding COLOR_ID.
Returns:
the number of Components

getRestartInterval

public int getRestartInterval()
Get the MCUs per restart marker.
Returns:
The number of MCUs between restart markers.

getDensityUnit

public int getDensityUnit()
Get the code for pixel size units This value is copied from the APP0 marker. It isn't used by the JPEG codec. If the APP0 marker wasn't present then you can not rely on this value.
Returns:
Value indicating the density unit one of the DENSITY_UNIT_* constants.

getXDensity

public int getXDensity()
Get the horizontal pixel density This value is copied from the APP0 marker. It isn't used by the JPEG code. If the APP0 marker wasn't present then you can not rely on this value.
Returns:
The horizontal pixel density, in units described by
See Also:
JPEGDecodeParam.getDensityUnit.

getYDensity

public int getYDensity()
Get the vertical pixel density This value is copied into the APP0 marker. It isn't used by the JPEG code. If the APP0 marker wasn't present then you can not rely on this value.
Returns:
The verticle pixel density, in units described by
See Also:
JPEGDecodeParam.getDensityUnit.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGEncodeParam

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Interface JPEGEncodeParam

All Superinterfaces:
Cloneable, JPEGDecodeParam
public interface JPEGEncodeParam
extends Cloneable, JPEGDecodeParam

JPEGEncodeParam encapsulates tables and options necessary to control encoding of JPEG data streams. Parameters are either set explicitly by the application for encoding, or read from another JPEG header.

When working with BufferedImages, the codec will attempt to match the encoded JPEG COLOR_ID with the ColorModel in the BufferedImage. This is not always possible (the default mappings are listed below). In cases where unsupported conversions are required (or odd image colorspaces are in use) the user must either convert the image data to a known ColorSpace or encode the data from a raster. When encoding rasters no colorspace adjustments are made, so the user must do any conversions required to get to the encoded COLOR_ID. The COLOR_ID for the encoded images is used to control the JPEG codec's inital values for Huffman and Quantization Tables as well as subsampling factors. It is also used to determine what color conversion should be performed to obtain the best encoding.

Note: The color ids described herein are simply enumerated values that influence data processing by the JPEG codec. JPEG compression is, by definition, color blind. These values are used as hints when compressing JPEG data. Through these values the JPEG codec can perform some default rotation of data into spaces that will aid in getting better compression ratios.

Example behaviour is described below. Since these mappings are likely to change in the future it is strongly recommended that you make use of the @see JPEGImageEncoder.getDefaultParamBlock calls and check the encodedColorID for your particular BufferedImage. In extreme cases is may be necessary for the user to convert the image to the desired colorspace, and encode it from a Raster. In this case the API programmer must specify the colorID of the data in the Raster and no color conversion will take place.

ENCODING:

BufferedImage Type/Instance        JPEG (Encoded) Color ID
========================       =======================
TYPE_GRAY                      COLOR_ID_GRAYSCALE
TYPE_RGB                       COLOR_ID_YCbCr
TYPE_YCbCr                     COLOR_ID_YCbCr
TYPE_YCbCr/CS_PYCC             COLOR_ID_PYCC
TYPE_CMYK                      COLOR_ID_CMYK
TYPE_RGB   (w/ alpha)          COLOR_ID_YCbCrA
TYPE_YCbCr (w/ alpha)          COLOR_ID_YCbCrA
TYPE_YCbCr/CS_PYCC (w/ alpha)  COLOR_ID_PYCCA
 Any Other **                COLOR_ID_UNKNOWN
When the user wants more control than the BufferedImage conversions provide, the user must encode the data from a Raster. In this case the data undergoes no color conversion at all. It is the user's responsiblity to perform the desired conversions.

If you intend to write a JFIF image (by including the APP0_MARKER) the encoded COLOR_ID must be one of: COLOR_ID_UNKNOWN, COLOR_ID_GRAYSCALE, COLOR_ID_YCbCr, or COLOR_ID_CMYK. In all other instances an ImageformatException will be thrown.

IMPORTANT: an Alpha RGB BufferedImage will not map to a valid JFIF stream, you must strip off the alpha prior to encoding if you want a JFIF file. If the APP0 marker is set and you do not strip off the Alpha, an ImageFormatException will be thrown.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Fields inherited from interface com.sun.image.codec.jpeg.JPEGDecodeParam
APP0_MARKER, APP1_MARKER, APP2_MARKER, APP3_MARKER, APP4_MARKER, APP5_MARKER, APP6_MARKER, APP7_MARKER, APP8_MARKER, APP9_MARKER, APPA_MARKER, APPB_MARKER, APPC_MARKER, APPD_MARKER, APPE_MARKER, APPF_MARKER, COLOR_ID_CMYK, COLOR_ID_GRAY, COLOR_ID_PYCC, COLOR_ID_PYCCA, COLOR_ID_RGB, COLOR_ID_RGBA, COLOR_ID_RGBA_INVERTED, COLOR_ID_UNKNOWN, COLOR_ID_YCbCr, COLOR_ID_YCbCrA, COLOR_ID_YCbCrA_INVERTED, COLOR_ID_YCCK, COMMENT_MARKER, DENSITY_UNIT_ASPECT_RATIO, DENSITY_UNIT_DOTS_CM, DENSITY_UNIT_DOTS_INCH, NUM_COLOR_ID, NUM_DENSITY_UNIT, NUM_TABLES
Method Summary
void | addMarkerData(int marker, byte[] data) Appends 'data' to the array of byte[] associated with marker.
Object | clone()
void | setACHuffmanComponentMapping(int component, int table) Sets the mapping between a component and it's AC Huffman Table.
void | setACHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) Sets the AC Huffman coding table at index to the table provided.
void | setDCHuffmanComponentMapping(int component, int table) Sets the mapping between a component and it's DC Huffman Table.
void | setDCHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) Sets the DC Huffman coding table at index to the table provided.
void | setDensityUnit(int unit) Set the pixel size units This value is copied into the APP0 marker (if that marker is written).
void | setHorizontalSubsampling(int component, int subsample) Set the horizontal subsample factor for the given component.
void | setImageInfoValid(boolean flag) Set the flag indicating the validity of the table information in the ParamBlock.
void | setMarkerData(int marker, byte[][] data) Sets the marker data to be written to the output data stream.
void | setQTable(int tableNum, JPEGQTable qTable) Sets the coefficient quantization tables at index passed.
void | setQTableComponentMapping(int component, int table) Sets the mapping between a component and it's Quantization Table.
void | setQuality(float quality, boolean forceBaseline) This creates new Quantization tables that replace the currently installed Quantization tables.
void | setRestartInterval(int restartInterval) Set the MCUs per restart, or 0 for no restart markers.
void | setTableInfoValid(boolean flag) Set the flag indicating the validity of the image information in the ParamBlock.
void | setVerticalSubsampling(int component, int subsample) Set the vertical subsample factor for the given component.
void | setXDensity(int density) Set the horizontal pixel density This value is written into the APP0 marker.
void | setYDensity(int density) Set the vertical pixel density.
Methods inherited from interface com.sun.image.codec.jpeg.JPEGDecodeParam
getACHuffmanComponentMapping, getACHuffmanTable, getACHuffmanTableForComponent, getDCHuffmanComponentMapping, getDCHuffmanTable, getDCHuffmanTableForComponent, getDensityUnit, getEncodedColorID, getHeight, getHorizontalSubsampling, getMarker, getMarkerData, getNumComponents, getQTable, getQTableComponentMapping, getQTableForComponent, getRestartInterval, getVerticalSubsampling, getWidth, getXDensity, getYDensity, isImageInfoValid, isTableInfoValid

Method Detail

clone

public Object clone()
Specified by:
clone in interface JPEGDecodeParam
Overrides:
clone in class Object

setHorizontalSubsampling

public void setHorizontalSubsampling(int component,
                                     int subsample)
Set the horizontal subsample factor for the given component. Note that the subsample factor is the number of input pixels that contribute to each output pixel (ussually 2 for YCC).
Parameters:
component - The component being specified.
subsample - The subsampling factor being specified.

setVerticalSubsampling

public void setVerticalSubsampling(int component,
                                   int subsample)
Set the vertical subsample factor for the given component. Note that the subsample factor is the number of input pixels that contribute to each output pixel (ussually 2 for YCC).
Parameters:
component - The component being specified.
subsample - The subsampling factor being specified.

setQTable

public void setQTable(int tableNum,
                      JPEGQTable qTable)
Sets the coefficient quantization tables at index passed. tableNum must range in value from 0 - 3.
Parameters:
qtable - that will be used.
tableNum - the index of the table to be set.

setDCHuffmanTable

public void setDCHuffmanTable(int tableNum,
                              JPEGHuffmanTable huffTable)
Sets the DC Huffman coding table at index to the table provided.
Parameters:
huffTable - JPEGHuffmanTable that will be assigned to index tableNum.
tableNum - - the index of the table to be set.
Throws:
IllegalArgumentException - - thrown if the tableNum is out of range. Index must range in value from 0 - 3.

setACHuffmanTable

public void setACHuffmanTable(int tableNum,
                              JPEGHuffmanTable huffTable)
Sets the AC Huffman coding table at index to the table provided.
Parameters:
huffTable - JPEGHuffmanTable that will be assigned to index tableNum.
tableNum - - the index of the table to be set.
Throws:
IllegalArgumentException - - thrown if the tableNum is out of range. Index must range in value from 0 - 3.

setDCHuffmanComponentMapping

public void setDCHuffmanComponentMapping(int component,
                                         int table)
Sets the mapping between a component and it's DC Huffman Table.
Parameters:
component - The component to set the mapping for
table - The DC Huffman table to use for component

setACHuffmanComponentMapping

public void setACHuffmanComponentMapping(int component,
                                         int table)
Sets the mapping between a component and it's AC Huffman Table.
Parameters:
component - The component to set the mapping for
table - The AC Huffman table to use for component

setQTableComponentMapping

public void setQTableComponentMapping(int component,
                                      int table)
Sets the mapping between a component and it's Quantization Table.
Parameters:
component - The component to set the mapping for
table - The Quantization Table to use for component

setImageInfoValid

public void setImageInfoValid(boolean flag)
Set the flag indicating the validity of the table information in the ParamBlock. This is used to indicate if tables should be included when encoding.

setTableInfoValid

public void setTableInfoValid(boolean flag)
Set the flag indicating the validity of the image information in the ParamBlock. This is used to indicates if image data should be written when encoding.

setMarkerData

public void setMarkerData(int marker,
                          byte[][] data)
Sets the marker data to be written to the output data stream. This removes any existing marker data in the JPEParm object. This can be used to remove the default APP0 marker by calling it with data set to null.
Parameters:
marker - The marker to set the data for.
data - the new set of data to be written.

addMarkerData

public void addMarkerData(int marker,
                          byte[] data)
Appends 'data' to the array of byte[] associated with marker. This will result in additional instance of the marker being written (one for each byte[] in the array.).
Parameters:
marker - The marker to add and instance of.
data - the data to be written.

setRestartInterval

public void setRestartInterval(int restartInterval)
Set the MCUs per restart, or 0 for no restart markers.
Parameters:
restartInterval - number MCUs per restart marker.

setDensityUnit

public void setDensityUnit(int unit)
Set the pixel size units This value is copied into the APP0 marker (if that marker is written). This value isn't used by the JPEG code.
Parameters:
units - One of the DENSITY_UNIT_* values.

setXDensity

public void setXDensity(int density)
Set the horizontal pixel density This value is written into the APP0 marker. It isn't used by the JPEG code.
Parameters:
desnity - the horizontal pixel density, in units described by @see JPEGParam.getDensityUnit.

setYDensity

public void setYDensity(int density)
Set the vertical pixel density. This value is copied into the JFIF APP0 marker. It isn't used by the JPEG code.
Parameters:
density - The verticle pixel density, in units described by @see JPEGParam.getDensityUnit.

setQuality

public void setQuality(float quality,
                       boolean forceBaseline)
This creates new Quantization tables that replace the currently installed Quantization tables. It also updates the Component QTable mapping to the default for the current encoded COLOR_ID. The Created Quantization table varies from very high compression, very low quality, (0.0) to low compression, very high quality (1.0) based on the quality parameter.

At a quality level of 1.0 the table will be all 1's which will lead to no loss of data due to quantization (however chrominace subsampling, if used, and roundoff error in the DCT will still degrade the image some what).

This is a linear manipulation of the standard Chrominance Q-Table.

Some guidelines: 0.75 high quality
                 0.5  medium quality
                 0.25 low quality
Parameters:
quality - 0.0-1.0 setting of desired quality level.
forceBaseline - force baseline quantization table
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGHuffmanTable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Class JPEGHuffmanTable

java.lang.Object
  |
  +--com.sun.image.codec.jpeg.JPEGHuffmanTable
public class JPEGHuffmanTable
extends Object

A class to encapsulate a JPEG Huffman table.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Field Summary
static JPEGHuffmanTable | StdACChrominance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | StdACLuminance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | StdDCChrominance Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable | StdDCLuminance Standard Huffman table ( JPEG standard section K.3 )
Constructor Summary
JPEGHuffmanTable(short[] lengths, short[] symbols)
Creates a Huffman Table and initializes it.
Method Summary
short[] | getLengths() Return a copy of the array containing the number of symbols for each length in the Huffman table.
short[] | getSymbols() Return an array containing the Huffman symbols arranged by increasing length.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

StdDCLuminance

public static final JPEGHuffmanTable StdDCLuminance
Standard Huffman table ( JPEG standard section K.3 )

StdDCChrominance

public static final JPEGHuffmanTable StdDCChrominance
Standard Huffman table ( JPEG standard section K.3 )

StdACLuminance

public static final JPEGHuffmanTable StdACLuminance
Standard Huffman table ( JPEG standard section K.3 )

StdACChrominance

public static final JPEGHuffmanTable StdACChrominance
Standard Huffman table ( JPEG standard section K.3 )
Constructor Detail

JPEGHuffmanTable

public JPEGHuffmanTable(short[] lengths,
                        short[] symbols)
Creates a Huffman Table and initializes it.
Parameters:
lengths - lengths[k] = # of symbols with codes of length k bits; lengths[0] is ignored
symbols - symbols in order of increasing code length
Throws:
IllegalArgumentException - if the length of lengths is greater than 17
IllegalArgumentException - if the length of symbols is greater than 256
IllegalArgumentException - if any of the values in lengths or symbols is less than zero
Method Detail

getLengths

public short[] getLengths()
Return a copy of the array containing the number of symbols for each length in the Huffman table.
Returns:
A short array where array[k] = # of symbols in the table of length k. array[0] is unused

getSymbols

public short[] getSymbols()
Return an array containing the Huffman symbols arranged by increasing length. To make use of this array you must refer the the lengths array.
Returns:
A short array of Huffman symbols
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGImageDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Interface JPEGImageDecoder

public interface JPEGImageDecoder

This interface describes a JPEG data stream decoder. This decoder takes an InputStream that contains JPEG encoded image data. The JPEGImageDecoder will decode the JPEG image data according to the parameters set in a JPEGDecodeParam object. The resulting image data is returned in either a Raster or a BufferedImage.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

See Also:
JPEGCodec, JPEGDecoderParam, Raster, BufferedImage

Method Summary
BufferedImage | decodeAsBufferedImage() Decodes the current JPEG data stream.
Raster | decodeAsRaster() Decode the JPEG stream that was passed as part of construction.
InputStream | getInputStream() Get the input stream that decoding will occur from.
JPEGDecodeParam | getJPEGDecodeParam() Returns the JPEGDecodeParam object that resulted from the most recent decoding event.
void | setJPEGDecodeParam(JPEGDecodeParam jdp) Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data.

Method Detail

getJPEGDecodeParam

public JPEGDecodeParam getJPEGDecodeParam()
Returns the JPEGDecodeParam object that resulted from the most recent decoding event.

setJPEGDecodeParam

public void setJPEGDecodeParam(JPEGDecodeParam jdp)
Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data. This is ussually only needed for decoding abbreviated JPEG data streams.
Parameters:
jdp - JPEGDecodeParam object

getInputStream

public InputStream getInputStream()
Get the input stream that decoding will occur from.
Returns:
The stream that the decoder is currently assciated with.

decodeAsRaster

public Raster decodeAsRaster()
                      throws IOException,
                             ImageFormatException
Decode the JPEG stream that was passed as part of construction. The JPEG decompression will be performed according to the current settings of the JPEGDecodeParam object. For a tables only stream this will return null.
Returns:
Raster containg the image data. Colorspace and other pertinent information can be obtained from the JPEGDecodeParam object.
Throws:
ImageFormatException - if irregularities in the JPEG stream or an unknown condition is encountered.

decodeAsBufferedImage

public BufferedImage decodeAsBufferedImage()
                                    throws IOException,
                                           ImageFormatException
Decodes the current JPEG data stream. The result of decoding this InputStream is a BufferedImage the ColorModel associated with this BufferedImage is determined based on the encoded COLOR_ID of the JPEGDecodeParam object. For a tables only stream this will return null.
Returns:
BufferedImage containing the image data.
Throws:
ImageFormatException - if irregularities in the JPEG stream or an unknown condition is encountered.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGImageEncoder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Interface JPEGImageEncoder

public interface JPEGImageEncoder

JPEGImageEncoder encodes buffers of image data into JPEG data streams. Users of this interface are required to provide image data in a Raster or a BufferedImage, set the necessary parameters in the JPEGEncodeParams object and successfully open the OutputStream that is the destination of the encoded JPEG stream. The JPEGImageEncoder interface can encode image data into interchange, and abbreviated JPEG data streams that are written to the OutputStream provided to the encoder.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

See Also:
JPEGCodec, JPEGEncodeParam, Raster, BufferedImage, OutputStream

Method Summary
void | encode(BufferedImage bi) Encode a BufferedImage as a JPEG data stream.
void | encode(BufferedImage bi, JPEGEncodeParam jep) Encode a BufferedImage as a JPEG data stream.
void | encode(Raster ras) Encode a Raster as a JPEG data stream.
void | encode(Raster ras, JPEGEncodeParam jep) Encode a Raster as a JPEG data stream.
int | getDefaultColorId(ColorModel cm) Returns the 'default' encoded COLOR_ID for a given ColorModel.
JPEGEncodeParam | getDefaultJPEGEncodeParam(BufferedImage bi) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | getDefaultJPEGEncodeParam(int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
JPEGEncodeParam | getDefaultJPEGEncodeParam(Raster ras, int colorID) This is a factory method for creating JPEGEncodeParam objects.
JPEGEncodeParam | getJPEGEncodeParam() This returns a copy of the current JPEGEncodeParam object, if you want changes to affect the encoding process you must 'set' it back into the encoder (either through setJPEGEncodeParam or by providing the modified param object in the call to encode.
OutputStream | getOutputStream() Return the stream the Encoder is currenlt associated with.
void | setJPEGEncodeParam(JPEGEncodeParam jep) Set the JPEGEncodeParam object that is to be used for future encoding operations.

Method Detail

getOutputStream

public OutputStream getOutputStream()
Return the stream the Encoder is currenlt associated with.

setJPEGEncodeParam

public void setJPEGEncodeParam(JPEGEncodeParam jep)
Set the JPEGEncodeParam object that is to be used for future encoding operations. 'jep' is copied so changes will not be tracked, unless you call this method again.
Parameters:
jep - The JPEGEncodeParam object to use for future encodings.

getJPEGEncodeParam

public JPEGEncodeParam getJPEGEncodeParam()
This returns a copy of the current JPEGEncodeParam object, if you want changes to affect the encoding process you must 'set' it back into the encoder (either through setJPEGEncodeParam or by providing the modified param object in the call to encode.
Returns:
A copy of the current JPEGEncodeParam object

getDefaultJPEGEncodeParam

public JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
                                          throws ImageFormatException
This is a factory method for creating JPEGEncodeParam objects. The returned object will do a credible job of encoding the given BufferedImage.

encode

public void encode(BufferedImage bi)
            throws IOException,
                   ImageFormatException
Encode a BufferedImage as a JPEG data stream. Note, some color conversions may takes place. The current JPEGEncodeParam's encoded COLOR_ID should match the value returned by getDefaultColorID when given the BufferedImage's ColorModel.

If no JPEGEncodeParam object has been provided yet a default one will be created by calling getDefaultJPEGEncodeParam with bi.

Parameters:
bi - The BufferedImage to encode.

encode

public void encode(BufferedImage bi,
                   JPEGEncodeParam jep)
            throws IOException,
                   ImageFormatException
Encode a BufferedImage as a JPEG data stream. Note, some color conversions may takes place. The jep's encoded COLOR_ID should match the value returned by getDefaultColorID when given the BufferedImage's ColorModel.

This call also sets the current JPEGEncodeParam object. The given JPEGEncodeParam object will be used for this and future encodings. If jep is null then a new JPEGEncodeParam object will be created by calling getDefaultJPEGEncodeParam with bi.

Parameters:
bi - The BufferedImage to encode.
jep - The JPEGEncodeParam object used to control the encoding.

getDefaultColorId

public int getDefaultColorId(ColorModel cm)
Returns the 'default' encoded COLOR_ID for a given ColorModel. This method is not needed in the simple case of encoding Buffered Images (the library will figure things out for you). It can be useful for encoding Rasters. To determine what needs to be done to the image prior to encoding.
Parameters:
cm - The ColorModel to map to an jpeg encoded COLOR_ID.
Returns:
The default mapping of cm to a jpeg Color_ID note that in a few cases color conversion is required.

getDefaultJPEGEncodeParam

public JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
                                                 int colorID)
                                          throws ImageFormatException
This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the data contained in the Raster. Failure to do so may lead to either poor compression or poor image quality. If you don't understand much about JPEG it is strongly reccomended that you stick to the BufferedImage interfaces.

getDefaultJPEGEncodeParam

public JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
                                                 int colorID)
                                          throws ImageFormatException
This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the given number of bands, which should match the data being encoded. Failure to do so may lead to poor compression and/or poor image quality. If you don't understand much about JPEG it is strongly recommended that you stick to the BufferedImage interface.
Parameters:
numBands - the number of bands that will be encoded (max of four).
colorID - the COLOR_ID for the encoded data. This is used to set reasonable defaults in the parameter object. This must match the number of bands given.

getDefaultJPEGEncodeParam

public JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
                                          throws ImageFormatException
This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam. This will return a new JPEGEncodeParam object that is initialized from the JPEGDecodeParam object. All major pieces of information will be initialized from the DecodeParam (Markers, Tables, mappings).
Parameters:
jdp - The JPEGDecodeParam object to copy.

encode

public void encode(Raster ras)
            throws IOException,
                   ImageFormatException
Encode a Raster as a JPEG data stream. Note that no color conversion takes place. It is required that you match the Raster to the encoded COLOR_ID contained in the current JPEGEncodeParam object.

If no JPEGEncodeParam object has been provided yet a new JPEGEncodeParam object will be created by calling getDefaultJPEGEncodeParam with ras and COLOR_ID_UNKNOWN.

Parameters:
ras - The Raster to encode.

encode

public void encode(Raster ras,
                   JPEGEncodeParam jep)
            throws IOException,
                   ImageFormatException
Encode a Raster as a JPEG data stream. Note that no color conversion takes place. It is required that you match the Raster to the encoded COLOR_ID contained in the JPEGEncodeParam object. If jep is null a new JPEGEncodeParam object will be created by calling getDefaultJPEGEncodeParam with ras and COLOR_ID_UNKNOWN.
Parameters:
ras - The Raster to encode.
jep - The JPEGEncodeParam object used to control the encoding.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


JPEGQTable

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Class JPEGQTable

java.lang.Object
  |
  +--com.sun.image.codec.jpeg.JPEGQTable
public class JPEGQTable
extends Object

Class to encapsulate the JPEG quantization tables.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Field Summary
static JPEGQTable | StdChrominance This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
static JPEGQTable | StdLuminance This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order.
Constructor Summary
JPEGQTable(int[] table)
Constructs an quantization table from the array that was passed.
Method Summary
JPEGQTable | getScaledInstance(float scaleFactor, boolean forceBaseline) Returns a new Quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is 'true').
int[] | getTable() Returns the current quantization table as an array of ints in zig zag order.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

StdLuminance

public static final JPEGQTable StdLuminance
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order. The spec says that the values given produce "good" quality, and when divided by 2, "very good" quality.

StdChrominance

public static final JPEGQTable StdChrominance
This is the sample luminance quantization table given in the JPEG spec section K.1, expressed in zigzag order. The spec says that the values given produce "good" quality, and when divided by 2, "very good" quality.
Constructor Detail

JPEGQTable

public JPEGQTable(int[] table)
Constructs an quantization table from the array that was passed. The coefficents must be in zig-zag order. The array must be of length 64.
Parameters:
table - the quantization table (this is copied).
Method Detail

getTable

public int[] getTable()
Returns the current quantization table as an array of ints in zig zag order.
Returns:
A copy of the contained quantization table.

getScaledInstance

public JPEGQTable getScaledInstance(float scaleFactor,
                                    boolean forceBaseline)
Returns a new Quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is 'true').

Values less than one tend to improve the quality level of the table, and values greater than one degrade the quality level of the table.

Parameters:
scaleFactor - the multiplication factor for the table
forceBaseline - if true the values will be clamped to the range [1 .. 255]
Returns:
A new Q-Table that is a linear multiple of this Q-Table
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


TruncatedFileException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.image.codec.jpeg
Class TruncatedFileException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.image.codec.jpeg.TruncatedFileException
All Implemented Interfaces:
Serializable
public class TruncatedFileException
extends RuntimeException

Signals that a truncated file was detected. This object contains the Raster/BufferedImage that has the partially decoded image data in it. There is no indication of the portion of the Raster that may or may not be good.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Since:
JDK1.2
See Also:
JPEGImageDecoder, Serialized Form

Constructor Summary
TruncatedFileException(BufferedImage bi)
Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
TruncatedFileException(Raster ras)
Constructs an TruncatedFileException with the partially decoded Raster
Method Summary
BufferedImage | getBufferedImage() Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
Raster | getRaster() Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TruncatedFileException

public TruncatedFileException(BufferedImage bi)
Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
Parameters:
bi - the partially decoded BufferedImage (may be null).
Since:
JDK1.2

TruncatedFileException

public TruncatedFileException(Raster ras)
Constructs an TruncatedFileException with the partially decoded Raster
Parameters:
ras - the partially decoded Raster (may be null).
Since:
JDK1.2
Method Detail

getRaster

public Raster getRaster()
Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
Since:
JDK1.2

getBufferedImage

public BufferedImage getBufferedImage()
Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
Since:
JDK1.2
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
 PREV CLASS   NEXT CLASS | FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD | DETAIL:  FIELD | CONSTR | METHOD
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.


AWT Native Interface

The AWT Native Interface

The Key to Rendering to an AWT Canvas from Native Code

The new JavaTM 2 AWT Native Interface enables rendering libraries compiled to native code to draw directly to a Java Canvas drawing surface. This means that such libraries can be used without being converted to Java first and without significant impact on performance. An example illustrating how easy it is to use the AWT Native Interface is presented and discussed in this technical note.

Introduction

The definition of Java 2 Platform, Standard Edition includes JNI, the Java Native Interface. Most Java developers will never need to use it, but the interface is invaluable in certain situations because it provides the only way for Java byte code to interact directly with application code that has been compiled to the native machine instructions for the host microprocessor. JNI is most often used as an ``escape valve'' to enable access to platform functionality not yet supported by the Java programming language. For example, you could use JNI to integrate with native code that communicates with a peripheral device, such as a scanner, connected to a system via a USB port.

Of course, JNI is general enough to be used to access almost any sort of native library, regardless of whether the task to be accomplished could also be done using pure Java. The major penalty for using it is that code portability suffers, but this may be acceptable or even necessary for business or technical reasons.

Business reasons? Consider the situation where the legacy software you're trying to port to Java uses a third-party library for a critical set of operations. If you don't have source rights to this library and you can't convince the owner to provide a Java version, you may not be able to use it. Even if you do have the source, the effort needed to port a standard library to Java and test it may be too expensive to consider.

Another important reason for leaving the native code alone is related to performance. If you're dealing with a finely crafted piece of code, carefully tuned for performance over the course of years, you probably do not want to convert it to Java and risk a performance penalty. It's usually best to keep it intact until you're satisfied that the benefits of Java portability and code maintainability outweigh the expected performance difference.

A rendering library is a good example of a piece of native code that most developers would just as soon leave alone for performance reasons. Unfortunately, this is the very type of library that has been most difficult to integrate with Java code through JNI. The fundamental problem has been that the rendering code doesn't know where to draw! It needs access to information about a Java drawing surface (such as a handle to the underlying peer of a Canvas), but can't get it.

Until now, the Java platform has kept access to this information private -- ``private'' in the sense of undocumented, unsupported, and deprecated. The good news is that this situation will be remedied with the introduction of the ``AWT Native Interface'' in the Java 2 upgrade release (``Kestrel'') expected in early 2000. For the first time there will be an official way to obtain all the information you need to know about the peer of a Java Canvas so that you can draw directly to the Canvas from a native code library using the drawing routines provided by the operating system.

How It Works

In this section we'll describe the most common usage of the AWT Native Interface -- overriding the paint method to direct drawing operations to a native rendering library which then queries the Java VM to determine the information it needs in order to render. Note, however, that any native code may use the AWT Native Interface to learn about a target drawing surface, not just code in a paint method.

The first step in hooking up a native rendering library to a Java Canvas is to define a new class that extends Canvas and overrides the paint method. The Java system routes all drawing operations for a Canvas object through the paint method, as it does for all other GUI objects.

The new paint method, to be implemented in the native rendering library, must be declared as public native void , and the native library itself is loaded at runtime by including a call to System.loadLibrary( "myRenderingLib") in the static block of the class. ``myRenderingLib'' is the name we're using for the native shared library; for Solaris, the actual name for the library file on disk is libmyRenderingLib.so .

Here's a simple example of such a class:

import java.awt.*;
import java.awt.event.*;

public class MyCanvas extends Canvas {
    static {
        System.loadLibrary("myRenderingLib");
    }
    public native void paint(Graphics g);

    public static void main(String[] args) {
        Frame f = new Frame();
        f.setBounds(0, 0, 500, 110);
        f.add( new MyCanvas() );
        f.addWindowListener( new WindowAdapter() {
            public void windowClosing(WindowEvent ev) {
                System.exit(0);
            }
        } );
        f.show();
    }
}

Note that this class has a main method that can be used torun this code as an application for testing purposes.

The next step is to run the javah tool on the MyCanvas class file above to generate a C/C++ header file that describes the interface to the native paint method that Java expects to be used. javah is a standard tool included with the Java 2 SDK.

The final step the most interesting one is to write the native rendering method, with an interface that conforms to the header file that javah generated, and build it as a standard shared library (called myRenderingLib in the above example) by linking it, for Solaris, against the jre/lib/sparc/libjawt.so library. (For Windows, link against the jre/bin/jawt.dll library.) This code will call back to the Java virtual machine to get the drawing surface information it needs to access the MyCanvas peer. Once this information is available, the code can draw directly to MyCanvas using standard drawing routines supplied by the underlying operating system.

Here is sample source code for a native paint method designed for use in a Solaris X11-based drawing environment and a Java VM where the AWT Native Interface is present:

/*
 * Copyright 1999 Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 */

#include "MyCanvas.h"
#include "jawt_md.h"

/*
 * Class:     MyCanvas
 * Method:    paint
 * Signature: (Ljava/awt/Graphics;)V
 */
JNIEXPORT void JNICALL Java_MyCanvas_paint
(JNIEnv* env, jobject canvas, jobject graphics)
{
    JAWT awt;
    JAWT_DrawingSurface* ds;
    JAWT_DrawingSurfaceInfo* dsi;
    JAWT_X11DrawingSurfaceInfo* dsi_x11;
    jboolean result;
    jint lock;
    GC gc;

    short	i;
    char	*testString = "^^^ rendered from native code ^^^";

    /* Get the AWT */
    awt.version = JAWT_VERSION_1_3;
    if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
        printf("AWT Not found\n");
        return;
    }

    /* Get the drawing surface */
    ds = awt.GetDrawingSurface(env, canvas);
    if (ds == NULL) {
        printf("NULL drawing surface\n");
        return;
    }

    /* Lock the drawing surface */
    lock = ds->Lock(ds);
    if((lock & JAWT_LOCK_ERROR) != 0) {
        printf("Error locking surface\n");
        awt.FreeDrawingSurface(ds);
        return;
    }

    /* Get the drawing surface info */
    dsi = ds->GetDrawingSurfaceInfo(ds);
    if (dsi == NULL) {
        printf("Error getting surface info\n");
        ds->Unlock(ds);
        awt.FreeDrawingSurface(ds);
        return;
    }

    /* Get the platform-specific drawing info */
    dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;

    /* Now paint */
    gc = XCreateGC(dsi_x11->display, dsi_x11->drawable, 0, 0);
    XSetBackground(dsi_x11->display, gc, 0);
    for (i=0; i<36;i++) {="{" XSetForeground(dsi_x11-="XSetForeground(dsi_x11-">display, gc, 10*i);
       XFillRectangle(dsi_x11->display, dsi_x11->drawable, gc,
                       10*i, 5, 90, 90);
    }
    XSetForeground(dsi_x11->display, gc, 155);
    XDrawImageString(dsi_x11->display, dsi_x11->drawable, gc,
                100, 110, testString, strlen(testString));
    XFreeGC(dsi_x11->display, gc);

    /* Free the drawing surface info */
    ds->FreeDrawingSurfaceInfo(dsi);

    /* Unlock the drawing surface */
    ds->Unlock(ds);

    /* Free the drawing surface */
    awt.FreeDrawingSurface(ds);
}

The key data structure here is JAWT , which is defined in jawt.h (included by jawt_md.h) ; it provides access to all the information the native code needs to get the job done. The first part of the native method is boilerplate: it populates the JAWT structure, gets a JAWT_DrawingSurface structure, locks the surface (only one drawing engine at a time, please!), then gets a JAWT_DrawingSurfaceInfo structure that contains a pointer (in the platformInfo field) to the necessary platform-specific drawing information. It also includes the bounding rectangle of the drawing surface and the current clipping region.

The structure of the information pointed to by platformInfo is defined in a machine-dependent header file called jawt_md.h. For Solaris/X11 drawing, it includes information about the X11 display and X11 drawable associated with MyCanvas. After the drawing operations are completed, there is more boilerplate code as JAWT_DrawingSurfaceInfo is freed and JAWT_DrawingSurface is unlocked and freed.

The corresponding code for the Windows platform would be structured similarly, but would include the version of jawt_md.h for Windows 32 and the structure located in the platformInfo field of drawing surface info would be cast as a JAWT_Win32DrawingSurfaceInfo* . And, of course, the actual drawing operations would need to be changed to those appropriate for the Windows platform.

Summary

The ability to draw directly into a Java Canvas from a native code library is extremely useful for developers planning to migrate a legacy software system to Java, especially one that includes a high-performance rendering engine. It makes it much easier to migrate in stages, leaving performance-sensitive rendering code alone, while other less-sensitive portions of code are converted to Java. The result can be a modern Java-centric application, providing the benefit of portability and development efficiency, but one that does not sacrifice an investment in performance of a key piece of native code.

References

The definitive reference to the Java Native Interface is The Java Native Interface: Programmer's Guide and Specification by Sheng Liang of Sun Microsystems. This book was published in June 1999 by Addison-Wesley. The ISBN is 0-201-32577-2.

Appendix

Header Files for jawt.h and jawt_md.h

jawt.h

/*
 * @(#)jawt.h	1.2 99/05/27
 *
 * Copyright 1999 by Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

#ifndef _JAVASOFT_JAWT_H_
#define _JAVASOFT_JAWT_H_

#include "jni.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * AWT native interface (new in JDK 1.3)
 *
 * The AWT native interface allows a native C or C++ application a means
 * by which to access native structures in AWT.  This is to facilitate moving
 * legacy C and C++ applications to Java and to target the needs of the
 * community who, at present, wish to do their own native rendering to canvases
 * for performance reasons.  Standard extensions such as Java3D also require a
 * means to access the underlying native data structures of AWT.
 *
 * There may be future extensions to this API depending on demand.
 *
 * A VM does not have to implement this API in order to pass the JCK.
 * It is recommended, however, that this API is implemented on VMs that support
 * standard extensions, such as Java3D.
 *
 * Since this is a native API, any program which uses it cannot be considered
 * 100% pure java.
 */

/*
 * AWT Native Drawing Surface (JAWT_DrawingSurface).
 *
 * For each platform, there is a native drawing surface structure.  This
 * platform-specific structure can be found in jawt_md.h.  It is recommended
 * that additional platforms follow the same model.  It is also recommended
 * that VMs on Win32 and Solaris support the existing structures in jawt_md.h.
 *
 *******************
 * EXAMPLE OF USAGE:
 *******************
 *
 * In Win32, a programmer wishes to access the HWND of a canvas to perform
 * native rendering into it.  The programmer has declared the paint() method
 * for their canvas subclass to be native:
 *
 *
 * MyCanvas.java:
 *
 * import java.awt.*;
 *
 * public class MyCanvas extends Canvas {
 *
 *     static {
 *         System.loadLibrary("mylib");
 *     }
 *
 *     public native void paint(Graphics g);
 * }
 *
 *
 * myfile.c:
 *
 * #include "jawt_md.h"
 * #include
 *
 * JNIEXPORT void JNICALL
 * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
 * {
 *     JAWT awt;
 *     JAWT_DrawingSurface* ds;
 *     JAWT_DrawingSurfaceInfo* dsi;
 *     JAWT_Win32DrawingSurfaceInfo* dsi_win;
 *     jboolean result;
 *     jint lock;
 *
 *     // Get the AWT
 *     awt.version = JAWT_VERSION_1_3;
 *     result = JAWT_GetAWT(env, &awt);
 *     assert(result != JNI_FALSE);
 *
 *     // Get the drawing surface
 *     ds = awt.GetDrawingSurface(env, canvas);
 *     assert(ds != NULL);
 *
 *     // Lock the drawing surface
 *     lock = ds->Lock(ds);
 *     assert((lock & JAWT_LOCK_ERROR) == 0);
 *
 *     // Get the drawing surface info
 *     dsi = ds->GetDrawingSurfaceInfo(ds);
 *
 *     // Get the platform-specific drawing info
 *     dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
 *
 *     //////////////////////////////
 *     // !!! DO PAINTING HERE !!! //
 *     //////////////////////////////
 *
 *     // Free the drawing surface info
 *     ds->FreeDrawingSurfaceInfo(dsi);
 *
 *     // Unlock the drawing surface
 *     ds->Unlock(ds);
 *
 *     // Free the drawing surface
 *     awt.FreeDrawingSurface(ds);
 * }
 *
 */

/*
 * JAWT_Rectangle
 * Structure for a native rectangle.
 */
typedef struct jawt_Rectangle {
    jint x;
    jint y;
    jint width;
    jint height;
} JAWT_Rectangle;

struct jawt_DrawingSurface;

/*
 * JAWT_DrawingSurfaceInfo
 * Structure for containing the underlying drawing information of a component.
 */
typedef struct jawt_DrawingSurfaceInfo {
    /*
     * Pointer to the platform-specific information.  This can be safely
     * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
     * JAWT_X11DrawingSurfaceInfo on Solaris.  See jawt_md.h for details.
     */
    void* platformInfo;
    /* Cached pointer to the underlying drawing surface */
    struct jawt_DrawingSurface* ds;
    /* Bounding rectangle of the drawing surface */
    JAWT_Rectangle bounds;
    /* Number of rectangles in the clip */
    jint clipSize;
    /* Clip rectangle array */
    JAWT_Rectangle* clip;
} JAWT_DrawingSurfaceInfo;

#define JAWT_LOCK_ERROR                 0x00000001
#define JAWT_LOCK_CLIP_CHANGED          0x00000002
#define JAWT_LOCK_BOUNDS_CHANGED        0x00000004
#define JAWT_LOCK_SURFACE_CHANGED       0x00000008

/*
 * JAWT_DrawingSurface
 * Structure for containing the underlying drawing information of a component.
 * All operations on a JAWT_DrawingSurface MUST be performed from the same
 * thread as the call to GetDrawingSurface.
 */
typedef struct jawt_DrawingSurface {
    /* Cached reference to the Java environment of the calling thread */
    JNIEnv* env;
    /* Cached reference to the target object */
    jobject target;
    /*
     * Lock the surface of the target component for native rendering.
     * When finished drawing, the surface must be unlocked with
     * Unlock().  This function returns a bitmask with one or more of the
     * following values:
     *
     * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
     * be locked.
     *
     * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
     *
     * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
     *
     * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
     */
    jint (JNICALL *Lock)
        (struct jawt_DrawingSurface* ds);
    /*
     * Get the drawing surface info.
     * The value returned may be cached, but the values may change if
     * additional calls to Lock() or Unlock() are made.
     * Lock() must be called before this can return a valid value.
     * Returns NULL if an error has occurred.
     * When finished with the returned value, FreeDrawingSurfaceInfo must be
     * called.
     */
    JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
        (struct jawt_DrawingSurface* ds);
    /*
     * Free the drawing surface info.
     */
    void (JNICALL *FreeDrawingSurfaceInfo)
        (JAWT_DrawingSurfaceInfo* dsi);
    /*
     * Unlock the drawing surface of the target component for native rendering.
     */
    void (JNICALL *Unlock)
        (struct jawt_DrawingSurface* ds);
} JAWT_DrawingSurface;

/*
 * JAWT
 * Structure for containing native AWT functions.
 */
typedef struct jawt {
    /*
     * Version of this structure.  This must always be set before
     * calling JAWT_GetAWT()
     */
    jint version;
    /*
     * Return a drawing surface from a target jobject.  This value
     * may be cached.
     * Returns NULL if an error has occurred.
     * Target must be a java.awt.Canvas.
     * FreeDrawingSurface() must be called when finished with the
     * returned JAWT_DrawingSurface.
     */
    JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
        (JNIEnv* env, jobject target);
    /*
     * Free the drawing surface allocated in GetDrawingSurface.
     */
    void (JNICALL *FreeDrawingSurface)
        (JAWT_DrawingSurface* ds);
} JAWT;

/*
 * Get the AWT native structure.  This function returns JNI_FALSE if
 * an error occurs.
 */
_JNI_IMPORT_OR_EXPORT_
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);

#define JAWT_VERSION_1_3 0x00010003

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* !_JAVASOFT_JAWT_H_ */

jawt_md.h (Solaris/X11 version)

/*
 * @(#)jawt_md.h	1.2 99/05/27
 *
 * Copyright 1999 by Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_

#include
#include
#include
#include "jawt.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * X11-specific declarations for AWT native interface.
 * See notes in jawt.h for an example of use.
 */
typedef struct jawt_X11DrawingSurfaceInfo {
    Drawable drawable;
    Display* display;
    VisualID visualID;
    Colormap colormapID;
    int depth;
} JAWT_X11DrawingSurfaceInfo;

#ifdef __cplusplus
}
#endif

#endif /* !_JAVASOFT_JAWT_MD_H_ */

jawt_md.h (Windows 32 version)

/*
 * @(#)jawt_md.h	1.2 99/05/27
 *
 * Copyright 1999 by Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_

#include
#include "jawt.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Win32-specific declarations for AWT native interface.
 * See notes in jawt.h for an example of use.
 */
typedef struct jawt_Win32DrawingSurfaceInfo {
    /* Native window, DDB, or DIB handle */
    union {
        HWND hwnd;
        HBITMAP hbitmap;
        void* pbits;
    };
    /*
     * This HDC should always be used instead of the HDC returned from
     * BeginPaint() or any calls to GetDC().
     */
    HDC hdc;
    HPALETTE hpalette;
} JAWT_Win32DrawingSurfaceInfo;

#ifdef __cplusplus
}
#endif

#endif /* !_JAVASOFT_JAWT_MD_H_ */

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun


AWT Enhancements

Java

AWT Enhancements in the JavaTM 2 SDK, v1.3

 Documentation Contents
Version 1.3 of the Java 2 SDK includes the following AWT enhancements:
Multiple Monitor Support
New Class java.awt.Robot
New Event Masks for PaintEvents and InvocationEvents
Paint Coalescing
Printing API Enhancements
New Event Type for Tracking Changes to Component Hierarchies
AWT Native Interface
Multiple Monitor Support

You can now render on multiple screens by creating Frame, JFrame, Window, or JWindow objects with the GraphicsConfiguration of the target GraphicsDevice.

The new Frame constructor, Frame(GraphicsConfiguration), enables creation of a Frame object on a different screen device.

The new Window constructor, Window(Window, GraphicsConfiguration), constructs a new invisible window with the specified window as its owner and the GraphicsConfiguration of a screen device.

The new GraphicsConfiguration getBounds method returns the bounds of the GraphicsConfiguration in device coordinates. If you have a virtual device, then the device coordinates returned from getBounds are virtual device coordinates.

Finally, the new Component getGraphicsConfiguration method returns the GraphicsConfiguration with which the Component was created.

In a virtual device configuration consisting of more than one physical screen device, the GraphicsConfiguration objects' coordinates are relative to the virtual coordinate system. For this reason, virtual coordinates must be used when calling the setLocation method of a Frame or Window. Similarly, calling getBounds of a GraphicsConfiguration in a virtual device environment returns virtual device coordinates.

The following code sample creates a JFrame object for each GraphicsConfiguration on each screen device in the GraphicsEnvironment. It offsets the coordinates of the intended location of the JFrame with the bounds of the GraphicsConfiguration to ensure that the JFrame appears on the screen of the specified GraphicsConfiguration.

        GraphicsEnvironment ge = GraphicsEnvironment.
                                 getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j
    If the bounds of a GraphicsConfiguration is not
    taken into account in this sample, a JFrame
    would appear at location (i*50, i*60) on the primary screen,
    which might be different than the screen of the specified
    GraphicsConfiguration.

    For more information on how the Java 2D API supports
    multi-screen environments, see
    Rendering in a Multi-Screen Environment in the
    Programmer's Guide to the
    Java 2D API.
New Class java.awt.Robot
New class java.awt.Robot has been added to the JavaTM 2 Platform. The Robot API is designed to make automated AWT and Swing testing possible. The Robot API allows code written in the Java programming language to generate low-level native mouse and keyboard input events. Because the events are generated at the operating system level (as opposed to the Java event queue or component level), they are indistinguishable from real user input to the rest of the AWT (both the native and Java-language portions).

Though designed to improve testability, the Robot API also provides other benefits:

  • Accessibility enabled applications will be able to give more feedback. For example, if the user acts on a screen object using voice commands, the mouse pointer can be moved to indicated the object being manipulated.
  • Enables the creation of computer-based training (CBT) and other demo type Java applications.

New Event Masks for PaintEvents and InvocationEvents

The new final static fields PAINT_EVENT_MASK and INVOCATION_EVENT_MASK have been added to class AWTEvent. These fields are now available for use by addAWTEventListener() to allow client applications to listen for paint events and invocation events.

Paint Coalescing

Painting performance has been enhanced through the implementation of paint coalescing. Areas that require repainting are now coalesced into a single, non-rectangular repaint area as they are posted to the event queue. This has the effect of batching repaints, executing multiple repaints simultaneously. Previously, paint events were queued up and executed in succession, even when the repaint areas overlapped.

Printing API Enhancements

Two new classes have been added to package java.awt.print:
  • JobAttributes
  • PageAttributes
Class JobAttributes controls properties of a print job such as destination, number of copies, page ranges, etc. Class PageAttributes controls attributes of a printed page such as paper size, orientation, print quality, etc.

These classes are used by a new method in class java.awt.Toolkit:

getPrintJob(Frame, String, JobAttributes, PageAttributes)
See Java AWT: Printing for more information on the printing API.

Support for using attributes will be added to the printing API in a future release of the Java platform.

New Event Type for Tracking Changes to Component Hierarchies

Several new classes have been added to the Java 2 Platform to provide a standardized way for components to track changes to their component hierarchy. The new API is a preferred alternative to that provided by javax.swing.event.AncestorEvent
  • displayability - whether a component has a peer
  • show state - whether a component is showing on the screen
  • ancestors additions to and deletions from the hieracrhy
  • ancestor resizes
  • ancestor moves
The new classes and interfaces implementing the new event types are:
  • java.awt.event.HierarchyEvent
  • java.awt.event.HierarchyListener
  • java.awt.event.HierarchyBoundsListener
  • java.awt.event.HierarchyBoundsAdapter
The following methods have been added to java.awt.Component:
  • addHierarchyListener
  • removeHierarchyListener
  • addHierarchyBoundsListener
  • removeHierarchyBoundsListener
  • processHierarchyEvent
  • processHierarchyBoundsEvent
The following fields have been added to java.awt.AWTEvent:
  • HIERARCHY_EVENT_MASK
  • HIERARCHY_BOUNDS_EVENT_MASK
Class java.awt.AWTEventMulticaster now implements interfaces HierarchyListener and HierarchyBoundsListener. In addition, it has the following new methods:
  • hierarchyChanged
  • ancestorMoved
  • ancestorResized
  • add(HierarchyListener, HierarchyListener)
  • add(HierarchyBoundsListener, HierarchyBoundsListener)
  • remove(HierarchyListener, HierarchyListener)
  • remove(HierarchyBoundsListener, HierarchyBoundsListener)

AWT Native Interface

The AWT Native Interface is a new interface for integrating native rendering engines with the Java 2 platform. The AWT Native Interface lets you design UIs with natively rendered components for best rendering performance.

In the most common usage, four steps are involved:

  1. Define a class that extends a Canvas .
  2. Declare the paint method as native and load its shared library in the static block.
  3. Use javah to generate a C/C++ header file for the native paint method. (See javah documentation for Win32 and Solaris platforms.)
  4. Write the native paint method and build it as a shared library.
Header files associated with the AWT Native Interface are in the SDK's include directory. They are
  • include/jawt.h on both Win32 and SolarisTM platforms
  • include/win32/jawt_md.h in the Win32 SDK only
  • include/solaris/jawt_md.h on Solaris SDK only
These headers are not part of the official specification of the Java 2 Platform. The headers are provided as a convenience to developers who want a standardized way to access native drawing functionality.

For further information and sample code, see The AWT Native Interface.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-awt@java.sun.com 		Sun


Delegation Event Model

Java AWT: Delegation Event Model

Last updated: February 3, 1997

Purpose

 This document explains the rationale behind introducing a new event model into the AWT and describes specifically how the new model maps to the AWT API. This new model has also been adopted by the JavaBeans architecture for general event processing and is described at a high level in the JavaBeans Specification document.

The 1.0 Event Model

 The model for event processing in version 1.0 of the AWT is based on inheritance. In order for a program to catch and process GUI events, it must subclass GUI components and override either action() or handleEvent() methods. Returning "true" from one of these methods consumes the event so it is not processed further; otherwise the event is propagated sequentially up the GUI hierarchy until either it is consumed or the root of the hierarchy is reached. The result of this model is that programs have essentially two choices for structuring their event-handling code:
  1. Each individual component can be subclassed to specifically handle its target events. The result of this is a plethora of classes.
  2. All events for an entire hierarchy (or subset thereof) can be handled by a particular container; the result is that the container's overridden action() or handleEvent() method must contain a complex conditional statement in order to process the events.

Issues with the 1.0 Event Model

While the above model works fine for small applets with simple interfaces, it does not scale well for larger java programs for the following reasons:
  • The requirement to subclass a component in order make any real use of its functionality is cumbersome to developers; subclassing should be reserved for circumstances where components are being extended in some functional or visual way.
  • The inheritance model does not lend itself well to maintaining a clean separation between the application model and the GUI because application code must be integrated directly into the subclassed components at some level.
  • Since ALL event types are filtered through the same methods, the logic to process the different event types (and possibly the event targets in approach #2) is complex and error-prone. It is not uncommon for programs to have perplexing bugs that are the result of returning an incorrect result (true or false) from the handleEvent() method. This becomes an even greater problem as new event types are added to the AWT; if the logic of existing handleEvent() methods isn't set up to deal properly with unknown types, programs could potentially break in very unpredictable ways.
  • There is no filtering of events. Events are always delivered to components regardless of whether the components actually handle them or not. This is a general performance problem, particularly with high-frequency type events such as mouse moves.
  • For many components, the action() method passes a String parameter which is equivalent to either the label of the component (Button, MenuItem) or the item selected (List, Choice). For programs which use approach #2, this often leads to poor coding and unwieldy string-compare logic that doesn't localize well.

The Delegation Model

 Version 1.1 of the JavaTM platform introduced a new delegation-based event model in AWT in order to:
  • Resolve the problems mentioned previously
  • Provide a more robust framework to support more complex java programs.

Design Goals

 The primary design goals of the new model in the AWT are the following:
  • Simple and easy to learn
  • Support a clean separation between application and GUI code
  • Facilitate the creation of robust event handling code which is less error-prone (strong compile-time checking)
  • Flexible enough to enable varied application models for event flow and propagation
  • For visual tool builders, enable run-time discovery of both events that a component generates as well as the events it may observe
  • Support backward binary compatibility with the old model

Note: These goals are described from the particular perspective of the AWT. Since this model has also been designed to accommodate the JavaBeans architecture, the design goals from the JavaBeans perspective are described in the "Events" section of the JavaBeans Specification and may vary slightly from these goals.

Delegation Model Overview

Event types are encapsulated in a class hierarchy rooted at java.util.EventObject. An event is propagated from a "Source" object to a "Listener" object by invoking a method on the listener and passing in the instance of the event subclass which defines the event type generated.

A Listener is an object that implements a specific EventListener interface extended from the generic java.util.EventListener. An EventListener interface defines one or more methods which are to be invoked by the event source in response to each specific event type handled by the interface.

An Event Source is an object which originates or "fires" events. The source defines the set of events it emits by providing a set of set<EventType>Listener (for single-cast) and/or add<EventType>Listener (for mult-cast) methods which are used to register specific listeners for those events.

In an AWT program, the event source is typically a GUI component and the listener is commonly an "adapter" object which implements the appropriate listener (or set of listeners) in order for an application to control the flow/handling of events. The listener object could also be another AWT component which implements one or more listener interfaces for the purpose of hooking GUI objects up to each other.

Event Hierarchy

Events are no longer represented by a single Event class (like java.awt.Event) with numeric ids, but instead by a hierarchy of event classes. Each event class is defined by the data representing that event type or related group of events types.

Since a single event class may be used to represent more than one event type (i.e. MouseEvent represents mouse up, mouse down, mouse drag, mouse move, etc), some event classes may also contain an "id" (unique within that class) which maps to its specific event types.

The event classes contain no public fields; the data in the event is completely encapsulated by proper get<Attr>()/set<Attr>() methods (where set<Attr>() only exists for attributes on an event that could be modified by a listener).

Although these are the concrete set defined by the AWT, programs are free to define their own event types by subclassing either java.util.EventObject or one of the AWT event classes. Programs should choose event ID values which are greater than the constant:

        java.awt.AWTEvent.RESERVED_ID_MAX

Low-level vs. Semantic Events

The AWT provides two conceptual types of events: low-level and semantic.

A low-level event is one which represents a low-level input or window-system occurrence on a visual component on the screen. The low-level event classes defined by the AWT are as follows:

    java.util.EventObject

        java.awt.AWTEvent
            java.awt.event.ComponentEvent (component resized, moved, etc.)

            java.awt.event.FocusEvent (component got focus, lost focus)

            java.awt.event.InputEvent

                java.awt.event.KeyEvent (component got key-press, key-release, etc.)

                java.awt.event.MouseEvent (component got mouse-down, mouse-move, etc.)

            java.awt.event.ContainerEvent

            java.awt.event.WindowEvent

Semantic events are defined at a higher-level to encapsulate the semantics of a user interface component's model. The semantic event classes defined by the AWT are as follows:

    java.util.EventObject

        java.awt.AWTEvent

        java.awt.event.ActionEvent ("do a command")

        java.awt.event.AdjustmentEvent ("value was adjusted")

        java.awt.event.ItemEvent ("item state has changed")

        java.awt.event.TextEvent ("the value of the text object changed")

Note that these semantic events are not tied to specific screen-based component classes, but may apply across a set of components which implement a similar semantic model. For example, a Button object will fire an "action" event when it is pressed, a List object will fire an "action" event when an item is double-clicked, a MenuItem will fire an "action" event when it was selected from a menu, and a non-visual Timer object might fire an "action" when its timer goes off (the latter is a hypothetical case).

Event Listeners

An EventListener interface will typically have a separate method for each distinct event type the event class represents. So in essence, particular event semantics are defined by the combination of an Event class paired with a particular method in an EventListener. For example, the FocusListener interface defines two methods, focusGained() and focusLost(), one for each event type that FocusEvent class represents.

The API attempts to define a balance between providing a reasonable granularity of Listener interface types and not providing a separate interface for every single event type.

The low-level listener interfaces defined by the AWT are as follows:

    java.util.EventListener

        java.awt.event.ComponentListener

        java.awt.event.ContainerListener

        java.awt.event.FocusListener

        java.awt.event.KeyListener

        java.awt.event.MouseListener

        java.awt.event.MouseMotionListener

        java.awt.event.WindowListener

The semantic listener interfaces defined by the AWT are as follows:

    java.util.EventListener

        java.awt.event.ActionListener

        java.awt.event.AdjustmentListener

        java.awt.event.ItemListener

        java.awt.event.TextListener

Event Sources

Because the events fired by an event source are defined by particular methods on that object, it is completely clear from the API documentation (as well as by using run-time introspection techniques) exactly which events an object supports.

All AWT event sources support a multicast model for listeners. This means that multiple listeners can be added and removed from a single source. The API makes no guarantees about the order in which the events are delivered to a set of registered listeners for a given event on a given source. Additionally, any event which allows its properties to be modified (via setXXX() methods) will be explicitly copied such that each listener receives a replica of the original event. If the order in which events are delivered to listeners is a factor for your program, you should chain the listeners off a single listener which is registered on the source (the fact that the event data is encapsulated in a single object makes propagating the event extremely simple).

Event delivery is synchronous (as with 1.0's handleEvent()), however programs should not make the assumption that the delivery of an event to a set of listeners will occur on the same thread.

Once again, a distinction is drawn between low-level and semantic events. For low-level events, the source will be one of the visual component classes (Button, Scrollbar, etc) since the event is tightly bound to the actual component on the screen. The low-level listeners are defined on the following components:

  • java.awt.Component
    addComponentListener(ComponentListener l)

    addFocusListener(FocusListener l)

    addKeyListener(KeyListener l)

    addMouseListener(MouseListener l)

    addMouseMotionListener(MouseMotionListener l)
  • java.awt.Container
    addContainerListener(ContainerListener l)
  • java.awt.Dialog
    addWindowListener(WindowListener l)
  • java.awt.Frame
    addWindowListener(WindowListener l)

For semantic events, the source is typically a higher-level interface representing the semantic model (and this higher-level interface is commonly `implemented' by components using the model). Following are the semantic listeners defined for AWT components:

  • java.awt.Button
    addActionListener(ActionListener l)
  • java.awt.Choice (implements java.awt.ItemSelectable)
    addItemListener(ItemListener l)
  • java.awt.Checkbox (implements java.awt.ItemSelectable)
    addItemListener(ItemListener l)
  • java.awt.CheckboxMenuItem (implements java.awt.ItemSelectable)
    addItemListener(ItemListener l)
  • java.awt.List (implements java.awt.ItemSelectable)
    addActionListener(ActionListener l)

    addItemListener(ItemListener l)
  • java.awt.MenuItem
    addActionListener(ActionListener l)
  • java.awt.Scrollbar (implements java.awt.Adjustable)
    addAdjustmentListener(AdjustmentListener l)
  • java.awt.TextArea
    addTextListener(TextListener l)
  • java.awt.TextField
    addActionListener(ActionListener l)

    addTextListener(TextListener l)

Adapters

Since many of the EventListener interfaces are designed to listen to multiple event subtypes (i.e. the MouseListener listens to mouse-down, mouse-up, mouse-enter, etc.), the AWT will provide a a set of abstract "adapter" classes, one which implements each listener interface. This will allow programs to easily subclass the Adapters and override ONLY the methods representing event types they are interested in.

The Adapter classes provided by AWT are as follows:

    java.awt.event.ComponentAdapter

    java.awt.event.ContainerAdapter

    java.awt.event.FocusAdapter

    java.awt.event.KeyAdapter

    java.awt.event.MouseAdapter

    java.awt.event.MouseMotionAdapter

    java.awt.event.WindowAdapter

Note: There are no default Adapters provided for the semantic listeners, since each of those only contain a single method and an adapter would provide no real value.

Filtering for Performance

One of the great benefits of the new model is that since listeners are registered to handle specific event types, it's relatively easy for the toolkit to filter the events and deliver ONLY the events a component is interested in. This was not true with the old model!. Filtering should improve performance, especially with high frequency type events, such as mouse-moves.

All platforms should see some performance improvement from reduced event traffic, but the Solaris implementation should gain exceptional improvement since it's a network-based window system.

Code Example

Following is some sample code that uses the new model:

import java.awt.*;
import java.awt.event.*;

public class App {
    public void search() {
        /* do search operation ...*/
        System.out.println("Searching...");
    }
    public void sort() {
        /* do sort operation ...*/
        System.out.println("Sorting....");
    }

    static public void main(String args[]) {
       App app = new App();
       GUI gui = new GUI(app);
    }
}

class Command implements ActionListener  {
    static final int SEARCH = 0;
    static final int SORT = 1;
    int id;
    App app;

    public Command(int id, App app) {
        this.id = id;
        this.app = app;
    }

    public void actionPerformed(ActionEvent e) {
        switch(id) {
          case SEARCH:
            app.search();
            break;
          case SORT:
            app.sort();
            break;
        }
    }
}

class GUI {

    public GUI(App app) {
        Frame f = new Frame();
        f.setLayout(new FlowLayout());

        Command searchCmd = new Command(Command.SEARCH, app);
        Command sortCmd = new Command(Command.SORT, app);

        Button b;
        f.add(b = new Button("Search"));
        b.addActionListener(searchCmd);
        f.add(b = new Button("Sort"));
        b.addActionListener(sortCmd);

        List l;
        f.add(l = new List());
        l.add("Alphabetical");
        l.add("Chronological");
        l.addActionListener(sortCmd);
        f.pack();

        f.show();
    }
}

Note in particular the following differences between this example and how this would have been implemented in the old model:

  • The application code/logic is completely separate from the GUI. The GUI can be modified (or alternatives provided) without touching the application-specific code. This benefit may not be as apparent from this over-simplified case. However, as applications get larger and more complex, this becomes extremely important.
  • Absolutely no subclassing of AWT components is required.
  • ONLY the action events are delivered to this program; in the old model all other events would have also been delivered even though they performed no required function.
  • This code is not necessarily leaner than the code that would have been required for the old event model. This is mostly due to the requirement for writing the adapter class which listens to the events and dispatches them into application commands appropriately. The adapter classes are required because the Java language supports neither method references nor closures. In this context, it was believed that using interfaces/adapters would be the most type-safe option for making connections between objects. This code could be condensed by using the new JDK1.1 "Inner classes" java language feature.

Handling Events in Extended Components

For Java programs which are extending component classes via subclassing, it would be burdensome to require the registration of separate listener objects to respond to events. Therefore, for this case, the AWT defines that each component provide specific protected methods (that can be overridden by subclasses) which actually dispatch the events to listeners if they exist. This way a subclass can simply override one of these methods in order to process an event.

In order to make this as flexible as possible, this event processing capability is provided in two levels. The first is a single method on all components:

     protected void processEvent(AWTEvent)
All events for a component are first funneled through this method so that subclasses can choose to handle all events in a single place (similar to the 1.0 model's "handleEvent" with the main difference being that events are NOT propagated up the containment hierarchy in the new model).

The second option for processing events is provided at the event class level; there is a separate method for each class of event handled by that component:

     protected void processEventClass(EventClass)
For example, the java.awt.List component has the following event-class processing methods:
     protected void processActionEvent(ActionEvent e)

     protected void processItemEvent(ItemEvent e)
By default, the single processEvent method will invoke the proper event-class processing method. The event-class processing method by default will invoke any listeners which are registered. It's important to remember that these methods perform a critical function in the event processing for an AWT component and so if you override them you should remember to call the superclass's method somewhere within your own!

Selecting for Event Types

One of the goals of the listener model is to improve performance by NOT delivering events which components are not interested in. By default, if a listener type is not registered on a component, then those events will NOT be delivered and these processing methods will therefore NOT be called. So if you are using this extension mechanism for event-handling, you'll need to select for the specific types of events your component wishes to receive (in case no listener is registered). This can be done by using the following method on java.awt.Component:
     protected final void enableEvents(long eventsToEnable)
The parameter to this method is a bitwise mask of the event types you wish to enable. The event masks are defined in java.awt.AWTEvent. Note that changing this mask will not affect the delivery of events to listeners -- it only controls the delivery to the component's processing methods. The bottom line is that the set of events which are delivered to processEvent() is defined by the union of event types which have listeners registered and event types explicitly turned on via enableEvents().

Example using Extension Mechanism

Following is an example of how this extension mechanism may be used. For Example, if a subclass of java.awt.Canvas wishes to render some visual feedback when it receives/loses keyboard focus, it could do the following.

    public class TextCanvas extends Canvas {
      boolean haveFocus = false;

      public TextCanvas() {
          enableEvents(AWTEvent.FOCUS_EVENT_MASK); // ensure we get focus events
          ...
      }
      protected void processFocusEvent(FocusEvent e) {
          switch(e.getID()) {
            case FocusEvent.FOCUS_GAINED:
              haveFocus = true;
              break;
            case FocusEvent.FOCUS_LOST:
              haveFocus = false;
          }
          repaint(); // need to repaint with focus feedback on or off...

          super.processFocusEvent(e); // let superclass dispatch to listeners
      }
      public void paint(Graphics g) {
          if (haveFocus) {
              // render focus feedback...
          }
      }
      ...rest of TextCanvas class...
    }

A Word of Caution

In general we recommend you use the delegation-based listener model for most of your basic event handling needs and reserve the use of the above when you are truly extending the look or behavior of a component. This is because the above mechanism suffers from some of the same ills as the 1.0 event model (complex, error-prone logic in processing methods, forgetting to call "super.processEvent", etc.), and unless you clearly understand what you are doing, your program may not behave as you expect!

An alternative to using the above approach would be to simply have your component subclass implement the particular listener interface for the events it wishes to receive and then register itself as a listener. For example, the above code example would be rewritten to:

    public class TextCanvas extends Canvas implements FocusListener {
      boolean haveFocus = false;

      public TextCanvas() {
          addFocusListener(this); // ensure we get focus events
      }
      public void focusGained(FocusEvent e) {
           haveFocus = true;
           repaint();
          }
      public void focusLost(FocusEvent e) {
           haveFocus = false;
           repaint();
      }
      public void paint(Graphics g) {
          if (haveFocus) {
              // render focus feedback...
          }
      }
      ...rest of TextCanvas class...
    }

Consuming Events

There are cases where programs need to prevent certain types of events from being processed normally by a component (i.e. a builder wants to use mouse events to enable a user to graphically move a button around and it wants to prevent the mouse press from 'pushing' the button).

We have explicitly enabled this capability for input events only by providing two methods on java.awt.event.InputEvent:

     public void consume()

     public boolean isConsumed()
Note that if some object 'consumes' an input event, it is strictly an indication to the source component that the event should not be processed in its default manner (i.e. consuming a mousePressed event on a Button will prevent it from being activated). The event will still be dispatched to all listeners registered, regardless of whether a listener in the chain consumes the event.

The Event Queue

Another feature of the 1.1 event model is the addition of an event queue class:
     java.awt.EventQueue
This class provides a number of public instance methods to manipulate the queue:
     public synchronized void postEvent(AWTEvent e)

     public synchronized AWTEvent getNextEvent()

     public synchronized AWTEvent peekEvent()

     public synchronized AWTEvent peekEvent(int eventID)
Programs can actually use this class to instantiate their own event queue instances for the purpose of asynchronously posting events. The EventQueue class automatically instantiates an internal thread for dispatching the events appropriately.

In the default JDK implementation, all events generated on components are first posted to a special "system" EventQueue instance before being dispatched to their target component.

The Toolkit class provides a method to access the handle of the system EventQueue instance:

     public final EventQueue getSystemEventQueue()

It would obviously be a security problem to allow untrusted applets to freely manipulate the system event queue, therefore the getSystemEventQueue() method is protected by a SecurityManager check which disallows applets direct access to the system queue. We realize that applets would also like access to an event queue which is scoped to their own containment hierarchies and we are working on an architecture to allow that for a follow-on release.

Compatibility with the old Model

Our intention is to maintain binary compatibility for programs written to the old model for the 1.1 release. However, we strongly recommend new java programs migrate to the new model. We do not encourage the explicit mixing of the two models within a single Applet. However, we realize that programs which code to the new model may need/wish to use existing GUI classes which still use the old model and so we have done our best to ensure this works (for example, the hotjava browser is a java application which will need to be able to load both 1.0 and 1.1 style applets).

The way this works is that the AWT will recognize a component as being either a 1.0-event-model "target" OR a 1.1-event-model "source", but not both. A component is recognized to be a 1.1-event-model "source" by meeting one of the following conditions:

  1. A listener (of any kind) is registered
  2. An event type (of any kind) was explicitly enabled by calling enableEvents()
ELSE the component will be treated as a 1.0-event-model "target" and all events will be delivered to the 1.0 handleEvent method as before.

Note that this is an "all or nothing" distinction and that once the AWT determines a component is a particular event model type, ALL events on that component will be processed in that context. For example, if a TextField object has only a FocusListener registered, then only focus events will be dispatched to the textfield in the 1.1 mechanism and the old 1.0 handleEvent method will NEVER be called (not even for other event types!). So while it is possible to combine components which use the different models, it is not possible to get a single component to mix both models.

One key difference between the two models is that the old model would automatically propagate events up the containment hierarchy, while the new model does NOT propagate events in this way. The way this works for compatibility is that if an event originates on a component which is a 1.0-event-model "target", then it WILL be propagated up the hierarchy in the 1.0 fashion, regardless of the event model type of its ancestor containers. If an event originates on a 1.1-event-model "source", then that event will NOT propagate up the hierarchy, regardless of the event model type of its ancestor containers.

Send feedback to: java-awt@java.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Desktop Colors

Java AWT: Desktop Colors

Last Updated: February 3, 1997

Purpose

 It is common for platform desktops (Windows95, Solaris/CDE, etc.) to provide a color scheme for objects on the desktop, and typically this scheme is configurable by the user. It is usually desirable to have applications running on that desktop use that color scheme in order to maintain visual consistency.

The AWT attempts to set appropriate default colors for its components, but there is currently no convenient way for a Java program to query and use those colors directly. This is particularly a problem when creating custom components where you'd like to ensure that the background, shadow, and font colors all match the rest of the desktop. As of version 1.1 of the JavaTM platform, the AWT provides a simple API for accessing and using these desktop colors.

Desktop Color API

The API involves introducing a new type of "symbolic" color, which is represented by a subclass of java.awt.Color:

        java.awt.SystemColor
A SystemColor object can be used just like any other Color object, the only difference being that the actual value that represents its current color may change dynamically (on systems which support dynamic notification when the user changes the color scheme).

SystemColor objects are defined by the system and cannot be instantiated by Java programs.

Range of Colors

The SystemColor class provides a standard set of these symbolic colors that represent each distinct type of coloration on the desktop. These symbolic color objects are created automatically and stored statically in java.awt.SystemColor:
    public final static SystemColor desktop; // Background color of desktop

    public final static SystemColor activeCaption; // Background color for captions

    public final static SystemColor activeCaptionText; // Text color for captions

    public final static SystemColor activeCaptionBorder; // Border color for caption text

    public final static SystemColor inactiveCaption; // Background color for inactive captions

    public final static SystemColor inactiveCaptionText; // Text color for inactive captions

    public final static SystemColor inactiveCaptionBorder; // Border color for inactive captions

    public final static SystemColor window; // Background for windows

    public final static SystemColor windowBorder; // Color of window border frame

    public final static SystemColor windowText; // Text color inside windows

    public final static SystemColor menu; // Background for menus

    public final static SystemColor menuText; // Text color for menus

    public final static SystemColor text; // background color for text

    public final static SystemColor textText; // text color for text

    public final static SystemColor textHighlight; // background color for highlighted text

    public final static SystemColor textHighlightText; // text color for highlighted text

    public final static SystemColor control; // Background color for controls

    public final static SystemColor controlText; // Text color for controls

    public final static SystemColor controlLtHighlight; // Light highlight color for controls

    public final static SystemColor controlHighlight; // Highlight color for controls

    public final static SystemColor controlShadow; // Shadow color for controls

    public final static SystemColor controlDkShadow; // Dark shadow color for controls

    public final static SystemColor inactiveControlText; // Text color for inactive controls

    public final static SystemColor scrollbar; // Background color for scrollbars

    public final static SystemColor info; // Background color for spot-help text

    public final static SystemColor infoText; // Text color for spot-help text

If a Java program either sets the foreground or background of a component to be one of these symbolic colors, or uses one of these for rendering, the current value for that symbolic color will be used.

Not all platforms support distinct colors for each of these symbolic names. In the cases where a symbolic color is not supported by a platform, it is mapped to the most appropriate default. These colors are guaranteed to be non-null.

The AWT base components will be modified to use these symbolic colors in order to provide more consistent default integration with the desktop. Java programs written for 1.0 which make any assumptions about the default color of components (i.e. assume they will be "gray") may not render correctly under 1.1. It is always important to query the component for its background/foreground colors within paint() methods for this reason.

One-time vs. Dynamic Updates

At a minimum, these colors are initialized dynamically when the toolkit is first loaded. Some desktops provide dynamic update capabilities such that the AWT can detect when the user changes the color scheme and then update all these symbolic colors on the fly. However, this is platform-specific and is not a guaranteed feature of this interface.

Sample Code

 Following is an example of a custom component (a separator) which uses this API:

import java.awt.*;

//
// Oversimplified separator class for creating 3D horizontal
// line separators
//
public class Separator extends Component {

    public Separator(int length, int thickness) {
       super();
       setSize(length, thickness);
       setBackground(SystemColor.control);
    }

    public void paint(Graphics g) {
       int x1, y1, x2, y2;
       Rectangle bbox = getBounds();

       x1 = 0;
       x2 = bbox.width - 1;
       y1 = y2 = bbox.height/2 - 1;

       g.setColor(SystemColor.controlShadow);
       g.drawLine(x1, y2, x2, y2);
       g.setColor(SystemColor.controlHighlight);
       g.drawLine(x1, y2+1, x2, y2+1);
    }

    public static void main(String[] args) {
        Frame f = new Frame("Separator Example");
        f.setSize(200, 100);
        f.setBackground(SystemColor.control);
        Separator sep = new Separator(200, 4);
        f.add("Center", sep);
        f.show();
    }
}

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


Lightweight UI Framework

Java AWT: Lightweight UI Framework

Last Updated: January 31, 1997

The Problem

 One of the issues with the 1.0 AWT is that creating new components requires creating subclasses of java.awt.Canvas or java.awt.Panel, which means that each new component owns its own opaque native window. This one-to-one mapping between components and native windows results in three problems:
  1. Native windows can be heavyweight, so it's undesirable to have too many of them.
  2. Native windows are opaque, so they can't be used to implement transparent regions.
  3. Native windows are handled differently across platforms, so the AWT has to struggle to maintain a consistent view across these varied platforms.
Hooks have been implemented that enable the creation of "lightweight" UI components; these hooks are called the Lightweight UI Framework.

Lightweight UI Framework

The Lightweight UI Framework is very simple -- it boils down to the ability to now directly extend the java.awt.Component and java.awt.Container classes in order to create components which do not have native opaque windows associated with them. These lightweight components and containers fit right into the existing AWT models, such as painting, layout, and events, and as such, require no special handling or additional APIs. Existing subclasses of Canvas and Panel can be easily migrated to lightweight versions by simply changing their superclass appropriately.

The advantages of creating lightweight components are the following:

  • The Lightweight component can now have transparent areas by simply not rendering to those areas in its paint() method (although, until we get full shape support from Java2D, the bounding box will remain rectangular).
  • The Lightweight component is "lighter" in that it requires no native data-structures or peer classes.
  • There is no native code required to process lightweight components, hence handling of lightweights is 100% implemented in common java code, which leads to complete consistency across platforms.

We are using this framework in an upcoming version of the toolkit (beyond 1.1) to implement pure-java versions of the base UI controls (Button, List, etc.) which implement a common look-and-feel across the platforms (and don't use the native peers).

Mixing Lightweight & Heavyweight Components

Lightweight components can be freely mixed with existing heavyweight components. This means that lightweight components can be made direct children of heavyweight containers, heavyweight components can be made direct children of lightweight containers, and heavyweight and lightweights can be mixed within containers (with the one caveat that the heavyweight sibling will always be "on top" if it overlaps with a lightweight, regardless of the specified z-order).

Putting Lightweight components in Existing Panels

The painting and event dispatching mechanism for lightweight components is handled by the Container class. This means that the painting of lightweight components is triggered from within the paint() method of its container. Therefore, if a lightweight component is placed inside of a Container instance where the paint method has been overridden but which does not call super.paint(), the paint() method of the lightweight component will never be called. This could be a common occurrence if you're using existing classes which extend Panel in order to implement the painting of a border or bevel, but which don't call "super.paint()" (because it was not an issue with 1.0.2). So if your lightweight components are not showing up, this is the first thing to check!

Double Buffering

Because lightweight components are entirely rendered in Java, the use of double-buffering in their containers can really smooth out their rendering to avoid flashing. By default, the Container class does not implement double-buffering, but this is extremely easy to do! Following is an example of a double-buffered Panel which implements smooth rendering for any lightweight components placed inside it:

public class DoubleBufferPanel extends Panel {
  Image offscreen;

  /**
   * null out the offscreen buffer as part of invalidation
   */
  public void invalidate() {
      super.invalidate();
      offscreen = null;
  }

  /**
   * override update to *not* erase the background before painting
   */
  public void update(Graphics g) {
      paint(g);
  }

  /**
   * paint children into an offscreen buffer, then blast entire image
   * at once.
   */
  public void paint(Graphics g) {
      if(offscreen == null) {
         offscreen = createImage(getSize().width, getSize().height);
      }
      Graphics og = offscreen.getGraphics();
      og.setClip(0,0,getSize().width, getSize().height);
      super.paint(og);
      g.drawImage(offscreen, 0, 0, null);
      og.dispose();
  }
}

Sample Code

Following is sample code showing the creation of a lightweight round button class, which shows off the transparency aspect of lightweight components.

import java.lang.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;

/**
 * RoundButton - a class that produces a lightweight button.
 */
public class RoundButton extends Component {

  String label;                      // The Button's text
  protected boolean pressed = false; // true if the button is detented.

  /**
   * Constructs a RoundButton with the specified label.
   * @param label the label of the button
   */
  public RoundButton(String label) {
      this.label = label;
      enableEvents(AWTEvent.MOUSE_EVENT_MASK);
  }

  /**
   * paints the RoundButton
   */
  public void paint(Graphics g) {
      int s = Math.min(getSize().width - 1, getSize().height - 1);

      // paint the interior of the button
      if(pressed) {
          g.setColor(getBackground().darker().darker());
      } else {
          g.setColor(getBackground());
      }
      g.fillArc(0, 0, s, s, 0, 360);

      // draw the perimeter of the button
      g.setColor(getBackground().darker().darker().darker());
      g.drawArc(0, 0, s, s, 0, 360);

      // draw the label centered in the button
      Font f = getFont();
      if(f != null) {
          FontMetrics fm = getFontMetrics(getFont());
          g.setColor(getForeground());
          g.drawString(label,
                       s/2 - fm.stringWidth(label)/2,
                       s/2 + fm.getMaxDescent());
      }
  }

  /**
   * The preferred size of the button.
   */
  public Dimension getPreferredSize() {
      Font f = getFont();
      if(f != null) {
          FontMetrics fm = getFontMetrics(getFont());
          int max = Math.max(fm.stringWidth(label) + 40, fm.getHeight() + 40);
          return new Dimension(max, max);
      } else {
          return new Dimension(100, 100);
      }
  }

  /**
   * The minimum size of the button.
   */
  public Dimension getMinimumSize() {
      return new Dimension(100, 100);
  }

   /**
    * Paints the button and distribute an action event to all listeners.
    */
   public void processMouseEvent(MouseEvent e) {
       Graphics g;
       switch(e.getID()) {
          case MouseEvent.MOUSE_PRESSED:
            // render myself inverted....
            pressed = true;

            // Repaint might flicker a bit. To avoid this, you can use
            // double buffering (see the Gauge example).
            repaint();
            break;
          case MouseEvent.MOUSE_RELEASED:
            // render myself normal again
            if(pressed == true) {
                pressed = false;
                // Repaint might flicker a bit. To avoid this, you can use
                // double buffering (see the Gauge example).
                repaint();
            }
            break;
          case MouseEvent.MOUSE_ENTERED:
            break;
          case MouseEvent.MOUSE_EXITED:
            if(pressed == true) {
                // Cancel! Don't send action event.
                pressed = false;

                // Repaint might flicker a bit. To avoid this, you can use
                // double buffering (see the DoubleBufferPanel example above).
                repaint();

                // Note: for a more complete button implementation,
                // you wouldn't want to cancel at this point, but
                // rather detect when the mouse re-entered, and
                // re-highlight the button. There are a few state
                // issues that that you need to handle, which we leave
                // this an an excercise for the reader (I always
                // wanted to say that!)
            }
            break;
       }
       super.processMouseEvent(e);
   }
}

Send feedback to:java-awt@java.sun.com
Copyright © 1997, Sun Microsystems, Inc. All rights reserved.


Popup Menu

Java AWT: Popup Menu

Last Updated: February 3, 1997

Purpose

 Popup menus (also known as "context menus") are now a very common UI element in modern GUIs (Win95, CDE, etc.). The AWT in 1.0 supports only Pulldown menus (menus which are always attached to a menubar or menu-item) and needs an API to allow Java programs to be able to easily create popup menus.

Popup Menu API

 The primary goal for this API is to make the creation and invocation of popups extremely easy in Java programs. Additionally, we want to ensure that popups are not tightly bound to a single component and can be easily reused both within , as well as across, containment hierarchies.

The API consists of a new subclass of Menu:

    java.awt.PopupMenu

The main addition to this subclass is a method to invoke the popup:

    public void show(Component origin, int x, int y)

This method will invoke the popup at the x,y coordinate position relative to the component parameter (the intention is that all parameters can easily be extracted from a given mouse-down event object).

Popup Menu Ownership

Popup menus must have a valid "parent" component in order to be shown. This is to ensure that a popup menu can be instantiated and cached prior to being shown (to prevent any potential slow-down during the show operation, which from the user's perspective should happen simultaneously with the mouse event which triggered it). Popup menus can be attached-to/removed-from any component, using new methods in class java.awt.Component:
    add(PopupMenu popup)

    remove(MenuComponent popup)

Note that a popup menu can only be owned by one component at a time.

The "origin" parameter passed into the show() method can be any component contained within the containment hierarchy defined with the popup's parent as the root (it need not be the parent itself). This is particularly useful if you need to define a single popup for an entire window; you would attach the popup menu to the frame, but could invoke it in response to a mouse-down event on any component within that frame.

Popup Event Trigger

The main issue with popup menus is defining an appropriate event trigger definition, as this varies slightly across the different platforms:
  • In Windows, the menu is popped up on the mouse button *2* mouse UP.
  • In Motif, the menu is popped up on the mouse button *3* mouse DOWN (and it remains showing if the subsequent mouse UP happens within a small interval; else the menu is pulled down on the mouse DOWN)

The API provides a platform-independent abstraction so a program can detect a popup-menu trigger event without hard-coding platform-specific event-handling logic in the program. This is accomplished by providing the following method on java.awt.event.MouseEvent:

    public boolean isPopupTrigger()

Event Model Issues

The AWT's 1.0 event model has a limitation where menu events (the actions invoked when a menu item is selected) are not catchable in the menu itself, but must be caught on the parent frame. To work with the 1.0 event model, the popup menu events must be caught in the action() method of the component which owns it. Clearly this is not a desirable limitation for popup menus, as they are not designed to be tightly bound to a particular component. With the new 1.1 event model API, action listeners can be attached directly to the menu items themselves, alleviating this issue (See the AWT Delegation Event Model document for details).

Sample Code

 Following is a very simple sample program which shows the usage of this API using the 1.1 Delegation Event Model.

    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;

    public class PopupMenuTest extends Applet implements ActionListener {

    PopupMenu popup;

    public void init() {
            MenuItem mi;

        popup = new PopupMenu("Edit");

            mi = new MenuItem("Cut");
            mi.addActionListener(this);
        popup.add(mi);

            mi = new MenuItem("Copy");
            mi.addActionListener(this);
        popup.add(mi);

        popup.addSeparator();

            mi = new MenuItem("Paste");
            mi.addActionListener(this);
        popup.add(mi);

        add(popup); // add popup menu to applet

            enableEvents(AWTEvent.MOUSE_EVENT_MASK);

        resize(200, 200);
        }

    public void processMouseEvent(MouseEvent e) {

        if (e.isPopupTrigger()) {
            popup.show(e.getComponent(), e.getX(), e.getY());
        }
        super.processMouseEvent(e);
        }

        public void actionPerformed(ActionEvent e) {
        String command = e.getActionCommand();

            if (command.equals("Cut")) {
            // perform cut operation
            } else if (command.equals("Copy")) {
                // perform copy operation
            } else if (command.equals("Paste")) {
                // perform paste operation
            }
        }
    }

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


Printing

Java AWT: Printing

Last Updated: December 6, 1999

Purpose

 The goal for the AWT printing API is to give developers an easy mechanism to print the AWT components using native platform facilities. This API is designed for use with the AWT Graphics model. Developers who prefer to work with Graphics2D should use 2D printing, available in the java.awt.print package.

The Printing API

 The printing API is very simple and consists primarily of one method in class java.awt.Toolkit:

PrintJob getPrintJob(Frame f, String jobtitle, JobAttributes jobAttributes,
PageAttributes pageAttributes)

and a class responsible for encapsulating all the information associated with a printing request:

    java.awt.PrintJob

The getPrintJob() method in Toolkit will take care of posting any platform specific print dialogs so that when it returns, the PrintJob object has already been configured to match the user's request. The JobAttributes and PageAttributes parameters provide the ability to pass in default attribute values for the print job. This allows the printing attributes appropriate for a particular application to be stored and applied in individual circumstances. If the user changes the default attributes in the print dialog, those changes are saved into the JobAttributes and PageAttributes instances passed to the method (so the program can choose to store those new defaults if desired).

The PrintJob object provides access to the relevant printing properties chosen by the user (page size, etc) as well as the print graphics contexts used to transparently render to the print device.

Print Graphics Context

The print graphics context is provided by an interface:
java.awt.PrintGraphics

The PrintJob object provides the method to obtain a handle to an object which is a subclass of Graphics AND implements the PrintGraphics interface:

Graphics getGraphics()

Since this object is a subclass of the Graphics class, it can simply be passed into existing paint() or print() methods (which use the standard Graphics drawing methods) and the underlying AWT implementation takes care of translating those calls to the appropriate print device (this is straightforward on Mac/Windows which support graphic print devices; on Solaris, a PostScript graphics object is required to generate appropriate PostScript).

It is often the case that from within a paint() or print() method, your program may want to detect whether it is rendering to the screen or to a print device (for example it would not necessarily want to print `highlighted' text which has been selected by the user). Since the graphics object returned from the PrintJob.getGraphics() method implements the PrintGraphics interface, this can easily be detected with the following test:

    public void paint(Graphics g) {

        if (g instanceof PrintGraphics)

            // printing is occurring

            ...

The primary method in the PrintGraphics interface is a method to obtain a handle to the associated PrintJob object:

PrintJob getPrintJob()

Pagination

 It is the program's responsibility to handle pagination. Each call to getGraphics() will return a print graphics context for a single page; when the program calls dispose() on the print graphics context, that page is flushed to the printer. The program must take care of determining appropriate page content and page breaking, given the specified page dimensions and resolution.

These printing attributes can be obtained by the following methods on java.awt.PrintJob:

Dimension getPageDimension()

int getPageResolution()

Printing Hierarchies of Components

If a program needs to print an entire containment hierarchy of AWT components (i.e. a Panel and any nested controls/containers within it), it should call the following java.awt.Component method on the root of the containment hierarchy (passing in the appropriate print graphics context):
public void printAll(Graphics g)

Calling this method will result in the complete traversal of the containment hierarchy such that the print() method will be called on all descendent components. The default implementation of the print() method simply calls paint(), so if a program has created a component which renders itself in the paint() method, printing should work "automagically". Note that all the base AWT components (Button, Scrollbar, etc.) are capable of printing themselves when their printAll() method is called (even though their rendering does not take place in the paint() method).

Print Dialogs

Although it is important for some programs to either extend or create their own print dialogs, this capability is currently not available via AWT printing, nor via 2D printing.

Security

Because it was considered dangerous to allow potentially untrusted applets to initiate print job requests (and potentially quietly print anything devious to the printer that they desire) the initiation of a PrintJob (via Toolkit.getPrintJob) is defined to be an operation bound by the Applet security restrictions implemented in a SecurityManager method. In addition, while printing may be permitted, access to the file system may not. In such a case, requests to print to a file programmatically will generate an exception and the user will be unable to select print to file.

It's important to note that this restriction does not limit applets' capability to render using a PrintGraphics object returned from a PrintJob; it just disallows untrusted applets to initiate the job. A more reasonable policy will be provided when the Java security architecture allows more customization.

Sample Code

A VERY simple example of how a print job can be initiated to print an AWT component:

import java.awt.*;
import java.awt.event.*;

public class PrintingTest extends Frame implements ActionListener {

    PrintCanvas canvas;

    public PrintingTest() {
        super("Printing Test");
        canvas = new PrintCanvas();
        add("Center", canvas);

        Button b = new Button("Print");
        b.setActionCommand("print");
        b.addActionListener(this);
        add("South", b);

        pack();
    }

    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (cmd.equals("print")) {
            PrintJob pjob = getToolkit().getPrintJob(this,
                               "Printing Test", null, null);

            if (pjob != null) {
                Graphics pg = pjob.getGraphics();

                if (pg != null) {
                    canvas.printAll(pg);
                    pg.dispose(); // flush page
                }
                pjob.end();

            }
        }
    }

    public static void main(String args[]) {
        PrintingTest test = new PrintingTest();
        test.show();
    }
}

class PrintCanvas extends Canvas {

    public Dimension getPreferredSize() {
        return new Dimension(100, 100);
    }

    public void paint(Graphics g) {
        Rectangle r = getBounds();

        g.setColor(Color.yellow);
        g.fillRect(0, 0, r.width, r.height);

        g.setColor(Color.blue);
        g.drawLine(0, 0, r.width, r.height);

        g.setColor(Color.red);
        g.drawLine(0, r.height, r.width, 0);
    }
}

Send feedback to:java-awt@java.sun.com
Copyright © 1996, 1997, 1999 Sun Microsystems, Inc. All rights reserved.


ScrollPane Container

Java AWT: ScrollPane Container

Last Updated: February 3, 1997

The Problem

 In the AWT1.0, the task of implementing all scrolling behavior is left to the developer. Only a basic Scrollbar class is provided which must be managed by the Java program, meaning the Java program must catch the scrollbar events and then take appropriate action to update the contents being scrolled.

Not only is this a general burden to developers who are accustomed to better support for this in toolkits, but it is also a serious performance problem, since there is a round trip (native->java->native) for each individual scroll event that occurs, and the application must respond to the event and move its contents using slower java draw/move operations. This is particularly noticeable during the event-intensive scroll-drag operations.

ScrollPane API

To resolve this problem, a ScrollPane class was added to the AWT in version 1.1. ScrollPane provides a container that implements automatic scrolling for a single component child:
    java.awt.ScrollPane
The ScrollPane supports three modes for its scrollbars:
  1. Scrollbars "when needed": Scrollbars are displayed only when the size of the child exceeds the size of the scrollpane.
  2. Scrollbars "always": Scrollbars are always displayed regardless of the relative sizes of the child and parent.
  3. Scrollbars "never": Scrollbars are never displayed and the program is in total control of when scrolling occurs. This mode is useful when a program wishes to implement its own scrollbar controls.
The state of the vertical and horizontal scrollbars in cases 1 & 2 are represented by separate internal objects to the ScrollPane which implement the following interface:
       java.awt.Adjustable
Therefore, if a program wishes to set properties such as the unitIncrement,value, etc. on the scrollpane, it would first get the appropriate Adjustable and set the property there.

Sample Code

Following is sample code showing the use of this API in a simple case:

import java.awt.*;

public class Scroller extends Frame {

    public Scroller() {
        super("Scroller Example");

        ScrollPane scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
        scroller.add(new DrawCanvas());

        Adjustable vadjust = scroller.getVAdjustable();
        Adjustable hadjust = scroller.getHAdjustable();
        hadjust.setUnitIncrement(10);
        vadjust.setUnitIncrement(10);

        scroller.setSize(200, 200);

        add("Center", scroller);
        pack();

    }
   // No more handleEvent method needed to implement scrolling!

    public static void main(String args[]) {
        Scroller test = new Scroller();
        test.show();
    }
}

class DrawCanvas extends Component {

    public Dimension getPreferredSize() {
        return new Dimension(300, 300);
    }

    public void paint(Graphics g) {
        // Note: For most efficient repainting, we should check the
        // clip rectangle in the Graphics object to determine the
        // damaged region and only paint that;  we don't do that here
        // for simplicity in this example
        //
        Rectangle r = getBounds();

        g.setColor(Color.black);
        g.fillRect(0, 0, r.width, r.height);

        g.setColor(Color.yellow);
        g.drawLine(0, 0, r.width, r.height);

        g.setColor(Color.white);
        g.drawLine(0, r.height, r.width, 0);
    }
}

Send feedback to:java-awt@java.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Data Transfer

Java AWT: Data Transfer

Last updated: August 13, 1997

Purpose

 Typical GUI users today expect to be able to transfer data between applications using operations like cut/copy/paste and drag-and-drop. The only mechanism for this in the current Java environment is through whatever facilities the AWT native widgets (TextField, TextArea) provide by default. There are many cases however, where an application needs to enable these operations outside of these native widgets, and therefore the Java platform needs to provide an API to enable basic data transfer capabilities. This document defines a baseline data transfer capability for Java objects on top of which various transfer-protocols can be built. This document also describes APIs for two of those higher-level transfer-protocols, Clipboard and Drag-and-Drop.

Note: The Clipboard API will be included in JDK1.1, however the Drag-and-Drop API will be in the following release (due to time constraints on 1.1). We are including the document on Drag-and-Drop here so that the Java Beans document can refer to it and we can get as much early feedback as possible.

Java Data Transfer

Design Goals for Transfer API

 The design goals for the data transfer API are the following:
  • Keep simple tasks simple (as always with Java APIs).
  • Ensure API is general enough to enable existing and future transfer models.
  • Allow dynamic data types to be created, registered, and transferred.
  • Enable data transfer both within and across process space boundaries.
  • Enable data transfer between Java and non-Java applications.
  • Support the transfer of Java Beans

Transfer API Overview

Transferable Objects

The API centers on an interface which is implemented by objects which are to be transferred.:
    java.awt.datatransfer.Transferable
A transferable object must be able to provide a list of formats (called " data flavors") for which it can provide the data, ordered from the most-richly descriptive flavor to the least. It must also be able to return the data (in the form of an Object reference) when requested in a particular flavor (or throw an exception if that flavor is not supported or the data is no longer available).

Convenience classes which implement the Transferable interface for common data types will be provided to make transfer of these common types easy for the developer. For example:

    java.awt.datatransfer.StringSelection

The purpose of this API is to ensure that once the work goes into making a particular element or type of data transferable, it can be easily be passed around using any of the higher-level transfer protocols (clipboard, drag-and-drop, etc.).

Data Flavors

A typical aspect of common data transfer operations (clipboard, Drag-and-Drop) is a negotiation between the provider and the requestor on which flavor to transfer the data in. For example, when html text is selected in a browser and then copied/pasted into a separate word-processing application, the browser would typically offer the data in multiple flavors (probably html formatted text and plain ASCII) in order to maximize the number of potential target applications for a paste operation.

This negotiation requires the definition of a data typing name-space such that these various flavors and data-types can be uniquely defined and recognized by distinct applications. In order to avoid the confusion of such overloaded terms such as "format", we have chosen the term "flavor" to represent this concept.

A data flavor is represented by an object which encapsulates all necessary information about a particular flavor to enable flavor negotiation and transfer between applications:

    java.awt.datatransfer.DataFlavor

This information includes a logical name for the flavor (to enable programmatic identification), a human-presentable name (which be used to present to the user and would be localizable), and the representation class which is used to define the class of object used to actually transfer the data.

MIME Types as Logical Names

We are currently planning on using MIME type/subtype parameter notation to represent the logical name for data flavors (See RFC 1521 for the MIME type specification). We believe it is preferable to embrace an existing Internet standard rather than creating "yet another data typing namespace" for the Java environment.

MIME type registration is currently handled by a third-party, the Internet Assigned Numbers Authority (IANA), enabling developers to easily locate the standard type/subtype name used for published data formats. Fortunately, formal registration is not required in order to define new MIME type/subtype names for less common formats (we agree that such a formal requirement would not be acceptable for basic Java data transfer). New type names can be created without formal registration by prepending "x-" in front of the name.

Representation Class

Since the method in Transferable which actually returns the data:
    Object getTransferData(DataFlavor flavor)
is loosely defined to return an instance of class "Object" (for maximum flexibility), the DataFlavor's defined representation class becomes important to the receiving end of a transfer operation because it allows the returned object to be decoded unambiguously.

The current DataFlavor class defines two general kinds of data flavors:

  • DataFlavor which represents a specific Java class:
         MIME-type="application/x-java-serialized-object; class=<implemenation class>"

         RepresentationClass=<implemenation class>

        e.g. a DataFlavor representing an AWT GUI component:
         MIME-type="application/x-java-serialized-object; class=java.awt.Component"

         RepresentationClass=java.awt.Component

      If the requesting side of a transfer operation asks for the data in this flavor,
          it will be handed back an instance of the Component class.
  • DataFlavor which represents a particular MIME-type:
         MIME-type="application/<mime-subtype>"

         RepresentationClass=java.io.InputStream

        e.g. a DataFlavor representing RTF text:
         MIME-type="application/rtf"

         RepresentationClass=java.io.InputStream

      If the requesting side of a transfer operation asks for the data in this fla-vor,
          it will be handed back an InputStream instance from which it can read/
          parse the RTF formatted text.

For a given MIME-type (type #2 above), a Java program is free to create multiple flavors with different representation classes. For example, in addition to providing the flavor for the MIME-type "application/rtf" above, a program could specify another flavor:

        e.g. a DataFlavor representing RTF text:
         MIME-type="application/rtf"

         RepresentationClass=foobar.fooRTF

Rationale Behind Encapsulation

At first it may seem that using a class to define a data flavor (rather than simply the MIME-type string) is over-kill. We believe this encapsulation to be an advantage for the following reasons:
  1. Usability - There are attributes that should be associated with data formats, like the human-presentable name for the data format, that could only be associated with a logical string baroquely. With a DataFlavor object, these attributes are directly associated with the encapsulating DataFlavor object
  2. Convenience - Using DataFlavor objects gives us a convenient way of handling data format comparisons. An isMimeTypeEqual() method relieves the programmer or having to remember to convert his MIME types into a canonical form. (This is an issue because MIME type, subtype, and parameter names are case insensitive and parameters can appear in any order.).
  3. Extensibility - The abstraction will allow us to extend a flavor's attributes/methods over time if necessary.
  4. Performance - Motif and Windows use atoms rather than strings to identify data formats. Using an object to identify each data format gives us a handy place to cache the atom corresponding to the MIME type name, reducing the number of atom internments required. Similarly, the results of mapping MIME types like "text/plain" to platform-specific clipboard formats like CF_TEXT on Windows and 'TEXT' on Macintosh can be cached.

The DataFlavor concept may seem complex and confusing, however our intent is to make this as convenient as possible for developers by defining a set of commonly used data flavors.

Multiple Item Transfer

It is not uncommon for a transfer protocol to support the transfer of multiple distinct pieces of data in a single transfer operation (i.e. like a drag-and-drop of multiple file icons from a file manager application). The transfer API needs to support some form of simultaneous transfer of multiple data items and the current proposal is to encapsulate this capability using an implementation of Transferable which can deal with a collection of distinct data objects. This plan is currently under more rigorous investigation and will be discussed in more detail in a future revision of this proposal.

Code Example for Creating a Transferable Object

 The following code shows the StringSelection class source, which is an example of how the API in this proposal would be used to create a class which is capable of transferring plain unicode text.

package java.awt.datatransfer;

import java.io.*;

/**
 * A class which implements the capability required to transfer a
 * simple java String in plain text format.
 */
public class StringSelection implements Transferable, ClipboardOwner {

    final static int STRING = 0;
    final static int PLAIN_TEXT = 1;

    DataFlavor flavors[] = {DataFlavor.stringFlavor, DataFlavor.plainTextFlavor};

    private String data;

    /**
     * Creates a transferable object capable of transferring the
     * specified string in plain text format.
     */
    public StringSelection(String data) {
        this.data = data;
    }

    /**
     * Returns the array of flavors in which it can provide the data.
     */
    public synchronized DataFlavor[] getTransferDataFlavors() {
    return flavors;
    }

    /**
     * Returns whether the requested flavor is supported by this object.
     * @param flavor the requested flavor for the data
     */
    public boolean isDataFlavorSupported(DataFlavor flavor) {
    return (flavor.equals(flavors[STRING]) || flavor.equals(flavors[PLAIN_TEXT]));
    }

    /**
     * If the data was requested in the "java.lang.String" flavor, return the
     * String representing the selection, else throw an UnsupportedFlavorException.
     * @param flavor the requested flavor for the data
     */
    public synchronized Object getTransferData(DataFlavor flavor)
            throws UnsupportedFlavorException, IOException {
    if (flavor.equals(flavors[STRING])) {
        return (Object)data;
    } else if (flavor.equals(flavors[PLAIN_TEXT])) {
        return new StringReader(data);
    } else {
        throw new UnsupportedFlavorException(flavor);
    }
    }

    public void lostOwnership(Clipboard clipboard, Transferable contents) {
    }
}

Clipboard

 Providing Cut/Copy/Paste operations as a means for transferring data both within and between applications is now a common and expected feature in most applications. The AWT API in JDK1.0 does not currently provide any facilities for this basic clipboard operation (except where is exists by default in native text widgets) and this ability is critical for Java programs to be well-integrated into a user's environment.

Design Goals for Clipboard API

 Following are the design goals of this API:
  • Make it *extremely* easy for programs to implement cut/copy/paste of text
  • Enable clipboard operations which interact with the platform's native clipboard
  • Enable the creation/use of private clipboards for inter-app clipboard operations

Clipboard API Overview

 The clipboard API provides a standard mechanism to implement cut/copy/paste operations in Java programs. Different clipboards can be created and named for different purposes (a program might wish to create it's own private clipboard), however there will be a single clipboard instance (named "System") that will be the one which interfaces with the platform's native facilities to allow Java programs to transfer data to/from non-Java applications.

The clipboard architecture relies on the data transfer mechanism defined by the Java Data Transfer API. The Clipboard API includes a single class which implements the data transfer model for a standard clipboard:

    java.awt.datatransfer.Clipboard

and an interface which is implemented by any classes which will be writing data to the clipboard:

    java.awt.datatransfer.ClipboardOwner

The Clipboard class provides two basic methods for reading-from/writing-to the clipboard:

    void setContents(Transferable content, ClipboardOwner owner)

    Transferable getContents(Object requestor)

The ClipboardOwner interface consists of a single method which is called if another object asserts ownership of the clipboard:

    void lostOwnership(Clipboard clipboard)

To make the job of implementing clipboard operations on common data types easy for the developer, there will be convenience classes provided which implement the ClipboardOwner interface in a standard way:

    java.awt.datatransfer.StringSelection

The following method in java.awt.Toolkit will provide access to the clipboard instance which interacts with the native platform facilities:

    Clipboard getSystemClipboard();

Implementing Cut/Copy/Paste using Clipboard API

 The general sequence of operations for a program implementing "cut"/"copy":
  1. Instantiate an object which implements the Transferable interface for the data to be cut/copied.
  2. Instantiate an object which implements the ClipboardOwner interface (may be the same object as that which implements Transferable)
  3. Pass this Transferable and ClipboardOwner objects to the clipboard's setContents() method; this establishes ownership of the clipboard.
  4. Handle the call to your clipboard owner's lostOwnership() method, which will be called if/when another object asserts ownership of the clipboard (this method can be empty if you don't need to do anything when you lose ownership)

The general sequence for implementing "paste":

  1. Request the contents of the clipboard using its getContents() method, which returns a handle to an object which implements the Transferable interface.
  2. Request the list of available flavors for the data from the transferable object using its getTransferDataFlavors() method.
  3. Retrieve the data in the desired available flavor using the transferable object's getTransferData() method.

Lazy Data Model

The clipboard model implies a level of persistence for the clipboard's contents, however to avoid unnecessary performance penalties at cut/copy time, the data may not actually be transferred from the owner until it has been requested by a consumer (this is known as a "lazy" data model). If the clipboard owner is destroyed, then it may be necessary to attempt to retrieve the data and store it within the clipboard to ensure its availability after the provider has exited. The clipboard owner should not, however, make any assumptions about when the transfer will occur and should attempt to keep the data available until its lostOwnership() method is called (if it cannot keep the data available indefinitely, then it should throw an IOException if the data is requested but no longer available).

Security

 There are definite security issues with allowing downloaded applets access to the native system's clipboard, both in terms of being able to read it's contents (which could be sensitive) and in terms of writing to it. Initially, untrusted applets will not be allowed direct access to the *System* clipboard (there will be a SecurityManager method for clipboard access). We are exploring a mechanism which would allow untrusted applets to participate in clipboard operations if the initiation of the operation was from a user-generated event (such as a "cut" or "paste" keyboard event).

Sample Code using Clipboard API

The following is a simple example of a program which is implementing cut/copy/paste of plain text

(note: for simplicity this example uses a TextArea as the source/dest for the copy/paste operation; on most platforms, cut/copy/paste is already implemented for the TextArea and TextField classes within the native peers)

import java.awt.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.datatransfer.*;

public class ClipboardTest extends Frame
                           implements ClipboardOwner, ActionListener {

    TextArea srcText, dstText;
    Button copyButton, pasteButton;

    Clipboard clipboard = getToolkit().getSystemClipboard();

    public ClipboardTest() {
        super("Clipboard Test");
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        setLayout(gridbag);

        srcText = new TextArea(8, 32);
        c.gridwidth = 2;
        c.anchor = GridBagConstraints.CENTER;
        gridbag.setConstraints(srcText, c);
        add(srcText);

        copyButton = new Button("Copy Above");
        copyButton.setActionCommand("copy");
        copyButton.addActionListener(this);
        c.gridy = 1;
        c.gridwidth = 1;
        gridbag.setConstraints(copyButton, c);
        add(copyButton);

        pasteButton = new Button("Paste Below");
        pasteButton.setActionCommand("paste");
        pasteButton.addActionListener(this);
        pasteButton.setEnabled(false);
        c.gridx = 1;
        gridbag.setConstraints(pasteButton, c);
        add(pasteButton);

        dstText = new TextArea(8, 32);
        c.gridx = 0;
        c.gridy = 2;
        c.gridwidth = 2;
        gridbag.setConstraints(dstText, c);
        add(dstText);

        pack();
    }

    public void actionPerformed(ActionEvent evt) {
        String cmd = evt.getActionCommand();

        if (cmd.equals("copy")) {
           // Implement Copy operation
           String srcData = srcText.getText();
           if (srcData != null) {
                StringSelection contents = new StringSelection(srcData);
                clipboard.setContents(contents, this);
                pasteButton.setEnabled(true);
            }
        } else if (cmd.equals("paste")) {
            // Implement Paste operation
            Transferable content = clipboard.getContents(this);
            if (content != null) {
                try {
                    String dstData = (String)content.getTransferData(
                                                DataFlavor.stringFlavor);
                    dstText.append(dstData);
                } catch (Exception e) {
                    System.out.println("Couldn't get contents in format: "+
                           DataFlavor.stringFlavor.getHumanPresentableName());
                }
             }
        }
    }
    public void lostOwnership(Clipboard clipboard, Transferable contents) {
       System.out.println("Clipboard contents replaced");
    }
     public static void main(String[] args) {
        ClipboardTest test = new ClipboardTest();
        test.show();
     }
}

Drag and Drop

 The Drag-and-drop specification which was previously contained in this document has been superceded by the Drag-and-Drop documentation in the Java 2 SDK documentation.

Send feedback to:java-awt@java.sun.com
Copyright © 1996, 1999, Sun Microsystems, Inc. All rights reserved.


AWT graphics clip API

last updated: October 30, 1996

The Issue

Currently the AWT Graphics object has methods to implement an ever-decreasing clip area. There is a single clipRect() method to manipulate the clip area. This method will intersect the current clipping area with the indicated rectangle and set a new clip area to the intersection of the two. This operation is convenient for many graphics algorithms that might wish to use clipping to control paint distribution while operating within a Graphics object set up to clip rendering to a contextual "repaint region". Unfortunately, when clipping is used in the rendering process, it is usually only used for a small number of rendering operations. Without the ability to enlarge the clip area back to the original contextual clip established by the repaint process, clipping for rendering purposes becomes a one-shot process.

If a programmer wants to temporarily set the clip to a smaller area for one or two rendering operations and then restore it later, then another mechanism must be used. The currently available work-around is to copy the Graphics object using one of the create() methods and then set the temporary clip on the new Graphics object using the clipRect method and dispose of it when done. The original Graphics object will still have its original clip unmodified and can be used for further rendering.

Furthermore, all of the other attributes of the Graphics object can be queried, changed, and then restored to their original values. The clip area, when viewed as a rendering attribute, only partially follows this design model. There is a getClipRect() method to query the clip area as a Rectangle object, but that method is not extensible in the future when non-rectangular clip areas may be provided. In addition, even if you queried the current clip area there was no way to explicitly set the clip to this value after you have installed a more restrictive clip.

The new clip API

To resolve this problem, 1 new class:
    java.awt.Shape
is being added to the AWT and 3 new methods:
    getClip()
    setClip(Shape)
    setClip(int x, int y, int w, int h)
are being added to the AWT Graphics class.

In addition, the getClipRect() method is now deprecated in favor of the more general getClip() method detailed above and a new method:

    getClipBounds()
which returns the bounding box of the current clip area as a Rectangle regardless of its shape. This method is also named consistently with the recent terminology updates that were implemented across the AWT classes.

Sample Code

Following is sample code showing the use of the old API to perform temporary clipping:

    import java.awt.*;
    import java.applet.*;

    public class TempClipExample extends Applet {
    Image bgimg, img2;
    public void paint(Graphics g) {
        // Draw a background image
        g.drawImage(bgimg, 0, 0, this);
        // Draw the upper left 100x100 portion of another image at 10,10
        Graphics g2 = g.create();
        g2.clipRect(10, 10, 100, 100);
        g2.drawImage(img2, 10, 10, this);
        g2.dispose();	// reclaims resources more quickly
        // Now continue drawing with original clip area
        g.fillRect(0, 0, 10, 10);
    }
    }

Following is sample code showing the use of the new API to perform temporary clipping:

    import java.awt.*;
    import java.applet.*;

    public class TempClipExample extends Applet {
    Image bgimg, img2;
    public void paint(Graphics g) {
        // Draw a background image
        g.drawImage(bgimg, 0, 0, this);
        // Draw the upper left 100x100 portion of another image at 10,10
        Shape oldclip = g.getClip();
        g.clipRect(10, 10, 100, 100);
        g.drawImage(img2, 10, 10, this);
        g.setClip(oldclip);
        // Now continue drawing with original clip area
        g.fillRect(0, 0, 10, 10);
    }
    }

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


AWT image rendering API

last updated: October 30, 1996

The Issue

Currently the AWT Graphics object has 4 methods to render an entire image with an optional scale and/or an optional background color.

There is no way to render a subset of the entire image without using either a cropping filter or the clipping mechanism of the Graphics object. This situation is further compounded by the fact that the clip attribute of the Graphics object can only be set to a more restrictive value, it can never be expanded or restored to a previous clip area.

The existing methods to scale an image also do not allow the programmer to flip an image horizontally or vertically by scaling it to a negative size or by any other means. Even though other arbitrary manipulations of images are not supported, the lack of flipping is notable mainly because it is easily managed with minor mathematical modifications to the already supported scaling algorithms.

Most of the existing Java interfaces that take rectangular arguments treat negative width and height values as meaning an empty rectangle. The existing drawImage methods could have allowed image flipping when told to scale the image to a negative size, but that would have conflicted with the empty negative rectangle protocol seen elsewhere. Instead of treating the negative values as a null operation (which arguably would have been the right thing to do), the existing drawImage methods consider negative width and height values to indicate "proportional values". In other words, if one of the values is negative then an appropriate value is substituted based upon the other non-negative quantity to maintain the aspect ratio of the original image. If both are negative then the image is drawn at its original size and scale. This behavior was designed to be compatible with the way that some browsers treat missing specifications of width and height attributes in HTML <img> tags. In essence, scaling an image to a negative width or height is compared to scaling the image to an unspecified width or height and a standard "proportional" algorithm is applied to obtain default values.

The new image rendering API

To resolve this problem, 2 new methods are being added to the AWT Graphics class to provide a complete scaling, flipping, cropping image rendering facility. The new methods are:
    drawImage(Image img,
          int dx1, int dy1, int dx2, int dy2,
          int sx1, int sy1, int sx2, int sy2,
          ImageObserver observer)
    drawImage(Image img,
          int dx1, int dy1, int dx2, int dy2,
          int sx1, int sy1, int sx2, int sy2,
          Color bgcolor, ImageObserver observer)

An interesting note about these new methods is that, while the former drawImage() methods may create a totally new representation of the image for the screen by rereading the raw image data in an asynchronous thread, the new methods will always use the pixels from the unscaled version of the image to draw to the screen. As a result, the 2 new methods will complete synchronously as long as the full size version of the image has previously been loaded and converted as indicated by a MediaTracker or other image status API.

Another interesting change in the coordinate specifications of the new methods is the use of two coordinates to define the source and destination rectangles. Since negative widths and heights carry existing meanings in the rest of the Java APIs, the new methods use the new coordinate pair specification to allow explicit control over which dimensions get flipped. This new system is also more convenient for some applications which may be tracking the corner of the image by following a user dragging the mouse. There is no need to decompose drag start and end coordinates into an x,y,w,h format.

Sample Code

Following is sample code showing the use of the old API to perform image cropping:

    import java.awt.*;
    import java.applet.*;

    public class ImgCropExample extends Applet {
    Image bgimg, img2;
    public void paint(Graphics g) {
        // Draw a background image
        g.drawImage(bgimg, 0, 0, this);
        // Draw the upper left 100x100 portion of another image at 10,10
        Graphics g2 = g.create();
        g2.clipRect(10, 10, 100, 100);
        g2.drawImage(img2, 10, 10, this);
        g2.dispose();	// reclaims resources more quickly
        // Now continue drawing with original clip area
        g.fillRect(0, 0, 10, 10);
    }
    }

Following is sample code showing the use of the new API to perform image cropping:

    import java.awt.*;
    import java.applet.*;

    public class ImgCropExample extends Applet {
    Image bgimg, img2;
    public void paint(Graphics g) {
        // Draw a background image
        g.drawImage(bgimg, 0, 0, this);
        // Draw the upper left 100x100 portion of another image at 10,10
        g.drawImage(img2,
            10, 10, 110, 110,
            0, 0, 100, 100, this);
        // Now continue drawing with original clip area
        g.fillRect(0, 0, 10, 10);
    }
    }

Following is sample code showing the use of the new API to perform image flipping:

    import java.awt.*;
    import java.applet.*;

    public class ImgCropExample extends Applet {
        Image img2;
    public void paint(Graphics g) {
        // Draw the center 100x100 portion of a 200x200 image
        // at location 10, 10, flipped horizontally.
        g.drawImage(img2,
            10, 10, 110, 110,
            150, 50, 50, 150, this);
    }
    }

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


AWT image scaling API

last updated: October 30, 1996

The Issue

Java has provided a number of mechanisms to scale an image automatically at the time that the drawImage() is called. These mechanisms have caused a bit of confusion since the exact behavior was not well documented and the particular implementation chosen for the reference port behaved in a way that differed from most programmer's expectations.

In particular, when images are displayed on the screen, the Image data is converted to a format which matches the color capabilities of the screen. The original image data is not stored persistently, only the converted screen data is stored by the screen representations. If the data for the image is needed for some other purpose (such as filtering the data for a new image), then the raw data has to be reloaded from the original source.

Note that the original data is stored in a cache in case it is needed immediately after the first time it is loaded for a secondary purpose. If a single image is run through several filters, then the subsequent filtered images will often be able to use the cached converted data without having to reload the image file from the source, but this cached data cannot be relied on in general.
When the image is scaled using one of the drawImage method variants that allows the specification of a width and height, a separate screen representation is created for each size that is drawn. Furthermore, since scaling an image after it has been dithered for output on an 8-bit screen results in very poor quality output, the scaling is always done from the original image data. Even if the screen is 24 bits deep and thus the screen representation contains the original image data with no conversion loss the implementation is not smart enough to use the local copy and contacts the original source of the image anyway.

Another drawback of storing a separate image representation for each size drawn is the amount of memory consumed. The strategy of keeping a separate representation for each size drawn is meant to optimize rendering speed since the data is all ready to be copied to the screen byte for byte. This strategy ends up backfiring since the speed gain by having the scaled size precalculated often is more than offset by the pain and inconvenience of having to wait while the scaled variant is loaded and converted, especially if the image data needs to be reloaded over a slow network. Also, if the image is being drawn at many different sizes which will never be repeated the memory used to cache the scaled representations is wasted.

In short, there is no programmer control over whether or not the scaled version of the image is cached for subsequent rendering and whether or not the image scaling is done immediately or in the background.

Another issue which has bothered developers is that there is no way to create a new object which represents a scaled view of an existing image. An Image object can be scaled by supplying new width and height parameters to the drawImage call, but there is no way to encapsulate that information into an Image object so that by passing around that Image object, the desired size image will be drawn.

The new image scaling API and behavior

To resolve this problem a new strategy will be adopted for the drawImage methods that scale an image. In 1.1, all scaling by drawImage will be done "on the fly" at rendering time from the full sized screen representation.

There are two primary drawbacks of this change.

  1. Using the new drawImage to scale the image will take slightly longer than before since the pixel reordering will have to be performed at render time.
  2. The quality of the scaled images will be reduced on 8-bit screens due to the fact that the pixel reordering will be performed after the dithering process.

As it turns out, the first problem is much less dramatic than was originally feared. In the past couple of years processors have become very fast especially in comparison to the speeds of memory systems. As a result image scaling performance is mostly limited by memory access speed and the calculations necessary to determine which is the next pixel to copy to the screen for the particular scaling desired are not very noticeable compared to the work of moving the data to the screen.

The quality issue could have been a major problem. With the 8-bit color conversion code used in JDK implementations prior to 1.1 images degraded dramatically if they were scaled after dithering. Fortunately, new color conversion algorithms have been developed for 1.1 which increase the quality of the resulting dithered image so much that the results of scaling the dithered representations are typically as good, if not better than the results of the 1.0.2 images which were dithered after scaling.

Still, even though the implementation of image scaling was beefed up in 1.1 enough to make render-time on-the-fly scaling possible, there will be cases where the programmer wants every possible measure taken to improve the quality of the scaled image. To allow the programmer to choose when explicit scaling should be performed up front instead of at rendering time, two new filter classes will be available and a new convenience method will be added to the AWT Image class in 1.1. These same APIs can be used by programmers to create a new Image object representing a scaled version of that image encapsulated into its own Image object. The new image scaling classes are:

    java.awt.image.ReplicateScaleFilter
    java.awt.image.AreaAveragingScaleFilter
The new method in the Image class is:
    getScaledInstance(int width, int height, int hints)
The hints parameter controls what kind of algorithm is used to scale the image. There are hints which refer to specific algorithms to be used and there are more abstract hints which indicate whether or not to optimize the operation for speed or quality. The current set of legal values for the hints parameter are:
Image.SCALE_DEFAULT
Use the default scaling algorithm (which may be chosen based on the user's configuration)
Image.SCALE_FAST
Choose a scaling algorithm to optimize speed more than smoothness of the scaled image
Image.SCALE_SMOOTH
Choose a scaling algorithm to optimize smoothness of the scaled image more than speed
Image.SCALE_REPLICATE
Use the algorithm implemented by the ReplicateScaleFilter
Image.SCALE_AREA_AVERAGING
Use the algorithm implemented by the AreaAveragingScaleFilter

Sample Code

Following is sample code showing the use of the new API to scale an image:

    import java.awt.*;
    import java.applet.*;

    public class ImgScaleExample extends Applet {
    Image img, img2;
        public void init() {
        img = getImage(getDocumentBase(), "foo.gif");
        img2 = img.getScaledInstance(100, 100, Image.SCALE_DEFAULT);
    }

    public void paint(Graphics g) {
        // Draw the full size image
        g.drawImage(img, 0, 0, this);
        // Draw the scaled version of the image
        g.drawImage(img2, 10, 10, this);
        // Now draw a scaled version of the scaled image
        g.drawImage(img2, 110, 10, 50, 50, this);
    }
    }

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


AWT memory image dynamic update API

last updated: November 14, 1996

The Issue

Currently the AWT provides a standard utility class to make an image out of an array of pixel values. This class isolates developers from the complex ImageProducer/ImageConsumer mechanisms if they simply want to calculate an image using a Java algorithm and then display the resulting image on the screen.

The MemoryImageSource class provides this facility but it only implements a static image capability. The first time an image is prepared for a screen by drawing the image, using the prepareImage method, or by using a MediaTracker to build the image, a snapshot of the pixels in the array will be converted into a screen representation. Then every time the image is drawn again at that same scale, the same buffered screen representation will be used, ignoring any changes the developer may have made to the original array of pixels in the meantime.

The implementation specifically does not reread the original array of pixel information for each rendering operation since image conversion is a slow process when compared to simply moving converted pixels to the screen. For drawImage to be fast, it works better if it can use a copy of the image that is already in the format that the display hardware uses to represent pixels. And thus we have a tradeoff between showing the image fast when it is not changing and dynamically incorporating changes to the original image data.

This implementation worked fine for images that were computed once and then the results were final. It was even workable for images that changed rarely since a new MemoryImageSource image could be constructed after each infrequent change or the original image could be flushed using the Image.flush() method to decache any existing screen representations. These workarounds were inefficient or unwieldy for more frequent updates such as those involved in animations since the entire image had to be reconverted even for minor modifications to the data, or even worse requiring more garbage collection than strictly necessary to reclaim space used by old discarded versions of the image.

The new memory image animation API

To simplify this capability, new methods are being added to MemoryImageSource so that developers can notify the image that new data is available from the original array. Since the image conversion process only occurs when the data in the original array actually changes, drawImage can still execute very fast. The new methods are:
    setAnimated(boolean animated)
    setFullBufferUpdates(boolean animated)
    newPixels()
    newPixels(int x, int y, int w, int h)
    newPixels(int x, int y, int w, int h,
          boolean framenotify)
    newPixels(byte[] newpix, ColorModel newmodel,
          int offset, int scansize)
    newPixels(int[] newpix, ColorModel newmodel,
          int offset, int scansize)
These new methods give the developer control over when the screen representations are updated, which region of the pixels is updated, when ImageObserver.FRAMEBITS notifications (which indicate when a single "frame" of animation is complete) are sent to the image observers, and the ability to switch to a new set of pixels and ColorModel.

Sample Code

Following is sample code showing the use of the old API to perform memory image buffer animation:

    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;

    public class AnimationExample extends Applet implements Runnable {
        Thread anim;
    MemoryImageSource imgsrc;
    Image memimg;
    int[] pixels;

    public void init() {
        pixels = new int[100 * 100];
        imgsrc = new MemoryImageSource(100, 100, pixels, 0, 100);
        memimg = createImage(imgsrc);
    }

        public void start() {
        anim = new Thread(this);
        anim.start();
    }

    public synchronized void stop() {
        anim = null;
        notify();
    }

    public synchronized void run() {
        while (Thread.currentThread() == anim) {
            int x = (int) (Math.random() * 100);
            int y = (int) (Math.random() * 100);
        int r = (int) (Math.random() * 255);
        int g = (int) (Math.random() * 255);
        int b = (int) (Math.random() * 255);
        pixels[y * 100 + x] =
            ((int) (Math.random() * 0xffffff)) | (0xff<<24);
        memimg.flush();
        repaint();
        try {wait(100);} catch (InterruptedException e) {return;}
        }
    }

    public void paint(Graphics g) {
        // Draw the animated image
        g.drawImage(memimg, 0, 0, this);
    }
    }

Following is sample code showing the use of the new API to perform memory image buffer animation:

    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;

    public class AnimationExample extends Applet implements Runnable {
        Thread anim;
    MemoryImageSource imgsrc;
    Image memimg;
    int[] pixels;

    public void init() {
        pixels = new int[100 * 100];
        imgsrc = new MemoryImageSource(100, 100, pixels, 0, 100);
        imgsrc.setAnimated(true);
        memimg = createImage(imgsrc);
    }

        public void start() {
        anim = new Thread(this);
        anim.start();
    }

    public synchronized void stop() {
        anim = null;
        notify();
    }

    public synchronized void run() {
        while (Thread.currentThread() == anim) {
            int x = (int) (Math.random() * 100);
            int y = (int) (Math.random() * 100);
        int r = (int) (Math.random() * 255);
        int g = (int) (Math.random() * 255);
        int b = (int) (Math.random() * 255);
        pixels[y * 100 + x] =
            ((int) (Math.random() * 0xffffff)) | (0xff<<24);
        imgsrc.newPixels(x, y, 1, 1);
        repaint();
        try {wait(100);} catch (InterruptedException e) {return;}
        }
    }

    public void paint(Graphics g) {
        // Draw the animated image
        g.drawImage(memimg, 0, 0, this);
    }
    }

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


AWT PixelGrabber API updates

last updated: November 14, 1996

The Issue

The AWT image facility provides ways to retrieve or create images from many sources and to automate the process of displaying those images on the screen. The facility performs all of the required manipulations necessary on the image data behind an opaque external interface which shields users from all but the most abstract of image data information.

The interface provided is so opaque that in the initial development stages there was no direct way to access the pixel data of an image. The data could be accessed if a developer were willing to learn the intricacies of the complex ImageConsumer interface which is used by the image subsystem to communicate pixel data from image decoders to the screen, but most developers wanted an easier mechanism to get this data for the general case.

To satisfy this need a utility class was created to manage the ImageConsumer interface on behalf of the average developer who simply wanted to answer the question "What color is the pixel at location (x, y)?" The PixelGrabber class provided the ability to snapshot a rectangular region of pixels directly from an image's source to a Java integer array.

Three primary oversights have been identified with the interface provided by this class:

  • The data must be grabbed and stored into the array in the default ARGB (alpha RGB) convenience format Java uses for describing colors. The conversion process to convert the raw pixels into this format can consume a large amount of time especially when the developer only really needs the color information for isolated pixels scattered throughout the region of interest. Since the original ColorModel is discarded as the data is converted to the default representation, there is also no way to figure out what format the original data was in if that happens to be the desired goal of the process.
  • The developer must know what size array to create even before the data is snapshotted. Since many images do not know their dimensions until they load their data from the source for the first time, there can be a race condition where the developer must track the image loading until the dimensions are delivered and then instantiate a PixelGrabber and point it at the image source before the pixel data is delivered so that no data is lost requiring the image source to reload from scratch. Many developers would not even know how to best achieve this goal since the image progress is not very straightforward to track.
  • There was no way to start the grab operation without also waiting for the operation to complete and there was no way to stop the grab operation once started.

The new PixelGrabber methods

To enhance the capabilities of the PixelGrabber, new methods and constructors are being added:
    new PixelGrabber(Image img,
             int x, int y, int w, int h,
             boolean forceRGB)
    startGrabbing()
    abortGrabbing()
    getWidth()
    getHeight()
    getPixels()
    getColorModel()

Sample Code

Following is sample code showing the use of the new API to grab the pixels of an image of unknown dimensions in its original format:

    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;

    public class GrabExample extends Applet implements Runnable {
        Thread grab;
    Image img;
    PixelGrabber pg;

    public void init() {
        img = getImage(getDocumentBase(), "theImage.gif");
        pg = new PixelGrabber(img, 0, 0, -1, -1, false);
        // In reality, the init method shouldn't be kicking off
        // heavyweight operations like an image download, but
        // this demonstrates use of the asynchronous grabbing...
        pg.startGrabbing();
    }

        public void start() {
        grab = new Thread(this);
        grab.start();
    }

    public synchronized void stop() {
        grab.interrupt();
        grab = null;
    }

    public synchronized void run() {
        try {
        pg.grabPixels();
        repaint();
        } catch (InterruptedException e) {
        System.err.println("grab was interrupted");
        return;
        }
    }

    public void paint(Graphics g) {
        // Display some pixel values
        int status = pg.getStatus();
        if ((status & ABORT) != 0) {
        g.drawString("Image grab was aborted", 10, 100);
        } else if ((status & ALLBITS) != 0) {
        g.drawString("Image grab is complete", 10, 100);
        } else if ((status & FRAMEBITS) != 0) {
        g.drawString("Frame grab is complete", 10, 100);
        } else if ((status & SOMEBITS) != 0) {
        g.drawString("Image grab is under way", 10, 100);
        }
        if ((status & (WIDTH|ALLBITS|FRAMEBITS)) != 0) {
        FontMetrics fm = g.getFontMetrics();
        String caption = "First 3 pixels: ";
        int x = 10;
        int w = pg.getWidth();
        Object pix = pg.getPixels();
        ColorModel cm = pg.getColorModel();

        g.drawString(caption, x, 50);
        x += fm.stringWidth(caption);
        if (pix instanceof byte[]) {
            for (int i = 0; i

Send feedback to:java-awt@java.sun.com

Copyright © 1996, Sun Microsystems, Inc.   All rights
reserved.


Mouseless Operation

Java AWT: Mouseless Operation

Last Updated: February 3, 1997

Purpose

 Although typical GUIs today are designed to be driven with a mouse, there are numerous circumstances where mouseless operation in a GUI becomes important (and sometimes even critical) for usability. Some of those circumstances include:
  • Accelerated operation for the "power" user
  • Disabled access
  • Avoidance or treatment for RSI (repetitive stress injury)

AWT1.0 does not provide any explicit facilities for building mouseless operation into Java programs, except where the native peers components provide it by default (i.e. tabbed focus traversal, space-bar activation, etc.). For JDK1.1, the AWT will add some baseline support to better enable mouseless mode in Java programs, although it by no means provides a 100% solution to this problem. This support will be expanded in subsequent releases. The two features in the JavaTM platform since version 1.1 are:

  • Focus Traversal
  • Menu Shortcuts

Focus Traversal

Focus traversal is defined to be the ability to use keystrokes (not the mouse) to traverse components capable of accepting keyboard focus. Those keystrokes are defined to be <Tab> to move forward and <Shift-Tab> to move backward. Once the focus is owned by a component then it should be possible to activate/drive that component with further defined keystrokes (such as <space> to press a Button). It is the responsibility of the component (not the AWT), to implement the proper activation once it has focus

A component which is capable of accepting focus in this way should always render some form of visual feedback when it gets focus so that the user can easily see which component has focus as the user traverses using Tab/Shift-Tab. Typically this feedback takes the form of a colored bounding box drawn around the component.

The native toolkits on each platform provide varying degrees of support for focus traversal by default. However, explicit support for this has been implemented in the common java AWT code so that the behavior is more consistent across platforms.

The Focus Traversal API

The API is extremely simple; it consists of a new method on java.awt.Component and java.awt.peer.ComponentPeer:
    public boolean isFocusTraversable()

This method returns true if the component is a type inherently capable of accepting keyboard focus and returns false otherwise.

The reason this method also exists for the peer class is because the native peer components that are created by the AWT components have different traversal rules on different platforms. This allows the tailoring of this attribute appropriately on each platform (for example, on the Mac, Buttons cannot take focus, but on Motif and Win32, they can).

All existing AWT components should have this attribute set properly by default, but there is the option to subclass a component and override this method to return a value appropriate for your program. In particular, if you are subclassing java.awt.Canvas to build your own custom component that is designed to take keyboard focus, then you should do the following three things:

  1. override isFocusTraversable() to return true (Canvas returns false by default)
  2. catch the mouse-down event on the component and invoke requestFocus() (to implement click-to-type for your component)
  3. when your component gets focus, provide visual feedback indicating it has the focus

If your component does not adhere to the above steps, users may have trouble getting focus into your component.

The AWT internally tracks which component has the focus so that it can move the focus forward or backward in response to a Tab or Shift-Tab keyboard event. This is handled by a private FocusManager object that is registered on the Window. The FocusManager can manage this focus migration correctly, no matter how deeply nested a window's containers are. The order of this traversal will be equal to the order of the components contained in the containers; by default this will be equal to the order the children were added to the container, however the Container's add(Component c, int pos) method can be used to control this ordering. The FocusManager automatically checks to see if a "focusTraversable" component is both visible and active before it assigns it the focus (hence, the isFocusTraversable() method need not take this state into account for its return value).

Note: We realize that a more flexible mechanism for configuring the order of traversal is needed and we are currently working on a solution to that problem.

Menu Shortcuts

The goal for the AWT Shortcut API is to provide an easy way for application developers to provide shortcuts as an aid to menu navigation. This API only addresses menu shortcuts, and does not touch on any other mouseless menu navigation issues.

A Shortcut is defined to be a keyboard equivalent of a menu command, such that invoking the appropriate key combination will cause the same action to be initiated as if the menu item had been selected. Shortcuts are also known as keyboard equivalents or accelerators.

The Shortcuts API

The API consists of a class:
    java.awt.MenuShortcut

java.awt.MenuItem then has the following additional methods:

    public MenuItem(String label, MenuShortcut s)

    public MenuShortcut getShortcut()

    public void setShortcut(MenuShortcut s)

    public void deleteShortcut();

java.awt.MenuBar has the following additional methods:

    public MenuItem getShortcutMenuItem(MenuShortcut s);

    public Enumeration shortcuts();

    boolean handleShortcut(KeyEvent e);

    public void deleteShortcut(MenuShortcut s);

Modifiers

Application shortcuts all have a common key modifier per-platform:
  • <Command> on Macs
  • <Control> on Windows
  • <Control> Motif

Note: ALT isn't supposed to be used for application shortcuts, other than QUIT, which is already mapped by the AWT.

Although most of the shortcut API is implemented in shared code, one method has been added to java.awt.Toolkit to return the appropriate modifier per platform:

        public int getMenuShortcutKeyMask();

Visual Indicators

In order for users to learn and use menu shortcuts, it's important that a menu item display some visual indicator for the shortcut it supports. This will be handled automatically by the AWT, in a manner most appropriate for the given platform.

Sample Code

 The code to create menu-items in 1.0:
        menu.add(new MenuItem("Save..."));

        menu.add(new MenuItem("Send..."));

The code to create menu-items with shortcuts in 1.1:

        // Specify an 's' shortcut for save, and 'shift-s' for send.

        menu.add(new MenuItem("Save...", new MenuShortcut('s'));

        menu.add(new MenuItem("Send...", new MenuShortcut('s', true));

Send feedback to:java-awt@java.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Extensible Runtime Containment and Services Protocol for JavaBeans

CONTENTS | PREV | NEXT

Extensible Runtime Containment and Services Protocol for JavaBeans
Version 1.0

Send comments to java-beans@java.sun.com

1.0 Introduction

2.0 API

3.0 Overloading java.beans.instantiate() static

4.0 Providing better support for Beans that are also Applets

5.0 Standard/Suggested Conventions for BeanContext

6.0 Support

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

2.2 interface java.beans.beancontext.BeanContextChild1

Simple JavaBeans that do not require any support or knowledge of their environment shall continue to function as they do today. However both JavaBeans that wish to utilize their containing BeanContext, and BeanContexts that may be nested, require to implement a mechanism that enables the propagation of the reference to the enclosing BeanContext through to cognizant JavaBeans and nested BeanContexts, the interface proposed is:

public interface java.beans.beancontext.BeanContextChild {
    void        setBeanContext(BeanContext bc)
                throws PropertyVetoException;

    BeanContext getBeanContext();

    void addPropertyChangeListener
        (String name, PropertyChangeListener pcl);

     void removePropertyChangeListener
        (String name, PropertyChangeListener pcl);

    void addVetoableChangeListener
        (String name, VetoableChangeListener pcl);

     void removeVetoableChangeListener
        (String name, VetoableChangeListener pcl);

}
The expected usage is that some 3rd party shall invoke one of the appropriate methods defined on BeanContext (by virtue of its inheritance from Collection) in order to add a BeanContextChild to the membership of the target BeanContext. As a consequence the BeanContext shall attempt to set the BeanContextChild's "beanContext" property by invoking its setter method, setBeanContext(). Only a BeanContext may call a BeanContextChild's setBeanContext() method, since this is the mechanism that a BeanContext uses to notify a child that it is now has a new BeanContext value. Since this property is not directly settable or customizable by a user in the context of an application construction tool the BeanInfo for a BeanContextChild should set the hidden state for this property in order for builder tools to avoid presenting the property to the user for customization.

A BeanContextChild object may throw a PropertyVetoException, to notify the nesting BeanContext that it is unable to function/be nested within that particular BeanContext. Such a veto shall be interpreted by a BeanContext as an indication that the BeanContextChild has determined that it is unable to function in that particular BeanContext and is final.

During the un-nesting of a BeanContextChild from its BeanContext, it is possible for the child, or a 3rd party listening to the child's "beanContext" property for PropertyVetoEvents, to throw a PropertyVetoException to notify the caller that it is not in a state to be un-nested. In order to bound this interaction a BeanContextChild, or 3rd party, may veto the initial un-nesting notification, but may not veto any subsequent notifications, and must, upon receipt of such notifications, amend its state accordingly to prepare itself to be subsequently un-nested.

Note that classes that implement this interface, also act as an Event Source for (sub)interface(s) of java.beans.PropertyChangeListener, and are required to update their state accordingly and subsequently fire the appropriate java.beans.PropertyChangeEvent with propertyName = "beanContext", oldValue = the reference to the previous nesting BeanContext, and newValue = the reference to the new nesting BeanContext, to notify any Listeners that its nesting BeanContext has changed value.

BeanContextChild instances, or nested BeanContexts in the process of terminating themselves, shall invoke the remove() method on their nesting BeanContext in order to withdraw themselves from the hierarchy prior to termination.

2.2.1 Important Persistence considerations

Instances of BeanContextChild nested within an BeanContext, will typically define fields or instance variables that will contain references to their nesting BeanContext instance, and possibly services obtained from that BeanContextServices instance via its getService() method.

In order to ensure that the act of making such an instance persistent does not erroneously persist objects from the instances nesting environment, such instances shall be required to define such fields, or instance variables as either transient, or to implement custom persistence methods that avoid persisting such state.

This requirement is crucial since operations such as cutting and pasting object instances through a clipboard via object serialization will not function correctly if the act of serializing the target object also serializes much of the entire source environment it is nested within.

  1. I don't like this name much but I am struggling for a better alternative! (we are stuck with it)

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

3.0 Overloading java.beans.instantiate() static method

Since java.beans.instantiate() is the current mechanism for (re)instantiating JavaBeans we need to extend or overload the syntax and semantics of this method in order to accommodate the introduction of the BeanContext abstraction. The extension proposed is:

public static Object instantiate(ClassLoader cl,
                           String	      beanName,
                         BeanContext beanContext);
This method behaves has it is currently defined in the JavaBeans specification, but in addition to these existing semantics, when a non-null BeanContext is specified then the method invokes the add() method on the beanContext actual parameter with the value of the targetChild actual parameter = a reference to the newly instantiated JavaBean component.1

  1. Note: Since simple JavaBeans have no knowledge if a BeanContext, it is not advisable to introduce such instances into the hierarchy since there is no mechanism for these simple JavaBeans to remove themselves from the hierarchy and thus subsequently be garbage collected.

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

4.0 Providing better support for Beans that are also Applets

The current implementation of java.beans.instantiate() contains minimal support for instantiating JavaBeans that are also Applets. In particular, this method will currently construct an AppletContext and AppletStub for the newly instantiated JavaBean, set the stub on the newly instantiated Applet, and init() the Applet if it has not already been invoked.

Unfortunately this does not provide sufficient support in order to allow most Applets to be fully functional, since the AppletContext and AppletStub created by java.beans.instantiate(), are no-ops. This is a direct consequence of the lack of sufficient specification of how to construct AppletContext and AppletStub implementations in the existing Applet API's. Furthermore, even if such specifications existed we would require an API that propagated a number of Applet attributes such as its Codebase, Parameters, AppletContext, and Documentbase into java.beans.instantiate() in order for it to subsequently instantiate the appropriately initialized objects.

Since key to supporting fully functional Applets is to provide them with fully functional AppletContext and AppletStub instances, the design goal is to provide a mechanism to provide this state to instantiate() so that it may carry out the appropriate initialization and binding1, therefore the proposed interface is:

public static Object
              instantiate(ClassLoader 		cl,
                          String      		beanName,
                          BeanContext 		bCtxt,
                          AppletInitializer	ai

            );

public interface AppletInitializer {
    void initialize(Applet newApplet, BeanContext bCtxt);
    void activate(Applet newApplet);

}
If the newly instantiated JavaBean component is an instance of java.applet.Applet then the new constructed Applet, (Bean) will be passed to the AppletInitializer via a call to initialize().

Compliant implementations of AppletInitializer.initialize() shall:

  1. Associate the newly instantiated Applet with the appropriate AppletContext.
  2. Instantiate an AppletStub() and associate that AppletStub with the Applet via an invocation of setStub().
  3. If BeanContext parameter is null, then it shall associate the Applet with its appropriate Container by adding that Applet to its Container via an invocation of add(). If the BeanContext parameter is non-null, then it is the responsibility of the BeanContext to associate the Applet with its Container during the subsequent invocation of its addChildren() method.
Compliant implementations of AppletInitializer.activate() shall mark the Applet as active, and may optionally also invoke the Applet's start() method.

Note that if the newly instantiated JavaBean is not an instance of Applet, then the AppletInitializer interface is ignored.

  1. AppletContext objects expose a list of Applet objects they "contain", unfortunately the current Applet or AppletStub API's as defined, provide no mechanism for the AppletContext to discover its Applets from its AppletStubs, or for an AppletStub to inform its AppletContext of its Applet. Therefore we will have to assume that this binding/discovery can occur in order for this mechanism to be worthwhile in java.beans.instantiate().

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

2.0 API Specification

2.1 interface java.beans.beancontext.BeanContext

The hierarchal structure and general facilities of a BeanContext are provided for as follows:

public interface java.beans.beancontext.BeanContext
         extends java.beans.beancontext.BeanContextChild,
                 java.util.Collection,
                 java.beans.DesignMode,
                  java.beans.Visibility {

    Object instantiateChild(String beanName)
            throws IOException, ClassNotFoundException;

    public InputStream
        getResourceAsStream(String           name,
                            BeanContextChild requestor
        );

    public java.net.URL
        getResource(String           name,
                    BeanContextChild requestor
        );

    void addBeanContextMembershipListener(
            BeanContextMembershipListener bcml
          );

    void removeBeanContextMembershipListener{
            BeanContextMembershipListener bcml
    );

    public static final Object globalHierarchyLock;
}
Notifications of changes in the membership of a BeanContext are modeled as follows:

public interface BeanContextMembershipListener
       extends   java.util.Listener {
    void childrenAdded(BeanContextMembershipEvent   bcme);
    void childrenRemoved(BeanContextMembershipEvent bcme);

}
The base class of all BeanContext related Events is defined by:

public abstract class BeanContextEvent
       extends  java.util.EventObject {
    public BeanContext getBeanContext();

    public synchronized void
        setPropagatedFrom(BeanContext bc);

    public synchronized BeanContext getPropagatedFrom();

    public synchronized boolean isPropagated()

}
The BeanContextMembershipEvent is defined as:

public class BeanContextMembershipEvent
       extends BeanContextEvent {

    public BeanContextMembershipEvent(BeanContext bc,
                                      Object[]    deltas);

    public BeanContextMembershipEvent(BeanContext bc,
                                      Collection	 deltas);

    public int size();

    public boolean contains(Object child);

    public Object[] toArray();

    public Iterator iterator();

}

2.1.1 The BeanContext as a participant in nested structure

One of the roles of the BeanContext is to introduce the notion of a hierarchical nesting or structure of BeanContext and JavaBean instances. In order to model this structure the BeanContext must expose API that defines the relationships in the structure or hierarchy.

The BeanContext exposes its superstructure through implementation of the java.beans.beancontext.BeanContextChild interface (as described later). This interface allows the discovery and manipulation of a BeanContext's nesting BeanContext, and thus introduces a facility to create a hierarchy of BeanContexts.

The BeanContext exposes its substructure through a number of interface methods modeled by the java.util.Collection interface semantics

BeanContexts are required to implement all the mandatory Collection API's, with the following particular semantics for add() and remove():.

The add() method may be invoked in order to nest a new Object, BeanContextChild, or BeanContext within the target BeanContext. A conformant add() implementation is required to adhere to the following semantics:

  • Synchronize on the BeanContext.globalHierarchyLock.
  • Each child object shall appear only once in the set of children for a given BeanContext. If the instance is already a member of the BeanContext then the method shall return False.
  • Each valid child shall be added to the set of children of a given source BeanContext, and thus shall appear in the set of children, obtained through either the toArray(), or iterator() methods, until such time as that child is deleted from the nesting BeanContext via an invocation of remove(), removeAll(), retainAll(), or clear()
  • As the child is added to the set of nested children, and where that child implements the java.beans.beancontext.BeanContextChild interface (or BeanContextProxy, see later for details), the BeanContext shall invoke the setBeanContext() method upon that child, with a reference to itself. Upon invocation, a child may, if it is for some reason unable or unprepared to function in that BeanContext, throw a PropertyVetoException to notify the nesting BeanContext. If the child throws such an exception the BeanContext shall revoke the addition of the child (and any other partial changes made to the state of the BeanContext as a side effect of this addition operation) to the set of nested children and throw an IllegalStateException.
  • JavaBeans that implement the java.beans.Visibility interface shall be notified via the appropriate method, either dontUseGui() or okToUseGui(), of their current ability to render GUI as defined the policy of the BeanContext.
  • If the newly added child implements BeanContextChild, the BeanContext shall register itself with the child on both its VetoableChangeListener and PropertyChangeListener interfaces to monitor, at least, that BeanContextChild's "beanContext" property.
  • By doing so the BeanContext can monitor its child and can detect when such children are removed by a 3rd party (usually another BeanContext) invoking setBeanContext(). A BeanContext may veto such a change by a 3rd party if it determines that the child is not in a state to depart membership at that time.
  • If the JavaBean(s) added implement Listener interfaces that the BeanContext is a source for, then the BeanContext may register the newly added objects via the appropriate Listener registration methods as a permissible side effect of nesting.
  • If the JavaBean(s) added are Event Sources for Event that a particular BeanContext has interest in the BeanContext may, as a side effect of adding the child, register Listeners on that child. The BeanContext should avoid using Serializable Listeners thus avoiding accidental serialization of unwanted structure when a child serializes itself.
  • Once the targetChild has been successfully processed, the BeanContext shall fire a java.beans.beancontext.BeanContextMembershipEvent, containing a reference to the newly added targetChild, to the childrenAdded() method of all the BeanContextMemebrshipListeners currently registered.
  • The method shall return true if successful.
The remove() method may be invoked in order to remove an existing child JavaBean or BeanContext from within the target BeanContext. A conformant remove() implementation is required to adhere to the following semantics:

  • Synchronize with the BeanContext.globalHierarchyLock.
  • If a particular child is not present in the set of children for the source BeanContext, the method shall return False.
  • Remove the valid targetChild from the set of children for the source BeanContext, also removing that child from any other Listener interfaces that it was implicitly registered on, for that BeanContext as a side-effect of nesting.
  • Subsequently, if the targetChild implements the java.beans.beancontext.BeanContextChild interface (or BeanContextProxy, see later for deatils), the BeanContext shall invoke the setBeanContext() with a null1 BeanContext value, in order to notify that child that it is no longer nested within the BeanContext.
  • If a particular BeanContextChild is in a state where it is not able to be un-nested from its nesting BeanContext it may throw a PropertyVetoException, upon receipt of this the BeanContext shall revoke the remove operation for this instance and throw IllegalStateException. To avoid infinite recursion, children are not permitted to repeatedly veto subsequent remove notifications. In practice, a child should attempt to resolve the condition (if temporary) that precludes it's removal from it's current nesting BeanContext.
  • If the targetChild implements java.beans.beancontext.BeanContextChild then the BeanContext shall de-register itself from that child's PropertyChangeListener and VetoableChangeListener sources.
  • If the BeanContext had previously registered the object(s) removed as Listeners on events sources implemented by the BeanContext as a side effect of nesting those objects, then the BeanContext shall de-register the newly removed object from the applicable source(s) via the appropriate Listener de-registration method(s)
  • If the BeanContext had previously registered Listener(s) on the object(s) removed then the BeanContext shall remove those Listener(s) from those object(s).
  • Once the targetChild has been removed from the set of children, the BeanContext shall fire a java.beans.beancontext.BeanContextMembershipEvent, containing a reference to the targetChild just removed, to the childrenRemoved() method of all the BeanContextMembershipListeners currently registered.
  • Finally the method shall return the value true if successful.
Note that the lifetime of any child of a nesting BeanContext, is at least for the duration of that child's containment within a given BeanContext. For simple JavaBeans that are not aware of their containment within a BeanContext, this usually implies that the JavaBean shall exist for at least the lifetime of the nesting BeanContext.

BeanContext's are not required to implement either addAll(), removeAll(), retainAll() or clear() optional methods defined by java.util.Collection API, however if they do they must implement the semantics defined, per object, for both add() and remove() above. In the failure cases these methods shall revoke any partially applied changes to return the BeanContext to the state it was in prior to the failing composite operation being invoked, no BeanContextEvents shall be fired in the failure case as is consistent with the definition of add() and remove() above.

BeanContextMembershipListeners may be added and removed via invocations of addBeanContextMembershipListener() and removeBeanContextMembershipListener().

The toArray(), method shall return a copy of the current set of JavaBean or BeanContext instances nested within the target BeanContext, and the iterator() method shall supply a java.util.Iterator object over the same set of children.

The contains() method shall return true if the object specified is currently a child of the BeanContext.

The size() method returns the current number of children nested.

The isEmpty() method returns true if the BeanContext has no children.

Note that all the Collection methods all require proper synchronization between each other by a given implementation in order to function correctly in a multi-threaded environment, that is, to ensure that any changes to the membership of the set of JavaBeans nested within a given BeanContext are applied atomically. All implementations are required to synchronized their implementations of these methods with the BeanContext.globalHierarchyLock.

In some situations, add() and remove() (or a variant thereof) operations may occur nested, that is multiple occurrences may appear on the stack of the calling Thread simultaneously, e.g: when BeanContextChild, A, is added (or removed), it's setBeanContext() method also adds (or removes) another BeanContextChild, B. A particular BeanContext implementation may choose to fire either two BeanContextMembershipListener notifications, one for each add()/remove() operation of B then A (in this order since B is successfully added before A), or coalesce these into a single notification containing both A, and B. Note that should A be unable to be added or removed for any reason it shall not perform, or undo, any add or remove operations upon B as a side-effect, prior to throwing a PropertyVetoException to indicate this condition, that is, it must avoid or undo any side-effect membership changes prior to rejecting any changes to its own membership status.

The instantiateChild() method is a convenience method that may be invoked to instantiate a new JavaBean instance as a child of the target BeanContext. The implementation of the JavaBean is derived from the value of the beanName actual parameter, and is defined by the java.beans.Beans.instantiate() method.

Typically, this shall be implemented by calling the appropriate java.beans.Beans.instantiate() method, using the ClassLoader of the target BeanContext. However a particular BeanContext implementation may interpose side-effects on the instantiate operation in their implementation of this method.

The BeanContextEvent is the abstract root EventObject class for all Events pertaining to changes in state of a BeanContext's defined semantics. This abstract root class defines the BeanContext that is the source of the notification, and also introduces a mechanism to allow the propagation of BeanContextEvent subclasses through a hierarchy of BeanContexts. The setPropagatedFrom() and getPropagatedFrom() methods allows a BeanContext to identify itself as the source of a propagated Event to the BeanContext to which it subsequently propagates the Event to. This is a general propagation mechanism and should be used with care as it has significant performance implications when propagated through large hierarchies.

The BeanContextMembershipEvent describes changes that occur in the membership of a particular BeanContext instance. This event encapsulates the list of children either added to, or removed from, the membership of a particular BeanContext instance, i.e the delta in the membership set.

Whenever a successful add(), remove(), addAll(), retainAll(), removeAll(), or clear() is invoked upon a particular BeanContext instance, a BeanContextMembershipEvent is fired describing the children effected by the operation.

2.1.2 Resources.

The BeanContext defines two methods; getResourceAsStream() and getResource() which are analogous to those methods found on java.lang.ClassLoader. BeanContextChild instances nested within a BeanContext shall invoke the methods on their nesting BeanContext in preference for those on ClassLoader, to allow a BeanContext implementation to augment the semantics by interposing behavior between the child and the underlying ClassLoader semantics.

2.1.3 The BeanContext as a Service Provider

The service facilities of a BeanContext are provided as follows:

public interface BeanContextServices
       extends   BeanContext,BeanContextServicesListener {

    boolean addService(Class           serviceClass,
                       BeanContextServiceProvider service);

    boolean revokeService(Class           serviceClass,
                          BeanContextServiceProvider bcsp,
                          boolean         revokeNow
    );

    boolean hasService(Class serviceClass);

    Object getService(BeanContextChild      bcc,
                      Object                requestor.
                      Class                 serviceClass,
                      Object                serviceSelector,
                      BeanContextServicesRevokedListener sl
    ) throws TooManyListenersException;

    void releaseService(BeanContextChild bcc,
                        Object           requestor,
                        Object           service);

    Iterator getCurrentServiceClasses();

    public Iterator getCurrentServiceSelectors(Class sc);

    addBeanContextServicesListener(
        BeanContextServicesListener bcsl
    );

    removeBeanContextServicesListener(
        BeanContextServicesListener bcsl
     );
}
The BeanContextServiceProvider interface is defined as follows:

public interface BeanContextServiceProvider {
    Object getService(BeanContext bc,
                      Object      requestor,
                      Class       serviceCls,
                      Object      serviceSelector);

    void releaseService(BeanContext bc,
                        Object      requestor,
                        Object      service);

    Iterator getCurrentServiceSelectors(BeanContext bc,
                                        Class serviceCls);
}
The BeanContextServiceRevokedListener is defined as follows:
public interface BeanContextServiceRevokedListener
       extends java.util.EventListener {
    void serviceRevoked(
        BeanContextServiceRevokedEvent bcsre
    );
}
The BeanContextServicesListener is defined as follows:

public interface BeanContextServicesListener
       extends BeanContextServiceRevokedListener {
    void serviceAvailable(
        BeanContextServiceAvailableEvent bcsae
    );
}
The BeanContextServiceAvailableEvent is defined as follows:

public class BeanContextServiceAvailableEvent
       extends BeanContextEvent {

    public BeanContextServiceAvailableEvent(
            BeanContextServices        bcs,
            Class                      sc
     );

    BeanContextServices getSourceAsBeanContextServices();

    public Class getServiceClass();

    public boolean isServiceClass(Class serviceClass);

    public Iterator getCurrentServiceSelectors();

}
The BeanContextServiceRevokedEvent is defined as follows:

public class BeanContextServiceRevokedEvent
       extends BeanContextEvent {
    public BeanContextServiceRevokedEvent(
                BeanContextServices        bcs,
                Class                      sc,
                boolean                    invalidNow
    );

    public BeanContextServices
            getSourceAsBeanContextServices();

    public Class getServiceClass();

    public boolean isServiceClass(Class service);

    public boolean isCurrentServiceInvalidNow();
}
The BeanContextServiceProviderBeanInfo is defined as follows:

public interface BeanContextServicesProviderBeanInfo
       extends   java.beans.BeanInfo {
    java.beans.BeanInfo[] getServicesBeanInfo();
}
Apart from providing a structured hierarchy, the other major role of a BeanContext is to provide a standard mechanism for a JavaBean component to obtain context-specific facilities or services from its environment.

A service, represented by a Class object, is typically a reference to either an interface, or to an implementation that is not publicly instantiable. This Class defines an interface protocol or contract between a BeanContextServiceProvider, the factory of the service, and an arbitrary object associated with a BeanContextChild that is currently nested within the BeanContext the service is registered with. Typically such protocols encapsulate some context specific or sensitive behavior that isolates a BeanContextChild's implementation from such dependencies thus resulting in simpler implementations, greater interoperability and portability.

A BeanContextServiceProvider, is a "factory" for one or more services. It registers itself with a particular BeanContextServices via it's adService() method, if the service is not already registered with the BeanContextServices, the BeanContextServices associates the service specified with the BeanContextServiceProvider, and fires a BeanContextServiceAvailableEvent via the serviceAvailable() method to those BeanContextServicesListeners currently registered, then returns true, otherwise false indicating that the service is already registered for that BeanContextServices.

Once registered, and until revoked, the service is available via the BeanContextServices getService() method.

The hasService() method may be used to test the presence of a particular service, and the getCurrentServices() method returns an iterator over the currently available services for that BeanContextServices.

A BeanContextChild or any arbitrary object associated with a BeanContextChild, may obtain a reference to a currently registered service from its nesting BeanContextServices via an invocation of the getService() method. The getService() method specifies; the BeanContextChild, the associated requestor, the Class of the service requested, a service dependent parameter (known as a Service Selector), and a BeanContextServicesRevokedListener used to subsequently notify the requestor that the service class has been revoked by the BeanContextServiceProvider. The Listener is registered automatically with a unicast event source per requestor and service class and is automatically unregistered when a requestor relinquishes all references of a given service class, or as a side effect of the service being "forcibly revoked" by the providing BeanContextServiceProvider.

The BeanContextServices passes this getService() invocation onto the associated BeanContextServiceProvider (if any) to be satisfied via an invocation of its getService() method. The BeanContextServiceProvider is passed the BeanContext, the Class of the service provided, the service dependent service parameter (the Service Selector) and a reference to the object requesting the service.

The reference to the BeanContext is intended to enable the BeanContextServiceProvider to distinguish service requests from multiple sources. A BeanContextServiceProvider is only permitted to retain a weak reference to any BeanContext so obtained.

The Service Selector parameter is a service dependent value used by a service requestor for a particular service in order to parameterize the service to be provided to it by the BeanContextServiceProvider. Some examples of its usage are; a parameter to a constructor for the service implementation class; a value for a particular service's property, or as a key into a map of existing implementations.

The reference to the requestor is intended to permit the BeanContextServiceProvider to interrogate the state of the requestor in order to perform any customization or parameterization of the service, therefore this reference shall be treated as immutable by the BeanContextServicesProvider. Additionally the BeanContextServiceProvider is permitted to retain only weak and immutable reference to both the requestor and the BeanContextChild after returning from the getService() invocation.

The BeanContextServiceProvider may satisfy the request, returning a reference to an instance of the Class of the requested service (such that the reference returned shall result in the expression: <serviceRefence> instanceof <serviceClass> being true), return null, or throw an unchecked exception.

In the case when a nested BeanContextServices is requested for a particular service that it has no BeanContextServiceProvider for, then the BeanContextServices may delegate the service requested to its own nesting BeanContextServices in order to be satisfied. Thus delegation requests can propagate from the leaf BeanContextServices to the root BeanContextServices.

A BeanContextChild may query a particular BeanContextServices for a list of currently available Service Classes (via the getCurrentServiceClasses() method)and any associated Service Selectors, if a particular service Class implements a finite list of apriori values for a Service Class, via its nesting BeanContextServices.getCurrentServiceSelectors() method, which in turn obtains the currently available Service Selectors (if any) via the BeanContextServiceProvider.getCurrentServiceSelectors() method.

If the service in question does not implement a finite set of apriori values for the set of valid Service Selectors it shall return null.

A reference obtained by a BeanContextChild via getService() is valid until the reference is released by the BeanContextChild via an invocation of its nesting BeanContextServices releaseService() method, except in the case where the BeanContextServices fires a BeanContextServiceRevokedEvent and that Event's isCurrentServiceInvalidNow() method returns true, in this case the BeanContextServices and/or the BeanContextServiceProvider that provided the service has determined that current service references are immediately invalidated, or "forcibly revoked" (this typically occurs in the following situation).

When BeanContextChild instances are removed from a particular BeanContextServices instance, they shall discard all references to any services they obtained from that BeanContextServices by appropriate invocations of releaseService(). If the un-nesting BeanContextChild is also a BeanContextServices instance, and if any of these service references have been exposed to the un-nesting BeanContextServices's own members as a result of a delegated getService() request as defined above, the BeanContextServiecs shall fire a BeanContextServiceRevokedEvent to notify its nested children that the service(s) are "forcibly revoked". This immediate invalidation of current references to delegated services at un-nesting is to ensure that services that are dependent upon the structure of the hierarchy are not used by requestors after their location in the structure has changed.

BeanContextChild instances receiving a "forcable revocation" of a Service Class shall not invoke releaseService() for any references it may hold of that type, since in this case, the BeanContextServiceProvider or the BeanContextServices that provided the service reference to that BeanContextChild has already invalidated all references to that service on their behalf.

A BeanContextServiceProvider may revoke a Service Class at any time after it has registered it with a BeanContextServices by invoking its revokeService() method. Once the BeanContextServices has fired a BeanContextServiceRevokedEvent notifying the currently registered BeanContextServiceRevokedListeners and the BeanContextServicesListeners that the service is now unavailable it shall no longer satisfy any new service requests for the revoked service until (if at all) that Service Class is re-registered. References obtained by BeanContextChild requestors to a service prior to its being revoked remain valid, and therefore the service shall remain valid to satisfy those extant references, until all references to that service are released, unless in exceptional circumstances the BeanContextServiceProvider, or BeanContextServices, when revoking the service, wants to immediately terminate service to all the current references. This immediate revocation is achieved by invoking the BeanContextServices .revokeService() method with an actual parameter value of revokeNow == true. Subsequent to immediate invalidation of current service references the service implementation may throw a service specific unchecked exception in response to any attempts to continue to use the revoked service by service requestors that have erroneously retained references to the service, ignoring the earlier immediate revocation notification.

Note that in order to function correctly (when delegating service requests) in a multi-threaded environment, implementations of BeanContextServices are required to synchronize their implementations of; addService(), hasService(), getCurrentServiceClasses(), getCurrentServiceSelectors(), getService(), releaseService() and revokeService() with the BeanContext.globalHierarhyLock.

A BeanContextServicesProvider may expose the BeanInfo for the Service Classes it provides implementations for by providing a BeanInfo class that implements BeanContextServicesProviderBeanInfo. Thus exposing an array of BeanInfo's, one for each Service Class supported. Builder tools can, for example, use this infomation to provide application developers with a palette of Servlice Classes for inclusion in an application.

2.1.4 The role of a BeanContext in Persistence

Since one of the primary roles of a BeanContext is to represent a logical nested structure of JavaBean component and BeanContext instance hierarchies, it is natural to expect that in many scenarios that hierarchy should be persistent, i.e that the BeanContext should participate in persistence mechanisms, in particular, either java.io.Serializable or java.io.Externalizable (If the latter the BeanContext is responsible for acting as the persistence container for the sub-graph of children, encoding and decoding the class information, and maintaining sub-graph equivalence after deserialization, basically the function(s) provide for serialization by ObjectOutputStream and ObjectInputStream).

In particular BeanContexts shall persist and restore their current children that implement the appropriate persistence interfaces when they themselves are made persistent or subsequently restored.

As a result of the above requirement, persistent BeanContextChild implementations are required to not persist any references to either their nesting BeanContext, or to any Delegates obtained via its nesting BeanContextServices.

BeanContexts shall, when restoring an instance of BeanContextChild from its persistence state, be required to perform the equivalent of invoking add()on the newly instantiated BeanContextChild,, in order to notify the newly restored instance of its nesting BeanContext, thus allowing that BeanContextChild to fully reestablish its dependencies on its environment.

Also note that since BeanContext implements java.beans.beancontext.BeanContextChild it shall obey the persistence requirements defined below for implementors of that interface.

2.1.5 BeanContext with associated presentation hierarchies

Although not required, many BeanContexts may be associated within a presentation hierarchy of java.awt.Containers and java.awt.Components. A Container cannot implement BeanContext directly2 but may be associated with one by implementing the BeanContextProxy interface described herein.

public interface BeanContextProxy {
    BeanContext getBeanContext();
}
For instances of classes that do not (or cannot in the case of Component or subclasses thereof) directly implement the BeanContext interface, but are associated with an instance of such an implementation, (via delegation) such instances may expose this association by implementing the BeanContextProxy interface. By doing so, this enables arbitrary 3rd parties, such as builder tools, to interrogate and discover the BeanContext associated with such objects for the purposes of either nesting objects within that associated BeanContext, observing changes in the membership, or obtaining services thereof.

This also permits multiple distinct objects (e.g: Containers) to share a single BeanContext. [Note though that in this case a shared BeanContext shall not implement BeanContextContainerProxy since that is a peer-to-peer relationship between a single BeanContext and the Container implementing that interface]

The value returned from getBeanContext() is constant for the lifetime of the implementing instance, that is the relationship between a BeanContextProxy and it's associated BeanContext is static and thus may not change for the lifetime of either participant.

No class may implement both the BeanContext (or BeanContextChild) and the BeanContextProxy interfaces, they are mutually exclusive.

Some BeanContextProxy implementors may also implement java.util.Collection, or some other collection-like API (e.g java.awt.Container), in addition to, and possibly distinct from, maintaining a BeanContext based Collection.

In such cases it is possible to add, or remove, elements from either the BeanContext, via it's Collection API's, or the BeanContextProxy implementor using it's own collection-like API's (e.g: public boolean java.awt.Container.add(Component)). It is implementation dependent whether or not objects added or removed from either the BeanContext's Collection, or the BeanContextProxy implementor's collection are also added or removed from the corresponding object's collection (i.e: should a Container.add() also infer a BeanContext.add() and vica-versa?). In such situations both participants (the implementor of BeanContextProxy and the BeanContext itself) are required to; 1) implement the same add/remove semantics as the other (i.e: if x.add(o) has a side effect of x.getBeanContext().add(o) then x.getBeanContext().add(o) should also a have side effect of x.add(o)), and 2) before adding/removing an object to/from the other participants collection, it should test (synchronized) if that object is/is not a member of the other participants collection before proceeding with the operation in question (this is to avoid infinite recursion between collection operations on both participants) (i.e: x.add(o) should not invoke x.getBeanContext().add(o) if x.getBeanContext().contains(o) is true and vica-versa).

It is important to note that if an object that implements BeanContextProxy is added to , or removed from, a BeanContext, that in addition to the operation performed on that object, the same operation should be performed on the BeanContext returned from BeanContextProxy.getBeanContext(). That is an implementor of BeanContextProxy shall be treated as though it directly implemented BeanContext by any nesting BeanContext. (and vica-versa if the operation is applied to the BeanContext its shall also be applied to the corresponding BeanContextProxy)

The following interface is defined to allow a BeanContext to expose a reference to an associated Container to enable it's BeanContextChild members to add, or remove, their associated Component objects to/from that Container or to inspect some state on the Container.

public interface BeanContextContainerProxy {
    Container getContainer()
}
When a BeanContextChild with an associated Component is added to a BeanContext with an associated Container there are three models of interaction that can occur in relation to the nesting of the Component in the Container as a result:

  1. If the associated Component was added to the associated Container via a Container API, then the nesting of the BeanContextChild in the BeanContext is a side effect of that and no further action is required.
  2. If the Component and Container are not nested then the nesting BeanContext may as a side effect cause the Component associated with the BeanContextChild to be added to it's associated Container.

    OR

  3. If the Component and Container are not nested then the BeanContextChild being nested may as a side effect may cause it's Component to be associated with the Container associated with the nesting BeanContext.
Thus, for greatest interoperability a BeanContextChild shall always check if its Compoent's parent is the BeanContext Container, and if it is not, then it may add itself if appropriate. Thus a BeanContextChild may function correctly under all scenarios.

The BeanContextChild is responsible for initially causing itself to eligible to be displayed via an invocation of show() [note that the BeanContextChild may also subsequently repeatedly hide() and show() itself].

The nesting BeanContext, or its associated Container, may subsequently hide() or show() the BeanContextChild's Component arbitrarily, but it is strongly recommended that it treat that Component as immutable in all other respects with the exception of registering Listeners to obtain event notifications, or where other Component/Container specific protocols permit or require the Container to alter the state of its Component containees. An example of such a permitted interaction would be where a property such as background or foreground color were propagated from Container to Component.

Once a BeanContextChild has been un-nested from it's BeanContext, it's associated Component (if any) shall be removed from that BeanContext's Container as a side effect of the removal operation, this is the responsibility of the BeanContext (typically if the BeanContextChild has been moved to another BeanContext with an associated Container via an invocation of it's setBeanContext() method, the Component will already have been re-parented as a side effect of that operation by the time the original BeanContext is notified of the change via a PropertyChangeEvent from the child, however the check should be made and the Component removed if it has not already occurred).

To avoid infinite recursion, both a BeanContext and a BeanContextChild that also are associated with a Container and Component nesting relationship should avoid undoing any changes applied to the Component by the other party in the relationship. In general the BeanContext is responsible for the appearance, visibility and relative layout of the BeanContextChild's Component, and the BeanContextChild is responsible for the Component's state and content pertaining to the application functionality it is implementing.

The value returned from the getContainer() method is constant for the lifetime of the implementing BeanContext, that is the relationship between a BeanContext and a Container is static for the lifetime of both participants.

In addition the following interface is also defined:

public interface BeanContextChildComponentProxy {
    Component getComponent();
}
A BeanContext or a BeanContextChild may implement this interface to expose the GUI Component that it is associated with to it's nesting BeanContext. A BeanContext may use this method to establish the relationship between references to instances of Component and BeanContextChild that are known to it, where a BeanContextChild and Component are not implemented by the same object instance (that is the BeanContextChild delegates its Component implementation to a distinct object rather than inheriting from Component]. A BeanContext may interrogate the Component reference it obtains from a nested BeanContextChild in order to determine its state, and it may also register Listeners for particular events, however it is strongly recommended that the BeanContext treat the reference as generally immutable to avoid changing the Component state.

The value returned from the getComponent() method is a constant for the lifetime of that BeanContextChild.

In the situation where a BeanContext has an associated Container, but does not wish to expose that Container by implementing the BeanContextContainerProxy interface, but wishes to handle the nesting of an arbitrary BeanContextChild's associated Component (exposed by the BeanContextChild either implementing the BeanContextChildComponentProxy interface or as direct subclass of Component) the BeanContext is permitted to add/remove that Component to/from its associated Container.In such cases the BeanContextChild and it's associated Component implementation shall not interfere with this action.

If a class implements both BeanContextChildComponentProxy and BeanContextContainerProxy then the object returned by both getComponent() and getContainer() shall be the same object.

  1. Note, it the remove() was invoked as a result of the BeanContext receiving an unexpected PropertyChangeEvent notification as a result of a 3rd party invoking setBeanContext() then the remove implementation shall not invoke setBeanContext(null) on that child as a part of the remove() semantics, since to do so would overwrite the value previously set by the 3rd party.

  2. Unfortunately because of method name collisions between Component and Collection a Component cannot implement BeanContext or Collection directly and must model the capability with a "HasA" rather than an "IsA" relationship.

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


Collections Framework Change Summary

Java

Collections Framework API Change Summary
This page summarizes the differences between the 1.2 and 1.3 releases of the Collections Framework, along with a brief rationale for each change.

Convenience Implementations

  • Added singletonList and singletonMap. Previously, there was a convenience implementation for singleton Set, but no corresponding implementation for List and Map.
  • Added EMPTY_MAP. Previously, there were constants for the empty Set and List, but no corresponding constant for Map.

Special-purpose Implementation

  • Added Map constuctor for WeakHashMap. The Map interface dictates that most Map implementations should have a "copy constructor" that takes a Map argument. WeakHashMap lacked such a constructor in the 1.2 release.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: collections-comments@java.sun.com 		Sun
Java Software


Collections Framework Overview

Introduction

The Java 2 platform includes a new collections framework. A collection is an object that represents a group of objects (such as the familiar Vector class). A collections framework is a unified architecture for representing and manipulating collections, allowing them to be manipulated independently of the details of their representation.

The primary advantages of a collections framework are that it:

  • Reduces programming effort by providing useful data structures and algorithms so you don't have to write them yourself.
  • Increases performance by providing high-performance implementations of useful data structures and algorithms. Because the various implementations of each interface are interchangeable, programs can be easily tuned by switching implementations.
  • Provides interoperability between unrelated APIs by establishing a common language to pass collections back and forth.
  • Reduces the effort required to learn APIs by eliminating the need to learn multiple ad hoc collection APIs.
  • Reduces the effort required to design and implement APIs by eliminating the need to produce ad hoc collections APIs.
  • Fosters software reuse by providing a standard interface for collections and algorithms to manipulate them.

The collections framework consists of:

  • Collection Interfaces - Represent different types of collections, such as sets, lists and maps. These interfaces form the basis of the framework.
  • General-purpose Implementations - Primary implementations of the collection interfaces.
  • Legacy Implementations - The collection classes from earlier releases, Vector and Hashtable, have been retrofitted to implement the collection interfaces.
  • Wrapper Implementations - Add functionality, such as synchronization, to other implementations.
  • Convenience Implementations - High-performance "mini-implementations" of the collection interfaces.
  • Abstract Implementations - Partial implementations of the collection interfaces to facilitate custom implementations.
  • Algorithms - Static methods that perform useful functions on collections, such as sorting a list.
  • Infrastructure - Interfaces that provide essential support for the collection interfaces.
  • Array Utilities - Utility functions for arrays of primitives and reference objects. Not, strictly speaking, a part of the Collections Framework, this functionality is being added to the Java platform at the same time and relies on some of the same infrastructure.

Collection Interfaces

There are six collection interfaces. The most basic interface is Collection. Three interfaces extend Collection: Set, List, and SortedSet. The other two collection interfaces, Map and SortedMap, do not extend Collection, as they represent mappings rather than true collections. However, these interfaces contain collection-view operations, which allow them to be manipulated as collections.

All of the modification methods in the collection interfaces are labeled optional. Some implementations may not perform one or more of these operations, throwing a runtime exception (UnsupportedOperationException) if they are attempted. Implementations must specify in their documentation which optional operations they support. Several terms are introduced to aid in this specification:

  • Collections that do not support any modification operations (such as add, remove and clear) are referred to as unmodifiable. Collections that are not unmodifiable are referred to modifiable.
  • Collections that additionally guarantee that no change in the Collection object will ever be visible are referred to as immutable. Collections that are not immutable are referred to as mutable.
  • Lists that guarantee that their size remains constant even though the elements may change are referred to as fixed-size. Lists that are not fixed-size are referred to as variable-size.

Some implementations may restrict what elements (or in the case of Maps, keys and values) may be stored. Possible restrictions include requiring elements to:

  • Be of a particular type.
  • Be non-null.
  • Obey some arbitrary predicate.

Attempting to add an element that violates an implementation's restrictions results in a runtime exception, typically a ClassCastException, an IllegalArgumentException or a NullPointerException. Attempting to remove or test for the presence of an element that violates an implementation's restrictions may result in an exception, though some "restricted collections" may permit this usage.

Collection Implementations

Class that implement the collection interfaces typically have names of the form <Implementation-style><Interface>. The general purpose implementations are summarized in the table below:
 |  | Implementations
 |  | Hash Table | Resizable Array | Balanced Tree | Linked List
Interfaces | Set | HashSet |  | TreeSet |
 | List |  | ArrayList |  | LinkedList
 | Map | HashMap |  | TreeMap |

The general-purpose implementations support all of the optional operations in the collection interfaces, and have no restrictions on the elements they may contain. They are unsynchronized, but the Collections class contains static factories called synchronization wrappers that may be used to add synchronization to any unsynchronized collection. All of the new implementations have fail-fast iterators, which detect illegal concurrent modification, and fail quickly and cleanly (rather than behaving erratically).

The AbstractCollection, AbstractSet, AbstractList, AbstractSequentialList and AbstractMap classes provide skeletal implementations of the core collection interfaces, to minimize the effort required to implement them. The API documentation for these classes describes precisely how each method is implemented so the implementer knows which methods should be overridden, given the performance of the "basic operations" of a specific implementation.

Design Goals

The main design goal was to produce an API that was reasonably small, both in size, and, more importantly, in "conceptual weight." It was critical that the new functionality not seem alien to current Java programmers; it had to augment current facilities, rather than replacing them. At the same time, the new API had to be powerful enough to provide all the advantages described above.

To keep the number of core interfaces small, the interfaces do not attempt to capture such subtle distinctions as mutability, modifiability, resizability. Instead, certain calls in the core interfaces are optional, allowing implementations to throw an UnsupportedOperationException to indicate that they do not support a specified optional operation. Of course, collection implementers must clearly document which optional operations are supported by an implementation.

To keep the number of methods in each core interface small, an interface contains a method only if either:

  1. It is a truly fundamental operation: a basic operations in terms of which others could be reasonably defined,
  2. There is a compelling performance reason why an important implementation would want to override it.

It was critical that all reasonable representations of collections interoperate well. This included arrays, which cannot be made to implement the Collection interface directly without changing the language. Thus, the framework includes methods to allow collections to be dumped into arrays, arrays to be viewed as collections, and maps to be viewed as collections.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: collections-comments@java.sun.com 		Sun
Java Software


Java Collections API Design FAQ
This document answers frequently asked questions concerning the design of the Java collections framework. It is derived from the large volume of traffic on the collections-comments alias. It serves as a design rationale for the collections framework.

Core Interfaces - General Questions

  1. Why don't you support immutability directly in the core collection interfaces so that you can do away with optional operations (and UnsupportedOperationException)?

  2. Won't programmers have to surround any code that calls optional operations with a try-catch clause in case they throw an UnsupportedOperationException?

  3. Why isn't there a core interface for "bags" (AKA multisets)?

  4. Why don't you provide for "gating functions" that facilitate the implementation of type-safe collections?

  5. Why didn't you use "Beans-style names" for consistency?

Collection Interface

  1. Why doesn't Collection extend Cloneable and Serializable?

  2. Why don't you provide an "apply" method in Collection to apply a given method ("upcall") to all the elements of the Collection?

  3. Why didn't you provide a "Predicate" interface, and related methods (e.g., a method to find the first element in the Collection satisfying the predicate)?

  4. Why don't you provide a form of the addAll method that takes an Enumeration (or an Iterator)?

  5. Why don't the concrete implementations in the JDK have Enumeration (or Iterator) constructors?

  6. Why don't you provide an Iterator.add method?

List Interface

  1. Why don't you rename the List interface to Sequence; doesn't "list" generally suggest "linked list"? Also, doesn't it conflict with java.awt.List?

  2. Why don't you rename List's set method to replace, to avoid confusion with Set.

Map Interface

  1. Why doesn't Map extend Collection?

Iterator Interface

  1. Why doesn't Iterator extend Enumeration?

  2. Why don't you provide an Iterator.peek method that allows you to look at the next element in an iteration without advancing the iterator?

Miscellaneous

  1. Why did you write a new collections framework instead of adopting JGL (a preexisting collections package from ObjectSpace, Inc.) into the JDK?

  2. Why don't you eliminate all of the methods and classes that return "views" (Collections backed by other collection-like objects). This would greatly reduce aliasing.

  3. Why don't you provide for "observable" collections that send out Events when they're modified?

Core Interfaces - General Questions

  1. Why don't you support immutability directly in the core collection interfaces so that you can do away with optional operations (and UnsupportedOperationException)?

    This is the most controversial design decision in the whole API. Clearly, static (compile time) type checking is highly desirable, and is the norm in Java. We would have supported it if we believed it were feasible. Unfortunately, attempts to achieve this goal cause an explosion in the size of the interface hierarchy, and do not succeed in eliminating the need for runtime exceptions (though they reduce it substantially).

    Doug Lea, who wrote a popular Java collections package that did reflect mutability distinctions in its interface hierarchy, no longer believes it is a viable approach, based on user experience with his collections package. In his words (from personal correspondence) "Much as it pains me to say it, strong static typing does not work for collection interfaces in Java."

    To illustrate the problem in gory detail, suppose you want to add the notion of modifiability to the Hierarchy. You need four new interfaces: ModifiableCollection, ModifiableSet, ModifiableList, and ModifiableMap. What was previously a simple hierarchy is now a messy heterarchy. Also, you need a new Iterator interface for use with unmodifiable Collections, that does not contain the remove operation. Now can you do away with UnsupportedOperationException? Unfortunately not.

    Consider arrays. They implement most of the List operations, but not remove and add. They are "fixed-size" Lists. If you want to capture this notion in the hierarchy, you have to add two new interfaces: VariableSizeList and VariableSizeMap. You don't have to add VariableSizeCollection and VariableSizeSet, because they'd be identical to ModifiableCollection and ModifiableSet, but you might choose to add them anyway for consistency's sake. Also, you need a new variety of ListIterator that doesn't support the add and remove operations, to go along with unmodifiable List. Now we're up to ten or twelve interfaces, plus two new Iterator interfaces, instead of our original four. Are we done? No.

    Consider logs (such as error logs, audit logs and journals for recoverable data objects). They are natural append-only sequences, that support all of the List operations except for remove and set (replace). They require a new core interface, and a new iterator.

    And what about immutable Collections, as opposed to unmodifiable ones? (i.e., Collections that cannot be changed by the client AND will never change for any other reason). Many argue that this is the most important distinction of all, because it allows multiple threads to access a collection concurrently without the need for synchronization. Adding this support to the type hierarchy requires four more interfaces.

    Now we're up to twenty or so interfaces and five iterators, and it's almost certain that there are still collections arising in practice that don't fit cleanly into any of the interfaces. For example, the collection-views returned by Map are natural delete-only collections. Also, there are collections that will reject certain elements on the basis of their value, so we still haven't done away with runtime exceptions.

    When all was said and done, we felt that it was a sound engineering compromise to sidestep the whole issue by providing a very small set of core interfaces that can throw a runtime exception.

  2. Won't programmers have to surround any code that calls optional operations with a try-catch clause in case they throw an UnsupportedOperationException?

    It was never our intention that programs should catch these exceptions: that's why they're unchecked (runtime) exceptions. They should only arise as a result of programming errors, in which case, your program will halt due to the uncaught exception.

  3. Why isn't there a core interface for "bags" (AKA multisets)?

    The Collection interface provides this functionality. We are not providing any public implementations of this interface, as we think that it wouldn't be used frequently enough to "pull its weight." We occasionally return such Collections, which are implemented easily atop AbstractCollection (for example, the Collection returned by Map.values).

  4. Why don't you provide for "gating functions" that facilitate the implementation of type-safe collections?

    We are extremely sympathetic to the desire for type-safe collections. Rather than adding a "band-aid" to the framework that enforces type-safety in an ad hoc fashion, the framework has been designed to mesh with all of the parameterized-types proposals currently being discussed. In the event that parameterized types are added to the language, the entire collections framework will support compile-time type-safe usage, with no need for explicit casts. Unfortunately, this won't happen in the the 1.2 release. In the meantime, people who desire runtime type safety can implement their own gating functions in "wrapper" collections surrounding JDK collections.

  5. Why didn't you use "Beans-style names" for consistency?

    While the names of the new collections methods do not adhere to the "Beans naming conventions", we believe that they are reasonable, consistent and appropriate to their purpose. It should be remembered that the Beans naming conventions do not apply to the JDK as a whole; the AWT did adopt these conventions, but that decision was somewhat controversial. We suspect that the collections APIs will be used quite pervasively, often with multiple method calls on a single line of code, so it is important that the names be short. Consider, for example, the Iterator methods. Currently, a loop over a collection looks like this:

        for (Iterator i = c.iterator(); i.hasNext(); )
        System.out.println(i.next());
    Everything fits neatly on one line, even if the Collection name is a long expression. If we named the methods "getIterator", "hasNextElement" and "getNextElement", this would no longer be the case. Thus, we adopted the "traditional" JDK style rather than the Beans style.

Collection Interface

  1. Why doesn't Collection extend Cloneable and Serializable?

    Many Collection implementations (including all of the ones provided by the JDK) will have a public clone method, but it would be mistake to require it of all Collections. For example, what does it mean to clone a Collection that's backed by a terabyte SQL database? Should the method call cause the company to requisition a new disk farm? Similar arguments hold for serializable.

    If the client doesn't know the actual type of a Collection, it's much more flexible and less error prone to have the client decide what type of Collection is desired, create an empty Collection of this type, and use the addAll method to copy the elements of the original collection into the new one.

  2. Why don't you provide an "apply" method in Collection to apply a given method ("upcall") to all the elements of the Collection?

    This is what is referred to as an "Internal Iterator" in the "Design Patterns" book (Gamma et al.). We considered providing it, but decided not to as it seems somewhat redundant to support internal and external iterators, and Java already has a precedent for external iterators (with Enumerations). The "throw weight" of this functionality is increased by the fact that it requires a public interface to describe upcalls.

  3. Why didn't you provide a "Predicate" interface, and related methods (e.g., a method to find the first element in the Collection satisfying the predicate)?

    It's easy to implement this functionality atop Iterators, and the resulting code may actually look cleaner as the user can inline the predicate. Thus, it's not clear whether this facility pulls its weight. It could be added to the Collections class at a later date (implemented atop Iterator), if it's deemed useful.

  4. Why don't you provide a form of the addAll method that takes an Enumeration (or an Iterator)?

    Because we don't believe in using Enumerations (or Iterators) as "poor man's collections." This was occasionally done in prior releases, but now that we have the Collection interface, it is the preferred way to pass around abstract collections of objects.

  5. Why don't the concrete implementations in the JDK have Enumeration (or Iterator) constructors?

    Again, this is an instance of an Enumeration serving as a "poor man's collection" and we're trying to discourage that. Note however, that we strongly suggest that all concrete implementations should have constructors that take a Collection (and create a new Collection with the same elements).

  6. Why don't you provide an Iterator.add method?

    The semantics are unclear, given that the contract for Iterator makes no guarantees about the order of iteration. Note, however, that ListIterator does provide an add operation, as it does guarantee the order of the iteration.

List Interface

  1. Why don't you rename the List interface to Sequence; doesn't "list" generally suggest "linked list"? Also, doesn't it conflict with java.awt.List?

    People were evenly divided as to whether List suggests linked lists. Given the implementation naming convention, <Implementation><Interface>, there was a strong desire to keep the core interface names short. Also, several existing names (AbstractSequentialList, LinkedList) would have been decidedly worse if we changed List to Sequence. The naming conflict can be dealt with by the following incantation:

        import java.util.*;
    import java.awt.*;
    import java.util.List;   // Dictates interpretation of "List"

  2. Why don't you rename List's set method to replace, to avoid confusion with Set.

    It was decided that the "set/get" naming convention was strongly enough enshrined in the language that we'd stick with it.

Map Interface

  1. Why doesn't Map extend Collection?

    This was by design. We feel that mappings are not collections and collections are not mappings. Thus, it makes little sense for Map to extend the Collection interface (or vice versa).

    If a Map is a Collection, what are the elements? The only reasonable answer is "Key-value pairs", but this provides a very limited (and not particularly useful) Map abstraction. You can't ask what value a given key maps to, nor can you delete the entry for a given key without knowing what value it maps to.

    Collection could be made to extend Map, but this raises the question: what are the keys? There's no really satisfactory answer, and forcing one leads to an unnatural interface.

    Maps can be viewed as Collections (of keys, values, or pairs), and this fact is reflected in the three "Collection view operations" on Maps (keySet, entrySet, and values). While it is, in principle, possible to view a List as a Map mapping indices to elements, this has the nasty property that deleting an element from the List changes the Key associated with every element before the deleted element. That's why we don't have a map view operation on Lists.

Iterator Interface

  1. Why doesn't Iterator extend Enumeration?

    We view the method names for Enumeration as unfortunate. They're very long, and very frequently used. Given that we were adding a method and creating a whole new framework, we felt that it would be foolish not to take advantage of the opportunity to improve the names. Of course we could support the new and old names in Iterator, but it doesn't seem worthwhile.

  2. Why don't you provide an Iterator.peek method that allows you to look at the next element in an iteration without advancing the iterator?

    It can be implemented atop the current Iterators (a similar pattern to java.io.PushbackInputStream). We believe that its use would be rare enough that it isn't worth including in the interface that everyone has to implement.

Miscellaneous

  1. Why did you write a new collections framework instead of adopting JGL (a preexisting collections package from ObjectSpace, Inc.) into the JDK?

    If you examine the goals for our Collections framework (in the Overview), you'll see that we are not really "playing in the same space" as JGL. Quoting from the "Design Goals" Section of the Java Collections Overview: "Our main design goal was to produce an API that was reasonably small, both in size, and (more importantly) in 'conceptual weight.'"

    JGL consists of approximately 130 classes and interfaces; its main goal was consistency with the C++ Standard Template Library (STL). This was not one of our goals. Java has traditionally stayed away from C++'s more complex features (e.g., multiple inheritance, operator overloading). Our entire framework, including all infrastructure, contains approximately 25 classes and interfaces.

    While this may cause some discomfort for some C++ programmers, we feel that it will be good for Java in the long run. As the Java libraries mature, they inevitably grow, but we are trying as hard as we can to keep them small and manageable, so that Java continues to be an easy, fun language to learn and to use.

  2. Why don't you eliminate all of the methods and classes that return "views" (Collections backed by other collection-like objects). This would greatly reduce aliasing.

    Given that we provide core collection interfaces behind which programmers can "hide" their own implementations, there will be aliased collections whether the JDK provides them or not. Eliminating all views from the JDK would greatly increase the cost of common operations like making a Collection out of an array, and would do away with many useful facilities (like synchronizing wrappers). One view that we see as being particularly useful is List.subList. The existence of this method means that people who write methods taking List on input do not have to write secondary forms taking an offset and a length (as they do for arrays).

  3. Why don't you provide for "observable" collections that send out Events when they're modified?

    Primarily, resource constraints. If we're going to commit to such an API, it has to be something that works for everyone, that we can live with for the long haul. We may provide such a facility some day. In the meantime, it's not difficult to implement such a facility on top of the public APIs.

Copyright © 1997-1999 Sun Microsystems, Inc., 901 San Antonia Ave., Palo Alto, CA 94303 USA. All rights reserved.

Please send comments to: collections-comments@java.sun.com 		Sun
Java Software


Annotated Outline of the Collections Framework

Java

Annotated Outline of Collections Framework
The collections framework consists of:
  • Collection Interfaces - The primary means by which collections are manipulated.
    • Collection - A group of objects. No assumptions are made about the order of the collection (if any), or whether it may contain duplicate elements.
    • Set - The familiar set abstraction. No duplicate elements permitted. May or may not be ordered. Extends the Collection interface.
    • List - Ordered collection, also known as a sequence. Duplicates are generally permitted. Allows positional access. Extends the Collection interface.
    • Map - A mapping from keys to values. Each key can map to at most one value.
    • SortedSet - A set whose elements are automatically sorted, either in their natural ordering (see the Comparable interface), or by a Comparator object provided when a SortedSet instance is created. Extends the Set interface.
    • SortedMap - A map whose mappings are automatically sorted by key, either in the keys' natural ordering or by a comparator provided when a SortedMap instance is created. Extends the Map interface.
  • General-Purpose Implementations - The primary implementations of the collection interfaces.
    • HashSet - Hash table implementation of the Set interface. The best all-around implementation of the Set interface.
    • TreeSet Red-black tree implementation of the SortedSet interface.
    • ArrayList - Resizable-array implementation of the List interface. (Essentially an unsynchronized Vector.) The best all-around implementation of the List interface.
    • LinkedList - Doubly-linked list implementation of the List interface. May provide better performance than the ArrayList implementation if elements are frequently inserted or deleted within the list. Useful for queues and double-ended queues (deques).
    • HashMap - Hash table implementation of the Map interface. (Essentially an unsynchronized Hashtable that supports null keys and values.) The best all-around implementation of the Map interface.
    • TreeMap Red-black tree implementation of the SortedMap interface.
  • Wrapper Implementations - Functionality-enhancing implementations for use with other implementations. Accessed soley through static factory methods.
    • Collections.unmodifiableInterface - Return an unmodifiable view of a specified collection that throws an UnsupportedOperationException if the user attempts to modify it.
    • Collections.synchronizedInterface - Return a synchronized collection that is backed by the specified (typically unsynchronized) collection. As long as all accesses to the backing collection are through the returned collection, thread-safety is guaranteed.
  • Convenience Implementations - High-performance "mini-implementations" of the collection interfaces.
    • Arrays.asList - Allows an array to be viewed as a list.
    • EMPTY_SET, EMPTY_LIST and EMPTY_MAP - constants representing the empty set and list (immutable).
    • singleton, singletonList, and singletonMap - returns an immutable "singleton" set, list, or map, containing only the specified object (or key-value mapping).
    • nCopies - Returns an immutable list consisting of n copies of a specified object.
  • Legacy Implementations - Older collection classes have been retrofitted to implement the collection interfaces.
    • Vector - Synchronized resizable-array implementation of the List interface with additional "legacy methods."
    • Hashtable - Synchronized hash table implementation of the Map interface that does not allow null keys or values, with additional "legacy methods."
  • Special Purpose Implementation
    • WeakHashMap - an implementation of the Map interface that stores only weak references to its keys. Storing only weak references allows key-value pairs to be garbage-collected when the key is no longer referenced outside of the WeakHashMap. This class provides the easiest way to harness the power of weak references. It is useful for implementing "registry-like" data structures, where the utility of an entry vanishes when its key is no longer reachable by any thread.
  • Abstract Implementations - Partial implementations of the collection interfaces to facilitate custom implementations.
    • AbstractCollection - Skeletal implementation of a collection that is neither a set nor a list (such as a "bag" or multiset).
    • AbstractSet - Skeletal implementation of a set.
    • AbstractList - Skeletal implementation of a list backed by a random-access data store (such as an array).
    • AbstractSequentialList - Skeletal implementation of a list backed by a sequential-access data store (such as a linked list).
    • AbstractMap - Skeletal implementation of a map.
  • Algorithms
    • sort(List) - Sorts a list using a merge sort algorithm, which provides average-case performance comparable to a high-quality quicksort, guaranteed O(n*log n) performance (unlike quicksort), and stability (unlike quicksort). (A stable sort is one that does not reorder equal elements.)
    • binarySearch(List, Object) - Searches for an element in an ordered list using the binary search algorithm.
    • reverse(List) - Reverses the order of the elements in the a list.
    • shuffle(List) - Randomly permutes the elements in a list.
    • fill(List, Object) - Overwrites every element in a list with the specified value.
    • copy(List dest, List src) - Copies the source list into the destination list.
    • min(Collection) - Returns the minimum element in a collection.
    • max(Collection) - Returns the maximum element in a collection.
  • Infrastructure
    • Iterators - Similar to the familiar Enumeration interface, but more powerful, and with improved method names.
      • Iterator - In addition to the functionality of the Enumeration interface, allows the user to remove elements from the backing collection with well defined, useful semantics.
      • ListIterator - Iterator for use with lists. In addition to the functionality of the Iterator interface, supports bi-directional iteration, element replacement, element insertion and index retrieval.
    • Ordering
      • Comparable - Imparts a natural ordering to classes that implement it. The natural ordering may be used to sort a list or maintain order in a sorted set or map. Many classes have been retrofitted to implement this interface.
      • Comparator - Represents an order relation, which may be used to sort a list or maintain order in a sorted set or map. Can override a type's natural ordering, or order objects of a type that does not implement the Comparable interface.
    • Runtime Exceptions
      • UnsupportedOperationException - Thrown by collections if an unsupported optional operation is called.
      • ConcurrentModificationException - Thrown by iterators and list iterators if the backing collection is modified unexpectedly while the iteration is in progress. Also thrown by sublist views of lists if the backing list is modified unexpectedly.
  • Array Utilities
    • Arrays - Contains static methods to sort, search, compare and fill arrays of primitives and Objects.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: collections-comments@java.sun.com 		Sun
Java Software


API

CONTENTS | PREV | NEXT Drag and Drop

2.2 Drag Gesture Recognition

The gesture(s) that can initiate a Drag and Drop operation vary, not only per platform, but also per Component, and per device. Therefore a mechanism is required in order to encapsulate these dependencies, thus making the task of the author of a Component that wishes to initiate a Drag and Drop operation much simpler.

2.2.1 DragGestureRecognizer

The DragGestureRecognizer is an abstract base class for all device/platform/Component specific Drag and Drop gesture recognizers, and is defined as:

public abstract DragGestureRecognizer {
    protected DragGestureRecognizer(
                DragSource          ds,
                Component           c,
                int                 srcActions,
                DragGestureListener dgl
    );

    public Component getComponent();
    public void      setComponent(Component c);

    public int  getSourceActions();
    public void setSourceActions(int actions);

    public java.awt.InputEvent getTriggerEvent();

    public void resetRecognizer();

    public void addDragGestureListener(
                    DragGestureListener dgl
    ) throws TooManyListenerExceptions;

    public void removeDragGestureListener(
                    DragGestureListener dgl
    );

    protected abstract void registerListeners();
    protected abstract void unregisterListeners();

    protected void fireDragGestureRecognized(
                       int dragAction
    );

    protected void appendEvent(InputEvent awtie);
}
An appropriate concrete subclasses of DragGestureRecognizer for a particular may be obtained in a variety of ways; from a DragSource instance, from the Toolkit, or by other means. Concrete implementation subclasses are obtained through standard APIs' by specifying a Class reference to an abstract DragGestureRecognizer superclass, an instance of a concrete subclass of this actual parameter is instantiated and returned to the requestor.

Once a DragGestureRecognizer instance is associated with a Component and a DragSource it registers its own particular set of EventListeners' with the target Component in order to monitor the appropriate events being delivered to that Component to detect an initiating gesture. (Using registerListeners() and unregisterListeners() to add/remove these monitoring EventListeners').

Note that a DragGestureRecognizer may throw either an IllegalStateException or an IllegalArgumentException if either the Component or DragSource specified is either not in the correct state for, or is not interoperable with, that DragGestureRecognizer.

When a concrete DragGestureRecognizer instance detects a Drag initiating user gesture on the Component it is associated with, it will fire a DragGestureEvent to the DragGestureListener registered on its unicast event source for DragGestureListener events. This DragGestureListener is responsible for causing the associated DragSource to start the Drag and Drop operation (if appropriate).

The implementation provides (at least) an abstract subclass for recognizing mouse device gestures MouseDragGestureRecognizer. Other abstract subclasses may be provided by the platform to support other input devices or particular Component class semantics. Concrete superclasses of this MouseDragGestureRecognizer that encapsulate platform dependent mouse based gestures are available from the Toolkit object via its createDragGestureRecognizer(Class adgrc, DragSource ds, Component c, int sa, DragGestureListener dgl) method. This Toolkit API provides platform dependent concrete implementations that extend particular platform independent abstract definitions (classes).

The MouseDragGestureRecognizer abstract class is defined as:

public abstract   MouseDragGestureRecognizer
       extends    DragGestureRecognizer
      implements MouseListener, MouseMotionListener {

    public MouseDragGestureRecognizer(
            DragSource          ds,
            Component           c,
            int                 sa,
            DragGestureListener dsl
    );

    // ...
}
The DragGestureListener is defined as:

public interface DragGestureListener extends EventListener {
    void dragGestureRecognized(DragGestureEvent dge);
}
Usually the dragGestureRecognized() method will simply, via the DragGestureEvent's convenience API startDrag(), start a Drag and Drop operation on the associated DragSource.

Note that per Component (class or instance) behavior that may effect the initiating gesture would usually be implemented in this DragGestureListener method, or in the DragGestureRecognizer subclass where appropriate or possible.

The DragGestureEvent is defined as:

publc class DragGestureEvent extends EventObject {
    public DragGestureEvent(DragGestureRecognizer dgr,
                             int                   dragAction,
                             java.util.List        events
     );

    public DragGestureRecognizer
               getSourceAsDragGestureRecognizer();

    public Component  getComponent();
    public DragSource getDragSource();

    public java.util.Iterator iterator();

    public Object[] toArray();
    public Object[] toArray(Object[] array);

    public int getDragAction();

    public startDrag(Cursor             dragCursor,
                     Transferable       t,
                     DragSourceListener dsl
    );

    public startDrag(Cursor             dragCursor,
                     Image              dragImage,
                     Point              imageOffset,
                     Transferable       t,
                     DragSourceListener dsl
    );
}
The DragGestureEvent encapsulates all the information regarding the nature of the gesture that has just been recognized, including:

  • The DragGestureRecognizer that recognized the gesture
  • The Component that the gesture occurred on
  • The DragSource that will process the operation
  • The List of InputEvent objects that comprise the gesture.
  • The action (ACTION_COPY, ACTION_MOVE or ACTION_LINK, selected by the users gesture.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


API

CONTENTS | PREV | NEXT Drag and Drop

2.1 Overview

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.

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 Human user makes a Drag gesture over the Component, which the registered DragGestureRecognizer detects, and notifies its DragGestureListener of.
Note: Although the body of this document 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.

  • 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.
The remainder of this document details the proposed API changes to support this model.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


API

CONTENTS | PREV | NEXT Drag and Drop

2.3 Drag Source

The DragSource is the entity responsible for the initiation of the Drag and Drop operation:

2.3.1 The DragSource definition

The DragSource and associated constant interfaces are defined as follows:

The DnDConstants class defines the operations that may be applied to the subject of the transfer:

public final class java.awt.dnd.DnDConstants {
    public static int ACTION_NONE					= 	0x0;
    public static int ACTION_COPY					=	 0x1;
    public static int ACTION_MOVE					=	 0x2;
    public static int ACTION_COPY_OR_MOVE					= ACTION_COPY |
ACTION_MOVE;
    public static int ACTION_REFERENCE = 0x40000000;
}

public class java.awt.dnd.DragSource {

     public static Cursor     DefaultCopyDrop;
     public static Cursor     DefaultMoveDrop;
     public static Cursor     DefaultLinkDrop;

     public static Cursor     DefaultCopyNoDrop;
     public static Cursor     DefaultMoveNoDrop;
     public static Cursor     DefaultLinkNoDrop;

    public static DragSource getDefaultDragSource();

    public static boolean isDragImageSupported();

    public void
          startDrag(DragGestureEvent    trigger,
                  Cursor			 dragCursor,
                  Image			 dragImage,
                  Point			 dragImageOffset,
                  Transferable 			 transferable,
                   DragSourceListener			 dsl,
                   FlavorMap           fm)
          throws InvalidDnDOperationException;

    protected DragSourceContext
        createDragSourceContext(
            DragSourceContextPeer dscp,
            DragGestureEvent      trigger,
            Cursor                dragCursor,
            Image                 dragImage,
              Point                 dragImageOffset,
            Transferable          transferable,
            DragSourceListener    dsl
        );

    public FlavorMap getFlavorMap();

     public DragGestureRecongizer
         createDragGestureRecognizer(
              Class               abstractRecognizerClass,
              Component           c,
              int                 srcActions,
              DragGestureListener dgl
     );

     public DragGestureRecongizer
         createDefaultDragGestureRecognizer(
              Component           c,
              int                 srcActions,
              DragGestureListener dgl
     );
}
The DragSource may be used in a number of scenarios:

  • 1 default instance per JVM* for the lifetime of that JVM. (defined by this spec)
  • 1 instance per class of potential Drag Initiator object (e.g TextField). [implementation dependent]
  • 1 per instance of a particular Component, or application specific object associated with a Component instance in the GUI. [implementation dependent]
  • some other arbitrary association. [implementation dependent]
A controlling object, shall obtain a DragSource instance prior to a users gesture, effecting an associated Component, in order to process the operation. Once obtained a DragGestureRecognizer should be obtained and used to associate the DragSource with a Component.

The initial interpretation of the users gesture, and the subsequent starting of the Drag operation are the responsibility of the implementing Component, this is usually implemented by a DragGestureRecognizer.

When a gesture occurs, the DragSource's startDrag() method shall be invoked in order to cause processing of the users navigational gestures and delivery of Drag and Drop protocol notifications. A DragSource shall only permit a single Drag and Drop operation to be current at any one time, and shall reject any further startDrag() requests by throwing an IllegalDnDOperationException until such time as the extant operation is complete.

In order to start a drag operation the caller of the startDrag() method shall provide the following parameters:

  • The DragGestureEvent for the gesture.
  • A Cursor representing the initial "Drag Over" feedback for the operation(s) specified. (This shall be a Cursor that provides "No Drop" visual feedback to the user).
  • An (optional) Image to visually represent the item, or item(s) that are the subject(s) of the operation.
On platforms that can support this feature, a "Drag" image may be associated with the operation to enhance the fidelity of the "Drag Over" feedback. This image would typically be a small "iconic" representation of the object, or objects being dragged, and would be rendered by the underlying system, tracking the movement of, and coincident with, but typically in addition to the Cursor animation.

Where this facility is not available, or where the image is not of a suitable type to be rendered by the underlying system, this parameter is ignored and only Cursor "Drag Over" animation results, so applications should not depend upon this feature. The presence of the facility on a particular platform may be tested by invoking the static method isDragImageSupported().

  • Where an Image is provided; a Point (in the co-ordinate space of the Component) specifying the initial origin of that Image relative to the co-ordinates of the "hotspot" of the drag "Cursor", in the co-ordinate space of the Component, at the time of the initial gesture, for the purposes of initiating a correctly positioned "Drag Over" animation of that Image relative to that "hotspot".
  • A Transferable that describes the various DataFlavor(s) that represent the subject(s) of any subsequent data transfer that may result from a successful Drop.
The Transferable instance associated with the DragSource at the start of the Drag operation, represents the object(s) or data that are the operand(s), or the subject(s), of the Drag and Drop operation, that is the information that will subsequently be passed from the DragSource to the DropTarget as a result of a successful Drop on the Component associated with that DropTarget.

Note that multiple (collections) of either homogeneous, or heterogeneous, objects may be subject of a Drag and Drop operation, by creating a container object, that is the subject of the transfer, and implements Transferable. However it should be noted that since none of the targeted native platforms systems support a standard mechanism for describing and thus transferring such collections it is not possible to implement such transfers in a transparent, or platform portable fashion.

  • A DragSourceListener instance, which will subsequently receive events notifying it of changes in the state of the ongoing operation in order to provide the "Drag Over" feedback to the user.
As stated above, the primary role of the startDrag() method is to initiate a Drag on behalf of the user. In order to accomplish this, the startDrag() method must create a DragSourceContext instance to track the operation itself, and more importantly it must initiate the operation itself in the underlying platform implementation. In order to accomplish this, the DragSource must first obtain a DragSourceContextPeer from the underlying system (usually via an invocation of java.awt.Toolkit.createDragSourceContextPeer() method) and subsequently associate this newly created DragSourceContextPeer (which provides a platform independent interface to the underlying systems capabilities) with a DragSourceContext.The startDrag() method invokes the createDragSourceContext() method to instantiate an appropriate DragSourceContext and associate the DragSourceContextPeer with that.

If the Drag and Drop System is unable to initiate a Drag operation for some reason the startDrag() method shall throw a java.awt.dnd.InvalidDnDOperationException to signal such a condition. Typically this exception is thrown when the underlying platform system is either not in a state to initiate a Drag, or the parameters specified are invalid.

Note that during the Drag neither the set of operations the source exposed at the start of the Drag operation may change for the duration of the operation, in other words the operation(s) and are constant for the duration of the operation with respect to the DragSource.

The getFlavorMap() method is used by the underlying system to obtain a FlavorMap object in order to map the DataFlavors exposed by the Transferable to data type names of the underlying DnD platform. [see later for details of the FlavorMap]

A "private" FlavorMap may be provided to the startDrag() method of the DragSource, or null, in which case the "default" FlavorMap for that DragSource class or instance is used.

2.3.2 The DragSourceContext Definition

As a result of a DragSource's startDrag() method being successfully invoked an instance of the DragSourceContext class is created. This instance is responsible for tracking the state of the operation on behalf of the DragSource and dispatching state changes to the DragSourceListener.

The DragSourceContext class is defined as follows:

public class DragSourceContext implements DragSourceListener
{
    protected DragSourceContext(
                DragSourceContextPeer	dscp,
                DragGestureEvent      trigger,
                Cursor			dragCursor,
                Image			dragImage,
                Point			dragOffset,
                Transferable		transferable,
                DragSourceListener		dsl
    );

    public DragSource			 getDragSource();

    public Component		 getComponent();

    public DragGestureEvent				getTrigger();

    public Image	 getDragImage();
    public Point	 getDragImageOffset();

     public void transferablesFlavorsChanged();

    public int getSourceActions();

    public Cursor getCursor();
    pbulic void   setCursor(Cursor Cursor)
                   throws InvalidDnDOperationException;

    public void
        addDragSourceListener(DragSourceListener dsl)
            throws TooManyListenersException;

    public void
        removeDragSourceListener(DragSourceListener dsl);

     protected updateCurrentCursor(int dropOperation,
                                   int targetActions,
                                   int status
     );

    // values for status parameter above.

    protected static final int DEFAULT = 0;
    protected static final int ENTER   = 1;
    protected static final int OVER    = 2;
    protected static final int CHANGED = 3;

    protected boolean cursorDirty;
 }
Note that the DragSourceContext itself implements DragSourceListener, this is to allow the platform peer, the DragSourceContextPeer instance, created by the DragSource, to notify the DragSourceContext of changes in state in the ongoing operation, and thus allows the DragSourceContext to interpose itself between the platform and the DragSourceListener provided by the initiator of the operation.

The state machine the platform exposes, with respect to the source, or initiator of the Drag and Drop operation is detailed below:

Notifications of changes in state with respect to the initiator during a Drag and Drop operation, as illustrated above, are delivered from the DragSourceContextPeer, to the appropriate DragSourceContext, which delegates notifications, via a unicast JavaBeans compliant EventListener subinterface, to an arbitrary object that implements DragSourceListener registered with the DragSource via startDrag().

The primary responsibility of the DragSourceListener is to monitor the progress of the users navigation during the Drag and Drop operation and provide the "Drag-Over" effects feedback to the user. Typically this is accomplished via changes to the "Drag Cursor".

Every Drag operation has 2 logical cursor states (Drag Cursors) associated with it:

  • The Drop Cursor, the cursor displayed when dragging over a valid DropTarget.
  • The NoDrop Cursor, the cursor displayed when dragging over everything else (the initial state of the cursor at the start of a Drag).
The state of the Cursor may be modified by calling the setCursor() method of the DragSourceContext.

2.3.3 The DragSourceListener Definition

The DragSourceListener interface is defined as follows:

public interface java.awt.dnd.DragSourceListener
    extends java.util.EventListener {
    void dragEnter					(DragSourceDragEvent dsde);
    void dragOver					(DragSourceDragEvent dsde);
    void dropActionChanged (DragSourceDragEvent dsde);
    void dragExit					(DragSourceEvent     dse);
    void dragDropEnd					(DragSourceDropEvent dsde);
}

As the drag operation progresses, the DragSourceListener's dragEnter(), dragOver(), and dragExit() methods shall be invoked as a result of the users navigation of the logical "Drag" cursor's location intersecting the geometry of GUI Component(s) with associated DropTarget(s). [See below for details of the DropTarget's protocol interactions].

The DragSourceListener's dragEnter() method is invoked when the following conditions are true:

  • The logical cursor's hotspot initially intersects a GUI Component's visible geometry.
  • That Component has an active DropTarget associated.
The DropTarget's registered DropTargetListener dragEnter() method is invoked and returns successfully.

The registered DropTargetListener invokes the DropTargetDragEvent's acceptDrag() method to accept the Drag based upon interrogation of the source's potential Drop actions and available data types (DataFlavors).

The DragSourceListener's dragOver() method is invoked when the following conditions are true:

  • The cursor's logical hotspot has moved but still intersects the visible geometry of the Component associated with the previous dragEnter() invocation.
  • That Component still has a DropTarget associated.
  • That DropTarget is still active.
  • The DropTarget's registered DropTargetListener dragOver() method is invoked and returns successfully.
  • The DropTarget does not reject the drag via rejectDrag().
The DragSourceListener's dragExit() method is invoked when one of the following conditions is true:

  • The cursor's logical hotspot no longer intersects the visible geometry of the Component associated with the previous dragEnter() invocation.
Or:

  • The Component that the logical cursor's hotspot intersected that resulted in the previous dragEnter() invocation, no longer has an active DropTarget (or DropTargetListener) associated.
Or:

  • The current DropTarget's DropTargetListener has invoked rejectDrag() since the last dragEnter() or dragOver() invocation.
The DragSourceListener's dropActionChanged() method is invoked when the state of the input device(s), typically the mouse buttons or keyboard modifiers, that the user is interacting with in order to preform the Drag operation, changes.

The dragDropEnd() method is invoked to signify that the operation is completed. The getDropSuccess() method of the DragSourceDropEvent can be used to determine the termination state. The getDropAction() method returns the operation that the DropTarget selected (via the DropTargetDropEvent acceptDrop() parameter) to apply to the Drop operation.1

Once this method is complete the current DragSourceContext and the associated resources are invalid.

2.3.4 The DragSourceEvent Definition

The DragSourceEvent class is the root Event class for all events pertaining to the DragSource, and is defined as follows:

public class   java.awt.dnd.DragSourceEvent
      extends java.util.EventObject {
    public DragSourceEvent(DragSourceContext dsc);

    public DragSourceContext getDragSourceContext();
};
An instance of this event is passed to the DragSourceListener dragExit() method.

2.3.5 The DragSourceDragEvent Definition

The DragSourceDragEvent class is defined as follows:

public class java.awt.dnd.DragSourceDragEvent
      extends DragSourceEvent {
    public int getTargetActions();

     public int getUserAction();

    public int getGestureModifiers();

    public boolean isDropTargetLocal();

     public int getDropAction();
}
An instance of the above class is passed to a DragSourceListener's dragEnter(), dragOver(), and dragGestureChanged() methods.

The getDragSourceContext() method returns the DragSourceContext associated with the current Drag and Drop operation.

The getTargetActions() method returns the drop actions, supported by, and returned from the current DropTarget (if any in the case of dropActionChanged()).

The getDropAction() method returns the action that is currently selected by the users gesture.

The getTargetActions() method returns the set of actions supported by the current DropTarget.

The logical OR of these two results defines the actual effect of a Drop.

The getGestureModifiers() returns the current state of the input device modifiers, usually the mouse buttons and keyboard modifiers, associated with the users gesture.

The isDropTargetLocal() method returns true if the current DropTarget is contained within the same JVM as the DragSource, and false otherwise. This information can be useful to the implementor of the DragSource's Transferable in order to implement certain local optimizations.

2.3.6 The DragSourceDropEvent Definition

The DragSourceDropEvent class is defined as follows:

public public class java.awt.dnd.DragSourceDropEvent
      extends java.util.EventObject {

    public DragSourceDropEvent(DragSourceContext dsc);
    public DragSourceDropEvent(DragSourceContext dsc,
                              int                action,
                              boolean            success);

    public boolean getDropSuccess();

    public int getDropAction();
}
An instance of the above class is passed to a DragSourceListener's dragDropEnd() method. This event encapsulates the termination state of the Drag and Drop operation for the DragSource.

If the Drop occurs, then the participating DropTarget will signal the success or failure of the data transfer via the DropTargetContext's dropComplete() method, this status is made available to the initiator via the getDropSuccess() method. The operation that the destination DropTarget selected to perform on the subject of the Drag (passed by the DropTarget's acceptDrop() method) is returned via the getDropAction() method.

If the Drag operation was aborted for any reason prior to a Drop occurring, for example if the users ends the gesture outside a DropTarget, or if the DropTarget invokes rejectDrop(), the isGetDropSuccess() method will return false, otherwise true.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


API

CONTENTS | PREV | NEXT Drag and Drop

2.0 API

The following sections cover the Drag and Drop API.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


API

CONTENTS | PREV | NEXT Drag and Drop

2.5 Data Transfer Phase

In the case where a valid drop occurs, the DropTargetListener's drop() method is responsible for undertaking the transfer of the data associated with the gesture. The DropTargetDropEvent provides a means to obtain a Transferable object that represent that data object(s) to be transferred.

From the drop() method, the DropTargetListener shall initially either rejectDrop() (immediately returning thereafter) or acceptDrop() specifying the selected operation from those returned by getSourceActions().

Subsequent to an acceptDrop(), but not before, getTransferable() may be invoked, and any data transfers performed via the returned Transferable's getTransferData() method. Finally, once the destination of the drop has completed the transfer(s) of the objects from the source it shall signal the success, or immediate failure, of the transfer(s) via an invocation of DropTargetContext.ropComplete().

Upon returning from the DropTargetContext.dropComplete() method the Transferable and DragSourceContext instances are no longer guaranteed to be valid and all references to them shall be discarded by the recipient to allow them to be subsequently garbage collected.

When using the ACTION_REFERENCE operation the source and destination should take care to agree upon the object and the associated semantics of the transfer. Typically in intra-JVM transfers a live object reference would be passed between source and destination, but in the case of inter-JVM transfers, or transfers between native and Java applications, live object references do not make sense, so some other `reference' type should be exchanged such as a URI for example. Both the DragSource and DropTarget can detect if the transfer is intra-JVM or not.

2.5.1 FlavorMap and SystemFlavorMap

All the target DnD platforms represent their transfer data types using a similar mechanism, however the representations do differ. The Java platform uses MIME types encapsulated within a DataFlavor to represent its data types. Unfortunately in order to permit the transfer of data between Java and platform native applications the existence of these platform names need to be exposed, thus a mechanism is required in order to create an extensible (platform independent) mapping between these platform dependent type names, their representations, and the Java MIME based DataFlavors.

The implementation will provide a mechanism to externally specify a mapping between platform native data types (strings) and MIME types (strings) used to construct DataFlavors. This external mapping will be used by the underlying platform specific implementation code in order to expose the appropriate DataFlavors (MIME types), exported by the source, to the destination, via the underlying platform DnD mechanisms.

Both the DragSource and DropTarget classes provide access for the underlying system to map platform dependent names to and from DataFlavors.

public interface java.awt.datatransfer.FlavorMap {
    java.util.Map getNativesForFlavors(DataFlavor[] dfs);
    java.util.Map getFlavorsForNatives(String[] natives);
}
The getNativesForFlavors() method takes an array of DataFlavors and returns a Map object containing zero or more keys of type DataFlavor, from the actual parameter dfs, with associated values of type String, which correspond to the platform dependent type name for that MIME type.

The getFlavorsForNatives() method takes an array of String types and returns a Map object containing zero or more keys of type String, from the actual parameter natives, with associated values of type DataFlavor, which correspond to the platform independent type for that platform dependent type name.

The Map object returned by both methods may be mutable but is not required to be.

If NULL is passed to either of these methods they should return their current map of all keys and values known to the implementation at the time of the call.

For example on Win32 the Clipboard Format Name for simple text is "CF_TEXT" (actually it is the integer 1) and on Motif it is the X11 Atom named "STRING", the MIME type one may use to represent this would be "text/plain charset=us-ascii". Therefore a platform portable FlavorMap would map between these names; CF_TEXT on win32 and STRING on Motif/X11.

Typically, as implemented in the SystemFlavorMap these mappings are held in an external persistent configuration format (a properties file or URL) and are loaded from the platform to configure the FlavorMap appropriately for a given platform.

The SystemFlavorMap class is provided to implement a simple, platform configurable mechanism for specifying a system-wide set of common mappings, and is defined as follows:

public class      java.awt.datatransfer.SystemFlavorMap
       implements FlavorMap {
    public static FlavorMap getSystemFlavorMap();

    public synchronized Map
        getNativesForFlavors(DataFlavor[] dfs);

    public synchronized Map
        getFlavorsForNatives(String[] natives);

    public static String
        encodeJavaMIMEType(DataFlavor df);

    public static String
        encodeJavaMimeType(java.util.mime.MimeType mime);

    public static boolean
        isEncodedJavaMimeType(String mimeStr);

    public static DataFlavor
        createFlavorFromEncodedJavaMimeType(String ejmts);

    public static java.util.mime.MimeType
        createMimeTypeFromEncodedJavaMimeType(
                            String ejmts
        );
}
The SystemFlavorMap class provides a simple implementation, using a properties file (see java.awt.Properties), of a persistent platform FlavorMap. Using the value of the AWT property "AWT.flavorMapFileURL" (see Toolkit.getProperty()) or the default file location of System.getProperty("java.home") + File.separator + "lib" + File.separator + "flavormap.properties", this class creates the appropriate Maps from the properties found therein.

In addition the class provides several static convenience functions used to encode and decode Java MimeTypes to and from a platform dependent namespace. The syntax of the properties file is:

{ <platform_type_name> `=' <IETF_MIME_RFC_conformant_specification> <nl> } *

The default implementations of DragSource and DropTarget return the SystemFlavorMap from their getFlavorMap() method, unless they have been provided with an overriding implementation.

2.5.2 Transferring Data across the JVM boundary

Since one of the primary goals of this API is to allow Drag and Drop of data between Java and native applications this has some significant consequences upon the method and mechanism of the actual data encoding and exchange when data is passed across the boundary of the Java Virtual Machine* .

Since one of the participants in such an exchange may be a native application, and thus has no knowledge of the Java type system, the Drag and Drop system cannot just exchange a Java object reference since the other participant may have no knowledge of, or capability to manipulate such a type.

When any exchange occurs, it can only do so, regardless of the implementation of the participants, if and only if both participants are agreed upon a familiar data type and encoding. Thus, sadly the burden of the exchange is born mostly by the participants themselves.

What this means in practical terms is that for "native" data formats, such as platform dependent image, document, or other "Content-Types" the encoding and decoding of their associated external data format is the responsibility of the source and destination of the transfer.

The Drag and Drop system shall expose the external representation of such "native" data types across the boundary of the Java Virtual Machine as encapsulated within a java.io.InputStream or a subclass thereof.

This means that any DataFlavor with a representation class that extends java.io.InputStream can be transferred, and will be exposed for transfer, across the Java Virtual Machine boundary.

To implement the exchange of such a native data type, a developer would define a DataFlavor with a MIME "Content-Type" that describes the nature of the "native" data type, with a representation class that extends a java.io.InputStream class that encodes the data encapsulated into a stream of bytes.

In particular such InputStream subclasses shall implement the following semantics:

  • Provide a public constructor with a single argument of type java.io.InputStream.

Provision of this constructor by a subclass of java.io.InputStream will allow the Drag and Drop system (associated with the DropTarget) to automatically re-construct an instance of the representation class specified by the requested DataFlavor, and initialize it with an InputStream containing the encapsulated data formatted according to the expectations of that subclass. Once initialized this instance is returned to the caller of the Transferable.getTransferData() method, thus allowing the caller to subsequently re-read and interpret the formatted content of the data stream transferred.

  • Provide an implementation of InputStream.read(byte b[], int off, int len).

Provision of this method (or inheriting a superclasses implementation) enables the Drag and Drop system (associated with the DragSource) to automatically extract an encoded stream of the encapsulated data from the Transferable, thus enabling the transfer of the data across the JVM* boundary as a simple byte stream to the requestor of the particular DataFlavor.

2.5.3 Transferring lists of files across the JVM boundary.

A typical subject of a Drag and Drop transfer is a list of one or more platform dependent filenames. In order to ease the programming task of developers either producing or consuming such lists the Drag and Drop system treats them as a special case.

If a DataFlavor is specified with a MIME "Content-Type" of application/x-java-file-list;class=java.util.List the Drag and Drop system will expect the list elements to be a homogeneous list of objects of type java.io.File. Thus a source shall, if supporting the transfer of a list of files, construct such a List of File objects when such a DataFlavor is requested, and a recipient shall expect such a List of File objects if it requests such a valid DataFlavor from it's source. This special case provides a simple mechanism for the transfer of lists of files between source and target.

2.5.4 Transferring java.rmi.Remote references across the JVM boundary.

It is possible to Drag and Drop object references between JVMs' by using the facilities of the RMI mechanism. The Drag and Drop system will automatically arrange for the transfer of any object reference that adheres to these requirements:

  • The representation class of interface associated with the requested DataFlavor implements both java.rmi.Remote and java.io.Serializable.
(the MIME "Content-Type" can be any suitable, arbitrary type or application/x-java-remote-object)

(effectively the object implementation class transferred should be extended from java.rmi.server.UnicastRemoteObject since the RMI system implements some required initialization, without which the transfer will not complete properly).

  • The drop action is ACTION_LINK.
If these conditions are met, then if an appropriate DataFlavor is requested, then the object returned to the requestor (if it is in a difference JVM from the source) will be an RMI reference to an instance of the Remote object subinterface specified as the representation class of the DataFlavor.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


API

CONTENTS | PREV | NEXT Drag and Drop

2.4 Drop Target

2.4.1 java.awt.Component additions for DropTarget (de)registration.

The Java.awt.Component class has two additional methods added to allow the (dis)association with a DropTarget. In particular:

public class java.awt.Component /* ... */ {
    // ...

    public synchronized
            void       setDropTarget(DropTarget dt);

    public synchronized
            DropTarget getDropTarget(DropTarget df);

    //
}
To associate a DropTarget with a Component one may invoke either; DropTarget.setCompononent() or Component.setDropTarget() methods. Thus conforming implementations of both methods are required to guard against mutual recursive invocations.

To disassociate a DropTarget with a Component one may invoke either; DropTarget.setCompononent(null) or Component.setDropTarget(null) methods.

Conformant implementations of both setter methods in DropTarget and Component should be implemented in terms of each other to ensure proper maintenance of each other's state.

The setDropTarget() method throws IllegalArgumentException if the DropTarget actual parameter is not suitable for use with this class/instance of Component. It may also throw UnsupportedOperationException if, for instance, the Component does not support external setting of a DropTarget.

2.4.2 The DropTarget Definition

A DropTarget encapsulates all of the platform-specific handling of the Drag and Drop protocol with respect to the role of the recipient or destination of the operation.

A single DropTarget instance may typically be associated with any arbitrary instance of java.awt.Component. Establishing such a relationship exports the associated Component's geometry to the client desktop as being receptive to Drag and Drop operations when the coordinates of the logical cursor intersects that visible geometry.

The DropTarget class is defined as follows:

public class java.awt.dnd.DropTarget
       implements DropTargetListener, Serializable {

     public DropTarget(Component          c,
                       int                actions,
                       DropTargetListener dsl,
                       boolean            isActive,
                       FlavorMap          fm
     );

    public DropTarget();

    public DropTarget(Component c);
    public DropTarget(Component c, DropTargetListener dsl);

    public Component getComponent();
    public void      setComponent(Component c);

    public DropTargetContext getDropTargetContext();

    public void
        addDropTargetListener(DropTargetListener dte)
          throws TooManyListenersException;

    public void
        removeDropTargetListener(DropTargetListener dte);

    public void	    setActive(boolean active);
    public boolean isActive();

    public FlavorMap getFlavorMap();
     public void      setFlavorMap(FlavorMap fm);

     public void setDefaultActions(int actions);
     public int  getDefaultActions();

    protected DropTargetContext createDropTargetContext();

    public void addNotify(ComponentPeer cp);
    public void removeNotify(ComponentPeer cp);
}
The setComponent() method throws IllegalArgumentException if the Component actual parameter is not appropriate for use with this class/instance of DropTarget, and may also throw UnsupportedOperationException if the Component specified disallows the external setting of a DropTarget.

The addDropTargetListener() and removeDropTargetListener() methods allow the unicast DropTargetListener to be changed.

The setActive() and isActive() methods allow the DropTarget to be made active or otherwise and for its current state to be determined.

The getFlavorMap() methods is used to obtain the FlavorMap associated with this DropTarget for the purposes of mapping any platform dependent type names to/from their corresponding platform independent DataFlavors.

The setFlavorMap() method allows a new FlavorMap to be assigned to the DropTarget, a parameter of null causes a "default" FlavorMap to be installed for the DropTarget.

The createDropTargetContext() method is only invoked to provide the underlying platform dependent peer with an instantiation of a new DropTargetContext as a Drag operation initially encounters the Component associated with the DropTarget. If no DropTargetContext is currently associated with a DropTarget, a permitted side-effect of an invocation of getDropTargetContext() is to instantiate a new DropTargetContext.

The addNotify() and removeNotify() methods are only called from Component to notify the DropTarget of the Component's (dis)association with its ComponentPeer.

Note that the DropTarget itself implements DropTargetListener, this is to allow the platform peer, the DropTargetContextPeer instance, created by the platform, to notify the DropTarget of changes in state in the ongoing operation, and thus allows the DropTarget to interpose itself between the platform and the DropTargetListener registered with the DropTarget.

2.4.3 The DropTargetContext Definition

As the logical cursor associated with an ongoing Drag and Drop operation first intersects the visible geometry of a Component with an associated DropTarget, the DropTargetContext associated with the DropTarget is the interface, through which, access to, and control over state of the recipient protocol is achieved from the DropTargetListener.

A DropTargetContext is created by a DropTarget, via it's createDropTargetContext() method, as a side effect of a call to a DropTarget's getDropTargetContext() method, if no DropTargetContext currently exists for that DropTarget.

The DropTargetContext interface is defined as follows:

public class DropTargetContext {
    public DropTarget getDropTarget();

    public Component		 getComponent();

    public void		 dropComplete(boolean success)
                throws InvalidDnDOperationException;

    public void acceptDrag(int dropAction);
    public void rejectDrag();

    public void acceptDrop(int dropAction);
    public void rejectDrop();

    public void addNotify(DropTargetContextPeer dtcp);
    public void removeNotify();

    protected Transferable
        createTransferableProxy(Transferable t,
                                boolean      isLocal
        );

     protected void setTargetActions(int actions);
     protected int  getTargetActions();

     protected DataFlavor[] getCurrentDataFlavors();
     protected List         getCurrentDataFlavorsAsList();

     protected boolean isDataFlavorSupported(DataFlavor df);

     protected Transferable getTransferable();

}
Most of the access and control methods are protected, since public access to their state is usually achieved by calling through a particular DropTargetEvent subclass that delegates the request to the DropTargetContext.

The getDropTarget() method return the DropTarget that created this DropTargetContext.

The getComponent() method returns the Component associated with the DropTarget that created this DropTargetContext.

The acceptDrag() method is delegated from the similar method on DropTargetDragEvent and is invoked from one of the DropTargetListener's methods; dragEnter(), dragOver() or dropActionChanged() to signify that the recipient is prepared to accept a drop with the operation specified, which is usually the user's currently selected action.

The rejectDrag() method is delegated from the similar method on DropTargetDragEvent and is invoked from one of the DropTargetListener's methods; dragEnter(), dragOver() or dropActionChanged() to signify that the recipient is unable to accept a drop with the user's currently selected action.

The acceptDrop() method is delegated from the similar method on DropTargetDropEvent and is invoked from the DropTargetListener's drop() method to signify that the recipient is prepared to accept a drop with the operation specified, which is usually the user's currently selected action.

The rejectDrop() method is delegated from the similar method on DropTargetDropEvent and is invoked from the DropTargetListener's drop() method to signify that the recipient is unable to accept a drop with the user's currently selected action. This terminates a Drag and Drop operation without a data transfer.

The dropComplete() method signals to the originating DragSource that the DropTargetListener has completed the transfer(s) that comprise the subject of the Drag and Drop operation and that the operation is complete. The success (or failure) of the transfer(s) and the subsequent application of the operation specified is signaled by the value of the actual parameter.

The getDataFlavors() method returns an array of the DataFlavors available from the DragSource.

The getTransferable() method returns a Transferable (not necessarily the one the DragSource registered, it may be a proxy, and certainly shall be in the inter-JVM* case) to enable data transfers to occur via its getTransferData() method. Note that it is illegal to invoke getTransferable() without first invoking an acceptDrop().

The addNotify() and removeNotify() methods are exclusively called by the underlying platform's DropTargetContextPeer in order to notify the DropTargetContext that a Drag and Drop operation is occurring/ceasing on the DropTargetContext and associated DropTarget.

The createTransferableProxy() method enables a DropTargetContext implementation to interpose a Transferable between the DropTargetListener and the Transferable provided by the caller, which is typically the underlying platform DropTargetContextPeer.

2.4.4 The DropTargetListener Definition

Providing the appropriate "Drag-under" feedback semantics, and processing of any subsequent Drop, is enabled through the DropTargetListener asssociated with a DropTarget.

The DropTargetListener determines the appropriate "Drag-under" feedback and its response to the DragSource regarding drop eligibility by inspecting the sources suggested actions and the data types available.

A particular DropTargetListener instance may be associated with a DropTarget via addDropTargetListener() and removed via removeDropTargetListener() methods.

public interface java.awt.dnd.DropTargetListener
      extends java.util.EventListener {
    void dragEnter            (DropTargetDragEvent dtde);
    void dragOver             (DropTargetDragEvent dtde);
     void dropActionChanged    (DropTargetDragEvent dtde);
    void dragExit             (DropTargetDragEvent dtde);
    void drop                 (DropTargetDropEvent dtde);
}

The dragEnter() method of the DropTargetListener is invoked when the hotspot of the logical "Drag" Cursor intersects a visible portion of the DropTarget's associated Component's geometry. The DropTargetListener, upon receipt of this notification, shall interrogate the operations or actions, and the types of the data (DataFlavors) as supplied by the DragSource to determine the appropriate actions and "Drag-under" feedback to respond with invocation of either acceptDrag() or rejectDrag().

The dragOver() method of the DropTargetListener is invoked while the hotspot of the logical "Drag" Cursor, in motion, continues to intersect a visible portion of the DropTarget's associated Component's geometry. The DropTargetListener, upon receipt of this notification, shall interrogate the operation "actions" and the types of the data as supplied by the DragSource to determine the appropriate "actions" and "Drag-under" feedback to respond with an invocation of either acceptDrag() or rejectDrag().

The getLocation() method return the current co-ordinates, relative to the associated Component's origin, of the hotspot of the logical "Drag" cursor.

The getSourceActions() method return the current "actions", or operations (ACTION_MOVE, ACTION_COPY, or ACTION_LINK) the DragSource associates with the current Drag and Drop gesture.

The dragExit() method of the DropTargetListener is invoked when the hotspot of the logical "Drag" Cursor ceases to intersect a visible portion of the DropTarget's associated Component's geometry, or immediately prior to a drop() notification. The DropTargetListener, upon receipt of this notification, shall undo any "Drag-under" feedback effects it has previously applied. Note that the DropTargetContext associated with the DropTarget is invalidated as a side-effect

The drop() method of the DropTargetListener is invoked as a result of the user terminating their Drag gesture while intersecting. The DropTargetListener, upon receipt of this notification, shall perform the operation specified by the return value of the getSourceActions() method on the DropTargetDropEvent object, upon the Transferable object returned from the getTransferable() method, and subsequently invoke the dropComplete() method of the associated DropTargetContext to signal the success, or otherwise, of the operation.

2.4.5 The DropTargetDragEvent and DropTargetDropEvent Definitions

The DropTargetEvent and DropTargetDragEvent are defined as follows:

public abstract class java.awt.dnd.DropTargetEvent
      extends java.util.EventObject1 {

    public DropTargetContext getDropTargetContext();

}
A DropTargetEvent is passed to the DropTargetListener's dragExit() method.

public class   java.awt.dnd.DropTargetDragEvent
      extends java.awt.dnd.DropTargetEvent {
    public DataFlavor[] getDataFlavors();

    public Point	  getLocation();

    public int getSourceActions();

     public getDropAction();

     public DataFlavor[] getCurrentDataFlavors();
    public List         getCurrentDataFlavorsAsList();

     public boolean isDataFlavorSupported();

    public void acceptDrag(int operation);
    public void rejectDrag();

}
A DropTargetDragEvent is passed to the DropTargetListener's dragEnter(), dragOver() and dropActionChanged() methods.

The getLocation() method return the current co-ordinates, relative to the associated Component's origin, of the hotspot of the logical "Drag" cursor.

The getSourceActions() method return the current "actions", or operations (ACTION_MOVE, ACTION_COPY, or ACTION_REFERENCE) the DragSource associates with the current Drag and Drop gesture.

The getCurrentDataFlavors(), getCurrentDataFlavorsAsList(), and isDataFlavorSupported(), methods are provided in order for the recipient to interrogate the list of types available from the source.

The is defined as follows:

public class java.awt.dnd.DropTargetDropEvent
      extends java.awt.dnd.DropTargetEvent {

    public Point	  getLocation();

    public int getSourceActions();

     public int getDropAction();

    public void acceptDrop(int dropAction);
    public void rejectDrop();

    public boolean isLocalTransfer();

     public DataFlavor[] getCurrentDataFlavors();
     public List         getCurrentDataFlavorsAsList();

     public boolean isDataFlavorSupported(DataFlavor df);

    public Transferable getTransferable();

     public void dropComplete(boolean success);
}
A DropTargetDropEvent is passed to the DropTargetListener's drop() method, as the Drop occurs. The DropTargetDropEvent provides the DropTargetListener with access to the Data associated with the operation, via the Transferable returned from the getTransferable() method.

The return value of the getSourceActions() method is defined to be the action(s) defined by the source at the time at which the Drop occurred.

The return value of the getDropAction() method is defined to be the intersection of both the Drop action selected by the users gesture, and the set of actions supported by the source, at the time of the Drop. The resulting action is normally the intersection of this value and the set of actions supported by the target at the time of the drop.

The return value of the getLocation() method is defined to be the location at which the Drop occurred.

The getCurrentDataFlavors(), getCurrentDataFlavorsAsList(), and isDataFlavorSupported(), methods are provided in order for the recipient to interrogate the list of types available from the source for subsequent transfer via the getTransferData() method of the Transferable.

A typical implementation of the drop() method will inspect the actions and the DataFlavors' available to determine if a successful exchange can occur or not.

When an exchange may occur, a DropTargetListener.drop() implementation shall invoke acceptDrop() with the selected operation as an actual parameter, prior to any invocation of getTransferable(). Calling getTransferable() prior to acceptDrop() shall result in an InvalidDnDOperationException.

The rejectDrop() shall be called to reject the Drop operation. Once called no further interaction can occur between the two participants, therefore it is typical to return from the drop() method immediately after calling this.

The isLocalTransfer() method shall return true, if the source of the Drag and Drop operation resides within the same physical JVM as the recipient of the drop() notification, and false otherwise.

This distinction is significant to the recipient when it receives object references back from invoking Transferable.getTransferData() in the local case, since in this case the object reference it receives is the same object reference held by the source (i.e it is not a copy, proxy or distinct object) thus the recipient must treat such a shared object reference differently in the local case as follows:

  • If the action is ACTION_COPY then the recipient shall, depending upon the nature of the object(s) and data transferred, either take a copy of; the object itself, the data encapsulated within, or both.
  • If the action is ACTION_MOVE, then the recipient shall not modify the state of the object or the data encapsulated within until after it has signalled to the source, via an invocation of dropCompete() that the transfer is effected. (Note that a source is also prohibited from modifying the state of such an object after it has returned such an object from it's getTransferData() method, until such time as it receives a dragDropEnd() notification.)
  • If the action is ACTION_LINK, neither the recipient nor the source shall alter the state of either the object exchanged or any data contained therein until after the dropComplete() and dragDropEnd() methods have been processed. Thereafter the sharing semantics are implementation dependent upon the object(s) shared.
The dropComplete() method signals the end of the associated Drag and Drop operation, and indicates the success (or failure) of the transfers performed by the recipient. Invoking this method results in the DragSourceListener's dragDropEnd() method being called with the appropriate state available from it's DragSourceDropEvent. Failure to invoke this method will result in the Drag and Drop operation failing to terminate properly.

2.4.6 Autoscrolling support

Many GUI Components present a scrollable "viewport" over a (potentially) large dataset. During a Drag and Drop operation it is desirable to be able to "autoscroll" such "viewports" to allow a user to navigate over such a dataset, scrolling to locate a particular member (initially not visible through the "viewport") that they wish to drop the subject of the operation upon.

Components that are scrollable provide Drag "autoscrolling" support to their DropTarget by implementing the following interface:

public interface Autoscroll {
    Insets getAutoscrollInsets();

    void autoScrollContent(Point cursorLocn);
}
An implementing DropTarget shall periodically call the autoscroll() method of its associated Component (if present), passing the current logical cursor location in Component co-ordinates, when the following conditions are met:

  • If the logical cursor's hotspot intersects with the associated Component's visible geometry and the boundary region described by the Insets returned by the getAutoscrollInsets() method.
  • If the logical cursor's hotspot has not moved (subject to the next condition below) for an implementation defined period (millisecs)
  • If any cursor movement subsequent to the initial triggering occurrence does not exceed a platform dependent hysteresis value (pixels).
Should any of the above conditions cease to be valid, autoscrolling shall terminate until the next triggering condition occurs.

Both the initial delay prior to autoscrolling commencing, the interval between autoscrolling notifications, and the pixel hysteresis value are externally configurable and can be queried from the Toolkit.getDesktopProperty() method.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Contents

CONTENTS | PREV | NEXT

Drag and Drop Subsystem
for JFC

1.0 Requirements
2.0 API
 | 2.1 Overview
 | 2.2 Drag Gesture Recognition
 |  | 2.2.1 DragGestureRecognizer
 | 2.3 Drag Source
 |  | 2.3.1 The DragSource definition
 |  | 2.3.2 The DragSourceContext Definition
 |  | 2.3.3 The DragSourceListener Definition
 |  | 2.3.4 The DragSourceEvent Definition
 |  | 2.3.5 The DragSourceDragEvent Definition
 |  | 2.3.6 The DragSourceDropEvent Definition
 | 2.4 Drop Target
 |  | 2.4.1 java.awt.Component additions for DropTarget (de)registration.
 |  | 2.4.2 The DropTarget Definition
 |  | 2.4.3 The DropTargetContext Definition
 |  | 2.4.4 The DropTargetListener Definition
 |  | 2.4.5 The DropTargetDragEvent and DropTargetDropEvent Definitions
 |  | 2.4.6 Autoscrolling support
 | 2.5 Data Transfer Phase
 |  | 2.5.1 FlavorMap and SystemFlavorMap
 |  | 2.5.2 Transferring Data across the JVM boundary
 |  | 2.5.3 Transferring lists of files across the JVM boundary.
 |  | 2.5.4 Transferring java.rmi.Remote references across the JVM boundary.
3.0 Issues
 |  | 3.0.1 What are the implications of the various platform protocol engines?
 |  | 3.0.2 Inter/Intra VM transfers?
 |  | 3.0.3 Lifetime of the Transferable(s)?
 |  | 3.0.4 Implications of ACTION_MOVE semantics on source objects exposed via Transferable?
 |  | 3.0.5 Semantics of ACTION_REFERENCE operation.
Appendix A : DropTargetPeer definition
Appendix B : DragSourceContextPeer definition
Appendix C : DropTargetContextPeer definition

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Drag and Drop DropTargetContextPeer definition

CONTENTS | PREV | NEXT Drag and Drop

Appendix C : DropTargetContextPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DropTargetContextPeer {

    int  getTargetActions();
    void setTargetActions(int actions);

    DropTarget getDropTarget();

    DataFlavor[] getTransferDataFlavors();

    Transferable getTransferable()
                throws InvalidDnDOperationException;

    boolean isTransferableJVMLocal();

    void acceptDrag(int dragAction);
    void rejectDrag();

    void acceptDrop(int dropAction);
    void rejectDrop();

    void dropComplete(boolean success);
}

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Drag and Drop:

CONTENTS | PREV | NEXT Drag and Drop

Drag and Drop subsystem for the Java Foundation Classes

Send comments to java-dnd@java.sun.com.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


DragSourceContextPeer definition

CONTENTS | PREV | NEXT Drag and Drop

Appendix B : DragSourceContextPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DragSourceContextPeer {

    void startDrag(DragSourceContext dsc,
                   Cursor            c,
                   Image             di,
                   Point             ioff
    ) throws InvalidDnDOperationException;

    Cursor getCursor();

    void   setCursor(Cursor c)
             throws InvalidDnDOperationException;

    void transferablesFlavorsChanged();
}

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


DropTargetPeer definition

CONTENTS | PREV | NEXT Drag and Drop

Appendix A : DropTargetPeer definition

Although not a normative part of this specification this definition is included for clarity:

public interface DropTargetPeer {

    void addDropTarget(DropTarget dt);

     void removeDropTarget(DropTarget dt);
}

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Issues

CONTENTS | PREV | NEXT Drag and Drop

3.0 Issues

3.0.1 What are the implications of the various platform protocol engines?

Due to limitations of particular underlying platform Drag and Drop and Window System implementations, the interaction of a Drag operation, and the event delivery semantics to AWT Components is platform dependent. Therefore during a drag operation a DragSource may process platform Window System Events pertaining to that drag to the exclusion of normal event processing.

Due to interactions between the single-threaded design center of the platform native DnD systems, and the native window system event dispatching implementations in AWT, "callbacks" into DropTargetListener and DragSourceListener will occur either on, or synchronized with the AWT system event dispatch thread. This behavior is highly undesirable for security reasons but is an implementation, not architectural feature, and is unavoidable.

3.0.2 Inter/Intra VM transfers?

To enable intra-JVM* Drag and Drop Transfers the existing DataFlavor class will be extended to enable it to represent the type of a "live" object reference, as opposed to a Serialized (persistent) representation of one. Such objects may be transferred between source and destination within the same JVM and ClassLoader context.

The MIME Content-Type shall be application/x-java-local-objectref.

3.0.3 Lifetime of the Transferable(s)?

Transferable objects, their associated DataFlavors', and the objects that encapsulate the underlying data specified as the operand(s) of a drag and drop operation shall remain valid until, at least, the DragSourceListener, associated with the DragSource controlling the operation, receives a dragDropEnd(). The lifetime of the subject(s) of the operation, transferred between source and target is implementation defined beyond that point in time.

3.0.4 Implications of ACTION_MOVE semantics on source objects exposed via Transferable?

The "source" of a successful Drag and Drop (ACTION_MOVE) operation is required to delete/relinquish all references to the object(s) that are the subject of the Transferable immediately after transfer has been successfully completed. That is before returning from the DragSourceListener.dragDropEnd() notification.

3.0.5 Semantics of ACTION_REFERENCE operation.

As a result of significant input from developers to an earlier version of the specification an additional operation/action tag; ACTION_REFERENCE was added to include existing platform Drag and Drop"Link" semantics.

It is believed that Reference, or Link, semantics are already sufficiently poorly specified for the platform native Drag and Drop to render it essentially useless even between native applications, thus between native and platform independent Java applications it is not recommended.

For Java to Java usage the required semantic; within the same JVM/ClassLoader, is defined such that the destination shall obtain a Java object reference to the subject(s) of the transfer. Between Java JVM's or ClassLoaders, the semantic is implementation defined, but could be implemented through transferring either a URL from the source to the destination or an RMI Remote reference.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Requirements

CONTENTS | PREV | NEXT Drag and Drop

1.0 Requirements

This specification is based upon an (incomplete) earlier work undertaken in 1996 to specify a Uniform Data Transfer Mechanism, Clipboard, and Drag and Drop facilities for AWT.

The AWT implementation in JDK1.1 introduced the Uniform Data Transfer Mechanism and the Clipboard protocol. This specification defines the API for the Drag and Drop facilities for the JavaTM 2 Platform based upon, but extending these 1.1 UDT API's.

The primary requirements that this specification addresses, are:

1. Provision of a platform independent Drag and Drop facility for Java GUI clients implemented through AWT and JFC classes.

2. Integration with platform dependent Drag and Drop facilities, permitting Java clients to be able to participate in DnD operation with native applications using:

  • OLE (Win32) DnD
  • CDE/Motif dynamic protocol
  • MacOS
  • OS/2
3. Support for 100% pure JavaOS/Java implementation.
4. Leverages the existing java.awt.datatransfer.* package to enable the transfer of
data, described by an extensible data type system based on the MIME standard.

5. Does not preclude the use of "accessibility" features where available.
6. Extensible to support diverse input devices.
The specification derives from the previous work mentioned above, but incorporates significant differences from that original work as a result of the advent of the JavaBeans event model, Lightweight (JFC) Components, and an increasing understanding of the cross-platform integration and interoperability issues.

CONTENTS | PREV | NEXT
Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.


Extension Versioning

Java

Optional Package Versioning

 Optional Package Documentation
Note: Optional packages is the new term for what used to be known as standard extensions or just extensions.

Version 1.3 of the JavaTM 2 Platform introduces support for an expanded set of Jar-file manifest attributes that enable applets to specify version and vendor information for the optional packages that they require. The manifests of Jar-packaged applets can specify a URL at which the latest version of the optional package the Java Plug-in can download if

  • the needed optional package is not already installed in the Java runtime environment, or
  • the optional package is installed but has an out-of-date version number, or
  • the optional package is installed but is not from a specified vendor.

The manifest attributes that can be used to specify version and vendor information are described below.

Manifest Attributes for Use by Installed Optional Packages

The following portion of a sample manifest file illustrates the attributes that are available for use by optional packages.
Extension-Name: javax.help
Specification-Vendor: Sun Microsystems, Inc
Specification-Version: 1.0
Implementation-Vendor-Id: com.sun
Implementation-Vendor: Sun Microsystems, Inc
Implementation-Version: 1.0
The attributes in this example are:
Extension-Name
This attribute specifies a name for the optional package contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the optional package.
Specification-Vendor
This attribute identifies the company that originated the specification to which the optional package conforms.
Specification-Version
This attribute specifies the version number of the specification to which the implementation conforms.
Implementation-Vendor-Id
This attribute's value is a unique identifier for the company that produced the optional package implementation contained in the Jar file.
Implementation-Vendor
This attribute's value is the name of the company that produced the implementation of the optional package. This attribute should be used only for such purposes such as user feedback, and the Java Plug-in software does not use it to identify the optional package vendor. Rather, the Java Plug-in relies on the Implementation-Vendor-Id attribute to provide unique vendor identification.
Implementation-Version
This attribute indicates the vendor's version number for the implementation of the optional package.

Each optional package installed in the Java runtime environment can use these manifest attributes to identify itself. When the Java Plug-in is running an applet that requires an optional package, the plug-in can access these attributes to determine if the installed optional packages match the vendor and version criteria specified by the applet. The applet specifies such information by using the manifest attributes described in the following section. Note that all of the above manifest attributes should be included in an optional package's manifest. If the plug-in looks for but doesn't find one of these attributes in an optional package's manifest, it will assume that the optional package is not suitable for the applet.

Manifest Attributes for Use by Applet Jar Files

The following sample manifest file illustrates the attributes that are available for use by Jar-packaged applets. (This sample is for illustrative purposes only. No actual optional packages are available at the URLs mentioned in this example.)
Extension-List: javahelp java3d
javahelp-Extension-Name: javax.help
javahelp-Specification-Version: 1.0
javahelp-Implementation-Version: 1.0.3
javahelp-Implementation-Vendor-Id: com.sun
javahelp-Implementation-URL: http://java.sun.com/products/stdext/javahelp.jar
java3d-Extension-Name: javax.3d
java3d-Specification-Version: 1.0
java3d-Implementation-Version: 1.2.1
java3d-Implementation-Vendor-Id: com.sun
java3d-Implementation-URL: http://java.sun.com/products/stdext/java3d.jar
The attributes used in this example are:
Extension-List
This attribute indicates the optional packages that are needed by the applet. Each optional package listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the optional package it requires.
<extension>-Extension-Name
This attribute is the unique name of the optional package. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed optional packages to determine if the optional package is installed.
<extension>-Specification-Version (Optional)
This attribute specifies the minimum optional package specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed optional package to determine if the optional package is up to date.
<extension>-Implementation-Version (Optional)
This attritute specifies the miminum optional package implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed optional package to see if a more recent implementation needs to be downloaded.
<extension>-Implementation-Vendor-Id (Optional)
This attribute can be used to identify the vendor of an optional package implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed optional package.
<extension>-Implementation-URL
This attritute specifies a URL that can be used to obtain the most recent version of the optional package if the required version is not already installed.
The Java Plug-in performs the following determinations when loading an applet whose manifest indicates that it needs one or more optional packages:
  • If an optional package with the correct value of the Extension-Name attribute is not installed, the Java Plug-in will prompt the user to let it download the optional package.
  • If an optional package with the correct value of the Extension-Name attribute is already installed, the Java Plug-in makes the following comparisons:
    • If the optional package's Specification-Version value is greater or equal to that required by the applet:
      • If the Implementation-Vendor-Id attributes match:
        • If the optional package's Implementation-Version is greater than or equal to that specified in the applet's manifest, do nothing - an up-to-date version of the optional package is already installed.
        • If the optional package's Implementation-Version is less than that specified in applet's manifest, the plug-in will prompt the user to download an upgrade from the same vendor.
      • If the Implementation-Vendor-Id attributes do not match, the Java Plug-in will prompt the user to download the optional package from the vendor specified in the applet's manifest.
    • If the optional package's Specification-Version value is less than that required by the applet:
      • If the optional package's Implementation-Vendor-Id matches that indicated in the applet's manifest, the Java Plug-in will prompt the user to download an updated optional package from the same vendor.
      • If the optional package's Implementation-Vendor-Id does not match that specified by the applet's manifest, the Java Plug-in will prompt the user to download the optional package from the vendor specified in the the applet's manifest.

If the applet's manifest doesn't contain one or more of the optional attributes, the plug-in will accept any value of the corresponding attribute in the optional package's manifest.

Download and Installation of Optional Packages

The following considerations pertain to optional packages that are downloaded by the Java Plug-in.

The optional package download URL as indicated in the applet manifest's <extension>-Implementation-URL attribute need not be limited to the Applet codebase.

All downloadable files should be signed using a DSA or RSA certificate. Any optional packages not so signed will not be installed but instead will be treated as a bundled optional package and loaded through the applet class loader, sharing the applet security attributes.

When the Java Plug-in retrieves an optional package from the URL indicated in the applet's manifest, it will check the optional package's manifest for a Main-Class attribute after verifying the optional package's signature. If the optional package's manifest file does not contain a Main-Class attribute, the Java Plug-in will simply drop the Jar file into the optional packages directory of the runtime environment (jre/lib/ext in the Java 2 SDK and lib/ext in the Java 2 Runtime Environment).

Some optional package Jar files may contain their own installer programs in either native code or as applications written in the Java programming language. Such an installer program may be necessary for purposes such as installing native libraries or accessing the Win32 registry, for example. If the Java Plug-in finds a Main-Class attribute in the optional package's manifest, it will assume that it indicates a class that serves as a Java-language installer and will invoke the main() method of that class.

An optional package's manifest may alternatively contain a Extension-Installation attribute. The value of this field will point to a native installation application that is to be used by the Java Plug-in to install the optional package.

The URL of an optional package as specified by the <extension>-Implementation-URL must point to a JAR-file. The plug-in will not download and install optional packages packaged as .exe or .bin files.

Some optional packages come packaged in different Jar files for different operating systems. Such cases can be accomodated by the <extension>-Implementation-URL attribute by using the $(os-name)$ construction in the attribute's value. Here is an example.

javaExt-Implementation-URL: http://.../stdext/javaExt-$(os-name)$.jar
Here, $(os-name)$ is the name of target operating system as defined by the os.name system property.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved. Sun

Java Software


Optional Package Overview

Java

Optional Packages - An Overview

Contents

  • What an optional package is
  • Installed optional packages
  • Download optional packages

What an optional package is

Note: Optional packages were formerly known as standard extensions or just extensions.

Optional packages are packages of Java classes and associated native code that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java virtual machine (VM) to use the optional-package classes in much the same way as the VM uses bootstrap classes. (Bootstrap classes are those implementing the core platform, contained in jre/lib/rt.jar and jre/lib/i18n.jar. These include classes of the public API such as java.lang, java.io, etc., and classes supporting the platform's internationalization/localization features.). Like bootstrap classes, classes in optional packages do not have to be placed on the class path. The extension mechanism also provides a way for needed optional packages to be retrieved from specified URLs when they are not already installed in the Java 2 Runtime Environment or Java 2 SDK.

Optional packages are embodied in JAR files, and every JAR file is a potential optional package. A JAR file can be made to play the role of an optional package in two ways:

  • by being placed in a special location in the Java 2 Runtime Environment or Java 2 SDK directory structure - in which case it is an installed optional package.
  • by being referenced in a specified way from the manifest of the JAR file of an applet or application - in which case it is a download optional package.
When the VM is searching for a class of a particular name, it will first look among the bootstrap classes. If it fails to find the desired class there, it will next look for the class among any installed optional packages. If it doesn't find the class among either the bootstrap classes or the installed optional packages, the VM will search among any download optional packages referenced by the application or applet. The VM only searches the class path if it fails to find a class among the bootstrap classes or optional package classes.

Installed optional packages

Installed optional packages are JAR files in the directory
lib/ext       [in the Java 2 Runtime Environment]
jre/lib/ext   [in the Java 2 SDK]
Classes within JAR files in this directory can be used by applets and applications much as if they were part of the set of bootstrap classes, without having to explicitly include them in the class path.

An installed optional package's native code binaries, if any, are placed in

jre\bin         [Win32]
jre/lib/<arch>  [Solaris]
where <arch> is the Solaris processor architecture, either sparc or x86. Native libraries may also be placed in jre/lib/ext/<arch> for both Win32 and Solaris, where <arch> will be x86 on Win32 systems. The jre/lib/ext/<arch> directory is searched after jre\bin (win32) or jre/lib/<arch> (Solaris).

When the Java VM encounters a class name, it looks first for the class in the runtime environment. If it fails to find the desired class among the classes that are part of the standard runtime environment, the VM will search for the class in any JAR files in the optional packages directory.

Note that there is nothing special about any particular JAR file itself or the classes it contains that makes it an installed optional package. It is an installed optional package by virtue of its location in jre/lib/ext.

The manifest of an installed optional package's JAR file should contain version and vendor information for use by applets that need to use the optional packages classes. The attributes that specify the version and vendor information are described in Optional Package Versioning. Here is an example of what such a manifest might look like:

Manifest-version: 1.0
Extension-Name: javax.extension
Specification-Version: 1.0
Specification Vendor: Sun Microsystems, Inc.
Implementation-Vendor: Sun Microsystems, Inc.
Implementation-Vendor-Id: com.sun
Sealed: true
This version and vendor information can be used by the Java Plug-in when running an applet to see if optional packages needed by the applet are installed, are up to date, and are from the vendor requested by the applet. If not, the Java Plug-in can prompt the applet user to download the proper optional package. See Optional Package Versioning for more information.

If a class is not found after searching both the system classes and the classes in the installed optional packages, the extension mechanism will search for the class in a download optional package....

Download optional packages

A download optional package is a JAR files that is specified in the Class-Path header field in the manifest of another JAR files. Classes in download optional packages may be used by classes in the referencing JAR file. In a typical situation, an applet will be bundled in a JAR file whose manifest references a JAR file (or several JAR files) that will serve as an optional package for the purposes of that applet. Optional packages may reference each other in the same way.

A Class-Path header might look like this, for example:

Class-Path: servlet.jar infobus.jar acme/beans.jar
This specifies that the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as optional pakcages for purposes of the classes in the JAR file whose manifest contains this header. The URLs in the Class-Path field are given relative to the URL of the JAR file of the applet or application.

Unlike the case of installed optional packages, the location of the JAR files that serve as download optional packages is irrelevent. A download optional package is an optional package because it is specified as the value of the Class-Path header in another JAR file's manifest, not because it has any particular location.

Another difference between installed and download optional packages is that only applets and applications bundled in a JAR file can make use of download optional packages. Applets and applications not bundled in a JAR file don't have a manifest from which to reference download optional packages.

When searching for a class, the VM first searches among the classes in the system classes and in any installed optional packages. If the class is not found in either the system classes or in the installed optional packages, the VM will search for the class in any download optional packages referenced by the manifest of the application or applet. A download optional package will not be downloaded if a desired class is found among the installed optional packages, even if the download optional package is referenced by the manifest file of the applet or application.

The extension mechanism will not install a download optional package in the Java 2 Runtime Environment or Java 2 SDK directory structure. Download optional packages do not become installed extentions after they have once been downloaded.

Unlike installed optional packages, download optional packages cannot have any native code.

Copyright © 1997, 1998 Sun Microsystems, Inc. All Rights Reserved. Sun

Java Software


The Extension Mechanism

Java

Extension Mechanism Architecture

Contents

  • Introduction
  • The Extension Mechanism
    • Architecture
    • Optional Package Deployment
    • Bundled Optional Packages
    • Installed Optional Packages
  • Optional Package Sealing
  • Optional Package Security
  • API Details

Introduction

Note: Optional packages are the new name for what used to be known as standard extensions. The "extension mechanism" is that functionality of the Java 2 SDK and Java 2 Runtime Environment that supports the use of optional packages.

This document describes the Java platform's mechanism for handling optional packages. An optional package is a group of packages housed in one or more JAR files that implement an API that extends the Java platform. Optional package classes extend the platform in the sense that the virtual machine can find and load them without their being on the class path, much as if they were classes in the platform's core API.

An implementation of an optional package may consist of code written in the Java programming language and, less commonly, platform-specific native code. In addition, it may include properties, localization catalogs, images, serialized data, and other resources specific to the optional package.

Support for optional packages in browsers such as Internet Explorer and Netscape Navigator is available through the Java Plug-in.

A optional package is an implementation of an open, standard API (examples of optional packages from Sun are JavaServlet, Java3D, JavaManagement). Most optional packages are rooted in the javax.* namespace, although there may be exceptions.

The Extension Mechanism

Architecture

The extension mechanism is designed to contain the following elements:
  • an optional package or application packaged as a JAR file can declare dependencies on other JAR files, thus allowing an application to consist of multiple modules, and,
  • the class loading mechanism is augmented to search installed optional packages (and other libraries) for classes, and, if that fails, to search along an application-specified path for classes.
Applications must therefore, in general, be prepared to specify and supply the optional packages (and, more generally, libraries) that it needs. The system will prefer installed copies of optional packages (and libraries) if they exist; otherwise, it will delegate to the class loader of the application to find and load the referenced optional package (and library) classes.

This architecture, since it allows applications, applets and servlets to extend their own class path, also permits packaging and deploying these as multiple JAR files.

Each optional package or application consists of at least one JAR file containing an optional manifest, code and assorted resources. As described below, this primary JAR file can also include additional information in its manifest to describe dependencies on other JAR files. The jar command line tool included with the Java 2 SDK provides a convenient means of packaging optional packages, although any ZIP-compatible archiving tool should work as well. (See the reference pages for the jar tool: [Win32][Solaris])

An optional package or application may refer to additional JAR files which will be referenced from the primary JAR, and these can optionally contain their own dependency information as well.

Packages comprising optional packages should be named per the standard package naming conventions when implementing optional packages. These conventions are outlined in The Java Language Specification, but the requirement that the domain prefix be specified in all upper case letters has been removed. For example, the package name com.sun.server is an accepted alternative to COM.sun.server. Unique package naming is recommended in order to avoid conflicts, because applications and optional packages may share the same class loader.

Optional Package Deployment

An optional package may either be bundled with an application or installed in the JRE for use by all applications. Bundled optional packages are provided at the same code base as the application and will automatically be downloaded in the case of network applications (applets). For this reason, bundled optional packages are often called download optional packages. Installed optional packages are loaded when first used and will be shared by all applications running on the same runtime environment.

When packaging optional packages, the JAR file manifest can be used to identify vendor and version information (see The Java Versioning Specification).

Classes for installed optional packages are shared by all code in the same virtual machine. Thus, installed optional packages are similar to the platform's core classes (in rt.jar), but with an associated class loader and a pre-configured security policy as described below.

Classes for bundled optional packages are private to the class loader of the application, applet or servlet. In the case of network applications such as applets, these optional packages will be automatically downloaded as needed. Since class loaders are currently associated with a codebase, this permits multiple applets originating from the same codebase to share implementations (JARs).

Bundled Optional Packages

The manifest for an application or optional package can specify one or more relative URLs referring to the JAR files and directories for the optional packages (and other libraries) that it needs. These relative URLs will be treated relative to the code base that the containing application or optional package JAR file was loaded from.

An application (or, more generally, JAR file) specifies the relative URLs of the optional packages (and libraries) that it needs via the manifest attribute Class-Path. This attribute lists the URLs to search for implementations of optional packages (or other libraries) if they cannot be found as optional packages installed on the host Java virtual machine*. These relative URLs may include JAR files and directories for any libraries or resources needed by the application or optional package. Relative URLs not ending with '/' are assumed to refer to JAR files. For example,

Class-Path: servlet.jar infobus.jar acme/beans.jar images/
Multiple Class-Path headers may be specified, and are combined sequentially.

Currently, the URLs must be relative to the code base of the JAR file for security reasons. Thus, remote optional packages will originate from the same code base as the application. A future enhancement will leverage the facilities of the Java 2 Platform's Security APIs to allow references to JAR files at other URLs.

Each relative URL is resolved against the code base that the containing application or optional package was loaded from. If the resulting URL is invalid or refers to a resource that cannot be found then it is ignored.

The resulting URLs are used to extend the class path for the application, applet, or servlet by inserting the URLs in the class path immediately following the URL of the containing JAR file. Any duplicate URLs are omitted. For example, given the following class path:

        a.jar b.jar
If optional package b.jar contained the following Class-Path manifest attribute:
        Class-Path: x.jar a.jar
Then the resulting application class path would be the following:
        a.jar b.jar x.jar
Of course, if x.jar had dependencies of its own then these would be added according to the same rules and so on for each subsequent URL. In the actual implementation, JAR file dependencies are processed lazily so that the JAR files are not actually opened until needed.

Installed Optional Packages

In Sun's implementation of the Java 2 Platform, the JAR files of a installed optional package are placed in a standard local code source
<java-home>\lib\ext                     [Win32]
<java-home>/lib/ext                     [Solaris]
Its native code libraries, if any, are placed in
<java-home>\bin                         [Win32]
<java-home>/lib/<arch>                  [Solaris]
Here <java-home> refers to the directory where the runtime software is installed (which is the top-level directory of the JRE or the jre directory in the Java 2 SDK), and <arch> refers to the Solaris processor architecture (sparc or x86).

A installed optional package may additionally contain one or more shared libraries (such as .dll files) and executables. Native libraries may also be placed in jre/lib/ext/<arch> for both Win32 and Solaris, where <arch> will be x86 on Win32 systems. The jre/lib/ext/<arch> directory is searched after jre\bin (win32) or jre/lib/<arch> (Solaris).

Currently, an optional package that contains native code cannot be downloaded by network code, whether such code is trusted or not, into the virtual machine at execution time. An optional package that contains native code and is bundled with a network application must be installed in the Java 2 SDK or Java 2 Runtime Environment.

By default, installed optional packages in this standard directory are trusted. That is, they are granted the same privileges as if they were core platform classes (those in rt.jar). This default privilege is specified in the system policy file, but can be overridden for a particular optional package by adding the appropriate policy file entry.

Note also that if a installed optional package JAR is signed by a trusted entity, then it will be granted the privileges associated with the trusted signer.

Other locations for installed optional packages can be specified through the system property java.ext.dirs. This property specifies one or more directories to search for installed optional packages, each separated by File.pathSeparatorChar. The default setting for this property is the standard directory for installed optional packages indicated above.

Optional Package Sealing

JAR files and packages can be optionally sealed, so that an optional package or package can enforce consistency within a version.

A package sealed within a JAR specifies that all classes defined in that package must originate from the same JAR. Otherwise, a SecurityException is thrown.

A sealed JAR specifies that all packages defined by that JAR are sealed unless overridden specifically for a package.

A sealed package is specified via the manifest attribute, Sealed, whose value is true or false (case irrelevant). For example,

Name: javax/servlet/internal/
Sealed: true
specifies that the javax.servlet.internal package is sealed, and that all classes in that package must be loaded from the same JAR file.

If this attribute is missing, the package sealing attribute is that of the containing JAR file.

A sealed JAR is specified via the same manifest header, Sealed, with the value again of either true or false. For example,

Sealed: true
specifies that all packages in this archive are sealed unless explicitly overridden for a particular package with the Sealed attribute in a manifest entry.

If this attribute is missing, the module is assumed to not be sealed, for backwards compatibility. The system then defaults to examining package headers for sealing information.

Package sealing is also important for security, because it restricts access to package-protected members to only those classes defined in the package that originated from the same JAR file.

Package sealing is checked for installed as well as downloaded optional packages, and will result in a SecurityException if violated. Also, the null package is not sealable, so classes that are to be sealed must be placed in their own packages.

Optional Package Security

The code source for a installed optional package (namely <java-home>/lib/ext) has a pre-configured security policy associated with it. In Sun's implementation, the exact level of trust granted to JARs in this directory is specified by the standard security policy configuration file
<java-home>/lib/security/java.policy
The default policy is for a installed optional package to behave the same way it would if were part of the core platform. This follows from the common need for a installed optional package to load native code.

The Java Security Model provides some safety when installed optional package code is called from untrusted code. However optional package code must be carefully reviewed for potential security breaches wherever it uses privileged blocks.

A remotely loaded optional package that needs to use access-checked system services (such as file I/O) to function correctly must either be signed by a trusted entity or loaded from a trusted source.

Consult the Java security documentation for further details regarding how to write optional package and application code to use the Java 2 Platform's security features.

API Details

The following classes in the Java 2 platform support the extension mechanism:
  • public class java.lang.ClassLoader (changed)

    • The class loader delegation model allows a "parent" class loader to be specified which will always be searched first when loading a class or resource before attempting to load it locally. New class loader implementations override the methods findClass and findResource in order to specify how classes and resources are loaded locally.

    • getSystemClassLoader

      • Returns the system class loader for delegation. This is the default delegation parent for new ClassLoader instances, and is typically the class loader used to start the application.
    • loadClass

      • If the class has already been loaded then just return it. Otherwise, try loading the class from the parent class loader (or virtual machine's built-in class loader, called the bootstrap class loader, if no parent was specified). If still not found, then call the method findClass to load the class locally.

    • findClass

      • Looks in this class loader for the specified class. This method should be overridden in new class loader implementations. Its default implementation throws ClassNotFoundException.

    • getResource

      • Try fetching the resource from the parent class loader (or bootstrap class loader if no parent was specified). If still not found, then call the method getLocalResource to load the resource locally.

    • findResource

      • Looks in this class loader for the specified resource. This method should be overridden by new class loader implementations. Its default implementation returns null.

    • getResources

      • Returns an enumeration of all the resource URLs matching the specified resource name. This enumeration includes all of the matched resources of the parent class loader followed by the enumeration returned by findResources.

    • findResources

      • Returns an enumeration of all the local resource URLs matching the given name. This method should be overridden by new class loader implementations. Its default implementation returns null.

    The delegation model provides a consistent and well defined search policy for loading classes and resources that simplifies class loader implementation. These changes are backward compatible and will not affect existing class loader implementations. However, applications that wish to create their own class loaders and use optional packages must use the delegation model.

    The following example demonstrates a simple network class loader:

        public class NetClassLoader extends ClassLoader {
        URL url;

        public NetClassLoader(URL url, ClassLoader parent) {
            super(parent);
            this.url = url;
        }

        protected Class findClass(String name)
            throws ClassNotFoundException
        {
            .. load class from URL ...
        }

        protected URL findResource(String name) {
            try {
                URL u = new URL(url, name);
                if (u.openConnection() != null) {
                    return u;
                } else {
                    return null;
                }
            } catch (java.net.MalformedURLException mue) {
                   // handle exception
            } catch (java.io.IOException ioe) {
                   // handle exception
            }
        }
    }
    This example will search the parent class loader (or bootstrap class loader, if no parent was specified) for classes and resources before checking the given URL. Classes and resources will be loaded according to the delegation model as described above.
  • public class java.lang.Package

    • The method isSealed can be used to check if a package has been sealed, in which case it will return true. A second form of this method takes a URL and will return true if the package is sealed with respect to the specified URL. This can be used to in class loader implementations to keep track of currently sealed packages when loading new classes.

  • public class java.net.URLClassLoader

    • This class provides the basic class loader support for optional packages and applications. It overrides both the findClass and findResource methods to search one or more base URLs for classes and resources. The search is lazy, such that a URL is not opened until needed.

    URLClassLoader manages a search path of URLs that is used to load classes and resources. Initially, this is set to the URLs specified when the class loader was created, but can be extended by Class-Path manifest attribute as described above.

    URLClassLoader supports all of the manifest attributes for versioning specified in The Java Versioning Specification.

    In addition, the following main manifest attributes are supported:

    • Main-Class: <classname> (no default)

      • Specifies the main class of an application. This is used for invoking an application JAR file.

    • Class-Path: <urls..> (no default)

      • Local search path of relative JAR and directory URLs for loading classes and resources. URLs not ending in '/' are assumed to refer to JAR files.

    • Sealed: <true|false> (default false)

      • All of the packages defined in this JAR file, with the exception of the "null" package, are sealed. The "null" package can never be sealed. This header can also be used to seal individual packages.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: Java Software

Sun


Changes between JDK 1.2 and J2SE 1.3

Java

JavaTM IDL: Changes between JDK 1.2 and J2SE 1.3

 Documentation Contents

This release of the JavaTM 2 Platform, Standard Edition, includes RMI-IIOP, a technology that integrates Java RMI (Remote Method Invocation) and Java IDL. As a result, Java IDL now uses a new version of the IDL-to-Java compiler. This compiler supports new CORBA-standard features required for RMI-IIOP. A summary of the changes that have occurred as a result are outlined below.

RMI-IIOP supersedes Java IDL for most purposes, by enabling you to write CORBA-compliant interfaces directly in Java rather than in the OMG-specified IDL (Interface Definition Language) used with Java IDL. For details, see the RMI-IIOP documentation.

Java IDL API changes

The following list provides a summary of changes that occurred in Java IDL between the release of JDK 1.2 and J2SE v.1.3.

  • NEW! IDL-to-Java compiler, idlj

    The tool that generates Java bindings froma given IDL file has been renamed from idltojava to idlj. The idltojava compiler was a separate download in JDK 1.2, the idlj compiler is available as part of the J2SE v.1.3 download and can be found in the /bin directory.

  • NEW! IDL-to-Java compiler is 100% Pure Java

    The idltojava compiler was hard-coded to use a default C++ preprocessor. When using the idltojava compiler, it was necessary to add the path to the preprocessor prior to running the idltojava compiler. The idlj compiler is 100% pure Java, so no preprocessor is necessary, and no special care need be taken to set up a path to a preprocessor.

  • NEW! More IDL-to-Java compiler options

    The idltojava compiler generated both client and server-side bindings by default. The idlj compiler generates only client-side bindings by default (making the assumption that client and server will reside on different hosts). You can easily emulate the default of the previous compiler by using the -fall option when compiling IDL files.

  • NEW! Mapping for interfaces

    The idltojava compiler generated five files in a subdirectory with the same name as the IDL module. In accordance with the OMG IDL to Java Language Mapping Specification, Section 1.12, Mapping for Interfaces, the idlj compiler generates six files. The difference is that the signature interface no longer contains the method that corresponds to the interface defined in the IDL file. Instead, the operations interface, <interface>Operations.java, is generated in the <module> subdirectory and contains the methods defined by the interface. The operations interface is shared by both stubs and skeletons.

  • NEW! Support for IDL value types

    The new IDL-to-Java compiler, idlj, support Java mapping to IDL value types, as described in the OMG IDL to Java Language Mapping Specification, Section 1.13, Mapping for ValueType.

For more information on the idlj compiler, link to idlj - The IDL-to-Java Compiler (RMI-IIOP version).

Copyright © 1996-2000 Sun Microsystems, Inc. All Rights Reserved.

Send questions or comments to: JavaIDL@eng.sun.com.

Sun

Java Software


Concepts

Distributed Application Concepts

Using CORBA

Glossary

Home Concepts Programming Reference Tutorial
Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


DSI Programming

Advanced Topic: The Dynamic Skeleton Interface (DSI)

The Dynamic Skeleton Interface (DSI) allows servers to serve a servant object without prior (compile time) knowledge of the object's interface. Insead of using skeleton code compiled from the IDL interface definition, the server constructs an operation invocation dynamically.

Why Use DSI?

DSI can be used to bridge CORBA with non-CORBA environments. Such a bridge would allow CORBA clients to invoke methods on CORBA objects that are implemented as, for example, COM services.

The dynamic servant is implemented to convert the CORBA client request to a format understood by the COM server. You must write all the code to perform this work. Contrast this with a typical static object invocation. The server has access to the compiled skeletons for the interface being invoked. These skeletons are generated by compiling the IDL interface definitions with the idlj compiler. When the ORB receives a request, it uses the skeleton code to build operation arguments on the server side and to send back any result.

Dynamic Servant Implementation Example

Consider the following interface:

module HelloApp
{
    interface Hello
    {
        string printHelloArgs(in string arg1, in short arg2);
    };
};

The following code is a shell implementation of a dynamic servant for the above interface. It is a shell because only the basic compilable infrastructure for parsing method requests is provided. You would need to insert code to implement a bridge.

// Copyright and License

import HelloApp.*;

import java.util.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import java.io.*;
import org.omg.CORBA.*;

// servant must extend DynamicImplementation
class HelloServant extends DynamicImplementation
{

    // store the repository ID for the implemented interface
    static String[] myIDs = {"IDL:JavaIDL/DSIExample:1.0"};
    ORB orb;

    // create a reference to the ORB
    HelloServant(ORB orb) {
        this.orb = orb;
    }
    // must implement invoke() for handling requests
    public void invoke(ServerRequest request) {
        try {
            System.out.println("DSI: invoke called, op = "+request.op_name());

        // create an NVList to hold the parameters
            NVList nvlist = orb.create_list(0);

        // need an if statement like this for each method name
            if (request.op_name().equals("printHelloArgs") == true) {

            // need an Any for each argument
                    Any any1 = orb.create_any();
                    any1.insert_string("");
                    nvlist.add_value("arg1", any1, ARG_IN.value);

                    Any any2 = orb.create_any();
                    any2.insert_string("");
                    nvlist.add_value("arg2", any2, ARG_IN.value);

            // pass the NVList to the request to get values
                    request.params(nvlist);

                    System.err.println("Argument 1: In value: " + nvlist.item(0).value().extract_string());

                    System.err.println("Argument 2: In value: " + nvlist.item(1).value().extract_short());

                    TypeCode result_tc = orb.get_primitive_tc(TCKind.tk_void);
                    Any result_any = orb.create_any();
                    result_any.type(result_tc);

                    request.result(result_any);
            }
        }
        catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("DSIExample: Exception thrown: " + ex);
        }
    }

// implement an _ids method to return repository ID of interface
public String[] _ids() {
        return myIDs;
}

// HelloServer implemented in the usual fashion
public class HelloServer {

    public static void main(String args[])
    {
        try{
            // create and initialize the ORB
            ORB orb = ORB.init(args, null);

            // create servant and register it with the ORB
            HelloServant helloRef = new HelloServant(orb);
            orb.connect(helloRef);

            OutputStream f = new FileOutputStream(System.getProperty("user.home")+System.getProperty("file.separator")+"DSI.ior");
            DataOutputStream out = new DataOutputStream(f);
            String ior = orb.object_to_string(helloRef);
            out.writeBytes(ior);
            out.close();

            System.out.println("IOR is "+ ior);

            // wait for invocations from clients
            java.lang.Object sync = new java.lang.Object();
            synchronized (sync) {
                sync.wait();
            }

        } catch (Exception e) {
            System.err.println("ERROR: " + e);
            e.printStackTrace(System.out);
        }
    }
}

Home

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.


Getting Started with Java IDL

Running the Hello World Application

This topic now resides at Running the Hello World Application.

Copyright © 1996-1998 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


JavaIDL Initialization

JavaTM IDL Examples License

/*

 * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.

 *

 * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,

 * modify and redistribute this software in source and binary code form,

 * provided that i) this copyright notice and license appear on all copies of

 * the software; and ii) Licensee does not utilize the software in a manner

 * which is disparaging to Sun.

 *

 * This software is provided "AS IS," without a warranty of any kind. ALL

 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY

 * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR

 * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE

 * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING

 * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS

 * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,

 * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER

 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF

 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE

 * POSSIBILITY OF SUCH DAMAGES.

 *

 * This software is not designed or intended for use in on-line control of

 * aircraft, air traffic, aircraft navigation or aircraft communications; or in

 * the design, construction, operation or maintenance of any nuclear

 * facility. Licensee represents and warrants that it will not use or

 * redistribute the Software for such purposes.

 */

Copyright © 1995-97 Sun Microsystems, Inc. All Rights Reserved.


Programming Guide

Getting Started: Hello World

Example: Persistent State and User Exceptions

Example: Callback Objects

Example: Implementation Inheritance

Exceptions

Initialization

Naming Service

Advanced Topic: Dynamic Skeleton Interface

Home Concepts Programming Reference Tutorial
Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Reference

All packages that begin with org.omg are part of the Java IDL API. Those of most interest are org.omg.CORBA and org.omg.CosNaming.

  • the org.omg.CORBA package
  • the org.omg.CosNaming package

Mapping IDL to Java

Home Concepts Programming Reference Tutorial
Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Tutorial

Hello World Tutorial

Home Concepts Programming Reference Tutorial
Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Developing Clients

Topics in this section include:

  • ORBs and Invocations
  • Static Invocation
  • Dynamic Invocation
  • Initializing Applets

ORBs and Invocations

For a client to invoke a CORBA object operation, both the client and the server (the object implementation) must use a CORBA software component called an ORB (object request broker). ORBs are the common denominators that bridge the differences in location, platform, and programming language that can separate a client and a server. ORBs can contact each other across the network, can create and interpret object references (CORBA object handles), and can marshal parameters into and out of the format used by IIOP. In addition to enabling client/server communication, ORBs provide other services, but they are not described here.

The two ways to invoke an operation on a CORBA object are:

  • Static invocation, which is used most often and most resembles conventional Java programming, is type-checked by the compiler. But it can only be used for objects whose interface definitions exist when the invoking client is compiled.

  • Dynamic invocation is more flexible because clients can invoke objects they discover at runtime. However, compile-time type-checking is impossible with dynamic invocation. Although it's possible to type-check parameters at runtime, doing so requires a CORBA Interface Repository, which the current release of Java IDL does not provide.

Static Invocation

To make a static invocation on a CORBA object, a Java client needs an object reference to the servant that performs the operation. The object reference has two important functions:

  • It uniquely identifies the servant, wherever it is located.

  • It implements the client stub interface, making the reference a local proxy for the servant object.

Clients don't create object references but obtain them, typically from other objects such as factories or naming contexts.

OMG IDL is the language in which CORBA object interfaces are defined. For each OMG IDL module, the idlj compiler generates a Java package. For each interface Foo defined in an OMG IDL module, the generated package contains the following items of interest to the client programmer:

  • A Java signature interface Foo, which extends org.omg.portable.IDLEntity, org.omg.CORBA.Object, and the operations interface. The signature interface is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. From the client's point of view, an object reference for a CORBA Foo object implements this interface.

    Note: The Stub implements the Foo interface, where it generates code for each method to marshall the arguments, invoke the method, and then unmarshall the arguments.

  • A Java operations interface FooOperations, which is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and server. The server developer provides implementation for the methods indicated by the operations interface.

  • A Java class FooHelper, that defines auxiliary methods, notably narrow(), which is the CORBA counterpart of Java casting.

  • A Java class called FooHolder, that holds a public Foo member. Holders are required for CORBA operations that take out or inout arguments, which, unlike CORBA in arguments, don't map directly to Java's pass-by-value semantics.

Here's a simple example from the point of view of a client. The full text of the generated files can be viewed from Sample Code for Example.idl.

OMG IDL

Generated Java

module Example {
   interface Counter {
      boolean increment (in long arg);
   };
};

package Example;

public interface Counter extends CounterOperations, org.omg.CORBA.Object,
   org.omg.CORBA.portable.IDLEntity
{
} // interface Counter

package Example;

public interface CounterOperations
{
  boolean increment (int arg);
} // interface CounterOperations

package Example;

abstract public class CounterHelper
{
  private static String  _id = "IDL:Example/Counter:1.0";

  public static Example.Counter narrow (org.omg.CORBA.Object obj)
  {
   // ...
}

package Example;

public final class CounterHolder implements
   org.omg.CORBA.portable.Streamable
{
   // ...
}

The following Java fragment shows the essentials of declaring and invoking an instance of this CORBA object:

import Example.*     // get the interface and helper

Counter anInstance = // acquire a reference

boolean aResult;
int anArg = 10;

aResult = anInstance.increment(anArg);

A stub adapts a client to its underlying ORB for a particular CORBA object type. The ORB knows how to marshal an argument, but not which arguments need marshaling for a particular method. The stub, being type-specific, knows which arguments need marshaling for each method. When a client invokes a stub method, the stub tells the client's ORB what to marshal, and then tells the ORB to invoke the CORBA object identified by the object reference. The client's ORB uses the object reference to determine which remote ORB should receive the invocation, passes the marshaled parameters over the network to that ORB, and waits for the result. (For those familiar with remote procedure calls, CORBA object invocation is similar.)

A skeleton is an object server's analog of the client's stub. Skeletons are also generated by IDL compilers. When an ORB receives an invocation for one of its objects, processing is as follows:

  1. The ORB inspects the object key from the incoming message to learn the identity of the object's servant. Actually, the object reference contains the object key, and according to the IIOP protocol specified by the OMG, only the object key part of the object reference flows as part of the message.
  2. The ORB then invokes the appropriate skeleton, which tells the ORB how to unmarshal the parameters.
  3. The ORB invokes the servant implementation of the operation requested by the client.
  4. The servant method returns a result to the skeleton.
  5. The skeleton arranges marshaling with the server ORB.
  6. The server ORB returns the result to the client ORB.
  7. The client ORB returns the result to the stub.
  8. The stub returns the result to the client.

To summarize, IIOP ORBs communicate CORBA object invocations across a network in a standardized form. All ORB operations are independent of the type of object being invoked and of the language in which the client and server are written. It's the job of the stub and the skeleton to match clients and servers to their ORBs for a particular type of CORBA object.

Dynamic Invocation

CORBA dynamic invocation uses an object called a request to hold everything pertinent to an invocation: the object reference, the name of the operation, its parameters, and space for the result. The client builds a request object describing an operation, then calls the request's invoke method, which dispatches the request just as a stub would. When the invoke method returns, the result is available in the request object.

The key to dynamic invocation is the ability of requests to hold self-describing data. This facility enables a request object to represent any invocation of any operation, regardless of its parameters. Each self-describing data element has a special type known in OMG IDL as Any. An Any consists of a typecode (whose values are defined by OMG IDL) and a value; the typecode specifies the type of the value.

The following example shows the essentials of dynamic invocation. The CORBA object to be invoked has the following OMG IDL interface definition:

import org.omg.CosNaming.*;
import org.omg.CORBA.*;

public class CounterClient {
  public static void main(String args[]) {
    try{
      // create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // get the root naming context
      org.omg.CORBA.Object objRef =
        orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // resolve the Object Reference in Naming
      NameComponent nc = new NameComponent("Counter", "");
      NameComponent path[] = {nc};
      Counter counterRef = CounterHelper.narrow(ncRef.resolve(path));

      System.out.println("Object Ref: " + orb.object_to_string(counterRef));

      // Create a DII request and set the arguments and result
      org.omg.CORBA.Request r = counterRef._request("increment");
      r.set_return_type(orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_long));
      org.omg.CORBA.Any inc = r.add_in_arg();
      inc.insert_long(1); // increment by 1

      for (int i = 0; i <10; i++)="i++)" {="{" //="//" call="call" the="the" Hello="Hello" server="server" object="object" and="and" print="print" results="results" r.invoke();="r.invoke();" java.lang.Exception="java.lang.Exception" ex="r.env().exception();" if="if" (ex="(ex" instanceof="instanceof" org.omg.CORBA.UnknownUserException)="org.omg.CORBA.UnknownUserException)" {="{" org.omg.CORBA.UnknownUserException="org.omg.CORBA.UnknownUserException" userEx="(org.omg.CORBA.UnknownUserException)" ex;="ex;" }="}" //="//" extract="extract" the="the" result="result" int="int" result;="result;" result="r.return_value().extract_long();" System.out.println("Counter:="System.out.println("Counter:" " + result);
      }

    } catch (Exception e) {
      System.out.println("="" + result);
      }

    } catch (Exception e) {
      System.out.println("" CounterClient="CounterClient" :=":" Exception:="Exception:">

Initializing Applets

Some web browsers have an ORB built directly into them.  This can cause
problems if that ORB is not perfectly compliant. In this case, special steps
must be taken to initialize the Java IDL ORB specifically.
For example, because of
missing classes in the installed ORB in Netscape Communicator 4.01,
an applet displayed in that browser must contain code similar to the
following in its init() method:

    import java.util.Properties;
    import org.omg.CORBA.*;

    public class MyApplet extends java.applet.Applet {
      public void init()
      {
        // Instantiate the Sun ORB, passing in this applet
        // so that the ORB can retrieve the applet properties.
        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBClass", "com.sun.CORBA.iiop.ORB");
        ORB orb = ORB.init(this, props);
        ...
      }
    }

Clients | Servers | Exceptions | Initialization | Naming

Copyright
© 1996, 1997 Sun Microsystems, Inc.,
2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights
reserved.


Developing Servers

This section introduces Java IDL support for servers of transient CORBA objects. The Hello World example includes a transient object server.

Topics in this section include:

  • Transient and Persistent Objects
  • Servants and Servant Base Classes
  • Using Servant Objects
  • Dynamic Skeleton Interface
  • Delegation-based Skeletons (Ties)

Transient and Persistent Objects

A transient CORBA object has the same lifetime as the execution of the server process that creates it. When a server terminates, its transient objects disappear with it and any object references held by the client become invalid. Transient objects are often used to effect asynchronous, or callback communication between applications and objects. For example, suppose a timing service notifies a client application when an interval expires; it could do so as follows:

  • The timing service defines an interface for a notifier object that includes an interval_expired() operation.

  • The timing service requires that a client pass a notifier object to the timing service's set_interval() operation.

  • The timing service client application implements a transient object that implements the notifier interface.

  • The client application creates and passes a notifier object to the timing service.

  • When the interval expires, the timing service invokes the notifier object's interval_expired() operation.

The arrangement, in other words, is much like a callback in procedural programming.

By contrast, a persistent object lives until it is explicitly destroyed. If a client has a reference to a persistent CORBA object, that reference can be used even if the object's server is not running -- an ORB daemon will start the server when the ORB receives an invocation on the object.

At present, Java IDL supports only transient object servers. Although persistent object servers can't yet be written using Java IDL, Java applets and applications can be clients of persistent CORBA objects whose servers are written in other languages, such as C++, or in other Java ORB implementations.

Servants and Servant Base Classes

To implement a server for transient CORBA objects of some type, you write a Java class called a servant, which inherits from a class called the servant base; servant base classes are optionally generated by the idlj compiler. An instance of a transient CORBA object is implemented by an instance of its servant class.

The servant base class is the CORBA type-specific interface between the ORB and the servant code (skeleton) for the type. It unmarshals incoming parameters, invokes servant methods, marshals results, and directs the ORB to return results to the client ORB.

A servant class extends its servant base with a method for each operation in the IDL interface definition it implements. (OMG IDL attributes require one method if they are read only, two if they are writable.) For example, consider the following OMG IDL:

module Notifiers {
   interface SimpleNotifier {
      void alert (in long alert_id);
   };
};

A servant for this type might look as follows:

import Notifiers.*

class SimpleNotifierServant extends _SimpleNotifierImplBase {

   void alert (int alert_id) {
      // do something about the alert ...
      return;
   }
}

The server class could create an instance of SimpleNotifierServant as follows:

  SimpleNotifierServant SimpleNotifier = new SimpleNotifierServant();
  orb.connect(SimpleNotifier);

The orb.connect() call registers the object and the servant with the ORB so that the ORB will invoke the servant when the CORBA object is invoked. When the server terminates, the ORB destroys its records for that server's CORBA objects so that subsequent invocations will result in an OBJECT_NOT_EXIST exception. A server can alternatively annul its CORBA objects before terminating by calling orb.disconnect().

Using Servant Objects

A transient CORBA object is implemented by a Java servant object. A servant object can be passed as a parameter to any method that needs a CORBA object reference of that type. For example, suppose a Java program wants to learn when the price of Sun Microsystems stock rises above 150. The program has obtained a reference to a CORBA stock-watcher object that provides the following operation (shown in IDL and Java):

// IDL
interface StockWatcher {
void set_threshold(
   in string stock_symbol,
   in short stock_price,
   in Notifiers::SimpleNotifier notifier_obj);
};

// Java
void set_threshold(
   String stock_symbol,
   short stock_price,
   Notifiers.SimpleNotifier notifier_obj)
  { // set the threshold ...
  }

To call set_threshold(), you need to create a SimpleNotifier CORBA object. Assuming you've imported a servant class called SimpleNotifierImpl, here's how to do it:

SimpleNotifier SUNWnotifier = new SimpleNotifierImpl();
int stockPrice = 150;
orb.connect(SUNWnotifier);
StockWatcher aStockWatcher = // code to get a stock-watcher reference;

aStockWatcher.set_threshold ("SUNW", stockPrice, SUNWnotifier);

Dynamic Skeleton Interface

DSI allows servers to serve a servant object without prior (compile time) knowledge of the object's interface. Instead of using skeleton code compiled from the IDL interface definition, the server constructs an operation invocation dynamically.

Why Use DSI?

Use DSI for servers that cannot have compile-time knowledge of the implementation interface. For example, you might need a bridging application to allow CORBA clients to invoke services residing in a COM environment while allowing COM clients the same access to services residing in the CORBA realm. Each environment has its own, very different way of building requests and responses.

This bridging application would use DSI to convert a CORBA client request to a format understood by a COM server. And it would use DII to convert a COM client request to a format understood by a CORBA server. The application programmer writes all the code to perform this work.

Contrast this with a typical static object invocation. The server has access to the compiled skeletons for the interfaces being invoked upon. These skeletons are generated by compiling the IDL interface definitions with the idlj compiler. When the ORB receives a request, it uses the skeleton code to build the operation arguments on the server side and to send back any result.

Steps to Using DSI

To use DSI, implement and register a dynamic servant by doing the following:

  1. Declare your class to extend org.omg.CORBA.DynamicImplementation.

  2. Implement the invoke() method.
    Write the invoke() method code to work with a ServerRequest object to:
    1. Extract the operation name via a call on op_name().
    2. Build an NVList of the operation parameters (this requires type information on the parameters, possibly from an interface repository).
    3. Extract the parameter values via a call on params(), passing the NVList.
    4. Perform the operation, assigning new values to out and inout parameters in the NVList as appropriate.
    5. Call either result() or except(), as appropriate.
    Note: The calls to params() and then to result() or except() must be made in the proper order. You must call params() before calling either of the other two methods, and you must call only one of result() or except() once only. Failure to observe any of these limitations results in a BAD_INV_ORDER exception.

  3. Implement the _ids() method.
    This method is inherited from org.omg.CORBA.portable.ObjectImpl, the superclass of DynamicImplementation. It returns the repository IDs of the interfaces implemented by this dynamic server.

  4. Create an instance of the DSI object and register it with the ORB via a call to org.omg.CORBA.ORB.connect().

DSI Example

Here is DSI.idl, which defines a very simple interface to be implemented dynamically.

//IDL
module JavaIDL {
  interface DSIExample {
    void print_args(in string arg1, in short arg2);
  };
};

Here is the corresponding Java code, from the file DSIServer.java. This portion shows the implementation of invoke() and the dynamic handling of the print_args() operation defined in DSI.idl.

//Java
import java.util.*;
import org.omg.CORBA.*;

// Dynamic servant class implementation
class DSIExampleServantImpl extends DynamicImplementation {

  // Store the repository ID for the interface implemented
  static String[] myIds = {"IDL:JavaIDL/DSIExample:1.0"};

  // Create a reference to the ORB
  ORB orb;
  DSIExampleServantImpl(ORB orb) {
    this.orb = orb;
  }

  // Implementation of invoke() for handling dynamic requests
  public void invoke(ServerRequest request) {
    try {
      System.out.println("DSI: invoke called, op = "+ request.op_name());

      // Create an NVList to hold the parameters
      NVList nvlist = orb.create_list(0);

      // Check if the request is for the operation
      // "print_args"
      if (request.op_name().equals("print_args") == true) {

        // Add first argument to NVList
        Any any1 = orb.create_any();
        any1.insert_string("");
        nvlist.add_value("arg1", any1, ARG_IN.value);

        // Add second argument to NVList
        Any any2 = orb.create_any();
        any2.insert_short((short)0);
        nvlist.add_value("arg2", any2, ARG_IN.value);

        //Pass the NVList to the request, to get values
        request.params(nvlist);

        // Extract values and print arguments
        System.err.println("Argument 1: In value: "
                + nvlist.item(0).value().extract_string());
        System.err.println("Argument 2: In value: "
                + nvlist.item(1).value().extract_short());
        TypeCode result_tc = orb.get_primitive_tc(TCKind.tk_void);
        Any result_any = orb.create_any();
        result_any.type(result_tc);

    // Set the void result
        request.result(result_any);
      }
    }
    catch ( Exception ex ) {
      ex.printStackTrace();
      System.out.println("DSIExample: Exception thrown: " + ex);
    }
  }

  // Implement the _ids() method to return repository ID of interface
  public String[] _ids() {
    return myIds;
  }

}
// File DSIServer.java continues
Here is the remainder of DSIServer.java, showing a standard server implementation. Note that you register a dynamic servant with the ORB by using the same operation you would for a static servant.
// Java

// DSIServer implementation
public class DSIServer {

  // Main
  public static void main(String[] args) {
    try {
      // Access and initialize the ORB
      org.omg.CORBA.ORB orb = ORB.init(args, null);

      // Create an instance of the dynamic implementation
      DSIExampleServantImpl servant = new DSIExampleServantImpl(orb);

      // Register the dynamic servant with the ORB
      orb.connect(servant);

      // Write IOR into file.
      // Alternatively, the naming service could be used.
      OutputStream f = new FileOutputStream(
            System.getProperty("user.home") +
        System.getProperty("file.separator") + "DSI.ior") ;
      DataOutputStream out = new DataOutputStream(f) ;
      String ior = orb.object_to_string(servant) ;
      out.writeBytes(ior) ;
      out.close();

      System.out.println("IOR is " + ior) ;

      // Wait for requests from client
      java.lang.Object sync = new java.lang.Object();
      synchronized(sync){
        sync.wait();
      }

    }
    catch (Exception ex) {
      ex.printStackTrace();
      System.err.println("DSIServer: Exception thrown: " + ex);
    }
  }
}

Delegation-based Skeletons (Ties)

Because Java allows a class to inherit implementation from only a single superclass, it is sometimes awkward to provide CORBA object implementations for objects that rightfully belong in a class hierarchy--the servant base class occupies the single available superclass position. These objects can become CORBA servants most easily by use of delegation-based skeletons.

Delegation-based skeletons move the required CORBA operations from a servant base class (from which your object must inherit) to the generated Tie class. The Tie class acts as the skeleton for this object, receiving invocations from the ORB and delegating them to the servant that actually does the work.

The idlj compiler is installed to the J2SDK's bin directory when you installed the Java 2 Platform, Standard Edition, v1.3. These steps are based on this version of the J2SDK.

Using Ties

To use ties, first compile the IDL interface using the -ftie flag. In addition to the usual Java files, this command also produces an Operations interface and a Tie class. Then write your class, implementing the generated Operations interface.

Ties Example

Consider the following simple IDL interface:
// IDL
interface Frog{
  void croak();
};

Compiling Frog.idl with idlj generates the standard client and server files (servant classes, etc.) and the special files for delegation-based skeletons: _FrogTie and _FrogOperations. The standard implementation of this IDL looks like this:

// FrogImpl.java--without using ties, inherits required
// CORBA functionality from _FrogImplBase

public class FrogImpl extends _FrogImplBase {
  public void croak() {
    getAudioClip(getCodeBase(), "frog.au").play();
  }

  public static void main(String[] args) {
    ORB orb = ORB.init();
    Frog frogRef = new FrogImpl();
    orb.connect(frogRef);
    // remainder of code deleted
  }
}

Note that, because FrogImpl.java inherits its CORBA functionality (such as the dispatch upcall from the ORB) from _FrogImplBase, it must contain the implementation code for the rest of its methods; it cannot inherit them even if they are identical to those in another class.

The same class, using a delegation-based skeleton, would look like this:

// Amphibian.java--provides general behavior

public class Amphibian extends Applet {
  public void breathWater(){
    // implementation deleted
  }
}

// FrogImpl.java--using ties

public class FrogImpl extends Amphibian implements _FrogOperations {
  public void croak() {
    // croak method must still be here; it is in the Operations interface
    getAudioClip(getCodeBase(), "frog.au").play();
  }

  public static void main(String[] args) {
    ORB orb = ORB.init();
    FrogImpl servant = new FrogImpl();
    Frog frogRef = new _FrogTie(servant);
    orb.connect(frogRef);
    // remainder of code deleted
  }
}

Using ties, FrogImpl reserves its superclass slot for inheritance of amphibian behavior while implementing the CORBA operations defined in the IDL interface (and in _FrogOperations).

Note the difference in the orb.connect() call. With a delegation-based skeleton, you pass a new tie class instance to the ORB, rather than passing the actual object implementation.

Clients | Servers | Exceptions | Initialization | Naming

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Distributed Application Concepts

Topics discussed in this section include:

  • Multi-Tiered Applications
  • User-Interface Tier
  • Service (Server) Tier
  • Data Store (Database) Tier

Multi-Tiered Applications

Traditional enterprise applications are, for the most part, self-contained monolithic programs which have limited access to one another's procedures and data. They are usually cumbersome to build and expensive to maintain because even simple changes require the entire program to be recompiled and retested.

By contrast, applications built using distributed objects such as CORBA naturally lend themselves to a multitiered architecture, fostering a neat separation of concerns. A three-tiered application has a user interface code layer, a computation code (or business logic) layer, and a database access layer. All interaction between the layers occurs via the interfaces that all CORBA objects must publish. The diagram below illustrates the transition from monolithic applications to multi-tiered, modular applications.

User-Interface Tier

The user-interface tier is the layer of user interaction. Its focus is on efficient user interface design and accessibility throughout your organization. The user interface tier can reside on the user's desktop, on your organization's intranet, or on the World Wide Web (Internet). Several user interface implementations may be deployed which access the same server. The UI tier usually invokes methods on the business logic tier and thus acts as a client of the business logic servers.

Service (Server) Tier

The service, or business logic layer, is server-based code with which the client code interacts. The business logic layer is made up of business objects - CORBA objects that perform logical business functions such as inventory control, budget, sales orders, and billing. These objects invoke methods on Data Store tier objects.

Data Store (Database) Tier

The data store layer is made up of objects that encapsulate database routines and interact directly with the DBMS product(s). For example, a hypothetical get_Sales_Sum method might be implemented to obtain data from a relational database via the appropriate SQL SELECT statements.

Distributed Application Concepts | Using CORBA | Glossary
Home
Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Example 2

Example 2: Hello World with Persistent State

Java IDL only supports transient objects - if an object's server process halts and restarts, the object reference becomes invalid. However, Example 2 illustrates how a transient object can store its state and re-initialize itself from this state each time the server is restarted.

The Example 2 server hosts a Hello object that stores a string in a file. You provide the string as a command line argument to the client program. The server Hello object "remembers" the string and returns it to the client the next time that the client is run, even if the server has been stopped and restarted.

Example 2 is identical to Example 1 except for the persistence enhancements. This page only discusses the code neccessary to these enhancements.

This page contains:

  • The IDL for the persistent "Hello World" program
  • A transient server that creates an object, registers it in a naming context, and saves its state in a file.
  • An application client.

Instructions for compiling and running the example are provided.

Interface Definition (Hello.idl)

module HelloApp
{

    interface Hello
    {
        exception cantWriteFile{};
        exception cantReadFile{};

        string sayHello(in string message)
                raises (cantWriteFile);

        string lastMessage()
                raises (cantReadFile);
    };
};
  • Because the Hello object reads from and writes to a file, you will need to throw Java language exceptions. (See Implementing the Server below). The Hello interface must define and raise exceptions in order to generate the appropriate skeleton definitions.

  • The sayHello method has been modified to take a string argument, which will be stored in a file at runtime. A lastMessage method has been added to return this stored string to the client.

  • The IDL compiler generates a directory HelloApp/HelloPackage that contains the following exception class files:
      cantReadFile.java
      cantReadFileHelper.java
      cantReadFileHolder.java
      cantWriteFile.java
      cantWriteFileHelper.java
      cantWriteFileHolder.java

    Use of these classes is illustrated in the implementation below.

    Implementing the Server (HelloServer.java)

    // Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

class HelloServant extends _HelloImplBase
{
    public String sayHello(String msg)
        throws HelloApp.HelloPackage.cantWriteFile
    {
        try {
                synchronized(this) {
                   File helloFile = new File("helloStorage.txt");
                   FileOutputStream fos = new FileOutputStream(helloFile);
                   byte[] buf = new byte[msg.length()];
                   msg.getBytes(0, msg.length(), buf, 0);
                   fos.write(buf);
                   fos.close();
                }
        } catch(Exception e) {
                throw new HelloApp.HelloPackage.cantWriteFile();
        }
        return "\nHello world !!\n";
    }

    public String lastMessage()
        throws HelloApp.HelloPackage.cantReadFile
    {
        try {
                synchronized(this) {
                   File helloFile = new File("helloStorage.txt");
                   FileInputStream fis = new FileInputStream(helloFile);
                   byte[] buf = new byte[1000];
                   int n = fis.read(buf);
                   String lastmsg = new String(buf);
                   fis.close();
                   return lastmsg;
                }
        } catch(Exception e) {
                throw new HelloApp.HelloPackage.cantReadFile();
        }
    }
}

public class HelloServer {

    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // create servant and register it with the ORB
        HelloServant helloRef = new HelloServant();
        orb.connect(helloRef);

        // get the root naming context
        org.omg.CORBA.Object objRef =
        orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);

        // bind the Object Reference in Naming
        NameComponent nc = new NameComponent("Hello", "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, helloRef);

        // wait for invocations from clients
            java.lang.Object sync = new java.lang.Object();
            synchronized (sync) {
                sync.wait();
            }

    } catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
    }
    }
}

  • The sayHello and lastMessage method implementations throw the exceptions defined in the IDL file. These methods must throw file IO exceptions or the Java language compiler issues warnings and errors.

  • The HelloServant object receives ansychronous and possibly simultaneous method requests at runtime. Therefore, you should enclose all file IO code in a synchronized clause.

  • No changes are required to HelloServer.main.

    Implementing the Client (HelloClient.java)

    // Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CORBA.*;

public class HelloClient
{
    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

            // get the root naming context
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            NameComponent nc = new NameComponent("Hello", "");
            NameComponent path[] = {nc};
            Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

        // call the Hello server object and print results

        String oldhello = helloRef.lastMessage();
            System.out.println(oldhello);
            String hello = helloRef.sayHello(args[0]);
            System.out.println(hello);

    } catch (Exception e) {
        System.out.println("ERROR : " + e) ;
        e.printStackTrace(System.out);
    }
    }
}

  • This client retrieves the stored message via lastMessage and stores the new message via an argument to sayHello.

    Building and Running Hello World

    The following instructions assume you can use port 1050 for the Java IDL name server. Substitute a different port if necessary. Note that for ports below 1024, you need root access on UNIX machines, and administrator privileges on Windows95 and NT. Note also that the instructions use a slash (/) for path names. Windows95 and NT users should subtitute a backslash (\).

    • Create source files as shown above.

    • Run idlj on the IDL file to create stubs and skeletons:
          idltojava -fall Hello.idl
    • Compile the .java files, including the stubs and skeletons:
          javac *.java HelloApp/*.java
    • Make sure the name server is running:
          tnameserv -ORBInitialPort 1050&
    • Start the Hello server:
          java HelloServer -ORBInitialPort 1050
    • Run the Hello application client from a different shell than the server:
          java HelloClient "remember this message" -ORBInitialPort 1050

    Home

    Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.


Example 3

Example 3: Hello World with Callback Object

Client programs often react to changes or updates that occur in a server. For example, a client graph or spreadsheet program might need to be updated with each stock price update on a stock market server. The client has two options in this scenario: (1) periodically ask for the stock price via a method request on the stock server or (2) ask to be notified by the server whenever a price change occurs. The second option is referred to as a "callback".

Example 3 illustrates how a client program can pass a callback object to a server. The server then issues a method request on the callback object and thereby notifies the client.

Example 3 is identical to Example 1 except for the callback enhancements. This page only discusses the code necessary to these enhancements.

This page contains:

  • The IDL for a "Hello world" program with a callback.
  • A server implementation that callsback to a client.
  • A client that sends a callback object reference to a server.

Instructions for compiling and running the example are provided.

Interface Definition (Hello.idl)

module HelloApp
{
    interface HelloCallback
    {
        void callback(in string message);
    };

    interface Hello
    {
        string sayHello(in HelloCallback objRef, in string message);
    };
};
  • A HelloCallback is defined, which the client will implement.

  • The sayHello method is modified to take an object reference argument and string argument. The object reference argument provides a means for the client to pass a callback object to the server, which the server can invoke. The string argument is the string that the server will send back to the client.

    Implementing the Server (HelloServer.java)

    // Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

class HelloServant extends _HelloImplBase
{
    public String sayHello(HelloCallback callobj, String msg)
    {
    callobj.callback(msg);
    return "\nHello world !!\n";
    }
}

public class HelloServer {

    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // create servant and register it with the ORB
        HelloServant helloRef = new HelloServant();
        orb.connect(helloRef);

        // get the root naming context
        org.omg.CORBA.Object objRef =
        orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);

        // bind the Object Reference in Naming
        NameComponent nc = new NameComponent("Hello", "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, helloRef);

        // wait for invocations from clients
            java.lang.Object sync = new java.lang.Object();
            synchronized (sync) {
                sync.wait();
            }

    } catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
    }
    }
}

  • The sayHello method implementation has been modified to invoke the callback object that it receives.

    Implementing the Client (HelloClient.java)

    // Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CORBA.*;

class HelloCallbackServant extends _HelloCallbackImplBase
{
    public void callback(String notification)
    {
        System.out.println(notification);
    }
}

public class HelloClient
{
    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

            // get the root naming context
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            NameComponent nc = new NameComponent("Hello", "");
            NameComponent path[] = {nc};
            Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

        HelloCallbackServant helloCallbackRef = new HelloCallbackServant();
            orb.connect(helloCallbackRef);

        // call the Hello server object and print results
        String hello = helloRef.sayHello(helloCallbackRef,"\ntest..\n");
        System.out.println(hello);

    } catch (Exception e) {
        System.out.println("ERROR : " + e) ;
        e.printStackTrace(System.out);
    }
    }
}

  • The client implements the HelloCallbackServant object.

  • The HelloClient.main instantiates the callback object and passes it to the server. The client must also register the callback object with the ORB.

    Building and Running Hello World

     The following instructions assume you can use port 1050 for the Java IDL name server. Substitute a different port if necessary. Note that for ports below 1024, you need root access on UNIX machines, and administrator privileges on Windows95 and NT. Note also that the instructions use a slash (/) for path names. Windows95 and NT users should subtitute a backslash (\).

    • Create the source code files as shown above.

    • Run idlj on the IDL file to create stubs and skeletons:
          idlj -fall Hello.idl
    • Compile the .java files, including the stubs and skeletons:
          javac *.java HelloApp/*.java
    • Make sure the name server is running:
          tnameserv -ORBInitialPort 1050&
    • Start the Hello server:
          java HelloServer -ORBInitialPort 1050
    • Run the Hello application client from a different shell than the server:
          java HelloClient -ORBInitialPort 1050

    Home

    Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.


Example 4

Example 4: Hello World with Implementation Inheritance

Ordinarily, servant classes must inherit from the ImplBase class generated by the idlj compiler. This is inadequate for servant classes that need to inherit functionality from another Java class. The Java programming language allows a class only one superclass and the generated ImplBase class occupies this position.

Example 4 illustrates how a servant class can inherit (an implementation) from any Java class. In this example, the HelloServant class inherits its entire implementation from another Java class HelloBasic. At runtime, method requests for HelloServant are delegated to another idlj-generated class.

Example 4 is identical to Example 1 except for implementation inheritance enhancements. This page only discusses the code necessary for these enhancements.

This section contains:

  • The IDL for a simple "Hello World" program
  • A server implementation that delegates method requests for HelloServant to another Java class.
  • A client program.

Instructions for compiling and running the example are provided.

Interface Definition (Hello.idl)

module HelloApp
{
    interface Hello
    {
        string sayHello();
    };
};

Compile the IDL interface with the command:

        idlj -fall -ftie  Hello.idl
This generates two additional files in a HelloApp subdirectory:
_HelloOperations.java
The servant class will implement this interface.
_HelloTie.java
This class acts as the skeleton, receiving invocations from the ORB and delegating them to the servant that actually does the work.

Implementing the Server (HelloServer.java)

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

class HelloBasic
{
    public String sayHello()
    {
        return "\nHello world !!\n";
    }
}

class HelloServant extends HelloBasic implements _HelloOperations
{
}

public class HelloServer {

    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // create servant and register it with the ORB
        HelloServant servant = new HelloServant();
        Hello helloRef = new _HelloTie(servant);
        orb.connect(helloRef);

        // get the root naming context
        org.omg.CORBA.Object objRef =
        orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);

        // bind the Object Reference in Naming
        NameComponent nc = new NameComponent("Hello", "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, helloRef);

        // wait for invocations from clients
            java.lang.Object sync = new java.lang.Object();
            synchronized (sync) {
                sync.wait();
            }

    } catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
    }
    }
}

Implementing the Client (HelloClient.java)

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CORBA.*;

public class HelloClient
{
    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

            // get the root naming context
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            NameComponent nc = new NameComponent("Hello", "");
            NameComponent path[] = {nc};
            Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

        // call the Hello server object and print results
        String hello = helloRef.sayHello();
        System.out.println(hello);

    } catch (Exception e) {
        System.out.println("ERROR : " + e) ;
        e.printStackTrace(System.out);
    }
    }
}

Building and Running Hello World

 The following instructions assume you can use port 1050 for the Java IDL name server. Substitute a different port if necessary. Note that for ports below 1024, you need root access on UNIX machines, and administrator privileges on Windows95 and NT. Note also that the instructions use a slash (/) for path names. Windows95 and NT users should subtitute a backslash (\).

  • Create source code files as shown above.

  • Run idlj on the IDL file to create stubs and skeletons:
        idlj  -fall -ftie Hello.idl
  • Compile the .java files, including the stubs and skeletons:
        javac *.java HelloApp/*.java
  • Make sure the name server is running:
        tnameserv -ORBInitialPort 1050&
  • Start the Hello server:
        java HelloServer -ORBInitialPort 1050
  • Run the Hello application client from a different shell than the server:
        java HelloClient -ORBInitialPort 1050

Home

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.


Exceptions

CORBA has two types of exceptions: standard system exceptions which are fully specified by the OMG and user exceptions which are defined by the individual application programmer. CORBA exceptions are a little different from Java exception objects, but those differences are largely handled in the mapping from IDL to Java.

Topics in this section include:

  • Differences Between CORBA and Java Exceptions
  • System Exceptions
    • System Exception Structure
    • Minor Codes
    • Completion Status
  • User Exceptions
  • Minor Code Meanings

Differences Between CORBA and Java Exceptions

To specify an exception in IDL, the interface designer uses the raises keyword. This is similar to the throws specification in Java. When you use the exception keyword in IDL you create a user-defined exception. The standard system exceptions need not (and cannot) be specified this way.

System Exceptions

CORBA defines a set of standard system exceptions, which are generally raised by the ORB libraries to signal systemic error conditions like:

  • Server-side system exceptions, such as resource exhaustion or activation failure.
  • Communication system exceptions, for example, losing contact with the object, host down, or cannot talk to ORB daemon (orbd).
  • Client-side system exceptions, such as invalid operand type or anything that occurs before a request is sent or after the result comes back.

All IDL operations can throw system exceptions when invoked. The interface designer need not specify anything to enable operations in the interface to throw system exceptions -- the capability is automatic.

This makes sense because no matter how trivial an operation's implementation is, the potential of an operation invocation coming from a client that is in another process, and perhaps (likely) on another machine, means that a whole range of errors is possible.

Therefore, a CORBA client should always catch CORBA system exceptions. Moreover, developers cannot rely on the Java compiler to notify them of a system exception they should catch, because CORBA system exceptions are descendants of java.lang.RuntimeException.

System Exception Structure

All CORBA system exceptions have the same structure:

exception <SystemExceptionName> { // descriptive of error
    unsigned long minor;          // more detail about error
    CompletionStatus completed;   // yes, no, maybe
}

System exceptions are subtypes of java.lang.RuntimeException through org.omg.CORBA.SystemException:

java.lang.Exception
 |
 +--java.lang.RuntimeException
     |
     +--org.omg.CORBA.SystemException
         |
         +--BAD_PARAM
         |
         +--//etc.

Minor Codes

All CORBA system exceptions have a minor code field, a number that provides additional information about the nature of the failure that caused the exception. Minor code meanings are not specified by the OMG; each ORB vendor specifies appropriate minor codes for that implementation. For the meaning of minor codes thrown by the Java ORB, see Minor code meanings .

Completion Status

All CORBA system exceptions have a completion status field, indicating the status of the operation that threw the exception. The completion codes are:

COMPLETED_YES
The object implementation has completed processing prior to the exception being raised.
COMPLETED_NO
The object implementation was not invoked prior to the exception being raised.
COMPLETED_MAYBE
The status of the invocation is unknown.

User Exceptions

CORBA user exceptions are subtypes of java.lang.Exception through org.omg.CORBA.UserException:

java.lang.Exception
 |
 +--org.omg.CORBA.UserException
      |
      +-- Stocks.BadSymbol
      |
      +--//etc.

Each user-defined exception specified in IDL results in a generated Java exception class. These exceptions are entirely defined and implemented by the programmer

Minor Code Meanings

System exceptions all have a field minor that allows CORBA vendors to provide additional information about the cause of the exception. The table below lists the minor codes of Java IDL's system exceptions, along with their significance.

ORB Minor Codes and Their Meanings
Code | Meaning
BAD_PARAM Exception Minor Codes
1 | A null parameter was passed to a Java IDL method.
COMM_FAILURE Exception Minor Codes
1 | Unable to connect to the host and port specified in the object reference, or in the object reference obtained after location/object forward.
2 | Error occurred while trying to write to the socket. The socket has been closed by the other side, or is aborted.
3 | Error occurred while trying to write to the socket. The connection is no longer alive.
6 | Unable to successfully connect to the server after several attempts.
DATA_CONVERSION Exception Minor Codes
1 | Encountered a bad hexadecimal character while doing ORB string_to_object operation.
2 | The length of the given IOR for string_to_object() is odd. It must be even.
3 | The string given to string_to_object() does not start with IOR: and hence is a bad stringified IOR.
4 | Unable to perform ORB resolve_initial_references operation due to the host or the port being incorrect or unspecified, or the remote host does not support the Java IDL bootstrap protocol.
INTERNAL Exception Minor Codes
3 | Bad status returned in the IIOP Reply message by the server.
6 | When unmarshaling, the repository id of the user exception was found to be of incorrect length.
7 | Unable to determine local hostname using the Java APIs InetAddress.getLocalHost().getHostName().
8 | Unable to create the listener thread on the specific port. Either the port is already in use, there was an error creating the daemon thread, or security restrictions prevent listening.
9 | Bad locate reply status found in the IIOP locate reply.
10 | Error encountered while stringifying an object reference.
11 | IIOP message with bad GIOP v1.0 message type found.
14 | Error encountered while unmarshaling the user exception.
18 | Internal initialization error.
INV_OBJREF Exception Minor Codes
1 | An IOR with no profile was encountered.
MARSHAL Exception Minor Codes
4 | Error occured while unmarshaling an object reference.
5 | Marshalling/unmarshaling unsupported IDL types like wide characters and wide strings.
6 | Character encountered while marshaling or unmarshaling a character or string that is not ISO Latin-1 (8859.1) compliant. It is not in the range of 0 to 255.
NO_IMPLEMENT Exception Minor Codes
1 | Dynamic Skeleton Interface is not implemented.
OBJ_ADAPTER Exception Minor Codes
1 | No object adapter was found matching the one in the object key when dispatching the request on the server side to the object adapter layer.
2 | No object adapter was found matching the one in the object key when dispatching the locate request on the server side to the object adapter layer.
4 | Error occured when trying to connect a servant to the ORB.
OBJ_NOT_EXIST Exception Minor Codes
1 | Locate request got a response indicating that the object is not known to the locator.
2 | Server id of the server that received the request does not match the server id baked into the object key of the object reference that was invoked upon.
4 | No skeleton was found on the server side that matches the contents of the object key inside the object reference.
UNKNOWN Exception Minor Codes
1 | Unknown user exception encountered while unmarshaling: the server returned a user exception that does not match any expected by the client.
3 | Unknown runtime exception thrown by the server implementation.

Name Server Minor Codes and Their Meanings
Code | Meaning
INITIALIZE Exception Minor Codes
150 | Transient name service caught a SystemException while initializing.
151 | Transient name service caught a Java exception while initializing.
INTERNAL Exception Minor Codes
100 | An AlreadyBound exception was thrown in a rebind operation.
101 | An AlreadyBound exception was thrown in a rebind_context operation.
102 | Binding type passed to the internal binding implementation was not BindingType.nobject or BindingType.ncontext.
103 | Object reference was bound as a context, but it could not be narrowed to CosNaming.NamingContext.
200 | Implementation of the bind operation encountered a previous binding.
201 | Implementation of the list operation caught a Java exception while creating the list iterator.
202 | Implementation of the new_context operation caught a Java exception while creating the new NamingContext servant.
203 | Implementaton of the destroy operation caught a Java exception while disconnecting from the ORB.

Home

Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Generated code

 << /TABLE="/TABLE">

Sample Code for Example.idl

The JavaTM 2 SDK, Standard Edition, v1.3 includes a new version of the IDL-to-Java compiler, idlj. This compiler supports new CORBA-standard features required for RMI-IIOP. This document shows the code generated by the IDL-to-Java compiler in accordance with the CORBA 2.3 specification.

The followng file, Example.idl, is written in the OMG Interface Definition Language. OMG IDL is a purely declarative language designed for specifying programming-language-independent operational interfaces for distributed applications. OMG specifies a mapping from IDL to several different programming languages, including C, C++, Smalltalk, COBOL, Ada, and Java. When mapped, each statement in OMG IDL is translated to a corresponding statement in the programming language of choice.

    Example.idl
       module Example {
     interface Counter {
       boolean increment (in long arg);
     };
   };

Generated Files

The idlj compiler uses the IDL-to-Java mapping to convert IDL interface definitions to corresponding Java interfaces, classes, and methods, which you can then use to implement your client and server code. The following files are generated when Example.idl is compiled with the IDL-to-Java compiler, using the following command:

       idlj -fall Example.idl

Counter.java, the signature interface

The signature interface file, Counter.java extends org.omg.portable.IDLEntity, org.omg.CORBA.Object, and the operations interface, CounterOperations. The signature interface is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. From the client's point of view, an object reference for a CORBA Counter object implements this interface.

Note: The Stub implements the Counter interface, where it generates code for each method to marshall the arguments, invoke the method, and then unmarshall the arguments.

    Example/Counter.java

       package Example;

   /**
   * Example/Counter.java
  * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Monday, November 6, 2000 6:01:53 PM PST
   */

   public interface Counter extends CounterOperations,
     org.omg.CORBA.Object,
       org.omg.CORBA.portable.IDLEntity
   {
   } // interface Counter

CounterOperations.java, the operations interface

The Java operations interface, CounterOperations.java, is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and server. The server developer provides implementation for the methods indicated by the operations interface.

    Example/CounterOperations.java

       package Example;

   /**
   * Example/CounterOperations.java
   * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Thursday, November 9, 2000 7:04:12 PM PST
   */

   public interface CounterOperations
   {
     boolean increment (int arg);
   } // interface CounterOperations

CounterHelper.java, the Helper class

The Java class CounterHelper defines auxiliary methods, notably narrow(), which is the CORBA counterpart of Java casting.

    Example/CounterHelper.java

       package Example;

   /**
   * Example/CounterHelper.java
   * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Thursday, November 9, 2000 7:04:12 PM PST
   */

   abstract public class CounterHelper
   {
     private static String  _id = "IDL:Example/Counter:1.0";

     public static void insert (org.omg.CORBA.Any a,
       Example.Counter that)
     {
       org.omg.CORBA.portable.OutputStream out =
         a.create_output_stream ();
       a.type (type ());
       write (out, that);
       a.read_value (out.create_input_stream (), type ());
     }

     public static Example.Counter extract (org.omg.CORBA.Any a)
     {
       return read (a.create_input_stream ());
     }

     private static org.omg.CORBA.TypeCode __typeCode = null;
     synchronized public static org.omg.CORBA.TypeCode type ()
     {
       if (__typeCode == null)
       {
         __typeCode = org.omg.CORBA.ORB.init
            ().create_interface_tc (Example.CounterHelper.id (),
            "Counter");
       }
       return __typeCode;
     }

     public static String id ()
     {
       return _id;
     }

     public static Example.Counter read
       (org.omg.CORBA.portable.InputStream istream)
     {
       return narrow (istream.read_Object (_CounterStub.class));
     }

     public static void write (org.omg.CORBA.portable.OutputStream
       ostream, Example.Counter value)
     {
       ostream.write_Object ((org.omg.CORBA.Object) value);
     }

     public static Example.Counter narrow (org.omg.CORBA.Object
       obj)
     {
       if (obj == null)
         return null;
       else if (obj instanceof Example.Counter)
         return (Example.Counter)obj;
       else if (!obj._is_a (id ()))
         throw new org.omg.CORBA.BAD_PARAM ();
       else
       {
         org.omg.CORBA.portable.Delegate delegate =
           ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate
             ();
         return new Example._CounterStub (delegate);
       }
     }

   }

CounterHolder.java, the Holder class

The Java class called CounterHolder holds a public Counter member. Holders are required for CORBA operations that take out or inout arguments, which, unlike CORBA in arguments, don't map directly to Java's pass-by-value semantics.

    Example/CounterHolder.java

       package Example;

   /**
   * Example/CounterHolder.java
   * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Thursday, November 9, 2000 7:04:11 PM PST
   */

   public final class CounterHolder implements
     org.omg.CORBA.portable.Streamable
   {
     public Example.Counter value = null;

     public CounterHolder ()
     {
     }

     public CounterHolder (Example.Counter initialValue)
     {
       value = initialValue;
     }

     public void _read (org.omg.CORBA.portable.InputStream i)
     {
       value = Example.CounterHelper.read (i);
     }

     public void _write (org.omg.CORBA.portable.OutputStream o)
     {
       Example.CounterHelper.write (o, value);
     }

     public org.omg.CORBA.TypeCode _type ()
     {
       return Example.CounterHelper.type ();
     }

   }

_CounterStub.java, the client stub

The Java class _CounterStub is the stub file for the client-side mapping.

    Example/_CounterStub.java

       package Example;

   /**
   * Example/_CounterStub.java
   * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Thursday, November 9, 2000 7:04:12 PM PST
   */

   public class _CounterStub extends
     org.omg.CORBA.portable.ObjectImpl implements Example.Counter
   {
     // Constructors
     // NOTE:  If the default constructor is used, the
     //        object is useless until _set_delegate (...)
     //        is called.
     public _CounterStub ()
     {
       super ();
     }

     public _CounterStub (org.omg.CORBA.portable.Delegate
       delegate)
     {
       super ();
       _set_delegate (delegate);
     }

     public boolean increment (int arg)
     {
       org.omg.CORBA.portable.InputStream _in = null;
       try {
          org.omg.CORBA.portable.OutputStream _out = _request
            ("increment", true);
          _out.write_long (arg);
          _in = _invoke (_out);
          boolean __result = _in.read_boolean ();
          return __result;
       } catch (org.omg.CORBA.portable.ApplicationException _ex)
          {
          _in = _ex.getInputStream ();
          String _id = _ex.getId ();
          throw new org.omg.CORBA.MARSHAL (_id);
          } catch (org.omg.CORBA.portable.RemarshalException _rm)
          {
          return increment (arg);
       } finally {
           _releaseReply (_in);
       }
     } // increment

     // Type-specific CORBA::Object operations
     private static String[] __ids = {
       "IDL:Example/Counter:1.0"};

     public String[] _ids ()
     {
       return (String[])__ids.clone ();
     }

     private void readObject (java.io.ObjectInputStream s)
     {
        try
        {
          String str = s.readUTF ();
          org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init
            ().string_to_object (str);
          org.omg.CORBA.portable.Delegate delegate =
            ((org.omg.CORBA.portable.ObjectImpl)
              obj)._get_delegate ();
          _set_delegate (delegate);
        } catch (java.io.IOException e) {}
     }

     private void writeObject (java.io.ObjectOutputStream s)
     {
        try
        {
          String str = org.omg.CORBA.ORB.init ().object_to_string
            (this);
          s.writeUTF (str);
        } catch (java.io.IOException e) {}
     }
   } // class _CounterStub

_CounterImplBase.java, the server skeleton

The Java class _CounterImplBase is the skeleton file for the server-side mapping.

    Example/_CounterImplBase.java

       package Example;

   /**
   * Example/_CounterImplBase.java
   * Generated by the IDL-to-Java compiler (portable), version "3.0"
   * from Example.idl
   * Thursday, November 9, 2000 7:04:11 PM PST
   */

   public abstract class _CounterImplBase extends
     org.omg.CORBA.portable.ObjectImpl
       implements Example.Counter,
         org.omg.CORBA.portable.InvokeHandler
   {

     // Constructors
     public _CounterImplBase ()
     {
     }

     private static java.util.Hashtable _methods = new
       java.util.Hashtable ();
     static
     {
       _methods.put ("increment", new java.lang.Integer (0));
     }

     public org.omg.CORBA.portable.OutputStream _invoke (String
       method, org.omg.CORBA.portable.InputStream in,
         org.omg.CORBA.portable.ResponseHandler rh)
     {
       org.omg.CORBA.portable.OutputStream out = null;
       java.lang.Integer __method =
         (java.lang.Integer)_methods.get (method);
       if (__method == null)
         throw new org.omg.CORBA.BAD_OPERATION (0,
           org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

       switch (__method.intValue ())
       {
          case 0:  // Example/Counter/increment
          {
            int arg = in.read_long ();
            boolean __result = false;
            __result = this.increment (arg);
            out = rh.createReply();
            out.write_boolean (__result);
            break;
          }

       default:
            throw new org.omg.CORBA.BAD_OPERATION (0,
              org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
       }

       return out;
     } // _invoke

     // Type-specific CORBA::Object operations
     private static String[] __ids = {
       "IDL:Example/Counter:1.0"};

     public String[] _ids ()
     {
       return __ids;
     }

   } // class _CounterImplBase

Completing the application

To complete the application, the developer must write the client and server code.

Java
Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Send questions or comments to: JavaIDL@eng.sun.com.

Sun

Java Software


Getting Started with Java IDL

Getting Started with JavaTM IDL

Java TM IDL is a technology for distributed objects--that is, objects interacting on different platforms across a network. Java IDL is similar to RMI (Remote Method Invocation), which supports distributed objects written entirely in the Java programming language. However, Java IDL enables objects to interact regardless of whether they're written in the Java programming language or another language such as C, C++, COBOL, or others.

This is possible because Java IDL is based on the Common Object Request Brokerage Architecture (CORBA), an industry-standard distributed object model. A key feature of CORBA is IDL, a language-neutral Interface Definition Language. Each language that supports CORBA has its own IDL mapping--and as its name implies, Java IDL supports the mapping for Java.

To support interaction between objects in separate programs, Java IDL provides an Object Request Broker, or ORB. The ORB is a class library that enables low-level communication between Java IDL applications and other CORBA-compliant applications.

This tutorial teaches the basic tasks in building a CORBA distributed application using Java IDL. You will build the classic "Hello World" program as a distributed application, with both applet and application clients. The Hello World program has a single operation that returns a string to be printed.

Any relationship between distributed objects has two sides: the client and the server. The server provides a remote interface, and the client calls a remote interface. These relationships are common to most distributed object standards, including RMI and CORBA. Note that in this context, the terms client and server define object-level rather than application-level interaction--any application could be a server for some objects and a client of others. In fact, a single object could be the client of an interface provided by a remote object and at the same time implement an interface to be called remotely by other objects.

This figure shows how a one-method distributed object is shared between a CORBA client and server to implement the classic "Hello World" application.

A one-method distributed object shared between a CORBA client and server.

On the client side, the application includes a reference for the remote object. The object reference has a stub method, which is a stand-in for the method being called remotely. The stub is actually wired into the ORB, so that calling it invokes the ORB's connection capabilities, which forwards the invocation to the server.

On the server side, the ORB uses skeleton code to translate the remote invocation into a method call on the local object. The skeleton translates the call and any parameters to their implementation-specific format and calls the method being invoked. When the method returns, the skeleton code transforms results or errors, and sends them back to the client via the ORBs.

Between the ORBs, communication proceeds by means of a shared protocol, IIOP--the Internet Inter-ORB Protocol. IIOP, which is based on the standard TCP/IP internet protocol, defines how CORBA-compliant ORBs pass information back and forth. Like CORBA and IDL, the IIOP standard is defined by OMG, the Object Management Group.

The Java IDL Development Process and the Hello World Tutorial

This tutorial teaches the basic tasks in building a CORBA distributed application using Java IDL. You will build the classic Hello World program as a distributed application, with both applet and application clients. The Hello World program has a single operation that returns a string to be printed.

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation. The following steps provide a general guide to designing and developing a distributed object application with Java IDL. Links to the relevant steps of the tutorial will guide you through creating this sample application.

  1. Define the remote interface

    You define the interface for the remote object using the OMG's interface definition langauge. You use IDL instead of the Java language because the idlj compiler automatically maps from IDL, generating all Java language stub and skeleton source files, along with the infrastructure code for connecting to the ORB. Also, by using IDL, you make it possible for developers to implement clients and servers in any other CORBA-compliant language.

    Note that if you're implementing a client for an existing CORBA service, or a server for an existing client, you would get the IDL interfaces from the implementer--such as a service provider or vendor. You would then run the idlj compiler over those interfaces and follow these steps.

    Writing the IDL file in this tutorial walks you through these steps for the simple "Hello World" example.

  2. Compile the remote interface

    When you run the idlj compiler over your interface definition file, it generates the Java version of the interface, as well as the class code files for the stubs and skeletons that enable your applications to hook into the ORB.

    Mapping Hello.idl to Java in this tutorial walks you through these steps for the simple "Hello World" example.

  3. Implement the server

    Once you run the idlj compiler, you can use the skeletons it generates to put together your server application. In addition to implementing the methods of the remote interface, your server code includes a mechanism to start the ORB and wait for invocation from a remote client.

    Developing the Hello World Server walks you through writing a simple server for the "Hello World" application.

  4. Implement the client

    Similarly, you use the stubs generated by the idlj compiler as the basis of your client application. The client code builds on the stubs to start its ORB, look up the server using the name service provided with Java IDL, obtain a reference for the remote object, and call its method.

    Developing a Client Application walks you through writing a simple client application and Developing a Client Applet walks you through writing a client applet that performs the same functions as the client application.

  5. Start the applications

    Once you implement a server and a client, you can start the name service, then start the server, then run the client.

    Compiling and Running the Hello World Application walks you through compiling and running the server and client program that together make up the "Hello World" application.

Using Stringified Object References walks you through making an object reference when there is no naming service.

Running the Hello World Application on 2 Machines describes one way of distributing the simple application across two machines - a client and a server.

For More Information

Although concepts are explained as they are introduced in the tutorial, you will find more information in the Concepts section. New terms are linked to their definitions throughout the tutorial.

The Object Management Group no longer maintains this site, but the CORBA for Beginnners page contains links to web pages that provide introductory CORBA information.

Next: Writing the IDL file
Home
Copyright © 1996-1998 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Glossary

Glossary of Java IDL Terms

attribute (IDL)
That part of an IDL interface that is similar to a public class field or C++ data member. The idlj compiler maps an OMG IDL attribute to accessor and modifier methods in the Java programming language. For example, an interface ball might include the attribute color. The idlj compiler would generate a Java programming language method to get the color, and unless the attribute is readonly, a method to set the color. CORBA attributes correspond closely to JavaBeans properties.

client
Any code which invokes an operation on a distributed object. A client might itself be a CORBA object, or it might be a non-object-oriented program, but while invoking a method on a CORBA object, it is said to be acting as client.

client stub
A Java programming language class generated by idlj and used transparently by the client ORB during object invocation. The remote object reference held by the client points to the client stub. This stub is specific to the IDL interface from which it was generated, and it contains the information needed for the client to invoke a method on the CORBA object that was defined in the IDL interface.

client tier
The portion of a distributed application that requests services from the server tier. Typically, the client tier is characterized by a small local footprint, a graphical user interface, and simplified development and maintenance efforts.

Common Object Request Broker Architecture (CORBA)
An OMG-specified architecture that is the basis for the CORBA object model. The CORBA specification includes an interface definition language (IDL), which is a language-independent way of creating contracts between objects for implementation as distributed applications.

The Java 2 Platform, Standard Edition, v1.3, provides a CORBA 2.3.1-compliant Object Request Broker (ORB) and two CORBA programming models that utilize the Java CORBA ORB and Internet InterORB Protocol (IIOP). The two programming models are the RMI programming model, or RMI-IIOP, and the IDL programming model, or Java IDL. For more information on these programming models, read CORBA Technology and the Java Platform.
See also: client tier, service tier, data store tier

CORBA object
An entity which (1) is defined by an OMG IDL interface, and (2) for which an object reference is available. Object is also the implicit common base type for object references of IDL interfaces.

data store tier
The portion of a distributed application that manages access to persistent data and its storage mechanisms, such as relational databases.

distributed application
A program designed to run on more than one computer, typically with functionality separated into tiers such as client, service, and data store.

distributed environment
A network of one or more computers that use CORBA objects. Objects are installed on the various machines and can communicate with each other.

Dynamic Invocation Interface (DII)
An API that allows a client to make dynamic invocations on remote CORBA objects. It is used when at compile time a client does not have knowledge about an object it wants to invoke. Once an object is discovered, the client program can obtain a definition of it, issue a parameterized call to it, and receive a reply from it, all without having a type-specific client stub for the remote object.

Dynamic Skeleton Interface (DSI)
An API that provides a way to deliver requests from an ORB to an object implementation when the type of the object implementation is not known at compile time. DSI, which is the server side analog to the client side DII, makes it possible for the application programmer to inspect the parameters of an incoming request to determine a target object and method.

exception (IDL)
An IDL construct that represents an exceptional condition that could be returned in response to an invocation. There are two categories of exceptions: (1) system exceptions, which inherit from org.omg.CORBA.SystemException (which is a java.lang.RuntimeException), and (2) user-defined exceptions, which inherit from org.omg.CORBA.UserException (which is a java.lang.Exception).

factory object
A CORBA object that is used to create new CORBA objects. Factory objects are themselves usually created at server installation time.

idlj compiler
A tool that takes an interface written in OMG IDL and produces Java programming language interfaces and classes that represent the mapping from the IDL interface to the Java programming language. The resulting files are .java files. Prior to J2SDK v1.3, the idlj compiler was known as the idltojava compiler. The idlj compiler supports new CORBA-standard features required for RMI-IIOP. The idlj compiler is placed in the SDK's .bin directory by the installer.

idltojava compiler
A tool that takes an interface written in OMG IDL and produces Java programming language interfaces and classes that represent the mapping from the IDL interface to the Java programming language. The resulting files are .java files. Beginning with J2SDK v1.3, the IDL-to-Java language mapping is handled by the idlj compiler, which supports new CORBA-standard features required for RMI-IIOP. The idltojava compiler can be downloaded from the Java Developer Connection (JDC) web site.

implementation
A concrete class that defines the behavior for all of the operations and attributes of the IDL interface it supports. A servant object is an instance of an implementation. There may be many implementations of a single interface.

initial naming context
The NamingContext object returned by a call to the method orb.resolve_initial_references("NameService"). It is an object reference to the COS Naming Service registered with the ORB and can be used to create other NamingContext objects.
See also: naming context

Interface Definition Language (IDL)
The OMG-standard language for defining the interfaces for all CORBA objects. An IDL interface declares a set of operations, exceptions, and attributes. Each operation has a signature, which defines its name, parameters, result and exceptions. OMG IDL does not include implementations for operations; rather, as its name indicates, it is simply a language for defining interfaces. The complete syntax and semantics for IDL are available in the OMG specification at the OMG web site.

Interface Repository (IFR)
A service that contains all the registered component interfaces, the methods they support, and the parameters they require. The IFR stores, updates, and manages object interface definitions. Programs may use the IFR APIs to access and update this information. An IFR is not necessary for normal client/server interactions.

Internet InterORB Protocol (IIOP)
The OMG-specified network protocol for communicating between ORBs. Java IDL conforms to IIOP version 1.0.

invocation
The process of performing a method call on a CORBA object, which can be done without knowledge of the object's location on the network. Static invocation, which uses a client stub for the invocation and a server skeleton for the service being invoked, is used when the interface of the object is known at compile time. If the interface is not known at compile time, dynamic invocation must be used.

Java IDL
The classes, libraries, and tools that make it possible to use CORBA objects from the Java programming language. The main components of Java IDL are an ORB, a naming service, and the idlj compiler. All are part of J2SDK1.3.

name binding
The association of a name with an object reference. Name bindings are stored in a naming context.

namespace
A collection of naming contexts that are grouped together.

naming context
A CORBA object that supports the NamingContext interface and functions as a sort of directory which contains (points to) other naming contexts and/or simple names. Similar to a directory structure, where the last item is a file and preceding items are directories, in a naming context, the last item is an object reference name, and the preceding items are naming contexts.

naming service
A CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference.

object
A computational grouping of operations and data into a modular unit. An object is defined by the interface it presents to others, its behavior when operations on its interface are invoked, and its state.

object implementation
See implementation.

Object Management Group (OMG)
An international organization with over 700 members that establishes industry guidelines and object management specifications in order to provide a common framework for object-oriented application development. Its members include platform vendors, object-oriented database vendors, software tool developers, corporate developers, and software application vendors. The OMG Common Object Request Broker Architecture specifies the CORBA object model. See www.omg.org for more information.

object reference
A construct containing the information needed to specify an object within an ORB. An object reference is used in method invocations to locate a CORBA object. Object references are the CORBA object equivalent to programming language-specific object pointers. They may be obtained from a factory object or from the Naming Service. An object reference, which is opaque (its internal structure is irrelevant to application developers), identifies the same CORBA object each time it is used. It is possible, however, for multiple object references to refer to the same CORBA object.

Object Request Broker (ORB)
The libraries, processes, and other infrastructure in a distributed environment that enable CORBA objects to communicate with each other. The ORB connects objects requesting services to the objects providing them.

operation (IDL)
The construct in an IDL interface that maps to a Java programming language method. For example, an interface ball might support the operation bounce. Operations may take parameters, return a result, or raise exceptions. IDL operations can be oneway, in which case they cannot return results (return values or out arguments) or raise exceptions.

operations interface
A non abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. The operations interface has the same name as the IDL interface with the suffix Operations appended to the end and is used in the server-side mapping and as a mechanism for providing optimized calls for collocated clients and servers.

parameter (IDL)
One or more objects the client passes to an IDL operation when it invokes the operation. Parameters may be declared as "in" (passed from client to server), "out" (passed from server to client), or "inout" (passed from client to server and then back from server to client).

PIDL (Pseudo-IDL)
The interface definition language for describing a CORBA pseudo-object. Each language mapping, including the mapping from IDL to the Java programming language, describes how pseudo objects are mapped to language-specific constructs. PIDL mappings may or may not follow the rules that apply to mapping regular CORBA objects.

pragma
A directive to the idlj compiler to perform certain operations while compiling an IDL file. For example, the pragma "javaPackage" directs the idlj compiler to put the Java programming language interfaces and classes it generates from the IDL interface into the Java programming language package specified.

pseudo-object
An object similar to a CORBA object in that it is described in IDL, but unlike a CORBA object, it cannot be passed around using its object reference, nor can it be narrowed or stringified. Examples of pseudo-objects include the Interface Repository and DII which, although implemented as libraries, are more clearly described in OMG specifications as pseudo-objects with IDL interfaces. The IDL for pseudo-objects is called "PIDL" to indicate that a pseudo-object is being defined.

RMI-IIOP
Java RMI-IIOP is an Object Request Broker and a compiler, rmic -iiop, that generates IIOP stub and tie classes. With RMI-IIOP, developers can write remote interfaces in the Java programming language and implement them simply using Java technology and the Java RMI APIs. These interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces. Using RMI-IIOP, objects can be passed both by reference and by value over IIOP.

servant object
An instance of an object implementation for an IDL interface. The servant object is registered with the ORB so that the ORB knows where to send invocations. It is the servant that performs the services requested when a CORBA object's method is invoked.

server
A program that contains the implementations of one or more IDL interfaces. For example, a desktop publishing server might implement a Document object type, a ParagraphTag object type, and other related object types. The server is required to register each implementation (servant object) with the ORB so that the ORB knows about the servant. Servers are sometimes referred to as object servers.

server skeleton
A public abstract class generated by the idlj compiler that provides the ORB with information it needs in dispatching method invocations to the servant object(s). A server skeleton, like a client stub, is specific to the IDL interface from which it is generated. A server skeleton is the server side analog to a client stub, and these two classes are used by ORBs in static invocation.

service tier
The portion of a distributed application that contains the business logic and performs most of the computation. The service tier is typically located on a shared machine for optimum resource use.

signature interface
A non-abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface. The signature interface, which extends IDLEntity, has the same name as the IDL interface name and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces.

static invocation
See invocation.

stringified object reference
An object reference that has been converted to a string so that it may be stored on disk in a text file (or stored in some other manner). Such strings should be treated as opaque because they are ORB-implementation independent. Standard object_to_string and string_to_object methods on org.omg.CORBA.Object make stringified references available to all CORBA Objects.

Distributed Application Concepts | Using CORBA | Glossary
Home
Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Initialization

Before a Java program can use CORBA objects, it must initialize itself as follows:

  • Create an ORB object.
  • Obtain one or more initial object references, typically at least a naming context.

Topics in this section include:

  • Creating an ORB Object
    • Creating an ORB for an Application
    • Creating an ORB for an Applet
    • Arguments to ORB.init()
    • System Properties
  • Obtaining Initial Object References
    • Stringified Object References
    • Getting References from an ORB

Creating an ORB Object

Before it can create or invoke a CORBA object, an applet or application must first create an ORB object. Doing so introduces the applet or application to the ORB and obtains access to important operations that are defined on the ORB object.

Applets and applications create ORB instances slightly differently, because their parameters, which must be passed in the ORB.init() call, are arranged differently.

Creating an ORB for an Application

This fragment shows how an application might create an ORB:

    import org.omg.CORBA.ORB;

    public static void main(String args[])
    {
      try{
        ORB orb = ORB.init(args, null);
    // code continues

Creating an ORB for an Applet

An applet creates an ORB like this:

    import org.omg.CORBA.ORB;

    public void init() {
      try {
        ORB orb = ORB.init(this, null);
    // code continues

Some web browsers have an ORB built directly into them. This can cause problems if that ORB is not perfectly compliant. In this case, special steps must be taken to initialize the Java IDL ORB specifically. For example, because of missing classes in the installed ORB in Netscape Communicator 4.01, an applet displayed in that browser must contain code similar to the following in its init() method:

    import java.util.Properties;
    import org.omg.CORBA.*;

    public class MyApplet extends java.applet.Applet {
      public void init()
      {
        // Instantiate the Java IDL ORB, passing in this applet
        // so that the ORB can retrieve the applet properties.
        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBClass", "com.sun.CORBA.iiop.ORB");
        ORB orb = ORB.init(this, props);
        ...
      }
    }

Arguments to ORB.init()

For both applications and applets, the arguments for the initialization method are:

args or this
Provides the ORB access to the application's arguments or applet's parameters.
null
A java.util.Properties object.

The init() operation uses these parameters, as well as the system properties, to obtain information it needs to configure the ORB. It searches for ORB configuration properties in the following places and order:

  1. The application or applet parameters (first argument)
  2. A java.util.Properties object (second argument), if one has been supplied
  3. The java.util.Properties object returned by System.getProperties()

The first value found for a particular property is the value the init() operation uses. If a configuration property cannot be found in any of these places, the init() operation assumes an implementation-specific value for it. For maximum portability among ORB implementations, applets and applications should explicitly specify configuration property values that affect their operation, rather than relying on the assumptions of the ORB they happen to be running in.

System Properties

With respect to the system Properties object, note that Sun's Java virtual machine* adds -D command line arguments to it. Other Java virtual machines may or may not do the same.

Currently, the following configuration properties are defined for all ORB implementations:

org.omg.CORBA.ORBClass
The name of a Java class that implements the org.omg.CORBA.ORB interface. Applets and applications do not need to supply this property unless they must have a particular ORB implementation. The value for the Java IDL ORB is com.sun.CORBA.iiop.ORB.
org.omg.CORBA.ORBSingletonClass
The name of a Java class that implements the org.omg.CORBA.ORB interface. This is the object returned by a call to orb.init() with no arguments. It is used primarily to create typecode instances than can be shared across untrusted code (such as unsigned applets) in a secured environment.

In addition to the standard properties listed above, Java IDL also supports the following properties:

org.omg.CORBA.ORBInitialHost
The host name of a machine running a server or daemon that provides initial bootstrap services, such as a name service. The default value for this property is localhost for applications. For applets it is the applet host, equivalent to getCodeBase().getHost().
org.omg.CORBA.ORBInitialPort
The port the initial naming service listens to. The default value is 900.

Note: When specifying a property as a command-line argument to a Java IDL application, omit the org.omg.CORBA. portion of the property name. For example, a command line that starts an application looks like this:
    -ORBInitialPort 800

Applet parameters should specify the full property names. The conventions for applications differ from applets so as not to expose language-specific details in command-line invocations.

Obtaining Initial Object References

To invoke a CORBA object, an applet or application must have a reference for it. There are three ways to get a reference for a CORBA object:

  • From a string that was specially created from an object reference
  • From another object, such as a naming context
  • From the ORB operation resolve_initial_references()

Stringified Object References

The first technique, converting a stringified reference to an actual object reference, is ORB-implementation independent. No matter what Java ORB an applet or application runs on, it can convert a stringified object reference. However, it is up to the applet or application developer to:

  • Ensure that the object referred to is in fact accessible from where the applet or application is running.
  • Obtain the stringified reference, perhaps from a file or a parameter.

The following fragment shows how a server converts a CORBA object reference to a string:

org.omg.CORBA.ORB orb =    // get an ORB object
org.omg.CORBA.Object obj = // create the object reference
String str = orb.object_to_string(obj);
// make the string available to the client

This code fragment shows how a client converts the stringified object reference back to an object:

org.omg.CORBA.ORB orb =    // get an ORB object
String stringifiedref =    // read string
org.omg.CORBA.Object obj = orb.string_to_object(stringifiedref);

Getting References from an ORB

If you don't use a stringified reference to get an initial CORBA object, you use the ORB itself to produce an initial object reference. However, doing so may make your applet or application ORB-dependent, because, although the CORBA specification defines the interface for getting initial object references, it doesn't yet provide enough information for ORB vendors to implement it in a standard way. Applet and application developers should therefore be cautious when using this operation until the standard is more tightly specified. To guarantee ORB-implementation-independence, use the stringified object reference technique instead.

The ORB interface defines an operation called resolve_initial_references() that is intended for bootstrapping object references into a newly started application or applet. The operation takes a string argument that names one of a few recognized objects; it returns a CORBA Object, which must be narrowed to the type the applet or application knows it to be. Two string values are presently defined:

NameService
Passing this value returns a reference to a root naming context which, after narrowing, can be used to look up references for objects whose names are known to the applet or application (assuming those objects are registered by those names in the root or subordinate naming contexts).
InterfaceRepository
This value returns a reference to an interface repository, a CORBA object that contains interface definitions. The current release of Java IDL does not include an implementation of the interface repository. If you are using another server-side orb, you can still use "InterfaceRepository" as the argument to resolve_initial_references().

The Java IDL implementation of resolve_initial_references() requires an already-running naming service whose host and port are identified by the ORBInitialHost and ORBInitialPort properties described previously, or by their default values. See Naming Service for details on starting the Java IDL name server.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Home

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Java(TM) IDL FAQ

Java

JavaTM IDL FAQ

This is a document that attempts to answer many of the questions you may have about Java IDL. We will continue to update this document with your questions as we receive them. If you do not find your question answered here, send email to javaidl@eng.sun.com.

Installation and Downloading

  • Where can I download the idltojava compiler?

Errors

  • I am having problems running idltojava. The problem is ... How can I fix the problem?

  • When I try to compile an IDL file with the idltojava compiler, I get a fatal error: idltojava.exe: fatal error: cannot preprocess input; No such file or directory". What is the problem?

  • Why do I get this message when I try to run HelloServer: Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer/java

Features

  • Does Java IDL contain notification/event services?

  • What are the command line options for tnameserv, the Naming Service?

  • How can I run the Hello World example on two machines?

  • Is Java IDL CORBA compliant?

  • Can I use the Java IDL ORB with a C++ CORBA server? (interoperability)

General

  • What is the difference between the idltojava compiler and the idlj compiler?

  • What are my options for developing CORBA applications using Java?

  • What is the difference between Java IDL and RMI-IIOP?

Installation and Downloading

Where can I download the idltojava compiler?

You can download the idltojava compiler for JDK 1.2 from http://developer.java.sun.com/developer/earlyAccess/jdk12/idltojava.html. However, I highly recommend that you consider downloading J2SDK 1.3, which includes the latest version of the IDL-to-Java compiler, idlj. The idlj compiler is downloaded as part of the JavaTM 2 Platform, Standard Edition, v1.3 installation. When installed, idlj will be located in the bin directory.
The JavaTM 2 Platform, Standard Edition, v1.3, also includes RMI-IIOP, a technology that integrates Java RMI (Remote Method Invocation) and Java IDL. As a result, Java IDL now uses a new version of the IDL-to-Java compiler. This compiler supports new CORBA-standard features required for RMI-IIOP.
RMI-IIOP supersedes Java IDL for most purposes, by enabling you to write CORBA-compliant interfaces directly in Java rather than in the OMG-specified IDL (Interface Definition Language) used with Java IDL. For details, see the RMI-IIOP documentation.

Errors

I am having problems running idltojava. The problem is ... How can I fix the problem?

Many of the problems we have seen related to running the idltojava compiler can be fixed by using the new IDL-to-Java compiler, idlj, available with the download of the JavaTM 2 Platform, Standard Edition, v1.3.

When I compile an IDL file with the idltojava compiler, I get a fatal error: idltojava.exe: fatal error: cannot preprocess input; No such file or directory". What is the problem?

The idltojava compiler in JDK 1.2 is hard-coded to use a default preprocessor. On Windows machines, it uses the MicroSoft Visual C++ preprocessor. You can change the preprocessor that the idltojava compiler uses by setting two environment variables: CPP and CPARGS. Set CPP to the full pathname of the preprocessor you want to use. Set CPARGS to the complete list of arguments to be passed to the preprocessor. You can also turn off the preprocessor by adding -fno-cpp to the idltojava command line.
More information is available in the idltojava reference page that is downloaded with the idltojava compiler.
We recommend upgrading to the latest version of the IDL to Java compiler, idlj. Version 1.3 of the Java 2 SDK, Standard Edition, includes a new version of Java IDL which is 100% pure Java, so no preprocessor is necessary. The new IDL-to-Java compiler, idlj, is included with the download of J2SE v.1.3. For information on the enhancements to Java IDL that are supported in v.1.3, follow the link to Java(TM) IDL: Changes between JDK 1.2 and J2SDK, SE, v1.3. To download version 1.3 of the Java 2 SDK, Standard Edition, link to http://java.sun.com/j2se/1.3/index.html. To learn more about the new version of Java IDL, link to the Java IDL page for J2SE v1.3.

Why do I get this message when I try to run HelloServer: "Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer/java"
The most common reason for this error when running HelloServer (and also HelloClient) from the Java IDL tutorial is when a space is added between quotation marks in the following line of code:

NameComponent nc = new NameComponent("Hello", "");

There should be no spaces between the quotation marks. Without spaces, this value is passed as a null. With a space between the quotations, a space character is passed.

Features

Does Java IDL contain notification/event services?

No, it does not. If you need an events service, you can implement one, purchase one off the shelf, or search for one freely available to start things off with.

What are the command line options for tnameserv, the Naming Service?

No command line options are necessary for running tnameserv, however, it is recommended that you specify a port for the name server to run on , as follows:
         tnameserv -ORBInitialPort nameserverport
Or, from an MS-DOS system prompt (Windows), enter:
         start tnameserv -ORBInitialPort nameserverport
Note that nameserverport is the port on which you want the name server to run. If you do not specify this, port 900 will be chosen by default. Also note that using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.
More description of the Naming Service is available on the Web at http://java.sun.com/j2se/1.3/docs/guide/idl/jidlNaming.html.

How can I run the Hello World example on two machines?

You need to use the -ORBInitialHost <Host Name where Name Service is Launched> option when starting the client and/or server (whichever is not running on the same machine as the name server). This way the client and server know where to find the Name Service. As example can be found on the Web at http://java.sun.com/j2se/1.3/docs/guide/idl/tutorial/jidl2machines.html.

Is Java IDL CORBA compliant?

With the idlj compiler in J2SDK 1.3, we are CORBA 2.3 compliant in some areas but not in others. In J2SDK 1.4, we will be more compliant with CORBA 2.3. RMI-IIOP also mostly comforms to CORBA/IIOP 2.3.1, with the exception that Valuetypes are encoded on a GIOP 1.0 stream although they were defined for GIOP 1.2. The J2SE 1.4 and J2EE 1.3 ORB platforms will have GIOP 1.2 support along the lines of compliance with CORBA 2.3.

Can I use the Java IDL ORB with a C++ CORBA server? (interoperability)

The Java IDL ORB is an ORB completely written in Java. The idlj compiler generates code that follows the conventions definded in the IDL to Java Language Mapping Specification. The Java ORB does not provide a compiler that generates code in any languages other than the Java platform. If you want to test interoperability between the Java ORB and an ORB written in another language (such as C++), you will need to find an ORB written in that language and a compiler that conforms to the specific language mapping. Language mapping specifications are available from the Object Management Group Web site at http://www.omg.org/technology/documents/formal/corba_language_mapping_specifica.htm. To find a vendor that provides a CORBA ORB and a language mapping compiler in the language you are working with, search the Web for "C++ CORBA ORB", or equivalent.

Although it is true in theory that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

General

What is the difference between the idltojava compiler and the idlj compiler?

The following list provides a summary of changes that occurred in Java IDL between the release of JDK 1.2 and J2SE v.1.3. For more detail, read Java IDL: Changes between JDK 1.2 and J2SDK, Standard Edition, v1.3.
  • New IDL-to-Java compiler, idlj, is 100% Pure Java, so no preprocessor is necessary when compiling IDL files.
  • More IDL-to-Java compiler options. See the reference documentation for the IDL-to-Java compiler for a list of options.
  • Mapping for interfaces is supported. In accordance with the OMG IDL to Java Language Mapping Specification, Section 1.12, Mapping for Interfaces, the signature interface no longer contains the method that corresponds to the interface defined in the IDL file. Instead, the operations interface, <interface>Operations.java, is generated in the <module> subdirectory and contains the methods defined by the interface.
  • Support for Java mapping to IDL value types.

What are my options for developing CORBA applications using Java?

CORBA technology as part of the Java 2 platform consists of an Object Request Broker (ORB) written in Java (with a small bit of native code), the RMI programming model, and the IDL programming model.
The "magic" that gives us the cross-language, cross-vendor interoperability is the Internet InterORB Protocol, or IIOP. IIOP can be a transport protocol for distributed applications written in either IDL or Java RMI. IIOP allows distributed objects to conform to OMG's CORBA specification.
When using the IDL programming model, the interface is everything! It defines the points of entry that can be called from a remote process, such as the types of arguments the called procedure will accept, or the value/output parameter of information returned. Using IDL, the programmer can make the entry points and datatypes that pass between communicating processes act like a standard language.
CORBA is a language-neutral system in which the argument values or return values are limited to what can be represented in the involved implementaton languages. In CORBA, object orienation is limited only to objects that can be passed by reference (the object code itself cannot be passed from machine-to-machine) or are predefined in the overall framework. Passed and returned types must be those declared in the interface.
With RMI, the IDL and the implementation language are the same thing, so you don't have to worry about mapping from one to the other. Language-level objects (the code itself) can be passed from one process to the next. Values can be returned by their actual type, not the declared type. Or, you can compile the interfaces to generate IIOP-compliant stubs and skeletons to talk to objects written on other machines in other CORBA-compliant languages.

What is the difference between Java IDL and RMI-IIOP?

This is a fundamental question and it's important to understand the distinction between these two ways of integrating the Java programming language with CORBA.
Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.
RMI-IIOP (Remote Method Invocation over Internet Inter-ORB Protocol) is for Java programmers who want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJBs is RMI-based.
There are several scenarios that will define how you will want to create distributed CORBA applications. Here are some of them:
  • Java IDL! If you have been developing CORBA applications using IDL for some time, you will probably want to stay in this environment. Create the interfaces using IDL, and define the client and server applications using the Java programming language to take advantage of its "Write Once, Run AnywhereTM" portability, its highly productive implementation environment, and its very robust platform.
  • RMI-JRMP! If all of your applications are written in the Java programming language, you will probably want to use Java RMI to enable communication between Java objects on different virtual machines and different physical machines. Using Java RMI without its IIOP option leverages its strengths of code portability, security, and garbage collection.
  • RMI-IIOP! If you writing most of your new applications using the Java programming language, but need to maintain legacy applications written in other programming languages as well, you will probably want to use Java RMI with its IIOP compiler option.

Copyr ight © 2000 Sun Microsystems, Inc. All Rights Reserved.

Send questions or comments to: JavaIDL@eng.sun.com.

Sun

Java Software


Contents

Mapping IDL to Java

5

5.1 Introduction

This section describes the complete mapping of IDL into the Java language.

The rationale for design decisions can be found in Chapter 4, "Overall Design Rationale".

In most cases examples of the mapping are provided. It should be noted that the examples are code fragments that try to illustrate only the language construct being described. Normally they will be embedded in some module and hence will be mapped into a Java package.

5.2 Names

In general IDL names and identifiers are mapped to Java names and identifiers with no change. If a name collision could be generated in the mapped Java code, the name collision is resolved by prepending an underscore (_) to the mapped name.

In addition, because of the nature of the Java language, a single IDL construct may be mapped to several (differently named) Java constructs. The "additional" names are constructed by appending a descriptive suffix. For example, the IDL interface foo is mapped to the Java interface foo, and additional Java classes fooHelper and fooHolder.

In those exceptional cases that the "additional" names could conflict with other mapped IDL names, the resolution rule described above is applied to the other mapped IDL names. I.e., the naming and use of required "additional" names takes precedence.

For example, an interface whose name is fooHelper or fooHolder is mapped to _fooHelper or _fooHolder respectively, regardless of whether an interface named foo exists. The helper and holder classes for interface fooHelper are named _fooHelperHelper and _fooHelperHolder.

IDL names that would normally be mapped unchanged to Java identifiers that conflict with Java reserved words will have the collision rule applied.

5.2.1 Reserved Names

The mapping in effect reserves the use of several names for its own purposes. These are:

  • The Java class <type>Helper, where <type> is the name of IDL user defined type.

  • The Java class <type>Holder, where <type> is the name of an IDL defined type (with certain exceptions such as typedef aliases).

  • The Java classes <basicJavaType>Holder, where <basicJavaType> is one of the Java primitive datatypes that is used by one of the IDL basic datatypes (Section 5.4.1.2, "Holder Classes).

  • The nested scope Java package name <interface>Package, where <interface> is the name of an IDL interface (Section 5.15, "Mapping for Certain Nested Types).

  • The keywords in the Java language:

    abstract

    default

    if

    private

    throw

    boolean

    do

    implements

    protected

    throws

    break

    double

    import

    public

    transient

    byte

    else

    instanceof

    return

    try

    case

    extends

    int

    short

    void

    catch

    final

    interface

    static

    volatile

    char

    finally

    long

    super

    while

    class

    float

    native

    switch

    const

    for

    new

    synchronized

    continue

    goto

    package

    this

The use of any of these names for a user defined IDL type or interface (assuming it is also a legal IDL name) will result in the mapped name having an (_) prepended.

5.3 Mapping of Module

An IDL module is mapped to a Java package with the same name. All IDL type declarations within the module are mapped to corresponding Java class or interface declarations within the generated package.

IDL declarations not enclosed in any modules are mapped into the (unnamed) Java global scope.

5.3.1 Example

// IDL

module Example {...}

// generated Java

package Example;

    ...

5.4 Mapping for Basic Types

5.4.1 Introduction

The following table shows the basic mapping. In some cases where there is a potential mismatch between an IDL type and its mapped Java type, the Exceptions column lists the standard CORBA exceptions that may be (or is) raised. See Section 5.13, "Mapping for Exception for details on how IDL system exceptions are mapped.

The potential mismatch can occur when the range of the Java type is "larger" than IDL. The value must be effectively checked at runtime when it is marshaled as an in parameter (or on input for an inout), e.g. Java chars are a superset of IDL chars.

Users should be careful when using unsigned types in Java. Because there is no support in the Java language for unsigned types, a user is responsible for ensuring that large unsigned IDL type values are handled correctly as negative integers in Java.

Figure 5-1 Basic Type Mappings
IDL Type | Java type | Exceptions
boolean | boolean |
char | char | CORBA::DATA_CONVERSION
wchar | char |
octet | byte |
string | java.lang.String | CORBA::MARSHAL CORBA::DATA_CONVERSION
wstring | java.lang.String | CORBA::MARSHAL
short | short |
unsigned short | short |
long | int |
unsigned long | int |
long long | long |
unsigned long long | long |
float | float |
double | double |

Additional details are described in the sections following.

5.4.1.1 Future Support

In the future we expect the "new" extended IDL types fixed, and possibly long double, to be supported directly by Java. Currently there is no support for them in JDK 1.0.2, and as a practical matter, they are not yet widely supported by ORB vendors. We would expect them to be mapped as follows:

IDL Type | Java type | Exceptions
long double | ??? |
fixed | java.math.BigDecimal | CORBA::DATA_CONVERSION

A future revision of this specification should make support of this mapping normative.

5.4.1.2 Holder Classes

Support for out and inout parameter passing modes requires the use of additional "holder" classes. These classes are available for all of the basic IDL datatypes in the org.omg.CORBA package and are generated for all named user defined types except those defined by typedefs.

For user defined IDL types, the holder class name is constructed by appending Holder to the mapped (Java) name of the type.

For the basic IDL datatypes, the holder class name is the Java type name (with its initial letter capitalized) to which the datatype is mapped with an appended Holder, e.g. IntHolder. See Section 5.2, "Names" for a description of the implications on possible collisions with user defined names.

Each holder class has a constructor from an instance, a default constructor, and has a public instance member, value, which is the typed value. The default constructor sets the value field to the default value for the type as defined by the Java language: false for boolean, 0 for numeric and char types, null for strings, null for object references.

In order to support portable stubs and skeletons, holder classes for user defined types also have to implement the org.omg.CORBA.portable.Streamable interface.

The holder classes for the basic types are defined below. Note that they do not implement the Streamable interface. They are in the org.omg.CORBA package.

// Java

package org.omg.CORBA;

final public class ShortHolder {

    public short value;

    public ShortHolder() {}

    public ShortHolder(short initial) {

        value = initial;

    }

}

final public class IntHolder {

    public int value;

    public IntHolder() {}

    public IntHolder(int initial) {

        value = initial;

    }

}

final public class LongHolder {

    public long value;

    public LongHolder() {}

    public LongHolder(long initial) {

        value = initial;

    }

}

final public class ByteHolder {

    public byte value;

    public ByteHolder() {}

    public ByteHolder(byte initial) {

        value = initial;

    }

}

final public class FloatHolder {

    public float value;

    public FloatHolder() {}

    public FloatHolder(float initial) {

        value = initial;

    }

}

final public class DoubleHolder {

    public double value;

    public DoubleHolder() {}

    public DoubleHolder(double initial) {

        value = initial;

    }

}

final public class CharHolder {

    public char value;

    public CharHolder() {}

    public CharHolder(char initial) {

        value = initial;

    }

}

final public class BooleanHolder {

    public boolean value;

    public BooleanHolder() {}

    public BooleanHolder(boolean initial) {

        value = initial;

    }

}

final public class StringHolder {

    public java.lang.String value;

    public StringHolder() {}

    public StringHolder(java.lang.String initial) {

        value = initial;

    }

}

final public class ObjectHolder {

    public org.omg.CORBA.Object value;

    public ObjectHolder() {}

    public ObjectHolder(org.omg.CORBA.Object initial) {

        value = initial;

    }

}

final public class AnyHolder {

    public Any value;

    public AnyHolder() {}

    public AnyHolder(Any initial) {

        value = initial;

    }

}

final public class TypeCodeHolder {

    public TypeCode value;

    public typeCodeHolder() {}

    public TypeCodeHolder(TypeCode initial) {

        value = initial;

    }

}

final public class PrincipalHolder {

    public Principal value;

    public PrincipalHolder() {}

    public PrincipalHolder(Principal initial) {

        value = initial;

    }

}
The Holder class for a user defined type <foo> is shown below:

// Java

final public class <foo>Holder

    implements org.omg.CORBA.portable.Streamable {

    public <foo> value;

    public <foo>Holder() {}

    public <foo>Holder(<foo> initial) {}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

    }

5.4.1.3 Use of Java null

The Java null may only be used to represent the "null" object reference. For example, a zero length string, rather than null must be used to represent the empty string. Similarly for arrays.

5.4.2 Boolean

The IDL boolean constants TRUE and FALSE are mapped to the corresponding Java boolean literals true and false.

5.4.3 Character Types

IDL characters are 8-bit quantities representing elements of a character set while Java characters are 16-bit unsigned quantities representing Unicode characters. In order to enforce type-safety, the Java CORBA runtime asserts range validity of all Java chars mapped from IDL chars when parameters are marshaled during method invocation. If the char falls outside the range defined by the character set, a CORBA::DATA_CONVERSION exception shall be thrown.

The IDL wchar maps to the Java primitive type char.

5.4.4 Octet

The IDL type octet, an 8-bit quantity, is mapped to the Java type byte.

5.4.5 String Types

The IDL string, both bounded and unbounded variants, are mapped to java.lang.String. Range checking for characters in the string as well as bounds checking of the string shall be done at marshal time. Character range violations cause a CORBA::DATA_CONVERSION exception to be raised. Bounds violations cause a CORBA:: MARSHAL exception to be raised.

The IDL wstring, both bounded and unbounded variants, are mapped to java.lang.String. Bounds checking of the string shall be done at marshal time. Bounds violations cause a CORBA:: MARSHAL exception to be raised.

5.4.6 Integer Types

The integer types map as shown in Figure 5-1.

5.4.7 Floating Point Types

The IDL float and double map as shown in Figure 5-1.

5.4.8 Future Fixed Point Types

The IDL fixed type is mapped to the Java java.math.BigDecimal class. Size violations raises a CORBA::DATA_CONVERSION exception.

This is left for a future revision.

5.4.9 Future Long Double Types

There is no current support in Java for the IDL long double type. It is not clear at this point whether and when this type will be added either as a primitive type, or as a new package in java.math.*, possibly as java.math.BigFloat.

This is left for a future revision.

5.5 Helper Classes

All user defined IDL types have an additional "helper" Java class with the suffix Helper appended to the type name generated. Several static methods needed to manipulate the type are supplied. These include Any insert and extract operations for the type, getting the repository id, getting the typecode, and reading and writing the type from and to a stream.

For any user defined IDL type, <typename>, the following is the Java code generated for the type. In addition, the helper class for a mapped IDL interface also has a narrow operation defined for it.

// generated Java helper

public class <typename>Helper {

    public static void

        insert(org.omg.CORBA.Any a, <typename> t) {...}

    public static <typename> extract(Any a) {...}

    public static org.omg.CORBA.TypeCode type() {...}

    public static String id() {...}

    public static <typename> read(

        org.omg.CORBA.portable.InputStream istream)

        {...}

    public static void write(

        org.omg.CORBA.portable.OutputStream ostream,

        <typename> value)

        {...}

    // only for interface helpers

    public static

        <typename> narrow(org.omg.CORBA.Object obj);

}

The helper class associated with an IDL interface also has the narrow method (see Section 5.12, "Mapping for Interface).

     5.5.1	Examples

// IDL - named type

struct st {long f1; string f2;};

// generated Java

public class stHelper {

    public static void insert(org.omg.CORBA.Any any,

        st s) {...}

    public static st extract(Any a) {...}

    public static org.omg.CORBA.TypeCode type() {...}

    public static String id() {...}

    public static st read(org.omg.CORBA.InputStream is) {...}

    public static void write(org.omg.CORBA.OutputStream os,

         st s) {...}

}

// IDL - typedef sequence

typedef sequence <long> IntSeq;

// generated Java helper

public class IntSeqHelper {

    public static void insert(org.omg.CORBA.Any any,

        int[] seq);

    public static int[] extract(Any a){...}

    public static org.omg.CORBA.TypeCode type(){...}

    public static String id(){...}

    public static int[] read(

        org.omg.CORBA.portable.InputStream is)

        {...}

    public static void write(

        org.omg.CORBA.portable.OutputStream os,

        int[] seq)

        {...}

}

    5.6	 Mapping for Constant

Constants are mapped differently depending upon the scope in which they appear.

     5.6.1	Constants Within An Interface

Constants declared within an IDL interface are mapped to public static final fields in the Java interface corresponding to the IDL interface.

     5.6.1.1	 Example

// IDL

module Example {

        interface Face {

        const long aLongerOne = -321;

    };

};

// generated Java

package Example;

public interface Face {

    public static final int aLongerOne = (int) (-321L);

}

     5.6.2	Constants Not Within An Interface

Constants not declared within an IDL interface are mapped to a public interface with the same name as the constant and containing a public static final field, named value, that holds the contant's value. Note that the Java compiler will normally inline the value when the class is used in other Java code.

     5.6.2.1	 Example

// IDL

module Example {

    const long aLongOne = -123;

    };

package Example;

public interface aLongOne {

    public static final int value = (int) (-123L);

}

    5.7	 Mapping for Enum

An IDL enum is mapped to a Java final class with the same name as the enum type which declares a value method, two static data members per label, an integer conversion method, and a  private constructor as follows:

// generated Java

public final class <enum_name> {

    // one pair for each label in the enum

    public static final int _<label> = <value>;

    public static final <enum_name> <label> =

        new <enum_name>(_<label>);

    public int value() {...}

    // get enum with specified value

    public static <enum_name> from_int(int value);

    // constructor

    private <enum_name>(int) { ... }

}

One of the members is a public static final that has the same name as the IDL enum label. The other has an underscore (_) prepended and is intended to be used in switch statements.

The value method returns the integer value. Values are assigned sequentially starting with 0. Note: there is no conflict with the value() method in Java even if there is a label named value

There shall be only one instance of an enum. Since there is only one instance,  equality tests will work correctly. I.E. the default java.lang.Object implementation of equals() and hash() will automatically work correctly for an enum's singleton object.

The Java class for the enum has an additional method  from_int(), which returns the enum with the specified value.

The holder class for the enum is also generated. Its name is the enum's mapped Java classname with Holder appended to it as follows:

public class <enum_name>Holder implements

        org.omg.CORBA.portable.Streamable {

    public <enum_name> value;

    public <enum_name>Holder() {}

    public <enum_name>Holder(<enum_name> initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.7.1	Example

// IDL

enum EnumType {a, b, c};

// generated Java

public final class EnumType {

    public static final int _a = 0;

    public static final EnumType a = new EnumType(_a);

    public static final int _b = 1;

    public static final EnumType b = new EnumType(_b);

    public static final int _c = 2;

    public static final EnumType c = new EnumType(_c);

    public int value() {...}

    public static EnumType from_int(int value) {...};

    // constructor

    private EnumType(int) {...}

    };

    5.8	 Mapping for Struct

An IDL struct is mapped to a final Java class with the same name that provides instance variables for the fields in IDL member ordering and a constructor for all values. A null constructor is also provided so that the fields can be filled in later.

The holder class for the struct is also generated. Its name is the struct's mapped Java classname with Holder appended to it as follows:

final public class <class>Holder implements

        org.omg.CORBA.portable.Streamable {

    public <class> value;

    public <class>Holder() {}

    public <class>Holder(<class> initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.8.1	Example

// IDL

struct StructType {

    long field1;

    string field2;

};

// generated Java

final public class StructType {

    // instance variables

    public int field1;

    public String field2;

    // constructors

    public StructType() {}

    public StructType(int field1, String field2)

        {...}

    }

final public class StructTypeHolder

        implements org.omg.CORBA.portable.Streamable {

    public StructType value;

    public StructTypeHolder() {}

    public StructTypeHolder(StructType initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

    5.9	 Mapping for Union

An IDL union is mapped to a final Java class with the same name that has:

  • a default constructor

  • an accessor method for the discriminator, named discriminator()

  • an accessor method for each branch

  • a modifier method for branch

  • a modifier method for each branch which has more than one case label.

  • a default modifier method if needed

The normal name conflict resolution rule is used (prepend an "_") for the discriminator if there is a name clash with the mapped uniontype name or any of the field names.

The branch accessor and modifier methods are overloaded and named after the branch. Accessor methods shall raise the CORBA::BAD_OPERATION system exception if the expected branch has not been set.

If there is more than one case label corresponding to a branch, the simple modifier method for that branch sets the discriminant to the value of the first case label. In addition, an extra modifier method which takes an explicit discriminator parameter is generated.

If the branch corresponds to the default case label, then the modifier method sets the discriminant to a value that does not match any other case labels.

It is illegal to specify a union with a default case label if the set of case labels completely covers the possible values for the discriminant. It is the responsibility of the Java code generator (e.g., the IDL complier, or other tool) to detect this situation and refuse to generate illegal code.

A default modifier method, named default() ( _default() if name conflict) is created if there is no explicit default case label, and the set of case labels does not completely cover the possible values of the discriminant. It will set the value of the union to be an out-of-range value.

The holder class for the union is also generated. Its name is the union's mapped Java classname with Holder appended to it as follows:

final public class <union_class>Holder

            implements org.omg.CORBA.portable.Streamable {

    public <union_class> value;

    public <union_class>Holder() {}

    public <union_class>Holder(<union_class> initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.9.1	Example

// IDL

union UnionType switch (EnumType) {

        case first: long win;

         case second: short place;

        case third:

        case fourth: octet show;

        default:     boolean other;

    };

// generated Java

final public class UnionType {

    // constructor

    public UnionType() {....}

    // discriminator accessor

    public <switch-type> discriminator() {....}

    // win

    public int win() {....}

    public void win(int value) {....}

    // place

    public short place() {....}

    public void place(short value) {....}

    // show

    public byte show() {....}

    public void show(byte value) {....}

    public void show(int discriminator, byte value){....}

    // other

    public boolean other() {....}

    public void other(boolean value) {....}

}

final public class UnionTypeHolder

        implements org.omg.CORBA.portable.Streamable {

    public UnionType value;

    public UnionTypeHolder() {}

    public UnionTypeHolder(UnionType initial) {...}

       public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

    5.10	 Mapping for Sequence

An IDL sequence is mapped to a Java array with the same name. In the mapping, everywhere the sequence type is needed, an array of the mapped type of the sequence element is used. Bounds checking shall be done on bounded sequences when they are marshaled as parameters to IDL operations, and an IDL CORBA::MARSHAL is raised if necessary.

The holder class for the sequence is also generated. Its name is the sequence's mapped Java classname with Holder appended to it as follows:

final public class <sequence_class>Holder {

    public <sequence_element_type>[] value;

    public <sequence_class>Holder() {};

    public <sequence_class>Holder(

            <sequence_element_type>[] initial) {...};

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.10.1	Example

// IDL

typedef sequence< long > UnboundedData;

typedef sequence< long, 42 > BoundedData;

// generated Java

final public class UnboundedDataHolder

            implements org.omg.CORBA.portable.Streamable {

    public int[] value;

    public UnboundedDataHolder() {};

    public UnboundedDataHolder(int[] initial) {...};

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

final public class BoundedDataHolder

            implements org.omg.CORBA.portable.Streamable {

    public int[] value;

    public BoundedDataHolder() {};

    public BoundedDataHolder(int[] initial) {...};

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

    5.11	 Mapping for Array

An IDL array is mapped the same way as an IDL bounded sequence. In the mapping, everywhere the array type is needed, an array of the mapped type of the array element is used. In Java, the natural Java subscripting operator is applied to the mapped array. The bounds for the array are checked when the array is marshaled as an argument to an IDL operation and a CORBA::MARSHAL exception is raised if an bounds violation occurs. The length of the array can be made available in Java, by bounding the array with an IDL constant, which will be mapped as per the rules for constants.

The holder class for the array is also generated. Its name is the array's mapped Java classname with Holder appended to it as follows:

final public class <array_class>Holder

        implements org.omg.CORBA.portable.Streamable {

    public <array_element_type>[] value;

    public <array_class>Holder() {}

    public <array_class>Holder(

                <array_element_type>[] initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.11.1	Example

// IDL

const long ArrayBound = 42;

typedef long larray[ArrayBound];

// generated Java

final public class larrayHolder

        implements org.omg.CORBA.portable.Streamable {

    public int[] value;

    public larrayHolder() {}

    public larrayHolder(int[] initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

    5.12	 Mapping for Interface

     5.12.1	Basics

An IDL interface is mapped to a public Java interface with the same name, and an additional "helper" Java class with the suffix Helper appended to the interface name. The Java interface extends the (mapped) base org.omg.CORBA.Object interface.

The Java interface contains the mapped operation signatures. Methods can be invoked on an object reference to this interface.

The helper class holds a static narrow method that allows a org.omg.CORBA.Object to be narrowed to the object reference of a more specific type. The IDL exception CORBA::BAD_PARAM is thrown if the narrow fails.

There are no special "nil" object references. Java null can be passed freely wherever an object reference is expected.

Attributes are mapped to a pair of Java accessor and modifier methods. These methods have the same name as the IDL attribute and are overloaded. There is no modifier method for IDL readonly attributes.

The holder class for the interface is also generated. Its name is the interface's mapped Java classname with Holder appended to it as follows:

final public class <interface_class>Holder

        implements org.omg.CORBA.portable.Streamable {

    public <interface_class> value;

    public <interface_class>Holder() {}

    public <interface_class>Holder(

                <interface_class> initial) {

        value = initial;

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

Interface inheritance expressed in IDL is reflected directly in the Java interface hierarchy.

     5.12.1.1	 Example

// IDL

module Example {

    interface Face {

        long method (in long arg) raises (e);

        attribute long assignable;

        readonly attribute long nonassignable;

    }

}

// generated Java

package Example;

public interface Face extends org.omg.CORBA.Object {

    int method(int arg)

        throws Example.e;

    int assignable();

    void assignable(int i);

    int nonassignable();

}

public class FaceHelper {

    // ... other standard helper methods

    public static Face narrow(org.omg.CORBA.Object obj)

        {...}

}

final public class FaceHolder

        implements org.omg.CORBA.portable.Streamable {

    public Face value;

    public FaceHolder() {}

    public FaceHolder(Face initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.12.2	Parameter Passing Modes

IDL in parameters which implement call-by-value semantics, are mapped to normal Java actual parameters. The results of IDL operations are returned as the result of the corresponding Java method.

IDL out and inout parameters, which implement call-by-result and call-by-value/result semantics, cannot be mapped directly into the Java parameter passing mechanism. This mapping defines additional holder classes for all the IDL basic and user-defined types which are used to implement these parameter modes in Java. The client supplies an instance of the appropriate holder Java class that is passed (by value) for each IDL out or inout parameter. The contents of the holder instance (but not the instance itself) are modified by the invocation, and the client uses the (possibly) changed contents after the invocation returns.

     5.12.2.1	 Example

// IDL

module Example {

    interface Modes {

        long operation(	in long inArg,

                    out long outArg,

                    inout long inoutArg);

    };

    };

// Generated Java

package Example;

public interface Modes {

    int operation(	int inArg,

            IntHolder outArg,

            IntHolder inoutArg);

}

In the above, the result comes back as an ordinary result and the actual in parameters only an ordinary value. But for the out and inout parameters, an appropriate holder must be constructed. A typical use case might look as follows:

// user Java code

// select a target object

Example.Modes target = ...;

// get the in actual value

int inArg = 57;

// prepare to receive out

IntHolder outHolder = new IntHolder();

// set up the in side of the inout

IntHolder inoutHolder = new IntHolder(131);

// make the invocation

int result =target.operation(inArg, outHolder, inoutHolder);

// use the value of the outHolder

... outHolder.value ...

// use the value of the inoutHolder

... inoutHolder.value ...

Before the invocation, the input value of the inout parameter must be set in the holder instance that will be the actual parameter. The inout holder can be filled in either by constructing a new holder from a value, or by assigning to the value of an existing holder of the appropriate type. After the invocation, the client uses the outHolder.value to access the value of the out parameter, and the inoutHolder.value to access the output value of the inout parameter. The return result of the IDL operation is available as the result of the invocation.

    5.13	 Mapping for Exception

IDL exceptions are mapped very similarly to structs. They are mapped to a Java class that provides instance variables for the fields of the exception and constructors.

CORBA system exceptions are unchecked exceptions. They inherit (indirectly) from java.lang.RuntimeException.

User defined exceptions are checked exceptions. They inherit (indirectly) from java.lang.Exception

Figure  5-1	 Inheritance of Java Exception Classes

     5.13.1	User Defined Exceptions

User defined exceptions are mapped to final Java classes that extend org.omg.CORBA.UserException and are otherwise mapped just like the IDL struct type, including the generation of Helper and Holder classes.

If the exception is defined within a nested IDL scope (essentially within an interface) then its Java class name is defined within a special scope. See Section 5.15, "Mapping for Certain Nested Types for more details. Otherwise its Java class name is defined within the scope of the Java package that corresponds to the exception's enclosing IDL module.

     5.13.1.1	 Example

// IDL

module Example {

    exception ex1 { string reason; };

};

// Generated Java

package Example;

final public class ex1 extends org.omg.CORBA.UserException {

    public String reason;		// instance

    public ex1() {...}		// default constructor

    public ex1(String r) {...}		// constructor

}

final public class ex1Holder

        implements org.omg.CORBA.portable.Streamable {

    public ex1 value;

    public ex1Holder() {}

    public ex1Holder(ex1 initial) {...}

    public void _read(org.omg.CORBA.portable.InputStream i)

        {...}

    public void _write(org.omg.CORBA.portable.OutputStream o)

        {...}

    public org.omg.CORBA.TypeCode _type() {...}

}

     5.13.2	System Exceptions

The standard IDL system exceptions are mapped to final Java classes that extend org.omg.CORBA.SystemException and provide access to the IDL major and minor exception code, as well as a string describing the reason for the exception.Note there are no public constructors for org.omg.CORBA.SystemException; only classes that extend it can be instantiated.

The Java class name for each standard IDL exception is the same as its IDL name and is declared to be in the org.omg.CORBA package. The default constructor supplies 0 for the minor code, COMPLETED_NO for the completion code, and "" for the reason string. There is also a constructor which takes the reason and uses defaults for the other fields, as well as one which requires all three parameters to be specified. The mapping from IDL name to Java class name is listed in the table below:

Table 5-1
IDL Exception | Java Class Name
CORBA::UNKNOWN | org.omg.CORBA.UNKNOWN
CORBA::BAD_PARAM | org.omg.CORBA.BAD_PARAM
CORBA::NO_MEMORY | org.omg.CORBA.NO_MEMORY
CORBA::IMP_LIMIT | org.omg.CORBA.IMP_LIMIT
CORBA::COMM_FAILURE | org.omg.CORBA.COMM_FAILURE
CORBA::INV_OBJREF | org.omg.CORBA.INV_OBJREF
CORBA::NO_PERMISSION | org.omg.CORBA.NO_PERMISSION
CORBA::INTERNAL | org.omg.CORBA.INTERNAL
CORBA::MARSHAL | org.omg.CORBA.MARSHAL
CORBA::INITIALIZE | org.omg.CORBA.INITIALIZE
CORBA::NO_IMPLEMENT | org.omg.CORBA.NO_IMPLEMENT
CORBA::BAD_TYPECODE | org.omg.CORBA.BAD_TYPECODE
CORBA::BAD_OPERATION | org.omg.CORBA.BAD_OPERATION
CORBA::NO_RESOURCES | org.omg.CORBA.NO_RESOURCES
CORBA::NO_RESPONSE | org.omg.CORBA.NO_RESPONSE
CORBA::PERSIST_STORE | org.omg.CORBA.PERSIST_STORE
CORBA::BAD_INV_ORDER | org.omg.CORBA.BAD_INV_ORDER
CORBA::TRANSIENT | org.omg.CORBA.TRANSIENT
CORBA::FREE_MEM | org.omg.CORBA.FREE_MEM
CORBA::INV_IDENT | org.omg.CORBA.INV_IDENT
CORBA::INV_FLAG | org.omg.CORBA.INV_FLAG
CORBA::INTF_REPOS | org.omg.CORBA.INTF_REPOS
CORBA::BAD_CONTEXT | org.omg.CORBA.BAD_CONTEXT
CORBA::OBJ_ADAPTER | org.omg.CORBA.OBJ_ADAPTER
CORBA::DATA_CONVERSION | org.omg.CORBA.DATA_CONVERSION
CORBA::OBJECT_NOT_EXIST | org.omg.CORBA.OBJECT_NOT_EXIST
CORBA::TRANSACTIONREQUIRED | org.omg.CORBA.TRANSACTIONREQUIRED
CORBA::TRANSACTIONROLLEDBACK | org.omg.CORBA.TRANSACTIONROLLEDBACK
CORBA::INVALIDTRANSACTION | org.omg.CORBA.INVALIDTRANSACTION

The definitions of the relevant classes are specified below.

// from org.omg.CORBA package

package org.omg.CORBA;

public final class CompletionStatus {

    // Completion Status constants

    public static final int 	_COMPLETED_YES = 0,

                    _COMPLETED_NO = 1,

                    _COMPLETED_MAYBE = 2;

    public static final CompletionStatus COMPLETED_YES =

        new CompletionStatus(_COMPLETED_YES);

    public static final CompletionStatus COMPLETED_NO =

        new CompletionStatus(_COMPLETED_NO);

    public static final CompletionStatus COMPLETED_MAYBE =

        new CompletionStatus(_COMPLETED_MAYBE);

    public int value() {...}

    public static final CompletionStatus from_int(int) {...}

    private CompletionStatus(int) {...}

}

abstract public class

    SystemException extends java.lang.RuntimeException {

        public int minor;

        public CompletionStatus completed;

        // constructor

        protected SystemException(String reason,

                      int minor,

                      CompletionStatus status) {

                      super(reason);

                      this.minor = minor;

                      this.status = status;

        }

    }

final public class

    UNKNOWN extends org.omg.CORBA.SystemException {

    public UNKNOWN() ...

    public UNKNOWN(int minor, CompletionStatus completed) ...

    public UNKNOWN(String reason) ...

    public UNKNOWN(String reason, int minor,

               CompletionStatus completed)	...

}

...

// there is a similar definition for each of the standard

// IDL system exceptions listed in the table above

    5.14	 Mapping for the Any Type

The IDL type Any maps to the Java class org.omg.CORBA.Any. This class has all the necessary methods to insert and extract instances of predefined types. If the extraction operations have a mismatched type, the CORBA::BAD_OPERATION exception is raised.

In addition, insert and extract methods which take a holder class are defined in order to provide a high speed interface for use by portable stubs and skeletons. There is an insert and extract method defined for each primitive IDL type as well as a pair for a generic streamable to handle the case of non-prmitive IDL types. Note that to preserve unsigned type information unsigned methods (which use the normal holder class) are defined where appropriate.

The insert operations set the specified value and reset the any's type if necessary.

Setting the typecode via the type() accessor wipes out the value. An attempt to extract before the value is set will result in a CORBA::BAD_OPERATION exception being raised. This operation is provided primarily so that the type may be set properly for IDL out parameters.

package org.omg.CORBA;

abstract public class Any {

abstract public boolean equal(org.omg.CORBA.Any a);

// type code accessors

abstract public org.omg.CORBA.TypeCode type();

abstract public void type(org.omg.CORBA.TypeCode t);

// read and write values to/from streams

// throw excep when typecode inconsistent with value

abstract public void read_value(

    org.omg.CORBA.portable.InputStream is,

    org.omg.CORBA.TypeCode t) throws org.omg.CORBA.MARSHAL;

abstract public void

    write_value(org.omg.CORBA.portable.OutputStream os);

abstract public org.omg.CORBA.portable.OutputStream

            create_output_stream();

abstract public org.omg.CORBA.portable.InputStream

            create_input_stream();

// insert and extract each primitive type

abstract public short extract_short()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_short(short s);

abstract public int extract_long()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_long(int i);

abstract public long extract_longlong()

     throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_longlong(long l);

abstract public short extract_ushort()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_ushort(short s);

abstract public int extract_ulong()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_ulong(int i);

abstract public long extract_ulonglong()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_ulonglong(long l);

abstract public float extract_float()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_float(float f);

abstract public double extract_double()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_double(double d);

abstract public boolean extract_boolean()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_boolean(boolean b);

abstract public char extract_char()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_char(char c)

    throws org.omg.CORBA.DATA_CONVERSION;

abstract public char extract_wchar()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_wchar(char c);

abstract public byte extract_octet()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_octet(byte b);

abstract public org.omg.CORBA.Any extract_any()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_any(org.omg.CORBA.Any a);

abstract public org.omg.CORBA.Object extract_Object()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_Object(

            org.omg.CORBA.Object o);

// throw excep when typecode inconsistent with value

abstract public void insert_Object(

            org.omg.CORBA.Object o,

            org.omg.CORBA.TypeCode t)

            throws org.omg.CORBA.MARSHAL;

abstract public String extract_string()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_string(String s)

    throws org.omg.CORBA.DATA_CONVERSION, org.omg.CORBA.MARSHAL;

abstract public String extract_wstring()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_wstring(String s)

    throws org.omg.CORBA.MARSHAL;

// insert and extract typecode

abstract public org.omg.CORBA.TypeCode extract_TypeCode()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_TypeCode(

            org.omg.CORBA.TypeCode t);

// insert and extract Principal

abstract public org.omg.CORBA.Principal extract_Principal()

    throws org.omg.CORBA.BAD_OPERATION;

abstract public void insert_Principal(

            org.omg.CORBA.Principal p);

// insert non-primitive IDL types

abstract public void insert_Streamable(

            org.omg.CORBA.portable.Streamable s);

}

    5.15	 Mapping for Certain Nested Types

IDL allows type declarations nested within interfaces. Java does not allow classes  to be nested within interfaces. Hence those IDL types that map to Java classes and that are declared within the scope of an interface must appear in a special "scope" package when mapped to Java.

IDL interfaces that contain these type declarations will generate a scope package to contain the mapped Java class declarations. The scope package name is constructed by  appending Package to the IDL type name.

     5.15.1	Example

// IDL

module Example {

    interface Foo {

        exception e1 {};

    };

};

// generated Java

package Example.FooPackage;

final public class e1 extends org.omg.CORBA.UserException

     {...}

    5.16	 Mapping for Typedef

Java does not have a typedef construct.

     5.16.1	Simple IDL types

IDL types that are mapped to simple Java types may not be subclassed in Java. Hence any typedefs that are type declarations for simple types are mapped to the original (mapped type) everywhere the typedef type appears.

The IDL types covered by this rule are described in Section 5.4, "Mapping for Basic Types.

Helper classes are generated for all typedefs.

     5.16.2	Complex IDL types

Typedefs for non arrays and sequences are "unwound" to their original type until a simple IDL type or user-defined IDL type (of the non typedef variety) is encountered.

Holder classes are generated for sequence and array typedefs only.

     5.16.2.1	 Example

// IDL

struct EmpName {

    string firstName;

    string lastName;

};

typedef EmpName EmpRec;

// generated Java

// regular struct mapping for EmpName

// regular helper class mapping for EmpRec

final public class EmpName {

    ...

}

public class EmpRecHelper {

    ...

}


Mapping IDL to Java

Java IDL: IDL to Java Language Mapping

This release of the JavaTM 2 Platform, Standard Edition, v.1.3, includes idlj, a compiler that reads an Object Management Group (OMG) Interface Definition Language (IDL) file and translates it, or maps it, to a Java interface. The idlj compiler also creates stub, skeleton, helper, holder, and other files as necessary. These .java files are generated from the IDL file according to the mapping specified in the OMG document (pdf format) OMG IDL to Java Language Mapping Specification, formal, 99-07-53. The postscript version of this specification can be found at http://www.omg.org/technology/documents/formal/omg_idl_to_java_language_mapping.htm. Formal specification 99-07-53 of the IDL to Java language mapping is aligned with CORBA version 2.3. For a basic summary of the IDL to Java mapping, see IDL to Java Language Mapping Overview below.

Some topics from the OMG IDL to Java Language Mapping specification that are not easily summarized are:

  • Section 1.19, Mapping Pseudo-Objects to Java
  • Section 1.20, Server-Side Mapping
  • Section 1.21, Java ORB Portability Interfaces

IDL to Java Language Mapping Overview

CORBA objects are defined in OMG IDL (Object Management Group Interface Definition Language). J2SE v1.3 includes idlj, the IDL-to-Java compiler that maps the IDL-defined interfaces to Java classes and interfaces.

This overview shows the correspondence between OMG IDL constructs and Java constructs. Note that OMG IDL, as its name implies, defines interfaces. Like Java interfaces, IDL interfaces contain no implementations for their operations (methods in Java). In other words, IDL interfaces define only the signature for an operation (the name of the operation, the data type of its return value, the data types of the parameters that it takes, and any exceptions that it raises). The implementations for these operations need to be supplied in Java classes written by a Java programmer.

The following table lists the main constructs of IDL and the corresponding constructs in Java.

IDL Construct | Java Construct
module | package
interface (non-abstract) | signature interface and an operations interface, helper class, holder class
interface (abstract) | signature interface, helper class, holder class
constant (not within an interface) | public interface
boolean | boolean
char, wchar | char
octet | byte
string, wstring | java.lang.String
short, unsigned short | short
long, unsigned long | int
long long, unsigned long long | long
float | float
double | double
fixed | java.math.BigDecimal
enum, struct, union | class
sequence, array | array
exception | class
readonly attribute | accessor method
readwrite attribute | accessor and modifer methods
operation | method

Note: When a CORBA operation takes a type that corresponds to a Java object type (a String, for example), it is illegal to pass a Java null as the parameter value. Instead, pass an empty version of the designated object type (for example, an empty String or an empty array). A Java null can be passed as a parameter only when the type of the parameter is a CORBA object reference or value type, in which case the null is interpreted as a nil CORBA object reference.

Home

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.


Naming Service

Topics in this section include:

  • Java IDL Naming Service
  • Starting the Java IDL Naming Service
  • Stopping the Java IDL Naming Service
  • Sample Client: Adding Objects to the Namespace
  • Sample Client: Browsing the Namespace

Java IDL Naming Service

The CORBA COS (Common Object Services) Naming Service provides a tree-like directory for object references much like a filesystem provides a directory structure for files. The Naming Service provided with Java IDL is a simple implementation of the COS Naming Service specification.

Object references are stored in the namespace by name and each object reference-name pair is called a name binding. Name bindings may be organized under naming contexts. Naming contexts are themselves name bindings and serve the same organizational function as a file system subdirectory. All bindings are stored under the initial naming context. The initial naming context is the only persistent binding in the namespace; the rest of the namespace is lost if the Java IDL naming service process halts and restarts.

For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to a stringified initial naming context for that naming service. The naming service can either be the Java IDL naming service or another COS-compliant naming service.

Starting the Java IDL Naming Service

You must start the Java IDL naming service before an application or applet that uses its naming service. Installation of the Java IDL product creates a script (Solaris: tnameserv) or executable file (Windows NT: tnameserv.exe) that starts the Java IDL naming service. Start the naming service so it runs in the background.

If you do not specify otherwise, the Java IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB resolve_initial_references() and list_initial_references() methods, as follows:

    tnameserv -ORBInitialPort nameserverport

If you do not specify the name server port, port 900 is used by default. When running Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. To specify a different port, for example, 1050, from a UNIX command shell, enter:

    tnameserv -ORBInitialPort 1050

From an MS-DOS system prompt (Windows), enter:

    start tnameserv -ORBInitialPort nameserverport

Clients of the name server must be made aware of the new port number. Do this by setting the org.omg.CORBA.ORBInitialPort property to the new port number when creating the ORB object.

The -J option

This command-line option is available for use with tnameserve.
-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying virtual machine.

Stopping the Java IDL Naming Service

To stop the Java IDL naming service, use the relevant operating system command, such as kill. Note that names registered with the Java IDL naming service disappear when the service is terminated.

Sample Client: Adding Objects to the Namespace

The following sample program illustrates how to add names to the namespace. It is a self-contained Naming Service client that creates the following simple tree.

In this example, plans is an object reference and Personal is a naming context that contains two object references: calendar and schedule.

import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClient
{
   public static void main(String args[])
   {
      try {
In the above section, Starting the Java IDL Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.
        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        ORB orb = ORB.init(args, props);
This code obtains the initial naming context and assigns it to ctx. The second line copies ctx into a dummy object reference objref that we'll attach to various names and add into the namespace.

        NamingContext ctx =
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
        NamingContext objref = ctx;
This code creates a name "plans" of type "text" and binds it to our dummy object reference. "plans" is then added under the initial naming context using rebind. The rebind method allows us to run this program over and over again without getting the exceptions we'd get from using bind.
        NameComponent nc1 = new NameComponent("plans", "text");
        NameComponent[] name1 = {nc1};
        ctx.rebind(name1, objref);
        System.out.println("plans rebind sucessful!");
This code creates a naming context called "Personal" of type "directory". The resulting object reference, ctx2, is bound to the name and added under the initial naming context.
        NameComponent nc2 = new NameComponent("Personal", "directory");
        NameComponent[] name2 = {nc2};
        NamingContext ctx2 = ctx.bind_new_context(name2);
        System.out.println("new naming context added..");
The remainder of the code binds the dummy object reference using the names "schedule" and "calendar" under the "Personal" naming context (ctx2).
        NameComponent nc3 = new NameComponent("schedule", "text");
        NameComponent[] name3 = {nc3};
        ctx2.rebind(name3, objref);
        System.out.println("schedule rebind sucessful!");

        NameComponent nc4 = new NameComponent("calender", "text");
        NameComponent[] name4 = {nc4};
        ctx2.rebind(name4, objref);
        System.out.println("calender rebind sucessful!");

    } catch (Exception e) {
        e.printStackTrace(System.err);
    }
  }
}

Sample Client: Browsing the Namespace

The following sample program illustrates how to browse the namespace.

import java.util.Properties;
import org.omg.CORBA.*;
import org.omg.CosNaming.*;

public class NameClientList
{
   public static void main(String args[])
   {
      try {
In the above section, Starting the Java IDL Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.

        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
        ORB orb = ORB.init(args, props);
The following code obtains the intial naming context.
        NamingContext nc =
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
The list method lists the bindings in the naming context. In this case, up to 1000 bindings from the initial naming context will be returned in the BindingListHolder; any remaining bindings are returned in the BindingIteratorHolder.

        BindingListHolder bl = new BindingListHolder();
        BindingIteratorHolder blIt= new BindingIteratorHolder();
        nc.list(1000, bl, blIt);
This code gets the array of bindings out of the returned BindingListHolder. If there are no bindings, the program ends.
        Binding bindings[] = bl.value;
        if (bindings.length == 0) return;
The remainder of the code loops through the bindings and prints the names out.
        for (int i=0; i

  Home

Copyright
© 1996-98 Sun Microsystems, Inc.,
2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights
reserved.


The "Hello World" Example

Java IDL: The "Hello World" Example

This document is a high-level overview of how to create a complete CORBA (Common Object Request Broker Architecture) application using IDL (Interface Definiton Language) to define interfaces and the Java IDL compiler to generate stubs and skeletons. For more information on the development process, and a more detailed tutorial on creating a CORBA application using IDL, link to Getting Started with Java IDL: The Hello World Tutorial. You can also create CORBA application by defining the interfaces in the Java programming language. For more information and a tutorial on this development process, link to Java RMI-IIOP documentation.

Folow the link to Changes is Java IDL between JDK 1.2 and J2SE 1.3 for an explanation of the changes that have occurred in Java IDL between releases.

This document contains:

  • The IDL for a simple "Hello World" program
  • A transient server that creates an object and registers it in a naming context
  • An application client and an applet that know the object's name, retrieve a reference for it from the naming context, and invokes the object
  • An that does the same
  • Instructions for compiling and running the example

Defining the Interface (Hello.idl)

The following example OMG IDL describes a CORBA object whose single sayHello() operation returns a string.

module HelloApp
{
    interface Hello
    {
        string sayHello();
    };
};
NOTE: When writing code in OMG IDL, do not use an interface name as the name of a module. Doing so runs the risk of getting inconsistent results when compiling with tools from different vendors, thereby jeopardizing the code's portability. For example, code containing the same names could be compiled with the IDL to Java compiler from Sun Microsystems and get one result. The same code compiled with another vendor's IDL to Java compiler could produce a different result.

To complete the application, you simply provide the server (HelloServer.java) and client (HelloClient.java or HelloApplet.java) implementations.

Implementing the Server (HelloServer.java)

The example server consists of two classes, the servant and the server. The servant, HelloServant, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloServant instance. The servant is a subclass of _HelloImplBase, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, just the sayHello() method. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the server and the stubs.

The server class has the server's main() method, which:

  • Creates an ORB instance
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Gets a CORBA object reference for a naming context in which to register the new CORBA object
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object

For more discussion of the code, see the detailed tutorial topic Getting Started with Java IDL: Developing a Hello World Server.

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;

class HelloServant extends _HelloImplBase
{
    public String sayHello()
    {
    return "\nHello world !!\n";
    }
}

public class HelloServer {

    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

        // create servant and register it with the ORB
        HelloServant helloRef = new HelloServant();
        orb.connect(helloRef);

        // get the root naming context
        org.omg.CORBA.Object objRef =
        orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);

        // bind the Object Reference in Naming
        //make sure there are no spaces between ""
        NameComponent nc = new NameComponent("Hello", "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, helloRef);

        // wait for invocations from clients
            java.lang.Object sync = new java.lang.Object();
            synchronized (sync) {
                sync.wait();
            }

    } catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
    }
    }
}

Implementing the Client Application (HelloClient.java)

The example application client that follows:

  • Creates an ORB
  • Obtains a reference to the naming context
  • Looks up "Hello" in the naming context and receives a reference to that CORBA object
  • Invokes the object's sayHello() operation and prints the result

For more discussion of the details of the code, link to Getting Started with Java IDL: Developing a Client Application.

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CORBA.*;

public class HelloClient
{
    public static void main(String args[])
    {
    try{
        // create and initialize the ORB
        ORB orb = ORB.init(args, null);

            // get the root naming context
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            // make sure there are no spaces between ""
            NameComponent nc = new NameComponent("Hello", "");
            NameComponent path[] = {nc};
            Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

        // call the Hello server object and print results
        String hello = helloRef.sayHello();
        System.out.println(hello);

    } catch (Exception e) {
        System.out.println("ERROR : " + e) ;
        e.printStackTrace(System.out);
    }
    }
}

Implementing the Applet Client (HelloApplet.java)

The example applet client that follows:

  • Creates an ORB
  • Obtains a reference to the naming context
  • Looks up "Hello" in the naming context and receives a reference to that CORBA object
  • Invokes the object's sayHello() operation and prints the result

For more discussion of the client applet code, link to Getting Started with Java IDL: Developing a Client Applet.

// Copyright and License

import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import java.awt.Graphics;

public class HelloApplet extends java.applet.Applet
{
    public void init() {
    try {
        // create and initialize the ORB
            ORB orb = ORB.init(this, null);

            // get the root naming context
            org.omg.CORBA.Object objRef =
                orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            NameComponent nc = new NameComponent("Hello", "");
            NameComponent path[] = {nc};
            Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

            // call the Hello server object and print results
            message = helloRef.sayHello();

    } catch (Exception e) {
        System.out.println("HelloApplet exception: " + e.getMessage());
        e.printStackTrace(System.out);
        }
    }

    public void paint(Graphics g)
    {
    g.drawString(message, 25, 50);
    }

    String message = "";
}

Once you've written an applet, you need to add it to an HTML page so that you can try it out. You do this by adding an <APPLET> tag to the basic HTML shell. When you have completed this step, you can run your applet using the Applet Viewer or from a J2SE v1.3-enabled Web browser.

The example HTML file, Tutorial.html, would look like this:

<HTML>
<!--Copyright 2000, Sun Microsystems, Inc. -->
<HEAD>
   <TITLE>Getting Started with Java IDL: Running HelloApplet</TITLE>
   <X-SAS-WINDOW TOP=42 BOTTOM=477 LEFT=4 RIGHT=534>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1 ALIGN=CENTER>Running the Hello World Applet</H1>
<HR>

<P>If all goes well, the applet appears below:

<P>
<APPLET CODE=HelloApplet.class
        CODEBASE='enter_the_path_to_your_project_directory_here'
        WIDTH=500
        HEIGHT=300>
<PARAM name="org.omg.CORBA.ORBInitialHost" value=enter_server_machine_name>
<PARAM name="org.omg.CORBA.ORBInitialPort" value=1050>
</APPLET>

</BODY>
</HTML>

Building and Running Hello World

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation. To run this client-server application on your development machine:

When running this example, remember that the default port number is 900. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. The -ORBInitialPort option is used to override the default port number in this example. The following instructions assume you can use port 1050 for the Java IDL name server. You can substitute a different port if necessary. When running these examples on a Windows machine, subtitute a backslash (\) in path names.

  1. Change to the directory that contains the file Hello.idl.

  2. Run the IDL-to-Java compiler, idlj, on the IDL file to create stubs and skeletons.
       idlj -fall  Hello.idl

    You must use the -fall option with the idlj compiler to generate both client and server-side bindings. For more information on the idlj options, link to IDL-to-Java compiler options.

    The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

    _HelloImplBase.java
    This abstract class is the server skeleton, providing basic CORBA functionality for the server. It implements the Hello.java interface. The server class HelloServant extends _HelloImplBase.
    _HelloStub.java
    This class is the client stub, providing CORBA functionality for the client. It implements the Hello.java interface.
    Hello.java
    This interface contains the Java version of our IDL interface. The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality.
    HelloHelper.java
    This final class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.
    HelloHolder.java
    This final class holds a public instance member of type Hello. It provides operations for out and inout arguments, which CORBA allows, but which do not map easily to Java's semantics.
    HelloOperations.java
    This interface contains the single method sayHello(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file, which is shared by both the stubs and skeletons.

  3. Compile the .java files, including the stubs and skeletons (which are in the directory HelloApp):
       javac *.java HelloApp/*.java
  4. Start the Java IDL Name Server. To do this from a UNIX command shell, enter:

         tnameserv -ORBInitialPort 1050&

    From an MS-DOS system prompt (Windows), enter:

         start tnameserv -ORBInitialPort 1050

    Note that 1050 is the port on which you want the name server to run. If you do not specify this, port 900 will be chosen by default. Also note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

  5. Start the Hello server:
       java HelloServer -ORBInitialHost namerserverhost -ORBInitialPort 1050

    Note that nameserverhost is the host on which the IDL name server is running. You can omit -ORBInitialHost nameserverhost if the name server is running on the same host as the Hello server. You can leave out -ORBInitialPort 1050 if the name server is running on the default port.

  6. Run the Hello application client or applet from a different shell than the server:
    • To run the client application,

      1. From another DOS prompt or shell, type:

           java HelloClient  -ORBInitialHost namerserverhost -ORBInitialPort 1050

        Note that nameserverhost is the host on which the IDL name server is running. You can omit -ORBInitialHost nameserverhost if the name server is running on the same host as the Hello client. You can leave out -ORBInitialPort 1050 if the name server is running on the default port.

    • To run the applet from the appletviewer,

      1. Open another prompt or shell.
      2. Change to the applet directory, HelloApp.
      3. Start the appletviewer and browse Tutorial.html by typing:
           appletviewer Tutorial.html

When you have finished this tutorial, be sure to shut down the server, or to kill the server process. From a DOS prompt, select the window that is running the server and enter Ctrl+C. From a Unix shell, find the process, and select Kill. The server will continue to wait for invocations until it is explicitly stopped.

Running the Hello World Application on 2 Machines describes one way of distributing the simple application across two machines - a client and a server.

Home

Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved.


Running The "Hello World" Example on 2 machines

Java IDL: The "Hello World" Example on 2 machines

To enable the Hello World Tutorial to run on two machines, follow the steps as directed in the tutorial, with the following changes. This tutorial was written for the Java (tm) 2 Platform, Standard Edition (J2Se(tm)), version 1.3. In this example, the client, stubs, and skeletons are located on the client machine, and the server and name server are located on the server machine. This scenario can be changed to meet your needs and is provided simply as an introduction to one way this can be accomplished.

  1. Create and compile the Hello.idl file on the client machine as indicated in the tutorial:

   idlj -fall Hello.idl

  2. Create HelloClient.java on the client machine. Compile the .java files, including the stubs and skeletons (which are in the directory HelloApp):
       javac *.java HelloApp/*.java

  3. Create HelloServer.java on the server machine. Compile the .java files:
       javac *.java

  4. Start the Java IDL name server on the server machine. To do this on Unix:
       tnameserv -ORBInitialPort 1050&

    To do this on Windows:

       start tnameserv -ORBInitialPort 1050

    Note that the name server will run on port 1050 if you enter the command as listed. If you want a different nameserverport, replace 1050 with the correct port number.

  5. On the server machine, start the Hello server, as follows:
       java HelloServer  -ORBInitialPort 1050

    If you used a different nameserverport, replace 1050 with the correct port number.

  6. On the client machine, run the Hello application client. From a DOS prompt or shell, type:

       java HelloClient  -ORBInitialHost namerserverhost -ORBInitialPort 1050

    Note that nameserverhost is the host on which the IDL name server is running. In this case, it is the server machine.

    If you used a different nameserverport, replace 1050 with the correct port number.

  7. Kill or stop the server process when finished.


Developing a Client Applet

Getting Started with Java IDL: Developing a Client Applet

This topic introduces the basics of writing a CORBA client applet. An applet is a Java program to be included in HTML pages and executed in Java-enabled browsers. Developing a CORBA client applet is very similar to developing a CORBA client application, except that in the applet the code appears in the init() method rather than in the main() method. You can run the applet from the Applet Viewer or from a Web browser that is compatible with J2SE v1.3. The steps in this lesson are:

  1. Creating the Applet
  2. Understanding the Applet
  3. Compiling and Running the Hello World Applet

To see a completed version of HelloApplet.java, follow the link.

Creating the Applet

To create HelloApplet.java,

  1. Create a file named HelloApplet.java in the main project directory, Hello, using your favorite text editor.

  2. Enter the following code for HelloApplet.java in the text file. The following section, Understanding the Applet, explains each line of code in some detail.

    // The package containing our stubs.
import HelloApp.*;

// HelloClient will use the naming service.
import org.omg.CosNaming.*;

// The package containing special exceptions thrown by the name service.
import org.omg.CosNaming.NamingContextPackage.*;

// All CORBA applications need these classes.
import org.omg.CORBA.*;

// Needed for the applet.
import java.awt.Graphics;

public class HelloApplet extends java.applet.Applet
{
  public void init()
  {
    try{

      // Create and initialize the ORB
      // The applet 'this' is passed to make parameters from the  tag
      // available to initialize the ORB
      ORB orb = ORB.init(this, null);

      // Get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // Resolve the object reference in naming
      NameComponent nc = new NameComponent("Hello", " ");
      NameComponent path[] = {nc};
      Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

      // Call the Hello server object and print the results
      message = helloRef.sayHello();

    } catch(Exception e) {
        System.out.println("HelloApplet exception: " + e);
        e.printStackTrace(System.out);
      }
  }
  String message = " ";

  public void paint(Graphics g)
  {
    g.drawString(message, 25, 50);
  }

}

  3. Save and close HelloApplet.java.

Understanding the Applet

This section explains each line of HelloApplet.java, describing what the code does, as well as why it is needed for this applet.

Performing Basic Setup

The basic shell of a CORBA client applet is the same as most applets: You import required library packages, declare the applet class, define an init() method, and handle exceptions.

Importing Required Packages

The first step to creating the basic shell of the applet is to import the packages required for the client class:

// The package containing our stubs.
import HelloApp.*;

// HelloClient will use the naming service.
import org.omg.CosNaming.*;

// The package containing special exceptions thrown by the name service.
import org.omg.CosNaming.NamingContextPackage.*;

// All CORBA applications need these classes.
import org.omg.CORBA.*;

// Needed for the applet.
import java.awt.Graphics;

Declaring the Applet Class

Next, we declare the applet class:

public class HelloApplet extends java.applet.Applet
{
  // The init() method goes here.
}

Declaring the init() method

Every Java application needs a main method of some type. In an applet, the init method is used instead of the main method. The code you write under the init method overrides the Applet's default method so that it can respond to major events. In this case, the code will describe how the applet should be initialized each time it is loaded or reloaded. Typically, an applet will also include start, stop, and destroy methods.

  public void init()
  {
    // The try-catch block goes here.
  }

Handling CORBA System Exceptions

Because all CORBA programs can throw CORBA system exceptions at runtime, all of the init() functionality is placed within a try-catch block. CORBA programs throw system exceptions whenever trouble occurs during any of the processes (marshaling, unmarshaling, upcall) involved in invocation.

The exception handler prints the name of the exception and its stack trace to standard output (the Java console) so you can see what has gone wrong.

A try-catch block is set up inside init():

    try{

      // The rest of the HelloApplet code goes here.

    } catch(Exception e) {
        System.out.println("HelloApplet exception: " + e);
        e.printStackTrace(System.out);
      }

Creating an ORB Object

A CORBA client needs a local ORB object to perform all of its marshaling and IIOP work. Every client instantiates an org.omg.CORBA.ORB object and initializes it by passing certain information about itself to the ORB.

You declare and initialize an ORB variable inside the try-catch block:

      Properties props = new Properties();
      props.put("org.omg.CORBA.ORBInitialPort", "1050");
      ORB orb = ORB.init(this, props);

The call to the ORB's init() method passes in the applet, allowing you to set certain properties at runtime. Here we have set the ORBInitialPort property to 1050 so that it connects properly to the HelloServer.

Finding the Hello Server

Now that the applet has an ORB, it can ask the ORB to locate the actual service it needs, in this case the Hello server. There are a number of ways for a CORBA client to get an initial object reference; your client applet will use the COS Naming Service specified by OMG and provided with Java IDL.

Obtaining the Initial Naming Context

The first step in using the naming service is to get the initial naming context. In the try-catch block, below your ORB initialization, you call orb.resolve_initial_references() to get an object reference to the name service:

      org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");

The string "NameService" is defined for all CORBA ORBs. When you pass in that string, the ORB returns a naming context object that is an object reference to the name service.

Narrowing the Object Reference

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContext object, you must narrow it to its proper type. The call to narrow() is added just below the previous statement.

      NamingContext ncRef = NamingContextHelper.narrow(objRef);

Here you see the use of an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContext, and you can use it to access the naming service and find other services.

Finding a Service in Naming

Names can have different structures depending upon the implementation of the naming service. Consequently, CORBA name servers handle complex names by way of NameComponent objects. Each NameComponent holds a single part, or element, of the object's full name. An array of NameComponent objects can hold a fully-qualified path to an object on any computer file or disk system.

To find the Hello server, you first need a NameComponent to hold an identifying string for it. This code is found directly below the call to narrow().

      NameComponent nc = new NameComponent("Hello", " ");

This statement sets the id field of nc to "Hello" and the kind field to the empty string.

Because the path to the Hello object has just one element, create a single-element array out of nc. The NamingContext.resolve() method requires this array for its work:

      NameComponent path[] = {nc};

The NameComponent array is passed to the naming service's resolve() method to get an object reference to the Hello server and narrow it to a Hello object:

      Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

Here you see the HelloHelper class at work. The resolve() method returns a generic CORBA object as you saw above when locating the name service itself. Therefore, you immediately narrow it to a Hello object, which is the object reference you need to perform the rest of your work.

Invoking the sayHello() Operation

CORBA invocations look like a method call on a local object. The complications of marshaling parameters to the wire, routing them to the server-side ORB, unmarshaling, and placing the upcall to the server method are completely transparent to the client programmer. Because so much is done for you by the generated code, invocation is really the easiest part of CORBA programming.

      message = helloRef.sayHello();

Finally, print the results of the invocation. This code is placed outside your init() method, but within the HelloApplet class:

String message = " ";

public void paint(Graphics g)
{
  g.drawString(message, 25, 50);
}

Compiling and Running the Hello World Applet

To run the Hello World applet, you first need to compile the applet file and generate the Applet subclass, then call the subclass within an HTML file using an <APPLET> tag.

Compiling the Client Applet

  1. Open a DOS prompt or terminal window. Change to the directory where the HelloApplet.java file resides.

  2. Run the Java compiler on HelloApplet.java:
    javac HelloApplet.java
  3. Correct any errors in your file and recompile if necessary. (You can copy the file from HelloApplet.java if you have trouble finding your typographical errors).

    The generated file HelloApplet.class can be found in your project directory.

Setting Up the HTML File

Once you've written an applet, you need to add it to an HTML page so that you can try it out. You do this by adding an <APPLET> tag to the basic HTML shell. When you have completed this step, you can run your applet using the Applet Viewer or from a J2SE v1.3-enabled Web browser.

This section describes how to create the basic HTML file and add the APPLET tag to it.

  1. Create a file named Tutorial.html using your favorite text editor in your project directory, Hello.

  2. Enter the following HTML code to Tutorial.html, or paste it from Tutorial.html:

    <HTML>
<!--Copyright 2000, Sun Microsystems, Inc. -->
<HEAD>
   <TITLE>Getting Started with Java IDL: Running HelloApplet</TITLE>
   <X-SAS-WINDOW TOP=42 BOTTOM=477 LEFT=4 RIGHT=534>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1 ALIGN=CENTER>Running the Hello World Applet</H1>
<HR>

<P>If all goes well, the applet appears below:

<P>
<APPLET CODE=HelloApplet.class
        CODEBASE='enter_the_path_to_your_project_directory_here'
        WIDTH=500
        HEIGHT=300>
<PARAM name="org.omg.CORBA.ORBInitialHost" value=enter_server_machine_name>
<PARAM name="org.omg.CORBA.ORBInitialPort" value=1050>
</APPLET>

</BODY>
</HTML>

  3. Save the file and exit the editor.

The simplest form of the APPLET tag tells the browser to load the applet whose Applet subclass is name HelloApplet.class. When a Java-enabled browser encounters an <APPLET> tage, it reserves a display area of the specified WIDTH and HEIGHT, loads the bytecode for the specifiec Applet subclass, creates an instance of the subclass, and then calls the instances init method.

This applet includes PARAM tags, which let you customize the applet's configuration with parameters. In the first PARAM tag, the value for ORBInitialHost is the name of the machine where the CORBA name server runs. In this example, this will most likely be your local machine name. In the second PARAM tag, the value of ORBInitialPort is the one you are using to run the name server. This value was defined as 1050 earlier in this tutorial.

By default, a browser looks for an applet's class files in the same directory as the HTML file that has the <APPLET> tag. We could use the CODEBASE attribute to tell the browser in which directory the the applet's files are located. If the applet's files and the HTML file are in the same directory, as they may be in this example, you can eliminate this attribute.

Running the Applet

Now that you have the applet code and the HTML file that loads the applet, you are ready to run your applet. For information on how to do this, link to Running the Hello World Applet.

Troubleshooting

If you are having trouble running the applet inside your Java-enabled Web browser, make sure you have the JavaTM 2 Runtime Environment, Standard Edition, version 1.3.0, which includes the JavaTM Plug-in 1.3. This can be downloaded from http://java.sun.com/products/plugi n/index.html. Instructions for plugging it into your Web browser are available there as well.

On of the error messages indicative of this situation is security violation: method verification error.

For More Information

Developing Clients
Covers topics of interest to CORBA client programmers
Exceptions: System Exceptions
Explains how CORBA system exceptions work and provides details on the minor codes of Java IDL's system exceptions
Initialization: System Properties
Explains what properties can be passed to the ORB at initialization
Naming Service
Covers the COS Naming Service in greater detail

Previous lesson: Developing a Client Application
Next lesson: Developing the Hello World Server
Tutorial home | HelloApplet.java
Tutorial.html
Home

Copyright © 1996, 1997, 2000 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Developing a Client Application

Getting Started with Java IDL: Developing a Client Application

This topic introduces the basics of writing a CORBA client application. To create a CORBA client applet, follow the link. Included in this lesson are:

  1. Creating HelloClient.java
  2. Understanding HelloClient.java
  3. Compiling HelloClient.java

To see a completed version of HelloClient.java, follow the link.

Creating HelloClient.java

To create HelloClient.java,

  1. Start your text editor and create a file named HelloClient.java in your main project directory, Hello.

  2. Enter the following code for HelloClient.java in the text file. The following section, Understanding HelloClient.java, explains each line of code in some detail.

    import HelloApp.*;           // The package containing our stubs.
import org.omg.CosNaming.*;  // HelloClient will use the naming service.
import org.omg.CORBA.*;      // All CORBA applications need these classes.

public class HelloClient
{
  public static void main(String args[])
  {
    try{

      // Create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // Get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // Resolve the object reference in naming
      // make sure there are no spaces between ""
      NameComponent nc = new NameComponent("Hello", "");
      NameComponent path[] = {nc};
      Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

      // Call the Hello server object and print results
      String Hello = helloRef.sayHello();
      System.out.println(Hello);

    } catch(Exception e) {
        System.out.println("ERROR : " + e);
        e.printStackTrace(System.out);
      }
  }
}

  3. Save and close HelloClient.java.

Understanding HelloClient.java

This section explains each line of HelloClient.java, describing what the code does, as well as why it is needed for this application.

Performing Basic Setup

The basic shell of a CORBA client is the same as many Java applications: You import required library packages, declare the application class, define a main method, and handle exceptions.

Importing Required Packages

First, we import the packages required for the client class:

import HelloApp.*;           // The package containing our stubs.
import org.omg.CosNaming.*;  // HelloClient will use the naming service.
import org.omg.CORBA.*;      // All CORBA applications need these classes.

Declaring the Client Class

The next step is to declare the client class:

public class HelloClient
{
  // The main() method goes here.
}

Defining a main() Method

Every Java application needs a main() method. It is declared within the scope of the HelloClient class, as follows:

  public static void main(String args[])
  {
    // The try-catch block goes here.
  }

Handling CORBA System Exceptions

Because all CORBA programs can throw CORBA system exceptions at runtime, all of the main() functionality is placed within a try-catch block. CORBA programs throw system exceptions whenever trouble occurs during any of the processes (marshaling, unmarshaling, upcall) involved in invocation.

Our exception handler simply prints the name of the exception and its stack trace to standard output so you can see what kind of thing has gone wrong.

The try-catch block is set up inside main(),

    try{

      // Add the rest of the HelloClient code here.

    } catch(Exception e) {
        System.out.println("ERROR : " + e);
        e.printStackTrace(System.out);
      }

Creating an ORB Object

A CORBA client needs a local ORB object to perform all of its marshaling and IIOP work. Every client instantiates an org.omg.CORBA.ORB object and initializes it by passing to the object certain information about itself.

The ORB variable is declared and initialized inside the try-catch block.

      ORB orb = ORB.init(args, null);

The call to the ORB's init() method passes in your application's command line arguments, allowing you to set certain properties at runtime.

Finding the Hello Server

Now that the application has an ORB, it can ask the ORB to locate the actual service it needs, in this case the Hello server. There are a number of ways for a CORBA client to get an initial object reference; our client application will use the COS Naming Service specified by OMG and provided with Java IDL. See Using Stringified Object References for information on how to get an initial object reference when there is no naming service available.

Obtaining the Initial Naming Context

The first step in using the naming service is to get the initial naming context. In the try-catch block, below your ORB initialization, you call orb.resolve_initial_references() to get an object reference to the name server:

      org.omg.CORBA.Object objRef =
            orb.resolve_initial_references("NameService");

The string "NameService" is defined for all CORBA ORBs. When you pass in that string, the ORB returns the initial naming context, an object reference to the name service.

Narrowing the Object Reference

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContext object, you must narrow it to its proper type.

      NamingContext ncRef = NamingContextHelper.narrow(objRef);

Here we see the use of an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContext and you can use it to access the naming service and find other services. You will do that in the next step.

Finding a Service in Naming

Names can have different structures depending upon the implementation of the naming service. Consequently, CORBA name servers handle complex names by way of NameComponent objects. Each NameComponent holds a single part, or element, of the name. An array of NameComponent objects can hold a fully specified path to an object on any computer file or disk system.

To find the Hello server, you first need a NameComponent to hold an identifying string for the Hello server.

      NameComponent nc = new NameComponent("Hello", "");

This statement sets the id field of nc to "Hello" and the kind field to an empty string. Be sure this is an empty string, do not enter a space between "".

Because the path to the Hello object has just one element, we have created a single-element array out of nc. The NamingContext.resolve() method requires this array for its work:

      NameComponent path[] = {nc};

Finally, we pass path to the naming service's resolve() method to get an object reference to the Hello server and narrow it to a Hello object:

      Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));

Here you see the HelloHelper helper class at work. The resolve() method returns a generic CORBA object as you saw above when locating the name service itself. Therefore, you immediately narrow it to a Hello object, which is the object reference you need to perform the rest of your work.

Invoking the sayHello() Operation

CORBA invocations look like a method call on a local object. The complications of marshaling parameters to the wire, routing them to the server-side ORB, unmarshaling, and placing the upcall to the server method are completely transparent to the client programmer. Because so much is done for you by generated code, invocation is really the easiest part of CORBA programming.

      String Hello = helloRef.sayHello();

Finally, we print the results of the invocation to standard output:

      System.out.println(Hello);

Compiling HelloClient.java

Now we will compile HelloClient.java so that we can correct any errors before continuing with this tutorial.

Windows users note that you should substitute backslashes (\) for the slashes (/) in all paths in this document.

To compile HelloClient.java,

  1. Change to the Hello directory.

  2. Run the Java compiler on HelloClient.java:
    javac HelloClient.java HelloApp/*.java
  3. Correct any errors in your file and recompile if necessary. (You can copy the file from HelloClient.java if you have trouble finding your typographical errors).

  4. The HelloClient.class is generated to the Hello directory.

Running the Client Application

We need to create and compile the Hello server before we can successfully run the Hello client application. Running the Hello World application is covered in Running the Hello World Application.

For More Information

Developing Clients
Covers topics of interest to CORBA client programmers
Exceptions: System Exceptions
Explains how CORBA system exceptions work and provides details on the minor codes of Java IDL's system exceptions
Initialization: System Properties
Explains what properties can be passed to the ORB at initialization
Naming Service
Covers the COS Naming Service in greater detail

Previous: Writing the IDL interface
Next: Developing a Client Applet or Next: Developing the Hello World Server
Tutorial home: Getting Started with Java IDL | HelloClient.java
Home

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Developing the Hello World Server

Getting Started with Java IDL: Developing the Hello World Server

The example server consists of two classes, the servant and the server. The servant, HelloServant, is the implementation of the Hello IDL interface; each Hello instance is implemented by a HelloServant instance. The servant is a subclass of _HelloImplBase, which is generated by the idlj compiler from the example IDL. The servant contains one method for each IDL operation, in this example, just the sayHello() method. Servant methods are just like ordinary Java methods; the extra code to deal with the ORB, with marshaling arguments and results, and so on, is provided by the server and the stubs.

The server class has the server's main() method, which:

  • Creates an ORB instance
  • Creates a servant instance (the implementation of one CORBA Hello object) and tells the ORB about it
  • Gets a CORBA object reference for a naming context in which to register the new CORBA object
  • Registers the new object in the naming context under the name "Hello"
  • Waits for invocations of the new object

This lesson introduces the basics of writing a CORBA transient server. The steps in this topic cover:

  1. Creating HelloServer.java
  2. Understanding HelloServer.java
  3. Compiling the Hello World Server

To see the complete version of HelloServer.java, follow the link.

Creating HelloServer.java

To create HelloServer.java,

  1. Start your text editor and create a file named HelloServer.java in your main project directory, Hello.

  2. Enter the following code for HelloServer.java in the text file. The following section, Understanding HelloServer.java, explains each line of code in some detail.

    // The package containing our stubs.
import HelloApp.*;

// HelloServer will use the naming service.
import org.omg.CosNaming.*;

// The package containing special exceptions thrown by the name service.
import org.omg.CosNaming.NamingContextPackage.*;

// All CORBA applications need these classes.
import org.omg.CORBA.*;

public class HelloServer
{
  public static void main(String args[])
  {
    try{

      // Create and initialize the ORB
      ORB orb = ORB.init(args, null);

      // Create the servant and register it with the ORB
      HelloServant helloRef = new HelloServant();
      orb.connect(helloRef);

      // Get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // Bind the object reference in naming
      // Make sure there are no spaces between ""
      NameComponent nc = new NameComponent("Hello", "");
      NameComponent path[] = {nc};
      ncRef.rebind(path, helloRef);

      // Wait for invocations from clients
      java.lang.Object sync = new java.lang.Object();
      synchronized(sync){
        sync.wait();
      }

    } catch(Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }
  }
}

class HelloServant extends _HelloImplBase
{
  public String sayHello()
  {
    return "\nHello world!!\n";

  }
}

  3. Save and close HelloServer.java.

Understanding HelloServer.java

This section explains each line of HelloServer.java, describing what the code does, as well as why it is needed for this application.

Performing Basic Setup

The structure of a CORBA server program is the same as most Java applications: You import required library packages, declare the server class, define a main() method, and handle exceptions.

Importing Required Packages

First, we import the packages required for the server class:

// The package containing our stubs.
import HelloApp.*;

// HelloServer will use the naming service.
import org.omg.CosNaming.*;

// The package containing special exceptions thrown by the name service.
import org.omg.CosNaming.NamingContextPackage.*;

// All CORBA applications need these classes.
import org.omg.CORBA.*;

Declaring the Server Class

The next step is to declare the server class:

public class HelloServer
{
  // The main() method goes here.
}

Defining the main() Method

Every Java application needs a main method. It is declared within the scope of the HelloServer class:

  public static void main(String args[])
  {
    // The try-catch block goes here.
  }

Handling CORBA System Exceptions

Because all CORBA programs can throw CORBA system exceptions at runtime, all of the main() functionality is placed within a try-catch block. CORBA programs throw runtime exceptions whenever trouble occurs during any of the processes (marshaling, unmarshaling, upcall) involved in invocation. The exception handler simply prints the exception and its stack trace to standard output so you can see what kind of thing has gone wrong.

The try-catch block is set up inside main(), as shown:

    try{

      // The rest of the HelloServer code goes here.

    } catch(Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }

Creating an ORB Object

Just like in the client application, a CORBA server also needs a local ORB object. Every server instantiates an ORB and registers its servant objects so that the ORB can find the server when it receives an invocation for it.

The ORB variable is declared and initialized inside the try-catch block.

      ORB orb = ORB.init(args, null);

The call to the ORB's init() method passes in the server's command line arguments, allowing you to set certain properties at runtime.

Managing the Servant Object

A server is a process that instantiates one or more servant objects. The servant implements the interface generated by idlj and actually performs the work of the operations on that interface. Our HelloServer needs a HelloServant.

Instantiating the Servant Object

We instantiate the servant object inside the try-catch block, just below the call to init(), as shown:

      HelloServant helloRef = new HelloServant();

The section of code describing the servant class will be explained in a later step.

The next step is to connect the servant to the ORB, so that the ORB can recognize invocations on it and pass them along to the correct servant:

      orb.connect(helloRef);

Defining the Servant Class

At the end of HelloServer.java, outside the HelloServer class, we define the class for the servant object.

class HelloServant extends _HelloImplBase
{
  // The sayHello() method goes here.
}

The servant is a subclass of _HelloImplBase so that it inherits the general CORBA functionality generated for it by the compiler.

Next, we declare the required sayHello() method:

  public String sayHello()
  {
    // The method implementation goes here.
  }

The sayHello() implementation looks like this:

    return "\nHello world!!\n";

Working with COS Naming

The HelloServer works with the naming service to make the servant object's operations available to clients. The server needs an object reference to the name service, so that it can register itself and ensure that invocations on the Hello interface are routed to its servant object.

Obtaining the Initial Naming Context

In the try-catch block, below instantiation of the servant, we call orb.resolve_initial_references() to get an object reference to the name server:

      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");

The string "NameService" is defined for all CORBA ORBs. When you pass in that string, the ORB returns a naming context object that is an object reference for the name service.

Narrowing the Object Reference

As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContext object, you must narrow it to its proper type. The call to narrow() is just below the previous statement:

      NamingContext ncRef = NamingContextHelper.narrow(objRef);

Here you see the use of an idlj-generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContext and you can use it to access the naming service and register the server, as shown in the next topic.

Registering the Servant with the Name Server

Just below the call to narrow(), we create a new NameComponent member:

      NameComponent nc = new NameComponent("Hello", "");

This statement sets the id field of nc to "Hello" and the kind component to the empty string. Make sure there are no spaces between the "".

Because the path to the Hello has a single element, we create the single-element array that NamingContext.resolve requires for its work:

      NameComponent path[] = {nc};

Finally, we pass path and the servant object to the naming service, binding the servant object to the "Hello" id:

      ncRef.rebind(path, helloRef);

Now, when the client calls resolve("Hello") on the initial naming context, the naming service returns an object reference to the Hello servant.

Waiting for Invocation

The previous sections describe the code that makes the server ready; the next section explains the code that enables it to simply wait around for a client to request its service. The following code, which is at the end of (but within) the try-catch block, shows how to accomplish this.

      java.lang.Object sync = new java.lang.Object();
      synchronized(sync){
        sync.wait();
      }

This form of Object.wait() requires HelloServer to remain alive (though quiescent) until an invocation comes from the ORB. Because of its placement in main(), after an invocation completes and sayHello() returns, the server will wait again.

Compiling the Hello World Server

Now we will compile the HelloServer.java so that we can correct any error before continuing with this tutorial.

Windows users note that you should substitute backslashes (\) for the slashes (/) in all paths in this document.

To compile HelloServer.java,

  1. Change to the Hello directory.

  2. Run the Java compiler on HelloServer.java:
    javac HelloServer.java HelloApp/*.java
  3. Correct any errors in your file and recompile if necessary. (You can copy the file from HelloServer.java, if you have trouble finding your typographical errors).

  4. The files HelloServer.class and HelloServant.class are generated in the Hello directory.

Running the Hello World Server

The next section describes Running the Hello World Application.

For More Information

Exceptions: System Exceptions
Explains how CORBA system exceptions work and provides details on the minor codes of Java IDL's system exceptions
Developing Servers
Covers topics of interest to CORBA server programmers
Naming Service
Covers the COS Naming Service in greater detail

Previous:Developing a Client Application or Developing a Client Applet
Next: Running the Hello World Application
Tutorial home | HelloServer.java
Home

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Getting Started with Java IDL: Running the Hello World Application

This topic walks you through running the server and client program that together make up the "Hello World" application or applet.

Running the Hello World Application

Despite its simple design, the Hello World program lets you learn and experiment with all the tasks required to develop almost any CORBA program that uses static invocation. To run this client-server application on your development machine:

  1. Start the Java IDL Name Server. To do this from a UNIX command shell, enter:

         tnameserv -ORBInitialPort nameserverport

    From an MS-DOS system prompt (Windows), enter:

         start tnameserv -ORBInitialPort nameserverport

    Note that nameserverport is the port on which you want the name server to run. If you do not specify this, port 900 will be chosen by default. Also note that using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

  2. From a second prompt or shell, start the Hello server:
    java HelloServer -ORBInitialHost namerserverhost -ORBInitialPort nameserverport

    Note that nameserverhost is the host on which the IDL name server is running. You can omit -ORBInitialHost nameserverhost if the name server is running on the same host as the Hello server. You can leave out -ORBInitialPort nameserverport if the name server is running on the default port.

  3. From a third prompt or shell, run the Hello application client:

    java HelloClient  -ORBInitialHost namerserverhost -ORBInitialPort nameserverport

    Note that nameserverhost is the host on which the IDL name server is running. You can omit -ORBInitialHost nameserverhost if the name server is running on the same host as the Hello client. You can leave out -ORBInitialPort nameserverport if the name server is running on the default port.

  4. The client prints the string from the server to the command line:
    Hello world!!

The name server and the Hello World server, like many CORBA servers, run until you explicitly stop them. To avoid having many servers running, kill the server processes after the client application returns successfully.

Running the Hello World Applet

You can run the applet from either a Java-enabled Web browser or from the Applet Viewer. In either case, you must run the Name Server and the HelloServer prior to invoking the applet. To run the applet,

  1. From an MS-DOS system prompt (Windows) or command shell (UNIX), start the Java IDL name server:
         tnameserv -ORBInitialPort 1050 &

    In this example, the nameserverport, which is the port on which you want the name server to run, is set to 1050. If you do not specify this, port 900 will be chosen by default. Also note that using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

  2. From a second prompt or shell, start the Hello server:
    java HelloServer -ORBInitialHost namerserverhost -ORBInitialPort 1050 &

    Note that nameserverhost is the host on which the IDL name server is running. You can omit -ORBInitialHost nameserverhost if the name server is running on the same host as the Hello server. In this example, the ORBInitialPort, which is the port on which you want the name server to run, is set to 1050. If you do not specify this, port 900 will be chosen by default. Also note that using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.

  3. Run the applet.

    To run the applet from the appletviewer,

    1. Open another prompt or shell.
    2. Change to the applet directory, Hello.
    3. Start the appletviewer and browse Tutorial.html by typing:
      appletviewer Tutorial.html

      Hello world!! prints to the appletviewer frame.

    To run the applet from a Web browser,

    1. Open the Web browser.
    2. Open the file Tutorial.html.

      Hello world!! prints in the browser frame.

If the applet does not run in the Web browser, make sure you have the Java 2 Runtime Environment, Standard Edition, version 1.3.0, which includes the Java Plugin 1.3. This plugin is needed to run the applet and may not be present in older Web browsers.

The name server and the Hello World server, like many CORBA servers, run until you explicitly stop them. To avoid having many servers running, kill the server processes after the client application returns successfully.

Troubleshooting

Security violation: method verification error

Make sure you have the Java 2 Runtime Environment, Standard Edition, version 1.3.0, which includes the Java Plugin 1.3. This plugin is needed to run the applet and may not be present in older Web browsers. It can be downloaded from http://java.sun.com/products/plugin/index.html.

Specifying ORB Initial Port

The default ORB Initial Port is port 900. If you prefer, you can omit the port specifications if you start the name server on port 900. Using Solaris software, you must become root to start a process on a port under 1024. Remember to exit from root access before continuing with the tutorial if you choose this port for your name server.

Previous: Developing the Client Application
Previous: Developing the Client Applet
Next: Using Stringified Object References
Home
Copyright © 1996-2000 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Using Stringified Object References

Getting Started with Java IDL: Using Stringified Object References

To invoke an operation on a CORBA object, a client application needs a reference to the object. You can get such references in a number of ways, such as calling ORB.resolve_initial_references() or using another CORBA object (like the name service). In previous sections of this tutorial, you used both of these methods to get an initial object reference.

Often, however, there is no naming service available in the distributed environment. In that situation, CORBA clients use a stringified object reference to find their first object.

In this lesson, you will learn how to create a stringified object reference as a part of the server startup, and how the client gets that reference and destringifies it for use as a real object reference.

The steps in this lesson are:

  1. Making a Stringified Object Reference
  2. Getting a Stringified Object Reference
  3. Destringifying the Object Reference
  4. Compiling and Running a Stringified Hello World

To see completed versions of the source code, follow the links to HelloServer.java and HelloClient.java.

Making a Stringified Object Reference

For a stringified object reference to be available to the client, the server must create it and store it somewhere that the client can access. Your reference will be written to disk in the form of a text file.
  1. Create a new directory at the same level as the Hello directory named HelloString. Copy Hello.idl to this directory.

  2. Copy HelloServer.java from the Hello directory to the HelloString directory. Name it HelloServerString.java, and make the following changes in this file.

  3. Because the new server will write a file to disk, you need to add an import statement. Add the following:
    import java.io.*; // needed for output to the file system.
  4. The new server won't use the naming service, so you don't need the CosNaming packages. Delete these lines from the code:
    import org.omg.CosNaming.*;                       // not needed for stringified version
import org.omg.CosNaming.NamingContextPackage.*;  // remove from code
  5. Delete the code that gets the initial naming context and resolves the reference to a Hello object:
          // Get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // Bind the object reference in naming
      NameComponent nc = new NameComponent("Hello", " ");
      NameComponent path[] = {nc};
      ncRef.rebind(path, helloRef);
  6. Call the ORB's object_to_string() method and pass it the reference to the servant object. This returns the object reference in a string form that can be saved in a file on disk.
          String ior = orb.object_to_string(helloRef);
  7. Build the path to the file that will be stored, using system properties to determine the path structure and syntax.
          String filename = System.getProperty("user.home")+
            System.getProperty("file.separator")+"HelloIOR";
  8. Use standard Java operations to write the stringified ior to disk:
          FileOutputStream fos = new FileOutputStream(filename);
      PrintStream ps = new PrintStream(fos);
      ps.print(ior);
      ps.close();
  9. Save and close HelloServerString.java.
When HelloServerString runs, instead of calling the ORB and registering the servant object with naming, it creates the text file HelloIOR containing a stringified reference to the servant. The file is stored in your home directory.

Getting a Stringified Object Reference

Note to Windows users: You should substitute backslashes (\) for the slashes (/) in all paths in this document.

  1. Copy HelloClient.java from the Hello directory to the HelloString directory. Name it HelloClientString.java, and make the following changes in this file.

  2. Because the new client will read a file from the disk, you need to change the import statements. Add the following:
    import java.io.*; // needed for input from the file system.
  3. The new client won't use the naming service, so you don't need the CosNaming package. Delete this line from the code:
    import org.omg.CosNaming;*  // not needed for stringified version
  4. Delete the code that gets the initial naming context and registers the servant with the naming service:
          // Get the root naming context
      org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
      NamingContext ncRef = NamingContextHelper.narrow(objRef);

      // Resolve the object reference in naming
      NameComponent nc = new NameComponent("Hello", " ");
      NameComponent path[] = {nc};
      Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));
  5. Use standard Java operations to read the file that has the object reference. Note that client and server programs must know the name of the file and where it is stored.
          String filename = System.getProperty("user.home")+
            System.getProperty("file.separator")+"HelloIOR";
      FileInputStream fis = new FileInputStream(filename);
      DataInputStream dis = new DataInputStream(fis);
      String ior = dis.readLine();

The HelloClientString application now has a String object containing the stringified object reference.

Destringifying the Object Reference

To destringify the object reference in ior, call the standard ORB method:

      org.omg.CORBA.Object obj = orb.string_to_object(ior);

Finally, narrow the CORBA object to its proper type, so that the client can invoke on it:

      Hello helloRef = HelloHelper.narrow(obj);
The rest of the client code stays the same. Save and close HelloClientString.java.

Compiling and Running a Stringified Hello World

Compiling and running the new version of Hello World requires most of the same steps as for the naming service version.

Compiling Hello World

  1. Change to the HelloString directory.

  2. Compile the IDL file. Enter the compiler command:

    idlj -fall Hello.idl
  3. Run the Java compiler on your source code:
    javac *.java
  4. Correct any errors in your files and recompile if necessary. (You can copy the files from HelloServer.java and HelloClient.java if you have trouble finding any typographical errors.)

HelloServerString.class, HelloServantString.class, and HelloClientString.class are generated to the HelloString directory.

Running Hello World

To be certain that you are running your own server, check that all Hello server and name server processes have been stopped. Stop them if they are running.

  1. From an MS-DOS system prompt (Windows) or command shell (UNIX), start the Hello server with the stringified object reference:
    java HelloServerString -ORBInitialPort 1050 &

  2. From another prompt or shell, run the Hello application client with the stringified object reference:

    java HelloClientString  -ORBInitialPort 1050 &

  3. The client prints the string from the server to the command line:
    Hello world!!

For More Information
Initialization: Obtaining Initial Object References
Explains the various ways of getting an initial object reference

Developing the Hello World Server

Developing the Client Application
Tutorial home | HelloClient.java | HelloServer.java
Home

Copyright © 1996, 1997, 2000 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Writing the IDL file

Writing the Interface Definition Language (IDL) file

Note: All command and troubleshooting instructions apply to Java 2 SDK v1.3.0 and its version of idlj only.

Before you start working with Java IDL, you need to install version 1.3 of the Java 2 SDK. J2SDK v1.3.0 provides the Application Programming Interface (API) and Object Request Broker (ORB) needed to enable CORBA-based distributed object interaction, as well as the idlj compiler. The idlj compiler uses the IDL-to-Java mapping to convert IDL interface definitions to corresponding Java interfaces, classes, and methods, which you can then use to implement your client and server code.

This section teaches you how to write a simple IDL interface definition and how to translate the IDL interface to Java. It also describes the purpose of each file generated by the idlj compiler.

These topics are included in this section:

  1. Writing Hello.idl
  2. Understanding the IDL file
  3. Mapping Hello.idl to Java
  4. Understanding the idlj Compiler Output

Writing Hello.idl

 To create the Hello.idl file,
  1. Create a new directory, named Hello, for this application.

  2. Start your favorite text editor and create a file named Hello.idl in this directory.

  3. In your file, enter the code for the interface definition:
    module HelloApp
{
  interface Hello
  {
    string sayHello();
  };
};
  4. Save the file.

Understanding the IDL file

OMG IDL is a purely declarative language designed for specifying programming-language-independent operational interfaces for distributed applications. OMG specifies a mapping from IDL to several different programming languages, including C, C++, Smalltalk, COBOL, Ada, and Java. When mapped, each statement in OMG IDL is translated to a corresponding statement in the programming language of choice. You can use the tool idlj to map an IDL interface to Java and implement the client class. When you map the same IDL to C++ and implement the server in that language, the Java client and C++ server interoperate through the ORB as though they were written in the same language.

The IDL for Hello World is extremely simple; its single interface has a single operation. You need perform only three steps:

  1. Declare the CORBA IDL module
  2. Declare the interface
  3. Declare the operations

Declaring the CORBA IDL Module

A CORBA module is a namespace that acts as a container for related interfaces and declarations. It corresponds closely to a Java package. Each module statement in an IDL file is mapped to a Java package statement.

The module statement looks like this:

module HelloApp
{
    // Subsequent lines of code here.
};

When you compile the IDL, the module statement will generate a package statement in the Java code.

Declaring the Interface

Like Java interfaces, CORBA interfaces declare the API contract an object has with other objects. Each interface statement in the IDL maps to a Java interface statement when mapped.

In your Hello.idl file, the interface statement looks like this:

module HelloApp
{
  interface Hello  // These
  {                // are the
                   // interface
  };               // statement.
};

When you compile the IDL, this statement will generate an interface statement in the Java code. Your client and server classes will implement the Hello interface in different ways.

Declaring the Operations

CORBA operations are the behavior that servers promise to perform on behalf of clients that invoke them. Each operation statement in the IDL generates a corresponding method statement in the generated Java interface.

In your Hello.idl file, the operation statement looks like this:

module HelloApp
{
  interface Hello
  {
    string sayHello();  // This line is the operation statement.
  };
};
Our little Hello World application has only a single operation, so Hello.idl is now complete.

Mapping Hello.idl to Java

The tool idlj reads OMG IDL files and creates the required Java files. The idlj compiler defaults to generating only the client-side bindings. If you need both client-side bindings and server-side skeletons (as you do for our Hello World program), you must use the -fall option when running the idlj compiler. For more information on the IDL-to-Java compiler options, follow the link.

  1. Go to a command line prompt.

  2. Change to the directory containing your Hello.idl file.

  3. Enter the compiler command:

    idlj -fall Hello.idl

If you list the contents of the directory, you will see that a directory called HelloApp has been created and that it contains six files. Open Hello.java in your text editor. Hello.java is the signature interface and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces. It looks like this:

package HelloApp;

/**
* HelloApp/Hello.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
*/

public interface Hello extends HelloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface Hello

With an interface this simple, it is easy to see how the IDL statements map to the generated Java statements.

IDL Statement | Java Statement
module HelloApp | package HelloApp;
interface Hello | public interface Hello

The single surprising item is the extends statement. All CORBA objects are derived from org.omg.CORBA.Object to ensure required CORBA functionality. The required code is generated by idlj; you do not need to do any mapping yourself.

In previous versions of the idlj compiler (known as idltojava), the operations defined on the IDL interface would exist in this file as well. Starting with J2SDK v1.3.0, the IDL-to-Java mapping puts all of the operations defined on the IDL interface in the operations interface, HelloOperations.java. The operations interface is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and servers. For Hello.idl, this file looks like this:

package HelloApp;

/**
* HelloApp/HelloOperations.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from Hello.idl
*/

public interface HelloOperations
{
  String sayHello ();
} // interface HelloOperations

Because there is only one operation defined in this interface, it is easy to see how the IDL statements map to the generated Java statements.

IDL Statement | Java Statement
string sayHello(); | String sayHello();

Understanding the idlj Compiler Output

The idlj compiler generates a number of files. The actual number of files generated depends on the options selected when the IDL file is compiled. The generated files provide standard functionality, so you can ignore them until it is time to deploy and run your program. The files generated by the idlj compiler for Hello.idl, with the -fall command line option, are:

_HelloImplBase.java
This abstract class is the server skeleton, providing basic CORBA functionality for the server. It implements the Hello.java interface. The server class HelloServant extends _HelloImplBase.
_HelloStub.java
This class is the client stub, providing CORBA functionality for the client. It implements the Hello.java interface.
Hello.java
This signature interface contains the Java version of our IDL interface. The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality. It also extends IDLEntity, and is used as the signature type in method declarations when interfaces of the specified type are used in other interfaces.
HelloHelper.java
This final class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.
HelloHolder.java
This final class holds a public instance member of type Hello. It provides operations for out and inout arguments, which CORBA allows, but which do not map easily to Java's semantics.
HelloOperations.java
This operations interface contains the single method sayHello(). The IDL-to-Java mapping puts all of the operations defined on the IDL interface into this file. The operations interface is used in the server-side mapping and as a mechanism for providing optimized calls for co-located clients and servers.

When you write the IDL interface, you do all the programming required to generate all these files for your distributed application. The next steps are to implement the client and server classes. In the steps that follow, you will create HelloClient.java and HelloApplet.java client classes and the HelloServer.java class.

Troubleshooting

  • Error Message: "idlj" not found

    If you try to run idlj on the file Hello.idl and the system cannot find idlj, it is most likely not in your path. Make certain that the location of idlj (the J2SDK v.1.3 .bin directory) is in your path, and try again.

For More Information
  • Mapping IDL to Java: Overview

    Provides the basics on mapping IDL constructs to the corresponding Java statements.

  • Chapter 3 of the OMG CORBA/IIOP specification

    Provides the complete specification for OMG Interface Definition Language. At this writing, the specification can be downloaded from http://www.omg.org/technology/documents/new_formal/corba.htm.

Next: Developing a Client Application | Previous: Getting Started with Java IDL | Hello.idl
Home

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Using CORBA

Using CORBA and Java IDL

  • About CORBA
  • About Java IDL
  • CORBA Concepts in a Nutshell
  • Defining and Implementing CORBA Objects
  • Client Implementation
  • Java IDL Transient Name Server

About CORBA

CORBA (Common Object Request Broker Architecture) is the standard distributed object architecture developed by the Object Management Group (OMG) consortium. Since 1989 the mission of the OMG has been the specification of an architecture for an open software bus, or Object Request Broker (ORB), on which object components written by different vendors can interoperate across networks and operating systems. This standard allows CORBA objects to invoke one another without knowing where the objects they access reside or in what language the requested objects are implemented. The OMG-specified Interface Definition Language (IDL) is used to define the interfaces to CORBA objects.

CORBA objects differ from typical programming language objects in these ways:

  • CORBA objects can be located anywhere on a network.
  • CORBA objects can interoperate with objects on other platforms.
  • CORBA objects can be written in any programming language for which there is a mapping from OMG IDL to that language. (Mappings currently specified include Java, C++, C, Smalltalk, COBOL, and Ada.)

The Java 2 Platform, Standard Edition, v1.3, provides a CORBA 2.3.1-compliant Object Request Broker (ORB) and two CORBA programming models that utilize the Java CORBA ORB and Internet InterORB Protocol (IIOP). The two programming models are the RMI programming model, or RMI-IIOP, and the IDL programming model, or Java IDL. For more information on these programming models, read CORBA Technology and the Java Platform.

Should I use RMI-IIOP or Java IDL?

This is a fundamental question and it's important to understand the distinction between these two ways of integrating the Java programming language with CORBA.

RMI-IIOP is for Java programmers who want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJBs is RMI-based.

Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA IDL. This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

Both Java IDL and RMI-IIOP include the full functionality of a CORBA Object Request Broker (ORB). The good news for developers is that the JavaTM Standard Edition, v1.2 and higher includes a fully-functional ORB that is available in every deployment of the Java 2 Platform, Standard and Enterprise Editions. Now you can write Java CORBA code without having to license any other software!

About RMI-IIOP

Java RMI-IIOP is an Object Request Broker and a compiler, rmic -iiop, that generates IIOP stub and tie classes. With RMI-IIOP, developers can write remote interfaces in the Java programming language and implement them simply using Java technology and the Java RMI APIs. These interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces. Using RMI-IIOP, objects can be passed both by reference and by value over IIOP.

About Java IDL

Java IDL is an Object Request Broker and a compiler, idlj, that maps IDL to the Java programming language. Java IDL can be used to define, implement, and access CORBA objects from the Java programming language. Java IDL is compliant with the CORBA/IIOP 2.2 Specification and the Java Language Mapping to OMG IDL (formal/99-07-59).

The Java IDL ORB supports transient CORBA objects - objects whose lifetimes are limited by their server process's lifetime. Java IDL also provides a transient name server to organize objects into a tree-directory structure. The name server is compliant with the Naming Service Specification. Transient objects and the name server are discussed later in this page.

No interface repository is provided as part of Java IDL. An interface repository is not required because under normal circumstances, clients have access to generated stub files.

CORBA Concepts in a Nutshell

The concepts introduced in this section are more completely discussed in the CORBA/IIOP Specification.

The diagram below shows a method request sent from a client to a CORBA object implementation in a server. A client is any code (perhaps itself a CORBA object) that invokes a method on a CORBA object. The servant is an instance of the object implementation - the actual code and data that implements the CORBA object.

The client of a CORBA object has an object reference for the object and the client uses this object reference to issue method requests. If the server object is remote, the object reference points to a stub function, which uses the ORB machinery to forward invocations to the server object. The stub code uses the ORB to identify the machine that runs the server object and asks that machine's ORB for a connection to the object's server. When the stub code has the connection, it sends the object reference and parameters to the skeleton code linked to the destination object's implementation. The skeleton code transforms the call and parameters into the required implementation-specific format and calls the object. Any results or exceptions are returned along the same path.

The client has no knowledge of the CORBA object's location, implementation details, nor which ORB is used to access the object. Different ORBs communicate via the OMG-specified Internet InterORB Protocol (IIOP).

A client may only invoke methods that are specified in the CORBA object's interface. A CORBA object's interface is defined using the OMG Interface Definition Language (IDL). An interface defines an object type and specifies a set of named methods and parameters, as well as the exception types that these methods may return. An IDL compiler such as idlj translates the CORBA object definitions into a specific programming language according to the appropriate OMG language mapping. Thus, the idlj compiler translates IDL defintions into Java constructs according to the IDL-Java language mapping.

The stub and skeleton files are generated by the idlj compiler for each object type. Stub files present the client with access to IDL-defined methods in the client programming language. The server skeleton files glue the object implementation to the ORB runtime. The ORB uses the skeletons to dispatch methods to the object implementation instances (servants).

Defining and Implementing CORBA Objects

The goal in CORBA object development is the creation and registration of an object server, or simply server. A server is a program which contains the implementation of one or more object types and which has been registered with the ORB. For example, you might develop a desktop publishing server which implements a "Document" object type, a "Paragraph" object type, and other related object types.

CORBA Object Interfaces

All CORBA objects support an IDL interface; the IDL interface defines an object type. An interface can inherit from one or more other interfaces. IDL syntax is very similar to that of Java or C++, and an IDL file is functionally the CORBA language-independent analog to a C++ header file. IDL is mapped into each programming language to provide access to object interfaces from that language. With Java IDL, these IDL interfaces can be translated to Java using the idlj compiler. For each IDL interface, idlj generates a Java interface and the other .java files needed, including a client stub and a server skeleton.

An IDL interface declares a set of client accessible operations, exceptions, and typed attributes (values). Each operation has a signature that defines its name, parameters, result, and exceptions. A simple IDL interface that describes the classic "Hello World" program, follows.

module HelloApp
{
  interface Hello
  {
    string sayHello();
    };
};

An operation may raise an exception when an error condition arises. The type of the exception indicates the kind of error that was encountered. Clients must be prepared to handle defined exceptions and CORBA standard exceptions for each operation in addition to normal results.

Java Language-based Implementation

Once the IDL interfaces have been defined and the idlj compiler run on the .idl file, .java files containing the method implementations may be written. The .java implementation files are then compiled and linked with the idlj -generated .java files and the ORB library to create an object server.

An object implementation defines the behavior for all the operations and attributes of the interface it supports. There may be multiple implementations of an interface, each designed to emphasize a specific time and space trade-off, for example. The implementation defines the behavior of the interface and object creation/destruction.

Since only servers can create new CORBA objects, a factory object interface should be defined and implemented for each object type. For example, if Document is an object type, a DocumentFactory object type with a create method should be defined and implemented as part of the server. (Note that "create" is not reserved; any method name may be used.) The implementation of the create method can then use new to create the object. For example:

  DocumentServant document  = new DocumentServant():
  orb.connect(document);

A destroy method may be defined and implemented on Document; or, the object may be intended to persist indefinitely. (Again, "destroy" is not reserved and any name may be used.)

The Java IDL ORB supports transient objects only - objects whose lifetime is limited by the server process lifetime. Although a transient object dissapears when its server process stops running, the object may be implemented to store its state in a file and to re-initialize itself from this file at creation time.

Client Implementation

Client code is linked with idlj-generated .java files and the ORB library. Examples of application and applet clients are provided in the Hello World example.

Clients may only create CORBA objects via the published factory interfaces that the server provides. Likewise, a client may only delete a CORBA object if that object publishes a destruction method. Since a CORBA object may be shared by many clients around a network, only the object server is in a position to know when the object has become garbage.

The client code's only way of issuing method requests on a CORBA object is via the object's object reference. The object reference is an opaque structure which identifies a CORBA object's host machine, the port on which the host server is listening for requests, and a pointer to the specific object in the process. Because Java IDL supports only transient objects, this object reference becomes invalid if the server process has stopped and restarted.

Clients typically obtain object references in the following ways:

  • from a factory object. For example, the client could invoke a create method on DocumentFactory object in order to create a new Document. The DocumentFactory create method would return an object refererence for Document to the client.
  • from the nameservice. For example, the client could obtain an object reference for the DocumentFactory by issuing a request on the nameservice.
  • From a string that was specially created from an object reference

Once an object reference is obtained, the client must narrow it to the appropriate type. IDL supports inheritance; the root of its hierarchy is Object in IDL, org.omg.CORBA.Object in Java. (org.omg.CORBA.Object is, of course, a subclass of java.lang.Object.) Some operations, notably name lookup and unstringifying, return an org.omg.CORBA.Object, which you narrow (using a helper class generated by the idlj compiler) to the derived type you want the object to be. CORBA objects must be explicitly narrowed because the Java runtime cannot always know the exact type of a CORBA object.

Java IDL Transient Name Server

The Java IDL Transient Nameservice is an object server provided with Java IDL. Use tnameserv at the command line prompt to start the Name Server. This object server conforms to the standard object implementation and invocation techniques described in the previous sections of this page.

The Name Server stores object references by name in a tree structure similar to a file directory. A client may lookup or resolve object references by name. Because the Name Server is an ordinary Java IDL transient server, the entire directory structure of names is lost each time tnameserv stops running.

See Naming Service for more information.

Distributed Application Concepts | Using CORBA | Glossary

CORBA Technology and the Java Platform
Home

Copyright © 1996-98 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Input Method Client API Reference

The following classes are part of the input method client API:

  • java.awt.event
    • java.awt.event.InputMethodEvent
    • java.awt.event.InputMethodListener
  • java.awt.im
    • java.awt.im.InputContext
    • java.awt.im.InputMethodHighlight
    • java.awt.im.InputMethodRequests
    • java.awt.im.InputSubset

    In addition, the following classes and members in other frameworks support the input method client API:

  • java.awt
    • java.awt.AWTEvent
      • INPUT_METHOD_EVENT_MASK
    • java.awt.AWTEventMulticaster
      • add(InputMethodListener, InputMethodListener)
      • caretPositionChanged(InputMethodEvent)
      • inputMethodTextChanged(InputMethodEvent)
      • remove(InputMethodListener, InputMethodListener)
    • java.awt.Component
      • addInputMethodListener(InputMethodListener)
      • enableInputMethods(boolean)
      • getInputContext()
      • getInputMethodRequests()
      • processInputMethodEvent(InputMethodEvent)
      • removeInputMethodListener(InputMethodListener)
    • java.awt.Graphics
      • drawString(AttributedCharacterIterator, int, int)
    • java.awt.Toolkit
      • mapInputMethodHighlight
    • java.awt.Window
      • getInputContext()
  • java.awt.font
    • java.awt.font.TextAttribute
      • INPUT_METHOD_UNDERLINE
      • UNDERLINE_LOW_ONE_PIXEL
      • UNDERLINE_LOW_TWO_PIXEL
      • UNDERLINE_LOW_DOTTED
      • UNDERLINE_LOW_GRAY
      • UNDERLINE_LOW_DASHED
  • java.lang
    • java.lang.Character.Subset
  • java.text
    • java.text.Annotation
    • java.text.AttributedCharacterIterator
    • java.text.AttributedCharacterIterator.Attribute
    • java.text.AttributedString

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Input Method Engine SPI Reference

The following classes are part of the input method engine SPI:

  • java.awt.im.spi
    • Package Specification
    • java.awt.im.spi.InputMethod
    • java.awt.im.spi.InputMethodDescriptor
    • java.awt.im.spi.InputMethodContext
  • java.awt.im
    • java.awt.im.InputMethodHighlight
    • java.awt.im.InputMethodRequests
    • java.awt.im.InputSubset
  • java.awt.event
    • java.awt.event.InputMethodEvent

    In addition, the following classes and members in other frameworks support the input method engine SPI:

  • java.awt.font
    • java.awt.font.TextAttribute
      • INPUT_METHOD_UNDERLINE
      • UNDERLINE_LOW_ONE_PIXEL
      • UNDERLINE_LOW_TWO_PIXEL
      • UNDERLINE_LOW_DOTTED
      • UNDERLINE_LOW_GRAY
      • UNDERLINE_LOW_DASHED
  • java.lang
    • java.lang.Character.Subset
  • java.text
    • java.text.Annotation
    • java.text.AttributedCharacterIterator
    • java.text.AttributedCharacterIterator.Attribute
    • java.text.AttributedString

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Hierarchy

Class Tree Index
PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
      • class LWTextComponent (implements java.awt.event.FocusListener, java.awt.event.KeyListener)
        • class ActiveClient (implements java.awt.event.InputMethodListener, java.awt.im.InputMethodRequests)
Class Tree Index
PREV NEXT FRAMES NO FRAMES
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


Index

Class Tree Index
PREV NEXT FRAMES NO FRAMES
A C F G I K L P S

A

ActiveClient - class ActiveClient.
Implements an integrated text input user interface.
ActiveClient(String) - Constructor for class ActiveClient
Constructs an ActiveClient.

C

cancelLatestCommittedText(AttributedCharacterIterator.Attribute[]) - Method in class ActiveClient
Returns null to indicate that the "Undo Commit" feature is not supported by this simple text component.
caretPositionChanged(InputMethodEvent) - Method in class ActiveClient
Handles changes to the caret within composed text.

F

focusGained(FocusEvent) - Method in class LWTextComponent
Turns on drawing of the component's thicker frame and the caret.
focusLost(FocusEvent) - Method in class LWTextComponent
Turns off drawing of the component's thicker frame and the caret.

G

getCaret() - Method in class ActiveClient
Returns a text hit info indicating the current caret (insertion point).
getCaret() - Method in class LWTextComponent
Returns a text hit info indicating the current caret (insertion point).
getCaretRectangle() - Method in class LWTextComponent
Returns a 0-width caret rectangle.
getCaretRectangle(TextHitInfo) - Method in class LWTextComponent
Returns a 0-width caret rectangle for the given text index.
getCommittedText() - Method in class LWTextComponent
Returns the text that the user has entered and committed.
getCommittedText(int, int) - Method in class LWTextComponent
Returns a subrange of the text that the user has entered and committed.
getCommittedText(int, int, AttributedCharacterIterator.Attribute[]) - Method in class ActiveClient
Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
getCommittedTextLength() - Method in class LWTextComponent
Returns the length of the text that the user has entered and committed.
getDisplayText() - Method in class ActiveClient
Returns the text that the user has entered.
getDisplayText() - Method in class LWTextComponent
Returns the text that the user has entered.
getInputMethodRequests() - Method in class ActiveClient
Implements getInputMethodRequests for ActiveClient by returning "this".
getInsertPositionOffset() - Method in class ActiveClient
Gets the offset of the insert position in the committed text contained in the text editing component.
getLocationOffset(int, int) - Method in class ActiveClient
Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.
getSelectedText(AttributedCharacterIterator.Attribute[]) - Method in class ActiveClient
Gets the currently selected text from the text editing component.
getTextLayout() - Method in class LWTextComponent
Returns a text layout for the text that the user has entered.
getTextLocation(TextHitInfo) - Method in class ActiveClient
Gets the location of a specified offset in the current composed text, or of the selection in committed text.
getTextOrigin() - Method in class LWTextComponent
Returns the origin of the text.

I

inputMethodTextChanged(InputMethodEvent) - Method in class ActiveClient
Handles changes to the text entered through an input method.
insertCharacter(char) - Method in class LWTextComponent
Inserts the given character at the end of the text.
invalidateTextLayout() - Method in class LWTextComponent
Invalidates the cached text layout.

K

keyPressed(KeyEvent) - Method in class LWTextComponent
Ignores key pressed events.
keyReleased(KeyEvent) - Method in class LWTextComponent
Ignores key released events.
keyTyped(KeyEvent) - Method in class LWTextComponent
Handles the key typed event.

L

LWTextComponent - class LWTextComponent.
Implements a very simple lightweight text editing component.
LWTextComponent(String, boolean) - Constructor for class LWTextComponent
Constructs a LWTextComponent.

P

paint(Graphics) - Method in class LWTextComponent
Draws the component.

S

setFontSize(int) - Method in class ActiveClient
Adjusts composed text for new font size.
setFontSize(int) - Method in class LWTextComponent
A C F G I K L P S
Class Tree Index
PREV NEXT FRAMES NO FRAMES
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


Input Method Framework Demo

This applet contains four text components that show the different ways of interacting with input methods in the Java 2 platform. This applet can be run in two ways:
  • with an implementation of the Java 2 Platform Standard Edition v1.2 or higher, running on a platform/locale that uses native input methods. Examples: Japanese Windows NT, Macintosh with Chinese Language Kit, Solaris with Korean locale.
  • with an implementation of the Java 2 Platform Standard Edition v1.3 or higher, with an input method installed that's implemented in the Java programming language. The Java runtime environment may be running on a platform/locale that does not support native input methods.

The first three components are lightweight components, i.e., they handle events and render text using Java APIs. The last one is a peered component, that is, event handling and text rendering are handled by a text editing engine provided by the underlying platform. Peered components were used widely in JDK 1.0 AWT, while lightweight components were introduced in JDK 1.1 and are the basis of the Swing class library.

The lightweight components have different capabilities:

  • The active client uses the input method framework API to implement on-the-spot (also called "inline") text composition.
  • The passive client works with input methods in the simplest way - it relies on the input method framework to handle all composition and only accepts committed text.
  • The non-client refuses to work with input methods.

To test with the different components with native Japanese input methods, click into the components to focus on them, turn on an input method (Alt-` on Windows, choosing from the keyboard menu on Macintosh, Control-Space on Solaris), then type "nihongo". The behavior you should see is:

  • Active client: The word is entered in in the component directly and gets converted to four hiragana characters as you type.
  • Passive client: A separate window shows up, the word is entered in that window and gets converted to four hiragana characters as you type.
  • Non-client: The text "nihongo" is entered into the component.
  • Peered component: The behavior depends on the platform, but most likely it's similar to the active client (the text may be drawn over the pre-existing text or push it to the right).

For all components except the non-client, you can now convert the text (Space on Windows and Macintosh, Control-N or Space on Solaris) and then commit it (Enter on all three platforms - how could that happen?). Conversion should result in three kanji characters, which after committing are shown in the component without highlight.

To test with the different components with the sample input method implemented in the Java programming language, "City Input Method", install the input method's JAR file into the extensions directory of the Java runtime environment before running the applet. Then click into the components to focus on them, and select the input method. The selection mechanism is implementation dependent; on Sun's Java runtime environments choose the "Select Input Method" menu item from the system menu in the top left corner of the window, then choose the input method from the pop-up menu that comes up. Then type "TYO". The behavior you should see:

  • Active client: The text is entered in the component directly and is highlighted.
  • Passive client: A separate window shows up, the text is entered in that window and is highlighted.
  • Non-client: The text is entered into the component, but not highlighted.
  • Peered component: The behavior depends on the platform.

For all components except the non-client and, on some platforms, the peered component, you can now convert the text using the Space key. The conversion result depends on your default language - it's the name "Tokyo" in Japanese, Japanese yomi, English, German, simplified or traditional Chinese. To see all options, press Space again - this time, you'll get a look-up window showing all the possibilities. You can use Space to go through all possible selections, or type the number of the conversion you like. Pressing the Enter key will commit the selected conversion and remove the highlight.


Serialized Form

Class ActiveClient implements Serializable

Serialized Fields

caret

TextHitInfo caret

composedText

AttributedCharacterIterator composedText

composedTextString

AttributedString composedTextString

Class LWTextComponent implements Serializable

Serialized Fields

committedText

StringBuffer committedText

name

String name

nameOriginY

int nameOriginY

textOriginX

int textOriginX

textOriginY

int textOriginY

Class Tree Index
PREV NEXT FRAMES NO FRAMES
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


ActiveClient

Class Tree Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Class ActiveClient

java.lang.Object
  |
  +--java.awt.Component
        |
        +--LWTextComponent
              |
              +--ActiveClient
public class ActiveClient
extends LWTextComponent
implements InputMethodListener, InputMethodRequests

Implements an integrated text input user interface. This class is an active client of the input method framework, that is, actively uses its APIs to accomplish integration.

This class directly implements the two client interfaces of the input method framework, InputMethodListener and InputMethodRequests. This is not required. Especially in cases where the public interface matters (such as in a class library), it may be more appropriate to hide the implementations of these two interfaces in separate classes.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor Summary
ActiveClient(String name)
Constructs an ActiveClient.
Method Summary
AttributedCharacterIterator | cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes) Returns null to indicate that the "Undo Commit" feature is not supported by this simple text component.
void | caretPositionChanged(InputMethodEvent event) Handles changes to the caret within composed text.
TextHitInfo | getCaret() Returns a text hit info indicating the current caret (insertion point).
AttributedCharacterIterator | getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes) Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
AttributedCharacterIterator | getDisplayText() Returns the text that the user has entered.
InputMethodRequests | getInputMethodRequests() Implements getInputMethodRequests for ActiveClient by returning "this".
int | getInsertPositionOffset() Gets the offset of the insert position in the committed text contained in the text editing component.
TextHitInfo | getLocationOffset(int x, int y) Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.
AttributedCharacterIterator | getSelectedText(AttributedCharacterIterator.Attribute[] attributes) Gets the currently selected text from the text editing component.
Rectangle | getTextLocation(TextHitInfo offset) Gets the location of a specified offset in the current composed text, or of the selection in committed text.
void | inputMethodTextChanged(InputMethodEvent event) Handles changes to the text entered through an input method.
void | setFontSize(int size) Adjusts composed text for new font size.
Methods inherited from class LWTextComponent
focusGained, focusLost, getCaretRectangle, getCaretRectangle, getCommittedText, getCommittedText, getCommittedTextLength, getTextLayout, getTextOrigin, insertCharacter, invalidateTextLayout, keyPressed, keyReleased, keyTyped, paint
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ActiveClient

public ActiveClient(String name)
Constructs an ActiveClient. Input methods are always enabled for ActiveClient instances.
Parameters:
name - the component name to be displayed above the text
Method Detail

getInputMethodRequests

public InputMethodRequests getInputMethodRequests()
Implements getInputMethodRequests for ActiveClient by returning "this".
Returns:
"this"
Overrides:
getInputMethodRequests in class Component

setFontSize

public void setFontSize(int size)
Adjusts composed text for new font size.
Overrides:
setFontSize in class LWTextComponent

getDisplayText

public AttributedCharacterIterator getDisplayText()
Returns the text that the user has entered. This override returns the concatenation of committed text and composed text.
Overrides:
getDisplayText in class LWTextComponent

getCaret

public TextHitInfo getCaret()
Returns a text hit info indicating the current caret (insertion point). This override returns the caret provided by the input method while there is composed text; otherwise it returns a caret at the end of the committed text. The caret provided by the input method may be null.
Overrides:
getCaret in class LWTextComponent

inputMethodTextChanged

public void inputMethodTextChanged(InputMethodEvent event)
Handles changes to the text entered through an input method. Committed text contained in the event is appended to the committed text of the text component. Composed text contained in the event replaces any existing composed text in the text component. The caret defined in the event is saved and will be returned by getCaret if there is composed text. The component is redrawn.

In this simple component, we only keep input method highlight attributes. Smarter components may want to keep language, reading, input method segment, and other attributes as well.

Specified by:
inputMethodTextChanged in interface InputMethodListener

caretPositionChanged

public void caretPositionChanged(InputMethodEvent event)
Handles changes to the caret within composed text. The caret defined in the event is saved and will be returned by getCaret if there is composed text. The component is redrawn.
Specified by:
caretPositionChanged in interface InputMethodListener

getTextLocation

public Rectangle getTextLocation(TextHitInfo offset)
Gets the location of a specified offset in the current composed text, or of the selection in committed text.
Specified by:
getTextLocation in interface InputMethodRequests

getLocationOffset

public TextHitInfo getLocationOffset(int x,
                                     int y)
Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.
Specified by:
getLocationOffset in interface InputMethodRequests

getInsertPositionOffset

public int getInsertPositionOffset()
Gets the offset of the insert position in the committed text contained in the text editing component. In this simple component, that's always at the end of the committed text.
Specified by:
getInsertPositionOffset in interface InputMethodRequests

getCommittedText

public AttributedCharacterIterator getCommittedText(int beginIndex,
                                                    int endIndex,
                                                    AttributedCharacterIterator.Attribute[] attributes)
Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.
Specified by:
getCommittedText in interface InputMethodRequests

cancelLatestCommittedText

public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
Returns null to indicate that the "Undo Commit" feature is not supported by this simple text component.
Specified by:
cancelLatestCommittedText in interface InputMethodRequests

getSelectedText

public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
Gets the currently selected text from the text editing component. Since this simple text component doesn't support selections, this is always an iterator over empty text.
Specified by:
getSelectedText in interface InputMethodRequests
Class Tree Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


LWTextComponent

Class Tree Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Class LWTextComponent

java.lang.Object
  |
  +--java.awt.Component
        |
        +--LWTextComponent
Direct Known Subclasses:
ActiveClient
public class LWTextComponent
extends Component
implements KeyListener, FocusListener

Implements a very simple lightweight text editing component. It lets the user edit a single line of text using the keyboard. The only special character that it knows about is backspace; all other characters are added to the text. Selections are not supported, so there's only a simple caret indicating the insertion point. The component also displays a component name above the editable text line, and draws a black frame whose thickness indicates whether the component has the focus.

The component can be initialized to enable or disable input through input methods. Other than that, it doesn't do anything to support input methods, so input method interaction (if any) will occur in a separate composition window. However, the component is designed to be easily extended with full input method support. It distinguishes between "displayed text" and "committed text" - here, they're the same, but in a subclass that supports on-the-spot input, the displayed text would be the combination of committed text and composed text. The component also uses TextLayout to draw the text, so it can be easily extended to handle input method highlights.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor Summary
LWTextComponent(String name, boolean enableInputMethods)
Constructs a LWTextComponent.
Method Summary
void | focusGained(FocusEvent event) Turns on drawing of the component's thicker frame and the caret.
void | focusLost(FocusEvent event) Turns off drawing of the component's thicker frame and the caret.
TextHitInfo | getCaret() Returns a text hit info indicating the current caret (insertion point).
Rectangle | getCaretRectangle() Returns a 0-width caret rectangle.
Rectangle | getCaretRectangle(TextHitInfo caret) Returns a 0-width caret rectangle for the given text index.
AttributedCharacterIterator | getCommittedText() Returns the text that the user has entered and committed.
AttributedCharacterIterator | getCommittedText(int beginIndex, int endIndex) Returns a subrange of the text that the user has entered and committed.
int | getCommittedTextLength() Returns the length of the text that the user has entered and committed.
AttributedCharacterIterator | getDisplayText() Returns the text that the user has entered.
TextLayout | getTextLayout() Returns a text layout for the text that the user has entered.
Point | getTextOrigin() Returns the origin of the text.
void | insertCharacter(char c) Inserts the given character at the end of the text.
void | invalidateTextLayout() Invalidates the cached text layout.
void | keyPressed(KeyEvent event) Ignores key pressed events.
void | keyReleased(KeyEvent event) Ignores key released events.
void | keyTyped(KeyEvent event) Handles the key typed event.
void | paint(Graphics g) Draws the component.
void | setFontSize(int size)
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LWTextComponent

public LWTextComponent(String name,
                       boolean enableInputMethods)
Constructs a LWTextComponent.
Parameters:
name - the component name to be displayed above the text
enableInputMethods - whether to enable input methods for this component
Method Detail

setFontSize

public void setFontSize(int size)

paint

public void paint(Graphics g)
Draws the component. The following items are drawn:
  • the component's background
  • a frame, thicker if the component has the focus
  • the component name
  • the text that the user has entered
  • the caret, if the component has the focus
Overrides:
paint in class Component

getCommittedText

public AttributedCharacterIterator getCommittedText()
Returns the text that the user has entered and committed. Since this component does not support on-the-spot input, there's no composed text, so all text that has been entered is committed.
Returns:
an AttributedCharacterIterator for the text that the user has entered and committed

getCommittedText

public AttributedCharacterIterator getCommittedText(int beginIndex,
                                                    int endIndex)
Returns a subrange of the text that the user has entered and committed. Since this component does not support on-the-spot input, there's no composed text, so all text that has been entered is committed.
Parameters:
beginIndex - the index of the first character of the subrange
endIndex - the index of the character following the subrange
Returns:
an AttributedCharacterIterator for a subrange of the text that the user has entered and committed

getCommittedTextLength

public int getCommittedTextLength()
Returns the length of the text that the user has entered and committed. Since this component does not support on-the-spot input, there's no composed text, so all text that has been entered is committed.
Returns:
the length of the text that the user has entered and committed

getDisplayText

public AttributedCharacterIterator getDisplayText()
Returns the text that the user has entered. As TextLayout requires a font to be defined for each character, the default font is applied to the entire text. A subclass that supports on-the-spot input must override this method to include composed text.
Returns:
the text that the user has entered

getTextLayout

public TextLayout getTextLayout()
Returns a text layout for the text that the user has entered. This text layout is created from the text returned by getDisplayText. The text layout is cached until invalidateTextLayout is called.
Returns:
a text layout for the text that the user has entered, or null
See Also:
invalidateTextLayout(), getDisplayText()

invalidateTextLayout

public void invalidateTextLayout()
Invalidates the cached text layout. This must be called whenever the component's text is modified.
See Also:
getTextLayout()

getTextOrigin

public Point getTextOrigin()
Returns the origin of the text. This is the leftmost point on the baseline of the text.
Returns:
the origin of the text

getCaretRectangle

public Rectangle getCaretRectangle()
Returns a 0-width caret rectangle. This rectangle is derived from the caret returned by getCaret. getCaretRectangle returns null iff getCaret does.
Returns:
the caret rectangle, or null
See Also:
getCaret()

getCaretRectangle

public Rectangle getCaretRectangle(TextHitInfo caret)
Returns a 0-width caret rectangle for the given text index. It is calculated based on the text layout returned by getTextLayout, so this method can be used for the entire displayed text.
Parameters:
caret - the text index for which to calculate a caret rectangle
Returns:
the caret rectangle

getCaret

public TextHitInfo getCaret()
Returns a text hit info indicating the current caret (insertion point). This class always returns a caret at the end of the text that the user has entered. Subclasses may return a different caret or null.
Returns:
the caret, or null

insertCharacter

public void insertCharacter(char c)
Inserts the given character at the end of the text.
Parameters:
c - the character to be inserted

keyTyped

public void keyTyped(KeyEvent event)
Handles the key typed event. If the character is backspace, the last character is removed from the text that the user has entered. Otherwise, the character is appended to the text. Then, the text is redrawn.
Specified by:
keyTyped in interface KeyListener

keyPressed

public void keyPressed(KeyEvent event)
Ignores key pressed events.
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent event)
Ignores key released events.
Specified by:
keyReleased in interface KeyListener

focusGained

public void focusGained(FocusEvent event)
Turns on drawing of the component's thicker frame and the caret.
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent event)
Turns off drawing of the component's thicker frame and the caret.
Specified by:
focusLost in interface FocusListener
Class Tree Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road


Input Method Client API Tutorial

Contents

  1. Implementing an Active Client Component
    • Handling Input Method Events
    • Handling Input Method Highlight Attributes
    • Handling Input Method Requests
    • Ending Input Operations
  2. Enhancing an Active Client Component
    • Handling Additional Text Attributes
    • Creating Private Input Contexts
    • Selecting Input Methods
    • Setting an Expected Character Subset
    • Using Engine-Specific Functionality
  3. Implementing a Non-Client
  4. Sample Code

1. Implementing an Active Client Component

The input method client API makes it possible for client components to implement integrated text input user interfaces such as on-the-spot input. The API defines events and methods that facilitate the communication between a client component and an input method. It also lets the client component request an input method for a particular language.

Since the API doesn't make any assumptions about how and where the text is drawn, it can also be used to implement other input styles such as over-the-spot editing. In this style, the composed text is drawn over surrounding text and covers it instead of being integrated and formatted with it.

Any client component class can become an active client of the input method client API and thus support an integrated text input user interface by performing the following steps:

  • Implement the InputMethodListener interface to handle incoming InputMethodEvents generated by the current input method, and register the listener.
  • Implement the InputMethodRequests interface and override getInputMethodRequests to return the request handler.
  • Store InputMethodHighlight attributes along with composed text and pass them on to the drawing routines.
  • End input operations when the user initiates an operation that requires all text to be committed.

Optionally, the client component can also use the following functionality:

  • Store other text attributes that are created by input methods, and return them when text is requested.
  • Create a private input context (instead of sharing one with other components in the same window).
  • Select input methods, for example, based on the language of the text being edited.
  • Set an expected character subset.

Client components don't need to deal with setting up input contexts, activating or deactivating contexts, or dispatching events to input methods, since all this is handled automatically by AWT.

Handling Input Method Events

The input method framework provides an event class, InputMethodEvent, to support the communication between input methods and text components. The class has two separate event kinds: text changed and caret changed. An event listener interface, InputMethodListener, supports these two events. An active client component must implement the InputMethodListener interface, register the listener, and handle both kinds of events.

InputMethodEvent instances are sent to the client component when there is a change to the user's input text, its highlighting, or to the caret location within the composed text. The event sent for caret-only changes is a simplified version of the one for text changes (it just doesn't have text information), so the following discussion assumes the text-changed event.

An event reporting a text change has a reference to an instance of AttributedCharacterIterator that represents either composed text or committed text or both together. The event's committed character count value specifies how many characters in the iterator's range are committed text; all remaining characters are composed text. Committed text always precedes composed text. If the component has no previous composed text, the committed and composed text replace any selected text or are inserted at the current insertion position of the component's text. If there is previous composed text, the entire previous composed text is replaced with the new committed and composed text. The insertion point moves to the end of the committed text. The client component is responsible for redrawing the updated text.

The event also contains information about the current caret location within the composed text (null if no caret is to be displayed), and about the part of the composed text that is most important to keep in view (null if the input method doesn't have a recommendation).

Handling Input Method Highlight Attributes

The text component generally draws the composed text as part of the text being edited, using its regular text layout and drawing functionality. However, it needs to add certain highlight style attributes to the composed text to indicate the current state of the composition. The framework defines these style attributes as abstract styles (for example, "unconverted unselected text" or "converted selected text"), and maps them internally to platform-dependent concrete styles (for example, 2-pixel gray underline).

Highlight attributes are represented by the InputMethodHighlight class. Instances of this class are used as attribute values of the AttributedCharacterIterator instances representing composed text. Text components must store these attributes with the composed text and pass them on to the drawing routines when drawing composed text. They can use either the drawString methods that accept AttributedCharacterIterator, or create a TextLayout from the iterator and use its draw method. These drawing methods interact with the input method framework to map abstract to concrete highlight styles. Text components using these methods therefore generally do not need to be concerned with the internal details of the input method highlights. If a text component uses some other mechanism to render the text, it should check the input method highlight for concrete style information, and, if none is provided, use Toolkit.mapInputMethodHighlight to map to a concrete style.

Some input methods may treat highlights as "annotations". Annotations are attributes that apply to a specified range of text, but not to subranges or the concatenation of ranges. They are represented by wrapping the InputMethodHighlight instance into an Annotation instance. Input methods may use annotation highlights to separate text segments that will be converted as separate units. On some platforms, these highlights are rendered so as to make the segments visible, for example, by using underlines with short breaks between the segments. Text components have to be able to handle input method highlights whether they are wrapped in Annotation instances or not. If a text component implements line wrapping, special care needs to be taken when the range to which a highlight annotation applies crosses a line boundary: The normal behavior (implemented, for example, in AttributedString) would be to discard the attribute because it doesn't apply to subranges. But, since in this case there's only a visual break and not a logical break, the highlight needs to be preserved - it has to be treated as if it applied to the subranges that are rendered on separate lines. One way to do this is by implementing the AttributedCharacterIterator in a way that returns highlight annotations even for subranges of the intended range.

Handling Input Method Requests

An input method needs to access component information to perform input operations. For example, an input method needs to know the location where a list of possible choices can be shown.

An active client component therefore must implement the InputMethodRequests interface, and override getInputMethodRequests to return the request handler. The interface includes methods to:

  • Perform conversions between screen coordinates and offsets within the composed text.
  • Obtain specified text of the component.
  • Cancel the latest committed text.
  • Obtain the insertion position within the component's committed text.

Ending Input Operations

Input methods typically recognize some user actions that end input operations, for example, an operation that commits all uncommitted text. However, there are also user actions that start operations for which input operations should be ended, but that an input method cannot recognize. Saving the document containing the text is one such example. In these cases, the component has to explicitly call the input context's endComposition method.

2. Enhancing an Active Client Component

Handling Additional Text Attributes

In addition to the input method highlight information, input methods may also attach other attributes to the text they send to a text component. These attributes may be useful information for the component. They may also improve the input method's performance if returned by the InputMethodRequest methods. For the latter reason, it is recommended that text components keep this attribute information around while the text is being edited, and return it with any text requested.

The AttributedCharacterIterator.Attribute class defines the following common attributes:

  • LANGUAGE - the language of the text, specified as a Locale object.
  • READING - a phonetic representation (yomi in Japanese), specified as a String object.
  • INPUT_METHOD_SEGMENT - segmentation information used by input methods.

Input methods written in the Java programming language may define additional attributes.

Creating Private Input Contexts

By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's containment hierarchy. This reduces the number of instances created overall, and lets input methods combine information about all the text entered in this window (input methods often use information about previously entered text to improve their conversion accuracy). It means, however, that only one input operation is possible at any one time within a window, and that the text needs to be committed when moving the focus from one text component to another. If this is not desired, text components can create their own input context instances and override getInputContext to return them. A component that doesn't have its own input context uses the one used by its parent.

Selecting Input Methods

Text components can use the input context's selectInputMethod operation to select an input method for a given language or locale. This may be helpful, for example, if the user clicks in text that is written in that language, since it's likely that she wants to continue in the same language. Or, the text component may know that the application only allows text in a certain language to be entered.

Setting an Expected Character Subset

Text components can use the input context's setCharacterSubsets operation to tell input methods which characters can be meaningfully entered. For example, a database application may know that certain fields should only receive input in hiragana (one of the syllabic subscripts used in Japanese), another one only Latin characters, a third one any kind of characters. Passing on this information to input methods may allow the input methods to limit the range of characters that can be entered, or to switch to a different input mode that particularly supports the specified character subsets.

Using Engine-Specific Functionality

Some input methods may provide functionality to client components that can not be made available through the input method framework API. This is possible through input method control objects. The input method developer must publish an interface for these objects. Client components that want to take advantage of the additional functionality can then call InputContext.getInputMethodControlObject, check whether the returned object is an instance of a known control object class, and if it is, call its methods.

3. Implementing a Non-Client

By default, all components that process key events are clients of the input method framework, that is, input method support is enabled for them. In some cases, components may not want to have their input processed by input methods. For example, games may want to interpret keyboard events directly. These components should call enableInputMethods(false), so that events do not get forwarded to input methods.

4. Sample Code

This sample code shows how to implement the different kinds of input method clients that are possible with the input method framework: an active client, a passive client, a non-client, and a peered text component.

  • Applet - run this applet in a Java 2 enabled browser, and you can experiment with the different client components.
  • Javadoc
    • LWTextComponent - explains the structure of a lightweight text editing component that can be extended to an active client.
    • ActiveClient - explains the structure of an active client component.
  • Source Code
    • IMFDemo.java - the applet/application that contains the different client components.
    • LWTextComponent.java - a lightweight text editing component that doesn't know about input methods, but can be extended to an active client.
    • ActiveClient.java - extends LWTextComponent to become an active client component.
    • PeeredTextArea.java - a peered text component.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Input Method Engine SPI Tutorial

Contents

  1. Introduction
  2. Describing the Input Method
  3. Communicating with the Client Component
  4. Using Input Method Windows
  5. Implementing Composition
  6. Providing Engine-Specific Functionality
  7. Packaging the Input Method
  8. Sample Code

1. Introduction

The input method engine SPI enables the development of input methods in the Java programming language that can be used with any Java 2 runtime environment. As far as the input method framework is concerned, an input method consists of two classes implementing the InputMethodDescriptor and InputMethod interfaces, packaged with some additional information as an extension and installed into a Java runtime. The specifications for the java.awt.im.spi package, and the InputMethodDescriptor and InputMethod interfaces provide the core information that's needed to implement an input method. This tutorial provides additional information that makes this task a little easier and helps avoid compatibility problems between different implementations of the Java 2 platform.

2. Describing the Input Method

Before the input method framework can start using an input method, it needs to know about its capabilities. The necessary information is provided by the input method's implementation of the InputMethodDescriptor class. This information is used in selecting input methods.

The list of available locales returned by getAvailableLocales should only return languages that the input method is really designed for. For example, a Chinese Pinyin input method that produces simplified Chinese characters should only return SIMPLIFIED_CHINESE, even if it has a mode that simply lets key events pass through and thus also makes it possible to write English or Malay. The InputMethod.setLocale method on the other hand may return true for a larger set of languages. The reason is that getAvailableLocales is used to decide whether to load and switch to an input method, which is only worthwhile if the input method handles the language well, while setLocale is used to decide whether to switch away from an input method, which is only worthwhile if the input method doesn't handle the language at all.

3. Communicating with the Client Component

When an input method instance is created, it receives an InputMethodContext instance through setInputMethodContext. This instance provides it with all the functionality that it needs to communicate with the input method framework, the client component, or the composition window. It lets the input method send information about composed and committed text using the dispatchInputMethodEvent method. And it lets the input method request information from the client component using the methods it inherits from the InputMethodRequests interface.

The input method framework provides the input method with an environment that makes it seem like it is always communicating with an active client component using the on-the-spot input style. If the actual client component is not an active client, or if a different input style is used, then the framework redirects events and requests as needed.

The input method should never try to access the client component directly, as doing so would conflict with the framework's switching and redirection functionality. Instead, the input method should always use the methods provided by its input method context.

4. Using Input Method Windows

Input methods may use a number of different windows to communicate with the user. Windows commonly used by input methods include:

  • a look-up window, which shows several possible interpretations of the user's input and lets the user choose the correct one.
  • a status window, which provides the user with information about the current state of the input method, such as the selected language or target character set.
  • a control panel (often combined with the status window), which lets the user change the input method's state, such as selecting a different language or target character set.
  • a preferences window, which lets the user tailor the input method to his or her needs.
  • a dictionary editor window, which lets the user add or correct conversions.

Note: On some other platforms, input methods may also provide a composition window, which shows the composed text. In the Java input method framework, composed text is always displayed by the client component or the input method framework, never by the input method.

It is useful to consider three groups of windows:

  • transient windows: these windows pop up for short times during a composition operation. Their functionality is tied to a specific composition. Opening, closing, positioning, and sizing are usually automatic since any user interaction with the windows themselves would distract from the composition. In particular, transient windows are always closed when the composition operation ends or is interrupted. Examples: look-up window.
  • persistent windows: these windows tend to stay around for extended periods of time, possibly for as long as the user is using the input method. Their functionality may be tied to the currently active instance of the input method, or to the input method class. Usually the user can actively open, close, position, and possibly resize these windows, although they are always automatically closed when switching to a different input method, and in some cases they're automatically positioned relative to the window containing the current client component. Examples: status window, control panel.
  • document windows: these are just regular windows. Their functionality is not tied to composition. The user fully controls opening, closing, positioning, and possibly sizing of these windows. Examples: dictionary editor window.

Here's how these window groups can be handled by input methods written for the Java 2 platform:

  • transient windows are created using InputMethodContext.createInputMethodWindow, typically with attachToInputContext set to true. They are opened either in the input method's implementation of activate, or later when needed to respond to user input. They are closed in the input method's implementations of deactivate or hideWindows, or earlier if they are no longer needed.
  • persistent windows are created using InputMethodContext.createInputMethodWindow, with attachToInputContext set to false. They are typically opened in the input method's implementation of activate and closed in the input method's implementation of hideWindows.
  • document windows are created as regular AWT windows, and opening and closing them is usually under user control.

Note that the focus behavior of a window created by createInputMethodWindow is implementation dependent. It may never get the focus, it may get the focus when initially made visible, or it may get the focus when the user clicks into it. An input method must be able to handle either case.

To position windows (such as the look-up window) automatically relative to the composed text, the input method can use the input method context's getTextLocation method. To position windows (such as a status window) automatically relative to the window containing the current client component, the input method can register for notifications about that window's location and state using the input method context's enableClientWindowNotification method; it then has to implement the notifyClientWindowChange method to receive notifications.

5. Implementing Composition

The main task of an input method is interpreting user actions in composing text input. The user actions may be typing on the keyboard, using the mouse, handwriting, or speaking.

The activate and deactivate methods indicate to the input method whether a client component has the focus and therefore is the target of text input. Typically input methods only process events to compose text while they're active.

When an input method is active, certain types of events are dispatched to the input method using the dispatchEvent method before they are processed by the client component. The input method decides for each event whether it wants to handle it. If it does, it marks the event as consumed so that it is not processed by the client component.

Note: For key events, input methods should use only KEY_TYPED events to obtain information about characters being entered, and use KEY_PRESSED or KEY_RELEASED events only to obtain information about function keys that don't result in KEY_TYPED events. The mapping from key-presses to characters depends on platforms, hardware, locales, and possibly other factors, and is best left to the underlying operating system.

As text is being composed and committed, the input method needs to inform the client component about all changes so that the client component can redraw the text. The input method does this by using InputMethodContext.dispatchInputMethodEvent to construct and dispatch input method events to the client component. Depending on the current event flow model, the input method framework may redirect the events to its composition window. Dispatching input method events is the only way for Java input methods to have composed text displayed.

Composed text is usually marked up with highlight styles that indicate the current state of the conversion. This is accomplished by adding attributes to the text using the TextAttribute.INPUT_METHOD_HIGHLIGHT key and instances of InputMethodHighlight as values. Normally input methods only define abstract highlights (using the state and selected properties of the input method highlight) and leave the mapping to concrete styles to the rendering system. However, if desired, input methods can add concrete style information to the highlight using the style property. It is a good idea to design the concrete styles as variations of the styles provided returned by Toolkit.mapInputMethodHighlight.

Both the client component and the input method framework may recognize situations where the current composition needs to be ended and all composed text either committed or cancelled. They inform the input method about this need using the endComposition method. Note that endComposition may be called while the input method is not active.

Client components can influence composition using several methods. The InputContext.setCharacterSubsets method lets them restrict the subset of the Unicode character set that the input method is allowed to input. Input methods should generally not create characters outside of the specified subsets, and may switch to a different input mode that particularly supports the specified character subsets. The InputContext.setCompositionEnabled and isCompositionEnabled methods let them control and examine whether the current input method is enabled for composition. The InputContext.reconvert method lets them initiate reconversion.

6. Providing Engine-Specific Functionality

Some input methods may want to provide functionality to client components that can not be made available through the input method framework API. This is possible through input method control objects. The input method developer must publish an interface for these objects, and return instances through InputMethod.getControlObject. Client components that want to take advantage of the additional functionality can then call InputContext.getInputMethodControlObject, check whether the returned object is an instance of a known control object class, and if it is, call its methods.

7. Packaging the Input Method

Input methods are packaged as installed extensions with specific content as described in the "Packaging Input Methods" section of the SPI specification. One important aspect to consider is that all extensions installed in a Java application environment share the same name space. To avoid name collisions, input methods should follow the package naming conventions as described in the Java Language Specification and its amendments. Similar conventions should be applied to naming non-class files that are packaged in the input method JAR file, such as dictionaries.

8. Sample Code

City Input Method is a simple input method that shows how to use the interfaces provided by the input method engine SPI.

  • City Input Method documentation - tells you how to install and use this input method.
  • City Input Method - a jar file containing the input method. Some browsers will automatically offer to download this file; others will show its contents in a window (not a pretty sight), and you then have to use the Save command to write it into a file. See the documentation for installation instructions.
  • CityInputMethodDescriptor.java - the InputMethodDescriptor implementation for this input method.
  • CityInputMethod.java - the InputMethod implementation for this input method.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Input Method Framework Overview

Contents

  1. Introduction
  2. Goals
  3. Input Method Support in Other Frameworks
  4. Frequently Asked Questions
  5. References

1. Introduction

Input methods are software components that interpret user operations such as typing keys, speaking, or writing using a pen device to generate text input for applications. The most common input methods are the ones that let users type text in Chinese, Japanese, or Korean, languages that use thousands of different characters, on a regular-sized keyboard. The text is typed in a form that can be handled by regular-sized keyboards, for example, in a romanized form, and then converted into the form that's really intended. Typically a sequence of several characters needs to be typed and then converted in one chunk, and conversion may have to be retried because there may be several possible translations. Similarly, for hand-writing recognition, the user may write a series of characters, convert them, and select the correct text from several possible conversion results. This process is called composition, and the text that the input method is working on is called composed text. It ends when the user confirms the final conversion result and the text is committed.

During composition, the composed text logically belongs to the input method, but still needs to be displayed to the user. Input method frameworks cooperate with input methods to provide at least two ways to do this: They enable modern text editing components to display the text in the context of the document that it will eventually belong to, albeit in a style that indicates that the text still needs to be converted or confirmed by the input method. This is called on-the-spot style input. And they provide a separate window to display the text as a fall-back if a not-so-modern text editing component can't deal with the text until it's confirmed. We call this root-window style input.

The input method framework in the Java 2 platform enables the collaboration between text editing components and input methods in entering text. Its input method client API provides interfaces and classes that enable text editing components to communicate with input methods and implement a well-integrated text input user interface in the on-the-spot and below-the-spot styles; it also provides root-window style input as a fallback. Its service provider interface (SPI) for input method engines provides interfaces that enable the development of input methods in the Java programming language that can be used with any Java runtime environment; it also supports native input methods of the host platform.

2. Goals

"Write Once, Run Anywhere in the World" for Text Components

Text editing components that use the input method framework run on any Java application environment and support any text input methods available on that Java application environment without modifying or recompiling the text editing component. The framework isolates text editing components from differences in platforms and input method engines. It provides only one programming model for interacting with input methods. This lets developers write to a single API, and lets users choose whatever input method they prefer. When using native input methods, the framework maps to the platform input method APIs.

Although engine independence will be important to most developers, some high-end developers may want access to engine specific features. The framework allows this access.

"Write Once, Run Anywhere in the World" for Input Methods

Input methods written in the Java programming language and using the input method engine SPI can be installed into any Java application environment and support any text component running in that Java application environment. The framework isolates input methods from differences in platforms and text editing components. It provides only one programming model for interacting with text components. This lets developers write to a single SPI, and lets users choose whatever text editing component they prefer.

Language Independence

The input method framework is language independent in order to satisfy the needs of fully international applications. Although input methods are generally used for entering East Asian text, they may be useful for other languages as well. For example, a transliteration input method might be developed to allow Greek to be entered using Latin characters.

The framework handles input methods for different languages at the same time for truly multilingual text editing. While the choice of native input methods may be limited by the host operating system, any input method written in the Java programming language and using the input method engine SPI can be used at any time. Text created by an input method can have language attributes so that applications can perform language sensitive operations on the text.

Input Device Independence

The input method framework is designed to accommodate many possible input devices. Although keyboards are the predominant way of entering text today, other devices are gaining importance. For some platforms, pen-based input is the only way to enter text. Also, voice input is becoming more and more popular. The input method engine SPI opens the way to support these alternate devices.

Multiple Service Levels

Different programs have different needs for input method support. Tight integration with input methods provides the best user interface, but requires some additional programming. Some developers may not find that additional work worthwhile, but their applications still need to be able to receive East Asian text input. A few programs, such as games, want direct low-level keyboard input without interference from an input method. The framework lets programs choose one of the following levels of text input support.

Integrated Text Input User Interface

Modern programs intended to be used with East Asian languages usually provide a fully integrated user interface for text input operations and show the text being composed embedded in the document text. While converting text, the current candidate is highlighted, and when the user chooses a different candidate, the previous candidate text is replaced with the new one. This user interface support for input methods is known as on-the-spot style (or inline style). An alternative that Chinese-speaking users often prefer is the below-the-spot style, where composed text is shown in a separate composition window that is automatically positioned close to the insertion point where text will be inserted after being committed. The input method client API lets text editing components implement these integrated text input user interfaces.

Integration does not only mean displaying the composed text in the context of the target document. It also means that the text editing component understands "input method events", which let the input method communicate more information about the text than simple key events (for example, grammatical information), and that it can responds to requests for information from the input method that let the input method improve its functionality (for example, its accuracy).

Non-Integrated Text Input User Interface

For programs that do not want to deal with the user interface for text input operations, only final input text is sent to the application. In this case, the framework provides a user interface for input operations in a separate composition window outside the application. This is known as root-window style. It is less convenient because the user either has to manually position the window near the insertion point or to move his/her eyes between the composition window and the application window.

In this case, the application receives the input text as a sequence of key events. Therefore, there is no way to receive any information associated with the input text, such as grammatical information. Also, surrogate pairs (as defined in the Unicode Standard, version 2.0) are received as two separate key events.

No Input Method Support

Some applications, such as game software, may need only raw key input and no input method support. The framework provides a way to explicitly disable input method support.

Building Block Reuse

An important theme of object-oriented programming is reuse of program building blocks. The same building block may be used in many different applications, and several times within the same application. To make it easy to combine different text editing building blocks of possibly different capabilities, the input method framework interacts with each text editing component directly and individually.

As a consequence, many applications will not interact with the input method framework directly at all. Instead, they will use ready-made text editing components, such as the Swing text components, which will handle the interaction for them.

Close Integration with Other Frameworks

The input method framework is designed as an integral part of the Java platform. Interfaces that are necessary to exchange text between input methods and text components are designed to also support communication between other text-related frameworks, such as Java 2D and the Swing text components. Support for input method highlight drawing is integrated into Java 2D, so that text components can treat composed text just like any other text and the highlights just like any other style. Java 2D interacts with the input method framework to determine appropriate visual styles for input method highlights depending on the platform. The Swing text components use the input method framework to implement the best possible user interface with minimal additional programming.

3. Input Method Support in Other Frameworks

This chapter summarizes functionality in other Java platform frameworks that support input methods.

Text

The AttributedCharacterIterator interface provides a standard way of communicating text information with attributes between frameworks. It lets text readers access text without having to know how the text is stored in the information provider. Attribute information may include font and style attributes as well as language tags and grammatical annotations.

Abstract Window Toolkit

The Window class creates an initial input context for the window, and disposes this input context for the window when the window is disposed. Explicitly disposing input contexts allows to free up the (often substantial) resources allocated by native input methods.

The Component class has methods to handle input contexts and input method request handlers. Newly created Component instances other than windows initially share the input context of their containing window. The event handling in the Component class redirects incoming events to the input context associated with the component, and only passes them on to the component's listeners if they have not been consumed by an input method. Focus changes are communicated to the input context so it can activate or deactivate input methods.

The AWT classes that have knowledge of event or listener classes handle the InputMethodEvent and InputMethodListener classes.

The Graphics class defines a drawString method that accepts AttributedCharacterIterator instances as input. Instances of the TextLayout class can be constructed from AttributedCharacterIterator instances and used to draw text with input method highlights. Both ways of drawing text recognize input method highlights as attributes of the text and render them.

Swing

The Swing text components in the Java 2 platform are by default active clients of the input method framework. That means, applications using these text components will use on-the-spot or below-the-spot style input by default. Application developers are still responsible for ending input operations when some other operation is started that requires the text to be committed. They may also use the input method framework's methods to create a private input context, to select an input method, or to set an expected character subset.

4. Frequently Asked Questions

How are input methods supported in previous versions of the Java platform?

Here's the history of input method support in the Java platform:

  • 1.0: no input method support.
  • 1.1: host input methods supported for peered text components (TextArea, TextField).
  • 1.1.6: host input methods supported for lightweight components, root-window style only.
  • 1.2: introduces input method client API, enabling on-the-spot style for lightweight components. Swing text components become active clients.
  • 1.3: introduces input method engine SPI, enabling input methods written in the Java programming language. Introduces below-the-spot style.

Why is there no method that lets a client component choose an input method by name?

The input method framework lets client components select an input method by locale, but not by name. Which input method is used to enter text for a given language is the user's choice, and text components should be written to work with any input method. If text components want to take advantage of enhanced features of specific input methods, they can call getInputMethodControlObject and, if the result is an instance of a class they know about, call its methods.

How can I obtain a IIIMP adapter?

Version 1.2 of the Java 2 Runtime Environment included a client side adapter for the Internet-Intranet Input Method Protocol (IIIMP), a Sun Microsystems technology which enables the use of server-based input methods over the network. This adapter was included to allow the evaluation of this protocol at a time when there was no public interface that would let users install the adapter into a Java runtime environment as a separate software component. Version 1.3 of the Java 2 platform provides a public input method engine SPI, so that the adapter, like other input systems, can now be developed and distributed as a separate product and installed into any implementation of the Java 2 platform. A version of the IIIMP adapter that uses the SPI is currently being developed by Sun Microsystems. To obtain current information, go to the Solaris Developer Connection and search for "IIIM".

5. References

Information about the implementation of input methods on different platforms can be found in the following literature:

  • "Programmer's Supplement for Release 6," O'Reilly & Associates, Inc. (ISBN 1-56592-089-9).
  • "Inside Macintosh: Text," Addison-Wesley (ISBN 0-201-63298-5).
  • "Developing International Software for Windows 95 and Windows NT," Microsoft Press (ISBN 1-55615-840-8).
  • "IIIMP - Platform Independent Input Method for Internet and Java," Proc. Twelfth International Unicode/ISO 10646 Conference, Unicode Consortium.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Input Method Framework Specification

Contents

  1. Framework Architecture
  2. Client Components
  3. Input Styles
  4. Input Method Engines and Adapters
  5. Context Management
  6. Information Flow Through the Framework

1. Framework Architecture

The following picture shows the overall structure of the framework and its clients. Parts outlined in bold are integrated with the input method framework as part of the Java 2 platform; others can be developed and distributed separately by independent software vendors.

The input method client API defines the classes and interfaces that text editing components can use to implement an integrated text input user interface. The AWT text components TextArea and TextField provide on-the-spot or over-the-spot composition, depending on implementation. The text components of the Swing user interface toolkit provide an integrated text input user interface. The context management manages communication paths between the text editing components and input methods. The input method engine SPI defines the interfaces that allow input method engines and adapters to be plugged into the framework. Input method engines can be implemented directly in the Java programming language using these interfaces. To use native input methods integrated with the host input method manager, an adapter translates information between the data models used by native input methods and the input method framework and provides the composition window. Adapters for other input systems, such as Java Speech or the Internet-Intranet Input Method Protocol (IIIMP), can also be implemented using this interface.

2. Client Components

Every instance of the Component class is potentially a client of the input method framework. The framework distinguishes between four kinds of components:

  • Active clients are components whose getInputMethodRequests implementations return a non-null value. The framework assumes that these components actively use the input method client API and, in particular, provide an implementation of the InputMethodListener interface. These components are expected to handle events and requests for information coming from the input method and draw composed text that is sent to them.
  • Non-clients are components that have turned off input method support using the enableInputMethods method.
  • Peered clients are peered text components (instances of the TextComponent class). Their behavior is implementation dependent, and their input method support may be limited. In Sun's Java 2 runtime environment for Windows, peered text components behave mostly like active clients. In Sun's Java 2 runtime environment for Solaris, peered text components can receive input only from host input methods, and they do not support the below-the-spot input style (see below).
  • Passive clients are all remaining components. The framework assumes that passive clients don't use the input method client API, but still need to receive text input from input methods.

All four kinds of components may coexist in the same window. The input method framework, therefore, needs to determine the capabilities of components and adjust its behavior as the focus moves from one component to another.

Client components are not responsible for drawing candidate lists or for user interface elements that control the input method's behavior. Depending on the platform, this responsibility rests with input methods, the host input method manager, or the input method framework.

Input methods are not concerned with the differences between client components. They interact with them indirectly through the input method framework, which presents an interface similar to an active client and handles the differences internally.

3. Input Styles

The input method framework supports three input styles:

  • On-the-spot input, where the client component draws the composed text in the context of the document that it will eventually belong to, but in a style that indicates that the text still needs to be converted or confirmed by the input method. This is the default input style for active clients.
  • Below-the-spot input, where the composed text is shown in a separate composition window that is automatically positioned just below the insertion point where text will be inserted after being committed. The window's location is calculated first when the window is opened, then updated whenever committed text has been dispatched to the client component. If positioning the window below the insertion point would move it partially or entirely off-screen, it is moved above the insertion point. This input style may be selected for active clients as described below.
  • Root-window input, where the composed text is shown in a separate composition window that is not automatically positioned. This input style is used for passive clients.

The framework chooses between on-the-spot and below-the-spot input for active clients based on a system property or an AWT property "java.awt.im.style". The system property can be defined from the command line (by the end user), the AWT property in a localized awt.properties file (by the localizer or a system administrator). If both are defined, the system property takes precedence. If the property's value is "below-the-spot", below-the-spot input is used, otherwise on-the-spot input.

Support for below-the-spot input with native input methods is platform dependent. In Sun's Java 2 runtime environments, it is supported on Windows, but not on Solaris. Where it is not supported, on-the-spot input is used instead.

The input style used for peered text components (instances of the TextComponent class) is implementation dependent and may not be any of the styles described above. In Sun's Java 2 runtime environment for Windows, below-the-spot input may be selected as described above, otherwise over-the-spot input is used, where composed text is drawn in a separate window covering the insertion point. In Sun's Java 2 runtime environment for Solaris, the input style depends on the input method.

No input style is associated with non-clients.

Input methods are not concerned with the differences between input styles. They interact with client components indirectly through the input method framework, which presents an interface assuming on-the-spot input and handles the differences internally.

4. Input Method Engines and Adapters

The input method engine SPI enables the development of input methods in the Java programming language. Adapters for other input systems, such as Java Speech or the Internet-Intranet Input Method Protocol, can also be implemented using this interface. For information specific to the SPI, see the SPI package specification.

The SPI is also used for host input method adapters, which connect to native input methods integrated with the host input method managers, such as the Input Method Manager on Win32, the Text Services Manager on MacOS, and XIM on Solaris. The host input method adapter plays the role of an input method within the input method framework, and translates events and requests between the data models used by AWT and the input method framework on one side and the host's input method manager on the other side. It also cooperates with the input context in managing the composition window - for passive clients interacting host input methods, typically the root window provided by the host input method manager is used. The adapter passes on requests for particular input methods to the host, but users can also use the host's selection mechanism to select input methods.

5. Context Management

InputContext instances manage communication contexts between client components and input methods. The main task of an input context is to maintain the connection from the current client component to its current input method. It dispatches input events such as key and mouse events from the component to the current input method, and input method events from the input method to the client component. It also dispatches requests for information from the input method to the client component.

Each InputContext instance provides its own text input environment, separate from all other input contexts. This allows applications to support multiple concurrent input operations. For example, in the middle of entering text into a document, a user can open a file dialog and enter a file name, without affecting the composition state of the text being entered into the document.

By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's containment hierarchy. If necessary, components can create private input contexts. A component that doesn't have its own input context uses the one used by its parent. An input context has at most one current client component, the component that currently has the focus. When switching to a new client component, the input context calls its endComposition method to commit or cancel composed text for the previous client component.

The input context creates an input method instance for each input method engine that its client components need to use. Separate input method instances are created for each input context instance. The instances are kept until the input context is disposed, so that the instances can keep information about the text that was entered in the window.

The input context also handles input method selection and the composition window.

Selecting Input Methods

An input context has a current input method and a current locale.

The input method framework provides two separate ways of selecting input methods and input locales:

  • The method InputContext.selectInputMethod lets applications request an input method supporting a specified locale.
  • A user interface lets the user request an input method by name, and specify the input locale. A selection made from the user interface affects the currently active input context only.

The framework does not give preference to selections made either way, so the last successful selection made either way for an input context determines the current input method for an input context (note that selectInputMethod may fail if no available input method supports the requested locale).

Before switching to a new input method, the input context calls the old input method's endComposition method. The input context retains the old input method instance and reuses it when the same input method is selected again for this input context at a later point.

InputContext.selectInputMethod looks for an input method supporting the specified locale using the results of the InputMethodDescriptor.getAvailableLocales methods of all installed input methods. If the user has previously selected an input method with the specified locale from the user interface, this input method is chosen. Otherwise it is implementation dependent which input method is chosen if multiple input methods support the specified locale.

The user interface for selecting input methods is implementation dependent. It must provide the user with a list of all available input methods and let him/her select one of them. Where an input method supports multiple locales, the user interface also lets the user select the input locale (this facility may be omitted for host adapters if the host provides an alternative facility to select the input locale). Licensees developing Java runtime environments for their own platforms are encouraged to integrate the user interface with existing user interfaces for selecting keyboards or input methods.

In Sun's Java 2 runtime environments for Windows and Solaris, the user interface consists of two parts: a "Select Input Method" menu item added to the Window menu in Motif or the System menu in Windows, and a pop-up menu brought up by this new menu item. The "Select Input Method" item is only shown if the Java runtime environment has more than one input method available or the input method supports multiple locales (the host input method adapter is treated as a single input method). The popup menu lists the available input methods, with supported locales of multi-locale input methods as submenus, and lets the user select from this list.

Composition Window

For passive clients and for active clients using below-the-spot input, the input method framework provides a composition window. The window is opened when the input method starts sending composed text; it is closed when all text is committed. At most one composition window is open at any time even if multiple compositions (using separate input contexts) are currently in progress.

For below-the-spot input, the window is automatically positioned just below the insertion point where text will be inserted after being committed. The window's location is calculated first when the window is opened, then updated whenever committed text has been dispatched to the client component. If positioning the window below the insertion point would move it partially or entirely off-screen, it is moved above the insertion point.

6. Information Flow Through the Framework

The framework provides two mechanisms to communicate information between the current client component and the current input method:

  • AWT events are used to pass information about user actions to the input method, and to notify the component of changes in the input text. This provides a programming interface that's consistent with other input operations. However, InputMethodEvents are typically dispatched synchronously to the component's methods, while other AWT events are dispatched asynchronously through the event queue.
  • The InputMethodRequests interface defines methods that an input method can call to request information from the client component. This invocation is synchronous.

Both event dispatching and calling InputMethodRequests methods are done indirectly through the input context. This lets the input context redirect information to a composition window if necessary. The composition window provides a full implementation of an active client, and so the input method can always assume it is interacting with an active client.

The following sections show the flow of events through the input method framework and explain the associated handling of input method requests. Four alternatives are described, depending on the kind of client component and the selected input style. All diagrams assume an input method implemented in the Java programming language using the input method engine SPI. Event flows for peered text components or native input methods are implementation dependent, may vary substantially, and are not shown.

Active Clients With On-the-Spot Input

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event to the component. The client component must have registered an InputMethodListener so it can handle InputMethodEvents coming from the input method and receive composed and committed text.

InputMethodRequests calls from the input method are forwarded to the object returned by the client component's getInputMethodRequests method.

Active Clients With Below-the-Spot Input

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event. Since below-the-spot input is selected, the event is redirected to the composition window, which handles it. When text is committed (partially or entirely), the composition window generates a new input method event holding the committed text for the client component. The client component must have registered an InputMethodListener so it can handle InputMethodEvents, which in this case come from the composition window and only contain committed text.

InputMethodRequests calls from the input method that relate to the display of composed text (getTextLocation, getLocationOffset) are handled by the composition window; all others are forwarded to the object returned by the client component's getInputMethodRequests method. The composition window uses the client component's getTextLocation implementation to position itself.

Passive Clients

Input events such as KeyEvent and MouseEvent are sent to the current input method through the InputContext object. If the input method uses the event for text composition, it marks the event consumed and generates an input method event. The event is redirected to the composition window, which handles it. When text is committed, the composition window translates it into key events for the actual client's key event listener. Only KEY_TYPED events are sent.

InputMethodRequests calls from the input method are handled by the composition window. Calls hat relate to the display of composed text (getTextLocation, getLocationOffset) are handled based on information about the composed text being displayed. All other calls are handled at all times based on the assumption that composition has just started and there's no committed text, because the composition window does not have access to text in the client component.

Non-Clients

Events for non-clients do not go to the input context. All events go straight to the component's listeners (here, the key listener).

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


City Input Method

Contents

  1. About City Input Method
  2. Installing and Selecting the Input Method
  3. Using the Input Method for the First Time
  4. Using the Input Method
  5. Controlling the Status Window
  6. Supported Cities and Locales

1. About City Input Method

City Input Method is a simple input method that lets users enter city names by just typing a three-character airport code and converting it to a corresponding city name. If the user enters more than one airport code (up to three at a time are possible), the input method creates a short phrase such as "From San Francisco to Beijing via Tokyo". For each city, the input method knows the city names and phrases in a number of different languages (or, more precisely, locales). City names and phrases in all supported languages can be freely mixed in any input operation. The input method can be used to enter text into any text component that supports input methods, such as a Swing text component.

2. Installing and Selecting the Input Method

To make the input method available to applications, its jar file must be installed into the extensions directory of a Java 2 runtime environment. After launching a Java application with a text component that supports input methods, the input method can be selected using the input method selection user interface provided by the runtime environment. First, make sure that a text component has the focus - typically, the text component indicates this by showing an insertion point. Then, for Sun's Java 2 Runtime Environment, choose the "Select Input Method" menu from the menu that can be pulled down from the top left corner of the window (the System menu on Windows, Window menu on Solaris), then choose "City Input Method" and the desired locale from the popup menu. Note that correct text display in some languages depends on the font configuration, so you may want to pick the locale of the host operating system or a language that is supported by most fonts, such as English or German.

3. Using the Input Method for the First Time

After selecting the input method, type "SFO", the code for San Francisco International Airport. You will see that the text is input into the text component, but highlighted to indicate that it is still being composed (for Sun's Java 2 Runtime Environment, the text is inverted on Solaris, underlined on Windows). Then type a Space character to start conversion. You will see that the airport code is replaced with the name of San Francisco in the language that you selected. The text is still highlighted, although the highlight may now look somewhat different. Type Space again. A lookup window opens, which shows the city name in all available languages, with the originally displayed name selected. Continue typing Space. You will see that the selection cycles through all the names, and that the selected name is also shown in the text component. Type Return. The lookup window disappears, and the most recently selected name is now shown in the text component without any highlight - it is committed.

4. Using the Input Method

Entering Raw Text

Raw text is any text that is entered through the input method, but hasn't been converted yet. From the moment you type the first character of an airport until you start conversion the input method is in raw text mode. In this mode, letters from "a" to "z" or their uppercase variants (the input method is case insensitive) are added to the raw text input. You can use backspace to delete a character, and you can click into the text using the mouse to move the insertion point.

Converting to City Names

You can start the conversion process from airport codes to city names when the raw text includes one, two, or three airport codes - that is, three, six, or nine characters. To start conversion, type Space. A single airport code is converted to just a city name. Two or three airport codes are converted to phrases such as "From San Francisco to Frankfurt" for two codes or "From San Francisco to Frankfurt via Chicago" for three codes. Each city name is considered a separate segment. One of the segments is selected, that is, it can be further converted using the lookup window. If there are multiple segments, the segment selection can be changed by clicking into a segment or by using the Arrow Right and Arrow Left keys.

Continuing Conversion Using the Lookup Window

The lookup window is a temporary window that shows the city names in all available languages for the airport code of the selected segment, and lets the user choose a different name. To show the window, select a segment, then type Space. The window opens just below or, if there's not enough space, in another location near the segment's text. The currently selected city name is outlined. To change the name selection, type Space, Arrow Down, or Arrow Up to cycle through all available names. To confirm a selected name, you usually commit as described in the next section. To select a name and close the lookup window without committing, type the number in front of the desired name.

Committing the Input

Committing the input text means to end input method processing of it, and make it a normal part of the text component's text body. All input method highlighting is removed from committed text. You can commit the entire input text at any time by typing Return. If you entered more than one airport code and have started conversion, you can also perform a partial commit: typing Control-Arrow Down commits the text up to the currently selected segment, but leaves following segments available for further conversion.

Conversion is requested using the Space character. During conversion, the input method first offers the city name in the selected language (if that name is available). If the user does not accept this selection, a second step brings up a choice window that offers all available names for the city, with the corresponding locale name.

5. Controlling the Status Window

The input method provides a little status window that shows the currently selected locale. Initially this window is positioned near the lower right corner of the screen, but it can be moved to a different location. To request that the status window automatically positions itself below the window containing the currently focussed text component, double-click into the status window's content area.

6. Supported Cities and Locales

The input method's knowledge of the world is limited - airport codes it knows include: SFO, NYC, JFK, LGA, ORD, FRA, MUC, TYO, NRT, HND, KIX, ITM, PEK, BJS, SHA, HKG, TPE. It currently supports the following languages: English, German, Japanese (normal and yomi), Simplified Chinese, Traditional Chinese.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Physical Fonts

Starting with the 1.2 release, the Java 2 SDK includes a set of TrueType fonts in the lib/fonts subdirectory. Prior to the 1.2 release, the JDK software relied on the host platform fonts. Logical fonts, such as Monospaced, are mapped to the host platform fonts in the font.properties file. To distinguish them from the logical fonts, this document refers to the TrueType fonts as physical fonts.

Benefits

Because physical fonts are included in the Java 2 Platform itself, programmers are guaranteed to have a uniform set of font families available for several locales for use on whatever host platform the Java runtime environment is on. This obviously lessens programmer's dependence on the fonts might be provided by the host platform, which can vary greatly from platform to platform, and from locale to locale.

The SDK's physical fonts offer the following benefits:

  • Consistent Look and Feel

    Your applications will look the same on all platforms because they will be using the same fonts. This makes testing, deployment, and support easier in a cross-platform environment.

  • Rich Character Sets

    You don't have to switch fonts if you use characters from various scripts. For example, in a text component that uses the Lucida Sans Regular font, you can display characters in Hebrew, Arabic, German, and English, which are all included as part of the SDK's Lucida Sans Regular font. (Asian character sets for the physical fonts are not supported in the current release.)

  • Euro Currency Symbol

    All of the physical fonts of the Java 2 Platform support the Euro currency symbol.

The Physical Fonts Supplied by the Java 2 Platform

The Java 2 SDK provides three font families: Lucida Sans, Lucida Bright, and Lucida Sans Typewriter. Each family contains four fonts, for a total of 12 fonts:
  • Lucida Sans Regular
  • Lucida Sans Bold
  • Lucida Sans Oblique
  • Lucida Sans Bold Oblique

  • Lucida Bright Regular
  • Lucida Bright Bold
  • Lucida Bright Italic
  • Lucida Bright Bold Italic

  • Lucida Sans Typewriter Regular
  • Lucida Sans Typewriter Bold
  • Lucida Sans Typewriter Oblique
  • Lucida Sans Typewriter Bold Oblique

Related Methods in the Java 2DTM API

  • GraphicsEnvironment.getAvailableFontFamilyNames

    Returns an array of font family names available for use, including font families provided by the host platform as well as the families provided by the SDK.

  • GraphicsEnvironment.getAllFonts

    Returns an array of physical fonts in this environment. The fonts returned include the fonts supplied by the host platform and the physical fonts of the SDK.

Using the SDK's Physical Fonts

You can use the physical fonts in the SDK in the same way that you'd use any other fonts such as those supplied by the underlying platform. For example, you can create an instance of the Lucida Sans Regular font with the usual Font constructor. For example, this constructor would create a Font instance for the Lucida Sans Regular font.
Font f = new Font("Lucida Sans", font.PLAIN, 12)
The following example would create a Font instance for the Lucida Sans Typewriter Oblique font.
Font f = new Font("Lucida Sans Typewriter", font.ITALIC, 18)

The Java 2 Platform's physical fonts are located in the jre/lib/fonts folder in the Java 2 SDK and in the lib/fonts directory of the Java 2 Runtime Environment. Users can add additional TrueType fonts to this directory for use by their programs. The TrueType fonts must be Unicode encoded.

java-intl@java.sun.com
Copyright © 1998-99 Sun Microsystems, Inc. All rights re served.


Supported Encodings

The classes java.io.InputStreamReader, java.io.OutputStreamWriter, and java.lang.String can convert between Unicode and a number of other character encodings. The supported encodings vary between different implementations of the Java 2 platform. The java.lang package specification lists the encodings that any implementation of the Java 2 platform, Standard Edition, v. 1.3 is required to support. Note that some of the required encodings have canonical names in Sun's implementations that are different from the names shown in the specification. The required names of these encodings are supported through an alias mechanism: US-ASCII maps to ASCII, ISO-8859-1 to ISO8859_1, UTF-8 to UTF8, UTF-16BE to UnicodeBigUnmarked, and UTF-16LE to UnicodeLittleUnmarked.

Sun's Java 2 Software Development Kit, Standard Edition, v. 1.3.1 for Windows or Solaris and the Java 2 Runtime Environment, Standard Edition, v. 1.3.1 for Solaris support all encodings shown on this page. Sun's Java 2 Runtime Environment, Standard Edition, v. 1.3.1 for Windows comes in two different versions: US-only and international. The US-only version only supports the encodings shown in the first table. The international version (which includes the lib\i18n.jar file) supports all encodings shown on this page.

Basic Encoding Set (contained in rt.jar)

Canonical Name | Description
ASCII | American Standard Code for Information Interchange
Cp1252 | Windows Latin-1
ISO8859_1 | ISO 8859-1, Latin alphabet No. 1
UnicodeBig | Sixteen-bit Unicode Transformation Format, big-endian byte order, with byte-order mark
UnicodeBigUnmarked | Sixteen-bit Unicode Transformation Format, big-endian byte order
UnicodeLittle | Sixteen-bit Unicode Transformation Format, little-endian byte order, with byte-order mark
UnicodeLittleUnmarked | Sixteen-bit Unicode Transformation Format, little-endian byte order
UTF8 | Eight-bit Unicode Transformation Format
UTF-16 | Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark

Extended Encoding Set (contained in i18n.jar)

Canonical Name | Description
Big5 | Big5, Traditional Chinese
Big5_HKSCS | Big5 with Hong Kong extensions, Traditional Chinese
Cp037 | USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia
Cp273 | IBM Austria, Germany
Cp277 | IBM Denmark, Norway
Cp278 | IBM Finland, Sweden
Cp280 | IBM Italy
Cp284 | IBM Catalan/Spain, Spanish Latin America
Cp285 | IBM United Kingdom, Ireland
Cp297 | IBM France
Cp420 | IBM Arabic
Cp424 | IBM Hebrew
Cp437 | MS-DOS United States, Australia, New Zealand, South Africa
Cp500 | EBCDIC 500V1
Cp737 | PC Greek
Cp775 | PC Baltic
Cp838 | IBM Thailand extended SBCS
Cp850 | MS-DOS Latin-1
Cp852 | MS-DOS Latin-2
Cp855 | IBM Cyrillic
Cp856 | IBM Hebrew
Cp857 | IBM Turkish
Cp858 | Variant of Cp850 with Euro character
Cp860 | MS-DOS Portuguese
Cp861 | MS-DOS Icelandic
Cp862 | PC Hebrew
Cp863 | MS-DOS Canadian French
Cp864 | PC Arabic
Cp865 | MS-DOS Nordic
Cp866 | MS-DOS Russian
Cp868 | MS-DOS Pakistan
Cp869 | IBM Modern Greek
Cp870 | IBM Multilingual Latin-2
Cp871 | IBM Iceland
Cp874 | IBM Thai
Cp875 | IBM Greek
Cp918 | IBM Pakistan (Urdu)
Cp921 | IBM Latvia, Lithuania (AIX, DOS)
Cp922 | IBM Estonia (AIX, DOS)
Cp930 | Japanese Katakana-Kanji mixed with 4370 UDC, superset of 5026
Cp933 | Korean Mixed with 1880 UDC, superset of 5029
Cp935 | Simplified Chinese Host mixed with 1880 UDC, superset of 5031
Cp937 | Traditional Chinese Host miexed with 6204 UDC, superset of 5033
Cp939 | Japanese Latin Kanji mixed with 4370 UDC, superset of 5035
Cp942 | IBM OS/2 Japanese, superset of Cp932
Cp942C | Variant of Cp942
Cp943 | IBM OS/2 Japanese, superset of Cp932 and Shift-JIS
Cp943C | Variant of Cp943
Cp948 | OS/2 Chinese (Taiwan) superset of 938
Cp949 | PC Korean
Cp949C | Variant of Cp949
Cp950 | PC Chinese (Hong Kong, Taiwan)
Cp964 | AIX Chinese (Taiwan)
Cp970 | AIX Korean
Cp1006 | IBM AIX Pakistan (Urdu)
Cp1025 | IBM Multilingual Cyrillic: Bulgaria, Bosnia, Herzegovinia, Macedonia (FYR)
Cp1026 | IBM Latin-5, Turkey
Cp1046 | IBM Arabic - Windows
Cp1097 | IBM Iran (Farsi)/Persian
Cp1098 | IBM Iran (Farsi)/Persian (PC)
Cp1112 | IBM Latvia, Lithuania
Cp1122 | IBM Estonia
Cp1123 | IBM Ukraine
Cp1124 | IBM AIX Ukraine
Cp1140 | Variant of Cp037 with Euro character
Cp1141 | Variant of Cp273 with Euro character
Cp1142 | Variant of Cp277 with Euro character
Cp1143 | Variant of Cp278 with Euro character
Cp1144 | Variant of Cp280 with Euro character
Cp1145 | Variant of Cp284 with Euro character
Cp1146 | Variant of Cp285 with Euro character
Cp1147 | Variant of Cp297 with Euro character
Cp1148 | Variant of Cp500 with Euro character
Cp1149 | Variant of Cp871 with Euro character
Cp1250 | Windows Eastern European
Cp1251 | Windows Cyrillic
Cp1253 | Windows Greek
Cp1254 | Windows Turkish
Cp1255 | Windows Hebrew
Cp1256 | Windows Arabic
Cp1257 | Windows Baltic
Cp1258 | Windows Vietnamese
Cp1381 | IBM OS/2, DOS People's Republic of China (PRC)
Cp1383 | IBM AIX People's Republic of China (PRC)
Cp33722 | IBM-eucJP - Japanese (superset of 5050)
EUC_CN | GB2312, EUC encoding, Simplified Chinese
EUC_JP | JIS X 0201, 0208, 0212, EUC encoding, Japanese
EUC_JP_LINUX | JIS X 0201, 0208, EUC encoding, Japanese
EUC_KR | KS C 5601, EUC encoding, Korean
EUC_TW | CNS11643 (Plane 1-3), EUC encoding, Traditional Chinese
GBK | GBK, Simplified Chinese
ISO2022CN | ISO 2022 CN, Chinese (conversion to Unicode only)
ISO2022CN_CNS | CNS 11643 in ISO 2022 CN form, Traditional Chinese (conversion from Unicode only)
ISO2022CN_GB | GB 2312 in ISO 2022 CN form, Simplified Chinese (conversion from Unicode only)
ISO2022JP | JIS X 0201, 0208 in ISO 2022 form, Japanese
ISO2022KR | ISO 2022 KR, Korean
ISO8859_2 | ISO 8859-2, Latin alphabet No. 2
ISO8859_3 | ISO 8859-3, Latin alphabet No. 3
ISO8859_4 | ISO 8859-4, Latin alphabet No. 4
ISO8859_5 | ISO 8859-5, Latin/Cyrillic alphabet
ISO8859_6 | ISO 8859-6, Latin/Arabic alphabet
ISO8859_7 | ISO 8859-7, Latin/Greek alphabet
ISO8859_8 | ISO 8859-8, Latin/Hebrew alphabet
ISO8859_9 | ISO 8859-9, Latin alphabet No. 5
ISO8859_13 | ISO 8859-13, Latin alphabet No. 7
ISO8859_15_FDIS | ISO 8859-15, Latin alphabet No. 9
JIS0201 | JIS X 0201, Japanese
JIS0208 | JIS X 0208, Japanese
JIS0212 | JIS X 0212, Japanese
JISAutoDetect | Detects and converts from Shift-JIS, EUC-JP, ISO 2022 JP (conversion to Unicode only)
Johab | Johab, Korean
KOI8_R | KOI8-R, Russian
MS874 | Windows Thai
MS932 | Windows Japanese
MS936 | Windows Simplified Chinese
MS949 | Windows Korean
MS950 | Windows Traditional Chinese
MacArabic | Macintosh Arabic
MacCentralEurope | Macintosh Latin-2
MacCroatian | Macintosh Croatian
MacCyrillic | Macintosh Cyrillic
MacDingbat | Macintosh Dingbat
MacGreek | Macintosh Greek
MacHebrew | Macintosh Hebrew
MacIceland | Macintosh Iceland
MacRoman | Macintosh Roman
MacRomania | Macintosh Romania
MacSymbol | Macintosh Symbol
MacThai | Macintosh Thai
MacTurkish | Macintosh Turkish
MacUkraine | Macintosh Ukraine
SJIS | Shift-JIS, Japanese
TIS620 | TIS620, Thai

Copyright © 1996-2001 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Editing the font.properites Files

Editing the font.properties Files

  • Naming of the font.properties Files
  • Using the font.properties File
  • Adding Locale-Specific Fonts to the Java Runtime
    • Step 1: Install the Font
    • Step 2: Copy the Font
    • Locale Symbols for Fonts
  • Using Multiple Fonts in the Runtime
    • Specifying Fonts on Win32 Platform
    • Font file names
    • Win32 Font Files
    • Specifying Fonts on Solaris Platform
  • Testing for correct xlfd strings in the font.properties files
    • Note about scalable fonts
    • Solaris Font Files
    • Exclusion ranges
  • The Charset Converter
    • Step 1. Create fontcharset Converter
    • Step 2. Add Font and Converter to Properties File
  • Debugging font.properties files

This document explains how to add Asian and other language fonts to the Java Runtime by editing the font.properties files.

At this time, this document describes how to install Japanese, Korean, Chinese, and Traditional Chinese fonts to your system.

The Java 2 SDK for Win32 platforms supports TrueType and Postscript Type1 fonts. The Java 2 SDK for Solaris supports scalable outline fonts that can be handled by an X11 server, such as F3, Type1, and TrueType.

Naming of the font.properties Files

There are several font.properties files that come bundled with the Java 2 SDK. You can find these files in the directory ../lib that is beneath the directory where Java is installed. These files contain standard font environment information. The explanations that follow assume that the readers of this document are working in an English environment. In an English environment, the default font.properties file has no suffix on its file name, as follows:
font.properties
However, different operating systems have different fonts installed so there is a provision to read font properties files with the operating system version embedded in the name. For instance, Solaris 2.5.1 does not have support for TrueType fonts so the font properties file, font.properties.5.5.1, will include only F3 fonts. Thus, we first look for a file named:
font.properties.<osVersion>
where <osVersion> is the version returned by System.getProperty("os.version") for most systems. On Windows NT, this method is overridden to return NT4.0 instead of 4.0 to distinguish between NT and 95.

However, if your environment is Japanese, Korean, Chinese, or Traditional Chinese, then you must use the font.properties file that corresponds to your particular environment. These files can be identified by the country or locale suffix that is appended to the file name, as follows:

font.properties.<locale>
where locale is one of:
ja

ko

zh

zh_TW

...
Select the file with the suffix for the particular font that you are interested in. Thus, for Traditional Chinese, you would access the file font.properties.zh_TW.

NOTE: The <locale> is actually comprised of <language>_<region>_<encoding> where

<language> is the string returned from System.getProperty("user.language")

<region> is the string returned from System.getProperty("user.region")

<encoding> is the string returned from System.getProperty("file.encoding")

This font.properties.<locale> name can be augmented by the operating system version also. To sum up, the font properties files are searched in the following order:

font.properties.<language>_<region>_<encoding>.<osVersion>
font.properties.<language>_<region>_<encoding>
font.properties.<language>_<region>.<osVersion>
font.properties.<language>_<region>
font.properties.<language>_<encoding>.<osVersion>
font.properties.<language>_<encoding>
font.properties.<language>_<osVersion>
font.properties.<language>
font.properties.<encoding>.<osVersion>
font.properties.<encoding>
font.properties.<osVersion>
font.properties

Using the font.properties File

You must work with the font.properties file to add fonts to the Java Runtime. The font.properties file is platform- specific. It indicates the fonts that a particular platform uses for its Java virtual fonts. Fonts are grouped by types or classes. Currently, the Java Runtime supports the following classes of logical fonts:
  • Serif
  • Sans-serif
  • Monospaced
  • Dialog
  • DialogInput

and the following font styles:

  • plain
  • bold
  • italic
  • bolditalic

The font.properties file defines certain information about the fonts for your platform. This includes aliases, such as:

alias.timesroman=serif

alias.helvetica=sansserif
NOTE: This is a bad example since timesroman and helvetica are actual font names and in the Java 2 Platform, we no longer alias these names to a virtual font. Do not use names "Times", "Helvetica", for serif, sans serif, respectively, etc.

It also includes descriptions for the fonts. The descriptions differ between the Win32 and Solaris platforms. Our examples use serif fonts to illustrate how fonts are specified and converted, if necessary. However, the same entries apply to other types of fonts. In general, there are entries in the font properties file that specify the fonts you want to use. These entries have the following format:

   <virtual font name>.<style>.<index number> = <platform font name>, attributes
The virtual font name is the name of the font as recognized by the Java Runtime. The platform font name is the actual name of the font on your platform. For example, Dialog and Serif are Java font names, while Times and Helvetica are the native font names on a Win32 or Solaris platform. The index number specifies the order of searching for matching font glyphs, with zero the highest priority.

In the Java 2 Platform, the full matrix of virtual font name and style must be complete. For example, you must have serif, serif.bold serif.italic, serif.bolditalic. Note that serif> is equivalent to serif.plain. All names in this file are case-insensitive.

For example, in the Solaris font.properties file in JDK1.1, the serif entries are as follows:

 serif.plain.0=-linotype-times-medium-r-normal--*-%d-*-*-p-*-iso8859-1
 serif.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
 serif.2=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific

 serif.italic.0=-linotype-times-medium-i-normal--*-%d-*-*-p-*-iso8859-1

 serif.bold.0=-linotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-1

 serif.bolditalic.0=-linotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-1
As you can see, only the first entry of "serif.plain", "serif.italic", "serif.bold" and "serif.bolditalic" were specified. The second and third entry of the font would default to "serif.1" and "serif.2" in each case (since the same two fonts were used in each of the "serif" fonts styles). However, in the Java 2 SDK font.properties, the entire matrix must be specified:
 serif.0=-linotype-times-medium-r-normal--*-%d-*-*-p-*-iso8859-1
 serif.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
 serif.2=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific

 serif.italic.0=-linotype-times-medium-i-normal--*-%d-*-*-p-*-iso8859-1
 serif.italic.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
 serif.italic.2=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific

 serif.bold.0=-linotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-1
 serif.bold.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
 serif.bold.2=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific

 serif.bolditalic.0=-linotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-1
 serif.bolditalic.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
 serif.bolditalic.2=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
As mentioned earlier, the key value for the plain style, plain does not need to be specified (serif.0 defaults to the plain style), however italic, bold or bolditalic must be specified for those styles.

Adding Locale-Specific Fonts to the Java Runtime

There are two steps you must take to use locale-specific fonts, such as the Japanese font, on an English environment platform.

Step 1: Install the Font

First, you must install the locale-specific font (for example, Japanese, Korean, Chinese, or Traditional Chinese font) to your system. For Windows platform users, Microsoft delivers these Asian fonts free with the NT4.0 installation CD. Or, you can download these fonts from the Microsoft World Wide Web home page. Solaris users must contact SunSoft to request the Asian outline fonts for Solaris environments.

Step 2: Copy the Font

Once you have installed the fonts on your system, copy the font description that you are interested in to font.properties. The easiest way to add one Asian font is to rename the font.properties.<locale> file to be the new font.properties file. The locale symbol represents the font name that you are interested in. No editing is required when you replace font.properties with font.properties.<locale> because font.properties.<locale> is a superset of font.properties. These are the locale symbols that specify the different font properties files:

Locale Symbols for Fonts

Font Name | font.properties Symbol
Japanese | ja
Korean | ko
Chinese | zh
Traditional Chinese | zh_TW

Thus, to use the the Korean font, you copy or rename font.properties.ko to font.properties.

Using Multiple Fonts in the Runtime

It is possible to use more than one Asian font in your runtime. To do this, you must edit the font.properties file. This section describes the edits you need to make to the file to use multiple Asian fonts.

Specifying Fonts on Win32 Platform

There are three default serif fonts available on an English language Win32 platform. These fonts are:

  • Arial
  • WingDings
  • Symbol

In addition, the descriptions for these serif fonts in the font.properties file are as follows:

serif.0=Arial,ANSI_CHARSET

serif.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED

serif.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
These three lines together indicate the indexes for the three serif fonts that are available on this platform. Each line indicates one serif font, followed by the index for that font.

The numbers (0, 1, and 2) that appear after the word serif, such as serif.0, indicate the order in which the font glyphs are searched for a corresponding match with the Unicode, or Java string encoding, codepoint. Thus, if serif.0 and serif.1 both have the glyph that corresponds to the same Unicode codepoint, then the glyph for serif.0 will be used.

The first argument is the face name of the Win32 native font. Each line names a particular font. For example, the line for serif.0 names the font Arial, while the line for serif.2 names the font Symbol.

The second argument takes the form *_CHARSET. In our example, it is either ANSI_CHARSET or SYMBOL_CHARSET. This argument indicates the charset entry of the corresponding font in Win32. (See the Win32 API document for more details.)

The third argument, if present, is NEED_CONVERTED. This argument indicates that the corresponding platform font cannot be accessed with Unicode. When this argument is present, the Java Runtime needs to convert the Unicode string to this font index before attempting to use the glyph for the font. Fonts that have this NEED_CONVERTED argument must have a corresponding fontcharset entry, which indicates the charset converter to use to convert the Unicode string.

In our example, both serif.1 and serif.2 have the NEED_CONVERTED argument. Both have fontcharset entries in the font.properties file, as follows:

fontcharset.serif.1=sun.awt.windows.CharToByteWingDings

fontcharset.serif.2=sun.awt.CharToByteSymbol
The fontcharset entry for serif.1 indicates that, to draw the WingDings glyph, the Unicode string should be converted using the sun.awt.windows.CharToByteWingDings converter. (Recall that the font.properties file has already established the font for serif.1 as WingDings.)

The specification for the charset converter is described later in the section The Charset Converter.

NOTE: In the current implementation of the Java 2 Platform, NEED_CONVERTED is not used.

Font file names

To reduce initialization time, there is now a way to specify the mapping between logical font name to physical font name. For instance:
filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF
The first entry shows the mapping between the font name Arial and the physical font name, ARIAL.TTF. The next entries show the mapping for Arial with the different styles applied. This shortens the initialization time since we don't have to open every font file to find a font of that particular name.

Win32 Font Files

The current Win32 JDK build provides the following font properties files:

./lib/font.properties

./lib/font.properties.ar

./lib/font.properties.iw

./lib/font.properties.ja

./lib/font.properties.ko

./lib/font.properties.ru

./lib/font.properties.th

./lib/font.properties.zh

./lib/font.properties.zh.NT4.0

./lib/font.properties.zh_TW
If you need a different font from what is provided, then you must create your own font properties file.

Specifying Fonts on Solaris Platform

In the Java 2 SDK, the fonts specified in the font.properties file should reference scalable fonts. This does not mean that the scalable font will always be used when a specific font point size is requested however. The way in which X11 works is that given an xlfd string such as

    -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-1

the Xserver will first look for a scalable font that matches the entries found in the xlfd string (for font foundry, font family, style, slant, encoding, etc). However, it then will continue to look for a bitmap font which matches this xlfd string exactly, for this specific pixel/point size (in this case 10 pt). If one is found, then X11 will return the bitmap directly read from the bitmap font file which is used rather than a bitmap generated from the data found in the scalable font file.

For example, the serif font on an English Solaris (2.6+) platform consists of the following fonts:

serif.0=-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1
serif.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
serif.2=-*-symbol-medium-r-normal-*-*-%d-*-*-p-*-adobe-symbol

serif.italic.0=-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1
serif.italic.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
serif.italic.2=-*-symbol-medium-r-normal-*-*-%d-*-*-p-*-adobe-symbol

serif.bold.0=-monotype-times new roman-bold-r---*-%d-*-*-p-*-iso8859-1
serif.bold.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
serif.bold.2=-*-symbol-medium-r-normal-*-*-%d-*-*-p-*-adobe-symbol

serif.bolditalic.0=-monotype-times new roman-bold-i---*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
serif.bolditalic.2=-*-symbol-medium-r-normal-*-*-%d-*-*-p-*-adobe-symbol

These lines from the Solaris font.properties file indicate the indexes for serif fonts with different styles. For example, the font whose face name is serif and whose style is plain consists of serif.0, serif.1, and serif.2. In addition, these lines indicate that the serif font with the style italic consists of serif.italic.0, serif.italic.1, and serif.italic.2.

Currently, the index of Solaris (X11) font is not a Unicode index. Because it is not Unicode, the font always needs to be converted. Each entry must have a corresponding fontcharset entry to indicate how it should be converted, as follows:

fontcharset.serif.0=sun.io.CharToByte8859_1

fontcharset.serif.1=sun.awt.motif.CharToByteX11Dingbats

fontcharset.serif.2=sun.awt.CharToByteSymbol
For example, the line:

fontcharset.serif.0=sun.io.CharToByte8859_1
indicates that all serif.0 fonts, regardless of whether the type is plain (serif.plain.0), bold (serif.bold.0), italics (serif.italic.0), or bold and italics (serif.bolditalic.0), will be converted using the sun.io.CharToByte8859_1 converter.

Testing for correct xlfd strings in the font.properties files

The reason scalable fonts should be specified however is because Java2D can only perform certain operations on scalable fonts, such as generating outlines. Currently the Java2D code can recognize scalable fonts such as TrueType, Type1 or F3. Therefore, when entering xlfd strings in the font.properties file, look for these types of fonts installed on the system and specify those. TrueType fonts will typically have the file extension of "ttf". Type 1 fonts will have either "pfa" or "pfb" as the extension. F3 fonts will have the extension "f3b". On Solaris 2.6, in "C" locale, with all packages installed, you can find fonts of these formats in:

    Type1:    /usr/openwin/lib/X11/fonts/Type1
      TrueType: /usr/openwin/lib/X11/fonts/TrueType
      F3:       /usr/openwin/lib/X11/fonts/F3

In other locales, the fonts will be installed in a directory such as /usr/openwin/lib/locale/. For example, in JA locale, under /usr/openwin/lib/locale/ja, there are fonts installed in:

    TrueType: /usr/openwin/lib/locale/ja/X11/fonts/TT
    F3:       /usr/openwin/lib/locale/ja/X11/fonts/F3

The location of the font files may be different depending on locale (that is, may not always be /usr/openwin/lib/locale/<locale>/X11/fonts), but they are typically under the /usr/openwin/lib/locale/<locale> directory somewhere.

Once the scalable fonts have been located, look at the "fonts.dir" file that will be found in the directory with the scalable font files. This file lists all of the valid xlfd strings for the fonts contained in that directory. For example, in the "fonts.dir" file located in the /usr/openwin/lib/locale/ja/X11/fonts/TT directory, there is an entry like this:

    HG-MinchoL.ttf -ricoh-hg mincho l-medium-r-normal--0-0-0-0-m-0-jisx0208.1983-0

In the xlfd string, you will see 4 consecutive zero (0) values. These indicate the pixel size, point size, resolution x and resolution y values. When copying this xlfd string into a font.properties entry, remember to replace the point size (the second "0") with a "%d" which is later replaced with a specific point size when the font is used. Also, replace the other "0" values with "*" (asterisk) to indicate that any value may match this field. So, for example, if the above font was to be used as entry for the "serif" font specified in the font.properties file, it would look like:

    serif.1=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0

When the font is actually used, the point size specified when the Java "Font" object is created is used (the "%d" is replaced with this value), and the font is initialized for use at that point size.

One way to verify that the xlfd strings that you have entered in the font.properties file are correct is to try and display that font using "xfd". "xfd" is an X11 application in /usr/openwin/bin that displays all of the characters found in a font. To run the application, you specify the font (as an xlfd string). To verify an xlfd entry in a font.properties file, replace the "%d" with a valid point size such as 120 (for 12 pt), 140 (for 14 pt), 160 (for 16 pt), etc. (xlfd point size is 10 times the "pixel size" where "pixel size" is normally thought of as the font point size). So, in the above example, with the "serif.1" entry for a Japanese font.properties file, to verify that this xlfd string is correct, run:

    % xfd -fn "-ricoh-hg mincho l-medium-r-normal--*-140-*-*-m-*-jisx0208.1983-0"

If the xlfd string is incorrect, "xfd" will not display a window, and will exit immediately and print out an error message like this:

    Warning: Cannot convert string "<xlfd string>" to type FontStruct
    xfd:  no font to display

If the xlfd string is correct, a window will appear with all of the characters specified in that font. If there are more than 256 characters, then only the first 256 are displayed, but the user may look through all entries by hitting the "NextPage" button displayed on the application.

Note about scalable fonts

Remember that the fonts specified in the font.properties files must be in one of the formats mentioned above (TrueType, Type1 or F3). If there no fonts installed on the system in those formats, then Java2D will not find any valid fonts so operations like drawString ("some Text") will not work.

There are bugs in the X server for Type1 fonts (more problems in 2.5.1 than 2.6) so it is preferable to avoid Type1 fonts also.

Solaris Font Files

The font properties files provided by the Java 2 SDK are located in the jre/lib directory. (In the Java 2 Runtime Environment, the they are located in the lib directory.) As of version 1.3, the font properties files included with the SDK and Runtime Environment are the following.

font.properties
font.properties.5.5.1
font.properties.ISO8859_15_FDIS
font.properties.UTF8
font.properties.UTF8.5.6
font.properties.UTF8.5.7
font.properties.cs
font.properties.el
font.properties.hu
font.properties.ja
font.properties.ja.5.5.1
font.properties.ko
font.properties.ko.5.5.1
font.properties.ko.5.6
font.properties.ko.5.7
font.properties.ko_KR_UTF8
font.properties.ko_KR_UTF8.5.6
font.properties.ko_KR_UTF8.5.7
font.properties.lt
font.properties.lt_ISO8859_13
font.properties.lv
font.properties.lv_ISO8859_13
font.properties.pl
font.properties.ru
font.properties.tr
font.properties.zh_CN_UTF8
font.properties.zh_EUC_CN
font.properties.zh_EUC_CN.5.5.1
font.properties.zh_GBK
font.properties.zh_TW_Big5
font.properties.zh_TW_Big5.5.5.1
font.properties.zh_TW_Big5.5.6
font.properties.zh_TW_EUC_TW
font.properties.zh_TW_EUC_TW.5.5.1
font.properties.zh_TW_UTF8

If you need a different font from what is provided, then you must create your own font properties file.

Exclusion ranges

As mentioned in the previous sections, the numbers after the virtual font name indicate the order in which the actual fonts are searched to find the requested glyph. There are sometimes overlapping ranges of glyphs in each of the physical fonts that comprise the virtual font. An exclusion range can be added to limit the range in which glyphs are searched in a physical font.

For example, in the Solaris font.properties.ja file, the following describes a monospaced font:

monospaced.plain.0=-morisawa-gothic medium bbb-medium-r-normal-sans-*-%d-*-*-m-*-jisx0201.1976-0
monospaced.plain.1=-morisawa-gothic medium bbb-medium-r-normal-sans-*-%d-*-*-m-*-jisx0208.1983-0
monospaced.plain.2=-morisawa-gothic medium bbb-medium-r-normal-sans-*-%d-*-*-m-*-jisx0201.1976-0
monospaced.plain.3=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
monospaced.plain.4=--symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
The corresponding exclusion range is as follows:
exclusion.monospaced.0=0080-ffff

Thus, glyphs in the range, Unicode 0x0080 to Unicode 0xffff, are excluded from the first font in the virtual font so the subsequent fonts (monospaced.plain.1, monospaced.plain.2, monospaced.plain.3, monospaced.plain.4) will be searched for those glyphs.

The Charset Converter

The charset converter converts Unicode, or Java string encoding, to the index of the font. For font drawing, the runtime environment uses the charset converter that is the subclass of sun.io.CharToByteConverter.

To add your own font to the runtime environment, you need to create a charset converter and specify it in the font.properties file.

The following example illustrates how to add your own platform font to the Java serif font. In this example, your font contains 256 glyphs, which are indexed 0 - 0xff. Your font's glyphs correspond to Unicode 0xe000 - 0xe0ff. This example is divided into two steps. First, you create your fontcharset converter class. Second, you specify your font name and converter class name in the font.properties file file.

Step 1. Create fontcharset Converter

This is the Java code for creating the fontcharset converter.

package mypkg.converter;

import sun.io.CharToByte8859_1;
import sun.io.CharToByteConverter;
import sun.io.ConversionBufferFullException;

public class CharToByteMyFont extends sun.io.CharToByte8859_1 {

   /*
    * This method indicates the range this font covers.
    */
   public boolean canConvert(char ch) {
      if (ch >= 0xe000 && ch <= 0xe0ff)="0xe0ff)" {="{" return="return" true;="true;" }="}" return="return" false;="false;" }="}" /*="/*" *="*" This="This" method="method" converts="converts" the="the" unicode="unicode" to="to" this="this" font="font" index.="index." */="*/" public="public" int="int" convert(char[]="convert(char[]" input,="input," int="int" inStart,="inStart," int="int" inEnd,="inEnd," byte[]="byte[]" output,="output," int="int" outStart,="outStart," int="int" outEnd)="outEnd)" throws="throws" ConversionBufferFullException="ConversionBufferFullException" {="{" int="int" outIndex="outStart;" for="for" (int="(int" i="inStart;" i="i" <="<" inEnd;="inEnd;" i++)="i++)" {="{" char="char" ch="input[i];" if="if" (ch="(ch">= 0xe000 && ch <= 0xe0ff)="0xe0ff)" {="{" if="if" (outIndex="(outIndex">= outEnd)
            throw new ConversionBufferFullException();
            output[outIndex++] = (byte)(ch - 0xe000);
         }
      }
      return outIndex - outStart;
   }

   /*
    * This method indicates the charset name for this font.
    */
   public String toString() {
      return "MyFont";
   }
}

Step 2. Add Font and Converter to Properties File

You must first set the font name in the font.properties file. Do this by adding an index entry for the font. For example, for a serif font, add a line that designates the serif font followed by the next sequential index number in the file. The Java Runtime requires that the index numbers for any one font be continuous.

Thus, to add a serif font to our previous example font.properties file, you would insert the following line:

serif.3=<your own font name>
The index number must be the next highest index number in the properties file. In our example file, we have already used serif.0, serif.1, and serif.2. Therefore, the new serif font must be serif.3. Had we used a number that was discontinuous, such as serif.5, the Java Runtime would not use that entry.

Next, you must define the converter for this font. This requires a fontcharset entry for the new font, in this case, serif.3. The following line is the fontcharset entry that uses the converter created in the Java code example:

fontcharset.serif.3=mypkg.converter.CharToByteMyfont
You must also ensure that your new converter is visible to the Java Runtime. To ensure that the Java Runtime can see your converter, your java application classpath must include the class path to the converter. In our example, we must be sure that the class mypkg.converter.CharToByteMyfont is visible to the Java Runtime. The simplest way to do this is to put this class under your $JDK_HOME/classes/myown/package directory.

Debugging font.properties files

The best way to debug a custom font.properties file is by comparing it with an existing file. First, you need to find the correct font.properties file (based on osversion, region, encoding, language). Then if you check the differences between your file and the standard file, the only differences should be the fonts you wish to substitute (and possibly other fields related to the new fonts, such as exclusion ranges).

Next, run a test such as SymbolTest in demo/applets/SymbolTest and see if the standard logical fonts are displayed.


Font Overview

Contents

Physical Fonts and Logical Fonts
The font.properties Files
Location of Physical Fonts
Adding Fonts

Physical Fonts and Logical Fonts

There are two types of fonts -- physical fonts and logical fonts. Physical fonts are the actual font libraries consisting of, for example, TrueType or PostScript Type 1 fonts. The physical fonts may be Time, Helvetica, Courier, or any number of other fonts, including international fonts. For more information, see Physical Fonts.

Logical fonts are the five font types that have been recognized by the Java platform since version 1.0: Serif, Sans-serif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries that are installed anywhere on your system. They are merely font-type names recognized by the Java runtime which must be mapped to some physical font that is installed on your system. In addition to the five logical font types, the Java runtime recognizes four logical font styles: plain, bold, italic, and bolditalic.

The font.properties Files
The mapping of logical font types (and styles) to physical fonts is handled by the font.properties files. The font.properties files are located in the jre/lib directory of the Java 2 SDK or the lib directory of the Java 2 Runtime Environment. Because the physical fonts available will depend on the operating system and the locale, the SDK and Runtime Environments come with a variety of font.properties files for different locales and (in the case of the Solaris operating system) for different operating system versions.

When an application or applet wants to invoke a font by using a logical name such as Serif or Monospace, the runtime environment looks up in the font.properties file the physical font that is mapped to that logical name and then loads and uses that physical font. For example, on both Solaris 2.6/2.7 and Microsoft Windows operating systems, the font.properties file maps the Serif logical font to the Times New Roman physical font. This means that the following two constructors would create the same font:

new Font("Serif", Font.PLAIN, 12)  // Logical font name is mapped
                                   // to Times New Roman by
                                   // font.properties file

new Font("Times New Roman", Font.PLAIN, 12) // Physical font is
                                            // invoked directly;
                                            // no need for mapping
Here we see that the first (String) parameter in the Font constructor can be either a logical font type or the family name of a physical font. Available font family names may be obtained by using the getAvailableFontFamilyNames method of class java.awt.Graphdics Environment.

Location of Physical Fonts
Physical font files can be installed in either an operating system's standard location for fonts or in the jre/lib/fonts library of the Java 2 SDK (or in the lib/fonts directory of the Java 2 Runtime Environment). Fonts in either the operating system's standard location or in the lib/font directory will be on the Java runtime's "font path" and can be used by applications and applets.

Adding Fonts
The following TrueType fonts come already installed in the Java 2 SDK's jre/lib/font directory.
LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf
LucidaSansDemiBold.ttf
LucidaSansDemiOblique.ttf
LucidaSansOblique.ttf
LucidaSansRegular.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterBoldOblique.ttf
LucidaTypewriterOblique.ttf
LucidaTypewriterRegular.ttf
In addition, many are fonts pre-installed on Microsoft Windows and Solaris operating systems. Other fonts can be easily added. The additional fonts may be installed by the operating system so that they are placed in the operating system's standard font location. For example, Asian fonts are available for Win32 systems from Microsoft's web site and on the Windows NT 4.0 installation CD-ROM. The Win32 operating systems will install these fonts in the standard location for fonts. These fonts can then be found by the Java runtime.

Another option for installing fonts is for the user to place the fonts directory in the SDK's jre/lib/font directory (or the Runtime Environment's lib/font directory). Fonts located there will also be found by the Java runtime. Files placed in jre/lib/font directory must be Unicode encoded TrueType fonts.

It is not necessary to edit the font.properties files after you have added new fonts to your system. You can invoke the new font directly by using its font family name. You would need to edit the font.properties files only in the situation in which you wanted to map one of the logical font types (Serif, Sans-serif, Monospace, Dialog, and DialogInput) to a new font, or if you want to make some locale-specific mapping. For information on editing the font.proprerties files, see Editing the font.properites Files

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Internationalization Frequently Asked Questions

Java

Internationalization
Frequently Asked Questions

This page answers common questions about internationalization of the Java 2 platform, Standard Edition, version 1.3.1, and of Sun's Java 2 Runtime Environments, Standard Edition, version 1.3.1. For more information, see the Internationalization home page.

  • General Questions
  • Locales
  • Resource Bundles
  • Text Processing
  • Character Encodings
  • Text Input
  • Text Rendering
  • Component Orientation
  • Miscellaneous

General Questions

What is internationalization?

Internationalization allows software to be adapted to any language and cultural convention. During the internationalization process, the programmer isolates the parts of a program that are dependent on language and culture. For example, the programmer will isolate error messages because they must be translated during localization.

What is localization?

Localization is the process of adapting a program for use in a specific locale. A locale is a geographic or political region that shares the same language and customs. Localization includes the translation of text such as GUI labels, error messages, and online help. It also includes the culture-specific formatting of data items such as monetary values, times, dates, and numbers.

How do I go about internationalizing an existing program?

See the steps outlined in the Checklist section of the The Java Tutorial.

Locales

What is a locale?

A locale is a geographic or political region that shares the same language and customs. In the Java programming language, a locale is represented by a Locale object. Locale-sensitive operations, such as collation and date formatting, vary according to locale.

Where can I find some coding examples that use Locale objects?

See the Setting the Locale section of the The Java Tutorial.

Which locales are supported?

The supported locales vary between different implementations of the Java 2 platform and between areas of functionality. Information about the supported locales in Sun's Java 2 Runtime Environments is provided by the Supported Locales document.

Can a Java application use multiple locales?

Yes. This capability allows you to create multilingual applications.

Resource Bundles

What is a resource bundle?

A ResourceBundle object allows you to isolate localizable elements from the rest of the application. With all resources separated into a bundle, the application simply loads the appropriate bundle for the active locale. If the user switches locales, the application just loads a different bundle.

Where can I find some coding examples that use ResourceBundle objects?

See the Isolating Locale-Specific Data section of the The Java Tutorial.

How do I specify non-ASCII strings in a properties file?

You can specify any Unicode character with the \uXXXX notation. (The XXXX denotes the 4 hexadecimal digits that comprise the Unicode value of a character.) For example, a properties file might have the following entries:

s1=hello there
s2=\uff2d\uff33\u30b4

If you have edited and saved the file in a non-ASCII encoding, you can convert it to ASCII with the native2ascii tool. For example, you might want to do this when editing a properties file in Shift-JIS, a popular Japanese encoding.

How do I compile a non-ASCII ListResourceBundle?

If your source file is in a non-ASCII encoding, you can direct the compiler to convert it into Unicode. For example, you would compile a Japanese resource bundle written in the Shift-JIS encoding as follows:

javac -encoding SJIS LabelsResource_ja.java

Text Processing

How do I format a date?

You can use the SimpleDateFormat to format and parse dates in a locale-sensitive manner. See the section on formatting Dates and Times in the The Java Tutorial.

How does setting the default locale affect the results of sorting?

The Collator class, and its subclasses, are used for building sorting routines. These classes are locale-sensitive, and when created with the no-argument constructor will use the collating sequence of the default locale.

The Collator object supports different levels of decomposition and strength. How do I choose the right decomposition and strength in a locale?

Since decomposing takes time, turning decomposition off makes comparisons go faster. However, for Latin languages the NO_DECOMPOSITION mode is not useful if the text contains accents. You should use the default decomposition unless you really know what you're doing.

The strength property you choose depends on what your application is trying to accomplish. For example, when performing a text search you may allow a "weak" match, in which accents and differences in case (upper vs. lower) are ignored. This type of search employs the PRIMARY strength. If you are sorting a list of words, you might want to use the TERTIARY strength. In this mode the properties that must match are the base character, accent, and case.

Character Encodings

What is a character encoding?

A character encoding is a mapping between characters and code values.

What is Unicode?

In the Java programming language, char values represent Unicode characters. Unicode is a 16-bit character encoding that supports the world's major languages. You can learn more about the Unicode standard at the Unicode Consortium web site.

How do I convert data between Unicode and other character encodings?

The Converting Non-Unicode Text section of the The Java Tutorial explains how to peform the conversions within an application. To convert data files, use the native2ascii tool.

Which character encodings are supported when converting text to and from Unicode?

See the Supported Encodings web page.

How do I create my own character converters?

Version 1.3 of the Java 2 platform does not provide public interfaces that let application developers create their own character converters. There is a project underway that will define such public interfaces as part of the New I/O APIs. Licensees that create their own Java 2 runtime environments can use the internal interfaces in the sun.io package to create their own character converters.

What is the default encoding?

The default encoding is selected by the Java runtime based on the host operating system and its locale. For example, in the US locale on Windows, Cp1252 is used. In the Simplified Chinese locale on Solaris, either EUC_CN or GBK can be the default encoding, depending on the selection made when logging into Solaris.

The default encoding is significant because the Java programming language uses Unicode to represent characters, but the file system of the host operating system usually uses some other encoding. The default encoding has to match the encoding used by the host operating system to ensure correct interaction.

What is the UTF-8 encoding?

UTF-8 stands for Universal Transformation Format, 8-bit encoding form. It is a transmission format for Unicode that is suitable for use with many network protocols and UNIX file systems.

Are the Cp1252 and ISO8859_1 encodings identical?

No. Cp1252 contains some additional characters in the range from 0x80 to 0x9F. See the Microsoft documentation for more information.

Text Input

What is the Input Method Framework?

The input method framework enables all text editing components to receive Japanese, Chinese, or Korean text input through input methods. An input method lets users enter thousands of different characters using keyboards with far fewer keys. Typically a sequence of several characters needs to be typed and then converted to create one or more characters. For specifications and examples see the web page, Input Method Framework.

What does it mean to switch input methods?

A user may have multiple input methods available. For example, the user may have input methods for different languages or input methods that accept various types of input. Such a user must be able to select the input method used for a particular language or the input method that provides the fastest input.

Can an input method be selected and activated programmatically?

An application can request an input method that supports a specific locale using the InputContext.selectInputMethod method, but it cannot select a specific input method - that selection is up to the user.

An application can activate an input method using the InputContext.setCompositionEnabled method.

Do the AWT and Swing (JFC) text components work with input methods?

See the Input Methods section of the JDK Software Internationalization Overview.

Text Rendering

What choices does an application have in selecting fonts?

An application can select fonts in three different ways:

  • Using logical font names: The Java 2 platform defines five logical font names that every implementation must support: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical font names are mapped to physical fonts in implementation dependent ways. Typically one logical font name maps to several physical fonts in order to cover a large range of characters.
  • Using physical fonts: The Java 2 platform provides APIs that let an application determine which fonts are available to a given runtime and which characters these fonts can handle, and request these fonts using their real name (for example, "Times Roman" or "Helvetica"). The application can either let the user choose fonts or programmatically determine the fonts to be used.
  • Using the Lucida fonts: Sun's Java 2 Runtime Environments contain this family of physical fonts, which is also licensed for use in other implementations of the Java 2 platform. These fonts are physical fonts, but don't depend on the host operating system.

What are the advantages and disadvantages of these three approaches?

Here's a brief summary:

  • Using logical font names:
    • Advantages: These font names are guaranteed to work anywhere, and they enable text rendering in at least the language that the host operating system is localized for (often a much larger range of languages).
    • Disadvantages: The physical fonts used for rendering the text vary between different implementations, host operating systems, and locales, so an application can not achieve the same look everywhere. Also, the mapping mechanisms often limit the range of characters that can be rendered. For example, in Sun's Java 2 Runtime Environments Japanese text can only be rendered on Japanese localized host operating systems, not on other localized systems even if Japanese fonts have been installed.
  • Using physical fonts:
    • Advantages: This approach lets an application take full advantage of all available fonts, to accomplish both different text appearances and maximum language coverage.
    • Disadvantages: This approach is substantially harder to program.
  • Using the Lucida fonts:
    • Advantages: Applications using these fonts can achieve the same look everywhere. Also, these fonts cover a large range of languages (especially European and Middle Eastern), so you can create fully multilingual applications for the supported languages.
    • Disadvantages: These fonts may not be available in all Java 2 runtime environments. Also, they currently do not cover the complete Unicode character set; in particular, Chinese, Japanese, and Korean are not supported.

Why doesn't my application display any Chinese, Japanese, or Korean characters even though I have fonts for these languages installed?

The answer depends on how your application selects fonts - see above.

  • Using logical font names: To use a physical font, it must be selected by the mapping mechanism. In Sun's Java 2 Runtime Environments, fonts for Chinese, Japanese, or Korean are only selected when running on host operating systems localized for these specific languages. To change the mapping, you need to modify a font.properties file - see below.
  • Using physical fonts: Your application may not be selecting the fonts correctly, or the font may be using an encoding that's not supported by the Java 2 Runtime Environment.
  • Using the Lucida fonts: The Lucida fonts included in Sun's Java 2 Runtime Environments do not support Chinese, Japanese, or Korean.

What is a font.properties file?

The font.properties files are used in Sun's Java 2 Runtime Environments to map logical font names to physical fonts. There are several files to support different mappings depending on host operating system version and locale. The files are located in the lib directory within the J2RE installation.

Note that font.properties files are implementation dependent. Not all implementations of the Java 2 platform use them, and the format and content vary between different runtime environments as well as between releases.

How do I add a physical font to the mapping of a logical font?

Since the mapping from logical fonts to physical fonts is implementation dependent, the answer varies. For Sun's Java 2 Runtime Environments, you need to create or modify a font.properties file - see the web page Editing the font.properties Files. Note however that this is a modification of the J2RE, and Sun does not support modified J2REs. For other implementations, see their respective documentation.

Why can I see some characters in Swing components, but not in peered AWT components?

Swing user interface components use a different mechanism to render text than peered AWT components. The Swing components use the Graphics.drawString method, typically specifying a logical font name. The logical font name is then mapped to a set of physical fonts to cover a large range of characters. AWT components on the other hand are implemented using host operating system components. These host operating system components often do not support Unicode, so the text gets converted to some other character encoding, depending on the host operating system and locale. These encodings often cover a smaller range of characters than the physical fonts used to implement logical font names. For example, on a Japanese Windows system, many European accented characters are mapped to the Arial font for Swing components, but get lost when converting the text to the Shift-JIS encoding for peered AWT components.

Why can't my application display all Unicode characters even though I have a Unicode font installed?

As in the Chinese/Japanese/Korean case above, this may be because text is not rendered using the Unicode font at all or only for some characters. If your application selects the Unicode font using its physical font name, and it still cannot render all characters, it could be that the Unicode font doesn't in fact cover the entire Unicode character set - sometimes a font is called a Unicode font if it just provides the tables that support the Unicode character encoding.

What font types do Sun's Java 2 Runtime Environments support?

Sun's Java 2 Runtime Environment for Windows supports TrueType and Type1 fonts. Sun's Java 2 Runtime Environment for Solaris supports outline fonts that can be handled by an X11 server, such as F3, Type1, and TrueType.

Is it possible to display more than one language in Sun's Java 2 Runtime Environments?

The short answer is yes. The long answer needs to look at which languages you want to display at the same time, and how your application selects fonts.

  • It is quite common for a group of languages to share a small common character set - for example, the Western European languages can be written in the ISO 8859-1 character set. If you only need to display languages within such a group, you usually don't need to do anything - it will just work.
  • If the languages you need to display are all supported by the Lucida font family, and your application only needs to run on Java 2 runtime environments that contain this font family, you can simply use fonts from that family.
  • If you need to support languages using separate character ranges, and your application selects fonts using logical font names, you need to create a font.properties file that supports all the languages. See the web page, Editing the font.properties Files, for details.
  • If you need to support languages using separate character ranges, and your application selects fonts using physical names, you need to select the fonts using information about the range of characters that they support.

Can Sun's Java 2 Runtime Environment render text in Thai, Lao, Burmese, or any of the Indic scripts?

No, the font rendering system in version 1.3.1 of Sun's Java 2 Runtime Environments cannot handle the complex layout rules of these scripts. There's work underway to add support for Thai and Hindi in a future release. Also, there may be other Java 2 runtime environments that do support these scripts.

Why do I see question marks and illegible text in Traditional Chinese?

Sun's Java 2 SDK and Runtime Environment version 1.3.0 for Windows had two serious bugs affecting Traditional Chinese:

  • The Swing dialogs and the output of several tools, including the javac compiler, show up as a mix of Chinese characters and question marks (bug 4339627).
  • In the Plugin control panel, Chinese characters are rendered in such poor quality that the text is illegible (bug 4346273).

These bugs have been fixed since version 1.3.0_01.

Component Orientation

Which user interface components implement component orientation in Sun's Java 2 Runtime Environments?

See the Supported Locales document.

Miscellaneous

Do Sun's Java 2 Runtime Environments support the Euro currency?

Yes, Sun's Java 2 Runtime Environments let you type the Euro character, render it, convert it from and to numerous character encodings, and use it when formatting numeric values as currency. For text input and rendering, you need the appropriate support in the host operating system - see the documentation for Windows and Solaris (general information and patches). For formatting, you just need to request a locale with the "EURO" variant.

Copyright © 1996-2001 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Contents

Java 2 SDK Internationalization Overview

Introduction

Revision Date: 2 December 1999

The global Internet demands global software- that is, software that can be developed independently of the countries or languages of its users, and then localized for multiple countries or regions. The Java 2 Platform provides a rich set of APIs for developing global applications. These internationalization APIs are based on the Unicode 2.1 character encoding and include the ability to adapt text, numbers, dates, currency, and user-defined objects to any country's conventions.

This document summarizes the internationalization APIs and features of the Java 2 Platform. For coding examples and step-by-step instructions, see the Java Tutorial. The detailed APIs are found at The Java Platform API Specification.

For additional information, see the JDK Internationalization home page.

Locales

On the Java platform, a locale is simply an identifier for a particular combination of language and region. It is not a collection of locale-specific attributes. Instead, each locale-sensitive class maintains its own locale-specific information. With this design, there is no difference in how user and system objects maintain their locale-specific resources. Both use the standard localization mechanism.

Java programs are not assigned a single global locale. All locale-sensitive operations may be explicitly given a locale as an argument. This greatly simplifies multilingual programs. While a global locale is not enforced, a default locale is available for programs that do not wish to manage locales explicitly. A default locale also makes it possible to affect the behavior of the entire presentation with a single choice.

Java locales act as requests for certain behavior from another object. For example, a French Canadian locale passed to a Calendar object asks that the Calendar behave correctly for the customs of Quebec. It is up to the object accepting the locale to do the right thing. If the object has not been localized for a particular locale, it will try to find a "close" match with a locale for which it has been localized. Thus if a Calendar object was not localized for French Canada, but was localized for the French language in general, it would use the French localization instead.

Locale Class

A Locale object represents a specific geographical, political, or cultural region. An operation that requires a locale to perform its task is called locale-sensitive and uses the Locale object to tailor information for the user. For example, displaying a number is a locale-sensitive operation- the number should be formatted according to the customs and conventions of the user's native country, region, or culture.

Supported Locales

On the Java platform, there does not have to be a single set of supported locales, since each class maintains its own localizations. Nevertheless, there is a consistent set of localizations supported by the classes of the Java 2 Platform. Other implementations of the Java platform may support different locales. Those supported by the JDK software are summarized in the web page Supported Locales. Subsequent releases of the Java 2 SDK may include additional locales.

Localized Resources

All locale-sensitive classes must be able to access resources customized for the locales they support. To aid in the process of localization, it helps to have these resources grouped together by locale and separated from the locale-neutral parts of the program.

ResourceBundle Class

The class ResourceBundle is an abstract base class representing containers of resources. Programmers create subclasses of ResourceBundle that contain resources for a particular locale. New resources can be added to an instance of ResourceBundle, or new instances of ResourceBundle can be added to a system without affecting the code that uses them. Packaging resources as classes allows developers to take advantage of Java's class loading mechanism to find resources.

Resource bundles contain locale-specific objects. When a program needs a locale-specific resource, a String object for example, the program can load it from the resource bundle that is appropriate for the current user's locale. In this way, the programmer can write code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

This allows Java programmers to write code that can:

  • be easily localized, or translated, into different languages

  • handle multiple locales at once

  • be easily modified later to support even more locales

ListResourceBundle Class

ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.

PropertyResourceBundle Class

PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.

Calendar and Time Zone Support

Version 1.0 of the JDK software introduced the java.util.Date class for the representation of dates and times. The java.util.Date class allowed for the interpretation of dates as year, month, day, hour, minute, and second values, and it formatted and parsed date strings. Unfortunately, the API for these functions was not amenable to internationalization. Only the "representation" part of this class is retained in version 1.1 of the JDKsoftware.

As of release 1.1 of JDK software, the Date class should only be used as a wrapper for a date or time. That is, Date objects represent a specific instant in time with millisecond precision. Instead, programmers should use the Calendar class to convert between date and time fields, and the DateFormat class to format and parse date strings. The corresponding methods in version 1.0 of the JDK software of the Date class have been deprecated.

Calendar Class

The class Calendar is an abstract base class which can convert between a point in time (represented as milliseconds from 00:00:00 GMT, Jan 1, 1970) and a set of integers representing the year, month, week and so on. GregorianCalendar is a concrete subclass of Calendar that does this according to the rules of the Gregorian calendar.

Calendar and its subclasses are useful for doing various manipulations with time values. Arithmetic can be performed on a Calendar object's fields and the resulting date determined. A Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style

TimeZone Class

The abstract class TimeZone encapsulates a time zone offset from UTC (Universal Coordinated Time) and a possible daylight-savings time offset. The class SimpleTimeZone is a concrete subclass that encapsulates some simple rules about daylight-savings time. These rules do not take into account historical changes in the laws affecting daylight-savings time. The Calendar class and its subclasses use the TimeZone and SimpleTimeZone classes to convert between local time and UTC, which is the internal representation used by Date objects. Most programs will not have to deal with TimeZone objects directly.

Formatting

It is in formatting data for output that many cultural conventions are applied. Numbers, dates, times, and messages may all require formatting before they can be displayed. The Java platform provides a set of flexible formatting classes that can handle both the standard locale formats and programmer defined custom formats. These formatting classes are also able to parse formatted strings back into their constituent objects.

Format Class

The class Format is an abstract base class for formatting locale-sensitive information such as dates, times, messages, and numbers. Three main subclasses are provided: DateFormat, NumberFormat, and MessageFormat. These three also provide subclasses of their own.

DateFormat Class

Dates and times are stored internally in a locale-independent way, but should be formatted so that they can be displayed in a locale-sensitive manner. For example, the same date might be formatted as:

  • November 3, 1997 (English)

  • 3 novembre 1997 (French)

The class DateFormat is an abstract base class for formatting and parsing date and time values in a locale-independent manner. It has a number of static factory methods for getting standard time formats for a given locale.

The DateFormat object uses Calendar and TimeZone objects in order to interpret time values. By default, a DateFormat object for a given locale will use the appropriate Calendar object for that locale and the system's default TimeZone object. The programmer can override these choices if desired.

SimpleDateFormat Class

The class SimpleDateFormat is a concrete class for formatting and parsing dates and times in a locale-sensitive manner. It allows for formatting (milliseconds to text), parsing (text to milliseconds), and normalization.

DateFormatSymbols Class

The class DateFormatSymbols is used to encapsulate localizable date-time formatting data, such as the names of the months, the names of the days of the week, time of day, and the time zone data. The DateFormat and SimpleDateFormat classes both use the DateFormatSymbols class to encapsulate this information.

Usually, programmers will not use the DateFormatSymbols directly. Rather, they will implement formatting with the DateFormat class's factory methods.

NumberFormat Class

The class NumberFormat is an abstract base class for formatting and parsing numeric data. It contains a number of static factory methods for getting different kinds of locale-specific number formats.

The NumberFormat class helps programmers to format and parse numbers for any locale. Code using this class can be completely independent of the locale conventions for decimal points, thousands-separators, the particular decimal digits used, or whether the number format is even decimal. The application can also display a number as a normal decimal number, currency, or percentage:

  • 1234.5 (decimal number)

  • $1,234.50 (U.S. currency)

  • Fr1.234,5 (French currency)

  • 123450% (percent)

DecimalFormat Class

Numbers are stored internally in a locale-independent way, but should be formatted so that they can be displayed in a locale-sensitive manner. For example, when using "#,###.00" as a pattern, the same number might be formatted as:

  • 1.234,56 (German)

  • 1,234.56 (English)

The class DecimalFormat, which is a concrete subclass of the NumberFormat class, can format decimal numbers. Programmers generally will not instantiate this class directly but will use the factory methods provided.

The DecimalFormat class has the ability to take a pattern string to specify how a number should be formatted. The pattern specifies attributes such as the precision of the number, whether leading zeros should be printed, and what currency symbols are used. The pattern string can be altered if a program needs to create a custom format.

DecimalFormatSymbols Class

The class DecimalFormatSymbols represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers. DecimalFormat creates for itself an instance of DecimalFormatSymbols from its locale data. A programmer needing to change any of these symbols can get the DecimalFormatSymbols object from the DecimalFormat object and then modify it.

ChoiceFormat Class

The class ChoiceFormat is a concrete subclass of the NumberFormat class. The ChoiceFormat class allows the programmer to attach a format to a range of numbers. It is generally used in a MessageFormat object for handling plurals. See the "MessageFormat Class" section that follows for more information.

MessageFormat Class

Programs often need to build messages from sequences of strings, numbers and other data. For example, the text of a message displaying the number of files on a disk drive will vary:

  • The disk C contains 100 files.

  • The disk D contains 1 file.

  • The disk F contains 0 files.

If a message built from sequences of strings and numbers is hard-coded, it cannot be translated into other languages. For example, note the different positions of the parameters "3" and "G" in the following translations:

  • The disk G contains 3 files. (English)

  • Il y a 3 fichiers sur le disque G. (French)

The class MessageFormat provides a means to produce concatenated messages in language-neutral way. The MessageFormat object takes a set of objects, formats them, and then inserts the formatted strings into the pattern at the appropriate places.

ParsePosition Class

The class ParsePosition is used by the Format class and its subclasses to keep track of the current position during parsing. The parseObject() method in the Format class requires a ParsePosition object as an argument.

FieldPosition Class

The FieldPosition class is used by the Format class and its subclasses to identify fields in formatted output. One version of the format() method in the Format class requires a FieldPosition object as an argument.

Locale-Sensitive String Operations

Programs frequently need to manipulate strings. Common operations on strings include searching and sorting. Some tasks, such as collating strings or finding various boundaries in text, are surprisingly difficult to get right and are even more difficult when multiple languages must be considered. The Java 2 Platform provides classes for handling many of these common string manipulations in a locale-sensitive manner.

Collator Class

The Collator class performs locale-sensitive string comparison. Programmers use this class to build searching and alphabetical sorting routines for natural language text. Collator is an abstract base class. Its subclasses implement specific collation strategies. One subclass, RuleBasedCollator, is currently provided with the Java 2 Platform and is applicable to a wide set of languages. Other subclasses may be created to handle more specialized needs.

RuleBasedCollator Class

The RuleBasedCollator class, which is a concrete subclass of the Collator class, provides a simple, data-driven, table collator. Using RuleBasedCollator, a programmer can create a customized table-based collator. For example, a programmer can build a collator that will ignore (or notice) uppercase letters, accents, and Unicode combining characters.

CollationElementIterator Class

The CollationElementIterator class is used as an iterator to walk through each character of an international string. Programmers use the iterator to return the ordering priority of the positioned character. The ordering priority of a character, or key, defines how a character is collated in the given Collator object. The CollationElementIterator class is used by the compare() method of the RuleBasedCollator class.

CollationKey Class

A CollationKey object represents a string under the rules of a specific Collator object. Comparing two CollationKey objects returns the relative order of the strings they represent. Using CollationKey objects to compare strings is generally faster than using the Collator.compare() method. Thus, when the strings must be compared multiple times, for example when sorting a list of strings, it is more efficient to use CollationKey objects.

BreakIterator Class

The BreakIterator class indirectly implements methods for finding the position of the following types of boundaries in a string of text:

  • potential line break

  • sentence

  • word

  • character

The conventions on where to break lines, sentences, words, and characters vary from one language to another. Since the BreakIterator class is locale-sensitive, it can be used by programs that perform text operations. For example, consider a a word processing program that can highlight a character, cut a word, move the cursor to the next sentence, or word-wrap at a line ending. This word processing program would use break iterators to determine the logical boundaries in text, enabling it to perform text operations in a locale-sensitive manner.

StringCharacterIterator Class

The StringCharacterIterator class provides the ability to iterate over a string of Unicode characters in a bidirectional manner. This class uses a cursor to move within a range of text, and can return individual characters or their index values. The StringCharacterIterator class implements the character iterator functionality of the CharacterIterator interface.

CharacterIterator Interface

The CharacterIterator interface defines a protocol for bidirectional iteration over Unicode characters. Classes should implement this interface if they want to move about within a range of text and return individual Unicode characters or their index values. CharacterIterator is for searching is useful when performing character searches.

Character Set Conversion

The Java platform uses Unicode as its native character encoding; however, many Java programs still need to handle text data in other encodings. Java therefore provides a set of classes that convert many standard character encodings to and from Unicode. Java programs that need to deal with non-Unicode text data will typically convert that data into Unicode, process the data as Unicode, then convert the result back to the external character encoding. The InputStreamReader and OutputStreamWriter classes provide methods that can convert between other character encodings and Unicode.

Supported Encodings

The InputStreamReader, OutputStreamWriter, and String classes can convert between Unicode and the following set of character encodings listed in the web page Supported Encodings .

AWT Attributes

To aid in the internationalization of a program's GUI, the Java 2 Platform provides two these attributes for the Component class: Name and Locale.

Name Attribute

The Name attribute is a String object which serves as a non-localizable identifier for a Component object. New constructors for the Component class and its subclasses allow the Name attribute to be set. If these constructors are not used, Component objects are assigned a default Name. The method Component.getName() can be used to examine a Component object's Name attribute.

The Name attribute is particularly useful in writing Action handling routines in which a reference to the target is not known ahead of time. Such Action handlers are often generated by GUI builders. Previously, these routines tried to identify the target Component by looking at its label string. This approach failed when the label strings are localized. As of release 1.1 of the JDK software, programmers should use the Component.getName() method instead.

Locale Attribute

The Component class now contains a Locale attribute. This attribute is accessed by the methods getLocale() and setLocale()methods. If a Component object's Locale is not explicitly set, its value defaults to the Locale of the Component object's parent. If no Component in the hierarchy has an explicit Locale, the default is the value of Locale.getDefault().

The Locale attribute of Component allows the GUI (or portions of the GUI) to maintain its own default locale. This would be useful, for example, in an applet that used the Japanese locale even when the rest of the browser was using the USA locale.

Stream I/O

The Java 2 Platform provides features in the java.io package to improve the handling of character data: the new Reader and Writer classes, and an enhancement to the PrintStream class.

Reader and Writer Classes

The Reader and Writer class hierarchies provide the ability to perform I/O operations on character streams. These hierarchies parallel the InputStream and OutputStream class hierarchies, but operate on streams of characters rather than streams of bytes. Character streams make it easy to write programs that are not dependent upon a specific character encoding, and are therefore easier to internationalize. The Reader and Writer classes also have the ability to convert between Unicode and other character encodings. Please refer to the Character Streams document for more information about the Reader and Writer class hierarchies.

PrintStream Class

The PrintStream class produces output using the system's default character encoding and line terminator. This change allows methods such as System.out.println() to act more reasonably with non-ASCII data.

Character Classification

The Java platform stores character data in Unicode- an international character set standard. The Unicode Standard uses a 16-bit encoding to support all of the major scripts of the world, as well as common technical symbols. Most Java code is written in ASCII, a 7-bit standard, or ISO-Latin-1, an 8-bit standard, but is translated into Unicode before processing. Therefore, the Java character set is always represented in Unicode.

Version 1.0 of the JDK software introduced the Character class as an object wrapper to the char primitive type. The Character class also contained some static methods such as isLowerCase() and isDigit() for determining the properties of a character. This set of methods has been extended in version 1.1 of the JDK software to allow access to all the Unicode 2.1 defined properties for a character.

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 Java 2 platform also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition.

The Java 2 platform enables the use of native input methods provided by the host operating system, such as Windows or Solaris, as well as the implementation and use of input methods written in the Java programming language.

The term input methods does not refer to class methods of the Java programming language.

Input Method Support in Swing

The Swing text components provide an integrated user interface for text input using input methods. Depending on the locale, one of two input styles is used. With on-the-spot (inline) input, the style used for most locales, the input methods insert the text directly into the text component while the text is being composed. With below-the-spot input, the style used for Chinese locales, a separate composition window is used, which is positioned automatically to be near the point where the text is to be inserted after being committed.

An application using Swing text components does not have to coordinate the interaction between the text components and input methods. However, it should call InputContext.endComposition when all text must be committed, such as when a document is saved or printed.

Input Method Framework

The input method framework enables the collaboration between text editing components and input methods in entering text. Programmers who develop text editing components or input methods use this framework. Other application developers generally make only minimal use of it. For example, they should call InputContext.endComposition when all text must be committed, such as when a document is saved or printed.

The Input Method Framework web page contains links to the specifications and API documentation.

Contents
java-intl@java.sun.com
Copyright © 1996-2000 Sun Microsystems, Inc. All rights reserved.


Supported Locales

The set of supported locales varies between different implementations of the Java 2 platform as well as between different areas of functionality.

This page documents locale support in Sun's Java 2 Software Development Kit, Standard Edition, v. 1.3.1 (J2SDK), and Java 2 Runtime Environment, Standard Edition, v. 1.3.1 (J2RE) in the following areas:

  1. Enabled Locales for java.util and java.text Functionality
  2. Enabled Writing Systems for Java Foundation Classes
    1. Overview
    2. Text Input
    3. Text Rendering
    4. Component Orientation
    5. Drag and Drop
  3. User Interface Translation

1. Enabled Locales for java.util and java.text Functionality

The support for locale-sensitive behavior in the java.util and java.text packages is almost entirely platform independent, so all locales are supported in the same way and simultaneously, independent of the host operating system and its localization. The only platform dependent functionality is the setting of the initial default locale and the initial default time zone based on the host operating system's locale and time zone.

Sun's Java 2 Software Development Kit, Standard Edition, v. 1.3.1 and the international version of the Java 2 Runtime Environment, Standard Edition, v. 1.3.1 support all locales shown below. The US-only version of the Java 2 Runtime Environment, Standard Edition, v. 1.3.1 supports only the English/United States locale.

Locales whose IDs end with "_EURO" are variant locales that use the Euro currency symbol.

Fully Supported Locales

Language | Country | Locale ID
Arabic | Saudi Arabia | ar_SA
Chinese (Simplified) | China | zh_CN
Chinese (Traditional) | Taiwan | zh_TW
English | United States | en_US
French | France | fr_FR
French | France | fr_FR_EURO
German | Germany | de_DE
German | Germany | de_DE_EURO
Hebrew | Israel | iw_IL
Italian | Italy | it_IT
Italian | Italy | it_IT_EURO
Japanese | Japan | ja_JP
Korean | South Korea | ko_KR
Spanish | Spain | es_ES
Spanish | Spain | es_ES_EURO
Swedish | Sweden | sv_SE

Also Provided, but not Tested

Language | Country | Locale ID
Albanian | Albania | sq_AL
Arabic | Algeria | ar_DZ
Arabic | Bahrain | ar_BH
Arabic | Egypt | ar_EG
Arabic | Iraq | ar_IQ
Arabic | Jordan | ar_JO
Arabic | Kuwait | ar_KW
Arabic | Lebanon | ar_LB
Arabic | Libya | ar_LY
Arabic | Morocco | ar_MA
Arabic | Oman | ar_OM
Arabic | Qatar | ar_QA
Arabic | Sudan | ar_SD
Arabic | Syria | ar_SY
Arabic | Tunisia | ar_TN
Arabic | United Arab Emirates | ar_AE
Arabic | Yemen | ar_YE
Bulgarian | Bulgaria | bg_BG
Belorussian | Belorussia | be_BY
Catalan | Spain | ca_ES
Catalan | Spain | ca_ES_EURO
Chinese | Hong Kong | zh_HK
Croatian | Croatia | hr_HR
Czech | Czech Republic | cs_CZ
Danish | Denmark | da_DK
Dutch | Belgium | nl_BE
Dutch | Belgium | nl_BE_EURO
Dutch | Netherlands | nl_NL
Dutch | Netherlands | nl_NL_EURO
English | Australia | en_AU
English | Canada | en_CA
English | Ireland | en_IE
English | Ireland | en_IE_EURO
English | New Zealand | en_NZ
English | South Africa | en_ZA
English | United Kingdom | en_GB
Estonian | Estonia | et_EE
Finnish | Finland | fi_FI
Finnish | Finland | fi_FI_EURO
French | Belgium | fr_BE
French | Belgium | fr_BE_EURO
French | Canada | fr_CA
French | Luxembourg | fr_LU
French | Luxembourg | fr_LU_EURO
French | Switzerland | fr_CH
German | Austria | de_AT
German | Austria | de_AT_EURO
German | Luxembourg | de_LU
German | Luxembourg | de_LU_EURO
German | Switzerland | de_CH
Greek | Greece | el_GR
Hungarian | Hungary | hu_HU
Icelandic | Iceland | is_IS
Italian | Switzerland | it_CH
Latvian | Latvia | lv_LV
Lithuanian | Lithuania | lt_LT
Macedonian | Macedonia | mk_MK
Norwegian (Bokmål) | Norway | no_NO
Norwegian (Nynorsk) | Norway | no_NO_NY
Polish | Poland | pl_PL
Portuguese | Brazil | pt_BR
Portuguese | Portugal | pt_PT
Portuguese | Portugal | pt_PT_EURO
Romanian | Romania | ro_RO
Russian | Russia | ru_RU
Serbian (Cyrillic) | Yugoslavia | sr_YU
Serbo-Croatian | Yugoslavia | sh_YU
Slovak | Slovakia | sk_SK
Slovenian | Slovenia | sl_SI
Spanish | Argentina | es_AR
Spanish | Bolivia | es_BO
Spanish | Chile | es_CL
Spanish | Colombia | es_CO
Spanish | Costa Rica | es_CR
Spanish | Dominican Republic | es_DO
Spanish | Ecuador | es_EC
Spanish | El Salvador | es_SV
Spanish | Guatemala | es_GT
Spanish | Honduras | es_HN
Spanish | Mexico | es_MX
Spanish | Nicaragua | es_NI
Spanish | Panama | es_PA
Spanish | Paraguay | es_PY
Spanish | Peru | es_PE
Spanish | Puerto Rico | es_PR
Spanish | Uruguay | es_UY
Spanish | Venezuela | es_VE
Turkish | Turkey | tr_TR
Ukrainian | Ukraine | uk_UA

2. Enabled Writing Systems for Java Foundation Classes

2.1 Overview

For the Java Foundation Classes (AWT, Swing, 2D, input method framework, drag and drop), locales can generally be characterized by just the writing system; there are no country or language specific distinctions. Writing system support in the JFC depends to some extent on the host operating system, and full support for simultaneous use of multiple languages is not always possible.

We consider a writing system supported by JFC if all functionality provided by JFC works adequately for this writing system in the following situations:

  • On Windows 95, 98, ME, and NT 4.0, when running on a Windows system localized for a language using that writing system.
  • On Windows 2000, when running on a Windows system with both the user locale and the system locale set to a language using that writing system.
  • On Solaris and Linux, when running on a host operating system with the locale set to one using that writing system and one of the encodings shown for that writing system in the table below.

Sun's Java 2 Software Development Kit, Standard Edition, v. 1.3.1 and the international version of the Java 2 Runtime Environment, Standard Edition, v. 1.3.1 support all writing systems shown below. The US-only version of the Java 2 Runtime Environment, Standard Edition, v. 1.3.1 supports only the Western European subset of the Latin writing system. Peered AWT components are only supported for a subset of the writing systems - see the last column.

Details on various areas of functionality are provided in the sections below.

Fully Supported Writing Systems

Writing System | Languages | Windows Code Page | Solaris Encodings | Linux Encodings | Peered AWT Components
Arabic | Arabic | 1256 | 8859-6 | unsupported | unsupported
Chinese (Simplified) | Chinese | 936 | gb2312, UTF-8, GBK | GBK, gb2312 | supported
Chinese (Traditional) | Chinese | 950 | cns11643, UTF-8 | unsupported | supported
Hebrew | Hebrew | 1255 | 8859-8 | unsupported | unsupported
Japanese | Japanese | 932 | eucJP(1), UTF-8, PCK | eucJP(1) | supported
Korean | Korean | 949 | 5601, UTF-8 | unsupported | supported
Latin - Western European subset | English, French, German, Italian, Spanish, Swedish, etc. | 1252 | 8859-1, 8859-15 | 8859-1 | supported
(1) eucJP on Solaris supports the JIS character sets X 0201, X 0208, and X 0212; eucJP on Linux only X 0201 and X 0208.

Also Provided, but not Tested

Writing System | Languages | Windows Code Page | Solaris Encodings | Linux Encodings | Peered AWT Components
Chinese (Traditional) | Chinese | (see above) | BIG5 (additional) | unsupported | supported
Cyrillic | Belorussian, Russian etc. | 1251 | 8859-5 | unsupported | unsupported
Greek | Greek | 1253 | 8859-7 | unsupported | unsupported
Latin - Baltic subset | Latvian, Lithuanian | 1257 | 8859-4, 8859-13 | unsupported | unsupported
Latin - Central European subset | Czech, Hungarian, Polish, etc. | 1250 | 8859-2 | unsupported | unsupported
Latin - Turkic subset | Turkish etc. | 1254 | 8859-9 | unsupported | unsupported

2.2 Text Input

Support for text input consists of two parts: interpretation of keyboard layouts, and text composition using input methods. For interpretation of keyboard layouts, the Java 2 platform relies entirely on the host operating system. For text composition using input methods, Java 2 platform supports native input methods using the host operating system's input method manager as well as input methods developed in the Java programming language.

Locale support in input methods implemented in the Java programming language depends solely on the set of installed input methods, not on the host operating system and its localization. However, support for the use of input methods implemented in the Java programming language with peered components is implementation dependent - see below.

Support for keyboard layouts and and native input methods varies between platforms.

Windows

On Windows 95, 98, ME, and NT, the J2RE supports use of any keyboard layout or IMM-based input method that can be installed into a particular localized version of the host operating system.

On Windows 2000, the J2RE supports use of any keyboard layout using a non-Unicode code page and of any IMM-based input method.

Global IME is not supported.

Input methods implemented in the Java programming language are supported in all components on all versions of Windows.

Solaris and Linux

The J2RE supports use of any keyboard layout or input method that can be used with a particular Solaris locale.

Input methods implemented in the Java programming language are supported in lightweight components (such as Swing text components), but not in peered components (such as AWT text components).

2.3 Text Rendering

Applications have two options for selecting fonts:

  • Using the virtual font names Serif, SansSerif, Dialog, DialogInput, Monospaced.
  • Using the name of a real font.

Text Rendering in Lightweight Components

When using virtual font names, text in at least the writing system of the host locale and the Western European subset of the Latin writing system is supported.

When using real font names, we need to distinguish between simple and complex writing systems. Simple writing systems have a one-to-one mapping from characters to glyphs, and glyphs are placed on the baseline continuously from left to right. Complex writing systems may use different glyphs for the same character based on context, may for ligatures, may be written from right to left, and may reorder glyphs during line layout, or may have other rules for placing glyphs (in particular for combining marks).

The 2D text rendering system supports any combination of simple writing systems and the complex writing systems listed in the table above. Within these limitations, the range of supported writing systems is determined by the font. A single TrueType font might provide glyphs covering the entire Unicode character set and a Unicode based character-to-glyph mapping. Given such a font, 2D can support all simple writing systems as well as the complex writing systems shown in the table above. Other complex writing systems are not supported.

Text Rendering in Peered Components

When using virtual font names, text in the writing system of the host operating system's locale is supported.

When using real font names, text in the writing system of the host operating system's locale is supported to the extent that the font provides glyphs for this writing system.

Text Rendering in Printing

There are two separate printing APIs:

  • The 2D printing API, using the java.awt.print.PrinterJob.getPrinterJob method.
  • The AWT printing API, using the java.awt.Toolkit.getPrintJob method.

Text rendering using the 2D printing API works to the same extent as text rendering on the screen. Text rendering using the AWT printing API on Windows works to the same extent as text rendering on the screen. Text rendering using the AWT printing API on Solaris and Linux works only for the Western European subset of the Latin writing system and for Japanese.

2.4 Component Orientation

The component orientation property is respected only by Swing components and layout managers, not by peered AWT components. It is independent of the host operating system. The following classes support component orientation:

java.awt.BorderLayout
java.awt.FlowLayout
javax.swing.BorderFactory
javax.swing.JApplet
javax.swing.JButton
javax.swing.JCheckBox
javax.swing.JCheckBoxMenuItem
javax.swing.JDesktopPane
javax.swing.JDialog
javax.swing.JEditorPane
javax.swing.JFrame
javax.swing.JInternalFrame
javax.swing.JLabel

javax.swing.JLayeredPane
javax.swing.JListBox
javax.swing.JMenu
javax.swing.JMenuBar
javax.swing.JMenuItem
javax.swing.JPanel
javax.swing.JPasswordField
javax.swing.JPopupMenu
javax.swing.JProgressBar
javax.swing.JRadioButton
javax.swing.JRadioButtonMenuItem
javax.swing.JRootPane
javax.swing.JScrollPane

javax.swing.JSlider
javax.swing.JTabbedPane
javax.swing.JTextArea
javax.swing.JTextField
javax.swing.JTextPane
javax.swing.JToggleButton
javax.swing.JToolBar
javax.swing.JToolTip
javax.swing.JTree
javax.swing.ProgressMonitor
javax.swing.border.Border

2.5 Drag and Drop

On Windows 95, 98, and ME, text in the writing system of the host operating system's localization can be transferred between applications.

On Windows NT and 2000, arbitrary Unicode text can be transferred between applications.

On Solaris and Linux, text in the character encoding of the host operating system's locale can be transferred between applications.

Applications that need to transfer arbitrary Unicode text independent of the host operating system, can do so using serialization: Create a Transferable which supports only one flavor: DataFlavor.stringFlavor. This flavor represents the serialized representation of a String. Make sure that the target supports stringFlavor as well. When the transfer occurs, the AWT will serialize out the String on one end and deserialize on the other. This is much slower than a native platform text transfer, but it will succeed where native transfers may not.

3. User Interface Translation

Java 2 Runtime Environment

The user interface elements provided by the Java 2 Runtime Environment, Standard Edition, v. 1.3.1, include Swing dialogs, messages written by the runtime environment to the standard output and standard error streams, as well as messages produced by the tools provided with the J2RE. These user interface elements are localized into the following languages:

Language | Locale ID
Chinese (Simplified) | zh_CN
Chinese (Traditional) | zh_TW
English | en
French | fr
German | de
Italian | it
Japanese | ja
Korean | ko
Spanish | es
Swedish | sv

Java 2 Software Development Kit

The user interface elements provided by the Java 2 Software Development Kit, Standard Edition, v. 1.3.1, include messages produced by the tools that are only part of the J2SDK in addition to the elements provided by the J2RE. The additional user interface elements are localized into the following languages:

Language | Locale ID
English | en
Japanese | ja

Copyright © 1996-2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


Character streams (Introduced in JDK(TM) 1.1)

Version 1.1 of the JavaTM Development Kit introduced support for character streams to the java.io package.

Prior to JDK 1.1, the standard I/O facilities supported only byte streams, via the InputStream and OutputStream classes and their subclasses. Character streams are like byte streams, but they contain 16-bit Unicode characters rather than eight-bit bytes. They are implemented by the Reader and Writer classes and their subclasses. Readers and Writers support essentially the same operations as InputStreams and OutputStreams, except that where byte-stream methods operate on bytes or byte arrays, character-stream methods operate on characters, character arrays, or strings.

Most of the functionality available for byte streams is also provided for character streams. This is reflected in the name of each character-stream class, whose prefix is usually shared with the name of the corresponding byte-stream class. For example, there is a PushbackReader class that provides the same functionality for character streams that is provided by PushbackInputStream for byte streams.

Why use character streams?

The primary advantage of character streams is that they make it easy to write programs that are not dependent upon a specific character encoding, and are therefore easy to internationalize.

Java stores strings in Unicode, an international standard character encoding that is capable of representing most of the world's written languages. Typical user-readable text files, however, use encodings that are not necessarily related to Unicode, or even to ASCII, and there are many such encodings. Character streams hide the complexity of dealing with these encodings by providing two classes that serve as bridges between byte streams and character streams. The InputStreamReader class implements a character-input stream that reads bytes from a byte-input stream and converts them to characters according to a specified encoding. Similarly, the OutputStreamWriter class implements a character-output stream that converts characters into bytes according a specified encoding and writes them to a byte-output stream.

A second advantage of character streams is that they are potentially much more efficient than byte streams. The implementations of many of Java's original byte streams are oriented around byte-at-a-time read and write operations. The character-stream classes, in contrast, are oriented around buffer-at-a-time read and write operations. This difference, in combination with a more efficient locking scheme, allows the character stream classes to make up for the added overhead of encoding conversion in many cases.

API overview

The character-stream classes have been designed to parallel the existing byte-stream classes in the java.io package. As noted above, the name of each character-stream class ends in Reader or Writer, as appropriate, while its prefix is usually shared with the corresponding byte-stream class, if any. The following table summarizes the new classes; in the left column, indentation indicates subclass relationships.

Character-stream class | Description | Corresponding byte class
Reader | Abstract class for character-input streams | InputStream
BufferedReader | Buffers input, parses lines | BufferedInputStream
LineNumberReader | Keeps track of line numbers | LineNumberInputStream
CharArrayReader | Reads from a character array | ByteArrayInputStream
InputStreamReader | Translates a byte stream into a character stream | (none)
FileReader | Translates bytes from a file into a character stream | FileInputStream
FilterReader | Abstract class for filtered character input | FilterInputStream
PushbackReader | Allows characters to be pushed back | PushbackInputStream
PipedReader | Reads from a PipedWriter | PipedInputStream
StringReader | Reads from a String | StringBufferInputStream
Writer | Abstract class for character-output streams | OutputStream
BufferedWriter | Buffers output, uses platform's line separator | BufferedOutputStream
CharArrayWriter | Writes to a character array | ByteArrayOutputStream
FilterWriter | Abstract class for filtered character output | FilterOutputStream
OutputStreamWriter | Translates a character stream into a byte stream | (none)
FileWriter | Translates a character stream into a byte file | FileOutputStream
PrintWriter | Prints values and objects to a Writer | PrintStream
PipedWriter | Writes to a PipedReader | PipedOutputStream
StringWriter | Writes to a String | (none)

Related changes

PrintStream

The PrintStream class has been modified to use the platform's default character encoding and the platform's default line terminator. Thus each PrintStream incorporates an OutputStreamWriter, and it passes all characters through this writer to produce bytes for output. The println methods use the platform's default line terminator, which is defined by the system property line.separator and is not necessarily a single newline character ('\n'). Bytes and byte arrays written via the existing write methods are not passed through the writer.

The primary motivation for changing the PrintStream class is that it will make System.out and System.err more useful to people writing Java programs on platforms where the local encoding is something other than ASCII. PrintStream is, in other words, provided primarily for use in debugging and for compatibility with existing code. Code that produces textual output should use the new PrintWriter class, which allows the character encoding to be specified or the default encoding to be accepted. For convenience, the PrintWriter class provides constructors that take an OutputStream object and create an intermediate OutputStreamWriter object that uses the default encoding.

Other classes

The following constructors and methods have been deprecated because they do not properly convert between bytes and characters:

String | DataInputStream.readLine()
InputStream | Runtime.getLocalizedInputStream(InputStream)
OutputStream | Runtime.getLocalizedOutputStream(OutputStream)
 | StreamTokenizer(InputStream)
 | String(byte ascii[], int hibyte, int offset, int count)
 | String(byte ascii[], int hibyte)
void | String.getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin)

Finally, the following constructor and methods have been added:

 | StreamTokenizer(Reader)
byte[] | String.getBytes()
void | Throwable.printStackTrace(PrintWriter)

Copyright © 1997,1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Features of java.io.File in the Java(TM) 2 Platform

Java

Features of java.io.File in the JavaTM 2 Platform

 JavaTM 2 SDK Contents
The File class is a true abstract representation of file and directory pathnames. This allows the File class to better support non-Unix platforms such as Windows, which has a rich pathname syntax involving drive letters, UNC share names, and multiple separator characters. The specification of class File prior to the JavaTM 2 Platform could not handle these cases because it was written in terms of simple string operations.

The following features were introduced in the File class in the Java 2 Platform, v1.2:

  • The ability to create temporary files, and a simple delete-on-exit facility (the new methods createNewFile, createTempFile, and deleteOnExit);
  • Conversion of abstract pathnames to URLs (the new method toURL);
  • Access to the list of filesystem roots (the new method listRoots);
  • Comparability (the new compareTo methods);
  • Access to additional file attributes (the new methods isHidden, setLastModified, and setReadOnly); and
  • A uniform set of methods that accept and return File objects rather than strings (the new methods getParentFile, getAbsoluteFile, getCanonicalFile, and listFiles, and the new interface FileFilter).

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Minor changes to java.io in the Java 2 Platform v1.2

Java

Minor changes to java.io in the JavaTM 2 Platform v1.2

 JavaTM 2 SDK Contents
The following changes to package java.io were introduced in version 1.2 of the JavaTM 2 Platform. Minor changes to this package were:
  • The out field of the PrintWriter class is now protected rather than private, so that subclasses may access it
  • The RandomAccessFile class supports a new setLength method; and
  • The StringWriter(int) constructor is now public.

In the Java 2 Platform, the following constructors check for null input parameters:

  • The constructors PrintStream(OutputStream out) and PrintStream(OutputStream out, boolean autoFlush) will throw a NullPointerException if the parameter out is null.

  • The constructors InputStreamReader(InputStream in) and InputStreamReader(InputStream in, String enc) will throw a NullPointerException if the in parameter is null.

  • The constructors OutputStreamWriter(OutputStream out) and OutputStreamWriter(OutputStream out, String enc) will throw a NullPointerException if the out parameter is null.

  • The protected constructors Reader(Object lock) and Writer(Object lock) now throw NullPointerException if the lock parameter is null.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Troubleshooting

 JavaTM 2 SDK Contents
  • A File object represents a file name, not an actual file. Such objects are, moreover, immutable. Thus the code
        File f1 = new File("foo");
    File f2 = new File("bar");
    f1.renameTo(f2);
    will rename the file named "foo" (if it exists) to "bar". It will not change the value of the File object referred to by f1; in particular, the expression f1.getPath() will still evaluate to "foo".

  • The available method of the InputStream class and its subclasses does not necessarily return the maximum number of bytes that can be read without blocking. In particular, code of the form
        int n = in.available();
    byte buf = new byte[n];
    in.read(buf);
    is not guaranteed to read all of the remaining bytes from the given input stream. Similarly, the ready method of Reader and its subclasses may return false even if the stream is ready to be read.

  • The read(byte[]) and read(byte[], int, int) methods of InputStream and its subclasses are not guaranteed to read all available bytes. A loop may be required, for example, in order to read a large file into an array:
        for (int off = 0; off < size;) {
        int r = in.read(buf, off, buf.length - off);
        if (r == -1) break;
        off += r;
    }
    Alternatively, a BufferedInputStream may be used. Similar remarks apply to the read(char[]) and read(char[], int, int) methods of Reader and its subclasses.

  • The PrintStream and PrintWriter classes suppress all I/O errors. To see whether an error has occurred, invoke the checkError method.

  • PrintStream and PrintWriter objects do not always flush their output. To arrange for automatic flushing, use the two-argument constructors of these classes and specify true for the second argument.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Jar Guide

Jar File Overview

What is Jar?

Jar stands for Java ARchive. It's a file format based on the popular ZIP file format and is used for aggregating many files into one. Although Jar can be used as a general archiving tool, the primary motivation for its development was so that Java applets and their requisite components (.class files, images and sounds) can be downloaded to a browser in a single HTTP transaction, rather than opening a new connection for each piece. This greatly improves the speed with which an applet can be loaded onto a web page and begin functioning. The Jar format also supports compression, which reduces the size of the file and improves download time still further. Additionally, individual entries in a Jar file may be digitally signed by the applet author to authenticate their origin.

Jar is:

  • the only archive format that is cross-platform
  • the only format that handles audio and image files as well as class files
  • backward-compatible with existing applet code
  • an open standard, fully extendable, and written in java
  • the preferred way to bundle the pieces of a java applet

Jar consists of a zip archive, as defined by PKWARE, containing a manifest file and potentially signature files, as defined in the Jar File Specification.

The APPLET tag

Changing the APPLET tag in your HTML page to accomodate a Jar file is simple. The Jar file on the server is identified by the ARCHIVE parameter, where the directory location of the jar file should be relative to the location of the html page:
    <applet code=Animator.class
      archive="jars/animator.jar"
      width=460 height=160>
      <param name=foo value="bar">
    </applet>
Note that the familiar CODE=myApplet.class parameter must still be present. The CODE parameter, as always, identifies the name of the applet where execution begins. However, the class file for the applet and all of its helper classes are loaded from the Jar file.

Th ARCHIVE attribute describes one or more Jar files containing classes and other resources that will be "preloaded". The classes are loaded using an instance of an AppletClassLoader with the given CODEBASE. It takes the form archive = archiveList. The archives in archiveList are separated by ",".

Once the archive file is identified, it is downloaded and separated into its components. During the execution of the applet, when a new class, image or audio clip is requested by the applet, it is searched for first in the archives associated with the applet. If the file is not found amongst the archives that were downloaded, it is searched for on the applet's server, relative to the CODEBASE (that is, it is searched for as in JDK1.0.2).

The archive tag may specify multiple Jar files. Each Jar file must be separated by "," (comma). Each file is downloaded in turn:

    <applet code=Animator.class
      archive="classes.jar ,  images.jar ,  sounds.jar"
      width=460 height=160>
      <param name=foo value="bar">
    </applet>
There can be any amount of white space between entries within the archive parameter. In addition, the archive tag itself is case-insensitive; it can be lower-case, upper-case, or any combination of lower- and upper-case letters, such as ArCHiVe.

Executable Jar Files

On Win32 systems the Java 2 Runtime Environment's installation program will register a default association for Jar files so that double-clicking a Jar file on the desktop will automatically run it with javaw -jar. Dependent extensions bundled with the application will also be loaded automatically. This feature makes the end-user runtime environment easier to use on Win32 systems.

The Solaris 2.6 kernel has already been extended to recognize the special "magic" number that identifies a Jar file, and to invoke java -jar on such a Jar file as if it were a native Solaris executable. A application packaged in a Jar file can thus be executed directly from the command line or by clicking an icon on the CDE desktop.

Copyright © 1996-1999 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303-4900 USA. All rights reserved.


JAR File Specification

Contents

  • Introduction
  • The META-INF directory
  • Name-Value pairs and Sections
  • JAR Manifest
    • Overview
    • Manifest Specification
    • Main Attributes
    • Per-Entry Attributes
  • Signed JAR file
    • Overview
    • Signature File
      • Signature validation
      • The Magic Attribute
    • Digital Signatures
  • Notes on Manifest and Signature Files
  • JAR Index
    • Overview
    • Index File Specification
    • Backward Compatibility
  • Service Provider
    • Overview
    • Provider Configuration File
    • Example
  • API Details
  • See Also

Introduction

JAR file is a file format based on the popular ZIP file format and is used for aggregating many files into one. A JAR file is essentially a zip file that contains an optional META-INF directory. A JAR file can be created by the command-line jar tool, or by using the java.util.jar API in the Java platform. There is no restriction on the name of a JAR file, it can be any legal file name on a particular platform.

In many cases, JAR files are not just simple archives of java classes files and/or resources. They are used as building blocks for applications and extensions. The META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.

The META-INF directory

The following files/directories in the META-INF directory are recognized and interpreted by the Java 2 Platform to configure applications, extensions, class loaders and services:
  • MANIFEST.MF
The manifest file that is used to define extension and package related data.
  • INDEX.LIST
This file is generated by the new "-i" option of the jar tool, which contains location information for packages defined in an application or extension. It is part of the JarIndex implementation and used by class loaders to speed up their class loading process.
  • x.SF
The signature file for the JAR file. 'x' stands for the base file name.
  • x.DSA
The signature block file associated with the signature file with the same base file name. This file stores the digital signature of the corresponding signature file.
  • services/
This directory stores all the service provider configuration files.

Name-Value pairs and Sections

Before we go to the details of the contents of the individual configuration files, some format convention needs to be defined. In most cases, information contained within the manifest file and signature files is represented as so-called "name: value" pairs inspired by the RFC822 standard. We also call these pairs headers or attributes.

Groups of name-value pairs are known as a "section". Sections are separated from other sections by empty lines.

Binary data of any form is represented as base64. Continuations are required for binary data which causes line length to exceed 72 bytes. Examples of binary data are digests and signatures.

Implementations shall support header values of up to 65535 bytes.

All the specifications in this document use the same grammar in which terminal symbols are shown in fixed width font and non-terminal symbols are shown in italic type face.

Specification:

section: *header +newline
nonempty-section: +header +newline
newline: CR LF | LF | CR (not followed by LF)
header: name : value
name: alphanum *headerchar
value: SPACE *otherchar newline *continuation
continuation: SPACE *otherchar newline
alphanum: {A-Z} | {a-z} | {0-9}
headerchar: alphanum | - | _
otherchar: any UTF-8 character except NUL, CR and LF

; Also: To prevent mangling of files sent via straight e-mail, no
; header will start with the four letters "From".

Non-terminal symbols defined in the above specification will be referenced in the following specifications.

JAR Manifest

Overview

A JAR file manifest consists of a main section followed by a list of sections for individual JAR file entries, each separated by a newline. Both the main section and individual sections follow the section syntax specified above. They each have their own specific restrictions and rules.

The main section contains security and configuration information about the JAR file itself, as well as the application or extension that this JAR file is a part of. It also defines main attributes that apply to every individual manifest entry. No attribute in this section can have its name equal to "Name". This section is terminated by an empty line.

The individual sections define various attributes for packages or files contained in this JAR file. Not all files in the JAR file need to be listed in the manifest as entries, but all files which are to be signed must be listed. The manifest file itself must not be listed. Each section must start with an attribute with the name as "Name", and the value must be a relative path to the file, or an absolute URL referencing data outside the archive.

If there are multiple individual sections for the same file entry, the attributes in these sections are merged. If a certain attribute have different values in different sections, the last one is recognized.

Attributes which are not understood are ignored. Such attributes may include implementation specific information used by applications.

Manifest Specification:

manifest-file: main-section newline *individual-section
main-section: version-info newline *main-attribute
version-info: Manifest-Version : version-number
version-number : digit+{.digit+}*
main-attribute: (any legitimate main attribute) newline
individual-section: Name : value newline *perentry-attribute
perentry-attribute: (any legitimate perentry attribute) newline
newline : CR LF | LF | CR (not followed by LF)
digit: {0-9}

In the above specification, attributes that can appear in the main section are referred to as main attributes, whereas attributes that can appear in individual sections are referred to as per-entry attributes. Certain attributes can appear both in the main section and the individual sections, in which case the per-entry attribute value overrides the main attribute value for the specified entry. The two types of attributes are defined as follows.

Main Attributes

Main attributes are the attributes that are present in the main section of the manifest. They fall into the following different groups:
  • general main attributes
    • Manifest-Version:
      Defines the manifest file version. The value is a legitimate version number, as described in the above spec.
    • Created-By:

      • Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool.
    • Signature-Version:

      • Defines the signature version of the jar file. The value should be a valid version-number string.
    • Class-Path :

      • The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
  • attribute defined for stand-alone applications
    • This attribute is used by stand-alone applications that are bundled into executable jar files which can be invoked by the java runtime directly by running "java -jar x.jar".
    • Main-Class :

      • The value of this attribute defines the relative path of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name.
  • attributes defined for applets
    • These attributes is used by an applet which is bundled into JAR files to define requirements, version and location information for the extensions which this applet depends on. (see Extension Versioning ).
    • Extension-List:

      • This attribute indicates the extensions that are needed by the applet. Each extension listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the extension it requires.
    • <extension>-Extension-Name :

      • This attribute is the unique name of the extension. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed extensions to determine if the extension is installed.
    • <extension>-Specification-Version

      • This attribute specifies the minimum extension specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed extension to determine if the extension is up to date.
    • <extension>-Implementation-Version

      • This attritute specifies the minimum extension implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed extension to see if a more recent implementation needs to be downloaded.
    • <extension>-Implementation-Vendor-Id

      • This attribute can be used to identify the vendor of an extension implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed extension.
    • <extension>-Implementation-URL

      • This attribute specifies a URL that can be used to obtain the most recent version of the extension if the required version is not already installed.
  • attribute defined for extension identification
    • This attribute is used by extensions to define their unique identity.
    • Extension-Name:
      • This attribute specifies a name for the extension contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the extension.
  • attributes defined for extension and package versioning and sealing information
    • These attributes define features of the extension which the JAR file is a part of. The value of these attributes apply to all the packages in the JAR file, but can be overridden by per-entry attributes.
    • Implementation-Title :
      • The value is a string that defines the title of the extension implementation.
    • Implementation-Version :

      • The value is a string that defines the version of the extension implementation.
    • Implementation-Vendor :

      • The value is a string that defines the organization that maintains the extension implementation.
    • Implementation-Vendor-Id :

      • The value is a string id that uniquely defines the organization that maintains the extension implementation.
    • Implementation-URL :

      • This attribute defines the URL from which the extension implementation can be downloaded from.
    • Specification-Title :

      • The value is a string that defines the title of the extension specification.
    • Specification-Version :

      • The value is a string that defines the version of the extension specification.
    • Specification-Vendor :

      • The value is a string that defines the organization that maintains the extension specification.
    • Sealed :

      • This attribute defines whether this JAR file is sealed or not. The value can be either "true" or "false", case is ignored. If it is set to "true", then all the packages in the JAR file are defaulted to be sealed, unless they are defined otherwise individually.

Per-Entry Attributes

Per-entry attributes apply only to the individual JAR file entry to which the manifest entry is associated with. If the same attribute also appeared in the main section, then the value of the per-entry attribute overwrites the main attribute's value. For example, if JAR file a.jar has the following manifest content:
    Manifest-Version: 1.0
    Created-By: 1.2 (Sun Microsystems Inc.)
    Sealed: true

    Name: foo/bar/
    Sealed: false

It means that all the packages archived in a.jar are sealed, except that package foo.bar is not.

The per-entry attributes fall into the following groups:

  • attributes defined for file contents:
    • Content-Type :

      • This attribute can be used to specify the MIME type and subtype of data for a specific file entry in the JAR file. The value should be a string in the form of type/subtype. For example "image/bmp" is an image type with a subtype of bmp (representing bitmap). This would indicate the file entry as an image with the data stored as a bitmap. RFC 1521 and 1522 discuss and define the MIME types definition.
  • attributes defined for package versioning and sealing information:

    • These are the same set of attributes defined above as main attributes that defines the extension package versioning and sealing information. When used as per-entry attributes, these attributes overwrites the main attributes but only apply to the individual file specified by the manifest entry.

  • attribute defined for beans objects:
    • Java-Bean:

      • Defines whether the specific jar file entry is a Java Beans object or not. The value should be either "true" or "false", case is ignored.
  • attributes defined for signing:

    • These attributes are used for signing and verifying purposes. More details here.
    • x-Digest-y:

      • The name of this attribute specifies the name of the digest algorithm used to compute the digest value for the corresponding jar file entry. The value of this attribute stores the actual digest value. The prefix 'x' specifies the algorithm name and the optional suffix 'y' indicates to which language the digest value should be verified against.
    • Magic:

      • This is an optional attribute that can be used by applications to indicate how verifier should compute the digest value contained in the manifest entry. The value of this attribute is a set of comma separated context specific strings. Detailed description is here.

Signed JAR File

Overview

A JAR file can be signed by using the command line jarsigner tool or directly through the java.security API. Every file entry will be signed if the JAR file is signed by jarsigner tool. Subsets of a JAR file can be signed by using the java.security API. A signed JAR file is exactly the same as the original JAR file, except that its manifest is updated and two additional files are added to the META-INF directory, a signature file and a signature block file. When jarsigner is not used, the signing program has to construct both the signature file and the signature block file.

For every file entry that is signed in the signed JAR file, an individual manifest entry is created for it, if it does not exist in the manifest before. Each manifest entry lists one or more digest attribute and an optional Magic attribute.

Signature File

Each signer is represented by a signature file with extension .SF. The major part of the file is similar to the manifest file. It consists of a main section which includes information supplied by the signer but not specific to any particular jar file entry, followed by a list of individual entries whose name must also be present in the manifest file. Each individual entry must contain at least the digest of the corresponding entry in the manifest file.

Paths or URL's appearing in the manifest file but not in the signature file are not used in calculation.

Signature Validation

The signature is first verified when the manifest is first parsed. This verification can be remembered, for efficiency. This only validates the signature directions themselves, not the actual archive files.

To validate a file, a digest value in the signature file is compared against a digest calculated against the corresponding entry in the manifest file. Then, a digest value in the manifest file is compared against a digest calculated against the actual data referenced in the "Name:" attribute, which specifies either a relative file path or URL.

Example manifest file:

    Manifest-Version: 1.0
     Created-By: 1.3 (Sun Microsystems, Inc)

     Name: common/class1.class
     MD5-Digest: (base64 representation of MD5 digest)

     Name: common/class2.class
     MD5-Digest: (base64 representation of MD5 digest)
     SHA-Digest: (base64 representation of SHA digest)

The corresponding signature file would be:
    Signature-Version: 1.0

     Name: common/class1.class
     MD5-Digest: (base64 representation of MD5 digest)

     Name: common/class2.class
     MD5-Digest: (base64 representation of MD5 digest)

The Magic Attribute

Another requirement to validate the signature on a given manifest entry is that the verifier understand the value or values of the Magic key-pair value in that entry's manifest entry.

The Magic attribute is optional but it is required that a parser understand the value of an entry's Magic key if it is verifying that entry's signature.

The value or values of the Magic attribute are a set of comma-separated context-specific strings. The spaces before and after the commas are ignored. Case is ignored. The exact meaning of the magic attributes is application specific. These values indicate how to compute the hash value contained in the manifest entry, and are therefore crucial to the proper verification of the signature. The keywords may be used for dynamic or embedded content, multiple hashes for multilingual documents, etc.

Here are two examples of the potential use of Magic attribute in the manifest file:

Name: http://www.scripts.com/index#script1
        SHA-Digest: (base64 representation of SHA hash)
        Magic: JavaScript, Dynamic

        Name: http://www.tourist.com/guide.html
        SHA-Digest: (base64 representation of SHA hash)
        SHA-Digest-French: (base64 representation of SHA hash)
        SHA-Digest-German: (base64 representation of SHA hash)
        Magic: Multilingual

In the first example, these Magic values may indicate that the result of an http query is the script embedded in the document, as opposed to the document itself, and also that the script is generated dynamically. These two pieces of information indicate how to compute the hash value against which to compare the manifest's digest value, thus comparing a valid signature.

In the second example, the Magic value indicates that the document retrieved may have been content-negotiated for a specific language, and that the digest to verify against is dependent on which language the document retrieved is written in.

Digital Signatures

A digital signature is a signed version of the .SF signature file. These are binary files not intended to be interpreted by humans.

Digital signature files have the same filename as the .SF file but different extension. The extension varies depending on the type of digital signature.

.RSA  (PKCS7 signature, MD5 + RSA)
.DSA  (PKCS7 signature, DSA)
.PGP  (Pretty Good Privacy Signature)

For those formats that do not support external signed data, the file shall consist of a signed copy of the .SF file. Thus some data may be duplicated and a verifier ought to compare the two files.

Formats that support external data either reference the .SF file, or perform calculations on it with implicit reference.

Each .SF file may have multiple digital signatures, but those signatures ought to be generated by the same legal entity.

File name extensions may be 1 to 3 alphanum characters. Extensions unrecognized are ignored.

Notes on Manifest and Signature Files

Following is a list of additional restrictions and rules that apply to manifest and signature files.
  • Before parsing:

    • If the last character of the file is an EOF character (code 26), the EOF is treated as whitespace. Two newlines are appended (one for editors that don't put a newline at the end of the last line, and one so that the grammar doesn't have to special-case the last entry, which may not have a blank line after it).
  • Attributes:

    • In all cases for all sections, attributes which are not understood are ignored.

    Attribute names are case insensitive. Programs which generate manifest and signature files should use the cases shown in this specification however.

    Attribute names cannot be repeated within a section.

  • Versions:

    • Manifest-Version and Signature-Version must be first, and in exactly that case (so that they can be recognized easily as magic strings). Other than that, the order of attributes within a main section is not significant.
  • Ordering:

    • The order of individual manifest entries is not significant.

    The order of individual signature entries is not significant, except that the digests that get signed are in that order.

  • Line length:

    • No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).
  • Errors:

    • If a file cannot be parsed according to this spec, a warning should be output, and none of the signatures should be trusted.
  • Limitations:

    • Because header names cannot be continued, the maximum length of a header name is 70 bytes (there must be a colon and a SPACE after the name).

    NUL, CR, and LF can't be embedded in header values, and NUL, CR, LF and ":" can't be embedded in header names.

    Implementations should support 65535-byte (not character) header values, and 65535 headers per file. They might run out of memory, but there should not be hard-coded limits below these values.

  • Signers:

    • It is technically possible that different entities may use different signing algorithms to share a single signature file. This violates the standard, and the extra signature may be ignored.
  • Algorithms:

    • No digest algorithm or signature algorithm is mandated by this standard. However, at least one of MD5 and SHA digest algorithm must be supported.

JAR Index

Overview

Since 1.3, JarIndex is introduced to optimize the class searching process of class loaders for network applications, especially applets. Originally, an applet class loader uses a simple linear search algorithm to search each element on its internal search path, which is constructed from the "ARCHIVE" tag or the "Class-Path" main attribute. The class loader downloads and opens each element in its search path, until the class or resource is found. If the class loader tries to find a nonexistent resource, then all the jar files within the application or applet will have to be downloaded. For large network applications and applets this could result in slow startup, sluggish response and wasted network bandwidth. The JarIndex mechanism collects the contents of all the jar files defined in an applet and stores the information in an index file in the first jar file on the applet's class path. After the first jar file is downloaded, the applet class loader will use the collected content information for efficient downloading of jar files.

The existing jar tool is enhanced to be able to examine a list of jar files and generate directory information as to which classes and resources reside in which jar file. This directory information is stored in a simple text file named INDEX.LIST in the META-INF directory of the root jar file. When the classloader loads the root jar file, it reads the INDEX.LIST file and uses it to construct a hash table of mappings from file and package names to lists of jar file names. In order to find a class or a resource, the class loader queries the hashtable to find the proper jar file and then downloads it if necessary.

Once the class loader finds a INDEX.LIST file in a particular jar file, it always trusts the information listed in it. If a mapping is found for a particular class, but the class loader fails to find it by following the link, an InvalidJarIndexException is thrown. When this occurs, the application developer should rerun the jar tool on the extension to get the right information into the index file.

To prevent adding too much space overhead to the application and to speed up the construction of the in-memory hash table, the INDEX.LIST file is kept as small as possible. For classes with non-null package names, mappings are recorded at the package level. Normally one package name is mapped to one jar file, but if a particular package spans more than one jar file, then the mapped value of this package will be a list of jar files. For resource files with non-empty directory prefixes, mappings are also recorded at the directory level. Only for classes with null package name, and resource files which reside in the root directory, will the mapping be recorded at the individual file level.

Index File Specification

The INDEX.LIST file contains one or more sections each separated by a single blank line. Each section defines the content of a particular jar file, with a header defining the jar file path name, followed by a list of package or file names, one per line. All the jar file paths are relative to the code base of the root jar file. These path names are resolved in the same way as the current extension mechanism does for bundled extensions.

The UTF-8 encoding is used to support non ASCII characters in file or package names in the index file.

Specification

index file : version-info blankline section*
version-info : JarIndex-Version: version-number
version-number : digit+{.digit+}*
section : body blankline
body : header name*
header : char+.jar newline
name : char+ newline
char : any valid Unicode character except NULL, CR and LF
blankline: newline newline
newline : CR LF | LF | CR (not followed by LF)
digit: {0-9}

The INDEX.LIST file is generated by running jar -i. See the jar man page for more details.

Backward Compatibility

The new class loading scheme is totally backward compatible with applications developed on top of the current extension mechanism. When the class loader loads the first jar file and an INDEX.LIST file is found in the META-INF directory, it would construct the index hash table and use the new loading scheme for the extension. Otherwise, the class loader will simply use the original linear search algorithm.

Service Provider

Overview

Files in the META-INF/services directory are service provider configuration files. A service is a well-known set of interfaces and (usually abstract) classes. A service provider is a specific implementation of a service. The classes in a provider typically implement the interfaces and subclass the classes defined in the service itself. Service providers may be installed in an implementation of the Java platform in the form of extensions, that is, jar files placed into any of the usual extension directories. Providers may also be made available by adding them to the applet or application class path or by some other platform-specific means.

A service is represented by an abstract class. A provider of a given service contains one or more concrete classes that extend this service class with data and code specific to the provider. This provider class will typically not be the entire provider itself but rather a proxy that contains enough information to decide whether the provider is able to satisfy a particular request together with code that can create the actual provider on demand. The details of provider classes tend to be highly service-specific; no single class or interface could possibly unify them, so no such class has been defined. The only requirement enforced here is that provider classes must have a zero-argument constructor so that they may be instantiated during lookup.

Provider-Configuration File

A service provider identifies itself by placing a provider-configuration file in the resource directory META-INF/services. The file's name should consist of the fully-qualified name of the abstract service class. The file should contain a newline-separated list of unique concrete provider-class names. Space and tab characters, as well as blank lines, are ignored. The comment character is '#' (0x23); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

Example

Suppose we have a service class named java.io.spi.CharCodec. It has two abstract methods:

public abstract CharEncoder getEncoder(String encodingName);
  public abstract CharDecoder getDecoder(String encodingName);

Each method returns an appropriate object or null if it cannot translate the given encoding. Typical CharCodec providers will support more than one encoding.

If sun.io.StandardCodec is a provider of the CharCodec service then its jar file would contain the file META-INF/services/java.io.spi.CharCodec. This file would contain the single line:

sun.io.StandardCodec    # Standard codecs for the platform

To locate an encoder for a given encoding name, the internal I/O code would do something like this:

   CharEncoder getEncoder(String encodingName) {
Iterator ps = Service.providers(CharCodec.class);
while (ps.hasNext()) {
CharCodec
cc = (CharCodec)ps.next();
CharEncoder
ce = cc.getEncoder(encodingName);
if
(ce != null)
return ce;
}
return null;
}

The provider-lookup mechanism always executes in the security context of the caller. Trusted system code should typically invoke the methods in this class from within a privileged security context.

API Details

Package java.util.jar

See Also

Package java.security
Package java.util.zip

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Blob

8.1 Blob Overview

A Blob object represents the Java programming language mapping of an SQL BLOB (Binary Large Object). An SQL BLOB is a built-in type that stores a Binary Large Object as a column value in a row of a database table. Methods in the interfaces ResultSet, CallableStatement, and PreparedStatement allow a programmer to access the SQL3 type BLOB in the same way that SQL92 built-in types are accessed. In other words, an application using the JDBC 2.0 API uses methods such as getBlob and setBlob for a BLOB value the same way it uses getInt and setInt for an INTEGER value or getString and setString for a CHAR or VARCHAR value.

In a standard implementation, a JDBC driver implements the Blob interface using the SQL type LOCATOR(BLOB) behind the scenes. A LOCATOR(BLOB) designates an SQL BLOB value residing on a database server, and operations on the locator achieve the same results as operations on the BLOB value itself. This means that a client can operate on a Blob instance without ever having to materialize the BLOB data on the client machine, which can improve performance significantly. Because the driver uses LOCATOR(BLOB) behind the scenes, its use is completely transparent to the programmer using a JDBC driver.

The standard behavior for a Blob instance is to remain valid until the transaction in which it was created is either committed or rolled back.

The Blob interface provides methods for getting the length of an SQL BLOB value, for materializing a BLOB value on the client, and for determining the position of a pattern of bytes within a BLOB value.

8.1.1 Creating a Blob Object

The following code fragment illustrates creating a Blob object, where stmt is a Statement object:

ResultSet rs = stmt.executeQuery("SELECT DATA FROM TABLE1");
rs.first();
Blob data = rs.getBlob("DATA");

The variable blob contains a logical pointer to the BLOB value that is stored in the column DATA in the first row of the result set rs. It does not contain the data in the BLOB value, but as far as JDBC methods are concerned, it is operated on as if it did.

8.1.2 Materializing Blob Data

Programmers can invoke methods in the JDBC API on a Blob object as if they were operating on the SQL BLOB it designates. However, if they want to operate on a Blob object as if it were an object in the Java programming language, they must first materialize it on the client. The Blob interface provides two methods for materializing a Blob object: getBinaryStream, which materializes the BLOB value as an input stream, and getBytes, which materializes all or part of the BLOB value as an array of bytes. The following code fragment materializes all of the data in the BLOB value designated by blob as an input stream:

java.io.InputStream in = blob.getBinaryStream();
byte b;
while ((in.read()) > -1) {
    b = in.read();
    System.out.println(b);
}
// prints out all the bytes in the BLOB value that blob designates

The next code fragment also materializes all of the data in the BLOB value designated by blob, but as an array of bytes instead of as an input stream.

long len = blob.length();
byte [] data = blob.getBytes(1, len);
for (int i = 0; i < len; i++) {
    byte b = data[i];
    System.out.println(b);
}
// prints out all the bytes in the BLOB value that blob designates

The variable data contains a copy of all of the bytes in the BLOB value that blob designates. This is true because the arguments passed to the method getBytes specify the entire BLOB value: the first argument tells it to return bytes starting with the first byte, and the second argument tells it to return the number of bytes in the length of the BLOB value. The following line of code illustrates materializing 1024 bytes starting with the 256th byte:

byte [] data = blob.getBytes(256, 1024);
byte b = data[0];
// data contains bytes 256 through 1280 in the BLOB value that blob
// designates; b contains the 256th byte

A point to keep in mind is that because of differences in SQL and the Java programming language, the first byte in a BLOB value is at position 1, whereas the first element of an array in the Java programming language is at index 0.

8.1.3 Storing a Blob Object

To store a Blob object in the database, it is passed as a parameter to the PreparedStatement method setBlob. For example, the following code fragment stores the Blob object stats by passing it as the first input parameter to the PreparedStatement object pstmt:

Blob stats = rs.getBlob("STATS");
PreparedStatement pstmt = con.prepareStatement(
    "UPDATE SIGHTINGS SET MEAS = ? WHERE AREA = 'NE'");
pstmt.setBlob(1, stats);
pstmt.executeUpdate();

The BLOB value designated by stats is now stored in the table SIGHTINGS in column MEAS in the row where column AREA contains NE.

8.2 Blob Interface Definition

package java.sql;
public interface Blob {
    long length() throws SQLException;
    InputStream getBinaryStream() throws SQLException;
    byte[] getBytes(long pos, int length) throws SQLException;
    long position(byte [] pattern, long start) throws SQLException;
    long position(Blob pattern, long start) throws SQLException;
}

8.3 Blob Methods

InputStream getBinaryStream() throws SQLException
Materializes the BLOB value designated by this Blob object as a stream of uninterpreted bytes.

RETURNS:

an InputStream object with the data of the BLOB value designated by this Blob object

EXAMPLE:

InputStream in = blob.getBinaryStream();
// in has the data in the BLOB value that blob designates

getBytes

byte[] getBytes(long pos, int length) throws SQLException

Materializes part or all of the BLOB value that this Blob object designates as an array of bytes. The byte array contains up to length consecutive bytes starting at position pos.

PARAMETERS:

pos the ordinal position in the BLOB value
of the first byte to be extracted; the
first byte is at position 1
length the number of consecutive bytes to be copied

RETURNS:

a byte array with up to length consecutive bytes from the BLOB value pointed to by this Blob object, starting with the byte at position pos

EXAMPLE:

byte [] part = blob.getBytes(5, 100);
// part contains the fifth through 104th bytes, inclusive, as an
// array of bytes

length

long length() throws SQLException
Returns the number of bytes in the BLOB value designated by this Blob object.

RETURNS:

the length of the BLOB value designated by this Blob object, in bytes

EXAMPLE:

Blob blob = rs.getBlob(2);
long len = blob.length();
// len contains the number of bytes in the BLOB value designated by
// blob (the BLOB value in the second column of the current row of the
// ResultSet object rs)

position

long position(byte [] pattern, long start) throws SQLException
Determines the position at which the byte array pattern begins within the BLOB value that this Blob object represents. The search for pattern begins at position start.

PARAMETERS:
pattern | the byte array for which to search
start | the position in the BLOB value at which to begin searching; the first byte is at position 1

RETURNS:

the position in the BLOB value at which the byte array pattern begins, which will be start or larger if the search, starting at position start, is successful; -1 otherwise

EXAMPLE:

byte [] part = blob.getBytes(5, 100);
long beginning = blob.position(part, 1024);
// if part is contained in the BLOB value that blob designates, from
// position 1024 on, beginning will contain the position at which
// part begins

position

long position(Blob pattern, long start) throws SQLException
Determines the byte position in the BLOB value designated by this Blob object at which pattern begins. The search begins at position start.

PARAMETERS:
pattern | the Blob object designating the BLOB value for which to search
start | the position in the BLOB value at which to begin searching; the first byte is at position 1

RETURNS:

the position at which the Blob object pattern begins, which will be start or larger if the search, starting at position start, is successful; -1 otherwise

EXAMPLE:

Blob blob2 = rs.getBlob(4);
long beginning = blob1.position(blob2, 512);
// if the BLOB value designated by blob2 is contained in the BLOB
// value designated by blob1, starting at position 512 or later,
// beginning will contain the position at which the BLOB value
// designated by blob2 begins

Copyright © 2000, Sun Microsystems, Inc. All rights reserved.


Clob

10.1 Clob Overview

A Clob object represents the Java programming language mapping of an SQL CLOB (Character Large Object). An SQL CLOB is a built-in type that stores a Character Large Object as a column value in a row of a database table. Methods in the interfaces ResultSet, CallableStatement, and PreparedStatement allow a programmer to access the SQL3 type CLOB in the same way that more basic SQL types are accessed. In other words, an application using the JDBC 2.0 API uses methods such as getClob and setClob for a CLOB value the same way it uses getInt and setInt for an INTEGER value or getString and setString for a CHAR or VARCHAR value.

The default is for a JDBC driver to implement the Clob interface using the SQL type LOCATOR(CLOB) behind the scenes. A LOCATOR(CLOB) designates an SQL CLOB residing on a database server, and operations on the locator achieve the same results as operations on the CLOB itself. This means that a client can operate on a Clob instance without ever having to materialize the CLOB data on the client machine. The driver uses LOCATOR(CLOB) behind the scenes, making its use completely transparent to the JDBC programmer.

The standard behavior for a Clob instance is to remain valid until the transaction in which it was created is either committed or rolled back.

The interface Clob provides methods for getting the length of an SQL CLOB value, for materializing the data in a CLOB value on the client, and for searching for a substring or CLOB object within a CLOB value.

10.1.1 Creating a Clob Object

The following code fragment illustrates creating a Clob object, where rs is a ResultSet object:

Clob clob = rs.getClob(1);

The variable clob can now be used to operate on the CLOB value that is stored in the first column of the result set rs.

10.1.2 Materializing Clob Data

Programmers can invoke methods in the JDBC API on a Clob object as if they were operating on the SQL CLOB value it designates. However, if they want to operate on a Clob object as an object in the Java programming language, they must first materialize the data of the CLOB object on the client. The Clob interface provides three methods for materializing a Clob object as an object in the Java programming language:

  • getAsciiStream materializes the CLOB value as a byte stream containing Ascii bytes
Clob notes = rs.getClob("NOTES");
java.io.InputStream in = notes.getAsciiStream();
byte b = in.read();
// in contains the characters in the CLOB value designated by
// notes as Ascii bytes; b contains the first character as an Ascii
// byte
  • getCharacterStream materializes the CLOB value as a stream of Unicode characters
java.io.Reader reader = notes.getCharacterStream();
int c = Reader.read();
// c contains the first character in the CLOB that notes designates
  • getSubString materializes all or part of the CLOB value as a String object
String substring = notes.getSubString(10, 5);
// substring contains five characters, starting with the tenth
// character of the CLOB value that notes designates
long len = notes.length();
String substring = notes.getSubString(1, len);
// substring contains all of the characters in the CLOB object that
// notes designates

10.1.3 Storing a Clob Object

To store a Clob object in the database, it is passed as a parameter to the PreparedStatement method setClob. For example, the following code fragment stores the Clob object notes by passing it as the first input parameter to the PreparedStatement object pstmt:

Clob notes = rs.getClob("NOTES");
PreparedStatement pstmt = con.prepareStatement(
        "UPDATE SALES_STATS SET COMMENTS = ? WHERE SALES > 500000");
pstmt.setClob(1, notes);
pstmt.executeUpdate();

The CLOB value designated by notes is now stored in the table SALES_STATS in column COMMENTS in every row where the value in the column SALES is greater than 500000.

10.2 Clob Interface Definition

package java.sql;
public interface java.sql.Clob {
    long length() throws SQLException;
    InputStream getAsciiStream() throws SQLException;
    Reader getCharacterStream() throws SQLException;
    String getSubString(long pos, int length) throws SQLException;
    long position(String searchstr, long start) throws SQLException;
    long position(Clob searchstr, long start) throws SQLException;
}

10.3 Clob Methods

getAsciiStream

InputStream getAsciiStream() throws SQLException
Materializes the CLOB value designated by this Clob object as a stream of Ascii bytes.

RETURNS:

an InputStream object with all the data in the CLOB value designated by this Clob object as Ascii bytes

EXAMPLE:

java.io.InputStream in = clob.getAsciiStream();
byte b = in.read();
// in has all of the characters in the CLOB value designated by
// clob as Ascii bytes; b designates the first character as an Ascii
// byte

getCharacterStream

Reader getCharacterStream() throws SQLException
Materializes the CLOB value designated by this Clob object as a stream of Unicode characters.

RETURNS:

a Reader object with all the data in the CLOB value designated by this Clob object as Unicode characters

EXAMPLE:

Reader read = clob.getCharacterStream();
// read has all the data in the CLOB value designated by clob
// as Unicode characters

getSubString

length getSubString(long pos, int length) throws SQLException
Returns a copy of the portion of the CLOB value represented by this Clob object that starts at position pos and has up to length consecutive characters.

PARAMETERS:
pos | the position of the first char to extract from the CLOB value designated by this Clob object; the initial position is 1
length | the number of consecutive characters to be copied

RETURNS:

a String object containing a copy of up to length consecutive characters from the CLOB value represented by this Clob object, starting with the char at position pos

EXAMPLE:

String substr = clob.getSubString(1, 100);
// substr contains the first 100 characters in the CLOB value
// designated by clob (those in positions 1 through 100, inclusive)

length

long length() throws SQLExceptions
Returns the number of characters in the CLOB value designated by this Clob object.

RETURNS:

the length in characters of the CLOB value that this Clob object represents

EXAMPLE:

Clob clob = rs.getClob(3);
long len = clob.length();
// len contains the number of characters in the CLOB value
// designated by clob

position

long position(Clob searchstr, long start) throws SQLException
Determines the character position at which the Clob object searchstr begins within the CLOB value that this Clob object represents. The search begins at position start.

PARAMETERS:
searchstr | the Clob object for which to search
start | the position at which to begin searching; the first character is at position 1

RETURNS:

the position at which the Clob object searchstr begins, which will be start or larger if the search, starting at position start, is successful; -1 otherwise

EXAMPLE:

Clob clob2 = rs.getClob(4);
long beginning = clob.position(clob2, 1024);
// if clob2 is contained in clob starting at position 1024 or later,
// beginning will contain the position at which clob2 begins

position

long position(String searchstr, long start) throws SQLException
Determines the position at which the String searchstr begins within the CLOB value that this Clob object represents. The search begins at position start.

PARAMETERS:
searchstr | the string for which to search
start | the position at which to begin searching; the first character is at position 1

RETURNS:

the position at which the String object searchstr begins, which will be start or larger if the search, starting at position start, is successful; -1 otherwise

EXAMPLE:

String searchstr= clob.getSubString(5, 100);
long beginning = clob.position(searchstr, 1024);
// if searchstr is contained in clob from position 1024 on, beginning
// will contain the position at which searchstr begins

Copyright © 2000, Sun Microsystems, Inc. All rights reserved.


JDBC-ODBC Bridge Enhancements

JDBCTM-ODBC Bridge Enhancements

 Documentation Contents
JDBC

The JDBC-ODBC Bridge allows Java programs to use JDBC with many existing ODBC drivers. The Bridge is itself a JDBC driver defined in the class sun.jdbc.odbc.JdbcOdbcDriver. The Bridge defines the JDBC subprotocol odbc.

Status of the JDBC-ODBC Bridge

The JDBC-ODBC Bridge should be considered a transitional solution. Javasoft and Intersolv are working to make the Bridge more reliable and robust, but they do not consider it a supported product. In the near future, development of pure-Java JDBC Drivers will make the JDBC-ODBC Bridge unnecessary.

Why not just use ODBC?

The JDBC-ODBC Bridge offers several advantages over "naked" ODBC.

  • The ODBC API is strongly oriented toward C/C++ programmers. The JDBC-ODBC Bridge makes it unnecessary for the Java programmer to deal with non-Java concepts.

  • The ODBC API is extremely complex and intermingles high-level and low-level functions. The JDBC-ODBC Bridge allows the programmer to rely on the JDBC API, which is relatively simple and easy to learn.

  • The JDBC-ODBC Bridge lets a program deal with ODBC through a standardized JDBC interface. That helps a program avoid being tied to ODBC when a better solution comes along.

Why use ODBC at all?

The Java programmer's ideal is "Pure Java": no native code, no platform-dependent features. But you may need to begin your development effort right away, without waiting for your DBMS to offer a Java-only JDBC Driver. Partly-native Drivers, such as the JDBC-ODBC Bridge, let you create programs that easily adapt to Pure Java drivers as they become available.

What's new with the JDBC-ODBC Bridge?

  • The Bridge has been re-implemented using the Java Native Interface API, for improved performance and stability.

  • A jdbc:odbc: connection can now have a charSet property, to specify a Character Encoding Scheme other than the client default. For possible values, see the JDK 1.1 Internationalizaton specification on the Javasoft Web Site.

  • The Bridge now assumes that ODBC drivers are able to handle multi-threaded access. This will improve performance. If you need to use multi-threading and your ODBC package does not support it, your client program will have to implement locking.

Copyright © 1996-97 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com


[Top] [Prev] [Next]

Appendix B - Sample Code

    // The following code can be used as a template.  Simply
// substitute the appropriate url, login, and password, and then substitute the
// SQL statement you want to send to the database.

//----------------------------------------------------------------------------
//
// Module:	SimpleSelect.java
//
// Description:	Test program for ODBC API interface.  This java application
// will connect to a JDBC driver, issue a select statement
// and display all result columns and rows
//
// Product:	JDBC to ODBC Bridge
//
// Author:	Karl Moss
//
// Date:	February, 1996
//
// Copyright:	1990-1996 INTERSOLV, Inc.
// This software contains confidential and proprietary
// information of INTERSOLV, Inc.
//----------------------------------------------------------------------------

import java.net.URL;
import java.sql.*;

class SimpleSelect {

public static void main (String args[]) {
    String url   = "jdbc:odbc:my-dsn";
    String query = "SELECT * FROM emp";

    try {

        // Load the jdbc-odbc bridge driver

        Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

        DriverManager.setLogStream(System.out);

        // Attempt to connect to a driver.  Each one
        // of the registered drivers will be loaded until
        // one is found that can process this URL

        Connection con = DriverManager.getConnection (
            url, "my-user", "my-passwd");

        // If we were unable to connect, an exception
        // would have been thrown.  So, if we get here,
        // we are successfully connected to the URL

        // Check for, and display and warnings generated
        // by the connect.

        checkForWarning (con.getWarnings ());

        // Get the DatabaseMetaData object and display
        // some information about the connection

        DatabaseMetaData dma = con.getMetaData ();

        System.out.println("\nConnected to " + dma.getURL());
        System.out.println("Driver       " +
            dma.getDriverName());
        System.out.println("Version      " +
            dma.getDriverVersion());
        System.out.println("");

        // Create a Statement object so we can submit
        // SQL statements to the driver

        Statement stmt = con.createStatement ();

        // Submit a query, creating a ResultSet object

        ResultSet rs = stmt.executeQuery (query);

        // Display all columns and rows from the result set

        dispResultSet (rs);

        // Close the result set

        rs.close();

        // Close the statement

        stmt.close();

        // Close the connection

        con.close();
    }
    catch (SQLException ex) {

        // A SQLException was generated.  Catch it and
        // display the error information.  Note that there
        // could be multiple error objects chained
        // together

    System.out.println ("\n*** SQLException caught ***\n");

    while (ex != null) {
        System.out.println ("SQLState: " +
                ex.getSQLState ());
        System.out.println ("Message:  " + ex.getMessage ());
        System.out.println ("Vendor:   " +
                ex.getErrorCode ());
        ex = ex.getNextException ();
        System.out.println ("");
        }
    }
    catch (java.lang.Exception ex) {

        // Got some other type of exception.  Dump it.

        ex.printStackTrace ();
    }
}

//-------------------------------------------------------------------
// checkForWarning
// Checks for and displays warnings.  Returns true if a warning
// existed
//-------------------------------------------------------------------

private static boolean checkForWarning (SQLWarning warn)
        throws SQLException  {
    boolean rc = false;

    // If a SQLWarning object was given, display the
    // warning messages.  Note that there could be
    // multiple warnings chained together

    if (warn != null) {
        System.out.println ("\n *** Warning ***\n");
        rc = true;
        while (warn != null) {
            System.out.println ("SQLState: " +
                warn.getSQLState ());
            System.out.println ("Message:  " +
                warn.getMessage ());
            System.out.println ("Vendor:   " +
                warn.getErrorCode ());
            System.out.println ("");
            warn = warn.getNextWarning ();
        }
    }
    return rc;
}

//-------------------------------------------------------------------
// dispResultSet
// Displays all columns and rows in the given result set
//-------------------------------------------------------------------

private static void dispResultSet (ResultSet rs)
    throws SQLException
{
    int i;

    // Get the ResultSetMetaData.  This will be used for
    // the column headings

    ResultSetMetaData rsmd = rs.getMetaData ();

    // Get the number of columns in the result set

    int numCols = rsmd.getColumnCount ();

    // Display column headings

    for (i=1; i<=numCols; i++) {
        if (i > 1) System.out.print(",");
        System.out.print(rsmd.getColumnLabel(i));
    }
    System.out.println("");

    // Display data, fetching until end of the result set

    boolean more = rs.next ();
    while (more) {

        // Loop through each column, getting the
        // column data and displaying

        for (i=1; i<=numCols; i++) {
            if (i > 1) System.out.print(",");
            System.out.print(rs.getString(i));
        }
        System.out.println("");

        // Fetch the next result set row

        more = rs.next ();
    }
}

}

[Top] [Prev] [Next]
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1999 Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

CallableStatement

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

7.1 CallableStatement Overview

A CallableStatement object provides a way to call stored procedures in a standard way for all RDBMSs. A stored procedure is stored in a database; the call to the stored procedure is what a CallableStatement object contains. This call is written in an escape syntax that may take one of two forms: one form with a result parameter, and the other without one. A result parameter, a kind of OUT parameter, is the return value for the stored procedure. Both forms may have a variable number of parameters used for input (IN parameters), output (OUT parameters), or both (INOUT parameters). A question mark serves as a placeholder for a parameter.

The syntax for invoking a stored procedure using the JDBC API is shown here. Note that the square brackets indicate that what is between them is optional; they are not themselves part of the syntax.

{call procedure_name[(?, ?, ...)]}

The syntax for a procedure that returns a result parameter is:

{? = call procedure_name[(?, ?, ...)]}

The syntax for a stored procedure with no parameters would look like this:

{call procedure_name}

Normally, anyone creating a CallableStatement object would already know that the DBMS being used supports stored procedures and what those procedures are. If one needed to check, however, various DatabaseMetaData methods will supply such information. For instance, the method supportsStoredProcedures will return true if the DBMS supports stored procedure calls, and the method getProcedures will return a description of the stored procedures available.

CallableStatement inherits Statement methods, which deal with SQL statements in general, and it also inherits PreparedStatement methods, which deal with IN parameters. All of the methods defined in CallableStatement deal with OUT parameters>OUT parameters or the output aspect of INOUT parameters: registering the JDBC types of the OUT parameters, retrieving values from them, or checking whether a returned value was JDBC NULL. Whereas the getXXX methods defined in ResultSet retrieve values from a result set, the getXXX methods in CallableStatement retrieve values from the OUT parameters and/or return value of a stored procedure.

7.1.1 Creating a CallableStatement Object

CallableStatement objects are created with the Connection method prepareCall. The following example, in which con is an active JDBC Connection object, creates an instance of CallableStatement.

CallableStatement cstmt = con.prepareCall(
    "{call getTestData(?, ?)}");

The variable cstmt contains a call to the stored procedure getTestData, which has two input parameters and no result parameter. Whether the ? placeholders are IN, OUT, or INOUT parameters depends on the stored procedure getTestData. This instance of a CallableStatement object was created using JDBC 1.0 API; consequently, any query in the stored procedure called by cstmt will produce a default ResultSet object (one that is non-scrollable and non-updatable).

The JDBC 2.0 API provides the means to create CallableStatement objects that can produce ResultSet objects that are scrollable and updatable, as the following code fragment demonstrates.

String sql = "{call getTestData(?, ?)}";
CallableStatement cstmt2 = con.prepareCall(sql,
    ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);

The variable cstmt2 contains the same call to the stored procedure TestData that cstmt does, but with cstmt2, any resultSet objects that TestData produces can be updated and are scrollable (though they will not be sensitive to updates made while they are open). Explanations for the constants used to indicate scrollability and updatability are given in the chapter "ResultSet."

7.1.2 IN Parameters

Passing in any IN parameter values to a CallableStatement object is done using the setXXX methods inherited from PreparedStatement. The type of the value being passed in determines which setXXX method to use (setFloat to pass in a float value, setBoolean to pass in a boolean, and so on). Of the programs that use parameters, the vast majority use only IN parameters.

7.1.3 Making Batch Updates

The ability to make batch updates is the same for CallableStatement objects as it is for PreparedStatement objects. In fact, a CallableStatement object is restricted to the same functionality that a PreparedStatement object has. More precisely, when using the batch update facility, a CallableStatement object can call only stored procedures that take input parameters or no parameters at all. Further, the stored procedure must return an update count. The CallableStatement.executeBatch method (inherited from PreparedStatement) will throw a BatchUpdateException if the stored procedure returns anything other than an update count or takes OUT or INOUT parameters.

The following code fragment illustrates using the batch update facility to associate two sets of parameters with a CallableStatement object.

CallableStatement cstmt = con.prepareCall(
            "{call updatePrices(?, ?)}");
cstmt.setString(1, "Colombian");
cstmt.setFloat(2, 8.49f);
cstmt.addBatch();

cstmt.setString(1, "Colombian_Decaf");
cstmt.setFloat(2, 9.49f);
cstmt.addBatch();

int [] updateCounts = cstmt.executeBatch();

The variable cstmt contains a call to the stored procedure updatePrices with two sets of parameters associated with it. When cstmt is executed, two update statements will be executed together as a batch: one with the parameters Colombian and 8.49f, and a second one with the parameters Colombian_Decaf and 9.49f. An f after a number, as in 8.49f, tells the Java compiler that the value is a float; otherwise, the compiler assumes that a number with decimal digits is a double and will not allow it to be used as a float.

7.1.4 OUT Parameters

If the stored procedure returns OUT parameters, the JDBC type of each OUT parameter must be registered before the CallableStatement object can be executed. This is necessary because some DBMSs require the SQL type (which the JDBC type represents), not because JDBC requires it. JDBC types, a set of generic SQL type identifiers that represent the most commonly used SQL types, are explained fully in the chapter "Mapping SQL and Java Types" on page 85.

Registering the JDBC type is done with the method registerOutParameter. Then after the statement has been executed, CallableStatement's getXXX methods can be used to retrieve OUT parameter values. The correct CallableStatement.getXXX method to use is the type in the Java programming language that corresponds to the JDBC type registered for that parameter. (The standard mapping from JDBC types to Java types is shown in Table 8.1 on page 105.) In other words, registerOutParameter uses a JDBC type (so that it matches the data type that the database will return), and getXXX casts this to a Java type.

To illustrate, the following code registers the OUT parameters, executes the stored procedure called by cstmt, and then retrieves the values returned in the OUT parameters. The method getByte retrieves a Java byte from the first OUT parameter, and getBigDecimal retrieves a java.math.BigDecimal object (with three digits after the decimal point) from the second OUT parameter. The method executeQuery is used to execute cstmt because the stored procedure that it calls returns a result set.

CallableStatement cstmt = con.prepareCall(
    "{call getTestData(?, ?)}");
cstmt.registerOutParameter(1, java.sql.Types.TINYINT);
cstmt.registerOutParameter(2, java.sql.Types.DECIMAL, 3);
ResultSet rs = cstmt.executeQuery();
// . . . retrieve result set values with rs.getXXX methods
byte x = cstmt.getByte(1);
java.math.BigDecimal n = cstmt.getBigDecimal(2);

Unlike ResultSet, CallableStatement does not provide a special mechanism for retrieving large OUT values incrementally. More specifically, it does not have getXXX methods for streams of data, such as getAsciiStream or getBinary-Stream. However, the JDBC 2.0 API provides CallableStatement methods for retrieving SQL3 datatypes as OUT or INOUT parameters, which includes the methods getBlob and getClob for retrieving binary large objects and character large objects.

7.1.5 Numbering of Parameters

When a method takes an int specifying which parameter to act upon (setXXX, getXXX, and registerOutParameter), that int refers to ? placeholder parameters only, with numbering starting at one. The parameter number does not refer to literal parameters that might be supplied to a stored procedure call. For example, the following code fragment illustrates a stored procedure call with one literal parameter and one ? parameter:

CallableStatement cstmt = con.prepareCall(
        "{call getTestData(25, ?)}");
cstmt.registerOutParameter(1, java.sql.Types.TINYINT);

In this code, the first argument to registerOutParameter, the int 1, refers to the first ? parameter (and in this case, the only ? parameter). It does not refer to the literal 25, which is the first parameter to the stored procedure.

7.1.6 INOUT Parameters

A parameter that supplies input as well as accepts output (an INOUT parameter) requires a call to the appropriate setXXX method (inherited from PreparedStatement) in addition to a call to the method registerOutParameter. The setXXX method sets a parameter's value as an input parameter, and the method registerOutParameter registers its JDBC type as an output parameter. The setXXX method provides a Java value that the driver converts to a JDBC value before sending it to the database. The JDBC type of this IN value and the JDBC type supplied to the method registerOutParameter should be the same. Then, to retrieve the output value, a corresponding getXXX method is used. For example, a parameter whose Java type is byte should use the method setByte to assign the input value, should supply a TINYINT as the JDBC type to registerOutParameter, and should use getByte to retrieve the output value. ("Mapping SQL and Java Types" on page 85 contains tables of type mappings.)

The following example assumes that there is a stored procedure reviseTotal whose only parameter is an INOUT parameter. The method setByte sets the parameter to 25, which the driver will send to the database as a JDBC TINYINT. Next registerOutParameter registers the parameter as a JDBC TINYINT. After the stored procedure is executed, a new JDBC TINYINT value is returned, and the method getByte will retrieve this new value as a Java byte. Since the stored procedure called in this example returns an update count, the method executeUpdate is used.

CallableStatement cstmt = con.prepareCall(
        "{call reviseTotal(?)}");
cstmt.setByte(1, (byte)25);
cstmt.registerOutParameter(1, java.sql.Types.TINYINT);
cstmt.executeUpdate();
byte x = cstmt.getByte(1);

7.1.7 Retrieve OUT Parameters after Results

Because of limitations imposed by some DBMSs, it is recommended that for maximum portability, all of the results in a ResultSet object generated by the execution of a CallableStatement object should be retrieved before OUT parameters are retrieved. When all values have been retrieved from a result set, the method ResultSet.next will return false.

If a CallableStatement object returns multiple ResultSet objects (which is possible only if it is executed with a call to the method execute), all of the results should be retrieved before OUT parameters are retrieved. In this case, to be sure that all results have been accessed, the Statement methods getResultSet, getUpdateCount, and getMoreResults need to be called until there are no more results. When all results have been exhausted, the method getMoreResults returns false, and the method getUpdateCount returns -1.

After all values have been retrieved from ResultSet objects (using ResultSet.getXXX methods), and after it has been determined that there are no more update counts, values from OUT parameters can be retrieved (using CallableStatement.getXXX methods).

7.1.8 Retrieving NULL Values as OUT Parameters

The value returned to an OUT parameter may be JDBC NULL. When this happens, the JDBC NULL value will be converted so that the value returned by a getXXX method will be null, 0, or false, depending on the getXXX method type. As with ResultSet objects, the only way to know if a value of 0 or false was originally JDBC NULL is to test it with the method wasNull, which returns true if the last value read by a getXXX method was JDBC NULL, and false otherwise.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

Connection

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

2.1 Connection Overview

A Connection object represents a connection with a database. A connection session includes the SQL statements that are executed and the results that are returned over that connection. A single application can have one or more connections with a single database, or it can have connections with many different databases.

A user can get information about a Connection object's database by invoking the Connection.getMetaData method. This method returns a DatabaseMetaData object that contains information about the database's tables, the SQL grammar it supports, its stored procedures, the capabilities of this connection, and so on.

2.1.1 Opening a Connection

The traditional way to establish a connection with a database is to call the method DriverManager.getConnection. This method takes a string containing a URL. The DriverManager class, referred to as the JDBC management layer, attempts to locate a driver that can connect to the database represented by that URL. The DriverManager class maintains a list of registered Driver classes, and when the method getConnection is called, it checks with each driver in the list until it finds one that can connect to the database specified in the URL. The Driver method connect uses this URL to actually establish the connection.

A user can bypass the JDBC management layer and call Driver methods directly. This could be useful in the rare case that two drivers can connect to a database and the user wants to explicitly select a particular driver. Normally, however, it is much easier to just let the DriverManager class handle opening a connection.

The following code exemplifies opening a connection to a database located at the URL jdbc:odbc:wombat with a user ID of oboy and 12Java as the password:

String url = "jdbc:odbc:wombat";
Connection con = DriverManager.getConnection(url, "oboy", "12Java");

The JDBC 2.0 Standard Extension API provides the DataSource interface as an alternative to the DriverManager for establishing a connection. When a DataSource class has been implemented appropriately, a DataSource object can be used to produce Connection objects that participate in connection pooling and/or Connection objects that can participate in distributed transactions. See the chapter "DataSource" for more information and to see example code for creating a connection using a DataSource object. This chapter also explains why using a DataSource object is the preferred alternative for creating a connection.

An application uses a Connection object produced by a DataSource object in essentially the same way it uses a Connection object produced by the DriverManager. There are some differences, however. If the Connection object is a pooled connection, an application should include a finally block to assure that the connection is closed even if an exception is thrown. That way a valid connection will always be put back into the pool of available connections.

If a Connection object is part of a distributed transaction, an application should not call the methods Connection.commit or Connection.rollback, nor should it turn on the connection's auto-commit mode. These would interfere with the transaction manager's handling of the distributed transaction.

2.1.2 URLs in General Use

When an application uses the DriverManager to create a Connection object, it must supply a URL to the DriverManager.getConnection method. Since URLs often cause some confusion, we will first give a brief explanation of URLs in general and then go on to a discussion of JDBC URLs.

A URL (Uniform Resource Locator) gives information for locating a resource on the Internet. It can be thought of as an address.

The first part of a URL specifies the protocol used to access information, and it is always followed by a colon. Some common protocols are ftp, which specifies "file transfer protocol," and http, which specifies "hypertext transfer protocol." If the protocol is file, it indicates that the resource is in a local file system rather than on the Internet.

      ftp://javasoft.com/docs/JDK-1_apidocs.zip
      http://java.sun.com/products/JDK/CurrentRelease
      file:/home/haroldw/docs/tutorial.html

The rest of a URL, everything after the first colon, gives information about where the data source is located. If the protocol is file, the rest of the URL is the path for the file. For the protocols ftp and http, the rest of the URL identifies the host and may optionally give a path to a more specific site. For example, here is the URL for the Java Software home page. This URL identifies only the host:

http://www.java.sun.com

By navigating from this home page, you can go to many other pages, one of which is the JDBC home page. The URL for the JDBC home page is more specific and looks like this:

http://www.java.sun.com/products/jdbc

2.1.3 JDBC URLs

A JDBC URL provides a way of identifying a data source so that the appropriate driver will recognize it and establish a connection with it. Driver writers are the ones who actually determine what the JDBC URL that identifies a particular driver will be. Users do not need to worry about how to form a JDBC URL; they simply use the URL supplied with the drivers they are using. JDBC's role is to recommend some conventions for driver writers to follow in structuring their JDBC URLs.

Since JDBC URLs are used with various kinds of drivers, the conventions are, of necessity, very flexible. First, they allow different drivers to use different schemes for naming databases. The odbc subprotocol, for example, lets the URL contain attribute values (but does not require them).

Second, JDBC URLs allow driver writers to encode all necessary connection information within them. This makes it possible, for example, for an applet that wants to talk to a given database to open the database connection without requiring the user to do any system administration chores.

Third, JDBC URLs allow a level of indirection. This means that the JDBC URL may refer to a logical host or database name that is dynamically translated to the actual name by a network naming system. This allows system administrators to avoid specifying particular hosts as part of the JDBC name. There are a number of different network name services (such as DNS, NIS, and DCE), and there is no restriction about which ones can be used.

The standard syntax for JDBC URLs is shown here. It has three parts, which are separated by colons.

    jdbc:<subprotocol>:<subname>

The three parts of a JDBC URL are broken down as follows:

  1. jdbc-the protocol. The protocol in a JDBC URL is always jdbc.

  2.  <subprotocol>-the name of the driver or the name of a database connectivity mechanism, which may be supported by one or more drivers. A prominent example of a subprotocol name is odbc, which has been reserved for URLs that specify ODBC-style data source names. For example, to access a database through a JDBC-ODBC bridge, one might use a URL such as the following:

        jdbc:odbc:fred

In this example, the subprotocol is odbc, and the subname fred is a local ODBC data source.

    If one wants to use a network name service (so that the database name in the JDBC URL does not have to be its actual name), the naming service can be the subprotocol. So, for example, one might have a URL like:

        jdbc:dcenaming:accounts-payable

In this example, the URL specifies that the local DCE naming service should resolve the database name accounts-payable into a more specific name that can be used to connect to the real database.

  3. <subname>-a way to identify the data source. The subname can vary, depending on the subprotocol, and it can have any internal syntax the driver writer chooses, including a subsubname. The point of a subname is to give enough information to locate the data source. In the previous example, fred is enough because ODBC provides the remainder of the information. A data source on a remote server requires more information, however. If the data source is to be accessed over the Internet, for example, the network address should be included in the JDBC URL as part of the subname and should adhere to the following standard URL naming convention:

         //hostname:port/subsubname

Supposing that dbnet is a protocol for connecting to a host on the Internet, a JDBC URL might look like this:

        jdbc:dbnet://wombat:356/fred

2.1.4	 The odbc Subprotocol

The subprotocol odbc is a special case. It has been reserved for URLs that specify ODBC-style data source names and has the special feature of allowing any number of attribute values to be specified after the subname (the data source name). The full syntax for the odbc subprotocol is:

  jdbc:odbc:<data-source-name>[;<attribute-name>=<attribute-value>]*

Thus all of the following are valid jdbc:odbc names:

     jdbc:odbc:qeor7
     jdbc:odbc:wombat
     jdbc:odbc:wombat;CacheSize=20;ExtensionCase=LOWER
     jdbc:odbc:qeora;UID=kgh;PWD=fooey

2.1.5	 Registering Subprotocols

A driver developer can reserve a name to be used as the subprotocol in a JDBC URL. When the DriverManager class presents this name to its list of registered drivers, the driver for which this name is reserved should recognize it and establish a connection to the database it identifies. For example, "odbc" is reserved for the JDBC-ODBC Bridge. If there were a Miracle Corporation, it might want to register "miracle" as the subprotocol for the JDBC driver that connects to its Miracle DBMS so that no one else would use that name.

Java Software is acting as an informal registry for JDBC subprotocol names. To register a subprotocol name, send email to:

    jdbc@eng.sun.com

2.1.6	 Sending SQL Statements

Once a connection is established, it is used to pass SQL statements to its underlying database. The JDBC API does not put any restrictions on the kinds of SQL statements that can be sent; this provides a great deal of flexibility, allowing the use of database-specific statements or even non-SQL statements. It requires, however, that the user be responsible for making sure that the underlying database can process the SQL statements being sent and suffer the consequences if it cannot. For example, an application that tries to send a stored procedure call to a DBMS that does not support stored procedures will be unsuccessful and will generate an exception.

The JDBC API provides three interfaces for sending SQL statements to the database, and corresponding methods in the Connection interface create instances of them. The interfaces for sending SQL statements and the Connection methods that create them are as follows:

  1. Statement-created by the Connection.createStatement methods. A Statement object is used for sending SQL statements with no parameters.

  2. PreparedStatement-created by the Connection.prepareStatement methods. A PreparedStatement object is used for precompiled SQL statements. These can take one or more parameters as input arguments (IN parameters). PreparedStatement has a group of methods that set the value of IN parameters, which are sent to the database when the statement is executed. PreparedStatement extends Statement and therefore includes Statement methods. A PreparedStatement object has the potential to be more efficient than a Statement object because it has been precompiled and stored for future use. Therefore, in order to improve performance, a PreparedStatement object is sometimes used for an SQL statement that is executed many times.

  3. CallableStatement-created by the Connection.prepareCall methods. CallableStatement objects are used to execute SQL stored procedures-a group of SQL statements that is called by name, much like invoking a function. A CallableStatement object inherits methods for handling IN parameters from PreparedStatement; it adds methods for handling OUT and INOUT parameters.

The following list gives a quick way to determine which Connection method is appropriate for creating different types of SQL statements:

  • createStatement methods-for a simple SQL statement (no parameters)

  • prepareStatement methods-for an SQL statement that is executed frequently

  • prepareCall methods-for a call to a stored procedure

The versions of these methods that take no arguments create statements that will produce default ResultSet objects; that is, they produce result sets that are not scrollable and that cannot be updated. With the JDBC 2.0 API, it is possible to create statements that will produce result sets that are scrollable and/or updatable. This is done by using new versions of the methods createStatement, prepareStatement, and prepareCall that take additional parameters for specifying the type of result set and the concurrency level of the result set being created. In Chapter 5, "ResultSet," the section on the types of ResultSet objects on page 52 explains the different types of ResultSet objects and the constants that specify them. The section "Concurrency Types" on page  53 does the same for concurrency levels. "Creating Different Types of Result Sets" on page  55 gives examples of how to create ResultSet objects using the new versions of the Connection methods for creating statements.

2.1.7	 Transactions

A transaction consists of one or more statements that have been executed, completed, and then either committed or rolled back. When the method commit or rollback is called, the current transaction ends and another one begins.

Generally a new Connection object is in auto-commit mode by default, meaning that when a statement is completed, the method commit will be called on that statement automatically. In this case, since each statement is committed individually, a transaction consists of only one statement. If auto-commit mode has been disabled, a transaction will not terminate until the method commit or rollback is called explicitly, so it will include all the statements that have been executed since the last invocation of either commit or rollback. In this second case, all the statements in the transaction are committed or rolled back as a group.

The beginning of a transaction requires no explicit call; it is implicitly initiated after disabling auto-commit mode or after calling the methods commit or rollback. The method commit makes permanent any changes an SQL statement makes to a database, and it also releases any locks held by the transaction. The method rollback will discard those changes.

 Sometimes a user doesn't want one change to take effect unless another one does also. This can be accomplished by disabling auto-commit and grouping both updates into one transaction. If both updates are successful, then the commit method is called, making the effects of both updates permanent; if one fails or both fail, then the rollback method is called, restoring the values that existed before the updates were executed.

Most JDBC drivers will support transactions. In order to be designated JDBC Compliant, a JDBC driver must support transactions.

The JDBC 2.0 Standard Extension API makes it possible for Connection objects to be part of a distributed transaction, a transaction that involves connections to more than one DBMS server. When a Connection object is part of a distributed transaction, a transaction manager determines when the methods commit or rollback are called on it. Thus, when a Connection object is participating in a distributed transaction, an application should not do anything that affects when a connection begins or ends.

In order to be able to participate in distributed transactions, a Connection object must be produced by a DataSource object that has been implemented to work with the middle tier server's distributed transaction infrastructure. Unlike Connection objects produced by the DriverManager, a Connection object produced by such a DataSource object will have its auto-commit mode disabled by default. A standard implementation of a DataSource object, on the other hand, will produce Connection objects that are exactly the same as those produced by the DriverManager class.

2.1.8	 Transaction Isolation Levels

If a DBMS supports transaction processing, it will have some way of managing potential conflicts that can arise when two transactions are operating on a database at the same time. A user can specify a transaction isolation level to indicate what level of care the DBMS should exercise in resolving potential conflicts. For example, what happens when one transaction changes a value and a second transaction reads that value before the change has been committed or rolled back? Should that be allowed, given that the changed value read by the second transaction will be invalid if the first transaction is rolled back? A JDBC user can instruct the DBMS to allow a value to be read before it has been committed (a "dirty read") with the following code, where con is the current connection:

con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED);

The higher the transaction isolation level, the more care is taken to avoid conflicts. The Connection interface defines five levels, with the lowest specifying that transactions are not supported at all and the highest specifying that while one transaction is operating on a database, no other transactions may make any changes to the data read by that transaction. TRANSACTION_READ_UNCOMMITTED, used in the previous example, is one level up from the lowest level. Typically, the higher the level of isolation, the slower the application executes (due to increased locking overhead and decreased concurrency between users). The developer must balance the need for performance with the need for data consistency when making a decision about what isolation level to use. Of course, the level that can actually be supported depends on the capabilities of the underlying DBMS.

When a new Connection object is created, its transaction isolation level depends on the driver, but normally it is the default for the underlying data source. A user may call the method setIsolationLevel to change the transaction isolation level, and the new level will be in effect for the rest of the connection session. To change the transaction isolation level for just one transaction, one needs to set it before executing any statements in the transaction and then reset it after the transaction terminates. Changing the transaction isolation level during a transaction is not recommended, for it will trigger an immediate call to the method commit, causing any changes up to that point to be made permanent.

2.1.9	 Freeing DBMS Resources

It is recommended that programmers explicitly close connections and statements they have created when they are no longer needed.

A programmer writing code in the Java programming language and not using any outside resources does not need to worry about memory management. The garbage collector automatically removes objects when they are no longer being used and frees the memory they were using. When memory is running low, it will recycle discarded objects, making the memory they currently occupy available for quick reuse.

However, if an application uses external resources, as it does when it accesses a DBMS with the JDBC API, the garbage collector has no way of knowing the status of those resources. It will still recycle discarded objects, but if there is lots of free memory in the Java heap, it may garbage collect infrequently, even though the (small) amount of Java garbage is holding open large amounts of expensive database resources. Therefore, it is recommended that programmers explicitly close all connections (with the method Connection.close) and statements (with the method Statement.close) as soon as they are no longer needed, thereby freeing DBMS resources as early as possible. This applies especially to applications that are intended to work with different DBMSs because of variations from one DBMS to another.

Note that the method Connection.isClosed is guaranteed to return true only when it is called after the method Connection.close has been called. As a result, a programmer cannot depend on this method to indicate whether a connection is valid or not. Instead, a typical JDBC client can determine that a connection is invalid by catching the exception that is thrown when a JDBC operation is attempted.

2.1.10	 Using Type Maps

The two new SQL3 data types that are user-defined types (UDTs), SQL structured types and DISTINCT types, can be custom mapped to a class in the Java programming language. Like all the SQL3 data types, they have standard mappings, but a programmer may create a custom mapping as well. The fact that there is a custom mapping for a particular UDT is declared in a java.util.Map object. This Map object may be the one that is associated with a connection, or it may be one that is passed to a method.

A programmer declares a custom mapping by adding an entry to a Map object. This entry must contain two things: (1) the name of the UDT to be mapped and (2) the Class object for the class in the Java programming language to which the UDT is to be mapped. The class itself, which must implement the SQLData interface, will contain the specific mappings.

Each Connection object created using a JDBC 2.0 driver that supports custom mapping will have an empty type map to which custom mappings may be added. This type map is an instance of the interface java.util.Map, which is new in the Java 2 platform and replaces java.util.Dictionary. Until custom map entries are added to this type map, all operations for STRUCT and DISTINCT values will use the standard mappings (the Struct interface for STRUCT values and the underlying type for DISTINCT values).

The following code fragment, in which con is a Connection object and ADDRESSES is an SQL structured type, demonstrates retrieving the type map associated with con and adding a new entry to it. After the type map is modified, it is set as the new type map for con.

java.util.Map map = con.getTypeMap();
map.put("SchemaName.ADDRESSES", Class.forName("Addresses"));
con.setTypeMap();

The Map object map, the type map associated with con, now contains at least one custom mapping (or more if any mappings have already been added). The programmer will have previously created the class Addresses, probably using a tool to generate it. Note that it is an error to supply a class that does not implement the interface SQLData. The class Addresses, which does implement SQLData, will have a field for each attribute in ADDRESSES, and whenever a value of type ADDRESSES is operated on by a method in the Java programming language, the default will be to map it to an instance of the class Addresses. The type map associated with a connection is the default type map in the sense that a method will use it if no other type map is explicitly passed to it.

Note that the name of the UDT should be the fully-qualified name. For some DBMSs, this will be of the form catalogName.schemaName.UDTName. Many DBMSs, however, do not use this form and, for example, use a schema name but no catalog name. The important thing is to use the form appropriate for a particular DBMS. The DatabaseMetaData methods getCatalogs, getCatalogTerm, getCatalogSeparator, getSchemas and getSchemaTerm give information about a DBMS's catalogs, schemas, preferred terms, and the separator it uses.

Instead of modifying the existing type map, an application can replace it with a completely different type map. This is done with the Connection method setTypeMap, as shown in the following code fragment. It creates a new type map, gives it two entries (each with an SQL UDT name and the class to which values of that type should be mapped), and then installs the new type map as the one associated with the Connection con.

java.util.Map newConnectionMap = new java.util.HashTable();
newConnectionMap.put(
     "SchemaName.UDTName1", Class.forName("className1"));
newConnectionMap.put(
     "SchemaName.UDTName2", Class.forName("className2"));
con.setTypeMap(newConnectionMap);

The Map object newConnectionMap now replaces the type map originally associated with the Connection con, and it will be used for custom type mappings unless it is itself replaced. Note that the example uses the default constructor for the class HashTable to create the new type map. This class is one of many implementations of java.util.Map provided in the Java 2 platform API, and one of the others could have been used as well.

In the previous examples, the type map associated with a connection was modified to contain additional mappings or set to be a different type map altogether. In either case, though, the connection's type map is the default for custom mapping JDBC types to types in the Java programming language. The next example will show how to supersede the connection's type map by supplying a method with a different type map.

Methods whose implementations may involve a custom mapping for UDTs have two versions, one that takes a type map and one that does not. If a type map is passed to one of these methods, the given type map will be used instead of the one associated with the connection. For example, the Array methods getArray and getResultSet have versions that take a type map and versions that do not. If a type map is passed to a method, it will map the array elements using the given type map. If no type map is specified, the method will use the type map associated with the connection.

The capability for supplying a type map to a method makes it possible for values of the same user-defined type to have different mappings. For example, if two applications are using the same connection and operating on the same column value, one could use the type map associated with the connection, and the other could use a different type map by supplying it as an argument to the appropriate method.

The following code fragment creates a new type map and provides it as a parameter to the Array method getArray.

java.util.Map arrayMap = new java.util.HashTable();
arrayMap.put("SchemaName.DIMENSIONS", Class.forName("Dimensions"));
Dimensions [] d = (Dimensions [])array.getArray(arrayMap);

In the second line, the new type map arrayMap is given an entry with the fully-qualified name of an SQL structured type (SchemaName.DIMENSIONS) and the Java class object (Class.forName("Dimensions")). This establishes the mapping between the Java type Dimensions and the SQL type DIMENSIONS. In the third line, arrayMap is specified as the type map to use for mapping the contents of this Array object, whose base type is SchemaName.DIMENSIONS.

The method getArray will materialize the elements of the SQL3 ARRAY value designated by array, with each element being mapped according to the mapping specified in arrayMap. In other words, each element, which is a value of type Schema.DIMENSIONS, will be translated to an instance of the class Dimensions by mapping the attributes of each DIMENSIONS value to the fields of a Dimensions object. If the base type of the array does not match the UDT named in arrayMap, the driver will convert the array's elements according to the standard mapping. If no type map is specified to the method getArray, the driver uses the mapping indicated in the connection's type map. If that type map has no entry for Schema.DIMENSIONS, the driver will instead use the standard mapping.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc.   All rights
reserved.


Copyright Page for Sun Microsystems, Inc.

Sun Microsystems, Inc.

Copyright 1996-1999 Sun Microsystems, Inc.
901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A.

All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc.

Sun Microsystems, Inc. (SUN) hereby grants to you a fully-paid, nonexclusive, nontransferable, perpetual, worldwide limited license (without the right to sublicense) under SUN's intellectual property rights that are essential to practice this specification. This license allows and is limited to the creation and distribution of clean room implementations of this specification that (i) include a complete implementation of the current version of this specification without subsetting or supersetting, (ii) implement all the interfaces and functionality of the standard java.* packages as defined by SUN, without subsetting or supersetting, (iii) do not add any additional packages, classes or methods to the java.* packages (iv) pass all test suites relating to the most recent published version of this specification that are available from SUN six (6) months prior to any beta release of the clean room implementation or upgrade thereto, (v) do not derive from SUN source code or binary materials, and (vi) do not include any SUN binary materials without an appropriate and separate license from SUN.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-1(a).

This software and documentation is the confidential and proprietary information of Sun Microsystems, Inc. ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement you entered into with Sun.

SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.

TRADEMARKS

Sun, the Sun logo, Sun Microsystems, SunNet Manager, SunCore, SunWeb, Sun Workshop, Sun Workstation, Java, the Java Coffee Cup logo, JavaSoft, JavaBeans, HotJava, HotJava Views, Java WorkShop, Visual Java, JDK and all Java-based trademarks and logos, Solaris, the Solaris sunburst design, SolarNet, Solstice, NEO, Joe, Netra, NFS, PC-NFS, ONC, ONC+, OpenWindows, SNM, The Network Is The Computer, ToolTalk, Ultra, Ultracomputing, Ultraserver, Where The Network Is Going, and XView, are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.

UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. OPEN LOOK® is a registered trademark of Novell, Inc.

All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.

The OPEN LOOK® and Sun(TM) Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements.

X Window System is a trademark of the X Consortium, Inc.

OpenStep is a trademark owned by NeXT and is used under license.

THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.

For further information on Intellectual Property matters, see Java Trademark Guidelines or contact Sun Legal Department:

  • Trademarks, Karrie Malouf at (650) 336-7419
  • Patents at 415-336-0069


 [Top] [Prev] [Next]

DriverManager

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

3.1 DriverManager Overview

The DriverManager class is the traditional management layer of JDBC, working between the user and the drivers. It keeps track of the drivers that are available and handles establishing a connection between a database and the appropriate driver. In addition, the DriverManager class attends to things like driver login time limits and the printing of log and tracing messages.

Note that the javax.sql package, otherwise known as the JDBC 2.0 Standard Extension API, provides the DataSource interface as an alternate and preferred means of connecting to a data source. However, the DriverManager facility can still be used with drivers that support DataSource implementations.

For simple applications, the only method in the DriverManager class that a general programmer needs to use directly is DriverManager.getConnection. As its name implies, this method establishes a connection to a database. An application may call the DriverManager methods getDriver, getDrivers, and registerDriver as well as the Driver method connect, but in most cases it is better to let the DriverManager class manage the details of establishing a connection.

3.1.1 Keeping Track of Available Drivers

The DriverManager class maintains a list of Driver classes that have registered themselves by calling the method DriverManager.registerDriver. All Driver classes should be written with a static section (a static initializer) that creates an instance of the class and then registers it with the DriverManager class when it is loaded. Thus, a user would not normally call DriverManager.registerDriver directly; it should be called automatically by a Driver class when it is loaded. A Driver class is loaded, and therefore automatically registered with the DriverManager, in one of two ways:

  1. by calling the method Class.forName. This explicitly loads the driver class. Since it does not depend on any external setup, this way of loading a driver is the recommended one for using the DriverManager framework. The following code loads the class acme.db.Driver:
    Class.forName("acme.db.Driver");

    If acme.db.Driver has been written so that loading it causes an instance to be created and also calls DriverManager.registerDriver with that instance as the parameter (as it should do), then it is in the DriverManager's list of drivers and available for creating a connection.

  2. by adding the Driver class to the java.lang.System property jdbc.drivers. This is a list of driver classnames, separated by colons, that the DriverManager class loads. When the DriverManager class is initialized, it looks for the system property "jdbc.drivers," and if the user has entered one or more drivers, the DriverManager class attempts to load them. The following code illustrates how a programmer might enter three driver classes in ~/.hotjava/properties (HotJava loads these into the system properties list on startup):
jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.test.ourDriver
The first call to a DriverManager method will automatically cause these driver classes to be loaded.

Note that this second way of loading drivers requires a preset environment that is persistent. If there is any doubt about that being the case, it is safer to call the method Class.forName to explicitly load each driver. This is also the right method to use to bring in a particular driver since once the DriverManager class has been initialized, it will never recheck the jdbc.drivers property list.

In both of these cases, it is the responsibility of the newly-loaded Driver class to register itself by calling DriverManager.registerDriver. As mentioned, this should be done automatically when the class is loaded.

For security reasons, the JDBC management layer will keep track of which class loader provided which driver. Then when the DriverManager class is opening a connection, it will use only drivers that come from the local file system or from the same class loader as the code issuing the request for a connection.

3.1.2 Establishing a Connection

Once the Driver classes have been loaded and registered with the DriverManager class, they are available for establishing a connection with a database. When a request for a connection is made with a call to the DriverManager.getConnection method, the DriverManager tests each driver in turn to see if it can establish a connection.

It may sometimes be the case that more than one JDBC driver is capable of connecting to a given URL. For example, when connecting to a given remote database, it might be possible to use a JDBC-ODBC bridge driver, a JDBC-to-generic-network-protocol driver, or a driver supplied by the database vendor. In such cases, the order in which the drivers are tested is significant because the DriverManager will use the first driver it finds that can successfully connect to the given URL.

First the DriverManager tries to use each driver in the order it was registered. (The drivers listed in jdbc.drivers are always registered first.) It will skip any drivers that are untrusted code unless they have been loaded from the same source as the code that is trying to open the connection.

It tests the drivers by calling the method Driver.connect on each one in turn, passing them the URL that the user originally passed to the method DriverManager.getConnection. The first driver that recognizes the URL makes the connection.

At first glance this may seem inefficient, but it requires only a few procedure calls and string comparisons per connection since it is unlikely that dozens of drivers will be loaded concurrently.

The following code is an example of all that is normally needed to set up a connection with a driver such as a JDBC-ODBC bridge driver.

Class.forName("jdbc.odbc.JdbcOdbcDriver"); //loads the driver
String url = "jdbc:odbc:fred";
Connection con = DriverManager.getConnection(
        url, "userID", "passwd");

The variable con represents a connection to the data source "fred" that can be used to create and execute SQL statements.

With the addition of the JDBC 2.0 Standard Extension API, a DataSource object can be used to establish a connection with a data source. The DriverManager can still be used, but a DataSource object offers several advantages over the DriverManager and is the preferred alternative. Developers who are writing Enterprise JavaBeans components, however, should always use a DataSource object instead of the DriverManager. Using a properly implemented DataSource object is the only way to get connections that are pooled and that can participate in distributed transactions.

3.1.3 DriverManager Methods Are Static

All DriverManager methods are declared static, which means that they operate on the class as a whole and not on particular instances. In fact, the constructor for DriverManager is declared private to prevent users from instantiating it. Logically, there is one instance of the DriverManager class. This means that methods are called by qualifying them with DriverManager, as in the following line of code.

DriverManager.setLogWriter(out);

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc.   All rights
reserved.


 [Top] [Prev] [Next]

Getting Started with the JDBC API

September 1999

1 Introduction

1.1 What the JDBC 2.0 API Includes
1.2 What Is the JDBC API?
1.2.1 What Does the JDBC API Do?
1.2.2 A Base for Other APIs
1.2.3 The JDBC API Versus ODBC and UDA
1.2.4 Two-tier and Three-tier Models
1.2.5 SQL Conformance
1.2.6 JDBC Products
1.2.7 Java Software Framework
1.2.8 JDBC Driver Types
1.2.9 Obtaining JDBC Drivers
1.2.10 Java-relational DBMSs
1.2.11 Other Products

2 Connection

2.1 Connection Overview
2.1.1 Opening a Connection
2.1.2 URLs in General Use
2.1.3 JDBC URLs
2.1.4 The odbc Subprotocol
2.1.5 Registering Subprotocols
2.1.6 Sending SQL Statements
2.1.7 Transactions
2.1.8 Transaction Isolation Levels
2.1.9 Freeing DBMS Resources
2.1.10 Using Type Maps

3 DriverManager

3.1 DriverManager Overview
3.1.1 Keeping Track of Available Drivers
3.1.2 Establishing a Connection
3.1.3 DriverManager Methods Are Static

4 Statement

4.1 Statement Overview
4.1.1 Creating Statement Objects
4.1.2 Executing Statements Using Statement Objects
4.1.3 Statement Completion
4.1.4 Closing Statements
4.1.5 SQL Escape Syntax in Statements
4.1.6 Sending Batch Updates
4.1.7 Giving Performance Hints
4.1.8 Executing Special Kinds of Statements

5 ResultSet

5.1 ResultSet Overview
5.1.1 Rows and Columns
5.1.2 Cursors
5.1.3 Cursor Movement Examples
5.1.4 Determining the Number of Rows in a Result Set
5.1.5 Retrieving Column Values
5.1.6 Which getXXX Method to Use
5.1.7 Types of Result Sets
5.1.8 Concurrency Types
5.1.9 Providing Performance Hints
5.1.10 Creating Different Types of Result Sets
5.1.11 Using a Prepared Statement to Create Result Sets
5.1.12 Requesting Features That Are Not Supported
5.1.13 Using updateXXX Methods
5.1.14 Deleting a Row
5.1.15 Inserting Rows
5.1.16 Positioned Updates
5.1.17 Queries That Produce Updatable Result Sets
5.1.18 Using Streams for Very Large Row Values
5.1.19 NULL Result Values
5.1.20 Closing a ResultSet Object
5.1.21 JDBC Compliance

6 PreparedStatement

6.1 PreparedStatement Overview
6.1.1 Creating PreparedStatement Objects
6.1.2 Passing IN Parameters
6.1.3 Data Type Conformance on IN Parameters
6.1.4 Using setObject
6.1.5 Sending JDBC NULL as an IN parameter
6.1.6 Sending Very Large IN Parameters
6.1.7 Using PreparedStatement Objects in Batch Updates

7 CallableStatement

7.1 CallableStatement Overview
7.1.1 Creating a CallableStatement Object
7.1.2 IN Parameters
7.1.3 Making Batch Updates
7.1.4 OUT Parameters
7.1.5 Numbering of Parameters
7.1.6 INOUT Parameters
7.1.7 Retrieve OUT Parameters after Results
7.1.8 Retrieving NULL Values as OUT Parameters

8 Mapping SQL and Java Types

8.1 Mapping Overview
8.2 Mapping SQL Types to Java Types
8.3 Basic JDBC Types
8.3.1 CHAR, VARCHAR, and LONGVARCHAR
8.3.2 BINARY, VARBINARY, and LONGVARBINARY
8.3.3 BIT
8.3.4 TINYINT
8.3.5 SMALLINT
8.3.6 INTEGER
8.3.7 BIGINT
8.3.8 REAL
8.3.9 DOUBLE
8.3.10 FLOAT
8.3.11 DECIMAL and NUMERIC
8.3.12 DATE, TIME, and TIMESTAMP
8.4 Advanced JDBC Data Types
8.4.1 BLOB
8.4.2 CLOB
8.4.3 ARRAY
8.4.4 DISTINCT
8.4.5 STRUCT
8.4.6 REF
8.4.7 JAVA_OBJECT
8.5 Examples of Mapping
8.5.1 Simple SQL Statement
8.5.2 SQL Statement with IN Parameters
8.5.3 SQL Statement with INOUT Parameters
8.6 Custom Mapping
8.7 Dynamic Data Access
8.8 Storing Java Objects in a Database
8.9 Tables for Type Mapping
8.9.1 JDBC Types Mapped to Java Types
8.9.2 Java Types Mapped to JDBC Types
8.9.3 JDBC Types Mapped to Java Object Types
8.9.4 Java Object Types Mapped to JDBC Types
8.9.5 Conversions by setObject
8.9.6 Conversions by ResultSet.getXXX Methods
8.9.7 JDBC Types Mapped to Database-specific SQL Types

9 JDBC-ODBC Bridge Driver

9.1 Obtaining a JDBC Driver
9.2 JDBC-ODBC Bridge
9.2.1 What is the JDBC-ODBC Bridge?
9.2.2 ODBC Compatibility and ODBC Versions Supported
9.2.3 The Bridge Implementation
9.2.4 Installation
9.3 Using the Bridge
9.3.1 Using the Bridge from an Applet
9.3.2 Most Browsers Do Not Support the Bridge
9.3.3 Tested Configurations
9.3.4 ODBC Drivers Known to Work with the Bridge
9.3.5 What is the JDBC URL Supported by the Bridge?
9.3.6 Debugging
9.4 New JDBC 2.0 API Features Supported by the Bridge

Appendix A: Summary of New Features

A.2 Summary of New Functionality
A.2.1 Scrollable Result Sets
A.2.2 Batch Updates
A.2.3 Programmatic Updates
A.2.4 Other New Features
A.3 Support for Advanced Data Types
A.3.1 What Are the SQL3 Data Types?
A.3.2 Summary of Support for the SQL3 Data Types
A.3.3 Mapping of the New SQL3 Types
A.3.4 SQL Locators
A.3.5 Support for Storing Java Objects

Appendix B: Sample Code

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

Introduction

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

The JDBCtm API is the application programming interface that provides universal data access for the Javatm programming language. It includes the JDBC 1.0 API, which provides the basic functionality for data access. The JDBC 2.0 API supplements the basic API with more advanced features and provides a standard way to access the latest object-relational features being supported by today's relational database management systems. In addition, the new API includes features such as scrollable and updatable result sets and improved performance. It also extends JDBC technology beyond the client to the server with connection pooling and distributed transactions.

1.1 What the JDBC 2.0 API Includes

The JDBC 2.0 API includes all of the API that is part of the Javatm 2 SDK, Standard Edition, and also the API in the JDBC Standard Extension API. The following list defines various terms used in talking about the JDBC API.

  • JDBC 2.0 API-the complete JDBC API, including both the java.sql package (the JDBC 2.0 core API) and the javax.sql package (the JDBC Standard Extension API). The Java 2 SDK, Enterprise Edition, includes the complete JDBC 2.0 API.
  • JDBC 2.0 core API-the package java.sql; the JDBC API that is part of the Java 2 SDK, Standard Edition, which includes the JDBC 1.0 API plus the new JDBC API added in the java.sql package. Some of the new features in this package are scrollable result sets, batch updates, programmatic updates, and support for the new SQL3 data types.
  • JDBC Standard Extension API-the package javax.sql, which may be downloaded from http://java.sun.com/products/jdbc. This package makes it easier to build server-side applications using the Java platform by providing an open architecture that supports connection pooling and distributed transactions that span multiple database servers. The DataSource API plays an integral part in these capabilities and also works with the Javatm Naming and Directory Interfacetm (JNDI) to improve portability and make code maintenance easier. The javax.sql package also provides the RowSet API, which makes it easy to handle data sets from virtually any data source as JavaBeanstm components.
  • java.sql package-the JDBC 2.0 core API, which includes the JDBC 1.0 API plus the new API added in the Java 2 SDK, Standard Edition
  • javax.sql package-the JDBC Standard Extension API

In keeping with the policy of maintaining backward compatibility, applications written using the JDBC 1.0 API will continue to run with both the Java 2 SDK, Standard Edition, and the Java 2 SDK, Enterprise Edition, just as they have always run. Having been well designed from the beginning, the JDBC 1.0 API is essentially unchanged. Applications using features added in the JDBC 2.0 API will, of course, need to be run using a driver that supports those features.

The package java.sql, being part of the core API, is automatically included when the Java 2 SDK, Standard Edition, is downloaded. A driver vendor may bundle the package javax.sql with its driver product, but if a driver does not include the package, it can be downloaded from the JDBC website at the following URL:

http://java.sun.com/products/jdbc

It is also possible to get the javax.sql package by downloading the Java 2 SDK, Enterprise Edition, which includes both the java.sql and javax.sql packages. Programmers who are not writing Enterprise JavaBeanstm (EJB) components or other server code will probably want to download the Java 2 SDK, Standard Edition, rather than the Java 2 SDK, Enterprise Edition, to limit the amount of disc space used.

1.2 What Is the JDBC API?

The JDBC API is a Java API for accessing virtually any kind of tabular data. (As a point of interest, JDBC is the trademarked name and is not an acronym; nevertheless, JDBC is often thought of as standing for "Java Database Connectivity.") The JDBC API consists of a set of classes and interfaces written in the Java programming language that provide a standard API for tool/database developers and makes it possible to write industrial strength database applications using an all-Java API.

The JDBC API makes it easy to send SQL statements to relational database systems and supports all dialects of SQL. But the JDBC 2.0 API goes beyond SQL, also making it possible to interact with other kinds of data sources, such as files containing tabular data.

The value of the JDBC API is that an application can access virtually any data source and run on any platform with a Java Virtual Machine. In other words, with the JDBC API, it isn't necessary to write one program to access a Sybase database, another program to access an Oracle database, another program to access an IBM DB2 database, and so on. One can write a single program using the JDBC API, and the program will be able to send SQL or other statements to the appropriate data source. And, with an application written in the Java programming language, one doesn't have to worry about writing different applications to run on different platforms. The combination of the Java platform and the JDBC API lets a programmer write once and run anywhere.

The Java programming language, being robust, secure, easy to use, easy to understand, and automatically downloadable on a network, is an excellent language basis for database applications. What is needed is a way for Java applications to talk to a variety of different data sources. JDBC is the mechanism for doing this.

The JDBC 2.0 API extends what can be done with the Java platform. For example, the JDBC API makes it possible to publish a web page containing an applet that uses information obtained from a remote data source. Or an enterprise can use the JDBC API to connect all its employees (even if they are using a conglomeration of Windows, Macintosh, and UNIX machines) to one or more internal databases via an intranet. With more and more programmers using the Java programming language, the need for easy and universal data access from Java is continuing to grow.

MIS managers like the combination of the Java platform and JDBC technology because it makes disseminating information easy and economical. Businesses can continue to use their installed databases and access information easily even if it is stored on different database management systems or other data sources. Development time for new applications is short. Installation and version control are greatly simplified. A programmer can write an application or an update once, put it on the server, and everybody has access to the latest version. And for businesses selling information services, the combination of the Java and JDBC technologies offers a better way of getting out information updates to external customers.

1.2.1 What Does the JDBC API Do?

In simplest terms, a JDBC technology-based driver ("JDBC driver") makes it possible to do three things:

  1. Establish a connection with a data source
  2. Send queries and update statements to the data source
  3. Process the results

    The following code fragment gives a simple example of these three steps:

Connection con = DriverManager.getConnection(

                    "jdbc:myDriver:wombat", "myLogin", "myPassword");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM Table1");
while (rs.next()) {
    int x = rs.getInt("a");
    String s = rs.getString("b");
    float f = rs.getFloat("c");

    }

1.2.2 A Base for Other APIs

The JDBC API is used to invoke (or "call") SQL commands directly. It works very well in this capacity and is easier to use than other database connectivity APIs, but it was also designed to be a base upon which to build alternate interfaces and tools. An alternate interface tries to be "user-friendly" by using a more understandable or more convenient API that is translated behind the scenes into the JDBC API. Because the JDBC API is complete and powerful enough to be used as a base, it has had various kinds of alternate APIs developed on top of it, including the following:

  1. An embedded SQL for Java. A consortium including Oracle, IBM, Sun, and others has defined the SQLJ specification to provide this. JDBC requires that SQL statements basically be passed as uninterpreted strings to Java methods. An embedded SQL preprocessor provides compile-time type checking and allows a programmer to intermix SQL statements with Java programming language statements. For example, a Java variable can be used in an SQL statement to receive or provide SQL values. The SQLJ preprocessor effectively translates this Java/SQL mix into the Java programming language with JDBC calls.
  2. A direct mapping of relational database tables to Java classes. Java Software has announced the Java Blendtm product to provide this, and others have similar products. In this "object/relational" mapping, a table becomes a class, each row of the table becomes an instance of that class, and each column value corresponds to an attribute of that instance. Programmers can then operate directly on Java objects; the required SQL calls to fetch and store data are automatically generated "beneath the covers." Java Blend also allows more sophisticated mappings, for example, where rows of multiple tables are combined in a Java class.

As interest in JDBC technology has grown, other JDBC-based tools have been developed to make building programs easier. For example, an application might present a menu of database tasks from which to choose. After a task is selected, the application presents prompts and blanks for filling in information needed to carry out the selected task. With the requested input typed in, the application then automatically invokes the necessary JDBC commands. With the help of such an application, users can perform database tasks even when they have little or no knowledge of SQL syntax.

1.2.3 The JDBC API Versus ODBC and UDA

Prior to the development of the JDBC API, Microsoft's ODBC (Open DataBase Connectivity) API was the most widely used programming interface for accessing relational databases. It offers the ability to connect to almost all databases on almost all platforms. So why not just use ODBC from Java?

The answer is that you can use ODBC from Java, but this is best done with the help of the JDBC API in the form of the JDBC-ODBC Bridge. The question now becomes, "Why do you need the JDBC API?"

There are several answers to this question.

  1. ODBC is not appropriate for direct use from the Java programming language because it uses a C interface. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness, and automatic portability of applications.
  2. A literal translation of the ODBC C API into a Java API would not be desirable. For example, Java has no pointers (address variables), and ODBC makes copious use of them, including the notoriously error-prone generic pointer void *. You can think of JDBC as ODBC translated into a high-level object-oriented interface that is natural for programmers using the Java programming language.
  3. ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries. The JDBC API, on the other hand, was designed to keep simple things simple while allowing more advanced capabilities where required. The JDBC API is also easier to use simply because it is a Java API, which means that a programmer does not need to worry about either memory management or data byte alignment.
  4. A Java API like JDBC is needed in order to enable a "pure Java" solution, that is, a solution that uses only Java API. When ODBC is used, the ODBC driver manager and drivers must be manually installed on every client machine. When the JDBC driver is written completely in Java, however, JDBC code is automatically installable, portable, and secure on all Java platforms from network computers to mainframes.

In summary, the JDBC API is a natural Java interface for working with SQL. It builds on ODBC rather than starting from scratch, so programmers familiar with ODBC will find it very easy to learn. The JDBC API retains some of the basic design features of ODBC; in fact, both interfaces are based on the Open Group (formerly X/Open) SQL CLI (Call Level Interface). The big difference is that the JDBC API builds on and reinforces the style and virtues of Java, and it goes beyond just sending SQL statements to a relational database management system.

Microsoft has introduced new APIs beyond ODBC such as OLE (Object Linking and Embedding) DB, ADO (ActiveX Data Objects), and RDS (Remote Data Service). In many ways these APIs move in the same direction as the JDBC API. For example, OLE DB and ADO are also object-oriented interfaces to databases that can be used to execute SQL statements. However, OLE DB is a low-level interface designed for tools rather than developers. ADO is newer and more like the JDBC API, but it is not pure Java. RDS provides functionality similar to the JDBC API's RowSet facility, but RDS is also not written in the Java programming language, and it is not portable.

Most recently, Microsoft has introduced UDA (Universal Data Access) as an umbrella term that covers OLE DB, ADO, RDS, and ODBC. The JDBC 2.0 API contains all of the important functionality of UDA plus features not found in UDA, such as SQL3 support.

1.2.4 Two-tier and Three-tier Models

The JDBC API supports both two-tier and three-tier models for database access.

Figure 1.1: illustrates a two-tier architecture for data access.

In the two-tier model, a Java applet or application talks directly to the data source. This requires a JDBC driver that can communicate with the particular data source being accessed. A user's commands are delivered to the database or other data source, and the results of those statements are sent back to the user. The data source may be located on another machine to which the user is connected via a network. This is referred to as a client/server configuration, with the user's machine as the client, and the machine housing the data source as the server. The network can be an intranet, which, for example, connects employees within a corporation, or it can be the Internet.

In the three-tier model, commands are sent to a "middle tier" of services, which then sends the commands to the data source. The data source processes the commands and sends the results back to the middle tier, which then sends them to the user. MIS directors find the three-tier model very attractive because the middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. Another advantage is that it simplifies the deployment of applications. Finally, in many cases, the three-tier architecture can provide performance advantages.

Figure 1.2: illustrates a three-tier architecture for database access.

Until recently, the middle tier has typically been written in languages such as C or C++, which offer fast performance. However, with the introduction of optimizing compilers that translate Java bytecode into efficient machine-specific code and technologies such as Enterprise JavaBeanstm, the Java platform is fast becoming the standard platform for middle-tier development. This is a big plus, making it possible to take advantage of Java's robustness, multithreading, and security features.

With enterprises increasingly using the Java programming language for writing server code, the JDBC API is being used more and more in the middle tier of a three-tier architecture. Some of the features that make JDBC a server technology are its support for connection pooling, distributed transactions, and disconnected rowsets. And, of course, the JDBC API is what allows access to a data source from a Java middle tier.

1.2.5 SQL Conformance

SQL is the standard language for accessing relational databases. Unfortunately, SQL is not yet as standard as one would like.

One area of difficulty is that data types used by different DBMSs (DataBase Management Systems) sometimes vary, and the variations can be significant. JDBC deals with this by defining a set of generic SQL type identifiers in the class java.sql.Types. Note that, as used in this material, the terms "JDBC SQL type," "JDBC type," and "SQL type" are interchangeable and refer to the generic SQL type identifiers defined in java.sql.Types. There is a more complete discussion of data type conformance in the chapter "Mapping SQL and Java Types."

Another area of difficulty with SQL conformance is that although most DBMSs use a standard form of SQL for basic functionality, they do not conform to the more recently defined standard SQL syntax or semantics for more advanced functionality. For example, not all databases support stored procedures or outer joins, and those that do are not always consistent with each other. Also, support for SQL3 features and data types varies greatly. It is hoped that the portion of SQL that is truly standard will expand to include more and more functionality. In the meantime, however, the JDBC API must support SQL as it is.

One way the JDBC API deals with this problem is to allow any query string to be passed through to an underlying DBMS driver. This means that an application is free to use as much SQL functionality as desired, but it runs the risk of receiving an error on some DBMSs. In fact, an application query may be something other than SQL, or it may be a specialized derivative of SQL designed for specific DBMSs (for document or image queries, for example).

A second way JDBC deals with problems of SQL conformance is to provide ODBC-style escape clauses. The escape syntax provides a standard JDBC syntax for several of the more common areas of SQL divergence. For example, there are escapes for date literals and for stored procedure calls.

For complex applications, JDBC deals with SQL conformance in a third way. It provides descriptive information about the DBMS by means of the interface DatabaseMetaData so that applications can adapt to the requirements and capabilities of each DBMS. Typical end users, however, need not worry about metadata.

Because the JDBC API is used as a base API for developing database access tools and other APIs, it also has to address the problem of conformance for anything built on it. A JDBC driver must support at least ANSI SQL-92 Entry Level. (ANSI SQL-92 refers to the standards adopted by the American National Standards Institute in 1992. Entry Level refers to a specific list of SQL capabilities.) Note, however, that although the JDBC 2.0 API includes support for SQL3 and SQLJ, JDBC drivers are not required to support them.

Given the wide acceptance of the JDBC API by database vendors, connectivity vendors, Internet service vendors, and application writers, it has become the standard for data access from the Java programming language.

1.2.6 JDBC Products

The JDBC API is a natural choice for developers using the Java platform because it offers easy database access for Java applications and applets.

At the time of this writing, a number of JDBC-based products have already been deployed or are in development. The status of these products changes frequently, so the reader should consult the JDBC web page for the latest information. It can be found at the following URL:

http://java.sun.com/products/jdbc

1.2.7 Java Software Framework

Java Software provides three JDBC product components:

  • the JDBC driver manager (included as part of the Java 2 Platform)
  • the JDBC driver test suite (available from the JDBC web site)
  • the JDBC-ODBC bridge (included in the Solaris and Windows versions of the Java 2 Platform)

The JDBC DriverManager class has traditionally been the backbone of the JDBC architecture. It is quite small and simple; its primary function is to connect Java applications to the correct JDBC driver and then get out of the way. With the availability of the Standard Extension packages javax.naming and javax.sql, it is now also possible to use a DataSource object registered with a Java Naming and Directory Interfacetm (JNDI) naming service to establish a connection with a data source. Both means of getting a connection can be still used, but using a DataSource object is recommended whenever possible.

The JDBC driver test suite provides some confidence that JDBC drivers will run your program. These tests are not comprehensive or exhaustive, but they do exercise many of the important features in the JDBC API.

The JDBC-ODBC bridge allows ODBC drivers to be used as JDBC drivers. It was implemented as a way to get JDBC off the ground quickly, and long term will provide a way to access some of the data sources for which there are no JDBC drivers.

1.2.8 JDBC Driver Types

Figure 1.3: shows various driver implementation possibilities.

JDBC technology-based drivers generally fit into one of four categories:

  1. JDBC-ODBC bridge plus ODBC driver: The Java Software bridge product provides JDBC access via ODBC drivers. Note that ODBC binary code, and in many cases database client code, must be loaded on each client machine that uses this driver. As a result, this kind of driver is most appropriate on a corporate network where client installations are not a major problem, or for application server code written in Java in a three-tier architecture.
  2. Native-API partly-Java driver: This kind of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, IBM DB2, or other DBMSs. Note that, like the bridge driver, this style of driver requires that some operating system-specific binary code be loaded on each client machine.
  3. JDBC-Net pure Java driver: This driver translates JDBC calls into a DBMS-independent net protocol, which is then translated to a DBMS protocol by a server. This net server middleware is able to connect its pure Java clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC alternative. It is likely that all vendors of this solution will provide products suitable for intranet use. In order for these products to support Internet access as well, they must handle the additional requirements for security, access through firewalls, and so forth, that the Web imposes.
  4. Native-protocol pure Java driver: This kind of driver converts JDBC calls directly into the network protocol used by DBMSs. This allows a direct call from the client machine to the DBMS server and is an excellent solution for intranet access. Since many of these protocols are proprietary, the database vendors themselves are the primary source. Several that are now available include Oracle, Sybase, Informix, IBM DB2, Inprise InterBase, and Microsoft SQL Server.

Driver categories 3 and 4 are the preferred way to access databases using the JDBC API. Driver categories 1 and 2 are interim solutions where direct pure Java drivers are not yet available. There are possible variations on categories 1 and 2 (not shown in the following table) that require middleware, but these are generally less desirable solutions. Categories 3 and 4 offer all the advantages of Java technology, including automatic installation (for example, downloading the JDBC driver with an applet that uses it).

Table 1.1 shows the four categories and their properties. The table uses the following definitions for types of network connections:

  • Direct -a connection that a JDBC client makes directly to the DBMS server, which may be remote
  • Indirect--a connection that a JDBC client makes to a middleware process that acts as a bridge to the DBMS server

    DRIVER CATEGORY

    ALL JAVA

    NETWORK CONNECTION

    1 - JDBC-ODBC Bridge

    No

    Direct

    2 - Native API as basis

    No

    Direct

    3 - JDBC-Net

    client Yes

    server Maybe

    Indirect

    4 - Native protocol as basis

    Yes

    Direct

1.2.9 Obtaining JDBC Drivers

At the time of this writing, there are dozens of drivers in Category 1, ODBC drivers that can be used with Java Software's bridge. There are about a dozen Category 2 drivers built on top of native APIs for DBMSs. Many Category 3 drivers are available, and there are Category 4 drivers for all of the major DBMSs.

To get the latest information on drivers, check the JDBC web site at

 http://java.sun.com/products/jdbc

Java Software and Intersolv, a leading database connectivity vendor, worked together to produce the JDBC-ODBC Bridge and the JDBC Driver Test Suite.

1.2.10 Java-relational DBMSs

A new generation of DBMSs that are Java-aware is emerging. These new DBMSs, called Java-relational DBMSs, include new data types that allow an object in the Java programming language to be used as a column value in a database table. The new JDBC 2.0 features support this new generation of DBMSs, and several database vendors are creating products with Java-relational capabilities. It should be noted, however, that the 2.0 mechanisms are optional. If a DBMS does not support this feature, a JDBC 2.0 driver is not required to implement it.

1.2.11 Other Products

Various JDBC application development tools are under way. Watch the Java Software pages for updates.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

PreparedStatement

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

6.1 PreparedStatement Overview

The PreparedStatement interface inherits from Statement and differs from it in two ways:

  1. Instances of PreparedStatement contain an SQL statement that has already been compiled. This is what makes a statement "prepared."
  2. The SQL statement contained in a PreparedStatement object may have one or more IN parameters. An IN parameter is a parameter whose value is not specified when the SQL statement is created. Instead, the statement has a question mark ("?") as a placeholder for each IN parameter. The "?" is also known as a parameter marker. An application must set a value for each question mark in a prepared statement before executing the prepared statement.

Because PreparedStatement objects are precompiled, their execution can be faster than that of Statement objects. Consequently, an SQL statement that is executed many times is often created as a PreparedStatement object to increase efficiency.

Being a subclass of Statement, PreparedStatement inherits all the functionality of Statement. In addition, it adds a set of methods that are needed for setting the values to be sent to the database in place of the placeholders for IN parameters. Also, the three methods execute, executeQuery, and executeUpdate are modified so that they take no argument. The Statement forms of these methods (the forms that take an SQL statement parameter) should never be used with a PreparedStatement object.

6.1.1 Creating PreparedStatement Objects

The following code fragment, where con is a Connection object, creates a PreparedStatement object containing an SQL update statement with two placeholders for IN parameters:

PreparedStatement pstmt = con.prepareStatement(
    "UPDATE table4 SET m = ? WHERE x = ?");

The object pstmt now contains the statement "UPDATE table4 SET m = ? WHERE x = ?", which has already been sent to the DBMS and been prepared for execution.

As with Statement objects, it is possible to create a PreparedStatement object that contains a query rather than an update statement; in fact, this is often done to improve efficiency for SQL statements that are executed many times. Using the new version of the method prepareStatement included in the JDBC 2.0 core API, the PreparedStatement object can produce ResultSet objects that are scrollable and updatable. For example, the following code fragment creates a PreparedStatement object such that each time it is executed, it will produce a ResultSet object that is scrollable and updatable.

PreparedStatement pstmt2 = con.prepareStatement(
            "SELECT a, b, c FROM Table1", ResultSet.TYPE_SCROLL_SENSITIVE,
            ResultSet.CONCUR_UPDATABLE);
ResultSet rs = pstmt2.executeQuery();

The object that rs represents is a result set with all the values stored in columns a, b, and c of Table1, and rs is scrollable and can be updated. Each time pstmt2 is executed, it will produce a result set that is scrollable and updatable.

6.1.2 Passing IN Parameters

Before a PreparedStatement object is executed, the value of each ? parameter must be set. This is done by calling a setXXX method, where XXX is the appropriate type for the parameter. For example, if the parameter is of type long in the Java programming language, the method to use is setLong. The first argument to the setXXX methods is the ordinal position of the parameter to be set, with numbering starting at 1. The second argument is the value to which the parameter is to be set. For example, the following code sets the first parameter to 123456789 and the second parameter to 100000000:

pstmt.setLong(1, 123456789);
pstmt.setLong(2, 100000000);

Once a parameter value has been set for a given statement, it can be used for multiple executions of that statement until it is cleared by a call to the method clearParameters or until a new value is set.

When a connection has its auto-commit mode enabled, each statement is committed automatically when it is completed. Some database systems do not retain prepared statements across commits, so for them, the driver will have to recompile the prepared statement after each commit. This means that for these DBMSs, it may actually be less efficient to use a PreparedStatement object in place of a Statement object that is executed many times.

Using pstmt, the PreparedStatement object created above, the following code illustrates setting values for the two parameter placeholders and executing pstmt 10 times. In this example, the first parameter is set to "Hi" and remains constant. The second parameter is set to a different value each time around the for loop, starting with 0 and ending with 9.

pstmt.setString(1, "Hi");
for (int i = 0; i < 10; i++) {
    pstmt.setInt(2, i);
    int rowCount = pstmt.executeUpdate();
}

New features in the JDBC 2.0 API make it possible to set a parameter placeholder with an SQL3 data type, as shown in the following example, where statistics is a Blob object representing an SQL BLOB value, and departments is an Array object representing an SQL ARRAY value.

PreparedStatement pstmt = con.prepareStatement(
      "UPDATE Table3 SET Stats = ? WHERE Depts = ?");
pstmt.setBlob(1, statistics);
pstmt.setArray(2, departments);

6.1.3 Data Type Conformance on IN Parameters

The XXX in a setXXX method is a type in the Java programming language. It also implicitly specifies a JDBC type because the driver will map the Java type to its corresponding JDBC type (following the mapping specified in "Java Types Mapped to JDBC Types" on page 106) and send that JDBC type to the database. For example, the following code fragment sets the second parameter of the PreparedStatement object pstmt to 44, with a Java type of short:

pstmt.setShort(2, 44);

The driver will send 44 to the database as a JDBC SMALLINT, which is the standard mapping from a Java short.

It is the programmer's responsibility to make sure that the type in the Java programming language for each IN parameter maps to a JDBC type that is compatible with the JDBC data type expected by the database. Consider the case where the database expects a JDBC SMALLINT. If the method setByte is used, the driver will send a JDBC TINYINT to the database. This will probably work because many database systems convert from one related type to another, and generally a TINYINT can be used anywhere a SMALLINT is used. However, for an application to work with the most database systems possible, it is best to use types in the Java programming language that correspond to the exact JDBC types expected by the database. If the expected JDBC type is SMALLINT, using setShort instead of setByte will make an application more portable. The table "Java Types Mapped to JDBC Types" in the chapter "Mapping SQL and Java Types" can be used to determine which setXXX method to use.

6.1.4 Using setObject

A programmer can explicitly convert an input parameter to a particular JDBC type by using the method setObject. This method can take a third argument, which specifies the target JDBC type. The driver will convert the Object in the Java programming language to the specified JDBC type before sending it to the database.

If no JDBC type is given, the driver will simply map the Java Object to its default JDBC type and then send it to the database. This is similar to what happens with the regular setXXX methods; in both cases, the driver maps the Java type of the value to the appropriate JDBC type before sending it to the database. The difference is that the setXXX methods use the standard mapping, whereas the setObject method uses the mapping to object types.

The capability of the method setObject to accept any Java object allows an application to be generic and accept input for a parameter at run time. In this situation the type of the input is not known when the application is compiled. By using setObject, the application can accept any Java object type as input and convert it to the JDBC type expected by the database.

The JDBC 2.0 core API includes a new implementation of the method setObject that applies to a user-defined type (UDT) that has been custom mapped to a class in the Java programming language. The custom mapping of an SQL UDT is specified in a class that implements the SQLData interface. When a UDT instance is retrieved from the database via the method getObject, it will be mapped to an instance of the Java class that implemented SQLData for it. When that custom mapped instance is passed to the method setObject, setObject will call the SQLOutput.writeObject method that is defined in the appropriate SQLData implementation, thereby converting the instance of a Java class back to an SQL UDT.

The details of custom mapping are hidden from the user. When an application invokes the method setObject, the value being stored will automatically be custom mapped if there is a custom mapping for it. As a result, code in which the method setObject performs a custom mapping looks identical to code in which setObject uses the standard mapping. UDTs can only be stored using the setObject method, which is a way of ensuring that UDTs with a custom mapping are mapped appropriately.

In all of the cases discussed so far, the value passed to the method setObject was originally an SQL data type that was retrieved from a table column. Before returning it to the database, the driver needed to convert it back to its SQL data type. If a database is one of the new generation of Java-aware DBMSs, called a Java relational DBMS, it can store an instance of a class defined in the Java programming language as well as values defined in SQL. A class instance may be stored as a serialized Java object or in some other format defined by the DBMS.

The following example shows the use of the method setObject to store emp, an instance of the class Employee. After the salary field of emp is increased by 50 per cent, emp is sent back to the database. The column EMPLOYEE in the table PERSONNEL stores instances of Employee.

emp.salary = emp.salary * 1.5;
PreparedStatement pstmt = con.prepareStatement(
    "UPDATE PERSONNEL SET EMPLOYEE = ? WHERE EMPLOYEE_NO = 300485");
pstmt.setObject(1, emp);
pstmt.executeUpdate();

Note that the syntax in this example is the same as that in the JDBC 1.0 API and is also the same as that used to store instances of UDTs that have been custom mapped.

6.1.5 Sending JDBC NULL as an IN parameter

The setNull method allows a programmer to send a JDBC NULL (a generic SQL NULL) value to the database as an IN parameter. Note, however, that one must still specify the JDBC type of the parameter.

A JDBC NULL will also be sent to the database when a Java null value is passed to a setXXX method (if it takes Java objects as arguments). The method setObject, however, can take a null value only if the JDBC type is specified.

6.1.6 Sending Very Large IN Parameters

The methods setBytes and setString are capable of sending unlimited amounts of data. Sometimes, however, programmers prefer to pass in large blobs of data in smaller chunks. This can be accomplished by setting an IN parameter to a Java input stream. When the statement is executed, the JDBC driver will make repeated calls to this input stream, reading its contents and transmitting those contents as the actual parameter data.

The JDBC 1.0 API provides two methods for setting IN parameters to input streams: setBinaryStream for streams containing uninterpreted bytes and setAsciiStream for streams containing ASCII characters. A third method, set-UnicodeStream for streams containing Unicode characters, has been deprecated; the new JDBC 2.0 core API method setCharacterStream should be used in its place. These stream methods take one more argument than the other setXXX methods because the total length of the stream must be specified. This is necessary because some database systems need to know the total transfer size before any data is sent.

The following code illustrates using a stream to send the contents of a file as an IN parameter.

java.io.File file = new java.io.File("/tmp/data");
int fileLength = file.length();
java.io.InputStream fin = new java.io.FileInputStream(file);
java.sql.PreparedStatement pstmt = con.prepareStatement(
    "UPDATE Table5 SET stuff = ? WHERE index = 4");
pstmt.setBinaryStream (1, fin, fileLength);
pstmt.executeUpdate();

When the statement executes, the input stream fin will get called repeatedly to deliver up its data.

Another way to send large IN parameters to the database is to use SQL3 types like BLOB and CLOB. This is different from using streams in that BLOB and CLOB values are originally retrieved from the database, where they were created as SQL types. Using streams makes it possible to send the contents of a file written in the Java programming language to the database.

6.1.7 Using PreparedStatement Objects in Batch Updates

The JDBC 2.0 core API provides the ability to send multiple updates to the database for execution as a batch. The Statement method addBatch is given an SQL update statement as a parameter, and the SQL statement is added to the Statement object's list of commands to be executed in the next batch. The interface PreparedStatement has its own version of the method addBatch, which adds a set of parameters to the batch, as shown in the following code fragment.

PreparedStatement pstmt = con.prepareStatement(
         "UPDATE Table4 SET History = ? WHERE ID = ?");
pstmt.setClob(1, clob1);
pstmt.setLong(2, 350985839);
pstmt.addBatch();

pstmt.setClob(1, clob2);
pstmt.setLong(2, 350985840);
pstmt.addBatch();

int [] updateCounts = pstmt.executeBatch();

When the PreparedStatement object in pstmt is executed, it will be executed twice, once with the parameters clob1 and 350985839, and a second time with the parameters clob2 and 350985840. If either update command returns anything other than a single update count, the method executeBatch will throw an exception.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

ResultSet

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

5.1 ResultSet Overview

A ResultSet is a Java object that contains the results of executing an SQL query. In other words, it contains the rows that satisfy the conditions of the query. The data stored in a ResultSet object is retrieved through a set of get methods that allows access to the various columns of the current row. The ResultSet.next method is used to move to the next row of the ResultSet, making it the current row.

The general form of a result set is a table with column headings and the corresponding values returned by a query. For example, if your query is SELECT a, b, c FROM Table1, your result set will have the following form:

a           b               c
----------  ------------    -----------
12345       Cupertino       2459723.495
83472       Redmond         1.0
83492       Boston          35069473.43

The following code fragment is an example of executing an SQL statement that will return a collection of rows, with column a as an int, column b as a String, and column c as a float:

java.sql.Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM Table1");
while (rs.next()) {
    // retrieve and print the values for the current row
    int i = rs.getInt("a");
    String s = rs.getString("b");
    float f = rs.getFloat("c");
    System.out.println("ROW = " + i + " " + s + " " + f);
}

5.1.1 Rows and Columns

A relational database is made up of tables, with each table consisting of rows and columns. A row in a relational database table can be thought of as representing an instance of the entity that the table represents. For example, if there is a table of employees, each row will contain information about a particular employee. Each piece of data about the employee is stored in a column, so, for instance, the table of employees could have columns for an identification number, a name, a salary, and a date of hire. The columns in a row would contain the ID number, name, salary, and date of hire for a particular employee.

A result set is also a table with rows and columns, but it contains only the column values from a database table that satisfy the conditions of a query. In other words, a result set row will contain a subset of the columns in the underlying database table (unless the query selects everything in the table, in which case the result set table will include all of the column values for every row in the database table). In the past, a column value in a relational database table (and consequently in a result set table) had to be atomic; that is, it could be only one indivisible value. For instance, an array could not be a column value because an array may be made up of multiple elements. With the advent of SQL3 data types, however, the permissible content of table columns has expanded dramatically. It is now possible for an array or even a user-defined structured type to be a column value. Because this new capability allows a relational database to store instances of complex types as column values, it makes a relational database more like an object database, blurring the distinction between relational and object databases. Programmers can take advantage of these new data types if they use a JDBC 2.0 driver that supports SQL3 types.

5.1.2 Cursors

A ResultSet object maintains a cursor, which points to its current row of data. The cursor moves down one row each time the method next is called. When a ResultSet object is first created, the cursor is positioned before the first row, so the first call to the next method puts the cursor on the first row, making it the current row. ResultSet rows can be retrieved in sequence from top to bottom as the cursor moves down one row with each successive call to the method next. This ability to move its cursor only forward is the default behavior for a ResultSet and is the only cursor movement possible with drivers that implement only the JDBC 1.0 API. This kind of result set has the type ResultSet.TYPE_FORWARD_ONLY and is referred to as a forward only result set.

If a driver implements the cursor movement methods in the JDBC 2.0 core API, its result sets can be scrollable. A scrollable result set's cursor can move both forward and backward as well as to a particular row. The following methods move the cursor backward, to the first row, to the last row, to a particular row number, to a specified number of rows from the current row, and so on: previous, first, last, absolute, relative, afterLast, and beforeFirst. An explanation and example of how to make a result set scrollable will be presented in the section "Creating Different Types of Result Sets" on page 55.

When a cursor is positioned on a row in a ResultSet object (not before the first row or after the last row), that row becomes the current row. This means that any methods called while the cursor is positioned on that row will (1) operate on values in that row (methods such as getXXX and updateXXX), (2) operate on the row as a whole (such as the methods updateRow, insertRow, deleteRow, refresh-Row), or (3) use that row as a starting point for moving to other rows (such as the method relative).

A cursor remains valid until the ResultSet object or its parent Statement object is closed.

5.1.3 Cursor Movement Examples

As stated in the previous section, the standard cursor movement for forward only result sets is to use the method next to iterate through each row of a result set once from top to bottom. With scrollable result sets, it is possible to revisit a row or to iterate through the result set multiple times. This is possible because the cursor can be moved before the first row at any time (with the method beforeFirst method (ResultSet interface)>beforeFirst). The cursor can begin another iteration through the result set with the method next. The following example positions the cursor before the first row and then iterates forward through the contents of the result set. The methods getString and getFloat retrieve the column values for each row until there are no more rows, at which time the method next returns the value false.

rs.beforeFirst();
while (rs.next()) {
    System.out.println(rs.getString("EMP_NO") +
        " " + rs.getFloat("SALARY");
}

It is also possible to iterate through a result set backwards, as is shown in the next example. The cursor is first moved to the very end of the result set (with the method afterLast), and then the method previous is invoked within a while loop to iterate through the contents of the result set by moving to the previous row with each iteration. The method previous returns false when there are no more rows, so the loop ends after all the rows have been visited.

rs.afterLast();
while (rs.previous()) {
    System.out.println(rs.getString("EMP_NO") +
        " " + rs.getFloat("SALARY");
}

The interface ResultSet offers still other ways to iterate through the rows of a scrollable result set. Care should be taken, however, to avoid incorrect alternatives such as the one illustrated in the following example:

// incorrect!
while (!rs.isAfterLast()) {
  rs.relative(1);
  System.out.println(
    rs.getString("EMP_NO") + " " + rs.getFloat("SALARY"));
}

This example attempts to iterate forward through a scrollable result set and is incorrect for several reasons. One error is that if ResultSet.isAfterLast is called when the result set is empty, it will return a value of false since there is no last row. The loop body will be executed, which is not what is wanted. An additional problem occurs when the cursor is positioned before the first row of a result set that contains data. In this case, calling rs.relative(1) is erroneous because there is no current row. The method relative moves the cursor the specified number of rows from the current row, and it must be invoked only while the cursor is on the current row.

The following code fragment fixes the problems in the previous example. Here a call to the method ResultSet.first is used to distinguish the case of an empty result set from one that contains data. Because ResultSet.isAfterLast is called only when the result set is non-empty, the loop control works correctly. Since ResultSet.first method (ResultSet interface)>first initially positions the cursor on the first row, the method ResultSet.relative(1) steps through the rows of the result set as expected.

if (rs.first()) {
  while (!rs.isAfterLast()) {
    System.out.println(
         rs.getString("EMP_NO") + " " + rs.getFloat("SALARY"));
    rs.relative(1);
    }
}

5.1.4 Determining the Number of Rows in a Result Set

With the new cursor movement methods, it is easy to see how many rows a scrollable ResultSet object contains. All that is necessary is to go to the last row of the result set and get the number of that row. In the following example, rs will have one row for each employee.

ResultSet rs = stmt.executeQuery(
        "SELECT LAST_NAME, FIRST_NAME FROM EMPLOYEES");
rs.last();
int numberOfRows = rs.getRow();
System.out.println("XYZ, Inc. has " + numberOfRows + " employees");
rs.beforeFirst();
while (next()) {
    . . . // retrieve first and last names of each employee
}

Though not as convenient, it is also possible to find out how many rows a nonscrollable result set has. The following example shows one way to determine the number of rows.

ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM EMPLOYEES");
rs.next();
int count = rs.getInt(1);
System.out.println("XYZ, Inc. has " + count + " employees");

ResultSet rs2 = stmt.executeQuery(
        "SELECT LAST_NAME, FIRST_NAME FROM EMPLOYEES");
while (rs2.next()) {
    . . . // retrieve first and last names of each employee
}

With the scrollable result set, the cursor was just repositioned to start iterating through the same result set to retrieve its data. In the preceding example, however, one query is needed to get the count, and another query is needed to get a result set with the data that is desired. Both queries must, of course, produce result sets of the same size for the count to be accurate.

A second way to determine the number of rows in a forward-only result set is to iterate through the result set, incrementing a variable with each iteration, which is shown in the following example. Because an application can iterate through a forward-only result set just once, the same query needs to be executed twice. In the iteration through the first rs, the number of rows is counted; in the iteration through the second rs, the data is retrieved.

ResultSet rs = stmt.executeQuery(
        "SELECT LAST_NAME, FIRST_NAME FROM EMPLOYEES");
int count = 0;
while (rs.next()) {
    count++;
}
System.out.println("Company XYZ has " + count " employees.");
rs = stmt.executeQuery(
        "SELECT LAST_NAME, FIRST_NAME FROM EMPLOYEES");
while (rs.next()) {
    . . . // retrieve first and last names of each employee
}

5.1.5 Retrieving Column Values

The ResultSet.getXXX methods provide the means for retrieving column values from the current row. For maximum portability with forward only result sets, values should be retrieved from left to right, and column values should be read only once. With scrollable result sets, however, there are no such restrictions.

Either the column name or the column number can be used to designate the column from which to retrieve data. For example, if the second column of a ResultSet object rs is named TITLE, and it stores values as strings, either of the following will retrieve the value stored in that column:

String s = rs.getString(2);
String s = rs.getString("TITLE");

Note that columns are numbered from left to right starting with column 1. Also, column names used as input to getXXX methods are case insensitive.

The option of using the column name was provided so that a user who specifies column names in a query can use those same names as the arguments to getXXX methods. If, on the other hand, the SELECT statement does not specify column names (as in "SELECT * FROM TABLE1" or in cases where a column is derived), column numbers should be used. In such situations, there is no way for the user to know for sure what the column names are.

In some cases, it is possible for an SQL query to return a result set that has more than one column with the same name. If a column name is used as the parameter to a getXXX method, getXXX will return the value of the first matching column name. Thus, if there are multiple columns with the same name, one needs to use a column index to be sure that the correct column value is retrieved. It may also be slightly more efficient to use column numbers.

If the name of a column is known but not its index, the method findColumn can be used to find the column number.

Information about the columns in a ResultSet is available by calling the method ResultSet.getMetaData. The ResultSetMetaData object returned gives the number, types, and properties of its ResultSet object's columns.

5.1.6 Which getXXX Method to Use

JDBC drivers support type coercion. When a getXXX method is invoked, the driver attempts to convert the underlying data to the type XXX in the Java programming language and then returns a suitable value. For example, if the getXXX method is getString, and the data type of the data in the underlying database is VARCHAR, the JDBC Compliant driver will convert the VARCHAR value to a String object in the Java programming language. That String object will be the value returned by getString.

The JDBC 2.0 API adds new ResultSet.getXXX methods for retrieving the new SQL3 data types. These methods work the same way the getXXX methods in the JDBC 1.0 API work; that is, they map the SQL3 JDBC type to a type in the Java programming language and return that type. For example, the method getClob retrieves a JDBC CLOB value from the database and returns a Clob object, which is an instance of the java.sql.Clob interface.

The method getObject will retrieve any data type. This is possible because Object, being the type from which every other object type in the Java programming language is derived, is the most generic type. This is especially useful when the underlying data type is a database-specific type or when a generic application needs to be able to accept any data type. The method getObject, as would be expected from its name, returns a Java Object that must be narrowed if it is to be used as a more specific type. In other words, it must be cast from its generic Object type to its more derived type before it can be used as that derived type. The following code fragment illustrates using the method getObject to retrieve a Struct value from the column ADDRESS in the current row of the ResultSet object rs. The Object that getObject returns is narrowed to a Struct before assigning it to the variable address.

Struct address = (Struct)rs.getObject("ADDRESS");

The method getObject is not only the one method capable of retrieving values of any data type but also the only ResultSet.getXXX method that does custom mapping. Therefore, to be custom mapped, a data type has to be retrieved with the method getObject. The two SQL data types that can be custom mapped are the user-defined types, SQL structured types and DISTINCT types. A JDBC DISTINCT value is normally retrieved with the getXXX method appropriate for its underlying type, but if it has a custom mapping, it must be retrieved by the method getObject in order to be custom mapped. A JDBC STRUCT can only be retrieved with the method getObject, guaranteeing that if there is a custom mapping for a JDBC STRUCT value, it will be used.

An "x" indicates that the getXXX method may legally be used to retrieve the given JDBC type.

An "X" indicates that the getXXX method is recommended for retrieving the given JDBC type.

5.1.7 Types of Result Sets

Results sets may have different levels of functionality. For example, they may be scrollable or nonscrollable. A scrollable result set has a cursor that moves both forward and backward and can be moved to a particular row. Also, result sets may be sensitive or insensitive to changes made while they are open; that is, they may or may not reflect changes to column values that are modified in the database. A developer should always keep in mind the fact that adding capabilities to a ResultSet object incurs additional overhead, so it should be done only as necessary.

Based on the capabilities of scrollability and sensitivity to changes, there are three types of result sets available with the JDBC 2.0 core API. The following constants, defined in the ResultSet interface, are used to specify these three types of result sets:

  1. TYPE_FORWARD_ONLY
    • The result set is nonscrollable; its cursor moves forward only, from top to bottom.
    • The view of the data in the result set depends on whether the DBMS materializes results incrementally.
  2. TYPE_SCROLL_INSENSITIVE
    • The result set is scrollable: Its cursor can move forward or backward and can be moved to a particular row or to a row whose position is relative to its current position.
    • The result set generally does not show changes to the underlying database that are made while it is open. The membership, order, and column values of rows are typically fixed when the result set is created.
  3. TYPE_SCROLL_SENSITIVE
    • The result set is scrollable; its cursor can move forward or backward and can be moved to a particular row or to a row whose position is relative to its current position.
    • The result set is sensitive to changes made while it is open. If the underlying column values are modified, the new values are visible, thus providing a dynamic view of the underlying data. The membership and ordering of rows in the result set may be fixed or not, depending on the implementation.

5.1.8 Concurrency Types

A result set may have different update capabilities. As with scrollability, making a ResultSet object updatable increases overhead and should be done only when necessary. That said, it is often more convenient to make updates programmatically, and that can only be done if a result set is made updatable. The JDBC 2.0 core API offers two update capabilities, specified by the following constants in the ResultSet interface:

  1. CONCUR_READ_ONLY
    • Indicates a result set that cannot be updated programmatically
    • The one concurrency type available to drivers that implement only the JDBC 1.0 API
    • Offers the highest level of concurrency (allows the largest number of simultaneous users). When a ResultSet object with read-only concurrency needs to set a lock, it uses a read-only lock. This allow users to read data but not to change it. Because there is no limit to the number of read-only locks that may be held on data at one time, there is no limit to the number of concurrent users unless the DBMS or driver imposes one.
  2. CONCUR_UPDATABLE
    • Indicates a result set that can be updated programmatically
    • Available to drivers that implement the JDBC 2.0 core API
    • Reduces the level on concurrency. Updatable results sets may use write-only locks so that only one user at a time has access to a data item. This eliminates the possibility that two or more users might change the same data, thus ensuring database consistency. However, the price for this consistency is a reduced level of concurrency.

To allow a higher level of concurrency, an updatable result set may be implemented so that it uses an optimistic concurrency control scheme. This implementation assumes that conflicts will be rare and avoids using write-only locks, thereby permitting more users concurrent access to data. Before committing any updates, it determines whether a conflict has occurred by comparing rows either by value or by a version number. If there has been an update conflict between two transactions, one of the transactions will be aborted in order to maintain consistency. Optimistic concurrency control implementations can increase concurrency; however, if there are too many conflicts, they may actually reduce performance.

5.1.9 Providing Performance Hints

Many DBMSs and drivers are optimized to give the best performance under various circumstances, which means that generally a database programmer is best advised to use their default settings. However, for programmers who may want to fine tune database performance for a particular application, the JDBC 2.0 API provides methods that give hints to the driver for making access to result set data more efficient. These performance hints are exactly that, just hints; a JDBC Compliant driver may choose to ignore them.

The following two hints give the driver suggestions for improving performance:

  1. The number of rows that should be fetched from the database each time new rows are needed The number of rows to be fetched is called the fetch size, and it can be set by two different methods: Statement.setFetchSize and ResultSet.setFetchSize. The statement that creates a ResultSet object sets the default fetch size for that ResultSet object, using the Statement method setFetchSize. The following code fragment sets the fetch size for the ResultSet object rs to 25. Until the fetch size is changed, any result set created by the Statement object stmt will automatically have a fetch size of 25.
    Statement stmt = con.createStatement();
stmt.setFetchSize(25);
ResultSet rs = stmt.executeQuery(SELECT * FROM EMPLOYEES);
    A result set can, at any time, change its default fetch size by setting a new fetch size with the ResultSet version of the method setFetchSize. Continuing from the previous code fragment, the following line of code changes the fetch size of rs to 50:
    rs.setFetchSize(50);
    Normally the most efficient fetch size is already the default for the driver. The method setFetchSize simply allows a programmer to experiment to see if a certain fetch size is more efficient than the default for a particular application.

  2. The direction in which rows will be processed

    The interface ResultSet defines the following three constants for specifying the direction in which to process rows: FETCH_FORWARD, FETCH_REVERSE, and FETCH_UNKNOWN. As with the fetch size, there are two methods for setting the fetch direction, one in the interface Statement, and the other in the interface ResultSet. The statement that creates the result set determines the default fetch direction by using the Statement method setFetchDirection. The following code fragment sets the fetch direction for the ResultSet object rs so that it will process rows from the bottom up. Until the fetch direction is changed, any result set created by the Statement object stmt will automatically have a fetch direction of backward.

    Statement stmt = con.createStatement();
stmt.setFetchDirection(FETCH_REVERSE);
ResultSet rs = stmt.executeQuery(SELECT * FROM EMPLOYEES);
    A result set can, at any time, change its default fetch direction by setting a new fetch direction with the ResultSet method setFetchDirection. Continuing from the previous code fragment, the following line of code changes the fetch direction of rs to forward.
    rs.setFetchDirection(FETCH_FORWARD);
    The ResultSet object rs will hint that the driver process rows in a forward direction. This hint will be in effect until the method ResultSet.setFetchDirection is again called on rs to change the suggested fetch direction.

    As with the fetch size, drivers are commonly optimized to use the most efficient fetch direction, and changing the default may actually work against this optimization. The method setFetchDirection simply allows a programmer to try to fine tune an application for even better performance.

5.1.10 Creating Different Types of Result Sets

A result set is created by executing a query, and the type of result set depends on the arguments that are supplied to the Connection method createStatement (or prepareStatement or prepareCall). The following code fragment, which uses only JDBC 1.0 API, supplies no arguments to the method createStatement and thus creates a default ResultSet object, one that is forward-only and uses read-only concurrency.

Connection con = DriverManager.getConnection(
        "jdbc:my_subprotocol:my_subname");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(
    "SELECT EMP_NO, SALARY FROM EMPLOYEES");

The variable rs represents a ResultSet object that contains the values for the columns EMP_NO and SALARY from every row in the table EMPLOYEES. This result set is not scrollable, so only the method next can be used to move the cursor from the top down through the rows of the result set. The ResultSet object rs cannot be updated, and since no performance hints were given, the driver is free to do whatever it thinks will produce the best performance. The transaction isolation level was likewise not set, so rs will use the default transaction isolation level of the underlying database. (See "Transaction Isolation Levels" on page 22 for an explanation of transaction isolation levels.)

The next example uses the new JDBC 2.0 core API to create a scrollable result set that is sensitive to updates (by specifying ResultSet.TYPE_SCROLL_SENSITIVE) and that is updatable (by specifying ResultSet.CONCUR_UPDATABLE).

Connection con = DriverManager.getConnection(
        "jdbc:my_subprotocol:my_subname");

Statement stmt = con.createStatement(
        ResultSet.TYPE_SCROLL_SENSITIVE,
         ResultSet.CONCUR_UPDATABLE);
stmt.setFetchSize(25);

ResultSet rs2 = stmt.executeQuery(
        "SELECT EMP_NO, SALARY FROM EMPLOYEES");

The variable rs2 contains the same values as rs, from the previous example, but unlike rs, it is scrollable, updatable, and sensitive to changes in the underlying table's data. It also hints that the driver should fetch 25 rows from the database each time new rows are needed. Each time the Statement object stmt is executed, it will create a result set that is scrollable, is updatable, is sensitive to changes in its data, and has a fetch size of 25. The result set may change its fetch size, but it cannot change its type or concurrency.

As stated previously, there is a cost to making a result set scrollable or updatable, so it is good practice to create result sets with these features only when they are needed.

5.1.11 Using a Prepared Statement to Create Result Sets

Because PreparedStatement and CallableStatement objects inherit the methods defined in the Statement interface, they, too, can create different types of ResultSet objects.

The following code fragment creates a result set using a PreparedStatement object instead of a Statement object. The result set has the same attributes as in the previous example, except that a transaction isolation level is set for the connection.

Connection con = DriverManager.getConnection(
            "jdbc:my_subprotocol:my_subname");
con.setTransactionIsolation(TRANSACTION_READ_COMMITTED);

PreparedStatement pstmt = con.prepareStatement(
            "SELECT EMP_NO, SALARY FROM EMPLOYEES WHERE EMP_NO = ?",
            ResultSet.TYPE_SCROLL_SENSITIVE,
            ResultSet.CONCUR_UPDATABLE);
pstmt.setFetchSize(25);
pstmt.setString(1, "1000010");

ResultSet rs3 = pstmt.executeQuery();

The variable rs3 contains the values from the columns EMP_NO and SALARY for the row where the value for EMP_NO is 1000010. The ResultSet object rs3 is like rs2 in that it is scrollable, is updatable, is sensitive to changes in its data, and hints that the driver should fetch 25 rows at a time from the database. It is different in that its connection specifies that dirty reads (reading values before they are committed) will be prevented. Because no transaction isolation level was set for rs2, it will by default have the isolation level of the underlying database.

5.1.12 Requesting Features That Are Not Supported

With the addition of new functionality in the JDBC 2.0 API, it is possible for an application to request features that a DBMS or driver do not support. If the driver does not support scrollable result sets, for example, it may return a forward-only result set. Also, some queries will return a result set that cannot be updated, so requesting an updatable result set would have no effect for those queries. A general rule is that a query should include the primary key as one of the columns it selects, and it should reference only one table.

New methods in the JDBC 2.0 API let an application discover which result set features a driver supports. If there is any doubt about whether a feature is supported, it is advisable to call these methods before requesting the feature. The following DatabaseMetaData methods indicate whether a driver supports a given result set type or a given result set concurrency:

  • DatabaseMetaData.supportsResultSetType - returns a boolean indicating whether the driver supports the given result set type
  • DatabaseMetaData.supportsResultSetConcurrency - returns a boolean indicating whether the driver supports the given concurrency type in combination with the given result set type

The following ResultSet methods return the result set type and result set concurrency for the particular result set on which the method is called:

  • ResultSet.getType - returns the type of this result set
  • ResultSet.getConcurrency - returns the concurrency mode of this result set

If an application specifies a scrollable result set and the driver does not support scrolling, the driver will issue a warning on the Connection object that produced the statement and return a result set that is forward-only. Even if the driver supports scrollable result sets, it is possible for an application to request a scrollable type that the driver does not support. In such a case, the driver will issue an SQLWarning on the Connection object that produced the statement and return a scrollable result set of a type that it does support, even if it differs from the exact type requested. For example, if an application requests a TYPE_SCROLL_SENSITIVE result set and the driver does not support that type, it could return a TYPE_SCROLL_INSENSITIVE result set if it supports that type. The driver would also alert the application that it did not return the exact type requested by issuing an SQLWarning on the Connection object that produced the statement requesting the unsupported result set type.

Similarly, if an application specifies an updatable result set, a driver that does not support updatable result sets will issue an SQLWarning on the Connection object that produced the statement and return a read-only result set. If the application requests both an unsupported result set type and an unsupported concurrency type, the driver should choose the result set type first.

In some situations, a driver may need to choose an alternate result set type or concurrency type at statement execution time. For example, a SELECT statement that contains a join over multiple tables might produce a result set that is not updatable. In such a situation, the driver will issue an SQLWarning on the Statement, PreparedStatement, or CallableStatement object that tried to create the result set instead of issuing it on the Connection object. The driver will then choose an appropriate result set type and/or concurrency type according to the guidelines in the preceding two paragraphs.

5.1.13 Using updateXXX Methods

A ResultSet object may be updated (have its rows modified, inserted, or deleted) programmatically if its concurrency type is CONCUR_UPDATABLE. The JDBC 2.0 API adds updateXXX methods and various other methods to the ResultSet interface so that rows can be programmatically updated in both the ResultSet object and the database.

The new updateXXX methods make it possible to update values in a result set without using SQL commands. There is an updateXXX method for each data type, and as with the getXXX and setXXX methods, the XXX is a data type in the Java programming language. As with the setXXX methods, the driver converts this data type to an SQL data type before sending it to the database. So for example, the method updateBoolean sends a JDBC BIT value to the database, and the method updateCharacterStream sends a JDBC LONGVARCHAR value to the database.

The updateXXX methods take two parameters, the first to indicate which column is to be updated, and the second to give the value to assign to the specified column. As is true with the getXXX methods, the column can be specified by giving either its name or its index. If an application retrieved a value from a result set by using the column name, it will generally use the column name when it wants to update that value. Similarly, if the getXXX method was given a column index to retrieve a value, the corresponding updateXXX method will generally use the column index to update that value.

Note that the column index used with ResultSet methods refers to the column number in the result set, not the column number in the database table, which might well be different. (The column numbers will be the same only in the case where all of a table's columns are selected.) In both result set tables and database tables, the index for the first column is 1, the index for the second column is 2, and so on.

In the following code fragment, the value in the third column of the ResultSet object rs is retrieved using the method getInt, and the method updateInt is used to update that column value with an int value of 88:

int n = rs.getInt(3); // n contains the value in column 3 of rs
. . .
rs.updateInt(3, 88); // the value in column 3 of rs is set to 88
int n = rs.getInt(3); // n = 88

If the third column is named SCORES, the following lines of code will also update the third column of the ResultSet object rs by assigning it the int value 88:

int n = rs.getInt("SCORES");
. . .
rs.updateInt("SCORES", 88);

The updateXXX methods update a value in the current row of the result set, but they do not update the value in the underlying database table. It is the method updateRow that updates the database. It is very important that the updateRow method be called while the cursor is still on the current row (the row to be updated). In fact, if an application moves the cursor before it calls updateRow, the driver must discard the update, and neither the result set nor the database will be updated.

An application may explicitly cancel the updates to a row by calling the method cancelRowUpdates. To take effect, it must be called after the method updateXXX is called and before the method updateRow is called. If cancelRowUpdates is called at any other time, it has no effect.

The following example demonstrates updating the second and third columns in the fourth row of the ResultSet object rs. Since updates affect the current row, the cursor is first moved to the row to be updated, which in this case is the fourth row. Next the method updateString is called to change the value in the second column of rs to 321 Kasten. The method updateFloat changes the value in the third column of rs to 10101.0. Finally, the method updateRow is called to update the row in the database that contains the two modified column values.

rs.absolute(4);
rs.updateString(2, "321 Kasten");
rs.updateFloat(3, 10101.0f);
rs.updateRow();

If the second column is named ADDRESS and the third column is named AMOUNT, the following code will have exactly the same effect as the previous example.

rs.absolute(4);
rs.updateString("ADDRESS", "321 Kasten");
rs.updateFloat("AMOUNT", 10101.0f);
rs.updateRow();

In addition to making updates programmatically, the JDBC 2.0 core API provides the ability to send batch updates. The batch update facility operates through a Statement object, which is explained in the section "Sending Batch Updates" on page 39.

5.1.14 Deleting a Row

The JDBC 2.0 API provides the method deleteRow so that a row in a ResultSet object can be deleted using only methods in the Java programming language. This method deletes the current row, so before calling deleteRow, an application must position the cursor on the row it wants to delete. Unlike the updateXXX methods, which affect only a row in the result set, this method affects both the current row in the result set and the underlying row in the database. The following two lines of code remove the first row of the ResultSet object rs and also delete the underlying row from the database (which may or may not be the first row of the database table).

rs.first();
rs.deleteRow();

5.1.15 Inserting Rows

New rows may be inserted into a result set table and into the underlying database table using new methods in the JDBC 2.0 core API. To make this possible, the API defines the concept of an insert row. This is a special row, associated with the result set but not part of it, that serves as a staging area for building the row that is to be inserted. To access the insert row, an application calls the ResultSet method moveToInsertRow, which positions the cursor on the insert row. Then it calls the appropriate updateXXX methods to add column values to the insert row. When all of the columns of the row to be inserted have been set, the application calls the method insertRow. This method adds the insert row to both the result set and the underlying database simultaneously. Finally, the application needs to position the cursor on a row back in the result set.

The following code fragment demonstrates these steps for inserting a row from an application written in the Java programming language.

rs.moveToInsertRow();
rs.updateObject(1, myArray);
rs.updateInt(2, 3857);
rs.updateString(3, "Mysteries");
rs.insertRow();
rs.first();

Several details deserve attention. First, it is possible to retrieve values from the insert row using the ResultSet.getXXX methods. Until a value has been assigned to the insert row with an updateXXX method, however, its contents are undefined. Therefore, if a getXXX method is called after the moveToInsertRow method has been called but before an updateXXX method has been called, the value it returns will be undefined.

Second, calling an updateXXX method on the insert row is different from calling it on a row in the ResultSet object. When the cursor is on a row in a result set, a call to an updateXXX method changes a value in the result set. When the cursor is on the insert row, a call to an updateXXX method updates a value in the insert row but does nothing to the result set. In both cases, though, the updateXXX method has no effect on the underlying database.

Third, calling the method insertRow, which adds the insert row to both the result set and database, may throw an SQLException if the number of columns in the insert row does not match the number of columns in the database table. For example, if a column is not given a value by calling an updateXXX method, an SQLException will be thrown unless that column allows null values. Also, if the result set is missing a column, that, too, will cause an SQLException to be thrown unless the column allows null values.

Fourth, a result set keeps track of where its cursor was positioned when the cursor moved to the insert row. As a result, a call to the method ResultSet.moveToCurrentRow will return the cursor to the row that was the current row immediately before the method moveToInsertRow was called. The other cursor movement methods also work from the insert row, including those that use positioning relative to the current row.

5.1.16 Positioned Updates

Before the JDBC 2.0 API made programmatic updates available in the Java programming language, the only way to change a row that had been fetched with a result set was to use what is called a positioned update. A positioned update is done with SQL commands and requires a named cursor to indicate the result set row in which updates are to be made.

The Statement interface provides the method setCursorName, which allows an application to specify a cursor name for the cursor associated with the next result set produced by a statement. This name can then be used in SQL positioned update or delete statements to identify the current row in the ResultSet object generated by the statement. In order to enable a positioned update or delete on a result set, the query that produces it must have the following form:

SELECT . . . FROM . . . WHERE . . . FOR UPDATE . . .

Including the words "FOR UPDATE" ensures that the cursor has the proper isolation level to support an update.

After the method executeQuery has been called on the statement, the cursor name for the resulting ResultSet object can be obtained by calling the ResultSet method getCursorName. If a DBMS allows positioned updates or positioned deletes, the name of the cursor can be supplied as a parameter to the SQL command for updates or deletes. A Statement object other than the one that created the ResultSet object must be used for the positioned update. The following code fragment, in which stmt and stmt2 are two different Statement objects, demonstrates the form for naming a cursor and then using it in an SQL update statement:

stmt.setCursorName("x");
ResultSet rs = stmt.executeQuery(
        "SELECT . . . FROM . . . WHERE . . . FOR UPDATE . . .")
String cursorName = rs.getCursorName;
int updateCount = stmt2.executeUpdate(
        "UPDATE . . . WHERE CURRENT OF " + cursorName);

Note that just because the method getCursorName has been invoked on a ResultSet object does not necessarily mean that it can be updated using the ResultSet.updateXXX methods available in the JDBC 2.0 core API. In order to update a ResultSet object using the updateXXX methods, the executeQuery statement that produces the result set must include the specification CONCUR_UPDATABLE. Positioned updates, however, are possible for a result set created without this specification if all the proper steps are taken: (1) a cursor is named, (2) the SQL query that produces the result set is of the form SELECT . . . FROM . . . WHERE . . . FOR UPDATE . . ., and (3) the SQL update statement is of the form UPDATE . . . WHERE CURRENT OF <cursorName>.

Not all DBMSs support positioned updates. To verify that a DBMS supports positioned updates, an application can call the DatabaseMetaData methods supportsPositionedDelete and supportsPositionedUpdate to discover whether a particular connection supports these operations. When they are supported, the DBMS/driver must ensure that rows selected are properly locked so that positioned updates do not result in update anomalies or other concurrency problems.

5.1.17 Queries That Produce Updatable Result Sets

Some queries will produce result sets that cannot be updated no matter what the result set type. For example, a query that does not select the primary key column might generate a result set that cannot be updated. Because of differences in database implementations, the JDBC 2.0 core API does not specify an exact set of SQL queries that must yield updatable result sets. Instead it defines a set of criteria that should generally produce updatable result sets for JDBC Compliant drivers that support updatability. If queries adhere to the following guidelines, a developer can generally expect that they will produce updatable result sets:

  1. The query references only a single table in the database
  2. The query does not contain a join operation or a GROUP BY clause
  3. The query selects the primary key of the table it references

    If inserts are to be performed on the result set, an SQL query should satisfy conditions one through three plus the following three additional conditions:

  4. The user has read/write database privileges on the table
  5. The query selects all of the nonnullable columns in the underlying table
  6. The query selects all columns that do not have a default value

The fourth and fifth conditions are necessary because a row to be inserted into a table must have a value for each column in the table unless the column accepts null values or default values. If the result set on which insertion operations are to be performed does not contain every column that requires a value, the insertion will fail.

Result sets created by means other than the execution of a query, such as those returned by several methods in the DatabaseMetaData interface, are not scrollable or updatable, nor are they required to be.

5.1.18 Using Streams for Very Large Row Values

Two new interfaces in the JDBC 2.0 core API, Blob and Clob, are the mapping of the SQL3 data types BLOB (Binary Large Object) and CLOB (Character LargeObject) in the Java programming language. With the availability of these data types, databases will undoubtedly start using them to store very large binary or character objects. If this is the case, the ResultSet methods getBlob and getClob should be used to retrieve them.

Using only the JDBC 1.0 API, a ResultSet object still makes it possible to retrieve arbitrarily large LONGVARBINARY or LONGVARCHAR data. The methods getBytes and getString return data as one large chunk (up to the limits imposed by the return value of Statement.getMaxFieldSize). It is possible to retrieve this large chunk of data in smaller, fixed-size chunks. This is done by having the ResultSet class return java.io.Input streams from which data can be read in chunks. Note that these streams must be accessed immediately because they will be closed automatically when the next getXXX method is called on the ResultSet object. (This behavior is not a limitation of the JDBC API but rather a constraint on large blob access imposed by the underlying implementations in some database -systems.)

The JDBC 1.0 API has three separate methods for getting streams, each with a different return value:

  • getBinaryStream - returns a stream that simply provides the raw bytes from the database without any conversion
  • getAsciiStream - returns a stream that provides one-byte ASCII characters. This method can be more efficient for a DBMS that stores characters in ASCII format.
  • getUnicodeStream - returns a stream that provides two-byte Unicode characters. This method, though still available, has been deprecated in favor of the new method getCharacterStream. (See below.)

The following method for retrieving streams of both ASCII and Unicode characters is new in the JDBC 2.0 core API:

  • getCharacterStream - returns a java.io.Reader object that provides Unicode characters. No matter how a DBMS stores characters, the driver will return them as a stream of Unicode characters.

Note that the stream returned by getAsciiStream returns a stream of bytes in which each byte is an ASCII character. This differs from getCharacterStream, which returns a stream of two-byte Unicode characters. The method getCharacterStream can be used for both ASCII and Unicode characters because the driver will convert ASCII characters to Unicode before it returns a Reader object. If you must use getUnicodeStream because your DBMS and driver do not support the JDBC 2.0 API, note also that JDBC Unicode streams return big-endian data; that is, they expect data with the high byte first and the low byte second. This conforms to the standard endian defined by the Java programming language, which is important if a program is to be portable. Refer to The Javatm Virtual Machine Specification, by Tim Lindholm and Frank Yellin, for more detailed information about big-endian order.

The following code fragment demonstrates how to use the getAsciiStream method.

java.sql.Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT x FROM Table2");
// Now retrieve the column 1 results in 4 K chunks:
byte [] buff = new byte[4096];
while (rs.next()) {
    java.io.InputStream fin = rs.getAsciiStream(1);
    for (;;) {
        int size = fin.read(buff);
        if (size == -1) { // at end of stream
                    break;
        }

        // Send the newly-filled buffer to some ASCII output stream
        output.write(buff, 0, size);
    }
}

5.1.19 NULL Result Values

To determine if a given result value is JDBC NULL, one must first read the column and then use the method ResultSet.wasNull. This is true because a JDBC NULL retrieved by one of the ResultSet.getXXX methods may be converted to either null, 0, or false, depending on the type of the value.

The following list shows which values are returned by the various getXXX methods when they have retrieved a JDBC NULL.

  • null-for those getXXX methods that return objects in the Java programming language (getString, getBigDecimal, getBytes, getDate, getTime, getTime-stamp,  getAsciiStream, getCharacterStream, getUnicodeStream, getBinary-Stream, getObject, getArray, getBlob, getClob, and getRef)

  • 0 (zero)-for getByte, getShort, getInt, getLong, getFloat, and getDouble

  • false-for getBoolean

For example, if the method getInt returns 0 from a column that allows null values, an application cannot know for sure whether the value in the database was 0 or NULL until it calls the method wasNull, as shown in the following code fragment, where rs is a ResultSet object.

int n = rs.getInt(3);
boolean b = rs.wasNull();

If b is true, the value stored in the third column of the current row of rs is JDBC NULL. The method wasNull checks only the last value retrieved, so to determine whether n was NULL, wasNull had to be called before another getXXX method was invoked.

5.1.20	 Closing a ResultSet Object

Normally, nothing needs to be done to close a ResultSet object; it is automatically closed by the Statement object that generated it when that Statement object is closed, is re-executed, or is used to retrieve the next result from a sequence of multiple results. The method close is provided so that a ResultSet object can be closed explicitly, thereby immediately releasing the resources held by the ResultSet object. This could be necessary when several statements are being used and the automatic close does not occur soon enough to prevent database resource conflicts.

5.1.21	 JDBC Compliance

Drivers that are JDBC Compliant should normally support scrollable result sets, but they are not required to do so. The intent is for JDBC drivers to implement scrollable result sets using the support provided by the underlying database systems. If the DBMS does not provide support for scrollability, then the driver may omit this feature.

Making scrollability optional is not meant to encourage omitting it. It is simply meant to minimize the complexity of implementing JDBC drivers for data sources that do not support scrollability. Indeed, the recommended alternative is for a driver to implement scrollability as a layer on top of the DBMS. One way to do this is to implement a result set as a rowset. The RowSet interface, which provides methods for doing this, is part of the JDBC Standard Extension API.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc.   All rights
reserved.


 [Top] [Prev] [Next]

Statement

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

4.1 Statement Overview

A Statement object is used to send SQL statements to a database. There are actually three kinds of Statement objects, all of which act as containers for executing SQL statements on a given connection: Statement, PreparedStatement, which inherits from Statement, and CallableStatement, which inherits from PreparedStatement. They are specialized for sending particular types of SQL statements; a Statement object is used to execute a simple SQL statement with no parameters, a PreparedStatement object is used to execute a precompiled SQL statement with or without IN parameters, and a CallableStatement object is used to execute a call to a database stored procedure.

The Statement interface provides basic methods for executing statements and retrieving results. The PreparedStatement interface adds methods for dealing with IN parameters; the CallableStatement interface adds methods for dealing with OUT parameters.

In the JDBC 2.0 core API, the ResultSet interface has a set of new updateXXX methods and other new related methods that make it possible to update table column values programmatically. This new API also adds methods to the Statement interface (and PreparedStatement and CallableStatement interfaces) so that update statements may be executed as a batch rather than singly.

4.1.1 Creating Statement Objects

Once a connection to a particular database is established, that connection can be used to send SQL statements. A Statement object is created with the Connection method createStatement, as in the following code fragment:

Connection con = DriverManager.getConnection(url, "sunny", "");
Statement stmt = con.createStatement();

The SQL statement that will be sent to the database is supplied as the argument to one of the execute methods on a Statement object. This is demonstrated in the following example, which uses the method executeQuery:

ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM Table2");

The variable rs references a result set that cannot be updated and in which the cursor can move only forward, which is the default behavior for ResultSet objects. The JDBC 2.0 core API adds a new version of the method Connection.createStatement that makes it possible to create Statement objects that produce result sets that are scrollable and/or updatable.

4.1.2 Executing Statements Using Statement Objects

The Statement interface provides three different methods for executing SQL statements: executeQuery, executeUpdate, and execute. The correct method to use is determined by what the SQL statement produces.

The method executeQuery is designed for statements that produce a single result set, such as SELECT statements.

The method executeUpdate is used to execute INSERT, UPDATE, or DELETE statements and also SQL DDL (Data Definition Language) statements like CREATE TABLE, DROP TABLE, and ALTER TABLE. The effect of an INSERT, UPDATE, or DELETE statement is a modification of one or more columns in zero or more rows in a table. The return value of executeUpdate is an integer (referred to as the update count) that indicates the number of rows that were affected. For statements such as CREATE TABLE or DROP TABLE, which do not operate on rows, the return value of executeUpdate is always zero.

The method execute is used to execute statements that return more than one result set, more than one update count, or a combination of the two. Because it is an advanced feature that the majority of programmers will never use, it is explained in its own section later in this overview.

All of the methods for executing statements close the calling Statement object's current result set if there is one open. This means that any processing of the current ResultSet object needs to be completed before a Statement object is re-executed.

It should be noted that the PreparedStatement interface, which inherits all of the methods in the Statement interface, has its own versions of the methods executeQuery, executeUpdate and execute. Statement objects do not themselves contain an SQL statement; therefore, one must be provided as the argument to the Statement.execute methods. PreparedStatement objects do not supply an SQL statement as a parameter to these methods because they already contain a precompiled SQL statement. CallableStatement objects inherit the PreparedStatement forms of these methods. Supplying a parameter to the PreparedStatement or CallableStatement versions of these methods will cause an SQLException to be thrown.

4.1.3 Statement Completion

When a connection is in auto-commit mode, the statements being executed within it are committed or rolled back when they are completed. A statement is considered complete when it has been executed and all its results have been returned. For the method executeQuery, which returns one result set, the statement is completed when all the rows of the ResultSet object have been retrieved. For the method executeUpdate, a statement is completed when it is executed. In the rare cases where the method execute is called, however, a statement is not complete until all of the result sets or update counts it generated have been retrieved.

Some DBMSs treat each statement in a stored procedure as a separate statement; others treat the entire procedure as one compound statement. This difference becomes important when auto-commit is enabled because it affects when the method commit is called. In the first case, each statement is individually committed; in the second, all are committed together.

4.1.4 Closing Statements

Statement objects will be closed automatically by the Java garbage collector. Nevertheless, it is recommended as good programming practice that they be closed explicitly when they are no longer needed. This frees DBMS resources immediately and helps avoid potential memory problems.

4.1.5 SQL Escape Syntax in Statements

Statement objects may contain SQL statements that use SQL escape syntax. Escape syntax signals the driver that the code within it should be handled differently. When escape processing is enabled (by calling Statement.setEscapeProcessing(true) or RowSet.setEscapeProcessing(true)), the driver will scan for any escape syntax and translate it into code that the particular database understands. This makes escape syntax DBMS-independent and allows a programmer to use features that might not otherwise be available.

An escape clause is demarcated by curly braces and a key word, which indicates the kind of escape clause.

    {keyword . . . parameters . . . }

The following keywords are used to identify escape clauses:

  • escape for LIKE escape characters The percent sign percent sign (%) wildcard>(%) and underscore underbar (_) wildcard>(_) characters work like wild cards in SQL LIKE clauses (% matches zero or more characters, and _ matches exactly one character). In order to interpret them literally, they can be preceded by a backslash (\), which is a special escape character in strings. One can specify which character to use as the escape character by including the following syntax at the end of a query:
        {escape 'escape-character'}
    For example, the following query, using the backslash character as an escape character, finds identifier names that begin with an underbar.
    stmt.executeQuery("SELECT name FROM Identifiers
      WHERE Id LIKE '\_%' {escape '\'}");
  • fn for scalar functions

    Almost all DBMSs have numeric, string, time, date, system, and conversion functions on scalar values. One of these functions can be used by putting it in escape syntax with the keyword fn followed by the name of the desired function and its arguments. For example, the following code calls the function concat with two arguments to be concatenated:

        {fn concat("Hot", "Java")};
    The name of the current database user can be obtained with the following syntax:
        {fn user()};
    Scalar functions may be supported by different DBMSs with slightly different syntax, and they may not be supported by all drivers. Various DatabaseMetaData methods will list the functions that are supported. For example, the method getNumericFunctions returns a comma-separated list of the Open Group CLI names of numeric functions, the method getStringFunctions returns string functions, and so on. The driver will either map the escaped function call into the appropriate syntax or implement the function directly itself. However, a driver is required to implement only those scalar functions that the DBMS supports.

  • d, t, and ts for date and time literals DBMSs differ in the syntax they use for date, time, and timestamp literals. The JDBC API supports ISO standard format for the syntax of these literals, using an escape clause that the driver must translate to the DBMS representation. For example, a date is specified in a JDBC SQL statement with the following syntax:
        {d 'yyyy-mm-dd'}
    In this syntax, yyyy is the year, mm is the month, and dd is the day. The driver will replace the escape clause with the equivalent DBMS-specific representation. For example, the driver might replace {d 1999-02-28} with '28-FEB-99' if that is the appropriate format for the underlying database. There are analogous escape clauses for TIME and TIMESTAMP:
            {t 'hh:mm:ss'}
        {ts 'yyyy-mm-dd hh:mm:ss.f . . .'}
    The fractional seconds (.f . . .) portion of the TIMESTAMP can be omitted.

  • call or ?= call for stored procedures If a database supports stored procedures, they can be invoked from JDBC with the syntax shown below. Note that the square brackets ([ ]) indicate that what is between them is optional, and they are not part of the syntax.
        {call procedure_name[(?, ?, . . .)]}

    or, where a procedure returns a result parameter:

        {? = call procedure_name[(?, ?, . . .)]}
    Input arguments may be either literals or parameters. See the section "Numbering of Parameters" on page 81 for more information. One can call the method DatabaseMetaData.supportsStoredProcedures to see if the database supports stored procedures.

  • oj for outer joins The syntax for an outer join is:
            {oj outer-join}
    In this syntax, outer-join has the form
    table {LEFT|RIGHT|FULL} OUTER JOIN {table | outer-join}
    ON search-condition
    (Note that curly braces ({}) in the preceding line indicate that one of the items between them must be used; they are not part of the syntax.) The following SELECT statement uses the escape syntax for an outer join.
    Statement stmt = con.createStatement("SELECT * FROM {oj TABLE1
    LEFT OUTER JOIN TABLE2 ON DEPT_NO = 003420930}");
    Outer joins are an advanced feature and are not supported by all DBMSs; consult the SQL grammar for an explanation of them. JDBC provides three DatabaseMetaData methods for determining the kinds of outer joins a driver supports: supportsOuterJoins, supportsFullOuterJoins, and supportsLimitedOuterJoins.

The method Statement.setEscapeProcessing turns escape processing on or off, with the default being on. A programmer might turn it off to cut down on processing time when performance is paramount, but it would normally be turned on. It should be noted that the method setEscapeProcessing does not work for PreparedStatement objects because the statement may have already been sent to the database before it can be called. See page 69, the overview of the PreparedStatement interface, regarding precompilation.

4.1.6 Sending Batch Updates

The batch update facility provided by the JDBC 2.0 core API allows a Statement object to submit multiple update commands together as a single unit, or batch, to the underlying DBMS. This ability to submit multiple updates as a batch rather than having to send each update individually can improve performance greatly in some situations.

The following code fragment demonstrates how to send a batch update to a database. In this example, a new row is inserted into three different tables in order to add a new employee to a company database. The code fragment starts by turning off the Connection object con's auto-commit mode in order to allow multiple statements to be sent together as a transaction. After creating the Statement object stmt, it adds three SQL INSERT INTO commands to the batch with the method addBatch and then sends the batch to the database with the method executeBatch. The code looks like this:

Statement stmt = con.createStatement();
con.setAutoCommit(false);

stmt.addBatch("INSERT INTO employees VALUES (1000, 'Joe Jones')");
stmt.addBatch("INSERT INTO departments VALUES (260, 'Shoe')");
stmt.addBatch("INSERT INTO emp_dept VALUES (1000, '260')");

int [] updateCounts = stmt.executeBatch();

Because the connection's auto-commit mode is disabled, the application is free to decide whether or not to commit the transaction if an error occurs or if some of the commands in the batch fail to execute. For example, the application may not commit the changes if any of the insertions fail, thereby avoiding the situation where employee information exists in some tables but not in others.

In the JDBC 2.0 core API, a Statement object is created with an associated list of commands. This list is empty to begin with; commands are added to the list with the Statement method addBatch. The commands added to the list must all return only a simple update count. If, for example, one of the commands is a query (a SELECT statement), which will return a result set, the method executeBatch will throw a BatchUpdateException. A Statement object's list of commands can be emptied by calling the method clearBatch on it.

In the preceding example, the method executeBatch submits stmt's list of commands to the underlying DBMS for execution. The DBMS executes each command in the order in which it was added to the batch and returns an update count for each command in the batch, also in order. If one of the commands does not return an update count, its return value cannot be added to the array of update counts that the method executeBatch returns. In this case, the method executeBatch will throw a BatchUpdateException. This exception keeps track of the update counts for the commands that executed successfully before the error occurred, and the order of these update counts likewise follows the order of the commands in the batch.

In the following code fragment, an application uses a try/catch block, and if a BatchUpdateException is thrown, it retrieves the exception's array of update counts to discover which commands in a batch update executed successfully before the BatchUpdateException object was thrown.

try {
    stmt.addBatch("INSERT INTO employees VALUES (" +
                "1000, 'Joe Jones')");
    stmt.addBatch("INSERT INTO departments VALUES (260, 'Shoe')");
    stmt.addBatch("INSERT INTO emp_dept VALUES (1000, '260')");

    int [] updateCounts = stmt.executeBatch();

} catch(BatchUpdateException b) {
    System.err.println("Update counts of successful commands: ");
    int [] updateCounts = b.getUpdateCounts();
    for (int  i = 0; i < updateCounts.length; i ++) {
        System.err.print(updateCounts[i] + "  ");
    }
    System.err.println("");
}

If a printout was generated and looked similar to the following, the first two commands succeeded and the third one failed.

Update counts of successful commands:
1   1

JDBC drivers are not required to support batch updates, so a particular driver might not implement the methods addBatch, clearBatch, and executeBatch. Normally a programmer knows whether a driver that he/she is working with supports batch updates, but if an application wants to check, it can call the DatabaseMetaData method supportsBatchUpdates to find out. In the following code fragment, a batch update is used only if the driver supports batch updates; otherwise, each update is sent as a separate statement. The connection's auto-commit mode is disabled so that in either case, all the updates are included in one transaction.

con.setAutoCommit(false);
    if(dbmd.supportsBatchUpdates) {
    stmt.addBatch("INSERT INTO . . .");
    stmt.addBatch("DELETE . . .");
    stmt.addBatch("INSERT INTO . . .");
    . . .
    stmt.executeBatch();
} else {
    System.err.print("Driver does not support batch updates; ");
    System.err.println("sending updates in separate statements.");
    stmt.executeUpdate("INSERT INTO . . .");
    stmt.executeUpdate("DELETE . . .");
    stmt.executeUpdate("INSERT INTO . . .");
    . . .
con.commit();

4.1.7 Giving Performance Hints

The Statement interface contains two methods for giving performance hints to the driver: setFetchDirection and setFetchSize. These methods are also available in the ResultSet interface and do exactly the same thing. The difference is that the Statement methods set the default for all of the ResultSet objects produced by a particular Statement object, whereas the ResultSet methods can be called any time during the life of the ResultSet object to change the fetch direction or the fetch size. See the section "Providing Performance Hints" on page 54 for a full discussion of these methods.

Both the Statement and ResultSet interfaces have the corresponding get methods: getFetchDirection and getFetchSize. If Statement.getFetchDirection is called before a fetch direction has been set, the value returned is implementation-specific, that is, it is up to the driver. The same is true for the method Statement.getFetchSize.

4.1.8 Executing Special Kinds of Statements

The execute method should be used only when it is possible that a statement may return more than one ResultSet object, more than one update count, or a combination of ResultSet objects and update counts. These multiple possibilities for results, though rare, are possible when one is executing certain stored procedures or dynamically executing an unknown SQL string (that is, unknown to the application programmer at compile time). For example, a user might execute a stored procedure (using a CallableStatement object), and that stored procedure could perform an update, then a select, then an update, then a select, and so on. In more typical situations, someone using a stored procedure will already know what it returns.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc.   All rights
reserved.


 [Top] [Prev] [Next] [Bottom]

Summary of New Features

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

This appendix summarizes the new features in the JDBC 2.1 core API.

A.1 Overview of JDBC 2.1 Core API Changes

The JDBC 2.1 core API includes the JDBC 1.0 API and adds enhancements and new functionality to it. These additions put the Java programming language at the forefront of database computing, providing both universal data access and improved performance.

Applications that use earlier versions of the JDBC API can be run using the Java 2 platform with no problem, in keeping with the goal of backward compatibility. However, an application that takes advantage of the new 2.0 features must be run with a driver that implements those features.

The new features in the JDBC 2.1 core API fall into two broad categories: support for new functionality and support for the SQL3 data types.

  1. Support for new functionality
    • scrollable result sets
    • batch updates
    • programmatic inserts, deletes, and updates
    • other
      • performance hints
      • character streams for streams of internationalized Unicode characters
      • full precision for java.math.BigDecimal values
      • support for time zones in Date, Time, and Timestamp values

  2. Support for advanced data types
    • new SQL data types (SQL3 types)
    • increased support for storing persistent objects in the Java programming language

In addition to making the retrieval, storage, and manipulation of data more convenient, the new features make JDBC applications more efficient. For example, batch updates can increase performance dramatically. The new interfaces Blob, Clob, and Array allow applications to operate on large amounts of data without having to materialize the data on the client, which can mean a significant savings in transfer time and the amount of memory needed. Also, new methods for setting the fetch size and fetch direction let a programmer fine tune an application for more efficient data retrieval and processing.

A.2 Summary of New Functionality

The JDBC 2.1 core API adds important new functionality. The following sections briefly explain each new area of functionality and summarize the supporting API.

A.2.1 Scrollable Result Sets

Scrollable result sets provide the ability to move the cursor forward and backward to a specified position or to a position relative to the current position. The following interfaces have new methods that support scrollable result sets.

  • ResultSet
    • methods for moving the cursor to a particular row or to a relative position (either forward or backward)
    • methods for ascertaining the current position of the cursor
    • constants indicating the scrollability of a result set
  • Connection
    • new versions of the methods for creating Statement, PreparedStatement, and CallableStatement objects that make the result sets they produce scrollable
  • DatabaseMetaData
    • method indicating whether the DBMS and driver support scrollable result sets

A.2.2 Batch Updates

The new batch update facility provides the ability to send multiple updates to the database to be executed as a batch rather than sending each update separately. The following interfaces add methods that support batch updates, and the exception BatchUpdateException is new.

  • Statement, PreparedStatement, and CallableStatement
    • methods for adding update statements to a batch, clearing all update statements, and executing a batch
  • DatabaseMetaData
    • method indicating whether the DBMS and driver support batch updates
  • BatchUpdateException
    • exception thrown when an error occurs in a batch update

A.2.3 Programmatic Updates

Programmatic updates provide the ability to make updates using the JDBC API rather than SQL statements. The following interfaces have new methods and constants that support programmatic updates.

  • ResultSet
    • an updateXXX method for updating each data type
    • methods for inserting, deleting, or updating a row
    • methods indicating whether a row was inserted, deleted, or updated
    • method for cancelling a row update
    • constants indicating the updatability of a result set
  • DatabaseMetaData
    • methods indicating the visibility of changes to a result set
    • methods indicating whether a result set detects inserts, deletes, or updates
    • method indicating whether the DBMS and driver support updatable result sets

A.2.4 Other New Features

The JDBC 2.1 core API provides various other new features, which are summarized in the following list.

  • Performance enhancements-new methods that allow a programmer to fine tune the retrieval of rows from the database. These methods provide the ability to specify (1) the number of result set rows fetched from the database when more rows are needed and (2) the direction in which rows are fetched from the database.
    • ResultSet methods for getting and setting the current fetch size and fetch direction
    • Statement, PreparedStatement, and CallableStatement methods for getting and setting the default fetch size and default fetch direction that result sets generated by executing a query will have when they are first created
  • Character streams-new methods that allow character data to be retrieved or sent to the database as a stream of internationalized Unicode characters. These methods replace the deprecated getUnicodeStream and setUnicodeStream methods.
    • ResultSet.getCharacterStream
    • CallableStatement.getCharacterStream
    • PreparedStatement.setCharacterStream
  • Full precision for java.math.BigDecimal values-new versions of themethods that retrieve a java.math.BigDecimal value with full precision. Unlike the deprecated versions they replace, these new versions do not take a specified precision.
    • ResultSet.getBigDecimal
    • CallableStatement.getBigDecimal
  • Support for time zones-methods with new versions that take a Calendar object as a parameter, which allows the driver to use a specified time zone rather than the default when calculating a value for a date, time, or timestamp
    • ResultSet.getDate
    • ResultSet.getTime
    • ResultSet.getTimestamp
    • CallableStatement.getDate
    • CallableStatement.getTime
    • CallableStatement.getTimestamp
    • PreparedStatement.setDate
    • PreparedStatement.setTime
    • PreparedStatement.setTimestamp

A.3 Support for Advanced Data Types

The JDBC 2.1 core API adds support for using advanced data types, making it as easy to use them as it is to use simple data types. This support includes the ability to store, retrieve, and update even the new SQL data types that are essentially objects, blurring the distinction between object databases and relational databases. The next four sections ("What Are the SQL3 Data Types?" on page 120, "Summary of Support for the SQL3 Data Types" on page 121, "Mapping of the New SQL3 Types" on page 122, and "SQL Locators" on page 123) describe how the JDBC 2.0 core API provides support for these advanced data types.

In addition to being able to store objects defined in SQL as values in a database table, programmers writing Java applications can also store objects defined in the Java programming language as values in a database table. The section "Support for Storing Java Objects" on page 123 describes this capability.

Note that a driver is not required to implement functionality that its DBMS does not support, so not all drivers necessarily implement the functionality described here. DatabaseMetaData methods such as getTypeInfo, getColumns, and getUDTs may be called to get information about which data types a driver supports.

A.3.1 What Are the SQL3 Data Types?

This section briefly describes the new SQL3 data types. Their mapping to types in the Java programming language is described in section A.3.3 on page 122.

The SQL3 data types can be categorized as follows:

  • New built-in types-types for storing large objects. These are in addition to the standard built-in data types, such as CHAR, FLOAT, DATE, and so on.
    • BLOB (Binary Large Object)
    • CLOB (Character Large Object)
  • Constructed types-types based on a given base type
    • REF(structured type)-a reference to the specified SQL structured type
    • ARRAY[n]-an array of n elements that are all one data type
  • User-defined types (UDTs)-new types created with the SQL commandþCREATE TYPE
    • Distinct type-a new type based on the representation of a single built-in type
    • Structured type-a new type containing multiple attributes, each of which may be either a built-in or a user-defined data type
  • Locator types-types that are logical pointers to data that resides on the database server
    • LOCATOR(structured type)
    • LOCATOR(array)
    • LOCATOR(blob)
    • LOCATOR(clob)

A.3.2 Summary of Support for the SQL3 Data Types

The JDBC 2.1 core API supports the new SQL 3 data types by means of the following new interfaces, methods, and fields.

  • New interfaces for the new data types. The SQL3 types are mapped by the following new JDBC 2.1 core API interfaces:
    • java.sql.Array
    • java.sql.Blob
    • java.sql.Clob
    • java.sql.Ref
    • java.sql.Struct
  • New interfaces that support customizing the mapping of UDTs (SQL structured and distinct types) into classes in the Java programming language
    • SQLData
    • SQLInput
    • SQLOutput
  • New methods added to existing interfaces in order to retrieve, store, and update the new SQL3 types
    • new getXXX methods in the ResultSet interface to retrieve SQL3 type column values from a result set
    • new getXXX methods in the CallableStatement interface to retrieve SQL3 type values in output parameters
    • new setXXX methods in the PreparedStatement interface to set a SQL3 type column value
    • new updateXXX methods in the ResultSet interface to update values programmatically
  • New methods in the DatabaseMetaData and ResultSetMetaData interfaces for getting metadata about the new data types
  • New fields (constants) added to the class java.sql.Types to support the new data types and persistent storage
    • DISTINCT
    • STRUCT
    • ARRAY
    • BLOB
    • CLOB
    • REF
    • JAVA_OBJECT

A.3.3 Mapping of the New SQL3 Types

The JDBC 2.1 core API does not try to replicate the SQL3 types exactly; rather, its goal is to map them to types in the Java programming language so that they retain their functionality and are convenient to use. For example, SQL3 has what are called locator types, which are used on a client to designate data that is stored on a database server. Locators can be very useful for dealing with data that is large because they allow the data to be manipulated without having to be materialized on the client machine. SQL3 includes locators for the types ARRAY, BLOB, CLOB and structured types. The JDBC 2.1 core API does not include locators for these types directly (and not at all for structured types) but rather provides interfaces that are implemented such that the driver and DBMS use the appropriate locators behind the scenes. The result is that a developer using the JDBC API to access an SQL ARRAY, BLOB, or CLOB value need not even be aware of locators. See section A.3.4 on page 123 for more information about locators.

In the JDBC 2.1 core API, the following SQL3 types are mapped to interfaces in the Java programming language:

  • ARRAY-mapped to java.sql.Array
  • BLOB-mapped to java.sql.Blob
  • CLOB-mapped to java.sql.Clob
  • REF-mapped to java.sql.Ref
  • an SQL structured type-mapped to java.sql.Struct

Distinct types are not mapped to an interface because they are based on a single built-in type and thus can simply be mapped to the standard mapping for that built-in type. For example, the following is an SQL statement that creates the new type MONEY.

CREATE TYPE MONEY AS NUMERIC(10, 2)

This new UDT is based on the data type NUMERIC, which maps to java.math.BigDecimal, so the type MONEY maps to java.math.BigDecimal. This means that a value of type MONEY would be retrieved with the method getBigDecimal, stored with the method setBigDecimal, and updated with the method updateBigDecimal.

A.3.4 SQL Locators

An SQL LOCATOR is a logical pointer to data that resides on a database server. It typically refers to data that is too large to materialize on the client, such as images or audio. Locators exist only in a client environment, and their existence is transient. A standard implementation of the JDBC 2.1 core API will use locators internally for instances of the Blob, Clob, and Array interfaces. This means that Blob, Clob, and Array objects contain a locator that points to the data on the server rather than containing the data itself. Programmers operating on Blob, Clob, and Array instances are actually operating on the database objects they represent. This ability to operate on large database objects without bringing their data to the client is a major plus in performance.

Note that the JDBC 2.1 core API does not call for using the SQL LOCATOR(structured type). In a standard implementation, a Struct object contains the data of the structured type that it maps and is not implemented internally as a locator, as are Blob, Clob, and Array objects.

A.3.5 Support for Storing Java Objects

The JDBC API has always supported persistent storage of objects defined in the Java programming language through the methods getObject and setObject. But, of course, persistent storage of Java objects does not actually occur unless a DBMS also supports it. Up to this point, support was limited, but a new generation of DBMSs that recognize Java objects as a data type is emerging. In these DBMSs, termed Java relational DBMSs, an instance of a Java class can be stored as a column value in a database table.

[Top] [Prev] [Next] [Bottom]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next]

Mapping SQL and Java Types

NOTE: The material in this chapter is based on JDBCtm API Tutorial and Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

8.1 Mapping Overview

Because data types in SQL and data types in the Java programming language are not identical, there needs to be some mechanism for transferring data between an application using Java types and a database using SQL types. (Note that the phrase "Java types," as used in this book, stands for "types in the Java programming language.")

In order to transfer data between a database and an application written in the Java programming language, the JDBC API provides three sets of methods:

  1. Methods on the ResultSet class for retrieving SQL SELECT results as Java types
  2. Methods on the PreparedStatement class for sending Java types as SQL statement parameters
  3. Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types

This section brings together information about data types affecting various classes and interfaces and puts all the tables showing the mappings between SQL types and Java types in one place for easy reference. It also describes each of the generic SQL data types, including the SQL3 types.

8.2 Mapping SQL Types to Java Types

Unfortunately there are significant variations between the SQL types supported by different database products. Even when different databases support SQL types with the same semantics, they may give those types different names. For example, most of the major databases support an SQL data type for large binary values, but Oracle calls this type LONG RAW, Sybase calls it IMAGE, Informix calls it BYTE, and DB2 calls it LONG VARCHAR FOR BIT DATA.

Fortunately, JDBC programmers will normally not need to concern themselves with the actual SQL type names used by a target database. Most of the time JDBC programmers will be programming against existing database tables, and they need not concern themselves with the exact SQL type names that were used to create these tables.

JDBC defines a set of generic SQL type identifiers in the class java.sql.Types. These types have been designed to represent the most commonly used SQL types. In programming with the JDBC API, programmers will normally be able to use these JDBC types to reference generic SQL types, without having to be concerned about the exact SQL type name used by the target database. These JDBC types are fully described in the next section.

The one major place where programmers may need to use SQL type names is in the SQL CREATE TABLE statement when they are creating a new database table. In this case programmers must take care to use SQL type names that are supported by their target databases. The table "JDBC Types Mapped to Database-specific SQL Types" on page 111 provides some suggestions for suitable SQL type names to be used for JDBC types for some of the major databases. We recommend that you consult your database documentation if you need exact definitions of the behavior of the various SQL types on a particular database.

If you want to be able to write portable JDBC programs that can create tables on a variety of different databases, you have two main choices. First, you can restrict yourself to using only very widely accepted SQL type names such as INTEGER, NUMERIC, or VARCHAR, which are likely to work for all databases. Or second, you can use the java.sql.DatabaseMetaData.getTypeInfo method to discover which SQL types are actually supported by a given database and select a database-specific SQL type name that matches a given JDBC type.

JDBC defines a standard mapping from the JDBC database types to Java types. For example, a JDBC INTEGER is normally mapped to a Java int. This supports a simple interface for reading and writing JDBC values as simple Java types.

The Java types do not need to be exactly isomorphic to the JDBC types; they just need to be able to represent them with enough type information to correctly store and retrieve parameters and recover results from SQL statements. For example, a Java String object does not precisely match any of the JDBC CHAR types, but it gives enough type information to represent CHAR, VARCHAR, or LONGVARCHAR successfully.

8.3 Basic JDBC Types

This section describes the JDBC data types supported by both the JDBC 1.0 and 2.0 API. It also explains how they are related to standard SQL types and to types in the Java programming language. New JDBC data types introduced in the JDBC 2.0 core API are described in section 8.4 on page 94.

8.3.1 CHAR, VARCHAR, and LONGVARCHAR

The JDBC types CHAR, VARCHAR, and LONGVARCHAR are closely related. CHAR represents a small, fixed-length character string, VARCHAR represents a small, variable-length character string, and LONGVARCHAR represents a large, variable-length character string.

The SQL CHAR type corresponding to JDBC CHAR is defined in SQL-92 and is supported by all the major databases. It takes a parameter that specifies the string length. Thus CHAR(12) defines a 12-character string. All the major databases support CHAR lengths up to at least 254 characters.

The SQL VARCHAR type corresponding to JDBC VARCHAR is defined in SQL-92 and is supported by all the major databases. It takes a parameter that specifies the maximum length of the string. Thus VARCHAR(12) defines a string whose length may be up to 12 characters. All the major databases support VARCHAR lengths up to 254 characters. When a string value is assigned to a VARCHAR variable, the database remembers the length of the assigned string and on a SELECT, it will return the exact original string.

Unfortunately there is no consistent SQL mapping for the JDBC LONGVARCHAR type. All the major databases support some kind of very large variable-length string supporting up to at least a gigabyte of data, but the SQL type names vary. See the table "JDBC Types Mapped to Database-specific SQL Types" on page 111 for some examples.

Java programmers do not need to distinguish among the three types of JDBC strings, CHAR, VARCHAR, and LONGVARCHAR. Each can be expressed as a Java String, and it is possible to read and write an SQL statement correctly without knowing the exact data type that was expected.

CHAR, VARCHAR, and LONGVARCHAR could have been mapped to either String or char[], but String is more appropriate for normal use. Also, the String class makes conversions between String and char[] easy: There is a method for converting a String object to a char[] and also a constructor for turning a char[] into a String object.

One issue that had to be addressed is how to handle fixed-length SQL strings of type CHAR(n). The answer is that JDBC drivers (or the DBMS) perform appropriate padding with spaces. Thus, when a CHAR(n) field is retrieved from the database, the driver will convert it to a Java String object of length n, which may include some padding spaces at the end. Conversely, when a String object is sent to a CHAR(n) field, the driver and/or the database will add any necessary padding spaces to the end of the string to bring it up to length n.

The method ResultSet.getString, which allocates and returns a new String object, is recommended for retrieving data from CHAR, VARCHAR, and LONGVARCHAR fields. This is suitable for retrieving normal data, but can be unwieldy if the JDBC type LONGVARCHAR is being used to store multi-megabyte strings. To handle this case, two methods in the ResultSet interface allow programmers to retrieve a LONGVARCHAR value as a Java input stream from which they can subsequently read data in whatever size chunks they prefer. These methods are getAsciiStream and getCharacterStream, which deliver the data stored in a LONGVARCHAR column as a stream of ASCII or Unicode characters. Note that the method getUnicodeStream has been deprecated.

The SQL3 CLOB data type, which is described later in this chapter, provides an alternate means of representing large amounts of character data.

8.3.2 BINARY, VARBINARY, and LONGVARBINARY

The JDBC types BINARY, VARBINARY, and LONGVARBINARY are closely related. BINARY represents a small, fixed-length binary value, VARBINARY represents a small, variable-length binary value, and LONGVARBINARY represents a large, variable-length binary value.

Unfortunately, the use of these various BINARY types has not been standardized and support varies considerably among the major databases.

The SQL BINARY type corresponding to JDBC BINARY is a nonstandard SQL extension and is only implemented on some databases. It takes a parameter that specifies the number of binary bytes. Thus BINARY(12) defines a 12-byte binary type. Typically, BINARY values are limited to 254 bytes.

The SQL VARBINARY type corresponding to JDBC VARBINARY is a nonstandard SQL extension and is only implemented on some databases. It takes a parameter that specifies the maximum number of binary bytes. Thus VARBINARY(12) defines a binary type whose length may be up to 12 bytes. Typically, VARBINARY values are limited to 254 bytes. When a binary value is assigned to a VARBINARY variable, the database remembers the length of the assigned value and on a SELECT, it will return the exact original value.

Regrettably, there is no consistent SQL type name corresponding to the JDBC LONGVARBINARY type. All the major databases support some kind of very large variable length binary type supporting up to at least a gigabyte of data, but the SQL type names vary. See the table "JDBC Types Mapped to Database-specific SQL Types" on page 111 for some examples.

BINARY, VARBINARY, and LONGVARBINARY can all be expressed identically as byte arrays in the Java programming language. Since it is possible to read and write SQL statements correctly without knowing the exact BINARY data type that was expected, there is no need for programmers writing code in the Java programming language to distinguish among them.

The method recommended for retrieving BINARY and VARBINARY values is ResultSet.getBytes. If a column of type JDBC LONGVARBINARY stores a byte array that is many megabytes long, however, the method getBinaryStream is recommended. Similar to the situation with LONGVARCHAR, this method allows a programmer to retrieve a LONGVARBINARY value as a Java input stream that can be read later in smaller chunks.

The SQL3 BLOB data type, which is described later in this chapter, provides an alternate means of representing large amounts of binary data.

8.3.3 BIT

The JDBC type BIT represents a single bit value that can be zero or one.

SQL-92 defines an SQL BIT type. However, unlike the JDBC BIT type, this SQL-92 BIT type can be used as a parameterized type to define a fixed-length binary string. Fortunately, SQL-92 also permits the use of the simple non-parameterized BIT type to represent a single binary digit, and this usage corresponds to the JDBC BIT type. Unfortunately, the SQL-92 BIT type is only required in "full" SQL-92 and is currently supported by only a subset of the major databases. Portable code may therefore prefer to use the JDBC SMALLINT type, which is widely supported.

The recommended Java mapping for the JDBC BIT type is as a Java boolean.

8.3.4 TINYINT

The JDBC type TINYINT represents an 8-bit integer value between 0 and 255 that may be signed or unsigned.

The corresponding SQL type, TINYINT, is currently supported by only a subset of the major databases. Portable code may therefore prefer to use the JDBC SMALLINT type, which is widely supported.

The recommended Java mapping for the JDBC TINYINT type is as either a Java byte or a Java short. The 8-bit Java byte type represents a signed value from -128 to 127, so it may not always be appropriate for larger TINYINT values, whereas the 16-bit Java short will always be able to hold all TINYINT values.

8.3.5 SMALLINT

The JDBC type SMALLINT represents a 16-bit signed integer value between -32768 and 32767.

The corresponding SQL type, SMALLINT, is defined in SQL-92 and is supported by all the major databases. The SQL-92 standard leaves the precision of SMALLINT up to the implementation, but in practice, all the major databases support at least 16 bits.

The recommended Java mapping for the JDBC SMALLINT type is as a Java short.

8.3.6 INTEGER

The JDBC type INTEGER represents a 32-bit signed integer value ranging between -2147483648 and 2147483647.

The corresponding SQL type, INTEGER, is defined in SQL-92 and is widely supported by all the major databases. The SQL-92 standard leaves the precision of INTEGER up to the implementation, but in practice all the major databases support at least 32 bits.

The recommended Java mapping for the INTEGER type is as a Java int.

8.3.7 BIGINT

The JDBC type BIGINT represents a 64-bit signed integer value between -9223372036854775808 and 9223372036854775807.

The corresponding SQL type BIGINT is a nonstandard extension to SQL. In practice the SQL BIGINT type is not yet currently implemented by any of the major databases, and we recommend that its use be avoided in code that is intended to be portable.

The recommended Java mapping for the BIGINT type is as a Java long.

8.3.8 REAL

The JDBC type REAL represents a "single precision" floating point number that supports seven digits of mantissa.

The corresponding SQL type REAL is defined in SQL-92 and is widely, though not universally, supported by the major databases. The SQL-92 standard leaves the precision of REAL up to the implementation, but in practice all the major databases supporting REAL support a mantissa precision of at least seven digits.

The recommended Java mapping for the REAL type is as a Java float.

8.3.9 DOUBLE

The JDBC type DOUBLE represents a "double precision" floating point number that supports 15 digits of mantissa.

The corresponding SQL type is DOUBLE PRECISION, which is defined in SQL-92 and is widely supported by the major databases. The SQL-92 standard leaves the precision of DOUBLE PRECISION up to the implementation, but in practice all the major databases supporting DOUBLE PRECISION support a mantissa precision of at least 15 digits.

The recommended Java mapping for the DOUBLE type is as a Java double.

8.3.10 FLOAT

The JDBC type FLOAT is basically equivalent to the JDBC type DOUBLE. We provided both FLOAT and DOUBLE in a possibly misguided attempt at consistency with previous database APIs. FLOAT represents a "double precision" floating point number that supports 15 digits of mantissa.

The corresponding SQL type FLOAT is defined in SQL-92. The SQL-92 standard leaves the precision of FLOAT up to the implementation, but in practice all the major databases supporting FLOAT support a mantissa precision of at least 15 digits.

The recommended Java mapping for the FLOAT type is as a Java double. However, because of the potential confusion between the double precision SQL FLOAT and the single precision Java float, we recommend that JDBC programmers should normally use the JDBC DOUBLE type in preference to FLOAT.

8.3.11 DECIMAL and NUMERIC

The JDBC types DECIMAL and NUMERIC are very similar. They both represent fixed-precision decimal values. ame="1007716"> The corresponding SQL types DECIMAL and NUMERIC are defined in SQL-92 and are very widely implemented. These SQL types take precision and scale parameters. The precision is the total number of decimal digits supported, and the scale is the number of decimal digits after the decimal point. For most DBMSs, the scale is less than or equal to the precision. So for example, the value "12.345" has a precision of 5 and a scale of 3, and the value ".11" has a precision of 2 and a scale of 2. JDBC requires that all DECIMAL and NUMERIC types support both a precision and a scale of at least 15.

The sole distinction between DECIMAL and NUMERIC is that the SQL-92 specification requires that NUMERIC types be represented with exactly the specified precision, whereas for DECIMAL types, it allows an implementation to add additional precision beyond that specified when the type was created. Thus a column created with type NUMERIC(12,4) will always be represented with exactly 12 digits, whereas a column created with type DECIMAL(12,4) might be represented by some larger number of digits.

The recommended Java mapping for the DECIMAL and NUMERIC types is java.math.BigDecimal. The java.math.BigDecimal type provides math operations to allow BigDecimal types to be added, subtracted, multiplied, and divided with other BigDecimal types, with integer types, and with floating point types.

The method recommended for retrieving DECIMAL and NUMERIC values is ResultSet.getBigDecimal. JDBC also allows access to these SQL types as simple Strings or arrays of char. Thus, Java programmers can use getString to receive a DECIMAL or NUMERIC result. However, this makes the common case where DECIMAL or NUMERIC are used for currency values rather awkward, since it means that application writers have to perform math on strings. It is also possible to retrieve these SQL types as any of the Java numeric types.

8.3.12 DATE, TIME, and TIMESTAMP

There are three JDBC types relating to time:

  • The JDBC DATE type represents a date consisting of day, month, and year. The corresponding SQL DATE type is defined in SQL-92, but it is implemented by only a subset of the major databases. Some databases offer alternative SQL types that support similar semantics.
  • The JDBC TIME type represents a time consisting of hours, minutes, and seconds. The corresponding SQL TIME type is defined in SQL-92, but it is implemented by only a subset of the major databases. As with DATE, some databases offer alternative SQL types that support similar semantics.
  • The JDBC TIMESTAMP type represents DATE plus TIME plus a nanosecond field. The corresponding SQL TIMESTAMP type is defined in SQL-92, but it is implemented by only a very small number of databases.

Because the standard Java class java.util.Date does not match any of these three JDBC date/time types exactly (it includes both DATE and TIME information but has no nanoseconds), JDBC defines three subclasses of java.util.Date to correspond to the SQL types. They are:

  • java.sql.Date for SQL DATE information. The hour, minute, second, and millisecond fields of the java.util.Date base class should be set to zero. If the number of milliseconds supplied to the java.sql.Date constructor is negative, the driver will compute the date as the number of milliseconds before January 1, 1970. Otherwise, the date is computed as the specified number of milliseconds after January 1, 1970.

  • java.sql.Time for SQL TIME information. The year, month, and day fields of the java.util.Date base class are set to 1970, January, and 1. This is the "zero" date in the Java epoch.
  • java.sql.Timestamp for SQL TIMESTAMP information. This class extends java.util.Date by adding a nanoseconds field.

All three of the JDBC time-related classes are subclasses of java.util.Date, and as such, they can be used where a java.util.Date is expected. For example, internationalization methods take a java.util.Date object as an argument, so they can be passed instances of any of the JDBC time-related classes.

A JDBC Timestamp object has its parent's date and time components and also a separate nanoseconds component. If a java.sql.Timestamp object is used where a java.util.Date object is expected, the nanoseconds component is lost. However, since a java.util.Date object is stored with a precision of one millisecond, it is possible to maintain this degree of precision when converting a java.sql.Timestamp object to a java.util.Date object. This is done by converting the nanoseconds in the nanoseconds component to whole milliseconds (by dividing the number of nanoseconds by 1,000,000) and then adding the result to the java.util.Date object. Up to 999,999 nanoseconds may be lost in this conversion, but the resulting java.util.Date object will be accurate to within one millisecond.

The following code fragment is an example of converting a java.sql.Timestamp object to a java.util.Date object that is accurate to within one millisecond.

Timestamp t = new Timestamp(98724573287540L);
java.util.Date d;
d = new java.util.Date(t.getTime() + (t.getNanos() / 1000000));

New methods in the JDBC 2.0 core API make it possible for the driver to take a specified time zone into account when calculating a date, time, or timestamp. The time zone information is included in a java.util.Calendar object that is passed to new versions of the methods for getting and setting Date, Time, and Timestamp values. When no time zone is specified, the driver uses the time zone of the virtual machine running the application when it calculates a date, time, or timestamp.

8.4 Advanced JDBC Data Types

The ISO (International Organization for Standardization) and IEC (the International Electrotechnical Commission) have defined new data types that are commonly referred to as SQL3 types. Of these new SQL3 data types, BLOB, CLOB, ARRAY, and REF are predefined types, whereas the SQL structured type and the DISTINCT type are user-defined types (UDTs). These new types, with the exception of DISTINCT, are mapped to interfaces that are new in the JDBC 2.0 core API. This section describes each data type briefly; more complete information on each type can be found in the reference chapter for the corresponding interface. There is a chapter on the DISTINCT data type, but because DISTINCT types are mapped to a built-in type, there is no separate interface for it.

The new data types in the JDBC 2.0 core API represent a significant expansion in the types of data that can be used in a relational database. In general, they are more like objects; in fact, two of the new data types are UDTs that can optionally be custom mapped to classes in the Java programming language. A third UDT (JAVA_OBJECT) is itself an instance of a class defined in the Java programming language. Despite their advanced nature, all of the new data types in the JDBC 2.0 core API can be used as conveniently as the data types in the JDBC 1.0 API. For example, they can be used as column values in database tables, and they can be retrieved and stored using the appropriate getXXX and setXXX methods.

8.4.1 BLOB

The JDBC type BLOB represents an SQL3 BLOB (Binary Large Object).

A JDBC BLOB value is mapped to an instance of the Blob interface in the Java programming language. If a driver follows the standard implementation, a Blob object logically points to the BLOB value on the server rather than containing its binary data, greatly improving efficiency. The Blob interface provides methods for materializing the BLOB data on the client when that is desired.

8.4.2 CLOB

The JDBC type CLOB represents the SQL3 type CLOB (Character Large Object).

A JDBC CLOB value is mapped to an instance of the Clob interface in the Java programming language. If a driver follows the standard implementation, a Clob object logically points to the CLOB value on the server rather than containing its character data, greatly improving efficiency. Two of the methods on the Clob interface materialize the data of a CLOB object on the client.

8.4.3 ARRAY

The JDBC type ARRAY represents the SQL3 type ARRAY.

An ARRAY value is mapped to an instance of the Array interface in the Java programming language. If a driver follows the standard implementation, an Array object logically points to an ARRAY value on the server rather than containing the elements of the ARRAY object, which can greatly increase efficiency. The Array interface contains methods for materializing the elements of the ARRAY object on the client in the form of either an array or a ResultSet object.

8.4.4 DISTINCT

The JDBC type DISTINCT field (Types class)>DISTINCT represents the SQL3 type DISTINCT.

The standard mapping for a DISTINCT type is to the Java type to which the base type of a DISTINCT object would be mapped. For example, a DISTINCT type based on a CHAR would be mapped to a String object, and a DISTINCT type based on an SQL INTEGER would be mapped to an int.

The DISTINCT type may optionally have a custom mapping to a class in the Java programming language. A custom mapping consists of a class that implements the interface SQLData and an entry in a java.util.Map object.

8.4.5 STRUCT

The JDBC type STRUCT represents the SQL3 structured type. An SQL structured type, which is defined by a user with a CREATE TYPE statement, consists of one or more attributes. These attributes may be any SQL data type, built-in or user-defined.

The standard mapping for the SQL type STRUCT is to a Struct object in the Java programming language. A Struct object contains a value for each attribute of the STRUCT value it represents.

A STRUCT value may optionally be custom mapped to a class in the Java programming language, and each attribute in the STRUCT may be mapped to a field in the class. A custom mapping consists of a class that implements the interface SQLData and an entry in a java.util.Map object.

8.4.6 REF

The JDBC type REF represents an SQL3 type REF<structured type>. An SQL REF references (logically points to) an instance of an SQL structured type, which the REF persistently and uniquely identifies. In the Java programming language, the interface Ref represents an SQL REF.

If an application wants to point to an instance of an SQL structured type in the database rather than having its attribute values materialized on the client, it can use the type REF<structured type>, a reference to that SQL structured type.

A REF value is a unique identifier created specifically for a particular instance of an SQL structured type. It is persistently stored with the instance it references in a special table on the server. An application can select the REF value from its special table and use it in place of the structured type instance it identifies.

8.4.7 JAVA_OBJECT

The JDBC type JAVA_OBJECT, added in the JDBC 2.0 core API, makes it easier to use objects in the Java programming language as values in a database. JAVA_OBJECT is simply a type code for an instance of a class defined in the Java programming language that is stored as a database object. The type JAVA_OBJECT is used by a database whose type system has been extended so that it can store Java objects directly. The JAVA_OBJECT value may be stored as a serialized Java object, or it may be stored in some vendor-specific format.

The type JAVA_OBJECT is one of the possible values for the column DATA_TYPE in the ResultSet objects returned by various DatabaseMetaData methods, including getTypeInfo, getColumns, and getUDTs. The method getUDTs, part of the new JDBC 2.0 core API, will return information about the Java objects contained in a particular schema when it is given the appropriate parameters. Having this information available facilitates using a Java class as a database type.

For DBMSs that support them, values of type JAVA_OBJECT are stored in a database table using the method PreparedStatement.setObject. They are retrieved with the methods ResultSet.getObject or CallableStatement.getObject and updated with the ResultSet.updateObject method.

For example, assuming that instances of the class Engineer are stored in the column ENGINEERS in the table PERSONNEL, the following code fragment, in which stmt is a Statement object, prints out the names of all of the engineers.

ResultSet rs = stmt.executeQuery("SELECT ENGINEERS FROM PERSONNEL");
while (rs.next()) {
    Engineer eng = (Engineer)rs.getObject("ENGINEERS");
    System.out.println(eng.lastName + ", " + eng.firstName);
}

After the query returns the ResultSet object rs, which contains all of the instances of Engineer, the code retrieves each instance in turn with the method getObject. The value returned by getObject is an Object type, so it must be narrowed to the more specific type Engineer before being assigned to the variable eng.

8.5 Examples of Mapping

In any situation where a program written in the Java programming language retrieves data from a database, there has to be some form of mapping and data conversion. In most cases, programmers using the JDBC API will be programming with knowledge of their target database's schema. In other words, they know, for example, what tables the database contains and the data type for each column in those tables. They can therefore use the strongly typed access methods in the interfaces ResultSet, PreparedStatement, and CallableStatement. This section presents three different scenarios, describing the data mapping and conversion required in each case.

8.5.1 Simple SQL Statement

In the most common case, a user executes a simple SQL statement and gets back a ResultSet object with the results. Each value returned by the database and stored in a ResultSet column will have a JDBC data type. A call to a ResultSet.getXXX method will retrieve that value as a Java data type. For example, if a ResultSet column contains a JDBC FLOAT value, the method getDouble will retrieve that value as a Java double. Table 8.6 on page 110 shows which getXXX methods may be used to retrieve which JDBC types. (A user who does not know the type of a ResultSet column can get that information by calling the method ResultSet.getMetaData and then calling the method ResultSetMetaData.getColumnType.)

8.5.2 SQL Statement with IN Parameters

In another possible scenario, the user sends an SQL query that takes input parameters. In this case, the user calls the PreparedStatement.setXXX methods to assign a value to each input parameter. For example, PreparedStatement.setLong(1, 2345678) will assign the value 2345678 to the first parameter as a Java long. The driver will convert 2345678 to a JDBC BIGINT in order to send it to the database. Which JDBC type the driver sends to the database is determined by the standard mapping from Java types to JDBC types, shown in Table 8.2 on page 106.

8.5.3 SQL Statement with INOUT Parameters

In yet another scenario, a user wants to call a stored procedure, assign values to its INOUT parameters, retrieve values from a ResultSet object, and retrieve values from the parameters. This case is rather uncommon and more complicated than most, but it gives a good illustration of mapping and data conversion.

In this scenario, the first thing to do is to assign values to the INOUT parameters using PreparedStatement.setXXX methods. In addition, because the parameters will also be used for output, the programmer must register each parameter with the JDBC type of the value that the database will return to it. This is done with the method CallableStatement.registerOutParameter, which takes one of the JDBC types defined in the class Types. A programmer retrieves the values stored in the output parameters with CallableStatement.getXXX methods.

The XXX type used for CallableStatement.getXXX must map to the JDBC type registered for that parameter. For example, if the database is expected to return an output value whose type is JDBC REAL, the parameter should have been registered as java.sql.Types.REAL. Then to retrieve the JDBC REAL value, the method CallableStatement.getFloat should be called (the mapping from JDBC types to Java types is shown in Table 8.1 on page 105). The method getFloat will return the value stored in the output parameter after converting it from a JDBC REAL to a Java float. To accommodate various databases and make an application more portable, it is recommended that values be retrieved from ResultSet objects before values are retrieved from output parameters.

The following code demonstrates calling a stored procedure named getTestData, which has two parameters that are both INOUT parameters and which also returns a normal JDBC ResultSet. First the Connection object con creates the CallableStatement object cstmt. Then the method setByte sets the first parameter to 25 as a Java byte. The driver will convert 25 to a JDBC TINYINT and send it to the database. The method setBigDecimal sets the second parameter with an input value of 83.75. The driver will convert this Java BigDecimal object to a JDBC NUMERIC value. Next the two parameters are registered as OUT parameters, the first parameter as a JDBC TINYINT and the second parameter as a JDBC NUMERIC with two digits after the decimal point. After cstmt is executed, the values are retrieved from the ResultSet object using ResultSet.getXXX methods. The method getString gets the value in the first column as a Java String object, getInt gets the value in the second column as a Java int, and the second getInt retrieves the value in the third column as a Java int.

Then CallableStatement.getXXX methods retrieve the values stored in the output parameters. The method getByte retrieves the JDBC TINYINT as a Java byte, and getBigDecimal retrieves the JDBC NUMERIC as a Java BigDecimal object with two digits after the decimal point. Note that when a parameter is both an input and an output parameter, the setXXX method uses the same Java type as the getXXX method (as in setByte and getByte). The registerOutParameter method registers it to the JDBC type that is mapped from the Java type (a Java byte maps to a JDBC TINYINT, as shown in Table 8.2 on page 106).

CallableStatement cstmt = con.prepareCall(
    "{call getTestData(?, ?)}");
cstmt.setByte(1, 25);
cstmt.setBigDecimal(2, 83.75);
// register the first parameter as a JDBC TINYINT and the second
// as a JDBC NUMERIC with two digits after the decimal point
cstmt.registerOutParameter(1, java.sql.Types.TINYINT);
cstmt.registerOutParameter(2, java.sql.Types.NUMERIC, 2);
ResultSet rs = cstmt.executeQuery();
// retrieve and print values in result set
while (rs.next()) {
    String name = rs.getString(1);
    int score = rs.getInt(2);
    int percentile = rs.getInt(3);
    System.out.print("name = " + name + ", score = " + score);

    System.out.println(", percentile = " + percentile);
}
// retrieve values in output parameters
byte x = cstmt.getByte(1);
java.math.BigDecimal n = cstmt.getBigDecimal(2);

To generalize, the XXX in CallableStatement.getXXX and CallableStatement.setXXX methods is a Java type. For setXXX methods, the driver converts the Java type to a JDBC type before sending it to the database (using the standard mappings shown in Table 8.2 on page 106). For getXXX methods, the driver converts the JDBC type returned by the database to a Java type (using the standard mappings shown in Table 8.1 on page 105) before returning it to the getXXX method.

The method registerOutParameter always takes a JDBC type as an argument, and the method setObject may take a JDBC type as an argument.

Note that if a JDBC type is supplied in its optional third argument, the method setObject will cause an explicit conversion of the parameter value from a Java type to the JDBC type specified. If no target JDBC type is supplied to setObject, the parameter value will be converted to the JDBC type that is the standard mapping from the Java Object type (as shown in Table 8.4 on page 108). The driver will perform the explicit or implicit conversion before sending the parameter to the database.

8.6 Custom Mapping

The SQL3 user-defined types (UDTs), structured types and DISTINCT types, can be custom mapped to classes in the Java programming language. If a custom mapping has been set up, the driver will use that mapping instead of the standard mapping when it converts a UDT from a JDBC type to a Java type or vice versa.

UDTs are retrieved from the database with the methods ResultSet.getObject and CallableStatement.getObject; UDTs are sent back to the database with the method PreparedStatement.setObject. When an application calls a getObject method to retrieve a UDT, the driver will check to see if the type map associated with the connection has an entry for the UDT. If it does, the driver will use that type map to custom map the UDT; if there is no matching entry, the driver will use the standard mapping.

Almost all custom mapping is done using the connection's type map. It is possible, however, to have the driver use a different type map. The methods for which a custom mapping is possible have two versions, one that takes a type map and one that does not. The usual situation is not to supply a type map, in which case the driver uses the connection's type map by default. When a type map is supplied to a method, it supersedes the connection's type map, and the driver will use it instead of the type map associated with the connection to map a UDT. If the type map supplied has no entry for the UDT, the driver will use the standard mapping.

The setObject method does not take a type map as a parameter, so it operates a little differently. If setObject is passed an instance of a class that implements the SQLData interface, that is, an object that was custom mapped when it was retrieved, the driver will already have set up the mechanism for mapping it. The driver will convert the class instance, mapping the UDT back to its SQL type before sending it to the database. If the parameter to be set by the method setObject has not been custom mapped, the driver will use the standard mapping to convert it before sending it to the database.

The fact that only the methods getObject and setObject can be used to retrieve or store SQL structured types ensures that a custom mapping will be used if there is one. Four methods in the Array interface may be passed a type map so that if the ARRAY elements are UDTs, they can be custom mapped when the elements are materialized on the client. The Struct method getAttributes also has a version that takes a type map, which is used to custom map an SQL structured type's attributes before bringing them over to the client.

8.7 Dynamic Data Access

In most cases, the user wants to access results or parameters whose data types are known at compile time. However, some applications, such as generic browsers or query tools, are compiled with no knowledge of the database schema they will access. For this reason, JDBC provides support for fully dynamically typed data access in addition to static data type access.

Three methods facilitate accessing values whose data types are not known at compile time:

  • ResultSet.getObject
  • PreparedStatement.setObject
  • CallableStatement.getObject

If, for example, an application wants to be able to accept a variety of types as results in a ResultSet object, it can use the method ResultSet.getObject.

The methods ResultSet.getObject and CallableStatement.getObject retrieve a value as a Java Object. Since Object is the base class for all Java objects, an instance of any Java class can be retrieved as an instance of Object. However, the following Java types are built-in "primitive" types and are therefore not instances of the class Object: boolean, char, byte, short, int, long, float, and double. As a result, these types cannot be retrieved by getObject methods. However, each of these primitive types has a corresponding class that serves as a wrapper. Instances of these classes are objects, which means that they can be retrieved with the methods ResultSet.getObject and CallableStatement.getObject. Table 8.3 on page 107 shows the mapping from a JDBC type to a Java Object type. This table differs from the standard mapping from JDBC type to Java type in that each primitive Java type is replaced by its wrapper class, except that JDBC TINYINT and JDBC SMALLINT are mapped to the Java class Integer.

8.8 Storing Java Objects in a Database

Additions to the JDBC 2.0 core API make it easier to store Java objects in a database. The PreparedStatement.setObject method in the JDBC 1.0 API has always provided some support for persistent storage of objects defined in the Java programming language. With the new data type JAVA_OBJECT, in conjunction with the new method DatabaseMetaData.getUDTs, it is now easier to keep track of the Java objects stored in a database.

8.9 Tables for Type Mapping

This section contains the following tables relating to JDBC and Java data types:

Table 8.1-JDBC Types Mapped to Java Types

This table shows the conceptual correspondence between JDBC types and Java types. A programmer should write code with this mapping in mind. For example, if a value in the database is a SMALLINT, a short should be the data type used in a JDBC application.
All CallableStatement.getXXX methods except for getObject use this mapping. The getObject methods for both the CallableStatement and ResultSet interfaces use the mapping in "JDBC Types Mapped to Java Object Types" on page 107.

Table 8.2-Java Types Mapped to JDBC Types

This table shows the mapping a driver should use for the ResultSet.updateXXX methods and for IN parameters. PreparedStatement.setXXX methods and RowSet.setXXX methods use this table for mapping an IN parameter, which is a Java type, to the JDBC type that will be sent to the database. Note that the setObject methods for these two interfaces use the mapping shown in "Java Object Types Mapped to JDBC Types" on page 108.

Table 8.3-JDBC Types Mapped to Java Object Types

ResultSet.getObject and CallableStatement.getObject use the mapping shown in this table for standard mappings.

Table 8.4-Java Object Types Mapped to JDBC Types

PreparedStatement.setObject and RowSet.setObject use the mapping shown in this table when no parameter specifying a target JDBC type is provided.

Table 8.5-Conversions by setObject from Java Object Types to JDBC Types

This table shows which JDBC types may be specified as the target JDBC type to the methods PreparedStatement.setObject and RowSet.setObject.

Table 8.6-Type Conversions Supported by ResultSet.getXXX Methods

This table shows which JDBC types may be returned by ResultSet.getXXX methods. A bold X indicates the method recommended for retrieving a JDBC type. A plain x indicates for which JDBC types it is possible to use a getXXX method.
This table also shows the conversions used by the SQLInput.readXXX methods, except that they use only the recommended conversions.

Table 8.7-JDBC Types Mapped to Database-specific SQL Types

This table shows the names used by individual databases for their data types that most closely correspond to the JDBC types.

8.9.1 JDBC Types Mapped to Java Types
JDBC Type | Java Type
CHAR | String
VARCHAR | String
LONGVARCHAR | String
NUMERIC | java.math.BigDecimal
DECIMAL | java.math.BigDecimal
BIT | boolean
TINYINT | byte
SMALLINT | short
INTEGER | int
BIGINT | long
REAL | float
FLOAT | double
DOUBLE | double
BINARY | byte[]
VARBINARY | byte[]
LONGVARBINARY | byte[]
DATE | java.sql.Date
TIME | java.sql.Time
TIMESTAMP | java.sql.Timestamp
CLOB | Clob
BLOB | Blob
ARRAY | Array
DISTINCT | mapping of underlying type
STRUCT | Struct
REF | Ref
JAVA_OBJECT | underlying Java class

This table has two purposes. First, it illustrates the general correspondence between types in the Java programming language and the SQL types. Second, it shows the mapping used by CallableStatement.getXXX methods and SQLInput.readXXX methods. (Note that the mapping used by the CallableStatement.getObject method is shown in Table 8.3.)

8.9.2 Java Types Mapped to JDBC Types
Java Type | JDBC Type
String | CHAR, VARCHAR, or LONGVARCHAR
java.math.BigDecimal | NUMERIC
boolean | BIT
byte | TINYINT
short | SMALLINT
int | INTEGER
long | BIGINT
float | REAL
double | DOUBLE
byte[] | BINARY, VARBINARY, or LONGVARBINARY
java.sql.Date | DATE
java.sql.Time | TIME
java.sql.Timestamp | TIMESTAMP
Clob | CLOB
Blob | BLOB
Array | ARRAY
Struct | STRUCT
Ref | REF
Java class | JAVA_OBJECT

This table shows the conversions used for IN parameters before they are sent to the DBMS, used by the PreparedStatement.setXXX and RowSet.setXXX methods. These same conversions are also used by ResultSet.updateXXX methods and SQLOutput.writeXXX methods. (Note that the PreparedStatement.setObject and RowSet.setObject methods use the mapping in Table 8.4.)

The mapping for String will normally be VARCHAR but will turn into LONGVARCHAR if the given value exceeds the driver's limit on VARCHAR values. The same is true for byte[], which may be mapped to either VARBINARY or LONGVARBINARY values, depending on the driver's limit on VARBINARY values. In most cases, the choice between CHAR and VARCHAR is not significant. In any case, drivers will just make the right choice. The same is true for the choice between BINARY and VARBINARY.

8.9.3 JDBC Types Mapped to Java Object Types
JDBC Type | Java Object Type
CHAR | String
VARCHAR | String
LONGVARCHAR | String
NUMERIC | java.math.BigDecimal
DECIMAL | java.math.BigDecimal
BIT | Boolean
TINYINT | Integer
SMALLINT | Integer
INTEGER | Integer
BIGINT | Long
REAL | Float
FLOAT | Double
DOUBLE | Double
BINARY | byte[]
VARBINARY | byte[]
LONGVARBINARY | byte[]
DATE | java.sql.Date
TIME | java.sql.Time
TIMESTAMP | java.sql.Timestamp
DISTINCT | Object type of underlying type
CLOB | Clob
BLOB | Blob
ARRAY | Array
STRUCT | Struct or SQLData
REF | Ref
JAVA_OBJECT | underlying Java class

This table shows the mapping from JDBC types to Java object types that is used by the ResultSet.getObject and CallableStatement.getObject methods.

8.9.4 Java Object Types Mapped to JDBC Types
Java Object Type | JDBC Type
String | CHAR, VARCHAR, or LONGVARCHAR
java.math.BigDecimal | NUMERIC
Boolean | BIT
Integer | INTEGER
Long | BIGINT
Float | REAL
Double | DOUBLE
byte[] | BINARY, VARBINARY, or LONGVARBINARY
java.sql.Date | DATE
java.sql.Time | TIME
java.sql.Timestamp | TIMESTAMP
Clob | CLOB
Blob | BLOB
Array | ARRAY
Struct | STRUCT
Ref | REF
Java class | JAVA_OBJECT

These are the mappings used by the PreparedStatement.setObject method when no parameter specifying a target JDBC type is given. (The JDBC types that may be specified to the PreparedStatement.setObject method are shown in Table 8.5.)

Note that the mapping for String will normally be VARCHAR but will turn into LONGVARCHAR if the given value exceeds the driver's limit on VARCHAR values. The case is similar for byte[], which will be VARBINARY or LONGVARBINARY, depending on the driver's limit for VARBINARY values.

8.9.5 Conversions by setObject

An "x" means that the given Java object type may be converted to the given JDBC type. This table show the possible values for the parameter specifying a target JDBC type that is passed to the method PreparedStatement.setObject or RowSet.setObject. Note that some conversions may fail at run time if the value presented is invalid.

8.9.6 Conversions by ResultSet.getXXX Methods

SQLInput.readXXX methods support only the recommended conversions. An "x" means that the method can retrieve the JDBC type. An "X" means that the method is recommended for retrieving the JDBC type.

8.9.7 JDBC Types Mapped to Database-specific SQL Types

There is considerable variation among the different SQL types supported by the different databases. Table 8.7 shows the database-specific SQL types that best match the JDBC type for various major databases. The presence of a database-specific type name indicates that the given type can be used to achieve the semantics of the corresponding JDBC type, though the database-specific type may also provide additional semantics.

Notes and Lamentations:

  1. Some databases provide extra precision for some integral and floating-point types.
  2. Some databases provide a DATE or DATETIME type that can be used to contain either a DATE or a TIME or both.
  3. VARCHAR and VARCHAR2 are currently synonyms in Oracle8.
  4. For LONGVARCHAR, DB2 also supports "CLOB(n)" with a limit of 2 gigabytes.
  5. For LONGVARBINARY, DB2 also supports "BLOB(n)" with a limit of 2 gigabytes.
  6. Handling of BINARY, VARBINARY, and LONGVARBINARY literals in SQL statements varies widely among databases. We recommend using PreparedStatement.setBytes to set values in a portable way.
  7. Handling of DATE, TIME, and TIMESTAMP literals in SQL statements varies widely among databases. We recommend using the JDBC SQL escape syntax for dates and times (see "SQL Escape Syntax in Statements" on page 36) to set Date, Time, and Timestamp values in a portable way.

[Top] [Prev] [Next]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next

JDBCTM: A JavaTM SQL API

Version 1.20
January 10, 1998
Graham Hamilton and Rick Cattell

This is the specification for the JDBCTM API, which is a JavaTM application programming interface to SQL databases.

Please send technical comments on this specification to:

jdbc@wombat.eng.sun.com

Because of the volume of interest in JDBC, we will not be able to respond individually to comments or questions. However, we greatly appreciate your feedback, and we will read and carefully consider all mail that we receive.

Please send product and business questions to:

jdbc-business@wombat.eng.sun.com

Contents

1 Introduction
2 Goals and philosophy
3 Overview of the major interfaces
4 Scenarios for use
5 Security considerations
6 Database connections
7 Passing parameters and receiving results
8 Mapping SQL data types into Java
9 Asynchrony, Threading, and Transactions
10 Cursors
11 SQL Extensions
12 Variants and Extensions
13 JDBC Interface Definitions
14 Dynamic Database Access
Appendix A: Rejected design choices
Appendix B: Example JDBC Programs
Appendix C: Implementation notes
Appendix D: Change History

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix D: Change History

Changes between 0.50 and 0.60:

  • Revised the description of transactions to remove references to the obsolete beginTransaction method (9.3).

  • Fixed various minor spelling errors, miscapitalizations, and inconsistencies in method names, particularly in the DatabaseMetaData interface.

  • Added methods to SQLWarning for managing chains.

  • Specified that metadata methods should throw exceptions rather than returning null ResultSets if you try to retrieve catalog information that isn't available. (See comment at the head of DatabaseMetaData.java).

  • Moved various historical notes from the main text to Appendix A.

  • Added Statement.executeUpdate and modified Statement.execute. Broadly speaking, the execute method is intended for dynamic programming whereas executeQuery and executeUpdate are intended for simple statement execution.

  • Rewrote Section 5.3 to clarify security requirements for JDBC driver implementors.

  • Added DriverManager.println for logging to the JDBC log stream.

  • Removed DriverManager.loadDriver and modified Section 6.6 to advise that you use Class.forName to load drivers (this reflects Java classloader implementation issues.)

  • Clarifications in Section 11 but no interface changes.

  • Removed ParameterMetadata. The contents were a subset of the information returned by DatabaseMetaData.getProcedureColumns and the latter interface is much more complete.

  • Renamed Environment to DriverManager. This name better reflects the final functionality of this class.

  • Stated that JDBC will do space padding for CHAR(n) fields (Section 8.3).

  • Added section 7.4 to describe data truncation rules.

  • Removed ResultSet.getRowNumber. This is easy for application to do themselves.

  • Changed constant values for transaction isolation levels to be the same as ODBC.

  • Removed ResultSet.getRowCount. Several reviewers had expressed concern that this was prohibitively expensive to implement.

  • Removed ResultSet.getColumnCount. This method is unnecessary as there is already a ResultSetMetaData.getColumnCount method and programmers requiring to know the number of columns are also likely to require other column metadata.

  • By popular demand added additional ResultSet methods to retrieve values by column name.

  • Made ResultSet an abstract class (rather than an interface) so we could provide default implementations of the methods that take column names. (Note: we are nervous about the implications of this and are still reviewing this decision.)

  • Added Statement.setCursorName

  • Added Java "doc comment" stylized comments to many of the API descriptions.

Changes between 0.60 and 0.70

  • Added separate ResultSet warning chain (and access methods) in addition to the Statement warning chain.

  • Clarified the behaviour of getAscciStream and getUnicodeStream on ResultSets.

  • Clarified the behaviour of setAsciiStream and setUnicodeStream on PreparedStatements.

  • Stated explicitly that LONGVARCHAR and LONGVARBINARY are not supported for stored procedure OUT parameters (see 7.3.3 and 14.2).

  • Removed getLongVarChar and getLongVarBinary from CallableStatement.

  • Changed ResultSet back to an interface (rather than an abstract class). We now provide an specimen implementation of ResultSet.findColumn as reference material in Appendix C.

  • Replaced ResultSet.isNull with ResultSet.wasNull. We prefer the isNull style, but early JDBC implementors discovered that it was impossible to implement isNull reliably on some databases for some data types. Unfortunately on these databases it is necessary to first attempt a read and then to check if the read returned null.

  • Similarly replaced CallableStatement.isNull with CallableStatement.wasNull.

  • Added Driver.jdbcCompliant to report if driver is fully JDBC COMPLIANT (tm).

  • Added specification of jdbc:odbc sub-protocol URL syntax (6.3.6).

  • Added LIKE escape characters (11.4).

  • Added Driver.acceptURL and DriverManager.getDriver

  • Stated that auto-close only applied to PreparedStatements, CallableStatements, and ResultSets and doesn't affect simple Statements (9.3).

  • Added Driver.getPropertyInfo method and DriverPropertyInfo class to allow generic GUI applications to discover what connection properties a driver expects.

  • Removed the SQLWarning type NullData. The wasNull method can be used to check if null data has been read.

  • Clarified that ResultSet warnings are cleared on each call to "next".

  • Clarified that Statement warnings are cleared each time a statement is (re)executed.

  • Replaced all methods of the format getXXX or setXXX with analogous methods whose names are based on the Java type returned rather than the SQL type. Thus, for example, getTinyInt becomes getByte. See Section 7 and also Appendix A.10. This is a fairly substantial change which we made because of reviewer input that showed widespread confusion over the use of SQL types in the method names, and a widely stated preference for Java type names.

  • Added additional getObject/setObject methods and extra explanatory text (14.2).

  • Added sections to clarify when data conversions are and are not performed (7.1.1, 7.2.1, and 7.3.1).

  • Added extra tables to clarify Java to SQL type mappings (Tables 3 and 5).

Changes between 0.70 and 0.95

  • Changed the default mapping for SQL FLOAT to be Java double or Double (Tables 1, 2, 4).

  • Changed the default mapping for Java float and Float to be SQL REAL (Tables 3, 5).

  • Clarified that network protocol security is not a JDBC issue (Section 5).

  • Renamed SQL Escape section, explaining extensions and clarifying relationship to SQL levels defined by ANSI and Microsoft's ODBC.

  • Added sentence clarifying positioned updates (Section 10).

  • Removed old Section 7.1 "Parameters and results in ODBC" and various other comparisons with ODBC. While this was useful for early reviewers, it's not terribly useful in the finished spec.

  • Clarified that all JDBC compliant drivers must support CallableStatement but need not support the methods relating to OUT parameters (3.2, 12.1).

  • Replaced disableAutoClose with setAutoClose

  • Added Connection.getAutoClose and Connection.getAutoCommit

  • Added Table 6 to document conversions in PreparedStatement.setObject.

  • Removed the versions of ResultSet.getObject and CallableStatement.getObject that took a target SQL type. (We still retain the simpler getObject methods.) These methods were hard to implement and hard to explain and there appeared to be no real demand for them.

  • Added advice on finalizers in Appendix C.2.

Changes between 0.95 and 1.00

  • Clarified that when retrieving ResultSet column values by column name then the first matching column will be returned in cases where there are several columns with the same name.

  • Clarified that if you pass a Java null to one of the PreparedSattement.setXXX methods then this will cause a SQL NULL to be sent to the database.

  • Added an extra column SQL_DATA_TYPE to the DatabaseMetaData.getColumns results.

  • Removed the transaction isolation level TRANSCTION_VERSIONING

  • Noted that if a stored procedure returns both ResultSets and OUT parameters then the ResultSets must be read and processed before the OUT parameters are read (7.3).

  • Noted that for maximum portability the columns of a ResultSet should be retrieved in left-to-right order (7.1).

  • Reworded some of the introduction that was written before we first released the spec.

Changes between 1.00 and 1.01 - all of the changes are clarificationsand errata; no actual changes to the specification have been made. Most of the clarifications only affect the API documentation.

  • Removed getBinary for CHAR types from ResultSet conversion table. These were simply in error.

  • Noted that the precision used for setXXX and setObject is a maximum precision value chosen by the driver.

  • The description of the various SQL identifier case sensitivity and case storage modes were clarified and the JDBC driver requirements were adjusted.

  • Added a note that JDBC java.io.stream.available() may return 0 whether or note data is available. JDBC drivers may not be able to provide an accurate count of available data.

  • Statement.getMoreResults termination conditions were not documented correctly. This was corrected.

  • Noted that Statement.executeUpdate implicitly closes the statement's current result set.

  • The Driver comments were changed to note that a static section should create an instance and register it. This was a documentation error.

  • Fixed parameters for getCrossReference. They were documented in error.

  • Noted that a SQLException should be thrown if the driver does not support a DatabaseMetaData method.

  • Noted that executeQuery never returns a null ResultSet ref

  • Clarified the semantics of auto commit for the case of statements that return results.

  • Removed ColumnName from the getTablePrivileges ResultSet; this was added in error.

  • Noted that CallableStatement ResultSets and update counts should be processed prior to getting output parameter values.

The following changes have been made to JDBC 1.10. All of these changes are minor clarifications or additions. Unfortunately, although the removal of auto close and the java.sql.Numeric name change are minor they are not backward compatible. In particular, the name change requires that drivers must be updated to work with JDBC 1.1.

  • Revised isolation level description

  • Revised getTablePrivileges description to note that a privilege applies to one or more columns of the table.

  • Revised preserve across commit/rollback metadata to specify positive case while allowing negative case result in partial preservation.

  • Added NO ACTION and SET DEFAULT values for getImportedKeys, getExportedKeys and getCrossReference ON DELETE and ON UPDATE

  • Added DEFERRABILITY attribute to getImportedKeys, getExportedKeys and getCrossReference

  • Removed the auto close facility

  • Rename java.sql.Numeric to java.lang.Bignum

  • Note that for maximum portability values less than 256 should not be used for setMaxFieldSize

  • Changed initialization of SQLState to null from "" to agree with initialization of reason.

  • Clarify definition of Date, Time and Timestamp

  • Added private constructor to DriverManager and Types to prevent instantiation.

  • Added millis constructor for Date, Time and Timestamp

  • Clarified default values for the SQLException, SQLWarning, DriverPropertyInfo and DataTruncation constructors.

The following changes were made to JDBC 1.2:

  • The java.lang.Bignum class was replaced by the java.math.BigDecimal class. All Bignum parameters were changed to BigDecimal; all operation names that included the term Bignum were changed to use BigDecimal.

  • The driver property name was incorrect. The correct name is `jdbc.drivers'; it was incorrectly noted as `sql.drivers'.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix B: Example JDBC Programs

B.1 Using SELECT

import java.net.URL;

import java.sql.*;

class Select {

     public static void main(String argv[]) {

        try {

            // Create a URL specifying an ODBC data source name.

            String url = "jdbc:odbc:wombat";

            // Connect to the database at that URL.

            Connection con = DriverManager.getConnection(url, "kgh", "");

            // Execute a SELECT statement

            Statement stmt = con.createStatement();

            ResultSet rs = stmt.executeQuery("SELECT a, b, c, d, key FROM Table1");

            // Step through the result rows.

            System.out.println("Got results:");

            while (rs.next()) {

                // get the values from the current row:

                    int a = rs.getInt(1);

                BigDecimal b = rs.getBigDecimal(2);

                char c[] = rs.getString(3).tocharArray();

                boolean d = rs.getBoolean(4);

                String key = rs.getString(5);

                // Now print out the results:

                System.out.print("  key=" + key);

                System.out.print("  a=" + a);

                System.out.print("  b=" + b);

                System.out.print("  c=");

                for (int i = 0; i < c.length; i++) {

                    System.out.print(c[i]);

                }

                System.out.print("  d=" + d);

                System.out.print("\n");

            }

            stmt.close();

            con.close();

        } catch (java.lang.Exception ex) {

            ex.printStackTrace();

        }

     }

}

B.2 Using UPDATE

// Update a couple of rows in a database.

import java.net.URL;

import java.sql.*;

class Update {

    public static void main(String argv[]) {

        try {

            // Create a URL specifying an ODBC data source name.

            String url = "jdbc:odbc:wombat";

            // Connect to the database at that URL.

            Connection con = DriverManager.getConnection(url, "kgh", "");

            // Create a prepared statement to update the "a" field of a

            // row in the "Table1" table.

            // The prepared statement takes two parameters.

            PreparedStatement stmt = con.prepareStatement(

                        "UPDATE Table1 SET a = ? WHERE key = ?");

            // First use the prepared statement to update

            // the "count" row to 34.

            stmt.setInt(1, 34);

            stmt.setString(2, "count");

            stmt.executeUpdate();

            System.out.println("Updated \"count\" row OK.");

            // Now use the same prepared statement to update the

            // "mirror" field.

            // We rebind parameter 2, but reuse the other parameter.

            stmt.setString(2, "mirror");

            stmt.executeUpdate();

            System.out.println("Updated \"mirror\" row OK.");

            stmt.close();

            con.close();

        } catch (java.lang.Exception ex) {

            ex.printStackTrace();

        }

    }

}

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix C: Implementation notes

C.1 ResultSet lookups by method name

Here is some specimen code that implements the ResultSet.findColumn and (for example) ResultSet.getString using ResultSetMetaData.

private java.util.Hashtable s2c;						// Maps strings to column indexes

private ResultSetMetaData md;						// Our metadata object.

public synchronized int findColumn(String columnName)

                            throws SQLException {

    // Make a mapping cache if we don't already have one.

    if (md == null) {

        md = getMetaData();

        s2c = new java.util.Hashtable();

    }

    // Look for the mapping in our cache.

    Integer x = (Integer)s2c.get(columnName);

    if (x != null) {

        return (x.intValue());

    }

    // OK, we'll have to use metadata.

    for (int i = 1; i < md.getColumnCount(); i++) {

        if (md.getColumnName(i).equalsIgnoreCase(columnName)) {

        // Success!  Add an entry to the cache.

        s2c.put(columnName, new Integer(i));

        return (i);

        }

    }

    throw new SQLException("Column name not found", "S0022");

}

// now the individual get-by-column-name methods are easy:

public String getString(String columnName) throws SQLException {

    return (getString(findColumn(columnName)));

}

C.2 Object finalization

Applets are advised to call "close" on the various JDBC objects such as Statement, ResultSet, Connection, when they are done with them. However, some applets will forget and some applets may get killed before they can close these objects.

If JDBC drivers have state associated with JDBC objects that needs to get explicitly cleared up, then they should take care to provide "finalize" methods. The garbage collector will call these finalize methods when the objects are found to be garbage, and this will give the driver a chance to close (or otherwise clean up) the objects. Note, however, that there is no guarantee that the garbage collector will ever run, so you can't rely on the finalizers being called.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix A: Rejected design choices

A.1 Use Holder types rather than get/set methods.

In earlier drafts of JDBC we used a mechanism of "Holder" types to pass parameters and to obtain results. This mechanism was an attempt to provide a close analogue to the use of pointers to variables in ODBC. However as we tried to write test examples we found the need to create and bind Holder types fairly irksome, particularly when processing simple row results.

We therefore came up with the alternative design using the getXXX and setXXX methods that is described in Sections 7.2 and 7.1. After comparing various example programs we decided that the getXXX/setXXX mechanism seemed to be simpler for programmers to use. It also removed the need to define a dozen or so Holder types as part of the JDBC API. So we decided to use the getXXX/setXXX mechanism and not to use Holders.

A.1.1 Using Holder types to pass parameters

As part of the java.sql API, we define a set of Holder types to hold parameters to SQL statements. There is an abstract base class Holder, and then specific subtypes for different Java types that may be used with SQL. For example, there is a StringHolder to hold a String parameter and a ByteHolder to hold a byte parameter.

To allow parameters to be passed to SQL statements, the java.sql.Statement class allows you to associate Holder objects with particular parameters. When the statement is executed any IN or INOUT parameter values will be read from the corresponding Holder objects, and when the statement completes, then any OUT or INOUT parameters will get written back to the corresponding Holder objects.

An example of IN parameters using Holders:

java.sql.Statement stmt = conn.createStatement();

// We pass two parameters. One varies each time around

// the for loop, the other remains constant.

IntHolder ih = new IntHolder();

stmt.bindParameter(1, ih);

StringHolder sh = new StringHolder();

stmt.bindParameter(2, sh);

sh.value ="Hi"

for (int i = 0; i < 10; i++) {

    ih.value = i;

    stmt.executeUpdate("UPDATE Table2 set a = ? WHERE b = ?");

}
An example of OUT parameters using Holders:

java.sql.Statement stmt = conn.createStatement();

IntHolder ih = new IntHolder();

stmt.bindParameter(1, ih);

StringHolder sh = new StringHolder();

stmt.bindParameter(2, sh);

for (int i = 0; i < 10; i++) {

    stmt.executeUpdate("{CALL testProcedure(?, ?)}");

    byte x = ih.value;

    String s = sh.value;

}

A.1.2 Getting row results using Holder objects

Before executing a statement, we can allow the application programmers to bind Holder objects to particular columns. After the statement has executed, the application program can iterate over the ResultSet using ResultSet.next() to move to successive rows. As the application moves to each row, the Holder objects will be populated with the values in that row. This is similar to the SQLBindColumn mechanism used in ODBC.

Here's a simple example:

// We're going to execute a SQL statement that will return a

// collection of rows, with column 1 as an int, column 2 as

// a String, and column 3 as an array of bytes.

java.sql.Statement stmt = conn.createStatement();

IntHolder ih = new IntHolder();

stmt.bindHolder(1, ih);

StringHolder sh = new StringHolder();

stmt.bindHolder(2, sh);

BytesHolder bh = new BytesHolder();

stmt.bindHolder(3, bh);

ResultSet r = stmt.executeQuery("SELECT a, b, c FROM Table7");

while (r.next()) {

    // print the values for the current row.

    int i = ih.value;

    String s = sh.value;

    byte b[] = bh.value;

    System.out.println("ROW = " + i + " " + s + " " + b[0]);

}

A.2 Design Alternative: Don't use types such as fooHolder, instead use foo[]

At some point in the future we would probably like to add support for some form of column-wise binding, so that a bunch of rows can be read at once. When we were using the Holder design, we considered the following design alternative that would allow for column-wise binding.

Holder objects are capable of holding single instances of various Java types. However an array of a single element could instead be used as a holder. This approach has several disadvantages, but one major advantage.

The first disadvantage is that people may be confused if they read "foo f[] = new foo[1];". The corresponding holder declaration "fooHolder f = new fooHolder();" gives a better clue as to what f is and why we are allocating it.

The second disadvantage is that we would have to replace the single method Statement.bindColumn with a distinct method for each array type. This is because all our Holder types inherit from java.sql.Holder and can therefore be passed as arguments to a generic method that takes a java.sql.Holder argument. (On the other hand at least we avoid defining the dozen or so holder classes.)

The last disadvantage is that using foo[] only gives us the raw Java type information. By defining a specific set of holder types for use with SQL, we can define extra fields and/or semantics, e.g. for the CurrencyHolder type.

The corresponding major advantage is that if we use foo[1] as the container for a parameter then it is very natural to allow foo[x] as a way of binding multiple rows of a table in column- wise binding. This would let us add support for column-wise binding without having to remodel the interface.

If we use arrays instead of Holders, them the bindColumn mechanism makes it easier to scale up to column-wise binding.

A.3 Support for retrieving multiple rows at once

Currently we provide methods for retrieving individual columns within individual rows, a field at a time. We anticipate that drivers will normally prefetch rows in larger chunks so as to reduce the number of interactions with the target database. However, it might also be useful to allow programmers to retrieve data in larger chunks through the JDBC API.

The easiest mechanism to support in Java would probably be to support some form of column- wise binding where a programmer can specify a set of arrays to hold (say) the next 20 values in each of the columns, and then read all 20 rows at once.

However we do not propose to provide such a mechanism in the first version of JDBC. We do recommend that drivers should normally prefetch rows in suitable chunks.

A.4 Columns numbers in ResultSet.get methods

In an earlier version of the JDBC spec, the various "get" methods took no arguments, but merely returned the next column value in left-to-right order. We (re)introduced a column number argument because we were unsatisfied with the readability of the resulting example code. We frequently found ourselves having to count through the various "get" calls in order to match them up with the columns specified in the SELECT statement.

A.5 Method overloading for set methods

In an earlier version of the design we used method overloading so that rather than having methods with different names such as setByte, setBoolean, etc., all these methods were simply called setParameter, and were distinguished only by their different argument types. While this is a legal thing to do in Java, several reviewers commented that it was confusing and was likely to lead to error, particularly in cases where the mapping between SQL types and Java types is ambiguous. On reflection we agreed with them.

A.6 That wretched registerOutParameter method

We dislike the need for a registerOutParameter method. During the development of JDBC we made a determined attempt to avoid it and instead proposed that the drivers should use database metadata to determine the OUT parameter types. However reviewer input convinced us that for performance reasons it was more appropriate to require the use of registerOutParameter to specify OUT parameter types.

A.7 Support for large OUT parameters.

We don't currently support very large OUT parameters. If we were to provide a mechanism for very large OUT parameters, it would probably consist of allowing programmers to register java.io.OutputStreams into which the JDBC runtimes could send the OUT parameter's data when the statement executes. However, this seems to be harder to explain than it is worth, given that there is a already a mechanism for handling large results as part of ResultSet.

A.8 Support for GetObject versus getXXX

Because of the overlap between the various get/set methods and the generic getObject/setObject methods we looked at discarding our get/set methods and simply using getObject/setObject. However for the simple common cases where a programmer know the SQL types, the resulting casts and extracts are extremely tedious:

int i = ((Integer)r.getObject(1, java.sql.Types.INTEGER)).intValue()

We therefore decided to bend our minimalist principles a little in this case and retain the various get/set methods as the preferred interface for the majority of applications programmers, while also adding the getObject/setObject methods for tool builders and sophisticated applications

A.9 isNull versus wasNull

We had some difficulty in determining a good way of handling SQL NULLs. However by JDBC 0.50 we had designed a ResultSet.isNull method that seemed fairly pleasant to use. The isNull method could be called on any column to check for NULL before (or after) reading the column.

if (!ResultSet(isNull(3)) {

    count += ResultSet.getInt(3);

}
Unfortunately, harsh reality intervened and it emerged that "isNull" could not be implemented reliably on all databases. Some databases have no separate means for determining if a column is null other than reading the column and they would only permit a given column to be read once. We looked at reading the column value and "remembering" it for later use, but this caused problems when data conversions were required.

After examining a number of different solutions we reluctantly decided to replace the isNull method with the wasNull method. The wasNull method merely reports whether the last value read from the given ResultSet (or CallableStatement) was SQL NULL.

A.10 Use of Java type names v SQL type names.

In an earlier version of the spec we used getXXX and setXXX method for retrieving results and accessing parameters, where the XXX was a SQL type name. In revision 0.70 of JDBC we changed to use getXXX and setXXX methods where the XXX was a Java type name.

Thus for example, getChar was replaced by getString and setSmallInt by setShort.

The new methods have essentially the same semantics as the methods that they replace. However the use of Java type names makes the meaning of each of the methods clearer to Java programmers.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix B: Additional Suggestions

This section contains a list of some of the suggested additions that we received that have not been added to the JDBC API. They are listed simply as a record of some of the things that have been left out. We welcome input concerning the items listed here.

B.1 Other Suggestions for v0.1

Processing Results - Add a way to determine the value of an auto-incremented key after an insert is done.

Enhanced Meta-Data - Add meta-data for prepared statement parameters and for prepared statement result set. The JDBC API does not provide metadata describing a prepared statements parameters; and, it does not provide metadata describing its results without executing the statement (equivalent to SQL92 DESCRIBE OUTPUT and ODBC SQLDescribeParam.

New Data Types - Add the SQL time interval data type

Security - Allow the application to choose underlying transport properties, e.g., SSL. Provide SSL Socket implementation. A JDBC technology based application must be able to select driver-supported mechanisms for securing the wirelevel protocol (e.g., encryption). Relative to SSL, one option is to allow the application to specify a specific Cyphersuite (key-exchange algorithm, bulk-encryption, MAC [message authentication algorithm])

Security-Authentication - Allow an application to select driver-supported mechanisms for performing authentication. The following mechanisms should be supported: Username, password; Kerberos token; Digital Certificates

Command Complete event - Support a user provided event object that is fired when a Command completes (both current command and regular command, sync or async). - - Various events: Connect Event; Disconnect Event; Before Connect Event

Cursor Implementation Location - Support client-side vs server-side.

Parameter Management - Support: Append, GetCount, GetItem (by name/position), Delete and Refresh.

Hybrid SQL/Java programming language Integration - Provide a mechanism for defining Java classess and provide a hybrid SQL/Java query mechanism over Tables whose columns may be SQL atomics or Java classes.

Specialty Data Types - Provide extensions for OLAP, Spatial, TimeSeries and other Specialty Data Types.

Serializing data, time, timestamps - Allow these types to be serializable.

Async Requests - Allow the caller to request that a Statement execute asynchronously.

Java classes - Introduce the notion of a SQL specialization of Java classes/beans that introduces SQL99 concepts useful for dealing with Java objects in the context of databases and business applications. For example, it is useful for a database system to understand which method(s) definitions in a Class may be used to perform operations on objects such as comparisons, etc. One approach would be to introduce "generic" method names. Those could also be used outside of the database by regular Business Applications.

Add support for SQL PSM.

Add additional SQL language functionality e.g. various forms of join.

Add *levels* of JDBC compatibility, as opposed to individual API calls to see if individual features are supported by a drvier.

Add an API call that describes the format of the URL understood by a driver.

Add a row object that encapsulates database data in its native format.

Add immutability for Date, Time, Timestamp.

B.2 Additional suggestions for v0.7

  • It was suggested that as an alternative to providing individual methods for each new property on the Statement interface such as result set type, concurrency type, etc., we could introduce a new Class, ResultSetProperties, that itself contained all methods for getting and setting these properties. Statement would then just contain two new methods for getting and setting a ResultSetProperties property. This approach would help to simplify the Statement interface.

  • Add a new CursorResultSet interface which extends ResultSet and adds method CursorStatement prepareUpdate() throws SQLException; OR add the prepareUpdate method to the existing ResultSet interface - and define that it may fail if there is no cursor associated with it. Add a new CursorStatement interface which extends PreparedStatement and adds the methods: void update() throws SQLException and void delete() throws SQLException. It would be helpful to introduce another intermediate CursorResultSet which would sit in the interitance hierarchy between ResultSet and ScrollableResultSet. The motivation for the CursorStatement is to avoid the need to parse every query to look for cursor operations. The reason to have CursorStatement extend PreparedStatement is to get access to the setXXX methods. The setXXX() methods would be used to provide new values to the corresponding columns of the current row in the CursorResultSet. The executeUpdate() method would perform the actual update (with the parameter values that had been set) or delete (parameter values are ignored). The execute() and executeQuery() methods would be overridden so that they always throw SQLException. Additionally, the CursorStatement would be "bound" to the CursorResultSet which created it such that whenever that CursorResultSet was repositioned (next, relative, absolute, first, last, etc.) that the CursorStatement would automatically track this and update/delete methods affect the right row. ** It is tempting to do away with the CursorStatement and just add that functionality to the CursorResultSet because these things are likely to be in 1:1 relationship.

  • Add to the Statement interface: void setCursorProperties(CursorProperties props) throws SQLException; Define a new java.sql.CursorProperties class. I like the idea of adding statement properties so that appropriate subclasses of ResultSet are returned when the statement is executed. But, rather than adding a bunch of individual accessors/mutators for all these properties to Statement, I would recommend defining a CursorProperties class with public members and then add just a single new method to Statement: void setCursorProperties(CursorProperties props) throws SQLException; This would remove the need for the new Statement.setFetchSize and getFetchSize methods for example. CursorProperties would have a public constructor which returns a CursorProperties object with well defined default values (TBD). Members of this class would include: 0. boolean useCursors - if true the statement should return a CursorResultSet from executeQuery. 1. String cursorName - Statement.setCursorName() would be depricated. 2. boolean scrollable - if true the statement should return a ScrollableResultSet from execute query. 3. boolean readonly - if true this cursor is READONLY. 4. int rowCacheSize - hint to driver on how many rows to retrieve from the database at a time. 5. boolean closeOnEndTransaction - in ANSI SQL '92 cursors are automatically closed on commit/rollback, but many databases allow cursors to remain open for efficiency 6. String[] updatableColumns - list of columns which in SQL '92 grammar would be in the "FOR UPDATE OF <column list>" clause. 7. boolean sensitive - if true committed changes to the underlying tables which happened while the cursor was open may be seen by the application as it scrolls over those rows.

  • The result of any SQL query can be thought of as defining a simple structured type. The fields of the structured type correspond to the columns of the query result, and each row in the result set returned by the query represents an instance of the type. The JDBC API could allow a mapping from a type that is defined implicitly by an SQL query to a Java class, or even a bi-directional mapping between regular relational tables and Java classes.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix C: Change History

C.1 Changes between 0.10 and 0.70:

  • Removed references to the java.sql2 package. Substituted a proposal that splits the JDBC API into two packages: javax.sql and java.sql.

  • Removed descriptions of the classes and intefaces in javax.sql. We plan to add them in again later, or create a separate document for the extended JDBC API.

  • Removed the ScrollableResultSet interface and associated methods on other interfaces. Added methods for scrolling to the ResultSet interface

  • Added result set type, concurrency type, keyset size, fetch size, and fetch direction properties to Connection, Statement, and ResultSet interfaces.

  • Deprecated Statement.setCursorName and ResultSet.getCursorName. Use of "SELECT FOR UPDATE" is also deprecated. The new result set update methods can be used instead.

  • Added SQL99 APIs.

  • Added new metadata for persistent Java objects.

C.2 Changes between 0.70 and 0.80

  • The Struct interface no longer extends the SQLData interface.

  • All occurrences of the SQLType interface have been removed and replaced with 'String'.

  • The Array.getArray() method now returns Object instead of Object[]. This allows an int[] array to be returned, for example.

  • The specification now states that a Java programming language array may be passed as an input parameter via PreparedStatement.setObject().

  • The semantics of ResultSet.isDeleted(), etc. is clarified.

  • The DatabaseMetaData.getClass() method has been dropped due to the difficulties involved in loading classes directly from a database.

  • The ResultSet.getBigDecimal() and CallableStatement.getBigDecimal() methods which take an `int scale' parameter have been deprecated.

  • Statement.getResultSetType() now throws SQLException

  • Added method Array.getBaseTypeName(). Array.getBaseType() now returns an int type code.

  • DatabaseMetaData.getUDTs() now allows a fully qualified SQL name which may contain wildcard characters in the typeNamePattern parameter.

C.3 Changes between 0.80 and 0.90

  • Section 9.4: Compiled code examples and removed syntax errors.

  • Section 9.4.2: Added note on the independence of the Java programming language and SQL99 inheritance hierarchies.

  • Section 6.1: Removed the requirement that indirect updates, such as those performed by a trigger that is fired, be included in the update counts returned by a batch update.

  • Section 5.6: Clarified some technical details concerning inserting new rows in a result set.

  • Section 7.3.1: Noted that the TYPE_NAME returned by getTypeInfo() may contain a vendor specific type name when the type code is JAVA_ODBECT. Previously, the TYPE_NAME had to be null.

  • Removed method SQLInput.readStruct() and SQLOutput.writeStruct(). Read/ writeObject() should be used instead.

  • Chapter 5: Revised and simplified the scrollable result set model.

  • Section 11.3: Added note on character conversion.

  • Section 10.3: Added description of time zone support.

C.4 Changes between 0.90 and 0.91

  • Section 5.5: Added rules for selecting a supported result set type and concurrency type.

  • Section 5.6: Added method ResultSet.cancelRowUpdates.

  • Section 5.6: Added more description on the semantics of the update methods.

  • Added Section 5.9.

C.5 Changes between 0.91 and 0.95

  • Section 5.6: Added general description of the queries that yield updatable result sets.

  • Section 8.2: Clarified rules for passing blob and clob values as input parameters.

  • Sections 11.4 and 11.5: Added these sections to the document.

C.6 Changes between 0.95 and 1.0

  • no changes

C.7 Changes between 1.0 and 1.1

  • Chapter 6: Extended the semantics of executeBatch. Batch processing is now allowed to continue after an element in a batch has failed to execute successfully.

  • Added Section 10.6.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next

JDBCTM 2.1 API

Seth White and Mark Hapner
Novermber 30, 1999 2:25pm

The JDBCTM API is the JavaTM platform standard call-level API for database access. This document contains the final specification of the core JDBC 2.1 API.

1 Introduction
2 Goals
3 Overview of New Features
4 What's Actually Changed
5 Result Set Enhancements
6 Batch Updates
7 Persistence for Java Objects
8 New SQL Types
9 Customizing SQL Types
10 Other New Features and Changes
11 Clarifications
Appendix A: Rejected Design Choices
Appendix B: Additional Suggestions
Appendix C: Change History
Appendix D: Motivation for the SQL99 Proposal

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix D: Motivation for the SQL99 Proposal

The following observations and requirements have shaped this proposal:

  • A Java technology program will retrieve a value of an SQL type as a single Java programming language data item. For example, an instance of a structured SQL type can be materialized as a single object, by a single method call (e.g., to method getObject()).

  • A Java program will retrieve an SQL value as a "strongly typed" Java object. For example, a structured type instance will be materialized as an object of a class with fields or methods that correspond to the attributes of that particular structured type, and that allow the program to access the attributes of the structured type.

  • A client-side Java program can retrieve values of user-defined SQL types from a database that is "unaware" of Java technology. No Java programming language support is required in that database. For example, no special definitions must be made in the database to allow structured type data to be retrieved by Java programs.

  • In particular, structured type values are retrieved into Java programs by means of SELECT statements; are posted to the database by INSERT and UPDATE statements; and so on.

  • The SQL methods of a structured type execute in the server, and are not relevant to the issue of retrieving structured type data from SQL into Java programs.

  • Definitions of user-defined SQL types are visible in SQL catalog tables. Similarly, definitions of Java classes are programmatically available thru the reflection API. Therefore, tools that generate Java class definitions for SQL data, or vice versa, can be written by database tools vendors, independent of any particular relational database vendor. Our mappings of SQL types to Java classes must permit third-parties to write such tools.

  • We assume that the mappings between SQL user-defined types any Java classes will usually be generated by tools. It is not necessary to design the mappings so that human programmers can easily write them "by hand".

  • There is no reason to define exactly one mapping of an SQL type to a class as the only "correct" mapping. Mapping tools may define different Java classes, corresponding to a given SQL user-defined type, to serve different application domains or execution environments. Such different classes may have different type mappings for the primitive attributes, or auxilliary fields that are relevant to a particular application. Our mappings of SQL user-defined types to Java classes should allow such variations.

  • We want to support Java programs that fetch data of SQL user-defined types in a "dynamic SQL" style, without "knowing" in advance the number and kinds of attributes of those data.

  • An SQL structured type may contain an attribute of a REF(structured-type) type that references a row containing another structured type instance. Despite a superficial similarity, that SQL REF is not analogous to a field containing another lightweight Java object. An SQL REF is a key value that designates a row of a table; it does not designate an object in transient memory.

  • Users will often want a 1-1 mapping between SQL types and Java classes. Java class-to-SQL mapping tools will generate a class for each distinct type, for each structured type, for each REF(structured-type), for each array type, for each Locator type, and so on.

  • We want to allow flexibility in the mappings of SQL types to Java classes, so that tools builders, and implementers of domain-specific "application service layers" can add value by customizing the Java classes that implement SQL types. In particular, the mapping of leaf SQL attributes and elements to fields and variables permits all conversions that the JDBC API currently permits. SQL names may be mapped to Java programming language names in arbitrary ways. An SQL value may be represented by one Java object, or by a graph of objects.

Contents  | Prev  | Next

jdbc@eng.sun.com
or
jdbc-business@eng.sun.com

Copyright © 1996-1999 Sun Microsystems, Inc.   All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

Appendix A: Rejected Design Choices

A.1 Design Alternative: Create new subtypes of the existing java.sql types.

We have chosen to add new methods to existing interfaces and classes in order to add new functionality to the JDBC API.

An alternative design, which we considered, was instead to extend the existing java.sql types with new subtypes that contained any new methods. This approach was judged to be too unwieldy. For example, since we needed to add methods to the java.sql.Statement interface, such as Statement.setFetchSize(), it would have been necessary to create three new statement interfaces related to the old interfaces in a fairly complex inheritance hierarchy (see below). This approach seemed to add too much complexity to the JDBC API.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Outline of the JNDI API

Java

Outline of the Java Naming and Directory Interface TM (JNDI)
The JNDI consists of these packages:
  • javax.naming
      Contains classes and interfaces for accessing naming services.

  • javax.naming.directory
      Extends the core javax.naming package to provide functionality for accessing directories in addition to naming services.

  • javax.naming.event
      Contains classes and interfaces for supporting event notification in naming and directory services.

  • javax.naming.ldap
      Contains classes and interfaces for supporting LDAPv3 extended operations and controls.

  • javax.naming.spi
      Contains the classes and interfaces that allow various naming and directory service providers to be dynamically plugged in beneath the JNDI.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jndi@java.sun.com 		Sun
Java Software


Guidelines for LDAP Service Providers

JNDI Implementor Guidelines for LDAP Service Providers

Draft 0.3

Please send feedback to jndi@java.sun.com

Table of Contents
1. Introduction
2. Conformance
3. Environment Properties
4. Names
5. Attributes
6. URLs
7. Java Objects
8. Schema
9. Exceptions
10. API Mapping
11. Federation
12. SASL
13. Extensions and Controls
14. Event Notification
15. SSL

1. Introduction

This document specifies guidelines that developers creating LDAP service providers and service providers that support LDAP-like features should follow. By following these guidelines, developers can produce implementations that JNDI API users can configure and use with minimal differences.

Not all of the features described in this document must be supported by an LDAP service provider. However, if a feature is supported, it should be supported in the way described by this document.

2. Conformance

An LDAP service provider that supports LDAP version 3 (LDAPv3) conforms to:
  • RFC 2251 and related specifications.
An LDAP service provider that supports LDAP version 2 (LDAPv2) conforms to:
  • RFC 1777 and related specifications.

3. Environment Properties

Environment properties are the means by which JNDI application users configure and affect the behavior of JNDI service providers. Consequently, service providers must interpret and handle environment properties in the same way.

There are four types of environment properties that affect LDAP service providers:

  • Standard JNDI environment properties
  • LDAP-specific environment properties
  • Provider-specific environment properties
  • Feature-specific environment properties

3.1 Overview

3.1.1 Initialization

When creating an initial context, environment properties can be passed as an argument to the constructor or may be initialized as specified in the JNDI documentation.

In particular, if any of the following properties is not supplied in the environment properties then it is sought from the system properties, applet parameters, and both provider and application resource files (in that order):

  • java.naming.factory.control
  • java.naming.factory.initial
  • java.naming.factory.object
  • java.naming.factory.state
  • java.naming.provider.url
In the case of the control, object and state factory properties, if more than one occurrence of the property is located, then its values are concatenated into a single list. In the case of the url property and all other properties, only the first occurrence is used.

A context's environment properties can be examined using the Context.getEnvironment method.

3.1.2 Modification

A context's environment properties may be changed using the Context.addToEnvironment and Context.removeFromEnvironment methods.

3.1.3 Scope

With the exception of the java.naming.provider.url and java.naming.factory.initial properties, changing a property using the Context.addToEnvironment or Context.removeFromEnvironment methods affects the context instance on which the method is invoked. For example, if you specify new credentials for a context to use, subsequent methods invoked on that context that require communication with the server will use those new credentials (perhaps internally by first creating a new connection to the server). These updated environment properties are inherited by context instances that are subsequently derived from the affected context instance, but do not otherwise affect other context instances that were in existence prior to the update.

3.1.4 Timeliness

When a change is made to the environment properties, there is no requirement that the change be verified and acted upon at the time the Context.addToEnvironment or Context.removeFromEnvironment method is invoked. The only requirement is that the change (or changes) be effective the next time an operation that uses that property is invoked.

3.1.5 Defaults

This specification defines defaults for the environment properties. In a few cases, the default is determined by the service provider. If a context does not have a particular environment property, it behaves as if it has that environment property with its default value.

When a property is removed from the environment properties of a context, the context assumes the default behavior specified for that property. This does not necessarily mean that the default value must be recorded as the property's value. The removal may also be indicated by the absence of the property from the context's environment properties.

3.1.6 Acceptable Values

This specification defines acceptable values for the environment properties. Some environment properties have a fixed set of acceptable values while others have values that must follow a particular syntax. If an unacceptable value is presented, a property-specific exception will be thrown (for example, ConfigurationException, IllegalArgumentException, or AuthenticationNotSupportedException). In some cases, it might be reasonable for the service provider to accept additional values than those specified, in which case, those values should be documented.

3.2 JNDI Properties

LDAP service providers should process the JNDI environment properties according to the following specifications. In the examples given, env is an instance of Hashtable that holds the environment properties used to create an initial context.

java.naming.batchsize
The value of this property is a string of decimal digits that specifies the batch size of search results returned by the server.

This property affects the blocking behaviour of the Context.list, Context.listBindings, and DirContext.search methods and the NamingEnumeration objects that they return. It does not affect how many items are returned in the enumeration; it only affects how the items are batched or read at the LDAP protocol level.

A setting of zero means that the provider should block until all results have been received. A setting of an integer n greater than zero means that the provider should block until n results have been received from the server or until the enumeration terminates, whichever produces the fewer number of results. After the application has read n results (using NamingEnumeration.next or NamingEnumeration.nextElement), the provider should read n more results from the server or until the enumeration terminates, whichever produces the fewer number of results.

If this property is not set then its default value is implementation-specific.

For example,

env.put(Context.BATCHSIZE, "24");
specifies that the provider should block until 24 entries have been read from the server or until the enumeration terminates, whichever produces the fewer number of results.
java.naming.factory.control
The value of this property is a colon-separated list of fully qualified class names of control factory classes.

The factories are responsible for narrowing the class of response controls. They create specific response controls from the generic response controls generated by the provider.

No default value is defined for this property.

For example,

env.put(LdapContext.CONTROL_FACTORIES,
        "com.sun.jndi.ldap.ctl.ResponseControlFactory");
sets the ResponseControlFactory class as the control factory to try.
java.naming.factory.initial
The value of this property is the fully qualified class name of the factory class which creates the initial context for the LDAP service provider.

It is used to select a particular LDAP service provider; it's not actually used by the provider itself. This property need not be set when the name argument to initial context methods is a URL.

No default value is defined for this property.

For example,

env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.ldap.LdapCtxFactory");
selects Sun's LDAP provider.
java.naming.factory.object
The value of this property is a colon-separated list of fully qualified class names of object factory classes.

The factories are responsible for creating specific objects from the LDAP entries returned by the provider. For example, a Person object factory might generate a Person object from an LDAP entry of object class person. Object factories behave in the opposite way to state factories in that they generate objects from LDAP attributes.

No default value is defined for this property.

For example,

env.put(Context.OBJECT_FACTORIES,
        "com.sun.jndi.ldap.obj.PersonFromLDAP");
sets the PersonFromLDAP class as the object factory to try.
java.naming.factory.state
The value of this property is a colon-separated list of fully qualified class names of state factory classes.

The factories are responsible for creating an object's state (for storing) from the object itself. For example, a Person state factory might generate an LDAP entry of object class person from a Person object. State factories behave in the opposite way to object factories in that they generate LDAP attributes from objects.

No default value is defined for this property.

For example,

env.put(Context.STATE_FACTORIES,
        "com.sun.jndi.ldap.obj.PersonToLDAP");
sets the PersonToLDAP class as the state factory to try.
java.naming.language
The value of this property is a string language tag according to RFC 1766.
This property indicates a preference for a particular natural language. A provider may adjust its LDAP requests and responses according to the value of this property.

The affect of this property is implementation-specific. No default value is defined.

For example:

env.put(Context.LANGUAGE, "ja-JP");
indicates a preference for Japanese.
java.naming.provider.url
The value of this property is a URL string that specifies the hostname and port number of the LDAP server, and the root distinguished name of the naming context to use.

See LDAP URL for information on how to treat other information found in the URL.

The default hostname is localhost; the default port is 389. The default root distinguished name is the empty string. If this property is not set, or if either the hostname or port number is omitted, then the default values are used in place of the missing information.

For example:

env.put(Context.PROVIDER_URL, "ldap://secserver:636");
specifies that the LDAP server is running on a host named secserver at port 636.

NOTE: Changing this property using the Context.addToEnvironment or Context.removeFromEnvironment methods does not affect the context. It is only used by the initial context constructors.

java.naming.referral
The value of this property is a string that specifies how referrals shall be handled by the provider. The following values are defined for this property:
follow
automatically follow any referrals.
throw
throw a ReferralException for each referral.
ignore
ignore referrals if they appear in results. A PartialResultException is thrown to indicate an incomplete result. In addition, for LDAPv3 servers, the provider shall request that referrals be treated as ordinary attributes when they appear in entries. This is achieved by sending a non-critical ManageDsaIT (draft-ietf-ldapext-namedref-00.txt) LDAP control with each LDAP request. LDAP servers which do not support this LDAP control will simply ignore it and process the request as normal.

See LDAP URL for information on how to treat multiple URLs found in a single referral entry.

If this property is not set then its default value is ignore.

For example:

env.put(Context.REFERRAL, "throw");
specifies that referrals encountered during an LDAP operation should throw a ReferralException to the application.
java.naming.security.authentication
The value of this property is a string that specifies the authentication mechanism(s) for the provider to use. The following values are defined for this property:
none
use no authentication (anonymous bind).
simple
use simple authentication (a cleartext password).
A space-separated list of one or more SASL mechanism names:
use the first available SASL mechanism in the list that conforms to the specified policy requirements

See the SASL section for information on how this property is used for SASL authentication. See RFC 2829 for information on LDAP authentication mechanisms.

If this property is not set then its default value is none, unless the java.naming.security.credentials property is set, in which case the default value is simple. If this property is set to a value that the provider does not recognize or support, it should throw AuthenticationNotSupportedException.

For example:

env.put(Context.SECURITY_AUTHENTICATION, "simple");
specifies that simple authentication be used to authenticate to the LDAP server. Or,
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5");
specifies that DIGEST-MD5 authentication be used and, if that SASL mechanism is unavailable, that CRAM-MD5 authentication be used. If neither is available then throw AuthenticationNotSupportedException.
java.naming.security.credentials
The value of this property is an object that specifies the credentials of the principal to be authenticated. Its format and handling depends on the value of the java.naming.security.authentication property.

For anonymous binds, this property is ignored - an empty string is always used for the credentials. For simple authentication and SASL authentication that requires a password, the value of this property may be supplied as a java.lang.String, a char[] or a byte[]. If it is a String or a char[] then it is encoded into a byte array using UTF-8 in the case of LDAPv3 and encoded using ISO-Latin-1 in the case of LDAPv2. If it is a byte[] then it is used as is.

See the SASL section for information on how this property is used for SASL authentication.

No default value is defined for this property.

For example:

env.put(Context.SECURITY_CREDENTIALS, "secret");
sets the credentials to be the string "secret".
java.naming.security.principal
The value of this property is a string that specifies the identity of the principal to be authenticated. Its format depends on the authentication type; see RFC 2829 for more information. The value is used as the name component in an LDAP ASN.1 BindRequest for non-SASL authentication. For SASL authentication, the value of this property is used as the authentication ID for SASL mechanisms that need an authentication ID.

The provider is not required to verify the validity of the principal name. It may, for example, just pass the string to be verified by the server. If the principal identified is not a valid principal then the provider shall throw an AuthenticationException.

No default value is defined for this property.

For example:

env.put(Context.SECURITY_PRINCIPAL, "cn=admin,o=sun,c=us");
sets the principal name to be the distinguished name "cn=admin, o=sun, c=us".
java.naming.security.protocol
The value of this property is a string that specifies the security protocol for the provider to use. The following value is defined for this property:
ssl
use Secure Sockets Layer version 3.0.

If this property is set to ssl, the provider must use SSL sockets, or throw ConfigurationException if it is unable to do so. In addition to the value listed above, a provider may support other security protocols. However, such provider-specific protocols might not be supported by all providers. If this property is set to a security protocol that the provider does not recognize or support, it should throw ConfigurationException.

If the java.naming.ldap.factory.socket property is set, then the socket factory identified by that property must create sockets that are appropriate for this protocol setting. For example, if the security protocol is set to ssl, then the socket factory must create SSL-compliant sockets.

If this property is not set then the default is to use no security protocol.

As a developer of the LDAP provider, you should be aware that using SSL to connect to a server on a port that is not listening for SSL connections causes the socket to hang. Similarly, using a plain socket to connect to a server that is listening for SSL connections also leads to hanging. This is a characteristic of the protocol that some implementations may choose to correct but is not otherwise required to do so. The provider's documentation, however, should describe this behavior to its users. See SSL for information on how to use SSL.

For example:

env.put(Context.SECURITY_PROTOCOL, "ssl");
specifies that SSL-compliant sockets be used to communicate with the server.

3.3 LDAP-specific Properties

LDAP-specific properties are environment properties that apply to LDAP service providers in general. These properties' names have the prefix "java.naming.ldap.". The following table lists LDAP-specific properties that have been defined so far. If there is a property that you feel belongs on this list, please send a description of it to jndi@java.sun.com.

java.naming.ldap.attributes.binary
The value of this property is a string of space-separated attribute names. It specifies attributes which have non-string syntax. It extends the provider's built-in list of non-string attributes (below). The value of an attribute that has non-string syntax is returned as a byte array (byte[]) instead of a String.

No default is defined. If this property is not set then only the following attributes are considered to have non-string syntax:

Attribute ID | OID | Reference
Any attribute ID with the ";binary" option. |  |
photo | 0.9.2342.19200300.100.1.7 | RFC 1274
personalSignature | 0.9.2342.19200300.100.1.53 | RFC 1274
audio | 0.9.2342.19200300.100.1.55 | RFC 1274
jpegPhoto | 0.9.2342.19200300.100.1.60 | RFC 2798
javaSerializedData | 1.3.6.1.4.1.42.2.27.4.1.7 | RFC 2713
thumbnailPhoto | 2.16.128.113533.1.1400.1 | NAC LIP Schema
thumbnailLogo | 2.16.128.113533.1.1400.2 | NAC LIP Schema
userPassword | 2.5.4.35 | RFC 2256
userCertificate | 2.5.4.36 | RFC 2256
cACertificate | 2.5.4.37 | RFC 2256
authorityRevocationList | 2.5.4.38 | RFC 2256
certificateRevocationList | 2.5.4.39 | RFC 2256
crossCertificatePair | 2.5.4.40 | RFC 2256
x500UniqueIdentifier | 2.5.4.45 | RFC 2256

For example:
env.put("java.naming.ldap.attributes.binary",
        "mpegVideo myspecialkey");
informs the provider to return values of the mpegVideo and myspecialkey attributes as byte[].

java.naming.ldap.control.connect

The value of this property is a Control[] object. It sets the connection request controls that are active on a connection. See LdapContext.

No default value is defined for this property.

For example:

env.put("java.naming.ldap.control.connect",
        new Control[]{ new ManageReferralControl(true) });
sets a critical ManageDsaIT LDAP control as the connection request control.

java.naming.ldap.deleteRDN

The value of this property is a string that specifies whether the old RDN is removed by the Context.rename method. The following values are defined for this property:
true
delete the old RDN from the entry during the rename operation.
false
retain the old RDN as an attribute value of the entry.

If this property is not set then its default value is true.

For example:

env.put("java.naming.ldap.deleteRDN", "false");
causes the old RDN to be retained as an attribute of the renamed entry.

java.naming.ldap.derefAliases
The value of this property is a string that specifies how aliases are dereferenced during search operations. The following values are defined for this property:
always
always dereference aliases.
never
never dereference aliases.
finding
dereference aliases only during name resolution (that is, while locating the target entry).
searching
dereference aliases once name resolution has completed (that is, after locating the target entry).
If this property is not set then its default value is always.

For example:

env.put("java.naming.ldap.derefAliases", "searching");
causes the provider to dereference aliases only once the target entry has been located.

NOTE: this property is unrelated to the dereference-links flag in the SearchControls object.

java.naming.ldap.factory.socket
The value of this property is a string identifying the class name of a socket factory.

This property is used to override the default socket factory. The class specified in this property must implement the javax.net.SocketFactory interface. See http://java.sun.com/products/jsse/doc/guide/API_users_guide.html for more information. See SSL for information on how to use SSL.

In addition, if the java.naming.security.protocol property is set, then the socket factory identified by this property must create sockets which are appropriate for that protocol setting. For example, if the security protocol is set to ssl then the socket factory must create SSL-compliant sockets.

No default is defined for this property.

For example:

env.put("java.naming.ldap.factory.socket",
        "javax.net.ssl.SSLSocketFactory");
sets the socket factory of the provider to be javax.net.ssl.SSLSocketFactory.

java.naming.ldap.ref.separator
The value of this property is a string containing the character to use when encoding a RefAddr object in the javaReferenceAddress attribute (see Java Objects).

This property is used to avoid a conflict in the case where the default separator character appears in the components of a RefAddr object.

If this property is not set then its default value is '#' (the hash character).

For example:

env.put("java.naming.ldap.ref.separator", ":");
specifies that the separator ':' (the colon character) be used when storing RefAddr instances.

java.naming.ldap.referral.limit
The value of this property is a string of decimal digits specifying the maximum number of referrals to follow in a chain of referrals. A setting of zero indicates that there is no limit.

If this property is not set then the default value is 10.

For example:

env.put("java.naming.ldap.referral.limit", "5");
specifies that the referral limit is 5.

java.naming.ldap.typesOnly
The value of this property is a string that specifies whether only attribute IDs are returned in results - attribute values are omitted. Affects the SearchResult.getAttributes and DirContext.getAttributes methods. The following values are defined for this property:
true
return only attribute IDs.
false
return both attribute IDs and attribute values.

If this property is not set then its default value is false.

For example:

env.put("java.naming.ldap.typesOnly", "true");
causes the server to return attribute IDs but not attribute values.

java.naming.ldap.version
The value of this property is a string that specifies the protocol version for the provider. The following values are defined for this property:
2
selects LDAP version 2 (LDAPv2).
3
selects LDAP version 3 (LDAPv3).

If this property is not set then the provider first attempts to bind using LDAP v3 and fails over to using LDAP v2 if a protocol error is received from the server. This failover mechanism is only used when the java.naming.security.authentication property indicates anonymous bind or simple authentication.

For example:

env.put("java.naming.ldap.version", "2");
requests the LDAP provider to communicate with the server using LDAPv2.

3.4 Feature-specific Properties

Feature-specific properties are environment properties which apply to a particular feature which is supported by a provider.

3.4.1 SASL Properties

There are two groups of SASL properties. The first group comprises those that relate to how the JNDI service provider interacts with the Java SASL API. These properties have the prefix "java.naming.security.sasl." The second group comprises those that affect the SASL mechanisms. These properties are specified in the Java SASL API (draft-weltman-java-sasl-05.txt) and have the prefix "javax.security.sasl." See the SASL section and the Java SASL API for details about this second group of properties.

java.naming.security.sasl.authorizationId

The value of this property is a string that specifies the authorization ID for the SASL mechanisms.

If this property is not set, then the authorization ID passed to the SASL mechanisms is the empty string. According to SASL (RFC 2222), using an authorization ID of the empty string directs the server to derive an authorization ID from the client's authentication credentials.

For example:

env.put("java.naming.security.sasl.authorizationId",
        "dn:cn=administrators,ou=groups,o=sun,c=us");
specifies the identity to use for authorization (access control) upon successful authentication.

java.naming.security.sasl.realm

The value of this property is a string that specifies the realm information required by some SASL mechanisms such as DIGEST-MD5.

If this property is not set, then a mechanism-specific default such as that negotiated between the client and server during the authentication exchange is used.

For example:

env.put("java.naming.security.sasl.realm", "webusers");
specifies that the client wants to use the "webusers" realm for authentication.

java.naming.security.sasl.callback

The value of this property is an instance of javax.security.auth.callback.CallbackHandler. When the provider uses a SASL mechanism that requires callbacks, the SASL mechanism uses the object supplied in the property. The callback handler should satisfy a NameCallback by supplying the authentication ID.

If this property is not set, then the provider should use a default callback handler that satisfies the NameCallback using the value of the java.naming.security.principal property, satisfies the PasswordCallback using the value of the java.naming.security.credentials property, and satisfies the RealmCallback and RealmChoiceCallback (described in the Java SASL API) using the value of the java.naming.security.sasl.realm property.

For example:

env.put("java.naming.security.sasl.callback",
        new MyCallbackHandler());
supplies an instance of the callback handler for SASL mechanisms to use.

javax.security.sasl.client.pkgs
The value of this property is a '|'-separated list of package names used to locate factories that produce SASL mechanism drivers.

javax.security.sasl.qop
The value of this property is a ','-separated list of quality-of-protection (qop) values used to specify the client's qop preference. A qop value is one of
  • "auth" - authentication only
  • "auth-int" - authentication plus integrity protection
  • "auth-conf" - authentication plus integrity and confidentiality protection
The order of the list specifies the preference order. If this property is absent, the default qop is "auth".

javax.security.sasl.strength
The value of this property is a ','-separated list of cipher strength values used to specify the client's preference. A strength value is one of
  • "low"
  • "medium"
  • "high"
The order of the list specifies the preference order. If this property is absent, the default strength is "high,medium,low".

For privacy in DIGEST-MD5, "high" maps to "3des", "medium" to "rc4" or "des", and "low" to "rc4-56" or "rc4-40".

javax.security.sasl.maxbuffer
The value of this property is the string representation of an integer that specifies the maximum size of the receive buffer in bytes that the client is willing to receive. If this property is absent, the default size is defined by the SASL mechanism.

javax.security.sasl.server.authentication
The value of this property is either "true" or "false", specifying whether the server must authenticate to the client or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.forward
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must support forward secrecy between sessions or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.credentials
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must require client credentials or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noplaintext
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to simple plain passive attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noactive
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to active (non-dictionary) attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.nodictionary
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not be susceptible to dictionary attacks or not, respectively. If this property is absent, the default is "false".

javax.security.sasl.policy.noanonymous
The value of this property is either "true" or "false", specifying whether the selected SASL mechanism must not accept anonymous logins or not, respectively. If this property is absent, the default is "false".

3.5 Provider-specific Properties

Provider-specific properties are environment properties which apply only to particular provider implementations. The names of these properties are chosen by the provider's implementor. The recommended policy for naming these properties is to use the implementor's reversed DNS domain name to prefix the provider's package name and to use that package name to prefix the property name. For example, Sun prefixes its provider-specific LDAP properties with "com.sun.jndi.ldap".

4. Names

Names are handled by the provider's context methods according to the following rules:
  1. String names supplied as parameters to the context methods are in the composite name syntax.
    2. The first component of the composite name is an LDAP distinguished name while the rest of the components are used for federation.
  2. If a Name argument is a CompositeName object then its first component is assumed to be an LDAP distinguished name and the remaining components (if any) are used for federation.
  3. If a Name argument is not a CompositeName object then all of its components are assumed to be the parsed form of an LDAP distinguished name. That is, each Name component is an LDAP relative distinguished name (RDN).
  4. Names are parsed using the name parser returned by the Context.getNameParser method. The parser accepts LDAP distinguished names as String objects and produces LDAP distinguished names as Name objects.
  5. Names returned by context operations are string composite names or string URLs.
The syntax of string LDAP distinguished names follows RFC 2253. For example:
  • CN=Steve Kille, O=Isode Limited, C=GB
  • OU=Sales+CN=J. Smith, O=Widget Inc., C=US
  • CN=L. Eagle, O=Sue\, Grabbit and Runn, C=GB
    • The name supplied to an LDAP context is always relative to that context. For example, given an LDAP context (lctx) for "dc=widget,dc=com", in order to name LDAP entries in that subtree, a name relative to "dc=widget,dc=com" must be supplied. For example, the following call obtains the attributes for the
    "cn=John Smith,dc=widget,dc=com" entry,

    Attributes attrs = lctx.getAttributes("cn=John Smith");

    Similarly, when a context is enumerated using any of the enumeration methods (Context.list, Context.listBindings, DirContext.search), the names returned are relative to the target context--the context being enumerated. When referrals are invoked, instead of a relative name, an LDAP URL string, containing the fully qualified name, is returned. The format of LDAP URLs is defined in RFC 2255.

    LDAP URLs that follow RFC 2255 may be supplied to any of the context methods. The hostname and port number are extracted from the URL and used to contact the LDAP server; the java.naming.factory.initial and java.naming.provider.url properties are ignored. For example,

        DirContext ictx = new InitialDirContext();
        Attributes attrs = ictx.getAttributes(
            "ldap://wserver:389/cn=John Smith,dc=widget,dc=com");

    This code fragment contacts the LDAP server at machine wserver at port 389.

    5. Attributes

    The LDAP provider expects as input and returns as output all attribute values as either String or byte[] objects. See the java.naming.ldap.attributes.binary environment property for which ones are treated as byte[] and how to extend the list.

    6. URLs

    RFC 2255 describes the syntactic format of LDAP URLs. The format contains all the elements necessary to specify an LDAP search operation, with provisions for supporting extensions:
    ldap://host:port/dn?attributes?scope?filter?extensions
    Authentication information may be specified in the extensions portion of the URL. See the RFC for a complete description of the format.

    URLs play a role in several places in JNDI:

    1. Configuration of service providers.

      2. To configure an LDAP service provider, you typically supply an LDAP URL in the java.naming.provider.url property. This is used by the LDAP service provider to configure its connection to the directory server. Only the host, port, and dn parts of the URL are relevant in this setting. Supplying other parts of the URL results in a ConfigurationException.
    2. Argument to initial context methods.

      3. If a URL string (with syntax scheme_id:rest_of_name) is passed to the methods in InitialContext, either as a String argument or as the first component of Name, the URL's scheme id is used to locate the context factory for handling that scheme. If none is found, the URL string is treated as an ordinary name and passed to the initial context specified by the java.naming.factory.initial property is used. See the java.naming.spi.NamingManager.getURLContext method for details on how URL context factories are located. Note that this support for LDAP URLs as names is only available in the initial context.

      With the exception of the search methods, when an LDAP URL is passed as a name to the initial context, the URL should not contain any query ('?') components. Otherwise, an InvalidNameException is thrown by the service provider. For the search methods, the query components of the URL override any corresponding components supplied as arguments. For example, if an LDAP URL containing a scope component is supplied, then that scope overrides any scope setting that may be passed in a SearchControls argument.

    3. Referrals.

      4. An LDAP referral contains a list of one or more URLs. To process an LDAP referral (either explicitly or implicitly by setting the java.naming.referral property), the service provider needs to use the information in the these URLs to create connections to LDAP servers to which they refer. When multiple LDAP URLs are present in a single referral they are treated as alternatives and each is followed until one succeeds. The complete URL (that is, including any query components) are used.
    4. Returned as a name in list and search enumerations.

      5. When the name of the entry being returned has a name that is not relative to the target context (i.e., the starting context for the list or search), the name is returned as a URL. See the NameClassPair.isRelative method for details.
    5. Argument to the getObjectInstance method of NamingManager or DirectoryManager.

      6. When an LDAP namespace is federated underneath another namespace (for example, such as DNS), the information that is stored in the superior namespace might be an LDAP URL. In such a scenario, a lookup/list/search operation in the superior namespace would return a Reference containing an LDAP URL for the LDAP namespace. The service provider for the superior namespace would pass the Reference to the getObjectInstance method to create an instance of an LDAP context.

    7. Java Objects

    7.1 Storing

    The LDAP provider should support the storing of Java objects into the directory. This is implemented in the following methods:
    • Context.bind()
    • Context.rebind()
    • DirContext.bind()
    • DirContext.rebind()
    The provider should support at a minimum the storage of the following types of Java objects:
    1. Instances of Reference
    2. Objects that implement the Referenceable interface
    3. Objects that implement the Serializable interface
    4. Objects that implement the DirContext interface
    It should check whether an object is in these four categories in the order listed because that is most likely to capture the intent of the client. For example, a Reference is Serializable, so if you performed the Serializable check first, no References would ever be stored in the reference format (that is, they would all be serialized).

    References, referenceable and serializable objects should be stored according to RFC 2713. DirContext objects should be stored by storing their attributes.

    When storing a reference's list of RefAddr into the javaReferenceAddress attribute, the separator to use for delimiting the address's position, type and content are controlled using the environment property java.naming.ldap.ref.separator. If this environment property is not specified, the hash character '#' should be used as the separator.

    The provider uses the DirectoryManager.getStateToBind method when storing objects in the directory. This allows objects of any type to be transformed into one of the four categories listed above so that they can be stored into the directory.

    7.2 Reading

    Objects are read from the directory using the following operations:
    • Context.lookup()
    • Context.lookupLink()
    • Binding.getObject()
    When the provider reads an entry from the directory, it will get LDAP attributes, and attributes defined in RFC 2713 if the entry has an associated Java object. If the entry contains Java object-related attributes, the provider should recreate the object using those attributes. Otherwise, the provider should return an instance of DirContext containing the attributes of the entry. For both DirContext and Java objects, the provider should then invoke DirectoryManager.getObjectInstance() on it and return the result to the caller.

    8.0 Schema

    JNDI does not specify schema-related details such as structure and contents of the schema tree, permission to modify to the contents of the schema tree, and the effect of such modifications on the directory are dependent on the underlying directory. JNDI specifies only that the root schema context--that returned by DirContext.getSchema()--contain the following bindings:
    • AttributeDefinition
    • ClassDefinition
    • SyntaxDefinition
    This document specifies the structure and content of schema trees that are derived from LDAP-based schemas. It describes how the schema tree is laid out, and the mandatory and optional attributes that you can expect to find associated with entries in different parts of this schema tree.

    Permission to modify the contents of the schema tree is determined by the directory administrator. When the schema tree is modified, the changes are made to schema stored on the directory server.

    8.1 Schema Tree Structure

    In addition to the three bindings in the root schema context listed previously, the root schema context may also contain the following four bindings:
    • MatchingRule
    • ExtensionDefinition
    • ControlDefinition
    • SASLDefinition

    Name of Binding | Description of Binding
AttributeDefinition | Root of the attribute definition tree: a flat namespace with attributes identified by their name or OID.
ClassDefinition | Root of the "objectclass" definition tree: a flat namespace with object classes identified by their name or OID.
SyntaxDefinition | Root of the syntax definition tree: a flat namespace with syntaxes identified by their OID.
MatchingRule | Root of matching rule tree: a flat namespace with matching rules identified by their name or OID.
ExtensionDefinition | Root of the extensions tree: a flat namespace with extensions identified by their OID.
ControlDefinition | Root of the controls tree: a flat namespace with controls identified by their OID.
SASLMechanism | Root of the SASL tree: a flat namespace with SASL authentication mechanisms identified by their string name.

    Any or all of these bindings may be absent if the underlying directory does not publish such schema information, or the service provider does not support retrieving them. If these names are present in the root schema context, however, they must have the binding specified in the above table.

    The attribute names and values of these entries' attributes are case-insensitive.

    8.2 Attribute Definitions

    The name "AttributeDefinition" is bound to a context containing DirContext objects representing attribute definitions in the schema. For example, if a directory supports a "commonName" attribute, the "AttributeDefinition" context would have a binding with name "commonName" that is bound to a DirContext object.

    Each object in the "AttributeDefinition" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | attribute's name
DESC | attribute's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SUP | name of superior attribute type from which this attribute's type is derived
EQUALITY | name or OID of matching rule if equality matching allowed, absent otherwise
ORDERING | name or OID of matching rule if ordering matching allowed, absent otherwise
SUBSTRING | name or OID of matching rule if substring matching allowed, absent otherwise
SYNTAX | numeric OID of syntax of values of this type
SINGLE-VALUE | "true" if attribute not multi-valued, "false" or absent otherwise.
COLLECTIVE | "true" if attribute is collective, "false" or absent otherwise.
NO-USER-MODIFICATION | "true" if not user-modifiable, "false" or absent otherwise.
USAGE | description of attribute usage

    These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "AttributeTypeDescription." All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the "cn" attribute using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext cnSchema = schema.lookup("AttributeDefinition/cn");
    If you then get the attributes of the "cnSchema" DirContext object, you would see:
    NUMERICOID      2.5.4.3
NAME            cn
SYNTAX          1.3.6.1.4.1.1466.115.121.1.15
DESC            Standard Attribute, alias for commonName
    An equivalent way of getting "cnSchema" is if you already have a "cn" attribute. The following code illustrates this alternative:
    Attributes attrs = ctx.getAttributes("cn=John", new String[]{"cn"});
Attribute cnAttr = attrs.get("cn");
DirContext cnSchema = cnAttr.getAttributeDefinition();

    8.3 Object Class Definitions

    The name "ClassDefinition" is bound to a context containing DirContext objects representing object class definitions in the schema. For example, if a directory supports a "country" object class, the "ClassDefinition" context would have a binding with name "country" that is bound to a DirContext object.

    Each object in the "ClassDefinition" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | object class's name
DESC | object class's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SUP | name of superior object class from which this object class is derived
ABSTRACT | "true" if object class is abstract, "false" or absent otherwise
STRUCTURAL | "true" if object class is structural, "false" or absent otherwise
AUXILIARY | "true" if object class is auxiliary, "false" or absent otherwise
MUST | a list of type names of attributes that must be present
MAY | a list of type names of attributes that may be present

    These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "ObjectClassDescription." All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the "country" object class using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext countrySchema = schema.lookup("ClassDefinition/country");
    If you then get the attributes of the "countrySchema" DirContext object, you would see:
    NUMERICOID      2.5.6.2
NAME            country
MAY             aci, searchguide, description
MUST            objectclass, c
DESC            Standard ObjectClass
SUP             top
    An equivalent way of getting "countrySchema" is if you already have a "country" object. The following code illustrates this alternative:
    // Read object from directory
DirContext countryObj = (DirContext)ctx.lookup("c=us", new String[]{"country"});

// Get all of object's object class definitions
DirContext objClasses = countryAttr.getSchemaClassDefinition();

// Pick out "country" object class in particular
DirContext countryClass = (DirContext)objClasses.lookup("country");
    Note: JNDI 1.1's specification of getSchemaClassDefinition() implies that the service provider should return any one of an object's object class definitions. This specification is inadequate because an object usually has multiple object classes and the application might require knowledge about any of those object classes depending on what it is doing. The proposal as illustrated by the example above is to return a context containing all of the object class definitions.

    8.4 Syntax Definitions

    The name "SyntaxDefinition" is bound to a context containing DirContext objects representing syntax definitions in the schema. For example, if a directory supports the "1.3.6.1.4.1.1466.115.121.1.15" syntax (Directory String) syntax, the "SyntaxDefinition" context would have a binding with name "1.3.6.1.4.1.1466.115.121.1.15" that is bound to a DirContext object.

    Each object in "SyntaxDefinition" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
DESC | syntax's description

    These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "SyntaxDescription." All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the "1.3.6.1.4.1.1466.115.121.1.15" syntax using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext dirStringSchema =
    schema.lookup("SyntaxDefinition/1.3.6.1.4.1.1466.115.121.1.15");
    If you then get the attributes of the "dirStringSchema" DirContext object, you would see:
    NUMERICOID      1.3.6.1.4.1.1466.115.121.1.15
DESC            Directory String
    An equivalent way of getting "dirStringSchema" is if you already have an attribute that has that syntax (such as, the "country" attribute). The following code illustrates this alternative:
    Attributes attrs = ctx.getAttributes("c=us", new String[]{"country"});
Attribute countryAttr = attrs.get("country");
DirContext dirStringSchema = countryAttr.getSyntaxAttributeDefinition();

    8.5 Matching Rules

    The name "MatchingRule" is bound to a context containing DirContext objects representing matching rules in the schema. A "matching rule" uniquely identifies the algorithm to use when comparing attribute values. For example, a directory might support a matching rule that is based on how a string sounds and define it as the "soundAlikeMatch" matching rule. Then, the "MatchingRule" context would have a binding with name "soundAlikeMatch" that is bound to a DirContext object.

    When a matching rule is an extensible matching rule, it must also contain an "APPLIES" attribute listing the attributes to which this extensible matching rule can be applied.

    Each object in "MatchingRule" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
NAME | name of matching rule
DESC | matching rule's description
OBSOLETE | "true" if obsolete, "false" or absent otherwise
SYNTAX | numeric oid of syntax to which this rule applies
APPLIES | a list type names of attributes to which this extensible matching rule applies

    These attributes have a 1-to-1 correspondence with the names defined in RFC 2252 for "MatchingRuleDescription" and "MatchingRuleUseDescription." All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the "soundAlikeMatch" syntax using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext soundMatchSchema =
    schema.lookup("MatchingRule/soundAlikeMatch");
    If you then get the attributes of the "soundMatchSchema" DirContext object, you would see:
    NUMERICOID      1.2.3.4.5
NAME            soundAlikeMatch
SYNTAX          1.3.6.1.4.1.1466.115.121.1.15 (for directory string)
APPLIES         2.5.4.41, 2.5.4.15
DESC            Home-grown Phonetic match

    8.6 Extension Definitions

    The name "ExtensionDefinition" is bound to a context containing DirContext objects representing extensions supported by the server. For example, a directory might support the "Start TLS" extension ("1.3.6.1.4.1.1466.20037"). Then, the "ExtensionDefinition" context would have a binding with name "1.3.6.1.4.1.1466.20037" that is bound to a DirContext object.

    Each object in "ExtensionDefinition" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (OID)
DESC | extension's description

    All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the Start TLS extension ("1.3.6.1.4.1.1466.20037") using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext startTLSSchema =
    schema.lookup("ExtensionDefinition/1.3.6.1.4.1.1466.20037");
    If you then get the attributes of the "startTLSSchema" DirContext object, you would see:
    NUMERICOID      1.3.6.1.4.1.1466.20037
DESC            Start TLS (see RFC 2830)

    8.7 Control Definitions

    The name "ControlDefinition" is bound to a context containing DirContext objects representing controls supported by the server. For example, a directory might support the control for asking the server to sort the search results it returns.

    Each object in "ControlDefinition" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NUMERICOID (mandatory) | unique identifier (string)
DESC | control's description

    All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the server-side sorting control ("1.2.840.113556.1.4.473") using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext svrSortSchema =
    schema.lookup("ControlDefinition/1.2.840.113556.1.4.473");
    If you then get the attributes of the "svrSortSchema" DirContext object, you would see:
    NUMERICOID      1.2.840.113556.1.4.473
DESC            server-side sorting of search results

    8.8 SASL Mechanisms

    The name "SASLMechanism" is bound to a context containing DirContext objects representing SASL authentication mechanisms supported by the server. For example, a directory might support the EXTERNAL SASL mechanism (RFC 2222) which requests that the server make use of security credentials exchanged by a lower layer.

    Each object in "SASLMechanism" context has the following mandatory and optional attributes:

    Attribute Identifier | Attribute Value Description
NAME (mandatory) | SASL mechanism's name
DESC | SASL mechanism's description

    All the attribute values are represented by the java.lang.String class.

    You can, for example, obtain the object representing the EXTERNAL SASL mechanism using the following code:

    DirContext schema = ctx.getSchema(""); // get schema tree
DirContext saslExternalSchema =
    schema.lookup("SASLMechanism/EXTERNAL");
    If you then get the attributes of the "saslExternalSchema" DirContext object, you would see:
    NAME      EXTERNAL
    DESC      EXTERNAL SASL mechanism (RFC 2222)

    9. Exceptions

    When building an LDAP provider, you need to translate LDAP error codes (see RFC 2251) into JNDI exceptions. You should use the following table when performing the translation. Furthermore, you should encode as much information as possible about the error into the exception's detailed message, "root cause" exception, resolved and remaining names. Note that resolved name and resolved object should correspond to each other's setting.
    LDAP error code | Exception or Action
success (0) | Report success.
operationsError (1) | NamingException
protocolError (2) | CommunicationException
timeLimitExceeded (3) | TimeLimitExceededException
sizeLimitExceeded (4) | SizeLimitExceededException
compareFalse (5) | Used by DirContext.search() and does not generate an exception.
compareTrue (6) | Used by DirContext.search() and does not generate an exception.
authMethodNotSupported (7) | AuthenticationNotSupportedException
strongAuthRequired (8) | AuthenticationNotSupportedException
partialResults (9) | If java.naming.referral is set to ignore, or contents of error does not contain a referral, throw PartialResultException. Otherwise, use the contents to build a referral.
referral (10) | If java.naming.referral is set to ignore then throw PartialResultException. If it is set to throw then throw ReferralException. If it is set to follow then the provider shall follow the referral. If the value for java.naming.ldap.referral.limit is exceeded while following the referral then throw LimitExceededException.
adminLimitExceeded (11) | LimitExceededException
unavailableCriticalExtension (12) | OperationNotSupportedException
confidentialityRequired (13) | AuthenticationNotSupportedException
saslBindInProgress (14) | Used internally by LDAP provider during multi-stage SASL authentication.
noSuchAttribute (16) | NoSuchAttributeException
undefinedAttributeType (17) | InvalidAttributeIdentifierException
inappropriateMatching (18) | InvalidSearchFilterException
constraintViolation (19) | InvalidAttributeValueException
attributeOrValueExists (20) | AttributeInUseException
invalidAttributeSyntax (21) | InvalidAttributeValueException
noSuchObject (32) | NameNotFoundException
aliasProblem (33) | NamingException
invalidDNSyntax (34) | InvalidNameException
isLeaf (35) | Used by provider; usually doesn't generate exception.
aliasDereferencingProblem (36) | NamingException
inappropriateAuthentication (48) | AuthenticationNotSupportedException
invalidCredentials (49) | AuthenticationException
insufficientAccessRights (50) | NoPermissionException
busy (51) | ServiceUnavailableException
unavailable (52) | ServiceUnavailableException
unwillingToPerform (53) | OperationNotSupportedException
loopDetect (54) | NamingException
namingViolation (64) | InvalidNameException
objectClassViolation (65) | SchemaViolationException
notAllowedOnNonLeaf (66) | ContextNotEmptyException
notAllowedOnRDN (67) | SchemaViolationException
entryAlreadyExists (68) | NameAlreadyBoundException
objectClassModsProhibited (69) | SchemaViolationException
affectsMultipleDSAs (71) | NamingException
other (80) | NamingException

    10. API Mapping

    The methods of the JNDI API context interfaces are mapped onto LDAP operations as follows.
    EventContext.addNamingListener
    EventDirContext.addNamingListener
    Register a listener for receiving naming events that take place in the specified subtree of LDAP entries. LDAP servers notify clients of events by means of LDAP controls attached to LDAP operation responses or by means of an LDAP unsolicited notifications. Such responses are then processed by the LDAP provider and indicated to the application in the form of NamingEvent or UnsolicitedNotificationEvent.
    Context.addToEnvironment
    Update context's environment properties. If multiple contexts share the same set of environment properties, the provider should take care to only modify the intended context's environment. Changing an environment property might require changes to the existing connection the context is using.
    Supplying null for the property value has the same effect as removing the property.

    For all environment properties, the new property is recorded even if it does not affect the context. See the Environment Properties section.

    Context.bind

    DirContext.bind
    Perform an LDAP add operation to create a new entry in the directory. The DirContext.bind method can accept null as the object to bind if it is also supplied a non-null set of attributes. Otherwise, if the method is given insufficient information (i.e., no object or attributes), no entry can be added. If an object is provided in the arguments, then it is converted into attributes and stored in the entry along with any supplied attributes, as described in the Java Objects section. The provider should use the DirectoryManager.getStateToBind method to transform the input object into a form that it can store.

    If the provider does not support binding any objects in the directory then it should throw OperationNotSupportedException. Otherwise, if it does support binding objects but does not support the supplied object then it should throw IllegalArgumentException.

    Context.close
    Release resources associated with context. For example, if the connection being used by this context is not shared with another context, the provider may abandon any outstanding requests and close the network connection to the server. Precisely which resources are released is implementation-dependent.
    Context.composeName
    If the parent context is from the same LDAP namespace, then concatenate the names according to the LDAP name syntax described in Context.getNameParser(). Otherwise, concatenate the names as composite names.
    Context.createSubcontext

    DirContext.createSubcontext
    Perform an LDAP add operation to create the named entry and its associated attributes. If no attributes are supplied then the objectClass attribute is generated with the values top and javaContainer (javaContainer is a structural class that is necessary to avoid a schema violation error).
    Context.destroySubcontext
    Perform an LDAP delete operation to remove the named entry and its associated attributes. The named entry must be a leaf entry; subtrees are not removed. If the leaf entry does not exist (but its parent exists), the operation still succeeds.
    LdapContext.extendedOperation
    Perform an LDAP extended operation.
    DirContext.getAttributes
    Perform an LDAP base-object search operation to retrieve the LDAP entry's attributes. Use "(objectclass=*)" as the filter.

    If the list of requested attributes is null or contains the special attribute identifier '*' then all the user attributes at the LDAP entry are returned. If operational attributes are required then those attribute identifiers must be present in the list of requested attributes.

    LdapContext.getConnectControls
    Retrieve the connection request controls in effect for LDAP bind operations invoked on this context.
    Context.getEnvironment
    Return the environment properties recorded at the context.

    Context.getNameInNamespace

    Return the LDAP distinguished name of the context.

    Context.getNameParser

    Return a name parser that parses LDAP names according to RFC 2253.
    LdapContext.getRequestControls
    Retrieve the request controls in effect for LDAP operations subsequently invoked on this context.
    LdapContext.getResponseControls
    Retrieve the response controls returned by the last LDAP operation invoked on this context.
    DirContext.getSchema
    See the Schema Section.
    DirContext.getSchemaClassDefinition
    See the Schema Section.
    Context.list
    Perform an LDAP one-level search operation of the named entry using the filter "(objectclass=*)" to retrieve the names of the entries immediately below the named entry.

    Ask for, at a minimum, the javaClassName attributes so that the class name of each entry can be determined. If the class name cannot be determined, return javax.naming.directory.DirContext as the class name.

    The names which are returned are either relative to the named context or they are LDAP URLs.

    Context.listBindings
    Perform an LDAP one-level search operation of the named entry using the filter "(objectclass=*)" to retrieve the attributes representing objects (or object references). Request the attributes for reconstructing the Java object and possibly other attributes as well. See Java Objects on how to reconstruct the object. If the object cannot be reconstructed according to RFC 2713 then return a DirContext object representing the LDAP entry. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.

    The names which are returned are either relative to the named context or they are LDAP URLs.

    Context.lookup

    Context.lookupLink
    Perform an LDAP base-object search operation of the named entry using the filter "(objectclass=*)". Request (possibly all) the attributes for reconstructing the Java object. See Java Objects on how to reconstruct the object. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.
    DirContext.modifyAttributes
    Perform an LDAP modify operation at the named entry using the supplied modifications. For the overloaded method that accepts an Attributes, first convert the Attributes argument into an ordered list of modifications by enumerating its contents using Attributes.getAll() and reusing the modification operation argument (mod_op).
    LdapContext.newInstance
    Initialize an new instance of this context with the specified request controls.
    Context.rebind

    DirContext.rebind
    This method may involve several different LDAP operations. First get the existing entry's attributes. If the existing entry does not exist, this method behaves the same as bind(). Otherwise, if no attributes have been supplied and the object being bound is DirContext, invoke DirContext.getAttributes() and use the result as the attributes argument (attrs). If there are still no attributes, use the original entry's attributes as attrs. Remove the existing entry using the LDAP delete operation. Convert the object provided in the arguments into attributes (as described in the Java Objects section) and store in the entry along with attrs using the LDAP add operation. The provider should use the DirectoryManager.getStateToBind method to transform the input object into a form that it can store.
    LdapContext.reconnect

    Reconnect to the LDAP server using the supplied connection request controls and the current environment properties.

    Context.removeFromEnvironment
    Remove context's environment properties. If multiple contexts share the same set of environment properties, the provider should take care to only modify the intended context's environment. Changing an environment property might require changes to the existing connection the context is using.
    For all environment properties, the new property is recorded even if it does not affect the context. Removing a property should cause the context to assume the property's default.
    EventContext.removeNamingListener
    Deregister a naming event listener so that subsequent events destined for that listener are not delivered.
    Context.rename
    Perform an LDAP modify DN operation to rename the entry. If LDAPv2 is being used then the new name and the old name must share the same immediate parent name. If the parents are not equal then throw InvalidNameException.

    Note the effect of the java.naming.ldap.deleteRDN property on the behavior of this method.

    DirContext.search
    Perform an LDAP search operation according to the specified search controls.

    If the list of requested attributes is null or contains the special attribute identifier '*' then all the user attributes at the LDAP entry are returned. If operational attributes are required then those attribute identifiers must be present in the list of requested attributes.

    If objects are requested to be returned, then the Java object-related attributes (RFC 2713) are requested in addition to any requested by the API user. If these attributes are present then they are used to assemble the original objects (see Java Objects). If the object cannot be reconstructed according to RFC 2713 then return a DirContext object representing the LDAP entry. The provider should use the DirectoryManager.getObjectInstance method to satisfy calls to the Binding.getObject method.

    The names which are returned are either relative to the named context or they are LDAP URLs.

    The provider may use an LDAP compare operation instead of an LDAP search when the search filter supplied is suitably constrained:

  • The filter must be of the form "(<attributeID>=<value>)"
  • The scope must be object scope
  • Zero attributes must be requested (empty returning-attributes list)

    • In the forms of search that accept a string filter as argument, the syntax of the filter follows RFC 2254 with the exception that Unicode characters are also allowed. The use of Unicode characters is preferable to the use of encoded UTF-8 octets. The service provider is responsible for translating the Unicode characters into their corresponding UTF-8 representation for transmission to the server. For example, the Greek letter alpha can be specified in the string filter either as "\u03B1" or as "\\CE\\B1".

    In the form search(Name, Attributes) and related methods, the Attributes argument is converted into a string filter by creating a conjunctive expression out of its elements. Each attribute value is treated as a literal; therefore '*' and other special characters defined in RFC 2254 that appear in the values of an attribute should be escaped according to the rules in RFC 2254. For example, an attribute value of '*' should be encoded as the string "\\2a".

    In the form search(Name, String filterExpr, Object[] filterArgs) and its String overloaded method, "{num}" expansion is done in the filter by putting in values from filterArgs. Each "{num}" component may appear in the place of "attr" or "value" in Section 4 from RFC 2254.

    The objects in filterArgs should be encoded in the following way:

  • byte arrays (byte[]) are encoded by encoding each byte as a string according to RFC 2254. For example, the array {0, 1, 10, 100} is encoded as the string "\\00\\01\\0a\\64".
  • Strings are treated as literals. In other words, '*' and other special characters defined in RFC 2254 that appear in the string are escaped according to the rules in RFC 2254. For example, a string of "*" is encoded as the string "\\2a".
  • Objects that are neither String nor byte[] are converted to their string form using Object.toString() and then the rules for String applied.
    • LdapContext.setRequestControls
    Set the request controls for LDAP operations subsequently invoked on this context.
    EventContext.targetMustExist
    Determine whether a listener can register interest in an LDAP entry that doesn't exist.
    Context.unbind
    Perform an LDAP delete operation to remove the named entry. The named entry must be a leaf entry; subtrees are not removed. If the leaf entry does not exist (but its parents exist), the operation still succeeds.

    11. Federation

    The LDAP service provider should support federation using strong separation and either or both of junctions or implicit next naming system pointer.

    12. SASL

    The provider supports SASL mechanisms by means of the Java SASL API. This allows SASL mechanism drivers from different vendors to be used with the LDAP provider, and also allows a SASL mechanism driver to be used with different LDAP providers and even non-LDAP protocol libraries.

    The Java SASL API depends on the Java Authentication and Authorization Service (JAAS), which provides callback support for SASL mechanisms that need to obtain or supply user/application information directly.

    12.1 SASL Configuration

    To specify that SASL authentication be used, you specify the official IANA-registered names of the SASL mechanisms in the java.naming.security.authentication property. The first SASL mechanism on the list that is both available and satisfies the optionally specified policies is used. That is, properties with the prefix "javax.security.sasl.policy." can be used to control the security characteristics of the selected SASL mechanism.

    Some SASL mechanisms require the identity of the entity being authenticated. This is known as the authentication ID. Some SASL mechanisms, like DIGEST-MD5, require the use of a password and/or a realm. By default, the provider supplies the value of java.naming.security.principal property as the authentication ID to any SASL mechanism that requires the authentication ID, the value of the java.naming.security.credentials property as the password, and the value of the java.naming.security.sasl.realm property as the realm. To override these defaults, use the java.naming.security.sasl.callback property.

    SASL mechanisms support the notion of authorization identity or authorization ID, which is the entity to which the server should grant access if the authentication succeeds. If the java.naming.security.sasl.authorizationId property has been set, then its value is used as the authorization ID. Otherwise, the empty string is used as the authorization ID, which directs the server to derive an authorization ID from the client's authentication credentials.

    See SASL properties for a description of the properties used by an LDAP service provider for supporting SASL.

    In addition to these properties, there might be properties required for specific SASL mechanisms. For example, a SASL mechanism that supports privacy and integrity needs to know the quality of protection that the client requires. Properties such as these are passed to the SASL mechanism via the environment properties. See the JNDI documentation for how to set environment properties.

    For example, if the application needs privacy, it can do so by using a call such as:

    env.put("javax.security.sasl.qop", "auth-conf");

    before passing env to the initial context constructor. See the Java SASL API for details about these properties.

    12.2 SASL Mechanism Drivers

    The Java SASL API provides a framework for dynamically plugging in SASL mechanism drivers. The LDAP provider might provide a few default drivers. An application can make additional drivers available to the provider by listing the names of the packages, separated by "|" (vertical bar), in the javax.security.sasl.client.pkgs property. It must then add the drivers' classes to the application's classpath. See the Java SASL API for details.

    13. Extensions and Controls

    The provider supports LDAP extensions and controls using the javax.naming.ldap package. In addition, the provider supports LDAP unsolicited notifications (which are transmitted in LDAP extended operation responses) using the services of the javax.naming.event package.

    Several LDAP extensions and controls are defined by the IETF LDAPEXT working group.

    14. Event Notification

    The provider supports event notification using the javax.naming.event package.

    A JNDI application can register for events that occur in the directory, such as the addition or removal of an entry, or the modification of an entry. Applications can also register for unsolicited notifications.

    15. SSL

    The provider supports SSL according to the SSL interface specification. SSL is activated by setting the java.naming.security.protocol environment property as follows:
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    and by selecting the hostname and port number of an LDAP server that supports SSL. Once an SSL connection has been established subsequent LDAP protocol exchanges take place over that secure connection.

    If, in addition, LDAP authentication is also required then the java.naming.security.authentication, java.naming.security.principal, and java.naming.security.credentials environment properties should be set, as appropriate. If LDAP authentication is required and the SSL credentials should be reused for LDAP authentication then set the java.naming.security.authentication environment property to select the SASL EXTERNAL mechanism, as follows:

    env.put(Context.SECURITY_AUTHENTICATION, "EXTERNAL");

    Copyright © 1999-2001 Sun Microsystems, Inc., All Rights Reserved.


JNDI/COS Naming Service Provider

COS Naming Service Provider for the
Java Naming and Directory InterfaceTM (JNDI)

Please send feedback to jndi@java.sun.com

Table of Contents

  • Introduction
  • Conformance
  • Environment Properties
  • ORB Initialization
  • Root Naming Context Initialization
  • Names and URLs
  • API Mapping
  • Converting CORBA Programs to use JNDI
  • Security Considerations

Introduction

The Common Object Services (COS) Name Server is the name server for storing Common Object Request Broker Architecture (CORBA) object references. It can be accessed from CORBA applications by using the COS Naming package (org.omg.CORBA.CosNaming).

The JNDI/COS naming service provider implements the javax.naming.Context interface on top of the COS Naming package in order to allow applications to use JNDI to access the COS Name Server. JNDI can also be used to access other naming and directory services, in addition to the COS Name Server, thereby offering the CORBA application one interface for accessing different naming and directory services.

This document describes the features of the COS naming service provider and contains details of how JNDI is mapped to the COS naming package.

Conformance

The COS naming service provider for JNDI uses JavaTM IDL, the Java programming language mapping to the industry standard Object Management Group Interface Definition Language (OMG IDL). In particular, it uses the COS Naming Service.

The complete specification for COS Naming can be obtained from OMG.

The syntax of names conforms to the Interoperable Naming Server (INS) specification, OMG TC Document orbos/98-10-11. This is described in Names and URLs.

Environment Properties

The following JNDI environment properties are relevant for the COS naming service provider. See the JNDI documentation for a description of how properties are initialized using the environment properties, system properties, applet parameters, and resource files.

java.naming.factory.initial
This property is used to select the COS naming service provider; it's not actually used by the provider itself. It specifies the class name of the initial context factory for the provider.

For example:

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");

This property must be set if you are using the COS naming service as the initial context. The only exception is if you supply only URLs to the initial context, in which case, you don't need to specify this property. See Names and URLs for details.

java.naming.provider.url
This property is used to configure the root naming context and/or the Object Request Broker (ORB). Its value is the string representation of a URL.

If this property is not specified, then the ORB is initialized using the java.naming.corba.orb property, the java.naming.applet property, or other ORB initialization properties. The root naming context is obtained by invoking

orb.resolve_initial_references("NameService");

If the URL scheme is either "iiop" or "iiopname", then the host and port fields of the URL are used to initialize the ORB. An "iiopname" URL must conform to the now obsolete INS specification (98-10-11). It has the form:

iiopname://[<addr_list>][/<cosnaming_name>]

The "iiop" URL scheme is supported for backward compatibility with an older version of the INS specification. It has the form:

iiop://[<host>[:<port>]][/<cosnaming_name>]

For both "iiop" and "iiopname" URLs, if <host> is not specified, then it defaults to "localhost" for an application and the applet's host for an applet. If <port> is not specified, then it defaults to 9999 for "iiopname", and 900 for "iiop". The root naming context is obtained by invoking the following method on the ORB:

orb.resolve_initial_references("NameService");

If <cosnaming_name> is nonempty, then the root naming context is the naming context named by cosnaming_name.

If the URL scheme is "IOR", the property must contain the stringified IOR of the root naming context.

If the URL scheme is not one of "iiop", "iiopname", or "IOR", then the URL must name a location that contains the stringified IOR of the root naming context. For example, if the property contains "file:/nsdir/ior", then the file /nsdir/ior must contain a stringified IOR. The URL scheme can be any for which there is a corresponding URL protocol handler ( java.net.URLStreamHandler). See the java.net.URL class for details. The stringified IOR is read from the data stream corresponding to the URL by using a character encoding of ISO Latin-1. The stringified IOR is the first line in the stream that contains the prefix "IOR:". For example, if the URL scheme is "http", then the headers in the stream are skipped and the first line that contains the prefix "IOR:" is returned as the IOR.

When the property specifies a stringified IOR or the location of one, the root naming context is that named by the the stringified IOR. The ORB is initialized using the java.naming.corba.orb property, the java.naming.applet property, or other ORB initialization properties.

java.naming.corba.orb
This property specifies the ORB that the program is using. When the JNDI COS naming service provider needs to use an ORB, for example, to look up the "NameService" initial reference or to turn a stringified IOR into an object reference, it will use this ORB.

In an application you can set this property as follows:

ORB orb = ORB.init(args, null);
Hashtable env = new Hashtable(5, 0.75f);
env.put("java.naming.corba.orb", orb);
...
In an applet, you can set it as follows:
public class MyApplet extends Applet {

    public someInitMethod() {
        ORB orb = ORB.init(this, null);
        Hashtable env = new Hashtable(5, 0.75f);
        env.put("java.naming.corba.orb", orb);
        ...
    }
...
}
If this property is not set, then the java.naming.provider.url property, the java.naming.applet property, or the ORB initialization properties are used to initialize the ORB.
java.naming.applet
This property specifies the applet that the program is using. It is used to initialize the ORB to be used by the COS naming service provider. Its parameters are used for setting JNDI-related properties; see the JNDI documentation for details.
public class MyApplet extends Applet {

    public someInitMethod() {
        Hashtable env = new Hashtable(5, 0.75f);
        env.put("java.naming.applet", this);
        ...
    }
...
}

java.naming.factory.state
A colon-separated list of the fully qualified class names of state factory classes used to get an object's state for storing given the object itself. You can use this mechanism to transform an object into forms that can be stored into a COS name server. The COS name server supports storing CORBA objects.

A state factory that transforms a java.rmi.Remote into a CORBA object is supplied by default. This factory is useful for applications that use RMI-IIOP. You can supply other factories to affect the transformation of other objects into CORBA objects for storing. See javax.naming.spi.NamingManager.getStateToBind() for details.

java.naming.factory.object
A colon-separated list of the fully qualified class names of object factory classes for transforming a CORBA object. You can use this mechanism to transform an object into forms expected by the application. For example, a specialized object factory could do the appropriate narrowing to return an object of the expected type. See javax.naming.spi.NamingManager.getObjectInstance() for details.
java.naming.batchsize
Specifies the batch size to use in CosNaming::BindingIterator.next_n when getting the results of a list()/listBindings(). The default is "100."

For example, the following sets the batch size to be 24.

env.put(Context.BATCHSIZE, "24");
ORB initialization properties
You can specify CORBA related properties such as those with the "org.omg.CORBA." prefix as properties. Properties of type String are used to initialize the ORB.

ORB Initialization

The properties that affect which ORB is used and how the ORB is initialized are:

  • java.naming.corba.orb
  • java.naming.applet
  • java.naming.provider.url
  • org.omg.CORBA.* and other ORB-specific properties of type String
The following algorithm is used to determine which ORB is used:
  1. If java.naming.corba.orb has been set, then its value (an ORB) is used.

  2. Otherwise, the provider will internally initialize and use an ORB as follows:

    a) Any org.omg.CORBA.* properties and properties of type String are extracted and used as part of the Properties argument to the ORB.init() method. You can use this mechanism to specify, for example, the ORB implementation or host to use.

    b) If java.naming.provider.url has been set and it contains a URL of scheme "iiop" or "iiopname", then the host and port number specified in the URL are used as part of the Properties argument to the ORB.init() method, overriding any org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort properties set up in (a).

    c) The Properties instance constructed in (a) and (b) are passed to ORB.init() along with the Applet instance in java.naming.applet property, or an empty String[] if java.naming.applet was not supplied.

If the properties employed in steps (a), (b) and (c) contain no relevant information for initializing the ORB, then the Java IDL implementation's defaults are used. Typically that means port 900 on the local host for an application, and port 900 on the applet host for an applet are used. Note that when the ORB is initialized using ORB.init(), its arguments are checked in the following order: (from org.omg.CORBA.ORB javadoc)

  1. Check in Applet parameter or application string array, if any
  2. Check in properties parameter, if any
  3. Check in the System properties (currently applications only)
  4. Fall back on a hardcoded default behavior (use the Java IDL implementation)

Root Naming Context Initialization

The root naming context is initialized either using the java.naming.provider.url property or by a resolve_initial_references() call on the ORB. If the java.naming.provider.url property is set but contains neither an "iiop" or "iiopname" URL, then it is assumed to contain a stringified IOR or a URL containing the location of a stringified IOR. The IOR is used to obtain the root naming context and must be that of a CORBA object of type CosNaming::NamingContext.

If the java.naming.provider.url has not been set, then the root naming context is obtained by invoking the following method on the ORB:

        orb.resolve_initial_references("NameService");

Names and URLs

String Names

String names accepted by the java.naming.Context methods are JNDI composite names in which each component is the stringified form of a CosNaming::NameComponent.

A CosNaming::Name contains a sequence of CosNaming::NameComponent. The stringified form of a component is the concatenation of the component's id, the kind separator character ('.'), and the component's kind. The occurrence of any meta characters ('.', '/', or '\') in either the id or kind is escaped using the escape character ('\'). The stringified form of a CosNaming::Name is defined in Section 4.5 of the INS specification.

The JNDI composite name syntax is very similar to, but not identical to, the INS syntax. There are minor differences with respect to the treatment of escape and quote characters. If you want to use names with the precise INS syntax, then you should use the overloads that accept a Name argument instead of a String argument. The Name argument should be a value returned by nameParser.parse(), where nameParser is a value obtained from the COS naming service provider. See the Name Parsing section.

URL String Names

The URL form of a CosNaming::Name is defined in the INS specification.

iiopname://[<addr_list>][/<cosnaming_name>]

where <addr_list> specifies a list of host/port pairs. If <port> is not specified, then it defaults to 9999. <cosnaming_name> is the stringified form of an INS name.

For backward compatibility with an older INS specification, the following URL is also supported.

iiop://<host>[:<port>][/<cosnaming_name>]

If <port> is not supplied, then it defaults to 900. <cosnaming_name> is the stringified form of an INS name.

When you supply an "iiop" or "iiopname" URL to the initial context in this way, the ORB supplied to the initial context is used if its string_to_object() method supports the 99-12-03 INS specification. Otherwise, the ORB is ignored and the server and port designations in the URL are used to create an ORB. The value of the java.naming.factory.initial property is ignored for the purposes of resolving the URL.

For example, the following code will contact the naming service running on host 'server', at port '1900', and lookup the INS name "some/cos/name".

InitialContext ictx = new InitialContext();
Object helloRef = ictx.lookup("iiopname://server:1900/some/cos/name");

Name Objects

The Name argument to a Context method is treated as a sequence of strings, each representing a stringified CosNaming::NameComponent.

Name Parsing

The COS naming service provider supports names in the syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Here is a code fragment that uses the name parser from the COS naming service provider to eventually do a lookup using an INS name.

String insName = ...;
InitialContext ctx = new InitialContext(env);   // env contains init properties
NameParser parser = ctx.getNameParser("");      // parser for INS names
Name name = parser.parse(insName);              // get parsed INS name
Object obj = ctx.lookup(name);                  // do lookup

API Mapping

The COS name server supports only naming operations. The COS naming service provider maps the javax.naming.Context methods to use the appropriate COS Naming calls.

addToEnvironment()
Records change to environment property but does not reinitialize ORB.
bind()
Binds an object to the specified name.

If the object being bound is an org.omg.CosNaming.NamingContext, then CosNaming::NamingContext.bind_context is used. If it is an org.omg.CORBA.Object, then CosNaming::NamingContext.bind is used. The binding of any other type of object is not supported unless the object can be converted into an org.omg.CORBA.Object using the state factory mechanism described next.

Before the bind is performed on the naming server, the COS naming service provider uses javax.naming.spi.NamingManager.getStateToBind() to allow the object to be transformed into a org.omg.CORBA.Object. The getStateToBind() method uses the state factories available to the COS naming service provider. If the state factory accepts a java.rmi.Remote object, then it is responsible for obtaining the object's RMI-IIOP stub and connecting it to the ORB associated with the context. The connected stub is the object that will be bound in the naming server.

By default, the COS naming service provider supplies and uses a state factory that transforms an object implementing the java.rmi.Remote interface to an org.omg.CORBA.Object following the requirements described above. This factory uses the utilities in the javax.rmi.CORBA package. You can supply additional state factories to transform objects into CORBA objects.

close()
Releases any internal data structures used.
composeName()
Concatenates the supplied name to the prefix.
createSubcontext()
Uses CosNaming::NamingContext.bind_new_context to create and bind a new context.
destroySubcontext()
Uses CosNaming::NamingContext.destroy to destroy the named context. Then uses CosNaming::NamingContext.unbind to remove the binding.
getEnvironment()
Returns the environment of this context.
getNameInNamespace()
Returns the INS name of this context relative to the root of the Cos Naming namespace.
getNameParser()
Returns a name parser for parsing INS names.
lookup()
lookupLink()
Uses CosNaming::NamingContext.resolve to lookup the name. It returns a CORBA object reference except when the reference is that of a CosNaming::NamingContext, in which case a Context object is returned instead. NamingManager.getObjectInstance() is called before the object is returned in case the application or user has supplied object factories.
list()
listBindings()
Uses CosNaming::NamingContext.resolve to get the object reference for the context, and then uses CosNaming::BindingIterator and helper classes to iterate through the context. The objects bound to the names are obtained by calling CosNaming::NamingContext.resolve on them. NamingManager.getObjectInstance() is called before the object is returned in case the application or user has supplied object factories.
removeFromEnvironment()
Removes the specified property from the environment but does not otherwise update the context.
rebind()
If the object being bound is an org.omg.CosNaming.NamingContext, then CosNaming::NamingContext.rebind_context is used. If it is an org.omg.CORBA.Object, then CosNaming::NamingContext.rebind is used. See bind() for details on the use of state factories to transform the argument into an org.omg.CORBA.Object.
rename()
This method is implemented using bind() followed by unbind(). It is not atomic.
unbind()
Uses CosNaming::NamingContext.unbind to unbind the object.

Converting CORBA Programs to use JNDI

This section explains how to modify your Java IDL program to use JNDI. The explanation uses the Java IDL sample programs helloClient.java and helloServer.java.

  1. Generate the stubs from the IDL file.

    # idltojava -fclient -fserver hello.idl

    This creates the client (helloClient.java) and server (helloServer.java) skeletons, and a directory containing common code (e.g. HelloApp/*.java).

  2. Fill in the code for the client and server programs.

  3. Modify (or copy the client and server files) to use JNDI instead of COS Naming directly.

    • Replace the import to use javax.naming.*;
      Delete:
      import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
      Add:
      import javax.naming.*;
    • Replace how you get the initial reference to "NameService" with InitialContext, supplying the initial context the ORB being used by the current application.
      Delete:
      org.omg.CORBA.Object objRef =
   orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef);
      Add:
      Hashtable env = new Hashtable(5, 0.75f);
env.put("java.naming.corba.orb", orb);
Context ic = new InitialContext(env);
    • Replace the call to resolve() to use lookup().
      Delete:
      // resolve the Object Reference in Naming
NameComponent nc = new NameComponent("Hello", "");
NameComponent path[] = {nc};
hello helloRef = helloHelper.narrow(ncRef.resolve(path));
      Add:
      // resolve the Object Reference using JNDI
hello helloRef =
helloHelper.narrow((org.omg.CORBA.Object)ic.lookup("Hello"));

Security Considerations

When a security manager has been installed, you must grant to the application using JNDI and the COS naming service provider the following permissions:

permission java.net.SocketPermission "host[:port]", "connect";
For each host/port identified in the java.naming.factory.initial property, in URL string names supplied to context methods, in ORB initialization parameters and properties, and in object references.

Copyright © 1999-2001 Sun Microsystems, Inc., All Rights Reserved.


JNDI/LDAP Service Provider

LDAP Naming Service Provider for the
Java Naming and Directory InterfaceTM (JNDI)

Please send feedback to jndi@java.sun.com

Table of Contents

  1. Introduction
  2. Conformance
  3. Environment Properties
  4. Names
  5. Attributes
  6. URLs
  7. Java Objects
  8. Schema
  9. Exceptions
  10. API Mapping
  11. Federation
  12. Event Notification
  13. SSL
  14. Security Considerations

1. Introduction

The Lightweight Directory Access Protocol (LDAP) is an Internet standard for accessing directory services. The JNDI/LDAP service provider provides access to servers implementing the LDAP protocols.

This document describes the features of the LDAP service provider. A major portion of the description is couched in terms of how the LDAP service provider behaves with respect to the descriptions in Guidelines for LDAP Service Providers. For examples and descriptions of how to use this provider, please see the JNDI Tutorial.

The LDAP service provider implements the basic features for LDAP access. Additional functionality, such as support for a number of popular LDAP controls, for SASL authentication, and for storing and reading RMI and CORBA objects, can be added to the basic provider by installing a booster pack, available for download at the JNDI Web site.

2. Conformance

The LDAP service provider conforms to the following standards:
Standard | Supported | Comments
LDAPv3 (RFC 2251) | Yes |
LDAPv3 Attributes (RFC 2252) | Yes |
LDAPv3 Distinguished Names (RFC 2253) | Yes |
LDAP Search Filters (RFC 2254) | Yes |
LDAP URL Format (RFC 2255) | Yes |
LDAPv3 Schema (RFC 2256) | Yes |
LDAPv2 (RFC 1777) | Yes |

3. Environment Properties

Descriptions of JNDI and LDAP-specific properties are found in Guidelines for LDAP Service Providers.

3.1 JNDI Properties

The LDAP service provider supports the following JNDI environment properties:
Property | Supported | Comments
java.naming.batchsize | Yes | Default value is 1.
java.naming.factory.control | Yes |
java.naming.factory.initial | Yes | Specify com.sun.jndi.ldap.LdapCtxFactory to use the LDAP service provider as the initial context.
java.naming.factory.object | Yes |
java.naming.factory.state | Yes |
java.naming.language | No | Ignored by the provider.
java.naming.provider.url | Yes |
java.naming.referral | Yes |
java.naming.security.authentication | Yes | simple, none
java.naming.security.credentials | Yes |
java.naming.security.principal | Yes |
java.naming.security.protocol | Yes | ssl

3.2 LDAP-specific Properties

The provider supports the following LDAP-specific environment properties:
Property | Supported | Comments
java.naming.ldap.attributes.binary | Yes |
java.naming.ldap.control.connect | Yes |
java.naming.ldap.deleteRDN | Yes |
java.naming.ldap.derefAliases | Yes |
java.naming.ldap.factory.socket | Yes | Default value is javax.net.ssl.SSLSocketFactory when the java.naming.security.protocol property is set to ssl. See the SSL Section for details.
java.naming.ldap.ref.separator | Yes |
java.naming.ldap.referral.limit | Yes |
java.naming.ldap.typesOnly | Yes |
java.naming.ldap.version | Yes |

3.4 Provider-specific Properties

The LDAP service provider defines the following provider-specific environment properties:
com.sun.jndi.ldap.netscape.schemaBugs
The Netscape Directory Server 4.0 and earlier releases do not support schema entries that comply with RFC 2252. Specifically, contrary to RFC 2252, the Netscape server requires OIDs (such as those for SUP and SYNTAX) be delimited by single quotes and MUST/MAY lists be enclosed by parentheses. When you update the schema of the Netscape Directory Server 4.0, you need to use this property to get around these problems.

The following values are defined for this property:

true
activate the workaround.
false
do not activate the workaround.

If this property is not set then its default value is false.

For example,

env.put("com.sun.jndi.ldap.netscape.schemaBugs", "true");
activates the workaround.

NOTE 1: This property may only be passed to the initial context and becomes fixed for the provider. It is unaffected by the addToEnvironment or removeFromEnvironment methods.

NOTE 2: If you are using Netscape Directory Server 4.1, do not use this property. The 4.1 server has problems parsing object class definitions that contain MUST/MAY clauses without parentheses. If you are creating or modifying an object class definition that contains a single MUST/MAY item, work around the bug by adding a superfluous value (such as 'objectClass') to the MUST/MAY list.

com.sun.jndi.ldap.trace.ber
The value of this property is a java.io.OutputStream object into which a hexadecimal dump of the incoming and outgoing LDAP ASN.1 BER packets is written.

No default is defined for this property.

For example,

env.put("com.sun.jndi.ldap.trace.ber", System.out);
directs the LDAP protocol trace to the standard output stream.

NOTE: This property may only be passed to the initial context and becomes fixed for the provider. It is unaffected by the addToEnvironment or removeFromEnvironment methods.

4. Names

The LDAP service provider supports names in accordance with the description in Guidelines for LDAP Service Providers. It supports LDAP distinguished names in the following formats:
Distinguished Name format | Comments
String | Treat as composite name. Process the first component of the composite name as a distinguished name. Use rest of the components for federation.
Name | If instance of CompositeName, treat as composite name, which means process the first component of the composite name as a distinguished name and use the rest for federation. Otherwise, treat as parsed LDAP name, where each component of Name is a component of the LDAP name as defined in RFC 2253.
LDAP URL String | When passed to the initial context, the LDAP URL string is interpreted according to RFC 2255, and its distinguished name component interpreted according to RFC 2253.

The name parser returned by an invocation of getNameParser() returns a parser that, when given a string name, parses it into components in accordance with RFC 2253.

5. Attributes

The LDAP service provider supports attributes in accordance with the description in Guidelines for LDAP Service Providers. It supports the following formats for specifying LDAP attribute values:
Attribute value format | Supported | Comments
String values | Yes |
byte[] values | Yes |

Some LDAP servers support attribute subtyping, attribute name synonyms, and language codes for specifying language preferences for attribute values. In such cases, the attribute name returned by an LDAP server may be different from the one which was requested.

In LDAP, attribute names are case-insensitive. Therefore, when creating a collection of attributes to be passed as a parameter to JNDI operations, it is recommended to use a case-insensitive attributes class. For example,

Attributes attrs = new BasicAttributes(true); // ignoreCase=true

For all attribute values, regardless of whether they are String or byte[], you need to know the syntax and format of the attribute value. You can typically find this out by reading the schema document in which the attribute and its syntax is defined.

When attributes are supplied as arguments to JNDI calls then they must satisfy whatever schema is enforced at the LDAP directory. In particular, the objectClass attribute is normally required when creating a new LDAP entry (for example, when using Context.bind, Context.rebind or DirContext.createSubcontext).

6. URLs

The LDAP service provider supports URLs in accordance with the description in Guidelines for LDAP Service Providers. It supports the following use of URLs:
URL usage | Supported | Comments
LDAP URLs to configure the LDAP service provider. | Yes |
URLs passed as names to the InitialDirContext methods. | Yes | The attributes, scope, filter and extensions components of LDAP URLs are ignored by the search methods.
URLs in LDAP referrals | Yes | The scope component of LDAP URLs is supported. The attributes, filter and extensions components are ignored.
URLs returned as names in list, listBindings, and search enumerations. | Yes |
URLs linking federated namespaces. | Yes |

7. Java Objects

The LDAP service provider supports storing and reading the following types of objects, as specified in Guidelines for LDAP Service Providers.
Storable/Readable Objects | Supported | Comments
Reference objects | Yes |
Referenceable objects | Yes |
Serializable objects | Yes |
DirContext objects | Yes |

See the JNDI Tutorial for examples.

8. Schema

The LDAP service provider supports the following schema bindings, as specified in Guidelines for LDAP Service Providers.
Schema Tree | Supported | Comments
AttributeDefinition | Yes | Attribute definitions may be added or deleted but not modified.
ClassDefinition | Yes | Class definitions may be added or deleted but not modified.
SyntaxDefinition | Yes | Syntax definitions may be added or deleted but not modified.
MatchingRule | Yes | Matching rules may be added or deleted but not modified.
ExtensionDefinition | No |
ControlDefinition | No |
SASLMechanism | No |

9. Exceptions

The LDAP service provider maps LDAP error codes to JNDI exceptions according to Guidelines for LDAP Service Providers.

10. API Mapping

The LDAP service provider maps the following JNDI API methods to LDAP according to Guidelines for LDAP Service Providers:
Mapping for Context methods | Supported | Comments
addToEnvironment | Yes |
bind | Yes |
close | Yes |
composeName | Yes |
destroySubcontext | Yes |
getEnvironment | Yes |
getNameInNamespace | Yes |
getNameParser | Yes |
list | Yes |
listBindings | Yes |
lookup | Yes | Does not process LinkRef specially.
lookupLink | Yes |
rebind | Yes |
removeFromEnvironment | Yes |
rename | Yes |
unbind | Yes |
Mapping for DirContext methods | Supported | Comments
bind | Yes |
createSubcontext | Yes |
destroySubcontext | Yes |
getAttributes | Yes |
getSchema | Yes |
getSchemaClassDefinition | Yes |
modifyAttributes | Yes |
rebind | Yes |
search | Yes |
Mapping for LdapContext methods | Supported | Comments
extendedOperation | Yes |
getRequestControls | Yes |
getResponseControls | Yes |
newInstance | Yes |
reconnect | Yes |
setRequestControls | Yes |
Mapping for EventDirContext methods | Supported | Comments
addNamingListener | Yes |
removeNamingListener | Yes |
targetMustExist | Yes |

11. Federation

The LDAP service provider supports federation in accordance with the description in Guidelines for LDAP Service Providers. It supports the following federation techniques:
Federation Technique | Supported | Comments
Junction | Yes | Except when subordinate naming system is another LDAP system
Implicit Next Naming System Pointer | Yes |

The LDAP service provider treats composite names as strongly separated. That is, it processes the first component of the composite name as a distinguished name and the rest of the components as names in the next naming system(s). For example, here are examples that lists the root of the next naming system federated beyond an LDAP context and looks up a name using a multicomponent composite name:

// List the root of the nns,
// Note use of the trailing slash to indicate traversal into the nns
NamingEnumeration enum = ctx.list("cn=objects,ou=Sales/");

// A composite name lookup
Object obj = ctx.lookup("cn=objects,ou=Sales/some/x/y/z");

12. Event Notification

The LDAP service provider supports event notification in accordance with the description in Guidelines for LDAP Service Providers. It supports the following events:
Event | Supported | Comments
Namespace change notification | Yes | Uses the persistent search control
Object change notification | Yes | Uses the persistent search control
Unsolicited notification | Yes |

13. SSL

The LDAP service provider supports SSL in accordance with the description in Guidelines for LDAP Service Providers. It uses the default socket factory javax.net.ssl.SSLSocketFactory unless the java.naming.ldap.factory.socket property has been set to the class name of some other socket factory. The use of javax.net.ssl.SSLSocketFactory requires the SSL package from Sun's Java Web Server or Hot Java Browser products. Documentation for these products describes how to initialize and configure the private keys and public key certificates necessary for authentication using SSL.

14. Security Considerations

 When a security manager has been installed, you must grant to the application using JNDI and the LDAP service provider the following permissions:

permission java.net.SocketPermission "host[:port]", "connect";
For each host/port identified in the java.naming.factory.initial property and in URL string names supplied to context methods.
permission java.net.SocketPermission "host[:port]", "connect,accept";
For each host/port named in the URL strings in References and javaCodebase attributes stored with Serializable objects.

Copyright © 1999-2001 Sun Microsystems, Inc., All Rights Reserved.


JNDI/RMI Registry Service Provider

RMI Registry Service Provider for the
Java Naming and Directory InterfaceTM (JNDI)

Please send feedback to jndi@java.sun.com

Table of Contents

  • Introduction
  • Environment Properties
  • Names
  • RMI URLs
  • RMI URL Format
  • API Mapping
  • Bindings
  • Usage Examples
  • Security Considerations

Introduction

The RMI registry service provider allows JNDI applications to access remote objects registered with the RMI registry. Given the location of a registry, the provider will create a naming context with bindings for the objects registered there. Such a context may be bound into another JNDI-accessible namespace (such as LDAP, for example). References to individual remote objects may likewise be bound into another namespace.

A key benefit of binding registry contexts into other namespaces is location-independent access to remote objects: the RMI clients do not need to know the registry's host name or port number. RMI servers can take advantage of this to advertise their services to potential clients. In addition, remote objects can be linked into the same enterprise directory that is used to access information about people, organizations, and network resources.

With this service provider installed, JNDI subsumes the functionality of the java.rmi.Naming class.

This document describes the features of the RMI registry service provider.

Environment Properties

The following JNDI environment properties are used by the RMI registry service provider. See the JNDI documentation for a description of how properties are initialized using the environment properties, system properties, applet parameters, and resource files.

java.naming.factory.initial
This property is used to select the registry service provider as the initial context. It is not used by the provider itself. It specifies the class name of the initial context factory for the provider.

For example:

env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.rmi.registry.RegistryContextFactory");

This property is used in conjunction with the java.naming.provider.url property. This property must be set if you are using the registry as the initial context. The only exception is if you supply only URLs to the initial context, in which case, you don't need to specify this property. See RMI URLs for details.

java.naming.provider.url
This property specifies the location of the registry when the registry is being used as the initial context. It's value is an RMI URL with no object name component (see RMI URL Format below).

For example:

env.put(Context.PROVIDER_URL, "rmi://server:1099");

The default value of this property is "rmi:", signifying a registry running on port 1099 of the local host.

This property is used in conjunction with the java.naming.factory.initial property.

java.naming.factory.state
A colon-separated list of the fully qualified class names of state factory classes used to get an object's state for storing given the object itself. You can use this mechanism to transform an object into forms that can be stored into the registry. The RMI registry service provider supports storing java.rmi.Remote, javax.naming.Reference, and javax.naming.Referenceable objects. See javax.naming.spi.NamingManager.getStateToBind() for details.
java.naming.factory.object
A colon-separated list of the fully qualified class names of object factory classes for transforming objects read from the registry. You can use this mechanism to transform an object into forms expected by the application. See javax.naming.spi.NamingManager.getObjectInstance() for details.
java.naming.rmi.security.manager
This property, when set to any value, indicates that the provider should attempt to install the RMISecurityManager. See the Security Considerations section below.

Names

The RMI registry supports a flat namespace. Since there is no hierarchy, every name is atomic. Each name may be composed of any characters, and case is significant.

Names are passed as arguments to the methods of a registry context, and are returned as the results of those methods, either as Name objects or as strings. When a Name object is used, it should have a single component whose value is the atomic name that will be passed on to the registry. When a string is used as a name, it is interpreted as the string representation of a composite name. So if ctx is a registry context, for example, then the following two unbind operations are equivalent:

String name = ...
ctx.unbind(name);
ctx.unbind(new CompositeName(name));
Care must be taken with names containing any of the four meta-characters that are treated specially during the parsing of composite names: '/', '\\', '"', and '\''. These characters must be properly escaped or quoted. The atomic name X/Y, for example, may be represented as the composite name X\/Y so as not to be mistaken for a two-component name with X and Y as its components. See CompositeName for more information.

RMI URLs

JNDI provides support for resolving URLs that name objects. The registry service provider allows RMI URLs to be used as names in this manner. This provides a generalization of the java.rmi.Naming functionality, only using the more general JNDI interface.

The class com.sun.jndi.url.rmi.rmiURLContextFactory implements a URL context factory for RMI URLs. This allows an RMI URL to be passed as a name to the default JNDI initial context.

RMI URL Format

The format of an RMI URL is one of the following:

   rmi://[host][:port][/[object]]

   rmi:[/][object]
If the object name is absent, then the URL names the registry at the given host and port. Otherwise, it names the remote object registered at that registry under the name provided.

If the host is omitted, the local host is assumed. If the port is omitted, the default registry port 1099 is assumed.

API Mapping

The registry service provider implements the java.naming.Context and java.naming.Referenceable interfaces. Context and Referenceable methods are mapped onto registry operations as described below.

lookup()
lookupLink()
The java.rmi.Registry.lookup() method is called. If the returned object is a wrapper around a javax.naming.Reference, the referenced object is created using javax.naming.spi.NamingManager.getObjectInstance(). JNDI links are not currently supported.
bind()
The java.rmi.Registry.bind() method is called. State factories are first consulted through javax.naming.spi.NamingManager.getStateToBind(). The object being bound must be of type java.rmi.Remote, javax.naming.Reference, or javax.naming.Referenceable. If the object is a javax.naming.Reference or javax.naming.Referenceable, its reference is wrapped in a Remote wrapper and then bound (see Binding Objects into the Registry below).
rebind()
The java.rmi.Registry.rebind() method is called. Objects are otherwise treated as for the JNDI bind() operation.
unbind()
The java.rmi.Registry.unbind() method is called.
rename()
This method is implemented as a sequence of JNDI operations: lookup(), bind(), unbind(). The sequence is not performed atomically.
list()
The java.rmi.Registry.list() method is called. As this provides no information about the types of the bound objects, each javax.naming.NameClassPair returned has the generic java.lang.Object as its class name.
listBindings()
The java.rmi.Registry.list() method is called. As each javax.naming.Binding is read from the resulting enumeration, java.rmi.Registry.lookup() is called and passed through javax.naming.spi.NamingManager.getObjectInstance().
createSubcontext()
destroySubcontext()
These operations are not supported.
getNameParser()
Returns a name parser for case-sensitive atomic names.
getNameInNamespace()
Returns the empty string (the name of the registry).
composeName()
Returns the composition of the two names.
addToEnvironment()
The specified property is added to the context's environment. If the java.naming.rmi.security.manager property is added, the provider will attempt to install the default RMI security manager (see Security Considerations). Other properties may be added or changed in the environment, but have no additional effect on the context.
removeFromEnvironment()
The specified property is removed from the context's environment. The context is otherwise unaffected.
close()
Clears internal state used by the provider, but otherwise has no immediate effect.
getReference()
If this context was constructed from a reference, a clone of that reference is returned. Otherwise a new reference for the context is returned, providing that the host name can be determined and is not "localhost" (see Binding Registry Contexts and Remote Objects below).

Bindings

Binding Objects into the Registry

An object may be bound into a registry context if it implements the java.rmi.Remote interface. An object may also be bound if it is a JNDI Reference object, or if it implements the Referenceable interface (in which case the corresponding reference will be bound in place of the object itself).

Binding Registry Contexts and Remote Objects

Each RMI registry context implements the Referenceable interface. It may therefore be bound into any JNDI-accessible namespace that can store Referenceable objects. A reference to an individual remote object that is registered with a registry may also be constructed, allowing that object to be bound into another namespace.

The class com.sun.jndi.rmi.registry.RegistryContextFactory implements the object factory that converts registry references into the corresponding registry contexts or remote objects.

For a registry context to be constructed, the registry's URL must be determined. This URL may come from the java.naming.provider.url property, or may be passed as a name to the initial context, or may be embedded in a registry reference. If the URL contains no host name or uses the host name "localhost", then the registry context's getReference() method is unable to return a reference for the context. Such a registry context, therefore, cannot be bound into another namespace.

Registry Reference Format

A JNDI reference for an RMI registry contains a list of string addresses (class StringRefAddr), each tagged with the type "URL". Each address contains an RMI URL locating either a registry, or a remote object registered with a registry (see RMI URL Format above).

When multiple URLs appear within a single reference, each represents an alternative address for the same logical resource. The order of the addresses is not significant. Addresses not of class StringRefAddr, or not of address type "URL", are ignored.

Usage Examples

Example 1

To create an initial context that accesses a registry, set the properties java.naming.factory.initial and java.naming.provider.url as described in Environment Properties above. Then the names stored in the registry, for example, may be listed as follows:

Context ictx = new InitialContext(env);
NamingEnumeration enum = ictx.list("");

Example 2

Instead of using the properties as above, you may pass an RMI URL as a name to resolve in the default initial context:

Context registryCtx = (Context)ictx.lookup("rmi://host");

Example 3

A registry context may be bound into another JNDI-accessible namespace. To bind registryCtx (from the preceding example) into an LDAP directory, for example:

Context ldapCtx = (Context)ictx.lookup("ldap://server/o=sun,c=us");
ldapCtx.bind("cn=rmi", registryCtx);
If the names R1 and R2 are bound in this registry, then a JNDI client browsing the LDAP namespace will see R1 and R2 beneath the cn=rmi entry.

Example 4

A remote object that is registered with an RMI registry may be bound into another JNDI-accessible namespace by constructing a reference for that object. If the variable obj holds the object named R1 from the preceding examples, it may be bound into an LDAP directory as follows:

RefAddr addr = new StringRefAddr("URL", "rmi://host/R1");
Reference ref = new Reference(obj.getClass().getName(), addr);
ldapCtx.bind("cn=R1", ref);

Security Considerations

Security Manager

The usual security considerations of RMI apply. For RMI to dynamically load classes from a remote server, a security manager must first be installed. This can be done in the same way as it would for any other RMI application. See the JavaTM Remote Method Invocation Specification. Or, if the environment property java.naming.rmi.security.manager is passed to the provider, then the provider will attempt to install the RMISecurityManager itself.

Permissions

The application using JNDI and the RMI registry provider must be granted the following permissions:

permission java.net.SocketPermission "host[:port]", "connect";
For each host/port identified in the java.naming.provider.url property and in URL string names supplied to context methods.

permission java.net.SocketPermission "host[:port]", "connect,accept";
For each host/port identified in the URL strings in javax.naming.References.

permission java.lang.RuntimePermission "setSecurityManager";
If using the java.naming.rmi.security.manager environment property, which asks the RMI registry provider to install the RMISecurityManager.

Copyright © 1999-2001 Sun Microsystems, Inc., All Rights Reserved.


The Java Naming and Directory InterfaceTM technology (JNDI) provides a unified interface to multiple naming and directory services. As part of the Java enterprise API set, JNDI enables seamless connectivity to heterogeneous enterprise naming and directory services. Developers can now build powerful and portable directory-enabled Java applications using this industry-standard interface.

The JNDI specification was developed by Sun Microsystems with a number of leading industry partners, including Novell, Netscape, SCO, and BEA.

The 1.2 version of the specification and reference implementation are now available for download at the Java Software Web site.

Technical Overview

Directory services play a vital role in Intranets and Internets by providing access to a variety of information about users, machines, networks, services, and applications. By its very nature, a directory service incorporates a naming facility for providi ng human understandable namespaces that characterize the arrangement and identification of the various entities.

The computing environment of an enterprise typically consists of several naming facilities often representing different parts of a composite namespace. For example, the Internet Domain Name System (DNS) may be used as the top-level naming facilit y for different organizations within an enterprise. The organizations themselves may use a directory service such as LDAP or NDS or NIS. From a user's perspective, there is one namespace consisting of composite names. URLs are examples of composite names because they span namespaces of multiple naming facilities. Applications which use directory services must support this user perspective.

Many Java application developers can benefit from a directory service API that is not only independent of the particular directory or naming service implementation, but also enables seamless access to directory objects through multiple naming facilities. In fact, an application can attach its own objects to the namespace. Such a facility enables any Java application to discover and retrieve objects of any type.

JNDI provides directory and naming functionality to Java applications. It is defined to be independent of any specific directory service implementation. Thus, a variety of directories, new and existing ones in the installed base, can be a ccessed in a common way.

JNDI also defines a service provider's interface which allows various directory and naming service drivers to be plugged in.

Examples

Here are two examples to briefly illustrate some of the more commonly used features of JNDI.

An application that wants to access a printer needs the corresponding printer object. This is simply done as follows:

prt = (Printer)
    building7.lookup("puffin");
prt.print(document);

where building7 is the naming context representing a physical building that provides a convenient context for referring to the printers.

JNDI does all the work of locating the information needed to construct the printer object.

As another example, an application that wants to find a person's phone numbers, which are stored in the organization's directory, can simply do:

String[] attrs = {"workPhone", "cellPhone", "faxNumber"};
bobsPhones = directory.getAttributes("cn=Bob,o=Widget,c=US", attrs);

If there may be several Bobs in the Widget organization, the application can search the organization's directory to find the right Bob as follows:

bob = directory.search("o=Widget,c=US","(cn=Bob)", controls);

Other application examples include access to security credentials stored in an enterprise-wide directory service, access to electronic mail addresses, and access to addresses of a variety of existing services such as databases, network file systems, etc.

Overview of Interfaces

The Naming Interface - javax.naming

Context is the core interface that specifies a naming context. It defines basic operations such as adding a name-to-object binding, looking up the object bound to a specified name, listing the bindings, removing a name-to-object binding, crea ting and destroying subcontexts of the same type, etc.

Context.lookup() is the most commonly used operation. The context implementation can return an object of whatever class is required by the Java application. For example, an application might use the name of a printer to look up the correspond ing Printer object, and then print to it directly:

Printer printer = (Printer)
 ctx.lookup("treekiller");
printer.print(report);

The application is not exposed to any naming service implementation. In fact, a new type of naming service can be introduced without requiring the application to be modified or even disrupted if it is running.

The Directory Interface - javax.naming.directory

Directory Objects and Attributes. The DirContext interface enables the directory capability by defining methods for examining and updating attributes associated with a directory object. Each directory object contains a set of zero or more objects of class Attribute. Each attribute is denoted by a string identifier and can have zero or more values of any type.

Directory Objects as Naming Context. The DirContext interface also behaves as a naming context by extending the Context interface. This means that any directory object can also provide a naming context. In addition to a directory object keeping a variety of information about a person, for example, it is also a natural naming context for resources associated with that person: a person's printers, file system, calendar, etc.

Searches. The DirContext interface supports content-based searching of directories. In the simplest and most common form of usage, the application specifies a set of attributes - possibly with specific values - to match. It then invo kes the DirContext.search() method on the directory object, which returns the matching directory objects along with the requested attributes.

The Event Interface - javax.naming.event

Naming Events. The NamingEvent class represents an event generated by a naming or directory service. Examples of a NamingEvent are a change to a directory entry's attribute or a rename of a directory entry.

Naming Listeners. A NamingListener is an object that registers interests in NamingEvents. Listeners register with a context to receive notification of changes in the context, its children, or its subtree.

The LDAP Interface - javax.naming.ldap

The LdapContext interface allows an application to use LDAP v3-specific features, including extensions and controls, not already covered by the more generic DirContext interface.

The Service Provider Interface - javax.naming.spi

The JNDI SPI provides the means by which different naming/directory service providers can develop and hook up their implementations so that the corresponding services are accessible from applications that use JNDI. In add ition, because JNDI allows specification of names that span multiple namespaces, if one service provider implementation needs to interact with another in order to complete an operation, the SPI provides methods that allow different provid er implementations to cooperate to complete client JNDI operations.

http://java.sun.com/jndi

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


B.2 Read An Entry

B.2.1 Read Using LDAP C-API B.2.2 Read Using JNDI

B.2.1 Read Using LDAP C-API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Search the directory for the specific entry
 * “cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US”.
 * Retrieve all attributes from the entry.
 *
 */
#include “examples.h”
int
main( int argc, char **argv )
{
    LDAP        *ld;
    LDAPMessage *result, *e;
    BerElement  *ber;
    char        *a, *dn;
    char        **vals;
    int         i;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( “ldap_init” );
        return( 1 );
    }
    /* authenticate to the directory as nobody */
    if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_simple_bind_s” );
        return( 1 );
    }
    /* search for Babs’ entry */
    if ( ldap_search_s( ld, ENTRYDN, LDAP_SCOPE_SUBTREE,
            “(objectclass=*)”, NULL, 0, &result ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_search_s” );
        return( 1 );
    }
    /* for each entry print out name + all attrs and values */
    for ( e = ldap_first_entry( ld, result ); e != NULL;
            e = ldap_next_entry( ld, e ) ) {
        if ( (dn = ldap_get_dn( ld, e )) != NULL ) {
            printf( “dn: %s\n”, dn );
            ldap_memfree( dn );
        }
        for ( a = ldap_first_attribute( ld, e, &ber );
                a != NULL; a = ldap_next_attribute( ld, e, ber ) ) {
            if ((vals = ldap_get_values( ld, e, a)) != NULL ) {
                for ( i = 0; vals[i] != NULL; i++ ) {
                    printf( “%s: %s\n”, a, vals[i] );
                }
                ldap_value_free( vals );
            }
            ldap_memfree( a );
        }
        if ( ber != NULL ) {
            ber_free( ber, 0 );
        }
        printf( “\n” );
    }
    ldap_msgfree( result );
    ldap_unbind( ld );
    return( 0 );
}

B.2.2 Read Using JNDI

/*
 * @(#)Rdentry.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */
import java.util.Hashtable;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Search the directory for the specific entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * Retrieve all attributes from the entry.
 *
 * [Equivalent to rdentry.c in Netscape SDK]
 */
class Rdentry {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Rdentry
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* Read Babs' entry */
        Attributes attrs = ctx.getAttributes(Env.ENTRYDN);
        if (attrs == null) {
            System.out.println(Env.ENTRYDN + "has no attributes");
        } else {
            /* print each attribute */
            for (NamingEnumeration ae = attrs.getAll();
                 ae.hasMoreElements();) {
                Attribute attr = (Attribute)ae.next();
                String attrId = attr.getID();
                /* print each value */
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println(attrId + ": " + vals.nextElement()))
                    ;
            }
        }
    } catch (NamingException e) {
        System.err.println("Rdentry example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


B.3 Get Attributes

B.3.1 Get Attributes Using LDAP C API B.3.2 Get Attributes Using JNDI

B.3.1 Get Attributes Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Retrieve several attributes of a particular entry.
 */
#include “examples.h”

int
main( int argc, char **argv )
{
    LDAP                *ld;
    LDAPMessage         *result, *e;
    char                **vals, *attrs[ 5 ];
    int                 i;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( “ldap_init” );
        return( 1 );
    }
    attrs[ 0 ] = “cn”;         /* Get canonical name(s) (full name) */
    attrs[ 1 ] = “sn”;         /* Get surname(s) (last name) */
    attrs[ 2 ] = “mail”;       /* Get email address(es) */
    attrs[ 3 ] = “telephonenumber”;      /* Get telephone number(s) */
    attrs[ 4 ] = NULL;
    if ( ldap_search_s( ld, ENTRYDN, LDAP_SCOPE_BASE,
            “(objectclass=*)”, attrs, 0, &result ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_search_s” );
        return( 1 );
    }
    /* print it out */
    if (( e = ldap_first_entry( ld, result )) != NULL ) {
        if (( vals = ldap_get_values( ld, e, “cn” )) != NULL ) {
            printf( “Full name:\n” );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( “\t%s\n”, vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, “sn” )) != NULL ) {
            printf( “Last name (surname):\n” );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( “\t%s\n”, vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, “mail” )) != NULL ) {
            printf( “Email address:\n” );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( “\t%s\n”, vals[i] );
            }
            ldap_value_free( vals );
        }
        if (( vals = ldap_get_values( ld, e, “telephonenumber” )) != NULL ) {
            printf( “Telephone number:\n” );
            for ( i = 0; vals[i] != NULL; i++ ) {
                printf( “\t%s\n”, vals[i] );
            }
            ldap_value_free( vals );
        }
    }
    ldap_msgfree( result );
    ldap_unbind( ld );
    return( 0 );
}

B.3.2 Get Attributes Using JNDI

/*
 *
 * @(#)Getattrs.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */

import java.util.Hashtable;
import java.util.Enumeration;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Retrieve several attributes of a particular entry.
 *
 * [equivalent to getattrs.c in Netscape SDK]
 */
class Getattrs {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * For example,
     * This could also be set by using the -D option to the java program.
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Getattrs
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        String[] attrs = new String[4];
        attrs[ 0 ] = "cn";              /* Get canonical name(s) (full name) */
        attrs[ 1 ] = "sn";              /* Get surname(s) (last name) */
        attrs[ 2 ] = "mail";            /* Get email address(es) */
        attrs[ 3 ] = "telephonenumber"; /* Get telephone number(s) */
        Attributes result = ctx.getAttributes(Env.ENTRYDN, attrs);
        if (result == null) {
            System.out.println(Env.ENTRYDN +
                               "has none of the specified attributes.");
        } else {
            /* print it out */
            Attribute attr = result.get("cn");
            if (attr != null) {
                System.out.println("Full name:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("sn");
            if (attr != null) {
                System.out.println("Last name (surname):" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("mail");
            if (attr != null) {
                System.out.println("Email address:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
            attr = result.get("telephonenumber");
            if (attr != null) {
                System.out.println("Telephone number:" );
                for (NamingEnumeration vals = attr.getAll();
                     vals.hasMoreElements();
                     System.out.println("\t" + vals.nextElement()))
                    ;
            }
        }
    } catch (NamingException e) {
        System.err.println("Getattrs example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


B.4 Compare An Attribute

B.4.1 Compare Using LDAP C API B.4.2 Compare Using JNDI

B.4.1 Compare Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Use ldap_compare() to compare values agains values contained in entry
 * “cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US”.
 * We test to see if (1) the value “person” is one of the values in the
 * objectclass attribute (it is), and if (2) the value “xyzzy” is in the
 * objectlass attribute (it isn’t, or at least, it shouldn’t be).
 *
 */
#include “examples.h”
int
main( int main, char **argv )
{
    LDAP        *ld;
    int         rc;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( “ldap_init” );
        return( 1 );
    }
    /* authenticate to the directory as nobody */
    if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_simple_bind_s” );
        return( 1 );
    }
    /* compare the value “person” against the objectclass attribute */
    rc = ldap_compare_s( ld, ENTRYDN, “objectclass”, “person” );
    switch ( rc ) {
    case LDAP_COMPARE_TRUE:
        printf( “The value \”person\” is contained in the objectclass “
                “attribute.\n” );
        break;
    case LDAP_COMPARE_FALSE:
        printf( “The value \”person\” is not contained in the objectclass “
                “attribute.\n” );
        break;
    default:
        ldap_perror( ld, “ldap_compare_s” );
    }
    /* compare the value “xyzzy” against the objectclass attribute */
    rc = ldap_compare_s( ld, ENTRYDN, “objectclass”, “xyzzy” );
    switch ( rc ) {
    case LDAP_COMPARE_TRUE:
        printf( “The value \”xyzzy\” is contained in the objectclass “
                “attribute.\n” );
        break;
    case LDAP_COMPARE_FALSE:
        printf( “The value \”xyzzy\” is not contained in the objectclass “
                “attribute.\n” );
        break;
    default:
        ldap_perror( ld, “ldap_compare_s” );
    }
    ldap_unbind( ld );
    return( 0 );
}

B.4.2 Compare Using JNDI

/*
 * @(#)Compare.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */

import java.util.Hashtable;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Use search() to compare values against values contained in entry
 * "cn=Barbara Jensen, ou=Product Development, o=Ace Industry, c=US".
 * We test to see if (1) the value "person" is one of the values in the
 * objectclass attribute (it is), and if (2) the value "xyzzy" is in the
 * objectlass attribute (it isn't, or at least, it shouldn't be).
 *
 * [equivalent to compare.c in Netscape SDK]
 *
 */
class Compare {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *    java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Compare
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    DirContext ctx = null;
    SearchControls ctls = new SearchControls();
    ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
    ctls.setReturningAttributes(new String[0]);  // do not return any attrs
    try {
        /* get a handle to an Initial DirContext */
        ctx = new InitialDirContext(env);
    } catch (NamingException e) {
        System.err.println("Cannot get initial context.");
        return;
    }
    try {
        NamingEnumeration results =
            ctx.search(Env.ENTRYDN, "objectclass=person", ctls);
        if (results != null && results.hasMoreElements()) {
            System.out.println(
                "The value \"person\" is contained in the objectclass attribute.");
        } else {
            System.out.println(
          "The value \"person\" is not contained in the objectclass attribute." );
        }
    } catch (NamingException e) {
        System.err.println("Comparison of value person failed.");
    }
    try {
        NamingEnumeration results =
            ctx.search(Env.ENTRYDN, "objectclass=xyzzy", ctls);

        if (results != null && results.hasMoreElements()) {
            System.out.println(
                "The value \"xyzzy\" is contained in the objectclass attribute.");
        } else {
            System.out.println(
          "The value \"xyzzy\" is not contained in the objectclass attribute." );
        }
    } catch (NamingException e) {
        System.err.println("Comparison of value xyzzy failed.");
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


B.5 Modify Attributes

B.5.1 Modify Attributes Using LDAP C API B.5.2 Modify Attributes Using JNDI

B.5.1 Modify Attributes Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Modify an entry:
 *  - replace any existing values in the “mail” attribute with “babs@ace.com”
 *  - add a new value to the “description” attribute
 */
#include “examples.h”
int
main( int argc, char **argv )
{
    LDAP        *ld;
    LDAPMod     mod0;
    LDAPMod     mod1;
    LDAPMod     *mods[ 3 ];
    char        *vals0[ 2 ];
    char        *vals1[ 2 ];
    time_t      now;
    char        buf[ 128 ];
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( “ldap_init” );
        return( 1 );
    }
    /* authenticate */
    if ( ldap_simple_bind_s( ld, ENTRYDN, ENTRYPW ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_simple_bind_s” );
        return( 1 );
    }
    /* construct the list of modifications to make */
    mod0.mod_op = LDAP_MOD_REPLACE;
    mod0.mod_type = “mail”;
    vals0[0] = “babs@ace.com”;
    vals0[1] = NULL;
    mod0.mod_values = vals0;
    mod1.mod_op = LDAP_MOD_ADD;
    mod1.mod_type = “description”;
    time( &now );
    sprintf( buf, “This entry was modified with the modattrs program on %s”,
            ctime( &now ));
    /* Get rid of \n which ctime put on the end of the time string */
    if ( buf[ strlen( buf ) - 1 ] == ‘\n’ ) {
        buf[ strlen( buf ) - 1 ] = ‘\0’;
    }
    vals1[ 0 ] = buf;
    vals1[ 1 ] = NULL;
    mod1.mod_values = vals1;
    mods[ 0 ] = &mod0;
    mods[ 1 ] = &mod1;
    mods[ 2 ] = NULL;
    /* make the change */
    if ( ldap_modify_s( ld, ENTRYDN, mods )
            != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_modify_s” );
        return( 1 );
    }
    ldap_unbind( ld );
    printf( “modification was successful\n” );
    return( 0 );
}

Modify Attributes Using JNDI

/*
 * @(#)Modattrs.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */

import java.util.Hashtable;
import java.util.Date;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Modify an entry:
 *  - replace any existing values in the "mail" attribute with "babs@ace.com"
 *  - add a new value to the "description" attribute
 *
 * [equivalent to modattrs.c in Netscape SDK]
 */
class Modattrs {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Modattrs
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    /* specify authentication information */
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, Env.MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, Env.MGR_PW);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* construct the list of modifications to make */
        ModificationItem[] mods = new ModificationItem[2];
        Attribute mod0 = new BasicAttribute("mail", "babs@eng");
        // Update mail attribute
        mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, mod0);
        // Add another value to description attribute
        Attribute mod1 =
            new BasicAttribute("description",
                          "This entry was modified with the Modattrs program on " +
                          (new Date()).toString());
        mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE, mod1);
         /* Delete the description attribute altogether */
        /*
        Attribute mod1 =  new BasicAttribute("description");
        mods[2] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, mod1);
    */
        /* make the change */
        ctx.modifyAttributes(Env.ENTRYDN, mods);
        System.out.println( "modification was successful." );
    } catch (NamingException e) {
        System.err.println("modification failed. " + e);
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


B.6 Rename An Entry

B.6.1 Rename Using LDAP C API

B.6.2 Rename Using JNDI

B.6.1 Rename Using LDAP C API

/*
 * Copyright (c) 1996.  Netscape Communications Corporation.  All
 * rights reserved.
 *
 * Modify the RDN (relative distinguished name) of an entry.  In this
 * example, we change the dn “cn=Jacques Smith, o=Ace Industry, c=US”
 * to “cn=Jacques M Smith, o=Ace Industry, c=US”.
 *
 * Since it is an error to either (1) attempt to modrdn an entry which
 * does not exist, or (2) modrdn an entry where the destination name
 * already exists, we take some steps, for this example, to make sure
 * we’ll succeed.  We (1) add “cn=Jacques Smith” (if the entry exists,
 * we just ignore the error, and (2) delete “cn=Jacques M Smith” (if the
 * entry doesn’t exist, we ignore the error).
 *
 * We pass 0 for the “deleteoldrdn” argument to ldap_modrdn2_s().  This
 * means that after we change the RDN, the server will put the value
 * “Jacques Smith” into the cn attribute of the new entry, in addition to
 * “Jacques M Smith”.
 */
#include “examples.h”
#define        NMODS        4
unsigned long        global_counter = 0;
static void free_mods( LDAPMod **mods );
int
main( int argc, char **argv )
{
    LDAP                    *ld;
    char                    *dn, *ndn, *nrdn;
    int                     i;
    int                     rc;
    LDAPMod                 **mods;
    /* Values we’ll use in creating the entry */
    char *objectclass_values[] = { “top”, “person”, “organizationalPerson”,
                                   “inetOrgPerson”, NULL };
    char *cn_values[] = { “Jacques Smith”, NULL };
    char *sn_values[] = { “Smith”, NULL };
    char *givenname_values[] = { “Jacques”, NULL };
    /* Specify the DN we’re adding */
    dn = “cn=Jacques Smith, o=Ace Industry, c=US”;
    /* the destination DN */
    ndn = “cn=Jacques M Smith, o=Ace Industry, c=US”;
    /* the new RDN */
    nrdn = “cn=Jacques M Smith”;
    /* get a handle to an LDAP connection */
    if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
        perror( “ldap_init” );
        return( 1 );
    }
    /* authenticate to the directory as the Directory Manager */
    if ( ldap_simple_bind_s( ld, MGR_DN, MGR_PW ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_simple_bind_s” );
        return( 1 );
    }
    if (( mods = ( LDAPMod ** ) malloc(( NMODS + 1 ) * sizeof( LDAPMod *)))
            == NULL ) {
        fprintf( stderr, “Cannot allocate memory for mods array\n” );
        return( 1 );
    }
    /* Construct the array of values to add */
    for ( i = 0; i < NMODS; i++ ) {
        if (( mods[ i ] = ( LDAPMod * ) malloc( sizeof( LDAPMod ))) == NULL ) {
            fprintf( stderr, “Cannot allocate memory for mods element\n” );
            return( 1 );
        }
    }
    mods[ 0 ]->mod_op = 0;
    mods[ 0 ]->mod_type = “objectclass”;
    mods[ 0 ]->mod_values = objectclass_values;
    mods[ 1 ]->mod_op = 0;
    mods[ 1 ]->mod_type = “cn”;
    mods[ 1 ]->mod_values = cn_values;
    mods[ 2 ]->mod_op = 0;
    mods[ 2 ]->mod_type = “sn”;
    mods[ 2 ]->mod_values = sn_values;
    mods[ 3 ]->mod_op = 0;
    mods[ 3 ]->mod_type = “givenname”;
    mods[ 3 ]->mod_values = givenname_values;
    mods[ 4 ] = NULL;

    /* Add the entry */
    if (( rc = ldap_add_s( ld, dn, mods )) != LDAP_SUCCESS ) {
        /* If entry exists already, fine.  Ignore this error. */
        if ( rc == LDAP_ALREADY_EXISTS ) {
            printf( “Entry \”%s is already in the directory.\n”, dn );
        } else {
            ldap_perror( ld, “ldap_add_s” );
            free_mods( mods );
            return( 1 );
        }
    } else {
        printf( “Added entry \”%s\”.\n”, dn );
    }
    free_mods( mods );
    /* Delete the destination entry, for this example */
    if (( rc = ldap_delete_s( ld, ndn )) != LDAP_SUCCESS ) {
        /* If entry does not exist, fine.  Ignore this error. */
        if ( rc == LDAP_NO_SUCH_OBJECT ) {
            printf( “Entry \”%s\” is not in the directory.  “
                    “No need to delete.\n”, ndn );
        } else {
            ldap_perror( ld, “ldap_delete_s” );
            return( 1 );
        }
    } else {
        printf( “Deleted entry \”%s\”.\n”, ndn );
    }
    /* Do the modrdn operation */
    if ( ldap_modrdn2_s( ld, dn, nrdn, 0 ) != LDAP_SUCCESS ) {
        ldap_perror( ld, “ldap_modrdn2_s” );
        return( 1 );
    }
    printf( “The modrdn operation was successful.  Entry\n”
            “\”%s\” has been changed to\n”
            “\”%s\”.\n”, dn, ndn );
    ldap_unbind( ld );
    return 0;
}

/*
 * Free a mods array.
 */
static void
free_mods( LDAPMod **mods )
{
    int i;

    for ( i = 0; i < NMODS; i++ ) {
        free( mods[ i ] );
    }
    free( mods );
}

B.6.2 Rename Using JNDI

/*
 * @(#)Modrdn.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */

import java.util.Hashtable;
import java.util.Date;

import javax.naming.*;
import javax.naming.directory.*;
/*
 * Modify the RDN (relative distinguished name) of an entry.  In this
 * example, we change the dn "cn=Jacques Smith, o=Ace Industry, c=US"
 * to "cn=Jacques M Smith, o=Ace Industry, c=US".
 *
 * Since it is an error to either (1) attempt to modrdn an entry which
 * does not exist, or (2) modrdn an entry where the destination name
 * already exists, we take some steps, for this example, to make sure
 * we'll succeed.  We (1) add "cn=Jacques Smith" (if the entry exists,
 * we just ignore the error, and (2) delete "cn=Jacques M Smith" (if the
 * entry doesn't exist, we ignore the error).
 *
 * After renaming, we add back the attribute "Jacques Smith" into the cn
 * attribute.
 *
 * [based on modrdn.c of Netscape  SDK]
 */
class Modrdn {
public static void main(String[] args) {
    /* Values we'll use in creating the entry */
    Attribute objClasses = new BasicAttribute("objectclass");
    objClasses.add("top");
    objClasses.add("person");
    objClasses.add("organizationalPerson");
    objClasses.add("inetOrgPerson");
    Attribute cn = new BasicAttribute("cn", "Jacques Smith");
    Attribute sn = new BasicAttribute("sn", "Smith");
    Attribute givenNames = new BasicAttribute("givenname", "Jacques");
    /* Specify the DN we're adding */
    String dn = "cn=Jacques Smith, " + Env.MY_MODBASE;
    /* the destination DN */
    String ndn = "cn=Jacques M Smith, " + Env.MY_MODBASE;
    /* the new RDN */
    String nrdn = "cn=Jacques M Smith";
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *       Modrdn
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    /* specify authentication information */
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, Env.MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, Env.MGR_PW);
    DirContext ctx = null;
    try {
        /* get a handle to an Initial DirContext */
        ctx = new InitialDirContext(env);
        Attributes orig = new BasicAttributes();
        orig.put(objClasses);
        orig.put(cn);
        orig.put(sn);
        orig.put(givenNames);
        /* Add the entry */
        ctx.createSubcontext(dn, orig);
        System.out.println( "Added entry " + dn + ".");
    } catch (NameAlreadyBoundException e) {
        /* If entry exists already, fine.  Ignore this error. */
        System.out.println("Entry " + dn + " already exists, no need to add");
    } catch (NamingException e) {
        System.err.println("Modrdn: problem adding entry." + e);
        System.exit(1);
    }
    try {
        /* Delete the destination entry, for this example */
        ctx.destroySubcontext(ndn);
        System.out.println( "Deleted entry " + ndn + "." );
    } catch (NameNotFoundException e) {
        /* If entry does not exist, fine.  Ignore this error. */
        System.out.println( "Entry " + ndn + " is not in the directory.  " +
                    "No need to delete.");
    } catch (NamingException e) {
        System.err.println("Modrdn: problem deleting entry." + e);
        System.exit(1);
    }

    /* Do the modrdn operation */
    try {
        ctx.rename(dn, ndn);
        System.out.println("The modrdn operation was successful.  Entry " +
                           dn + " has been changed to " + ndn + ".");
    } catch (NamingException e) {
        System.err.println("Modify operation failed." + e);
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


CONTENTS | PREV | NEXT JNDI API

Appendix 1:
JNDI Standard Environment Properties

JNDI Environment Properties 1

Environment Configuration

java.naming.applet

(Context.APPLET)

An instance of java.applet.Applet whose applet parameters are used to obtain some environment properties.
See Chapter 6 for details. No default.

Program Configuration 2

java.naming.factory.initial

(Context.INITIAL_CONTEXT_FACTORY)

Class name of initial context factory to use.

See InitialContext .

No default.

java.naming.factory.object

(Context.OBJECT_FACTORIES)

Colon-separated list of class names of object factory classes to use.

See NamingManager.getObjectInstance() and DirectoryManager.getObjectInstance() .

Defaults to empty list.

java.naming.factory.state

(Context.STATE_FACTORIES)

Colon-separated list of class names of state factory classes to use.

See NamingManager.getStateToBind() and DirectoryManager.getStateToBind() .

Defaults to empty list.

java.naming.factory.control

(LdapContext.CONTROL_FACTORIES)

Colon-separated list of class names of response control factory classes to use.

See ControlFactory.getControlInstance() .

Defaults to empty list.

java.naming.factory.url.pkgs

(Context.URL_PKG_PREFIXES)

Colon-separated list of package prefixes to use when loading in URL context factories. com.sun.jndi.url is always added to end of list.

See NamingManager.getURLContext() .

Defaults to empty list.

Access Configuration 3

java.naming.provider.url

(Context.PROVIDER_URL)

Specifies configuration information for provider to use.

Defaults to provider default, using provider's own configuration or discovery protocols.

java.naming.dns.url

(Context.DNS_URL)

Specifies the DNS host and domain names.

No default.

Service-Related

java.naming.authoritative

(Context.AUTHORITATIVE)

Specifies the authoritativeness of the service requested. If "true", specifies most authoritative source is to be used (e.g., bypass any caches, or bypass replicas in some systems). Otherwise, source need not be (but can be) authoritative.

Defaults to "false".

java.naming.batchsize

(Context.BATCHSIZE)

Specifies the preferred batch size to use when returning data via the service's protocol. This is a hint to the provider to return the results of operations in batches of the specified size, so that the provider can optimize its performance and usage of resources. It does not affect the total number or size of the data returned.

Defaults to provider default.

java.naming.referral

(Context.REFERRAL)

Specifies that referrals encountered by the service provider are to be followed automatically. If "follow", follow referrals automatically. If "ignore", ignore referrals encountered. If "throw", throw ReferralException when a referral is encountered.

Defaults to provider default.

Security

java.naming.security.protocol

(Context.SECURITY_PROTOCOL)

Security protocol to use for service.

Defaults to provider default.

java.naming.security.authentication

(Context.SECURITY_AUTHENTICATION)

Takes values "none", "simple", "strong", or a provider-specific string (e.g., "CRAM-MD5 DIGEST-MD5 EXTERNAL").

Defaults to provider default.

java.naming.security.principal

(Context.SECURITY_PRINCIPAL)

Identity of principal (e.g., user) for the authentication scheme.

Defaults to provider default.

java.naming.security.credentials

(Context.SECURITY_CREDENTIALS)

Principal's credentials for the authentication scheme.

The particular type of credentials is determined by the authentication scheme chosen. Examples of different types of credentials are passwords, keys, and certificates.

Defaults to provider default.

Internationalization

java.naming.language

(Context.LANGUAGE)

Specifies a colon-separated list of preferred language to use with this service (e.g., "en-US", "fr", "fr-CH", "ja-JP-kanji").

Languages are specified using tags defined in RFC 1766.

Defaults to provider default.

1. The Context and LdapContext interfaces define constants for these property names. The names of the constants are shown in parentheses below the property's string names.

2. These properties may be set in the Java runtime's system properties or in an applet's parameter list.

3. These properties may be set in the Java runtime's system properties or in an applet's parameter list.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


CONTENTS | PREV | NEXT JNDI API

Appendix B:

Examples for LDAP Programmers

This appendix contains sample JNDI programs intended to help a developer familiar with the LDAP C API. Starting with sample programs from the Netscape Directory SDK for accessing and updating the directory using the LDAP C API, we show the equivalent way of doing the same thing for Java applications using JNDI.

B.1 Search the Directory

B.2 Read An Entry

B.3 Get Attributes

B.4 Compare An Attribute

B.5 Modify Attributes

B.6 Rename An Entry

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


JNDI Change History

JNDI 1.2: Changes Since JNDI 1.1

  • Added javax.naming.event package.
  • Added javax.naming.ldap package.
  • Added support for configuration using resource files. See Chapter 6 of the JNDI API document.

API-related Changes

  • Added NamingEnumeration.close() for cancelling or terminating enumerations.
  • Added ReferralException.getReferralContext(Hashtable env) and ReferralException.retryReferral() to allow creation and retry of referral context with different environment properties.
  • Clarified how context methods that accept Name argument should deal with CompositeName and non CompositeName arguments. Specifically, instances of CompositeName are treated as composite name, while all others are treated as compound name.
  • Added Context.getNameInNamespace() for retrieving the full name of a context within its own namespace.
  • Clarified definition of the class factory location of a Reference object. Specifically, the location is a codebase, which consists of a list space-separated URLs.
  • Added support for ordered multivalued attributes to Attribute and BasicAttribute .
  • Added BasicAttributes.equals() and BasicAttributes.hashCode() .
  • Redefined semantics of DirContext.getSchemaClassDefinition() so that it returns a context that contains the DirContext objects of class definitions, rather than returning one (arbitrary) class definition.
  • Added protected InitialContext / InitialDirContext constructors to allow lazy initialization. Useful for subclass implementations.

SPI-related Changes

  • Added StateFactory / NamingManager.getStateToBind() , analogous to ObjectFactory / NamingManager.getObjectInstance() , for transforming an object's state before the object is bound in the naming/directory service.
  • Added interfaces DirObjectFactory and DirStateFactory to better support service providers that implement the DirContext interface. Added DirectoryManager.getObjectInstance() and DirectoryManager.getStateToStore() to use these interfaces.
  • Refined definition of NamingManager.getObjectInstance() to not treat URL strings specially. Instead, the URL should be wrapped inside a Reference whose RefAddr type is "URL".
  • Made ResolveResult implement Serializable .
  • Defined a special form of Reference called a next naming system (nns) reference for supporting "dynamic federation". This reference has a RefAddr type of "nns" and a content consisting of the resolved object.
  • Added the string constant NamingManager.CPE which names a property set by NamingManager.getContinuationContext() / DirectoryManager.getContinuationContext() . The value of this property is an instance of CannotProceedException . This is useful to service providers that implement federation by chaining the CPEs.
  • Defined a convention for service providers to use when naming environment properties. See Section 6.1.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


Legend for Class Diagram

In a class diagram, we visually distinguish the different kinds of Java entities, as follows:

The interface: A rounded rectangle

  1. The class: A rectangle
  2. The abstract class: A rectangle with an empty dot
  3. The final class: A rectangle with a black dot
  4. Classes with subclasses: A rectangle with a small black triangle on the lower right corner

Most of these elements are shown below. The class or interface being described in the current chapter is shaded grey (this is not applicable for package class diagrams). A solid line represents extends , while a dotted line represents implements .

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


Programmer's Guide to the Java 2D API

CONTENTS | PREV | NEXT

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


B.1 Search the Directory

B.1.1 Search Using LDAP C API B.1.2 Search Using JNDI

B.1.1 Search Using LDAP C API

/*
* Copyright (c) 1996. Netscape Communications Corporation. All
* rights reserved.
*
* Search the directory for all people whose surname (last name) is
* “Jensen”. Since the “sn” attribute is a caseignorestring (cis), case
* is not significant when searching.
*
*/

#include “examples.h”

int
main( int argc, char **argv )
{
LDAP *ld;
LDAPMessage *result, *e;
BerElement *ber;
char *a, *dn;
char **vals;
int i;

/* get a handle to an LDAP connection
  */
if ( (ld = ldap_init( MY_HOST, MY_PORT )) == NULL ) {
perror( “ldap_init” );
return( 1 );
}
/* authenticate to the directory as nobody */
if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
ldap_perror( ld, “ldap_simple_bind_s” );
return( 1 );
}
/* search for all entries with surname of Jensen */
if ( ldap_search_s( ld, MY_SEARCHBASE, LDAP_SCOPE_SUBTREE,
MY_FILTER, NULL, 0, &result ) != LDAP_SUCCESS ) {
ldap_perror( ld, “ldap_search_s” );
return( 1 );
}
/* for each entry print out name + all attrs and values */
for ( e = ldap_first_entry( ld, result ); e != NULL;
e = ldap_next_entry( ld, e ) ) {
if ( (dn = ldap_get_dn( ld, e )) != NULL ) {
printf( “dn: %s\n”, dn );
ldap_memfree( dn );
}
for ( a = ldap_first_attribute( ld, e, &ber );
a != NULL; a = ldap_next_attribute( ld, e, ber ) ) {
if ((vals = ldap_get_values( ld, e, a)) != NULL ) {
for ( i = 0; vals[i] != NULL; i++ ) {
printf( “%s: %s\n”, a, vals[i] );
}
ldap_value_free( vals );
}
ldap_memfree( a );
}
if ( ber != NULL ) {
ber_free( ber, 0 );
}
printf( “\n” );
}
ldap_msgfree( result );
ldap_unbind( ld );
return( 0 );
}

B.1.2 Search Using JNDI

/*
 *
 * @(#)Search.java	1.2 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not utilize
 * the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE
 * OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */

import java.util.Hashtable;
import java.util.Enumeration;
import javax.naming.*;
import javax.naming.directory.*;
/*
 * Search the directory for all people whose surname (last name) is
 * "Jensen".  Since the "sn" attribute is a caseignorestring (cis), case
 * is not significant when searching.
 *
 * [equivalent to search.c in Netscape's SDK.]
 *
 */
class Search {
public static void main(String[] args) {
    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     * This could also be set by using the -D option to the java program.
     * For example,
     *   java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory \
     *     Search
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY, Env.INITCTX);
    /* Specify host and port to use for directory service */
    env.put(Context.PROVIDER_URL, Env.MY_SERVICE);
    try {
        /* get a handle to an Initial DirContext */
        DirContext ctx = new InitialDirContext(env);
        /* specify search constraints to search subtree */
        SearchControls constraints = new SearchControls();
        constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
        /* search for all entries with surname of Jensen */
        NamingEnumeration results
            = ctx.search(Env.MY_SEARCHBASE, Env.MY_FILTER, constraints);
        /* for each entry print out name + all attrs and values */
        while (results != null && results.hasMore()) {
            SearchResult si = (SearchResult)results.next();
            /* print its name */
            System.out.println("name: " + si.getName());
            Attributes attrs = si.getAttributes();
            if (attrs == null) {
                System.out.println("No attributes");
            } else {
                /* print each attribute */
                for (NamingEnumeration ae = attrs.getAll();
                     ae.hasMoreElements();) {
                    Attribute attr = (Attribute)ae.next();
                    String attrId = attr.getID();
                    /* print each value */
                    for (Enumeration vals = attr.getAll();
                         vals.hasMoreElements();
                         System.out.println(attrId + ": " + vals.nextElement()))
                            ;
                }
            }
            System.out.println();
        }
    } catch (NamingException e) {
        System.err.println("Search example failed.");
        e.printStackTrace();
    }
}
}

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


 [Top] [Prev] [Next] [Bottom]

Java Naming and Directory Interface TM
Service Provider Interface
(JNDI SPI)

Please send technical comments to

jndi@java.sun.com

Please send product and business questions to

jndi-business@java.sun.com.

JNDI 1.2/JavaTM 2 Platform, Standard Edition, v 1.3
July 14, 1999

[Top] [Prev] [Next] [Bottom]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Appendix C: JNDI Change History

JNDI 1.2: JNDI Changes Since JNDI 1.1

  • Added javax.naming.event package.
  • Added javax.naming.ldap package.
  • Added support for configuration using resource files. See Chapter 6 of the JNDI API document.

API-related Changes

  • Added NamingEnumeration.close() for cancelling or terminating enumerations.
  • Added ReferralException.getReferralContext(Hashtable env) and ReferralException.retryReferral() to allow creation and retry of referral context with different environment properties.
  • Clarified how context methods that accept Name argument should deal with CompositeName and nonCompositeName arguments. Specifically, instances of CompositeName are treated as composite name, while al l others are treated as compound name.
  • Added Context.getNameInNamespace() for retrieving the full name of a context within its own namespace.
  • Clarified definition of the class factory location of a Reference object. Specifically, the location is a codebase, which consists of a list space-separated URLs.
  • Added support for ordered multivalued attributes to Attribute and BasicAttribute.
  • Added BasicAttributes.equals() and BasicAttributes.hashCode().
  • Redefined semantics of DirContext.getSchemaClassDefinition() so that it returns a context that contains the DirContext objects of class definitions, rather than returning one (arbitrary) class definition.
  • Added protected InitialContext/InitialDirContext constructors to allow lazy initialization. Useful for subclass implementations.

SPI-related Changes

  • Added StateFactory/NamingManager.getStateToBind(), analogous to ObjectFactory/NamingManager.getObjectInstance(), for transforming an object's state before the object is bound in the naming/directory service.
  • Added interfaces DirObjectFactory and DirStateFactory to better support service providers that implement the DirContext interface. Added DirectoryManager.getObjectInstance() and DirectoryManager.getStateToStore() to use these interfaces.
  • Refined definition of NamingManager.getObjectInstance() to not treat URL strings specially. Instead, the URL should be wrapped inside a Reference whose RefAddr type is "URL".
  • Made ResolveResult implement Serializable.
  • Defined a special form of Reference called a next naming system (nns) reference for supporting "dynamic federation". This reference has a RefAddr type of "nns" and a content consisting of the resolved object.
  • Added the string constant NamingManager.CPE which names a property set by NamingManager.getContinuationContext()/DirectoryManager.getContinuationContext(). The value of this property is an instance of CannotProceedException. This is useful to service providers that implement federation by chaining the CPEs.
  • Defined a convention for service providers to use when naming environment properties. See Section 6.1.

[Top] [Prev] [Next] [Bottom]

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Appendix B: Legend for Class Diagram

In a class diagram, we visually distinguish the different kinds of Java entities, as follows:

  1. The interface: A rounded rectangle
  2. The class: A rectangle
  3. The abstract class: A rectangle with an empty dot
  4. The final class: A rectangle with a black dot
  5. Classes with subclasses: A rectangle with a small black triangle on the lower right corner

    Most of these elements are shown below. The class or interface being described in the current chapter is shaded grey (this is not applicable for package class diagrams). A solid line represents extends, while a dotted line represents implements.

[Top] [Prev] [Next] [Bottom]

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Appendix A: Service Provider Example

This appendix contains a simple service provider. It implements a flat namespace (with no federation support). It shows how to produce a context implementation by providing all the methods in the Context interface.

An instance of this context is bound directly as the initial context. This example provides the corresponding InitialContextFactory definition.

A.1 Simple Flat Context

A.1.1 Context Implementation

/*
 * @(#)FlatCtx.java	1.3 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not
 * utilize the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
 * HEREBY EXCLUDED.  SUN AND ITS LICENSORS SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
 * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
 * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */
package examples.spi.flat;

import javax.naming.*;
import java.util.*;

/**
 * A sample service provider that implements a flat namespace in memory.
 */

class FlatCtx implements Context {
    Hashtable myEnv;
    private Hashtable bindings = new Hashtable(11);
    static NameParser myParser = new FlatNameParser();

    FlatCtx(Hashtable environment) {
        myEnv = (environment != null)
        ? (Hashtable)(environment.clone())
        : null;
    }

    public Object lookup(String name) throws NamingException {
        if (name.equals("")) {
            // Asking to look up this context itself.  Create and return
            // a new instance with its own independent environment.
            return (new FlatCtx(myEnv));
        }
        Object answer = bindings.get(name);
        if (answer == null) {
            throw new NameNotFoundException(name + " not found");
        }
        return answer;
    }

    public Object lookup(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return lookup(name.toString());
    }

    public void bind(String name, Object obj) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot bind empty name");
        }
        if (bindings.get(name) != null) {
            throw new NameAlreadyBoundException(
                    "Use rebind to override");
        }
        bindings.put(name, obj);
    }

    public void bind(Name name, Object obj) throws NamingException {
        // Flat namespace; no federation; just call string version
        bind(name.toString(), obj);
    }

    public void rebind(String name, Object obj) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot bind empty name");
        }
        bindings.put(name, obj);
    }

    public void rebind(Name name, Object obj) throws NamingException {
        // Flat namespace; no federation; just call string version
        rebind(name.toString(), obj);
    }

    public void unbind(String name) throws NamingException {
        if (name.equals("")) {
            throw new InvalidNameException("Cannot unbind empty name");
        }
        bindings.remove(name);
    }

    public void unbind(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        unbind(name.toString());
    }

    public void rename(String oldname, String newname)
            throws NamingException {
        if (oldname.equals("") || newname.equals("")) {
            throw new InvalidNameException("Cannot rename empty name");
        }

        // Check if new name exists
        if (bindings.get(newname) != null) {
            throw new NameAlreadyBoundException(newname +
                                                " is already bound");
        }

        // Check if old name is bound
        Object oldBinding = bindings.remove(oldname);
        if (oldBinding == null) {
            throw new NameNotFoundException(oldname + " not bound");
        }

        bindings.put(newname, oldBinding);
    }

    public void rename(Name oldname, Name newname)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        rename(oldname.toString(), newname.toString());
    }

    public NamingEnumeration list(String name)
            throws NamingException {
        if (name.equals("")) {
            // listing this context
            return new FlatNames(bindings.keys());
        }

        // Perhaps `name' names a context
        Object target = lookup(name);
        if (target instanceof Context) {
            return ((Context)target).list("");
        }
        throw new NotContextException(name + " cannot be listed");
    }

    public NamingEnumeration list(Name name)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        return list(name.toString());
    }

    public NamingEnumeration listBindings(String name)
            throws NamingException {
        if (name.equals("")) {
            // listing this context
            return new FlatBindings(bindings.keys());
        }

        // Perhaps `name' names a context
        Object target = lookup(name);
        if (target instanceof Context) {
            return ((Context)target).listBindings("");
        }
        throw new NotContextException(name + " cannot be listed");
    }

    public NamingEnumeration listBindings(Name name)
            throws NamingException {
        // Flat namespace; no federation; just call string version
        return listBindings(name.toString());
    }

    public void destroySubcontext(String name) throws NamingException {
        throw new OperationNotSupportedException(
                "FlatCtx does not support subcontexts");
    }

    public void destroySubcontext(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        destroySubcontext(name.toString());
    }

    public Context createSubcontext(String name)
            throws NamingException {
        throw new OperationNotSupportedException(
                "FlatCtx does not support subcontexts");
    }

    public Context createSubcontext(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return createSubcontext(name.toString());
    }

    public Object lookupLink(String name) throws NamingException {
        // This flat context does not treat links specially
        return lookup(name);
    }

    public Object lookupLink(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return lookupLink(name.toString());
    }

    public NameParser getNameParser(String name)
            throws NamingException {
        return myParser;
    }

    public NameParser getNameParser(Name name) throws NamingException {
        // Flat namespace; no federation; just call string version
        return getNameParser(name.toString());
    }

    public String composeName(String name, String prefix)
            throws NamingException {
        Name result = composeName(new CompositeName(name),
                                  new CompositeName(prefix));
        return result.toString();
    }

    public Name composeName(Name name, Name prefix)
            throws NamingException {
        Name result = (Name)(prefix.clone());
        result.addAll(name);
        return result;
    }

    public Object addToEnvironment(String propName, Object propVal)
            throws NamingException {
        if (myEnv == null) {
            myEnv = new Hashtable(5, 0.75f);
    }
    return myEnv.put(propName, propVal);
    }

    public Object removeFromEnvironment(String propName)
            throws NamingException {
        if (myEnv == null)
            return null;

    return myEnv.remove(propName);
    }

    public Hashtable getEnvironment() throws NamingException {
    if (myEnv == null) {
        // Must return non-null
        return new Hashtable(3, 0.75f);
    } else {
            return (Hashtable)myEnv.clone();
    }
    }

    public String getNameInNamespace() throws NamingException {
    return "";
    }

    public void close() throws NamingException {
    myEnv = null;
    bindings = null;
    }

    // Class for enumerating name/class pairs
    class FlatNames implements NamingEnumeration {
        Enumeration names;

        FlatNames (Enumeration names) {
            this.names = names;
        }

        public boolean hasMoreElements() {
            return names.hasMoreElements();
        }

        public boolean hasMore() throws NamingException {
            return hasMoreElements();
        }

        public Object nextElement() {
            String name = (String)names.nextElement();
            String className = bindings.get(name).getClass().getName();
            return new NameClassPair(name, className);
        }

        public Object next() throws NamingException {
            return nextElement();
        }
    public void close() {
    }
    }

    // Class for enumerating bindings
    class FlatBindings implements NamingEnumeration {
        Enumeration names;

        FlatBindings (Enumeration names) {
            this.names = names;
        }

        public boolean hasMoreElements() {
            return names.hasMoreElements();
        }

        public boolean hasMore() throws NamingException {
            return hasMoreElements();
        }

        public Object nextElement() {
            String name = (String)names.nextElement();
            return new Binding(name, bindings.get(name));
        }

        public Object next() throws NamingException {
            return nextElement();
        }
    public void close() {
    }
    }
};

A.1.2 Name Parser

/*
 * @(#)FlatNameParser.java	1.3 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not
 * utilize the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
 * HEREBY EXCLUDED.  SUN AND ITS LICENSORS SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
 * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
 * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */
package examples.spi.flat;

import javax.naming.NameParser;
import javax.naming.Name;
import javax.naming.CompoundName;
import javax.naming.NamingException;
import java.util.Properties;

class FlatNameParser implements NameParser {

    static Properties syntax = new Properties();
    static {
        syntax.put("jndi.syntax.direction", "flat");
        syntax.put("jndi.syntax.ignorecase", "false");
    }
    public Name parse(String name) throws NamingException {
        return new CompoundName(name, syntax);
    }
}

A.1.3 Initial Context Factory

/*
 * @(#)FlatInitCtxFactory.java	1.3 99/07/26
 *
 * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
 * Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and
 * binary code form, provided that i) this copyright notice and license
 * appear on all copies of the software; and ii) Licensee does not
 * utilize the software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
 * HEREBY EXCLUDED.  SUN AND ITS LICENSORS SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
 * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
 * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line
 * control of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and warrants
 * that it will not use or redistribute the Software for such purposes.
 */
package examples.spi.flat;

import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.spi.InitialContextFactory;

public class FlatInitCtxFactory implements InitialContextFactory {

    public Context getInitialContext(Hashtable env) {
        return new FlatCtx(env);
    }
}

[Top] [Prev] [Next] [Bottom]

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


JNI Enhancements in the Java 2 SDK

Java

JNI Enhancements
Introduced in version 1.2 of the JavaTM 2 SDK

 JNI Documentation

JNI has been enhanced in the Java 2 SDK to:

  • incorporate new features in the evolving Java platform,
  • ensure an efficient and stable interface for Java/native code integration.

Changes to the JNI are made based on feedback from users . Please continue to send your comments, suggestions, and concerns to jni@java.sun.com.

New Constants

#define JNI_VERSION_1_1 0x00010001
#define JNI_VERSION_1_2 0x00010002

/* Error codes */
#define JNI_EDETACHED    (-2)              /* thread detached from the VM */
#define JNI_EVERSION     (-3)              /* JNI version error */

Enhancements to the Existing API

  • Class Operations
    • FindClass
  • Invocation API
    • JNI_CreateJavaVM
    • AttachCurrentThread
    • DetachCurrentThread
    • DestroyJavaVM

New Functions

  • Library and Version Management
    • JNI_OnLoad
    • JNI_OnUnload
  • Local Reference Management
    • EnsureLocalCapacity
    • PushLocalFrame
    • PopLocalFrame
    • NewLocalRef
  • Exceptions
    • ExceptionCheck
  • Weak Global References
    • NewWeakGlobalRef
    • DeleteWeakGlobalRef
  • Array Operations
    • GetPrimitiveArrayCritical
    • ReleasePrimitiveArrayCritical
  • String Operations
    • GetStringRegion
    • GetStringUTFRegion
    • GetStringCritical
    • ReleaseStringCritical
  • Reflection Support
    • FromReflectedMethod
    • FromReflectedField
    • ToReflectedMethod
    • ToReflectedField
  • Invocation API
    • GetEnv

Class Operations

In the enhanced Java security model, non-system classes can load native code. The JNI function FindClass has been extended so that it finds classes loaded with a class loader.

jclass FindClass(JNIEnv *env, const char *name);

In JDK 1.1, FindClass searched only local classes in CLASSPATH. The resulting classes did not have a class loader.

The Java security model has been extended to allow non-system classes to load and call native methods. In the Java 2 Platform, FindClass locates the class loader associated with the current native method. If the native code belongs to a system class, no class loader will be involved. Otherwise, the proper class loader will be invoked to load and link the named class.

When FindClass is called through the Invocation Interface, there is no current native method or its associated class loader. In that case, the result of ClassLoader.getBaseClassLoader is used. This is the class loader the virtual machine creates for applications, and is able to locate classes listed in the java.class.path property.

Library and Version Management

In JDK 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems:
  • A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader.
  • Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems.

In the Java 2 SDK, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are:

  • Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders.
  • In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected.

To facilitate versioning control and resource management, JNI libraries in the Java 2 Platform may optionally export the following two functions:

jint JNI_OnLoad(JavaVM *vm, void *reserved);

The VM calls JNI_OnLoad when the native library is loaded (for example, through System.loadLibrary). JNI_OnLoad must return the JNI version needed by the native library.

In order to use any of the new JNI functions, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded.

void JNI_OnUnload(JavaVM *vm, void *reserved);

The VM calls JNI_OnUnload when the class loader containing the native library is garbage collected. This function can be used to perform cleanup operations. Because this function is called in an unknown context (such as from a finalizer), the programmer should be conservative on using Java VM services, and refrain from arbitrary Java call-backs.

Note that JNI_OnLoad and JNI_OnUnload are two functions optionally supplied by JNI libraries, not exported from the VM.

Local Reference Management

Local references are valid for the duration of a native method call. They are freed automatically after the native method returns. Each local reference costs some amount of Java Virtual Machine resource. Programmers need to make sure that native methods do not excessively allocate local references. Although local references are automatically freed after the native method returns to Java, excessive allocation of local references may cause the VM to run out of memory during the execution of a native method.

JDK 1.1 provides a DeleteLocalRef function so that programmers can manually delete local references. For example, if native code iterates through a potentially large array of objects and uses one element in each iteration, it is a good practice to delete the local reference to the no-longer-used array element before a new local reference is created in the next iteration.

The Java 2 SDK provides an additional set of functions for local reference lifetime management.

jint EnsureLocalCapacity(JNIEnv *env, jint capacity);

Ensures that at least a given number of local references can be created in the current thread. Returns 0 on success; otherwise returns a negative number and throws an OutOfMemoryError.

Before it enters a native method, the VM automatically ensures that at least 16 local references can be created.

For backward compatibility, the VM allocates local references beyond the ensured capacity. (As a debugging support, the VM may give the user warnings that too many local references are being created. In the Java 2 SDK, the programmer can supply the -verbose:jni command line option to turn on these messages.) The VM calls FatalError if no more local references can be created beyond the ensured capacity.

jint PushLocalFrame(JNIEnv *env, jint capacity);

Creates a new local reference frame, in which at least a given number of local references can be created. Returns 0 on success, a negative number and a pending OutOfMemoryError on failure.

Note that local references already created in previous local frames are still valid in the current local frame.

jobject PopLocalFrame(JNIEnv *env, jobject result);

Pops off the current local reference frame, frees all the local references, and returns a local reference in the previous local reference frame for the given result object.

Pass NULL as result if you do not need to return a reference to the previous frame.

jobject NewLocalRef(JNIEnv *env, jobject ref);

Creates a new local reference that refers to the same object as ref. The given ref may be a global or local reference. Returns NULL if ref refers to null.

Exceptions

We introduce a convenience function to check for pending exceptions without creating a local reference to the exception object.

jboolean ExceptionCheck(JNIEnv *env);

Returns JNI_TRUE when there is a pending exception; otherwise, returns JNI_FALSE.

Weak Global References

Weak global references are a special kind of global reference. Unlike normal global references, a weak global reference allows the underlying Java object to be garbage collected. Weak global references may be used in any situations where global or local references are used. When the garbage collector runs, it frees the underlying object if the object is only referred to by weak references. A weak global reference pointing to a freed object is functionally equivalent to NULL. Programmers can detect whether a weak global reference points to a freed object by using IsSameObject to compare the weak reference against NULL.

Weak global references in JNI are a simplified version of the Java Weak References, available as part of the Java 2 Platform API ( java.lang.Ref and its related classes).

jweak NewWeakGlobalRef(JNIEnv *env, jobject obj);

Creates a new weak global reference. Returns NULL if obj refers to null, or if the VM runs out of memory. If the VM runs out of memory, an OutOfMemoryError will be thrown.

void DeleteWeakGlobalRef(JNIEnv *env, jweak obj);

Delete the VM resources needed for the given weak global reference.

Array Operations

In JDK 1.1, programmers can use Get/ReleaseArrayElements functions to obtain a pointer to primitive array elements. If the VM supports pinning, the pointer to the original data is returned; otherwise, a copy is made.

New functions allow native code to obtain a direct pointer to array elements even if the VM does not support pinning.

void * GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy);
void ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, void *carray, jint mode);

The semantics of these two functions are very similar to the existing Get/ReleaseArrayElements functions. If possible, the VM returns a pointer to the primitive array; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used.

After calling GetPrimitiveArrayCritical, the native code should not run for an extended period of time before it calls ReleasePrimitiveArrayCritical. We must treat the code inside this pair of functions as running in a "critical region." Inside a critical region, native code must not call other JNI functions, or any system call that may cause the current thread to block and wait for another Java thread. (For example, the current thread must not call read on a stream being written by another Java thread.)

These restrictions make it more likely that the native code will obtain an uncopied version of the array, even if the VM does not support pinning. For example, a VM may temporarily disable garbage collection when the native code is holding a pointer to an array obtained via GetPrimitiveArrayCritical.

Multiple pairs of GetPrimtiveArrayCritical and ReleasePrimitiveArrayCritical may be nested. For example:

  jint len = (*env)->GetArrayLength(env, arr1);
  jbyte *a1 = (*env)->GetPrimitiveArrayCritical(env, arr1, 0);
  jbyte *a2 = (*env)->GetPrimitiveArrayCritical(env, arr2, 0);
  /* We need to check in case the VM tried to make a copy. */
  if (a1 == NULL || a2 == NULL) {
    ... /* out of memory exception thrown */
  }
  memcpy(a1, a2, len);
  (*env)->ReleasePrimitiveArrayCritical(env, arr2, a2, 0);
  (*env)->ReleasePrimitiveArrayCritical(env, arr1, a1, 0);

Note that GetPrimitiveArrayCritical might still make a copy of the array if the VM internally represents arrays in a different format. Therefore we need to check its return value against NULL for possible out of memory situations.

String Operations

In JDK 1.1, programmers can get primitive array elements in a user-supplied buffer. The Java 2 SDK allows native code to obtain Unicode or UTF-8 characters in a user-supplied buffer.

void GetStringRegion(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);

Copies len number of Unicode characters beginning at offset start to the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

<void GetStringUTFRegion(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);

Translates len number of Unicode characters beginning at offset start into UTF-8 format and place the result in the given buffer buf.

Throws StringIndexOutOfBoundsException on index overflow.

const jchar * GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy);
void ReleaseStringCritical(JNIEnv *env, jstring string, const jchar *carray);

The semantics of these two functions are similar to the existing Get/ReleaseStringChars functions. If possible, the VM returns a pointer to string elements; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used. In a code segment enclosed by Get/ReleaseStringCritical calls, the native code must not issue arbitrary JNI calls, or cause the current thread to block.

The restrictions on Get/ReleaseStringCritical are similar to those on Get/ReleasePrimitiveArrayCritical.

Reflection Support

Programmers can use the JNI to call Java methods or access Java fields if they know the name and type of the methods or fields. The Java Core Reflection API allows programmers to introspect Java classes at runtime. JNI provides a set of conversion functions between field and method IDs used in the JNI to field and method objects used in the Java Core Reflection API.

jmethodID FromReflectedMethod(JNIEnv *env, jobject method);

Converts a java.lang.reflect.Method or java.lang.reflect.Constructor object to a method ID.

jfieldID FromReflectedField(JNIEnv *env, jobject field);

Converts a java.lang.reflect.Field to a field ID.

jobject ToReflectedMethod(JNIEnv *env, jclass cls,
   jmethodID methodID);

Converts a method ID derived from cls to a java.lang.reflect.Method or java.lang.reflect.Constructor object.

Throws OutOfMemoryError and returns 0 if fails.

jobject ToReflectedField(JNIEnv *env, jclass cls,
   jfieldID fieldID);

Converts a field ID derived from cls to a java.lang.reflect.Field object.

Throws OutOfMemoryError and returns 0 if fails.

Invocation API

jint JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);

In JDK 1.1, the second argument to JNI_CreateJavaVM is always a pointer to JNIEnv *. The third argument is a pointer to a JDK 1.1 specific structure (JDK1_1InitArgs). The JDK1_1InitArgs structure is clearly not designed to be portable on all VMs.

In the Java 2 SDK, we introduce a standard VM initialization structure. Backward compatibility is preserved. If the VM initialization argument points to a JDK1_1InitArgs structure, JNI_CreateJavaVM still returns the 1.1 version of JNI interface pointer. The VM returns the 1.2 version of JNI interface pointer if the third argument points to a JavaVMInitArgs structure. Unlike JDK1_1InitArgs, which contains a fixed set of options, JavaVMInitArgs uses option strings to encode arbitrary VM start up options.

typedef struct JavaVMInitArgs {
    jint version;

    jint nOptions;
    JavaVMOption *options;
    jboolean ignoreUnrecognized;
} JavaVMInitArgs;
The version field must be set to JNI_VERSION_1_2. (In contrast, the version field in JDK1_1InitArgs must be set to JNI_VERSION_1_1.) The options field is an array of the following type:
typedef struct JavaVMOption {
    char *optionString;
    void *extraInfo;
} JavaVMOption;
The size of the array is denoted by the nOptions field in JavaVMInitArgs. If ignoreUnrecognized is JNI_TRUE, JNI_CreateJavaVM ignore all unrecognized option strings that begin with "-X" or "_". If ignoreUnrecognized is JNI_FALSE, JNI_CreateJavaVM returns JNI_ERR as soon as it encounters any unrecognized option strings. All Java VMs must recognize the following set of standard options:

optionString | meaning
-D<name>=<value> | Set a system property
-verbose[:class|gc|jni] | Enable verbose output. The options can be followed by a comma-separated list of names indicating what kind of messages will be printed by the VM. For example, "-verbose:gc,class" instructs the VM to print GC and class loading related messages. Standard names include: gc, class, and jni. All nonstandard (VM-specific) names must begin with "X".
vfprintf | extraInfo is a pointer to the vfprintf hook.
exit | extraInfo is a pointer to the exit hook.
abort | extraInfo is a pointer to the abort hook.

In addition, each VM implementation may support its own set of non-standard option strings. Non-standard option names must begin with "-X" or an underscore ("_"). For example, the Java 2 SDK supports -Xms and -Xmx options to allow programmers specify the initial and maximum heap size. Options that begin with "-X" are accessible from the "java" command line.

Here is the example code that creates a Java VM in the Java 2 SDK:

JavaVMInitArgs vm_args;
JavaVMOption options[4];

options[0].optionString = "-Djava.compiler=NONE";           /* disable JIT */
options[1].optionString = "-Djava.class.path=c:\myclasses"; /* user classes */
options[2].optionString = "-Djava.library.path=c:\mylibs";  /* set native library path */
options[3].optionString = "-verbose:jni";                   /* print JNI-related messages */

vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 4;
vm_args.ignoreUnrecognized = TRUE;

/* Note that in the Java 2 SDK, there is no longer any need to call
 * JNI_GetDefaultJavaVMInitArgs.
 */
res = JNI_CreateJavaVM(&vm, (void **)&env, &vm_args);
if (res <0) ...="..."

The Java 2 SDK still supports JDK1_1InitArgs in exactly the same
way as JDK 1.1.

jint AttachCurrentThread(JavaVM *vm, void **penv, void *args);

In JDK 1.1, the second argument to AttachCurrentThread is always a pointer to JNIEnv. The third argument to AttachCurrentThread was reserved, and should be set to NULL.

In the Java 2 SDK, you pass NULL as the third argument for 1.1 behavior, or pass a pointer to the following structure to specify additional information:

typedef struct JavaVMAttachArgs {
    jint version;  /* must be JNI_VERSION_1_2 */
    char *name;    /* the name of the thread, or NULL */
    jobject group; /* global ref of a ThreadGroup object, or NULL */
} JavaVMAttachArgs;

jint DetachCurrentThread(JavaVM *vm);

In JDK 1.1, the main thread cannot be detached from the VM. It must call DestroyJavaVM to unload the entire VM.

In the Java 2 SDK, the main thread can be detached from the VM.

jint DestroyJavaVM(JavaVM *vm);

The support for DestroyJavaVM was not complete in 1.1. Only the main thread may call DestroyJavaVM. In the Java 2 SDK, any thread, whether attached or not, can call this function. If the current thread is attached, the VM waits until the current thread is the only user-level Java thread. If the current thread is not attached, the VM attaches the current thread and then waits until the current thread is the only user-level thread. The Java 2 SDK still does not support VM unloading, however. DestroyJavaVM always returns an error code.

jint GetEnv(JavaVM *vm, void **env, jint version);

If the current thread is not attached to the VM, sets *env to NULL, and returns JNI_EDETACHED. If the specified version is not supported, sets *env to NULL, and returns JNI_EVERSION. Otherwise, sets *env to the appropriate interface, and returns JNI_OK.
Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jni@java.sun.com 		Sun


Contents | Prev | Next Java Native Interface Specification

1 - Introduction

This chapter introduces the Java Native Interface (JNI). The JNI is a native programming interface. It allows Java code that runs inside a Java Virtual Machine* (VM) to interoperate with applications and libraries written in other programming languages, such as C, C++, and assembly.

The most important benefit of the JNI is that it imposes no restrictions on the implementation of the underlying Java VM. Therefore, Java VM vendors can add support for the JNI without affecting other parts of the VM. Programmers can write one version of a native application or library and expect it to work with all Java VMs supporting the JNI.

This chapter covers the following topics:

  • Java Native Interface Overview
  • Background
  • Objectives
  • Java Native Interface Approach
  • Programming to the JNI
  • Changes in JDK 1.1.2

Java Native Interface Overview

While you can write applications entirely in Java, there are situations where Java alone does not meet the needs of your application. Programmers use the JNI to write Java native methods to handle those situations when an application cannot be written entirely in Java.

The following examples illustrate when you need to use Java native methods:

  • The standard Java class library does not support the platform-dependent features needed by the application.
  • You already have a library written in another language, and wish to make it accessible to Java code through the JNI.
  • You want to implement a small portion of time-critical code in a lower-level language such as assembly.
By programming through the JNI, you can use native methods to:

  • Create, inspect, and update Java objects (including arrays and strings).
  • Call Java methods.
  • Catch and throw exceptions.
  • Load classes and obtain class information.
  • Perform runtime type checking.
You can also use the JNI with the Invocation API to enable an arbitrary native application to embed the Java VM. This allows programmers to easily make their existing applications Java-enabled without having to link with the VM source code.

Background

Currently, VMs from different vendors offer different native method interfaces. These different interfaces force programmers to produce, maintain, and distribute multiple versions of native method libraries on a given platform.

We briefly examine some of the existing native method interfaces, such as:

  • JDK 1.0 native method interface
  • Netscape's Java Runtime Interface
  • Microsoft's Raw Native Interface and Java/COM interface

JDK 1.0 Native Method Interface

JDK 1.0 shipped with a native method interface. Unfortunately, there are two major reasons that this interface is unsuitable for adoption by other Java VMs.

First, the native code accesses fields in Java objects as members of C structures. However, the Java Language Specification does not define how objects are laid out in memory. If a Java VM lays out objects differently in memory, then the programmer would have to recompile the native method libraries.

Second, JDK 1.0's native method interface relies on a conservative garbage collector. The unrestricted use of the unhand macro, for example, makes it necessary to conservatively scan the native stack.

Java Runtime Interface

Netscape proposed the Java Runtime Interface (JRI), a general interface for services provided in the Java virtual machine. JRI is designed with portability in mind---it makes few assumptions about the implementation details in the underlying Java VM. The JRI addresses a wide range of issues, including native methods, debugging, reflection, embedding (invocation), and so on.

Raw Native Interface and Java/COM Interface

The Microsoft Java VM supports two native method interfaces. At the low level, it provides an efficient Raw Native Interface (RNI). The RNI offers a high degree of source-level backward compatibility with the JDK's native method interface, although it has one major difference. Instead of relying on conservative garbage collection, the native code must use RNI functions to interact explicitly with the garbage collector.

At a higher level, Microsoft's Java/COM interface offers a language- independent standard binary interface to the Java VM. Java code can use a COM object as if it were a Java object. A Java class can also be exposed to the rest of the system as a COM class.

Objectives

We believe that a uniform, well-thought-out standard interface offers the following benefits for everyone:

  • Each VM vendor can support a larger body of native code.
  • Tool builders will not have to maintain different kinds of native method interfaces.
  • Application programmers will be able to write one version of their native code and this version will run on different VMs.
The best way to achieve a standard native method interface is to involve all parties with an interest in Java VMs. Therefore we organized a series of discussions among the Java licensees on the design of a uniform native method interface. It is clear from the discussions that the standard native method interface must satisfy the following requirements:

  • Binary compatibility - The primary goal is binary compatibility of native method libraries across all Java VM implementations on a given platform. Programmers should maintain only one version of their native method libraries for a given platform.
  • Efficiency - To support time-critical code, the native method interface must impose little overhead. All known techniques to ensure VM-independence (and thus binary compatibility) carry a certain amount of overhead. We must somehow strike a compromise between efficiency and VM- independence.
  • Functionality - The interface must expose enough Java VM internals to allow native methods to accomplish useful tasks.

Java Native Interface Approach

We hoped to adopt one of the existing approaches as the standard interface, because this would have imposed the least burden on programmers who had to learn multiple interfaces in different VMs. Unfortunately, no existing solutions are completely satisfactory in achieving our goals.

Netscape's JRI is the closest to what we envision as a portable native method interface, and was used as the starting point of our design. Readers familiar with the JRI will notice the similarities in the API naming convention, the use of method and field IDs, the use of local and global references, and so on. Despite our best efforts, however, the JNI is not binary-compatible with the JRI, although a VM can support both the JRI and the JNI.

Microsoft's RNI is an improvement over JDK 1.0 because it solves the problem of native methods working with a nonconservative garbage collector. The RNI, however, is not suitable as a VM-independent native method interface. Like the JDK, RNI native methods access Java objects as C structures. This leads to two problems:

  • RNI exposes the layout of internal Java objects to native code.
  • Direct access of Java objects as C structures makes it impossible to efficiently incorporate "write barriers," which are necessary in advanced garbage collection algorithms.
As a binary standard, COM ensures complete binary compatibility across different VMs. Invoking a COM method requires only an indirect call, which carries little overhead. In addition, COM objects are a great improvement over dynamic-link libraries in solving versioning problems.

The use of COM as the standard Java native method interface, however, is hampered by a few factors:

  • First, the Java/COM interface lacks certain desired functions, such as accessing private fields and raising general exceptions.
  • Second, the Java/COM interface automatically provides the standard IUnknown and IDispatch COM interfaces for Java objects, so that native code can access public methods and fields. Unfortunately, the IDispatch interface does not deal with overloaded Java methods and is case- insensitive in matching method names. Furthermore, all Java methods exposed through the IDispatch interface are wrapped to perform dynamic type checking and coercion. This is because the IDispatch interface is designed with weakly-typed languages (such as Basic) in mind.
  • Third, instead of dealing with individual low-level functions, COM is designed to allow software components (including full-fledged applications) to work together. We believe that it is not appropriate to treat all Java classes or low-level native methods as software components.
  • Fourth, the immediate adoption of COM is hampered by the lack of its support on UNIX platforms.
Although we do not expose Java objects to the native code as COM objects, the JNI interface itself is binary-compatible with COM. We use the same jump table structure and calling convention that COM does. This means that, as soon as cross-platform support for COM is available, the JNI can become a COM interface to the Java VM.

We do not believe that the JNI should be the only native method interface supported by a given Java VM. A standard interface benefits programmers who would like to load their native code libraries into different Java VMs. In some cases, the programmer may have to use a lower-level, VM-specific interface to achieve top efficiency. In other cases, the programmer might use a higher-level interface to build software components. Indeed, we hope that, as the Java environment and component software technologies become more mature, native methods will gradually lose their significance.

Programming to the JNI

Native method programmers should start programming to the JNI. Programming to the JNI insulates you from unknowns, such as the vendor's VM that the end user might be running. By conforming to the JNI standard, you will give a native library the best chance to run in a given Java VM. For example, although JDK 1.1 will continue to support the old-style native method interface that was implemented in JDK 1.0, it is certain that future versions of the JDK will stop supporting the old-style native method interface. Native methods relying on the old-style interface will have to be rewritten.

If you are implementing a Java VM, you should implement the JNI. We (Javasoft and the licensees) have tried our best to ensure that the JNI does not impose any overhead or restrictions on your VM implementation, including object representation, garbage collection scheme, and so on. Please let us know if you run into any problems we might have overlooked.

Changes in JDK 1.1.2

To better support the Java Runtime Environment (JRE), the Invocation API has been extended in JDK 1.1.2 in a few minor ways. The changes do not break any existing code. The JNI Native Method Interface has not been changed.

  • The reserved0 field in the JDK1_1InitArgs structure has been renamed to version. The JDK1_1InitArgs structure holds the initialization arguments to JNI_CreateJavaVM. Callers of JNI_GetDefaultJavaVMInitArgs and JNI_CreateJavaVM must set the version field to 0x00010001. JNI_GetDefaultJavaVMInitArgs has been changed to return a jint indicating whether the requested version is supported.
  • The reserved1 field in the JDK1_1InitArgs structure has been renamed to properties. This is a NULL-terminated array of strings. Each string has the format:
    name=value
    indicating a system property. (This facility corresponds to the -D option in the java command line.)
  • In JDK 1.1.1, the thread calling DestroyJavaVM must be the only user thread in the VM. JDK 1.1.2 has lifted this restriction. If DestroyJavaVM is called when there is more than one user thread, the VM waits until the current thread is the only user thread, and then tries to destroy itself.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


 Contents | Prev | Next

Java Native Interface Specification

May 16, 1997

Contents

1. Introduction
Java Native Interface Overview
Background
JDK 1.0 Native Method Interface
Java Runtime Interface
Raw Native Interface and Java/COM Interface
Objectives
Java Native Interface Approach
Programming to the JNI
Changes in JDK 1.1.2

2. Design Overview
JNI Interface Functions and Pointers
Loading and Linking Native Methods
Resolving Native Method Names
Native Method Arguments
Referencing Java Objects
Global and Local References
Implementing Local References
Accessing Java Objects
Accessing Primitive Arrays
Accessing Fields and Methods
Reporting Programming Errors
Java Exceptions
Exceptions and Error Codes
Asynchronous Exceptions
Exception Handling

3. JNI Types and Data Structures
Primitive Types
Reference Types
Field and Method IDs
The Value Type
Type Signatures
UTF-8 Strings

4. JNI Functions
Interface Function Table
Version Information
GetVersion
Class Operations
DefineClass
FindClass
GetSuperclass
IsAssignableFrom
Exceptions
Throw
ThrowNew
ExceptionOccurred
ExceptionDescribe
ExceptionClear
FatalError
Global and Local References
NewGlobalRef
DeleteGlobalRef
DeleteLocalRef
Object Operations
AllocObject
GetObjectClass
IsInstanceOf
IsSameObject
Accessing Fields of Objects
GetFieldID
Get<type>Field Routines
Set<type>Field Routines
Calling Instance Methods
GetMethodID
Call<type>Method
CallNonvirtual<type>Method
Accessing Static Fields
GetStaticFieldID
GetStatic<type>Field Routines
SetStatic<type>Field Routines
Calling Static Methods
GetStaticMethodID
CallStatic<type>Method
String Operations
NewString
GetStringLength
GetStringChars
ReleaseStringChars
NewStringUTF
GetStringUTFLength
GetStringUTFChars
ReleaseStringUTFChars
Array Operations
GetArrayLength
NewObjectArray
GetObjectArrayElement
SetObjectArrayElement
New<PrimitiveType>Array Routines
Get<PrimitiveType>ArrayElements Routines
Release<PrimitiveType>ArrayElements Routines
Get<PrimitiveType>ArrayRegion Routines
Set<PrimitiveType>ArrayRegion Routines
Registering Native Methods
RegisterNatives
UnregisterNatives
Monitor Operations
MonitorEnter
MonitorExit
Java VM Interface
GetJavaVM

5. The Invocation API
Overview
Creating the VM
Attaching to the VM
Unloading the VM
Initialization Structures
Invocation API Functions
JNI_GetDefaultJavaVMInitArgs
JNI_GetCreatedJavaVMs
JNI_CreateJavaVM
DestroyJavaVM
AttachCurrentThread
DetachCurrentThread

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Contents | Prev | Next Java Native Interface Specification

2 - Design Overview

This chapter focuses on major design issues in the JNI. Most design issues in this section are related to native methods. The design of the Invocation API is covered in Chapter 5, "The Invocation API."

JNI Interface Functions and Pointers

Native code accesses Java VM features by calling JNI functions. JNI functions are available through an interface pointer. An interface pointer is a pointer to a pointer. This pointer points to an array of pointers, each of which points to an interface function. Every interface function is at a predefined offset inside the array. Figure 2-1 illustrates the organization of an interface pointer.

Figure 2-1 Interface Pointer

The JNI interface is organized like a C++ virtual function table or a COM interface. The advantage to using an interface table, rather than hard-wired function entries, is that the JNI name space becomes separate from the native code. A VM can easily provide multiple versions of JNI function tables. For example, the VM may support two JNI function tables:

  • one performs thorough illegal argument checks, and is suitable for debugging;
  • the other performs the minimal amount of checking required by the JNI specification, and is therefore more efficient.
The JNI interface pointer is only valid in the current thread. A native method, therefore, must not pass the interface pointer from one thread to another. A VM implementing the JNI may allocate and store thread-local data in the area pointed to by the JNI interface pointer.

Native methods receive the JNI interface pointer as an argument. The VM is guaranteed to pass the same interface pointer to a native method when it makes multiple calls to the native method from the same Java thread. However, a native method can be called from different Java threads, and therefore may receive different JNI interface pointers.

Loading and Linking Native Methods

Native methods are loaded with the System.loadLibrary method. In the following example, the class initialization method loads a platform-specific native library in which the native method f is defined:

    package pkg;
    class Cls {
         native double f(int i, String s);
         static {
             System.loadLibrary("pkg_Cls");
         }
    }
The argument to System.loadLibrary is a library name chosen arbitrarily by the programmer. The system follows a standard, but platform-specific, approach to convert the library name to a native library name. For example, a Solaris system converts the name pkg_Cls to libpkg_Cls.so, while a Win32 system converts the same pkg_Cls name to pkg_Cls.dll.

The programmer may use a single library to store all the native methods needed by any number of classes, as long as these classes are to be loaded with the same class loader. The VM internally maintains a list of loaded native libraries for each class loader. Vendors should choose native library names that minimize the chance of name clashes.

If the underlying operating system does not support dynamic linking, all native methods must be prelinked with the VM. In this case, the VM completes the System.loadLibrary call without actually loading the library.

The programmer can also call the JNI function RegisterNatives() to register the native methods associated with a class. The RegisterNatives() function is particularly useful with statically linked functions.

Resolving Native Method Names

Dynamic linkers resolve entries based on their names. A native method name is concatenated from the following components:

  • the prefix Java_
  • a mangled fully-qualified class name
  • an underscore ("_") separator
  • a mangled method name
  • for overloaded native methods, two underscores ("__") followed by the mangled argument signature
The VM checks for a method name match for methods that reside in the native library. The VM looks first for the short name; that is, the name without the argument signature. It then looks for the long name, which is the name with the argument signature. Programmers need to use the long name only when a native method is overloaded with another native method. However, this is not a problem if the native method has the same name as a nonnative method. A nonnative method (a Java method) does not reside in the native library.

In the following example, the native method g does not have to be linked using the long name because the other method g is not a native method, and thus is not in the native library.

    class Cls1 {
      int g(int i);
      native int g(double d);
    }
We adopted a simple name-mangling scheme to ensure that all Unicode characters translate into valid C function names. We use the underscore ("_") character as the substitute for the slash ("/") in fully qualified class names. Since a name or type descriptor never begins with a number, we can use _0, ..., _9 for escape sequences, as Table 2-1 illustrates:

Table 2-1 Unicode Character Translation

Escape Sequence | Denotes
_0XXXX | a Unicode character XXXX.
_1 | the character "_"
_2 | the character ";" in signatures
_3 | the character "[" in signatures

Both the native methods and the interface APIs follow the standard library- calling convention on a given platform. For example, UNIX systems use the C calling convention, while Win32 systems use __stdcall.

Native Method Arguments

The JNI interface pointer is the first argument to native methods. The JNI interface pointer is of type JNIEnv. The second argument differs depending on whether the native method is static or nonstatic. The second argument to a nonstatic native method is a reference to the object. The second argument to a static native method is a reference to its Java class.

The remaining arguments correspond to regular Java method arguments. The native method call passes its result back to the calling routine via the return value. Chapter 3, "JNI Types and Data Structures," describes the mapping between Java and C types.

Code Example 2-1 illustrates using a C function to implement the native method f. The native method f is declared as follows:

    package pkg;
    class Cls {
         native double f(int i, String s);
         ...
    }
The C function with the long mangled name Java_pkg_Cls_f_ILjava_lang_String_2 implements native method f:

Code Example 2-1 Implementing a Native Method Using C

    jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (
         JNIEnv *env,        /* interface pointer */
         jobject obj,        /* "this" pointer */
         jint i,             /* argument #1 */
         jstring s)          /* argument #2 */
    {
         /* Obtain a C-copy of the Java string */
         const char *str = (*env)->GetStringUTFChars(env, s, 0);
         /* process the string */
         ...
         /* Now we are done with str */
         (*env)->ReleaseStringUTFChars(env, s, str);
         return ...
    }
Note that we always manipulate Java objects using the interface pointer env . Using C++, you can write a slightly cleaner version of the code, as shown in Code Example 2-2:

Code Example 2-2 Implementing a Native Method Using C++

    extern "C" /* specify the C calling convention */
    jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (
         JNIEnv *env,        /* interface pointer */
         jobject obj,        /* "this" pointer */
         jint i,             /* argument #1 */
         jstring s)          /* argument #2 */
    {
         const char *str = env->GetStringUTFChars(s, 0);
         ...
         env->ReleaseStringUTFChars(s, str);
         return ...
    }
With C++, the extra level of indirection and the interface pointer argument disappear from the source code. However, the underlying mechanism is exactly the same as with C. In C++, JNI functions are defined as inline member functions that expand to their C counterparts.

Referencing Java Objects

Primitive types, such as integers, characters, and so on, are copied between Java and native code. Arbitrary Java objects, on the other hand, are passed by reference. The VM must keep track of all objects that have been passed to the native code, so that these objects are not freed by the garbage collector. The native code, in turn, must have a way to inform the VM that it no longer needs the objects. In addition, the garbage collector must be able to move an object referred to by the native code.

Global and Local References

The JNI divides object references used by the native code into two categories: local and global references. Local references are valid for the duration of a native method call, and are automatically freed after the native method returns. Global references remain valid until they are explicitly freed.

Objects are passed to native methods as local references. All Java objects returned by JNI functions are local references. The JNI allows the programmer to create global references from local references. JNI functions that expect Java objects accept both global and local references. A native method may return a local or global reference to the VM as its result.

In most cases, the programmer should rely on the VM to free all local references after the native method returns. However, there are times when the programmer should explicitly free a local reference. Consider, for example, the following situations:

  • A native method accesses a large Java object, thereby creating a local reference to the Java object. The native method then performs additional computation before returning to the caller. The local reference to the large Java object will prevent the object from being garbage collected, even if the object is no longer used in the remainder of the computation.
  • A native method creates a large number of local references, although not all of them are used at the same time. Since the VM needs a certain amount of space to keep track of a local reference, creating too many local references may cause the system to run out of memory. For example, a native method loops through a large array of objects, retrieves the elements as local references, and operates on one element at each iteration. After each iteration, the programmer no longer needs the local reference to the array element.
The JNI allows the programmer to manually delete local references at any point within a native method. To ensure that programmers can manually free local references, JNI functions are not allowed to create extra local references, except for references they return as the result.

Local references are only valid in the thread in which they are created. The native code must not pass local references from one thread to another.

Implementing Local References

To implement local references, the Java VM creates a registry for each transition of control from Java to a native method. A registry maps nonmovable local references to Java objects, and keeps the objects from being garbage collected. All Java objects passed to the native method (including those that are returned as the results of JNI function calls) are automatically added to the registry. The registry is deleted after the native method returns, allowing all of its entries to be garbage collected.

There are different ways to implement a registry, such as using a table, a linked list, or a hash table. Although reference counting may be used to avoid duplicated entries in the registry, a JNI implementation is not obliged to detect and collapse duplicate entries.

Note that local references cannot be faithfully implemented by conservatively scanning the native stack. The native code may store local references into global or heap data structures.

Accessing Java Objects

The JNI provides a rich set of accessor functions on global and local references. This means that the same native method implementation works no matter how the VM represents Java objects internally. This is a crucial reason why the JNI can be supported by a wide variety of VM implementations.

The overhead of using accessor functions through opaque references is higher than that of direct access to C data structures. We believe that, in most cases, Java programmers use native methods to perform nontrivial tasks that overshadow the overhead of this interface.

Accessing Primitive Arrays

This overhead is not acceptable for large Java objects containing many primitive data types, such as integer arrays and strings. (Consider native methods that are used to perform vector and matrix calculations.) It would be grossly inefficient to iterate through a Java array and retrieve every element with a function call.

One solution introduces a notion of "pinning" so that the native method can ask the VM to pin down the contents of an array. The native method then receives a direct pointer to the elements. This approach, however, has two implications:

  • The garbage collector must support pinning.
  • The VM must lay out primitive arrays contiguously in memory. Although this is the most natural implementation for most primitive arrays, boolean arrays can be implemented as packed or unpacked. Therefore, native code that relies on the exact layout of boolean arrays will not be portable.
We adopt a compromise that overcomes both of the above problems.

First, we provide a set of functions to copy primitive array elements between a segment of a Java array and a native memory buffer. Use these functions if a native method needs access to only a small number of elements in a large array.

Second, programmers can use another set of functions to retrieve a pinned- down version of array elements. Keep in mind that these functions may require the Java VM to perform storage allocation and copying. Whether these functions in fact copy the array depends on the VM implementation, as follows:

  • If the garbage collector supports pinning, and the layout of the array is the same as expected by the native method, then no copying is needed.
  • Otherwise, the array is copied to a nonmovable memory block (for example, in the C heap) and the necessary format conversion is performed. A pointer to the copy is returned.
Lastly, the interface provides functions to inform the VM that the native code no longer needs to access the array elements. When you call these functions, the system either unpins the array, or it reconciles the original array with its non-movable copy and frees the copy.

Our approach provides flexibility. A garbage collector algorithm can make separate decisions about copying or pinning for each given array. For example, the garbage collector may copy small objects, but pin the larger objects.

A JNI implementation must ensure that native methods running in multiple threads can simultaneously access the same array. For example, the JNI may keep an internal counter for each pinned array so that one thread does not unpin an array that is also pinned by another thread. Note that the JNI does not need to lock primitive arrays for exclusive access by a native method. Simultaneously updating a Java array from different threads leads to nondeterministic results.

Accessing Fields and Methods

The JNI allows native code to access the fields and to call the methods of Java objects. The JNI identifies methods and fields by their symbolic names and type signatures. A two-step process factors out the cost of locating the field or method from its name and signature. For example, to call the method f in class cls, the native code first obtains a method ID, as follows:

    jmethodID mid =

     env->GetMethodID(cls, "f", "(ILjava/lang/String;)D");
The native code can then use the method ID repeatedly without the cost of method lookup, as follows:

    jdouble result = env->CallDoubleMethod(obj, mid, 10, str);
A field or method ID does not prevent the VM from unloading the class from which the ID has been derived. After the class is unloaded, the method or field ID becomes invalid. The native code, therefore, must make sure to:

  • keep a live reference to the underlying class, or
  • recompute the method or field ID
if it intends to use a method or field ID for an extended period of time.

The JNI does not impose any restrictions on how field and method IDs are implemented internally.

Reporting Programming Errors

The JNI does not check for programming errors such as passing in NULL pointers or illegal argument types. Illegal argument types includes such things as using a normal Java object instead of a Java class object. The JNI does not check for these programming errors for the following reasons:

  • Forcing JNI functions to check for all possible error conditions degrades the performance of normal (correct) native methods.
  • In many cases, there is not enough runtime type information to perform such checking.
Most C library functions do not guard against programming errors. The printf() function, for example, usually causes a runtime error, rather than returning an error code, when it receives an invalid address. Forcing C library functions to check for all possible error conditions would likely result in such checks to be duplicated--once in the user code, and then again in the library.

The programmer must not pass illegal pointers or arguments of the wrong type to JNI functions. Doing so could result in arbitrary consequences, including a corrupted system state or VM crash.

Java Exceptions

The JNI allows native methods to raise arbitrary Java exceptions. The native code may also handle outstanding Java exceptions. The Java exceptions left unhandled are propagated back to the VM.

Exceptions and Error Codes

Certain JNI functions use the Java exception mechanism to report error conditions. In most cases, JNI functions report error conditions by returning an error code and throwing a Java exception. The error code is usually a special return value (such as NULL) that is outside of the range of normal return values. Therefore, the programmer can:

  • quickly check the return value of the last JNI call to determine if an error has occurred, and
  • call a function, ExceptionOccurred(), to obtain the exception object that contains a more detailed description of the error condition.
There are two cases where the programmer needs to check for exceptions without being able to first check an error code:

  • The JNI functions that invoke a Java method return the result of the Java method. The programmer must call ExceptionOccurred() to check for possible exceptions that occurred during the execution of the Java method.
  • Some of the JNI array access functions do not return an error code, but may throw an ArrayIndexOutOfBoundsException or ArrayStoreException.
In all other cases, a non-error return value guarantees that no exceptions have been thrown.

Asynchronous Exceptions

In cases of multiple threads, threads other than the current thread may post an asynchronous exception. An asynchronous exception does not immediately affect the execution of the native code in the current thread, until:

  • the native code calls one of the JNI functions that could raise synchronous exceptions, or
  • the native code uses ExceptionOccurred() to explicitly check for synchronous and asynchronous exceptions.
Note that only those JNI function that could potentially raise synchronous exceptions check for asynchronous exceptions.

Native methods should insert ExceptionOccurred()checks in necessary places (such as in a tight loop without other exception checks) to ensure that the current thread responds to asynchronous exceptions in a reasonable amount of time.

Exception Handling

There are two ways to handle an exception in native code:

  • The native method can choose to return immediately, causing the exception to be thrown in the Java code that initiated the native method call.
  • The native code can clear the exception by calling ExceptionClear(), and then execute its own exception-handling code.
After an exception has been raised, the native code must first clear the exception before making other JNI calls. When there is a pending exception, the only JNI functions that are safe to call are ExceptionOccurred(), ExceptionDescribe(), and ExceptionClear(). The ExceptionDescribe() function prints a debugging message about the pending exception.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Contents | Prev | Next Java Native Interface Specification

5 - The Invocation API

The Invocation API allows software vendors to load the Java VM* into an arbitrary native application. Vendors can deliver Java-enabled applications without having to link with the Java VM source code.

This chapter begins with an overview of the Invocation API. This is followed by reference pages for all Invocation API functions.

To enhance the embeddability of the Java VM, the Invocation API is extended in JDK 1.1.2 in a few minor ways.

Overview

The following code example illustrates how to use functions in the Invocation API. In this example, the C++ code creates a Java VM and invokes a static method, called Main.test. For clarity, we omit error checking.

        #include <jni.h>       /* where everything is defined */

        ...

        JavaVM *jvm;       /* denotes a Java VM */
        JNIEnv *env;       /* pointer to native method interface */

        JDK1_1InitArgs vm_args; /* JDK 1.1 VM initialization arguments */

        vm_args.version = 0x00010001; /* New in 1.1.2: VM version */
        /* Get the default initialization arguments and set the class
         * path */
        JNI_GetDefaultJavaVMInitArgs(&vm_args);
        vm_args.classpath = ...;

        /* load and initialize a Java VM, return a JNI interface
         * pointer in env */
        JNI_CreateJavaVM(&jvm, &env, &vm_args);

        /* invoke the Main.test method using the JNI */
        jclass cls = env->FindClass("Main");
        jmethodID mid = env->GetStaticMethodID(cls, "test", "(I)V");
        env->CallStaticVoidMethod(cls, mid, 100);

        /* We are done. */
        jvm->DestroyJavaVM();
This example uses three functions in the API. The Invocation API allows a native application to use the JNI interface pointer to access VM features. The design is similar to Netscape's JRI Embedding Interface.

Creating the VM

The JNI_CreateJavaVM() function loads and initializes a Java VM and returns a pointer to the JNI interface pointer. The thread that called JNI_CreateJavaVM() is considered to be the main thread.

Attaching to the VM

The JNI interface pointer (JNIEnv) is valid only in the current thread. Should another thread need to access the Java VM, it must first call AttachCurrentThread() to attach itself to the VM and obtain a JNI interface pointer. Once attached to the VM, a native thread works just like an ordinary Java thread running inside a native method. The native thread remains attached to the VM until it calls DetachCurrentThread() to detach itself.

Unloading the VM

The main thread cannot detach itself from the VM. Instead, it must call DestroyJavaVM() to unload the entire VM.

The VM waits until the main thread is the only user thread before it actually unloads. User threads include both Java threads and attached native threads. This restriction exists because a Java thread or attached native thread may be holding system resources, such as locks, windows, and so on. The VM cannot automatically free these resources. By restricting the main thread to be the only running thread when the VM is unloaded, the burden of releasing system resources held by arbitrary threads is on the programmer.

Initialization Structures

Different Java VM implementation will likely require different initialization arguments. It is difficult to come up with a standard initialization structure suitable for all present and future Java VMs. As a compromise, we reserve the first field (version) to identify the content of the initialization structure. Native applications embedding JDK 1.1.2 must set the version field to 0x00010001. VM implementations are encouraged to use the same initialization structure as JDK, although other implementations may choose to ignore some of the initialization arguments supported by JDK.

Version numbers 0x80000000 to 0xFFFFFFFF are reserved, and should not be recognized by any VM implementation.

The following code shows the structure used to initialize the Java VM in JDK 1.1.2.

    typedef struct JavaVMInitArgs {
       /* The first two fields were reserved in JDK 1.1, and
          formally introduced in JDK 1.1.2. */
       /* Java VM version */
        jint version;

       /* System properties. */
        char **properties;

       /* whether to check the Java source files are newer than
        * compiled class files. */
        jint checkSource;

       /* maximum native stack size of Java-created threads. */
        jint nativeStackSize;

       /* maximum Java stack size. */
        jint javaStackSize;

       /* initial heap size. */
        jint minHeapSize;

       /* maximum heap size. */
        jint maxHeapSize;

       /* controls whether Java byte code should be verified:
        * 0 -- none, 1 -- remotely loaded code, 2 -- all code. */
        jint verifyMode;

       /* the local directory path for class loading. */
        const char *classpath;

       /* a hook for a function that redirects all VM messages. */
        jint (*vfprintf)(FILE *fp, const char *format,
                         va_list args);

       /* a VM exit hook. */
        void (*exit)(jint code);

       /* a VM abort hook. */
        void (*abort)();

       /* whether to enable class GC. */
        jint enableClassGC;

       /* whether GC messages will appear. */
        jint enableVerboseGC;

       /* whether asynchronous GC is allowed. */
        jint disableAsyncGC;

       /* Three reserved fields. */
        jint reserved0;
        jint reserved1;
        jint reserved2;
    } JDK1_1InitArgs;
In JDK 1.1.2, the initialization structure provides hooks so that a native application can redirect VM messages and obtain control when the VM terminates.

The structure below is passed as an argument when a native thread attaches to a Java VM in JDK 1.1.2. In actuality, no arguments are required for a native thread to attach to the JDK 1.1.2. The JDK1_1AttachArgs structure consists only of a padding slot for those C compilers that do not permit empty structures.

    typedef struct JDK1_1AttachArgs {
       /*
        * JDK 1.1 does not need any arguments to attach a
        * native thread. The padding is here to satisfy the C
        * compiler which does not permit empty structures.
        */
        void *__padding;
    } JDK1_1AttachArgs;

Invocation API Functions

The JavaVM type is a pointer to the Invocation API function table. The following code example shows this function table.

    typedef const struct JNIInvokeInterface *JavaVM;

    const struct JNIInvokeInterface ... = {
        NULL,
        NULL,
        NULL,

        DestroyJavaVM,
        AttachCurrentThread,
        DetachCurrentThread,
    };
Note that three Invocation API functions, JNI_GetDefaultJavaVMInitArgs(), JNI_GetCreatedJavaVMs(), and JNI_CreateJavaVM(), are not part of the JavaVM function table. These functions can be used without a preexisting JavaVM structure.

JNI_GetDefaultJavaVMInitArgs

jint JNI_GetDefaultJavaVMInitArgs(void *vm_args);

Returns a default configuration for the Java VM. Before calling this function, native code must set the vm_args->version field to the JNI version it expects the VM to support. In JDK 1.1.2, vm_args->version must be set to 0x00010001. (JDK 1.1 did not require the native code to set the version field. For backward compatibility, JDK 1.1.2 assumes that the requested version is 0x00010001 if the version field is not set. Future versions of JDK will require the version field to be set to an appropriate value.) After this function returns, vm_args->version will be set to the actual JNI version the VM supports.

PARAMETERS:

vm_args: a pointer to a VM-specific initialization structure in to which the default arguments are filled.

RETURNS:

Returns "0" if the requested version is supported; returns a negative number if the requested version is not supported.

JNI_GetCreatedJavaVMs

jint JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen,
jsize *nVMs);

Returns all Java VMs that have been created. Pointers to VMs are written in the buffer vmBuf in the order they are created. At most bufLen number of entries will be written. The total number of created VMs is returned in *nVMs.

JDK 1.1 does not support creating more than one VM in a single process.

PARAMETERS:

vmBuf: pointer to the buffer where the VM structures will be placed.

bufLen: the length of the buffer.

nVMs: a pointer to an integer.

RETURNS:

Returns "0" on success; returns a negative number on failure.

JNI_CreateJavaVM

jint JNI_CreateJavaVM(JavaVM **p_vm, JNIEnv **p_env,
void *vm_args);

Loads and initializes a Java VM. The current thread becomes the main thread. Sets the env argument to the JNI interface pointer of the main thread.

JDK 1.1.2 does not support creating more than one VM in a single process. The version field in vm_args must be set to 0x00010001.

PARAMETERS:

p_vm: pointer to the location where the resulting VM structure will be placed.

p_env: pointer to the location where the JNI interface pointer for the main thread will be placed.

vm_args: Java VM initialization arguments.

RETURNS:

Returns "0" on success; returns a negative number on failure.

DestroyJavaVM

jint DestroyJavaVM(JavaVM *vm);

Unloads a Java VM and reclaims its resources. Only the main thread can unload the VM. The main thread must be the only remaining user thread when it calls DestroyJavaVM().

PARAMETERS:

vm: the Java VM that will be destroyed.

RETURNS:

Returns "0" on success; returns a negative number on failure.

JDK 1.1.2 does not support unloading the VM.

AttachCurrentThread

jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env,
void *thr_args);

Attaches the current thread to a Java VM. Returns a JNI interface pointer in the JNIEnv argument.

Trying to attach a thread that is already attached is a no-op.

A native thread cannot be attached simultaneously to two Java VMs.

When a thread is attached to the VM, the context class loader is the bootstrap loader.

PARAMETERS:

vm: the VM to which the current thread will be attached.

p_env: pointer to the location where the JNI interface pointer of the current thread will be placed.

thr_args: VM-specific thread attachment arguments.

RETURNS:

Returns "0" on success; returns a negative number on failure.

DetachCurrentThread

jint DetachCurrentThread(JavaVM *vm);

Detaches the current thread from a Java VM. All Java monitors held by this thread are released. All Java threads waiting for this thread to die are notified.

The main thread, which is the thread that created the Java VM, cannot be detached from the VM. Instead, the main thread must call JNI_DestroyJavaVM() to unload the entire VM.

PARAMETERS:

vm: the VM from which the current thread will be detached.

RETURNS:

Returns "0" on success; returns a negative number on failure.

*As used on this web site, the term "Java VM" means a virtual machine for the Java platform.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Contents | Prev | Next Java Native Interface Specification

3 - JNI Types and Data Structures

This chapter discusses how the JNI maps Java types to native C types.

Primitive Types

Table 3-1 describes Java primitive types and their machine-dependent native equivalents.

Table 3-1 Primitive Types and Native Equivalents

Java Type | Native Type | Description
boolean | jboolean | unsigned 8 bits
byte | jbyte | signed 8 bits
char | jchar | unsigned 16 bits
short | jshort | signed 16 bits
int | jint | signed 32 bits
long | jlong | signed 64 bits
float | jfloat | 32 bits
double | jdouble | 64 bits
void | void | N/A

The following definition is provided for convenience.

    #define JNI_FALSE  0
    #define JNI_TRUE   1
The jsize integer type is used to describe cardinal indices and sizes:

    typedef jint jsize;

Reference Types

The JNI includes a number of reference types that correspond to different kinds of Java objects. JNI reference types are organized in the hierarchy shown in Figure 3-1.

Figure 3-1 Reference Type Hierarchy

In C, all other JNI reference types are defined to be the same as jobject. For example:

    typedef jobject jclass;
In C++, JNI introduces a set of dummy classes to enforce the subtyping relationship. For example:

    class _jobject {};
    class _jclass : public _jobject {};
    ...
    typedef _jobject *jobject;
    typedef _jclass *jclass;

Field and Method IDs

Method and field IDs are regular C pointer types:

    struct _jfieldID;              /* opaque structure */
    typedef struct _jfieldID *jfieldID;   /* field IDs */

    struct _jmethodID;              /* opaque structure */
    typedef struct _jmethodID *jmethodID; /* method IDs */

The Value Type

The jvalue union type is used as the element type in argument arrays. It is declared as follows:

    typedef union jvalue {
        jboolean z;
        jbyte    b;
        jchar    c;
        jshort   s;
        jint     i;
        jlong    j;
        jfloat   f;
        jdouble  d;
        jobject  l;
    } jvalue;

Type Signatures

The JNI uses the Java VM's representation of type signatures. Table 3-2 shows these type signatures.

Table 3-2 Java VM Type Signatures

Type Signature | Java Type
Z | boolean
B | byte
C | char
S | short
I | int
J | long
F | float
D | double
L fully-qualified-class ; | fully-qualified-class
[ type | type[]
( arg-types ) ret-type | method type

For example, the Java method:

    long f (int n, String s, int[] arr);
has the following type signature:

    (ILjava/lang/String;[I)J

UTF-8 Strings

The JNI uses UTF-8 strings to represent various string types. UTF-8 strings are the same as those used by the Java VM. UTF-8 strings are encoded so that character sequences that contain only nonnull ASCII characters can be represented using only one byte per character, but characters of up to 16 bits can be represented. All characters in the range \u0001 to \u007F are represented by a single byte, as follows:

The seven bits of data in the byte give the value of the character that is represented. The null character (\u000) and characters in the range \u0080 to \u07FF are represented by a pair of bytes, x and y, as follows:

The bytes represent the character with the value ((x&0x1f)<<6)+(y&0x3f).

Characters in the range \u0800 to \uFFFF are represented by three bytes, x, y, and z:

The character with the value ((x&0xf)<<12)+(y&0x3f)<<6)+(z&0x3f) is represented by the three bytes.

There are two differences between this format and the "standard" UTF-8 format. First, the null byte (byte)0 is encoded using the two-byte format rather than the one-byte format. This means that Java VM UTF-8 strings never have embedded nulls. Second, only the one-byte, two-byte, and three-byte formats are used. The Java VM does not recognize the longer UTF-8 formats.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Contents | Prev | Next Java Native Interface Specification

4 - JNI Functions

This chapter serves as the reference section for the JNI functions. It provides a complete listing of all the JNI functions. It also presents the exact layout of the JNI function table.

Note the use of the term "must" to describe restrictions on JNI programmers. For example, when you see that a certain JNI function must receive a non-NULL object, it is your responsibility to ensure that NULL is not passed to that JNI function. As a result, a JNI implementation does not need to perform NULL pointer checks in that JNI function.

A portion of this chapter is adapted from Netscape's JRI documentation.

The reference material groups functions by their usage. The reference section is organized by the following functional areas:

  • Version Information
  • Class Operations
  • Exceptions
  • Global and Local References
  • Object Operations
  • Accessing Fields of Objects
  • Calling Instance Methods
  • Accessing Static Fields
  • Calling Static Methods
  • String Operations
  • Array Operations
  • Registering Native Methods
  • Monitor Operations
  • Java VM Interface

Interface Function Table

Each function is accessible at a fixed offset through the JNIEnv argument. The JNIEnv type is a pointer to a structure storing all JNI function pointers. It is defined as follows:

    typedef const struct JNINativeInterface *JNIEnv;
The VM initializes the function table, as shown by Code Example 4-1. Note that the first three entries are reserved for future compatibility with COM. In addition, we reserve a number of additional NULL entries near the beginning of the function table, so that, for example, a future class-related JNI operation can be added after FindClass, rather than at the end of the table.

Note that the function table can be shared among all JNI interface pointers.

Code Example 4-1

    const struct JNINativeInterface ... = {
        NULL,
        NULL,
        NULL,
        NULL,
        GetVersion,

        DefineClass,
        FindClass,
        NULL,
        NULL,
        NULL,
        GetSuperclass,
        IsAssignableFrom,
        NULL,

        Throw,
        ThrowNew,
        ExceptionOccurred,
        ExceptionDescribe,
        ExceptionClear,
        FatalError,
        NULL,
        NULL,

        NewGlobalRef,
        DeleteGlobalRef,
        DeleteLocalRef,
        IsSameObject,
        NULL,
        NULL,

        AllocObject,
        NewObject,
        NewObjectV,
        NewObjectA,

        GetObjectClass,
        IsInstanceOf,

        GetMethodID,

        CallObjectMethod,
        CallObjectMethodV,
        CallObjectMethodA,
        CallBooleanMethod,
        CallBooleanMethodV,
        CallBooleanMethodA,
        CallByteMethod,
        CallByteMethodV,
        CallByteMethodA,
        CallCharMethod,
        CallCharMethodV,
        CallCharMethodA,
        CallShortMethod,
        CallShortMethodV,
        CallShortMethodA,
        CallIntMethod,
        CallIntMethodV,
        CallIntMethodA,
        CallLongMethod,
        CallLongMethodV,
        CallLongMethodA,
        CallFloatMethod,
        CallFloatMethodV,
        CallFloatMethodA,
        CallDoubleMethod,
        CallDoubleMethodV,
        CallDoubleMethodA,
        CallVoidMethod,
        CallVoidMethodV,
        CallVoidMethodA,

        CallNonvirtualObjectMethod,
        CallNonvirtualObjectMethodV,
        CallNonvirtualObjectMethodA,
        CallNonvirtualBooleanMethod,
        CallNonvirtualBooleanMethodV,
        CallNonvirtualBooleanMethodA,
        CallNonvirtualByteMethod,
        CallNonvirtualByteMethodV,
        CallNonvirtualByteMethodA,
        CallNonvirtualCharMethod,
        CallNonvirtualCharMethodV,
        CallNonvirtualCharMethodA,
        CallNonvirtualShortMethod,
        CallNonvirtualShortMethodV,
        CallNonvirtualShortMethodA,
        CallNonvirtualIntMethod,
        CallNonvirtualIntMethodV,
        CallNonvirtualIntMethodA,
        CallNonvirtualLongMethod,
        CallNonvirtualLongMethodV,
        CallNonvirtualLongMethodA,
        CallNonvirtualFloatMethod,
        CallNonvirtualFloatMethodV,
        CallNonvirtualFloatMethodA,
        CallNonvirtualDoubleMethod,
        CallNonvirtualDoubleMethodV,
        CallNonvirtualDoubleMethodA,
        CallNonvirtualVoidMethod,
        CallNonvirtualVoidMethodV,
        CallNonvirtualVoidMethodA,

        GetFieldID,

        GetObjectField,
        GetBooleanField,
        GetByteField,
        GetCharField,
        GetShortField,
        GetIntField,
        GetLongField,
        GetFloatField,
        GetDoubleField,
        SetObjectField,
        SetBooleanField,
        SetByteField,
        SetCharField,
        SetShortField,
        SetIntField,
        SetLongField,
        SetFloatField,
        SetDoubleField,

        GetStaticMethodID,

        CallStaticObjectMethod,
        CallStaticObjectMethodV,
        CallStaticObjectMethodA,
        CallStaticBooleanMethod,
        CallStaticBooleanMethodV,
        CallStaticBooleanMethodA,
        CallStaticByteMethod,
        CallStaticByteMethodV,
        CallStaticByteMethodA,
        CallStaticCharMethod,
        CallStaticCharMethodV,
        CallStaticCharMethodA,
        CallStaticShortMethod,
        CallStaticShortMethodV,
        CallStaticShortMethodA,
        CallStaticIntMethod,
        CallStaticIntMethodV,
        CallStaticIntMethodA,
        CallStaticLongMethod,
        CallStaticLongMethodV,
        CallStaticLongMethodA,
        CallStaticFloatMethod,
        CallStaticFloatMethodV,
        CallStaticFloatMethodA,
        CallStaticDoubleMethod,
        CallStaticDoubleMethodV,
        CallStaticDoubleMethodA,
        CallStaticVoidMethod,
        CallStaticVoidMethodV,
        CallStaticVoidMethodA,

        GetStaticFieldID,

        GetStaticObjectField,
        GetStaticBooleanField,
        GetStaticByteField,
        GetStaticCharField,
        GetStaticShortField,
        GetStaticIntField,
        GetStaticLongField,
        GetStaticFloatField,
        GetStaticDoubleField,

        SetStaticObjectField,
        SetStaticBooleanField,
        SetStaticByteField,
        SetStaticCharField,
        SetStaticShortField,
        SetStaticIntField,
        SetStaticLongField,
        SetStaticFloatField,
        SetStaticDoubleField,

        NewString,
        GetStringLength,
        GetStringChars,
        ReleaseStringChars,

        NewStringUTF,
        GetStringUTFLength,
        GetStringUTFChars,
        ReleaseStringUTFChars,

        GetArrayLength,

        NewObjectArray,
        GetObjectArrayElement,
        SetObjectArrayElement,

        NewBooleanArray,
        NewByteArray,
        NewCharArray,
        NewShortArray,
        NewIntArray,
        NewLongArray,
        NewFloatArray,
        NewDoubleArray,

        GetBooleanArrayElements,
        GetByteArrayElements,
        GetCharArrayElements,
        GetShortArrayElements,
        GetIntArrayElements,
        GetLongArrayElements,
        GetFloatArrayElements,
        GetDoubleArrayElements,

        ReleaseBooleanArrayElements,
        ReleaseByteArrayElements,
        ReleaseCharArrayElements,
        ReleaseShortArrayElements,
        ReleaseIntArrayElements,
        ReleaseLongArrayElements,
        ReleaseFloatArrayElements,
        ReleaseDoubleArrayElements,

        GetBooleanArrayRegion,
        GetByteArrayRegion,
        GetCharArrayRegion,
        GetShortArrayRegion,
        GetIntArrayRegion,
        GetLongArrayRegion,
        GetFloatArrayRegion,
        GetDoubleArrayRegion,
        SetBooleanArrayRegion,
        SetByteArrayRegion,
        SetCharArrayRegion,
        SetShortArrayRegion,
        SetIntArrayRegion,
        SetLongArrayRegion,
        SetFloatArrayRegion,
        SetDoubleArrayRegion,

        RegisterNatives,
        UnregisterNatives,

        MonitorEnter,
        MonitorExit,

        GetJavaVM,
    };

Version Information

GetVersion

jint GetVersion(JNIEnv *env);

Returns the version of the native method interface.

PARAMETERS:

env: the JNI interface pointer.

RETURNS:

Returns the major version number in the higher 16 bits and the minor version number in the lower 16 bits.

In JDK1.1, GetVersion() returns 0x00010001.

Class Operations

DefineClass

jclass DefineClass(JNIEnv *env, jobject loader,
const jbyte *buf, jsize bufLen);

Loads a class from a buffer of raw class data.

PARAMETERS:

env: the JNI interface pointer.

loader: a class loader assigned to the defined class.

buf: buffer containing the .class file data.

bufLen: buffer length.

RETURNS:

Returns a Java class object or NULL if an error occurs.

THROWS:

ClassFormatError: if the class data does not specify a valid class.

ClassCircularityError: if a class or interface would be its own superclass or superinterface.

OutOfMemoryError: if the system runs out of memory.

FindClass

jclass FindClass(JNIEnv *env, const char *name);

This function loads a locally-defined class. It searches the directories and zip files specified by the CLASSPATH environment variable for the class with the specified name.

PARAMETERS:

env: the JNI interface pointer.

name: a fully-qualified class name (that is, a package name, delimited by "/", followed by the class name). If the name begins with "[" (the array signature character), it returns an array class.

RETURNS:

Returns a class object from a fully-qualified name, or NULL if the class cannot be found.

THROWS:

ClassFormatError: if the class data does not specify a valid class.

ClassCircularityError: if a class or interface would be its own superclass or superinterface.

NoClassDefFoundError: if no definition for a requested class or interface can be found.

OutOfMemoryError: if the system runs out of memory.

GetSuperclass

jclass GetSuperclass(JNIEnv *env, jclass clazz);

If clazz represents any class other than the class Object, then this function returns the object that represents the superclass of the class specified by clazz.

If clazz specifies the class Object, or clazz represents an interface, this function returns NULL.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns the superclass of the class represented by clazz, or NULL.

IsAssignableFrom

jboolean IsAssignableFrom(JNIEnv *env, jclass clazz1,
jclass clazz2);

Determines whether an object of clazz1 can be safely cast to clazz2.

PARAMETERS:

env: the JNI interface pointer.

clazz1: the first class argument.

clazz2: the second class argument.

RETURNS:

Returns JNI_TRUE if either of the following is true:

  • The first and second class arguments refer to the same Java class.
  • The first class is a subclass of the second class.
  • The first class has the second class as one of its interfaces.

Exceptions

Throw

jint Throw(JNIEnv *env, jthrowable obj);

Causes a java.lang.Throwable object to be thrown.

PARAMETERS:

env: the JNI interface pointer.

obj: a java.lang.Throwable object.

RETURNS:

Returns 0 on success; a negative value on failure.

THROWS:

the java.lang.Throwable object obj.

ThrowNew

jint ThrowNew(JNIEnv *env, jclass clazz,
const char *message);

Constructs an exception object from the specified class with the message specified by message and causes that exception to be thrown.

PARAMETERS:

env: the JNI interface pointer.

clazz: a subclass of java.lang.Throwable.

message: the message used to construct the java.lang.Throwable object.

RETURNS:

Returns 0 on success; a negative value on failure.

THROWS:

the newly constructed java.lang.Throwable object.

ExceptionOccurred

jthrowable ExceptionOccurred(JNIEnv *env);

Determines if an exception is being thrown. The exception stays being thrown until either the native code calls ExceptionClear(), or the Java code handles the exception.

PARAMETERS:

env: the JNI interface pointer.

RETURNS:

Returns the exception object that is currently in the process of being thrown, or NULL if no exception is currently being thrown.

ExceptionDescribe

void ExceptionDescribe(JNIEnv *env);

Prints an exception and a backtrace of the stack to a system error-reporting channel, such as stderr. This is a convenience routine provided for debugging.

PARAMETERS:

env: the JNI interface pointer.

ExceptionClear

void ExceptionClear(JNIEnv *env);

Clears any exception that is currently being thrown. If no exception is currently being thrown, this routine has no effect.

PARAMETERS:

env: the JNI interface pointer.

FatalError

void FatalError(JNIEnv *env, const char *msg);

Raises a fatal error and does not expect the VM to recover. This function does not return.

PARAMETERS:

env: the JNI interface pointer.

msg: an error message.

Global and Local References

NewGlobalRef

jobject NewGlobalRef(JNIEnv *env, jobject obj);

Creates a new global reference to the object referred to by the obj argument. The obj argument may be a global or local reference. Global references must be explicitly disposed of by calling DeleteGlobalRef().

PARAMETERS:

env: the JNI interface pointer.

obj: a global or local reference.

RETURNS:

Returns a global reference, or NULL if the system runs out of memory.

DeleteGlobalRef

void DeleteGlobalRef(JNIEnv *env, jobject globalRef);

Deletes the global reference pointed to by globalRef.

PARAMETERS:

env: the JNI interface pointer.

globalRef: a global reference.

DeleteLocalRef

void DeleteLocalRef(JNIEnv *env, jobject localRef);

Deletes the local reference pointed to by localRef.

PARAMETERS:

env: the JNI interface pointer.

localRef: a local reference.

Object Operations

AllocObject

jobject AllocObject(JNIEnv *env, jclass clazz);

Allocates a new Java object without invoking any of the constructors for the object. Returns a reference to the object.

The clazz argument must not refer to an array class.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns a Java object, or NULL if the object cannot be constructed.

THROWS:

InstantiationException: if the class is an interface or an abstract class.

OutOfMemoryError: if the system runs out of memory.

NewObject
NewObjectA
NewObjectV

jobject NewObject(JNIEnv *env, jclass clazz,
jmethodID methodID, ...);

jobject NewObjectA(JNIEnv *env, jclass clazz,
jmethodID methodID, jvalue *args);

jobject NewObjectV(JNIEnv *env, jclass clazz,
jmethodID methodID, va_list args);

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with <init> as the method name and void (V) as the return type.

The clazz argument must not refer to an array class.

NewObject

Programmers place all arguments that are to be passed to the constructor immediately following the methodID argument. NewObject() accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

NewObjectA

Programmers place all arguments that are to be passed to the constructor in an args array of jvalues that immediately follows the methodID argument. NewObjectA() accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

NewObjectV

Programmers place all arguments that are to be passed to the constructor in an args argument of type va_list that immediately follows the methodID argument. NewObjectV() accepts these arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methodID: the method ID of the constructor.

Additional Parameter for NewObject:

arguments to the constructor.

Additional Parameter for NewObjectA:

args: an array of arguments to the constructor.

Additional Parameter for NewObjectV:

args: a va_list of arguments to the constructor.

RETURNS:

Returns a Java object, or NULL if the object cannot be constructed.

THROWS:

InstantiationException: if the class is an interface or an abstract class.

OutOfMemoryError: if the system runs out of memory.

Any exceptions thrown by the constructor.

GetObjectClass

jclass GetObjectClass(JNIEnv *env, jobject obj);

Returns the class of an object.

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

RETURNS:

Returns a Java class object.

IsInstanceOf

jboolean IsInstanceOf(JNIEnv *env, jobject obj,
jclass clazz);

Tests whether an object is an instance of a class.

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object.

clazz: a Java class object.

RETURNS:

Returns JNI_TRUE if obj can be cast to clazz; otherwise, returns JNI_FALSE. A NULL object can be cast to any class.

IsSameObject

jboolean IsSameObject(JNIEnv *env, jobject ref1,
jobject ref2);

Tests whether two references refer to the same Java object.

PARAMETERS:

env: the JNI interface pointer.

ref1: a Java object.

ref2: a Java object.

RETURNS:

Returns JNI_TRUE if ref1 and ref2 refer to the same Java object, or are both NULL; otherwise, returns JNI_FALSE.

Accessing Fields of Objects

GetFieldID

jfieldID GetFieldID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the field ID for an instance (nonstatic) field of a class. The field is specified by its name and signature. The Get<type>Field and Set<type>Field families of accessor functions use field IDs to retrieve object fields.

GetFieldID() causes an uninitialized class to be initialized.

GetFieldID() cannot be used to obtain the length field of an array. Use GetArrayLength() instead.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the field name in a 0-terminated UTF-8 string.

sig: the field signature in a 0-terminated UTF-8 string.

RETURNS:

Returns a field ID, or NULL if the operation fails.

THROWS:

NoSuchFieldError: if the specified field cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

Get<type>Field Routines

NativeType Get<type>Field(JNIEnv *env, jobject obj,
jfieldID fieldID);

This family of accessor routines returns the value of an instance (nonstatic) field of an object. The field to access is specified by a field ID obtained by calling GetFieldID().

The following table describes the Get<type>Field routine name and result type. You should replace type in Get<type>Field with the Java type of the field, or use one of the actual routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-1 Get<type>Field Family of Accessor Routines

Get<type>Field Routine Name | Native Type
GetObjectField() | jobject
GetBooleanField() | jboolean
GetByteField() | jbyte
GetCharField() | jchar
GetShortField() | jshort
GetIntField() | jint
GetLongField() | jlong
GetFloatField() | jfloat
GetDoubleField() | jdouble

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

fieldID: a valid field ID.

RETURNS:

Returns the content of the field.

Set<type>Field Routines

void Set<type>Field(JNIEnv *env, jobject obj, jfieldID fieldID,
NativeType value);

This family of accessor routines sets the value of an instance (nonstatic) field of an object. The field to access is specified by a field ID obtained by calling GetFieldID().

The following table describes the Set<type>Field routine name and value type. You should replace type in Set<type>Field with the Java type of the field, or use one of the actual routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-2 Set<type>Field Family of Accessor Routines

Set<type>Field Routine | Native Type
SetObjectField() | jobject
SetBooleanField() | jboolean
SetByteField() | jbyte
SetCharField() | jchar
SetShortField() | jshort
SetIntField() | jint
SetLongField() | jlong
SetFloatField() | jfloat
SetDoubleField() | jdouble

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object (must not be NULL).

fieldID: a valid field ID.

value: the new value of the field.

Calling Instance Methods

GetMethodID

jmethodID GetMethodID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the method ID for an instance (nonstatic) method of a class or interface. The method may be defined in one of the clazz's superclasses and inherited by clazz. The method is determined by its name and signature.

GetMethodID() causes an uninitialized class to be initialized.

To obtain the method ID of a constructor, supply <init> as the method name and void (V) as the return type.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the method name in a 0-terminated UTF-8 string.

sig: the method signature in 0-terminated UTF-8 string.

RETURNS:

Returns a method ID, or NULL if the specified method cannot be found.

THROWS:

NoSuchMethodError: if the specified method cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

Call<type>Method Routines
Call<type>MethodA Routines
Call<type>MethodV Routines

NativeType Call<type>Method(JNIEnv *env, jobject obj,
jmethodID methodID, ...);

NativeType Call<type>MethodA(JNIEnv *env, jobject obj,
jmethodID methodID, jvalue *args);

NativeType Call<type>MethodV(JNIEnv *env, jobject obj,
jmethodID methodID, va_list args);

Methods from these three families of operations are used to call a Java instance method from a native method.They only differ in their mechanism for passing parameters to the methods that they call.

These families of operations invoke an instance (nonstatic) method on a Java object, according to the specified method ID. The methodID argument must be obtained by calling GetMethodID().

When these functions are used to call private methods and constructors, the method ID must be derived from the real class of obj, not from one of its superclasses.

Call<type>Method Routines

Programmers place all arguments that are to be passed to the method immediately following the methodID argument. The Call<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

Call<type>MethodA Routines

Programmers place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The Call<type>MethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

Call<type>MethodV Routines

Programmers place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The Call<type>MethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result type. You should replace type in Call<type>Method with the Java type of the method you are calling (or use one of the actual method calling routine names from the table) and replace NativeType with the corresponding native type for that routine.

Table 4-3 Instance Method Calling Routines

Call<type>Method Routine Name | Native Type
CallVoidMethod() CallVoidMethodA() CallVoidMethodV() | void
CallObjectMethod() CallObjectMethodA() CallObjectMethodV() | jobject
CallBooleanMethod() CallBooleanMethodA() CallBooleanMethodV() | jboolean
CallByteMethod() CallByteMethodA() CallByteMethodV() | jbyte
CallCharMethod() CallCharMethodA() CallCharMethodV() | jchar
CallShortMethod() CallShortMethodA() CallShortMethodV() | jshort
CallIntMethod() CallIntMethodA() CallIntMethodV() | jint
CallLongMethod() CallLongMethodA() CallLongMethodV() | jlong
CallFloatMethod() CallFloatMethodA() CallFloatMethodV() | jfloat
CallDoubleMethod() CallDoubleMethodA() CallDoubleMethodV() | jdouble

PARAMETERS:

env: the JNI interface pointer.

obj: a Java object.

methodID: a method ID.

Additional Parameter for Call<type>Method Routines:

arguments to the Java method.

Additional Parameter for Call<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for Call<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the Java method.

THROWS:

Exceptions raised during the execution of the Java method.

CallNonvirtual<type>Method Routines
CallNonvirtual<type>MethodA Routines
CallNonvirtual<type>MethodV Routines

NativeType CallNonvirtual<type>Method(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, ...);

NativeType CallNonvirtual<type>MethodA(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, jvalue *args);

NativeType CallNonvirtual<type>MethodV(JNIEnv *env, jobject obj,
jclass clazz, jmethodID methodID, va_list args);

These families of operations invoke an instance (nonstatic) method on a Java object, according to the specified class and method ID. The methodID argument must be obtained by calling GetMethodID() on the class clazz.

The CallNonvirtual<type>Method families of routines and the Call<type>Method families of routines are different. Call<type>Method routines invoke the method based on the class of the object, while CallNonvirtual<type>Method routines invoke the method based on the class, designated by the clazz parameter, from which the method ID is obtained. The method ID must be obtained from the real class of the object or from one of its superclasses.

CallNonvirtual<type>Method Routines

Programmers place all arguments that are to be passed to the method immediately following the methodID argument. The CallNonvirtual<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

CallNonvirtual<type>MethodA Routines

Programmers place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The CallNonvirtual<type>MethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

CallNonvirtual<type>MethodV Routines

Programmers place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The CallNonvirtualMethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result type. You should replace type in CallNonvirtual<type>Method with the Java type of the method, or use one of the actual method calling routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-4 CallNonvirtual<type>Method Routines

CallNonvirtual<type>Method Routine Name | Native Type
CallNonvirtualVoidMethod() CallNonvirtualVoidMethodA() CallNonvirtualVoidMethodV() | void
CallNonvirtualObjectMethod() CallNonvirtualObjectMethodA() CallNonvirtualObjectMethodV() | jobject
CallNonvirtualBooleanMethod() CallNonvirtualBooleanMethodA() CallNonvirtualBooleanMethodV() | jboolean
CallNonvirtualByteMethod() CallNonvirtualByteMethodA() CallNonvirtualByteMethodV() | jbyte
CallNonvirtualCharMethod() CallNonvirtualCharMethodA() CallNonvirtualCharMethodV() | jchar
CallNonvirtualShortMethod() CallNonvirtualShortMethodA() CallNonvirtualShortMethodV() | jshort
CallNonvirtualIntMethod() CallNonvirtualIntMethodA() CallNonvirtualIntMethodV() | jint
CallNonvirtualLongMethod() CallNonvirtualLongMethodA() CallNonvirtualLongMethodV() | jlong
CallNonvirtualFloatMethod() CallNonvirtualFloatMethodA() CallNonvirtualFloatMethodV() | jfloat
CallNonvirtualDoubleMethod() CallNonvirtualDoubleMethodA() CallNonvirtualDoubleMethodV() | jdouble

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class.

obj: a Java object.

methodID: a method ID.

Additional Parameter for CallNonvirtual<type>Method Routines:

arguments to the Java method.

Additional Parameter for CallNonvirtual<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for CallNonvirtual<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the Java method.

THROWS:

Exceptions raised during the execution of the Java method.

Accessing Static Fields

GetStaticFieldID

jfieldID GetStaticFieldID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the field ID for a static field of a class. The field is specified by its name and signature. The GetStatic<type>Field and SetStatic<type>Field families of accessor functions use field IDs to retrieve static fields.

GetStaticFieldID() causes an uninitialized class to be initialized.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the static field name in a 0-terminated UTF-8 string.

sig: the field signature in a 0-terminated UTF-8 string.

RETURNS:

Returns a field ID, or NULL if the specified static field cannot be found.

THROWS:

NoSuchFieldError: if the specified static field cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

GetStatic<type>Field Routines

NativeType GetStatic<type>Field(JNIEnv *env, jclass clazz,
jfieldID fieldID);

This family of accessor routines returns the value of a static field of an object. The field to access is specified by a field ID, which is obtained by calling GetStaticFieldID().

The following table describes the family of get routine names and result types. You should replace type in GetStatic<type>Field with the Java type of the field, or one of the actual static field accessor routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-5 GetStatic<type>Field Family of Accessor Routines

GetStatic<type>Field Routine Name | Native Type
GetStaticObjectField() | jobject
GetStaticBooleanField() | jboolean
GetStaticByteField() | jbyte
GetStaticCharField() | jchar
GetStaticShortField() | jshort
GetStaticIntField() | jint
GetStaticLongField() | jlong
GetStaticFloatField() | jfloat
GetStaticDoubleField() | jdouble

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

fieldID: a static field ID.

RETURNS:

Returns the content of the static field.

SetStatic<type>Field Routines

void SetStatic<type>Field(JNIEnv *env, jclass clazz,
jfieldID fieldID, NativeType value);

This family of accessor routines sets the value of a static field of an object. The field to access is specified by a field ID, which is obtained by calling GetStaticFieldID().

The following table describes the set routine name and value types. You should replace type in SetStatic<type>Field with the Java type of the field, or one of the actual set static field routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-6 SetStatic<type>Field Family of Accessor Routines

SetStatic<type>Field Routine Name | NativeType
SetStaticObjectField() | jobject
SetStaticBooleanField() | jboolean
SetStaticByteField() | jbyte
SetStaticCharField() | jchar
SetStaticShortField() | jshort
SetStaticIntField() | jint
SetStaticLongField() | jlong
SetStaticFloatField() | jfloat
SetStaticDoubleField() | jdouble

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

fieldID: a static field ID.

value: the new value of the field.

Calling Static Methods

GetStaticMethodID

jmethodID GetStaticMethodID(JNIEnv *env, jclass clazz,
const char *name, const char *sig);

Returns the method ID for a static method of a class. The method is specified by its name and signature.

GetStaticMethodID() causes an uninitialized class to be initialized.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

name: the static method name in a 0-terminated UTF-8 string.

sig: the method signature in a 0-terminated UTF-8 string.

RETURNS:

Returns a method ID, or NULL if the operation fails.

THROWS:

NoSuchMethodError: if the specified static method cannot be found.

ExceptionInInitializerError: if the class initializer fails due to an exception.

OutOfMemoryError: if the system runs out of memory.

CallStatic<type>Method Routines
CallStatic<type>MethodA Routines
CallStatic<type>MethodV Routines

NativeType CallStatic<type>Method(JNIEnv *env, jclass clazz,
jmethodID methodID, ...);

NativeType CallStatic<type>MethodA(JNIEnv *env, jclass clazz,
jmethodID methodID, jvalue *args);

NativeType CallStatic<type>MethodV(JNIEnv *env, jclass clazz,
jmethodID methodID, va_list args);

This family of operations invokes a static method on a Java object, according to the specified method ID. The methodID argument must be obtained by calling GetStaticMethodID().

The method ID must be derived from clazz, not from one of its superclasses.

CallStatic<type>Method Routines

Programmers should place all arguments that are to be passed to the method immediately following the methodID argument. The CallStatic<type>Method routine accepts these arguments and passes them to the Java method that the programmer wishes to invoke.

CallStatic<type>MethodA Routines

Programmers should place all arguments to the method in an args array of jvalues that immediately follows the methodID argument. The CallStaticMethodA routine accepts the arguments in this array, and, in turn, passes them to the Java method that the programmer wishes to invoke.

CallStatic<type>MethodV Routines

Programmers should place all arguments to the method in an args argument of type va_list that immediately follows the methodID argument. The CallStaticMethodV routine accepts the arguments, and, in turn, passes them to the Java method that the programmer wishes to invoke.

The following table describes each of the method calling routines according to their result types. You should replace type in CallStatic<type>Method with the Java type of the method, or one of the actual method calling routine names from the table, and replace NativeType with the corresponding native type for that routine.

Table 4-7 CallStatic<type>Method Calling Routines

CallStatic<type>Method Routine Name | Native Type
CallStaticVoidMethod() CallStaticVoidMethodA() CallStaticVoidMethodV() | void
CallStaticObjectMethod() CallStaticObjectMethodA() CallStaticObjectMethodV() | jobject
CallStaticBooleanMethod() CallStaticBooleanMethodA() CallStaticBooleanMethodV() | jboolean
CallStaticByteMethod() CallStaticByteMethodA() CallStaticByteMethodV() | jbyte
CallStaticCharMethod() CallStaticCharMethodA() CallStaticCharMethodV() | jchar
CallStaticShortMethod() CallStaticShortMethodA() CallStaticShortMethodV() | jshort
CallStaticIntMethod() CallStaticIntMethodA() CallStaticIntMethodV() | jint
CallStaticLongMethod() CallStaticLongMethodA() CallStaticLongMethodV() | jlong
CallStaticFloatMethod() CallStaticFloatMethodA() CallStaticFloatMethodV() | jfloat
CallStaticDoubleMethod() CallStaticDoubleMethodA() CallStaticDoubleMethodV() | jdouble

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methodID: a static method ID.

Additional Parameter for CallStatic<type>Method Routines:

arguments to the static method.

Additional Parameter for CallStatic<type>MethodA Routines:

args: an array of arguments.

Additional Parameter for CallStatic<type>MethodV Routines:

args: a va_list of arguments.

RETURNS:

Returns the result of calling the static Java method.

THROWS:

Exceptions raised during the execution of the Java method.

String Operations

NewString

jstring NewString(JNIEnv *env, const jchar *unicodeChars,
jsize len);

Constructs a new java.lang.String object from an array of Unicode characters.

PARAMETERS:

env: the JNI interface pointer.

unicodeChars: pointer to a Unicode string.

len: length of the Unicode string.

RETURNS:

Returns a Java string object, or NULL if the string cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetStringLength

jsize GetStringLength(JNIEnv *env, jstring string);

Returns the length (the count of Unicode characters) of a Java string.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

RETURNS:

Returns the length of the Java string.

GetStringChars

const jchar * GetStringChars(JNIEnv *env, jstring string,
jboolean *isCopy);

Returns a pointer to the array of Unicode characters of the string. This pointer is valid until ReleaseStringchars() is called.

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to a Unicode string, or NULL if the operation fails.

ReleaseStringChars

void ReleaseStringChars(JNIEnv *env, jstring string,
const jchar *chars);

Informs the VM that the native code no longer needs access to chars. The chars argument is a pointer obtained from string using GetStringChars().

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

chars: a pointer to a Unicode string.

NewStringUTF

jstring NewStringUTF(JNIEnv *env, const char *bytes);

Constructs a new java.lang.String object from an array of UTF-8 characters.

PARAMETERS:

env: the JNI interface pointer, or NULL if the string cannot be constructed.

bytes: the pointer to a UTF-8 string.

RETURNS:

Returns a Java string object, or NULL if the string cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetStringUTFLength

jsize GetStringUTFLength(JNIEnv *env, jstring string);

Returns the UTF-8 length in bytes of a string.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

RETURNS:

Returns the UTF-8 length of the string.

GetStringUTFChars

const char* GetStringUTFChars(JNIEnv *env, jstring string,
jboolean *isCopy);

Returns a pointer to an array of UTF-8 characters of the string. This array is valid until it is released by ReleaseStringUTFChars().

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to a UTF-8 string, or NULL if the operation fails.

ReleaseStringUTFChars

void ReleaseStringUTFChars(JNIEnv *env, jstring string,
const char *utf);

Informs the VM that the native code no longer needs access to utf. The utf argument is a pointer derived from string using GetStringUTFChars().

PARAMETERS:

env: the JNI interface pointer.

string: a Java string object.

utf: a pointer to a UTF-8 string.

Array Operations

GetArrayLength

jsize GetArrayLength(JNIEnv *env, jarray array);

Returns the number of elements in the array.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array object.

RETURNS:

Returns the length of the array.

NewObjectArray

jobjectArray NewObjectArray(JNIEnv *env, jsize length,
jclass elementClass, jobject initialElement);

Constructs a new array holding objects in class elementClass. All elements are initially set to initialElement.

PARAMETERS:

env: the JNI interface pointer.

length: array size.

elementClass: array element class.

initialElement: initialization value.

RETURNS:

Returns a Java array object, or NULL if the array cannot be constructed.

THROWS:

OutOfMemoryError: if the system runs out of memory.

GetObjectArrayElement

jobject GetObjectArrayElement(JNIEnv *env,
jobjectArray array, jsize index);

Returns an element of an Object array.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

index: array index.

RETURNS:

Returns a Java object.

THROWS:

ArrayIndexOutOfBoundsException: if index does not specify a valid index in the array.

SetObjectArrayElement

void SetObjectArrayElement(JNIEnv *env, jobjectArray array,
jsize index, jobject value);

Sets an element of an Object array.

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

index: array index.

value: the new value.

THROWS:

ArrayIndexOutOfBoundsException: if index does not specify a valid index in the array.

ArrayStoreException: if the class of value is not a subclass of the element class of the array.

New<PrimitiveType>Array Routines

ArrayType New<PrimitiveType>Array(JNIEnv *env, jsize length);

A family of operations used to construct a new primitive array object. Table 4-8 describes the specific primitive array constructors. You should replace New<PrimitiveType>Array with one of the actual primitive array constructor routine names from the following table, and replace ArrayType with the corresponding array type for that routine.

Table 4-8 New<PrimitiveType>Array Family of Array Constructors

New<PrimitiveType>Array Routines | Array Type
NewBooleanArray() | jbooleanArray
NewByteArray() | jbyteArray
NewCharArray() | jcharArray
NewShortArray() | jshortArray
NewIntArray() | jintArray
NewLongArray() | jlongArray
NewFloatArray() | jfloatArray
NewDoubleArray() | jdoubleArray

PARAMETERS:

env: the JNI interface pointer.

length: the array length.

RETURNS:

Returns a Java array, or NULL if the array cannot be constructed.

Get<PrimitiveType>ArrayElements Routines

NativeType *Get<PrimitiveType>ArrayElements(JNIEnv *env,
ArrayType array, jboolean *isCopy);

A family of functions that returns the body of the primitive array. The result is valid until the corresponding Release<PrimitiveType>ArrayElements() function is called. Since the returned array may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until Release<PrimitiveType>ArrayElements() is called.

If isCopy is not NULL, then *isCopy is set to JNI_TRUE if a copy is made; or it is set to JNI_FALSE if no copy is made.

The following table describes the specific primitive array element accessors. You should make the following substitutions:

  • Replace Get<PrimitiveType>ArrayElements with one of the actual primitive element accessor routine names from the table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.
Regardless of how boolean arrays are represented in the Java VM, GetBooleanArrayElements() always returns a pointer to jbooleans, with each byte denoting an element (the unpacked representation). All arrays of other types are guaranteed to be contiguous in memory.

Table 4-9 Get<PrimitiveType>ArrayElements Family of Accessor Routines

Get<PrimitiveType>ArrayElements Routines | Array Type | Native Type
GetBooleanArrayElements() | jbooleanArray | jboolean
GetByteArrayElements() | jbyteArray | jbyte
GetCharArrayElements() | jcharArray | jchar
GetShortArrayElements() | jshortArray | jshort
GetIntArrayElements() | jintArray | jint
GetLongArrayElements() | jlongArray | jlong
GetFloatArrayElements() | jfloatArray | jfloat
GetDoubleArrayElements() | jdoubleArray | jdouble

PARAMETERS:

env: the JNI interface pointer.

array: a Java string object.

isCopy: a pointer to a boolean.

RETURNS:

Returns a pointer to the array elements, or NULL if the operation fails.

Release<PrimitiveType>ArrayElements Routines

void Release<PrimitiveType>ArrayElements(JNIEnv *env,
ArrayType array, NativeType *elems, jint mode);

A family of functions that informs the VM that the native code no longer needs access to elems. The elems argument is a pointer derived from array using the corresponding Get<PrimitiveType>ArrayElements() function. If necessary, this function copies back all changes made to elems to the original array.

The mode argument provides information on how the array buffer should be released. mode has no effect if elems is not a copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

Table 4-10 Primitive Array Release Modes

mode | actions
0 | copy back the content and free the elems buffer
JNI_COMMIT | copy back the content but do not free the elems buffer
JNI_ABORT | free the buffer without copying back the possible changes

In most cases, programmers pass "0" to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give the programmer more control over memory management and should be used with extreme care.

The next table describes the specific routines that comprise the family of primitive array disposers. You should make the following substitutions:

  • Replace Release<PrimitiveType>ArrayElements with one of the actual primitive array disposer routine names from Table 4-11.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.

Table 4-11 Release<PrimitiveType>ArrayElements Family of Array Routines

Release<PrimitiveType>ArrayElements Routines | Array Type | Native Type
ReleaseBooleanArrayElements() | jbooleanArray | jboolean
ReleaseByteArrayElements() | jbyteArray | jbyte
ReleaseCharArrayElements() | jcharArray | jchar
ReleaseShortArrayElements() | jshortArray | jshort
ReleaseIntArrayElements() | jintArray | jint
ReleaseLongArrayElements() | jlongArray | jlong
ReleaseFloatArrayElements() | jfloatArray | jfloat
ReleaseDoubleArrayElements() | jdoubleArray | jdouble

PARAMETERS:

env: the JNI interface pointer.

array: a Java array object.

elems: a pointer to array elements.

mode: the release mode.

Get<PrimitiveType>ArrayRegion Routines

void Get<PrimitiveType>ArrayRegion(JNIEnv *env, ArrayType array,
jsize start, jsize len, NativeType *buf);

A family of functions that copies a region of a primitive array into a buffer.

The following table describes the specific primitive array element accessors. You should do the following substitutions:

  • Replace Get<PrimitiveType>ArrayRegion with one of the actual primitive element accessor routine names from Table 4-12.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.

Table 4-12 Get<PrimitiveType>ArrayRegion Family of Array Accessor Routines

Get<PrimitiveType>ArrayRegion Routine | Array Type | Native Type
GetBooleanArrayRegion() | jbooleanArray | jboolean
GetByteArrayRegion() | jbyteArray | jbyte
GetCharArrayRegion() | jcharArray | jchar
GetShortArrayRegion() | jshortArray | jhort
GetIntArrayRegion() | jintArray | jint
GetLongArrayRegion() | jlongArray | jlong
GetFloatArrayRegion() | jfloatArray | jloat
GetDoubleArrayRegion() | jdoubleArray | jdouble

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

start: the starting index.

len: the number of elements to be copied.

buf: the destination buffer.

THROWS:

ArrayIndexOutOfBoundsException: if one of the indexes in the region is not valid.

Set<PrimitiveType>ArrayRegion Routines

void Set<PrimitiveType>ArrayRegion(JNIEnv *env, ArrayType array,
jsize start, jsize len, NativeType *buf);

A family of functions that copies back a region of a primitive array from a buffer.

The following table describes the specific primitive array element accessors. You should make the following replacements:

  • Replace Set<PrimitiveType>ArrayRegion with one of the actual primitive element accessor routine names from the table.
  • Replace ArrayType with the corresponding array type.
  • Replace NativeType with the corresponding native type for that routine.

    Table 4-13 Set<PrimitiveType>ArrayRegion Family of Array Accessor Routines

    Set<PrimitiveType>ArrayRegion Routine | Array Type | Native Type
    SetBooleanArrayRegion() | jbooleanArray | jboolean
    SetByteArrayRegion() | jbyteArray | jbyte
    SetCharArrayRegion() | jcharArray | jchar
    SetShortArrayRegion() | jshortArray | jshort
    SetIntArrayRegion() | jintArray | jint
    SetLongArrayRegion() | jlongArray | jlong
    SetFloatArrayRegion() | jfloatArray | jfloat
    SetDoubleArrayRegion() | jdoubleArray | jdouble

PARAMETERS:

env: the JNI interface pointer.

array: a Java array.

start: the starting index.

len: the number of elements to be copied.

buf: the source buffer.

THROWS:

ArrayIndexOutOfBoundsException: if one of the indexes in the region is not valid.

Registering Native Methods

RegisterNatives

jint RegisterNatives(JNIEnv *env, jclass clazz,
const JNINativeMethod *methods, jint nMethods);

Registers native methods with the class specified by the clazz argument. The methods parameter specifies an array of JNINativeMethod structures that contain the names, signatures, and function pointers of the native methods. The nMethods parameter specifies the number of native methods in the array. The JNINativeMethod structure is defined as follows:

    typedef struct {
        char *name;
        char *signature;
        void *fnPtr;
    } JNINativeMethod;
The function pointers nominally must have the following signature:

    ReturnType (*fnPtr)(JNIEnv *env, jobject objectOrClass, ...);

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

methods: the native methods in the class.

nMethods: the number of native methods in the class.

RETURNS:

Returns "0" on success; returns a negative value on failure.

THROWS:

NoSuchMethodError: if a specified method cannot be found or if the method is not native.

UnregisterNatives

jint UnregisterNatives(JNIEnv *env, jclass clazz);

Unregisters native methods of a class. The class goes back to the state before it was linked or registered with its native method functions.

This function should not be used in normal native code. Instead, it provides special programs a way to reload and relink native libraries.

PARAMETERS:

env: the JNI interface pointer.

clazz: a Java class object.

RETURNS:

Returns "0" on success; returns a negative value on failure.

Monitor Operations

MonitorEnter

jint MonitorEnter(JNIEnv *env, jobject obj);

Enters the monitor associated with the underlying Java object referred to by obj.

Each Java object has a monitor associated with it. If the current thread already owns the monitor associated with obj, it increments a counter in the monitor indicating the number of times this thread has entered the monitor. If the monitor associated with obj is not owned by any thread, the current thread becomes the owner of the monitor, setting the entry count of this monitor to 1. If another thread already owns the monitor associated with obj, the current thread waits until the monitor is released, then tries again to gain ownership.

PARAMETERS:

env: the JNI interface pointer.

obj: a normal Java object or class object.

RETURNS:

Returns "0" on success; returns a negative value on failure.

MonitorExit

jint MonitorExit(JNIEnv *env, jobject obj);

The current thread must be the owner of the monitor associated with the underlying Java object referred to by obj. The thread decrements the counter indicating the number of times it has entered this monitor. If the value of the counter becomes zero, the current thread releases the monitor.

PARAMETERS:

env: the JNI interface pointer.

obj: a normal Java object or class object.

RETURNS:

Returns "0" on success; returns a negative value on failure.

Java VM Interface

GetJavaVM

jint GetJavaVM(JNIEnv *env, JavaVM **vm);

Returns the Java VM interface (used in the Invocation API) associated with the current thread. The result is placed at the location pointed to by the second argument, vm.

PARAMETERS:

env: the JNI interface pointer.

vm: a pointer to where the result should be placed.

RETURNS:

Returns "0" on success; returns a negative value on failure.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Java(tm) Debug Wire Protocol

Java

JavaTM Debug Wire Protocol

Protocol details

Overview

The JavaTM Debug Wire Protocol (JDWP) is the protocol used for communication between a debugger and the Java virtual machine (VM) which it debugs (hereafter called the target VM). The existence of JDWP can allow the same debugger to work

  • in a different process on the same computer, or
  • on a remote computer,

Future versions of JDWP may allow in-process debugging.

The JDWP differs from many protocol specifications in that it only details format and layout, not transport. A JDWP implementation can be designed to accept different transport mechanisms through a simple API. A particular transport does not necessarily support each of the three debugger/target VM combinations listed above.

The JDWP is designed to be simple enough for easy implementation, yet it is flexible enough for future growth.

The JDWP is primarily designed to facilitate efficient use by the JDI API; many of its abilities are tailored to that end.

A JDWP implementation spans the debugger and the target VM. Typically, the debugger side is written in Java and the target side is written in native code. The target side should be written in native code to avoid the deadlocks and intrusiveness that would be unavoidable in a Java Language implementation.

Currently, the JDWP does not specify any mechanism for transport rendezvous or any directory services. This may be changed in the future, but it may be addressed in a separate document.

JDWP Packets

The JDWP is packet based and is not stateful. There are two basic packet types: command packets and reply packets.

Command packets may be sent by either the debugger or the target VM. They are used by the debugger to request information from the target VM, or to control program execution. Command packets are sent by the target VM to notify the debugger of some event in the target VM such as a breakpoint or exception.

A reply packet is sent only in response to a command packet and always provides information success or failure of the command. Reply packets may also carry data requested in the command (for example, the value of a field or variable). Currently, events sent from the target VM do not require a response packet from the debugger.

The JDWP is asynchronous; multiple command packets may be sent before the first reply packet is received.

Command and reply packet headers are equal in size; this is to make transports easier to implement and abstract. The layout of each packet looks like this:

Command Packet
  • Header
    • length (4 bytes)
    • id (4 bytes)
    • flags (1 byte)
    • command set (1 byte)
    • command (1 byte)
  • data (Variable)
Reply Packet
  • Header
    • length (4 bytes)
    • id (4 bytes)
    • flags (1 byte)
    • error code (2 bytes)
  • data (Variable)

All fields and data sent via JDWP should be in big-endian format. (See the Java Virtual Machine Specification for the definition of big-endian.) The first three fields are identical in both packet types.

Command and Reply Packet Fields

Shared Header Fields
length
The length field is the size, in bytes, of the entire packet, including the length field. The header size is 11 bytes, so a packet with no data would set this field to 11.
id
The id field is used to uniquely identify each packet command/reply pair. A reply packet has the same id as the command packet to which it replies. This allows asynchronous commands and replies to be matched. The id field must be unique among all outstanding commands sent from one source. (Outstanding commands originating from the debugger may use the same id as outstanding commands originating from the target VM.) Other than that, there are no requirements on the allocation of id's.

A simple monotonic counter should be adequate for most implementations. It will allow 2^32 unique outstanding packets and is the simplest implementation alternative.

flags
Flags are used to alter how any command is queued and processed and to tag command packets that originate from the target VM. There is currently one flag bits defined; future versions of the protocol may define additional flags.

0x80
Reply packet

The reply bit, when set, indicates that this packet is a reply.

Command Packet Header Fields
command set
This field is useful as a means for grouping commands in a meaningful way. The Sun defined command sets are used to group commands by the interfaces they support in the JDI. For example, all commands that support the JDI VirtualMachine interface are grouped in a VirtualMachine command set.

The command set space is roughly divided as follows:

0 - 63
Sets of commands sent to the target VM
64 - 127
Sets of commands sent to the debugger
128 - 256
Vendor-defined commands and extensions.
command
This field identifies a particular command in a command set. This field, together with the command set field, is used to indicate how the command packet should be processed. More succinctly, they tell the receiver what to do. Specific commands are presented later in this document.
Reply Packet Header Fields
error code
This field is used to indicate if the command packet that is being replied too was successfully processed. A value of zero indicates success, a non-zero value indicates an error. The error code returned may be specific to each command set/command, but it is often mapped to a JVMDI error code.
Data
The data field is unique to each command set/command. It is also different between command and reply packet pairs. For example, a command packet that requests a field value will contain references to the object and field id's for the desired value in its data field. The reply packet's data field will contain the value of the field.

Detailed Command Information

In general, the data field of a command or reply packet is an abstraction of a group of multiple fields that define the command or reply data. Each subfield of a data field is encoded in big endian (Java) format. The detailed composition of data fields for each command and its reply are described in this section.

There is a small set of common data types that are common to many of the different JDWP commands and replies. They are described below.

Name | Size | Description
byte | 1 byte | A byte value.
boolean | 1 byte | A boolean value, encoded as 0 for false and non-zero for true.
int | 4 bytes | An four-byte integer value. The integer is signed unless explicitly stated to be unsigned.
long | 8 bytes | An eight-byte integer value. The value is signed unless explicitly stated to be unsigned.
objectID Target VM-specific, up to 8 bytes (see below) Uniquely identifies an object in the target VM. A particular object will be identified by exactly one objectID in JDWP commands and replies throughout its lifetime (or until the objectID is explicitly disposed). An ObjectID is not reused to identify a different object unless it has been explicitly disposed, regardless of whether the referenced object has been garbage collected. An objectID of 0 represents a null object.

Note that the existence of an object ID does not prevent the garbage collection of the object. Any attempt to access a a garbage collected object with its object ID will result in the INVALID_OBJECT error code. Garbage collection can be disabled with the DisableCollection command, but it is not usually necessary to do so.

tagged-objectID | size of objectID plus one byte | The first byte is a signature byte which is used to identify the object's type. See JDWP.Tag for the possible values of this byte (note that only object tags, not primitive tags, may be used). It is followed immediately by the objectID itself.
threadID | same as objectID | Uniquely identifies an object in the target VM that is known to be a thread
threadGroupID | same as objectID | Uniquely identifies an object in the target VM that is known to be a thread group
stringID | same as objectID | Uniquely identifies an object in the target VM that is known to be a string object. Note: this is very different from string, which is a value.
classLoaderID | same as objectID | Uniquely identifies an object in the target VM that is known to be a class loader object
classObjectID | same as objectID | Uniquely identifies an object in the target VM that is known to be a class object.
arrayID | same as objectID | Uniquely identifies an object in the target VM that is known to be an array.
referenceTypeID | same as objectID | Uniquely identifies a reference type in the target VM. It should not be assumed that for a particular class, the classObjectID and the referenceTypeID are the same. A particular reference type will be identified by exactly one ID in JDWP commands and replies throughout its lifetime A referenceTypeID is not reused to identify a different reference type, regardless of whether the referenced class has been unloaded.
classID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be a class type.
interfaceID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be an interface type.
arrayTypeID | same as referenceTypeID | Uniquely identifies a reference type in the target VM that is known to be an array type.
methodID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a method in some class in the target VM. The methodID must uniquely identify the method within its class/interface or any of its subclasses/subinterfaces/implementors. A methodID is not necessarily unique on its own; it is always paired with a referenceTypeID to uniquely identify one method. The referenceTypeID can identify either the declaring type of the method or a subtype.
fieldID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a field in some class in the target VM. The methodID must uniquely identify the method within its class/interface or any of its subclasses/subinterfaces/implementors. A fieldID is not necessarily unique on its own; it is always paired with a referenceTypeID to uniquely identify one field. The referenceTypeID can identify either the declaring type of the field or a subtype.
frameID | Target VM-specific, up to 8 bytes (see below) | Uniquely identifies a frame in the target VM. The frameID must uniquely identify the frame within the entire VM (not only within a given thread). The frameID need only be valid during the time its thread is suspended.
location Target VM specific An executable location. The location is identified by one byte type tag followed by a a classID followed by a methodID followed by an unsigned eight-byte index, which identifies the location within the method. Index values are restricted as follows:
  • The index of the start location for the method is less than all other locations in the method.
  • The index of the end location for the method is greater than all other locations in the method.
  • If a line number table exists for a method, locations that belong to a particular line must fall between the line's location index and the location index of the next line in the table.
Index values within a method are monotonically increasing from the first executable point in the method to the last. For many implementations, each byte-code instruction in the method has its own index, but this is not required.

The type tag is necessary to identify whether location's classID identifies a class or an interface. Almost all locations are within classes, but it is possible to have executable code in the static initializer of an interface.

string | Variable | A UTF-8 encoded string, not zero terminated, preceded by a four-byte integer length.
value | Variable | A value retrieved from the target VM. The first byte is a signature byte which is used to identify the type. See JDWP.Tag for the possible values of this byte. It is followed immediately by the value itself. This value can be an objectID (see Get ID Sizes) or a primitive value (1 to 8 bytes). More details about each value type can be found in the next table.
untagged-value | Variable | A value as described above without the signature byte. This form is used when the signature information can be determined from context.
arrayregion | Variable | A compact representation of values used with some array operations. The first byte is a signature byte which is used to identify the type. See JDWP.Tag for the possible values of this byte. Next is a four-byte integer indicating the number of values in the sequence. This is followed by the values themselves: Primitive values are encoded as a sequence of untagged-values; Object values are encoded as a sequence of values.

Object ids, reference type ids, field ids, method ids, and frame ids may be sized differently in different target VM implementations. Typically, their sizes correspond to size of the native identifiers used for these items in JNI and JVMDI calls. The maximum size of any of these types is 8 bytes. The "idSizes" command in the VirtualMachine command set is used by the debugger to determine the size of each of these types.

Protocol details

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


Java(tm) Platform Debugger Architecture - Beta 2 Readme

JavaTM Platform Debugger Architecture
Known Bugs and Limitations

  • The debugged VM can crash when very large numbers of events are generated. This is especially noticeable if you enable all method entry and exit events for a large application.
  • Some events that occur at the same location are not properly combined into event sets; instead, they are reported separately as single-element event sets. This happens when events of different kinds occur at the same thread and location.
  • The setValue method sometimes fails with an incorrect ClassNotLoadedException when the destination Field, LocalVariable, or ArrayReference element has an array type.
  • An attempt to use a StackFrame that is no longer valid (i.e. its thread has been resumed since it was retrieved), can result in a crash in the target VM.
  • Generated parser files for JDB use deprecated APIs from the Java 2 Platform libraries.
  • Synthetic fields and methods are not suppressed nor are they distinguished from non-synthetic members.
  • In-process debugging through the JDI is not supported.
  • Constructors have the name "<init>" and method style signatures, for example the default constructor has the signature "()V".

The following bugs exist in the current Win32 classic VM JVMDI implementation and in the Solaris Reference VM implementation. They will be fixed in the first maintenance release of the Java 2 SDK.

  • For classes compiled without -g, JDI responds to queries for local variables with empty lists instead of throwing the appropriate AbsentInformationException.
  • Some breakpoints at the start of methods are not reported if you are also stepping over the method invocation.
  • Incorrect local variable values are reported during method exit events.
  • Redundant step events are generated when instruction stepping through quicked instructions for the first time.

The current production release of the Sun SolarisTM VM cannot be used with this release. The Solaris Reference implementation can be used, however, with the limitations listed above.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


Java(tm) Debug Wire Protocol

Java

JavaTM Debug Wire Protocol
Specification Details

  • VirtualMachine Command Set (1)
    • Version (1)
    • ClassesBySignature (2)
    • AllClasses (3)
    • AllThreads (4)
    • TopLevelThreadGroups (5)
    • Dispose (6)
    • IDSizes (7)
    • Suspend (8)
    • Resume (9)
    • Exit (10)
    • CreateString (11)
    • Capabilities (12)
    • ClassPaths (13)
    • DisposeObjects (14)
    • HoldEvents (15)
    • ReleaseEvents (16)
  • ReferenceType Command Set (2)
    • Signature (1)
    • ClassLoader (2)
    • Modifiers (3)
    • Fields (4)
    • Methods (5)
    • GetValues (6)
    • SourceFile (7)
    • NestedTypes (8)
    • Status (9)
    • Interfaces (10)
    • ClassObject (11)
  • ClassType Command Set (3)
    • Superclass (1)
    • SetValues (2)
    • InvokeMethod (3)
    • NewInstance (4)
  • ArrayType Command Set (4)
    • NewInstance (1)
  • InterfaceType Command Set (5)
  • Method Command Set (6)
    • LineTable (1)
    • VariableTable (2)
    • Bytecodes (3)
  • Field Command Set (8)
  • ObjectReference Command Set (9)
    • ReferenceType (1)
    • GetValues (2)
    • SetValues (3)
    • MonitorInfo (5)
    • InvokeMethod (6)
    • DisableCollection (7)
    • EnableCollection (8)
    • IsCollected (9)
  • StringReference Command Set (10)
    • Value (1)
  • ThreadReference Command Set (11)
    • Name (1)
    • Suspend (2)
    • Resume (3)
    • Status (4)
    • ThreadGroup (5)
    • Frames (6)
    • FrameCount (7)
    • OwnedMonitors (8)
    • CurrentContendedMonitor (9)
    • Stop (10)
    • Interrupt (11)
    • SuspendCount (12)
  • ThreadGroupReference Command Set (12)
    • Name (1)
    • Parent (2)
    • Children (3)
  • ArrayReference Command Set (13)
    • Length (1)
    • GetValues (2)
    • SetValues (3)
  • ClassLoaderReference Command Set (14)
    • VisibleClasses (1)
  • EventRequest Command Set (15)
    • Set (1)
    • Clear (2)
    • ClearAllBreakpoints (3)
  • StackFrame Command Set (16)
    • GetValues (1)
    • SetValues (2)
    • ThisObject (3)
  • ClassObjectReference Command Set (17)
    • ReflectedType (1)
  • Event Command Set (64)
    • Composite (100)
  • Error Constants
  • EventKind Constants
  • ThreadStatus Constants
  • SuspendStatus Constants
  • ClassStatus Constants
  • TypeTag Constants
  • Tag Constants
  • StepDepth Constants
  • StepSize Constants
  • SuspendPolicy Constants
  • InvokeOptions Constants

    VirtualMachine Command Set (1)

    Version Command (1)
    Returns the JDWP version implemented by the target VM. The version string format is implementation dependent.
    Out Data
    (None)
    Reply Data
    string | description | Text information on the VM version
    int | jdwpMajor | Major JDWP Version number
    int | jdwpMinor | Minor JDWP Version number
    string | vmVersion | Target VM JRE version, as in the java.version property
    string | vmName | Target VM name, as in the java.vm.name property
    ClassesBySignature Command (2)
    Returns reference types for all the classes loaded by the target VM which match the given signature. Multple reference types will be returned if two or more class loaders have loaded a class of the same name. The search is confined to loaded classes only; no attempt is made to load a class of the given signature.
    Out Data
    string signature JNI signature of the class to find (for example, "Ljava/lang/String;").
    Reply Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | Matching loaded reference type
    int | status | The current class status.
    AllClasses Command (3)
    Returns reference types for all classes currently loaded by the target VM.
    Out Data
    (None)
    Reply Data
    int | classes | Number of reference types that follow.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | Loaded reference type
    string | signature | The JNI signature of the loaded reference type
    int | status | The current class status.
    AllThreads Command (4)
    Returns all threads currently running in the target VM . The returned list contains threads created through java.lang.Thread, all native threads attached to the target VM through JNI, and system threads created by the target VM. Threads that have not yet been started and threads that have completed their execution are not included in the returned list.
    Out Data
    (None)
    Reply Data
    int | threads | Number of threads that follow.
    Repeated threads times:
    threadID | thread | A running thread
    TopLevelThreadGroups Command (5)
    Returns all thread groups that do not have a parent. This command may be used as the first step in building a tree (or trees) of the existing thread groups.
    Out Data
    (None)
    Reply Data
    int | groups | Number of thread groups that follow.
    Repeated groups times:
    threadGroupID | group | A top level thread group
    Dispose Command (6)
    Invalidates this virtual machine mirror. The communication channel to the target VM is closed, and the target VM prepares to accept another subsequent connection from this debugger or another debugger, including the following tasks:
    • All event requests are cancelled.
    • All threads suspended by the thread-level resume command or the VM-level resume command are resumed as many times as necessary for them to run.
    • Garbage collection is re-enabled in all cases where it was disabled
    Any current method invocations executing in the target VM are continued after the disconnection. Upon completion of any such method invocation, the invoking thread continues from the location where it was originally stopped.

    Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

    Out Data
    (None)
    Reply Data
    (None)
    IDSizes Command (7)
    Returns the sizes of variably-sized data types in the target VM.The returned values indicate the number of bytes used by the identifiers in command and reply packets.
    Out Data
    (None)
    Reply Data
    int | fieldIDSize | fieldID size in bytes
    int | methodIDSize | methodID size in bytes
    int | objectIDSize | objectID size in bytes
    int | referenceTypeIDSize | referenceTypeID size in bytes
    int | frameIDSize | frameID size in bytes
    Suspend Command (8)
    Suspends the execution of the application running in the target VM. All Java threads currently running will be suspended.

    Unlike java.lang.Thread.suspend, suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed through the VM-level resume command or the thread-level resume command the same number of times it has been suspended.

    Out Data
    (None)
    Reply Data
    (None)
    Resume Command (9)
    Resumes execution of the application after the suspend command or an event has stopped it. Suspensions of the Virtual Machine and individual threads are counted. If a particular thread is suspended n times, it must resumed n times before it will continue.
    Out Data
    (None)
    Reply Data
    (None)
    Exit Command (10)
    Terminates the target VM with the given exit code. All ids previously returned from the target VM become invalid. Threads running in the VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.
    Out Data
    int exitCode the exit code
    Reply Data
    (None)
    CreateString Command (11)
    Creates a new string object in the target VM and returns its id.
    Out Data
    string utf UTF-8 characters to use in the created string.
    Reply Data
    stringID stringObject Created string (instance of java.lang.String)
    Capabilities Command (12)
    Retrieve this VM's capabilities. The capabilities are returned as booleans, each indicating the presence or absence of a capability. The commands associated with each capability will return the NOT_IMPLEMENTED error if the cabability is not available.
    Out Data
    (None)
    Reply Data
    boolean | canWatchFieldModification | Can the VM watch field modification, and therefore can it send the Modification Watchpoint Event?
    boolean | canWatchFieldAccess | Can the VM watch field access, and therefore can it send the Access Watchpoint Event?
    boolean | canGetBytecodes | Can the VM get the bytecodes of a given method?
    boolean | canGetSyntheticAttribute | Can the VM determine whether a field or method is synthetic? (that is, can the VM determine if the method or the field was invented by the compiler?)
    boolean | canGetOwnedMonitorInfo | Can the VM get the owned monitors infornation for a thread?
    boolean | canGetCurrentContendedMonitor | Can the VM get the current contended monitor of a thread?
    boolean | canGetMonitorInfo | Can the VM get the monitor information for a given object?
    ClassPaths Command (13)
    Retrieve the classpath and bootclasspath of the target VM. If the classpath is not defined, returns an empty list. If the bootclasspath is not defined returns an empty list.
    Out Data
    (None)
    Reply Data
    string | baseDir | Base directory used to resolve relative paths in either of the following lists.
    int | classpaths | Number of paths in classpath.
    Repeated classpaths times:
    string | path | One component of classpath
    int | bootclasspaths | Number of paths in bootclasspath.
    Repeated bootclasspaths times:
    string | path | One component of bootclasspath
    DisposeObjects Command (14)
    Releases a list of object IDs. For each object in the list, the following applies. No further commands will be sent with the object's ID in the list. If the object has not yet been garbage collected, any back-end resources associated with the ID will be freed, and if garbage collection was disabled for the object, it will be re-enabled.

    Use of this command is not required. If it is not sent, resources associated with each ID will be freed by the back-end at some time after the corresponding object is garbage collected. It is most useful to use this command to reduce the load on the back-end if a very large number of objects has been retrieved from the back-end (a large array, for example) but may not be garbage collected any time soon.

    The object IDs may be re-used by the back end after they have been disposed with this command.

    Out Data
    int | requests | Number of object dispose requests that follow
    Repeated requests times:
    objectID | object | The object ID
    int | refCnt | The number of times this object ID has been part of a packet received from the back-end. An accurate count prevents the object ID from being freed on the back-end if it is part of an incoming packet, not yet handled by the front-end.
    Reply Data
    (None)
    HoldEvents Command (15)
    Tells the target VM to stop sending events. Events are not discarded; they are held until a subsequent ReleaseEvents command is sent. This command is useful to control the number of events sent to the debugger VM in situations where very large numbers of events are generated. While events are held by the debugger back-end, application execution may be frozen by the debugger back-end to prevent buffer overflows on the back end. Responses to commands are never held and are not affected by this command. If events are already being held, this command is ignored.
    Out Data
    (None)
    Reply Data
    (None)
    ReleaseEvents Command (16)
    Tells the target VM to continue sending events. This command is used to restore normal activity after a HoldEvents command. If there is no current HoldEvents command in effect, this command is ignored.
    Out Data
    (None)
    Reply Data
    (None)

    ReferenceType Command Set (2)

    Signature Command (1)
    Returns the JNI signature of a reference type. JNI signature formats are described in the Java Native Inteface Specification

    For primitive classes the returned signature is the signature of the corresponding primitive type; for example, "I" is returned as the signature of the class represented by java.lang.Integer.TYPE.

    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string signature The JNI signature for the reference type.
    ClassLoader Command (2)
    Returns the instance of java.lang.ClassLoader which loaded a given reference type. If the reference type was loaded by the system class loader, the returned object ID is null.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    classLoaderID classLoader The class loader for the reference type.
    Modifiers Command (3)
    Returns the modifiers (also known as access flags) for a reference type. The returned bit mask contains information on the declaration of the reference type. If the reference type is an array or a primitive class (for example, java.lang.Integer.TYPE), the value of the returned bit mask is undefined.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int modBits Modifier bits as defined in the VM Specification
    Fields Command (4)
    Returns information for each field in a reference type. Inherited fields are not included. The field list will include any synthetic fields created by the compiler. Fields are returned in the order they occur in the class file.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared fields.
    Repeated declared times:
    fieldID | fieldID | Field ID.
    string | name | Name of field.
    string | signature | JNI Signature of field.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the field declaration. Individual flag values are defined in the VM Specification.In addition, The 0xf0000000 bit identifies the field as synthetic, if the synthetic attribute capability is available.
    Methods Command (5)
    Returns information for each method in a reference type. Inherited methodss are not included. The list of methods will include constructors (identified with the name "<init>"), the initialization method (identified with the name "<clinit>") if present, and any synthetic methods created by the compiler. Methods are returned in the order they occur in the class file.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | declared | Number of declared methods.
    Repeated declared times:
    methodID | methodID | Method ID.
    string | name | Name of method.
    string | signature | JNI signature of method.
    int | modBits | The modifier bit flags (also known as access flags) which provide additional information on the method declaration. Individual flag values are defined in the VM Specification.In addition, The 0xf0000000 bit identifies the method as synthetic, if the synthetic attribute capability is available.
    GetValues Command (6)
    Returns the value of one or more static fields of the reference type. Each field must be member of the reference type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
    Out Data
    referenceTypeID | refType | The reference type ID.
    int | fields | The number of values to get
    Repeated fields times:
    fieldID | fieldID | A field to get
    Reply Data
    int | values | The number of values returned
    Repeated values times:
    value | value | The field value
    SourceFile Command (7)
    Returns the name of source file in which a reference type was declared.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    string sourceFile The source file name. No path information for the file is included
    NestedTypes Command (8)
    Returns the classes and interfaces directly nested within this type.Types further nested within those types are not included.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | classes | The number of nested classes and interfaces
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | The nested class or interface ID.
    Status Command (9)
    Returns the current status of the reference type. The status indicates the extent to which the reference type has been initialized, as described in the VM specification. The returned status bits are undefined for array types and for primitive classes (such as java.lang.Integer.TYPE).
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int status Status bits:See JDWP.ClassStatus
    Interfaces Command (10)
    Returns the interfaces declared as implemented by this class. Interfaces indirectly implemented (extended by the implemented interface or implemented by a superclass) are not included.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    int | interfaces | The number of implemented interfaces
    Repeated interfaces times:
    interfaceID | interfaceType | implemented interface.
    ClassObject Command (11)
    Returns the class object corresponding to this type.
    Out Data
    referenceTypeID refType The reference type ID.
    Reply Data
    classObjectID classObject class object.

    ClassType Command Set (3)

    Superclass Command (1)
    Returns the immediate superclass of a class.
    Out Data
    classID clazz The class type ID.
    Reply Data
    classID superclass The superclass (null if the class ID for java.lang.Object is specified).
    SetValues Command (2)
    Sets the value of one or more static fields. Each field must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. Final fields cannot be set.For primitive values, the value's type must match the field's type exactly. For object values, there must exist a widening reference conversion from the value's type to the field's type and the field's type must be loaded.
    Out Data
    classID | clazz | The class type ID.
    int | values | The number of fields to set.
    Repeated values times:
    fieldID | fieldID | Field to set.
    untagged-value | value | Value to put in the field.
    Reply Data
    (None)
    InvokeMethod Command (3)
    Invokes a static method. The method must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.

    The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    classID | clazz | The class type ID.
    threadID | thread | The thread in which to invoke.
    methodID | method | The method to invoke.
    int | arguments
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Invocation options
    Reply Data
    value | returnValue | The returned value.
    tagged-objectID | exception | The thrown exception.
    NewInstance Command (4)
    Creates a new object of this type, invoking the specified constructor. The constructor method ID must be a member of the class type.

    Instance creation will occur in the specified thread. Instance creation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified constructor is invoked with the arguments in the specified argument list. The constructor invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the constructor throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    classID | clazz | The class type ID.
    threadID | thread | The thread in which to invoke the constructor.
    methodID | method | The constructor to invoke.
    int | arguments
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Constructor invocation options
    Reply Data
    tagged-objectID | newObject | The newly created object, or null if the constructor threw an exception.
    tagged-objectID | exception | The thrown exception, if any; otherwise, null.

    ArrayType Command Set (4)

    NewInstance Command (1)
    Creates a new array object of this type with a given length.
    Out Data
    arrayID | arrType | The array type of the new instance.
    int | length | The length of the array.
    Reply Data
    tagged-objectID newArray The newly created array object.

    InterfaceType Command Set (5)

    Method Command Set (6)

    LineTable Command (1)
    Returns line number information for the method. The line table maps source line numbers to the initial code index of the line. The line table is ordered by code index (from lowest to highest).
    Out Data
    referenceTypeID | classID | The class.
    methodID | methodID | The method.
    Reply Data
    long | start | Lowest valid code index for the method.
    long | end | Highest valid code index for the method.
    int | lines | The number of lines.
    Repeated lines times:
    long | lineCodeIndex | Initial code index of the line (unsigned).
    int | lineNumber | Line number.
    VariableTable Command (2)
    Returns variable information for the method. The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table. Also, synthetic variables may be present.
    Out Data
    referenceTypeID | classID | The class.
    methodID | methodID | The method.
    Reply Data
    int | argCnt | The number of words in the frame used by arguments. Eight-byte arguments use two words; all others use one.
    int | slots | The number of variables.
    Repeated slots times:
    long | codeIndex | First code index at which the variable is visible (unsigned). Used in conjunction with length. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" codeIndex + length
    string | name | The variable's name.
    string | signature | The variable type's JNI signature.
    int | length | Unsigned value used in conjunction with codeIndex. The variable can be get or set only when the current codeIndex <= current="current" frame="frame" code="code" index="index" <="<" code index + length
    int | slot | The local variable's index in its frame
    Bytecodes Command (3)
    Retrieve the method's bytecodes as defined in the JVM Specification.
    Out Data
    referenceTypeID | classID | The class.
    methodID | methodID | The method.
    Reply Data
    int | bytes
    Repeated bytes times:
    byte | bytecode | A Java bytecode.

    Field Command Set (8)

    ObjectReference Command Set (9)

    ReferenceType Command (1)
    Returns the runtime type of the object. The runtime type will be a class or an array.
    Out Data
    objectID object The object ID
    Reply Data
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | The runtime reference type.
    GetValues Command (2)
    Returns the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
    Out Data
    objectID | object | The object ID
    int | fields | The number of values to get
    Repeated fields times:
    fieldID | fieldID | Field to get.
    Reply Data
    int | values | The number of values returned
    Repeated values times:
    value | value | The field value
    SetValues Command (3)
    Sets the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. For primitive values, the value's type must match the field's type exactly. For object values, there must be a widening reference conversion from the value's type to the field's type and the field's type must be loaded.
    Out Data
    objectID | object | The object ID
    int | values | The number of fields to set.
    Repeated values times:
    fieldID | fieldID | Field to set.
    untagged-value | value | Value to put in the field.
    Reply Data
    (None)
    MonitorInfo Command (5)
    Returns monitor information for an object. All threads int the VM must be suspended.
    Out Data
    objectID object The object ID
    Reply Data
    threadID | owner | The monitor owner, or null if it is not currently owned.
    int | entryCount | The number of times the monitor has been entered.
    int | waiters | The number of threads that are waiting for the monitor 0 if there is no current owner
    Repeated waiters times:
    threadID | thread | A thread waiting for this monitor.
    InvokeMethod Command (6)
    Invokes a instance method. The method must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.

    The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.

    The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.

    For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must be a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.

    By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

    The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

    If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.

    Out Data
    objectID | object | The object ID
    threadID | thread | The thread in which to invoke.
    classID | clazz | The class type.
    methodID | method | The method to invoke.
    int | arguments | The number of arguments.
    Repeated arguments times:
    value | arg | The argument value.
    int | options | Invocation options
    Reply Data
    value | returnValue | The returned value, or null if an exception is thrown.
    tagged-objectID | exception | The thrown exception, if any.
    DisableCollection Command (7)
    Prevents garbage collection for the given object. By default all objects in back-end replies may be collected at any time the target VM is running. A call to this command guarantees that the object will not be collected. The EnableCollection command can be used to allow collection once again.

    Note that while the target VM is suspended, no garbage collection will occur because all threads are suspended. The typical examination of variables, fields, and arrays during the suspension is safe without explicitly disabling garbage collection.

    This method should be used sparingly, as it alters the pattern of garbage collection in the target VM and, consequently, may result in application behavior under the debugger that differs from its non-debugged behavior.

    Out Data
    objectID object The object ID
    Reply Data
    (None)
    EnableCollection Command (8)
    Permits garbage collection for this object. By default all objects returned by the JDWP may be collected at any time the target VM is running. A call to this command is necessary only if garbage collection was previously disabled with the DisableCollection command.
    Out Data
    objectID object The object ID
    Reply Data
    (None)
    IsCollected Command (9)
    Determines whether an object has been garbage collected in the target VM.
    Out Data
    objectID object The object ID
    Reply Data
    boolean isCollected true if the object has been collected; false otherwise

    StringReference Command Set (10)

    Value Command (1)
    Returns the characters contained in the string.
    Out Data
    objectID stringObject The String object ID.
    Reply Data
    string stringValue The value of the String.

    ThreadReference Command Set (11)

    Name Command (1)
    Returns the thread name.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    string threadName The thread name.
    Suspend Command (2)
    Suspends the thread.

    Unlike java.lang.Thread.suspend(), suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed the same number of times it has been suspended.

    Suspending single threads with command has the same dangers java.lang.Thread.suspend(). If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again).

    The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through {@link java.lang.Thread#resume}.

    Note that this doesn't change the status of the thread (see the ThreadStatus command.) For example, if it was Running, it will still appear running to other threads.

    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    (None)
    Resume Command (3)
    Resumes the execution of a given thread. If this thread was not previously suspended by the front-end, calling this command has no effect. Otherwise, the count of pending suspends on this thread is decremented. If it is decremented to 0, the thread will continue to execute.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    (None)
    Status Command (4)
    Returns the current status of a thread. The thread status reply indicates the thread status the last time it was running. the suspend status provides information on the thread's suspension, if any.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    int | threadStatus | One of the thread status codes See JDWP.ThreadStatus
    int | suspendStatus | One of the suspend status codes See JDWP.SuspendStatus
    ThreadGroup Command (5)
    Returns the thread group that contains a given thread.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    threadGroupID group The thread group of this thread.
    Frames Command (6)
    Returns the current call stack of a suspended thread. The sequence of frames starts with the currently executing frame, followed by its caller, and so on. The thread must be suspended, and the returned frameID is valid only while the thread is suspended.
    Out Data
    threadID | threadObject | The thread object ID.
    int | startFrame | The index of the first frame to retrieve.
    int | length | The count of frames to retrieve (-1 means all remaining).
    Reply Data
    int | frames | The number of frames retreived
    Repeated frames times:
    frameID | frameID | The ID of this frame.
    location | location | The current location of this frame
    FrameCount Command (7)
    Returns the count of frames on this thread's stack. The thread must be suspended, and the returned count is valid only while the thread is suspended. Returns JDWP.Error.errorThreadNotSuspended if not suspended.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    int frameCount The count of frames on this thread's stack.
    OwnedMonitors Command (8)
    Returns the objects whose monitors have been entered by this thread. The thread must be suspended, and the returned information is relevant only while the thread is suspended.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    int | owned | The number of owned monitors
    Repeated owned times:
    tagged-objectID | monitor | An owned monitor
    CurrentContendedMonitor Command (9)
    Returns the object, if any, for which this thread is waiting for monitor entry or with java.lang.Object.wait. The thread must be suspended, and the returned information is relevant only while the thread is suspended.
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    tagged-objectID monitor The contended monitor, or null if there is no current contended monitor.
    Stop Command (10)
    Stops the thread with an asynchronous exception, as if done by java.lang.Thread.stop
    Out Data
    threadID | threadObject | The thread object ID.
    objectID | throwable | Asynchronous exception. This object must be an instance of java.lang.Throwable or a subclass
    Reply Data
    (None)
    Interrupt Command (11)
    Interrupt the thread, as if done by java.lang.Thread.interrupt
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    (None)
    SuspendCount Command (12)
    Get the suspend count for this thread. The suspend count is the number of times the thread has been suspended through the thread-level or VM-level suspend commands without a corresponding resume
    Out Data
    threadID threadObject The thread object ID.
    Reply Data
    int suspendCount The number of outstanding suspends of this thread.

    ThreadGroupReference Command Set (12)

    Name Command (1)
    Returns the thread group name.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    string groupName The thread group's name.
    Parent Command (2)
    Returns the thread group, if any, which contains a given thread group.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    threadGroupID parentGroup The parent thread group object, or null if the given thread group is a top-level thread group
    Children Command (3)
    Returns the threads and thread groups directly contained in this thread group. Threads and thread groups in child thread groups are not included.
    Out Data
    threadGroupID group The thread group object ID.
    Reply Data
    int | childThreads | The number of child threads.
    Repeated childThreads times:
    threadID | childThread | A direct child thread ID.
    int | childGroups | The number of child thread groups.
    Repeated childGroups times:
    threadGroupID | childGroup | A direct child thread group ID.

    ArrayReference Command Set (13)

    Length Command (1)
    Returns the number of components in a given array.
    Out Data
    arrayID arrayObject The array object ID.
    Reply Data
    int arrayLength The length of the array.
    GetValues Command (2)
    Returns a range of array components. The specified range must be within the bounds of the array.
    Out Data
    arrayID | arrayObject | The array object ID.
    int | firstIndex | The first index to retrieve.
    int | length | The number of components to retrieve.
    Reply Data
    arrayregion values The retrieved values. If the values are objects, they are tagged-values; otherwise, they are untagged-values
    SetValues Command (3)
    Sets a range of array components. The specified range must be within the bounds of the array. For primitive values, each value's type must match the array component type exactly. For object values, there must be a widening reference conversion from the value's type to the array component type and the array component type must be loaded.
    Out Data
    arrayID | arrayObject | The array object ID.
    int | firstIndex | The first index to set.
    int | values | The number of values to set.
    Repeated values times:
    untagged-value | value | A value to set.
    Reply Data
    (None)

    ClassLoaderReference Command Set (14)

    VisibleClasses Command (1)
    Returns a list of all classes which this class loader has been requested to load. This class loader is considered to be an initiating class loader for each class in the returned list. The list contains each reference type defined by this loader and any types for which loading was delegated by this class loader to another class loader.

    The visible class list has useful properties with respect to the type namespace. A particular type name will occur at most once in the list. Each field or variable declared with that type name in a class defined by this class loader must be resolved to that single type.

    No ordering of the returned list is guaranteed.

    Out Data
    classLoaderID classLoaderObject The class loader object ID.
    Reply Data
    int | classes | The number of visible classes.
    Repeated classes times:
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | A class visible to this class loader.

    EventRequest Command Set (15)

    Set Command (1)
    Set an event request. When the event described by this request occurs, an event is sent from the target VM.
    Out Data
    byte | eventKind | Event kind to request. See JDWP.EventKind for a complete list of events that can be requested.
    byte | suspendPolicy | What threads are suspended when this event occurs? Note that the order of events and command replies accurately reflects the order in which threads are suspended and resumed. For example, if a VM-wide resume is processed before an event occurs which suspends the VM, the reply to the resume command will be written to the transport before the suspending event.
    intmodifiersConstraints used to control the number of generated events. Modifiers specify additional tests that an event must satisfy before it is placed in the event queue. Events are filtered by applying each modifier to an event in the order they are specified in this collection Only events that satisfy all modifiers are reported.

    Filtering can improve debugger performance dramatically by reducing the amount of event traffic sent from the target VM to the debugger VM.

    Repeated modifiers times:
    byte | modKind | Modifier kind
    Case Count - if modKind is 1: Limit the requested event to be reported at most once after a given number of occurrences. The event is not reported the first count - 1 times this filter is reached. To request a one-off event, call this method with a count of 1.

    Once the count reaches 0, any subsequent filters in this request are applied. If none of those filters cause the event to be suppressed, the event is reported. Otherwise, the event is not reported. In either case subsequent events are never reported for this request. This modifier can be used with any event kind.

    int | count | Count before event. One for one-off.
    Case Conditional - if modKind is 2: Conditional on expression
    int | exprID | For the future
    Case ThreadOnly - if modKind is 3: Restricts reported events to those in the given thread. This modifier can be used with any event kind except for class unload.
    threadID | thread | Required thread
    Case ClassOnly - if modKind is 4: For class prepare events, restricts the events generated by this request to be the preparation of the given reference type and any subtypes. For other events, restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type. This modifier can be used with any event kind except class unload, thread start, and thread end.
    referenceTypeID | clazz | Required class
    Case ClassMatch - if modKind is 5: Restricts reported events to those for classes whose name matches the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
    string | classPattern | Required class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
    Case ClassExclude - if modKind is 6: Restricts reported events to those for classes whose name does not match the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
    string | classPattern | Disallowed class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
    Case LocationOnly - if modKind is 7: Restricts reported events to those that occur at the given location. This modifier can be used with breakpoint, field access, field modification, step, and exception event kinds.
    location | loc | Required location
    Case ExceptionOnly - if modKind is 8: Restricts reported exceptions by their class and whether they are caught or uncaught. This modifier can be used with exception event kinds only.
    referenceTypeID | exceptionOrNull | Exception to report. Null (0) means report exceptions of all types. A non-null type restricts the reported exception events to exceptions of the given type or any of its subtypes.
    boolean | caught | Report caught exceptions
    boolean | uncaught | Report uncaught exceptions. Note that it is not always possible to determine whether an exception is caught or uncaught at the time it is thrown. See the exception event catch location under composite events for more information.
    Case FieldOnly - if modKind is 9: Restricts reported events to those that occur for a given field. This modifier can be used with field access and field modification event kinds only.
    referenceTypeID | declaring | Type in which field is declared.
    fieldID | fieldID | Required field
    Case Step - if modKind is 10: Restricts reported step events to those which satisfy depth and size constraints. This modifier can be used with step event kinds only.
    threadID | thread | Thread in which to step
    int | size | size of each step. See JDWP.StepSize
    int | depth | relative call stack limit. See JDWP.StepDepth
    Reply Data
    int requestID ID of created request
    Clear Command (2)
    Clear an event request.
    Out Data
    byte | event | Event type to clear
    int | requestID | ID of request to clear
    Reply Data
    (None)
    ClearAllBreakpoints Command (3)
    Removes all set breakpoints.
    Out Data
    (None)
    Reply Data
    (None)

    StackFrame Command Set (16)

    GetValues Command (1)
    Returns the value of one or more local variables in a given frame. Each variable must be visible at the frame's code index. Even if local variable information is not available, values can be retrieved if the front-end is able to determine the correct local variable index. (Typically, this index can be determined for method arguments from the method signature without access to the local variable table information.)
    Out Data
    threadID | threadObject | The frame's thread.
    frameID | frame | The frame ID.
    int | slots | The number of values to get.
    Repeated slots times:
    int | slot | The local variable's index in the frame.
    byte | sigbyte | A tag identifying the type of the variable
    Reply Data
    int | values | The number of values retrieved.
    Repeated values times:
    value | slotValue | The value of the local variable.
    SetValues Command (2)
    Sets the value of one or more local variables. Each variable must be visible at the current frame code index. For primitive values, the value's type must match the variable's type exactly. For object values, there must be a widening reference conversion from the value's type to the variable's type and the variable's type must be loaded.

    Even if local variable information is not available, values can be set, if the front-end is able to determine the correct local variable index. (Typically, this index can be determined for method arguments from the method signature without access to the local variable table information.)

    Out Data
    threadID | threadObject | The frame's thread.
    frameID | frame | The frame ID.
    int | slotValues | The number of values to set.
    Repeated slotValues times:
    int | slot | The slot ID.
    value | slotValue | The value to set.
    Reply Data
    (None)
    ThisObject Command (3)
    Returns the value of the 'this' reference for this frame. If the frame's method is static or native, the reply will contain the null object reference.
    Out Data
    threadID | threadObject | The frame's thread.
    frameID | frame | The frame ID.
    Reply Data
    tagged-objectID objectThis The 'this' object for this frame.

    ClassObjectReference Command Set (17)

    ReflectedType Command (1)
    Returns the reference type reflected by this class object.
    Out Data
    classObjectID classObject The class object.
    Reply Data
    byte | refTypeTag | Kind of following reference type.
    referenceTypeID | typeID | reflected reference type

    Event Command Set (64)

    Composite Command (100)
    Several events may occur at a given time in the target VM. For example, there may be more than one breakpoint request for a given location or you might single step to the same location as a breakpoint request. These events are delivered together as a composite event. For uniformity, a composite event is always used to deliver events, even if there is only one event to report.

    The events that are grouped in a composite event are restricted in the following ways:

    • Always singleton composite events:
      • VM Start Event
      • VM Death Event
    • Only with other thread start events for the same thread:
      • Thread Start Event
    • Only with other thread death events for the same thread:
      • Thread Death Event
    • Only with other class prepare events for the same class:
      • Class Prepare Event}
    • Only with other class unload events for the same class:
      • Class Unload Event
    • Only with other access watchpoint events for the same field access:
      • Access Watchpoint Event
    • Only with other modification watchpoint events for the same field modification:
      • Modification Watchpoint Event
    • Only with other ExceptionEvents for the same exception occurrance:
      • ExceptionEvent
    • Only with other members of this group, at the same location and in the same thread:
      • Breakpoint Event
      • Step Event
      • Method Entry Event
      • Method Exit Event
    Event Data
    byte | suspendPolicy | Which threads where suspended by this composite event?
    int | events | Events in set.
    Repeated events times:
    byte | eventKind | Event kind selector
    Case VMStart - if eventKind is JDWP.EventKind.VM_START: Notification of initialization of a target VM. This event is received before the main thread is started and before any application code has been executed. Before this event occurs a significant amount of system code has executed and a number of system classes have been loaded. This event is always generated by the target VM, even if not explicitly requested.
    int | requestID | Request that generated event (or 0 if this event is automatically generated.
    threadID | thread | Initial thread
    Case SingleStep - if eventKind is JDWP.EventKind.SINGLE_STEP: Notification of step completion in the target VM. The step event is generated before the code at its location is executed.
    int | requestID | Request that generated event
    threadID | thread | Stepped thread
    location | location | Location stepped to
    Case Breakpoint - if eventKind is JDWP.EventKind.BREAKPOINT: Notification of a breakpoint in the target VM. The breakpoint event is generated before the code at its location is executed.
    int | requestID | Request that generated event
    threadID | thread | thread which hit breakpoint
    location | location | Location hit
    Case MethodEntry - if eventKind is JDWP.EventKind.METHOD_ENTRY: Notification of a method invocation in the target VM. This event is generated before any code in the invoked method has executed. Method entry events are generated for both native and non-native methods.

    In some VMs method entry events can occur for a particular thread before its thread start event occurs if methods are called as part of the thread's initialization.

    int | requestID | Request that generated event
    threadID | thread | thread which entered method
    location | location | Location of entry
    Case MethodExit - if eventKind is JDWP.EventKind.METHOD_EXIT: Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.
    int | requestID | Request that generated event
    threadID | thread | thread which exited method
    location | location | Location of exit
    Case Exception - if eventKind is JDWP.EventKind.EXCEPTION: Notification of an exception in the target VM. If the exception is thrown from a non-native method, the exception event is generated at the location where the exception is thrown. If the exception is thrown from a native method, the exception event is generated at the first non-native location reached after the exception is thrown.
    int | requestID | Request that generated event
    threadID | thread | Thread with exception
    location | location | Location of exception throw (or first non-native location after throw if thrown from a native method)
    tagged-objectID | exception | Thrown exception
    locationcatchLocationLocation of catch, or 0 if not caught. An exception is considered to be caught if, at the point of the throw, the current location is dynamically enclosed in a try statement that handles the exception. (See the JVM specification for details). If there is such a try statement, the catch location is the first location in the appropriate catch clause.

    If there are native methods in the call stack at the time of the exception, there are important restrictions to note about the returned catch location. In such cases, it is not possible to predict whether an exception will be handled by some native method on the call stack. Thus, it is possible that exceptions considered uncaught here will, in fact, be handled by a native method and not cause termination of the target VM. Furthermore, it cannot be assumed that the catch location returned here will ever be reached by the throwing thread. If there is a native frame between the current location and the catch location, the exception might be handled and cleared in that native method instead.

    Note that compilers can generate try-catch blocks in some cases where they are not explicit in the source code; for example, the code generated for synchronized and finally blocks can contain implicit try-catch blocks. If such an implicitly generated try-catch is present on the call stack at the time of the throw, the exception will be considered caught even though it appears to be uncaught from examination of the source code.

    Case ThreadStart - if eventKind is JDWP.EventKind.THREAD_START: Notification of a new running thread in the target VM. The new thread can be the result of a call to java.lang.Thread.start or the result of attaching a new thread to the VM though JNI. The notification is generated by the new thread some time before its execution starts. Because of this timing, it is possible to receive other events for the thread before this event is received. (Notably, Method Entry Events and Method Exit Events might occur during thread initialization. It is also possible for the VirtualMachine AllThreads command to return a thread before its thread start event is received.

    Note that this event gives no information about the creation of the thread object which may have happened much earlier, depending on the VM being debugged.

    int | requestID | Request that generated event
    threadID | thread | Started thread
    Case ThreadDeath - if eventKind is JDWP.EventKind.THREAD_DEATH: Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for {@link VirtualMachine#allThreads} to return this thread after this event is received.

    Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.

    int | requestID | Request that generated event
    threadID | thread | Ending thread
    Case ClassPrepare - if eventKind is JDWP.EventKind.CLASS_PREPARE: Notification of a class prepare in the target VM. See the JVM specification for a definition of class preparation. Class prepare events are not generated for primtiive classes (for example, java.lang.Integer.TYPE).
    int | requestID | Request that generated event
    threadIDthreadPreparing thread. In rare cases, this event may occur in a debugger system thread within the target VM. Debugger threads take precautions to prevent these events, but they cannot be avoided under some conditions, especially for some subclasses of java.lang.Error. If the event was generated by a debugger system thread, the value returned by this method is null, and if the requested suspend policy for the event was EVENT_THREAD all threads will be suspended instead, and the composite event's suspend policy will reflect this change.

    Note that the discussion above does not apply to system threads created by the target VM during its normal (non-debug) operation.

    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type being prepared
    string | signature | Type signature
    int | status | Status of type. See JDWP.ClassStatus
    Case ClassUnload - if eventKind is JDWP.EventKind.CLASS_UNLOAD: Notification of a class unload in the target VM.

    There are severe constraints on the debugger back-end during garbage collection, so unload information is greatly limited.

    int | requestID | Request that generated event
    string | signature | Type signature
    Case FieldAccess - if eventKind is JDWP.EventKind.FIELD_ACCESS: Notification of a field access in the target VM. Field modifications are not considered field accesses.
    int | requestID | Request that generated event
    threadID | thread | Accessing thread
    location | location | Location of access
    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type of field
    fieldID | fieldID | Field being accessed
    tagged-objectID | object | Object being accessed (null=0 for statics
    Case FieldModification - if eventKind is JDWP.EventKind.FIELD_MODIFICATION: Notification of a field modification in the target VM.
    int | requestID | Request that generated event
    threadID | thread | Modifying thread
    location | location | Location of modify
    byte | refTypeTag | Kind of reference type. See JDWP.TypeTag
    referenceTypeID | typeID | Type of field
    fieldID | fieldID | Field being modified
    tagged-objectID | object | Object being modified (null=0 for statics
    value | valueToBe | Value to be assigned
    Case VMDeath - if eventKind is JDWP.EventKind.VM_DEATH:
    int | requestID | Request that generated event (always 0)

    Error Constants

    INVALID_TAG | 500 | object type id or class tag
    ALREADY_INVOKING | 502 | previous invoke not complete
    INVALID_INDEX | 503
    INVALID_LENGTH | 504
    INVALID_STRING | 506
    INVALID_CLASS_LOADER | 507
    INVALID_ARRAY | 508
    TRANSPORT_LOAD | 509
    TRANSPORT_INIT | 510
    NATIVE_METHOD | 511
    INVALID_COUNT | 512
    NONE | 0
    INVALID_THREAD | 10
    INVALID_THREAD_GROUP | 11
    INVALID_PRIORITY | 12
    THREAD_NOT_SUSPENDED | 13
    THREAD_SUSPENDED | 14
    INVALID_OBJECT | 20
    INVALID_CLASS | 21
    CLASS_NOT_PREPARED | 22
    INVALID_METHODID | 23
    INVALID_LOCATION | 24
    INVALID_FIELDID | 25
    INVALID_FRAMEID | 30
    NO_MORE_FRAMES | 31
    OPAQUE_FRAME | 32
    NOT_CURRENT_FRAME | 33
    TYPE_MISMATCH | 34
    INVALID_SLOT | 35
    DUPLICATE | 40
    NOT_FOUND | 41
    INVALID_MONITOR | 50
    NOT_MONITOR_OWNER | 51
    INTERRUPT | 52
    INVALID_CLASS_FORMAT | 60
    CIRCULAR_CLASS_DEFINITION | 61
    FAILS_VERIFICATION | 62
    ADD_METHOD_NOT_IMPLEMENTED | 63
    SCHEMA_CHANGE_NOT_IMPLEMENTED | 64
    INVALID_TYPESTATE | 65
    NOT_IMPLEMENTED | 99
    NULL_POINTER | 100
    ABSENT_INFORMATION | 101
    INVALID_EVENT_TYPE | 102
    ILLEGAL_ARGUMENT | 103
    OUT_OF_MEMORY | 110
    ACCESS_DENIED | 111
    VM_DEAD | 112
    INTERNAL | 113
    UNATTACHED_THREAD | 115

    EventKind Constants

    VM_DISCONNECTED | 100 | Never sent by across JDWP
    VM_START | JDWP.EventKind.VM_INIT
    THREAD_DEATH | JDWP.EventKind.THREAD_END
    SINGLE_STEP | 1
    BREAKPOINT | 2
    FRAME_POP | 3
    EXCEPTION | 4
    USER_DEFINED | 5
    THREAD_START | 6
    THREAD_END | 7
    CLASS_PREPARE | 8
    CLASS_UNLOAD | 9
    CLASS_LOAD | 10
    FIELD_ACCESS | 20
    FIELD_MODIFICATION | 21
    EXCEPTION_CATCH | 30
    METHOD_ENTRY | 40
    METHOD_EXIT | 41
    VM_INIT | 90
    VM_DEATH | 99

    ThreadStatus Constants

    ZOMBIE | 0
    RUNNING | 1
    SLEEPING | 2
    MONITOR | 3
    WAIT | 4

    SuspendStatus Constants

    SUSPEND_STATUS_SUSPENDED 0x1

    ClassStatus Constants

    VERIFIED | 1
    PREPARED | 2
    INITIALIZED | 4
    ERROR | 8

    TypeTag Constants

    CLASS | 1 | ReferenceType is a class.
    INTERFACE | 2 | ReferenceType is an interface.
    ARRAY | 3 | ReferenceType is an array.

    Tag Constants

    ARRAY | 91 | '[' - an array object (objectID size).
    BYTE | 66 | 'B' - a byte value (1 byte).
    CHAR | 67 | 'C' - a character value (2 bytes).
    OBJECT | 76 | 'L' - an object (objectID size).
    FLOAT | 70 | 'F' - a float value (4 bytes).
    DOUBLE | 68 | 'D' - a double value (8 bytes).
    INT | 73 | 'I' - an int value (4 bytes).
    LONG | 74 | 'J' - a long value (8 bytes).
    SHORT | 83 | 'S' - a short value (2 bytes).
    VOID | 86 | 'V' - a void value (no bytes).
    BOOLEAN | 90 | 'Z' - a boolean value (1 byte).
    STRING | 115 | 's' - a String object (objectID size).
    THREAD | 116 | 't' - a Thread object (objectID size).
    THREAD_GROUP | 103 | 'g' - a ThreadGroup object (objectID size).
    CLASS_LOADER | 108 | 'l' - a ClassLoader object (objectID size).
    CLASS_OBJECT | 99 | 'c' - a class object object (objectID size).

    StepDepth Constants

    INTO | 0 | Step into any method calls that occur before the end of the step.
    OVER | 1 | Step over any method calls that occur before the end of the step.
    OUT | 2 | Step out of the current method.

    StepSize Constants

    MIN | 0 | Step by the minimum possible amount (often a bytecode instruction).
    LINE | 1 | Step to the next source line.

    SuspendPolicy Constants

    NONE | 0 | Suspend no threads when this event is encountered.
    EVENT_THREAD | 1 | Suspend the event thread when this event is encountered.
    ALL | 2 | Suspend all threads when this event is encountered.

    InvokeOptions Constants

    INVOKE_SINGLE_THREADED | 0x01 | otherwise, all threads started.
    INVOKE_NONVIRTUAL | 0x02 | otherwise, normal virtual invoke (instance methods only)

    Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.

    Please send comments to: java-debugger@java.sun.com

            Sun


Java(tm) Platform Debugger Architecture

Java

JavaTM Platform Debugger Architecture

 Home Page

Architecture Overview

The JavaTM Platform Debugger Architecture is structured as follows:
             Components                         Debugger Interfaces

                /    |--------------|
               /     |     VM       |
 debuggee ----(      |--------------|  <------- JVMDI - Java VM Debug Interface
               \     |   back-end   |
                \    |--------------|
                /           |
 comm channel -(            |  <--------------- JDWP - Java Debug Wire Protocol
                \           |
                     |--------------|
                     | front-end    |
                     |--------------|  <------- JDI - Java Debug Interface
                     |      UI      |
                     |--------------|

What is the Java Platform Debugger Architecture (JPDA)?

JPDA is a multi-tiered debugging architecture that allows tools developers to easily create debugger applications which run portably across platforms, virtual machine (VM) implementations and SDK versions.

JPDA consists of three layers:

JVMDI - Java VM Debug Interface
Defines the debugging services a VM provides.
JDWP - Java Debug Wire Protocol
Defines the communication between debuggee and debugger processes.
JDI - Java Debug Interface
Defines a high-level Java language interface which tool developers can easily use to write remote debugger applications.

Reference implementation

In addition to the specification of these interfaces, Sun Microsystems also provides a reference implementation, which consists of:
  • JVMDI implementations on multiple Sun VMs (see VM documentation).
  • A back-end which uses JVMDI to implement the debuggee side of JDWP.
  • A front-end which uses the debugger side of JDWP to implement JDI.
  • Two simple example debugger applications which are built on JDI.
This provides a layered implementation in which any layer may be substituted.

Using JPDA

A debugger developer may hook into JPDA at any layer. Since the JDI is the highest level and easiest to use we encourage developers to use this interface. Suppose a company develops a debugger using JDI. They can use it with the reference implementation and it will automatically work with the VMs and platforms Sun supports. It can also work, for example, with the reference implementation front-end and a debuggee running another company's VM that implements JDWP (which might use or by-pass JVMDI).

Some debuggers are built on top of lower layers, JDWP (for example if the front-end is not written in the Java language) or JVMDI (for specialized debuggers which need low-level functionality).

Components

debuggee

    The debuggee is the process being debugged, it consists of the application being debugged (not shown), the VM running the application and the back-end of the debugger.

Java Virtual Machine (VM)

    This refers to the VM running the application being debugged.

    The debugger architecture is being designed for use in wide spectrum of VM implementations.

    The VM implements the Java Virtual Machine Debug Interface (JVMDI).

back-end

    The back-end of the debugger is responsible for communicating requests from the debugger front-end to the debuggee VM and for communicating the response to these requests (including desired events) to the front-end. The back-end communicates with the front-end over a communications channel using the Java Debug Wire Protocol (JDWP). The back-end communicates with the debuggee VM using the Java Virtual Machine Debug Interface (JVMDI).

    It is clear from experience that debugger support code, running on the debuggee and written in Java, contends with the debuggee in ways that cause hangs and other undesired behavior. Thus, the back-end is native code. This, in turn, implies that the JVMDI be a pure native interface.

communications channel

    The communications channel is the link between the front and back ends of the debugger. The transport mechanism used is unspecified; possible mechanisms include: sockets, serial lines, and shared memory. However, the format and semantics of the serialized bit-stream flowing over the channel is specified by the Java Debug Wire Protocol (JDWP).

front-end

    The debugger front-end implements the high-level Java Debug Interface (JDI). The front-end uses the information from the low-level Java Debug Wire Protocol (JDWP).

User Interface (UI)

    The user interface to the debugger is not specified; the intent is that tool vendors will provide value added implementations. We provide an example simple graphical user interface (GUI) which serves as test harness and as a starting point for the development of more complex GUIs. A version of JDB is also available as an example.

    The example UIs are clients of the Java Debug Interface (JDI).

Debugger Interfaces

Java Virtual Machine Debugger Interface (JVMDI)
    A native interface implemented by the VM.

    Defines the services a VM must provide for debugging. Includes requests for information (for example, current stack frame), actions (for example, set a breakpoint), and notification (for example, when a breakpoint has been hit). A debugger may make use of VM information other than this (for example, Java Native Interface (JNI)), but this is the source of all debugger specific information.

    Specifying the VM Interface allows any VM implementor to plug easily into the debugging architecture. It also allows alternate communication channel implementations. VM implementations which do not adhere to this interface can still provide access via the Java Debug Wire Protocol (JDWP).

    See also:

      JVMDI Specification

Java Debug Wire Protocol (JDWP)
    Defines the format of information and requests transferred between the debuggee process and the debugger front-end. It does not define the transport mechanism (socket, serial line, shared memory, ...).

    The specification of the protocol allows the debuggee and debugger front-end to run under separate VM implementations and/or on separate platforms. It also allows the front-end to be written in a language other than Java, or the debuggee to be non-native (e.g. Java).

    Information and requests are roughly at the level of the Java Virtual Machine Debug Interface (JVMDI), but will include additional information and requests necessitated by bandwidth issues, examples include information filtering and batching.

    See also:

      JDWP Specification

Java Debug Interface (JDI)
    A 100% Java interface implemented by the front-end.

    Defines information and requests at a user code level.

    While debugger implementors could directly use the Java Debug Wire Protocol (JDWP) or Java Virtual Machine Debug Interface (JVMDI), this interface greatly facilitates the integration of debugging capabilities into development environments. We recommend the JDI layer for all debugger development.

    See also:

      JDI Specification

Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


Java(tm) Virtual Machine Debug Interface Reference

Java

JavaTM Virtual Machine Debug Interface Reference

Contents

Introduction
Using JVMDI Functions
Errors
Handling Events
Starting a VM with a JVMDI Client

Introduction

 The JavaTM Virtual Machine Debug Interface (JVMDI) is a programming interface used by debuggers and other programming tools. It provides a way both to inspect the state and to control the execution of applications running in the JavaTM Virtual Machine.

JVMDI is a two-way interface. The JVMDI client can be notified of interesting occurrences through events. The JVMDI can query and control the application through many different functions, either in response to events or independent of them.

JVMDI clients run in the same virtual machine as the application being debugged and access JVMDI through a native interface. The native, in-process interface allows maximal control with minimal intrusion on the part of a debugging tool. Typically, JVMDI clients are relatively compact. They can be controlled by a separate process which implements the bulk of a debugger's function without interfering with the target application's normal execution.

JVMDI is one layer within the Java Platform Debugger Architecture. This architecture also contains higher-level, out-of-process debugger interfaces. The higher-level interfaces are more appropriate than JVMDI for many debugger tools. See the JPDA Homepage for more information on Java Platform Debugger Architecture.

Using JVMDI Functions

For function and constant definitions, add

        #include <jvmdi.h>
to your source code.

Like Java Native Interface (JNI) functions, JVMDI functions are accessed through a function table. The JVMDI function table can be obtained through the JNI GetEnv function. For example, the following code obtains the function table for version 1 of the JVMDI.

        JVMDI_Interface_1 *jvmdi;
        ...
        (*jvm)->GetEnv(jvm, &jvmdi, JVMDI_VERSION_1);

JVMDI functions always return a jvmdiError value indicating return status. Some functions can return additional values through pointers provided by the calling function. In some cases, JVMDI functions allocate memory that your program must explicitly deallocate. This is indicated in the individual JVMDI function descriptions. Empty lists, arrays, sequences, etc are returned as allocated zero length arrays (not as NULL).

JVMDI functions identify objects with JNI references. References passed to JVMDI functions can be either global or local, but they must be strong references. All references returned by JVMDI functions are strong, global references.

In the event that the JVMDI function encounters an error (any return value other than JVMDI_ERROR_NONE) the values of memory referenced by argument pointers is undefined, but no memory will have been allocated and no global references will have been allocated.

JVMDI extends the data types defined by JNI with the following: jthread and jthreadGroup are subtypes of jobject, representing the corresponding objects; jframeID is a pointer type representing a single stack frame of a suspended or current thread (it is invalid upon the resumption of the thread); jlocation is a 64 bit unsigned value, representing a monotonically increasing executable position within a method; jvmdiError is a jint, discussed above.

JVMDI functions fall into these categories:

  • Memory Management
    • Set Allocation Hooks
    • Allocate Memory
    • Deallocate Memory
  • Thread Execution Functions
    • Get Thread Status
    • Get All Threads
    • Suspend Thread
    • Resume Thread
    • Stop Thread
    • Interrupt Thread
    • Get Thread Info
    • Get Owned Monitor Info
    • Get Current Contended Monitor
    • Run Debug Thread
  • Thread Groups
    • Get Top Thread Groups
    • Get Thread Group Info
    • Get Thread Group Children
  • Stack Frame Access
    • Get Thread's Frame Count
    • Get Thread's Current Frame
    • Get Caller Frame
    • Frame Location
    • Notify Frame Pop
  • Local Variable Access
    • Get Local Variable
    • Set Local Variable
  • Breakpoints
    • Set a Breakpoint
    • Clear a Breakpoint
    • Clear All Breakpoints
  • Watched Fields
    • Set a Field Access Watch
    • Clear a Field Access Watch
    • Set a Field Modification Watch
    • Clear a Field Modification Watch
  • Class Information
    • Class Signature
    • Class Status
    • Source File Name
    • Class Modifier Flags
    • Class Methods
    • Class Fields
    • Implemented Interfaces
    • Is an Interface
    • Is an Array
    • Class Loader
  • Object Information
    • Object Hash Code
    • Get Monitor Info
  • Field Information
    • Field Name and Signature
    • Field Declaring Class
    • Field Modifier Flags
    • Is Field Synthetic
  • Method Information
    • Method Name and Signature
    • Method Declaring Class
    • Method Modifier Flags
    • Maximum Stack
    • Local Slots
    • Argument Slots
    • Source Line Numbers
    • Method Location
    • Local Variables
    • Exception Handlers
    • Thrown Exceptions
    • Get Bytecodes
    • Is Method Native
    • Is Method Synthetic
  • Raw Monitor Support
    • Create Raw Monitor
    • Destroy Raw Monitor
    • Raw Monitor Enter
    • Raw Monitor Exit
    • Raw Monitor Wait
    • Raw Monitor Notify
    • Raw Monitor Notify All
  • Events
    • Set Event Hook
    • Enable/Disable Events
  • Miscellaneous Functions
    • Get Loaded Classes
    • Get Classloader Classes
    • Get Version Number
    • Get Capabilities

Memory Management

Many JVMDI functions require memory allocation. By default, memory comes from platform-specific allocation functions, such as a malloc(). A system built on JVMDI can provide its own memory allocation scheme. This might be useful, for example, to allocate memory in advance, so a debugger can continue to function in low-memory situations. Also, replacing the default memory allocation functions with debugger-specific functions can reduce the potential for deadlock on systems where malloc cannot be entered by a debugger thread while an application thread is suspended while executing inside a memory management function.

Set Allocation Hooks

jvmdiError
SetAllocationHooks(JVMDI_AllocHook ahook, JVMDI_DeallocHook dhook)

Set the functions which will perform allocation and deallocation. The hook functions are defined as follows.

typedef jvmdiError (*JVMDI_AllocHook)(jlong size, jbyte** memPtr)
typedef jvmdiError (*JVMDI_DeallocHook)(jbyte* buffer)

JVMDI will call ahook to allocate memory, dhook to deallocate memory. This overrides JVMDI's default memory allocator. To restore the default allocator, call SetAllocationHooks with ahook and dhook set to NULL.

The ahook function should look in size for the number of bytes to allocate and return them via memPtr. The function should return JVMDI_ERROR_NULL_POINTER if passed null pointers, JVMDI_ERROR_OUT_OF_MEMORY if it cannot honor a memory request, and JVMDI_ERROR_NONE otherwise.

The dhook function should look in buffer for the memory to be deallocated. The function should return JVMDI_ERROR_NULL_POINTER if passed null pointers, JVMDI_ERROR_NONE otherwise.

Parameters:

ahook
the function to use for memory allocation, or NULL to revert to the default allocator.
dhook
the function to use for memory deallocation, or NULL to revert to the default deallocator.

SetAllocationHooks always returns JVMDI_ERROR_NONE.

Allocate Memory

jvmdiError
Allocate(jlong size, jbyte** memPtr)

Allocate an area of memory through the JVMDI allocator. The allocated memory should be freed with Deallocate.

Parameters:

size
the number of bytes to allocate.
memPtr
on return, a pointer to the beginning of the memory allocated by the allocator specified in SetAllocationHooks.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Deallocate Memory

jvmdiError
Deallocate(jbyte* mem)
Deallocate mem using the JVMDI allocator. This function should be used to deallocate any memory allocated and returned by a JVMDI function or any memory allocated with Allocate.

Parameters:

mem
a pointer to the beginning of the allocated memory.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Thread Execution Functions

Get Thread Status

jvmdiError
GetThreadStatus(jthread thread, jint *threadStatusPtr, jint *suspendStatusPtr)

Get status information for a thread.

Parameters:

thread
the thread to query
threadStatusPtr
on return, points to the current status of the thread. The thread status is one of the following values.
JVMDI_THREAD_STATUS_UNKNOWN
Status unknown.

JVMDI_THREAD_STATUS_ZOMBIE
Thread has completed execution.

JVMDI_THREAD_STATUS_RUNNING
Thread is runnable.

JVMDI_THREAD_STATUS_SLEEPING
Thread sleeping. (Thread.sleep() has been called.)

JVMDI_THREAD_STATUS_MONITOR
Thread is waiting to enter a synchronization block.

JVMDI_THREAD_STATUS_WAIT
Thread waiting. (Object.wait() has been called.)
suspendStatusPtr
on return, points to information on suspension. The suspend status is a combination of one or more of the following bit flags.

JVMDI_SUSPEND_STATUS_SUSPENDED
Thread suspended. (java.lang.Thread.suspend() or or SuspendThread has been called.) If this bit is set, the status returned via statusPtr refers to the thread status before suspension.

JVMDI_SUSPEND_STATUS_BREAK
Thread has hit a breakpoint. This bit is only set if the thread is the current thread or the thread is suspended.
This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get All Threads

jvmdiError
GetAllThreads(jint *threadsCountPtr, jthread **threadsPtr)

Get all running threads known to the virtual machine. Native threads which are not attached to the VM are not included in the returned list.

Parameters:

threadsCountPtr
on return, points to the number of running threads.
threadsPtr
on return, points to an array of references, one for each running thread. Threads in the array are JNI global references and must be explicitly freed with the JNI function DeleteGlobalRef. The returned thread array should be freed with Deallocate.
This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Suspend Thread

jvmdiError
SuspendThread(jthread thread)

Suspend the specified thread. If the calling thread is specified, this function will not return until some other thread calls ResumeThread.

Parameters:

thread
the thread to suspend

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_THREAD_SUSPENDED
Thread already suspended.

Resume Thread

jvmdiError
ResumeThread(jthread thread)

Resume a suspended thread. Any thread suspended through SuspendThread will resume execution.

Parameters:

thread
the thread to resume

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
Thread was not suspended.

JVMDI_ERROR_INVALID_TYPESTATE
The state of the thread has been modified, and is now inconsistent.

Stop Thread

jvmdiError
StopThread(jthread thread, jobject exception)

Send the specified asynchronous exception to the specified thread (similar to java.lang.Thread.stop). Normally, this function is used to kill the specified thread with an instance of the exception ThreadDeath.

Parameters:

thread
the thread to stop
exception
the asynchronous exception object

The function returns one of the following error code:

JVMDI_ERROR_INVALID_THREAD

Interrupt Thread

jvmdiError
InterruptThread(jthread thread)

Interrupt the specified thread (similar to java.lang.Thread.interrupt).

Parameters:

thread
the thread to interrupt

The function returns one of the following error code:

JVMDI_ERROR_INVALID_THREAD

Get Thread Info

typedef struct {
    char *name;             /* Name in UTF-8 */
    jint priority;
    jboolean is_daemon;
    jthreadGroup thread_group;
    jobject context_class_loader;
} JVMDI_thread_info;

jvmdiError
GetThreadInfo(jthread thread, JVMDI_thread_info *infoPtr)

Get thread information. The fields of the JVMDI_thread_info structure are filled in with details of the specified thread.

Parameters:

thread
the thread to query
infoPtr
on return, filled with information describing the specified thread. Returned objects (thread group and context class loader) are global references and must be explictly freed with the JNI function DeleteGlobalRef. The returned thread name string should be freed with Deallocate

For JDK 1.1 implementations which don't recognize context class loaders, the context_class_loader field should be NULL.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Owned Monitor Info

typedef struct {
    jint owned_monitor_count;
    jobject *owned_monitors;
} JVMDI_owned_monitor_info;

jvmdiError
GetOwnedMonitorInfo(jthread thread, JVMDI_owned_monitor_info *infoPtr)

Get information about the monitors owned by the specified thread. The fields of the JVMDI_owned_monitor_info structure are filled in with details of the owned monitors. If this function is called for a thread different than the current thread, the specified thread must be suspended.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

thread
the thread to query
infoPtr
on return, filled with owned monitor information. Returned objects (array of owned monitors) are global references and must be explictly freed with the JNI function DeleteGlobalRef. The owned_monitors buffer containing the array should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
thread must be suspended before calling.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Get Current Contended Monitor

jvmdiError
GetCurrentContendedMonitor(jthread thread, jobject *monitorPtr)

Get the object, if any, whose monitor the specified thread is waiting to enter or waiting to regain through java.lang.Object.wait. If this function is called for a thread different than the current thread, the specified thread must be suspended.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

thread
the thread to query
monitorPtr
on return, filled with the current contended monitor, or NULL if there is none. The contended monitor object is a global reference and must be explictly freed with the JNI function DeleteGlobalRef.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
thread must be suspended before calling.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Run Debug Thread

typedef void (*JVMDI_StartFunction)(void *);
jvmdiError
RunDebugThread(jthread thread, JVMDI_StartFunction proc, void *arg, int priority);

Starts the execution of a debugger thread. with the specifed native function. The start function is given the single argument, arg, and the specified priority. This function allows the creation of debugger threads for handling communiction with another process or for handling events without the need to load a special subclass of java.lang.Thread or implementor of java.lang.Runnable. Instead, the created thread can completely native. However, the created thread does require a newly created instance of java.lang.Thread (referenced by the argument thread) to which it will be associated. The thread object can be created with JNI calls, but it is recommended that all such calls to Java code be done during debugger initialization to avoid any interaction with the application being debugged.

The new thread is started as a daemon thread.

Upon execution of proc, the new thread will be attached to the VM.

Parameters:

thread
the thread to run
proc
the start function
arg
the argument to the start function
priority
the priority of the started thread. Any thread priority allowed by java.lang.Thread.setPriority can be used including
  • JVMDI_THREAD_MIN_PRIORITY
  • JVMDI_THREAD_NORM_PRIORITY
  • JVMDI_THREAD_MAX_PRIORITY

This function returns one of the following error codes:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_INVALID_PRIORITY

Thread Groups

Get Top Thread Groups

jvmdiError
GetTopThreadGroups(jint *groupCountPtr, jthreadGroup **groupsPtr)

Return all top-level (parentless) thread groups in the VM.

Parameters:

groupCountPtr
on return, points to the number of top-level thread groups
groupsPtr
on return, refers to a pointer to the top-level thread group array. Returned group array contains global references which must be explictly freed with the JNI function DeleteGlobalRef. The group array array buffer should be freed with Deallocate

This function returns one of the following error codes:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Thread Group Info

typedef struct {
    jthreadGroup parent;
    char *name;             /* Name in UTF-8 */
    jint  max_priority;
    jboolean is_daemon;
} JVMDI_thread_group_info;

jvmdiError
GetThreadGroupInfo(jthreadGroup group, JVMDI_thread_group_info *infoPtr)

Get information about the thread group. The fields of the JVMDI_thread_group_info structure are filled in with details of the specified thread group.

Parameters:

group
the thread group to query
infoPtr
on return, filled with information describing the specified thread group. The returned thread group parent is a global references and must be explictly freed with the JNI function DeleteGlobalRef. The returned thread group name string should be freed with Deallocate

This function returns one of the following error codes:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_THREAD_GROUP

Get Thread Group Children

jvmdiError
GetThreadGroupChildren(jthreadGroup group,
                 jint *threadCountPtr, jthread **threadsPtr,
                 jint *groupCountPtr, jthreadGroup **groupsPtr)
Get the threads and thread groups created within the given thread group.

Parameters:

group
the group to query.
threadCountPtr
on return, points to the number of owned threads
threadsPtr
on return, refers to a pointer to the owned thread array. Returned thread array contains global references which must be explictly freed with the JNI function DeleteGlobalRef. The thread array buffer should be freed with Deallocate
groupCountPtr
on return, points to the number of child thread groups
groupsPtr
on return, refers to a pointer to the child thread group array. Returned group array contains global references which must be explictly freed with the JNI function DeleteGlobalRef. The group array array buffer should be freed with Deallocate

This function returns one of the following error codes:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_THREAD_GROUP

Stack Frame Access

Get Thread's Frame Count

jvmdiError
GetFrameCount(jthread thread, jint *countPtr)

Get the number of frames currently in the specified thread's call stack.

If this function is called for a thread different than the current thread, the specified thread must be suspended.

Parameters:

thread
The thread to query
countPtr
on return, points to the number of frames in the call stack.
This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
Thread was not suspended.

Get Thread's Current Frame

jvmdiError
GetCurrentFrame(jthread thread, jframeID *framePtr)

Get the jframeID value for the current stack frame of thread and return via framePtr.

If this function is called for a thread different than the current thread, the specified thread must be suspended. The returned frame ID value remains valid only until thread continues executing. The thread must be in a Java or JNI method.

Parameters:

thread
The thread to query
framePtr
on return, points to the frame ID for the current stack frame of this thread.
This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
Thread was not suspended.

JVMDI_ERROR_NO_MORE_FRAMES
There are no more Java or JNI frames on the call stack.

Get Caller Frame

jvmdiError
GetCallerFrame(jframeID called, jframeID *framePtr)
For frame, return the frame that called it via framePtr. Both called and the caller must be in a Java or JNI method.

Parameters:

called
the called frame.
framePtr
on return, points to the frame ID for the calling frame.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FRAMEID
Invalid jframeID.

JVMDI_ERROR_NO_MORE_FRAMES
The caller frame is not in a Java or JNI method.

Frame Location

jvmdiError
GetFrameLocation(jframeID frame, jclass *classPtr, jmethodID *methodPtr,
                       jlocation *locationPtr)

For a Java frame, return the location of the instruction currently executing.

Parameters:

frame
the frame to query.
classPtr
on return, points to the class for the current location. The returned class is a JNI global reference must be explicitly freed with the JNI function DeleteGlobalRef.
methodPtr
on return, points to the method for the current location.
locationPtr
on return, points to the index of the currently executing instruction.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_OPAQUE_FRAME
frame is not a Java frame.

JVMDI_ERROR_INVALID_FRAMEID
frame is not a valid frame ID.

Notify Frame Pop

jvmdiError
NotifyFramePop(jframeID frame);
When frame is popped from the stack, generate a JVMDI_EVENT_FRAME_POP event. See Events.

Parameters:

frame
the frame for which the frame pop event will be generated.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_OPAQUE_FRAME
frame is not a Java frame.

JVMDI_ERROR_INVALID_FRAMEID
frame is not a valid frame ID.

Local Variable Access

Get Local Variable

jvmdiError
GetLocalObject(jframeID frame, jint slot, jobject *valuePtr)
jvmdiError
GetLocalInt(jframeID frame, jint slot, jint *valuePtr)
jvmdiError
GetLocalLong(jframeID frame, jint slot, jlong *valuePtr)
jvmdiError
GetLocalFloat(jframeID frame, jint slot, jfloat *valuePtr)
jvmdiError
GetLocalDouble(jframeID frame, jint slot, jdouble *valuePtr)

These functions are used to retrieve the value of a local variable. GetLocalInt can be used to retrieve int, char, byte, and boolean values. The variable is identified by the frame containing its value and the variable's slot number. The mapping of variables to slot numbers can be obtained with the function GetLocalVariableTable.

Parameters:

frame
the frame containing the variable's value.
slot
the variable's slot number.
valuePtr
on return, points to the variable's value. For GetLocalObject, the returned value is a global reference and must be explicitly freed with the JNI function DeleteGlobalRef().

The functions return one of the following error codes:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FRAMEID
Invalid frame.

JVMDI_ERROR_INVALID_SLOT
Invalid slot.

JVMDI_ERROR_TYPE_MISMATCH
The variable is not an appropriate type for the function used.

JVMDI_ERROR_OPAQUE_FRAME

Set Local Variable

jvmdiError
SetLocalObject(jframeID frame, jint slot, jobject value)
jvmdiError
SetLocalInt(jframeID frame, jint slot, jint value)
jvmdiError
SetLocalLong(jframeID frame, jint slot, jlong value)
jvmdiError
SetLocalFloat(jframeID frame, jint slot, jfloat value)
jvmdiError
SetLocalDouble(jframeID frame, jint slot, jdouble value)

These functions are used to set the value of a local variable. SetLocalInt can be used to set int, char, byte, and boolean values. The variable is identified by the frame containing its value and the variable's slot number. The mapping of variables to slot numbers can be obtained with the function GetLocalVariableTable.

Parameters:

frame
the frame containing the variable's value.
slot
the variable's slot number.
value
the new value for the variable

The functions return one of the following error codes:

JVMDI_ERROR_OPAQUE_FRAME
Invalid pointer.

JVMDI_ERROR_INVALID_FRAMEID
Invalid frame.

JVMDI_ERROR_INVALID_SLOT
Invalid slot.

JVMDI_ERROR_TYPE_MISMATCH
The variable is not an appropriate type for the function used.

Breakpoints

Set a Breakpoint

jvmdiError
SetBreakpoint(jclass clazz, jmethodID method, jlocation location)

Set a breakpoint at the instruction indicated by clazz, method, and location. An instruction can only have one breakpoint.

Whenever the designated instruction is about to be executed, a JVMDI_EVENT_BREAKPOINT event is generated. See Events.

Parameters:

clazz
the class in which to set the breakpoint
method
the method in which to set the breakpoint
location
the index of the instruction at which to set the breakpoint

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_INVALID_LOCATION
Invalid location.

JVMDI_ERROR_DUPLICATE
The designated bytecode already has a breakpoint.

Clear a Breakpoint

jvmdiError
ClearBreakpoint(jclass clazz, jmethodID method, jlocation location)

Clear the breakpoint at the bytecode indicated by clazz, method, and location.

Parameters:

clazz
the class in which to clear the breakpoint
method
the method in which to clear the breakpoint
location
the index of the instruction at which to clear the breakpoint

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_INVALID_LOCATION
Invalid location.

JVMDI_ERROR_NOT_FOUND
There's no breakpoint at the designated bytecode.

Clear All Breakpoints

jvmdiError
ClearAllBreakpoints()
Clear all breakpoints in this virtual machine.

Watched Fields

Set a Field Access Watch

jvmdiError
SetFieldAccessWatch(jclass clazz, jfieldID field)

Generate a JVMDI_EVENT_FIELD_ACCESS event when the field specified by clazz and field is about to be accessed. An event will be generated for each access of the field until it is cancelled with ClearFieldAccessWatch. Field accesses from Java Language code or from JNI are watched, fields modified by other means are not watched. Note that JVMDI users should be aware that their own field accesses will trigger the watch. A field can only have one field access watch set. Modification of a field is not considered an access - use SetFieldModificationWatch to monitor modifications.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

clazz
the class containing the field to watch
field
the field to watch

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_FIELDID
The jfieldID specified in field is not a valid field ID.

JVMDI_ERROR_INVALID_CLASS
The jclass specified in clazz is no a valid class.

JVMDI_ERROR_DUPLICATE
The designated field is already being watched for accesses.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Clear a Field Access Watch

jvmdiError
ClearFieldAccessWatch(jclass clazz, jfieldID field)

Cancel a field access watch previously set by SetFieldAccessWatch, on the field specified by clazz and field.

Parameters:

clazz
the class containing the field to watch
field
the field to watch

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_FIELDID
The jfieldID specified in field is not a valid field ID.

JVMDI_ERROR_INVALID_CLASS
The jclass specified in clazz is no a valid class.

JVMDI_ERROR_NOT_FOUND
The designated field is not being watched for accesses.

Set a Field Modification Watch

jvmdiError
SetFieldModificationWatch(jclass clazz, jfieldID field)

Generate a JVMDI_EVENT_FIELD_MODIFICATION event when the field specified by clazz and field is about to be modified. An event will be generated for each modification of the field until it is cancelled with ClearFieldModificationWatch. Field modifications from Java Language code or from JNI are watched, fields modified by other means are not watched. Note that JVMDI users should be aware that their own field modifications will trigger the watch. A field can only have one field modification watch set.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

clazz
the class containing the field to watch
field
the field to watch

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_FIELDID
The jfieldID specified in field is not a valid field ID.

JVMDI_ERROR_INVALID_CLASS
The jclass specified in clazz is no a valid class.

JVMDI_ERROR_DUPLICATE
The designated field is already being watched for modifications.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Clear a Field Modification Watch

jvmdiError
ClearFieldModificationWatch(jclass clazz, jfieldID field)

Cancel a field modification watch previously set by SetFieldModificationWatch, on the field specified by clazz and field.

Parameters:

clazz
the class containing the field to watch
field
the field to watch

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_FIELDID
The jfieldID specified in field is not a valid field ID.

JVMDI_ERROR_INVALID_CLASS
The jclass specified in clazz is no a valid class.

JVMDI_ERROR_NOT_FOUND
The designated field is not being watched for modifications.

Class Information

Class Signature

jvmdiError
GetClassSignature(jclass clazz, char **sigPtr)
For the class indicated by clazz, return the class signature via sigPtr. The return value is a UTF-8 string.

The returned signature for primitive classes (for example, java.lang.Integer.TYPE) is the signature of the corresponding primitive type (for example, "I").

Parameters:

clazz
the class to query
sigPtr
on return, refers to a pointer to the class's signature (UTF-8). The returned signature string should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Class Status

jvmdiError
GetClassStatus(jclass clazz, jint *statusPtr)
Get the status of the class. Zero or more of the following bits can be set.
JVMDI_CLASS_STATUS_VERIFIED
Class bytecodes have been verified.
JVMDI_CLASS_STATUS_PREPARED
Class preparation is complete.
JVMDI_CLASS_STATUS_INITIALIZED
Class initialization is complete. Static initializer has been run.
JVMDI_CLASS_STATUS_ERROR
Error during initialization makes class unusable.

The status value for primitive classes (for example, java.lang.Integer.TYPE) and for arrays is undefined.

Parameters:

clazz
the class to query
statusPtr
on return, points to the current state of this class as one or more of flags described above.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Source File Name

jvmdiError
GetSourceFileName(jclass clazz, char **sourceNamePtr)
For the class indicated by clazz, return the source file name via sourceNamePtr. The returned UTF-8 string is a file name only and never contains a directory name.

For primitive classes (for example, java.lang.Integer.TYPE) and for arrays this function returns JVMDI_ERROR_ABSENT_INFORMATION.

Parameters:

clazz
the class to query
sourceNamePtr
on return, refers to a pointer to the class's source file name (UTF-8). The returned file name string should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_ABSENT_INFORMATION
Class information does not include a source path. This includes the case where the class is an array class or primitive class.

Class Modifier Flags

jvmdiError
GetClassModifiers(jclass clazz, jint *modifiersPtr)
For the class indicated by clazz, return the access flags via modifiersPtr. Access flag definitions and information about class modifiers can be found in the Java virtual machine specification.

If the class is an array class, then its public, private and protected modifiers are the same as those of its component type. For arrays of primitives, this component type is represented by one of the primitive classes (for example, java.lang.Integer.TYPE).

If the class is a primitive class, its public modifier is always true, and its protected and private modifers are always false.

If the class is an array class or a primitive class then its final modifier is always true and its interface modifer is always false. The values of its other modifiers are not determined by this specification.

Parameters:

clazz
the class to query
modifiersPtr
on return, points to the current access flags of this class.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Class Methods

jvmdiError
GetClassMethods(jclass clazz, jint *methodCountPtr, jmethodID **methodsPtr)
For the class indicated by clazz, return a count of methods via methodCountPtr and a list of method IDs via methodsPtr. The method list contains constructors and static initializers as well as true methods. Only directly declared methods are returned (not inherited methods). Methods are returned in the order they occur in the class file. An empty method list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE).

Parameters:

clazz
the class to query
methodCountPtr
on return, points to the number of methods declared in this class.
methodsPtr
on return, points to the method ID array. The JVMDI allocator provides memory for the array. You must deallocate the array using Deallocate().

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_CLASS_NOT_PREPARED

Class Fields

jvmdiError
GetClassFields(jclass clazz, jint *fieldCountPtr, jfieldID **fieldsPtr)
For the class indicated by clazz, return a count of fields via fieldCountPtr and a list of field IDs via fieldsPtr. Only directly declared fields are returned (not inherited fields). Fields are returned in the order they occur in the class file. An empty field list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE). Use JNI to determine the length of an array.

Parameters:

clazz
the class to query
fieldCountPtr
on return, points to the number of fields dclared in this class.
fieldsPtr
on return, points to the field ID array. The JVMDI allocator provides memory for the array. You must deallocate it using Deallocate().

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_CLASS_NOT_PREPARED

Implemented Interfaces

jvmdiError
GetImplementedInterfaces(jclass clazz,
                       jint *interfaceCountPtr,
                       jclass **interfacesPtr);
Return the direct superinterfaces of this class. For a class, this function returns the interfaces declared in its implements clause. For an interface, this function returns the interfaces declared in its extends clause. An empty interface list is returned for array classes and primitive classes (for example, java.lang.Integer.TYPE).

Parameters:

clazz
the class to query
interfaceCountPtr
on return, points to the number of interfaces.
interfacesPtr
on return, points to the interface array. Interfaces in the array are JNI global references and must be explicitly freed with the JNI function DeleteGlobalRef. The returned interface array should be freed with Deallocate.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_CLASS_NOT_PREAPRED

Is an Interface

jvmdiError
IsInterface(jclass clazz, jboolean *isInterfacePtr)
Determines whether a class object reference represents an interface. The jboolean result is JNI_TRUE if the "class" is actually an interface, JNI_FALSE otherwise.

Parameters:

clazz
the class to query
isInterfacePtr
on return, points to the boolean result of this function.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Is an Array

jvmdiError
IsArrayClass(jclass clazz, jboolean *isArrayClassPtr)
Determines whether a class object reference represents an array. The jboolean result is JNI_TRUE if the class is an array, JNI_FALSE otherwise.

Parameters:

clazz
the class to query
isArrayClassPtr
on return, points to the boolean result of this function.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Class Loader

jvmdiError
GetClassLoader(jclass clazz, jobject *classloaderPtr)
For the class indicated by clazz, return via classloaderPtr a reference to the class loader for the class. If the class was not created by a class loader, classloaderPtr points to NULL.

Parameters:

clazz
the class to query
classloaderPtr
on return, points to the class loader that loaded this class or interface, or NULL if there it has no class loader. The returned classloader is a JNI global reference and must be explicitly freed with the JNI function DeleteGlobalRef.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Object Information

Object Hash Code

jvmdiError
GetObjectHashCode(jobject object, jint *hashCodePtr)
For the object indicated by object return via hashCodePtr a hash code that can be used in maintaining hash table of object references. This function guarantees the same hash code value for a particular object throughout its life

Parameters:

object
the object to query
hashCodePtr
on return, points to the object's hash code

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_OBJECT
Invalid object.

Get Monitor Info

typedef struct {
    jthread owner;
    jint entry_count;
    jint waiter_count;
    jthread *waiters;
} JVMDI_monitor_info;

jvmdiError
GetMonitorInfo(jobject object, JVMDI_monitor_info *infoPtr)

Get information about the the object's monitor The fields of the JVMDI_owned_monitor_info structure are filled in with details of the monitor. Each thread that might affect the monitor state must either be suspended or must be the current thread.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

object
the object to query
infoPtr
on return, filled with monitor information for the specified object. Returned objects (owner, array of waiters) are global references and must be explictly freed with the JNI function DeleteGlobalRef. The returned waiter array buffer should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_OBJECT
thread was invalid.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_THREAD_NOT_SUSPENDED
thread must be suspended before calling.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Field Information

Field Name and Signature

jvmdiError
GetFieldName(jclass clazz, jfieldID field,
                   char **namePtr, char **signaturePtr)
For the field indicated by clazz and field, return the field name via namePtr and field signature via signaturePtr.

Parameters:

clazz
the class to query
field
the field to query
namePtr
on return, refers to a pointer to the UTF-8 field name. The string should be freed with Deallocate
signaturePtr
on return, refers to a pointer to the UTF-8 field signature. The string should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FIELDID
Invalid field.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Field Declaring Class

jvmdiError
GetFieldDeclaringClass(jclass clazz, jfieldID field, jclass *declaringClassPtr)
For the field indicated by clazz and field return the class that defined it via declaringClassPtr. The declaring class will either be clazz. a superclass, or an implemented interface.

Parameters:

clazz
the class to query
field
the field to query
declaringClassPtr
on return, points to the declaring class The returned class is a JNI global reference and must be explicitly freed with freed with the JNI function DeleteGlobalRef.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FIELDID
Invalid field.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Field Modifier Flags

jvmdiError
GetFieldModifiers(jclass clazz, jfieldID field, jint *modifiersPtr)
For the field indicated by clazz and field return the access flags via modifiersPtr. Access flag definitions and information about field modifiers can be found in the Java virtual machine specification.

Parameters:

clazz
the class to query
field
the field to query
modifiersPtr
on return, points to the access flags.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FIELDID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Is Field Synthetic

jvmdiError
IsFieldSynthetic(jclass clazz, jfieldID field, jboolean *isSyntheticPtr)

For the field indicated by clazz and field, return a value indicating whether the field is synthetic via isSyntheticPtr Synthetic fields are generated by the compiler but not present in the original source code.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

clazz
the class to query
field
the field to query
isSyntheticPtr
on return, points to the boolean result of this function.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_FIELDID
Invalid field.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Method Information

Method Name and Signature

jvmdiError
GetMethodName(jclass clazz, jmethodID method,
                    char **namePtr, char **signaturePtr)

For the method indicated by clazz and method, return the method name via namePtr and method signature via signaturePtr. The signature is a JNI signature also called a method descriptor in the Java Virtual Machine Specification; note this is different then method signature as defined in the Java Language Specification.

Parameters:

clazz
the class to query
method
the method to query
namePtr
on return, refers to a pointer to the UTF-8 method name. The string should be freed with Deallocate
signaturePtr
on return, refers to a pointer to the UTF-8 method signature. The string should be freed with Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Method Declaring Class

jvmdiError
GetMethodDeclaringClass(jclass clazz, jmethodID method,
                                 jclass *declaringClassPtr)
For the method indicated by clazz and method, return the Class that defined it via declaringClassPtr.

Parameters:

clazz
the class to query
method
the method to query
declaringClassPtr
on return, points to the declaring class The returned class is a JNI global reference and must be explicitly freed with freed with the JNI function DeleteGlobalRef.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Method Modifier Flags

jvmdiError
GetMethodModifiers(jclass clazz, jmethodID method,
                         jint *modifiersPtr)
For the method indicated by clazz and method return the access flags via modifiersPtr. Access flag definitions and information about method modifiers can be found in the Java virtual machine specification.

Parameters:

clazz
the class to query
method
the method to query
modifiersPtr
on return, points to the access flags.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Maximum Stack

jvmdiError
GetMaxStack(jclass clazz, jmethodID method, jint *maxPtr)
For the method indicated by clazz and method, return via maxPtr the maximum number of words that can be on the stack while the method is executing.

Parameters:

clazz
the class to query
method
the method to query
maxPtr
on return, points to the maximum number of stack words

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Locals Slots

jvmdiError
GetMaxLocals(jclass clazz, jmethodID method,
                  jint *maxPtr);
For the method indicated by clazz and method, return via maxPtr the number of local variable slots used by the whole method. Note that two-word arguments use two slots.

Parameters:

clazz
the class to query
method
the method to query
maxPtr
on return, points to the maximum number of local slots

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Argument Slots

jvmdiError
GetArgumentsSize(jclass clazz, jmethodID method, jint *sizePtr)
For the method indicated by clazz and method, return via maxPtr the number of local variable slots used by the method's arguments. Note that two-word arguments use two slots.

Parameters:

clazz
the class to query
method
the method to query
sizePtr
on return, points to the number of argument slots

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Source Line Numbers

jvmdiError
GetLineNumberTable(jclass clazz, jmethodID method,
              jint *entryCountPtr,
             JVMDI_line_number_entry **tablePtr)
For the method indicated by clazz and method, return a table of source line number entries. The size of the table is returned via entryCountPtr and the table itself is returned via tablePtr. A table entry is an instance of the following structure:
typedef struct {
    jlocation start_location;
    jint line_number;
} JVMDI_line_number_entry;

Parameters:

clazz
the class to query
method
the method to query
entryCountPtr
on return, points to the number of entries in the table
tablePtr
on return, points to the line number table pointer. The JVMDI allocator provides space for the table. You must deallocate the table using Deallocate().

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NONE
No error.

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_ABSENT_INFORMATION
Class information does not include line numbers.

Method Location

jvmdiError
GetMethodLocation(jclass clazz, jmethodID method,
                        jlocation *startLocationPtr,
                        jlocation *endLocationPtr)
For the method indicated by clazz and method, return the beginning and ending addresses through startLocationPtr and endLocationPtr. In a conventional byte code indexing scheme, these values are always zero and the byte code count minus one.

Parameters:

clazz
the class to query
method
the method to query
startLocationPtr
on return, points to the first location, or -1 if location information is not available.
endLocationPtr
on return, points to the last location, or -1 if location information is not available.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_ABSENT_INFORMATION
Class information does not include method sizes.

Local Variables

jvmdiError
GetLocalVariableTable(jclass clazz, jmethodID method,
                            jint *entryCountPtr,
                            JVMDI_local_variable_entry **tablePtr)
For the method indicated by clazz and method, return a table of local variables. The size of the table is returned via entryCountPtr and the table itself is returned via tablePtr. A table entry has this structure:
typedef struct {
    jlocation start_location;   /* variable valid start_location */
    jint length;                /* upto start_location+length */
    char *name;                 /* name in UTF-8 */
    char *signature;            /* type signature in UTF-8 */
    jint slot;                  /* variable slot, see JVMDI_GetLocal*()  */
} JVMDI_local_variable_entry;

Parameters:

clazz
the class to query
method
the method to query
entryCountPtr
on return, points to the number of entries in the table
tablePtr
on return, points to the local variable table pointer. The JVMDI allocator provides space for the table. In addition, each name and signature string in the tableis allocated with the JVMDI allocator. You must deallocate these buffers using Deallocate.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_ABSENT_INFORMATION
Class information does not include local variable information.

Exception Handlers

jvmdiError
GetExceptionHandlerTable(jclass clazz, jmethodID method,
                               jint *entryCountPtr,
                               JVMDI_exception_handler_entry **tablePtr)
For the method indicated by clazz and method, return a table of exception handlers. The size of the table is returned via entryCountPtr and the table itself is returned via tablePtr. A table entry has this structure:
typedef struct {
    jlocation start_location;
    jlocation end_location;
    jlocation handler_location;
    jclass exception;           /* if null, all exceptions */
} JVMDI_exception_handler_entry;

A call to this function may trigger class loading for the thrown exception classes that have not yet been loaded. It should not be called while threads are suspended.

Parameters:

clazz
the class to query
method
the method to query
entryCountPtr
on return, points to the number of entries in the table
tablePtr
on return, points to the exception handler table pointer. The JVMDI allocator provides space for the table. You must deallocate the table using Deallocate(). The classes returned in the "exception" field of JVMDI_exception_handler_entry are global references and must be explicitly freed with the JNI function Deallocate

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Thrown Exceptions

jvmdiError
GetThrownExceptions(jclass clazz, jmethodID method,
                          jint *exceptionCountPtr, jclass **exceptionsPtr)
For the method indicated by clazz and method, return an array of exception classes the method might throw. The number of exceptions is returned via exceptionCountPtr. The exceptions array is returned via exceptionsPtr.

A call to this function may trigger class loading for the thrown exception classes that have not yet been loaded. It should not be called while threads are suspended.

Parameters:

clazz
the class to query
method
the method to query
exceptionCountPtr
on return, points to the number of running threads.
exceptionsPtr
on return, points to an array of references, one for each thrown exception. Exception classes in the array are JNI global references and must be explicitly freed with the JNI function DeleteGlobalRef. The returned exception array should be freed with Deallocate.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Bytecodes

jvmdiError
GetBytecodes(jclass clazz, jmethodID method, jint *bytecodeCountPtr,
                         jbyte **bytecodesPtr)
For the method indicated by clazz and method, return the byte codes that implement the method. The number of bytecodes is returned via bytecodeCountPtr. The byte codes themselves are returned via bytecodesPtr.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

clazz
the class to query
method
the method to query
bytecodeCountPtr
on return, points to the length of the byte code array
bytecodesPtr
on return, points to the pointer to the byte code array The JVMDI memory allocator provides memory for the byte code array. You must deallocate the table using Deallocate().

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Is Method Native

jvmdiError
IsMethodNative(jclass clazz, jmethodID method, jboolean *isNativePtr)

For the method indicated by clazz and method, return a value indicating whether the method is native via isNativePtr

Parameters:

clazz
the class to query
method
the method to query
isNativePtr
on return, points to the boolean result of this function.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

Is Method Synthetic

jvmdiError
IsMethodSynthetic(jclass clazz, jmethodID method, jboolean *isSyntheticPtr)

For the method indicated by clazz and method, return a value indicating whether the method is synthetic via isSyntheticPtr. Synthetic methods are generated by the compiler but not present in the original source code.

This is an optional feature which may not be implemented for all virtual machines. Use GetCapabilities to determine whether this and other features are supported in a particular virtual machine.

Parameters:

clazz
the class to query
method
the method to query
isSyntheticPtr
on return, points to the boolean result of this function.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

JVMDI_ERROR_INVALID_METHODID
Invalid method.

JVMDI_ERROR_INVALID_CLASS
Invalid clazz.

JVMDI_ERROR_NOT_IMPLEMENTED
Optional feature not present in this VM.

Raw Monitor Support

Create Raw Monitor

jvmdiError
CreateRawMonitor(char *name, JVMDI_RawMonitor *monitorPtr)
Create a raw monitor.

Parameters:

name
a name in UTF-8 to identify the monitor
monitorPtr
on return, points to the created monitor.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Destroy Raw Monitor

jvmdiError
DestroyRawMonitor(JVMDI_RawMonitor monitor)
Destroy the raw monitor.

Parameters:

monitor
the monitor

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Raw Monitor Enter

jvmdiError
RawMonitorEnter(JVMDI_RawMonitor monitor)
Gain exclusive ownership of a raw monitor.

Parameters:

monitor
the monitor

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_MONITOR
Invalid monitor.

Raw Monitor Exit

jvmdiError
RawMonitorExit(JVMDI_RawMonitor monitor)
Release exclusive ownership of a raw monitor.

Parameters:

monitor
the monitor

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_MONITOR
Invalid monitor.

Raw Monitor Wait

jvmdiError
RawMonitorWait(JVMDI_RawMonitor monitor, jlong millis)
Wait for notification of the raw monitor.

Parameters:

monitor
the monitor
millis
the timeout, in milliseconds

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_MONITOR
Invalid monitor.

JVMDI_ERROR_NOT_MONITOR_OWNER

JVMDI_ERROR_INTERRUPT

Raw Monitor Notify

jvmdiError
RawMonitorNotify(JVMDI_RawMonitor monitor)
Notify a single thread waiting on the raw monitor.

Parameters:

monitor
the monitor

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_MONITOR
Invalid monitor.

JVMDI_ERROR_NOT_MONITOR_OWNER

Raw Monitor Notify All

jvmdiError
RawMonitorNotifyAll(JVMDI_RawMonitor monitor)
Notify all threads waiting on the raw monitor.

Parameters:

monitor
the monitor

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_MONITOR
Invalid monitor.

JVMDI_ERROR_NOT_MONITOR_OWNER

Events

Set Event Hook

typedef void (*JVMDI_EventHook)(JNIEnv *env , JVMDI_Event *event);

jvmdiError
SetEventHook(JVMDI_EventHook hook)
Set the function to be called on every event. Details on events are described later in this document.

Parameters:

hook
the new event hook, or NULL to remove the existing hook.

This function returns a universal error on error.

Enable/Disable Events

jvmdiError
SetEventNotificationMode(jint mode, jint eventType, jthread thread, ...)
Control the generation of events. If mode is JVMDI_ENABLE, the event eventType is enabled; if mode is JVMDI_DISABLE, the event is disabled. If thread is NULL, the event is enabled or disabled globally; otherwise, it is enabled or disabled for a particular thread. An event is generated for a particular thread if it is enabled either at the thread or global levels.

See below for information on specific events.

The following events cannot be controlled at the thread level through this function.

  • JVMDI_EVENT_VM_INIT
  • JVMDI_EVENT_VM_DEATH
  • JVMDI_EVENT_THREAD_START
  • JVMDI_EVENT_CLASS_UNLOAD

Initially, no events are enabled at the thread level. All events except the following are enabled at the global level.

  • JVMDI_EVENT_SINGLE_STEP
  • JVMDI_EVENT_EXCEPTION_CATCH
  • JVMDI_EVENT_METHOD_ENTRY
  • JVMDI_EVENT_METHOD_EXIT
Set the function to be called on every event. Details on events are described later in this document.

Parameters:

mode
JVMDI_ENABLE or JVMDI_DISABLE
eventType
the event to control
thread
the thread to control, or NULL for all threads

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_INVALID_THREAD
If thread is invalid or the thread has not run.

JVMDI_ERROR_INVALID_EVENT_TYPE
If eventType is invalid value.

JVMDI_ERROR_ILLEGAL_ARGUMENT
If thread argument is specified with one of the following events:
  • JVMDI_EVENT_VM_INIT
  • JVMDI_EVENT_VM_DEATH
  • JVMDI_EVENT_THREAD_START
  • JVMDI_EVENT_CLASS_UNLOAD

Miscellaneous Functions

Get Loaded Classes

jvmdiError
GetLoadedClasses(jint *classCountPtr, jclass **classesPtr)

Return an array of all classes loaded in the virtual machine. The number of classes in the array is returned via classCountPtr, and the array itself via classesPtr. You must deallocate the array using Deallocate().

Array classes of all types (including arrays of primitive types) are included in the returned list. Primitive classes (for example, java.lang.Integer.TYPE) are not included in this list.

Parameters:

classCountPtr
on return, points to the number of classes.
classesPtr
on return, points to an array of references, one for each class. Classes in the array are JNI global references and must be explicitly freed with the JNI function DeleteGlobalRef. The returned class array should be freed with Deallocate.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Classloader Classes

jvmdiError
GetClassLoaderClasses(jobject initiatingLoader, jint *classCountPtr, jclass **classesPtr)

Returns an array of all classes for which this class loader has been recorded as the initiating loader. Each class in the returned array was created by this class loader, either by defining it directly or by delegation to another class loader.

For JDK 1.1 implementations which don't recognize the distinction between initiating and defining classloaders, this function should return all classes loaded in the virtual machine. The number of classes in the array is returned via classCountPtr, and the array itself via classesPtr. You must deallocate the array using Deallocate().

The initiatingLoader argument must not be null. The set of classes initiated by the system class loader is identical to the set of classes defined by that loader. This set can be determined by calling GetLoadedClasses and selecting those classes with a null class loader.

Parameters:

initiatingLoader
the initiating class loader.
classCountPtr
on return, points to the number of classes.
classesPtr
on return, points to an array of references, one for each class. Classes in the array are JNI global references and must be explicitly freed with the JNI function DeleteGlobalRef. The returned class array should be freed with Deallocate.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Version Number

jvmdiError
GetVersionNumber(jint *versionPtr)
Return the JVMDI version via versionPtr The return value is the version identifier. The low-order 16 bits represent the minor version number. The next 12 bits represent the major version number. The high-order 4 bits are undefined.

Parameters:

versionPtr
on return, points to the JVMDI version.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Get Capabilities

typedef struct {
    unsigned int can_watch_field_modification      : 1;
    unsigned int can_watch_field_access            : 1;
    unsigned int can_get_bytecodes                 : 1;
    unsigned int can_get_synthetic_attribute       : 1;
    unsigned int can_get_owned_monitor_info        : 1;
    unsigned int can_get_current_contended_monitor : 1;
    unsigned int can_get_monitor_info              : 1;
} JVMDI_capabilities;

jvmdiError
GetCapabilities(JVMDI_capabilities *capabilitiesPtr)
Return via capabilitiesPtr the optional JVMDI features supported by this implementation. The capabilities structure contains a number of boolean flags indicating whether the named feature is supported.

Parameters:

capabilitiesPtr
on return, points to the JVMDI capabilities.

This function returns either a universal error or one of the following errors:

JVMDI_ERROR_NULL_POINTER
Invalid pointer.

Errors

Every JVMDI function returns a jvmdiError error code.

Universal Errors

The following errors may be returned by any JVMDI function (and are thus not listed in the function descriptions):

JVMDI_ERROR_NONE
No error has occurred. This is the error code that is returned on successful completion of the function.

JVMDI_ERROR_OUT_OF_MEMORY
The function needed to allocate memory and no more memory was available for allocation.

JVMDI_ERROR_ACCESS_DENIED
Debugging has not been enabled in this virtual machine. JVMDI cannot be used.

JVMDI_ERROR_UNATTACHED_THREAD
The thread being used to call this function is not attached to the virtual machine. Calls must be made from attached threads. See AttachCurrentThread() in the JNI invocation API.

JVMDI_ERROR_VM_DEAD
The virtual machine is not running.

JVMDI_ERROR_INTERNAL
An unexpected internal error has occurred.

Function Specific Errors

The following errors are returned by some JVMDI functions (and are listed in the function descriptions):

JVMDI_ERROR_INVALID_THREAD
passed thread is not a valid thread or has exited

JVMDI_ERROR_INVALID_FIELDID
invalid field

JVMDI_ERROR_INVALID_METHODID
invalid method

JVMDI_ERROR_INVALID_LOCATION
invalid location

JVMDI_ERROR_INVALID_FRAMEID
invalid jframeID

JVMDI_ERROR_NO_MORE_FRAMES
There are no more Java or JNI frames on the call stack.

JVMDI_ERROR_OPAQUE_FRAME
information about the frame is not available (e.g. for native frames)

JVMDI_ERROR_NOT_CURRENT_FRAME
operation can only be performed on current frame

JVMDI_ERROR_TYPE_MISMATCH
the variable is not an appropriate type for the function used

JVMDI_ERROR_INVALID_SLOT
invalid slot

JVMDI_ERROR_DUPLICATE
item already set

JVMDI_ERROR_THREAD_NOT_SUSPENDED
thread was not suspended

JVMDI_ERROR_THREAD_SUSPENDED
thread already suspended

JVMDI_ERROR_INVALID_OBJECT
invalid object

JVMDI_ERROR_INVALID_CLASS
invalid class

JVMDI_ERROR_CLASS_NOT_PREPARED
class has been loaded but not yet prepared

JVMDI_ERROR_NULL_POINTER
invalid pointer

JVMDI_ERROR_ABSENT_INFORMATION
The requested information is not available.

JVMDI_ERROR_INVALID_EVENT_TYPE
The specified event type id is not recognized.

JVMDI_ERROR_NOT_IMPLEMENTED
The functionality is not implemented in this virtual machine

JVMDI_ERROR_INVALID_THREAD_GROUP
thread group invalid

JVMDI_ERROR_INVALID_PRIORITY
invalid priority

JVMDI_ERROR_NOT_FOUND
Desired element (e.g. field or breakpoint) not found

JVMDI_ERROR_INVALID_MONITOR
invalid monitor

JVMDI_ERROR_ILLEGAL_ARGUMENT
illegal argument

JVMDI_ERROR_NOT_MONITOR_OWNER
This thread doesn't own the monitor.

JVMDI_ERROR_ABSENT_INFORMATION
Desired information is not available.

JVMDI_ERROR_INTERRUPT
The call has been interrupted before completion.

JVMDI_ERROR_INVALID_TYPESTATE
The state of the thread has been modified, and is now inconsistent.

Handling Events

JVMDI clients can be informed of many events that occur in application programs.

To handle Events, designate a hook function with SetEventHook. For each event the hook function will be called with a JVMDI_Event argument describing the event type and, depending on the event, additional information. The hook function is usually called from within application threads and the JVMDI implementation does not queue events in any way. This means that event hook functions must be written carefully. Here are some general guidelines. See the individual event descriptions for further suggestions.

  • Any exception thrown during the execution of an event hook can overwrite any current pending exception in the current application thread. Care must be taken to preserve a pending exception when an event hook makes a JNI call that might generate an exception.
  • Event hook functions must be re-entrant. The JVMDI implementation does not queue events. If a JVMDI client needs to process events one at a time, it can use a raw monitor inside the event hook function to serialize event processing.

Some JVMDI events identify objects with JNI references. All such references are passed to the event hook function via the JVMDI_Event argument. All references in JVMDI events are JNI local references and will become invalid after the event hook returns. The JVMDI_Event data structure is allocated locally and deallocated when the event hook function returns.

Events can be enabled and disabled with the function SetEventNotificationMode. Some events are enabled at application startup; others are not. Refer to the documentation for this function for details.

A thread that generates an event does not change its execution status. If an event should cause a thread to be suspended, then the event hook function is responsible for explicitly suspending the thread with SuspendThread.

The JVMDI_Event contains the event kind and a union of event-specific structures containing more information.

typedef struct {
    jint kind;		/* the discriminant */

    union {
    /* kind = JVMDI_EVENT_SINGLE_STEP */
        JVMDI_single_step_event_data single_step;

        /* kind = JVMDI_EVENT_BREAKPOINT */
        JVMDI_breakpoint_event_data breakpoint;

        /* kind = JVMDI_EVENT_FRAME_POP */
        /* kind = JVMDI_EVENT_METHOD_ENTRY */
        /* kind = JVMDI_EVENT_METHOD_EXIT */
        JVMDI_frame_event_data frame;

        /* kind = JVMDI_EVENT_FIELD_ACCESS */
        JVMDI_field_access_event_data field_access;

        /* kind = JVMDI_EVENT_FIELD_MODIFICATION */
        JVMDI_field_modification_event_data field_modification;

        /* kind = JVMDI_EVENT_EXCEPTION */
        JVMDI_exception_event_data exception;

        /* kind = JVMDI_EVENT_EXCEPTION_CATCH */
        JVMDI_exception_catch_event_data exception_catch;

        /* kind = JVMDI_EVENT_USER_DEFINED */
        JVMDI_user_event_data user;

        /* kind = JVMDI_EVENT_THREAD_END or */
        /* JVMDI_EVENT_THREAD_START */
        JVMDI_thread_change_event_data thread_change;

        /* kind = JVMDI_EVENT_CLASS_LOAD, */
        /* JVMDI_EVENT_CLASS_UNLOAD, or */
        /* JVMDI_EVENT_CLASS_PREPARE */
        JVMDI_class_event_data class_event;

        /* kind = JVMDI_EVENT_VM_DEATH, JVMDI_EVENT_VM_INIT */
        /* no additional fields */
    } u;
} JVMDI_Event;

More information on specific events is given in the sections below.

Single Step Events (JVMDI_EVENT_SINGLE_STEP)

    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
    } JVMDI_single_step_event_data;

Single step events allow the JVMDI client to trace thread execution at the finest granularity allowed by the VM. A single step event is generated whenever a thread reaches a new location. Typically, single step events represent the completion of one VM instruction as defined the VM Specification; however, some implementations may define location differently. In any case the clazz, method, and location fields of the event structure uniquely identify the current location and allow the mapping to source file and line number when that information is available.

No single step events are generated from within native methods.

Single step events are disabled by default and can be enabled for a thread by calling SetEventNotificationMode

Breakpoint Events (JVMDI_EVENT_BREAKPOINT)

    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
    } JVMDI_breakpoint_event_data;

Breakpoint Events are generated whenever a thread reaches a location designated as a breakpoint with SetBreakpoint. The clazz, method, and location fields of the event structure uniquely identify the current location and allow the mapping to source file and line number when that information is available.

Breakpoint reporting, in general, can be enabled or disabled by calling SetEventNotificationMode and are enabled by default. If they are disabled, set breakpoints are ignored.

Field Events (JVMDI_EVENT_FIELD_ACCESS, JVMDI_EVENT_FIELD_MODIFICATION)

    /* kind = JVMDI_EVENT_FIELD_ACCESS */
    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
        jclass field_clazz;
        jobject object;
        jfieldID field;
    } JVMDI_field_access_event_data;

    /* kind = JVMDI_EVENT_FIELD_MODIFICATION */
    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
        jclass field_clazz;
        jobject object;
        jfieldID field;
        char signature_type;
        jvalue new_value;
    } JVMDI_field_modification_event_data;

Field Events are generated whenever a thread accesses or modifies a field designated as a watchpoint with SetFieldAccessWatch or with SetFieldModificationWatch. The clazz, method, and location fields of the event structures uniquely identify the current location and allow the mapping to source file and line number when that information is available. The field_clazz and field fields uniquely identify the field which is being accessed or modified. The object identifies the containing object if the field is an instance field. It is NULL otherwise.

Field watchpoint reporting, in general, can be enabled or disabled by calling SetEventNotificationMode and are enabled by default. If they are disabled, set watches are ignored.

Frame Events (JVMDI_EVENT_FRAME_POP, JVMDI_EVENT_METHOD_ENTRY, JVMDI_EVENT_METHOD_EXIT)

    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jframeID frame;
    } JVMDI_frame_event_data;

Method entry events are generated upon entry of Java or native methods. Method exit events are generated upon exit from a Java or native methods. Frame pop events are generated upon exit from a single method in a single frame as specified in a call to NotifyFramePop. If a method terminates by throwing an exception to its caller, neither a method exit event nor a frame pop event will be generated. JVMDI clients can check for this occurrence by monitoring exception catch events

The clazz and method fields uniquely identify the method being entered or exited. The frame field provides access to the stack frame for the method. On method entry, the location reported by GetFrameLocation identifies the initial executable location in the method. On method exit or frame pop, the location reported by GetFrameLocation identifes the executable location in the returning method, immediately prior to the return.

Method entry and exit are disabled by default and can be enabled by calling SetEventNotificationMode. Frame pop events are enabled by default and can be disabled similarly.

Exception Events (JVMDI_EVENT_EXCEPTION)

    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
        jobject exception;
        jclass catch_clazz;
        jmethodID catch_method;
        jlocation catch_location;
    } JVMDI_exception_event_data;

Exception events are generated whenever an exception is first detected in a Java method. The exception may have been thrown by a Java or native method, but in the case of native methods, the event is not generated until the exception is first seen by a Java method. If an exception is set and cleared in a native method (and thus is never visible to Java code), no exception event is generated.

The clazz, method, and location fields of the event structure uniquely identify the current location (where the exception was detected) and allow the mapping to source file and line number when that information is available. The exception field identifies the thrown exception object. The catch_clazz, catch_method, and catch_location identify the location of the catch clause, if any, that handles thrown exception. If there is no such catch clause, each field is set to 0. There is no guarantee that the thread will ever reach this catch clause. If there are native methods on the call stack between the throw location and the catch clause, the exception may be reset by one of those native methods. JVMDI clients can check for this occurrence by monitoring exception catch events

Exception events are enabled by default and can be disabled by calling SetEventNotificationMode.

Exception Catch Events (JVMDI_EVENT_EXCEPTION_CATCH)

    typedef struct {
        jthread thread;
        jclass clazz;
        jmethodID method;
        jlocation location;
        jobject exception;
    } JVMDI_exception_catch_event_data;

Exception catch events are generated whenever a thrown exception is caught. If the exception is caught in a Java method, the event is generated when the catch clause is reached. If the exception is caught in a native method, the event is generated as soon as control is returned to a Java method. Exception catch events are generated for any exception for which a throw was detected in a Java method.

The clazz, method, and location fields of the event structure uniquely identify the current location and allow the mapping to source file and line number when that information is available. For exceptions caught in a Java method, the exception object identifies the exception object. Exceptions caught in native methods are not necessarily available by the time the exception catch is reported, so the exception field is set to NULL.

Exception catch events are disabled by default and can be enabled by calling SetEventNotificationMode.

User Defined Events (JVMDI_EVENT_USER_DEFINED)

    typedef struct {
        jobject object;
        jint key;
    } JVMDI_user_event_data;

The meaning of user defined events and the fields in the user event data structure are defined by particular JVMDI implementations.

Thread Events (JVMDI_EVENT_THREAD_END, JVMDI_EVENT_THREAD_START)

    typedef struct {
        jthread thread;
    } JVMDI_thread_change_event_data;

Thread start events are generated by a new thread before its initial method executes. Thread end events are generated by a terminating thread after its initial method has finished execution. A thread may be listed in the array returned by GetAllThreads before its thread start event is generated and after its thread end event is generated. It is possible for other events to be generated for a thread before its thread start event, but no events are generated after its thread end event.

Thread events are enabled by default and can be disabled by calling SetEventNotificationMode.

Class Events (JVMDI_EVENT_CLASS_LOAD, JVMDI_EVENT_CLASS_UNLOAD, JVMDI_EVENT_CLASS_PREPARE)

    typedef struct {
        jthread thread;
        jclass clazz;
    } JVMDI_class_event_data;

Class events signal a change in status for a particular class.

A class load event is generated when a class is first loaded. The order of class load events are generated by a particular thread are guaranteed to match the order of class loading within that thread. Arrays of non-primitive types have class load events. Arrays of primitive types do not have class load events (they are considered loaded at the time of VM initialization). Primitive classes (for example, java.lang.Integer.TYPE) do not have class load events.

A class prepare event is generated when class preparation is complete. At this point, class fields, methods, and implemented interfaces are available, and no code from the class has been executed. Since array classes never have fields or methods, class prepare events are not generated for them. Class prepare events are not generated for primitive classes (for example, java.lang.Integer.TYPE).

A class unload event is generated when the class is about to be unloaded. Class unload events take place during garbage collection and must be handled extremely carefully. The garbage collector holds many locks and has suspended all other threads, so the event handler cannot depend on the ability to acquire any locks. The class unload event handler should do as little as possible, perhaps by queueing information to be processed later.

Class events are enabled by default and can be disabled by calling SetEventNotificationMode.

VM Initialization Event (JVMDI_EVENT_VM_INIT)

The VM initialization event signals the completion of VM initialization. Once this event is generated, the JVMDI client is free to call any JNI or JVMDI function. The VM initialization event can be preceded by or can be concurrent with other events, but the preceding events should be handled carefully, if at all because the VM has not completed its initialization. The thread start event for the main application thread is guaranteed not to occur until after the handler for the VM initialization event returns.

VM Death Event (JVMDI_EVENT_VM_DEATH)

The VM death event notifies the JVMDI client of the termination of the VM.

Multiple Co-located Events

 In many situations it is possible for multiple events to occur at the same location in one thread. When this happens, all of the events are reported through the event hook in the order specified in the following paragraphs.

If the current location is at the entry point of a method, the JVMDI_EVENT_METHOD_ENTRY event is reported before any other event at the current location in the same thread.

If an exception catch has been detected at the current location, (either because it is the beginning of a catch clause or a native method which cleared a pending exception has returned), the JVMDI_EVENT_EXCEPTION_CATCH event is reported before any other event at the current location in the same thread.

If a JVMDI_EVENT_SINGLE_STEP event or JVMDI_EVENT_BREAKPOINT event is triggered at the current location, the event is defined to occur immediately before the code at the current location is executed. These events are reported before any events which are triggered by the execution of code at the current location in the same thread (specifically, JVMDI_EVENT_EXCEPTION, JVMDI_EVENT_FIELD_ACCESS, and JVMDI_EVENT_FIELD_MODIFICATION). If both a step and breakpoint event are triggered for the same thread and location, the step event is reported before the breakpoint event.

If the current location is the exit point of a method (that is, the last location before returning to the caller), the JVMDI_EVENT_METHOD_EXIT event and the JVMDI_EVENT_FRAME_POP event (if requested) are reported after all other events at the current location in the same thread. There is no specified ordering of these two events with respect to each other.

Co-located events can be triggered during the processing of some other event by the JVMDI client at the same location in the same thread. If such an event, of type y, is triggered during the processing of an event of type x, and if x precedes y in the ordering specified above, then the co-located event y is reported for the current thread and location. If x does not precede y, then y is not reported for the current thread and location. For example, if a breakpoint is set at the current location during the processing of JVMDI_EVENT_SINGLE_STEP, that breakpoint will be reported before the thread moves off the current location.

The following events are never considered to be co-located with other events.

  • JVMDI_EVENT_USER_DEFINED
  • JVMDI_EVENT_VM_INIT
  • JVMDI_EVENT_VM_DEATH
  • JVMDI_EVENT_THREAD_START
  • JVMDI_EVENT_THREAD_END
  • JVMDI_EVENT_CLASS_LOAD
  • JVMDI_EVENT_CLASS_UNLOAD
  • JVMDI_EVENT_CLASS_PREPARE

Starting a VM with a JVMDI Client

The initial loading of a JVMDI client at VM startup can vary from VM to VM. The following description applies to the Sun classic VM for Windows and Solaris.

The following command-line arguments are required on VM startup to properly load and run JVMDI clients.

-Xdebug
Enables debugging
-Xnoagent
Prevents the default debug agent (used with jdb) from running.
-Djava.compiler=NONE
Disables the JIT. The classic VM does not support debugging with the JIT enabled.
-Xrun:
Identifies the library containing the JVMDI client as well as an options string to be passed in at startup. The library must export a startup function with the following prototype.
JNIEXPORT jint JNICALL
JVM_OnLoad(JavaVM *vm, char *options, void *reserved)
This function will be called at startup by the VM. For example, if the option -Xrunfoo:opt1,opt2 is specified, the VM will attempt to load the shared library foo.dll under Windows or libfoo.so under Solaris. It will then attempt to find JVM_OnLoad and call it with "opt1,opt2" as the second argument. Since the VM is not initialized at the time of this call, there is very little that can be done safely inside JVM_OnLoad. It can safely process the options and set an event hook with SetEventHook. Once that event hook is called for the VM initialization event, the JVMDI client can complete its initialization.
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.

Send questions or comments to: java-debugger@java.sun.com.

Sun


API Help

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Inner Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Hierarchy

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Package Hierarchies:
com.sun.jdi, com.sun.jdi.connect, com.sun.jdi.event, com.sun.jdi.request

Class Hierarchy

  • class java.lang.Object
    • class com.sun.jdi.Bootstrap
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class com.sun.jdi.AbsentInformationException
        • class com.sun.jdi.ClassNotLoadedException
        • class com.sun.jdi.connect.IllegalConnectorArgumentsException
        • class com.sun.jdi.IncompatibleThreadStateException
        • class com.sun.jdi.InvalidTypeException
        • class com.sun.jdi.InvocationException
        • class java.lang.RuntimeException
          • class com.sun.jdi.ClassNotPreparedException
          • class com.sun.jdi.request.DuplicateRequestException
          • class com.sun.jdi.InconsistentDebugInfoException
          • class com.sun.jdi.InternalException
          • class com.sun.jdi.InvalidCodeIndexException
          • class com.sun.jdi.InvalidLineNumberException
          • class com.sun.jdi.request.InvalidRequestStateException
          • class com.sun.jdi.InvalidStackFrameException
          • class com.sun.jdi.NativeMethodException
          • class com.sun.jdi.ObjectCollectedException
          • class com.sun.jdi.VMDisconnectedException
          • class com.sun.jdi.VMMismatchException
          • class com.sun.jdi.VMOutOfMemoryException
        • class com.sun.jdi.connect.VMStartException

Interface Hierarchy

  • interface com.sun.jdi.Accessible
    • interface com.sun.jdi.ReferenceType (also extends java.lang.Comparable, com.sun.jdi.Type)
      • interface com.sun.jdi.ArrayType
      • interface com.sun.jdi.ClassType
      • interface com.sun.jdi.InterfaceType
    • interface com.sun.jdi.TypeComponent (also extends com.sun.jdi.Mirror)
      • interface com.sun.jdi.Field (also extends java.lang.Comparable)
      • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.Locatable)
  • interface java.util.Collection
    • interface java.util.Set
      • interface com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror)
  • interface java.lang.Comparable
    • interface com.sun.jdi.ByteValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.CharValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.DoubleValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.Field (also extends com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.FloatValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.IntegerValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.LocalVariable (also extends com.sun.jdi.Mirror)
    • interface com.sun.jdi.Location (also extends com.sun.jdi.Mirror)
    • interface com.sun.jdi.LongValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.Method (also extends com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, com.sun.jdi.Type)
      • interface com.sun.jdi.ArrayType
      • interface com.sun.jdi.ClassType
      • interface com.sun.jdi.InterfaceType
    • interface com.sun.jdi.ShortValue (also extends com.sun.jdi.PrimitiveValue)
  • interface com.sun.jdi.connect.Connector
    • interface com.sun.jdi.connect.AttachingConnector
    • interface com.sun.jdi.connect.LaunchingConnector
    • interface com.sun.jdi.connect.ListeningConnector
  • interface java.util.Iterator
    • interface com.sun.jdi.event.EventIterator
  • interface com.sun.jdi.Locatable
    • interface com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.request.EventRequest)
    • interface com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.event.Event)
      • interface com.sun.jdi.event.BreakpointEvent
      • interface com.sun.jdi.event.ExceptionEvent
      • interface com.sun.jdi.event.MethodEntryEvent
      • interface com.sun.jdi.event.MethodExitEvent
      • interface com.sun.jdi.event.StepEvent
      • interface com.sun.jdi.event.WatchpointEvent
        • interface com.sun.jdi.event.AccessWatchpointEvent
        • interface com.sun.jdi.event.ModificationWatchpointEvent
    • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.StackFrame (also extends com.sun.jdi.Mirror)
  • interface com.sun.jdi.Mirror
    • interface com.sun.jdi.event.Event
      • interface com.sun.jdi.event.ClassPrepareEvent
      • interface com.sun.jdi.event.ClassUnloadEvent
      • interface com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.Locatable)
        • interface com.sun.jdi.event.BreakpointEvent
        • interface com.sun.jdi.event.ExceptionEvent
        • interface com.sun.jdi.event.MethodEntryEvent
        • interface com.sun.jdi.event.MethodExitEvent
        • interface com.sun.jdi.event.StepEvent
        • interface com.sun.jdi.event.WatchpointEvent
          • interface com.sun.jdi.event.AccessWatchpointEvent
          • interface com.sun.jdi.event.ModificationWatchpointEvent
      • interface com.sun.jdi.event.ThreadDeathEvent
      • interface com.sun.jdi.event.ThreadStartEvent
      • interface com.sun.jdi.event.VMDeathEvent
      • interface com.sun.jdi.event.VMDisconnectEvent
      • interface com.sun.jdi.event.VMStartEvent
    • interface com.sun.jdi.event.EventQueue
    • interface com.sun.jdi.request.EventRequest
      • interface com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.Locatable)
      • interface com.sun.jdi.request.ClassPrepareRequest
      • interface com.sun.jdi.request.ClassUnloadRequest
      • interface com.sun.jdi.request.ExceptionRequest
      • interface com.sun.jdi.request.MethodEntryRequest
      • interface com.sun.jdi.request.MethodExitRequest
      • interface com.sun.jdi.request.StepRequest
      • interface com.sun.jdi.request.ThreadDeathRequest
      • interface com.sun.jdi.request.ThreadStartRequest
      • interface com.sun.jdi.request.WatchpointRequest
        • interface com.sun.jdi.request.AccessWatchpointRequest
        • interface com.sun.jdi.request.ModificationWatchpointRequest
    • interface com.sun.jdi.request.EventRequestManager
    • interface com.sun.jdi.event.EventSet (also extends java.util.Set)
    • interface com.sun.jdi.LocalVariable (also extends java.lang.Comparable)
    • interface com.sun.jdi.Location (also extends java.lang.Comparable)
    • interface com.sun.jdi.StackFrame (also extends com.sun.jdi.Locatable)
    • interface com.sun.jdi.Type
      • interface com.sun.jdi.PrimitiveType
        • interface com.sun.jdi.BooleanType
        • interface com.sun.jdi.ByteType
        • interface com.sun.jdi.CharType
        • interface com.sun.jdi.DoubleType
        • interface com.sun.jdi.FloatType
        • interface com.sun.jdi.IntegerType
        • interface com.sun.jdi.LongType
        • interface com.sun.jdi.ShortType
      • interface com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, java.lang.Comparable)
        • interface com.sun.jdi.ArrayType
        • interface com.sun.jdi.ClassType
        • interface com.sun.jdi.InterfaceType
      • interface com.sun.jdi.VoidType
    • interface com.sun.jdi.TypeComponent (also extends com.sun.jdi.Accessible)
      • interface com.sun.jdi.Field (also extends java.lang.Comparable)
      • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.Locatable)
    • interface com.sun.jdi.Value
      • interface com.sun.jdi.ObjectReference
        • interface com.sun.jdi.ArrayReference
        • interface com.sun.jdi.ClassLoaderReference
        • interface com.sun.jdi.ClassObjectReference
        • interface com.sun.jdi.StringReference
        • interface com.sun.jdi.ThreadGroupReference
        • interface com.sun.jdi.ThreadReference
      • interface com.sun.jdi.PrimitiveValue
        • interface com.sun.jdi.BooleanValue
        • interface com.sun.jdi.ByteValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.CharValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.DoubleValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.FloatValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.IntegerValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.LongValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.ShortValue (also extends java.lang.Comparable)
      • interface com.sun.jdi.VoidValue
    • interface com.sun.jdi.VirtualMachine
      • interface com.sun.jdi.PathSearchingVirtualMachine
  • interface java.io.Serializable
    • interface com.sun.jdi.connect.Connector.Argument
      • interface com.sun.jdi.connect.Connector.BooleanArgument
      • interface com.sun.jdi.connect.Connector.IntegerArgument
      • interface com.sun.jdi.connect.Connector.SelectedArgument
      • interface com.sun.jdi.connect.Connector.StringArgument
  • interface com.sun.jdi.connect.Transport
  • interface com.sun.jdi.VirtualMachineManager
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Index

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES
A B C D E F G H I L M N O P R S T U V W

A

AbsentInformationException - exception com.sun.jdi.AbsentInformationException.
Thrown to indicate line number or variable information is not available.
AbsentInformationException() - Constructor for class com.sun.jdi.AbsentInformationException
AbsentInformationException(String) - Constructor for class com.sun.jdi.AbsentInformationException
accept(Map) - Method in interface com.sun.jdi.connect.ListeningConnector
Waits for a target VM to attach to this connector.
Accessible - interface com.sun.jdi.Accessible.
Provides information on the accessibility of a type or type component.
AccessWatchpointEvent - interface com.sun.jdi.event.AccessWatchpointEvent.
Notification of a field access in the target VM.
AccessWatchpointRequest - interface com.sun.jdi.request.AccessWatchpointRequest.
Request for notification when the contents of a field are accessed in the target VM.
accessWatchpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ClassUnloadRequest
Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression.
addClassExclusionFilter(String) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
addClassFilter(ReferenceType) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
addClassFilter(String) - Method in interface com.sun.jdi.request.ClassPrepareRequest
Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.ClassUnloadRequest
Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.StepRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
addClassFilter(String) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
addCountFilter(int) - Method in interface com.sun.jdi.request.EventRequest
Limit the requested event to be reported at most once after a given number of occurrences.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.BreakpointRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ThreadDeathRequest
Restricts the event generated by this request to the ending of this thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MethodExitRequest
Restricts the events generated by this request to those in this thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ExceptionRequest
Restricts the events generated by this request to those in the given thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.WatchpointRequest
Restricts the events generated by this request to those in this thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.MethodEntryRequest
Restricts the events generated by this request to those in this thread.
addThreadFilter(ThreadReference) - Method in interface com.sun.jdi.request.ThreadStartRequest
Restricts the event generated by this request to the starting of this thread.
allClasses() - Method in interface com.sun.jdi.VirtualMachine
Returns all loaded types.
allConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of all known Connector objects.
allFields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
allInterfaces() - Method in interface com.sun.jdi.ClassType
Gets the interfaces directly and indirectly implemented by this class.
allLineLocations() - Method in interface com.sun.jdi.Method
Returns the beginning Location objects for each executable source line in this method.
allLineLocations() - Method in interface com.sun.jdi.ReferenceType
Returns the Location objects for each executable source line in this reference type.
allMethods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
allThreads() - Method in interface com.sun.jdi.VirtualMachine
Returns a list of the currently running threads.
argumentNames() - Method in class com.sun.jdi.connect.IllegalConnectorArgumentsException
arguments() - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable that is declared as an argument of this method.
argumentTypeNames() - Method in interface com.sun.jdi.Method
Returns a text representation of all declared argument types of this method.
argumentTypes() - Method in interface com.sun.jdi.Method
Returns the list containing the type of each argument.
ArrayReference - interface com.sun.jdi.ArrayReference.
Provides access to an array object and its components in the target VM.
ArrayType - interface com.sun.jdi.ArrayType.
Provides access to the class of an array and the type of its components in the target VM.
attach(Map) - Method in interface com.sun.jdi.connect.AttachingConnector
Attaches to a running application and and returns a mirror of its VM.
AttachingConnector - interface com.sun.jdi.connect.AttachingConnector.
A connector which attaches to a previously running target VM.
attachingConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known AttachingConnector objects.

B

baseDirectory() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
BooleanType - interface com.sun.jdi.BooleanType.
The type of all primitive boolean values accessed in the target VM.
BooleanValue - interface com.sun.jdi.BooleanValue.
Provides access to a primitive boolean value in the target VM.
booleanValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a BooleanValue and returns the result as a boolean.
booleanValue() - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Return the value of the argument as a boolean.
bootClassPath() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
Get the boot class path for this virtual machine.
Bootstrap - class com.sun.jdi.Bootstrap.
Initial class that provides access to the default implementation of JDI interfaces.
Bootstrap() - Constructor for class com.sun.jdi.Bootstrap
BreakpointEvent - interface com.sun.jdi.event.BreakpointEvent.
Notification of a breakpoint in the target VM.
BreakpointRequest - interface com.sun.jdi.request.BreakpointRequest.
Identifies a Location in the target VM at which execution should be stopped.
breakpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
bytecodes() - Method in interface com.sun.jdi.Method
Returns an array containing the bytecodes for this method.
ByteType - interface com.sun.jdi.ByteType.
The type of all primitive byte values accessed in the target VM.
ByteValue - interface com.sun.jdi.ByteValue.
Provides access to a primitive byte value in the target VM.
byteValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a ByteValue and returns the result as a boolean.

C

canGetBytecodes() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports the retrieval of a method's bytecodes.
canGetCurrentContendedMonitor() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports the retrieval of the monitor for which a thread is currently waiting.
canGetMonitorInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports the retrieval of the monitor information for an object.
canGetOwnedMonitorInfo() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports the retrieval of the monitors owned by a thread.
canGetSyntheticAttribute() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports the query of the synthetic attribute of a method or field.
canWatchFieldAccess() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports watchpoints for field access.
canWatchFieldModification() - Method in interface com.sun.jdi.VirtualMachine
Determines if this implementation supports watchpoints for field modification.
catchLocation() - Method in interface com.sun.jdi.event.ExceptionEvent
Gets the location where the exception will be caught.
CharType - interface com.sun.jdi.CharType.
The type of all primitive char values accessed in the target VM.
CharValue - interface com.sun.jdi.CharValue.
Provides access to a primitive char value in the target VM.
charValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a CharValue and returns the result as a char.
choices() - Method in interface com.sun.jdi.connect.Connector.SelectedArgument
Return the possible values for the argument
classesByName(String) - Method in interface com.sun.jdi.VirtualMachine
Returns the loaded reference types that match a given name.
classLoader() - Method in interface com.sun.jdi.ReferenceType
Gets the classloader object which loaded the class corresponding to this type.
ClassLoaderReference - interface com.sun.jdi.ClassLoaderReference.
A class loader object from the target VM.
className() - Method in class com.sun.jdi.ClassNotLoadedException
className() - Method in interface com.sun.jdi.event.ClassUnloadEvent
Returns the name of the class that has been unloaded.
ClassNotLoadedException - exception com.sun.jdi.ClassNotLoadedException.
Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
ClassNotLoadedException(String) - Constructor for class com.sun.jdi.ClassNotLoadedException
ClassNotLoadedException(String, String) - Constructor for class com.sun.jdi.ClassNotLoadedException
ClassNotPreparedException - exception com.sun.jdi.ClassNotPreparedException.
Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.
ClassNotPreparedException() - Constructor for class com.sun.jdi.ClassNotPreparedException
ClassNotPreparedException(String) - Constructor for class com.sun.jdi.ClassNotPreparedException
classObject() - Method in interface com.sun.jdi.ReferenceType
Returns the class object that corresponds to this type in the target VM.
ClassObjectReference - interface com.sun.jdi.ClassObjectReference.
An instance of java.lang.Class from the target VM.
classPath() - Method in interface com.sun.jdi.PathSearchingVirtualMachine
Get the class path for this virtual machine.
ClassPrepareEvent - interface com.sun.jdi.event.ClassPrepareEvent.
Notification of a class prepare in the target VM.
ClassPrepareRequest - interface com.sun.jdi.request.ClassPrepareRequest.
Request for notification when a class is prepared in the target VM.
classPrepareRequests() - Method in interface com.sun.jdi.request.EventRequestManager
classSignature() - Method in interface com.sun.jdi.event.ClassUnloadEvent
Returns the JNI-style signature of the class that has been unloaded.
ClassType - interface com.sun.jdi.ClassType.
A mirror of a class in the target VM.
ClassUnloadEvent - interface com.sun.jdi.event.ClassUnloadEvent.
Notification of a class unload in the target VM.
ClassUnloadRequest - interface com.sun.jdi.request.ClassUnloadRequest.
Request for notification when a class is unloaded in the target VM.
classUnloadRequests() - Method in interface com.sun.jdi.request.EventRequestManager
codeIndex() - Method in interface com.sun.jdi.Location
Gets the code position within this location's method.
com.sun.jdi - package com.sun.jdi
This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect - package com.sun.jdi.connect
This package defines connections between the virtual machine using the JDI and the target virtual machine.
com.sun.jdi.event - package com.sun.jdi.event
This package defines JDI events and event processing.
com.sun.jdi.request - package com.sun.jdi.request
This package is used to request that a JDI event be sent under specified conditions.
componentSignature() - Method in interface com.sun.jdi.ArrayType
Gets the JNI signature of the components of this array class.
componentType() - Method in interface com.sun.jdi.ArrayType
Returns the type of the array components.
componentTypeName() - Method in interface com.sun.jdi.ArrayType
concreteMethodByName(String, String) - Method in interface com.sun.jdi.ClassType
Returns a the single non-abstract Method visible from this class that has the given name and signature.
connectedVirtualMachines() - Method in interface com.sun.jdi.VirtualMachineManager
Lists all target VMs which are connected to the debugger.
Connector - interface com.sun.jdi.connect.Connector.
A method of connection between a debugger and a target VM.
Connector.Argument - interface com.sun.jdi.connect.Connector.Argument.
Specification for and value of a Connector argument.
Connector.BooleanArgument - interface com.sun.jdi.connect.Connector.BooleanArgument.
Specification for and value of a Connector argument, whose value is Boolean.
Connector.IntegerArgument - interface com.sun.jdi.connect.Connector.IntegerArgument.
Specification for and value of a Connector argument, whose value is an integer.
Connector.SelectedArgument - interface com.sun.jdi.connect.Connector.SelectedArgument.
Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
Connector.StringArgument - interface com.sun.jdi.connect.Connector.StringArgument.
Specification for and value of a Connector argument, whose value is a String.
createAccessWatchpointRequest(Field) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled watchpoint which watches accesses to the specified field.
createBreakpointRequest(Location) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled BreakpointRequest.
createClassPrepareRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ClassPrepareRequest.
createClassUnloadRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ClassUnloadRequest.
createExceptionRequest(ReferenceType, boolean, boolean) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ExceptionRequest.
createMethodEntryRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MethodEntryRequest.
createMethodExitRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled MethodExitRequest.
createModificationWatchpointRequest(Field) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled watchpoint which watches accesses to the specified field.
createStepRequest(ThreadReference, int, int) - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled StepRequest.
createThreadDeathRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ThreadDeathRequest.
createThreadStartRequest() - Method in interface com.sun.jdi.request.EventRequestManager
Creates a new disabled ThreadStartRequest.
currentContendedMonitor() - Method in interface com.sun.jdi.ThreadReference
Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.

D

declaringType() - Method in interface com.sun.jdi.TypeComponent
Returns the type in which this component was declared.
declaringType() - Method in interface com.sun.jdi.Location
Gets the type to which this Location belongs.
defaultArguments() - Method in interface com.sun.jdi.connect.Connector
Returns the arguments accepted by this Connector and their default values.
defaultConnector() - Method in interface com.sun.jdi.VirtualMachineManager
Identifies the default connector.
definedClasses() - Method in interface com.sun.jdi.ClassLoaderReference
Returns a list of all loaded classes that were defined by this class loader.
deleteAllBreakpoints() - Method in interface com.sun.jdi.request.EventRequestManager
Remove all breakpoints managed by this EventRequestManager.
deleteEventRequest(EventRequest) - Method in interface com.sun.jdi.request.EventRequestManager
Removes a eventRequest.
deleteEventRequests(List) - Method in interface com.sun.jdi.request.EventRequestManager
Removes a list of EventRequests.
depth() - Method in interface com.sun.jdi.request.StepRequest
description() - Method in interface com.sun.jdi.VirtualMachine
Returns text information on the target VM and the debugger support that mirrors it.
description() - Method in interface com.sun.jdi.connect.Connector
Returns a human-readable description of this connector and its purpose.
description() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a human-readable description of this argument and its purpose.
disable() - Method in interface com.sun.jdi.request.EventRequest
Same as setEnabled(false).
disableCollection() - Method in interface com.sun.jdi.ObjectReference
Prevents garbage collection for this object.
dispose() - Method in interface com.sun.jdi.VirtualMachine
Invalidates this virtual machine mirror.
DoubleType - interface com.sun.jdi.DoubleType.
The type of all primitive double values accessed in the target VM.
DoubleValue - interface com.sun.jdi.DoubleValue.
Provides access to a primitive double value in the target VM.
doubleValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a DoubleValue and returns the result as a double.
DuplicateRequestException - exception com.sun.jdi.request.DuplicateRequestException.
Thrown to indicate a duplicate event request.
DuplicateRequestException() - Constructor for class com.sun.jdi.request.DuplicateRequestException
DuplicateRequestException(String) - Constructor for class com.sun.jdi.request.DuplicateRequestException

E

enable() - Method in interface com.sun.jdi.request.EventRequest
Same as setEnabled(true).
enableCollection() - Method in interface com.sun.jdi.ObjectReference
Permits garbage collection for this object.
entryCount() - Method in interface com.sun.jdi.ObjectReference
Returns the number times this object's monitor has been entered by the current owning thread.
equals(Object) - Method in interface com.sun.jdi.Method
Compares the specified Object with this method for equality.
equals(Object) - Method in interface com.sun.jdi.ShortValue
Compares the specified Object with this ShortValue for equality.
equals(Object) - Method in interface com.sun.jdi.DoubleValue
Compares the specified Object with this DoubleValue for equality.
equals(Object) - Method in interface com.sun.jdi.Field
Compares the specified Object with this field for equality.
equals(Object) - Method in interface com.sun.jdi.ObjectReference
Compares the specified Object with this ObjectReference for equality.
equals(Object) - Method in interface com.sun.jdi.Location
Compares the specified Object with this Location for equality.
equals(Object) - Method in interface com.sun.jdi.ReferenceType
Compares the specified Object with this ReferenceType for equality.
equals(Object) - Method in interface com.sun.jdi.LongValue
Compares the specified Object with this LongValue for equality.
equals(Object) - Method in interface com.sun.jdi.ByteValue
Compares the specified Object with this ByteValue for equality.
equals(Object) - Method in interface com.sun.jdi.LocalVariable
Compares the specified Object with this LocalVariable for equality.
equals(Object) - Method in interface com.sun.jdi.IntegerValue
Compares the specified Object with this IntegerValue for equality.
equals(Object) - Method in interface com.sun.jdi.VoidValue
Compares the specified Object with this VoidValue for equality.
equals(Object) - Method in interface com.sun.jdi.BooleanValue
Compares the specified Object with this BooleanValue for equality.
equals(Object) - Method in interface com.sun.jdi.CharValue
Compares the specified Object with this CharValue for equality.
equals(Object) - Method in interface com.sun.jdi.FloatValue
Compares the specified Object with this FloatValue for equality.
errorCode() - Method in class com.sun.jdi.InternalException
Event - interface com.sun.jdi.event.Event.
An occurrence in a target VM that is of interest to a debugger.
EventIterator - interface com.sun.jdi.event.EventIterator.
EventIterators are unmodifiable.
eventIterator() - Method in interface com.sun.jdi.event.EventSet
Return an iterator specific to Event objects.
EventQueue - interface com.sun.jdi.event.EventQueue.
Manager of incoming debugger events for a target VM.
eventQueue() - Method in interface com.sun.jdi.VirtualMachine
Returns the event queue for this virtual machine.
EventRequest - interface com.sun.jdi.request.EventRequest.
Represents a request for notification of an event.
EventRequestManager - interface com.sun.jdi.request.EventRequestManager.
Manages the creation and deletion of EventRequests.
eventRequestManager() - Method in interface com.sun.jdi.VirtualMachine
Returns the event request manager for this virtual machine.
EventSet - interface com.sun.jdi.event.EventSet.
Several Event objects may be created at a given time by the target VirtualMachine.
exception() - Method in class com.sun.jdi.InvocationException
exception() - Method in interface com.sun.jdi.event.ExceptionEvent
Gets the thrown exception object.
exception() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns exception type for which exception events are requested.
ExceptionEvent - interface com.sun.jdi.event.ExceptionEvent.
Notification of an exception in the target VM.
ExceptionRequest - interface com.sun.jdi.request.ExceptionRequest.
Request for notification when an exception occurs in the target VM.
exceptionRequests() - Method in interface com.sun.jdi.request.EventRequestManager
exit(int) - Method in interface com.sun.jdi.VirtualMachine
Causes the mirrored VM to terminate with the given error code.

F

failedToInitialize() - Method in interface com.sun.jdi.ReferenceType
Determines if initialization failed for this class.
Field - interface com.sun.jdi.Field.
A static or instance field in the target VM.
field() - Method in interface com.sun.jdi.event.WatchpointEvent
Returns the field that is about to be accessed/modified.
field() - Method in interface com.sun.jdi.request.WatchpointRequest
Gets the Field being watched by this WatchpointRequest.
fieldByName(String) - Method in interface com.sun.jdi.ReferenceType
Finds the visible Field with the given non-ambiguous name.
fields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Field declared in this type.
FloatType - interface com.sun.jdi.FloatType.
The type of all primitive float values accessed in the target VM.
FloatValue - interface com.sun.jdi.FloatValue.
Provides access to a primitive float value in the target VM.
floatValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a FloatValue and returns the result as a float.
frame(int) - Method in interface com.sun.jdi.ThreadReference
Returns the StackFrame at the given index in the thread's current call stack.
frameCount() - Method in interface com.sun.jdi.ThreadReference
Returns the number of stack frames in the thread's current call stack.
frames() - Method in interface com.sun.jdi.ThreadReference
Returns a List containing each StackFrame in the thread's current call stack.
frames(int, int) - Method in interface com.sun.jdi.ThreadReference
Returns a List containing a range of StackFrame mirrors from the thread's current call stack.

G

getProperty(Object) - Method in interface com.sun.jdi.request.EventRequest
Returns the value of the property with the specified key.
getValue(Field) - Method in interface com.sun.jdi.ObjectReference
Gets the value of a given instance or static field in this object.
getValue(Field) - Method in interface com.sun.jdi.ReferenceType
Gets the Value of a given static Field in this type.
getValue(int) - Method in interface com.sun.jdi.ArrayReference
Returns an array component value.
getValue(LocalVariable) - Method in interface com.sun.jdi.StackFrame
Gets the Value of a LocalVariable in this frame.
getValues() - Method in interface com.sun.jdi.ArrayReference
Returns all of the components in this array.
getValues(int, int) - Method in interface com.sun.jdi.ArrayReference
Returns a range of array components.
getValues(List) - Method in interface com.sun.jdi.StackFrame
Returns the values of multiple local variables in this frame.
getValues(List) - Method in interface com.sun.jdi.ObjectReference
Gets the value of multiple instance and/or static fields in this object.
getValues(List) - Method in interface com.sun.jdi.ReferenceType
Returns a map containing the Value of each static Field in the given list.

H

hashCode() - Method in interface com.sun.jdi.Method
Returns the hash code value for this Method.
hashCode() - Method in interface com.sun.jdi.ShortValue
Returns the hash code value for this ShortValue.
hashCode() - Method in interface com.sun.jdi.DoubleValue
Returns the hash code value for this DoubleValue.
hashCode() - Method in interface com.sun.jdi.Field
Returns the hash code value for this Field.
hashCode() - Method in interface com.sun.jdi.ObjectReference
Returns the hash code value for this ObjectReference.
hashCode() - Method in interface com.sun.jdi.Location
Returns the hash code value for this Location.
hashCode() - Method in interface com.sun.jdi.ReferenceType
Returns the hash code value for this ObjectReference.
hashCode() - Method in interface com.sun.jdi.LongValue
Returns the hash code value for this LongValue.
hashCode() - Method in interface com.sun.jdi.ByteValue
Returns the hash code value for this BooleanValue.
hashCode() - Method in interface com.sun.jdi.LocalVariable
Returns the hash code value for this LocalVariable.
hashCode() - Method in interface com.sun.jdi.IntegerValue
Returns the hash code value for this IntegerValue.
hashCode() - Method in interface com.sun.jdi.VoidValue
Returns the hash code value for this VoidValue.
hashCode() - Method in interface com.sun.jdi.BooleanValue
Returns the hash code value for this BooleanValue.
hashCode() - Method in interface com.sun.jdi.CharValue
Returns the hash code value for this CharValue.
hashCode() - Method in interface com.sun.jdi.FloatValue
Returns the hash code value for this FloatValue.

I

IllegalConnectorArgumentsException - exception com.sun.jdi.connect.IllegalConnectorArgumentsException.
Thrown to indicate an invalid argument or inconsistent passed to a Connector.
IllegalConnectorArgumentsException(String, List) - Constructor for class com.sun.jdi.connect.IllegalConnectorArgumentsException
IllegalConnectorArgumentsException(String, String) - Constructor for class com.sun.jdi.connect.IllegalConnectorArgumentsException
implementors() - Method in interface com.sun.jdi.InterfaceType
Gets the currently prepared classes which directly implement this interface.
IncompatibleThreadStateException - exception com.sun.jdi.IncompatibleThreadStateException.
Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
IncompatibleThreadStateException() - Constructor for class com.sun.jdi.IncompatibleThreadStateException
IncompatibleThreadStateException(String) - Constructor for class com.sun.jdi.IncompatibleThreadStateException
InconsistentDebugInfoException - exception com.sun.jdi.InconsistentDebugInfoException.
Thrown to indicate that there is an inconistency in the debug information provided by the target VM.
InconsistentDebugInfoException() - Constructor for class com.sun.jdi.InconsistentDebugInfoException
InconsistentDebugInfoException(String) - Constructor for class com.sun.jdi.InconsistentDebugInfoException
IntegerType - interface com.sun.jdi.IntegerType.
The type of all primitive int values accessed in the target VM.
IntegerValue - interface com.sun.jdi.IntegerValue.
Provides access to a primitive int value in the target VM.
interfaces() - Method in interface com.sun.jdi.ClassType
Gets the interfaces directly implemented by this class.
InterfaceType - interface com.sun.jdi.InterfaceType.
A mirror of an interface in the target VM.
InternalException - exception com.sun.jdi.InternalException.
Thrown to indicate that an unexpected internal error has occurred.
InternalException() - Constructor for class com.sun.jdi.InternalException
InternalException(int) - Constructor for class com.sun.jdi.InternalException
InternalException(String) - Constructor for class com.sun.jdi.InternalException
InternalException(String, int) - Constructor for class com.sun.jdi.InternalException
interrupt() - Method in interface com.sun.jdi.ThreadReference
Interrupts this thread.
intValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to an IntegerValue and returns the result as an int.
intValue() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Return the value of the argument as a int.
InvalidCodeIndexException - exception com.sun.jdi.InvalidCodeIndexException.
Thrown to indicate that the requested operation cannot be completed because the specified code index is not valid.
InvalidCodeIndexException() - Constructor for class com.sun.jdi.InvalidCodeIndexException
InvalidCodeIndexException(String) - Constructor for class com.sun.jdi.InvalidCodeIndexException
InvalidLineNumberException - exception com.sun.jdi.InvalidLineNumberException.
Thrown to indicate that the requested operation cannot be completed because the specified line number is not valid.
InvalidLineNumberException() - Constructor for class com.sun.jdi.InvalidLineNumberException
InvalidLineNumberException(String) - Constructor for class com.sun.jdi.InvalidLineNumberException
InvalidRequestStateException - exception com.sun.jdi.request.InvalidRequestStateException.
Thrown to indicate that the requested event cannot be modified because it is enabled.
InvalidRequestStateException() - Constructor for class com.sun.jdi.request.InvalidRequestStateException
InvalidRequestStateException(String) - Constructor for class com.sun.jdi.request.InvalidRequestStateException
InvalidStackFrameException - exception com.sun.jdi.InvalidStackFrameException.
Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.
InvalidStackFrameException() - Constructor for class com.sun.jdi.InvalidStackFrameException
InvalidStackFrameException(String) - Constructor for class com.sun.jdi.InvalidStackFrameException
InvalidTypeException - exception com.sun.jdi.InvalidTypeException.
Thrown to indicate a type mismatch in setting the value of a field or variable.
InvalidTypeException() - Constructor for class com.sun.jdi.InvalidTypeException
InvalidTypeException(String) - Constructor for class com.sun.jdi.InvalidTypeException
InvocationException - exception com.sun.jdi.InvocationException.
Thrown to indicate an exception occurred in an invoked method within the target VM.
InvocationException(ObjectReference) - Constructor for class com.sun.jdi.InvocationException
INVOKE_NONVIRTUAL - Static variable in interface com.sun.jdi.ObjectReference
Perform non-virtual method invocation
INVOKE_SINGLE_THREADED - Static variable in interface com.sun.jdi.ObjectReference
Perform method invocation with only the invoking thread resumed
INVOKE_SINGLE_THREADED - Static variable in interface com.sun.jdi.ClassType
Perform method invocation with only the invoking thread resumed
invokeMethod(ThreadReference, Method, List, int) - Method in interface com.sun.jdi.ObjectReference
Invokes the specified Method on this object in the target VM.
invokeMethod(ThreadReference, Method, List, int) - Method in interface com.sun.jdi.ClassType
Invokes the specified static Method in the target VM.
isAbstract() - Method in interface com.sun.jdi.Method
Determine if this method is abstract.
isAbstract() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared abstract.
isArgument() - Method in interface com.sun.jdi.LocalVariable
Determines if this variable is an argument to its method.
isAtBreakpoint() - Method in interface com.sun.jdi.ThreadReference
Determines whether the thread is suspended at a breakpoint.
isCollected() - Method in interface com.sun.jdi.ObjectReference
Determines if this object has been garbage collected in the target VM.
isConstructor() - Method in interface com.sun.jdi.Method
Determine if this method is a constructor.
isEnabled() - Method in interface com.sun.jdi.request.EventRequest
Determines if this event request is currently enabled.
isFinal() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is final.
isFinal() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared final.
isInitialized() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been initialized.
isNative() - Method in interface com.sun.jdi.Method
Determine if this method is native.
isPackagePrivate() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a package private item.
isPrepared() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been prepared.
isPrivate() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a private item.
isProtected() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a protected item.
isPublic() - Method in interface com.sun.jdi.Accessible
Determines if this object mirrors a public item.
isStatic() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is static.
isStatic() - Method in interface com.sun.jdi.ReferenceType
Determines if this type was declared static.
isStaticInitializer() - Method in interface com.sun.jdi.Method
Determine if this method is a static initializer.
isSuspended() - Method in interface com.sun.jdi.ThreadReference
Determines whether the thread has been suspended by the the debugger.
isSynchronized() - Method in interface com.sun.jdi.Method
Determine if this method is synchronized.
isSynthetic() - Method in interface com.sun.jdi.TypeComponent
Determines if this TypeComponent is synthetic.
isTransient() - Method in interface com.sun.jdi.Field
Determine if this is a transient field.
isValid(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.Argument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.StringArgument
Performs basic sanity check of argument.
isValid(String) - Method in interface com.sun.jdi.connect.Connector.SelectedArgument
Performs basic sanity check of argument.
isVerified() - Method in interface com.sun.jdi.ReferenceType
Determines if this type has been verified.
isVisible(StackFrame) - Method in interface com.sun.jdi.LocalVariable
Determines whether this variable can be accessed from the given StackFrame.
isVolatile() - Method in interface com.sun.jdi.Field
Determine if this is a volatile field.

L

label() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a short human-readable label for this argument.
launch(Map) - Method in interface com.sun.jdi.connect.LaunchingConnector
Launches an application and connects to its VM.
LaunchingConnector - interface com.sun.jdi.connect.LaunchingConnector.
A connector which can launch a target VM before connecting to it.
launchingConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known LaunchingConnector objects.
length() - Method in interface com.sun.jdi.ArrayReference
Returns the number of components in this array.
lineNumber() - Method in interface com.sun.jdi.Location
The line number of this Location.
ListeningConnector - interface com.sun.jdi.connect.ListeningConnector.
A connector which listens for a connection initiated by a target VM.
listeningConnectors() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the list of known ListeningConnector objects.
LocalVariable - interface com.sun.jdi.LocalVariable.
A local variable in the target VM.
Locatable - interface com.sun.jdi.Locatable.
A mirror that has a Location.
LocatableEvent - interface com.sun.jdi.event.LocatableEvent.
Abstract superinterface of events which have both location and thread.
Location - interface com.sun.jdi.Location.
A point within the executing code of the target VM.
location() - Method in interface com.sun.jdi.StackFrame
Returns the Location of the current instruction in the frame.
location() - Method in interface com.sun.jdi.Locatable
Returns the Location of this mirror, if there is executable Java language code associated with it.
location() - Method in interface com.sun.jdi.request.BreakpointRequest
Returns the location of the requested breakpoint.
locationOfCodeIndex(long) - Method in interface com.sun.jdi.Method
Returns a Location for the given code index.
locationsOfLine(int) - Method in interface com.sun.jdi.Method
Returns a list containing each Location that maps to the given line.
locationsOfLine(int) - Method in interface com.sun.jdi.ReferenceType
Returns a List filled with all Location objects that map to the given line number.
LongType - interface com.sun.jdi.LongType.
The type of all primitive long values accessed in the target VM.
LongValue - interface com.sun.jdi.LongValue.
Provides access to a primitive long value in the target VM.
longValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a LongValue and returns the result as a long.

M

majorInterfaceVersion() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the major version number of the JDI interface.
max() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
The upper bound for the value.
Method - interface com.sun.jdi.Method.
A static or instance method in the target VM.
method() - Method in interface com.sun.jdi.Location
Gets the method, if any, containing this Location.
method() - Method in interface com.sun.jdi.event.MethodExitEvent
Returns the method that was exited.
method() - Method in interface com.sun.jdi.event.MethodEntryEvent
Returns the method that was entered.
MethodEntryEvent - interface com.sun.jdi.event.MethodEntryEvent.
Notification of a method invocation in the target VM.
MethodEntryRequest - interface com.sun.jdi.request.MethodEntryRequest.
Request for notification when a method is invoked in the target VM.
methodEntryRequests() - Method in interface com.sun.jdi.request.EventRequestManager
MethodExitEvent - interface com.sun.jdi.event.MethodExitEvent.
Notification of a method return in the target VM.
MethodExitRequest - interface com.sun.jdi.request.MethodExitRequest.
Request for notification when a method returns in the target VM.
methodExitRequests() - Method in interface com.sun.jdi.request.EventRequestManager
methods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared directly in this type.
methodsByName(String) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing each visible Method that has the given name.
methodsByName(String, String) - Method in interface com.sun.jdi.ReferenceType
Returns a List containing each visible Method that has the given name and signature.
min() - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
The lower bound for the value.
minorInterfaceVersion() - Method in interface com.sun.jdi.VirtualMachineManager
Returns the minor version number of the JDI interface.
Mirror - interface com.sun.jdi.Mirror.
A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
mirrorOf(boolean) - Method in interface com.sun.jdi.VirtualMachine
Creates a BooleanValue for the given value.
mirrorOf(byte) - Method in interface com.sun.jdi.VirtualMachine
Creates a ByteValue for the given value.
mirrorOf(char) - Method in interface com.sun.jdi.VirtualMachine
Creates a CharValue for the given value.
mirrorOf(double) - Method in interface com.sun.jdi.VirtualMachine
Creates a DoubleValue for the given value.
mirrorOf(float) - Method in interface com.sun.jdi.VirtualMachine
Creates a FloatValue for the given value.
mirrorOf(int) - Method in interface com.sun.jdi.VirtualMachine
Creates an IntegerValue for the given value.
mirrorOf(long) - Method in interface com.sun.jdi.VirtualMachine
Creates a LongValue for the given value.
mirrorOf(short) - Method in interface com.sun.jdi.VirtualMachine
Creates a ShortValue for the given value.
mirrorOf(String) - Method in interface com.sun.jdi.VirtualMachine
Creates a string in this virtual machine.
ModificationWatchpointEvent - interface com.sun.jdi.event.ModificationWatchpointEvent.
Notification of a field modification in the target VM.
ModificationWatchpointRequest - interface com.sun.jdi.request.ModificationWatchpointRequest.
Request for notification when the contents of a field are accessed in the target VM.
modificationWatchpointRequests() - Method in interface com.sun.jdi.request.EventRequestManager
modifiers() - Method in interface com.sun.jdi.Accessible
Returns the Java language modifiers, encoded in an integer.
mustSpecify() - Method in interface com.sun.jdi.connect.Connector.Argument
Indicates whether the argument must be specified.

N

name() - Method in interface com.sun.jdi.TypeComponent
Gets the name of this type component.
name() - Method in interface com.sun.jdi.ThreadReference
Returns the name of this thread.
name() - Method in interface com.sun.jdi.ThreadGroupReference
Returns the name of this thread group.
name() - Method in interface com.sun.jdi.ReferenceType
Gets the fully qualified name of this type.
name() - Method in interface com.sun.jdi.LocalVariable
Gets the name of the local variable.
name() - Method in interface com.sun.jdi.Type
name() - Method in interface com.sun.jdi.VirtualMachine
Returns the name of the target VM as reported by the property java.vm.name.
name() - Method in interface com.sun.jdi.connect.Connector
Returns a short identifier for the connector.
name() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns a short, unique identifier for the argument.
name() - Method in interface com.sun.jdi.connect.Transport
Returns a short identifier for the transport.
NativeMethodException - exception com.sun.jdi.NativeMethodException.
Thrown to indicate an operation cannot be completed because it is not valid for a native method.
NativeMethodException() - Constructor for class com.sun.jdi.NativeMethodException
NativeMethodException(String) - Constructor for class com.sun.jdi.NativeMethodException
nestedTypes() - Method in interface com.sun.jdi.ReferenceType
Returns a List containing each ReferenceType declared within this type.
newInstance(int) - Method in interface com.sun.jdi.ArrayType
Creates a new instance of this array class in the target VM.
newInstance(ThreadReference, Method, List, int) - Method in interface com.sun.jdi.ClassType
Constructs a new instance of this type, using the given constructor Method in the target VM.
nextEvent() - Method in interface com.sun.jdi.event.EventIterator
notifyCaught() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns whether caught exceptions of the requested type will generate events when they are thrown.
notifyUncaught() - Method in interface com.sun.jdi.request.ExceptionRequest
Returns whether uncaught exceptions of the requested type will generate events when they are thrown.

O

object() - Method in interface com.sun.jdi.event.WatchpointEvent
Returns the object whose field is about to be accessed/modified.
ObjectCollectedException - exception com.sun.jdi.ObjectCollectedException.
Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.
ObjectCollectedException() - Constructor for class com.sun.jdi.ObjectCollectedException
ObjectCollectedException(String) - Constructor for class com.sun.jdi.ObjectCollectedException
ObjectReference - interface com.sun.jdi.ObjectReference.
An object that currently exists in the target VM.
ownedMonitors() - Method in interface com.sun.jdi.ThreadReference
Returns a List containing an ObjectReference for each monitor owned by the thread.
owningThread() - Method in interface com.sun.jdi.ObjectReference
Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.

P

parent() - Method in interface com.sun.jdi.ThreadGroupReference
Returns the parent of this thread group.
PathSearchingVirtualMachine - interface com.sun.jdi.PathSearchingVirtualMachine.
A virtual machine which searches for classes through paths
PrimitiveType - interface com.sun.jdi.PrimitiveType.
The type associated with non-object values in a target VM.
PrimitiveValue - interface com.sun.jdi.PrimitiveValue.
The value assigned to a field or variable of primitive type in a target VM.
process() - Method in interface com.sun.jdi.VirtualMachine
Returns the Process object for this virtual machine if launched by a LaunchingConnector
process() - Method in class com.sun.jdi.connect.VMStartException
putProperty(Object, Object) - Method in interface com.sun.jdi.request.EventRequest
Add an arbitrary key/value "property" to this request.

R

ReferenceType - interface com.sun.jdi.ReferenceType.
The type of an object in a target VM.
referenceType() - Method in interface com.sun.jdi.ObjectReference
Gets the ReferenceType that mirrors the type of this object.
referenceType() - Method in interface com.sun.jdi.event.ClassPrepareEvent
Returns the reference type for which this event was generated.
reflectedType() - Method in interface com.sun.jdi.ClassObjectReference
Returns the ReferenceType corresponding to this class object.
remove() - Method in interface com.sun.jdi.event.EventQueue
Waits forever for the next available event.
remove(long) - Method in interface com.sun.jdi.event.EventQueue
Waits a specified time for the next available event.
request() - Method in interface com.sun.jdi.event.Event
resume() - Method in interface com.sun.jdi.ThreadReference
Resumes this thread.
resume() - Method in interface com.sun.jdi.ThreadGroupReference
Resumes all threads in this thread group.
resume() - Method in interface com.sun.jdi.VirtualMachine
Continues the execution of the application running in this virtual machine.
resume() - Method in interface com.sun.jdi.event.EventSet
returnType() - Method in interface com.sun.jdi.Method
Returns the return type of the this Method.
returnTypeName() - Method in interface com.sun.jdi.Method
Returns a text representation of the declared return type of this method.

S

setDebugTraceMode(int) - Method in interface com.sun.jdi.VirtualMachine
Traces the activities performed by the com.sun.jdi implementation.
setEnabled(boolean) - Method in interface com.sun.jdi.request.EventRequest
Enables or disables this event request.
setSuspendPolicy(int) - Method in interface com.sun.jdi.request.EventRequest
Determines the threads to suspend when the requested event occurs in the target VM.
setValue(boolean) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Sets the value of the argument.
setValue(Field, Value) - Method in interface com.sun.jdi.ObjectReference
Sets the value of a given instance or static field in this object.
setValue(Field, Value) - Method in interface com.sun.jdi.ClassType
Assigns a value to a static field.
setValue(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Sets the value of the argument.
setValue(int, Value) - Method in interface com.sun.jdi.ArrayReference
Replaces an array component with another value.
setValue(LocalVariable, Value) - Method in interface com.sun.jdi.StackFrame
Sets the Value of a LocalVariable in this frame.
setValue(String) - Method in interface com.sun.jdi.connect.Connector.Argument
Sets the value of the argument.
setValues(int, List, int, int) - Method in interface com.sun.jdi.ArrayReference
Replaces a range of array components with other values.
setValues(List) - Method in interface com.sun.jdi.ArrayReference
Replaces all array components with other values.
ShortType - interface com.sun.jdi.ShortType.
The type of all primitive short values accessed in the target VM.
ShortValue - interface com.sun.jdi.ShortValue.
Provides access to a primitive short value in the target VM.
shortValue() - Method in interface com.sun.jdi.PrimitiveValue
Converts this value to a ShortValue and returns the result as a short.
signature() - Method in interface com.sun.jdi.TypeComponent
Gets the JNI-style signature for this type component.
signature() - Method in interface com.sun.jdi.LocalVariable
Gets the JNI signature of the local variable.
signature() - Method in interface com.sun.jdi.Type
Returns the JNI-style signature for this type.
size() - Method in interface com.sun.jdi.request.StepRequest
sourceName() - Method in interface com.sun.jdi.Location
Gets an identifing name for the source corresponding to this location.
sourceName() - Method in interface com.sun.jdi.ReferenceType
Gets an identifing name for the source corresponding to the declaration of this type.
StackFrame - interface com.sun.jdi.StackFrame.
The state of one method invocation on a thread's call stack.
startListening(Map) - Method in interface com.sun.jdi.connect.ListeningConnector
Listens for one or more connections initiated by target VMs.
status() - Method in interface com.sun.jdi.ThreadReference
Returns the thread's status.
STEP_INTO - Static variable in interface com.sun.jdi.request.StepRequest
Step into any newly pushed frames
STEP_LINE - Static variable in interface com.sun.jdi.request.StepRequest
Step to the next location on a different line
STEP_MIN - Static variable in interface com.sun.jdi.request.StepRequest
Step to the next available location
STEP_OUT - Static variable in interface com.sun.jdi.request.StepRequest
Step out of the current frame
STEP_OVER - Static variable in interface com.sun.jdi.request.StepRequest
Step over any newly pushed frames
StepEvent - interface com.sun.jdi.event.StepEvent.
Notification of step completion in the target VM.
StepRequest - interface com.sun.jdi.request.StepRequest.
Request for notification when a step occurs in the target VM.
stepRequests() - Method in interface com.sun.jdi.request.EventRequestManager
stop(ObjectReference) - Method in interface com.sun.jdi.ThreadReference
Stops this thread with an asynchronous exception.
stopListening(Map) - Method in interface com.sun.jdi.connect.ListeningConnector
Cancels listening for connections.
StringReference - interface com.sun.jdi.StringReference.
A string object from the target VM.
stringValueOf(boolean) - Method in interface com.sun.jdi.connect.Connector.BooleanArgument
Return the string representation of the value parameter.
stringValueOf(int) - Method in interface com.sun.jdi.connect.Connector.IntegerArgument
Return the string representation of the value parameter.
subclasses() - Method in interface com.sun.jdi.ClassType
Gets the currently loaded, direct subclasses of this class.
subinterfaces() - Method in interface com.sun.jdi.InterfaceType
Gets the currently prepared interfaces which directly extend this interface.
superclass() - Method in interface com.sun.jdi.ClassType
Gets the superclass of this class.
superinterfaces() - Method in interface com.sun.jdi.InterfaceType
Gets the interfaces directly extended by this interface.
supportsMultipleConnections() - Method in interface com.sun.jdi.connect.ListeningConnector
Indicates whether this listening connector supports multiple connections for a single argument map.
SUSPEND_ALL - Static variable in interface com.sun.jdi.request.EventRequest
Suspend all threads when the event occurs
SUSPEND_EVENT_THREAD - Static variable in interface com.sun.jdi.request.EventRequest
Suspend only the thread which generated the event when the event occurs
SUSPEND_NONE - Static variable in interface com.sun.jdi.request.EventRequest
Suspend no threads when the event occurs
suspend() - Method in interface com.sun.jdi.ThreadReference
Suspends this thread.
suspend() - Method in interface com.sun.jdi.ThreadGroupReference
Suspends all threads in this thread group.
suspend() - Method in interface com.sun.jdi.VirtualMachine
Suspends the execution of the application running in this virtual machine.
suspendCount() - Method in interface com.sun.jdi.ThreadReference
Resumes the number of pending suspends for this thread.
suspendPolicy() - Method in interface com.sun.jdi.event.EventSet
Returns the policy used to suspend threads in the target VM for this event set.
suspendPolicy() - Method in interface com.sun.jdi.request.EventRequest
Returns a value which describes the threads to suspend when the requested event occurs in the target VM.

T

thisObject() - Method in interface com.sun.jdi.StackFrame
Returns the value of 'this' for the current frame.
THREAD_STATUS_MONITOR - Static variable in interface com.sun.jdi.ThreadReference
Thread is waiting on a java monitor
THREAD_STATUS_NOT_STARTED - Static variable in interface com.sun.jdi.ThreadReference
Thread has not yet been started
THREAD_STATUS_RUNNING - Static variable in interface com.sun.jdi.ThreadReference
Thread is runnable
THREAD_STATUS_SLEEPING - Static variable in interface com.sun.jdi.ThreadReference
Thread is sleeping - Thread.sleep() or JVM_Sleep() was called
THREAD_STATUS_UNKNOWN - Static variable in interface com.sun.jdi.ThreadReference
Thread status is unknown
THREAD_STATUS_WAIT - Static variable in interface com.sun.jdi.ThreadReference
Thread is waiting - Thread.wait() or JVM_MonitorWait() was called
THREAD_STATUS_ZOMBIE - Static variable in interface com.sun.jdi.ThreadReference
Thread has completed execution
thread() - Method in interface com.sun.jdi.StackFrame
Returns the thread under which this frame's method is running.
thread() - Method in interface com.sun.jdi.event.LocatableEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.ThreadDeathEvent
Returns the thread which is terminating.
thread() - Method in interface com.sun.jdi.event.ClassPrepareEvent
Returns the thread in which this event has occurred.
thread() - Method in interface com.sun.jdi.event.ThreadStartEvent
Returns the thread which has started.
thread() - Method in interface com.sun.jdi.event.VMStartEvent
Returns the initial thread of the VM which has started.
thread() - Method in interface com.sun.jdi.request.StepRequest
ThreadDeathEvent - interface com.sun.jdi.event.ThreadDeathEvent.
Notification of a completed thread in the target VM.
ThreadDeathRequest - interface com.sun.jdi.request.ThreadDeathRequest.
Request for notification when a thread terminates in the target VM.
threadDeathRequests() - Method in interface com.sun.jdi.request.EventRequestManager
threadGroup() - Method in interface com.sun.jdi.ThreadReference
Returns this thread's thread group.
ThreadGroupReference - interface com.sun.jdi.ThreadGroupReference.
A thread group object from the target VM.
threadGroups() - Method in interface com.sun.jdi.ThreadGroupReference
Returns a List containing each ThreadGroupReference in this thread group.
ThreadReference - interface com.sun.jdi.ThreadReference.
A thread object from the target VM.
threads() - Method in interface com.sun.jdi.ThreadGroupReference
Returns a List containing each ThreadReference in this thread group.
ThreadStartEvent - interface com.sun.jdi.event.ThreadStartEvent.
Notification of a new running thread in the target VM.
ThreadStartRequest - interface com.sun.jdi.request.ThreadStartRequest.
Request for notification when a thread starts execution in the target VM.
threadStartRequests() - Method in interface com.sun.jdi.request.EventRequestManager
topLevelThreadGroups() - Method in interface com.sun.jdi.VirtualMachine
Returns each thread group which does not have a parent.
toString() - Method in interface com.sun.jdi.Mirror
Returns a String describing this mirror
TRACE_ALL - Static variable in interface com.sun.jdi.VirtualMachine
All tracing is enabled.
TRACE_EVENTS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal event handling.
TRACE_NONE - Static variable in interface com.sun.jdi.VirtualMachine
All tracing is disabled.
TRACE_OBJREFS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal management of object references.
TRACE_RECEIVES - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for JDWP packets received from target VM.
TRACE_REFTYPES - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for internal managment of reference types.
TRACE_SENDS - Static variable in interface com.sun.jdi.VirtualMachine
Tracing enabled for JDWP packets sent to target VM.
Transport - interface com.sun.jdi.connect.Transport.
A method of communication between a debugger and a target VM.
transport() - Method in interface com.sun.jdi.connect.Connector
Returns the transport mechanism used by this connector to establish connections with a target VM.
Type - interface com.sun.jdi.Type.
The type of a Value retrieved from the target VM.
type() - Method in interface com.sun.jdi.Field
Returns the type of the this Field.
type() - Method in interface com.sun.jdi.Value
type() - Method in interface com.sun.jdi.LocalVariable
Returns the type of the this LocalVariable.
TypeComponent - interface com.sun.jdi.TypeComponent.
An entity declared within a user defined type (class or interface).
typeName() - Method in interface com.sun.jdi.Field
Returns a text representation of the declared type.
typeName() - Method in interface com.sun.jdi.LocalVariable

U

uniqueID() - Method in interface com.sun.jdi.ObjectReference
Returns a unique identifier for this ObjectReference.

V

Value - interface com.sun.jdi.Value.
The value assigned to a field or variable at some point during the execution of the target VM.
value() - Method in interface com.sun.jdi.ShortValue
Returns this ShortValue as a short.
value() - Method in interface com.sun.jdi.DoubleValue
Returns this DoubleValue as a boolean.
value() - Method in interface com.sun.jdi.StringReference
Returns the StringReference as a String.
value() - Method in interface com.sun.jdi.LongValue
Returns this LongValue as a long.
value() - Method in interface com.sun.jdi.ByteValue
Returns this ByteValue as a boolean.
value() - Method in interface com.sun.jdi.IntegerValue
Returns this IntegerValue as an int.
value() - Method in interface com.sun.jdi.BooleanValue
Returns this BooleanValue as a boolean.
value() - Method in interface com.sun.jdi.CharValue
Returns this CharValue as a boolean.
value() - Method in interface com.sun.jdi.FloatValue
Returns this FloatValue as a float.
value() - Method in interface com.sun.jdi.connect.Connector.Argument
Returns the current value of the argument.
valueCurrent() - Method in interface com.sun.jdi.event.WatchpointEvent
Current value of the field.
valueToBe() - Method in interface com.sun.jdi.event.ModificationWatchpointEvent
Value that will be assigned to the field when the instruction completes.
variables() - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable declared in this method.
variablesByName(String) - Method in interface com.sun.jdi.Method
Returns a list containing each LocalVariable of a given name in this method.
version() - Method in interface com.sun.jdi.VirtualMachine
Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version.
VirtualMachine - interface com.sun.jdi.VirtualMachine.
A virtual machine targeted for debugging.
virtualMachine() - Method in interface com.sun.jdi.Mirror
Gets the VirtualMachine to which this Mirror belongs.
VirtualMachineManager - interface com.sun.jdi.VirtualMachineManager.
A manager of connections to target virtual machines.
virtualMachineManager() - Static method in class com.sun.jdi.Bootstrap
visibleClasses() - Method in interface com.sun.jdi.ClassLoaderReference
Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM.
visibleFields() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each unhidden and unambiguous Field in this type.
visibleMethods() - Method in interface com.sun.jdi.ReferenceType
Returns a list containing each Method declared or inherited by this type.
visibleVariableByName(String) - Method in interface com.sun.jdi.StackFrame
Finds a LocalVariable that matches the given name and is visible at the current frame location.
visibleVariables() - Method in interface com.sun.jdi.StackFrame
Returns a list containing each LocalVariable that can be accessed from this frame's location.
VMDeathEvent - interface com.sun.jdi.event.VMDeathEvent.
Notification of target VM termination.
VMDisconnectedException - exception com.sun.jdi.VMDisconnectedException.
Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.
VMDisconnectedException() - Constructor for class com.sun.jdi.VMDisconnectedException
VMDisconnectedException(String) - Constructor for class com.sun.jdi.VMDisconnectedException
VMDisconnectEvent - interface com.sun.jdi.event.VMDisconnectEvent.
Notification of disconnection from target VM.
VMMismatchException - exception com.sun.jdi.VMMismatchException.
Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.
VMMismatchException() - Constructor for class com.sun.jdi.VMMismatchException
VMMismatchException(String) - Constructor for class com.sun.jdi.VMMismatchException
VMOutOfMemoryException - exception com.sun.jdi.VMOutOfMemoryException.
Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.
VMOutOfMemoryException() - Constructor for class com.sun.jdi.VMOutOfMemoryException
VMOutOfMemoryException(String) - Constructor for class com.sun.jdi.VMOutOfMemoryException
VMStartEvent - interface com.sun.jdi.event.VMStartEvent.
Notification of initialization of a target VM.
VMStartException - exception com.sun.jdi.connect.VMStartException.
A target VM was successfully launched, but terminated with an error before a connection could be established.
VMStartException(Process) - Constructor for class com.sun.jdi.connect.VMStartException
VMStartException(String, Process) - Constructor for class com.sun.jdi.connect.VMStartException
VoidType - interface com.sun.jdi.VoidType.
The type of all primitive void values accessed in the target VM.
VoidValue - interface com.sun.jdi.VoidValue.
Provides access to a primitive void value in the target VM.

W

waitingThreads() - Method in interface com.sun.jdi.ObjectReference
Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
WatchpointEvent - interface com.sun.jdi.event.WatchpointEvent.
Notification of a field triggered event encountered by a thread in the target VM.
WatchpointRequest - interface com.sun.jdi.request.WatchpointRequest.
Identifies a Field in the target VM being watched.
A B C D E F G H I L M N O P R S T U V W
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Overview

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

JavaTM Debug Interface

The JavaTM Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similiar systems needing access to the running state of a (usually remote) virtual machine.

See:
Description

Packages
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect | This package defines connections between the virtual machine using the JDI and the target virtual machine.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

The JavaTM Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similiar systems needing access to the running state of a (usually remote) virtual machine.

The JDI provides introspective access to a running virtual machine's state, Class, Array, Interface, and primitive types, and instances of those types.

The JDI also provides explicit control over a virtual machine's execution. The ability to suspend and resume threads, and to set breakpoints, watchpoints, ... Notification of exceptions, class loading, thread creation... The ability to inspect a suspended threads state, local variables, stack backtrace...

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Serialized Form

Package com.sun.jdi

Class com.sun.jdi.AbsentInformationException implements Serializable

Class com.sun.jdi.ClassNotLoadedException implements Serializable

Serialized Fields

className

String className

Class com.sun.jdi.ClassNotPreparedException implements Serializable

Class com.sun.jdi.IncompatibleThreadStateException implements Serializable

Class com.sun.jdi.InconsistentDebugInfoException implements Serializable

Class com.sun.jdi.InternalException implements Serializable

Serialized Fields

errorCode

int errorCode

Class com.sun.jdi.InvalidCodeIndexException implements Serializable

Class com.sun.jdi.InvalidLineNumberException implements Serializable

Class com.sun.jdi.InvalidStackFrameException implements Serializable

Class com.sun.jdi.InvalidTypeException implements Serializable

Class com.sun.jdi.InvocationException implements Serializable

Serialized Fields

exception

ObjectReference exception

Class com.sun.jdi.NativeMethodException implements Serializable

Class com.sun.jdi.ObjectCollectedException implements Serializable

Class com.sun.jdi.VMDisconnectedException implements Serializable

Class com.sun.jdi.VMMismatchException implements Serializable

Class com.sun.jdi.VMOutOfMemoryException implements Serializable

Package com.sun.jdi.connect

Class com.sun.jdi.connect.IllegalConnectorArgumentsException implements Serializable

Serialized Fields

names

List names

Class com.sun.jdi.connect.VMStartException implements Serializable

Serialized Fields

process

Process process

Package com.sun.jdi.request

Class com.sun.jdi.request.DuplicateRequestException implements Serializable

Class com.sun.jdi.request.InvalidRequestStateException implements Serializable

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


BooleanType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface BooleanType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface BooleanType
extends PrimitiveType

The type of all primitive boolean values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
BooleanValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ByteType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface ByteType
extends PrimitiveType

The type of all primitive byte values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
ByteValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface CharType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface CharType
extends PrimitiveType

The type of all primitive char values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
CharValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


com.sun.jdi Class Hierarchy

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.jdi

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class com.sun.jdi.Bootstrap
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class com.sun.jdi.AbsentInformationException
        • class com.sun.jdi.ClassNotLoadedException
        • class com.sun.jdi.IncompatibleThreadStateException
        • class com.sun.jdi.InvalidTypeException
        • class com.sun.jdi.InvocationException
        • class java.lang.RuntimeException
          • class com.sun.jdi.ClassNotPreparedException
          • class com.sun.jdi.InconsistentDebugInfoException
          • class com.sun.jdi.InternalException
          • class com.sun.jdi.InvalidCodeIndexException
          • class com.sun.jdi.InvalidLineNumberException
          • class com.sun.jdi.InvalidStackFrameException
          • class com.sun.jdi.NativeMethodException
          • class com.sun.jdi.ObjectCollectedException
          • class com.sun.jdi.VMDisconnectedException
          • class com.sun.jdi.VMMismatchException
          • class com.sun.jdi.VMOutOfMemoryException

Interface Hierarchy

  • interface com.sun.jdi.Accessible
    • interface com.sun.jdi.ReferenceType (also extends java.lang.Comparable, com.sun.jdi.Type)
      • interface com.sun.jdi.ArrayType
      • interface com.sun.jdi.ClassType
      • interface com.sun.jdi.InterfaceType
    • interface com.sun.jdi.TypeComponent (also extends com.sun.jdi.Mirror)
      • interface com.sun.jdi.Field (also extends java.lang.Comparable)
      • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.Locatable)
  • interface java.lang.Comparable
    • interface com.sun.jdi.ByteValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.CharValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.DoubleValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.Field (also extends com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.FloatValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.IntegerValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.LocalVariable (also extends com.sun.jdi.Mirror)
    • interface com.sun.jdi.Location (also extends com.sun.jdi.Mirror)
    • interface com.sun.jdi.LongValue (also extends com.sun.jdi.PrimitiveValue)
    • interface com.sun.jdi.Method (also extends com.sun.jdi.Locatable, com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, com.sun.jdi.Type)
      • interface com.sun.jdi.ArrayType
      • interface com.sun.jdi.ClassType
      • interface com.sun.jdi.InterfaceType
    • interface com.sun.jdi.ShortValue (also extends com.sun.jdi.PrimitiveValue)
  • interface com.sun.jdi.Locatable
    • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.TypeComponent)
    • interface com.sun.jdi.StackFrame (also extends com.sun.jdi.Mirror)
  • interface com.sun.jdi.Mirror
    • interface com.sun.jdi.LocalVariable (also extends java.lang.Comparable)
    • interface com.sun.jdi.Location (also extends java.lang.Comparable)
    • interface com.sun.jdi.StackFrame (also extends com.sun.jdi.Locatable)
    • interface com.sun.jdi.Type
      • interface com.sun.jdi.PrimitiveType
        • interface com.sun.jdi.BooleanType
        • interface com.sun.jdi.ByteType
        • interface com.sun.jdi.CharType
        • interface com.sun.jdi.DoubleType
        • interface com.sun.jdi.FloatType
        • interface com.sun.jdi.IntegerType
        • interface com.sun.jdi.LongType
        • interface com.sun.jdi.ShortType
      • interface com.sun.jdi.ReferenceType (also extends com.sun.jdi.Accessible, java.lang.Comparable)
        • interface com.sun.jdi.ArrayType
        • interface com.sun.jdi.ClassType
        • interface com.sun.jdi.InterfaceType
      • interface com.sun.jdi.VoidType
    • interface com.sun.jdi.TypeComponent (also extends com.sun.jdi.Accessible)
      • interface com.sun.jdi.Field (also extends java.lang.Comparable)
      • interface com.sun.jdi.Method (also extends java.lang.Comparable, com.sun.jdi.Locatable)
    • interface com.sun.jdi.Value
      • interface com.sun.jdi.ObjectReference
        • interface com.sun.jdi.ArrayReference
        • interface com.sun.jdi.ClassLoaderReference
        • interface com.sun.jdi.ClassObjectReference
        • interface com.sun.jdi.StringReference
        • interface com.sun.jdi.ThreadGroupReference
        • interface com.sun.jdi.ThreadReference
      • interface com.sun.jdi.PrimitiveValue
        • interface com.sun.jdi.BooleanValue
        • interface com.sun.jdi.ByteValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.CharValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.DoubleValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.FloatValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.IntegerValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.LongValue (also extends java.lang.Comparable)
        • interface com.sun.jdi.ShortValue (also extends java.lang.Comparable)
      • interface com.sun.jdi.VoidValue
    • interface com.sun.jdi.VirtualMachine
      • interface com.sun.jdi.PathSearchingVirtualMachine
  • interface com.sun.jdi.VirtualMachineManager
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


DoubleType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface DoubleType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface DoubleType
extends PrimitiveType

The type of all primitive double values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
DoubleValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface FloatType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface FloatType
extends PrimitiveType

The type of all primitive float values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
FloatValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntegerType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface IntegerType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface IntegerType
extends PrimitiveType

The type of all primitive int values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
IntegerValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface LongType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface LongType
extends PrimitiveType

The type of all primitive long values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
LongValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package com.sun.jdi

This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

See:
Description

Interface Summary
Accessible | Provides information on the accessibility of a type or type component.
ArrayReference | Provides access to an array object and its components in the target VM.
ArrayType | Provides access to the class of an array and the type of its components in the target VM.
BooleanType | The type of all primitive boolean values accessed in the target VM.
BooleanValue | Provides access to a primitive boolean value in the target VM.
ByteType | The type of all primitive byte values accessed in the target VM.
ByteValue | Provides access to a primitive byte value in the target VM.
CharType | The type of all primitive char values accessed in the target VM.
CharValue | Provides access to a primitive char value in the target VM.
ClassLoaderReference | A class loader object from the target VM.
ClassObjectReference | An instance of java.lang.Class from the target VM.
ClassType | A mirror of a class in the target VM.
DoubleType | The type of all primitive double values accessed in the target VM.
DoubleValue | Provides access to a primitive double value in the target VM.
Field | A static or instance field in the target VM.
FloatType | The type of all primitive float values accessed in the target VM.
FloatValue | Provides access to a primitive float value in the target VM.
IntegerType | The type of all primitive int values accessed in the target VM.
IntegerValue | Provides access to a primitive int value in the target VM.
InterfaceType | A mirror of an interface in the target VM.
LocalVariable | A local variable in the target VM.
Locatable | A mirror that has a Location.
Location | A point within the executing code of the target VM.
LongType | The type of all primitive long values accessed in the target VM.
LongValue | Provides access to a primitive long value in the target VM.
Method | A static or instance method in the target VM.
Mirror | A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
ObjectReference | An object that currently exists in the target VM.
PathSearchingVirtualMachine | A virtual machine which searches for classes through paths
PrimitiveType | The type associated with non-object values in a target VM.
PrimitiveValue | The value assigned to a field or variable of primitive type in a target VM.
ReferenceType | The type of an object in a target VM.
ShortType | The type of all primitive short values accessed in the target VM.
ShortValue | Provides access to a primitive short value in the target VM.
StackFrame | The state of one method invocation on a thread's call stack.
StringReference | A string object from the target VM.
ThreadGroupReference | A thread group object from the target VM.
ThreadReference | A thread object from the target VM.
Type | The type of a Value retrieved from the target VM.
TypeComponent | An entity declared within a user defined type (class or interface).
Value | The value assigned to a field or variable at some point during the execution of the target VM.
VirtualMachine | A virtual machine targeted for debugging.
VirtualMachineManager | A manager of connections to target virtual machines.
VoidType | The type of all primitive void values accessed in the target VM.
VoidValue | Provides access to a primitive void value in the target VM.

Class Summary
Bootstrap Initial class that provides access to the default implementation of JDI interfaces.

Exception Summary
AbsentInformationException | Thrown to indicate line number or variable information is not available.
ClassNotLoadedException | Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
ClassNotPreparedException | Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.
IncompatibleThreadStateException | Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
InconsistentDebugInfoException | Thrown to indicate that there is an inconistency in the debug information provided by the target VM.
InternalException | Thrown to indicate that an unexpected internal error has occurred.
InvalidCodeIndexException | Thrown to indicate that the requested operation cannot be completed because the specified code index is not valid.
InvalidLineNumberException | Thrown to indicate that the requested operation cannot be completed because the specified line number is not valid.
InvalidStackFrameException | Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.
InvalidTypeException | Thrown to indicate a type mismatch in setting the value of a field or variable.
InvocationException | Thrown to indicate an exception occurred in an invoked method within the target VM.
NativeMethodException | Thrown to indicate an operation cannot be completed because it is not valid for a native method.
ObjectCollectedException | Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.
VMDisconnectedException | Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.
VMMismatchException | Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.
VMOutOfMemoryException | Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.

Package com.sun.jdi Description

This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities. VirtualMachine mirrors the target virtual machine and is the origin of all information provided by the JDI. A VirtualMachine is typically created by using the VirtualMachineManager to create a connection to the target virtual machine (see the com.sun.jdi.connect package). In turn the VirtualMachineManager is typically created by calling Bootstrap.virtualMachineManager().

Most of the methods within this package can throw the unchecked exception VMDisconnectedException. This will be documented with more specificity in future releases.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


PrimitiveType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface PrimitiveType

All Superinterfaces:
Mirror, Type
All Known Subinterfaces:
BooleanType, ByteType, CharType, DoubleType, FloatType, IntegerType, LongType, ShortType
public interface PrimitiveType
extends Type

The type associated with non-object values in a target VM. Instances of one of the sub-interfaces of this interface will be returned from Value.type() for all PrimitiveValue objects.

Since:
1.3
See Also:
PrimitiveValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ShortType

All Superinterfaces:
Mirror, PrimitiveType, Type
public interface ShortType
extends PrimitiveType

The type of all primitive short values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
LongValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package com.sun.jdi

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Package
com.sun.jdi

Packages that use com.sun.jdi
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect | This package defines connections between the virtual machine using the JDI and the target virtual machine.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Classes in com.sun.jdi used by com.sun.jdi
AbsentInformationException
Thrown to indicate line number or variable information is not available.
Accessible
Provides information on the accessibility of a type or type component.
ArrayReference
Provides access to an array object and its components in the target VM.
BooleanValue
Provides access to a primitive boolean value in the target VM.
ByteValue
Provides access to a primitive byte value in the target VM.
CharValue
Provides access to a primitive char value in the target VM.
ClassLoaderReference
A class loader object from the target VM.
ClassNotLoadedException
Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.
ClassObjectReference
An instance of java.lang.Class from the target VM.
ClassType
A mirror of a class in the target VM.
DoubleValue
Provides access to a primitive double value in the target VM.
Field
A static or instance field in the target VM.
FloatValue
Provides access to a primitive float value in the target VM.
IncompatibleThreadStateException
Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.
IntegerValue
Provides access to a primitive int value in the target VM.
InvalidTypeException
Thrown to indicate a type mismatch in setting the value of a field or variable.
InvocationException
Thrown to indicate an exception occurred in an invoked method within the target VM.
LocalVariable
A local variable in the target VM.
Locatable
A mirror that has a Location.
Location
A point within the executing code of the target VM.
LongValue
Provides access to a primitive long value in the target VM.
Method
A static or instance method in the target VM.
Mirror
A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
ObjectReference
An object that currently exists in the target VM.
PrimitiveType
The type associated with non-object values in a target VM.
PrimitiveValue
The value assigned to a field or variable of primitive type in a target VM.
ReferenceType
The type of an object in a target VM.
ShortValue
Provides access to a primitive short value in the target VM.
StackFrame
The state of one method invocation on a thread's call stack.
StringReference
A string object from the target VM.
ThreadGroupReference
A thread group object from the target VM.
ThreadReference
A thread object from the target VM.
Type
The type of a Value retrieved from the target VM.
TypeComponent
An entity declared within a user defined type (class or interface).
Value
The value assigned to a field or variable at some point during the execution of the target VM.
VirtualMachine
A virtual machine targeted for debugging.
VirtualMachineManager
A manager of connections to target virtual machines.

Classes in com.sun.jdi used by com.sun.jdi.connect
VirtualMachine
A virtual machine targeted for debugging.

Classes in com.sun.jdi used by com.sun.jdi.event
Field
A static or instance field in the target VM.
Locatable
A mirror that has a Location.
Location
A point within the executing code of the target VM.
Method
A static or instance method in the target VM.
Mirror
A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
ObjectReference
An object that currently exists in the target VM.
ReferenceType
The type of an object in a target VM.
ThreadReference
A thread object from the target VM.
Value
The value assigned to a field or variable at some point during the execution of the target VM.

Classes in com.sun.jdi used by com.sun.jdi.request
Field
A static or instance field in the target VM.
Locatable
A mirror that has a Location.
Location
A point within the executing code of the target VM.
Mirror
A proxy used by a debugger to examine or manipulate some entity in another virtual machine.
ReferenceType
The type of an object in a target VM.
ThreadReference
A thread object from the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


VoidType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface VoidType

All Superinterfaces:
Mirror, Type
public interface VoidType
extends Type

The type of all primitive void values accessed in the target VM. Calls to Value.type() will return an implementor of this interface.

Since:
1.3
See Also:
VoidValue

Methods inherited from interface com.sun.jdi.Type
name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbsentInformationException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class AbsentInformationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.AbsentInformationException
All Implemented Interfaces:
Serializable
public class AbsentInformationException
extends Exception

Thrown to indicate line number or variable information is not available.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
AbsentInformationException()
AbsentInformationException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AbsentInformationException

public AbsentInformationException()

AbsentInformationException

public AbsentInformationException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Accessible

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Accessible

All Known Subinterfaces:
ArrayType, ClassType, Field, InterfaceType, Method, ReferenceType, TypeComponent
public interface Accessible

Provides information on the accessibility of a type or type component. Mirrors for program elements which allow an an access specifier (private, protected, public) provide information on that part of the declaration through this interface.

Since:
1.3

Method Summary
boolean | isPackagePrivate() Determines if this object mirrors a package private item.
boolean | isPrivate() Determines if this object mirrors a private item.
boolean | isProtected() Determines if this object mirrors a protected item.
boolean | isPublic() Determines if this object mirrors a public item.
int | modifiers() Returns the Java language modifiers, encoded in an integer.

Method Detail

modifiers

public int modifiers()
Returns the Java language modifiers, encoded in an integer.

The modifier encodings are defined in The Java Virtual Machine Specification, table 4.1.

isPrivate

public boolean isPrivate()
Determines if this object mirrors a private item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.
Returns:
true for items with private access; false otherwise.

isPackagePrivate

public boolean isPackagePrivate()
Determines if this object mirrors a package private item. A package private item is declared with no access specifier. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.
Returns:
true for items with package private access; false otherwise.

isProtected

public boolean isProtected()
Determines if this object mirrors a protected item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.
Returns:
true for items with private access; false otherwise.

isPublic

public boolean isPublic()
Determines if this object mirrors a public item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always true. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always true.
Returns:
true for items with public access; false otherwise.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArrayReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ArrayReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface ArrayReference
extends ObjectReference

Provides access to an array object and its components in the target VM. Each array component is mirrored by a Value object. The array components, in aggregate, are placed in List objects instead of arrays for consistency with the rest of the API and for interoperability with other APIs.

Since:
1.3

Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
Value | getValue(int index) Returns an array component value.
List | getValues() Returns all of the components in this array.
List | getValues(int index, int length) Returns a range of array components.
int | length() Returns the number of components in this array.
void | setValue(int index, Value value) Replaces an array component with another value.
void | setValues(int index, List values, int srcIndex, int length) Replaces a range of array components with other values.
void | setValues(List values) Replaces all array components with other values.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

length

public int length()
Returns the number of components in this array.
Returns:
the integer count of components in this array.
Throws:
ObjectCollectedException - if this object has been garbage collected.

getValue

public Value getValue(int index)
Returns an array component value.
Parameters:
index - the index of the component to retrieve
Returns:
the Value at the given index.
Throws:
java.lang.IndexOutOfBoundsException - if the index is beyond the end of this array.
ObjectCollectedException - if this object has been garbage collected.

getValues

public List getValues()
Returns all of the components in this array.
Returns:
a list of Value objects, one for each array component ordered by array index.
Throws:
ObjectCollectedException - if this object has been garbage collected.

getValues

public List getValues(int index,
                      int length)
Returns a range of array components.
Parameters:
index - the index of the first component to retrieve
length - the number of components to retrieve, or -1 to retrieve all components to the end of this array.
Returns:
a list of Value objects, one for each requested array component ordered by array index.
Throws:
java.lang.IndexOutOfBoundsException - if index + length is an index beyond the end of this array.
ObjectCollectedException - if this object has been garbage collected.

setValue

public void setValue(int index,
                     Value value)
              throws InvalidTypeException,
                     ClassNotLoadedException
Replaces an array component with another value.

Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
value - the new value
index - the index of the component to set
Throws:
java.lang.IndexOutOfBoundsException - if index is beyond the end of this array.
InvalidTypeException - if the type value is not compatible with the declared type of array components.
ClassNotLoadedException - if the array component type has not yet been loaded through the appropriate class loader.
ObjectCollectedException - if this object or the new value has been garbage collected.
VMMismatchException - if a Mirror argument and this object do not belong to the same VirtualMachine.

setValues

public void setValues(List values)
               throws InvalidTypeException,
                      ClassNotLoadedException
Replaces all array components with other values. If the given list is larger is size than the array, the values at the end of the list are ignored.

Object values must be assignment compatible with the element type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
values - a list of Value objects to be placed in this array
Throws:
InvalidTypeException - if any of the values is not compatible with the declared type of array components.
java.lang.IndexOutOfBoundsException - if the size of values is larger than the length of this array.
ClassNotLoadedException - if the array component type has not yet been loaded through the appropriate class loader.
ObjectCollectedException - if this object or any of the new values has been garbage collected.
VMMismatchException - if a Mirror argument and this object do not belong to the same VirtualMachine.

setValues

public void setValues(int index,
                      List values,
                      int srcIndex,
                      int length)
               throws InvalidTypeException,
                      ClassNotLoadedException
Replaces a range of array components with other values.

Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
index - the index of the first component to set.
values - a list of Value objects to be placed in this array.
srcIndex - the index of the first source value to to use.
length - the number of components to set, or -1 to set all components to the end of this array.
Throws:
InvalidTypeException - if any element of values is not compatible with the declared type of array components.
java.lang.IndexOutOfBoundsException - if srcIndex + length is beyond the end of this array or if values is smaller inside than the given range.
ObjectCollectedException - if this object or any of the new values has been garbage collected.
VMMismatchException - if a Mirror argument and this object do not belong to the same VirtualMachine.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArrayType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ArrayType

All Superinterfaces:
Accessible, Comparable, Mirror, ReferenceType, Type
public interface ArrayType
extends ReferenceType

Provides access to the class of an array and the type of its components in the target VM.

Since:
1.3
See Also:
ArrayReference

Method Summary
String | componentSignature() Gets the JNI signature of the components of this array class.
Type | componentType() Returns the type of the array components.
String | componentTypeName()
ArrayReference | newInstance(int length) Creates a new instance of this array class in the target VM.
Methods inherited from interface com.sun.jdi.ReferenceType
allFields, allLineLocations, allMethods, classLoader, classObject, equals, failedToInitialize, fieldByName, fields, getValue, getValues, hashCode, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, methods, methodsByName, methodsByName, name, nestedTypes, sourceName, visibleFields, visibleMethods
Methods inherited from interface com.sun.jdi.Type
signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

Method Detail

newInstance

public ArrayReference newInstance(int length)
Creates a new instance of this array class in the target VM. The array is created with the given length and each component is initialized to is standard default value.
Parameters:
length - the number of components in the new array
Returns:
the newly created ArrayReference mirroring the new object in the target VM.
Throws:
ObjectCollectedException - if this array type has been unloaded and garbage collected.

componentSignature

public String componentSignature()
Gets the JNI signature of the components of this array class. The signature describes the declared type of the components. If the components are objects, their actual type in a particular run-time context may be a subclass of the declared class.
Returns:
a string containing the JNI signature of array components.
Throws:
ObjectCollectedException - if this array type has been unloaded and garbage collected.

componentTypeName

public String componentTypeName()
Returns:
a text representation of the component type.
Throws:
ObjectCollectedException - if this array type has been unloaded and garbage collected.

componentType

public Type componentType()
                   throws ClassNotLoadedException
Returns the type of the array components. For primitive arrays, an appropriate PrimitiveType is always returned. For object arrays, the appropriate ReferenceType is returned if it has been loaded through the enclosing type's class loader.
Returns:
the Type of the array's components.
Throws:
ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.
ObjectCollectedException - if this array type has been unloaded and garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface BooleanValue

All Superinterfaces:
Mirror, PrimitiveValue, Value
public interface BooleanValue
extends PrimitiveValue

Provides access to a primitive boolean value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this BooleanValue for equality.
int | hashCode() Returns the hash code value for this BooleanValue.
boolean | value() Returns this BooleanValue as a boolean.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

value

public boolean value()
Returns this BooleanValue as a boolean.
Returns:
the boolean mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this BooleanValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a BooleanValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this BooleanValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bootstrap

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class Bootstrap

java.lang.Object
  |
  +--com.sun.jdi.Bootstrap
public class Bootstrap
extends Object

Initial class that provides access to the default implementation of JDI interfaces. A debugger application uses this class to access the single instance of the VirtualMachineManager interface.

Since:
1.3

Constructor Summary
Bootstrap()
Method Summary
static VirtualMachineManager virtualMachineManager()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Bootstrap

public Bootstrap()
Method Detail

virtualMachineManager

public static VirtualMachineManager virtualMachineManager()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ByteValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ByteValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface ByteValue
extends PrimitiveValue, Comparable

Provides access to a primitive byte value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this ByteValue for equality.
int | hashCode() Returns the hash code value for this BooleanValue.
byte | value() Returns this ByteValue as a boolean.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public byte value()
Returns this ByteValue as a boolean.
Returns:
the byte mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this ByteValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a ByteValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this BooleanValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface CharValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface CharValue
extends PrimitiveValue, Comparable

Provides access to a primitive char value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this CharValue for equality.
int | hashCode() Returns the hash code value for this CharValue.
char | value() Returns this CharValue as a boolean.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public char value()
Returns this CharValue as a boolean.
Returns:
the char mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this CharValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a CharValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this CharValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class com.sun.jdi.Bootstrap

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.Bootstrap

No usage of com.sun.jdi.Bootstrap

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.ClassNotPreparedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.ClassNotPreparedException

No usage of com.sun.jdi.ClassNotPreparedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InconsistentDebugInfoException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InconsistentDebugInfoException

No usage of com.sun.jdi.InconsistentDebugInfoException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InternalException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InternalException

No usage of com.sun.jdi.InternalException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InvalidCodeIndexException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InvalidCodeIndexException

No usage of com.sun.jdi.InvalidCodeIndexException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InvalidLineNumberException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InvalidLineNumberException

No usage of com.sun.jdi.InvalidLineNumberException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InvalidStackFrameException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InvalidStackFrameException

No usage of com.sun.jdi.InvalidStackFrameException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.NativeMethodException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.NativeMethodException

No usage of com.sun.jdi.NativeMethodException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.ObjectCollectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.ObjectCollectedException

No usage of com.sun.jdi.ObjectCollectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.VMDisconnectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.VMDisconnectedException

No usage of com.sun.jdi.VMDisconnectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.VMMismatchException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.VMMismatchException

No usage of com.sun.jdi.VMMismatchException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.VMOutOfMemoryException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.VMOutOfMemoryException

No usage of com.sun.jdi.VMOutOfMemoryException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ArrayType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ArrayType

No usage of com.sun.jdi.ArrayType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.BooleanType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.BooleanType

No usage of com.sun.jdi.BooleanType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ByteType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ByteType

No usage of com.sun.jdi.ByteType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.CharType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.CharType

No usage of com.sun.jdi.CharType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.DoubleType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.DoubleType

No usage of com.sun.jdi.DoubleType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.FloatType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.FloatType

No usage of com.sun.jdi.FloatType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.IntegerType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.IntegerType

No usage of com.sun.jdi.IntegerType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.InterfaceType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.InterfaceType

No usage of com.sun.jdi.InterfaceType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.LongType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.LongType

No usage of com.sun.jdi.LongType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.PathSearchingVirtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.PathSearchingVirtualMachine

No usage of com.sun.jdi.PathSearchingVirtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ShortType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ShortType

No usage of com.sun.jdi.ShortType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.VoidType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.VoidType

No usage of com.sun.jdi.VoidType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.VoidValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.VoidValue

No usage of com.sun.jdi.VoidValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.AbsentInformationException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.AbsentInformationException

Packages that use AbsentInformationException
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of AbsentInformationException in com.sun.jdi

Methods in com.sun.jdi that throw AbsentInformationException
List | StackFrame.visibleVariables() Returns a list containing each LocalVariable that can be accessed from this frame's location.
LocalVariable | StackFrame.visibleVariableByName(String name) Finds a LocalVariable that matches the given name and is visible at the current frame location.
List | Method.allLineLocations() Returns the beginning Location objects for each executable source line in this method.
List | Method.locationsOfLine(int lineNumber) Returns a list containing each Location that maps to the given line.
List | Method.variables() Returns a list containing each LocalVariable declared in this method.
List | Method.variablesByName(String name) Returns a list containing each LocalVariable of a given name in this method.
List | Method.arguments() Returns a list containing each LocalVariable that is declared as an argument of this method.
String | Location.sourceName() Gets an identifing name for the source corresponding to this location.
String | ReferenceType.sourceName() Gets an identifing name for the source corresponding to the declaration of this type.
List | ReferenceType.allLineLocations() Returns the Location objects for each executable source line in this reference type.
List | ReferenceType.locationsOfLine(int lineNumber) Returns a List filled with all Location objects that map to the given line number.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.ClassNotLoadedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.ClassNotLoadedException

Packages that use ClassNotLoadedException
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ClassNotLoadedException in com.sun.jdi

Methods in com.sun.jdi that throw ClassNotLoadedException
void | StackFrame.setValue(LocalVariable variable, Value value) Sets the Value of a LocalVariable in this frame.
Type | Method.returnType() Returns the return type of the this Method.
List | Method.argumentTypes() Returns the list containing the type of each argument.
Type | Field.type() Returns the type of the this Field.
void | ObjectReference.setValue(Field field, Value value) Sets the value of a given instance or static field in this object.
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
void | ArrayReference.setValue(int index, Value value) Replaces an array component with another value.
void | ArrayReference.setValues(List values) Replaces all array components with other values.
void | ArrayReference.setValues(int index, List values, int srcIndex, int length) Replaces a range of array components with other values.
void | ClassType.setValue(Field field, Value value) Assigns a value to a static field.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.
Type | LocalVariable.type() Returns the type of the this LocalVariable.
Type | ArrayType.componentType() Returns the type of the array components.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.IncompatibleThreadStateException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.IncompatibleThreadStateException

Packages that use IncompatibleThreadStateException
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of IncompatibleThreadStateException in com.sun.jdi

Methods in com.sun.jdi that throw IncompatibleThreadStateException
int | ThreadReference.frameCount() Returns the number of stack frames in the thread's current call stack.
List | ThreadReference.frames() Returns a List containing each StackFrame in the thread's current call stack.
StackFrame | ThreadReference.frame(int index) Returns the StackFrame at the given index in the thread's current call stack.
List | ThreadReference.frames(int start, int length) Returns a List containing a range of StackFrame mirrors from the thread's current call stack.
List | ThreadReference.ownedMonitors() Returns a List containing an ObjectReference for each monitor owned by the thread.
ObjectReference | ThreadReference.currentContendedMonitor() Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
List | ObjectReference.waitingThreads() Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
ThreadReference | ObjectReference.owningThread() Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
int | ObjectReference.entryCount() Returns the number times this object's monitor has been entered by the current owning thread.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InvalidTypeException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InvalidTypeException

Packages that use InvalidTypeException
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of InvalidTypeException in com.sun.jdi

Methods in com.sun.jdi that throw InvalidTypeException
void | ThreadReference.stop(ObjectReference throwable) Stops this thread with an asynchronous exception.
void | StackFrame.setValue(LocalVariable variable, Value value) Sets the Value of a LocalVariable in this frame.
void | ObjectReference.setValue(Field field, Value value) Sets the value of a given instance or static field in this object.
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
void | ArrayReference.setValue(int index, Value value) Replaces an array component with another value.
void | ArrayReference.setValues(List values) Replaces all array components with other values.
void | ArrayReference.setValues(int index, List values, int srcIndex, int length) Replaces a range of array components with other values.
void | ClassType.setValue(Field field, Value value) Assigns a value to a static field.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.InvocationException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.InvocationException

Packages that use InvocationException
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of InvocationException in com.sun.jdi

Methods in com.sun.jdi that throw InvocationException
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Accessible

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Accessible

Packages that use Accessible
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of Accessible in com.sun.jdi

Subinterfaces of Accessible in com.sun.jdi
interface | ArrayType Provides access to the class of an array and the type of its components in the target VM.
interface | ClassType A mirror of a class in the target VM.
interface | Field A static or instance field in the target VM.
interface | InterfaceType A mirror of an interface in the target VM.
interface | Method A static or instance method in the target VM.
interface | ReferenceType The type of an object in a target VM.
interface | TypeComponent An entity declared within a user defined type (class or interface).

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ArrayReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ArrayReference

Packages that use ArrayReference
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ArrayReference in com.sun.jdi

Methods in com.sun.jdi that return ArrayReference
 ArrayReference ArrayType.newInstance(int length)
Creates a new instance of this array class in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.BooleanValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.BooleanValue

Packages that use BooleanValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of BooleanValue in com.sun.jdi

Methods in com.sun.jdi that return BooleanValue
 BooleanValue VirtualMachine.mirrorOf(boolean value)
Creates a BooleanValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ByteValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ByteValue

Packages that use ByteValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ByteValue in com.sun.jdi

Methods in com.sun.jdi that return ByteValue
 ByteValue VirtualMachine.mirrorOf(byte value)
Creates a ByteValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.CharValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.CharValue

Packages that use CharValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of CharValue in com.sun.jdi

Methods in com.sun.jdi that return CharValue
 CharValue VirtualMachine.mirrorOf(char value)
Creates a CharValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ClassLoaderReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ClassLoaderReference

Packages that use ClassLoaderReference
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ClassLoaderReference in com.sun.jdi

Methods in com.sun.jdi that return ClassLoaderReference
 ClassLoaderReference ReferenceType.classLoader()
Gets the classloader object which loaded the class corresponding to this type.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ClassObjectReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ClassObjectReference

Packages that use ClassObjectReference
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ClassObjectReference in com.sun.jdi

Methods in com.sun.jdi that return ClassObjectReference
 ClassObjectReference ReferenceType.classObject()
Returns the class object that corresponds to this type in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ClassType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ClassType

Packages that use ClassType
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ClassType in com.sun.jdi

Methods in com.sun.jdi that return ClassType
 ClassType ClassType.superclass()
Gets the superclass of this class.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.DoubleValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.DoubleValue

Packages that use DoubleValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of DoubleValue in com.sun.jdi

Methods in com.sun.jdi that return DoubleValue
 DoubleValue VirtualMachine.mirrorOf(double value)
Creates a DoubleValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Field

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Field

Packages that use Field
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of Field in com.sun.jdi

Methods in com.sun.jdi that return Field
 Field ReferenceType.fieldByName(String fieldName)
Finds the visible Field with the given non-ambiguous name.

Methods in com.sun.jdi with parameters of type Field
Value | ObjectReference.getValue(Field sig) Gets the value of a given instance or static field in this object.
void | ObjectReference.setValue(Field field, Value value) Sets the value of a given instance or static field in this object.
Value | ReferenceType.getValue(Field field) Gets the Value of a given static Field in this type.
void | ClassType.setValue(Field field, Value value) Assigns a value to a static field.

Uses of Field in com.sun.jdi.event

Methods in com.sun.jdi.event that return Field
 Field WatchpointEvent.field()
Returns the field that is about to be accessed/modified.

Uses of Field in com.sun.jdi.request

Methods in com.sun.jdi.request that return Field
 Field WatchpointRequest.field()
Gets the Field being watched by this WatchpointRequest.

Methods in com.sun.jdi.request with parameters of type Field
AccessWatchpointRequest | EventRequestManager.createAccessWatchpointRequest(Field field) Creates a new disabled watchpoint which watches accesses to the specified field.
ModificationWatchpointRequest | EventRequestManager.createModificationWatchpointRequest(Field field) Creates a new disabled watchpoint which watches accesses to the specified field.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.FloatValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.FloatValue

Packages that use FloatValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of FloatValue in com.sun.jdi

Methods in com.sun.jdi that return FloatValue
 FloatValue VirtualMachine.mirrorOf(float value)
Creates a FloatValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.IntegerValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.IntegerValue

Packages that use IntegerValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of IntegerValue in com.sun.jdi

Methods in com.sun.jdi that return IntegerValue
 IntegerValue VirtualMachine.mirrorOf(int value)
Creates an IntegerValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.LocalVariable

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.LocalVariable

Packages that use LocalVariable
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of LocalVariable in com.sun.jdi

Methods in com.sun.jdi that return LocalVariable
 LocalVariable StackFrame.visibleVariableByName(String name)
Finds a LocalVariable that matches the given name and is visible at the current frame location.

Methods in com.sun.jdi with parameters of type LocalVariable
Value | StackFrame.getValue(LocalVariable variable) Gets the Value of a LocalVariable in this frame.
void | StackFrame.setValue(LocalVariable variable, Value value) Sets the Value of a LocalVariable in this frame.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Locatable

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Locatable

Packages that use Locatable
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of Locatable in com.sun.jdi

Subinterfaces of Locatable in com.sun.jdi
interface | Method A static or instance method in the target VM.
interface | StackFrame The state of one method invocation on a thread's call stack.

Uses of Locatable in com.sun.jdi.event

Subinterfaces of Locatable in com.sun.jdi.event
interface | AccessWatchpointEvent Notification of a field access in the target VM.
interface | BreakpointEvent Notification of a breakpoint in the target VM.
interface | ExceptionEvent Notification of an exception in the target VM.
interface | LocatableEvent Abstract superinterface of events which have both location and thread.
interface | MethodEntryEvent Notification of a method invocation in the target VM.
interface | MethodExitEvent Notification of a method return in the target VM.
interface | ModificationWatchpointEvent Notification of a field modification in the target VM.
interface | StepEvent Notification of step completion in the target VM.
interface | WatchpointEvent Notification of a field triggered event encountered by a thread in the target VM.

Uses of Locatable in com.sun.jdi.request

Subinterfaces of Locatable in com.sun.jdi.request
 interface BreakpointRequest
Identifies a Location in the target VM at which execution should be stopped.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Location

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Location

Packages that use Location
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of Location in com.sun.jdi

Methods in com.sun.jdi that return Location
Location | StackFrame.location() Returns the Location of the current instruction in the frame.
Location | Method.locationOfCodeIndex(long codeIndex) Returns a Location for the given code index.
Location | Locatable.location() Returns the Location of this mirror, if there is executable Java language code associated with it.

Uses of Location in com.sun.jdi.event

Methods in com.sun.jdi.event that return Location
 Location ExceptionEvent.catchLocation()
Gets the location where the exception will be caught.

Uses of Location in com.sun.jdi.request

Methods in com.sun.jdi.request that return Location
 Location BreakpointRequest.location()
Returns the location of the requested breakpoint.

Methods in com.sun.jdi.request with parameters of type Location
 BreakpointRequest EventRequestManager.createBreakpointRequest(Location location)
Creates a new disabled BreakpointRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.LongValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.LongValue

Packages that use LongValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of LongValue in com.sun.jdi

Methods in com.sun.jdi that return LongValue
 LongValue VirtualMachine.mirrorOf(long value)
Creates a LongValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Method

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Method

Packages that use Method
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.

Uses of Method in com.sun.jdi

Methods in com.sun.jdi that return Method
Method | Location.method() Gets the method, if any, containing this Location.
Method | ClassType.concreteMethodByName(String name, String signature) Returns a the single non-abstract Method visible from this class that has the given name and signature.

Methods in com.sun.jdi with parameters of type Method
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Uses of Method in com.sun.jdi.event

Methods in com.sun.jdi.event that return Method
Method | MethodExitEvent.method() Returns the method that was exited.
Method | MethodEntryEvent.method() Returns the method that was entered.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Mirror

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Mirror

Packages that use Mirror
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of Mirror in com.sun.jdi

Subinterfaces of Mirror in com.sun.jdi
interface | ArrayReference Provides access to an array object and its components in the target VM.
interface | ArrayType Provides access to the class of an array and the type of its components in the target VM.
interface | BooleanType The type of all primitive boolean values accessed in the target VM.
interface | BooleanValue Provides access to a primitive boolean value in the target VM.
interface | ByteType The type of all primitive byte values accessed in the target VM.
interface | ByteValue Provides access to a primitive byte value in the target VM.
interface | CharType The type of all primitive char values accessed in the target VM.
interface | CharValue Provides access to a primitive char value in the target VM.
interface | ClassLoaderReference A class loader object from the target VM.
interface | ClassObjectReference An instance of java.lang.Class from the target VM.
interface | ClassType A mirror of a class in the target VM.
interface | DoubleType The type of all primitive double values accessed in the target VM.
interface | DoubleValue Provides access to a primitive double value in the target VM.
interface | Field A static or instance field in the target VM.
interface | FloatType The type of all primitive float values accessed in the target VM.
interface | FloatValue Provides access to a primitive float value in the target VM.
interface | IntegerType The type of all primitive int values accessed in the target VM.
interface | IntegerValue Provides access to a primitive int value in the target VM.
interface | InterfaceType A mirror of an interface in the target VM.
interface | LocalVariable A local variable in the target VM.
interface | Location A point within the executing code of the target VM.
interface | LongType The type of all primitive long values accessed in the target VM.
interface | LongValue Provides access to a primitive long value in the target VM.
interface | Method A static or instance method in the target VM.
interface | ObjectReference An object that currently exists in the target VM.
interface | PathSearchingVirtualMachine A virtual machine which searches for classes through paths
interface | PrimitiveType The type associated with non-object values in a target VM.
interface | PrimitiveValue The value assigned to a field or variable of primitive type in a target VM.
interface | ReferenceType The type of an object in a target VM.
interface | ShortType The type of all primitive short values accessed in the target VM.
interface | ShortValue Provides access to a primitive short value in the target VM.
interface | StackFrame The state of one method invocation on a thread's call stack.
interface | StringReference A string object from the target VM.
interface | ThreadGroupReference A thread group object from the target VM.
interface | ThreadReference A thread object from the target VM.
interface | Type The type of a Value retrieved from the target VM.
interface | TypeComponent An entity declared within a user defined type (class or interface).
interface | Value The value assigned to a field or variable at some point during the execution of the target VM.
interface | VirtualMachine A virtual machine targeted for debugging.
interface | VoidType The type of all primitive void values accessed in the target VM.
interface | VoidValue Provides access to a primitive void value in the target VM.

Uses of Mirror in com.sun.jdi.event

Subinterfaces of Mirror in com.sun.jdi.event
interface | AccessWatchpointEvent Notification of a field access in the target VM.
interface | BreakpointEvent Notification of a breakpoint in the target VM.
interface | ClassPrepareEvent Notification of a class prepare in the target VM.
interface | ClassUnloadEvent Notification of a class unload in the target VM.
interface | Event An occurrence in a target VM that is of interest to a debugger.
interface | EventQueue Manager of incoming debugger events for a target VM.
interface | EventSet Several Event objects may be created at a given time by the target VirtualMachine.
interface | ExceptionEvent Notification of an exception in the target VM.
interface | LocatableEvent Abstract superinterface of events which have both location and thread.
interface | MethodEntryEvent Notification of a method invocation in the target VM.
interface | MethodExitEvent Notification of a method return in the target VM.
interface | ModificationWatchpointEvent Notification of a field modification in the target VM.
interface | StepEvent Notification of step completion in the target VM.
interface | ThreadDeathEvent Notification of a completed thread in the target VM.
interface | ThreadStartEvent Notification of a new running thread in the target VM.
interface | VMDeathEvent Notification of target VM termination.
interface | VMDisconnectEvent Notification of disconnection from target VM.
interface | VMStartEvent Notification of initialization of a target VM.
interface | WatchpointEvent Notification of a field triggered event encountered by a thread in the target VM.

Uses of Mirror in com.sun.jdi.request

Subinterfaces of Mirror in com.sun.jdi.request
interface | AccessWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.
interface | BreakpointRequest Identifies a Location in the target VM at which execution should be stopped.
interface | ClassPrepareRequest Request for notification when a class is prepared in the target VM.
interface | ClassUnloadRequest Request for notification when a class is unloaded in the target VM.
interface | EventRequest Represents a request for notification of an event.
interface | EventRequestManager Manages the creation and deletion of EventRequests.
interface | ExceptionRequest Request for notification when an exception occurs in the target VM.
interface | MethodEntryRequest Request for notification when a method is invoked in the target VM.
interface | MethodExitRequest Request for notification when a method returns in the target VM.
interface | ModificationWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.
interface | StepRequest Request for notification when a step occurs in the target VM.
interface | ThreadDeathRequest Request for notification when a thread terminates in the target VM.
interface | ThreadStartRequest Request for notification when a thread starts execution in the target VM.
interface | WatchpointRequest Identifies a Field in the target VM being watched.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ObjectReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ObjectReference

Packages that use ObjectReference
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.

Uses of ObjectReference in com.sun.jdi

Subinterfaces of ObjectReference in com.sun.jdi
interface | ArrayReference Provides access to an array object and its components in the target VM.
interface | ClassLoaderReference A class loader object from the target VM.
interface | ClassObjectReference An instance of java.lang.Class from the target VM.
interface | StringReference A string object from the target VM.
interface | ThreadGroupReference A thread group object from the target VM.
interface | ThreadReference A thread object from the target VM.

Methods in com.sun.jdi that return ObjectReference
ObjectReference | ThreadReference.currentContendedMonitor() Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
ObjectReference | StackFrame.thisObject() Returns the value of 'this' for the current frame.
ObjectReference | InvocationException.exception()
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Methods in com.sun.jdi with parameters of type ObjectReference
 void ThreadReference.stop(ObjectReference throwable)
Stops this thread with an asynchronous exception.

Constructors in com.sun.jdi with parameters of type ObjectReference
InvocationException(ObjectReference exception)

Uses of ObjectReference in com.sun.jdi.event

Methods in com.sun.jdi.event that return ObjectReference
ObjectReference | WatchpointEvent.object() Returns the object whose field is about to be accessed/modified.
ObjectReference | ExceptionEvent.exception() Gets the thrown exception object.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.PrimitiveType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.PrimitiveType

Packages that use PrimitiveType
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of PrimitiveType in com.sun.jdi

Subinterfaces of PrimitiveType in com.sun.jdi
interface | BooleanType The type of all primitive boolean values accessed in the target VM.
interface | ByteType The type of all primitive byte values accessed in the target VM.
interface | CharType The type of all primitive char values accessed in the target VM.
interface | DoubleType The type of all primitive double values accessed in the target VM.
interface | FloatType The type of all primitive float values accessed in the target VM.
interface | IntegerType The type of all primitive int values accessed in the target VM.
interface | LongType The type of all primitive long values accessed in the target VM.
interface | ShortType The type of all primitive short values accessed in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.PrimitiveValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.PrimitiveValue

Packages that use PrimitiveValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of PrimitiveValue in com.sun.jdi

Subinterfaces of PrimitiveValue in com.sun.jdi
interface | BooleanValue Provides access to a primitive boolean value in the target VM.
interface | ByteValue Provides access to a primitive byte value in the target VM.
interface | CharValue Provides access to a primitive char value in the target VM.
interface | DoubleValue Provides access to a primitive double value in the target VM.
interface | FloatValue Provides access to a primitive float value in the target VM.
interface | IntegerValue Provides access to a primitive int value in the target VM.
interface | LongValue Provides access to a primitive long value in the target VM.
interface | ShortValue Provides access to a primitive short value in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ReferenceType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ReferenceType

Packages that use ReferenceType
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of ReferenceType in com.sun.jdi

Subinterfaces of ReferenceType in com.sun.jdi
interface | ArrayType Provides access to the class of an array and the type of its components in the target VM.
interface | ClassType A mirror of a class in the target VM.
interface | InterfaceType A mirror of an interface in the target VM.

Methods in com.sun.jdi that return ReferenceType
ReferenceType | TypeComponent.declaringType() Returns the type in which this component was declared.
ReferenceType | ObjectReference.referenceType() Gets the ReferenceType that mirrors the type of this object.
ReferenceType | Location.declaringType() Gets the type to which this Location belongs.
ReferenceType | ClassObjectReference.reflectedType() Returns the ReferenceType corresponding to this class object.

Uses of ReferenceType in com.sun.jdi.event

Methods in com.sun.jdi.event that return ReferenceType
 ReferenceType ClassPrepareEvent.referenceType()
Returns the reference type for which this event was generated.

Uses of ReferenceType in com.sun.jdi.request

Methods in com.sun.jdi.request that return ReferenceType
 ReferenceType ExceptionRequest.exception()
Returns exception type for which exception events are requested.

Methods in com.sun.jdi.request with parameters of type ReferenceType
ExceptionRequest | EventRequestManager.createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught) Creates a new disabled ExceptionRequest.
void | ClassPrepareRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
void | MethodExitRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
void | ExceptionRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | StepRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | WatchpointRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | MethodEntryRequest.addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ShortValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ShortValue

Packages that use ShortValue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ShortValue in com.sun.jdi

Methods in com.sun.jdi that return ShortValue
 ShortValue VirtualMachine.mirrorOf(short value)
Creates a ShortValue for the given value.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.StackFrame

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.StackFrame

Packages that use StackFrame
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of StackFrame in com.sun.jdi

Methods in com.sun.jdi that return StackFrame
 StackFrame ThreadReference.frame(int index)
Returns the StackFrame at the given index in the thread's current call stack.

Methods in com.sun.jdi with parameters of type StackFrame
 boolean LocalVariable.isVisible(StackFrame frame)
Determines whether this variable can be accessed from the given StackFrame.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.StringReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.StringReference

Packages that use StringReference
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of StringReference in com.sun.jdi

Methods in com.sun.jdi that return StringReference
 StringReference VirtualMachine.mirrorOf(String value)
Creates a string in this virtual machine.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ThreadGroupReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ThreadGroupReference

Packages that use ThreadGroupReference
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of ThreadGroupReference in com.sun.jdi

Methods in com.sun.jdi that return ThreadGroupReference
ThreadGroupReference | ThreadReference.threadGroup() Returns this thread's thread group.
ThreadGroupReference | ThreadGroupReference.parent() Returns the parent of this thread group.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.ThreadReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.ThreadReference

Packages that use ThreadReference
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of ThreadReference in com.sun.jdi

Methods in com.sun.jdi that return ThreadReference
ThreadReference | StackFrame.thread() Returns the thread under which this frame's method is running.
ThreadReference | ObjectReference.owningThread() Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.

Methods in com.sun.jdi with parameters of type ThreadReference
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | ClassType.newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.

Uses of ThreadReference in com.sun.jdi.event

Methods in com.sun.jdi.event that return ThreadReference
ThreadReference | LocatableEvent.thread() Returns the thread in which this event has occurred.
ThreadReference | ThreadDeathEvent.thread() Returns the thread which is terminating.
ThreadReference | ClassPrepareEvent.thread() Returns the thread in which this event has occurred.
ThreadReference | ThreadStartEvent.thread() Returns the thread which has started.
ThreadReference | VMStartEvent.thread() Returns the initial thread of the VM which has started.

Uses of ThreadReference in com.sun.jdi.request

Methods in com.sun.jdi.request that return ThreadReference
 ThreadReference StepRequest.thread()

Methods in com.sun.jdi.request with parameters of type ThreadReference
StepRequest | EventRequestManager.createStepRequest(ThreadReference thread, int size, int depth) Creates a new disabled StepRequest.
void | BreakpointRequest.addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in the given thread.
void | ThreadDeathRequest.addThreadFilter(ThreadReference thread) Restricts the event generated by this request to the ending of this thread.
void | MethodExitRequest.addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
void | ExceptionRequest.addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in the given thread.
void | WatchpointRequest.addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
void | MethodEntryRequest.addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
void | ThreadStartRequest.addThreadFilter(ThreadReference thread) Restricts the event generated by this request to the starting of this thread.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Type

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Type

Packages that use Type
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of Type in com.sun.jdi

Subinterfaces of Type in com.sun.jdi
interface | ArrayType Provides access to the class of an array and the type of its components in the target VM.
interface | BooleanType The type of all primitive boolean values accessed in the target VM.
interface | ByteType The type of all primitive byte values accessed in the target VM.
interface | CharType The type of all primitive char values accessed in the target VM.
interface | ClassType A mirror of a class in the target VM.
interface | DoubleType The type of all primitive double values accessed in the target VM.
interface | FloatType The type of all primitive float values accessed in the target VM.
interface | IntegerType The type of all primitive int values accessed in the target VM.
interface | InterfaceType A mirror of an interface in the target VM.
interface | LongType The type of all primitive long values accessed in the target VM.
interface | PrimitiveType The type associated with non-object values in a target VM.
interface | ReferenceType The type of an object in a target VM.
interface | ShortType The type of all primitive short values accessed in the target VM.
interface | VoidType The type of all primitive void values accessed in the target VM.

Methods in com.sun.jdi that return Type
Type | Method.returnType() Returns the return type of the this Method.
Type | Field.type() Returns the type of the this Field.
Type | Value.type()
Type | LocalVariable.type() Returns the type of the this LocalVariable.
Type | ArrayType.componentType() Returns the type of the array components.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.TypeComponent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.TypeComponent

Packages that use TypeComponent
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of TypeComponent in com.sun.jdi

Subinterfaces of TypeComponent in com.sun.jdi
interface | Field A static or instance field in the target VM.
interface | Method A static or instance method in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.Value

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.Value

Packages that use Value
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.

Uses of Value in com.sun.jdi

Subinterfaces of Value in com.sun.jdi
interface | ArrayReference Provides access to an array object and its components in the target VM.
interface | BooleanValue Provides access to a primitive boolean value in the target VM.
interface | ByteValue Provides access to a primitive byte value in the target VM.
interface | CharValue Provides access to a primitive char value in the target VM.
interface | ClassLoaderReference A class loader object from the target VM.
interface | ClassObjectReference An instance of java.lang.Class from the target VM.
interface | DoubleValue Provides access to a primitive double value in the target VM.
interface | FloatValue Provides access to a primitive float value in the target VM.
interface | IntegerValue Provides access to a primitive int value in the target VM.
interface | LongValue Provides access to a primitive long value in the target VM.
interface | ObjectReference An object that currently exists in the target VM.
interface | PrimitiveValue The value assigned to a field or variable of primitive type in a target VM.
interface | ShortValue Provides access to a primitive short value in the target VM.
interface | StringReference A string object from the target VM.
interface | ThreadGroupReference A thread group object from the target VM.
interface | ThreadReference A thread object from the target VM.
interface | VoidValue Provides access to a primitive void value in the target VM.

Methods in com.sun.jdi that return Value
Value | StackFrame.getValue(LocalVariable variable) Gets the Value of a LocalVariable in this frame.
Value | ObjectReference.getValue(Field sig) Gets the value of a given instance or static field in this object.
Value | ObjectReference.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
Value | ReferenceType.getValue(Field field) Gets the Value of a given static Field in this type.
Value | ArrayReference.getValue(int index) Returns an array component value.
Value | ClassType.invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.

Methods in com.sun.jdi with parameters of type Value
void | StackFrame.setValue(LocalVariable variable, Value value) Sets the Value of a LocalVariable in this frame.
void | ObjectReference.setValue(Field field, Value value) Sets the value of a given instance or static field in this object.
void | ArrayReference.setValue(int index, Value value) Replaces an array component with another value.
void | ClassType.setValue(Field field, Value value) Assigns a value to a static field.

Uses of Value in com.sun.jdi.event

Methods in com.sun.jdi.event that return Value
Value | ModificationWatchpointEvent.valueToBe() Value that will be assigned to the field when the instruction completes.
Value | WatchpointEvent.valueCurrent() Current value of the field.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.VirtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.VirtualMachine

Packages that use VirtualMachine
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect | This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of VirtualMachine in com.sun.jdi

Subinterfaces of VirtualMachine in com.sun.jdi
 interface PathSearchingVirtualMachine
A virtual machine which searches for classes through paths

Methods in com.sun.jdi that return VirtualMachine
 VirtualMachine Mirror.virtualMachine()
Gets the VirtualMachine to which this Mirror belongs.

Uses of VirtualMachine in com.sun.jdi.connect

Methods in com.sun.jdi.connect that return VirtualMachine
VirtualMachine | AttachingConnector.attach(Map arguments) Attaches to a running application and and returns a mirror of its VM.
VirtualMachine | LaunchingConnector.launch(Map arguments) Launches an application and connects to its VM.
VirtualMachine | ListeningConnector.accept(Map arguments) Waits for a target VM to attach to this connector.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.VirtualMachineManager

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.VirtualMachineManager

Packages that use VirtualMachineManager
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of VirtualMachineManager in com.sun.jdi

Methods in com.sun.jdi that return VirtualMachineManager
static VirtualMachineManager Bootstrap.virtualMachineManager()

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


ClassLoaderReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ClassLoaderReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface ClassLoaderReference
extends ObjectReference

A class loader object from the target VM. A ClassLoaderReference is an ObjectReference with additional access to classloader-specific information from the target VM. Instances ClassLoaderReference are obtained through calls to ReferenceType.classLoader()

Since:
1.3
See Also:
ObjectReference

Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
List | definedClasses() Returns a list of all loaded classes that were defined by this class loader.
List | visibleClasses() Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

definedClasses

public List definedClasses()
Returns a list of all loaded classes that were defined by this class loader. No ordering of this list guaranteed.
Returns:
a List of ReferenceType objects mirroring types loaded by this class loader. The list has length 0 if no types have been defined by this classloader.
Throws:
ObjectCollectedException - if this object has been garbage collected.

visibleClasses

public List visibleClasses()
Returns a list of all classes for which this class loader has been recorded as the initiating loader in the target VM. The list contains ReferenceTypes defined directly by this loader (as returned by #definedTypes) and any types for which loading was delegated by this class loader to another class loader.

The visible class list has useful properties with respect to the type namespace. A particular type name will occur at most once in the list. Each field or variable declared with that type name in a class defined by this class loader must be resolved to that single type.

No ordering of the returned list is guaranteed.

See section 5.3 of the revised JVM specification for more information on initiating classloader.

Returns:
a List of ReferenceType objects mirroring classes initiated by this class loader. The list has length 0 if no classes are visible to this classloader.
Throws:
ObjectCollectedException - if this object has been garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassNotLoadedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class ClassNotLoadedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.ClassNotLoadedException
All Implemented Interfaces:
Serializable
public class ClassNotLoadedException
extends Exception

Thrown to indicate that the requested class has not yet been loaded through the appropriate class loader.

Due to the lazy class linking performed by many VMs, it is possible for a field or variable to be visible in a program before the associated class is loaded. Until the class is loaded all that is available is a signature string. If an attempt is made to set the value of such a field or variable from JDI, the appropriate type checking cannot be done because the destination class has not been loaded. The same is true for the element class of array elements.

It is not advisable to solve this problem by attempting a class load on the fly in this case. There are two problems in having the debugger load a class instead of waiting for it to load over the normal course of events.

  • There can be no guarantee that running the appropriate class loader won't cause a deadlock in loading the class. Class loaders can consist of arbitrary Java code and the class loading methods are usually synchronized. Most of the work done by a debugger happens when threads are suspended. If another application thread is suspended within the same class loader, a deadlock is very possible.
  • Changing the order in which classes are normally loaded may either mask or reveal bugs in the application. An unintrusive debugger should strive to leave unchanged the behavior of the application being debugged.
To avoid these potential problems, this exception is thrown.

Note that this exception will be thrown until the class in question is visible to the class loader of enclosing class. (That is, the class loader of the enclosing class must be an initiating class loader for the class in question.) See the VM Specification for more details.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
ClassNotLoadedException(String className)
ClassNotLoadedException(String className, String message)
Method Summary
 String className()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassNotLoadedException

public ClassNotLoadedException(String className)

ClassNotLoadedException

public ClassNotLoadedException(String className,
                               String message)
Method Detail

className

public String className()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassNotPreparedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class ClassNotPreparedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.ClassNotPreparedException
All Implemented Interfaces:
Serializable
public class ClassNotPreparedException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the specified class has not yet been prepared.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
ClassNotPreparedException()
ClassNotPreparedException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassNotPreparedException

public ClassNotPreparedException()

ClassNotPreparedException

public ClassNotPreparedException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassObjectReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ClassObjectReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface ClassObjectReference
extends ObjectReference

An instance of java.lang.Class from the target VM. Use this interface to access type information for the class, array, or interface that this object reflects.

Since:
1.3
See Also:
ReferenceType

Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
 ReferenceType reflectedType()
Returns the ReferenceType corresponding to this class object.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

reflectedType

public ReferenceType reflectedType()
Returns the ReferenceType corresponding to this class object. The returned type can be used to obtain detailed information about the class.
Returns:
the ReferenceType reflected by this class object.
Throws:
ObjectCollectedException - if this object has been garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ClassType

All Superinterfaces:
Accessible, Comparable, Mirror, ReferenceType, Type
public interface ClassType
extends ReferenceType

A mirror of a class in the target VM. A ClassType is a refinement of ReferenceType that applies to true classes in the JLS sense of the definition (not an interface, not an array type). Any ObjectReference that mirrors an instance of such a class will have a ClassType as its type.

Since:
1.3
See Also:
ObjectReference

Field Summary
static int INVOKE_SINGLE_THREADED
Perform method invocation with only the invoking thread resumed
Method Summary
List | allInterfaces() Gets the interfaces directly and indirectly implemented by this class.
Method | concreteMethodByName(String name, String signature) Returns a the single non-abstract Method visible from this class that has the given name and signature.
List | interfaces() Gets the interfaces directly implemented by this class.
Value | invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified static Method in the target VM.
ObjectReference | newInstance(ThreadReference thread, Method method, List arguments, int options) Constructs a new instance of this type, using the given constructor Method in the target VM.
void | setValue(Field field, Value value) Assigns a value to a static field.
List | subclasses() Gets the currently loaded, direct subclasses of this class.
ClassType | superclass() Gets the superclass of this class.
Methods inherited from interface com.sun.jdi.ReferenceType
allFields, allLineLocations, allMethods, classLoader, classObject, equals, failedToInitialize, fieldByName, fields, getValue, getValues, hashCode, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, methods, methodsByName, methodsByName, name, nestedTypes, sourceName, visibleFields, visibleMethods
Methods inherited from interface com.sun.jdi.Type
signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

Field Detail

INVOKE_SINGLE_THREADED

public static final int INVOKE_SINGLE_THREADED
Perform method invocation with only the invoking thread resumed
Method Detail

superclass

public ClassType superclass()
Gets the superclass of this class.
Returns:
a ClassType that mirrors the superclass of this class in the target VM. If no such class exists, returns null
Throws:
ObjectCollectedException - if this class has been unloaded and garbage collected.

interfaces

public List interfaces()
Gets the interfaces directly implemented by this class. Only the interfaces that are declared with the "implements" keyword in this class are included.
Returns:
a List of InterfaceType objects each mirroring a direct interface this ClassType in the target VM. If none exist, returns a zero length List.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this class has been unloaded and garbage collected.

allInterfaces

public List allInterfaces()
Gets the interfaces directly and indirectly implemented by this class. Interfaces returned by interfaces() are returned as well all superinterfaces.
Returns:
a List of InterfaceType objects each mirroring an interface of this ClassType in the target VM. If none exist, returns a zero length List.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this class has been unloaded and garbage collected.

subclasses

public List subclasses()
Gets the currently loaded, direct subclasses of this class. No ordering of this list is guaranteed.
Returns:
a List of ClassType objects each mirroring a loaded subclass of this class in the target VM. If no such classes exist, this method returns a zero-length list.
Throws:
ObjectCollectedException - if this class has been unloaded and garbage collected.

setValue

public void setValue(Field field,
                     Value value)
              throws InvalidTypeException,
                     ClassNotLoadedException
Assigns a value to a static field. The Field must be valid for this ObjectReference; that is, there must be a widening reference conversion from this object to the field's type. The field must not be final.

Object values must be assignment compatible with the field type (This implies that the field type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the field type or must be convertible to the field type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
field - the field to set.
value - the value to be assigned.
Throws:
IllegalArgumentException - if the field is not static, the field is final, or the field does not exist in this class.
ClassNotLoadedException - if the field type has not yet been loaded through the appropriate class loader.
InvalidTypeException - if the value's type does not match the field's declared type.
ObjectCollectedException - if the given Value is an mirrors an object which has been garbage collected. Also thrown if this class has been unloaded and garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

invokeMethod

public Value invokeMethod(ThreadReference thread,
                          Method method,
                          List arguments,
                          int options)
                   throws InvalidTypeException,
                          ClassNotLoadedException,
                          IncompatibleThreadStateException,
                          InvocationException
Invokes the specified static Method in the target VM. The specified method can be defined in the this class, or in a superclass. The method must be a static method but not a static initializer. Use newInstance(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List, int) to create a new object and run its constructor.

The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event which occurred in that thread. Method invocation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; this method does not return until the invoked method returns in the target VM. If the invoked method has a return type other than void, a mirror of the return value is returned by this method; otherwise, null is returned. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

Parameters:
thread - the thread in which to invoke.
method - the Method to invoke.
arguments - the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.
options - the integer bit flag options.
Returns:
a Value mirror of the invoked method's return value.
Throws:
IllegalArgumentException - if the method is not a member of this class or a superclass, if the size of the argument list does not match the number of declared arguemnts for the method, or if the method is an initializer, constructor or static intializer.
{@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
InvocationException - if the method invocation resulted in an exception in the target VM.
ObjectCollectedException - if the given thread or any object argument has been garbage collected. Also thrown if this class has been unloaded and garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

newInstance

public ObjectReference newInstance(ThreadReference thread,
                                   Method method,
                                   List arguments,
                                   int options)
                            throws InvalidTypeException,
                                   ClassNotLoadedException,
                                   IncompatibleThreadStateException,
                                   InvocationException
Constructs a new instance of this type, using the given constructor Method in the target VM. The specified constructor must be defined in the this class.

Instance creation will occur in the specified thread. Instance creation can occur only if the specified thread has been suspended by an event which occurred in that thread. Instance creation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

The specified constructor is invoked with the arguments in the specified argument list. The invocation is synchronous; this method does not return until the constructor returns in the target VM. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

Parameters:
thread - the thread in which to invoke.
method - the constructor Method to invoke.
arguments - the list of Value arguments bound to the invoked constructor. Values from the list are assigned to arguments in the order they appear in the constructor signature.
options - the integer bit flag options.
Returns:
an ObjectReference mirror of the newly created object.
Throws:
IllegalArgumentException - if the method is not a member of this class, if the size of the argument list does not match the number of declared arguments for the constructor, or if the method is not a constructor.
{@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
InvocationException - if the method invocation resulted in an exception in the target VM.
ObjectCollectedException - if the given thread or any object argument has been garbage collected. Also thrown if this class has been unloaded and garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

concreteMethodByName

public Method concreteMethodByName(String name,
                                   String signature)
Returns a the single non-abstract Method visible from this class that has the given name and signature. See ReferenceType.methodsByName(java.lang.String, java.lang.String) for information on signature format.

The returned method (if non-null) is a component of ClassType.

Parameters:
name - the name of the method to find.
signature - the signature of the method to find
Returns:
the Method that matches the given name and signature or null if there is no match.
Throws:
ClassNotPreparedException - if methods are not yet available becasue the class has not yet been prepared.
ObjectCollectedException - if this class has been unloaded and garbage collected.
See Also:
ReferenceType.visibleMethods(),
ReferenceType.methodsByName(java.lang.String name),
ReferenceType.methodsByName(java.lang.String name, java.lang.String signature)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


com.sun.jdi.connect Class Hierarchy

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.jdi.connect

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class com.sun.jdi.connect.IllegalConnectorArgumentsException
        • class com.sun.jdi.connect.VMStartException

Interface Hierarchy

  • interface com.sun.jdi.connect.Connector
    • interface com.sun.jdi.connect.AttachingConnector
    • interface com.sun.jdi.connect.LaunchingConnector
    • interface com.sun.jdi.connect.ListeningConnector
  • interface java.io.Serializable
    • interface com.sun.jdi.connect.Connector.Argument
      • interface com.sun.jdi.connect.Connector.BooleanArgument
      • interface com.sun.jdi.connect.Connector.IntegerArgument
      • interface com.sun.jdi.connect.Connector.SelectedArgument
      • interface com.sun.jdi.connect.Connector.StringArgument
  • interface com.sun.jdi.connect.Transport
Overview Package Class Use Tree Index Help
Java Debug Interface


Package com.sun.jdi.connect

This package defines connections between the virtual machine using the JDI and the target virtual machine.

See:
Description

Interface Summary
AttachingConnector | A connector which attaches to a previously running target VM.
Connector | A method of connection between a debugger and a target VM.
Connector.Argument | Specification for and value of a Connector argument.
Connector.BooleanArgument | Specification for and value of a Connector argument, whose value is Boolean.
Connector.IntegerArgument | Specification for and value of a Connector argument, whose value is an integer.
Connector.SelectedArgument | Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
Connector.StringArgument | Specification for and value of a Connector argument, whose value is a String.
LaunchingConnector | A connector which can launch a target VM before connecting to it.
ListeningConnector | A connector which listens for a connection initiated by a target VM.
Transport | A method of communication between a debugger and a target VM.

Exception Summary
IllegalConnectorArgumentsException | Thrown to indicate an invalid argument or inconsistent passed to a Connector.
VMStartException | A target VM was successfully launched, but terminated with an error before a connection could be established.

Package com.sun.jdi.connect Description

This package defines connections between the virtual machine using the JDI and the target virtual machine. In concert with VirtualMachineManager it is the mechanism for launching, attaching, etc to target virtual machines.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Overview Package Class Use Tree Index Help
Java Debug Interface


Uses of Package com.sun.jdi.connect

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Package
com.sun.jdi.connect

Packages that use com.sun.jdi.connect
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.connect | This package defines connections between the virtual machine using the JDI and the target virtual machine.

Classes in com.sun.jdi.connect used by com.sun.jdi
LaunchingConnector
A connector which can launch a target VM before connecting to it.

Classes in com.sun.jdi.connect used by com.sun.jdi.connect
Connector
A method of connection between a debugger and a target VM.
Connector.Argument
Specification for and value of a Connector argument.
IllegalConnectorArgumentsException
Thrown to indicate an invalid argument or inconsistent passed to a Connector.
Transport
A method of communication between a debugger and a target VM.
VMStartException
A target VM was successfully launched, but terminated with an error before a connection could be established.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Argument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector.Argument

All Superinterfaces:
Serializable
All Known Subinterfaces:
Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
Enclosing class:
Connector
public static interface Connector.Argument
extends Serializable

Specification for and value of a Connector argument. Will always implement a subinterface of Argument: Connector.StringArgument, Connector.BooleanArgument, Connector.IntegerArgument, or Connector.SelectedArgument.

Method Summary
String | description() Returns a human-readable description of this argument and its purpose.
boolean | isValid(String value) Performs basic sanity check of argument.
String | label() Returns a short human-readable label for this argument.
boolean | mustSpecify() Indicates whether the argument must be specified.
String | name() Returns a short, unique identifier for the argument.
void | setValue(String value) Sets the value of the argument.
String | value() Returns the current value of the argument.

Method Detail

name

public String name()
Returns a short, unique identifier for the argument. Not intended for exposure to end-user.
Returns:
the name of this argument.

label

public String label()
Returns a short human-readable label for this argument.
Returns:
a label for this argument

description

public String description()
Returns a human-readable description of this argument and its purpose.
Returns:
the description of this argument

value

public String value()
Returns the current value of the argument. Initially, the default value is returned. If the value is currently unspecified, null is returned.
Returns:
the current value of the argument.

setValue

public void setValue(String value)
Sets the value of the argument. The value should be checked with isValid(String) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector.launch(java.util.Map)

isValid

public boolean isValid(String value)
Performs basic sanity check of argument.
Returns:
true if the value is valid to be used in setValue(String)

mustSpecify

public boolean mustSpecify()
Indicates whether the argument must be specified. If true, setValue(java.lang.String) must be used to set a non-null value before using this argument in establishing a connection.
Returns:
true if the argument must be specified; false otherwise.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttachingConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface AttachingConnector

All Superinterfaces:
Connector
public interface AttachingConnector
extends Connector

A connector which attaches to a previously running target VM.

Since:
1.3

Inner classes inherited from class com.sun.jdi.connect.Connector
Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
Method Summary
 VirtualMachine attach(Map arguments)
Attaches to a running application and and returns a mirror of its VM.
Methods inherited from interface com.sun.jdi.connect.Connector
defaultArguments, description, name, transport

Method Detail

attach

public VirtualMachine attach(Map arguments)
                      throws IOException,
                             IllegalConnectorArgumentsException
Attaches to a running application and and returns a mirror of its VM.

The connector uses the given argument map in attaching the application. These arguments will include addressing information that identifies the VM. The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

Parameters:
arguments - the argument map to be used in launching the VM.
Returns:
the VirtualMachine mirror of the target VM.
Throws:
IOException - when unable to attach. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector.BooleanArgument

All Superinterfaces:
Connector.Argument, Serializable
Enclosing class:
Connector
public static interface Connector.BooleanArgument
extends Connector.Argument

Specification for and value of a Connector argument, whose value is Boolean. Boolean values are represented by the localized versions of the strings "true" and "false".

Method Summary
boolean | booleanValue() Return the value of the argument as a boolean.
boolean | isValid(String value) Performs basic sanity check of argument.
void | setValue(boolean value) Sets the value of the argument.
String | stringValueOf(boolean value) Return the string representation of the value parameter.
Methods inherited from interface com.sun.jdi.connect.Connector.Argument
description, label, mustSpecify, name, setValue, value

Method Detail

setValue

public void setValue(boolean value)
Sets the value of the argument.

isValid

public boolean isValid(String value)
Performs basic sanity check of argument.
Specified by:
isValid in interface Connector.Argument
Returns:
true if value is a string representation of a boolean value.
See Also:
stringValueOf(boolean)

stringValueOf

public String stringValueOf(boolean value)
Return the string representation of the value parameter. Does not set or examine the value or the argument.
Returns:
the localized String representation of the boolean value.

booleanValue

public boolean booleanValue()
Return the value of the argument as a boolean. Since the argument may not have been set or may have an invalid value isValid(String) should be called on Connector.Argument.value() to check its validity. If it is invalid the boolean returned by this method is undefined.
Returns:
the value of the argument as a boolean.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Interface com.sun.jdi.connect.AttachingConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.AttachingConnector

No usage of com.sun.jdi.connect.AttachingConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector.BooleanArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector.BooleanArgument

No usage of com.sun.jdi.connect.Connector.BooleanArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector.IntegerArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector.IntegerArgument

No usage of com.sun.jdi.connect.Connector.IntegerArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector.SelectedArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector.SelectedArgument

No usage of com.sun.jdi.connect.Connector.SelectedArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector.StringArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector.StringArgument

No usage of com.sun.jdi.connect.Connector.StringArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.ListeningConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.ListeningConnector

No usage of com.sun.jdi.connect.ListeningConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.connect.IllegalConnectorArgumentsException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.connect.IllegalConnectorArgumentsException

Packages that use IllegalConnectorArgumentsException
com.sun.jdi.connect This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of IllegalConnectorArgumentsException in com.sun.jdi.connect

Methods in com.sun.jdi.connect that throw IllegalConnectorArgumentsException
VirtualMachine | AttachingConnector.attach(Map arguments) Attaches to a running application and and returns a mirror of its VM.
VirtualMachine | LaunchingConnector.launch(Map arguments) Launches an application and connects to its VM.
String | ListeningConnector.startListening(Map arguments) Listens for one or more connections initiated by target VMs.
void | ListeningConnector.stopListening(Map arguments) Cancels listening for connections.
VirtualMachine | ListeningConnector.accept(Map arguments) Waits for a target VM to attach to this connector.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.connect.VMStartException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.connect.VMStartException

Packages that use VMStartException
com.sun.jdi.connect This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of VMStartException in com.sun.jdi.connect

Methods in com.sun.jdi.connect that throw VMStartException
 VirtualMachine LaunchingConnector.launch(Map arguments)
Launches an application and connects to its VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector

Packages that use Connector
com.sun.jdi.connect This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of Connector in com.sun.jdi.connect

Subinterfaces of Connector in com.sun.jdi.connect
interface | AttachingConnector A connector which attaches to a previously running target VM.
interface | LaunchingConnector A connector which can launch a target VM before connecting to it.
interface | ListeningConnector A connector which listens for a connection initiated by a target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Connector.Argument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Connector.Argument

Packages that use Connector.Argument
com.sun.jdi.connect This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of Connector.Argument in com.sun.jdi.connect

Subinterfaces of Connector.Argument in com.sun.jdi.connect
static interface | Connector.BooleanArgument Specification for and value of a Connector argument, whose value is Boolean.
static interface | Connector.IntegerArgument Specification for and value of a Connector argument, whose value is an integer.
static interface | Connector.SelectedArgument Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
static interface | Connector.StringArgument Specification for and value of a Connector argument, whose value is a String.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.LaunchingConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.LaunchingConnector

Packages that use LaunchingConnector
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of LaunchingConnector in com.sun.jdi

Methods in com.sun.jdi that return LaunchingConnector
 LaunchingConnector VirtualMachineManager.defaultConnector()
Identifies the default connector.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.connect.Transport

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.connect.Transport

Packages that use Transport
com.sun.jdi.connect This package defines connections between the virtual machine using the JDI and the target virtual machine.

Uses of Transport in com.sun.jdi.connect

Methods in com.sun.jdi.connect that return Transport
 Transport Connector.transport()
Returns the transport mechanism used by this connector to establish connections with a target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Connector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector

All Known Subinterfaces:
AttachingConnector, LaunchingConnector, ListeningConnector
public interface Connector

A method of connection between a debugger and a target VM. A connector encapsulates exactly one Transport. used to establish the connection. Each connector has a set of arguments which controls its operation. The arguments are stored as a map, keyed by a string. Each implementation defines the string argument keys it accepts.

Since:
1.3
See Also:
LaunchingConnector, AttachingConnector, ListeningConnector, Connector.Argument

Inner Class Summary
static interface | Connector.Argument Specification for and value of a Connector argument.
static interface | Connector.BooleanArgument Specification for and value of a Connector argument, whose value is Boolean.
static interface | Connector.IntegerArgument Specification for and value of a Connector argument, whose value is an integer.
static interface | Connector.SelectedArgument Specification for and value of a Connector argument, whose value is a String selected from a list of choices.
static interface | Connector.StringArgument Specification for and value of a Connector argument, whose value is a String.
Method Summary
Map | defaultArguments() Returns the arguments accepted by this Connector and their default values.
String | description() Returns a human-readable description of this connector and its purpose.
String | name() Returns a short identifier for the connector.
Transport | transport() Returns the transport mechanism used by this connector to establish connections with a target VM.

Method Detail

name

public String name()
Returns a short identifier for the connector. Connector implementors should follow similar naming conventions as are used with packages to avoid name collisions. For example, the Sun connector implementations have names prefixed with "com.sun.jdi.". Not intended for exposure to end-user.
Returns:
the name of this connector.

description

public String description()
Returns a human-readable description of this connector and its purpose.
Returns:
the description of this connector

transport

public Transport transport()
Returns the transport mechanism used by this connector to establish connections with a target VM.
Returns:
the Transport used by this connector.

defaultArguments

public Map defaultArguments()
Returns the arguments accepted by this Connector and their default values. The keys of the returned map are string argument names. The values are Connector.Argument containing information about the argument and its default value.
Returns:
the map associating argument names with argument information and default value.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IllegalConnectorArgumentsException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Class IllegalConnectorArgumentsException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.connect.IllegalConnectorArgumentsException
All Implemented Interfaces:
Serializable
public class IllegalConnectorArgumentsException
extends Exception

Thrown to indicate an invalid argument or inconsistent passed to a Connector.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
IllegalConnectorArgumentsException(String s, List names)
IllegalConnectorArgumentsException(String s, String name)
Method Summary
 List argumentNames()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalConnectorArgumentsException

public IllegalConnectorArgumentsException(String s,
                                          String name)

IllegalConnectorArgumentsException

public IllegalConnectorArgumentsException(String s,
                                          List names)
Method Detail

argumentNames

public List argumentNames()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IntegerArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector.IntegerArgument

All Superinterfaces:
Connector.Argument, Serializable
Enclosing class:
Connector
public static interface Connector.IntegerArgument
extends Connector.Argument

Specification for and value of a Connector argument, whose value is an integer. Integer values are represented by their corresponding strings.

Method Summary
int | intValue() Return the value of the argument as a int.
boolean | isValid(int value) Performs basic sanity check of argument.
boolean | isValid(String value) Performs basic sanity check of argument.
int | max() The upper bound for the value.
int | min() The lower bound for the value.
void | setValue(int value) Sets the value of the argument.
String | stringValueOf(int value) Return the string representation of the value parameter.
Methods inherited from interface com.sun.jdi.connect.Connector.Argument
description, label, mustSpecify, name, setValue, value

Method Detail

setValue

public void setValue(int value)
Sets the value of the argument. The value should be checked with isValid(int) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector.launch(java.util.Map)

isValid

public boolean isValid(String value)
Performs basic sanity check of argument.
Specified by:
isValid in interface Connector.Argument
Returns:
true if value represents an int that is min() <= value <= max()

isValid

public boolean isValid(int value)
Performs basic sanity check of argument.
Returns:
true if min() <= value <= max()

stringValueOf

public String stringValueOf(int value)
Return the string representation of the value parameter. Does not set or examine the value or the argument.
Returns:
the String representation of the int value.

intValue

public int intValue()
Return the value of the argument as a int. Since the argument may not have been set or may have an invalid value isValid(String) should be called on Connector.Argument.value() to check its validity. If it is invalid the int returned by this method is undefined.
Returns:
the value of the argument as a int.

max

public int max()
The upper bound for the value.
Returns:
the maximum allowed value for this argument.

min

public int min()
The lower bound for the value.
Returns:
the minimum allowed value for this argument.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LaunchingConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface LaunchingConnector

All Superinterfaces:
Connector
public interface LaunchingConnector
extends Connector

A connector which can launch a target VM before connecting to it.

Since:
1.3

Inner classes inherited from class com.sun.jdi.connect.Connector
Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
Method Summary
 VirtualMachine launch(Map arguments)
Launches an application and connects to its VM.
Methods inherited from interface com.sun.jdi.connect.Connector
defaultArguments, description, name, transport

Method Detail

launch

public VirtualMachine launch(Map arguments)
                      throws IOException,
                             IllegalConnectorArgumentsException,
                             VMStartException
Launches an application and connects to its VM. Properties of the launch (possibly including options, main class, and arguments) are specified in arguments. The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

Important note: If a target VM is launched through this funcctions, its output and error streams must be read as it executes. These streams are available through the Process object returned by VirtualMachine.process(). If the streams are not periodically read, the target VM will stop executing when the buffers for these streams are filled.

Parameters:
arguments - the argument map to be used in launching the VM.
Returns:
the VirtualMachine mirror of the target VM.
Throws:
IOException - when unable to launch. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
VMStartException - when the VM was successfully launched, but terminated with an error before a connection could be established.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ListeningConnector

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface ListeningConnector

All Superinterfaces:
Connector
public interface ListeningConnector
extends Connector

A connector which listens for a connection initiated by a target VM.

Since:
1.3

Inner classes inherited from class com.sun.jdi.connect.Connector
Connector.Argument, Connector.BooleanArgument, Connector.IntegerArgument, Connector.SelectedArgument, Connector.StringArgument
Method Summary
VirtualMachine | accept(Map arguments) Waits for a target VM to attach to this connector.
String | startListening(Map arguments) Listens for one or more connections initiated by target VMs.
void | stopListening(Map arguments) Cancels listening for connections.
boolean | supportsMultipleConnections() Indicates whether this listening connector supports multiple connections for a single argument map.
Methods inherited from interface com.sun.jdi.connect.Connector
defaultArguments, description, name, transport

Method Detail

supportsMultipleConnections

public boolean supportsMultipleConnections()
Indicates whether this listening connector supports multiple connections for a single argument map. If so, a call to startListening(java.util.Map) may allow multiple target VM to become connected.
Returns:
true if multiple connections are supported; false otherwise.

startListening

public String startListening(Map arguments)
                      throws IOException,
                             IllegalConnectorArgumentsException
Listens for one or more connections initiated by target VMs. The connector uses the given argument map in determining the address at which to listen or else it generates an appropriate listen address. In either case, an address string is returned from this method which can be used in starting target VMs to identify this this connector. The format of the address string is connector, transport, and, possibly, platform dependent.

The argument map associates argument name strings to instances of Connector.Argument. The default argument map for a connector can be obtained through Connector.defaultArguments(). Argument map values can be changed, but map entries should not be added or deleted.

This method does not return a VirtualMachine, and, normally, returns before any target VM initiates a connection. The connected target is obtained through accept(java.util.Map) (using the same argument map as is passed to this method).

Returns:
the address at which the connector is listening for a connection.
Throws:
IOException - when unable to start listening. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException - when one of the connector arguments is invalid.

stopListening

public void stopListening(Map arguments)
                   throws IOException,
                          IllegalConnectorArgumentsException
Cancels listening for connections. The given argument map should match the argument map given for a previous startListening(java.util.Map) invocation.
Throws:
IOException - when unable to stop listening. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException - when one of the connector arguments is invalid.

accept

public VirtualMachine accept(Map arguments)
                      throws IOException,
                             IllegalConnectorArgumentsException
Waits for a target VM to attach to this connector.
Throws:
IOException - when unable to accept. Specific exceptions are dependent on the Connector implementation in use.
IllegalConnectorArgumentsException - when one of the connector arguments is invalid.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SelectedArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector.SelectedArgument

All Superinterfaces:
Connector.Argument, Serializable
Enclosing class:
Connector
public static interface Connector.SelectedArgument
extends Connector.Argument

Specification for and value of a Connector argument, whose value is a String selected from a list of choices.

Method Summary
List | choices() Return the possible values for the argument
boolean | isValid(String value) Performs basic sanity check of argument.
Methods inherited from interface com.sun.jdi.connect.Connector.Argument
description, label, mustSpecify, name, setValue, value

Method Detail

choices

public List choices()
Return the possible values for the argument
Returns:
List of String

isValid

public boolean isValid(String value)
Performs basic sanity check of argument.
Specified by:
isValid in interface Connector.Argument
Returns:
true if value is one of choices().
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringArgument

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Connector.StringArgument

All Superinterfaces:
Connector.Argument, Serializable
Enclosing class:
Connector
public static interface Connector.StringArgument
extends Connector.Argument

Specification for and value of a Connector argument, whose value is a String.

Method Summary
 boolean isValid(String value)
Performs basic sanity check of argument.
Methods inherited from interface com.sun.jdi.connect.Connector.Argument
description, label, mustSpecify, name, setValue, value

Method Detail

isValid

public boolean isValid(String value)
Performs basic sanity check of argument.
Specified by:
isValid in interface Connector.Argument
Returns:
true always
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Transport

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Interface Transport

public interface Transport

A method of communication between a debugger and a target VM.

Since:
1.3

Method Summary
 String name()
Returns a short identifier for the transport.

Method Detail

name

public String name()
Returns a short identifier for the transport. Transport implementors should follow similar naming conventions as are used with packages to avoid name collisions. For example, the Sun transport implementations have names prefixed with "com.sun.jdi.".
Returns:
the name of this transport.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VMStartException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.connect
Class VMStartException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.connect.VMStartException
All Implemented Interfaces:
Serializable
public class VMStartException
extends Exception

A target VM was successfully launched, but terminated with an error before a connection could be established. This exception provides the Process object for the launched target to help in diagnosing the problem.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
VMStartException(Process process)
VMStartException(String message, Process process)
Method Summary
 Process process()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VMStartException

public VMStartException(Process process)

VMStartException

public VMStartException(String message,
                        Process process)
Method Detail

process

public Process process()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JDI Type Signatures
Type Signature | Java Type
Z | boolean
B | byte
C | char
S | short
I | int
J | long
F | float
D | double
L fully-qualified-class ; | fully-qualified-class
[ type | type[]
( arg-types ) ret-type | method type (including constructors)

For example, the Java method:

    long f (int n, String s, int[] arr);
has the following type signature:

    (ILjava/lang/String;[I)J


DoubleValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface DoubleValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface DoubleValue
extends PrimitiveValue, Comparable

Provides access to a primitive double value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this DoubleValue for equality.
int | hashCode() Returns the hash code value for this DoubleValue.
double | value() Returns this DoubleValue as a boolean.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public double value()
Returns this DoubleValue as a boolean.
Returns:
the double mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this DoubleValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a DoubleValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this DoubleValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface AccessWatchpointEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror, WatchpointEvent
public interface AccessWatchpointEvent
extends WatchpointEvent

Notification of a field access in the target VM. Field modifications are not considered field accesses.

Since:
1.3
See Also:
EventQueue, VirtualMachine

Methods inherited from interface com.sun.jdi.event.WatchpointEvent
field, object, valueCurrent
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BreakpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface BreakpointEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
public interface BreakpointEvent
extends LocatableEvent

Notification of a breakpoint in the target VM. The breakpoint event is generated before the code at its location is executed. When a location is reached which satisfies a currently enabled breakpoint request, an event set containing an instance of this class will be added to the VM's event queue.

Since:
1.3
See Also:
EventQueue, VirtualMachine, BreakpointRequest

Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


com.sun.jdi.event Class Hierarchy

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.jdi.event

Package Hierarchies:
All Packages

Interface Hierarchy

  • interface java.util.Collection
    • interface java.util.Set
      • interface com.sun.jdi.event.EventSet (also extends com.sun.jdi.Mirror)
  • interface java.util.Iterator
    • interface com.sun.jdi.event.EventIterator
  • interface com.sun.jdi.Locatable
    • interface com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.event.Event)
      • interface com.sun.jdi.event.BreakpointEvent
      • interface com.sun.jdi.event.ExceptionEvent
      • interface com.sun.jdi.event.MethodEntryEvent
      • interface com.sun.jdi.event.MethodExitEvent
      • interface com.sun.jdi.event.StepEvent
      • interface com.sun.jdi.event.WatchpointEvent
        • interface com.sun.jdi.event.AccessWatchpointEvent
        • interface com.sun.jdi.event.ModificationWatchpointEvent
  • interface com.sun.jdi.Mirror
    • interface com.sun.jdi.event.Event
      • interface com.sun.jdi.event.ClassPrepareEvent
      • interface com.sun.jdi.event.ClassUnloadEvent
      • interface com.sun.jdi.event.LocatableEvent (also extends com.sun.jdi.Locatable)
        • interface com.sun.jdi.event.BreakpointEvent
        • interface com.sun.jdi.event.ExceptionEvent
        • interface com.sun.jdi.event.MethodEntryEvent
        • interface com.sun.jdi.event.MethodExitEvent
        • interface com.sun.jdi.event.StepEvent
        • interface com.sun.jdi.event.WatchpointEvent
          • interface com.sun.jdi.event.AccessWatchpointEvent
          • interface com.sun.jdi.event.ModificationWatchpointEvent
      • interface com.sun.jdi.event.ThreadDeathEvent
      • interface com.sun.jdi.event.ThreadStartEvent
      • interface com.sun.jdi.event.VMDeathEvent
      • interface com.sun.jdi.event.VMDisconnectEvent
      • interface com.sun.jdi.event.VMStartEvent
    • interface com.sun.jdi.event.EventQueue
    • interface com.sun.jdi.event.EventSet (also extends java.util.Set)
Overview Package Class Use Tree Index Help
Java Debug Interface


Package com.sun.jdi.event

This package defines JDI events and event processing.

See:
Description

Interface Summary
AccessWatchpointEvent | Notification of a field access in the target VM.
BreakpointEvent | Notification of a breakpoint in the target VM.
ClassPrepareEvent | Notification of a class prepare in the target VM.
ClassUnloadEvent | Notification of a class unload in the target VM.
Event | An occurrence in a target VM that is of interest to a debugger.
EventIterator | EventIterators are unmodifiable.
EventQueue | Manager of incoming debugger events for a target VM.
EventSet | Several Event objects may be created at a given time by the target VirtualMachine.
ExceptionEvent | Notification of an exception in the target VM.
LocatableEvent | Abstract superinterface of events which have both location and thread.
MethodEntryEvent | Notification of a method invocation in the target VM.
MethodExitEvent | Notification of a method return in the target VM.
ModificationWatchpointEvent | Notification of a field modification in the target VM.
StepEvent | Notification of step completion in the target VM.
ThreadDeathEvent | Notification of a completed thread in the target VM.
ThreadStartEvent | Notification of a new running thread in the target VM.
VMDeathEvent | Notification of target VM termination.
VMDisconnectEvent | Notification of disconnection from target VM.
VMStartEvent | Notification of initialization of a target VM.
WatchpointEvent | Notification of a field triggered event encountered by a thread in the target VM.

Package com.sun.jdi.event Description

This package defines JDI events and event processing. An Event is always a member of an EventSet, which is retrieved from the EventQueue. Examples of Events include "breakpoints events", "thread creation events" and "virtual machine death event". With the exception of termination events, all events received must be requested with an "EventRequest". The com.sun.jdi.request package defines event requests and event request management.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Overview Package Class Use Tree Index Help
Java Debug Interface


StepEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface StepEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
public interface StepEvent
extends LocatableEvent

Notification of step completion in the target VM. The step event is generated before the code at its location is executed.

Since:
1.3
See Also:
EventQueue, StepRequest

Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Package com.sun.jdi.event

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Package
com.sun.jdi.event

Packages that use com.sun.jdi.event
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.

Classes in com.sun.jdi.event used by com.sun.jdi
EventQueue
Manager of incoming debugger events for a target VM.

Classes in com.sun.jdi.event used by com.sun.jdi.event
Event
An occurrence in a target VM that is of interest to a debugger.
EventIterator
EventIterators are unmodifiable.
EventSet
Several Event objects may be created at a given time by the target VirtualMachine.
LocatableEvent
Abstract superinterface of events which have both location and thread.
WatchpointEvent
Notification of a field triggered event encountered by a thread in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


VMDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface VMDeathEvent

All Superinterfaces:
Event, Mirror
public interface VMDeathEvent
extends Event

Notification of target VM termination.

Since:
1.3
See Also:
EventQueue, VirtualMachine

Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VMDisconnectEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface VMDisconnectEvent

All Superinterfaces:
Event, Mirror
public interface VMDisconnectEvent
extends Event

Notification of disconnection from target VM. May be caused by debugger action ( VirtualMachine.dispose() or VirtualMachine.exit(int)) or by external events (for example, target process termination by the operating system, transport termination, etc).

If the target VM terminates before the disconnection, this event will be preceded by a VMDeathEvent.

Since:
1.3
See Also:
VMDeathEvent, EventQueue, VirtualMachine

Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Interface com.sun.jdi.event.AccessWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.AccessWatchpointEvent

No usage of com.sun.jdi.event.AccessWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.BreakpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.BreakpointEvent

No usage of com.sun.jdi.event.BreakpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ClassPrepareEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ClassPrepareEvent

No usage of com.sun.jdi.event.ClassPrepareEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ClassUnloadEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ClassUnloadEvent

No usage of com.sun.jdi.event.ClassUnloadEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ExceptionEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ExceptionEvent

No usage of com.sun.jdi.event.ExceptionEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.MethodEntryEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.MethodEntryEvent

No usage of com.sun.jdi.event.MethodEntryEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.MethodExitEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.MethodExitEvent

No usage of com.sun.jdi.event.MethodExitEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ModificationWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ModificationWatchpointEvent

No usage of com.sun.jdi.event.ModificationWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.StepEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.StepEvent

No usage of com.sun.jdi.event.StepEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ThreadDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ThreadDeathEvent

No usage of com.sun.jdi.event.ThreadDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.ThreadStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.ThreadStartEvent

No usage of com.sun.jdi.event.ThreadStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.VMDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.VMDeathEvent

No usage of com.sun.jdi.event.VMDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.VMDisconnectEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.VMDisconnectEvent

No usage of com.sun.jdi.event.VMDisconnectEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.VMStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.VMStartEvent

No usage of com.sun.jdi.event.VMStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.Event

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.Event

Packages that use Event
com.sun.jdi.event This package defines JDI events and event processing.

Uses of Event in com.sun.jdi.event

Subinterfaces of Event in com.sun.jdi.event
interface | AccessWatchpointEvent Notification of a field access in the target VM.
interface | BreakpointEvent Notification of a breakpoint in the target VM.
interface | ClassPrepareEvent Notification of a class prepare in the target VM.
interface | ClassUnloadEvent Notification of a class unload in the target VM.
interface | ExceptionEvent Notification of an exception in the target VM.
interface | LocatableEvent Abstract superinterface of events which have both location and thread.
interface | MethodEntryEvent Notification of a method invocation in the target VM.
interface | MethodExitEvent Notification of a method return in the target VM.
interface | ModificationWatchpointEvent Notification of a field modification in the target VM.
interface | StepEvent Notification of step completion in the target VM.
interface | ThreadDeathEvent Notification of a completed thread in the target VM.
interface | ThreadStartEvent Notification of a new running thread in the target VM.
interface | VMDeathEvent Notification of target VM termination.
interface | VMDisconnectEvent Notification of disconnection from target VM.
interface | VMStartEvent Notification of initialization of a target VM.
interface | WatchpointEvent Notification of a field triggered event encountered by a thread in the target VM.

Methods in com.sun.jdi.event that return Event
 Event EventIterator.nextEvent()

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.EventIterator

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.EventIterator

Packages that use EventIterator
com.sun.jdi.event This package defines JDI events and event processing.

Uses of EventIterator in com.sun.jdi.event

Methods in com.sun.jdi.event that return EventIterator
 EventIterator EventSet.eventIterator()
Return an iterator specific to Event objects.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.EventQueue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.EventQueue

Packages that use EventQueue
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of EventQueue in com.sun.jdi

Methods in com.sun.jdi that return EventQueue
 EventQueue VirtualMachine.eventQueue()
Returns the event queue for this virtual machine.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.EventSet

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.EventSet

Packages that use EventSet
com.sun.jdi.event This package defines JDI events and event processing.

Uses of EventSet in com.sun.jdi.event

Methods in com.sun.jdi.event that return EventSet
EventSet | EventQueue.remove() Waits forever for the next available event.
EventSet | EventQueue.remove(long timeout) Waits a specified time for the next available event.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.LocatableEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.LocatableEvent

Packages that use LocatableEvent
com.sun.jdi.event This package defines JDI events and event processing.

Uses of LocatableEvent in com.sun.jdi.event

Subinterfaces of LocatableEvent in com.sun.jdi.event
interface | AccessWatchpointEvent Notification of a field access in the target VM.
interface | BreakpointEvent Notification of a breakpoint in the target VM.
interface | ExceptionEvent Notification of an exception in the target VM.
interface | MethodEntryEvent Notification of a method invocation in the target VM.
interface | MethodExitEvent Notification of a method return in the target VM.
interface | ModificationWatchpointEvent Notification of a field modification in the target VM.
interface | StepEvent Notification of step completion in the target VM.
interface | WatchpointEvent Notification of a field triggered event encountered by a thread in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.event.WatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.event.WatchpointEvent

Packages that use WatchpointEvent
com.sun.jdi.event This package defines JDI events and event processing.

Uses of WatchpointEvent in com.sun.jdi.event

Subinterfaces of WatchpointEvent in com.sun.jdi.event
interface | AccessWatchpointEvent Notification of a field access in the target VM.
interface | ModificationWatchpointEvent Notification of a field modification in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


ClassPrepareEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ClassPrepareEvent

All Superinterfaces:
Event, Mirror
public interface ClassPrepareEvent
extends Event

Notification of a class prepare in the target VM. See the JVM specification for a definition of class preparation. Class prepare events are not generated for primtiive classes (for example, java.lang.Integer.TYPE).

Since:
1.3
See Also:
EventQueue, VirtualMachine

Method Summary
ReferenceType | referenceType() Returns the reference type for which this event was generated.
ThreadReference | thread() Returns the thread in which this event has occurred.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

thread

public ThreadReference thread()
Returns the thread in which this event has occurred.

In rare cases, this event may occur in a debugger system thread within the target VM. Debugger threads take precautions to prevent these events, but they cannot be avoided under some conditions, especially for some subclasses of Error. If the event was generated by a debugger system thread, the value returned by this method is null, and if the requested suspend policy for the event was EventRequest.SUSPEND_EVENT_THREAD, all threads will be suspended instead, and the EventSet.suspendPolicy() will reflect this change.

Note that the discussion above does not apply to system threads created by the target VM during its normal (non-debug) operation.

Returns:
a ThreadReference which mirrors the event's thread in the target VM, or null in the rare cases described above.

referenceType

public ReferenceType referenceType()
Returns the reference type for which this event was generated.
Returns:
a ReferenceType which mirrors the class, interface, or array which has been linked.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassUnloadEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ClassUnloadEvent

All Superinterfaces:
Event, Mirror
public interface ClassUnloadEvent
extends Event

Notification of a class unload in the target VM.

There are severe constraints on the debugger back-end during garbage collection, so unload information is greatly limited.

Since:
1.3
See Also:
EventQueue, VirtualMachine

Method Summary
String | className() Returns the name of the class that has been unloaded.
String | classSignature() Returns the JNI-style signature of the class that has been unloaded.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

className

public String className()
Returns the name of the class that has been unloaded.

classSignature

public String classSignature()
Returns the JNI-style signature of the class that has been unloaded.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Event

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface Event

All Superinterfaces:
Mirror
All Known Subinterfaces:
AccessWatchpointEvent, BreakpointEvent, ClassPrepareEvent, ClassUnloadEvent, ExceptionEvent, LocatableEvent, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, StepEvent, ThreadDeathEvent, ThreadStartEvent, VMDeathEvent, VMDisconnectEvent, VMStartEvent, WatchpointEvent
public interface Event
extends Mirror

An occurrence in a target VM that is of interest to a debugger. Event is the common superinterface for all events (examples include BreakpointEvent, ExceptionEvent, ClassPrepareEvent). When an event occurs, an instance of Event as a component of an EventSet is enqueued in the VirtualMachine's EventQueue.

Since:
1.3
See Also:
EventSet, EventQueue

Method Summary
 EventRequest request()
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

request

public EventRequest request()
Returns:
The EventRequest that requested this event. Some events (eg. VMDeathEvent) may not have a cooresponding request and thus will return null.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventIterator

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface EventIterator

All Superinterfaces:
Iterator
public interface EventIterator
extends Iterator

EventIterators are unmodifiable.

Since:
1.3
See Also:
Event, EventSet, Set.iterator()

Method Summary
 Event nextEvent()
Methods inherited from interface java.util.Iterator
hasNext, next, remove

Method Detail

nextEvent

public Event nextEvent()
Returns:
The next Event in an EventSet.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventQueue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface EventQueue

All Superinterfaces:
Mirror
public interface EventQueue
extends Mirror

Manager of incoming debugger events for a target VM. Events are always grouped in EventSets. EventSets generated by the debugger back end can be read here. There is one instance of EventQueue assigned to a particular VirtualMachine.

Since:
1.3
See Also:
EventSet, VirtualMachine

Method Summary
EventSet | remove() Waits forever for the next available event.
EventSet | remove(long timeout) Waits a specified time for the next available event.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

remove

public EventSet remove()
                throws InterruptedException
Waits forever for the next available event.
Returns:
the next EventSet.
Throws:
InterruptedException - if another thread has interrupted this thread.
VMDisconnectedException - if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.

remove

public EventSet remove(long timeout)
                throws InterruptedException
Waits a specified time for the next available event.
Parameters:
timeout - Time in milliseconds to wait for the next event
Returns:
the next EventSet, or null if there is a timeout.
Throws:
InterruptedException - if another thread has interrupted this thread.
VMDisconnectedException - if the connection to the target VM is no longer available. Note this will always be preceded by a VMDisconnectEvent.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EventSet

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface EventSet

All Superinterfaces:
Collection, Mirror, Set
public interface EventSet
extends Mirror, Set

Several Event objects may be created at a given time by the target VirtualMachine. For example, there may be more than one BreakpointRequest for a given Location or you might single step to the same location as a BreakpointRequest. These Event objects are delivered together as an EventSet. For uniformity, an EventSet is always used to deliver Event objects. EventSets are delivered by the EventQueue. EventSets are unmodifiable.

The event that are grouped in an EventSet are restricted in the following ways:

  • Always singleton sets:
    • VMStartEvent
    • VMDeathEvent
    • VMDisconnectEvent
  • Only with other ThreadStartEvents for the same thread:
    • ThreadStartEvent
  • Only with other ThreadDeathEvents for the same thread:
    • ThreadDeathEvent
  • Only with other ClassPrepareEvents for the same class:
    • ClassPrepareEvent
  • Only with other ClassUnloadEvents for the same class:
    • ClassUnloadEvent
  • Only with other AccessWatchpointEvents for the same field access:
    • AccessWatchpointEvent
  • Only with other ModificationWatchpointEvents for the same field modification:
    • ModificationWatchpointEvent
  • Only with other ExceptionEvents for the same exception occurrance:
    • ExceptionEvent
  • Only with other members of this group, at the same location and in the same thread:
    • BreakpointEvent
    • StepEvent
    • MethodEntryEvent
    • MethodExitEvent

Since:
1.3
See Also:
Event, EventQueue

Method Summary
EventIterator | eventIterator() Return an iterator specific to Event objects.
void | resume()
int | suspendPolicy() Returns the policy used to suspend threads in the target VM for this event set.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray

Method Detail

suspendPolicy

public int suspendPolicy()
Returns the policy used to suspend threads in the target VM for this event set. This policy is selected from the suspend policies for each event's request. The one that suspends the most threads is chosen when the event occurs in the target VM and that policy is returned here. See EventRequest for the possible policy values.

In rare cases, the suspend policy may differ from the requested value if a ClassPrepareEvent has occurred in a debugger system thread. See ClassPrepareEvent.thread() for details.

Returns:
the integer suspendPolicy

eventIterator

public EventIterator eventIterator()
Return an iterator specific to Event objects.

resume

public void resume()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ExceptionEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ExceptionEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
public interface ExceptionEvent
extends LocatableEvent

Notification of an exception in the target VM. When an exception is thrown which satisfies a currently enabled exception request, an event set containing an instance of this class will be added to the VM's event queue. If the exception is thrown from a non-native method, the exception event is generated at the location where the exception is thrown. If the exception is thrown from a native method, the exception event is generated at the first non-native location reached after the exception is thrown.

Since:
1.3

Method Summary
Location | catchLocation() Gets the location where the exception will be caught.
ObjectReference | exception() Gets the thrown exception object.
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

exception

public ObjectReference exception()
Gets the thrown exception object. The exception object is an instance of Throwable or a subclass in the target VM.
Returns:
an ObjectReference which mirrors the thrown object in the target VM.

catchLocation

public Location catchLocation()
Gets the location where the exception will be caught. An exception is considered to be caught if, at the point of the throw, the current location is dynamically enclosed in a try statement that handles the exception. (See the JVM specification for details). If there is such a try statement, the catch location is the first code index of the appropriate catch clause.

If there are native methods in the call stack at the time of the exception, there are important restrictions to note about the returned catch location. In such cases, it is not possible to predict whether an exception will be handled by some native method on the call stack. Thus, it is possible that exceptions considered uncaught here will, in fact, be handled by a native method and not cause termination of the target VM. Furthermore, it cannot be assumed that the catch location returned here will ever be reached by the throwing thread. If there is a native frame between the current location and the catch location, the exception might be handled and cleared in that native method instead.

Note that the compiler can generate try-catch blocks in some cases where they are not explicit in the source code; for example, the code generated for synchronized and finally blocks can contain implicit try-catch blocks. If such an implicitly generated try-catch is present on the call stack at the time of the throw, the exception will be considered caught even though it appears to be uncaught from examination of the source code.

Returns:
the Location where the exception will be caught or null if the exception is uncaught.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LocatableEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface LocatableEvent

All Superinterfaces:
Event, Locatable, Mirror
All Known Subinterfaces:
AccessWatchpointEvent, BreakpointEvent, ExceptionEvent, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, StepEvent, WatchpointEvent
public interface LocatableEvent
extends Event, Locatable

Abstract superinterface of events which have both location and thread.

Since:
1.3

Method Summary
 ThreadReference thread()
Returns the thread in which this event has occurred.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

thread

public ThreadReference thread()
Returns the thread in which this event has occurred.
Returns:
a ThreadReference which mirrors the event's thread in the target VM.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MethodEntryEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface MethodEntryEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
public interface MethodEntryEvent
extends LocatableEvent

Notification of a method invocation in the target VM. This event is generated before any code in the invoked method has executed. Method entry events are generated for both native and non-native methods.

In some VMs method entry events can occur for a particular thread before its ThreadStartEvent occurs if methods are called as part of the thread's initialization.

Since:
1.3
See Also:
EventQueue

Method Summary
 Method method()
Returns the method that was entered.
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

method

public Method method()
Returns the method that was entered.
Returns:
a Method which mirrors the method that was entered.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MethodExitEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface MethodExitEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
public interface MethodExitEvent
extends LocatableEvent

Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.

Since:
1.3
See Also:
EventQueue

Method Summary
 Method method()
Returns the method that was exited.
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

method

public Method method()
Returns the method that was exited.
Returns:
a Method which mirrors the method that was exited.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModificationWatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ModificationWatchpointEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror, WatchpointEvent
public interface ModificationWatchpointEvent
extends WatchpointEvent

Notification of a field modification in the target VM.

Since:
1.3
See Also:
EventQueue, VirtualMachine, ModificationWatchpointRequest

Method Summary
 Value valueToBe()
Value that will be assigned to the field when the instruction completes.
Methods inherited from interface com.sun.jdi.event.WatchpointEvent
field, object, valueCurrent
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

valueToBe

public Value valueToBe()
Value that will be assigned to the field when the instruction completes.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadDeathEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ThreadDeathEvent

All Superinterfaces:
Event, Mirror
public interface ThreadDeathEvent
extends Event

Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for VirtualMachine.allThreads() to return this thread after this event is received.

Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.

Since:
1.3
See Also:
EventQueue, VirtualMachine, ThreadReference

Method Summary
 ThreadReference thread()
Returns the thread which is terminating.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

thread

public ThreadReference thread()
Returns the thread which is terminating.
Returns:
a ThreadReference which mirrors the event's thread in the target VM.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface ThreadStartEvent

All Superinterfaces:
Event, Mirror
public interface ThreadStartEvent
extends Event

Notification of a new running thread in the target VM. The new thread can be the result of a call to java.lang.Thread#start or the result of attaching a new thread to the VM though JNI. The notification is generated by the new thread some time before its execution starts. Because of this timing, it is possible to receive other events for the thread before this event is received. (Notably, MethodEntryEvents and MethodExitEvents might occur during thread initialization.) It is also possible for VirtualMachine.allThreads() to return a new started thread before this event is received.

Note that this event gives no information about the creation of the thread object which may have happened much earlier, depending on the VM being debugged.

Since:
1.3
See Also:
EventQueue, VirtualMachine, ThreadReference

Method Summary
 ThreadReference thread()
Returns the thread which has started.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

thread

public ThreadReference thread()
Returns the thread which has started.
Returns:
a ThreadReference which mirrors the event's thread in the target VM.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VMStartEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface VMStartEvent

All Superinterfaces:
Event, Mirror
public interface VMStartEvent
extends Event

Notification of initialization of a target VM. This event is received before the main thread is started and before any application code has been executed. Before this event occurs a significant amount of system code has executed and a number of system classes have been loaded. This event is always generated by the target VM, even if not explicitly requested.

Since:
1.3
See Also:
VMDeathEvent, EventQueue, VirtualMachine

Method Summary
 ThreadReference thread()
Returns the initial thread of the VM which has started.
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

thread

public ThreadReference thread()
Returns the initial thread of the VM which has started.
Returns:
a ThreadReference which mirrors the event's thread in the target VM.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WatchpointEvent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.event
Interface WatchpointEvent

All Superinterfaces:
Event, Locatable, LocatableEvent, Mirror
All Known Subinterfaces:
AccessWatchpointEvent, ModificationWatchpointEvent
public interface WatchpointEvent
extends LocatableEvent

Notification of a field triggered event encountered by a thread in the target VM.

Since:
1.3
See Also:
EventQueue, VirtualMachine

Method Summary
Field | field() Returns the field that is about to be accessed/modified.
ObjectReference | object() Returns the object whose field is about to be accessed/modified.
Value | valueCurrent() Current value of the field.
Methods inherited from interface com.sun.jdi.event.LocatableEvent
thread
Methods inherited from interface com.sun.jdi.event.Event
request
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Locatable
location

Method Detail

field

public Field field()
Returns the field that is about to be accessed/modified.
Returns:
a Field which mirrors the field in the target VM.

object

public ObjectReference object()
Returns the object whose field is about to be accessed/modified. Return null is the access is to a static field.
Returns:
a ObjectReference which mirrors the event's object in the target VM.

valueCurrent

public Value valueCurrent()
Current value of the field.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Field

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Field

All Superinterfaces:
Accessible, Comparable, Mirror, TypeComponent
public interface Field
extends TypeComponent, Comparable

A static or instance field in the target VM. See TypeComponent for general information about Field and Method mirrors.

Since:
1.3
See Also:
ObjectReference, ReferenceType

Method Summary
boolean | equals(Object obj) Compares the specified Object with this field for equality.
int | hashCode() Returns the hash code value for this Field.
boolean | isTransient() Determine if this is a transient field.
boolean | isVolatile() Determine if this is a volatile field.
Type | type() Returns the type of the this Field.
String | typeName() Returns a text representation of the declared type.
Methods inherited from interface com.sun.jdi.TypeComponent
declaringType, isFinal, isStatic, isSynthetic, name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

typeName

public String typeName()
Returns a text representation of the declared type.
Returns:
a string containing the type name

type

public Type type()
          throws ClassNotLoadedException
Returns the type of the this Field. For primitive fields, an appropriate PrimitiveType is always returned. For object fields, the appropriate ReferenceType is returned if it has been loaded through the enclosing type's (that is, the type returned by TypeComponent#enclosingType) class loader.
Returns:
the Type of this field.
Throws:
ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.

isTransient

public boolean isTransient()
Determine if this is a transient field.
Returns:
true if this field is transient; false otherwise.

isVolatile

public boolean isVolatile()
Determine if this is a volatile field.
Returns:
true if this field is volatile; false otherwise.

equals

public boolean equals(Object obj)
Compares the specified Object with this field for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a Field and if both mirror the same field (declared in the same class or interface, in the same VM).

hashCode

public int hashCode()
Returns the hash code value for this Field.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface FloatValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface FloatValue
extends PrimitiveValue, Comparable

Provides access to a primitive float value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this FloatValue for equality.
int | hashCode() Returns the hash code value for this FloatValue.
float | value() Returns this FloatValue as a float.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public float value()
Returns this FloatValue as a float.
Returns:
the float mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this FloatValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a FloatValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this FloatValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IncompatibleThreadStateException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class IncompatibleThreadStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.IncompatibleThreadStateException
All Implemented Interfaces:
Serializable
public class IncompatibleThreadStateException
extends Exception

Thrown to indicate that the requested operation cannot be completed while the specified thread is in its current state.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
IncompatibleThreadStateException()
IncompatibleThreadStateException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IncompatibleThreadStateException

public IncompatibleThreadStateException()

IncompatibleThreadStateException

public IncompatibleThreadStateException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InconsistentDebugInfoException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InconsistentDebugInfoException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.InconsistentDebugInfoException
All Implemented Interfaces:
Serializable
public class InconsistentDebugInfoException
extends RuntimeException

Thrown to indicate that there is an inconistency in the debug information provided by the target VM. For example, this exception is thrown if there is a type mismatch between a retrieved value's runtime type and its declared type as reported by the target VM.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InconsistentDebugInfoException()
InconsistentDebugInfoException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InconsistentDebugInfoException

public InconsistentDebugInfoException()

InconsistentDebugInfoException

public InconsistentDebugInfoException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntegerValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface IntegerValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface IntegerValue
extends PrimitiveValue, Comparable

Provides access to a primitive int value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this IntegerValue for equality.
int | hashCode() Returns the hash code value for this IntegerValue.
int | value() Returns this IntegerValue as an int.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public int value()
Returns this IntegerValue as an int.
Returns:
the int mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this IntegerValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is an IntegerValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this IntegerValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InterfaceType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface InterfaceType

All Superinterfaces:
Accessible, Comparable, Mirror, ReferenceType, Type
public interface InterfaceType
extends ReferenceType

A mirror of an interface in the target VM. An InterfaceType is a refinement of ReferenceType that applies to true interfaces in the JLS sense of the definition (not a class, not an array type). An interface type will never be returned by ObjectReference.referenceType(), but it may be in the list of implemented interfaces for a ClassType that is returned by that method.

Since:
1.3
See Also:
ObjectReference

Method Summary
List | implementors() Gets the currently prepared classes which directly implement this interface.
List | subinterfaces() Gets the currently prepared interfaces which directly extend this interface.
List | superinterfaces() Gets the interfaces directly extended by this interface.
Methods inherited from interface com.sun.jdi.ReferenceType
allFields, allLineLocations, allMethods, classLoader, classObject, equals, failedToInitialize, fieldByName, fields, getValue, getValues, hashCode, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, methods, methodsByName, methodsByName, name, nestedTypes, sourceName, visibleFields, visibleMethods
Methods inherited from interface com.sun.jdi.Type
signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

Method Detail

superinterfaces

public List superinterfaces()
Gets the interfaces directly extended by this interface. The returned list contains only those interfaces this interface has declared to be extended.
Returns:
a List of InterfaceType objects each mirroring an interface extended by this interface. If none exist, returns a zero length List.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this interface has been unloaded and garbage collected.

subinterfaces

public List subinterfaces()
Gets the currently prepared interfaces which directly extend this interface. The returned list contains only those interfaces that declared this interface in their "extends" clause.
Returns:
a List of InterfaceType objects each mirroring an interface extending this interface. If none exist, returns a zero length List.
Throws:
ObjectCollectedException - if this interface has been unloaded and garbage collected.

implementors

public List implementors()
Gets the currently prepared classes which directly implement this interface. The returned list contains only those classes that declared this interface in their "implements" clause.
Returns:
a List of ClassType objects each mirroring a class implementing this interface. If none exist, returns a zero length List.
Throws:
ObjectCollectedException - if this interface has been unloaded and garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InternalException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InternalException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.InternalException
All Implemented Interfaces:
Serializable
public class InternalException
extends RuntimeException

Thrown to indicate that an unexpected internal error has occurred.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InternalException()
InternalException(int errorCode)
InternalException(String s)
InternalException(String s, int errorCode)
Method Summary
 int errorCode()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InternalException

public InternalException()

InternalException

public InternalException(String s)

InternalException

public InternalException(int errorCode)

InternalException

public InternalException(String s,
                         int errorCode)
Method Detail

errorCode

public int errorCode()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidCodeIndexException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InvalidCodeIndexException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.InvalidCodeIndexException
All Implemented Interfaces:
Serializable
public class InvalidCodeIndexException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the specified code index is not valid.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvalidCodeIndexException()
InvalidCodeIndexException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidCodeIndexException

public InvalidCodeIndexException()

InvalidCodeIndexException

public InvalidCodeIndexException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidLineNumberException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InvalidLineNumberException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.InvalidLineNumberException
All Implemented Interfaces:
Serializable
public class InvalidLineNumberException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the specified line number is not valid.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvalidLineNumberException()
InvalidLineNumberException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidLineNumberException

public InvalidLineNumberException()

InvalidLineNumberException

public InvalidLineNumberException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidStackFrameException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InvalidStackFrameException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.InvalidStackFrameException
All Implemented Interfaces:
Serializable
public class InvalidStackFrameException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the specified stack frame is no longer valid.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvalidStackFrameException()
InvalidStackFrameException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidStackFrameException

public InvalidStackFrameException()

InvalidStackFrameException

public InvalidStackFrameException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidTypeException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InvalidTypeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.InvalidTypeException
All Implemented Interfaces:
Serializable
public class InvalidTypeException
extends Exception

Thrown to indicate a type mismatch in setting the value of a field or variable.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvalidTypeException()
InvalidTypeException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidTypeException

public InvalidTypeException()

InvalidTypeException

public InvalidTypeException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvocationException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class InvocationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sun.jdi.InvocationException
All Implemented Interfaces:
Serializable
public class InvocationException
extends Exception

Thrown to indicate an exception occurred in an invoked method within the target VM.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvocationException(ObjectReference exception)
Method Summary
 ObjectReference exception()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvocationException

public InvocationException(ObjectReference exception)
Method Detail

exception

public ObjectReference exception()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LocalVariable

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface LocalVariable

All Superinterfaces:
Comparable, Mirror
public interface LocalVariable
extends Mirror, Comparable

A local variable in the target VM. Each variable declared within a Method has its own LocalVariable object. Variables of the same name declared in different scopes have different LocalVariable objects. LocalVariables can be used alone to retrieve static information about their declaration, or can be used in conjunction with a StackFrame to set and get values.

Since:
1.3
See Also:
StackFrame, Method

Method Summary
boolean | equals(Object obj) Compares the specified Object with this LocalVariable for equality.
int | hashCode() Returns the hash code value for this LocalVariable.
boolean | isArgument() Determines if this variable is an argument to its method.
boolean | isVisible(StackFrame frame) Determines whether this variable can be accessed from the given StackFrame.
String | name() Gets the name of the local variable.
String | signature() Gets the JNI signature of the local variable.
Type | type() Returns the type of the this LocalVariable.
String | typeName()
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

name

public String name()
Gets the name of the local variable.
Returns:
a string containing the name.

typeName

public String typeName()
Returns:
a text representation of the declared type of this variable.

type

public Type type()
          throws ClassNotLoadedException
Returns the type of the this LocalVariable. For primitive variables, an appropriate PrimitiveType is always returned. For object variables, the appropriate ReferenceType is returned if it has been loaded through the enclosing type's class loader.
Returns:
the Type of this local variable.
Throws:
ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.

signature

public String signature()
Gets the JNI signature of the local variable.
Returns:
a string containing the signature.
See Also:
Type Signatures

isVisible

public boolean isVisible(StackFrame frame)
Determines whether this variable can be accessed from the given StackFrame. See StackFrame.visibleVariables() for a complete description variable visibility in this interface.
Parameters:
frame - the StackFrame querying visibility
Returns:
true if this variable is visible; false otherwise.
Throws:
IllegalArgumentException - if the stack frame's method does not match this variable's method.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

isArgument

public boolean isArgument()
Determines if this variable is an argument to its method.
Returns:
true if this variable is final; false otherwise.

equals

public boolean equals(Object obj)
Compares the specified Object with this LocalVariable for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a LocalVariable, if both LocalVariables are contained in the same method (as determined by Method.equals(java.lang.Object)), and if both LocalVariables mirror the same declaration within that method

hashCode

public int hashCode()
Returns the hash code value for this LocalVariable.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Locatable

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Locatable

All Known Subinterfaces:
AccessWatchpointEvent, BreakpointEvent, BreakpointRequest, ExceptionEvent, LocatableEvent, Method, MethodEntryEvent, MethodExitEvent, ModificationWatchpointEvent, StackFrame, StepEvent, WatchpointEvent
public interface Locatable

A mirror that has a Location.

Since:
1.3

Method Summary
 Location location()
Returns the Location of this mirror, if there is executable Java language code associated with it.

Method Detail

location

public Location location()
Returns the Location of this mirror, if there is executable Java language code associated with it.
Returns:
the Location of this mirror, or null if there is no executable code associated with it. For example, abstract and native Methods will return null when their location method is called.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Location

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Location

All Superinterfaces:
Comparable, Mirror
public interface Location
extends Mirror, Comparable

A point within the executing code of the target VM. Locations are used to identify the current position of a suspended thread (analogous to an instruction pointer or program counter register in native programs). They are also used to identify the position at which to set a breakpoint.

The availability of a line number for a location will depend on the level of debugging information available from the target VM.

Several mirror interfaces have locations. Each such mirror extends a Locatable interface.

Since:
1.3
See Also:
EventRequestManager, StackFrame, BreakpointEvent, ExceptionEvent, Locatable

Method Summary
long | codeIndex() Gets the code position within this location's method.
ReferenceType | declaringType() Gets the type to which this Location belongs.
boolean | equals(Object obj) Compares the specified Object with this Location for equality.
int | hashCode() Returns the hash code value for this Location.
int | lineNumber() The line number of this Location.
Method | method() Gets the method, if any, containing this Location.
String | sourceName() Gets an identifing name for the source corresponding to this location.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

declaringType

public ReferenceType declaringType()
Gets the type to which this Location belongs. Normally the declaring type is a ClassType, but executable locations also may exist within the static initializer of an InterfaceType.
Returns:
the ReferenceType containing this Location.

method

public Method method()
Gets the method, if any, containing this Location.
Returns:
the Method if this location is in a method, otherwise null.

codeIndex

public long codeIndex()
Gets the code position within this location's method.
Returns:
the long representing the position within the method, or -1 if the method is native.

sourceName

public String sourceName()
                  throws AbsentInformationException
Gets an identifing name for the source corresponding to this location. Interpretation of this string is the responsibility of the source repository mechanism.

In the reference implementation, the returned string is the unqualified name of the source file for this Location.

Returns:
a string specifying the source
Throws:
AbsentInformationException - if the source name is not known

lineNumber

public int lineNumber()
The line number of this Location. The line number is relative to the source specified by sourceName().
Returns:
an int specifying the line in the source, return -1 if the information is not available.

equals

public boolean equals(Object obj)
Compares the specified Object with this Location for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a Location and if it refers to the same point in the same VM as this Location.

hashCode

public int hashCode()
Returns the hash code value for this Location.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface LongValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface LongValue
extends PrimitiveValue, Comparable

Provides access to a primitive long value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this LongValue for equality.
int | hashCode() Returns the hash code value for this LongValue.
long | value() Returns this LongValue as a long.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public long value()
Returns this LongValue as a long.
Returns:
the long mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this LongValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a LongValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this LongValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Method

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Method

All Superinterfaces:
Accessible, Comparable, Locatable, Mirror, TypeComponent
public interface Method
extends TypeComponent, Locatable, Comparable

A static or instance method in the target VM. See TypeComponent for general information about Field and Method mirrors.

Since:
1.3
See Also:
ObjectReference, ReferenceType

Method Summary
List | allLineLocations() Returns the beginning Location objects for each executable source line in this method.
List | arguments() Returns a list containing each LocalVariable that is declared as an argument of this method.
List | argumentTypeNames() Returns a text representation of all declared argument types of this method.
List | argumentTypes() Returns the list containing the type of each argument.
byte[] | bytecodes() Returns an array containing the bytecodes for this method.
boolean | equals(Object obj) Compares the specified Object with this method for equality.
int | hashCode() Returns the hash code value for this Method.
boolean | isAbstract() Determine if this method is abstract.
boolean | isConstructor() Determine if this method is a constructor.
boolean | isNative() Determine if this method is native.
boolean | isStaticInitializer() Determine if this method is a static initializer.
boolean | isSynchronized() Determine if this method is synchronized.
Location | locationOfCodeIndex(long codeIndex) Returns a Location for the given code index.
List | locationsOfLine(int lineNumber) Returns a list containing each Location that maps to the given line.
Type | returnType() Returns the return type of the this Method.
String | returnTypeName() Returns a text representation of the declared return type of this method.
List | variables() Returns a list containing each LocalVariable declared in this method.
List | variablesByName(String name) Returns a list containing each LocalVariable of a given name in this method.
Methods inherited from interface com.sun.jdi.TypeComponent
declaringType, isFinal, isStatic, isSynthetic, name, signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers
Methods inherited from interface com.sun.jdi.Locatable
location
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

returnTypeName

public String returnTypeName()
Returns a text representation of the declared return type of this method.
Returns:
a string containing the return type name.

returnType

public Type returnType()
                throws ClassNotLoadedException
Returns the return type of the this Method. For methods returning primitive values, an appropriate PrimitiveType is always returned. For methods returning object values, the appropriate ReferenceType is returned if it has been loaded through the enclosing type's (that is, the type returned by TypeComponent#enclosingType) class loader.
Returns:
the return Type of this method.
Throws:
ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.

argumentTypeNames

public List argumentTypeNames()
Returns a text representation of all declared argument types of this method. This list is always available even if argument variables are unavailable due to absent debug information.
Returns:
a List of strings containing the return type name.

argumentTypes

public List argumentTypes()
                   throws ClassNotLoadedException
Returns the list containing the type of each argument. For primitive arguments, an appropriate PrimitiveType is always returned. For object arguments, the appropriate ReferenceType is returned if it has been loaded through the enclosing type's (that is, the type returned by TypeComponent#enclosingType) class loader.
Returns:
the list of argument types for this method.
Throws:
ClassNotLoadedException - if the type has not yet been loaded through the appropriate class loader.

isAbstract

public boolean isAbstract()
Determine if this method is abstract.
Returns:
true if the method is declared abstract; false otherwise.

isSynchronized

public boolean isSynchronized()
Determine if this method is synchronized.
Returns:
true if the method is declared synchronized; false otherwise.

isNative

public boolean isNative()
Determine if this method is native.
Returns:
true if the method is declared native; false otherwise.

isConstructor

public boolean isConstructor()
Determine if this method is a constructor.
Returns:
true if the method is a constructor; false otherwise.

isStaticInitializer

public boolean isStaticInitializer()
Determine if this method is a static initializer.
Returns:
true if the method is a static initializer; false otherwise.

allLineLocations

public List allLineLocations()
                      throws AbsentInformationException
Returns the beginning Location objects for each executable source line in this method. Each location maps a source line to a range of code indices. The beginning of the range can be determined through Location.codeIndex(). The returned list is ordered by code index (from low to high). The returned list may contain multiple locations for a particular line number, if the compiler and/or VM has mapped that line to two or more disjoint code index ranges.

If the method is native or abstract, an empty list is returned.

Returns:
a List of all source line Location objects.
Throws:
AbsentInformationException - if there is no line number information for this (non-native, non-abstract) method.

locationsOfLine

public List locationsOfLine(int lineNumber)
                     throws AbsentInformationException
Returns a list containing each Location that maps to the given line. The returned list will contain a location for each disjoint range of code indices that have been assigned to the given line by the compiler and/or VM. Each returned location corresponds to the beginning of this range.
Parameters:
lineNumber - the line number
Returns:
a List of Location objects that map to the given line number.
Throws:
AbsentInformationException - if there is no line number information for this method.
InvalidLineNumberException - if there is no executable code in this method associated with the given line.

locationOfCodeIndex

public Location locationOfCodeIndex(long codeIndex)
Returns a Location for the given code index.
Returns:
the Location correspoding to the the given code index.
Throws:
InvalidCodeIndexException - if there is no valid location at the specified code index

variables

public List variables()
               throws AbsentInformationException
Returns a list containing each LocalVariable declared in this method. The list includes any variable declared in any scope within the method. It may contain multiple variables of the same name declared within disjoint scopes. Arguments are considered local variables and will be present in the returned list.
Returns:
the list of LocalVariable objects which mirror local variables declared in this method in the target VM. If there are no local variables, a zero-length list is returned.
Throws:
AbsentInformationException - if there is no variable information for this method.
NativeMethodException - if this operation is attempted for a native method.

variablesByName

public List variablesByName(String name)
                     throws AbsentInformationException
Returns a list containing each LocalVariable of a given name in this method. Multiple variables can be returned if the same variable name is used in disjoint scopes within the method.
Returns:
the list of LocalVariable objects of the given name. If there are no matching local variables, a zero-length list is returned.
Throws:
AbsentInformationException - if there is no variable information for this method.
NativeMethodException - if this operation is attempted for a native method.

arguments

public List arguments()
               throws AbsentInformationException
Returns a list containing each LocalVariable that is declared as an argument of this method.
Returns:
the list of LocalVariable arguments. If there are no arguments, a zero-length list is returned.
Throws:
AbsentInformationException - if there is no variable information for this method.
NativeMethodException - if this operation is attempted for a native method.

bytecodes

public byte[] bytecodes()
Returns an array containing the bytecodes for this method.

Not all target VMs support this query. See VirtualMachine#canGetBytecodes to determine if the operation is supported.

Returns:
the array of bytecodes.
Throws:
java.lang.UnsupportedOperationException - if the target VM does not support the retrieval of bytecodes.

equals

public boolean equals(Object obj)
Compares the specified Object with this method for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a method and if both mirror the same method (declared in the same class or interface, in the same VM).

hashCode

public int hashCode()
Returns the hash code value for this Method.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Mirror

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Mirror

All Known Subinterfaces:
AccessWatchpointEvent, AccessWatchpointRequest, ArrayReference, ArrayType, BooleanType, BooleanValue, BreakpointEvent, BreakpointRequest, ByteType, ByteValue, CharType, CharValue, ClassLoaderReference, ClassObjectReference, ClassPrepareEvent, ClassPrepareRequest, ClassType, ClassUnloadEvent, ClassUnloadRequest, DoubleType, DoubleValue, Event, EventQueue, EventRequest, EventRequestManager, EventSet, ExceptionEvent, ExceptionRequest, Field, FloatType, FloatValue, IntegerType, IntegerValue, InterfaceType, LocalVariable, LocatableEvent, Location, LongType, LongValue, Method, MethodEntryEvent, MethodEntryRequest, MethodExitEvent, MethodExitRequest, ModificationWatchpointEvent, ModificationWatchpointRequest, ObjectReference, PathSearchingVirtualMachine, PrimitiveType, PrimitiveValue, ReferenceType, ShortType, ShortValue, StackFrame, StepEvent, StepRequest, StringReference, ThreadDeathEvent, ThreadDeathRequest, ThreadGroupReference, ThreadReference, ThreadStartEvent, ThreadStartRequest, Type, TypeComponent, Value, VirtualMachine, VMDeathEvent, VMDisconnectEvent, VMStartEvent, VoidType, VoidValue, WatchpointEvent, WatchpointRequest
public interface Mirror

A proxy used by a debugger to examine or manipulate some entity in another virtual machine. Mirror is the root of the interface hierarchy for this package. Mirrors can be proxies for objects in the target VM (ObjectReference), primitive values (for example, IntegerValue), types (for example, ReferenceType), dynamic application state (for example, StackFrame), and even debugger-specific constructs (for example, BreakpointRequest). The VirtualMachine itself is also considered a mirror, representing the composite state of the target VM.

There is no guarantee that a particular entity in the target VM will map to a single instance of Mirror. Implementors are free to decide whether a single mirror will be used for some or all mirrors. Clients of this interface should always use equals to compare two mirrors for equality.

Since:
1.3
See Also:
VirtualMachine

Method Summary
String | toString() Returns a String describing this mirror
VirtualMachine | virtualMachine() Gets the VirtualMachine to which this Mirror belongs.

Method Detail

virtualMachine

public VirtualMachine virtualMachine()
Gets the VirtualMachine to which this Mirror belongs. A Mirror must be associated with a VirtualMachine to have any meaning.
Returns:
the VirtualMachine for which this mirror is a proxy.

toString

public String toString()
Returns a String describing this mirror
Overrides:
toString in class Object
Returns:
a string describing this mirror.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NativeMethodException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class NativeMethodException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.NativeMethodException
All Implemented Interfaces:
Serializable
public class NativeMethodException
extends RuntimeException

Thrown to indicate an operation cannot be completed because it is not valid for a native method.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
NativeMethodException()
NativeMethodException(String message)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NativeMethodException

public NativeMethodException()

NativeMethodException

public NativeMethodException(String message)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectCollectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class ObjectCollectedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.ObjectCollectedException
All Implemented Interfaces:
Serializable
public class ObjectCollectedException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the specified object has been garbage collected.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
ObjectCollectedException()
ObjectCollectedException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectCollectedException

public ObjectCollectedException()

ObjectCollectedException

public ObjectCollectedException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ObjectReference

All Superinterfaces:
Mirror, Value
All Known Subinterfaces:
ArrayReference, ClassLoaderReference, ClassObjectReference, StringReference, ThreadGroupReference, ThreadReference
public interface ObjectReference
extends Value

An object that currently exists in the target VM. An ObjectReference mirrors only the object itself and is not specific to any Field or LocalVariable to which it is currently assigned. An ObjectReference can have 0 or more references from field(s) and/or variable(s).

Since:
1.3

Field Summary
static int | INVOKE_NONVIRTUAL Perform non-virtual method invocation
static int | INVOKE_SINGLE_THREADED Perform method invocation with only the invoking thread resumed
Method Summary
void | disableCollection() Prevents garbage collection for this object.
void | enableCollection() Permits garbage collection for this object.
int | entryCount() Returns the number times this object's monitor has been entered by the current owning thread.
boolean | equals(Object obj) Compares the specified Object with this ObjectReference for equality.
Value | getValue(Field sig) Gets the value of a given instance or static field in this object.
Map | getValues(List fields) Gets the value of multiple instance and/or static fields in this object.
int | hashCode() Returns the hash code value for this ObjectReference.
Value | invokeMethod(ThreadReference thread, Method method, List arguments, int options) Invokes the specified Method on this object in the target VM.
boolean | isCollected() Determines if this object has been garbage collected in the target VM.
ThreadReference | owningThread() Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
ReferenceType | referenceType() Gets the ReferenceType that mirrors the type of this object.
void | setValue(Field field, Value value) Sets the value of a given instance or static field in this object.
long | uniqueID() Returns a unique identifier for this ObjectReference.
List | waitingThreads() Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Field Detail

INVOKE_SINGLE_THREADED

public static final int INVOKE_SINGLE_THREADED
Perform method invocation with only the invoking thread resumed

INVOKE_NONVIRTUAL

public static final int INVOKE_NONVIRTUAL
Perform non-virtual method invocation
Method Detail

referenceType

public ReferenceType referenceType()
Gets the ReferenceType that mirrors the type of this object. The type may be a subclass or implementor of the declared type of any field or variable which currently holds it. For example, right after the following statement.

Object obj = new String("Hello, world!");

The ReferenceType of obj will mirror java.lang.String and not java.lang.Object.

The type of an object never changes, so this method will always return the same ReferenceType over the lifetime of the mirrored object.

The returned ReferenceType will be a ClassType or ArrayType and never an InterfaceType.

Returns:
the ReferenceType for this object.
Throws:
ObjectCollectedException - if this object has been garbage collected.

getValue

public Value getValue(Field sig)
Gets the value of a given instance or static field in this object. The Field must be valid for this ObjectReference; that is, it must be from the mirrored object's class or a superclass of that class.
Parameters:
sig - the field containing the requested value
Returns:
the Value of the instance field.
Throws:
IllegalArgumentException - if the field is not valid for this object's class.
ObjectCollectedException - if this object has been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

getValues

public Map getValues(List fields)
Gets the value of multiple instance and/or static fields in this object. The Fields must be valid for this ObjectReference; that is, they must be from the mirrored object's class or a superclass of that class.
Parameters:
fields - a list of Field objects containing the requested values.
Returns:
a Map of the requested Field objects with their Value.
Throws:
IllegalArgumentException - if any field is not valid for this object's class.
ObjectCollectedException - if this object has been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

setValue

public void setValue(Field field,
                     Value value)
              throws InvalidTypeException,
                     ClassNotLoadedException
Sets the value of a given instance or static field in this object. The Field must be valid for this ObjectReference; that is, there must be a widening reference conversion from this object to the field's type. If static, the field must not be final.

Object values must be assignment compatible with the field type (This implies that the field type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the field type or must be convertible to the field type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
field - the field containing the requested value
value - the new value to assign
Throws:
IllegalArgumentException - if the field is not valid for this object's class.
InvalidTypeException - if the value's type does not match the field's type.
ClassNotLoadedException - if the field type has not yet been loaded through the appropriate class loader.
ObjectCollectedException - if this object or the new value (if an ObjectReference) has been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

invokeMethod

public Value invokeMethod(ThreadReference thread,
                          Method method,
                          List arguments,
                          int options)
                   throws InvalidTypeException,
                          ClassNotLoadedException,
                          IncompatibleThreadStateException,
                          InvocationException
Invokes the specified Method on this object in the target VM. The specified method can be defined in the this object's class, in a superclass of this object's class, or in an interface implemented by this object. The method may be a static method or an instance method, but not a static initializer or constructor. Use ClassType.newInstance(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List, int) to create a new object and run its constructor.

The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event which occurred in that thread. Method invocation is not supported when the target VM has been suspended through VirtualMachine.suspend() or when the specified thread is suspended through ThreadReference.suspend().

The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; this method does not return until the invoked method returns in the target VM. If the invoked method has a return type other than void, a mirror of the return value is returned by this method; otherwise, null is returned. If the invoked method throws an exception, this method will throw an InvocationException which contains a mirror to the exception object thrown.

Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class's class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

By default, the method is invoked using dynamic lookup as documented in The Java Language Specification, section 15.11.4.4; in particular, overriding based on the runtime type of the object mirrored by this ObjectReference will occur. This behavior can be changed by specifying the INVOKE_NONVIRTUAL bit flag in the options argument. If this flag is set, the specified method is invoked whether or not it is overridden for this object's runtime type. The method, in this case, must not belong to an interface and must not be abstract. This option is useful for performing method invocations like those done with the super keyword in the Java Language.

By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by VirtualMachine.suspend() or ThreadReference.suspend(). This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like ThreadReference.resume(), so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.

The resumption of other threads during the invocation can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options argument; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.

If the target VM is disconnected during the invoke (for example, through VirtualMachine.dispose()) the method invocation continues.

Parameters:
thread - the thread in which to invoke.
method - the Method to invoke.
arguments - the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.
options - the integer bit flag options.
Returns:
a Value mirror of the invoked method's return value.
Throws:
IllegalArgumentException - if the method is not a member of this object's class, if the size of the argument list does not match the number of declared arguemnts for the method, if the method is a constructor or static intializer, or if INVOKE_NONVIRTUAL is specified and the method is either abstract or an interface member.
{@link - InvalidTypeException} if any argument in the argument list is not assignable to the corresponding method argument type.
ClassNotLoadedException - if any argument type has not yet been loaded through the appropriate class loader.
IncompatibleThreadStateException - if the specified thread has not been suspended by an event.
InvocationException - if the method invocation resulted in an exception in the target VM.
ObjectCollectedException - if this object, the specified thread, or any object method arguments have been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

disableCollection

public void disableCollection()
Prevents garbage collection for this object. By default all ObjectReference values returned by JDI may be collected at any time the target VM is running. A call to this method guarantees that the object will not be collected. enableCollection() can be used to allow collection once again.

Calls to this method are counted. Every call to this method requires a corresponding call to enableCollection() before garbage collection is re-enabled.

Note that while the target VM is suspended, no garbage collection will occur because all threads are suspended. The typical examination of variables, fields, and arrays during the suspension is safe without explicitly disabling garbage collection.

This method should be used sparingly, as it alters the pattern of garbage collection in the target VM and, consequently, may result in application behavior under the debugger that differs from its non-debugged behavior.

Throws:
ObjectCollectedException - if this object has been garbage collected.

enableCollection

public void enableCollection()
Permits garbage collection for this object. By default all ObjectReference values returned by JDI may be collected at any time the target VM is running. A call to this method is necessary only if garbage collection was previously disabled with disableCollection().

isCollected

public boolean isCollected()
Determines if this object has been garbage collected in the target VM.
Returns:
true if this ObjectReference has been collected; false otherwise.

uniqueID

public long uniqueID()
Returns a unique identifier for this ObjectReference. It is guaranteed to be unique among all ObjectReferences from the same VM that have not yet been disposed. The guarantee applies as long as this ObjectReference has not yet been disposed.
Returns:
a long unique ID
Throws:
ObjectCollectedException - if this object has been garbage collected.

waitingThreads

public List waitingThreads()
                    throws IncompatibleThreadStateException
Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor. See ThreadReference.currentContendedMonitor() for information about when a thread is considered to be waiting for a monitor.

Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

Returns:
a List of ThreadReference objects. The list has zero length if no threads are waiting for the monitor.
Throws:
java.lang.UnsupportedOperationException - if the target target VM does not support this operation.
IncompatibleThreadStateException - if any waiting thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.

owningThread

public ThreadReference owningThread()
                             throws IncompatibleThreadStateException
Returns an ThreadReference for the thread, if any, which currently owns this object's monitor. See ThreadReference.ownedMonitors() for a definition of ownership.

Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

Returns:
the ThreadReference which currently owns the monitor, or null if it is unowned.
Throws:
java.lang.UnsupportedOperationException - if the target target VM does not support this operation.
IncompatibleThreadStateException - if the owning thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.

entryCount

public int entryCount()
               throws IncompatibleThreadStateException
Returns the number times this object's monitor has been entered by the current owning thread. See ThreadReference.ownedMonitors() for a definition of ownership.

Not all target VMs support this operation. See VirtualMachine#canGetMonitorInfo to determine if the operation is supported.

Returns:
the integer count of the number of entries.
Throws:
java.lang.UnsupportedOperationException - if the target target VM does not support this operation.
IncompatibleThreadStateException - if the owning thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.
See Also:
owningThread()

equals

public boolean equals(Object obj)
Compares the specified Object with this ObjectReference for equality.
Overrides:
equals in class Object
Returns:
true if the Object is an ObjectReference, if the ObjectReferences belong to the same VM, and if applying the "==" operator on the mirrored objects in that VM evaluates to true.

hashCode

public int hashCode()
Returns the hash code value for this ObjectReference.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PathSearchingVirtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface PathSearchingVirtualMachine

All Superinterfaces:
Mirror, VirtualMachine
public interface PathSearchingVirtualMachine
extends VirtualMachine

A virtual machine which searches for classes through paths

Since:
1.3

Fields inherited from interface com.sun.jdi.VirtualMachine
TRACE_ALL, TRACE_EVENTS, TRACE_NONE, TRACE_OBJREFS, TRACE_RECEIVES, TRACE_REFTYPES, TRACE_SENDS
Method Summary
String | baseDirectory()
List | bootClassPath() Get the boot class path for this virtual machine.
List | classPath() Get the class path for this virtual machine.
Methods inherited from interface com.sun.jdi.VirtualMachine
allClasses, allThreads, canGetBytecodes, canGetCurrentContendedMonitor, canGetMonitorInfo, canGetOwnedMonitorInfo, canGetSyntheticAttribute, canWatchFieldAccess, canWatchFieldModification, classesByName, description, dispose, eventQueue, eventRequestManager, exit, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, mirrorOf, name, process, resume, setDebugTraceMode, suspend, topLevelThreadGroups, version
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

classPath

public List classPath()
Get the class path for this virtual machine.
Returns:
List of components of the classpath, each represented by a String.

bootClassPath

public List bootClassPath()
Get the boot class path for this virtual machine.
Returns:
List of components of the boot class path, each represented by a String.

baseDirectory

public String baseDirectory()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrimitiveValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface PrimitiveValue

All Superinterfaces:
Mirror, Value
All Known Subinterfaces:
BooleanValue, ByteValue, CharValue, DoubleValue, FloatValue, IntegerValue, LongValue, ShortValue
public interface PrimitiveValue
extends Value

The value assigned to a field or variable of primitive type in a target VM. Each primitive values is accessed through a subinterface of this interface.

Since:
1.3

Method Summary
boolean | booleanValue() Converts this value to a BooleanValue and returns the result as a boolean.
byte | byteValue() Converts this value to a ByteValue and returns the result as a boolean.
char | charValue() Converts this value to a CharValue and returns the result as a char.
double | doubleValue() Converts this value to a DoubleValue and returns the result as a double.
float | floatValue() Converts this value to a FloatValue and returns the result as a float.
int | intValue() Converts this value to an IntegerValue and returns the result as an int.
long | longValue() Converts this value to a LongValue and returns the result as a long.
short | shortValue() Converts this value to a ShortValue and returns the result as a short.
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

booleanValue

public boolean booleanValue()
Converts this value to a BooleanValue and returns the result as a boolean.
Returns:
true if this value is non-zero (or true if already a BooleanValue); false otherwise.

byteValue

public byte byteValue()
Converts this value to a ByteValue and returns the result as a boolean. The value will be narrowed as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a byte).
Returns:
the value, converted to byte

charValue

public char charValue()
Converts this value to a CharValue and returns the result as a char. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a char, in the narrowing case).
Returns:
the value, converted to char

shortValue

public short shortValue()
Converts this value to a ShortValue and returns the result as a short. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a short, in the narrowing case).
Returns:
the value, converted to short

intValue

public int intValue()
Converts this value to an IntegerValue and returns the result as an int. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to an int, in the narrowing case).
Returns:
the value, converted to int

longValue

public long longValue()
Converts this value to a LongValue and returns the result as a long. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a long, in the narrowing case).
Returns:
the value, converted to long

floatValue

public float floatValue()
Converts this value to a FloatValue and returns the result as a float. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a float, in the narrowing case).
Returns:
the value, converted to float

doubleValue

public double doubleValue()
Converts this value to a DoubleValue and returns the result as a double. The value will be widened as necessary, and precision information may be lost.
Returns:
the value, converted to double
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReferenceType

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ReferenceType

All Superinterfaces:
Accessible, Comparable, Mirror, Type
All Known Subinterfaces:
ArrayType, ClassType, InterfaceType
public interface ReferenceType
extends Type, Comparable, Accessible

The type of an object in a target VM. ReferenceType encompasses classes, interfaces, and array types as defined in the Java Language Specification (and has corresponding subinterfaces for each). The VM creates Class objects for all three, so from the VM perspective, each ReferenceType maps to a distinct Class object.

ReferenceTypes can be obtained by querying a particular ObjectReference for its type or by getting a list of all reference types from the VirtualMachine.

ReferenceType provides access to static type information such as methods and fields and provides access to dynamic type information such as the corresponding Class object and the classloader.

Since:
1.3
See Also:
ObjectReference, ObjectReference.referenceType(), VirtualMachine, VirtualMachine.allClasses()

Method Summary
List | allFields() Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
List | allLineLocations() Returns the Location objects for each executable source line in this reference type.
List | allMethods() Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.
ClassLoaderReference | classLoader() Gets the classloader object which loaded the class corresponding to this type.
ClassObjectReference | classObject() Returns the class object that corresponds to this type in the target VM.
boolean | equals(Object obj) Compares the specified Object with this ReferenceType for equality.
boolean | failedToInitialize() Determines if initialization failed for this class.
Field | fieldByName(String fieldName) Finds the visible Field with the given non-ambiguous name.
List | fields() Returns a list containing each Field declared in this type.
Value | getValue(Field field) Gets the Value of a given static Field in this type.
Map | getValues(List fields) Returns a map containing the Value of each static Field in the given list.
int | hashCode() Returns the hash code value for this ObjectReference.
boolean | isAbstract() Determines if this type was declared abstract.
boolean | isFinal() Determines if this type was declared final.
boolean | isInitialized() Determines if this type has been initialized.
boolean | isPrepared() Determines if this type has been prepared.
boolean | isStatic() Determines if this type was declared static.
boolean | isVerified() Determines if this type has been verified.
List | locationsOfLine(int lineNumber) Returns a List filled with all Location objects that map to the given line number.
List | methods() Returns a list containing each Method declared directly in this type.
List | methodsByName(String name) Returns a List containing each visible Method that has the given name.
List | methodsByName(String name, String signature) Returns a List containing each visible Method that has the given name and signature.
String | name() Gets the fully qualified name of this type.
List | nestedTypes() Returns a List containing each ReferenceType declared within this type.
String | sourceName() Gets an identifing name for the source corresponding to the declaration of this type.
List | visibleFields() Returns a list containing each unhidden and unambiguous Field in this type.
List | visibleMethods() Returns a list containing each Method declared or inherited by this type.
Methods inherited from interface com.sun.jdi.Type
signature
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

Method Detail

name

public String name()
Gets the fully qualified name of this type. The returned name is formatted as it might appear in a Java langauge declaration for objects of this type.

For primitive classes the returned name is the name of the corresponding primitive type; for example, "int" is returned as the name of the class represented by java.lang.Integer#TYPE.

Specified by:
name in interface Type
Returns:
a string containing the type name.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

classLoader

public ClassLoaderReference classLoader()
Gets the classloader object which loaded the class corresponding to this type.
Returns:
a ClassLoaderReference which mirrors the classloader, or null if the class was loaded through the bootstrap class loader.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

sourceName

public String sourceName()
                  throws AbsentInformationException
Gets an identifing name for the source corresponding to the declaration of this type. Interpretation of this string is the responsibility of the source repository mechanism.

In the reference implementation, the returned string is the unqualified name of the source file containing the declaration of this type.

Returns:
the string source file name
Throws:
AbsentInformationException - if the source name is not known
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isStatic

public boolean isStatic()
Determines if this type was declared static. Only nested types, can be declared static, so false is returned for any package-level type, array type, or primitive class (for example, java.lang.Integer#TYPE).
Returns:
true if this type is static; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isAbstract

public boolean isAbstract()
Determines if this type was declared abstract. Return value is undefined for arrays and for primitive classes (for example, java.lang.Integer#TYPE).
Returns:
true if this type is abstract; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isFinal

public boolean isFinal()
Determines if this type was declared final. For ArrayType and for primitive classes, such as java.lang.Integer#TYPE, the return value is always true.
Returns:
true if this type is final; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isPrepared

public boolean isPrepared()
Determines if this type has been prepared. See the JVM specification for a definiton of class preparation. Return value is undefined for arrays and for primitive classes (for example, java.lang.Integer#TYPE).
Returns:
true if this type is prepared; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isVerified

public boolean isVerified()
Determines if this type has been verified. See the JVM specification for a definiton of class verification. Return value is undefined for arrays and for primitive classes (for example, java.lang.Integer#TYPE).
Returns:
true if this type is verified; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

isInitialized

public boolean isInitialized()
Determines if this type has been initialized. See the JVM specification for a definiton of class verification. For InterfaceType, this method always returns the same value as isPrepared(). Return value is undefined for arrays and for primitive classes (for example, java.lang.Integer#TYPE).
Returns:
true if this type is initialized; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

failedToInitialize

public boolean failedToInitialize()
Determines if initialization failed for this class. See the JVM specification for details on class initialization. Return value is undefined for arrays and for primitive classes (for example, java.lang.Integer#TYPE).
Returns:
true if initialization was attempted and failed; false otherwise.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

fields

public List fields()
Returns a list containing each Field declared in this type. Inherited fields are not included. Any synthetic fields created by the compiler are included in the list.
Returns:
a list Field objects; the list has length 0 if no fields exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

visibleFields

public List visibleFields()
Returns a list containing each unhidden and unambiguous Field in this type. Each field that can be accessed from the class or its instances with its simple name is included. Fields that are ambiguously multiply inherited or fields that are hidden by fields with the same name in a more recently inherited class cannot be accessed by their simple names and are not included in the returned list. All other inherited fields are included. See JLS section 8.3 for details.
Returns:
a List of Field objects; the list has length 0 if no visible fields exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

allFields

public List allFields()
Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited fields are included, regardless of whether they are hidden or multiply inherited.
Returns:
a List of Field objects; the list has length 0 if no fields exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

fieldByName

public Field fieldByName(String fieldName)
Finds the visible Field with the given non-ambiguous name. This method follows the inheritance rules specified in the JLS (8.3.3) to determine visibility.
Parameters:
a - String containing the name of desired field.
Returns:
a Field object which mirrors the found field, or null if there is no field with the given name or if the given name is ambiguous.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

methods

public List methods()
Returns a list containing each Method declared directly in this type. Inherited methods are not included. Constructors, the initialization method if any, and any synthetic methods created by the compiler are included in the list.
Returns:
a list Method objects; the list has length 0 if no methods exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

visibleMethods

public List visibleMethods()
Returns a list containing each Method declared or inherited by this type. Methods from superclasses or superinterfaces that that have been hidden or overridden are not included.

Note that despite this exclusion, multiple inherited methods with the same signature can be present in the returned list, but at most one can be a member of a ClassType. See JLS section 8.4.6 for details.

Returns:
a List of Method objects; the list has length 0 if no visible methods exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

allMethods

public List allMethods()
Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited methods are included, regardless of whether they are hidden or overridden.
Returns:
a List of Method objects; the list has length 0 if no methods exist.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

methodsByName

public List methodsByName(String name)
Returns a List containing each visible Method that has the given name. This is most commonly used to find overloaded methods.

Overridden and hidden methods are not included. See JLS (8.4.6) for details.

Parameters:
name - the name of the method to find.
Returns:
a List of Method objects that match the given name; the list has length 0 if no matching methods are found.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

methodsByName

public List methodsByName(String name,
                          String signature)
Returns a List containing each visible Method that has the given name and signature. The signature string is the JNI signature for the target method:
  • ()V
  • ([Ljava/lang/String;)V
  • (IIII)Z
This method follows the inheritance rules specified in the JLS (8.4.6) to determine visibility.

At most one method in the list is a concrete method and a component of ClassType; any other methods in the list are abstract. Use ClassType.concreteMethodByName(java.lang.String, java.lang.String) to retrieve only the matching concrete method.

Parameters:
name - the name of the method to find.
signature - the signature of the method to find
Returns:
a List of Method objects that match the given name and signature; the list has length 0 if no matching methods are found.
Throws:
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

nestedTypes

public List nestedTypes()
Returns a List containing each ReferenceType declared within this type. Both static nested types and non-static nested types (that is, inner types) are included. Local inner types (declared within a code block somewhere in this reference type) are also included in the returned list.
Returns:
a List of nested ReferenceType objects; the list has 0 length if there are no nested types.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

getValue

public Value getValue(Field field)
Gets the Value of a given static Field in this type. The Field must be valid for this type; that is, it must be declared in this type, a superclass, a superinterface, or an implemented interface.
Parameters:
sig - the field containing the requested value
Returns:
the Value of the instance field.
Throws:
IllegalArgumentException - if the field is not valid for this object's class.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

getValues

public Map getValues(List fields)
Returns a map containing the Value of each static Field in the given list. The Fields must be valid for this type; that is, they must be declared in this type, a superclass, a superinterface, or an implemented interface.
Parameters:
fields - a list of Field objects containing the requested values.
Returns:
a Map of the requested Field objects with their Value.
Throws:
IllegalArgumentException - if any field is not valid for this object's class.
ObjectCollectedException - if this reference type has been unloaded and garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

classObject

public ClassObjectReference classObject()
Returns the class object that corresponds to this type in the target VM. The VM creates class objects for every kind of ReferenceType: classes, interfaces, and array types.
Returns:
the ClassObjectReference for this reference type in the target VM.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

allLineLocations

public List allLineLocations()
                      throws AbsentInformationException
Returns the Location objects for each executable source line in this reference type. Each location maps a source line to a range of code indices. The beginning of the range can be determined through Location.codeIndex(). The returned list may contain multiple locations for a particular line number, if the compiler and/or VM has mapped that line to two or more disjoint code index ranges. Note that it is possible for the same source line to represent different code index ranges in different methods.

If this reference type is an ArrayType, the returned list is always empty. If this reference type is an InterfaceType, the returned list will be non-empty only if the interface has executable code in its class initialization.

Returns:
a List of all source line Location objects.
Throws:
AbsentInformationException - if there is no line number information for this class and there are non-native, non-abstract executable members of this class.
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this class has been unloaded and garbage collected.

locationsOfLine

public List locationsOfLine(int lineNumber)
                     throws AbsentInformationException
Returns a List filled with all Location objects that map to the given line number.

If this reference type is an ArrayType, the returned list is always empty. If this reference type is an InterfaceType, the returned list will be non-empty only if the interface has executable code in its class initialization at the specified line number.

Returns:
a List of all Location objects that map to the given line.
Throws:
AbsentInformationException - if there is no line number information for this class.
ClassNotPreparedException - if this class not yet been prepared.
ObjectCollectedException - if this class has been unloaded and garbage collected.
InvalidLineNumberException - if there is no executable code associated with the given line.

equals

public boolean equals(Object obj)
Compares the specified Object with this ReferenceType for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a ReferenceType, if the ReferenceTypes belong to the same VM, and if they mirror classes which correspond to the same instance of java.lang.Class in that VM.
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.

hashCode

public int hashCode()
Returns the hash code value for this ObjectReference.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Throws:
ObjectCollectedException - if this reference type has been unloaded and garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AccessWatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface AccessWatchpointRequest

All Superinterfaces:
EventRequest, Mirror, WatchpointRequest
public interface AccessWatchpointRequest
extends WatchpointRequest

Request for notification when the contents of a field are accessed in the target VM. When an enabled AccessWatchpointRequest is satisfied, an event set containing an AccessWatchpointEvent will be placed on the EventQueue. The collection of existing ExceptionRequests is managed by the EventRequestManager The collection of existing watchpoints is managed by the EventRequestManager.

Note that the modification of a Field is not considered an access.

Since:
1.3
See Also:
ModificationWatchpointRequest, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Methods inherited from interface com.sun.jdi.request.WatchpointRequest
addClassExclusionFilter, addClassFilter, addClassFilter, addThreadFilter, field
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


com.sun.jdi.request Class Hierarchy

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.jdi.request

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class java.lang.RuntimeException
          • class com.sun.jdi.request.DuplicateRequestException
          • class com.sun.jdi.request.InvalidRequestStateException

Interface Hierarchy

  • interface com.sun.jdi.Locatable
    • interface com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.request.EventRequest)
  • interface com.sun.jdi.Mirror
    • interface com.sun.jdi.request.EventRequest
      • interface com.sun.jdi.request.BreakpointRequest (also extends com.sun.jdi.Locatable)
      • interface com.sun.jdi.request.ClassPrepareRequest
      • interface com.sun.jdi.request.ClassUnloadRequest
      • interface com.sun.jdi.request.ExceptionRequest
      • interface com.sun.jdi.request.MethodEntryRequest
      • interface com.sun.jdi.request.MethodExitRequest
      • interface com.sun.jdi.request.StepRequest
      • interface com.sun.jdi.request.ThreadDeathRequest
      • interface com.sun.jdi.request.ThreadStartRequest
      • interface com.sun.jdi.request.WatchpointRequest
        • interface com.sun.jdi.request.AccessWatchpointRequest
        • interface com.sun.jdi.request.ModificationWatchpointRequest
    • interface com.sun.jdi.request.EventRequestManager
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


ModificationWatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ModificationWatchpointRequest

All Superinterfaces:
EventRequest, Mirror, WatchpointRequest
public interface ModificationWatchpointRequest
extends WatchpointRequest

Request for notification when the contents of a field are accessed in the target VM. When an enabled ModificationWatchpointRequest is satisfied, an event set containing a ModificationWatchpointEvent will be placed on the EventQueue. The collection of existing watchpoints is managed by the EventRequestManager.

Since:
1.3
See Also:
ModificationWatchpointEvent, AccessWatchpointRequest, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Methods inherited from interface com.sun.jdi.request.WatchpointRequest
addClassExclusionFilter, addClassFilter, addClassFilter, addThreadFilter, field
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Package com.sun.jdi.request

This package is used to request that a JDI event be sent under specified conditions.

See:
Description

Interface Summary
AccessWatchpointRequest | Request for notification when the contents of a field are accessed in the target VM.
BreakpointRequest | Identifies a Location in the target VM at which execution should be stopped.
ClassPrepareRequest | Request for notification when a class is prepared in the target VM.
ClassUnloadRequest | Request for notification when a class is unloaded in the target VM.
EventRequest | Represents a request for notification of an event.
EventRequestManager | Manages the creation and deletion of EventRequests.
ExceptionRequest | Request for notification when an exception occurs in the target VM.
MethodEntryRequest | Request for notification when a method is invoked in the target VM.
MethodExitRequest | Request for notification when a method returns in the target VM.
ModificationWatchpointRequest | Request for notification when the contents of a field are accessed in the target VM.
StepRequest | Request for notification when a step occurs in the target VM.
ThreadDeathRequest | Request for notification when a thread terminates in the target VM.
ThreadStartRequest | Request for notification when a thread starts execution in the target VM.
WatchpointRequest | Identifies a Field in the target VM being watched.

Exception Summary
DuplicateRequestException | Thrown to indicate a duplicate event request.
InvalidRequestStateException | Thrown to indicate that the requested event cannot be modified because it is enabled.

Package com.sun.jdi.request Description

This package is used to request that a JDI event be sent under specified conditions. With the exception of termination events, which are always sent, there is one kind of EventRequest for each kind of Event - for example, BreakpointRequest is used to request a BreakpointEvent. Event requests are created by the EventRequestManager. Events and event processing are defined in the com.sun.jdi.event package.

Methods may be added to the interfaces in the JDI packages in future releases. Existing packages may be renamed if the JDI becomes a standard extension.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


Uses of Package com.sun.jdi.request

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Package
com.sun.jdi.request

Packages that use com.sun.jdi.request
com.sun.jdi | This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Classes in com.sun.jdi.request used by com.sun.jdi
EventRequestManager
Manages the creation and deletion of EventRequests.

Classes in com.sun.jdi.request used by com.sun.jdi.event
EventRequest
Represents a request for notification of an event.

Classes in com.sun.jdi.request used by com.sun.jdi.request
AccessWatchpointRequest
Request for notification when the contents of a field are accessed in the target VM.
BreakpointRequest
Identifies a Location in the target VM at which execution should be stopped.
ClassPrepareRequest
Request for notification when a class is prepared in the target VM.
ClassUnloadRequest
Request for notification when a class is unloaded in the target VM.
EventRequest
Represents a request for notification of an event.
ExceptionRequest
Request for notification when an exception occurs in the target VM.
MethodEntryRequest
Request for notification when a method is invoked in the target VM.
MethodExitRequest
Request for notification when a method returns in the target VM.
ModificationWatchpointRequest
Request for notification when the contents of a field are accessed in the target VM.
StepRequest
Request for notification when a step occurs in the target VM.
ThreadDeathRequest
Request for notification when a thread terminates in the target VM.
ThreadStartRequest
Request for notification when a thread starts execution in the target VM.
WatchpointRequest
Identifies a Field in the target VM being watched.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


BreakpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface BreakpointRequest

All Superinterfaces:
EventRequest, Locatable, Mirror
public interface BreakpointRequest
extends EventRequest, Locatable

Identifies a Location in the target VM at which execution should be stopped. When an enabled BreakpointRequest is satisfied, an event set containing an BreakpointEvent will be placed on the EventQueue and the application is interrupted. The collection of existing breakpoints is managed by the EventRequestManager

Since:
1.3
See Also:
Location, BreakpointEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in the given thread.
Location | location() Returns the location of the requested breakpoint.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

location

public Location location()
Returns the location of the requested breakpoint.
Specified by:
location in interface Locatable
Returns:
the Location where this breakpoint has been set.

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the events generated by this request to those in the given thread.
Parameters:
thread - the thread to filter on.
Throws:
ObjectCollectedException - if the thread object has been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Uses of Class com.sun.jdi.request.DuplicateRequestException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.request.DuplicateRequestException

No usage of com.sun.jdi.request.DuplicateRequestException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Class com.sun.jdi.request.InvalidRequestStateException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Class
com.sun.jdi.request.InvalidRequestStateException

No usage of com.sun.jdi.request.InvalidRequestStateException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.AccessWatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.AccessWatchpointRequest

Packages that use AccessWatchpointRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of AccessWatchpointRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return AccessWatchpointRequest
 AccessWatchpointRequest EventRequestManager.createAccessWatchpointRequest(Field field)
Creates a new disabled watchpoint which watches accesses to the specified field.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.BreakpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.BreakpointRequest

Packages that use BreakpointRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of BreakpointRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return BreakpointRequest
 BreakpointRequest EventRequestManager.createBreakpointRequest(Location location)
Creates a new disabled BreakpointRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ClassPrepareRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ClassPrepareRequest

Packages that use ClassPrepareRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ClassPrepareRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ClassPrepareRequest
 ClassPrepareRequest EventRequestManager.createClassPrepareRequest()
Creates a new disabled ClassPrepareRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ClassUnloadRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ClassUnloadRequest

Packages that use ClassUnloadRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ClassUnloadRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ClassUnloadRequest
 ClassUnloadRequest EventRequestManager.createClassUnloadRequest()
Creates a new disabled ClassUnloadRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.EventRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.EventRequest

Packages that use EventRequest
com.sun.jdi.event | This package defines JDI events and event processing.
com.sun.jdi.request | This package is used to request that a JDI event be sent under specified conditions.

Uses of EventRequest in com.sun.jdi.event

Methods in com.sun.jdi.event that return EventRequest
 EventRequest Event.request()

Uses of EventRequest in com.sun.jdi.request

Subinterfaces of EventRequest in com.sun.jdi.request
interface | AccessWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.
interface | BreakpointRequest Identifies a Location in the target VM at which execution should be stopped.
interface | ClassPrepareRequest Request for notification when a class is prepared in the target VM.
interface | ClassUnloadRequest Request for notification when a class is unloaded in the target VM.
interface | ExceptionRequest Request for notification when an exception occurs in the target VM.
interface | MethodEntryRequest Request for notification when a method is invoked in the target VM.
interface | MethodExitRequest Request for notification when a method returns in the target VM.
interface | ModificationWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.
interface | StepRequest Request for notification when a step occurs in the target VM.
interface | ThreadDeathRequest Request for notification when a thread terminates in the target VM.
interface | ThreadStartRequest Request for notification when a thread starts execution in the target VM.
interface | WatchpointRequest Identifies a Field in the target VM being watched.

Methods in com.sun.jdi.request with parameters of type EventRequest
 void EventRequestManager.deleteEventRequest(EventRequest eventRequest)
Removes a eventRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.EventRequestManager

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.EventRequestManager

Packages that use EventRequestManager
com.sun.jdi This is the core package of the Java Debugging Interface (JDI), it defines mirrors for values, types, and the target VirtualMachine itself - as well bootstrapping facilities.

Uses of EventRequestManager in com.sun.jdi

Methods in com.sun.jdi that return EventRequestManager
 EventRequestManager VirtualMachine.eventRequestManager()
Returns the event request manager for this virtual machine.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ExceptionRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ExceptionRequest

Packages that use ExceptionRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ExceptionRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ExceptionRequest
 ExceptionRequest EventRequestManager.createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught)
Creates a new disabled ExceptionRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.MethodEntryRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.MethodEntryRequest

Packages that use MethodEntryRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of MethodEntryRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return MethodEntryRequest
 MethodEntryRequest EventRequestManager.createMethodEntryRequest()
Creates a new disabled MethodEntryRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.MethodExitRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.MethodExitRequest

Packages that use MethodExitRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of MethodExitRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return MethodExitRequest
 MethodExitRequest EventRequestManager.createMethodExitRequest()
Creates a new disabled MethodExitRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ModificationWatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ModificationWatchpointRequest

Packages that use ModificationWatchpointRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ModificationWatchpointRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ModificationWatchpointRequest
 ModificationWatchpointRequest EventRequestManager.createModificationWatchpointRequest(Field field)
Creates a new disabled watchpoint which watches accesses to the specified field.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.StepRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.StepRequest

Packages that use StepRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of StepRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return StepRequest
 StepRequest EventRequestManager.createStepRequest(ThreadReference thread, int size, int depth)
Creates a new disabled StepRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ThreadDeathRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ThreadDeathRequest

Packages that use ThreadDeathRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ThreadDeathRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ThreadDeathRequest
 ThreadDeathRequest EventRequestManager.createThreadDeathRequest()
Creates a new disabled ThreadDeathRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.ThreadStartRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.ThreadStartRequest

Packages that use ThreadStartRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of ThreadStartRequest in com.sun.jdi.request

Methods in com.sun.jdi.request that return ThreadStartRequest
 ThreadStartRequest EventRequestManager.createThreadStartRequest()
Creates a new disabled ThreadStartRequest.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


Uses of Interface com.sun.jdi.request.WatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES

Uses of Interface
com.sun.jdi.request.WatchpointRequest

Packages that use WatchpointRequest
com.sun.jdi.request This package is used to request that a JDI event be sent under specified conditions.

Uses of WatchpointRequest in com.sun.jdi.request

Subinterfaces of WatchpointRequest in com.sun.jdi.request
interface | AccessWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.
interface | ModificationWatchpointRequest Request for notification when the contents of a field are accessed in the target VM.

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV NEXT FRAMES NO FRAMES


ClassPrepareRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ClassPrepareRequest

All Superinterfaces:
EventRequest, Mirror
public interface ClassPrepareRequest
extends EventRequest

Request for notification when a class is prepared in the target VM. When an enabled ClassPrepareRequest is satisfied, an event set containing a ClassPrepareEvent will be placed on the EventQueue. The collection of existing ClassPrepareRequests is managed by the EventRequestManager

Class preparation is defined in the Java Virtual Machine Specification.

Since:
1.3
See Also:
ClassPrepareEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to be the preparation of the given reference type and any subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to be the preparation of the given reference type and any subtypes. An event will be generated for any prepared reference type that can be safely cast to the given reference type.
Parameters:
refType - the reference type to filter on.
Throws:
ObjectCollectedException - if the thread object has been garbage collected.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassUnloadRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ClassUnloadRequest

All Superinterfaces:
EventRequest, Mirror
public interface ClassUnloadRequest
extends EventRequest

Request for notification when a class is unloaded in the target VM. When an enabled ClassUnloadRequest is satisfied, a event set containing an ClassUnloadEvent will be placed on the EventQueue. The collection of existing ClassUnloadRequests is managed by the EventRequestManager

Refer to the Java Virtual Machine Specification for more information on class unloading.

Since:
1.3
See Also:
ClassUnloadEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression.
void | addClassFilter(String classPattern) Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to the unloading of reference types whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to the unloading of reference types whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DuplicateRequestException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Class DuplicateRequestException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.request.DuplicateRequestException
All Implemented Interfaces:
Serializable
public class DuplicateRequestException
extends RuntimeException

Thrown to indicate a duplicate event request.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
DuplicateRequestException()
DuplicateRequestException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DuplicateRequestException

public DuplicateRequestException()

DuplicateRequestException

public DuplicateRequestException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EventRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface EventRequest

All Superinterfaces:
Mirror
All Known Subinterfaces:
AccessWatchpointRequest, BreakpointRequest, ClassPrepareRequest, ClassUnloadRequest, ExceptionRequest, MethodEntryRequest, MethodExitRequest, ModificationWatchpointRequest, StepRequest, ThreadDeathRequest, ThreadStartRequest, WatchpointRequest
public interface EventRequest
extends Mirror

Represents a request for notification of an event. Examples include BreakpointRequest and ExceptionRequest. When an event occurs for which an enabled request is present, an EventSet will be placed on the EventQueue. The collection of existing event requests is managed by the EventRequestManager

The number of events generated for an event request can be controlled through filters. Filters provide additional constraints that an event must satisfy before it is placed the event queue. Filters are added to an event one at a time only while the event is disabled. Each filter is applied to an event in the order it was added to the request. Only events that satisfy all filters are placed in the event queue. Depending on the event request, the following filters may be available:

  • Thread filters allow control over the thread for which events are generated.
  • Class filters allow control over the class in which the event occurs.
  • Count filters allow control over the number of times an event is reported.
Filters can dramatically improve debugger performance by reducing the amount of event traffic sent from the target VM to the debugger VM.

Since:
1.3
See Also:
BreakpointEvent, EventQueue, EventRequestManager

Field Summary
static int | SUSPEND_ALL Suspend all threads when the event occurs
static int | SUSPEND_EVENT_THREAD Suspend only the thread which generated the event when the event occurs
static int | SUSPEND_NONE Suspend no threads when the event occurs
Method Summary
void | addCountFilter(int count) Limit the requested event to be reported at most once after a given number of occurrences.
void | disable() Same as setEnabled(false).
void | enable() Same as setEnabled(true).
Object | getProperty(Object key) Returns the value of the property with the specified key.
boolean | isEnabled() Determines if this event request is currently enabled.
void | putProperty(Object key, Object value) Add an arbitrary key/value "property" to this request.
void | setEnabled(boolean val) Enables or disables this event request.
void | setSuspendPolicy(int policy) Determines the threads to suspend when the requested event occurs in the target VM.
int | suspendPolicy() Returns a value which describes the threads to suspend when the requested event occurs in the target VM.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Field Detail

SUSPEND_NONE

public static final int SUSPEND_NONE
Suspend no threads when the event occurs

SUSPEND_EVENT_THREAD

public static final int SUSPEND_EVENT_THREAD
Suspend only the thread which generated the event when the event occurs

SUSPEND_ALL

public static final int SUSPEND_ALL
Suspend all threads when the event occurs
Method Detail

isEnabled

public boolean isEnabled()
Determines if this event request is currently enabled.
Returns:
true if enabled; false otherwise.

setEnabled

public void setEnabled(boolean val)
Enables or disables this event request. While this event request is disabled, the event request will be ignored and the target VM will not be stopped if any of its threads reaches the event request. Disabled event requests still exist, and are included in event request lists such as EventRequestManager.breakpointRequests().
Parameters:
val - true if the event request is to be enabled; false otherwise.

enable

public void enable()
Same as setEnabled(true).

disable

public void disable()
Same as setEnabled(false).

addCountFilter

public void addCountFilter(int count)
Limit the requested event to be reported at most once after a given number of occurrences. The event is not reported the first count - 1 times this filter is reached. To request a one-off event, call this method with a count of 1.

Once the count reaches 0, any subsequent filters in this request are applied. If none of those filters cause the event to be suppressed, the event is reported. Otherwise, the event is not reported. In either case subsequent events are never reported for this request.

Parameters:
count - the number of ocurrences before generating an event.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

setSuspendPolicy

public void setSuspendPolicy(int policy)
Determines the threads to suspend when the requested event occurs in the target VM. Use SUSPEND_ALL to suspend all threads in the target VM (the default). Use SUSPEND_EVENT_THREAD to suspend only the thread which generated the event. Use SUSPEND_NONE to suspend no threads.

Thread suspensions through events have the same functionality as explicitly requested suspensions. See ThreadReference.suspend() and VirtualMachine.suspend() for details.

Parameters:
mode - the selected suspend mode.

suspendPolicy

public int suspendPolicy()
Returns a value which describes the threads to suspend when the requested event occurs in the target VM. The returned value is SUSPEND_ALL, SUSPEND_EVENT_THREAD, or SUSPEND_NONE.
Returns:
the current suspend mode for this request

putProperty

public void putProperty(Object key,
                        Object value)
Add an arbitrary key/value "property" to this request. The property can be used by a client of the JDI to associate application information with the request; These client-set properties are not used internally by the JDI.

The get/putProperty methods provide access to a small per-instance map. This is not to be confused with java.util.Properties.

If value is null this method will remove the property.

See Also:
getProperty(java.lang.Object)

getProperty

public Object getProperty(Object key)
Returns the value of the property with the specified key. Only properties added with putProperty(java.lang.Object, java.lang.Object) will return a non-null value.
Returns:
the value of this property or null
See Also:
putProperty(java.lang.Object, java.lang.Object)
Overview  Package   Class  Use  Tree  Index  Help
Java Debug Interface
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


EventRequestManager

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface EventRequestManager

All Superinterfaces:
Mirror
public interface EventRequestManager
extends Mirror

Manages the creation and deletion of EventRequests. A single implementor of this interface exists in a particuar VM and is accessed through VirtualMachine.eventRequestManager()

Since:
1.3
See Also:
EventRequest, Event, BreakpointRequest, BreakpointEvent, VirtualMachine

Method Summary
List | accessWatchpointRequests()
List | breakpointRequests()
List | classPrepareRequests()
List | classUnloadRequests()
AccessWatchpointRequest | createAccessWatchpointRequest(Field field) Creates a new disabled watchpoint which watches accesses to the specified field.
BreakpointRequest | createBreakpointRequest(Location location) Creates a new disabled BreakpointRequest.
ClassPrepareRequest | createClassPrepareRequest() Creates a new disabled ClassPrepareRequest.
ClassUnloadRequest | createClassUnloadRequest() Creates a new disabled ClassUnloadRequest.
ExceptionRequest | createExceptionRequest(ReferenceType refType, boolean notifyCaught, boolean notifyUncaught) Creates a new disabled ExceptionRequest.
MethodEntryRequest | createMethodEntryRequest() Creates a new disabled MethodEntryRequest.
MethodExitRequest | createMethodExitRequest() Creates a new disabled MethodExitRequest.
ModificationWatchpointRequest | createModificationWatchpointRequest(Field field) Creates a new disabled watchpoint which watches accesses to the specified field.
StepRequest | createStepRequest(ThreadReference thread, int size, int depth) Creates a new disabled StepRequest.
ThreadDeathRequest | createThreadDeathRequest() Creates a new disabled ThreadDeathRequest.
ThreadStartRequest | createThreadStartRequest() Creates a new disabled ThreadStartRequest.
void | deleteAllBreakpoints() Remove all breakpoints managed by this EventRequestManager.
void | deleteEventRequest(EventRequest eventRequest) Removes a eventRequest.
void | deleteEventRequests(List eventRequests) Removes a list of EventRequests.
List | exceptionRequests()
List | methodEntryRequests()
List | methodExitRequests()
List | modificationWatchpointRequests()
List | stepRequests()
List | threadDeathRequests()
List | threadStartRequests()
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

createClassPrepareRequest

public ClassPrepareRequest createClassPrepareRequest()
Creates a new disabled ClassPrepareRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created ClassPrepareRequest

createClassUnloadRequest

public ClassUnloadRequest createClassUnloadRequest()
Creates a new disabled ClassUnloadRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created ClassUnloadRequest

createThreadStartRequest

public ThreadStartRequest createThreadStartRequest()
Creates a new disabled ThreadStartRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created ThreadStartRequest

createThreadDeathRequest

public ThreadDeathRequest createThreadDeathRequest()
Creates a new disabled ThreadDeathRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created ThreadDeathRequest

createExceptionRequest

public ExceptionRequest createExceptionRequest(ReferenceType refType,
                                               boolean notifyCaught,
                                               boolean notifyUncaught)
Creates a new disabled ExceptionRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.

A specific exception type and its subclasses can be selected for exception events. Caught exceptions, uncaught exceptions, or both can be selected. Note, however, that at the time an exception is thrown, it is not always possible to determine whether it is truly caught. See ExceptionEvent.catchLocation() for details.

Parameters:
refType - If non-null, specifies that exceptions which are instances of refType will be reported. Note: this will include instances of sub-types. If null, all instances will be reported
notifyCaught - If true, caught exceptions will be reported.
notifyUncaught - If true, uncaught exceptions will be reported.
Returns:
the created ExceptionRequest
Throws:
VMMismatchException - if refType and this EventRequestManager do not belong to the same VirtualMachine.

createMethodEntryRequest

public MethodEntryRequest createMethodEntryRequest()
Creates a new disabled MethodEntryRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created MethodEntryRequest

createMethodExitRequest

public MethodExitRequest createMethodExitRequest()
Creates a new disabled MethodExitRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.
Returns:
the created MethodExitRequest

createStepRequest

public StepRequest createStepRequest(ThreadReference thread,
                                     int size,
                                     int depth)
Creates a new disabled StepRequest. The new event request is added to the list managed by this EventRequestManager. Use EventRequest.enable() to activate this event request.

The returned request will control stepping only in the specified thread; all other threads will be unaffected. A sizevalue of StepRequest.STEP_MIN will generate a step event each time the code index changes. It represents the smallest step size available and often maps to the instruction level. A size value of StepRequest.STEP_LINE will generate a step event each time the source line changes. A depth value of StepRequest.STEP_INTO will generate step events in any called methods. A depth value of StepRequest.STEP_OVER restricts step events to the current frame or caller frames. A depth value of StepRequest.STEP_OUT restricts step events to caller frames only. All depth restrictions are relative to the call stack immediately before the step takes place.

Only one pending step request is allowed per thread.

Note that a typical debugger will want to cancel stepping after the first step is detected. Thus a next line method would do the following:

     EventRequestManager mgr = myVM.eventRequestManager();
     StepRequest request = mgr.createStepRequest(myThread,
                                                 StepRequest.STEP_LINE,
                                                 StepRequest.STEP_OVER);
     request.addCountFilter(1);  // next step only
     request.enable();
     myVM.resume();

Parameters:
thread - the thread in which to step
depth - the step depth
size - the step size
Returns:
the created StepRequest
Throws:
DuplicateRequestException - if there is already a pending
 step request for the specified thread.
ObjectCollectedException - if the thread object has been
 garbage collected.
VMMismatchException - if thread and this EventRequestManager
 do not belong to the same VirtualMachine.

createBreakpointRequest

public BreakpointRequest createBreakpointRequest(Location location)
Creates a new disabled BreakpointRequest. The given Location must have a valid (that is, non-negative) code index. The new breakpoint is added to the list managed by this EventRequestManager. Multiple breakpoints at the same location are permitted. Use EventRequest.enable() to activate this event request.
Parameters:
location - the location of the new breakpoint.
Returns:
the created BreakpointRequest
Throws:
NullPointerException - if location is null.
VMMismatchException - if location and this EventRequestManager do not belong to the same VirtualMachine.

createAccessWatchpointRequest

public AccessWatchpointRequest createAccessWatchpointRequest(Field field)
Creates a new disabled watchpoint which watches accesses to the specified field. The new watchpoint is added to the list managed by this EventRequestManager. Multiple watchpoints on the same field are permitted. Use EventRequest.enable() to activate this event request.
Parameters:
field - the field to watch
Returns:
the created watchpoint
Throws:
NullPointerException - if field is null.
VMMismatchException - if field and this EventRequestManager do not belong to the same VirtualMachine.

createModificationWatchpointRequest

public ModificationWatchpointRequest createModificationWatchpointRequest(Field field)
Creates a new disabled watchpoint which watches accesses to the specified field. The new watchpoint is added to the list managed by this EventRequestManager. Multiple watchpoints on the same field are permitted. Use EventRequest.enable() to activate this event request.
Parameters:
field - the field to watch
Returns:
the created watchpoint
Throws:
NullPointerException - if field is null.
VMMismatchException - if field and this EventRequestManager do not belong to the same VirtualMachine.

deleteEventRequest

public void deleteEventRequest(EventRequest eventRequest)
Removes a eventRequest. The eventRequest is disabled and removed from the list of eventRequests managed by this EventRequestManager. Once the eventRequest is deleted, no significant operations (for example, EventRequest.setEnabled(boolean)) are permitted. No other eventRequests are effected.
Parameters:
eventRequest - the eventRequest to remove
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

deleteEventRequests

public void deleteEventRequests(List eventRequests)
Removes a list of EventRequests.
Parameters:
eventRequests - the list of eventRequests to remove
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
See Also:
deleteEventRequest(EventRequest)

deleteAllBreakpoints

public void deleteAllBreakpoints()
Remove all breakpoints managed by this EventRequestManager.
See Also:
deleteEventRequest(EventRequest)

stepRequests

public List stepRequests()
Returns:
the all StepRequest objects.

classPrepareRequests

public List classPrepareRequests()
Returns:
the all ClassPrepareRequest objects.

classUnloadRequests

public List classUnloadRequests()
Returns:
the all ClassUnloadRequest objects.

threadStartRequests

public List threadStartRequests()
Returns:
the all ThreadStartRequest objects.

threadDeathRequests

public List threadDeathRequests()
Returns:
the all ThreadDeathRequest objects.

exceptionRequests

public List exceptionRequests()
Returns:
the all ExceptionRequest objects.

breakpointRequests

public List breakpointRequests()
Returns:
the list of all BreakpointRequest objects.

accessWatchpointRequests

public List accessWatchpointRequests()
Returns:
the all AccessWatchpointRequest objects.

modificationWatchpointRequests

public List modificationWatchpointRequests()
Returns:
the all ModificationWatchpointRequest objects.

methodEntryRequests

public List methodEntryRequests()
Returns:
the list of all MethodEntryRequest objects.

methodExitRequests

public List methodExitRequests()
Returns:
the list of all MethodExitRequest objects.
Overview  Package   Class  Use  Tree  Index  Help
Java Debug Interface
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


ExceptionRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ExceptionRequest

All Superinterfaces:
EventRequest, Mirror
public interface ExceptionRequest
extends EventRequest

Request for notification when an exception occurs in the target VM. When an enabled ExceptionRequest is satisfied, an event set containing an ExceptionEvent will be placed on the EventQueue. The collection of existing ExceptionRequests is managed by the EventRequestManager

Since:
1.3
See Also:
ExceptionEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
void | addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in the given thread.
ReferenceType | exception() Returns exception type for which exception events are requested.
boolean | notifyCaught() Returns whether caught exceptions of the requested type will generate events when they are thrown.
boolean | notifyUncaught() Returns whether uncaught exceptions of the requested type will generate events when they are thrown.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

exception

public ReferenceType exception()
Returns exception type for which exception events are requested.
Returns:
The exception (and its subclasses) requested with EventRequestManager.createExceptionRequest(com.sun.jdi.ReferenceType, boolean, boolean), or null if, as by default, all exceptions are requested.

notifyCaught

public boolean notifyCaught()
Returns whether caught exceptions of the requested type will generate events when they are thrown.

Note that at the time an exception is thrown, it is not always possible to determine whether it is truly caught. See ExceptionEvent.catchLocation() for details.

Returns:
boolean true if caught exceptions will be reported, false otherwise.

notifyUncaught

public boolean notifyUncaught()
Returns whether uncaught exceptions of the requested type will generate events when they are thrown.

Note that at the time an exception is thrown, it is not always possible to determine whether it is truly uncaught. See ExceptionEvent.catchLocation() for details.

Returns:
boolean true if caught exceptions will be reported, false otherwise.

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the events generated by this request to those in the given thread.
Parameters:
thread - the thread to filter on.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
Parameters:
referenceType - the reference type to filter on.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidRequestStateException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Class InvalidRequestStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.request.InvalidRequestStateException
All Implemented Interfaces:
Serializable
public class InvalidRequestStateException
extends RuntimeException

Thrown to indicate that the requested event cannot be modified because it is enabled. Filters can be added only to disabled event requests.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
InvalidRequestStateException()
InvalidRequestStateException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidRequestStateException

public InvalidRequestStateException()

InvalidRequestStateException

public InvalidRequestStateException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MethodEntryRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface MethodEntryRequest

All Superinterfaces:
EventRequest, Mirror
public interface MethodEntryRequest
extends EventRequest

Request for notification when a method is invoked in the target VM. When an enabled MethodEntryRequest is satisfied, an event set containing a MethodEntryEvent will be placed on the EventQueue. The collection of existing MethodEntryRequests is managed by the EventRequestManager

Since:
1.3
See Also:
MethodEntryEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression.
void | addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the events generated by this request to those in this thread.
Parameters:
thread - the thread to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
Parameters:
refType - the reference type to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose method is in a class whose name matches this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression. e.g. "java.*" or "*.Foo".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MethodExitRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface MethodExitRequest

All Superinterfaces:
EventRequest, Mirror
public interface MethodExitRequest
extends EventRequest

Request for notification when a method returns in the target VM. When an enabled MethodExitRequest is hit, an event set containing a MethodExitEvent will be placed on the EventQueue. The collection of existing MethodExitRequests is managed by the EventRequestManager

Since:
1.3
See Also:
MethodExitEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression.
void | addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the events generated by this request to those in this thread.
Parameters:
thread - the thread to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to those whose method is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
Parameters:
refType - the reference type to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose method is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose method is in a class whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StepRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface StepRequest

All Superinterfaces:
EventRequest, Mirror
public interface StepRequest
extends EventRequest

Request for notification when a step occurs in the target VM. When an enabled StepRequest is satisfied, an event set containing a StepEvent will be placed on the EventQueue. The collection of existing StepRequests is managed by the EventRequestManager

Since:
1.3
See Also:
StepEvent, EventQueue, EventRequestManager

Field Summary
static int | STEP_INTO Step into any newly pushed frames
static int | STEP_LINE Step to the next location on a different line
static int | STEP_MIN Step to the next available location
static int | STEP_OUT Step out of the current frame
static int | STEP_OVER Step over any newly pushed frames
Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
int | depth()
int | size()
ThreadReference | thread()
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Field Detail

STEP_INTO

public static final int STEP_INTO
Step into any newly pushed frames

STEP_OVER

public static final int STEP_OVER
Step over any newly pushed frames

STEP_OUT

public static final int STEP_OUT
Step out of the current frame

STEP_MIN

public static final int STEP_MIN
Step to the next available location

STEP_LINE

public static final int STEP_LINE
Step to the next location on a different line
Method Detail

thread

public ThreadReference thread()
Returns:
the thread on which the step event is being requested.

size

public int size()
Returns:
the step size

depth

public int depth()
Returns:
the step depth

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
Parameters:
refType - the reference type to filter on.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name does not match a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadDeathRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ThreadDeathRequest

All Superinterfaces:
EventRequest, Mirror
public interface ThreadDeathRequest
extends EventRequest

Request for notification when a thread terminates in the target VM. When an enabled ThreadDeathRequest is satisfied, an event set containing a ThreadDeathEvent will be placed on the EventQueue. The collection of existing ThreadDeathRequests is managed by the EventRequestManager

Since:
1.3
See Also:
ThreadDeathEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
 void addThreadFilter(ThreadReference thread)
Restricts the event generated by this request to the ending of this thread.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the event generated by this request to the ending of this thread.
Parameters:
thread - the thread to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadStartRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface ThreadStartRequest

All Superinterfaces:
EventRequest, Mirror
public interface ThreadStartRequest
extends EventRequest

Request for notification when a thread starts execution in the target VM. When an enabled ThreadStartRequest is hit, an event set containing a ThreadStartEvent will be placed on the EventQueue. The collection of existing ThreadStartRequests is managed by the EventRequestManager

Since:
1.3
See Also:
ThreadStartEvent, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
 void addThreadFilter(ThreadReference thread)
Restricts the event generated by this request to the starting of this thread.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the event generated by this request to the starting of this thread.
Parameters:
thread - the thread to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WatchpointRequest

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi.request
Interface WatchpointRequest

All Superinterfaces:
EventRequest, Mirror
All Known Subinterfaces:
AccessWatchpointRequest, ModificationWatchpointRequest
public interface WatchpointRequest
extends EventRequest

Identifies a Field in the target VM being watched.

Since:
1.3
See Also:
AccessWatchpointRequest, ModificationWatchpointRequest, EventQueue, EventRequestManager

Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
Method Summary
void | addClassExclusionFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression.
void | addClassFilter(ReferenceType refType) Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
void | addClassFilter(String classPattern) Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
void | addThreadFilter(ThreadReference thread) Restricts the events generated by this request to those in this thread.
Field | field() Gets the Field being watched by this WatchpointRequest.
Methods inherited from interface com.sun.jdi.request.EventRequest
addCountFilter, disable, enable, getProperty, isEnabled, putProperty, setEnabled, setSuspendPolicy, suspendPolicy
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

field

public Field field()
Gets the Field being watched by this WatchpointRequest.
Returns:
the Field this Watchpoint is monitoring.

addThreadFilter

public void addThreadFilter(ThreadReference thread)
Restricts the events generated by this request to those in this thread.
Parameters:
thread - the thread to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(ReferenceType refType)
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.
Parameters:
refType - the reference type to filter on.
Throws:
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter for.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
classPattern - the pattern String to filter against.
Throws:
InvalidRequestStateException - if this request is currently enabled. Filters may be added only to disabled requests.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ShortValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ShortValue

All Superinterfaces:
Comparable, Mirror, PrimitiveValue, Value
public interface ShortValue
extends PrimitiveValue, Comparable

Provides access to a primitive short value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this ShortValue for equality.
int | hashCode() Returns the hash code value for this ShortValue.
short | value() Returns this ShortValue as a short.
Methods inherited from interface com.sun.jdi.PrimitiveValue
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, shortValue
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface java.lang.Comparable
compareTo

Method Detail

value

public short value()
Returns this ShortValue as a short.
Returns:
the short mirrored by this object.

equals

public boolean equals(Object obj)
Compares the specified Object with this ShortValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a ShortValue and if applying "==" to the two mirrored primitives would evaluate to true; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this ShortValue.
Overrides:
hashCode in class Object
Returns:
the integer hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StackFrame

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface StackFrame

All Superinterfaces:
Locatable, Mirror
public interface StackFrame
extends Mirror, Locatable

The state of one method invocation on a thread's call stack. As a thread executes, stack frames are pushed and popped from its call stack as methods are invoked and then return. A StackFrame mirrors one such frame from a target VM at some point in its thread's execution. The call stack is, then, simply a List of StackFrame objects. The call stack can be obtained any time a thread is suspended through a call to ThreadReference.frames()

StackFrames provide access to a method's local variables and their current values.

The lifetime of a StackFrame is very limited. It is available only for suspended threads and becomes invalid once its thread is resumed.

Since:
1.3

Method Summary
Value | getValue(LocalVariable variable) Gets the Value of a LocalVariable in this frame.
Map | getValues(List variables) Returns the values of multiple local variables in this frame.
Location | location() Returns the Location of the current instruction in the frame.
void | setValue(LocalVariable variable, Value value) Sets the Value of a LocalVariable in this frame.
ObjectReference | thisObject() Returns the value of 'this' for the current frame.
ThreadReference | thread() Returns the thread under which this frame's method is running.
LocalVariable | visibleVariableByName(String name) Finds a LocalVariable that matches the given name and is visible at the current frame location.
List | visibleVariables() Returns a list containing each LocalVariable that can be accessed from this frame's location.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

location

public Location location()
Returns the Location of the current instruction in the frame. The method for which this frame was created can also be accessed through the returned location. For the top frame in the stack, this location identifies the next instruction to be executed. For all other frames, this location identifies the instruction that caused the next frame's method to be invoked. If the frame represents a native method invocation, the returned location indicates the class and method, but the code index will not be valid.
Specified by:
location in interface Locatable
Returns:
the Location of the current instruction.
Throws:
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

thread

public ThreadReference thread()
Returns the thread under which this frame's method is running.
Returns:
a ThreadReference which mirrors the frame's thread.
Throws:
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

thisObject

public ObjectReference thisObject()
Returns the value of 'this' for the current frame. The ObjectReference for 'this' is only available for non-native instance methods.
Returns:
an ObjectReference, or null if the frame represents a native or static method.
Throws:
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

visibleVariables

public List visibleVariables()
                      throws AbsentInformationException
Returns a list containing each LocalVariable that can be accessed from this frame's location.

Visibility is based on the code index of the current instruction of this StackFrame. Each variable has a range of byte code indices in which it is accessible. If this stack frame's method matches this variable's method and if the code index of this StackFrame is within the variable's byte code range, the variable is visible.

A variable's byte code range is at least as large as the scope of that variable, but can continue beyond the end of the scope under certain circumstances:

  • the compiler/VM does not immediately reuse the variable's slot.
  • the compiler/VM is implemented to report the extended range that would result from the item above.
The advantage of an extended range is that variables from recently exited scopes may remain available for examination (this is especially useful for loop indices). If, as a result of the extensions above, the current frame location is contained within the range of multiple local variables of the same name, the variable with the highest-starting range is chosen for the returned list.
Returns:
the list of LocalVariable objects currently visible.
Throws:
AbsentInformationException - if there is no line number information for this method.
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

visibleVariableByName

public LocalVariable visibleVariableByName(String name)
                                    throws AbsentInformationException
Finds a LocalVariable that matches the given name and is visible at the current frame location. See visibleVariables() for more information on visibility.
Parameters:
name - the variable name to find
Returns:
the matching LocalVariable, or null if there is no visible variable with the given name.
Throws:
AbsentInformationException - if there is no line number information for this method.
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.

getValue

public Value getValue(LocalVariable variable)
Gets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables().
Parameters:
variable - the LocalVariable to be accessed
Returns:
the Value of the instance field.
Throws:
IllegalArgumentException - if the variable is either invalid for this frame's method or not visible.
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

getValues

public Map getValues(List variables)
Returns the values of multiple local variables in this frame. Each variable must be valid for this frame's method and visible according to the rules described in visibleVariables().
Parameters:
variables - a list of LocalVariable objects to be accessed
Returns:
a map associating each LocalVariable with its Value
Throws:
IllegalArgumentException - if any variable is either invalid for this frame's method or not visible.
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.

setValue

public void setValue(LocalVariable variable,
                     Value value)
              throws InvalidTypeException,
                     ClassNotLoadedException
Sets the Value of a LocalVariable in this frame. The variable must be valid for this frame's method and visible according to the rules described in visibleVariables().

Object values must be assignment compatible with the variable type (This implies that the variable type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the variable type or must be convertible to the variable type without loss of information. See JLS section 5.2 for more information on assignment compatibility.

Parameters:
variable - the field containing the requested value
value - the new value to assign
Throws:
IllegalArgumentException - if the field is not valid for this object's class.
InvalidTypeException - if the value's type does not match the variable's type.
ClassNotLoadedException - if the variable type has not yet been loaded through the appropriate class loader.
InvalidStackFrameException - if this stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
VMMismatchException - if a Mirror argument and this mirror do not belong to the same VirtualMachine.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface StringReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface StringReference
extends ObjectReference

A string object from the target VM. A StringReference is an ObjectReference with additional access to string-specific information from the target VM.

Since:
1.3

Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
 String value()
Returns the StringReference as a String.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

value

public String value()
Returns the StringReference as a String. The returned string is the equivalent of the mirrored string, but is an entity in the client VM and can be manipulated like any other string.
Returns:
the string value.
Throws:
ObjectCollectedException - if this object has been garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadGroupReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ThreadGroupReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface ThreadGroupReference
extends ObjectReference

A thread group object from the target VM. A ThreadGroupReference is an ObjectReference with additional access to threadgroup-specific information from the target VM.

Since:
1.3

Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
String | name() Returns the name of this thread group.
ThreadGroupReference | parent() Returns the parent of this thread group.
void | resume() Resumes all threads in this thread group.
void | suspend() Suspends all threads in this thread group.
List | threadGroups() Returns a List containing each ThreadGroupReference in this thread group.
List | threads() Returns a List containing each ThreadReference in this thread group.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

name

public String name()
Returns the name of this thread group.
Returns:
the string containing the thread group name.
Throws:
ObjectCollectedException - if this object has been garbage collected.

parent

public ThreadGroupReference parent()
Returns the parent of this thread group.
Returns:
a ThreadGroupReference mirroring the parent of this thread group in the target VM, or null if this is a top-level thread group.
Throws:
ObjectCollectedException - if this object has been garbage collected.

suspend

public void suspend()
Suspends all threads in this thread group. Each thread in this group and in all of its subgroups will be suspended as described in ThreadReference.suspend(). This is not guaranteed to be an atomic operation; if the target VM is not interrupted at the time this method is called, it is possible that new threads will be created between the time that threads are enumerated and all of them have been suspended.
Throws:
ObjectCollectedException - if this object has been garbage collected.

resume

public void resume()
Resumes all threads in this thread group. Each thread in this group and in all of its subgroups will be resumed as described in ThreadReference.resume().
Throws:
ObjectCollectedException - if this object has been garbage collected.

threads

public List threads()
Returns a List containing each ThreadReference in this thread group. Only the threads in this immediate thread group (and not its subgroups) are returned.
Returns:
a List of ThreadReference objects mirroring the threads from this thread group in the target VM.
Throws:
ObjectCollectedException - if this object has been garbage collected.

threadGroups

public List threadGroups()
Returns a List containing each ThreadGroupReference in this thread group. Only the thread groups in this immediate thread group (and not its subgroups) are returned.
Returns:
a List of ThreadGroupReference objects mirroring the threads from this thread group in the target VM.
Throws:
ObjectCollectedException - if this object has been garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadReference

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface ThreadReference

All Superinterfaces:
Mirror, ObjectReference, Value
public interface ThreadReference
extends ObjectReference

A thread object from the target VM. A ThreadReference is an ObjectReference with additional access to thread-specific information from the target VM.

Since:
1.3

Field Summary
static int | THREAD_STATUS_MONITOR Thread is waiting on a java monitor
static int | THREAD_STATUS_NOT_STARTED Thread has not yet been started
static int | THREAD_STATUS_RUNNING Thread is runnable
static int | THREAD_STATUS_SLEEPING Thread is sleeping - Thread.sleep() or JVM_Sleep() was called
static int | THREAD_STATUS_UNKNOWN Thread status is unknown
static int | THREAD_STATUS_WAIT Thread is waiting - Thread.wait() or JVM_MonitorWait() was called
static int | THREAD_STATUS_ZOMBIE Thread has completed execution
Fields inherited from interface com.sun.jdi.ObjectReference
INVOKE_NONVIRTUAL, INVOKE_SINGLE_THREADED
Method Summary
ObjectReference | currentContendedMonitor() Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting.
StackFrame | frame(int index) Returns the StackFrame at the given index in the thread's current call stack.
int | frameCount() Returns the number of stack frames in the thread's current call stack.
List | frames() Returns a List containing each StackFrame in the thread's current call stack.
List | frames(int start, int length) Returns a List containing a range of StackFrame mirrors from the thread's current call stack.
void | interrupt() Interrupts this thread.
boolean | isAtBreakpoint() Determines whether the thread is suspended at a breakpoint.
boolean | isSuspended() Determines whether the thread has been suspended by the the debugger.
String | name() Returns the name of this thread.
List | ownedMonitors() Returns a List containing an ObjectReference for each monitor owned by the thread.
void | resume() Resumes this thread.
int | status() Returns the thread's status.
void | stop(ObjectReference throwable) Stops this thread with an asynchronous exception.
void | suspend() Suspends this thread.
int | suspendCount() Resumes the number of pending suspends for this thread.
ThreadGroupReference | threadGroup() Returns this thread's thread group.
Methods inherited from interface com.sun.jdi.ObjectReference
disableCollection, enableCollection, entryCount, equals, getValue, getValues, hashCode, invokeMethod, isCollected, owningThread, referenceType, setValue, uniqueID, waitingThreads
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Field Detail

THREAD_STATUS_UNKNOWN

public static final int THREAD_STATUS_UNKNOWN
Thread status is unknown

THREAD_STATUS_ZOMBIE

public static final int THREAD_STATUS_ZOMBIE
Thread has completed execution

THREAD_STATUS_RUNNING

public static final int THREAD_STATUS_RUNNING
Thread is runnable

THREAD_STATUS_SLEEPING

public static final int THREAD_STATUS_SLEEPING
Thread is sleeping - Thread.sleep() or JVM_Sleep() was called

THREAD_STATUS_MONITOR

public static final int THREAD_STATUS_MONITOR
Thread is waiting on a java monitor

THREAD_STATUS_WAIT

public static final int THREAD_STATUS_WAIT
Thread is waiting - Thread.wait() or JVM_MonitorWait() was called

THREAD_STATUS_NOT_STARTED

public static final int THREAD_STATUS_NOT_STARTED
Thread has not yet been started
Method Detail

name

public String name()
Returns the name of this thread.
Returns:
the string containing the thread name.
Throws:
ObjectCollectedException - if this object has been garbage collected.

suspend

public void suspend()
Suspends this thread. The thread can be resumed through resume() or resumed with other threads through VirtualMachine.resume().

Unlike java.lang.Thread#suspend, suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed (through resume() or resume()) the same number of times it has been suspended.

Suspending single threads with this method has the same dangers as java.lang.Thread.suspend(). If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again).

The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through java.lang.Thread#resume.

Throws:
ObjectCollectedException - if this object has been garbage collected.

resume

public void resume()
Resumes this thread. If this thread was not previously suspended through suspend() or through VirtualMachine.suspend(), invoking this method has no effect. Otherwise, the count of pending suspends on this thread is decremented. If it is decremented to 0, the thread will continue to execute.
Throws:
ObjectCollectedException - if this object has been garbage collected.

suspendCount

public int suspendCount()
Resumes the number of pending suspends for this thread. See suspend() for an explanation of counted suspends.
Returns:
the integer pending suspend count
Throws:
ObjectCollectedException - if this object has been garbage collected.

stop

public void stop(ObjectReference throwable)
          throws InvalidTypeException
Stops this thread with an asynchronous exception. A debugger thread in the target VM will stop this thread with the given Throwable object.
Parameters:
throwable - the asynchronous exception to throw.
Throws:
InvalidTypeException - if throwable is not an instance of java.lang.Throwable in the target VM.
ObjectCollectedException - if this object or the asynchronous exception has been garbage collected.
See Also:
java.lang.Thread#stop(Throwable)

interrupt

public void interrupt()
Interrupts this thread.
Throws:
ObjectCollectedException - if this object has been garbage collected.
See Also:
java.lang.Thread#interrupt()

status

public int status()
Returns the thread's status. If the thread is not suspended the thread's current status is returned. If the thread is suspended, the thread's status before the suspension is returned (or THREAD_STATUS_UNKNOWN if this information is not available. isSuspended() can be used to determine if the thread has been suspended.
Returns:
one of THREAD_STATUS_UNKNOWN, THREAD_STATUS_ZOMBIE, THREAD_STATUS_RUNNING, THREAD_STATUS_SLEEPING, THREAD_STATUS_MONITOR, THREAD_STATUS_WAIT, THREAD_STATUS_NOT_STARTED,
Throws:
ObjectCollectedException - if this object has been garbage collected.

isSuspended

public boolean isSuspended()
Determines whether the thread has been suspended by the the debugger.
Returns:
true if the thread is currently suspended; false otherwise.
Throws:
ObjectCollectedException - if this object has been garbage collected.

isAtBreakpoint

public boolean isAtBreakpoint()
Determines whether the thread is suspended at a breakpoint.
Returns:
true if the thread is currently stopped at a breakpoint; false otherwise.
Throws:
ObjectCollectedException - if this object has been garbage collected.

threadGroup

public ThreadGroupReference threadGroup()
Returns this thread's thread group.
Returns:
a ThreadGroupReference that mirrors this thread's thread group in the target VM.
Throws:
ObjectCollectedException - if this object has been garbage collected.

frameCount

public int frameCount()
               throws IncompatibleThreadStateException
Returns the number of stack frames in the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
Returns:
an integer frame count
Throws:
IncompatibleThreadStateException - if the thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.

frames

public List frames()
            throws IncompatibleThreadStateException
Returns a List containing each StackFrame in the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
Returns:
a List of StackFrame with the current frame first followed by each caller's frame.
Throws:
IncompatibleThreadStateException - if the thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.

frame

public StackFrame frame(int index)
                 throws IncompatibleThreadStateException
Returns the StackFrame at the given index in the thread's current call stack. Index 0 retrieves the current frame; higher indices retrieve caller frames. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
Parameters:
index - the desired frame
Returns:
the requested StackFrame
Throws:
IncompatibleThreadStateException - if the thread is not suspended in the target VM
java.lang.IndexOutOfBoundsException - if the index is greater than or equal to frameCount() or is negative.
ObjectCollectedException - if this object has been garbage collected.

frames

public List frames(int start,
                   int length)
            throws IncompatibleThreadStateException
Returns a List containing a range of StackFrame mirrors from the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
Parameters:
start - the index of the first frame
length - the number of frames to retrieve
Returns:
a List of StackFrame with the current frame first followed by each caller's frame.
Throws:
IncompatibleThreadStateException - if the thread is not suspended in the target VM
IndexOutOfBoundsException - if the specified range is not within the range from 0 to frameCount() - 1.
ObjectCollectedException - if this object has been garbage collected.

ownedMonitors

public List ownedMonitors()
                   throws IncompatibleThreadStateException
Returns a List containing an ObjectReference for each monitor owned by the thread. A monitor is owned by a thread if it has been entered (via the synchronized statement or entry into a synchronized method) and has not been relinquished through Object.wait(long).

Not all target VMs support this operation. See VirtualMachine#canGetOwnedMonitorInfo to determine if the operation is supported.

Returns:
a List of ObjectReference objects. The list has zero length if no monitors are owned by this thread.
Throws:
java.lang.UnsupportedOperationException - if the target target VM does not support this operation.
IncompatibleThreadStateException - if the thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.

currentContendedMonitor

public ObjectReference currentContendedMonitor()
                                        throws IncompatibleThreadStateException
Returns an ObjectReference for the monitor, if any, for which this thread is currently waiting. The thread can be waiting for a monitor through entry into a synchronized method, the synchronized statement, or Object.wait(long). The status() method can be used to differentiate between the first two cases and the third.

Not all target VMs support this operation. See VirtualMachine#canGetCurrentContendedMonitor to determine if the operation is supported.

Returns:
the ObjectReference corresponding to the contended monitor, or null if it is not waiting for a monitor.
Throws:
java.lang.UnsupportedOperationException - if the target target VM does not support this operation.
IncompatibleThreadStateException - if the thread is not suspended in the target VM
ObjectCollectedException - if this object has been garbage collected.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Type

All Superinterfaces:
Mirror
All Known Subinterfaces:
ArrayType, BooleanType, ByteType, CharType, ClassType, DoubleType, FloatType, IntegerType, InterfaceType, LongType, PrimitiveType, ReferenceType, ShortType, VoidType
public interface Type
extends Mirror

The type of a Value retrieved from the target VM. This interface is the root of a type hierarchy encompassing primitive types and reference types.

Since:
1.3

Method Summary
String | name()
String | signature() Returns the JNI-style signature for this type.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

signature

public String signature()
Returns the JNI-style signature for this type.

For primitive classes the returned signature is the signature of the corresponding primitive type; for example, "I" is returned as the signature of the class represented by java.lang.Integer#TYPE.

Returns:
the string containing the type signature.
See Also:
Type Signatures

name

public String name()
Returns:
a text representation of this type.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeComponent

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface TypeComponent

All Superinterfaces:
Accessible, Mirror
All Known Subinterfaces:
Field, Method
public interface TypeComponent
extends Mirror, Accessible

An entity declared within a user defined type (class or interface). This interface is the root of the type component hierarchy which includes Field and Method. Type compoents of the same name declared in different classes (including those related by inheritance) have different TypeComponent objeects. TypeComponents can be used alone to retrieve static information about their declaration, or can be used in conjunction with a ReferenceType or ObjectReference to access values or invoke, as applicable.

Since:
1.3

Method Summary
ReferenceType | declaringType() Returns the type in which this component was declared.
boolean | isFinal() Determines if this TypeComponent is final.
boolean | isStatic() Determines if this TypeComponent is static.
boolean | isSynthetic() Determines if this TypeComponent is synthetic.
String | name() Gets the name of this type component.
String | signature() Gets the JNI-style signature for this type component.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers

Method Detail

name

public String name()
Gets the name of this type component.

Note: for fields, this is the field name; for methods, this is the method name; for constructors, this is <init>; for static initializers, this is <clinit>.

Returns:
a string containing the name.

signature

public String signature()
Gets the JNI-style signature for this type component. The signature is encoded type information as defined in the JNI documentation. It is a convenient, compact format for for manipulating type information internally, not necessarily for display to an end user. See Field.typeName() and Method.returnTypeName() for ways to help get a more readable representation of the type.
Returns:
a string containing the signature
See Also:
Type Signatures

declaringType

public ReferenceType declaringType()
Returns the type in which this component was declared. The returned ReferenceType mirrors either a class or an interface in the target VM.

isStatic

public boolean isStatic()
Determines if this TypeComponent is static. Return value is undefined for constructors and static initializers.
Returns:
true if this type component was declared static; false otherwise.

isFinal

public boolean isFinal()
Determines if this TypeComponent is final. Return value is undefined for constructors and static initializers.
Returns:
true if this type component was declared final; false otherwise.

isSynthetic

public boolean isSynthetic()
Determines if this TypeComponent is synthetic. Synthetic members are generated by the compiler and are not present in the source code for the containing class.

Not all target VMs support this query. See VirtualMachine.canGetSyntheticAttribute() to determine if the operation is supported.

Returns:
true if this type component is synthetic; false otherwise.
Throws:
java.lang.UnsupportedOperationException - if the target VM cannot provide information on synthetic attributes.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Value

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface Value

All Superinterfaces:
Mirror
All Known Subinterfaces:
ArrayReference, BooleanValue, ByteValue, CharValue, ClassLoaderReference, ClassObjectReference, DoubleValue, FloatValue, IntegerValue, LongValue, ObjectReference, PrimitiveValue, ShortValue, StringReference, ThreadGroupReference, ThreadReference, VoidValue
public interface Value
extends Mirror

The value assigned to a field or variable at some point during the execution of the target VM. This interface is the root of a value hierarchy encompassing primitive and object values.

Since:
1.3

Method Summary
 Type type()
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

type

public Type type()
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VirtualMachine

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface VirtualMachine

All Superinterfaces:
Mirror
All Known Subinterfaces:
PathSearchingVirtualMachine
public interface VirtualMachine
extends Mirror

A virtual machine targeted for debugging. All other mirrors are associated with an instance of this interface. Access to global VM properties and control of VM execution are supported directly by this interface.

Since:
1.3

Field Summary
static int | TRACE_ALL All tracing is enabled.
static int | TRACE_EVENTS Tracing enabled for internal event handling.
static int | TRACE_NONE All tracing is disabled.
static int | TRACE_OBJREFS Tracing enabled for internal management of object references.
static int | TRACE_RECEIVES Tracing enabled for JDWP packets received from target VM.
static int | TRACE_REFTYPES Tracing enabled for internal managment of reference types.
static int | TRACE_SENDS Tracing enabled for JDWP packets sent to target VM.
Method Summary
List | allClasses() Returns all loaded types.
List | allThreads() Returns a list of the currently running threads.
boolean | canGetBytecodes() Determines if this implementation supports the retrieval of a method's bytecodes.
boolean | canGetCurrentContendedMonitor() Determines if this implementation supports the retrieval of the monitor for which a thread is currently waiting.
boolean | canGetMonitorInfo() Determines if this implementation supports the retrieval of the monitor information for an object.
boolean | canGetOwnedMonitorInfo() Determines if this implementation supports the retrieval of the monitors owned by a thread.
boolean | canGetSyntheticAttribute() Determines if this implementation supports the query of the synthetic attribute of a method or field.
boolean | canWatchFieldAccess() Determines if this implementation supports watchpoints for field access.
boolean | canWatchFieldModification() Determines if this implementation supports watchpoints for field modification.
List | classesByName(String className) Returns the loaded reference types that match a given name.
String | description() Returns text information on the target VM and the debugger support that mirrors it.
void | dispose() Invalidates this virtual machine mirror.
EventQueue | eventQueue() Returns the event queue for this virtual machine.
EventRequestManager | eventRequestManager() Returns the event request manager for this virtual machine.
void | exit(int exitCode) Causes the mirrored VM to terminate with the given error code.
BooleanValue | mirrorOf(boolean value) Creates a BooleanValue for the given value.
ByteValue | mirrorOf(byte value) Creates a ByteValue for the given value.
CharValue | mirrorOf(char value) Creates a CharValue for the given value.
DoubleValue | mirrorOf(double value) Creates a DoubleValue for the given value.
FloatValue | mirrorOf(float value) Creates a FloatValue for the given value.
IntegerValue | mirrorOf(int value) Creates an IntegerValue for the given value.
LongValue | mirrorOf(long value) Creates a LongValue for the given value.
ShortValue | mirrorOf(short value) Creates a ShortValue for the given value.
StringReference | mirrorOf(String value) Creates a string in this virtual machine.
String | name() Returns the name of the target VM as reported by the property java.vm.name.
Process | process() Returns the Process object for this virtual machine if launched by a LaunchingConnector
void | resume() Continues the execution of the application running in this virtual machine.
void | setDebugTraceMode(int traceFlags) Traces the activities performed by the com.sun.jdi implementation.
void | suspend() Suspends the execution of the application running in this virtual machine.
List | topLevelThreadGroups() Returns each thread group which does not have a parent.
String | version() Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version.
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Field Detail

TRACE_NONE

public static final int TRACE_NONE
All tracing is disabled.

TRACE_SENDS

public static final int TRACE_SENDS
Tracing enabled for JDWP packets sent to target VM.

TRACE_RECEIVES

public static final int TRACE_RECEIVES
Tracing enabled for JDWP packets received from target VM.

TRACE_EVENTS

public static final int TRACE_EVENTS
Tracing enabled for internal event handling.

TRACE_REFTYPES

public static final int TRACE_REFTYPES
Tracing enabled for internal managment of reference types.

TRACE_OBJREFS

public static final int TRACE_OBJREFS
Tracing enabled for internal management of object references.

TRACE_ALL

public static final int TRACE_ALL
All tracing is enabled.
Method Detail

classesByName

public List classesByName(String className)
Returns the loaded reference types that match a given name. The name must be fully qualified (for example, java.lang.String). The returned list will contain a ReferenceType for each class or interface found with the given name. The search is confined to loaded classes only; no attempt is made to load a class of the given name.

The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.

Parameters:
className - the class/interface name to search for
Returns:
a list of ReferenceType objects, each mirroring a type in the target VM with the given name.

allClasses

public List allClasses()
Returns all loaded types. For each loaded type in the target VM a ReferenceType will be placed in the returned list. The list will include ReferenceTypes which mirror classes, interfaces, and array types.

The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.

Returns:
a list of ReferenceType objects, each mirroring a loaded type in the target VM.

allThreads

public List allThreads()
Returns a list of the currently running threads. For each running thread in the target VM, a ThreadReference that mirrors it is placed in the list. The returned list contains threads created through java.lang.Thread, all native threads attached to the target VM through JNI, and system threads created by the target VM. Thread objects that have not yet been started (see java.lang.Thread#start) and thread objects that have completed their execution are not included in the returned list.
Returns:
a list of ThreadReference objects, one for each running thread in the mirrored VM.

suspend

public void suspend()
Suspends the execution of the application running in this virtual machine. All threads currently running will be suspended.

Unlike java.lang.Thread#suspend, suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed (through resume() or ThreadReference.resume()) the same number of times it has been suspended.

resume

public void resume()
Continues the execution of the application running in this virtual machine. All threads are resumed as documented in ThreadReference.resume().
See Also:
suspend()

topLevelThreadGroups

public List topLevelThreadGroups()
Returns each thread group which does not have a parent. For each top level thread group a ThreadGroupReference is placed in the returned list.

This command may be used as the first step in building a tree (or trees) of the existing thread groups.

Returns:
a list of ThreadGroupReference objects, one for each top level thread group.

eventQueue

public EventQueue eventQueue()
Returns the event queue for this virtual machine. A virtual machine has only one EventQueue object, this method will return the same instance each time it is invoked.
Returns:
the EventQueue for this virtual machine.

eventRequestManager

public EventRequestManager eventRequestManager()
Returns the event request manager for this virtual machine. The EventRequestManager controls user settable events such as breakpoints. A virtual machine has only one EventRequestManager object, this method will return the same instance each time it is invoked.
Returns:
the EventRequestManager for this virtual machine.

mirrorOf

public BooleanValue mirrorOf(boolean value)
Creates a BooleanValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a boolean for which to create the value
Returns:
the BooleanValue for the given boolean.

mirrorOf

public ByteValue mirrorOf(byte value)
Creates a ByteValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a byte for which to create the value
Returns:
the ByteValue for the given byte.

mirrorOf

public CharValue mirrorOf(char value)
Creates a CharValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a char for which to create the value
Returns:
the CharValue for the given char.

mirrorOf

public ShortValue mirrorOf(short value)
Creates a ShortValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a short for which to create the value
Returns:
the ShortValue for the given short.

mirrorOf

public IntegerValue mirrorOf(int value)
Creates an IntegerValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - an int for which to create the value
Returns:
the IntegerValue for the given int.

mirrorOf

public LongValue mirrorOf(long value)
Creates a LongValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a long for which to create the value
Returns:
the LongValue for the given long.

mirrorOf

public FloatValue mirrorOf(float value)
Creates a FloatValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a float for which to create the value
Returns:
the FloatValue for the given float.

mirrorOf

public DoubleValue mirrorOf(double value)
Creates a DoubleValue for the given value. This value can be used for setting and comparing against a value retrieved from a variable or field in this virtual machine.
Parameters:
value - a double for which to create the value
Returns:
the DoubleValue for the given double.

mirrorOf

public StringReference mirrorOf(String value)
Creates a string in this virtual machine. The created string can be used for setting and comparing against a string value retrieved from a variable or field in this virtual machine.
Parameters:
the - string to be created
Returns:
a StringReference that mirrors the newly created string in the target VM.

process

public Process process()
Returns the Process object for this virtual machine if launched by a LaunchingConnector
Returns:
the Process object for this virtual machine, or null if it was not launched by a LaunchingConnector.

dispose

public void dispose()
Invalidates this virtual machine mirror. The communication channel to the target VM is closed, and the target VM prepares to accept another subsequent connection from this debugger or another debugger, including the following tasks:
  • All event requests are cancelled.
  • All threads suspended by suspend() or by ThreadReference.suspend() are resumed as many times as necessary for them to run.
  • Garbage collection is re-enabled in all cases where it was disabled through ObjectReference.disableCollection().
Any current method invocations executing in the target VM are continued after the disconnection. Upon completion of any such method invocation, the invoking thread continues from the location where it was originally stopped.

Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

exit

public void exit(int exitCode)
Causes the mirrored VM to terminate with the given error code. All resources associated with this VirtualMachine are freed. If the mirrored VM is remote, the communication channel to it will be closed. Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.

Threads running in the mirrored VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.

Parameters:
exitCode - the exit code for the target VM.

canWatchFieldModification

public boolean canWatchFieldModification()
Determines if this implementation supports watchpoints for field modification.
Returns:
true if the feature is supported, false otherwise.

canWatchFieldAccess

public boolean canWatchFieldAccess()
Determines if this implementation supports watchpoints for field access.
Returns:
true if the feature is supported, false otherwise.

canGetBytecodes

public boolean canGetBytecodes()
Determines if this implementation supports the retrieval of a method's bytecodes.
Returns:
true if the feature is supported, false otherwise.

canGetSyntheticAttribute

public boolean canGetSyntheticAttribute()
Determines if this implementation supports the query of the synthetic attribute of a method or field.
Returns:
true if the feature is supported, false otherwise.

canGetOwnedMonitorInfo

public boolean canGetOwnedMonitorInfo()
Determines if this implementation supports the retrieval of the monitors owned by a thread.
Returns:
true if the feature is supported, false otherwise.

canGetCurrentContendedMonitor

public boolean canGetCurrentContendedMonitor()
Determines if this implementation supports the retrieval of the monitor for which a thread is currently waiting.
Returns:
true if the feature is supported, false otherwise.

canGetMonitorInfo

public boolean canGetMonitorInfo()
Determines if this implementation supports the retrieval of the monitor information for an object.
Returns:
true if the feature is supported, false otherwise.

description

public String description()
Returns text information on the target VM and the debugger support that mirrors it. No specific format for this information is guaranteed. Typically, this string contains version information for the target VM and debugger interfaces. More precise information on VM and JDI versions is available through version(), VirtualMachineManager.majorInterfaceVersion(), and VirtualMachineManager.minorInterfaceVersion()
Returns:
the description.

version

public String version()
Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version. For obtaining the JDI interface version, use VirtualMachineManager.majorInterfaceVersion() and VirtualMachineManager.minorInterfaceVersion()
Returns:
the target VM version.

name

public String name()
Returns the name of the target VM as reported by the property java.vm.name.
Returns:
the target VM name.

setDebugTraceMode

public void setDebugTraceMode(int traceFlags)
Traces the activities performed by the com.sun.jdi implementation. All trace information is output to System.err. The given trace flags are used to limit the output to only the information desired. The given flags are in effect and the corresponding trace will continue until the next call to this method.

Output is implementation dependent and trace mode may be ignored.

Parameters:
traceFlags - identifies which kinds of tracing to enable.
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VirtualMachineManager

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface VirtualMachineManager

public interface VirtualMachineManager

A manager of connections to target virtual machines. The VirtualMachineManager allows one application to debug multiple target VMs. (Note that the converse is not supported; a target VM can be debugged by only one debugger application.) This interface contains methods to manage connections to remote target VMs and to obtain the VirtualMachine mirror for available target VMs.

Connections can be made using one of several different Connector objects. Each connector encapsulates a different way of connecting the debugger with a target VM.

The VirtualMachineManager supports many different scenarios for connecting a debugger to a virtual machine. Four examples are presented in the table below. The examples use the command line syntax in Sun's classic VM. Some Connector implementations may require slightly different handling than presented below.
Debugger launches target VM (simplest, most-common scenario) Debugger calls the LaunchingConnector.launch(java.util.Map) method of the default connector, obtained with defaultConnector(). The target VM is launched, and a connection between that VM and the debugger is established. A VirtualMachine mirror is returned.

Or, for more control

  • Debugger selects a connector from the list returned by launchingConnectors() with desired characteristics (for example, transport type, etc.).
  • Debugger calls the LaunchingConnector.launch(java.util.Map) method of the selected connector. The target VM is launched, and a connection between that VM and the debugger is established. A VirtualMachine mirror is returned.
Debugger attaches to previously-running VM
  • Target VM is launched using the options -Xrunjdwp:transport=xxx,server=y -Xdebug -Xnoagent -Djava.compiler=NONE
  • Target VM generates and outputs the tranport-specific address at which it will listen for a connection.
  • Debugger is launched. Debugger selects a connector in the list returned by attachingConnectors() matching the transport with the name "xxx".
  • Debugger presents the default connector parameters (obtained through Connector.defaultArguments()) to the end user, allowing the user to fill in the transport-specific address generated by the target VM.
  • Debugger calls the AttachingConnector.attach(java.util.Map) method of the selected to attach to the target VM. A VirtualMachine mirror is returned.
Target VM attaches to previously-running debugger
  • At startup, debugger selects one or more connectors from the list returned by listeningConnectors() for one or more transports.
  • Debugger calls the ListeningConnector.startListening(java.util.Map) method for each selected connector. For each call, a transport-specific address string is generated and returned. The debugger makes the transport names and corresponding address strings available to the end user.
  • Debugger calls ListeningConnector.accept(java.util.Map) for each selected connector to wait for a target VM to connect.
  • Later, target VM is launched by end user with the options -Xrunjdwp:transport=xxx,address=yyy -Xdebug -Xnoagent -Djava.compiler=NONE where "xxx" the transport for one of the connectors selected by the the debugger and "yyy" is the address generated by ListeningConnector.accept(java.util.Map) for that transport.
  • Debugger's call to ListeningConnector.accept(java.util.Map) returns a VirtualMachine mirror.
            •
    Target VM launches debugger (sometimes called "Just-In-Time" debugging)
  • Target VM is launched with the options -Xrunjdwp:launch=cmdline,onuncaught=y,transport=xxx,server=y
  • Later, an uncaught exception is thrown in the target VM. The target VM generates the tranport-specific address at which it will listen for a connection.
  • Target VM launches the debugger with the following items concatenated together (separated by spaces) to form the command line:
    • The launch= value
    • The transport= value
    • The generated transport-specific address at which VM is listening for debugger connection.
  • Upon launch, debugger selects a connector in the list returned by attachingConnectors() matching the transport with the name "xxx".
  • Debugger changes the default connector parameters (obtained through Connector.defaultArguments()) to specify the transport specific address at which the VM is listenig. Optionally, other connector arguments can be presented to the user.
  • Debugger calls the AttachingConnector.attach(java.util.Map) method of the selected to attach to the target VM. A VirtualMachine mirror is returned.

    • Since:
    1.3

    Method Summary
List | allConnectors() Returns the list of all known Connector objects.
List | attachingConnectors() Returns the list of known AttachingConnector objects.
List | connectedVirtualMachines() Lists all target VMs which are connected to the debugger.
LaunchingConnector | defaultConnector() Identifies the default connector.
List | launchingConnectors() Returns the list of known LaunchingConnector objects.
List | listeningConnectors() Returns the list of known ListeningConnector objects.
int | majorInterfaceVersion() Returns the major version number of the JDI interface.
int | minorInterfaceVersion() Returns the minor version number of the JDI interface.

    Method Detail

    defaultConnector

    public LaunchingConnector defaultConnector()
    Identifies the default connector. This connector should be used as the launching connector when selection of a connector with specific characteristics is unnecessary.
    Returns:
    the default LaunchingConnector

    launchingConnectors

    public List launchingConnectors()
    Returns the list of known LaunchingConnector objects. Any of the returned objects can be used to launch a new target VM and immediately create a VirtualMachine mirror for it.
    Returns:
    a list of LaunchingConnector objects.

    attachingConnectors

    public List attachingConnectors()
    Returns the list of known AttachingConnector objects. Any of the returned objects can be used to attach to an existing target VM and create a VirtualMachine mirror for it.
    Returns:
    a list of AttachingConnector objects.

    listeningConnectors

    public List listeningConnectors()
    Returns the list of known ListeningConnector objects. Any of the returned objects can be used to listen for a connection initiated by a target VM and create a VirtualMachine mirror for it.
    Returns:
    a list of ListeningConnector objects.

    allConnectors

    public List allConnectors()
    Returns the list of all known Connector objects.
    Returns:
    a list of ListeningConnector objects.

    connectedVirtualMachines

    public List connectedVirtualMachines()
    Lists all target VMs which are connected to the debugger. The list includes VirtualMachine instances for any target VMs which initiated a connection and any target VMs to which this manager has initiated a connection. A target VM will remain in this list until it is discarded through VirtualMachine.dispose() or until it VMDeathEvent is received, whichever happens first.
    Returns:
    a list of VirtualMachine objects, each mirroring a target VM.

    majorInterfaceVersion

    public int majorInterfaceVersion()
    Returns the major version number of the JDI interface. See VirtualMachine.version() target VM version and information and VirtualMachine.description() more version information.
    Returns:
    the integer major version number.

    minorInterfaceVersion

    public int minorInterfaceVersion()
    Returns the minor version number of the JDI interface. See VirtualMachine.version() target VM version and information and VirtualMachine.description() more version information.
    Returns:
    the integer minor version number
    Overview Package Class Use Tree Index Help
            Java Debug Interface
    PREV CLASS NEXT CLASS FRAMES NO FRAMES
    SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VMDisconnectedException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class VMDisconnectedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.VMDisconnectedException
All Implemented Interfaces:
Serializable
public class VMDisconnectedException
extends RuntimeException

Unchecked exception thrown to indicate that the requested operation cannot be completed because there is no longer a connection to the target VM.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
VMDisconnectedException()
VMDisconnectedException(String message)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VMDisconnectedException

public VMDisconnectedException()

VMDisconnectedException

public VMDisconnectedException(String message)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VMMismatchException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class VMMismatchException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.VMMismatchException
All Implemented Interfaces:
Serializable
public class VMMismatchException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the a mirror from one target VM is being combined with a mirror from another target VM.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
VMMismatchException()
VMMismatchException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VMMismatchException

public VMMismatchException()

VMMismatchException

public VMMismatchException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VMOutOfMemoryException

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Class VMOutOfMemoryException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.jdi.VMOutOfMemoryException
All Implemented Interfaces:
Serializable
public class VMOutOfMemoryException
extends RuntimeException

Thrown to indicate that the requested operation cannot be completed because the target VM has run out of memory.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
VMOutOfMemoryException()
VMOutOfMemoryException(String s)
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VMOutOfMemoryException

public VMOutOfMemoryException()

VMOutOfMemoryException

public VMOutOfMemoryException(String s)
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VoidValue

Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.jdi
Interface VoidValue

All Superinterfaces:
Mirror, Value
public interface VoidValue
extends Value

Provides access to a primitive void value in the target VM.

Since:
1.3

Method Summary
boolean | equals(Object obj) Compares the specified Object with this VoidValue for equality.
int | hashCode() Returns the hash code value for this VoidValue.
Methods inherited from interface com.sun.jdi.Value
type
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine

Method Detail

equals

public boolean equals(Object obj)
Compares the specified Object with this VoidValue for equality.
Overrides:
equals in class Object
Returns:
true if the Object is a VoidValue; false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this VoidValue.
Overrides:
hashCode in class Object
Returns:
the hash code
Overview Package Class Use Tree Index Help
Java Debug Interface
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JPDA Connection and Invocation

Java

Connection and Invocation Details

Contents

Transports
Connectors
Sun VM Invocation Options
Debugging Plug-in Applets
Connecting with JDB

Transports

A JPDA transport is a form of inter-process communication used by a debugger application process and the virtual machine that is being debugged (often called the target VM). JDI and JDWP admit the existence of transports and refer to individual transports by a unique name, but the JDI and JDWP specifications do not require specific transport implementations to exist. Transport implementations can allow communications between processes running in a single machine, on different machines, or either.

In establishing a connection between a debugger application and a target VM, one side acts as a server, listening for a connection. At some later time the other side attaches to the listener and a connection is established. JPDA transports allow either the debugger application or the target VM to act as a server. During the establishment of a connection, transport addresses are used to identify the other side of a connection. Transport addresses are strings; their format depends on the transport implementation.

The JPDA reference implementation on Win32 provides two transports: a shared memory transport and a socket transport. The JPDA reference implementation on Solaris platforms provides a socket transport. Future versions of the JPDA reference implementation may include additional transports, Future versions of the JPDA specification may provide an interface for plugging additional transports into an implementation.

Socket Transport

The JPDA reference implementation provides a socket transport on both Solaris and Win32 platforms. The socket transport uses standard TCP/IP sockets to communicate information between debugger applications and target VM. With the socket transport, the debugger application and target VM can reside either on the same machine or on different machines. The socket transport is identified through a unique string, dt_socket. This name can be used to select the socket transport when invoking the target VM and when selecting a JDI connector.

In contexts where a client is attaching to a server, socket transport addresses have the format "<name>:<port>" where <name> is the host name and <port> is the socket port number at which it attaches or listens. In contexts where a server is waiting for a client to attach, the address consists of the port number alone (the host name is implicit).

Shared Memory Transport

In addition to the socket transport, the JPDA reference implementation provides a shared memory transport on the Win32 platform. The shared transport uses Win32 shared memory primitives to communicate information between debugger applications and target VM. With the shared memory transport, the debugger application and target VM must reside on the same machine. The shared memory transport is identified through a unique string, dt_shmem. This name can be used to select the socket transport when invoking the target VM and when selecting a JDI connector.

Shared memory transport addresses are simply names that can be used as Win32 file-mapping object names.The name string can consist of any combination of characters, excluding the backslash.

Connectors

A connector is a JDI abstraction that is used in establishing a connection between a debugger application (written to the JDI) and a target VM. Different JDI implementations are free to provide different connector implementations to match the transports and VMs they support. The connector interfaces are very general, to allow JDI to be used with varying connector implementations. Connectors are configured through a set of name/value pairs. Specific connectors accept different name/value pairs.

A good JDI client application will allow users to choose and configure any connector that may be present, but it can be beneficial to incorporate knowledge of specific connectors into the debugger to make their configuration a more pleasant user experience. The example JDB implementation provided with the JPDA illustrates this approach.

The JDI reference implementations provides several connectors which map to the available transport types and the modes of connection (launching, listening, and attaching). These connectors are described in the following sections.

Sun Command Line Launching Connector

This connector can be used by a debugger application to launch a Sun VM or any other VM which supports the same invocation options with respect to debugging. The details of launching the VM and specifying the necessary debug options are handled by the connector. The underlying transport used by this connector depends on the platform. On Win32, the shared memory transport is used. On Solaris, the socket transport is used.

This connector is uniquely identified by the name "com.sun.jdi.CommandLineLaunch".

Sun Command Line Launching Connector Arguments
name | required? | default value | description
home | no | current java.home property value | Location of the Java 2 Runtime Environment used to invoke the Target VM.
options | no | "" | Options, in addition to the standard debugging options, with which to invoke the VM.
main | yes | "" | The debugged application's main class and command line arguments.
suspend | no | true | True if the target VM is to be suspended immediately before the main class is loaded; false otherwise.
quote | yes | "\"" | The character used to combine space-delimited text on the command line.
vmexec | yes | "java" | The VM launcher executable. This can be changed to javaw or to java_g for debugging, if that launcher is available.

Raw Command Line Launching Connector

This connector can be used by a debugger application to launch any VM. The entire command line must be specified and it is not edited in any way. The details of launching the VM with the given command line are handled by the connector. The underlying transport used by this connector depends on the platform. On Win32, the shared memory transport is used. On Solaris, the socket transport is used.

This connector is uniquely identified by the name "com.sun.jdi.RawCommandLineLaunch".

Raw Command Line Launching Connector Arguments
name | required? | default value | description
command | yes | "" | Full command line to invoke the target VM with the application to be debugged..
address | yes | "" | Transport address at which to listen for the newly launched target VM to connect. This value is typically part of the raw command argument as well, but this is not required if the target VM has some other means of determining the transport address to which it should connect.
quote | yes | "\"" | The character used to combine space-delimited text on the command line.

Socket Attaching Connector

This connector can be used by a debugger application to attach to a currently running target VM through the socket transport.. The target VM must have been invoked with options consistent with this connector's arguments described in the table below. For Sun VMs, the necessary options are described below.

This connector is uniquely identified by the name "com.sun.jdi.SocketAttach".

Socket Attaching Connector Arguments
name | required? | default value | description
hostname | no | local host name | Name of host machine to connect to.
port | yes | "" | Port number on the host machine to connect to.

Shared Memory Attaching Connector

This connector can be used by a debugger application to attach to a currently running target VM through the shared memory transport..It is available only on the Win32 platform. The target VM must have been invoked with options consistent with this connectors arguments described in the table below. For Sun VMs, the necessary options are described below.

This connector is uniquely identified by the name "com.sun.jdi.SharedMemoryAttach".

Shared Memory Attaching Connector Arguments
name | required? | default value | description
name | yes | "" | The shared memory transport address at which the target VM is listening..

Socket Listening Connector

This connector can be used by a debugger application to accept a connection from a separately invoked target VM through the socket transport.. The target VM must be invoked with options consistent with this connector's arguments described in the table below. For Sun VMs, the necessary options are described below.

This connector can accept connections from multiple target VMs.

This connector is uniquely identified by the name "com.sun.jdi.SocketListen".

Socket Listening Connector Arguments
name | required? | default value | description
port | yes | "" | Port number at which to listen for a connection..

Shared Memory Listening Connector

This connector can be used by a debugger application to accept a connection from a separately invoked target VM through the shared memory transport..It is available only on the Win32 platform. The target VM must be invoked with options consistent with this connectors arguments described in the table below. For Sun VMs, the necessary options are described below.

This connector can accept connections from multiple target VMs.

This connector is uniquely identified by the name "com.sun.jdi.SharedMemoryListen".

Shared Memory Listening Connector Arguments
name | required? | default value | description
name | yes | "" | A shared memory transport address at which to listen for the target VM connection.

Sun VM Invocation Options

This section describes the options necessary to invoke Sun VMs for debugging. If your debugger application uses the JDI Sun Command Line Launching Connector, the appropriate options are set for you. In other cases, when the VM is invoked manually, you will need to set them.

Required Classic VM Options

The following VM invocation options are required to debug applications running under the classic VM.
-Xdebug
Enables debugging
-Xnoagent
Disables the old sun.tools.debug agent. JPDA attaches its "agent" in a different manner, described below.
-Djava.compiler=NONE
Disables the JIT compiler. Debugging with the classic VM requires that it's JIT compiler be disabled.
-Xrunjdwp:<sub-options>
Loads the JPDA reference implementation of JDWP. This library resides in the target VM and uses JVMDI and JNI to interact with it. It uses a transport and the JDWP protocol to communicate with a separate debugger application. Specific sub-options are described below.

If the Hotspot Performance Engine is installed, the -classic is necessary to select the classic VM.

Required Hotspot Performance Engine Options

The Hotspot Performance Engine requires the -Xdebug and -Xrunjdwp options described above. The -Xnoagent and -Djava.compiler=NONE options are not required; however, for compatibility, these options are accepted and ignored.

-Xrunjdwp sub-options

The -Xrunjdwp option can be further qualified with sub-options. The sub-options are specified as follows:

    -Xrunjdwp:<name1>[=<value1>],<name2>[=<value2>]...

The table below describes the options that can be used:

-Xrunjdwp Sub-options
name | required? | default value | description
help | no | N/A | Prints a brief help message and exits the VM.
transport | yes | none | Name of the transport to use in connecting to debugger application.
server no "n" If "y", listen for a debugger application to attach; otherwise, attach to the debugger application at the specified address.

If "y" and no address is specified, choose a transport address at which to listen for a debugger application, and print the address to the standard output stream.

address yes, if server=n
no, otherwise 		"" Transport address for the connection. If server=n, attempt to attach to debugger application at this address. If server=y, listen for a connection at this address.
launch no none At completion of JDWP initialization, launch the process given in this string. This option is used in combination with onthrow and/or onuncaught to provide "Just-In-Time debugging" in which a debugger process is launched when a particular event occurs in this VM.

Note that the launched process is not started in its own window. In most cases the launched process should be a small application which in turns launches the debugger application in its own window.

The following strings are appended to the string given in this argument (space-delimited). They can aid the launched debugger in establishing a connection with this VM. The resulting string is executed.

  • The value of the transport sub-option.
  • The value of the address sub-option (or the generated address if one is not given)
onthrow | no | none | Delay initialization of the JDWP library until an exception of the given class is thrown in this VM. The exception class name must be package-qualified.Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown.
onuncaught | no | "n" | If "y", delay initialization of the JDWP library until an uncaught exception is thrown in this VM. Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown. See the JDI specification for com.sun.jdi.ExceptionEvent for a definition of uncaught exceptions.
stdalloc | no | "n" | By default, the JDWP reference implementation uses an alternate allocator for its memory allocation. If "y", the standard C runtime library allocator will be used. This option is mainly for testing; use it with care. Deadlocks can occur in this VM if the alternative allocator is disabled.
strict | no | "n" | If "y", assume strict JVMDI conformance. This will disable all workarounds to known bugs in JVMDI implementations. This option is mainly for testing and should be used with care.

-Xrunjdwp Examples

-Xrunjdwp:transport=dt_socket,server=y,address=8000
Listen for a socket connection on port 8000. Suspend this VM before main class loads (suspend=y by default). Once the debugger application connects, it can send a JDWP command to resume the VM.
-Xrunjdwp:transport=dt_shmem,server=y,suspend=n
Choose an available shared memory transport address and print it to stdout. Listen for a shared memory connection at that address. Allow the VM to begin executing before the debugger application attaches.
-Xrunjdwp:transport=dt_socket,address=myhost:8000
Attach to a running debugger application via socket on host myhost at port 8000. Suspend this VM before main class loads.
-Xrunjdwp:transport=dt_shmem,address=mysharedmemory
Attach to a running debugger application via shared memory at transport address "mysharedmemory". Suspend this VM before main class loads.
-Xrunjdwp:transport=dt_socket,server=y,address=8000,onthrow=java.io.IOException,launch=/usr/local/bin/debugstub
Wait for an instance of java.io.IOException to be thrown in this VM. Suspend the VM (suspend=y by default). Listen for a socket connection on port 8000. Execute the following: "/usr/local/bin/debugstub dt_socket myhost:8000". This program can launch a debugger process in a separate window which will attach to this VM and begin debugging it.
-Xrunjdwp:transport=dt_shmem,server=y,onuncaught=y,launch=d:\bin\debugstub.exe
Wait for an uncaught exception to be thrown in this VM. Suspend the VM. Select a shared memory transport address and listen for a connection at that address. Execute the following: "d:\bin\debugstub.exe dt_shmem <address>", where <address> is the selected shared memory address. This program can launch a debugger process in a separate window which will attach to this VM and begin debugging it.

Debugging Plug-in Applets

Beginning with version 1.2.2 of the Java Plug-in, applets running under the Plug-in can be debugged. The required VM options described above can be specified in the Plug-In control panel, under the "Basic" tab, in the "Java Run-Time Parameters". The debug options under the "Advanced" tab should not be used as they will enable the old sun.tools.debug debug support. In future versions of the Plug-in, these debug options will be changed to use JPDA.

JDI launching connectors cannot be used to debug Plug-in applets.

Connecting with JDB

The example implementation of JDB provided with the JPDA, provides an illustration of the usage of JDI connectors. There are "shortcut" options to JDB which assume the use of connectors known to it (that is, connectors present in the reference implementation). It also provides a way to establish a general connection using any connector. While JDB is hardly an example of a good debugger interface, it does provide a simple example of connectors in use.

In JDB, the -attach option provides access to one of the attaching connectors in the reference implementation (shared memory on Win32, sockets on Solaris). The -listen option provides access to one of the listening connectors in the reference implementation (shared memory on Win32, sockets on Solaris). A class name and arguments specified directly on the command line provide access to the Sun command line launching connector.

For example:

jdb -attach myhost:8000

is an easy way to attach to a target VM with the Socket Attaching Connector (on Solaris), and

jdb Hello 1 2 3

is an easy way to launch a target VM with the Sun Command Line Launching Connector.

However, the -connect option is also provided by JDB to handle any connector by taking an connector name and a set of arbitrary name/value argument pairs. For example the command lines above have the following equivalents.

jdb -connect com.sun.jdi.SocketAttach:hostname=myhost,port=8000
jdb -connect "com.sun.jdi.CommandLineLaunch:main=Hello 1 2 3"

These command lines are more cumbersome than the ones above, but the -connect option can be used with any connector. This kind of operation is a primitive example of how a JDI debugger can deal with any kind of connector while providing a simplified interface for dealing with common, well-known connectors.

Copyright © 1997-2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


JPDA Overview

Java

JavaTM Platform Debugger Architecture
Overview

 Home Page
The Java Platform Debugger Architecture (JPDA) consists of two interfaces (JVMDI and JDI), a protocol (JDWP) and two software components which tie them together (back-end and front-end). The intent is multi-fold:
  • To provide standard interfaces (for the sake of simplicity we will refer to JDWP as an interface) which allow Java programming language debugging tools to be easily written without regard to platform specifics such hardware, operating system and virtual machine implementation.
  • To describe a complete architecture for implementing these interfaces, including remote and cross-platform debugging.
  • To provide a reference implementation of this architecture.
  • To provide a highly modular architecture where the implementation and/or client of an interface can be different than the reference implementation or different from the JPDA component.

Background

See Java Platform Debugger Architecture.

Modularity

Details of the modular structure of JPDA are discussed below. In each case the standard JPDA usage is described. The reference implementation is described and alternative implementations and clients of the interface are discussed.

JVMDI Modularity

The Java Virtual Machine Debug Interface (JVMDI) describes the functionality provided by a virtual machine (VM) in order to allow debugging of Java programming language applications running under this VM. In JPDA, JVMDI is implemented by a VM and the client is the JPDA back-end. In the reference implementation of JPDA, JVMDI is implemented by the Java HotSpot VM and the client is the reference implementation of the back-end, supplied as a native shared library (jdwp.so, jdwp.dll, ...), which is shipped with the Java 2 SDK, Standard Edition.

Many VMs other than the Java HotSpot VM implement JVMDI. The reference implementation of the back-end has been ported to other platforms. And there are JVMDI clients other than the back-end, most notably agents for applications that allow debugging of both native and Java programming language code, and thus need native level control and information. We are aware of no clean-room implementations of the back-end, although this is possible - and a lot of work.

JDWP Modularity

The Java Debug Wire Protocol (JDWP) describes the format of debugging information and requests between a debuggee and a debugger. In JPDA, there is a communication channel between the front-end (in the debugger process) and the back-end (in the debuggee process) - the format of data flowing on this channel is described by JDWP. In the reference implementation of JPDA, the reference implementation of the back-end (above) provides the debuggee side of this channel, and the reference implementation of the front-end (a Java programming language component of the J2SE SDK, located in tools.jar) provides the debugger side.

JVMDI is problematic to implement in some VMs. JDWP is implemented directly in such VMs. On the client side, an application written in a language other than the Java programming language may not be an optimal candidate for using JDI. Some have chosen to be clients of JDWP.

JDI Modularity

The Java Debug Interface (JDI) provides a pure Java programming language interface for debugging Java programming language applications. In JPDA, the JDI is a remote view in the debugger process of a virtual machine in the debuggee process. It is implemented by the front-end (above) while a debugger-like application (IDE, debugger, tracer, monitoring tool, ...) is the client.

The JDI could be implemented by a system with a static view of an application. It could be implemented by a system with a mechanism utterly different than JDWP/front-end for collecting information or controlling a VM.

Walk-through

The various ways that the interfaces can be used is discussed above. This section will examine how the standard full JPDA works. The examples go into detail about specific calls and codes. It is not important to understand these -- they are present only to make the examples more concrete.

Across each interface there are two classes of activity: requests and events. Requests originate on the debugger side and include queries for information, setting of state changes in the remote VM/application, and setting of debugging state. Events originate on the debuggee side and denote changes of state in the remote VM/application.

Let's walk through an example. A user clicks on a local variable in a stack view in an IDE, requesting its value. The IDE uses the JDI to get the value, in particular it calls the getValue method, for example:

    theStackFrame.getValue(theLocalVariable)
Where theStackFrame is a com.sun.jdi.StackFrame and theLocalVariable is a com.sun.jdi.LocalVariable.

The front-end then sends this query over a communications channel (let's say a socket) to the back-end running in the debuggee process. It sends it by formatting it into a byte stream in accordance with the JDWP. In particular, it sends a GetValues command (byte value: 1) in the StackFrame command set (byte value: 16), followed by the thread ID, frame ID, etc.

The back-end deciphers the byte-stream and sends the query off to the VM through the JVMDI. In particular, let's say the requested value is an integer, the following JVMDI function call is made:

    error = jvmdi->GetLocalInt(frame, slot, &intValue);
The back-end sends back across the socket, a response packet, which will include the value of intValue, and which will be formatted according to JDWP. The front-end deciphers the response packet and returns the value as the value of the getValue method call. The IDE then displays the value.

Requests to change debugging state are processed in a similar manner. For example, a request to set a breakpoint goes through the same steps -- although, of course, the JDI methods called, the JDWP commands sent, and the JVMDI functions called are different. Additionally, the front-end and back-end do more than shove data back and forth, they track and schedule activity and convert, filter, and cache information, so a breakpoint request will be processed quite differently than a get value query - but the communication sequence will be the same.

What happens when the application being debugged finally hits this breakpoint? This is where events come into play. The virtual machine sends an event across the JVMDI interface. In particular, it calls the event handling function passing a breakpoint event structure:

    typedef struct {
             jthread thread;
             jclass clazz;
             jmethodID method;
             jlocation location;
         } JVMDI_breakpoint_event_data;
The back-end has set the event handling function to be:
    static void eventHook(JNIEnv *env, JVMDI_Event *event) { ...
This back-end function starts a chain of activity which filters the event to see if it is interesting, queues it, and sends it across the socket in the JDWP format defined for breakpoint events. The front-end decodes and processes the event, eventually generating a JDI event. In particular, the JDI event is exposing it as a com.sun.tools.jdi.event.BreakpointEvent. The IDE then gets the event by removing it from the event queue:
    theEventQueue.remove()
where theEventQueue is a com.sun.jdi.event.EventQueue. The IDE will probably update its displays by making many query calls across the JDI.

Porting

Each virtual machine implementation needs its own JVMDI implementation -- a JVMDI implementation must dig deeply into VM data structures and must set hooks into the VM implementation in order to get events. Adding JVMDI to a VM without JVMDI support is a significant undertaking. Depending on the complexity of the VM and the amount of optional JVMDI implemented, it might be a three to twelve month project. Porting a VM which has JVMDI support to a new platform is primarily the work of porting the non-JVMDI portions of the VM -- JVMDI adds a comparatively small amount of work.

The reference implementation of the back-end can usually be moved to a new platform with little (a few lines) or no change to the source and then recompiled. To use a new VM on the same platform, the binary of the back-end should generally work -- although, it's not Java programming language code so you never know. Note that licensing issues are not covered by this document.

The front-end implementation is written in the Java programming language and will run on any platform or VM. However, the connector code has functionality that may need to be extended for some systems. For example, the reference implementation of the front-end includes a launcher which assumes virtual machines are launched using J2SE conventions. A user of the JDI can configure any launcher syntax he or she wants, but generally a debugger application would prefer to leave this to the JDI implementation. If a different type of communication channel is desired (serial, for example) this too would need to be added. Plans are to eventually add an SPI to the JDI to allow these addition. Currently, however, these require changes to the source.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


The Java Virtual Machine Profiler Interface (JVMPI)

JavaTM Virtual Machine Profiler Interface (JVMPI)

This document describes the Java Virtual Machine Profiler Interface (JVMPI) in the Java 2 SDK, Standard Edition. It is intended for tools vendors to develop profilers that work in conjunction with Sun's Java virtual machine* implementation.

Note: This interface is an experimental feature in the Java 2 SDK. The JVMPI is not yet a standard profiling interface. We provide the documentation for the benefit of tools vendors who have an immediate need for profiling hooks in the Java virtual machine. The JVMPI will continue to evolve, based on the feedback from customers and tools vendors. Please send comments to jvmpi@eng.sun.com.

Note: This interface is implemented in the Classic VM, Java 2 Client VM (implemented with Java HotSpotTM technology), and in Java HotSpot Server VM 2.0. Notes specific to Java Hotspot technology are marked as such.

Contents

  • Overview
    • Start-up
    • Function Call Interface
    • Event Notification
    • JVMPI IDs
    • Threading and Locking Issues
    • Data Communication between the Profiler Agent and Front-End
  • Interface Functions
  • Events
  • Dump Formats
  • Data Types
  • Notes on Changes Since Java 2 SDK, v1.2
    • What's new?
    • Limitations
    • Changes in v1.3
  • The HPROF Profiler Agent
    • Overview
    • Heap Allocation Profiles
    • CPU Usage Profiles
  • Code Examples
    • A Simple Class Load Tracer
    • The HPROF Profiling Agent

1. Overview

The JVMPI is a two-way function call interface between the Java virtual machine and an in-process profiler agent. On one hand, the virtual machine notifies the profiler agent of various events, corresponding to, for example, heap allocation, thread start, etc. On the other hand, the profiler agent issues controls and requests for more information through the JVMPI. For example, the profiler agent can turn on/off a specific event notification, based on the needs of the profiler front-end.

The profiler front-end may or may not run in the same process as the profiler agent. It may reside in a different process on the same machine, or on a remote machine connected via the network. The JVMPI does not specify a standard wire protocol. Tools vendors may design wire protocols suitable for the needs of different profiler front-ends.

A profiling tool based on JVMPI can obtain a variety of information such as heavy memory allocation sites, CPU usage hot-spots, unnecessary object retention, and monitor contention, for a comprehensive performance analysis.

JVMPI supports partial profiling, i.e a user can selectively profile an application for certain subsets of the time the virtual machine is up and can also choose to obtain only certain types of profiling information.

In the current version of JVMPI, only one agent per virtual machine can be supported.

1.1. Start-up

The user can specify the name of the profiler agent and the options to the profiler agent through a command line option to the Java virtual machine. For example, suppose the user specifies:
     java -Xrunmyprofiler:heapdump=on,file=log.txt ToBeProfiledClass
The VM attempts to locate a profiler agent library called myprofiler in Java's library directory:
  • On Win32, it is [value of java.home property]\bin\myprofiler.dll
  • On SPARC/Solaris, it is [value of java.home property]/lib/sparc/libmyprofiler.so
If the library is not found in the Java library directory, the VM continues to search for the library following the normal library search mechanism of the given platform:
  • On Win32, the VM searches the current directory, Windows system directories, and the directories in the PATH environment variable.
  • On Solaris, the VM searches the directories in LD_LIBRARY_PATH.
The VM loads the profiler agent library and looks for the entry point:
jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved);
The VM calls the JVM_OnLoad function, passing a pointer to the JavaVM instance as the first argument, and string "heapdump=on,file=log.txt" as the second argument. The third argument to JVM_OnLoad is reserved and set to NULL.

On success, the JVM_OnLoad function must return JNI_OK. If for some reason the JVM_OnLoad function fails, it must return JNI_ERR.

1.2. Function Call Interface

The profiler agent can obtain a function call interface by issuing a GetEnv call on the JavaVM pointer. For example, the following code retrieves the version of JVMPI interface that is implemented in the Java 2 SDK:
JVMPI_Interface *jvmpi_interface;

JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved)
{
    int res = (*jvm)->GetEnv(jvm, (void **)&jvmpi_interface, JVMPI_VERSION_1);
    if (res <0) {="{" return="return" JNI_ERR;="JNI_ERR;" }="}" ...="..." /*="/*" use="use" entries="entries" in="in" jvmpi_interface="jvmpi_interface" */="*/" }="}"
The JVMPI_Interface structure defines the function call interface between the profiler agent and the VM:
/* interface functions */
typedef struct {
    jint version;   /* JVMPI version */

    /* ------interface implemented by the profiler------ */

    void (*NotifyEvent)(JVMPI_Event *event);

    /* ------interface implemented by the JVM------ */

    jint (*EnableEvent)(jint event_type, void *arg);
    jint (*DisableEvent)(jint event_type, void *arg);
    jint (*RequestEvent)(jint event_type, void *arg);

    void (*GetCallTrace)(JVMPI_CallTrace *trace, jint depth);

    void (*ProfilerExit)(jint);

    JVMPI_RawMonitor (*RawMonitorCreate)(char *lock_name);
    void (*RawMonitorEnter)(JVMPI_RawMonitor lock_id);
    void (*RawMonitorExit)(JVMPI_RawMonitor lock_id);
    void (*RawMonitorWait)(JVMPI_RawMonitor lock_id, jlong ms);
    void (*RawMonitorNotifyAll)(JVMPI_RawMonitor lock_id);
    void (*RawMonitorDestroy)(JVMPI_RawMonitor lock_id);

    jlong (*GetCurrentThreadCpuTime)(void);
    void (*SuspendThread)(JNIEnv *env);
    void (*ResumeThread)(JNIEnv *env);
    jint (*GetThreadStatus)(JNIEnv *env);
    jboolean (*ThreadHasRun)(JNIEnv *env);
    jint (*CreateSystemThread)(char *name, jint priority, void (*f)(void *));
    void (*SetThreadLocalStorage)(JNIEnv *env_id, void *ptr);
    void * (*GetThreadLocalStorage)(JNIEnv *env_id);

    void (*DisableGC)(void);
    void (*EnableGC)(void);
    void (*RunGC)(void);

    jobjectID (*GetThreadObject)(JNIEnv *env);
    jobjectID (*GetMethodClass)(jmethodID mid);

    /* JNI handle <-> object ID conversions; implemented only in Hotspot VM*/

    jobject   (*jobjectID2jobject)(jobjectID jid);
    jobjectID (*jobject2jobjectID)(jobject   j);

} JVMPI_Interface;
The GetEnv function returns a pointer to a JVMPI_Interface whose version field indicates a JVMPI version that is compatible to the version number argument passed in the GetEnv call. Note that the value of the version field is not necessarily identical to the version argument passed in the GetEnv call.

The JVMPI_Interface returned by GetEnv has all the functions set up except for NotifyEvent. The profiler agent must set up the NotifyEvent function pointer before returning from JVM_OnLoad.

Hotspot note: two new functions jobjectID2jobject and jobject2jobjectID have been added only to Hotspot VM.

1.3. Event Notification

The VM sends an event by calling NotifyEvent with a JVMPI_Event data structure as the argument. The following events are supported:
  • method enter and exit
  • object alloc, move, and free
  • heap arena create and delete
  • GC start and finish
  • JNI global reference alloc and free
  • JNI weak global reference alloc and free
  • compiled method load and unload
  • thread start and end
  • class file data ready for instrumentation
  • class load and unload
  • contended Java monitor wait to enter , entered, and exit
  • contended raw monitor wait to enter, entered, and exit
  • Java monitor wait and waited
  • monitor dump
  • heap dump
  • object dump
  • request to dump or reset profiling data
  • Java virtual machine initialization and shutdown

The JVMPI_Event structure contains the event type, the JNIEnv pointer of the current thread, and other event-specific information. The event specific information is represented as a union of event-specific structures. The JVMPI Events section provides a complete description of all event-specific structures. For now, we show the event-specific structures for class load and class unload below.

typedef struct {
    jint event_type;                  /* event_type */
    JNIEnv *env_id;                   /* env where this event occurred */

    union {
        struct {
        char *class_name;         /* class name */
        char *source_name;        /* name of source file */
        jint num_interfaces;      /* number of interfaces implemented */
          jint num_methods;         /* number of methods in the class */
        JVMPI_Method *methods;    /* methods */
        jint num_static_fields;   /* number of static fields */
        JVMPI_Field *statics;     /* static fields */
        jint num_instance_fields; /* number of instance fields */
        JVMPI_Field *instances;   /* instance fields */
        jobjectID class_id;       /* id of the class object */
    } class_load;

        struct {
        jobjectID class_id;       /* id of the class object */
    } class_unload;

        ... /* Refer to the section on JVMPI events for a full listing */
    } u;
} JVMPI_Event;

1.4. JVMPI IDs

The JVMPI refers to entities in the Java virtual machine as various kinds of IDs. Threads, classes, methods, objects, heap arenas and JNI global references all have unique IDs.

Each ID has a defining event and an undefining event. A defining event provides the information related to an ID. For example, the defining event for a thread ID contains, among other entries, the name of the thread.

An ID is valid until its undefining event arrives. An undefining event invalidates the ID, whose value may be reused later as a different kind of ID. The value of a thread ID, for example, may be redefined as a method ID after the thread ends.

ID | data type | defining event | undefining event
thread ID | JNIEnv * | thread start | thread end
object ID | jobjectID | object alloc | object free, object move, and arena delete
class ID | jobjectID | class load | class unload and object move
method ID | jmethodID | defining class load | defining class unload
arena ID | jint | arena new | arena delete
JNI global ref ID | jobject | global ref alloc | global ref free

Assuming the defining events are enabled during the profiler initialization, the profiler agent is guaranteed to be notified of an entity's creation through a defining event, before the entity appears in other JVMPI events.

If the defining events are not enabled, the profiler agent may receive an unknown ID. In that case the profiler agent may request the corresponding defining event to be sent on demand by issuing a RequestEvent call.

IDs representing objects have type jobjectID. A class is represented by the object ID of the corresponding java.lang.Class object. Therefore, class IDs are also of type jobjectID.

A jobjectID is defined by an object alloc event, and remains valid in the arena in which the object is allocated until one of its undefining events arrive:

  • An object free event invalidates an object ID.
  • An object move event is a special type of undefining events. Unlike other undefining events which signal the end-of-life of the corresponding entities, the object still exists, but its ID changes, and it may have been moved to a new arena.
  • An arena delete event invalidates all remaining object IDs in the arena.

When an object free or arena delete event invalidates an object ID, the object is known as being garbage collected.

Typically, the profiler agent maintains a mapping between jobjectIDs and its internal representation of object identities, and updates the mapping in response to the defining and undefining events for JVMPI object IDs.

Since object IDs may be invalidated during GC, the VM issues all events that contain jobjectID entries with GC disabled. In addition, the profiling agent must disable GC when it is directly manipulating any jobjectID data types. Otherwise the GC may invalidate a jobjectID while it is being manipulated in the agent code. The profiler agent must make sure that GC is disabled when it calls a JVMPI function that either takes a jobjectID argument or returns a jobjectID result. If the function call is inside an event handler where GC is already disabled, then the profiler agent need not explicitly disable the GC again.

A thread may be identified either by its JNIEnv interface pointer or by the object ID of the corresponding java.lang.Thread object. The JNIEnv pointer is valid between thread start and thread end events, and remains constant during the lifetime of a thread. The java.lang.Thread object ID, on the other hand, could remain valid after the thread ends, until it is garbage collected. The profiler agent can convert a JNIEnv pointer to the corresponding thread object ID by calling the GetThreadObject function.

1.5. Threading and Locking Issues

The JVMPI is used by the profiler agent that runs in the same process as the Java virtual machine. Programmers who write the agent must be careful in dealing with threading and locking issues in order to prevent data corruption and deadlocks.

Events are sent in the same thread where they are generated. For example, a class loading event is sent in the same thread in which the class is loaded. Multiple events may arrive concurrently in different threads. The agent program must therefore provide the necessary synchronization in order to avoid data corruption caused by multiple threads updating the same data structure at the same time.

In some cases, synchronizing on certain frequent events (such as method entry and method exit) may impose unacceptable overhead to program execution. Agents may utilize the thread-local storage support provided by the JVMPI to record profiling data without having to contend for global locks, and only merge the thread-local data into global profiles at selected intervals. The JVMPI supplies the agent with a pointer-size thread-local storage. Following is a simple example that illustrates how a profiler agent may take advantage of this feature. Suppose we need to write a profiler agent that counts the number of methods executed in each thread. The agent installs event handlers for thread start, method entry, and thread end events:

/* thread start event handler
 * sets up the storage for thread-local method invocation counter
 */
void ThreadStartHandler(JNIEnv *thread_id)
{
    int *p_ctr = (int *)malloc(sizeof(int));
    CALL(SetThreadLocalStorage)(thread_id, p_ctr);
}

/* method enter event handler
 * increments thread local method invocation counter
 */
void MethodEntryHandler(jmethodID method_id, JNIEnv *thread_id)
{
    int *p_ctr = (int *)CALL(GetThreadLocalStorage)(thread_id);
    (*p_ctr)++;
}

/* thread end handler
 * prints the number of methods executed
 */
void ThreadEndHandler(JNIEnv *thread_id)
{
    int *p_ctr = (int *)CALL(GetThreadLocalStorage)(thread_id);
    fprintf(stdout, "Thread %x executed %d methods\n",
        thread_id, (*p_ctr));
    free(p_ctr);
}

The following JVMPI functions can cause event notification to be sent synchronously in the same thread during the function execution:

  • RequestEvent
  • CreateSystemThread
  • RunGC

The RequestEvent function supplies the JVMPI event explicitly requested by the profiler agent. The CreateSystemThread function causes thread object allocation and thread start events to be issued. The RunGC function causes GC-related events to be generated.

When a profiling agent is loaded into the Java virtual machine, the process can either be in one of three modes: multi-threaded mode with GC enabled, multi-threaded mode with GC disabled, and the thread suspended mode. Different JVMPI events are issued in different modes. Certain JVMPI functions change the process from one mode to another.

The profiler agent must obey the following guidelines to avoid deadlocks:

  • In the multi-threaded mode with GC enabled, the agent code has a great deal of freedom in acquiring locks and calling JVMPI functions. Of course the normal rules of deadlock avoidance apply. Different threads must not enter the same set of locks in different orders.

  • When the GC is disabled the agent program must not call any JVMPI function that could require new Java objects to be created or cause the garbage collector to run. Currently, such functions include CreateSystemThread and RunGC. In addition, programmers need to be aware that disabling the GC creates an implicit locking dependency among threads. When the GC is disabled, the current thread may not be able to safely acquire certain locks. Deadlocks may happen, for example, if one thread disables GC and tries to acquire a lock, while another thread already acquired that lock but is triggering a GC.

  • In the thread suspended mode, one or more of the threads have been suspended. In this case, the agent program must not perform any operations that may cause the current thread to block. Such operations include, for example, the malloc and fprintf functions provided by the standard C library. These functions typically acquire internal C library locks that may be held by one of the suspended threads.

1.6 Data Communication between the Profiler Agent and Front-End

The JVMPI provides a low-level mechanism for a profiler agent to communicate with the virtual machine. The goal is to provide maximum flexiblity for the profiler agent to present the data depending on the needs of the front-end, and also to keep the processing work done by the virtual machine at a minimum. Therefore, the JVMPI does not specify a wire protocol between the profiling agent and the front-end. Instead, tools vendors design their own profiling agents that suit the needs of their front-ends.

The following issues need to be considered when designing the wire protocol in order to allow the profiler agent and front-end to reside on different machines:

  • Pointer size (e.g., 32 or 64 bit) - all of the JVMPI IDs are of pointer type (see Data Types).
  • Byte order (little endian or big endian).
  • Bit order (most significant bit first or least significant bit first).
  • String encoding - the JVMPI uses the UTF-8 encoding as documented in the Java virtual machine specification.

For example, the HPROF profiler agent shipped with the Java 2 SDK sends the size of all IDs as the first record, and uses the standard network byte order for integer and floating-point data.

2. Interface Functions

  • CreateSystemThread
  • DisableEvent
  • DisableGC
  • EnableEvent
  • EnableGC
  • GetCallTrace
  • GetCurrentThreadCpuTime
  • GetMethodClass
  • GetThreadLocalStorage
  • GetThreadObject
  • GetThreadStatus
  • NotifyEvent
  • ProfilerExit
  • RawMonitorCreate
  • RawMonitorDestroy
  • RawMonitorEnter
  • RawMonitorExit
  • RawMonitorNotifyAll
  • RawMonitorWait
  • RequestEvent
  • ResumeThread
  • RunGC
  • SetThreadLocalStorage
  • SuspendThread
  • ThreadHasRun
  • jobjectID2jobject
  • jobject2jobjectID

jint (*CreateSystemThread)(char *name, jint priority, void (*f)(void *));

Called by the profiler agent to create a daemon thread in the Java virtual machine.

It is safe for the profiler agent to make this call only after the JVM notifies a JVMPI_EVENT_INIT_DONE and when the system is in a multi-threaded mode with GC enabled.

Arguments:

name | - name of the thread.
priority | - thread priority; the values can be:
JVMPI_NORMAL_PRIORITY
JVMPI_MAXIMUM_PRIORITY
JVMPI_MINIMUM_PRIORITY
f | - function to be run by the thread.

Returns:

JNI_OK | - success.
JNI_ERR | - failure.

jint (*DisableEvent)(jint event_type, void *arg);

Called by the profiler agent to disable the notification of a particular type of event. Apart from event_type, the profiler agent may also pass an argument that provides additional information specific to the given event type.

All events are disabled when the VM starts up. Once enabled, an event stays enabled until it is explicitly disabled.

This function returns JVMPI_NOT_AVAILABLE if event_type is JVMPI_EVENT_HEAP_DUMP, JVMPI_EVENT_MONITOR_DUMP or JVMPI_EVENT_OBJECT_DUMP.

Arguments:

event_type | - type of event, JVMPI_EVENT_CLASS_LOAD etc.
arg | - event specific information.

Returns:

JVMPI_SUCCESS | disable succeeded.
JVMPI_FAIL | disable failed.
JVMPI_NOT_AVAILABLE | support for disabling the given event_type is not available.

void (*DisableGC)(void);

Called by the profiler to disable garbage collection, until EnabledGC is called. DisableGC and EnableGC calls may be nested.

jint (*EnableEvent)(jint event_type, void *arg);

Called by the profiler agent to enable notification of a particular type of event. Apart from event_type, the profiler may also pass an argument that provides additional information specific to the given event type.

All events are disabled when the VM starts up. Once enabled, an event stays enabled until it is explicitly disabled.

This function returns JVMPI_NOT_AVAILABLE if event_type is JVMPI_EVENT_HEAP_DUMP, JVMPI_EVENT_MONITOR_DUMP or JVMPI_EVENT_OBJECT_DUMP. The profiler agent must use the RequestEvent function to request these events.

Arguments:

event_type | - type of event, JVMPI_EVENT_CLASS_LOAD etc.
arg | - event specific argument.

Returns:

JVMPI_SUCCESS | enable succeeded.
JVMPI_FAIL | enable failed.
JVMPI_NOT_AVAILABLE | support for enabling the given event_type is not available.

void (*EnableGC)(void);

Enables garbage collections. DisableGC and EnableGC calls may be nested.

void (*GetCallTrace)(JVMPI_CallTrace *trace, jint depth);

Called by the profiler to obtain the current method call stack trace for a given thread. The thread is identified by the env_id field in the JVMPI_CallTrace structure. The profiler agent should allocate a JVMPI_CallTrace structure with enough memory for the requested stack depth. The VM fills in the frames buffer and the num_frames field.

Arguments:

trace | - trace data structure to be filled by the VM.
depth | - depth of the call stack trace.

jlong (*GetCurrentThreadCpuTime)(void);

Called by the profiler agent to obtain the accumulated CPU time consumed by the current thread.

Returns:

time in nanoseconds

jobjectID (*GetMethodClass)(jmethodID mid);

Called by the profiler agent to obtain the object ID of the class that defines a method.

The profiler must disable GC before calling this function.

Arguments:

mid - a method ID.

Returns:

object ID of the defining class.

void * (*GetThreadLocalStorage)(JNIEnv *env_id);

Called by the profiler to get the value of the JVMPI thread-local storage. The JVMPI supplies to the agent a pointer-size thread-local storage that can be used to record per-thread profiling information.

Arguments:

env_id - the JNIEnv * of the thread.

Returns:

the value of the thread local storage

jobjectID (*GetThreadObject)(JNIEnv *env);

Called by the profiler agent to obtain the thread object ID that corresponds to a JNIEnv pointer.

The profiler must disable GC before calling this function.

Arguments:

env - JNIEnv pointer of the thread.

Returns:

the thread object ID.

jint (*GetThreadStatus)(JNIEnv *env);

Called by the profiler agent to obtain the status of a thread.

The JVMPI functions SuspendThread and ResumeThread have no affect on the status returned by GetThreadStatus. The status of a thread suspended through the JVMPI remains unchanged and the status at the time of suspension is returned.

Arguments:

env - the JNIEnv * of the thread.

Returns:

JVMPI_THREAD_RUNNABLE | - thread is runnable.
JVMPI_THREAD_MONITOR_WAIT | - thread is waiting on a monitor.
JVMPI_THREAD_CONDVAR_WAIT | - thread is waiting on a condition variable.

When a thread is suspended (by java.lang.Thread.suspend) or interrupted in any of the above states the JVMPI_THREAD_SUSPENDED or the JVMPI_THREAD_INTERRUPTED bit is set.

void (*NotifyEvent)(JVMPI_Event *event);

Called by the VM to send an event to the profiling agent. The profiler agent registers the types of events it is interested in by calling EnableEvent, or requests a specific type of event by calling RequestEvent.

When an event is enabled by EnableEvent, the thread that generates the event is the thread in which the event is sent. When an event is requested by RequestEvent, the thread that requests the event is the thread in which the event is sent. Multiple threads may send multiple events concurrently.

If the event specific information contains a jobjectID, this function is called with GC disabled. GC is enabled after the function returns.

The space allocated for the JVMPI_Event structure and any event specific information is freed by the virtual machine once this function returns. The profiler agent must copy any necessary data it needs to retain into its internal buffers.

Arguments:

event - the JVMPI event sent from the VM to the profiling agent.

void (*ProfilerExit)(jint err_code);

Called by the profiler agent to inform the VM that the profiler wants to exit with error code set to err_code. This function causes the VM to also exit with the same err_code.

Arguments:

err_code - exit code

JVMPI_RawMonitor (*RawMonitorCreate)(char *lock_name);

Called by the profiler to create a raw monitor.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

It is not safe for the profiler agent to call this function in the thread suspended mode because this function may call arbitrary system functions such as malloc and block on an internal system library lock.

If the raw monitor is created with a name beginning with an underscore ('_'), then its monitor contention events are not sent to the profiler agent.

Arguments:

lock_name - name of raw monitor.

Returns:

a raw monitor

void (*RawMonitorDestroy)(JVMPI_RawMonitor lock_id);

Called by the profiler agent to destroy a raw monitor and free all system resources associated with the monitor.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

It is not safe for the profiler agent to call this function in the thread suspended mode because this function may call arbitrary system functions such as free and block on a internal system library lock.

Arguments:

lock_id - the raw monitor to be destroyed

void (*RawMonitorEnter)(JVMPI_RawMonitor lock_id);

Called by the profiler agent to enter a raw monitor.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

It is not safe for the profiler agent to call this function in the thread suspended mode because the current thread may block on the raw monitor already acquired by one of the suspended threads.

Arguments:

lock_id - the raw monitor to be entered

void (*RawMonitorExit)(JVMPI_RawMonitor lock_id);

Called by the profiler agent to exit a raw monitor.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

Arguments:

lock_id - the raw monitor to exit

void (*RawMonitorNotifyAll)(JVMPI_RawMonitor lock_id);

Called by the profiler to notify all the threads that are waiting on a raw monitor.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

Arguments:

lock_id - the raw monitor to notify

void (*RawMonitorWait)(JVMPI_RawMonitor lock_id, jlong ms);

Called by the profiler agent to wait on a raw monitor for a specified timeout period. Passing 0 as the timeout period causes the thread to wait forever.

Raw monitors are similar to Java monitors. The difference is that raw monitors are not associated with Java objects.

Hotspot note: if the raw monitor is not owned by the thread executing RawMonitorWait, waiting will not occur.

Arguments:

lock_id | - the raw monitor to wait on
ms | - time to wait (in milliseconds).

jint (*RequestEvent)(jint event_type, void *arg);

Called by the profiler agent to request a particular type of event to be notified. Apart from event_type, the profiler agent may also pass an argument that provides additional information specific to the given event type.

This function can be called to request one-time events such as JVMPI_EVENT_HEAP_DUMP, JVMPI_EVENT_MONITOR_DUMP and JVMPI_EVENT_OBJECT_DUMP. Notification for these events cannot be controlled by the EnableEvent and DisableEvent functions.

In addition, this function can be called to request the defining events for a specific class, thread, or object. This is useful when the profiler agent needs to resolve an unknown class, method, thread, or object ID received in an event, but the corresponding defining event was disabled earlier.

  • The profiler agent may receive information about an unknown class ID by requesting a JVMPI_EVENT_CLASS_LOAD event and setting the event-specific argument to the class object ID.
  • The profiler agent may receive information about an unknown thread ID by requesting a JVMPI_EVENT_THREAD_START event and setting the event-specific argument to the thread object ID.
  • The profiler agent may receive information about an unknown object ID by requesting a JVMPI_EVENT_OBJECT_ALLOC event and setting the event-specific argument to the object ID.

Thus the profiler agent can either enable the above three events asynchronously by calling EnableEvent, or request these events synchronously by calling RequestEvent. The requested event is sent in the same thread that issued the RequestEvent call, and is sent before the RequestEvent function returns.

The RequestEvent function cannot be used to request other events not listed above.

Events requested through RequestEvent will arrive with the JVMPI_REQUESTED_EVENT bit set in its event_type.

Arguments:

event_type | - type of event, JVMPI_EVENT_CLASS_LOAD etc.
arg | - event specific argument.

Returns:

JVMPI_SUCCESS | request succeeded.
JVMPI_FAIL | request failed.
JVMPI_NOT_AVAILABLE | support for issuing the requested event_type is not available.

void (*ResumeThread)(JNIEnv *env);

Called by the profiler agent to resume a thread.

Note that a thread suspended by the java.lang.Thread.suspend method cannot be resumed by the JVMPI ResumeThread function.

Arguments:

env - the JNIEnv * of the thread.

void (*RunGC)(void);

Called by the profiler to force a complete garbage collection. This function must not be called when GC is disabled.

void (*SetThreadLocalStorage)(JNIEnv *env_id, void *ptr);

Called by the profiler agent to set the value of the JVMPI thread-local storage. The JVMPI supplies to the agent a pointer-size thread-local storage that can be used to record per-thread profiling information.

Arguments:

env_id | - the JNIEnv * of the thread.
ptr | - the value to be entered into the thread-local storage.

void (*SuspendThread)(JNIEnv *env);

Called by the profiler agent to suspend a thread. The system enters the thread suspended mode after this function is called.

Note that a thread suspended by the JVMPI SuspendThread function cannot be resumed by the java.lang.Thread.resume method.

In the Java 2 SDK implementation, this function must be called when the GC is disabled. GC must remain disabled until all threads have been resumed.

Arguments:

env - the JNIEnv * of the thread.

jboolean (*ThreadHasRun)(JNIEnv *env);

Called by the profiler to determine if a thread identified by the given JNIEnv pointer has consumed CPU time since the last time the thread was suspended by SuspendThread. This function must be called when the thread has been resumed by ResumeThread and then suspended again by the SuspendThread function.

Arguments:

env - the JNIEnv * of the thread.

Returns:

JNI_TRUE | - thread got a chance to run.
JNI_FALSE | - thread did not get a chance to run.

jobject (*jobjectID2jobject)(jobjectID jid);

Called by the profiler agent to convert an object ID to JNI Handle.

This function is experimental and may be removed from the final JVMPI specification, as its usage is very unsafe and can lead to unreliable profilers. See also note.

Arguments:

jid - the object ID to be converted.

Returns:

JNI handle

Hotspot note: this function is provided only in Hotspot VM.

jobjectID (*jobject2jobjectID)(jobject j);

Called by the profiler agent to convert a JNI Handle to an object ID.

This function is experimental and may be removed from the final JVMPI specification, as its usage is very unsafe and can lead to unreliable profilers.

Arguments:

j - JNI handle.

Returns:

object ID

Hotspot note: this function is provided only in Hotspot VM.

Usage Note:

It is not safe to invoke JNI functions in arbirtrary JVMPI event handlers. JVMPI events may be issued in virtual machine states that are not suitable for executing JNI functions. The profiler agent may only invoke JNI functions in multithreaded mode (as defined by the JVMPI specification) and must take extremely care under these circumstances to avoid race conditions, dead locks, and infinite recursions.

Note that jobjectID2jobject and jobject2jobjectID may only be invoked in GC-disabled mode (as defined by the JVMPI specification) and under this mode it not safe to call JNI functions. Thus you should never call jobjectID2jobject and then use a JNI function to process the resulting jobject in an event handler running in GC-disabled mode.

3. Events

  • JVMPI_EVENT_ARENA_DELETE
  • JVMPI_EVENT_ARENA_NEW
  • JVMPI_EVENT_CLASS_LOAD
  • JVMPI_EVENT_CLASS_LOAD_HOOK
  • JVMPI_EVENT_CLASS_UNLOAD
  • JVMPI_EVENT_COMPILED_METHOD_LOAD
  • JVMPI_EVENT_COMPILED_METHOD_UNLOAD
  • JVMPI_EVENT_DATA_DUMP_REQUEST
  • JVMPI_EVENT_DATA_RESET_REQUEST
  • JVMPI_EVENT_GC_FINISH
  • JVMPI_EVENT_GC_START
  • JVMPI_EVENT_HEAP_DUMP
  • JVMPI_EVENT_JNI_GLOBALREF_ALLOC
  • JVMPI_EVENT_JNI_GLOBALREF_FREE
  • JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC
  • JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE
  • JVMPI_EVENT_JVM_INIT_DONE
  • JVMPI_EVENT_JVM_SHUT_DOWN
  • JVMPI_EVENT_METHOD_ENTRY
  • JVMPI_EVENT_METHOD_ENTRY2
  • JVMPI_EVENT_METHOD_EXIT
  • JVMPI_EVENT_MONITOR_CONTENDED_ENTER
  • JVMPI_EVENT_MONITOR_CONTENDED_ENTERED
  • JVMPI_EVENT_MONITOR_CONTENDED_EXIT
  • JVMPI_EVENT_MONITOR_DUMP
  • JVMPI_EVENT_MONITOR_WAIT
  • JVMPI_EVENT_MONITOR_WAITED
  • JVMPI_EVENT_OBJECT_ALLOC
  • JVMPI_EVENT_OBJECT_DUMP
  • JVMPI_EVENT_OBJECT_FREE
  • JVMPI_EVENT_OBJECT_MOVE
  • JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER
  • JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED
  • JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT
  • JVMPI_EVENT_THREAD_END
  • JVMPI_EVENT_THREAD_START
  • JVMPI_EVENT_INSTRUCTION_START

JVMPI_EVENT_ARENA_DELETE

Sent when a heap arena is deleted.

All objects residing in this arena are freed. An explicit JVMPI_EVENT_OBJECT_FREE is not sent for those objects. The profiler agent can infer all the objects currently residing in that arena by keeping track of the object allocations in the arena and all the objects moved in and out of the arena.

This event is issued in the thread suspended mode. The profiler must not make any blocking calls such as entering a monitor or allocating from the C heap (for example, via malloc).

This event is always sent between a pair of JVMPI_EVENT_GC_START and JVMPI_EVENT_GC_FINISH events. The profiler agent should acquire all the locks need for processing this event in the event handler for JVMPI_EVENT_GC_START.

struct {
    jint arena_id;
} delete_arena;
Contents:
arena_id - ID of the arena being deleted.

JVMPI_EVENT_ARENA_NEW

Sent when a new arena for allocating objects is created.
struct {
    jint arena_id;
    char *arena_name;
} new_arena;
Contents:
arena_id | - ID given to the arena.
arena_name | - name of the arena.

JVMPI_EVENT_CLASS_LOAD

Sent when a class is loaded in the VM, or when the profiler agent requests a JVMPI_EVENT_CLASS_LOAD event by issuing a RequestEvent call. In the latter case, the JVMPI_REQUESTED_EVENT bit in the event type is set.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    char *class_name;
    char *source_name;
    jint num_interfaces;
    jint num_methods;
    JVMPI_Method *methods;
    jint num_static_fields;
    JVMPI_Field *statics;
    jint num_instance_fields;
    JVMPI_Field *instances;
    jobjectID class_id;
} class_load;

Contents:

class_name | - name of class being loaded.
source_name | - name of source file that defines the class.
num_interfaces | - number of interfaces implemented by this class.
methods | - methods defined in the class.
num_static_fields | - number of static fields defined in this class.
statics | - static fields defined in the class.
num_instance_fields | - number of instance fields defined in this class.
instances | - instance fields defined in the class.
class_id | - class object ID.

Note: class IDs are IDs of the class objects and are subject to change when JVMPI_EVENT_OBJECT_MOVE arrives.

JVMPI_EVENT_CLASS_LOAD_HOOK

Sent when the VM obtains a class file data, but before it constructs the in-memory representation for that class. The profiler agent can instrument the existing class file data sent by the VM to include profiling hooks.

The profiler must allocate the space for the modified class file data buffer using the memory allocation function pointer sent in this event, because the VM is responsible for freeing the new class file data buffer.

struct {
    unsigned char *class_data;
    jint class_data_len;
    unsigned char *new_class_data;
    jint new_class_data_len;
    void * (*malloc_f)(unsigned int);
} class_load_hook;

Contents:

class_data | - pointer to the current class file data buffer.
class_data_len | - length of current class file data buffer.
new_class_data | - pointer to the instrumented class file data buffer.
new_class_data_len | - length of the new class file data buffer.
malloc_f | - pointer to a memory allocation function.

The profiler agent must set new_class_data to point to the newly instrumented class file data buffer and set new_class_data_len to the length of that buffer before returning from NotifyEvent. It must set both new_class_data and new_class_data_len to the old values if it chooses not to instrument this class.

JVMPI_EVENT_CLASS_UNLOAD

Sent when a class is unloaded.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID class_id;
} class_unload;

Contents:

class_id - class being unloaded.

JVMPI_EVENT_COMPILED_METHOD_LOAD

Sent when a method is compiled and loaded into memory.
struct {
    jmethodID method_id;
    void *code_addr;
    jint code_size;
    jint lineno_table_size;
    JVMPI_Lineno *lineno_table;
} compiled_method_load;

Contents:

method_id | - method being compiled and loaded.
code_addr | - address where compiled method code is loaded.
code_size | - size of compiled code.
lineno_table_size | - size of line number table.
lineno_table | - table mapping offset from beginning of method to the src file line number.

JVMPI_EVENT_COMPILED_METHOD_UNLOAD

Sent when a compiled method is unloaded from memory.
struct {
    jmethodID method_id;
} compiled_method_unload;

Contents:

method_id - compiled method being unloaded.

JVMPI_EVENT_DATA_DUMP_REQUEST

Sent by the VM to request the profiler agent to dump its data. This is just a hint and the profiler agent need not react to this event. This is useful for processing command line signals from users. For example, in the Java 2 SDK a CTRL-Break on Win32 and a CTRL-\ on Solaris causes the VM to send this event to the profiler agent.

There is no event specific information.

JVMPI_EVENT_DATA_RESET_REQUEST

Sent by the VM to request the profiler agent to reset its data. This is just a hint and the profiler agent need not react to this event. This is useful for processing command line signals from users. For example, in the Java 2 SDK a CTRL-Break on Win32 and a CTRL-\ on Solaris causes the VM to send this event to the profiler agent.

There is no event specific information.

JVMPI_EVENT_GC_FINISH

Sent when GC finishes. The profiler agent can release any locks, grabbed during GC start notification for handling object free, object move, and arena delete events. The system gets back into the multi-threaded mode after this event.

The event-specific data contains Java heap statistics.

struct {
    jlong used_objects;
    jlong used_object_space;
    jlong total_object_space;
} gc_info;
Contents:
used_objects | - number of used objects on the heap.
used_object_space | - amount of space used by the objects (in bytes).
total_object_space | - total amount of object space (in bytes).

JVMPI_EVENT_GC_START

Sent when GC is about to start. The system goes into thread suspended mode after this event. To avoid deadlocks, the profiler agent should grab any locks that are needed for handling object free, object move, and arena delete events in the event handler for this event.

There is no event specific information.

JVMPI_EVENT_HEAP_DUMP

Sent when requested by the RequestEvent function. The profiler agent can specify the level of information to be dumped by passing an JVMPI_HeapDumpArg structure to RequestEvent as the second argument, with the heap_dump_level field set to the desired dump level.

The dump level values can be one of the following:

  • JVMPI_DUMP_LEVEL_0
  • JVMPI_DUMP_LEVEL_1
  • JVMPI_DUMP_LEVEL_2

If a NULL value is passed, then the dump level is set to JVMPI_DUMP_LEVEL_2.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

The event-specific data contains a snapshot of all live objects in the Java heap.

struct {
    int dump_level;
    char *begin;
    char *end;
    jint num_traces;
    JVMPI_CallTrace *traces;
} heap_dump;
Contents:
dump_level | - the dump level specified in RequestEvent
begin | - beginning of the heap dump
end | - end of the heap dump
num_traces | - number of stack traces in which the GC roots reside, 0 for JVMPI_DUMP_LEVEL_0
traces | - the stack traces in which the GC roots reside

The format of the heap dump between begin and end depends on the level of information requested. The formats are described in detail in the JVMPI Dump Formats section.

JVMPI_EVENT_JNI_GLOBALREF_ALLOC

Sent when a JNI global reference is created. The event-specific data contains the JNI global reference as well as the corresponding object ID.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID obj_id;
    jobject ref_id;
} jni_globalref_alloc;
Contents:
obj_id | - object ID referred to by the global reference.
ref_id | - JNI global reference.

JVMPI_EVENT_JNI_GLOBALREF_FREE

Sent when a JNI global reference is deleted. The event-specific data contains the JNI global reference that is being deleted.
struct {
    jobject ref_id;
} jni_globalref_free;
Contents:
ref_id - JNI global reference.

JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC

Sent when a JNI weak global reference is created. The event-specific data contains the JNI weak global reference as well as the corresponding object ID.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID obj_id;
    jobject ref_id;
} jni_globalref_alloc;
Contents:
obj_id | - object ID referred to by the weak global reference.
ref_id | - JNI weak global reference.

JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE

Sent when a JNI weak global reference is deleted. The event-specific data contains the JNI weak global reference that is being deleted.
struct {
    jobject ref_id;
} jni_globalref_free;
Contents:
ref_id - JNI weak global reference.

JVMPI_EVENT_JVM_INIT_DONE

Sent by the VM when its initialization is done. It is safe to call CreateSystemThread only after this event is notified.

There is no event specific data.

JVMPI_EVENT_JVM_SHUT_DOWN

Sent by the VM when it is shutting down. The profiler typically responds by saving the profiling data.

There is no event specific data.

JVMPI_EVENT_METHOD_ENTRY

Sent when a method is entered. Compared with JVMPI_EVENT_METHOD_ENTRY2, this event does not send the jobjectID of the target object on which the method is invoked.
struct {
    jmethodID method_id;
} method;

Contents:

method_id - the method being entered.

JVMPI_EVENT_METHOD_ENTRY2

Sent when a method is entered. If the method is an instance method, the jobjectID of the target object is sent with the event. If the method is a static method, the obj_id field in the event is set to NULL.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jmethodID method_id;
    jobjectID obj_id;
} method_entry2;

Contents:

method_id | - the method being entered.
obj_id | - the target object, NULL for static methods.

JVMPI_EVENT_METHOD_EXIT

Sent when a method is exited. The method exit may be a normal exit, or caused by an unhandled exception.
struct {
    jmethodID method_id;
} method;

Contents:

method_id - the method being entered.

JVMPI_EVENT_MONITOR_CONTENDED_ENTER

Sent when a thread is attempting to enter a Java monitor already acquired by another thread.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID object;
} monitor;
Contents:
object - object ID associated with the monitor

JVMPI_EVENT_MONITOR_CONTENDED_ENTERED

Sent when a thread enters a Java monitor after waiting for it to be released by another thread.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID object;
} monitor;
Contents:
object - object ID associated with the monitor

JVMPI_EVENT_MONITOR_CONTENDED_EXIT

Sent when a thread exits a Java monitor, and another thread is waiting to acquire the same monitor.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID object;
} monitor;
Contents:
object - object ID associated with the monitor

JVMPI_EVENT_MONITOR_DUMP

Sent when requested by the RequestEvent function.

The event-specific data contains a snapshot of all the threads and monitors in the VM.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    char *begin;
    char *end;
    jint num_traces;
    JVMPI_CallTrace *traces;
    jint *threads_status;
} monitor_dump;
Contents:
begin | - start of the monitor dump buffer.
end | - end of the dump buffer
num_traces | - number of thread traces.
traces | - traces of all threads.
thread_status | - status of all threads.

The format of the monitor dump buffer is described in detail in the JVMPI Dump Formats section.

JVMPI_EVENT_MONITOR_WAIT

Sent when a thread is about to wait on an object.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID object;
    jlong timeout;
} monitor_wait;
Contents:
object | - ID of object on which the current thread is going to wait.
(NULL indicates the thread is in Thread.sleep.)
timeout | - the number of milliseconds the thread will wait. (0 indicates waiting forever.)

JVMPI_EVENT_MONITOR_WAITED

Sent when a thread finishes waiting on an object.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jobjectID object;
    jlong timeout;
} monitor_wait;
Contents:
object | - ID of object on which the current thread waited.
(NULL indicates the thread is in Thread.sleep.)
timeout | - the number of milliseconds the thread waited.

JVMPI_EVENT_OBJECT_ALLOC

Sent when an object is allocated, or when the profiler agent requests a JVMPI_EVENT_OBJECT_ALLOC event by issuing a RequestEvent call. In the latter case, the JVMPI_REQUESTED_EVENT bit in the event type is set.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    jint arena_id;
    jobjectID class_id;
    jint is_array;
    jint size;
    jobjectID obj_id;
} obj_alloc;

Contents:

arena_id | - arena where allocated.
class_id | - class to which this object belongs, or the array element class if is_array is JVMPI_CLASS.
is_array | - values can be:
JVMPI_NORMAL_OBJECT | normal object
JVMPI_CLASS | array of objects
JVMPI_BOOLEAN | array of booleans
JVMPI_BYTE | array of bytes
JVMPI_CHAR | array of chars
JVMPI_SHORT | array of shorts
JVMPI_INT | array of ints
JVMPI_LONG | array of longs
JVMPI_FLOAT | array of floats
JVMPI_DOUBLE | array of doubles
size | - size in number of bytes.
obj_id | - unique object ID.

JVMPI_EVENT_OBJECT_DUMP

Sent when requested by the RequestEvent function. The jobjectID of the object for which a dump is being requested should be passed as the second argument to RequestEvent.

The profiler agent should request this event with GC disabled.

The event-specific data contains a snapshot of the object.

struct {
    jint data_len;
    char *data;
} object_dump;
Contents:
data_len | - length of the object dump buffer
data | - beginning of the object dump

The format of the object dump buffer is described in detail in the JVMPI Dump Formats section.

JVMPI_EVENT_OBJECT_FREE

Sent when an object is freed.

This event is issued in the thread suspended mode. The profiler must not make any blocking calls such as entering a monitor or allocating from the C heap (for example, via malloc).

This event is always sent between a pair of JVMPI_EVENT_GC_START and JVMPI_EVENT_GC_FINISH events. The profiler agent should acquire all the locks need for processing this event in the event handler for JVMPI_EVENT_GC_START.

struct {
    jobjectID obj_id;
} obj_free;

Contents:

obj_id - object being freed.

JVMPI_EVENT_OBJECT_MOVE

Sent when an object is moved in the heap.

This event is issued in the thread suspended mode. The profiler must not make any blocking calls such as entering a monitor or allocating from the C heap (for example, via malloc).

This event is always sent between a pair of JVMPI_EVENT_GC_START and JVMPI_EVENT_GC_FINISH events. The profiler agent should acquire all the locks need for processing this event in the event handler for JVMPI_EVENT_GC_START.

 struct {
     jint arena_id;
     jobjectID obj_id;
     jint new_arena_id;
     jobjectID new_obj_id;
} obj_move;

Contents:

arena_id | - current arena.
obj_id | - current object ID.
new_arena_id | - new arena.
new_obj_id | - new object ID.

JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER

Sent when a thread is attempting to enter a raw monitor already acquired by another thread.
struct {
    char *name;
    JVMPI_RawMonitor id;
} raw_monitor;
Contents:
name | - name of the raw monitor
id | - ID of the raw monitor

JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED

Sent when a thread enters a raw monitor after waiting for it to be released by another thread.
struct {
    char *name;
    JVMPI_RawMonitor id;
} raw_monitor;
Contents:
name | - name of the raw monitor
id | - ID of the raw monitor

JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT

Sent when a thread exits a raw monitor, and another thread is waiting to acquire the same monitor.
struct {
    char *name;
    JVMPI_RawMonitor id;
} raw_monitor;
Contents:
name | - name of the raw monitor
id | - ID of the raw monitor

JVMPI_EVENT_THREAD_END

Sent when a thread ends in the VM.

The env_id field of the JVMPI_Event received in this event notification is the JNIEnv interface pointer of the thread that ended.

JVMPI_EVENT_THREAD_START

Sent when a thread is started in the VM, or when the profiler agent requests a JVMPI_EVENT_THREAD_START event by issuing a RequestEvent call. In the latter case, the JVMPI_REQUESTED_EVENT bit in the event type is set.

This event is issued with GC disabled. GC is re-enabled after NotifyEvent returns.

struct {
    char *thread_name;
    char *group_name;
    char *parent_name;
    jobjectID thread_id;
    JNIEnv *thread_env_id;
} thread_start;

Contents:

thread_name | - name of thread being started.
group_name | - group to which the thread belongs.
parent_name | - name of parent.
thread_id | - thread object ID.
thread_env_id | - JNIEnv * of the thread.
Threads are associated with a JNIEnv pointer and a thread object ID. The JVMPI uses the JNIEnv pointer as the thread ID.

JVMPI_EVENT_INSTRUCTION_START

Sent when each instruction (i.e., bytecode operation) is issued by the interpreter.

This thread is issued only by interpreter, and not by compiled code.

struct {
    jmethodID method_id;
    jint      offset;
    union {
        struct {
            jboolean is_true;
        } if_info;
        struct {
            jint key;
            jint low;
            jint hi;
        } tableswitch_info;
        struct {
            jint     chosen_pair_index; /* actually chosen pair index (0-based) */
            jboolean is_default;        /* whether default branch is taken      */
        } lookupswitch_info;
    } u;
} instruction;

Contents:

method_id | - id of method that executes the instruction
offset | - instruction offset in the method's bytecode
is_true | - whether true or false branch is taken in an if-bytecode
key | - top stack value used as an index in tableswitch
low | - min value of the index in tableswitch
hi | - max value of the index in tableswitch
chosen_pair_index | - actually chosen pair index (0-based) in lookupswitch
is_default | - whether default branch is taken in lookupswitch

Hotspot note: must run with flag -XX:+EnableJVMPIInstructionStartEvent, otherwise no events will be sent.

4. Dump Formats

  • Sizes and Types Used in Dump Format Descriptions
  • Heap Dump Format
  • Object Dump Format
  • Monitor Dump Format

4.1 Sizes and Types Used in Dump Format Descriptions

u1: 1 byte
u2: 2 bytes
u4: 4 bytes
u8: 8 bytes
ty: u1 where:
JVMPI_NORMAL_OBJECT | normal object
JVMPI_CLASS | array of objects
JVMPI_BOOLEAN | array of booleans
JVMPI_BYTE | array of bytes
JVMPI_CHAR | array of chars
JVMPI_SHORT | array of shorts
JVMPI_INT | array of ints
JVMPI_LONG | array of longs
JVMPI_FLOAT | array of floats
JVMPI_DOUBLE | array of doubles
vl: values, exact size depends on the type of value:
boolean, byte | u1
short, char | u2
int, float | u4
long, double | u8
JNIEnv *, jobjectID, and JVMPI_RawMonitor | sizeof(void *)

4.2 Heap Dump Format

The heap dump format depends on the level of information requested.

JVMPI_DUMP_LEVEL_0:
The dump consists of a sequence of records of the following format:

ty | type of object
jobjectID | object

JVMPI_DUMP_LEVEL_1:
The dump format is the same as that of JVMPI_DUMP_LEVEL_2, except that the following values are excluded from the dump: primitive fields in object instance dumps, primitive static fields in class dumps, and primitive array elements.

JVMPI_DUMP_LEVEL_2:
The dump consists of a sequence of records, where each record includes an 8-bit record type followed by data whose format is specific to each record type.

Record type Record data
JVMPI_GC_ROOT_UNKNOWN
(unknown root)
jobjectID object
JVMPI_GC_ROOT_JNI_GLOBAL
(JNI global ref root)
jobjectID | object
jobject | JNI global reference
JVMPI_GC_ROOT_JNI_LOCAL
(JNI local ref)
jobjectID | object
JNIEnv * | thread
u4 | frame # in stack trace (-1 for empty)
JVMPI_GC_ROOT_JAVA_FRAME
(Java stack frame)
jobjectID | object
JNIEnv * | thread
u4 | frame # in stack trace (-1 for empty)
JVMPI_GC_ROOT_NATIVE_STACK
(native stack)
jobjectID | object
JNIEnv * | thread
JVMPI_GC_ROOT_STICKY_CLASS
(system class)
jobjectID class object
JVMPI_GC_ROOT_THREAD_BLOCK
(reference from thread block)
jobjectID | thread object
JNIEnv * | thread
JVMPI_GC_ROOT_MONITOR_USED
(entered monitor)
jobjectID object
JVMPI_GC_CLASS_DUMP
(dump of a class object)
jobjectID | class
jobjectID | super
jobjectID | class loader
jobjectID | signers
jobjectID | protection domain
jobjectID | class name (a String object, may be NULL)
void * | reserved
u4 | instance size (in bytes)
[jobjectID]* | interfaces
u2 | size of constant pool
[u2, | constant pool index,
 ty, | type,
 vl]* | value
[vl]* | static field values
JVMPI_GC_INSTANCE_DUMP
(dump of a normal object)
jobjectID | object
jobjectID | class
u4 | number of bytes that follow
[vl]* | instance field values (class, followed by super, super's super ...)
JVMPI_GC_OBJ_ARRAY_DUMP
(dump of an object array)
jobjectID | array object
u4 | number of elements
jobjectID | element class ID (may be NULL in the Java 2 SDK)
[jobjectID]* | elements
JVMPI_GC_PRIM_ARRAY_DUMP
(dump of a primitive array)
jobjectID | array object
u4 | number of elements
ty | element type
[vl]* | elements

4.3 Object Dump Format

The dump buffer consists of a single record which includes an 8-bit record type, followed by data specific to the record type. The record type can be one of the following:
  • JVMPI_GC_CLASS_DUMP
  • JVMPI_GC_INSTANCE_DUMP
  • JVMPI_GC_OBJ_ARRAY_DUMP
  • JVMPI_GC_PRIM_ARRAY_DUMP
The format of the data for each record type is the same as described above in the heap dump format section. The level of information is the same as JVMPI_DUMP_LEVEL_2, with all of the following values included: primitive fields in object instance dumps, primitive static fields in class dumps, and primitive arrays elements.

4.4 Monitor Dump Format

The dump buffer consists of a sequence of records, where each record includes an 8-bit record type followed by data whose format is specific to each record type.
Record type Record data
JVMPI_MONITOR_JAVA
(Java monitor)
jobjectID | object ID
JNIEnv * | owner thread
u4 | entry count
u4 | number of threads waiting to enter
[JNIEnv *]* | threads waiting to enter
u4 | number of threads waiting to be notified
[JNIEnv *]* | threads waiting to be notified
JVMPI_MONITOR_RAW
(Raw monitor)
char * | raw monitor name
JVMPI_RawMonitor | raw monitor ID
JNIEnv * | owner thread
u4 | entry count
u4 | number of threads waiting to enter
[JNIEnv *]* | threads waiting to enter
u4 | number of threads waiting to be notified
[JNIEnv *]* | threads waiting to be notified

5. Data Types

  • jobjectID
  • JVMPI_CallFrame
  • JVMPI_CallTrace
  • JVMPI_Field
  • JVMPI_HeapDumpArg
  • JVMPI_Lineno
  • JVMPI_Method
  • JVMPI_RawMonitor

Characters are encoded using the UTF-8 encoding as documented in the Java virtual machine specification.

jobjectID

An opaque pointer representing an object ID.

struct _jobjectID;
typedef struct _jobjectID * jobjectID;

JVMPI_CallFrame

A method being executed.

typedef struct {
    jint lineno;
    jmethodID method_id;
} JVMPI_CallFrame;
Fields:
line number | - line number in the source file.
method_id | - method being executed.

JVMPI_CallTrace

A call trace of method execution.
typedef struct {
    JNIEnv *env_id;
    jint num_frames;
    JVMPI_CallFrame *frames;
} JVMPI_CallTrace;
Fields:
env_id | - ID of thread which executed this trace.
num_frames | - number of frames in the trace.
frames | -the JVMPI_CallFrames that make up this trace. Callee followed by callers.

JVMPI_Field

A field defined in a class.
typedef struct {
    char *field_name;
    char *field_signature;
} JVMPI_Field;
Fields:
field_name | - name of field
field_signature | - signature of field

JVMPI_HeapDumpArg

Additional info for requesting heap dumps.

typedef struct {
    jint heap_dump_level;
} JVMPI_HeapDumpArg;
Fields:
heap_dump_level - level of heap dump information, values can be:
JVMPI_DUMP_LEVEL_0
JVMPI_DUMP_LEVEL_1
JVMPI_DUMP_LEVEL_2

JVMPI_Lineno

A mapping between source line number and offset from the beginning of a compiled method.
typedef struct {
    jint offset;
    jint lineno;
} JVMPI_Lineno;
Fields:
offset | - offset from beginning of method
lineno | - lineno from beginning of source file

JVMPI_Method

A method defined in a class.
typedef struct {
    char *method_name;
    char *method_signature;
    jint start_lineno;
    jint end_lineno;
    jmethodID method_id;
} JVMPI_Method;
Fields:
method_name | - name of method
method_signature | - signature of method
start_lineno | - start line number in the source file
end_lineno | - end line number in the source file
method_id | - ID given to this method

JVMPI_RawMonitor

An opaque pointer representing a raw monitor.

struct _JVMPI_RawMonitor;
typedef struct _JVMPI_RawMonitor * JVMPI_RawMonitor;

6. Notes on Changes Since Java 2 SDK, v1.2

6.1 What's new?

  • On Win32 the following events are now supported in the presence of the JIT compiler:
    JVMPI_EVENT_METHOD_ENTRY,
    JVMPI_EVENT_METHOD_ENTRY2,
    JVMPI_EVENT_METHOD_EXIT,
    JVMPI_EVENT_COMPILED_METHOD_LOAD, and
    JVMPI_EVENT_COMPILED_METHOD_UNLOAD
  • The JVMPI_GC_CLASS_DUMP dump record now includes a jobjectID denoting the class name string object. This field was reserved in version 1.2 of the Java 2 SDK. The field is maintained by the VM as a class name cache, and thus may or may not be set for a given class.

6.2 Limitations

  • JVMPI_EVENT_OBJECT_ALLOC events for object arrays are issued with unknown element class IDs (i.e., the class_id field is always NULL).

  • SuspendThread must be called with the GC is disabled. GC must remain disabled until all threads have been resumed.

  • The thread start event for the main thread (first thread the VM creates) may arrive after some other events that refer to its JNIEnv interface pointer.

  • JVMPI_EVENT_ARENA_NEW and JVMPI_EVENT_ARENA_DELETE events are never issued. Arena IDs in other events are always set to 1.

6.3 Changes in v1.3

  • New event JVMPI_EVENT_INSTRUCTION_START which is issued in interpreter mode only.
  • Added two function to JVMPI interface: jobjectID2jobject and jobject2jobjectID. Their usage is very restricted (see note). They are implemented only in Hotspot VM.

7. The HPROF Profiler Agent

7.1 Overview

HPROF is a simple profiler agent shipped with the Java 2 SDK. It is a dynamically-linked library that interacts with the JVMPI and writes out profiling information either to a file or to a socket in ascii or binary format. This information can be further processed by a profiler front-end tool.

It is capable of presenting CPU usage, heap allocation statistics and monitor contention profiles. In addition it can also report complete heap dumps and states of all the monitors and threads in the Java virtual machine.

HPROF can be invoked by:

java -Xrunhprof ToBeProfiledClass
Depending on the type of profiling requested, HPROF instructs the virtual machine to send it the relevant JVMPI events and processes the event data into profiling information. For example, the following command obtains the heap allocation profile:
java -Xrunhprof:heap=sites ToBeProfiledClass
Following is the complete list of options that can passed to hprof :
HPROF usage: -Xrunhprof[:help]|[option=value, ...]

Option Name and Value   Description             Default
---------------------   -----------             -------
heap=dump|sites|all     heap profiling          all
cpu=samples|times|old   CPU usage               off
monitor=y|n             monitor contention      n
format=a|b              ascii or binary output  a
file=name               write data to file      java.hprof(.txt for ascii)
net=host:port           send data over a socket write to file
depth=size              stack trace depth       4
cutoff=value            output cutoff point     0.0001
lineno=y|n              line number in traces?  y
thread=y|n              thread in traces?       n
doe=y|n                 dump on exit?           y

Example: java -Xrunhprof:cpu=samples,file=log.txt,depth=3 FooClass

By default, heap profiling information (sites and dump) is written out to java.hprof.txt (ascii).

7.2 Heap Allocation Profiles

Following is the heap allocation profile generated by running the Java compiler (javac) on a set of input files. Only parts of the profiler output are shown here.

Command used: javac -J-Xrunhprof:heap=sites foo.java ...
SITES BEGIN (ordered by live bytes) Wed Oct  7 11:38:10 1998
        percent        live       alloc'ed    stack class
rank  self  accum   bytes objs   bytes   objs trace name
   1 9.18%  9.18%  149224 5916 1984600 129884  1073 char []
   2 7.28% 16.45%  118320 5916  118320   5916  1090 sun/tools/java/Identifier
   3 7.28% 23.73%  118320 5916  118320   5916  1091 java/util/Hashtable$Entry
   ...
   7 3.39% 41.42%   55180 2759   55180   2759  1264 java/util/Hashtable$Entry
   ...
SITES END
A crucial piece of information in heap profile is the amount of allocation that occurs in various parts of the program. The SITES record above tells us that 9.18% of live objects are character arrays. Note that the amount of live data is only a fraction of the total allocation that has occurred at a given site; the rest has been garbage collected.

A good way to relate allocation sites to the source code is to record the dynamic stack traces that led to the heap allocation. Following is another part of the profiler output that illustrates the stack traces referred to by the four allocation sites in output shown above.

THREAD START (obj=1d6b20, id = 1, name="main", group="main")
...
TRACE 1073: (thread=1)
        java/lang/String.(String.java:244)
        sun/tools/java/Scanner.bufferString(Scanner.java:143)
        sun/tools/java/Scanner.scanIdentifier(Scanner.java:942)
        sun/tools/java/Scanner.xscan(Scanner.java:1281)

TRACE 1090: (thread=1)
        sun/tools/java/Identifier.lookup(Identifier.java:106)
        sun/tools/java/Scanner.scanIdentifier(Scanner.java:942)
        sun/tools/java/Scanner.xscan(Scanner.java:1281)
        sun/tools/java/Scanner.scan(Scanner.java:971)

TRACE 1091: (thread=1)
        java/util/Hashtable.put(Hashtable.java:405)
        sun/tools/java/Identifier.lookup(Identifier.java:106)
        sun/tools/java/Scanner.scanIdentifier(Scanner.java:942)
        sun/tools/java/Scanner.xscan(Scanner.java:1281)

TRACE 1264: (thread=1)
        java/util/Hashtable.put(Hashtable.java:405)
        sun/tools/java/Type.(Type.java:90)
        sun/tools/java/MethodType.(MethodType.java:42)
        sun/tools/java/Type.tMethod(Type.java:274)

Each frame in the stack trace contains class name, method name, source file name, and the line number. The user can set the maximum number of frames collected by the HPROF agent. The default limit is 4. Stack traces reveal not only which methods performed heap allocation, but also which methods were ultimately responsible for making calls that resulted in memory allocation. For example, in the heap profile above, instances of the same java/util/Hashtable$Entry class are allocated in traces 1091 and 1264, each originated from different methods.

7.3 CPU Usage Profiles

HPROF collects CPU usage information by sampling-based CPU time profiling. Following is part of the output collected from a run of the javac compiler.

Command used: javac -J-Xrunhprof:cpu=samples foo.java ...

CPU SAMPLES BEGIN (total = 252378) Wed Oct 07 13:30:10 1998
rank   self  accum   count trace method
   1  4.96%  4.96%   12514   303 sun/io/ByteToCharSingleByte.convert
   2  3.18%  8.14%    8022   306 java/lang/String.charAt
   3  1.91% 10.05%    4828   301 sun/tools/java/ScannerInputReader.
   4  1.80% 11.85%    4545   305 sun/io/ByteToCharSingleByte.getUnicode
   5  1.50% 13.35%    3783   304 sun/io/ByteToCharSingleByte.getUnicode
   6  1.30% 14.65%    3280   336 sun/tools/java/ScannerInputReader.read
   7  1.13% 15.78%    2864   404 sun/io/ByteToCharSingleByte.convert
   8  1.11% 16.89%    2800   307 java/lang/String.length
   9  1.00% 17.89%    2516  4028 java/lang/Integer.toString
  10  0.95% 18.84%    2403   162 java/lang/System.arraycopy
...
CPU SAMPLES END

The HPROF agent periodically samples the stack of all running threads to record the most frequently active stack traces. The count field above indicates how many times a particular stack trace was found to be active. These stack traces correspond to the CPU usage hot spots in the application.

8. Code Examples

8.1 A Simple Class Load Tracer

The jvmpi_example.zip file contains an example profiler agent for tracing all the classes loaded by a Java program. Both Solaris and Win32 versions are included.

8.2 The HPROF Profiling Agent

The hprof.zip file contains the implementation of the HPROF profiling agent in the Java 2 SDK. Both Solaris and Win32 versions are included.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Last modified: Tue Dec 7 16:48:00 PST


Design of Shutdown Hooks API

Java

Design of the Shutdown Hooks API

 Documentation Contents
The following Q&A addresses some of the design issues of the Shutdown Hooks API.

Isn't this what runFinalizersOnExit is for?

You can use the Runtime.runFinalizersOnExit method, or the equivalent method in the System class, to schedule actions to take place when the VM shuts down due to exit. This technique does not, however, work for termination-triggered shutdowns. It is also is inherently unsafe, and in fact these methods were deprecated in version 1.2 of the JavaTM 2 Platform.

Why don't you provide information as to why the VM is shutting down?

On some platforms a native process can't distinguish a shutdown due to exit from a shutdown due to termination. Other platforms provide much richer capabilities, in some cases including notification of system suspension and restart or of imminent power failure. In short, it's impossible to generalize such information in a portable way.

Will shutdown hooks be run if the VM crashes?

If the VM crashes due to an error in native code then no guarantee can be made about whether or not the hooks will be run.

Why are shutdown hooks run concurrently? Wouldn't it make more sense to run them in reverse order of registration?

Invoking shutdown hooks in their reverse order of registration is certainly intuitive, and is in fact how the C runtime library's atexit procedure works. This technique really only makes sense, however, in a single-threaded system. In a multi-threaded system such as Java platform the order in which hooks are registered is in general undetermined and therefore implies nothing about which hooks ought to be run before which other hooks. Invoking hooks in any particular sequential order also increases the possibility of deadlocks. Note that if a particular subsystem needs to invoke shutdown actions in a particular order then it is free to synchronize them internally.

Why are hooks just threads, and unstarted ones at that? Wouldn't it be simpler to use Runnable objects, or Beans-style event and listener patterns?

The approach taken here has two advantages over the more obvious, and more frequently suggested, callback-oriented designs based upon Runnable objects or Beans-style event listeners.

First, it gives the user complete control over the thread upon which a shutdown action is executed. The thread can be created in the proper thread group, given the correct priority, context, and privileges, and so forth.

Second, it simplifies both the specification and the implementation by isolating the VM from the hooks themselves. If shutdown actions were executed as callbacks then a robust implementation would wind up having to create a separate thread for each hook anyway in order for them to run concurrently. The specification would also have to include explicit language about how the threads that execute the callbacks are created.

Aren't threads pretty expensive things to keep around, especially if they won't be started until the VM shuts down?

Most implementations of the Java platform don't actually allocate resources to a thread until it's started, so maintaining a set of unstarted threads is actually very cheap. If you look at the internals of java.lang.Thread you can see that its various constructors just do security checks and initialize private fields. The native start() method does the real work of allocating a thread stack, etc., to get things going.

What about Personal and Embedded Java? Won't starting threads during shutdown be too expensive on those platforms?

This API may not be suitable for the smaller Java platforms. Threads in the Java 2 Platform carry more information than threads in JDK 1.1 and p/eJava. A thread has a class loader, it may have some inherited thread-local variables, and, in the case of GUI apps, it may be associated with a specific application context. Threads will come to carry even more information as the platform evolves; for example, the security team is planning to introduce a notion of per-thread user identity in their upcoming authentication framework.

Because of all this contextual information, shutdown hooks would be harder to write and maintain if they were just Runnable objects or Beans-style event listeners. Suppose that a Runnable shutdown hook, or an equivalent event listener, needed a specific bit of thread-contextual information in order to carry out its operations. Such information could be saved in some shared location before the hook is registered. While this is merely awkward, suppose further that threads acquire some new type of contextual information in a future release. If an operation invoked by the hook also evolves to need that information then the code that registers the hook would have to be amended to save that information as well. Making hooks be threads instead of Runnables or event listeners insulates them from this sort of future change.

Okay, but won't I have to write a lot of code just to register a simple shutdown hook?

No. Simple shutdown hooks can often be written as anonymous inner classes, as in this example:
Runtime.getRuntime().addShutdownHook(new Thread() {
    public void run() { database.close(); }
});
This idiom is fine as long as you'll never need to cancel the hook, in which case you'd need to save a reference to the hook when you create it.

What about security? Can an untrusted applet register a shutdown hook?

If there is a security manager installed then the addShutdownHook and removeShutdownHook methods check that the caller's security context permits RuntimePermission("shutdownHooks"). An untrusted applet will not have this permission, and will therefore not be able to register or de-register a shutdown hook.

What happens if a shutdown hook throws an exception and the exception is not caught?

Uncaught exceptions are handled in shutdown hooks just as in any other thread, by invoking the uncaughtException method of the thread's ThreadGroup object. The default implementation of this method prints the exception's stack trace to System.err and terminates the thread. Note that uncaught exceptions do not cause the VM to exit; this happens only when all non-daemon threads have finished or when the Runtime.exit method is invoked.

Why did you add the Runtime.halt method? Isn't it pretty dangerous?

The new halt method is certainly powerful, and it should be used with the utmost caution. It's provided so that applications can insulate themselves from shutdown hooks that deadlock or run for inordinate amounts of time. It also allows applications to force a quick exit in situations where that is necessary.

What happens if finalization-on-exit is enabled? Will finalizers be run before, during, or after shutdown hooks?

Finalization-on-exit processing is done after all shutdown hooks have finished. Otherwise a hook may fail if some live objects are finalized prematurely.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Enhancements in java.lang and java.util.*

Java

Enhancements in Packages java.lang.* and java.util.*

 Documentation Contents
Version 1.3 of the Java 2 SDK includes the following enhancements:
Classes java.lang.Math and java.lang.StrictMath
New Timer API
Enhanced Collections Framework
Virtual Machine Shutdown Hooks
New URL JAR File Caching
Classes java.lang.Math and java.lang.StrictMath
The Java 2 Platform now contains two clases which provide API for performing general numeric operations.
  • java.lang.StrictMath - Class java.lang.StrictMath has the same API as old class java.lang.Math, which was present previous versions of the Java platform. Unlike class Math, however, StrictMath is defined to return bit-for-bit reproducible results in all implementations.
  • java.lang.Math - Class java.lang.Math provides the same set of API as does class StrictMath. However, unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results, but can vary within specified constraints. This permits better-performing implementations where strict reproducibility is not required.

New Timer API

Two new classes have been added to the Java 2 Platform to provide an API for a timer facility which can be used for purposes such as animations, human interaction timeouts, on-screen clocks and calendars, work-scheduling routines, reminder facilities, and more.
  • java.util.Timer
  • java.util.TimerTask
Countdown.java is a simple demo application that uses the new Timer API.

Enhanced Collections Framework

The Collections Framework has these new convenience APIs:
  • Added java.util.Collections.singletonList and java.util.Collections.singletonMap. Previously, there was a convenience implementation for singleton Set, but no corresponding implementation for List and Map. Both of these implementations proved desirable in practice.
  • Added java.util.Collections.EMPTY_MAP. Previously, there were constant convenience implementations for the empty Set and List, but no corresponding implementation for Map.
The following special-purpose implementation has also been added:
  • Added Map constuctor for WeakHashMap. The Map interface dictates that most Map implementations should have a "copy constructor" that takes a Map argument. WeakHashMap lacked such a constructor in the 1.2 release.

Virtual Machine Shutdown Hooks

Sophisticated applications often require the ability to perform specific actions when the virtual machine shuts down, whether due to voluntary exit or involuntary termination. Typical actions include cleanly closing down network connections, saving session state, and deleting temporary files. Every major operating system provides the means for native applications to do this, though of course the details vary from platform to platform. Three methods have been added to java.lang.Runtime to provide a simple and portable interface to these facitilies. The new methods are:
  • addShutdownHook
  • removeShutdownHook
  • halt
In addition, the Runtime.exit method has been revised. For more information, see Design of the Shutdown Hooks API.

New URL JAR File Caching

The API of classes java.util.zip and java.util.jar have been enhanced with the addition of the following:
  • java.util.zip.OPEN_READ
  • java.util.zip.OPEN_DELETE
  • java.util.zip.ZipFile(File file, int mode)
  • java.util.jar.JarFile(File file, boolean verify, int mode)
The previous implementation of caching downloaded Jar files created problems for long-running server application and for RMI. Each open JarURLConnection creates a temporary local file that holds Jar-file date, and a JarFile object is created on top of the temporary file. Because the open file handle/descriptor on each temporary file was never closed, the files could quickly take up disk space for long-running server applications. The new API provides a solution for this problem by supporting a new "delete-on-close" mode for opening Zip and Jar files.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@java.sun.com 		Sun


Enhancements to java.math

 Documentation Contents
The following enhancements were made to the java.math package in version 1.3 of the JavaTM 2 SDK.

Performance enhancements in BigIntenger

Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on an underlying C library. On a high-quality VM, the new implementation performs all operations faster than the old implementation. The speed-up can be as much as 5x or more, depending on the operation being performed and the length of the operands.
More robust BigDecimal(String) constructor
The BigDecimal(String) constructor has been enhanced to allow signed strings (for example, "+2.71828") and exponential notation (for example, "1.23E-23") as input.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@java.sun.com 		Sun


Applet Caching

Applet Caching in Java Plug-in

Applet caching ensures that applets are not unnecessarily downloaded by a browser every time a user references them. Java Plug-in has supported caching in previous versions by using the same cache the browser uses for all other web documents.

This works for casual applet usage, but larger applets can often get flushed from the cache to make room for other documents since the browser has no knowledge that an applet file might be needed in the future. The result is that this caching strategy fails where is needed most in large business applets.

This release introduces an alternative form of applet caching which allows an applet deployer to decide her applet should be "sticky", that is, to stay on the disk in a secondary cache which the browser cannot overwrite. The only time "sticky" applets get downloaded after that is when they are updated on their server. Otherwise the applet is always available for quick loading. We recommend that applets which provide core business applications be made sticky to improve their startup performance.

This new feature is activated by including the new PARAM NAME="cache_option" and PARAM NAME="cache_archive" values in the tag that specifies the use of Java Plug-in as below:

<OBJECT ....>
     <PARAM NAME="archive" VALUE="...">
     ....
     <PARAM NAME="cache_option" VALUE="...">
     <PARAM NAME="cache_archive" VALUE="...">
</OBJECT>

The cache_option attribute can take one of three values:

No
Disable applet installation. Always download the file from the web server.

Browser
Run applets from the browser cache (default).

Plugin
Run applets from the new Java Plug-in cache.

The cache_archive attribute contains a list of the files to be cached:

<PARAM NAME="cache_archive" VALUE="a.jar,b.jar,c.jar">

Like the archive attribute in the APPLET tag, the list of jar files in the cache_archive attribute do not contain the full URL, but are always downloaded from the codebase specified in the EMBED/OBJECT tag.

Note that the list of JAR files in the cache_archive attribute and those in the archive attribute may be similar but should not contain the same JAR files. There are two possible cases:

  1. A JAR file is listed in cache_archive but not in archive. In this case, the JAR file is cached according to cache_option.

  2. A JAR file is listed in archive but not in cache_archive. In this case, the JAR file is cached using the native browser cache. This guarantees a minimum of caching.
cache_option and cache_archive can only be specified once per EMBED/OBJECT tag. In addition, both attributes must be specified. If either cache_archive or cache_option are missing, Java Plug-in will treat the applet normally using the archive attribute.

Note: Caching of the JAR files specified in the manifest's CLASSPATH variable using Java Plug-in's cache is currently not supported.


Java Thread Primitive Deprecation

Java

Why Are Thread.stop, Thread.suspend,
Thread.resume and Runtime.runFinalizersOnExit Deprecated?

Why is Thread.stop deprecated?

Because it is inherently unsafe. Stopping a thread causes it to unlock all the monitors that it has locked. (The monitors are unlocked as the ThreadDeath exception propagates up the stack.) If any of the objects previously protected by these monitors were in an inconsistent state, other threads may now view these objects in an inconsistent state. Such objects are said to be damaged. When threads operate on damaged objects, arbitrary behavior can result. This behavior may be subtle and difficult to detect, or it may be pronounced. Unlike other unchecked exceptions, ThreadDeath kills threads silently; thus, the user has no warning that his program may be corrupted. The corruption can manifest itself at any time after the actual damage occurs, even hours or days in the future.

Couldn't I just catch the ThreadDeath exception and fix the damaged object?

In theory, perhaps, but it would vastly complicate the task of writing correct multithreaded code. The task would be nearly insurmountable for two reasons:

  1. A thread can throw a ThreadDeath exception almost anywhere. All synchronized methods and blocks would have to be studied in great detail, with this in mind.
  2. A thread can throw a second ThreadDeath exception while cleaning up from the first (in the catch or finally clause). Cleanup would have to repeated till it succeeded. The code to ensure this would be quite complex.
In sum, it just isn't practical.

What about Thread.stop(Throwable)?

In addition to all of the problems noted above, this method may be used to generate exceptions that its target thread is unprepared to handle (including checked exceptions that the thread could not possibly throw, were it not for this method). For example, the following method is behaviorally identical to Java's throw operation, but circumvents the compiler's attempts to guarantee that the calling method has declared all of the checked exceptions that it may throw:

    static void sneakyThrow(Throwable t) {
        Thread.currentThread().stop(t);
    }

What should I use instead of Thread.stop?

Most uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. (This is the approach that JavaSoft's Tutorial has always recommended.) To ensure prompt communication of the stop-request, the variable must be volatile (or access to the variable must be synchronized).

For example, suppose your applet contains the following start, stop and run methods:

    private Thread blinker;

    public void start() {
        blinker = new Thread(this);
        blinker.start();
    }

    public void stop() {
        blinker.stop();  // UNSAFE!
    }

    public void run() {
        Thread thisThread = Thread.currentThread();
        while (true) {
            try {
                thisThread.sleep(interval);
            } catch (InterruptedException e){
            }
            repaint();
        }
    }
You can avoid the use of Thread.stop by replacing the applet's stop and run methods with:
    private volatile Thread blinker;

    public void stop() {
        blinker = null;
    }

    public void run() {
        Thread thisThread = Thread.currentThread();
        while (blinker == thisThread) {
            try {
                thisThread.sleep(interval);
            } catch (InterruptedException e){
            }
            repaint();
        }
    }

How do I stop a thread that waits for long periods (e.g., for input)?

That's what the Thread.interrupt method is for. The same "state based" signaling mechanism shown above can be used, but the state change (blinker = null, in the previous example) can be followed by a call to Thread.interrupt, to interrupt the wait:

    public void stop() {
        Thread moribund = waiter;
        waiter = null;
        moribund.interrupt();
    }
For this technique to work, it's critical that any method that catches an interrupt exception and is not prepared to deal with it immediately reasserts the exception. We say reasserts rather than rethrows, because it is not always possible to rethrow the exception. If the method that catches the InterruptedException is not declared to throw this (checked) exception, then it should "reinterrupt itself" with the following incantation:
    Thread.currentThread().interrupt();
This ensures that the Thread will reraise the InterruptedException as soon as it is able.

What if a thread doesn't respond to Thread.interrupt?

In some cases, you can use application specific tricks. For example, if a thread is waiting on a known socket, you can close the socket to cause the thread to return immediately. Unfortunately, there really isn't any technique that works in general. It should be noted that in all situations where a waiting thread doesn't respond to Thread.interrupt, it wouldn't respond to Thread.stop either. Such cases include deliberate denial-of-service attacks, and I/O operations for which thread.stop and thread.interrupt do not work properly.

Why are Thread.suspend and Thread.resume deprecated?

Thread.suspend is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes.

What should I use instead of Thread.suspend and Thread.resume?

As with Thread.stop, the prudent approach is to have the "target thread" poll a variable indicating the desired state of the thread (active or suspended). When the desired state is suspended, the thread waits using Object.wait. When the thread is resumed, the target thread is notified using Object.notify.

For example, suppose your applet contains the following mousePressed event handler, which toggles the state of a thread called blinker:

    private boolean threadSuspended;

    Public void mousePressed(MouseEvent e) {
        e.consume();

        if (threadSuspended)
            blinker.resume();
        else
            blinker.suspend();  // DEADLOCK-PRONE!

        threadSuspended = !threadSuspended;
    }
You can avoid the use of Thread.suspend and Thread.resume by replacing the event handler above with:
    public synchronized void mousePressed(MouseEvent e) {
        e.consume();

        threadSuspended = !threadSuspended;

        if (!threadSuspended)
            notify();
    }
and adding the following code to the "run loop":
                synchronized(this) {
                    while (threadSuspended)
                        wait();
                }
The wait method throws the InterruptedException, so it must be inside a try ... catch clause. It's fine to put it in the same clause as the sleep. The check should follow (rather than precede) the sleep so the window is immediately repainted when the the thread is "resumed." The resulting run method follows:
    public void run() {
        while (true) {
            try {
                Thread.currentThread().sleep(interval);

                synchronized(this) {
                    while (threadSuspended)
                        wait();
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }
Note that the notify in the mousePressed method and the wait in the run method are inside synchronized blocks. This is required by the language, and ensures that wait and notify are properly serialized. In practical terms, this eliminates race conditions that could cause the "suspended" thread to miss a notify and remain suspended indefinitely.

While the cost of synchronization in Java is decreasing as the platform matures, it will never be free. A simple trick can be used to remove the synchronization that we've added to each iteration of the "run loop." The synchronized block that was added is replaced by a slightly more complex piece of code that enters a synchronized block only if the thread has actually been suspended:

                if (threadSuspended) {
                    synchronized(this) {
                        while (threadSuspended)
                            wait();
                    }
                }
The resulting run method is:
    public void run() {
        while (true) {
            try {
                Thread.currentThread().sleep(interval);

                if (threadSuspended) {
                    synchronized(this) {
                        while (threadSuspended)
                            wait();
                    }
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }
In the absence of explicit synchronization, threadSuspended must be made volatile to ensure prompt communication of the suspend-request.

Can I combine the two techniques to produce a thread that may be safely "stopped" or "suspended"?

Yes; it's reasonably straightforward. The one subtlety is that the target thread may already be suspended at the time that another thread tries to stop it. If the stop method merely sets the state variable (blinker) to null, the target thread will remain suspended (waiting on the monitor), rather than exiting gracefully as it should. If the applet is restarted, multiple threads could end up waiting on the monitor at the same time, resulting in erratic behavior.

To rectify this situation, the stop method must ensure that the target thread resumes immediately if it is suspended. Once the target thread resumes, it must recognize immediately that it has been stopped, and exit gracefully. Here's how the resulting run and stop methods look:

    public void run() {
        Thread thisThread = Thread.currentThread();
        while (blinker == thisThread) {
            try {
                thisThread.sleep(interval);

                synchronized(this) {
                    while (threadSuspended && blinker==thisThread)
                        wait();
                }
            } catch (InterruptedException e){
            }
            repaint();
        }
    }

    public synchronized void stop() {
        blinker = null;
        notify();
    }
If the stop method calls Thread.interrupt, as described above, it needn't call notify as well, but it still must be synchronized. This ensures that the target thread won't miss an interrupt due to a race condition.

What about Thread.destroy?

Thread.destroy has never been implemented. If it were implemented, it would be deadlock-prone in the manner of Thread.suspend. (In fact, it is roughly equivalent to Thread.suspend without the possibility of a subsequent Thread.resume.) We are not implementing it at this time, but neither are we deprecating it (forestalling its implementation in future). While it would certainly be deadlock prone, it has been argued that there may be circumstances where a program is willing to risk a deadlock rather than exit outright.

Why is Runtime.runFinalizersOnExit deprecated?

Because it is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock. While this problem could be prevented if the class whose objects are being finalized were coded to "defend against" this call, most programmers do not defend against it. They assume that an object is dead at the time that its finalizer is called.

Further, the call is not "thread-safe" in the sense that it sets a VM-global flag. This forces every class with a finalizer to defend against the finalization of live objects!

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Suggest a feature or make comments

Java Software


The APPLET Tag

 Documentation Contents

Here is an example of a simple APPLET tag:

  <applet code="MyApplet.class" width=100 height=140></applet>
This tells the viewer or browser to load the applet whose compiled code is in MyApplet.class (in the same directory as the current HTML document), and to set the initial size of the applet to 100 pixels wide and 140 pixels high.

Here's a more complex example of an APPLET tag:

  <applet codebase="http://java.sun.com/applets/NervousText/1.1"
    code="NervousText.class" width=400 height=75>
  <param name="text" value="Welcome to HotJava!">
  <hr>
  If you were using a Java-enabled browser such as HotJava,
  you would see dancing text instead of this paragraph.
  <hr>
  </applet>
This tells the viewer or browser to load the applet whose compiled code is at the URL http://java.sun.com/applets/NervousText/1.1/NervousText.class, to set the initial size of the applet to 400x75 pixels. The viewer/browser must also set the applet's "text" attribute (which customizes the text this applet displays) to be "Welcome to HotJava!" If the page is viewed by a browser that can't execute Java applets, then the browser will ignore the APPLET and PARAM tags, displaying only the HTML between the <param> and </applet> tags (the alternate HTML).

Here's the result of putting the above example in your HTML file. (The first time you load this page, you may have to wait for the applet to be loaded.)

If you were using a Java-enabled browser such as HotJava, you would see dancing text instead of this paragraph.

Here is another example of an APPLET tag:

   <applet code=A21 width=256 height=256 archive="toir.jar">
   <param name=img value=test.gif>
   <hr>
   We need to convert some of the standard applets to use
   archive.  Any volunteers?
   <hr>
   </applet>
In this example, the applet class is A21. Its bytecodes (may) reside in the archive "toir.jar". This archive may also contain the image resource (see resources documentation) with name test.gif.

Here's the complete syntax for the APPLET tag. Required elements are in bold. Optional elements are in regular typeface. Elements your specify are in italics.

    <APPLET
        CODEBASE = codebaseURL
        ARCHIVE = archiveList
        CODE = appletFile ...or...  OBJECT = serializedApplet
        ALT = alternateText
        NAME = appletInstanceName
        WIDTH = pixels  HEIGHT = pixels
        ALIGN = alignment
        VSPACE = pixels  HSPACE = pixels
    >
    <PARAM NAME = appletAttribute1 VALUE = value>
    <PARAM NAME = appletAttribute2 VALUE = value>
    . . .
    alternateHTML
    </APPLET>

CODE, CODEBASE, and so on are attributes of the applet tag; they give the browser information about the applet. The only mandatory attributes are CODE, WIDTH, and HEIGHT. Each attribute is described below.

CODEBASE = codebaseURL
This OPTIONAL attribute specifies the base URL of the applet--the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.
ARCHIVE = archiveList
This OPTIONAL attribute describes one or more archives containing classes and other resources that will be "preloaded". The classes are loaded using an instance of an AppletClassLoader with the given CODEBASE.
The archives in archiveList are separated by ",". NB: in JDK1.1, multiple APPLET tags with the same CODEBASE share the same instance of a ClassLoader. This is used by some client code to implement inter-applet communication. Future JDKs may provide other mechanisms for inter-applet communication. For security reasons, the applet's class loader can read only from the same codebase from which the applet was started. This means that archives in archiveList must be in the same directory as, or in a subdirectory of, the codebase. Entries in archiveList of the form ../a/b.jar will not work unless explicitly allowed for in the security policy file (except in the case of an http codebase, where archives in archiveList must be from the same host as the codebase, but can have ".."'s in their paths.)
CODE = appletFile
This REQUIRED attribute gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URL of the applet. It cannot be absolute. One of CODE or OBJECT must be present. The value appletFile can be of the form classname.class or of the form packagename.classname.class.
OBJECT = serializedApplet
This attribute gives the name of the file that contains a serialized representation of an Applet. The Applet will be deserialized. The init() method will *not* be invoked; but its start() method will. Attributes valid when the original object was serialized are *not* restored. Any attributes passed to this APPLET instance will be available to the Applet; we advocate very strong restraint in using this feature. An applet should be stopped before it is serialized. One of CODE or OBJECT must be present.
ALT = alternateText
This OPTIONAL attribute specifies any text that should be displayed if the browser understands the APPLET tag but can't run Java applets.
NAME = appletInstanceName
This OPTIONAL attribute specifies a name for the applet instance, which makes it possible for applets on the same page to find (and communicate with) each other.
WIDTH = pixels HEIGHT = pixels
These REQUIRED attributes give the initial width and height (in pixels) of the applet display area, not counting any windows or dialogs that the applet brings up.
ALIGN = alignment
This OPTIONAL attribute specifies the alignment of the applet. The possible values of this attribute are the same as those for the IMG tag: left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom.
VSPACE = pixels HSPACE = pixels
These OPTIONAL attributes specify the number of pixels above and below the applet (VSPACE) and on each side of the applet (HSPACE). They're treated the same way as the IMG tag's VSPACE and HSPACE attributes.
<PARAM NAME = appletAttribute1 VALUE = value>
<PARAM NAME = appletAttribute2 VALUE = value> . . .
This tag is the only way to specify an applet-specific attribute. Applets access their attributes with the getParameter() method.
Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@java.sun.com 		Sun

Java Software


The @deprecated Tag

"@deprecated": Mechanical Help for Abandoning Old APIs

John R. Rose
Oct 4, 1996

Problem:

Java 1.1 introduces many new APIs, some of which supersede older ones. The new and old APIs co-exist in the same packages. The superseded ones add various difficulties to the programmer's job, the chief being the need to ignore and avoid them in most cases.

Partial Solution: If we mark superseded classes, methods, and fields clearly and unambiguously as "deprecated", the programmers will know where to concentrate their attention. Also, the compiler will be able to help with this process, by bringing unintentional uses of deprecated APIs to the programmer's attention.

Details:

Within documentation comments, we define the new paragraph tag "@deprecated". (See JLS, $$184.) It can appear in both class and member documentation comments, and will apply specifically the construct its comment introduces.

The tagged paragraph can be empty. If it is not, it should tell the programmer how to avoid using the deprecated feature.

There should be "@see" tagged paragraphs which refer to the new versions of the same functionality.

As far as the compiler is concerned, the presence of the string "@deprecated" at the beginning of a documentation comment line (except for whitespace) causes it to place a "Deprecated" attribute in the output classfile for the corresponding class, field, or method.

Moreover, in parallel with the access checking logic for classes and members, the compiler looks for "Deprecated" attributes of classes and members being accessed, and issues warnings when the deprecated classes or members are used.

Note that deprecation applies to classes and to individual members, not to their names. It is possible for a single method to have deprecated and non-deprecated overloadings. It is possible for a non-deprecated member to hide or override a deprecated one, which removes deprecation. It is the responsibility of the programmer to deprecate overrides of a deprecated method, if in fact they should be deprecated.

A deprecation warning is suppressed if the compilation unit containing the deprecation is being compiled at the same time as the compilation unit using the deprecated class or member. This allows legacy APIs to be built without warnings. There currently is no other way to suppress the deprecation warnings.

A hypothetical "-strict" option to the compiler could promote all warnings, including deprecation warnings, to hard errors. This is not in 1.1.

Javadoc should somehow highlight deprecation paragraphs, and perhaps should place a characteristic glyph next to references to deprecated names.

Practice:

Here is an example of the most common form of a deprecated method:

    /**
     * @deprecated
     * @see #getPreferredSize
     */
    public Dimension preferredSize() {
    return getPreferredSize();
    }
(Notes: The "@deprecated" tag must be followed by a space or newline. The "@see" tag must be at the beginning of the line. See the JLS, chapter 18.)

If the deprecation is a simple renaming, there is no need to say something like "this method is replaced by getPreferredSize"; the "@see"-tagged paragraph points the user to the replacement.

The deprecation may be more complex if the API was reorganized by other than a renaming of features. Here is an example of a method that is being retracted:

    /**
     * Delete multiple items from the list.
     *
     * @deprecated  Not for public use in the future.
     * This method is expected to be retained only as a package
     * private method.
     * @see #remove(int)
     * @see #removeAll()
     */
    public synchronized void delItems(int start, int end) {
    ...
    }
Designers of new 1.1 APIs should carefully consider whether they are superseding old APIs. For each such API, if they wish to encourage users of the old previous API to migrate to the new API, they should add a deprecation paragraph to the documentation comment. Empty deprecation paragraphs are bad form, because they do not help the user fix the warnings that arise from the deprecation.

Valid reasons for wishing one's users to migrate to the new API include:

  • the old API is insecure, buggy, or highly inefficient
  • the old API is going away in a future release
  • the old API encourages very bad coding practices

Not all of these reasons are of equal weight, yet deprecation is a reasonable (though not mandatory) choice in all these cases. Therefore, the use of deprecated APIs can never be made a hard error by default. Also, the deprecation comments need to help the user decide when to move to the new API, and so should briefly mention the technical reasons for deprecation.

(It is probably not good to specifically mention a timetable for phase-out of the deprecated API; this is a business decision that needs to be communicated other ways.)

It is not necessary to deprecate individual members of a deprecated class, unless of course the programmer wants to explain some specific point about one member.

When a feature is deprecated, it is a good idea to notify the engineering organization of this fact, so that other engineers can respond to the change (pro or con) in a timely manner.

Other Design Options:

This is the first time the compiler is in any way cognizant of document comment contents. (Once, it made sure that they were at the right place in the parse tree, but this is no longer true.) We did not lightly choose to make the compiler's behavior dependent on the contents of a comment.

One precedent for looking into comments is "lint", which uses comments like /*PRINTFLIKE2*/ to annotate C APIs.

Note that Java documentation comments are structured, and the structure is specified in the Java Language Specification. This means that we "own" the format of this particular sort of comment, so our design is somewhat more reasonable than the less-differentiated conventions used by lint.

We considered introducing pragmas, and using them for deprecation (e.g., <*deprecated*>) but this would open the door very wide to many sorts of incompatible extensions and, possibly, to serious abuses.

However, @deprecated does work like a pragma: It belongs in the source, expresses information about it, but does not modify its semantics. Unlike many pragmas, @deprecated is intended for a human audience.

The compiler emits warnings as a friendly and helpful reminder, but does not enforce any rules. It's up to the programmer to use the contents of the deprecation paragraph. Since the human is the primary user of the data, it belongs in comments.

We considered introducing a new keyword, something like "transient". This would solve the mechanical problem, but at the cost of modifying the language itself. In particular, we would have to take away an identifier from coders that we had not previously reserved (like "var"). Moreover, since the primary audience of deprecations is humans, a keyword-based approach is insufficient, and must be augmented by comment conventions, preferably ones which integrate with javadoc. Thus, the keyword approach does not pay.

Still, the compiler has heretofore ignored and should generally ignore documentation comments. This is an admittedly irregular exception to that practice. But the other design options for deprecation involve worse sorts of irregularity.

Copyright © 1996 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043-1100 USA. All rights reserved.

Please send comments to: jdk-comments@java.sun.com


How and When to Deprecate APIs

Sun Microsystems, Inc

How and When
To Deprecate APIs

(based on a writeup by John Rose)

Maintained by doug.kramer@sun.com

Deprecation
Home Page

Contents

  • What "Deprecated" means
  • When to Deprecate
  • What happens when an API is Deprecated
  • How to Deprecate

What "Deprecated" means

You may have heard the term, "self-deprecating humor". That is humor that minimizes your importance. A deprecated class or method is like that. It is no longer important. It is so unimportant, in fact, that it should no longer be used at all, as it will probably cease to exist in the future.

The need for deprecation comes about because, as a class evolves, its API changes. Methods are renamed for consistency. New and better methods are added. Attributes change. But making such changes introduces a problem. You need to keep the old API around until people make the transition to the new one, but you don't want developers to continue programming to the old API.

The ability to mark a class or method as "deprecated" solves the problem. Existing classes that use the old API continue to work, but the compiler can issue a warning when it finds references to deprecated items. Meanwhile, the API comments can warn the user against using the deprecated item and tell the user how to avoid doing so. The @deprecated tag achieves these goals.

Note: "Deprecated" and "depreciated" are not same. "Depreciated" is a financial term that means "lowered value". Although the meanings are similar, classes and methods are deprecated, not depreciated.

When to Deprecate

Designers of new APIs should carefully consider whether they are superseding old APIs. For each such API, if they wish to encourage users of the old previous API to migrate to the new API, they should add a deprecation paragraph to the documentation comment. Empty deprecation paragraphs are bad form, because they do not help the user fix the warnings that arise from the deprecation.

Valid reasons for wishing one's users to migrate to the new API include: - the old API is insecure, buggy, or highly inefficient - the old API is going away in a future release - the old API encourages very bad coding practices Not all of these reasons are of equal weight, yet deprecation is a reasonable (though not mandatory) choice in all these cases. Therefore, the use of deprecated APIs can never be made a hard error by default. Also, the deprecation comments need to help the user decide when to move to the new API, and so should briefly mention the technical reasons for deprecation.

What happens when an API is Deprecated

In parallel with the access-checking logic for classes and members, the compiler looks for deprecated attributes of classes and members being accessed, and issues warnings when the deprecated classes or members are used.
Note: A deprecation warning is suppressed if the compilation unit containing the deprecation is being compiled at the same time as the compilation unit using the deprecated class or member. This allows legacy APIs to be built without warnings. There currently is no other way to suppress the deprecation warnings.
JavaDoc also pays special attention to @deprecated tags when generating html files. Javadoc parses the entire paragraph following the @deprecated tag and moves it to the front of the description, placing it in italics and preceding it with a warning, "Note: foo is deprecated", in bold. It also adds "Deprecated" in bold to any index entries mentioning the deprecated entity.

How to Deprecate

To deprecate a class or method, use the @deprecated tag, as explained in How to Write Doc Comments for JavaDoc. The paragraph following the @deprecated tag should explain why the item has been deprecated and suggest how the user can avoid using it.

It is not necessary to deprecate individual members of a deprecated class, unless of course the programmer wants to explain some specific point about one member.

Note: Deprecation applies to classes and to individual members, not to their names. It is possible for a single method to have deprecated and non-deprecated overloadings. It is possible for a non-deprecated member to hide or override a deprecated one, which removes deprecation. It is the responsibility of the programmer to deprecate overrides of a deprecated method, if in fact they should be deprecated.
It is probably not good to specifically mention a timetable for phase-out of the deprecated API; this is a business decision that needs to be communicated other ways.

When a feature is deprecated, it is a good idea to notify the engineering organization of this fact, so that other engineers can respond to the change (pro or con) in a timely manner.


Miscellaneous changes to java.net

Miscellaneous changes to java.net worth mentioning:

Noteworthy bug fixes:

  • InetAddress
    A bug existed in JDK1.0.2 where one could not create an InetAddress out of a IP address String (e.g., "206.26.48.100") if a corresponding host name (e.g., "java.sun.com") could not be found. This resulted in an UnknownHostException. The bug is fixed in JDK1.1. Additionally, when an InetAddress is created from an IP address, the corresponding hostname is not looked up until specifically requested (via InetAddress.getHostName()), as a performance enhancement.
  • ServerSocket/DatagramSocket close()
    A bug existed in JDK1.0.2 where the close() method of ServerSocket and DatagramSocket were synchronized. The result was that if one thread were blocked indefinitely in DatagramSocket.receive() or ServerSocket.accept(), another thread couldn't break the blocking thread out by calling close(). This is fixed in JDK1.1 by making the close() methods unsynchronized.
  • URLConnection
    There was a bug in JDK1.0.2 where the methods on URLConnection:
    • setRequestProperty()
    • getRequestProperty()
    • getHeaderField()
    • getHeaderFieldInt()
    • getContentLength()
    • getDate()
    etc, did not work. These are fixed in JDK1.1.

Binding to local port/address:

  • Socket, ServerSocket, DatagramSocket
    These classes has overloaded constructors for binding to a specific local address and port. This is useful and necessary for applications like proxy servers that operate on multi-homed machines, and need particular control over which network interfaces are used.

MulticastSocket:

  • The MulticastSocket class was moved from package sun.net into the core API of java.net.

HttpURLConnection:

  • JDK1.1 introduces a new class, HttpURLConnection which extends URLConnection, and provides additional functionality specific to HTTP:
  • Ability to use all of the request methods with HTTP/1.1, like:
    • GET
    • POST
    • PUT
    • HEAD
    • TRACE
    • DELETE
    • OPTIONS
  • Control over whether to follow HTTP redirects.
David Brown
Last modified: Thu Dec 5 15:09:54 PST


Networking Features

Java

Networking

 Documentation Contents
Networking Enhancements for JavaTM 2 SDK, Standard Edition, v 1.3

New Classes/Interfaces

  • java.net.DatagramSocketImplFactory

    New interface java.net.DatagramSocketImplFactory is used by DatagramSocket to create actual socket implementations. This addition makes DatagramSocket consistent with the other socket types, by allowing the user to set the DatagramSocketImplFactory through a public API.

Modified Classes/Interfaces

  • java.net.HttpURLConnection

    The following constants were added to java.net.HttpURLConnection to make the HTTP status codes match the HTTP 1.1 RFC:

    • public static final int HTTP_INTERNAL_ERROR = 500;
    • public static final int HTTP_NOT_IMPLEMENTED = 501;

    Two new methods were added to support following HTTP redirects (requests with response code 3xx) on a per-instance basis. The default is to use the class setting.

    • public boolean getInstanceFollowRedirects()
    • public void setInstanceFollowRedirects(boolean followRedirects)

  • java.net.Socket and java.net.SocketImpl

    Two new methods have been added to java.net.Socket. Java sockets now support the keepalive option.

    • public boolean getKeepAlive(boolean)
    • public void setKeepAlive(boolean on)

    Two new methods have been added to java.net.Socket and java.net.SocketImpl. This change is to support TCP half-closed sockets:

    • public void shutdownInput()
    • public void shutdownOutput()

  • java.net.URL,java.net.URLConnection, and java.net.ContentHandler

    Several access methods have been added to make java.net.URL consistent with the fields of a URL as described in the latest IETF specification, RFC2396.

    • public String getAuthority()
    • public String getPath()
    • public String getQuery()
    • public String getUserInfo()
    • public set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)

    An overloaded getContent() method was added to java.net.URL, java.net.URLConnection, and java.net.ContentHandler to allow requesting that the returned content object support one of an ordered list of Java types. This allows mapping of MIME types to more than one possible Java type, and improves system flexibility.

    • varied implementation, see javadocs for each class.

    Static methods java.net.URLConnection.setDefaultRequestProperty() and java.net.URLConnection.getDefaultRequestProperty() are now deprecated.

  • java.net.URLDecoder

    The method java.net.URLDecoder.decode(String) no longer throws an exception.

  • java.net.URLStreamHandler

    Several new methods have been added to java.net.URLStreamHandler.

    These additions expose the concept of a handler's default port number and allow URL handlers to override aspects of URL equality and hashcode comparisons in URL protocol-specific ways. These changes enable cleaner access to the parsed component parts of a URL and enhance the ability of the various URL handlers to share common parsing code.

    • protected boolean equals(URL u1, URL u2)
    • protected getDefaultPort()
    • protected InetAddress getHostAddress(URL u)
    • protected int hashCode(URL u)
    • protected boolean hostsEqual(URL u1, URL u2)
    • protected boolean sameFile(URL u1, URL u2)
    • protected void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)

  • java.util.jar.JarFile and java.util.zip.ZipFile

    There is a new open mode for java.util.zip.ZipFile and java.util.jar.JarFile, which automatically deletes temporary (cached) files associated with each JarURLConnection when the Zip/Jar file opened in this mode is closed and the process exits. This is useful when downloading temporary jar files onto a local disk.

Miscellaneous Information

  • Added HTTP 1.1 client-side support and enhancements, such as http keepalives.
  • The SDK now does a better job of URL parsing by following RFC 2396 much more closely.

Copyright © 1996-99 Sun Microsystems, Inc. All Rights Reserved.

 Sun Microsystems, Inc
Java Software


New SocketExceptions in JDK1.1

Previously, all network errors in java raised a SocketException, which didn't provide enough information to decipher what went wrong. Was the connection refused by the remote machine (no one listening on that port)? Or was the host unreachable (connect attempt timed out)? JDK 1.1 adds three new classes that provide a finer granularity of reported errors:

  • java.net.BindException

    The local port is in use, or the requested bind address couldn't be assigned locally.
         public class BindException extends SocketException {
    ...
    }

  • java.net.ConnectException

    This exception is raised when a connection is refused at the remote host (i.e., no process is listening on that port).
         public class ConnectException extends SocketException {
    ...
    }

  • java.net.NoRouteToHostException

    The connect attempt timed out, or the remote host is otherwise unreachable.
         public class NoRouteToHostException extends SocketException {
    ...
    }

Simple Usage Examples:

  • On the Client Side:
    import java.net.*;
    ...
    Socket s = null;
    try {
       s = new Socket("foo.org", 80);
    } catch (UnknownHostException e) {
       // check spelling of hostname
    } catch (ConnectException e) {
       // connection refused - is server down? Try another port.
    } catch (NoRouteToHostException e) {
       // The connect attempt timed out.  Try connecting through a proxy
    } catch (IOException e) {
       // another error occurred
    }
  • On the Server Side:
    import java.net.*;
     ...
    ServerSocket ss = null;
    try {
        /* try to bind to local address 129.144.175.156 */
        InetAddress in = InetAddress.getByName("129.144.175.156");
        int port = 8000;
        int backlog = 5;
        ss = new ServerSocket(port, backlog, in);
    } catch (BindException e) {
        // port 8000 in use, or can't bind to 129.144.175.156 as a local address
    } catch (SocketException e) {
        // another error occurred
    }

    David Brown


Socket classes in JDK1.1

  • Socket
  • ServerSocket
  • DatagramSocket
  • MulticastSocket

David Brown
Last modified: Thu Dec 5 15:21:51 PST


Socket Options in Java

javadoc's of socket classes for JDK1.1 are here!

The C way

Programming in C, one sets options by using a system call along the lines of:
    setsockopt(int fd, int level, int optval, void *optdata,
           int optdatalen);

    fd = already opened (possibly connected) socket fd;
    level = level in the protocol stack (IP, UDP, TCP) where
            the option applies;
    optval = the option, a CONSTANT;
    optdata = ptr to option dependent struct of parameters relevant
             only to a particular option;

In java

The C way of setting options lacks the type-safety of object-oriented programming. The option one wishes to set/get is identified by an int, and the value to set/get into is an opaque void*. It is all too easy to pass the wrong option identifier, the wrong type object in the void* parameter, or the wrong for that parameter. Worse still, the code for these errors will typically compile, and the error will only be manifested at runtime.

Java now provides a type-safe way to set options. Each socket class has a get/set method for each option it supports, taking and returning the appropriate type. The options supported, for which socket classes and their meaning in brief:

  • TCP_NODELAY
    • Disable Nagle's algorithm.
    • Valid for (client) Sockets.
  • SO_LINGER
    • Specify a linger-on-close timeout.
    • Valid for (client) Sockets.
  • SO_TIMEOUT
    • Specify a timeout on blocking socket operations. (Don't block forever!)
    • Valid for all sockets: Socket, ServerSocket, DatagramSocket.
  • IP_MULTICAST_IF
    • Specify the outgoing interface for multicast packets (on multihomed hosts).
    • Valid for MulticastSockets.
Additionally, JDK1.1 provides new constructors to Socket, ServerSocket and DatagramSocket that allow the specification of a local address/port to which the socket should bind, and similarly these classes can divulge their local addresses.

Full javadoc's for the socket classes in JDK1.1 are provided here, including complete details on how to get/set all options. If there's other options you'd like to use from java tell us!

Fell by the wayside...

Some possible BSD options that are not supported in java:
  • SO_KEEPALIVE:
    With this option, the OS repeatedly pings the connection's peer to make sure it's still there. The conventional wisdom on this is that this functionality is best handled at the application level. The Host Requirements RFC specifies a ping interval of 2 hours, which is not practically useful.
  • MSG_OOB:
    This is really an option one passes to a read() or recv() on a socket to read data marked out-of-band or "urgent" if it present, before in-band data. If we include this we should also include an option SO_OOBINLINE (below), but this doesn't seem to be needed. The real complication against this is that we'd also have to provide a symmetrical way to write OOB data, and again this hasn't been requested.
  • SO_OOBINLINE:
    This option will inline OOB data, making it appear inline like "normal" data. It would work in conjunction with MSG_OOB.
  • RAW/ICMP SOCKETS:
    The main argument in favor of this one seemed to be so people could write "ping" in java. Security nightmare. Must be root on UNIX machines.

The implementation details...

...that you don't need to know, unless you subclass SocketImpl/DatagramSocketImpl. Every *Socket object has an underlying SocketImpl/DatagramSocketImpl that interfaces to native code. The Impl classes implement two methods to support options:
    void setOption(int optID, Object val) throws SocketException;
    Object getOption(int optID) throws SocketException;
that look much like C. These methods act as glue to the native methods, and ensure type safety before native methods are invoked.

brown@monkey.eng.sun.com


Extending Sockets in JDK 1.1

Some of the improvements to the java.net classes in JDK 1.1 allow sockets (Socket/ServerSocket) to be non-final, extendable classes. The basic goal is to allow extended sockets to be used whereever a base class Socket is used without rewriting application code. So for example an already-existing email client could be handed a subclass of Socket that does peer authentication or encryption, which the Socket subclass would handle transparently. Other examples include sockets that transparently use compression, or which add functionality such as mirroring traffic to multiple servers (e.g. using reliable ordered multicast).

This document has the following sections:

  • JDK 1.0: SocketImpl
  • JDK 1.1: Non-Final Socket and ServerSocket Classes
  • Socket: How to extend Socket
  • ServerSocket: How to extend ServerSocket

JDK 1.0: SocketImpl and SocketImplFactory

JDK 1.0 allows licensees to extend socket functionality in one very particular way: they can subclass java.net.SocketImpl , and provide an enhanced java.net.SocketImplFactory() which returns such classes as needed.

The SocketImpl/SocketImplFactory scheme is useful for, and was designed for, java apps/applications to be portable across environments that use different transport mechanisms. A client application that uses a java.net.Socket can work in the general case (where the runtime uses a PlainSocketImpl), as well as in environments where network connections must do something particular. For example, a java program should be able to work behind a firewall where connections to the Internet must be done through a proxy protocol, like SOCKS, assuming the right kind of SocketImpl is set for the java runtime in that environment.

Though the SocketImpl is useful for things like transparently providing proxy support to java apps, its utility is limited as a way to provide added functionality of network transport, or for layering other protocols on top of TCP. Additionally, it's only possible to have a single type of SocketImpl installed for a java runtime, which limits large-scale applications. It's cleaner and more intuitive to make ServerSocket and Socket extendable.

Note that the SocketImpl mechanism is designed to be orthogonal to the functionality provided by a subclass of Socket: for example, a subclass of Socket that is capable of doing compression on its streams would still want to use the system-default SocketImpl to get proxy support behind certain kinds of firewalls. The system-default SocketImpl can be thought of as an extension of the transport layer that applications needn't be aware of, and subclasses of Socket/ServerSocket provide richer functionality at the application layer.

Change in JDK 1.1

In JDK 1.1, Socket and ServerSocket are made non-final, which is a pretty simple change. The one basic caveat is that subclasses do not have direct access to the underlying SocketImpl in the base classes, primarily for security reasons. But other than that, subclasses of Socket/ServerSocket inherit and can override methods from their superclass.

The JDK changed by:

  • Removing the final modifier from the Socket and ServerSocket classes.
  • Reattaching that final modifier only to methods where it is needed to avoid bypassing security manager calls.
  • Defining a new method in ServerSocket with signature: protected final void implAccept(Socket client) to use when initializing a newly accepted socket.
  • Exposing a default Socket constructor so that Socket subclasses could initialize their superclass without doing an actual connection in the superclass. This is also required so that a ServerSocket subclasses can return the correct Socket subclass from accept() (e.g., FooServerSocket.accept() returns a FooSocket)

Changes to Socket

The public constructors to Socket of the general form:

    Socket(String host, int port) {
      ...
    }
can be used by subclasses to initialize the superclass, but they will also create a system-default SocketImpl and connect it to the specified host, port. Socket also has two protected constructors to intialize the superclass without connecting the Socket:
    protected Socket() {
      /* install system-default SocketImpl */
      ...
    }

    protected Socket(SocketImpl impl) {
      this.impl = impl;
    }
The first constructor installs a system-default SocketImpl (either from the factory or a PlainSocketImpl). The second allows for a subclass of Socket to install its own impl if need be. If the Socket subclass doesn't need the default SocketImpl, it's perfectly valid to use the second constructor and pass it null. (But in this case the subclass should of course override all the base class methods, since they all rely on the underlying SocketImpl).

Changes to ServerSocket

Subclasses of ServerSocket also have a protected constructor exposed to them that creates a default SocketImpl in the base class, but doesn't otherwise initialize it (e.g., doesn't call impl.create(), impl.bind() or impl.listen()). The public constructors of ServerSocket will initialize the underlying SocketImpl.

    protected ServerSocket() {
      /* install system-default SocketImpl */
      ...
    }
The only other thing about extending ServerSocket that should be explained is how to override accept() when the underlying SocketImpl for Socket/ServerSocket isn't accesible to subclasses. Since the base class can do this, ServerSocket has a method to make the necessary calls on the underlying SocketImpl's on behalf of subclasses:
public class ServerSocket {
    ...
    protected final void implAccept(Socket s) throws IOException {
       ...
       // on return from this call s will be connected to a client
    }
    ...
Note that subclasses of Socket/ServerSocket that don't use a SocketImpl needn't use this method. As an example of how this works, here's what some SSL code might look like.

class SSLServerSocket extends ServerSocket {
    ...
    public Socket accept () throws IOException
    {
    SSLSocket s = new SSLSocket (certChain, privateKey);
    // create an unconnected client SSLSocket, that we'll
    // return from accept

    implAccept (s);
    s.handshake ();
    return s;
    }
    ...
}

class SSLSocket extends java.net.Socket {
    ...
    public SSLSocket(CertChain c, PrivateKey k) {
    super();
    ...
    }
    ...
}

Last Modified: 21 August, 1996
David Brownell
David Brown


New Features in Java 2D

Java

New Java 2DTM Features in the
JavaTM 2 SDK, v1.3

Documentation Contents
Although the Java 2 SDK, v1.3 is an upgrade release, several significant features have been added to the Java 2DTM API in this release, including:

Multiple monitor support Palette entry validity checking
PNG support Access to a ColorModel's transfer type
Dynamic font loading New ICC Profile Tags
BasicStroke pixel-adjustment hint Improved paragraph balancing and hyphenation
Equation-solving methods Precise bounding box calculations
  • Multiple Monitor Support
    You can now render on multiple screens by creating Frame, JFrame, Window, or JWindow objects with the GraphicsConfiguration of the target GraphicsDevice.

    The new Frame constructor, Frame(GraphicsConfiguration), enables creation of a Frame object on a different screen device.

    The new Window constructor, Window(Window, GraphicsConfiguration), constructs a new invisible window with the specified window as its owner and the GraphicsConfiguration of a screen device.

    The new GraphicsConfiguration getBounds method returns the bounds of the GraphicsConfiguration in device coordinates. If you have a virtual device, then the device coordinates returned from getBounds are virtual device coordinates.

    Finally, the new Component getGraphicsConfiguration method returns the GraphicsConfiguration with which the Component was created.

    In a virtual device configuration consisting of more than one physical screen device, the GraphicsConfiguration objects' coordinates are relative to the virtual coordinate system. For this reason, virtual coordinates must be used when calling the setLocation method of a Frame or Window. Similarly, calling getBounds of a GraphicsConfiguration in a virtual device environment returns virtual device coordinates.

    The following code sample creates a JFrame object for each GraphicsConfiguration on each screen device in the GraphicsEnvironment. It offsets the coordinates of the intended location of the JFrame with the bounds of the GraphicsConfiguration to ensure that the JFrame appears on the screen of the specified GraphicsConfiguration.

            GraphicsEnvironment ge = GraphicsEnvironment.
                                 getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j
    If the bounds of a GraphicsConfiguration is not
    taken into account in this sample, a JFrame
    would appear at location (i*50, i*60) on the primary screen,
    which might be different than the screen of the specified
    GraphicsConfiguration.

    For more information on how the Java 2D API supports
    multi-screen environments, see
    Rendering in a Multi-Screen Environment in the
    Programmer's Guide to the
    Java 2D API.
  • PNG Support

    The PNG (Portable Network Graphics) format is a flexible, extensible, non-proprietary file format that represents lossless and portable storage of raster images. PNG supports grayscale, indexed-color, and truecolor images and an optional alpha channel.

    PNG images are loaded and drawn the same way as GIF and JPEG images in the Java 2DTM API.

  • Dynamic font loading
    The new method Font.createFont(int, InputStream) provides the ability to add fonts to the JavaTM 2 Virtual Machine* (JVM) at runtime. This font is not persistent upon termination of the JVM and is only available to the creator of the Font. At this time, only TrueTypeTM fonts can be created at runtime.

    The following code sample illustrates how to dynamically load the TrueType font Arial from a file:

        File file = new File("Arial.ttf");
    FileInputStream fis = new FileInputStream(file);
    Font font = Font.createFont(Font.TRUETYPE_FONT, fis);
    Similarly, to load the font from a URL:
        URL url = new URL("Arial.ttf");
    InputStream is = url.openStream();
    Font font = Font.createFont(Font.TRUETYPE_FONT, is);
  • BasicStroke pixel-adjustment hint
    In some releases of the JavaTM 2 SDK, v 1.2, the BasicStroke object automatically translated any lines drawn with it by (0.5, 0.5) in user space coordinates. This translation was performed so that the line would be centered on the pixels and exactly cover whole pixels. By completely covering whole pixels, the line would look the same whether or not antialiasing was applied. The translation bias also ensured the output to a screen and a printer was consistent.

    Unfortunately, the translation bias produced unexpected results in some cases. For example, when the coordinate system was scaled up significantly, a stroked line that enclosed a filled shape would not be exactly centered on the edge of the shape, as you might expect.

    Although this feature was included in some beta releases of the Java 2 SDK, v 1.2, it was not implemented in the FCS release.

    In the Beta release of the Java 2 SDK, v1.3, three new BasicStroke constructors allowed programmers to specify the translation bias. These constructors have since been removed because of a backwards compatibility problem.

    For the FCS release of the Java 2 SDK, v1.3, these constructors are replaced with a set of hints in the RenderingHints class that are used to perform stroke normalization:

    The KEY_STROKE_CONTROL hint key and these hint values:
    VALUE_STROKE_NORMALIZE
    VALUE_STROKE_DEFAULT
    VALUE_STROKE_PURE

    The VALUE_STROKE_NORMALIZE hint indicates that normalization is performed. Normalization improves the consistency of the appearance of a stroke whether or not antialiasing is applied to it and wherever the stoke is rendered on the pixel grid.

    The VALUE_STROKE_PURE hint indicates that no normalization is performed. Use this hint when you prefer that the rendering of your geometry is accurate rather than visually consistent.

    Use the VALUE_STROKE_DEFAULT hint if you have no preference whether or not a stroke is normalized.

    To normalize a stroke for consistency, call the setRenderingHint(Key, Object) method of the Graphics2D class with the KEY_STROKE_CONTROL hint key and the VALUE_STROKE_NORMALIZE hint value:

        Graphics2D g2 = (Graphics2D) g;
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
        RenderingHints.VALUE_STROKE_NORMALIZE);
    See the Java 2D-Interest list posting, Basic Stroke offset and change of plans, for more information about this new API and why it has replaced the BasicStroke constructors added with the Beta release of the Java 2 SDK, v1.3.
  • Palette Entry Validity Checking
    When you create an off-screen image for an 8-bit display on X Windows, the palette of available colors contained in the returned IndexColorModel object could have invalid color entries. The invalid entries are filled with transparent black. Before the Java 2 SDK, v1.3, there was no way to determine which entries in the palette were valid. Two new methods and one new constructor enable you to determine the validity of the indices in the lookup table:

    • IndexColorModel(int, int, int[], int, int, BigInteger) is a constructor that allows you to specify the validity of each pixel in the cmap array.
    • isValid(int pixel) determines the validity of a single pixel.
    • getValidPixels returns a BigInteger indicating the valid and invalid pixels in the colormap.
  • Access to a ColorModel's Transfer Type
    The new ColorModel getTransferType method allows you to retrieve the transferType of the current ColorModel. The transferType is the data type of the array that is used to represent pixel values. Since transferType is a protected field, you need to get the transferType of the current ColorModel if you want to create a new ColorModel object identical to the current one except for a few parameters.
  • New ICC Profile tags
    The ICC_Profile class has three new profile tags that bring the Java 2D API into compliance with the latest International Color Consortium profile specification, ICC.1:1998-09, and addendum, ICC.1A:1999-04:

    • icSigDeviceSettingsTag
    • icSigOutputResponseTag
    • icSigChromaticityTag
  • Improved paragraph balancing and hyphenation
    The TextMeasurer class enables more precise control over line breaking than the LineBreakMeasurer class. With TextMeasurer, you can determine where to break a line of text and perform paragraph balancing and hyphenation.
  • Equation-solving methods
    Two new methods have been added to the Java 2D API that solve algebraic equations given an array containing the coefficients and store the results of the solution into a separate array.

    In the JavaTM 2 SDK, version 1.2.2, there are only methods that return the results of these equations in the same array that contained the coefficients. The new methods preserve the coefficients array by storing the results in a separate array.

    The solveQuadratic(double[], double[]) method of QuadCurve2D solves quadratic equations.

    The solveCubic(double[], double[]) method of CubicCurve2D solves cubic equations.

  • Precise bounding box calculations
    New implementation has been added to the getBounds and getBounds2D methods of the Area class that calculates a tighter bounding box of a shape.

    The bounding box returned from these methods in the Java 2 SDK, version 1.2.2 is a looser bounding box because the control points are taken into account when the bounds of the geometry is calculated. The new getBounds and getBounds2D methods do not factor in the control points to the bounds calculation.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java2d-comments@sun.com 		Sun Microsystems, Inc
Java Software


Improvements to Program Execution Speed

 Documentation Contents
The following are some of the changes made to improve the program execution speed and general runtime performance of the Java 2 SDK and Java 2 Runtime Environment. Links to relevant bug reports on the BugParade web site are provided were applicable for further information.

  • Improved Performance for readUTF and writeUTF - The implementations of the readUTF and writeUTF methods of DataInputStream and DataInputStream have been modified to improve performance. This is a fix for bug number 4219771 on the BugParade web site.

  • Improved Performance of JScrollPane Painting - The implementation of JScrollPane has been improved so that it does not cause excessive painting and screen flashing when double buffering is not used.

  • Improved JTable Performance - The performance of the JTable's column-handling functionality has been improved. Previously, the performance of the operations of adding columns or recalculating column widths did not scale well as the number of columns became large. The implementation has been changed to improve scalability. This is a fix for bug number 4223642 on the BugParade web site.

  • Paint Coalescing - Painting performance has been enhanced through the implementation of an improved paint coalescing algorithm. Areas that require repainting are coalesced into a single, non-rectangular repaint area as they are posted to the event queue. This has the effect batching repaints, executing multiple repaints simultaneously in a manner more efficient than in previous releases.

  • Frame Resizing - Resizing of top-level frames has been improved.

  • Internal Frame Blitting - By using Graphics.copyArea calls, Swing's DefaultDesktopManager now needs to redraw far less when frames are dragged.

  • Performance Enhancements in BigIntenger - Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on the Plumb C library. The new implementation performs all standard operations much faster than the old implementation. The speed-up realized in the new implemenation can be as much as 5x or more, depending on the operation being performed.

  • Provision for Better-Performing Numeric Operations - The Java 2 Platform now contains two classes which provide API for performing general numeric operations.
    • java.lang.StrictMath - Class java.lang.StrictMath is a renaming of class java.lang.Math from previous versions of the Java platform, but otherwise retains the previous specification of Math. In particular, it is defined to return bit-for-bit reproducible results in all implementations.
    • java.lang.Math - Class java.lang.Math provides the same set of API as does class StrictMath. However, unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results, but can vary within specified constraints. This relaxation permits better-performing implementations where strict reproducibility is not required.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@eng.sun.com 		Sun


Improvements to Startup Time and Memory Footprint

Java

Improvements to Startup Time
and Memory Footprint

 Documentation Contents
The following are some of the changes and have helped to reduce startup time and decrease the amount of memory used by the JavaTM 2 SDK and Java 2 Runtime Environment.
  • Swing Class Loading - In version 1.3, loading of some Swing classes is delayed until they are actually needed by the runtime environment. In version 1.2, Swing classes were loaded at startup regardless of whether the classes were needed immediately. This change reduces startup time.

  • JAR File Memory Usage Rection - The way JAR files are indexed in memory has been improved so that the memory cost of loading a JAR file has been greatly reduced. The class libraries in rt.jar, for example, occupied about 420 KB of memory when loaded in version 1.2, but require only about 100 KB in version 1.3.

  • JTable - In version 1.3, loading of international date and number formatting code by JTable is deferred until the internationalization code is needed by the runtime environment. In version 1.2, class JTable loaded the intenationalization code at startup, even if it was not needed immediately. This change reduces startup time.

  • Size of DLLs Reduced - In version 1.3, the size of DLL libraries have been reduced in terms of memory footprint (by about 280 KB) and download size (by about 250 KB), with no detrimental effect on execution speed.

  • Remove Dependencies on Seldom-Used DLLs - In version 1.3, DLLs that handle dialog boxes and drag-and-drop functionality are loaded only if they are actually needed. In version 1.2, some of these libraries were loaded at startup regardless of whether they would ever be used. This change reduces startup time.

  • Reduce Memory Footprint Associated with Strings - In version 1.3 of the SDK, java.lang.String has been modified to load the relatively small java.io.ObjectStreamField class for handling serialization requirements. In 1.2, String loaded the much larger java.io.ObjectStreamClass for this purpose.

  • The size of internal VM datastructures used by the client virtual machine have been reduced.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun


Java HotSpot(TM) Client and Server Virtual Machines

Java

The Java HotSpotTM Client and Server Virtual Machines

 Documentation Contents
Two implementations of the Java virtual machine are available for J2SE 1.3:
Java HotSpotTM Client VM
Java HotSpot Server VM
The Solaris and Linux versions of J2SE 1.3 ship with both VM implementations. The Win32 version of J2SE 1.3 contains only the Java HotSpot Client VM. The Java HotSpot Server VM for Win32 platforms is available as a separate download from the Java HotSpot web site.

Some features of Java HotSpot technology, common to both VM implementations, are the following.

  • Adaptive compiler - Applications are launched using a standard interpreter, but the code is then analyzed as it runs to detect performance bottlenecks, or "hot spots". The Java HotSpot Client VM compiles those performance-critical portions of the code for a boost in performance, while avoiding unnecessary compilation of seldom-used code (most of the program). The Client VM also uses the adaptive compiler to decide, on the fly, how best to optimize compiled code with techniques such as in-lining. The runtime analysis performed by the compiler allows it to eliminate guesswork in determining which optimizations will yield the largest performance benefit.

  • Improved memory allocation and garbage collection - The Java HotSpot Client VM allocates memory for objects more quickly than the classic virtual machine. The Client VM also has a state-of-the-art garbage collector that is faster and more efficient than the garbage collector of the classic VM.

  • Thread synchronization - The Java programming language allows for use of multiple, concurrent paths of program execution (called "threads"). The Java HotSpot Client VM provides a leaner, speedier thread-handling capability that is designed to scale readily for use in large, shared-memory multiprocessor servers.
More information about Java HotSpot technology can be found in
  • Java HotSpot Architeture white paper
  • Java HotSpot VM FAQ
  • The Java HotSpot Server VM: The Solution for Reliable, Secure Performance for the Enterprise

The Java HotSpot Client VM

 The Java HotSpot Client Virtual Machine* serves as a replacement for both the "classic" virtual machine and the Just-in-time (JIT) compilers used by previous versions of the Java 2 SDK to offer improved runtime performance for applications and applets. The Java HotSpot Client VM has been specially tuned to reduce application start-up time and memory footprint, making it particulary well suited for client environments.

On all platforms, the Java application launcher (the java utility) will use Java HotSpot Client VM by default when launching applications. For more information, see

  • Java application launcher reference page
  • Appletviewer reference page

Java HotSpot Server VM

The Java HotSpot Server VM is similar to the Java HotSpot Client VM, except that it has been specially tuned to maximize peak operating speed. It is intended for running long-running server applications, for which having the fastest possible operating speed is generally more important than having the fastest possible start-up time.

The Solaris and Linux versions of J2SE 1.3 ship with the Java HotSpot Server VM pre-installed. The Java HotSpot Server VM for Win32 platforms is available as a separate download from the Java HotSpot web site.

To invoke the Java HotSpot Server VM rather than the default Java HotSpot Client VM, use the -server option of the Java application launcher. For example:

java -server MyApp

See Also

  • Performance FAQ (on the java.sun.com web site)
  • Java HotSpot VM Options (on the java.sun.com web site)
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@eng.sun.com 		Sun


OJI Fetures

OJI Features

home | overview | plug-in | oji | security

This section describes the primary features of OJI.

Note:

  • Other than any changes noted below, all features of previous versions of Java Plug-in continue to work in this release;
  • The purpose of OJI is to enable Netscape 6, which is the target of this release of Java Plug-in.

APPLET, EMBED AND OBJECT Tag Support in OJI

OJI provides support so that applets using these tags can launch the Java Plug-in. For information on how to use the OBJECT or EMBED tag to lauch an applet, see the Java Plug-in HTML Specification.

Java-JavaScript Bi-directional Communication

JavaScript can access the methods of applets, and applets can access the Document Object Model (DOM) through JavaScript. Thus an HTML author can access applet methods and applet developers can access the DOM.

See How Java-to-JavaScript Communication Works in Java Plug-in and Security: LiveConnect.

RSA Signed Applet Verification

RSA signed applet verification continues to be supported in this release through the Java Plug-in.

See Netscape Object Signing, How to Sign Applets Using RSA Certificates and Security: RSA Signed Applets.

Display of Java Console

OJI allows the user to display the Java Console through the Netscape 6 browser menu: Tasks>Tools>Java Console.

Enable/Disable Java

OJI allows enabling/disabling Java through the Netscape 6 browser menu: Edit>Preferences>Advanced. Note that to take effect, the browser must be restarted.

Applet Lifecycle Change

Whenever a page is visited, the init() and start() methods of the applet are called; and whenever the page is left, the stop() and destroy() methods may be called.

Proxy and Cookie Support

Previously, Java Plug-in handled proxy and cookie support. OJI moves that support to the browser.

HTTPS Through Netscape 6

As in previous releases of Java Plug-in, HTTPS support will be provided by the browser.

Automatic Download

Via its XPInstall mechanism, Netscape 6 will support automatic download of Java Plug-in (JRE) if it is not present.

Backward Compatibility Issue

Although Sun has tried to ensure backward compatibility as much as possible between Java 2 and the Netscape VM, it may not be 100%. Some applets may run as is; other may only need recompilation; others, however, may need to be ported to Java 2.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-plugin-feedback@java.sun.com 		Sun Microsystems, Inc
Java Software


Overview

home | overview | plug-in | oji | security

Beginning with version 1.3.0_01, the Java Plug-in supports Netscape 6. Java Plug-in is part of the Java 2 Standard Edition. Netscape 6, with the Open JVM Interface (OJI) developed by Sun, allows any Sun-compliant JVM that implements the interface to become the default JVM for the browser.

Sun's Java Plug-in implementation provides full applet support in Netscape 6, and its many enhancements facilitate applet migration from Netscape 4.x browsers to Netscape 6. Java Plug-in may also be used with Microsoft Internet Explorer and Netscape 4.x.

This document discusses usability enhancements to Sun's Java Plug-in; the primary features of OJI; and security.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-plugin-feedback@java.sun.com 		Sun Microsystems, Inc
Java Software


Java Plug-in Enhancements

Java Plug-in Usability Enhancements

home | overview | plug-in | oji | security

This section discusses usability enhancements made to Java Plug-in beginning with the Java 2 Standard Edition 1.3.0_01 release. Most are aimed at making applet debugging easier.

Unified Message Dialogs

All messages are displayed in a dialog box with a unified look and feel. This includes error, warning and general messages. The following is an example of a null pointer exception dialog:

Enhanced Error Reporting

Much more information about error conditions is reported in this release of Java Plug-in. Previously, most errors failed silently, which made debugging difficult.

Error condition handling is provided for the following:

  1. RSA signed applet verification
  2. Java optional package installation
  3. Applet caching
  4. Proxy support
  5. Java Plug-in Control Panel

Enhanced Applet Lifecycle Exception Reporting

In the previous version of Java Plug-in, when an applet threw an exception the Java Console had to be open to view the stack trace. In this release, even when the Java Console is not opened, Java Plug-in shows a dialog box with all exception detail whenever there is an exception in an applet's init(), start(), stop()or destroy() method. This feature is disabled by default but can be turned on by checking the "Track Lifecycle Exception" check box in the Basic Tab of the Java Plug-in Control Panel.

The Java Plug-in Control Panel is accessed through the Windows Control Panel, as shown below:

Note the two versions of the Java Plug-in shown above.

Double-click the icon for the version of Java Plug-in whose Control Panel you want to view. The Java Plug-in Control Panel looks like this:

Java Console Enhancements

The following enhancements have been made to the Java Console:

Swing-based

The Java Console in the previous Java Plug-in used an AWT implementation. However, when many messages were displayed, they often flooded the Console window, and the native AWT widget was unable to handle the task. In this version, the Java Console has been converted to Swing to eliminate the problem.

Debugging Support

In the previous version of Java Plug-in, Java Console provided only a simple way to show System.out and System.err for debugging of applets. This was inadequate. The new version provides the options as shown below in the Java Console:

An action/option is selected by typing its letter/number while the Java Console window has focus.

Key | Description
c: | Clears the Java Console window.
f: | Triggers finalization on the objects in the finalization queue and then displays memory information. Memory refers to the current heap size used by the JRE. Free is the available memory that is free in the heap. The percent (xx%) is the free memory as a percent of the total heap size.
g: | Triggers garbage collection and displays memory information as described above.
h: | Displays help message, which is being described here.
l: | Displays a list of the cached ClassLoader objects in the Java Plug-in. (These are runtime objects and should not be confused with the cached JAR files mentioned at the end of this chapter.) Classes are cached to avoid having to load them again when returning to previously-visited pages. When a page is visited the first time, a ClassLoader object will be created and all of the classes that are downloaded will be cached in that object. These objects are created and cached according to their codebase. To identify a ClassLoader object, the "classloader list" displays the codebase for that object. Additional information displayed with a ClassLoader object includes zombie, cache and info. zombie = true indicates that a ClassLoader object is not being used (i.e., the applet is not currently loaded on the page). cache = true indicates that the applet should be cached, while false indicates that the applet will be destroyed when the page is left. info is a value used for debugging.
m: | Displays heap memory usage as described above.
q: | Causes the Java Console to disapper from the main screen.
s: | Prints out the system properties. This is mostly for debugging.
t: | Prints out all the existing thread groups. The first group shown is Group main. ac stands for active count; it is the total number of active threads in a thread group and its child thread groups. agc stands for active group count; it is the number of active child thread groups of a thread group. pri stands for priority; it is the priority of a thread group. Following Group main, other thread groups will be shown as Group <name>, where name is the URL associated with an applet. Individual listings of threads will show the thread name, the thread priority, alive if the thread is alive or destroyed if the thread is in the process of being destroyed, and daemon if the thread is a daemon thread.
x: | This removes (destroys) all ClassLoader objects in the cache.
0-5: | This sets the trace-level options as described below under Enhanced Java Plug-in Tracing.

Task-Bar Integration

When Java Plug-in is running an icon is now displayed — in the taskbar for Windows or on the desktop for Solaris. When clicked, the Java Console opens. This allows the user to open and close the Java Console any number of times within the same browser session. The Java Plug-in version may also be checked from the icon in the Windows taskbar. This enhancement applies to both Netscape and Internet Explorer.

Enhanced Java Plug-in Tracing

In the previous version of Java Plug-in, tracing could be turned on by enabling the property javaplugin.trace. However, it turned on all tracing facilities inside Java Plug-in, and messages often flooded the Java Console. In this version, tracing control is more fine-grained. A new property, javaplugin.trace.option, has been introduced. You can set trace-level options (0-5) in the Java Console, shown above, with the following meanings:

  • 0 — off
  • 1 — basic
  • 2 — network and basic
  • 3 — security, network and basic
  • 4 — extension, security, network and basic
  • 5 — LiveConnect, extension, security, network and basic

This enables tracing on the fly.

Another way to set fine-grained tracing is through the Java Plug-in Control Panel, also shown above. For instance, to enable tracing for everthing (option 5 above), enter the following in the "Java Run Time Parameters" textfield:

-Djavaplugin.trace=true
-Djavaplugin.trace.option=basic|net|security|ext|liveconnect

Tracing set through the Control Panel will take effect when the Plug-in is launched, but changes made through the Control Panel while a Plug-in is running will have no effect.

Enhanced Applet Progress Reporting

Previous to this release, applet status reporting was minimal in the applet display area (gray box) of the browser. This enhancement provides much more detail about what is happening (init() method being called, JAR downloading, ...). This will not only aid developers in applet debugging but keep users better informed about applet status. For example, shown below is applet status reporting for Sun's Animator Applet as it loads:

Applet progress status is shown in a non-blocking fashion, making the browser UI more responsive.

Delete Option for Cached Plug-in Files

With the JAR caching feature (available since 1.3), redundant downloads can be avoided and applets can be run offline. But since a user may want to delete the cached files at some time, an option exists in the Java Plug-in Control Panel for deleting the cached files. A user can push the "Clear JAR Cache" button to delete the JAR cache.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-plugin-feedback@java.sun.com 		Sun Microsystems, Inc
Java Software


Security Considerations

Security

home | overview | plug-in | oji | security

There are three security-related areas in OJI:

  • RSA Signed Applets
  • HTTPS
  • LiveConnect

For general information about security and applets, see Java Plug-in Security.

RSA Signed Applets

Previous to Netscape 6, Netscape had its own security model and its own signing method called Netscape Object Signing. The Object-Signing Tools could be used to sign a Java applet so that it could be executed in the JVM. Netscape also provides a set of Java classes, netscape.security, that is used by the applet to enable security in the browser.

In Netscape 6, two mechanisms may be used for applet signing:

  • JAR signing in the JDK through an RSA certificate (see How to Sign Applets Using RSA Certificates)
  • Netscape Object Signing

In Netscape 4 an applet must call into the netscape.security package to enable a privilege — even if the applet is signed. If it does not, it will be treated as untrusted. Thus applet signing and granting of privileges are treated separately.

In Netscape 6, signed applets are directly supported by the Java Plug-in. When the browser encounters a signed applet, a security dialog is automatically popped up. The applet does not have to call any method to enable privileges; privileges are already enabled.

However, so that Netscape 4 applets will continue to work in Netscape 6, a stub class for the netscape.security package has been included. The stub class does nothing other than allow the applet to load into Java Plug-in as though it were loading in Netscape 4.

HTTPS

With this release of Java Plug-in, HTTPS is completely handled by the browser. Thus, anything related to HTTPS, such as the service certificate, can be configured through the browser.

LiveConnect

LiveConnect allows bi-directional communication between Java and JavaScript. But such communication can present security problems. For instance, suppose an applet and a web page originate from different hosts. Without a security policy, the applet might request sensitive information from a page through a call to JavaScript. Since an applet is allowed to connect to any host, it might then send such information out over the network in an irresponsible manner. A security policy has been implemented to prevent such actions from occurring.

Each direction of communication is considered separately below.

JavaScript-to-Java Communication

In JavaScript-to-Java communication, a call from JavaScript to an applet is allowed only if one or both of the following is true:

  1. The origin (URL) of the page is the same as the origin of the applet;
  2. JavaScript is signed and UniversalBrowserRead permission is enabled for JavaScript.

Without 1 or 2 being true, no call will be allowed from JavaScript to Java.

Given that a call is allowed, then there are two possibilities: JavaScript will have default or all permissions.

Permissions are determined by checking JavaScript signing:

  • If JavaScript has UniversalJavaPermissions, then it will be granted all permissions.
  • If JavaScript does not have UniversalJavaPermissions, then permissions will depend on local Java policy, which is set by the JRE in the browser. Local Java policy will consider the origin of the JavaScript, determine a set of permissions based on origin, then perform actions on the Java side accordingly.

Note that to access an applet from JavaScript, the applet tag will need to specify an ID or NAME attribute.

Java-to-JavaScript Communication

A call from Java to JavaScript is allowed only if the applet and JavaScript have the same origin.

Assuming the above condition is met, the applet is checked for its permissions. If it has all, then JavaScript will perform the requested actions. If the applet does not have all permissions, then JavaScript checks the origin of the applet and the SecurityManager of the browser then determines what actions the JavaScript engine may perform.

Note that to access JavaScript, Java does so through an instance of the netscape.javascript.JSObject class. For more information, see How Java-to-JavaScript Communication Works in Java Plug-in.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-plugin-feedback@java.sun.com 		Sun Microsystems, Inc
Java Software


Suppressing Reflective Access Control

Java Documentation Contents
Certain sophisticated clients of the Java Core Reflection API require a means to suppress default Java language access control checks when using reflected members and constructors. These checks--for public, default (package) access, protected, and private members--are performed when Fields, Methods or Constructors are used to set or get fields, to invoke methods, or to create new instances of classes, respectively.

Examples of such clients are the Java Object Serialization service, development tools such as object inspectors and debuggers, and other applications such as database persistence mechanisms.

SOLUTION

In Java 1.2, a Field, Method or Constructor object may be explicitly flagged as suppressing default Java language access control. When the reflective object is used, this flag--a new instance field--is consulted as part of access checking. If the flag is true, access checks are disabled and the requested operation proceeds; otherwise, normal access checks are performed as in Java 1.1. The flag is false by default in a reflected member or constructor.

The act of setting the flag is security-checked using the new Java 1.2 security mechanisms. A client's calling context must have sufficient privilege to perform this operation.

Thus, in Java 1.2 each concrete reflected class (Field, Method and Constructor) extends a new base class, AccessibleObject, defined below. This class provides the necessary state and methods to set and get an "accessible" flag for a reflected object. A new ReflectPermission class, also defined below, provides the ability to grant the necessary permission via the security policy file.

PROGRAMMING INTERFACE

package java.lang.reflect;
/**
 * The AccessibleObject class is the base class for Field, Method and
 * Constructor objects.  It provides the ability to flag a reflected
 * object as suppressing default Java language access control checks
 * when it is used.  The access checks--for public, default (package)
 * access, protected, and private members--are performed when Fields,
 * Methods or Constructors are used to set or get fields, to invoke
 * methods, or to create and initialize new instances of classes,
 * respectively.
 *
 * <p>Setting the <tt>accessible</tt> flag in a reflected object
 * permits sophisticated applications with sufficient privilege, such
 * as Java Object Serialization or other persistence mechanisms, to
 * manipulate objects in a manner that would normally be prohibited.
 *
 * @see Field
 * @see Method
 * @see Constructor
 * @see ReflectPermission
 *
 * @since JDK1.2
 */
public
class AccessibleObject {

    /**
     * Convenience method to set the <tt>accessible</tt> flag for an
     * array of objects with a single security check (for efficiency).
     *
     * @param array the array of AccessibleObjects
     * @param flag the new value for the <tt>accessible</tt> flag in each object
     * @throws SecurityException if the request is denied
     */
    public static void setAccessible(AccessibleObject[] array, boolean flag)
    throws SecurityException;

    /**
     * Set the <tt>accessible</tt> flag for this object to
     * the indicated boolean value.  A value of <tt>true</tt> indicates that
     * the reflected object should suppress Java language access
     * checking when it is used.  A value of <tt>false</tt> indicates
     * that the reflected object should enforce Java language access checks.
     *
     * @param flag the new value for the <tt>accessible</tt> flag
     * @throws SecurityException if the request is denied
     */
    public void setAccessible(boolean flag) throws SecurityException;

    /**
     * Get the value of the <tt>accessible</tt> flag for this object.
     */
    public boolean isAccessible();

    /**
     * Constructor: only used by the Java Virtual Machine.
     */
    protected AccessibleObject();

}

package java.lang.reflect;

/**
 * The Permission class for reflective operations.  A
 * ReflectPermission is a <em>named permission</em> and has no
 * actions.  The only name currently defined is <tt>access</tt>,
 * which allows suppressing the standard Java language access checks
 * --for public, default (package) access, protected, and private
 * members--performed by reflected objects at their point of use.
 *
 * <p>An example of permitting the identity "Duke" to suppress the
 * language access checking for reflected members might be:
 * <code>
 *	grant signedBy "Duke" {
 *		java.lang.reflect.ReflectPermission "access";
 *	}
 * </code>
 *
 * @see java.security.Permission
 * @see java.security.BasicPermission
 * @see AccessibleObject
 * @see Field#get
 * @see Field#set
 * @see Method#invoke
 * @see Constructor#newInstance
 *
 * @since JDK1.2
 */
public final
class ReflectPermission extends java.security.BasicPermission {

    /**
     * Constructs a ReflectPermission with the specified name.
     *
     * @param name the name of the ReflectPermission
     */
    public ReflectPermission(String name);

    /**
     * Constructs a ReflectPermission with the specified name and actions.
     * The actions should be null; they are ignored.
     *
     * @param name the name of the ReflectPermission
     * @param actions should be null.
     */
    public ReflectPermission(String name, String actions);
}

Copyright © 1995-97 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Dynamic Proxy Classes

 Documentation Contents

Contents

Introduction
Dynamic Proxy API
Serialization
Examples

Introduction

A dynamic proxy class is a class that implements a list of interfaces specified at runtime such that a method invocation through one of the interfaces on an instance of the class will be encoded and dispatched to another object through a uniform interface. Thus, a dynamic proxy class can be used to create a type-safe proxy object for a list of interfaces without requiring pre-generation of the proxy class, such as with compile-time tools. Method invocations on an instance of a dynamic proxy class are dispatched to a single method in the instance's invocation handler, and they are encoded with a java.lang.reflect.Method object identifying the method that was invoked and an array of type Object containing the arguments.

Dynamic proxy classes are useful to an application or library that needs to provide type-safe reflective dispatch of invocations on objects that present interface APIs. For example, an application can use a dynamic proxy class to create an object that implements multiple arbitrary event listener interfaces-- interfaces that extend java.util.EventListener-- to process a variety of events of different types in a uniform fashion, such as by logging all such events to a file.

Dynamic Proxy Class API

A dynamic proxy class (simply referred to as a proxy class below) is a class that implements a list of interfaces specified at runtime when the class is created.

A proxy interface is such an interface that is implemented by a proxy class.

A proxy instance is an instance of a proxy class.

Creating a Proxy Class

Proxy classes, as well as instances of them, are created using the static methods of the class java.lang.reflect.Proxy.

The Proxy.getProxyClass method returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces. The proxy class will be defined in the specified class loader and will implement all of the supplied interfaces. If a proxy class for the same permutation of interfaces has already been defined in the class loader, then the existing proxy class will be returned; otherwise, a proxy class for those interfaces will be generated dynamically and defined in the class loader.

There are several restrictions on the parameters that may be passed to Proxy.getProxyClass:

  • All of the Class objects in the interfaces array must represent interfaces, not classes or primitive types.
  • No two elements in the interfaces array may refer to identical Class objects.
  • All of the interface types must be visible by name through the specified class loader. In other words, for class loader cl and every interface i, the following expression must be true:
        Class.forName(i.getName(), false, cl) == i
  • All non-public interfaces must be in the same package; otherwise, it would not be possible for the proxy class to implement all of the interfaces, regardless of what package it is defined in.
  • No two interfaces may each have a method with the same name and parameter signature but different return type.
  • The resulting proxy class must not exceed any limits imposed on classes by the virtual machine. For example, the VM may limit the number of interfaces that a class may implement to 65535; in that case, the size of the interfaces array must not exceed 65535.

If any of these restrictions are violated, Proxy.getProxyClass will throw an IllegalArgumentException. If the interfaces array argument or any of its elements are null, a NullPointerException will be thrown.

Note that the order of the specified proxy interfaces is significant: two requests for a proxy class with the same combination of interfaces but in a different order will result in two distinct proxy classes. Proxy classes are distinguished by the order of their proxy interfaces in order to provide deterministic method invocation encoding in cases where two or more of the proxy interfaces share a method with the same name and parameter signature; this reasoning is described in more detail in the section below titled Methods Duplicated in Multiple Proxy Interfaces.

So that a new proxy class does not need to be generated each time Proxy.getProxyClass is invoked with the same class loader and list of interfaces, the implementation of the dynamic proxy class API should keep a cache of generated proxy classes, keyed by their corresponding loaders and interface list. The implementation should be careful not to refer to the class loaders, interfaces, and proxy classes in such a way as to prevent class loaders, and all of their classes, from being garbage collected when appropriate.

Proxy Class Properties

A proxy class has the following properties:

  • Proxy classes are public, final, and not abstract.
  • The unqualified name of a proxy class is unspecified. The space of class names that begin with the string "$Proxy" is, however, to be reserved for proxy classes.
  • A proxy class extends java.lang.reflect.Proxy.
  • A proxy class implements exactly the interfaces specified at its creation, in the same order.
  • If a proxy class implements a non-public interface, then it will be defined in the same package as that interface. Otherwise, the package of a proxy class is also unspecified. Note that package sealing will not prevent a proxy class from being successfully defined in a particular package at runtime, and neither will classes already defined in the same class loader and the same package with particular signers.
  • Since a proxy class implements all of the interfaces specified at its creation, invoking getInterfaces on its Class object will return an array containing the same list of interfaces (in the order specified at its creation), invoking getMethods on its Class object will return an array of Method objects that include all of the methods in those interfaces, and invoking getMethod will find methods in the proxy interfaces as would be expected.
  • The Proxy.isProxyClass method will return true if it is passed a proxy class-- a class returned by Proxy.getProxyClass or the class of an object returned by Proxy.newProxyInstance-- and false otherwise. The reliability of this method is important for the ability to use it to make security decisions, so its implementation should not just test if the class in question extends java.lang.reflect.Proxy.
  • The java.security.ProtectionDomain of a proxy class is the same as that of system classes loaded by the bootstrap class loader, such as java.lang.Object, because the code for a proxy class is generated by trusted system code. This protection domain will typically be granted java.security.AllPermission.

Creating a Proxy Instance

Each proxy class has one public constructor that takes one argument, an implementation of the interface InvocationHandler.

Each proxy instance has an associated invocation handler object, the one that was passed to its constructor. Rather than having to use the reflection API to access the public constructor, a proxy instance can be also be created by calling the Proxy.newProxyInstance method, which combines the actions of calling Proxy.getProxyClass with invoking the constructor with an invocation handler. Proxy.newProxyInstance throws IllegalArgumentException for the same reasons that Proxy.getProxyClass does.

Proxy Instance Properties

A proxy instance has the following properties:

  • Given a proxy instance proxy and one of the interfaces implemented by its proxy class Foo, the following expression will return true:
        proxy instanceof Foo
    and the following cast operation will succeed (rather than throwing a ClassCastException):
        (Foo) proxy

  • The static Proxy.getInvocationHandler method will return the invocation handler associated with the proxy instance passed as its argument. If the object passed to Proxy.getInvocationHandler is not a proxy instance, then an IllegalArgumentException will be thrown.

  • An interface method invocation on a proxy instance will be encoded and dispatched to the invocation handler's invoke method as described below.

    The proxy instance itself will be passed as the first argument of invoke, which is of type Object.

    The second argument passed to invoke will be the java.lang.reflect.Method instance corresponding to the interface method invoked on the proxy instance. The declaring class of the Method object will be the interface that the method was declared in, which may be a superinterface of the proxy interface that the proxy class inherits the method through.

    The third argument passed to invoke will be an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. Arguments of primitive types are wrapped in an instance of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean. The implementation of the invoke method is free to modify the contents of this array.

    The value returned by the invoke method will become the return value of the method invocation on the proxy instance. If the declared return value of the interface method is a primitive type, then the value returned by invoke must be an instance of the corresponding primitive wrapper class; otherwise, it must be a type assignable to the declared return type. If the value returned by invoke is null and the interface method's return type is primitive, then a NullPointerException will be thrown by the method invocation on the proxy instance. If the value returned by invoke is otherwise not compatible with the method's declared return type as described above, a ClassCastException will be thrown by the proxy instance.

    If an exception is thrown by the invoke method, it will be also thrown by the method invocation on the proxy instance. The exception's type must be assignable to either any of the exception types declared in the signature of the interface method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by invoke that is not assignable to any of the exception types declared in the throws clause of the interface method, then an UndeclaredThrowableException will be thrown by the method invocation on the proxy instance. The UndeclaredThrowableException will be constructed with the exception that was thrown by the invoke method.

  • An invocation of the hashCode, equals, or toString methods declared in java.lang.Object on a proxy instance will be encoded and dispatched to the invocation handler's invoke method in the same manner as interface method invocations are encoded and dispatched, as described above. The declaring class of the Method object passed to invoke will be java.lang.Object. Other public methods of a proxy instance inherited from java.lang.Object are not overridden by a proxy class, so invocations of those methods behave like they do for instances of java.lang.Object.

Methods Duplicated in Multiple Proxy Interfaces

When two or more interfaces of a proxy class contain a method with the same name and parameter signature, the order of the proxy class's interfaces becomes significant. When such a duplicate method is invoked on a proxy instance, the Method object passed to the invocation handler will not necessarily be the one whose declaring class is assignable from the reference type of the interface that the proxy's method was invoked through. This limitation exists because the corresponding method implementation in the generated proxy class cannot determine which interface it was invoked through. Therefore, when a duplicate method is invoked on a proxy instance, the Method object for the method in the foremost interface that contains the method (either directly or inherited through a superinterface) in the proxy class's list of interfaces is passed to the invocation handler's invoke method, regardless of the reference type through which the method invocation occurred.

If a proxy interface contains a method with the same name and parameter signature as the hashCode, equals, or toString methods of java.lang.Object, when such a method is invoked on a proxy instance, the Method object passed to the invocation handler will have java.lang.Object as its declaring class. In other words, the public, non-final methods of java.lang.Object logically precede all of the proxy interfaces for the determination of which Method object to pass to the invocation handler.

Note also that when a duplicate method is dispatched to an invocation handler, the invoke method may only throw checked exception types that are assignable to one of the exception types in the throws clause of the method in all of the proxy interfaces that it can be invoked through. If the invoke method throws a checked exception that is not assignable to any of the exception types declared by the method in one of the the proxy interfaces that it can be invoked through, then an unchecked UndeclaredThrowableException will be thrown by the invocation on the proxy instance. This restriction means that not all of the exception types returned by invoking getExceptionTypes on the Method object passed to the invoke method can necessarily be thrown successfully by the invoke method.

Serialization

Since java.lang.reflect.Proxy implements java.io.Serializable, proxy instances can be serialized, as described in this section. If a proxy instance contains an invocation handler that is not assignable to java.io.Serializable, however, then a java.io.NotSerializableException will be thrown if such an instance is written to a java.io.ObjectOutputStream. Note that for proxy classes, implementing java.io.Externalizable has the same effect with respect to serialization as implementing java.io.Serializable: the writeExternal and readExternal methods of the Externalizable interface will never be invoked on a proxy instance (or an invocation handler) as part of its serialization process. As with all Class objects, the Class object for a proxy class is always serializable.

A proxy class has no serializable fields and a serialVersionUID of 0L. In other words, when the Class object for a proxy class is passed to the static lookup method of java.io.ObjectStreamClass, the returned ObjectStreamClass instance will have the following properties:

  • Invoking its getSerialVersionUID method will return 0L.
  • Invoking its getFields method will return an array of length zero.
  • Invoking its getField method with any String argument will return null.

The stream protocol for Object Serialization supports a type code named TC_PROXYCLASSDESC, which is a terminal symbol in the grammar for the stream format; its type and value are defined by the following constant field in the java.io.ObjectStreamConstants interface:

    final static byte TC_PROXYCLASSDESC = (byte)0x7D;

The grammar also includes the following two rules, the first being an alternate expansion of the original newClassDesc rule:

newClassDesc:
TC_PROXYCLASSDESC newHandle proxyClassDescInfo

proxyClassDescInfo:
(int)<count> proxyInterfaceName[count] classAnnotation superClassDesc

proxyInterfaceName:
(utf)

When an ObjectOutputStream serializes the class descriptor for a class that is a proxy class, as determined by passing its Class object to the Proxy.isProxyClass method, it uses the TC_PROXYCLASSDESC type code instead of TC_CLASSDESC, following the rules above. In the expansion of proxyClassDescInfo, the sequence of proxyInterfaceName items are the names of all of the interfaces implemented by the proxy class, in the order that they are returned by invoking the getInterfaces method on the Class object. The classAnnotation and superClassDesc items have the same meaning as they do in the classDescInfo rule. For a proxy class, superClassDesc is the class descriptor for its superclass, java.lang.reflect.Proxy; including this descriptor allows for the evolution of the serialized representation of the class Proxy for proxy instances.

For non-proxy classes, ObjectOutputStream calls its protected annotateClass method to allow subclasses to write custom data to the stream for a particular class. For proxy classes, instead of annotateClass, the following method in java.io.ObjectOutputStream is called with the Class object for the proxy class:

    protected void annotateProxyClass(Class cl) throws IOException;

The default implementation of annotateProxyClass in ObjectOutputStream does nothing.

When an ObjectInputStream encounters the type code TC_PROXYCLASSDESC, it deserializes the class descriptor for a proxy class from the stream, formatted as described above. Instead of calling its resolveClass method to resolve the Class object for the class descriptor, the following method in java.io.ObjectInputStream is called:

    protected Class resolveProxyClass(String[] interfaces)
    throws IOException, ClassNotFoundException;

The list of interface names that were deserialized in the proxy class descriptor are passed as the interfaces argument to resolveProxyClass.

The default implementation of resolveProxyClass in ObjectInputStream returns the results of calling Proxy.getProxyClass with the list of Class objects for the interfaces named in the interfaces parameter. The Class object used for each interface name i is the value retuned by calling

    Class.forName(i, false, loader)
where loader is the first non-null class loader up the execution stack, or null if no non-null class loaders are on the stack. This is the same class loader choice made by the default behavior of the resolveClass method. This same value of loader is also the class loader passed to Proxy.getProxyClass. If Proxy.getProxyClass throws an IllegalArgumentException, resolveClass will throw a ClassNotFoundException containing the IllegalArgumentException.

Since a proxy class never has its own serializable fields, the classdata[] in the stream representation of a proxy instance consists wholly of the instance data for its superclass, java.lang.reflect.Proxy. Proxy has one serializable field, h, which contains the invocation handler for the proxy instance.

Examples

Here is a simple example that prints out a message before and after a method invocation on an object that implements an arbitrary list of interfaces:

public interface Foo {
    Object bar(Object obj) throws BazException;
}

public class FooImpl implements Foo {
    Object bar(Object obj) throws BazException {
        // ...
    }
}

public class DebugProxy implements java.lang.reflect.InvocationHandler {

    private Object obj;

    public static Object newInstance(Object obj) {
    return java.lang.reflect.Proxy.newProxyInstance(
        obj.getClass().getClassLoader(),
        obj.getClass().getInterfaces(),
        new DebugProxy(obj));
    }

    private DebugProxy(Object obj) {
    this.obj = obj;
    }

    public Object invoke(Object proxy, Method m, Object[] args)
    throws Throwable
    {
        Object result;
    try {
        System.out.println("before method " + m.getName());
        result = m.invoke(obj, args);
        } catch (InvocationTargetException e) {
        throw e.getTargetException();
        } catch (Exception e) {
        throw new RuntimeException("unexpected invocation exception: " +
                       e.getMessage());
    } finally {
        System.out.println("after method " + m.getName());
    }
    return result;
    }
}

To construct a DebugProxy for an implementation of the Foo interface and call one of its methods:

    Foo foo = (Foo) DebugProxy.newInstance(new FooImpl());
    foo.bar(null);

Here is an example of a utility invocation handler class that provides default proxy behavior for methods inherited from java.lang.Object and implements delegation of certain proxy method invocations to distinct objects depending on the interface of the invoked method:

import java.lang.reflect.*;

public class Delegator implements InvocationHandler {

    // preloaded Method objects for the methods in java.lang.Object
    private static Method hashCodeMethod;
    private static Method equalsMethod;
    private static Method toStringMethod;
    static {
    try {
        hashCodeMethod = Object.class.getMethod("hashCode", null);
        equalsMethod =
        Object.class.getMethod("equals", new Class[] { Object.class });
        toStringMethod = Object.class.getMethod("toString", null);
        } catch (NoSuchMethodException e) {
        throw new NoSuchMethodError(e.getMessage());
    }
    }

    private Class[] interfaces;
    private Object[] delegates;

    public Delegator(Class[] interfaces, Object[] delegates) {
    this.interfaces = (Class[]) interfaces.clone();
    this.delegates = (Object[]) delegates.clone();
    }

    public Object invoke(Object proxy, Method m, Object[] args)
    throws Throwable
    {
    Class declaringClass = m.getDeclaringClass();

    if (declaringClass == Object.class) {
        if (m.equals(hashCodeMethod)) {
        return proxyHashCode(proxy);
        } else if (m.equals(equalsMethod)) {
        return proxyEquals(proxy, args[0]);
        } else if (m.equals(toStringMethod)) {
        return proxyToString(proxy);
        } else {
        throw new InternalError(
            "unexpected Object method dispatched: " + m);
        }
    } else {
        for (int i = 0; i

Subclasses of Delegator can override
invokeNotDelegated to implement the behavior of proxy
method invocations not to be directly delegated to other objects, and
they can override proxyHashCode,
proxyEquals, and proxyToString to override
the default behavior of the methods the proxy inherits from
java.lang.Object.

To construct a Delegator for an implementation of the
Foo interface:

    Class[] proxyInterfaces = new Class[] { Foo.class };
    Foo foo = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
    proxyInterfaces,
    new Delegator(proxyInterfaces, new Object[] { new FooImpl() }));

Note that the implementation of the Delegator class
given above is intended to be more illustrative than optimized; for
example, instead of caching and comparing the Method
objects for the hashCode, equals, and
toString methods, it could just match them by their
string names, because none of those method names are overloaded in
java.lang.Object.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: reflect ion-comments@sun.com 		Sun

Java Software


Contents | Prev | Next Java Core Reflection

Acknowledgements

The reflection API was designed by Nakul Saraiya and Bill Joy, and benefited from substantial input from John Rose. Thanks also to our colleagues at JavaSoft and our external reviewers for their valuable comments.

References

JavaTM Beans Specification, JavaSoft

JavaTM Object Serialization Specification, JavaSoft

Contents | Prev | Next
Copyright © 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.


Java Core Reflection

Contents | Prev | Next Java Core Reflection

Overview

The Java(TM) Core Reflection API provides a small, type-safe, and secure API that supports introspection about the classes and objects in the current Java Virtual Machine*. If permitted by security policy, the API can be used to:

  • construct new class instances and new arrays

  • access and modify fields of objects and classes

  • invoke methods on objects and classes

  • access and modify elements of arrays

The Core Reflection API defines classes and methods, as follows:

  • Three classes-Field, Method, and Constructor-that reflect class and interface members and constructors. These classes provide:

    • reflective information about the underlying member or constructor

    • a type-safe means to use the member or constructor to operate on Java objects

  • Methods of class Class that provide for the construction of new instances of the Field, Method, and Constructor classes.

  • The class Array provides methods to dynamically construct and access Java arrays.

  • The utility class Modifier helps decode Java language modifier information about classes and their members.

  • The class InvocationTargetException is used to wrap exceptions thrown by reflected methods or constructors.

  • Two classes-AccessibleObject and ReflectPermission-that provide a mechanism to suppress standard Java language access control.

There are also some parts of the java.lang package that support reflection. These are:

  • Static fields that hold instances of the class Class. These represent the primitive Java types boolean, byte, char, short, int, long, float, and double, and the keyword void, at run-time.

  • An uninstantiable placeholder class-Void-to hold a reference to the Class object representing the keyword void.

Applications

The Core Reflection API accommodates two categories of applications.

One category is comprised of applications that need to discover and use all of the public members of a target object based on its run-time class. These applications require run-time access to all the public fields, methods, and constructors of an object. Examples in this category are services such as Java(TM) Beans[1], and lightweight tools, such as object inspectors. These applications use the instances of the classes Field, Method, and Constructor obtained through the methods getField, getMethod, getConstructor, getFields, getMethods, and getConstructors of class Class.

The second category consists of sophisticated applications that need to discover and use the members declared by a given class. These applications need run-time access to the implementation of a class at the level provided by a class file. Examples in this category are development tools, such as interpreters, inspectors, and class browsers, and run-time services, such as Java(TM) Object Serialization[2]. These applications use instances of the classes Field, Method, and Constructor obtained through the methods getDeclaredField, getDeclaredMethod, getDeclaredConstructor, getDeclaredFields, getDeclaredMethods, and getDeclaredConstructors of class Class.

Reflection Model

The three classes Field, Method, and Constructor are final. Only the Java Virtual Machine may create instances of these classes; these objects are used to manipulate the underlying objects; that is, to:

  • get reflective information about the underlying member or constructor

  • get and set field values

  • invoke methods on objects or classes

  • create new instances of classes

The final uninstantiable class Array provides static methods that permit creating new arrays, and getting and setting the elements of arrays.

Member Interface

The classes Field, Method and Constructor implement the Member interface. The methods of Member are used to query a reflected member for basic identifying information. Identifying information consists of the class or interface that declared the member, the name of the member itself, and the Java language modifiers (such as public, protected, abstract, synchronized, and so on) for the member.

Field Objects

A Field object represents a reflected field. The underlying field may be a class variable (a static field) or an instance variable (a non-static field). Methods of class Field are used to obtain the type of the underlying field, and to get and set the underlying field's value on objects.

Method Objects

A Method object represents a reflected method. The underlying method may be an abstract method, an instance method, or a class (static) method.

Methods of class Method are used to obtain the formal parameter types, the return type, and the checked exception types of the underlying method. In addition, the invoke method of class Method is used to invoke the underlying method on target objects. Instance and abstract method invocation uses dynamic method resolution based on the target object's run-time class and the reflected method's declaring class, name, and formal parameter types. (Thus, it is permissible to invoke a reflected interface method on an object that is an instance of a class that implements the interface.) Static method invocation uses the underlying static method of the method's declaring class.

Constructor Objects

A Constructor object represents a reflected constructor. Methods of class Constructor are used to obtain the formal parameter types and the checked exception types of the underlying constructor. In addition, the newInstance method of class Constructor is used to create and initialize a new instance of the class that declares the constructor, provided the class is instantiable.

Array and Modifier Classes

The Array class is an uninstantiable class that exports class methods to create Java arrays with primitive or class component types. Methods of class Array are also used to get and set array component values.

The Modifier class is an uninstantiable class that exports class methods to decode Java language modifiers for classes and members. The language modifiers are encoded in an integer, and use the encoding constants defined by The Java Virtual Machine Specification.

Representation of Primitive Java Types

Finally, there are nine Class objects that are used to represent the eight primitive Java types and void at run-time. (Note that these are Class objects, not classes.) The Core Reflection API uses these objects to identify the following:

  • primitive field types

  • primitive method and constructor parameter types

  • primitive method return types

The Java Virtual Machine creates these nine Class objects. They have the same names as the types that they represent. The Class objects may only be referenced via the following public final static variables:

        java.lang.Boolean.TYPE

        java.lang.Character.TYPE

        java.lang.Byte.TYPE

        java.lang.Short.TYPE

        java.lang.Integer.TYPE

        java.lang.Long.TYPE

        java.lang.Float.TYPE

        java.lang.Double.TYPE

        java.lang.Void.TYPE
In particular, these Class objects are not accessible via the forName method of class Class.

Security Model

The Java security manager controls access to the Core Reflection API on a class-by-class basis. There are two levels of checks to enforce security and safety, as follows:

  • The methods of class Class that give reflective access to a member or a set of members of a class are the only source for instances of Field, Method, and Constructor. These methods first delegate security checking to the system security manager (if installed), which throws a SecurityException should the request for reflective access be denied.

  • Once the system security manager grants initial reflective access to a member, any code may query the reflected member for its identifying information. However, standard Java language access control checks-for protected, default (package) access, and private classes and members-will normally occur when the individual reflected members are used to operate on the underlying members of objects,that is, to get or set field values, to invoke methods, or to create and initialize new objects. Unrestricted access, which overrides standard language access control rules, may be granted to privileged code using the setAccessible method. This method is inherited from AccessibleObject by the classes Field, Method, and Constructor.

The initial policy decision is centralized in two methods of class SecurityManager:

void checkMemberAccess(Class,int) throws SecurityException

The Class parameter of checkMemberAccess identifies the class or interface whose members need to be accessed. The int parameter identifies the set of members to be accessed-either Member.PUBLIC or Member.DECLARED.

void checkPackageAccess(String pkg) throws SecurityException

The policy is determined based on what permissions are granted to the caller. There are two actions of class java.lang.RuntimePermission that affect these policies. These are:

  • accessDeclaredMembers. This grants the ability to reflect on non-public members of classes.

  • accessClassInPackage{package name}. This grants access to classes in the specified package. These permissions are determined by the security manager.

If the requested access to the specified set of members of the specified class is denied, the method should throw a SecurityException. If the requested access to the set is granted, the method should return.

As stated earler, standard Java language access control will usually be enforced when a reflected member from this set is used to operate on an underlying object, that is, when:

  • a Field is used to get or set a field value

  • a Method is used to invoke a method

  • a Constructor is used to create and initialize a new instance of a class

If access is denied at that point, the reflected member will throw an IllegalAccessException. Java language access control may be suppressed for a particular reflected member by setting a flag using the setAccessible method, as explained below.

Java Language Policy

The Java language security policy for applications is that any code may gain reflective access to all the members and constructors (including non-public members and constructors) of any class it may link against. By default, application code that gains reflective access to a member or constructor may only use the reflected member or constructor with standard Java language access control.

The standard policy may be overridden by calling the reflected member's setAccessible method. The ability to call the setAccessible method is in turn controlled by the suppressAccessChecks target of the permission ReflectPermission.

Data Conversions

Certain methods in the reflection package perform automatic data conversions between values of primitive types and objects of class types. These are the generic methods for getting and setting field and array component values, and the methods for method and constructor invocation.

There are two types of automatic data conversions. Wrapping conversions convert from values of primitive types to objects of class types. Unwrapping conversions convert objects of class types to values of primitive types. The rules for these conversions are defined in "Wrapping and Unwrapping Conversions."

Additionally, field access and method invocation permit widening conversions on primitive and reference types. These conversions are documented in The Java Language Specification, section 5, and are detailed in "Widening Conversions."

Wrapping and Unwrapping Conversions

A primitive value is automatically wrapped in an object when it is retrieved via Field.get or Array.get, or when it is returned by a method invoked via Method.invoke.

Similarly, an object value is automatically unwrapped when supplied as a parameter in a context that requires a value of a primitive type. These contexts are:

  • Field.set, where the underlying field has a primitive type

  • Array.set, where the underlying array has a primitive element type

  • Method.invoke or Constructor.newInstance, where the corresponding formal parameter of the underlying method or constructor has a primitive type

The following table shows the correspondences between primitive types and class (wrapper) types:

boolean | java.lang.Boolean
char | java.lang.Character
byte | java.lang.Byte
short | java.lang.Short
int | java.lang.Integer
long | java.lang.Long
float | java.lang.Float
double | java.lang.Double

A method that is declared void returns the special reference null when it is invoked via Method.invoke.

Widening Conversions

The reflection package permits the same widening conversions at run-time as permitted in method invocation contexts at compile time. These conversions are defined in The Java Language Specification, section 5.3.

Widening conversions are performed at run-time:

  • when a value is retrieved from a field or an array via the methods of Field and Array

  • when a value is stored into a field or an array via the methods of Field and Array

  • when an unwrapped actual parameter value is converted to the type of its corresponding formal parameter during method or constructor invocation via Method.invoke or Constructor.newInstance

The permitted widening primitive conversions are:

  • From byte to short, int, long, float, or double

  • From short to int, long, float, or double

  • From char to int, long, float, or double

  • From int to long, float, or double

  • From long to float or double

  • From float to double.

The permitted widening reference conversions are:

  • From a class type S to a class type T, provided that S is a subclass of T

  • From a class type S to an interface type K, provided that S implements K

  • From an interface type J to an interface type K, provided that J is a subinterface of K

Packaging

The Core Reflection API is in a subpackage of java.lang named java.lang.reflect. This avoids compatibility problems caused by Java's default package importation rules.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Contents | Prev | Next
Copyright © 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.


Java Core Reflection

Overview
Applications
Reflection Model
Member Interface
Field Objects
Method Objects
Constructor Objects
Array and Modifier Classes
Representation of Primitive Java Types
Security Model
Java Language Policy
JDK 1.1 Security Policy
Data Conversions
Wrapping and Unwrapping Conversions
Widening Conversions
Packaging
Acknowledgements
References

Contents | Prev | Next
Copyright © 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.


Accessing Resources

Accessing Resources in a Location-Independent Manner

Code written for the Java 1.0 platform uses two mechanisms to access resources.

  • Applets use Applet.getCodeBase() to get a URL to the base of the code for the applet. This base can be extended with a "relative path" to point to the desired resource, which can then be loaded (for example using Applet.getAudioClip(url)).
  • Applications use "well known locations" (such as System.getProperty("user.home") or System.getProperty("java.home")). They add "/lib/<resource>" to the location and then open that file.

The Java 1.0 platform lacks a mechanism to locate resources that are independent of the code. That is, there is no way locate resources for an applet loaded from the net using multiple http connects, or for an applet loaded using JAR files, or for a Bean loaded or a Bean installed in the CLASSPATH, or for a "library" installed in the CLASSPATH, and so on. The APIs described here provide such a mechanism.

The I18N APIs use this API as a primitive operation to locate ResourceBundles. See the latest I18N documentation for details.

Resources, names, and contexts

A resource is identified by a String. This String, while possibly empty, is a /-separated sequence of substrings, each a valid Java programming lanaugage identifier, followed by a name of the form "<shortName>" or "<shortName>.<extension>". Both "shortName" and "extension" are composed of valid Java Letters and Numbers (section 3.8 in JLS). If the optional sequence exists, it is separated from the "shortName" by a /.

The name of a resource is independent of the Java implementation; in particular, the / is always used as a separator. However, the Java implementation controls the details of how the contents of the resource are mapped into a file, database, or other object containing the actual resource.

The interpretation of a resource name is relative to a ClassLoader instance. Methods implemented by the ClassLoader do this interpretation.

System Resources

A system resource is similar to a system class (section 20.14.5 of the JLS). A system resource is a resource that is either built-in to the system, or it is kept by the host implementation in, for example, a local file system. System resources are accessed through special methods (getSystemResource and getSystemResourceAsStream) that consult the base host implementation.

For example, in a particular implementation, locating a system resource may involve searching the entries in the CLASSPATH. Each directory, zip file, or jar file entry in the CLASSPATH is searched for the resource file, and, if found, either an InputStream, or its name, is returned. If not found, null is returned. Note that a resource may be found in a different entry in the CLASSPATH than where the class file was loaded.

Non-System Resources

The implementation of getResource on a given ClassLoader will depend on the details of the ClassLoader. For example AppletClassLoader will:
  • First try to locate the resource as a system resource; then, if not found,
  • Search through the resources in ARCHIVES (JAR files) already loaded in this CODEBASE; then, if not found,
  • Use CODEBASE and attempt to locate the resource (which may involve contacting a remote site).

All ClassLoaders will search for a resource first as a system resource, in a manner analogous to searcing for class files. This search rule permits overwriting locally any resource. Clients should choose a resource name that will be unique (using the company or package name as a prefix, for instance).

Resource Names

A common convention for the name of a resource used by a class is to use the fully qualified name of the package of the class, convert all "." to "/", and add a resource name of the form "<Name>.<ext>". To support this, and to simplify handling the details of system classes (for which getClassLoader returns null), the class Class provides two convenience methods that call the appropriate methods in ClassLoader.

The resource name given to a Class method may have an initial starting "/" that identifies it as an "absolute" name. Resource names that do not start with a "/" are "relative".

Absolute names are stripped of their starting "/" and are passed, without any further modification, to the appropriate ClassLoader method to locate the resource. Relative names are modified according to the convention described previously and then are passed to a ClassLoader method.

Manipulating Resources

The method getResource() returns a URL for the resource. The URL (and its representation) is implementation and JVM*-instance specific (the URL obtained in one runtime instance may not work in another) and may vary depending on the implementation details Its protocol is (usually) specific to the ClassLoader loading the resource. If the resource does not exist, a null will be returned; if the resource is not visible due to security considerations, a null will also be returned.

If the client code wants to read the contents of the resource as an InputStream, it can apply the openStream() method on the url. This is common enough to justify adding getResourceAsStream() to Class and ClassLoader. getResourceAsStream() is semantically identical to getResource().openStream(), except that IO exceptions are caught and returned as a null InputStream.

The client code code can also request the contents of the resource as an object by applying the getContent() method on the url. This is useful when the resource contains the data for an image, for instance. Note that in this case, the result is an awt.image.ImageProducer object, not an Image object.

API Additions to Class

Specifically, the class Class methods are of the following form:

class Class {

    /**
     * Find a resource with a given name.  Will return null if no
     * resource with this name is found.  The rules for searching a
     * resources associated with a given class are implemented by the
     * ClassLoader of the class.
     *
     * The Class methods delegate to ClassLoader methods, after applying
     * a naming convention: if the resource name starts with "/", it is used
     * as is.  Otherwise, the name of the package is prepended, after
     * converting "." to "/".
     *
     * @see java.lang.ClassLoader
     */
    public InputStream getResourceAsStream(String name) {
    name = resolveName(name);
    ClassLoader cl = getClassLoader();
    if (cl==null) {
        // A system class.
        return ClassLoader.getSystemResourceAsStream(name);
    }
    return cl.getResourceAsStream(name);
    }

    public java.net.URL getResource(String name) {
    name = resolveName(name);
    ClassLoader cl = getClassLoader();
    if (cl==null) {
        // A system class.
        return ClassLoader.getSystemResource(name);
    }
    return cl.getResource(name);
    }

    /**
     * Add a package name prefix if the name is not absolute
     * Remove leading "/" if name is absolute
     */
    private String resolveName(String name) {
    if (name == null) {
        return name;
    }
    if (!name.startsWith("/")) {
        Class c = this;
        while (c.isArray()) {
        c = c.getComponentType();
        }
        String baseName = c.getName();
        int index = baseName.lastIndexOf('.');
        if (index != -1) {
        name = baseName.substring(0, index).replace('.', '/')
            +"/"+name;
        }
    } else {
        name = name.substring(1);
    }
    return name;
    }

Note that it is possible, albeit somewhat uncommon, to have two classes in two diffent packages sharing the same resource.

API Additions to ClassLoader

We provide two sets of methods to access a resource. One set returns an InputStream on the resource. The other set returns a URL. The methods that return an InputStream are somewhat easier to use and will satisfy many needs, while the methods that return URLs provide access to more complex information, such as an Image and an AudioClip.

Resources are managed through ClassLoaders in a manner analogous to classes. A ClassLoader controls how to map the name of a resource to its content. ClassLoader also provides methods for accessing system resources, analogous to the system classes. Class Class provides some convenience methods that delegate functionality to the appropriate ClassLoader methods.

Many Java programs will access these methods indirectly through the I18N APIs. Others will access it through methods in class Class. A few will directly invoke the ClassLoader methods.

The methods in ClassLoader use the given String as the name of the resource without applying any absolute/relative transformation (cf. the methods in Class). The name should not have a leading "/".

class ClassLoader {

    /**
     * A resource is some data (images, audio, text, etc) that wants to be
     * accessed by some class code in a way that is independent of the
     * location of the code.  Resources are found with cooperation of the
     * class loaders, since they are the only ones who know where the class
     * actually came from.

     *
     * System resources are those that are handled by the host implemenation
     * directly.  For example, they may be located in the CLASSPATH.

     *
     * The name of a resource is a "/"-separated sequence of identifiers.
     * The class Class provides convenience methods for accessing resources;
     * the methods implement a convention where the package name is prefixed
     * to the short name of the resource.

     *
     * Resources can be accessed as an InputStream, or as a URL.
     *
     * @see	Class
     */

    /**
     * Get an InputStream on a given resource..  Will return null if no
     * resource with this name is found.

     *
     * The resource name may be any system resource (e.g. follows CLASSPATH order)
     * @param	name	the name of the resource, to be used as is.
     * @return		an InputStream on the resource, or null if not found.
     */

    public static final InputStream getSystemResourceAsStream(String name) {
    ... this is equivalent to getSystemResource() call plus a openStream()
    }

    /**
     * Find a resource with a given name.  The return is a URL to the resource
     * Doing a getContent() on the URL may return an ImageProducer, an AudioClip, or
     * an InputStream.

     *
     * The resource name may be any system resource (e.g. follows CLASSPATH order)
     * @param	name	the name of the resource, to be used as is.
     * @return		the URL on the resource, or null if not found.
     */
    public static final java.net.URL getSystemResource(String name) {
    ...
    }

    /**
     */

    /**
     * Get an InputStream on a given resource.  Will return null if no
     * resource with this name is found.

     *
     * The class loader can choose what to do to locate the resource.
     * @param	name	the name of the resource, to be used as is.
     * @return		an InputStream on the resource, or null if not found.
     */
    public InputStream getResourceAsStream(String name) {
    return null;
    }

    /**
     * Find a resource with a given name.  The return is a URL to the resource.
     * Doing a getContent() on the URL may return an ImageProducer, an AudioClip,
     * or an InputStream.

     *
     * The class loader can choose what to do to locate the resource.
     * @param	name	the name of the resource, to be used as is.
     * @return		an InputStream on the resource, or null if not found.
     */
    public java.net.URL getResource(String name) {
    return null;
    }

    }

Client code

Below are two examples of client code. The first example uses "absolute resource" names and traditional mechanisms to get a class Class object:

package pkg;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;

class Test {

    private static final String absName = "/pkg/mumble.baf";

    public static void test1() {
    Class c=null;
    try {
        c = Class.forName("pkg.Test");
    } catch (Exception ex) {
        // This should not happen.
    }
    InputStream s = c.getResourceAsStream(absName);
    // do something with it.
    }

    public void test2() {
    InputStream s = this.getClass().getResourceAsStream(absName);
    // do something with it.
    }

The second example uses "relative resource" names and the new mechanism, available from the compiler through the -experimental flag, to get a class Class object:

package pkg;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;

class Test {

    private static final String relName = "mumble.baf";

    public static void test1() {
    InputStream s = Test.class.getResourceAsStream(relName);
    // do something with it.
    }

    public void test2() {
    InputStream s = Test.class.getResourceAsStream(relName);
    // do something with it.
    }

Security Details

Since getResource() provides access to information, it must have well defined and well founded security rules that at the same time support the intended use of this mechanism. Below we describe the exact details, as specified and implemented in releases starting at version 1.1.5 of the Java Development Kit. The semantics are described only for ClassLoader.getResource and ClassLoader.getSystemResource() and extend to the AsStream methods as defined in the previous section.

If security considerations do not allow a resource to be visible in some security context, the getResource() method will fail (will return null) as if the resource was not present at all, this addresses existence attacks.

All classloaders will not provide access to the contents of a .class file. This is for both security and performance issues. Whether it is possible to obtain a URL into a .class file depends on the specifics, as shown below.

There are no specified security issues or restrictions regarding resources that are found by a non-system class loader. AppletClassLoader provides access to information that is loaded from some source location, either individually, or in a group through a JAR file; thus AppletClassLoader should apply the same checkConnect() rules when dealing with URLs through getResource().

The system Class Loader provides access to information in the CLASSPATH. A CLASSPATH may have directories and/or JAR files. Since a JAR file is created intentionally, we ascribe a different significance to it than in a directory where things may end up in a more casual manner. In particular, we are more strict on getting information out of a directory than out from a JAR file.

If the resource is in a Directory:

  • getResource() invocations will use File.exists() to determine whether to make the corresponding file visible to the user. Recall that File.exists() uses the checkRead() method in the security manager.
  • the same applies to getResourceAsStream().

If the resource is in a JAR file:

  • getResource() invocations will succeed for all files, regardless of whether the invocation is done from within a System or a non-System class.
  • getResourceAsStream() invocations will succeed for non .class resources, and so will for getContent() on corresponding URLs.

Related Topics & Known Bugs

The getResource interface does not provide specific support for locating localized resources. Localized resources are supported by the internationalization facilities.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1996-98 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: jdk-comments@java.sun.com Sun Microsystems, Inc
Java Software


Applying the Factory Pattern to RMI

What is a "factory" and why would you want to use one? A factory, in this context, is a piece of software that implements one of the "factory" design patterns introduced in the book, Design Patterns, Elements of Reusable Object-Oriented Software. In general, a factory implementation is useful when you need one object to control the creation of and/or access to other objects.By using a factory in RMI, you can reduce the number of objects that you need to register with the RMI registry.

Examples of Factories in the Real World:

The Bank

When you go to the bank to make a deposit to your account, you don't walk up to a vault, pull out a drawer with your name on it, drop in your money, shut the drawer and leave. Think about how you originally established, or opened, the account. You probably went to the bank, spoke with an Account Manager, and signed some papers. In return, they gave you some checks, a passbook, or a bank card so you could access your account in the future.

The Account Manager is an example of a factory. The person or Automated Teller Machine (ATM) that acts as account manager controls the creation of and/or access to individual accounts.

The Library

Let's think about how a book, compact disk, or video tape gets from the library shelf into your home. Before you can check out any material, you must first get a library card from the librarian. In this case, the librarian could be viewed as a library card factory because the librarian controls the creation of new library card instances.

Once you have a library card, you can go into the library, and without any further fuss, just walk out with all your materials, right? Of course not. Before you can walk out of the library without setting off the alarm system, you must check out the book, CD, or video tape you wish to take home. So you present your library card to, you guessed it, the librarian, who will use your card to access the library database to see if you owe any late fees, and to register these new materials as having been leased to you. In this case, the librarian could be seen as a book factory because the librarian controls your access to the books.

How Does a Factory Work in RMI?

Just like any other RMI program, there are a few basic players: a server that produces one or more remote objects, each of which implements a remote interface; a client that accesses a name server (the rmiregistry) to get a reference to one of the remote objects; and the rmiregistry, which facilitates the client's initial contact with the server.

For the picture below and the steps that follow, you may make the following assumptions:

  • There are two remote interfaces that the client understands, Factory and Product
  • The FactoryImpl implements the Factory interface andthe ProductImpl implements the Product interface

  1. The FactoryImpl registers, or is registered, with the rmiregistry
  2. The client requests a reference to a Factory
  3. The rmiregistry returns a remote reference to a FactoryImpl
  4. The client invokes a remote method on the FactoryImpl to obtain a remote reference to a ProductImpl
  5. The FactoryImpl returns a remote reference to an existing ProductImpl or to one that it just created, based on the client request
  6. The client invokes a remote method on the ProductImpl

How Could the Bank and Library be Implemented in RMI?

The Bank

In code, AccountManager would be a remote interface with one or more remote methods. These methods would return objects that implement the Account interface. In a similar fashion, Account would be an interface that declared all of the operations a person could perform on an account instance, such as depositing or withdrawing money, getting an account balance, or listing the most recent account transactions.

In RMI, only the instance of the AccountManager implementation would be registered with the RMI registry. The AccountManager implementation would be the factory, returning remote references to (or serialized instances of) Account implementations, like your savings account.

The Library

In the library example, the Librarian would be a remote interface with one or more methods that would return objects that implement the LibraryCard interface. In addition, the Librarian interface would have methods to allow you access to books, CDs, or videotapes that implemented the Loanable interface.

In RMI, only the instance of the Librarian implementation would be registered with the RMI registry. The Librarian implementation would be the factory, returning remote references to (or serialized instances of) LibraryCard implementations and Loanable object implementations.

While the bank and library examples presented here may not be entirely complete they are not designed to be complete, but rather instructionally useful in describing the factory pattern in RMI.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Creating a Custom RMI Socket Factory

This page shows you the steps to follow to create and install a custom RMI socket factory. A custom RMI socket factory is useful if (1) you want your RMI client and server to talk across sockets that encrypt or compress your data, or (2) you want to use different types of sockets for different connections.

Installing your own RMI socket factory allows the RMI transport layer to use a non-TCP or custom transport protocol over IP, rather than TCP, provided by java.net.Socket , which RMI uses by default.

Before the release of the Java TM 2 SDK, v1.2, it was possible to create a custom java.rmi.RMISocketFactory subclass that produced a type of socket other than java.net.Socket for use by the RMI transport. It was not possible, however, for an installed RMI socket factory to produce different types of sockets on an object-by-object basis. For example in JDK1.1, an RMI socket factory could not produce SSL sockets for one object and use the Java Remote Method Protocol (JRMP) directly over TCP for a different object in the same Java virtual machine* (JVM). Also before 1.2, it was necessary to spawn an instance of the rmiregistry that spoke only your custom socket protocol.

Then in Java SDK, v1.2 Beta3, it was possible for RMI clients to use a custom RMI socket factory, but the socket factory could not be downloaded, so the client had to be able to find the socket factory class locally.

Since the release of the Java 2 SDK, v1.2, it's been possible to create a custom RMI socket factory that produces the type of socket connection you want when you want on a per-object basis, download a client-side socket factory, and continue to use the default rmiregistry.

The rest of this tutorial is laid out as follows:

  • An example of how to create an RMI socket factory that produces a single type of socket.
  • An example of how to create a RMI socket factory that produces more than one type of socket.
  • An example of how to use a custom RMI socket factory in an application.
Many people are interested in secure communication between RMI clients and servers. For the RMI/SSL story see The Scoop on RMI and SSL.

Creating an RMI Socket Factory That Produces a Single Type of Socket

There are four steps to creating a custom RMI socket factory, that produces a single type of socket.
  1. Decide upon the type of socket to be produced.
  2. Write a client-side socket factory that implements RMIClientSocketFactory.
  3. Implement the RMIClientSocketFactory createSocket method.
  4. Write a server-side socket factory that implements RMIServerSocketFactory.
  5. Implement the RMIServerSocketFactory createServerSocket method.

Step 1:
Decide Upon the Type of Socket to be Produced

The type of socket to be produced is an application-specific decision. You get to choose the type of socket that is appropriate for your application. If your server handles a lot of sensitive data, you might want a socket that encrypts the data. If your server deals with video, you are likely to need a socket that does compression.

For this example, the RMI socket factory will produce sockets that provide data compression. We will produce examples.rmisocfac.CompressionSocket sockets from the page Creating a New Socket Type.

Step 2:
Write a client-side socket factory that implements RMIClientSocketFactory

Begin the implementation of a client-side RMI socket factory by implementing the RMIClientSocketFactory interface. The custom socket factory for this example will be called CompressionClientSocketFactory.

Below is the code for the class CompressionClientSocketFactory as well the code for the next step, overriding the createSocket method. An explanation of that step follows the code example.

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class CompressionClientSocketFactory
    implements RMIClientSocketFactory, Serializable {

    public Socket createSocket(String host, int port)
throws IOException
{
CompressionSocket socket
=
new CompressionSocket(host, port);
return socket;
}

}

Step 3:
Implement the RMIClientSocketFactory createSocket method.

Since the function of an RMI socket factory is to supply the RMI runtime with sockets, the CompressionClientSocketFactory needs to provide an implementation of the RMIClientSocketFactory createSocket method, so that it creates and returns sockets of the correct type -- CompressionSocket. Notice that in the above code, a CompressionSocket is created and returned.

Step 4:
Write a server-side socket factory that implements RMIServerSocketFactory

Begin the implementation of a server-side RMI socket factory by implementing the RMIServerSocketFactory interface. The custom socket factory for this example will be called CompressionServerSocketFactory.

Below is the code for the class CompressionServerSocketFactory as well the code for the next step, implementing the createServerSocket method. An explanation of that step follows the code example.

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class CompressionServerSocketFactory
implements RMIServerSocketFactory, Serializable
{

    public ServerSocket createServerSocket(int port)
throws IOException
{
CompressionServerSocket
server = new CompressionServerSocket(port);
return server;
}
}

Step 5:
Implement the RMIServerSocketFactory createServerSocket method.

Implementing createServerSocket in your RMI socket factory is almost identical to implementing createSocket, except createServerSocket needs to create and return a socket of type CompressionServerSocket.

Now that you have worked through one example of creating an RMI socket factory, you have all the experience necessary to move on to creating a socket factory capable of producing more than one type of socket, which is the next example.

Creating an RMI Socket Factory that Produces More Than One Type of Socket

To create an RMI socket factory capable of producing more than one type of socket, you start by following the steps for creating a factory which produces a single socket type. Only a little more information is necessary to create a "wrapper" for the different socket types.

For this example, the custom RMIClientSocketFactory class will be named MultiClientSocketFactory, because it supports multiple socket types, and likewise, the custom RMIServerSocketFactory class will be named MultiServerSocketFactory. Each of these socket factories has a constructor that specifies which protocol should be supported for this instance of the object.

Now, following the steps to create a custom socket factory, from the previous example, we will first decide which types of sockets to produce.

Step 1:
Decide Upon the Type of Socket to be Produced

This custom RMI socket factory will produce three types of sockets: XorSocket, CompressionSocket and the default, java.net.Socket.

The source code for the implementation of sockets of type XorSocket can be found here.

Step one is now complete. Below is the source code for steps 2-5. Following the code is an explanation of each of the remaining steps.

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;
public class MultiClientSocketFactory
    implements RMIClientSocketFactory, Serializable
{
    /*
     * Get the default RMISocketFactory
     */
    private static RMISocketFactory defaultFactory =
        RMISocketFactory.getDefaultSocketFactory();

    private String protocol;
    private byte[] data;

    public MultiClientSocketFactory(String protocol, byte[] data) {
        this.protocol = protocol;
        this.data = data;
    }

    /*
     * Override createSocket to call the default
     * RMIClientSocketFactory's createSocket method. This
     * way, you'll get a TCP connection if you don't
     * specify compression or xor
     */
    public Socket createSocket(String host, int port)
        throws IOException
    {
        if (protocol.equals("compression")) {
            return new CompressionSocket(host, port);

        } else if (protocol.equals("xor")) {
            if (data == null || data.length != 1)
                throw new IOException("invalid argument for XOR protocol");
            return new XorSocket(host, port, data[0]);

        }

        return defaultFactory.createSocket(host, port);
    }
}

Step 2:
Implement RMIClientSocketFactory

The above class, MultiClientSocketFactory, implements RMIClientSocketFactory.

Step 3:
Implement the RMIClientSocketFactory createSocket method.

Since the socket factory created in this example can produce two different types of sockets in addition to sockets of the default type, it is necessary to override the createSocket method. If the protocol field of the MultiClientSocketFactory constructor is equal to "xor" then a XorSocket is created and returned. If the protocol field is equal to "compression" then a CompressionSocket is created and returned.

Step 4:
Write a server-side socket factory that implements RMIServerSocketFactory

package examples.rmisocfac;

import java.io.*;
import java.net.*;
import java.rmi.server.*;

public class MultiServerSocketFactory
    implements RMIServerSocketFactory, Serializable
{
    /*
     * Get the default RMISocketFactory
     */
    private static RMISocketFactory defaultFactory =
        RMISocketFactory.getDefaultSocketFactory();

    private String protocol;
    private byte[] data;

    public MultiServerSocketFactory(String protocol,
byte[] data) {
this.protocol = protocol;
this.data = data;
}

    /*
     * Override createServerSocket to call the default
     * RMIServerSocketFactory's createServerSocket method, if
     * an invalid protocol is specified.
     */
    public ServerSocket createServerSocket(int port)
        throws IOException
    {
        if (protocol.equals("compression")) {
            return new CompressionServerSocket(port);

        } else if (protocol.equals("xor")) {
            if (data == null || data.length != 1)
                throw new IOException("invalid argument for XOR protocol");
            return new XorServerSocket(port, data[0]);

        }

        return defaultFactory.createServerSocket(port);
    }
}

Step 5:
Implement the RMIServerSocketFactory createServerSocket method.

Overriding createServerSocket is almost identical to overriding createSocket. As in step three, the RMIServerSocketFactory createServerSocket method, the type of socket created and returned is determined by the protocol field of the MultiClientSocketFactory constructor.

Using Your Custom Socket Factory in an Application

There are only two more steps to complete when using a custom RMI socket factory for a remote object:
  1. In the remote object implementation, write a constructor that calls the UnicastRemoteObject (or Activatable) constructor that takes RMIClientSocketFactory and RMIServerSocketFactory parameters.
  2. Write a java.security.policy file that allows your program to create sockets.
Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents
Default Policy Implemenation and Policy File Syntax
Permission in the Java 2 SDK

Step 1:
Write a Remote Object Constructor that Calls the UnicastRemoteObject Constructor that takes RMIClientSocketFactory and RMIServerSocketFactory parameters.

If you create your own RMI socket factory, then you need a way to tell the RMI runtime which type of socket factory to use. Assuming the server extends UnicastRemoteObject, this notification is accomplished by creating a remote object constructor that calls the following version of the UnicastRemoteObject constructor:

protected UnicastRemoteObject(int port, RMIClientSocketFactory csf,
    RMIServerSocketFactory ssf)

Below is a HelloImpl constructor from the original RMI "Hello World" example appropriately modified for a socket of type XorSocket.

    public HelloImpl(String protocol, byte [] pattern)
       throws RemoteException
    {
       super(0, new MultiClientSocketFactory(protocol, pattern),
           new MultiServerSocketFactory(protocol, pattern));
    }

Notice that the UnicastRemoteObject constructor,

protected UnicastRemoteObject(int port, RMIClientSocketFactory csf,
    RMIServerSocketFactory ssf)

is called from the HelloImpl constructor. Once your custom socket factory is set, sockets of the desired type will be used for your RMI client-server application.

Step 2:
Write a java.security.policy file that allows your program to create sockets.

The policy file for this example, is not secure and should not be used in a production environment.

The policy file for this example looks like this:

grant {
 // Allow everything for now
 permission java.security.AllPermission;
};

Next is a version of the "Hello World" example that uses MultiClientSocketFactory and MultiServerSocketFactory to communicate using sockets of type XorSocket.

This example has changed from the original "Hello World" example in the RMI tutorial. Most notably, the client in this example is not an applet. In addition, the client class in this example is called HelloClient. The last difference is that all of the classes are in the examples.rmisocfac package.

It is important to recognize that this example assumes that the client, server, and registry are all run on the same machine.

Below is the interface Hello, from the file Hello.java. Notice that, except for the package name, this interface has not changed from the original Hello.java.

        package examples.rmisocfac;

        public interface Hello extends java.rmi.Remote {
            String sayHello() throws java.rmi.RemoteException;
        }
Take a look at the modified version of the client class, HelloClient.java. Notice that the RMISecurityManager is installed at the beginning of main. Otherwise the class HelloClient is no different than before.
        package examples.rmisocfac;

        import java.rmi.*;

        public class HelloClient {

            private static String message = "";

            public static void main(String args[]) {

               //Create and install a security manager
               if (System.getSecurityManager() == null)
                   System.setSecurityManager(new RMISecurityManager());

               try {
                   Hello obj = (Hello) Naming.lookup("/HelloServer");
                   message = obj.sayHello();
                   System.out.println(message);

               } catch (Exception e) {
                   System.out.println("HelloClient exception: " +
                                       e.getMessage());
                   e.printStackTrace();
               }

            }

        }
Last in this example is the source for HelloImpl from the file HelloImpl.java. Besides the change in the package name, two modifications have been made so that sockets of type "xor" will be used for the RMI calls between the client and the server. Note that the constructor has been changed to call the version of the UnicastRemoteObject constructor that takes a client and server socket factory as parameters.
       package examples.rmisocfac;

        import java.io.*;
        import java.rmi.*;
        import java.rmi.server.*;

        public class HelloImpl
extends UnicastRemoteObject implements Hello {

/*
* Constructor calls constructor of superclass with
* client and server socket factory  parameters.
*/
public HelloImpl(String protocol, byte [] pattern) throws RemoteException
{
super(0, new MultiClientSocketFactory(protocol, pattern),
new MultiServerSocketFactory(protocol, pattern));
}

            /*
             * Remote method returns String "Hello World!"
             * when invoked.
             */
            public String sayHello() throws RemoteException {
                return  "Hello World!";
            }

            public static void main(String args[]) {

                //Create and install a security manager
                if (System.getSecurityManager() == null)
                    System.setSecurityManager(new RMISecurityManager());

                byte [] aPattern = { (byte)1011 };
                try {
                    HelloImpl obj = new HelloImpl("xor", aPattern);
                    Naming.rebind("/HelloServer", obj);
                    System.out.println("HelloServer bound in registry");
                } catch (Exception e) {
                    System.out.println("HelloImpl err: " + e.getMessage());
                    e.printStackTrace();
                }
            }
        }

To download this example and the supporting files, click here.

Directions on how to compile and run the above "Hello World" example can be found here.

*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Creating a Custom Socket Type

Often it is necessary to process data either before it is sent to, or after it has been received from, a socket. Instead of using java.net.Socket sockets with pre- and post-processing, another type of socket can be used.

This page shows you the steps to follow to create a custom socket type. It also contains an example implementation of a custom socket named CompressionSocket, which compresses data sent over the connection it uses.

The CompressionSocket and its supporting classes are also used in our tutorial on how to create a custom RMI socket factory. As a result, the source files for this example are all in the examples.rmisocfac package.

In this tutorial, creating the CompressionSocket class and related classes is broken down into the following four steps, which can be adapted to create other custom socket type:

  1. Extend java.io.FilterOutputStream to create an output stream for the socket. Override FilterOutputStream methods as necessary.
  2. Extend java.io.FilterInputStream to create an input stream for the socket. Override FilterInputStream methods as necessary.
  3. Create a java.net.Socket subclass. Implement the appropriate constructors and override the getInputStream, getOutputStream and close methods.
  4. Create a java.net.ServerSocket subclass. Implement the constructor, and overload the accept method to create a socket of the desired type.

Step 1:
Extend FilterOutputStream to Create an Output Stream for the Socket.

Because we are writing a socket that does data compression, we will write a class named CompressionOutputStream that extends FilterOutputStream. However, extending FilterOutputStream will not be appropriate in every case. In general, you should extend the type of output stream best-suited for the type of socket you are implementing. In this example, FilterOutputStream is most appropriate.

For our example, we will use a very simple algorithm that provides 6-bit character encoding for up to 62 common characters and 18-bit encoding for the other characters (remember that in the JavaTM programming language characters are usually 16 bits). There is a lookup table to map the 62 common characters to 6-bit numbers in the range 0 to 61. Depending on the result of the lookup, each encoded character is marked with a constant to indicate whether it has 6-bit or 18-bit encoding. Finally, the encoded characters are written to the stream. This algorithm assumes that all characters encountered are ASCII, and that the high-order byte of each character is unused.

Please note: This algorithm is not recommended for use in any application requiring data compression. It is included only for this example and is not intended for practical use.

Before writing any sample code that demonstrates how to create custom sockets, it is necessary to write an interface containing the information to be shared between the input and output stream classes so the common character lookup table, codeTable and 3 constants are included as members. It is useful to note that while an interface is included in this example, an interface is not always required.

interface CompressionConstants {

    /** Constants for 6-bit code values. */

    /** No operation: used to pad words on flush. */
    static final int NOP     = 0;

    /** Introduces raw byte format. */
    static final int RAW     = 1;

    /** Format indicator for characters found in lookup table. */
    static final int BASE    = 2;

    /** A character's code is it's index in the lookup table. */
    static final String codeTable =
        "abcdefghijklmnopqrstuvwxyz" +
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
}

The source code for the CompressionConstants interface can be found here.

Now that the interface for sharing information between the input and output streams has been defined, we will complete Step 1, which was to write a class that extends java.io.FilterOutputStream in order to create an output stream for the socket, overriding FilterOutputStream methods as necessary.

Below is the source code for the class CompressionOutputStream.java. An explanation of the compression algorithm can be found in the comments of the source code. An explanation of the implementation follows the code.

import java.io.*;

class CompressionOutputStream extends FilterOutputStream
    implements CompressionConstants
{

    /*
     * Constructor calls constructor of superclass.
     */
    public CompressionOutputStream(OutputStream out) {
        super(out);
    }

    /*
     * Buffer of 6-bit codes to pack into next 32-bit
     * word.  Five 6-bit codes fit into 4 words.
     */
    int buf[] = new int[5];

    /*
     * Index of valid codes waiting in buf.
     */
    int bufPos = 0;

    /*
     * This method writes one byte to the socket stream.
     */
    public void write(int b) throws IOException {
        // force argument to one byte
        b &= 0xFF;

        // Look up pos in codeTable to get its encoding.
        int pos = codeTable.indexOf((char)b);

        if (pos != -1)
            // If pos is in the codeTable, write
            // BASE + pos into buf. By adding BASE
            // to pos, we know that the characters in
            // the codeTable will always have a code
            // between 2 and 63 inclusive. This allows
            // us to use RAW (RAW is equal to 1) to signify
            // that the next two groups of 6-bits are necessary
            // for decompression of the next character.

            writeCode(BASE + pos);

        else {
            // Otherwise, write RAW into buf to signify that
            // the Character is being sent in 12 bits.
            writeCode(RAW);

            // Write the last 4 bits of b into the buf.
            writeCode(b >> 4);

            // Truncate b to contain data in only the first 4
            // bits and write the first 4 bits of b into buf.
            writeCode(b & 0xF);
        }
    }

    /*
     * This method writes up to len bytes to the socket stream.
     */
    public void write(byte b[], int off, int len)
        throws IOException
    {
        // This implementation is quite inefficient because
        // it has to call the other write method for every
        // byte in the array.  It could be optimized for
        // performance by doing all the processing in this
        // method.

        for (int i = 0; i  0)
            writeCode(NOP);
    }

    /*
     * This method actually puts the data into the output stream
     * after packing the data from all 5 bytes in buf into one
     * word. Remember, each byte has, at most, 6 significant bits.
     */
    private void writeCode(int c) throws IOException {
        buf[bufPos++] = c;

        // write next word when we have 5 codes
        if (bufPos == 5) {
            int pack = (buf[0] << 24) | (buf[1] << 18) |
                       (buf[2] << 12) | (buf[3] << 6) | buf[4];
            out.write((pack >>> 24) & 0xFF);
            out.write((pack >>> 16) & 0xFF);
            out.write((pack >>> 8)  & 0xFF);
            out.write((pack >>> 0)  & 0xFF);
            bufPos = 0;
        }
    }
}

First, CompressionOutputStream subclasses FilterOutputStream. Then it implements the interface CompressionConstants so that it can have access to the lookup table and constants.

In order to compress the data, the FilterOutputStream write methods are overridden by CompressionOutputStream. The method

public void write(int b)

writes one character per invocation, and is responsible for marking each character with its encoding format using a compression constant (either RAW or BASE) and dividing the character into two 4-bit parts when necessary.

The method

public void write(byte b[], int off, int len)

allows one to write len characters. It calls the write method that writes one character per invocation len times.

The method writeCode is responsible for packing five 6-bit codes into one word (which could encode up to five characters) and writing that word to the output stream.

The source code for CompressionOutputStream can be found here.

Step 2:
Extend FilterInputStream to Create an Input Stream for the Socket.

Now that we have an output stream that compresses the data, we need to implement an input stream that decompresses it. Creating the CompressionInputStream is very similar to creating the CompressionOutputStream as you will notice from the source code and the following discussion.

As you might expect, algorithmically, the decoding process is the just reverse of the encoding process.

import java.io.*

class CompressionInputStream extends FilterInputStream
    implements CompressionConstants
{
    /*
     * Constructor calls constructor of superclass
     */
    public CompressionInputStream(InputStream in) {
        super(in);
    }

    /*
     * Buffer of unpacked 6-bit codes
     * from last 32 bits read.
     */
    int buf[] = new int[5];

    /*
     * Position of next code to read in buffer (5 signifies end).
     */
    int bufPos = 5;

    /*
     * Reads in format code and decompresses character
     * accordingly.
     */
    public int read() throws IOException {
        try {
            int code;

            // Read in and ignore empty bytes (NOP's) as
            // long as they arrive.
            do {
                code = readCode();
            } while (code == NOP);

            if (code >= BASE) {
                // Retrieve index of character in codeTable
                // if the code is in the correct range.

                return codeTable.charAt(code - BASE);
            } else if (code == RAW) {
                // read in the lower 4 bits and the
                // higher 4 bits, and return the
                // reconstructed character
                int high = readCode();
                int low = readCode();
                return (high << 4) | low;
            } else
                throw new IOException("unknown compression code: "
                                      + code);
        } catch (EOFException e) {
            // Return the end of file code
            return -1;
        }
    }

    /*
     * This method reads up to len bytes from the input stream.
     * Returns if read blocks before len bytes are read.
     */
    public int read(byte b[], int off, int len)
        throws IOException
    {
        if (len <= 0)="0)" {="{" return="return" 0;="0;" }="}" //="//" Read="Read" in="in" a="a" word="word" and="and" return="return" -1="-1" if="if" no="no" more="more" data.="data." int="int" c="read();" if="if" (c="=" -1)="-1)" {="{" return="return" -1;="-1;" }="}" //="//" Save="Save" c="c" in="in" buffer="buffer" b="b" b[off]="(byte)c;" int="int" i="1;" //="//" Try="Try" to="to" read="read" up="up" to="to" len="len" bytes="bytes" or="or" until="until" no="no" //="//" more="more" bytes="bytes" can="can" be="be" read="read" without="without" blocking.="blocking." try="try" {="{" for="for" (;="(;" (i="(i" <="<" len)="len)" &&="&&" (in.available()="(in.available()"> 0); i++) {
                c = read();
                if (c == -1) {
                    break;
                }
                if (b != null) {
                    b[off + i] = (byte)c;
                }
            }
        } catch (IOException ee) {
        }
        return i;
    }

    /*
     * If there is no more data to decode left
     * in buf, read the next four bytes from the
     * wire. Then store each group of 6 bits in an
     * element of buf.  Return one element of buf.
     */
    private int readCode() throws IOException {
        // As soon as all the data in buf has been read
        // (when bufPos == 5) read in another four bytes.
        if (bufPos == 5) {
            int b1 = in.read();
            int b2 = in.read();
            int b3 = in.read();
            int b4 = in.read();

            // make sure none of the bytes signify the
            // end of the data in the stream
            if ((b1 | b2 | b3 | b4) <0) throw="throw" new="new" EOFException();="EOFException();" //="//" Assign="Assign" each="each" group="group" of="of" 6="6" bits="bits" to="to" an="an" //="//" element="element" of="of" buf.="buf." int="int" pack="(b1" <<="<<" 24)="24)" |="|" (b2="(b2" <<="<<" 16)="16)" |="|" (b3="(b3" <<="<<" 8)="8)" |="|" b4;="b4;" buf[0]="(pack">>> 24) & 0x3F;
            buf[1] = (pack >>> 18) & 0x3F;
            buf[2] = (pack >>> 12) & 0x3F;
            buf[3] = (pack >>>  6) & 0x3F;
            buf[4] = (pack >>>  0) & 0x3F;
            bufPos = 0;
        }
        return buf[bufPos++];
    }
}

When writing your own input stream, it is necessary to provide methods for getting data from the stream. Therefore, in addition to a constructor, two FilterOutputStream read methods were overridden. The method

public int read()

reads one character per invocation and is responsible for decoding the 6-bit codes unpacked by the method writeCode.

The method

public int read(byte b[], int off, int len)

causes up to len bytes to be read and placed into the array b. It accomplishes this through up to len calls to the read method that reads one character per invocation. In addition to returning once len bytes have been read or once the end of the file has been reached, this method also returns as soon as no more bytes can be read without blocking.

The method readCode, which corresponds to the writeCode method in CompressionOutputStream, is responsible for reading data from the stream and unpacking each group of four bytes into five 6-bit codes (which are then decoded by read).

The source code for CompressionInputStream.java, can be found here.

Step 3:
Create a Socket subclass. Implement the appropriate constructors and override the getInputStream, getOutputStream, and close methods.

Now that we have implemented the classes CompressionInputStream and CompressionOutputStream, we can implement the socket that communicates using these compression streams. Our subclass extends class java.net.Socket.

Below is the source code for the class CompressionSocket. Following the source is a discussion of the class.

import java.io.*;
import java.net.*;

class CompressionSocket extends Socket {

    /* InputStream used by socket */
    private InputStream in;
    /* OutputStream used by socket */
    private OutputStream out;

    /*
     * No-arg constructor for class CompressionSocket
     */
    public CompressionSocket() { super(); }

    /*
     * Constructor for class CompressionSocket
     */
    public CompressionSocket(String host, int port)
        throws IOException
    {
        super(host, port);
    }

    /*
     * Returns a stream of type CompressionInputStream
     */
    public InputStream getInputStream()
        throws IOException
    {
        if (in == null) {
            in = new CompressionInputStream(super.getInputStream());
        }
        return in;
    }

    /*
     * Returns a stream of type CompressionOutputStream
     */
    public OutputStream getOutputStream()
        throws IOException
    {
        if (out == null) {
            out = new CompressionOutputStream(super.getOutputStream());
        }
        return out;
    }

    /*
     * Flush the CompressionOutputStream before
     * closing the socket.
     */
    public synchronized void close() throws IOException {
        OutputStream o = getOutputStream();
        o.flush();
    super.close();
    }

}

Because we are extending the Socket class to provide sockets that communicate using data compression, we need to:

  • override the class Socket methods that directly manipulate the input and output streams used by class Socket and
  • provide constructors that call the constructor of the superclass.

The CompressionSocket constructors just call the equivalent constructors in the superclass, java.net.Socket.

The method getInputStream creates a CompressionInputStream for the socket if one has not already been instantiated and returns a reference to that stream. Likewise, getOutputStream creates a CompressionOutputStream if necessary, and returns the one in use by the CompressionSocket.

The close method flushes the underlying CompressionOutputStream, ensuring that all the data is sent before the socket is closed.

The source code for CompressionSocket.java, can be found here.

Step 4:
Create a ServerSocket subclass. Implement the constructor, and override the accept method to create a socket of the desired type.

The last step in writing a custom socket is creating a subclass of ServerSocket that supports your protocol. In this case, our subclass will be CompressionServerSocket.

Below is the source code for the CompressionServerSocket class, followed by a discussion of the class.

import java.io.*;
import java.net.*;

class CompressionServerSocket extends ServerSocket {

    public CompressionServerSocket(int port)
        throws IOException
    {
        super(port);
    }

    public Socket accept() throws IOException {
        Socket s = new CompressionSocket();
        implAccept(s);
        return s;
    }
}

As was the case with CompressionSocket, in order to provide server sockets that communicate using our compression protocol, we need to implement the constructor, and then make sure that all methods that use sockets of type java.net.Socket are overridden to use sockets of type CompressionSocket.

Implementing the constructor is as simple as calling the constructor of the super class.

The only ServerSocket class method that needs to be overridden is the method accept. It is overridden to instantiate a socket of type CompressionSocket instead of type Socket.

The above simplifications are possible because the compression socket type described in this tutorial is a protocol layer on top of TCP, the default protocol used by java.net.Socket and java.net.ServerSocket. Accordingly, it shares the same meaning for the rest of the methods, as well as a similar connection-establishment interface.

The source code for CompressionServerSocket.java, can be found here.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Example Using RMI with Phaos' SSLava

For an explanation of this example, on how to use Phaos' SSLava product with RMI, take a look at SETUP.txt. You may view all the source files through the links below, or the entire bundle can be downloaded at the bottom of the page.

SETUP.txt
README.txt
Hello.java
SSLHelloClient.java
SSLClientSocketFactory.java
SSLHelloApplet.java
SSLHelloImpl.java
SSLServerSocketFactory.java
all.policy
Click here to download the example.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Hello World Example that Communicates Using Sockets of type XorSocket

Hello World Example Using Sockets of Type XorSocket and a Custom RMI Socket Factory

Here are the source files from the "Hello World" example, that was modified to communicate using sockets of type XorSocket.
  • CompressionClientSocketFactory.java
  • CompressionConstants.java
  • CompressionInputStream.java
  • CompressionOutputStream.java
  • CompressionServerSocket.java
  • CompressionServerSocketFactory.java
  • CompressionSocket.java
  • Hello.java
  • HelloClient.java
  • HelloImpl.java
  • MultiClientSocketFactory.java
  • MultiServerSocketFactory.java
  • policy
  • XorInputStream.java
  • XorOutputStream.java
  • XorServerSocket.java
  • XorSocket.java
Instructions on how to compile and run this example can be found here .

For all of the source code used in this tutorial, you may choose from the following formats:

  • sockets.zip
  • sockets.tar
  • sockets.tar.Z
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


java.rmi Properties

Please Note: Unless otherwise stated, any output from these properties is sent to System.err.

Properties that can be set on rmid

java.rmi.activation.port (1.2 and later)
The value of this property represents the TCP port on which the activation system daemon, rmid, will listen for incoming remote calls. The default value is 1098.

Properties that are useful to set on JVMs* that export remote objects

java.rmi.dgc.leaseValue (1.1 and later)
The value of this property represents the lease duration (in milliseconds) granted to other JVMs that hold remote references to objects which have been exported by this JVM. Clients usually renew a lease when it is 50% expired, so a very short value will increase network traffic and risk late renewals in exchange for reduced latency in calls to Unreferenced.unreferenced. The default value of this property is 600000 milliseconds (10 minutes).

java.rmi.server.codebase (1.1 and later)
This property specifies the locations from which classes that are published by this JVM (for example: stub classes, custom classes that implement the declared return type of a remote method call, or interfaces used by a proxy or stub class) may be downloaded. The value of this property is a string in URL format (or a space-separated list of URLs in 1.2 and later) that will be the codebase annotation for all classes loaded from the CLASSPATH of (and subsequently marshalled by) this JVM.

Note:This property must be set correctly in order to dynamically download classes and interfaces using RMI. If this property is not set correctly, you will likely encounter exceptions when attempting to run your server or client. For more information on this property, see Dynamic code downloading using RMI (Using the java.rmi.server.codebase Property).

java.rmi.server.hostname (1.1 and later)
The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. In 1.1.7 and later, the default value of this property is the IP address of the local host, in "dotted-quad" format.

java.rmi.server.logCalls (1.1 and later)
If this value is true, incoming calls and exceptions thrown from incoming calls will be logged to System.err. Setting this property to true will greatly assist you in debugging your RMI programs. See also sun.rmi.server.exceptionTrace.

java.rmi.server.randomIDs (1.1.8 and later)
If this value is true, object identifiers for remote objects exported by this JVM will be generated by using a cryptographically secure random number generator. The default value is false.

java.rmi.server.useCodebaseOnly (1.1 and later)
If this value is true, automatic loading of classes is prohibited except from the local CLASSPATH and from the java.rmi.server.codebase property set on this JVM. Use of this property prevents client JVMs from dynamically downloading bytecodes from other codebases. This property is ignored in the implementations of 1.2 and 1.2.1 because of a bug.

java.rmi.server.useLocalHostName (1.1.7 and later)
RMI now uses an IP address to identify the local host when the java.rmi.server.hostname property is not specified and a fully qualified domain name for the localhost cannot be obtained. In order to force RMI to use the fully qualified domain name by default, you need to set the this property to true.

Properties that are useful to set on JVMs that make remote method calls

java.rmi.server.codebase (1.1 and later)
This property specifies the locations from which classes that are published by this JVM (for example, custom classes that implement an interface that is the declared parameter type of a remote method call) may be downloaded. The value of this property is a string in URL format (or a space-separated list of URLs in 1.2 and later) that will be the codebase annotation for all classes loaded from the CLASSPATH of (and subsequently marshalled by) this JVM.

Note: Classes that exist in both the server's codebase and the client's CLASSPATH will be loaded from the client's CLASSPATH, rather than from the server's codebase as intended. For more information on this property, see Dynamic code downloading using RMI (Using the java.rmi.server.codebase Property).

java.rmi.server.disableHttp (1.1 and later)
If this value is true, HTTP tunneling is disabled, even when http.proxyHost is set. The default value is false. If you know that your program will never need to use HTTP tunneling, then by disabling HTTP tunneling, you should see shorter timeouts for failed connections.

java.rmi.server.useCodebaseOnly (1.1 and later)
If this value is true, automatic loading of classes is prohibited except from the local CLASSPATH and from the java.rmi.server.codebase property set on this JVM. Use of this property prevents client JVMs from dynamically downloading bytecodes from other codebases. This property is ignored in the implementations of 1.2 and 1.2.1 because of a bug.
We are very interested in knowing whether this information is useful. Please send any comments or suggestions to: rmi-comments@java.sun.com, with a subject of "java.rmi properties FAQ".

*As used on this web site, the terms "Java(TM) virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


    Remote Object Activation

 Documentation Comments
    Prior to the release of the JavaTM 2 SDK, an instance of a UnicastRemoteObject could be accessed from a program that (1) created an instance of the remote object, and (2) ran all the time. Now with the introduction of the class java.rmi.activation.Activatable and the RMI daemon, rmid, programs can be written to register information about remote object implementations that should be created and execute "on demand", rather than running all the time. The RMI daemon, rmid, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned.

    Starting out with activation
    None of the activation tutorials should be the first material you read on RMI. If you have never used RMI before, you should take a look at Getting Started before you try these. The first three activation tutorials are intended for developers who have had some experience developing Java programs that access remote objects by means of the RMI classes provided as part of the Java 2 SDK.

    • Creating an Activatable Object

      • This tutorial illustrates the process of creating a new class that extends java.rmi.activation.Activatable.
    • Making a UnicastRemoteObject Activatable

      • This tutorial takes you through the process of moving an existing remote object implementation, that extends UnicastRemoteObject, to a class that extends java.rmi.activation.Activatable.
    • Activating an object that does not extend java.rmi.activation.Activatable

      • This tutorial shows you how to use the static method Activatable.exportObject in the constructor of a class that does not extend from Activatable, and how to create a remote interface, based on the methods that should be made available to remote clients.

    Going further with activation
    This next tutorial on using a MarshalledObject is intended for developers who have gone through at least one of the first three activation tutorials. More tutorials may be added to this section in a future release, based on your feedback.
    • Using a MarshalledObject to create persistent data

For all of the source code used in the activation tutorials, you may choose from these formats:

  • activation.zip
  • activation.tar
  • activation.tar.Z
For more information on object activation, you can also refer to the RMI Specification.

We are very interested in knowing whether these tutorials are useful. Please send any comments or suggestions to: rmi-comments@java.sun.com, with a subject of "activation tutorials". *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


RMI Release Notes

 Contents of the
JavaTM 2 SDK,
Standard Edition,
v 1.3
Bug Fixes in 1.3.1
"accept" java.net.SocketPermission requirement for receiving remote calls
Due to a bug in previous J2SE implementations, it was possible to export a remote object in a given access control context and then receive a remote call to that object over a given socket connection even if the access control context did not have "accept" java.netSocketPermission for the remote java.net.InetAddress and port of the socket connection.

This bug has been fixed; therefore, in some cases, code that exports remote objects might need to be granted more permissions that it did with previous implementations in order to function correctly.

As an example of how to grant such permissions using the default security policy file syntax, permission to accept socket connections from a host named terrier.east.sun.com can be expressed by the following permission entry (in the grant entry for the appropriate code source):

permission java.net.SocketPermission "terrier.east.sun.com", "accept";
As desrcibed in the documentation for java.netSocketPermission, the host specification may begin with a wildcard "*"; therefore, permission to accept socket connections for any host can be expressed by the following permission entry in a given grant entry:
permission java.net.SocketPermission "*", "accept";

Unexported remote objects not getting garbage collected
In previous implementations, under certain conditions, the RMI runtime would strongly refer to a remote object even after it has been explicitly unexported. This bug has been fixed so that the RMI runtime will never refer to a remote object that has been explicitly unexported.

ObjectOutputStream replacement table performance
In previous implementations, an ObjectOutputStream instance remembered replaced objects (that is, those objects which have been returned by a call to ObjectOutputStream.replaceObject or by a class-defined writeReplace method) in such a way that a linear search was used to determine whether or not an object had a replacement. Therefore, if the number of objects replaced in a given stream was large, the overhead of the search became prohibitively expensive for each new object serialized. This bug has been fixed so that the implementation now uses a more efficient algorithm for remembering for object replacements. This fix to the object serialization implementation also benefits the scalability of object replacement during RMI argument and return value marshalling.
Serialization Enhancements (notable for RMI)
Strings longer than 64K can now be serialized (since 1.3)
Prior to 1.3, an attempt to serialize a string longer than 64K would result in a java.io.UTFDataFormatException being thrown. In 1.3, the serialization protocol has been enhanced to allow strings longer than 64K to be serialized. RMI will also allow these longer strings to be passed in RMI calls between 1.3-compatible Java virtual machines* (JVMs). Note that if a 1.2 (or earlier) JVM attempts to read a long string written from a 1.3-compatible JVM, the 1.2 (or earlier) JVM will receive a java.io.StreamCorruptedException.

Serialization performance enhancements (since 1.3)
UTF read and write performance has improved significantly in 1.3. Additionally, writing the fields of an object during default serialization and reading the fields of an object during default deserialization is up to 20% faster. Other general implementation improvements have also increased performance up to an additional 20%. These serialization improvements have increased the overall performance of RMI calls that pass objects as parameters or return values.

Improved exception reporting (since 1.3)
If a class can not be found during the class resolution process of deserialization, the original java.lang.ClassNotFoundException is thrown instead of a generic one so that more information about the failure is available. Another improvement to deserialization exception reporting includes maintaining the name of the original class that could not be found instead of reporting a higher-level class that was being deserialized. For example, if (in an RMI call) the stub class can be found but the remote interface class cannot, the serialization mechanism will now report correctly that the interface class was the class that could not be found instead of erroneously reporting that the stub class could not be found.
RMI Enhancements
java.rmi.activation.ActivationGroupDesc (since 1.3)
The getClassName method, which returns the group's class name, can now return null, indicating the system's default group implementation. Previously, the getClassName method would return the name of the internal implementation class if the default group implementation was chosen when the descriptor was constructed.

Due to this change, if an application running in a 1.3 JVM registers an new activatable object with the ActivationSystem, rmid must also be upgraded to run 1.3, since a pre-1.3 rmid will not be able to activate the newly registered activatable object.

Constructors of activatable objects (since 1.3)
An activatable object's "activation" constructor, which takes an ActivationID and a MarshalledObjectas arguments and which is called by the ActivationInstantiator each time the object is activated, can now be private or protected. Previously, the implementation only allowed public activation constructors.

Serializing remote objects (since 1.2.2)
Prior to 1.2.2, an attempt to pass an unexported remote object in a RMI call would result in a java.rmi.StubNotFoundException. This exception was a result of the RMI runtime's failure to locate a stub object during an attempt to replace a remote object implementation with its corresponding stub. In 1.2.2 and later releases, an unexported remote object passed in an RMI call will no longer result in an exception, but rather the remote object will be serialized instead of its stub. If the remote object implementation is not serializable, an attempt to pass an unexported object in an RMI call will result in a java.rmi.RemoteException with the nested exception java.io.NotSerializableException.

java.rmi.server.RMIClassLoader (since 1.3)
java.rmi.server.RMIClassLoader has a new method, getClassLoader. This method returns the class loader that RMI uses to load classes from a specified codebase URL path. This API can be used in an implementation that requires complete RMI marshalling/unmarshalling behavior. See java.rmi.server.RMIClassLoader for details.
Changes to RMI Tools
The RMI Stub Compiler, rmic
  • By default, rmic now assumes that the destination directory for generated stubs is the package-named subdirectory of the current working directory. If the "-d" option is not specified, the result is the same as though it were specified with the current working directory "." as an argument. The "-d" may still be used to override the default destination directory.
  • Two new options, "-idl" and "-iiop" have been added to generate IDL and stubs for IIOP, respectively.
The RMI Activation Daemon, rmid
By default, rmid now requires a security policy file.

*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Subscribing/Unsubscribing to the RMI-USERS List

To subscribe:

  • Send email to: listserv@java.sun.com
  • In the body of the message, type: subscribe RMI-USERS

    After subscribing, you can choose to receive all of the RMI-USERS daily email batched into just just a few email messages:

    • Send email to: listserv@java.sun.com
    • In the body of the message, type: set RMI-USERS digest

    If you decide at a later time that you'd rather receive all of the email messages individually:

    • Send email to: listserv@java.sun.com
    • In the body of the message, type: set RMI-USERS nodigest

To unsubscribe:

  • Send email to: listserv@java.sun.com
  • In the body of the message, type: signoff RMI-USERS

If you'd like to check out the RMI-USERS email archives, they can be found here .

You may also want to take a look at the answers to Frequently Asked Questions about RMI and Object Serialization .

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


The Scoop on RMI and SSL

In response to frequent discussions on RMI and SSL on the RMI users list, the RMI group here at Sun is providing a page that tells the RMI/SSL story. If this is a topic that interests you, or if you are interested in being included in the communications of the RMI development community you'll want to subscribe to the rmi-users list.

Below are some questions and answers about SSL and RMI. If you have any comments or questions that are not addressed by this document, please send mail to rmi-comments@java.sun.com .

Q1: Is it possible to use SSL with RMI?

A1: Yes, it is possible, due to RMI enhancements available in the JavaTM 2 SDK, Standard Edition, v1.2 (Java 2 SDK).

Q2: How do I use SSL with RMI?

A2: The version of RMI included in the Java 2 SDK enables the RMI developer to use custom socket types. In earlier versions of RMI there could only be one type of socket used per Java virtual machine* (JVM), but now RMI allows each object to use a different type of socket for its RMI connections. All an application has to do is install an RMI socket factory that creates sockets of the desired type (that speak a particular protocol). We have a tutorial on creating a custom RMI socket factory. Where to get the Java programming language implementation of SSL is discussed next.

Q3: Does SunTM have a pure Java programming language implementation of SSL?

A3: The HotJavaTM Browser, JavaTM Web ServerTM, and JavaServerTM Toolkit all provide secure communications using a Java programming language implementation of SSL from Sun. In addition, Sun has a stand-alone Java programming language implementation of SSL for the Java 2 platform, the JavaTM Secure Socket Extension (JSSE) 1.0.

Q4: Does Sun recommend any third party pure Java programming language implementations of SSL?

A4: While we do not endorse any one vendor's implementation, we would like to provide a list of available SSL implementations written in the Java programming language.

Most implementations of SSL use RSA algorithms. In the U.S. the use of RSA algorithms must be licensed from RSA. Therefore, U.S. customers have to take special care to understand all the legal ramifications of the implementations they choose. As a result, the available implementations will be listed in two categories: U.S. implementations and non-U.S. implementations. U.S. Implementations:

  • Phaos Technology's SSLava Toolkit

    • Phaos has made available an example which shows how to use SSLava with RMI.
Non-U.S. Implementations:
  • Protekt SSL Software from Forge Information Technology
  • Baltimore Technologies' J/SSL
  • IAIK's iSaSiLk
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


XorSocket Implementation

  • XorInputStream.java
  • XorOutputStream.java
  • XorServerSocket.java
  • XorSocket.java
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Activating an object that does not extend java.rmi.activation.Activatable

This tutorial shows you the steps for enabling an existing class to become activatable. If you are interested in finding out about Creating an Activatable Object or Making a UnicastRemoteObject Activatable, these are also available as tutorials.

Prior to the release of the JavaTM 2 SDK, an instance of a class that did not extend from UnicastRemoteObject could be accessed from a server program that (1) created an instance of the remote object, and (2) ran all the time. This functionality was provided by creating a constructor which exported the object by calling the static method UnicastRemoteObject.exportObject. The exportObject method accepts as an argument an object that implements an interface that extends from java.rmi.Remote.

Now with the introduction of the class java.rmi.activation.Activatable and the RMI daemon, rmid, programs can be written to register information about remote object implementations that should be created and execute "on demand," rather than running all the time. The RMI daemon, rmid, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned. As in the UnicastRemoteObject.exportObject case, activatable objects may be exported using a static method, Activatable.exportObject, and these objects must implement a remote interface.

Note: For the remainder of this tutorial, the terms "activatable object implementation", "activatable object," and "implementation" may be used interchangeably to refer to the class, examples.activation.MyClass, which implements a remote interface and is activatable.

This tutorial is organized as follows:

  • The steps to create a remote interface
  • The steps to modify the implementation class
  • The steps to create the setup class
  • The steps to compile and run the example code
The files needed for this tutorial are:
  • Client3.java, the class which will invoke a method on an activatable object
  • AnotherRemoteInterface.java, the interface that extends java.rmi.Remote, implemented by:
  • MyClass.java, the class which is being modified to be activatable
  • Setup3.java, the class which registers information about the activatable class with the RMI registry and the RMI daemon

You may notice that while the client code is included, it is not discussed in a step-by-step manner, like the implementation and setup classes. The reason for this omission, is that the client code for activatable objects is no different than the RMI client code for accessing non-activatable remote objects. Activation is strictly a server-side implementation decision.

For all of the source code used in the activation tutorials, you may choose from these formats:

  • activation.zip
  • activation.tar
  • activation.tar.Z

Creating the remote interface

Create an interface that describes each of the methods that you would like to call remotely. For this example, the remote interface will be examples.activation.AnotherRemoteInterface. There are three steps to create a remote interface.

  1. Make the appropriate imports in the interface
  2. Extend java.rmi.Remote
  3. Declare each of the methods that may be called remotely

Step 1:
Make the appropriate imports in your interface

import java.rmi.*;

Step 2:
Extend java.rmi.Remote

public interface AnotherRemoteInterface extends Remote {

Step 3:
Declare each of the methods that may be called remotely

public String calltheServer(String s) throws RemoteException;

Creating the implementation class

For this example, the implementation class will be examples.activation.MyClass. There are three steps to migrate a class which does not extend Activatable or UnicastRemoteObject to become activatable:

  1. Make the appropriate imports in the implementation class
  2. Modify the class declaration so that the class now implements an interface that extends from java.rmi.Remote
  3. Declare a two-argument constructor in the implementation class
Step 1:
Make the appropriate imports in the implementation class
import java.rmi.*;
import java.rmi.activation.*;

Step 2:
Modify the class declaration so that the class implements an interface that extends from java.rmi.Remote

public class MyClass
    implements examples.activation.AnotherRemoteInterface
{
Step 3:
Add a new two-argument constructor to the implementation class
public MyClass(ActivationID id, MarshalledObject data)
    throws RemoteException
{
    // Register the object with the activation system
    // then export it on an anonymous port
    //
    Activatable.exportObject(this, id, 0);
}

Creating the "setup" class

The job of the "setup" class is to create all the information necessary for the activatable class, without necessarily creating an instance of the remote object. For this example, the setup class will be examples.activation.Setup3.

The setup class passes information about the activatable class to rmid, registers a remote reference (an instance of the activatable class's stub class) and an identifier (name) with the rmiregistry, and then the setup class may exit. There are seven steps to create a setup class:

  1. Make the appropriate imports
  2. Install a SecurityManager
  3. Create an ActivationGroup instance
  4. Create an ActivationDesc instance
  5. Remove the reference to the implementation class creation, and register with rmid
  6. Bind the stub to a name in the rmiregistry
  7. Quit the setup application

Step 1:
Make the appropriate imports in the setup class

import java.rmi.*;
import java.rmi.activation.*
import java.util.Properties;

Step 2:
Install a SecurityManager

System.setSecurityManager(new RMISecurityManager());

Step 3:
Create an ActivationGroup instance

Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents:

    Default Policy Implementation and Policy File Syntax

    Permissions in the Java 2 SDK

In the setup application, the job of the activation group descriptor is to provide all the information that rmid will require to contact the appropriate existing JVM or spawn a new JVM for the activatable object.

Note: In order to run this code on your system, you'll need to change the policy file location to be the absolute path to where you've installed the example policy file that came with the source code.

// Because of the Java 2 security model, a security policy should
// be specified for the ActivationGroup VM. The first argument
// to the Properties put method, inherited from Hashtable, is
// the key and the second is the value
//
Properties props = new Properties();
props.put("java.security.policy",
   "/home/rmi_tutorial/activation/policy");

ActivationGroupDesc.CommandEnvironment ace = null;
ActivationGroupDesc exampleGroup = new ActivationGroupDesc(props, ace);

// Once the ActivationGroupDesc has been created, register it
// with the activation system to obtain its ID
//
ActivationGroupID agi =
   ActivationGroup.getSystem().registerGroup(exampleGroup);

Step 4:
Create an ActivationDesc instance

In the setup application, the job of the activation descriptor is to provide all the information that rmid will require to create a new instance of the implementation class.

Note: In order to run this code on your system, you'll need to change the file URL location to be the location of the directory on your system, where you've installed the example source code.

// The "location" URL specifies where the class definition
// will come from when this object is requested (activated).
// Don't forget the trailing slash at the end of the URL
// or your classes won't be found
//
String location = "file:/home/rmi_tutorial/activation/";

// Create the rest of the parameters that will be passed to
// the ActivationDesc constructor
//
MarshalledObject data = null;

// The second argument to the ActivationDesc constructor will be used
// to uniquely identify this class; it's location is relative to the
// URL-formatted String, location.
//
ActivationDesc desc = new ActivationDesc
    ("examples.activation.MyClass", location, data);

Step 5:
Declare an instance of your remote interface and register the activation descriptor with rmid

AnotherRemoteInterface ari =
    (AnotherRemoteInterface)Activatable.register(desc);
System.out.println("Got the stub for MyClass");

Step 6:
Bind the stub, that was returned by the Activatable.register method, to a name in the rmiregistry

Naming.rebind("MyClass", ari);
System.out.println("Exported MyClass");

Step 7:
Quit the setup application

System.exit(0);

Compile and run the code

There are six steps to compile and run the code:

  1. Compile the remote interface, implementation, client and setup classes
  2. Run rmic on the implementation class
  3. Start the rmiregistry
  4. Start the activation daemon, rmid
  5. Run the setup program
  6. Run the client

    Step 1:
    Compile the remote interface, implementation, client and setup classes

    % javac -d . AnotherRemoteInterface.java
% javac -d . MyClass.java
% javac -d . Client3.java
% javac -d . Setup3.java

    Step 2:
    Run rmic on the implementation class

    % rmic -d . examples.activation.MyClass

    Step 3:
    Start the rmiregistry

    % rmiregistry &

    Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

    If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object.

    Step 4:
    Start the activation daemon, rmid

    % rmid -J-Djava.security.policy=rmid.policy &
    Where rmid.policy is the name of the security policy file for rmid.

    Note: By default, rmid now requires a security policy file, that is used to verify whether or not the information in each ActivationGroupDescriptor is allowed to be used to launch a JVM for an activation group. For complete details, please refer to the rmid man page for the Solaris operating environment and the rmid man page for the Microsoft Windows platform.

    Step 5:
    Run the setup program

    Run the setup, setting the codebase property to be the location of the implementation stubs. There are four things that need to go on the same command line:

    1. The "java" command
    2. A property name=value pair that specifies the location of the security policy file
    3. A property to specify where the stub code lives (no spaces from the "-D" all the way though the last "/")
    4. The fully-qualified package name of the setup program.

    There should be one space just after the word "java", one between the two properties, and a third one just before the word "examples" (which is very hard to see when you view this as text, in a browser, or on paper).

    % java  -Djava.security.policy=/home/rmi_tutorial/activation/policy  -Djava.rmi.server.codebase=file:/home/rmi_tutorial/activation/  examples.activation.Setup3

    The codebase property will be resolved to a URL, so it must have the form of "http://aHost/somesource/" or "file:/myDirectory/location/" or, due to the requirements of some operating systems, "file:///myDirectory/location/" (three slashes after the "file:").

    While a file: URL is sometimes easier to use for running example code, using the file: URL will mean that the only clients that will be able to access the server are those that can access the same files system as the server (either by virtue of running on the same machine as the server or by using a shared filesystem, such as NFS). If you wish to use an HTTP server, but don't have one available to you, please feel free to download our HTTP server.

    Please note that each of these sample URL strings has a trailing "/". The trailing slash is a requirement for the URL set by the java.rmi.server.codebase property, so the implementation can resolve (find) your class definition(s) properly. For more information on setting the java.rmi.server.codebase property from the command line, please take a look at our tutorial on dynamic code downloading using the java.rmi.server.codebase property.

    If you forget the trailing slash on the property, or if the class files can't be located at the source (they aren't really being made available for download) or if you misspell the property name, you'll get thrown a java.lang.ClassNotFoundException. This exception will be thrown when you try to bind your remote object to the rmiregistry, or when the first client attempts to access that object's stub. If the latter case occurs, you have another problem as well because the rmiregistry was finding the stubs in its CLASSPATH.

    The server output should look like this:

          Got the stub for MyClass
      Exported MyClass
    Step 6:
    Run the client

    The argument to the client program is the hostname of the implementation server, in this case, "vector".

    % java -Djava.security.policy=/home/rmi_tutorial/activation/policy
 examples.activation.Client3 vector

    The client output should look like this:

          Got a remote reference to the class MyClass
      Called the remote method
      Result: Watson are you there?  I'm here!

    An Alternate Approach

    An alternative approach to what we just went through is to create an "adapter" class that implements the remote interface, gets registered with rmid and the registry by the setup program, and which then creates the object instance and forwards the remote method to that instance. The benefit to this approach is that you don't have to make a change to the original non-remote class.

    So, let's assume that the original, non-remote class, looks like this:

      package examples.activation;

  public class MyNonRemoteClass {

      private String result = null;

      // Here's the original class, which concatenates two strings
      //
      public String calltheServer(String takeThis) {

      result = takeThis + "I'm here!";
      return result;
      }

  }

    We write the same interface, examples.activation.AnotherRemoteInterface, to describe the methods we'd like to call remotely:

      package examples.activation;

  import java.rmi.*;

  public interface AnotherRemoteInterface extends Remote {

      public String calltheServer(String s) throws RemoteException;

  }

    But rather than editing MyNonRemoteClass.java, which we may not always have the source code to do anyway, we'll create a new class examples.activation.MyNonRemoteClassAdapter , which (like an event adapter) implements the specified interface, and then takes appropriate action. What's new in MyNonRemoteClassAdapter from what we did earlier, is that it creates an instance of MyNonRemoteClass in it's constructor and it calls the MyNonRemoteClass.calltheServer method.

      package examples.activation;

  import java.rmi.*;
  import java.rmi.activation.*;

  public class MyNonRemoteClassAdapter implements
      examples.activation.AnotherRemoteInterface
  {
      private String result = null;
      private MyNonRemoteClass mnrc;

      // The constructor for activation and export; this
      // constructor is called by the method
      // ActivationInstantiator.newInstance during
      // activation, to construct the object.
      //
      public MyNonRemoteClassAdapter(ActivationID id,
      MarshalledObject data) throws RemoteException
      {
      // Register the object with the activation system
      // then export it on an anonymous port
      //
      Activatable.exportObject(this, id, 0);

      // Create an instance of the class MyNonRemoteClass
      //
      mnrc = new MyNonRemoteClass();
      }

      // Define the method declared in AnotherRemoteInterface
      // to accept a String, modify it, and return it to
      // the client
      //
      public String calltheServer(String takeThis)
      throws RemoteException
      {
      // Rather than modify the String here, forward
      // it on to the non-remote object implementation
      //
      result = mnrc.calltheServer(takeThis);
      return result;
      }

  }

    Now the class we'll run rmic on and the class referenced by the setup program will be the adapter class. The setup program examples.activation.Setup3alt looks like this now:

      package examples.activation;

  import java.rmi.*;
  import java.rmi.activation.*;
  import java.util.Properties;

  public class Setup3alt {

      // This class registers information about the MyClass
      // class with rmid and the rmiregistry
      //
      public static void main(String[] args) throws Exception {

      System.setSecurityManager(new RMISecurityManager());

      AnotherRemoteInterface ari;

      // Don't forget the trailing slash at the end of the URL
      // or your classes won't be found
      //
      String location = "file:/home/rmi_tutorial/activation/";

      // Create the rest of the parameters that will be passed to
      // the ActivationDesc constructor
      //
      MarshalledObject data = null;

      // The second argument to the ActivationDesc constructor
      // will be used to uniquely identify this class; it's
      // location is relative to theURL-formatted String, location.
      //
      ActivationDesc desc = new ActivationDesc
          ("examples.activation.MyNonRemoteClassAdapter",
          location, data);

      ari = (AnotherRemoteInterface)Activatable.register(desc);
      System.out.println("Got the stub for MyNonRemoteClassAdapter");

      // Bind the stub to a name in the registry running on 1099
      //
      Naming.rebind("MyNonRemoteClassAdapter", ari);
      System.out.println("Exported MyNonRemoteClassAdapter");

      System.exit(0);
      }

  }
    *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
    Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
    Please send comments to: rmi-comments@java.sun.com     		Sun


Creating an Activatable Remote Object

Creating an Activatable Object

This tutorial shows you the steps for creating an activatable object by extending java.rmi.activation.Activatable. If you are interested in finding out about Making a UnicastRemoteObject Activatable or Activating an object that does not extend java.rmi.activation.Activatable, these are also available as tutorials.

Prior to the release of the JavaTM 2 SDK, an instance of a UnicastRemoteObject could be accessed from a server program that (1) created an instance of the remote object, and (2) ran all the time. Now with the introduction of the class java.rmi.activation.Activatable and the RMI daemon, rmid, programs can be written to register information about remote object implementations that should be created and execute "on demand," rather than running all the time. The RMI daemon, rmid, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned.

Note: For the remainder of this tutorial, the terms "activatable object implementation", "activatable object," and "implementation" may be used interchangeably to refer to the class, examples.activation.ActivatableImplementation, which implements a remote interface and is activatable.

This tutorial is organized as follows:

  • The steps to create the implementation class
  • The steps to create the setup class
  • The steps to compile and run the example code

The files needed for this tutorial are:

  • Client.java, the class which will invoke a method on an activatable object
  • MyRemoteInterface.java, the interface that extends java.rmi.Remote, implemented by:
  • ActivatableImplementation.java, the class which will be activated
  • Setup.java, the class which registers information about the activatable class with the RMI registry and the RMI daemon

You may notice that while the client code is included, it is not discussed in a step-by-step manner, like the implementation and setup classes. The reason for this omission, is that the client code for activatable objects is no different than the RMI client code for accessing non-activatable remote objects. Activation is strictly a server-side implementation decision.

For all of the source code used in the activation tutorials, you may choose from these formats:

  • activation.zip
  • activation.tar
  • activation.tar.Z

Creating the implementation class

For this example, the implementation class will be examples.activation.ActivatableImplementation. There are four steps to create an implementation class:

  1. Make the appropriate imports in the implementation class
  2. Extend your class from java.rmi.activation.Activatable
  3. Declare a two-argument constructor in the implementation class
  4. Implement the remote interface method(s)
Step 1:
Make the appropriate imports in the implementation class
import java.rmi.*;
import java.rmi.activation.*;

Step 2:
Extend your class from java.rmi.activation.Activatable

public class ActivatableImplementation extends Activatable
    implements examples.activation.MyRemoteInterface {
Step 3:
Declare a two-argument constructor in the implementation class
public ActivatableImplementation(ActivationID id, MarshalledObject data)
    throws RemoteException {
    // Register the object with the activation system
    // then export it on an anonymous port
    super(id, 0);
}

Step 4:
Implement the remote interface method(s)

public Object callMeRemotely() throws RemoteException {
    return "Success";
}

Creating the "setup" class

The job of the "setup" class is to create all the information necessary for the activatable class, without necessarily creating an instance of the remote object. For this example the setup class will be examples.activation.Setup.

The setup class passes the information about the activatable class to rmid, registers a remote reference (an instance of the activatable class's stub class) and an identifier (name) with the rmiregistry, and then the setup class may exit. There are seven steps to create a setup class:

  1. Make the appropriate imports
  2. Install a SecurityManager
  3. Create an ActivationGroup instance
  4. Create an ActivationDesc instance
  5. Declare an instance of your remote interface and register with rmid
  6. Bind the stub to a name in the rmiregistry
  7. Quit the setup application

Step 1:
Make the appropriate imports in the setup class

import java.rmi.*;
import java.rmi.activation.*
import java.util.Properties;

Step 2:
Install a SecurityManager

System.setSecurityManager(new RMISecurityManager());

Step 3:
Create an ActivationGroup instance

Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents:

    Default Policy Implementation and Policy File Syntax

    Permissions in the Java 2 SDK

In the setup application, the job of the activation group descriptor is to provide all the information that rmid will require to contact the appropriate existing JVM or spawn a new JVM for the activatable object.

Note: In order to run this code on your system, you'll need to change the policy file location to be the absolute path to where you've installed the example policy file that came with the source code.

// Because of the Java 2 security model, a security policy should
// be specified for the ActivationGroup VM. The first argument
// to the Properties put method, inherited from Hashtable, is
// the key and the second is the value
//
Properties props = new Properties();
props.put("java.security.policy",
   "/home/rmi_tutorial/activation/policy");

ActivationGroupDesc.CommandEnvironment ace = null;
ActivationGroupDesc exampleGroup = new ActivationGroupDesc(props, ace);

// Once the ActivationGroupDesc has been created, register it
// with the activation system to obtain its ID
//
ActivationGroupID agi =
   ActivationGroup.getSystem().registerGroup(exampleGroup);

Step 4:
Create an ActivationDesc instance

The job of the activation descriptor is to provide all the information that rmid will require to create a new instance of the implementation class.

Note: In order to run this code on your system, you'll need to change the file URL location to be the location of the directory on your system, where you've installed the example source code.

// The "location" String specifies a URL from where the class
// definition will come when this object is requested (activated).
// Don't forget the trailing slash at the end of the URL
// or your classes won't be found.
//
String location = "file:/home/rmi_tutorial/activation/";

// Create the rest of the parameters that will be passed to
// the ActivationDesc constructor
//
MarshalledObject data = null;

// The second argument to the ActivationDesc constructor will be used
// to uniquely identify this class; it's location is relative to the
// URL-formatted String, location.
//
ActivationDesc desc = new ActivationDesc
    ("examples.activation.ActivatableImplementation", location, data);

Step 5:
Declare an instance of your remote interface and register the activation descriptor with rmid

MyRemoteInterface mri = (MyRemoteInterface)Activatable.register(desc);
System.out.println("Got the stub for the ActivatableImplementation");

Step 6:
Bind the stub, that was returned by the Activatable.register method, to a name in the rmiregistry

Naming.rebind("ActivatableImplementation", mri);
System.out.println("Exported ActivatableImplementation");

Step 7:
Quit the setup application

System.exit(0);

Compile and run the code

There are six steps to compile and run the code:

  1. Compile the remote interface, implementation, client, and setup classes
  2. Run rmic on the implementation class
  3. Start the rmiregistry
  4. Start the activation daemon, rmid
  5. Run the setup program
  6. Run the client

Step 1:
Compile the remote interface, implementation, client and setup classes

% javac -d . MyRemoteInterface.java
% javac -d . ActivatableImplementation.java
% javac -d . Client.java
% javac -d . Setup.java

Step 2:
Run rmic on the implementation class

% rmic -d . examples.activation.ActivatableImplementation

Step 3:
Start the rmiregistry

% rmiregistry &

Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object.

Step 4:
Start the activation daemon, rmid

% rmid -J-Djava.security.policy=rmid.policy &
Where rmid.policy is the name of the security policy file for rmid.

Note: By default, rmid now requires a security policy file, that is used to verify whether or not the information in each ActivationGroupDescriptor is allowed to be used to launch a JVM for an activation group. For complete details, please refer to the rmid man page for the Solaris operating environment and the rmid man page for the Microsoft Windows platform.

Step 5:
Run the setup program

Run the setup, setting the codebase property to be the location of the implementation stubs. There are four things that need to go on the same command line:

  1. The "java" command
  2. A property name=value pair that specifies the location of the security policy file
  3. A property to specify where the stub code lives (no spaces from the "-D" all the way though the last "/")
  4. The fully-qualified package name of the setup program.

There should be one space just after the word "java", one between the two properties, and a third one just before the word "examples" (which is very hard to see when you view this as text, in a browser, or on paper).

% java  -Djava.security.policy=/home/rmi_tutorial/activation/policy   -Djava.rmi.server.codebase=file:/home/rmi_tutorial/activation/  examples.activation.Setup

The codebase property will be resolved to a URL, so it must have the form of "http://aHost/somesource/" or "file:/myDirectory/location/" or, due to the requirements of some operating systems, "file:///myDirectory/location/" (three slashes after the "file:").

While a file: URL is sometimes easier to use for running example code, using the file: URL will mean that the only clients that will be able to access the server are those that can access the same files system as the server (either by virtue of running on the same machine as the server or by using a shared filesystem, such as NFS). If you wish to use an HTTP server, but don't have one available to you, please feel free to download our HTTP server.

Please note that each of these sample URL strings has a trailing "/". The trailing slash is a requirement for the URL set by the java.rmi.server.codebase property, so the implementation can resolve (find) your class definition(s) properly. For more information on setting the java.rmi.server.codebase property from the command line, please take a look at our tutorial on dynamic code downloading using the java.rmi.server.codebase property.

If you forget the trailing slash on the property, or if the class files can't be located at the source (they aren't really being made available for download) or if you misspell the property name, you'll get thrown a java.lang.ClassNotFoundException. This exception will be thrown when you try to bind your remote object to the rmiregistry, or when the first client attempts to access that object's stub. If the latter case occurs, you have another problem as well because the rmiregistry was finding the stubs in its CLASSPATH.

The server output should look like this:

      Got the stub for the ActivatableImplementation
      Exported ActivatableImplementation

Step 6:
Run the client

The argument to the examples.activation.Client program is the hostname of the implementation server, in this case, "vector".

% java -Djava.security.policy=/home/rmi_tutorial/activation/policy
 examples.activation.Client vector

The client output should look like this:

      Got a remote reference to the object that extends Activatable.
      Making remote call to the server
      Returned from remote call
      Result: Success
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Making a UnicastRemoteObject Activatable

This tutorial shows you the steps for migrating an existing UnicastRemoteObject to an activatable object by extending java.rmi.activation.Activatable. This page is just for developers who wish to change an existing class from being a sub-class of UnicastRemoteObject to being a sub-class of java.rmi.activation.Activatable. If you are interested in finding out about Creating an Activatable Object or Activating an object that does not extend java.rmi.activation.Activatable, these are also available as tutorials.

Prior to the release of the JavaTM 2 SDK, an instance of a UnicastRemoteObject could be accessed from a server program that (1) created an instance of the remote object, and (2) ran all the time. Now with the introduction of the class java.rmi.activation.Activatable and the RMI daemon, rmid, programs can be written to register information about remote object implementations that should be created and execute "on demand," rather than running all the time. The RMI daemon, rmid, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned.

Note: For the remainder of this tutorial, the terms "activatable object implementation", "activatable object," and "implementation" may be used interchangeably to refer to the class, examples.activation.MyRemoteInterfaceImpl, which implements a remote interface and is activatable.

This tutorial is organized as follows:

  • The steps to modify the implementation class
  • The steps to modify the server class
  • The steps to compile and run the example code

The files needed for this tutorial are:

  • Client2.java, the class which will invoke a method on an activatable object
  • MyRemoteInterface.java, the interface that extends java.rmi.Remote, implemented by:
  • MyRemoteInterfaceImpl.java, the class which will be activated
  • Setup2.java, the class which registers information about the activatable class with the RMI registry and the RMI daemon

You may notice that while the client code is included, it is not discussed in a step-by-step manner, like the implementation and setup classes. The reason for this omission, is that the client code for activatable objects is no different than the RMI client code for accessing non-activatable remote objects. Activation is strictly a server-side implementation decision.

For all of the source code used in the activation tutorials, you may choose from these formats:

  • activation.zip
  • activation.tar
  • activation.tar.Z

Creating the implementation class

For this example, the implementation class will be examples.activation.MyRemoteInterfaceImpl. There are four steps to migrate an existing implementation class that extends from UnicastRemoteObject:

  1. Make the appropriate imports in the implementation class
  2. Modify the class declaration so that the class now extends from java.rmi.activation.Activatable
  3. Remove or comment out the old no-argument constructor
  4. Declare a two-argument constructor in the implementation class
Step 1:
Make the appropriate imports in the implementation class
import java.rmi.*;
import java.rmi.activation.*;

Step 2:
Modify the class declaration so that the class now extends from java.rmi.activation.Activatable

public class MyRemoteInterfaceImpl extends Activatable
    implements examples.activation.MyRemoteInterface {
Step 3:
Remove or comment out the old no-argument constructor
// public MyRemoteInterfaceImpl() throws RemoteException
// {
// }

Step 4:
Declare a two-argument constructor in the implementation class

public MyRemoteInterfaceImpl(ActivationID id, MarshalledObject data)
    throws RemoteException {

    // Register the object with the activation system
    // then export it on an anonymous port
    //
    super(id, 0);
}

Creating the "setup" class

Unlike the RMI server class that must stay alive as long as the implementation needs to be made available, the job of the "setup" class is to create all the information necessary for the activatable class, without necessarily creating an instance of the remote object. For this example the setup class will be examples.activation.Setup2.

The setup class passes information about the activatable class to rmid, registers a remote reference (an instance of the activatable class's stub class) and an identifier (name) with the rmiregistry, and then the setup class may exit. There are seven steps to create a setup class:

  1. Make the appropriate imports
  2. Install a SecurityManager
  3. Create an ActivationGroup instance
  4. Create an ActivationDesc instance
  5. Remove the reference to the implementation class creation, and register with rmid
  6. Bind the stub to a name in the rmiregistry
  7. Quit the setup application

Step 1:
Make the appropriate imports in the setup class

import java.rmi.*;
import java.rmi.activation.*
import java.util.Properties;

Step 2:
Install a SecurityManager

System.setSecurityManager(new RMISecurityManager());

Step 3:
Create an ActivationGroup instance

Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents:

    Default Policy Implementation and Policy File Syntax

    Permissions in the Java 2 SDK

In the setup application, the job of the activation group descriptor is to provide all the information that rmid will require to contact the appropriate existing JVM or spawn a new JVM for the activatable object.

Note: In order to run this code on your system, you'll need to change the policy file location to be the absolute path to where you've installed the example policy file that came with the source code.

// Because of the Java 2 security model, a security policy should
// be specified for the ActivationGroup VM. The first argument
// to the Properties put method, inherited from Hashtable, is
// the key and the second is the value
//
Properties props = new Properties();
props.put("java.security.policy",
   "/home/rmi_tutorial/activation/policy");

ActivationGroupDesc.CommandEnvironment ace = null;
ActivationGroupDesc exampleGroup = new ActivationGroupDesc(props, ace);

// Once the ActivationGroupDesc has been created, register it
// with the activation system to obtain its ID
//
ActivationGroupID agi =
   ActivationGroup.getSystem().registerGroup(exampleGroup);

Step 4:
Create an ActivationDesc instance

In the setup application, the job of the activation descriptor is to provide all the information that rmid will require to create a new instance of the implementation class.

Note: In order to run this code on your system, you'll need to change the file URL location to be the location of the directory on your system, where you've installed the example source code.

// Don't forget the trailing slash at the end of the URL
// or your classes won't be found
//
String location = "file:/home/rmi_tutorial/activation/";

// Create the rest of the parameters that will be passed to
// the ActivationDesc constructor
//
MarshalledObject data = null;

// The second argument to the ActivationDesc constructor will be used
// to uniquely identify this class; it's location is relative to the
// URL-formatted String, location.
//
ActivationDesc desc = new ActivationDesc
    ("examples.activation.MyRemoteInterfaceImpl", location, data);

Step 5:
Remove the reference to the implementation class creation, declare an instance of your remote interface, and register the activation descriptor with rmid

// MyRemoteInterfaceImpl mri = new MyRemoteInterfaceImpl();
// the above line is replaced with the following:
//
MyRemoteInterface mri = (MyRemoteInterface)Activatable.register(desc);
System.out.println("Got the stub for the MyRemoteInterfaceImpl");

Step 6:
Bind the stub, that was returned by the Activatable.register method, to a name in the rmiregistry

Naming.rebind("MyRemoteInterfaceImpl", mri);
System.out.println("Exported MyRemoteInterfaceImpl");

Step 7:
Quit the setup application

System.exit(0);

Compile and run the code

There are six steps to compile and run the code:

  1. Compile the remote interface, implementation, client, and setup classes
  2. Run rmic on the implementation class
  3. Start the rmiregistry
  4. Start the activation daemon, rmid
  5. Run the setup program
  6. Run the client

Step 1:
Compile the remote interface, implementation, client and setup classes

% javac -d . MyRemoteInterface.java
% javac -d . MyRemoteInterfaceImpl.java
% javac -d . Client2.java
% javac -d . Setup2.java

Step 2:
Run rmic on the implementation class

% rmic -d . examples.activation.MyRemoteInterfaceImpl

Step 3:
Start the rmiregistry

% rmiregistry &

Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object.

Step 4:
Start the activation daemon, rmid

% rmid -J-Djava.security.policy=rmid.policy &
Where rmid.policy is the name of the security policy file for rmid.

Note: By default, rmid now requires a security policy file, that is used to verify whether or not the information in each ActivationGroupDescriptor is allowed to be used to launch a JVM for an activation group. For complete details, please refer to the rmid man page for the Solaris operating environment and the rmid man page for the Microsoft Windows platform.

Step 5:
Run the setup program

Run the setup, setting the codebase property to be the location of the implementation stubs. There are four things that need to go on the same command line:

  1. The "java" command
  2. A property name=value pair that specifies the location of the security policy file
  3. A property to specify where the stub code lives (no spaces from the "-D" all the way though the last "/")
  4. The fully-qualified package name of the setup program.

There should be one space just after the word "java", one between the two properties, and a third one just before the word "examples" (which is very hard to see when you view this as text, in a browser, or on paper).

% java  -Djava.security.policy=/home/rmi_tutorial/activation/policy  -Djava.rmi.server.codebase=file:/home/rmi_tutorial/activation/  examples.activation.Setup2

The codebase property will be resolved to a URL, so it must have the form of "http://aHost/somesource/" or "file:/myDirectory/location/" or, due to the requirements of some operating systems, "file:///myDirectory/location/" (three slashes after the "file:").

While a file: URL is sometimes easier to use for running example code, using the file: URL will mean that the only clients that will be able to access the server are those that can access the same files system as the server (either by virtue of running on the same machine as the server or by using a shared filesystem, such as NFS). If you wish to use an HTTP server, but don't have one available to you, please feel free to download our HTTP server.

Please note that each of these sample URL strings has a trailing "/". The trailing slash is a requirement for the URL set by the java.rmi.server.codebase property, so the implementation can resolve (find) your class definition(s) properly. For more information on setting the java.rmi.server.codebase property from the command line, please take a look at our tutorial on dynamic code downloading using the java.rmi.server.codebase property.

If you forget the trailing slash on the property, or if the class files can't be located at the source (they aren't really being made available for download) or if you misspell the property name, you'll get thrown a java.lang.ClassNotFoundException. This exception will be thrown when you try to bind your remote object to the rmiregistry, or when the first client attempts to access that object's stub. If the latter case occurs, you have another problem as well because the rmiregistry was finding the stubs in its CLASSPATH.

The server output should look like this:

    Got the stub for the MyRemoteInterfaceImpl
    Exported MyRemoteInterfaceImpl
Step 6:
Run the client

The argument to the client program is the hostname of the implementation server, in this case, "vector".

% java -Djava.security.policy=/home/rmi_tutorial/activation/policy
examples.activation.Client2 vector

The client output should look like this:

    Got a remote reference to the newly-Activatable object
    Returned from remote call
    Result: Successful execution of callMeRemotely() in MyRemoteInterfaceImpl
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Using a MarshalledObject to create persistent data

This tutorial should not be the first activation tutorial that you read. This tutorial assumes that you have already read one or more of the three introductory activation tutorials:

  • Creating an Activatable Object
  • Making a UnicastRemoteObject Activatable
  • Activating an object that does not extend java.rmi.activation.Activatable

In the case of a UnicastRemoteObject, it is easy to pass command-line arguments to the implementation class, because the server program that received those arguments is always running during the lifetime of the remote object implementation. For activatable objects, however, the setup class may exit immediately after registering the activation descriptor with the RMI daemon and registering the stub with the rmiregistry.

The MarshalledObject class provides a flexible mechanism for passing persistence or initialization data through the ActivationDesc, registered with rmid, rather than hard-coding values into the implementation's class file.

Note: For the remainder of this tutorial, the terms "activatable object implementation", "activatable object," and "implementation" may be used interchangeably to refer to the class, examples.activation.MyPersistentClass, which implements a remote interface and is activatable.

In this tutorial the setup class, examples.activation.Setup4, does two new things:

  • It constructs a java.util.Properties object to pass the location of the java.security.properties file to the constructor of an ActivationGroupDescriptor, which in turn, gets passed to the constructor of the ActivationDesc.
  • It uses the MarshalledObject, that it passes to the ActivationDesc constructor, to store a java.io.File object that represents the location of the persistent data storage.

In this example, if the persistentObjectStore.ser file exists, the activatable object implementation is initialized with the persistent data from the file. Otherwise, if the file does not exist, the activatable object initializes itself as though this is the first time a client has tried to send data.

The client program, examples.activation.Client4, passes a vector of transaction-like data to the activatable object, and that data is added to the implementation object's vector. Each time a client calls the implementation (to add more transaction data), the activatable implementation stores its state (writes the vector) out to the file specified by the MarshalledObject.

This tutorial is organized as follows:

  • The steps to create a remote interface
  • The steps to create the implementation class
  • The steps to create the setup class
  • The steps to compile and run the example code
The files needed for this tutorial are:
  • Client4.java, the class which will invoke a method on an activatable object
  • YetAnotherRemoteInterface.java, the interface that extends java.rmi.Remote, implemented by:
  • MyPersistentClass.java, the class which is activatable
  • Setup4.java, the class which registers information about the activatable class with the RMI registry and the RMI daemon

You may notice that while the client code is included, it is not discussed in a step-by-step manner, like the implementation and setup classes. The reason for this omission, is that the client code for activatable objects is no different than the RMI client code for accessing non-activatable remote objects. Activation is strictly a server-side implementation decision.

For all of the source code used in the activation tutorials, you may choose from these formats:

  • activation.zip
  • activation.tar
  • activation.tar.Z

Creating the remote interface

Create an interface that describes each of the methods that you would like to call remotely. For this example, the remote interface will be examples.activation.YetAnotherRemoteInterface. There are three steps to create a remote interface:

  1. Make the appropriate imports in the interface
  2. Extend java.rmi.Remote
  3. Declare each of the methods that may be called remotely
Step 1:
Make the appropriate imports in your interface
import java.rmi.*;
import java.util.Vector;
Step 2:
Extend java.rmi.Remote
public interface YetAnotherRemoteInterface extends Remote {
Step 3:
Declare each of the methods that may be called remotely
public Vector calltheServer(Vector v) throws RemoteException;

Creating the implementation class

For this example, the implementation class will be examples.activation.MyPersistentClass. There are five steps to create an activatable implementation class that uses a MarshalledObject:

  1. Make the appropriate imports in the implementation class
  2. Extend your class from java.rmi.activation.Activatable
  3. Declare a two-argument constructor in the implementation class
  4. Write the methods that use the MarshalledObject, to save and restore the object's data state
  5. Implement the remote interface method(s)

Step 1:
Make the appropriate imports in the implementation class
import java.io.*;
import java.rmi.*;
import java.rmi.activation.*;
import java.util.Vector;

Step 2:
Extend your class from java.rmi.activation.Activatable

public class MyPersistentClass extends Activatable
    implements examples.activation.YetAnotherRemoteInterface {
Step 3:
Declare a two-argument constructor in the implementation class

In the constructor, in addition to the normal call to the superclass's constructor, in this example the MarshalledObject is used to specify the file name of the persistent data store. If the file exists, it's used to initialize this object's variable, a Vector named "transactions". If the file object doesn't exist, then the vector is manually initialized. If there is any error reading the file, then object construction fails.

private Vector transactions;
private File holder;

public MyPersistentClass(ActivationID id, MarshalledObject data)
    throws RemoteException, ClassNotFoundException, java.io.IOException {

    // Register the object with the activation system
    // then export it on an anonymous port
    super(id, 0);

    // Extract the File object from the MarshalledObject that was
    // passed to the constructor
    //
    holder = (File)data.get();

    if (holder.exists()) {
        // Use the MarshalledObject to restore my state
    //
    this.restoreState();
    } else {
    transactions = new Vector(1,1);
    transactions.addElement("Initializing transaction vector");
    }

}

Step 4:
Write the methods that use the MarshalledObject, to save and restore the object's data state

// If the MarshalledObject that was passed to the constructor was
// a file, then use it to recover the vector of transaction data
//
private void restoreState() throws IOException, ClassNotFoundException {
    File f = holder;
    FileInputStream fis = new FileInputStream(f);
    ObjectInputStream ois = new ObjectInputStream(fis);
    transactions = (Vector)ois.readObject();
    ois.close();
}

private void saveState() {
    try {
    File f  = holder;
    FileOutputStream fos = new FileOutputStream(f);
    ObjectOutputStream oos = new ObjectOutputStream(fos);
    oos.writeObject(getTransactions());
    oos.close();
    } catch (Exception e) {
    throw new RuntimeException("Error saving vector of data");
    }
}

Step 5:
Implement the remote interface method(s)

Add each of the vector elements passed from the client to the object instance and save the updated vector out to a file.

public Vector calltheServer(Vector v) throws RemoteException {

     int limit = v.size();
     for (int i = 0; i

Creating the "setup" class

The job of the "setup" class is to create all the information necessary for the activatable class, without necessarily creating an instance of the remote object. For this example, the setup class will be examples.activation.Setup4.

The setup class passes information about the activatable class to rmid, registers a remote reference (an instance of the activatable class's stub class) and an identifier (name) with the rmiregistry, and then the setup class may exit. There are seven steps to create a setup class:

  1. Make the appropriate imports
  2. Install a SecurityManager
  3. Create an ActivationGroup instance
  4. Create an ActivationDesc instance
  5. Remove the reference to the implementation class creation, and register with rmid
  6. Bind the stub to a name in the rmiregistry
  7. Quit the setup application

Step 1:
Make the appropriate imports in the setup class

import java.io.File;
import java.rmi.*;
import java.rmi.activation.*;
import java.util.Properties;

Step 2:
Install a SecurityManager

System.setSecurityManager(new RMISecurityManager());

Step 3:
Create an ActivationGroup instance

Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents:

    Default Policy Implementation and Policy File Syntax

    Permissions in the Java 2 SDK

In the setup application, the job of the activation group descriptor is to provide all the information that rmid will require to contact the appropriate existing JavaTM virtual machine* (JVM) or spawn a new JVM for the activatable object.

Note: In order to run this code on your system, you'll need to change the policy file location to be the absolute path to where you've installed the example policy file that came with the source code.

// Because of the Java 2 security model, a security policy should
// be specified for the ActivationGroup VM. The first argument
// to the Properties put method, inherited from Hashtable, is
// the key and the second is the value
//
Properties props = new Properties();
props.put("java.security.policy",
   "/home/rmi_tutorial/activation/policy");

ActivationGroupDesc.CommandEnvironment ace = null;
ActivationGroupDesc exampleGroup = new ActivationGroupDesc(props, ace);

// Once the ActivationGroupDesc has been created, register it
// with the activation system to obtain its ID
//
ActivationGroupID agi =
   ActivationGroup.getSystem().registerGroup(exampleGroup);

Step 4:
Create an ActivationDesc instance

In the setup application, the job of the activation descriptor is to provide all the information that rmid will require to create a new instance of the implementation class.

Note: In order to run this code on your system, you'll need to change the file URL location to be the location of the directory on your system, where you've installed the example source code.

// Don't forget the trailing slash at the end of the URL
// or your classes won't be found
//
String location = "file:/home/rmi_tutorial/activation/";

// Pass the file that we want to persist to as the Marshalled
// object
MarshalledObject data =  new MarshalledObject (new File(
    "/home/rmi_tutorial/activation/persistentObjectStore.ser"));

// The second argument to the ActivationDesc constructor will be used
// to uniquely identify this class; it's location is relative to the
// URL-formatted String, location.
//
ActivationDesc desc = new ActivationDesc
    (agi, "examples.activation.MyPersistentClass", location, data);

Step 5:
Declare an instance of your remote interface and register the activation descriptor with rmid

YetAnotherRemoteInterface yari =
    (YetAnotherRemoteInterface)Activatable.register(desc);
System.out.println("Got the stub for MyPersistentClass");

Step 6:
Bind the stub, that was returned by the Activatable.register method, to a name in the rmiregistry

Naming.rebind("MyPersistentClass", yari);
System.out.println("Exported MyPersistentClass");

Step 7:
Quit the setup application

System.exit(0);

Compile and run the code

There are six steps to compile and run the code:

  1. Compile the remote interface, implementation, client and setup classes
  2. Run rmic on the implementation class
  3. Start the rmiregistry
  4. Start the activation daemon, rmid
  5. Run the setup program
  6. Run the client

Step 1:
Compile the remote interface, implementation, client and setup classes

% javac -d . YetAnotherRemoteInterface.java
% javac -d . MyPersistentClass.java
% javac -d . Client4.java
% javac -d . Setup4.java

Step 2:
Run rmic on the implementation class

% rmic -d . examples.activation.MyPersistentClass

Step 3:
Start the rmiregistry

% rmiregistry &

Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object.

Step 4:
Start the activation daemon, rmid

% rmid -J-Djava.security.policy=rmid.policy &
Where rmid.policy is the name of the security policy file for rmid.

Note: By default, rmid now requires a security policy file, that is used to verify whether or not the information in each ActivationGroupDescriptor is allowed to be used to launch a JVM for an activation group. For complete details, please refer to the rmid man page for the Solaris operating environment and the rmid man page for the Microsoft Windows platform.

Step 5:
Run the setup program

Run the setup, setting the codebase property to be the location of the implementation stubs. There are four things that need to go on the same command line:

  1. The "java" command
  2. A property name=value pair that specifies the location of the security policy file
  3. A property to specify where the stub code lives (no spaces from the "-D" all the way though the last "/")
  4. The fully-qualified package name of the setup program.
There should be one space just after the word "java", one between the two properties, and a third one just before the word "examples" (which is very hard to see when you view this as text, in a browser, or on paper).

% java  -Djava.security.policy=/home/rmi_tutorial/activation/policy  -Djava.rmi.server.codebase=file:/home/rmi_tutorial/activation/  examples.activation.Setup4

The codebase property will be resolved to a URL, so it must have the form of "http://aHost/somesource/" or "file:/myDirectory/location/" or, due to the requirements of some operating systems, "file:///myDirectory/location/" (three slashes after the "file:").

While a file: URL is sometimes easier to use for running example code, using the file: URL will mean that the only clients that will be able to access the server are those that can access the same files system as the server (either by virtue of running on the same machine as the server or by using a shared filesystem, such as NFS). If you wish to use an HTTP server, but don't have one available to you, please feel free to download our HTTP server.

Please note that each of these sample URL strings has a trailing "/". The trailing slash is a requirement for the URL set by the java.rmi.server.codebase property, so the implementation can resolve (find) your class definition(s) properly. For more information on setting the java.rmi.server.codebase property from the command line, please take a look at our tutorial on dynamic code downloading using the java.rmi.server.codebase property.

If you forget the trailing slash on the property, or if the class files can't be located at the source (they aren't really being made available for download) or if you misspell the property name, you'll get thrown a java.lang.ClassNotFoundException. This exception will be thrown when you try to bind your remote object to the rmiregistry, or when the first client attempts to access that object's stub. If the latter case occurs, you have another problem as well because the rmiregistry was finding the stubs in its CLASSPATH.

The server output should look like this:

     Got the stub for MyPersistentClass
     Exported MyPersistentClass
Step 6:
Run the client

The argument to the client program is the hostname of the implementation server, in this case, "vector".

% java -Djava.security.policy=/home/rmi_tutorial/activation/policy
examples.activation.Client4 vector

The first time that the client is run against this implementation, the output should look like this:

    Got a remote reference to the class MyPersistentClass
        Called the remote method
    Result:
    Initializing transaction vector
    Deposited money
    Withdrew money
    Transferred money from Savings
    Check cleared
    Point-of-sale charge at grocery store
The second time that the client is run against this implementation, the output will include five additional "transactions", so it should look like this:
        Got a remote reference to the class MyPersistentClass
    Called the remote method
    Result:
    Initializing transaction vector
    Deposited money
    Withdrew money
    Transferred money from Savings
    Check cleared
    Point-of-sale charge at grocery store
    Deposited money
    Withdrew money
    Transferred money from Savings
    Check cleared
    Point-of-sale charge at grocery store
Additionally, you should see the size of the persistentObjectStore.ser file increase, with each subsequent client call. *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Compiling and Running the HelloWorld Example

This document will show you how to compile and run a version of the "Hello World" example that was modified to install and use a custom RMI socket factory.

Compiling the Example

The first step is to create a directory to hold the source files, and to download the source files. If you haven't already completed this step, then please do so now.

For all of the source code used in this tutorial, you may choose from the following formats:

  • sockets.zip
  • sockets.tar
  • sockets.tar.Z

The directory that you create and download the source files into will be referred to as the SOURCE_DIRECTORY. So, if on your machine, you downloaded the source files into a directory named "test", then when following these instructions, you should substitute the word "test" wherever you see a reference to the "SOURCE_DIRECTORY".

  1. Create your SOURCE_DIRECTORY
  2. Download the source code into your SOURCE_DIRECTORY
  3. Change your directory to the SOURCE_DIRECTORY
  4. Extract the tarfile you downloaded
  5. Compile all the source files as follows:

    6. javac -d . *.java

    Because the files from this example all have the package name examples.rmisocfac, the results of the above command are:

    • A directory named examples, created in the SOURCE_DIRECTORY
    • A directory named rmisocfac, created in the directory examples
    • All the compiled .class files, placed in the directory rmisocfac
  • After compiling the source files, use the RMI compiler, rmic, to produce stub and skeleton code for the remote object implementation server, HelloImpl.

    • rmic must be invoked with the fully-qualified package name of the implementation class so in this example, the fully-qualified package name is examples.rmisocfac.HelloImpl. If you've followed the steps up until now, you should be sitting in your SOURCE_DIRECTORY, so to invoke rmic, type:

    rmic -d . examples.rmisocfac.HelloImpl

    When this command completes, the stub and skeleton should be located in the directory with the rest of the .class files.

    On Microsoft Windows platforms that directory would be, C:\SOURCE_DIRECTORY\examples\rmisocfac

    In the SolarisTM operating environment, that directory would be, ~/SOURCE_DIRECTORY/examples/rmisocfac

    After invoking rmic, the .class files for the stub and skeleton, HelloImpl_Stub.class and HelloImpl_Skel.class will be located in ~/SOURCE_DIRECTORY/examples/rmisocfac.

    Running the Example

    In this tutorial, the example will be run in three separate windows, or shells; one each for the rmiregistry, the client, and the server.
    1. In each window, change to the SOURCE_DIRECTORY (assuming the package directory, examples/rmisocfac is a subdirectory of the SOURCE_DIRECTORY).

    2. Next, you need to make sure that the JavaTM 2 platform runtime knows where to find the executable files. To accomplish this, you'll need to set your CLASSPATH to include the SOURCE_DIRECTORY in all three windows.

    Start the registry, then the server and then the client.
    1. To start the rmiregistry, choose one of the three windows as the registry window, and type:

      2. rmiregistry

      Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

      If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object. For an explanation of how code downloading works in RMI, please take a look at the tutorial on Dynamic code downloading using RMI.

    2. To start the server, choose a window to be the server window. In that window, type:

      3. java -Djava.security.policy=/SOURCE_DIRECTORY/policy -Djava.rmi.server.codebase=file:/SOURCE_DIRECTORY/ examples.rmisocfac.HelloImpl

      You will know that the server started successfully when you see the message, "HelloServer Bound in registry." If you encounter errors starting the server, the likely problems will either be the CLASSPATH of the rmiregistry or that the java.rmi.server.codebase property was improperly set.

    3. To start the client, in the third window, type:

      4. java -Djava.security.policy=/SOURCE_DIRECTORY/policy examples.rmisocfac.HelloClient

      You will know that the HelloClient program completed successfully when the message "Hello World!" is printed to in that window.

    Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
    Please send comments to: rmi-comments@java.sun.com     		Sun


Dynamic code downloading using RMI
(Using the java.rmi.server.codebase Property)

This tutorial is organized as follows:

1.0 Starting out

4.0 Using codebase in RMI for more than just stub downloading

2.0 What is a codebase?

5.0 Command-line examples

3.0 How does it work?

6.0 Troubleshooting tips

1.0 Starting out

One of the most significant capabilities of the JavaTM platform is the ability to dynamically download Java software from any Uniform Resource Locator (URL) to a Java virtual machine* (JVM) running in a separate process, usually on a different physical system. The result is that a remote system can run a program, for example an applet, which has never been installed on its disk. For the first few sections of this document, codebase with regard to applets will be discussed in order to help describe codebase with regard to Java Remote Method Invocation (RMI).

For example, a JVM running from within a web browser can download the bytecodes for subclasses of java.applet.Applet and any other classes needed by that applet. The system on which the browser is running has most likely never run this applet before, nor installed it on its disk. Once all the necessary classes have been downloaded from the server, the browser can start the execution of the applet program using the local resources of the system on which the client browser is running.

Java RMI takes advantage of this capability to download and execute classes and on systems where those classes have never been installed on disk. Using the RMI API any JVM, not only those in browsers, can download any Java class file including specialized RMI stub classes, which enable the execution of method calls on a remote server using the server system's resources.

The notion of a codebase originates from the use of ClassLoaders in the Java programming language. When a Java program uses a ClassLoader, that class loader needs to know the location(s) from which it should be allowed to load classes. Usually, a class loader is used in conjunction with an HTTP server that is serving up compiled classes for the Java platform. Most likely, the first ClassLoader/codebase pairing that you came into contact with was the AppletClassLoader, and the "codebase" part of the <applet> HTML tag, so this tutorial will assume that you have some experience with Java RMI programming, as well as writing HTML files that contain applet tags. For example, the HTML source will contain something like:

<applet height=100 width=100 codebase="myclasses/" code="My.class">
    <param name="ticker">
</applet>

2.0 What is a codebase?

A codebase can be defined as a source, or a place, from which to load classes into a Java virtual machine. For example, if you invited a new friend over for dinner, you would need to give that friend directions to the place where you lived, so that he or she could locate your house. Similarly, you can think of a codebase as the directions that you give to a JVM, so it can find your [potentially remote] classes.

You can think of your CLASSPATH as a "local codebase", because it is the list of places on disk from which you load local classes. When loading classes from a local disk-based source, your CLASSPATH variable is consulted. Your CLASSPATH can be set to take either relative or absolute path names to directories and/or archives of class files. So just as CLASSPATH is a kind of "local codebase", the codebase used by applets and remote objects can be thought of as a "remote codebase".

3.0 How does it work?

3.1 How codebase is used in applets

To interact with an applet, that applet and any classes that it needs to run must be accessible by remote clients. While applets can be accessed from "ftp://" or local "file:///" URLs, they are usually accessed from a remote HTTP server.

  1. The client browser requests an applet class that is not found in the client's CLASSPATH
  2. The class definition of the applet (and any other class(es) that it needs) is downloaded from the server to the client using HTTP
  3. The applet executes on the client

Figure 1: Downloading applets

The applet's codebase is always relative to the URL of the HTML page in which the <applet> tag is contained.

3.2 How codebase is used in RMI

Using RMI, applications can create remote objects that accept method calls from clients in other JVMs. In order for a client to call methods on a remote object, the client must have a way to communicate with the remote object. Rather than having to program the client to speak the remote object's protocol, RMI uses special classes called stubs that can be downloaded to the client that are used to communicate with (make method calls on) the remote object. The java.rmi.server.codebase property value represents one or more URL locations from which these stubs (and any classes needed by the stubs) can be downloaded.

Like applets, the classes needed to execute remote method calls can be downloaded from "file:///" URLs, but like applets, a "file:///" URL generally requires that the client and the server reside on the same physical host, unless the file system referred to by the URL is made available using some other protocol, such as NFS. For more information on "file:///" URL formats, please see Adrian Colley's posting to the RMI-USERS email list: http://archives.java.sun.com/cgi-bin/wa?A2=ind0009&L=rmi-users&O=A&P=23120.

Generally, the classes needed to execute remote method calls should be made accessible from a network resource, such as an HTTP or FTP server.

Figure 2: Downloading RMI stubs

  1. The remote object's codebase is specified by the remote object's server by setting the java.rmi.server.codebase property. The RMI server registers a remote object, bound to a name, with the RMI registry. The codebase set on the server JVM is annotated to the remote object reference in the RMI registry.

  2. The RMI client requests a reference to a named remote object. The reference (the remote object's stub instance) is what the client will use to make remote method calls to the remote object.

  3. The RMI registry returns a reference (the stub instance) to the requested class. If the class definition for the stub instance can be found locally in the client's CLASSPATH , which is always searched before the codebase, the client will load the class locally. However, if the definition for the stub is not found in the client's CLASSPATH, the client will attempt to retrieve the class definition from the remote object's codebase.

  4. The client requests the class definition from the codebase. The codebase the client uses is the URL that was annotated to the stub instance when the stub class was loaded by the registry. Back in step 1, the annotated stub for the exported object was then registered with the RMI registry bound to a name.

  5. The class definition for the stub (and any other class(es) that it needs) is downloaded to the client.
    6. Note: Steps 4 and 5 are the sames steps that the registry took to load the remote object class, when the remote object was bound to a name in (registered with) the RMI registry. When the registry attempted to load the remote object's stub class, it requested the class definition from the codebase associated with that remote object.
  6. Now the client has all the information that it needs to invoke remote methods on the remote object. The stub instance acts as a proxy to the remote object that exists on the server; so unlike the applet which uses a codebase to execute code in its local JVM, the RMI client uses the remote object's codebase to execute code in another, potentially remote JVM, as illustrated in Figure 3:

Figure 3: RMI client making a remote method call

4.0 Using codebase in RMI for more than just stub downloading

In addition to downloading stubs and their associated classes to clients, the java.rmi.server.codebase property can be used to specify a location from which any class, not only stubs, can be downloaded.

When a client makes a method call to a remote object, the method that it calls could be written to accept no arguments or a number of arguments. There are three distinct cases that may occur, based on the data type(s) of the method argument(s).

In the first case, all of the method parameters (and return value) are primitive data types, so the remote object knows how to interpret them as method parameters, and there is no need to check its CLASSPATH or any codebase.

In the second case, at least one remote method parameter or the return value is an object, for which the remote object can find the class definition locally in its CLASSPATH.

In the third case (shown as Step 6, in Figure 4), the remote method receives an object instance, for which the remote object cannot find the class definition locally in its CLASSPATH. This type of remote method call is illustrated in Figure 4. The class of the object sent by the client will be a subtype of the declared parameter type. A subtype is either:

  • An implementation of the interface that is declared as the method parameter (or return) type

  • A subclass of the class that is declared as the method parameter (or return) type

Figure 4: RMI client making a remote method call, passing an unknown subtype as a method parameter

7. Like the applet's codebase, the client-specified codebase is used to download Remote classes, non-remote classes, and interfaces to other JVMs. If the codebase property is set on the client application, then that codebase is annotated to the subtype instance when the subtype class is loaded by the client. If the codebase is not set on the client, the remote object will mistakenly use its own codebase.

5.0 Command-line examples

In the case of an applet, the applet codebase value is embedded in an HTML page, as we saw in the HTML example in the first section of this tutorial.

In the case of Java RMI codebase, rather than having a reference to the class embedded in an HTML page, the client first contacts the RMI registry for a reference to the remote object. Because the remote object's codebase can refer to any URL, not just one that is relative to a known URL, the value of the RMI codebase must be an absolute URL to the location of the stub class and any other classes needed by the stub class. This value of the codebase property can refer to:

  • The URL of a directory in which the classes are organized in package-named sub-directories

  • The URL of a JAR file in which the classes are organized in package-named directories

  • A space-delimited string containing multiple instances of JAR files and/or directories that meet the criteria above

Note: When the codebase property value is set to the URL of a directory, the value must be terminated by a "/".

Examples

If the location of your downloadable classes is on an HTTP server named "webvector", in the directory "export" (under the web root), your codebase property setting might look like this:

    -Djava.rmi.server.codebase=http://webvector/export/
Note: The value of the codebase property does not reflect the actual directory location of your class files, but rather the directory that contains your top-level package. In this example, if your classes were part of the com.myclasses package, then your class files would be located in the export/com/myclasses directory, and the value of the codebase property would be http://webvector/export/, which is the location of the directory that contains your top-level package.

If the location of your downloadable classes is on an HTTP server named "webline", in a JAR file named "mystuff.jar", in the directory "public" (under the web root), your codebase property setting might look like this:

    -Djava.rmi.server.codebase=http://webline/public/mystuff.jar

Now let's suppose that the location of your downloadable classes has been split between two JAR files, "myStuff.jar" and "myOtherStuff.jar". If these JAR files are located on different servers (named "webfront" and "webwave"), your codebase property setting might look like this:

    -Djava.rmi.server.codebase="http://webfront/myStuff.jar http://webwave/myOtherStuff.jar"

6.0 Troubleshooting tips

Any serializable class, including RMI stubs, can be downloaded if your RMI programs are configured properly. Here are the conditions under which dynamic stub downloading will work:

  1. The stub class and any of the classes that the stub relies on are served up from a URL reachable from the client.

  2. The java.rmi.server.codebase property has been set on the server program (or in the case of activation, the "setup" program) that makes the call to bind or rebind, such that:

    • The value of the codebase property is the URL in step A

      and

    • If the URL specified as the value of the codebase property is a directory, it must end in a trailing "/"

  3. The rmiregistry cannot find the stub class or any of the classes that the stub relies on in its CLASSPATH. This is so the codebase gets annotated to the stub when the registry does its class load of the stub, as a result of calls to bind or rebind in the server or setup code.

  4. The client has installed a SecurityManager that allows the stub to be downloaded. In the Java 2 SDK, Standard Edition, v1.2 and later this means that the client must also have a properly configured security policy file.

There are two common problems associated with the java.rmi.server.codebase property, which are discussed next.

6.1 If you encounter a problem running your RMI server

The first problem you might encounter is the receipt of a ClassNotFoundException when attempting to bind or rebind a remote object to a name in the registry. This exception is usually due to a malformed codebase property, resulting in the registry not being able to locate the remote object's stubs or other classes needed by the stub.

It is important to note that the remote object's stub implements all the same interfaces as the remote object itself, so those interfaces, as well as any other custom classes declared as method parameters or return values, must also be available for download from the specified codebase.

Most frequently, this exception is thrown as a result of omitting the trailing slash from the URL value of the property. Other reasons would include: the value of the property is not a URL; the path to the classes specified in the URL is incorrect or misspelled; the stub class or any other necessary classes are not all available from the specified URL.

The exception that you may encounter in such a case would look like this:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Compiled Code)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Compiled Code)
    at sun.rmi.server.UnicastRef.invoke(Compiled Code)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Compiled Code)
    at java.rmi.Naming.rebind(Compiled Code)
    at examples.callback.MessageReceiverImpl.main(Compiled Code)
RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: examples.callback.MessageReceiverImpl_Stub

6.2 If you encounter a problem running your RMI client

The second problem you could encounter is the receipt of a ClassNotFoundException when attempting to lookup a remote object in the registry. If you receive this exception in a stacktrace resulting from an attempt to run your RMI client code, then your problem is the CLASSPATH with which your RMI registry was started. See requirement C in section 6.0. Here is what the exception will look like:

java.rmi.UnmarshalException: Return value class not found; nested exception is:
    java.lang.ClassNotFoundException: MyImpl_Stub
    at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:109
    at java.rmi.Naming.lookup(Naming.java:60)
    at RmiClient.main(MyClient.java:28)

Other resources

If you your codebase questions are still unanswered, please take a look through the archives of the rmi-users email list first.

You may wish to subscribe to the rmi-users email list.

We are very interested in knowing whether these tutorials are useful. Please send any comments or suggestions to: rmi-comments@java.sun.com, with a subject of "codebase tutorial". *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Stock Example Using RMI

 Documentation Comments

This directory contains an example that illustrates an applet that exports a remote object in order to receive stock updates from a stock server. The applet displays the stock data dynamically as notifications are received from the server. The interfaces and classes for this example are:

  • StockWatch is the remote interface for stock server.

  • StockNotify is the remote interface for stock observer.

  • Stock is the serializable object containing stock data.

  • StockServer (implements StockWatch) sends notifications of stock updates to remote objects that have registered to receive updates.

  • StockApplet (implements StockNotify) exports a remote object (itself), registers with StockServer for stock updates, and displays stock notifications as they are received.

On Windows systems, after downloading the JavaTM 2 SDK, execute run.bat in the docs/guide/rmi/examples/stock directory, which will explain each step as it builds and runs the example. Upon completion, you will need to explicitly destroy the window created for the server process.

On Solaris, after downloading the Java 2 SDK, execute the run script in this examples/stock directory, and the script will print out what it is doing while it runs the example. It assumes that you have installed the Java® 2 SDK and set your PATH, CLASSPATH and LD_LIBRARY_PATH according to the SDK installation instructions. The stock server creates its own RMI registry, so the "rmiregistry" command does not need to be run. Here are the basic steps that the run script executes:

    setenv CLASSPATH ../..:$CLASSPATH

    javac -d ../.. *.java

    rmic -d ../.. examples.stock.StockServer examples.stock.StockApplet

    java -Djava.security.policy=security.policy examples.stock.StockServer &

    appletviewer index.html

Note: You can set your CLASSPATH back to the old CLASSPATH (without ../.. in it) before running the appletviewer, so that classes get downloaded from the network rather than from your CLASSPATH; each of the scripts actually does this.

Sun Copyright © 1996,1997,1998,1999 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043-1100 USA. All rights reserved.


Frequently Asked Questions - RMI and Object Serialization

JavaSoft, a Sun Microsystems Business

Frequently Asked Questions
RMI and Object Serialization

 Contents of the
JavaTM 2 SDK,
Standard Edition,
v 1.3

RMI

Very Frequent Questions

  • A.1 Why do I get an exception for an unexpected hostname and/or port number when I call Naming.lookup?
  • A.2 Do I have to install the _Stub file in the client's CLASSPATH? I thought it could be downloaded.
  • A.3 Does RMI require me to use an HTTP server?
  • A.4 Why am I getting a ClassNotFoundException?

Debugging RMI programs

  • B.1 Will there be debugging mechanisms built into RMI?
  • B.2 I am having a problem debugging my program on Windows95. Any suggestions?
  • B.3 Why do I get a java.lang.ClassMismatchError while running my program?
  • B.4 I am sending an array of remote objects and receive an ArrayStoreException. What's going on?
  • B.5 I have local objects that are synchronized. When I make them remote, my application hangs. What's the problem?
  • B.6 I am getting a ClassNotFoundException for my stub class when I try to register a remote object in the registry. What's happening?
  • B.7 My server died. Can I get a trace of the server activity?
  • B.8 Where can I find a list of system properties that might be useful for implementing and debugging RMI applications?

Networking

  • C.1 How do RMI clients contact remote RMI servers?
  • C.2 Why does my remote method or "callback" routine fail with a nested java.net.UnknownHostException?
  • C.3 My server is using a fully-qualified domain name or IP address, so why do I still get an UnknownHostException?
  • C.4 I am using the latest release of the Java 2 Software Developemtn Kit (SDK) and I have a host that has multiple IP addresses. RMI is choosing the wrong IP address for its server hostname, how do I work around this problem?
  • C.5 How does RMI obtain a server hostname in each of the versions of the JDK?
  • C.6 Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows?
  • C.7 How do I use RMI on a Windows95 standalone machine, not connected to the network?
  • C.8 Why do I get the exception "java.net.SocketException: Address already in use" when I try to run the registry?
  • C.9 How can I use RMI through a firewall?
  • C.10 How can I make outgoing RMI calls through a local firewall?
  • C.11 How can I receive incoming RMI calls through a local firewall?
  • C.12 So what do I have to do to get RMI to operate through two firewalls?
  • C.13 Is it possible to replace the java-rmi.cgi script that comes with the JDK distribution with a servlet?

Using RMI to achieve X (for some X)

  • D.1 Is there a way to get automatic notification as soon as a remote Java virtual machine* (JVM) fails?
  • D.2 From within a Java virtual machine, can a new JVM be spawned on a remote machine?
  • D.3 Is it possible for a remote object to be notified when all clients disconnect?
  • D.4 Why doesn't my server program exit when all clients disconnect?
  • D.5 How does the distributed garbage collector detect a client that disconnects? Is it advisable to use System.exit for graceful client termination?
  • D.6 How can my server tell when a client crashes?
  • D.7 The unreferenced() method doesn't get called until ten minutes after I have stopped using the remote object! How can I shorten this delay?
  • D.8 Why can't I get an immediate notification when a client crashes?
  • D.9 How do I run the rmic command in a DOS batch file?
  • D.10 In a remote object implementation, how can I find the host name of the caller of a remote method?
  • D.11 Does RMI handle "out" and "inout" parameters (like CORBA)?
  • D.12 Normally in the Java programming language, it is possible to cast an interface instance to an instance of the class from which it was created and use the result. Why doesn't this work in RMI?

How does RMI work with X (for some X)

  • E.1 When will Netscape support RMI?
  • E.2 Can I implement remote observer/observable objects in RMI?
  • E.3 How is RMI related to CORBA?

Internals, resources, and performance

  • F.1 At what point is there a "live" connection between the client and the server and how are connections managed?
  • F.2 Does the Java platform replace all remote objects with their stubs during a remote method invocation?
  • F.3 Is it possible to write a new transport layer for RMI which does not use sockets? As a follow-up question, how about a transport layer that uses non-TCP based sockets?
  • F.4 I notice the registry continues to use CPU resources, as if it were polling rather than blocking on a select() call. Is the registry implemented by polling?
  • F.5 Is there only one socket connection between a client process and the server, no matter how many stubs exist in that client process?

Miscellaneous

  • G.1 What are the licensing issues surrounding the use of RMI?
  • G.2 I have a single-threaded program that waits on standard input for a user command which will initiate an RMI call. However, my remote object cannot service this incoming remote call as the program appears to be blocked on standard input. What's the problem?
  • G.3 I am copying array elements to my remote server and changing the values, but the incremented values are not copied back to the client. Why?
  • G.4 Am I allowed to have static fields in a remote interface?
  • G.5 I locate the registry, but then it seems that it's not there, what's happening?
  • G.6 I can't find the answer to my question here, are there any other resources?

Object Serialization

  1. Why must classes implement Serializable in order to be written to an ObjectOutputStream?
  2. Which JDK 1.1 system classes are marked serializable?
  3. I am having problems deserializing AWT components. How can I make this work?
  4. Does object serialization support encryption?
  5. The object serialization classes are stream oriented. How do I write objects to a random-access file?
  6. When a local object is serialized and passed as a parameter in an RMI call, are the bytecodes for the local object's methods also passed? What about object coherency, if the remote VM application "keeps" the object handle?
  7. How can I create an ObjectInputStream from an ObjectOutputStream without a file in between?
  8. I create an object and then send it across the net using the writeObject method and receive it using the readObject method. If I then change the value of a field in the object and send it as before, the object that the readObject method returns appears to be the same as the first object and does not reflect the new value of the field. Should I be experiencing this behavior?
  9. Are there any plans to support the serialization of thread objects?
  10. Can I compute diff(serial(x),serial(y))?
  11. Can I compress the serial representation of my objects using my own zip and unzip methods?
  12. Can I execute methods on compressed versions of my objects, for example isempty(zip(serial(x)))?
  13. If I try to serialize a font or image object and then try to reconstitute it in a different VM, my application dies. Why?
  14. How do I serialize a tree of objects?
  15. If class A does not implement Serializable but a subclass B implements Serializable, will the fields of class A be serialized when B is serialized?

RMI

A.1 Why do I get an exception for an unexpected hostname and/or port number when I call Naming.lookup?

The hostname and port number you see in the exception trace represent the address on which the looked-up server believes it is listening. While the RMI server can theoretically be on any host, it is usually the same host as that on which the registry is running, and on a different port.

Even if the server is mistaken about its hostname or IP address (or has a hostname that simply isn't resolvable by clients), it will still export all of its objects using that mistaken hostname, but you will see an exception every time you try to receive one of those objects.

The hostname which you specified in Naming.lookup to locate the registry has no effect on the hostname which is already embedded in the remote reference to the server.

Usually, the mysterious hostname is the unqualified hostname of the server, or a private name unknown to the client's nameservice, or (in the case of Windows) the server's Network->Identification->Machine Name.

The appropriate workaround is to set the system property java.rmi.server.hostname when starting the server. The value of the property should be the externally reachable hostname (or IP address) of the server -- whatever works when specified as the host-part in Naming.lookup is good enough.

For more detail, see the questions on callbacks and fully-qualified domain names.

A.2 Do I have to install the _Stub file in the client's CLASSPATH? I thought it could be downloaded.

A stub class can be downloaded, if the server that is exporting the remote object annotates the marshalled stub instance with the java.rmi.server.codebase property, which indicates the location from where the stub class can be loaded. You should set the java.rmi.server.codebase property on the server exporting a remote object. While remote clients could set this property, they would then be limited to only getting remote objects from the specified codebase. You should not assume that any client VM will have specified a codebase that resolves to the location of your object.

When a remote object is marshalled by RMI (whether as an argument to a remote call or as a return value), the codebase for the stub class is retrieved by RMI and used to annotate the serialized stub. When the stub is unmarshalled, the codebase is used to load the stub classfile using the RMIClassLoader, unless the class can already be found in the CLASSPATH or by the context classloader for the receiving object, such as an applet codebase.

If the _Stub class was loaded by an RMIClassLoader, then RMI already knows which codebase to use for its annotation. If the _Stub class was loaded from the CLASSPATH, then there is no obvious codebase, and RMI consults the java.rmi.server.codebase system property to find the codebase. If the system property is not set, then the stub is marshalled with a null codebase, which means that it cannot be used unless the client has a matching copy of the _Stub classfile in the client's CLASSPATH.

It is easy to forget to specify the codebase property. One way to detect this error is to start the rmiregistry separately and without access to the application classes. This will force Naming.rebind to fail if the codebase is omitted.

For more information on the java.rmi.server.codebase property, please take a look at our tutorial, Dynamic code downloading using RMI (Using the java.rmi.server.codebase Property).

A.3 Does RMI require me to use an HTTP server?

No. You can set your java.rmi.server.codebase property to use any valid URL protocol, such as file:/// or ftp://. Using an HTTP server just makes your life simpler by providing an automated mechanism for class file downloading. If you don't have access to an HTTP server nor the inclination to set one up, you can use our small class file server found at http://java.sun.com/products/rmi/class-server.zip.

A.4 Why am I getting a ClassNotFoundException?

Most likely the java.rmi.server.codebase property has not been set (or has not been set correctly) on a JVM that is exporting your remote object(s). Please take a look at our tutorial, Dynamic code downloading using RMI (Using the java.rmi.server.codebase Property).

B.1 Will there be debugging mechanisms built into RMI?

RMI supports a simple call-logging facility for debugging. But there are no current plans to support a full-featured, interactive, remote debugger.

B.2 I am having a problem debugging my program on Windows95. Any suggestions?

The javaw command throws away output to stdout and stderr, so for debugging purposes it is better to run the java command in a separate window so that you can see reported errors. To do this, execute a command like the following:
        start java EchoImpl

It is advised not to use the javaw command during development. To watch the server activity, start the server with -Djava.rmi.server.logCalls=true.

B.3 Why do I get a java.lang.ClassMismatchError while running my program?

You probably modified one or more classes that were being used by RMI programs while your program was running. Try restarting all RMI applications (including java.rmi.registry.RegistryImpl). This should clear things up.

B.4 I am sending an array of remote objects and receive an ArrayStoreException. What's going on?

RMI replaces the remote objects with the stub and therefore the type of the array must be that of the interface. The code would look like:
   FooRemote[] f = new FooRemote[10];
   for (int i = 0; i < f.length; i++) {
      f[i] = new FooRemoteImpl();
   }

Now RMI can put the stub into each cell of the array without an exception on the remote call.

B.5 I have local objects that are synchronized. When I make them remote, my application hangs. What's the problem?

What you encountered was distributed deadlock. In the local VM case, the VM can tell that the calling object "A" owns the lock and will allow the call back to "A" to proceed. In the distributed case, no such determination can be made, so the result is deadlock.

Distributed objects behave differently than local objects. If you simply reuse a local implementation without handling locking and failure, you will probably get unpredictable results.

B.6 I am getting a ClassNotFoundException for my stub class when I try to register a remote object in the registry. What's happening?

When you make a call to the registry to bind an object, the registry actually binds a reference to the stub for the remote object. In order to instantiate a stub object, the registry VM needs to be able to load its class definition. The VM (in this case the server VM) that sends the serialized forms of a stub in a remote method call to the registry is responsible for annotating the stub with the location from which its classes can be downloaded. If stubs are not annotated properly, RMI will throw a ClassNotFoundException when it tries to instantiate the stub.

To annotate classes properly, the server needs needs to set the value of the java.rmi.server.codebase property value to the location(s) of the stub classes. RMI will automatically annotate the serialized form of outgoing object instances with the value of the java.rmi.server.codebase property.

NOTE: It is possible (and in a small number of environments appropriate) to enable the rmiregistry to unmarshal stub objects by placing all relevant stub class files in the CLASSPATH of the rmiregistry. However, the rmiregistry does not have to download stub classes. If stub classes are available locally, it will use those classes. Using the rmiregistry's CLASSPATH for stub deployment requires that all VMs that reference a stub instance obtained from that registry have the stub's class file installed locally (in the VM's CLASSPATH).

For example, if the registry loads stub classes from its CLASSPATH, when the registry sends serialized stub objects to other VMs, those serialized objects will be annotated with the value of the registry's java.rmi.server.codebase property (which will almost always be null). If the VMs receiving serialized stub objects from the registry do not have the class files for those stubs installed locally then those VMs are likely to throw a ClassNotFoundException.

Instead, if classes are downloaded dynamically from a server VM's java.rmi.server.codebase annotation, only the server VM needs to have the stub classes in its CLASSPATH. With this approach, application deployment is simpler and it is possible to introduce new stub versions into a running distributed system.

For more information on dynamic code downloading in RMI, please see the tutorial, Dynamic code downloading using RMI (Using the java.rmi.server.codebase).

B.7 My server died. Can I get a trace of the server activity?

To get a trace of the server activity, start the server as follows:
    java -Djava.rmi.server.logCalls=true YourServerimpl
where YourServerImpl is the name of your server. If your server has hung, you can get a monitor dump and thread dump by doing a ctrl-\ on solaris and a ctrl-break on Windows.

B.8 Where can I find a list of system properties that might be useful for implementing and debugging RMI applications?

Properties that begin with "java.rmi." are elements of the public specification and are documented in the Java RMI Specification.

Properties that begin with "sun.rmi." are only supported by certain versions of the JDK or J2SE from Sun MicrosystemsTM. While these "sun.rmi.*" properties can be quite useful for debugging and tuning at runtime, please note that they are not considered part of the public API, and their use is subject to change (or may be removed completely) in future versions of the implementation.

C.1 How do RMI clients contact remote RMI servers?

For an RMI client to contact a remote RMI server, the client must first hold a reference to the server. The Naming.lookup method call is the most common mechanism by which clients initially obtain references to remote servers. Remote references may be obtained by other means, for example: all remote method calls can return remote references. This is what Naming.lookup does; it uses a well-known stub to make a remote method call to the rmiregistry, which sends back the remote reference to the object requested by the lookup method.

Every remote reference contains a server hostname and port number that allow clients to locate the virtual machine that is serving a particular remote object. Once an RMI client has a remote reference, the client will use the hostname and port provided in the reference to open a socket connection to the remote server.

Please note that with RMI the terms client and server can refer to the same Java program. A Java program that acts as an RMI server contains an exported remote object. An RMI client is a program that invokes one or more methods on a remote object in another Java Virtual Machine (JVM). If a JVM performs both of these functions, it may be referred to as an RMI client and an RMI server.

C.2 Why does my remote method or "callback" routine fail with a nested java.net.UnknownHostException?

In many versions of the JDK (all versions of the JDK except in 1.1, and the latest releases), RMI may default to using an unresolvable server hostname (for example: unqualified names, WINS names, or unqualified DHCP names). When an RMI client invokes a remote method using a reference that contains an unresolvable server hostname, the client will throw an UnknownHostException.

In order to generate functional remote references, RMI servers must be able to supply a fully-qualified hostname or IP address that is resolvable from all RMI clients (an example of a fully-qualified hostname is foo.bar.com). If an RMI program provides a remote callback operation then that program serves an RMI object and consequently, must be able to determine a resolvable hostname to use as its server hostname in the remote references it passes to RMI clients. JVM's that make calls to applets that serve remote objects may throw UnknownHostExceptions because the applet has failed to provide a useable server hostname.

If your RMI application throws an UnknownHostException, you can look at the resulting stack trace to see if the hostname that the client is using to contact its remote server is incorrect or not fully-qualified. If necessary, you can set the java.rmi.server.hostname property on the server to the correct IP address or hostname of the server machine and RMI will use this property's value to generate remote references to the server.

C.3 My server is using a fully-qualified domain name or IP address, so why do I still get an UnknownHostException?

Depending upon the configuration of your network's name service, a fully-qualified hostname that is recognized on one RMI host may not be resolvable from another RMI host. Some examples of where this situation may arise are:
  • Misconfigured DHCP servers may set the fully-qualified domain name of RMI server machines to be the domain name of the resolver domain instead of the domain in which the RMI server actually resides. In this case, RMI clients outside the server's DHCP domain will be unable to contact the server, because of the its incorrect domain name.
  • The server machine is on a network that is configured to use Windows Internet Naming Service (WINS). Hosts that are only registered under WINS may not be reachable by hosts that rely solely upon DNS.
  • The RMI client and server reside on opposite sides of a firewall. If your RMI client lies outside a firewall and the server resides inside of it, the client will not be able to make any remote calls to the server. If the RMI client lies inside the firewall, you will need to configure the RMI client to contact the server using HTTP.

C.4 I am using the latest release of the JDK and I have a host that has multiple IP addresses. RMI is choosing the wrong IP address for its server hostname, how do I work around this problem?

Set the java.rmi.server.hostname property to the correct IP address of the RMI server machine. You can also specify that your server use a fully-qualified hostname obtained from a name service by setting the property:
    java.rmi.server.useLocalHostname=true

C.5 How does RMI obtain a server hostname in each of the versions of the JDK?

Methods RMI uses to obtain a server hostname in each of the versions of the JDK:

JDK1.1

RMI relied upon java.net.InetAddress.getLocalHost() to return a fully-qualified domain name. InetAddress objects initialized local hostnames in a static block of code, performing a reverse lookup on the local IP address to retrieve a local hostname. However, on machines that were not connected to the network, this behavior caused the program to hang while InetAddress looked for a hostname that could not be found.

JDK1.1.1-1.1.6 & Java 2 SDK, v1.2beta2-3

To work around the JDK1.1 problem on stand-alone systems, InetAddress was modified in JDK1.1.1 to only retrieve the [potentially unqualified] hostname returned from a native system call, which did not attempt to consult a name service. RMI was not modified to compensate for this change since the property java.rmi.server.hostname allowed users to override incorrect hostnames provided by InetAddress. RMI made no attempt to consult a name service and could default to using unqualified hostnames.

Later versions

To compensate for the many problems that were generated by the 1.1.1 change in functionality of InetAddress, the following behavior has been integrated into the most recent versions of the JDK:

RMI will use an IP address or a fully-qualified domain name to identify a machine that serves a remote object. Server hostnames are initialized to the value obtained by performing the following actions:

  1. By default, RMI uses the IP address of the server host as the server name for remote references.
  2. If the property, java.rmi.server.hostname is set, RMI will use its value as the server hostname, and will not attempt to find a fully-qualified domain name through any other method. This property takes precedence over all other means of finding an RMI server name.
  3. If the property, java.rmi.server.useLocalHostname is set to true (by default, the value of this property is false), RMI applies the following routine to obtain a hostname for the RMI server:
    1. If the value returned by the InetAddress.getLocalHost().getHostName() method contains a "." character, then RMI will assume that this value is the server's fully-qualified domain name and will use it as the server hostname.
    2. Otherwise, RMI will spawn a thread to query the local name service for the fully-qualified domain name of the RMI server. If the name service takes too long to return, or the name service returns but its response does not contain a "." then RMI will use the server's IP address obtained from InetAddress.getLocalHost().getHostAddress().
    Users can override the default time (10 seconds or 10000 milliseconds) that RMI will look for a fully-qualified domain name by setting the following property:
    sun.rmi.transport.tcp.localHostnameTimeOut=timeOutMillis
    where timeOutMillis is the time that RMI will wait in milliseconds. For example:
                java -Dsun.rmi.transport.tcp.localHostnameTimeOut=2000 MyServerApp
When using activatable remote objects, it is recommended that RMI servers set the value of the java.rmi.server.useLocalHostname property to true. In general, hostnames are more stable than IP addresses. Activatable remote objects tend to last longer than transient remote objects (for example, survive a reboot). An RMI client will be more likely to locate a remote object over a long period of time if it uses a qualified hostname rather than an explicit IP address.

C.6 Why do Naming.bind and Naming.lookup take an extraordinarily long time on Windows?

Most likely, your host's networking setup is incorrect. RMI uses the Java API networking classes, in particular java.net.InetAddress, which will cause TCP/IP host name lookups - both host to address mapping and address to hostname mapping (the InetAddress class does this for security reasons). On Windows, the lookup functions are performed by the native Windows socket libraray, so the delays are happening not in RMI, but in the Windows libraries. If your host is set up to use DNS, then it is usually a problem with the DNS server not knowing about the hosts involved in communication, and what you are experiencing are DNS lookup timeouts. Try specifying all the involved hostnames/addresses in the local file \winnt\system32\drivers\etc\hosts or \windows\hosts. The format of a typical host file is:
    IPAddress     Machine Name
e.g.:
    208.2.84.61   homer
This should dramatically cut down the time it takes to make the first lookup.

C.7 How do I use RMI on a Windows95 standalone machine, not connected to the network?

To get RMI working on a Win95 machine that is not on a network, TCP/IP must be configured. One way to accomplish this, is to configure an unused COM port as a dedicated PPP or SLIP connection. Then disable DHCP and manually configure an IP address (e.g. 192.168.1.1). You should then find that from a DOS Shell, you can ping yourself (for example, ping mymachine). You should now be able to run the stock RMI example.

C.8 Why do I get the exception "java.net.SocketException: Address already in use" when I try to run the registry?

This exception means that the port that the RegistryImpl uses (by default 1099) is already in use. You may have another registry already running on your machine and will need to stop it.

C.9 How can I use RMI through a firewall?

It depends on whether you need to traverse a firewall for outgoing calls or for incoming calls.

C.10 How can I make outgoing RMI calls through a local firewall?

There are three main methods: HTTP-tunneling, SOCKS, and downloaded socket factories.

HTTP-tunneling

This well-worn method is popular since it requires almost no setup, and works quite well in firewalled environments which permit handle HTTP through a proxy, but disallow regular outbound TCP connections.

If RMI fails to make a normal (or SOCKS) connection to the intended server, and it notices that a HTTP proxy server is configured, it will attempt to tunnel RMI requests through that proxy server, one at a time.

There are two forms of HTTP-tunneling, tried in order. The first is http-to-port; the second is http-to-cgi.

In http-to-port tunneling, RMI attempts a HTTP POST request to a http: URL directed at the exact hostname and port number of the target server. The HTTP request contains a single RMI request. If the HTTP proxy accepts this URL, it will forward the POST request to the listening RMI server, which will recognise the request and unwrap it. The result of the call is wrapped in a HTTP reply, which is returned through the same proxy.

Often, HTTP proxies will refuse to proxy requests to unusual port numbers. In this case, RMI will fall back to http-to-cgi tunneling. The RMI request is encapsulated in a HTTP POST request as before, but the request URL is of the form http://hostname:80/cgi-bin/java-rmi.cgi?port=n (where hostname and n are the hostname and port number of the intended server). There must be a HTTP server listening on port 80 on the server host, which will run the java-rmi.cgi script (supplied with the JDK), which will in turn forward the request to an RMI server listening on port n. RMI can unwrap a HTTP-tunneled request without help from a http server, CGI script, or any other external entity. So, if the client's HTTP proxy can connect directly to the server's port, then you don't need a java-rmi.cgi script at all.

To trigger the use of HTTP tunneling, the standard system property http.proxyHost must be set to the hostname of the local HTTP proxy. (There are reports that some Navigator versions do not set this property.)

The major disadvantage of HTTP tunneling is that it does not permit inward calls or multiplexed connections. A secondary disadvantage is that the http-to-cgi method opens a dramatic security hole on the server side, since without modification it will redirect any incoming request to any port.

SOCKS

The default implementation of sockets in the JDK will use a SOCKS server if available and configured. The system property socksProxyHost must have been set to the hostname of the SOCKS server; if the port number of the SOCKS server is not 1080 it must be specified in the socksProxyPort property.

This approach would appear to be the most generally-useful solution. As yet, ServerSockets do not use SOCKS, so incoming calls must use another mechanism.

Downloaded socket factories

This is an innovation in the Java 2 SDK, allowing the server to specify the socket factory that the clients must use. The clients must be running Java 2 SDK, Standard Edition, v1.2beta4 or later. Detailed instructions on creating custom RMI socket factories are available.

The disadvantage of this approach is that the traversal of the firewall must be done by code provided by the RMI server side, which does not necessarily know how that traversal must be done, nor does it automatically have sufficient privilege to traverse the firewall.

C.11 How can I receive incoming RMI calls through a local firewall?

There are four main methods: known ports, transport-level bridge, application-level proxy, and connection multiplexing.

Known Ports

If the exported objects are all exported on a known port on a known host, then that host and port can be explicitly permitted at the firewall. Normally, RMI asks for port 0 (which is code for "any port"). In the Java 2 SDK, there is an extra argument to the exportObject method to specify the exact port number. In JDK1.1, the server must subclass the RMISocketFactory and intercept requests to createServerSocket(0), replacing it with a request to bind to a specific port number.

This approach has the disadvantage that it requires the assistance of the network administrator responsible for the local firewall. If the exported object is being run in a different location (because code was downloaded to that site), then the local firewall may be run by network administrators who don't know who you are.

Transport-level bridge

A transport-level bridge is a program that reads bytes from one TCP connection and writes them to another (and vice versa) without knowing or caring what the bytes represent.

The idea here is to export objects in such a way that anyone outside the firewall who wants to call remote methods on that object instead contacts a different port (perhaps on a different machine). That different port has a running program which makes a second connection to the real server and then pumps bytes each way.

The tricky part is convincing the client to connect to the bridge. A downloadable socket factory (Java 2 SDK, v1.2 or later) can do this efficiently; otherwise, it is possible to set the java.rmi.server.hostname property to name the bridge host and arrange for port numbers to be the same.

Application-level proxy

This approach is quite a bit of work, but leads to a very secure arrangement. A proxy program runs on a firewall host (one which can be accessed from outside as well as from inside). When an internal server intends to make an exported object available to the world, it contacts the proxy server and gives it a remote reference. The proxy server creates a proxy object (a new remote object residing in the proxy server) which implements the same remote interfaces as the original. The proxy server returns a remote reference for the new proxy object to the internal server, which communicates it to the outside world (somehow).

When an outsider makes a call on the proxy, the proxy immediately forwards the call to its original object on the internal server. The use of the proxy is transparent to the outsider (but not to the internal server, who has to decide whether to pass the original reference or the proxy reference when talking to anyone).

Needless to say, this requires considerable setup and the co-operation of the local netadmins.

Connection multiplexing

Since JDK1.0.2 did not permit unprivileged code to listen on TCP ports (even those > 1023, the so-called anonymous ports), JDK1.0.2 code could not export objects to JDK1.1 code, even though JDK1.1 code didn't have that restriction. Consequently, the transport layer was modified to permit multiplexed connections: that is, connections whose function is to contain more connections, each of which could do the actual work. Multiplexed connections do not time out, however, so they are not scalable.

Nevertheless, it is possible to abuse multiplexed connections to bypass a particular firewall rule: firewalls which allow connections in one direction but not in another.

The technique is to prevent RMI from listening on a TCP port, thereby triggering the multiplex mechanism. The only way to do this is to install a security manager which throws a SecurityException inside checkListen.

If you could do that, you might as well install a socket factory instead.

C.12 So what do I have to do to get RMI to operate through two firewalls?

First of all, what co-operation can you expect from the client-side firewall?

In the most pessimistic case, the client-side firewall allows no direct TCP connections and has only a HTTP proxy server so that firewalled clients can "surf the web". In this case, your server host will receive connections at port 80 containing RMI requests embedded in HTTP requests. You can use a HTTP server with the java-rmi.cgi program, or you can run the RMI server directly on port 80. Either way, the server cannot use callback objects exported by the clients..

A more optimistic case is that the client can make direct connections to the server but cannot receive incoming connections from the server. In this case, callback objects are not normally possible either. (There is a specific case where applets in some environments may trigger a multiplexed connection mode intended for JDK 1.0.2 compatibility -- this would allow callbacks but is not scalable or supported.)

The most conservative approach, assuming no help from the client firewall administrators, is:

  • Avoid using callback objects
  • Run your servers on `public' ports such as 80, 81, 8001, or 443
  • If the servers are not running on port 80, either:
    • Put a CGI-capable HTTP server on port 80 using the java-rmi.cgi script; or
    • Run a port redirector (such as DeleGate) on port 80, which will accept connections and immediately connect to the real server port to pass bytes back and forth. This will cause getClientHost() to return misleading information, so don't make the Registry available through this method unless it's on a different host.

C.13 Is it possible to replace the java-rmi.cgi script that comes with the JDK distribution with a servlet?

We've provided an example that demonstrates how to implement the java-rmi.cgi script using a servlet. The example also explains how to run a remote object inside a servlet JVM.

Note: If you do not understand the role that java-rmi.cgi plays in tunnelling remote method calls over HTTP, please see the FAQ question regarding HTTP-tunnelling in RMI.

D.1 Is there a way to get automatic notification as soon as a remote Java VM fails?

This is very desirable and is on our RFE list. A notification facility should be available in a future release.

D.2 From within a Java Virtual Machine, can a new Java VM be spawned on a remote machine?

The Java 2 SDK includes object activation, and there are several tutorials explaining how to use it.

D.3 Is it possible for a remote object to be notified when all clients disconnect?

Yes. Your remote object will need to implement the java.rmi.server.Unreferenced interface (in addition to any other necessary interfaces). RMI will provide the notification by calling the unreferenced method when all clients disconnect. Your implementation of the unreferenced method will determine what action your remote object should take upon receiving such a notification. However, if there is a reference in the registry, then the Unreferenced.unreferenced method will never be called.

D.4 Why doesn't my server program exit when all clients disconnect?

In RMI, a server VM should exit if there are
  1. No outstanding client-held references to the remote objects in VM, and
  2. No non-daemon threads executing in the VM.
However, just because there are no local or remote references to a remote object does not mean the object will be garbage collected in a timely fashion. It does mean that the remote object's memory can be collected to satisfy a memory allocation that would otherwise fail (with an OutOfMemoryError).

Although the Java API does not specify the timeliness of collection anyway, there is a particular reason for the what can seem like indefinitely-delayed collection of remote objects in the JDK 1.1 implementation. Under the covers, the RMI runtime holds a weak reference to exported remote objects in a table (to keep track of local as well as remote references to the object). The only weak reference mechanism available in the JDK 1.1 VM uses a non-aggressive, caching collection policy (well-suited for a browser), so objects that are only "weakly reachable" will not get collected until the local GC decides that it really needs that memory to satisfy another allocation. For an idle server, this could never happen. But if memory is needed, an unreferenced server object will be collected.

The Java 2 platform includes a new infrastructure that RMI will use to reduce significantly the number of conditions under which this problem occurs.

D.5 How does the distributed garbage collector detect a client that disconnects? Is it advisable to use System.exit for graceful client termination?

When the RMI runtime in a client VM detects that a remote object is no longer referenced locally, it asynchronously notifies the server relatively quickly so that the server can update the object's referenced set accordingly. The distributed garbage collector uses a lease associated with each client-held remote object reference, and renews leases to remote objects while the client still holds such references. The purpose of the lease renewal mechanism is to allow the server to detect the abnormal termination of clients, so that a server does not hold on to a remote object forever because of a client that was not able to send the appropriate "unreferenced" message before it stopped running. In this context, a client invoking System.exit() is considered abnormal termination, because it does not allow the RMI runtime to send the appropriate "unreferenced" messages to the server. Executing System.runFinalizersOnExit in the client before termination is not sufficient, because not all of the necessary processing is handled in a finalizer; i.e. the "unreferenced" message will not get sent to the server. (Using "runFinalizersOnExit" is generally ill-advised and deadlock-prone anyway.)

If you need to use System.exit() to terminate a client VM, to ensure that remote references held in that VM are cleaned up in a more timely fashion, you should make sure that there are no remote references still reachable (explicitly null any local references to make them unreachable from running threads), and then it helps to do something like this before exiting:

    System.gc();
    System.runFinalization();

D.6 How can my server tell when a client crashes?

Wait for the client's lease to run out, and then the unreferenced() method will be called by RMI (remember that the registry is also a client for this purpose, since it holds references for all its bindings).

If a client is holding a remote reference, it also holds a lease for that reference, which must be renewed (by contacting the server and making a dirty() call). When the final lease for an exported object has expired or closed, the object is considered unreferenced, and (if it implements java.rmi.Unreferenced) its unreferenced() method will be invoked.

If two or more clients have references to the same remote object, the unreferenced() method will not be called until all of them have expired their leases on it. Consequently, if you are using this technique to track individual clients, each client must have a reference to its own Unreferenced object.

D.7 The unreferenced() method doesn't get called until ten minutes after I have stopped using the remote object! How can I shorten this delay?

The lease expiration time is specified by the server, where it can be set using a system property, java.rmi.dgc.leaseValue, whose value is in milliseconds. To set this to a shorter time (for example: 30 seconds), start the server like this:
    java -Djava.rmi.dgc.leaseValue=30000 ServerMain

The default value is 600000 milliseconds (or 10 minutes).

The client will renew each lease when it is halfway expired. If the lease interval is too short, the client will waste a lot of network bandwidth needlessly renewing a lease. If the lease interval is much too short, the client will be unable to renew the lease in time, and the exported object may be deleted as a result.

Future releases of RMI may invalidate remote references if they fail to renew their leases (in order to preserve referential integrity); you should not rely on being able to use stale references to remote objects.

Note that you'll only have to wait for the timeout if the client machine crashes. If the client has some control when the disconnect occurs, it can send out the DGC clean call quickly, making the use of Unreferenced quite timely. You can help this process along by nulling out any references the client may have to the remote object and then calling System.gc(). (In 1.1.x, you may have to run finalizers synchronously and then run GC again.)

D.8 Why can't I get an immediate notification when a client crashes?

Because nothing the server does can distinguish a crashed host from a network delay.

If or when the crashed client later restarts and contacts the server, the server can infer that the client has lost its state. If a TCP connection is held open between the client and the server throughout their interaction, then the server can detect the client reboot when a later attempt to write to the connection fails (including the hourly TCP keepalive packet, if enabled). However, RMI is designed not to require such permanent connections, as it impairs scalability and doesn't help very much.

Given that it is absolutely impossible to instantly determine when a network peer crashes or becomes otherwise unavailable, you must decide how your application should behave when a peer stops responding.

The major tools you have for this task are timeouts and resets. After a timeout, you may conclude that a peer is unreachable, but the peer must be aware of the timeout so that it gives up trying to reach you. The leasing mechanism is designed to do this semi-automatically.

A reset is a purge of existing state held for a peer. For example, a client may cause a reset when it first registers with its server, causing the server to discard any previous state held for that client (having deduced that the client has restarted without memory of the previous, dead, session).

Frequently, the aim is to have and maintain a definitive list of clients at the server, and to keep it up-to-date without error or failure. Since failure and delay can happen at any time in a networked system, some degree of error in the list must be anticipated. If a lease or other mechanism is used to enforce a timeout, then the problem of resource leakage is solved. If the problem of stale data is more serious -- that is, if it would interfere with correct operation -- then it must be explicitly purged in cases where it would otherwise have an effect.

For example, if a business object is locked for editing by a human, and the session dies, then the lock must be broken somehow. In this case, the lock would need a timeout, but if the same human logs in immediately and expects not to have to wait for the timeout to expire, the new session must either take over the lock or assert that the user holds no locks (allowing the server to safely kill the lock).

D.9 How do I run the rmic command in a DOS batch file?

In a DOS batch file, you have to insert the command call before the executable in order for control to return to the batch file. For example:
    call rmic ClientHandler
    call rmic Server
    call rmic ServerHandler
    call rmic Client

D.10 In a remote object implementation, how can I find the host name of the caller of a remote method?

The java.rmi.server.RemoteServer.getClientHost method returns the client host for the current invocation on the current thread.

D.11 Does RMI handle "out" and "inout" parameters (like CORBA)?

RMI does not support "out" or "inout" parameters, just like the rest of the core Java programming language. All remote calls are methods of a remote object. Local objects are passed by copy and remote objects are passed by reference to a stub. For more details, see Parameter Passing in Remote Method Invocation in the RMI Specification.

D.12 Normally in the Java programming language, it is possible to cast an interface instance to an instance of the class from which it was created and use the result. Why doesn't this work in RMI?

In RMI the client sees only a stub for the original object. The stub implements only the remote interfaces and their remote methods and cannot be cast back to the original implementation class because it's just a stub.

So, you cannot pass a remote object reference from a server to a client, and then send it back to the server and be able to cast it back to the original implementation class. You can, though, use the remote object reference on the server to make a remote call to the object.

If you need to find the implementation class again, you'll need to keep a table that maps the remote reference to the implementation class.

E.1 When will Netscape support RMI?

RMI is a major component of the JDK1.1 core API and is included in Netscape's latest release, Communicator 4.06. You may also wish to consider using the JavaTM Plug-in for browsers that do not support the 1.1.x version of the JDK that you are using.

The HotJava Browser is fully JDK1.1 compliant, and as such, supports RMI.

E.2 Can I implement remote observer/observable objects in RMI?

What you can do is "wrap" java.util.Observable and java.util.Observer with new interfaces (you could call them RemoteObservable and RemoteObserver). In these new interfaces, make each of the methods throw java.rmi.RemoteException. Then, your remote objects can implement these interfaces.

Note that since the "wrapped" non-remote object does not extend java.rmi.server.UnicastRemoteObject, you will need to explicitly export the object using the exportObject method of UnicastRemoteObject. In doing this though, you lose the java.rmi.server.RemoteObject implementations of the equals, hashCode, and toString methods.

E.3 How is RMI related to CORBA?

Please read our comprehensive statement and FAQ regarding this issue.

F.1 At what point is there a "live" connection between the client and the server and how are connections managed?

When a client does a "lookup" operation, a connection is made to the rmiregistry on the specified host. In general, a new connection may or may not be created for a remote call. Connections are cached by the RMI-transport for future use, so if a connection is free to the right destination for a remote call, then it is used. A client cannot explicitly close a connection to a server, since connections are managed at the RMI-transport level. Connections will time out if they are unused for a period of time.

F.2 Does the Java platform replace all remote objects with their stubs during a remote method invocation?

Yes, the Java platform replaces all remote objects with their stubs, even deep inside of graphs of serializable objects.

F.3 Is it possible to write a new transport layer for RMI which does not use sockets? As a follow-up question, how about a transport layer that uses non-TCP based sockets?

We have designed the transport interfaces so that different implementations of these interfaces can be used by RMI. In earlier releases, this abstraction was used for our purposes and was not exposed for general use. Now, in the Java 2 SDK, RMI supports "client and server socket factories" that can be used to make RMI calls over non-TCP based sockets.

F.4 I notice the registry continues to use CPU resources, as if it were polling rather than blocking on a select() call. Is the registry implemented by polling?

RMI does not poll on select calls. There is a thread that wakes up every so often and polls the table of remote objects (that reside in the address space). This "reap" thread is used for the purposes of the distributed garbage collector.

F.5 Is there only one socket connection between a client process and the server, no matter how many stubs exist in that client process?

RMI reuses the socket connections between client and server whenever possible. The current implementation creates additional sockets on demand when they are needed. For example, if the existing socket is in use by a call then a new socket is created for the new call. Typically, there are at least two sockets open since the distributed garbage collector needs to make remote calls when remote objects are returned from the server. If a cached connection remains unused for a period of time, the connection is closed.

G.1 What are the licensing issues surrounding the use of RMI?

Client- and server-side support are a part of the JDK base platform and can be downloaded free of charge. There is no cost for tools like the rmic compiler.

G.2 I have a single-threaded program that waits on standard input for a user command which will initiate an RMI call. However, my remote object cannot service this incoming remote call as the program appears to be blocked on standard input. What's the problem?

This is a known problem, not with RMI, but with the thread that reads standard input. The thread does not yield on the blocking read, but instead stays running, hardly letting the listener get any cycles. We have tried two workarounds that seem successful: set the main thread (the one reading standard input) to a lower priority, or yield while bytes are not available in the stream before actually reading it.

G.3 I am copying array elements to my remote server and changing the values, but the incremented values are not copied back to the client. Why?

Non-remote objects are passed by copy, so if you want to have the new values of the array reflected in the client, you will have to send them back as a return argument.

G.4 Am I allowed to have static fields in a remote interface?

Yes. An initializer is run in each VM that loads the remote interface, creating a new static variable with the specified values. So, you have a separate copy of this static variable in each Java VM that loads the remote interface.

G.5 I locate the registry, but then it seems that it's not there, what's happening?

The method LocateRegistry.getRegistry(String host) does not contact the registry on the host, but rather just looks up the host to make sure it exists. So, even though this method succeeded, this does not necessarily mean that a registry is running on the specified host. It just returns a stub that can then access the registry.

G.6 I can't find the answer to my question here, are there any other resources?

A vast amount of information can be found from the hypermail archive of the RMI-USERS mailing list.

Users of both RMI and object serialization can discuss issues and tips with other users via the mailing list rmi-users@java.sun.com. You can subscribe by sending an email message containing the line

    subscribe RMI-USERS
to listserv@java.sun.com, and unsubscribe by sending a message containing the line
    unsubscribe RMI-USERS

Object Serialization

1. Why must classes implement Serializable in order to be written to an ObjectOutputStream?

The decision to require that classes implement the java.io.Serializable interface was not made lightly. The design called for a balance between the needs of developers and the needs of the system to be able to provide a predictable and safe mechanism. The most difficult design constraint to satisify was the safety and security of classes for the Java programming language.

If classes were to be marked as being serializable the design team worried that a developer, either out of forgetfulness, laziness, or ignorance might not declare a class as being Serializable and then make that class useless for RMI or for purposes of persistence. We worried that the requirement would place on a developer the burden of knowing how a class was to be used by others in the future, an essentially unknowable condition. Indeed, our preliminary design, as reflected in the alpha API, concluded that the default case for a class ought to be that the objects in the class be serializable. We changed our design only after considerations of security and correctness convinced us that the default had to be that an object not be serialized.

Security restrictions

The first consideration that caused us to change the default behavior of objects had to do with security, and in particular in the privacy of fields declared to be private, package protected, or protected. The Java platform restricts access to such fields for either read or write to a subset of the objects within the runtime.

No such restriction can be made on an object once it has been serialized; the stream of bytes that are the result of object serialization can be read and altered by any object that has access to that stream. This allows any object access to the state of a serialized object, which can violate the privacy guarantees users of the language expect. Further, the bytes in the stream can be altered in arbitrary ways, allows the reconstruction of an object that was never created within the protections of a Java platform. There are cases in which the re-creation of such an object could compromise not only the privacy guarantees expected by users of the Java platform, but the integrity of the platform itself.

These violations cannot be guarded against, since the whole idea of serialization is to allow an object to be converted into a form that can be moved outside of the Java platform (and therefore outside of the privacy and integrity guarantees of that environment) and then be brought back into the environment. Requiring objects to be declared serializable does mean that the class designer must make an active decision to allow the possibility of such a breach in privacy or integrity. A developer who does not know about serialization should not be open to compromise because of this lack of knowledge. In addition, we would hope that the developer who declares a class to be serializable does so after some thought about the possible consequences of that declaration.

Note that this sort of security problem is not one that can be dealt with by the mechanism of a security manager. Since serialization is intended to allow the transport of an object from one virtual machine to some other (either over space, as it is used in RMI, or over time, as when the stream is saved to a file), the mechanisms used for security need to be independent of the runtime environment of any particular Java virtual machine. We wanted to avoid as much as possible the problem of being able to serialize an object in one virtual machine and not being able to deserialize that object in some other virtual machine. Since the security manager is part of the runtime environment, using the security manager for serialization would have violated this requirement.

Forcing a conscious decision

While security concerns were the first reason for considering the design change, a reason that we feel is at least as convincing is that serialization should only be added to a class after some design consideration. It is far too easy to design a class that falls apart under serialization and re-construction. By requiring a class designer to declare support for the serialization interface, we hoped that the designer would also give some thought to the process of serializing that class.

Examples are easy to cite. Many classes deal with information that only makes sense in the context of the runtime in which the particular object exists; examples of such information include file handles, open socket connections, security information, etc. Such data can be dealt with easily by simply declaring the fields as transient, but such a declaration is only necessary if the object is going to be serialized. A novice (or forgetful, or hurried) programmer might neglect to mark fields as transient in much the same way he or she might neglect to mark the class as implementing the Serializable interface. Such a case should not lead to incorrect behavior; the way to avoid this is to not serialize objects not marked as implementing Serializable.

Another example of this sort is the "simple" object that is the root of a graph that spans a large number of objects. Serializing such an object could result in serializing lots of others, since serialization works over an entire graph. Doing something like this should be a conscious decision, not one that happens by default.

The need for this sort of thought was brought home to us in the group when we were going through the base Java API class libraries marking the system classes as serializable (where appropriate). We had originally thought that this would be a fairly simple process, and that most of the system classes could just be marked as implementing Serializable and then use the default implementation with no other changes. What we found was that this was far less often the case than we had suspected. In a large number of the classes, careful thought had to be given to whether or not a field should be marked as transient or whether it made sense to serialize the class at all.

Of course, there is no way to guarantee that a programmer or class designer is actually going to think about these issues when marking a class as serializable. However, by requiring the class to declare itself as implementing the Serializable interface we do require that some thought be given by the programmer. Having serialization be the default state of an object would mean that lack of thought could cause bad effects in a program, something that the overall design of the Java platform has attempted to avoid.

2. Which JDK 1.1 system classes are marked serializable.?

Removed. This information is readily available from the Javadoc API material.

3. I am having problems deserializing JDK 1.0.2 AWT components. How can I make this work?

When you serialize AWT widgets, also serialized are the Peer objects that map the AWT functions to the local window system. When you deserialize (reconsitute) the AWT widgets, the old Peers are re-created, but they are out of date. Peers are native to the local window system and contain pointers to data structures in the local address space, and therefore cannnot be moved.

As a work-around, you should first remove the top-level widget from its container (so the widgets are no longer "live"). The peers are discarded at this point and you will save only the AWT widget state. When you later deserialize and read the widgets back in, add the top level widget to the frame to make the AWT widgets appear. You may need to add a show call.

In JDK 1.1 and later, AWT widgets are serializable. The java.awt.Component class implements Serializable.

4. Does object serialization support encryption?

Object serialization does not contain any encryption/decryption in itself. It writes to and reads from standard streams in the Java API, so it can be coupled with any available encryption technology. Object serialization can be used in many different ways. Other than just writing and reading to and from files, it can also be used for RMI to communicate between hosts.

RMI's use of serialization leaves encryption and decryption to the lower network transport. We expect that when a secure channel is needed the network connections will be made using SSL or the like (see The Scoop On RMI and SSL).

5. The object serialization classes are stream oriented. How do I write objects to a random-access file?

Currently there is no direct way to write objects to a random-access file.

You can use ByteArrayInputStream and ByteArrayOutputStream objects as intermediate places to write and read bytes to and from the random access file and create ObjectInputStreams and ObjectOutputStreams from the byte streams to transport the objects. You just have to make sure that you have the entire object in the byte stream or reading/writing the object will fail.

For example, java.io.ByteArrayOutputStream can be used to receive the bytes of ObjectOutputStream. From it you can get a result in the form of a byte array. That in turn can be used with ByteArrayInputStream as input to an ObjectInput stream.

6. When a local object is serialized and passed as a parameter in an RMI call, are the bytecodes for the local object's methods also passed? What about object coherency, if the remote VM application "keeps" the object handle?

The bytecodes for a local object's methods are not passed directly in the ObjectOutputStream, but the object's class may need to be loaded by the receiver if the class is not already available locally. The class files themselves are not serialized, just the names of the classes. All classes must be able to be loaded during deserialization using the normal class loading mechanisms. For applets this means they are loaded by the AppletClassLoader.

There are no coherency guarantees for local objects passed to a remote VM since such objects are passed by copying their contents (a true pass-by-value).

7. How can I create an ObjectInputStream from an ObjectOutputStream without a file in between?

ObjectOutputStream and ObjectInputStream work to/from any stream object. You could use a ByteArrayOutputStream and then get the array and insert it into a ByteArrayInputStream. You could also use the piped stream classes as well. Any java.io class that extends the OutputStream and InputStream classes can be used.

8. I create an object and then send it across the net using the writeObject method and receive it using the readObject method. If I then change the value of a field in the object and send it as before, the object that the readObject method returns appears to be the same as the first object and does not reflect the new value of the field. Should I be experiencing this behavior?

The ObjectOutputStream class keeps track of each object it serializes and sends only the handle if that object is seen again. This is the way it deals with graphs of objects. The corresponding ObjectInputStream keeps track of all of the objects it has created and their handles so when the handle is seen again it can return the same object. Both output and input streams keep this state until they are freed.

Alternatively, the ObjectOutputStream class implements a reset method that discards the memory of having sent an object, so sending an object again will make a copy.

9. Are there any plans to support the serialization of thread objects?

Threads will NOT be serializable. In the present implementation, if you attempt to serialize and then deserialize a thread, there is NO explicit allocation of a new native thread or stack; all that happens is that the object is allocated system resources with none of the native implementation. In short, it just won't work and will fail in unpredictable ways.

The difficulty with threads is that they have so much state which is intricately tied into the virtual machine that it is difficult or impossible to re-establish the context somewhere else. For example, saving the JVM call stack is insufficient because if there were native methods that had called C procedures that in turn called code for the Java platform, there would be an incredible mix of Java programming language constructs and C pointers to deal with. Also, serializing the stack would imply serializing any object reachable from any stack variable.

If a thread were resumed in the same VM, it would be sharing a lot of state with the original thread, and would therefore fail in unpredictable ways if both threads were running at once, just like two C threads trying to share a stack. When deserialized in a separate VM, it's hard to tell what might happen.

10. Can I compute diff(serial(x),serial(y))?

The diff will produce the same stream each time the same object is serialized. You will need to create a new ObjectOutputStream to serialize each object.

11. Can I compress the serial representation of my objects using my own zip and unzip methods?

ObjectOutputStream produces an OutputStream; if your zip object extends the OutputStream class there is no problem compressing it.

12. Can I execute methods on compressed versions of my objects, for example isempty(zip(serial(x)))?

This is not really viable for arbitrary objects because of the encoding of objects. For a particular object (such as a String) you can compare the resulting bit streams. The encoding is stable, in that every time the same object is encoded it is encoded to the same set of bits.

13. If I try to serialize a font or image object and then try to reconstitute it in a different VM, my application dies. Why?

Removed. Fonts are now serializable, but images are not.

14. How do I serialize a tree of objects?

Here's a brief example that shows how to serialize a tree of objects.

import java.io.*;

class tree implements java.io.Serializable {
    public tree left;
    public tree right;
    public int id;
    public int level;

    private static int count = 0;

    public tree(int depth) {
        id = count++;
        level = depth;
        if (depth > 0) {
            left = new tree(depth-1);
            right = new tree(depth-1);
        }
    }

    public void print(int levels) {
        for (int i = 0; i < level; i++)
            System.out.print("  ");
        System.out.println("node " + id);

        if (level <= levels && left != null)
            left.print(levels);

        if (level <= levels && right != null)
            right.print(levels);
    }

    public static void main (String argv[]) {

        try {
            /* Create a file to write the serialized tree to. */
            FileOutputStream ostream = new FileOutputStream("tree.tmp");
            /* Create the output stream */
            ObjectOutputStream p = new ObjectOutputStream(ostream);

            /* Create a tree with three levels. */
            tree base = new tree(3);

            p.writeObject(base); // Write the tree to the stream.
            p.flush();
            ostream.close();    // close the file.

            /* Open the file and set to read objects from it. */
            FileInputStream istream = new FileInputStream("tree.tmp");
            ObjectInputStream q = new ObjectInputStream(istream);

            /* Read a tree object, and all the subtrees */
            tree new_tree = (tree)q.readObject();

            new_tree.print(3);  // Print out the top 3 levels of the tree
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}

15. If class A does not implement Serializable but a subclass B implements Serializable, will the fields of class A be serialized when B is serialized?

Only the fields of Serializable objects are written out and restored. The object may be restored only if class A has a no-arg constructor that will initialize the fields of non-serializable supertypes. If the subclass has access to the state of the superclass it can implement writeObject and readObject to save and restore that state.

*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Talk with RMI developers via the mailing list RMI-USERS
To subscribe, send subscribe rmi-users to listserv@javasoft.com
For information on technical support, refer to JavaSoft E-Mail Addresses
Send questions or comments about this site to webmaster@jse.east.sun.com
Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Getting Started Using RMI

This tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using JavaTM Remote Method Invocation (RMI). While you work through this example, you will probably come up with a number of related questions. You may find the answers in the RMI FAQ, or you may wish to look in the email archives of the rmi-users alias. If you'd like to subscribe to the rmi-users email alias, click here.

The distributed Hello World example uses an applet to make a remote method call to an RMI server, running on the host from which the applet was downloaded. When the applet runs, "Hello World!" is displayed on the client browser.

This tutorial is organized as follows:

  1. The steps to write the source files and the HTML file
  2. The steps to compile and deploy class files and the HTML file
  3. The steps to start the RMI registry, server, and applet
The files needed for this tutorial are:
  • Hello.java - a remote interface
  • HelloImpl.java - a remote object implementation that implements examples.hello.Hello
  • HelloApplet.java - an applet that invokes the remote method, sayHello
  • hello.html - the HTML page that references the applet
Note: For the remainder of this tutorial, the terms "remote object implementation," "object implementation," and "implementation" may be used interchangeably to refer to the class, examples.hello.HelloImpl, which implements a remote interface.

For all of the source code used in this tutorial, you may choose from the following formats:

  • getStart.zip
  • getStart.tar
  • getStart.tar.Z

Write the Source and HTML files

Because the JavaTM programming language requires a mapping between the fully-qualified package name of a class and the directory path to that class, you should decide on package and directory names before you begin writing any code written in the Java programming language. This mapping allows the compiler for the Java programming language to know the directory in which to find the class files mentioned in a program. For the programs in this tutorial, the package name is examples.hello and the source directory is $HOME/mysrc/examples/hello.

To create the directory for your source files in the SolarisTM operating environment, execute the command:

    mkdir -p $HOME/mysrc/examples/hello
On Microsoft Windows platforms, you would go to the directory of your choice, and type:
    mkdir mysrc
    mkdir mysrc\examples
    mkdir mysrc\examples\hello

There are three tasks to complete in this section:

  1. Define the functions of the remote class as an interface written in the Java programming language
  2. Write the implementation and server classes
  3. Write a client program that uses the remote service

Define the functions of the remote class as an interface written in the Java programming language

In the Java programming language, a remote object is an instance of a class that implements a Remote interface. Your remote interface will declare each of the methods that you would like to call from other JavaTM virtual machines* (JVMs). Remote interfaces have the following characteristics:
  • The remote interface must be declared public. Otherwise, a client will get an error when attempting to load a remote object that implements the remote interface, unless that client is in the same package as the remote interface.
  • The remote interface extends the java.rmi.Remote interface.
  • Each method must declare java.rmi.RemoteException (or a superclass of RemoteException) in its throws clause, in addition to any application-specific exceptions.
  • The data type of any remote object that is passed as an argument or return value (either directly or embedded within a local object) must be declared as the remote interface type (for example, Hello) not the implementation class (HelloImpl).

Here is the interface definition for the remote interface, examples.hello.Hello. The interface contains just one method, sayHello, which returns a string to the caller:

    package examples.hello;

    import java.rmi.Remote;
    import java.rmi.RemoteException;

    public interface Hello extends Remote {
    String sayHello() throws RemoteException;
    }
Because remote method invocations can fail in very different ways from local method invocations (due to network-related communication problems and server problems), remote methods will report communication failures by throwing a java.rmi.RemoteException. If you want more information on failure and recovery in distributed systems, you may wish to read A Note on Distributed Computing.

Write the implementation and server classes

At a minimum, a remote object implementation class must:

  • Declare that it implements at least one remote interface
  • Define the constructor for the remote object
  • Provide implementations for the methods that can be invoked remotely
A "server" class, in this context, is the class which has a main method that creates an instance of the remote object implementation, and binds that instance to a name in the rmiregistry. The class that contains this main method could be the implementation class itself, or another class entirely.

In this example, the main method is part of examples.hello.HelloImpl. The server program needs to:

  • Create and install a security manager
  • Create one or more instances of a remote object
  • Register at least one of the remote objects with the RMI remote object registry, for bootstrapping purposes
An explanation of each of the preceding six steps follows the source for HelloImpl.java:
    package examples.hello;

    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.rmi.RMISecurityManager;
    import java.rmi.server.UnicastRemoteObject;

    public class HelloImpl extends UnicastRemoteObject implements Hello {

        public HelloImpl() throws RemoteException {
        super();
        }

        public String sayHello() {
        return "Hello World!";
        }

        public static void main(String args[]) {

        // Create and install a security manager
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        try {
            HelloImpl obj = new HelloImpl();

            // Bind this object instance to the name "HelloServer"
            Naming.rebind("//myhost/HelloServer", obj);

            System.out.println("HelloServer bound in registry");
        } catch (Exception e) {
            System.out.println("HelloImpl err: " + e.getMessage());
            e.printStackTrace();
        }
        }
    }

Implement a remote interface

In the Java programming language, when a class declares that it implements an interface, a contract is formed between the class and the compiler. By entering into this contract, the class is promising that it will provide method bodies, or definitions, for each of the method signatures declared in that interface. Interface methods are implicitly public and abstract, so if the implementation class doesn't fulfill its contract, it becomes by definition an abstract class, and the compiler will point out this fact if the class was not declared abstract.

The implementation class in this example is examples.hello.HelloImpl. The implementation class declares which remote interface(s) it is implementing. Here is the HelloImpl class declaration:

    public class HelloImpl extends UnicastRemoteObject
        implements Hello {
As a convenience, the implementation class can extend a remote class, which in this example is java.rmi.server.UnicastRemoteObject. By extending UnicastRemoteObject, the HelloImpl class can be used to create a remote object that:
  • Uses RMI's default sockets-based transport for communication
  • Runs all the time
If you want a remote object that can be activated (created) when a client requests it, rather than running all the time, after you finish this tutorial, you can take a look at the RMI Activation tutorial. Also, you can learn about how to use your own communication protocol, rather than the TCP sockets that RMI uses by default, in the tutorial on Creating a Custom RMI socket factory.

Define the constructor for the remote object

The constructor for a remote class provides the same functionality as the constructor for a non-remote class: it initializes the variables of each newly created instance of the class, and returns an instance of the class to the program which called the constructor.

In addition, the remote object instance will need to be "exported". Exporting a remote object makes it available to accept incoming remote method requests, by listening for incoming calls to the remote object on an anonymous port. When you extend java.rmi.server.UnicastRemoteObject or java.rmi.activation.Activatable, your class will be exported automatically upon creation.

If you choose to extend a remote object from any class other than UnicastRemoteObject or Activatable, you will need to explicitly export the remote object by calling either the UnicastRemoteObject.exportObject method or the Activatable.exportObject method from your class's constructor (or another initialization method, as appropriate).

Because the object export could potentially throw a java.rmi.RemoteException, you must define a constructor that throws a RemoteException, even if the constructor does nothing else. If you forget the constructor, javac will produce the following error message:

    HelloImpl.java:13: Exception java.rmi.RemoteException must be caught, or it must be
        declared in the throws clause of this method.
                super();
                     ^
        1 error
To review: The implementation class for a remote object needs to:
  • Implement a remote interface
  • Export the object so that it can accept incoming remote method calls
  • Declare its constructor(s) to throw at least a java.rmi.RemoteException
Here is the constructor for the examples.hello.HelloImpl class:
    public HelloImpl() throws RemoteException {
    super();
    }
Note the following:
  • The super method call invokes the no-argument constructor of java.rmi.server.UnicastRemoteObject, which exports the remote object.
  • The constructor must throw java.rmi.RemoteException, because RMI's attempt to export a remote object during construction might fail if communication resources are not available.

If you are interested in why java.rmi.RemoteException is a checked exception rather than runtime exception, please refer to the archives of the rmi-users email list:

http://java.sun.com/products/jdk/rmi/archives/3490.html

Although the call to the superclass's no-argument constructor, super(), occurs by default (even if omitted), it is included in this example to make clear the fact that the Java virtual machine (JVM) constructs the superclass before the class.

Provide an implementation for each remote method

The implementation class for a remote object contains the code that implements each of the remote methods specified in the remote interface. For example, here is the implementation for the sayHello method, which returns the string "Hello World!" to the caller:
    public String sayHello() throws RemoteException {
    return "Hello World!";
    }
Arguments to, or return values from, remote methods can be any data type for the Java platform, including objects, as long as those objects implement the interface java.io.Serializable. Most of the core classes in java.lang and java.util implement the Serializable interface. In RMI:
  • By default, local objects are passed by copy, which means that all data members (or fields) of an object are copied, except those marked as static or transient. Please refer to the Java Object Serialization Specification for information on how to alter the default serialization behavior.
  • Remote objects are passed by reference. A reference to a remote object is actually a reference to a stub, which is a client-side proxy for the remote object. Stubs are described fully in the Java Remote Method Invocation Specification. We'll create them later in this tutorial in the section: Use rmic to generate stubs and skeletons.
A class can define methods not specified in the remote interface, but those methods can only be invoked within the virtual machine running the service and cannot be invoked remotely.

Create and install a security manager

The main method of the server first needs to create and install a security manager: either the RMISecurityManager or one that you have defined yourself. For example:
if (System.getSecurityManager() == null) {

        System.setSecurityManager(new RMISecurityManager());
}
A security manager needs to be running so that it can guarantee that the classes that get loaded do not perform operations that they are not allowed to perform. If no security manager is specified no class loading, by RMI clients or servers, is allowed, aside from what can be found in the local CLASSPATH. In this example, a security manager is not installed in the client code because applets use the security manager already installed in the client browser. If the client were an application rather than an applet, however, you would need to use the same procedure as is used above to install a security manager in the client. A security manager is required in any JVM that needs to download code, and RMI clients need to download RMI stubs (as well as any other custom classes or interfaces needed to communicate with the RMI server).

Create one or more instances of a remote object

The main method of the server needs to create one or more instances of the remote object implementation which provides the service. For example:
HelloImpl obj = new HelloImpl();
The constructor exports the remote object, which means that once created, the remote object is ready to accept incoming calls.

Register the remote object

For a caller (client, peer, or applet) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object.

For bootstrapping, the RMI system provides a remote object registry that allows you to bind a URL-formatted name of the form "//host/objectname" to the remote object, where objectname is a simple string name.

The RMI registry is a simple server-side name service that allows remote clients to get a reference to a remote object. It is typically used only to locate the first remote object an RMI client needs to talk to. Then that first object would in turn provide application-specific support for finding other objects.

For example, the reference can be obtained as a parameter to, or a return value from, another remote method call. For a discussion on how this works, please take a look at Applying the Factory Pattern to RMI.

Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object.

For example, the following code binds the name "HelloServer" to a reference for the remote object:

Naming.rebind("//myhost/HelloServer", obj);
Note the following about the arguments to the rebind method call:
  • The first parameter is a URL-formatted java.lang.String, representing the location and name of the remote object.

    • No protocol needs to be specified in the URL-formatted string.
    • You will need to change the value of myhost to be the name or IP address of your server machine; otherwise, the remote object host defaults to the current host. For example, "HelloServer" is a valid name string that refers to a remote object bound to the name HelloServer, running on the local host.
    • Optionally, a port number can be supplied in the URL-formatted string. Specifying the port number is necessary when the registry that needs to be contacted is running on a port other than the default port, 1099. For example, "//myhost:1234/HelloServer" is a valid name string for the HelloServer remote object, reachable through an RMI registry that is running on the host myhost and is listening for incoming calls on port 1234.

  • The second parameter is a reference to the object implementation, on which remote methods will be invoked.

  • Once an object is exported, the RMI runtime substitutes a reference to the remote object's stub for the actual remote object reference specified by the obj argument. When a client performs a lookup in a server's remote object registry, a serialized instance of the stub for the implementation is returned.
For security reasons, an application can bind or unbind only to a registry running on the same host. This prevents a client from removing or overwriting any of the entries in a server's remote registry. A lookup, however, can be done from any host.

Write a client program that uses the remote service

The applet in this example remotely invokes the sayHello method in order to get the string "Hello World!" to display when the applet runs. Here is the code for the applet:

package examples.hello;

import java.applet.Applet;
import java.awt.Graphics;
import java.rmi.Naming;
import java.rmi.RemoteException;

public class HelloApplet extends Applet {

    String message = "blank";

    // "obj" is the identifier that we'll use to refer
    // to the remote object that implements the "Hello"
    // interface
    Hello obj = null;

    public void init() {
        try {
            obj = (Hello)Naming.lookup("//" +
                getCodeBase().getHost() + "/HelloServer");
            message = obj.sayHello();
        } catch (Exception e) {
            System.out.println("HelloApplet exception: " + e.getMessage());
            e.printStackTrace();
        }
    }

    public void paint(Graphics g) {
        g.drawString(message, 25, 50);
    }
}
  1. First, the applet gets a reference to the remote object implementation (advertised as "HelloServer") from the server host's rmiregistry. Like the Naming.rebind method, the Naming.lookup method takes a URL-formatted java.lang.String. In this example, the applet constructs the URL string by using the getCodeBase method in conjunction with the getHost method. Naming.lookup takes care of the following tasks:

    • Constructing a registry stub instance (to contact the server's registry) using the hostname and port number supplied as arguments to Naming.lookup
    • Using the registry stub to call the remote lookup method on the registry, using the URL's name component ("HelloServer")

      • The registry returns the HelloImpl_Stub instance bound to that name
      • The lookup method receives the remote object's (HelloImpl) stub instance and loads the stub class (examples.hello.HelloImpl_Stub) from the CLASSPATH or the applet's codebase

    • Naming.lookup returns the stub to its caller (HelloApplet)

  2. The applet invokes the remote sayHello method on the server's remote object

    • RMI serializes and returns the reply string "Hello World!"
    • RMI deserializes the string and stores it in a variable named message.

  3. The applet invokes the paint method, causing the string "Hello World!" to be displayed in the drawing area of the applet.
The URL-formatted string that is passed as a parameter to the Naming.lookup method must include the server's hostname. Otherwise, the applet's lookup attempt will default to the client, and the AppletSecurityManager will throw an exception because the applet cannot access the local system, but is instead limited to only communicating with the applet's host.

Here is the HTML code for the web page that references the Hello World applet:

    <HTML>
    <title>Hello World</title>
    <center> <h1>Hello World</h1> </center>
    <applet codebase="myclasses/"
            code="examples.hello.HelloApplet"
            width=500 height=120>
    </applet>
    </HTML>
Note the following:
  • There needs to be an HTTP server running on the machine from which you want to download classes.
  • The codebase in the HTML file specifies a directory below the directory from which the web page was itself loaded. Using this kind of relative path is usually a good idea. For example, if the codebase directory (where the applet's class files live), referenced by the applet's HTML, was in the directory above the the HTML directory, you would use the relative path, "../".
  • The applet's code attribute specifies the fully-qualified package name of the applet, in this example examples.hello.HelloApplet:
    code="examples.hello.HelloApplet"

Compile and Deploy Class Files and HTML Files

The source code for this example is now complete and the $HOME/mysrc/examples/hello directory has four files:
  • Hello.java contains the source code for the Hello remote interface
  • HelloImpl.java contains the source code for the HelloImpl remote object implementation and the RMI server for the applet
  • HelloApplet.java contains the source code for the applet
  • hello.html is the web page that references the Hello World applet.
In this section, you compile the .java source files to create .class files. You then run the rmic compiler to create stubs and skeletons. A stub is a client-side proxy for a remote object which forwards RMI calls to the server-side dispatcher, which in turn forwards the call to the actual remote object implementation.

When you use the javac and rmic compilers, you must specify where the resulting class files should reside. For applets, all files should be in the applet's codebase directory. For our example, this directory is $HOME/public_html/myclasses.

Some web servers allow accessing a user's public_html directory via an HTTP URL constructed as "http://host/~username/". If your web server does not support this convention, you could use a file URL of the form "file:/home/username/public_html" for testing, but this approach will limit you to communicating between a client and server that have access to the same physical file system. As an alternative, you can use an HTTP URL by setting up a minimal web server on your system; we have one available for download here.

There are four tasks to complete in this section:

  1. Compile the source files
  2. Use rmic to generate stubs and skeletons
  3. Move the HTML file to the deployment directory
  4. Set paths for runtime

Compile the source files

Make sure that the deployment directory $HOME/public_html/myclasses and the development directory $HOME/mysrc/examples/hello are each accessible through the local CLASSPATH on the development machine before attempting to compile.

To compile the source files, run the javac command as follows:

javac  -d  $HOME/public_html/myclasses Hello.java  HelloImpl.java  HelloApplet.java

This command creates the directory examples/hello (if it does not already exist) in the directory $HOME/public_html/myclasses. The command then writes to that directory the files Hello.class, HelloImpl.class, and HelloApplet.class. These are the remote interface, the implementation, and the applet respectively. For an explanation of javac options, you can refer to the Solaris javac manual page or the Win32 javac manual page.

Use rmic to generate skeletons and/or stubs

To create stub and skeleton files, run the rmic compiler on the fully-qualified package names of compiled class files that contain remote object implementations, like my.package.MyImpl. The rmic command takes one or more class names as an argument and produces class files of the form MyImpl_Skel.class and MyImpl_Stub.class.

By default, in the Java 2 SDK, v1.2 and later, rmic runs with the -vcompat flag on, which produces stubs and skeletons that support access to:

  1. Unicast (not Activatable) remote objects from 1.1 clients and
  2. All types of remote objects from 1.2 (and later) clients
If you will never need support for 1.1 clients, rmic can be run with the -v1.2 option. For an explanation of rmic options, you can refer to the Solaris rmic manual page or the Win32 rmic manual page.

For example, to create the stub and skeleton for the HelloImpl remote object implementation, run rmic like this:

rmic  -d  $HOME/public_html/myclasses  examples.hello.HelloImpl

The "-d" option indicates the root directory in which to place the compiled stub and skeleton class files. So the preceding command creates the following files in the directory $HOME/public_html/myclasses/examples/hello:

  • HelloImpl_Stub.class
  • HelloImpl_Skel.class
The generated stub class implements exactly the same set of remote interfaces as the remote object itself. This means that a client can use the Java programming language's built-in operators for casting and type checking. It also means that remote objects written for the Java platform support true object-oriented polymorphism.

Move the HTML file to the deployment directory

To make the web page that references the applet visible to clients, the hello.html file must be moved from the development directory to the applet's codebase directory. For example:

mv  $HOME/mysrc/examples/hello/hello.html  $HOME/public_html/

Set paths for runtime

Make sure that the $HOME/public_html/myclasses directory is available through the server's local CLASSPATH when you run the HelloImpl server.

Start the RMI registry, server, and applet

There are three tasks to complete in this section:
  1. Start the RMI registry
  2. Start the server
  3. Run the applet

Start the RMI registry

The RMI registry is a simple server-side name server that allows remote clients to get a reference to a remote object. Typically, it is used only to locate the first remote object an application needs to talk to. Then that object in turn would provide application-specific support for finding other objects.

Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.

If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object. For an explanation of how code downloading works in RMI, please take a look at the tutorial on Dynamic code downloading using RMI.

To start the registry on the server, execute the rmiregistry command. This command produces no output and is typically run in the background. For more on the rmiregistry, you can refer to the Solaris rmiregistry manual page or the Win32 rmiregistry manual page.

For example, in the Solaris operating environment:

rmiregistry &

For example, on Microsoft Windows 95 systems:

start rmiregistry

(Use javaw if start is not available.)

By default, the registry runs on port 1099. To start the registry on a different port, specify the port number from the command line. For example, to start the registry on port 2001 on a Microsoft Windows NT system:

start rmiregistry 2001

If the registry is running on a port other than 1099, you'll need to specify the port number in the name handed to the URL-based methods of the java.rmi.Naming class when making calls to the registry. For example, if the registry is running on port 2001 in this example, the call required to bind the name "HelloServer" to the remote object reference would be:

Naming.rebind("//myhost:2001/HelloServer", obj);

You must stop and restart the registry any time you modify a remote interface or use modified/additional remote interfaces in a remote object implementation. Otherwise, the type of the object reference bound in the registry will not match the modified class.

Start the server

When starting the server, the java.rmi.server.codebase property must be specified, so that the stub class can be dynamically downloaded to the registry and then to the client. Run the server, setting the codebase property to be the location of the implementation stubs. Because the codebase property in this example references a directory, make sure that any other classes that may need to be downloaded have also been installed in the directory referenced by java.rmi.server.codebase. For other command-line examples of codebase settings, please take a look at the tutorial on Dynamic code downloading using RMI.

For explanations of each of the java.rmi.server properties, click here. To see all the available java.rmi.activation properties, click here. For an explanation of java options, you can refer to the Solaris java manual page or the Win32 java manual page. If you have problems running the example code, please take a look at the RMI and Serialization FAQ.

Note: A stub class is dynamically downloaded to a client's virtual machine only when the class is not already available locally and the java.rmi.server.codebase property has been set properly to specify where the class files are located on the server.

There are four things that need to go on the same command line: the "java" command, followed by two property name=value pairs (for the codebase property, note that there are no spaces from the "-D" all the way though the last "/") and then the fully-qualified package name of the server program. There should be a space just after the word "java", between the two properties, and just before the word "examples" (which is very hard to see when you view this as text, in a browser, or on paper). The following command shows how to start the HelloImpl server, specifying the java.rmi.server.codebase and java.security.policy properties:

java  -Djava.rmi.server.codebase=http://myhost/~myusrname/myclasses/  -Djava.security.policy=$HOME/mysrc/policy  examples.hello.HelloImpl

In order to run this code on your system, you'll need to change the location of the policy file to be the location of the directory on your system, where you've installed the example source code.

Note: In this example, for simplicity, we will use a policy file that gives global permission to anyone from anywhere. Do not use this policy file in a production environment. For more information on how to properly open up permissions using a java.security.policy file, please refer to to the following documents:

    Default Policy Implementation and Policy File Syntax

    Permissions in the Java 2 SDK

The codebase property will be resolved to a URL, so it must have the form of "http://aHost/somesource/" or "file:/myDirectory/location/" or, due to the requirements of some operating systems, "file:///myDirectory/location/" (three slashes after the "file:").

Please note that each of the URL strings above has a trailing "/". The trailing slash is a requirement for the URL set by the java.rmi.server.codebase property, so the implementation can resolve (find) your class definition(s) properly.

If you forget the trailing slash on the codebase property, or if the class files can't be located at the source (they aren't really being made available for download) or if you misspell the property name, you'll get thrown a java.lang.ClassNotFoundException. This exception will be thrown when you try to bind your remote object to the rmiregistry, or when the first client attempts to access that object's stub. If the latter case occurs, you have another problem as well because the rmiregistry was finding the stubs in its CLASSPATH.

The output should look like this:

HelloServer bound in registry

Run the applet

Once the registry and server are running, the applet can be run. An applet is run by loading its web page into a browser or appletviewer, as shown here:
appletviewer http://myhost/~myusrname/hello.html &
After running the appletviewer, you will see output similar to the following on your display:

*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Contents

CONTENTS | PREV | NEXT

JavaTM Remote Method Invocation Specification

JavaTM Remote Method Invocation (RMI) is a distributed object model for the Java programming language that retains the semantics of the Java platform's object model, making distributed objects easy to implement and to use. The system combines aspects of the Modula-3 Network Objects system and Spring's subcontract and includes some novel features made possible by the Java platform.
Revision 1.7, JavaTM 2 SDK, Standard Edition, v1.3.0, December 1999

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


sun.rmi Properties

WARNING: The properties described here are not supported, can change at any time, and only exist in certain implementations of RMI from Sun MicrosystemsTM. These properties are not part of the RMI public API and are documented in this FAQ as a debugging aid only.

Please Note: Unless otherwise stated, any output from these properties is sent to System.err. Each of the properties that have names ending in ".logLevel" have possible values of "SILENT", "BRIEF", and "VERBOSE". These values are case insensitive and may be abbreviated as a string containing the first n letters, where n is greater than or equal to 1. If not specified, these properties have a default value of "SILENT". Logging messages are sent to System.err. For instance, if a property is said to send output to the "transport" log, this means that logging messages are sent to a LogStream returned by java.rmi.server.LogStream.log("transport"), which sends messages to System.err, unless you've set it to something else.

Properties that can be set on rmid

sun.rmi.activation.execTimeout (1.2 and later)
The value of this property represents the time (in milliseconds) that the activation system will wait for a spawned activation group to start up. Setting this property gives you the ability to shorten or lengthen the maximum time that rmid will wait for an activation group to start up. The default value is 30000 milliseconds (30 seconds).

sun.rmi.activation.snapshotInterval (1.2 and later)
This property controls the number of updates for which the activation system will wait before it serializes a snapshot of its state to the rmid log file on disk. An "update" refers to a persistent change in the state of the activation system (for example, the registration of an Activatable object) since the last snapshot was taken. Changing the value of this property can be used to make rmid re-start more quickly (by taking snapshots of the log more often) or to make rmid more efficient (by taking snapshots of the log less often). The value of this property is a positive integer value. The default value is 200.

sun.rmi.log.debug (1.2 and later)
If this value is true, details of rmid's logging activity are sent to System.err.

sun.rmi.rmid.maxstartgroup (1.2 and later)
The value of this property represents the maximum number of activation group VMs that rmid will allow to be in the "spawning but not yet active" state simultaneously. If more VMs need to be started, they will queue up until one of the current spawn attempts either succeeds or times out. Note that this property does not limit the maximum number of active VMs; it is intended to smooth out sudden spikes of activity to avoid reaching operating system limits. While setting the value of this property to a lower number may result in a longer start-up time for rmid, and setting the value to a higher number could shorten the start-up time, setting this value too high can crash rmid, because your system may run out of resources. The default value is 3.

sun.rmi.server.activation.debugExec (1.2 and later)
If this value is true, the activation system will print out debugging information to the command line that is used for spawning activation groups. By default, the value is false, so debugging information is not printed.

Properties that are useful to set on JVMs* that export remote objects

sun.rmi.dgc.checkInterval (1.1 and later)
The value of this property represents (in milliseconds) how often the RMI runtime checks for expired DGC leases. The default value is 300000 milliseconds (5 minutes).

sun.rmi.dgc.logLevel (1.1 and later)
This property controls the logging of incoming and outgoing calls related to DGC lease granting, renewing, and expiration. It sends output to the "dgc" log.

sun.rmi.dgc.server.gcInterval (1.2 and later)
When it is necessary to ensure that unreachable remote objects are unexported and garbage collected in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the RMI runtime will allow between garbage collections of the local heap. The default value is 60000 milliseconds (60 seconds).

sun.rmi.loader.logLevel (1.2 and later)
This property controls the logging of each class name and codebase, whenever the RMI runtime attempts to load a class as a result of unmarshalling either an argument or return value. Please note that the codebase that is printed is the annotated codebase, but may not necessarily be the actual codebase from which the class gets loaded; the RMI class loader defers the class loading to the current thread's context class loader, which may load the class from the CLASSPATH, rather than the annotated codebase. This property sends output to the "loader" log.

sun.rmi.server.exceptionTrace (1.2 and later)
This property controls the output of server-side stack traces from exceptions and errors that are thrown by dispatched, incoming remote calls. If this value is true, exception stack traces will be printed. By default (false), exception and error stack traces are not printed.

sun.rmi.transport.logLevel (1.1 and later)
This property controls detailed logging throughout the transport layer. It sends output to the "transport" log.

sun.rmi.transport.tcp.localHostNameTimeOut (1.1.7 and later)
The value of this property represents the time (in milliseconds) that the RMI runtime will wait to obtain a fully qualified domain name for the local host. The default value is 10000 milliseconds (10 seconds).

sun.rmi.transport.tcp.logLevel (1.1 and later)
This property provides detailed logging for the TCP-specific transport sub-layer. It sends output to the "tcp" log.

sun.rmi.transport.tcp.readTimeout (1.2.2 and later)
The value of this property represents the time (in milliseconds) used as an idle timeout for incoming RMI-TCP connections. The value is passed to java.net.Socket.setSoTimeout. This property is used only for cases where a client has not dropped an unused connection as it should (see sun.rmi.transport.connectionTimeout). The default value is 2*3600*1000 milliseconds (2 hours).

Properties that are useful to set on JVMs that make remote method calls

sun.rmi.dgc.cleanInterval (1.1 and later)
The value of this property represents the maximum length of time (in milliseconds) that the RMI runtime will wait before retrying a failed DGC "clean" call. The default value is 180000 milliseconds (3 minutes).

sun.rmi.dgc.client.gcInterval (1.2 and later)
When it is necessary to ensure that DGC clean calls for unreachable remote references are delivered in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the RMI runtime will allow between garbage collections of the local heap. The default value is 60000 milliseconds (60 seconds).

sun.rmi.loader.logLevel (1.2 and later)
This property controls the logging of each class name and codebase, whenever the RMI runtime attempts to load a class as a result of unmarshalling either an argument or return value. Please note that the codebase that is printed is the annotated codebase, but may not necessarily be the actual codebase from which the class gets loaded; the RMI class loader defers the class loading to the current thread's context class loader, which may load the class from the CLASSPATH, rather than the annotated codebase. This property sends output to the "loader" log.

sun.rmi.server.logLevel (1.1 and later)
This property controls the logging of information related to outgoing calls, including some connection-reuse information. It sends output to the "transport" log.

sun.rmi.transport.connectionTimeout (1.1.6 and later)
The value of this property represents the period (in milliseconds) for which RMI socket connections may reside in an "unused" state, before the RMI runtime will allow those connections to be freed (closed). The default value is 15000 milliseconds (15 seconds). See also sun.rmi.transport.tcp.readTimeout.

sun.rmi.transport.logLevel (1.1 and later)
This property controls detailed logging throughout the transport layer. It sends output to the "transport" log.

sun.rmi.transport.proxy.connectTimeout (1.1 and later)
The value of this property represents the maximum length of time (in milliseconds) that the RMI runtime will wait for a connection attempt (createSocket) to complete, before attempting to contact the server using HTTP. This property is only used when the http.proxyHost property is set and the value of java.rmi.server.disableHttp is false. The default value is 15000 milliseconds (15 seconds).

sun.rmi.transport.proxy.logLevel (1.1 and later)
This property controls the logging of events (createSocket and createServerSocket) when the default RMISocketFactory class is used. This type of logging is likely to be useful for applications that use RMI over HTTP. Events in custom socket factories are not logged by this property. It sends some messages to the "proxy" log, and others to the "transport" log.

sun.rmi.transport.tcp.logLevel (1.1 and later)
This property provides detailed logging for the TCP-specific transport sub-layer. It sends output to the "tcp" log.
We are very interested in knowing whether this information is useful. Please send any comments or suggestions to: rmi-comments@java.sun.com, with a subject of "sun.rmi properties FAQ".

*As used on this web site, the terms "Java(TM) virtual machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


idlj - The IDL-to-Java Compiler

idlj generates Java bindings from a given IDL file.

Synopsis

idlj [ options ] idl-file

Options may appear in any order, but must precede the idl-file.

Description

The IDL-to-Java Compiler generates the Java bindings for a given IDL file. For binding details, see the IDL to Java document at the OMG website.

Emitting Client and Server Bindings

To generate Java bindings for an IDL file named My.idl:
    idlj My.idl
This generates the client-side bindings and is equivalent to:
    idlj -fclient My.idl
The client-side bindings do not include the server-side skeleton. If you want to generate the server-side bindings for the interfaces:
    idlj -fserver My.idl
Server-side bindings include the client-side bindings plus the skeleton, all of which are ImplBase (that is, Inheritance model) classes. If you want to generate both client side and server side bindings, use one of the following (equivalent) commands:
    idlj -fclient -fserver My.idl
    idlj -fall My.idl
The default server-side model is the inheritance model. Given an interface My defined in My.idl, the file _MyImplBase.java is generated. You must provide the implementation for My and it must inherit from _MyImplBase.

There is another server-side model called the Tie Model. This is a delegation model. The following commands generate the bindings for the Tie Model:

    idlj -fserverTIE My.idl
    idlj -fallTIE My.idl
For the interface My, this will generate My_Tie.java. The constructor to My_Tie takes a My. You must provide the implementation for My, but it does not have to inherit from any other class, only the interface My. But to use it with the ORB, you must wrap your implementation within My_Tie. For instance:
    MyImpl myImpl = new MyImpl ();
    My_Tie tie = new My_Tie (myImpl);
    orb.connect (tie);
You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method.

Specifying Alternate Locations for Emitted Files

If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as:
idlj -td /altdir My.idl
For the interface My, the bindings will be emitted to /altdir/My.java, etc., instead of ./My.java.

Specifying Alternate Locations for Include Files

If My.idl included another idl file, MyOther.idl, the compiler assumes that MyOther.idl resides in the local directory. If it resides in /includes, for example, then you would invoke the compiler with the following command:
    idlj -i /includes My.idl
If My.idl also included Another.idl that resided in /moreIncludes, for example, then you would invoke the compiler with the following command:
    idlj -i /includes -i /moreIncludes My.idl
Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named idl.config in a directory that is listed in your CLASSPATH. Inside of idl.config, provide a line with the following form:
    includes=/includes;/moreIncludes
The compiler will find this file and read in the includes list. Note that in this example the separator character between the two directories is a semicolon (;). This separator character is platform dependent. On NT it is a semicolon, on AIX it is a colon, etc.

Emitting Bindings for Include Files

By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files:
    My.idl
    #include <MyOther.idl>
    interface My
    {
    };
    MyOther.idl

    interface MyOther
    {
    };

The following command will only generate the java bindings for My:
    idlj My.idl
To generate all of the types in My.idl and all of the types in the files that My.idl includes (in this example, MyOther.idl), use the following command:
    idlj -emitAll My.idl
There is a caveat to the default rule. #include statements which appear at global scope are treated as described. These #include statements can be thought of as import statements. #include statements which appear within some enclosing scope are treated as true #include statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example:
    My.idl
    #include <MyOther.idl>
    interface My
    {
      #include <Embedded.idl>
    };
    MyOther.idl
    interface MyOther
    {
    };
    Embedded.idl
    enum E {one, two, three};
Running the following command:
    idlj My.idl
will generate the following list of Java files:
    ./MyHolder.java
    ./MyHelper.java
    ./_MyStub.java
    ./MyPackage
    ./MyPackage/EHolder.java
    ./MyPackage/EHelper.java
    ./MyPackage/E.java
    ./My.java
Notice that MyOther.java was not generated because it is defined in an import-like #include. But E.java was generated because it was defined in a true #include. Also notice that since Embedded.idl was included within the scope of the interface My, it appears within the scope of My (that is,in MyPackage).

If the -emitAll flag had been used in the previous example, then all types in all included files would be emitted.

Inserting Package Prefixes

Suppose that you work for a company named ABC that has constructed the following IDL file:

    Widgets.idl

    module Widgets
    {
      interface W1 {...};
      interface W2 {...};
    };

Running this file through the IDL-to-Java compiler will place the Java bindings for W1 and W2 within the package Widgets. But there is an industry convention that states that a company's packages should reside within a package named com.<company name>. The Widgets package is not good enough. To follow convention, it should be com.abc.Widgets. To place this package prefix onto the Widgets module, execute the following:
    idlj -pkgPrefix Widgets com.abc Widgets.idl
If you have an IDL file which includes Widgets.idl, the -pkgPrefix flag must appear in that command also. If it does not, then your IDL file will be looking for a Widgets package rather than a com.abc.Widgets package.

If you have a number of these packages that require prefixes, it might be easier to place them into the idl.config file described above. Each package prefix line should be of the form:

    PkgPrefix.<type>=<prefix>
So the line for the above example would be:
    PkgPrefix.Widgets=com.abc

Defining Symbols Before Compilation

You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command
    idlj -d MYDEF My.idl
is the equivalent of putting the line #define MYDEF inside My.idl.

Preserving Pre-Existing Bindings

If the Java binding files already exist, the -keep flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the -keep option is very useful. The command
    idlj -keep My.idl
emit all client-side bindings that do not already exist.

Viewing Progres of Compilation

The Idl-to-Java compiler will generate status messages as it progresses through its phases of execution. Use the -v option to activate this "verbose" mode:
    idlj -v My.idl
By default the compiler does not operate in verbose mode.

Displaying Version Information

To display the build version of the IDL-to-Java compiler, specify the -version option on the command-line:

idlj -version

Version information also appears within the bindings generated by the compiler. Any additional options appearing on the command-line are ignored.

Options

-d symbol
This is equivalent to the following line in an IDL file:
#define symbol

-emitAll
Emit all types, including those found in #include files.

-fside
Defines what bindings to emit. side is one of client, server, serverTIE, all, or allTIE. Assumes -fclient if the flag is not specified.

-i include-path
By default, the current directory is scanned for included files. This option adds another directory.

-keep
If a file to be generated already exists, do not overwrite it. By default it is overwritten.

-pkgPrefix type prefix
Wherever type is encountered at file scope, prefix the computed Java package name with prefix for all files generated for that type. type is the simple name of either a top-level module, or an IDL type defined outside of any module.

-td dir
Use dir for the output directory instead of the current directory.

-nowarn, -verbose
Verbose mode.

-version
Display version information and terminate.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.
See the Description section for more option information.

Restrictions:

  • Escaped identifiers in the global scope may not have the same spelling as IDL primitive types, Object, or ValueBase. This is because the symbol table is pre-loaded with these identifiers; allowing them to be redefined would overwrite their original definitions. (Possible permanent restriction).
  • No local stubs, and no copy semantics when passing values locally (awaiting POA implementation).
  • The fixed IDL type is not supported.
  • The generated stubs do not support Serialization, due to IDL/Java mapping specification 1998-08-22 section 25.3.1.3 failing to specify what's required.
  • Constants of type octet cannot be declared.

Known Problems:

  • The Java bindings for IDL valuetypes produced by the IDL compiler are not fully compliant with the latest OMG revision of the Objects By Value specification. Fully compliant bindings will be supported in a future release of the compiler.
  • In some cases, the Java class generated by the compiler from an IDL valuetype definition may not contain a no-argument constructor. If this occurs, edit the generated code to add an empty public or protected no-argument constructor.
  • The compiler may complete the compilation process without errors but fail to generate output. If this happens, specify the -emitAll option.
  • The compiler does not recognize the deprecated CORBA::Principal type.
  • Declaration of a constant and method or attribute having the same name in the same scope does not cause an error. The following IDL should cause an error but doesn't:
    •       interface t {
        const long foo = 1;
        attribute long foo;
      };
  • The following IDL results in an error for "S is an undeclared type" in interface B. It shouldn't.
    •       interface A { struct S { short s; }; };
      interface B:A { typedef S new_S;
                      exception ex {S f1;}; // Error for "S" here
      };
  • If a union defines another union in its default clause, the resulting Java class gets compilation errors. The work-around is to define the nested union outside of the containing union.


RMI-IIOP Programmer's Guide

Copyright © 1999 Sun Microsystems, Inc.
Copyright © 1999 International Business Machines Corporation. All Rights Reserved.

Documentation Contents

Table of Contents

  • Introduction
  • Background Reading
  • What is RMI-IIOP?
  • The New rmic Compiler
  • The New idlj Compiler
  • How to Make RMI Programs Use IIOP
  • Restrictions When Running RMI Programs Over IIOP
  • Converting the RMI Hello World Program to RMI-IIOP
  • Other Things You Should Know

Introduction

This document will teach you how to write Java Remote Method Invocation (RMI) programs that can access remote objects by using the Internet Inter-ORB Protocol (IIOP). By making your RMI programs conform to a small set of restrictions, your RMI programs can access CORBA objects. RMI-IIOP gives you RMI ease-of-use coupled with CORBA/IIOP language interoperability. This document is for RMI programmers who want to write RMI-IIOP programs, or convert existing RMI programs to RMI-IIOP.

Background Reading

Here are some sites to get you up to speed with this technology:
  • The RMI-IIOP home page contains links to RMI-IIOP documentation, sample code, specifications, news, other related web sites, and more. Check it out!
  • The RMI-IIOP FAQ page answers many basic RMI-IIOP questions.
  • The Java RMI home page contains links to RMI documentation, examples, specification, and more. Make sure you read this.
  • The RMI trail in the Java Tutorial.
  • The RMI API documentation.
  • The Java IDL web page will familiarize you with Sun's CORBA/IIOP implementation.
  • The Java IDL trail in the Java Tutorial.
  • The Java Language to IDL Mapping document is a detailed technical specification of RMI-IIOP.

What is RMI-IIOP?

RMI

With RMI you can write distributed programs in the Java programming language. RMI is easy to use, you don't need to learn a separate interface definition language (IDL), and you get Java's inherent "write once, run anywhere" benefit. Clients, remote interfaces, and servers are written entirely in Java. RMI uses the Java Remote Method Protocol (JRMP) for remote Java object comunication. To get a quick introduction to writing RMI programs, see the RMI Tutorial web page. That document describes writing a simple "Hello World" RMI program.

RMI lacks interoperability with other languages, and, because it uses a non-standard communication protocol, cannot communicate with CORBA objects.

IIOP, CORBA, and Java IDL

IIOP is CORBA's communication protocol. It defines the way the bits are sent over a wire between CORBA clients and servers. CORBA is a standard distributed object architecture developed by the Object Management Group (OMG). Interfaces to remote objects are described in a platform-neutral interface definition language (IDL). Mappings from IDL to specific programming languages are implemented, binding the language to CORBA/IIOP.

The JDK's CORBA/IIOP implementation is known as Java IDL. Along with the idltojava compiler, Java IDL can be used to define, implement, and access CORBA objects from the Java programming language.

The Java IDL web page gives you a good, Java-centric view of CORBA/IIOP programming. To get a quick introduction to writing Java IDL programs, see the Getting Started: Hello World web page.

RMI-IIOP

Previously Java programmers had to choose between RMI and CORBA/IIOP (Java IDL) for distributed programming solutions. Now, by adhering to a few restrictions, RMI objects can use the IIOP protocol, and communicate with CORBA objects. This solution is known as RMI-IIOP. RMI-IIOP combines RMI-style ease of use with CORBA cross-language interoperability.

The New rmic Compiler

The RMI-IIOP software comes with a new rmic compiler that can generate IIOP stubs and ties, and emit IDL.

Here are the new rmic flags:

-iiop -- Generates IIOP stubs/ties.
-idl -- Generates IDL.
-noValueMethods -- Stops generation of IDL for methods and constructors within IDL valuetypes.
-always -- Forces re-generation even when existing stubs/ties/idl are newer than the input class. Only valid when -iiop and/or -idl flags are present.
-factory -- Uses factory keyword.
-idlModule <fromJavaPackage<.class>> <toIDLModule> -- Specifies IDLEntity package mapping. For example: -idlModule foo.bar my::real::idlmod
-idlFile <fromJavaPackage<.class>> <toIDLFile> -- Specifies IDLEntity file mapping. For example: -idlFile test.pkg.X TEST16.idl
The new rmic behaves differently than previous versions when no output directory (-d option) is specified. In the JDK, the stub and tie files are always written into the current working directory when no -d option is specifed, regardless of package. The new rmic writes the files into subdirectories of the current directory that correspond to their packages.

The -iiop Flag

Using rmic with the -iiop option generates stub and tie classes. A stub class is a local proxy for a remote object. Stub classes are used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. The client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

Stub classes are also generated for abstract interfaces. An abstract interface is an interface that does not extend java.rmi.Remote, but whose methods all throw either java.rmi.RemoteException or a superclass of java.rmi.RemoteException. Interfaces that do not extend java.rmi.Remote and have no methods are also abstract interfaces.

The -idl Flag

Using rmic with the -idl option generates OMG IDL for the classes specified and any classes referenced.
IDL provides a purely declarative, programming language independent means for specifying the API for an object.
The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the Java Language to IDL Mapping (OMG) document for a complete description.

Note: The generated IDL can only be compiled using an IDL compiler that supports the CORBA 2.3 extensions to IDL.

The -noValueMethods Flag

The -noValueMethods option, when used with -idl, ensures that methods and initializers are not included in valuetypes emitted during IDL Generation. These are optional for valuetypes and are otherwise omitted.

See the RMIC tool page (Solaris Version/Windows version) for a complete rmic description.

The New idlj Compiler

The RMI-IIOP software includes a new IDL-to-Java compiler. This compiler supports the new CORBA Objects By Value feature, which is required for interoperation with RMI-IIOP. It is written in Java, and so can run on any platform. See the IDL-to-Java Compiler User's Guide for details of how to use this compiler.

How to Make RMI Programs Use IIOP

The following steps are a general guide to converting an RMI application to RMI-IIOP.
  1. If you are using the RMI registry for naming services, you need to switch to JNDI with the CosNaming plugin. You need to do the following:
    1. In both your client and server code, you need to create an InitialContext for JNDI using the following code:
      2.          import javax.naming.*;
         ...
         Context initialNamingContext = new InitialContext();
    2. Modify all uses of RMI registry lookup() and bind() to use JNDI lookup() and bind()instead. For example, instead of your RMI server using:
      3.          import java.rmi.*;
         ...
         Naming.rebind("MyObject", myObj);
      use:
               import javax.naming.*;
         ...
         initialNamingContext.rebind("MyObject", myObj);
    3. If the client is an applet, the client applet needs to pass this to the JNDI CosNaming plugin. Replace the above code with the following:
      4.         import java.util.*;
        import javax.naming.*;
        ...
        Hashtable env = new Hashtable();
        env.put("java.naming.applet", this);
        Context ic = new InitialContext(env);
  2. If you are not using the RMI registry for naming services, you have some other way of bootstrapping your initial remote object reference. For example, your server code may be using Java serialization to write an RMI object reference to an ObjectOutputStream and passing this to your client code for deserializing into an RMI stub.

    3. On the server side, use the PortableRemoteObject.toStub() call to obtain a stub, then use writeObject() to serialize this stub to an ObjectOutputStream. The code to do this looks something like:

    org.omg.CORBA.ORB myORB = org.omg.CORBA.ORB.init(new String[0], null);
Wombat myWombat = new WombatImpl();
javax.rmi.CORBA.Stub myStub = (javax.rmi.CORBA.Stub)PortableRemoteObject.toStub(myWombat);
myStub.connect(myORB);
// myWombat is now connected to myORB.  To connect other objects to the
// same ORB, use PortableRemoteObject.connect(nextWombat, myWombat);
FileOutputStream myFile = new FileOutputStream("t.tmp");
ObjectOutputStream myStream = new ObjectOutputStream(myFile);
myStream.writeObject(myStub);
    On the client side, use readObject() to deserialize a remote reference to the object from an ObjectInputStream, with code like:
    FileInputStream myFile = new FileInputStream("t.tmp");
ObjectInputStream myStream = new ObjectInputStream(myFile);
Wombat myWombat = (Wombat)myStream.readObject();
org.omg.CORBA.ORB myORB = org.omg.CORBA.ORB.init(new String[0], null);
((javax.rmi.CORBA.Stub)myWombat).connect(myORB);
// myWombat is now connected to myORB.  To connect other objects to the
// same ORB, use PortableRemoteObject.connect(nextWombat, myWombat);
  3. Either change your remote implementation classes to inherit from javax.rmi.PortableRemoteObject, or explicitly export implementation objects after creation by calling PortableRemoteObject.exportObject().

  4. Change all the places in your code where there is a Java cast of a remote interface to use javax.rmi.PortableRemoteObject.narrow().

  5. Don't depend on distributed garbage collection or use any of the RMI DGC facilities. Use PortableRemoteObject.unexportObject() to unexport objects that are no longer in use. This has no effect for objects exported to JRMP on 1.1.6.

  6. Regenerate the RMI stubs and ties using the rmic command with the -iiop option. This will produce stub and tie files with the following names:
    7.      _<implementionName>_Tie.class
     _<interfaceName>_Stub.class
  7. Before starting the server, start the CosNaming server (in its own process) using the following command:
    8.      tnameserv
    This uses the default port number of 900. If you want to use a different port number (for example, port 1050), use the ORBInitialPort modifier:
         tnameserv -ORBInitialPort 1050
  8. When starting client and server applications, specify the following system properties:
    9.      java -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
          -Djava.naming.provider.url=iiop://<hostname>:900
           <appl_class>
    This example uses the default name service port number of 900. If you specified a different port in step 7, you need to use the same port number in the provider URL here. The <hostname> in the provider URL is the host name that was used to start the CosNaming server in step 7.

  9. If the client is an applet, specify the following properties in the applet tag:
    10.      java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
     java.naming.provider.url=iiop://<hostname>:900
    This example uses the default name service port number of 900. If you specified a different port in step 7, you need to use the same port number in the provider URL here. The <hostname> in the provider URL is the host name that was used to start the CosNaming server in step 7.

Restrictions When Running RMI Programs Over IIOP

To make existing RMI programs run over IIOP, you need to observe the following restrictions.
  1. Make sure all constant definitions in remote interfaces are of primitive types or String and evaluated at compile time.
  2. Don't use Java names that conflict with IDL mangled names generated by the Java to IDL mapping rules. See section 28.3.2 of the Java Language to IDL Mapping specification for the Java to IDL name mapping rules.
  3. Don't inherit the same method name into a remote interface more than once from different base remote interfaces.
  4. Be careful when using names that differ only in case. The use of a type name and a variable of that type whose name differs from the type name only in case is supported. Most other combinations of names that differ only in case are not supported.
  5. Don't depend on runtime sharing of object references to be preserved exactly when transmitting object references across IIOP. Runtime sharing of other objects is preserved correctly.
  6. Don't use the following features of RMI:
    • RMISocketFactory
    • UnicastRemoteObject
    • Unreferenced
    • The DGC interfaces

Converting the RMI Hello World Program to RMI-IIOP

In the following example you'll convert the RMI Hello World example to RMI-IIOP. You will also convert RMI Hello World applet client to an application.

Here's the RMI Hello World players:

  • HelloImpl.java is the RMI server.
  • Hello.java is the remote interface implemented by HelloImpl.
  • HelloApplet.java is the RMI client.
  • Hello.html loads HelloApplet.
The RMI Hello World example uses a development directory of $HOME/jdk1.1/mysrc/example/hello and a deployment directory of $HOME/public_html/codebase, where $HOME is your home directory. Though you don't have to, the following example assumes that you use these directories.

If you haven't already, go through the RMI Hello World example. Once you've completed this example, take the following steps.

Adapt the Implementation Class (Server) to RMI-IIOP:

  1. Import javax.rmi.server.PortableRemoteObject rather than javax.rmi.server.UnicastRemoteObject:
    2.      //Goodbye
     //import java.rmi.server.UnicastRemoteObject;

     //Hello
     import javax.rmi.PortableRemoteObject;
  2. Import the JNDI naming package:
    3.      import javax.naming.*;
  3. Make HelloImpl extend PortableRemoteObject rather than UnicastRemoteObject:
    4.      public class HelloImpl
                  extends PortableRemoteObject
                  ...
  4. Use the JNDI registry, rather than the RMI registry, by adding the following code:
    5.      Context initialNamingContext = new InitialContext();
    This step provides an initial JNDI naming context (and will also need to be done in the client).
  5. Use JNDI rebind(), rather than the RMI version:

    6. Old code:

         HelloImpl obj = new HelloImpl("HelloServer");
     Naming.rebind("HelloServer", obj);
    New code:
         HelloImpl obj = new HelloImpl("HelloServer"); //unchanged
     initialNamingContext.rebind("HelloServer",obj);
Here are the changes you need to make to HelloApplet.java:
  1. Import the PortableRemoteObject package:
    2.      import javax.rmi.PortableRemoteObject;
  2. Create a JNDI initial naming context, and pass this to the CosNaming plugin:
    3.      import java.util.*;
     import javax.naming.*;
     ...
     Hashtable env = new Hashtable();
     env.put("java.naming.corba.applet", this);
     //The next two values will be specifiable
     //By applet tag params in future releases
     env.put("java.naming.factory.initial",
             "com.sun.jndi.cosnaming.CNCtxFactory");
     env.put("java.naming.provider.url", "iiop://<hostname>:900");
     Context ic = new InitialContext(env);
  3. Use JNDI lookup(), rather than the RMI version, AND replace the Java remote interface cast with a call to javax.rmi.PortableRemoteObject.narrow():

    4. Old code:

         import java.rmi.*;
     ...
     Hello obj = (Hello)Naming.lookup("//" +
                     getCodeBase().getHost() + "/HelloServer");
    New code:
         import javax.naming.*;
     ...
     Hello obj =
      (Hello)PortableRemoteObject.narrow(
                         initialNamingContext.lookup("HelloServer"),
                         Hello.class);
Specify Naming Properties in the Applet Tag

Add the following properties to Hello.html applet tag:

<param name="java.naming.factory.initial" value="com.sun.jndi.cosnaming.CNCtxFactory">
<param name="java.naming.provider.url" value="iiop://<hostname>:900">

Compile the Java Source Files

javac -d $HOME/public_html/codebase Hello.java HelloImpl.java HelloApplet.java
Generate the Stub and Tie Classes

Make sure that your search path finds the rmic command in the $RMI_IIOP_HOME/bin directory.

rmic -iiop -d $HOME/public_html/codebase examples.hello.HelloImpl
This will generate the files Hello_Stub.class (the client-side proxy) and HelloImpl_Tie.class (the server-side proxy) in the $HOME/public_html/codebase/examples/hello directory.

Start the JNDI Name Server

tnameserv
This starts the JNDI name server with the default port of 900. If you want to use a different port number (Solaris users must use a port above 1024), use a command line such as:
tnameserv -ORBInitialPort 1050

Start the Hello Server

java -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
     -Djava.naming.provider.url=iiop://<hostname>:900
     examples.hello.HelloImpl

Start the Hello Client

Use appletviewer to load Hello.html.

appletviewer Hello.html
As a reminder, here's what Hello.html looks like:
<html>
<title>Hello World</title>
<center> <h1>Hello World</h1> </center>

The message from the HelloServer is:
<p>
<applet
        code="examples.hello.HelloApplet"
        width=500 height=120>

</applet>
</HTML>
If all goes according to plan, appletviewer will echo the HelloServer's message.

Converting the Client Applet to an Application

Here's how to change the applet client to an application client:

Adapt the Client Application to RMI-IIOP:

  1. Convert HelloApplet to an application:
    • Copy HelloApplet.java (the original RMI version) to HelloApp.java.
    • Change the class name (for example, to HelloApp).
    • Remove the extends Applet clause.
    • Change init() to main().
    • Move String message ="";.
    • Eliminate the paint() method.

  2. Use the JNDI registry, rather than the RMI registry:
    3.      import javax.naming.*;
     ...
     Context initialNamingContext = new InitialContext();
  3. Use JNDI lookup(), rather than the RMI version, AND replace the Java remote interface cast with a call to javax.rmi.PortableRemoteObject.narrow():

    4. Old code:

         import java.rmi.*;
     ...
     Hello obj = (Hello)Naming.lookup("//" +
                     getCodeBase().getHost() + "/HelloServer");
    New code:
         import javax.naming.*;
     ...
     Hello obj = (Hello)PortableRemoteObject.narrow(
                         initialNamingContext.lookup("HelloServer"),
                         Hello.class);
    The host and port will be designated when starting the server.
Compile the HelloApp Source
javac -d $HOME/public_html/codebase HelloApp.java
You don't need to regenerate your stub and tie.

Start the Name Server and Hello Server

Start these the same as in the applet example.

Start the Hello Application Client

Here's how:

java -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
     -Djava.naming.provider.url=iiop://<hostname>:900
      examples.hello.HelloApp
You'll see the server's message printed to the client console.

Other Things You Should Know

Servers Need to be Thread Safe

Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.

Hashtables with Identical Vector Keys

When a hashtable containing identical vector keys is passed from a JDK 1.1 RMI application to a Java 2 Platform-based RMI application (using either IIOP or JRMP), the identical keys are "coalesced" into one key because of Java 2 Platform deserialization rules. For example:
  1. A 1.1 RMI application creates a hashtable.
  2. The application puts a value into the hashtable using a vector key A.
  3. The application puts another value into the hashtable using a vector key B. Vector B is structurally identical to vector A, but is a different object.
  4. The hashtable now has two entries with keys A and B.
  5. The 1.1 RMI application sends the hashtable, by value, to a 1.2 RMI application.
  6. The hashtable on the 1.2 side has one entry with key B. This is because the deserialization code for the hashtable uses 1.2 rules to populate it, and these rules compare vector keys by value instead of by object identity.
  7. If the hashtable is ever sent back across RMI from 1.2 to 1.1, it will still have one entry with key B.

Interoperating with Other ORBs

RMI-IIOP will interoperate with other ORBS that support the CORBA 2.3 specification. It will not interoperate with older ORBs, because these are unable to handle the IIOP encodings for Objects By Value. This support is needed to send RMI value classes (including strings) over IIOP. At present, no other CORBA 2.3 ORBs are commercially available, but it is expected that these will appear soon.

Known Problems

  • JNDI 1.1 does not support java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory as an Applet parameter. Instead, it must be explicitly passed as a property to the InitialContext constructor. This capability is supported in JNDI 1.2.

  • Port 900 is reserved on Solaris. You must use a port number greater than 1024 when running on Solaris.

  • On Solaris, you may experience an "out of file descriptors" problem when running RMI-IIOP applications. This may occur if you are using too many file descriptors, which can happen because each JAR file in the classpath consumes one file descriptor and the JDK 1.1.6 setup adds numerous JAR files to the classpath. Before running applications, set the file descriptor limit to a number greater than its default value of 64. For example, set the ulimit number to 90 or higher, as follows:
    • ulimit -n 90
RMI-IIOP FCS Release - version 1.00 -
Send your comments to rmi-iiop@sun.com.


Java 2D(TM) Programmer's Guide, Imaging Sample Programs

These sample programs demonstrate new Java 2DTM Imaging features available in the Java TM 2 SDK, version 1.2 -- you will need to download the Java 2 SDKTM 1.2 or a more recent version of the SDK to run these programs.

Downloading the Sample Programs

Click the following link to download a zip file that contains all of the Imaging sample programs and necessary images.

  • Download Java 2D Imaging Programs and images [zip]

List of Sample Programs

Java Files | Description
BufferedShapeMover.java | Illustrates off-screen buffering.
Blur.java | Illustrates blurring using convolution.
Edge.java | Illustrates edge detection using convolution.
LookUp.java | Illustrates lookup-table manipulation.
Rescale.java | Illustrates rescaling.
Sharpen.java | Illustrates sharpening using convolution.

Compiling the Sample Programs

You can compile a sample by running javac on the sample's .java file. For example, to compile the Blur sample, type:

javac Blur.java

(This assumes javac is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

Running the Sample Programs

These sample programs are designed to run as standalone Java applications or applets. To run a sample as an application, execute the java command on the class name. For example, to run the Blur application, type:

java Blur

(This assumes java is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

You can also run the samples as applets by running appletviewer on the particular sample's html file. For example, if you would like to run the Blur applet, you would type the following line while you are in the same directory as the html file.

appletviewer Blur.html

(This assumes appletviewer is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)


Access Control Lists

Access Control Abstractions

Last Modified: 20 October 1997

java.security.acl

Introduction

An Access Control List (ACL) is a data structure that guards access to resources. The java.security.acl package provides the interface to such a data structure and the sun.security.acl package provides a default implementation of the interfaces specified in the java.security.acl package.

Note: This API is not used internally for JDK system security. It was introduced in JDK 1.1, and remains for backwards compatibility. It may undergo substantial revision and extension or even replacement in future releases. This document describes the current interfaces.

An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type AclEntry, contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied.

An access control list is independent of the authentication scheme used to verify the validity of the principal. It is also independent of the encryption scheme used to transmit the data across the network. The ACL is consulted after the authentication phase. After the principal is verified to be an authenticated user in the system, the principal might access resources. For each such resource, the principal might or might not be granted access depending on the permissions that are granted to the principal in the ACL that guards the resource. The ACL itself is independent of the resource that it guards. The ACL can be consulted to find the list of permissions a particular principal has or to find out whether or not a principal is granted a particular permission.

ACL structure

An ACL is an object that implements the java.security.acl.Acl interface. Each Acl is a list of AclEntry objects. Each AclEntry associates a Principal or a Group object to a list of Permission objects. (Note: Group is a subclass of Principal.) Each AclEntry can also be designated as a positive entry or a negative entry. A positive entry grants the list of permissions in the entry to the principal or group and a negative entry denies the list of permissions to the principal or group.

Calculation of granted permissions

When calculating the net permissions a principal is granted, the following rules are used.

  1. Each principal or group can have at most one positive ACL entry and one negative entry; that is, multiple positive or negative ACL entries are not allowed for any principal or group.
  2. If there is no entry for a particular principal or a group, then the principal or the group has the null permission set.
  3. The net group positive permission set for a principal is the union of all the positive permissions of each group that the principal belongs to.
  4. The net group negative permission set for a principal is the union of all the negative permissions of each group that the principal belongs to.
  5. If there is a positive entry that grants a principal or a group a particular permission and a negative entry that denies the principal or group the same permission, then that permission is removed from both the positive permissions set and the negative permissions set.
  6. Individual permissions (permissions granted or denied to a specific principal) always override the Group permissions. Specifically, individual negative permissions (specific denial of permissions) override the group's positive permissions. And individual positive permissions override the group's negative permissions.
  7. Assume that the positive permission set of all the groups that the principal belongs to is g1 and the negative permission set of all the groups that the principal belongs to is g2. Also assume that the individual positive permission set for the principal is p1 and the individual negative permission set for the principal is p2. Then the resulting permissions that the principal is granted are (p1 + (g1 - p2)) - (p2 + (g2 - p1)).

Example permission calculations

Assume that a principal P belongs to groups G1 and G2. The table below shows 5 columns using some examples of permissions given to G1, G2 and P. The resulting permissions granted to P are shown in the last column.

 | Group G1 Permissions | Group G2 Permissions | Union (G1, G2) perms | Individual Permissions | Resulting Permissions
Positive | A | B | A+B | C | A+B+C
Negative | null set | null set | null set | null set
Positive | A | B | B | C | B+C
Negative | -C | -A | -C | null set
Positive | A | B | A+B | C | B+C
Negative | null set | null set | null set | -A
Positive | A | C | A | B | B
Negative | -C | -B | -B | -A

Example usage

/* Note: This sample program is meant just as an example
 * of the types of things that can be done with an
 * implementation of the java.security.acl interfaces.
 * This example uses the implementation supplied by the
 * sun.security.acl package. Please note that sun.* classes
 * are unsupported and subject to change.
*/

import java.security.Principal;
import java.security.acl.*;
import sun.security.acl.*;
import java.util.Enumeration;

public class AclEx {

  public static void main(String argv[])
    throws Exception
  {

    Principal p1 = new PrincipalImpl("user1");
    Principal p2 = new PrincipalImpl("user2");
    Principal owner = new PrincipalImpl("owner");

    Permission read = new PermissionImpl("READ");
    Permission write = new PermissionImpl("WRITE");

    System.out.println("Creating a new group with two members: user1 and
user2");
    Group g = new GroupImpl("group1");
    g.addMember(p1);
    g.addMember(p2);

    //
    // create a new acl with the name "exampleAcl"
    //
    System.out.println("Creating a new Acl named 'exampleAcl'");
    Acl acl = new AclImpl(owner, "exampleAcl");

    //
    // Allow group all permissions
    //
    System.out.println("Creating a new Acl Entry in exampleAcl for the
group, ");
    System.out.println("  with read & write permissions");
    AclEntry entry1 = new AclEntryImpl(g);
    entry1.addPermission(read);
    entry1.addPermission(write);
    acl.addEntry(owner, entry1);

    //
    // Take away WRITE permissions for
    // user1. All others in groups still have
    // WRITE privileges.
    //
    System.out.println("Creating a new Acl Entry in exampleAcl for user1");
    System.out.println("  without write permission");
    AclEntry entry2 = new AclEntryImpl(p1);
    entry2.addPermission(write);
    entry2.setNegativePermissions();
    acl.addEntry(owner, entry2);

    //
    // This enumeration is an enumeration of
    // Permission interfaces. It should return
    // only "READ" permission.
    Enumeration e1 = acl.getPermissions(p1);
    System.out.println("Permissions for user1 are:");
    while (e1.hasMoreElements()) {
    System.out.println("  " + e1.nextElement());
    };

    //
    // This enumeration should have "READ" and"WRITE"
    // permissions.
    Enumeration e2 = acl.getPermissions(p2);
    System.out.println("Permissions for user2 are:");
    while (e2.hasMoreElements()) {
    System.out.println("  " + e2.nextElement());
    };

    // This should return false.
    boolean b1 = acl.checkPermission(p1, write);
    System.out.println("user1 has write permission: " + b1);

    // This should all return true;
    boolean b2 = acl.checkPermission(p1, read);
    boolean b3 = acl.checkPermission(p2, read);
    boolean b4 = acl.checkPermission(p2, write);
    System.out.println("user1 has read permission: " + b2);
    System.out.println("user2 has read permission: " + b3);
    System.out.println("user2 has write permission: " + b4);
  }
}

Copyright © 1996, 1997 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043-1100 USA. All rights reserved.

Please send comments to: java-security@sun.com


Privileged Block API

API for Privileged Blocks

Last Modified: 22 September, 1998

Overview

This document provides background information about what "privileged" code is and what it is used for, followed by illustrations of the use of the API, with special attention to issues of:
  • returning values
  • type safety
  • exception handling
  • reflection

Background: What It Means to Have "Privileged" Code

The policy for an SDK installation specifies what permissions -- which types of system resource accesses -- are allowed for code from specified code sources. A "code source" (of type CodeSource) essentially consists of the code location (URL) and a reference to the certificate(s) containing the public key(s) corresponding to the private key(s) used to sign the code (if it was signed).

The policy is represented by a Policy object. More specifically, it is represented by a Policy subclass providing an implementation of the abstract methods in the Policy class (which is in the java.security package).

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The default Policy implementation obtains its information from policy configuration files. See Default Policy Implementation and Policy File Syntax for information about the default Policy implementation and the syntax that must be used in policy files it reads. For information about using the Policy Tool to create a policy file (without needing to know the required syntax), see the Policy Tool documentation (for Solaris) (for Windows).

A "protection domain" encompasses a CodeSource and the permissions granted to code from that CodeSource, as determined by the security policy currently in effect. Thus, classes signed by the same keys and from the same URL are placed in the same domain, and a class belongs to one and only one protection domain. Classes that have the same permissions but are from different code sources belong to different domains.

Today all code shipped as part of the SDK is considered system code and run inside the unique system domain. System code automatically has all permissions.

Each applet or application runs in its appropriate domain, determined by its code source. In order for an applet (or an application running under a security manager) to be allowed to perform a secured action (such as reading or writing a file), the applet or application must be granted permission for that particular action.

More specifically, whenever a resource access is attempted, all code traversed by the execution thread up to that point must have permission for that resource access, unless some code on the thread has been marked as "privileged". That is, suppose access control checking occurs in a thread of execution that has a chain of multiple callers. (Think of this as multiple method calls that potentially cross the protection domain boundaries.) When the AccessController checkPermission method is invoked by the most recent caller, the basic algorithm for deciding whether to allow or deny the requested access is as follows:

If the code for any caller in the call chain does not have the requested permission, AccessControlException is thrown, unless the following is true - a caller whose code is granted the said permission has been marked as "privileged" (see below) and all parties subsequently called by this caller (directly or indirectly) all have the said permission.

Marking code as "privileged" enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it. This is necessary in some situations. For example, an application may not be allowed direct access to files that contain fonts, but the system utility to display a document must obtain those fonts, on behalf of the user. In order to do this, the system utility becomes privileged while obtaining the fonts.

Using the doPrivileged API

The use of the "privileged" feature is described in the following sections.

No return value, no exception thrown

If you don't need to return a value from within the "privileged" block, your call to doPrivileged can look like the following:

   somemethod() {
        ...normal code here...
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                // privileged code goes here, for example:
                System.loadLibrary("awt");
                return null; // nothing to return
            }
        });
       ...normal code here...
  }

The AccessController.doPrivileged method takes an object of type java.security.PrivilegedAction and invokes its run method in privileged mode. The implementation guarantees that privileges will be revoked after the run method is executed, even if execution of doPrivileged is interrupted by an asynchronous exception.

PrivilegedAction is an interface with a single method, named run, that returns an Object. The above example shows creation of an implementation of that interface using an anonymous inner class; a concrete implementation of the run method is supplied. When the call to doPrivileged is made, an instance of the PrivilegedAction implementation is passed to it. The doPrivileged method calls the run method from the PrivilegedAction implementation after enabling privileges, and returns the run method's return value as the doPrivileged return value (which is ignored in this example).

Note that depending on what "privileged code" actually consisted of, you might have to make some changes due to the way inner classes work. For example, if "privileged code" throws an exception or attempts to access local variables then you will have to make some changes, as shown in subsequent sections of this document.

You can also call doPrivileged without using an anonymous inner class, as in:

    somemethod() {
        ...normal code here...
        MyAction mya = new MyAction();
        // become privileged:
        AccessController.doPrivileged(mya);
       ...normal code here...
    }

    class MyAction implements PrivilegedAction {
        public MyAction() {};
        public Object run() {
            // privileged code goes here, for example:
            System.loadLibrary("awt");
            return null; // nothing to return
        }
    }

Be very careful in your use of the "privileged" construct, and always remember to make the privileged code section as small as possible, that is, try and limit the code within the run method to only the code that needs to be run with privileges, and do more general things outside the run method. Also note that the call to doPrivileged should be made in the code that wants to enable its privileges. Do not be tempted to write a utility class that itself calls doPrivileged as that could lead to security holes. You can write utility classes for PrivilegedAction classes though, as shown in the example above.

Returning values

If you need to return a value, you can do something like the following:

   somemethod() {
        ...normal code here...
        String user = (String) AccessController.doPrivileged(
          new PrivilegedAction() {
            public Object run() {
                return System.getProperty("user.name");
            }
          }
        );
        ...normal code here...
  }

Note that this usage requires a dynamic cast on the value returned by doPrivileged. An alternative is to use a final local variable:

   somemethod() {
        ...normal code here...
        final String user[] = {null};
        AccessController.doPrivileged(
          new PrivilegedAction() {
            public Object run() {
                user[0] = System.getProperty("user.name");
                return null; // still need this
            }
          }
        );
        ...normal code here...
  }
Yet another alternative would be to write a non-anonymous class that safely handles types for you:
   somemethod() {
        ...normal code here...
        GetPropertyAction gpa = new GetPropertyAction("user.name");
        AccessController.doPrivileged(gpa);
        String user = gpa.getValue();
        ...normal code here...
   }

   class GetPropertyAction implements PrivilegedAction {
      private String property;
      private String value;
      public GetPropertyAction(String prop) { property = prop;}
      public Object run() {
               value = System.getProperty(property);
               return value;
      }
      public String getValue() {return value;}

   }

Note there are now no type-casts involved, although the run method still returns a value, so you could still have a "one-liner" if you wanted to:

   somemethod() {
        ...normal code here...
        String user = (String) AccessController.doPrivileged(
                                   new GetPropertyAction("user.name"));
        ...normal code here...
   }

Accessing local variables

If you are using an anonymous inner class, any local variables you access must be final. For example:

   somemethod() {
        ...normal code here...
        final String lib = "awt";
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                // privileged code goes here, for example:
                System.loadLibrary(lib);
                return null; // nothing to return
            }
        });
       ...normal code here...
  }

The variable lib must be declared final if you intend to use it within the privileged block. See the "Inner Classes" spec for more information on this topic.

If there are cases where you can't make an existing variable final (because it gets set multiple times), then you can create a new final variable right before invoking doPrivileged, and set that variable equal to the other variable. For example:

   somemethod() {
        ...normal code here...
        String lib;
        ...
        // lib gets set multiple times so we can't make it final
        ...
        // create a final String that we can use inside of the run method
        final String fLib = lib;
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                // privileged code goes here, for example:
                System.loadLibrary(fLib);
                return null; // nothing to return
            }
        });
       ...normal code here...
  }

Handling Exceptions

If the action performed in your run method could throw a "checked" exception (one that must be listed in the throws clause of a method), then you need to use the PrivilegedExceptionAction interface instead of the PrivilegedAction interface:

   somemethod() throws FileNotFoundException {
        ...normal code here...
      try {
        FileInputStream fis = (FileInputStream) AccessController.doPrivileged(
          new PrivilegedExceptionAction() {
            public Object run() throws FileNotFoundException {
                return new FileInputStream("someFile");
            }
          }
        );
      } catch (PrivilegedActionException e) {
        // e.getException() should be an instance of FileNotFoundException,
        // as only "checked" exceptions will be "wrapped" in a
        // PrivilegedActionException.
        throw (FileNotFoundException) e.getException();
      }
        ...normal code here...
  }

If a checked exception is thrown during execution of the run method, it is placed in a PrivilegedActionException "wrapper" exception that is then thrown and should be caught by your code, as illustrated in the above example..

Reflection

One subtlety that must be considered is the interaction of this API with reflection. The doPrivileged() method can be invoked reflectively using java.lang.reflect.Method.invoke(). In this case, the privileges granted in privileged mode are not those of Method.invoke() but of the non-reflective code that invoked it. Otherwise, system privileges could erroneously (or maliciously) be conferred on user code. Note that similar requirements exist when using the existing API via reflection.

Copyright © 1997-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com 		Sun
Java Software


Summary of Upcoming Security Tools

Summary of Tools for the JavaTM 2 Platform Security

Last Modified: 19 October, 1998

Below is a brief summary of the Security Tools, with links to the more detailed documentation.

The keytool, jar, jarsigner, and Policy Tool tools are available to facilitate various security-related operations. All are command-line tools, except for Policy Tool, which has a graphical user interface. (Note: the jar tool was also available in JDK 1.1.)

The keytool and jarsigner tools replace javakey, which was an interim tool introduced in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signed JAR files in addition to generating them. The new keystore architecture replaces the identity database that javakey created and managed. It is possible to import the information from an identity database into a keystore, via a keytool command.

The Tools

keytool (for Solaris) (for Windows)

Use keytool to manage your keystore, for example to

  • create public/private key pairs
  • issue certificate requests (which you send to the appropriate Certification Authority)
  • import certificate replies (obtained from the Certification Authority you contacted)
  • designate public keys belonging to other parties as trusted

Keys and certificates are used to digitally sign your applications and applets (see jarsigner below). A keystore is a protected database that holds keys and certificates for an enterprise. Access to a keystore is guarded by a password (defined at the time the keystore is created, by the person who creates the keystore, and changeable only when providing the current password). In addition, each private key in a keystore can be guarded by its own password.

jar (for Solaris) (for Windows)

Use the jar tool to create JAR files.

The Java ARchive (JAR) file format enables you to bundle multiple files into a single archive file. Typically a JAR file will contain the class files and auxiliary resources associated with applets and applications. When you want to "digitally sign" code, you use the jar tool to place it in a JAR file and the jarsigner tool to sign the JAR file (after generating or importing appropriate keys into your keystore using keytool).

jarsigner (for Solaris) (for Windows)

Use the jarsigner tool to sign JAR files, or to verify signatures on signed JAR files.

The jarsigner tool accesses a keystore that is created and managed by keytool, when it needs to find the private key and its associated certificate chain to use when signing a JAR file. Since accesses to the keystore and to private keys are protected by passwords, only people who know the passwords will be able to access the key and use it to sign a JAR file. The jarsigner tool prompts for needed passwords.

Policy Tool (for Solaris) (for Windows)

Use the Policy Tool (invoked by using the policytool command) to create and modify the external policy configuration files that define your installation's security policy.

The policy is described in the Security Architecture Specification. Further information is provided in Default Policy Implementation and Policy File Syntax.

This tool has a graphical user interface, so you select buttons and other options rather than type in commands as for the other tools.

Examples of Use of the Tools

Examples of the use of the security tools can be found in the JavaTM 2 Platform Security trail of the Java Tutorial.

Copyright © 1997-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


Default Policy Implementation and Policy File Syntax

Last Modified: 30 October, 1998

The policy for a Java application environment (specifying which permissions are available for code from various sources) is represented by a Policy object. More specifically, it is represented by a Policy subclass providing an implementation of the abstract methods in the Policy class (which is in the java.security package).

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The default Policy implementation obtains its information from static policy configuration files. The rest of this document pertains to the default Policy implementation and the syntax that must be used in policy files it reads. For information about using the Policy Tool to create a policy file (without needing to know the required syntax), see the Policy Tool documentation (for Solaris) (for Windows).

Here is an outline for the rest of this document:

Default Policy Implementation
Default Policy File Locations
Changing the Policy Implementation
Policy File Syntax
Policy File Examples
Property Expansion in Policy Files
Related Documentation

Default Policy Implementation

In the default Policy implementation, the policy can be specified within one or more policy configuration files. The configuration file(s) specify what permissions are allowed for code from specified code sources.

A policy file can be composed via a simple text editor, or via the graphical Policy Tool utility.

There is by default a single system-wide policy file, and a single (optional) user policy file.

The default Policy object is initialized the first time its getPermissions method is called, or whenever its refresh method is called. Initialization involves parsing the policy configuration file(s) (see Policy File Syntax), and then populating the Policy object.

Default Policy File Locations

As mentioned previously, there is by default a single system-wide policy file, and a single user policy file.

The system policy file is by default located at

java.home/lib/security/java.policy  (Solaris)
java.home\lib\security\java.policy  (Windows)

Note: java.home refers to the value of the system property named "java.home", which specifies the directory that houses the runtime environment -- either the jre directory in the Java 2 SDK or the top-level directory of the Java 2 Runtime Environment.

The system policy file is meant to grant system-wide code permissions. The java.policy file installed with the SDK grants all permissions to standard extensions, allows anyone to listen on un-privileged ports, and allows any code to read certain "standard" properties that are not security-sensitive, such as the "os.name" and "file.separator" properties.

The user policy file is by default located at

user.home/.java.policy  (Solaris)
user.home\.java.policy  (Windows)

Note: user.home refers to the value of the system property named "user.home", which specifies the user's home directory. On Windows systems, given user name uName, the "user.home" property value defaults to

C:\Winnt\Profiles\uName on multi-user Windows NT systems
C:\Windows\Profiles\uName on multi-user Windows 95 systems
C:\Windows on single-user Windows 95 systems

When the Policy is initialized, the system policy is loaded in first, and then the user policy is added to it. If neither policy is present, a built-in policy is used. This built-in policy is the same as the original sandbox policy.

Policy file locations are specified in the security properties file, which is located at

java.home/lib/security/java.security  (Solaris)
java.home\lib\security\java.security  (Windows)
As noted above, java.home indicates the directory that houses the runtime environment -- either the jre directory in the Java 2 SDK or the top-level directory of the Java 2 Runtime Environment. The policy file locations are specified as the values of properties whose names are of the form
policy.url.n
where n is a number. You specify each such property value in a line of the following form:
policy.url.n=URL
Here, URL is a URL specification.

For example, the default system and user policy files are defined in the security properties file as

policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

(See Property Expansion for information about specifying property values via a special syntax, such as specifying the java.home property value via ${java.home}.)

You can actually specify a number of URLs (including ones of the form "http://"), and all the designated policy files will get loaded. You can also comment out or change the second one to disable reading the default user policy file.

The algorithm starts at policy.url.1, and keeps incrementing until it does not find a URL. Thus if you have policy.url.1 and policy.url.3, policy.url.3 will never be read.

Specifying an Additional Policy File at Runtime

It is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command line argument, which sets the value of the java.security.policy property. For example, if you use

    java -Djava.security.manager -Djava.security.policy=someURL SomeApp
where someURL is a URL specifying the location of a policy file, then the specified policy file will be loaded in addition to all the policy files that are specified in the security properties file.

Notes:

  • The URL can be any regular URL or simply the name of a policy file in the current directory, as in
        java -Djava.security.manager -Djava.security.policy=mypolicy WriteFile

  • The "-Djava.security.manager" argument ensures that the default security manager is installed, and thus the application is subject to policy checks. It is not required if the application SomeApp installs a security manager.

If you use

    java -Djava.security.manager -Djava.security.policy==someURL SomeApp
(note the double equals) then just the specified policy file will be used; all the ones indicated in the security properties file will be ignored.

If you want to pass a policy file to the appletviewer, then use a "-J-Djava.security.policy" argument as follows:

    appletviewer -J-Djava.security.policy=someURL myApplet
Please note: The "-Djava.security.policy" policy file value will be ignored (for both java and appletviewer commands) if the "policy.allowSystemProperty" property in the security properties file is set to false. The default is true.

Changing the Policy Implementation

An alternative policy class can be given to replace the default Policy implementation class, as long as the former is a subclass of the abstract Policy class and implements the getPermissions method (and other methods as necessary).

The default Policy implementation can be changed by editing the security properties file, which is the java.security file in the lib/security directory of the SDK.

One of the types of properties you can set in java.security is of the following form:

    policy.provider=PolicyClassName

PolicyClassName must specify the fully qualified name of the desired Policy implementation class. The default security properties file entry for this property is the following:

    policy.provider=sun.security.provider.PolicyFile

To customize, you can change the property value to specify another class, as in

   policy.provider=com.mycom.MyPolicy

Policy File Syntax

The policy configuration file(s) for a SDK installation specify what permissions (which types of system resource accesses) are allowed by code from specified code sources.

In order for an applet (or an application running under a security manager) to be allowed to perform secured actions (such as reading or writing a file), the applet (or application) must be granted permission for that particular action. In the default Policy implementation, that permission must be granted by a grant entry in a policy configuration file. See below and the "Java Security Architecture Specification" for more information. (The only exception is that code always automatically has permission to read files from its same (URL) location, and subdirectories of that location; it does not need explicit permission to do so.)

A policy configuration file essentially contains a list of entries. It may contain a "keystore" entry, and contains zero or more "grant" entries.

Keystore Entry

A keystore is a database of private keys and their associated digital certificates such as X.509 certificate chains authenticating the corresponding public keys. The keytool utility (for Solaris) (for Windows) is used to create and administer keystores. The keystore specified in a policy configuration file is used to look up the public keys of the signers specified in the grant entries of the file. A keystore entry must appear in a policy configuration file if any grant entries specify signer aliases (see below).

At this time, there can be only one keystore entry in the policy file (others after the first one are ignored), and it can appear anywhere outside the file's grant entries. It has the following syntax:

    keystore "some_keystore_url", "keystore_type";
where "some_keystore_url" specifies the URL location of the keystore, and "keystore_type" specifies the keystore type.

The URL is relative to the policy file location. Thus if the policy file is specified in the security properties file as:

    policy.url.1=http://foo.bar.com/fum/some.policy
and that policy file has an entry:
    keystore ".keystore";
then the keystore will be loaded from:
    http://foo.bar.com/fum/.keystore
The URL can also be absolute.

A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. The default type supported by Sun Microsystems is a proprietary keystore type named "JKS". Thus, if the keystore type is "JKS", it does not need to be specified in the keystore entry.

Grant Entries

Code being executed is always considered to come from a particular "code source" (represented by an object of type CodeSource). The code source includes not only the location (URL) where the code originated from, but also a reference to the certificate(s) containing the public key(s) corresponding to the private key(s) used to sign the code. Certificates in a code source are referenced by symbolic alias names from the user's keystore.

Each grant entry includes one or more "permission entries" preceded by optional codeBase and signedBy name/value pairs that specify which code you want to grant the permissions. The basic format of a grant entry is the following:

  grant signedBy "signer_names", codeBase "URL" {
    permission permission_class_name "target_name", "action",
        signedBy "signer_names";
    ....
    permission permission_class_name "target_name", "action",
        signedBy "signer_names";
  };
All non-italicized items above must appear as is (although case doesn't matter and some are optional, as noted below). Italicized items represent variable values.

A grant entry must begin with the word grant.

The SignedBy and CodeBase Fields

The signedBy and codeBase name/value pairs are optional, and the order between these fields does not matter.

A signedBy value indicates the alias for a certificate stored in the keystore. The public key within that certificate is used to verify the digital signature on the code; you grant the permission(s) to code signed by the private key corresponding to the public key in the keystore entry specified by the alias.

The signedBy value can be a comma-separated list of multiple aliases. An example is "Adam,Eve,Charles", which means "signed by Adam and Eve and Charles"; the relationship is AND, not OR. To be more exact, a statement like "Code signed by Adam" means "Code in a class file contained in a JAR file, where the JAR file was signed using the private key corresponding to the public key that appears in a keystore certificate in an entry aliased by Adam."

The signedBy field is optional in that, if it is omitted, it signifies "any signer". It doesn't matter whether the code is signed or not or by whom.

A codeBase value indicates the code source location; you grant the permission(s) to code from that location. An empty codeBase entry signifies "any code"; it doesn't matter where the code originates from.

Note: a codeBase value is a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the code source is actually on a Windows system. Thus, if the source location for code on a Windows system is actually C:\somepath\api\, then the policy codeBase entry should look like:

    grant codeBase "file:/C:/somepath/api/" {
      ...
    }
The exact meaning of a codeBase value depends on the characters at the end. A codeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A codeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A codeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory. The following table illustrates the different cases.

Codebase URL of Downloaded Code Codebase URL in Policy Match?
java.sun.com/people/gong/ java.sun.com/people/gong
Y
java.sun.com/people/gong/ java.sun.com/people/gong/
Y
java.sun.com/people/gong/ java.sun.com/people/gong/*
Y
java.sun.com/people/gong/ java.sun.com/people/gong/-
Y
java.sun.com/people/gong/appl.jar java.sun.com/people/gong/
N
java.sun.com/people/gong/appl.jar java.sun.com/people/gong/-
Y
java.sun.com/people/gong/appl.jar java.sun.com/people/gong/*
Y
java.sun.com/people/gong/appl.jar java.sun.com/people/-
Y
java.sun.com/people/gong/appl.jar java.sun.com/people/*
N
java.sun.com/people/gong/ java.sun.com/people/-
Y
java.sun.com/people/gong/ java.sun.com/people/*
N

The Permission Entries

A permission entry must begin with the word permission. The word permission_class_name in the template above would actually be a specific permission type, such as java.io.FilePermission or java.lang.RuntimePermission.

The "action" is required for many permission types, such as java.io.FilePermission (where it specifies what type of file access is permitted). It is not required for categories such as java.lang.RuntimePermission where it is not necessary - you either have the permission specified by the "target_name" value following the permission_class_name or you don't.

The signedBy name/value pair for a permission entry is optional. If present, it indicates a signed permission. That is, the permission class itself must be signed by the given alias(es) in order for the permission to be granted. For example, suppose you have the following grant entry:

  grant {
    permission Foo "foobar", signedBy "FooSoft";
  }

Then this permission of type Foo is granted if the Foo.class permission was placed in a JAR file and the JAR file was signed by the private key corresponding to the public key in the certificate specified by the "FooSoft" alias, or if Foo.class is a system class, since system classes are not subject to policy restrictions.

Items that appear in a permission entry must appear in the specified order (permission, permission_class_name, "target_name", "action", and signedBy "signer_names"). An entry is terminated with a semicolon.

Case is unimportant for the identifiers (permission, signedBy, codeBase, etc.) but is significant for the permission_class_name or for any string that is passed in as a value.

Note Regarding File Path Specifications on Windows Systems

Please note: When you are specifying a java.io.FilePermission, the "target_name" is a file path. On Windows systems, whenever you directly specify a file path in a string (but not in a codeBase URL), you need to include two backslashes for each actual single backslash in the path, as in

  grant {
      permission java.io.FilePermission "C:\\users\\cathy\\foo.bat", "read";
  };
The reason this is necessary is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (for example, "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above file path string, converting double backslashes to single backslashes, the end result is
    "C:\users\cathy\foo.bat"

Policy File Examples

An example of two entries in a policy configuration file is

  // If the code is signed by "Duke", grant it read/write access to all
  // files in /tmp:

  grant signedBy "Duke" {
    permission java.io.FilePermission "/tmp/*", "read,write";
  };

  // Grant everyone the following permission:

  grant {
    permission java.util.PropertyPermission "java.vendor";
  };

The contents of another sample policy configuration file appear below.

  grant signedBy "sysadmin", codeBase "file:/home/sysadmin/*" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
    permission java.security.SecurityPermission "Security.setProperty.*";
  };
This specifies that only code that satisfies the following conditions can call methods in the Security class to add or remove providers or to set Security properties:
  • The code was loaded from a signed JAR file that is in the "/home/sysadmin/" directory on the local file system.
  • The signature can be verified using the public key referenced by the alias name "sysadmin" in the keystore.

Either component of the code source (or both) may be missing. An example where codeBase is missing is:

  grant signedBy "sysadmin" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
  };
If this policy is in effect, code that comes in a JAR File signed by "sysadmin" can add/remove providers, regardless of where the JAR File originated from.

An example without a signer is:

  grant codeBase "file:/home/sysadmin/-" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
  };
In this case, code that comes from anywhere beneath the "/home/sysadmin/" directory on the local filesystem can add/remove providers. The code does not need to be signed.

An example where neither codeBase nor signedBy is included is:

  grant {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
  };
Here, with both code source components missing, any code (regardless of where it originated from, or whether or not it is signed, or who signed it) can add/remove providers.

Property Expansion in Policy Files

Property expansion is possible in policy files and in the security properties file.

Property expansion is similar to expanding variables in a shell. That is, when a string like

    ${some.property}
appears in a policy file, or in the security properties file, it will be expanded to the value of the system property. For example,
    permission java.io.FilePermission "${user.home}", "read";
will expand "${user.home}" to use the value of the "user.home" system property. If that property's value is "/home/cathy", then the above is equivalent to
    permission java.io.FilePermission "/home/cathy", "read";
In order to assist in platform-independent policy files, you can also use the special notation of "${/}", which is a shortcut for "${file.separator}". This allows things like
    permission java.io.FilePermission "${user.home}${/}*", "read";
If the value of the "user.home" property is /home/cathy, and you are on Solaris, the above gets converted to:
    permission java.io.FilePermission "/home/cathy/*", "read";
If on the other hand the "user.home" value is C:\users\cathy and you are on a Windows system, the above gets converted to:
    permission java.io.FilePermission "C:\users\cathy\*", "read";
Also, as a special case, if you expand a property in a codebase, such as
    grant codeBase "file:${java.home}/lib/ext/"
then any file.separator characters will be automatically converted to /'s. Thus on a Windows system, the above would get converted to
    grant codeBase "file:C:/jdk1.3/jre/lib/ext/"
even if "java.home" is set to C:\jdk1.3\jre. Thus you don't need to use ${/} in codebase strings (and you shouldn't).

Property expansion takes place anywhere a double quoted string is allowed in the policy file. This includes the "signer_names", "URL", "target_name", and "action" fields.

Whether or not property expansion is allowed is controlled by the value of the "policy.expandProperties" property in the security properties file. If the value of this property is true (the default), expansion is allowed.

Please note: You can't use nested properties; they will not work. For example,

    "${user.${foo}}"
doesn't work, even if the "foo" property is set to "home". The reason is the property parser doesn't recognize nested properties; it simply looks for the first "${", and then keeps looking until it finds the first "}" and tries to interpret the result (in this case, "${user.$foo}") as a property, but fails if there is no such property.

Also note: If a property can't be expanded in a grant entry, permission entry, or keystore entry, that entry is ignored. For example, if the system property "foo" is not defined and you have:

    grant codeBase "${foo}" {
      permission ...;
      permission ...;
    };
then all the permissions in this grant entry are ignored. If you have
    grant {
      permission Foo "${foo}";
      permission Bar;
    };
then only the "permission Foo..." entry is ignored. And finally, if you have
    keystore "${foo}";
then the keystore entry is ignored.

Windows Systems, File Paths, and Property Expansion

As noted above, on Windows systems, when you directly specify a file path in a string (but not in a codeBase URL), you need to include two backslashes for each actual single backslash in the path, as in
    grant {
        permission java.io.FilePermission "C:\\users\\cathy\\foo.bat", "read";
    };
This is because the strings are processed by a tokenizer (java.io.StreamTokenizer), which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash. After the tokenizer has processed the above file path string, converting double backslashes to single backslashes, the end result is
    "C:\users\cathy\foo.bat"
Expansion of a property in a string takes place after the tokenizer has processed the string. Thus if you have the string
    "${user.home}\\foo.bat"
then first the tokenizer processes the string, converting the double backslashes to a single backslash, and the result is
    "${user.home}\foo.bat"
Then the ${user.home} property is expanded and the end result is
    "C:\users\cathy\foo.bat"
assuming the "user.home<" value="value" is="is" C:\users\cathy. Of course, for platform independence, it would be better if the string was initially specified without any explicit slashes, i.e., using the ${/} property instead, as in
    "${user.home}${/}foo.bat"

Related Documentation

  • Permissions in Java 2 SDK

  • Policy Tool (for Solaris) (for Windows)

Copyright © 1997-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


How to Implement a Provider for the Java Cryptography Architecture

How to Implement a Provider for the JavaTM Cryptography Architecture

Last Modified: 8 July 1999

Introduction
Who Should Read This Document
Related Documentation

Engine Classes and Corresponding SPI Classes

Steps to Implement and Integrate a Provider
Step 1: Write your Service Implementation Code
Step 2: Give your Provider a Name
Step 3: Write your "Master Class," a subclass of Provider
Step 4: Compile your Code
Step 5: Prepare for Testing: Install the Provider
Step 6: Write and Compile Test Programs
Step 7: Run your Test Programs
Step 8: Document your Provider and its Supported Services
Step 9: Make your Class Files and Documentation Available to Clients

Further Implementation Details and Requirements
Alias Names
Service Interdependencies
Default Initializations
Default Key Pair Generator Parameter Requirements
Signature Formats
DSA Interfaces and their Required Implementations
RSA Interfaces and their Required Implementations
Interfaces for Other Algorithm Types
Algorithm Parameter Specification Interfaces and Classes
Key Specification Interfaces and Classes Required by Key Factories
Adding New Object Identifiers

Appendix A: The "SUN" Provider's Master Class

Appendix B: The java.security Master Properties File

Introduction

JDK 1.1 introduced the notion of a Cryptographic Service Provider, or "provider" for short. This term refers to a package (or a set of packages) that supply a concrete implementation of a subset of the cryptography aspects of the JDK Security API.

In JDK 1.1 a provider could, for example, contain an implementation of one or more digital signature algorithms, message digest algorithms, and key generation algorithms. Java 2 SDK adds five additional types of services: key factories, keystore creation and management, algorithm parameter management, algorithm parameter generation, and certificate factories. It also enables a provider to supply a random number generation (RNG) algorithm. Previously, RNGs were not provider-based; a particular algorithm was hard-coded in the JDK.

A program wishing to use cryptography functionality may simply request a particular type of object (such as a Signature object) implementing a particular service (such as the DSA signature algorithm) and get an implementation from one of the installed providers. If an implementation from a particular provider is desired, the program can request that provider by name, along with the service desired.

Each SDK installation has one or more provider packages installed. Clients may configure their runtimes with different providers, and specify a preference order for each of them. The preference order is the order in which providers are searched for requested algorithms when no particular provider is requested.

Sun's version of the Java runtime environment comes standard with a default provider, named "SUN". Other Java runtime environments may not necessarily supply the "SUN" provider. The "SUN" provider package includes:

  • An implementation of the Digital Signature Algorithm (DSA), described in NIST FIPS 186.

  • An implementation of the MD5 (RFC 1321) and SHA-1 (NIST FIPS 180-1) message digest algorithms.

  • A DSA key pair generator for generating a pair of public and private keys suitable for the DSA algorithm.

  • A DSA algorithm parameter generator.

  • A DSA algorithm parameter manager.

  • A DSA "key factory" providing bi-directional conversions between (opaque) DSA private and public key objects and their underlying key material.

  • An implementation of the proprietary "SHA1PRNG" pseudo-random number generation algorithm, following the recommendations in the IEEE P1363 standard (Appendix G.7).

  • A "certificate factory" for X.509 certificates and Certificate Revocation Lists (CRLs).

  • A keystore implementation for the proprietary keystore type named "JKS".

New providers may be added statically or dynamically. Clients may also query which providers are currently installed.

The different implementations may have different characteristics. Some may be software-based, while others may be hardware-based. Some may be platform-independent, while others may be platform-specific. Some provider source code may be available for review and evaluation, while some may not.

Who Should Read This Document

This document is intended for experienced programmers wishing to create their own provider packages supplying cryptographic service implementations. It documents what you need to do in order to integrate your provider into Java 2 SDK Security so that your algorithms and other services can be found when SDK Security API clients request them. Programmers that only need to use the SDK Security API to access existing cryptography algorithms and other services do not need to read this document.

Related Documentation

This document assumes you have already read the Java Cryptography Architecture API Specification and Reference.

It also discusses various classes and interfaces in the Java 2 Security API. The complete reference documentation for the relevant Security API packages can be found in:

  • java.security package
  • java.security.spec package
  • java.security.interfaces package

Engine Classes and Corresponding Service Provider Interface Classes

An "engine class" defines a cryptographic service in an abstract fashion (without a concrete implementation).

A cryptographic service is always associated with a particular algorithm or type, and it either provides cryptographic operations (like those for digital signatures or message digests), generates or supplies the cryptographic material (keys or parameters) required for cryptographic operations, or generates data objects (keystores or certificates) that encapsulate cryptographic keys (which can be used in a cryptographic operation) in a secure fashion. For example, two of the engine classes are the Signature and KeyFactory classes. The Signature class provides access to the functionality of a digital signature algorithm. A DSA KeyFactory supplies a DSA private or public key (from its encoding or transparent specification) in a format usable by the initSign or initVerify methods, respectively, of a DSA Signature object.

The Java Cryptography Architecture encompasses the classes of the Java 2 SDK Security package related to cryptography, including the engine classes. Users of the API request and utilize instances of the engine classes to carry out corresponding operations. The following engine classes are defined in the Java 2 SDK:

  • MessageDigest - used to calculate the message digest (hash) of specified data.

  • Signature - used to sign data and verify digital signatures.

  • KeyPairGenerator - used to generate a pair of public and private keys suitable for a specified algorithm.

  • KeyFactory - used to convert opaque cryptographic keys of type Key into key specifications (transparent representations of the underlying key material), and vice versa.

  • KeyStore - used to create and manage a keystore. A keystore is a database of keys. Private keys in a keystore have a certificate chain associated with them, which authenticates the corresponding public key. A keystore also contains certificates from trusted entities.

  • CertificateFactory - used to create public key certificates and Certificate Revocation Lists (CRLs).

  • AlgorithmParameters - used to manage the parameters for a particular algorithm, including parameter encoding and decoding.

  • AlgorithmParameterGenerator - used to generate a set of parameters suitable for a specified algorithm.

  • SecureRandom - used to generate random or pseudo-random numbers.

Note: A "generator" creates objects with brand-new contents, whereas a "factory" creates objects from existing material (for example, an encoding).

An engine class provides the interface to the functionality of a specific type of cryptographic service (independent of a particular cryptographic algorithm). It defines "Application Programming Interface" (API) methods that allow applications to access the specific type of cryptographic service it provides. The actual implementations (from one or more providers) are those for specific algorithms. The Signature engine class, for example, provides access to the functionality of a digital signature algorithm. The actual implementation supplied in a SignatureSpi subclass (see next paragraph) would be that for a specific kind of signature algorithm, such as SHA1 with DSA, SHA1 with RSA, or MD5 with RSA.

The application interfaces supplied by an engine class are implemented in terms of a "Service Provider Interface" (SPI). That is, for each engine class, there is a corresponding abstract SPI class, which defines the Service Provider Interface methods that cryptographic service providers must implement.

An instance of an engine class, the "API object", encapsulates (as a private field) an instance of the corresponding SPI class, the "SPI object". All API methods of an API object are declared "final", and their implementations invoke the corresponding SPI methods of the encapsulated SPI object. An instance of an engine class (and of its corresponding SPI class) is created by a call to the getInstance factory method of the engine class.

The name of each SPI class is the same as that of the corresponding engine class, followed by "Spi". For example, the SPI class corresponding to the Signature engine class is the SignatureSpi class.

Each SPI class is abstract. To supply the implementation of a particular type of service, for a specific algorithm, a provider must subclass the corresponding SPI class and provide implementations for all the abstract methods.

Another example of an engine class is the MessageDigest class, which provides access to a message digest algorithm. Its implementations, in MessageDigestSpi subclasses, may be those of various message digest algorithms such as SHA-1, MD5, or MD2.

As a final example, the KeyFactory engine class supports the conversion from opaque keys to transparent key specifications, and vice versa. (See Key Specification Interfaces and Classes Required by Key Factories.) The actual implementation supplied in a KeyFactorySpi subclass would be that for a specific type of keys, e.g., DSA public and private keys.

Steps to Implement and Integrate a Provider

The steps required in order to implement a provider and integrate it into SDK Security are the following:

  • Step 1: Write your Service Implementation Code

  • Step 2: Give your Provider a Name

  • Step 3: Write your "Master Class", a subclass of Provider

  • Step 4: Compile your Code

  • Step 5: Prepare for Testing: Install the Provider

  • Step 6: Write and Compile your Test Programs

  • Step 7: Run your Test Programs

  • Step 8: Document your Provider and its Supported Services

  • Step 9: Make your Class Files and Documentation Available to Clients

Step 1: Write your Service Implementation Code

The first thing you need to do is write the code supplying algorithm-specific implementations of the cryptographic services you want to support.

In Java 2 SDK, you can supply signature, message digest, key pair generation, and (pseudo-)random number generation algorithms, as well as key and certificate factories and keystore creation and management, algorithm parameter management, and algorithm parameter generation services.

For each cryptographic service, you need to create a subclass of the appropriate SPI class: SignatureSpi, MessageDigestSpi, KeyPairGeneratorSpi, SecureRandomSpi, AlgorithmParameterGeneratorSpi, AlgorithmParametersSpi, KeyFactorySpi, CertificateFactorySpi, or KeyStoreSpi. (See "Engine Classes and Corresponding SPI Classes".)

In your subclass, you need to

  1. supply implementations for the abstract methods, whose names usually begin with "engine". See Further Implementation Details and Requirements for additional information.

  2. ensure there is a public constructor without any arguments. Here's why: When one of your services is requested, SDK Security looks up the subclass implementing that service, as specified by a property in your "master class" (see Step 3). Java 2 SDK Security then creates the Class object associated with your subclass, and creates an instance of your subclass by calling the newInstance method on that Class object. newInstance requires your subclass to have a public constructor without any parameters.

    A default constructor without arguments will automatically be generated if your subclass doesn't have any constructors. But if your subclass defines any constructors, you must explicitly define a public constructor without arguments.

Step 2: Give your Provider a Name

Decide on a name for your provider. This is the name to be used by client applications to refer to your provider.

Step 3: Write your "Master Class", a subclass of Provider

The third step is to create a subclass of the Provider class.

Your subclass should be a final class, and its constructor should

  • call super, specifying the provider name (see Step 2), version number, and a string of information about the provider and algorithms it supports. For example:
        super("ACME", 1.0, "ACME provider v1.0, implementing " +
      "RSA signing and key generation, SHA-1 and MD5 message digests.");
  • set the values of various properties that are required for the Java 2 Security API to look up the cryptographic services implemented by the provider. For each service implemented by the provider, there must be a property whose name is the type of service (Signature, MessageDigest, KeyPairGenerator, SecureRandom, KeyFactory, KeyStore, CertificateFactory, AlgorithmParameterGenerator, or AlgorithmParameters), followed by a period and the name of the algorithm, certificate type, or keystore type to which the service applies. The property value must specify the fully qualified name of the class implementing the service.

    The list below shows the various types of properties that must be defined for the various types of services, where the actual algorithm name is substitued for algName, certificate type for certType, and keystore type for storeType:

    • Signature.algName
    • MessageDigest.algName
    • KeyPairGenerator.algName
    • SecureRandom.algName
    • KeyFactory.algName
    • CertificateFactory.certType
    • KeyStore.storeType
    • AlgorithmParameterGenerator.algName
    • AlgorithmParameters.algName

    In each of these, algName, certType , or storeType is the "standard" name of the algorithm, certificate type, or keystore type. (See Appendix A of the Java Cryptography Architecture API Specification & Reference for the standard names that should be used.)

    The value of each property must be the fully qualified name of the class implementing the specified algorithm, certificate type, or keystore type. That is, it must be the package name followed by the class name, where the two are separated by a period.

    As an example, the default provider named "SUN" implements the Digital Signature Algorithm (whose standard name is "SHA1withDSA") in a class named DSA in the sun.security.provider package. Its subclass of Provider (which is the Sun class in the sun.security.provider package) sets the Signature.SHA1withDSA property to have the value "sun.security.provider.DSA" via the following:

        put("Signature.SHA1withDSA", "sun.security.provider.DSA")

    The list below shows more properties that can be defined for the various types of services, where the actual algorithm name is substitued for algName, certificate type for certType, keystore type for storeType, and attribute name for attrName:

    • Signature.algName [one or more spaces] attrName
    • MessageDigest.algName [one or more spaces] attrName
    • KeyPairGenerator.algName [one or more spaces] attrName
    • SecureRandom.algName [one or more spaces] attrName
    • KeyFactory.algName [one or more spaces] attrName
    • CertificateFactory.certType [one or more spaces] attrName
    • KeyStore.storeType [one or more spaces] attrName
    • AlgorithmParameterGenerator.algName [one or more spaces] attrName
    • AlgorithmParameters.algName [one or more spaces] attrName
    In each of these, algName, certType, storeType, or attrName is the "standard" name of the algorithm, certificate type, keystore type, or attribute. (See Appendix A of the Java Cryptography Architecture API Specification & Reference for the standard names that should be used.)

    For a property in the above format, the value of the property must be the value for the corresponding attribute. (See Appendix A of the Java Cryptography Architecture API Specification & Reference for the definition of each standard attribute.)

    As an example, the default provider named "SUN" implements the SHA1withDSA Digital Signature Algorithm in software. In the master class for the provider "SUN", it sets the "Signature.SHA1withDSA ImplementedIn" to have the value "Software" via the following:

    put("Signature.SHA1withDSA ImplementedIn", "Software")

For further master class property setting examples, see Appendix A to view the current Java 2 SDK Sun.java source file. This shows how the Sun class constructor sets all the properties for the "SUN" provider.

Note: The Provider subclass can get its information from wherever it wants. Thus, the information can be hard-wired in, or retrieved at runtime, e.g., from a file.

Step 4: Compile your Code

After you have created your implementation code (Step 1), given your provider a name (Step 2), and created the master class (Step 3), use the compiler to compile your files.

Step 5: Prepare for Testing: Install the Provider

In order to prepare for testing your provider, you must install it in the same manner as will be done by clients wishing to use it. The installation enables SDK Security to find your algorithm implementations when clients request them.

There are two parts to installing a provider: installing the provider package classes, and configuring the provider.

Installing the Provider Classes

The first thing you must do is make your classes available so that they can be found when requested. You ship your provider classes as a JAR (Java ARchive) or ZIP file.

There are a couple possible ways of installing the provider classes:

  • Place a zip or JAR file containing the classes anywhere on your CLASSPATH.

  • Supply your provider JAR file as an "installed" or "bundled" extension. For more information on how to deploy an extension, see How is an extension deployed?.

Configuring the Provider

The next step is to add the provider to your list of approved providers. This is done statically by editing the security properties file

<java-home>\lib\security\java.security         [Win32]
<java-home>/lib/security/java.security         [Solaris]
Here <java-home> refers to the directory where the runtime environment was installed. For example, if you have Java 2 SDK installed on Solaris, you need to edit the following file:
jdk1.3/jre/lib/security/java.security
Similarly, if you have the Java 2 Runtime Environment v1.3 installed on Solaris, you need to edit this file:
jre1.3/lib/security

For each provider, this file should have a statement of the following form:

    security.provider.n=masterClassName

This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms when no specific provider is requested. The order is 1-based; 1 is the most preferred, followed by 2, and so on.

masterClassName must specify the fully qualified name of the provider's "master class", which you implemented in Step 3. This class is always a subclass of the Provider class.

Whenever the Java 2 SDK is installed, it contains one built-in (default) provider, the provider referred to as "SUN". The java.security file has just the following provider specification:

    security.provider.1=sun.security.provider.Sun
(Recall that the "SUN" provider's master class is the Sun class in the sun.security.provider package.)

Suppose that your master class is the Acme class in the COM.acme.provider package, and that you would like to make your provider the second preferred provider. To do so, add the following line to the java.security file below the line for the "SUN" provider:

    security.provider.2=COM.acme.provider.Acme
Note: Providers may also be registered dynamically. To do so, a program (such as your test program, to be written in Step 7) can call either the addProvider or insertProviderAt method in the Security class. This type of registration is not persistent and can only be done by "trusted" programs. See the Security class section of the Java Cryptography Architecture API Specification and Reference.

Step 6: Write and Compile your Test Programs

Write and compile one or more test programs that test your provider's incorporation into the Security API as well as the correctness of its algorithm(s). Create any supporting files needed, such as those for test data to be hashed or signed.

The first tests your program should perform are ones to ensure that your provider is found, and that its name, version number, and additional information is as expected. To do so, you could write code like the following, substituting your provider name for "MyPro":

    import java.security.*;

    Provider p = Security.getProvider("MyPro");

    System.out.println("MyPro provider name is " + p.getName());
    System.out.println("MyPro provider version # is " + p.getVersion());
    System.out.println("MyPro provider info is " + p.getInfo());

Next, you should ensure that your services are found. For instance, if you implemented a SHA-1 message digest algorithm, you could check to ensure it's found when requested by using the following code (again substituting your provider name for "MyPro"):

    MessageDigest sha = MessageDigest.getInstance("SHA", "MyPro");

    System.out.println("My MessageDigest algorithm name is " +
        sha.getAlgorithm());

If you don't specify a provider name in the call to getInstance, all registered providers will be searched, in preference order (see Configuring the Provider), until one implementing the algorithm is found.

Step 7: Run your Test Programs

Run your test program(s). Debug your code and continue testing as needed. If the Java 2 Security API cannot seem to find one of your algorithms, review the steps above and ensure they are all completed.

Step 8: Document your Provider and its Supported Services

The next-to-last step is to write documentation for your clients. At the minimum, you need to specify
  • the name programs should use to refer to your provider. Please note: As of this writing, provider name searches are case-sensitive. That is, if your master class specifies your provider name as "ACME" but a user requests "Acme", your provider will not be found. This behavior may change in the future, but for now be sure to warn your clients to use the exact case you specify.

  • the types of algorithms and other services implemented by your provider.

  • instructions for installing the provider, similar to those provided in Step 5, except that the information and examples should be specific to your provider.
In addition, your documentation should specify anything else of interest to clients, such as any default algorithm parameters.

Message Digests

For each message digest algorithm, tell whether or not your implementation is cloneable. This is not technically necessary, but it may save clients some time and coding by telling them whether or not intermediate hashes may be possible through cloning. Clients who do not know whether or not a message digest implementation is cloneable can find out by attempting to clone the MessageDigest object and catching the potential exception, as illustrated by the following example:

try {
   // try and clone it
    /* compute the hash for i1 */
    sha.update(i1);
    byte[] i1Hash = sha.clone().digest();

    /* compute the hash for i1 and i2 */
    sha.update(i2);
    byte[] i12Hash = sha.clone().digest();

    /* compute the hash for i1, i2 and i3 */
    sha.update(i3);
    byte[] i123Hash = sha.digest();
} catch (CloneNotSupportedException cnse) {
  // have to use an approach not involving cloning
}
where
  • sha is the message digest object they received when they requested one via a call to MessageDigest.getInstance,

  • i1, i2 and i3 are input byte arrays, and

  • they want to calculate separate hashes for:
    • i1
    • i1 and i2
    • i1, i2, and i3

Signature Algorithms

If you implement a signature algorithm, you should document the format in which the signature (generated by one of the sign methods) is encoded. For example, the SHA1withDSA signature algorithm supplied by the "SUN" provider encodes the signature as a standard ASN.1 SEQUENCE of two integers, r and s.

Random Number Generation (SecureRandom) Algorithms

For a random number generation algorithm, provide information regarding how "random" the numbers generated are, and the quality of the seed when the random number generator is self-seeding. Also note what happens when a SecureRandom object (and its encapsulated SecureRandomSpi implementation object) is deserialized: If subsequent calls to the nextBytes method (which invokes the engineNextBytes method of the encapsulated SecureRandomSpi object) of the restored object yield the exact same (random) bytes as the original object would, then let users know that if this behaviour is undesirable, they should seed the restored random object by calling its setSeed method.

Key Pair Generators

For a key pair generator algorithm, in case the client does not explicitly initialize the key pair generator (via a call to an initialize method), each provider must supply and document a default initialization. For example, the "SUN" provider uses a default modulus size (strength) of 1024 bits.

Key Factories

A provider should document all the key specifications supported by its key factory.

Certificate Factories

A provider should document what types of certificates (and their version numbers, if relevant), can be created by the factory.

Keystores

A provider should document any relevant information regarding the keystore implementation, such as its underlying data format.

Algorithm Parameter Generators

In case the client does not explicitly initialize the algorithm parameter generator (via a call to an init method in the AlgorithmParameterGenerator engine class), each provider must supply and document a default initialization. For example, the "SUN" provider uses a default modulus prime size of 1024 bits for the generation of DSA parameters.

Step 9: Make your Class Files and Documentation Available to Clients

The final step is to make your class files and documentation available to clients in whatever form (.class files, zip files, JAR files, ...) and methods (web download, floppy, mail, ...) you feel are appropriate.

Further Implementation Details and Requirements

Alias Names

For many cryptographic algorithms and types, there is a single official "standard name" defined in Appendix A of the Java Cryptography Architecture API Specification & Reference.

For example, "MD5" is the standard name for the RSA-MD5 Message Digest algorithm defined by RSA DSI in RFC 1321.

In the Java 2 SDK, there is an aliasing scheme that enables clients to use aliases when referring to algorithms or types, rather than their standard names. For example, the "SUN" provider's master class (Sun.java) defines the alias "SHA1/DSA" for the algorithm whose standard name is "SHA1withDSA". Thus, the following statements are equivalent:

    Signature sig = Signature.getInstance("SHA1withDSA", "SUN");

    Signature sig = Signature.getInstance("SHA1/DSA", "SUN");
Aliases can be defined in your "master class" (see Step 3). To define an alias, create a property named
    Alg.Alias.engineClassName.aliasName

where engineClassName is the name of an engine class (e.g., Signature), and aliasName is your alias name. The value of the property must be the standard algorithm (or type) name for the algorithm (or type) being aliased.

As an example, the "SUN" provider defines the alias "SHA1/DSA" for the signature algorithm whose standard name is "SHA1withDSA" by setting a property named Alg.Alias.Signature.SHA1/DSA to have the value SHA1withDSA via the following:

    put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");

Currently, aliases defined by the "SUN" provider are available to all clients, no matter which provider clients request. For example, if you create a provider named "MyPro" that implements the SHA1withDSA algorithm, then even if you don't define any aliases for it, the "SHA1/DSA" alias defined by "SUN" can be used to refer to your provider's SHA1withDSA implementation as follows:

    Signature sig = Signature.getInstance("SHA1/DSA", "MyPro");
WARNING: The aliasing scheme may be changed or eliminated in future releases.

Service Interdependencies

Some algorithms require the use of other types of algorithms. For example, a signature algorithm usually needs to use a message digest algorithm in order to sign and verify data.

If you are implementing one type of algorithm that requires another, you can do one of the following:

  1. Provide your own implementations for both.

  2. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by the default "SUN" provider that is included with every SDK installation. For example, if you are implementing a signature algorithm that requires a message digest algorithm, you can obtain an instance of a class implementing the MD5 message digest algorithm by calling
        MessageDigest.getInstance("MD5", "SUN")

  3. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by another specific provider. This is only appropriate if you are sure that all clients who will use your provider will also have the other provider installed.

  4. Let your implementation of one algorithm use an instance of the other type of algorithm, as supplied by another (unspecified) provider. That is, you can request an algorithm by name, but without specifying any particular provider, as in
        MessageDigest.getInstance("MD5")
    This is only appropriate if you are sure that there will be at least one implementation of the requested algorithm (in this case, MD5) installed on each Java platform where your provider will be used.

Here are some common types of algorithm interdependencies:

Signature and Message Digest Algorithms

A signature algorithm often requires use of a message digest algorithm. For example, the SHA1withDSA signature algorithm requires the SHA-1 message digest algorithm.

Signature and (Pseudo-)Random Number Generation Algorithms

A signature algorithm often requires use of a (pseudo-)random number generation algorithm. For example, such an algorithm is required in order to generate a DSA signature.

Key Pair Generation and Message Digest Algorithms

A key pair generation algorithm often requires use of a message digest algorithm. For example, DSA keys are generated using the SHA-1 message digest algorithm.

Algorithm Parameter Generation and Message Digest Algorithms

An algorithm parameter generator often requires use of a message digest algorithm. For example, DSA parameters are generated using the SHA-1 message digest algorithm.

KeyStores and Message Digest Algorithms

A keystore implementation will often utilize a message digest algorithm to compute keyed hashes (where the "key" is a user-provided password) to check the integrity of a keystore and make sure that the keystore has not been tampered with.

Key Pair Generation Algorithms and Algorithm Parameter Generators

A key pair generation algorithm sometimes needs to generate a new set of algorithm parameters. It can either generate the parameters directly, or use an algorithm parameter generator.

Key Pair Generation, Algorithm Parameter Generation, and (Pseudo-)Random Number Generation Algorithms

A key pair generation algorithm may require a source of randomness in order to generate a new key pair and possibly a new set of parameters associated with the keys. That source of randomness is represented by a SecureRandom object. The implementation of the key pair generation algorithm may generate the key parameters itself, or may use an algorithm parameter generator to generate them, in which case it may or may not initialize the algorithm parameter generator with a source of randomness.

Algorithm Parameter Generators and Algorithm Parameters

An algorithm parameter generator's engineGenerateParameters method must return an AlgorithmParameters instance.

Signature and Key Pair Generation Algorithms or Key Factories

If you are implementing a signature algorithm, your implementation's engineInitSign and engineInitVerify methods will require passed-in keys that are valid for the underlying algorithm (e.g., DSA keys for the DSS algorithm). You can do one of the following:

  1. Also create your own classes implementing appropriate interfaces (e.g. classes implementing the DSAPrivateKey and DSAPublicKey interfaces from the package java.security.interfaces), and create your own key pair generator and/or key factory returning keys of those types. Require the keys passed to engineInitSign and engineInitVerify to be the types of keys you have implemented, that is, keys generated from your key pair generator or key factory. Or you can

  2. Accept keys from other key pair generators or other key factories, as long as they are instances of appropriate interfaces that enable your signature implementation to obtain the information it needs (such as the private and public keys and the key parameters). For example, the engineInitSign method for a DSS Signature class could accept any private keys that are instances of java.security.interfaces.DSAPrivateKey.

KeyStores and Key and Certificate Factories

A keystore implementation will often utilize a key factory to parse the keys stored in the keystore, and a certificate factory to parse the certificates stored in the keystore.

Default Initializations

In case the client does not explicitly initialize a key pair generator or an algorithm parameter generator, each provider of such a service must supply (and document) a default initialization. For example, the "SUN" provider uses a default modulus size (strength) of 1024 bits for the generation of DSA parameters.

Default Key Pair Generator Parameter Requirements

If you implement a key pair generator, your implementation should supply default parameters that are used when clients don't specify parameters. The documentation you supply (Step 8) should state what the default parameters are.

For example, the DSA key pair generator in the "SUN" provider supplies a set of pre-computed p, q, and g default values for the generation of 512, 768, and 1024-bit key pairs. The following p, q, and g values are used as the default values for the generation of 1024-bit DSA key pairs:

p = fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80
    b6512669 455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b
    801d346f f26660b7 6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6
    1bf83b57 e7c6a8a6 150f04fb 83f6d3c5 1ec30235 54135a16 9132f675
    f3ae2b61 d72aeff2 2203199d d14801c7

q = 9760508f 15230bcc b292b982 a2eb840b f0581cf5

g = f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b
    3d078267 5159578e bad4594f e6710710 8180b449 167123e8 4c281613
    b7cf0932 8cc8a6e1 3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f
    0bfa2135 62f1fb62 7a01243b cca4f1be a8519089 a883dfe1 5ae59f06
    928b665e 807b5525 64014c3b fecf492a

(The p and q values given here were generated by the prime generation standard, using the 160-bit

SEED:  8d515589 4229d5e6 89ee01e6 018a237e 2cae64cd
With this seed, the algorithm found p and q when the counter was at 92.)

Signature Formats

If you implement a signature algorithm, the documentation you supply (Step 8) should specify the format in which the signature (generated by one of the sign methods) is encoded.

For example, the SHA1withDSA signature algorithm supplied by the "SUN" provider encodes the signature as a standard ASN.1 sequence of two ASN.1 INTEGER values: r and s, in that order:

    SEQUENCE ::= {
        r INTEGER,
        s INTEGER }

DSA Interfaces and their Required Implementations

The Java 2 Security API contains the following interfaces (in the java.security.interfaces package) for the convenience of programmers implementing DSA services:
  • DSAKey
  • DSAKeyPairGenerator
  • DSAParams
  • DSAPrivateKey
  • DSAPublicKey
The following sections discuss requirements for implementations of these interfaces.

DSAKeyPairGenerator Implementation

This interface is obsolete. It used to be needed to enable clients to provide DSA-specific parameters to be used rather than the default parameters your implementation supplies. However, in Java 2 it is no longer necessary; a new KeyPairGenerator initialize method that takes an AlgorithmParameterSpec parameter enables clients to indicate algorithm-specific parameters.

DSAParams Implementation

If you are implementing a DSA key pair generator, you need a class implementing DSAParams for holding and returning the p, q, and g parameters.

A DSAParams implementation is also required if you implement the DSAPrivateKey and DSAPublicKey interfaces. DSAPublicKey and DSAPrivateKey both extend the DSAKey interface, which contains a getParams method that must return a DSAParams object. See DSAPrivateKey and DSAPublicKey Implementations for more information.

Note: there is a DSAParams implementation built into the SDK: the java.security.spec.DSAParameterSpec class.

DSAPrivateKey and DSAPublicKey Implementations

If you implement a DSA key pair generator or key factory, you need to create classes implementing the DSAPrivateKey and DSAPublicKey interfaces.

If you implement a DSA key pair generator, your generateKeyPair method (in your KeyPairGeneratorSpi subclass) will return instances of your implementations of those interfaces.

If you implement a DSA key factory, your engineGeneratePrivate method (in your KeyFactorySpi subclass) will return an instance of your DSAPrivateKey implementation, and your engineGeneratePublic method will return an instance of your DSAPublicKey implementation.

Also, your engineGetKeySpec and engineTranslateKey methods will expect the passed-in key to be an instance of a DSAPrivateKey or DSAPublicKey implementation. The getParams method provided by the interface implementations is useful for obtaining and extracting the parameters from the keys and then using the parameters, for example as parameters to the DSAParameterSpec constructor called to create a parameter specification from parameter values that could be used to initialize a KeyPairGenerator object for DSA.

If you implement a DSA signature algorithm, your engineInitSign method (in your SignatureSpi subclass) will expect to be passed a DSAPrivateKey and your engineInitVerify method will expect to be passed a DSAPublicKey.

Please note: The DSAPublicKey and DSAPrivateKey interfaces define a very generic, provider-independent interface to DSA public and private keys, respectively. The engineGetKeySpec and engineTranslateKey methods (in your KeyFactorySpi subclass) could additionally check if the passed-in key is actually an instance of their provider's own implementation of DSAPrivateKey or DSAPublicKey, e.g., to take advantage of provider-specific implementation details. The same is true for the DSA signature algorithm engineInitSign and engineInitVerify methods (in your SignatureSpi subclass).

To see what methods need to be implemented by classes that implement the DSAPublicKey and DSAPrivateKey interfaces, first note the following interface signatures:

  In the java.security.interfaces package:

    public interface DSAPrivateKey extends DSAKey,
                                     java.security.PrivateKey

    public interface DSAPublicKey extends DSAKey,
                                    java.security.PublicKey

    public interface DSAKey

  In the java.security package:

    public interface PrivateKey extends Key

    public interface PublicKey extends Key

    public interface Key extends java.io.Serializable

In order to implement the DSAPrivateKey and DSAPublicKey interfaces, you must implement the methods they define as well as those defined by interfaces they extend, directly or indirectly.

Thus, for private keys, you need to supply a class that implements

  • the getX method from the DSAPrivateKey interface.

  • the getParams method from the java.security.interfaces.DSAKey interface, since DSAPrivateKey extends DSAKey. Note: The getParams method returns a DSAParams object, so you must also have a DSAParams implementation.

  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DSAPrivateKey extends java.security.PrivateKey, and PrivateKey extends Key. Similarly, for public DSA keys, you need to supply a class that implements
    • the getY method from the DSAPublicKey interface.

    • the getParams method from the java.security.interfaces.DSAKey interface, since DSAPublicKey extends DSAKey. Note: The getParams method returns a DSAParams object, so you must also have a DSAParams implementation.

    • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since DSAPublicKey extends java.security.PublicKey, and PublicKey extends Key.

RSA Interfaces and their Required Implementations

The Java 2 SDK Security API contains the following interfaces (in the java.security.interfaces package) for the convenience of programmers implementing RSA services:
  • RSAPrivateKey
  • RSAPrivateCrtKey
  • RSAPublicKey
The following sections discuss requirements for implementations of these interfaces.

RSAPrivateKey, RSAPrivateCrtKey, and RSAPublicKey Implementations

If you implement an RSA key pair generator or key factory, you need to create classes implementing the RSAPrivateKey (and/or RSAPrivateCrtKey) and RSAPublicKey interfaces. (RSAPrivateCrtKey is the interface to an RSA private key, using the Chinese Remainder Theorem (CRT) representation.)

If you implement an RSA key pair generator, your generateKeyPair method (in your KeyPairGeneratorSpi subclass) will return instances of your implementations of those interfaces.

If you implement an RSA key factory, your engineGeneratePrivate method (in your KeyFactorySpi subclass) will return an instance of your RSAPrivateKey (or RSAPrivateCrtKey) implementation, and your engineGeneratePublic method will return an instance of your RSAPublicKey implementation.

Also, your engineGetKeySpec and engineTranslateKey methods will expect the passed-in key to be an instance of an RSAPrivateKey, RSAPrivateCrtKey, or RSAPublicKey implementation.

If you implement an RSA signature algorithm, your engineInitSign method (in your SignatureSpi subclass) will expect to be passed either an RSAPrivateKey or an RSAPrivateCrtKey, and your engineInitVerify method will expect to be passed an RSAPublicKey.

Please note: The RSAPublicKey, RSAPrivateCrtKey, and RSAPrivateKey interfaces define a very generic, provider-independent interface to RSA public and private keys. The engineGetKeySpec and engineTranslateKey methods (in your KeyFactorySpi subclass) could additionally check if the passed-in key is actually an instance of their provider's own implementation of RSAPrivateKey, RSAPrivateCrtKey, or RSAPublicKey, e.g., to take advantage of provider-specific implementation details. The same is true for the RSA signature algorithm engineInitSign and engineInitVerify methods (in your SignatureSpi subclass).

To see what methods need to be implemented by classes that implement the RSAPublicKey, RSAPrivateCrtKey, and RSAPrivateKey interfaces, first note the following interface signatures:

  In the java.security.interfaces package:

    public interface RSAPrivateKey extends java.security.PrivateKey

    public interface RSAPrivateCrtKey extends RSAPrivateKey

    public interface RSAPublicKey extends java.security.PublicKey

  In the java.security package:

    public interface PrivateKey extends Key

    public interface PublicKey extends Key

    public interface Key extends java.io.Serializable

In order to implement the RSAPrivateKey, RSAPrivateCrtKey, and RSAPublicKey interfaces, you must implement the methods they define as well as those defined by interfaces they extend, directly or indirectly.

Thus, for RSA private keys, you need to supply a class that implements

  • the getModulus and getPrivateExponent methods from the RSAPrivateKey interface.

  • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since RSAPrivateKey extends java.security.PrivateKey, and PrivateKey extends Key.

    Similarly, for RSA private keys using the Chinese Remainder Theorem (CRT) representation, you need to supply a class that implements

    • all the methods listed above for RSA private keys, since RSAPrivateCrtKey extends java.security.interfaces.RSAPrivateKey.

    • the getPublicExponent, getPrimeP, getPrimeQ, getPrimeExponentP, getPrimeExponentQ, and getCrtCoefficient methods from the RSAPrivateCrtKey interface.

      For public RSA keys, you need to supply a class that implements

      • the getModulus and getPublicExponent methods from the RSAPublicKey interface.

      • the getAlgorithm, getEncoded, and getFormat methods from the java.security.Key interface, since RSAPublicKey extends java.security.PublicKey, and PublicKey extends Key.

Interfaces for Other Algorithm Types

As noted above, the Java 2 SDK Security API contains interfaces for the convenience of programmers implementing DSA and RSA services. The API does not at this time contain similar interfaces for any other type of algorithm. Thus, you need to define your own.

If you are implementing a key pair generator for a different algorithm, you should create an interface with one or more initialize methods that clients can call when they want to provide algorithm-specific parameters to be used rather than the default parameters your implementation supplies. Your subclass of KeyPairGeneratorSpi should implement this interface.

For private and public keys for non-DSA and non-RSA algorithms, there are currently no java.security.interfaces interfaces corresponding to the DSAPrivateKey and DSAPublicKey ones for DSA and the RSAPrivateKey, RSAPrivateCrtKey, and RSAPublicKey ones for RSA. It is recommended that you create similar interfaces and provide implementation classes. Your public key interface should extend the PublicKey interface. Similarly, your private key interface should extend the PrivateKey interface.

Algorithm Parameter Specification Interfaces and Classes

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm.

A transparent representation of parameters means that you can access each value individually, through one of the "get" methods defined in the corresponding specification class (e.g., DSAParameterSpec defines getP, getQ, and getG methods, to access the p, q, and g parameters, respectively).

This is contrasted with an opaque representation, as supplied by the AlgorithmParameters engine class, in which you have no direct access to the key material values; you can only get the name of the algorithm associated with the parameter set (via getAlgorithm) and some kind of encoding for the parameter set (via getEncoded).

If you supply an AlgorithmParametersSpi, AlgorithmParameterGeneratorSpi, or KeyPairGeneratorSpi implementation, you must utilize the AlgorithmParameterSpec interface, since each of those classes contain methods that take an AlgorithmParameterSpec parameter. Such methods need to determine which actual implementation of that interface has been passed in, and act accordingly.

The Java 2 SDK contains one AlgorithmParameterSpec implementation, the DSAParameterSpec class. If you are working with DSA algorithm parameters, you can utilize this class. If you are operating on algorithm parameters that should be for a different type of algorithm, you will need to supply your own AlgorithmParameterSpec implementation appropriate for that type of algorithm.

The Java 2 SDK defines the following algorithm parameter specification interfaces and classes in the java.security.spec package:

The AlgorithmParameterSpec Interface

AlgorithmParameterSpec is an interface to a transparent specification of cryptographic parameters.

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all parameter specifications. All parameter specifications must implement this interface.

The DSAParameterSpec Class

This class (which implements the AlgorithmParameterSpec and DSAParams interfaces) specifies the set of parameters used with the DSA algorithm. It has the following methods:
    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the DSA algorithm parameters: the prime p, the sub-prime q, and the base g.

Many types of DSA services will find this class useful - for example, it is utilized by the DSA signature, key pair generator, algorithm parameter generator, and algorithm parameters classes implemented by the "SUN" provider. As a specific example, an algorithm parameters implementation must include an implementation for the getParameterSpec method, which returns an AlgorithmParameterSpec. The DSA algorithm parameters implementation supplied by "SUN" returns an instance of the DSAParameterSpec class.

Key Specification Interfaces and Classes Required by Key Factories

A key factory provides bi-directional conversions between opaque keys (of type Key) and key specifications. If you implement a key factory, you thus need to understand and utilize key specifications. In some cases, you also need to implement your own key specifications. Further information about key specifications, the interfaces and classes supplied in the Java 2 SDK, and key factory requirements with respect to specifications, is provided below.

Key specifications are transparent representations of the key material that constitutes a key. If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

A transparent representation of keys means that you can access each key material value individually, through one of the "get" methods defined in the corresponding specification class. For example, java.security.spec.DSAPrivateKeySpec defines getX, getP, getQ, and getG methods, to access the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

This is contrasted with an opaque representation, as defined by the Key interface, in which you have no direct access to the parameter fields. In other words, an "opaque" representation gives you limited access to the key - just the three methods defined by the Key interface: getAlgorithm, getFormat, and getEncoded.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec).

The Java 2 SDK defines the following key specification interfaces and classes in the java.security.spec package:

The KeySpec Interface

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all key specifications. All key specifications must implement this interface.

The Java 2 SDK supplies several classes implementing the KeySpec interface: DSAPrivateKeySpec, DSAPublicKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec, EncodedKeySpec, PKCS8EncodedKeySpec, and X509EncodedKeySpec.

If your provider uses key types (e.g., Your_PublicKey_type and Your_PrivateKey_type) for which the SDK does not already provide corresponding KeySpec classes, there are two possible scenarios, one of which requires that you implement your own key specifications:

  1. If your users will never have to access specific key material values of your key type, you will not have to provide any KeySpec classes for your key type.

    In this scenario, your users will always create Your_PublicKey_type and Your_PrivateKey_type keys through the appropriate KeyPairGenerator supplied by your provider for that key type. If they want to store the generated keys for later usage, they retrieve the keys' encodings (using the getEncoded method of the Key interface). When they want to create an Your_PublicKey_type or Your_PrivateKey_type key from the encoding (e.g., in order to initialize a Signature object for signing or verification), they create an instance of X509EncodedKeySpec or PKCS8EncodedKeySpec from the encoding, and feed it to the appropriate KeyFactory supplied by your provider for that algorithm, whose generatePublic and generatePrivate methods will return the requested PublicKey (an instance of Your_PublicKey_type) or PrivateKey (an instance of Your_PrivateKey_type) object, respectively.

  2. If you anticipate a need for users to access specific key material values of your key type, or to construct a key of your key type from key material and associated parameter values, rather than from its encoding (as in the above case), you have to specify new KeySpec classes (classes that implement the KeySpec interface) with the appropriate constructor methods and "get" methods for returning key material fields and associated parameter values for your key type. You will specify those classes in a similar manner as is done by the DSAPrivateKeySpec and DSAPublicKeySpec classes provided in the Java 2 SDK. You need to ship those classes along with your provider classes, for example, as part of your provider JAR file.

The DSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA private key with its associated parameters. It has the following methods:
    public BigInteger getX()

    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The DSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA public key with its associated parameters. It has the following methods:
    public BigInteger getY()

    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the public key y, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The RSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA private key. It has the following methods:
    public BigInteger getModulus()

    public BigInteger getPrivateExponent()
These methods return the RSA modulus n and private exponent d values that constitute the RSA private key.

The RSAPrivateCrtKeySpec Class

This class (which extends the RSAPrivateKeySpec class) specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values. It has the following methods (in addition to the methods inherited from its superclass RSAPrivateKeySpec):
    public BigInteger getPublicExponent()

    public BigInteger getPrimeP()

    public BigInteger getPrimeQ()

    public BigInteger getPrimeExponentP()

    public BigInteger getPrimeExponentQ()

    public BigInteger getCrtCoefficient()
These methods return the public exponent e and the CRT information integers: the prime factor p of the modulus n, the prime factor q of n, the exponent d mod (p-1), the exponent d mod (q-1), and the Chinese Remainder Theorem coefficient (inverse of q) mod p.

An RSA private key logically consists of only the modulus and the private exponent. The presence of the CRT values is intended for efficiency.

The RSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA public key. It has the following methods:
    public BigInteger getModulus()

    public BigInteger getPublicExponent()
These methods return the RSA modulus n and public exponent e values that constitute the RSA public key.

The EncodedKeySpec Class

This abstract class (which implements the KeySpec Interface) represents a public or private key in encoded format. Its getEncoded method returns the encoded key:
    public abstract byte[] getEncoded();
and its getFormat method returns the name of the encoding format:
    public abstract String getFormat();

The Java 2 SDK supplies two classes implementing the EncodedKeySpec interface: PKCS8EncodedKeySpec and X509EncodedKeySpec. If desired, you can supply your own EncodedKeySpec implementations for those or other types of key encodings.

The PKCS8EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a private key, according to the format specified in the PKCS #8 standard.

Its getEncoded method returns the key bytes, encoded according to the PKCS #8 standard. Its getFormat method returns the string "PKCS#8".

The X509EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a public or private key, according to the format specified in the X.509 standard.

Its getEncoded method returns the key bytes, encoded according to the X.509 standard. Its getFormat method returns the string "X.509".

Adding New Object Identifiers

The following information applies to providers who supply an algorithm that is not listed as one of the standard algorithms in Appendix A of the Java Cryptography Architecture API Specification & Reference.

Mapping from OID to Name

Sometimes the JCA needs to instantiate a cryptographic algorithm implementation from an algorithm identifier (for example, as encoded in a certificate), which by definition includes the object identifier (OID) of the algorithm. For example, in order to verify the signature on an X.509 certificate, the JCA determines the signature algorithm from the signature algorithm identifier that is encoded in the certificate, instantiates a Signature object for that algorithm, and initializes it for verification.

In order for this to work, you must provide the object identifier of your algorithm as an alias entry for your algorithm in your provider master file, in order for the JCA to be able to find your algorithm.

For example, if your provider implementation resides in the "com.xyz" package, and your algorithm is of type and is named "MyAlg" with the object identifier (in string notation) "1.2.3.4.5.6.7.8", your provider master file should have the following entries:

    put(".MyAlg", "com.xyz.MyAlg");
    put("Alg.Alias..1.2.3.4.5.6.7.8", "MyAlg");
If your algorithm is known under more than one object identifier, you need to create an alias entry for each object identifier under which it is known.

An example of where the JCA needs to perform this type of mapping is when your algorithm is a signature algorithm and users run the keytool -genkey command and specify your (signature) algorithm with the -sigalg option. In this case, your provider master file should contain the following entries:

    put("Signature.MyAlg", "com.xyz.MyAlg");
    put("Alg.Alias.Signature.1.2.3.4.5.6.7.8", "MyAlg");
Other examples of where this type of mapping is performed are (1) when your algorithm is a keytype algorithm and your program parses a certificate (using the X.509 implementation of the SUN provider) and extracts the public key from the certificate in order to initialize a Signature object for verification, and (2) when keytool users try to access a private key of your keytype (for example, to perform a digital signature) after having generated the corresponding keypair. In these cases, your provider master file should contain the following entries:
    put("KeyFactory.MyAlg", "com.xyz.MyAlg");
    put("Alg.Alias.KeyFactory.1.2.3.4.5.6.7.8", "MyAlg");

Mapping from Name to OID

If the JCA needs to perform the inverse mapping (that is, from your algorithm name to its associated OID), you need to provide an alias entry of the following form for one of the OIDs under which your algorithm should be known:
    put("Alg.Alias.Signature.OID.1.2.3.4.5.6.7.8", "MySigAlg");
If your algorithm is known under more than one object identifier, prefix the preferred one with "OID.".

An example of where the JCA needs to perform this kind of mapping is when users run keytool in any mode that takes a -sigalg option. For example, when the -genkey and -certreq commands are invoked, the user can specify your (signature) algorithm with the -sigalg option.

Appendix A: The "SUN" Provider's Master Class

Below is a copy of the Sun.java file, which contains a class named Sun that is the master class for the provider named "SUN". (This provider is supplied with every SDK installation.)

As with all master classes, this class is a subclass of Provider. It specifies the class names and package locations of all the cryptographic service implementations supplied by the "SUN" provider. Java 2 Security uses this information to look up the various algorithms and other services when they are requested.

This code is supplied as an example of a master class.

/*
 * @(#)Sun.java	1.28 99/05/27
 *
 * Copyright 1996-1998 by Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

package sun.security.provider;

import java.io.*;
import java.util.*;
import java.security.*;

/**
 * The SUN Security Provider.
 *
 * @author Benjamin Renaud
 *
 * @version 1.28, 05/27/99
 */

/**
 * Defines the SUN provider.
 *
 * Algorithms supported, and their names:
 *
 * - SHA is the message digest scheme described in FIPS 180-1.
 *   Aliases for SHA are SHA-1 and SHA1.
 *
 * - SHA1withDSA is the signature scheme described in FIPS 186.
 *   (SHA used in DSA is SHA-1: FIPS 186 with Change No 1.)
 *   Aliases for SHA1withDSA are DSA, DSS, SHA/DSA, SHA-1/DSA, SHA1/DSA,
 *   SHAwithDSA, DSAWithSHA1, and the object
 *   identifier strings "OID.1.3.14.3.2.13", "OID.1.3.14.3.2.27" and
 *   "OID.1.2.840.10040.4.3".
 *
 * - DSA is the key generation scheme as described in FIPS 186.
 *   Aliases for DSA include the OID strings "OID.1.3.14.3.2.12"
 *   and "OID.1.2.840.10040.4.1".
 *
 * - MD5 is the message digest scheme described in RFC 1321.
 *   There are no aliases for MD5.
 */

public final class Sun extends Provider {

    private static final String INFO = "SUN " +
    "(DSA key/parameter generation; DSA signing; " +
    "SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore)";

    public Sun() {
    /* We are the SUN provider */
    super("SUN", 1.2, INFO);

    AccessController.doPrivileged(new java.security.PrivilegedAction() {
        public Object run() {

            /*
             * Signature engines
             */
            put("Signature.SHA1withDSA", "sun.security.provider.DSA");

            put("Alg.Alias.Signature.DSA", "SHA1withDSA");
            put("Alg.Alias.Signature.DSS", "SHA1withDSA");
            put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
            put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
            put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
            put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
            put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
            put("Alg.Alias.Signature.OID.1.2.840.10040.4.3",
            "SHA1withDSA");
            put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
            put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
            put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");

            /*
             *  Key Pair Generator engines
             */
                put("KeyPairGenerator.DSA",
                "sun.security.provider.DSAKeyPairGenerator");
                put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
                put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
                put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");

            /*
             * Digest engines
             */
            put("MessageDigest.MD5", "sun.security.provider.MD5");
            put("MessageDigest.SHA", "sun.security.provider.SHA");

            put("Alg.Alias.MessageDigest.SHA-1", "SHA");
            put("Alg.Alias.MessageDigest.SHA1", "SHA");

        /*
         * Algorithm Parameter Generator engines
         */
        put("AlgorithmParameterGenerator.DSA",
            "sun.security.provider.DSAParameterGenerator");

        /*
         * Algorithm Parameter engines
         */
        put("AlgorithmParameters.DSA",
            "sun.security.provider.DSAParameters");
        put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.12", "DSA");
        put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1", "DSA");

            /*
             * Key factories
             */
            put("KeyFactory.DSA", "sun.security.provider.DSAKeyFactory");
                put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
                put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");

            /*
             * SecureRandom
             */
             put("SecureRandom.SHA1PRNG",
             "sun.security.provider.SecureRandom");

        /*
         * Certificates
         */
        put("CertificateFactory.X509",
            "sun.security.provider.X509Factory");
        put("Alg.Alias.CertificateFactory.X.509", "X509");

        /*
         * KeyStore
         */
        put("KeyStore.JKS", "sun.security.provider.JavaKeyStore");

        /*
         * KeySize
         */
        put("Signature.SHA1withDSA KeySize", "1024");
        put("KeyPairGenerator.DSA KeySize", "1024");
        put("AlgorithmParameterGenerator.DSA KeySize", "1024");

        /*
         * Implementation type: software or hardware
         */
        put("Signature.SHA1withDSA ImplementedIn", "Software");
        put("KeyPairGenerator.DSA ImplementedIn", "Software");
        put("MessageDigest.MD5 ImplementedIn", "Software");
        put("MessageDigest.SHA ImplementedIn", "Software");
        put("AlgorithmParameterGenerator.DSA ImplementedIn",
            "Software");
        put("AlgorithmParameters.DSA ImplementedIn", "Software");
        put("KeyFactory.DSA ImplementedIn", "Software");
        put("SecureRandom.SHA1PRNG ImplementedIn", "Software");
        put("CertificateFactory.X509 ImplementedIn", "Software");
        put("KeyStore.JKS ImplementedIn", "Software");

        return null;
        }
    });
    }
}

Appendix B: The java.security Properties File

Below is a copy of the java.security file that appears in every SDK installation. This file appears in the lib/security (lib\security on Windows) directory of the SDK. Thus, if the JDK is installed in a directory called j2sdk1.2, the file would be

  • j2sdk1.2/lib/security/java.security (Solaris)

  • j2sdk1.2\lib\security\java.security (Windows)
See Step 5 for an example of adding information about your provider to this file.
#
# This is the "master security properties file".
#
# In this file, various security properties are set for use by
# java.security classes. This is where users can statically register
# Cryptographic Service Providers ("providers" for short). The term
# "provider" refers to a package or set of packages that supply a
# concrete implementation of a subset of the cryptography aspects of
# the Java Security API. A provider may, for example, implement one or
# more digital signature algorithms or message digest algorithms.
#
# Each provider must implement a subclass of the Provider class.
# To register a provider in this master security properties file,
# specify the Provider subclass name and priority in the format
#
#    security.provider.n=className
#
# This declares a provider, and specifies its preference
# order n. The preference order is the order in which providers are
# searched for requested algorithms (when no specific provider is
# requested). The order is 1-based; 1 is the most preferred, followed
# by 2, and so on.
#
# className must specify the subclass of the Provider class whose
# constructor sets the values of various properties that are required
# for the Java Security API to look up the algorithms or other
# facilities implemented by the provider.
#
# There must be at least one provider specification in java.security.
# There is a default provider that comes standard with the SDK. It
# is called the "SUN" provider, and its Provider subclass
# named Sun appears in the sun.security.provider package. Thus, the
# "SUN" provider is registered via the following:
#
#    security.provider.1=sun.security.provider.Sun
#
# (The number 1 is used for the default provider.)
#
# Note: Statically registered Provider subclasses are instantiated
# when the system is initialized. Providers can be dynamically
# registered instead by calls to either the addProvider or
# insertProviderAt method in the Security class.

#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun

#
# Class to instantiate as the system Policy. This is the name of the class
# that will be used as the Policy object.
#
policy.provider=sun.security.provider.PolicyFile

# The default is to have a single system-wide policy file,
# and a policy file in the user's home directory.
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

# whether or not we expand properties in the policy file
# if this is set to false, properties (${...}) will not be expanded in policy
# files.
policy.expandProperties=true

# whether or not we allow an extra policy to be passed on the command line
# with -Djava.security.policy=somefile. Comment out this line to disable
# this feature.
policy.allowSystemProperty=true

# whether or not we look into the IdentityScope for trusted Identities
# when encountering a 1.1 signed JAR file. If the identity is found
# and is trusted, we grant it AllPermission.
policy.ignoreIdentityScope=false

#
# Default keystore type.
#
keystore.type=jks

#
# Class to instantiate as the system scope:
#
system.scope=sun.security.provider.IdentityDatabase

#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.

#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the SDK call checkPackageDefinition.
#
#package.definition=

Copyright © 1996-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


Java Cryptography Architecture

JavaTM Cryptography Architecture

API Specification & Reference

Last Modified: 6 Dec 1999

Introduction
Design Principles
Architecture
Concepts

Core Classes and Interfaces
The Provider Class
How Provider Implementations are Requested and Supplied
Installing Providers
The Security Class
The MessageDigest Class
The Signature Class
Algorithm Parameters Classes
Algorithm Parameter Specification Interfaces and Classes
The AlgorithmParameterSpec Interface
The DSAParameterSpec Class
The AlgorithmParameters Class
The AlgorithmParameterGenerator Class
Key Interfaces
Key Specification Interfaces and Classes
The KeySpec Interface
The DSAPrivateKeySpec Class
The DSAPublicKeySpec Class
The RSAPrivateKeySpec Class
The RSAPrivateCrtKeySpec Class
The RSAPublicKeySpec Class
The EncodedKeySpec Class
The PKCS8EncodedKeySpec Class
The X509EncodedKeySpec Class
The KeyFactory Class
The CertificateFactory Class
The KeyPair Class
The KeyPairGenerator Class
Key Management
Keystore Location
Keystore Implementation
The KeyStore Class
The SecureRandom Class

Code Examples
Computing a MessageDigest Object
Generating a Pair of Keys
Generating and Verifying a Signature Using Generated Keys
Generating/Verifying Signatures Using Key Specifications and KeyFactory
Reading Base64-Encoded Certificates
Parsing a Certificate Reply

Appendix A: Standard Names

Appendix B: Algorithms

Introduction

The JDK Security API is a core API of the Java programming language, built around the java.security package (and its subpackages). This API is designed to allow developers to incorporate both low-level and high-level security functionality into their programs.

The first release of JDK Security in JDK 1.1 introduced the "Java Cryptography Architecture" (JCA), which refers to a framework for accessing and developing cryptographic functionality for the Java platform. In JDK 1.1, the JCA included APIs for digital signatures and message digests.

Java 2 SDK significantly extends the Java Cryptography Architecture, as described in this document. It also upgrades the certificate management infrastructure to support X.509 v3 certificates, and introduces a new Java Security Architecture for fine-grain, highly configurable, flexible, and extensible access control.

The Java Cryptography Architecture encompasses the parts of the Java 2 SDK Security API related to cryptography, as well as a set of conventions and specifications provided in this document. It includes a "provider" architecture that allows for multiple and interoperable cryptography implementations.

The Java Cryptography Extension (JCE) extends the JCA API to include APIs for encryption, key exchange, and Message Authentication Code (MAC). Together, the JCE and the cryptography aspects of the SDK provide a complete, platform-independent cryptography API. The JCE is released separately as an extension to the SDK, in accordance with U.S. export control regulations.

This document is both a high-level description and a specification of the Java Cryptography Architecture API and its default provider, as shipped in the Java 2 SDK. A separate document describing the JCE API is provided with the JCE release. See the "Java Security Architecture Specification" for information about the Java Security Architecture aspects of the Security API.

Note: The most recent version of this JCA specification can be found on our public Web site at http://java.sun.com/j2se/sdk/1.3/docs/guide/security/CryptoSpec.html.

Design Principles

The Java Cryptography Architecture (JCA) was designed around these principles:

  • implementation independence and interoperability

  • algorithm independence and extensibility

Implementation independence and algorithm independence are complementary: their aim is to let users of the API utilize cryptographic concepts, such as digital signatures and message digests, without concern for the implementations or even the algorithms being used to implement these concepts. When complete algorithm-independence is not possible, the JCA provides developers with standardized algorithm-specific APIs. When implementation-independence is not desirable, the JCA lets developers indicate the specific implementations they require.

Algorithm independence is achieved by defining types of cryptographic "engines" (services), and defining classes that provide the functionality of these cryptographic engines. These classes are called engine classes, and examples are the MessageDigest, Signature, and KeyFactory classes.

Implementation independence is achieved using a "provider"-based architecture. The term Cryptographic Service Provider (used interchangeably with "provider" in this document) refers to a package or set of packages that implement one or more cryptographic services, such as digital signature algorithms, message digest algorithms, and key conversion services. A program may simply request a particular type of object (such as a Signature object) implementing a particular service (such as the DSA signature algorithm) and get an implementation from one of the installed providers. If desired, a program may instead request an implementation from a specific provider. Providers may be updated transparently to the application, for example when faster or more secure versions are available.

Implementation interoperability means that various implementations can work with each other, use each other's keys, or verify each other's signatures. This would mean, for example, that for the same algorithms, a key generated by one provider would be usable by another, and a signature generated by one provider would be verifiable by another.

Algorithm extensibility means that new algorithms that fit in one of the supported engine classes can easily be added.

Architecture

Cryptographic Service Providers

The Java Cryptography Architecture introduces the notion of a Cryptographic Service Provider (used interchangeably with "provider" in this document). This term refers to a package (or a set of packages) that supply a concrete implementation of a subset of the cryptography aspects of the Security API.

In JDK 1.1 a provider could, for example, contain an implementation of one or more digital signature algorithms, message digest algorithms, and key generation algorithms. Java 2 SDK adds five additional types of services: key factories, keystore creation and management, algorithm parameter management, algorithm parameter generation, and certificate factories. It also enables a provider to supply a random number generation (RNG) algorithm. Previously, RNGs were not provider-based; a particular algorithm was hard-coded in the JDK.

As previously noted, a program may simply request a particular type of object (such as a Signature object) for a particular service (such as the DSA signature algorithm) and get an implementation from one of the installed providers. Alternatively, the program can request a specific provider. (Each provider has a name used to refer to it.)

Sun's version of the Java runtime environment comes standard with a default provider, named "SUN". Other Java runtime environments may not necessarily supply the "SUN" provider. The "SUN" provider package includes:

  • An implementation of the Digital Signature Algorithm (DSA), described in NIST FIPS 186.

  • An implementation of the MD5 (RFC 1321) and SHA-1 (NIST FIPS 180-1) message digest algorithms.

  • A DSA key pair generator for generating a pair of public and private keys suitable for the DSA algorithm.

  • A DSA algorithm parameter generator.

  • A DSA algorithm parameter manager.

  • A DSA "key factory" providing bi-directional conversions between (opaque) DSA private and public key objects and their underlying key material.

  • An implementation of the proprietary "SHA1PRNG" pseudo-random number generation algorithm, following the recommendations in the IEEE P1363 standard (Appendix G.7).

  • A "certificate factory" for X.509 certificates and Certificate Revocation Lists (CRLs).

  • A keystore implementation for the proprietary keystore type named "JKS".

Each SDK installation has one or more provider packages installed. New providers may be added statically or dynamically (see the Provider and Security classes). The Java Cryptography Architecture offers a set of APIs that allow users to query which providers are installed and what services they support.

Clients may configure their runtime with different providers, and specify a preference order for each of them. The preference order is the order in which providers are searched for requested services when no specific provider is requested.

Key Management

A database called a "keystore" can be used to manage a repository of keys and certificates.

A keystore is available to applications that need it for authentication or signing purposes.

Applications can access a keystore via an implementation of the KeyStore class, which is in the java.security package. A default KeyStore implementation is provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS",

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class.

See the Key Management section for more information.

Concepts

This section covers the major concepts introduced in the API.

Engine Classes and Algorithms

An "engine class" defines a cryptographic service in an abstract fashion (without a concrete implementation).

A cryptographic service is always associated with a particular algorithm or type, and it either provides cryptographic operations (like those for digital signatures or message digests), generates or supplies the cryptographic material (keys or parameters) required for cryptographic operations, or generates data objects (keystores or certificates) that encapsulate cryptographic keys (which can be used in a cryptographic operation) in a secure fashion. For example, two of the engine classes are the Signature and KeyFactory classes. The Signature class provides access to the functionality of a digital signature algorithm. A DSA KeyFactory supplies a DSA private or public key (from its encoding or transparent specification) in a format usable by the initSign or initVerify methods, respectively, of a DSA Signature object.

The Java Cryptography Architecture encompasses the classes of the Java 2 SDK Security package related to cryptography, including the engine classes. Users of the API request and utilize instances of the engine classes to carry out corresponding operations. The following engine classes are defined in Java 2 SDK:

  • MessageDigest - used to calculate the message digest (hash) of specified data.

  • Signature - used to sign data and verify digital signatures.

  • KeyPairGenerator - used to generate a pair of public and private keys suitable for a specified algorithm.

  • KeyFactory - used to convert opaque cryptographic keys of type Key into key specifications (transparent representations of the underlying key material), and vice versa.

  • CertificateFactory - used to create public key certificates and Certificate Revocation Lists (CRLs).

  • KeyStore - used to create and manage a keystore.A keystore is a database of keys. Private keys in a keystore have a certificate chain associated with them, which authenticates the corresponding public key. A keystore also contains certificates from trusted entities.

  • AlgorithmParameters - used to manage the parameters for a particular algorithm, including parameter encoding and decoding.

  • AlgorithmParameterGenerator - used to generate a set of parameters suitable for a specified algorithm.

  • SecureRandom - used to generate random or pseudo-random numbers.

Note: A "generator" creates objects with brand-new contents, whereas a "factory" creates objects from existing material (for example, an encoding).

An engine class provides the interface to the functionality of a specific type of cryptographic service (independent of a particular cryptographic algorithm). It defines "Application Programming Interface" (API) methods that allow applications to access the specific type of cryptographic service it provides. The actual implementations (from one or more providers) are those for specific algorithms. The Signature engine class, for example, provides access to the functionality of a digital signature algorithm. The actual implementation supplied in a SignatureSpi subclass (see next paragraph) would be that for a specific kind of signature algorithm, such as SHA1 with DSA, SHA1 with RSA, or MD5 with RSA.

The application interfaces supplied by an engine class are implemented in terms of a "Service Provider Interface" (SPI). That is, for each engine class, there is a corresponding abstract SPI class, which defines the Service Provider Interface methods that cryptographic service providers must implement.

An instance of an engine class, the "API object", encapsulates (as a private field) an instance of the corresponding SPI class, the "SPI object". All API methods of an API object are declared "final", and their implementations invoke the corresponding SPI methods of the encapsulated SPI object. An instance of an engine class (and of its corresponding SPI class) is created by a call to the getInstance factory method of the engine class.

The name of each SPI class is the same as that of the corresponding engine class, followed by "Spi". For example, the SPI class corresponding to the Signature engine class is the SignatureSpi class.

Each SPI class is abstract. To supply the implementation of a particular type of service, for a specific algorithm, a provider must subclass the corresponding SPI class and provide implementations for all the abstract methods.

Another example of an engine class is the MessageDigest class, which provides access to a message digest algorithm. Its implementations, in MessageDigestSpi subclasses, may be those of various message digest algorithms such as SHA-1, MD5, or MD2.

As a final example, the KeyFactory engine class supports the conversion from opaque keys to transparent key specifications, and vice versa. (See the Key Specification Interfaces and Classes section.) The actual implementation supplied in a KeyFactorySpi subclass would be that for a specific type of keys, e.g., DSA public and private keys.

Implementations and Providers

Implementations for various cryptographic services are provided by JCA Cryptographic Service Providers. Cryptographic service providers are essentially packages that supply one or more cryptographic service implementations. For example, the Java Development Kit's default provider, named "SUN", supplies implementations of the DSA signature algorithm, the MD5 and SHA-1 message digest algorithms, the DSA key pair generation algorithm, and the SHA1PRNG pseudo-random number generation algorithm. It also supplies a key factory for DSA private and public keys, a certificate factory for X.509 certificates and CRLs, an implementation of DSA parameters (including their generation), and a keystore implementation of the proprietary keystore type named "JKS".

Other providers may define their own implementations of these services or of other services, such as one of the RSA-based signature algorithms or the MD2 message digest algorithm.

Factory Methods to Obtain Implementation Instances

For each engine class in the API, a particular implementation is requested and instantiated by calling a factory method on the engine class. A factory method is a static method that returns an instance of a class.

The basic mechanism for obtaining an appropriate Signature object, for example, is as follows: A user requests such an object by calling the getInstance method in the Signature class, specifying the name of a signature algorithm (such as "SHA1withDSA"), and, optionally, the name of the provider whose implementation is desired. The getInstance method finds an implementation that satisfies the supplied algorithm and provider parameters. If no provider is specified, getInstance searches the registered providers, in preference order, for one with an implementation of the specified algorithm. See The Provider Class for more information about registering providers.

Core Classes and Interfaces

This section provides a discussion of the core classes and interfaces provided in the Java Cryptography Architecture:

  • the Provider and Security classes

  • the MessageDigest, Signature, KeyPairGenerator, KeyFactory, AlgorithmParameters, AlgorithmParameterGenerator, CertificateFactory, KeyStore, and SecureRandom engine classes

  • the Key interfaces and classes

  • the Algorithm Parameter Specification Interfaces and Classes and the Key Specification Interfaces and Classes

This section shows the signatures of the main methods in each class and interface. Usage examples for some of these classes (MessageDigest, Signature, KeyPairGenerator, SecureRandom, KeyFactory, and key specification classes) are supplied in the corresponding Examples sections. The complete reference documentation for the relevant Security API packages can be found in:

  • java.security package summary
  • java.security.spec package summary
  • java.security.interfaces package summary

The Provider Class

The term "Cryptographic Service Provider" (used interchangeably with "provider" in this document) is used to refer to a package or set of packages that supply a concrete implementation of a subset of the cryptography aspects of the Java 2 SDK Security API. The Provider class is the interface to such a package or set of packages. It has methods for accessing the provider name, version number, and other information. Please note that in addition to registering implementations of cryptographic services, the Provider class can also be used to register implementations of other security services that might get defined as part of the Java 2 SDK Security API or one of its extensions.

To actually supply implementations of cryptographic services, an entity (e.g., a development group) writes the implementation code and creates a subclass of the Provider class. The constructor of the subclass sets the values of various properties that are required for the Java 2 SDK Security API to look up the services implemented by the provider. That is, it specifies the names of the classes implementing the services.

There are several types of services that can be implemented by provider packages - see Engine Classes and Algorithms.

The different implementations may have different characteristics. Some may be software-based, while others may be hardware-based. Some may be platform-independent, while others may be platform-specific. Some provider source code may be available for review and evaluation, while some may not.

The Java Cryptography Architecture (JCA) lets both end-users and developers decide what their needs are. In this section we explain how end-users install the cryptography implementations that fit their needs, and how developers request the implementations that fit theirs.

(Note: For information about implementing a provider, see How To Implement a Provider for the Java Cryptography Architecture.)

How Provider Implementations Are Requested and Supplied

For each engine class in the API, a particular implementation is requested and instantiated by calling a getInstance method on the engine class, specifying the name of the desired algorithm and, optionally, the name of the provider whose implementation is desired.

If no provider is specified, getInstance searches the registered providers for an implementation of the requested cryptographic service associated with the named algorithm. In any given Java Virtual Machine (JVM), providers are installed in a given preference order . That order is the order in which they are searched when no specific provider is requested. For example, suppose there are two providers installed in a JVM, one named "PROVIDER_1" and the other "PROVIDER_2". Further suppose that

  • PROVIDER_1 implements SHA1withDSA, SHA, MD5, DES, and DES3

  • PROVIDER_2 implements SHA1withDSA, MD5withRSA, MD2withRSA, MD2, MD5, RC4, RC5, DES, and RSA

If PROVIDER_1 has preference order 1 (the highest priority) and PROVIDER_2 has preference order 2, then the following behavior will occur:

  • Suppose we are looking for an MD5 implementation. Both providers supply such an implementation. The PROVIDER_1 implementation is returned since PROVIDER_1 has the highest priority and thus is searched first.

  • If we are looking for an MD5withRSA signature algorithm, PROVIDER_1 is first searched for it. No implementation is found, so PROVIDER_2 is searched. Since an implementation is found, it is returned.

  • Suppose we are looking for a SHA1withRSA signature algorithm. Since no installed provider implements it, a NoSuchAlgorithmException is raised.

The getInstance methods that include a provider argument are for developers who want to specify which provider they want an algorithm from. A federal agency, for example, will want to use a provider implementation that has received federal certification. Let's assume that the SHA1withDSA implementation from PROVIDER_1 has not received such certification, while the DSA implementation of PROVIDER_2 has received it.

A Federal program would then have the following call, specifying PROVIDER_2 since it has the certified implementation:

    Signature dsa = Signature.getInstance("SHA1withDSA", "PROVIDER_2");

In this case, if "PROVIDER_2" was not installed, a NoSuchProviderException would be raised, even if a different installed provider implements the algorithm requested.

A program also has the option of getting a list of all the installed Providers (using the getProviders method in the Security class), and choosing one from the list.

Installing Providers

There are two parts to installing a provider: installing the provider package classes, and configuring the provider.

Installing the Provider Classes

There are a couple possible ways of installing the provider classes:

  • Place a zip or JAR file containing the classes anywhere on your CLASSPATH.

  • Supply your provider JAR file as an "installed" or "bundled" extension. For more information on how to deploy an extension, see How is an extension deployed?.

Configuring the Provider

The next step is to add the provider to your list of approved providers. This is done statically by editing the java.security file in the lib/security directory of the SDK. Thus, if the SDK is installed in a directory called j2sdk1.2, the file would be j2sdk1.2/lib/security/java.security. One of the types of properties you can set in java.security is of the following form:

    security.provider.n=masterClassName

This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). The order is 1-based; 1 is the most preferred, followed by 2, and so on.

masterClassName must specify the provider's "master" class. The provider's documentation will specify its master class. This class is always a subclass of the Provider class. The subclass constructor sets the values of various properties that are required for the Java Cryptography API to look up the algorithms or other facilities implemented by the provider.

Suppose that the master class is COM.acme.provider.Acme, and that you would like to configure Acme as your third preferred provider. To do so, add the following line to the java.security file:

    security.provider.3=COM.acme.provider.Acme
Providers may also be registered dynamically. To do so, call either the addProvider or insertProviderAt method in the Security class. This type of registration is not persistent and can only be done by "trusted" programs. See Security.

Provider Class Methods

Each Provider class instance has a (currently case-sensitive) name, a version number, and a string description of the provider and its services. You can query the Provider instance for this information by calling the following methods:

    public String getName()
    public double getVersion()
    public String getInfo()

The Security Class

The Security class manages installed providers and security-wide properties. It only contains static methods and is never instantiated.

Note: the methods for adding or removing providers, and for setting Security properties, can only be executed by a trusted program. Currently, a "trusted program" is either

  • a local application not running under a security manager, or

  • an applet or application with permission to execute the specified method (see below).
The determination that code is considered trusted to perform an attempted action (such as adding a provider) requires that the applet is granted permission for that particular action.

For example, in the default Policy implementation, the policy configuration file(s) for a SDK installation specify what permissions (which types of system resource accesses) are allowed by code from specified code sources. (See below and the "Default Policy Implementation and Policy File Syntax" and "Java Security Architecture Specification" files for more information.)

Code being executed is always considered to come from a particular "code source". The code source includes not only the location (URL) where the applet originated from, but also a reference to the public key(s) corresponding to the private key(s) used to sign the code. Public keys in a code source are referenced by (symbolic) alias names from the user's keystore .

In a policy configuration file, a code source is represented by two components: a code base (URL), and an alias name (preceded by "signedBy"), where the alias name identifies the keystore entry containing the public key that must be used to verify the code's signature.

Each "grant" statement in such a file grants a specified code source a set of permissions, specifying which actions are allowed.

The contents of a sample policy configuration file appear below.

  grant signedBy "sysadmin", codeBase "file:/home/sysadmin/" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
    permission java.security.SecurityPermission "Security.setProperty.*";
  };
This specifies that only code that was loaded from a signed JAR file (whose signature can be verified using the public key referenced by the alias name "sysadmin" in the user's keystore) from beneath the "/home/sysadmin/" directory on the local file system can call methods in the Security class to add or remove providers or to set Security properties.

Either component of the code source (or both) may be missing. An example where codeBase is missing is:

  grant signedBy "sysadmin" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
};
If this policy is in effect, code that comes in a JAR File signed by "sysadmin" can add/remove providers - regardless of where the JAR File originated from.

An example without a signer is:

  grant codeBase "file:/home/sysadmin/" {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
};
In this case, code that comes from anywhere beneath the "/home/sysadmin/" directory on the local filesystem can add/remove providers. The code does not need to be signed.

An example where neither codeBase nor signedBy is included is:

  grant {
    permission java.security.SecurityPermission "Security.insertProvider.*";
    permission java.security.SecurityPermission "Security.removeProvider.*";
};
Here, with both code source components missing, any code (regardless of where it originated from, or whether or not it is signed, or who signed it) can add/remove providers.

Managing Providers

The Security class may be used to query which Providers are installed, as well as to install new ones at runtime.

Quering Providers

    public Provider[] getProviders()

This method returns an array containing all the installed providers (technically, the Provider subclass for each package provider). The order of the Providers in the array is their preference order.

    public Provider getProvider(String providerName)

This method returns the Provider named providerName. It returns null if the Provider is not found.

Adding Providers

    public static int addProvider(Provider provider) {

This method adds a Provider to the end of the list of installed Providers. It returns the preference position in which the Provider was added, or -1 if the Provider was not added because it was already installed.

    public int insertProviderAt(Provider provider, int position)

This method adds a new Provider, at a specified position. The position is the preference order in which providers are searched for requested algorithms (if no specific provider is requested). The position is 1-based, that is, 1 is most preferred, followed by 2, and so on. If the given provider is installed at the requested position, the provider that used to be at that position, and all providers with a position greater than position, are shifted up one position (towards the end of the list of installed providers).

A Provider cannot be added if it is already installed.

This method returns the actual preference position in which the Provider was added, or -1 if the Provider was not added because it was already installed.

Note: If you want to change the preference position of a provider, you must first remove it, and then insert it back in at the new preference position.

Removing Providers

    public void removeProvider(String name)

This method removes the Provider with the specified name. It returns silently if the Provider is not installed. When the specified provider is removed, all providers located at a position greater than where the specified provider was are shifted down one position (towards the head of the list of installed providers).

Security Properties

The Security class maintains a list of system-wide security properties. These properties are accessible and settable by a trusted program via the following methods:

    public static String getProperty(String key)
    public static void setProperty(String key, String datum)

The MessageDigest Class

The MessageDigest class is an engine class designed to provide the functionality of cryptographically secure message digests such as SHA1 or MD5. A cryptographically secure message digest takes arbitrary-sized input (a byte array), and generates a fixed-size output, called a digest or hash. A digest has the following properties:

  • It should be computationally infeasible to find two messages that hashed to the same value.

  • The digest does not reveal anything about the input that was used to generate it.

Message digests are used to produce unique and reliable identifiers of data. They are sometimes called the "digital fingerprints" of data.

Creating a MessageDigest Object

The first step for computing a digest is to create a message digest instance. As with all engine classes, the way to get a MessageDigest object for a particular type of message digest algorithm is to call the getInstance static factory method on the MessageDigest class:

    public static MessageDigest getInstance(String algorithm)

Note: The algorithm name is case-insensitive. For example, all of the following calls are equivalent:

    MessageDigest.getInstance("SHA")
    MessageDigest.getInstance("sha")
    MessageDigest.getInstance("sHa")

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the algorithm requested is from the named provider:

    public static MessageDigest getInstance(String algorithm, String provider)

A call to getInstance returns an initialized message digest object. It thus does not need further initialization.

Updating a Message Digest Object

The next step for calculating the digest of some data is to supply the data to the initialized message digest object. This is done by making one or more calls to one of the update methods:

    public void update(byte input)
    public void update(byte[] input)
    public void update(byte[] input, int offset, int len)

Computing the Digest

After the data has been supplied by calls to update methods, the digest is computed using a call to one of the digest methods:

    public byte[] digest()
    public byte[] digest(byte[] input)
    public int digest(byte[] buf, int offset, int len)

The first two methods return the computed digest. The latter method stores the computed digest in the provided buffer buf, starting at offset. len is the number of bytes in buf allotted for the digest. The method returns the number of bytes actually stored in buf.

A call to the digest method that takes an input byte array argument is equivalent to making a call to

    public void update(byte[] input)
with the specified input, followed by a call to the digest method without any arguments.

Please see the Examples section for more details.

The Signature Class

The Signature class is an engine class designed to provide the functionality of a cryptographic digital signature algorithm such as DSA or RSA with MD5. A cryptographically secure signature algorithm takes arbitrary-sized input and a private key and generates a relatively short (often fixed-size) string of bytes, called the signature, with the following properties:
  • Given the public key corresponding to the private key used to generate the signature, it should be possible to verify the authenticity and integrity of the input.

  • The signature and the public key do not reveal anything about the private key.

A Signature object can be used to sign data. It can also be used to verify whether or not an alleged signature is in fact the authentic signature of the data associated with it. Please see the Examples section for an example of signing and verifying data.

Signature Object States

Signature objects are modal objects. This means that a Signature object is always in a given state, where it may only do one type of operation. States are represented as final integer constants defined in their respective classes (such as Signature).

The three states a Signature object may have are:

  • UNINITIALIZED

  • SIGN

  • VERIFY
When it is first created, a Signature object is in the UNINITIALIZED state. The Signature class defines two initialization methods, initSign and initVerify, which change the state to SIGN and VERIFY, respectively.

Creating a Signature Object

The first step for signing or verifying a signature is to create a Signature instance. As with all engine classes, the way to get a Signature object for a particular type of signature algorithm is to call the getInstance static factory method on the Signature class:
    public static Signature getInstance(String algorithm)

Note: The algorithm name is case-insensitive.

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the algorithm requested is from the named provider:

    public static Signature getInstance(String algorithm,
                                        String provider)

Initializing a Signature Object

A Signature object must be initialized before it is used. The initialization method depends on whether the object is first going to be used for signing or for verification.

If it is going to be used for signing, the object must first be initialized with the private key of the entity whose signature is going to be generated. This initialization is done by calling the method:

    public final void initSign(PrivateKey privateKey)
This method puts the Signature object in the SIGN state.

If instead the Signature object is going to be used for verification, it must first be initialized with the public key of the entity whose signature is going to be verified. This initialization is done by calling the method:

    public final void initVerify(PublicKey publicKey)

This method puts the Signature object in the VERIFY state.

Signing

If the Signature object has been initialized for signing (if it is in the SIGN state), the data to be signed can then be supplied to the object. This is done by making one or more calls to one of the update methods:

    public final void update(byte b)
    public final void update(byte[] data)
    public final void update(byte[] data, int off, int len)

Calls to the update method(s) should be made until all the data to be signed has been supplied to the Signature object.

To generate the signature, simply call one of the sign methods:

    public final byte[] sign()
    public final int sign(byte[] outbuf, int offset, int len)

The first method returns the signature result in a byte array. The second stores the signature result in the provided buffer outbuf, starting at offset. len is the number of bytes in outbuf allotted for the signature. The method returns the number of bytes actually stored.

The signature is encoded as a standard ASN.1 sequence of two integers, r and s. See Appendix B for more information about the use of ASN.1 encoding in the Java Cryptography Architecture.

A call to a sign method resets the signature object to the state it was in when previously initialized for signing via a call to initSign. That is, the object is reset and available to generate another signature with the same private key, if desired, via new calls to update and sign.

Alternatively, a new call can be made to initSign specifying a different private key, or to initVerify (to initialize the Signature object to verify a signature).

Verifying

If the Signature object has been initialized for verification (if it is in the VERIFY state), it can then verify whether or not an alleged signature is in fact the authentic signature of the data associated with it. To start the process, the data to be verified (as opposed to the signature itself) is supplied to the object. This is done by making one or more calls to one of the update methods:

    public final void update(byte b)
    public final void update(byte[] data)
    public final void update(byte[] data, int off, int len)

Calls to the update method(s) should be made until all the data has been supplied to the Signature object.

The signature can then be verified by calling the verify method:

    public final boolean verify(byte[] encodedSignature)

The argument must be a byte array containing the signature encoded as a standard ASN.1 sequence of two integers, r and s. This is a standard encoding that is frequently utilized. It is the same as that produced by the sign method.

The verify method returns a boolean indicating whether or not the encoded signature is the authentic signature of the data supplied to the update method(s).

A call to the verify method resets the signature object to the state it was in when previously initialized for verification via a call to initVerify. That is, the object is reset and available to verify another signature from the identity whose public key was specified in the call to initVerify.

Alternatively, a new call can be made to initVerify specifying a different public key (to initialize the Signature object for verifying a signature from a different entity), or to initSign (to initialize the Signature object for generating a signature).

Algorithm Parameters Classes

Algorithm Parameter Specification Interfaces and Classes

An algorithm parameter specification is a transparent representation of the sets of parameters used with an algorithm.

A transparent representation of a set of parameters means that you can access each parameter value in the set individually, through one of the "get" methods defined in the corresponding specification class (e.g., DSAParameterSpec defines getP, getQ, and getG methods, to access p, q, and g, respectively).

This is contrasted with an opaque representation, as supplied by the AlgorithmParameters class, in which you have no direct access to the parameter fields; you can only get the name of the algorithm associated with the parameter set (via getAlgorithm) and some kind of encoding for the parameter set (via getEncoded).

The algorithm parameter specification interfaces and classes that appear in the java.security.spec package are described below.

The AlgorithmParameterSpec Interface

AlgorithmParameterSpec is an interface to a transparent specification of cryptographic parameters.

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all parameter specifications. All parameter specifications must implement this interface.

The DSAParameterSpec Class

This class (which implements the AlgorithmParameterSpec interface) specifies the set of parameters used with the DSA algorithm. It has the following methods:
    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the DSA algorithm parameters: the prime p, the sub-prime q, and the base g.

The AlgorithmParameters Class

The AlgorithmParameters class is an engine class that provides an opaque representation of cryptographic parameters.

An opaque representation is one in which you have no direct access to the parameter fields; you can only get the name of the algorithm associated with the parameter set and some kind of encoding for the parameter set. This is in contrast to a transparent representation of parameters, in which you can access each value individually, through one of the "get" methods defined in the corresponding specification class. Note: you can call the AlgorithmParameters getParameterSpec method to convert an AlgorithmParameters object to a transparent specification (see below).

Creating an AlgorithmParameters Object

As with all engine classes, the way to get an AlgorithmParameters object for a particular type of algorithm is to call the getInstance static factory method on the AlgorithmParameters class:

    public static AlgorithmParameters getInstance(String algorithm)

Note: The algorithm name is case-insensitive.

A caller may optionally specify the name of a provider, which will guarantee that the algorithm parameter implementation requested is from the named provider:

    public static AlgorithmParameters getInstance(String algorithm, String provider)

Initializing an AlgorithmParameters Object

Once an AlgorithmParameters object is instantiated, it must be initialized via a call to init, using an appropriate parameter specification or parameter encoding:

    public void init(AlgorithmParameterSpec paramSpec)

    public void init(byte[] params)

    public void init(byte[] params, String format)
In the above, params is an array containing the encoded parameters, and format is the name of the decoding format. In the init method with a params argument but no format argument, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for the parameters exists.

Note: AlgorithmParameters objects can be initialized only once, that is, they are not reusable.

Obtaining the Encoded Parameters

A byte encoding of the parameters represented in an AlgorithmParameters object may be obtained via a call to getEncoded:

    public byte[] getEncoded()

This returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

If you want the parameters returned in a specified encoding format, use

    public byte[] getEncoded(String format)
If format is null, the primary encoding format for parameters is used, as in the other getEncoded method.

Please note: in the default AlgorithmParameters implementation, supplied by the "SUN" provider, the format argument is currently ignored.

Converting an AlgorithmParameters Object to a Transparent Specification

A transparent parameter specification for the algorithm parameters may be obtained from an AlgorithmParameters object via a call to getParameterSpec:

    public AlgorithmParameterSpec getParameterSpec(Class paramSpec)
paramSpec identifies the specification class in which the parameters should be returned. It could, for example, be DSAParameterSpec.class, to indicate that the parameters should be returned in an instance of the DSAParameterSpec class (which is in the java.security.spec package).

The AlgorithmParameterGenerator Class

The AlgorithmParameterGenerator class is an engine class used to generate a set of parameters suitable for a certain algorithm (the algorithm specified when an AlgorithmParameterGenerator instance is created).

Creating an AlgorithmParameterGenerator Object

As with all engine classes, the way to get an AlgorithmParameterGenerator object for a particular type of algorithm is to call the getInstance static factory method on the AlgorithmParameterGenerator class:

    public static AlgorithmParameterGenerator getInstance(
                        String algorithm)

Note: The algorithm name is case-insensitive.

A caller may optionally specify the name of a provider, which will guarantee that the algorithm parameter generator implementation is from the named provider:

    public static AlgorithmParameterGenerator getInstance(
                       String algorithm,
                       String provider)

Initializing an AlgorithmParameterGenerator Object

The AlgorithmParameterGenerator object can be initialized in two different ways: in an algorithm-independent manner, or in an algorithm-specific manner.

The algorithm-independent approach uses the fact that all parameter generators share the concept of a "size" and a source of randomness. The measure of size is universally shared by all algorithm parameters, though it is interpreted differently for different algorithms. For example, in the case of parameters for the DSA algorithm, "size" corresponds to the size of the prime modulus, in bits. (See Appendix B: Algorithms for information about the sizes for specific algorithms.) When using this approach, algorithm-specific parameter generation values - if any - default to some standard values. There is an init method that takes these two universally shared types of arguments:

    public void init(int size, SecureRandom random);
There is also one that takes just a size argument; it uses a system-provided source of randomness:
    public void init(int size)

The other approach initializes a parameter generator object using algorithm-specific semantics, which are represented by a set of algorithm-specific parameter generation values supplied in an AlgorithmParameterSpec object:

    public void init(AlgorithmParameterSpec genParamSpec,
                   SecureRandom random)

    public void init(AlgorithmParameterSpec genParamSpec)
To generate Diffie-Hellman system parameters, for example, the parameter generation values usually consist of the size of the prime modulus and the size of the random exponent, both specified in number of bits. The Diffie-Hellman algorithm is supplied as part of JCE 1.2.

Generating Algorithm Parameters

Once you have created and initialized an AlgorithmParameterGenerator object, you can generate the algorithm parameters using the generateParameters method:
    public AlgorithmParameters generateParameters()

Key Interfaces

The Key interface is the top-level interface for all opaque keys. It defines the functionality shared by all opaque key objects.

An opaque key representation is one in which you have no direct access to the key material that constitues a key. In other words: "opaque" gives you limited access to the key - just the three methods defined by the "Key" interface (see below): getAlgorithm, getFormat, and getEncoded. This is in contrast to a transparent representation, in which you can access each key material value individually, through one of the "get" methods defined in the corresponding specification class.

All opaque keys have three characteristics:

  • An Algorithm

    This is the key algorithm for that key. The key algorithm is usually an encryption or asymmetric operation algorithm (such as DSA or RSA), which will work with those algorithms and with related algorithms (such as MD5 with RSA, SHA1 with RSA, etc.) The name of the algorithm of a key is obtained using the method

        public String getAlgorithm()

  • An Encoded Form

    This is an external encoded form for the key used when a standard representation of the key is needed outside the Java Virtual Machine, as when transmitting the key to some other party. The key is encoded according to a standard format (such as X.509 or PKCS#8), and is returned using the method:

        public byte[] getEncoded()

  • A Format

    This is the name of the format of the encoded key. It is returned by the method:

        public String getFormat()

Keys are generally obtained through key generators, certificates, key specifications (using a KeyFactory), or a KeyStore implementation accessing a "keystore" database used to manage keys.

It is possible to parse encoded keys, in an algorithm-dependent manner, using a KeyFactory.

It is also possible to parse certificates, using a CertificateFactory.

The PublicKey and PrivateKey Interfaces

The PublicKey and PrivateKey interfaces (which both extend the Key interface) are methodless interfaces, used for type-safety and type-identification.

Key Specification Interfaces and Classes

Key specifications are transparent representations of the key material that constitutes a key. If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

A transparent representation of keys means that you can access each key material value individually, through one of the "get" methods defined in the corresponding specification class. For example, DSAPrivateKeySpec defines getX, getP, getQ, and getG methods, to access the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

This is contrasted with an opaque representation, as defined by the Key interface, in which you have no direct access to the key material fields. In other words, an "opaque" representation gives you limited access to the key - just the three methods defined by the Key interface: getAlgorithm, getFormat, and getEncoded.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec).

The key specification interfaces and classes appear in the java.security.spec package. They are described below.

The KeySpec Interface

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all key specifications. All key specifications must implement this interface.

The DSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA private key with its associated parameters. It has the following methods:
    public BigInteger getX()

    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the private key x, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The DSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies a DSA public key with its associated parameters. It has the following methods:
    public BigInteger getY()

    public BigInteger getP()

    public BigInteger getQ()

    public BigInteger getG()
These methods return the public key y, and the DSA algorithm parameters used to calculate the key: the prime p, the sub-prime q, and the base g.

The RSAPrivateKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA private key. It has the following methods:
    public BigInteger getModulus()

    public BigInteger getPrivateExponent()
These methods return the RSA modulus n and private exponent d values that constitute the RSA private key.

The RSAPrivateCrtKeySpec Class

This class (which extends the RSAPrivateKeySpec class) specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values. It has the following methods (in addition to the methods inherited from its superclass RSAPrivateKeySpec):
    public BigInteger getPublicExponent()

    public BigInteger getPrimeP()

    public BigInteger getPrimeQ()

    public BigInteger getPrimeExponentP()

    public BigInteger getPrimeExponentQ()

    public BigInteger getCrtCoefficient()
These methods return the public exponent e and the CRT information integers: the prime factor p of the modulus n, the prime factor q of n, the exponent d mod (p-1), the exponent d mod (q-1), and the Chinese Remainder Theorem coefficient (inverse of q) mod p.

An RSA private key logically consists of only the modulus and the private exponent. The presence of the CRT values is intended for efficiency.

The RSAPublicKeySpec Class

This class (which implements the KeySpec Interface) specifies an RSA public key. It has the following methods:
    public BigInteger getModulus()

    public BigInteger getPublicExponent()
These methods return the RSA modulus n and public exponent e values that constitute the RSA public key.

The EncodedKeySpec Class

This abstract class (which implements the KeySpec Interface)represents a public or private key in encoded format. Its getEncoded method returns the encoded key:
    public abstract byte[] getEncoded();
and its getFormat method returns the name of the encoding format:
    public abstract String getFormat();

See below for the concrete implementations PKCS8EncodedKeySpec and X509EncodedKeySpec.

The PKCS8EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a private key, according to the format specified in the PKCS #8 standard.

Its getEncoded method returns the key bytes, encoded according to the PKCS #8 standard. Its getFormat method returns the string "PKCS#8".

The X509EncodedKeySpec Class

This class, which is a subclass of EncodedKeySpec, represents the DER encoding of a public key, according to the format specified in the X.509 standard.

Its getEncoded method returns the key bytes, encoded according to the X.509 standard. Its getFormat method returns the string "X.509".

The KeyFactory Class

The KeyFactory class is an engine class designed to provide conversions between opaque cryptographic keys (of type Key) and key specifications (transparent representations of the underlying key material).

Key factories are bi-directional, i.e., they allow you to build an opaque key object from a given key specification (key material), or to retrieve the underlying key material of a key object in a suitable format.

Multiple compatible key specifications may exist for the same key. For example, a DSA public key may be specified by its components y, p, q, and g (see DSAPublicKeySpec), or it may be specified using its DER encoding according to the X.509 standard (see X509EncodedKeySpec).

A key factory can be used to translate between compatible key specifications. Key parsing can be achieved through translation between compatible key specifications, e.g., when you translate from X509EncodedKeySpec to DSAPublicKeySpec, you basically parse the encoded key into its components. For an example, see the end of the Generating/Verifying Signatures Using Key Specifications and KeyFactory section.

Creating a KeyFactory Object

As with all engine classes, the way to get a KeyFactory object for a particular type of key algorithm is to call the getInstance static factory method on the KeyFactory class:

    public static KeyFactory getInstance(String algorithm)

Note: The algorithm name is case-insensitive.

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the key factory requested is from the named provider.

    public static KeyFactory getInstance(String algorithm, String provider)

Converting Between a Key Specification and a Key Object

If you have a key specification for a public key, you can obtain an opaque PublicKey object from the specification by using the generatePublic method:

    public PublicKey generatePublic(KeySpec keySpec)

Similarly, if you have a key specification for a private key, you can obtain an opaque PrivateKey object from the specification by using the generatePrivate method:

    public PrivateKey generatePrivate(KeySpec keySpec)

Converting Between a Key Object and a Key Specification

If you have a Key object, you can get a corresponding key specification object by calling the getKeySpec method:

    public KeySpec getKeySpec(Key key, Class keySpec)
keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.

Please see the Examples section for more details.

The CertificateFactory Class

The CertificateFactory class is an engine class that defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encodings.

A certificate factory for X.509 must return certificates that are an instance of java.security.cert.X509Certificate, and CRLs that are an instance of java.security.cert.X509CRL.

Creating a CertificateFactory Object

As with all engine classes, the way to get a CertificateFactory object for a particular certificate or CRL type is to call the getInstance static factory method on the CertificateFactory class:

    public static CertificateFactory getInstance(String type)

Note: The type name is case-insensitive.

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the certificate factory requested is from the named provider.

    public static CertificateFactory getInstance(String type, String provider)

Generating Certificate Objects

To generate a certificate object and initialize it with the data read from an input stream, use the generateCertificate method:
    public final Certificate generateCertificate(InputStream inStream)
To return a (possibly empty) collection view of the certificates read from a given input stream, use the generateCertificates method:
    public final Collection generateCertificates(InputStream inStream)

Generating CRL Objects

To generate a certificate revocation list (CRL) object and initialize it with the data read from an input stream, use the generateCRL method:
    public final CRL generateCRL(InputStream inStream)
To return a (possibly empty) collection view of the CRLs read from a given input stream, use the generateCRLs method:
    public final Collection generateCRLs(InputStream inStream)

The KeyPair Class

The KeyPair class is a simple holder for a key pair (a public key and a private key). It has two public methods, one for returning the private key, and the other for returning the public key:

    public PrivateKey getPrivate()
    public PublicKey getPublic()

The KeyPairGenerator Class

The KeyPairGenerator class is an engine class used to generate pairs of public and private keys.

There are two ways to generate a key pair: in an algorithm-independent manner, and in an algorithm-specific manner. The only difference between the two is the initialization of the object. Please see the Examples section for examples of calls to the methods documented below.

Creating a KeyPairGenerator

All key pair generation starts with a KeyPairGenerator. This is done using one of the factory methods on KeyPairGenerator:

    public static KeyPairGenerator getInstance(String algorithm)
    public static KeyPairGenerator getInstance(String algorithm,
        String provider)

Note: The algorithm name is case-insensitive.

Initializing a KeyPairGenerator

A key pair generator for a particular algorithm creates a public/private key pair that can be used with this algorithm. It also associates algorithm-specific parameters with each of the generated keys.

A key pair generator needs to be initialized before it can generate keys. In most cases, algorithm-independent initialization is sufficient. But in other cases, algorithm-specific initialization is utilized.

Algorithm-Independent Initialization

All key pair generators share the concepts of a keysize and a source of randomness. The keysize is interpreted differently for different algorithms. For example, in the case of the DSA algorithm, the keysize corresponds to the length of the modulus. (See Appendix B: Algorithms for information about the keysizes for specific algorithms.)

There is an initialize method that takes these two universally shared types of arguments:

    public void initialize(int keysize, SecureRandom random)
There is also one that takes just a keysize argument; it uses a system-provided source of randomness:
    public void initialize(int keysize)

Since no other parameters are specified when you call the above algorithm-independent initialize methods, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with each of the keys.

If the algorithm is a "DSA" algorithm, and the modulus size (keysize) is 512, 768, or 1024, then the "SUN" provider uses a set of precomputed values for the p, q, and g parameters. If the modulus size is not one of the above values, the "SUN" provider creates a new set of parameters. Other providers might have precomputed parameter sets for more than just the three modulus sizes mentioned above. Still others might not have a list of precomputed parameters at all and instead always create new parameter sets.

Algorithm-Specific Initialization

For situations where a set of algorithm-specific parameters already exists (e.g., so-called "community parameters" in DSA), there are two initialize methods that have an AlgorithmParameterSpec argument. One also has a SecureRandom argument, while the source of randomness is system-provided for the other:

    public void initialize(AlgorithmParameterSpec params,
                   SecureRandom random)

    public void initialize(AlgorithmParameterSpec params)

See the Examples section for more details.

Generating a Key Pair

Generating a key pair is always the same, regardless of initialization (and therefore of algorithm). You always call the following method from KeyPairGenerator:

    public KeyPair generateKeyPair()

Multiple calls to generateKeyPair will yield different key pairs.

Key Management

A database called a "keystore" can be used to manage a repository of keys and certificates. (A certificate is a digitally signed statement from one entity, saying that the public key of some other entity has a particular value.)

Keystore Location

The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory. On Windows systems, given user name uName, "user.home" defaults to:

  • C:\Winnt\Profiles\uName on multi-user Windows NT systems
  • C:\Windows\Profiles\uName on multi-user Windows 95 systems
  • C:\Windows on single-user Windows 95 systems

Keystore Implementation

The KeyStore class supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, there are two command-line tools that make use of KeyStore: keytool and jarsigner, and also a GUI-based tool named policytool. It is also used by the default Policy implementation when it processes policy files specifying the permissions (allowed accesses to system resources) to be granted to code from various sources. Since KeyStore is publicly available, SDK users can write additional security applications that use it.

There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java 2 SDK Security API.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture.

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

The default keystore type is "jks" (the proprietary type of the keystore implementation provided by the "SUN" provider). This is specified by the following line in the security properties file:

    keystore.type=jks

To have tools and other applications utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. Another solution would be to let users of your tools and applications specify a keystore type, and pass that value to the getInstance method of KeyStore.

An example of the former approach is the following: If you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to

    keystore.type=pkcs12
Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".

The KeyStore Class

The KeyStore class is an engine class that supplies well-defined interfaces to access and modify the information in a keystore.

This class represents an in-memory collection of keys and certificates. It manages two types of entries:

  • Key Entry

    This type of keystore entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access.

    Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain authenticating the corresponding public key.

    Private keys and certificate chains are used by a given entity for self-authentication using digital signatures. For example, software distribution organizations digitally sign JAR files as part of releasing and/or licensing software.

  • Trusted Certificate Entry

    This type of entry contains a single public key certificate belonging to another party. It is called a trusted certificate because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the subject (owner) of the certificate.

    This type of entry can be used to authenticate other parties.

Each entry in a keystore is identified by an "alias" string. In the case of private keys and their associated certificate chains, these strings distinguish among the different ways in which the entity may authenticate itself. For example, the entity may authenticate itself using different certificate authorities, or using different public key algorithms.

Whether keystores are persistent, and the mechanisms used by the keystore if it is persistent, are not specified here. This allows use of a variety of techniques for protecting sensitive (e.g., private or secret) keys. Smart cards or other integrated cryptographic engines (SafeKeyper) are one option, and simpler mechanisms such as files may also be used (in a variety of formats).

The main KeyStore methods are described below.

Creating a KeyStore Object

As with all engine classes, the way to get a KeyStore object is to call the getInstance static factory method on the KeyStore class:

    public static KeyStore getInstance(String type)

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the type requested is from the named provider:

    public static KeyStore getInstance(String type, String provider)

Loading a Particular Keystore into Memory

Before a KeyStore object can be used, the actual keystore data must be loaded into memory via the load method:
    public final void load(InputStream stream, String password)
The optional password is used to check the integrity of the keystore data. If no password is supplied, no integrity check is performed.

In order to create an empty keystore, you pass null as the InputStream argument to the load method.

Getting a List of the Keystore Aliases

All keystore entries are accessed via unique aliases.

The aliases method returns an enumeration of the alias names in the keystore:

    public final Enumeration aliases()

Determining Keystore Entry Types

As stated in The KeyStore Class, there are two different types of entries in a keystore.

The following methods determine whether the entry specified by the given alias is a key/certificate or a trusted certificate entry, respectively:

    public final boolean isKeyEntry(String alias)

    public final boolean isCertificateEntry(String alias)

Adding/Setting/Deleting Keystore Entries

The setCertificateEntry method assigns a certificate to a specified alias:
    public final void setCertificateEntry(String alias, Certificate cert)
If alias doesn't exist, a trusted certificate entry with that alias is created. If alias exists and identifies a trusted certificate entry, the certificate associated with it is replaced by cert.

The setKeyEntry methods add (if alias doesn't yet exist) or set key entries:

    public final void setKeyEntry(String alias, Key key, String password,
                  Certificate[] chain)

    public final void setKeyEntry(String alias, byte[] key,
                  Certificate[] chain)
In the method with key as a byte array, it is the bytes for a key in protected format. For example, in the keystore implementation supplied by the "SUN" provider, the key byte array is expected to contain a protected private key, encoded as an EncryptedPrivateKeyInfo as defined in the PKCS#8 standard. In the other method, the password is the password used to protect the key.

The deleteEntry method deletes an entry:

    public final void deleteEntry(String alias)

Getting Information from the Keystore

The getKey method returns the key associated with the given alias. The key is recovered using the given password:
    public final Key getKey(String alias, String password)
The following methods return the certificate, or certificate chain, respectively, associated with the given alias:
    public final Certificate getCertificate(String alias)

    public final Certificate[] getCertificateChain(String alias)
You can determine the name (alias) of the first entry whose certificate matches a given certificate via the following:
    public final String getCertificateAlias(Certificate cert)

Saving the KeyStore

The in-memory keystore can be saved via the store method:
    public final void store(OutputStream stream, String password)
The password is used to calculate an integrity checksum of the keystore data, which is appended to the keystore data.

The SecureRandom Class

The SecureRandom class is an engine class that provides the functionality of a random number generator.

Creating a SecureRandom Object

As with all engine classes, the way to get a SecureRandom object is to call the getInstance static factory method on the SecureRandom class:

    public static SecureRandom getInstance(String algorithm)

A caller may optionally specify the name of a provider, which will guarantee that the implementation of the random number generation (RNG) algorithm requested is from the named provider:

    public static final SecureRandom getInstance(String algorithm,
                         String provider)

Seeding or Re-Seeding the SecureRandom Object

The SecureRandom implementation attempts to completely randomize the internal state of the generator itself unless the caller follows the call to a getInstance method with a call to one of the setSeed methods:

    synchronized public void setSeed(byte[] seed)
    public void setSeed(long seed)
Once the SecureRandom object has been seeded, it will produce bits as random as the original seeds.

At any time a SecureRandom object may be re-seeded using one of the setSeed methods. The given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.

Using a SecureRandom Object

To get random bytes, a caller simply passes an array of any length, which is then filled with random bytes:

    synchronized public void nextBytes(byte[] bytes)

Generating Seed Bytes

If desired, it is possible to invoke the generateSeed method to generate a given number of seed bytes (to seed other random number generators, for example):
    public byte[] generateSeed(int numBytes)

Code Examples

Computing a MessageDigest Object

First create the message digest object, as in the following example:

    MessageDigest sha = MessageDigest.getInstance("SHA");

This call assigns a properly initialized message digest object to the sha variable. The implementation implements the Secure Hash Algorithm (SHA), as defined in the National Institute for Standards and Technology's (NIST) FIPS 180-1 document. See Appendix A for a complete discussion of standard names and algorithms.

Next, suppose we have three byte arrays, i1, i2 and i3, which form the total input whose message digest we want to compute. This digest (or "hash") could be calculated via the following calls:

    sha.update(i1);
    sha.update(i2);
    sha.update(i3);
    byte[] hash = sha.digest();

An equivalent alternative series of calls would be:

    sha.update(i1);
    sha.update(i2);
    byte[] hash = sha.digest(i3);

After the message digest has been calculated, the message digest object is automatically reset and ready to receive new data and calculate its digest. All former state (i.e., the data supplied to update calls) is lost.

Some hash implementations may support intermediate hashes through cloning. Suppose we want to calculate separate hashes for:

  • i1
  • i1 and i2
  • i1, i2, and i3

A way to do it is:

    /* compute the hash for i1 */
    sha.update(i1);
    byte[] i1Hash = sha.clone().digest();

    /* compute the hash for i1 and i2 */
    sha.update(i2);
    byte[] i12Hash = sha.clone().digest();

    /* compute the hash for i1, i2 and i3 */
    sha.update(i3);
    byte[] i123hash = sha.digest();

This works only if the SHA implementation is cloneable. While some implementations of message digests are cloneable, others are not. To determine whether or not cloning is possible, attempt to clone the MessageDigest object and catch the potential exception as follows:

try {
   // try and clone it
    /* compute the hash for i1 */
    sha.update(i1);
    byte[] i1Hash = sha.clone().digest();
    . . .
    byte[] i123hash = sha.digest();
} catch (CloneNotSupportedException cnse) {
  // do something else, such as the code shown below
}

If a message digest is not cloneable, the other, less elegant way to compute intermediate digests is to create several digests. In this case, the number of intermediate digests to be computed must be known in advance:

    MessageDigest i1 = MessageDigest.getMessageDigest("SHA");
    MessageDigest i12 = MessageDigest.getMessageDigest("SHA");
    MessageDigest i123 = MessageDigest.getMessageDigest("SHA");

    byte[] i1Hash = i1.digest(i1);

    i12.update(i1);
    byte[] i12Hash = i12.digest(i2);

    i123.update(i1);
    i123.update(i2);
    byte[] i123Hash = i123.digest(i3);

Generating a Pair of Keys

In this example we will generate a public-private key pair for the algorithm named "DSA" (Digital Signature Algorithm). We will generate keys with a 1024-bit modulus, using a user-derived seed, called userSeed. We don't care which provider supplies the algorithm implementation.

Creating the Key Pair Generator

The first step is to get a key pair generator object for generating keys for the DSA algorithm:

    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");

Initializing the Key Pair Generator

The next step is to initialize the key pair generator. In most cases, algorithm-independent initialization is sufficient, but in some cases, algorithm-specific initialization is utilized.
Algorithm-Independent Initialization

All key pair generators share the concepts of a keysize and a source of randomness. A KeyPairGenerator class initialize method has these two types of arguments. Thus, to generate keys with a keysize of 1024 and a new SecureRandom object seeded by the userSeed value, you can use the following code:

    SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
    random.setSeed(userSeed);
    keyGen.initialize(1024, random);

Since no other parameters are specified when you call the above algorithm-independent initialize method, it is up to the provider what to do about the algorithm-specific parameters (if any) to be associated with each of the keys. The provider may use precomputed parameter values, or may generate new values.

Algorithm-Specific Initialization

For situations where a set of algorithm-specific parameters already exists (e.g., so-called "community parameters" in DSA), there are two initialize methods that have an AlgorithmParameterSpec argument. Suppose your key pair generator is for the "DSA" algorithm, and you have a set of DSA-specific parameters, p, q, and g, that you would like to use to generate your key pair. You could execute the following code to initialize your key pair generator (recall that DSAParameterSpec is an AlgorithmParameterSpec):

    DSAParameterSpec dsaSpec = new DSAParameterSpec(p, q, g);
    SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");
    random.setSeed(userSeed);
    keyGen.initialize(dsaSpec, random);
(Note: The parameter named p is a prime number whose length is the modulus length ("size"). Thus, you don't need to call any other method to specify the modulus length.)

Generating the Pair of Keys

The final step is generating the key pair. No matter which type of initialization was utilized (algorithm-independent or algorithm-specific), the same code is used to generate the key pair:
    KeyPair pair = keyGen.generateKeyPair();

Generating and Verifying a Signature Using Generated Keys

The following signature generation and verification examples utilize the key pair generated in the key pair example above.

Generating a Signature

We first create a signature object:

    Signature dsa = Signature.getInstance("SHA1withDSA");

Next, using the key pair generated in the key pair example, we initialize the object with the private key, then sign a byte array called data.

    /* Initializing the object with a private key */
    PrivateKey priv = pair.getPrivate();
    dsa.initSign(priv);

    /* Update and sign the data */
    dsa.update(data);
    byte[] sig = dsa.sign();

Verifying a Signature

Verifying the signature is straightforward. (Note: here we also use the key pair generated in the key pair example.)

    /* Initializing the object with the public key */
    PublicKey pub = pair.getPublic();
    dsa.initVerify(pub);

    /* Update and verify the data */
    dsa.update(data);
    boolean verifies = dsa.verify(sig);
    System.out.println("signature verifies: " + verifies);

Generating/Verifying Signatures Using Key Specifications and KeyFactory

Suppose that, rather than having a public/private key pair (as, for example, was generated in the key pair example above), you simply have the components of your DSA private key: x (the private key), p (the prime), q (the sub-prime), and g (the base).

Further suppose you want to use your private key to digitally sign some data, which is in a byte array named someData. You would do the following steps, which also illustrate creating a key specification and using a key factory to obtain a PrivateKey from the key specification (initSign requires a PrivateKey):

    DSAPrivateKeySpec dsaPrivKeySpec =
        new DSAPrivateKeySpec(x, p, q, g);

    KeyFactory keyFactory = KeyFactory.getInstance("DSA");
    PrivateKey privKey = keyFactory.generatePrivate(dsaPrivKeySpec);

    Signature sig = Signature.getInstance("SHA1withDSA");
    sig.initSign(privKey);
    sig.update(someData);
    byte[] signature = sig.sign();
Suppose Alice wants to use the data you signed. In order for her to do so, and to verify your signature, you need to send her three things:
  • the data,

  • the signature, and

  • the public key corresponding to the private key you used to sign the data.
You can store the someData bytes in one file, and the signature bytes in another, and send those to Alice.

For the public key, assume, as in the signing example above, you have the components of the DSA public key corresponding to the DSA private key used to sign the data. Then you can create a DSAPublicKeySpec from those components:

    DSAPublicKeySpec dsaPubKeySpec =
        new DSAPublicKeySpec(y, p, q, g);
You still need to extract the key bytes so that you can put them in a file. To do so, you can first call the generatePublic method on the DSA key factory already created in the example above:
     PublicKey pubKey = keyFactory.generatePublic(dsaPubKeySpec);
Then you can extract the (encoded) key bytes via the following:
    byte[] encKey = pubKey.getEncoded();
You can now store these bytes in a file, and send it to Alice along with the files containing the data and the signature.

Now, assume Alice has received these files, and she copied the data bytes from the data file to a byte array named data, the signature bytes from the signature file to a byte array named signature, and the encoded public key bytes from the public key file to a byte array named encodedPubKey.

Alice can now execute the following code to verify the signature. The code also illustrates how to use a key factory in order to instantiate a DSA public key from its encoding (initVerify requires a PublicKey).

    X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(encodedPubKey);

    KeyFactory keyFactory = KeyFactory.getInstance("DSA");
    PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);

    Signature sig = Signature.getInstance("SHA1withDSA");
    sig.initVerify(pubKey);
    sig.update(data);
    sig.verify(signature);
Note: In the above, Alice needed to generate a PublicKey from the encoded key bits, since initVerify requires a PublicKey. Once she has a PublicKey, she could also use the KeyFactory getKeySpec method to convert it to a DSAPublicKeySpec so that she can access the components, if desired, as in:
    DSAPublicKeySpec dsaPubKeySpec =
        (DSAPublicKeySpec)keyFactory.getKeySpec(pubKey,
            DSAPublicKeySpec.class)
Now she can access the DSA public key components y, p, q, and g through the corresponding "get" methods on the DSAPublicKeySpec class (getY, getP, getQ, and getG).

Reading Base64-Encoded Certificates

The following example reads a file with Base64-encoded certificates, which are each bounded at the beginning by

-----BEGIN CERTIFICATE-----
and at the end by
-----END CERTIFICATE-----
We convert the FileInputStream (which does not support mark and reset) to a ByteArrayInputStream (which supports those methods), so that each call to generateCertificate consumes only one certificate, and the read position of the input stream is positioned to the next certificate in the file:

FileInputStream fis = new FileInputStream(filename);
DataInputStream dis = new DataInputStream(fis);

CertificateFactory cf = CertificateFactory.getInstance("X.509");

byte[] bytes = new byte[dis.available()];
dis.readFully(bytes);
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);

while (bais.available() > 0) {
   Certificate cert = cf.generateCertificate(bais);
   System.out.println(cert.toString());
}

Parsing a Certificate Reply

The following example parses a PKCS#7-formatted certificate reply stored in a file and extracts all the certificates from it:

FileInputStream fis = new FileInputStream(filename);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Collection c = cf.generateCertificates(fis);
Iterator i = c.iterator();
while (i.hasNext()) {
   Certificate cert = (Certificate)i.next();
   System.out.println(cert);
}

Appendix A: Standard Names

The Java 2 SDK Security API requires and utilizes a set of standard names for algorithms, certificate and keystore types. This specification establishes the following names as standard names.

Note: A corresponding list of standard names of encryption and key agreement algorithms is contained in Appendix A of the "API Specification & Reference" guide of the Java Cryptography Extension (JCE 1.2). You can find more information about this release here: http://java.sun.com/products/jce/index.html.

See Appendix B for algorithm specifications.

Message Digest Algorithms

The algorithm names in this section can be specified when generating an instance of MessageDigest.

SHA: The Secure Hash Algorithm, as defined in Secure Hash Standard, NIST FIPS 180-1.

MD2: The MD2 message digest algorithm as defined in RFC 1319.

MD5: The MD5 message digest algorithm as defined in RFC 1321.

Key and Parameter Algorithms

The algorithm names in this section can be specified when generating an instance of KeyPairGenerator, KeyFactory, AlgorithmParameterGenerator, and AlgorithmParameters.

RSA: The RSA encryption algorithm as defined in PKCS#1.

DSA: The Digital Signature Algorithm as defined in FIPS PUB 186.

Digital Signature Algorithms

The algorithm names in this section can be specified when generating an instance of Signature.

SHA1withDSA: The DSA with SHA-1 signature algorithm which uses the SHA-1 digest algorithm and DSA to create and verify DSA digital signatures as defined in FIPS PUB 186.

MD2withRSA: The MD2 with RSA Encryption signature algorithm which uses the MD2 digest algorithm and RSA to create and verify RSA digital signatures as defined in PKCS#1.

MD5withRSA: The MD5 with RSA Encryption signature algorithm which uses the MD5 digest algorithm and RSA to create and verify RSA digital signatures as defined in PKCS#1.

SHA1withRSA: The signature algorithm with SHA-1 and the RSA encryption algorithm as defined in the OSI Interoperability Workshop, using the padding conventions described in PKCS #1.

Random Number Generation (RNG) Algorithms

The algorithm names in this section can be specified when generating an instance of SecureRandom.

SHA1PRNG: The name of the pseudo-random number generation (PRNG) algorithm supplied by the SUN provider. This implementation follows the IEEE P1363 standard, Appendix G.7: "Expansion of source bits", and uses SHA1 as the foundation of the PRNG. It computes the SHA1 hash over a true-random seed value concatenated with a 64-bit counter which is incremented by 1 for each operation. From the 160-bit SHA1 output, only 64 bits are used.

Certificate Types

The types in this section can be specified when generating an instance of CertificateFactory.

X.509: The certificate type defined in X.509.

Keystore Types

The types in this section can be specified when generating an instance of KeyStore.

JKS: The name of the keystore implementation provided by the SUN provider.

PKCS12: The transfer syntax for personal identity information as defined in PKCS#12.

Service Attributes

A cryptographic service is always associated with a particular algorithm or type. For example, a digital signature service is always associated with a particular algorithm (e.g., DSA), and a CertificateFactory service is always associated with a particular certificate type (e.g., X.509).

The attributes in this section are for cryptographic services. The service attributes can be used as filters for selecting providers.

Both the attibute name and value are case insensitive.

KeySize: The maximum key size that the provider supports for the cryptographic service.

ImplementedIn: Whether the implementation for the cryptographic service is done by software or hardware. The value of this attribute is "software" or "hardware".

Appendix B: Algorithms

This appendix specifies details concerning some of the algorithms defined in Appendix A. Any provider supplying an implementation of the listed algorithms must comply with the specifications in this appendix. Note: The most recent version of this document is available from the public web site http://java.sun.com/j2se/sdk/1.3/docs/guide/security/index.html.

To add a new algorithm not specified herein, you should first survey other people or companies supplying provider packages to see if they have already added that algorithm, and, if so, use the definitions they published, if available. Otherwise, you should create and make available a template, similar to those found in this Appendix B, with the specifications for the algorithm you provide.

Specification Template

The algorithm specifications below contain the following fields:

Name

The name by which the algorithm is known. This is the name passed to the getInstance method (when requesting the algorithm), and returned by the getAlgorithm method to determine the name of an existing algorithm object. These methods are in the relevant engine classes: Signature, MessageDigest, KeyPairGenerator, and AlgorithmParameterGenerator.

Type

The type of algorithm: Signature, MessageDigest, KeyPairGenerator, or ParameterGenerator.

Description

General notes about the algorithm, including any standards implemented by the algorithm, applicable patents, etc.

KeyPair Algorithm (Optional)

The keypair algorithm for this algorithm.

Keysize (Optional)

For a keyed algorithm or key generation algorithm: the legal keysizes.

Size (Optional)

For an algorithm parameter generation algorithm: the legal "sizes" for algorithm parameter generation.

Parameter Defaults (Optional)

For a key generation algorithm: the default parameter values.

Signature format (Optional)

For a Signature algorithm, the format of the signature, that is, the input and output of the verify and sign methods, respectively.

Algorithm Specifications

SHA-1 Message Digest Algorithm

Name: SHA

Type: MessageDigest

Description: The message digest algorithm as defined in NIST's FIPS 180-1. The output of this algorithm is a 160-bit digest.

MD2 Message Digest Algorithm

Name: MD2

Type: MessageDigest

Description: The message digest algorithm as defined in RFC 1319. The output of this algorithm is a 128-bit (16 byte) digest.

MD5 Message Digest Algorithm

Name: MD5

Type: MessageDigest

Description: The message digest algorithm as defined in RFC 1321. The output of this algorithm is a 128-bit (16 byte) digest.

The Digital Signature Algorithm

Name: SHA1withDSA

Type: Signature

Description: This algorithm is the signature algorithm described in NIST FIPS 186, using DSA with the SHA1 message digest algorithm.

KeyPair Algorithm: DSA

Signature Format: an ASN.1 sequence of two INTEGER values: r and s, in that order: SEQUENCE ::= { r INTEGER, s INTEGER }

RSA-based Signature Algorithms, with MD2, MD5 or SHA1

Names: MD2withRSA, MD5withRSA and SHA1withRSA

Type: Signature

Description: These are the signature algorithms that use the MD2, MD5, and SHA1 message digest algorithms (respectively) with RSA encryption.

KeyPair Algorithm: RSA

Signature Format: A DER-encoded PKCS#1 block as defined in RSA Laboratory's Public Key Cryptography Standards Note #1. The data encrypted is the digest of the data signed.

DSA KeyPair Generation Algorithm

Name: DSA

Type: KeyPairGenerator

Description: This algorithm is the key pair generation algorithm described in NIST FIPS 186 for DSA.

Keysize: The length, in bits, of the modulus p. This must range from 512 to 1024, and must be a multiple of 64. The default keysize is 1024.

Parameter Defaults: The following default parameter values are used for keysizes of 512, 768, and 1024 bits.

512-bit Key Parameters
SEED = b869c82b 35d70e1b 1ff91b28 e37a62ec dc34409b

counter = 123

p = fca682ce 8e12caba 26efccf7 110e526d b078b05e decbcd1e b4a208f3
    ae1617ae 01f35b91 a47e6df6 3413c5e1 2ed0899b cd132acd 50d99151
    bdc43ee7 37592e17

q = 962eddcc 369cba8e bb260ee6 b6a126d9 346e38c5

g = 678471b2 7a9cf44e e91a49c5 147db1a9 aaf244f0 5a434d64 86931d2d
    14271b9e 35030b71 fd73da17 9069b32e 2935630e 1c206235 4d0da20a
    6c416e50 be794ca4
768-bit key parameters
SEED = 77d0f8c4 dad15eb8 c4f2f8d6 726cefd9 6d5bb399

counter = 263

p = e9e64259 9d355f37 c97ffd35 67120b8e 25c9cd43 e927b3a9 670fbec5
    d8901419 22d2c3b3 ad248009 3799869d 1e846aab 49fab0ad 26d2ce6a
    22219d47 0bce7d77 7d4a21fb e9c270b5 7f607002 f3cef839 3694cf45
    ee3688c1 1a8c56ab 127a3daf

q = 9cdbd84c 9f1ac2f3 8d0f80f4 2ab952e7 338bf511

g = 30470ad5 a005fb14 ce2d9dcd 87e38bc7 d1b1c5fa cbaecbe9 5f190aa7
    a31d23c4 dbbcbe06 17454440 1a5b2c02 0965d8c2 bd2171d3 66844577
    1f74ba08 4d2029d8 3c1c1585 47f3a9f1 a2715be2 3d51ae4d 3e5a1f6a
    7064f316 933a346d 3f529252
1024-bit key parameters
SEED = 8d515589 4229d5e6 89ee01e6 018a237e 2cae64cd

counter = 92

p = fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80
    b6512669 455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b
    801d346f f26660b7 6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6
    1bf83b57 e7c6a8a6 150f04fb 83f6d3c5 1ec30235 54135a16 9132f675
    f3ae2b61 d72aeff2 2203199d d14801c7

q = 9760508f 15230bcc b292b982 a2eb840b f0581cf5

g = f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b
    3d078267 5159578e bad4594f e6710710 8180b449 167123e8 4c281613
    b7cf0932 8cc8a6e1 3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f
    0bfa2135 62f1fb62 7a01243b cca4f1be a8519089 a883dfe1 5ae59f06
    928b665e 807b5525 64014c3b fecf492a

RSA KeyPair Generation Algorithm

Name: RSA

Type: KeyPairGenerator

Description: This algorithm is the key pair generation algorithm described in PKCS#1.

Strength: Any integer that is a multiple of 8, greater than or equal to 512.

DSA Parameter Generation Algorithm

Name: DSA

Type: ParameterGenerator

Description: This algorithm is the parameter generation algorithm described in NIST FIPS 186 for DSA.

Size: The length, in bits, of the modulus p. This must range from 512 to 1024, and must be a multiple of 64. The default size is 1024.

Copyright © 1996-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


Permissions in the Java(TM) 2 SDK

A permission represents access to a system resource. In order for a resource access to be allowed for an applet (or an application running with a security manager), the corresponding permission must be explicitly granted to the code attempting the access.

A permission typically has a name (often referred to as a "target name") and, in some cases, a comma-separated list of one or more actions. For example, the following code creates a FilePermission object representing read access to the file named abc in the /tmp directory:

    perm = new java.io.FilePermission("/tmp/abc", "read");
In this, the target name is "/tmp/abc" and the action string is "read".

Important: The above statement creates a permission object. A permission object represents, but does not grant access to, a system resource. Permission objects are constructed and assigned ("granted") to code based on the policy in effect. When a permission object is assigned to some code, that code is granted the permission to access the system resource specified in the permission object, in the specified manner. A permission object may also be constructed by the current security manager when making access decisions. In this case, the (target) permission object is created based on the requested access, and checked against the permission objects granted to and held by the code making the request.

The policy for a Java application environment is represented by a Policy object. In the default Policy implementation, the policy can be specified within one or more policy configuration files. The policy file(s) specify what permissions are allowed for code from specified code sources. A sample policy file entry granting code from the /home/sysadmin directory read access to the file /tmp/abc is

  grant codeBase "file:/home/sysadmin/" {
    permission java.io.FilePermission "/tmp/abc", "read";
  };

For information about policy file locations and granting permissions in policy files, see Default Policy Implementation and Policy File Syntax. For information about using the Policy Tool to specify the permissions, see the Policy Tool documentation (for Solaris) (for Windows). Using the Policy Tool saves typing and eliminates the need for you to know the required syntax of policy files.

Technically, whenever a resource access is attempted, all code traversed by the execution thread up to that point must have permission for that resource access, unless some code on the thread has been marked as "privileged." See API for Privileged Blocks for more information about "privileged" code.

This document contains tables that describe the built-in Java 2 SDK permission types and discuss the risks of granting each permission. It also contains tables showing the methods that require permissions to be in effect in order to be successful, and for each lists the required permission.

The tables are the following:

Permission Descriptions and Risks
AllPermission
AudioPermission
AWTPermission
FilePermission
NetPermission
PropertyPermission
ReflectPermission
RuntimePermission
SecurityPermission
SerializablePermission
SocketPermission
SQLPermission

Methods and the Permissions They Require

java.lang.SecurityManager Method Permission Checks

For more information about permissions, including the superclasses java.security.Permission and java.security.BasicPermission, and examples of creating permission objects and granting permissions, see the Security Architecture Specification.

Permission Descriptions and Risks

The following tables describe the built-in Java 2 SDK permission types and discuss the risks of granting each permission.

AllPermission

The java.security.AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions. Thus, it grants code the ability to run with security disabled. Extreme caution should be taken before granting such a permission to code. This permission should be used only during testing, or in extremely rare cases where an application or applet is completely trusted and adding the necessary permissions to the policy is prohibitively cumbersome.

AudioPermission

The AudioPermission class represents access rights to the audio system resources. An AudioPermission contains a target name but no actions list; you either have the named permission or you don't.

The target name is the name of the audio permission (see the table below). The names follow the hierarchical property-naming convention. Also, an asterisk can be used to represent all the audio permissions.

The following table lists the possible AudioPermission target name s. For each name, the table provides a description of exactly what that permission allows, as well as a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
play | Audio playback through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio playback (rendering). | In some cases use of this permission may affect other applications because the audio from one line may be mixed with other audio being played on the system, or because manipulation of a mixer affects the audio for all lines using that mixer.
record | Audio recording through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio recording (capture). | In some cases use of this permission may affect other applications because manipulation of a mixer affects the audio for all lines using that mixer. This permission can enable an applet or application to eavesdrop on a user.

AWTPermission

A java.awt.AWTPermission is for AWT permissions.

The following table lists all the possible AWTPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.awt.AWTPermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
accessClipboard | Posting and retrieval of information to and from the AWT clipboard | This would allow malfeasant code to share potentially sensitive or confidential information.
accessEventQueue | Access to the AWT event queue | After retrieving the AWT event queue, malicious code may peek at and even remove existing events from the system, as well as post bogus events which may purposefully cause the application or applet to misbehave in an insecure manner.
createRobot | Create java.awt.Robot objects | The java.awt.Robot object allows code to generate native-level mouse and keyboard events as well as read the screen. It could allow malicious code to control the system, run other programs, read the display, and deny mouse and keyboard access to the user.
listenToAllAWTEvents | Listen to all AWT events, system-wide | After adding an AWT event listener, malicious code may scan all AWT events dispatched in the system, allowing it to read all user input (such as passwords). Each AWT event listener is called from within the context of that event queue's EventDispatchThread, so if the accessEventQueue permission is also enabled, malicious code could modify the contents of AWT event queues system-wide, causing the application or applet to misbehave in an insecure manner.
readDisplayPixels | Readback of pixels from the display screen | Interfaces such as the java.awt.Composite interface which allow arbitrary code to examine pixels on the display enable malicious code to snoop on the activities of the user.
showWindowWithoutWarningBanner | Display of a window without also displaying a banner warning that the window was created by an applet | Without this warning, an applet may pop up windows without the user knowing that they belong to an applet. Since users may make security-sensitive decisions based on whether or not the window belongs to an applet (entering a username and password into a dialog box, for example), disabling this warning banner may allow applets to trick the user into entering such information.

FilePermission

A java.io.FilePermission represents access to a file or directory. A FilePermission consists of a pathname and a set of actions valid for that pathname.

Pathname is the pathname of the file or directory granted the specified actions. A pathname that ends in "/*" (where "/" is the file separator character, File.separatorChar) indicates a directory and all the files contained in that directory. A pathname that ends with "/-" indicates a directory and (recursively) all files and subdirectories contained in that directory. A pathname consisting of the special token "<<ALL FILES>>" matches any file.

A pathname consisting of a single "*" indicates all the files in the current directory, while a pathname consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords. The possible keywords are "read", "write", "execute", and "delete". Their meaning is defined as follows:

read
Permission to read.
write
Permission to write (which includes permission to create).
execute
Permission to execute. Allows Runtime.exec to be called. Corresponds to SecurityManager.checkExec.
delete
Permission to delete. Allows File.delete to be called. Corresponds to SecurityManager.checkDelete.

The actions string is converted to lowercase before processing.

Be careful when granting FilePermissions. Think about the implications of granting read and especially write access to various files and directories. The "<<ALL FILES>>" permission with write action is especially dangerous. This grants permission to write to the entire file system. One thing this effectively allows is replacement of the system binary, including the JVM runtime environment.

Please note: code can always read a file from the same directory it's in (or a subdirectory of that directory); it does not need explicit permission to do so.

NetPermission

A java.net.NetPermission is for various network permissions. A NetPermission contains a name but no actions list; you either have the named permission or you don't.

The following table lists all the possible NetPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.net.NetPermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
setDefaultAuthenticator | The ability to set the way authentication information is retrieved when a proxy or HTTP server asks for authentication | Malicious code can set an authenticator that monitors and steals user authentication input as it retrieves the input from the user.
requestPasswordAuthentication | The ability to ask the authenticator registered with the system for a password | Malicious code may steal this password.
specifyStreamHandler | The ability to specify a stream handler when constructing a URL | Malicious code may create a URL with resources that it would normally not have access to (like file:/foo/fum/), specifying a stream handler that gets the actual bytes from someplace it does have access to. Thus it might be able to trick the system into creating a ProtectionDomain/CodeSource for a class even though that class really didn't come from that location.

PropertyPermission

A java.util.PropertyPermission is for property permissions.

The name is the name of the property ("java.home", "os.name", etc). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords. The possible keywords are "read" and "write". Their meaning is defined as follows:

read
Permission to read. Allows System.getProperty to be called.
write
Permission to write. Allows System.setProperty to be called.

The actions string is converted to lowercase before processing.

Care should be taken before granting code permission to access certain system properties. For example, granting permission to access the "java.home" system property gives potentially malevolent code sensitive information about the system environment (the location of the runtime environment's directory). Also, granting permission to access the "user.name" and "user.home" system properties gives potentially malevolent code sensitive information about the user environment (the user's account name and home directory).

ReflectPermission

A java.lang.reflect.ReflectPermission is for reflective operations. A ReflectPermission is a named permission and has no actions. The only name currently defined is suppressAccessChecks, which allows suppressing the standard language access checks -- for public, default (package) access, protected, and private members -- performed by reflected objects at their point of use.

The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission.

java.lang.reflect.ReflectPermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
suppressAccessChecks The ability to access fields and invoke methods in a class. Note that this includes not only public, but protected and private fields and methods as well. This is dangerous in that information (possibly confidential) and methods normally unavailable would be accessible to malicious code.

RuntimePermission

A java.lang.RuntimePermission is for runtime permissions. A RuntimePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the runtime permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "loadLibrary.*" or "*" is valid, "*loadLibrary" or "a*b" is not valid.

The following table lists all the possible RuntimePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.lang.RuntimePermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
createClassLoader | Creation of a class loader | This is an extremely dangerous permission to grant. Malicious applications that can instantiate their own class loaders could then load their own rogue classes into the system. These newly loaded classes could be placed into any protection domain by the class loader, thereby automatically granting the classes the permissions for that domain.
getClassLoader | Retrieval of a class loader (e.g., the class loader for the calling class) | This would grant an attacker permission to get the class loader for a particular class. This is dangerous because having access to a class's class loader allows the attacker to load other classes available to that class loader. The attacker would typically otherwise not have access to those classes.
setContextClassLoader | Setting of the context class loader used by a thread | The context class loader is used by system code and extensions when they need to lookup resources that might not exist in the system class loader. Granting setContextClassLoader permission would allow code to change which context class loader is used for a particular thread, including system threads.
setSecurityManager | Setting of the security manager (possibly replacing an existing one) | The security manager is a class that allows applications to implement a security policy. Granting the setSecurityManager permission would allow code to change which security manager is used by installing a different, possibly less restrictive security manager, thereby bypassing checks that would have been enforced by the original security manager.
createSecurityManager | Creation of a new security manager | This gives code access to protected, sensitive methods that may disclose information about other classes or the execution stack.
exitVM | Halting of the Java Virtual Machine | This allows an attacker to mount a denial-of-service attack by automatically forcing the virtual machine to halt.
shutdownHooks | Registration and cancellation of virtual-machine shutdown hooks | This allows an attacker to register a malicious shutdown hook that interferes with the clean shutdown of the virtual machine.
setFactory | Setting of the socket factory used by ServerSocket or Socket, or of the stream handler factory used by URL | This allows code to set the actual implementation for the socket, server socket, stream handler, or RMI socket factory. An attacker may set a faulty implementation which mangles the data stream.
setIO | Setting of System.out, System.in, and System.err | This allows changing the value of the standard system streams. An attacker may change System.in to monitor and steal user input, or may set System.err to a "null" OutputSteam, which would hide any error messages sent to System.err.
modifyThread | stop, suspend, resume, setPriority, and setName methods | This allows an attacker to start or suspend any thread in the system.
stopThread | Stopping of threads via calls to the Thread stop method | This allows code to stop any thread in the system provided that it is already granted permission to access that thread. This poses as a threat, because that code may corrupt the system by killing existing threads.
modifyThreadGroup | Modification of thread groups, e.g., via calls to ThreadGroup destroy, resume, setDaemon, setMaxPriority, stop, and suspend methods | This allows an attacker to create thread groups and set their run priority.
getProtectionDomain | Retrieval of the ProtectionDomain for a class | This allows code to obtain policy information for a particular code source. While obtaining policy information does not compromise the security of the system, it does give attackers additional information, such as local file names for example, to better aim an attack.
readFileDescriptor | Reading of file descriptors | This would allow code to read the particular file associated with the file descriptor read. This is dangerous if the file contains confidential data.
writeFileDescriptor | Writing to file descriptors | This allows code to write to a particular file associated with the descriptor. This is dangerous because it may allow malicous code to plant viruses or at the very least, fill up your entire disk.
loadLibrary.{library name} | Dynamic linking of the specified library | It is dangerous to allow an applet permission to load native code libraries, because the Java security architecture is not designed to and does not prevent malicious behavior at the level of native code.
accessClassInPackage.{package name} | Access to the specified package via a class loader's loadClass method when that class loader calls the SecurityManager checkPackageAcesss method | This gives code access to classes in packages to which it normally does not have access. Malicious code may use these classes to help in its attempt to compromise security in the system.
defineClassInPackage.{package name} | Definition of classes in the specified package, via a class loader's defineClass method when that class loader calls the SecurityManager checkPackageDefinition method. | This grants code permission to define a class in a particular package. This is dangerous because malicious code with this permission may define rogue classes in trusted packages like java.security or java.lang, for example.
accessDeclaredMembers | Access to the declared members of a class | This grants code permission to query a class for its public, protected, default (package) access, and private fields and/or methods. Although the code would have access to the private and protected field and method names, it would not have access to the private/protected field data and would not be able to invoke any private methods. Nevertheless, malicious code may use this information to better aim an attack. Additionally, it may invoke any public methods and/or access public fields in the class. This could be dangerous if the code would normally not be able to invoke those methods and/or access the fields because it can't cast the object to the class/interface with those methods and fields.
queuePrintJob | Initiation of a print job request | This could print sensitive information to a printer, or simply waste paper.

SecurityPermission

A java.security.SecurityPermission is for security permissions. A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects.

The following table lists all the possible SecurityPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.security.SecurityPermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
createAccessControlContext | Creation of an AccessControlContext | This allows someone to instantiate an AccessControlContext with a DomainCombiner. Since DomainCombiners are given a reference to the ProtectionDomains currently on the stack, this could potentially lead to a privacy leak if the DomainCombiner is malicious.
getDomainCombiner | Retrieval of an AccessControlContext's DomainCombiner | This allows someone to query the policy via the getPermissions call, which discloses which permissions would be granted to a given CodeSource. While revealing the policy does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack. It is wise not to divulge more information than necessary.
getPolicy | Retrieval of the system-wide security policy (specifically, of the currently-installed Policy object) | This allows someone to query the policy via the getPermissions call, which discloses which permissions would be granted to a given CodeSource. While revealing the policy does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack. It is wise not to divulge more information than necessary.
setPolicy | Setting of the system-wide security policy (specifically, the Policy object) | Granting this permission is extremely dangerous, as malicious code may grant itself all the necessary permissions it needs to successfully mount an attack on the system.
getProperty.{key} | Retrieval of the security property with the specified key | Depending on the particular key for which access has been granted, the code may have access to the list of security providers, as well as the location of the system-wide and user security policies. while revealing this information does not compromise the security of the system, it does provide malicious code with additional information which it may use to better aim an attack.
setProperty.{key} | Setting of the security property with the specified key | This could include setting a security provider or defining the location of the the system-wide security policy. Malicious code that has permission to set a new security provider may set a rogue provider that steals confidential information such as cryptographic private keys. In addition, malicious code with permission to set the location of the system-wide security policy may point it to a security policy that grants the attacker all the necessary permissions it requires to successfully mount an attack on the system.
insertProvider.{provider name} | Addition of a new provider, with the specified name | This would allow somebody to introduce a possibly malicious provider (e.g., one that discloses the private keys passed to it) as the highest-priority provider. This would be possible because the Security object (which manages the installed providers) currently does not check the integrity or authenticity of a provider before attaching it.
removeProvider.{provider name} | Removal of the specified provider | This may change the behavior or disable execution of other parts of the program. If a provider subsequently requested by the program has been removed, execution may fail. Also, if the removed provider is not explicitly requested by the rest of the program, but it would normally be the provider chosen when a cryptography service is requested (due to its previous order in the list of providers), a different provider will be chosen instead, or no suitable provider will be found, thereby resulting in program failure.
setSystemScope | Setting of the system identity scope | This would allow an attacker to configure the system identity scope with certificates that should not be trusted, thereby granting applet or application code signed with those certificates privileges that would have been denied by the system's original identity scope
setIdentityPublicKey | Setting of the public key for an Identity | If the identity is marked as "trusted", this allows an attacker to introduce a different public key (e.g., its own) that is not trusted by the system's identity scope, thereby granting applet or application code signed with that public key privileges that would have been denied otherwise.
setIdentityInfo | Setting of a general information string for an Identity | This allows attackers to set the general description for an identity. This may trick applications into using a different identity than intended or may prevent applications from finding a particular identity.
addIdentityCertificate | Addition of a certificate for an Identity | This allows attackers to set a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes trusted to a wider audience than it otherwise would be.
removeIdentityCertificate | Removal of a certificate for an Identity | This allows attackers to remove a certificate for an identity's public key. This is dangerous because it affects the trust relationship across the system. This public key suddenly becomes considered less trustworthy than it otherwise would be.
printIdentity Viewing the name of a principal and optionally the scope in which it is used, and whether or not it is considered "trusted" in that scope. The scope that is printed out may be a filename, in which case it may convey local system information. For example, here's a sample printout of an identity named "carol", who is marked not trusted in the user's identity database:
carol[/home/luehe/identitydb.obj][not trusted]
clearProviderProperties.{provider name} | "Clearing" of a Provider so that it no longer contains the properties used to look up services implemented by the provider | This disables the lookup of services implemented by the provider. This may thus change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.
putProviderProperty.{provider name} | Setting of properties for the specified Provider | The provider properties each specify the name and location of a particular service implemented by the provider. By granting this permission, you let code replace the service specification with another one, thereby specifying a different implementation.
removeProviderProperty.{provider name} | Removal of properties from the specified Provider | This disables the lookup of services implemented by the provider. They are no longer accessible due to removal of the properties specifying their names and locations. This may change the behavior or disable execution of other parts of the program that would normally utilize the Provider, as described under the "removeProvider.{provider name}" permission.
getSignerPrivateKey | Retrieval of a Signer's private key | It is very dangerous to allow access to a private key; private keys are supposed to be kept secret. Otherwise, code can use the private key to sign various files and claim the signature came from the Signer.
setSignerKeyPair | Setting of the key pair (public key and private key) for a Signer | This would allow an attacker to replace somebody else's (the "target's") keypair with a possibly weaker keypair (e.g., a keypair of a smaller keysize). This also would allow the attacker to listen in on encrypted communication between the target and its peers. The target's peers might wrap an encryption session key under the target's "new" public key, which would allow the attacker (who possesses the corresponding private key) to unwrap the session key and decipher the communication data encrypted under that session key.

SerializablePermission

A java.io.SerializablePermission is for serializable permissions. A SerializablePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the Serializable permission (see below).

The following table lists all the possible SerializablePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

java.io.SerializablePermission
Target Name 		What the Permission Allows Risks of Allowing this Permission
enableSubclassImplementation | Implementing a subclass of ObjectOutputStream or ObjectInputStream to override the default serialization or deserialization, respectively, of objects | Code can use this to serialize or deserialize classes in a purposefully malfeasant manner. For example, during serialization, malicious code can use this to purposefully store confidential private field data in a way easily accessible to attackers. Or, during deserializaiton it could, for example, deserialize a class with all its private fields zeroed out.
enableSubstitution | Substitution of one object for another during serialization or deserialization | This is dangerous because malicious code can replace the actual object with one which has incorrect or malignant data.

SocketPermission

A java.net.SocketPermission represents access to a network via sockets. A SocketPermission consists of a host specification and a set of "actions" specifying ways to connect to that host. The host is specified as
   host = (hostname | IPaddress)[:portrange]
   portrange = portnumber | -portnumber | portnumber-[portnumber]
The host is expressed as a DNS name, as a numerical IP address, or as "localhost" (for the local machine). The wildcard "*" may be included once in a DNS name host specification. If it is included, it must be in the leftmost position, as in "*.sun.com".

The port or portrange is optional. A port specification of the form "N-", where N is a port number, signifies all ports numbered N and above, while a specification of the form "-N" indicates all ports numbered N and below.

The possible ways to connect to the host are

accept
connect
listen
resolve
The "listen" action is only meaningful when used with "localhost". The "resolve" (resolve host/ip name service lookups) action is implied when any of the other actions are present.

As an example of the creation and meaning of SocketPermissions, note that if you have the following entry in your policy file:

    grant signedBy "mrm" {
      permission java.net.SocketPermission "puffin.eng.sun.com:7777", "connect,
accept";
    };
this causes the following permission object to be generated and granted to code signed by "mrm."
    p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");
p1 represents a permission allowing connections to port 7777 on puffin.eng.sun.com, and also accepting connections on that port.

Similarly, if you have the following entry in your policy:

    grant signedBy "paul" {
      permission java.net.SocketPermission "localhost:1024-", "accept, connect,
listen";
    };
this causes the following permission object to be generated and granted to code signed by "paul."
      p2 = new SocketPermission("localhost:1024-", "accept,connect,listen");
p2 represents a permission allowing accepting connections on, connecting to, or listening on any port between 1024 and 65535 on the local host.

Note: Granting code permission to accept or make connections to remote hosts may be dangerous because malevolent code can then more easily transfer and share confidential data among parties who may not otherwise have access to the data.

SQLPermission

The permission for which the SecurityManager will check when code that is running in an applet calls one of the setLogWriter methods. These methods include those in the following list.
  • DriverManager.setLogWriter
  • DriverManager.setLogStream (deprecated)
  • javax.sql.DataSource.setLogWriter
  • javax.sql.ConnectionPoolDataSource.setLogWriter
  • javax.sql.XADataSource.setLogWriter
If there is no SQLPermission object, this method throws a java.lang.SecurityException as a runtime exception.

A SQLPermission object contains a name (also referred to as a "target name") but no actions list; there is either a named permission or there is not. The target name is the name of the permission (see below). The naming convention follows the hierarchical property naming convention. In addition, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: loadLibrary.* or * is valid, but *loadLibrary or a*b is not valid.

The following table lists all the possible SQLPermission target na mes. Currently, the only name allowed is setLog. The table gives a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name | What the Permission Allows | Risks of Allowing this Permission
setLog | Setting of the logging stream | This is a dangerous permission to grant. The contents of the log may contain usernames and passwords, SQL statements, and SQL data.

The person running an applet decides what permissions to allow and will run the Policy Tool to create an SQLPermission in a policy file. A programmer does not use a constructor directly to create an instance of SQLPermission but rather uses a tool.

Methods and the Permissions They Require

The following table contains a list of all the Java 2 SDK methods that require permissions, and for each tells which SecurityManager method it calls and which permission is checked for by the default implementation of that SecurityManager method.

Thus, with the default SecurityManager method implementations, a call to a method in the left-hand column can only be successful if the permission specified in the corresponding entry in the right-hand column is allowed by the policy currently in effect. For example, the following row:

Method SecurityManager Method Called Permission
java.awt.Toolkit
    getSystemEventQueue();
checkAwtEventQueueAccess java.awt.AWTPermission "accessEventQueue";

specifies that a call to the getSystemEventQueue method in the java.awt.Toolkit class results in a call to the checkAwtEventQueueAccess SecurityManager method, which can only be successful if the following permission is granted to code on the call stack:

  java.awt.AWTPermission "accessEventQueue";

The convention of:

Method SecurityManager Method Called Permission
 some.package.class
   public static void someMethod(String foo);
checkXXX SomePermission "{foo}";

means the runtime value of foo replaces the string {foo} in the permission name.

As an example, here is one table entry:

Method SecurityManager Method Called Permission
java.io.FileInputStream
    FileInputStream(String name)
checkRead(String) java.io.FilePermission "{name}", "read";

If the FileInputStream method (in this case, a constructor) is called with "/test/MyTestFile" as the name argument, as in

  FileInputStream("/test/MyTestFile");
then in order for the call to succeed, the following permission must be set in the current policy, allowing read access to the file "/test/MyTestFile":
  java.io.FilePermission "/test/MyTestFile", "read";
More specifically, the permission must either be explicitly set, as above, or implied by another permission, such as the following:
  java.io.FilePermission "/test/*", "read";
which allows read access to any files in the "/test" directory.

In some cases, a term in braces is not exactly the same as the name of a specific method argument but is meant to represent the relevant value. Here is an example:

Method SecurityManager Method Called Permission
java.net.DatagramSocket
  public synchronized void
      receive(DatagramPacket p);
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept";

Here, the appropriate host and port values are calculated by the receive method and passed to checkAccept.

In most cases, just the name of the SecurityManager method called is listed. Where the method is one of multiple methods of the same name, the argument types are also listed, for example for checkRead(String) and checkRead(FileDescriptor). In other cases where arguments may be relevant, they are also listed.

The following table is ordered by package name. That is, the methods in classes in the java.awt package are listed first, followed by methods in classes in the java.io package, and so on.

Methods and the Permissions They Require

Method SecurityManager Method Called Permission
java.awt.Graphics2d
  public abstract void
    setComposite(Composite comp)
checkPermission java.awt.AWTPermission "readDisplayPixels" if this Graphics2D context is drawing to a Component on the display screen and the Composite is a custom object rather than an instance of the AlphaComposite class. Note: The setComposite method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the java.lang.SecurityManager checkPermission method with a java.awt.AWTPermission("readDisplayPixels") permission under the conditions noted.

java.awt.Robot
  public Robot()
  public Robot(GraphicsDevice screen)
checkPermission java.awt.AWTPermission "createRobot"
java.awt.Toolkit
  public void addAWTEventListener(
          AWTEventListener listener,
          long eventMask)
  public void removeAWTEventListener(
     AWTEventListener listener)
checkPermission java.awt.AWTPermission "listenToAllAWTEvents"

java.awt.Toolkit
  public abstract PrintJob getPrintJob(
           Frame frame, String jobtitle,
           Properties props)
checkPrintJobAccess java.lang.RuntimePermission "queuePrintJob"

Note: The getPrintJob method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the java.lang.SecurityManager checkPrintJobAccess method, which is successful only if the java.lang.RuntimePermission "queuePrintJob" permission is currently allowed.

java.awt.Toolkit
  public abstract Clipboard
                    getSystemClipboard()
checkSystemClipboardAccess java.awt.AWTPermission "accessClipboard"

Note: The getSystemClipboard method is actually abstract and thus can't invoke security checks. Each actual implementation of the method should call the java.lang.SecurityManager checkSystemClipboardAccess method, which is successful only if the java.awt.AWTPermission "accessClipboard" permission is currently allowed.

java.awt.Toolkit
  public final EventQueue
               getSystemEventQueue()
checkAwtEventQueueAccess java.awt.AWTPermission "accessEventQueue"
java.awt.Window
  Window()
checkTopLevelWindow If java.awt.AWTPermission "showWindowWithoutWarningBanner" is set, the window will be displayed without a banner warning that the window was created by an applet. It it's not set, such a banner will be displayed.
java.beans.Beans
  public static void setDesignTime(
                 boolean isDesignTime)
  public static void setGuiAvailable(
                 boolean isGuiAvailable)

java.beans.Introspector
  public static synchronized void
    setBeanInfoSearchPath(String path[])

java.beans.PropertyEditorManager
  public static void registerEditor(
                 Class targetType,
                 Class editorClass)
  public static synchronized void
    setEditorSearchPath(String path[])
checkPropertiesAccess java.util.PropertyPermission "*", "read,write"
java.io.File
  public boolean delete()
  public void deleteOnExit()
checkDelete(String) java.io.FilePermission "{name}", "delete"
java.io.FileInputStream
  FileInputStream(FileDescriptor fdObj)
checkRead(FileDescriptor) java.lang.RuntimePermission "readFileDescriptor"
java.io.FileInputStream
  FileInputStream(String name)
  FileInputStream(File file)

java.io.File
  public boolean exists()
  public boolean canRead()
  public boolean isFile()
  public boolean isDirectory()
  public boolean isHidden()
  public long lastModified()
  public long length()
  public String[] list()
  public String[] list(
           FilenameFilter filter)
  public File[] listFiles()
  public File[] listFiles(
           FilenameFilter filter)
  public File[] listFiles(
           FileFilter filter)

java.io.RandomAccessFile
  RandomAccessFile(String name, String mode)
  RandomAccessFile(File file, String mode)
      (where mode is "r" in both of these)
checkRead(String) java.io.FilePermission "{name}", "read"
java.io.FileOutputStream
  FileOutputStream(FileDescriptor fdObj)
checkWrite(FileDescriptor) java.lang.RuntimePermission "writeFileDescriptor"
java.io.FileOutputStream
  FileOutputStream(File file)
  FileOutputStream(String name)
  FileOutputStream(String name,
                   boolean append)

java.io.File
  public boolean canWrite()
  public boolean createNewFile()
  public static File createTempFile(
          String prefix, String suffix)
  public static File createTempFile(
          String prefix,  String suffix,
          File directory)
  public boolean mkdir()
  public boolean mkdirs()
  public boolean renameTo(File dest)
  public boolean setLastModified(long time)
  public boolean setReadOnly()
checkWrite(String) java.io.FilePermission "{name}", "write"
java.io.ObjectInputStream
  protected final boolean
    enableResolveObject(boolean enable);

java.io.ObjectOutputStream
  protected final boolean
    enableReplaceObject(boolean enable)
checkPermission java.io.SerializablePermission "enableSubstitution"
java.io.ObjectInputStream
  protected ObjectInputStream()

java.io.ObjectOutputStream
  protected ObjectOutputStream()
checkPermission java.io.SerializablePermission "enableSubclassImplementation"
java.io.RandomAccessFile
  RandomAccessFile(String name, String mode)
      (where mode is "rw")
checkRead(String) and checkWrite(String) java.io.FilePermission "{name}", "read,write"
java.lang.Class
  public static Class forName(
     String name, boolean initialize,
     ClassLoader loader)
checkPermission If loader is null, and the caller's class loader is not null, then java.lang.RuntimePermission("getClassLoader")
java.lang.Class
  public Class[] getClasses()
For this class and each of its superclasses, checkMemberAccess(this, Member.DECLARED) is called and, if the class is in a package, checkPackageAccess({pkgName}) is called. Default checkMemberAccess does not require any permissions if "this" class's classloader is the same as that of the caller. Otherwise, it requires java.lang.RuntimePermission "accessDeclaredMembers". If the class is in a package, java.lang.RuntimePermission "accessClassInPackage.{pkgName}" is also required.
java.lang.Class
  public ClassLoader getClassLoader()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the class loader for the class whose class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Class
  public Class[] getDeclaredClasses()
  public Field[] getDeclaredFields()
  public Method[] getDeclaredMethods()
  public Constructor[]
    getDeclaredConstructors()
  public Field getDeclaredField(
                       String name)
  public Method getDeclaredMethod(...)
  public Constructor
    getDeclaredConstructor(...)
checkMemberAccess(this, Member.DECLARED) and, if this class is in a package, checkPackageAccess({pkgName}) Default checkMemberAccess does not require any permissions if "this" class's classloader is the same as that of the caller. Otherwise, it requires java.lang.RuntimePermission "accessDeclaredMembers". If this class is in a package, java.lang.RuntimePermission "accessClassInPackage.{pkgName}" is also required.
java.lang.Class
  public Field[] getFields()
  public Method[] getMethods()
  public Constructor[] getConstructors()
  public Field getField(String name)
  public Method getMethod(...)
  public Constructor getConstructor(...)
checkMemberAccess(this, Member.PUBLIC) and, if class is in a package, checkPackageAccess({pkgName}) Default checkMemberAccess does not require any permissions when the access type is Member.PUBLIC. If this class is in a package, java.lang.RuntimePermission "accessClassInPackage.{pkgName}" is required.
java.lang.Class
   public ProtectionDomain
            getProtectionDomain()
checkPermission java.lang.RuntimePermission "getProtectionDomain"
java.lang.ClassLoader
  ClassLoader()
  ClassLoader(ClassLoader parent)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.lang.ClassLoader
  public static ClassLoader
           getSystemClassLoader()
  public ClassLoader getParent()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the class loader for the class whose class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Runtime
  public Process exec(String command)
  public Process exec(String command,
                      String envp[])
  public Process exec(String cmdarray[])
  public Process exec(String cmdarray[],
                      String envp[])
checkExec java.io.FilePermission "{command}", "execute"
java.lang.Runtime
  public void exit(int status)
  public static void
      runFinalizersOnExit(boolean value)
java.lang.System
  public static void exit(int status)
  public static void
      runFinalizersOnExit(boolean value)
checkExit(status) where status is 0 for runFinalizersOnExit java.lang.RuntimePermission "exitVM"
java.lang.Runtime
  public void addShutdownHook(Thread hook)
  public boolean removeShutdownHook(Thread hook)
checkPermission java.lang.RuntimePermission "shutdownHooks"
java.lang.Runtime
  public void load(String lib)
  public void loadLibrary(String lib)
java.lang.System
  public static void load(String filename)
  public static void loadLibrary(
                          String libname)
checkLink({libName}) where {libName} is the lib, filename or libname argument java.lang.RuntimePermission "loadLibrary.{libName}"
java.lang.SecurityManager methods
checkPermission See the next table.
java.lang.System
  public static Properties
      getProperties()
  public static void
      setProperties(Properties props)
checkPropertiesAccess java.util.PropertyPermission "*", "read,write"
java.lang.System
  public static String
      getProperty(String key)
  public static String
      getProperty(String key, String def)
checkPropertyAccess java.util.PropertyPermission "{key}", "read"
java.lang.System
  public static void setIn(InputStream in)
  public static void setOut(PrintStream out)
  public static void setErr(PrintStream err)
checkPermission java.lang.RuntimePermission "setIO"
java.lang.System
  public static String
    setProperty(String key, String value)
checkPermission java.util.PropertyPermission "{key}", "write"
java.lang.System
  public static synchronized void
    setSecurityManager(SecurityManager s)
checkPermission java.lang.RuntimePermission "setSecurityManager"
java.lang.Thread
  public ClassLoader getContextClassLoader()
checkPermission If the caller's class loader is null, or is the same as or an ancestor of the context class loader for the thread whose context class loader is being requested, no permission is needed. Otherwise,
java.lang.RuntimePermission "getClassLoader"
is required.
java.lang.Thread
  public void setContextClassLoader
                      (ClassLoader cl)
checkPermission java.lang.RuntimePermission "setContextClassLoader"
java.lang.Thread
  public final void checkAccess()
  public void interrupt()
  public final void suspend()
  public final void resume()
  public final void setPriority
                     (int newPriority)
  public final void setName(String name)
  public final void setDaemon(boolean on)
checkAccess(this) java.lang.RuntimePermission "modifyThread"
java.lang.Thread
  public static int
      enumerate(Thread tarray[])
checkAccess({threadGroup}) java.lang.RuntimePermission "modifyThreadGroup"
java.lang.Thread
  public final void stop()
checkAccess(this). Also checkPermission if the current thread is trying to stop a thread other than itself. java.lang.RuntimePermission "modifyThread".
Also java.lang.RuntimePermission "stopThread" if the current thread is trying to stop a thread other than itself.
java.lang.Thread
  public final synchronized void
                    stop(Throwable obj)
checkAccess(this). Also checkPermission if the current thread is trying to stop a thread other than itself or obj is not an instance of ThreadDeath. java.lang.RuntimePermission "modifyThread".
Also java.lang.RuntimePermission "stopThread" if the current thread is trying to stop a thread other than itself or obj is not an instance of ThreadDeath.
java.lang.Thread
  Thread()
  Thread(Runnable target)
  Thread(String name)
  Thread(Runnable target, String name)

java.lang.ThreadGroup
  ThreadGroup(String name)
  ThreadGroup(ThreadGroup parent,
              String name)
checkAccess({parentThreadGroup}) java.lang.RuntimePermission "modifyThreadGroup"
java.lang.Thread
  Thread(ThreadGroup group, ...)

java.lang.ThreadGroup
  public final void checkAccess()
  public int enumerate(Thread list[])
  public int enumerate(Thread list[],
      boolean recurse)
  public int enumerate(ThreadGroup list[])
  public int enumerate(ThreadGroup list[],
      boolean recurse)
  public final ThreadGroup getParent()
  public final void
      setDaemon(boolean daemon)
  public final void setMaxPriority(int pri)
  public final void suspend()
  public final void resume()
  public final void destroy()
checkAccess(this) for ThreadGroup methods, or checkAccess(group) for Thread methods java.lang.RuntimePermission "modifyThreadGroup"
java.lang.ThreadGroup
  public final void interrupt()
checkAccess(this) Requires java.lang.RuntimePermission "modifyThreadGroup".
Also requires java.lang.RuntimePermission "modifyThread", since the java.lang.Thread interrupt() method is called for each thread in the thread group and in all of its subgroups. See the Thread interrupt() method.
java.lang.ThreadGroup
  public final void stop()
checkAccess(this) Requires java.lang.RuntimePermission "modifyThreadGroup".
Also requires java.lang.RuntimePermission "modifyThread" and possibly java.lang.RuntimePermission "stopThread", since the java.lang.Thread stop() method is called for each thread in the thread group and in all of its subgroups. See the Thread stop() method.
java.lang.reflect.AccessibleObject
  public static void setAccessible(...)
  public void setAccessible(...)
checkPermission java.lang.reflect.ReflectPermission "suppressAccessChecks"
java.net.Authenticator
  public static PasswordAuthentication
       requestPasswordAuthentication(
             InetAddress addr,
             int port,
             String protocol,
             String prompt,
             String scheme)
checkPermission java.net.NetPermission "requestPasswordAuthentication"
java.net.Authenticator
  public static void
      setDefault(Authenticator a)
checkPermission java.net.NetPermission "setDefaultAuthenticator"
java.net.MulticastSocket
  public void
      joinGroup(InetAddress mcastaddr)
  public void
      leaveGroup(InetAddress mcastaddr)
checkMulticast(InetAddress) java.net.SocketPermission( mcastaddr.getHostAddress(), "accept,connect")
java.net.DatagramSocket
  public void send(DatagramPacket p)
checkMulticast(p.getAddress()) or checkConnect(
p.getAddress().getHostAddress(), p.getPort()) 		if (p.getAddress().isMulticastAddress()) {
java.net.SocketPermission(
(p.getAddress()).getHostAddress(), "accept,connect")
}
else {
port = p.getPort();
host = p.getAddress().getHostAddress();
if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect"
}
java.net.MulticastSocket
  public synchronized void
      send(DatagramPacket p, byte ttl)
checkMulticast(p.getAddress(), ttl) or checkConnect(
p.getAddress().getHostAddress(), p.getPort()) 		if (p.getAddress().isMulticastAddress()) {
java.net.SocketPermission(
(p.getAddress()).getHostAddress(), "accept,connect")
}
else {
port = p.getPort();
host = p.getAddress().getHostAddress();
if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect"
}
java.net.InetAddress
  public String getHostName()
  public static InetAddress[]
                  getAllByName(String host)
  public static InetAddress getLocalHost()

java.net.DatagramSocket
  public InetAddress getLocalAddress()
checkConnect({host}, -1) java.net.SocketPermission "{host}", "resolve"
java.net.ServerSocket
  ServerSocket(...)

java.net.DatagramSocket
  DatagramSocket(...)

java.net.MulticastSocket
  MulticastSocket(...)
checkListen({port}) if (port == 0) java.net.SocketPermission "localhost:1024-","listen";
else java.net.SocketPermission "localhost:{port}","listen"
java.net.ServerSocket
  public Socket accept()
  protected final void implAccept(Socket s)
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept"
java.net.ServerSocket
  public static synchronized void
      setSocketFactory(...)

java.net.Socket
  public static synchronized void
      setSocketImplFactory(...)

java.net.URL
  public static synchronized void
      setURLStreamHandlerFactory(...)

 java.net.URLConnection
   public static synchronized void
      setContentHandlerFactory(...)
   public static void
      setFileNameMap(FileNameMap map)

java.net.HttpURLConnection
   public static void
       setFollowRedirects(boolean set)

java.rmi.activation.ActivationGroup
  public static synchronized
        ActivationGroup createGroup(...)
  public static synchronized void
      setSystem(ActivationSystem system)

java.rmi.server.RMISocketFactory
   public synchronized static void
      setSocketFactory(...)
checkSetFactory java.lang.RuntimePermission "setFactory"
java.net.Socket
  Socket(...)
checkConnect({host}, {port}) java.net.SocketPermission "{host}:{port}", "connect"
java.net.DatagramSocket
  public synchronized void
      receive(DatagramPacket p)
checkAccept({host}, {port}) java.net.SocketPermission "{host}:{port}", "accept"
java.net.URL
  URL(...)
checkPermission java.net.NetPermission "specifyStreamHandler"
java.net.URLClassLoader
  URLClassLoader(...)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.security.AccessControlContext
  public AccessControlContext(AccessControlContext acc,
                DomainCombiner combiner)
  public DomainCombiner getDomainCombiner()
checkPermission java.security.SecurityPermission "createAccessControlContext"
java.security.Identity
  public void addCertificate(...)
checkSecurityAccess(
"addIdentityCertificate") 		java.security.SecurityPermission "addIdentityCertificate"
java.security.Identity
  public void removeCertificate(...)
checkSecurityAccess(
"removeIdentityCertificate") 		java.security.SecurityPermission "removeIdentityCertificate"
java.security.Identity
  public void setInfo(String info)
checkSecurityAccess(
"setIdentityInfo") 		java.security.SecurityPermission "setIdentityInfo"
java.security.Identity
  public void setPublicKey(PublicKey key)
checkSecurityAccess(
"setIdentityPublicKey") 		java.security.SecurityPermission "setIdentityPublicKey"
java.security.Identity
  public String toString(...)
checkSecurityAccess(
"printIdentity") 		java.security.SecurityPermission "printIdentity"
java.security.IdentityScope
  protected static void setSystemScope()
checkSecurityAccess(
"setSystemScope") 		java.security.SecurityPermission "setSystemScope"
java.security.Permission
  public void checkGuard(Object object)
checkPermission(this) this Permission object is the permission checked
java.security.Policy
  public static Policy getPolicy()
checkPermission java.security.SecurityPermission "getPolicy"
java.security.Policy
  public static void
      setPolicy(Policy policy);
checkPermission java.security.SecurityPermission "setPolicy"
java.security.Provider
  public synchronized void clear()
checkSecurityAccess(
"clearProviderProperties."+{name}) 		java.security.SecurityPermission "clearProviderProperties.{name}" where name is the provider name.
java.security.Provider
  public synchronized Object
      put(Object key, Object value)
checkSecurityAccess(
"putProviderProperty."+{name}) 		java.security.SecurityPermission "putProviderProperty.{name}" where name is the provider name.
java.security.Provider
  public synchronized Object
      remove(Object key)
checkSecurityAccess(
"removeProviderProperty."+{name}) 		java.security.SecurityPermission "removeProviderProperty.{name}" where name is the provider name.
java.security.SecureClassLoader
  SecureClassLoader(...)
checkCreateClassLoader java.lang.RuntimePermission "createClassLoader"
java.security.Security
  public static void getProperty(String key)
checkPermission java.security.SecurityPermission "getProperty.{key}"
java.security.Security
  public static int
      addProvider(Provider provider)
  public static int
      insertProviderAt(Provider provider,
                       int position);
checkSecurityAccess(
"insertProvider."+provider.getName()) 		java.security.SecurityPermission "insertProvider.{name}"
java.security.Security
  public static void
      removeProvider(String name)
checkSecurityAccess(
"removeProvider."+name) 		java.security.SecurityPermission "removeProvider.{name}"
java.security.Security
  public static void
    setProperty(String key, String datum)
checkSecurityAccess(
"setProperty."+key) 		java.security.SecurityPermission "setProperty.{key}"
java.security.Signer
  public PrivateKey getPrivateKey()
checkSecurityAccess(
"getSignerPrivateKey") 		java.security.SecurityPermission "getSignerPrivateKey"
java.security.Signer
  public final void
      setKeyPair(KeyPair pair)
checkSecurityAccess(
"setSignerKeypair") 		java.security.SecurityPermission "setSignerKeypair"
java.sql.DriverManager
  public static synchronized void
      setLogWriter(PrintWriter out)
checkPermission java.sql.SQLPermission "setLog"
java.sql.DriverManager
  public static synchronized void
      setLogStream(PrintWriter out)
checkPermission java.sql.SQLPermission "setLog"
java.util.Locale
  public static synchronized void
            setDefault(Locale newLocale)
checkPermission java.util.PropertyPermission "user.language","write"
java.util.zip.ZipFile
  ZipFile(String name)
checkRead java.io.FilePermission "{name}","read"

java.lang.SecurityManager Method Permission Checks

This table shows which permissions are checked for by the default implementations of the java.lang.SecurityManager methods.

Each of the specified check methods calls the SecurityManager checkPermission method with the specified permission, except for the checkConnect and checkRead methods that take a context argument. Those methods expect the context to be an AccessControlContext and they call the context's checkPermission method with the specified permission.

Method | Permission
public void checkAccept(String host, int port); | java.net.SocketPermission "{host}:{port}", "accept";
public void checkAccess(Thread g); | java.lang.RuntimePermission "modifyThread");
public void checkAccess(ThreadGroup g); | java.lang.RuntimePermission "modifyThreadGroup");
public void checkAwtEventQueueAccess(); | java.awt.AWTPermission "accessEventQueue";
public void checkConnect(String host, int port); if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect";
public void checkConnect(String host, int port, Object context); if (port == -1) java.net.SocketPermission "{host}","resolve";
else java.net.SocketPermission "{host}:{port}","connect";
public void checkCreateClassLoader(); | java.lang.RuntimePermission "createClassLoader";
public void checkDelete(String file); | java.io.FilePermission "{file}", "delete";
public void checkExec(String cmd); if cmd is an absolute path: java.io.FilePermission "{cmd}", "execute";
else java.io.FilePermission "-", "execute";
public void checkExit(int status); | java.lang.RuntimePermission "exitVM");
public void checkLink(String lib); | java.lang.RuntimePermission "loadLibrary.{lib}";
public void checkListen(int port); if (port == 0) java.net.SocketPermission "localhost:1024-","listen";
else java.net.SocketPermission "localhost:{port}","listen";
public void checkMemberAccess(Class clazz, int which);
if (which != Member.PUBLIC) {
  if (currentClassLoader() != clazz.getClassLoader()) {
    checkPermission(
      new java.lang.RuntimePermission("accessDeclaredMembers"));
  }
}
public void checkMulticast(InetAddress maddr); | java.net.SocketPermission(maddr.getHostAddress(),"accept,connect");
public void checkMulticast(InetAddress maddr, byte ttl); | java.net.SocketPermission(maddr.getHostAddress(),"accept,connect");
public void checkPackageAccess(String pkg); | java.lang.RuntimePermission "accessClassInPackage.{pkg}";
public void checkPackageDefinition(String pkg); | java.lang.RuntimePermission "defineClassInPackage.{pkg}";
public void checkPrintJobAccess(); | java.lang.RuntimePermission "queuePrintJob";
public void checkPropertiesAccess(); | java.util.PropertyPermission "*", "read,write";
public void checkPropertyAccess(String key); | java.util.PropertyPermission "{key}", "read,write";
public void checkRead(FileDescriptor fd); | java.lang.RuntimePermission "readFileDescriptor";
public void checkRead(String file); | java.io.FilePermission "{file}", "read";
public void checkRead(String file, Object context); | java.io.FilePermission "{file}", "read";
public void checkSecurityAccess(String action); | java.security.SecurityPermission "{action}";
public void checkSetFactory(); | java.lang.RuntimePermission "setFactory";
public void checkSystemClipboardAccess(); | java.awt.AWTPermission "accessClipboard";
public boolean checkTopLevelWindow(Object window); | java.awt.AWTPermission "showWindowWithoutWarningBanner";
public void checkWrite(FileDescriptor fd); | java.lang.RuntimePermission "writeFileDescriptor";
public void checkWrite(String file); | java.io.FilePermission "{file}", "write";
public SecurityManager(); | java.lang.RuntimePermission "createSecurityManager";

Copyright © 1997-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com 		Sun
Java Software


Security

Java

Security enhancements and changes
JavaTM 2 SDK, Standard Edition, v 1.3

 Documentation Contents

trustProxy Property Now true by Default
In version 1.3 of the Java Plug-in, the trustProxy property is set to true by default. In previous releases of the Java platform, trustProxy was false by default.

Reason for the change:
To prevent DNS spoofing, a security check in Java Plug-in requires the server-side host name to be resolved into an IP address before any connection is made from the applet. As part of this security check, the client-side intranet DNS server must be able to resolve external host names from the Internet. However, the DNS servers within many enterprise networks are not able to perform this resolution due to firewall or other security restrictions on the enterprise site. The trustProxy property has been set to true by default so that in such cases the Java Plug-in will defer the DNS name resolution to the client site's proxy server.

Security implication of the change:
Because the DNS lookup can be delegated to the proxy server when the trustProxy property is true, care should be taken that the proxy server will not expose the local site to DNS spoofing attacks. The proxy server should consistently map a given host name to the same IP address and should never map an Internet server host name to the IP address of a machine on the local, client-side intranet. If the proxy server cannot be trusted to always provide unique host-name/IP-address mappings or cannot distinguish between internal and external IP addresses, network administrators may want to set the trustProxy property equal to false. This can be done by entering -DtrustProxy=false in the Java Run Time Parameters field of the Java Plug-in Control Panel. When trustProxy is false, DNS lookup will be up to the client-side intranet DNS server and will not be delegated to the proxy server. This will mean, however, that applets will not be able to be downloaded over the Internet whenever the intranet DNS server cannot resolve the applet server's host name.

New Classes/Interfaces

  • java.security.spec.RSAKeyGenParameterSpec

    New class java.security.spec.RSAKeyGenParameterSpec makes it possible to specify both the size of the (to-be-generated) public modulus and the value of the public exponent when generating an RSA keypair.

  • java.security.DomainCombiner

    New interface java.security.DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.

  • java.security.interfaces.RSAKey

    New interface java.security.interfaces.RSAKey allows generic examination of keys before examining them in detail. java.security.interfaces.RSAPublicKey.getModulus() and java.security.interfaces.RSAPrivateKey.getModulus() have been moved to this interface. The existing RSAPublicKey and RSAPrivateKey interfaces now extend off of this new interface.

Modified Classes/Interfaces

  • java.security.BasicPermission and java.lang.System

    Constructors for class java.security.BasicPermission have been modified to:

    • raise a NullPointerException if the permission name is null
    • raise an IllegalArgumentException if the permission name is empty

    Before, these conditions were ignored.

    The change also affects the behavior of java.lang.System.getProperty(String key) and java.lang.System.getProperty(String key, String def) whose implementations construct an instance of java.util.PropertyPermission, a subclass of java.security.BasicPermission. Under the change, a call to java.lang.System.getProperty() or java.lang.System.setProperty() with an empty property name will result in an IllegalArgumentException.

  • java.security.interfaces.RSAPrivateKey and java.security.interfaces.RSAPublicKey

    The method getModulus() of java.security.interfaces.RSAPublicKey and java.security.interfaces.RSAPrivateKey has been moved to java.security.interfaces.RSAKey. See above.

  • java.security.KeyPairGenerator

    The method java.security.KeyPairGenerator.generateKeyPair() has been restored to ensure backwards compatibility with JDK 1.1.x.

  • java.security.Security

    Two new methods have been added to java.security.Security, making it possible to select service providers based on the capabilities that they offer:

    • public static Provider[] getProviders(java.util.Map filter)
    • public static Provider[] getProviders(String filter)

  • java.security.Signature

    A new signature verification method has been added to java.security.Signature, and this new method is FIPS 140-1 compliant. FIPS 140-1 requires a public key to be passed as a certificate, which is accomplished through the addition of:

    • Signature.initVerify(Certificate certificate)

Miscellaneous Information

  • Support for RSA signatures and related services is supplied by a Cryptographic Service Provider to the Java Cryptography Architecture (JCA), which is packaged as a JAR file and provided on the bootstrap classpath of the JRE.

  • A new command line option ("-provider") has been added to keytool and jarsigner which allows the user to specify a particular service provider not listed in the security properties file of the Java Runtime Environment (JRE).

  • Enhancements have been made to support all X.520 attributes that are either mandated or recommended by PKIX RFC 2459.

  • Jarsigner can now verify Netscape-signed jar files.

  • The handling of X509 certificates has been updated to include support for multiple Attribute/Value Assertions (AVA's) within a Relative Distinguished Name (RDN).

  • Java 2 SDK v 1.3 now fully interoperates with Verisign's code signing certificates. keytool is now able to import Verisign certificates.

  • The 1.2.2 FCS plug-in release required an exact match (including validity period) of the JAR signer's root CA certificate (fingerprint) with one in Microsoft's Internet Explorer (IE) CA store on the executing platform.

    This algorithm was too restrictive, due to the proliferation of valid, but different root CA certificates (expiring in 2004, 2018, 2028, etc.) in various incarnations of IE's CA store. This date match algorithm was removed. IE's CA store is used for verification in the executing environment, whether using Netscape or IE as the browser. For more information, please see:

    http://java.sun.com/products/plugin/1.2/docs/nsobjsigning.html

  • Jar files containing support classes for applets can be placed in the Plug-in lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be preloaded from the local file system by the applet classloader, providing the same protections as if they had been downloaded over the network.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


Security Managers and the Java 2 SDK

Security Managers and the JavaTM 2 SDK

Last Modified: 19 October, 1998

Introduction
Security Model Evolution
Security Manager Evolution
Security Manager Methods
Security Managers in JDK 1.1
Security Managers in the Java 2 SDK
Installing java.lang.SecurityManager as the Default Security Manager
Changes to Methods For Class Loaders And Class Loader Depth
How to Port 1.1-Style Security Managers
SecurityManager Method Changes and Override Advice

Introduction

This document describes changes made to the security manager in the Java 2 SDK that allow it to be used as-is as the default security manager in applications.

Security Model Evolution

In JDK 1.1, local applications and correctly digitally signed applets were generally trusted to have full access to vital system resources, such as the file system, while unsigned applets were not trusted and could access only limited resources. A security manager was responsible for determining which resource accesses were allowed.

The Java 2 SDK security architecture is policy-based, and allows for fine-grained access control. When code is loaded, it is assigned "permissions" based on the security policy currently in effect. Each permission specifies a permitted access to a particular resource, such as "read" and "write" access to a specified file or directory, or "connect" access to a given host and port. The policy, specifying which permissions are available for code from various signers/locations, can be initialized from an external configurable policy file. Unless a permission is explicitly granted to code, it cannot access the resource that is guarded by that permission. These new concepts of permission and policy enable the SDK to offer fine-grain, highly configurable, flexible, and extensible access control. Such access control can now not only be specified for applets, but also for all Java code, including applications, beans, and servlets.

For more information on the Java 2 SDK security architecture, please see the security documentaton.

Security Manager Evolution

Security Manager Methods

In both JDK 1.1 and the Java 2 SDK, the SecurityManager class contains many methods with names that begin with the word check. Examples are checkRead and checkConnect. Various methods in the Java libraries call a check method before performing each potentially security-sensitive operation. The security manager is thereby given an opportunity to prevent completion of the operation by throwing an exception. A security manager routine simply returns if the operation is permitted, but throws a SecurityException if the operation is not permitted. The only exception to this convention is checkTopLevelWindow, which returns a boolean value.

The other main type of methods contained in the SecurityManager class are those related to class loader existence and depth:

  • currentClassLoader
  • currentLoadedClass
  • inClassLoader
  • classLoaderDepth

Security Managers in JDK 1.1

In JDK 1.1, the class java.lang.SecurityManager was an abstract class. The default implementations of the security manager check methods threw exceptions. The class loader and depth-related classes were appropriately implemented, often in native code.

Any application (such as a browser) that wanted to install a security manager had to write their own, providing appropriate concrete implementations of the methods that threw exceptions by default -- primarily the check methods.

Security managers based on the JDK 1.1 applet security manager model typically based access control decisions on two things:

  1. Whether or not a class with a class loader (i.e., an applet in JDK 1.1) was on the stack.

  2. The class loader depth -- how far down the stack was the most recent occurrence of a method from a class defined using a class loader.

These types of decisions were made by calling the SecurityManager methods related to class loader existence and depth. For example, a typical 1.1-style security manager might have a checkExit method like the following:

     public void checkExit(int status) {
       if (inClassLoader()) {
        throw new SecurityException(..);
       }
     }

Such a checkExit method would not allow Runtime.exit to be called when any class defined with a class loader (an applet) was on the stack. This is an example of the first case, checking whether or not a class with a class loader is on the stack. An example of the second case (class loader depth) would be something like:

      public void checkCreateClassLoader() {
         if (classLoaderDepth() == 2) {
            throw new SecurityException();
         }
      }

This method is saying that the class loader depth can't be 2. That is, the method that called the method that called checkCreateClassLoader must not be in a class defined with a class loader. For example, the constructor for java.lang.ClassLoader calls checkCreateClassLoader, which means the method that calls the constructor for java.lang.ClassLoader must not have a class loader. This means applets can't directly create class loaders.

Note that there is a big difference between the two methods, even though both attempt to prevent applets from performing actions. In the first case, checkExit will throw an exception if an applet is anywhere on the stack. That means even built-in JDK code can't exit the VM if it was called from an applet. In the second case, JDK code is allowed to create a class loader, even if it was called by an applet. That is because the depth of a class with a class loader is used, and not the fact that there is one.

Security Managers in the Java 2 SDK

In the Java 2 SDK, the class java.lang.SecurityManager had a number of changes made to it in order to allow it to be used as the default security manager for applications. In particular:

  • It is no longer an abstract class, and can thus be installed as-is.

  • Most check methods call a new checkPermission method, which by default calls the method of the same name (checkPermission) in the new AccessController class. Those methods that don't call checkPermission have reasonable defaults.

  • Methods used in JDK 1.1 to determine if a class loader is on the stack and/or to calculate class loader depth have been modified in the Java 2 SDK to ignore system class loaders and security contexts that have been granted java.security.AllPermission.

Installing java.lang.SecurityManager as the Default Security Manager

Since java.lang.SecurityManager is no longer abstract, you can install and use it as the default security manager. You can do this by setting a system property when launching the VM:

    java -Djava.security.manager YourApp
Alternatively, your application can install it directly via the following line of code:
    System.setSecurityManager(new SecurityManager());
You can customize the behavior of the default security manager by modifying policy files. See the security guide on policy files for more information.

Changes to Methods For Class Loaders And Class Loader Depth

In the Java 2 SDK, the SecurityManager methods related to class loaders and class loader depth are not called by any of the check methods, and they are deprecated. They should not be used by any new security managers, and it is recommended that their use be eliminated from existing security managers as well. However, they are left in for backward compatibility and they have been modified in an attempt to enable old 1.1-style security managers to still work under the Java 2 SDK, without modification.

These methods are:

  • currentClassLoader
  • currentLoadedClass
  • inClassLoader
  • classLoaderDepth

Modification of Class Loader/Depth-related Methods

The class loader/depth related methods have all been modified in three ways:

  1. These methods skip system class loaders. A system class loader is defined as being a class loader that is equal to the system class loader (as returned by ClassLoader.getSystemClassLoader) or one of its ancestors.

    Since classes loaded by the system class loader include application classes (loaded off of CLASSPATH), extension classes, and the built-in SDK classes, this modification enables these methods to ignore such code.

    Note that if you run an application that installs a custom security manager, and that security manager is loaded off of CLASSPATH in the Java 2 SDK, it will have a system class loader associated with it. (Application classes did not have a class loader in JDK 1.1.) If you were to call a method like classLoaderDepth from within the custom security manager, and that method were not modified to ignore classes loaded by a system class loader, it would always return 0, which would not be very useful. Similarly, if class loader methods weren't changed to skip system classes and a custom security manager was loaded off of CLASSPATH, then this might also open up security holes in cases where the security manager is making decisions based on, for example, disallowing an operation if "classLoaderDepth() == 2". (It should really be "classLoaderDepth() <= 2".)

  2. These methods stop checking after they reach a method on the stack that has been marked as "privileged." (See java.security.AccessController.doPrivileged() and API for Privileged Blocks.)

  3. These methods treat security contexts that have been granted AllPermission as if there is no class loader on the stack.

As an example of the use of the first two modifications, note that there are now places in the SDK that open files, etc., after a security manager has been installed. Some 1.1-style security managers have a checkRead method that looks like the following:

       public void checkRead(String file) {
         if (inClassLoader()) {
          throw new SecurityException(..);
         }
       }

Without SDK code modifications, such a check run in the Java 2 SDK would cause a security exception to be thrown when the SDK itself tries to read a file and there is a class with a non-system class loader on the stack. With the new security model, all such SDK code that tries to perform an operation that its caller might not be allowed to do has a doPrivileged block around it. Since inClassLoader just examines the stack up to and including the frame containing the "privileged" code, and the code at the top of the stack is SDK code, which is loaded by the system class loader or one of its ancestors, the inClassLoader method will return false, allowing the read to occur.

Maintenance of Class Loader Depths

As noted previously, security managers based on the 1.1 applet security manager based some of their access control decisions on class loader depth. As an example, the checkCreateClassLoader method previously presented is repeated here:

       public void checkCreateClassLoader() {
          if (classLoaderDepth() == 2) {
             throw new SecurityException();
          }
       }
In the Java 2 SDK we have attempted to maintain the stack depth as used in 1.1-style security managers. For example, the constructor for java.security.SecureClassLoader has an explicit call to SecurityManager.checkCreateClassLoader even though the constructor for its super class (ClassLoader) also does. If the check was not placed in the constructor for SecureClassLoader, then a 1.1-style security manager would allow untrusted code to extend SecureClassLoader and construct class loaders, as the class loader depth would always be greater than 2.

How to Port 1.1-Style Security Managers

First and foremost, we highly recommend analyzing all your custom security manager methods before running your security manager under the Java 2 SDK. Failure to do so could result in a security hole or prevent the proper operation of the SDK. This is due to the fragile nature of 1.1-style security managers.

Where possible, you should just use the default implementation of the 1.2 SecurityManager. This helps give users and administrators consistent behavior. If this is not possible, then you should at least try to call super.checkXXX in your checkXXX method before throwing a security exception. Doing so will allow the access controller algorithm to be used, and will allow the SDK itself to function correctly.

In the Java 2 SDK, any existing code that used to call any of the SecurityManager check methods continues to do so. For new code that requires a security check, calls are made to SecurityManager.checkPermission instead of adding a new SecurityManager check method. For example, the new java.lang.System.setProperty method calls checkPermission with a java.util.PropertyPermission permission.

When extending the SecurityManager class and overriding existing methods, some care should be taken. For example, if you override the checkRead(String file) method so it always throws a security exception, then the SDK itself may fail to operate properly. That is, if some SDK code needs to open a file (to read a properties file, load a JAR file, etc.) then throwing a security exception for every read attempt would cause such opens to always fail.

In general, you should only override the default methods if you intend to loosen security, not to make it stronger. If you want to tighten security, you should modify the default policy files and/or install a custom java.security.Policy object. See the security guide on policy files for more information.

In general, when overriding security manager methods you should place a call to the super.checkXXX method at the point where your overridden checkXXX method would throw an exception. For example:

      public class MySecurityManager extends SecurityManager {

        public void checkRead(String file) {
          if (someCustomSecurityCheckFails()) {
             super.checkRead(file);
          }
        }
      }
If your custom security check fails, then super.checkRead gets called. The default implementation of checkRead invokes checkPermission, which by default consults the AccessController. By invoking the AccessController, system code that has done an AccessController.doPrivileged before trying to read a file will succeed in reading that file. All other code will be subjected to the current policy in effect, and an access control exception will be thrown if access to that file has not been granted.

Note, there are some checkXXX methods in which you should not call super.checkXXX methods when overriding them. That is because the default implementation of these methods may not be as strict as the policy you are implementing in the overridden method. For example, the default checkAccess(ThreadGroup g) method only protects the system thread group. If you intend to protect threads in distinct thread groups from each other (for example applet thread groups), then you would not want to call super.checkAccess at the point you would normally throw a security exception, as that would defeat the purpose of your customized check. Instead, you could place a call to super.checkAccess as the first statement in your overridden method.

For example:

      public class AppletSecurityManager extends SecurityManager {

        public void checkAccess(ThreadGroup g) {
          // a call to super will throw an exception if someone
          // is trying to modify the system thread group
          super.checkAccess(g);
          ...
          // now perform checks based on which applet thread group
          // the current caller is in to see if they can modify thread group g.
          ...
      }

We describe how to override each method in the following section.

SecurityManager Method Changes and Override Advice

This section lists changes made to java.lang.SecurityManager methods in the Java 2 SDK and provides suggestions regarding any overrides you may wish to make. Please see the Java documentation for the SecurityManager class for more information on these methods.

protected boolean inCheck

This field has been deprecated, and any uses of this field within the SDK itself have been removed. Instead of using inCheck, you should use checkPermission along with doPrivileged.

public boolean getInCheck();

This method has also been deprecated.

public SecurityManager();

The constructor has been modified to allow multiple SecurityManagers to be created, assuming the caller has the RuntimePermission("createSecurityManager") permission.

protected native Class[] getClassContext();

No changes. This call can be used to emulate the 1.1 behavior of the methods that have been changed in the Java 2 SDK ( currentClassLoader, currentLoadedClass, classLoaderDepth, inClassLoader).

protected ClassLoader currentClassLoader();

The typical use of this method in JDK 1.1-style security managers was to see if there was a class loader on the stack, and if not, treat the code as "trusted" and allow it to do anything. This method has been modified in the Java 2 SDK to allow trusted SDK code (actually any code granted java.security.AllPermission) that calls doPrivileged to be treated as trusted by 1.1-style security managers. It has also been modified to skip system class loaders. A system class loader is defined as being a class loader that is equal to the system class loader (as returned by ClassLoader.getSystemClassLoader) or one of its ancestors.

This method will return null in the following three cases:

  1. All methods on the execution stack are from classes defined using the system class loader or one of its ancestors.
  2. All methods on the execution stack up to the first "privileged" caller (see java.security.AccessController.doPrivileged) are from classes defined using the system class loader or one of its ancestors.
  3. A call to checkPermission with java.security.AllPermission does not result in a SecurityException.

This method has been deprecated. Use checkPermission instead.

protected Class currentLoadedClass();

This method has been modified in the same fashion as currentClassLoader, and will return null if the current security context has been granted AllPermission or all the methods on the stack (up to the first privileged caller, if any) are from classes defined using the system class loader or one of its ancestors.

This method has been deprecated. Use checkPermission instead.

protected int classDepth(String name);

No changes in behavior. This method has been deprecated. Use checkPermission instead.

protected int classLoaderDepth();

This method has been modified in the same fashion as currentClassLoader, and will return -1 if the current security context has been granted AllPermission or all the methods on the stack (up to the first privileged caller, if any) are from classes defined using the system class loader or one of its ancestors.

This method has been deprecated. Use checkPermission instead.

protected boolean inClass(String name);

No changes in behavior. This method has been deprecated. Use checkPermission instead.

protected boolean inClassLoader();

This method returns true if currentClassLoader returns a non-null class loader, so it follows the same semantics that currentClassLoader does.

This method has been deprecated. Use checkPermission instead.

public Object getSecurityContext();

This method returns a java.security.AccessControlContext object that is created with a call to java.security.AccessController.getContext. In JDK1.1 it returned null by default.

public void checkPermission(Permission perm);

This method is new in the Java 2 SDK. It calls java.security.AccessController.checkPermission with the given permission. Internally, the SDK always calls SecurityManager.checkPermission instead of calling the AccessController directly. This allows people to override this method to provide additional functionality such as auditing and/or GUI dialogs.

public void checkPermission(Permission perm, Object context);

This method is new in the Java 2 SDK. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the specified permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

public void checkCreateClassLoader();

This method has been modified to call checkPermission with the RuntimePermission("createClassLoader") permission.

If this method is overridden, then a call to super.checkCreateClassLoader should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkCreateClassLoader() {
      if (someCustomSecurityCheckFails()) {
        super.checkCreateClassLoader();
      }
    }
  }

public void checkAccess(Thread t);

If the thread argument is a system thread (belongs to the thread group with a null parent) then this method calls checkPermission with the RuntimePermission("modifyThread") permission.

Applications that want a stricter policy should override this method.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

If this method is overridden, the method that overrides it should additionally check to see if the calling thread has the RuntimePermission("modifyThread") permission, and if so, return silently. This is to ensure that code granted that permission (such as the SDK itself) is allowed to manipulate any thread.

For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccess(Thread t) {
      // a call to super will throw an exception if someone
      // is trying to modify a system thread
      super.checkAccess(t);
      ...
      if (someCustomSecurityCheckForOtherThreadsFails()) {
        // if the check fails, instead of throwing an exception,
        // call checkPermission, which will throw an exception
        // if need be
        checkPermission(new RuntimePermission("modifyThread"));
      }
      ...
    }
  }

public void checkAccess(ThreadGroup g);

If the thread group argument is the system thread group (has a null parent) then this method calls checkPermission with the RuntimePermission("modifyThreadGroup") permission.

Applications that want a stricter policy should override this method.

If this method is overridden, then super.checkAccess should be called by the first statement in the overridden method, or the equivalent security check should be placed in the overridden method.

If this method is overridden, the method that overrides it should additionally check to see if the caller has the RuntimePermission("modifyThreadGroup") permission, and if so, return silently. This is to ensure that code granted that permission (such as the SDK itself) is allowed to manipulate any thread group.

For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccess(ThreadGroup g) {
      // a call to super will throw an exception if someone
      // is trying to modify the system thread group
      super.checkAccess(g);
      ...
      if (someCustomSecurityCheckForOtherThreadGroupsFails()) {
        // if the check fails, instead of throwing an exception,
        // call checkPermission, which will throw an exception
        // if need be
        checkPermission(new RuntimePermission("modifyThreadGroup"));
      }
      ...
    }
  }

public void checkExit(int status);

This method has been modified to call checkPermission with the RuntimePermission("exitVM") permission.

If this method is overridden, then a call to super.checkExit should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkExit(int status) {
      if (someCustomSecurityCheckFails()) {
        super.checkExit(status);
      }
    }
  }

public void checkExec(String cmd);

This method has been modified to call checkPermission with a FilePermission. If the cmd is an absolute path (see java.io.File.isAbsolute) then it is passed as-is as the target for the FilePermission. If cmd is not absolute, then the special target "<<ALL FILES>>" is used. This target is used because it is difficult to determine the actual path of the command that will be executed on an individual platform due to things such as environment variables, etc.

If this method is overridden, then a call to super.checkExec should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkExec(String cmd) {
      if (someCustomSecurityCheckFails()) {
        super.checkExec(cmd);
      }
    }
  }

public void checkLink(String lib);

This method has been modified to call checkPermission with the RuntimePermission("loadLibrary."+lib) permission.

If this method is overridden, then a call to super.checkLink should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkLink(String lib) {
      if (someCustomSecurityCheckFails()) {
        super.checkLink(lib);
      }
    }
  }

public void checkRead(FileDescriptor fd);

This method has been modified to call checkPermission with the RuntimePermission("readFileDescriptor") permission.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(FileDescriptor fd) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(fd);
      }
    }
  }

public void checkRead(String file);

This method has been modified to call checkPermission with the FilePermission(file,"read") permission.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(file);
      }
    }
  }

public void checkRead(String file, Object context);

This method has been modified. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the FilePermission(file,"read") permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

If this method is overridden, then a call to super.checkRead should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkRead(String file, Object context) {
      if (someCustomSecurityCheckFails()) {
        super.checkRead(file, context);
      }
    }
  }

public void checkWrite(FileDescriptor fd);

This method has been modified to call checkPermission with the RuntimePermission("writeFileDescriptor") permission.

If this method is overridden, then a call to super.checkWrite should be made at the point the overridden method would normally throw an exception. For Example:

  public class MySecurityManager extends SecurityManager {

    public void checkWrite(FileDescriptor fd) {
      if (someCustomSecurityCheckFails()) {
        super.checkWrite(fd);
      }
    }
  }

public void checkWrite(String file);

This method has been modified to call checkPermission with the FilePermission(file,"write") permission.

If this method is overridden, then a call to super.checkWrite should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkWrite(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkWrite(file);
      }
    }
  }

public void checkDelete(String file);

This method has been modified to call checkPermission with the FilePermission(file,"delete") permission.

If this method is overridden, then a call to super.checkDelete should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkDelete(String file) {
      if (someCustomSecurityCheckFails()) {
        super.checkDelete(file);
      }
    }
  }

public void checkConnect(String host, int port);

This method has been modified to call checkPermission with the SocketPermission(host+":"+port,"connect") permission if the port is not equal to -1. If the port is equal to -1, then it calls checkPermission with the SocketPermission(host,"resolve") permission.

This behavior is consistent with JDK 1.1, where a port equal to -1 indicates that an IP address lookup is being performed.

If this method is overridden, then a call to super.checkConnect should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkConnect(String host, int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkConnect(host, port);
      }
    }
  }

public void checkConnect(String host, int port, Object context);

This method has been modified. If context is an instance of AccessControlContext then the AccessControlContext.checkPermission method will be invoked on the given context with the SocketPermission(host+":"+port,"connect") permission if the port is not equal to -1. If the port is equal to -1, then it calls checkPermission with the SocketPermission(host,"resolve") permission.

If context is not an instance of AccessControlContext then a SecurityException is thrown.

If this method is overridden, then a call to super.checkConnect should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkConnect(String host, int port, Object context) {
      if (someCustomSecurityCheckFails()) {
        super.checkConnect(host, port, context);
      }
    }
  }

public void checkListen(int port)

This method has been modified. If port is not 0, it calls checkPermission with the SocketPermission("localhost:"+port,"listen"). If port is zero, it calls checkPermission with SocketPermission("localhost:1024-","listen").

If this method is overridden, then a call to super.checkListen should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkListen(int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkListen(port);
      }
    }
  }

public void checkAccept(String host, int port);

This method has been modified to call checkPermission with the SocketPermission(host+":"+port,"accept") permission.

If this method is overridden, then a call to super.checkAccept should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAccept(String host, int port) {
      if (someCustomSecurityCheckFails()) {
        super.checkAccept(host, port);
      }
    }
  }

public void checkMulticast(InetAddress maddr);

This method has been modified to call checkPermission with the SocketPermission(maddr.getHostAddress(),"accept,connect") permission.

If this method is overridden, then a call to super.checkMulticast should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkMultiCast(InetAddress maddr) {
      if (someCustomSecurityCheckFails()) {
        super.checkMultiCast(maddr);
      }
    }
  }

public void checkMulticast(InetAddress maddr, byte ttl);

This method has been modified to call checkPermission with the SocketPermission(maddr.getHostAddress(),"accept,connect") permission.

If this method is overridden, then a call to super.checkMulticast should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkMultiCast(InetAddress maddr, byte ttl) {
      if (someCustomSecurityCheckFails()) {
        super.checkMultiCast(maddr, ttl);
      }
    }
  }

public void checkPropertiesAccess();

This method has been modified to call checkPermission with the PropertyPermission("*", "read,write") permission.

If this method is overridden, then a call to super.checkPropertiesAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPropertiesAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkPropertiesAccess();
      }
    }
  }

public void checkPropertyAccess(String key);

This method has been modified to call checkPermission with the PropertyPermission(key, "read") permission.

If this method is overridden, then a call to super.checkPropertyAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPropertyAccess(String key) {
      if (someCustomSecurityCheckFails()) {
        super.checkPropertiesAccess(key);
      }
    }
  }

public boolean checkTopLevelWindow(Object window);

This method has been modified to call checkPermission with the AWTPermission("showWindowWithoutWarningBanner") permission, and returns true if an SecurityException is not thrown, otherwise it returns false.

If this method is overridden, then a call to super.checkTopLevelWindow should be made at the point the overridden method would normally return false, and the value of super.checkTopLevelWindow should be returned. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkTopLevelWindow(Object window) {
      if (someCustomSecurityCheckFails()) {
        return super.checkTopLevelWindow(window);
      } else {
        return true;
      }
    }
  }

public void checkPrintJobAccess();

This method has been modified to call checkPermission with the RuntimePermission("queuePrintJob") permission.

If this method is overridden, then a call to super.checkPrintJobAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPrintJobAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkPrintJobAccess();
      }
    }
  }

public void checkSystemClipboardAccess();

This method has been modified to call checkPermission with the AWTPermission("accessClipboard") permission.

If this method is overridden, then a call to super.checkSystemClipboardAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSystemClipboardAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkSystemClipboardAccess();
      }
    }
  }

public void checkAwtEventQueueAccess();

This method has been modified to call checkPermission with the AWTPermission("accessEventQueue") permission.

If this method is overridden, then a call to super.checkAwtEventQueueAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkAwtEventQueueAccess() {
      if (someCustomSecurityCheckFails()) {
        super.checkAwtEventQueueAccess();
      }
    }
  }

public void checkPackageAccess(String pkg);

This method has been modified. It first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.access"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("accessClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageAccess should be called as the first line in the overridden method. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPackageAccess(String pkg) {
      super.checkPackageAccess(pkg);
      ...
      someCustomSecurityCheck();
      ...
    }
  }

public void checkPackageDefinition(String pkg);

This method has been modified. It first gets a list of restricted packages by obtaining a comma-separated list from a call to java.security.Security.getProperty("package.definition"), and checks to see if pkg starts with or equals any of the restricted packages. If it does, then checkPermission gets called with the RuntimePermission("defineClassInPackage."+pkg) permission.

If this method is overridden, then super.checkPackageDefinition should be called as the first line in the overridden method. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkPackageDefinition(String pkg) {
      super.checkPackageDefinition(pkg);
      ...
      someCustomSecurityCheck();
      ...
    }
  }

public void checkSetFactory();

This method has been modified to call checkPermission with the RuntimePermission("setFactory") permission.

If this method is overridden, then a call to super.checkSetFactory should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSetFactory() {
      if (someCustomSecurityCheckFails()) {
        super.checkSetFactory();
      }
    }
  }

public void checkMemberAccess(Class clazz, int which);

This method has been modified. The default policy is to allow access to PUBLIC members, as well as access to classes that have the same class loader as the caller. In all other cases call checkPermission with the RuntimePermission("accessDeclaredMembers") permission.

If this method is overridden, then a call to super.checkMemberAccess cannot be made, as the default implementation of checkMemberAccess relies on the code being checked being at a stack depth of 4. For example:

     someCaller[3]
     java.lang.Class.someReflectionAPI [2]
     java.lang.Class.checkMemberAccess [1]
     SecurityManager.checkMemberAccess [0]
In order to emulate this behavior, you would need to call getClassContext, and examine the class loader of the class at index 3, just as the default checkMemberAccess method does:
  if (which != Member.PUBLIC) {
    Class stack[] = getClassContext();
    /*
     * stack depth of 4 should be the caller of one of the
     * methods in java.lang.Class that invoke checkMember
     * access. The stack should look like:
     *
     * someCaller [3]
     * java.lang.Class.someReflectionAPI  [2]
     * java.lang.Class.checkMemberAccess [1]
     * MySecurityManager.checkMemberAccess [0]
     *
     */
    if ((stack.length<4) ||
      (stack[3].getClassLoader() != clazz.getClassLoader())) {
      if (checkMemberAccessPermission == null)
        checkMemberAccessPermission =
          new RuntimePermission("accessDeclaredMembers");
      checkPermission(checkMemberAccessPermission);
    }
  }

This is the only security manager method in the Java 2 SDK that is still based on a caller's depth. This is to allow a caller to reflect on classes from the same class loader it came from.

public void checkSecurityAccess(String target);

This method has been modified to create a SecurityPermission object for the given permission target name and calls checkPermission with it.

If this method is overridden, then a call to super.checkSecurityAccess should be made at the point the overridden method would normally throw an exception. For example:

  public class MySecurityManager extends SecurityManager {

    public void checkSecurityAccess(String target) {
      if (someCustomSecurityCheckFails()) {
        super.checkSecurityAccess(target);
      }
    }
  }

public ThreadGroup getThreadGroup();

This method has not been changed.

Copyright © 1997-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-security@sun.com. This is not a subscription list. 		Sun
Java Software


Contents

CONTENTS | PREV | NEXT

JavaTM 2 Platform Security Architecture

Author: Li Gong (li.gong@sun.com)

Date: October 2, 1998

Version 1.0

This document gives an overview of the motivation of the major security features that are being implemented for JavaTM 2 Platform Security, introduces the new classes and their usage, discusses the impact of this new architecture on existing code, and gives thoughts on writing security-sensitive code in the future.

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Contents

CONTENTS | PREV | NEXT

JavaTM 2 Platform Security Architecture

This document gives an overview of the motivation of the major security features that are being implemented for the Java 2 SDK, introduces the new classes and their usage, discusses the impact of this new architecture on existing code, and gives thoughts on writing security-sensitive code in the future.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


X.509 certificates

X.509 Certificates and Certificate Revocation Lists (CRLs)

Last Modified: 20 May, 1998

In One Sentence: What is a Certificate?
What Applications use Certificates?
How do I get a Certificate?
What is Inside an X.509 Certificate?
What Java API Can Be Used to Access and Manage Certificates?
What Java Tool Can Generate, Display, Import, and Export X.509 Certificates?

In One Sentence: What is a Certificate?

A public-key certificate is a digitally signed statement from one entity, saying that the public key (and some other information) of another entity has some specific value.

Let us expand on some of the key terms used in this sentence:

Public Keys
These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.
Digitally Signed
If some data is digitally signed it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entitys' private key.
Identity
A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name.
Signature
A signature is computed over some data using the private key of an entity (the signer).
Private Keys
These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.
Entity
An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Basically, public key cryptography requires access to users' public keys. In a large-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a Trusted Third Party. CAs are entities (e.g., businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates as they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization.

What Applications use Certificates?

Probably the most widely visible application of X.509 certificates today is in web browsers (such as Netscape Navigator and Microsoft Internet Explorer) that support the SSL protocol. SSL (Secure Socket Layer) is a security protocol that provides privacy and authentication for your network traffic. These browsers can only use this protocol with web servers that support SSL.

Other technologies that rely on X.509 certificates include:

  • Various code-signing schemes, such as signed Java ARchives, and Microsoft Authenticode.
  • Various secure E-Mail standards, such as PEM and S/MIME.
  • E-Commerce protocols, such as SET.

How do I Get a Certificate?

There are two basic techniques used to get certificates:

  1. you can create one yourself (using the right tools, such as keytool), or
  2. you can ask a Certificate Authority to issue you one (either directly or using a tool such as keytool to generate the request).
The main inputs to the certificate creation process are:
  • Matched public and private keys, generated using some special tools (such as keytool), or a browser. Only the public key is ever shown to anyone else. The private key is used to sign data; if someone knows your private key, they can masquerade as you ... perhaps forging legal documents attributed to you!

  • You need to provide information about the entity being certified (e.g., you). This normally includes information such as your name and organizational address. If you ask a CA to issue a certificate for you, you will normally need to provide proof to show correctness of the information.

    If you are asking a CA to issue you a certificate, you provide your public key and some information about you. You'll use a tool (such as keytool or a browser that supports Certificate Signing Request generation). to digitally sign this information, and send it to the CA. The CA will then generate the certificate and return it.

    If you're generating the certificate yourself, you'll take that same information, add a little more (dates during which the certificate is valid, a serial number), and just create the certificate using some tool (such as keytool). Not everyone will accept self-signed certificates; one part of the value provided by a CA is to serve as a neutral and trusted introduction service, based in part on their verification requirements, which are openly published in their Certification Service Practices (CSP).

    What's Inside an X.509 Certificate?

    The X.509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X.509 certificates have the following data, in addition to the signature:

    Version
    This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined.
    Serial Number
    The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).
    Signature Algorithm Identifier
    This identifies the algorithm used by the CA to sign the certificate.
    Issuer Name
    The X.500 name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate.)
    Validity Period
    Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised.
    Subject Name
    The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the Distinguished Name (DN) of the entity, for example,
        CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US
    (These refer to the subject's Common Name, Organizational Unit, Organization, and Country.)
    Subject Public Key Information
    This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters.

    X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

    X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject and/or issuer names over time. Most certificate profile documents strongly recommend that names not be reused, and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

    X.509 Version 3 is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: KeyUsage (limits the use of the keys to particular purposes such as "signing-only") and AlternativeNames (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

    All the data in a certificate is encoded using two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data. People have been known to describe this combination simultaneously as "powerful and flexible" and as "cryptic and awkward".

    The IETF PKIX working group is in the process of defining standards for the Internet Public Key Infrastructure. We are closely following their work, and are supporting its X.509 Certificate and CRL Profile, which is being specified.

    What Java API Can Be Used to Access and Manage Certificates?

    The Certificate API, found in the java.security.cert package, includes the following:
    • the CertificateFactory class defines the functionality of a certificate factory, which is used to generate certificate and certificate revocation list (CRL) objects from their encoding.

    • the Certificate class is an abstract class for managing a variety of certificates. It is an abstraction for certificates that have different formats but important common uses. For example, different types of certificates, such as X.509 and PGP, share general certificate functionality (like encoding and verifying) and some types of information like public key.

    • the CRL class is an abstract class for managing a variety of Certificate Revocation Lists (CRLs).

    • the X509Certificate class is an abstract class for X.509 Certificates. It provides a standard way to access all the attributes of an X.509 certificate.

    • the X509Extension interface is an interface for an X.509 extension. The extensions defined for X.509 v3 certificates and v2 CRLs (Certificate Revocation Lists) provide mechanisms for associating additional attributes with users or public keys, such as for managing the certification hierarchy, and for managing CRL distribution.

    • the X509CRL class is an abstract class for an X.509 Certificate Revocation List (CRL). A CRL is a time-stamped list identifying revoked certificates. It is signed by a Certification Authority (CA) and made freely available in a public repository.

    • the X509CRLEntry class is an abstract class for a CRL entry.

    What Java Tool Can Generate, Display, Import, and Export X.509 Certificates?

    There is a tool named keytool ( for Solaris ) ( for Windows ) that can be used to create public/private key pairs and self-signed X.509 v1 certificates, and to manage keystores. Keys and certificates are used to digitally sign your Java applications and applets (see the jarsigner ( for Solaris ) ( for Windows ) tool).

    A keystore is a protected database that holds keys and certificates for an enterprise. Access to a keystore is guarded by a password (defined at the time the keystore is created, by the person who creates the keystore, and changeable only when providing the current password). In addition, each private key in a keystore can be guarded by its own password.

    Using keytool, it is possible to display, import, and export X.509 v1, v2, and v3 certificates stored as files, and to generate new self-signed v1 certificates. For examples, see the "EXAMPLES" section of the keytool documentation ( for Solaris ) ( for Windows ).

    Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: java-security@sun.com

            Sun
    Java Software Division


Object Serialization Release Notes

Java

Object Serialization Enhancements

 Documentation Contents
Object Serialization Enhancements
Strings longer than 64K can now be serialized (since 1.3)
Prior to 1.3, an attempt to serialize a string longer than 64K would result in a java.io.UTFDataFormatException being thrown. In 1.3, the serialization protocol has been enhanced to allow strings longer than 64K to be serialized. Note that if a 1.2 (or earlier) JVM attempts to read a long string written from a 1.3-compatible JVM, the 1.2 (or earlier) JVM will receive a java.io.StreamCorruptedException.

Serialization performance enhancements (since 1.3)
Several changes have been made to serialization to improve overall performance:
  • UTF string reads/writes have been optimized to reduce unnecessary memory allocation and synchronization/method call overhead.
  • Code for reading and writing primitive data arrays has been streamlined. Float and double array reads/writes have been reimplemented to minimize the number of calls to native methods.
  • Internal buffering has been improved.
  • Reflective operations for getting/setting primitive field values have been batched to minimize the number of separate native method calls.

Improved exception reporting (since 1.3)
If a class cannot be found during the class resolution process of deserialization, the original java.lang.ClassNotFoundException is thrown instead of a generic one so that more information about the failure is available. Also, deserialization exception reporting now includes maintaining the name of the original class that could not be found instead of reporting a higher-level class that was being deserialized. For example, if (in an RMI call) the stub class can be found but the remote interface class cannot, the serialization mechanism will now report correctly that the interface class was the class that could not be found instead of erroneously reporting that the stub class could not be found.

java.io.ObjectOutputStream.writeClassDescriptor,
java.io.ObjectInputStream.readClassDescriptor (since 1.3)
The writeClassDescriptor and readClassDescriptor methods have been added to provide a means of customizing the serialized representation of java.io.ObjectStreamClass class descriptors. writeClassDescriptor is called when an instance of java.io.ObjectStreamClass needs to be serialized, and is responsible for writing the ObjectStreamClass to the serialization stream. Conversely, readClassDescriptor is called when the ObjectInputStream expects an ObjectStreamClass instance as the next item in the serialization stream. By overriding these methods, subclasses of ObjectOutputStream and ObjectInputStream can transmit class descriptors in an application-specific format. For more information, refer to sections 2.1 and 3.1 of the Java Object Serialization Specification.

java.io.ObjectOutputStream.annotateProxyClass,
java.io.ObjectInputStream.resolveProxyClass (since 1.3)
These methods are similar in purpose to ObjectOutputStream.annotateClass and ObjectInputStream.resolveClass, except that they apply to dynamic proxy classes (see java.lang.reflect.Proxy), as opposed to non-proxy classes. Subclasses of ObjectOutputStream may override annotateProxyClass to store custom data in the stream along with descriptors for dynamic proxy classes. ObjectInputStream subclasses may then override resolveProxyClass to make use of the custom data in selecting a local class to associate with the given proxy class descriptor. For details, see section 4 of the Java Object Serialization Specification.

The javadoc tool tags @serial, @serialField, and @serialData (since 1.2)
The javadoc tags @serial, @serialField, and @serialData have been added to provide a way to document the serialized form of a class. Javadoc generates a serialization specification based on the contents of these tags. For details, refer to section 1.6 of the Java Object Serialization Specification.

Protocol versioning (since 1.2)
Prior to 1.2, object serialization used a protocol that did not support skipping over objects implementing the java.io.Externalizable interface if the classes for those objects were not available. In 1.2, a new protocol version was added which addressed this deficiency. For backwards compatibility, ObjectOutputStream and ObjectInputStream can read and write serialization streams written in either protocol; the protocol version used can be selected by calling the ObjectOutputStream.useProtocolVersion method. For details and a discussion of compatibility issues, see section 6.3 of the Java Object Serialization Specification.

Class-defined writeReplace and readResolve methods (since 1.2)
Since 1.2, classes can define writeReplace and readResolve methods which allow instances of the given classes to nominate replacements for themselves during serialization and deserialization. The required signatures of these methods, along with further details, are described in sections 2.5 and 3.6 of the Java Object Serialization Specification.

java.io.ObjectOutputStream.writeObjectOverride, java.io.ObjectInputStream.readObjectOverride (since 1.2)
Since 1.2, subclasses of ObjectOutputStream and ObjectInputStream can implement a custom serialization protocol by overriding the writeObjectOverride and readObjectOverride methods. Note that these methods will only be called if the ObjectOutputStream/ObjectInputStream subclasses possess the permission java.io.SerializablePermission("enableSubclassImplementation"), and call the no-argument constructors of ObjectOutputStream/ObjectInputStream. See sections 2.1 and 3.1 of the Java Object Serialization Specification for more information.

Security permission checks (since 1.2)
Subclasses of ObjectOutputStream and ObjectInputStream may override inherited methods to obtain "hooks" into certain aspects of the serialization process. Since 1.2, object serialization uses the 1.2 security model to verify that subclasses possess adequate permissions to override certain hooks. The permissions java.io.SerializablePermission("enableSubclassImplementation") and java.io.SerializablePermission("enableSubstitution") govern whether or not the methods ObjectOutputStream.writeObjectOverride, ObjectOutputStream.replaceObject, ObjectInputStream.readObjectOverride, and ObjectInputStream.resolveObject will be called during the course of serialization. See sections 2.1 and 3.1 of the Java Object Serialization Specifications for more information.

Defining serializable fields for a class (since 1.2)
By default, the values of all non-static and non-transient fields of a serializable class are written when an instance of that class is serialized. In 1.2, a new mechanism was introduced to allow classes finer control of this process. By declaring a special field serialPersistentFields, serializable classes can dictate which fields will be written when instances of the class (or subclasses) are serialized. This feature also enables classes to "define" serializable fields which do not correspond directly to actual fields in the class. Used in conjunction with the serializable fields API (described below), this capability allows fields to be added or removed from a class without altering the serialized representation of the class. See sections 1.5 and 1.7 of the Java Object Serialization Specification for details.

Serializable fields API (since 1.2)
Introduced in 1.2, the serializable fields API allows class-defined writeObject/readObject methods to explicitly set and retrieve serializable field values by name and type. This API is particularly useful for classes that need to maintain backwards compatibility with older class versions; in some cases, the older version of the class may have defined a set of serializable fields that cannot be mapped directly to the fields of the current class. In this case, newer versions of the class can define custom writeObject and readObject methods that convert the internal state of a given instance of the (new) class into the "old" serialized form, and vice versa. For more information, see section 1.7 of the Java Object Serialization Specification.
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Using Serialization and the Serializable Fields API

Abstract

This example shows how to use the Serializable Fields API with Serialization, demonstrating that the class can define fields other than those already in the class to be serializable. This differs from just rewriting the writeObject method to customize the data format (see the Custom Data Format example) because, in this example, versioning support still holds.

Using the Serializable Fields API, this example specifically changes the internal representation of a rectangle from x1,y1,x2,y2 implementation (see OriginalClass.java) to Point(x1,y1), Point(x2,y2) (see EvolvedClass.java) while the external representation still remains x1, y1, x2, y2. This ensures bidirectional compatibility between the original and evolved representations.

As with all examples dealing with evolution, here the evolved class (ARectangle) must define a serialVersionUID field that is obtained using the command serialver on the original class (ARectangle).

Additional Information

Source Files
Running the Example
List of Examples


Using Serialization and the Serializable Fields API

Source Files

The following source files are provided:

OriginalClass.java, the Original Class
EvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples


Using Serialization and the Serializable Fields API

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/AlternatePersistentFieldAPI, compile the Original Class using JDKTM 1.2 or higher:
      javac OriginalClass.java
  2. Run the Original Class with the serialization flag:
      java OriginalClass -s
  3. Compile the Evolved Class:
      javac EvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java EvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples


serialver - The Serial Version Command

The serialver command returns the serialVersionUID.

SYNOPSIS

serialver [ options ]

DESCRIPTION

serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line.

OPTIONS
-show

Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.

SEE ALSO

java.io.ObjectStreamClass


Using Serialization with a Custom Data Format

Source Files

The following source file is provided:

CustomDataExample.java

Additional Information:

Running the Example
Abstract
List of Examples


Using Serialization with a Custom Data Format

Abstract

Demonstrates how to use the writeObject and readObject methods to encode a custom data format. When there is a large amount of persistent data, that data should be stored in a convenient, condensed format, such as the one used in this example.

This example uses a triangular array, a symmetrical, 2-dimensional array. During serialization only half of the array is saved. This example serializes half of the array in writeObject, then restores the whole array in readObject by deserializing half of the array and copying to restore the other half of the array.

This example differs from the Using Serialization and the Serializable Fields API Example in that this example does not support versioning. In addition, because this example does not use an Externalizable interface, superclasses are not a consideration.

Additional Information

Source Files
Running the Example
List of Examples


Using Serialization with a Custom Data Format

Serialization and Custom Data Format

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserializationexamples/CustomDataFormat, compile the file CustomDataExample.java using JDK TM 1.1 or higher:
      javac CustomDataExample.java
  2. Run the file you just compiled:
      java CustomDataExample

Two arrays are printed:

  • The first array shows the array before serialization.
  • The second array shows the array after deserialization.

Additional Information:

Abstract
Sources
List of Examples


Serialization, Evolution, and the Addition of a New SuperClass

Source Files

The following source files are provided:

OriginalClass.java
EvolvedClass.java

Additional Information

Running the Example
Abstract
List of Examples


Serialization, Evolution, and the Addition of a New SuperClass

Abstract

Shows how to use versioning in serialization to evolve the class to have a new superclass. For example, if the initial class structure was as follows:

  class A {...};
  class C extends A {...};

and the evolved class structure is as follows:

  class A {...};
  class B extends A {...};
  class C extends B {...};

then the new version of subclass C should be able to read the old version of subclass C, and vice versa. The example demonstrates this principle.

The evolved classses (ASuperClass and ASubClass) must define a serialVersionUID field that is obtained using the command serialver on the original classes (ASuperClass and ASubClass).

Note that in this example, the superclasses (A and B) implement the Serializable interface. If they did not, subclass C would be responsible for saving and restoring the fields of A and B. See Serialization with a NonSerializable Superclass for additional information about this topic.

Additional Information:

Source Files
Running the Example
List of Examples


Serialization, Evolution, and the Addition of a New SuperClass

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/AddingNewSuperClassAndEvolution, compile the Original Class using JDKTM 1.2 or higher:
      javac OriginalClass.java
  2. Run the Original Class with the serialization flag:
      java OriginalClass -s
  3. Compile the Evolved Class:
      javac EvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java EvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

For more information:

Abstract
Sources
List of Examples


Using Serialization with Evolution

Source Files

The following source files are provided:

EvolutionExampleOriginalClass.java, the Original Class
EvolutionExampleEvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples


Using Serialization with Evolution

Abstract

Under certain circumstances, when Java objects use serialization to store objects, the version of the class reading the data could be different from the version of class that wrote that data.

This example demonstrates some of the compatible changes that Serialization handles without using class-specific methods.

As with all examples that deal with evolution, the evolved class (AClass) must define a serialVersionUID field that is obtained using the command serialver on the original class (AClass).

Additional Information

Source Files
Running the Example
List of Examples


Using Serialization with Evolution

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/SerializationAndEvolution, compile the Original Class using JDKTM 1.2 or higher:
      javac EvolutionExampleOriginalClass.java
  2. Run the Original Class with the serialization flag:
      java EvolutionExampleOriginalClass -s
  3. Compile the Evolved Class:
      javac EvolutionExampleEvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
    java EvolutionExampleEvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples


Using Externalization and Evolution

Source Files

The following source files are provided:

ExternExampleOriginalClass.java, the Original Class
ExternExampleEvolvedClass.java, the Evolved Class

Additional Information

Running the Example
Abstract
List of Examples


Using Externalization and Evolution

Abstract

This example shows how to evolve a persistent format using the Externalizable interface. A class that uses the Externalizable interface is responsible for saving its own state, for saving the state of its supertype, and for versioning (including skipping over data).

This example specifically deals with versioning. For information about saving the state of the supertype, which may or may not be Externalizable, see the following examples:

  • Using Serialization with a NonSerializable Superclass
  • Using Externalization with an Externalizable Superclass
  • Using Externalization with a NonExternalizable Superclass

Additional Information

Running the Example
Sources
List of Examples


Using Externalization and Evolution

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/ExternalizationandEvolution, compile the Original Class using JDKTM 1.2 or higher:
      javac ExternExampleOriginalClass.java
  2. Run the Original Class with the serialization flag:
      java ExternExampleOriginalClass -s
  3. Compile the Evolved Class:
      javac ExternExampleEvolvedClass.java
  4. Run the Evolved Class with the deserialization flag:
      java ExternExampleEvolvedClass -d

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples


Externalization with an Externalizable SuperClass

Source Files

The following source files are provided:

Savesuper.java
Book.java, tThe subclass book
ReadingMaterial.java, the superclass ReadingMaterial

Additional Information

Running the Example
Abstract
List of Examples


Externalization with an Externalizable SuperClass

Abstract

When using the Externalizable interface, an externalizable object must implement a writeExternal method to save the state of the object and a readExternal method to restore the state of the object. The externalizable object must also coordinate with its supertype to save and restore its state.

This example demonstrates how an object saves and restores the state of its externalizable supertype. When the supertype of an externalizable object is also externalizable, the subclass object calls the writeExternal and readExternal methods of its superclass in its own writeExternal and readExternal methods.

Additional Information:

Source Files
Running the Example
List of Examples


Externalization with an Externalizable SuperClass

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/ExternalizableSuperclass, compile the Savesuper.java file using JDKTM 1.1 or higher:
      javac Savesuper.java
  2. Run the file you just compiled: java Savesuper

The original book object is printed (showing the object before serialization) and then the new book object is printed (showing the object after serialization).

Additional Information

Abstract
Sources
List of Examples

<


Externalization with an NonExternalizable SuperClass

Exernalization with an NonExternalizable SuperClass

Source Files

The following source files are provided:

Nonexternsuper.java
Book.java, the subclass book
ReadingMaterial.java, the superclass ReadingMaterial

Additional Information:

Running the Example
Abstract
List of Examples


Externalization with an NonExternalizable SuperClass

Exernalization with an NonExternalizable SuperClass

Abstract

When using the Externalizable interface, an externalizable object must implement a writeExternal method to save the state of the object and a readExternal method to restore the state of the object. The externalizable object must also coordinate with its supertype to save and restore its state.

This example demonstrates how an object saves and restores the state of its nonexternalizable supertype. When the supertype of an externalizable object is not externalizable, the subclass object must explicitly save and restore the state of the fields of the superclass in its own writeExternal and readExternal methods.

Additional Information:

Source Files
Running the Example
List of Examples


Externalization with an NonExternalizable SuperClass

Exernalization with an NonExternalizable SuperClass

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserializationexamples/NonExternalizableSuperclass, compile the file Nonexternsuper.java using JDKTM 1.1 or higher:
      javac Nonexternsuper.java
  2. Run the compiled file:
      java Nonexternsuper

The book object prints out before and after serialization.

Additional Information

Abstract
Sources
List of Examples


Using Serialization with a NonSerializable Superclass

Source Files

The following source files are provided:

NonSerialSuperExample.java
Book.java, the subclass Book
ReadingMaterial.java, the superclass ReadingMaterial

Additional Information:

Running the Example
Abstract
List of Examples


Using Serialization with a NonSerializable Superclass

Abstract

Shows how to serialize a subclass which has a superclass that is not serializable.

When a superclass of a particular subclass is not serializable, the subclass must save and restore the state of the superclass.

Additional Information

Source Files
Running the Example
List of Examples


Using Serialization with a NonSerializable Superclass

Running the Example

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/NonSerializableSuperClass, compile the files using JDKTM 1.1 or higher:
      javac NonSerialSuperExample.java
  javac Book.java
  javac ReadingMaterial.java
  2. Run the compiled file:
      java NonSerialSuperExample

The book object prints out before and after serialization.

Additional Information:

Abstract
Sources
List of Examples


Using Serialization with Sockets

Source Files

The following source files are provided:

  • Server.java
  • Client.java

Additional Information:

Running the Example
Abstract
List of Examples


Using Serialization with Sockets

Abstract

Shows how to use sockets and serialization for sending and receiving objects.

In this example, the current date is sent from the client to the server. The file Client.java provides the code for sending the date and the file Server.java provides the code for receiving the date. The Server is the local host machine.

Additional Information:

Source Files
Running the Example
List of Examples


Using Serialization with Sockets

Running the Example:

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/UsingSockets, compile the files Server.java and Client.java using JDKTM1.1 or higher:
      javac Server.java
  javac Client.java
  2. Run the Server:
      java Server
  3. Suspend the Server, using Ctrl/Z on UNIX systems.
  4. Put the Server in the background, using the following command on UNIX systems:
      bg
  5. Run the Client:
      java Client

Using sockets and serialization, the current date is sent from the client to the server, which then prints out the date.

Additional Information:

Abstract
Sources
List of Examples


Substitution by Serializable Classes

Serialization and the writeReplace/readResolve Methods

Source Files

The following source file is provided:

Substitute.java

Additional Information

Running the Example
Abstract
List of Examples


Substitution by Serializable Classes

Serialization and the writeReplace/readResolve Methods

Abstract

This example demonstrates how to use the writeReplace/readResolve methods. The readResolve method resolves the object read from the stream before it is returned to the caller. The writeReplace method allows a Serializable class of an object to nominate its own replacement in the stream before the object is written.

This example creates a symbol class for which only one instance of each each symbol binding exists. The Symbol class defines the readResolve method. A symbol is created from outside using the symbollookup method. The symbollookup method finds and returns a symbol if one already and, if one does not already exist, creates one. This assures uniqueness within one VM. Then, when the readResolve method is called as the symbol is being read, a preexisting equivalent Symbol object is substituted from the hashtable to maintain the unique identity constraint, if such a symbol exists. If the symbol does not exist, the new symbol is added to the hashtable and returned. This assures uniqueness when dealing with more than one VM.

Additional Information

Source Files
Running the Example
List of Examples


Substitution by Serializable Classes

Serialization and the writeReplace/readResolve Methods

Running the Example

Complete the following procedure to compile and run the example:

  1. From yourbasedir/objectserialization/ReplaceableInterface, compile the file Substitute.java using JDKTM 1.2 or higher:
      javac Substitute.java
  2. Run the compiled file:
      java Substitute

Additional Information

Abstract
Sources
List of Examples


Contents

CONTENTS | PREV | NEXT

JavaTM Object Serialization Specification

Object serialization in the JavaTM system is the process of creating a serialized representation of objects or a graph of objects. Object values and types are serialized with sufficient information to insure that the equivalent typed object can be recreated. Deserialization is the symmetric process of recreating the object or graph of objects from the serialized representation. Different versions of a class can write and read compatible streams.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 1

Introduction to the Java Sound API

Design Goals

The JavaTM Sound API is a low-level API for effecting and controlling the input and output of sound media, including both audio and Musical Instrument Digital Interface (MIDI) data. The Java Sound API provides explicit control over the capabilities normally required for sound input and output, in a framework that promotes extensibility and flexibility.

Who is the Java Sound API For?

Because sound is so fundamental, the Java Sound API fulfills the needs of a wide range of application developers. Potential application areas include:

  • Communication frameworks, such as conferencing and telephony
  • End-user content delivery systems, such as media players and music using streamed content
  • Interactive application programs, such as games and Web sites that use dynamic content
  • Content creation and editing
  • Tools, toolkits, and utilities

How Does the Java Sound API Relate to Other Interfaces?

The Java Sound API provides the lowest level of sound support on the Java platform. It provides application programs with a great amount of control over sound operations, and it is extensible. For example, the Java Sound API supplies mechanisms for installing, accessing, and manipulating system resources such as audio mixers, MIDI synthesizers, other audio or MIDI devices, file readers and writers, and sound format converters. The Java Sound API does not include sophisticated sound editors or graphical tools, but it provides capabilities upon which such programs can be built. It emphasizes low-level control beyond that commonly expected by the end user.

There are other Java platform APIs that have sound-related elements. The Java Media Framework (JMF) is a higher-level API that is currently available as a Standard Extension to the Java platform. JMF specifies a unified architecture, messaging protocol, and programming interface for capturing and playing back time-based media. JMF provides a simpler solution for basic media-player application programs, and it enables synchronization between different media types, such as audio and video. On the other hand, programs that focus on sound can benefit from the Java Sound API, especially if they require more advanced features, such as the ability to carefully control buffered audio playback or directly manipulate a MIDI synthesizer. Other Java APIs with sound aspects include Java 3D and APIs for telephony and speech. An implementation of any of these APIs might use an implementation of the Java Sound API internally, but is not required to do so.

Packages

The Java Sound API includes support for both digital audio and MIDI data. These two major modules of functionality are provided in separate packages:

  • javax.sound.sampled
    This package specifies interfaces for capture, mixing, and playback of digital (sampled) audio.
  • javax.sound.midi
    This package provides interfaces for MIDI synthesis, sequencing, and event transport.

Two other packages permit service providers (as opposed to application developers) to create custom software components that extend the capabilities of an implementation of the Java Sound API:

  • javax.sound.sampled.spi
  • javax.sound.midi.spi

The rest of this chapter briefly discusses the sampled-audio system, the MIDI system, and the SPI packages. Each of these is then discussed in detail in a subsequent part of the guide.

Sampled Audio

What Is Sampled Audio?

The javax.sound.sampled package handles digital audio data, which the Java Sound API refers to as sampled audio. Samples are successive snapshots of a signal. In the case of audio, the signal is a sound wave. A microphone converts the acoustic signal into a corresponding analog electrical signal, and an analog-to-digital converter transforms that analog signal into a sampled digital form. The following figure shows a brief moment in a sound recording.

A Sampled Sound Wave

This graph plots sound pressure (amplitude) on the vertical axis, and time on the horizontal axis. The amplitude of the analog sound wave is measured periodically at a certain rate, resulting in the discrete samples (the red data points in the figure) that comprise the digital audio signal. The center horizontal line indicates zero amplitude; points above the line are positive-valued samples, and points below are negative. The accuracy of the digital approximation of the analog signal depends on its resolution in time (the sampling rate) and its quantization, or resolution in amplitude (the number of bits used to represent each sample). As a point of reference, the audio recorded for storage on compact discs is sampled 44,100 times per second and represented with 16 bits per sample.

The term "sampled audio" is used here slightly loosely. A sound wave could be sampled at discrete intervals while being left in an analog form. For purposes of the Java Sound API, however, "sampled audio" is equivalent to "digital audio."

Typically, sampled audio on a computer comes from a sound recording, but the sound could instead be synthetically generated (for example, to create the sounds of a touch-tone telephone). The term "sampled audio" refers to the type of data, not its origin.

Further information about the structure of digital audio data is given under "What Is Formatted Audio Data?" in Chapter 2, "Overview of the Sampled Package ."

Audio Configurations

The Java Sound API does not assume a specific audio hardware configuration; it is designed to allow different sorts of audio components to be installed on a system and accessed by the API. The Java Sound API supports common functionality such as input and output from a sound card (for example, for recording and playback of sound files) as well as mixing of multiple streams of audio. Here is one example of a typical audio architecture:

A Typical Audio Architecture

In this example, a device such as a sound card has various input and output ports, and mixing is provided in the software. The mixer might receive data that has been read from a file, streamed from a network, generated on the fly by an application program, or produced by a MIDI synthesizer. (The javax.sound.midi package, discussed next, supplies a Java language interface for synthesizers.) The mixer combines all its audio inputs into a single stream, which can be sent to an output device for rendering.

MIDI

The javax.sound.midi package contains APIs for transporting and sequencing MIDI events, and for synthesizing sound from those events.

What Is MIDI?

Whereas sampled audio is a direct representation of a sound itself, MIDI data can be thought of as a recipe for creating a sound, especially a musical sound. MIDI data, unlike audio data, does not describe sound directly. Instead, it describes events that affect the sound a synthesizer is making. MIDI data is analogous to a graphical user interface's keyboard and mouse events. In the case of MIDI, the events can be thought of as actions upon a musical keyboard, along with actions on various pedals, sliders, switches, and knobs on that musical instrument. These events need not actually originate with a hardware musical instrument; they can be simulated in software, and they can be stored in MIDI files. A program that can create, edit, and perform these files is called a sequencer. Many computer sound cards include MIDI-controllable music synthesizer chips to which sequencers can send their MIDI events. Synthesizers can also be implemented entirely in software. The synthesizers interpret the MIDI events that they receive and produce audio output. Usually the sound synthesized from MIDI data is musical sound (as opposed to speech, for example). MIDI synthesizers are also capable of generating various kinds of sound effects.

Some sound cards include MIDI input and output ports to which external MIDI hardware devices (such as keyboard synthesizers or other instruments) can be connected. From a MIDI input port, an application program can receive events generated by an external MIDI-equipped musical instrument. The program might play the musical performance using the computer's internal synthesizer, save it to disk as a MIDI file, or render it into musical notation. A program might use a MIDI output port to play an external instrument, or to control other external devices such as recording equipment.

More information about MIDI data is given in Chapter 8, "Overview of the MIDI Package," particularly in the section "A MIDI Refresher: Wires and Files."

MIDI Configurations

The diagram below illustrates the functional relationships between the major components in a possible MIDI configuration based on the Java Sound API. (As with audio, the Java Sound API permits a variety of MIDI software devices to be installed and interconnected. The system shown here is one potential scenario.) The flow of data between components is indicated by arrows. The data can be in a standard file format, or (as indicated by the key in the lower right corner of the diagram), it can be audio, raw MIDI bytes, or time-tagged MIDI messages.

A Possible MIDI Configuration

In this example, the application program prepares a musical performance by loading a musical score that's stored as a standard MIDI file on a disk (left side of the diagram). Standard MIDI files contain tracks, each of which is a list of time-tagged MIDI events. Most of the events represent musical notes (pitches and rhythms). This MIDI file is read and then "performed" by a software sequencer. A sequencer performs its music by sending MIDI messages to some other device, such as an internal or external synthesizer. The synthesizer itself may read a soundbank file containing instructions for emulating the sounds of certain musical instruments. If not, the synthesizer will play the notes stored in the MIDI file using whatever instrument sounds are already loaded into the synthesizer.

As illustrated, the MIDI events must be translated into raw (non-time-tagged) MIDI before being sent through a MIDI output port to an external synthesizer. Similarly, raw MIDI data coming into the computer from an external MIDI source (a keyboard instrument, in the diagram) is translated into time-tagged MIDI messages that can control a synthesizer, or that a sequencer can store for later use. All these aspects of MIDI data flow are explained in detail in the subsequent chapters on MIDI (see Part II of this guide).

Service Provider Interfaces

The javax.sound.sampled.spi and javax.sound.midi.spi packages contain APIs that let software developers create new audio or MIDI resources that can be provided separately to the user and "plugged in" to an existing implementation of the Java Sound API. Here are some examples of services (resources) that can be added in this way:

  • An audio mixer
  • A MIDI synthesizer
  • A file parser that can read or write a new type of audio or MIDI file
  • A converter that translates between different sound data formats

In some cases, services are software interfaces to the capabilities of hardware devices, such as sound cards, and the service provider might be the same as the vendor of the hardware. In other cases, the services exist purely in software. For example, a synthesizer or a mixer could be an interface to a chip on a sound card, or it could be implemented without any hardware support at all.

An implementation of the Java Sound API contains a basic set of services, but the service provider interface (SPI) packages allow third parties to create new services. These third-party services are integrated into the system in the same way as the built-in services. The AudioSystem class in the sampled package and the MidiSystem class in the midi package act as coordinators that let application programs access the services explicitly or implicitly. Often the existence of a service is completely transparent to an application program that uses it. The service-provider mechanism benefits users of application programs based on the Java Sound API, because new sound features can be added to a program without requiring a new release of the Java SDK or runtime environment, and, in many cases, without even requiring a new release of the application program itself.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 10

Transmitting and Receiving MIDI Messages

Understanding Devices, Transmitters, and Receivers

The JavaTM Sound API specifies a message-routing architecture for MIDI data that's flexible and easy to use, once you understand how it works. The system is based on a module-connection design: distinct modules, each of which performs a specific task, can be interconnected (networked), enabling data to flow from one module to another.

The base module in the Java Sound API's messaging system is MidiDevice (a Java language interface). MidiDevices include sequencers (which record, play, load, and edit sequences of time-stamped MIDI messages), synthesizers (which generate sounds when triggered by MIDI messages), and MIDI input and output ports, through which data comes from and goes to external MIDI devices. The functionality typically required of MIDI ports is described by the base MidiDevice interface. The Sequencer and Synthesizer interfaces extend the MidiDevice interface to describe the additional functionality characteristic of MIDI sequencers and synthesizers, respectively. Concrete classes that function as sequencers or synthesizers should implement these interfaces.

A MidiDevice typically owns one or more ancillary objects that implement the Receiver or Transmitter interfaces. These interfaces represent the "plugs" or "portals" that connect devices together, permitting data to flow into and out of them. By connecting a Transmitter of one MidiDevice to a Receiver of another, you can create a network of modules in which data flows from one to another.

The MidiDevice interface includes methods for determining how many transmitter and receiver objects the device can support concurrently, and other methods for accessing those objects. A MIDI output port normally has at least one Receiver through which the outgoing messages may be received; similarly, a synthesizer normally responds to messages sent to its Receiver or Receivers. A MIDI input port normally has at least one Transmitter, which propagates the incoming messages. A full-featured sequencer supports both Receivers, which receive messages during recording, and Transmitters, which send messages during playback.

The Transmitter interface includes methods for setting and querying the receivers to which the transmitter sends its MidiMessages. Setting the receiver establishes the connection between the two. The Receiver interface contains a method that sends a MidiMessage to the receiver. Typically, this method is invoked by a Transmitter. Both the Transmitter and Receiver interfaces include a close method that frees up a previously connected transmitter or receiver, making it available for a different connection.

We'll now examine how to use transmitters and receivers. Before getting to the typical case of connecting two devices (such as hooking a sequencer to a synthesizer), we'll examine the simpler case where you send a MIDI message directly from your application program to a device. Studying this simple scenario should make it easier to understand how the Java Sound API arranges for sending MIDI messages between two devices.

Sending a Message to a Receiver without Using a Transmitter

Let's say you want to create a MIDI message from scratch and then send it to some receiver. You can create a new, blank ShortMessage and then fill it with MIDI data using the following ShortMessage method:

void setMessage(int command, int channel, int data1,
         int data2)

Once you have a message ready to send, you can send it to a Receiver object, using this Receiver method:

void send(MidiMessage message, long timeStamp)

The time-stamp argument will be explained momentarily. For now, we'll just mention that its value can be set to -1 if you don't care about specifying a precise time. In this case, the device receiving the message will try to respond to the message as soon as possible.

An application program can obtain a receiver for a MidiDevice by invoking the device's getReceiver method. If the device can't provide a receiver to the program (typically because all the device's receivers are already in use), a MidiUnavailableException is thrown. Otherwise, the receiver returned from this method is available for immediate use by the program. When the program has finished using the receiver, it should call the receiver's close method. If the program attempts to invoke methods on a receiver after calling close, an IllegalStateException may be thrown.

As a concrete simple example of sending a message without using a transmitter, let's send a Note On message to the default receiver, which is typically associated with a device such as the MIDI output port or a synthesizer. We do this by creating a suitable ShortMessage and passing it as an argument to Receiver's send method:

  ShortMessage myMsg = new ShortMessage();
  // Start playing the note Middle C (60),
  // moderately loud (velocity = 93).
  myMsg.setMessage(ShortMessage.NOTE_ON, 0, 60, 93);
  long timeStamp = -1;
  Receiver	 rcvr = MidiSystem.getReceiver();
  rcvr.send(myMsg, timeStamp);

This code uses a static integer field of ShortMessage, namely, NOTE_ON, for use as the MIDI message's status byte. The other parts of the MIDI message are given explicit numeric values as arguments to the setMessage method. The zero indicates that the note is to be played using MIDI channel number 1; the 60 indicates the note Middle C; and the 93 is an arbitrary key-down velocity value, which typically indicates that the synthesizer that eventually plays the note should play it somewhat loudly. (The MIDI specification leaves the exact interpretation of velocity up to the synthesizer's implementation of its current instrument.) This MIDI message is then sent to the receiver with a time stamp of -1. We now need to examine exactly what the time stamp parameter means, which is the subject of the next section.

Understanding Time Stamps

Chapter 8, "Overview of the MIDI Package," explained that the MIDI specification has different parts. One part describes MIDI "wire" protocol (messages sent between devices in real time), and another part describes Standard MIDI Files (messages stored as events in "sequences"). In the latter part of the specification, each event stored in a standard MIDI file is tagged with a timing value that indicates when that event should be played. By contrast, messages in MIDI wire protocol are always supposed to be processed immediately, as soon as they're received by a device, so they have no accompanying timing values.

The Java Sound API adds an additional twist. It comes as no surprise that timing values are present in the MidiEvent objects that are stored in sequences (as might be read from a MIDI file), just as in the Standard MIDI Files specification. But in the Java Sound API, even the messages sent between devices-in other words, the messages that correspond to MIDI wire protocol-can be given timing values, known as time stamps. It is these time stamps that concern us here. (The timing values in MidiEvent objects are discussed in detail in Chapter 11, "Playing, Recording, and Editing MIDI Sequences.")

Time Stamps on Messages Sent to Devices

The time stamp that can optionally accompany messages sent between devices in the Java Sound API is quite different from the timing values in a standard MIDI file. The timing values in a MIDI file are often based on musical concepts such as beats and tempo, and each event's timing measures the time elapsed since the previous event. In contrast, the time stamp on a message sent to a device's Receiver object always measures absolute time in microseconds. Specifically, it measures the number of microseconds elapsed since the device that owns the receiver was opened.

This kind of time stamp is designed to help compensate for latencies introduced by the operating system or by the application program. It's important to realize that these time stamps are used for minor adjustments to timing, not to implement complex queues that can schedule events at completely arbitrary times (as MidiEvent timing values do).

The time stamp on a message sent to a device (through a Receiver) can provide precise timing information to the device. The device might use this information when it processes the message. For example, it might adjust the event's timing by a few milliseconds to match the information in the time stamp. On the other hand, not all devices support time stamps, so the device might completely ignore the message's time stamp.

Even if a device supports time stamps, it might not schedule the event for exactly the time that you requested. You can't expect to send a message whose time stamp is very far in the future and have the device handle it as you intended, and you certainly can't expect a device to correctly schedule a message whose time stamp is in the past! It's up to the device to decide how to handle time stamps that are too far off in the future or the past. The sender doesn't know what the device considers to be too far off, or whether the device had any problem with the time stamp. This ignorance mimics the behavior of external MIDI hardware devices, which send messages without ever knowing whether they were received correctly. (MIDI wire protocol is unidirectional.)

Some devices send time-stamped messages (via a Transmitter). For example, the messages sent by a MIDI input port might be stamped with the time the incoming message arrived at the port. On some systems, the event-handling mechanisms cause a certain amount of timing precision to be lost during subsequent processing of the message. The message's time stamp allows the original timing information to be preserved.

To learn whether a device supports time stamps, invoke the following method of MidiDevice:

    long getMicrosecondPosition()

This method returns -1 if the device ignores time stamps. Otherwise, it returns the device's current notion of time, which you as the sender can use as an offset when determining the time stamps for messages you subsequently send. For example, if you want to send a message with a time stamp for five milliseconds in the future, you can get the device's current position in microseconds, add 5000 microseconds, and use that as the time stamp. Keep in mind that the MidiDevice's notion of time always places time zero at the time the device was opened.

Now, with all that explanation of time stamps as a background, let's return to the send method of Receiver:

void send(MidiMessage message, long timeStamp)

The timeStamp argument is expressed in microseconds, according to the receiving device's notion of time. If the device doesn't support time stamps, it simply ignores the timeStamp argument. You aren't required to time-stamp the messages you send to a receiver. You can use -1 for the timeStamp argument to indicate that you don't care about adjusting the exact timing; you're just leaving it up to the receiving device to process the message as soon as it can. However, it's not advisable to send -1 with some messages and explicit time stamps with other messages sent to the same receiver. Doing so is likely to cause irregularities in the resultant timing.

Connecting Transmitters to Receivers

We've seen how you can send a MIDI message directly to a receiver, without using a transmitter. Now let's look at the more common case, where you aren't creating MIDI messages from scratch, but are simply connecting devices together so that one of them can send MIDI messages to the other.

Connecting to a Single Device

The specific case we'll take as our first example is connecting a sequencer to a synthesizer. After this connection is made, starting the sequencer running will cause the synthesizer to generate audio from the events in the sequencer's current sequence. For now, we'll ignore the process of loading a sequence from a MIDI file into the sequencer. Also, we won't go into the mechanism of playing the sequence. Loading and playing sequences is discussed in detail in Chapter 11, "Playing, Recording, and Editing MIDI Sequences." Loading instruments into the synthesizer is discussed in Chapter 12, "Synthesizing Sound." For now, all we're interested in is how to make the connection between the sequencer and the synthesizer. This will serve as an illustration of the more general process of connecting one device's transmitter to another device's receiver.

For simplicity, we'll use the default sequencer and the default synthesizer. (See Chapter 9, "Accessing MIDI System Resources," for more about default devices and how to access non-default devices.)

    Sequencer    	seq;
    Transmitter  	seqTrans;
    Synthesizer  	synth;
    Receiver	     synthRcvr;
    try {
          seq	  = MidiSystem.getSequencer();
          seqTrans = seq.getTransmitter();
          synth	  = MidiSystem.getSynthesizer();
          synthRcvr = synth.getReceiver();
          seqTrans.setReceiver(synthRcvr);
    } catch (MidiUnavailableException e) {
          // handle or throw exception
    }

An implementation might actually have a single object that serves as both the default sequencer and the default synthesizer. In other words, the implementation might use a class that implements both the Sequencer interface and the Synthesizer interface. In that case, it probably wouldn't be necessary to make the explicit connection that we did in the code above. For portability, though, it's safer not to assume such a configuration. If desired, you can test for this condition, of course:

if (seq instanceof Synthesizer)

although the explicit connection above should work in any case.

Connecting to More than One Device

The previous code example illustrated a one-to-one connection between a transmitter and a receiver. But, what if you need to send the same MIDI message to multiple receivers? For example, suppose you want to capture MIDI data from an external device to drive the internal synthesizer while simultaneously recording the data to a sequence. This form of connection, sometimes referred to as "fan out" or as a "splitter," is straightforward. The following statements show how to create a fan-out connection, through which the MIDI messages arriving at the MIDI input port are sent to both a Synthesizer object and a Sequencer object. We assume you've already obtained and opened the three devices: the input port, sequencer, and synthesizer. (To obtain the input port, you'll need to iterate over all the items returned by MidiSystem.getMidiDeviceInfo.)

    Synthesizer  synth;
    Sequencer    seq;
    MidiDevice   inputPort;
    // [obtain and open the three devices...]
    Transmitter	  inPortTrans1, inPortTrans2;
    Receiver     	synthRcvr;
    Receiver     	seqRcvr;
    try {
          inPortTrans1 = inputPort.getTransmitter();
          synthRcvr = synth.getReceiver();
          inPortTrans1.setReceiver(synthRcvr);
          inPortTrans2 = inputPort.getTransmitter();
          seqRcvr = seq.getReceiver();
          inPortTrans2.setReceiver(seqRcvr);
    } catch (MidiUnavailableException e) {
          // handle or throw exception
    }

This code introduces a dual invocation of the MidiDevice.getTransmitter method, assigning the results to inPortTrans1 and inPortTrans2. As mentioned earlier, a device can own multiple transmitters and receivers. Each time MidiDevice.getTransmitter() is invoked for a given device, another transmitter is returned, until no more are available, at which time an exception will be thrown.

To learn how many transmitters and receivers a device supports, you can use the following MidiDevice method:

    int getMaxTransmitters()
    int getMaxReceivers()

These methods return the total number owned by the device, not the number currently available.

A transmitter can transmit MIDI messages to only one receiver at a time. (Every time you call Transmitter's setReceiver method, the existing Receiver, if any, is replaced by the newly specified one. You can tell whether the transmitter currently has a receiver by invoking Transmitter.getReceiver.) However, if a device has multiple transmitters, it can send data to more than one device at a time, by connecting each transmitter to a different receiver, as we saw in the case of the input port above.

Similarly, a device can use its multiple receivers to receive from more than one device at a time. The multiple-receiver code that's required is straightforward, being directly analogous to the multiple-transmitter code above. It's also possible for a single receiver to receive messages from more than one transmitter at a time.

Closing Connections

Once you're done with a connection, you can free up its resources by invoking the close method for each transmitter and receiver that you've obtained. The Transmitter and Receiver interfaces each have a close method. Note that invoking Transmitter.setReceiver doesn't close the transmitter's current receiver. The receiver is left open, and it can still receive messages from any other transmitter that's connected to it.

If you're also done with the devices, you can similarly make them available to other application programs by invoking MidiDevice.close(). Closing a device automatically closes all its transmitters and receivers.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 11

Playing, Recording, and Editing MIDI Sequences

In the world of MIDI, a sequencer is any hardware or software device that can precisely play or record a sequence of time-stamped MIDI messages. Similarly, in the JavaTM Sound API, the Sequencer abstract interface defines the properties of an object that can play and record Sequences of MidiEvent objects. A Sequencer typically loads these MidiEvent sequences from a standard MIDI file or saves them to such a file. Sequences can also be edited. This chapter explains how to use Sequencer objects, along with related classes and interfaces, to accomplish such tasks.

Introduction to Sequencers

To develop an intuitive understanding of what a Sequencer is, think of it by analogy with a tape recorder, which a sequencer resembles in many respects. Whereas a tape recorder plays audio, a sequencer plays MIDI data. A sequence is a multi-track, linear, time-ordered recording of MIDI musical data, which a sequencer can play at various speeds, rewind, shuttle to particular points, record into, or copy to a file for storage.

Chapter 10, "Transmitting and Receiving MIDI Messages," explained that devices typically have Receiver objects, Transmitter objects, or both. To play music, a device generally receives MidiMessages through a Receiver, which in turn has usually received them from a Transmitter that belongs to a Sequencer. The device that owns this Receiver might be a Synthesizer, which will generate audio directly, or it might be a MIDI output port, which transmits MIDI data through a physical cable to some external piece of equipment. Similarly, to record music, a series of time-stamped MidiMessages are generally sent to a Receiver owned by a Sequencer, which places them in a Sequence object. Typically the object sending the messages is a Transmitter associated with a hardware input port, and the port relays MIDI data that it gets from an external instrument. However, the device responsible for sending the messages might instead be some other Sequencer, or any other device that has a Transmitter. Furthermore, as mentioned in Chapter 10, a program can send messages without using any Transmitter at all.

A Sequencer itself has both Receivers and Transmitters. When it's recording, it actually obtains MidiMessages via its Receivers. During playback, it uses its Transmitters to send MidiMessages that are stored in the Sequence that it has recorded (or loaded from a file).

One way to think of the role of a Sequencer in the Java Sound API is as an aggregator and "de-aggregator" of MidiMessages. A series of separate MidiMessages, each of which is independent, is sent to the Sequencer along with its own time stamp that marks the timing of a musical event. These MidiMessages are encapsulated in MidiEvent objects and collected in Sequence objects through the action of the Sequencer.record method. A Sequence is a data structure containing aggregates of MidiEvents, and it usually represents a series of musical notes, often an entire song or composition. On playback, the Sequencer again extracts the MidiMessages from the MidiEvent objects in the Sequence and then transmits them to one or more devices that will either render them into sound, save them, modify them, or pass them on to some other device.

Some sequencers might have neither transmitters nor receivers. For example, they might create MidiEvents from scratch as a result of keyboard or mouse events, instead of receiving MidiMessages through Receivers. Similarly, they might play music by communicating directly with an internal synthesizer (which could actually the same object as the sequencer) instead of sending MidiMessages to a Receiver associated with a separate object. However, the rest of this chapter assumes the normal case of a sequencer that uses Receivers and Transmitters.

When to Use a Sequencer

It's possible for an application program to send MIDI messages directly to a device, without using a sequencer, as was described in Chapter 10, "Transmitting and Receiving MIDI Messages." The program simply invokes the Receiver.send method each time it wants to send a message. This is a straightforward approach that's useful when the program itself creates the messages in real time. For example, consider a program that lets the user play notes by clicking on an onscreen piano keyboard. When the program gets a mouse-down event, it immediately sends the appropriate Note On message to the synthesizer.

As mentioned in Chapter 10, the program can include a time stamp with each MIDI message it sends to the device's receiver. However, such time stamps are used only for fine-tuning the timing, to correct for processing latency. The caller can't generally set arbitrary time stamps; the time value passed to Receiver.send must be close to the present time, or the receiving device might not be able to schedule the message correctly. This means that if an application program wanted to create a queue of MIDI messages for an entire piece of music ahead of time (instead of creating each message in response to a real-time event), it would have to be very careful to schedule each invocation of Receiver.send for nearly the right time.

Fortunately, most application programs don't have to be concerned with such scheduling. Instead of invoking Receiver.send itself, a program can use a Sequencer object to manage the queue of MIDI messages for it. The sequencer takes care of scheduling and sending the messages-in other words, playing the music with the correct timing. Generally, it's advantageous to use a sequencer whenever you need to convert a non-real-time series of MIDI messages to a real-time series (as in playback), or vice versa (as in recording). Sequencers are most commonly used for playing data from MIDI files and for recording data from a MIDI input port.

Understanding Sequence Data

Before examining the Sequencer API, it helps to understand the kind of data that's stored in a sequence.

Sequences and Tracks

In the Java Sound API, sequencers closely follow the Standard MIDI Files specification in the way that they organize recorded MIDI data. As mentioned above, a Sequence is an aggregation of MidiEvents, organized in time. But there is more structure to a Sequence than just a linear series of MidiEvents: a Sequence actually contains global timing information plus a collection of Tracks, and it is the Tracks themselves that hold the MidiEvent data. So the data played by a sequencer consists of a three-level hierarchy of objects: Sequencer, Track, and MidiEvent.

In the conventional use of these objects, the Sequence represents a complete musical composition or section of a composition, with each Track corresponding to a voice or player in the ensemble. In this model, all the data on a particular Track would also therefore be encoded into a particular MIDI channel reserved for that voice or player.

This way of organizing data is convenient for purposes of editing sequences, but note that this is just a conventional way to use Tracks. There is nothing in the definition of the Track class per se that keeps it from containing a mix of MidiEvents on different MIDI channels. For example, an entire multi-channel MIDI composition can be mixed and recorded onto one Track. Also, standard MIDI files of Type 0 (as opposed to Type 1 and Type 2) contain only one track, by definition, so a Sequence that's read from such a file will necessarily have a single Track object.

MidiEvents and Ticks

As discussed in Chapter 8, "Overview of the MIDI Package," the Java Sound API includes MidiMessage objects that correspond to the raw two- or three-byte sequences that make up most standard MIDI messages. A MidiEvent is simply a packaging of a MidiMessage along with an accompanying timing value that specifies when the event occurs. (We might then say that a sequence really consists of a four- or five-level hierarchy of data, rather than three-level, because the ostensible lowest level, MidiEvent, actually contains a lower-level MidiMessage, and likewise the MidiMessage object contains an array of bytes that comprises a standard MIDI message.)

In the Java Sound API, there are two different ways in which MidiMessages can be associated with timing values. One is the way mentioned above under "When to Use a Sequencer." This technique is described in detail under "Sending a Message to a Receiver without Using a Transmitter" and "Understanding Time Stamps" in Chapter 10, "Transmitting and Receiving MIDI Messages." There, we saw that the send method of Receiver takes a MidiMessage argument and a time-stamp argument. That kind of time stamp can only be expressed in microseconds.

The other way in which a MidiMessage can have its timing specified is by being encapsulated in a MidiEvent. In this case, the timing is expressed in slightly more abstract units called ticks.

What is the duration of a tick? It can vary between sequences (but not within a sequence), and its value is stored in the header of a standard MIDI file. The size of a tick is given in one of two types of unit:

  • Pulses (ticks) per quarter note, abbreviated as PPQ
  • Ticks per frame, also known as SMPTE time code (a standard adopted by the Society of Motion Picture and Television Engineers)

If the unit is PPQ, the size of a tick is expressed as a fraction of a quarter note, which is a relative, not absolute, time value. A quarter note is a musical duration value that often corresponds to one beat of the music (a quarter of a measure in 4/4 time). The duration of a quarter note is dependent on the tempo, which can vary during the course of the music if the sequence contains tempo-change events. So if the sequence's timing increments (ticks) occur, say 96 times per quarter note, each event's timing value measures that event's position in musical terms, not as an absolute time value.

On the other hand, in the case of SMPTE, the units measure absolute time, and the notion of tempo is inapplicable. There are actually four different SMPTE conventions available, which refer to the number of motion-picture frames per second. The number of frames per second can be 24, 25, 29.97, or 30. With SMPTE time code, the size of a tick is expressed as a fraction of a frame.

In the Java Sound API, you can learn which type of unit-namely, PPQ or one of the SMPTE units-is used in a particular sequence by invoking Sequence.getDivisionType. You can then calculate the size of a tick after invoking Sequence.getResolution. The latter method returns the number of ticks per quarter note if the division type is PPQ, or per SMPTE frame if the division type is one of the SMPTE conventions. You can get the size of a tick using this formula in the case of PPQ:

ticksPerSecond =
    resolution * (currentTempoInBeatsPerMinute / 60.0);
tickSize = 1.0 / ticksPerSecond;

and this formula in the case of SMPTE:

framesPerSecond =
  (divisionType == Sequence.SMPTE_24 ? 24
    : (divisionType == Sequence.SMPTE_25 ? 25
      : (divisionType == Sequence.SMPTE_30 ? 30
        : (divisionType == Sequence.SMPTE_30DROP ?

            29.97))));
ticksPerSecond = resolution * framesPerSecond;
tickSize = 1.0 / ticksPerSecond;

The Java Sound API's definition of timing in a sequence mirrors that of the Standard MIDI Files specification. However, there's one important difference. The tick values contained in MidiEvents measure cumulative time, rather than delta time. In a standard MIDI file, each event's timing information measures the amount of time elapsed since the onset of the previous event in the sequence. This is called delta time. But in the Java Sound API, the ticks aren't delta values; they're the previous event's time value plus the delta value. In other words, in the Java Sound API the timing value for each event is always greater than that of the previous event in the sequence (or equal, if the events are supposed to be simultaneous). Each event's timing value measures the time elapsed since the beginning of the sequence.

To summarize, the Java Sound API expresses timing information in either MIDI ticks or microseconds. MidiEvents store timing information in terms of MIDI ticks. The duration of a tick can be calculated from the Sequence's global timing information and, if the sequence uses tempo-based timing, the current musical tempo. The time stamp associated with a MidiMessage sent to a Receiver, on the other hand, is always expressed in microseconds.

One goal of this design is to avoid conflicting notions of time. It's the job of a Sequencer to interpret the time units in its MidiEvents, which might have PPQ units, and translate these into absolute time in microseconds, taking the current tempo into account. The sequencer must also express the microseconds relative to the time when the device receiving the message was opened. Note that a sequencer can have multiple transmitters, each delivering messages to a different receiver that might be associated with a completely different device. You can see, then, that the sequencer has to be able to perform multiple translations at the same time, making sure that each device receives time stamps appropriate for its notion of time.

To make matters more complicated, different devices might update their notions of time based on different sources (such as the operating system's clock, or a clock maintained by a sound card). This means that their timings can drift relative to the sequencer's. To keep in synchronization with the sequencer, some devices permit themselves to be "slaves" to the sequencer's notion of time. Setting masters and slaves is discussed later under "Using Advanced Sequencer Features."

Overview of Sequencer Methods

The Sequencer interface provides methods in several categories:

  • Methods to load sequence data from a MIDI file or a Sequence object, and to save the currently loaded sequence data to a MIDI file.
  • Methods analogous to the transport functions of a tape recorder, for stopping and starting playback and recording, enabling and disabling recording on specific tracks, and shuttling the current playback or recording position in a Sequence.
  • Advanced methods for querying and setting the synchronization and timing parameters of the object. A Sequencer may play at different tempos, with some Tracks muted, and in various synchronization states with other objects.
  • Advanced methods for registering "listener" objects that are notified when the Sequencer processes certain kinds of MIDI events.

Regardless of which Sequencer methods you'll invoke, the first step is to obtain a Sequencer device from the system and reserve it for your program's use.

Obtaining a Sequencer

An application program doesn't instantiate a Sequencer; after all, Sequencer is just an interface. Instead, like all devices in the Java Sound API's MIDI package, a Sequencer is accessed through the static MidiSystem object. As mentioned in Chapter 9, "Accessing MIDI System Resources," the following MidiSystem method can be used to obtain the default Sequencer:

    static Sequencer getSequencer()

The following code fragment obtains the default Sequencer, acquires any system resources it needs, and makes it operational:

    Sequencer sequencer;
    // Get default sequencer.
    sequencer = MidiSystem.getSequencer();
    if (sequencer == null) {
        // Error -- sequencer device is not supported.
        // Inform user and return...
    } else {
         // Acquire resources and make operational.
        sequencer.open();
    }

The invocation of open reserves the sequencer device for your program's use. It doesn't make much sense to imagine sharing a sequencer, because it can play only one sequence at a time. When you're done using the sequencer, you can make it available to other programs by invoking close.

Non-default sequencers can be obtained as described in Chapter 9, "Accessing MIDI System Resources."

Loading a Sequence

Having obtained a sequencer from the system and reserved it, you then need load the data that the sequencer should play. There are three typical ways of accomplishing this:

  • Reading the sequence data from a MIDI file
  • Recording it in real time by receiving MIDI messages from another device, such as a MIDI input port
  • Building it programmatically "from scratch" by adding tracks to an empty sequence and adding MidiEvent objects to those tracks

We'll now look at the first of these ways of getting sequence data. (The other two ways are described later under "Recording and Saving Sequences" and "Editing a Sequence," respectively.) This first way actually encompasses two slightly different approaches. One approach is to feed MIDI file data to an InputStream that you then read directly to the sequencer by means of Sequencer.setSequence(InputStream). With this approach, you don't explicitly create a Sequence object. In fact, the Sequencer implementation might not even create a Sequence behind the scenes, because some sequencers have a built-in mechanism for handling data directly from a file.

The other approach is to create a Sequence explicitly. You'll need to use this approach if you're going to edit the sequence data before playing it. With this approach, you invoke MidiSystem's overloaded method getSequence. The method is able to get the sequence from an InputStream, a File, or a URL. The method returns a Sequence object that can be then be loaded into a Sequencer for playback. Expanding on the previous code excerpt, here's an example of obtaining a Sequence object from a File and loading it into our sequencer:

    try {
        File myMidiFile = new File("seq1.mid");
        // Construct a Sequence object, and
        // load it into my sequencer.
         Sequence mySeq = MidiSystem.getSequence(myMidiFile);
        sequencer.setSequence(mySeq);
    } catch (Exception e) {
        // Handle error and/or return
    }

Like MidiSystem's getSequence method, setSequence may throw an InvalidMidiDataException-and, in the case of the InputStream variant, an IOException-if it runs into any trouble.

Playing a Sequence

Starting and stopping a Sequencer is accomplished using the following methods:

    void start()

and

    void stop()

The Sequencer.start method begins playback of the sequence. Note that playback starts at the current position in a sequence. Loading an existing sequence using the setSequence method, described above, initializes the sequencer's current position to the very beginning of the sequence. The stop method stops the sequencer, but it does not automatically rewind the current Sequence. Starting a stopped Sequence without resetting the position simply resumes playback of the sequence from the current position. In this case, the stop method has served as a pause operation. However, there are various Sequencer methods for setting the current sequence position to an arbitrary value before playback is started. (We'll discuss these methods below.)

As mentioned earlier, a Sequencer typically has one or more Transmitter objects, through which it sends MidiMessages to a Receiver. It is through these Transmitters that a Sequencer plays the Sequence, by emitting appropriately timed MidiMessages that correspond to the MidiEvents contained in the current Sequence. Therefore, part of the setup procedure for playing back a Sequence is to invoke the setReceiver method on the Sequencer's Transmitter object, in effect wiring its output to the device that will make use of the played-back data. For more details on Transmitters and Receivers, see Chapter 10, "Transmitting and Receiving MIDI Messages."

Recording and Saving Sequences

To capture MIDI data to a Sequence, and subsequently to a file, you need to perform some additional steps beyond those described above. The following outline shows the steps necessary to set up for recording to a Track in a Sequence:

  1. Use MidiSystem.getSequencer to get a new sequencer to use for recording, as above.

  2. Set up the "wiring" of the MIDI connections. The object that is transmitting the MIDI data to be recorded should be configured, through its setReceiver method, to send data to a Receiver associated with the recording Sequencer.

  3. Create a new Sequence object, which will store the recorded data. When you create the Sequence object, you must specify the global timing information for the sequence. For example:
          Sequence mySeq;
      try{
          mySeq = new Sequence(Sequence.PPQ, 10);
      } catch (Exception ex) {
          ex.printStackTrace();
      }
    The constructor for Sequence takes as arguments a divisionType and a timing resolution. The divisionType argument specifies the units of the resolution argument. In this case, we've specified that the timing resolution of the Sequence we're creating will be 10 pulses per quarter note. An additional optional argument to the Sequence constructor is a number of tracks argument, which would cause the initial sequence to begin with the specified number of (initially empty) Tracks. Otherwise the Sequence will be created with no initial Tracks; they can be added later as needed.

  4. Create an empty Track in the Sequence, with Sequence.createTrack. This step is unnecessary if the Sequence was created with initial Tracks.

  5. Using Sequencer.setSequence, select our new Sequence to receive the recording. The setSequence method ties together an existing Sequence with the Sequencer, which is somewhat analogous to loading a tape onto a tape recorder.

  6. Invoke Sequencer.recordEnable for each Track to be recorded. If necessary, get a reference to the available Tracks in the Sequence by invoking Sequence.getTracks.

  7. Invoke startRecording on the Sequencer.

  8. When done recording, invoke Sequencer.stop or Sequencer.stopRecording.

  9. Save the recorded Sequence to a MIDI file with MidiSystem.write. The write method of MidiSystem takes a Sequence as one of its arguments, and will write that Sequence to a stream or file.

Editing a Sequence

Many application programs allow a sequence to be created by loading it from a file, and quite a few also allow a sequence to be created by capturing it from live MIDI input (that is, recording). Some programs, however, will need to create MIDI sequences from scratch, whether programmatically or in response to user input. Full-featured sequencer programs permit the user to manually construct new sequences, as well as to edit existing ones.

These data-editing operations are achieved in the Java Sound API not by Sequencer methods, but by methods of the data objects themselves: Sequence, Track, and MidiEvent. You can create an empty sequence using one of the Sequence constructors, and then add tracks to it by invoking the following Sequence method:

    Track createTrack()
If your program allows the user to edit sequences, you'll need this Sequence method to remove tracks:
    boolean deleteTrack(Track track)

Once the sequence contains tracks, you can modify the contents of the tracks by invoking methods of the Track class. The MidiEvents contained in the Track are stored as a java.util.Vector in the Track object, and Track provides a set of methods for accessing, adding, and removing the events in the list. The methods add and remove are fairly self-explanatory, adding or removing a specified MidiEvent from a Track. A get method is provided, which takes an index into the Track's event list and returns the MidiEvent stored there. In addition, there are size and tick methods, which respectively return the number of MidiEvents in the track, and the track's duration, expressed as a total number of Ticks.

To create a new event before adding it to the track, you'll of course use the MidiEvent constructor. To specify or modify the MIDI message embedded in the event, you can invoke the setMessage method of the appropriate MidiMessage subclass (ShortMessage, SysexMessage, or MetaMessage). To modify the time that the event should occur, invoke MidiEvent.setTick.

In combination, these low-level methods provide the basis for the editing functionality needed by a full-featured sequencer program.

Using Advanced Sequencer Features

So far, this chapter has focused on simple playback and recording of MIDI data. This section will briefly describe some of the more advanced features available through methods of the Sequencer interface and the Sequence class.

Moving to an Arbitrary Position in the Sequence

There are two Sequencer methods that obtain the sequencer's current position in the sequence. The first of these:

    long getTickPosition()

returns the position measured in MIDI ticks from the beginning of the sequence. The second method:

long getMicrosecondPosition()

returns the current position in microseconds. This method assumes that the sequence is being played at the default rate as stored in the MIDI file or in the Sequence. It does not return a different value if you've changed the playback speed as described below.

You can similarly set the sequencer's current position according to one unit or the other:

void setTickPosition(long tick)

or

void setMicrosecondPosition(long microsecond)

Changing the Playback Speed

As indicated earlier, a sequence's speed is indicated by its tempo, which can vary over the course of the sequence. A sequence can contain events that encapsulate standard MIDI tempo-change messages. When the sequencer processes such an event, it changes the speed of playback to reflect the indicated tempo. In addition, you can programmatically change the tempo by invoking any of these Sequencer methods:

    public void setTempoInBPM(float bpm)
    public void setTempoInMPQ(float mpq)
    public void setTempoFactor(float factor)
The first two of these methods set the tempo in beats per minute or microseconds per quarter note, respectively. The tempo will stay at the specified value until one of these methods is invoked again, or until a tempo-change event is encountered in the sequence, at which point the current tempo is overridden by the newly specified one.

The third method, setTempoFactor, is different in nature. It scales whatever tempo is set for the sequencer (whether by tempo-change events or by one of the first two methods above). The default scalar is 1.0 (no change). Although this method causes the playback or recording to be faster or slower than the nominal tempo (unless the factor is 1.0), it doesn't alter the nominal tempo. In other words, the tempo values returned by getTempoInBPM and getTempoInMPQ are unaffected by the tempo factor, even though the tempo factor does affect the actual rate of playback or recording. Also, if the tempo is changed by a tempo-change event or by one of the first two methods, it still gets scaled by whatever tempo factor was last set. If you load a new sequence, however, the tempo factor is reset to 1.0.

Note that all these tempo-change directives are ineffectual when the sequence's division type is one of the SMPTE types, instead of PPQ.

Muting or Soloing Individual Tracks in the Sequence

It's often convenient for users of sequencers to be able to turn off certain tracks, to hear more clearly exactly what is happening in the music. A full-featured sequencer program lets the user choose which tracks should sound during playback. (Speaking more precisely, since sequencers don't actually create sound themselves, the user chooses which tracks will contribute to the stream of MIDI messages that the sequencer produces.) Typically, there are two types of graphical controls on each track: a mute button and a solo button. If the mute button is activated, that track will not sound under any circumstances, until the mute button is deactivated. Soloing is a less well-known feature. It's roughly the opposite of muting. If the solo button on any track is activated, only tracks whose solo buttons are activated will sound. This feature lets the user quickly audition a small number of tracks without having to mute all the other tracks. The mute button typically takes priority over the solo button: if both are activated, the track doesn't sound.

Using Sequencer methods, muting or soloing tracks (as well as querying a track's current mute or solo state) is easily accomplished. Let's assume we have obtained the default Sequencer and that we've loaded sequence data into it. Muting the fifth track in the sequence would be accomplished as follows:

    sequencer.setTrackMute(4, true);
    boolean muted = sequencer.getTrackMute(4);
    if (!muted) {
        return;		// muting failed
    }
There are a couple of things to note about the above code snippet. First, tracks of a sequence are numbered starting with 0 and ending with the total number of tracks minus 1. Also, the second argument to setTrackMute is a boolean. If it's true, the request is to mute the track; otherwise the request is to unmute the specified track. Lastly, in order to test that the muting took effect, we invoke the Sequencer getTrackMute method, passing it the track number we're querying. If it returns true, as we'd expect in this case, then the mute request worked. If it returns false, then it failed.

Mute requests may fail for various reasons. For example, the track number specified in the setTrackMute call might exceed the total number of tracks, or the sequencer might not support muting. By calling getTrackMute, we can determine if our request succeeded or failed.

As an aside, the boolean that's returned by getTrackMute can, indeed, tell us if a failure occurred, but it can't tell us why it occurred. We could test to see if a failure was caused by passing an invalid track number to the setTrackMute method. To do this, we would call the getTracks method of Sequence, which returns an array containing all of the tracks in the sequence. If the track number specified in the setTrackMute call exceeds the length of this array, then we know we specified an invalid track number.

If the mute request succeeded, then in our example, the fifth track will not sound when the sequence is playing, nor will any other tracks that are currently muted.

The method and techniques for soloing a track are very similar to those for muting. To solo a track, invoke the setTrackSolo method of Sequence:

void setTrackSolo(int track, boolean bSolo)
As in setTrackMute, the first argument specifies the zero-based track number, and the second argument, if true, specifies that the track should be in solo mode; otherwise the track should not be soloed.

By default, a track is neither muted nor soloed.

Synchronizing with Other MIDI Devices

Sequencer has an inner class called Sequencer.SyncMode. A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device. If the sequencer is being synchronized to a master, the sequencer revises its current time in response to certain MIDI messages from the master. If the sequencer has a slave, the sequencer similarly sends MIDI messages to control the slave's timing.

There are three predefined modes that specify possible masters for a sequencer: INTERNAL_CLOCK, MIDI_SYNC, and MIDI_TIME_CODE. The latter two work if the sequencer receives MIDI messages from another device. In these two modes, the sequencer's time gets reset based on system real-time timing clock messages or MIDI time code (MTC) messages, respectively. (See the MIDI specification for more information about these types of message.) These two modes can also be used as slave modes, in which case the sequencer sends the corresponding types of MIDI messages to its receiver. A fourth mode, NO_SYNC, is used to indicate that the sequencer should not send timing information to its receivers.

By calling the setMasterSyncMode method with a supported SyncMode object as the argument, you can specify how the sequencer's timing is controlled. Likewise, the setSlaveSyncMode method determines what timing information the sequencer will send to its receivers. This information controls the timing of devices that use the sequencer as a master timing source.

Specifying Special Event Listeners

Each track of a sequence can contain many different kinds of MidiEvents. Such events include Note On and Note Off messages, program changes, control changes, and meta events. The Java Sound API specifies "listener" interfaces for the last two of these event types (control change events and meta events). You can use these interfaces to receive notifications when such events occur during playback of a sequence.

Objects that support the ControllerEventListener interface can receive notification when a Sequencer processes particular control-change messages. A control-change message is a standard type of MIDI message that represents a change in the value of a MIDI controller, such as a pitch-bend wheel or a data slider. (See the MIDI specification for the complete list of control-change messages.) When such a message is processed during playback of a sequence, the message instructs any device (probably a synthesizer) that's receiving the data from the sequencer to update the value of some parameter. The parameter usually controls some aspect of sound synthesis, such as the pitch of the currently sounding notes if the controller was the pitch-bend wheel. When a sequence is being recorded, the control-change message means that a controller on the external physical device that created the message has been moved, or that such a move has been simulated in software.

Here's how the ControllerEventListener interface is used. Let's assume that you've developed a class that implements the ControllerEventListener interface, meaning that your class contains the following method:

    void controlChange(ShortMessage msg)
Let's also assume that you've created an instance of your class and assigned it to a variable called myListener. If you include the following statements somewhere within your program:
    int[] controllersOfInterest = { 1, 2, 4 };
    sequencer.addControllerEventListener(myListener,
        controllersOfInterest);
then your class's controlChange method will be invoked every time the sequencer processes a control-change message for MIDI controller numbers 1, 2, or 4. In other words, when the Sequencer processes a request to set the value of any of the registered controllers, the Sequencer will invoke your class's controlChange method. (Note that the assignments of MIDI controller numbers to specific control devices is detailed in the MIDI 1.0 Specification.)

The controlChange method is passed a ShortMessage containing the controller number affected, and the new value to which the controller was set. You can obtain the controller number using the ShortMessage.getData1 method, and the new setting of the controller's value using the ShortMessage.getData2 method.

The other kind of special event listener is defined by the MetaEventListener interface. Meta messages, according to the Standard MIDI Files 1.0 specification, are messages that are not present in MIDI wire protocol but that can be embedded in a MIDI file. They are not meaningful to a synthesizer, but can be interpreted by a sequencer. Meta messages include instructions (such as tempo change commands), lyrics or other text, and other indicators (such as end-of-track).

The MetaEventListener mechanism is analogous to ControllerEventListener. Implement the MetaEventListener interface in any class whose instances need to be notified when a MetaMessage is processed by the sequencer. This involves adding the following method to the class:

void meta(MetaMessage msg)

You register an instance of this class by passing it as the argument to the Sequencer addMetaEventListener method:

boolean b = sequencer.addMetaEventListener
        (myMetaListener);
This is slightly different from the approach taken by the ControllerEventListener interface, because you have to register to receive all MetaMessages, not just selected ones of interest. If the sequencer encounters a MetaMessage in its sequence, it will invoke myMetaListener.meta, passing it the MetaMessage encountered. The meta method can invoke getType on its MetaMessage argument to obtain an integer from 0 to 127 that indicates the message type, as defined by the Standard MIDI Files 1.0 specification.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 12

Synthesizing Sound

Most programs that avail themselves of the JavaTM Sound API's MIDI package do so to synthesize sound. The entire apparatus of MIDI files, events, sequences, and sequencers, which was discussed in other chapters, nearly always has the goal of eventually sending musical data to a synthesizer to convert into audio. (Possible exceptions include programs that convert MIDI into musical notation that can be read by a musician, and programs that send messages to external MIDI-controlled devices such as mixing consoles.)

The Synthesizer interface is therefore fundamental to the MIDI package. This chapter shows how to manipulate a synthesizer to play sound. Many programs will simply use a sequencer to send MIDI file data to the synthesizer, and won't need to invoke many Synthesizer methods directly. However, it's possible to control a synthesizer directly, without using sequencers or even MidiMessage objects, as explained near the end of this chapter.

The synthesis architecture might seem complex for readers who are unfamiliar with MIDI. Its API includes three interfaces:

  • Synthesizer
  • MidiChannel
  • Soundbank

and four classes:

  • Instrument
  • Patch
  • SoundbankResource
  • VoiceStatus

As orientation for all this API, the next section explains some of the basics of MIDI synthesis and how they're reflected in the Java Sound API. (Also see the brief section "Synthesizers" under "The Java Sound API's Representation of MIDI Devices" in Chapter 8, "Overview of the MIDI Package.") Subsequent sections give a more detailed look at the API.

Understanding MIDI Synthesis

How does a synthesizer generate sound? Depending on its implementation, it may use one or more sound-synthesis techniques. For example, many synthesizers use wavetable synthesis. A wavetable synthesizer reads stored snippets of audio from memory, playing them at different sample rates and looping them to create notes of different pitches and durations. For example, to synthesize the sound of a saxophone playing the note C#4 (MIDI note number 61), the synthesizer might access a very short snippet from a recording of a saxophone playing the note Middle C (MIDI note number 60), and then cycle repeatedly through this snippet at a slightly faster sample rate than it was recorded at, which creates a long note of a slightly higher pitch. Other synthesizers use techniques such as frequency modulation (FM), additive synthesis, or physical modeling, which don't make use of stored audio but instead generate audio from scratch using different algorithms.

Instruments

What all synthesis techniques have in common is the ability to create many sorts of sounds. Different algorithms, or different settings of parameters within the same algorithm, create different-sounding results. An instrument is a specification for synthesizing a certain type of sound. That sound may emulate a traditional musical instrument (such as a piano or violin) or some other kind of sound source (for example, a telephone or helicopter)-or it may emulate no "real-world" sound at all. A specification called General MIDI defines a standard list of 128 instruments, but most synthesizers allow other instruments as well. Many synthesizers provide a collection of built-in instruments that are always available for use; some synthesizers also support mechanisms for loading additional instruments

An instrument may be vendor-specific-in other words, applicable to only one synthesizer, or to several models from the same vendor. This incompatibility results when two different synthesizers use different sound-synthesis techniques, or different internal algorithms and parameters even if the fundamental technique is the same. Because the details of the synthesis technique are often proprietary, incompatibility is common. The Java Sound API includes ways to detect whether a given synthesizer supports a given instrument.

An instrument can usually be considered a preset; you don't have to know anything about the details of the synthesis technique that produces its sound. However, you can still vary aspects of its sound. Each Note On message specifies the pitch and volume of an individual note. You can also alter the sound through other MIDI commands such as controller messages or system-exclusive messages.

Channels

Many synthesizers are multimbral (sometimes called polytimbral), meaning that they can play the notes of different instruments simultaneously. (Timbre is the characteristic sound quality that enables a listener to distinguish one kind of musical instrument from other kinds.) Multimbral synthesizers can emulate an entire ensemble of real-world instruments, instead of only one instrument at a time. MIDI synthesizers normally implement this feature by taking advantage of the different MIDI channels on which the MIDI specification allows data to be transmitted. In this case, the synthesizer is actually a collection of sound-generating units, each emulating a different instrument and responding independently to messages that are received on a different MIDI channel. Since the MIDI specification provides only 16 channels, a typical MIDI synthesizer can play up to 16 different instruments at once. The synthesizer receives a stream of MIDI commands, many of which are channel commands. (Channel commands are targeted to a particular MIDI channel; for more information, see the MIDI specification.) If the synthesizer is multitimbral, it routes each channel command to the correct sound-generating unit, according to the channel number indicated in the command.

In the Java Sound API, these sound-generating units are instances of classes that implement the MidiChannel interface. A synthesizer object has at least one MidiChannel object. If the synthesizer is multimbral, it has more than one, normally 16. Each MidiChannel represents an independent sound-generating unit.

Because a synthesizer's MidiChannel objects are more or less independent, the assignment of instruments to channels doesn't have to be unique. For example, all 16 channels could be playing a piano timbre, as though there were an ensemble of 16 pianos. Any grouping is possible-for instance, channels 1, 5, and 8 could be playing guitar sounds, while channels 2 and 3 play percussion and channel 12 has a bass timbre. The instrument being played on a given MIDI channel can be changed dynamically; this is known as a program change.

Even though most synthesizers allow only 16 or fewer instruments to be active at a given time, these instruments can generally be chosen from a much larger selection and assigned to particular channels as required.

Soundbanks and Patches

Instruments are organized hierarchically in a synthesizer. As was mentioned in Chapter 8, "Overview of the MIDI Package," the instruments are arranged by bank number and program number. Banks and programs can be thought of as rows and columns in a two-dimensional table of instruments. A bank is a collection of programs. The MIDI specification allows up to 128 programs in a bank, and up to 128 banks. However, a particular synthesizer might support only one bank, or a few banks, and might support fewer than 128 programs per bank.

In the Java Sound API, there's a higher level to the hierarchy: a soundbank. Soundbanks can contain up to 128 banks, each containing up to 128 instruments. Some synthesizers can load an entire soundbank into memory.

To select an instrument from the current soundbank, you specify a bank number and a program number. The MIDI specification accomplishes this with two MIDI commands: bank select and program change. In the Java Sound API, the combination of a bank number and program number is encapsulated in a Patch object. You change a MIDI channel's current instrument by specifying a new patch. The patch can be considered the two-dimensional index of the instrument in the current soundbank.

You might be wondering if soundbanks, too, are indexed numerically. The answer is no; the MIDI specification does not provide for this. In the Java Sound API, a Soundbank object can be obtained by reading a soundbank file. If the soundbank is supported by the synthesizer, its instruments can be loaded into the synthesizer individually as desired, or all at once. Many synthesizers have a built-in or default soundbank; the instruments contained in this soundbank are always available to the synthesizer.

Voices

It's important to distinguish between the number of timbres a synthesizer can play simultaneously and the number of notes it can play simultaneously. The former was described above under "Channels."The ability to play multiple notes at once is referred to as polyphony. Even a synthesizer that isn't multitimbral can generally play more than one note at a time (all having the same timbre, but different pitches). For example, playing any chord, such as a G major triad or a B minor seventh chord, requires polyphony. Any synthesizer that generates sound in real time has a limitation on the number of notes it can synthesize at once. In the Java Sound API, the synthesizer reports this limitation through the getMaxPolyphony method.

A voice is a succession of single notes, such as a melody that a person can sing. Polyphony consists of multiple voices, such as the parts sung by a choir. A 32-voice synthesizer, for example, can play 32 notes simultaneously. (However, some MIDI literature uses the word "voice" in a different sense, similar to the meaning of "instrument" or "timbre.")

The process of assigning incoming MIDI notes to specific voices is known as voice allocation. A synthesizer maintains a list of voices, keeping track of which ones are active (meaning that they currently have notes sounding). When a note stops sounding, the voice becomes inactive, meaning that it's now free to accept the next note-on request that the synthesizer receives. An incoming stream of MIDI commands can easily request more simultaneous notes than the synthesizer is capable of generating. When all the synthesizer's voices are active, how should the next Note On request be handled? Synthesizers can implement different strategies: the most recently requested note can be ignored; or it can be played by discontinuing another note, such as the least recently started one.

Although the MIDI specification does not require it, a synthesizer can make public the contents of each of its voices. The Java Sound API includes a VoiceStatus class for this purpose.

A VoiceStatus reports on the voice's current active or inactive status, MIDI channel, bank and program number, MIDI note number, and MIDI volume.

With this background, let's examine the specifics of the Java Sound API for synthesis.

Managing Instruments and Soundbanks

In many cases, a program can make use of a Synthesizer object without explicitly invoking almost any of the synthesis API. For example, suppose you're playing a standard MIDI file. You load it into a Sequence object, which you play by having a sequencer send the data to the default synthesizer. The data in the sequence controls the synthesizer as intended, playing all the right notes at the right times.

However, there are cases when this simple scenario is inadequate. The sequence contains the right music, but the instruments sound all wrong! This unfortunate situation probably arose because the creator of the MIDI file had different instruments in mind than the ones that are currently loaded into the synthesizer.

The MIDI 1.0 Specification provides for bank-select and program-change commands, which affect which instrument is currently playing on each MIDI channel. However, the specification does not define what instrument should reside in each patch location (bank and program number). The more recent General MIDI specification addresses this problem by defining a bank containing 128 programs that correspond to specific instrument sounds. A General MIDI synthesizer uses 128 instruments that match this specified set. Different General MIDI synthesizers can sound quite different, even when playing what's supposed to be the same instrument. However, a MIDI file should for the most part sound similar (even if not identical), no matter which General MIDI synthesizer is playing it.

Nonetheless, not all creators of MIDI files want to be limited to the set of 128 timbres defined by General MIDI. This section shows how to change the instruments from the default set that the synthesizer comes with. (If there is no default, meaning that no instruments are loaded when you access the synthesizer, you'll have to use this API to start with in any case.)

Learning What Instruments Are Loaded

To learn whether the instruments currently loaded into the synthesizer are the ones you want, you can invoke this Synthesizer method:

Instrument[] getLoadedInstruments()
and iterate over the returned array to see exactly which instruments are currently loaded. Most likely, you would display the instruments' names in the user interface (using the getName method of Instrument), and let the user decide whether to use those instruments or load others. The Instrument API includes a method that reports which soundbank the instrument belongs to. The soundbank's name might help your program or the user ascertain exactly what the instrument is.

This Synthesizer method:

Soundbank getDefaultSoundbank()
gives you the default soundbank. The Soundbank API includes methods to retrieve the soundbank's name, vendor, and version number, by which the program or the user can verify the bank's identity. However, you can't assume when you first get a synthesizer that the instruments from the default soundbank have been loaded into the synthesizer. For example, a synthesizer might have a large assortment of built-in instruments available for use, but because of its limited memory it might not load them automatically.

Loading Different Instruments

The user might decide to load instruments that are different from the current ones (or you might make that decision programmatically). The following method tells you which instruments come with the synthesizer (versus having to be loaded from soundbank files):

Instrument[] getAvailableInstruments()
You can load any of these instruments by invoking:
boolean loadInstrument(Instrument instrument)
The instrument gets loaded into the synthesizer in the location specified by the instrument's Patch object (which can be retrieved using the getPatch method of Instrument).

To load instruments from other soundbanks, first invoke Synthesizer's isSupportedSoundbank method to make sure that the soundbank is compatible with this synthesizer (if it isn't, you can iterate over the system's synthesizers to try to find one that supports the soundbank). You can then invoke one of these methods to load instruments from the soundbank:

boolean loadAllInstruments(Soundbank soundbank)
boolean loadInstruments(Soundbank soundbank,
  Patch[] patchList)
As the names suggest, the first of these loads the entire set of instruments from a given soundbank, and the second loads selected instruments from the soundbank. You could also use Soundbank's getInstruments method to access all the instruments, then iterate over them and load selected instruments one at a time using loadInstrument.

It's not necessary for all the instruments you load to be from the same soundbank. You could use loadInstrument or loadInstruments to load certain instruments from one soundbank, another set from a different soundbank, and so on.

Each instrument has its own Patch object that specifies the location on the synthesizer where the instrument should be loaded. The location is defined by a bank number and a program number. There's no API to change the location by changing the patch's bank or program number.

However, it is possible to load an instrument into a location other than the one specified by its patch, using the following method of Synthesizer:

boolean remapInstrument(Instrument from, Instrument to)
This method unloads its first argument from the synthesizer, and places its second argument in whatever synthesizer patch location had been occupied by the first argument.

Unloading Instruments

Loading an instrument into a program location automatically unloads whatever instrument was already at that location, if any. You can also explicitly unload instruments without necessarily replacing them with new ones. Synthesizer includes three unloading methods that correspond to the three loading methods. If the synthesizer receives a program-change message that selects a program location where no instrument is currently loaded, there won't be any sound from the MIDI channel on which the program-change message was sent.

Accessing Soundbank Resources

Some synthesizers store other information besides instruments in their soundbanks. For example, a wavetable synthesizer stores audio samples that one or more instruments can access. Because the samples might be shared by multiple instruments, they're stored in the soundbank independently of any instrument. Both the Soundbank interface and the Instrument class provide a method call getSoundbankResources, which returns a list of SoundbankResource objects. The details of these objects are specific to the synthesizer for which the soundbank is designed. In the case of wavetable synthesis, a resource might be an object that encapsulates a series of audio samples, taken from one snippet of a sound recording. Synthesizers that use other synthesis techniques might store other kinds of objects in the synthesizer's SoundbankResources array.

Querying the Synthesizer's Capabilities and Current State

The Synthesizer interface includes methods that return information about the synthesizer's capabilities:

    public long getLatency()
    public int getMaxPolyphony()
The latency measures the worst-case delay between the time a MIDI message is delivered to the synthesizer and the time that the synthesizer actually produces the corresponding result. For example, it might take a synthesizer a few milliseconds to begin generating audio after receiving a note-on event.

The getMaxPolyphony method indicates how many notes the synthesizer can sound simultaneously, as discussed under "Voices" in the section "Understanding MIDI Synthesis" earlier in this chapter. As mentioned in the same discussion, a synthesizer can provide information about its voices. This is accomplished through the following method:

public VoiceStatus[] getVoiceStatus()
Each VoiceStatus in the returned array reports the voice's current active or inactive status, MIDI channel, bank and program number, MIDI note number, and MIDI volume. The array's length should normally be the same number returned by getMaxPolyphony. If the synthesizer isn't playing, all its VoiceStatus objects have their active field set to false.

You can learn additional information about the current status of a synthesizer by retrieving its MidiChannel objects and querying their state. This is discussed more in the next section.

Using Channels

Sometimes it's useful or necessary to access a synthesizer's MidiChannel objects directly. This section discusses such situations.

Controlling the Synthesizer without Using a Sequencer

When using a sequence, such as one read from a MIDI file, you don't need to send MIDI commands to the synthesizer yourself. Instead, you just load the sequence into a sequencer, connect the sequencer to the synthesizer, and let it run. The sequencer takes care of scheduling the events, and the result is a predictable musical performance. This scenario works fine when the desired music is known in advance, which is true when it's read from a file.

In some situations, however, the music is generated on the fly as it's playing. For example, the user interface might display a musical keyboard or a guitar fretboard and let the user play notes at will by clicking with the mouse. As another example, an application might use a synthesizer not to play music per se, but to generate sound effects in response to the user's actions. This scenario is typical of games. As a final example, the application might indeed be playing music that's read from a file, but the user interface allows the user to interact with the music, altering it dynamically. In all these cases, the application sends commands directly to the synthesizer, since the MIDI messages need to be delivered immediately, instead of being scheduled for some determinate point in the future.

There are at least two ways of sending a MIDI message to the synthesizer without using a sequencer. The first is to construct a MidiMessage and pass it to the synthesizer using the send method of Receiver. For example, to produce a Middle C (MIDI note number 60) on MIDI channel 5 (one-based) immediately, you could do the following:

    ShortMessage myMsg = new ShortMessage();
    // Play the note Middle C (60) moderately loud
    // (velocity = 93)on channel 4 (zero-based).
    myMsg.setMessage(ShortMessage.NOTE_ON, 4, 60, 93);
    Synthesizer synth = MidiSystem.getSynthesizer();
    Receiver synthRcvr = synth.getReceiver();
    synthRcvr.send(myMsg, -1); // -1 means no time stamp
The second way is to bypass the message-passing layer (that is, the MidiMessage and Receiver API) altogether, and interact with the synthesizer's MidiChannel objects directly. You first need to retrieve the synthesizer's MidiChannel objects, using the following Synthesizer method:
public MidiChannel[] getChannels()
after which you can invoke the desired MidiChannel methods directly,. This is a more immediate route than sending the corresponding MidiMessages to the synthesizer's Receiver and letting the synthesizer handle the communication with its own MidiChannels. For example, the code corresponding to the preceding example would be:
    Synthesizer synth = MidiSystem.getSynthesizer();
    MidiChannel chan[] = synth.getChannels();
    // Check for null; maybe not all 16 channels exist.
    if (chan[4] != null) {
         chan[4].noteOn(60, 93);
    }

Getting a Channel's Current State

The MidiChannel interface provides methods that correspond one-to-one to each of the "channel voice" or "channel mode" messages defined by the MIDI specification. We saw one case with the use of the noteOn method in the previous example. However, in addition to these canonical methods, the Java Sound API's MidiChannel interface adds some "get" methods to retrieve the value most recently set by corresponding voice or mode "set" methods:

    int       getChannelPressure()
    int       getController(int controller)
    boolean   getMono()
    boolean   getOmni()
    int	      getPitchBend()
    int	      getPolyPressure(int noteNumber
    int	      getProgram()
These methods might be useful for displaying channel state to the user, or for deciding what values to send subsequently to the channel.

Muting and Soloing a Channel

The Java Sound API adds the notions of per-channel solo and mute, which are not required by the MIDI specification. These are similar to the solo and mute on the tracks of a MIDI sequence. (See "Muting or Soloing Individual Tracks in the Sequence" in Chapter 11, "Playing, Recording, and Editing MIDI Sequences.)"

If mute is on, this channel will not sound, but other channels are unaffected. If solo is on, this channel, and any other soloed channel, will sound (if it isn't muted), but no other channels will sound. A channel that is both soloed and muted will not sound. The MidiChannel API includes four methods:

    boolean	 getMute()
    boolean	 getSolo()
    void	 setMute(boolean muteState)
    void	 setSolo(boolean soloState)

Permission to Play Synthesized Sound

The audio produced by any installed MIDI synthesizer is typically routed through the sampled-audio system. If your program doesn't have permission to play audio, the synthesizer's sound won't be heard, and a security exception will be thrown. For more information on audio permissions, see "Permission to Use Audio Resources" in Chapter 3, "Accessing Audio System Resources."

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 13

Introduction to the Service Provider Interfaces

What Are Services?

Services are units of sound-handling functionality that are automatically available when an application program makes use of an implementation of the JavaTM Sound API. They consist of objects that do the work of reading, writing, mixing, processing, and converting audio and MIDI data. An implementation of the Java Sound API generally supplies a basic set of services, but in addition, mechanisms are included in the API to support the development of new sound services by third-party developers (or by the vendor of the implementation itself). These new services can be "plugged into" an existing installed implementation, to expand its functionality without requiring a new release. In the Java Sound API architecture, third-party services are integrated into the system in such a way that an application program's interface to them is the same as the interface to the "built-in" services. In some cases, application developers who use the javax.sound.sampled and javax.sound.midi packages might not even be aware that they are employing third-party services.

Examples of potential third-party sampled-audio services include:

  • Sound file readers and writers
  • Converters that translate between different audio data formats
  • New audio mixers and input/output devices, whether implemented purely in software, or in hardware with a software interface

Third-party MIDI services might consist of:

  • MIDI file readers and writers
  • Readers for various types of soundbank files (which are often specific to particular synthesizers)
  • MIDI-controlled sound synthesizers, sequencers, and I/O ports, whether implemented purely in software, or in hardware with a software interface

How Services Work

The javax.sound.sampled and javax.sound.midi packages provide functionality to application developers who wish to include sound services in their application programs. These packages are for consumers of sound services, providing interfaces to get information about, control, and access audio and MIDI services. In addition, the Java Sound API also supplies two packages that define abstract classes to be used by providers of sound services: the javax.sound.sampled.spi and javax.sound.midi.spi packages.

Developers of new sound services implement concrete subclasses of the appropriate classes in the SPI packages. These subclasses, along with any additional classes required to support the new service, are placed in a JavaTM Archive (JAR) archive file with a description of the included service or services. When this JAR file is installed in the user's CLASSPATH, the runtime system automatically makes the new service available, extending the functionality of the JavaTM platform's runtime system.

Once the new service is installed, it can be accessed just like any previously installed service. Consumers of services can get information about the new service, or obtain instances of the new service class itself, by invoking methods of the AudioSystem and MidiSystem classes (in the javax.sound.sampled and javax.sound.midi packages, respectively) to return information about the new services, or to return instances of new or existing service classes themselves. Application programs need not-and should not-reference the classes in the SPI packages (and their subclasses) directly to make use of the installed services.

For example, suppose a hypothetical service provider called Acme Software, Inc. is interested in supplying a package that allows application programs to read a new format of sound file (but one whose audio data is in a standard data format). The SPI class AudioFileReader can be subclassed into a class called, say, AcmeAudioFileReader. In the new subclass, Acme would supply implementations of all the methods defined in AudioFileReader; in this case there are only two methods (with argument variants), getAudioFileFormat and getAudioInputStream. Then when an application program attempted to read a sound file that happened to be in Acme's file format, it would invoke methods of the AudioSystem class in javax.sound.sampled to access the file and information about it. The methods AudioSystem.getAudioInputStream and AudioSystem.getAudioFileFormat provide a standard API to read audio streams; with the AcmeAudioFileReader class installed, this interface is extended to support the new file type transparently. Application developers don't need direct access to the newly registered SPI classes: the AudioSystem object methods pass the query on to the installed AcmeAudioFileReader class.

What's the point of having these "factory" classes? Why not permit the application developer to get access directly to newly provided services? That is a possible approach, but having all management and instantiation of services pass through gatekeeper system objects shields the application developer from having to know anything about the identity of installed services. Application developers just use services of value to them, perhaps without even realizing it. At the same time this architecture permits service providers to effectively manage the available resources in their packages.

Often the use of new sound services is transparent to the application program. For example, imagine a situation where an application developer wants to read in a stream of audio from a file. Assuming that thePathName identifies an audio input file, the program does this:

    File 	theInFile = new File(thePathName);
    AudioInputStream theInStream =

       AudioSystem.getAudioInputStream(theInFile);
Behind the scenes, the AudioSystem determines what installed service can read the file, and asks it to supply the audio data as an AudioInputStream object. The developer might not know or even care that the input audio file is in some new file format (such as Acme's), supported by installed third-party services. The program's first contact with the stream is through the AudioSystem object, and all its subsequent access to the stream and its properties are through the methods of AudioInputStream. Both of these are standard objects in the javax.sound.sampled API; the special handling that the new file format may require is completely hidden.

How Providers Prepare New Services

Service providers supply their new services in specially formatted JAR files, which are to be installed in a directory on the user's system where the Java runtime will find them. JAR files are archive files, each containing sets of files that might be organized in hierarchical directory structures within the archive. Details about the preparation of the class files that go into these archives are discussed in Chapters 14 and 15, which describe the specifics of the audio and MIDI SPI packages; here we'll just give an overview of the process of JAR file creation.

The JAR file for a new service or services should contain a class file for each service supported in the JAR file. Following the Java platform's convention, each class file has the name of the newly defined class, which is a concrete subclass of one of the abstract service provider classes. The JAR file also must include any supporting classes required by the new service implementation. So that the new service or services can be located by the runtime system's service provider mechanism, the JAR file must also contain special files (described below) that map the SPI class names to the new subclasses being defined.

To continue from our example above, say Acme Software, Inc. is distributing a package of new sampled-audio services. Let's suppose this package consists of two new services:

  • The AcmeAudioFileReader class, which was mentioned above, and which is a subclass of AudioFileReader
  • A subclass of AudioFileWriter called AcmeAudioFileWriter, which will write sound files in Acme's new format

Starting from an arbitrary directory-let's call it /devel-where we want to do the build, we create subdirectories and put the new class files in them, organized in such a manner as to give the desired pathname by which the new classes will be referenced:

    com/acme/AcmeAudioFileReader.class
    com/acme/AcmeAudioFileWriter.class
In addition, for each new SPI class being subclassed, we create a mapping file in a specially named directory META-INF/Services. The name of the file is the name of the SPI class being subclassed, and the file contains the names of the new subclasses of that SPI abstract class.

We create the file
META-INF/Services/javax.sound.sampled.spi.AudioFileReader, which consists of:

    # Providers of sound file-reading services
    # (a comment line begins with a pound sign)
    com.acme.AcmeAudioFileReader
and also the file
META-INF/Services/javax.sound.sampled.spi.AudioFileWriter,

which contains:

   # Providers of sound file-writing services
    com.acme.AcmeAudioFileWriter
Now, we run jar from any directory with the command line:
jar cvf acme.jar -C /devel .
The -C option causes jar to switch to the /devel directory, instead of using the directory in which the command is executed. The final period argument instructs jar to archive all the contents of that directory (namely, /devel), but not the directory itself.

This run will create the file acme.jar with the contents:

com/acme/AcmeAudioFileReader.class
com/acme/AcmeAudioFileWriter.class
META-INF/Services/javax.sound.sampled.spi.AudioFileReader
META-INF/Services/javax.sound.sampled.spi.AudioFileWriter
META-INF/Manifest.mf
The file Manifest.mf, which is generated by the jar utility itself, is a list of all the files contained in the archive.

How Users Install New Services

For end users (or system administrators) who wish to get access to a new service through their application programs, installation is simple. They place the provided JAR file in a directory in their CLASSPATH. Upon execution, the Java runtime will find the referenced classes when needed.

It's not an error to install more than one provider for the same service. For example, two different service providers might supply support for reading the same type of sound file. In such a case, the system arbitrarily chooses one of the providers. Users who care which provider is chosen should install only the desired one.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 14

Providing Sampled-Audio Services

As discussed in Chapter 13, "Introduction to the Service Provider Interfaces," the JavaTM Sound API includes two packages, javax.sound.sampled.spi and javax.sound.midi.spi, that define abstract classes to be used by developers of sound services. By implementing and installing a subclass of one of these abstract classes, a service provider registers the new service, extending the functionality of the runtime system. The present chapter tells you how to go about using the javax.sound.sampled.spi package to provide new services for handling sampled audio.

This chapter can be safely skipped by applications programmers who merely wish to use existing audio services in their programs. For the use of the installed audio services in an application program, see Part I, "Sampled Audio," of this Programmer's Guide. This chapter assumes that the reader is familiar with the JavaTM Sound API methods that application programs invoke to access installed audio services.

Introduction

There are four abstract classes in the javax.sound.sampled.spi package, representing four different types of services that you can provide for the sampled-audio system:

  • AudioFileWriter provides sound file-writing services. These services make it possible for an application program to write a stream of audio data to a file of a particular type.
  • AudioFileReader provides file-reading services. These services enable an application program to ascertain a sound file's characteristics, and to obtain a stream from which the file's audio data can be read.
  • FormatConversionProvider provides services for converting audio data formats. These services allow an application program to translate audio streams from one data format to another.
  • MixerProvider provides management of a particular kind of mixer. This mechanism allows an application program to obtain information about, and access instances of, a given kind of mixer.

To recapitulate the discussion in Chapter 13, service providers can extend the functionality of the runtime system. A typical SPI class has two types of methods: ones that respond to queries about the types of services available from a particular provider, and ones that either perform the new service directly, or return instances of objects that actually provide the service. The runtime environment's service-provider mechanism provides registration of installed services with the audio system, and management of the new service provider classes.

In essence there is a double isolation of the service instances from the application developer. An application program never directly creates instances of the service objects, such as mixers or format converters, that it needs for its audio processing tasks. Nor does the program even directly request these objects from the SPI classes that administer them. The application program makes requests to the AudioSystem object in the javax.sound.sampled package, and AudioSystem in turn uses the SPI objects to process these queries and service requests.

The existence of new audio services might be completely transparent to both the user and the application programmer. All application references are through standard objects of the javax.sound.sampled package, primarily AudioSystem, and the special handling that new services might be providing is often completely hidden.

In this chapter, we'll continue the previous chapter's convention of referring to new SPI subclasses by names like AcmeMixer and AcmeMixerProvider.

Providing Audio File-Writing Services

Let's start with AudioFileWriter, one of the simpler SPI classes.

A subclass that implements the methods of AudioFileWriter must provide implementations of a set of methods to handle queries about the file formats and file types supported by the class, as well as provide methods that actually write out a supplied audio data stream to a File or OutputStream.

AudioFileWriter includes two methods that have concrete implementations in the base class:

boolean isFileTypeSupported(AudioFileFormat.Type fileType)
boolean isFileTypeSupported(AudioFileFormat.Type fileType,
    AudioInputStream stream)
The first of these methods informs the caller whether this file writer can write sound files of the specified type. This method is a general inquiry, it will return true if the file writer can write that kind of file, assuming the file writer is handed appropriate audio data. However, the ability to write a file can depend on the format of the specific audio data that's handed to the file writer. A file writer might not support every audio data format, or the constraint might be imposed by the file format itself. (Not all kinds of audio data can be written to all kinds of sound files.) The second method is more specific, then, asking whether a particular AudioInputStream can be written to a particular type of file.

Generally, you won't need to override these two concrete methods. Each is simply a wrapper that invokes one of two other query methods and iterates over the results returned. These other two query methods are abstract and therefore need to be implemented in the subclass:

abstract AudioFileFormat.Type[] getAudioFileTypes()
abstract AudioFileFormat.Type[]
    getAudioFileTypes(AudioInputStream stream)
These methods correspond directly to the previous two. Each returns an array of all the supported file types-all that are supported in general, in the case of the first method, and all that are supported for a specific audio stream, in the case of the second method. A typical implementation of the first method might simply return an array that the file writer's constructor initializes. An implementation of the second method might test the stream's AudioFormat object to see whether it's a data format that the requested type of file supports.

The final two methods of AudioFileWriter do the actual file-writing work:

abstract  int write(AudioInputStream stream,
    AudioFileFormat.Type fileType, java.io.File out)
 abstract  int write(AudioInputStream stream,
    AudioFileFormat.Type fileType, java.io.OutputStream out)
These methods write a stream of bytes representing the audio data to the stream or file specified by the third argument. The details of how this is done depend on the structure of the specified type of file. The write method must write the file's header and the audio data in the manner prescribed for sound files of this format (whether it's a standard type of sound file or a new, possibly proprietary one).

Providing Audio File-Reading Services

The AudioFileReader class consists of six abstract methods that your subclass needs to implement-actually, two different overloaded methods, each of which can take a File, URL, or InputStream argument. The first of these overloaded methods accepts queries about the file format of a specified file:

abstract AudioFileFormat getAudioFileFormat(
    java.io.File file)
abstract AudioFileFormat getAudioFileFormat(
    java.io.InputStream stream)
abstract AudioFileFormat getAudioFileFormat(
    java.net.URL url)
A typical implementation of getAudioFileFormat method reads and parses the sound file's header to ascertain its file format. See the description of the AudioFileFormat class to see what fields need to be read from the header, and refer to the specification for the particular file type to figure out how to parse the header.

Because the caller providing a stream as an argument to this method expects the stream to be unaltered by the method, the file reader should generally start by marking the stream. After reading to the end of the header, it should reset the stream to its original position.

The other overloaded AudioFileReader method provides file-reading services, by returning an AudioInputStream from which the file's audio data can be read:

abstract AudioInputStream getAudioInputStream(
    java.io.File file)
abstract AudioInputStream getAudioInputStream(
     java.io.InputStream stream)
abstract AudioInputStream getAudioInputStream(
     java.net.URL url)
Typically, an implementation of getAudioInputStream returns an AudioInputStream wound to the beginning of the file's data chunk (after the header), ready for reading. It would be conceivable, though, for a file reader to return an AudioInputStream whose audio format represents a stream of data that is in some way decoded from what is contained in the file. The important thing is that the method return a formatted stream from which the audio data contained in the file can be read. The AudioFormat encapsulated in the returned AudioInputStream object will inform the caller about the stream's data format, which is usually, but not necessarily, the same as the data format in the file itself.

Generally, the returned stream is an instance of AudioInputStream; it's unlikely you would ever need to subclass AudioInputStream.

Providing Format-Conversion Services

A FormatConversionProvider subclass transforms an AudioInputStream that has one audio data format into one that has another format. The former (input) stream is referred to as the source stream, and the latter (output) stream is referred to as the target stream. Recall from Chapter 2, "Overview of the Sampled Package," that an AudioInputStream contains an AudioFormat, and the AudioFormat in turn contains a particular type of data encoding, represented by an AudioFormat.Encoding object. The format and encoding in the source stream are called the source format and source encoding, and those in the target stream are likewise called the target format and target encoding.

The work of conversion is performed in the overloaded abstract method of FormatConversionProvider called getAudioInputStream. The class also has abstract query methods for learning about all the supported target and source formats and encodings. There are concrete wrapper methods for querying about a specific conversion.

The two variants of getAudioInputStream are:

abstract AudioInputStream getAudioInputStream(
    AudioFormat.Encoding targetEncoding,
    AudioInputStream sourceStream)
and
abstract AudioInputStream getAudioInputStream(
    AudioFormat targetFormat,
    AudioInputStream sourceStream)
These differ in the first argument, according to whether the caller is specifying a complete target format or just the format's encoding.

A typical implementation of getAudioInputStream works by returning a new subclass of AudioInputStream that wraps around the original (source) AudioInputStream and applies a data format conversion to its data whenever a read method is invoked. For example, consider the case of a new FormatConversionProvider subclass called AcmeCodec, which works with a new AudioInputStream subclass called AcmeCodecStream.

The implementation of AcmeCodec's second getAudioInputStream method might be:

public AudioInputStream getAudioInputStream
      (AudioFormat outputFormat, AudioInputStream stream) {
        AudioInputStream cs = null;
        AudioFormat inputFormat = stream.getFormat();
        if (inputFormat.matches(outputFormat) ) {
            cs = stream;
        } else {
            cs = (AudioInputStream)
                (new AcmeCodecStream(stream, outputFormat));
            tempBuffer = new byte[tempBufferSize];
        }
        return cs;
    }
The actual format conversion takes place in new read methods of the returned AcmeCodecStream, a subclass of AudioInputStream. Again, application programs that access this returned AcmeCodecStream simply operate on it as an AudioInputStream, and don't need to know the details of its implementation.

The other methods of a FormatConversionProvider all permit queries about the input and output encodings and formats that the object supports. The following four methods, being abstract, need to be implemented:

abstract AudioFormat.Encoding[] getSourceEncodings()
abstract AudioFormat.Encoding[] getTargetEncodings()
abstract AudioFormat.Encoding[] getTargetEncodings(
    AudioFormat sourceFormat)
abstract  AudioFormat[] getTargetFormats(
    AudioFormat.Encoding targetEncoding,
    AudioFormat sourceFormat)
As in the query methods of the AudioFileReader class discussed above, these queries are typically handled by checking private data of the object, comparing them against the argument, if the method takes one.

The remaining four FormatConversionProvider methods are concrete and generally don't need to be overridden:

boolean isConversionSupported(
    AudioFormat.Encoding targetEncoding,
    AudioFormat sourceFormat)
boolean isConversionSupported(AudioFormat targetFormat,
    AudioFormat sourceFormat)
boolean isSourceEncodingSupported(
    AudioFormat.Encoding sourceEncoding)
boolean isTargetEncodingSupported(
    AudioFormat.Encoding targetEncoding)
As with AudioFileWriter.isFileTypeSupported,the default implementation of each of these methods is essentially a wrapper that invokes one of the other query methods and iterates over the results returned.

Providing New Types of Mixers

As its name implies, a MixerProvider supplies instances of mixers. Each concrete MixerProvider subclass acts as a factory for the Mixer objects used by an application program. Of course, defining a new MixerProvider only makes sense if one or more new implementations of the Mixer interface are also defined. As in the FormatConversionProvider example above, where our getAudioInputStream method returned a subclass of AudioInputStream that performed the conversion, our new class AcmeMixerProvider has a method getMixer that returns an instance of another new class that implements the Mixer interface. We'll call the latter class AcmeMixer. Particularly if the mixer is implemented in hardware, the provider might support only one static instance of the requested device. If so, it should return this static instance in response to each invocation of getMixer.

Since AcmeMixer supports the Mixer interface, application programs don't require any additional information to access its basic functionality. However, if AcmeMixer supports functionality not defined in the Mixer interface, and the vendor wants to make this extended functionality accessible to application programs, the mixer should of course be defined as a public class with additional, well-documented public methods, so that a program that wishes to make use of this extended functionality can import AcmeMixer and cast the object returned by getMixer to this type.

The other two methods of MixerProvider are:

abstract Mixer.Info[] getMixerInfo()
and
boolean isMixerSupported(Mixer.Info info)
These methods allow the audio system to determine whether this particular provider class can produce a device that an application program needs. In other words, the AudioSystem object can iterate over all the installed MixerProviders to see which ones, if any, can supply the device that the application program has requested of the AudioSystem. (See the discussion under "Getting a Mixer" in Chapter 3, "Accessing Audio System Resources.") The getMixerInfo method returns an array of objects containing information about the kinds of mixer available from this provider object. The system can pass these information objects, along with those from other providers, to an application program.

A single MixerProvider can provide more than one kind of mixer. When the system invokes the MixerProvider's getMixerInfo method, it gets a list of information objects identifying the different kinds of mixer that this provider supports. The system can then invoke MixerProvider.getMixer(Mixer.Info) to obtain each mixer of interest.

Your subclass needs to implement getMixerInfo, as it's abstract. The isMixerSupported method is concrete and doesn't generally need to be overridden. The default implementation simply compares the provided Mixer.Info to each one in the array returned by getMixerInfo.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 15

Providing MIDI Services

Chapter 13, "Introduction to the Service Provider Interfaces," explained that the javax.sound.sampled.spi and javax.sound.midi.spi packages define abstract classes to be used by developers of sound services. By implementing a subclass of one of these abstract classes, a service provider can create a new service that extends the functionality of the runtime system. Chapter 14 covered the use of the javax.sound.sampled.spi package. The present chapter discusses how to use the javax.sound.midi.spi package to provide new services for handling MIDI devices and files.

Applications programmers who only use existing MIDI services in their programs can safely skip this chapter. For an overview of MIDI and the use of the installed MIDI services in an application program, see Part II, "MIDI," of this Programmer's Guide. This chapter assumes that the reader is familiar with the JavaTM Sound API methods that application programs invoke to access installed MIDI services.

Introduction

There are four abstract classes in the javax.sound.midi.spi package, which represent four different types of services that you can provide for the MIDI system:

  • MidiFileWriter provides MIDI file-writing services. These services make it possible for an application program to save, to a MIDI file, a MIDI Sequence that it has generated or processed.
  • MidiFileReader provides file-reading services that return a MIDI Sequence from a MIDI file for use in an application program.
  • MidiDeviceProvider supplies instances of one or more specific types of MIDI device, possibly including hardware devices.
  • SoundbankReader supplies soundbank file-reading services. Concrete subclasses of SoundbankReader parse a given soundbank file, producing a Soundbank object that can be loaded into a Synthesizer.

An application program won't directly create an instance of a service object-whether a provider object, such as a MidiDeviceProvider, or an object, such as a Synthesizer, that is supplied by the provider object. Nor does the program directly refer to the SPI classes. Instead, the application program makes requests to the MidiSystem object in the javax.sound.midi package, and the MidiSystem in turn uses concrete subclasses of the javax.sound.midi.spi classes to process these requests.

Providing MIDI File-Writing Services

There are three standard MIDI file formats, all of which an implementation of the Java Sound API can support: Type 0, Type 1, and Type 2. These file formats differ in their internal representation of the MIDI sequence data in the file, and are appropriate for different kinds of sequences. If an implementation doesn't itself support all three types, a service provider can supply the support for the unimplemented ones. There are also variants of the standard MIDI file formats, some of them proprietary, which similarly could be supported by a third-party vendor.

The ability to write MIDI files is provided by concrete subclasses of MidiFileWriter. This abstract class is directly analogous to javax.sampled.spi.AudioFileWriter. Again, the methods are grouped into query methods for learning what types of files can be written, and methods for actually writing a file. As with AudioFileWriter, two of the query methods are concrete:

boolean isFileTypeSupported(int fileType)
boolean isFileTypeSupported(int fileType, Sequence sequence)
The first of these provides general information about whether the file writer can ever write the specified type of MIDI file type. The second method is more specific: it asks whether a particular Sequence can be written to the specified type of MIDI file. Generally, you don't need to override either of these two concrete methods. In the default implementation, each invokes one of two other corresponding query methods and iterates over the results returned. Being abstract, these other two query methods need to be implemented in the subclass:
abstract int[] getMidiFileTypes()
abstract int[] getMidiFileTypes(Sequence sequence)
The first of these returns an array of all the file types that are supported in general. A typical implementation might initialize the array in the file writer's constructor and return the array from this method. From that set of file types, the second method finds the subset to which the file writer can write the given Sequence. In accordance with the MIDI specification, not all types of sequences can be written to all types of MIDI files.

The write methods of a MidiFileWriter subclass perform the encoding of the data in a given Sequence into the correct data format for the requested type of MIDI file, writing the coded stream to either a file or an output stream:

abstract int write(Sequence in, int fileType,
                   java.io.File out)
abstract int write(Sequence in, int fileType,
                   java.io.OutputStream out)
To do this, the write method must parse the Sequence by iterating over its tracks, construct an appropriate file header, and write the header and tracks to the output. The MIDI file's header format is, of course, defined by the MIDI specification. It includes such information as a "magic number" identifying this as a MIDI file, the header's length, the number of tracks, and the sequence's timing information (division type and resolution). The rest of the MIDI file consists of the track data, in the format defined by the MIDI specification.

Let's briefly look at how the application program, MIDI system, and service provider cooperate in writing a MIDI file. In a typical situation, an application program has a particular MIDI Sequence to save to a file. The program queries the MidiSystem object to see what MIDI file formats, if any, are supported for the particular Sequence at hand, before attempting to write the file. The MidiSystem.getMidiFileTypes(Sequence) method returns an array of all the MIDI file types to which the system can write a particular sequence. A typical implementation does this by invoking the corresponding getMidiFileTypes method for each of the installed MidiFileWriter services, and collecting and returning the results in an array of integers that can be thought of as a master list of all file types compatible with the given Sequence. When it comes to writing the Sequence to a file, the call to MidiSystem.write is passed an integer representing a file type, along with the Sequence to be written and the output file; MidiSystem uses the supplied type to decide which installed MidiFileWriter should handle the write request, and dispatches a corresponding write to the appropriate MidiFileWriter.

Providing MIDI File-Reading Services

The MidiFileReader abstract class is directly analogous to javax.sampled.spi.AudioFileReader class. Both consist of two overloaded methods, each of which can take a File, URL, or InputStream argument. The first of the overloaded methods returns the file format of a specified file. In the case of MidiFileReader, the API is:

abstract MidiFileFormat getMidiFileFormat(java.io.File file)
abstract MidiFileFormat getMidiFileFormat(
    java.io.InputStream stream)
abstract MidiFileFormat getMidiFileFormat(java.net.URL url)
Concrete subclasses must implement these methods to return a filled-out MidiFileFormat object describing the format of the specified MIDI file (or stream or URL), assuming that the file is of a type supported by the file reader and that it contains valid header information. Otherwise, an InvalidMidiDataException should be thrown.

The other overloaded method returns a MIDI Sequence from a given file, stream, or URL :

abstract Sequence getSequence(java.io.File file)
abstract Sequence getSequence(java.io.InputStream stream)
abstract Sequence getSequence(java.net.URL url)
The getSequence method performs the actual work of parsing the bytes in the MIDI input file and constructing a corresponding Sequence object. This is essentially the inverse of the process used by MidiFileWriter.write. Because there is a one-to-one correspondence between the contents of a MIDI file as defined by the MIDI specification and a Sequence object as defined by the Java Sound API, the details of the parsing are straightforward. If the file passed to getSequence contains data that the file reader can't parse (for example, because the file has been corrupted or doesn't conform to the MIDI specification), an InvalidMidiDataException should be thrown.

Providing Particular MIDI Devices

A MidiDeviceProvider can be considered a factory that supplies one or more particular types of MIDI device. The class consists of a method that returns an instance of a MIDI device, as well as query methods to learn what kinds of devices this provider can supply.

As with the other javax.sound.midi.spi services, application developers get indirect access to a MidiDeviceProvider service through a call to MidiSystem methods, in this case MidiSystem.getMidiDevice and MidiSystem.getMidiDeviceInfo. The purpose of subclassing MidiDeviceProvider is to supply a new kind of device, so the service developer must also create an accompanying class for the device being returned-just as we saw with MixerProvider in the javax.sound.sampled.spi package. There, the returned device's class implemented the javax.sound.sampled.Mixer interface, and here it implements the javax.sound.midi.MidiDevice interface. It might also implement a subinterface of MidiDevice, such as Synthesizer or Sequencer.

Because a single subclass of MidiDeviceProvider can provide more than one type of MidiDevice, the getDeviceInfo method of the class returns an array of MidiDevice.Info objects enumerating the different MidiDevices available:

abstract MidiDevice.Info[] getDeviceInfo()
The returned array can contain a single element, of course. A typical implementation of the provider might initialize an array in its constructor and return it here. In turn, an implementation of the MidiSystem can iterate over all the installed MidiDeviceProviders to construct lists of installed devices that it returns to the application program.

MidiDeviceProvider also includes a concrete query method:

boolean isDeviceSupported(MidiDevice.Info info)
This method permits the system to query the provider about a specific kind of device. Generally, you don't need to override this convenience method. The default implementation iterates over the array returned by getDeviceInfo and compares the argument to each element.

The third and final MidiDeviceProvider method returns the requested device:

abstract MidiDevice getDevice(MidiDevice.Info info)
This method should first test the argument to make sure it describes a device that this provider can supply. If it doesn't, it should throw an IllegalArgumentException. Otherwise, it returns the device.

Providing Soundbank File-Reading Services

A SoundBank is a set of Instruments that can be loaded into a Synthesizer. An Instrument is an implementation of a sound-synthesis algorithm that produces a particular sort of sound, and includes accompanying name and information strings. A SoundBank roughly corresponds to a bank in the MIDI specification, but it's a more extensive and addressable collection; it can perhaps better be thought of as a collection of MIDI banks. (For more background information on SoundBanks and Synthesizers, see Chapter 12, "Synthesizing Sound.")

SoundbankReader consists of a single overloaded method, which the system invokes to read a Soundbank object from a soundbank file:

abstract Soundbank getSoundbank(java.io.File file)
abstract Soundbank getSoundbank(java.io.InputStream stream)
abstract Soundbank getSoundbank(java.net.URL url)
Concrete subclasses of SoundbankReader will work in tandem with particular provider-defined implementations of SoundBank, Instrument, and Synthesizer to allow the system to load a SoundBank from a file into an instance of a particular Synthesizer class. Synthesizers may differ wildly in their synthesis techniques, and, as a consequence, the data stored in an Instrument or SoundBank that provides the control or specification data for a Synthesizer's synthesis process can take a variety of forms. One synthesis technique may only require only a few bytes of parameter data; another may be based on extensive sound samples. The particular set of resources present in a SoundBank will depend upon the nature of the Synthesizer into which they get loaded, and therefore a SoundbankReader subclass's implementation of the getSoundbank method has access to knowledge about a particular kind of SoundBank. In addition, a particular subclass of SoundbankReader also understands a particular file format for storing the SoundBank data. That file format may be vendor-specific and proprietary.

SoundBank is just an interface, with only weak constraints on the contents of a SoundBank object. The methods an object must support to implement this interface (getResources, getInstruments, getVendor, getName, etc.) impose loose requirements on the data that the object contains. For example, getResources and getInstruments can return empty arrays. The actual contents of a subclassed SoundBank object, in particular its instruments and its non-instrument resources, are defined by the service provider. Thus, the mechanism of parsing a soundbank file depends entirely on the specification of that particular kind of soundbank file.

Soundbank files are created outside the Java Sound API, typically by the vendor of the synthesizer that can load that kind of soundbank. Some vendors might supply end-user tools for creating such files.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 2

Overview of the Sampled Package

This chapter provides an introduction to the JavaTM Sound API's digital audio architecture, which is accessed through the javax.sound.sampled package. First, an explanation is given of the package's focus: playback and capture of formatted audio data. Then this chapter describes the three fundamental components required for playback or capture: an audio data format, a line, and a mixer. The Line interface and its subinterfaces are introduced briefly.

Design Goals

Before examining the elements of the Java Sound API, it helps to understand the orientation of the javax.sound.sampled package.

A Focus on Data Transport

The javax.sound.sampled package is fundamentally concerned with audio transport-in other words, the Java Sound API focuses on playback and capture. The central task that the Java Sound API addresses is how to move bytes of formatted audio data into and out of the system. This task involves opening audio input and output devices and managing buffers that get filled with real-time sound data. It can also involve mixing multiple streams of audio into one stream (whether for input or output). The transport of sound into or out of the system has to be correctly handled when the user requests that the flow of sound be started, paused, resumed, or stopped.

To support this focus on basic audio input and output, the Java Sound API provides methods for converting between various audio data formats, and for reading and writing common types of sound files. However, it does not attempt to be a comprehensive sound-file toolkit. A particular implementation of the Java Sound API need not support an extensive set of file types or data format conversions. Third-party service providers can supply modules that "plug in" to an existing implementation to support additional file types and conversions.

Buffered and Unbuffered Handling of Audio

The Java Sound API can handle audio transport in both a streaming, buffered fashion and an in-memory, unbuffered fashion. "Streaming" is used here in a general sense to refer to real-time handling of audio bytes; it does not refer to the specific, well-known case of sending audio over the Internet in a certain format. In other words, a stream of audio is simply a continuous set of audio bytes that arrive more or less at the same rate that they are to be handled (played, recorded, etc.). Operations on the bytes commence before all the data has arrived. In the streaming model, particularly in the case of audio input rather than audio output, you do not necessarily know in advance how long the sound is and when it will finish arriving. You simply handle one buffer of audio data at a time, until the operation is halted. In the case of audio output (playback), you also need to buffer data if the sound you want to play is too large to fit in memory all at once. In other words, you deliver your audio bytes to the sound engine in chunks, and it takes care of playing each sample at the right time. Mechanisms are provided that make it easy to know how much data to deliver in each chunk.

The Java Sound API also permits unbuffered transport in the case of playback only, assuming you already have all the audio data at hand and it is not too large to fit in memory. In this situation, there is no need for the application program to buffer the audio, although the buffered, real-time approach is still available if desired. Instead, the entire sound can be preloaded at once into memory for subsequent playback. Because all the sound data is loaded in advance, playback can start immediately-for example, as soon as the user clicks a Start button. This can be an advantage compared to the buffered model, where the playback has to wait for the first buffer to fill. In addition, the in-memory, unbuffered model allows sounds to be easily looped (cycled) or set to arbitrary positions in the data.

These two models for playback are discussed further in Chapter 4, "Playing Back Audio." Buffered recording is discussed in Chapter 5, "Capturing Audio."

The Essentials: Format, Mixer, and Line

To play or capture sound using the Java Sound API, you need at least three things: formatted audio data, a mixer, and a line. Each of these is explained below.

What Is Formatted Audio Data?

Formatted audio data refers to sound in any of a number of standard formats. The Java Sound API distinguishes between data formats and file formats.

Data Formats

A data format tells you how to interpret a series of bytes of "raw" sampled audio data, such as samples that have already been read from a sound file, or samples that have been captured from the microphone input. You might need to know, for example, how many bits constitute one sample (the representation of the shortest instant of sound), and similarly you might need to know the sound's sample rate (how fast the samples are supposed to follow one another). When setting up for playback or capture, you specify the data format of the sound you are capturing or playing.

In the Java Sound API, a data format is represented by an AudioFormat object, which includes the following attributes:

  • Encoding technique, usually pulse code modulation (PCM)
  • Number of channels (1 for mono, 2 for stereo, etc.)
  • Sample rate (number of samples per second, per channel)
  • Number of bits per sample (per channel)
  • Frame rate
  • Frame size in bytes
  • Byte order (big-endian or little-endian)

PCM is one kind of encoding of the sound waveform. The Java Sound API includes two PCM encodings that use linear quantization of amplitude, and signed or unsigned integer values. Linear quantization means that the number stored in each sample is directly proportional (except for any distortion) to the original sound pressure at that instant-and similarly proportional to the displacement of a loudspeaker or eardrum that is vibrating with the sound at that instant. Compact discs, for example, use linear PCM-encoded sound. Mu-law encoding and a-law encoding are common nonlinear encodings that provide a more compressed version of the audio data; these encodings are typically used for telephony or recordings of speech. A nonlinear encoding maps the original sound's amplitude to the stored value using a nonlinear function, which can be designed to give more amplitude resolution to quiet sounds than to loud sounds.

A frame contains the data for all channels at a particular time. For PCM-encoded data, the frame is simply the set of simultaneous samples in all channels, for a given instant in time, without any additional information. In this case, the frame rate is equal to the sample rate, and the frame size in bytes is the number of channels multiplied by the sample size in bits, divided by the number of bits in a byte.

For other kinds of encodings, a frame might contain additional information besides the samples, and the frame rate might be completely different from the sample rate. For example, consider the MP3 (MPEG-1 Audio Layer 3) encoding, which is not explicitly mentioned in the current version of the Java Sound API, but which could be supported by an implementation of the Java Sound API or by a third-party service provider. In MP3, each frame contains a bundle of compressed data for a series of samples, not just one sample per channel. Because each frame encapsulates a whole series of samples, the frame rate is slower than the sample rate. The frame also contains a header. Despite the header, the frame size in bytes is less than the size in bytes of the equivalent number of PCM frames. (After all, the purpose of MP3 is to be more compact than PCM data.) For such an encoding, the sample rate and sample size refer to the PCM data that the encoded sound will eventually be converted into before being delivered to a digital-to-analog converter (DAC).

File Formats

A file format specifies the structure of a sound file, including not only the format of the raw audio data in the file, but also other information that can be stored in the file. Sound files come in various standard varieties, such as WAVE (also known as WAV, and often associated with PCs), AIFF (often associated with Macintoshes), and AU (often associated with UNIX systems). The different types of sound file have different structures. For example, they might have a different arrangement of data in the file's "header." A header contains descriptive information that typically precedes the file's actual audio samples, although some file formats allow successive "chunks" of descriptive and audio data. The header includes a specification of the data format that was used for storing the audio in the sound file. Any of these types of sound file can contain various data formats (although usually there is only one data format within a given file), and the same data format can be used in files that have different file formats.

In the Java Sound API, a file format is represented by an AudioFileFormat object, which contains:

  • The file type (WAVE, AIFF, etc.)
  • The file's length in bytes
  • The length, in frames, of the audio data contained in the file
  • An AudioFormat object that specifies the data format of the audio data contained in the file

The AudioSystem class (described in Chapter 3, " Accessing Audio System Resources") provides methods for reading and writing sounds in different file formats, and for converting between different data formats. Some of the methods let you access a file's contents through a kind of stream called an AudioInputStream. An AudioInputStream is a subclass of the generic Java InputStream class, which encapsulates a series of bytes that can be read sequentially. To its superclass, the AudioInputStream class adds knowledge of the bytes' audio data format (represented by an AudioFormat object). By reading a sound file as an AudioInputStream, you get immediate access to the samples, without having to worry about the sound file's structure (its header, chunks, etc.). A single method invocation gives you all the information you need about the data format and the file type.

What Is a Mixer?

Many application programming interfaces (APIs) for sound make use of the notion of an audio device. A device is often a software interface to a physical input/output device. For example, a sound-input device might represent the input capabilities of a sound card, including a microphone input, a line-level analog input, and perhaps a digital audio input.

In the Java Sound API, devices are represented by Mixer objects. The purpose of a mixer is to handle one or more streams of audio input and one or more streams of audio output. In the typical case, it actually mixes together multiple incoming streams into one outgoing stream. A Mixer object can represent the sound-mixing capabilities of a physical device such as a sound card, which might need to mix the sound coming in to the computer from various inputs, or the sound coming from application programs and going to outputs.

Alternatively, a Mixer object can represent sound-mixing capabilities that are implemented entirely in software, without any inherent interface to physical devices.

In the Java Sound API, a component such as the microphone input on a sound card is not itself considered a device-that is, a mixer-but rather a port into or out of the mixer. A port typically provides a single stream of audio into or out of the mixer (although the stream can be multichannel, such as stereo). The mixer might have several such ports. For example, a mixer representing a sound card's output capabilities might mix several streams of audio together, and then send the mixed signal to any or all of various output ports connected to the mixer. These output ports could be (for example) a headphone jack, a built-in speaker, or a line-level output.

To understand the notion of a mixer in the Java Sound API, it helps to visualize a physical mixing console, such as those used in live concerts and recording studios. (See illustration that follows.)

A Physical Mixing Console

A physical mixer has "strips" (also called "slices"), each representing a path through which a single audio signal goes into the mixer for processing. The strip has knobs and other controls by which you can control the volume and pan (placement in the stereo image) for the signal in that strip. Also, the mixer might have a separate bus for effects such as reverb, and this bus can be connected to an internal or external reverberation unit. Each strip has a potentiometer that controls how much of that strip's signal goes into the reverberated mix. The reverberated ("wet") mix is then mixed with the "dry" signals from the strips. A physical mixer sends this final mixture to an output bus, which typically goes to a tape recorder (or disk-based recording system) and/or speakers.

Imagine a live concert that is being recorded in stereo. Cables (or wireless connections) coming from the many microphones and electric instruments on stage are plugged into the inputs of the mixing console. Each input goes to a separate strip of the mixer, as illustrated. The sound engineer decides on the settings of the gain, pan, and reverb controls. The output of all the strips and the reverb unit are mixed together into two channels. These two channels go to two outputs on the mixer, into which cables are plugged that connect to the stereo tape recorder's inputs. The two channels are perhaps also sent via an amplifier to speakers in the hall, depending on the type of music and the size of the hall.

Now imagine a recording studio, in which each instrument or singer is recorded to a separate track of a multitrack tape recorder. After the instruments and singers have all been recorded, the recording engineer performs a "mixdown" to combine all the taped tracks into a two-channel (stereo) recording that can be distributed on compact discs. In this case, the input to each of the mixer's strips is not a microphone, but one track of the multitrack recording. Once again, the engineer can use controls on the strips to decide each track's volume, pan, and reverb amount. The mixer's outputs go once again to a stereo recorder and to stereo speakers, as in the example of the live concert.

These two examples illustrate two different uses of a mixer: to capture multiple input channels, combine them into fewer tracks, and save the mixture, or to play back multiple tracks while mixing them down to fewer tracks.

In the Java Sound API, a mixer can similarly be used for input (capturing audio) or output (playing back audio). In the case of input, the source from which the mixer gets audio for mixing is one or more input ports. The mixer sends the captured and mixed audio streams to its target, which is an object with a buffer from which an application program can retrieve this mixed audio data. In the case of audio output, the situation is reversed. The mixer's source for audio is one or more objects containing buffers into which one or more application programs write their sound data; and the mixer's target is one or more output ports.

What Is a Line?

The metaphor of a physical mixing console is also useful for understanding the Java Sound API's concept of a line.

A line is an element of the digital audio "pipeline"-that is, a path for moving audio into or out of the system. Usually the line is a path into or out of a mixer (although technically the mixer itself is also a kind of line).

Audio input and output ports are lines. These are analogous to the microphones and speakers connected to a physical mixing console. Another kind of line is a data path through which an application program can get input audio from, or send output audio to, a mixer. These data paths are analogous to the tracks of the multitrack recorder connected to the physical mixing console.

One difference between lines in the Java Sound API and those of a physical mixer is that the audio data flowing through a line in the Java Sound API can be mono or multichannel (for example, stereo). By contrast, each of a physical mixer's inputs and outputs is typically a single channel of sound. To get two or more channels of output from the physical mixer, two or more physical outputs are normally used (at least in the case of analog sound; a digital output jack is often multichannel). In the Java Sound API, the number of channels in a line is specified by the AudioFormat of the data that is currently flowing through the line.

Lines in an Audio-output Configuration

Let's now examine some specific kinds of lines and mixers. The following diagram shows different types of lines in a simple audio-output system that could be part of an implementation of the Java Sound API:

A Possible Configuration of Lines for Audio Output

In this example, an application program has gotten access to some available inputs of an audio-input mixer: one or more clips and source data lines. A clip is a mixer input (a kind of line) into which you can load audio data prior to playback; a source data line is a mixer input that accepts a real-time stream of audio data. The application program preloads audio data from a sound file into the clips. It then pushes other audio data into the source data lines, a buffer at a time. The mixer reads data from all these lines, each of which may have its own reverberation, gain, and pan controls, and mixes the dry audio signals with the wet (reverberated) mix. The mixer delivers its final output to one or more output ports, such as a speaker, a headphone jack, and a line-out jack.

Although the various lines are depicted as separate rectangles in the diagram, they are all "owned" by the mixer, and can be considered integral parts of the mixer. The reverb, gain, and pan rectangles represent processing controls (rather than lines) that can be applied by the mixer to data flowing through the lines.

Note that this is just one example of a possible mixer that is supported by the API. Not all audio configurations will have all the features illustrated. An individual source data line might not support panning, a mixer might not implement reverb, and so on.

Lines in an Audio-input Configuration

A simple audio-input system might be similar:

A Possible Configuration of Lines for Audio Input

Here, data flows into the mixer from one or more input ports, commonly the microphone or the line-in jack. Gain and pan are applied, and the mixer delivers the captured data to an application program via the mixer's target data line. A target data line is a mixer output, containing the mixture of the streamed input sounds. The simplest mixer has just one target data line, but some mixers can deliver captured data to multiple target data lines simultaneously.

The Line Interface Hierarchy

Now that we've seen some functional pictures of what lines and mixers are, let's discuss them from a slightly more programmatic perspective. Several types of line are defined by subinterfaces of the basic Line interface. The interface hierarchy is shown below.

The Line Interface Hierarchy

The base interface, Line, describes the minimal functionality common to all lines:

  • Controls
    Data lines and ports often have a set of controls that affect the audio signal passing through the line. The Java Sound API specifies control classes that can be used to manipulate aspects of sound such as: gain (which affects the signal's volume in decibels), pan (which affects the sound's right-left positioning, reverb (which adds reverberation to the sound to emulate different kinds of room acoustics), and sample rate (which affects the rate of playback as well as the sound's pitch).
  • Open or closed status
    Successful opening of a line guarantees that resources have been allocated to the line. A mixer has a finite number of lines, so at some point multiple application programs (or the same one) might vie for usage of the mixer's lines. Closing a line indicates that any resources used by the line may now be released.
  • Events
    A line generates events when it opens or closes. Subinterfaces of Line can introduce other types of events. When a line generates an event, the event is sent to all objects that have registered to "listen" for events on that line. An application program can create these objects, register them to listen for line events, and react to the events as desired.

We'll now examine the subinterfaces of the Line interface.

Ports are simple lines for input or output of audio to or from audio devices. As mentioned earlier, some common types of ports are the microphone, line input, CD-ROM drive, speaker, headphone, and line output.

The Mixer interface represents a mixer, of course, which as we have seen represents either a hardware or a software device. The Mixer interface provides methods for obtaining a mixer's lines. These include source lines, which feed audio to the mixer, and target lines, to which the mixer delivers its mixed audio. For an audio-input mixer, the source lines are input ports such as the microphone input, and the target lines are TargetDataLines (described below), which deliver audio to the application program. For an audio-output mixer, on the other hand, the source lines are Clips or SourceDataLines (described below), to which the application program feeds audio data, and the target lines are output ports such as the speaker.

A Mixer is defined as having one or more source lines and one or more target lines. Note that this definition means that a mixer need not actually mix data; it might have only a single source line. The Mixer API is intended to encompass a variety of devices, but the typical case supports mixing.

The Mixer interface supports synchronization; that is, you can specify that two or more of a mixer's lines be treated as a synchronized group. Then you can start, stop, or close all those data lines by sending a single message to any line in the group, instead of having to control each line individually. With a mixer that supports this feature, you can obtain sample-accurate synchronization between lines.

The generic Line interface does not provide a means to start and stop playback or recording. For that you need a data line. The DataLine interface supplies the following additional media-related features beyond those of a Line:

  • Audio format
    Each data line has an audio format associated with its data stream.
  • Media position
    A data line can report its current position in the media, expressed in sample frames. This represents the number of sample frames captured by or rendered from the data line since it was opened.
  • Buffer size
    This is the size of the data line's internal buffer in bytes. For a source data line, the internal buffer is one to which data can be written, and for a target data line it's one from which data can be read.
  • Level (the current amplitude of the audio signal)

  • Start and stop playback or capture

  • Pause and resume playback or capture

  • Flush (discard unprocessed data from the queue)

  • Drain (block until all unprocessed data has been drained from the queue, and the data line's buffer has become empty)

  • Active status
    A data line is considered active if it is engaged in active presentation or capture of audio data to or from a mixer.
  • Events
    START and STOP events are produced when active presentation or capture of data from or to the data line starts or stops.

    • A TargetDataLine receives audio data from a mixer. Commonly, the mixer has captured audio data from a port such as a microphone; it might process or mix this captured audio before placing the data in the target data line's buffer. The TargetDataLine interface provides methods for reading the data from the target data line's buffer and for determining how much data is currently available for reading.

    A SourceDataLine receives audio data for playback. It provides methods for writing data to the source data line's buffer for playback, and for determining how much data the line is prepared to receive without blocking.

    A Clip is a data line into which audio data can be loaded prior to playback. Because the data is pre-loaded rather than streamed, the clip's duration is known before playback, and you can choose any starting position in the media. Clips can be looped, meaning that upon playback, all the data between two specified loop points will repeat a specified number of times, or indefinitely.

    This chapter has introduced most of the important interfaces and classes of the sampled-audio API. Subsequent chapters show how you can access and use these objects in your application program.

    [Top] [Prev] [Next] [Bottom]

    Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 3

Accessing Audio System Resources

The JavaTM Sound API takes a flexible approach to system configuration. Different sorts of audio devices (mixers) can be installed on a computer. The API makes few assumptions about what devices have been installed and what their capabilities are. Instead, it provides ways for the system to report about the available audio components, and ways for your program to access them.

This section shows how your program can learn what sampled-audio resources have been installed on the computer, and how it can gain access to the available resources. Among other things, the resources include mixers and the various types of lines owned by the mixers.

The AudioSystem Class

The AudioSystem class acts as a clearinghouse for audio components, including built-in services and separately installed services from third-party providers. AudioSystem serves as an application program's entry point for accessing these installed sampled-audio resources. You can query the AudioSystem to learn what sorts of resources have been installed, and then you can obtain access to them. For example, an application program might start out by asking the AudioSystem class whether there is a mixer that has a certain configuration, such as one of the input or output configurations illustrated earlier in the discussion of lines. From the mixer, the program would then obtain data lines, and so on.

Here are some of the resources an application program can obtain from the AudioSystem:

  • Mixers
    A system typically has multiple mixers installed. There is usually at least one for audio input and one for audio output. There might also be mixers that don't have I/O ports but instead accept audio from an application program and deliver the mixed audio back to the program. The AudioSystem class provides a list of all of the installed mixers.
  • Lines
    Even though every line is associated with a mixer, an application program can get a line directly from the AudioSystem, without dealing explicitly with mixers.
  • Format conversions
    An application program can use format conversions to translate audio data from one format to another. Conversions are described in Chapter 7, "Using Files and Format Converters ."
  • Files and streams
    The AudioSystem class provides methods for translating between audio files and audio streams. It can also report the file format of a sound file and can write files in different formats. These facilities are discussed in Chapter 7, "Using Files and Format Converters ."

Information Objects

Several classes in the Java Sound API provide useful information about associated interfaces. For example, Mixer.Info provides details about an installed mixer, such as the mixer's vendor, name, description, and version. Line.Info obtains the class of a specific line. Subclasses of Line.Info include Port.Info and DataLine.Info, which obtain details relevant to a specific port and data line, respectively. Each of these classes is described further in the appropriate section below. It's important not to confuse the Info object with the mixer or line object that it describes.

Getting a Mixer

Usually, one of the first things a program that uses the Java Sound API needs to do is to obtain a mixer, or at least one line of a mixer, so that you can get sound into or out of the computer. Your program might need a specific kind of mixer, or you might want to display a list of all the available mixers so that the user can select one. In either case, you need to learn what kinds of mixers are installed. AudioSystem provides the following method:

    static Mixer.Info[] getMixerInfo()
Each Mixer.Info object returned by this method identifies one type of mixer that is installed. (Usually a system has at most one mixer of a given type. If there happens to be more than one of a given type, the returned array still only has one Mixer.Info for that type.) An application program can iterate over the Mixer.Info objects to find an appropriate one, according to its needs. The Mixer.Info includes the following strings to identify the kind of mixer:

  • Name
  • Version
  • Vendor
  • Description

These are arbitrary strings, so an application program that needs a specific mixer must know what to expect and what to compare the strings to. The company that provides the mixer should include this information in its documentation. Alternatively, and perhaps more typically, the application program will display all the Mixer.Info objects' strings to the user and let the user choose the corresponding mixer.

Once an appropriate mixer is found, the application program invokes the following AudioSystem method to obtain the desired mixer:

    static Mixer getMixer(Mixer.Info info)
What if your program needs a mixer that has certain capabilities, but it doesn't need a specific mixer made by a specific vendor? And what if you can't depend on the user's knowing which mixer should be chosen? In that case, the information in the Mixer.Info objects won't be of much use. Instead, you can iterate over all the Mixer.Info objects returned by getMixerInfo, get a mixer for each by invoking getMixer, and query each mixer for its capabilities. For example, you might need a mixer that can write its mixed audio data to a certain number of target data lines simultaneously. In that case, you would query each mixer using this Mixer method:

int getMaxLines(Line.Info info)

Here, the Line.Info would specify a TargetDataLine. The Line.Info class is discussed in the next section.

Getting a Line of a Desired Type

There are two ways to get a line:

  • Directly from the AudioSystem object
  • From a mixer that you have already obtained from the AudioSystem object (see "Getting a Mixer," in this chapter)

Getting a Line Directly from the AudioSystem

Let's assume you haven't obtained a mixer, and your program is a simple one that really only needs a certain kind of line; the details of the mixer don't matter to you. You can use the AudioSystem method:

    static Line getLine(Line.Info info)
which is analogous to the getMixer method discussed above. Unlike Mixer.Info, the Line.Info used as an argument doesn't store textual information to specify the desired line. Instead, it stores information about the class of line desired.

Line.Info is an abstract class, so you use one of its subclasses (Port.Info or DataLine.Info) to obtain a line. The following code excerpt uses the DataLine.Info subclass to obtain and open a target data line:

TargetDataLine line;
DataLine.Info info = new DataLine.Info(TargetDataLine.class,
    format); // format is an AudioFormat object
if (!AudioSystem.isLineSupported(info)) {
    // Handle the error.
    }
    // Obtain and open the line.
try {
    line = (TargetDataLine) AudioSystem.getLine(info);
    line.open(format);
} catch (LineUnavailableException ex) {
       // Handle the error.
    //...
}
This code obtains a TargetDataLine object without specifying any attributes other than its class and its audio format. You can use analogous code to obtain other kinds of lines. For a SourceDataLine or a Clip, just substitute that class for TargetDataLine as the class of the line variable, and also in the first argument to the DataLine.Info constructor.

For a Port, you can use static instances of Port.Info, in code like the following:

if (AudioSystem.isLineSupported(Port.Info.MICROPHONE)) {
    try {
        line = (Port) AudioSystem.getLine(
            Port.Info.MICROPHONE);
    }
}
Note the use of the method isLineSupported to see whether the mixer even has a line of the desired type.

Recall that a source line is an input to a mixer-namely, a Port object if the mixer represents an audio-input device, and a SourceDataLine or Clip object if the mixer represents an audio-output device. Similarly, a target line is an output of the mixer: a Port object for an audio-output mixer, and a TargetDataLine object for an audio-input mixer. What if a mixer doesn't connect to any external hardware device at all? For example, consider an internal or software-only mixer that gets audio from an application program and delivers its mixed audio back to the program. This kind of mixer has SourceDataLine or Clip objects for its input lines and TargetDataLine objects for its output lines.

You can also use the following AudioSystem methods to learn more about source and target lines of a specified type that are supported by any installed mixer:

    static Line.Info[] getSourceLineInfo(Line.Info info)
    static Line.Info[] getTargetLineInfo(Line.Info info)
Note that the array returned by each of these methods indicates unique types of lines, not necessarily all the lines. For example, if two of a mixer's lines, or two lines of different mixers, have identical Line.Info objects, the two lines will represented by only one Line.Info in the returned array.

Getting a Line from a Mixer

The Mixer interface includes variations on the AudioSystem access methods for source and target lines, described above. These Mixer methods include ones that take Line.Info arguments, just as AudioSystem's methods do. However, Mixer also includes these variants, which take no arguments:

    Line.Info[] getSourceLineInfo()
    Line.Info[] getTargetLineInfo()
These methods return arrays of all the Line.Info objects for the particular mixer. Once you've obtained the arrays, you can iterate over them, calling Mixer's getLine method to obtain each line, followed by Line's open method to reserve use of each line for your program.

Selecting Input and Output Ports

The previous section, regarding how to obtain a line of a desired type, applies to ports as well as other types of lines. You can obtain all of the source (i.e., input) and target (i.e, output) ports by passing a Port.Info object to the AudioSystem (or Mixer) methods getSourceLineInfo and getTargetLineInfo that take a Line.Info argument. You then iterate over the returned array of objects and invoke Mixer's getLine method to get each port.

You can then open each Port by invoking Line's open method. Opening a port means you turn it on-that is, you allow sound to come in or out the port. Similarly, you can close ports that you don't want sound to travel through, because some ports might already be open before you even obtain them. Some platforms leave all ports on by default; or a user or system administrator might have selected certain ports to be on or off, using another application program or operating-system software.

Warning: If you want to select a certain port and make sure that the sound is actually going in or out the port, you can open the port as described. However, this can be considered user-hostile behavior! For example, a user might have the speaker port turned off so as not to disturb her co-workers. She would be rather upset if your program suddenly overrode her wishes and started blaring music. As another example, a user might want to be assured that his computer's microphone is never turned on without his knowledge, to avoid eavesdropping. In general, it is recommended not to open or close ports unless your program is responding to the user's intentions, as expressed through the user interface. Instead, respect the settings that the user or the operating system has already selected.

It isn't necessary to open or close a port before the mixer it's attached to will function correctly. For example, you can start playing back sound into an audio-output mixer, even though all its output ports are closed. The data still flows into the mixer; the playback isn't blocked. The user just won't hear anything. As soon as the user opens an output port, the sound will be audible through that port, starting at whatever point in the media the playback has already reached.

Also, you don't need to access the ports to learn whether the mixer has certain ports. To learn whether a mixer is actually an audio-output mixer, for example, you can invoke getTargetLineInfo to see whether it has output ports. There's no reason to access the ports themselves unless you want to change their settings (such as their open-or-closed state, or the settings of any controls they might have).

Permission to Use Audio Resources

The Java Sound API includes an AudioPermission class that indicates what kinds of access an applet (or an application running with a security manager) can have to the sampled-audio system. Permission to record sound is controlled separately. This permission should be granted with care, to help prevent security risks such as unauthorized eavesdropping. By default, applets and applications are granted permissions as follows:

  • An applet running with the applet security manager can play, but not record, audio.
  • An application running with no security manager can both play and record audio.
  • An application running with the default security manager can play, but not record, audio.

In general, applets are run under the scrutiny of a security manager and aren't permitted to record sound. Applications, on the other hand, don't automatically install a security manager, and are able to record sound. (However, if the default security manager is invoked explicitly for an application, the application isn't permitted to record sound.)

Both applets and applications can record sound even when running with a security manager if they have been granted explicit permission to do so.

If your program doesn't have permission to record (or play) sound, an exception will be thrown when it attempts to open a line. There is nothing you can do about this in your program, other than to catch the exception and report the problem to the user, because permissions can't be changed through the API. (If they could, they would be pointless, because nothing would be secure!) Generally, permissions are set in one or more policy configuration files, which a user or system administrator can edit using a text editor or the Policy Tool program.

For more information on security and permissions, see "Security Architecture" and "Policy Permissions" at: http://java.sun.com/products/jdk/1.3/docs/guide/security and the specialized trail on security in the Java Tutorial at http://java.sun.com/docs/books/tutorial/.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 4

Playing Back Audio

Playback is sometimes referred to as presentation or rendering. These are general terms that are applicable to other kinds of media besides sound. The essential feature is that a sequence of data is delivered somewhere for eventual perception by a user. If the data is time-based, as sound is, it must be delivered at the correct rate. With sound even more than video, it's important that the rate of data flow be maintained, because interruptions to sound playback often produce loud clicks or irritating distortion. The JavaTM Sound API is designed to help application programs play sounds smoothly and continuously, even very long sounds.

The previous chapter discussed how to obtain a line from the audio system or from a mixer. This chapter shows how to play sound through a line.

There are two kinds of line that you can use for playing sound: a Clip and a SourceDataLine. These two interfaces were introduced briefly under "The Line Interface Hierarchy" in Chapter 2, "Overview of the Sampled Package ." The chief difference between the two is that with a Clip you specify all the sound data at one time, before playback, whereas with a SourceDataLine you keep writing new buffers of data continuously during playback. Although there are many situations in which you could use either a Clip or a SourceDataLine, the following criteria help identify which kind of line is better suited for a particular situation:

  • Use a Clip when you have non-real-time sound data that can be preloaded into memory.

    For example, you might read a short sound file into a clip. If you want the sound to play back more than once, a Clip is more convenient than a SourceDataLine, especially if you want the playback to loop (cycle repeatedly through all or part of the sound). If you need to start the playback at an arbitrary position in the sound, the Clip interface provides a method to do that easily. Finally, playback from a Clip generally has less latency than buffered playback from a SourceDataLine. In other words, because the sound is preloaded into a clip, playback can start immediately instead of having to wait for the buffer to be filled.

  • Use a SourceDataLine for streaming data, such as a long sound file that won't all fit in memory at once, or a sound whose data can't be known in advance of playback.

    As an example of the latter case, suppose you're monitoring sound input-that is, playing sound back as it's being captured. If you don't have a mixer that can send input audio right back out an output port, your application program will have to take the captured data and send it to an audio-output mixer. In this case, a SourceDataLine is more appropriate than a Clip. Another example of sound that can't be known in advance occurs when you synthesize or manipulate the sound data interactively in response to the user's input. For example, imagine a game that gives aural feedback by "morphing" from one sound to another as the user moves the mouse. The dynamic nature of the sound transformation requires the application program to update the sound data continuously during playback, instead of supplying it all before playback starts.

Using a Clip

You obtain a Clip as described earlier under "Getting a Line of a Desired Type" in Chapter 3, " Accessing Audio System Resources": Construct a DataLine.Info object with Clip.class for the first argument, and pass this DataLine.Info as an argument to the getLine method of AudioSystem or Mixer.

Setting Up the Clip for Playback

Obtaining a line just means you've gotten a way to refer to it; getLine doesn't actually reserve the line for you. Because a mixer might have a limited number of lines of the desired type available, it can happen that after you invoke getLine to obtain the clip, another application program jumps in and grabs the clip before you're ready to start playback. To actually use the clip, you need to reserve it for your program's exclusive use by invoking one of the following Clip methods:

   void open(AudioInputStream stream)
   void open(AudioFormat format, byte[] data, int offset,
   int bufferSize)
Despite the bufferSize argument in the second open method above, Clip (unlike SourceDataLine) includes no methods for writing new data to the buffer. The bufferSize argument here just specifies how much of the byte array to load into the clip. It's not a buffer into which you can subsequently load more data, as you can with a SourceDataLine's buffer.

After opening the clip, you can specify at what point in the data it should start playback, using Clip's setFramePosition or setMicroSecondPosition methods. Otherwise, it will start at the beginning. You can also configure the playback to cycle repeatedly, using the setLoopPoints method.

Starting and Stopping Playback

When you're ready to start playback, simply invoke the start method. To stop or pause the clip, invoke the stop method, and to resume playback, invoke start again. The clip remembers the media position where it stopped playback, so there's no need for explicit pause and resume methods. If you don't want it to resume where it left off, you can "rewind" the clip to the beginning (or to any other position, for that matter) using the frame- or microsecond-positioning methods mentioned above.

A Clip's volume level and activity status (active versus inactive) can be monitored by invoking the DataLine methods getLevel and isActive, respectively. An active Clip is one that is currently playing sound.

Using a SourceDataLine

Obtaining a SourceDataLine is similar to obtaining a Clip. See "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources ."

Setting Up the SourceDataLine for Playback

Opening the SourceDataLine is also similar to opening a Clip, in that the purpose is once again to reserve the line. However, you use a different method, inherited from DataLine:

    void open(AudioFormat format)
Notice that when you open a SourceDataLine, you don't associate any sound data with the line yet, unlike opening a Clip. Instead, you just specify the format of the audio data you want to play. The system chooses a default buffer length.

You can also stipulate a certain buffer length in bytes, using this variant:

    void open(AudioFormat format, int bufferSize)
For consistency with similar methods, the buffersize argument is expressed in bytes, but it must correspond to an integral number of frames.

How would you select a buffer size? It depends on your program's needs.

To start with, shorter buffer sizes mean less latency. When you send new data, you hear it sooner. For some application programs, particularly highly interactive ones, this kind of responsiveness is important. For example, in a game, the onset of playback might need to be tightly synchronized with a visual event. Such programs might need a latency of less than 0.1 second. As another example, a conferencing application needs to avoid delays in both playback and capture. However, many application programs can afford a greater delay, up to a second or more, because it doesn't matter exactly when the sound starts playing, as long as the delay doesn't confuse or annoy the user. This might be the case for an application program that streams a large audio file using one-second buffers. The user probably won't care if playback takes a second to start, because the sound itself lasts so long and the experience isn't highly interactive.

On the other hand, shorter buffer sizes also mean a greater risk that you'll fail to write data fast enough into the buffer. If that happens, the audio data will contain discontinuities, which will probably be audible as clicks or breakups in the sound. Shorter buffer sizes also mean that your program has to work harder to keep the buffers filled, resulting in more intensive CPU usage. This can slow down the execution of other threads in your program, not to mention other programs.

So an optimal value for the buffer size is one that minimizes latency just to the degree that's acceptable for your application program, while keeping it large enough to reduce the risk of buffer underflow and to avoid unnecessary consumption of CPU resources. For a program like a conferencing application, delays are more annoying than low-fidelity sound, so a small buffer size is preferable. For streaming music, an initial delay is acceptable, but breakups in the sound are not, so a larger buffer size-say, a second-is preferable. (Note that high sample rates make the buffers larger in terms of the number of bytes, which are the units for measuring buffer size in the DataLine API.)

Instead of using the open method described above, it's also possible to open a SourceDataLine using Line's open() method, without arguments. In this case, the line is opened with its default audio format and buffer size. However, you can't change these later. If you want to know the line's default audio format and buffer size, you can invoke DataLine's getFormat and getBufferSize methods, even before the line has ever been opened.

Starting and Stopping Playback

Once the SourceDataLine is open, you can start playing sound. You do this by invoking DataLine's start method, and then writing data repeatedly to the line's playback buffer.

The start method permits the line to begin playing sound as soon as there's any data in its buffer. You place data in the buffer by the following method:

    int write(byte[] b, int offset, int length)
The offset into the array is expressed in bytes, as is the array's length.

The line begins sending data as soon as possible to its mixer. When the mixer itself delivers the data to its target, the SourceDataLine generates a START event. (In a typical implementation of the Java Sound API, the delay between the moment that the source line delivers data to the mixer and the moment that the mixer delivers the data to its target is negligible-that is, much less than the time of one sample.) This START event gets sent to the line's listeners, as explained below under "Monitoring a Line's Status." The line is now considered active, so the isActive method of DataLine will return true. Notice that all this happens only once the buffer contains data to play, not necessarily right when the start method is invoked. If you invoked start on a new SourceDataLine but never wrote data to the buffer, the line would never be active and a START event would never be sent. (However, in this case, the isRunning method of DataLine would return true.)

So how do you know how much data to write to the buffer, and when to send the second batch of data? Fortunately, you don't need to time the second invocation of write to synchronize with the end of the first buffer! Instead, you can take advantage of the write method's blocking behavior:

  • The method returns as soon as the data has been written to the buffer. It doesn't wait until all the data in the buffer has finished playing. (If it did, you might not have time to write the next buffer without creating a discontinuity in the audio.)
  • It's all right to try to write more data than the buffer will hold. In this case, the method blocks (doesn't return) until all the data you requested has actually been placed in the buffer. In other words, one buffer's worth of your data at a time will be written to the buffer and played, until the remaining data all fits in the buffer, at which point the method returns. Whether or not the method blocks, it returns as soon as the last buffer's worth of data from this invocation can be written. Again, this means that your code will in all likelihood regain control before playback of the last buffer's worth of data has finished.
  • While in many contexts it is fine to write more data than the buffer will hold, if you want to be certain that the next write issued does not block, you can limit the number of bytes you write to the number that DataLine's available method returns.

Here's an example of iterating through chunks of data that are read from a stream, writing one chunk at a time to the SourceDataLine for playback:

// read chunks from a stream and write them to a source data
line
line.start();
while (total < totalToRead && !stopped)}
    numBytesRead = stream.read(myData, 0, numBytesToRead);
    if (numBytesRead == -1) break;
    total += numBytesRead;
    line.write(myData, 0, numBytesRead);

}
If you don't want the write method to block, you can first invoke the available method (inside the loop) to find out how many bytes can be written without blocking, and then limit the numBytesToRead variable to this number, before reading from the stream. In the example given, though, blocking won't matter much, since the write method is invoked inside a loop that won't complete until the last buffer is written in the final loop iteration. Whether or not you use the blocking technique, you'll probably want to invoke this playback loop in a separate thread from the rest of the application program, so that your program doesn't appear to freeze when playing a long sound. On each iteration of the loop, you can test whether the user has requested playback to stop. Such a request needs to set the stopped boolean, used in the code above, to true.

Since write returns before all the data has finished playing, how do you learn when the playback has actually completed? One way is to invoke the drain method of DataLine after writing the last buffer's worth of data. This method blocks until all the data has been played. When control returns to your program, you can free up the line, if desired, without fear of prematurely cutting off the playback of any audio samples:

line.write(b, offset, numBytesToWrite);
//this is the final invocation of write
line.drain();
line.stop();
line.close();
line = null;
You can intentionally stop playback prematurely, of course. For example, the application program might provide the user with a Stop button. Invoke DataLine's stop method to stop playback immediately, even in the middle of a buffer. This leaves any unplayed data in the buffer, so that if you subsequently invoke start, the playback resumes where it left off. If that's not what you want to happen, you can discard the data left in the buffer by invoking flush.

A SourceDataLine generates a STOP event whenever the flow of data has been stopped, whether this stoppage was initiated by the drain method, the stop method, or the flush method, or because the end of a playback buffer was reached before the application program invoked write again to provide new data. A STOP event doesn't necessarily mean that the stop method was invoked, and it doesn't necessarily mean that a subsequent invocation of isRunning will return false. It does, however, mean that isActive will return false. (When the start method has been invoked, the isRunning method will return true, even if a STOP event is generated, and it will begin to return false only once the stop method is invoked.) It's important to realize that START and STOP events correspond to isActive, not to isRunning.

Monitoring a Line's Status

Once you have started a sound playing, how do you find when it's finished? We saw one solution above-invoking the drain method after writing the last buffer of data-but that approach is applicable only to a SourceDataLine. Another approach, which works for both SourceDataLines and Clips, is to register to receive notifications from the line whenever the line changes its state. These notifications are generated in the form of LineEvent objects, of which there are four types: OPEN, CLOSE, START, and STOP.

Any object in your program that implements the LineListener interface can register to receive such notifications. To implement the LineListener interface, the object simply needs an update method that takes a LineEvent argument. To register this object as one of the line's listeners, you invoke the following Line method:

    public void addLineListener(LineListener listener)
Whenever the line opens, closes, starts, or stops, it sends an update message to all its listeners. Your object can query the LineEvent that it receives. First you might invoke LineEvent.getLine to make sure the line that stopped is the one you care about. In the case we're discussing here, you want to know if the sound is finished, so you see whether the LineEvent is of type STOP. If it is, you might check the sound's current position, which is also stored in the LineEvent object, and compare it to the sound's length (if known) to see whether it reached the end and wasn't stopped by some other means (such as the user's clicking a Stop button, although you'd probably be able to determine that cause elsewhere in your code).

Along the same lines, if you need to know when the line is opened, closed, or started, you use the same mechanism. LineEvents are generated by different kinds of lines, not just Clips and SourceDataLines. However, in the case of a Port you can't count on getting an event to learn about a line's open or closed state. For example, a Port might be initially open when it's created, so you don't invoke the open method and the Port doesn't ever generate an OPEN event. (See "Selecting Input and Output Ports" in Chapter 3, " Accessing Audio System Resources.")

Synchronizing Playback on Multiple Lines

If you're playing back multiple tracks of audio simultaneously, you probably want to have them all start and stop at exactly the same time. Some mixers facilitate this behavior with their synchronize method, which lets you apply operations such as open, close, start, and stop to a group of data lines using a single command, instead of having to control each line individually. Furthermore, the degree of accuracy with which operations are applied to the lines is controllable.

To find out whether a particular mixer offers this feature for a specified group of data lines, invoke the Mixer interface's isSynchronizationSupported method:

boolean isSynchronizationSupported(Line[] lines,
  boolean  maintainSync)
The first parameter specifies a group of specific data lines, and the second parameter indicates the accuracy with which synchronization must be maintained. If the second parameter is true, the query is asking whether the mixer is capable of maintaining sample-accurate precision in controlling the specified lines at all times; otherwise, precise synchronization is required only during start and stop operations, not throughout playback.

Processing the Outgoing Audio

Some source data lines have signal-processing controls, such as gain, pan, reverb, and sample-rate controls. Similar controls, especially gain controls, might be present on the output ports as well. For more information on how to determine whether a line has such controls, and how to use them if it does, see Chapter 6, "Processing Audio with Controls ."

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 5

Capturing Audio

Capturing refers to the process of obtaining a signal from outside the computer. A common application of audio capture is recording, such as recording the microphone input to a sound file. However, capturing isn't synonymous with recording, because recording implies that the application always saves the sound data that's coming in. An application that captures audio doesn't necessarily store the audio. Instead it might do something with the data as it's coming in-such as transcribe speech into text-but then discard each buffer of audio as soon as it's finished with that buffer.

As discussed in Chapter 2, "Overview of the Sampled Package ," a typical audio-input system in an implementation of the JavaTM Sound API consists of:

  1. An input port, such as a microphone port or a line-in port, which feeds its incoming audio data into:
  2. A mixer, which places the input data in:
  3. One or more target data lines, from which an application can retrieve the data.

    Commonly, only one input port can be open at a time, but an audio-input mixer that mixes audio from multiple ports is also possible. Another scenario consists of a mixer that has no ports but instead gets its audio input over a network.

    The TargetDataLine interface was introduced briefly under "The Line Interface Hierarchy" in Chapter 2, "Overview of the Sampled Package ." TargetDataLine is directly analogous to the SourceDataLine interface, which was discussed extensively in Chapter 4, "Playing Back Audio ." Recall that the SourceDataLine interface consists of:

  • A write method to send audio to the mixer
  • An available method to determine how much data can be written to the buffer without blocking

Similarly, TargetDataLine consists of:

  • A read method to get audio from the mixer
  • An available method to determine how much data can be read from the buffer without blocking

Setting Up a TargetDataLine

The process of obtaining a target data line was described in Chapter 3, "Accessing Audio System Resources," but we repeat it here for convenience:

TargetDataLine line;
DataLine.Info info = new DataLine.Info(TargetDataLine.class,

    format); // format is an AudioFormat object
if (!AudioSystem.isLineSupported(info)) {
    // Handle the error ...
}
// Obtain and open the line.
try {

    line = (TargetDataLine) AudioSystem.getLine(info);
    line.open(format);
} catch (LineUnavailableException ex) {
    // Handle the error ...
}
You could instead invoke Mixer's getLine method, rather than AudioSystem's.

As shown in this example, once you've obtained a target data line, you reserve it for your application's use by invoking the DataLine method open, exactly as was described in the case of a source data line in Chapter 4, "Playing Back Audio ." The single-parameter version of the open method causes the line's buffer to have the default size. You can instead set the buffer size according to your application's needs by invoking the two-parameter version:

    void open(AudioFormat format, int bufferSize)
When choosing a buffer size, keep in mind the tradeoff between the delays incurred by long buffers, on the one hand, and the risk of discontinuities in the audio if the buffers are so short that you can't retrieve the data fast enough, on the other hand. When capturing audio, you risk data overflow if you don't pull data from the filled buffers fast enough. If overflow occurs, some of the captured data will be discarded, which will probably cause audible clicks and skips in the sound. This is the opposite situation from playback, where you risk data underflow, which can result in gaps in the sound. (See Chapter 4, "Playing Back Audio ," for more on choosing buffer sizes.)

Reading the Data from the TargetDataLine

Once the line is open, it is ready to start capturing data, but it isn't active yet. To actually commence the audio capture, use the DataLine method start. This begins delivering input audio data to the line's buffer for your application to read. Your application should invoke start only when it's ready to begin reading from the line; otherwise a lot of processing is wasted on filling the capture buffer, only to have it overflow (that is, discard data).

To start retrieving data from the buffer, invoke TargetDataLine's read method:

int read(byte[] b, int offset, int length)
This method attempts to read length bytes of data into the array b, starting at the byte position offset in the array. The method returns the number of bytes actually read.

As with SourceDataLine's write method, you can request more data than actually fits in the buffer, because the method blocks until the requested amount of data has been delivered, even if you request many buffers' worth of data.

To avoid having your application hang during recording, you can invoke the read method within a loop, until you've retrieved all the audio input, as in this example:

// Assume that the TargetDataLine, line, has already
// been obtained and opened.
ByteArrayOutputStream out  = new ByteArrayOutputStream();
int numBytesRead;
byte[] data = new byte[line.getBufferSize() / 5];

// Begin audio capture.
line.start();

// Here, stopped is a global boolean set by another thread.
while (!stopped) {
   // Read the next chunk of data from the TargetDataLine.
   numBytesRead =  line.read(data, 0, data.length);
   // Save this chunk of data.
   out.write(data, 0, numBytesRead);
}
Notice that in this example, the size of the byte array into which the data is read is set to be one-fifth the size of the line's buffer. If you instead make it as big as the line's buffer and try to read the entire buffer, you need to be very exact in your timing, because data will be dumped if the mixer needs to deliver data to the line while you are reading from it. By using some fraction of the line's buffer size, as shown here, your application will be more successful in sharing access to the line's buffer with the mixer.

The read method of TargetDataLine takes three arguments: a byte array, an offset into the array, and the number of bytes of input data that you would like to read. In this example, the third argument is simply the length of your byte array. The read method returns the number of bytes that were actually read into your array.

Typically, you read data from the line in a loop, as in this example. Within the while loop, each chunk of retrieved data is processed in whatever way is appropriate for the application-here, it's written to a ByteArrayOutputStream. Not shown here is the use of a separate thread to set the boolean stopped, which terminates the loop. This boolean's value might be set to true when the user clicks a Stop button, and also when a listener receives a CLOSE or STOP event from the line. The listener is necessary for CLOSE events and recommended for STOP events. Otherwise, if the line gets stopped somehow without stopped being set to true, the while loop will capture zero bytes on each iteration, running fast and wasting CPU cycles. A more thorough code example would show the loop being re-entered if capture becomes active again.

As with a source data line, it's possible to drain or flush a target data line. For example, if you're recording the input to a file, you'll probably want to invoke the drain method when the user clicks a Stop button. The drain method will cause the mixer's remaining data to get delivered to the target data line's buffer. If you don't drain the data, the captured sound might seem to be truncated prematurely at the end.

There might be some cases where you instead want to flush the data. In any case, if you neither flush nor drain the data, it will be left in the mixer. This means that when capture recommences, there will be some leftover sound at the beginning of the new recording, which might be undesirable. It can be useful, then, to flush the target data line before restarting the capture.

Monitoring the Line's Status

Because the TargetDataLine interface extends DataLine, target data lines generate events in the same way source data lines do. You can register an object to receive events whenever the target data line opens, closes, starts, or stops. For more information, see "Monitoring the Line's Status" in Chapter 4, "Playing Back Audio ."

Processing the Incoming Audio

Like some source data lines, some mixers' target data lines have signal-processing controls, such as gain, pan, reverb, or sample-rate controls. The input ports might have similar controls, especially gain controls. For more information on how to determine whether a line has such controls, and how to use them if it does, see Chapter 6, "Processing Audio with Controls ."

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 6

Processing Audio with Controls

Previous chapters have discussed how to play or capture audio samples. The implicit goal has been to deliver samples as faithfully as possible, without modification (other than possibly mixing the samples with those from other audio lines). Sometimes, however, you want to be able to modify the signal. The user might want it to sound louder, quieter, fuller, more reverberant, higher or lower in pitch, and so on. This chapter discusses the JavaTM Sound API features that provide these kinds of signal processing.

There are two ways to apply signal processing:

  • You can use any processing supported by the mixer or its component lines, by querying for Control objects and then setting the controls as the user desires. Typical controls supported by mixers and lines include gain, pan, and reverberation controls.

  • If the kind of processing you need isn't provided by the mixer or its lines, your program can operate directly on the audio bytes, manipulating them as desired.

This chapter discusses the first technique in greater detail, because there is no special API for the second technique.

Introduction to Controls

A mixer can have various sorts of signal-processing controls on some or all of its lines. For example, a mixer used for audio capture might have an input port with a gain control, and target data lines with gain and pan controls. A mixer used for audio playback might have sample-rate controls on its source data lines. In each case, the controls are all accessed through methods of the Line interface.

Because the Mixer interface extends Line, the mixer itself can have its own set of controls. These might serve as master controls affecting all the mixer's source or target lines. For example, the mixer might have a master gain control whose value in decibels is added to the values of individual gain controls on its target lines.

Others of the mixer's own controls might affect a special line, neither a source nor a target, that the mixer uses internally for its processing. For example, a global reverb control might choose the sort of reverberation to apply to a mixture of the input signals, and this "wet" (reverberated) signal would get mixed back into the "dry" signal before delivery to the mixer's target lines.

If the mixer or any of its lines have controls, you might wish to expose the controls via graphical objects in your program's user interface, so that the user can adjust the audio characteristics as desired. The controls are not themselves graphical; they just allow you to retrieve and change their settings. It's up to you to decide what sort of graphical representations (sliders, buttons, etc.), if any, to use in your program.

All controls are implemented as concrete subclasses of the abstract class Control. Many typical audio-processing controls can be described by abstract subclasses of Control based on a data type (such as boolean, enumerated, or float). Boolean controls, for example, represent binary-state controls, such as on/off controls for mute or reverb. Float controls, on the other hand, are well suited to represent continuously variable controls, such as pan, balance, or volume.

The Java Sound API specifies the following abstract subclasses of Control:

  • BooleanControl-represents a binary-state (true or false) control. For example, mute, solo, and on/off switches would be good candidates for BooleanControls.

  • FloatControl-data model providing control over a range of floating-point values. For example, volume and pan are FloatControls that could be manipulated via a dial or slider.

  • EnumControl-offers a choice from a set of objects. For example, you might associate a set of buttons in the user interface with an EnumControl to select one of several preset reverberation settings.

  • CompoundControl-provides access to a collection of related items, each of which is itself an instance of a Control subclass. CompoundControls represent multi-control modules such as graphic equalizers. (A graphic equalizer would typically be depicted by a set of sliders, each affecting a FloatControl.)

Each subclass of Control above has methods appropriate for its underlying data type. Most of the classes include methods that set and get the control's current value(s), get the control's label(s), and so on.

Of course, each class has methods that are particular to it and the data model represented by the class. For example, EnumControl has a method that lets you get the set of its possible values, and FloatControl permits you to get its minimum and maximum values, as well as the precision (increment or step size) of the control.

Each subclass of Control has a corresponding Control.Type subclass, which includes static instances that identify specific controls.

The following table shows each Control subclass, its corresponding Control.Type subclass, and the static instances that indicate specific kinds of controls:

Control | Control.Type | Control.Type instances
BooleanControl | BooleanControl.Type | APPLY_REVERB reverberation on/off
CompoundControl | CompoundControl.Type | (none)
EnumControl | EnumControl.Type | REVERB access to reverb settings (each is an instance of ReverbType)
FloatControl | FloatControl.Type | AUX_RETURN auxiliary return gain on a line AUX_SEND auxiliary send gain on a line BALANCE left-right volume balance MASTER_GAIN overall gain on a line PAN left-right position REVERB_RETURN post-reverb gain on a line REVERB_SEND pre-reverb gain on a line SAMPLE_RATE playback sample rate VOLUME volume on a line

An implementation of the Java Sound API can provide any or all of these control types on its mixers and lines. It can also supply additional control types not defined in the Java Sound API. Such control types could be implemented via concrete subclasses of any of these four abstract subclasses, or via additional Control subclasses that don't inherit from any of these four abstract subclasses. An application program can query each line to find what controls it supports.

Getting a Line that Has the Desired Controls

In many cases, an application program will simply display whatever controls happen to be supported by the line in question. If the line doesn't have any controls, so be it. But what if it's important to find a line that has certain controls? In that case, you can use a Line.Info to obtain a line that has the right characteristics, as described under "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources."

For example, suppose you prefer an input port that lets the user set the volume of the sound input. The following code excerpt shows how one might query the default mixer to determine whether it has the desired port and control:

Port lineIn;
FloatControl volCtrl;
try {
  mixer = AudioSystem.getMixer(null);
  lineIn = (Port)mixer.getLine(Port.Info.LINE_IN);
  lineIn.open();
  volCtrl = (FloatControl) lineIn.getControl(

      FloatControl.Type.VOLUME);
  // Assuming getControl call succeeds,
  // we now have our LINE_IN VOLUME control.
} catch (Exception e) {
  System.out.println("Failed trying to find LINE_IN"
    + " VOLUME control: exception = " + e);
}
if (volCtrl != null)
  // ...

Getting the Controls from the Line

An application program that needs to expose controls in its user interface might simply query the available lines and controls, and then display an appropriate user-interface element for every control on every line of interest. In such a case, the program's only mission is to provide the user with "handles" on the control; not to know what those controls do to the audio signal. As long as the program knows how to map a line's controls into user-interface elements, the Java Sound API architecture of Mixer, Line, and Control will generally take care of the rest.

For example, suppose your program plays back sound. You're using a SourceDataLine, which you've obtained as described under "Getting a Line of a Desired Type" in Chapter 3, "Accessing Audio System Resources ." You can access the line's controls by invoking the Line method:

Control[] getControls()
Then, for each of the controls in this returned array, you then use the following Control method to get the control's type:
Control.Type getType()
Knowing the specific Control.Type instance, your program can display a corresponding user-interface element. Of course, choosing "a corresponding user-interface element" for a specific Control.Type depends on the approach taken by your program. On the one hand, you might use the same kind of element to represent all Control.Type instances of the same class. This would require you to query the class of the Control.Type instance using, for example, the Object.getClass method. Let's say the result matched BooleanControl.Type. In this case, your program might display a generic checkbox or toggle button, but if its class matched FloatControl.Type, then you might display a graphic slider.

On the other hand, your program might distinguish between different types of controls-even those of the same class-and use a different user-interface element for each one. This would require you to test the instance returned by Control's getType method. Then if, for example, the type matched BooleanControl.Type.APPLY_REVERB, your program might display a checkbox, while if the type matched BooleanControl.Type.MUTE, you might display a toggle button, instead.

Using a Control to Change the Audio Signal

Now that you know how to access a control and determine its type, this section will describe how to use Controls to change aspects of the audio signal. This section doesn't cover every available control; rather, it provides a few examples in this area to show you how to get started. These example include:

  • Controlling a line's mute state
  • Changing a line's volume
  • Selecting among various reverberation presets

Suppose that your program has accessed all of its mixers, their lines and the controls on those lines, and that it has a data structure to manage the logical associations between the controls and their corresponding user-interface elements. Then, translating the user's manipulations of those controls into the corresponding Control methods becomes a fairly straightforward matter.

The following subsections describe some of the methods that must be invoked to affect the changes to specific controls.

Controlling a Line's Mute State

Controlling the mute state of any line is simply a matter of calling the following BooleanControl method:

void setValue(boolean value)
(Presumably, the program knows, by referring to its control-management data structures, that the mute is an instance of a BooleanControl.) To mute the signal that's passing through the line, the program invokes the method above, specifying true as the value. To turn muting off, permitting the signal to flow through the line, the program invokes the method with the parameter set to false.

Changing a Line's Volume

Let's assume your program associates a particular graphic slider with a particular line's volume control. The value of a volume control (i.e., FloatControl.Type.VOLUME) is set using the following FloatControl method:

void setValue(float newValue)
Detecting that the user moved the slider, the program gets the slider's current value and passes it, as the parameter newValue, to the method above. This changes the volume of the signal flowing though the line that "owns" the control.

Selecting among Various Reverberation Presets

Let's suppose that our program has a mixer with a line that has a control of type EnumControl.Type.REVERB. Calling the EnumControl method:

java.lang.Objects[] getValues()
on that control produces an array of ReverbType objects. If desired, the particular parameter settings of each of these objects can be accessed using the following ReverbType methods:
int getDecayTime()
int getEarlyReflectionDelay()
float getEarlyReflectionIntensity()
int getLateReflectionDelay()
float getLateReflectionIntensity()
For example, if a program only wants a single reverb setting that sounds like a cavern, it can iterate over the ReverbType objects until it finds one for which getDecayTime returns a value greater than 2000. For a thorough explanation of these methods, including a table of representative return values, see the API reference documentation for javax.sound.sampled.ReverbType.

Typically, though, a program will create a user-interface element, for example, a radio button, for each of the ReverbType objects within the array returned by the getValues method. When the user clicks on one of these radio buttons, the program invokes the EnumControl method

void setValue(java.lang.Object value)
where value is set to the ReverbType that corresponds to the newly engaged button. The audio signal sent through the line that "owns" this EnumControl will then be reverberated according to the parameter settings that constitute the control's current ReverbType (i.e., the particular ReverbType specified in the value argument of the setValue method).

So, from our application program's perspective, enabling a user to move from one reverberation preset (i.e., ReverbType) to another is simply a matter of connecting each element of the array returned by getValues to a distinct radio button.

Manipulating the Audio Data Directly

The Control API allows an implementation of the Java Sound API, or a third-party provider of a mixer, to supply arbitrary sorts of signal processing through controls. But what if no mixer offers the kind of signal processing you need? It will take more work, but you might be able to implement the signal processing in your program. Because the Java Sound API gives you access the audio data as an array of bytes, you can alter these bytes in any way you choose.

If you're processing incoming sound, you can read the bytes from a TargetDataLine and then manipulate them. An algorithmically trivial example that can yield sonically intriguing results is to play a sound backwards by arranging its frames in reverse order. This trivial example may not be of much use for your program, but there are numerous sophisticated digital signal processing (DSP) techniques that might be more appropriate. Some examples are equalization, dynamic-range compression, peak limiting, and time stretching or compression, as well as special effects such as delay, chorus, flanging, distortion, and so on.

To play back processed sound, you can place your manipulated array of bytes into a SourceDataLine or Clip. Of course, the array of bytes need not be derived from an existing sound. You can synthesize sounds from scratch, although this requires some knowledge of acoustics or else access to sound-synthesis functions. For either processing or synthesis, you may want to consult an audio DSP textbook for the algorithms in which you're interested, or else import a third-party library of signal-processing functions into your program. For playback of synthesized sound, consider whether the Synthesizer API in the javax.sound.midi package meets your needs instead. (See Chapter 12, "Synthesizing Sound .")

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 7

Using Files and Format Converters

Most application programs that deal with sound need to read sound files or audio streams. This is common functionality, regardless of what the program may subsequently do with the data it reads (such as play, mix, or process it). Similarly, many programs need to write sound files (or streams). In some cases, the data that has been read (or that will be written) needs to be converted to a different format.

As was briefly mentioned in Chapter 3, "Accessing Audio System Resources," the JavaTM Sound API provides application developers with various facilities for file input/output and format translations. Application programs can read, write, and translate between a variety of sound file formats and audio data formats.

Chapter 2, "Overview of the Sampled Package ," introduced the main classes related to sound files and audio data formats. As a review:

  • A stream of audio data, as might be read from or written to a file, is represented by an AudioInputStream object. (AudioInputStream inherits from java.io.InputStream.)
  • The format of this audio data is represented by an AudioFormat object.

    This format specifies how the audio samples themselves are arranged, but not the structure of a file that they might be stored in. In other words, an AudioFormat describes "raw" audio data, such as the system might hand your program after capturing it from a microphone input or after parsing it from a sound file. An AudioFormat includes such information as the encoding, the byte order, the number of channels, the sampling rate, and the number of bits per sample.

  • There are several well-known, standard formats for sound files, such as WAV, AIFF, or AU. The different types of sound file have different structures for storing audio data as well as for storing descriptive information about the audio data. A sound file format is represented in the Java Sound API by an AudioFileFormat object. The AudioFileFormat includes an AudioFormat object to describe the format of the audio data stored in the file, and also includes information about the file type and the length of the data in the file.

  • The AudioSystem class provides methods for (1) storing a stream of audio data from an AudioInputStream into an audio file of a particular type (in other words, writing a file), (2) extracting a stream of audio bytes (an AudioInputStream) from an audio file (in other words, reading a file), and (3) converting audio data from one data format to another. The present chapter, which is divided into three sections, explains these three kinds of activity.

Note that an implementation of the Java Sound API does not necessarily provide comprehensive facilities for reading, writing, and converting audio in different data and file formats. It might support only the most common data and file formats. However, service providers can develop and distribute conversion services that extend this set, as outlined in Chapter 14, "Providing Sampled-Audio Services ." The AudioSystem class supplies methods that allow application programs to learn what conversions are available, as described later in this chapter under "Converting File and Data Formats."

Reading Sound Files

The AudioSystem class provides two types of file-reading services:

  • Information about the format of the audio data stored in the sound file
  • A stream of formatted audio data that can be read from the sound file

The first of these is given by three variants of the getAudioFileFormat method:

static AudioFileFormat getAudioFileFormat
    (java.io.File   file)
static AudioFileFormat
    getAudioFileFormat(java.io.InputStream stream)
static AudioFileFormat getAudioFileFormat
    (java.net.URL url)
As mentioned above, the returned AudioFileFormat object tells you the file type, the length of the data in the file, encoding, the byte order, the number of channels, the sampling rate, and the number of bits per sample.

The second type of file-reading functionality is given by these AudioSystem methods:

static AudioInputStream getAudioInputStream
    (java.io.File  file)
static AudioInputStream getAudioInputStream
    (java.net.URL url)
static AudioInputStream getAudioInputStream
    (java.io.InputStream stream)
These methods give you an object (an AudioInputStream) that lets you read the file's audio data, using one of the read methods of AudioInputStream. We'll see an example momentarily.

Suppose you're writing a sound-editing application that allows the user to load sound data from a file, display a corresponding waveform or spectrogram, edit the sound, play back the edited data, and save the result in a new file. Or perhaps your program will read the data stored in a file, apply some kind of signal processing (such as an algorithm that slows the sound down without changing its pitch), and then play the processed audio. In either case, you need to get access to the data contained in the audio file. Assuming that your program provides some means for the user to select or specify an input sound file, reading that file's audio data involves three steps:

  1. Get an AudioInputStream object from the file.
  2. Create a byte array in which you'll store successive chunks of data from the file.
  3. Repeatedly read bytes from the audio input stream into the array. On each iteration, do something useful with the bytes in the array (for example, you might play them, filter them, analyze them, display them, or write them to another file).

The following code example outlines these steps.

int totalFramesRead = 0;
File fileIn = new File(somePathName);
// somePathName is a pre-existing string whose value was
// based on a user selection.
try {
  AudioInputStream audioInputStream =
    AudioSystem.getAudioInputStream(fileIn);
  int bytesPerFrame =
    audioInputStream.getFormat().getFrameSize();
  // Set an arbitrary buffer size of 1024 frames.
  int numBytes = 1024 * bytesPerFrame;
  byte[] audioBytes = new byte[numBytes];
  try {
    int numBytesRead = 0;
    int numFramesRead = 0;
    // Try to read numBytes bytes from the file.
    while ((numBytesRead =
      audioInputStream.read(audioBytes)) != -1) {
      // Calculate the number of frames actually read.
      numFramesRead = numBytesRead / bytesPerFrame;
      totalFramesRead += numFramesRead;
      // Here, do something useful with the audio data that's
      // now in the audioBytes array...
    }
  } catch (Exception ex) {
    // Handle the error...
  }
} catch (Exception e) {
  // Handle the error...
}
Let's take a look at what's happening in the above code sample. First, the outer try clause instantiates an AudioInputStream object through the call to the AudioSystem.getAudioInputStream(File) method. This method transparently performs all of the testing required to determine whether the specified file is actually a sound file of a type that is supported by the Java Sound API. If the file being inspected (fileIn in this example) is not a sound file, or is a sound file of some unsupported type, an UnsupportedAudioFileException exception is thrown. This behavior is convenient, in that the application programmer need not be bothered with testing file attributes, nor with adhering to any file-naming conventions. Instead, the getAudioInputStream method takes care of all the low-level parsing and verification that is required to validate the input file.

The outer try clause then creates a byte array, audioBytes, of an arbitrary fixed length. We make sure that its length in bytes equals an integral number of frames, so that we won't end up reading only part of a frame or, even worse, only part of a sample. This byte array will serve as a buffer to temporarily hold a chunk of audio data as it's read from the stream. If we knew we would be reading nothing but very short sound files, we could make this array the same length as the data in the file, by deriving the length in bytes from the length in frames, as returned by AudioInputStream's getFrameLength method. (Actually, we'd probably just use a Clip object instead.) But to avoid running out of memory in the general case, we instead read the file in chunks, one buffer at a time.

The inner try clause contains a while loop, which is where we read the audio data from the AudioInputStream into the byte array. You should add code in this loop to handle the audio data in this array in whatever way is appropriate for your program's needs. If you're applying some kind of signal processing to the data, you'll probably need to query the AudioInputStream's AudioFormat further, to learn the number of bits per sample and so on.

Note that the method AudioInputStream.read(byte[]) returns the number of bytes read-not the number of samples or frames. This method returns -1 when there's no more data to read. Upon detecting this condition, we break from the while loop.

Writing Sound Files

The previous section described the basics of reading a sound file, using specific methods of the AudioSystem and AudioInputStream classes. This section describes how to write audio data out to a new file.

The following AudioSystem method creates a disk file of a specified file type. The file will contain the audio data that's in the specified AudioInputStream:

static int write(AudioInputStream in,
  AudioFileFormat.Type fileType, File out)
Note that the second argument must be one of the file types supported by the system (for example, AU, AIFF, or WAV), otherwise the write method will throw an IllegalArgumentException. To avoid this, you can test whether or not a particular AudioInputStream may be written to a particular type of file, by invoking this AudioSystem method:
static boolean isFileTypeSupported
  (AudioFileFormat.Type fileType, AudioInputStream stream)
which will return true only if the particular combination is supported.

More generally, you can learn what types of file the system can write by invoking one of these AudioSystem methods:

static AudioFileFormat.Type[] getAudioFileTypes()
static AudioFileFormat.Type[]
  getAudioFileTypes(AudioInputStream stream)
The first of these returns all the types of file that the system can write, and the second returns only those that the system can write from the given audio input stream.

The following excerpt demonstrates one technique for creating an output file from an AudioInputStream using the write method mentioned above.

File fileOut = new File(someNewPathName);
AudioFileFormat.Type fileType = fileFormat.getType();
if (AudioSystem.isFileTypeSupported(fileType,
    audioInputStream)) {
  AudioSystem.write(audioInputStream, fileType, fileOut);
}
The first statement above, creates a new File object, fileOut, with a user- or program-specified pathname. The second statement gets a file type from a pre-existing AudioFileFormat object called fileFormat, which might have been obtained from another sound file, such as the one that was read in the "Reading Sound Files" section of this chapter. (You could instead supply whatever supported file type you want, instead of getting the file type from elsewhere. For example, you might delete the second statement and replace the other two occurrences of fileType in the code above with AudioFileFormat.Type.WAVE.)

The third statement tests whether a file of the designated type can be written from a desired AudioInputStream. Like the file format, this stream might have been derived from the sound file previously read. (If so, presumably you've processed or altered its data in some way, because otherwise there are easier ways to simply copy a file.) Or perhaps the stream contains bytes that have been freshly captured from the microphone input.

Finally, the stream, file type, and output file are passed to the AudioSystem.write method, to accomplish the goal of writing the file.

Converting File and Data Formats

Recall from the section "What Is Formatted Audio Data?" in Chapter 2, "Overview of the Sampled Package ," that the Java Sound API distinguishes between audio file formats and audio data formats. The two are more or less independent. Roughly speaking, the data format refers to the way in which the computer represents each raw data point (sample), while the file format refers to the organization of a sound file as stored on a disk. Each sound file format has a particular structure that defines, for example, the information stored in the file's header. In some cases, the file format also includes structures that contain some form of meta-data, in addition to the actual "raw" audio samples. The remainder of this chapter examines methods of the Java Sound API that enable a variety of file-format and data-format conversions.

Converting from One File Format to Another

This section covers the fundamentals of converting audio file types in the Java Sound API. Once again we pose a hypothetical program whose purpose, this time, is to read audio data from an arbitrary input file and write it into a file whose type is AIFF. Of course, the input file must be of a type that the system is capable of reading, and the output file must be of a type that the system is capable of writing. (In this example, we assume that the system is capable of writing AIFF files.) The example program doesn't do any data format conversion. If the input file's data format can't be represented as an AIFF file, the program simply notifies the user of that problem. On the other hand, if the input sound file is an already an AIFF file, the program notifies the user that there is no need to convert it.

The following function implements the logic just described:

public void ConvertFileToAIFF(String inputPath,
  String outputPath) {
  AudioFileFormat inFileFormat;
  File inFile;
  File outFile;
  try {
    inFile = new File(inputPath);
    outFile = new File(outputPath);
  } catch (NullPointerException ex) {
    System.out.println("Error: one of the
      ConvertFileToAIFF" +" parameters is null!");
    return;
  }
  try {
    // query file type
    inFileFormat = AudioSystem.getAudioFileFormat(inFile);
    if (inFileFormat.getType() != AudioFileFormat.Type.AIFF)
    {
      // inFile is not AIFF, so let's try to convert it.
      AudioInputStream inFileAIS =
        AudioSystem.getAudioInputStream(inFile);
      inFileAIS.reset(); // rewind
      if (AudioSystem.isFileTypeSupported(
             AudioFileFormat.Type.AIFF, inFileAIS)) {
         // inFileAIS can be converted to AIFF.
         // so write the AudioInputStream to the
         // output file.
         AudioSystem.write(inFileAIS,
           AudioFileFormat.Type.AIFF, outFile);
         System.out.println("Successfully made AIFF file, "
           + outFile.getPath() + ", from "
           + inFileFormat.getType() + " file, " +
           inFile.getPath() + ".");
         inFileAIS.close();
         return; // All done now
       } else
         System.out.println("Warning: AIFF conversion of "
           + inFile.getPath()
           + " is not currently supported by AudioSystem.");
    } else
      System.out.println("Input file " + inFile.getPath() +
          " is AIFF." + " Conversion is unnecessary.");
  } catch (UnsupportedAudioFileException e) {
    System.out.println("Error: " + inFile.getPath()
        + " is not a supported audio file type!");
    return;
  } catch (IOException e) {
    System.out.println("Error: failure attempting to read "
      + inFile.getPath() + "!");
    return;
  }
}

As mentioned, the purpose of this example function, ConvertFileToAIFF, is to query an input file to determine whether it's an AIFF sound file, and if it isn't, to try to convert it to one, producing a new copy whose pathname is specified by the second argument. (As an exercise, you might try making this function more general, so that instead of always converting to AIFF, the function converts to the file type specified by a new function argument.) Note that the audio data format of the copy-that is, the new file-mimics the audio data format of original input file.

Most of this function is self-explanatory and is not specific to the Java Sound API. There are, however, a few Java Sound API methods used by the routine that are crucial for sound file-type conversions. These method invocations are all found in the second try clause, above, and include the following:

  • AudioSystem.getAudioFileFormat: used here to determine whether the input file is already an AIFF type. If so, the function quickly returns; otherwise the conversion attempt proceeds.

  • AudioSystem.isFileTypeSupported: Indicates whether the system can write a file of the specified type that contains audio data from the specified AudioInputStream. In our example, this method returns true if the specified audio input file can be converted to AIFF audio file format. If AudioFileFormat.Type.AIFF isn't supported, ConvertFileToAIFF issues a warning that the input file can't be converted, then returns.

  • AudioSystem.write: used here to write the audio data from the AudioInputStream inFileAIS to the output file outFile.

The second of these methods, isFileTypeSupported, helps to determine, in advance of the write, whether a particular input sound file can be converted to a particular output sound file type. In the next section we will see how, with a few modifications to this ConvertFileToAIFF sample routine, we can convert the audio data format, as well as the sound file type.

Converting Audio between Different Data Formats

The previous section showed how to use the Java Sound API to convert a file from one file format (that is, one type of sound file) to another. This section explores some of the methods that enable audio data format conversions.

In the previous section, we read data from a file of an arbitrary type, and saved it in an AIFF file. Note that although we changed the type of file used to store the data, we didn't change the format of the audio data itself. (Most common audio file types, including AIFF, can contain audio data of various formats.) So if the original file contained CD-quality audio data (16-bit sample size, 44.1-kHz sample rate, and two channels), so would our output AIFF file.

Now suppose that we want to specify the data format of the output file, as well as the file type. For example, perhaps we are saving many long files for use on the Internet, and are concerned about the amount of disk space and download time required by our files. We might choose to create smaller AIFF files that contain lower-resolution data-for example, data that has an 8-bit sample size, an 8-kHz sample rate, and a single channel.

Without going into as much coding detail as before, let's explore some of the methods used for data format conversion, and consider the modifications that we would need to make to the ConvertFileToAIFF function to accomplish the new goal.

The principal method for audio data conversion is, once again, found in the AudioSystem class. This method is a variant of getAudioInputStream:

AudioInputStream getAudioInputStream(AudioFormat
    format, AudioInputStream stream)
This function returns an AudioInputStream that is the result of converting the AudioInputStream, stream, using the indicated AudioFormat, format. If the conversion isn't supported by AudioSystem, this function throws an IllegalArgumentException.

To avoid that, we can first check whether the system can perform the required conversion by invoking this AudioSystem method:

boolean isConversionSupported(AudioFormat targetFormat,
    AudioFormat sourceFormat)
In this case, we'd pass stream.getFormat() as the second argument.

To create a specific AudioFormat object, we use one of the two AudioFormat constructors shown below, either

 AudioFormat(float sampleRate, int sampleSizeInBits,
    int channels, boolean signed, boolean bigEndian)
which constructs an AudioFormat with a linear PCM encoding and the given parameters, or
AudioFormat(AudioFormat.Encoding encoding,
    float sampleRate, int sampleSizeInBits, int channels,
    int frameSize, float frameRate, boolean bigEndian)
which also constructs an AudioFormat, but lets you specify the encoding, frame size, and frame rate, in addition to the other parameters.

Now, armed with the methods above, let's see how we might extend our ConvertFileToAIFF function to perform the desired "low-res" audio data format conversion. First, we would construct an AudioFormat object describing the desired output audio data format. The following statement would suffice and could be inserted near the top of the function:

AudioFormat outDataFormat = new AudioFormat((float) 8000.0,
(int) 8, (int) 1, true, false);
Since the AudioFormat constructor above is describing a format with 8-bit samples, the last parameter to the constructor, which specifies whether the samples are big or little endian, is irrelevant. (Big versus little endian is only an issue if the sample size is greater than a single byte.)

The following example shows how we would use this new AudioFormat to convert the AudioInputStream, inFileAIS, that we created from the input file:

AudioInputStream lowResAIS;
  if (AudioSystem.isConversionSupported(outDataFormat,
    inFileAIS.getFormat())) {
    lowResAIS = AudioSystem.getAudioInputStream
      (outDataFormat, inFileAIS);
  }
It wouldn't matter too much where we inserted this code, as long as it was after the construction of inFileAIS. Without the isConversionSupported test, the call would fail and throw an IllegalArgumentException if the particular conversion being requested was unsupported. (In this case, control would transfer to the appropriate catch clause in our function.)

So by this point in the process, we would have produced a new AudioInputStream, resulting from the conversion of the original input file (in its AudioInputStream form) to the desired low-resolution audio data format as defined by outDataFormat.

The final step to produce the desired low-resolution, AIFF sound file would be to replace the AudioInputStream parameter in the call to AudioSystem.write (that is, the first parameter) with our converted stream, lowResAIS, as follows:

AudioSystem.write(lowResAIS, AudioFileFormat.Type.AIFF,
  outFile);
These few modifications to our earlier function produce something that converts both the audio data and the file format of any specified input file, assuming of course that the system supports the conversion.

Learning What Conversions Are Available

Several AudioSystem methods test their parameters to determine whether the system supports a particular data format conversion or file-writing operation. (Typically, each method is paired with another that performs the data conversion or writes the file.) One of these query methods, AudioSystem.isFileTypeSupported, was used in our example function, ConvertFileToAIFF, to determine whether the system was capable of writing the audio data to an AIFF file. A related AudioSystem method, getAudioFileTypes(AudioInputStream), returns the complete list of supported file types for the given stream, as an array of AudioFileFormat.Type instances. The method:

boolean isConversionSupported
  AudioFormat.Encoding encoding, AudioFormat format)
is used to determine whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified audio format. Similarly, the method:
boolean isConversionSupported(AudioFormat newFormat,
  AudioFormat oldFormat)

tells us whether an AudioInputStream with the specified audio format, newFormat, can be obtained through the conversion of an AudioInputStream that has the audio format oldFormat. (This method was invoked in the previous section's code excerpt that created a low-resolution audio input stream, lowResAIS.)

These format-related queries help prevent errors when attempting to perform format conversions with the Java Sound API.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 8

Overview of the MIDI Package

Chapter 1,"Introduction to Java Sound," gave a glimpse into the MIDI capabilities of the JavaTM Sound API. The present chapter assumes you've read Chapter 1. The discussion here provides a more detailed introduction to the Java Sound API's MIDI architecture, which is accessed through the javax.sound.midi package. Some basic features of MIDI itself are explained, as a refresher or introduction, to place the Java Sound API's MIDI features in context. The chapter then goes on to discuss the Java Sound API's approach to MIDI, as a preparation for the programming tasks that are explained in subsequent chapters. This chapter's discussion of the MIDI API is divided into two main areas: data and devices.

A MIDI Refresher: Wires and Files

The Musical Instrument Digital Interface (MIDI) standard defines a communication protocol for electronic music devices, such as electronic keyboard instruments and personal computers. MIDI data can be transmitted over special cables during a live performance, and can also be stored in a standard type of file for later playback or editing.

This section reviews some MIDI basics, without reference to the Java Sound API. The discussion is intended as a refresher for readers acquainted with MIDI, and as a brief introduction for those who are not, to provide background for the subsequent discussion of the Java Sound API's MIDI package. If you have a thorough understanding of MIDI, you can safely skip this section. Before writing substantial MIDI applications, programmers who are unfamiliar with MIDI will probably need a fuller description of MIDI than can be included in this programmer's guide. See the Complete MIDI 1.0 Detailed Specification, which is available only in hard copy from http://www.midi.org (although you might find paraphrased or summarized versions on the Web).

MIDI is both a hardware specification and a software specification. To understand MIDI's design, it helps to understand its history. MIDI was originally designed for passing musical events, such as key depressions, between electronic keyboard instruments such as synthesizers. (As mentioned in Chapter 1, MIDI data consists primarily of control events that communicate a musician's gestures. MIDI data doesn't contain the audio that results from these events.) Hardware devices known as sequencers stored sequences of notes that could control a synthesizer, allowing musical performances to be recorded and subsequently played back. Later, hardware interfaces were developed that connected MIDI instruments to a computer's serial port, allowing sequencers to be implemented in software. More recently, computer sound cards have incorporated hardware for MIDI I/O and for synthesizing musical sound. Today, many users of MIDI deal only with sound cards, never connecting to external MIDI devices. CPUs have become fast enough that synthesizers, too, can be implemented in software. A sound card is needed only for audio I/O and, in some applications, for communicating with external MIDI devices.

The brief hardware portion of the MIDI specification prescribes the pinouts for MIDI cables and the jacks into which these cables are plugged. This portion need not concern us. Because devices that originally required hardware, such as sequencers and synthesizers, are now implementable in software, perhaps the only reason for most programmers to know anything about MIDI hardware devices is simply to understand the metaphors in MIDI. However, external MIDI hardware devices are still essential for some important music applications, and so the Java Sound API supports input and output of MIDI data.

The software portion of the MIDI specification is extensive. This portion concerns the structure of MIDI data and how devices such as synthesizers should respond to that data. It is important to understand that MIDI data can be streamed or sequenced. This duality reflects two different parts of the Complete MIDI 1.0 Detailed Specification:

  • MIDI 1.0
  • Standard MIDI Files

We'll explain what's meant by streaming and sequencing by examining the purpose of each of these two parts of the MIDI specification.

Streaming Data in the MIDI Wire Protocol

The first of these two parts of the MIDI specification describes what is known informally as "MIDI wire protocol." MIDI wire protocol, which is the original MIDI protocol, is based on the assumption that the MIDI data is being sent over a MIDI cable (the "wire"). The cable transmits digital data from one MIDI device to another. Each of the MIDI devices might be a musical instrument or a similar device, or it might be a general-purpose computer equipped with a MIDI-capable sound card or a MIDI-to-serial-port interface.

MIDI data, as defined by MIDI wire protocol, is organized into messages. The different kinds of message are distinguished by the first byte in the message, known as the status byte. (Status bytes are the only bytes that have the highest-order bit set to 1.) The bytes that follow the status byte in a message are known as data bytes. Certain MIDI messages, known as channel messages, have a status byte that contains four bits to specify the kind of channel message and another four bits to specify the channel number. There are therefore 16 MIDI channels; devices that receive MIDI messages can be set to respond to channel messages on all or only one of these virtual channels. Often each MIDI channel (which shouldn't be confused with a channel of audio) is used to send the notes for a different instrument. As an example, two common channel messages are Note On and Note Off, which start a note sounding and then stop it, respectively. These two messages each take two data bytes: the first specifies the note's pitch and the second its "velocity" (how fast the key is depressed or released, assuming a keyboard instrument is playing the note).

MIDI wire protocol defines a streaming model for MIDI data. A central feature of this protocol is that the bytes of MIDI data are delivered in real time-in other words, they are streamed. The data itself contains no timing information; each event is processed as it's received, and it's assumed that it arrives at the correct time. That model is fine if the notes are being generated by a live musician, but it's insufficient if you want to store the notes for later playback, or if you want to compose them out of real time. This limitation is understandable when you realize that MIDI was originally designed for musical performance, as a way for a keyboard musician to control more than one synthesizer, back in the days before many musicians used computers. (The first version of the specification was released in 1984.)

Sequenced Data in Standard MIDI Files

The Standard MIDI Files part of the MIDI specification addresses the timing limitation in MIDI wire protocol. A standard MIDI file is a digital file that contains MIDI events. An event is simply a MIDI message, as defined in the MIDI wire protocol, but with an additional piece of information that specifies the event's timing. (There are also some events that don't correspond to MIDI wire protocol messages, as we'll see in the next section.) The additional timing information is a series of bytes that indicates when to perform the operation described by the message. In other words, a standard MIDI file specifies not just which notes to play, but exactly when to play each of them. It's a bit like a musical score.

The information in a standard MIDI file is referred to as a sequence. A standard MIDI file contains one or more tracks. Each track typically contains the notes that a single instrument would play if the music were performed by live musicians. A sequencer is a software or hardware device that can read a sequence and deliver the MIDI messages contained in it at the right time. A sequencer is a bit like an orchestra conductor: it has the information for all the notes, including their timings, and it tells some other entity when to perform the notes.

The Java Sound API's Representation of MIDI Data

Now that we've sketched the MIDI specification's approach to streamed and sequenced musical data, let's examine how the Java Sound API represents that data.

MIDI Messages

MidiMessage is an abstract class that represents a "raw" MIDI message. A "raw" MIDI message is usually a message defined by the MIDI wire protocol. It can also be one of the events defined by the Standard MIDI Files specification, but without the event's timing information. There are three categories of raw MIDI message, represented in the Java Sound API by these three respective MidiMessage subclasses:

  • ShortMessages are the most common messages and have at most two data bytes following the status byte. The channel messages, such as Note On and Note Off, are all short messages, as are some other messages.
  • SysexMessages contain system-exclusive MIDI messages. They may have many bytes, and generally contain manufacturer-specific instructions.
  • MetaMessages occur in MIDI files, but not in MIDI wire protocol. Meta messages contain data, such as lyrics or tempo settings, that might be useful to sequencers but that are usually meaningless for synthesizers.

MIDI Events

As we've seen, standard MIDI files contain events that are wrappers for "raw" MIDI messages along with timing information. An instance of the Java Sound API's MidiEvent class represents an event such as might be stored in a standard MIDI file.

The API for MidiEvent includes methods to set and get the event's timing value. There's also a method to retrieve its embedded raw MIDI message, which is an instance of a subclass of MidiMessage, discussed next. (The embedded raw MIDI message can be set only when constructing the MidiEvent.)

Sequences and Tracks

As mentioned earlier, a standard MIDI file stores events that are arranged into tracks. Usually the file represents one musical composition, and usually each track represents a part such as might have been played by a single instrumentalist. Each note that the instrumentalist plays is represented by at least two events: a Note On that starts the note, and a Note Off that ends it. The track may also contain events that don't correspond to notes, such as meta-events (which were mentioned above).

The Java Sound API organizes MIDI data in a three-part hierarchy:

  • Sequence
  • Track
  • MidiEvent

A Track is a collection of MidiEvents, and a Sequence is a collection of Tracks. This hierarchy reflects the files, tracks, and events of the Standard MIDI Files specification. (Note: this is a hierarchy in terms of containment and ownership; it's not a class hierarchy in terms of inheritance. Each of these three classes inherits directly from java.lang.Object.)

Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the tracks in the sequence.

The Java Sound API's Representation of MIDI Devices

The previous section explained how MIDI messages are represented in the Java Sound API. However, MIDI messages don't exist in a vacuum. They're typically sent from one device to another. A program that uses the Java Sound API can generate MIDI messages from scratch, but more often the messages are instead created by a software device, such as a sequencer, or received from outside the computer through a MIDI input port. Such a device usually sends these messages to another device, such as a synthesizer or a MIDI output port.

The MidiDevice Interface

In the world of external MIDI hardware devices, many devices can transmit MIDI messages to other devices and also receive messages from other devices. Similarly, in the Java Sound API, software objects that implement the MidiDevice interface can transmit and receive messages. Such an object can be implemented purely in software, or it can serve as an interface to hardware such as a sound card's MIDI capabilities. The base MidiDevice interface provides all the functionality generally required by a MIDI input or output port. Synthesizers and sequencers, however, further implement one of the subinterfaces of MidiDevice: Synthesizer or Sequencer, respectively.

The MidiDevice interface includes API for opening and closing a device. It also includes an inner class called MidiDevice.Info that provides textual descriptions of the device, including its name, vendor, and version. If you've read the sampled-audio portion of this programmer's guide, this API will probably sound familiar, because its design is similar to that of the javax.sampled.Mixer interface, which represents an audio device and which has an analogous inner class, Mixer.Info.

Transmitters and Receivers

Most MIDI devices are capable of sending MidiMessages, receiving them, or both. The way a device sends data is via one or more transmitter objects that it "owns." Similarly, the way a device receives data is via one or more of its receiver objects. The transmitter objects implement the Transmitter interface, and the receivers implement the Receiver interface.

Each transmitter can be connected to only one receiver at a time, and vice versa. A device that sends its MIDI messages to multiple other devices simultaneously does so by having multiple transmitters, each connected to a receiver of a different device. Similarly, a device that can receive MIDI messages from more than one source at a time must do so via multiple receivers.

Sequencers

A sequencer is a device for capturing and playing back sequences of MIDI events. It has transmitters, because it typically sends the MIDI messages stored in the sequence to another device, such as a synthesizer or MIDI output port. It also has receivers, because it can capture MIDI messages and store them in a sequence. To its superinterface, MidiDevice, Sequencer adds methods for basic MIDI sequencing operations. A sequencer can load a sequence from a MIDI file, query and set the sequence's tempo, and synchronize other devices to it. An application program can register an object to be notified when the sequencer processes certain kinds of events.

Synthesizers

A Synthesizer is a device for generating sound. It's the only object in the javax.sound.midi package that produces audio data. A synthesizer device controls a set of MIDI channel objects-typically 16 of them, because the MIDI specification calls for 16 MIDI channels. These MIDI channel objects are instances of a class that implements the MidiChannel interface, whose methods represent the MIDI specification's "channel voice messages" and "channel mode messages."

An application program can generate sound by directly invoking methods of a synthesizer's MIDI channel objects. More commonly, though, a synthesizer generates sound in response to messages sent to one or more of its receivers. These messages might be sent by a sequencer or MIDI input port, for example. The synthesizer parses each message that its receivers get, and usually dispatches a corresponding command (such as noteOn or controlChange) to one of its MidiChannel objects, according to the MIDI channel number specified in the event.

The MidiChannel uses the note information in these messages to synthesize music. For example, a noteOn message specifies the note's pitch and "velocity" (volume). However, the note information is insufficient; the synthesizer also requires precise instructions on how to create the audio signal for each note. These instructions are represented by an Instrument. Each Instrument typically emulates a different real-world musical instrument or sound effect. The Instruments might come as presets with the synthesizer, or they might be loaded from soundbank files. In the synthesizer, the Instruments are arranged by bank number (these can be thought of as rows) and program number (columns).

This chapter has provided a background for understanding MIDI data, and it has introduced some of the important interfaces and classes related to MIDI in the Java Sound API. Subsequent chapters show how you can access and use these objects in your application program.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Chapter 9

Accessing MIDI System Resources

The JavaTM Sound API offers a flexible model for MIDI system configuration, just as it does for configuration of the sampled-audio system. An implementation of the Java Sound API can itself provide different sorts of MIDI devices, and additional ones can be supplied by service providers and installed by users. You can write your program in such a way that it makes few assumptions about which specific MIDI devices are installed on the computer. Instead, the program can take advantage of the MIDI system's defaults, or it can allow the user to select from whatever devices happen to be available.

This section shows how your program can learn what MIDI resources have been installed, and how to get access to the desired ones. After you've accessed and opened the devices, you can connect them to each other, as discussed in the next chapter, "Transmitting and Receiving MIDI Messages."

The MidiSystem Class

The role of the MidiSystem class in the Java Sound API's MIDI package is directly analogous to the role of AudioSystem in the sampled-audio package. MidiSystem acts as a clearinghouse for accessing the installed MIDI resources.

You can query the MidiSystem to learn what sorts of devices are installed, and then you can iterate over the available devices and obtain access to the desired ones. For example, an application program might start out by asking the MidiSystem what synthesizers are available, and then display a list of them, from which the user can select one. A simpler application program might just use the system's default synthesizer.

The MidiSystem class also provides methods for translating between MIDI files and Sequences. It can report the file format of a MIDI file and can write files of different types.

An application program can obtain the following resources from the MidiSystem:

  • Sequencers
  • Synthesizers
  • Transmitters (such as those associated with MIDI input ports)
  • Receivers (such as those associated with MIDI output ports)
  • Data from standard MIDI files
  • Data from soundbank files

This chapter focuses on the first four of these types of resource. The MidiSystem class's file-handling facilities are discussed in Chapter 11, "Playing, Recording, and Editing MIDI Sequences ," and Chapter 12, "Synthesizing Sound ." To understand how the MIDI system itself gets access to all these resources, see Part III of this guide, "Service Provider Interfaces."

Obtaining Default Devices

A typical MIDI application program that uses the Java Sound API begins by obtaining the devices it needs, which can consist of one or more sequencers, synthesizers, input ports, or output ports.

There is a default synthesizer device, a default sequencer device, a default transmitting device, and a default receiving device. The latter two devices normally represent the MIDI input and output ports, respectively, if there are any available on the system. (It's easy to get confused about the directionality here. Think of the ports' transmission or reception in relation to the software, not in relation to any external physical devices connected to the physical ports. A MIDI input port transmits data from an external device to a Java Sound API Receiver, and likewise a MIDI output port receives data from a software object and relays the data to an external device.)

A simple application program might just use the default instead of exploring all the installed devices. The MidiSystem class includes the following methods for retrieving default resources:

    static Sequencer getSequencer()
    static Synthesizer getSynthesizer()
    static Receiver getReceiver()
    static Transmitter getTransmitter()

The first two of these methods obtain the system's default sequencing and synthesis resources, which either represent physical devices or are implemented wholly in software. The getReceiver method obtains a Receiver object that takes MIDI messages sent to it and relays them to the default receiving device. Similarly, the getTransmitter method obtains a Transmitter object that can send MIDI messages to some receiver on behalf of the default transmitting device.

Learning What Devices Are Installed

Instead of using the default devices, a more thorough approach is to select the desired devices from the full set of devices that are installed on the system. An application program can select the desired devices programmatically, or it can display a list of available devices and let the user select which ones to use. The MidiSystem class provides a method for learning which devices are installed, and a corresponding method to obtain a device of a given type.

Here is the method for learning about the installed devices:

    static MidiDevice.Info[] getMidiDeviceInfo()

As you can see, it returns an array of information objects. Each of these returned MidiDevice.Info objects identifies one type of sequencer, synthesizer, port, or other device that is installed. (Usually a system has at most one instance of a given type. For example, a given model of synthesizer from a certain vendor will be installed only once. ) The MidiDevice.Info includes the following strings to describe the device:

  • Name
  • Version number
  • Vendor (the company that created the device)
  • A description of the device

You can display these strings in your user interface to let the user select from the list of devices.

However, to use the strings programmatically to select a device (as opposed to displaying the strings to the user), you need to know in advance what they might be. The company that provides each device should include this information in its documentation. An application program that requires or prefers a particular device can use this information to locate that device. This approach has the drawback of limiting the program to device implementations that it knows about in advance.

Another, more general, approach is to go ahead and iterate over the MidiDevice.Info objects, obtaining each corresponding device, and determining programmatically whether it's suitable to use (or at least suitable to include in a list from which the user can choose). The next section describes how to do this.

Obtaining a Desired Device

Once an appropriate device's info object is found, the application program invokes the following MidiSystem method to obtain the corresponding device itself:

    static MidiDevice getMidiDevice(MidiDevice.Info info)

You can use this method if you've already found the info object describing the device you need. However, if you can't interpret the info objects returned by getMidiDeviceInfo to determine which device you need, and if you don't want to display information about all the devices to the user, you might be able to do the following instead: Iterate over all the MidiDevice.Info objects returned by getMidiDeviceInfo, get the corresponding devices using the method above, and test each device to see whether it's suitable. In other words, you can query each device for its class and its capabilities before including it in the list that you display to the user, or as a way to decide upon a device programmatically without involving the user. For example, if your program needs a synthesizer, you can obtain each of the installed devices, see which are instances of classes that implement the Synthesizer interface, and then display them in a list from which the user can choose one, as follows:

// Obtain information about all the installed synthesizers.
Vector synthInfos;
MidiDevice device;
MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
for (int i = 0; i < infos.length; i++) {
    try {
        device = MidiSystem.getMidiDevice(info);
    } catch (MidiUnavailableException e) {
          // Handle or throw exception...
    }
    if (device instanceof Synthesizer) {
        synthInfos.add(info);
    }
}
// Now, display strings from synthInfos list in GUI.

As another example, you might choose a device programmatically, without involving the user. Let's suppose you want to obtain the synthesizer that can play the most notes simultaneously. You iterate over all the MidiDevice.Info objects, as above, but after determining that a device is a synthesizer, you query its capabilities by invoking the getMaxPolyphony method of Synthesizer. You reserve the synthesizer that has the greatest polyphony, as described in the next section. Even though you're not asking the user to choose a synthesizer, you might still display strings from the chosen MidiDevice.Info object, just for the user's information.

Opening Devices

The previous section showed how to get an installed device. However, a device might be installed but unavailable. For example, another application program might have exclusive use of it. To actually reserve a device for your program, you need to use the MidiDevice method open:

if (!(device.isOpen())) {
    try {
      device.open();
  } catch (MidiUnavailableException e) {
          // Handle or throw exception...
  }
}

Once you've accessed a device and reserved it by opening it, you'll probably want to connect it to one or more other devices to let MIDI data flow between them. This procedure is described in Chapter 10, "Transmitting and Receiving MIDI Messages."

When done with a device, you release it for other programs' use by invoking the close method of MidiDevice.

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Contents

Preface

Who this Guide Is For
What this Guide Describes
For More Information

Chapter 1 Introduction to the Java Sound API

Design Goals
Who is the Java Sound API For?
How Does the Java Sound API Relate to Other Interfaces?
Packages
Sampled Audio
What Is Sampled Audio?
Audio Configurations
MIDI
What Is MIDI?
MIDI Configurations
Service Provider Interfaces

Part I: Sampled Audio

Chapter 2 Overview of the Sampled Package

Design Goals
A Focus on Data Transport
Buffered and Unbuffered Handling of Audio
The Essentials: Format, Mixer, and Line
What Is Formatted Audio Data?
What Is a Mixer?
What Is a Line?
Lines in an Audio-output Configuration
Lines in an Audio-input Configuration
The Line Interface Hierarchy

Chapter 3 Accessing Audio System Resources

The AudioSystem Class
Information Objects
Getting a Mixer
Getting a Line of a Desired Type
Getting a Line Directly from the AudioSystem
Getting a Line from a Mixer
Selecting Input and Output Ports
Permission to Use Audio Resources

Chapter 4 Playing Back Audio

Using a Clip
Setting Up the Clip for Playback
Starting and Stopping Playback
Using a SourceDataLine
Setting Up the SourceDataLine for Playback
Starting and Stopping Playback
Monitoring a Line's Status
Synchronizing Playback on Multiple Lines
Processing the Outgoing Audio

Chapter 5 Capturing Audio

Setting Up a TargetDataLine
Reading the Data from the TargetDataLine
Monitoring the Line's Status
Processing the Incoming Audio

Chapter 6 Processing Audio with Controls

Introduction to Controls
Getting a Line that Has the Desired Controls
Getting the Controls from the Line
Using a Control to Change the Audio Signal
Controlling a Line's Mute State
Changing a Line's Volume
Selecting among Various Reverberation Presets
Manipulating the Audio Data Directly

Chapter 7 Using Files and Format Converters

Reading Sound Files
Writing Sound Files
Converting File and Data Formats
Converting from One File Format to Another
Converting Audio between Different Data Formats
Learning What Conversions Are Available

Part II: MIDI

Chapter 8 Overview of the MIDI Package

A MIDI Refresher: Wires and Files
Streaming Data in the MIDI Wire Protocol
Sequenced Data in Standard MIDI Files
The Java Sound API's Representation of MIDI Data
MIDI Messages
MIDI Events
Sequences and Tracks
The Java Sound API's Representation of MIDI Devices
The MidiDevice Interface
Transmitters and Receivers
Sequencers
Synthesizers

Chapter 9 Accessing MIDI System Resources

The MidiSystem Class
Obtaining Default Devices
Learning What Devices Are Installed
Obtaining a Desired Device
Opening Devices

Chapter 10 Transmitting and Receiving MIDI Messages

Understanding Devices, Transmitters, and Receivers
Sending a Message to a Receiver without
Using a Transmitter
Understanding Time Stamps
Time Stamps on Messages Sent to Devices
Connecting Transmitters to Receivers
Connecting to a Single Device
Connecting to More than One Device
Closing Connections

Chapter 11 Playing, Recording, and Editing
MIDI Sequences

Introduction to Sequencers
When to Use a Sequencer
Understanding Sequence Data
Sequences and Tracks
MidiEvents and Ticks
Overview of Sequencer Methods
Obtaining a Sequencer
Loading a Sequence
Playing a Sequence
Recording and Saving Sequences
Editing a Sequence
Using Advanced Sequencer Features
Moving to an Arbitrary Position in the Sequence
Changing the Playback Speed
Muting or Soloing Individual
Tracks in the Sequence
Synchronizing with Other MIDI Devices
Specifying Special Event Listeners

Chapter 12 Synthesizing Sound

Understanding MIDI Synthesis
Instruments
Channels
Soundbanks and Patches
Voices
Managing Instruments and Soundbanks
Learning What Instruments Are Loaded
Loading Different Instruments
Unloading Instruments
Accessing Soundbank Resources
Querying the Synthesizer's Capabilities and
Current State
Using Channels
Controlling the Synthesizer without
Using a Sequencer
Getting a Channel's Current State
Muting and Soloing a Channel
Permission to Play Synthesized Sound

Part III: Service Provider Interfaces

Chapter 13 Introduction to the Service Provider Interfaces

What Are Services?
How Services Work
How Providers Prepare New Services
How Users Install New Services

Chapter 14 Providing Sampled-Audio Services

Introduction
Providing Audio File-Writing Services
Providing Audio File-Reading Services
Providing Format-Conversion Services
Providing New Types of Mixers

Chapter 15 Providing MIDI Services

Introduction
Providing MIDI File-Writing Services
Providing MIDI File-Reading Services
Providing Particular MIDI Devices
Providing Soundbank File-Reading Services

Index

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Index

A

AIFF file 65
applets and applications 31
audio file-writing services, providing 137
AudioFileFormat 60- 71
AudioFileReader 131, 136
AudioFileWriter 136
AudioFormat
attributes 13
AudioInputStream
definition 15
AudioInputStream and format conversion 140
AudioSystem
description 25
file-reading services 60
getting file formats 67
supported file types 67

B

big-endian 14
bits per sample 13
BooleanControl 51
buffer size, selecting 36

C

capturing, definition 43
Clip 23
monitoring volume level and activity status 35
setting up for playback 35
use of 33
closing connections 96
CompoundControl 51
connecting a sequencer to a synthesizer 94
connecting to a single device 94
connecting to more than one device 95
connecting transmitters to receivers 94
consumers versus providers 130
Control subclass
table of Control.Type subclasses and instances 52
ControllerEventListener 113- 114
controls 50- 52
converting audio between different data formats 68

D

data format 13, 68
devices, learning what are installed 85
digital signal processing (DSP) techniques 57

E

EnumControl 51

F

FloatControl 51
format-conversion services, providing 139
FormatConversionProvider 136, 139
formatted audio data 13
frame rate 13

G

getting a line directly from the AudioSystem 28

I

IllegalStateException 91
installed services, registration 136

J

JAR file 130
Java 3D 2
Java Media Framework (JMF) 2
Java Sound API
definition 1
potential applications 1
relationship to other Java interfaces 2
javax.sound.midi 2
javax.sound.midi.spi 3
javax.sound.sampled 2
javax.sound.sampled package
playback and capture 11
javax.sound.sampled.spi 3

L

line 18
minimum functionality 21
subinterfaces 21
line interface hierarchy 20
line status, monitoring 40
LineListener 40
little-endian 14

M

MIDI
timing values 92
MIDI data
message-routing architecture 89
MIDI data hierarchy 80
MidiDevice
implementing devices 147
opening devices 87
MidiEvents 80
MidiSystem 83
method for learning about the installed devices 85
methods for retrieving default resources 85
obtaining a desired device 86
resources 84
MidiUnavailableException 91
mixer 16
Mixer interface 22
mixer, getting 27
mixer, getting a line from 30
MixerProvider 136, 141
multimbral 117
mute state, controlling 55

O

one-to-one connection between a transmitter and a receiver 94

P

pan 17
physical mixer 17
playback 12
polytimbral. See multimbral 117
ports 21
presentation 33
processing incoming sound 57
pulse code modulation (PCM) 14

R

rendering 33
reverberation presets, selecting 56

S

sampled audio 3
samples, definition 3
security and permissions information 32
selecting input and output ports 30
Sending a Message to a Receiver without Using a Transmitter 90
Sequences 80
services
definition 129
examples of third-party MIDI 130
examples of third-party sampled audio 129
how end users install 133
management of provider classes 136
working of 130
SoundbankReader 148
SourceDataLine 23
setting up for playback 36
use of 34
start and stop method 35
starting and stopping playback 35
streaming of audio 12
synchronizing playback on multiple lines 41

T

TargetDataLine 23
read method 46
retrieving data from the buffer 45
timbre 117
timeStamp 93
timing values 92
Track 80
Transmitter 90

U

unbuffered handling of audio 12
understanding time stamps 91

V

voice, MIDI, definition 119
volume, changing 55

W

writing sound files 63- 65

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Java Sound API Programmer's Guide

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Part II:
MIDI

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Preface

Who this Guide Is For

This guide is intended for three groups of readers:

  • Application developers: software programmers who want to write programs in the JavaTM language (whether applications or applets) that use audio or MIDI. Most readers will be in this category.
  • Service providers: developers of software modules that extend the capabilities of an implementation of the Java Sound application programming interface (API). For example, a vendor might provide a new audio mixer or MIDI synthesizer, or the ability to read and write a new file format. The Java Sound API is designed to let programs automatically get access to all such "plug-in" modules that are available on a particular system.
  • API implementors: developers creating a new implementation of the Java Sound API.

It is assumed that the reader has a basic knowledge of programming in the Java language. Familiarity with audio and MIDI is helpful, but not assumed.

What this Guide Describes

This is a largely conceptual description of the Java Sound API, with some code snippets as programming examples. The Java Sound API specifies a software layer that allows application programs to communicate with an audio and MIDI engine. The Java Sound API is part of the JavaTM 2 Platform, Standard Edition (J2SE), version 1.3, which is the version that this guide describes. The sound API is included in both the Java 2 Software Development Kit (SDK), Standard Edition and the Java 2 Runtime Environment, Standard Edition. Earlier implementations of the Java Sound API were supplied as a separate product, and their programming interface differs from the one described here.

Note: This guide is not a description of any particular implementation of the Java Sound API! In particular, it does not specifically describe the reference implementation of the Java Sound API created by Sun Microsystems, Inc. For example, you will not find here a list of exactly which sound file formats are supported in the reference implementation. (Because the Java Sound API makes "plug-in" services possible, the implementor or third parties can add support for new formats and so on.) More generally, this programmer's guide ignores any unique features, extensions, limitations, or bugs of a particular implementation. For details about a specific implementation, please see the documentation for the vendor and version of interest.

For More Information

See the links to the Java Sound API reference documentation at http://java.sun.com/products/jdk/1.3/docs/guide/sound/. This Web site also includes a brief description of the reference implementation, as well as links to other resources about the Java Sound API, such as demo programs, mailing lists, and Frequently Answered Questions (FAQs).

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Part I:
Sampled Audio

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

Part III:
Service Provider Interfaces

[Top] [Prev] [Next] [Bottom]

Copyright © 2000, Sun Microsystems Inc. All rights reserved.


Sound Architecture Overview

Design Goals

The Java Sound API is a low-level API for effecting and controlling input and output of audio media. It provides explicit control over the capabilities commonly required for audio input and output in a framework that promotes extensibility and flexibility.

Because sound is so fundamental, Java Sound fulfills the needs of a wide range of customers. Potential application areas include:

  • Communication frameworks, such as conferencing and telephony
  • End-user content delivery systems, such as media players and music using streamed content
  • Interactive applications, such as games and Web sites that use dynamic content
  • Content creation and editing
  • Tools, toolkits, and utilities

Java Sound enables applications to extend audio support with specialized capabilities, and integrates well with architectures that provide higher-level interfaces and integration with other media types.

Java Sound provides the lowest level of audio support on the Java platform. It provides a high degree of control over audio-specific functionality. For example, it provides mechanisms for installing, accessing, and manipulating system resources such as digital audio and MIDI (Musical Instrument Digital Interface) devices. It does not include sophisticated sound editors and GUI tools; rather, it provides a set of capabilities upon which such applications can be built. It emphasizes low-level control beyond that commonly expected by the end user, who benefits from higher-level interfaces built on top of Java Sound.

Note: Throughout this document, the word "application" refers generically to Java applets as well as Java applications.

Packages

The Java Sound API includes support for both digital audio and MIDI data. These two major modules of functionality are provided in separate packages:

javax.sound.sampled
This package specifies interfaces for capture, mixing, and playback of digital (sampled) audio.

javax.sound.midi
This package provides interfaces for MIDI synthesis, sequencing, and event transport.

Two other packages permit service providers (as opposed to application developers) to create custom components that can be installed on the system:

javax.sound.sampled.spi
javax.sound.midi.spi

The next section of this document discusses the sampled-audio system, including an overview of the javax.sound.sampled API. The final section covers the MIDI system and the javax.sound.midi API.

Sampled Audio

The javax.sound.sampled package handles digital audio data, also referred to as sampled audio. ("Samples" refer to successive snapshots of a signal, which in the case of digital audio is a sound wave. For example, the audio recorded for storage on compact discs is sampled 44100 times per second. Typically, sampled audio comes from a sound recording, but the sound could instead be synthetically generated. The term "sampled audio" refers to the type of data, not its origin. Sampled audio can be thought of as the sound itself, whereas MIDI data can be thought of as a recipe for creating musical sound.)

Java Sound does not assume a specific audio hardware configuration; it is designed to allow different sorts of audio components to be installed on a system and accessed by the API. Java Sound supports common functionality such as input and output from a sound card (for example, for recording and playback of sound files) as well as mixing of multiple streams of audio. Here is one example of a typical audio architecture for which Java Sound might be used:

A Typical Audio Architecture

In this example, a device such as a sound card has various input and output ports, and mixing is provided in software. The MIDI synthesizer shown as one of the mixer’s audio inputs might also be a feature of the sound card, or it might be implemented in software. (The javax.sound.midi package, discussed later, supplies a Java interface for synthesizers.)

The major concepts used in the javax.sound.sampled package are described in the sections below.

Lines

A line is an element of the digital audio "pipeline," such as an audio input or output port, a mixer, or an audio data path into or out of a mixer. The audio data flowing through a line can be mono or multichannel (for example, stereo). Each type of line will be described shortly, but first some of their functional relationships will be illustrated, showing the flow of audio through the "pipeline." The following diagram shows different types of lines in a simple audio-output system:

A Possible Configuration of Lines for Audio Output

In this example, an application has asked a mixer for one or more available clips and source data lines. A clip is a mixer input into which you can load audio data prior to playback; a source data line is a mixer input that accepts a real-time stream of audio data. The application preloads audio data from a sound file into the clips, and then pushes other audio data into the source data lines. The mixer reads data from these lines, each of which may have its own reverberation, gain, and pan controls, and uses the reverb settings to mix the "dry" audio signals with the reverberated ("wet") mix. The mixer delivers its final output to one or more output ports, such as a speaker, a headphone jack, and a line-out jack.

Although the various lines are depicted as separate rectangles in the diagram, they are all "owned" by the mixer, and can be considered integral parts of the mixer. The reverb, gain, and pan rectangles represent processing controls (rather than lines) that can be applied by the mixer to data flowing through the lines. (Note that this is just one example of a possible audio system that is supported by the API. Not all audio configurations will have all the features illustrated. An individual source data line might not support panning, a mixer might not implement reverb, and so on.)

A simple audio-input system might be similar:

A Possible Configuration of Lines for Audio Input

Here, data flows in to the mixer from one or more input ports, commonly the microphone or the line-in jack. Gain and pan are applied, and the mixer delivers the captured data to an application via the mixer's target data line. A target data line is a mixer output, containing the mixture of the streamed input sounds. The simplest mixer has just one target data line, but some mixers can deliver captured data to multiple target data lines simultaneously.

The different types of line will now be examined more closely. Several types of line are defined by subinterfaces of the basic Line interface. The interface hierarchy is shown below.

The Line Interface Hierarchy

The base interface, Line, describes the minimal functionality common to all lines:

    • Routing

      A line has an information object (an instance of Line.Info) that indicates what mixer (if any) sends its mixed audio data as output directly to the line, and what mixer (if any) gets audio data as input directly from the line. Subinterfaces of Line may have corresponding subclasses of Line.Info that provide other kinds of information specific to the particular types of line.

    • Controls

      A line can have various types of controls, such as gain, pan, and reverb controls. Usually, a line has no more than one control of a given type, but this is not a necessary limitation. Controls are discussed in more detail below.

    • Open or closed status

      Opening and closing a line affects its resource allocation. Successful opening of a line guarantees that resources have been allocated to the line. Opening a mixer that has audio input and/or output ports normally involves acquiring the native platform hardware resource (sound card) and initializing any required software components. Opening a line that is a data path in or out of the mixer might involve device initialization as well as allocation of limited resources from the mixer. In other words, a mixer has a finite number of lines, so at some point multiple applications (or the same application) might vie for usage of the mixer.

      Closing a line indicates that any resources used by the line may now be released. To free up resources, applications should close lines whenever they are not in use, and must close all opened lines when exiting.

      Mixers are assumed to be shared system resources, and can be opened and closed repeatedly. Other lines may or may not support re-opening once they have been closed. Mechanisms for opening lines vary with the different sub-types and are documented where they are defined.

    • Events

      A line generates events when it opens or closes. The events are instances of the LineEvent class. Two types of LineEvent are OPEN and CLOSE, but subinterfaces of Line can introduce other types of events.

      When a line generates an OPEN or CLOSE event, the event is sent to all objects that have registered to "listen" for events on that line. Such objects must implement the LineListener interface. An application can create these objects, register them to listen for line events, and react to the events as desired.

Ports are simple lines for input or output of audio to or from audio devices. The Port interface has an inner class, Port.Info, that specifies the type of port. Some common types are the microphone, line input, CD-ROM drive, speaker, headphone, and line output.

The Mixer interface represents a hardware or software device that has one or more input lines and one or more output lines. This definition means that a mixer need not actually mix data; it might have only a single input. The Mixer API is intended to encompass a variety of devices, but the typical case supports mixing.

The Mixer interface provides methods for obtaining a mixer's lines. These can include target data lines, from which an application can read captured audio data, source data lines, to which an application can write audio data for playback (rendering), and clips, in which an application can preload sound data for playback. The mixer can lock these resources. For example, if the mixer has only one target data line and it is already in use, an attempt by an application to obtain a target data line will cause an exception to be thrown.

You can query a mixer for lines of different types, by passing the appropriate type of Line.Info. You can also ask the mixer how many lines of a particular type it supports.

A mixer maintains textual information about its specific device type in an inner class called Mixer.Info. This information include the product's name, version, and vendor, along with a textual description.

Notice that the generic Line interface does not provide a means to start and stop playback or recording. For that you need a data line. The DataLine interface supplies the following additional media-related features beyond those of a Line:
    • Audio format

      Each data line has an audio format associated with its data stream. The format (an instance of AudioFormat) specifies the arrangement of the bytes in the audio stream. Some of the format's properties are the number of channels, the sample rate, the sample size, and the encoding technique. Common encoding techniques include linear pulse-code modulation (PCM), mu-law encoding, and a-law encoding.

    • Media position

      A data line can report its current position in the media, expressed in sample frames. This represents the number of sample frames captured by or rendered from the data line since it was opened.

    • Buffer size

      This is the size of the data line’s internal buffer in sample frames. For a source data line, the internal buffer is one to which data can be written, and for a target data line it’s one from which data can be read.

    • Level

      The data line's level represents the current linear amplitude of the audio signal, from 0 to 1.

    • Start and stop playback or capture

    • Pause and resume

      Pausing a data line causes it to cease data I/O activity (capture or playback) without discarding data or releasing resources. Resuming the line enables it to continue data I/O activity. Pausing a data line can result in an audible discontinuity (such as a click) in playback or recording. To avoid overfilling the capture buffer, an application that is recording audio should pause the target data line from which it reads audio whenever it is not prepared to read captured data continuously. Resuming a paused source data line will play back the next samples from its queue, unless the data line has been flushed.

    • Flush

      Flushing a data line discards unprocessed data from the queue and returns. In some cases, not all queued data can be discarded. For example, a mixer can flush data from the buffers in its source data lines, but any unplayed data already in its internal buffer (which contains the mixed output data) will still be played.

    • Drain

      Draining a data line blocks until all unprocessed data has been drained from the queue, and the data line's buffer has become empty. If you attempt to drain a data line whose buffer is still being filled (either by the application or by a mixer), the draining might not complete.

    • Active status

      A data line is considered active if it is engaged in active presentation or capture of audio data to or from a mixer.

    • Events

      START and STOP events are produced when active presentation or capture of data from or to the data line starts or stops.

An application can obtain a data line from a mixer. If the data line cannot be allocated because of resource constraints (for example, if the mixer supports only one target data line and it is already in use), an exception is thrown.

A TargetDataLine receives audio data from a mixer. Commonly, the mixer has captured audio data from a port such as a microphone; it might process or mix this captured audio before placing the data in the target data line's buffer. The TargetDataLine interface provides methods for reading the data from the target data line's buffer and for determining how much data is currently available for reading. If an application attempts to read more data than is available, the read method blocks until the requested amount of data is available. This applies even if the amount of data requested is greater than the line's buffer size. The read method returns if the line is closed, paused, or flushed.

Applications recording audio should read data from the target data line fast enough to avoid overflow of the buffer, which results in discontinuities in the captured data. If the buffer does overflow, the oldest queued data is discarded and replaced by new data.

A SourceDataLine receives audio data for playback. It provides methods for writing data to the source data line's buffer for playback, and for determining how much data the line is prepared to receive without blocking. If an application attempts to write more data than is available, the read method blocks until the requested amount of data can be written. This applies even if the amount of data requested is greater than the line's buffer size. The write method also returns if the line is closed, paused, or flushed.

Applications playing audio should write data to the source data line fast enough to avoid underflow (emptying) of the buffer, which may result in discontinuities in audio playback. If audio playback stops due to underflow, a STOP event is generated. A START event is generated when presentation resumes.

A Clip is a data line into which audio data can be loaded prior to playback. Because the data is pre-loaded rather than streamed, the clip’s duration is known before playback, and you can choose any starting position in the media. Clips can be looped, meaning that upon playback, all the data between two specified loop points will repeat a specified number of times, or indefinitely.

A GroupLine is a synchronized group of data lines. If a mixer supports group lines, you can specify which data lines should be treated as a group. Then you can start, stop, or close all those data lines by sending a single message to the group, instead of having to control each line individually.

Controls

Data lines and ports often have a set of controls that affect the audio signal passing through the line. The way in which the signal is affected depends on the type of control. The Java Sound API defines the following subclasses of Control:

  • GainControl

    This control allows the signal's volume to be boosted or cut a specified number of decibels. A fade can be applied so that the volume increases or decreases gradually instead of instantly. The gain control includes a mute function to temporarily silence the line without altering its gain setting. A GainControl object can be queried for its resolution and for the minimum and maximum gain values it permits. The resolution is expressed as the number of increments over which the range of possible values is distributed.

    The types of gain control defined by the API include an overall gain control as well as gain controls for auxiliary send and return. The send and return typically control a line's contribution to a mixed and reverberated signal.

  • PanControl

    A pan control affects the sound's right-left positioning. For a stereo audio signal, the pan control affects the balance between the volumes of the left and right channels. An application can set the pan position and can query the control for its resolution. The resolution is expressed as the number of incremental values from "hard left" to "hard right."

  • ReverbControl

    This control gives access to any number of reverberation settings. Each setting might emulate a different time of room (small club, concert hall, cavern, etc.). The parameters used in constructing each setting consist of the delay time and intensity of early reflections, the delay time and intensity of late reflections, and an overall decay time.

  • SampleRateControl

    This control affects the rate of playback. Altering the audio sample rate changes the sound's pitch. As with GainControl, the change can be made gradually instead of immediately, and the control can be queried for its resolution and its minimum and maximum possible values.

Programmatically, you obtain a particular control object from a line through a reference to the control’s class. You can also obtain an array of all the controls for that line.

AudioSystem

The AudioSystem class serves as an application's entry point for accessing the installed sampled-audio resources. You can query the AudioSystem to learn what sorts of audio components have been installed, and then you can obtain access to them. For example, an application might start out by asking the AudioSystem class whether there is a mixer that has a certain configuration, such as one of the input or output configurations illustrated earlier in the discussion of lines. From the mixer, the application would then obtain data lines, and so on.

Here are some of the resources an application can obtain from the AudioSystem:

  • Mixers

    A mixer can be obtained by passing a specific Mixer.Info object. You can learn what mixers are available by invoking the getMixerInfo method, which returns an array of Mixer.Info objects.

  • Lines

    An application can get a target data line or source data line directly from the AudioSystem, without dealing explicitly with mixers.

  • Format conversions

    An application can use format conversions to translate audio data from one format to another. (See the discussion of AudioFormat above.) Format conversions are often used to compress and decompress audio data. An application can query the AudioSystem to learn what translations are supported. It can then pass the AudioSystem a stream of audio data and get back a translated stream in a particular format.

  • Files and streams

    An audio stream is an input stream with a specified audio data format (AudioFormat) and data length. The AudioInputStream class represents such a stream, from which you can read bytes. Some audio input streams permit you to remember positions in the stream and skip around in it. The AudioSystem class provides methods for translating between audio files and audio streams. The AudioSystem can also report the file format of a sound file and can write files in the different formats. A file format is represented by the AudioFileFormat class. An AudioFileFormat includes an AudioFormat, the file's length, and its type (WAV, AIFF, AU, etc.).

System configuration (SPI classes)

Service provider interfaces for the sampled audio system are defined in the javax.sound.sampled.spi package. Service providers can extend the classes defined here so that their own audio devices, sound file parsers and writers, and format converters can be installed and made available by a Java Sound implementation.

MIDI

Interfaces describing MIDI event transport, synthesis, and sequencing are defined in the javax.sound.midi package. The major concepts used in the package are described in the sections below.

Functional Overview

The diagram below illustrates the functional relationships between the major components in a typical Java Sound MIDI configuration. (Java Sound permits a variety of devices to be installed and interconnected. The system shown here is just one possible scenario.) The flow of data between components is indicated by arrows. The data can be in a standard file format, or (as indicated by the key in the lower right corner of the diagram), it can be audio, raw MIDI bytes, or Java Sound's MidiEvent objects.

A Typical MIDI Configuration

In this example, the application prepares a musical performance by loading a musical score that is stored as a Standard MIDI File on a disk (lower left corner of the diagram). Standard MIDI files contain tracks, each of which is a list of time-tagged MIDI events. This MIDI file is read into a Sequence object, whose data structure reflects the file. A Sequence contains a set of Track objects, each of which contains a set of MidiEvent objects. The Sequence is then "performed" by a Sequencer. A Sequencer performs its music by sending MidiEvents to some other device, such as an internal or external synthesizer.

As illustrated, MidiEvents must be translated into raw (non-time-tagged) MIDI before being sent through a MIDI output port to an external synthesizer. This conversion is accomplished by a a MIDI-output device called a StreamGenerator. Similarly, raw MIDI data coming into the computer from an external MIDI source is translated into MidiEvents by a StreamParser.

The internal synthesizer (the rectangle marked "Synthesizer" in the diagram) accepts MidiEvents directly from the Sequencer or StreamParser. It parses each event and usually dispatches a corresponding command (such as noteOn) to one of its MidiChannel objects, according to the MIDI channel number specified in the event. (The MIDI Specification calls for 16 MIDI channels, so a Synthesizer typically has 16 MidiChannel objects.)

The MidiChannel uses the note information in these messages to synthesize music. For example, a noteOn message specifies the note's pitch and "velocity" (volume). However, the note information is insufficient; the synthesizer also requires precise instructions on how to create the audio signal for each note. These instructions are represented by an Instrument. Each Instrument typically emulates a different real-world musical instrument or sound effect. The Instruments might come as presets with the synthesizer, or they might be loaded from soundbank files. In the synthesizer, the Instruments are arranged by bank number (the rows in the diagram) and program number (the columns). An Instrument can make use of stored digital audio, included as Sample objects in the soundbank. For example, to play the sound of a trumpet playing a 5-second-long note, the synthesizer might loop (cycle) through a half-second snippet of a recording of a trumpet.

Now that the components have been introduced from a functional perspective, we will take a brief look at the API from a programmatic perspective.

MidiEvent

A MidiEvent object specifies the type, data length, and status byte of the raw MIDI message for which it serves as a wrapper. In addition, it provides a tick value that is used by devices involved in MIDI timing, such as sequencers.

There are three categories of events, each represented by a MidiEvent subclass:

  • ShortEvents are the most common and have at most two data bytes following the status byte.
  • SysexEvents contain system-exclusive MIDI messages. They may have many bytes, and generally contain manufacturer-specific instructions.
  • MetaEvents occur in MIDI files, but not in raw MIDI data streams. Meta events contain data, such as lyrics or tempo settings, that might be useful to sequencers but are usually meaningless for synthesizers.

MidiDevice

The base interface for devices is MidiDevice. All devices provide methods for listing the set of MIDI modes that they support, and for querying and setting the current mode. (The mode is a combination of MIDI's Omni mode and Mono/Poly mode.) Devices can be opened and closed, and they provide descriptions of themselves through a MidiDevice.Info object.

The following diagram illustrates the MidiDevice interface hierarchy. Also depicted are two classes, connected by dashed lines to the MidiDevice interfaces they implement.

MidiDevice Hierarchy

Devices are generally either transmitters or receivers of MidiEvents. The Transmitter subinterface of MidiDevice includes methods for setting and querying the receivers to which the transmitter is sending MidiEvents. From the perspective of a transmitter, these receivers fall into two categories: MIDI Out and MIDI Thru. The transmitter sends events that it generates itself to its MIDI Out receivers. If the transmitter is itself also a receiver, it passes along events that it has received from elsewhere to its MIDI Thru receivers. The Receiver subinterface of MidiDevice consists of a single method for receiving MidiEvents. Typically, this method is invoked by a Transmitter.

Java Sound includes concrete classes for converting between MidiEvent objects and the raw byte stream used in MIDI wire protocol. A StreamGenerator is a Receiver that accepts MidiEvent objects from a Transmitter and writes out a raw MIDI byte stream. Similarly, a StreamParser is a Transmitter that accepts a raw MIDI byte stream and writes the corresponding MidiEvent objects to its Receiver.

Synthesis

A Synthesizer is a type of MidiDevice that generates sound. The Synthesizer interface extends both Receiver and Transmitter. It provides methods for manipulating soundbanks and instruments. In addition, it provides access to a set of MIDI channels through which sound is actually produced. A Synthesizer receives MidiEvents and invokes corresponding MidiChannel messages.

MidiChannels have methods representing the common MIDI voice messages such as "note on" and "control change." They also permit queries of the channel's current state.

Sequencing

Like Synthesizer, the Sequencer interface extends both Transmitter and Receiver (and therefore MidiDevice). Sequencer adds methods for basic MIDI sequencing operations. A sequencer can load and play back a sequence, query and set the tempo, and control the master and slave sync modes. An application can register to be notified when the sequencer processes MetaEvents and controller events. (A controller event occurs when a MIDI controller, such as a pitch-bend wheel or a data slider, changes its value. These events are not MidiEvents, but are created when the Sequencer encounters certain ShortEvents in the Sequence.)

The Sequence object represents a MIDI sequence as one or more tracks and associated timing information. A track contains a list of time-stamped MIDI events. Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the Tracks.

A track contains a list of time-stamped MIDI events. Sequences can be read from MIDI files, or created from scratch and edited by adding Tracks to the Sequence (or removing them). Similarly, MidiEvents can be added to or removed from the Tracks.

It is not necessary to load a MIDI file into a Sequence object before playing the file. The setSequence(java.io.InputStream) method of Sequencer lets you read a MIDI file directly into a Sequencer, without creating a Sequence object first.

MidiSystem

MidiSystem acts as an application's entry point to the MIDI music system. It provides information about, and access to, the set of installed devices, including transmitters, receivers, synthesizers, and sequencers.

The MidiSystem class provides methods for reading MIDI files to create Sequence objects, and for writing Sequences to MIDI files. A MIDI Type 0 file contains only one track, while a Type 1 file may contain any number. MidiSystem also provides methods to create Soundbank objects by parsing soundbank files.

System configuration (SPI interfaces)

Configuration of the MIDI system is handled in the javax.sound.midi.spi package. The abstract classes in this package allow service providers to supply and install their own MIDI devices, MIDI file readers and writers, and soundbank file readers.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: mailto:javasound-comments@javamedia.eng.sun.com 		Sun
Java Software


Contents

CONTENTS | PREV | NEXT

Programmer's Guide to the Java 2DTM API

Enhanced Graphics and Imaging for Java

JavaTM 2 SDK, Standard Edition, 1.3 Version

November 19, 1999

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

6.3 Representing a New Color Space

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

4.7 Managing Multilingual Text Layout

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

2.9 Defining Custom Composition Rules

You can create an entirely new type of compositing operation by implementing the Composite and CompositeContext interfaces. A Composite object provides a CompositeContext object that actually holds the state and performs the compositing work. Multiple CompositeContext objects can be created from one Composite object to maintain the separate states in a multi-threaded environment.

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

4.8 Implementing a Custom Text Layout Mechanism

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

2.7 Setting the Clipping Path

To define a clipping path:

  1. Create a Shape that represents the area you want to render.
  2. Call Graphics2D.setClip to use the shape as the clipping path for the Graphics2D context.
To shrink the clipping path:

  1. Create a Shape that intersects the current clipping path.
  2. Call clip to change the clipping path to the intersection of the current clipping path and the new Shape.
In the following example, a clipping path is created from an ellipse and then modified by calling clip.

public void paint(Graphics g) {

  Graphics2D g2 = (Graphics2D) g;

// The width and height of the canvas

  int w = getSize().width;

  int h = getSize().height;

  // Create an ellipse and use it as the clipping path

  Ellipse2D e = new Ellipse2D.Float(w/4.0f,h/4.0f,

                                    w/2.0f,h/2.0f);

  g2.setClip(e);

  // Fill the canvas. Only the area within the clip is rendered

  g2.setColor(Color.cyan);

  g2.fillRect(0,0,w,h);

  // Change the clipping path, setting it to the intersection of

  // the current clip and a new rectangle.

  Rectangle r = new Rectangle(w/4+10,h/4+10,w/2-20,h/2-20);

  g2.clip(r);

  // Fill the canvas. Only the area within the new clip

  // is rendered

  g2.setColor(Color.magenta);

  g2.fillRect(0,0,w,h);

}

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

Preface

This preliminary draft replaces the previously released Java 2D White Paper and Programmer's Guide. As it is a work in progress, it may contain incomplete or inaccurate information. Where discrepancies exist between this document and the actual Java 2D classes and interfaces, please rely on the information in the .java and HTML reference files.

The code examples in this document have not all been tested. Please refer to the Java 2D demo application and code for validated sample code.

This guide describes the features provided by the Java 2D API and illustrates how you can use the Java 2D API classes to enhance your applications. This information is organized into eight chapters:

Overview --introduces the packages and key classes in the Java 2D API.
Getting Started with the Java 2D API--describes key concepts and illustrates how to perform basic operations with the Java 2D API, such as drawing and transforming 2D shapes, text, and images.
Graphics2D Context--describes the Java 2D API classes in the java.awt package and describes how to set up the Graphics2D context.
Geometries--describes the Java 2D API classes in the java.awt.geom package and describes how to define and manipulate 2D shapes and areas.
Text and Fonts--describes the Java 2D API classes in the java.awt.font package and describes how to specify and retrieve font information and display and manipulate international text.
Color--describes the Java 2D API classes in the java.awt.color package and color management.
Imaging--describes the Java 2D API classes in the java.awt.image, java.awt.image.codec, and java.awt.image.renderable packages and describes how to display and manipulate images and offscreen buffers.
Printing--describes the Java 2D API classes in the java.awt.print package and the Java 2D API printing model.

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

JavaTM 2D API Overview

Enhanced Graphics, Text, and Imaging

Rendering Model
Coordinate Systems
Transforms
Fonts
Images
Fills and Strokes
Composites

Backward Compatibility and Platform Independence
Backward Compatibility
Platform Independence

The Java 2D API Packages

Rendering with Graphics2D

Interfaces and Classes

Rendering Concepts
Rendering Process
Controlling Rendering Quality
Stroke Attributes
Fill Attributes
Clipping Paths
Transformations
Composite Attributes

Setting Up the Graphics2D Context
Setting Rendering Hints
Specifying Stroke Attributes
Specifying Fill Attributes
Setting the Clipping Path
Setting the Graphics2D Transform
Specifying a Composition Style

Rendering Graphics Primitives
Drawing a Shape
Filling a Shape
Rendering Text
Rendering Images

Defining Custom Composition Rules

Rendering in a Multi-Screen Environment

Geometries

Interfaces and Classes

Geometry Concepts
Constructive Area Geometry
Bounds and Hit Testing

Combining Areas to Create New Shapes

Creating a Custom Shape

Fonts and Text Layout

Interfaces and Classes

Font Concepts

Text Layout Concepts
Shaping Text
Ordering Text
Measuring and Positioning Text
Supporting Text Manipulation
Performing Text Layout in a Java Application

Managing Text Layout
Laying Out Text
Displaying Dual Carets
Moving the Caret
Hit Testing
Highlighting Selections
Querying Layout Metrics
Drawing Text Across Multiple Lines

Implementing a Custom Text Layout Mechanism

Creating Font Derivations

Imaging

Interfaces and Classes
Imaging Interfaces
Image Data Classes
Image Operation Classes
Sample Model Classes
Color Model Classes
Exception Classes

Immediate Mode Imaging Concepts
Terminology

Using BufferedImages
Creating a BufferedImage
Drawing in an Offscreen Buffer
Manipulating BufferedImage Data Directly
Filtering a BufferedImage
Rendering a BufferedImage

Managing and Manipulating Rasters
Creating a Raster
Parent and Child Rasters
Operations on a Raster
The WritableRaster Subclass

Image Data and DataBuffers

Extracting Pixel Data from a SampleModel

ColorModels and Color Data
Lookup Table

Image Processing and Enhancement
Using an Image Processing Operation

Color

Classes

Color Concepts
Describing Colors
Mapping Colors through sRGB and CIEXYZ

Printing

Interfaces and Classes

Printing Concepts
Supporting Printing
Page Painters
Printable Jobs and Pageable Jobs
Typical Life-Cycle of a PrinterJob
Dialogs

Printing with Printables
Using Graphics2D for Rendering

Printing with Pageables and Books
Using a Pageable Job
Using Multiple Page Painters

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2D API

CONTENTS | PREV | NEXT Java 2D API

2.8 Compositing Images

A Graphics2D context includes a Composite object that encapsulates the composition style to use if objects overlap. AlphaComposite implements a number of common composition rules that support blending and transparency effects. The most commonly used is SRC_OVER.

2.8.1 Using the Source Over Composition Rule

The SRC_OVER composition rule composites the source pixel over the destination pixel so that the shared pixel takes the color of the source pixel. For example, if you render a blue rectangle and then render a red rectangle that partially overlaps it, the overlapping area will be red. In other words, the object that is rendered last will appear to be on top.

To use the SRC_OVER composition rule:

  1. Create an AlphaComposite object by calling getInstance and specifying the SRC_OVER rule.
AlphaComposite ac =
AlphaComposite.getInstance(AlphaComposite.SRC_OVER);
  1. Call setComposite to add the AlphaComposite object to the Graphics2D context.
g2.setComposite(ac);
Once the composite object is set, overlapping objects will be rendered using the specified composition rule.

2.8.2 Increasing the Transparency of Composited Objects

AlphaComposite allows you to specify an additional constant alpha value that is multiplied with the alpha of the source pixels to increase transparency.

For example, to create an AlphaComposite object that renders the source object 50% transparent, specify an alpha of .5:

AlphaComposite ac =
AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f);
In the following example, a source over alpha composite object is created with an alpha of .5 and added to the graphics context, causing subsequent shapes to be rendered 50% transparent.

public void paint(Graphics g) {

  Graphics2D g2 = (Graphics2D) g;

  g2.setColor(Color.red);

  g2.translate(100,50);

  // radians=degree * pie / 180

  g2.rotate((45*java.lang.Math.PI)/180);

  g2.fillRect(0,0,100,100);

  g2.setTransform(new AffineTransform());  // set to identity

  // Create a new alpha composite

  AlphaComposite ac =

      AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.5f);

  g2.setComposite(ac);

  g2.setColor(Color.green);

  g2.fillRect(50,0,100,100);

  g2.setColor(Color.blue);

  g2.fillRect(125,75,100,100);

  g2.setColor(Color.yellow);

  g2.fillRect(50,125,100,100);

  g2.setColor(Color.pink);

  g2.fillRect(-25,75,100,100);

}

CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.


Actions

 Other Swing Changes

API for Adding Actions to ActionEvent Sources

Background

Swing provides an implementation of the Command pattern which helps application developer centralize functionality which can be accessed from multiple places in the GUI. The Action interface is used to provide a stateful ActionListener which can provide the implementation of functionality accessed for example from the toolbar, a menu item, and a keyboard binding. As the state of the Action changes, for instance when it becomes disabled, the associated controls change their state accordingly (they also become disabled).

The Problem

For Actions to work as intended, the following connections need to be made (assume the Action has already been created):
  1. The control needs to be created
  2. The Action is added as an ActionListener on the control
  3. A PropertyChangeListener is created which describes how the control should be updated in response to PropertyChangeEvents on the Action
  4. The PropertyChangeListener is added as a listener on the Action.
  5. Information about the linkage may need to be retained so it can be undone to allow garbage collection (in 1.2 this can be automatically handled with WeakRefs).
Since a typical application may have between 5 and 25 Actions, and 2-3 controls per Action, the steps above need to be done up to 75 times!

In order to relieve the developer of much of this burden, we have provided a way to have this done automatically, through helper methods on potential Containers of Actions. The three places where this is surfaced in Swing at present are:

JToolBar.java | public JButton add(Action a)
JMenu.java | public JMenuItem add(Action a)
JPopupMenu.java | public JMenuItem add(Action a)

The problems with this approach are several:

  1. It is highly problematic for Builders, since it overloads Container.add() to allow a non-Component parameter which is not itself the thing that ends up being added.
  2. Developers cannot participate in the configuration of the controls created without subclassing the container classes
  3. Even if they do subclass, the granularity of the configuration ends up being per-Container instead of per-control added.
  4. It limits developers to the expected control for each Container rather than allowing the full range of ActionEvent sources which Action permits.

Solution

Many developers have commented that they would prefer to create their own controls which are ActionEvent sources and then have a method which connects them to a particular Action. The solution is along these lines, and addresses the deficiencies listed above.

The added API is initially added to AbstractButton, which defines the abstract superclass of JButton, JMenuItem, JMenu, JCheckBox, etc.

The new public methods are as follows:

  • public void setAction(Action a)
  • public Action getAction()
  • protected void configurePropertiesFromAction(Action a)
  • protected PropertyChangeListener createActionPropertyChangeListener()
In addition, constructors have been added to the ActionEvent sources which will allow for creating a control directly with the supplied Action.

In JButton:

  • public JButton(Action a)
Equivalent constructors have been added to:
  • JCheckBox
  • JRadioButton
  • JToggleButton
  • JMenuItem
  • JMenu
  • JCheckBoxMenuItem
  • JRadioButtonMenuItem
Notes:
  • setAction is merely a helper method which performs the linkage steps described above as a convenience to the developer.
  • It is not expected that developers will often switch the Action for a control on the fly. However, it is possible for them to do so, using setAction since it replaces the previously set action and fires a PropertyChangeEvent.
  • This does not replace the standard method of adding ActionListeners, note that it uses addActionListener() as stated above
  • The current Container apis listed above will be reimplemented in terms of setAction, so that they give the same behavior as they did previously. This solution will make that code much easier to maintain!
  • The methods configurePropertiesFromAction and createActionPropertyChangeListener will be overridden in subclasses to provide the expected default behavior.

createAction Factory Methods for JToolBar, JPopupMenu, JMenu

New factory methods allow one to control what toolbars and menus create when an action is added directly, i.e. with the add method.

Addition to JToolBar:

  • protected JButton createActionComponent(Action a)
Addition to JPopupMenu:
  • protected JMenuItem createActionComponent(Action a)
Addition to JMenu:
  • protected JMenuItem createActionComponent(Action a)

New Action Constants

See:
  • public static final String ACCELERATOR_KEY
  • public static final String MNEMONIC_KEY

Add AbstractAction getKeys Method

This new method is needed for serialization of Abstract Actions, and gives the developer a way to find out which keys have been set for the AbstractAction.

See:

  • public Object[] getKeys()

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Borders

 Other Swing Changes

New BorderFactory Methods

BorderFactory previously did not provide methods to create a raised etched border. It only provided a method to create a lowered border. To be consistent with the rest of the class the following methods have been added to BorderFactory:

See:

  • public static Border createEtchedBorder(int type)
  • public static Border createEtchedBorder(int type, Color highlight, Color shadow)

New LineBorder Constructor

LineBorder allows for rounded corners. Unfortunately this property previously could not be set in anyway, short of subclassing. To allow developers to create LineBorders with rounded corners, a new constructor has been added.

See:

  • public LineBorder(Color color, int thickness, boolean roundedCorners)

Move MetalUtils.TableHeaderBorder into MetalBorders

This border was inconsistently placed in the package private class plaf.metal.MetalUtils. Since it now needs to be public for access from the Proxy, it has been moved to javax.swing.plaf.metal.MetalBorders and made public:

See:

  • TableHeaderBorder

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


I18N - New GlyphView.GlyphPainter Method getNextVisualPositionFrom

 Other Swing Changes

I18N - New GlyphView.GlyphPainter Method getNextVisualPositionFrom

Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.

See:

  • public int getNextVisualPositionFrom( GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) throws BadLocationException

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Input Verification

 Other Swing Changes

New class InputVerifier

The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields. Such GUIs often need to ensure that the text entered by the user is valid (for example, that it's in the proper format) before allowing the user to navigate out of the text field. To do this, clients create a subclass of InputVerifier and, using JComponent's setInputVerifier method, attach an instance of their subclass to the JComponent whose input they want to validate. Before focus is transfered to another Swing component that requests it, the input verifier's shouldYieldFocus method is called. Focus is transfered only if that method returns true.

Sometimes a component, such as a Cancel button or a scroll bar, should receive the focus even if input is invalid. To enable this, invoke setVerifyInputWhenFocusTarget(false) on the component.

The API change consists of a new abstract class, InputVerifier, and four new methods added to JComponent.

See:

  • javax.swing.InputVerifier

New methods in JComponent:

  • public void setInputVerifier(InputVerifier inputVerifier)
  • public InputVerifier getInputVerifier()
  • public void setVerifyInputWhenFocusTarget(boolean flag)
  • public boolean getVerifyInputWhenFocusTarget()

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Internal Frames

Java

Internal Frames:
JInternalFrame, JDesktopPane, and Related Classes

 Other Swing Changes

Internal Frames Invisible By Default

In v 1.2 internal frames were visible by default; now they start out invisible. To make a JInternalFrame appear onscreen, use this code:
      anInternalFrame.setVisible(true);

Why the change? The rule for default visibility in Swing is that only top-level components, such as JFrame and JDialog, have default visibility false; the remaining components have default visibility true. This is so that once a JFrame is constructed, one call to setVisible(true) on the JFrame will show it and all of its contents.

Although JInternalFrame is not really a top-level component, it needs to behave like a JFrame in many ways. In particular, it needs to fire JInternalFrame events corresponding to Window events on JFrames. One such event, INTERNAL_FRAME_OPENED, is fired in response to the initial visibility change from false to true; with no such change prior to version 1.3, the event wasn't being fired.

To fix this bug, and to make JInternalFrame more compatible with its heavyweight cousin JFrame, the default visibility of JInternalFrame changed to false beginning with version 1.3 of the Java 2 Platform. Therefore, to show an internal frame, just call setVisible(true) after adding the frame to its parent.

Added JInternalFrame setLayer(int layer) Method

JInternalFrame's setLayer() method takes an int, so that the beans introspector recognizes this as a property.

See:

  • public void setLayer(int layer)

Added protected BasicInternalFrameUI.uninstallListeners() Method

Previously BasicInternalFrameTitlePane did not remove its listeners when no longer needed (thus becoming a memory leak). This behavior is now provided.

See:

  • protected void uninstallListeners()
  • protected void installListeners()

JInternalFrame "closed" Property

  1. The default setting for defaultCloseOperation has been changed from HIDE_ON_CLOSE to DISPOSE_ON_CLOSE. This change is provided so that clients who want to use only the vetoable property mechanism (which is the simplest, and which we encourage) can just do so, without having to set defaultCloseOperation.
  2. JInternalFrame's doDefaultCloseAction method has been changed from private to public. This is because the UI has to be able to invoke it. In the past, the UI just invoked JInternalFrame's public setClosed method, which called doDefaultCloseAction. But setClosed is used for programmatically closing frames, and thus should not call doDefaultCloseAction, because defaultCloseOperation is defined only for user-initiated close operations.

See:

  • public void doDefaultCloseAction()

JInternalFrame Normal Bounds

Getting the normal dimensions of an internal frame is now possible through a new method to JInternalFrame: getNormalBounds()

See:

  • public Rectangle getNormalBounds()
  • public void setNormalBounds(Rectangle r)

Added getFocusOwner Method to JInternalFrame

New method for JInternalFrame:
  • public Component getFocusOwner()

Added getInternalFrame method to InternalFrameEvent

New method to InternalFrameEvent:
  • public JInternalFrame getInternalFrame()

MetalInternalFrameTitlePane Class is now public

See:

  • MetalInternalFrameTitlePane

Added restoreSubcomponentFocus Method to JInternalFrame

New method to JInternalFrame:
  • public void restoreSubcomponentFocus()

Added setDragMode Method to JDesktopPane

New method to JDesktopPane:
  • public void setDragMode(int dragMode)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JButton, JCheckBox, JRadioButton

Other Swing Changes

New JCheckBox borderPaintedFlat Property

JCheckBox is often used as a cell renderer in tables and lists. The specifications for the Java Look and Feel (codenamed Metal) and the Windows Look and Feel specify that the check box be rendered with a 2D flat border rather than a 3D border when used as a cell renderer. The borderPaintedFlat property has been added to enable this behavior.

See:

  • public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY
  • public void setBorderPaintedFlat(boolean b)
  • public boolean isBorderPaintedFlat()

Add DefaultButtonModel getGroup Method

This was an oversite of the original implementation. Unfortunately, since ButtonModel is an interface, this property cannot be added to it. It has instead been added to DefaultButtonModel, which should help most developers who want this.

See:

  • public ButtonGroup getGroup()

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JFileChooser

 Other Swing Changes

New JFileChooser isAcceptAllFileFilterUsed Property

This property allows control of the AcceptAll (*.*) file filter, which is added to the choosable file filters combo box by default.

See:

  • public static final String ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY
  • public void setAcceptAllFileFilterUsed(boolean b)
  • public boolean isAcceptAllFileFilterUsed()

Support for removing the OK and Cancel Buttons

The normal way to bring a JFileChooser is with the dialog creation utilities. However, since a JFileChooser is a JComponent, it can just as easily be embedded in a container. When this is done, it will oftentimes be the case that the developer will want control of any control buttons (ok, cancel, other) and not want the default Accept and Cancel buttons to appear. The following property will allow the developer to specify if the control buttons should be shown or not by the file chooser.

See:

  • public boolean getControlButtonsAreShown()
  • public void setControlButtonsAreShown(boolean b)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JFrame

 Other Swing Changes

Add EXIT_ON_CLOSE defaultCloseOperation Constant

JFrame provides the setDefaultCloseOperation method which can be used to configure the default action when a JFrame is closed. For single framed applications it often the case that closing the frame will exit the application. Previously, developers had to add a WindowListener and do this themselves. To make this common case easier for developers to accomplish, a constant has been added to JFrame that specifies when the frame closes the application should exit: See:
  • public static final int EXIT_ON_CLOSE

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JSplitPane

 Other Swing Changes

New JSplitPane resizeWeight Property

When the size of a JSplitPane changes, the extra space is added to the right/bottom component. This gives the effect of the left/top component being fixed.

The methods get/setResizeWeight(double) have been added. The resizeWeight property indicates how to distribute extra space. The left/top component will get resizeWeight * delta extra space, with the right/bottom component getting (1 - resizeWeight) * delta extra space.

See:

  • public final static String RESIZE_WEIGHT_PROPERTY
  • public void setResizeWeight(double value)
  • public double getResizeWeight()

JSplitPane dividerLocation Property Now Bound

The dividerLocation property is bound in JSplitPane.

See:

  • public static final String DIVIDER_LOCATION_PROPERTY

BasicSplitPaneDivider Border

JSplitPane has a unique border. That is, the border is drawn around both the components, and then drawn around the divider. Previously, one Border was responsible for all this. The problem with this approach is that there is no way to specify the border size drawn around the divider. It also made laying the components out rather tricky.

There is now a Border on the Divider (BasicSplitPaneDivider). As a result, setDividerSize now needs to take into account the border size, which is usually an extra 2 pixels, that is developers used to do setDividerSize(5), but now it will need to be setDividerSize(7) (unless a developer installs a new UI with a different border size).

The javadoc for JSplitPane also mentioned if the size of one the components was changed, an attempt would be made to position the divider correctly. This lead to all sorts of problems, and is no longer supported. Instead, setDividerLocation should be used.

See:

In BasicSplitPaneUI

  • protected int getDividerBorderSize() //deprecated

In BasicSplitPaneDivider

  • public void setBorder(Border border)
  • public Border getBorder()

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JTabbedPane

 Other Swing Changes

Added JTabbedPane toolTipTextAt Indexed Property

This property makes it possible to associate a tooltip with a tab, after the tab has been added.

See:

  • public void setToolTipTextAt(int index, String toolTipText)
  • public String getToolTipTextAt(int index)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JTable

 Other Swing Changes
As a result of JTable changes, code written for v 1.2 or for JFC/Swing 1.1 might have the following problems when run in v 1.3:
  • Since the TableColumn getHeaderRenderer method now returns null by default, you can't use that method to get the default header renderer. Instead, change your code to use the JTableHeader getDefaultRenderer method. See How to Use Tables in The Java Tutorial for an example.
  • Because JTable's default text editor is now smarter about data types, it now gives setValueAt objects of the appropriate type, instead of always specifying strings. For example, if setValueAt is invoked for an Integer cell, then the value is specified as an Integer instead of a String. If you implemented a table model, then you might have to change its setValueAt method to take the new data type into account. If you implemented a class used as a data type for cells, make sure that your class has a constructor that takes a single String argument.

Column and Row Layout Improvements

We made the following changes:

  • Improved performance in tables with large numbers of columns
    Moving the header renderers from the columns themselves to the table header represents the most significant change to performance and footprint by sharing similar header renderers on a per-table basis.
  • Dynamic changing of individual row height
    The rendering machinery in the JTable has been substantially overhauled in this release to enable this much sought after feature in the JTable.
  • Simplified creation of non-standard editor components
    The AbstractCellEditor class has been included in response to continued feedback on the difficulty of creating non-standard editor components.
  • Better handling of inter-cell spacing
    Previously JTable did not correctly implement its specification for inter-cell spacing. Changes in the inter-cell spacing affected a number of other properties including the overall height of the table. In v 1.3, the inter-cell spacing has only one effect: to provide an inset for the cells, where the inset is the amount that renderers and editors are shrunk to accommodate the spacing between the cells.

For more information, see the API documentation for the following methods and fields. Note that "obsolete" means that you should avoid using the obsolete API, but that using the API isn't dangerous enough to warrant a compile-time warning. "Deprecated" API, on the other hand, is not only obsolete but also results in a compile-time warning.

In JTable

  • public void removeNotify()
  • protected void unconfigureEnclosingScrollPane()
  • public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
  • protected boolean cellSelectionEnabled // obsolete
  • public void setRowHeight(int row, int height)
  • public int getRowHeight(int row)

In JTableHeader

  • protected boolean updateTableInRealTime // obsolete
  • public boolean getUpdateTableInRealTime() // obsolete
  • public void setUpdateTableInRealTime(boolean flag) // obsolete
  • public void setDefaultRenderer(TableCellRenderer defaultRenderer)
  • public TableCellRenderer getDefaultRenderer()
  • protected TableCellRenderer createDefaultRenderer()

In TableColumn

  • public final static String COLUMN_WIDTH_PROPERTY; // obsolete
  • public final static String HEADER_VALUE_PROPERTY; // obsolete
  • public final static String HEADER_RENDERER_PROPERTY // obsolete
  • public final static String CELL_RENDERER_PROPERTY // obsolete
  • protected TableCellRenderer createDefaultHeaderRenderer()
  • transient protected int resizedPostingDisableCount // deprecated
  • public void disableResizedPosting() // deprecated
  • public void enableResizedPosting() //deprecated

New Class: javax.swing.AbstractCellEditor

Existing Class DefaultCellEditor now extends AbstractCellEditor

New SizeSequence Utility Class

Before this release the height of rows in a JTable was always fixed. Introducing variable height rows whilst retaining the scalability requirements of the JTable (no O(N) behavior on rows) has required this new class and we have made it public as we think it may be generally useful. Indeed, table columns and the variable height rows of a JList might both use this class in the future to improve performance.

See: javax.swing.SizeSequence

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JToolBar

 Other Swing Changes

Support for Specifying the Title of an Undocked ToolBar

See:

  • public JToolBar(String name)
  • public JToolBar(String name , int orientation)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


JTree

 Other Swing Changes

New JTree toggleClickCount Property

JTree now provides a property for configuring how many mouse clicks are needed to expand/collapse a node. See:

  • public final static String TOGGLE_CLICK_COUNT_PROPERTY
  • protected int toggleClickCount
  • public void setToggleClickCount(int clickCount)
  • public int getToggleClickCount()

New JTree Properties: Anchor, LeadSelectionPath

The TreeSelectionModel maintains a set of selected paths. Most UIs also provide the notion of the lead path and the anchor path. The anchor path is used for gestures that extend the selection, and the lead is usually the path that was last added to the selection. The lead may also be manipulated independently such that it isn't always selected. Motif does this, as do the control modifiers with the Java Look and Feel (aka Metal). Support for this was previously added in a private manner such that developers were not able to determine what the anchor/lead were. The new API will expose this to developers so that they can get the lead/anchor as well as programmatically modify it. Exposing methods will also make it so that developers are free to override the behavior in any way they see fit.

See:

  • public final static String LEAD_SELECTION_PATH_PROPERTY
  • public final static String ANCHOR_SELECTION_PATH_PROPERTY
  • public void setLeadSelectionPath(TreePath newPath)
  • public void setAnchorSelectionPath(TreePath newPath)
  • public TreePath getLeadSelectionPath()
  • public TreePath getAnchorSelectionPath()

Exposed DefaultTreeCellRenderer.hasFocus as a Protected Field

DefaultTreeCellRenderer exposes almost all of the arguments passed in via the getTreeCellRendererComponent method as protected instance variables. This makes it easy for a subclass that wishes to only change painting, as the subclass only has to override paint, and not getTreeCellRendererComponent to track all the arguments themselves. The hasFocus argument (last argument) was private. The hasFocus instance variable is now protected vs private.

In javax.swing.tree.DefaultTreeCellRenderer see:

  • protected boolean hasFocus

Added TreeSelectionEvent.isAddedPath()

TreeSelectionEvent encapsulates the delta of how the TreeSelectionModel changed. That is, it will contain any paths that have been added to the selection, as well as paths that have been removed. To determine if a particular path is new to the selection model the isAddedPath(TreePath) method is provided. The valueChanged(TreeSelectionEvent) listener method usually takes the form of:

TreePath[] paths = event.getPaths();
for (int counter = paths.length - 1; counter >= 0; counter--) {
    if (event.isAddedPath(paths[counter])) ...
}

TreeSelectionEvent.isAddedPath(TreePath) has to iterate through the TreePaths to determine the index of the TreePath in its internal TreePath array, and then map that to a boolean to determine if it is a new path. To avoid the step of isAddedPath(TreePath) iterating through its TreePath array, isAddedPath(int) has been added.

In javax.swing.event.TreeSelectionEvent see:

  • public boolean isAddedPath(int index)

New JTree expandsSelectedPaths Property and removeDescendantSelectedPaths Method

When the selection is programatically changed in a JTree, the selected items are made visible (visible meaning all the parent items are expanded). For certain applications this behavior is not desirable, eg say all nodes of a certain type should be selected regardless of their visibility. This behavior is implemented across JTree and BasicTreeUI, making it tricky to override this behavior. The public methods get/setExpandsSelectedPaths have been added to JTree. If set to false, when the selection changes the nodes are not made visible, the default is true.

The protected method removeDescendantSelectedPaths has also been added. This method is called whenever a node is removed/collapsed to remove any descendant selected paths. This provides a simple place for subclassers to override should they not want the selection to change when a node is removed/collapsed.

See:

  • public final static String EXPANDS_SELECTED_PATHS_PROPERTY
  • public void setExpandsSelectedPaths(boolean newValue)
  • public boolean getExpandsSelectedPaths()
  • protected void removeDescendantSelectedPaths(TreePath path, boolean includePath)

DefaultTreeSelectionModel.insureUniqueness now Obsolete

DefaultTreeSelectionModel has the protected method insureUniqueness. It would go through an array of TreePaths making sure there were no duplicates. The implementation has changed such that a Hashtable is used and this method is no longer needed, it has marked obsolete. The implementation is now empty, but still invoked as before.

Here's the API and spec for the changes to javax.swing.tree.DefaultTreeSelectionModel

    /**
     * This method is obsolete and its implementation is now a noop. It's
     * still called by setSelectionPaths and addSelectionPaths, but only
     * for backwards compatibility.
     */
    protected void insureUniqueness()

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Keyboard Binding

 Other Swing Changes

New Keyboard Binding Infrastructure

The new keyboard binding infrastructure unifies and replaces the two previously existing schemes for binding user input (for example, Control-S) to program actions (for example, saving a file). The Swing Connection article Keyboard Bindings in Swing has details about the old and new keyboard binding schemes, including example code.

The API changes for the new infrastructure center around two new classes -- ActionMap and InputMap. Other changes include new methods in JComponent, LookAndFeel, and SwingUtilities, as well as a few new special-purpose classes that descend from ActionMap and InputMap.

See:

  • javax.swing.ActionMap
  • javax.swing.InputMap
  • javax.swing.ComponentInputMap
  • javax.swing.plaf.ActionMapUIResource
  • javax.swing.plaf.InputMapUIResource
  • javax.swing.plaf.ComponentInputMapUIResource

New methods in JComponent:

  • public ActionMap getActionMap()
  • public InputMap getInputMap()
  • public InputMap getInputMap(int condition)
  • public void setActionMap(ActionMap map)
  • public void setInputMap(int condition, InputMap map)

New methods in LookAndFeel:

  • public static void loadKeyBindings(InputMap retMap, Object[] keys)
  • public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys)
  • public static InputMap makeInputMap(Object[] keys)

New methods in SwingUtilities:

  • public static InputMap getUIInputMap(JComponent component, int condition)
  • public static void replaceUIInputMap(JComponent component, int condition, InputMap map)
  • public static ActionMap getUIActionMap(JComponent component)
  • public static void replaceUIActionMap(JComponent component, ActionMap map)

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Listener Lists

 Other Swing Changes

Expose Listener Lists: Add getListeners Method

A getListeners() method has been added to the following classes.

  • javax.swing.Timer
  • javax.swing.AbstractListModel
  • javax.swing.DefaultBoundedRangeModel
  • javax.swing.DefaultButtonModel
  • javax.swing.DefaultListSelectionModel
  • javax.swing.DefaultSingleSelectionModel DefaultSingleSelectionModel
  • javax.swing.table.AbstractTableModel
  • javax.swing.table.DefaultTableColumnModel
  • javax.swing.tree.DefaultTreeModel
  • javax.swing.tree.DefaultTreeSelectionModel
  • javax.swing.text.AbstractDocument
  • javax.swing.text.DefaultCaret
  • javax.swing.event.EventListenerList

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Menus

Java

JMenu, JMenuBar and related classes

 Other Swing Changes

JMenu getPopupMenuOrigin method now protected

  • protected Point getPopupMenuOrigin()

BasicMenuItemUI installComponents, uninstallComponents methods now protected

  • protected void installComponents(JMenuItem menuItem)
  • protected void uninstallComponents(JMenuItem menuItem)

Added isPopupTrigger Method to JPopupMenu

  • public boolean isPopupTrigger(MouseEvent e)

And similarly to javax.swing.plaf.PopupMenuUI:

  • public boolean isPopupTrigger(MouseEvent e)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Performance

 Other Swing Changes

New Class: UIDefaults.UIDefaultProxy, Related Performance Changes

One of the main reasons that Swing's startup performance was slower than desired was that as soon as any component requires a UI delegate, the UIManager loads a look and feel, which results in loading a defaults table which includes defaults for UIs for all component classes.

In previous releases, we mistakenly believed that instance creation should be avoided, and so we delayed instance creation by creating anonymous implementations of LazyValue, an interface which acts as a lightweight proxy that only creates its instance the first time it is retrieved from the defaults table.

Performance analysis for Kestrel indicates that we were wrong in believing that instance creation was the determining factor. In fact, the overwhelming factor contributing to delay and increased footprint in this area was classloading, which was ironically not helped by our creation of lots of anonymous interface implementations!

The general approach taken to fix this was to define a concrete LazyValue implementation in UIDefaults.java which uses reflection to create its proxied instance when asked to do so. This class is called UIDefaultProxy. As a result only one class is loaded, and about 90 other classloads could be avoided in a Hello World example.

See: UIDefaults.UIDefaultProxy

In the course of replacing the existing anonymous LazyValue implementations and identifying other classloads that could be avoided, we came across several classes and accessor methods which were incorrectly package private. Since the UIDefaultProxy is in the javax.swing package, and most of the uses are in javax.swing.plaf.* packages, these signatures needed to be changed so that they could be used by the proxy.

The following is a list of these:

javax.swing.plaf.basic.BasicBorders

  • public static Border getSplitPaneDividerBorder()
javax.swing.plaf.metal.MetalBorders
  • public static class PaletteBorder
  • public static Border getButtonBorder()
  • public static Border getTextBorder()
  • public static Border getTextFieldBorder()
  • static class ToggleButtonBorder extends ButtonBorder
  • public static Border getToggleButtonBorder()
  • public static Border getDesktopIconBorder()
javax.swing.plaf.metal.MetalIconFactory
  • public static Icon getCheckBoxIcon()
  • public static class PaletteCloseIcon implements Icon, UIResource, Serializable

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Printing

 Other Swing Changes

New JComponent methods: printBorder, printComponent, printChildren

JComponent previously did not override print. This meant that printing was no different than painting, resulting in the double buffer being used. This is not the desired behavior. It also makes it harder for developers to add customized printing logic. In most cases the developer would resort to completely replacing print, rewriting all the code to notify the children. This is not desirable. To be consistant with the painting methods, methods printBorder, printChildren and printComponent have been added, all of which are protected.

See:

  • protected void printComponent(Graphics g)
  • protected void printChildren(Graphics g)
  • protected void printBorder(Graphics g)

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Scrolling

Java

Scrolling: JViewport, JScrollPane, and Related Classes

 Other Swing Changes

New JViewport scrollMode Property

Interactive scrolling speed has proven to be perhaps the most important factor in users perception of overall swing performance. 1.3 adds a new optimization, called "BLIT_SCROLL_MODE" (now the default) that copies unobscured areas of the components heavy weight ancestor to effect a scroll. Previously we had offered a related optimzation that managed a per viewport backing store image. Although still supported, the backingStoreEnabled property has been deprecated.

See:

  • public static final int BLIT_SCROLL_MODE
  • public static final int BACKINGSTORE_SCROLL_MODE
  • public static final int SIMPLE_SCROLL_MODE
  • public void setScrollMode(int mode)
  • public int getScrollMode()
  • protected boolean backingStore // Deprecated
  • public boolean isBackingStoreEnabled() // Deprecated
  • public void setBackingStoreEnabled(boolean enabled) // Deprecated

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Swing Changes and New Features

Java

Swing Changes and New Features for JavaTM 2 SDK, Standard Edition, v 1.3

 Project Swing
  • JTree
  • JTable
  • JSplitPane
  • JFileChooser
  • JButton, JCheckBox, JRadioButton
  • Internal Frames: JInternalFrame, JDesktopPane, and related classes
  • JTabbedPane
  • Text
  • Scrolling: JViewport, JScrollPane, and related classes
  • Printing
  • Input Verification
  • Keyboard Binding
  • I18N- New GlyphView.GlyphPainter Method getNextVisualPositionFrom
  • Borders
  • Actions
  • JToolBar
  • Menus: JMenu, JMenuBar, and related classes
  • JFrame
  • Listener Lists
  • Performance

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Text

 Other Swing Changes

Default HTML Font Is Now Serif

HTML text -- including HTML text used in labels, buttons, and so on -- used to be in SansSerif font by default. As of v 1.3, the default font is Serif.

HTMLEditorKit insertAtBoundry => insertAtBoundary

A method in HTMLEditorKit.InsertHTMLTextAction, insertAtBoundry, was misspelled. It's been deprecated and insertAtBoundary has been added.

Automatic Handling of DocumentEvents

The default functionality of managing the DocumentEvent has been moved (from CompositeView) and raised from package private to public. Subclassing has been made much easier as the management of the DocumentEvent is now distributed to the protected methods:

  • updateChildren
  • forwardUpdate
  • forwardUpdateToView
  • updateLayout

To accomplish its behavior, the methods managing the children of the view also needed to be moved from CompositeView to View.

  • removeAll
  • remove
  • append
  • replace

The following methods were added to the javax.swing.text.View:

  • protected boolean updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory f)
  • protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
  • protected void forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f)
  • protected void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
  • public void removeAll()
  • public void remove(int i)
  • public void insert(int offs, View v)
  • public void append(View v)
  • public void replace(int offset, int length, View[] views)

BoxView: Add axis property, layoutChanged Method

BoxView has an axis argument which subclasses previously could not get at. A subclass that sets it's axis based upon i18n considerations needs this as a property. The layout of the box should also be treated seperate from the requested size as in some cases (such as a table) the layout may become invalid independant of the children's preferences.

The following methods have been added to javax.swing.text.BoxView:

  • public int getAxis()
  • public void setAxis(int axis)
  • public void layoutChanged(int axis)

ParagraphView now extends FlowView

The View protocol supports building flows, but the only previous implementation had been ParagraphView which creates relatively simple paragraph flows. The functionality can be generalized substantially to do things like shaped flows, page breaking, etc. Generalizing the functionality will make the creation of alternative flows much easier.

A new class called FlowView takes a strategy to translate the logical structure to a physical structure. The strategy is defined by a nested static class called FlowStrategy. ParagraphView extends FlowView adding just that behavior which is paragraph-specific (i.e line spacing, first line indent, alignment, etc). This change adds the following method to the javax.swing.text.View class:

  • public int getViewIndex(int pos, Position.Bias b)

FormView Localization; SUBMIT, RESET deprecated

Class javax.swing.text.html.FormView was not previously localizable. There are two public static final Strings, SUBMIT and RESET, that are used to determine the text for <form> elements in an HTML document. As they are public static final they can not be localized. SUBMIT and RESET have been deprecated, the values are now obtained from the UIManager properties: FormView.submitButtonText and FormView.resetButtonText.

Serialization

Here's a summary of the serialization related changes in the swing.text package:
  • javax.swing.text.html.parser.ParserDelegator now implements Serializable.
  • Added a nullary constructor to the public static innner class HTML.Tag to allow serialization of subclasses to work.

HTML Package: Expose More of AbstractWriter

AbstractWriter is used as a base class for developers wishing to provide custom writing out of a text Document. For example, HTMLWriter extends AbstractWriter, and is used in the html package to output html. The problem with AbstractWriter was that most of the methods and ivars it provided were private. Subclasses had to resort to copying numerous methods and ivars to be useful. HTMLWriter extends AbstractWriter, but ended up copying all the ivars, and overriding almost all the methods. The following changes open up the API in AbstractWriter, making it more useful by itself. This makes HTMLWriter much simpler, and it won't have to copy as much from AbstractWriter.

See:

  • public int getStartOffset()
  • public int getEndOffset()
  • protected Writer getWriter()
  • protected int getLineLength()
  • protected void setCurrentLineLength(int length)
  • protected int getCurrentLineLength()
  • protected boolean isLineEmpty()
  • protected void setCanWrapLines(boolean newValue)
  • protected boolean getCanWrapLines()
  • public void setLineSeparator(String value)
  • public String getLineSeparator()
  • protected int getIndentLevel()
  • protected void writeLineSeparator() throws IOException
  • protected void write(char[] chars, int startIndex, int length) throws IOException
  • protected void output(char[] content, int start, int length) throws IOException

HTML Package: Expose More CSS1 Support

The html package supports CSS 1. One of the abilities of CSS is to support cascading of style sheets (as the name implies), that is more than one style sheet can influence the presentation simultaneously. For example a browser usually has a style sheet that defines the default styles, a particular page might also have a style sheet that overrides those provided by the browser. The following methods expose this to developers, allowing them to link style sheets:

  • public synchronized void addStyleSheet(StyleSheet ss)
  • public synchronized void removeStyleSheet(StyleSheet ss)
  • public StyleSheet[] getStyleSheets()

Simplify HTML Insertions

Previously it was not very easy for developers to insert arbitrary html into an existing html document. To accomplish this, the developer needed to have an intimate knowledge of the swing text package, as well as the html package. Many developers have used dynamic html, which provides a handful of methods that make it trivial to insert html into an existing page. To accomodate these users we now expose methods that closely mirror those provided by dynamic html:
  • public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException
  • public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException
  • public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException
  • public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException
  • public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException
  • public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException
  • public Element getElement(String id)
  • public Element getElement(Element e, Object attribute, Object value)

And this is constant has been added to class HTMLEditorKit.ParserCallback:

  • public static final Object IMPLIED

New text Package ZoneView class

Problem:
The swing text package uses View objects to represent a presentation of the document model for the sake of layout and rendering. If the model is large, the number of view objects that get created is large, in spite of only being able to view a small number of them. A View implementation is needed that defers creation of the objects until they are actually needed for display. This can be done by building zones with an estimated size that get replaced with the actual View objects when they are needed. This can substantially reduce the amount of memory used for large documents.

Solution:
The following class called ZoneView supports zones that don't consume much memory until actively viewed or edited. WrappedPlainView which will become more heavyweight with its support of bidi for i18n will benefit substantially from this class by changing it's superclass from BoxView to ZoneView (which is a BoxView).

See:

  • javax.swing.text.ZoneView

New text Package AsyncBoxView class

Problem:
The swing text package uses View objects to represent a view of the document model to handle layout and rendering. Layout is done on the event handling thread like most other things. Layout is sometimes quite expensive in terms of cpu time, and causes the user interface to freeze while performing layout. The text package has some support of concurrency however, so this should be extended to include performing layout asynchronous to the gui event handling thread. A View implementation is needed that performs layout asynchronously.

Solution:
To address this need, the following classes are being added to the text package. For more information visit The Swing Connection.

  • javax.swing.text.AsyncBoxView
  • javax.swing.text.LayoutQueue

Add getGraphics Method to text View Class

A method is included on the javax.swing.text.View class to fetch the Graphics object that will be used to render.

See:

  • public Graphics getGraphics()

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list. 		Sun
Java Software


Copyright Page for Sun Microsystems, Inc.

 Sun Microsystems, Inc

Sun Microsystems, Inc.

Copyright 1996, 1997 Sun Microsystems, Inc.
901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A.

All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc.

Sun Microsystems, Inc. (SUN) hereby grants to you a fully-paid, nonexclusive, nontransferable, perpetual, worldwide limited license (without the right to sublicense) under SUN's intellectual property rights that are essential to practice this specification. This license allows and is limited to the creation and distribution of clean room implementations of this specification that (i) include a complete implementation of the current version of this specification without subsetting or supersetting, (ii) implement all the interfaces and functionality of the standard java.* packages as defined by SUN, without subsetting or supersetting, (iii) do not add any additional packages, classes or methods to the java.* packages (iv) pass all test suites relating to the most recent published version of this specification that are available from SUN six (6) months prior to any beta release of the clean room implementation or upgrade thereto, (v) do not derive from SUN source code or binary materials, and (vi) do not include any SUN binary materials without an appropriate and separate license from SUN.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-1(a).

This software and documetation is the confidential and proprietary information of Sun Microsystems, Inc. ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement you entered into with Sun. SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. Sun, the Sun logo, Sun Microsystems, JavaSoft, JavaBeans, JDK, Java, HotJava, HotJava Views, the Java Coffe Cup logo, Java WorkShop, Solaris, NEO, Joe, Netra, NFS, ONC, ONC+, OpenWindows, PC-NFS, SNM, SunNet Manager, Solaris sunburst design, Solstice, SunCore, SolarNet, SunWeb, Sun Workstation, The Network Is The Computer, ToolTalk, Ultra, Ultracomputing, Ultraserver, Where The Network Is Going, Sun WorkShop, XView, and Visual Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.

Sun, the Sun logo, Sun Microsystems, JavaSoft, JavaBeans, JDK, Java, HotJava, HotJava Views, Visual Java, Solaris, NEO, Joe, Netra, NFS, ONC, ONC+, OpenWindows, PC-NFS, SNM, SunNet Manager, Solaris sunburst design, Solstice, SunCore, SolarNet, SunWeb, Sun Workstation, The Network Is The Computer, ToolTalk, Ultra, Ultracomputing, Ultraserver, Where The Network Is Going, Sun WorkShop, XView, Java WorkShop, the Java Coffee Cup logo, and Visual Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.

UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. OPEN LOOK® is a registered trademark of Novell, Inc.

All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.

The OPEN LOOK® and Sun(TM) Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements.

X Window System is a trademark of the X Consortium, Inc.

OpenStep is a trademark owned by NeXT and is used under license.

THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.

For further information on Intellectual Property matters contact Sun Legal Department:

  • Trademarks, Jan O'Dell at 650-786-8191
  • Patents at 415-336-0069


Table of Contents

CONTENTS | PREV | NEXT

JavaTM Product Versioning Specification

November 30, 1998

Introduction
Requirements
End Users
Product Support Organizations
Webmasters and Administrators
Product Developers
Problems of Evolution in Distributed Systems
Design for Evolution
Java Language Specification on Backwards Compatibility
Object Serialization Specification on Backwards Compatibility
Package Version Specification
Specification Versioning
Virtual Machine Versioning
Version Identification of the Java Runtime
Package Versioning
JAR Manifest Format
How Users Know What is Running
Rationale for Limiting Implementation Version Numbers to Identity

CONTENTS | PREV | NEXT

Copyright © 1998 Sun Microsystems, Inc. All Rights Reserved.


Versioning Specification

JavaTM Product Versioning Specification

November 30, 1998

Evolution in open distributed systems needs to be managed carefully because correct operation depends on a number of dependencies between packages. Changes within a distributed system can have a significant impact on many groups of individuals, including users, support organizations, web administrators, and developers. Packages within a distributed system need to operate correctly with only partial knowledge about the state of the whole system. The difficulty level increases because the packages of the system must be able to evolve at different rates. Evolution in such a system is made possible by explicitly managing the dependencies between the packages using techniques of object oriented design to govern how individual packages evolve. The Java language defines packages that are a natural for the consistent unit of update, packages that expose only public interfaces and that consume only public interfaces of other classes.

Introduction

In any system, support must be provided for the system to evolve over time. Most existing systems have conventions and mechanisms that specify how change is accommodated. These systems have been based on the model where software programs are installed on a computer. Typically, developers specify what versions of other packages are required and the installation process verifies and configures the system.

In open distributed systems, however, the static assumptions of existing systems do not work. Evolution is more difficult because it is not possible to control how or when packages change. Correct operation depends on a greater number of dependencies between packages. There is a real need for an updated set of conventions and mechanisms which specify how packages of a system should evolve so that the goal of an open reliable scalable distributed system can be achieved.

This document specifies the following:

  • How classes, resources, and files that make up a Java package are versioned. Packages define a consistent unit that can be developed, packaged, verified, updated, and distributed. Per package manifest information identifies the contents of the package.
  • Products are distributed by putting packages into archive files. Archives include a manifest, to identify the product version and packages it contains.
  • The standards and conventions used by developers and administrators to build and deploy products that operate reliably as their packages and the packages they depend on are upgraded.

Requirements

Changes within a distributed system have a significant impact on the following groups:

  • End Users
  • Product Support Organizations
  • Webmasters and Administrators
  • Product Developers

Each group has different requirements on network-deployed products that evolve over time.

End Users

End users need to feel confident that Java-based products will become increasingly reliable and compatible over time. Their reluctance to upgrade must be addressed by building confidence in the "Write Once, Run Anywhere" philosophy. With Java, it should no longer be the norm that users will complain "If I upgrade, it will break something" or "I won't be able to read or write data that others can use."

  • Users need to know that upgrading will neither break other programs nor will it obsolete existing data or produce data unusable by others.
  • At the simplest level, users want to know if the features they need are in the product version they have and what version to ask for to get particular features.
  • More knowledgeable users keep track of what bugs are associated with a specific product version, so they can work around them or avoid them.

Product Support Organizations

Product support organizations rely on being able to correctly and easily identify the product that is being used, the environment in which it is being used, and the integrity of the product packaging.

  • Databases of known problems and solutions are indexed by product identification information.
  • The interoperation of products and packages can introduce new kinds of problems and require all of the packages in a system to be identified. Problems can originate from public interfaces that are under-specified, from implementations that do not conform to the specification, or from clients that use implementation-specific details that are not part of the specification.

Webmasters and Administrators

Webmasters, administrators, and service providers need a reliable and supportable way in which to deploy applications for their clients via the web or network filesystems.

  • The staff of these organizations must be able to support their sites, identifying problems with specific packages and interactions between packages.
  • Site configuration must be able to support the scaling up of sites with automated site management tools.
  • Installing updating packages must not present a risk to the correction operation of existing packages or active users.

Product Developers

Product developers need to know how to write and deploy applications and libraries that satisfy the requirements of users, administrators, and support personnel. They must be able to make products and packages that can do the following:

  • Operate correctly in the open dynamic environment of the web
  • Be upgraded without breaking compatibility with clients
  • Take advantage of upgrades in the packages on which they rely
  • Take advantage of their packages' dynamic extensions
  • Identify the packages they rely on for reporting of problems
  • Be packaged to support the needs of users, webmasters, and support organizations
  • Have known packages and combinations that satisfy the auditing and security requirements appropriate for the application and organization

Problems of Evolution in Distributed Systems

Problems can occur in open distributed systems when packages evolve and are frequently updated. If the specified behavior inherent in the use of public interfaces is not maintained, the system can fail in unexpected ways. Open systems are comprised of many packages from different companies and organizations. These organizations operate asynchronously, introducing and upgrading their products according to their own schedules. Distribution of upgraded products takes time and adoption is not universal.

In Java, the components of local and distributed systems rely on the public interfaces and contracts for the behavior of other packages. Those packages will themselves evolve over time. In order for a package to operate correctly, packages that it depends upon must continue to provide the expected behavior even if those packages have been updated.

Only partial consistency is possible in distributed systems, since it is impossible to have knowledge of the entire state of the system. Each process and each package of the system has its own partial view of the current state of the system, accumulated incrementally by requesting information from other parts of the distributed system. Each piece of information, whether from an applet that was started, a class that was loaded, a remote method invoked, or a web page retrieved, must be treated carefully so that it can be used consistently with the rest of that partial view.

Several types of errors can result from inconsistencies in the classes that are loaded: class verification errors, classes compute incorrectly but without recognizable errors, or user requested functions that exhibit arbitrary failures.

These problems can occur in the following typical scenarios:

  • A running applet has loaded only some of its classes when the web server is updated with a newer version. When the applet incrementally loads additional classes, these classes could be inconsistent with ones that have already been loaded.
  • An application using libraries from multiple websites has loaded only some of the classes it needs. If the libraries are updated, there is a potential for incompatibilities that either the applet or the user needs to detect.
  • A running application or applet makes an RMI call that returns an object which the class needs to be loaded. The class that is loaded could be inconsistent with other already loaded classes.
  • A running application or applet makes a RMI call that returns an object that is for a newer or an older version of the class.
  • Bugs exist in a library. If the clients have worked around the bug, a cascade of problems could be introduced when the bug is fixed.

These problems cannot be prevented or solved directly because they arise out of inconsistencies between dynamically loaded packages that are not under the control of a single system administrator and so cannot be addressed by current configuration management techniques.

Design for Evolution

The key to dealing with these problems and meeting the requirements stated above is the careful design of the packages and packaging of the system so that they may be updated, distributed, and loaded in consistent units. Typical to mass produced products is the notion of the field replaceable unit. It is the smallest unit of a product that can be identified with a specification, a supplier, can be distributed and redistributed, and can be replaced if faulty. This same model is used for software distribution, products have a name, a version number, adhere to one or more specifications, are distributed on the network or CD-ROM and its problems can be reported to support organizations. These packages are the smallest unit that can be distributed, used, validated and replaced or upgraded when necessary. Packages can be assembled with other packages and each package can still be identified, verified, and distributed.

The Java language-based package mechanism fits well with the idea of a replaceable unit. Java packages expose only public interfaces and use only the public interfaces of other packages. The JavaTM Language Specification defines the approaches for compatible evolution of packages.

Java Language Specification on Backwards Compatibility

The Java Language Specification lays the groundwork for developing packages that can be expected to evolve gracefully over time. It defines how classes can change and still be backward compatible with other classes previously compiled and distributed. Essential to robust evolution is the stability of the public, protected, and package interfaces and behavior as the implementations evolve. It defines "compatible" changes as "those changes that do not change existing interfaces or behavior." Thus, if a class defines a method, and the method had a particular behavior, that same contract must be supported by the all later evolutions of the class. Detailed rules are given in Chapter 13 of the JavaTM Language Specification. One additional incompatible change has been added: it is incompatible to add methods to a public interface.

Although incompatible changes are not permitted, new or similar functionality can always be added in new or existing interfaces or classes.

By choosing the Java package as the unit of update, the package and private methods of the classes can change, thereby allowing flexibility in the implementation of the package while the public and protected classes and methods maintain the external interfaces and semantics.

Object Serialization Specification on Backwards Compatibility

Robust persistent storage and robust communication between the components is important to distributed systems. Components must be able to maintain persistent storage as they evolve, being able to evolve classes and yet have them read data previously written to storage. Components in a distributed system evolve at different rates and must still be able to communicate reliably.

Adhering to the compatibility requirements of object serialization allows newer and older versions to communicate in a predictable and consistent way. The details are in Chapter 5 of the JavaTM Object Serialization Specification.

Package Version Specification

There are several categories of artifacts that need to be identified including specifications, implementation, the Java Virtual Machine and Java Runtime Environment.

Specification Versioning

Open systems are based on the idea that a specification may have multiple implementations. Specifications evolve under the auspices of an organization or company. It is highly undesirable if a specification has multiple incompatible versions. Each version of a specification or implementation must evolve only into a single subsequent version. The philosophy of requiring specifications to be backward compatible allows specifications to be identified as supersets of the previous specification. Since there is a single sequence of version specifications they can meaningfully be identified by version numbers with specific semantics that imply the ordering. Specification version numbers use a Dewey decimal notation consisting of numbers separated by periods.

A specification is identified by the:

  • Owner of the specification
  • Name of the Specification
  • Version number - major.minor.micro

    Major version numbers identify significant functional changes.
    Minor version numbers identify smaller extensions to the functionality.
    Micro versions are even finer grained versions.

    These version numbers are ordered with larger numbers specifying additions to the specification.

Virtual Machine Versioning

An implementation of the Java Virtual Machine should be identify both the specification and the implementation. These properties should be added to those already available using java.lang.System.getProperties.

java.vm.specification.version | i.e. 1.3
java.vm.specification.vendor | i.e. Sun Microsystems Inc.
java.vm.specification.name | i.e. JavaTM Virtual Machine Specification
java.vm.version | i.e. Solaris 5.5 Native 1.0 build32
java.vm.vendor | i.e. Sun Microsystems Inc.
java.vm.name | i.e. Solaris 5.x JVM

These properties are accessed using the method java.lang.System.getProperty and each returns a string.

Version Identification of the Java Runtime

The requirement to identify the JavaTM Runtime is already partially met via the properties specified by the JavaTM Language Specification, §20.18.7 usingjava.lang.System.getProperties.

java.version | i.e. Solaris 1.3
java.vendor | i.e. Sun Microsystems Inc.

Currently these identify the implementation of the JavaTM runtime and the core classes that are available. These properties do not identify the JavaTM Language Specification version that this JDKTM implements.

The following additional properties are needed to identify the version of the JavaTM Runtime Environment specification to which this implementation adheres:

java.specification.version | i.e. 1.1
java.specification.name | i.e. JavaTM Language Specification
java.specification.vendor | i.e. Sun Microsystems Inc.

These properties are accessed using the method java.lang.System.getProperty and return their values as strings.

Package Versioning

Each JavaTM package consists of class files and optional resource files. The information needed to identify the contents of the package is stored with the package contents.

This specification applies to all packages, regardless of whether they are developed as a core package distributed with a JavaTM Runtime, a standard extension, an applet or application package.

Unlike version numbers for specifications, version information for implementations cannot be used to identify the package as being backward compatible with earlier versions. Package version numbers are present to identify differences between the specification and the implementation, i.e. bugs. New versions of implementations are specifically produced to remove (undesirable or incorrect) behavior and thus are intended not to be backward compatible. Therefore, package version strings can have any unique value and can only be compared for equality. For a complete explanation of this rationale, see Rationale for Limiting Implementation Version Numbers to Identity.

The following attribute names are defined for a package. The value of each attribute is a string:

Implementation-Title | Title of the package
Implementation-Version | Version number
Implementation-Vendor | Vendors company or organization
Specification-Title | Title of the specification
Specification-Version | Version number
Specification-Vendor | Vendors company or organization

These attributes are stored in the manifest and retrieved by programs using the java.lang.Package API described below.

JAR Manifest Format

The current manifest format is extended to allow the specification of the attributes for package versioning information. A manifest entry should be created for each JavaTM package. The name of the entry will be the directory within the archive that contains the package's class and resource files. For example:

Manifest-version: 1.0
Name: java/util/
Specification-Title: Java Utility Classes
Specification-Version: 1.3
Specification-Vendor: Sun Microsystems Inc.
Implementation-Title: java.util
Implementation-Version: build57"
Implementation-Vendor: SunMicrosystems. Inc.

To insert these attributes in the manifest, create a prototype manifest file and use JarTool's -m switch to merge the attributes into the manifest when the manifest is built. JarTool will be extended to browse and set the versioning attributes in the manifest.

How Users Know What is Running

When bugs occur, users must be able to report the identities of the packages in use. The application, applet, or browser must be able to expose the available information to the user, either on demand or when an error occurs. Available APIs can report the following information:

  • What packages are loaded?

    The package.getPackages method returns a list of the active packages.

  • What are the package versions?

    The java.lang.Package methods allow the attributes for names and versions to be examined, as listed in Package Versioning.

  • What version of the JavaTM Runtime is active?

    The System.getProperties method can be used to get the properties of this virtual machine, as listed in Version Identification of the JavaTM Runtime.

  • What version of the JavaTM VM is active?

    The System.getProperties method can be used to get the properties of this virtual machine, as listed in Virtual Machine Versioning.

Rationale for Limiting Implementation Version Numbers to Identity

Implementations evolve independently over time to fix bugs, to improve performance, or to add new functions that are called for by more recent revisions of the specifications. Packages implement specifications and must identify which version of each specification they implement. Interactions occur between packages through their public and protected interfaces and classes only. The public API and behavior must remain stable over time, so changes can be allowed in the implementation of one package without affecting the behavior of another package.

If the classes of a package always faithfully implemented the specification, it would be sufficient just to identify the specification. Since in the real world this rarely happens, packages need to identify themselves so that bugs can be reported against the packages that may have contributed to the problem.

There is a significant tendency to try to attach some significance to version identifiers of implementations. If the purpose is to allow the tracking of bugs then a unique number is sufficient. It is also sufficient for a client package to workaround a bug in a particular version of a vendors package since that version can be tested for and the bug avoided.

However, many additional problems can occur when one package attempts to work around bugs in other packages. They need to identify behavior that is not part of the specification and may try to use behavior that is only part of one implementation. Such implementation specific behavior cannot be relied upon to be in any particular version other than the one(s) seen and tested by the developer.

A bug first appears in some version of a vendors package and may or may not continue to be a problem in subsequent versions. If the client of the buggy package uses a workaround based on version numbers, it could correctly work around the bug in the specific version. Now, if the buggy package was fixed, how would the client package know whether the bug was fixed or not? If it assumed that higher versions still contained the bug, it would still try to work around the bug. The workaround itself might not work correctly with the non-buggy package. This could cause a cascade of bugs caused by fixing a bug. Only the developer, through testing with a new version, can determine whether or not the workaround for a bug is still necessary or whether it will cause problems with the correctly behaving package. The developer only knows that the bug exists in a particular individual versions.

CONTENTS | PREV

Copyright © 1998 Sun Microsystems, Inc. All Rights Reserved.


Java 2 SDK Demos

Java

Demonstration
Applets and Applications

 Documentation Contents
The applets available below demonstrate features of the Java platform. Swing set demos are available in the demo/jfc directory of the JavaTM 2 SDK installation. Each Swing demo has an associated README.txt file that you should read for instructions on running the demo.

Browser Requirements

In general, applets can run in AppletViewer or in JavaTM-compatible browers as noted below. Of course, applets that depend on any new APIs will not work on any browsers that support only earlier version APIs, so there are version restrictions.
  • Java 2 Platform-based Applets - The AppletViewer in the Java 2 SDK or future compatible versions of Netscape, Internet Explorer, or other browsers (whether with or without the Java Plug-In).
  • Java 1.1 Applets - Use HotJava 1.0, AppletViewer 1.1 or 1.1-compatible versions of Netscape, Internet Explorer, or other browsers.
  • Java 1.0 Applets - Use Netscape 3.0, Internet Explorer 3.0, HotJava pre-beta, or AppletViewer 1.0 or a later version of any of these
The AppletViewer is provided with the Java 2 SDK, Standard Edition, in the SDK's bin directory. For information about how to use the AppletViewer and other SDK tools, see Java 2 SDK Tools and Utilities.

Demo Applets

The applets in this section are part of the software download bundle and are located in the demo/applets directory of the Java 2 SDK installation.

  • Animator (1, 2, 3, 4)
  • ArcTest
  • BarChart
  • Blink
  • CardTest
  • Clock
  • DitherTest
  • DrawTest
  • Fractal
  • GraphLayout (1, 2, 3, 4)
  • GraphicsTest
  • ImageMap
  • JumpingBox
  • MoleculeViewer (1, 2, 3)
  • NervousText
  • SimpleGraph
  • SortDemo
  • SpreadSheet
  • TicTacToe
  • WireFrame (1, 2, 3, 4)

JFC Applications and Applets

These applications and applets demonstrate Swing and Java 2DTM technology.

  • DBDemos
  • FileChooserDemo
  • Java2D
  • Metalworks
  • Notepad
  • SampleTree
  • Simple
  • Stylepad
  • SwingApplet
  • SwingSet
  • Table

Java Sound Demonstration

A Java Sound demonstration program can be found in the SDK's demo/sound directory. The program can be run either as an application or as an applet. See the README file for details. Source code for the program is provided in the SDK's demo/sound/src directory.

Java Platform Debugger Architecture

The demo/jpda/examples.jar file in the SDK contains JPDA examples, including source code for the jdb Java Debugger and the prototype javadt GUI debugger.

Additional Applications and Applets

Additional applets and applications may be found at:
  • Guide to Features - Examples are included in the documentation for particular features.
  • Applets Page - Located on Sun Java Software web site
  • The Java Tutorial - Located on Sun Java Software web site
    • First Cup of Java
    • "Hello World" Applet and Application
    • BINGO! Client/Server Application

Copyright ©1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to jdk-comments@java.sun.com 		Sun

Java Software


Contacting Java Software

 Documentation Contents

The Java 2 SDK, Standard Edition is a product of Sun Microsystems, Inc. The Java 2 SDK is developed by Java Software, a part of Sun Microsystems.

Java Software welcomes your comments and suggestions. You can contact us through email, or you can file a bug report. But please remember that Java Software does not offer free technical support. If you need help, try the Java Software Assistance Page, where you'll find links to FAQs, online tutorials, and many other resources.

Send Us Email

Feel free to send email directly to Java Software engineering teams using:

Java Software email address list
If you're not sure which team to contact, browse the Guide to Features and look for a "Comments" email link at the bottom of the main page for each feature. Send general comments to jdk-comments@java.sun.com.

Please file documentation bugs as described below. For other general comments about the documentation not targeted to any particular engineering team, please send email to docs@java.sun.com for content including the API specification, or docwebmaster@java.sun.com for web page problems and broken links.

File a Bug Report

You can use our bug tracking system to report bugs or request new features. Use our Bug Report Form.

Download/Installation Problems?

If you're having problems downloading or installing the Java 2 SDK or Java 2 Runtime Environment, tell us about them on our Web Site Feedback Form.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Java Software


Java Plug-in

Java

Introduction to
the Java Runtime Environment
including Java Plug-in

 Documentation Contents
On Windows, a separate Java 2 Runtime Environment including Java Plug-in is installed with the SDK such that Internet Explorer and Netscape Navigator will use this plug-in when encountering special HTML pages that invoke it. On Solaris, you can obtain this plug-in separately. The following section describes how to configure your HTML pages to invoke the plug-in.
  • What is the Java Plug-in?
  • How is the JRE/Plug-in Available and Installed?
  • How is the Plug-in Invoked From an HTML Page?
  • How to Modify your HTML

What is the Java Plug-in?

The Java 2 Runtime Environment including Java Plug-in is a Sun product that is composed of two parts: The Java 2 Runtime Environment and the Java Plug-in.

The Java 2 Runtime Environment is the Java platform on which you can run, test and ship your own applications. It consists of the Java virtual machine, the Java platform core classes, and supporting files. It contains no development tools -- no compiler, debugger, or other tools. The Runtime Environment requires additional software -- the Java Plug-in -- to enable it to run applets in a browser.

The Java Plug-in software allows Java applets and JavaBeans components to run in a browser using Sun's Java Runtime Environment, instead of the browser's default Java runtime. The Java Plug-in works with Netscape Navigator and Microsoft Internet Explorer. The plug-in requires special <OBJECT> and <EMBED> tags be embedded in the HTML page. For documentation on the Java Plug-in, see Java Plug-in and click on "Documentation". An extensive Java Plug-in FAQ is available.

How is the Runtime Environment and Plug-in Available and Installed?

The Java 2 Runtime Environment including Java Plug-in is available from Sun on both Windows and Solaris:

  • The Windows version of the Java 2 SDK includes a redistributable version of the Java 2 Runtime Environment including Java Plug-in, which plugs into a browser, upgrading the browser to the Java 2 platform. Once you install it, you will see that the "Java Plug-in control panel" has been added to your Windows "Start" menu under "Programs".

  • The Solaris version is downloaded separately from the SDK Reference Implementation. For more information, see Sun's Java Plug-in website.
While the Java 2 Runtime Environment including Java Plug-in is installed with the SDK for Windows, it is a separate product and is redistributable with your application, applet or JavaBean components subject to the terms and conditions of its software license (found in the Runtime Environment's README and LICENSE files).

Note that the SDK has its own internal, complete, non-redistributable Java runtime environment in the jre subdirectory. This is the runtime environment used by the SDK tools (javac, javadoc, appletviewer, and so forth) and is not to be confused with the redistributable Java 2 Runtime Environment/Plug-in.

How is the Java Plug-in Invoked From an HTML Page?

As always, the browser's built-in Java runtime will be used when it encounters an <APPLET> tag. However, once the plug-in is installed, it will automatically load the Java Runtime Environment when it hits a page with special <OBJECT> and <EMBED> HTML tags. The browser can then load Java 2 Platform-based applets from this page to make full use of Java 2 Platform-based features. For details on how to configure your HTML pages to invoke the JRE, see the next section.

How to Modify HTML Pages

The plug-in requires the <OBJECT> tag enclose the <EMBED> tag to work in both Internet Explorer and Netscape Navigator. For details on how to configure your HTML pages to invoke the Java 2 Runtime Environemnt, go to Sun's Java Plug-in website, choose "Documentation", then "Java Plug-in HTML Specification".
Please send comments and suggestions to: Java Plug-in Feedback

Copyright © 1998 Sun Microsystems, Inc. All Rights Reserved.

Java Software


New Features

Java

JavaTM 2 SDK, Standard Edition, version 1.3
Summary of New Features and Enhancements

 Contents

The new features of version 1.3 of the Java 2 SDK, Standard Edition are listed below. The full list of features, including features brought forward from previous versions of the SDK, is available at Guide to Features.

Java 2 Platform
  • Java Naming and Directory InterfaceTM (JNDI)
  • Remote Method Invocation (RMI)
  • RMI/IIOP
  • CORBA ORB
  • Java IDL compiler, idlj
  • Drag and Drop Enhancements
  • Java Sound
  • Applet Deployment Enhancements
  • Java 2DTM Enhancements
  • Swing Enhancements
  • AWT Enhancements
  • Security Enhancements
  • Networking Enhancements
  • Reflection Enhancements
  • Object Serialization Enhancements
  • Accessibility Enhancements
  • Input Method Framework
  • Collections Framework Enhancements
  • Enhancements to java.math
  • Enhancements in java.lang and java.util.*
  • Enhancements to the Extension Mechanism and Jar Files
  • Support for Motif 2.1
Performance
  • Performance
Tool Support
  • Java Platform Debugger Architecture (JPDA)
Tools
  • Tools and Utilities

Java 2 Platform

  • Java Naming and Directory InterfaceTM (JNDI)
    • The Java Naming and Directory Interface (JNDI), formerly available only as a standard extension, has been added to the Java 2 Platform. JNDI provides Java platform-based applications with a unified interface to multiple naming and directory services in the enterprise. JNDI includes support for event notification and LDAP v3 extensions and controls, as well as class libraries and service providers for the Lightweight Directory Access Protocol(LDAP), the CORBA Object Services (COS) Naming Service, and the Java Remote Method Invocation (RMI) Registry.

  • Remote Method Invocation (RMI)
    • RMI Release Notes
    • java.rmi.server.RMIClassLoader has a new method, getClassLoader.
    • Serialization enhancements notable for RMI:
      • Strings longer than 64K can now be serialized.
      • Serialization performance enhancements yeild up to 20% faster writes during serialization and reads during deserialization.
      • Improved exception reporting now reports the actual class or interface that cannot be found during deserialization, rather than the higher-level class that was being deserialized (such as the RMI stub class).
    • rmic has several new options and now defaults to using '-d .' behavior if no other destination directory is specified using the -d option.
    • rmid now requires a security policy file.

  • RMI over IIOP
    • RMI programmers can now use CORBA's IIOP communications protocol to communicate with clients of any type, whether written entirely in the Java programming language or made up of components written in other CORBA-compliant languages. RMI over IIOP enables the programming of CORBA servers and applications via the rmi API. The RMI API utilizes the Java CORBA ORB and IIOP, so you can write all of your code in Java, and use the rmic compiler to generate the code necessary for connecting your applications via the Internet InterORB Protocol (IIOP) to others written in any CORBA-compliant language.

  • CORBA ORB
    • A CORBA 2.3.1-compliant Object Request Broker (ORB) is part of the Java 2 Platform, Standard Edition, v1.3. The ORB is a runtime component that is a fully-compliant Java ORB for distributed computing using IIOP communication. This ORB can interoperate with any CORBA 2.3.1-compliant ORB. This eliminates the requirement for licensing and distributing third-party Java ORBs.
    • The Java CORBA ORB supports both the RMI and IDL programming models, both of which use the underlying IIOP wire-level protocol for communication.

  • Java IDL compiler, idlj
    • J2SE v.1.3 includes a new version of the IDL-to-Java compiler, idlj.
    • The idlj compiler is 100% pure Java, so no preprocessor is necessary.
    • The idlj compiler has more options than idltojava. Link to idlj - The IDL-to-Java compiler (RMI-IIOP version) for a list of options.
    • The idlj compiler supports mapping for interface, as described in the OMG IDL to Java Language Mapping Specification, 1.12, Mapping for Interface. This change means that a non-abstract IDL interface is mapped to two public Java interfaces: a signature interface and an operations interface.
    • The idlj compiler supports Java mapping for IDL value types, as described in the OMG IDL to Java Language Mapping Specification, 1.13, Mapping for Value Types.

  • Drag and Drop Enhancements
      Two new methods in class java.awt.datatransfer.DataFlavor enhance Drag and Drop operations in this release:
    • getReaderForText(Transferable)
    • selectBestTextFlavor(DataFlavor[])

  • Java Sound
    • Sound engine
    • Support for audio in applications as well as applets.
    • New API for capturing, processing, and playing back audio and MIDI (Musical Instrument Digital Interface) data.
    • Audio file formats: AIFF, AU and WAV
    • Music file formats: MIDI Type 0, MIDI Type 1, and Rich Music Format (RMF)
    • Sound formats: 8- and 16-bit audio data, in mono and stereo, with sample rates from 8 kHz to 48 kHz
    • Linear, a-law, and mu-law encoded data in any of the supported audio file formats
    • MIDI wavetable synthesis and sequencing in software, and access to hardware MIDI devices
    • An all-software mixer that can mix and render up to 64 total channels of digital audio and synthesized MIDI music

  • Applet Deployment Enhancements
    • Improved Applet Caching Control to ensure critical functions remain in fast-loading cache for improved performance.
    • Fast Loading of Applet Support Classes Jar files containing support classes for applets can now be placed in the Java 2 Runtime Environment/Plug-in lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be pre-loaded from the local file system by the applet class loader, providing the same protections as if they had been downloaded over the net.
    • Automatic Installation of Extensions gets the right version of the extension installed on the end-user machine, without requiring it to be downloaded repeatedly each time an applet is loaded. Hence, faster start-up of applets.
    • Jar Indexing allows developers to break functionality into different Jar files and ensure that only those that are needed for a given run of the applet are actually downloaded.

  • Java 2DTM
    • Multiple Monitor Support is enabled by the new Frame(GraphicsConfiguration) and Window(Window, GraphicsConfiguration) constructors and getBounds method.
    • Portable Network Graphics format support is supported by the Java 2D API.
    • Dynamic font loading is provided by new API in class Font.
    • Customized stroke offsets are enabled by new API in class java.awt.BasicStroke.
    • New ICC Profile tags have been added to bring the Java 2D API into compliance with the latest ICC specification.
    • Improved paragraph balancing and hyphenation is enabled by the TextMeasurer class.
    • Access to a ColorModel's transfer type is possible through the new getTransferType method.
    • Validity checking of Palette Entries is enabled by a new IndexColorModel constructor and the new isValid(int) and getValidPixels methods.

  • Swing Enhancements
    • Many enhancements have been made to Swing, including additions to the API and performance enhancements to the SDK's implementation. See Swing Changes and New Features for descriptions of enhancements added to Swing in this release.

  • AWT Enhancements
    • See AWT Enhancements for more details on the changes summarized here.
    • Multiple Monitor Support is enabled by the new Frame(GraphicsConfiguration) and Window(Window, GraphicsConfiguration) constructors and getBounds method.
    • New class java.awt.Robot has been added to the Java 2 Platform. Robot is designed to make it possible to automate testing of AWT components.
    • New event masks for PaintEvents and Invocation events have been added to class AWTEvent.
    • Paint coalescing has been implemented which will enhancement painting performance.
    • The printing API has been enhanced by the addition of two new classes: java.awt.JobAttributes and java.awt.PageAttributes. These classes control attributes of print jobs and printed pages, respectively, and are used by new form of method Toolkit.getPrintJob.
    • A new event type for tracking changes to component hierarchies has been introduced. The new event type notifies listeners of various changes in a component's hierarchy, such as ancestor moves, ancestor deletions, and more.
    • New C headers have been added to the SDK as a convenient, standard way to allow native code to access AWT components.

  • Security
    • See Security Enhancements for a fuller list of changes in this release.
    • trustProxy property is now true by default. See the Security Enhancements document for more details.
    • A new signature verification method, initVerify(Certificate) has been added to java.security.Signature, and this new method is FIPS 140-1 compliant. FIPS 140-1 requires a public key to be passed as a certificate, which is accomplished through the addition of initVerify(Certificate).
    • New DomainCombiner interface provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
    • New class java.security.spec.RSAKeyGenParameterSpec makes it possible to specify both the size of the (to-be-generated) public modulus and the value of the public exponent when generating an RSA keypair.
    • Two new methods have been added to java.security.Security, making it possible to select service providers based on the capabilities that they offer:
      • getProviders(Map)
      • getProviders(String)
    • Method java.security.KeyPairGenerator.generateKeyPair() has been restored to ensure backwards compatibility with JDK 1.1.x.
    • The new -provider command line option has been added to keytool and jarsigner which allows the user to specify a particular service provider not listed in the security properties file.
    • Jarsigner can now verify Netscape-signed jar files.
    • The handling of X.509 certificates has been updated to include support for multiple Attribute/Value Assertions (AVA's) within a Relative Distinguished Name (RDN).
    • The RSAKey interface has been added to allow a generic examination of keys before examining them in detail.
    • Enhancements have been made to support all X.520 attributes that are either mandated or recommended by PKIX RFC 2459.

  • Networking
    The following enhancements have been made to networking. See also Networking Enhancements for more details.
    • TCP half-close sockets are now supported with the additions of methods shutdownInput() and shutdownOutput() to classes java.net.Socket and java.net.SocketImpl
    • Java sockets now support the keepalive option with the addition of methods setKeepAlive(boolean on) and boolean getKeepAlive() in java.net.Socket.
    • New interface java.net.DatagramSocketImplFactory, which is used by DatagramSocket to create actual socket implementations. This addition makes DatagramSocket consistent with the other socket types, by allowing the user to set the DatagramSocketImplFactory through a public API.
    • Improved system flexibility through changes in java.net.URL, java.net.URLConnection, and java.net.ContentHandler. The URL parsing now better matches the rules specified in RFC 2396. Some new methods have been added to obtain the components of a parsed URL.
    • Added HTTP 1.1 client-side support.

  • Reflection Enhancements
    • A new API for dynamic proxy classes has been added to the Java 2 Platform. A dynamic proxy class is a class that implements a list of interfaces specified at runtime such that a method invocation through one of the interfaces on an instance of the class will be encoded and dispatched to another object through a uniform interface. Thus, a dynamic proxy class can be used to create a type-safe proxy object for a list of interfaces without requiring pre-generation of the proxy class, such as with compile time tools. Dynamic proxy classes are useful to applications that need to provide type-safe reflective dispatch of invocations to objects that present interface APIs. For example, an application can use a dynamic proxy class to create an object that implements multiple arbitrary event listener interfaces -- interfaces that extend java.util.EventListener -- to process a variety of events of different types in a uniform fashion, such as by logging all such events to a file.

  • Object Serialization
    Many enhancements to serialization's functionality and performance have been made in version 1.3 of the Java 2 Platform. See Object Serialization Enhancements for details.
    • Strings longer than 64K can now be serialized.
    • Serialization performance enhancements yeild up to 20% faster writes during serialization and reads during deserialization.
    • Improved exception reporting now reports the actual class or interface that cannot be found during deserialization, rather than the higher-level class that was being deserialized (such as the RMI stub class).
    • New methods for enhanced functionality.
      • java.io.ObjectOutputStream.writeClassDescriptor
      • java.io.ObjectOutputStream.annotateProxyClass
      • java.io.ObjectInputStream.readClassDescriptor
      • java.io.ObjectInputStream.resolveProxyClass

  • Accessibility
    • Several new classes and interfaces have been added to the accessibility API of the Java 2 Platform.
      • AccessibleIcon provides information about icons and is implemented by Swing icons.
      • AccessibleRelation and AccessibleRelationSet provide information about the ways user interface objects are related to each other.
      • AccessibleTable provides information about tables, and is implemented by Swing's JTable.AccessibleJTable class.
      • AccessibleTableModelChange is a helper class which encapsulates a change to the model of a table.
    • Accessibility support has been included in both AWT Component and AWT Container, making creation of accessible custom components easier. This also means that accessibility support is not only present in Swing components, it is also part of all lightweight AWT components.
    • Class java.applet.Applet now implements the Accessible interface.
    • The AWT's new Robot class provides a way to insert keystrokes and mouse events at the system level. This feature enhances accessibility because it allows the physical on-screen mouse cursor to be moved. This enables screen magnification software for native environments to recognize and respond to mouse movements that could not previously be identified by assistive technologies outside of the virtual machine.

  • Input Method Framework
    • An Input Method Engine Service Provider Interface has been added to the platform. The new SPI enables the development of input method engines in the Java programming language that can be used with any Java runtime environment.
    • Below-the-spot text input has been implemented. Below-the-spot text input, popular in Chinese-speaking countries, uses a separate composition window that is positioned automatically to be near the point where the text is to be inserted after being committed.

  • Collections Framework Enhancements
    • Added singletonList and singletonMap. Previously, there was a convenience implementation for singleton Set, but no corresponding implementation for List and Map. Both of these implementations proved desirable in practice.
    • Added EMPTY_MAP. Previously, there were constant convenience implementations for the empty Set and List, but no corresponding implementation for Map.
    • Added Map constructor for WeakHashMap. The Map interface dictates that most Map implementations should have a "copy constructor" that takes a Map argument. WeakHashMap lacked such a constructor in the 1.2 release.

  • Enhancements to java.math
    • The BigDecimal(String) constructor has been enhanced to allow signed strings (for example, "+2.71828") and exponential notation (for example, "1.23E-23") as input.
    • Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on an underlying C library. The new implementation performs all standard operations much faster than the old implementation. The speed-up realized in the new implementation can be as much as 5x or more, depending on the operation being performed and the length of the operands.

  • Enhancements in java.lang and java.util.*
    • Package java.lang now has both a Math class and a StrictMath class. New class StrictMath has the same API as class Math, but is defined to return bit-for-bit reproducible results for numeric operations in all implementations. This is in contrast to class Math which is not defined to return bit-for-bit same results across implementations. Implementations of class Math can vary within specified constraints to allow flexibility for better performance.
    • A new Timer API has been added to the Java 2 Platform to support animations, human interaction timeouts, on-screen clocks and calendars, work-scheduling routines, reminder facilities, and more.
      • java.util.Timer
      • java.util.TimerTask
      Countdown.java is a simple demo application that uses the new Timer API.
    • An API for virtual machine shutdown hooks has been added to class java.lang.Runtime that provides a simple, portable interface to the underlying operating system's process-shutdown notification so that an application written in the Java programming language can initiate shutdown actions such as closing down network connections, saving session state, and deleting temporary files.
    • New "delete-on-close" mode for opening Zip and Jar files has been added so that long-running server applications can delete no-longer-needed JarFile objects and data to keep disk space free.

  • Enhancements to the Extension Mechanism and Jar Files
    • Automatic Installation of Extensions gets the right version of the extension installed on the end-user machine, without requiring it to be downloaded repeatedly each time an applet is loaded. Hence, faster start-up of applets.
    • Jar Indexing allows developers to break functionality into different Jar files and ensure that only those that are needed for a given run of the applet are actually downloaded.

  • Support for Motif 2.1
      J2SE 1.3 uses Motif 2.1 (on the Solaris 7 and Solaris 8 operating environments), as distinguished from Motif 1.2 (which is still used on the Solaris 2.6 operating environment). Since 2.1 is the supported version of Motif going forward, switching to 2.1 allows the Java 2 platform to take advantage of future features and bug fixes in Motif.

      Motif 2.1 is compatible in both functionality and performance to Motif 1.2, except that it adds two features that might be of use for the Java 2 platform:

      • Motif 2.1 is multi-thread safe. Applications implemented partly in native code that use Motif directly through the jawt interface or the DrawingSurface interface can benefit from this feature. (Pure Java applications are already MT-safe.)
      • Motif 2.1 includes new Complex Text Layout (CTL) software for advanced locale support.

Performance

  • Performance
    • Many enhancements have been made to improve the performance of the Java 2 SDK and Java 2 Runtime Environment. These changes include the addition of the Java HotSpotTM Client Virtual Machine. The Solaris and Linux versions of the Java 2 SDK and Java 2 Runtime Environment also contain the Java HotSpot Server VM. Both the Client and Server VMs contain state-of-the-art Java HotSpot technology. The Client VM is tuned to maximize performance on client systems, improving performance in areas of startup time and memory footprint. The Server VM is tuned to maximize performance of program execution speed and is aimed at server applications that are less concerned with startup and memory footprint.

      The Java HotSpot Server VM is available for Win32 platforms as a separate download. See the Java HotSpot web site to obtain the Win32 Java HotSpot Server VM v2.0.

Tool Support

  • Java Platform Debugger Architecture
    • The Java Platform Debugger Architecture (JPDA) consists of three interfaces designed for use by debuggers in development environments for desktop systems. The Java Virtual Machine Debug Interface defines the services a VM must provide for debugging. The Java Debug Wire Protocol defines the format of information and requests transferred between the process being debugged and the debugger front end, which implements the Java Debug Interface. The Java Debug Interface defines information and requests at the user code level.

Tools

  • Tools and Utilities
    See Tool Changes for details on the changes summarized here.

    • The javac compiler has been completely re-implemented in version 1.3 of the Java 2 SDK for faster operation.

    • The jarsigner and keytool utilities have a new -provider option that can be used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.

    • The Jar tool now provides for the indexing of Jar files so that Jar-file contents can be accessed quickly and easily.

    • The functionality of the rmic tool (the Java RMI stub compiler) has been enhanced with several new options.

    • Version 1.3 of the Java 2 SDK uses the new high-performance virtual machine with Java HotSpotTM technology.

    • The version-related options of the Java application launcher have been modified to present information in terms of the values of system properties. .

    • The javaw launcher has been modified so that it will now display a window with error messages in the event that an application fails to launch.

Copyright © 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.

 Sun Microsystems, Inc


AppletViewer Tags

 Documentation Contents
The applet viewer makes it possible to run a Java applet without using a browser. AppletViewer ignores any HTML that is not immediately relevant to launching an applet. However, it recognizes a wide variety of applet- launching syntax. The HTML code that AppletViewer recognizes is shown below. All other HTML code is ignored.

object

The object tag is the HTML 4.0 tag for embedding applets and mult-media objects into an HTML page. It is also an Internet Explorer 4.x extension to HTML 3.2 which allows IE to run a Java applet using the latest Java plugin from Sun.
<object
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="code" value="yourClass.class">
  <param name="object" value="serializedObjectOrJavaBean">
  <param name="codebase" value="classFileDirectory">
   ...
  alternate-text
</object>
Notes:
  • AppletViewer ignores the "classID" attribute, on the assumption that it is pointing to the Java plugin, with the value:
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

  • AppletViewer also ignores the "codebase" attribute that is usually included as part of the object tag, assuming that it points to a Java plugin in a network cab file with a value like:
       codebase="http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,1,0,0"

  • The optional codebase param tag supplies a relative URL that specifies the location of the applet class.

  • Either code or object is specified, not both.

  • The type param tag is not used by AppletViewer, but should be present so that browsers load the plugin properly.
    For an applet, the value should be something like:
       <param name="type" value="application/x-java-applet;version=1.1">
    or
       <param name="type" value="application/x-java-applet">

    For a serialized object or JavaBean, the type param value should be something like:
       <param name="type" value="application/x-java-bean;version=1.1">
    or
       <param name="type" value="application/x-java-bean">

  • Other param tags are argument values supplied to the applet.

  • The object tag recognized by IE4.x and the embed tag recognized by Netscape 4.x can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet.
    For more information, see Java PlugIn HTML Specification

  • AppletViewer does not recognize the java_code, java_codebase, java_object, or java_type param tags. These tags are only needed when the applet defines parameters with the names code, codebase, object, or type, respectively. (In that situation, the plugin recognizes and uses the java_ version in preference to the version that will be used by the applet.) If the applet requires a parameter with one of these 4 names, it may not run in AppletViewer.

embed

The embed tag is the Netscape extension to HTML 3.2 that allows embedding an applet or a multimedia object in an HTML page. It allows a Netscape 4.x browser (which supports HTML 3.2) to run a Java applet using the latest Java plugin from Sun.
<embed
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
   ...
</embed>
Notes:
  • The object and embed tags can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet.
    For more information, see the Java PlugIn HTML Specification

  • Unlike the object tag, all values specified in an embed tag are attributes (part of the tag) rather than parameters (between the start tag and end tag, specified with a param tag.

  • To supply argument values for applet parameters, you add additional attributes to the <embed> tag.

  • AppletViewer ignores the "src" attribute that is usually part of an <embed> tag.

  • Either code or object is specified, not both.

  • The optional codebase attribute supplies a relative URL that specifies the location of the applet class.

  • The type attribute is not used by AppletViewer, but should be present so that browsers load the plugin properly.
    For an applet, the value should be something like:
       <type="application/x-java-applet;version=1.1">...
    or
       <type="application/x-java-applet">...

    For a serialized object or JavaBean, the type param value should be something like:
       <type="application/x-java-bean;version=1.1">...
    or
       <type="application/x-java-bean">...

  • The "pluginspage" attribute is not used by AppletViewer, but should be present so that browsers load the plugin properly. It should point to a Java plugin in a network cab file with a value like:
       pluginspage="http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,1,0,0"

applet

The applet tag is the original HTML 3.2 tag for embedding an applet in an HTML page. Applets loaded using the applet tag are run by the browser, which may not be using the latest version of the Java platform. To ensure that the applet runs with the latest version, use the object tag to load the Java plugin into the browser. The plugin will then run the applet.
<applet
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="..." value="...">
   ...
  alternate-text
</applet>
Notes:
  • Either code or object is specified, not both.

  • The optional codebase attribute supplies a relative URL that specifies the location of the applet class.

  • Param tags supply argument values for applet parameters.

app

The app tag was a short-lived abbreviation for applet that is no longer supported. AppletViewer translates the tag and prints out an equivalent tag that is supported.
<app
  class="classFileName" (without a .class suffix)
  src="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
<param name="..." value="...">
 ...
</app>
For more information on the tags that AppletViewer supports and
how to combine them, see the Java PlugIn HTML Specification.


How Classes are Found

 SDK Tools

  • How the Java Launcher Finds Classes
    • How the Java Launcher Finds Bootstrap Classes
    • How the Java Launcher Finds Extension Classes
    • How the Java Launcher Finds User Classes
    • How the Java Launcher Finds JAR-class-path Classes
  • How Javac and Javadoc Find Classes
  • Class Loading and Security Policies

How the Java Launcher Finds Classes

The Java launcher, java, initiates the Java virtual machine. The virtual machine searches for and loads classes in this order:

  • Bootstrap classes - Classes that comprise the Java platform, including the classes in rt.jar and i18n.jar.

  • Extension classes - Classes that use the Java Extension mechanism. These are bundled as .jar files located in the extensions directory.

  • User classes - Classes defined by developers and third parties that do not take advantage of the extension mechanism. You identify the location of these classes using the -classpath option on the command line the preferred method) or by using the CLASSPATH environment variable. (See Setting the Classpath for Windows or Solaris.)

In effect, these three search paths are joined to form a simple class path. This is similar to the "flat" class path previously used, but the current model has some important differences:

  • It is relatively difficult to accidentally "hide" or omit the bootstrap classes.

  • In general, you only have to specify the location of user classes. Bootstrap classes and extension classes are found "automatically".

  • The tools classes are now in a separate archive (tools.jar) and can only be used if included in the user class path (to be explained shortly).

How the Java Launcher Finds Bootstrap Classes

Bootstrap classes are the classes that implement the Java 2 Platform. Bootstrap classes are in the rt.jar and i18n.jar archives in jre/lib directory. These archives are specified by the value of the bootstrap class path which is stored in the sun.boot.class.path system property. This system property is for reference only, and should not be directly modified.

It is very unlikely that you will need to redefine the bootstrap class path. The nonstandard option, -Xbootclasspath, allows you to do so in those rare cicrcumstances in which it is necessary to use a different set of core classes.

Note that the classes which implement the Java 2 SDK tools are in separate archive from the bootstrap classes. The tools archive is the the SDK's/lib/tools.jar file. The development tools add this archive to the user class path when invoking the launcher. However, this augmented user class path is only used to execute the tool. The tools that process source code, javac and javadoc, use the orginal class path, not the augmented version. (For more information, see How Javac and Javadoc Find Classes, below.)

How the Java Launcher Finds Extension Classes

Extension classes are classes which extend the Java platform. Every .jar file in the extension directory, jre/lib/ext, is assumed to be an extension and is loaded using the Java Extension Framework. Loose class files in the extension directory will not be found. They must be contained in a .jar file (or .zip file). There is no option provided for changing the location of the extension directory.

How the Java Launcher Finds User Classes

User classes are classes which build on the Java platform. To find user classes, the launcher refers to the user class path -- a list of directories, JAR archives, and ZIP archives which contain class files.

A class file has a subpath name that reflects the class's full-qualified name. For example, if the class com.mypackage.MyClass is stored under /myclasses, then /myclasses must be in the user class path and the full path to the class file must be /myclasses/com/mypackage/MyClass.class. If the class is stored in an archive named myclasses.jar, then myclasses.jar must be in the user class path, and the class file must be stored in the archive as com/mypackage/MyClass.class.

The user class path is specified as a string, with a colon (:) separating the class path entries on Solaris, and a semi-colon (;) separating entries on Win32 systems. The java launcher puts the user class path string in the java.class.path system property. The possible sources of this value are:

  • The default value, ".", meaning that user class files are all class files in the current directory (or under it, if in a package).

  • The value of the CLASSPATH environment variable, which overrides the default value.

  • The value of the -cp or -classpath command line option, which overrides both the default value and the CLASSPATH value.

  • The JAR archive specified by the -jar option, which overrides all other values. If this option is used, all user classes come from the specified archive.

How the Java Launcher Finds JAR-class-path Classes

A JAR file usually contains a "manifest" -- a file which lists the contents of the JAR. The manifest can define a JAR-class-path, which further extends the class path (but only while loading classes from that JAR). Classes accessed by a JAR-class-path are found in the following order:

  • In general, classes referenced by a JAR-class-path entry are found as though they were part of the JAR file. The JAR files that appear in the JAR-class-path are searched after any earlier class path entries, and before any entries that appear later in the class path.

  • However, if the JAR-class-path points to a JAR file that was already searched (for example, an extension, or a JAR file that was listed earlier in the class path) then that JAR file will not be searched again. (This optimization improves efficiency and prevents circular searches.) Such a JAR file is searched at the point that it appears, earlier in the class path.

  • If a JAR file is installed as an extension in the SDK's ext subdirectory, then any JAR-class-path it defines is ignored. All the classes required by an extension are presumed to be part of the SDK or to have themselves been installed as extensions.

How Javac and JavaDoc Find Classes

The javac and javadoc tools use class files in two distinct ways:

  • Like any Java application, javac and javadoc must load various class files in order to run.

  • To process the source code they operate on, javac and javadoc must obtain information on object types used in the source code.

The class files used to resolve source code references are mostly the same class files used to run javac and javadoc. But there are some important exceptions:

  • Both javac and javadoc often resolve references to classes and interfaces that having nothing to do with the implementation of javac or javadoc. Information on referenced user classes and interfaces may be present in the form of class files, source code files, or both.

  • The tools classes in tools.jar are only used to run javac and javadoc. The tools classes are not used to resolve source code references unless tool.jar is in the user class path.

  • A programmer may want to resolve boot class or extension class references using an alternative Java platform implementation. Both javac and javadoc support this with their -bootclasspath and -extdirs options. Use of these options does not modify the set of class files used to run the javac or javadoc tools themselves.

If a referenced class is defined in both a class file and source file, javadoc always uses the source file (javadoc never compiles source files). In the same situation javac uses class files, but automatically recompiles any class files it determines to be out of date. The rules for automatic recompilation are documented in the javac document for Windows or Solaris.

By default, javac and javadoc search the user class path for both class files and source code files. If the -sourcepath option is specified, javac and javadoc search only the specified source file path.

Class Loading and Security Policies

To be used, a class or interface must be loaded by a class loader. Use of a particular class loader determines a security policy associated with the class loader.

A program can load a class or interface by calling the loadClass method of a class loader object. But usually a program loads a class or interface simply by referring to it. This invokes an internal class loader, which can apply a security policy to extension and user classes. If the security policy has not been enabled, all classes are "trusted". Even if the security policy is enabled, it does not apply to bootstrap classes, which are always "trusted."

When enabled, security policy is configured by system and user policy files. The Java 2 SDK includes a system policy file that grants "trusted" status to extension classes and places basic restrictions on user classes.

To enable or configure the security policy, refer to Security Features.

Note: Some security programming techniques that worked with the Java 1.1 platform are incompatible with the class loading model of the Java 2 Platform.


API Help

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Inner Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES


Hierarchy

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Package Hierarchies:
com.sun.javadoc

Class Hierarchy

  • class java.lang.Object
    • class com.sun.javadoc.Doclet

Interface Hierarchy

  • interface java.lang.Comparable
    • interface com.sun.javadoc.Doc(also extends java.io.Serializable)
      • interface com.sun.javadoc.PackageDoc
      • interface com.sun.javadoc.ProgramElementDoc
        • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.Type)
        • interface com.sun.javadoc.MemberDoc
          • interface com.sun.javadoc.ExecutableMemberDoc
            • interface com.sun.javadoc.ConstructorDoc
            • interface com.sun.javadoc.MethodDoc
          • interface com.sun.javadoc.FieldDoc
      • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.DocErrorReporter)
    • interface com.sun.javadoc.SerialFieldTag(also extends com.sun.javadoc.Tag)
  • interface com.sun.javadoc.DocErrorReporter
    • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.Doc)
  • interface java.io.Serializable
    • interface com.sun.javadoc.Doc(also extends java.lang.Comparable)
      • interface com.sun.javadoc.PackageDoc
      • interface com.sun.javadoc.ProgramElementDoc
        • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.Type)
        • interface com.sun.javadoc.MemberDoc
          • interface com.sun.javadoc.ExecutableMemberDoc
            • interface com.sun.javadoc.ConstructorDoc
            • interface com.sun.javadoc.MethodDoc
          • interface com.sun.javadoc.FieldDoc
      • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.DocErrorReporter)
    • interface com.sun.javadoc.Parameter
    • interface com.sun.javadoc.Tag
      • interface com.sun.javadoc.ParamTag
      • interface com.sun.javadoc.SeeTag
      • interface com.sun.javadoc.SerialFieldTag(also extends java.lang.Comparable)
      • interface com.sun.javadoc.ThrowsTag
    • interface com.sun.javadoc.Type
      • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.ProgramElementDoc)
Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES


Index

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES
A C D E F G I K L M N O P Q R S T V

A

allClasses() - Method in interface com.sun.javadoc.PackageDoc
Get all classes (including Exceptions and Errors) and interfaces.
asClassDoc() - Method in interface com.sun.javadoc.Type
Return this type as a class.

C

ClassDoc - interface com.sun.javadoc.ClassDoc.
Represents a java class and provides access to information about the class, the class' comment and tags, and the members of the class.
classes() - Method in interface com.sun.javadoc.RootDoc
classes and interfaces to be documented.
classNamed(String) - Method in interface com.sun.javadoc.RootDoc
Return a ClassDoc for the specified class/interface name
com.sun.javadoc - package com.sun.javadoc
The javadoc API is used to customize the output of javadoc.
commentText() - Method in interface com.sun.javadoc.Doc
Return the text of the comment for this doc item.
compareTo(Object) - Method in interface com.sun.javadoc.Doc
Compares this Object with the specified Object for order.
compareTo(Object) - Method in interface com.sun.javadoc.SerialFieldTag
Compares this Object with the specified Object for order.
ConstructorDoc - interface com.sun.javadoc.ConstructorDoc.
Represents a constructor of a java class.
constructors() - Method in interface com.sun.javadoc.ClassDoc
Return constructors in class.
containingClass() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the containing class of this program element.
containingPackage() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the package that this program element is contained in.

D

definesSerializableFields() - Method in interface com.sun.javadoc.ClassDoc
Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
description() - Method in interface com.sun.javadoc.SerialFieldTag
Return the field comment.
dimension() - Method in interface com.sun.javadoc.Type
Return the type's dimension information, as a string.
Doc - interface com.sun.javadoc.Doc.
abstract base class of all Doc classes.
DocErrorReporter - interface com.sun.javadoc.DocErrorReporter.
This interface provides error, warning and notice printing.
Doclet - class com.sun.javadoc.Doclet.
This class documents the entry-point methods in a Doclet.
Doclet() - Constructor for class com.sun.javadoc.Doclet

E

errors() - Method in interface com.sun.javadoc.PackageDoc
Get Error classes in this package.
exception() - Method in interface com.sun.javadoc.ThrowsTag
Return the exception as a ClassDoc.
exceptionComment() - Method in interface com.sun.javadoc.ThrowsTag
Return the exception comment.
exceptionName() - Method in interface com.sun.javadoc.ThrowsTag
Return the exception name.
exceptions() - Method in interface com.sun.javadoc.PackageDoc
Get Exception classes in this package.
ExecutableMemberDoc - interface com.sun.javadoc.ExecutableMemberDoc.
Represents a method or constructor of a java class.

F

FieldDoc - interface com.sun.javadoc.FieldDoc.
Represents a field in a java class.
fieldName() - Method in interface com.sun.javadoc.SerialFieldTag
Return the serialziable field name.
fields() - Method in interface com.sun.javadoc.ClassDoc
Return fields in class.
fieldType() - Method in interface com.sun.javadoc.SerialFieldTag
Return the field type string.
fieldTypeDoc() - Method in interface com.sun.javadoc.SerialFieldTag
Return the ClassDoc for field type.
findClass(String) - Method in interface com.sun.javadoc.PackageDoc
Lookup for a class within this package.
findClass(String) - Method in interface com.sun.javadoc.ClassDoc
Find a class within the context of this class.
firstSentenceTags() - Method in interface com.sun.javadoc.Doc
Return the first sentence of the comment as tags.
firstSentenceTags() - Method in interface com.sun.javadoc.Tag
Return the first sentence of the comment as tags.
flatSignature() - Method in interface com.sun.javadoc.ExecutableMemberDoc
get flat signature.

G

getRawCommentText() - Method in interface com.sun.javadoc.Doc
Return the full unprocessed text of the comment.

I

importedClasses() - Method in interface com.sun.javadoc.ClassDoc
Get the list of classes declared as imported.
importedPackages() - Method in interface com.sun.javadoc.ClassDoc
Get the list of packages declared as imported.
inlineTags() - Method in interface com.sun.javadoc.Doc
Return comment as tags.
inlineTags() - Method in interface com.sun.javadoc.Tag
For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s).
innerClasses() - Method in interface com.sun.javadoc.ClassDoc
Return inner classes within this class.
interfaces() - Method in interface com.sun.javadoc.PackageDoc
Get Interfaces in this package.
interfaces() - Method in interface com.sun.javadoc.ClassDoc
Return interfaces implemented by this class or interfaces extended by this interface.
isAbstract() - Method in interface com.sun.javadoc.MethodDoc
Return true if this method is abstract
isAbstract() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class is abstract
isClass() - Method in interface com.sun.javadoc.Doc
Is this Doc item a class.
isConstructor() - Method in interface com.sun.javadoc.Doc
Is this Doc item a constructor? False until overridden.
isError() - Method in interface com.sun.javadoc.Doc
Is this Doc item a error class? False until overridden.
isException() - Method in interface com.sun.javadoc.Doc
Is this Doc item a exception class? False until overridden.
isExternalizable() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class implements java.io.Externalizable.
isField() - Method in interface com.sun.javadoc.Doc
Is this Doc item a field? False until overridden.
isFinal() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is final
isIncluded() - Method in interface com.sun.javadoc.Doc
return true if this Doc is include in the active set.
isInterface() - Method in interface com.sun.javadoc.Doc
Is this Doc item a interface? False until overridden.
isMethod() - Method in interface com.sun.javadoc.Doc
Is this Doc item a simple method (i.e.
isNative() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return true if this method is native
isOrdinaryClass() - Method in interface com.sun.javadoc.Doc
Is this Doc item a ordinary class (i.e.
isPackagePrivate() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is package private
isPrivate() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is private
isProtected() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is protected
isPublic() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is public
isSerializable() - Method in interface com.sun.javadoc.ClassDoc
Return true if this class implements java.io.Serializable.
isStatic() - Method in interface com.sun.javadoc.ProgramElementDoc
Return true if this program element is static
isSynchronized() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return true if this method is synchronized
isSynthetic() - Method in interface com.sun.javadoc.MemberDoc
Returns true if this member was synthesized by the compiler.
isTransient() - Method in interface com.sun.javadoc.FieldDoc
Return true if this field is transient
isVolatile() - Method in interface com.sun.javadoc.FieldDoc
Return true if this field is volatile

K

kind() - Method in interface com.sun.javadoc.Tag
Return the kind of this tag.

L

label() - Method in interface com.sun.javadoc.SeeTag
Return the label of the see tag.

M

MemberDoc - interface com.sun.javadoc.MemberDoc.
Represents a member of a java class: field, constructor, or method.
MethodDoc - interface com.sun.javadoc.MethodDoc.
Represents a method of a java class.
methods() - Method in interface com.sun.javadoc.ClassDoc
Return methods in class.
modifiers() - Method in interface com.sun.javadoc.ProgramElementDoc
Get modifiers string.
modifierSpecifier() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the modifier specifier integer.

N

name() - Method in interface com.sun.javadoc.Doc
Returns the name of this Doc item.
name() - Method in interface com.sun.javadoc.Tag
Return the name of this tag.
name() - Method in interface com.sun.javadoc.Parameter
Get local name of this parameter.

O

optionLength(String) - Static method in class com.sun.javadoc.Doclet
Check for doclet added options here.
options() - Method in interface com.sun.javadoc.RootDoc
Command line options.
ordinaryClasses() - Method in interface com.sun.javadoc.PackageDoc
Get ordinary classes (excluding Exceptions and Errors) in this package.
overriddenClass() - Method in interface com.sun.javadoc.MethodDoc
Return the class that overrides this method.

P

PackageDoc - interface com.sun.javadoc.PackageDoc.
Represents a java package.
packageNamed(String) - Method in interface com.sun.javadoc.RootDoc
Return a PackageDoc for the specified package name
Parameter - interface com.sun.javadoc.Parameter.
Parameter information.
parameterComment() - Method in interface com.sun.javadoc.ParamTag
Return the parameter comment.
parameterName() - Method in interface com.sun.javadoc.ParamTag
Return the parameter name.
parameters() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Get argument information.
ParamTag - interface com.sun.javadoc.ParamTag.
Represents an @param documentation tag.
paramTags() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the param tags in this method.
printError(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print error message, increment error count.
printNotice(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print a message.
printWarning(String) - Method in interface com.sun.javadoc.DocErrorReporter
Print warning message, increment warning count.
ProgramElementDoc - interface com.sun.javadoc.ProgramElementDoc.
Represents a java program element: class, interface, field, constructor, or method.

Q

qualifiedName() - Method in interface com.sun.javadoc.ProgramElementDoc
Get the fully qualified name.
qualifiedName() - Method in interface com.sun.javadoc.ConstructorDoc
Get the name.
qualifiedTypeName() - Method in interface com.sun.javadoc.Type
Return qualified name of type excluding any dimension information.

R

referencedClass() - Method in interface com.sun.javadoc.SeeTag
get the class referenced by the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
referencedClassName() - Method in interface com.sun.javadoc.SeeTag
get the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
referencedMember() - Method in interface com.sun.javadoc.SeeTag
get the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
referencedMemberName() - Method in interface com.sun.javadoc.SeeTag
get the name of the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
referencedPackage() - Method in interface com.sun.javadoc.SeeTag
get the package referenced by @see.
returnType() - Method in interface com.sun.javadoc.MethodDoc
Get return type.
RootDoc - interface com.sun.javadoc.RootDoc.
This class holds the information from one run of javadoc.

S

SeeTag - interface com.sun.javadoc.SeeTag.
Represents a see also documentation tag.
seeTags() - Method in interface com.sun.javadoc.Doc
Return the see also tags in this Doc item.
SerialFieldTag - interface com.sun.javadoc.SerialFieldTag.
Documents a Serializable field defined by an ObjectStreamField.
serialFieldTags() - Method in interface com.sun.javadoc.FieldDoc
Return the serialField tags in this FieldDoc item.
serializableFields() - Method in interface com.sun.javadoc.ClassDoc
Return the Serializable fields of class. Return either a list of default fields documented by serial tag
or return a single FieldDoc for serialPersistentField member.
serializationMethods() - Method in interface com.sun.javadoc.ClassDoc
Return the serialization methods for this class.
setRawCommentText(String) - Method in interface com.sun.javadoc.Doc
Set the full unprocessed text of the comment.
signature() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Get the signature.
specifiedClasses() - Method in interface com.sun.javadoc.RootDoc
classes and interfaces specified on the command line.
specifiedPackages() - Method in interface com.sun.javadoc.RootDoc
packages specified on the command line.
start(RootDoc) - Static method in class com.sun.javadoc.Doclet
Generate documentation here.
subclassOf(ClassDoc) - Method in interface com.sun.javadoc.ClassDoc
Test whether this class is a subclass of the specified class.
superclass() - Method in interface com.sun.javadoc.ClassDoc
Return the superclass of this class

T

Tag - interface com.sun.javadoc.Tag.
Represents a documentation tag, e.g.
tags() - Method in interface com.sun.javadoc.Doc
Return all tags in this Doc item.
tags(String) - Method in interface com.sun.javadoc.Doc
Return tags of the specified kind in this Doc item.
text() - Method in interface com.sun.javadoc.Tag
Return the text of this tag, that is, portion beyond tag name.
thrownExceptions() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return exceptions this method or constructor throws.
ThrowsTag - interface com.sun.javadoc.ThrowsTag.
Represents a @throws or @exception documentation tag.
throwsTags() - Method in interface com.sun.javadoc.ExecutableMemberDoc
Return the throws tags in this method.
toString() - Method in interface com.sun.javadoc.Tag
convert this object to a string.
toString() - Method in interface com.sun.javadoc.Parameter
Returns a string representation of the class.
toString() - Method in interface com.sun.javadoc.Type
Returns a string representation of the type.
Type - interface com.sun.javadoc.Type.
Represents a java type.
type() - Method in interface com.sun.javadoc.FieldDoc
Get type of this field.
type() - Method in interface com.sun.javadoc.Parameter
Get the type of this parameter.
typeName() - Method in interface com.sun.javadoc.Parameter
Get type name of this parameter.
typeName() - Method in interface com.sun.javadoc.Type
Return unqualified name of type excluding any dimension information.

V

validOptions(String[][], DocErrorReporter) - Static method in class com.sun.javadoc.Doclet
Check that options have the correct arguments here.
A C D E F G I K L M N O P Q R S T V
Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES


Serialized Form

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES


com.sun.javadoc Class Hierarchy

Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES

Hierarchy For Package com.sun.javadoc

Class Hierarchy

  • class java.lang.Object
    • class com.sun.javadoc.Doclet

Interface Hierarchy

  • interface java.lang.Comparable
    • interface com.sun.javadoc.Doc(also extends java.io.Serializable)
      • interface com.sun.javadoc.PackageDoc
      • interface com.sun.javadoc.ProgramElementDoc
        • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.Type)
        • interface com.sun.javadoc.MemberDoc
          • interface com.sun.javadoc.ExecutableMemberDoc
            • interface com.sun.javadoc.ConstructorDoc
            • interface com.sun.javadoc.MethodDoc
          • interface com.sun.javadoc.FieldDoc
      • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.DocErrorReporter)
    • interface com.sun.javadoc.SerialFieldTag(also extends com.sun.javadoc.Tag)
  • interface com.sun.javadoc.DocErrorReporter
    • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.Doc)
  • interface java.io.Serializable
    • interface com.sun.javadoc.Doc(also extends java.lang.Comparable)
      • interface com.sun.javadoc.PackageDoc
      • interface com.sun.javadoc.ProgramElementDoc
        • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.Type)
        • interface com.sun.javadoc.MemberDoc
          • interface com.sun.javadoc.ExecutableMemberDoc
            • interface com.sun.javadoc.ConstructorDoc
            • interface com.sun.javadoc.MethodDoc
          • interface com.sun.javadoc.FieldDoc
      • interface com.sun.javadoc.RootDoc(also extends com.sun.javadoc.DocErrorReporter)
    • interface com.sun.javadoc.Parameter
    • interface com.sun.javadoc.Tag
      • interface com.sun.javadoc.ParamTag
      • interface com.sun.javadoc.SeeTag
      • interface com.sun.javadoc.SerialFieldTag(also extends java.lang.Comparable)
      • interface com.sun.javadoc.ThrowsTag
    • interface com.sun.javadoc.Type
      • interface com.sun.javadoc.ClassDoc(also extends com.sun.javadoc.ProgramElementDoc)
Package Class Tree Index Help
PREV NEXT FRAMES NO FRAMES


Package com.sun.javadoc

The doclet API is used to customize the output of javadoc.

See:
Description

Interface Summary
ClassDoc | Represents a java class and provides access to information about the class, the class' comment and tags, and the members of the class.
ConstructorDoc | Represents a constructor of a java class.
Doc | abstract base class of all Doc classes.
DocErrorReporter | This interface provides error, warning and notice printing.
ExecutableMemberDoc | Represents a method or constructor of a java class.
FieldDoc | Represents a field in a java class.
MemberDoc | Represents a member of a java class: field, constructor, or method.
MethodDoc | Represents a method of a java class.
PackageDoc | Represents a java package.
Parameter | Parameter information.
ParamTag | Represents an @param documentation tag.
ProgramElementDoc | Represents a java program element: class, interface, field, constructor, or method.
RootDoc | This class holds the information from one run of javadoc.
SeeTag | Represents a see also documentation tag.
SerialFieldTag | Documents a Serializable field defined by an ObjectStreamField.
Tag | Represents a documentation tag, e.g.
ThrowsTag | Represents a @throws or @exception documentation tag.
Type | Represents a java type.

Class Summary
Doclet This class documents the entry-point methods in a Doclet.

Package com.sun.javadoc Description

The doclet API is used to customize the output of javadoc. Doclets are invoked by javadoc and use this API to obtain program structure information. The invocation is defined by the abstract Doclet class - the entry point is the start method:

    public static boolean start(RootDoc root)
The RootDoc instance holds the root of the program structure information. From this root all other program structure information can be extracted. For example, the following doclet displays information in the @param tags of the processed classes:
import com.sun.javadoc.*;

public class ListParams extends Doclet {

    public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();
        for (int i = 0; i ClassDoc cd = classes[i];
            printMembers(cd.constructors());
            printMembers(cd.methods());
        }
        return true;
    }

    static void printMembers(ExecutableMemberDoc[] mems) {
        for (int i = 0; i ParamTag[] params = mems[i].paramTags();
            System.out.println(mems[i].qualifiedName());
            for (int j = 0; j parameterName()
                    + " - " + params[j].parameterComment());
            }
        }
    }
}
Methods from the doclet API are marked in red. Interfaces from the doclet API are marked in green (Doclet is an abstract class that specifies the invocation interface for doclets, ClassDoc holds class information, ExecutableMemberDoc is a superinterface of MethodDoc and ConstructorDoc, and ParamTag holds information from "@param" tags.

This doclet when invoked with a command line like:

    javadoc -doclet ListParams -sourcepath <source-location> java.util
produces output like:
    ...
    java.util.ArrayList.add
       index - index at which the specified element is to be inserted.
       element - element to be inserted.
    java.util.ArrayList.remove
       index - the index of the element to removed.
    ...

See Also:
Doclet, RootDoc
Package Class Tree Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


ClassDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ClassDoc

public abstract interface ClassDoc
extends ProgramElementDoc, Type

Represents a java class and provides access to information about the class, the class' comment and tags, and the members of the class. A ClassDoc only exists if it was processed in this run of javadoc. References to classes which may or may not have been processed in this run are referred to using Type (which can be converted to ClassDoc, if possible).

Since:
JDK1.2
See Also:
Type

Fields inherited from class java.io.Serializable
serialVersionUID
Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ConstructorDoc[] | constructors() Return constructors in class.
boolean | definesSerializableFields() Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
FieldDoc[] | fields() Return fields in class.
ClassDoc | findClass(java.lang.String className) Find a class within the context of this class.
ClassDoc[] | importedClasses() Get the list of classes declared as imported.
PackageDoc[] | importedPackages() Get the list of packages declared as imported.
ClassDoc[] | innerClasses() Return inner classes within this class.
ClassDoc[] | interfaces() Return interfaces implemented by this class or interfaces extended by this interface.
boolean | isAbstract() Return true if this class is abstract
boolean | isExternalizable() Return true if this class implements java.io.Externalizable.
boolean | isSerializable() Return true if this class implements java.io.Serializable.
MethodDoc[] | methods() Return methods in class.
FieldDoc[] | serializableFields() Return the Serializable fields of class. Return either a list of default fields documented by serial tag or return a single FieldDoc for serialPersistentField member.
MethodDoc[] | serializationMethods() Return the serialization methods for this class.
boolean | subclassOf(ClassDoc cd) Test whether this class is a subclass of the specified class.
ClassDoc | superclass() Return the superclass of this class
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface com.sun.javadoc.Type
asClassDoc, dimension, qualifiedTypeName, toString, typeName
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

isAbstract

public boolean isAbstract()
Return true if this class is abstract

isSerializable

public boolean isSerializable()
Return true if this class implements java.io.Serializable. Since java.io.Externalizable extends java.io.Serializable, Externalizable objects are also Serializable.

isExternalizable

public boolean isExternalizable()
Return true if this class implements java.io.Externalizable.

serializationMethods

public MethodDoc[] serializationMethods()
Return the serialization methods for this class.
Returns:
an array of MethodDoc that represents the serialization methods for this class.

serializableFields

public FieldDoc[] serializableFields()
Return the Serializable fields of class.

Return either a list of default fields documented by serial tag
or return a single FieldDoc for serialPersistentField member. There should be a serialField tag for each Serializable field defined by an ObjectStreamField array component of serialPersistentField.

See Also:
definesSerializableFields(), SerialFieldTag

definesSerializableFields

public boolean definesSerializableFields()
Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
See Also:
serializableFields(), SerialFieldTag

superclass

public ClassDoc superclass()
Return the superclass of this class
Returns:
the ClassDoc for the superclass of this class, null if there is no superclass.

subclassOf

public boolean subclassOf(ClassDoc cd)
Test whether this class is a subclass of the specified class.
Parameters:
cd - the candidate superclass.
Returns:
true if cd is a superclass of this class.

interfaces

public ClassDoc[] interfaces()
Return interfaces implemented by this class or interfaces extended by this interface. Includes only directly declared interfaces, not inherited interfaces.
Returns:
An array of ClassDoc representing the interfaces. Return an empty array if there are no interfaces.

fields

public FieldDoc[] fields()
Return fields in class.
Returns:
an array of FieldDoc for representing the visible fields in this class.

methods

public MethodDoc[] methods()
Return methods in class.
Returns:
an array of MethodDoc for representing the visible methods in this class. Does not include constructors.

constructors

public ConstructorDoc[] constructors()
Return constructors in class.
Returns:
an array of ConstructorDoc for representing the visible constructors in this class.

innerClasses

public ClassDoc[] innerClasses()
Return inner classes within this class.
Returns:
an array of ClassDoc for representing the visible classes defined in this class. Anonymous and local classes are not included.

findClass

public ClassDoc findClass(java.lang.String className)
Find a class within the context of this class. Search order: qualified name, in this class (inner), in this package, in the class imports, in the package imports. Return the ClassDoc if found, null if not found.

importedClasses

public ClassDoc[] importedClasses()
Get the list of classes declared as imported. These are called "single-type-import declarations" in the JLS.
Returns:
an array of ClassDoc representing the imported classes.

importedPackages

public PackageDoc[] importedPackages()
Get the list of packages declared as imported. These are called "type-import-on-demand declarations" in the JLS.
Returns:
an array of PackageDoc representing the imported packages.
Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ConstructorDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ConstructorDoc

public abstract interface ConstructorDoc
extends ExecutableMemberDoc

Represents a constructor of a java class.

Since:
1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
 java.lang.String qualifiedName()
Get the name.
Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc
flatSignature, isNative, isSynchronized, parameters, paramTags, signature, thrownExceptions, throwsTags
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

qualifiedName

public java.lang.String qualifiedName()
Get the name.
Returns:
the qualified name of the member.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Doc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface Doc

All Known Subinterfaces:
ClassDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MemberDoc, MethodDoc, PackageDoc, ProgramElementDoc, RootDoc
public abstract interface Doc
extends java.io.Serializable, java.lang.Comparable

abstract base class of all Doc classes. Doc item's are representations of java language constructs (class, package, method,...) which have comments and have been processed by this run of javadoc. All Doc items are unique, that is, they are == comparable.

Since:
1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
java.lang.String | commentText() Return the text of the comment for this doc item.
int | compareTo(java.lang.Object obj) Compares this Object with the specified Object for order.
Tag[] | firstSentenceTags() Return the first sentence of the comment as tags.
java.lang.String | getRawCommentText() Return the full unprocessed text of the comment.
Tag[] | inlineTags() Return comment as tags.
boolean | isClass() Is this Doc item a class.
boolean | isConstructor() Is this Doc item a constructor? False until overridden.
boolean | isError() Is this Doc item a error class? False until overridden.
boolean | isException() Is this Doc item a exception class? False until overridden.
boolean | isField() Is this Doc item a field? False until overridden.
boolean | isIncluded() return true if this Doc is include in the active set.
boolean | isInterface() Is this Doc item a interface? False until overridden.
boolean | isMethod() Is this Doc item a simple method (i.e.
boolean | isOrdinaryClass() Is this Doc item a ordinary class (i.e.
java.lang.String | name() Returns the name of this Doc item.
SeeTag[] | seeTags() Return the see also tags in this Doc item.
void | setRawCommentText(java.lang.String rawDocumentation) Set the full unprocessed text of the comment.
Tag[] | tags() Return all tags in this Doc item.
Tag[] | tags(java.lang.String tagname) Return tags of the specified kind in this Doc item.

Method Detail

commentText

public java.lang.String commentText()
Return the text of the comment for this doc item. Tags have been removed.

tags

public Tag[] tags()
Return all tags in this Doc item.
Returns:
an array of Tag containing all tags on this Doc item.

tags

public Tag[] tags(java.lang.String tagname)
Return tags of the specified kind in this Doc item.
Parameters:
tagname - name of the tag kind to search for.
Returns:
an array of Tag containing all tags whose 'kind()' matches 'tagname'.

seeTags

public SeeTag[] seeTags()
Return the see also tags in this Doc item.
Returns:
an array of SeeTag containing all @see tags.

inlineTags

public Tag[] inlineTags()
Return comment as tags. Includes inline tags (i.e. {@link reference} tags) but not regular tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "link".
Returns:
an array of Tags representing the comment

firstSentenceTags

public Tag[] firstSentenceTags()
Return the first sentence of the comment as tags. Includes inline tags (i.e. {@link reference} tags) but not regular tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "link". First sentence is determined by java.text.BreakIterator#getSentenceInstance(Locale).
Returns:
an array of Tags representing the first sentence of the comment

getRawCommentText

public java.lang.String getRawCommentText()
Return the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

setRawCommentText

public void setRawCommentText(java.lang.String rawDocumentation)
Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

name

public java.lang.String name()
Returns the name of this Doc item.
Returns:
the name

compareTo

public int compareTo(java.lang.Object obj)
Compares this Object with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.

Included so that Doc item are java.lang.Comparable.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - the specified Object's type prevents it from being compared to this Object.

isField

public boolean isField()
Is this Doc item a field? False until overridden.
Returns:
true if it represents a field

isMethod

public boolean isMethod()
Is this Doc item a simple method (i.e. not a constructor)? False until overridden.
Returns:
true is it represents a method, false if it is anything else, including constructor, field, class, ...

isConstructor

public boolean isConstructor()
Is this Doc item a constructor? False until overridden.
Returns:
true is it represents a constructor

isInterface

public boolean isInterface()
Is this Doc item a interface? False until overridden.
Returns:
true is it represents a interface

isException

public boolean isException()
Is this Doc item a exception class? False until overridden.
Returns:
true is it represents a exception

isError

public boolean isError()
Is this Doc item a error class? False until overridden.
Returns:
true is it represents a error

isOrdinaryClass

public boolean isOrdinaryClass()
Is this Doc item a ordinary class (i.e. not an interface, exception, or error)? False until overridden.
Returns:
true is it represents a class

isClass

public boolean isClass()
Is this Doc item a class. Note: interfaces are not classes. False until overridden.
Returns:
true is it represents a class

isIncluded

public boolean isIncluded()
return true if this Doc is include in the active set.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocErrorReporter

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface DocErrorReporter

All Known Subinterfaces:
RootDoc
public abstract interface DocErrorReporter

This interface provides error, warning and notice printing.

Since:
1.2

Method Summary
void | printError(java.lang.String msg) Print error message, increment error count.
void | printNotice(java.lang.String msg) Print a message.
void | printWarning(java.lang.String msg) Print warning message, increment warning count.

Method Detail

printError

public void printError(java.lang.String msg)
Print error message, increment error count.
Parameters:
msg - message to print

printWarning

public void printWarning(java.lang.String msg)
Print warning message, increment warning count.
Parameters:
msg - message to print

printNotice

public void printNotice(java.lang.String msg)
Print a message.
Parameters:
msg - message to print
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Doclet

Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Class Doclet

java.lang.Object
  |
  +--com.sun.javadoc.Doclet
public abstract class Doclet
extends java.lang.Object

This class documents the entry-point methods in a Doclet. It may be used as the superclass of a doclet but this is not required.

Constructor Summary
Doclet()
Method Summary
static int | optionLength(java.lang.String option) Check for doclet added options here.
static boolean | start(RootDoc root) Generate documentation here.
static boolean | validOptions(java.lang.String[][] options, DocErrorReporter reporter) Check that options have the correct arguments here.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Doclet

public Doclet()
Method Detail

start

public static boolean start(RootDoc root)
Generate documentation here. This method is required for all doclets.
Returns:
true on success.

optionLength

public static int optionLength(java.lang.String option)
Check for doclet added options here.

This method is not required and will default gracefully (to zero) if absent.

Returns:
number of arguments to option. Zero return means option not known. Negative value means error occurred.

validOptions

public static boolean validOptions(java.lang.String[][] options,
                                   DocErrorReporter reporter)
Check that options have the correct arguments here.

This method is not required and will default gracefully (to true) if absent.

Printing option related error messages (using the provided DocErrorReporter) is the responsibility of this method.

Returns:
true if the options are valid.
Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExecutableMemberDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ExecutableMemberDoc

All Known Subinterfaces:
ConstructorDoc, MethodDoc
public abstract interface ExecutableMemberDoc
extends MemberDoc

Represents a method or constructor of a java class.

Since:
JDK1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
java.lang.String | flatSignature() get flat signature.
boolean | isNative() Return true if this method is native
boolean | isSynchronized() Return true if this method is synchronized
Parameter[] | parameters() Get argument information.
ParamTag[] | paramTags() Return the param tags in this method.
java.lang.String | signature() Get the signature.
ClassDoc[] | thrownExceptions() Return exceptions this method or constructor throws.
ThrowsTag[] | throwsTags() Return the throws tags in this method.
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

thrownExceptions

public ClassDoc[] thrownExceptions()
Return exceptions this method or constructor throws.
Returns:
an array of Type[] representing the exceptions thrown by this method.

isNative

public boolean isNative()
Return true if this method is native

isSynchronized

public boolean isSynchronized()
Return true if this method is synchronized

parameters

public Parameter[] parameters()
Get argument information.
Returns:
an array of Parameter, one element per argument in the order the arguments are present.
See Also:
Parameter

throwsTags

public ThrowsTag[] throwsTags()
Return the throws tags in this method.
Returns:
an array of ThrowTag containing all @exception and @throws tags.

paramTags

public ParamTag[] paramTags()
Return the param tags in this method.
Returns:
an array of ParamTag containing all @param tags.

signature

public java.lang.String signature()
Get the signature. It is the parameter list, type is qualified. For instance, for a method mymethod(String x, int y), it will return (java.lang.String,int).

flatSignature

public java.lang.String flatSignature()
get flat signature. all types are not qualified. return a String, which is the flat signiture of this member. It is the parameter list, type is not qualified. For instance, for a method mymethod(String x, int y), it will return (String, int).
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface FieldDoc

public abstract interface FieldDoc
extends MemberDoc

Represents a field in a java class.

Since:
JDK1.2
See Also:
MemberDoc

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
boolean | isTransient() Return true if this field is transient
boolean | isVolatile() Return true if this field is volatile
SerialFieldTag[] | serialFieldTags() Return the serialField tags in this FieldDoc item.
Type | type() Get type of this field.
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

type

public Type type()
Get type of this field.

isTransient

public boolean isTransient()
Return true if this field is transient

isVolatile

public boolean isVolatile()
Return true if this field is volatile

serialFieldTags

public SerialFieldTag[] serialFieldTags()
Return the serialField tags in this FieldDoc item.
Returns:
an array of SerialFieldTag<\tt> containing all @serialField<\code> tags.
Package   Class  Tree  Index  Help
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


MemberDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface MemberDoc

All Known Subinterfaces:
ConstructorDoc, ExecutableMemberDoc, FieldDoc, MethodDoc
public abstract interface MemberDoc
extends ProgramElementDoc

Represents a member of a java class: field, constructor, or method. This is an abstract class dealing with information common to method, constructor and field members. Class members of a class (innerclasses) are represented instead by ClassDoc.

See Also:
MethodDoc, FieldDoc, ClassDoc

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
 boolean isSynthetic()
Returns true if this member was synthesized by the compiler.
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

isSynthetic

public boolean isSynthetic()
Returns true if this member was synthesized by the compiler.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MethodDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface MethodDoc

public abstract interface MethodDoc
extends ExecutableMemberDoc

Represents a method of a java class.

Since:
JDK1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
boolean | isAbstract() Return true if this method is abstract
ClassDoc | overriddenClass() Return the class that overrides this method.
Type | returnType() Get return type.
Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc
flatSignature, isNative, isSynchronized, parameters, paramTags, signature, thrownExceptions, throwsTags
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

isAbstract

public boolean isAbstract()
Return true if this method is abstract

returnType

public Type returnType()
Get return type.
Returns:
the return type of this method, null if it is a constructor.

overriddenClass

public ClassDoc overriddenClass()
Return the class that overrides this method.
Returns:
a ClassDoc representing the superclass that overrides this method, null if this method is not overriden.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackageDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface PackageDoc

public abstract interface PackageDoc
extends Doc

Represents a java package. Provides access to information about the package, the package's comment and tags, and the classes in the package.

Since:
JDK1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ClassDoc[] | allClasses() Get all classes (including Exceptions and Errors) and interfaces.
ClassDoc[] | errors() Get Error classes in this package.
ClassDoc[] | exceptions() Get Exception classes in this package.
ClassDoc | findClass(java.lang.String className) Lookup for a class within this package.
ClassDoc[] | interfaces() Get Interfaces in this package.
ClassDoc[] | ordinaryClasses() Get ordinary classes (excluding Exceptions and Errors) in this package.
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

allClasses

public ClassDoc[] allClasses()
Get all classes (including Exceptions and Errors) and interfaces.
Returns:
all included classes and interfaces in this package.

ordinaryClasses

public ClassDoc[] ordinaryClasses()
Get ordinary classes (excluding Exceptions and Errors) in this package.
Returns:
included classes in this package.

exceptions

public ClassDoc[] exceptions()
Get Exception classes in this package.
Returns:
included Exceptions in this package.

errors

public ClassDoc[] errors()
Get Error classes in this package.
Returns:
included Errors in this package.

interfaces

public ClassDoc[] interfaces()
Get Interfaces in this package.
Returns:
included Errors in this package.

findClass

public ClassDoc findClass(java.lang.String className)
Lookup for a class within this package.
Returns:
ClassDoc of found class, or null if not found.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Parameter

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface Parameter

public abstract interface Parameter
extends java.io.Serializable

Parameter information. This includes a parameter type and parameter name.

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
java.lang.String | name() Get local name of this parameter.
java.lang.String | toString() Returns a string representation of the class.
Type | type() Get the type of this parameter.
java.lang.String | typeName() Get type name of this parameter.

Method Detail

type

public Type type()
Get the type of this parameter.

name

public java.lang.String name()
Get local name of this parameter. For example if parameter is the short 'index', returns "index".

typeName

public java.lang.String typeName()
Get type name of this parameter. For example if parameter is the short 'index', returns "short".

toString

public java.lang.String toString()
Returns a string representation of the class.

For example if parameter is the short 'index', returns "short index".

Returns:
type name and parameter name of this parameter.
Overrides:
toString in class java.lang.Object
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParamTag

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ParamTag

public abstract interface ParamTag
extends Tag

Represents an @param documentation tag. The parses and stores the name and comment parts of the method/constructor parameter tag.

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
java.lang.String | parameterComment() Return the parameter comment.
java.lang.String | parameterName() Return the parameter name.
Methods inherited from interface com.sun.javadoc.Tag
firstSentenceTags, inlineTags, kind, name, text, toString

Method Detail

parameterName

public java.lang.String parameterName()
Return the parameter name.

parameterComment

public java.lang.String parameterComment()
Return the parameter comment.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProgramElementDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ProgramElementDoc

All Known Subinterfaces:
ClassDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MemberDoc, MethodDoc
public abstract interface ProgramElementDoc
extends Doc

Represents a java program element: class, interface, field, constructor, or method. This is an abstract class dealing with information common to these elements.

See Also:
MemberDoc, ClassDoc

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ClassDoc | containingClass() Get the containing class of this program element.
PackageDoc | containingPackage() Get the package that this program element is contained in.
boolean | isFinal() Return true if this program element is final
boolean | isPackagePrivate() Return true if this program element is package private
boolean | isPrivate() Return true if this program element is private
boolean | isProtected() Return true if this program element is protected
boolean | isPublic() Return true if this program element is public
boolean | isStatic() Return true if this program element is static
java.lang.String | modifiers() Get modifiers string.
int | modifierSpecifier() Get the modifier specifier integer.
java.lang.String | qualifiedName() Get the fully qualified name.
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags

Method Detail

containingClass

public ClassDoc containingClass()
Get the containing class of this program element.
Returns:
a ClassDoc for this element's containing class. If this is a class with no outer class, return null.

containingPackage

public PackageDoc containingPackage()
Get the package that this program element is contained in.
Returns:
a PackageDoc for this element containing package. If in the unnamed package, this PackageDoc will have the name "".

qualifiedName

public java.lang.String qualifiedName()
Get the fully qualified name.
 Example:
  for the class java.util.Hashtable, return:
       java.util.Hashtable
  for the method bar() in class Foo in the unnamed package, return:
       Foo.bar()
Returns:
the qualified name of the program element as a String.

modifierSpecifier

public int modifierSpecifier()
Get the modifier specifier integer.
See Also:
Modifier

modifiers

public java.lang.String modifiers()
Get modifiers string.
 Example, for:
   public abstract int foo() { ... }
 modifiers() would return:
   'public abstract'

isPublic

public boolean isPublic()
Return true if this program element is public

isProtected

public boolean isProtected()
Return true if this program element is protected

isPrivate

public boolean isPrivate()
Return true if this program element is private

isPackagePrivate

public boolean isPackagePrivate()
Return true if this program element is package private

isStatic

public boolean isStatic()
Return true if this program element is static

isFinal

public boolean isFinal()
Return true if this program element is final
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RootDoc

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface RootDoc

public abstract interface RootDoc
extends Doc, DocErrorReporter

This class holds the information from one run of javadoc. Particularly the packages, classes and options specified by the user..

Since:
JDK1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ClassDoc[] | classes() classes and interfaces to be documented.
ClassDoc | classNamed(java.lang.String qualifiedName) Return a ClassDoc for the specified class/interface name
java.lang.String[][] | options() Command line options.
PackageDoc | packageNamed(java.lang.String name) Return a PackageDoc for the specified package name
ClassDoc[] | specifiedClasses() classes and interfaces specified on the command line.
PackageDoc[] | specifiedPackages() packages specified on the command line.
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags
Methods inherited from interface com.sun.javadoc.DocErrorReporter
printError, printNotice, printWarning

Method Detail

options

public java.lang.String[][] options()
Command line options.
 For example, given:
     javadoc -foo this that -bar other ...

 This method will return:
      options()[0][0] = "-foo"
      options()[0][1] = "this"
      options()[0][2] = "that"
      options()[1][0] = "-bar"
      options()[1][1] = "other"
Returns:
an array of arrays of String.

specifiedPackages

public PackageDoc[] specifiedPackages()
packages specified on the command line.

specifiedClasses

public ClassDoc[] specifiedClasses()
classes and interfaces specified on the command line.

classes

public ClassDoc[] classes()
classes and interfaces to be documented.

packageNamed

public PackageDoc packageNamed(java.lang.String name)
Return a PackageDoc for the specified package name
Parameters:
name - package name
Returns:
a PackageDoc holding the specified package, null if this package is not referenced.

classNamed

public ClassDoc classNamed(java.lang.String qualifiedName)
Return a ClassDoc for the specified class/interface name
Parameters:
qualifiedName - qualified class name (i.e. includes package name).
Returns:
a ClassDoc holding the specified class, null if this class is not referenced.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SeeTag

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface SeeTag

public abstract interface SeeTag
extends Tag

Represents a see also documentation tag. The @see tag can be plain text, or reference a class or member.

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
 java.lang.String label()
Return the label of the see tag.
 ClassDoc referencedClass()
get the class referenced by the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
 java.lang.String referencedClassName()
get the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
 MemberDoc referencedMember()
get the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
 java.lang.String referencedMemberName()
get the name of the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) .
 PackageDoc referencedPackage()
get the package referenced by @see.
Methods inherited from interface com.sun.javadoc.Tag
firstSentenceTags, inlineTags, kind, name, text, toString

Method Detail

label

public java.lang.String label()
Return the label of the see tag.

referencedPackage

public PackageDoc referencedPackage()
get the package referenced by @see. For instance, if the comment is @see java.lang This function returns a PackageDoc for java.lang Returns null if no known package found.

referencedClassName

public java.lang.String referencedClassName()
get the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) . This function returns String. Returns null if format was not that of java reference. Return empty string if class name was not specified..

referencedClass

public ClassDoc referencedClass()
get the class referenced by the class name part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) . This function returns a ClassDoc for java.lang.String. Returns null if class is not a class specified on the javadoc command line..

referencedMemberName

public java.lang.String referencedMemberName()
get the name of the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) . This function returns "startsWith(java.lang.String)" Returns null if format was not that of java reference. Return empty string if member name was not specified..

referencedMember

public MemberDoc referencedMember()
get the member referenced by the prototype part of @see, For instance, if the comment is @see String#startsWith(java.lang.String) . This function returns a MethodDoc for startsWith. Returns null if member could not be determined.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SerialFieldTag

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface SerialFieldTag

public abstract interface SerialFieldTag
extends Tag, java.lang.Comparable

Documents a Serializable field defined by an ObjectStreamField.

 The class parses and stores the three serialField tag parameters:

 - field name
 - field type name
      (fully-qualified or visible from the current import context)
 - description of the valid values for the field
This tag is only allowed in the javadoc for the special member serialPersistentFields.

See Also:
ObjectStreamField

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
int | compareTo(java.lang.Object obj) Compares this Object with the specified Object for order.
java.lang.String | description() Return the field comment.
java.lang.String | fieldName() Return the serialziable field name.
java.lang.String | fieldType() Return the field type string.
ClassDoc | fieldTypeDoc() Return the ClassDoc for field type.
Methods inherited from interface com.sun.javadoc.Tag
firstSentenceTags, inlineTags, kind, name, text, toString

Method Detail

fieldName

public java.lang.String fieldName()
Return the serialziable field name.

fieldType

public java.lang.String fieldType()
Return the field type string.

fieldTypeDoc

public ClassDoc fieldTypeDoc()
Return the ClassDoc for field type.

description

public java.lang.String description()
Return the field comment. If there is no serialField comment, return javadoc comment of corresponding FieldDoc.

compareTo

public int compareTo(java.lang.Object obj)
Compares this Object with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.

Included to make SerialFieldTag items java.lang.Comparable.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - the specified Object's type prevents it from being compared to this Object.
Since:
JDK1.2
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Tag

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface Tag

All Known Subinterfaces:
ParamTag, SeeTag, SerialFieldTag, ThrowsTag
public abstract interface Tag
extends java.io.Serializable

Represents a documentation tag, e.g. @since, @author, @version. Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since") and tag text (e.g. "1.2"). Tags with structure or which require special processing are handled by subclasses (ParamTag, SeeTag, and ThrowsTag.

See Also:
SeeTag, ParamTag, ThrowsTag, Doc.tags()

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
Tag[] | firstSentenceTags() Return the first sentence of the comment as tags.
Tag[] | inlineTags() For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s).
java.lang.String | kind() Return the kind of this tag.
java.lang.String | name() Return the name of this tag.
java.lang.String | text() Return the text of this tag, that is, portion beyond tag name.
java.lang.String | toString() convert this object to a string.

Method Detail

name

public java.lang.String name()
Return the name of this tag.

kind

public java.lang.String kind()
Return the kind of this tag.

text

public java.lang.String text()
Return the text of this tag, that is, portion beyond tag name.

toString

public java.lang.String toString()
convert this object to a string.
Overrides:
toString in class java.lang.Object

inlineTags

public Tag[] inlineTags()
For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s). Within a comment string "This is an example of inline tags for a documentaion comment {@link Doc commentlabel}", where inside the inner braces, the first "Doc" carries exctly the same syntax as a SeeTag and the second "commentlabel" is label for the Html Link, will return an array of Tag(s) with first element as Tag with comment text "This is an example of inline tags for a documentation comment" and second element as SeeTag with referenced class as "Doc" and the label for the Html Link as "commentlabel".
Returns:
Tag[] Array of tags with inline SeeTags.
See Also:
ParamTag, ThrowsTag

firstSentenceTags

public Tag[] firstSentenceTags()
Return the first sentence of the comment as tags. Includes inline tags (i.e. {@link reference} tags) but not regular tags. Each section of plain text is represented as a Tag of kind "Text". Inline tags are represented as a SeeTag of kind "link". First sentence is determined by java.text.BreakIterator#getSentenceInstance(Locale).
Returns:
an array of Tags representing the first sentence of the comment
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThrowsTag

Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface ThrowsTag

public abstract interface ThrowsTag
extends Tag

Represents a @throws or @exception documentation tag. Parses and holds the exception name and exception comment. Note: @exception is a backwards compatible synonymy for @throws.

See Also:
ExecutableMemberDoc.throwsTags()

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ClassDoc | exception() Return the exception as a ClassDoc.
java.lang.String | exceptionComment() Return the exception comment.
java.lang.String | exceptionName() Return the exception name.
Methods inherited from interface com.sun.javadoc.Tag
firstSentenceTags, inlineTags, kind, name, text, toString

Method Detail

exceptionName

public java.lang.String exceptionName()
Return the exception name.

exceptionComment

public java.lang.String exceptionComment()
Return the exception comment.

exception

public ClassDoc exception()
Return the exception as a ClassDoc.
Package Class Tree Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Type

Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

com.sun.javadoc
Interface Type

All Known Subinterfaces:
ClassDoc
public abstract interface Type
extends java.io.Serializable

Represents a java type. Type can be a class or primitive data type, like int, char...

Since:
JDK1.2

Fields inherited from class java.io.Serializable
serialVersionUID
Method Summary
ClassDoc | asClassDoc() Return this type as a class.
java.lang.String | dimension() Return the type's dimension information, as a string.
java.lang.String | qualifiedTypeName() Return qualified name of type excluding any dimension information.
java.lang.String | toString() Returns a string representation of the type.
java.lang.String | typeName() Return unqualified name of type excluding any dimension information.

Method Detail

typeName

public java.lang.String typeName()
Return unqualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'String'.

qualifiedTypeName

public java.lang.String qualifiedTypeName()
Return qualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'java.lang.String'.

dimension

public java.lang.String dimension()
Return the type's dimension information, as a string.

For example, a two dimensional array of String returns '[][]'.

toString

public java.lang.String toString()
Returns a string representation of the type. Return name of type including any dimension information.

For example, a two dimensional array of String returns String[][].

Returns:
name of type including any dimension information.
Overrides:
toString in class java.lang.Object

asClassDoc

public ClassDoc asClassDoc()
Return this type as a class. Array dimensions are ignored.
Returns:
a ClassDoc if the type is a Class. Return null if it is a primitive type..
Package Class Tree Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Doclet Overview

Contents

  • The Basics
  • A Simple Example Doclet
  • Example - Subclassing the standard doclet
  • Example - Creating and handling custom tags
  • Example - Using custom command-line options

The Basics

Doclets are programs written in the JavaTM programming language that use the doclet API to specify the content and format of the output of the Javadoc tool. By default, the Javadoc tool uses the "standard" doclet provided by SunTM to generate API documentation in HTML form. However, you can supply your own doclets to customize the output of Javadoc as you like. You can write the doclets from scratch using the doclet API, or you can start with the standard doclet and modify it to suit your needs.

Here are the basic steps you need to follow to create and use your own doclet:

  1. Write the Java program that constitutes your doclet. Your program should import com.sun.javadoc.* in order to use the doclet API. The entry point of your program is a class with a public static boolean start method that takes a RootDoc as a parameter.
  2. Compile your doclet. You can use the compiler in the Java 2 SDK, javac.
  3. Run the javadoc tool using the -doclet startingclass option to produce the output specified by your doclet, where startingclass is the fully-qualified name of the starting class mentioned in step 1 above.
The doclet API class files are in the lib/tools.jar file in the SDK. When you compile a doclet and when you use a custom doclet, the tools.jar must be on the class path. You can use the -classpath option on javac and javadoc for this purpose.

If you run javadoc without the -doclet command-line option, it will default to the standard doclet to produce HTML-format API documentation.

Package com.sun.javadoc consists of interfaces that define the doclet API. The lib/tools.jar file in the Java 2 SDK contains these interfaces and also a private package with classes that implement the interfaces. The tools.jar file also contains the classes implementing the standard doclet.

A Simple Example Doclet

You can get a feeling for the way doclets work by looking at this simple example doclet that consists of one short class:
import com.sun.javadoc.*;

public class ListClass {
    public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();
        for (int i = 0; i
As you might be able to guess by looking at the code, this doclet takes the classes upon which Javadoc is operating and prints their names to standard out.

This first thing to notice about the doclet is that it imports the com.sun.javadoc package in order to use the doclet APIs. As with all doclets, the entry point is the public static boolean start method. The start method takes a RootDoc as a parameter. This parameter carries information about any options specified on the command line when javadoc is run, and also about the classes and packages upon which javadoc is operating.

RootDoc defines a classes method that returns a ClassDoc array whose elements represent the classes that Javadoc parses. The for loop then prints out the names of each class in the array. (Passing a ClassDoc to println results in the printing of the name of the class that the ClassDoc represents.)

To run this doclet, you first have to compile it. You can compile it with the javac compiler. The doclet API classfiles are in the file lib/tools.jar in the Java 2 SDK, and you therefore need to include tools.jar on the compiler's classpath, as in this example:

javac -classpath C:\jdk1.3\lib\tools.jar ListClass.java
To run the ListClass doclet, you point to the compiled doclet with Javadoc's -doclet tag. For example, to run the doclet on a file called MyClass.java, you could use this command:
% javadoc -doclet ListClass -classpath C:\jdk1.3\lib\tools.jar MyClass.java
The output will be the string "MyClass". Note that this command also requires tools.jar to be on the class path.

A note about command-line options: If you run javadoc -help, you'll see that the Javadoc tool has two sets of command-line options. One set is generic and will work with any doclet. The second set of options is special to the standard doclet. Options in this second set will not be available when using custom doclets. Your custom doclets can also define their own command-line options. See the example below.

To generate API documentation, a doclet will have to be considerably more complex than this simple example. If you want to customize the format of the API documentation generated by Javadoc, you may want to start with the default standard doclet and modify it as necessary rather than write your own doclet from scratch.

Example - Subclassing the Standard Doclet

To customize the output of the Javadoc tool, you need to write your own doclet that specifies the content and format of the output that you desire. If you want HTML output with roughly the same format as the default output, you can use the standard doclet as a starting point for creating your doclet. You can subclass appropriate classes in the standard doclet and then add or override methods as necessary to produce the output you want. Or you can copy the whole standard doclet and modify it. If you use a copy of the standard doclet as your starting point, you may want to remove the package statements at the beginning of each source file and replace them with the name of your own, new package.

For an example, see How can I modify the standard doclet to produce links to source code from the API documentation? Please send any corrections to javadoc-tool@sun.com.

Example - Creating and handling custom tags

Suppose, for example, that you want use a custom tag, say @mytag, in your documentation comments in addition to the standard tags like @param and @return. To make use of the information in your custom tags, you need to have your doclet use instances of Tag that represent your custom tags. One of the easiest ways to do that is to use the tags(String) method of Doc or one of Doc's subclasses. This method returns an array of Tag objects representing any tags whose name matches the string argument. For example, if method is an instance of MethodDoc, then
method.tags("mytag")
would return an array of Tag objects representing any @mytag tags in the method's documentation comment. You can then access the information in your @mytag tags with Tag's text method. That method returns a string representing the content of the tag which you can parse or use as needed. For example, if a documentation comment contained one of your custom tags like this:
@mytag Some dummy text.
then the text method would return the string "Some dummy text.".

Here's a standalone doclet (not a subclass of the standard doclet) that uses these ideas to print out the text associated with all instances of a specified tag that it finds:

import com.sun.javadoc.*;

public class ListTags {
    public static boolean start(RootDoc root){
        String tagName = "mytag";
        writeContents(root.classes(), tagName);
        return true;
    }

    private static void writeContents(ClassDoc[] classes, String tagName) {
        for (int i=0; i  0) {
                    if (!classNamePrinted) {
                        System.out.println("\n" + classes[i].name() + "\n");
                        classNamePrinted = true;
                    }
                    System.out.println(methods[j].name());
                    for (int k=0; k
The tag for which this doclet searches is specified by the variable tagName. The value of the tagName string can be any tag name, custom or standard. This doclet writes to standard out, but its output format could be modified, for example, to write HTML output to a file.

Example - Using custom command-line options

 You can write doclets that accept custom command-line options. To see how that works, let's augment the example doclet above so that it allows you to use a command-line option to specify the tag name to search for.

Any doclet that uses custom options must have a method called optionLength(String option) that returns an int. For each custom option that you want your doclet to recognize, optionLength must return the number of separate pieces or tokens in the option. For our example, we want to be able to use the custom option of the form -tag mytag. This option has two pieces, the -tag option itself and its value, so the optionLength method in our doclet must return 2 for the -tag option. The optionsLength method should return 0 for unrecognized options.

Here's the full, augmented doclet:

import com.sun.javadoc.*;

public class ListTags {
    public static boolean start(RootDoc root){
        String tagName = readOptions(root.options());
        writeContents(root.classes(), tagName);
        return true;
    }

    private static void writeContents(ClassDoc[] classes, String tagName) {
        for (int i=0; i  0) {
                if (!classNamePrinted) {
                    System.out.println("\n" + classes[i].name() + "\n");
                    classNamePrinted = true;
                }
                System.out.println(methods[j].name());
                for (int k=0; k
In this modified doclet, the variable tagName is set with the command-line option -tag. It has a optionLength method returns two for our custom option. Note that an explicit call to optionLength isn't required.

This doclet also adds the readOptions methods that actually parses the command-line options looking for the -tag option. It makes use of the fact that the Rootdoc.options method returns a two-dimensional String array containing option information. For example, given the command

javadoc -foo this that -bar other ...
the RootDoc.options method will return
options()[0][0] = "-foo"
options()[0][1] = "this"
options()[0][2] = "that"
options()[1][0] = "-bar"
options()[1][1] = "other"
The number of elements in the array's second index is determined by the optionLength method. In this example, optionLength returns 3 for option -foo and returns 2 for option -bar.

The validOptions method is an optional method that you can use to test the validity of the usage of command-line tags. If the validOptions method is present, it is automatically invoked; you don't have to explicitly call it. It should return true if the option usage is valid, and false otherwise. You can also print appropriate error messages from validOptions when improper usages of command-line options are found. The validOptions method in this example doclet checks that the -tag option is used once and only once.

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: javadoc-tool@sun.com 		Sun


Doclet Overview

Java

The Standard Doclet

 Javadoc 1.3

Contents

  • What the Standard Doclet Is
  • Classes in the Standard Doclet
  • Running the Standard Doclet
  • The Source for the Standard Doclet

What the Standard Doclet Is

 The standard doclet is the doclet provided by SunTM that produces Javadoc's default HTML-formatted API output. The API documentation for the JavaTM platform in this SDK documentation is an example of the standard doclet's output. Javadoc uses the standard doclet if no other doclet is specified using Javadoc's -doclet option on the command line.

One reason to look at the standard doclet is that it serves as a good example of the use of much of the doclet API. A second reason is that by seeing how the standard doclet produces the default HTML output, it will be easier for you to modify the standard doclet to make your own doclet for generating custom API documentation.

Classes in the Standard Doclet

The standard doclet is comprised of the classes in the com.sun.tools.doclets and com.sun.tools.doclets.standard packages. These packages are not a part of the core API of the Java platform. Classes in the standard doclet that play key roles in generating the default HTML output are summarized here:
  • Standard - This class contains the start method and hence serves as the entry point for the standard doclet. It orchestrates the generation of the HTML API files for the packages and classes upon which javadoc is operating.
  • HtmlWriter - This class contains APIs for writing the various HTML tags needed for generating any output in HTML form.
  • HtmlDocWriter - This class extends HtmlWriter, and contains additional HTML-related APIs for producing the specialized hyperlinks used in the default HTML output, including links in the headers and footers of the HTML pages.
  • PackageIndexWriter - This class generates the overview-summary.html file that lists all packages specified on the javadoc command line. As an example, see the overview-summary.html file in the API documentation for this Java Development Kit.
  • PackageIndexFrameWriter - This generates the overview-frame.html file used for displaying the list of package links in the upper-left frame in the frame-formatted default output. See the overview-frame.html file in the API documentation of this release of the SDK documentation.
  • PackageFrameWriter - This generates the package-frame.html file that lists the interfaces and classes in a given package for displaying in the lower-left frame of the frame-formatted default output. As an example of this type of page, see the package-frame.html file for java.awt in the API documentation of this release of the platform API documentation.
  • FrameOutputWriter - This generates the index.html file used for presenting the frame-formated "cover page" of the API documentation. See the index.html file from the platform API documentation as an example.
  • PackageWriter - This generates the package-summary.html files that list the interfaces and classes for a given package. For an example of this type of page, see the package-summary.html page for java.lang in the API documentation of this release.
  • ClassWriter - This generates the HTML API documentation for each individual interface and class. For an example from the Java 2 Platform API documentation, see Font.html.
  • SingleIndexWriter - This generates the single index file of class members that the standard doclet produces when the -splitindex option is not used.
  • SplitIndexWriter - This generates the mutliple index files for the class members that is generated when the Javadoc runs the standard doclet with the -splitindex command-line option. The files are named index-1.html.
  • TreeWriter - This class generates the overview-tree.html file that lists the Class Hierarchy for the classes upon which the standard doclet operates. For an example from the Java 2 Platform API documentation, see overview-tree.html.
  • DeprecatedListWriter - This generates the file deprecatedlist.html which lists deprecated APIs. As an example, see the deprecated-list.html file from the API documentation in this release.
  • ClassUseMapper, ClassUseWriter, and PackageUseWriter - These classes generate the "Use" files for classes and packages. Click the "Use" link in the navigation bar to go to a class or package "use" page. Examples of such pages are those for class Character and package java.lang.
  • PackageListWriter - generates the package-list text file that gets placed in the top-level directory of the API documetation. This file is required for use with standard doclet's -link command-line option. Standard doclet class Extern also plays a role in making the -link option work. See the Javadoc reference pages ([Windows] [Solaris]) for details about this option.
  • Group - This class handles the grouping of packages in one or more tables on the overview-summary.html page. It supports the standard doclet's -group command-line option. See the Javadoc reference pages ([Windows] [Solaris]) for details about this option.

Running the Standard Doclet

 The standard doclet is invoked by default when no other doclet is specified with the -doclet tag on the command line. For example, running
% javadoc MyPackage
will use the standard doclet to produce the default-style HTML API documentation for MyPackage. Running javadoc without the -doclet option is equivalent to running javadoc using the -doclet option to invoke the standard doclet. That is,
% javadoc MyClass.java
is equivalent to
% javadoc -doclet com.sun.tools.doclets.standard.Standard MyClass.java

The Source for the Standard Doclet

 If you download and install the SDK documentation bundle, you will find the source files for the standard doclet in the directories docs/tooldocs/javadoc/source and docs/tooldocs/javadoc/source/standard. You can browse the source code here:
  • Standard Doclet Source Files

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: javadoc-tool@sun.com 		Sun


What's New in Javadoc 1.2

 Javadoc Enhancements

This document describes the changes made to Javadoc between versions 1.1 and 1.2. It is divided into sections for three types of users: (1) for writers of doc comments, (2) for developers wanting to write doclets (architecture and the Doclet API), and (3) for readers of the javadoc-generated HTML pages (content and format). Further details are given in the "Detailed Changes" section that follows.

SUMMARY OF CHANGES

This summary includes changes for writers of doc comments, changes to the Javadoc tool (the Doclet API) and changes to the content and format of the HTML output of Javadoc (as implemented in the Standard Doclet).

WRITING DOC COMMENTS

Changes for Writing Doc Comments

The following list summarizes in one place all features listed elsewhere that can have an impact on how you would write doc comments.
  • The first sentence of each class description should be a summary statement.
  • Package-level comments are now possible.
  • The first sentence of each package description should be a summary statement.
  • System-wide (overview) comments are now possible.
  • New Javadoc tags are available for use in doc comments.
  • Copies new "doc-files" directory for holding images and examples.
  • Hierarchical destination file structure
  • Possible incompatibilities between 1.1 and 1.2 doc comments

ARCHITECTURE

Doclet API

  • Javadoc now has a Doclet API to which you can write doclets.

CONTENT

New Tags

  • @throws is a synonym for @exception.
  • @see now accepts packages, HTML anchors and quoted strings. It can also take a label.
  • {@link apiname label} is a new tag for in-line links in text.

Provides more API information and links

  • Includes mechanisms for package-level and document-level information.
  • Incorporates one-line summaries for classes and packages like there have been for members.
  • Includes inherited API on class and interface pages.
  • Includes return types in method summaries, and field data types in field summaries.
  • Includes links to interfaces from members that implement that interface.
  • Includes list of subclasses for each class, and implementing classes for each interface.
  • Copies member descriptions from interfaces to implementing classes.
  • Includes a class hierarchy (tree) view for each package.
  • Introduces -link option for linking to external Javadoc-generated documents.
  • Includes list of deprecated API.
  • Omits the keywords native and synchronization (which are not part of the Java spec).
  • Copies new "doc-files" directory for holding images and examples.

Customizable title, header and footer

  • Introduces options for adding a unique title, header, footer, and bottom note. The bottom note is for information like a copyright notice and mailto link.

FORMAT

Image files

  • No longer relies on images for headings and bullets. Instead it uses table cells and horizontal rules to distinguish headings and API.

Style sheet

  • Add HTML style sheets for control of colors, fonts and positioning.

Improved navigation

  • Adds optional HTML frames for lists of packages and classes. You can show or hide these frames with a single click.
  • Navigation bar is now the same from screen-to-screen.
  • Renames "API Users Guide" to "Help".
  • Changes the term "index" to "summary" in headings of class pages for member summaries.
  • Better distinguishes the summary and detail sections from each other.

Index improvements

  • Option exists to break index up to one file per initial character.
  • Index is internationalized to handle Unicode characters.
  • Index now contains the classes and interfaces.

Hierarchical Destination File Structure

  • Change the destination directory from flat to hierarchical. (new in Beta4)

GENERAL

Incompatibilities

  • Describes possible incompatibilities when running Javadoc 1.2 on 1.1 comments

Other Doclets

  • Maintains the ability to generate Javadoc 1.1 HTML output, for those who want it.
  • [Future] Adds the ability to generate MIF output, for importing into FrameMaker.

Future Enhancements After 1.2

  • Allow for incremental builds contributing to a single Javadoc-generated document.

DETAILED CHANGES

These are the detailed changes made to Javadoc from 1.1 to 1.2. Features denoted as "Done" are implemented and tested in 1.2 Beta 4.

CHANGES FOR WRITING DOC COMMENTS

Javadoc 1.2 has the following new requirements and features you should be aware of when writing documentation comments:
The first sentence of each class description should be a summary statement.
Package-level comments are now possible.
The first sentence of each package description should be a summary statement.
System-wide comments are now possible.
New Javadoc tags are available for use in doc comments.
Copies new "doc-files" directory for holding images and examples.
Hierarchical destination file structure
Possible incompatibilities between 1.1 and 1.2 doc comments

ARCHITECTURE - DOCLET API

Javadoc now has a Doclet API to which you can write doclets. This is a major architectural change to Javadoc.
You can use Javadoc doclets to customize Javadoc output. Think of a doclet as a plug-in for text conversion. A doclet is written written to the doclet API to specifies the content and format of the output to be generated by the Javadoc tool. You can write a doclet to generate any kind of text-file output, such as HTML, SGML, XML, RTF, and MIF. Sun provides a "standard" doclet for generating HTML-format API documentation. Doclets can also be used to perform special tasks not related to producing API documentation. For example, a diagnostic doclet could be created to check that all members have documentation comments.

Motivation for New Architecture - The original Javadoc (in 1.0.x and 1.1.x) takes java source files as input and produces HTML as output. The format of the HTML output is hard coded in java. The disadvantage is that developers who want to customize the output are out of luck, unless they have a source license and want to hack some very arcane code. This means technical writers cannot make enhancements they might need, whether minor (such as capitalizing a word, changing color, adding bold, ...) or major (converting to a new format, such as MIF or RTF).

The requirements for the Javadoc re-architecting were:

  • Separate the mechanisms used to parse and process the input source from the specification of the output format.

  • Make the output format specification pluggable.

  • Make the output format specification as comprehensible as possible to tech writers.
New architecture: The javadoc front-end handles command line arguments and java parsing/processing, constructing a root data structure and passes this off to a java "doclet". The doclet would access this data via an API representing packages, classes, methods, fields, and comments, as well as enumerations of these objects. New doclets could be written to this API, or standard doclets could be subclassed to allow minor changes.

CONTENT - NEW TAGS

These tags are actually implemented in the javadoc API, not in the standard doclet.
New tag "@throws" is a synonym for "@exception". This is a convenience, since "throws" is a keyword in the Java language.

Existing tag "@see" now accepts packages, HTML anchors and quoted strings. It can also take a label. An @see tag can refer to a package just like it can refer to a class, method or other API. The HTML anchor is of the form <a href="xxx">XXX</a> and the quoted string is of the form "xxx". For examples, see Javadoc Reference Page. The label is optional and is of the form: "@see name label". If a label is included, it will be displayed instead of the name.

New tag "{@link apiname label}" is for in-line links in text. In previous versions of Javadoc, the only way to include links to API was to use the @see tag or to hard-code HTML. This new in-line tag uses the same algorithm that @see uses to generate the HTML link. The difference is that it places the link in-line rather than under a "See Also" heading.

CONTENT - PROVIDES MORE API INFORMATION AND LINKS

Add to source tree one file per package, named "package.html", dedicated to doc comments. The first sentence of each package description is the summary. Javadoc picks up everything between <body> and </body> and add it to the package summary page "package-summary.html" (which also contains a table of its classes and interfaces). Javadoc copies the first sentence of this to the overview page "overview.html". Therefore, you should not put a title or any other text between <body> and the first sentence.

Outline for package-level comments:

  • Introduction
  • Package Specification
  • Related Documentation

For more information, see Package Level Comments.

Old Behavior: Javadoc 1.1 has no mechanism for including comments specific to a particular package.
NOTE - The above feature requires writers to follow a new Javadoc rule: The first sentence of each package description should be a summary statement.

Add a single system-wide document "overview.html" for the set of packages. Include in it any comments that apply to the all the packages being documented. For example, you might document the following assumption on this page: "NullPointerException is thrown wherever null is passed in, except as noted."

This file belongs in your source tree and can be any filename you specify. By convention, we use the name "overview.html". Specify this filename with the -overview option on the command line when running Javadoc and the file's contents (between the <body> and </body> tags) is inserted into the initial page that appears in the right-hand frame, named overview-summary.html (which was called packages.html in Beta3 and earlier versions).

Old Behavior: Javadoc 1.1 has no mechanism for including comments that apply to all packages.

Javadoc picks up the first sentence one-line summary for each package from package.html and puts it in packages.html. This provides a brief summary of each packages in the list of all packages.
Old Behavior: Javadoc 1.1 has no such summary list.

Pick up the first sentence of each class description and include it in the class summary at package-<class>.html This provides a brief summary of all classes for a given package.
Old Behavior: Javadoc 1.1 has no such summary list.
NOTE - The above feature requires writers to follow a new Javadoc rule: The first sentence of each class description should be a summary statement.

Add inherited API to method and field summaries on class and interface pages.
Old Behavior: In Javadoc 1.1, the inherited members for a given class do not appear on the class page, necessitating following links to discover them.

Include return type and keywords "static", "protected" and "abstract" in the signature in the method summary, since they are needed by someone calling a method. Do not include public, transient, volatile, or final; those appear in the detail section further down the page. Include data type of fields.
Old Behavior: In Javadoc 1.1, method summaries don't indicate the return type. Field summaries don't indicate the field type.

Add "Specified by" for members that implement an interface.
Old Behavior: In Javadoc 1.1, members of a class that implement an interface make no such mention.

Add the list of subclasses at the top of the class page. Also add the subinterfaces and implementing classes at the top of the interface pages.
Old Behavior: Javadoc 1.1 does not list subclasses on a class page.

Copy the description automatically from the method in an interface to its implementing subclass only when the implementing method contains no text. Include a boilerplate statement that says that the text is copied from the interface. The reason for doing this, is that when implementing an interface, the method descriptions are often identical for both the interface and the class. Copying the descriptions manually seems like needless work that is difficult to maintain.
Old Behavior: Javadoc 1.1 does not copy method descriptions from an interface.

Add a tree view for each package. When you are viewing a package or class, the "Tree" link goes to that view, which then has a link to the tree for all packages.
Old Behavior: Javadoc 1.1 has no tree view (class hierarchy) of single packages. The only tree view is of all packages, which, for the JDK, is overwhelming.

Introduce -link option for linking to external Javadoc-generated documents. Default is to not link to external documentation. When someone generates docs, the -link option generates links to documentation for any API referenced by the API being documented. The links can be local or remote (on the Internet).
Old Behavior: Javadoc 1.1 makes no links to documentation outside what is being generated.

Submit bugs against default constructors that should not be documented by Javadoc. We should either deprecate them or remove them as bugs.
(Does not affect Javadoc)
Old Behavior: Javadoc includes all default constructors, whether or not an application developer would ever call them. When it documents default constructors, it leaves their descriptions blank.

Add a deprecated summary page listing all deprecated API. (Eventually we will add links to the replacement API.)
Old Behavior: Javadoc 1.1 does not generate a list of deprecated API.

Mark classes that are deprecated.
Old Behavior: In Javadoc 1.1, deprecated classes are not marked as such in the class list for a given package.

Remove "synchronized" and "native" from signatures. Javadoc generates an API specification. These two keywords do not belong in the signatures of a specification, because they are implementation-specific. The keyword "native" does not need to be documented. The keyword "synchronized" indicates thread-safe behavior that should instead be described in the method descriptions. A thread-safe method itself might not use the "synchronized" keyword but might call private methods that are.
Old Behavior: Javadoc 1.1 includes the keywords "synchronized" and "native".

Copy "doc-files" directory (one per package) for holding images and examples. Javadoc looks for a directory named "doc-files" in each package directory of the source tree and copies that directory and its contents to the destination. The files in "doc-files" are merely copied to the destination and not processed by Javadoc. This means these files cannot contain the standard navigation bar, header or footer, or be included in the index or tree. This directory can contain arbitrary files referenced by doc comments. Examples: images, HTML files, text files, example source code, HTML tables shared by more than one class.

Example: To include a reference to the image file "Button-1.gif" within the description for the java.awt.Button class:

  • In the source tree, create a directory named "doc-files" in the "java/awt/" directory.
  • Put the "Button-1.gif" file in the "doc-files" directory.
  • Add an <img> tag to your doc comment for the Button class:
       /**
    * <img src="doc-files/Button-1.gif">
    */
Java Software has adopted the naming convention starting with "-1" and incrementing for subsequent images. For more details, see Including Images.
Old Behavior: In Javadoc 1.1, running Javadoc generates files with broken links because images are not copied to the destination. (In the JDK, these images are currently mostly screen shots of AWT and Swing components.)

CONTENT - CUSTOMIZABLE TITLE/HEADER/FOOTER

Add the -title option to include a title to first page "packages.html". Example title: "Java Platform 1.2 Core API".
Old Behavior: Javadoc 1.1 has no formal way to add a title to the generated document.

Add -header, -footer, -bottom options for header/footer/bottom on every page. This enables you to put the version number of the API (such as "Java 1.2 Beta 4") on every page so that when you print out a page, you have a record of the version it came from. The "bottom" feature lets you add a copyright notice or feedback email link at the bottom of each page.
Old Behavior: In Javadoc 1.1, the version number by default does not appear on any page.

CONTENT - NO LINKS TO SOURCE FILES

For internal development, having direct links from each Javadoc-generated class page to its source code would be handy. However, we have decided not to include links in the Java API documentation to the Java source code when we generate and publish our API documentation. Hence it becamse a low priority to put that feature into the standard doclet. However, we have made available separately a doclet that generates links to the source code.

FORMAT - IMAGE FILES

Eliminate any required GIF images. Replace the GIF bullets with horizontal rules. Replace the graphic headings (e.g., "Methods", "Fields") with text inside colored table cells.
Old Behavior: Javadoc 1.1 requires GIF images for bullets and headers. These are not necessary, they slow down the display, and they need to be manually copied to the destination.

FORMAT - STYLE SHEET

Add HTML style sheets for control of colors, fonts and positioning. Style sheets are a standardized way of setting the colors, fonts and positioning of text on web pages at runtime. To modify the colors of the table cells or the font sizes in the left-hand frames, modify the file stylesheet.css that is generated by javadoc. There is also a -stylesheetfile option when running javadoc for specifying your own style sheet.

For example, you can change the background cell color of the headings from dark blue to white by editing the file stylesheet.css as follows.

From:

   #TableHeadingColor     { background: #CCCCFF } /* Dark mauve */
To:
   #TableHeadingColor     { background: #FFFFFF } /* Dark mauve */

For a formal description, see Cascading Style Sheets from W3C. For a more practical description, see CSS Reference Table from CNET. (For an introduction, click on "back to intro" from the CSS Reference Table.)

FORMAT - IMPROVED NAVIGATION

Add frames for package, class and member. (For no frames, start at "package-summary.html". For frames, start at "overview-summary.html")
Old Behavior: Javadoc 1.1 has no easy way to access any package, class or member. It requires users to backtrace.

Add "All classes" link to top of package list (upper left frame). When user clicks this, it should display list of all classes in alphabetic order in lower left-hand frame.
Old Behavior: Javadoc 1.1 has no easy way to access any class, regardless of the package it is in. It requires users to go to "Class Hierarchy". It would be nice to have a list of just classes and interfaces.

Develop a single navigation bar that works in all screens. Dim out the unused items.
Old Behavior: In Javadoc 1.1, the standard navigation bar along the top changes dramatically from page to page. There are three different navigation bars: all packages (2 items), a package (3 items), and a class (6 items).

Add another navigation bar to jump to each subsection.
Summary: Inner | Field | Constr | Method Detail: Field | Constr | Method
Old Behavior: Javadoc 1.1 requires you to scroll past the class description to get to the member summaries and detail.

Rename the "API Users Guide" link to "Help". Modify Javadoc to generate a default help file. Add an option -nohelp to omit the "Help" link from the navigation bar if desired. Add an option -helpfile to create a file
Old Behavior: Javadoc 1.1 has a link in packages.html called "API Users Guide". The file it points to is not automatically copied to the destination directory.

HTML frame for members in Javadoc 1.2. This is a feature we had considered adding to the standard doclet but decided not to. We plan to announce a third-party developer to eventually release this feature in a separate doclet.

FORMAT - WEB PAGES

Change the summaries to tables with borders and cell background color. This better distinguishes between summary and detail portions of class files.
Old Behavior: In Javadoc 1.1, both the summary and detail portions both look quite similar, it's not obvious when scrolling down the page which section you are in.

Keep "Index" as the name of the alphabetized list of API at the end of the document. Rename top portion of each package page from "Package Index" to "Package Summary", likewise for top portion of each class page rename "Method Index" to "Method Summary", "Constructor Index" to "Constructor Summary", and "Field Index" to "Field Summary".
Old Behavior: In Javadoc 1.1, the word "index" is used to identify both summaries at the top of class pages, and the alphabetic book-type list containing all the API. This is needlessly confusing.

FORMAT - INDEX IMPROVEMENTS

Add -breakindex option to break the index into a separate file for each letter of alphabet.
Old Behavior: In Javadoc 1.1, the index is a gigantic 1.4MB file for JDK; takes forever to load over Internet.

Add classes and interfaces to the index.
Old Behavior: In Javadoc 1.1, the index lists only constructors and members, not classes or interfaces.

Internationalize the index, to enable any Unicode characters.
Old Behavior: In Javadoc 1.1, the index handles only the alphabet A-Z. (Actually, only A-Y.)

FORMAT - HIERARCHICAL DESTINATION FILE STRUCTURE

Add hierarchical destination directories that replicates the source code tree of one directory per subpackage. Flat structure will no longer be supported. This has the effect of reducing the number of files in a directory by distributing them by package. A side effect is to reduce length of filenames, since package names will be directory names rather than part of the filename. This will make it easier for third parties to generate shorter names (for example, 31-character names for the Macintosh) that retain some meaning.

For example, java.awt.Button.html will now be \java\awt\Button.html Given all the 1.2 changes, the destination file structure for running Javadoc on the java.applet package would now look like file structure.

Old Behavior: Javadoc 1.1 uses a flat structure, where all HTML files sit in a single directory.

INCOMPATIBILITIES

Possible incompatibilities between 1.1 and 1.2 doc comments We have been careful to write Javadoc 1.2 to be compatible with documentation comments written for previous versions of Javadoc. However, there may be a few cases where old documentation comments may not "work" the same when compiled with Javadoc 1.2.

  • Many filenames have changed. The most important change is that the initial page of the generated documentation is now index.html (which sets up HTML frames) instead of packages.html. If you want to avoid frames, the initial page to load is overview-summary.html (which replaces packages.html in 1.1).

  • In the text of comments, writers might have hard-coded in-line links to API names. Because javadoc now generates hierarchical directories, those links would now be broken. The new {@link} tag enables proper in-line links.

OTHER DOCLETS

Maintain Javadoc 1.1 format with its own doclet. This keeps the old look and flat directory structure but with some of the new bug fixes. To access this, use the "-1.1" javadoc option
Old Behavior: - The Javadoc 1.1 format is important for those who has built parsers that operate on and rely on that HTML output.

[Future] Implement a MIF doclet. This will add the ability to generate MIF output, for importing into FrameMaker.
(Plan to do and release separately after 1.2.)
Old Behavior: Javadoc 1.1 has no MIF capability (Javadoc 1.0.2 does).

FUTURE ENHANCEMENTS - TO DO IN A RELEASE AFTER 1.2

Allow for incremental builds contributing to a single Javadoc-generated document. Would be useful to save the intermediate format from each Javadoc run and allow merging of those intermediate formats into a complete document, with fully correct index, tree, class hierarchy, subclasses list, etc.
(Not done - planned for a release after 1.2)
Old Behavior: Javadoc 1.1 does not allow incremental building of documentation.
Please send comments to: javadoc-tool@sun.com


What's New in Javadoc 1.3

 Javadoc Enhancements

This document describes the changes made to the Javadoc tool between versions 1.2.2 and 1.3.

New Features

Added {@docRoot} - This is a new Javadoc tag that represents the path from any class page up to the root directory of the generated documentation hierarchy. The purpose of this tag is to allow you to make a link to a single web page from all generated pages, such as to a copyright page or corporate logo from the footers of all generated pages. (This tag was broken in 1.3 Beta) (Request #4197510)

MIF doclet. This adds the ability to generate MIF output, for importing into FrameMaker and eventual conversion to PDF, PS, RTF, Word, or WordPerfect.
IMPORTANT - The MIF doclet is not included in the Java 2 SDK. You must obtain it separately from: MIF Doclet download page

Bug Fixes

4260169: Added <code> HTML tag to "Overrides", "Specified By" and "Tags copied from".

4276757: Fixed Javadoc to document inherited public members of package-private classes.

4214932: Fixed bug where private fields/methods were documented as inherited.

4216836: The "Specified by:" link has been added for a method in an interface implementing a method from a superinterface.

4227539: We now list interfaces found walking all the way up the hierarchy tree. For interfaces, added "All superinterfaces: A, B, C". For classes, added "All implemented interfaces: A, B, C".

4233601: In inner class summary, fixed bug where Exceptions were mistakenly listed as Interfaces.

4216434: Fixed Javadoc -help option which didn't print all the options (-helpfile, -stylesheetfile).

4235271: Fixed bug where overriding method in Interface is now shown as "Specified By".

4231274: Added a missing space ahead of parenthetical phrase "(also extends...)"

4285930: Changed second argument of -linkoffline so that if supplying a relative path, you should make it relative to the destination directory (supplied with -d) rather than relative to the current directory from where javadoc is run.

Future Enhancements

To possibly do in a release after 1.3
XML Doclet - for a standardized representation of static program information of a set of packages. This might possibly allow developers to incrementally build a single document from separate Javadoc runs. By saving the intermediate representation from each Javadoc run, it would allow merging of those into a complete document, with fully updated index, tree, class hierarchy, subclasses list, etc.
Please send comments to: javadoc-tool@sun.com


java - the Java application launcher

  • Synopsis
  • Description
  • Options
  • See Also

SYNOPSIS

    java [ options ] class [ argument ... ]
    java [ options ] -jar file.jar [ argument ... ]
options
Command-line options.
class
Name of the class to be invoked.
file.jar
Name of the jar file to be invoked. Used only with -jar.
argument
Argument passed to the main function.

DESCRIPTION
The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method. The method declaration must look like the following:
    public static void main(String args[])
The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argument is the name of a JAR archive containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header.

The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.

Non-option arguments after the class name or JAR file name are passed to the main function.

OPTIONS
The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the current implementations of the virtual machines support a set of non-standard options options that are subject to change in future releases.

Standard Options
-client
Select the Java HotSpot Client VM. This is the default.

-server
Select the Java HotSpot Server VM.

-classpath classpath
-cp classpath
Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (:). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.

If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).

For more information on class paths, see Setting the Class Path.

-D property=value
Set a system property value.

-jar
Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests.

When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.

-verbose
-verbose:class
Display information about each class loaded.

-verbose:gc
Report on each garbage collection event.

-verbose:jni
Report information about use of native methods and other Java Native Interface activity.

-version
Display version information and exit.

-showversion
Display version information and continue.

-?
-help
Display usage information and exit.

-X
Display information about non-standard options and exit.

Non-Standard Options

-Xint
Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot VMs' adaptive compiler will not be present in this mode.

-Xdebug
Start with the debugger enabled. Refer to jdb description for more details and an example.

-Xbootclasspath:bootclasspath
Specify a colon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xbootclasspath/a:path
Specify a colon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.

-Xbootclasspath/p:path
Specify a colon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xfuture
Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.

-Xnoclassgc
Disable class garbage collection.

-Xincgc
Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will eliminate occasional garbage-collection pauses during program execution. However, it can lead to a roughly 10% decrease in overall GC performance.

-Xms n
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
       -Xms6291456
       -Xms6144k
       -Xms6m

-Xmx n
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
       -Xmx83886080
       -Xmx81920k
       -Xmx80m

-Xss n
Set thread stack size. Each Java thread has two stacks: one for Java code and one for C code. This option sets the maximum stack size that can be used by C code in a thread to n. Every thread that is spawned during the execution of the program passed to java has n as its C stack size. The default units for n are bytes and n must be > 1000 bytes. To modify the meaning of n, append either the letter k for kilobytes or the letter m for megabytes. The default stack size is determined by the Linux operating system upon which the Java platform is running.

-Xprof
Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.

-Xrunhprof[:help][:<suboption>=<value>,...]
Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs . Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.

-Xrs
Reduces use of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.

In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.

Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks.

The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps.

Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. To address this issue, the -Xrs command-line option has been added beginning in J2SE 1.3.1. When -Xrs is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.

There are two consequences of specifying -Xrs:

  • SIGQUIT thread dumps are not available.
  • User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.

WARNING: Flags -Xdebug and -Xint are mutually exclusive. No more than one of those options should be used on a java command line.

SEE ALSO
  • javac - the Java programming language compiler
  • jdb - Java Application Debugger
  • javah - C Header and Stub File Generator
  • jar - JAR Archive Tool
  • The Java Extensions Framework
  • Security Features.


Java 2 SDK File Structure

Java 2 SDK and Runtime Environment File Structure

 SDK Tools

This document gives an overview of the Java 2 SDK directories and the files they contain. This page may also be used as a reference for the file structure of the Java 2 Runtime Environment. To see the file structure of the Runtime Environment, just look at the description of the contents of the SDK's jre directory on this page. The file structure of the Java 2 Runtime Environment is identical to that of the SDK's jre directory.

Development Files and Directories

This section describes the files and directories that are required to develop apps for the Java platform. (The directories that are not required include demos, Java source code, and C header files. They are discussed in the following section, Additional Files and Directories.) The following chart shows the most important directories:

                jdk1.3
   ___________|_________________
  |           |                 |
 bin         lib               jre
  |           |         ________|__________
java*     tools.jar    |                   |
javac*    dt.jar      bin                 lib
javap*                 |       ________ ___|___ _________ ________
javah*               java*    |        |       |         |        |
javadoc*                    rt.jar    ext   security   sparc    applet
                            i18n.jar                  /     \
                                                  server  client

Assuming the SDK software is installed at /jdk1.3, here are some of the most important directories:

/jdk1.3
The root directory of the SDK software installation. Contains copyright, license, and README files. Also contains src.jar, the archive of source code for the Java 2 platform.

/jdk1.3/bin
The executables for all the development tools contained in the Java 2 SDK. The PATH environment variable should contain an entry for this directory. For more information on the tools, see the SDK Tools.

/jdk1.3/lib
Files used by the development tools. Includes tools.jar, which contains non-core classes for support of the tools and utilities in the SDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for the application.

/jdk1.3/jre
The root directory of the Java runtime environment used by the SDK development tools. The runtime environment is an implementation of the Java 2 platform. This is the directory referred to by the java.home system property.

/jdk1.3/jre/bin
Executable files for tools and libraries used by the Java platform. The executable files are identical to files in /jdk1.3/bin. The java launcher tool serves as an application launcher, in place of the old jre tool that shipped with 1.1 versions of the SDK software. This directory does not need to be in the PATH environment variable.

/jdk1.3/jre/lib
Code libraries, property settings, and resource files used by the Java runtime environment. Includes:
  • rt.jar -- the bootstrap classes (the RunTime classes that comprise the Java platform's core API).
  • i18n.jar -- the character-conversion classes and other files associated with internationalization and localization.
Aside from the ext subdirectory (described below) there are several additional resource subdirectories not described here.

/jdk1.3/jre/lib/ext
Default installation directory for Extensions to the Java platform. This is where the JavaHelp jar file goes when it is installed, for example.
/jdk1.3/jre/lib/security
Contains files used for security management. These include the security policy (java.policy) and security properties (java.security) files.

/jdk1.3/jre/lib/sparc
Contains the .so (shared object) files used by the Solaris version of the Java platform.

/jdk1.3/jre/lib/sparc/client
Contains the .so file used by the Java HotSpot Client Virtual Machine, which is implemented with Java HotSpotTM technology. This is the default VM.

/jdk1.3/jre/lib/sparc/server
Contains the .so file used by the Java HotSpot Server Virtual Machine.

/jdk1.3/jre/lib/applet
Jar files containing support classes for applets can be placed in the lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be pre-loaded from teh local file system by the applet class loader, providing the same protections as if they had been downloaded over the net.

Additional Files and Directories

This section describes the directory structure for the demos, Java source code, and C header files. Here is the directory structure:

                              jdk1.3
                 ___________|__________
                |           |          |
              demo       include    src.jar
             ___|___ _________ __________ ________
            |       |         |          |        |
          applets  jfc       jpda      sound     jni

The additional files and directories shown above are:

/jdk1.3/src.jar
Archive containing source code for the Java 2 platform.

/jdk1.3/demo
Examples, with source code, that show you how to program for the Java platform.

/jdk1.3/demo/applets
Applets that can be used on a Web page.

/jdk1.3/demo/jfc
Examples that use Java 2DTM and JFC/Swing components.

/jdk1.3/demo/jpda
Examples of using the Java Platform Debugging Architecture. Includes source code for the javadt and jdb utilities.

/jdk1.3/demo/sound
Contains Java Sound demos with source code.

/jdk1.3/demo/jni
Example classes and C code that demonstrate access to poll(2) functionality from the Java 2 Platform.

/jdk1.3/include
C-language header files that support native-code programming using the Java Native Interface and the Java Virtual Machine Debugger Interface.


SDK Development Tools

Java

JavaTM 2 SDK
Tools and Utilities

 Documentation Contents

Each of the development tools comes in a Win32 version and a Solaris version. There is virtually no difference in features between Win32 and Solaris versions. However, there are minor differences in configuration and usage to accommodate the special requirements of each operating system. (For example, the way you specify directory separators depends on the OS.)

The following documents contain important information you will need to know to get the most out of the SDK tools.

SDK File Structure | [Solaris] [Linux] [Win32]
Setting the Classpath | [Solaris and Linux] [Win32]
How Classes are Found | [Solaris, Linux and Win32]
Tool Changes in Java 2 SDK, v1.3 | [Solaris, Linux and Win32]
Migration from JDK 1.1 to the Java 2 Platform | [Solaris and Linux] [Win32]

The sections below provide a brief introduction to the tools in the Java 2 SDK, with links to their reference pages:

  • Basic Tools (javac, java, javadoc, appletviewer, jar, jdb, javah, javap, extcheck)
  • Remote Method Invocation (RMI) Tools (rmic, rmiregistry, rmid, serialver)
  • Internationalization Tools (native2ascii)
  • Security Tools (keytool, jarsigner, policytool)
  • Java IDL and RMI-IIOP Tools (tnameserv, idlj)
  • Java Plug-inTM Tools
Basic Tools
These tools are the foundation of the Java 2 SDK. They are the tools you use to create and build applications.
javac | The compiler for the Java programming language. | [Solaris and Linux] [Win32]
java | The launcher for Java applications. In this release, a single launcher is used both for development and deployment. The old deployment launcher, jre, is no longer provided. | [Solaris] [Linux] [Win32]
javadoc | API documentation generator. See Javadoc 1.3 Home Page | [Solaris and Linux] [Win32]
appletviewer | Run and debug applets without a web browser. | [Solaris and Linux] [Win32]
jar | Manage Java Archive (JAR) files. | [Solaris and Linux] [Win32]
jdb | The Java Debugger. | [Solaris and Linux] [Win32]
javah | C header and stub generator. Used to write native methods. | [Solaris and Linux] [Win32]
javap | Class file disassembler | [Solaris and Linux] [Win32]
extcheck | Utility to detect Jar conflicts. | [Solaris and Linux] [Win32]
javald | Utility that creates a convenient wrapper file that captures the necessary environment needed to run a Java application. | [Solaris only]
Remote Method Invocation (RMI) Tools
These tools help to create apps that interact over the Web or other network.
rmic | Generate stubs and skeletons for remote objects. | [Solaris and Linux] [Win32]
rmiregistry | Remote object registry service. | [Solaris and Linux] [Win32]
rmid | RMI activation system daemon. | [Solaris and Linux] [Win32]
serialver | Return class serialVersionUID. | [Solaris and Linux] [Win32]
Internationalization Tools
This tool helps to create localizable apps.
native2ascii | Convert text to Unicode Latin-1. | [Solaris and Linux] [Win32]
Security Tools
These tools help you set security policies on your system and create apps that can work within the scope of security policies set at remote sites.
keytool | Manage keystores and certificates. | [Solaris and Linux] [Win32]
jarsigner | Generate and verify JAR signatures. | [Solaris and Linux] [Win32]
policytool | GUI tool for managing policy files. | [Solaris and Linux] [Win32]
Java IDL and RMI-IIOP Tools
These tools are used when creating apps that use CORBA to access databases.
tnameserv | Provides access to the naming service.
idlj | Generates .java files that map an OMG IDL interface and enable an application written in the Java programming language to use CORBA functionality.
Java Plug-in Tools
Utilities for use in conjunction with the Java Plug-inTM product.
unregbean | Unregisters a packaged JavaBeans component over ActiveX. Unregbean is described on the Java Plug-in Scripting document on the Java Software web site.


SDK Tools Changes

Java

JavaTM 2 SDK
Tools Changes

 SDK Tools
This document describes some of the changes made to the tools in version 1.3 of the Java 2 SDK, Standard Edition.

  • The javac compiler has been completely re-implemented in version 1.3 of the Java 2 SDK. The compiler implementation from previous releases of the SDK is still available as oldjavac. The new javac is faster than the old java.

    The nonstandard options, those prefixed with '-X', are no longer supported. In particular, the -Xdepend option is no longer available.

    When searching the classpath or sourcepath, the new compiler does not follow symbolic links. In version 1.3, it is therefore necessary to avoid the use of symbolic links within the directories appearing on the classpath and sourcepath, and within their subdirectories.

    When the new 1.3 compiler detects an error in a source file during a compilation, it continues to parse the remaining source files and attempts to identify any further errors that they may contain. Code generation is completely suppressed for the remainder of the compilation, however, and no class files will be generated, even for compilation units that contain no errors. The old compiler in 1.2 would generate class files for any compilation units that did not contain errors. This resulted in less redundant work during the repeated compilations required to identify and correct all errors in a large program containing many files with errors. We hope to improve this behavior in the future. The new compiler is substantially faster overall, however, which should tend to offset this somewhat.

  • The reserved stack size for the Java application launcher on Win32 platforms (java.exe) has been decreased from 1 MB to 256 KB. This reduction of reserved stack size enables four times more threads than previously can exist simultaneously during runtime before getting an out-of-memory error.

  • The idltojava compiler has been replaced with the new idlj compiler.

  • The Javadoc tool recognizes the new @docRoot tag, and a new doclet for generating output in MIF format is available. Several important Javadoc bugs are also fixed in Javadoc 1.3. See What's New in Javadoc 1.3 for details.

  • The Jar tool now provides for the indexing of Jar files so that Jar-file contents can be accessed quickly and easily. The new functionality is invoked with the Jar tool's new -i option. See the Jar tool reference pages for details [ Win32 | Solaris ].

  • The jarsigner and keytool utilities have a new -provider option that can be used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file. See the reference pages for jarsigner [Win32 | Solaris] and keytool [Win32 | Solaris]. Jarsigner can now verify Netscape-signed Jar files.

  • The rmic tool (the Java RMI stub compiler) supports several new options:
    • The -bootclasspath option overrides the location of bootstrap class files.
    • The -extdirs option overrides the location of installed extensions.
    • The -idl option creates IDL.
    • The -iiop option creates stubs for IIOP.
    • The -sourcepath option specifies where to find user source files.
    rmic now assumes the equivalent of '-d .' for the destination directory if the -d option isn't used. See the rmic reference pages for details [ Win32 | Solaris ].

  • The rmid tool (the Java RMI Activation Daemon) now requires a security policy file, by default. For complete details, please refer to the rmid reference pages [ Win32 | Solaris ].

  • Version 1.3 of the Java 2 SDK contains the new Java 2 Client Virtual Machine with Java HotSpotTM technology as the default virtual machine for running applications and applets. The virtual machine implementation from previous versions of the SDK (the Classic VM) is still included with the Java 2 SDK for Win32 platforms. It is not included with the Java 2 Runtime Environment nor with the Java 2 SDK for the Solaris operating environment. On the Win32 SDK, the classic VM can be invoked by using the -classic option when launching applications and applets, as in these examples:
    java -classic MyApp appletviewer -classic MyApplet.html
    If used, the -classic option must be the first option appearing in the command. The -classic option also can be used to invoke the Classic VM when using other SDK tools.

  • The version-related options of the Java application launcher have been modified in this release. The -version option provides output in the following format:
    java version "<java.version>"
<java.runtime.name> (build <java.runtime.version>)
<java.vm.name> (build <java.vm.version>, <java.vm.info>)
    The parts in angular brackets, such as <java.version>, are values of the indicated system properties. New option -showversion is similar to -version, except that it continues after displaying the version information so that it can be used when launching an application.
    java -showversion MyApp

  • The javaw application launcher normally launches an application on Win32 platforms without displaying a console window as does the java application launcher. The javaw launcher has been modified so that it will now display a window with error messages in the event that an application fails to launch. Previously, javaw would not display an error dialog box when an application failed to launch which made it difficult to determine the cause of the problem.
Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved.

Feedback 		Sun

Java Software


appletviewer - The Java Applet Viewer

The appletviewer command allows you to run applets outside of the context of a World-Wide Web browser.

SYNOPSIS

appletviewer [ options ] urls ...

DESCRIPTION

The appletviewer command connects to the documents or resources designated by urls and displays each applet referenced by the documents in its own window. Note: if the documents referred to by urls do not reference any applets with the OBJECT, EMBED, or APPLET tag, then appletviewer does nothing. For details on the HTML tags that appletviewer supports, see AppletViewer Tags.

OPTIONS

-debug
Starts the applet viewer in the Java debugger, jdb, thus allowing you to debug the applets in the document.

-encoding encoding name
Specify the input HTML file encoding name.

-J javaoption
Passes through the string javaoption as a single argument to the Java interpreter which runs the appletviewer. The argument should not contain spaces. Multiple argument words must all begin with the prefix -J, which is stripped. This is useful for adjusting the compiler's execution environment or memory usage.


Command Line Changes
between JDKTM 1.1 Tools and JavaTM 2 SDK Tools

 SDK Tools
This file summarizes changes some changes to the way the Java 2 SDK's tools work as compared to the tools that ship with the JDK 1.1.x software. The changes described here are not changes between versions 1.2 and 1.3 of the Java 2 SDK.

Contents

  • Introduction
  • Changes to CLASSPATH and -classpath
  • New Class Search Paths
  • New Options to Search for Boot Classes: -Xbootclasspath, -bootclasspath
  • Appletviewer No Longer Uses CLASSPATH
  • Standard vs. Non-standard Options
  • New Option to Search for Source Files: -sourcepath

Introduction

This document summarizes a few important changes in command line options between JDK1.1 and Java 2 SDK tools. Its target audience is those already familiar with the command line options of JDK1.1 tools.

Please note that every effort has been made to keep the options in Java 2 SDK backwards compatible with the options in JDK1.1, where possible. The purpose of this document is to provide you with a quick overview of what has changed, and to outline the motivation behind the changes. We hope that understanding our motivations will help you better use the new features.

Throughout this document we use the term "Java platform classes" to refer to classes that belong to the Java platform, as specified in the Java API Specification, such as ava.lang.String. These reside in classes.zip or rt.jar. We also use the term "class path" to refer to the search path set by CLASSPATH and -classpath.

Although the examples in this document are Solaris oriented, they apply equally to Windows, after the slashes and prompts have been appropriately changed.

Changes to CLASSPATH and -classpath

The class path has a default value and can be set by -classpath or CLASSPATH. In 1.1, it worked as follows:

  • Class path default - The default value of the class path was (1) the path where Java platform classes resided (classes.zip or rt.jar), and (2) the current working directory (".", read as "dot").
  • CLASSPATH - If the environment variable CLASSPATH was set, then the class path would (1) continue to contain classes.zip or rt.jar just the like default plus (2) the newly set value instead of the current working directory. [See Note 1]
  • -classpath - If the option -classpath <path> was used, then <path> had to explicitly contain both (1) classes.zip or rt.jar and (2) application classes.
This behavior for -classpath was unfortunate because it meant users had to spell out the path to classes.zip:
 % java -classpath /sdk-path/lib/classes.zip:/app/classes Application
We say unfortunate because this is inherently error-prone; the onus is on the user to ensure that the java command and the classes.zip were from the same JDK version. We ourselves have spent time debugging problems where a 1.1.4 java was trying to run 1.1.3 classes.zip, and this does not work because the native methods do not match.

The good news is that the -classpath option as used by the Java 2 SDK tools has taken on the same meaning as the CLASSPATH environment variable in the Java 2 SDK, so you can now conveniently omit having to spell out the path to Java platform classes:

 % java -classpath /app/classes Application

Some developers like to temporarily modify individual Java platform classes such as java/util/Vector.class, for purposes such as adding println statements to understand how the class works. In the Java 2 Platform, these users would not be able to use the -classpath option to set the path to Java platform classes, as was possible in 1.1. For such uses, the -Xbootclasspath option must be used in the Java 2 SDK.

Note 1 - Contrary to the bulleted statement above, we have seen users explicitly placing the path to classes.zip in their CLASSPATH environment variable, though this was not at all required.

New Class Search Paths

The earlier section showed that in JDK1.1, there was one search path used to find classes; its value could be set either through the -classpath option or the CLASSPATH environment variable.

In the Java 2 SDK, there are three search paths that are used to find classes:

  1. The first place where java looks for classes is the bootstrap classpath. The value of this path can be examined by calling System.getProperty("sun.boot.class.path"). Note that the prefix "sun." shows that, at least for now, this property is specific to Sun's implementation.
  2. The second place where java looks for classes is the extension directories. The list of directories can be examined by calling System.getProperty("java.ext.dirs").
  3. The third and last place where java looks for classes is the application classpath. The value of this path can be examined by calling System.getProperty("java.class.path").

For a discussion of the new "extension directories" feature mentioned in item 2, refer to javac and The Extensions Framework documentation.

In the Java 2 SDK, the argument you specify with the -classpath option is the value of the application classpath; it should contain the path to classes that constitute your application. The bootstrap classpath contains the path to Java platform classes that are contained in a file named rt.jar. This is discussed in the next section.

New Options to Search for Boot Classes: -Xbootclasspath, -bootclasspath
NOTE - For a description of what the leading "X" means in an option, see Standard vs. Non-standard Options.
-Xbootclasspath - As mentioned, the bootstrap classpath contains the path to Java platform classes that are contained in rt.jar. If you need to override the location where Java platform classes are found, you must use the -Xbootclasspath option -- this is a big change from 1.1 where -classpath provided this functionality. Consider this example:
 % java -Xbootclasspath:/my/bootclasses:/jre/lib/rt.jar MyApplication

In this example, the java command searches the paths provided by -Xbootclasspath to find the Java platform classes. It first searches the directory /my/bootclasses before searching through rt.jar. If you wanted to add debugging statements to java/util/Vector.class, you would place the modified class file under /my/bootclasses. This modified version would be found first, the search would then stop and this version would be loaded.

-bootclasspath - In addition, javac supports a similar option -bootclasspath which can be used to change the platform classes you are compiling against. This is most useful if you need to take advantage of the bug fixes in the Java 2 SDK's javac to compile a 1.1 application. Please refer to that option for detailed instructions on how to do this.

Here are some relevant notes for both options:

  • Avoid overriding Java platform classes - The Java 2 Runtime Environment re-distribution license does not allow replacing parts of rt.jar. So the -Xbootclasspath option may not be used override parts of rt.jar when you are re-distributing the Runtime Environment with an application. When re-distributing, if there is a need to place your application on the bootclasspath, make sure that unmodified rt.jar and (the optional) i18n.jar, are placed first on -Xbootclasspath before your application classes. For example:
        # If app needs to be deployed on -Xbootclasspath, then use:
    % java -Xbootclasspath:/jre/lib/rt.jar:/app/classes Application

    # instead of accidentally overriding rt.jar:
    % java -Xbootclasspath:/app/classes:/jre/lib/rt.jar Application
  • Our implementation of class path searching - The discerning reader is bound to ask "How are all these paths tied together by the implementation of java?" We'll resist the temptatation to say, "the answer is beyond the scope of this document," but instead present a short version of the story.

    The Java 2 Platform introduced the notion of a parent classloader. A well-behaved classloader in the Java 2 SDK always checks to see if its parent can load the class before it uses its own mechanisms (such as paths it might have been asked to look at) to locate a class.

    The Java runtime has three classloaders, where a parent classloader is shown above its child:

          bootstrap classloader
               |
      extension classloader
               |
     application classloader
    The bootstrap classloader searches for classes only on the bootclasspath and on no other path. Likewise, the extension classloader searches in the extensions loaded from extdirs, and the application classloader searches only on the application class path.

    Say, you launch your application with the following command line:

       % java -classpath ~/classes MyApplication
    This command causes a sequence of steps, giving each classloader in turn a chance to load the application classes. First, the java command asks the application classloader (the one that uses the -classpath value) to load MyApplication. However, rather than trying to load this class, the application classloader asks its parent, the extension classloader, to load the class, which in turn, likewise asks its parent, the bootstrap classloader, to load the class. The bootstrap classloader is built into the virtual machine and has no parent; it attempts to load the class from the bootstrap classpath. Since the bootstrap classloader will not find MyApplication (we did not use -Xbootclasspath to disturb the default path), it allows the extension classloader to try to load the class, which also will not find the class (since we did not use -Djava.ext.dirs options to disturb the default path). Finally, the application classloader ends up finding and loading ~/classes/MyApplication.class.

    It is such parenting that produces the order "bootstrap first, extensions next, applications last" when searching for classes. For more information we again refer you to the The Extensions Framework documentation.

Appletviewer No Longer Uses CLASSPATH

In the Java 2 SDK, appletviewer ignores your CLASSPATH environment setting (which it did not ignore in 1.1). Though this sounds like a drastic change, this is the semantics you really want when testing your applets.

Let us consider an example that worked in JDK 1.1, but will not work in the Java 2 SDK. Say you placed your .html file in a place different from your .class files. In JDK 1.1, you could set your CLASSPATH at the .class files, and appletviewer would pick them up.

   # Foo.class and foo.html are in different directories.
   % ls /home/user/htmls /home/user/classes
   /home/user/classes:
   Foo.class

   /home/user/htmls:
   foo.html

   # Foo.class is NOT in applet's codebase:
   % cat /home/user/htmls/foo.html
   <applet code=Foo height=100 width=100></applet>

   # Can an applet use a class outside its codebase?
   % setenv CLASSPATH /home/user/classes

   # Works in 1.1.
   % appletviewer /home/user/htmls/foo.html

   # ClassNotFoundException in the Java 2 SDK!
   % appletviewer /home/user/htmls/foo.html

Why did we change what looks like reasonable behavior? Look more closely. When an applet runs in a browser which does not honor CLASSPATH the way SDK's appletviewer does, you have the same problem that you have when using the Java 2 SDK. The classesreferred to by an applet must be either:

  • Java platform classes (such as java.lang.String) which are present in a browser, or,
  • classes that can be downloaded from the applet's codebase.
You cannot, and should not, expect a user of your applet to set their CLASSPATH, and even if they did, their browser might choose to ignore it. Consequently, appletviewer now does the same thing that a browser would.

One nice thing about 1.1 appletviewer honoring CLASSPATH was that you could grab a third party library (say a mailx.jar providing some email related functionality), place it on your CLASSPATH and your applet could refer to the classes in mailx.jar. In order to get the same convenience in the Java 2 SDK, we recommend the use of The Extensions Framework, which, unlike CLASSPATH, is a deployment solution. (CLASSPATH is only a development time solution.)

Standard vs. Non-standard Options

In the Java 2 SDK tooks, some options are prefixed with -X whereas others are not. In 1.1, if you needed to set the startup heap size of the virtual machine to 10MB, you would say:

    % java -ms10m Application

In the Java 2 SDK, you should express the same option with a -X.

    % java -Xms10m Application

The motivation here, as you probably guessed, is that the Java 2 SDK tools distinguishe between options that can apply to all virtual machines, as opposed to options that are specific to a particular virtual machine's implementation. We expect all virtual machines will allow setting a classpath, but we can't expect all virtual machines to support initial heap size.

In the long run, as more compiler and virtual machine vendors support the same standard options, replacing a compiler won't require any changes to your makefiles, or replacing a virtual machine for a server application you launched through a script will need no modifications to the script.

Note however that for backwards compatibility, the Java 2 SDK java launcher internally translates -ms10m to -Xms10m, so you could still use the old -ms10m option, but we recommend that you do use the newer syntax.

For the current list of standard options, please type:

    % java -help
    % javac -help

For the current list of non-standard options, please type:

    % java -X
    % javac -X

A note to vendors -- this separation of command line options into standard and non-standard ones is orthogonal to, and bears no relation with, conformance requirements. As stated earlier, we just hope that users' lives will be eased in the long run if standard options become a de facto standard for options that makes sense.

New Option to Search for Source Files: -sourcepath

In 1.1, javac and javadoc would find both source files and class files in the paths specified in the CLASSPATH environment variable. For example, suppose you compiled foo/bar/FooBar.java and the class FooBar relied on a Helper class, then javac would attempt to find the source file Helper.java in your CLASSPATH:
    % ls /tmp/foo/bar/*.java
    /tmp/foo/bar/FooBar.java   /tmp/foo/bar/Helper.java

    # Error because javac can't find Helper.class or Helper.java
    % javac /tmp/foo/bar/FooBar.java
    /tmp/foo/bar/FooBar.java:3: Superclass foo.bar.Helper of ... not found.

    % setenv CLASSPATH /tmp

    # Works because javac snooped in CLASSPATH for source files
    % javac /tmp/foo/bar/FooBar.java
In the Java 2 SDK, these tools still look in CLASSPATH for source files unless the -sourcepath <path> option is included -- then it looks only in <path> for source files, and the CLASSPATH is not searched for source files:
    % setenv CLASSPATH /tmp

    # This still works with the Java 2 SDK:
    % javac /tmp/foo/bar/FooBar.java

    # But it doesn't work if you use -sourcepath
    % javac -sourcepath . /tmp/foo/bar/FooBar.java
    /tmp/foo/bar/FooBar.java:3: Superclass foo.bar.Helper ... not found.


extcheck - Jar conflict detection utility

extcheck - A utility to detect jar conflicts

extcheck detects version conflicts between a target jar file and currently installed extension jar files.

SYNOPSIS

extcheck [ -verbose ] targetfile.jar

DESCRIPTION

The extcheck utility checks a specified Jar file for title and version conflicts with any extensions installed in the Java 2 SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed.

The extcheck utility compares the Specification-title and Specification-version headers in the manifest of targetfile.jar file against the corresponding headers in all Jar files currently installed in the extension directory. (The extension directory is jre/lib/ext by default.) The extcheck utility compares version numbers in the same way as the method java.lang.Package.isCompatibleWith.

If no conflict is detected, the return code is 0.

If the manifest of any of the jar file in the extensions directory has the same Specification-title and the same or a newer Specification-version number, a non-zero error code is returned. A non-zero error code is also returned if targetfile.jar does not have the Specification-title or Specification-version attributes in its manifest.

OPTIONS
-verbose
Lists Jar files in the extension directory as they are checked. Additionally, manifest attributes of the target jar file and any conflicting jar files are also reported.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying virtual machine.

SEE ALSO

jar


jar-The Java Archive Tool

Combines multiple files into a single JAR archive file.

SYNOPSIS

jar [ options ] [manifest] destination input-file [input-files]

DESCRIPTION

The jar tool combines multiple files into a single JAR archive file. jar is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, jar was designed mainly to facilitate the packaging of java applets or applications into a single archive. When the components of an applet or application (.class files, images and sounds) are combined into a single archive, they may be downloaded by a java agent (like a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. jar also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the tar command. A jar archive can be use as a class path entry, whether it is compressed or not.

The 3 types of input files for the jar tool are

  • manifest file (optional)
  • destination jar file
  • files to be archived
Typical usage is
        % jar cf myjarfile *.class
In this example, all the class files in the current directory are placed into the file named "myjarfile". A manifest file is automatically generated by the jar tool and is always the first entry in the jar file. By default, it is named META-INF/MANIFEST.MF. The manifest file is the place where any meta-information about the archive is stored. Refer to the JAR file specification for details about how meta-information is stored in the manifest file.

If you have a pre-existing manifest file that you want the jar tool to use for the new jar archive, you can specify it using the -m option:

        % jar cmf myManifestFile myJarFile *.class
Be sure that any pre-existing manifest file that you use ends with a new line. The last line of a manifest file will not be parsed if it doesn't end with a new line character. Note that when you specify "cfm" instead of "cmf" (i.e., you invert the order of the "m" and "f" options), you need to specify the name of the jar archive first, followed by the name of the manifest file:
        % jar cfm myJarFile myManifestFile *.class
The manifest uses RFC822 ascii format, so it is easy to view and process manifest-file contents.

Beginning with version 1.3 of the Java 2 SDK, the jar utility supports JarIndex, which allows application class loaders to load classes efficiently from jar files. If an application or applet is bundled into multiple jar files, only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running jar with the new -i option. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the Class-Path attribute of the main jar file's manifest.

% jar -i main.jar

In this example, and INDEX.LIST file is inserted into the META-INF directory of main.jar's manifest.
The application class loader will use the information stored in this file for efficient class loading. Refer to the JarIndex specification for details about how location information is stored in the index file.

Examples of using the Jar tool to operate on Jar files and Jar file manifests are provided below and in the Jar trail of the Java Tutorial.

OPTIONS

c
Creates a new or empty archive on the standard output.
t
Lists the table of contents from standard output.
x file
Extracts all files, or just the named files, from standard input. If file is omitted, then all files are extracted; otherwise, only the specified file or files are extracted.
f
The second argument specifies a jar file to process. In the case of creation, this refers to the name of the jar file to be created (instead of on stdout). For table or xtract, the second argument identifies the jar file to be listed or extracted.
v
Generates verbose output on stderr.
m
Includes manifest information from specified pre-existing manifest file. Example use:
jar cmf myManifestFile myJarFile *.class
You can add special-purpose name-value attribute headers to the manifest file that aren't contained in the default manifest. Examples of such headers would be those for vendor information, version information, package sealing, and headers to make JAR-bundled applications executable. See the JAR Files trail in the Java Tutorial and the Notes for Developers web page for examples of using the m option.
0
Store only, without using ZIP compression.
M
Do not create a manifest file for the entries.
u
Update an existing JAR file by adding files or changing the manifest. For example,
jar uf foo.jar foo.class
would add the file foo.class to the existing JAR file foo.jar, and
jar umf manifest foo.jar
would update foo.jar's manifest with the information in manifest.
i
Generate index information for the specified jar file and its dependent jar files. For example,
jar -i foo.jar

would generate an INDEX.LIST file in foo.jar which contains location information for each package in foo.jar and all the jar files specified in foo.jar's Class-Path attribute.

-C
Temporaily changes directories during execution of jar command while processing the next argument. Its operation is intended to be similar to the -C option of the UNIX tar utility. For example,
jar uf foo.jar -C classes bar.class
would change to the classes directory and add the bar.class from that directory to foo.jar. The following command,
jar uf foo.jar -C classes . -C bin xyz.class
would change to the classes directory and add to foo.jar all files within the classes directory, but not the classes directory itself, and then change to the bin directory and add xyz.class to foo.jar.
-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying virtual machine.
If any of "files" is a directory, then that directory is processed recursively.

EXAMPLES

To add all the files in a particular directory to an archive (overwriting contents if the archive already exists):
$ ls
0.au            3.au            6.au            9.au            at_work.gif
1.au            4.au            7.au            Animator.class  monkey.jpg
2.au            5.au            8.au            Wave.class      spacemusic.au
$ jar cvf bundle.jar *
adding: 0.au
adding: 1.au
adding: 2.au
adding: 3.au
adding: 4.au
adding: 5.au
adding: 6.au
adding: 7.au
adding: 8.au
adding: 9.au
adding: Animator.class
adding: Wave.class
adding: at_work.gif
adding: monkey.jpg
adding: spacemusic.au
$
If you already have subdirectories for images, audio files and classes in your html directory, I might jar up each directory into a single jar file:
$ ls
audio classes images
$ jar cvf bundle.jar audio classes images
adding: audio/1.au
adding: audio/2.au
adding: audio/3.au
adding: audio/spacemusic.au
adding: classes/Animator.class
adding: classes/Wave.class
adding: images/monkey.jpg
adding: images/at_work.gif
$ ls -l
total 142
drwxr-xr-x   2 brown    green        512 Aug  1 22:33 audio
-rw-r--r--   1 brown    green      68677 Aug  1 22:36 bundle.jar
drwxr-xr-x   2 brown    green        512 Aug  1 22:26 classes
drwxr-xr-x   2 brown    green        512 Aug  1 22:25 images
$
You can then see the entry names in the jarfile using the jar tool and the "t" option:
$ ls
audio bundle.jar classes images
$ jar tf bundle.jar
META-INF/MANIFEST.MF
audio/1.au
audio/2.au
audio/3.au
audio/spacemusic.au
classes/Animator.class
classes/Wave.class
images/monkey.jpg
images/at_work.gif
$
Enumerating verbosely (with the "v" option) will tell you more information about the files in the archive, such as their size and last modified date:
$ jar tvf bundle.jar
   145 Thu Aug 01 22:27:00 PDT 1996 META-INF/MANIFEST.MF
   946 Thu Aug 01 22:24:22 PDT 1996 audio/1.au
  1039 Thu Aug 01 22:24:22 PDT 1996 audio/2.au
   993 Thu Aug 01 22:24:22 PDT 1996 audio/3.au
 48072 Thu Aug 01 22:24:23 PDT 1996 audio/spacemusic.au
 16711 Thu Aug 01 22:25:50 PDT 1996 classes/Animator.class
  3368 Thu Aug 01 22:26:02 PDT 1996 classes/Wave.class
 12809 Thu Aug 01 22:24:48 PDT 1996 images/monkey.jpg
   527 Thu Aug 01 22:25:20 PDT 1996 images/at_work.gif
$

If you bundled a stock trade application(applet) into the following jar files:

main.jar buy.jar sell.jar other.jar
and you specified in the Class-Path attribute in main.jar's manifest as:
Class-Path: buy.jar sell.jar other.jar
Then you can use the -i option to speed up your application's class loading time:
$ jar -i main.jar
an INDEX.LIST file is inserted to the META-INF directory which will enable the application class loader to download the right jar files when it is searching for classes or resources.

SEE ALSO

The Jar Overview
The Jar File Specification
The JarIndex Spec
Java Tutorial on the Java Software web site.


jarsigner - JAR Signing and Verification Tool

Generates signatures for Java ARchive (JAR) files, and verifies the signatures of signed JAR files.

SYNOPSIS

jarsigner [ options ] jar-file alias
jarsigner -verify [ options ] jar-file

DESCRIPTION

The jarsigner tool is used for two purposes:
  1. to sign Java ARchive (JAR) files, and

  2. to verify the signatures and integrity of signed JAR files.

The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution. A tool named jar enables developers to produce JAR files. (Technically, any zip file can also be considered a JAR file, although when created by jar or processed by jarsigner, JAR files also contain a META-INF/MANIFEST.MF file.)

A digital signature is a string of bits that is computed from some data (the data being "signed") and the private key of an entity (a person, company, etc.). Like a handwritten signature, a digital signature has many useful characteristics:

  • Its authenticity can be verified, via a computation that uses the public key corresponding to the private key used to generate the signature.

  • It cannot be forged, assuming the private key is kept secret.

  • It is a function of the data signed and thus can't be claimed to be the signature for other data as well.

  • The signed data cannot be changed; if it is, the signature will no longer verify as being authentic.

In order for an entity's signature to be generated for a file, the entity must first have a public/private key pair associated with it, and also one or more certificates authenticating its public key. A certificate is a digitally signed statement from one entity, saying that the public key of some other entity has a particular value.

jarsigner uses key and certificate information from a keystore to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. The keytool utility is used to create and administer keystores.

jarsigner uses an entity's private key to generate a signature. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file. jarsigner can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file).

At this time, jarsigner can only sign JAR files created by the SDK jar tool or zip files. (JAR files are the same as zip files, except they also have a META-INF/MANIFEST.MF file. Such a file will automatically be created when jarsigner signs a zip file.)

The default jarsigner behavior is to sign a JAR (or zip) file. Use the -verify option to instead have it verify a signed JAR file.

Compatibility with JDK 1.1

The keytool and jarsigner tools completely replace the javakey tool provided in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them.

The new keystore architecture replaces the identity database that javakey created and managed. There is no backwards compatibility between the keystore format and the database format used by javakey in 1.1. However,

  • It is possible to import the information from an identity database into a keystore, via the keytool -identitydb command.

  • jarsigner can sign JAR files also previously signed using javakey.

  • jarsigner can verify JAR files signed using javakey. Thus, it recognizes and can work with signer aliases that are from a JDK 1.1 identity database rather than a Java 2 SDK keystore.
The following table explains how JAR files that were signed in JDK 1.1.x are treated in the Java 2 platform.

JAR File Type

Identity in 1.1 database

Trusted Identity imported into Java 2 Platform keystore from 1.1 database (4)

Policy File grants privileges to Identity/Alias

Privileges Granted

Signed JAR

NO

NO

NO

Default privileges granted to all code.

Unsigned JAR

NO

NO

NO

Default privileges granted to all code.

Signed JAR

NO

YES

NO

Default privileges granted to all code.

Signed JAR

YES/Untrusted

NO

NO

Default privileges granted to all code. (3)

Signed JAR

YES/Untrusted

NO

YES

Default privileges granted to all code. (1,3)

Signed JAR

NO

YES

YES

Default privileges granted to all code plus privileges granted in policy file.

Signed JAR

YES/Trusted

YES

YES

Default privileges granted to all code plus privileges granted in policy file. (2)

Signed JAR

YES/Trusted

NO

NO

All privileges

Signed JAR

YES/Trusted

YES

NO

All privileges (1)

Signed JAR

YES/Trusted

NO

YES

All privileges (1)

Notes:

  1. If an identity/alias is mentioned in the policy file, it must be imported into the keystore for the policy file to have any effect on privileges granted.

  2. The policy file/keystore combination has precedence over a trusted identity in the identity database.

  3. Untrusted identities are ignored in the Java 2 platform.

  4. Only trusted identities can be imported into Java 2 SDK keystores.

Keystore Aliases

All keystore entities are accessed via unique aliases.

When using jarsigner to sign a JAR file, you must specify the alias for the keystore entry containing the private key needed to generate the signature. For example, the following will sign the JAR file named "MyJARFile.jar", using the private key associated with the alias "duke" in the keystore named "mystore" in the "working" directory. Since no output file is specified, it overwrites MyJARFile.jar with the signed JAR file.

    jarsigner -keystore /working/mystore -storepass myspass
      -keypass dukekeypasswd MyJARFile.jar duke

Keystores are protected with a password, so the store password (in this case "myspass") must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password (in this case "dukekeypasswd") must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password.

Keystore Location

jarsigner has a -keystore option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory.

Keystore Implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, there are two command-line tools that make use of keystore implementations (keytool and jarsigner), and also a GUI-based tool named Policy Tool. Since KeyStore is publicly available, Java 2 SDK users can write additional security applications that use it.

There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API.) Thus, to provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture.

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

keytool works on any file-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The jarsigner and policytool tools, on the other hand, can read a keystore from any location that can be specified using a URL.

For jarsigner and keytool, you can specify a keystore type at the command line, via the -storetype option. For Policy Tool, you can specify a keystore type via the "Change Keystore" command in the Edit menu.

If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the SDK security properties directory, java.home/lib/security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Each tool gets the keystore.type value and then examines all the currently-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type (as specified in the keystore.type property):

    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file:

    keystore.type=jks

To have the tools utilize a keystore implementation other than the default, change that line to specify a different keystore type.

For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to

    keystore.type=pkcs12
Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".

Supported Algorithms

At this time, jarsigner can sign a JAR file using either

  • DSA (Digital Signature Algorithm) with the SHA-1 digest algorithm, or

  • the RSA algorithm with the MD5 digest algorithm.

That is, if the signer's public and private keys are DSA keys, jarsigner will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, jarsigner will attempt to sign the JAR file using the "MD5withRSA" algorithm. This is only possible if there is a statically installed provider supplying an implementation for the "MD5withRSA" algorithm. (There is always a "SHA1withDSA" algorithm available, from the default "SUN" provider.)

The Signed JAR File

When jarsigner is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory:

  • a signature file, with a .SF extension, and

  • a signature block file, with a .DSA extension.
The base file names for these two files come from the value of the -sigFile option. For example, if the option appears as
  -sigFile MKSIGN
the files are named "MKSIGN.SF" and "MKSIGN.DSA".

If no -sigfile option appears on the command line, the base file name for the .SF and .DSA files will be the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. Legal characters include letters, digits, underscores, and hyphens.

The Signature (.SF) File

A signature file (the .SF file) looks similar to the manifest file that is always included in a JAR file when jarsigner is used to sign the file. That is, for each source file included in the JAR file, the .SF file has three lines, just as in the manifest file, listing the following:
  • the file name,

  • the name of the digest algorithm used (SHA), and

  • a SHA digest value.
In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. In the .SF file, on the other hand, the digest value for a given source file is the hash of the three lines in the manifest file for the source file.

The signature file also, by default, includes a header containing a hash of the whole manifest file. The presence of the header enables verification optimization, as described in JAR File Verification.

The Signature Block (.DSA) File

The .SF file is signed and the signature is placed in the .DSA file. The .DSA file also contains, encoded inside it, the certificate or certificate chain from the keystore which authenticates the public key corresponding to the private key used for signing.

JAR File Verification

A successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps:

  1. Verify the signature of the .SF file itself.

    That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with.

  2. Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest.

    The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step.

    If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File).

    One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the jar tool) after the signature (and thus the .SF file) was generated. When the jar tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file.

  3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest, and then compare the result with the digest for this file in the manifest section. The digests should be the same, or verification fails.

If any serious verification failures occur during the verification process, the process is stopped and a security exception is thrown. It is caught and displayed by jarsigner.

Multiple Signatures for a JAR File

A JAR file can be signed by multiple people simply by running the jarsigner tool on the file multiple times, specifying the alias for a different person each time, as in:
  jarsigner myBundle.jar susan
  jarsigner myBundle.jar kevin
When a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. Thus, in the example above, the output JAR file includes files with the following names:
  SUSAN.SF
  SUSAN.DSA
  KEVIN.SF
  KEVIN.DSA
Note: It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1.1 javakey tool and others by jarsigner. That is, jarsigner can be used to sign JAR files already previously signed using javakey.

OPTIONS

The various jarsigner options are listed and described below. Note:

  • All option names are preceded by a minus sign (-).

  • The options may be provided in any order.

  • Items in italics (option values) represent the actual values that must be supplied.

  • The -keystore, -storepass, -keypass, -sigfile , and -signedjar options are only relevant when signing a JAR file, not when verifying a signed JAR file. Similarly, an alias is only specified on the command line when signing a JAR file.

-keystore url
Specifies the URL that tells the keystore location. This defaults to the file .keystore in the user's home directory, as determined by the "user.home" system property.

A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default).

A keystore is not required when verifying, but if one is specified, or the default exists, and the -verbose option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore.

Note: the -keystore argument can actually be a file name (and path) specification rather than a URL, in which case it will be treated the same as a "file:" URL. That is,

  -keystore filePathAndName
is treated as equivalent to
  -keystore file:filePathAndName

-storetype storetype
Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

-storepass password
Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a -storepass option is not provided at the command line, the user is prompted for the password.

Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

-keypass password
Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line. The password is required when using jarsigner to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it.

Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

-sigfile file
Specifies the base file name to be used for the generated .SF and .DSA files. For example, if file is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META-INF" directory of the signed JAR file.

The characters in file must come from the set "a-zA-Z0-9_-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names.

If no -sigfile option appears on the command line, the base file name for the .SF and .DSA files will be the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name.

-signedjar file
Specifies the name to be used for the signed JAR file.

If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file.

-verify
If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)"

It is possible to verify JAR files signed using either jarsigner or the JDK 1.1 javakey tool, or both.

For further information on verification, see JAR File Verification.

-certs
If this appears on the command line, along with the -verify and -verbose options, the output includes certificate information for each signer of the JAR file. This information includes

  • the name of the type of certificate (stored in the .DSA file) that certifies the signer's public key

  • if the certificate is an X.509 certificate (more specifically, an instance of java.security.cert.X509Certificate): the distinguished name of the signer

The keystore is also examined. If no keystore value is specified on the command line, the default keystore file (if any) will be checked. If the public key certificate for a signer matches an entry in the keystore, then the following information will also be displayed:

  • in parentheses, the alias name for the keystore entry for that signer. If the signer actually comes from a JDK 1.1 identity database instead of from a keystore, the alias name will appear in brackets instead of parentheses.

-verbose
If this appears on the command line, it indicates "verbose" mode, which causes jarsigner to output extra information as to the progress of the JAR signing or verification.

-internalsf
In the past, the .DSA (signature block) file generated when a JAR file was signed used to include a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default doesn't contain a copy of the .SF file anymore. But if -internalsf appears on the command line, the old behavior is utilized. This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.

-sectionsonly
If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does not include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File .

By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file.

For further information, see JAR File Verification.

This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.

-provider provider-class-name
Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.

-J javaoption
Passes through the specified javaoption string directly to the Java interpreter. (jarsigner is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

EXAMPLES

Signing a JAR File

Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. Suppose the keystore password is "myspass" and the password for jane's private key is "j638klm". You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar":

    jarsigner -keystore /working/mystore -storepass myspass
      -keypass j638klm -signedjar sbundle.jar bundle.jar jane

Note that there is no -sigfile specified in the command above, so the generated .SF and .DSA files to be placed in the signed JAR file will have default names based on the alias name. That is, they will be named JANE.SF and JANE.DSA.

If you want to be prompted for the store password and the private key password, you could shorten the above command to

    jarsigner -keystore /working/mystore
      -signedjar sbundle.jar bundle.jar jane
If the keystore to be used is the default keystore (the one named ".keystore" in your home directory), you don't need to specify a keystore, as in:
    jarsigner -signedjar sbundle.jar bundle.jar jane
Finally, if you want the signed JAR file to simply overwrite the input JAR file (bundle.jar), you don't need to specify a -signedjar option:
    jarsigner bundle.jar jane

Verifying a Signed JAR File

To verify a signed JAR file, that is, to verify that the signature is valid and the JAR file has not been tampered with, use a command such as the following:
    jarsigner -verify sbundle.jar

If the verification is successful,

    jar verified.
is displayed. Otherwise, an error message appears.

You can get more information if you use the -verbose option. A sample use of jarsigner with the -verbose option is shown below, along with sample output:

    jarsigner -verify -verbose sbundle.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
    smk    849 Fri Sep 26 16:12:46 PDT 1997 test.class

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

Verification with Certificate Information

If you specify the -certs option when verifying, along with the -verify and -verbose options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (iff it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example,
    jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF
          1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class

      X.509, CN=Test Group, OU=Java Software, O=Sun Microsystems, L=CUP, S=CA, C=US (javatest)
      X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.
If the certificate for a signer is not an X.509 certificate, there is no distinguished name information. In that case, just the certificate type and the alias are shown. For example, if the certificate is a PGP certificate, and the alias is "bob", you'd get
      PGP, (bob)

Verification of a JAR File that Includes Identity Database Signers

If a JAR file has been signed using the JDK 1.1 javakey tool, and thus the signer is an alias in an identity database, the verification output includes an "i" symbol. If the JAR file has been signed by both an alias in an identity database and an alias in a keystore, both "k" and "i" appear.

When the -certs option is used, any identity database aliases are shown in square brackets rather than the parentheses used for keystore aliases. For example:

    jarsigner -keystore /working/mystore -verify -verbose -certs writeFile.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           199 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.SF
          1013 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.DSA
   smki   2752 Fri Sep 26 16:12:30 PDT 1997 writeFile.html

      X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
      X.509, CN=Duke, OU=Java Software, O=Sun, L=cup, S=ca, C=us [duke]

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore
      i = at least one certificate was found in identity scope

    jar verified.
Note that the alias "duke" is in brackets to denote that it is an identity database alias, not a keystore alias.

SEE ALSO

  • jar tool documentation

  • keytool tool documentation

  • the Security trail of the Java Tutorial for examples of the use of the jarsigner tool


java - the Java application launcher

  • Synopsis
  • Description
  • Options
  • See Also

SYNOPSIS

    java [ options ] class [ argument ... ]
    java [ options ] -jar file.jar [ argument ... ]
options
Command-line options.
class
Name of the class to be invoked.
file.jar
Name of the jar file to be invoked. Used only with -jar.
argument
Argument passed to the main function.

DESCRIPTION
The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method. The method declaration must look like the following:
    public static void main(String args[])
The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argument is the name of a JAR archive containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header.

The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.

Non-option arguments after the class name or JAR file name are passed to the main function.

OPTIONS
The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the current implementations of the virtual machines support a set of non-standard options options that are subject to change in future releases.

Standard Options
-client
Select the Java HotSpot Client VM. This is the default.

-server
Select the Java HotSpot Server VM.

-classpath classpath
-cp classpath
Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (:). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.

If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).

For more information on class paths, see Setting the Class Path.

-D property=value
Set a system property value.

-jar
Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests.

When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.

On Solaris 8, JAR files that can be run with the "java -jar" option can have their execute permissions set so they can be run without using "java -jar".

-verbose
-verbose:class
Display information about each class loaded.

-verbose:gc
Report on each garbage collection event.

-verbose:jni
Report information about use of native methods and other Java Native Interface activity.

-version
Display version information and exit.

-showversion
Display version information and continue.

-?
-help
Display usage information and exit.

-X
Display information about non-standard options and exit.

Non-Standard Options

-Xint
Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot VMs' adaptive compiler will not be present in this mode.

-Xdebug
Start with the debugger enabled. Refer to jdb description for more details and an example.

-Xbootclasspath:bootclasspath
Specify a colon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xbootclasspath/a:path
Specify a colon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.

-Xbootclasspath/p:path
Specify a colon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xfuture
Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.

-Xnoclassgc
Disable class garbage collection.

-Xincgc
Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will eliminate occasional garbage-collection pauses during program execution. However, it can lead to a roughly 10% decrease in overall GC performance.

-Xms n
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
       -Xms6291456
       -Xms6144k
       -Xms6m

-Xmx n
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts. Examples:
       -Xmx83886080
       -Xmx81920k
       -Xmx80m

-Xss n
Set thread stack size. Each Java thread has two stacks: one for Java code and one for C code. This option sets the maximum stack size that can be used by C code in a thread to n. Every thread that is spawned during the execution of the program passed to java has n as its C stack size. The default units for n are bytes and n must be > 1000 bytes. To modify the meaning of n, append either the letter k for kilobytes or the letter m for megabytes. The default stack size is 512 kilobytes (-Xss512k).

-Xprof
Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.

-Xrunhprof[:help][:<suboption>=<value>,...]
Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs. Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.

-Xrs
Reduces use of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.

In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.

Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks.

The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps.

Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. To address this issue, the -Xrs command-line option has been added beginning in J2SE 1.3.1. When -Xrs is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.

There are two consequences of specifying -Xrs:

  • SIGQUIT thread dumps are not available.
  • User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.

WARNING: Flags -Xdebug and -Xint are mutually exclusive. No more than one of those options should be used on a java command line.

SEE ALSO
  • javac - the Java programming language compiler
  • jdb - Java Application Debugger
  • javah - C Header and Stub File Generator
  • jar - JAR Archive Tool
  • The Java Extensions Framework
  • Security Features.


Java 2 SDK File Structure

Java 2 SDK and Runtime Environment File Structure

 SDK Tools

This document gives an overview of the Java 2 SDK directories and the files they contain. This page may also be used as a reference for the file structure of the Java 2 Runtime Environment. To see the file structure of the Runtime Environment, just look at the description of the contents of the SDK's jre directory on this page. The file structure of the Java 2 Runtime Environment is identical to that of the SDK's jre directory.

Development Files and Directories

This section describes the files and directories that are required to develop apps for the Java platform. (The directories that are not required include demos, Java source code, and C header files. They are discussed in the following section, Additional Files and Directories.) The following chart shows the most important directories:

             j2sdk1_3_0
   ___________|_________________
  |           |                 |
 bin         lib               jre
  |           |         ________|__________
java*     tools.jar    |                   |
javac*    dt.jar      bin                 lib
javap*                 |       ________ ___|___ _________ ________
javah*               java*    |        |       |         |        |
javadoc*                    rt.jar    ext   security   sparc    applet
                            i18n.jar                  /     \
                                                  server  client

Assuming the SDK software is installed at /j2sdk1_3_0, here are some of the most important directories:

/j2sdk1_3_0
The root directory of the SDK software installation. Contains copyright, license, and README files. Also contains src.jar, the archive of source code for the Java 2 platform.

/j2sdk1_3_0/bin
The executables for all the development tools contained in the Java 2 SDK. The PATH environment variable should contain an entry for this directory. For more information on the tools, see the SDK Tools.

/j2sdk1_3_0/lib
Files used by the development tools. Includes tools.jar, which contains non-core classes for support of the tools and utilities in the SDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for the application.

/j2sdk1_3_0/jre
The root directory of the Java runtime environment used by the SDK development tools. The runtime environment is an implementation of the Java 2 platform. This is the directory referred to by the java.home system property.

/j2sdk1_3_0/jre/bin
Executable files for tools and libraries used by the Java platform. The executable files are identical to files in /j2sdk1_3_0/bin. The java launcher tool serves as an application launcher, in place of the old jre tool that shipped with 1.1 versions of the SDK software. This directory does not need to be in the PATH environment variable.

/j2sdk1_3_0/jre/lib
Code libraries, property settings, and resource files used by the Java runtime environment. Includes:
  • rt.jar -- the bootstrap classes (the RunTime classes that comprise the Java platform's core API).
  • i18n.jar -- the character-conversion classes and other files associated with internationalization and localization.
Aside from the ext subdirectory (described below) there are several additional resource subdirectories not described here.

/j2sdk1_3_0/jre/lib/ext
Default installation directory for Extensions to the Java platform. This is where the JavaHelp jar file goes when it is installed, for example.
/j2sdk1_3_0/jre/lib/security
Contains files used for security management. These include the security policy (java.policy) and security properties (java.security) files.

/j2sdk1_3_0/jre/lib/sparc
Contains the .so (shared object) files used by the Solaris version of the Java platform.

/j2sdk1_3_0/jre/lib/sparc/client
Contains the .so file used by the Java HotSpot Client Virtual Machine. This is the default VM.

/j2sdk1_3_0/jre/lib/sparc/server
Contains the .so file used by the Java HotSpot Server Virtual Machine.

/j2sdk1_3_0/jre/lib/applet
Jar files containing support classes for applets can be placed in the lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be pre-loaded from teh local file system by the applet class loader, providing the same protections as if they had been downloaded over the net.

Additional Files and Directories

This section describes the directory structure for the demos, Java source code, and C header files. Here is the directory structure:

                           j2sdk1_3_0
                 ___________|__________ _________
                |           |          |         |
              demo       include    src.jar     man
             ___|___ _________ __________ ________
            |       |         |          |        |
          applets  jfc       jpda      sound     jni

The additional files and directories shown above are:

/j2sdk1_3_0/src.jar
Archive containing source code for the Java 2 platform.

/j2sdk1_3_0/demo
Examples, with source code, that show you how to program for the Java platform.

/j2sdk1_3_0/demo/applets
Applets that can be used on a Web page.

/j2sdk1_3_0/demo/jfc
Examples that use Java 2DTM and JFC/Swing components.

/j2sdk1_3_0/demo/jpda
Examples of using the Java Platform Debugging Architecture. Includes source code for the javadt and jdb utilities.

/j2sdk1_3_0/demo/sound
Contains Java Sound demos with source code.

/j2sdk1_3_0/demo/jni
Example classes and C code that demonstrate access to poll(2) functionality from the Java 2 Platform.

/j2sdk1_3_0/include
C-language header files that support native-code programming using the Java Native Interface and the Java Virtual Machine Debugger Interface.

/j2sdk1_3_0/man
Contains troff-formatted man pages for the Java 2 SDK tools.


javac - Java programming language compiler

  • Synopsis
  • Description
  • Searching for Types
  • File List
  • Options
  • Examples
  • See Also

SYNOPSIS

javac [ options ] [ sourcefiles ] [ @files ]
oldjavac [ options ] [ sourcefiles ] [ @files ]
Arguments may be in any order.
options
Command-line options.
sourcefiles
One or more source files to be compiled (such as MyClass.java).
@files
One or more files that list source files.

DESCRIPTION
The javac tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files.

There are two ways to pass source code file names to javac:

  • For a small number of source files, simply list the file names on the command line.

  • For a large number of source files, list the the file names in a file, separated by blanks or line breaks. Then use the list file name on the javac command line, preceded by an @ character.
Source code file names must have .java suffixes, class file names must have .class suffixes, and both source and class files must have root names that identify the class. For example, a class called MyClass would be written in a source file called MyClass.java and compiled into a bytecode class file called MyClass.class.

Inner class definitions produce additional class files. These class files have names combining the inner and outer class names, such as MyClass$MyInnerClass.class.

You should arrange source files in a directory tree that reflects their package tree. For example, if you keep all your source files in /workspace, the source code for com.mysoft.mypack.MyClass should be in /workspace/com/mysoft/mypack/MyClass.java.

By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with -d (see Options, below).

SEARCHING FOR TYPES
When compiling a source file, the compiler often needs information about a type it does not yet recognize. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.

For example, when you subclass java.applet.Applet, you are also using Applet's ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.awt.Object.

When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches first in the bootstrap and extension classes, then in the user class path. The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path). If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files. You can specify different bootstrap or extension classes with the -bootclasspath and -extdirs options; see Cross-Compilation Options below.

A successful type search may produce a class file, a source file, or both. Here is how javac handles each situation:

  • Search produces a class file but no source file: javac uses the class file.

  • Search produces a source file but no class file: javac compiles the source file and uses the resulting class file.

  • Search produces both a source file and a class file: javac determines whether the class file is out of date. If the class file is out of date, javac recompiles the source file and uses the updated class file. Otherwise, javac just uses the class file.

    By default, javac considers a class file out of date only if it is older than the source file. (The -Xdepend option specifies a slower but more reliable procedure.)

Note that javac can silently compile source files not mentioned on the command line. Use the -verbose option to trace automatic compilation.

FILE LIST

To shorten or simplify the javac command, you may specify one or more files that themselves contain one filename per line. On the command line, use the '@' character with the filename to specify it as a file list. When javac encounters an argument beginning with the character `@', it operates on the filenames in that file as if they had been on the command line.

For example, you can list all of the source file names in a file named sourcefiles. This file might look like:

     MyClass1.java
     MyClass2.java
     MyClass3.java
You could then run the compiler with:
     % javac @sourcefiles

OPTIONS
The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non-standard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Non-standard options begin with -X.

Standard Options
-classpath classpath
Set the user class path, overriding the user class path in the CLASSPATH environment variable. If neither CLASSPATH or -classpath is specified, the user class path consists of the current directory. See Setting the Class Path for more details.

If the -sourcepath option is not specified, the user class path is searched for source files as well as class files.

-d directory
Set the destination directory for class files. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d /home/myclasses and the class is called com.mypackage.MyClass, then the class file is called /home/myclasses/com/mypackage/MyClass.class.

If -d is not specified, javac puts the class file in the same directory as the source file.

Note that the directory specified by -d is not automatically added to your user class path.

-deprecation
Show a description of each use or override of a deprecated member or class. Without -deprecation, javac shows the names of source files that use or override deprecated members or classes.

-encoding
Set the source file encoding name, such as EUCJIS/SJIS. If -encoding is not specified, the platform default converter is used.

-g
Generate all debugging information, including local variables. By default, only line number and source file information is generated.

-g:none
Do not generate any debugging information.

-g:{keyword list}
Generate only some kinds of debugging information, specified by a comma separated list of keywords. Valid keywords are:
source
Source file debugging information
lines
Line number debugging information
vars
Local variable debugging information

-nowarn
Disable warning messages.

-O
Note: the -O option does nothing in the current implementation of javac and oldjavac.
Optimize code for execution time. Using the -O option may slow down compilation, produce larger class files, and make the program difficult to debug.

Prior to the Java 2 SDK v1.2, the -g and -O options of javac could not be used togther. As of the Java 2 SDK v1.2, you can combine -g and -O, but you may get suprising results, such as missing variables or relocated or missing code. -O no longer automatically turns on -depend or turns off -g.

-sourcepath sourcepath
Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name.

Note that classes found through the classpath are subject to automatic recompilation if their sources are found.

-verbose
Verbose output. This includes information about each class loaded and each source file compiled.

Cross-Compilation Options

By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use -bootclasspath and -extdirs when cross-compiling; see Cross-Compilation Example below.

-target version
Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with both 1.1 VMs and VMs in the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:

1.1
Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK. This is the default.
1.2
Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs.
1.3
Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs.

-bootclasspath bootclasspath
Cross-compile against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives.

-extdirs directories
Cross-compile against the specified extension directories. Directories is a colon-separated list of directories. Each JAR archive in the specified directories is searched for class files.

Non-Standard Options
These options are supported only by oldjavac. They are not supported by the new javac compiler.

-X
Display information about non-standard options and exit.

-Xdepend
Recursively search all reachable classes for more recent source files to recompile. This option will more reliably discover classes that need to be recompiled, but can slow down the compilation process drastically.

-Xstdout
Send compiler messages to System.out. By default, compiler messages go to System.err.

-Xverbosepath
Describe how paths and standard extensions were searched to find source and class files.

The -J option

Both javac and oldjavac support the -J option.
-J option
Pass option to the java launcher called by javac. For example, -J-Xms48m sets the startup memory to 48 megabytes. Although it does not begin with -X, it is not a `standard option' of javac. It is a common convention for -J to pass options to the underlying VM executing applications written in Java.

Note that CLASSPATH, -classpath, -bootclasspath, and -extdirs do not specify the classes used to run javac. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the -J option to pass through options to the underlying java launcher.

EXAMPLES

Compiling a Simple Program
One source file, Hello.java, defines a class called greetings.Hello. The greetings directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with -d.
% ls
greetings/
% ls greetings
Hello.java
% cat greetings/Hello.java
package greetings;

public class Hello {
    public static void main(String[] args) {
        for (int i=0; i < args.length; i++) {
            System.out.println("Hello " + args[i]);
        }
    }
}
% javac greetings/Hello.java
% ls greetings
Hello.class   Hello.java
% java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone

Compiling Multiple Source Files
This example compiles all the source files in the package greetings.
% ls
greetings/
% ls greetings
Aloha.java         GutenTag.java      Hello.java         Hi.java
% javac greetings/*.java
% ls greetings
Aloha.class         GutenTag.class      Hello.class         Hi.class
Aloha.java          GutenTag.java       Hello.java          Hi.java

Specifying a User Class Path
Having changed one of the source files in the previous example, we recompile it:
% pwd
/examples
% javac greetings/Hi.java
Since greetings.Hi refers to other classes in the greetings package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we're in? Then we need to add /examples to the user class path. We can do this by setting CLASSPATH, but here we'll use the -classpath option.
% javac -classpath /examples /examples/greetings/Hi.java
If we change greetings.Hi again, to use a banner utility, that utility also needs to be accessible through the user class path.
% javac -classpath /examples:/lib/Banners.jar \
              /examples/greetings/Hi.java
To execute a class in greetings, we need access both to greetings and to the classes it uses.
% java -classpath /examples:/lib/Banners.jar greetings.Hi

Separating Source Files and Class Files
It often makes sense to keep source files and class files in separate directories, especially on large projects. We use -d to indicate the separate class file destination. Since the source files are not in the user class path, we use -sourcepath to help the compiler find them.

% ls
classes/  lib/      src/
% ls src
farewells/
% ls src/farewells
Base.java      GoodBye.java
% ls lib
Banners.jar
% ls classes
% javac -sourcepath src -classpath classes:lib/Banners.jar \
  src/farewells/GoodBye.java -d classes
% ls classes
farewells/
% ls classes/farewells
Base.class      GoodBye.class
Note that the compiler compiled src/farewells/Base.java, even though we didn't specify it on the command line. To trace automatic compiles, use the -verbose option.

Cross-Compilation Example
Here we use the Java 2 SDK javac to compile code that will run on a 1.1 VM.
% javac -target 1.1 -bootclasspath jdk1.1.7/lib/classes.zip \
             -extdirs "" OldCode.java
The -target 1.1 option ensures that the generated class files will be compatible with 1.1 VMs. In the Java 2 SDK javac compiles for 1.1 by default, so this option is not strictly required. However, it is good form because other compilers may have other defaults.

The Java 2 SDK's javac would also by default compile against its own bootstrap classes, so we need to tell javac to compile against JDK 1.1 bootstrap classes instead. We do this with -bootclasspath and -extdirs. Failing to do this might allow compilation against a Java 2 Platform API that would not be present on a 1.1 VM and fail at runtime.

SEE ALSO
  • java - the Java Application Launcher
  • jdb - Java Application Debugger
  • javah - C Header and Stub File Generator
  • javap - Class File Disassembler
  • javadoc - API Documentation Generator
  • jar - JAR Archive Tool
  • The Java Extensions Framework


javadoc - The Java API Documentation Generator

Generates HTML pages of API documentation from Java source files.

CONTENTS

  • Synopsis
  • Description
    • Related Documentation
    • Javadoc Doclets
    • Terminology
  • Source Files
    • Class Source Code Files
    • Package Comment Files
    • Overview Comment File
    • Miscellaneous Unprocessed Files
  • Generated Files
  • API Signatures
  • Documentation Comments
    • Commenting the Source Code
  • Javadoc Tags
  • Where Tags Can Be Used
  • Command Line Argument File
  • Options
    • Javadoc Options
    • Options Provided by the Standard Doclet
  • Simple Examples
    • Documenting One or More Packages
    • Documenting One or More Classes
    • Documenting Both Packages and Classes
  • Real World Example
    • Command Line Example
    • Makefile Example
  • Environment
    • CLASSPATH
  • Troubleshooting
  • See Also

SYNOPSIS

javadoc [ options ] [ packagenames ] [ sourcefiles ] [ @files ]
Arguments can be in any order.
options
Command-line options, as specified in this document. To see a typical use of javadoc options, see Real-World Example.
packagenames
A series of names of packages, separated by spaces, such as java.lang java.lang.reflect java.awt. You must separately specify each package you want to document. Javadoc uses -sourcepath to look for these package names. Javadoc does not recursively traverse subpackages. Wildcards such as asterisks (*) are not allowed. See Example - Documenting One or More Packages
sourcefiles
A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The path that precedes the source file name determines where javadoc will look for it. (Javadoc does not use -sourcepath to look for these source file names.) For example, passing in Button.java is identical to ./Button.java. An example source file name with a full path is /home/src/java/awt/Graphics*.java. See Example - Documenting One or More Classes. You can also mix packagenames and sourcefiles, as in Example - Documenting Both Packages and Classes
@files
One or more files that contain packagenames and sourcefiles in any order, one name per line.

DESCRIPTION

JavadocTM parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, inner classes, interfaces, constructors, methods, and fields.

You can run Javadoc on entire packages, individual source files, or both. In the first case, you pass in as an argument to javadoc a series of package names. In the second case you pass in a series of source (.java) filenames. Examples are given at the end of this document.

NOTE - When you pass in package names to Javadoc, it currently processes all .java classes in the specified package directories, even if the .java files are code examples or other classes that are not actually members of the specified packages. It does not parse each .java file for a package declaration; we may add this parsing in a future release.
Javadoc produces one complete document each time it is run; it cannot do incremental builds -- that is, it cannot modify or directly incorporate results from previous runs of Javadoc. However, it can link to results from previous runs.

As implemented, Javadoc requires and relies on the java compiler to do its job. Javadoc calls part of javac to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. Javadoc also picks up user-supplied documentation from documentation comments in the source code.

In fact, Javadoc will run on .java source files that are pure stub files with no method bodies. This means you can write documentation comments and run Javadoc in the earliest stages of design while creating the API, before writing the implementation.

Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, Javadoc documents default constructors (section 8.6.7 of Java Language Specification) that are present in the .class files but not in the source code.

When Javadoc builds its internal structure for the documentation, it loads all referenced classes. Because of this, Javadoc must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see How Classes Are Found. Generally speaking, classes you create must either be loaded as an extension or in Javadoc's class path.

Javadoc Doclets

You can customize the content and format of Javadoc's output by using doclets. Javadoc has a default "built-in" doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations:
  • Javadoc Doclets
  • The -doclet command-line option
When a custom doclet is not specified with the -doclet command line option, Javadoc will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section.

Related Documentation

  • Javadoc Enhancements for details about improvements added in Javadoc 1.3.
  • Javadoc FAQ for answers to common questions, information about Javadoc-related tools, and workarounds for bugs.
  • How to Write Doc Comments for Javadoc for more information about how to write documentation comments.
  • Requirements for Writing API Specifications - Standard requirements used when writing the Java 2 Platform Specification. It can be useful whether you are writing API specifications in source file documentation comments or in other formats. It covers requirements for packages, classes, interfaces, fields and methods to satisfy testable assertions.
  • Documentation Comment Specification - The original specification on documentation comments, Chapter 18, Documentation Comments, in the Java Language Specification, First Edition, by James Gosling, Bill Joy, and Guy Steele. (This chapter was removed from the second edition.)

Terminology

A few terms have specific meanings within the context of Javadoc:
generated document
The document generated by the javadoc tool from the doc comments in Java source code. The default generated document is in HTML and is created by the standard doclet.

name
A name in the Java Language, namely the name of a package, class, interface, field, constructor or method. A name can be fully-qualified, such as java.lang.String.equals(java.lang.Object), or partially-qualified, such as equals(Object).

documented classes
The classes and interfaces for which full documentation is generated during a javadoc run. To be documented, the source files must be available, and either their source filenames or package names must be passed into the javadoc command. We also refer to these as the classes included in the javadoc run, or the included classes.

referenced classes
The classes and interfaces that are explicitly referred to in the definition (implementation) of the documented classes and interfaces. Examples of references include return type, parameter type, cast type, extended class, implemented interface, imported classes, classes used in method bodies, and so forth. Classes referred to in doc comments (such as @see tags) do not qualify as referenced classes. When Javadoc is run, it loads into memory all of the referenced classes in javadoc's bootclasspath and classpath. (Javadoc prints a "Class not found" warning for referenced classes not found.) Javadoc can derive enough information from the the .class files to determine their existence and the fully-qualified names of their members.

external referenced classes
The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are external to that javadoc run. Links for names in the documentation to those classes are said to be external references or external links. For example, if you run javadoc on only the java.awt package, then any class in java.lang, such as Object, is an external referenced class. External referenced classes can be linked to using the -link and -linkoffline options. An important property of an external referenced class is that its source comments are not available to the Javadoc run. Therefore, these comments cannot be inherited.

SOURCE FILES

Javadoc will generate output originating from four different types of "source" files: Java language source files for classes (.java), package comment files, overview comment files, and miscellaneous unprocessed files.

Class Source Code Files

Each class or interface and its members can have their own documentation comments, contained in a .java file. For more details about these doc comments, see Documentation Comments.

Package Comment Files

Each package can have its own documentation comment, contained in its own "source" file, that Javadoc will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package.

To create a package comment file, you must name it package.html and place it in the package directory in the source tree along with the .java files. Javadoc will automatically look for this filename in this location. Notice that the filename is identical for all packages. For explicit details, see the example of package.html.

The content of the package comment file is one big documentation comment, written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators /** and */ or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between <body> and the first sentence. You can include package tags; as with any documentation comment, all tags except {@link} must appear after the description. If you add a @see tag in a package comment file, it must have a fully-qualified name.

When Javadoc runs, it will automatically look for this file; if found, Javadoc does the following:

  • Copies all content between <body> and </body> tags for processing.
  • Processes any package tags that are present.
  • Inserts the processed text at the bottom of the package summary page it generates, as shown in Package Summary.
  • Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in Overview Summary. The end-of-sentence is determined by the same rules used for the end of the first sentence of class and member descriptions.

Overview Comment File

Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that Javadoc will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages.

To create an overview comment file, you can name the file anything you want, typically overview.html and place it anywhere, typically at the top level of the source tree. Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, if the source files for the java.applet package are contained in /home/user/src/java/applet directory, you could create an overview comment file at /home/user/src/overview.html.

The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between <body> and the first sentence. You can include overview tags; as with any documentation comment, all tags except in-line tags, such as {@link}, must appear after the description. If you add a @see tag, it must have a fully-qualified name.

When you run Javadoc, you specify the overview comment file name with the -overview option. The file is then processed similar to that of a package comment file.

  • Copies all content between <body> and </body> tags for processing.
  • Processes any overview tags that are present.
  • Inserts the processed text at the bottom of the overview page it generates, as shown in Overview Summary.
  • Copies the first sentence of the overview comment to the top of the overview summary page.

Miscellaneous Unprocessed Files

You can also include in your source any miscellaneous files that you want Javadoc to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file.

To include unprocessed files, put them in a directory called doc-files which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button button.gif in the java.awt.Button class documentation, you place that file in the /home/user/src/java/awt/doc-files/ directory. Notice the doc-files directory should not be located at /home/user/src/java/doc-files because java is not a package -- that is, it does not directly contain any source files.

All links to these unprocessed files must be hard-coded, because Javadoc does not look at the files -- it simply copies the directory and all its contents to the destination. For example, the link in the Button.java doc comment might look like:

    /**
     * This button looks like this:
     * <img src="doc-files/Button.gif">
     */

GENERATED FILES

By default, javadoc uses a standard doclet that generates HTML-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as package-summary.html). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group.

Basic Content Pages

  • One class or interface page (classname.html) for each class or interface it is documenting.
  • One package page (package-summary.html) for each package it is documenting. Javadoc will include any HTML text provided in a file named package.html in the package directory of the source tree.
  • One overview page (overview-summary.html) for the entire set of packages. This is the front page of the generated document. Javadoc will include any HTML text provided in a file specified with the -overview option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)

Cross-Reference Pages

  • One class hierarchy page for the entire set of packages (overview-tree.html). To view this, click on "Overview" in the navigation bar, then click on "Tree".
  • One class hierarchy page for each package (package-tree.html) To view this, go to a particular package, class or interface page; click "Tree" to display the hierarchy for that package.
  • One "use" page for each package (package-use.html) and a separate one for each class and interface (class-use/classname.html). This page describes what packages, classes, methods, constructors and fields use any part of the given class, interface or package. Given a class or interface A, its "use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
  • A deprecated API page (deprecated-list.html) listing all deprecated names. (A deprecated name is not recommended for use, generally due to improvements, and a replacement name is usually given. Deprecated APIs may be removed in future implementations.)
  • A serialized form page (serialized-form.html) for information about serializable and externalizable classes. Each such class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. The standard doclet automatically generates a serialized form page: any class (public or non-public) that implements Serializable is included, along with readObject and writeObject methods, the fields that are serialized, and the doc comments from the @serial, @serialField, and @serialData tags. The standard doclet also produces links to the serialized form page as follows: For each class that belongs to the serialize form, a link "Serialized Form" is added on the class page under the "See Also" heading. This link is at the class (not member) level. Note that serialized classes can be either public or private. To generate the complete serialized form for public and private classes, run javadoc with the -private option (we hope to eliminate this requirement in future a version).
  • An index (index-*.html) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A-Z for English).

Support Files

  • A help page (help-doc.html) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using -helpfile.
  • One index.html file which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content.
  • Several frame files (*-frame.html) containing lists of packages, classes and interfaces, used when HTML frames are being displayed.
  • A package list file (package-list), used by the -link and -linkoffline options. This is a text file, not HTML, and is not reachable through any links.
  • A style sheet file (stylesheet.css) that controls a limited amount of color, font family, font size, font style and positioning on the generated pages.
  • A doc-files directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by Javadoc in any manner -- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree.

HTML Frames

Javadoc will generate either two or three HTML frames, as shown in the figure below. When you pass source files (*.java) or a single package name as arguments into the javadoc command, it will create only one frame (C) in the left-hand column -- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename overview-summary.html. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview-summary.html.

If you are unfamiliar with HTML frames, you should be aware that frames can have focus for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it.

              ------------                  ------------
              |C| Detail |                  |P| Detail |
              | |        |                  | |        |
              | |        |                  |-|        |
              | |        |                  |C|        |
              | |        |                  | |        |
              | |        |                  | |        |
              ------------                  ------------
             javadoc *.java           javadoc java.lang java.awt
Load one of the following two files as the starting page depending on whether you want HTML frames or not:
  • index.html (for frames)
  • overview-summary.html (for no frames)
Generated File Structure

The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage.

For example, the document generated for the class java.applet.Applet class would be located at java/applet/Applet.html. The file structure for the java.applet package follows, given that the destination directory is named apidocs. All files that contain the word "frame" appear in the upper-left or lower-left frames, as noted. All other HTML files appear in the right-hand frame.

NOTE - Directories are shown in bold. The asterisks (*) indicate the files and directories that are omitted when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, package-list is created but is empty. The doc-files directory will not be created in the destination unless it exists in the source tree.

apidocs                             Top directory
   index.html                       Initial page that sets up HTML frames
 * overview-summary.html            Lists all packages with first sentence summaries
   overview-tree.html               Lists class hierarchy for all packages
   deprecated-list.html             Lists deprecated API for all packages
   serialized-form.html             Lists serialized form for all packages
 * overview-frame.html              Lists all packages, used in upper-left frame
   allclasses-frame.html            Lists all classes for all packages, used in lower-left frame
   help-doc.html                    Lists user help for how these pages are organized
   index-all.html                   Default index created without -splitindex option
   index-files                      Directory created with -splitindex option
       index-<number>.html          Index files created with -splitindex option
   package-list                     Lists package names, used only for resolving external refs
   stylesheet.css                   HTML style sheet for defining fonts, colors and positions
   java                             Subpackage directory
       applet                       Subpackage directory
            Applet.html             Page for Applet class
            AppletContext.html      Page for AppletContext interface
            AppletStub.html         Page for AppletStub interface
            AudioClip.html          Page for AudioClip interface
          * package-summary.html    Lists classes with first sentence summaries for this package
          * package-frame.html      Lists classes in this package, used in lower left-hand frame
          * package-tree.html       Lists class hierarchy for this package
            package-use             Lists where this package is used
            doc-files               Directory holding image and example files
            class-use               Directory holding pages API is used
                Applet.html         Page for uses of Applet class
                AppletContext.html  Page for uses of AppletContext interface
                AppletStub.html     Page for uses of AppletStub interface
                AudioClip.html      Page for uses of AudioClip interface

API SIGNATURES

Javadoc generates a signature at the start of each class, interface, field, constructor, and method description. This signature is the declaration for that API item. For example, the signature for the Boolean class is:

public final class Boolean
extends Object
implements Serializable

and the signature for the Boolean.valueOfmethod is:

public static Boolean valueOf(String s)

Javadoc can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. These last two modifiers are considered implementation detail and not part of the API specification.

Rather than relying on the keyword synchronized, APIs should document their concurrency semantics in the comment description, as in "a single Enumeration cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while Hashtable should be thread-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency.

DOCUMENTATION COMMENTS

The original "Documentation Comment Specification" can be found under related documentation.

Commenting the Source Code

You can include documentation comments in the source code, ahead of declarations for any entity (classes, interfaces, methods, constructors, or fields). These are also known as Javadoc comments. A doc comment consists of the characters between the characters /** that begin the comment and the characters */ that end it. The text can continue onto multiple lines.

/**
 * This is the typical format of a simple documentation comment.
 */
To save space you can put a comment on one line:
/** This comment takes up only one line. */
Placement of comments - Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations -- see the class example, method example, and field example. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool.

A common mistake is to put an import statement between the class comment and the class declaration. Avoid this, as Javadoc will ignore the class comment.

   /**
    * This is the class comment for the class Whatever.
    */

    import com.sun;   // MISTAKE - Important not to put import statement here

    public class Whatever {
    }
A comment is a description followed by tags - The description begins after the starting delimiter /** and continues until the tag section. The tag section starts with the first character @ that begins a line (ignoring leading asterisks, white space and comment separator). The description cannot continue after the tag section begins. There can be any number of tags -- some types of tags can be repeated while others cannot. This @see starts the tag section:

/**
 * This is a doc comment.
 * @see java.lang.Object
 */
Standard and in-line tags - A tag is a special keyword within a doc comment that Javadoc can process. Javadoc has standard tags, which appear as @tag, and in-line tags, which appear within braces, as {@tag}. To be interpreted, a standard tag must appear at the beginning of a line, ignoring leading asterisks, white space and comment separator (/**). This means you can use the @ character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the @ character and not have it be interpreted, use the HTML entity &#064;. Each standard tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. An in-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the standard tag @deprecated and in-line tag {@link}.

/**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */

Comments are written in HTML - The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.)

For example, entities for the less-than (<) and greater-than (>) symbols should be written &lt; and &gt;. Likewise, the ampersand (&) should be written &amp;. The bold HTML tag <b> is shown in the following example.

Here is a doc comment:

/**
 * This is a <b>doc</b> comment.
 * @see java.lang.Object
 */

Leading asterisks - When javadoc parses a doc comment, leading asterisk (*) characters on each line are discarded; blanks and tabs preceding the initial asterisk (*) characters are also discarded. If you omit the leading asterisk on a line, all leading white space is removed. Therefore, you should not omit leading asterisks if you want leading white space to kept, such as when indenting sample code with the <pre> tag. Without leading asterisks, the indents are lost in the generated documents, since the leading white space is removed.

First sentence - The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first tag. Javadoc copies this first sentence to the member summary at the top of the HTML page.

Declaration with multiple fields - Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations:

/**
 * The horizontal and vertical distances of point (x,y)
 */
public int x, y;      // Avoid this
Javadoc generates the following documentation from the above code:
public int x
The horizontal and vertical distances of point (x,y)
public int y
The horizontal and vertical distances of point (x,y)
Use header tags carefully - When writing documentation comments for members, it's best not to use HTML heading tags such as <H1> and <H2>, because Javadoc creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure.

Automatic Reuse of Method Comments

Javadoc has the ability to automatically reuse or "inherit" method comments. If a method in a class or interface has no doc comment or tags, Javadoc will instead use the comment and tags from a method it either overrides or implements, if any, according to the algorithm below. The overridden method must be a member of a documented class, and not an external referenced class for the doc comment to actually be available to copy. This occurs in three cases:
  • When a method in a class overrides a method in a superclass
  • When a method in an interface overrides a method in a superinterface
  • When a method in a class implements a method in an interface

In the first two cases, for method overrides, Javadoc generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding.

In the third case, when a method in a given class implements a method in an interface, Javadoc generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing.

Algorithm for Inheriting Method Descriptions - If a method does not have a doc comment, Javadoc searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses:

  1. Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first doc comment found for this method.
  2. If step 1 failed to find a doc comment, recursively apply this entire algorithm to each directly implemented (or extended) interface, in the same order they were examined in step 1.
  3. If step 2 failed to find a doc comment and this is a class other than Object (not an interface):
    1. If the superclass has a doc comment for this method, use it.
    2. If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass.

JAVADOC TAGS

Javadoc parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well-formatted API from your source code. The tags start with an "at" sign (@) and are case-sensitive -- they must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk) or it is treated as normal text. By convention, tags with the same name are grouped together. For example, put all @see tags together.

For information about tags we might introduce in future releases, see Proposed Tags.

The current tags are:

Tag | Introduced in JDK/SDK
@author | 1.0
{@docRoot} | 1.3
@deprecated | 1.0
@exception | 1.0
{@link} | 1.2
@param | 1.0
@return | 1.0
@see | 1.0
@serial | 1.2
@serialData | 1.2
@serialField | 1.2
@since | 1.1
@throws | 1.2
@version | 1.0
@author name-text
Adds an "Author" entry with the specified name-text to the generated docs when the -author option is used. A doc comment may contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, Javadoc inserts a comma (,) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, use multiple names per line if you want a localized name separator other than comma.

{@docRoot}
Represents the relative path to the generated document's (destination) root directory from any generated page. It is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common.

This {@docRoot} tag can be used both on the command line and in a doc comment:

  1. On the command line, where the header/footer/bottom are defined:
       javadoc -bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'
  2. In a doc comment:
       /**
    * See the <a href="{@docRoot}/copyright.html">Copyright</a>.
    */
The reason this tag is needed is because the generated docs are in hierarchical directories, as deep as the number of subpackages. This expression:
  <a href="{@docRoot}/copyright.html">
would resolve to:
  <a href="../../copyright.html">      for java/lang/Object.java
and
  <a href="../../../copyright.html">   for java/lang/ref/Reference.java

@deprecated deprecated-text
Adds a comment indicating that this API should no longer be used (even though it may continue to work). Javadoc moves the deprecated-text ahead of the description, placing it in italics and preceding it with a bold warning: "Deprecated".

The first sentence of deprecated-text should at least tell the user when the API was deprecated and what to use as a replacement. Javadoc copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a {@link} tag (for Javadoc 1.2 or later) that points to the replacement API:

  • For Javadoc 1.2 and later, use a {@link} tag. This creates the link in-line, where you want it. For example:
    /**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */
  • For Javadoc 1.1, the standard format is to create a @see tag (which cannot be in-line) for each @deprecated tag.

For more about deprecation, see The @deprecated tag.

@exception class-name description
The @exception tag is a synonym for @throws.

{@link package.class#member label}
Inserts an in-line link with visible text label that points to the documentation for the specified name in the Java Language that is referenced in a signature of the source files being documented. This tag accepts exactly the same syntax for package.class#member and label as the @see tag, described below, but generates an in-line link rather than placing the link in the "See Also" section. This tag begins and ends with curly braces to separate it from the rest of the in-line text. If you need to use "}" inside the label, use the HTML entity notation &#125;

There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the description part of a documentation comment or in the text portion of any tag (such as @deprecated, @return or @param).

For example, here is a comment that refers to the getComponentAt(int, int) method:

Use the {@link #getComponentAt(int, int) getComponentAt} method.
From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package):
Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.
Which appears on the web page as:
Use the getComponentAt method.
You can extend {@link} to link to classes not being documented by using the -link option. Note that this works only for classes that are referenced in a particular way as described at How a Class Must Be Referenced.

@param parameter-name description
Adds a parameter to the "Parameters" section. The description may be continued on the next line.

@return description
Adds a "Returns" section with the description text. This text should describe the return type and permissible range of values.

@see reference
Adds a "See Also" heading with a link or text entry that points to reference. A doc comment may contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations; the third form below is the most common.

@see "string" Note - This form is broken in version 1.2 (prints none of the quoted text) but fixed in 1.2.2.
Adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. Javadoc distinguishes this from the previous cases by looking for a double-quote (") as the first character. For example:
     @see "The Java Programming Language"
This generates text such as:
See Also:
"The Java Programming Language"
@see <a href="URL#value">label</a>
Adds a link as defined by URL#value. The URL#value is a relative or absolute URL. Javadoc distinguishes this from other cases by looking for a less-than symbol (<) as the first character. For example:
     @see <a href="spec.html#section">Java Spec</a>
This generates a link such as:
See Also:
Java Spec
@see package.class#member label
Adds a link, with visible text label, that points to the documentation for the specified name in the Java Language that is referenced. The label is optional; if omitted, the name appears instead as the visible text, suitably shortened -- see How a name is displayed. Use the label when you want the visible text to be abbreviated or different from the name.

In only version 1.2, just the name but not the label would automatically appear in <code> HTML tags, Starting with 1.2.2, the <code> is always included around the visible text, whether or not a label is used.

  • package.class#member is any valid name in the Java Language that is referenced -- a package, class, interface, constructor, method or field name -- except that you replace the dot ahead of the member name with a hash character (#). If this name is in the documented classes, Javadoc will automatically create a link to it. To create links to external referenced classes, use the -link option. Use either of the other two @see forms for referring to documentation of a name that does not belong to a referenced class. This argument is described at greater length below under Specifying a Name.

  • label is optional text that is visible as the link's label. The label can contain whitespace. If label is omitted, then package.class.member will appear, suitably shortened relative to the current class and package -- see How a name is displayed.

  • A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces may be used between parameters in a method.

Example - In this example, an @see tag (in the Character class) refers to the equals method in the String class. The tag includes both arguments: the name "String#equals(Object)" and the label "equals".

 /**
  * @see String#equals(Object) equals
  */
The standard doclet produces HTML something like this:
<dl>
<dt><b>See Also:</b>
<dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a>
</dl>
Which looks something like this in a browser, where the label is the visible link text:

See Also:
equals

Specifying a name - This package.class#member name can be either fully-qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If less than fully-qualified, Javadoc uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments.

Of course the advantage to providing shorter, "partially-qualified" names is that they are less to type and less clutter in the source code. The following table shows the different forms of the name, where Class can be a class or interface, Type can be a class, interface, array, or primitive, and method can be a method or constructor.

Typical forms for @see package.class#member
Referencing a member of the current class
@see #field
@see #method(Type, Type,...)
@see #method(Type argname, Type argname,...)

Referencing another class in the current or imported packages
@see Class#field
@see Class#method(Type, Type,...)
@see Class#method(Type argname, Type argname,...)
@see Class

Referencing another package (fully qualified)
@see package.Class#field
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type argname, Type argname,...)
@see package.Class
@see package

The following notes apply to the above table:

  • The first set of forms (with no class or package) will cause Javadoc to search only through the current class's hierarchy. It will find a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search steps 1-3). It will not search the rest of the current package or other packages (search steps 4-5).
  • If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, Javadoc will correctly create a link to it, but will print a warning message reminding you to add the parentheses and arguments. If this method is overloaded, Javadoc will link to the first method its search encounters, which is unspecified.
  • Inner classes must be specified as outer.inner, not simply inner, for all forms.
  • As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables Javadoc to resolve ambiguities, since the dot also separates classes, inner classes, packages, and subpackages. However, Javadoc is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning.

Search order for @see - Javadoc will process a @see tag that appears in a source file (.java), package file (package.html) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see. In a source file, you can specify a name that is fully-qualified or partially-qualified.

When Javadoc encounters a @see tag in a .java file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would (except Javadoc will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in Chapter 6, "Names" of the Java Language Specification, modified by the Inner Classes Specification. Javadoc searches for that name through all related and imported classes and packages. In particular, it searches in this order:

  1. the current class or interface
  2. any enclosing classes and interfaces, searching closest first
  3. any superclasses and superinterfaces, searching closest first
  4. the current package
  5. any imported packages, classes and interfaces, searching in the order of the import statement

Javadoc continues to search recursively through steps 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it will search through E's superclasses before E's enclosing classes. In steps 4 and 5, Javadoc does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In step 5, Javadoc will look in java.lang, since that is automatically imported by all programs.

Javadoc won't necessarily look in subclasses, nor will it look in other packages even if their documentation is being generated in the same run. For example, if the @see tag is in java.awt.event.KeyEvent class and refers to a name in the java.awt package, javadoc will not look in that package unless that class imports it.

How a name is displayed - If label is omitted, then package.class.member will appear. In general, it will be suitably shortened relative to the current class and package. By "shortened", we mean Javadoc will display only the minimum name necessary. For example, if the String.toUpperCase() method contains references to a member of the same class and to a member of a different class, the class name will be displayed only in the latter case:

Type of Reference Example Displays As
@see tag refers to member of the same class @see String#toLowerCase()
toLowerCase()
(omits the class name)
@see tag refers to member of a different class @see Character#toLowerCase(char)
Character.toLowerCase(char)
(includes the class name)

Examples of @see
The comment to the right shows how the name would be displayed if the @see tag is in a class in another package, such as java.applet.Applet.

                                           See also:
@see java.lang.String                   //  String
@see java.lang.String The String class  //  The String class
@see String                             //  String
@see String#equals(Object)              //  String.equals(Object)
@see String#equals                      //  String.equals(java.lang.Object)
@see java.lang.Object#wait(long)        //  java.lang.Object.wait(long)
@see Character#MAX_RADIX                //  Character.MAX_RADIX
@see <a href="spec.html">Java Spec</a>  //  Java Spec
@see "The Java Programming Language"    //  "The Java Programming Language"
You can extend @see to link to classes not being documented by using the -link option. Note that this works only for classes that are referenced in a particular way as described at How a Class Must Be Referenced.

@since since-text
Adds a "Since" heading with the specified since-text to the generated documentation. The text has no special internal structure. This tag means that this change or feature has existed since the software release specified by the since-text. For example:
    @since 1.3

@serial field-description
Used in the doc comment for a default serializable field.

An optional field-description should explain the meaning of the field and list the acceptable values. If needed, the description can span multiple lines. The standard doclet adds this information to the serialized form page.

The @since tag should be added to each serializable field that has been added since the initial version of a Serializable class.

For more information about how to use these tags, along with an example, see "Documenting Serializable Fields and Data for a Class," Section 1.6 of the Java Object Serialization Specification. Also see the Serialization FAQ, which covers the questions "Why does the javadoc standard doclet generate many warnings about missing @serial and/or @serialData tags?" and "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the -private switch?".

@serialField field-name field-type field-description
Documents an ObjectStreamField component of a Serializable class' serialPersistentFields member. One @serialField tag should be used for each ObjectStreamField component.

@serialData data-description
The data-description documents the types and order of data in the serialized form. Specifically, this data includes the optional data written by the writeObject method and all data (including base classes) written by the Externalizable.writeExternal method.

The @serialData tag can be used in the doc comment for the writeObject, readObject, writeExternal, and readExternal methods.

@throws class-name description
The @throws and @exception tags are synonyms. Adds a "Throws" subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that may be thrown by the method. If this class is not fully-specified, Javadoc uses the search order to look up this class.

@version version-text
Adds a "Version" subheading with the specified version-text to the generated docs when the -version option is used. The text has no special internal structure. A doc comment may contain at most one @version tag. Version normally refers to the version of the software (such as the Java 2 SDK) that contains this class or member.

WHERE TAGS CAN BE USED

The following sections describe where the tags can be used. Note that these four tags can be used in all doc comments: @see, @link, @since, @deprecated.

Overview Documentation Tags

Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html). Like in any other documentation comments, these tags must appear after the description.

NOTE - The {@link} tag has a bug in overview documents in version 1.2 -- the text appears properly but has no link.

Overview Tags
@see
{@link}
@since

Package Documentation Tags

Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named package.html).

Package Tags
@see
{@link}
@since
@deprecated

Class and Interface Documentation Tags

The following are tags that can appear in the documentation comment for a class or interface.

Class/Interface Tags
@see
{@link}
@since
@deprecated
@author
@version

An example of a class comment:

/**
 * A class representing a window on the screen.
 * For example:
 * <pre>
 *    Window win = new Window(parent);
 *    win.show();
 * </pre>
 *
 * @author  Sami Shaio
 * @version %I%, %G%
 * @see     java.awt.BaseWindow
 * @see     java.awt.Button
 */
class Window extends BaseWindow {
   ...
}

Field Documentation Tags

The following are the tags that can appear in the documentation comment for a field.

Field Tags
@see
{@link}
@since
@deprecated
@serial
@serialField

An example of a field comment:

    /**
     * The X-coordinate of the component.
     *
     * @see #getLocation()
     */
    int x = 1263732;

Constructor and Method Documentation Tags

The following are the tags that can appear in the documentation comment for a constructor or method.

Method/Constructor Tags
@see
{@link}
@since
@deprecated
@param
@return
@throws (@exception)
@serialData

An example of a method doc comment:

    /**
     * Returns the character at the specified index. An index
     * ranges from <code>0</code> to <code>length() - 1</code>.
     *
     * @param     index  the index of the desired character.
     * @return    the desired character.
     * @exception StringIndexOutOfRangeException
     *              if the index is not in the range <code>0</code>
     *              to <code>length()-1</code>.
     * @see       java.lang.Character#charValue()
     */
    public char charAt(int index) {
       ...
    }

COMMAND LINE ARGUMENT FILE

To shorten or simplify the javadoc command, you may specify one or more files that themselves contain one source filename or package name per line. When executing javadoc, pass in the filename with the '@' leading character to specify it as a file list. When javadoc encounters an argument beginning with the character `@', it operates on the names in that file as if they were on the command line.

For example, you can list all of the package names in a file named packages. This file might look like:

     com.mypackage1
     com.mypackage2
     com.mypackage3
You could then run javadoc with:
  % javadoc -d apidocs @packages

OPTIONS
The javadoc tool uses doclets to determine its output. Javadoc uses the default standard doclet unless a custom doclet is specified with the -doclet option. Javadoc provides a set of command-line options that can be used with any doclet -- these options are described below under the sub-heading Javadoc Options. The standard doclet provides an additional set of command-line options that are described below under the sub-heading Options Provided by the Standard Doclet. All option names are case-insensitive, though their arguments can be case-sensitive.

The options are:

-1.1
-author
-bootclasspath
-bottom
-charset
-classpath
-d
-docencoding
-doclet
-docletpath
-doctitle
-encoding
-extdirs
-footer
-group
 -header
-help
-helpfile
-J
-link
-linkoffline
-locale
-nodeprecated
-nodeprecatedlist
-nohelp
-noindex
-nonavbar
-nosince
-notree
-overview
 -package
-private
-protected
-public
-serialwarn
-sourcepath
-splitindex
-stylesheetfile
-title
-use
-verbose
-version
-windowtitle

Javadoc Options

-overview path/filename
Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path/filename and place it on the Overview page (overview-summary.html). The path/filename is relative to the -sourcepath.

While you can use any name you want for filename and place it anywhere you want for path, a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, since -sourcepath will point to this file. For example, if the source tree for the java.lang package is /src/classes/java/lang/, then you could place the overview file at /src/classes/overview.html. See Real World Example.

For information about the file specified by path/filename, see overview comment file.

Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)

The title on the overview page is set by -doctitle.

-public
Shows only public classes and members.

-protected
Shows only protected and public classes and members. This is the default.

-package
Shows only package, protected, and public classes and members.

-private
Shows all classes and members.

-help
Displays the online help, which lists these javadoc and doclet command line options.

-doclet class
Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option.

For example, to call the MIF doclet, use:

    -doclet com.sun.tools.doclets.mif.MIFDoclet

-docletpath classpathlist
Specifies the path to, or jar file containing, the doclet starting class file (specified with the -doclet option) and any jar files it depends on. If classpathlist contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the doclet is already in the search path.

-1.1
Generates the documentation with the appearance and functionality of documentation generated by Javadoc 1.1. That is, the pages have a gray background, use images for headers, have bulleted lists instead of tables, have a flat destination directory structure, do not contain inherited API, do not use HTML frames, and do not support inner classes. This option also automatically splits the index into a separate file for each letter of the alphabet. If you want this appearance, this option has the advantage over javadoc 1.1 of having some bugs fixed.

Not all options work with the -1.1 option. To find out which other options are available, execute:

  % javadoc -1.1 -help
The -footer option shown in this list is functionally the same as the -bottom option described elsewhere on this page. The -title option is functionally the same as -doctitle.

-sourcepath sourcepathlist
Specifies the search paths for finding source files (.java) when passing package names into the javadoc command. The sourcepathlist can contain multiple paths by separating them with a colon (:). Javadoc will search in all subdirectories of the specified paths.

Note that you can use the -sourcepath option only when passing package names into the javadoc command -- it will not locate .java files passed into the javadoc command. (To locate .java files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If -sourcepath is omitted, javadoc uses the class path to find the source files (see -classpath). Therefore, the default -sourcepath is the value of class path. If -classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files.

Set sourcepathlist to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called com.mypackage whose source files are located at:

  /home/user/src/com/mypackage/*.java
In this case you would specify the sourcepath to /home/user/src, the directory that contains com/mypackage, and then supply the package name com.mypackage:
  % javadoc -sourcepath /home/user/src/ com.mypackage
This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: /home/user/src/com/mypackage.

To point to two source paths:

  % javadoc -sourcepath /home/user1/src:/home/user2/src com.mypackage

-classpath classpathlist
Specifies the paths where javadoc will look for referenced classes (.class files) -- these are the documented classes plus any classes referenced by those classes. The classpathlist can contain multiple paths by separating them with a colon (:). Javadoc will search in all subdirectories of the specified paths. Follow the instructions in class path documentation for specifying classpathlist.

If -sourcepath is omitted, Javadoc uses -classpath to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both -sourcepath and -classpath.

For example, if you want to document com.mypackage, whose source files reside in the directory /home/user/src/com/mypackage, and if this package relies on a library in /home/user/lib, you would specify:

  % javadoc -classpath /home/user/lib -sourcepath /home/user/src com.mypackage
As with other tools, if you do not specify -classpath, Javadoc uses the CLASSPATH environment variable, if it is set. If both are not set, Javadoc searches for classes from the current directory.

For an in-depth description of how Javadoc uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see How Classes Are Found.

-bootclasspath classpathlist
Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path Javadoc will use to look up source and class files. See How Classes Are Found. for more details. Separate directories in classpathlist with colons (:).

-extdirs dirlist
Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path Javadoc will use to look up source and class files. See -classpath (above) for more details. Separate directories in dirlist with colons (:).

-verbose
Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file.

-locale language_country_variant
Important - The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command-line option that is order-dependent.
Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes.

-encoding name
Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.

-J flag
Passes flag directly to the runtime system java that runs javadoc. Notice there must be no space between the J and the flag. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the -Xmx option of java as follows (-Xms is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required):
   % javadoc -J-Xmx32m -J-Xms32m com.mypackage
To tell what version of javadoc you are using, call the "-version" option of java:

   % javadoc -J-version
   java version "1.2"
   Classic VM (build JDK-1.2-V, green threads, sunwjit)

Options Provided by the Standard Doclet

-d directory
Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value directory can be absolute or relative to the current working directory. For example, the following generates the documentation for the com.mypackage package and saves the results in the /home/user/doc/ directory:
  % javadoc -d /home/user/doc com.mypackage

-use
Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C.

For example, let's look at what might appear on the "Use" page for String. The getName() method in the java.awt.Font class returns type String. Therefore, getName() uses String, and you will find that method on the "Use" page for String.

Note that this documents only uses of the API, not the implementation. If a method uses String in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of String.

You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar.

-version
Includes the @version text in the generated docs. This text is omitted by default. To tell what version of Javadoc you are using, use the -J-version option.

-author
Includes the @author text in the generated docs.

-splitindex
Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical characters.

-windowtitle title
Specifies the title to be placed in the HTML <title> tag. This appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags, as the browser will not properly interpret them. Any internal quotation marks within title may have to be escaped. If -windowtitle is omitted, Javadoc uses the value of -doctitle for this option.

  % javadoc -windowtitle "Java 2 Platform" com.mypackage
-doctitle title
Specifies the title to be placed near the top of the overview summary file. The title will be placed as a centered, level-one heading directly beneath the upper navigation bar. The title may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within title may have to be escaped.

  % javadoc -doctitle "Java<sup><font size=\"-2\">TM</font></sup>" com.mypackage
-title title
This option no longer exists. It existed only in Beta versions of Javadoc 1.2. It has been renamed to -doctitle. This option is being renamed to make it clear that it defines the document title rather than the window title.

-header header
Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. header may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within header may have to be escaped.

  % javadoc -header "<b>Java 2 Platform </b><br>v1.3" com.mypackage

-footer footer
Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. footer may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within footer may have to be escaped.

-bottom text
Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The text may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within text may have to be escaped.

-link extdocURL
Creates links to already existing javadoc-generated documentation of external referenced classes. The argument extdocURL is the URL for the external documentation you want to link to. You can supply either an absolute URL or a relative URL -- the latter should be relative to the destination directory (specified with -d). For a link to an external referenced class to actually appear, the class must be referenced as described below in How a Class Must Be Referenced.

In other words, this option enables you to link to classes referenced to by your code but not being documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with extdocURL. This allows, for instance, third party documentation to link to java.* documentation on http://java.sun.com. Another use is to for cross-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. A third use is as a "hack" to update docs: Execute javadoc on a full set of packages, then run javadoc again on only the smaller set of changed packages, so that the updated files can be inserted back into the original set. (This is done to save time, but can be tricky -- if you add or remove API from the subset, there will be missing or broken links in the index.)

Use the -link option as follows:

  • Omit the -link option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the -link option, Javadoc does not create links to documentation for external references, because it does not know if (or where) that documentation exists.)

  • Include the -link option for javadoc to also create links to documentation at location extdocURL for external referenced classes.

Note that if the URL is on the World Wide Web, javadoc must have a web connection in order to access the package-list when generating the documentation. If you do not have access, use -linkoffline instead.

How a Class Must be Referenced - For a link to an external referenced class to actually appear, the class must be referenced in a particular way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an import statement or in a declaration. Here are examples of how the class java.lang.SecurityManager can be referenced:

  • In an explicit import statement:
    import java.lang.SecurityManager;
    A wildcard import statement does not work (such as import java.lang.*).

  • In the return type or parameter type of a method:
    void foo(SecurityManager sm) {}

  • In an implements, extends or throws statement:
    public abstract class MyClass extends SecurityManager {}

An important corollary is that when you use the -link option, there will probably be many links that do not appear due to this constraint. (The text would appear without a hypertext link.) The only way to find the missing links would be by visual inspection. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above.

Package List - The -link option requires that a file named package-list, which is generated by Javadoc, exist at the URL you specify with -link. The package-list file is a simple text file that lists the names of packages documented at that location. How Javadoc uses the package list is described below.

For example, the package list for the Java 2 Platform v1.3 API is located at http://java.sun.com/products/jdk/1.3/docs/api/package-list. and starts out as follows:

  java.applet
  java.awt
  java.awt.color
  java.awt.datatransfer
  java.awt.dnd
  java.awt.event
  java.awt.font
  etc.

When javadoc is run without the -link option, as it is generating documentation, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the -link option is used, Javadoc searches the package-list file at the specified extdocURL location for that package name. If it finds the package name, it prefixes the name with that URL.

In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. Javadoc will not check that these pages exist -- only that the package-list exists.

The package-list file is created but is empty if the argument to javadoc is source files rather than packages.

Example - For example, the following command causes Javadoc to look for a package-list file at the given URL, reads in the package names in that file, and then uses the given URL when adding links to API in those external packages:

  % javadoc -link http://java.sun.com/products/jdk/1.3/docs/api com.mypackage
Multiple Links - You can supply multiple -link options to link to any number of external generated documents. Known Bug - Javadoc 1.2 has a known bug which prevents you from supplying more than one -link command. This is fixed in 1.2.2.

Specify a different link option for each external document to link to:

% javadoc -link extdocURL1 -link extdocURL2 ... -link extdocURLn com.mypackage

where extdocURL1, extdocURL2, ... extdocURLn point respectively to the roots of external documents, each of which contains a file named package-list.

Cross-links - Note that "bootstrapping" may be required when cross-linking two or more documents that have not previously been generated. In other words, if package-list does not exist for either document, when you run javadoc on the first document, the package-list will not yet exist for the second document. Therefore, to create the external links, you must re-generate the first document after generating the second document.

In this case, the purpose of first generating a document is to create its package-list (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. Javadoc prints a warning if a needed external package-list file does not exist.

Updating docs - The third use for -link option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to signatures. If you were to add, remove or change any signatures from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, or other places.

First, you create a new destination directory for this new small run and set -link and -d to that same relative path: If the original docs are in a directory named html:

  % javadoc -d update -link . html com.mypackage
When javadoc is done, copy these generated files in update over the original files in html.

Background information: In general, when javadoc runs, it has the potential to generate links for names that appear throughout its generated pages: in signatures, @see tags, {@link} tags, summaries, hierarchies, the overview, and the index. Some of these links will go to pages generated in the current run, while other links will potentially go to pages not generated in the current run.

-linkoffline extdocURL packagelistLoc
This option is a variation of -link; they both create links to documentation for external referenced classes, where the classes must be referenced as described above in How a Class Must Be Referenced.

You must use this option instead of -link if, at the time you run javadoc, the external document's package-list file does not exist at the extdocURL location (is "offline") but exists at a different location packageListLoc (typically local). This can happen when the shell you are running javadoc in does not have web access to the extdocURL. Thus, if extdocURL is accessible only on the World Wide Web, -linkoffline removes the constraint that javadoc have a web connection when generating the documentation. Examples are given below.

You can specify multiple -linkoffline options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.)

The arguments are:

  • extdocURL is the URL for the root location of the external javadoc-generated documentation you want to link to. This location can be an absolute or relative URL -- if relative, make it relative to the destination directory (specified with -d).

  • packagelistLoc is the location to the directory containing the package-list file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the current directory from where javadoc was run. Do not include the package-list filename.

For example, if you want to link to the java.lang package at http://java.sun.com/products/jdk/1.3/docs/api, but your shell does not have web access, then you could access the package-list file using http://java.sun.com/products/jdk/1.3/docs/api/package-list, save it to a local directory, and point to this local copy with packagelistLoc.

If a package-list file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with packagelistLoc. This is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating a package-list file for linking to documentation generated with Javadoc 1.0 or 1.1, earlier versions where package-list files were not generated.

Two companies can share their unpublished package-list files, enabling them to release their cross-linked documentation simultaneously.

As shown below, to use this option, specify extdocURL1, the location of the javadoc-generated documentation for external referenced classes, and packagelistLoc1, the location of its package-list file. Include -linkoffline once for each generated document you want to refer to (each option is shown on a separate line for clarity):

% javadoc -linkoffline extdocURL1 packagelistLoc1 \
          -linkoffline extdocURL2 packagelistLoc2 \
          ...

For example, the following command adds links pointing to a document (whose root is specified by the first argument), for packages listed in the /jdk/package-list file (as specified by the second argument). It generates documentation for the com.mypackage package.

% javadoc -linkoffline http://java.sun.com/products/jdk/1.3/docs/api /jdk com.mypackage

-group groupheading packagepattern:packagepattern:...
Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different -group option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given -group option, the packages matching the list of packagepattern expressions appear in a table with the heading groupheading.

  • groupheading can be any text, and can include white space. This text is placed in the table heading for the group.

  • packagepattern can be any package name, or can be the start of any package name followed by an asterisk (*). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (:).
NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as "java.lang*:java.util"

If you do not supply any -group option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages".

For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" -- including the dot, such as "java.lang.*" would omit the java.lang package.

  % javadoc -group "Core Packages" "java.lang*:java.util"
            -group "Extension Packages" "javax.*"
            java.lang java.lang.reflect java.util javax.servlet java.new
This results in the groupings:
Core Packages
java.lang
java.lang.reflect
java.util
Extension Packages
javax.servlet
Other Packages
java.new

-nodeprecated
Prevents the generation of any deprecated API at all in the documentation. This does what -nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code.

-nodeprecatedlist
Prevents the generation of the file containing the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner.

-nosince
Omits from the generated docs the "Since" sections associated with the @since tags.

-notree
Omits the class/interface hierarchy from the generated docs. The hierarchy is produced by default.

-noindex
Omits the index from the generated docs. The index is produced by default.

-nohelp
Omits the HELP link in the navigation bars at the top and bottom of each page of output.

-nonavbar
Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The -nonavbar option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only.

-helpfile path/filename
Specifies the path of an alternate help file path/filename that the HELP link in the top and bottom navigation bars link to. Without this option, Javadoc automatically creates a help file help-doc.html that is hard-coded in Javadoc. This option enables you to override this default. The filename can be any name and is not restricted to help-doc.html -- Javadoc will adjust the links in the navigation bar accordingly. For example:
  % javadoc -helpfile /home/user/myhelp.html java.awt
-stylesheetfile path/filename
Specifies the path of an alternate HTML stylesheet file. Without this option, Javadoc automatically creates a stylesheet file stylesheet.css that is hard-coded in Javadoc. This option enables you to override this default. The filename can be any name and is not restricted to stylesheet.css. For example:
  % javadoc -stylesheetfile /home/user/mystylesheet.css com.mypackage
-serialwarn
Generates compile-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and writeExternal methods.

-charset name
Specifies the HTML character set for this document. For example:
  % javadoc -charset "iso-8859-1" mypackage
would insert the following line in the head of every generated page:
   <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
This META tag is described in the HTML standard. (4197265 and 4137321)

-docencoding name
Specifies the encoding of the generated HTML files.

SIMPLE EXAMPLES

You can run javadoc on entire packages or individual classes. Each package name has a corresponding directory name. In the following examples, the source files are located at /home/src/java/awt/*java. The destination directory is /home/html.

Documenting One or More Packages

To document a package, the source files (*.java) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots), each identifier represents a different directory. Thus, all java.awt classes must reside in a directory named java/awt/. You can run javadoc either of the following two ways -- by changing directories (with cd) or by using -sourcepath option. You cannot use wildcards to specify groups of packages.

  • Case 1- Changing to the package directory - Change to the parent directory of the fully-qualified package. Then run javadoc, supplying names of one or more packages you want to document:
      % cd /home/src/
  % javadoc -d /home/html java.awt java.awt.event
  • Case 2 - From any directory - In this case, it doesn't matter what the current directory is. Run javadoc supplying -sourcepath with the parent directory of the fully-qualified package, and supply names of one or more packages you want to document:
      % javadoc -d /home/html -sourcepath /home/src java.awt java.awt.event
Both cases generate HTML-formatted documentation for the public and protected classes and interfaces in packages java.awt and java.awt.event and save the HTML files in the specified destination directory (/home/html). Because two or more packages are being generated, the document has three frames -- for the list of packages, the list of classes, and the main page.

Documenting One or More Classes

The second way to run Javadoc is by passing in one or more source files (.java). You can run javadoc either of the following two ways -- by changing directories (with cd) or by fully-specifying the path to the .java files. Relative paths are relative to the current directory. The -sourcepath option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes.

  • Case 1 - Changing to the source directory - Change to the directory holding the .java files. Then run javadoc, supplying names of one or more source files you want to document.
      % cd /home/src/java/awt
  % javadoc -d /home/html Button.java Canvas.java Graphics*.java
    This example generates HTML-formatted documentation for the classes Button, Canvas and classes beginning with Graphics. Because source files rather than package names were passed in as arguments to javadoc, the document has two frames -- for the list of classes and the main page.

  • Case 2 - Changing to the package root directory - This is useful for documenting individual source files from different subpackages off the same root. Change to the package root directory, and supply the source files with paths from the root.
      % cd /home/src/
  % javadoc -d /home/html java/awt/Button.java java/applet/Applet.java
    This example generates HTML-formatted documentation for the classes Button and Applet.

  • Case 3 - From any directory - In this case, it doesn't matter what the current directory is. Run javadoc supplying the absolute path (or path relative to the current directory) to the .java files you want to document.
      % javadoc -d /home/html /home/src/java/awt/Button.java /home/src/java/awt/Graphics*.java
    This example generates HTML-formatted documentation for the class Button and classes beginning with Graphics.

Documenting Both Packages and Classes

You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use -sourcepath for the path to the packages but not for the path to the individual classes.
  % javadoc -d /home/html -sourcepath /home/src java.awt /home/src/java/applet/Applet.java
This example generates HTML-formatted documentation for the package java.awt and class Applet. (Javadoc determines the package name for Applet from the package declaration, if any, in the Applet.java source file.)

REAL WORLD EXAMPLE

Javadoc has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run Javadoc on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java 2 Platform, Standard Edition, v1.2.

The same example is shown twice -- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same Javadoc command to be run from any directory.

Command Line Example

This command line example is over 900 characters, which is too long for some shells, such as DOS. You can write a shell script instead to execute this command.
% javadoc -sourcepath /java/jdk/src/share/classes            \
    -overview /java/jdk/src/share/classes/overview.html      \
    -d /java/jdk/build/api                                   \
    -use                                                     \
    -splitIndex                                              \
    -windowtitle 'Java 2 Platform v1.2 API Specification'    \
    -doctitle 'Java<sup><font size="-2">TM</font></sup> 2 Platform v1.2 API Specification' \
    -header '<b>Java 2 Platform </b><br><font size="-1">v1.2</font>' \
    -bottom '<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit
a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems,
Inc. in the US and other countries.<br>Copyright 1993-1999 Sun Microsystems, Inc.
901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \
    -group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \
    -group "Extension Packages" "javax.*"                    \
    -J-Xmx180m                                               \
    @filelist
where filelist is the name of a file containing the packages to process, such as java.applet java.lang. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the -bottom option.) See the other notes listed below.

Makefile Example

This is an example of a GNU makefile. For an example of a Windows makefile, see creating a makefile for Windows.
javadoc -sourcepath $(SRCDIR)              \   /* Sets path for source files     */
        -overview $(SRCDIR)/overview.html  \   /* Sets file for overview text    */
        -d /java/jdk/build/api             \   /* Sets destination directory     */
        -use                               \   /* Adds "Use" files               */
        -splitIndex                        \   /* Splits index A-Z               */
        -windowtitle $(WINDOWTITLE)        \   /* Adds a window title            */
        -doctitle $(DOCTITLE)              \   /* Adds a doc title               */
        -header $(HEADER)                  \   /* Adds running header text       */
        -bottom $(BOTTOM)                  \   /* Adds text at bottom            */
        -group $(GROUPCORE)                \   /* 1st subhead on overview page   */
        -group $(GROUPEXT)                 \   /* 2nd subhead on overview page   */
        -J-Xmx180m                         \   /* Sets memory to 180MB           */
        java.lang java.lang.reflect        \   /* Sets packages to document      */
        java.util java.io java.net         \
        java.applet

WINDOWTITLE = 'Java 2 Platform v1.2 API Specification'
DOCTITLE = 'Java<sup><font size="-2">TM</font></sup> 2 Platform v1.2 API Specification'
HEADER = '<b>Java 2 Platform </b><br><font size="-1">v1.2</font>'
BOTTOM = '<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit
    a bug or feature</a><br><br>Java is a trademark or registered trademark
    of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-1999
    Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.
    All Rights Reserved.</font>'
GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
GROUPEXT  = '"Extension Packages" "javax.*"'
SRCDIR = '/java/jdk/1.2/src/share/classes'

Single quotes are used to surround makefile arguments.

NOTES

  • If you omit the -windowtitle option, Javadoc copies the doc title to the window title. The -windowtitle text is basically the same as the -doctitle but without HTML tags, to prevent those tags from appearing as raw text in the window title.

  • If you omit the -footer option, as done here, Javadoc copies the header text to the footer.

  • Other important options you might want to use but not needed in this example are -classpath and -link.

ENVIRONMENT

CLASSPATH
Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the -classpath option. Separate directories with a colon, for example:
.:/home/classes:/usr/local/java/classes

TROUBLESHOOTING

There is currently no documentation for Javadoc error messages. Troubleshooting tips can be found on the Javadoc FAQ

SEE ALSO

  • javac
  • java
  • jdb
  • javah
  • javap
  • Javadoc Home Page
  • How to Write Doc Comments for Javadoc
  • Setting the Class Path
Please send comments to: javadoc-tool@sun.com

JavadocTM is a trademark of Sun Microsystems, Inc. (The javadoc command itself does not require the trademark symbol.)


javah - C Header and Stub File Generator

javah produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact.

SYNOPSIS

javah [ options ] fully-qualified-classname. . .
javah_g [ options ] fully-qualified-classname. . .

DESCRIPTION

javah generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class.

The name of the header file and the structure declared within it are derived from the name of the class. If the class passed to javah is inside a package, the package name is prepended to both the header file name and the structure name. Underscores (_) are used as name delimiters.

By default javah creates a header file for each class listed on the command line and puts the files in the current directory. Use the -stubs option to create source files. Use the -o option to concatenate the results for all listed classes into a single file.

The new native method interface, Java Native Interface (JNI), does not require header information or stub files. javah can still be used to generate native method function proptotypes needed for JNI-style native methods. javah produces JNI-style output by default, and places the result in the .h file.

javah_g is a non-optimized version of javah suitable for use with debuggers like jdb.

OPTIONS
-o outputfile
Concatenates the resulting header or source files for all the classes listed on the command line into outputfile. Only one of -o or -d may be used.

-d directory
Sets the directory where javah saves the header files or the stub files. Only one of -d or -o may be used.

-stubs
Causes javah to generate C declarations from the Java object file.

-verbose
Indicates verbose output and causes javah to print a message to stdout concerning the status of the generated files.

-help
Print help message for javah usage.

-version
Print out javah version information.

-jni
Causes javah to create an output file containing JNI-style native method function prototypes. This is the default output, so use of -jni is optional.

-classpath path
Specifies the path javah uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for path is:
   .:<your_path>
For example:
   .:/home/avh/classes:/usr/local/java/classes
-bootclasspath path
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2platform located in jre/lib/rt.jar and jre/lib/i18n.jar.

-old
Specifies that old JDK1.0-style header files should be generated.

-force
Specifies that output files should always be written.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying virtual machine.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by colons, for example,
.:/home/avh/classes:/usr/local/java/classes

SEE ALSO

javac, java, jdb, javap, javadoc


javald - the wrapper creator for Java applications
  • Synopsis
  • Description
  • Examples
  • See Also

SYNOPSIS

javald [ -C path ] [ -H dir ] [ -j option-list ] [ -o outfile ] [ -R path ] classname
Command-line Options
-C path
Adds path to the run-time CLASSPATH. This specifies where java will search for Java classes. See Description for a discussion of the run-time evaluation of these pathnames.

The -C option can be repeated, such as:

    example% javald -C /usr/class -C /optjava...
-H dir
Sets JAVA_HOME to dir.
-j option-list
Allows the set of options to be passed to the invocation of java to be set. If there are multiple options, they should be quoted to ensure that they are passed into the resulting wrapper.
-o outfile
Places the wrapper in outfile.
-R path
Adds path to the run-time LD_LIBRARY_PATH. This specifies where java will search for native methods. See Description for a discussion of the run-time evaluation of these pathnames.
classname
The name of the class which has the main method.

Back To Top

DESCRIPTION

The javald tool creates a convenient wrapper that captures the necessary environment needed to run a Java application specified by classname. If the -o option is provided, the resulting executable wrapper saved to file outfile. If the -o option is not specified, then the default output file name used is the name of the class.

This wrapper sets the necessary environment variables needed by the java tool before it executes the class specified by classname.

If the -H flag is specified, the wrapper sets JAVA_HOME to the path specified by the option. If -H option is not specified, the wrapper attempts to use the user's environment JAVA_HOME if set; otherwise it assumes a default JAVA_HOME of /usr/java.

Paths specified as arguments to the -C and -R flags of the javald command are treated differently.

The path arguments, which may include shell variables, are subject to deferred evaluation --that is, they are evaluated when the wrapper is executed.

Relative pathnames are treated as pathnames relative to the directory where the wrapper is installed, not the current working directory.

This behavior is designed to support applications that consist of several classes in a directory hierarchy rather than a single executable. Using relative pathnames allows this directory hierarchy (thus the application) to be more easily moved to different filesystems.

The default CLASSPATH created by the wrapper if no -C options are used is equivalent to specifying -C.

The default interpreter executed by the wrapper is $JAVA_HOME/bin/java.

Back To Top

Examples

Example 1:

A wrapper called appl is created in directory /opt/acme/bin as follows:

example% javald -o /opt/acme/bin/appl -C /opt/acme/classes AcmeApp

Suppose the wrapper contains the following environment variables:

JAVA_HOME=${JAVA_HOME:-/usr/java}
CLASSPATH=/opt/acme/classes

When appl is run, java will attempt to invoke the main() method of the AcmeApp class. The java interpreter will search for AcmeApp in /opt/acme/classes, then in the default system class directory, ${JAVA_HOME}/lib/classes.zip.

Example 2:

The following command creates a script called MyApp:

example% javald -o myapp -j '-noverify -ms8m' MyApp

Suppose it contains an invocation of the java interpreter that looks like:

example% exec {JAVA_HOME}/bin/java -noverify -ms8m MyApp

Back To Top

SEE ALSO

  • The Java Tutorial for basic Java programming

Back To Top


javap - The Java Class File Disassembler

Disassembles class files.

SYNOPSIS

javap [ options ] class. . .

DESCRIPTION

The javap command disassembles a class file. Its output depends on the options used. If no options are used, javap prints out the package, protected, and public fields and methods of the classes passed to it. javap prints its output to stdout. For example, compile the following class declaration:
import java.awt.*;
import java.applet.*;

public class DocFooter extends Applet {
        String date;
        String email;

        public void init() {
                resize(500,100);
                date = getParameter("LAST_UPDATED");
                email = getParameter("EMAIL");
        }

        public void paint(Graphics g) {
                g.drawString(date + " by ",100, 15);
                g.drawString(email,290,15);
        }
}
The output from javap DocFooter yields:
Compiled from DocFooter.java
public class DocFooter extends java.applet.Applet {
    java.lang.String date;
    java.lang.String email;
    public DocFooter();
    public void init();
    public void paint(java.awt.Graphics);
}
The output from javap -c DocFooter yields:
Compiled from DocFooter.java
public class DocFooter extends java.applet.Applet {
    java.lang.String date;
    java.lang.String email;
    public DocFooter();
    public void init();
    public void paint(java.awt.Graphics);
}

Method DocFooter()
   0 aload_0
   1 invokespecial #1
   4 return

Method void init()
   0 aload_0
   1 sipush 500
   4 bipush 100
   6 invokevirtual #2
   9 aload_0
  10 aload_0
  11 ldc #3
  13 invokevirtual #4
  16 putfield #5
  19 aload_0
  20 aload_0
  21 ldc #6
  23 invokevirtual #4
  26 putfield #7
  29 return

Method void paint(java.awt.Graphics)
   0 aload_1
   1 new #8
   4 dup
   5 invokespecial #9
   8 aload_0
   9 getfield #5
  12 invokevirtual #10
  15 ldc #11
  17 invokevirtual #10
  20 invokevirtual #12
  23 bipush 100
  25 bipush 15
  27 invokevirtual #13
  30 aload_1
  31 aload_0
  32 getfield #7
  35 sipush 290
  38 bipush 15
  40 invokevirtual #13
  43 return

OPTIONS
-help
Prints out help message for javap.

-l
Prints out line and local variable tables.

-b
Ensures backward compatibility with javap in JDK 1.1.

-public
Shows only public classes and members.

-protected
Shows only protected and public classes and members.

-package
Shows only package, protected, and public classes and members. This is the default.

-private
Shows all classes and members.

-Jflag
Pass flag directly to the runtime system. Some examples:
javap -J-version
javap -J-Djava.security.manager -J-Djava.security.policy=MyPolicy MyClassName

-s
Prints internal type signatures.

-c
Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the Java Virtual Machine Specification.

-verbose
Prints stack size, number of locals and args for methods.

-classpath path
Specifies the path javap uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for path is:

   .:<your_path>
For example:
.:/home/avh/classes:/usr/local/java/classes
-bootclasspath path
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2platform located in jre/lib/rt.jar and jre/lib/i18n.jar.

-extdirs dirs
Overrides location at which installed extensions are searched for. The default location for extensions is jre/lib/ext.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by colons, for example, For example:
.:/home/avh/classes:/usr/local/java/classes

SEE ALSO

javac, java, jdb, javah, javadoc


jdb - The Java Debugger

jdb helps you find and fix bugs in Java language programs.

SYNOPSIS

jdb [ options ] [ class ] [ arguments ]
options
Command-line options, as specified below.
class
Name of the class to begin debugging.
arguments
Arguments passed to the main() method of class.

DESCRIPTION

The Java Debugger, jdb, is a simple command-line debugger for Java classes. It is a demonstration of the Java Platform Debugger Architecture that provides inspection and debugging of a local or remote Java Virtual Machine.

Starting a jdb Session

There are many ways to start a jdb session. The most frequently used way is to have jdb launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command jdb for java in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB:
 % jdb MyClass
When started this way, jdb invokes a second Java VM with any specified parameters, loads the specified class, and stops the VM before executing that class's first instruction.

Another way to use jdb is by attaching it to a Java VM that is already running. A VM that is to be debugged with jdb must be started with the following options:

option | purpose
-Xdebug | Enables debugging support in the VM
-Xrunjdwp:transport=dt_socket,server=y,suspend=n | Loads in-process debugging libraries and specifies the kind of connection to be made.

For example, the following command will run the MyClass application, and allow jdb to connect to it at a later time.

 % java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
You can then attach jdb to the VM with the following commmand:
 % jdb -attach 8000
Note that "MyClass" is not specified in the jdb command line in this case because jdb is connecting to an existing VM instead of launching a new one.

There are many other ways to connect the debugger to a VM, and all of them are supported by jdb. The Java Platform Debugger Architecture has additional documentation on these connection options.

Basic jdb Commands

The following is a list of the basic jdb commands. The Java debugger supports other commands which you can list using jdb's help command.

help, or ?
The most important jdb command, help displays the list of recognized commands with a brief description.
run
After starting jdb, and setting any necessary breakpoints, you can use this command to start the execution the debugged application. This command is available only when jdb launches the debugged application (as opposed to attaching to an existing VM).
cont
Continues execution of the debugged application after a breakpoint, exception, or step.
print
Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the dump command below for getting more information about an object.

NOTE: To display local variables, the containing class must have been compiled with the javac -g option.

print supports many simple Java expressions including those with method invocations, for example:

  • print MyClass.myStaticField
  • print myObj.myInstanceField
  • print i + j + k (i, j, k are primities and either fields or local variables)
  • print myObj.myMethod() (if myMethod returns a non-null)
  • print new java.lang.String("Hello").length()
dump
For primitive values, this command is identical to print. For objects, it prints the current value of each field defined in the object. Static and instance fields are included.

The dump command supports the same set of expressions as the print command.

threads
List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example:
4. (java.lang.Thread)0x1 main      running
In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running,
thread
Select a thread to be the current thread. Many jdb commands are based on the setting of the current thread. The thread is specified with the thread index described in the threads command above.
where
where with no arguments dumps the stack of the current thread. where all dumps the stack of all threads in the current thread group. where threadindex dumps the stack of the specified thread.

If the current thread is suspended (either through an event such as a breakpoint or through the suspend command), local variables and fields can be displayed with the print and dump commands. The up and down commands select which stack frame is current.

Breakpoints

Breakpoints can be set in jdb at line numbers or at the first instruction of a method, for example:
  • stop at MyClass:22 (sets a breakpoint at the first instruction for line 22 of the source file containing MyClass)
  • stop in java.lang.String.length (sets a breakpoint at the beginnig of the method java.lang.String.length)
  • stop in MyClass.<init> (<init> identifies the MyClass constructor)
  • stop in MyClass.<clinit> (<clinit> identifies the static initialization code for MyClass)

If a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, "MyClass.myMethod(int,java.lang.String)", or "MyClass.myMethod()".

The clear command removes breakpoints using a syntax as in "clear MyClass:45". Using the clear or command with no argument displays a list of all breakpoints currently set. The cont command continues execution.

Stepping

The step commands advances execution to the next line whether it is in the current stack frame or a called method. The next command advances execution to the next line in the current stack frame.

Exceptions

When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under jdb, however, control returns to jdb at the offending throw. You can then use jdb to diagnose the cause of the exception.

Use the catch command to cause the debugged application to stop at other thrown exceptions, for example: "catch java.io.FileNotFoundException" or "catch mypackage.BigTroubleException. Any exception which is an instance of the specifield class (or of a subclass) will stop the application at the point where it is thrown.

The ignore command negates the effect of a previous catch command.

NOTE: The ignore command does not cause the debugged VM to ignore specific exceptions, only the debugger.

Command Line Options
When you use jdb in place of the Java application launcher on the command line, jdb accepts many of the same options as the java command, including -D, -classpath, and -X<option>.

The following additional options are accepted by jdb:

-sourcepath <dir1:dir2:...>
Uses the given path in searching for source files in the specified path. If this option is not specified, the default path of "." is used.
-attach <address>
Attaches the debugger to previously running VM using the default connection mechanism.
-launch
Launches the debugged application immediately upon startup of jdb. This option removes the need for using the run command. The debuged application is launched and then stopped just before the initial application class is loaded. At that point you can set any necessary breakpoints and use the cont to continue execution.
-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.
Other options are supported for alternate mechanisms for connecting the debugger and the VM it is to debug. The Java Platform Debugger Architecture has additional documentation on these connection alternatives.

SEE ALSO

javac, java, javah, javap, javadoc.


keytool - Key and Certificate Management Tool

Manages a keystore (database) of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. Also manages certificates from trusted entities.

SYNOPSIS

keytool [ commands ]

DESCRIPTION

keytool is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers.

A certificate is a digitally signed statement from one entity (person, company, etc.), saying that the public key (and some other information) of some other entity has a particular value. (See Certificates.) When data is digitally signed, the signature can be verified to check the data integrity and authenticity. Integrity means that the data has not been modified or tampered with, and authenticity means the data indeed comes from whoever claims to have created and signed it.

keytool stores the keys and certificates in a so-called keystore. The default keystore implementation implements the keystore as a file. It protects private keys with a password.

The jarsigner tool uses information from a keystore to generate or verify digital signatures for Java ARchive (JAR) files. (A JAR file packages class files, images, sounds, and/or other digital data in a single file). jarsigner verifies the digital signature of a JAR file, using the certificate that comes with it (it is included in the signature block file of the JAR file), and then checks whether or not the public key of that certificate is "trusted", i.e., is contained in the specified keystore.

Please note: the keytool and jarsigner tools completely replace the javakey tool provided in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them. The new keystore architecture replaces the identity database that javakey created and managed. It is possible to import the information from an identity database into a keystore, via the -identitydb keytool command.

Keystore Entries

There are two different types of entries in a keystore:
  1. key entries - each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate "chain" for the corresponding public key. The keytool and jarsigner tools only handle the latter type of entry, that is private keys and their associated certificate chains.

  2. trusted certificate entries - each contains a single public key certificate belonging to another party. It is called a "trusted certificate" because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the "subject" (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate.

Keystore Aliases

All keystore entries (key and trusted certificate entries) are accessed via unique aliases. Aliases are case-insensitive; the aliases Hugo and hugo would refer to the same keystore entry.

An alias is specified when you add an entity to the keystore using the -genkey command to generate a key pair (public and private key) or the -import command to add a certificate or certificate chain to the list of trusted certificates. Subsequent keytool commands must use this same alias to refer to the entity.

For example, suppose you use the alias duke to generate a new public/private key pair and wrap the public key into a self-signed certificate (see Certificate Chains) via the following command:

    keytool -genkey -alias duke -keypass dukekeypasswd
This specifies an inital password of "dukekeypasswd" required by subsequent commands to access the private key assocated with the alias duke. If you later want to change duke's private key password, you use a command like the following:
    keytool -keypasswd -alias duke -keypass dukekeypasswd -new newpass
This changes the password from "dukekeypasswd" to "newpass".

Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

Keystore Location

Each keytool command has a -keystore option for specifying the name and location of the persistent keystore file for the keystore managed by keytool. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory.

Keystore Creation

A keystore is created whenever you use a -genkey, -import, or -identitydb command to add data to a keystore that doesn't yet exist.

More specifically, if you specify, in the -keystore option, a keystore that doesn't yet exist, that keystore will be created.

If you don't specify a -keystore option, the default keystore is a file named .keystore in your home directory. If that file does not yet exist, it will be created.

Keystore Implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, two command-line tools (keytool and jarsigner) and a GUI-based tool named Policy Tool make use of keystore implementations. Since KeyStore is publicly available, users can write additional security applications that use it.

There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture.

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

keytool works on any file-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The jarsigner and policytool tools, on the other hand, can read a keystore from any location that can be specified using a URL.

For keytool and jarsigner, you can specify a keystore type at the command line, via the -storetype option. For Policy Tool, you can specify a keystore type via the "Change Keystore" command in the Edit menu.

If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the security properties directory, java.home/lib/security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Each tool gets the keystore.type value and then examines all the currently-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type (as specified in the keystore.type property):

    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file:

    keystore.type=jks

To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type.

For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to

    keystore.type=pkcs12
Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".

Supported Algorithms and Key Sizes

keytool allows users to specify any key pair generation and signature algorithm supplied by any of the registered cryptographic service providers. That is, the keyalg and sigalg options for various commands must be supported by a provider implementation. The default key pair generation algorithm is "DSA". The signature algorithm is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the default signature algorithm is "SHA1withDSA", and if the underlying private key is of type "RSA", the default signature algorithm is "MD5withRSA".

When generating a DSA key pair, the key size must be in the range from 512 to 1024 bits, and must be a multiple of 64. The default key size for any algorithm is 1024 bits.

Certificates

A certificate (also known as a public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key (and some other information) of another entity (the subject) has some specific value.

Let us expand on some of the key terms used in this sentence:

Public Keys
These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.
Digitally Signed
If some data is digitally signed it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key.
Identity
A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name.
Signature
A signature is computed over some data using the private key of an entity (the signer, which in the case of a certificate is also known as the issuer).
Private Keys
These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.
Entity
An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Basically, public key cryptography requires access to users' public keys. In a large-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a trusted third party. CAs are entities (for example, businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates, as they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization.

Using keytool, it is possible to display, import, and export certificates. It is also possible to generate self-signed certificates.

keytool currently handles X.509 certificates.

X.509 Certificates

The X.509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X.509 certificates have the following data, in addition to the signature:
Version
This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. keytool can import and export v1, v2, and v3 certificates. It generates v1 certificates.
Serial Number
The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).
Signature Algorithm Identifier
This identifies the algorithm used by the CA to sign the certificate.
Issuer Name
The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate.)
Validity Period
Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised.
Subject Name
The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity, for example,
    CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US
(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.)
Subject Public Key Information
This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters.

X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject and/or issuer names over time. Most certificate profile documents strongly recommend that names not be reused, and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

X.509 Version 3 is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: KeyUsage (limits the use of the keys to particular purposes such as "signing-only") and AlternativeNames (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

All the data in a certificate is encoded using two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data.

X.500 Distinguished Names

X.500 Distinguished Names are used to identify entities, such as those which are named by the subject and issuer (signer) fields of X.509 certificates. keytool supports the following subparts:
  • commonName - common name of a person, e.g., "Susan Jones"

  • organizationUnit - small organization (e.g, department or division) name, e.g., "Purchasing"

  • organizationName - large organization name, e.g., "ABCSystems, Inc."

  • localityName - locality (city) name, e.g., "Palo Alto"

  • stateName - state or province name, e.g., "California"

  • country - two-letter country code, e.g., "CH"

When supplying a distinguished name string as the value of a -dname option, as for the -genkey or -selfcert commands, the string must be in the following format:

CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode

where all the italicized items represent actual values and the above keywords are abbreviations for the following:

    CN=commonName
    OU=organizationUnit
    O=organizationName
    L=localityName
    S=stateName
    C=country

A sample distinguished name string is

CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US
and a sample command using such a string is
keytool -genkey -dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino,
S=California, C=US" -alias mark

Case does not matter for the keyword abbreviations. For example, "CN", "cn", and "Cn" are all treated the same.

Order matters; each subcomponent must appear in the designated order. However, it is not necessary to have all the subcomponents. You may use a subset, for example:

CN=Steve Meier, OU=SunSoft, O=Sun, C=US

If a distinguished name string value contains a comma, the comma must be escaped by a "\" character when you specify the string on a command line, as in

   cn=peter schuster, o=Sun Microsystems\, Inc., o=sun, c=us

It is never necessary to specify a distinguished name string on a command line. If it is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma does not need to be escaped by a "\".

The Internet RFC 1421 Certificate Encoding Standard

Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism.

Certificates read by the -import and -printcert commands can be in either this format or binary encoded.

The -export command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the -rfc option is specified.

The -list command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, while if the -rfc option is specified, the certificate is output in the printable encoding format.

In its printable encoding format, the encoded certificate is bounded at the beginning by

-----BEGIN CERTIFICATE-----

and at the end by

-----END CERTIFICATE-----

Certificate Chains

keytool can create and manage keystore "key" entries that each contain a private key and an associated certificate "chain". The first certificate in the chain contains the public key corresponding to the private key.

When keys are first generated (see the -genkey command), the chain starts off containing a single element, a self-signed certificate. A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

Later, after a Certificate Signing Request (CSR) has been generated (see the -certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see -import), and the self-signed certificate is replaced by a chain of certificates. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject's public key. The next certificate in the chain is one that authenticates the CA's public key.

In many cases, this is a self-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key entry), but the second certificate in the chain is a certificate signed by a different CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain.

Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore.

A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by keytool.

The top-level (root) CA certificate is self-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a "vehicle" to transport the root CA's public key. Before you add the root CA certificate to your keystore, you should view it (using the -printcert option) and compare the displayed fingerprint with the well-known fingerprint (obtained from a newspaper, the root CA's webpage, etc.).

Importing Certificates

To import a certificate from a file, use the -import command, as in

    keytool -import -alias joe -file jcertfile.cer

This sample command imports the certificate(s) in the file jcertfile.cer and stores it in the keystore entry identified by the alias joe.

You import a certificate for two reasons:

  1. to add it to the list of trusted certificates, or

  2. to import a certificate reply received from a CA as the result of submitting a Certificate Signing Request (see the -certreq command) to that CA.

Which type of import is intended is indicated by the value of the -alias option. If the alias exists in the database, and identifies an entry with a private key, then it is assumed you want to import a certificate reply. keytool checks whether the public key in the certificate reply matches the public key stored with the alias, and exits if they are different. If the alias identifies the other type of keystore entry, the certificate will not be imported. If the alias does not exist, then it will be created and associated with the imported certificate.

WARNING Regarding Importing Trusted Certificates

IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate!

View it first (using the -printcert command, or the -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. For example, suppose someone sends or emails you a certificate, and you put it in a file named /tmp/cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as in

  keytool -printcert -file /tmp/cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside).

Note: it is not required that you execute a -printcert command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the -import command prints out the certificate information and prompts you to verify it. You then have the option of aborting the import operation. Note, however, this is only the case if you invoke the -import command without the -noprompt option. If the -noprompt option is given, there is no interaction with the user.

Exporting Certificates

To export a certificate to a file, use the -export command, as in

    keytool -export -alias jane -file janecertfile.cer
This sample command exports jane's certificate to the file janecertfile.cer. That is, if jane is the alias for a key entry, the command exports the certificate at the bottom of the certificate chain in that keystore entry. This is the certificate that authenticates jane's public key.

If, instead, jane is the alias for a trusted certificate entry, then that trusted certificate is exported.

Displaying Certificates

To print out the contents of a keystore entry, use the -list command, as in

    keytool -list -alias joe
If you don't specify an alias, as in
    keytool -list
the contents of the entire keystore are printed.

To display the contents of a certificate stored in a file, use the -printcert command, as in

    keytool -printcert -file certfile.cer

This displays information about the certificate stored in the file certfile.cer.

Note: This works independently of a keystore, i.e., you do not need a keystore in order to display a certificate that's stored in a file.

Generating a self-signed certificate

A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

You may occasionally wish to generate a new self-signed certificate. For example, you may want to use the same key pair under a different identity (distinguished name). For example, suppose you change departments. You can then:

  1. copy (clone) the original key entry. See -keyclone.

  2. generate a new self-signed certificate for the cloned entry, using your new distinguished name. See below.

  3. generate a Certificate Signing Requests for the cloned entry, and import the reply certificate or certificate chain. See the -certreq and -import commands.

  4. delete the original (now obsolete) entry. See -delete.

To generate a self-signed certificate, use the -selfcert command, as in
    keytool -selfcert -alias dukeNew -keypass b92kqmp
      -dname "cn=Duke Smith, ou=Purchasing, o=BlueSoft, c=US"
The generated certificate is stored as a single-element certificate chain in the keystore entry identified by the specified alias (in this case "dukeNew"), where it replaces the existing certificate chain.

COMMAND AND OPTION NOTES

The various commands and their options are listed and described below . Note:

  • All command and option names are preceded by a minus sign (-).

  • The options for each command may be provided in any order.

  • All items not italicized or in braces or square brackets are required to appear as is.

  • Braces surrounding an option generally signify that a default value will be used if the option is not specified on the command line. Braces are also used around the -v, -rfc, and -J options, which only have meaning if they appear on the command line (that is, they don't have any "default" values other than not existing).

  • Brackets surrounding an option signify that the user is prompted for the value(s) if the option is not specified on the command line. (For a -keypass option, if you do not specify the option on the command line, keytool will first attempt to use the keystore password to recover the private key, and if this fails, will then prompt you for the private key password.)

  • Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command:
      keytool -printcert {-file cert_file} {-v}

    When specifying a -printcert command, replace cert_file with the actual file name, as in:

      keytool -printcert -file VScert.cer

  • Option values must be quoted if they contain a blank (space).

  • The -help command is the default. Thus, the command line
      keytool
    is equivalent to
      keytool -help

Option Defaults

Below are the defaults for various option values.
-alias "mykey"

-keyalg "DSA"

-keysize 1024

-validity 90

-keystore the file named .keystore in the user's home directory

-file stdin if reading, stdout if writing
The signature algorithm (-sigalg option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the -sigalg option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", -sigalg defaults to "MD5withRSA".

Options that Appear for Most Commands

The -v option can appear for all commands except -help. If it appears, it signifies "verbose" mode; detailed certificate information will be output.

There is also a -Jjavaoption option that may appear for any command. If it appears, the specified javaoption string is passed through directly to the Java interpreter. (keytool is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

These options may appear for all commands operating on a keystore:

-storetype storetype
This qualifier specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

-keystore keystore
The keystore (database file) location. Defaults to the file .keystore in the user's home directory, as determined by the "user.home" system property. On Solaris systems "user.home" defaults to the user's home directory.

-storepass storepass
The password which is used to protect the integrity of the keystore.

storepass must be at least 6 characters long. It must be provided to all commands that access the keystore contents. For such commands, if a -storepass option is not provided at the command line, the user is prompted for it.

When retrieving information from the keystore, the password is optional; if no password is given, the integrity of the retrieved information cannot be checked and a warning is displayed.

Be careful with passwords - see Warning Regarding Passwords.

-provider provider-class-name
Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.

Warning Regarding Passwords

Most commands operating on a keystore require the store password. Some commands require a private key password.

Passwords can be specified on the command line (in the -storepass and -keypass options, respectively). However, a password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system.

If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

COMMANDS

See also the Command and Option Notes.

Adding Data to the Keystore

-genkey {-alias alias} {-keyalg keyalg} {-keysize keysize} {-sigalg sigalg} [-dname dname] [-keypass keypass] {-validity valDays} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v1 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by alias.

keyalg specifies the algorithm to be used to generate the key pair, and keysize specifies the size of each key to be generated. sigalg specifies the algorithm that should be used to sign the self-signed certificate; this algorithm must be compatible with keyalg. See Supported Algorithms and Key Sizes.

dname specifies the X.500 Distinguished Name to be associated with alias, and is used as the issuer and subject fields in the self-signed certificate. If no distinguished name is provided at the command line, the user will be prompted for one.

keypass is a password used to protect the private key of the generated key pair. If no password is provided, the user is prompted for it. If you press RETURN at the prompt, the key password is set to the same password as that used for the keystore. keypass must be at least 6 characters long. Be careful with passwords - see Warning Regarding Passwords.

valDays tells the number of days for which the certificate should be considered valid.

-import {-alias alias} {-file cert_file} [-keypass keypass] {-noprompt} {-trustcacerts} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Reads the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted reply) from the file cert_file, and stores it in the keystore entry identified by alias. If no file is given, the certificate or PKCS#7 reply is read from stdin. keytool can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format, or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a string that starts with "-----BEGIN", and bounded at the end by a string that starts with "-----END".

When importing a new trusted certificate, alias must not yet exist in the keystore. Before adding the certificate to the keystore, keytool tries to verify it by attempting to construct a chain of trust from that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore.

If the -trustcacerts option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts", which resides in the security properties directory, java.home/lib/security, where java.home is the runtime environment's directory (either the jre directory in the top-level directory of the Java 2 Runtime Environment). The "cacerts" file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file using keytool, specifying "jks" as the keystore type. The "cacerts" keystore file ships with five VeriSign root CA certificates with the following X.500 distinguished names:

1. OU=Class 1 Public Primary Certification Authority, O="VeriSign, Inc.",
C=US

2. OU=Class 2 Public Primary Certification Authority, O="VeriSign,
Inc.", C=US

3. OU=Class 3 Public Primary Certification Authority,
O="VeriSign, Inc.", C=US

4. OU=Class 4 Public Primary Certification
Authority, O="VeriSign, Inc.", C=US

5. OU=Secure Server Certification
Authority, O="RSA Data Security, Inc.", C=US

The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK.

If keytool fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! -- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user.

When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the -trustcacerts option was specified).

If the reply is a single X.509 certificate, keytool attempts to establish a trust chain, starting at the certificate reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates used to authenticate the certificate reply form the new certificate chain of alias.

If the reply is a PKCS#7 formatted certificate chain, the chain is first ordered (with the user certificate first and the self-signed root CA certificate last), before keytool attempts to match the root CA certificate provided in the reply with any of the trusted certificates in the keystore or the "cacerts" keystore file (if the -trustcacerts option was specified). If no match can be found, the information of the root CA certificate is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the root CA itself. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user.

The new certificate chain of alias replaces the old certificate chain associated with this entry. The old chain can only be replaced if a valid keypass, the password used to protect the private key of the entry, is supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords.

-selfcert {-alias alias} {-sigalg sigalg} {-dname dname} {-validity valDays} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Generates an X.509 v1 self-signed certificate, using keystore information including the private key and public key associated with alias. If dname is supplied at the command line, it is used as the X.500 Distinguished Name for both the issuer and subject of the certificate. Otherwise, the X.500 Distinguished Name associated with alias (at the bottom of its existing certificate chain) is used.

The generated certificate is stored as a single-element certificate chain in the keystore entry identified by alias, where it replaces the existing certificate chain.

sigalg specifies the algorithm that should be used to sign the certificate. See Supported Algorithms and Key Sizes.

In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords.

valDays tells the number of days for which the certificate should be considered valid.

-identitydb {-file idb_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Reads the JDK 1.1.x-style identity database from the file idb_file, and adds its entries to the keystore. If no file is given, the identity database is read from stdin. If a keystore does not exist, it is created.

Only identity database entries ("identities") that were marked as trusted will be imported in the keystore. All other identities will be ignored. For each trusted identity, a keystore entry will be created. The identity's name is used as the "alias" for the keystore entry.

The private keys from trusted identities will all be encrypted under the same password, storepass. This is the same password that is used to protect the keystore's integrity. Users can later assign individual passwords to those private keys by using the "-keypasswd" keytool command option.

An identity in an identity database may hold more than one certificate, each certifying the same public key. But a keystore key entry for a private key has that private key and a single "certificate chain" (initially just a single certificate), where the first certificate in the chain contains the public key corresponding to the private key. When importing the information from an identity, only the first certificate of the identity is stored in the keystore. This is because an identity's name in an identity database is used as the alias for its corresponding keystore entry, and alias names are unique within a keystore,

Exporting Data

-certreq {-alias alias}
  {-sigalg sigalg} {-file certreq_file}
  [-keypass keypass]
  {-storetype storetype}
  {-keystore keystore} [-storepass storepass]
  [-provider provider_class_name]
  {-v} {-Jjavaoption}

Generates a Certificate Signing Request (CSR), using the PKCS#10 format.

A CSR is intended to be sent to a certificate authority (CA). The CA will authenticate the certificate requestor (usually off-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self-signed certificate) in the keystore.

The private key and X.500 Distinguished Name associated with alias are used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it.

Be careful with passwords - see Warning Regarding Passwords.

sigalg specifies the algorithm that should be used to sign the CSR. See Supported Algorithms and Key Sizes.

The CSR is stored in the file certreq_file. If no file is given, the CSR is output to stdout.

Use the import command to import the response from the CA.

-export
  {-alias alias}
  {-file cert_file}
  {-storetype storetype}
  {-keystore keystore} [-storepass storepass]
  [-provider provider_class_name]
  {-rfc} {-v} {-Jjavaoption}

Reads (from the keystore) the certificate associated with alias, and stores it in the file cert_file.

If no file is given, the certificate is output to stdout.

The certificate is by default output in binary encoding, but will instead be output in the printable encoding format, as defined by the Internet RFC 1421 standard, if the -rfc option is specified.

If alias refers to a trusted certificate, that certificate is output. Otherwise, alias refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by alias.

Displaying Data

-list {-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v | -rfc} {-Jjavaoption}

Prints (to stdout) the contents of the keystore entry identified by alias. If no alias is specified, the contents of the entire keystore are printed.

This command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, with additional information such as the owner, issuer, and serial number. If the -rfc option is specified, certificate contents are printed using the printable encoding format, as defined by the Internet RFC 1421 standard

You cannot specify both -v and -rfc.

-printcert {-file cert_file} {-v} {-Jjavaoption}

Reads the certificate from the file cert_file, and prints its contents in a human-readable format. If no file is given, the certificate is read from stdin.

The certificate may be either binary encoded or in printable encoding format, as defined by the Internet RFC 1421 standard.

Note: This option can be used independently of a keystore.

Managing the Keystore

-keyclone {-alias alias} [-dest dest_alias] [-keypass keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Creates a new keystore entry, which has the same private key and certificate chain as the original entry.

The original entry is identified by alias (which defaults to "mykey" if not provided). The new (destination) entry is identified by dest_alias. If no destination alias is supplied at the command line, the user is prompted for it.

If the private key password is different from the keystore password, then the entry will only be cloned if a valid keypass is supplied. This is the password used to protect the private key associated with alias. If no key password is supplied at the command line, and the private key password is different from the keystore password, the user is prompted for it. The private key in the cloned entry may be protected with a different password, if desired. If no -new option is supplied at the command line, the user is prompted for the new entry's password (and may choose to let it be the same as for the cloned entry's private key).

Be careful with passwords - see Warning Regarding Passwords.

This command can be used to establish multiple certificate chains corresponding to a given key pair, or for backup purposes.

-storepasswd [-new new_storepass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Changes the password used to protect the integrity of the keystore contents. The new password is new_storepass, which must be at least 6 characters long.

Be careful with passwords - see Warning Regarding Passwords.

-keypasswd {-alias alias} [-keypass old_keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Changes the password under which the private key identified by alias is protected, from old_keypass to new_keypass.

If the -keypass option is not provided at the command line, and the private key password is different from the keystore password, the user is prompted for it.

If the -new option is not provided at the command line, the user is prompted for it.

Be careful with passwords - see Warning Regarding Passwords.

-delete [-alias alias] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Deletes from the keystore the entry identified by alias. The user is prompted for the alias, if no alias is provided at the command line.

Getting Help

-help

Lists all the commands and their options.

EXAMPLES

Suppose you want to create a keystore for managing your public/private key pair and certificates from entities you trust.

Generating Your Key Pair

The first thing you need to do is create a keystore and generate the key pair. You could use a command such as the following:

    keytool -genkey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US"
      -alias business -keypass kpi135 -keystore /working/mykeystore
      -storepass ab987c -validity 180

(Please note: This must be typed as a single line. Multiple lines are used in the examples just for legibility purposes.)

This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password "ab987c". It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "JavaSoft", organization of "Sun" and two-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long.

It creates a self-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password "kpi135".

The command could be significantly shorter if option defaults were accepted. As a matter of fact, no options are required; defaults are used for unspecified options that have default values, and you are prompted for any required values. Thus, you could simply have the following:

    keytool -genkey
In this case, a keystore entry with alias "mykey" is created, with a newly-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password.

The rest of the examples assume you executed the -genkey command without options specified, and that you responded to the prompts with values equal to those given in the first -genkey command, above (a private key password of "kpi135", etc.)

Requesting a Signed Certificate from a Certification Authority

So far all we've got is a self-signed certificate. A certificate is more likely to be trusted by others if it is signed by a Certification Authority (CA). To get such a signature, you first generate a Certificate Signing Request (CSR), via the following:

    keytool -certreq -file MarkJ.csr
This creates a CSR (for the entity identified by the default alias "mykey") and puts the request in the file named "MarkJ.csr". Submit this file to a CA, such as VeriSign, Inc. The CA will authenticate you, the requestor (usually off-line), and then will return a certificate, signed by them, authenticating your public key. (In some cases, they will actually return a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.)

Importing a Certificate for the CA

You need to replace your self-signed certificate with a certificate chain, where each certificate in the chain authenticates the public key of the signer of the previous certificate in the chain, up to a "root" CA.

Before you import the certificate reply from a CA, you need one or more "trusted certificates" in your keystore or in the cacerts keystore file (which is described in import command):

  • If the certificate reply is a certificate chain, you just need the top certificate of the chain (that is, the "root" CA certificate authenticating that CA's public key).

  • If the certificate reply is a single certificate, you need a certificate for the issuing CA (the one that signed it), and if that certificate is not self-signed, you need a certificate for its signer, and so on, up to a self-signed "root" CA certificate.

The "cacerts" keystore file ships with five VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate".

A certificate from a CA is usually either self-signed, or signed by another CA (in which case you also need a certificate authenticating that CA's public key). Suppose company ABC, Inc., is a CA, and you obtain a file named "ABCCA.cer" that is purportedly a self-signed certificate from ABC, authenticating that CA's public key.

Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! View it first (using the keytool -printcert command, or the keytool -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. You can call the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show (or that a secure public key repository shows). Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed.

If you trust that the certificate is valid, then you can add it to your keystore via the following:

    keytool -import -alias abc -file ABCCA.cer
This creates a "trusted certificate" entry in the keystore, with the data from the file "ABCCA.cer", and assigns the alias "abc" to the entry.

Importing the Certificate Reply from the CA

Once you've imported a certificate authenticating the public key of the CA you submitted your certificate signing request to (or there's already such a certificate in the "cacerts" file), you can import the certificate reply and thereby replace your self-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (if the CA reply is a chain), or one constructed (if the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the "cacerts" keystore file.

For example, suppose you sent your certificate signing request to VeriSign. You can then import the reply via the following, which assumes the returned certificate is named "VSMarkJ.cer":

    keytool -import -trustcacerts -file VSMarkJ.cer

Exporting a Certificate Authenticating Your Public Key

Suppose you have used the jarsigner tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature.

One way they can do this is by first importing your public key certificate into their keystore as a "trusted" entry. You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named MJ.cer via the following, assuming the entry is aliased by "mykey":

    keytool -export -alias mykey -file MJ.cer
Given that certificate, and the signed JAR file, a client can use the jarsigner tool to authenticate your signature.

Changing Your Distinguished Name but Keeping your Key Pair

Suppose your distinguished name changes, for example because you have changed departments or moved to a different city. If desired, you may still use the public/private key pair you've previously used, and yet update your distinguished name. For example, suppose your name is Susan Miller, and you created your initial key entry with the alias sMiller and the distinguished name
  "cn=Susan Miller, ou=Finance Department, o=BlueSoft, c=us"
Suppose you change from the Finance Department to the Accounting Department. You can still use the previously-generated public/private key pair and yet update your distinguished name by doing the following. First, copy (clone) your key entry:
    keytool -keyclone -alias sMiller -dest sMillerNew
(This prompts for the store password and for the initial and destination private key passwords, since they aren't provided at the command line.) Now you need to change the certificate chain associated with the copy, so that the first certificate in the chain uses your different distinguished name. Start by generating a self-signed certificate with the appropriate name:
    keytool -selfcert -alias sMillerNew
      -dname "cn=Susan Miller, ou=Accounting Department, o=BlueSoft, c=us"

Then generate a Certificate Signing Request based on the information in this new certificate:

    keytool -certreq -alias sMillerNew
When you get the CA certificate reply, import it:
    keytool -import -alias sMillerNew -file VSSMillerNew.cer
After importing the certificate reply, you may want to remove the initial key entry that used your old distinguished name:
    keytool -delete -alias sMiller

SEE ALSO

  • jar tool documentation

  • jarsigner tool documentation

  • the Security trail of the Java Tutorial for examples of the use of keytool


Native-to-ASCII Converter

native2ascii - Native-to-ASCII Converter

Converts a file with native-encoded characters (characters which are non-Latin 1 and non-Unicode) to one with Unicode-encoded characters.

SYNOPSIS

native2ascii [options] [inputfile [outputfile]]

DESCRIPTION

The Java compiler and other Java tools can only process files which contain Latin-1 and/or Unicode-encoded (\udddd notation) characters. native2ascii converts files which contain other character encodings into files containing Latin-1 and/or Unicode-encoded charaters.

If outputfile is omitted, standard output is used for output. If, in addition, inputfile is omitted, standard input is used for input.

OPTIONS

-reverse
Perform the reverse operation: convert a file with Latin-1 and/or Unicode encoded characters to one with native-encoded characters.

-encoding encoding_name
Specify the encoding name which is used by the conversion procedure. The default encoding is taken from System property file.encoding. The encoding_name string must be taken from the first column of the table of supported encodings in the Supported Encodings document.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.


Policy Tool - Policy File Creation and Management Tool

Policy Tool -

Policy File Creation and Management Tool

Creates and modifies the external policy configuration files that define your installation's Java security policy.

Table of Contents

Introduction

Permissions and Policy Files Overview
Permissions
Default Policy Files and Their Locations
Policy File Contents

Policy Tool Usage
Starting Policy Tool
Creating a new Policy File
Opening a Different Policy File
Specifying the Keystore
Adding a New Policy Entry
Adding a New Permission
Editing a Permission
Removing a Permission
Completing the Addition of a Policy Entry
Editing a Policy Entry
Removing a Policy Entry
Saving the Policy File
Exiting the Policy Tool
Viewing the Warning Log

Examples
Starting Creation of the User Policy File
Adding a Policy Entry
Specifying a Keystore
Adding a Policy Entry with a SignedBy alias
Saving the User Policy File
Exiting Policy Tool

See Also

Introduction

The policy for a Java runtime, specifying which permissions are available for code from various sources, is represented by a Policy object. The default Policy implementation obtains its information from static ASCII policy configuration files.

A policy file can be composed via a simple text editor, or via the graphical Policy Tool utility described in this document. Using the Policy Tool saves typing and eliminates the need for you to know the required syntax of policy files, thus reducing errors.

The Permissions and Policy Files Overview section of this document describes what permissions are, and provides information about policy file contents and default policy files. It also supplies links to more detailed discussions of these topics.

The Policy Tool Usage section describes how to use the Policy Tool to create and modify policy files.

The Examples section provides detailed examples of the use of Policy Tool.

The See Also section provides links to related documentation.

Permissions and Policy Files Overview

This section briefly describes what permissions are, and provides information about policy file contents and default policy files.

Permissions

A permission represents access to a system resource. In order for a resource access to be allowed for an applet (or an application running with a security manager), the corresponding permission must be explicitly granted to the code attempting the access.

A permission typically has a name (often referred to as a "target name") and, in some cases, a comma-separated list of one or more actions. For example, to create a permission to read the file named "abc" in the /tmp/ directory, you'd create a File Permission (technically, a java.io.FilePermission permission) with target name "/tmp/abc" and action string "read".

In the default Policy implementation, code trying to read the file must be granted the specified permission by a "policy entry" (sometimes referred to as a "grant entry") in a policy configuration file. The Policy Tool can be used to create such an entry in such a file.

The Permissions in the Java 2 Platform document contains tables that describe the built-in Java 2 Platform permission types and that discuss the risks of granting each permission. It also contains tables showing the Java 2 Platform methods that require permissions to be in effect in order to be successful, and for each lists the required permission.

Default Policy Files and Their Locations

There is by default a single system-wide policy file, and an optional user policy file.

The system policy file is by default located at

    java.home/lib/security/java.policy

Here, java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

The user policy file is by default located at

    user.home/.java.policy

Here, user.home indicates the user's home directory.

When the Policy is initialized, the system policy is loaded in first, and then the user policy is added to it. If neither policy is present, a built-in policy is used. This built-in policy is the same as the original sandbox policy.

Policy file locations are specified in the security properties file, which is located at

    java.home/lib/security/java.security
The policy file locations are specified as the values of properties whose names are of the form
    policy.url.n
Here, n indicates a number. You specify each such property value in a line of the following form:
policy.url.n=URL
Here, URL is a URL specification. For example, the default policy files, sometimes referred to as the "system" and "user" policy files, respectively, are defined in the security properties file as
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

Note: when a string like

    ${some.property}
appears in a policy file, or in the security properties file, it will be expanded to the value of the specified system property. For example,
    ${java.home}
indicates the value of the java.home property specifying the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Whether or not property expansion is allowed is controlled by the value of the "policy.expandProperties" property in the security properties file. If the value of this property is true (the default), expansion is allowed.

You can actually specify a number of URLs in the security properties file (including ones of the form "http://"), and all the designated policy files will get loaded. You can also comment out or change the second one to disable reading the default user policy file.

The algorithm starts at policy.url.1, and keeps incrementing until it does not find a URL. Thus if you have policy.url.1 and policy.url.3, policy.url.3 will never be read.

It is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command-line argument, which sets the value of the java.security.policy property. For example, if you type the following, where pURL is a URL indicating the location of a policy file, then the specified policy file will be loaded in addition to all the policy files that are specified in the security properties file.

  java -Djava.security.manager -Djava.security.policy=pURL SomeApp
(The "-Djava.security.manager" argument ensures that the default security manager is installed, and thus the application is subject to policy checks. It is not required if the application SomeApp installs a security manager.)

If you instead type the following, using a double equals, then just the specified policy file will be used; all others will be ignored.

  java -Djava.security.manager -Djava.security.policy==pURL SomeApp

If you want to pass a policy file to the appletviewer, again use a "-Djava.security.policy" argument as follows:

  appletviewer -J-Djava.security.policy=pURL  myApplet
Please note: The "-Djava.security.policy" policy file value will be ignored (for both java and appletviewer commands) if the "policy.allowSystemProperty" property in the security properties file is set to false. The default is true.

Policy File Contents

A policy configuration file (policy file, for short) indicates what permissions are allowed for code from specified code sources.

A policy configuration file contains a list of entries. It may contain a single "keystore" entry, and contains zero or more "policy" (or "grant") entries.

A keystore is a database of private keys and their associated digital certificates such as X.509 certificate chains authenticating the corresponding public keys. The keytool utility is used to create and administer keystores. The keystore specified in a policy configuration file is used to look up the public keys of the signers (if any) specified in the grant entries of the file. Public keys are used to verify the digital signatures used to sign the code.

A keystore entry must appear in a policy configuration file if any policy entries specify signer aliases.

At this time, there can be only one keystore entry in the policy file. The keystore entry specifies the URL location of the keystore and optionally the keystore type. The URL is relative to the policy file location. Thus if the policy file is specified in the security properties file as:

  policy.url.1=http://foo.bar.com/blah/some.policy
and that policy file has a keystore entry with value ".keystore" then the keystore will be loaded from:
  http://foo.bar.com/blah/.keystore
The URL can also be absolute.

A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. If you don't specify a type, it is assumed to be that specified by the "keystore.type" property value in the security properties file. The value is initially "JKS", specifying a proprietary keystore type supported by Sun Microsystems.

Code being executed is always considered to come from a particular "code source". The code source may include not only the CodeBase location (URL) where the applet (or application) originated from, but also a reference to one or more (symbolic) alias names from a keystore specifying the keystore entries containing the public key(s) corresponding to the private key(s) used to sign the code.

Each policy entry in the policy file contains the following:

  • an optional CodeBase entry specifying the URL location where the code originates from,

  • an optional SignedBy entry specifying the alias name from the keystore used to reference the signer whose private key was used to sign the code, and

  • one or more permission entries specifying which permissions are granted to code from the specified CodeBase and signed by the specified SignedBy alias.

Policy Tool Usage

Starting Policy Tool

To start Policy Tool, simply type the following at the command line.
  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Blank Policy Tool window

You can then proceed to either open whatever policy file you want to work on or create a new policy file, by adding policy entries, optionally specifying a keystore, and saving the file).

The first time you run the Policy Tool, there will not be a user policy file (unless you created one manually).

Creating a new Policy File

To create a new policy file, start by simply selecting the New command from the File menu. This will close the currently open policy file (if any, after first prompting you to save it if needed) and bring up a new policy tool window, that is, a window with headings and buttons but no data in it.

Please Note: this is not necessary the first time you run the Policy Tool. Since the tool tries to open the user policy file and one doesn't exist yet (unless it was created manually), the tool will bring up a window without any data in it.

Once you have a new policy tool window, you can then create the policy entries, and specify the keystore (if any of the policy entries specify a keystore alias). At any point, you can save the policy file.

Opening a Different Policy File

To work on a different policy file than the one currently being worked on (if any), use the Open command in the File menu.

This will close the currently open policy file (if any, after first prompting you to save it if needed) and will present you with an Open dialog, which you can use to navigate the directory structure until you get to the directory containing the policy file you want to work on. Select that file, then select the OK button.

The "Policy Tool" window will then be filled in with information from the policy file, including the policy file name, the keystore URL (if any), and the CodeBase and SignedBy parts of each policy entry in the policy file.

Specifying the Keystore

To specify the keystore containing the key information for the aliases specified in the SignedBy parts of policy entries, select the Change Keystore command in the Edit menu.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the /tests/ directory, type the following file: URL into the text box labeled "New KeyStore URL".

  file:/tests/mykeystore
To also specify that the keystore type is "JKS" (the proprietary keystore type supported by Sun Microsystems), type the following into the text box labeled "New KeyStore Type".
  JKS

When you are done specifying the keystore URL and type (if any), select OK (or you can select Cancel to cancel the operation). If you didn't cancel, the text box labeled "Keystore:" is now filled in with the keystore URL and type.

Adding a New Policy Entry

To add a new policy entry, select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Blank Add Entry Dialog

Using this dialog box, you specify

  • an optional CodeBase entry indicating the URL location where the code originates from. For example, to indicate code from the local /JavaSoft/TESTS/ directory, type the following file URL into the CodeBase text box:
      file:/JavaSoft/TESTS/

  • an optional SignedBy entry indicating the alias name from the keystore used to reference the signer whose private key was used to sign the code. For example, to indicate the alias named "duke", simply type the following into the SignedBy text box:
      duke

  • one or more permission entries indicating which permissions are granted to the code from the source indicated by the CodeBase and SignedBy values (or to any code if no such values are specified). See Adding a New Permission.

The SignedBy value is a string alias that is mapped (using the keystore) to a set of public keys that are associated with the signers. These keys are used to verify that classes from the specified code source are really signed by these signers.

The SignedBy value can be a comma-separated string containing names of multiple signers, an example of which is "Adam,Eve,Charles", which means "signed by Adam and Eve and Charles" (i.e., the relationship is AND, not OR).

The SignedBy value is optional in that, if it is omitted, it signifies "any signer," or in other words, it doesn't matter whether the code is signed or not. Similarly, if there is no CodeBase entry, then it signifies "any code"; it doesn't matter where the code originates from.

Thus, if there is no CodeBase entry, then all code signed by the specified alias(es) will be granted the specified permissions. If there is no SignedBy entry, then all code from the specified CodeBase will be granted the specified permissions, regardless of whether the code is signed or not, and by whom. If there is no CodeBase entry, and also no SignedBy entry, then all code will be granted the specified permissions.

Note: The exact meaning of a CodeBase value depends on the characters at the end. A CodeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A CodeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A CodeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory.

Adding a New Permission

To add a new permission, select the Add Permission button in the "Policy Entry" dialog box. This brings up the "Permissions" dialog box:

Blank Add Permissions Dialog

To add the permission:

  1. Type or select a permission type.

    The drop-down list labeled "Permission:" contains a list of built-in permission types. If you want such a type, select it from the list, and the complete permission type name appears in the text box to the right of the drop-down list.

    If you instead want to specify a permission type defined by you or others, type the permission type into the text box.

  2. Type or select a permission target name.

    If you selected a built-in permission from the "Permission:" drop-down list, and permissions of that type have specific target name values, then the drop-down list labeled "Target Name:" contains a list of those values, from which you can choose.

    In some cases, where the target name possibilities are infinite but there are some built-in target name specifications that have special meaning, such target names will appear in the drop-down list. For example, the special target name of "<<All Files>>" will appear in the list for File Permissions.

    To specify a target name not available in the drop-down list, type the target name directly into the text box to the right of the "Target Name:" drop-down list. For example, to specify the file named data in the /JavaSoft/ptTest/ directory, type

      /JavaSoft/ptTest/data

  3. Type or select one or more actions, if actions are relevant.

    Some permissions just have a target name, but no actions. For such permissions, leave the text box to the right of the "Actions:" drop-down list blank. (It will automatically be darkened and unavailable for this type of built-in permission.)

    For permissions requiring action specifications, type the comma-separated list of actions into the text box, or select them from the drop-down list. For example, to specify both read and write access to a file specified for a File Permission, first select read (or write, order doesn't matter) from the list. The word "read" appears in the text box. Then select write, and the word "write" will be appended, preceded by a comma and a space.

  4. Type a SignedBy alias into the text box to the right of the "Signed By" label, if required. The SignedBy value for a permission entry is optional. If present, it indicates a signed permission. That is, the permission class itself must be signed by the given alias(es) in order for the permission to be granted.
When you are done specifying the permission information, select the OK button (or Cancel to cancel). The new permission appears in a line in the "Policy Entry" dialog.

You can then add additional permissions by following the same sequence of steps. Or you can edit an existing permission or remove a permission.

Editing a Permission

To edit an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Edit Permission button. Alternatively, you can simply double-click the line for that permission.

This brings up the same type of "Permissions" dialog box as appears when you are adding a new permission, except in this case the dialog box is filled in with the existing permission information. To change the information, either make new selections from the drop-down lists or replace the information in the text boxes.

When you are done, select the OK button (or Cancel to cancel changes). The "Policy Entry" dialog now shows the permission with any modifications you made.

Removing a Permission

To remove an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Remove Permission button.

Completing the Addition of a Policy Entry

Once you are done adding a policy entry, select the Done button in the "Policy Entry" dialog, or Cancel to cancel.

If you selected Done, the "Policy Tool" window now contains a line representing the policy entry. The line just contains the CodeBase and SignedBy information (if any). If neither was specified in the "Policy Entry" dialog, just

  CodeBase <ALL>
appears.

Note: a warning is displayed upon closing the policy entry if it contains any SignedBy aliases that don't yet exist in your keystore. Select OK and make a note to create such an alias, or edit the policy entry to fix the alias if was wrong.

Editing a Policy Entry

To edit an existing policy entry, select the line for that entry in the main "Policy Tool" window, then select the Edit Policy Entry button. Alternatively, you can simply double-click the line for that entry.

This brings up the same type of "Policy Entry" dialog box as appears when you are adding a new policy entry, except in this case the dialog box is filled in with the existing policy entry information. To change the information, simply retype it (for the CodeBase and SignedBy values) or add, remove , or modify permissions.

When you are done, select the Done button (or Cancel to cancel).

Removing a Policy Entry

To delete a policy entry from the policy file, select the line for that entry in the main "Policy Tool" window, then select the Remove Policy Entry button.

The complete policy entry is displayed, and you can then either select OK to remove the entry, or Cancel to keep it.

Saving the Policy File

To save changes to an existing policy file, simply select the Save command in the File menu.

To save a new policy file you've been creating, or to copy an existing policy file to a new policy file with a different name, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to the directory in which you want to save the policy file. Type the desired file name, then select the OK button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File:"

Exiting the Policy Tool

To exit Policy Tool, select the Exit command from the File menu.

Viewing the Warning Log

If Policy Tool ever reports that warnings have been stored in the Warning Log, you can view the log by selecting the View Warning Log command in the Edit menu.

For example, if you have a policy file with a Keystore URL specifying a keystore that doesn't yet exist, you will get such a warning at various times, e.g., when you open the file. You can continue to work on the policy file even if warnings exist.

Examples

The following examples show how to
  • create the user policy file from scratch

  • add a policy entry

  • specify a keystore

  • add a policy entry for signed code

  • save the user policy file, and

  • exit the Policy Tool

Starting Creation of the User Policy File

Initially, there is no user policy file (unless you created one manually). So to create the user policy file, first simply start Policy Tool by typing the following at the command line.

  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Blank Policy Tool window

You can now create the user policy file by adding entries and saving the file.

Adding a Policy Entry

Suppose you want to grant all classes from the /tests/ directory permission to read the file named mydata in the /temp/data/ directory. To do so, first select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Blank Add Entry Dialog

Using this dialog box, type the file URL

  file:/tests/
into the CodeBase text box.

Leave the SignedBy text box blank, since you aren't requiring the code to be signed.

To add the permission, select the Add Permission button. This brings up the "Permissions" dialog box:

Blank Add Permissions Dialog

To add the permission:

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:":
      /temp/data/mydata
  3. Specify read access by selecting "read" from the "Actions:" drop-down list.
Now the "Permission" dialog box looks like the following:

First File Permission

When you are done specifying the permission information, select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

First Policy Entry

You are now done specifying this policy entry, so select the Done button. The "Policy Tool" window now contains a line representing the policy entry. The line just contains the CodeBase value:

Policy Tool with one CodeBase

Specifying a Keystore

Suppose you also want to grant any code from the URL "http://java.sun.com/" and signed by the alias "duke" read access to all files in the /tmp/ directory. Suppose you also want to give such code permission to initiate outgoing socket connections to any hosts. You need to do two things:
  1. Specify the keystore containing the alias, and

  2. Create the policy entry granting the permissions.
To specify the keystore containing the key information for the aliases specified in any SignedBy parts of policy entries, select the Change Keystore command in the Edit menu of the main "Policy Tool" window.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the /tests/ directory, type the following file: URL into the text box labeled "New KeyStore URL":

  file:/tests/mykeystore
If the keystore type is the default type, as specified by the "keystore.type" property value in the security properties file, you don't need to type a "New KeyStore Type" value. The default value of that property is "JKS" (the proprietary keystore type supported by Sun Microsystems).

To specify the keystore type, type its value into the text box labeled "New KeyStore Type." For example, to indicate that the keystore type is "JKS" type

  JKS
The result is:

When you are done specifying the keystore URL and type, select OK. The text box labeled "Keystore:" is now filled in with the URL and type.

Next, you need to specify the policy entry:

Adding a Policy Entry with a SignedBy alias

Select the Add Policy Entry button in the main "Policy Tool" window. This brings up the "Policy Entry" dialog box. Type the following into the the CodeBase text box:
  http://java.sun.com/*
The "*" indicates that both class and JAR files in the specified directory are to be considered to match this CodeBase.

Now, type the following alias into the SignedBy text box:

  duke

To add the first permission, select the Add Permission button. This brings up the "Permissions" dialog box. Do the following

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all files in the /tmp/ directory:
      /tmp/*
  3. Specify read access by selecting "read" from the "Actions:" drop-down list.
Now the "Permissions" dialog box looks like the following:

Second File Permission

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Now you need to add the other permission. Select the Add Permission button. In the "Permissions" dialog box, do the following

  1. Select "Socket Permission" from the "Permission:" drop-down list. The complete permission type name (java.net.SocketPermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all hosts:
      *
  3. Specify permission to make connections by selecting "connect" from the "Actions:" drop-down list.
Now the "Permissions" dialog box looks like the following:

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Policy Entry with Two Permissions

You are now done specifying this policy entry, so select the Done button in the "Policy Entry" dialog. The "Policy Tool" window now contains a line representing the policy entry, showing the CodeBase and SignedBy values.

Policy Tool with Two Entries

Saving the User Policy File

Let's assume you want to save the policy file you've been creating with the default name (.java.policy) in the default location (your home directory).

To save the user policy file, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to your home directory. Type

  .java.policy
(note the initial period) as the file name, then select the OK button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File".

Exiting Policy Tool

When you want to exit Policy Tool, do so by selecting the Exit command from the File menu.

See Also

  • Permissions in the Java 2 Platform

  • Default Policy Information and Policy File Syntax

  • keytool tool documentation

  • Security Architecture Specification

  • The Security trail of the Java Tutorial for examples of the use of the security tools including Policy Tool


rmic - The Java RMI Stub Compiler

rmic generates stubs, skeletons, ties for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.

SYNOPSIS

rmic [ options ] package-qualified-class-name(s)

DESCRIPTION

The rmic compiler generates stub, and skeleton class files (JRMP protocol), and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from the compiled Java programming language classes that contain remote object implementations. A remote object is one that implements the interface java.rmi.Remote. The classes named in the rmic command must be classes that have been compiled successfully with the javac command and must be fully package qualified. For example, running rmic on the class file name HelloImpl as shown here:
rmic hello.HelloImpl
creates the HelloImpl_Skel.class and HelloImpl_Stub.class files in the hello subdirectory (named for the class's package).

A skeleton for a remote object is a JRMP protocol server-side entity that contains a method which dispatches calls to the actual remote object implementation.

A tie for a remote object is a server-side entity similar to a skeleton, but which communicates with the client using the IIOP protocol.

A stub is a proxy for a remote object which is responsible for forwarding method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub. JRMP protocol stubs are generated by default. Use the -iiop option to generate stubs for the IIOP protocol.

The stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements exactly the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built-in operators for casting and type checking. For IIOP, the PortableRemoteObject.narrow method must be used.

OPTIONS

-bootclasspath path
Override location of bootstrap class files

-classpath path
Specifies the path rmic uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for path is:
.:<your_path>
For example:
.:/usr/local/java/classes
-d directory
Specifies the destination root directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, tie, and skeleton files. For example, the command

Windows:

% rmic -d C:\java\classes foo.MyClass

Solaris:

% rmic -d /java/classes foo.MyClass
would place the stub and skeleton classes derived from MyClass into the directory C:\java\classes\foo. If the -d option is not specified, the default behavior is as if "-d ." were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. Note that in previous versions of rmic, if -d was not specified the package hierarchy was not created, and the output files were placed directly in the current directory.
-depend
Makes the compiler consider recompiling classes which are referenced from other classes. Normally, it only recompiles missing or out-of-date classes that are referred to from source code.

-extdirs path
Override location of installed extensions

-g
Enables generation of debugging tables. Debugging tables contain information about line numbers and local variables - information used by Java debugging tools. By default, only line numbers are generated.

-idl
Causes rmic to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others.

When the -idl option is used, other options also include:

-always or -alwaysgenerate
Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
-factory
Uses factory keyword in generated IDL.
-idlModule fromJavaPackage[.class] toIDLModule
Specifies IDLEntity package mapping. For example: -idlModule foo.bar my::real::idlmod.
-idlFile fromJavaPackage[.class] toIDLFile
Specifies IDLEntity file mapping. For example: -idlFile test.pkg.X TEST16.idl.

-iiop
Causes rmic to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

Invoking rmic with the -iiop generates stubs and ties that conform to this naming convention:

_<implementationName>_stub.class

_<interfaceName>_tie.class

When the -iiop option is used, other options also include:

-always or -alwaysgenerate
Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
-nolocalstubs
Do not create stubs optimized for same-process clients and servers.
-noValueMethods
Must be used with the -idl option. Prevents addition of valuetype methods and initializers to emitted IDL. These methods and initializers are optional for valuetypes, and are generated unless the -noValueMethods option is specified when using the -idl option.

-J
Used in conjunction with any java option, it passes the option following the -J (no spaces between the -J and the option) on to the java interpreter.

-keep or -keepgenerated
Retains the generated .java source files for the stubs and skeletons and writes them to the same directory as the .class file.

-nowarn
Turns off warnings. If used the compiler does not print out any warnings.

-sourcepath path
Specify where to find user source files

-vcompat
(default) Creates stubs and skeletons compatible with both 1.1 and 1.2 JRMP stub protocol versions.

-verbose
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.

-v1.1
Create stubs and skeletons for 1.1 JRMP stub protocol version.

-v1.2
Create stubs for the 1.2 JRMP stub protocol version only.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by colons. For example,
.:/usr/local/java/classes

SEE ALSO

java, javac, CLASSPATH


rmid - The Java RMI Activation System Daemon

rmid starts the activation system daemon that allows objects to be registered and activated in a Java virtual machine (JVM).

SYNOPSIS

rmid [options]

DESCRIPTION

The rmid tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM. See the RMI Specification and Activation tutorials for details on how to write programs that use activatable remote objects.

The daemon can be started by executing the rmid command, and specifying a security policy file, as follows:

    rmid -J-Djava.security.policy=rmid.policy

Note: When running Sun's implementation of rmid, by default you will need to specify a security policy file so that rmid can verify whether or not the information in each ActivationGroupDesc is allowed to be used to launch a JVM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any Properties passed to an ActivationGroupDesc's constructor must now be explicitly allowed in the security policy file for rmid. The value of the sun.rmi.activation.execPolicy property dictates the policy that rmid uses to determine whether or not the information in an ActivationGroupDesc may be used to launch a JVM for an activation group.

Executing rmid by default

  • starts the Activator and an internal registry on the default port, 1098, and
  • binds an ActivationSystem to the name java.rmi.activation.ActivationSystem in this internal registry.
To specify an alternate port for the registry, you must specify the -port option when starting up rmid. For example,
    rmid -J-Djava.security.policy=rmid.policy -port 1099
starts the activation system daemon and a registry on the registry's default port, 1099.

OPTIONS

-C<someCommandLineOption>
Specifies an option that is passed as a command-line argument to each child process (activation group) of rmid when that process is created. For example, you could pass a property to each Java virtual machine spawned by the activation system daemon:
    rmid -C-Dsome.property=value
This ability to pass command-line arguments to child processes can be useful for debugging. For example, the following command:
    rmid -C-Djava.rmi.server.logCalls=true
will enable server-call logging in all child JVMs.

-J<someCommandLineOption>
Specifies an option that is passed to the java interpreter running rmid. For example, to specify that rmid use a policy file named rmid.policy, the -J option can be used to define the java.security.policy property on rmid's command line, for example:
    rmid -J-Djava.security.policy=rmid.policy
-J-Dsun.rmi.activation.execPolicy=<policy>
Specifies the policy that rmid employs to check commands and command-line options used to launch the JVM in which an activation group runs. Please note that this option exists only in Sun's implementation of the RMI activation daemon. If this property is not specified on the command line, the result is the same as if -J-Dsun.rmi.activation.execPolicy=default were specified. The possible values of <policy> can be default, <policyClassName>, or none:

  • default (or if this property is unspecified)

    The default execPolicy allows rmid to execute commands with specific command-line options only if rmid has been granted permission to execute those commands and options in the security policy file that rmid uses. Only the default activation group implementation can be used with the default execution policy.

    rmid launches a JVM for an activation group using the information in the group's registered activation group descriptor, an ActivationGroupDesc. The group descriptor specifies an optional ActivationGroupDesc.CommandEnvironment which includes the command to execute to start the activation group as well as any command line options to be added to the command line. By default, rmid uses the java command found in java.home. The group descriptor also contains properties overrides that are added to the command line as options defined as:

        -D<property>=<value>

    The permission com.sun.rmi.rmid.ExecPermission is used to grant rmid permission to execute a command, specified in the group descriptor's CommandEnvironment to launch an activation group. The permission com.sun.rmi.rmid.ExecOptionPermission is used to allow rmid to use command-line options, specified as properties overrides in the group descriptor or as options in the CommandEnvironment, when launching the activation group.

    When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission need to be granted universally (i.e., granted to all code sources).

    ExecPermission

    The ExecPermission class represents permission for rmid to execute a specific command to launch an activation group.

    Syntax
    The name of an ExecPermission is the path name of a command to grant rmid permission to execute. A path name that ends in "/*" indicates all the files contained in that directory (where "/" is the file-separator character, File.separatorChar). A path name that ends with "/-" indicates all files and subdirectories contained in that directory (recursively). A path name consisting of the special token "<<ALL FILES>>" matches any file.

    Note: A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

    ExecOptionPermission

    The ExecOptionPermission class represents permission for rmid to use a specific command-line option when launching an activation group. The name of an ExecOptionPermission is the value of a command line option.

    Syntax
    Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=".

    For example: "*" or "-Dfoo.*" or "-Da.b.c=*" is valid, "*foo" or "-Da*b" or "ab*" is not.

    Policy file for rmid

    When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions universally because only rmid checks these permissions.

    An example policy file that grants various execute permissions to rmid is:

    grant {
    permission com.sun.rmi.rmid.ExecPermission
    "/files/apps/java/jdk1.2.2/solaris/bin/java";

    permission com.sun.rmi.rmid.ExecPermission
    "/files/apps/java/jdk1.2.2/solaris/bin/java_g";

    permission com.sun.rmi.rmid.ExecPermission
    "/files/apps/rmidcmds/*";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Djava.security.policy=/files/policies/group.policy";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Djava.security.debug=*";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Dsun.rmi.*";
};
    The first two permissions granted allow rmid to execute the 1.2.2 version of the java and java_g commands, specified by their explicit path names. Note that by default, the version of the java command found in java.home is used (the same one that rmid uses), and does not need to be specified in the policy file. The third permission allows rmid to execute any command in the directory /files/apps/rmidcmds.

    The fourth permission granted, an ExecOptionPermission, allows rmid to launch an activation group that defines the security policy file to be /files/policies/group.policy. The next permission allows the java.security.debug property to be used by an activation group. The last permission allows any property in the sun.rmi property name hierarchy to be used by activation groups.

    To start rmid with a policy file, the java.security.policy property needs to be specified on rmid's command line, for example:

    • rmid -J-Djava.security.policy=rmid.policy

  • <policyClassName>

    If the default behavior is not flexible enough, an administrator can provide, when starting rmid, the name of a class whose checkExecCommand method is executed in order to check commands to be executed by rmid.

    The policyClassName specifies a public class with a public, no-argument constructor and an implementation of the following checkExecCommand method:

        public void checkExecCommand(ActivationGroupDesc desc,
                                 String[] command)
    throws SecurityException;
    Before launching an activation group, rmid calls the policy's checkExecCommand method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the checkExecCommand throws a SecurityException, rmid will not launch the activation group and an ActivationException will be thrown to the caller attempting to activate the object.

  • none

    If the sun.rmi.activation.execPolicy property value is "none", then rmid will not perform any validation of commands to launch activation groups.

    -log dir
    Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, log, in the directory in which the rmid command was executed.

    -port port
    Specifies the port rmid's registry uses. The activation system daemon binds the ActivationSystem, with the name java.rmi.activation.ActivationSystem, in this registry. Thus, the ActivationSystem on the local machine can be obtained using the following Naming.lookup method call:
        import java.rmi.*;
    import java.rmi.activation.*;

    ActivationSystem system; system = (ActivationSystem)
    Naming.lookup("//:port/java.rmi.activation.ActivationSystem");

    -stop
    Stops the current invocation of rmid, for a port specified by the -port option. If no port is specified, it will stop the rmid running on port 1098.

    • ENVIRONMENT VARIABLES

    CLASSPATH
    Used to provide the system a path to user-defined classes. Directories are separated by colons. For example:
        .:/usr/local/java/classes

    SEE ALSO

    rmic, CLASSPATH, java


rmiregistry - The Java Remote Object Registry

The rmiregistry command starts a remote object registry on the specified port on the current host.

SYNOPSIS

rmiregistry [port]

DESCRIPTION

The rmiregistry command creates and starts a remote object registry on the specified port on the current host. If port is omitted, the registry is started on port 1099. The rmiregistry command produces no output and is typically run in the background. For example:

rmiregistry &

A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names. Clients on local and remote hosts can then look up remote objects and make remote method invocations.

The registry is typically used to locate the first remote object on which an application needs to invoke methods. That object in turn will provide application-specific support for finding other objects.

The methods of the java.rmi.registry.LocateRegistry class are used to get a registry operating on the local host or local host and port.

The URL-based methods of the java.rmi.Naming class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry.

OPTIONS

-J
Used in conjunction with any java option, it passes the option following the -J (no spaces between the -J and the option) on to the java interpreter.

SEE ALSO

java, java.rmi.registry.LocateRegistry and java.rmi.Naming


serialver - The Serial Version Command

The serialver command returns the serialVersionUID.

SYNOPSIS

serialver [ options ] [ classnames ]
options
Command-line options, as specified in this document.
classnames
One or more class names

DESCRIPTION

serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line.

OPTIONS
-classpath <directories and zip/jar files separated by :>
Set search path for application classes and resources.
-show
Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.

SEE ALSO

java.io.ObjectStreamClass


Setting the class path

Synopsis

The class path can be set using either the -classpath option when calling an SDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.

% sdkTool -classpath path1:path2...

-or-

% setenv CLASSPATH path1:path2...

where:

sdkTool
A command-line tool, such as java, javac, or javadoc. For a listing, see SDK Tools.

path1:path2
Paths to the .jar, .zip or .class files. Each path should end with a filename or directory depending on what you are setting the class path to:
  • For a .jar or .zip file that contains .class files, the path ends with the name of the .zip or .jar file.
  • For .class files in an unnamed package, the path ends with the directory that contains the .class files.
  • For .class files in a named package, the path ends with the directory that contains the "root" package (the first package in the full package name).

Multiple path entries are separated by colons.

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.

Classpath entries that are not either a directory or an archive (.zip or .jar file) are ignored.

Description

The class path tells the SDK tools and applications where to find third-party and user-defined classes -- that is, classes that are not extensions or part of the Java platform. The class path needs to find any classes you've compiled with the javac compiler -- its default is the current directory to conveniently enable those classes to be found.

Java 2 SDK, the JVM and other SDK tools find classes by searching the Java platform (bootstrap) classes, any extension classes, and the class path, in that order. (For details on the search strategy, see How Classes Are Found.) Class libraries for most applications will want to take advantage of the extensions mechanism. You only need to set the class path when you want to load a class that's (a) not in the current directory or in any of its subdirectories, and (b) not in a location specified by the extensions mechanism.

If you are upgrading from an older version of the SDK software, your startup settings may include CLASSPATH settings that are no longer needed. You should remove any settings that are not application-specific, such as classes.zip. Some third-party applications that use the Java Virtual Machine may modify your CLASSPATH environment variable to include the libaries they use. Such settings can remain.

You can change the class path by using the SDK tools' -classpath option when you invoke the JVM or other SDK tools or by using the CLASSPATH environment variable. Using the -classpath option is preferred over setting CLASSPATH environment variable because you can set it individually for each application without affecting other applications and without other applications modifying its value.

Classes can be stored either in directories (folders) or in archive files. The Java platform classes are stored in rt.jar. For more details on archives and information on how the class path works, see Understanding the class path and package names near the end of this document.

Important Note: Some older versions of the SDK software included a <jdk-dir>/classes entry in the default class path. That directory exists for use by the SDK software, and should not be used for application classes. Application classes should be placed in a directory outside of the SDK direcotry hierarchy. That way, installing a new development environment does not force you to reinstall application classes. For compatibility with older versions, applications that use the <jdk-dir>/classes directory as a class library will run in the current version, but there is no guarantee that they will run in future versions.

Using the SDK tools' -classpath option

The Java tools java, jdb, javac, and javah have a -classpath option which replaces the path or paths specified by the CLASSPATH environment variable while the tool runs. This is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.

The runtime tool java has a -cp option, as well. This option is an abbreviation for -classpath.

For very special cases, both java and javac have options that let you change the path they use to find their own class libraries. The vast majority of users will never to need to use those options, however.

Using the CLASSPATH environment variable

In general, you will want to use the -classpath command-line option, as explained in the previous section. This section shows you how to set the CLASSPATH environment variable if you want to do that, or clear settings left over from a previous installation.

Setting CLASSPATH

In csh, the CLASSPATH environment variable is modified with the setenv command. The format is:

setenv CLASSPATH path1:path2

In sh, the CLASSPATH environment variable can be modified with these commands:

CLASSPATH = path1:path2:...
export CLASSPATH

Clearing CLASSPATH

If your CLASSPATH environment variable has been set to a value that is not correct, or if your startup file or script is setting an incorrect path, you can unset CLASSPATH in csh by using:

unsetenv CLASSPATH

In sh, you would use:

unset CLASSPATH

These commands unset CLASSPATH for the current shell only. You should also delete or modify your startup settings to ensure that you have the right CLASSPATH settings in future sessions.

Changing Startup Settings

If the CLASSPATH variable is set at system startup, the place to look for it depends on the shell you are running:

Shell | Startup Script
csh, tcsh | Examine your .cshrc file for the setenv command.
sh, ksh | Examine your .profile file for the export command.

Understanding the class path and package names

Java classes are organized into packages which are mapped to directories in the file system. But, unlike the file system, whenever you specify a package name, you specify the whole package name -- never part of it. For example, the package name for java.awt.Button is always specified as java.awt.

For example, suppose you want the Java runtime to find a class named Cool.class in the package utility.myapp. If the path to that directory is /java/MyClasses/utility/myapp, you would set the class path so that it contains /java/MyClasses.

To run that app, you could use the following JVM command:

% java -classpath /java/MyClasses utility.myapp.Cool

When the app runs, the JVM uses the class path settings to find any other classes defined in the utility.myapp package that are used by the Cool class.

Note that the entire package name is specified in the command. It is not possible, for example, to set the class path so it contains /java/MyClasses/utility and use the command java myapp.Cool. The class would not be found.

(You may be wondering what defines the package name for a class. The answer is that the package name is part of the class and cannot be modified, except by recompiling the class.)

Note: An interesting consequence of the package specification mechanism is that files which are part of the same package may actually exist in different directories. The package name will be the same for each class, but the path to each file may start from a different directory in the class path.

Folders and archive files

When classes are stored in a directory (folder), like /java/MyClasses/utility/myapp, then the class path entry points to the directory that contains the first element of the package name. (in this case, /java/MyClasses, since the package name is utility.myapp.)

But when classes are stored in an archive file (a .zip or .jar file) the class path entry is the path to and including the .zip or .jar file. For example, to use a class library that is in a .jar file, the command would look something like this:

% java -classpath /java/MyClasses/myclasses.jar utility.myapp.Cool

Multiple specifications

To find class files in the directory /java/MyClasses as well as classes in /java/OtherClasses, you would set the class path to:

% java -classpath /java/MyClasses:/java/OtherClasses ...

Note that the two paths are separated by a colon.

Specification order

The order in which you specify multiple class path entries is important. The Java interpreter will look for classes in the directories in the order they appear in the class path variable. In the example above, the Java interpreter will first look for a needed class in the directory /java/MyClasses. Only if it doesn't find a class with the proper name in that directory will the interpreter look in the /java/OtherClasses directory.


Classic VM

Non-Standard Options of the Classic VM

The Java 2 Classic VM is included only in the Java 2 SDK. It is not included in the Java 2 Runtime Environment.
-Xbootclasspath:bootclasspath
Specify a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xbootclasspath/a:path
Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.

-Xbootclasspath/p:path
Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xdebug
Start with the debugger enabled. The Java interpereter prints out a password for jdb's use. Refer to jdb description for more details and an example.

-Xnoclassgc
Disable class garbage collection

-Xms n
Specify the initial size of the memory allocation pool. This value must greather than 1000. To multiply the value by 1000, append the letter k. To multiply the value by 1 million, append the letter m. The default value is 1m

-Xmx n
Specify the maximum size of the memory allocation pool. This value must greather than 1000. To multiply the value by 1000, append the letter k. To multiply the value by 1 million, append the letter m. The default value is 64m.

-Xrunhprof[:help][:<suboption>=<value>,...]
Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs. Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.

-Xrs
Reduce the use of operating system signals.

-Xcheck:jni
Perform additional checks for Java Native Interface functions.

-Xcheck:nabounds
Perform additional checks for Java Native Interface array bounds.

-Xfuture
Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.


appletviewer - The Java Applet Viewer

The appletviewer command allows you to run applets outside of the context of a World-Wide Web browser.

SYNOPSIS

appletviewer [ options ] urls ...

DESCRIPTION

The appletviewer command connects to the documents or resources designated by urls and displays each applet referenced by the documents in its own window. Note: if the documents referred to by urls do not reference any applets with the OBJECT, EMBED, or APPLET tag, then appletviewer does nothing. For details on the HTML tags that appletviewer supports, see AppletViewer Tags.

The Java 2 SDK contains two implementations of the Java virtual machine.

The Java HotSpotTM Client VM
The Java HotSpot Client VM is the default virtual machine. Its use of Java HotSpot technology gives it superior performance as compared with the Classic VM. Unless special command-line options are used to invoke the Classic VM instead (see below), appletviewer will always launch an applet to run on the Client VM.

The Java 2 Classic VM
The Java 2 Classic VM is essentially the same virtual machine implementation as in version 1.2 of the Java 2 SDK. It may be invoked by using the -classic command-line option, as in this example:

appletviewer -classic MyApplet.html

OPTIONS
-debug
Starts the applet viewer in the Java debugger, jdb, thus allowing you to debug the applets in the document.

-encoding encoding name
Specifies the input HTML file encoding name.

-J javaoption
Passes through the string javaoption as a single argument to the Java interpreter which runs the appletviewer. The argument should not contain spaces. Multiple argument words must all begin with the prefix -J, which is stripped. This is useful for adjusting the compiler's execution environment or memory usage.


Command Line Changes
between JDKTM 1.1 Tools and JavaTM 2 SDK Tools

 SDK Tools
This file summarizes changes some changes to the way the Java 2 SDK's tools work as compared to the tools that ship with the JDK 1.1.x software. The changes described here are not changes between versions 1.2 and 1.3 of the Java 2 SDK.

Contents

  • Introduction
  • Changes to java.home Property
  • Changes to CLASSPATH and -classpath
  • New Class Search Paths
  • New Options to Search for Boot Classes: -Xbootclasspath, -bootclasspath
  • oldjava
  • Appletviewer No Longer Uses CLASSPATH
  • Standard vs. Non-standard Options
  • New Option to Search for Source Files: -sourcepath

Introduction

This document summarizes a few important changes in command line options between JDK1.1 and Java 2 SDK tools. Its target audience is those already familiar with the command line options of JDK1.1 tools.

Please note that every effort has been made to keep the options in the Java 2 SDK tools backwards compatible with the options in JDK1.1, where possible. The purpose of this document is to provide you with a quick overview of what has changed, and to outline the motivation behind the changes. We hope that understanding our motivations will help you better use the new features.

Throughout this document we use the term "Java platform classes" to refer to classes that belong to the Java platform, as specified in the Java API Specification, such as ava.lang.String. These reside in classes.zip or rt.jar. We also use the term "class path" to refer to the search path set by CLASSPATH and -classpath.

Changes to the java.home Property

In the Java 2 Platform, the value of the java.home property is the directory that houses the runtime environment. For the Java 2 SDK, this is the jdk1.3\jre directory. In the case of the Java 2 Runtime Environment, it is the top-level directory, usually C:\Program Files\JavaSoft\JRE\1.3.

In JDK 1.1.x software, the java.home property value referred to the installation directory.

Changes to CLASSPATH and -classpath

The class path has a default value and can be set by -classpath or CLASSPATH. In 1.1, it worked as follows:

  • Class path default - The default value of the class path was (1) the path where Java platform classes resided (classes.zip or rt.jar), and (2) the current working directory (".", read as "dot").
  • CLASSPATH - If the environment variable CLASSPATH was set, then the class path would (1) continue to contain classes.zip or rt.jar just the like default plus (2) the newly set value instead of the current working directory. [See Note 1]
  • -classpath - If the option -classpath <path> was used, then <path> had to explicitly contain both (1) classes.zip or rt.jar and (2) application classes.
This behavior for -classpath was unfortunate because it meant users had to spell out the path to classes.zip:
    C:> java -classpath C:\jdk-path\lib\classes.zip;\app\classes Application
We say unfortunate because this is inherently error-prone; the onus is on the user to ensure that the java command and the classes.zip were from the same JDK version. We ourselves have spent time debugging problems where a 1.1.4 java was trying to run 1.1.3 classes.zip, and this does not work because the native methods do not match.

The good news is that the -classpath option as used in the Java 2 SDK tools has taken on the same meaning as the CLASSPATH environment variable in the Java 2 SDK, so you can now conveniently omit having to spell out the path to Java platform classes:

    C:> java -classpath C:\app\classes Application

Some developers like to temporarily modify individual Java platform classes such as java\util\Vector.class, for purposes such as adding println statements to understand how the class works. In the Java 2 SDK, these users would not be able to use the -classpath option to set the path to Java platform classes, as was possible in 1.1. For such uses, the -Xbootclasspath option must be used in the Java 2 SDK.

Note 1 - Contrary to the bulleted statement above, we have seen users explicitly placing the path to classes.zip in their CLASSPATH environment variable, though this was not at all required.

New Class Search Paths

The earlier section showed that in JDK1.1, there was one search path used to find classes; its value could be set either through the -classpath option or the CLASSPATH environment variable.

In the Java 2 SDK, there are three search paths that are used to find classes:

  1. The first place where java looks for classes is the bootstrap classpath. The value of this path can be examined by calling System.getProperty("sun.boot.class.path"). Note that the prefix "sun." shows that, at least for now, this property is specific to Sun's implementation.
  2. The second place where java looks for classes is the extension directories. The list of directories can be examined by calling System.getProperty("java.ext.dirs").
  3. The third and last place where java looks for classes is the application classpath. The value of this path can be examined by calling System.getProperty("java.class.path").

For a discussion of the new "extension directories" feature mentioned in item 2, refer to javac and The Extensions Framework documentation.

With the Java 2 SDK tools, the argument you specify with the -classpath option is the value of the application classpath; it should contain the path to classes that constitute your application. The bootstrap classpath contains the path to Java platform classes that are contained in a file named rt.jar. This is discussed in the next section.

New Options to Search for Boot Classes: -Xbootclasspath, -bootclasspath
NOTE - For a description of what the leading "X" means in an option, see Standard vs. Non-standard Options.
-Xbootclasspath - As mentioned, the bootstrap classpath contains the path to Java platform classes that are contained in rt.jar. If you need to override the location where Java platform classes are found, you must use the -Xbootclasspath option -- this is a big change from 1.1 where -classpath provided this functionality. Consider this example:
    C:> java -Xbootclasspath:C:\my\bootclasses;C:\jre\lib\rt.jar MyApplication

In this example, the java command searches the paths provided by -Xbootclasspath to find the Java platform classes. It first searches the directory C:\my\bootclasses before searching through rt.jar. If you wanted to add debugging statements to java\util\Vector.class, you would place the modified class file under C:\my\bootclasses. This modified version would be found first, the search would then stop and this version would be loaded.

-bootclasspath - In addition, javac supports a similar option -bootclasspath which can be used to change the platform classes you are compiling against. This is most useful if you need to take advantage of the bug fixes in the Java 2 SDK's javac to compile a 1.1 application. Please refer to that option for detailed instructions on how to do this.

Here are some relevant notes for both options:

  • Avoid overriding Java platform classes - The Java 2 Runtime Environment's re-distribution license does not allow replacing parts of rt.jar. So the -Xbootclasspath option may not be used override parts of rt.jar when you are re-distributing the Runtime Environment with an application. When re-distributing, if there is a need to place your application on the bootclasspath, we recommend using the oldjava command. If you are not using oldjava, then make sure that unmodified rt.jar and (the optional) i18n.jar, are placed first on -Xbootclasspath before your application classes. For example:
        # If app needs to be deployed on -Xbootclasspath, then use:
    C:> java -Xbootclasspath:C:\jre\lib\rt.jar;C:\app\classes Application

    # instead of accidentally overriding rt.jar:
    C:> java -Xbootclasspath:C:\app\classes;C:\jre\lib\rt.jar Application
  • Our implementation of class path searching - The discerning reader is bound to ask "How are all these paths tied together by the implementation of java?" We'll resist the temptatation to say, "the answer is beyond the scope of this document," but instead present a short version of the story.

    The Java 2 Platform introduced the notion of a parent classloader. A well-behaved classloader in the Java 2 Platform always checks to see if its parent can load the class before it uses its own mechanisms (such as paths it might have been asked to look at) to locate a class.

    The Java runtime has three classloaders, where a parent classloader is shown above its child:

          bootstrap classloader
               |
      extension classloader
               |
     application classloader
    The bootstrap classloader searches for classes only on the bootclasspath and on no other path. Likewise, the extension classloader searches in the extensions loaded from extdirs, and the application classloader searches only on the application class path.

    Say, you launch your application with the following command line:

       C:> java -classpath C:\my\classes MyApplication
    This command causes a sequence of steps, giving each classloader in turn a chance to load the application classes. First, the java command asks the application classloader (the one that uses the -classpath value) to load MyApplication. However, rather than trying to load this class, the application classloader asks its parent, the extension classloader, to load the class, which in turn, likewise asks its parent, the bootstrap classloader, to load the class. The bootstrap classloader is built into the virtual machine and has no parent; it attempts to load the class from the bootstrap classpath. Since the bootstrap classloader will not find MyApplication (we did not use -Xbootclasspath to disturb the default path), it allows the extension classloader to try to load the class, which also will not find the class (since we did not use -Djava.ext.dirs options to disturb the default path). Finally, the application classloader ends up finding and loading C:\my\classes\MyApplication.class.

    It is such parenting that produces the order "bootstrap first, extensions next, applications last" when searching for classes. For more information we again refer you to the The Extensions Framework documentation.

oldjava
oldjava

Appletviewer No Longer Uses CLASSPATH

In the Java 2 SDK, appletviewer ignores your CLASSPATH environment setting (which it did not ignore in 1.1). Though this sounds like a drastic change, this is the semantics you really want when testing your applets.

Let us consider an example that worked in JDK 1.1, but will not work with the Java 2 SDK. Say you placed your .html file in a place different from your .class files. In JDK 1.1, you could set your CLASSPATH at the .class files, and appletviewer would pick them up.

   # Foo.class and foo.html are in different directories.
   C:> dir \home\user\htmls \home\user\classes
   C:\home\user\classes:
   Foo.class

   C:\home\user\htmls:
   foo.html

   # Foo.class is NOT in applet's codebase:
   C:> type \home\user\htmls\foo.html
   <applet code=Foo height=100 width=100></applet>

   # Can an applet use a class outside its codebase?
   C:> set CLASSPATH=C:\home\user\classes

   # Works in 1.1.
   C:> appletviewer \home\user\htmls\foo.html

   # ClassNotFoundException with the Java 2 SDK!
   C:> appletviewer \home\user\htmls\foo.html

Why did we change what looks like reasonable behavior? Look more closely. When an applet runs in a browser which does not honor CLASSPATH the way JDK's appletviewer does, you have the same problem that you have when using the Java 2 SDK. The classes referred to by an applet must be either:

  • Java platform classes (such as java.lang.String) which are present in a browser, or,
  • classes that can be downloaded from the applet's codebase.
You cannot, and should not, expect a user of your applet to set their CLASSPATH, and even if they did, their browser might choose to ignore it. Consequently, appletviewer now does the same thing that a browser would.

One nice thing about 1.1 appletviewer honoring CLASSPATH was that you could grab a third party library (say a mailx.jar providing some email related functionality), place it on your CLASSPATH and your applet could refer to the classes in mailx.jar. In order to get the same convenience in the Java 2 SDK, we recommend the use of The Extensions Framework, which, unlike CLASSPATH, is a deployment solution. (CLASSPATH is only a development time solution.)

Standard vs. Non-standard Options

In the Java 2 SDK tools, some options are prefixed with -X whereas others are not. In 1.1, if you needed to set the startup heap size of the virtual machine to 10MB, you would say:

    C:> java -ms10m Application

In the Java 2 SDK, you should express the same option with a -X.

    C:> java -Xms10m Application

The motivation here, as you probably guessed, is that the Java 2 SDK tools distinguishe between options that can apply to all virtual machines, as opposed to options that are specific to a particular virtual machine's implementation. We expect all virtual machines will allow setting a classpath, but we can't expect all virtual machines to support initial heap size.

In the long run, as more compiler and virtual machine vendors support the same standard options, replacing a compiler won't require any changes to your makefiles, or replacing a virtual machine for a server application you launched through a script will need no modifications to the script.

Note however that for backwards compatibility, the Java 2 SDK's java launcher internally translates -ms10m to -Xms10m, so you could still use the old -ms10m option, but we recommend that you do use the newer syntax.

For the current list of standard options, please type:

    C:> java -help
    C:> javac -help

For the current list of non-standard options, please type:

    C:> java -X
    C:> javac -X

A note to vendors -- this separation of command line options into standard and non-standard ones is orthogonal to, and bears no relation with, conformance requirements. As stated earlier, we just hope that users' lives will be eased in the long run if standard options become a de facto standard for options that makes sense.

New Option to Search for Source Files: -sourcepath

In 1.1, javac and javadoc would find both source files and class files in the paths specified in the CLASSPATH environment variable. For example, suppose you compiled foo\bar\FooBar.java and the class FooBar relied on a Helper class, then javac would attempt to find the source file Helper.java in your CLASSPATH:
    C:> dir \tmp\foo\bar\*.java
    \tmp\foo\bar\FooBar.java   \tmp\foo\bar\Helper.java

    # Error because javac can't find Helper.class or Helper.java
    C:> javac \tmp\foo\bar\FooBar.java
    \tmp\foo\bar\FooBar.java:3: Superclass foo.bar.Helper of ... not found.

    C:> set CLASSPATH=\tmp

    # Works because javac snooped in CLASSPATH for source files
    C:> javac \tmp\foo\bar\FooBar.java
In the Java 2 SDK, these tools still look in CLASSPATH for source files unless the -sourcepath <path> option is included -- then it looks only in <path> for source files, and the CLASSPATH is not searched for source files:
    C:> set CLASSPATH=\tmp

    # This still works with the Java 2 SDK:
    C:> javac \tmp\foo\bar\FooBar.java

    # But it doesn't work if you use -sourcepath
    C:> javac -sourcepath . \tmp\foo\bar\FooBar.java
    \tmp\foo\bar\FooBar.java:3: Superclass foo.bar.Helper ... not found.


extcheck - Jar conflict detection utility

extcheck - A utility to detect jar conflicts

extcheck detects version conflicts between a target jar file and currently installed extension jar files.

SYNOPSIS

extcheck [ -verbose ] targetfile.jar

DESCRIPTION

The extcheck utility checks a specified Jar file for title and version conflicts with any extensions installed in the JavaTM 2 SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed.

The extcheck utility compares the Specification-title and Specification-version headers in the manifest of targetfile.jar file against the corresponding headers in all Jar files currently installed in the extension directory. (The extension directory is jre\lib\ext by default.) The extcheck utility compares version numbers in the same way as the method java.lang.Package.isCompatibleWith.

If no conflict is detected, the return code is 0.

If the manifest of any of the jar file in the extensions directory has the same Specification-title and the same or a newer Specification-version number, a non-zero error code is returned. A non-zero error code is also returned if targetfile.jar does not have the Specification-title or Specification-version attributes in its manifest.

OPTIONS
-verbose
Lists Jar files in the extension directory as they are checked. Additionally, manifest attributes of the target jar file and any conflicting jar files are also reported.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.

SEE ALSO

jar


jar-The Java Archive Tool

Combines multiple files into a single JAR archive file.

SYNOPSIS

jar [ options ] [manifest] destination input-file [input-files]

DESCRIPTION

The jar tool is a java application that combines multiple files into a single JAR archive file. jar is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, jar was designed mainly to facilitate the packaging of java applets or applications into a single archive. When the components of an applet or application (.class files, images and sounds) are combined into a single archive, they may be downloaded by a java agent (like a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. jar also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the tar command. A jar archive can be use as a class path entry, whether it is compressed or not.

The 3 types of input files for the jar tool are

  • manifest file (optional)
  • destination jar file
  • files to be archived

Typical usage is

    % jar cf myjarfile *.class
In this example, all the class files in the current directory are placed into the file named "myjarfile". A manifest file is automatically generated by the jar tool and is always the first entry in the jar file. By default, it is named META-INF/MANIFEST.MF. The manifest file is the place where any meta-information about the archive is stored. Refer to the Jar file specification for details about how meta-information is stored in the manifest file.

If you have a pre-existing manifest file that you want the jar tool to use for the new jar archive, you can specify it using the -m option:

    % jar cmf myManifestFile myJarFile *.class

Be sure that any pre-existing manifest file that you use ends with a new line. The last line of a manifest file will not be parsed if it doesn't end with a new line character. Note that when you specify "cfm" instead of "cmf" (i.e., you invert the order of the "m" and "f" options), you need to specify the name of the jar archive first, followed by the name of the manifest file:

    % jar cfm myJarFile myManifestFile *.class

The manifest uses RFC822 ascii format, so it is easy to view and process the manifest-file contents.

Beginning with version 1.3 of the Java 2 SDK, the jar utility supports JarIndex, which allows application class loaders to load classes efficiently from jar files. If an application or applet is bundled into multiple jar files, only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running jar with the new -i option. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the Class-Path attribute of the main jar file's manifest.

% jar -i main.jar

In this example, and INDEX.LIST file is inserted into the META-INF directory of main.jar's manifest.
The application class loader will use the information stored in this file for efficient class loading. Refer to the JarIndex specification for details about how location information is stored in the index file.

Examples of using the Jar tool to operate on Jar files and Jar file manifests are provided below and in the Jar trail of the Java Tutorial.

OPTIONS
You can use an argument beginning with the character '@' to specify a file containing additional arguments, one argument per line. These arguments are inserted into the command line at the position of the '@<filename>' argument.

c
Creates a new or empty archive on the standard output.

t
Lists the table of contents from standard output.

x file
Extracts all files, or just the named files, from standard input. If file is omitted, then all files are extracted; otherwise, only the specified file or files are extracted.

f
The second argument specifies a jar file to process. In the case of creation, this refers to the name of the jar file to be created (instead of on stdout). For table or xtract, the second argument identifies the jar file to be listed or extracted.

v
Generates verbose output on stderr.

m
Includes manifest information from specified pre-existing manifest file. Example use:
jar cmf myManifestFile myJarFile *.class
You can add special-purpose name-value attribute headers to the manifest file that aren't contained in the default manifest. Examples of such headers would be those for vendor information, version information, package sealing, and headers to make JAR-bundled applications executable. See the JAR Files trail in the Java Tutorial and the Runtime Environment's Notes for Developers web page for examples of using the m option.

0
Store only, without using ZIP compression.

M
Do not create a manifest file for the entries.

u
Update an existing JAR file by adding files or changing the manifest. For example,
jar uf foo.jar foo.class
would add the file foo.class to the existing JAR file foo.jar, and
jar umf manifest foo.jar
would update foo.jar's manifest with the information in manifest.
i
Generate index information for the specified jar file and its dependent jar files. For example,
jar -i foo.jar

would generate an INDEX.LIST file in foo.jar which contains location information for each package in foo.jar and all the jar files specified in foo.jar's Class-Path attribute.

-C
Temporaily changes directories during execution of jar command while processing the next argument. For example,
jar uf foo.jar -C classes bar.class
would change to the classes directory and add the bar.class from that directory to foo.jar. The following command,
jar uf foo.jar -C classes . -C bin xyz.class
would change to the classes directory and add to foo.jar all f iles within the classes directory, but not the classes directory itself, and then change to the bin directory and add xyz.class to foo.jar.
-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.
If any of "files" is a directory, then that directory is processed recursively.

EXAMPLES

To add all the files in a particular directory to an archive (overwriting contents if the archive already exists):

C:\WWWROOT\JAVA> DIR
12/09/96  12:20a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/09/96  12:18a                 1,010 0.au
12/09/96  12:18a                   946 1.au
12/09/96  12:18a                 1,039 2.au
12/09/96  12:18a                   993 3.au
12/09/96  12:18a                 1,006 4.au
12/09/96  12:18a                 1,016 5.au
12/09/96  12:18a                 1,048 6.au
12/09/96  12:18a                   980 7.au
12/09/96  12:18a                 1,064 8.au
12/09/96  12:18a                   989 9.au
12/09/96  12:19a                48,072 spacemusic.au
12/09/96  12:19a                   527 at_work.gif
12/09/96  12:19a                12,818 monkey.jpg
12/09/96  12:19a                16,242 Animator.class
12/09/96  12:20a                 3,368 Wave.class
              17 File(s)         91,118 bytes
                            414,983,168 bytes free

C:\WWWROOT\JAVA> jar cvf bundle.jar *
adding: 0.au
adding: 1.au
adding: 2.au
adding: 3.au
adding: 4.au
adding: 5.au
adding: 6.au
adding: 7.au
adding: 8.au
adding: 9.au
adding: Animator.class
adding: Wave.class
adding: at_work.gif
adding: monkey.jpg
adding: spacemusic.au
C:\WWWROOT\JAVA>
If you already have subdirectories for images, audio files and classes in your html directory, you might jar up each directory into a single jar file:
C:\WWWROOT\JAVA> DIR
12/09/96  12:11a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/03/96  06:54p        <DIR>          audio
12/06/96  02:02p        <DIR>          images
12/09/96  12:10a        <DIR>          classes
               6 File(s)        207,360 bytes
                            414,983,168 bytes free

C:\WWWROOT\JAVA> jar cvf bundle.jar audio classes images
adding: audio/1.au
adding: audio/2.au
adding: audio/3.au
adding: audio/spacemusic.au
adding: classes/Animator.class
adding: classes/Wave.class
adding: images/monkey.jpg
adding: images/at_work.gif
C:\WWWROOT\JAVA\Animator> dir
12/09/96  12:11a        <DIR>          .
12/09/96  12:17a        <DIR>          ..
12/09/96  12:11a               207,360 bundle.jar
12/03/96  06:54p        <DIR>          audio
12/06/96  02:02p        <DIR>          images
12/09/96  12:10a        <DIR>          classes
               6 File(s)        207,360 bytes
                            414,983,168 bytes free

C:\WWWROOT\JAVA\Animator>
You can then see the entry names in the jarfile using the jar tool and the "t" option:
C:\WWWROOT\JAVA\Animator> jar tf bundle.jar
META-INF/MANIFEST.MF
audio/1.au
audio/2.au
audio/3.au
audio/spacemusic.au
classes/Animator.class
classes/Wave.class
images/monkey.jpg
images/at_work.gif
C:\WWWROOT\JAVA\Animator>
Enumerating verbosely (with the "v" option) will tell you more information about the files in the archive, such as their size and last modified date:
C:\WWWROOT\JAVA\Animator> jar tvf bundle.jar
   145 Thu Aug 01 22:27:00 PDT 1996 META-INF/MANIFEST.MF
   946 Thu Aug 01 22:24:22 PDT 1996 audio/1.au
  1039 Thu Aug 01 22:24:22 PDT 1996 audio/2.au
   993 Thu Aug 01 22:24:22 PDT 1996 audio/3.au
 48072 Thu Aug 01 22:24:23 PDT 1996 audio/spacemusic.au
 16711 Thu Aug 01 22:25:50 PDT 1996 classes/Animator.class
  3368 Thu Aug 01 22:26:02 PDT 1996 classes/Wave.class
 12809 Thu Aug 01 22:24:48 PDT 1996 images/monkey.jpg
   527 Thu Aug 01 22:25:20 PDT 1996 images/at_work.gif
C:\WWWROOT\JAVA\Animator>

If you bundled a stock trade application(applet) into the following jar files:

main.jar buy.jar sell.jar other.jar
and you specified in the Class-Path attribute in main.jar's manifest as:
Class-Path: buy.jar sell.jar other.jar
Then you can use the -i option to speed up your application's class loading time:
$ jar -i main.jar
an INDEX.LIST file is inserted to the META-INF directory which will enable the application class loader to download the right jar files when it is searching for classes or resources.

SEE ALSO

The Jar Overview
The Jar File Specification
The JarIndex Spec
Java Tutorial on the Java Software web site.


jarsigner - JAR Signing and Verification Tool

Generates signatures for Java ARchive (JAR) files, and verifies the signatures of signed JAR files.

SYNOPSIS

jarsigner [ options ] jar-file alias
jarsigner -verify [ options ] jar-file

DESCRIPTION

The jarsigner tool is used for two purposes:
  1. to sign Java ARchive (JAR) files, and

  2. to verify the signatures and integrity of signed JAR files.

The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution. A tool named jar enables developers to produce JAR files. (Technically, any zip file can also be considered a JAR file, although when created by jar or processed by jarsigner, JAR files also contain a META-INF/MANIFEST.MF file.)

A digital signature is a string of bits that is computed from some data (the data being "signed") and the private key of an entity (a person, company, etc.). Like a handwritten signature, a digital signature has many useful characteristics:

  • Its authenticity can be verified, via a computation that uses the public key corresponding to the private key used to generate the signature.

  • It cannot be forged, assuming the private key is kept secret.

  • It is a function of the data signed and thus can't be claimed to be the signature for other data as well.

  • The signed data cannot be changed; if it is, the signature will no longer verify as being authentic.

In order for an entity's signature to be generated for a file, the entity must first have a public/private key pair associated with it, and also one or more certificates authenticating its public key. A certificate is a digitally signed statement from one entity, saying that the public key of some other entity has a particular value.

jarsigner uses key and certificate information from a keystore to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. The keytool utility is used to create and administer keystores.

jarsigner uses an entity's private key to generate a signature. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file. jarsigner can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file).

At this time, jarsigner can only sign JAR files created by the JDK jar tool or zip files. (JAR files are the same as zip files, except they also have a META-INF/MANIFEST.MF file. Such a file will automatically be created when jarsigner signs a zip file.)

The default jarsigner behavior is to sign a JAR (or zip) file. Use the -verify option to instead have it verify a signed JAR file.

Compatibility with JDK 1.1

The keytool and jarsigner tools completely replace the javakey tool provided in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them.

The new keystore architecture replaces the identity database that javakey created and managed. There is no backwards compatibility between the keystore format and the database format used by javakey in 1.1. However,

  • It is possible to import the information from an identity database into a keystore, via the keytool -identitydb command.

  • jarsigner can sign JAR files also previously signed using javakey.

  • jarsigner can verify JAR files signed using javakey. Thus, it recognizes and can work with signer aliases that are from a JDK 1.1 identity database rather than a Java 2 SDK keystore.
The following table explains how JAR files that were signed in JDK 1.1.x are treated in the Java 2 SDK.

JAR File Type

Identity in 1.1 database

Trusted Identity imported into Java 2 Platform keystore from 1.1 database (4)

Policy File grants privileges to Identity/Alias

Privileges Granted

Signed JAR

NO

NO

NO

Default privileges granted to all code.

Unsigned JAR

NO

NO

NO

Default privileges granted to all code.

Signed JAR

NO

YES

NO

Default privileges granted to all code.

Signed JAR

YES/Untrusted

NO

NO

Default privileges granted to all code. (3)

Signed JAR

YES/Untrusted

NO

YES

Default privileges granted to all code. (1,3)

Signed JAR

NO

YES

YES

Default privileges granted to all code plus privileges granted in policy file.

Signed JAR

YES/Trusted

YES

YES

Default privileges granted to all code plus privileges granted in policy file. (2)

Signed JAR

YES/Trusted

NO

NO

All privileges

Signed JAR

YES/Trusted

YES

NO

All privileges (1)

Signed JAR

YES/Trusted

NO

YES

All privileges (1)

Notes:

  1. If an identity/alias is mentioned in the policy file, it must be imported into the keystore for the policy file to have any effect on privileges granted.

  2. The policy file/keystore combination has precedence over a trusted identity in the identity database.

  3. Untrusted identities are ignored in the Java 2 SDK.

  4. Only trusted identities can be imported into Java 2 SDK keystores.

Keystore Aliases

All keystore entities are accessed via unique aliases.

When using jarsigner to sign a JAR file, you must specify the alias for the keystore entry containing the private key needed to generate the signature. For example, the following will sign the JAR file named "MyJarFile.jar", using the private key associated with the alias "duke" in the keystore named "mystore" in the "working" directory on the C drive. Since no output file is specified, it overwrites MyJarFile.jar with the signed JAR file.

    jarsigner -keystore C:\working\mystore -storepass myspass
      -keypass dukekeypasswd MyJarFile.jar duke

Keystores are protected with a password, so the store password (in this case "myspass") must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password (in this case "dukekeypasswd") must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password.

Keystore Location

jarsigner has a -keystore option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. Given user name uName, the "user.home" property value defaults to
C:\Winnt\Profiles\uName on multi-user Windows NT systems
C:\Windows\Profiles\uName on multi-user Windows 95 systems
C:\Windows on single-user Windows 95 systems
Thus, if the user name is "cathy", "user.home" defaults to
C:\Winnt\Profiles\cathy on multi-user Windows NT systems
C:\Windows\Profiles\cathy on multi-user Windows 95 systems

Keystore Implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, there are two command-line tools that make use of keystore implementations (keytool and jarsigner), and also a GUI-based tool named Policy Tool. Since KeyStore is publicly available, JDK users can write additional security applications that use it.

There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API.) Thus, to provide a keystore implementation, clients must implement a provider and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture.

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

keytool works on any file-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The jarsigner and policytool tools, on the other hand, can read a keystore from any location that can be specified using a URL.

For jarsigner and keytool, you can specify a keystore type at the command line, via the -storetype option. For Policy Tool, you can specify a keystore type via the "Change Keystore" command in the Edit menu.

If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the JDK security properties directory, java.home\lib\security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Each tool gets the keystore.type value and then examines all the currently-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type (as specified in the keystore.type property):

    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file:

    keystore.type=jks

To have the tools utilize a keystore implementation other than the default, change that line to specify a different keystore type.

For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to

    keystore.type=pkcs12
Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".

Supported Algorithms

At this time, jarsigner can sign a JAR file using either

  • DSA (Digital Signature Algorithm) with the SHA-1 digest algorithm, or

  • the RSA algorithm with the MD5 digest algorithm.

That is, if the signer's public and private keys are DSA keys, jarsigner will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, jarsigner will attempt to sign the JAR file using the "MD5withRSA" algorithm. This is only possible if there is a statically installed provider supplying an implementation for the "MD5withRSA" algorithm. (There is always a "SHA1withDSA" algorithm available, from the default "SUN" provider.)

The Signed JAR File

When jarsigner is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory:

  • a signature file, with a .SF extension, and

  • a signature block file, with a .DSA extension.
The base file names for these two files come from the value of the -sigFile option. For example, if the option appears as
  -sigFile MKSIGN
the files are named "MKSIGN.SF" and "MKSIGN.DSA".

If no -sigfile option appears on the command line, the base file name for the .SF and .DSA files will be the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. Legal characters include letters, digits, underscores, and hyphens.

The Signature (.SF) File

A signature file (the .SF file) looks similar to the manifest file that is always included in a JAR file when jarsigner is used to sign the file. That is, for each source file included in the JAR file, the .SF file has three lines, just as in the manifest file, listing the following:
  • the file name,

  • the name of the digest algorithm used (SHA), and

  • a SHA digest value.
In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. In the .SF file, on the other hand, the digest value for a given source file is the hash of the three lines in the manifest file for the source file.

The signature file also, by default, includes a header containing a hash of the whole manifest file. The presence of the header enables verification optimization, as described in JAR File Verification.

The Signature Block (.DSA) File

The .SF file is signed and the signature is placed in the .DSA file. The .DSA file also contains, encoded inside it, the certificate or certificate chain from the keystore which authenticates the public key corresponding to the private key used for signing.

JAR File Verification

A successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps:

  1. Verify the signature of the .SF file itself.

    That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with.

  2. Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest.

    The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step.

    If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File).

    One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the jar tool) after the signature (and thus the .SF file) was generated. When the jar tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file.

  3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest, and then compare the result with the digest for this file in the manifest section. The digests should be the same, or verification fails.

If any serious verification failures occur during the verification process, the process is stopped and a security exception is thrown. It is caught and displayed by jarsigner.

Multiple Signatures for a JAR File

A JAR file can be signed by multiple people simply by running the jarsigner tool on the file multiple times, specifying the alias for a different person each time, as in:
  jarsigner myBundle.jar susan
  jarsigner myBundle.jar kevin
When a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. Thus, in the example above, the output JAR file includes files with the following names:
  SUSAN.SF
  SUSAN.DSA
  KEVIN.SF
  KEVIN.DSA
Note: It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1.1 javakey tool and others by jarsigner. That is, jarsigner can be used to sign JAR files already previously signed using javakey.

OPTIONS

The various jarsigner options are listed and described below. Note:

  • All option names are preceded by a minus sign (-).

  • The options may be provided in any order.

  • Items in italics (option values) represent the actual values that must be supplied.

  • The -keystore, -storepass, -keypass, -sigfile , and -signedjar options are only relevant when signing a JAR file, not when verifying a signed JAR file. Similarly, an alias is only specified on the command line when signing a JAR file.

-keystore url
Specifies the URL that tells the keystore location. This defaults to the file .keystore in the user's home directory, as determined by the "user.home" system property.

A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default).

A keystore is not required when verifying, but if one is specified, or the default exists, and the -verbose option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore.

Note: the -keystore argument can actually be a file name (and path) specification rather than a URL, in which case it will be treated the same as a "file:" URL. That is,

  -keystore filePathAndName
is treated as equivalent to
  -keystore file:filePathAndName

-storetype storetype
Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

-storepass password
Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a -storepass option is not provided at the command line, the user is prompted for the password.

Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

-keypass password
Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line. The password is required when using jarsigner to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it.

Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

-sigfile file
Specifies the base file name to be used for the generated .SF and .DSA files. For example, if file is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META-INF" directory of the signed JAR file.

The characters in file must come from the set "a-zA-Z0-9_-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names.

If no -sigfile option appears on the command line, the base file name for the .SF and .DSA files will be the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name.

-signedjar file
Specifies the name to be used for the signed JAR file.

If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file.

-verify
If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)"

It is possible to verify JAR files signed using either jarsigner or the JDK 1.1 javakey tool, or both.

For further information on verification, see JAR File Verification.

-certs
If this appears on the command line, along with the -verify and -verbose options, the output includes certificate information for each signer of the JAR file. This information includes

  • the name of the type of certificate (stored in the .DSA file) that certifies the signer's public key

  • if the certificate is an X.509 certificate (more specifically, an instance of java.security.cert.X509Certificate): the distinguished name of the signer

The keystore is also examined. If no keystore value is specified on the command line, the default keystore file (if any) will be checked. If the public key certificate for a signer matches an entry in the keystore, then the following information will also be displayed:

  • in parentheses, the alias name for the keystore entry for that signer. If the signer actually comes from a JDK 1.1 identity database instead of from a keystore, the alias name will appear in brackets instead of parentheses.

-verbose
If this appears on the command line, it indicates "verbose" mode, which causes jarsigner to output extra information as to the progress of the JAR signing or verification.

-internalsf
In the past, the .DSA (signature block) file generated when a JAR file was signed used to include a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default doesn't contain a copy of the .SF file anymore. But if -internalsf appears on the command line, the old behavior is utilized. This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.

-sectionsonly
If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does not include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File .

By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file.

For further information, see JAR File Verification.

This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.

-provider provider-class-name
Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.

-J javaoption
Passes through the specified javaoption string directly to the Java interpreter. (jarsigner is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

EXAMPLES

Signing a JAR File

Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory on the C drive. Suppose the keystore password is "myspass" and the password for jane's private key is "j638klm". You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar":

    jarsigner -keystore C:\working\mystore -storepass myspass
      -keypass j638klm -signedjar sbundle.jar bundle.jar jane

Note that there is no -sigfile specified in the command above, so the generated .SF and .DSA files to be placed in the signed JAR file will have default names based on the alias name. That is, they will be named JANE.SF and JANE.DSA.

If you want to be prompted for the store password and the private key password, you could shorten the above command to

    jarsigner -keystore C:\working\mystore
      -signedjar sbundle.jar bundle.jar jane
If the keystore to be used is the default keystore (the one named ".keystore" in your home directory), you don't need to specify a keystore, as in:
    jarsigner -signedjar sbundle.jar bundle.jar jane
Finally, if you want the signed JAR file to simply overwrite the input JAR file (bundle.jar), you don't need to specify a -signedjar option:
    jarsigner bundle.jar jane

Verifying a Signed JAR File

To verify a signed JAR file, that is, to verify that the signature is valid and the JAR file has not been tampered with, use a command such as the following:
    jarsigner -verify sbundle.jar

If the verification is successful,

    jar verified.
is displayed. Otherwise, an error message appears.

You can get more information if you use the -verbose option. A sample use of jarsigner with the -verbose option is shown below, along with sample output:

    jarsigner -verify -verbose sbundle.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
    smk    849 Fri Sep 26 16:12:46 PDT 1997 test.class

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.

Verification with Certificate Information

If you specify the -certs option when verifying, along with the -verify and -verbose options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (iff it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example,
    jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF
          1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA
    smk   2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class

      X.509, CN=Test Group, OU=Java Software, O=Sun Microsystems, L=CUP, S=CA, C=US (javatest)
      X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore

    jar verified.
If the certificate for a signer is not an X.509 certificate, there is no distinguished name information. In that case, just the certificate type and the alias are shown. For example, if the certificate is a PGP certificate, and the alias is "bob", you'd get
      PGP, (bob)

Verification of a JAR File that Includes Identity Database Signers

If a JAR file has been signed using the JDK 1.1 javakey tool, and thus the signer is an alias in an identity database, the verification output includes an "i" symbol. If the JAR file has been signed by both an alias in an identity database and an alias in a keystore, both "k" and "i" appear.

When the -certs option is used, any identity database aliases are shown in square brackets rather than the parentheses used for keystore aliases. For example:

    jarsigner -keystore /working/mystore -verify -verbose -certs writeFile.jar

           198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
           199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
          1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
           199 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.SF
          1013 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.DSA
   smki   2752 Fri Sep 26 16:12:30 PDT 1997 writeFile.html

      X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
      X.509, CN=Duke, OU=Java Software, O=Sun, L=cup, S=ca, C=us [duke]

      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore
      i = at least one certificate was found in identity scope

    jar verified.
Note that the alias "duke" is in brackets to denote that it is an identity database alias, not a keystore alias.

SEE ALSO

  • jar tool documentation

  • keytool tool documentation

  • the Security trail of the Java Tutorial for examples of the use of the jarsigner tool


java - the Java application launcher

  • Synopsis
  • Description
  • The Client VM and the Classic VM
  • Java and OldJava
  • Using JIT Compilers
  • Options
  • See Also

SYNOPSIS

    java [ options ] class [ argument ... ]
    java [ options ] -jar file.jar [ argument ... ]
    javaw [ options ] class [ argument ... ]
    javaw [ options ] -jar file.jar [ argument ... ]
    oldjava [ options ] class [ argument ... ]
    oldjavaw [ options ] class [ argument ... ]
options
Command-line options.
class
Name of the class to be invoked.
file.jar
Name of the jar file to be invoked. Used only with -jar.
argument
Argument passed to the main function.

DESCRIPTION
The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method. The method declaration must look like the following:
    public static void main(String args[])
The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argument is the name of a JAR archive containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header.

The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.

Non-option arguments after the class name or JAR file name are passed to the main function.

The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.

The Client VM and the Classic VM

The Java 2 SDK and Java 2 Runtime Environment contain two implementations of the Java virtual machine.

The Java HotSpotTM Client VM
The Java HotSpot Client VM is the default virtual machine. Its use of Java HotSpot technology gives it superior performance to that of the Classic VM. Unless special command-line options are used to invoke the Classic VM instead (see below), java will always launch an application to run on the Client VM.

The Java 2 Classic VM
The Java 2 Classic VM is essentially the same virtual machine implementation as in version 1.2 of the Java 2 SDK. It may be invoked by using the -classic command-line option, as in this example:

java -classic MyApp
The Java 2 Classic VM is included only in the Java 2 SDK. It is not included in the Java 2 Runtime Environment. The -classic option will not work with the Java 2 Runtime Environment.

JAVA AND OLDJAVA
These are the differences between java and oldjava
  • The oldjava launcher does not support the extension mechanism. Extension packages can still be used as class and resource archives.

  • The oldjava launcher uses the bootstrap class loader for all classes, while the java launcher uses the bootstrap class loader only for bootstrap classes. This allows programming techniques that are incompatible with the base class loader.

  • With java, the -classpath and -cp options specify a search path for user classes, and cannot be used to specify locations for bootstrap classes. With oldjava the -classpath and -cp options specify locations for all classes, including bootstrap classes.

    Note that java and oldjava do not differ in their use of the CLASSPATH environment variable. Unless overridden by -classpath or -cp, CLASSPATH always specifies the location of user classes, but says nothing about the bootstrap classes.

  • The oldjava launcher supports all the Java 2 platform security features. With oldjava, however, classes loaded from the class path will not have a protection domain and will therefore have all permissions which is true only for bootstrap classes with the java launcher.
This command using oldjava
oldjava -classpath <path> ...
is equivalent to this command using java
java -Xbootclasspath:<path> -Djava.ext.dirs= ...
where in both cases <path> contains the file rt.jar. (See the SDK File Structure document for a description of rt.jar and its location in the SDK software.)

USING JIT COMPILERS

By default, the Java application launcher runs applications on the Java HotSpot Client VM, which is implemented with Java HotSpot technology. Just-in-time (JIT) compilers cannot be used in conjunction with Java HotSpot Client VM because the Java HotSpot architecture makes use of its own optimizing compiler.

Applications can optionally be launched using the Java 2 Classic VM by using the -classic option. (The Java 2 Classic VM is included only in the Java 2 SDK. It is not included in the Java 2 Runtime Environment, and the -classic option will not work with the Java 2 Runtime Environment.)

java -classic MyApp
In this mode, the JAVA_COMPILER environment variable can be used to specify a JIT compiler to use in conjunction with the classic VM. The .dll files for JIT compilers should be located in the directory jre\bin in the SDK, and in the bin directory in the Java 2 Runtime Environment). If the JIT compiler's file is named foo.dll, for example, setting JAVA_COMPILER equal to "foo", would cause the Java launcher to invoke the foo JIT compiler when running applications in classic mode. A JIT compiler may also be invoked when launching an application on the classic VM by setting the java.compiler property with a command-line switch:
java -classic -Djava.compiler=foo MyApp

OPTIONS
The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the default Java HotSpot Client VM provides a set of non-standard options. The non-standard options are subject to change in future releases. The Java 2 Classic VM, invoked by using the -classic option, has a different set of non-standard options which are described at Non-Standard Options of the Classic VM. The Java 2 Classic VM is included only in the Java 2 SDK. It is not included in the Java 2 Runtime Environment. The -classic option will not work with the Java 2 Runtime Environment.

Standard Options
-classpath classpath
-cp classpath
Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.

Used with java or javaw, -classpath or -cp only specify the class path for user classes. Used with oldjava or oldjavaw, -classpath or -cp specify the class path for both user classes and bootstrap classes.

If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).

For more information on class paths, see Setting the Class Path.

-D property=value
Set a system property value. If value is a string that contains spaces, you must enclose the string in double quotes:
        java -Dfoo="some string" SomeClass
-jar
Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests.

When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.

The oldjava and oldjavaw tools do not support the -jar option.

-verbose
-verbose:class
Display information about each class loaded.

-verbose:gc
Report on each garbage collection event.

-verbose:jni
Report information about use of native methods and other Java Native Interface activity.

-version
Display version information and exit.

-showversion
Display version information and continue.

-?
-help
Display usage information and exit.

-X
Display information about non-standard options and exit.

Non-Standard Options
-Xmixed
Operate in mixed-only mode (the default). This means that heavily used program segments (hot spots) are compiled to native code, and the remaining bytecodes are executed by a bytecode interpreter. This mode provides the fullest performance benefit offered by the Java HotSpot Client VM.

-Xint
Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot Client VM's adaptive compiler will not be present in this mode.

-Xdebug
Start with the debugger enabled. Refer to jdb description for more details and an example.

-Xbootclasspath:bootclasspath
Specify a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xbootclasspath/a:path
Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.

-Xbootclasspath/p:path
Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

-Xfuture
Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.

-Xnoclassgc
Disable class garbage collection.

-Xincgc
Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will eliminate occasional garbage-collection pauses during program execution. However, it can lead to a roughly 10% decrease in overall GC performance.

-Xms n
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
       -Xms6291456
       -Xms6144k
       -Xms6m

-Xmx n
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
       -Xmx83886080
       -Xmx81920k
       -Xmx80m

-Xprof
Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.

-Xrunhprof[:help][:<suboption>=<value>,...]
Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs . Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.

-Xrs
Reduces usage of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.

In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.

The JVM watches for console control events to implement shutdown hooks for abnormal JVM termination. Specifically, the JVM registers a console control handler which begins shutdown-hook processing and returns TRUE for CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.

The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses CTRL_BREAK_EVENT to perform thread dumps.

If the JVM is run as a service (for example, the servlet engine for a web server), it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown since the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs command-line option has been added beginning with J2SE 1.3.1. When the -Xrs option is used on Sun's JVM, the JVM does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT.

There are two consequences of specifying -Xrs:

  • Ctrl-Break thread dumps are not available.
  • User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.

\WARNING: Flags -Xdebug and -Xint are mutually exclusive. No more than one of those options should be used on a java command line.

SEE ALSO
  • javac - the Java programming language compiler
  • jdb - Java Application Debugger
  • javah - C Header and Stub File Generator
  • jar - JAR Archive Tool
  • The Java Extensions Framework
  • Security Features.


Java 2 SDK File Structure

Java 2 SDK and Runtime Environment File Structure

 SDK Tools

This document gives an overview of the Java 2 SDK, Standard Edition, directories and the files they contain. This page may also be used as a reference for the file structure of the Java 2 Runtime Environment. To see the file structure of the Runtime Environment, just look at the description of the contents of the SDK's jre directory on this page. The file structure of the Java 2 Runtime Environment is identical to that of the SDK's jre directory.

Development Files and Directories

This section describes the files and directories that are required to develop apps for the Java platform. (The directories that are not required include demos, source code, and C header files. They are discussed in the following section, Additional Files and Directories.) The following chart shows the most important directories:

                     jdk1.3
        ___________|____________________
       |           |                    |
      bin         lib                  jre
       |           |          __________|_____________________
   java.exe    tools.jar     |                                |
   javac.exe   dt.jar       bin                              lib
   javap.exe            _____|____ __________         ________|_______ ________
   javah.exe           |          |          |       |        |       |        |
   javadoc.exe     java.exe    classic    hotspot  rt.jar    ext  security  applet
                   java.dll       |          |     i18n.jar
                   awt.dll     jvm.dll    jvm.dll

Assuming the SDK software is installed at c:\jdk1.3, here are some of the most important directories:

c:\jdk1.3
The root directory of the SDK software installation. Contains copyright, license, and README files. Also contains src.jar, the archive of source code for the Java 2 platform.
c:\jdk1.3\bin
The executable files for the development tools contained in the Java Development Kit. The PATH environment variable should contain an entry for this directory. For more information on the tools, see the SDK Tools.

c:\jdk1.3\lib
Files used by the development tools. These include tools.jar, which contains non-core classes for support of the tools and utilities in the SDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for the application.

c:\jdk1.3\jre
The root directory of the Java runtime environment used by the SDK development tools. The runtime environment is an implementation of the Java 2 platform. This is the directory represented by the java.home system property.

c:\jdk1.3\jre\bin
Executable files and DLLs for tools and libraries used by the Java platform. The executable files are identical to files in /jdk1.3/bin. The java launcher tool serves as an application launcher, in place of the old jre tool that shipped with 1.1 versions of the SDK software. This directory does not need to be in the PATH environment variable.

c:\jdk1.3\jre\bin\classic
Contains the DLL files used by the Java 2 Classic Virtual Machine. These files are present only in the Java 2 SDK. They are not included with the Java 2 Runtime Environment.

c:\jdk1.3\jre\bin\hotspot
Contains the DLL files used by the Java HotSpotTM Client Virtual Machine, which is implemented with Java HotSpot technology.

c:\jdk1.3\jre\lib
Code libraries, property settings, and resource files used by the Java runtime environment. Includes:
  • rt.jar -- the bootstrap classes (the RunTime classes that comprise the Java platform's core API).
  • i18n.jar -- the character-conversion classes and other files associated with internationalization and localization.
Aside from the ext subdirectory (described below) there are several additional resource subdirectories not described here.

c:\jdk1.3\jre\lib\ext
Default installation directory for Extensions to the Java platform. This is where the JavaHelp jar file goes when it is installed, for example.
c:\jdk1.3\jre\lib\security
Contains files used for security management. These include the security policy (java.policy) and security properties (java.security) files.

c:\jdk1.3\jre\lib\applet
Jar files containing support classes for applets can be placed in the lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be pre-loaded from the local file system by the applet class loader, providing the same protections as if they had been downloaded over the net.

Additional Files and Directories

This section describes the directory structure for the demos, Java source code, and C header files. Here is the directory structure:

                              jdk1.3
                 ___________|__________ __________
                |           |          |          |
              demo      include  include-old   src.jar
             ___|___ _________ __________
            |       |         |          |
          applets  jfc       jpda      sound

The additional directories shown above are:

c:\jdk1.3\src.jar
Archive containing source code for the Java 2 platform.

c:\jdk1.3\demo
Examples, with source code, that show you how to program for the Java platform.

c:\jdk1.3\demo\applets
Applets that can be used on a Web page.

c:\jdk1.3\demo\jfc
Examples that use Java 2DTM and JFC\Swing functionality.

c:\jdk1.3\demo\jpda
Examples of using the Java Platform Debugging Architecture. Includes source code for the javadt and jdb utilities.

c:\jdk1.3\demo\sound
Contains Java Sound demos with source code.

c:\jdk1.3\include
C-language header files that support native-code programming using the Java Native Interface and the Java Virtual Machine Debugger Interface.

c:\jdk1.3\include-old
Header files that support native-code programming using older interfaces. These header files are provided only for backward-compatibility. These interfaces are deprecated, unsupported and not available on all Java virtual machines.


javac - Java programming language compiler

  • Synopsis
  • Description
  • Searching for Types
  • File List
  • Options
  • Examples
  • See Also

SYNOPSIS

javac [ options ] [ sourcefiles ] [ @files ]
oldjavac [ options ] [ sourcefiles ] [ @files ]
Arguments may be in any order.
options
Command-line options.
sourcefiles
One or more source files to be compiled (such as MyClass.java).
@files
One or more files that list source files.

DESCRIPTION
The javac tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files.

There are two ways to pass source code file names to javac:

  • For a small number of source files, simply list the file names on the command line.

  • For a large number of source files, list the the file names in a file, separated by blanks or line breaks. Then use the list file name on the javac command line, preceded by an @ character.
Source code file names must have .java suffixes, class file names must have .class suffixes, and both source and class files must have root names that identify the class. For example, a class called MyClass would be written in a source file called MyClass.java and compiled into a bytecode class file called MyClass.class.

Inner class definitions produce additional class files. These class files have names combining the inner and outer class names, such as MyClass$MyInnerClass.class.

You should arrange source files in a directory tree that reflects their package tree. For example, if you keep all your source files in \workspace, the source code for com.mysoft.mypack.MyClass should be in \workspace\com\mysoft\mypack\MyClass.java.

By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with -d (see Options, below).

SEARCHING FOR TYPES
When compiling a source file, the compiler often needs information about a type it does not yet recognize. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.

For example, when you subclass java.applet.Applet, you are also using Applet's ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.awt.Object.

When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches first in the bootstrap and extension classes, then in the user class path. The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path). If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files. You can specify different bootstrap or extension classes with the -bootclasspath and -extdirs options; see Cross-Compilation Options below.

A successful type search may produce a class file, a source file, or both. Here is how javac handles each situation:

  • Search produces a class file but no source file: javac uses the class file.

  • Search produces a source file but no class file: javac compiles the source file and uses the resulting class file.

  • Search produces both a source file and a class file: javac determines whether the class file is out of date. If the class file is out of date, javac recompiles the source file and uses the updated class file. Otherwise, javac just uses the class file.

    By default, javac considers a class file out of date only if it is older than the source file. (The -Xdepend option specifies a slower but more reliable procedure.)

Note that javac can silently compile source files not mentioned on the command line. Use the -verbose option to trace automatic compilation.

FILE LIST

To shorten or simplify the javac command, you may specify one or more files that themselves contain one filename per line. On the command line, use the '@' character with the filename to specify it as a file list. When javac encounters an argument beginning with the character `@', it operates on the filenames in that file as if they had been on the command line. This enables you to overcome the command-line length limitation of Windows.

For example, you can list all of the source file names in a file named sourcefiles. This file might look like:

     MyClass1.java
     MyClass2.java
     MyClass3.java
You could then run the compiler with:
     C:> javac @sourcefiles

OPTIONS
The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non-standard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Non-standard options begin with -X.

Standard Options
-classpath classpath
Set the user class path, overriding the user class path in the CLASSPATH environment variable. If neither CLASSPATH or -classpath is specified, the user class path consists of the current directory. See Setting the Class Path for more details.

If the -sourcepath option is not specified, the user class path is searched for source files as well as class files.

-d directory
Set the destination directory for class files. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d c:\myclasses and the class is called com.mypackage.MyClass, then the class file is called c:\myclasses\com\mypackage\MyClass.class.

If -d is not specified, javac puts the class file in the same directory as the source file.

Note that the directory specified by -d is not automatically added to your user class path.

-deprecation
Show a description of each use or override of a deprecated member or class. Without -deprecation, javac shows the names of source files that use or override deprecated members or classes.

-encoding
Set the source file encoding name, such as EUCJIS/SJIS. If -encoding is not specified, the platform default converter is used.

-g
Generate all debugging information, including local variables. By default, only line number and source file information is generated.

-g:none
Do not generate any debugging information.

-g:{keyword list}
Generate only some kinds of debugging information, specified by a comma separated list of keywords. Valid keywords are:
source
Source file debugging information
lines
Line number debugging information
vars
Local variable debugging information

-nowarn
Disable warning messages.

-O
Note: the -O option does nothing in the current implementation of javac and oldjavac.
Optimize code for execution time. Using the -O option may slow down compilation, produce larger class files, and make the program difficult to debug.

Prior to the Java 2 SDK, the -g and -O options of javac could not be used togther. As of the Java 2 SDK, v1.2, you can combine -g and -O, but you may get suprising results, such as missing variables or relocated or missing code. -O no longer automatically turns on -depend or turns off -g.

-sourcepath sourcepath
Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by semicolons (;) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name.

Note that classes found through the classpath are subject to automatic recompilation if their sources are found.

-verbose
Verbose output. This includes information about each class loaded and each source file compiled.

Cross-Compilation Options

By default, classes are compiled against the bootstrap and extension classes of the JDK that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use -bootclasspath and -extdirs when cross-compiling; see Cross-Compilation Example below.

-target version
Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with both 1.1 VMs and VMs of the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:

1.1
Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK. This is the default.
1.2
Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs.
1.3
Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs.

-bootclasspath bootclasspath
Cross-compile against the specified set of boot classes. As with the user class path, boot class path entries are separated by semicolons (;) and can be directories, JAR archives, or ZIP archives.

-extdirs directories
Cross-compile against the specified extension directories. Directories is a semicolon-separated list of directories. Each JAR archive in the specified directories is searched for class files.

Non-Standard Options
These options are supported only by oldjavac. They are not supported by the new javac compiler.

-X
Display information about non-standard options and exit.

-Xdepend
Recursively search all reachable classes for more recent source files to recompile. This option will more reliably discover classes that need to be recompiled, but can slow down the compilation process drastically.

-Xstdout
Send compiler messages to System.out. By default, compiler messages go to System.err.

-Xverbosepath
Describe how paths and standard extensions were searched to find source and class files.

The -J option

Both javac and oldjavac support the -J option.
-Joption
Pass option to the java launcher called by javac. For example, -J-Xms48m sets the startup memory to 48 megabytes. Although it does not begin with -X, it is not a `standard option' of javac. It is a common convention for -J to pass options to the underlying VM executing applications written in Java.

Note that CLASSPATH, -classpath, -bootclasspath, and -extdirs do not specify the classes used to run javac. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the -J option to pass through options to the underlying java launcher.

EXAMPLES

Compiling a Simple Program
One source file, Hello.java, defines a class called greetings.Hello. The greetings directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with -d.
C:> dir
greetings/
C:> dir greetings
Hello.java
C:> cat greetings\Hello.java
package greetings;

public class Hello {
    public static void main(String[] args) {
        for (int i=0; i < args.length; i++) {
            System.out.println("Hello " + args[i]);
        }
    }
}
C:> javac greetings\Hello.java
C:> dir greetings
Hello.class   Hello.java
C:> java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone

Compiling Multiple Source Files
This example compiles all the source files in the package greetings.
C:> dir
greetings\
C:> dir greetings
Aloha.java         GutenTag.java      Hello.java         Hi.java
C:> javac greetings\*.java
C:> dir greetings
Aloha.class         GutenTag.class      Hello.class         Hi.class
Aloha.java          GutenTag.java       Hello.java          Hi.java

Specifying a User Class Path
Having changed one of the source files in the previous example, we recompile it:
C:> cd
\examples
C:> javac greetings\Hi.java
Since greetings.Hi refers to other classes in the greetings package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we're in? Then we need to add \examples to the user class path. We can do this by setting CLASSPATH, but here we'll use the -classpath option.
C:>javac -classpath \examples \examples\greetings\Hi.java
If we change greetings.Hi again, to use a banner utility, that utility also needs to be accessible through the user class path.
C:>javac -classpath \examples;\lib\Banners.jar \
              \examples\greetings\Hi.java
To execute a class in greetings, we need access both to greetings and to the classes it uses.
C:>java -classpath \examples;\lib\Banners.jar greetings.Hi

Separating Source Files and Class Files
It often makes sense to keep source files and class files in separate directories, especially on large projects. We use -d to indicate the separate class file destination. Since the source files are not in the user class path, we use -sourcepath to help the compiler find them.

C:> dir
classes\  lib\      src\
C:> dir src
farewells\
C:> dir src\farewells
Base.java      GoodBye.java
C:> dir lib
Banners.jar
C:> dir classes
C:> javac -sourcepath src -classpath classes;lib\Banners.jar \
       src\farewells\GoodBye.java -d classes
C:> dir classes
farewells\
C:> dir classes\farewells
Base.class      GoodBye.class
Note that the compiler compiled src\farewells\Base.java, even though we didn't specify it on the command line. To trace automatic compiles, use the -verbose option.

Cross-Compilation Example
Here we use the Java 2 SDK's javac to compile code that will run on a 1.1 VM.
C:> javac -target 1.1 -bootclasspath jdk1.1.7\lib\classes.zip \
             -extdirs "" OldCode.java
The -target 1.1 option ensures that the generated class files will be compatible with 1.1 VMs. The Java 2 SDK's javac compiles for 1.1 by default, so this option is not strictly required. However, it is good form because other compilers may have other defaults.

The Java 2 SDK's javac would also by default compile against its own bootstrap classes, so we need to tell javac to compile against JDK 1.1 bootstrap classes instead. We do this with -bootclasspath and -extdirs. Failing to do this might allow compilation against a Java 2 Platform API that would not be present on a 1.1 VM and fail at runtime.

SEE ALSO
  • java - the Java Application Launcher
  • jdb - Java Application Debugger
  • javah - C Header and Stub File Generator
  • javap - Class File Disassembler
  • javadoc - API Documentation Generator
  • jar - JAR Archive Tool
  • The Java Extensions Framework


javadoc - The Java API Documentation Generator

Generates HTML pages of API documentation from Java source files.

CONTENTS

  • Synopsis
  • Description
    • Related Documentation
    • Javadoc Doclets
    • Terminology
  • Source Files
    • Class Source Code Files
    • Package Comment Files
    • Overview Comment File
    • Miscellaneous Unprocessed Files
  • Generated Files
  • API Signatures
  • Documentation Comments
    • Commenting the Source Code
  • Javadoc Tags
  • Where Tags Can Be Used
  • Command Line Argument File
  • Options
    • Javadoc Options
    • Options Provided by the Standard Doclet
  • Simple Examples
    • Documenting One or More Packages
    • Documenting One or More Classes
    • Documenting Both Packages and Classes
  • Real World Example
    • Command Line Example
    • Makefile Example
  • Environment
    • CLASSPATH
  • Troubleshooting
  • See Also

SYNOPSIS

javadoc [ options ] [ packagenames ] [ sourcefiles ] [ @files ]
Arguments can be in any order.
options
Command-line options, as specified in this document. To see a typical use of javadoc options, see Real-World Example.
packagenames
A series of names of packages, separated by spaces, such as java.lang java.lang.reflect java.awt. You must separately specify each package you want to document. Javadoc uses -sourcepath to look for these package names. Javadoc does not recursively traverse subpackages. Wildcards such as asterisks (*) are not allowed. See Example - Documenting One or More Packages
sourcefiles
A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The path that precedes the source file name determines where javadoc will look for it. (Javadoc does not use -sourcepath to look for these source file names.) For example, passing in Button.java is identical to .\Button.java. An example source file name with a full path is C:\src\java\awt\Graphics*.java. See Example - Documenting One or More Classes. You can also mix packagenames and sourcefiles, as in Example - Documenting Both Packages and Classes
@files
One or more files that contain packagenames and sourcefiles in any order, one name per line.

DESCRIPTION

JavadocTM parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, inner classes, interfaces, constructors, methods, and fields.

You can run Javadoc on entire packages, individual source files, or both. In the first case, you pass in as an argument to javadoc a series of package names. In the second case you pass in a series of source (.java) filenames. Examples are given at the end of this document.

NOTE - When you pass in package names to Javadoc, it currently processes all .java classes in the specified package directories, even if the .java files are code examples or other classes that are not actually members of the specified packages. It does not parse each .java file for a package declaration; we may add this parsing in a future release.
Javadoc produces one complete document each time it is run; it cannot do incremental builds -- that is, it cannot modify or directly incorporate results from previous runs of Javadoc. However, it can link to results from previous runs.

As implemented, Javadoc requires and relies on the java compiler to do its job. Javadoc calls part of javac to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. Javadoc also picks up user-supplied documentation from documentation comments in the source code.

In fact, Javadoc will run on .java source files that are pure stub files with no method bodies. This means you can write documentation comments and run Javadoc in the earliest stages of design while creating the API, before writing the implementation.

Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, Javadoc documents default constructors (section 8.6.7 of Java Language Specification) that are present in the .class files but not in the source code.

When Javadoc builds its internal structure for the documentation, it loads all referenced classes. Because of this, Javadoc must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see How Classes Are Found. Generally speaking, classes you create must either be loaded as an extension or in Javadoc's class path.

Javadoc Doclets

You can customize the content and format of Javadoc's output by using doclets. Javadoc has a default "built-in" doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations:
  • Javadoc Doclets
  • The -doclet command-line option
When a custom doclet is not specified with the -doclet command line option, Javadoc will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section.

Related Documentation

  • Javadoc Enhancements for details about improvements added in Javadoc 1.3.
  • Javadoc FAQ for answers to common questions, information about Javadoc-related tools, and workarounds for bugs.
  • How to Write Doc Comments for Javadoc for more information about how to write documentation comments.
  • Requirements for Writing API Specifications - Standard requirements used when writing the Java 2 Platform Specification. It can be useful whether you are writing API specifications in source file documentation comments or in other formats. It covers requirements for packages, classes, interfaces, fields and methods to satisfy testable assertions.
  • Documentation Comment Specification - The original specification on documentation comments, Chapter 18, Documentation Comments, in the Java Language Specification, First Edition, by James Gosling, Bill Joy, and Guy Steele. (This chapter was removed from the second edition.)

Terminology

A few terms have specific meanings within the context of Javadoc:
generated document
The document generated by the javadoc tool from the doc comments in Java source code. The default generated document is in HTML and is created by the standard doclet.

name
A name in the Java Language, namely the name of a package, class, interface, field, constructor or method. A name can be fully-qualified, such as java.lang.String.equals(java.lang.Object), or partially-qualified, such as equals(Object).

documented classes
The classes and interfaces for which full documentation is generated during a javadoc run. To be documented, the source files must be available, and either their source filenames or package names must be passed into the javadoc command. We also refer to these as the classes included in the javadoc run, or the included classes.

referenced classes
The classes and interfaces that are explicitly referred to in the definition (implementation) of the documented classes and interfaces. Examples of references include return type, parameter type, cast type, extended class, implemented interface, imported classes, classes used in method bodies, and so forth. Classes referred to in doc comments (such as @see tags) do not qualify as referenced classes. When Javadoc is run, it loads into memory all of the referenced classes in javadoc's bootclasspath and classpath. (Javadoc prints a "Class not found" warning for referenced classes not found.) Javadoc can derive enough information from the the .class files to determine their existence and the fully-qualified names of their members.

external referenced classes
The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are external to that javadoc run. Links for names in the documentation to those classes are said to be external references or external links. For example, if you run javadoc on only the java.awt package, then any class in java.lang, such as Object, is an external referenced class. External referenced classes can be linked to using the -link and -linkoffline options. An important property of an external referenced class is that its source comments are not available to the Javadoc run. Therefore, these comments cannot be inherited.

SOURCE FILES

Javadoc will generate output originating from four different types of "source" files: Java language source files for classes (.java), package comment files, overview comment files, and miscellaneous unprocessed files.

Class Source Code Files

Each class or interface and its members can have their own documentation comments, contained in a .java file. For more details about these doc comments, see Documentation Comments.

Package Comment Files

Each package can have its own documentation comment, contained in its own "source" file, that Javadoc will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package.

To create a package comment file, you must name it package.html and place it in the package directory in the source tree along with the .java files. Javadoc will automatically look for this filename in this location. Notice that the filename is identical for all packages. For explicit details, see the example of package.html.

The content of the package comment file is one big documentation comment, written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators /** and */ or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between <body> and the first sentence. You can include package tags; as with any documentation comment, all tags except {@link} must appear after the description. If you add a @see tag in a package comment file, it must have a fully-qualified name.

When Javadoc runs, it will automatically look for this file; if found, Javadoc does the following:

  • Copies all content between <body> and </body> tags for processing.
  • Processes any package tags that are present.
  • Inserts the processed text at the bottom of the package summary page it generates, as shown in Package Summary.
  • Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in Overview Summary. The end-of-sentence is determined by the same rules used for the end of the first sentence of class and member descriptions.

Overview Comment File

Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that Javadoc will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages.

To create an overview comment file, you can name the file anything you want, typically overview.html and place it anywhere, typically at the top level of the source tree. Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, if the source files for the java.applet package are contained in C:\user\src\java\applet directory, you could create an overview comment file at C:\user\src\overview.html.

The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between <body> and the first sentence. You can include overview tags; as with any documentation comment, all tags except in-line tags, such as {@link}, must appear after the description. If you add a @see tag, it must have a fully-qualified name.

When you run Javadoc, you specify the overview comment file name with the -overview option. The file is then processed similar to that of a package comment file.

  • Copies all content between <body> and </body> tags for processing.
  • Processes any overview tags that are present.
  • Inserts the processed text at the bottom of the overview page it generates, as shown in Overview Summary.
  • Copies the first sentence of the overview comment to the top of the overview summary page.

Miscellaneous Unprocessed Files

You can also include in your source any miscellaneous files that you want Javadoc to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file.

To include unprocessed files, put them in a directory called doc-files which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button button.gif in the java.awt.Button class documentation, you place that file in the /home/user/src/java/awt/doc-files/ directory. Notice the doc-files directory should not be located at /home/user/src/java/doc-files because java is not a package -- that is, it does not directly contain any source files.

All links to these unprocessed files must be hard-coded, because Javadoc does not look at the files -- it simply copies the directory and all its contents to the destination. For example, the link in the Button.java doc comment might look like:

    /**
     * This button looks like this:
     * <img src="doc-files/Button.gif">
     */

GENERATED FILES

By default, javadoc uses a standard doclet that generates HTML-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as package-summary.html). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group.

Basic Content Pages

  • One class or interface page (classname.html) for each class or interface it is documenting.
  • One package page (package-summary.html) for each package it is documenting. Javadoc will include any HTML text provided in a file named package.html in the package directory of the source tree.
  • One overview page (overview-summary.html) for the entire set of packages. This is the front page of the generated document. Javadoc will include any HTML text provided in a file specified with the -overview option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)

Cross-Reference Pages

  • One class hierarchy page for the entire set of packages (overview-tree.html). To view this, click on "Overview" in the navigation bar, then click on "Tree".
  • One class hierarchy page for each package (package-tree.html) To view this, go to a particular package, class or interface page; click "Tree" to display the hierarchy for that package.
  • One "use" page for each package (package-use.html) and a separate one for each class and interface (class-use/classname.html). This page describes what packages, classes, methods, constructors and fields use any part of the given class, interface or package. Given a class or interface A, its "use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
  • A deprecated API page (deprecated-list.html) listing all deprecated names. (A deprecated name is not recommended for use, generally due to improvements, and a replacement name is usually given. Deprecated APIs may be removed in future implementations.)
  • A serialized form page (serialized-form.html) for information about serializable and externalizable classes. Each such class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. The standard doclet automatically generates a serialized form page: any class (public or non-public) that implements Serializable is included, along with readObject and writeObject methods, the fields that are serialized, and the doc comments from the @serial, @serialField, and @serialData tags. The standard doclet also produces links to the serialized form page as follows: For each class that belongs to the serialize form, a link "Serialized Form" is added on the class page under the "See Also" heading. This link is at the class (not member) level. Note that serialized classes can be either public or private. To generate the complete serialized form for public and private classes, run javadoc with the -private option (we hope to eliminate this requirement in future a version).
  • An index (index-*.html) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A-Z for English).

Support Files

  • A help page (help-doc.html) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using -helpfile.
  • One index.html file which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content.
  • Several frame files (*-frame.html) containing lists of packages, classes and interfaces, used when HTML frames are being displayed.
  • A package list file (package-list), used by the -link and -linkoffline options. This is a text file, not HTML, and is not reachable through any links.
  • A style sheet file (stylesheet.css) that controls a limited amount of color, font family, font size, font style and positioning on the generated pages.
  • A doc-files directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by Javadoc in any manner -- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree.

HTML Frames

Javadoc will generate either two or three HTML frames, as shown in the figure below. When you pass source files (*.java) or a single package name as arguments into the javadoc command, it will create only one frame (C) in the left-hand column -- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename overview-summary.html. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview-summary.html.

If you are unfamiliar with HTML frames, you should be aware that frames can have focus for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it.

              ------------                  ------------
              |C| Detail |                  |P| Detail |
              | |        |                  | |        |
              | |        |                  |-|        |
              | |        |                  |C|        |
              | |        |                  | |        |
              | |        |                  | |        |
              ------------                  ------------
             javadoc *.java           javadoc java.lang java.awt
Load one of the following two files as the starting page depending on whether you want HTML frames or not:
  • index.html (for frames)
  • overview-summary.html (for no frames)
Generated File Structure

The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage.

For example, the document generated for the class java.applet.Applet class would be located at java\applet\Applet.html. The file structure for the java.applet package follows, given that the destination directory is named apidocs. All files that contain the word "frame" appear in the upper-left or lower-left frames, as noted. All other HTML files appear in the right-hand frame.

NOTE - Directories are shown in bold. The asterisks (*) indicate the files and directories that are omitted when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, package-list is created but is empty. The doc-files directory will not be created in the destination unless it exists in the source tree.

apidocs                             Top directory
   index.html                       Initial page that sets up HTML frames
 * overview-summary.html            Lists all packages with first sentence summaries
   overview-tree.html               Lists class hierarchy for all packages
   deprecated-list.html             Lists deprecated API for all packages
   serialized-form.html             Lists serialized form for all packages
 * overview-frame.html              Lists all packages, used in upper-left frame
   allclasses-frame.html            Lists all classes for all packages, used in lower-left frame
   help-doc.html                    Lists user help for how these pages are organized
   index-all.html                   Default index created without -splitindex option
   index-files                      Directory created with -splitindex option
       index-<number>.html          Index files created with -splitindex option
   package-list                     Lists package names, used only for resolving external refs
   stylesheet.css                   HTML style sheet for defining fonts, colors and positions
   java                             Subpackage directory
       applet                       Subpackage directory
            Applet.html             Page for Applet class
            AppletContext.html      Page for AppletContext interface
            AppletStub.html         Page for AppletStub interface
            AudioClip.html          Page for AudioClip interface
          * package-summary.html    Lists classes with first sentence summaries for this package
          * package-frame.html      Lists classes in this package, used in lower left-hand frame
          * package-tree.html       Lists class hierarchy for this package
            package-use             Lists where this package is used
            doc-files               Directory holding image and example files
            class-use               Directory holding pages API is used
                Applet.html         Page for uses of Applet class
                AppletContext.html  Page for uses of AppletContext interface
                AppletStub.html     Page for uses of AppletStub interface
                AudioClip.html      Page for uses of AudioClip interface

API SIGNATURES

Javadoc generates a signature at the start of each class, interface, field, constructor, and method description. This signature is the declaration for that API item. For example, the signature for the Boolean class is:

public final class Boolean
extends Object
implements Serializable

and the signature for the Boolean.valueOfmethod is:

public static Boolean valueOf(String s)

Javadoc can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. These last two modifiers are considered implementation detail and not part of the API specification.

Rather than relying on the keyword synchronized, APIs should document their concurrency semantics in the comment description, as in "a single Enumeration cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while Hashtable should be thread-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency.

DOCUMENTATION COMMENTS

The original "Documentation Comment Specification" can be found under related documentation.

Commenting the Source Code

You can include documentation comments in the source code, ahead of declarations for any entity (classes, interfaces, methods, constructors, or fields). These are also known as Javadoc comments. A doc comment consists of the characters between the characters /** that begin the comment and the characters */ that end it. The text can continue onto multiple lines.

/**
 * This is the typical format of a simple documentation comment.
 */
To save space you can put a comment on one line:
/** This comment takes up only one line. */
Placement of comments - Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations -- see the class example, method example, and field example. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool.

A common mistake is to put an import statement between the class comment and the class declaration. Avoid this, as Javadoc will ignore the class comment.

   /**
    * This is the class comment for the class Whatever.
    */

    import com.sun;   // MISTAKE - Important not to put import statement here

    public class Whatever {
    }
A comment is a description followed by tags - The description begins after the starting delimiter /** and continues until the tag section. The tag section starts with the first character @ that begins a line (ignoring leading asterisks, white space and comment separator). The description cannot continue after the tag section begins. There can be any number of tags -- some types of tags can be repeated while others cannot. This @see starts the tag section:

/**
 * This is a doc comment.
 * @see java.lang.Object
 */
Standard and in-line tags - A tag is a special keyword within a doc comment that Javadoc can process. Javadoc has standard tags, which appear as @tag, and in-line tags, which appear within braces, as {@tag}. To be interpreted, a standard tag must appear at the beginning of a line, ignoring leading asterisks, white space and comment separator (/**). This means you can use the @ character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the @ character and not have it be interpreted, use the HTML entity &#064;. Each standard tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. An in-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the standard tag @deprecated and in-line tag {@link}.

/**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */

Comments are written in HTML - The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.)

For example, entities for the less-than (<) and greater-than (>) symbols should be written &lt; and &gt;. Likewise, the ampersand (&) should be written &amp;. The bold HTML tag <b> is shown in the following example.

Here is a doc comment:

/**
 * This is a <b>doc</b> comment.
 * @see java.lang.Object
 */

Leading asterisks - When javadoc parses a doc comment, leading asterisk (*) characters on each line are discarded; blanks and tabs preceding the initial asterisk (*) characters are also discarded. If you omit the leading asterisk on a line, all leading white space is removed. Therefore, you should not omit leading asterisks if you want leading white space to kept, such as when indenting sample code with the <pre> tag. Without leading asterisks, the indents are lost in the generated documents, since the leading white space is removed.

First sentence - The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first tag. Javadoc copies this first sentence to the member summary at the top of the HTML page.

Declaration with multiple fields - Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations:

/**
 * The horizontal and vertical distances of point (x,y)
 */
public int x, y;      // Avoid this
Javadoc generates the following documentation from the above code:
public int x
The horizontal and vertical distances of point (x,y)
public int y
The horizontal and vertical distances of point (x,y)
Use header tags carefully - When writing documentation comments for members, it's best not to use HTML heading tags such as <H1> and <H2>, because Javadoc creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure.

Automatic Reuse of Method Comments

Javadoc has the ability to automatically reuse or "inherit" method comments. If a method in a class or interface has no doc comment or tags, Javadoc will instead use the comment and tags from a method it either overrides or implements, if any, according to the algorithm below. The overridden method must be a member of a documented class, and not an external referenced class for the doc comment to actually be available to copy. This occurs in three cases:
  • When a method in a class overrides a method in a superclass
  • When a method in an interface overrides a method in a superinterface
  • When a method in a class implements a method in an interface

In the first two cases, for method overrides, Javadoc generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding.

In the third case, when a method in a given class implements a method in an interface, Javadoc generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing.

Algorithm for Inheriting Method Descriptions - If a method does not have a doc comment, Javadoc searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses:

  1. Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first doc comment found for this method.
  2. If step 1 failed to find a doc comment, recursively apply this entire algorithm to each directly implemented (or extended) interface, in the same order they were examined in step 1.
  3. If step 2 failed to find a doc comment and this is a class other than Object (not an interface):
    1. If the superclass has a doc comment for this method, use it.
    2. If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass.

JAVADOC TAGS

Javadoc parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well-formatted API from your source code. The tags start with an "at" sign (@) and are case-sensitive -- they must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk) or it is treated as normal text. By convention, tags with the same name are grouped together. For example, put all @see tags together.

For information about tags we might introduce in future releases, see Proposed Tags.

The current tags are:

Tag | Introduced in JDK/SDK
@author | 1.0
{@docRoot} | 1.3
@deprecated | 1.0
@exception | 1.0
{@link} | 1.2
@param | 1.0
@return | 1.0
@see | 1.0
@serial | 1.2
@serialData | 1.2
@serialField | 1.2
@since | 1.1
@throws | 1.2
@version | 1.0
@author name-text
Adds an "Author" entry with the specified name-text to the generated docs when the -author option is used. A doc comment may contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, Javadoc inserts a comma (,) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, use multiple names per line if you want a localized name separator other than comma.

{@docRoot}
Represents the relative path to the generated document's (destination) root directory from any generated page. It is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common.

This {@docRoot} tag can be used both on the command line and in a doc comment:

  1. On the command line, where the header/footer/bottom are defined:
       javadoc -bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'
  2. In a doc comment:
       /**
    * See the <a href="{@docRoot}/copyright.html">Copyright</a>.
    */
The reason this tag is needed is because the generated docs are in hierarchical directories, as deep as the number of subpackages. This expression:
  <a href="{@docRoot}/copyright.html">
would resolve to:
  <a href="../../copyright.html">      for java/lang/Object.java
and
  <a href="../../../copyright.html">   for java/lang/ref/Reference.java

@deprecated deprecated-text
Adds a comment indicating that this API should no longer be used (even though it may continue to work). Javadoc moves the deprecated-text ahead of the description, placing it in italics and preceding it with a bold warning: "Deprecated".

The first sentence of deprecated-text should at least tell the user when the API was deprecated and what to use as a replacement. Javadoc copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a {@link} tag (for Javadoc 1.2 or later) that points to the replacement API:

  • For Javadoc 1.2 and later, use a {@link} tag. This creates the link in-line, where you want it. For example:
    /**
 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
 */
  • For Javadoc 1.1, the standard format is to create a @see tag (which cannot be in-line) for each @deprecated tag.

For more about deprecation, see The @deprecated tag.

@exception class-name description
The @exception tag is a synonym for @throws.

{@link package.class#member label}
Inserts an in-line link with visible text label that points to the documentation for the specified name in the Java Language that is referenced in a signature of the source files being documented. This tag accepts exactly the same syntax for package.class#member and label as the @see tag, described below, but generates an in-line link rather than placing the link in the "See Also" section. This tag begins and ends with curly braces to separate it from the rest of the in-line text. If you need to use "}" inside the label, use the HTML entity notation &#125;

There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the description part of a documentation comment or in the text portion of any tag (such as @deprecated, @return or @param).

For example, here is a comment that refers to the getComponentAt(int, int) method:

Use the {@link #getComponentAt(int, int) getComponentAt} method.
From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package):
Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.
Which appears on the web page as:
Use the getComponentAt method.
You can extend {@link} to link to classes not being documented by using the -link option. Note that this works only for classes that are referenced in a particular way as described at How a Class Must Be Referenced.

@param parameter-name description
Adds a parameter to the "Parameters" section. The description may be continued on the next line.

@return description
Adds a "Returns" section with the description text. This text should describe the return type and permissible range of values.

@see reference
Adds a "See Also" heading with a link or text entry that points to reference. A doc comment may contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations; the third form below is the most common.

@see "string" Note - This form is broken in version 1.2 (prints none of the quoted text) but fixed in 1.2.2.
Adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. Javadoc distinguishes this from the previous cases by looking for a double-quote (") as the first character. For example:
     @see "The Java Programming Language"
This generates text such as:
See Also:
"The Java Programming Language"
@see <a href="URL#value">label</a>
Adds a link as defined by URL#value. The URL#value is a relative or absolute URL. Javadoc distinguishes this from other cases by looking for a less-than symbol (<) as the first character. For example:
     @see <a href="spec.html#section">Java Spec</a>
This generates a link such as:
See Also:
Java Spec
@see package.class#member label
Adds a link, with visible text label, that points to the documentation for the specified name in the Java Language that is referenced. The label is optional; if omitted, the name appears instead as the visible text, suitably shortened -- see How a name is displayed. Use the label when you want the visible text to be abbreviated or different from the name.

In only version 1.2, just the name but not the label would automatically appear in <code> HTML tags, Starting with 1.2.2, the <code> is always included around the visible text, whether or not a label is used.

  • package.class#member is any valid name in the Java Language that is referenced -- a package, class, interface, constructor, method or field name -- except that you replace the dot ahead of the member name with a hash character (#). If this name is in the documented classes, Javadoc will automatically create a link to it. To create links to external referenced classes, use the -link option. Use either of the other two @see forms for referring to documentation of a name that does not belong to a referenced class. This argument is described at greater length below under Specifying a Name.

  • label is optional text that is visible as the link's label. The label can contain whitespace. If label is omitted, then package.class.member will appear, suitably shortened relative to the current class and package -- see How a name is displayed.

  • A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces may be used between parameters in a method.

Example - In this example, an @see tag (in the Character class) refers to the equals method in the String class. The tag includes both arguments: the name "String#equals(Object)" and the label "equals".

 /**
  * @see String#equals(Object) equals
  */
The standard doclet produces HTML something like this:
<dl>
<dt><b>See Also:</b>
<dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a>
</dl>
Which looks something like this in a browser, where the label is the visible link text:

See Also:
equals

Specifying a name - This package.class#member name can be either fully-qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If less than fully-qualified, Javadoc uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments.

Of course the advantage to providing shorter, "partially-qualified" names is that they are less to type and less clutter in the source code. The following table shows the different forms of the name, where Class can be a class or interface, Type can be a class, interface, array, or primitive, and method can be a method or constructor.

Typical forms for @see package.class#member
Referencing a member of the current class
@see #field
@see #method(Type, Type,...)
@see #method(Type argname, Type argname,...)

Referencing another class in the current or imported packages
@see Class#field
@see Class#method(Type, Type,...)
@see Class#method(Type argname, Type argname,...)
@see Class

Referencing another package (fully qualified)
@see package.Class#field
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type argname, Type argname,...)
@see package.Class
@see package

The following notes apply to the above table:

  • The first set of forms (with no class or package) will cause Javadoc to search only through the current class's hierarchy. It will find a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search steps 1-3). It will not search the rest of the current package or other packages (search steps 4-5).
  • If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, Javadoc will correctly create a link to it, but will print a warning message reminding you to add the parentheses and arguments. If this method is overloaded, Javadoc will link to the first method its search encounters, which is unspecified.
  • Inner classes must be specified as outer.inner, not simply inner, for all forms.
  • As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables Javadoc to resolve ambiguities, since the dot also separates classes, inner classes, packages, and subpackages. However, Javadoc is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning.

Search order for @see - Javadoc will process a @see tag that appears in a source file (.java), package file (package.html) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see. In a source file, you can specify a name that is fully-qualified or partially-qualified.

When Javadoc encounters a @see tag in a .java file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would (except Javadoc will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in Chapter 6, "Names" of the Java Language Specification, modified by the Inner Classes Specification. Javadoc searches for that name through all related and imported classes and packages. In particular, it searches in this order:

  1. the current class or interface
  2. any enclosing classes and interfaces, searching closest first
  3. any superclasses and superinterfaces, searching closest first
  4. the current package
  5. any imported packages, classes and interfaces, searching in the order of the import statement

Javadoc continues to search recursively through steps 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it will search through E's superclasses before E's enclosing classes. In steps 4 and 5, Javadoc does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In step 5, Javadoc will look in java.lang, since that is automatically imported by all programs.

Javadoc won't necessarily look in subclasses, nor will it look in other packages even if their documentation is being generated in the same run. For example, if the @see tag is in java.awt.event.KeyEvent class and refers to a name in the java.awt package, javadoc will not look in that package unless that class imports it.

How a name is displayed - If label is omitted, then package.class.member will appear. In general, it will be suitably shortened relative to the current class and package. By "shortened", we mean Javadoc will display only the minimum name necessary. For example, if the String.toUpperCase() method contains references to a member of the same class and to a member of a different class, the class name will be displayed only in the latter case:

Type of Reference Example Displays As
@see tag refers to member of the same class @see String#toLowerCase()
toLowerCase()
(omits the class name)
@see tag refers to member of a different class @see Character#toLowerCase(char)
Character.toLowerCase(char)
(includes the class name)

Examples of @see
The comment to the right shows how the name would be displayed if the @see tag is in a class in another package, such as java.applet.Applet.

                                           See also:
@see java.lang.String                   //  String
@see java.lang.String The String class  //  The String class
@see String                             //  String
@see String#equals(Object)              //  String.equals(Object)
@see String#equals                      //  String.equals(java.lang.Object)
@see java.lang.Object#wait(long)        //  java.lang.Object.wait(long)
@see Character#MAX_RADIX                //  Character.MAX_RADIX
@see <a href="spec.html">Java Spec</a>  //  Java Spec
@see "The Java Programming Language"    //  "The Java Programming Language"
You can extend @see to link to classes not being documented by using the -link option. Note that this works only for classes that are referenced in a particular way as described at How a Class Must Be Referenced.

@since since-text
Adds a "Since" heading with the specified since-text to the generated documentation. The text has no special internal structure. This tag means that this change or feature has existed since the software release specified by the since-text. For example:
    @since 1.3

@serial field-description
Used in the doc comment for a default serializable field.

An optional field-description should explain the meaning of the field and list the acceptable values. If needed, the description can span multiple lines. The standard doclet adds this information to the serialized form page.

The @since tag should be added to each serializable field that has been added since the initial version of a Serializable class.

For more information about how to use these tags, along with an example, see "Documenting Serializable Fields and Data for a Class," Section 1.6 of the Java Object Serialization Specification. Also see the Serialization FAQ, which covers the questions "Why does the javadoc standard doclet generate many warnings about missing @serial and/or @serialData tags?" and "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the -private switch?".

@serialField field-name field-type field-description
Documents an ObjectStreamField component of a Serializable class' serialPersistentFields member. One @serialField tag should be used for each ObjectStreamField component.

@serialData data-description
The data-description documents the types and order of data in the serialized form. Specifically, this data includes the optional data written by the writeObject method and all data (including base classes) written by the Externalizable.writeExternal method.

The @serialData tag can be used in the doc comment for the writeObject, readObject, writeExternal, and readExternal methods.

@throws class-name description
The @throws and @exception tags are synonyms. Adds a "Throws" subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that may be thrown by the method. If this class is not fully-specified, Javadoc uses the search order to look up this class.

@version version-text
Adds a "Version" subheading with the specified version-text to the generated docs when the -version option is used. The text has no special internal structure. A doc comment may contain at most one @version tag. Version normally refers to the version of the software (such as the Java 2 SDK) that contains this class or member.

WHERE TAGS CAN BE USED

The following sections describe where the tags can be used. Note that these four tags can be used in all doc comments: @see, @link, @since, @deprecated.

Overview Documentation Tags

Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html). Like in any other documentation comments, these tags must appear after the description.

NOTE - The {@link} tag has a bug in overview documents in version 1.2 -- the text appears properly but has no link.

Overview Tags
@see
{@link}
@since

Package Documentation Tags

Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named package.html).

Package Tags
@see
{@link}
@since
@deprecated

Class and Interface Documentation Tags

The following are tags that can appear in the documentation comment for a class or interface.

Class/Interface Tags
@see
{@link}
@since
@deprecated
@author
@version

An example of a class comment:

/**
 * A class representing a window on the screen.
 * For example:
 * <pre>
 *    Window win = new Window(parent);
 *    win.show();
 * </pre>
 *
 * @author  Sami Shaio
 * @version %I%, %G%
 * @see     java.awt.BaseWindow
 * @see     java.awt.Button
 */
class Window extends BaseWindow {
   ...
}

Field Documentation Tags

The following are the tags that can appear in the documentation comment for a field.

Field Tags
@see
{@link}
@since
@deprecated
@serial
@serialField

An example of a field comment:

    /**
     * The X-coordinate of the component.
     *
     * @see #getLocation()
     */
    int x = 1263732;

Constructor and Method Documentation Tags

The following are the tags that can appear in the documentation comment for a constructor or method.

Method/Constructor Tags
@see
{@link}
@since
@deprecated
@param
@return
@throws (@exception)
@serialData

An example of a method doc comment:

    /**
     * Returns the character at the specified index. An index
     * ranges from <code>0</code> to <code>length() - 1</code>.
     *
     * @param     index  the index of the desired character.
     * @return    the desired character.
     * @exception StringIndexOutOfRangeException
     *              if the index is not in the range <code>0</code>
     *              to <code>length()-1</code>.
     * @see       java.lang.Character#charValue()
     */
    public char charAt(int index) {
       ...
    }

COMMAND LINE ARGUMENT FILE

To shorten or simplify the javadoc command, you may specify one or more files that themselves contain one source filename or package name per line. When executing javadoc, pass in the filename with the '@' leading character to specify it as a file list. When javadoc encounters an argument beginning with the character `@', it operates on the names in that file as if they were on the command line.

For example, you can list all of the package names in a file named packages. This file might look like:

     com.mypackage1
     com.mypackage2
     com.mypackage3
You could then run javadoc with:
     C:> javadoc -d apidocs @packages

OPTIONS
The javadoc tool uses doclets to determine its output. Javadoc uses the default standard doclet unless a custom doclet is specified with the -doclet option. Javadoc provides a set of command-line options that can be used with any doclet -- these options are described below under the sub-heading Javadoc Options. The standard doclet provides an additional set of command-line options that are described below under the sub-heading Options Provided by the Standard Doclet. All option names are case-insensitive, though their arguments can be case-sensitive.

The options are:

-1.1
-author
-bootclasspath
-bottom
-charset
-classpath
-d
-docencoding
-doclet
-docletpath
-doctitle
-encoding
-extdirs
-footer
-group
 -header
-help
-helpfile
-J
-link
-linkoffline
-locale
-nodeprecated
-nodeprecatedlist
-nohelp
-noindex
-nonavbar
-nosince
-notree
-overview
 -package
-private
-protected
-public
-serialwarn
-sourcepath
-splitindex
-stylesheetfile
-title
-use
-verbose
-version
-windowtitle

Javadoc Options

-overview path\filename
Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path\filename and place it on the Overview page (overview-summary.html). The path\filename is relative to the -sourcepath.

While you can use any name you want for filename and place it anywhere you want for path, a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, since -sourcepath will point to this file. For example, if the source tree for the java.lang package is C:\src\classes\java\lang\, then you could place the overview file at C:\src\classes\overview.html. See Real World Example.

For information about the file specified by path\filename, see overview comment file.

Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)

The title on the overview page is set by -doctitle.

-public
Shows only public classes and members.

-protected
Shows only protected and public classes and members. This is the default.

-package
Shows only package, protected, and public classes and members.

-private
Shows all classes and members.

-help
Displays the online help, which lists these javadoc and doclet command line options.

-doclet class
Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option.

For example, to call the MIF doclet, use:

    -doclet com.sun.tools.doclets.mif.MIFDoclet

-docletpath classpathlist
Specifies the path to, or jar file containing, the doclet starting class file (specified with the -doclet option) and any jar files it depends on. If classpathlist contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the doclet is already in the search path.

-1.1
Generates the documentation with the appearance and functionality of documentation generated by Javadoc 1.1. That is, the pages have a gray background, use images for headers, have bulleted lists instead of tables, have a flat destination directory structure, do not contain inherited API, do not use HTML frames, and do not support inner classes. This option also automatically splits the index into a separate file for each letter of the alphabet. If you want this appearance, this option has the advantage over javadoc 1.1 of having some bugs fixed.

Not all options work with the -1.1 option. To find out which other options are available, execute:

  C:> javadoc -1.1 -help
The -footer option shown in this list is functionally the same as the -bottom option described elsewhere on this page. The -title option is functionally the same as -doctitle.

-sourcepath sourcepathlist
Specifies the search paths for finding source files (.java) when passing package names into the javadoc command. The sourcepathlist can contain multiple paths by separating them with a semicolon (;). Javadoc will search in all subdirectories of the specified paths.

Note that you can use the -sourcepath option only when passing package names into the javadoc command -- it will not locate .java files passed into the javadoc command. (To locate .java files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If -sourcepath is omitted, javadoc uses the class path to find the source files (see -classpath). Therefore, the default -sourcepath is the value of class path. If -classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files.

Set sourcepathlist to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called com.mypackage whose source files are located at:

C:\user\src\com\mypackage\*.java
In this case you would specify the sourcepath to C:\user\src, the directory that contains com\mypackage, and then supply the package name com.mypackage:
  C:> javadoc -sourcepath C:\user\src com.mypackage
This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a backslash "\", you end up with the full path to the package: C:\user\src\com\mypackage.

To point to two source paths:

  C:> javadoc -sourcepath C:\user1\src;C:\user2\src com.mypackage

-classpath classpathlist
Specifies the paths where javadoc will look for referenced classes (.class files) -- these are the documented classes plus any classes referenced by those classes. The classpathlist can contain multiple paths by separating them with a semicolon (;). Javadoc will search in all subdirectories of the specified paths. Follow the instructions in class path documentation for specifying classpathlist.

If -sourcepath is omitted, Javadoc uses -classpath to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both -sourcepath and -classpath.

For example, if you want to document com.mypackage, whose source files reside in the directory C:\user\src\com\mypackage, and if this package relies on a library in C:\user\lib, you would specify:

  C:> javadoc -classpath \user\lib -sourcepath \user\src com.mypackage
As with other tools, if you do not specify -classpath, Javadoc uses the CLASSPATH environment variable, if it is set. If both are not set, Javadoc searches for classes from the current directory.

For an in-depth description of how Javadoc uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see How Classes Are Found.

-bootclasspath classpathlist
Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path Javadoc will use to look up source and class files. See How Classes Are Found. for more details. Separate directories in classpathlist with semicolons (;).

-extdirs dirlist
Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path Javadoc will use to look up source and class files. See -classpath (above) for more details. Separate directories in dirlist with semicolons (;).

-verbose
Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file.

-locale language_country_variant
Important - The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command-line option that is order-dependent.
Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes.

-encoding name
Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.

-J flag
Passes flag directly to the runtime system java that runs javadoc. Notice there must be no space between the J and the flag. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the -Xmx option of java as follows (-Xms is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required):
   C:> javadoc -J-Xmx32m -J-Xms32m com.mypackage
To tell what version of javadoc you are using, call the "-version" option of java:

   C:> javadoc -J-version
   java version "1.2"
   Classic VM (build JDK-1.2-V, green threads, sunwjit)

Options Provided by the Standard Doclet

-d directory
Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value directory can be absolute or relative to the current working directory. For example, the following generates the documentation for the com.mypackage package and saves the results in the C:\user\doc\ directory:
  C:> javadoc -d \user\doc com.mypackage

-use
Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C.

For example, let's look at what might appear on the "Use" page for String. The getName() method in the java.awt.Font class returns type String. Therefore, getName() uses String, and you will find that method on the "Use" page for String.

Note that this documents only uses of the API, not the implementation. If a method uses String in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of String.

You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar.

-version
Includes the @version text in the generated docs. This text is omitted by default. To tell what version of Javadoc you are using, use the -J-version option.

-author
Includes the @author text in the generated docs.

-splitindex
Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical characters.

-windowtitle title
Specifies the title to be placed in the HTML <title> tag. This appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags, as the browser will not properly interpret them. Any internal quotation marks within title may have to be escaped. If -windowtitle is omitted, Javadoc uses the value of -doctitle for this option.

  C:> javadoc -windowtitle "Java 2 Platform" com.mypackage
-doctitle title
Specifies the title to be placed near the top of the overview summary file. The title will be placed as a centered, level-one heading directly beneath the upper navigation bar. The title may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within title may have to be escaped.

  C:> javadoc -doctitle "Java<sup><font size=\"-2\">TM</font></sup>" com.mypackage
-title title
This option no longer exists. It existed only in Beta versions of Javadoc 1.2. It has been renamed to -doctitle. This option is being renamed to make it clear that it defines the document title rather than the window title.

-header header
Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. header may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within header may have to be escaped.

  C:> javadoc -header "<b>Java 2 Platform </b><br>v1.3" com.mypackage

-footer footer
Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. footer may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within footer may have to be escaped.

-bottom text
Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The text may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within text may have to be escaped.

-link extdocURL
Creates links to already existing javadoc-generated documentation of external referenced classes. The argument extdocURL is the URL for the external documentation you want to link to. You can supply either an absolute URL or a relative URL -- the latter should be relative to the destination directory (specified with -d). For a link to an external referenced class to actually appear, the class must be referenced as described below in How a Class Must Be Referenced.

In other words, this option enables you to link to classes referenced to by your code but not being documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with extdocURL. This allows, for instance, third party documentation to link to java.* documentation on http://java.sun.com. Another use is to for cross-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. A third use is as a "hack" to update docs: Execute javadoc on a full set of packages, then run javadoc again on only the smaller set of changed packages, so that the updated files can be inserted back into the original set. (This is done to save time, but can be tricky -- if you add or remove API from the subset, there will be missing or broken links in the index.)

Use the -link option as follows:

  • Omit the -link option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the -link option, Javadoc does not create links to documentation for external references, because it does not know if (or where) that documentation exists.)

  • Include the -link option for javadoc to also create links to documentation at location extdocURL for external referenced classes.

Note that if the URL is on the World Wide Web, javadoc must have a web connection in order to access the package-list when generating the documentation. If you do not have access, use -linkoffline instead.

How a Class Must be Referenced - For a link to an external referenced class to actually appear, the class must be referenced in a particular way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an import statement or in a declaration. Here are examples of how the class java.lang.SecurityManager can be referenced:

  • In an explicit import statement:
    import java.lang.SecurityManager;
    A wildcard import statement does not work (such as import java.lang.*).

  • In the return type or parameter type of a method:
    void foo(SecurityManager sm) {}

  • In an implements, extends or throws statement:
    public abstract class MyClass extends SecurityManager {}

An important corollary is that when you use the -link option, there will probably be many links that do not appear due to this constraint. (The text would appear without a hypertext link.) The only way to find the missing links would be by visual inspection. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above.

Package List - The -link option requires that a file named package-list, which is generated by Javadoc, exist at the URL you specify with -link. The package-list file is a simple text file that lists the names of packages documented at that location. How Javadoc uses the package list is described below.

For example, the package list for the Java 2 Platform v1.3 API is located at http://java.sun.com/products/jdk/1.3/docs/api/package-list. and starts out as follows:

  java.applet
  java.awt
  java.awt.color
  java.awt.datatransfer
  java.awt.dnd
  java.awt.event
  java.awt.font
  etc.

When javadoc is run without the -link option, as it is generating documentation, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the -link option is used, Javadoc searches the package-list file at the specified extdocURL location for that package name. If it finds the package name, it prefixes the name with that URL.

In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. Javadoc will not check that these pages exist -- only that the package-list exists.

The package-list file is created but is empty if the argument to javadoc is source files rather than packages.

Example - For example, the following command causes Javadoc to look for a package-list file at the given URL, reads in the package names in that file, and then uses the given URL when adding links to API in those external packages:

  C:> javadoc -link http://java.sun.com/products/jdk/1.3/docs/api com.mypackage
Multiple Links - You can supply multiple -link options to link to any number of external generated documents. Known Bug - Javadoc 1.2 has a known bug which prevents you from supplying more than one -link command. This is fixed in 1.2.2.

Specify a different link option for each external document to link to:

C:> javadoc -link extdocURL1 -link extdocURL2 ... -link extdocURLn com.mypackage

where extdocURL1, extdocURL2, ... extdocURLn point respectively to the roots of external documents, each of which contains a file named package-list.

Cross-links - Note that "bootstrapping" may be required when cross-linking two or more documents that have not previously been generated. In other words, if package-list does not exist for either document, when you run javadoc on the first document, the package-list will not yet exist for the second document. Therefore, to create the external links, you must re-generate the first document after generating the second document.

In this case, the purpose of first generating a document is to create its package-list (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. Javadoc prints a warning if a needed external package-list file does not exist.

Updating docs - The third use for -link option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to signatures. If you were to add, remove or change any signatures from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, or other places.

First, you create a new destination directory for this new small run and set -link and -d to that same relative path: If the original docs are in a directory named html:

  C:> javadoc -d update -link . html com.mypackage
When javadoc is done, copy these generated files in update over the original files in html.

Background information: In general, when javadoc runs, it has the potential to generate links for names that appear throughout its generated pages: in signatures, @see tags, {@link} tags, summaries, hierarchies, the overview, and the index. Some of these links will go to pages generated in the current run, while other links will potentially go to pages not generated in the current run.

-linkoffline extdocURL packagelistLoc
This option is a variation of -link; they both create links to documentation for external referenced classes, where the classes must be referenced as described above in How a Class Must Be Referenced.

You must use this option instead of -link if, at the time you run javadoc, the external document's package-list file does not exist at the extdocURL location (is "offline") but exists at a different location packageListLoc (typically local). This can happen when the shell you are running javadoc in does not have web access to the extdocURL. Thus, if extdocURL is accessible only on the World Wide Web, -linkoffline removes the constraint that javadoc have a web connection when generating the documentation. Examples are given below.

You can specify multiple -linkoffline options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.)

The arguments are:

  • extdocURL is the URL for the root location of the external javadoc-generated documentation you want to link to. This location can be an absolute or relative URL -- if relative, make it relative to the destination directory (specified with -d).

  • packagelistLoc is the location to the directory containing the package-list file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the current directory from where javadoc was run. Do not include the package-list filename.

For example, if you want to link to the java.lang package at http://java.sun.com/products/jdk/1.3/docs/api, but your shell does not have web access, then you could access the package-list file using http://java.sun.com/products/jdk/1.3/docs/api/package-list, save it to a local directory, and point to this local copy with packagelistLoc.

If a package-list file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with packagelistLoc. This is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating a package-list file for linking to documentation generated with Javadoc 1.0 or 1.1, earlier versions where package-list files were not generated.

Two companies can share their unpublished package-list files, enabling them to release their cross-linked documentation simultaneously.

As shown below, to use this option, specify extdocURL1, the location of the javadoc-generated documentation for external referenced classes, and packagelistLoc1, the location of its package-list file. Include -linkoffline once for each generated document you want to refer to (each option is shown on a separate line for clarity):

% javadoc -linkoffline extdocURL1 packagelistLoc1 \
          -linkoffline extdocURL2 packagelistLoc2 \
          ...

For example, the following command adds links pointing to a document (whose root is specified by the first argument), for packages listed in the /jdk/package-list file (as specified by the second argument). It generates documentation for the com.mypackage package.

C:> javadoc -linkoffline http://java.sun.com/products/jdk/1.3/docs/api /jdk com.mypackage

-group groupheading packagepattern:packagepattern:...
Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different -group option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given -group option, the packages matching the list of packagepattern expressions appear in a table with the heading groupheading.

  • groupheading can be any text, and can include white space. This text is placed in the table heading for the group.

  • packagepattern can be any package name, or can be the start of any package name followed by an asterisk (*). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with semicolons (;).
NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as "java.lang*:java.util"

If you do not supply any -group option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages".

For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" -- including the dot, such as "java.lang.*" would omit the java.lang package.

  C:> javadoc -group "Core Packages" "java.lang*:java.util"
            -group "Extension Packages" "javax.*"
            java.lang java.lang.reflect java.util javax.servlet java.new
This results in the groupings:
Core Packages
java.lang
java.lang.reflect
java.util
Extension Packages
javax.servlet
Other Packages
java.new

-nodeprecated
Prevents the generation of any deprecated API at all in the documentation. This does what -nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code.

-nodeprecatedlist
Prevents the generation of the file containing the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner.

-nosince
Omits from the generated docs the "Since" sections associated with the @since tags.

-notree
Omits the class/interface hierarchy from the generated docs. The hierarchy is produced by default.

-noindex
Omits the index from the generated docs. The index is produced by default.

-nohelp
Omits the HELP link in the navigation bars at the top and bottom of each page of output.

-nonavbar
Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The -nonavbar option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only.

-helpfile path\filename
Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to. Without this option, Javadoc automatically creates a help file help-doc.html that is hard-coded in Javadoc. This option enables you to override this default. The filename can be any name and is not restricted to help-doc.html -- Javadoc will adjust the links in the navigation bar accordingly. For example:
  C:> javadoc -helpfile C:\user\myhelp.html java.awt
-stylesheetfile path\filename
Specifies the path of an alternate HTML stylesheet file. Without this option, Javadoc automatically creates a stylesheet file stylesheet.css that is hard-coded in Javadoc. This option enables you to override this default. The filename can be any name and is not restricted to stylesheet.css. For example:
  C:> javadoc -stylesheetfile C:\user\mystylesheet.css com.mypackage
-serialwarn
Generates compile-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and writeExternal methods.

-charset name
Specifies the HTML character set for this document. For example:
  % javadoc -charset "iso-8859-1" mypackage
would insert the following line in the head of every generated page:
   <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
This META tag is described in the HTML standard. (4197265 and 4137321)

-docencoding name
Specifies the encoding of the generated HTML files.

SIMPLE EXAMPLES

You can run javadoc on entire packages or individual classes. Each package name has a corresponding directory name. In the following examples, the source files are located at C:\home\src\java\awt\*java. The destination directory is C:\home\html.

Documenting One or More Packages

To document a package, the source files (*.java) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots), each identifier represents a different directory. Thus, all java.awt classes must reside in a directory named java\awt\. You can run javadoc either of the following two ways -- by changing directories (with cd) or by using -sourcepath option. You cannot use wildcards to specify groups of packages.

  • Case 1- Changing to the package directory - Change to the parent directory of the fully-qualified package. Then run javadoc, supplying names of one or more packages you want to document:
      C:> cd C:\home\src\
  C:> javadoc -d C:\home\html java.awt java.awt.event
  • Case 2 - From any directory - In this case, it doesn't matter what the current directory is. Run javadoc supplying -sourcepath with the parent directory of the fully-qualified package, and supply names of one or more packages you want to document:
      C:> javadoc -d C:\home\html -sourcepath C:\home\src java.awt java.awt.event
Both cases generate HTML-formatted documentation for the public and protected classes and interfaces in packages java.awt and java.awt.event and save the HTML files in the specified destination directory (C:\home\html). Because two or more packages are being generated, the document has three frames -- for the list of packages, the list of classes, and the main page.

Documenting One or More Classes

The second way to run Javadoc is by passing in one or more source files (.java). You can run javadoc either of the following two ways -- by changing directories (with cd) or by fully-specifying the path to the .java files. Relative paths are relative to the current directory. The -sourcepath option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes.

  • Case 1 - Changing to the source directory - Change to the directory holding the .java files. Then run javadoc, supplying names of one or more source files you want to document.
      C:> cd C:\home\src\java\awt
  C:> javadoc -d C:\home\html Button.java Canvas.java Graphics*.java
    This example generates HTML-formatted documentation for the classes Button, Canvas and classes beginning with Graphics. Because source files rather than package names were passed in as arguments to javadoc, the document has two frames -- for the list of classes and the main page.

  • Case 2 - Changing to the package root directory - This is useful for documenting individual source files from different subpackages off the same root. Change to the package root directory, and supply the source files with paths from the root.
      C:> cd C:\home\src
  C:> javadoc -d \home\html java\awt\Button.java java\applet\Applet.java
    This example generates HTML-formatted documentation for the classes Button and Applet.

  • Case 3 - From any directory - In this case, it doesn't matter what the current directory is. Run javadoc supplying the absolute path (or path relative to the current directory) to the .java files you want to document.
      C:> javadoc -d C:\home\html C:\home\src\java\awt\Button.java C:\home\src\java\awt\Graphics*.java
    This example generates HTML-formatted documentation for the class Button and classes beginning with Graphics.

Documenting Both Packages and Classes

You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use -sourcepath for the path to the packages but not for the path to the individual classes.
  C:> javadoc -d C:\home\html -sourcepath C:\home\src java.awt C:\home\src\java\applet\Applet.java
This example generates HTML-formatted documentation for the package java.awt and class Applet. (Javadoc determines the package name for Applet from the package declaration, if any, in the Applet.java source file.)

REAL WORLD EXAMPLE

Javadoc has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run Javadoc on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java 2 Platform, Standard Edition, v1.2.

The same example is shown twice -- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same Javadoc command to be run from any directory.

Command Line Example

This command line example is over 900 characters, which is too long for some shells, such as DOS. You can write a shell script instead to execute this command.
% javadoc -sourcepath /java/jdk/src/share/classes            \
    -overview /java/jdk/src/share/classes/overview.html      \
    -d /java/jdk/build/api                                   \
    -use                                                     \
    -splitIndex                                              \
    -windowtitle 'Java 2 Platform v1.2 API Specification'    \
    -doctitle 'Java<sup><font size="-2">TM</font></sup> 2 Platform v1.2 API Specification' \
    -header '<b>Java 2 Platform </b><br><font size="-1">v1.2</font>' \
    -bottom '<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit
a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems,
Inc. in the US and other countries.<br>Copyright 1993-1999 Sun Microsystems, Inc.
901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \
    -group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \
    -group "Extension Packages" "javax.*"                    \
    -J-Xmx180m                                               \
    @filelist
where filelist is the name of a file containing the packages to process, such as java.applet java.lang. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the -bottom option.) See the other notes listed below.

Makefile Example

This is an example of a GNU makefile. For an example of a Windows makefile, see creating a makefile for Windows.
javadoc -sourcepath $(SRCDIR)              \   /* Sets path for source files     */
        -overview $(SRCDIR)/overview.html  \   /* Sets file for overview text    */
        -d /java/jdk/build/api             \   /* Sets destination directory     */
        -use                               \   /* Adds "Use" files               */
        -splitIndex                        \   /* Splits index A-Z               */
        -windowtitle $(WINDOWTITLE)        \   /* Adds a window title            */
        -doctitle $(DOCTITLE)              \   /* Adds a doc title               */
        -header $(HEADER)                  \   /* Adds running header text       */
        -bottom $(BOTTOM)                  \   /* Adds text at bottom            */
        -group $(GROUPCORE)                \   /* 1st subhead on overview page   */
        -group $(GROUPEXT)                 \   /* 2nd subhead on overview page   */
        -J-Xmx180m                         \   /* Sets memory to 180MB           */
        java.lang java.lang.reflect        \   /* Sets packages to document      */
        java.util java.io java.net         \
        java.applet

WINDOWTITLE = 'Java 2 Platform v1.2 API Specification'
DOCTITLE = 'Java<sup><font size="-2">TM</font></sup> 2 Platform v1.2 API Specification'
HEADER = '<b>Java 2 Platform </b><br><font size="-1">v1.2</font>'
BOTTOM = '<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit
    a bug or feature</a><br><br>Java is a trademark or registered trademark
    of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-1999
    Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.
    All Rights Reserved.</font>'
GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
GROUPEXT  = '"Extension Packages" "javax.*"'
SRCDIR = '/java/jdk/1.2/src/share/classes'

Single quotes are used to surround makefile arguments.

NOTES

  • If you omit the -windowtitle option, Javadoc copies the doc title to the window title. The -windowtitle text is basically the same as the -doctitle but without HTML tags, to prevent those tags from appearing as raw text in the window title.

  • If you omit the -footer option, as done here, Javadoc copies the header text to the footer.

  • Other important options you might want to use but not needed in this example are -classpath and -link.

ENVIRONMENT

CLASSPATH
Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the -classpath option. Separate directories with a semicolon, for example:
.;C:\classes;C:\home\java\classes

TROUBLESHOOTING

There is currently no documentation for Javadoc error messages. Troubleshooting tips can be found on the Javadoc FAQ

SEE ALSO

  • javac
  • java
  • jdb
  • javah
  • javap
  • Javadoc Home Page
  • How to Write Doc Comments for Javadoc
  • Setting the Class Path
Please send comments to: javadoc-tool@sun.com

JavadocTM is a trademark of Sun Microsystems, Inc. (The javadoc command itself does not require the trademark symbol.)


javah - C Header and Stub File Generator

javah produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact.

SYNOPSIS

javah [ options ] fully-qualified-classname. . .
javah_g [ options ] fully-qualified-classname. . .

DESCRIPTION

javah generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class.

The name of the header file and the structure declared within it are derived from the name of the class. If the class passed to javah is inside a package, the package name is prepended to both the header file name and the structure name. Underscores (_) are used as name delimiters.

By default javah creates a header file for each class listed on the command line and puts the files in the current directory. Use the -stubs option to create source files. Use the -o option to concatenate the results for all listed classes into a single file.

The new native method interface, Java Native Interface (JNI), does not require header information or stub files. javah can still be used to generate native method function proptotypes needed for JNI-style native methods. javah produces JNI-style output by default, and places the result in the .h file.

javah_g is a non-optimized version of javah suitable for use with debuggers like jdb.

OPTIONS
-o outputfile
Concatenates the resulting header or source files for all the classes listed on the command line into outputfile. Only one of -o or -d may be used.

-d directory
Sets the directory where javah saves the header files or the stub files. Only one of -d or -o may be used.

-stubs
Causes javah to generate C declarations from the Java object file.

-verbose
Indicates verbose output and causes javah to print a message to stdout concerning the status of the generated files.

-help
Print help message for javah usage.

-version
Print out javah version information.

-jni
Causes javah to create an output file containing JNI-style native method function prototypes. This is the default output, so use of -jni is optional.

-classpath path
Specifies the path javah uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by semi-colons. Thus the general format for path is:
   .;<your_path>
For example:
   .;C:\users\dac\classes;C:\tools\java\classes
-bootclasspath path
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in jre\lib\rt.jar and jre\lib\i18n.jar.

-old
Specifies that old JDK1.0-style header files should be generated.

-force
Specifies that output files should always be written.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by semi-colons, for example,
   .;C:\users\dac\classes;C:\tools\java\classes

SEE ALSO

javac, java, jdb, javap, javadoc


javap - The Java Class File Disassembler

Disassembles class files.

SYNOPSIS

   javap [ options ] class. . .

DESCRIPTION

The javap command disassembles a class file. Its output depends on the options used. If no options are used, javap prints out the package, protected, and public fields and methods of the classes passed to it. javap prints its output to stdout. For example, compile the following class declaration:
   import java.awt.*;
   import java.applet.*;

   public class DocFooter extends Applet {
        String date;
        String email;

        public void init() {
                resize(500,100);
                date = getParameter("LAST_UPDATED");
                email = getParameter("EMAIL");
        }

        public void paint(Graphics g) {
                g.drawString(date + " by ",100, 15);
                g.drawString(email,290,15);
        }
   }
The output from javap DocFooter yields:
Compiled from DocFooter.java
public class DocFooter extends java.applet.Applet {
    java.lang.String date;
    java.lang.String email;
    public DocFooter();
    public void init();
    public void paint(java.awt.Graphics);
}
The output from javap -c DocFooter yields:
Compiled from DocFooter.java
public class DocFooter extends java.applet.Applet {
    java.lang.String date;
    java.lang.String email;
    public DocFooter();
    public void init();
    public void paint(java.awt.Graphics);
}

Method DocFooter()
   0 aload_0
   1 invokespecial #1
   4 return

Method void init()
   0 aload_0
   1 sipush 500
   4 bipush 100
   6 invokevirtual #2
   9 aload_0
  10 aload_0
  11 ldc #3
  13 invokevirtual #4
  16 putfield #5
  19 aload_0
  20 aload_0
  21 ldc #6
  23 invokevirtual #4
  26 putfield #7
  29 return

Method void paint(java.awt.Graphics)
   0 aload_1
   1 new #8
   4 dup
   5 invokespecial #9
   8 aload_0
   9 getfield #5
  12 invokevirtual #10
  15 ldc #11
  17 invokevirtual #10
  20 invokevirtual #12
  23 bipush 100
  25 bipush 15
  27 invokevirtual #13
  30 aload_1
  31 aload_0
  32 getfield #7
  35 sipush 290
  38 bipush 15
  40 invokevirtual #13
  43 return

OPTIONS
-help
Prints out help message for javap.

-l
Prints out line and local variable tables.

-b
Ensures backward compatibility with javap in JDK 1.1.

-public
Shows only public classes and members.

-protected
Shows only protected and public classes and members.

-package
Shows only package, protected, and public classes and members. This is the default.

-private
Shows all classes and members.

-Jflag
Pass flag directly to the runtime system. Some examples:
javap -J-version
javap -J-Djava.security.manager -J-Djava.security.policy=MyPolicy MyClassName

-s
Prints internal type signatures.

-c
Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the Java Virtual Machine Specification.

-verbose
Prints stack size, number of locals and args for methods.

-classpath path
Specifies the path javap uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by semi-colons. Thus the general format for path is:

   .;<your_path>
For example:
   .;C:\usrs\dac\classes;C:\tools\java\classes
-bootclasspath path
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in jre\lib\rt.jar and jre\lib\i18n.jar.

-extdirs dirs
Overrides location at which installed extensions are searched for. The default location for extensions is jre\lib\ext.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by semi-colons, for example, For example:
   .;C:\usrs\dac\classes;C:\tools\java\classes

SEE ALSO

javac, java, jdb, javah


jdb - The Java Debugger

jdb helps you find and fix bugs in Java language programs.

SYNOPSIS

jdb [ options ] [ class ] [ arguments ]
options
Command-line options, as specified below.
class
Name of the class to begin debugging.
arguments
Arguments passed to the main() method of class.

DESCRIPTION

The Java Debugger, jdb, is a simple command-line debugger for Java classes. It is a demonstration of the Java Platform Debugger Architecture that provides inspection and debugging of a local or remote Java Virtual Machine.

There are minor incompatibilites between the current version of jdb and previous versions in the areas of command line arguments and supported commands. A strictly compatible version of jdb, oldjdb, is available, but its use is discouraged since it is much less reliable than the new implementation.

Starting a jdb Session

There are many ways to start a jdb session. The most frequently used way is to have jdb launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command jdb for java in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB:
C:\> jdb MyClass
When started this way, jdb invokes a second Java VM with any specified parameters, loads the specified class, and stops the VM before executing that class's first instruction.

Another way to use jdb is by attaching it to a Java VM that is already running. A VM that is to be debugged with jdb must be started with the following options:

option | purpose
-Xdebug | Enables debugging support in the VM
-Xrunjdwp:transport=dt_shmem,server=y,suspend=n | Loads in-process debugging libraries and specifies the kind of connection to be made.

For example, the following command will run the MyClass application, and allow jdb to connect to it at a later time.

C:\> java -Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=n
You can then attach jdb to the VM with the following commmand:
C:\> jdb -attach jdbconn
Note that "MyClass" is not specified in the jdb command line in this case because jdb is connecting to an existing VM instead of launching a new one. The examples above assume that debugging will take place with the default VM. To debug with the classic VM, use the -tclassic option, for example:
C:\> jdb -tclassic MyClass
If you want to attach jdb to a classic VM that is already running, the VM must be started with the following options:

option | purpose
-Xdebug | Enables debugging support in the VM
-Xrunjdwp:transport=dt_shmem,server=y,suspend=n | Loads in-process debugging libraries and specifies the kind of connection to be made.
-Xnoagent | Disables VM support for oldjdb
-Djava.compiler=NONE | Disables the JIT compiler. This is required for debugging under the classic VM

For example, the following command will run the MyClass application with the classic VM, and allow jdb to connect to it at a later time.

C:\> java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=n
You can then attach jdb to the VM with the same commmand:
C:\> jdb -attach jdbconn

There are many other ways to connect the debugger to a VM, and all of them are supported by jdb. The Java Platform Debugger Architecture has additional documentation on these connection options.

Basic jdb Commands

The following is a list of the basic jdb commands. The Java debugger supports other commands which you can list using jdb's help command.

help, or ?
The most important jdb command, help displays the list of recognized commands with a brief description.
run
After starting jdb, and setting any necessary breakpoints, you can use this command to start the execution the debugged application. This command is available only when jdb launches the debugged application (as opposed to attaching to an existing VM).
cont
Continues execution of the debugged application after a breakpoint, exception, or step.
print
Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the dump command below for getting more information about an object.

NOTE: To display local variables, the containing class must have been compiled with the javac -g option.

print supports many simple Java expressions including those with method invocations, for example:

  • print MyClass.myStaticField
  • print myObj.myInstanceField
  • print i + j + k (i, j, k are primities and either fields or local variables)
  • print myObj.myMethod() (if myMethod returns a non-null)
  • print new java.lang.String("Hello").length()
dump
For primitive values, this command is identical to print. For objects, it prints the current value of each field defined in the object. Static and instance fields are included.

The dump command supports the same set of expressions as the print command.

threads
List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example:
4. (java.lang.Thread)0x1 main      running
In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running,
thread
Select a thread to be the current thread. Many jdb commands are based on the setting of the current thread. The thread is specified with the thread index described in the threads command above.
where
where with no arguments dumps the stack of the current thread. where all dumps the stack of all threads in the current thread group. where threadindex dumps the stack of the specified thread.

If the current thread is suspended (either through an event such as a breakpoint or through the suspend command), local variables and fields can be displayed with the print and dump commands. The up and down commands select which stack frame is current.

Breakpoints

Breakpoints can be set in jdb at line numbers or at the first instruction of a method, for example:
  • stop at MyClass:22 (sets a breakpoint at the first instruction for line 22 of the source file containing MyClass)
  • stop in java.lang.String.length (sets a breakpoint at the beginnig of the method java.lang.String.length)
  • stop in MyClass.<init> (<init> identifies the MyClass constructor)
  • stop in MyClass.<clinit> (<clinit> identifies the static initialization code for MyClass)

If a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, "MyClass.myMethod(int,java.lang.String)", or "MyClass.myMethod()".

The clear command removes breakpoints using a syntax as in "clear MyClass:45". Using the clear or command with no argument displays a list of all breakpoints currently set. The cont command continues execution.

Stepping

The step commands advances execution to the next line whether it is in the current stack frame or a called method. The next command advances execution to the next line in the current stack frame.

Exceptions

When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under jdb, however, control returns to jdb at the offending throw. You can then use jdb to diagnose the cause of the exception.

Use the catch command to cause the debugged application to stop at other thrown exceptions, for example: "catch java.io.FileNotFoundException" or "catch mypackage.BigTroubleException. Any exception which is an instance of the specifield class (or of a subclass) will stop the application at the point where it is thrown.

The ignore command negates the effect of a previous catch command.

NOTE: The ignore command does not cause the debugged VM to ignore specific exceptions, only the debugger.

Command Line Options
When you use jdb in place of the Java application launcher on the command line, jdb accepts many of the same options as the java command, including -D, -classpath, and -X<option>.

The following additional options are accepted by jdb:

-sourcepath <dir1;dir2;...>
Uses the given path in searching for source files in the specified path. If this option is not specified, the default path of "." is used.
-attach <address>
Attaches the debugger to previously running VM using the default connection mechanism.
-tclassic
Launches the debugged application with the classic VM.
-launch
Launches the debugged application immediately upon startup of jdb. This option removes the need for using the run command. The debuged application is launched and then stopped just before the initial application class is loaded. At that point you can set any necessary breakpoints and use the cont to continue execution.
-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.
Other options are supported for alternate mechanisms for connecting the debugger and the VM it is to debug. The Java Platform Debugger Architecture has additional documentation on these connection alternatives.

SEE ALSO

javac, java, javah, javap, javadoc, oldjdb.


keytool - Key and Certificate Management Tool

Manages a keystore (database) of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. Also manages certificates from trusted entities.

SYNOPSIS

keytool [ commands ]

DESCRIPTION

keytool is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers.

A certificate is a digitally signed statement from one entity (person, company, etc.), saying that the public key (and some other information) of some other entity has a particular value. (See Certificates.) When data is digitally signed, the signature can be verified to check the data integrity and authenticity. Integrity means that the data has not been modified or tampered with, and authenticity means the data indeed comes from whoever claims to have created and signed it.

keytool stores the keys and certificates in a so-called keystore. The default keystore implementation implements the keystore as a file. It protects private keys with a password.

The jarsigner tool uses information from a keystore to generate or verify digital signatures for Java ARchive (JAR) files. (A JAR file packages class files, images, sounds, and/or other digital data in a single file). jarsigner verifies the digital signature of a JAR file, using the certificate that comes with it (it is included in the signature block file of the JAR file), and then checks whether or not the public key of that certificate is "trusted", i.e., is contained in the specified keystore.

Please note: the keytool and jarsigner tools completely replace the javakey tool provided in JDK 1.1. These new tools provide more features than javakey, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them. The new keystore architecture replaces the identity database that javakey created and managed. It is possible to import the information from an identity database into a keystore, via the -identitydb keytool command.

Keystore Entries

There are two different types of entries in a keystore:
  1. key entries - each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate "chain" for the corresponding public key. The keytool and jarsigner tools only handle the latter type of entry, that is private keys and their associated certificate chains.

  2. trusted certificate entries - each contains a single public key certificate belonging to another party. It is called a "trusted certificate" because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the "subject" (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate.

Keystore Aliases

All keystore entries (key and trusted certificate entries) are accessed via unique aliases. Aliases are case-insensitive; the aliases Hugo and hugo would refer to the same keystore entry.

An alias is specified when you add an entity to the keystore using the -genkey command to generate a key pair (public and private key) or the -import command to add a certificate or certificate chain to the list of trusted certificates. Subsequent keytool commands must use this same alias to refer to the entity.

For example, suppose you use the alias duke to generate a new public/private key pair and wrap the public key into a self-signed certificate (see Certificate Chains) via the following command:

    keytool -genkey -alias duke -keypass dukekeypasswd
This specifies an inital password of "dukekeypasswd" required by subsequent commands to access the private key assocated with the alias duke. If you later want to change duke's private key password, you use a command like the following:
    keytool -keypasswd -alias duke -keypass dukekeypasswd -new newpass
This changes the password from "dukekeypasswd" to "newpass".

Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

Keystore Location

Each keytool command has a -keystore option for specifying the name and location of the persistent keystore file for the keystore managed by keytool. The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property. Given user name uName, the "user.home" property value defaults to
C:\Winnt\Profiles\uName on multi-user Windows NT systems
C:\Windows\Profiles\uName on multi-user Windows 95 systems
C:\Windows on single-user Windows 95 systems
Thus, if the user name is "cathy", "user.home" defaults to
C:\Winnt\Profiles\cathy on multi-user Windows NT systems
C:\Windows\Profiles\cathy on multi-user Windows 95 systems

Keystore Creation

A keystore is created whenever you use a -genkey, -import, or -identitydb command to add data to a keystore that doesn't yet exist.

More specifically, if you specify, in the -keystore option, a keystore that doesn't yet exist, that keystore will be created.

If you don't specify a -keystore option, the default keystore is a file named .keystore in your home directory. If that file does not yet exist, it will be created.

Keystore Implementation

The KeyStore class provided in the java.security package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore.

Currently, two command-line tools (keytool and jarsigner) and a GUI-based tool named Policy Tool make use of keystore implementations. Since KeyStore is publicly available, JDK users can write additional security applications that use it.

There is a built-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password.

Keystore implementations are provider-based. More specifically, the application interfaces supplied by KeyStore are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract KeystoreSpi class, also in the java.security package, which defines the Service Provider Interface methods that "providers" must implement. (The term "provider" refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in How to Implement a Provider for the Java Cryptography Architecture.

Applications can choose different types of keystore implementations from different providers, using the "getInstance" factory method supplied in the KeyStore class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types are not compatible.

keytool works on any file-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The jarsigner and policytool tools, on the other hand, can read a keystore from any location that can be specified using a URL.

For keytool and jarsigner, you can specify a keystore type at the command line, via the -storetype option. For Policy Tool, you can specify a keystore type via the "Change Keystore" command in the Edit menu.

If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the keystore.type property specified in the security properties file. The security properties file is called java.security, and it resides in the JDK security properties directory, java.home\lib\security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Each tool gets the keystore.type value and then examines all the currently-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider.

The KeyStore class defines a static method named getDefaultType that lets applications and applets retrieve the value of the keystore.type property. The following line of code creates an instance of the default keystore type (as specified in the keystore.type property):

    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file:

    keystore.type=jks

To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type.

For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to

    keystore.type=pkcs12
Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks".

Supported Algorithms and Key Sizes

keytool allows users to specify any key pair generation and signature algorithm supplied by any of the registered cryptographic service providers. That is, the keyalg and sigalg options for various commands must be supported by a provider implementation. The default key pair generation algorithm is "DSA". The signature algorithm is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the default signature algorithm is "SHA1withDSA", and if the underlying private key is of type "RSA", the default signature algorithm is "MD5withRSA".

When generating a DSA key pair, the key size must be in the range from 512 to 1024 bits, and must be a multiple of 64. The default key size for any algorithm is 1024 bits.

Certificates

A certificate (also known as a public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key (and some other information) of another entity (the subject) has some specific value.

Let us expand on some of the key terms used in this sentence:

Public Keys
These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures.
Digitally Signed
If some data is digitally signed it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key.
Identity
A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name.
Signature
A signature is computed over some data using the private key of an entity (the signer, which in the case of a certificate is also known as the issuer).
Private Keys
These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures.
Entity
An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree.

Basically, public key cryptography requires access to users' public keys. In a large-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a Certification Authority (CA) can act as a trusted third party. CAs are entities (for example, businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates, as they are bound by legal agreements. There are many public Certification Authorities, such as VeriSign, Thawte, Entrust, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization.

Using keytool, it is possible to display, import, and export certificates. It is also possible to generate self-signed certificates.

keytool currently handles X.509 certificates.

X.509 Certificates

The X.509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X.509 certificates have the following data, in addition to the signature:
Version
This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. keytool can import and export v1, v2, and v3 certificates. It generates v1 certificates.
Serial Number
The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL).
Signature Algorithm Identifier
This identifies the algorithm used by the CA to sign the certificate.
Issuer Name
The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate.)
Validity Period
Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised.
Subject Name
The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity, for example,
    CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US
(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.)
Subject Public Key Information
This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters.

X.509 Version 1 has been available since 1988, is widely deployed, and is the most generic.

X.509 Version 2 introduced the concept of subject and issuer unique identifiers to handle the possibility of reuse of subject and/or issuer names over time. Most certificate profile documents strongly recommend that names not be reused, and that certificates should not make use of unique identifiers. Version 2 certificates are not widely used.

X.509 Version 3 is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: KeyUsage (limits the use of the keys to particular purposes such as "signing-only") and AlternativeNames (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use.

All the data in a certificate is encoded using two related standards called ASN.1/DER. Abstract Syntax Notation 1 describes data. The Definite Encoding Rules describe a single way to store and transfer that data.

X.500 Distinguished Names

X.500 Distinguished Names are used to identify entities, such as those which are named by the subject and issuer (signer) fields of X.509 certificates. keytool supports the following subparts:
  • commonName - common name of a person, e.g., "Susan Jones"

  • organizationUnit - small organization (e.g, department or division) name, e.g., "Purchasing"

  • organizationName - large organization name, e.g., "ABCSystems, Inc."

  • localityName - locality (city) name, e.g., "Palo Alto"

  • stateName - state or province name, e.g., "California"

  • country - two-letter country code, e.g., "CH"

When supplying a distinguished name string as the value of a -dname option, as for the -genkey or -selfcert commands, the string must be in the following format:

CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode

where all the italicized items represent actual values and the above keywords are abbreviations for the following:

    CN=commonName
    OU=organizationUnit
    O=organizationName
    L=localityName
    S=stateName
    C=country

A sample distinguished name string is

CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US
and a sample command using such a string is
keytool -genkey -dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino,
S=California, C=US" -alias mark

Case does not matter for the keyword abbreviations. For example, "CN", "cn", and "Cn" are all treated the same.

Order matters; each subcomponent must appear in the designated order. However, it is not necessary to have all the subcomponents. You may use a subset, for example:

CN=Steve Meier, OU=SunSoft, O=Sun, C=US

If a distinguished name string value contains a comma, the comma must be escaped by a "\" character when you specify the string on a command line, as in

   cn=peter schuster, o=Sun Microsystems\, Inc., o=sun, c=us

It is never necessary to specify a distinguished name string on a command line. If it is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma does not need to be escaped by a "\".

The Internet RFC 1421 Certificate Encoding Standard

Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism.

Certificates read by the -import and -printcert commands can be in either this format or binary encoded.

The -export command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the -rfc option is specified.

The -list command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, while if the -rfc option is specified, the certificate is output in the printable encoding format.

In its printable encoding format, the encoded certificate is bounded at the beginning by

-----BEGIN CERTIFICATE-----

and at the end by

-----END CERTIFICATE-----

Certificate Chains

keytool can create and manage keystore "key" entries that each contain a private key and an associated certificate "chain". The first certificate in the chain contains the public key corresponding to the private key.

When keys are first generated (see the -genkey command), the chain starts off containing a single element, a self-signed certificate. A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

Later, after a Certificate Signing Request (CSR) has been generated (see the -certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see -import), and the self-signed certificate is replaced by a chain of certificates. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject's public key. The next certificate in the chain is one that authenticates the CA's public key.

In many cases, this is a self-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key entry), but the second certificate in the chain is a certificate signed by a different CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain.

Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore.

A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by keytool.

The top-level (root) CA certificate is self-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a "vehicle" to transport the root CA's public key. Before you add the root CA certificate to your keystore, you should view it (using the -printcert option) and compare the displayed fingerprint with the well-known fingerprint (obtained from a newspaper, the root CA's webpage, etc.).

Importing Certificates

To import a certificate from a file, use the -import command, as in

    keytool -import -alias joe -file jcertfile.cer

This sample command imports the certificate(s) in the file jcertfile.cer and stores it in the keystore entry identified by the alias joe.

You import a certificate for two reasons:

  1. to add it to the list of trusted certificates, or

  2. to import a certificate reply received from a CA as the result of submitting a Certificate Signing Request (see the -certreq command) to that CA.

Which type of import is intended is indicated by the value of the -alias option. If the alias exists in the database, and identifies an entry with a private key, then it is assumed you want to import a certificate reply. keytool checks whether the public key in the certificate reply matches the public key stored with the alias, and exits if they are different. If the alias identifies the other type of keystore entry, the certificate will not be imported. If the alias does not exist, then it will be created and associated with the imported certificate.

WARNING Regarding Importing Trusted Certificates

IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate!

View it first (using the -printcert command, or the -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. For example, suppose someone sends or emails you a certificate, and you put it in a file named /tmp/cert. Before you consider adding the certificate to your list of trusted certificates, you can execute a -printcert command to view its fingerprints, as in

  keytool -printcert -file /tmp/cert
    Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll
    Serial Number: 59092b34
    Valid from: Thu Sep 25 18:01:13 PDT 1997 until: Wed Dec 24 17:01:13 PST 1997
    Certificate Fingerprints:
         MD5:  11:81:AD:92:C8:E5:0E:A2:01:2E:D4:7A:D7:5F:07:6F
         SHA1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE
Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside).

Note: it is not required that you execute a -printcert command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the -import command prints out the certificate information and prompts you to verify it. You then have the option of aborting the import operation. Note, however, this is only the case if you invoke the -import command without the -noprompt option. If the -noprompt option is given, there is no interaction with the user.

Exporting Certificates

To export a certificate to a file, use the -export command, as in

    keytool -export -alias jane -file janecertfile.cer
This sample command exports jane's certificate to the file janecertfile.cer. That is, if jane is the alias for a key entry, the command exports the certificate at the bottom of the certificate chain in that keystore entry. This is the certificate that authenticates jane's public key.

If, instead, jane is the alias for a trusted certificate entry, then that trusted certificate is exported.

Displaying Certificates

To print out the contents of a keystore entry, use the -list command, as in

    keytool -list -alias joe
If you don't specify an alias, as in
    keytool -list
the contents of the entire keystore are printed.

To display the contents of a certificate stored in a file, use the -printcert command, as in

    keytool -printcert -file certfile.cer

This displays information about the certificate stored in the file certfile.cer.

Note: This works independently of a keystore, i.e., you do not need a keystore in order to display a certificate that's stored in a file.

Generating a self-signed certificate

A self-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the -genkey command is called to generate a new public/private key pair, it also wraps the public key into a self-signed certificate.

You may occasionally wish to generate a new self-signed certificate. For example, you may want to use the same key pair under a different identity (distinguished name). For example, suppose you change departments. You can then:

  1. copy (clone) the original key entry. See -keyclone.

  2. generate a new self-signed certificate for the cloned entry, using your new distinguished name. See below.

  3. generate a Certificate Signing Requests for the cloned entry, and import the reply certificate or certificate chain. See the -certreq and -import commands.

  4. delete the original (now obsolete) entry. See -delete.

To generate a self-signed certificate, use the -selfcert command, as in
    keytool -selfcert -alias dukeNew -keypass b92kqmp
      -dname "cn=Duke Smith, ou=Purchasing, o=BlueSoft, c=US"
The generated certificate is stored as a single-element certificate chain in the keystore entry identified by the specified alias (in this case "dukeNew"), where it replaces the existing certificate chain.

COMMAND AND OPTION NOTES

The various commands and their options are listed and described below . Note:

  • All command and option names are preceded by a minus sign (-).

  • The options for each command may be provided in any order.

  • All items not italicized or in braces or square brackets are required to appear as is.

  • Braces surrounding an option generally signify that a default value will be used if the option is not specified on the command line. Braces are also used around the -v, -rfc, and -J options, which only have meaning if they appear on the command line (that is, they don't have any "default" values other than not existing).

  • Brackets surrounding an option signify that the user is prompted for the value(s) if the option is not specified on the command line. (For a -keypass option, if you do not specify the option on the command line, keytool will first attempt to use the keystore password to recover the private key, and if this fails, will then prompt you for the private key password.)

  • Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command:
      keytool -printcert {-file cert_file} {-v}

    When specifying a -printcert command, replace cert_file with the actual file name, as in:

      keytool -printcert -file VScert.cer

  • Option values must be quoted if they contain a blank (space).

  • The -help command is the default. Thus, the command line
      keytool
    is equivalent to
      keytool -help

Option Defaults

Below are the defaults for various option values.
-alias "mykey"

-keyalg "DSA"

-keysize 1024

-validity 90

-keystore the file named .keystore in the user's home directory

-file stdin if reading, stdout if writing
The signature algorithm (-sigalg option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the -sigalg option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", -sigalg defaults to "MD5withRSA".

Options that Appear for Most Commands

The -v option can appear for all commands except -help. If it appears, it signifies "verbose" mode; detailed certificate information will be output.

There is also a -Jjavaoption option that may appear for any command. If it appears, the specified javaoption string is passed through directly to the Java interpreter. (keytool is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type java -h or java -X at the command line.

These options may appear for all commands operating on a keystore:

-storetype storetype
This qualifier specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static getDefaultType method in java.security.KeyStore.

-keystore keystore
The keystore (database file) location. Defaults to the file .keystore in the user's home directory, as determined by the "user.home" system property, whose value is described in Keystore Location.

-storepass storepass
The password which is used to protect the integrity of the keystore.

storepass must be at least 6 characters long. It must be provided to all commands that access the keystore contents. For such commands, if a -storepass option is not provided at the command line, the user is prompted for it.

When retrieving information from the keystore, the password is optional; if no password is given, the integrity of the retrieved information cannot be checked and a warning is displayed.

Be careful with passwords - see Warning Regarding Passwords.

-provider provider-class-name
Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file.

Warning Regarding Passwords

Most commands operating on a keystore require the store password. Some commands require a private key password.

Passwords can be specified on the command line (in the -storepass and -keypass options, respectively). However, a password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system.

If you don't specify a required password option on a command line, you will be prompted for it. When typing in a password at the password prompt, the password is currently echoed (displayed exactly as typed), so be careful not to type it in front of anyone.

COMMANDS

See also the Command and Option Notes.

Adding Data to the Keystore

-genkey {-alias alias} {-keyalg keyalg} {-keysize keysize} {-sigalg sigalg} [-dname dname] [-keypass keypass] {-validity valDays} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v1 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by alias.

keyalg specifies the algorithm to be used to generate the key pair, and keysize specifies the size of each key to be generated. sigalg specifies the algorithm that should be used to sign the self-signed certificate; this algorithm must be compatible with keyalg. See Supported Algorithms and Key Sizes.

dname specifies the X.500 Distinguished Name to be associated with alias, and is used as the issuer and subject fields in the self-signed certificate. If no distinguished name is provided at the command line, the user will be prompted for one.

keypass is a password used to protect the private key of the generated key pair. If no password is provided, the user is prompted for it. If you press RETURN at the prompt, the key password is set to the same password as that used for the keystore. keypass must be at least 6 characters long. Be careful with passwords - see Warning Regarding Passwords.

valDays tells the number of days for which the certificate should be considered valid.

-import {-alias alias} {-file cert_file} [-keypass keypass] {-noprompt} {-trustcacerts} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Reads the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted reply) from the file cert_file, and stores it in the keystore entry identified by alias. If no file is given, the certificate or PKCS#7 reply is read from stdin. keytool can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format, or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a string that starts with "-----BEGIN", and bounded at the end by a string that starts with "-----END".

When importing a new trusted certificate, alias must not yet exist in the keystore. Before adding the certificate to the keystore, keytool tries to verify it by attempting to construct a chain of trust from that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore.

If the -trustcacerts option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts", which resides in the JDK security properties directory, java.home\lib\security, where java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment). The "cacerts" file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file using keytool, specifying "jks" as the keystore type. The "cacerts" keystore file ships with five VeriSign root CA certificates with the following X.500 distinguished names:

1. OU=Class 1 Public Primary Certification Authority, O="VeriSign, Inc.",
C=US

2. OU=Class 2 Public Primary Certification Authority, O="VeriSign,
Inc.", C=US

3. OU=Class 3 Public Primary Certification Authority,
O="VeriSign, Inc.", C=US

4. OU=Class 4 Public Primary Certification
Authority, O="VeriSign, Inc.", C=US

5. OU=Secure Server Certification
Authority, O="RSA Data Security, Inc.", C=US

The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the JDK.

If keytool fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! -- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user.

When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the -trustcacerts option was specified).

If the reply is a single X.509 certificate, keytool attempts to establish a trust chain, starting at the certificate reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates used to authenticate the certificate reply form the new certificate chain of alias.

If the reply is a PKCS#7 formatted certificate chain, the chain is first ordered (with the user certificate first and the self-signed root CA certificate last), before keytool attempts to match the root CA certificate provided in the reply with any of the trusted certificates in the keystore or the "cacerts" keystore file (if the -trustcacerts option was specified). If no match can be found, the information of the root CA certificate is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the root CA itself. The user then has the option of aborting the import operation. If the -noprompt option is given, however, there will be no interaction with the user.

The new certificate chain of alias replaces the old certificate chain associated with this entry. The old chain can only be replaced if a valid keypass, the password used to protect the private key of the entry, is supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords.

-selfcert {-alias alias} {-sigalg sigalg} {-dname dname} {-validity valDays} [-keypass keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Generates an X.509 v1 self-signed certificate, using keystore information including the private key and public key associated with alias. If dname is supplied at the command line, it is used as the X.500 Distinguished Name for both the issuer and subject of the certificate. Otherwise, the X.500 Distinguished Name associated with alias (at the bottom of its existing certificate chain) is used.

The generated certificate is stored as a single-element certificate chain in the keystore entry identified by alias, where it replaces the existing certificate chain.

sigalg specifies the algorithm that should be used to sign the certificate. See Supported Algorithms and Key Sizes.

In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it. Be careful with passwords - see Warning Regarding Passwords.

valDays tells the number of days for which the certificate should be considered valid.

-identitydb {-file idb_file} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Reads the JDK 1.1.x-style identity database from the file idb_file, and adds its entries to the keystore. If no file is given, the identity database is read from stdin. If a keystore does not exist, it is created.

Only identity database entries ("identities") that were marked as trusted will be imported in the keystore. All other identities will be ignored. For each trusted identity, a keystore entry will be created. The identity's name is used as the "alias" for the keystore entry.

The private keys from trusted identities will all be encrypted under the same password, storepass. This is the same password that is used to protect the keystore's integrity. Users can later assign individual passwords to those private keys by using the "-keypasswd" keytool command option.

An identity in an identity database may hold more than one certificate, each certifying the same public key. But a keystore key entry for a private key has that private key and a single "certificate chain" (initially just a single certificate), where the first certificate in the chain contains the public key corresponding to the private key. When importing the information from an identity, only the first certificate of the identity is stored in the keystore. This is because an identity's name in an identity database is used as the alias for its corresponding keystore entry, and alias names are unique within a keystore,

Exporting Data

-certreq {-alias alias}
  {-sigalg sigalg} {-file certreq_file}
  [-keypass keypass]
  {-storetype storetype}
  {-keystore keystore} [-storepass storepass]
  [-provider provider_class_name]
  {-v} {-Jjavaoption}

Generates a Certificate Signing Request (CSR), using the PKCS#10 format.

A CSR is intended to be sent to a certificate authority (CA). The CA will authenticate the certificate requestor (usually off-line) and will return a certificate or certificate chain, used to replace the existing certificate chain (which initially consists of a self-signed certificate) in the keystore.

The private key and X.500 Distinguished Name associated with alias are used to create the PKCS#10 certificate request. In order to access the private key, the appropriate password must be provided, since private keys are protected in the keystore with a password. If keypass is not provided at the command line, and is different from the password used to protect the integrity of the keystore, the user is prompted for it.

Be careful with passwords - see Warning Regarding Passwords.

sigalg specifies the algorithm that should be used to sign the CSR. See Supported Algorithms and Key Sizes.

The CSR is stored in the file certreq_file. If no file is given, the CSR is output to stdout.

Use the import command to import the response from the CA.

-export
  {-alias alias}
  {-file cert_file}
  {-storetype storetype}
  {-keystore keystore} [-storepass storepass]
  [-provider provider_class_name]
  {-rfc} {-v} {-Jjavaoption}

Reads (from the keystore) the certificate associated with alias, and stores it in the file cert_file.

If no file is given, the certificate is output to stdout.

The certificate is by default output in binary encoding, but will instead be output in the printable encoding format, as defined by the Internet RFC 1421 standard, if the -rfc option is specified.

If alias refers to a trusted certificate, that certificate is output. Otherwise, alias refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by alias.

Displaying Data

-list {-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v | -rfc} {-Jjavaoption}

Prints (to stdout) the contents of the keystore entry identified by alias. If no alias is specified, the contents of the entire keystore are printed.

This command by default prints the MD5 fingerprint of a certificate. If the -v option is specified, the certificate is printed in human-readable format, with additional information such as the owner, issuer, and serial number. If the -rfc option is specified, certificate contents are printed using the printable encoding format, as defined by the Internet RFC 1421 standard

You cannot specify both -v and -rfc.

-printcert {-file cert_file} {-v} {-Jjavaoption}

Reads the certificate from the file cert_file, and prints its contents in a human-readable format. If no file is given, the certificate is read from stdin.

The certificate may be either binary encoded or in printable encoding format, as defined by the Internet RFC 1421 standard.

Note: This option can be used independently of a keystore.

Managing the Keystore

-keyclone {-alias alias} [-dest dest_alias] [-keypass keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Creates a new keystore entry, which has the same private key and certificate chain as the original entry.

The original entry is identified by alias (which defaults to "mykey" if not provided). The new (destination) entry is identified by dest_alias. If no destination alias is supplied at the command line, the user is prompted for it.

If the private key password is different from the keystore password, then the entry will only be cloned if a valid keypass is supplied. This is the password used to protect the private key associated with alias. If no key password is supplied at the command line, and the private key password is different from the keystore password, the user is prompted for it. The private key in the cloned entry may be protected with a different password, if desired. If no -new option is supplied at the command line, the user is prompted for the new entry's password (and may choose to let it be the same as for the cloned entry's private key).

Be careful with passwords - see Warning Regarding Passwords.

This command can be used to establish multiple certificate chains corresponding to a given key pair, or for backup purposes.

-storepasswd [-new new_storepass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Changes the password used to protect the integrity of the keystore contents. The new password is new_storepass, which must be at least 6 characters long.

Be careful with passwords - see Warning Regarding Passwords.

-keypasswd {-alias alias} [-keypass old_keypass] [-new new_keypass] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Changes the password under which the private key identified by alias is protected, from old_keypass to new_keypass.

If the -keypass option is not provided at the command line, and the private key password is different from the keystore password, the user is prompted for it.

If the -new option is not provided at the command line, the user is prompted for it.

Be careful with passwords - see Warning Regarding Passwords.

-delete [-alias alias] {-storetype storetype} {-keystore keystore} [-storepass storepass] [-provider provider_class_name] {-v} {-Jjavaoption}

Deletes from the keystore the entry identified by alias. The user is prompted for the alias, if no alias is provided at the command line.

Getting Help

-help

Lists all the commands and their options.

EXAMPLES

Suppose you want to create a keystore for managing your public/private key pair and certificates from entities you trust.

Generating Your Key Pair

The first thing you need to do is create a keystore and generate the key pair. You could use a command such as the following:

    keytool -genkey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US"
      -alias business -keypass kpi135 -keystore C:\working\mykeystore
      -storepass ab987c -validity 180

(Please note: This must be typed as a single line. Multiple lines are used in the examples just for legibility purposes.)

This command creates the keystore named "mykeystore" in the "working" directory on the C drive (assuming it doesn't already exist), and assigns it the password "ab987c". It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "JavaSoft", organization of "Sun" and two-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long.

It creates a self-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password "kpi135".

The command could be significantly shorter if option defaults were accepted. As a matter of fact, no options are required; defaults are used for unspecified options that have default values, and you are prompted for any required values. Thus, you could simply have the following:

    keytool -genkey
In this case, a keystore entry with alias "mykey" is created, with a newly-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password.

The rest of the examples assume you executed the -genkey command without options specified, and that you responded to the prompts with values equal to those given in the first -genkey command, above (a private key password of "kpi135", etc.)

Requesting a Signed Certificate from a Certification Authority

So far all we've got is a self-signed certificate. A certificate is more likely to be trusted by others if it is signed by a Certification Authority (CA). To get such a signature, you first generate a Certificate Signing Request (CSR), via the following:

    keytool -certreq -file MarkJ.csr
This creates a CSR (for the entity identified by the default alias "mykey") and puts the request in the file named "MarkJ.csr". Submit this file to a CA, such as VeriSign, Inc. The CA will authenticate you, the requestor (usually off-line), and then will return a certificate, signed by them, authenticating your public key. (In some cases, they will actually return a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.)

Importing a Certificate for the CA

You need to replace your self-signed certificate with a certificate chain, where each certificate in the chain authenticates the public key of the signer of the previous certificate in the chain, up to a "root" CA.

Before you import the certificate reply from a CA, you need one or more "trusted certificates" in your keystore or in the cacerts keystore file (which is described in import command):

  • If the certificate reply is a certificate chain, you just need the top certificate of the chain (that is, the "root" CA certificate authenticating that CA's public key).

  • If the certificate reply is a single certificate, you need a certificate for the issuing CA (the one that signed it), and if that certificate is not self-signed, you need a certificate for its signer, and so on, up to a self-signed "root" CA certificate.

The "cacerts" keystore file ships with five VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate".

A certificate from a CA is usually either self-signed, or signed by another CA (in which case you also need a certificate authenticating that CA's public key). Suppose company ABC, Inc., is a CA, and you obtain a file named "ABCCA.cer" that is purportedly a self-signed certificate from ABC, authenticating that CA's public key.

Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! View it first (using the keytool -printcert command, or the keytool -import command without the -noprompt option), and make sure that the displayed certificate fingerprint(s) match the expected ones. You can call the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show (or that a secure public key repository shows). Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed.

If you trust that the certificate is valid, then you can add it to your keystore via the following:

    keytool -import -alias abc -file ABCCA.cer
This creates a "trusted certificate" entry in the keystore, with the data from the file "ABCCA.cer", and assigns the alias "abc" to the entry.

Importing the Certificate Reply from the CA

Once you've imported a certificate authenticating the public key of the CA you submitted your certificate signing request to (or there's already such a certificate in the "cacerts" file), you can import the certificate reply and thereby replace your self-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (if the CA reply is a chain), or one constructed (if the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the "cacerts" keystore file.

For example, suppose you sent your certificate signing request to VeriSign. You can then import the reply via the following, which assumes the returned certificate is named "VSMarkJ.cer":

    keytool -import -trustcacerts -file VSMarkJ.cer

Exporting a Certificate Authenticating Your Public Key

Suppose you have used the jarsigner tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature.

One way they can do this is by first importing your public key certificate into their keystore as a "trusted" entry. You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named MJ.cer via the following, assuming the entry is aliased by "mykey":

    keytool -export -alias mykey -file MJ.cer
Given that certificate, and the signed JAR file, a client can use the jarsigner tool to authenticate your signature.

Changing Your Distinguished Name but Keeping your Key Pair

Suppose your distinguished name changes, for example because you have changed departments or moved to a different city. If desired, you may still use the public/private key pair you've previously used, and yet update your distinguished name. For example, suppose your name is Susan Miller, and you created your initial key entry with the alias sMiller and the distinguished name
  "cn=Susan Miller, ou=Finance Department, o=BlueSoft, c=us"
Suppose you change from the Finance Department to the Accounting Department. You can still use the previously-generated public/private key pair and yet update your distinguished name by doing the following. First, copy (clone) your key entry:
    keytool -keyclone -alias sMiller -dest sMillerNew
(This prompts for the store password and for the initial and destination private key passwords, since they aren't provided at the command line.) Now you need to change the certificate chain associated with the copy, so that the first certificate in the chain uses your different distinguished name. Start by generating a self-signed certificate with the appropriate name:
    keytool -selfcert -alias sMillerNew
      -dname "cn=Susan Miller, ou=Accounting Department, o=BlueSoft, c=us"

Then generate a Certificate Signing Request based on the information in this new certificate:

    keytool -certreq -alias sMillerNew
When you get the CA certificate reply, import it:
    keytool -import -alias sMillerNew -file VSSMillerNew.cer
After importing the certificate reply, you may want to remove the initial key entry that used your old distinguished name:
    keytool -delete -alias sMiller

SEE ALSO

  • jar tool documentation

  • jarsigner tool documentation

  • the Security trail of the Java Tutorial for examples of the use of keytool


oldjdb - The Old Java Debugger

oldjdb helps you find and fix bugs in Java language programs.

SYNOPSIS

oldjdb [ options ] [ class ] [ arguments ]
options
Command-line options, as specified below.
class
Name of the class to begin debugging.
arguments
Arguments passed to the main() method of class.

DESCRIPTION

The old Java Debugger, oldjdb, provides strict compatibility with the jdb tool provided with previous versions of the Java 2 SDK. Use of the new version of jdb is strongly recommended over oldjdb since it is considerably more reliable. The oldjdb tool is a dbx-like command-line debugger for Java classes. It uses the sun.tools.debug API to provide inspection and debugging of a local or remote Java interpreter.

The oldjdb tool debugs applications running under the classic VM only.

Starting a oldjdb Session

Like dbx, there are two ways oldjdb can be used for debugging. The most frequently used way is to have oldjdb start the Java interpreter with the class to be debugged. This is done by substituting the command oldjdb for java in the command line. For example, to start the AppletViewer under oldjdb, you use the following:
C:\> oldjdb sun.applet.AppletViewer
or
C:\> oldjdb -classpath %INSTALL_DIR%\classes sun.applet.AppletViewer
When started this way, oldjdb invokes a second Java interpreter with any specified parameters, loads the specified class, and stops the interpreter before executing that class's first instruction.

The second way to use oldjdb is by attaching it to a Java interpreter that is already running. For security reasons, Java interpreters can only be debugged if they have been started with the -Xdebug option. When started with the -Xdebug option, the Java interpreter prints out a password for oldjdb's use. In addition, the debugged interpreter must not be run with a JIT compiler. Use the option -Djava.compiler=NONE to disable the loading of any JIT compiler. Special debugger classes must be available to the debugged interpreter. These classes are not part of the default runtime class library. Use the option -Xbootclasspath:%INSTALL_DIR%\jre\lib\rt.jar;%INSTALL_DIR%\lib\tools.jar to allow the debugged interpreter to locate all necessary classes. To summarize, launch the Java interpreter as follows:

   % java -classic -Xdebug -Djava.compiler=NONE   \
     -Xbootclasspath:%INSTALL_DIR%\jre\lib\rt.jar;%INSTALL_DIR%\lib\tools.jar <class>

To attach oldjdb to a running Java interpreter (once the session password is known), invoke it as follows:

C:\> oldjdb -host <hostname> -password <password>

Basic oldjdb Commands

The following is a list of the basic oldjdb commands. The Java debugger supports other commands which you can list using oldjdb's help command.

NOTE: To browse local (stack) variables, the class must have been compiled with the -g option.

help, or ?
The most important oldjdb command, help displays the list of recognized commands with a brief description.
print
Browses Java objects. The print command calls the object's toString() method, so it will be formatted differently depending on its class.

Classes are specified by either their object ID or by name. If a class is already loaded, a substring can be used, such as Thread for java.lang.Thread.

print supports Java expressions, such as print MyClass.clsVar. Method invocation is not currently supported.

dump
Dumps an object's instance variables. Objects are specified by their object ID (a hexadecimal integer).

Classes are specified by either their object ID or by name. If a class is already loaded, a substring can be used, such as Thread for java.lang.Thread. If a class isn't loaded, its full name must be specified, and the class will be loaded as a side effect. This is needed to set breakpoints in referenced classes before an applet runs.

The dump command supports Java expressions such as dump 0x12345678.myCache[3].foo. Method invocation is not currently supported.

threads
List the threads. Threads are referenced by their object ID.

where
where with no arguments dumps the stack of the current thread (which is set with the thread command). where all dumps the stack of all threads in the current thread group. where threadid dumps the stack of the specified thread. threadid takes the form of t@<index>, such as t@3. If a requested thread is suspended (either because it's at a breakpoint or via the suspend command), local (stack) and instance variables can be browsed with the print and dump commands. The up and down commands select which stack frame is current.

Breakpoints

Breakpoints are set in oldjdb in classes, such as "stop at MyClass:45". The source file line number must be specified, or the name of the method (the breakpoint will then be set at the first instruction of that method). The clear command removes breakpoints using a syntax as in "clear MyClass:45". Using the clear command with no argument displays a list of all breakpoints currently set. The cont command continues execution. Single-stepping is available via step.

Exceptions

When an exception occurs for which there isn't a catch statement anywhere up a Java program's stack, the Java runtime normally dumps an exception trace and exits. When running under oldjdb, however, that exception is treated as a non-recoverable breakpoint, and oldjdb stops at the offending instruction. If that class was compiled with the -g option, instance and local variables can be printed to determine the cause of the exception.

Specific exceptions may be caught with the catch command, for example: "catch FileNotFoundException" or "catch mypackage.BigTroubleException. The Java debugging facility keeps a list of these exceptions, and when one is thrown, it is treated as if a breakpoint had been on the instruction which caused the exception. The ignore command removes exception classes from this list.

NOTE: The ignore command does not cause the Java interpreter to ignore specific exceptions, only the debugger.

OPTIONS
When you use oldjdb in place of the Java interpreter on the command line, oldjdb accepts the same options as the java command.

When you use oldjdb to attach to a running Java interpreter session, oldjdb accepts the following options:

-host <hostname>
Sets the name of the host machine on which the interpreter session to attach to is running.
-password <password>
"Logs in" to the active interpreter session. This is the password printed by the Java interpreter prints out when invoked with the -Xdebug option.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by semi-colons, for example,
    .;C:\users\dac\classes;C:\tools\java\classes

SEE ALSO

javac, java, javah, javap, javadoc


Policy Tool - Policy File Creation and Management Tool

Policy Tool -

Policy File Creation and Management Tool

Creates and modifies the external policy configuration files that define your installation's Java security policy.

Table of Contents

Introduction

Permissions and Policy Files Overview
Permissions
Default Policy Files and Their Locations
Policy File Contents

Policy Tool Usage
Starting Policy Tool
Creating a new Policy File
Opening a Different Policy File
Specifying the Keystore
Adding a New Policy Entry
Adding a New Permission
Editing a Permission
Removing a Permission
Completing the Addition of a Policy Entry
Editing a Policy Entry
Removing a Policy Entry
Saving the Policy File
Exiting the Policy Tool
Viewing the Warning Log

Examples
Starting Creation of the User Policy File
Adding a Policy Entry
Specifying a Keystore
Adding a Policy Entry with a SignedBy alias
Saving the User Policy File
Exiting Policy Tool

See Also

Introduction

The policy for a Java runtime, specifying which permissions are available for code from various sources, is represented by a Policy object. The default Policy implementation obtains its information from static ASCII policy configuration files.

A policy file can be composed via a simple text editor, or via the graphical Policy Tool utility described in this document. Using the Policy Tool saves typing and eliminates the need for you to know the required syntax of policy files, thus reducing errors.

The Permissions and Policy Files Overview section of this document describes what permissions are, and provides information about policy file contents and default policy files. It also supplies links to more detailed discussions of these topics.

The Policy Tool Usage section describes how to use the Policy Tool to create and modify policy files.

The Examples section provides detailed examples of the use of Policy Tool.

The See Also section provides links to related documentation.

Permissions and Policy Files Overview

This section briefly describes what permissions are, and provides information about policy file contents and default policy files.

Permissions

A permission represents access to a system resource. In order for a resource access to be allowed for an applet (or an application running with a security manager), the corresponding permission must be explicitly granted to the code attempting the access.

A permission typically has a name (often referred to as a "target name") and, in some cases, a comma-separated list of one or more actions. For example, to create a permission to read the file named "abc" in the D:\tmp\ directory, you'd create a File Permission (technically, a java.io.FilePermission permission) with target name "D:\tmp\abc" and action string "read".

In the default Policy implementation, code trying to read the file must be granted the specified permission by a "policy entry" (sometimes referred to as a "grant entry") in a policy configuration file. The Policy Tool can be used to create such an entry in such a file.

The Permissions document contains tables that describe the built-in permission types and that discuss the risks of granting each permission. It also contains tables showing the methods that require permissions to be in effect in order to be successful, and for each lists the required permission.

Default Policy Files and Their Locations

There is by default a single system-wide policy file, and an optional user policy file.

The system policy file is by default located at

    java.home\lib\security\java.policy

Here, java.home is the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

The user policy file is by default located at

    user.home\.java.policy

Here, user.home indicates the user's home directory.

When the Policy is initialized, the system policy is loaded in first, and then the user policy is added to it. If neither policy is present, a built-in policy is used. This built-in policy is the same as the original sandbox policy.

Policy file locations are specified in the security properties file, which is located at

    java.home\lib\security\java.security
The policy file locations are specified as the values of properties whose names are of the form
    policy.url.n
Here, n indicates a number. You specify each such property value in a line of the following form:
policy.url.n=URL
Here, URL is a URL specification. For example, the default policy files, sometimes referred to as the "system" and "user" policy files, respectively, are defined in the security properties file as
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy

Note: when a string like

    ${some.property}
appears in a policy file, or in the security properties file, it will be expanded to the value of the specified system property. For example,
    ${java.home}
indicates the value of the java.home property specifying the runtime environment's directory (the jre directory in the SDK or the top-level directory of the Java 2 Runtime Environment).

Whether or not property expansion is allowed is controlled by the value of the "policy.expandProperties" property in the security properties file. If the value of this property is true (the default), expansion is allowed.

You can actually specify a number of URLs in the security properties file (including ones of the form "http://"), and all the designated policy files will get loaded. You can also comment out or change the second one to disable reading the default user policy file.

The algorithm starts at policy.url.1, and keeps incrementing until it does not find a URL. Thus if you have policy.url.1 and policy.url.3, policy.url.3 will never be read.

It is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command-line argument, which sets the value of the java.security.policy property. For example, if you type the following, where pURL is a URL indicating the location of a policy file, then the specified policy file will be loaded in addition to all the policy files that are specified in the security properties file.

  java -Djava.security.manager -Djava.security.policy=pURL SomeApp
(The "-Djava.security.manager" argument ensures that the default security manager is installed, and thus the application is subject to policy checks. It is not required if the application SomeApp installs a security manager.)

If you instead type the following, using a double equals, then just the specified policy file will be used; all others will be ignored.

  java -Djava.security.manager -Djava.security.policy==pURL SomeApp

If you want to pass a policy file to the appletviewer, again use a "-Djava.security.policy" argument as follows:

  appletviewer -J-Djava.security.policy=pURL  myApplet
Please note: The "-Djava.security.policy" policy file value will be ignored (for both java and appletviewer commands) if the "policy.allowSystemProperty" property in the security properties file is set to false. The default is true.

Policy File Contents

A policy configuration file (policy file, for short) indicates what permissions are allowed for code from specified code sources.

A policy configuration file contains a list of entries. It may contain a single "keystore" entry, and contains zero or more "policy" (or "grant") entries.

A keystore is a database of private keys and their associated digital certificates such as X.509 certificate chains authenticating the corresponding public keys. The keytool utility is used to create and administer keystores. The keystore specified in a policy configuration file is used to look up the public keys of the signers (if any) specified in the grant entries of the file. Public keys are used to verify the digital signatures used to sign the code.

A keystore entry must appear in a policy configuration file if any policy entries specify signer aliases.

At this time, there can be only one keystore entry in the policy file. The keystore entry specifies the URL location of the keystore and optionally the keystore type. The URL is relative to the policy file location. Thus if the policy file is specified in the security properties file as:

  policy.url.1=http://foo.bar.com/blah/some.policy
and that policy file has a keystore entry with value ".keystore" then the keystore will be loaded from:
  http://foo.bar.com/blah/.keystore
The URL can also be absolute.

A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. If you don't specify a type, it is assumed to be that specified by the "keystore.type" property value in the security properties file. The value is initially "JKS", specifying a proprietary keystore type supported by Sun Microsystems.

Code being executed is always considered to come from a particular "code source". The code source may include not only the CodeBase location (URL) where the applet (or application) originated from, but also a reference to one or more (symbolic) alias names from a keystore specifying the keystore entries containing the public key(s) corresponding to the private key(s) used to sign the code.

Each policy entry in the policy file contains the following:

  • an optional CodeBase entry specifying the URL location where the code originates from,

  • an optional SignedBy entry specifying the alias name from the keystore used to reference the signer whose private key was used to sign the code, and

  • one or more permission entries specifying which permissions are granted to code from the specified CodeBase and signed by the specified SignedBy alias.

Policy Tool Usage

Starting Policy Tool

To start Policy Tool, simply type the following at the command line.
  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Blank Policy Tool window

You can then proceed to either open whatever policy file you want to work on or create a new policy file, by adding policy entries, optionally specifying a keystore, and saving the file).

The first time you run the Policy Tool, there will not be a user policy file (unless you created one manually).

Creating a new Policy File

To create a new policy file, start by simply selecting the New command from the File menu. This will close the currently open policy file (if any, after first prompting you to save it if needed) and bring up a new policy tool window, that is, a window with headings and buttons but no data in it.

Please Note: this is not necessary the first time you run the Policy Tool. Since the tool tries to open the user policy file and one doesn't exist yet (unless it was created manually), the tool will bring up a window without any data in it.

Once you have a new policy tool window, you can then create the policy entries, and specify the keystore (if any of the policy entries specify a keystore alias). At any point, you can save the policy file.

Opening a Different Policy File

To work on a different policy file than the one currently being worked on (if any), use the Open command in the File menu.

This will close the currently open policy file (if any, after first prompting you to save it if needed) and will present you with an Open dialog, which you can use to navigate the directory structure until you get to the directory containing the policy file you want to work on. Select that file, then select the Open button.

The "Policy Tool" window will then be filled in with information from the policy file, including the policy file name, the keystore URL (if any), and the CodeBase and SignedBy parts of each policy entry in the policy file.

Specifying the Keystore

To specify the keystore containing the key information for the aliases specified in the SignedBy parts of policy entries, select the Change Keystore command in the Edit menu.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the Tests directory on the D: drive, type the following file: URL into the text box labeled "New KeyStore URL".

  file:/D:/Tests/mykeystore
To also specify that the keystore type is "JKS" (the proprietary keystore type supported by Sun Microsystems), type the following into the text box labeled "New KeyStore Type".
  JKS

Note: the "New KeyStore URL" value is a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the keystore is actually on a Windows system.

When you are done specifying the keystore URL and type (if any), select OK (or you can select Cancel to cancel the operation). If you didn't cancel, the text box labeled "Keystore:" is now filled in with the keystore URL and type.

Adding a New Policy Entry

To add a new policy entry, select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Blank Add Entry Dialog

Using this dialog box, you specify

  • an optional CodeBase entry indicating the URL location where the code originates from. For example, to indicate code from the local JavaSoft\TESTS\ directory on the D: drive, type the following file URL into the CodeBase text box:
      file:/D:/JavaSoft/TESTS/

    Note: a CodeBase value contains a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the code source is actually on a Windows system.

  • an optional SignedBy entry indicating the alias name from the keystore used to reference the signer whose private key was used to sign the code. For example, to indicate the alias named "duke", simply type the following into the SignedBy text box:
      duke

  • one or more permission entries indicating which permissions are granted to the code from the source indicated by the CodeBase and SignedBy values (or to any code if no such values are specified). See Adding a New Permission.

The SignedBy value is a string alias that is mapped (using the keystore) to a set of public keys that are associated with the signers. These keys are used to verify that classes from the specified code source are really signed by these signers.

The SignedBy value can be a comma-separated string containing names of multiple signers, an example of which is "Adam,Eve,Charles", which means "signed by Adam and Eve and Charles" (i.e., the relationship is AND, not OR).

The SignedBy value is optional in that, if it is omitted, it signifies "any signer," or in other words, it doesn't matter whether the code is signed or not. Similarly, if there is no CodeBase entry, then it signifies "any code"; it doesn't matter where the code originates from.

Thus, if there is no CodeBase entry, then all code signed by the specified alias(es) will be granted the specified permissions. If there is no SignedBy entry, then all code from the specified CodeBase will be granted the specified permissions, regardless of whether the code is signed or not, and by whom. If there is no CodeBase entry, and also no SignedBy entry, then all code will be granted the specified permissions.

Note: The exact meaning of a CodeBase value depends on the characters at the end. A CodeBase with a trailing "/" matches all class files (not JAR files) in the specified directory. A CodeBase with a trailing "/*" matches all files (both class and JAR files) contained in that directory. A CodeBase with a trailing "/-" matches all files (both class and JAR files) in the directory and recursively all files in subdirectories contained in that directory.

Adding a New Permission

To add a new permission, select the Add Permission button in the "Policy Entry" dialog box. This brings up the "Permissions" dialog box:

Blank Add Permissions Dialog

To add the permission:

  1. Type or select a permission type.

    The drop-down list labeled "Permission:" contains a list of built-in permission types. If you want such a type, select it from the list, and the complete permission type name appears in the text box to the right of the drop-down list.

    If you instead want to specify a permission type defined by you or others, type the permission type into the text box.

  2. Type or select a permission target name.

    If you selected a built-in permission from the "Permission:" drop-down list, and permissions of that type have specific target name values, then the drop-down list labeled "Target Name:" contains a list of those values, from which you can choose.

    In some cases, where the target name possibilities are infinite but there are some built-in target name specifications that have special meaning, such target names will appear in the drop-down list. For example, the special target name of "<<All Files>>" will appear in the list for File Permissions.

    To specify a target name not available in the drop-down list, type the target name directly into the text box to the right of the "Target Name:" drop-down list. For example, to specify the file named data in the JavaSoft\ptTest\ directory on the D: drive, type

      D:\JavaSoft\ptTest\data

  3. Type or select one or more actions, if actions are relevant.

    Some permissions just have a target name, but no actions. For such permissions, leave the text box to the right of the "Actions:" drop-down list blank. (It will automatically be darkened and unavailable for this type of built-in permission.)

    For permissions requiring action specifications, type the comma-separated list of actions into the text box, or select them from the drop-down list. For example, to specify both read and write access to a file specified for a File Permission, first select read (or write, order doesn't matter) from the list. The word "read" appears in the text box. Then select write, and the word "write" will be appended, preceded by a comma and a space.

  4. Type a SignedBy alias into the text box to the right of the "Signed By" label, if required. The SignedBy value for a permission entry is optional. If present, it indicates a signed permission. That is, the permission class itself must be signed by the given alias(es) in order for the permission to be granted.
When you are done specifying the permission information, select the OK button (or Cancel to cancel). The new permission appears in a line in the "Policy Entry" dialog.

You can then add additional permissions by following the same sequence of steps. Or you can edit an existing permission or remove a permission.

Editing a Permission

To edit an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Edit Permission button. Alternatively, you can simply double-click the line for that permission.

This brings up the same type of "Permissions" dialog box as appears when you are adding a new permission, except in this case the dialog box is filled in with the existing permission information. To change the information, either make new selections from the drop-down lists or replace the information in the text boxes.

When you are done, select the OK button (or Cancel to cancel changes). The "Policy Entry" dialog now shows the permission with any modifications you made.

Removing a Permission

To remove an existing permission, select the line for that permission in the "Policy Entry" dialog box, then select the Remove Permission button.

Completing the Addition of a Policy Entry

Once you are done adding a policy entry, select the Done button in the "Policy Entry" dialog, or Cancel to cancel.

If you selected Done, the "Policy Tool" window now contains a line representing the policy entry. The line just contains the CodeBase and SignedBy information (if any). If neither was specified in the "Policy Entry" dialog, just

  CodeBase <ALL>
appears.

Note: a warning is displayed upon closing the policy entry if it contains any SignedBy aliases that don't yet exist in your keystore. Select OK and make a note to create such an alias, or edit the policy entry to fix the alias if was wrong.

Editing a Policy Entry

To edit an existing policy entry, select the line for that entry in the main "Policy Tool" window, then select the Edit Policy Entry button. Alternatively, you can simply double-click the line for that entry.

This brings up the same type of "Policy Entry" dialog box as appears when you are adding a new policy entry, except in this case the dialog box is filled in with the existing policy entry information. To change the information, simply retype it (for the CodeBase and SignedBy values) or add, remove , or modify permissions.

When you are done, select the Done button (or Cancel to cancel).

Removing a Policy Entry

To delete a policy entry from the policy file, select the line for that entry in the main "Policy Tool" window, then select the Remove Policy Entry button.

The complete policy entry is displayed, and you can then either select OK to remove the entry, or Cancel to keep it.

Saving the Policy File

To save changes to an existing policy file, simply select the Save command in the File menu.

To save a new policy file you've been creating, or to copy an existing policy file to a new policy file with a different name, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to the directory in which you want to save the policy file. Type the desired file name, then select the Save button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File:"

Exiting the Policy Tool

To exit Policy Tool, select the Exit command from the File menu.

Viewing the Warning Log

If Policy Tool ever reports that warnings have been stored in the Warning Log, you can view the log by selecting the View Warning Log command in the Edit menu.

For example, if you have a policy file with a Keystore URL specifying a keystore that doesn't yet exist, you will get such a warning at various times, e.g., when you open the file. You can continue to work on the policy file even if warnings exist.

Note Regarding File Specifications

Note: On Windows systems, when you type a file name and path into a Policy Tool dialog box (e.g., as a FilePermission target name), you can use any of the following as the directory separator:

  • a single backslash, as in D:\Temp\data
  • a double backslash, as in D:\\Temp\\data
  • a slash, as in D:/Temp/data
Single backslashes are the "normal" Windows directory separators, and slashes are also accepted.

However, policy files themselves cannot contain single backslashes. When a policy file is read, the strings are processed by a tokenizer, which allows "\" to be used as an escape string (e.g., "\n" to indicate a new line) and which thus requires two backslashes to indicate a single backslash.

If you use single backslashes as your separators, Policy Tool automatically converts them to double backslashes (e.g., after you select OK in the Permissions dialog box), for your convenience.

Note Regarding Windows "Home" Directories

The user policy file is by default the file named .java.policy in your "home directory," as determined by the user.home system property value. Given user name uName, the user.home property value defaults to
  C:\Winnt\Profiles\uName on multi-user Windows NT systems
  C:\Windows\Profiles\uName on multi-user Windows 95 systems
  C:\Windows on single-user Windows 95 systems
Thus, if the user name is "cathy", user.home defaults to
  C:\Winnt\Profiles\cathy on multi-user Windows NT systems
  C:\Windows\Profiles\cathy on multi-user Windows 95 systems
  C:\Windows on single-user Windows 95 systems

Examples

The following examples show how to
  • create the user policy file from scratch

  • add a policy entry

  • specify a keystore

  • add a policy entry for signed code

  • save the user policy file, and

  • exit the Policy Tool

Starting Creation of the User Policy File

Initially, there is no user policy file (unless you created one manually). So to create the user policy file, first simply start Policy Tool by typing the following at the command line.

  policytool

This brings up the "Policy Tool" window.

Whenever Policy Tool is started, it tries to fill in this window with policy information from what is sometimes referred to as the "user policy file". The user policy file is by default a file named .java.policy in your home directory. If Policy Tool cannot find the user policy file, it reports the situation and displays a blank "Policy Tool" window (that is, a window with headings and buttons but no data in it):

Blank Policy Tool window

You can now create the user policy file by adding entries and saving the file.

Adding a Policy Entry

Suppose you want to grant all classes from the Tests\ directory on the D: drive permission to read the file named mydata in the D:\Temp\data\ directory. To do so, first select the Add Policy Entry button in the main "Policy Tool" window.

This brings up a "Policy Entry" dialog box:

Blank Add Entry Dialog

Using this dialog box, type the file URL

  file:/D:/Tests/
into the CodeBase text box. (Note, this is a URL and thus must always have slashes, not backslashes.)

Leave the SignedBy text box blank, since you aren't requiring the code to be signed.

To add the permission, select the Add Permission button. This brings up the "Permissions" dialog box:

Blank Add Permissions Dialog

To add the permission:

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:":
      D:\Temp\data\mydata
  3. Specify read access by selecting "read" from the "Actions:" drop-down list.
Now the "Permission" dialog box looks like the following:

First File Permission

When you are done specifying the permission information, select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

First Policy Entry

Note: Each backslash in the file path you typed has been replaced with two backslashes, as described in Note Regarding File Specifications.

You are now done specifying this policy entry, so select the Done button. The "Policy Tool" window now contains a line representing the policy entry. The line just contains the CodeBase value:

Policy Tool with one CodeBase

Specifying a Keystore

Suppose you also want to grant any code from the URL "http://java.sun.com/" and signed by the alias "duke" read access to all files in the D:\tmp\ directory. Suppose you also want to give such code permission to initiate outgoing socket connections to any hosts. You need to do two things:
  1. Specify the keystore containing the alias, and

  2. Create the policy entry granting the permissions.
To specify the keystore containing the key information for the aliases specified in any SignedBy parts of policy entries, select the Change Keystore command in the Edit menu of the main "Policy Tool" window.

This brings up a dialog box in which you specify the new keystore URL and optionally the keystore type.

As an example, to specify the keystore named "mykeystore" in the Tests directory on the D: drive, type the following file: URL into the text box labeled "New KeyStore URL":

  file:/D:/Tests/mykeystore
If the keystore type is the default type, as specified by the "keystore.type" property value in the security properties file, you don't need to type a "New KeyStore Type" value. The default value of that property is "JKS" (the proprietary keystore type supported by Sun Microsystems).

To specify the keystore type, type its value into the text box labeled "New KeyStore Type." For example, to indicate that the keystore type is "JKS" type

  JKS
The result is:

Note: the "New KeyStore URL" value is a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the keystore is actually on a Windows system.

When you are done specifying the keystore URL and type, select OK. The text box labeled "Keystore:" is now filled in with the URL and type.

Next, you need to specify the policy entry:

Adding a Policy Entry with a SignedBy alias

Select the Add Policy Entry button in the main "Policy Tool" window. This brings up the "Policy Entry" dialog box. Type the following into the the CodeBase text box:
  http://java.sun.com/*
The "*" indicates that both class and JAR files in the specified directory are to be considered to match this CodeBase.

Now, type the following alias into the SignedBy text box:

  duke

To add the first permission, select the Add Permission button. This brings up the "Permissions" dialog box. Do the following

  1. Select "File Permission" from the "Permission:" drop-down list. The complete permission type name (java.io.FilePermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all files in the D:\tmp\ directory:
      D:\tmp\*
  3. Specify read access by selecting "read" from the "Actions:" drop-down list.
Now the "Permissions" dialog box looks like the following:

Second File Permission

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Now you need to add the other permission. Select the Add Permission button. In the "Permissions" dialog box, do the following

  1. Select "Socket Permission" from the "Permission:" drop-down list. The complete permission type name (java.net.SocketPermission) now appears in the text box to the right of the drop-down list.

  2. Type the following in the text box to the right of the list labeled "Target Name:" to specify all hosts:
      *
  3. Specify permission to make connections by selecting "connect" from the "Actions:" drop-down list.
Now the "Permissions" dialog box looks like the following:

Select the OK button. The new permission appears in a line in the "Policy Entry" dialog.

Policy Entry with Two Permissions

Note: Each backslash in the file path you typed has been replaced with two backslashes, as described in Note Regarding File Specifications.

You are now done specifying this policy entry, so select the Done button in the "Policy Entry" dialog. The "Policy Tool" window now contains a line representing the policy entry, showing the CodeBase and SignedBy values.

Policy Tool with Two Entries

Saving the User Policy File

Let's assume you're working on a Win95 system and you want to save the policy file you've been creating with the default name (.java.policy) in the default location (C:\Windows\).

To save the user policy file, select the Save As command from the File menu. This brings up the Save As dialog box.

Navigate the directory structure to get to the Windows directory on the C: drive. Type

  .java.policy
(note the initial period) as the file name, then select the Save button. The policy file is now saved, and its name and path are shown in the text box labeled "Policy File:"

Policy Tool with Two Entries, Keystore, and Policy File Name

Exiting Policy Tool

When you want to exit Policy Tool, do so by selecting the Exit command from the File menu.

See Also

  • Permissions

  • Default Policy Information and Policy File Syntax

  • keytool tool documentation

  • Security Architecture Specification

  • The Security trail of the Java Tutorial for examples of the use of the security tools including Policy Tool


rmic - The Java RMI Stub Compiler

rmic generates stubs, skeletons, ties for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.

SYNOPSIS

rmic [ options ] package-qualified-class-name(s)

DESCRIPTION

The rmic compiler generates stub, and skeleton class files (JRMP protocol), and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from the compiled Java programming language classes that contain remote object implementations. A remote object is one that implements the interface java.rmi.Remote. The classes named in the rmic command must be classes that have been compiled successfully with the javac command and must be fully package qualified. For example, running rmic on the class file name HelloImpl as shown here:
rmic hello.HelloImpl
creates the HelloImpl_Skel.class and HelloImpl_Stub.class files in the hello subdirectory (named for the class's package).

A skeleton for a remote object is a JRMP protocol server-side entity that contains a method which dispatches calls to the actual remote object implementation.

A tie for a remote object is a server-side entity similar to a skeleton, but which communicates with the client using the IIOP protocol.

A stub is a proxy for a remote object which is responsible for forwarding method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub. JRMP protocol stubs are generated by default. Use the -iiop option to generate stubs for the IIOP protocol.

The stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements exactly the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built-in operators for casting and type checking. For IIOP, the PortableRemoteObject.narrow method must be used.

OPTIONS

-bootclasspath path
Override location of bootstrap class files

-classpath path
Specifies the path rmic uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by semi-colons. Thus the general format for path is:
.;<your_path>
For example:
.;C:\usr\local\java\classes
-d directory
Specifies the destination root directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, tie, and skeleton files. For example, the command

Windows:

% rmic -d C:\java\classes foo.MyClass

Solaris:

% rmic -d /java/classes foo.MyClass
would place the stub and skeleton classes derived from MyClass into the directory C:\java\classes\foo. If the -d option is not specified, the default behavior is as if "-d ." were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. Note that in previous versions of rmic, if -d was not specified the package hierarchy was not created, and the output files were placed directly in the current directory.
-depend
Makes the compiler consider recompiling classes which are referenced from other classes. Normally, it only recompiles missing or out-of-date classes that are referred to from source code.

-extdirs path
Override location of installed extensions

-g
Enables generation of debugging tables. Debugging tables contain information about line numbers and local variables - information used by Java debugging tools. By default, only line numbers are generated.

-idl
Causes rmic to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the Java Language to IDL Mapping (OMG) document for a complete description.

When the -idl option is used, other options also include:

-always or -alwaysgenerate
Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
-factory
Uses factory keyword in generated IDL.
-idlModule fromJavaPackage[.class] toIDLModule
Specifies IDLEntity package mapping. For example: -idlModule foo.bar my::real::idlmod.
-idlFile fromJavaPackage[.class] toIDLFile
Specifies IDLEntity file mapping. For example: -idlFile test.pkg.X TEST16.idl.

-iiop
Causes rmic to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

Invoking rmic with the -iiop generates stubs and ties that conform to this naming convention:

_<implementationName>_stub.class

_<interfaceName>_tie.class

When the -iiop option is used, other options also include:

-always or -alwaysgenerate
Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
-nolocalstubs
Do not create stubs optimized for same-process clients and servers.
-noValueMethods
Must be used with the -idl option. Prevents addition of valuetype methods and initializers to emitted IDL. These methods and initializers are optional for valuetypes, and are generated unless the -noValueMethods option is specified when using the -idl option.

-J
Used in conjunction with any java option, it passes the option following the -J (no spaces between the -J and the option) on to the java interpreter.

-keep or -keepgenerated
Retains the generated .java source files for the stubs and skeletons and writes them to the same directory as the .class files.

-nowarn
Turns off warnings. If used the compiler does not print out any warnings.

-sourcepath path
Specify where to find user source files

-vcompat
(default) Creates stubs and skeletons compatible with both 1.1 and 1.2 JRMP stub protocol versions.

-verbose
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.

-v1.1
Create stubs and skeletons for 1.1 JRMP stub protocol version.

-v1.2
Create stubs for 1.2 JRMP stub protocol version only.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by colons on UNIX and Macintosh and by semicolons on Win95. For example,
.;C:\usr\local\java\classes

SEE ALSO

java, javac, CLASSPATH


rmid - The Java RMI Activation System Daemon

rmid starts the activation system daemon that allows objects to be registered and activated in a Java virtual machine (JVM).

SYNOPSIS

rmid [options]

DESCRIPTION

The rmid tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM. See the RMI Specification and Activation tutorials for details on how to write programs that use activatable remote objects.

The daemon can be started by executing the rmid command, and specifying a security policy file, as follows:

    rmid -J-Djava.security.policy=rmid.policy

Note: When running Sun's implementation of rmid, by default you will need to specify a security policy file so that rmid can verify whether or not the information in each ActivationGroupDesc is allowed to be used to launch a JVM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any Properties passed to an ActivationGroupDesc's constructor must now be explicitly allowed in the security policy file for rmid. The value of the sun.rmi.activation.execPolicy property dictates the policy that rmid uses to determine whether or not the information in an ActivationGroupDesc may be used to launch a JVM for an activation group.

Executing rmid by default

  • starts the Activator and an internal registry on the default port, 1098, and
  • binds an ActivationSystem to the name java.rmi.activation.ActivationSystem in this internal registry.
To specify an alternate port for the registry, you must specify the -port option when starting up rmid. For example,
    rmid -J-Djava.security.policy=rmid.policy -port 1099
starts the activation system daemon and a registry on the registry's default port, 1099.

OPTIONS

-C<someCommandLineOption>
Specifies an option that is passed as a command-line argument to each child process (activation group) of rmid when that process is created. For example, you could pass a property to each Java virtual machine spawned by the activation system daemon:
    rmid -C-Dsome.property=value
This ability to pass command-line arguments to child processes can be useful for debugging. For example, the following command:
    rmid -C-Djava.rmi.server.logCalls=true
will enable server-call logging in all child JVMs.

-J<someCommandLineOption>
Specifies an option that is passed to the java interpreter running rmid. For example, to specify that rmid use a policy file named rmid.policy, the -J option can be used to define the java.security.policy property on rmid's command line, for example:
    rmid -J-Djava.security.policy=rmid.policy
-J-Dsun.rmi.activation.execPolicy=<policy>
Specifies the policy that rmid employs to check commands and command-line options used to launch the JVM in which an activation group runs. Please note that this option exists only in Sun's implementation of the RMI activation daemon. If this property is not specified on the command line, the result is the same as if -J-Dsun.rmi.activation.execPolicy=default were specified. The possible values of <policy> can be default, <policyClassName>, or none:

  • default (or if this property is unspecified)

    The default execPolicy allows rmid to execute commands with specific command-line options only if rmid has been granted permission to execute those commands and options in the security policy file that rmid uses. Only the default activation group implementation can be used with the default execution policy.

    rmid launches a JVM for an activation group using the information in the group's registered activation group descriptor, an ActivationGroupDesc. The group descriptor specifies an optional ActivationGroupDesc.CommandEnvironment which includes the command to execute to start the activation group as well as any command line options to be added to the command line. By default, rmid uses the java command found in java.home. The group descriptor also contains properties overrides that are added to the command line as options defined as:

        -D<property>=<value>

    The permission com.sun.rmi.rmid.ExecPermission is used to grant rmid permission to execute a command, specified in the group descriptor's CommandEnvironment to launch an activation group. The permission com.sun.rmi.rmid.ExecOptionPermission is used to allow rmid to use command-line options, specified as properties overrides in the group descriptor or as options in the CommandEnvironment, when launching the activation group.

    When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission need to be granted universally (i.e., granted to all code sources).

    ExecPermission

    The ExecPermission class represents permission for rmid to execute a specific command to launch an activation group.

    Syntax
    The name of an ExecPermission is the path name of a command to grant rmid permission to execute. A path name that ends in "\*" indicates all the files contained in that directory (where "\" is the file-separator character, File.separatorChar). A path name that ends with "\-" indicates all files and subdirectories contained in that directory (recursively). A path name consisting of the special token "<<ALL FILES>>" matches any file.

    Note: A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.

    ExecOptionPermission

    The ExecOptionPermission class represents permission for rmid to use a specific command-line option when launching an activation group. The name of an ExecOptionPermission is the value of a command line option.

    Syntax
    Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=".

    For example: "*" or "-Dfoo.*" or "-Da.b.c=*" is valid, "*foo" or "-Da*b" or "ab*" is not.

    Policy file for rmid

    When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions universally because only rmid checks these permissions.

    An example policy file that grants various execute permissions to rmid is:

    grant {
    permission com.sun.rmi.rmid.ExecPermission
    "c:\\files\\apps\\java\\jdk1.2.2\\win32\\bin\\java";

    permission com.sun.rmi.rmid.ExecPermission
    "c:\\files\\apps\\java\\jdk1.2.2\\win32\\bin\\java_g";

    permission com.sun.rmi.rmid.ExecPermission
    "c:\\files\\apps\\rmidcmds\\*";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Djava.security.policy=c:\\files\\policies\\group.policy";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Djava.security.debug=*";

    permission com.sun.rmi.rmid.ExecOptionPermission
    "-Dsun.rmi.*";
};
    The first two permissions granted allow rmid to execute the 1.2.2 version of the java and java_g commands, specified by their explicit path names. Note that by default, the version of the java command found in java.home is used (the same one that rmid uses), and does not need to be specified in the policy file. The third permission allows rmid to execute any command in the directory c:\files\apps\rmidcmds\.

    The fourth permission granted, an ExecOptionPermission, allows rmid to launch an activation group that defines the security policy file to be c:\files\policies\group.policy. The next permission allows the java.security.debug property to be used by an activation group. The last permission allows any property in the sun.rmi property name hierarchy to be used by activation groups.

    To start rmid with a policy file, the java.security.policy property needs to be specified on rmid's command line, for example:

    • rmid -J-Djava.security.policy=rmid.policy

  • <policyClassName>

    If the default behavior is not flexible enough, an administrator can provide, when starting rmid, the name of a class whose checkExecCommand method is executed in order to check commands to be executed by rmid.

    The policyClassName specifies a public class with a public, no-argument constructor and an implementation of the following checkExecCommand method:

        public void checkExecCommand(ActivationGroupDesc desc,
                                 String[] command)
    throws SecurityException;
    Before launching an activation group, rmid calls the policy's checkExecCommand method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the checkExecCommand throws a SecurityException, rmid will not launch the activation group and an ActivationException will be thrown to the caller attempting to activate the object.

  • none

    If the sun.rmi.activation.execPolicy property value is "none", then rmid will not perform any validation of commands to launch activation groups.

    -log dir
    Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, log, in the directory in which the rmid command was executed.

    -port port
    Specifies the port rmid's registry uses. The activation system daemon binds the ActivationSystem, with the name java.rmi.activation.ActivationSystem, in this registry. Thus, the ActivationSystem on the local machine can be obtained using the following Naming.lookup method call:
        import java.rmi.*;
    import java.rmi.activation.*;

    ActivationSystem system; system = (ActivationSystem)
    Naming.lookup("//:port/java.rmi.activation.ActivationSystem");

    -stop
    Stops the current invocation of rmid, for a port specified by the -port option. If no port is specified, it will stop the rmid running on port 1098.

    • ENVIRONMENT VARIABLES

    CLASSPATH
    Used to provide the system a path to user-defined classes. Directories are separated by colons on UNIX and Macintosh and by semicolons on Win95. For example:
        .;C:\usr\local\java\classes

    SEE ALSO

    rmic, CLASSPATH, java


rmiregistry - The Java Remote Object Registry

The rmiregistry command starts a remote object registry on the specified port on the current host.

SYNOPSIS

rmiregistry [port]

DESCRIPTION

The rmiregistry command creates and starts a remote object registry on the specified port on the current host. If port is omitted, the registry is started on port 1099. The rmiregistry command produces no output and is typically run in the background. For example:

start rmiregistry

A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names. Clients on local and remote hosts can then look up remote objects and make remote method invocations.

The registry is typically used to locate the first remote object on which an application needs to invoke methods. That object in turn will provide application-specific support for finding other objects.

The methods of the java.rmi.registry.LocateRegistry class are used to get a registry operating on the local host or local host and port.

The URL-based methods of the java.rmi.Naming class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry.

OPTIONS

-J
Used in conjunction with any java option, it passes the option following the -J (no spaces between the -J and the option) on to the java interpreter.

SEE ALSO

java, java.rmi.registry.LocateRegistry and java.rmi.Naming


serialver - The Serial Version Command

The serialver command returns the serialVersionUID.

SYNOPSIS

serialver [ options ] [ classnames ]
options
Command-line options, as specified in this document.
classnames
One or more class names

DESCRIPTION

serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line.

OPTIONS
-show
Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.

-J option
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.

SEE ALSO

java.io.ObjectStreamClass


Setting the class path

Synopsis

The class path can be set using either the -classpath option when calling an SDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.

C:> sdkTool -classpath path1;path2...

-or-

C:> set CLASSPATH=path1;path2...

where:

sdkTool
A command-line tool, such as java, javac, or javadoc. For a listing, see SDK Tools.

path1;path2
Paths to the .jar, .zip or .class files. Each path should end with a filename or directory depending on what you are setting the class path to:
  • For a .jar or .zip file that contains .class files, the path ends with the name of the .zip or .jar file.
  • For .class files in an unnamed package, the path ends with the directory that contains the .class files.
  • For .class files in a named package, the path ends with the directory that contains the "root" package (the first package in the full package name).

Multiple path entries are separated by semi-colons. With the set command, it's important to omit spaces from around the equals sign (=).

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.

Classpath entries that are not either a directory or an archive (.zip or .jar file) are ignored.

Description

The class path tells SDK tools and applications where to find third-party and user-defined classes -- that is, classes that are not Java extensions or part of the Java platform. The class path needs to find any classes you've compiled with the javac compiler -- its default is the current directory to conveniently enable those classes to be found.

Java 2 SDK, the JVM and other SDK tools find classes by searching the Java platform (bootstrap) classes, any extension classes, and the class path, in that order. (For details on the search strategy, see How Classes Are Found.) Class libraries for most applications will want to take advantage of the extensions mechanism. You only need to set the class path when you want to load a class that's (a) not in the current directory or in any of its subdirectories, and (b) not in a location specified by the extensions mechanism.

If you are upgrading from an older version of the SDK, your startup settings may include CLASSPATH settings that are no longer needed. You should remove any settings that are not application-specific, such as classes.zip. Some third-party applications that use the Java Virtual Machine may modify your CLASSPATH environment variable to include the libaries they use. Such settings can remain.

You can change the class path by using the Java tools' -classpath option when you invoke the JVM or other SDK tools or by using the CLASSPATH environment variable. Using the -classpath option is preferred over setting CLASSPATH environment variable because you can set it individually for each application without affecting other applications and without other applications modifying its value.

Classes can be stored either in directories (folders) or in archive files. The Java platform classes are stored in rt.jar. For more details on archives and information on how the class path works, see Understanding the class path and package names near the end of this document.

Important Note: Some older versions of the JDK sofware included a <jdk-dir>/classes entry in the default class path. That directory exists for use by the JDK software, and should not be used for application classes. Application classes should be placed in a directory outside of the JDK directory hierarcy. That way, installing a new JDK does not force you to reinstall application classes. For compatibility with older versions, applications that use the <jdk-dir>/classes directory as a class library will run in the current version, but there is no guarantee that they will run in future versions.

Using the SDK tools' -classpath option

The SDK tools java, jdb, javac, and javah have a -classpath option which replaces the path or paths specified by the CLASSPATH environment variable while the tool runs. This is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.

The runtime tool java has a -cp option, as well. This option is an abbreviation for -classpath.

For very special cases, both java and javac have options that let you change the path they use to find their own class libraries. The vast majority of users will never to need to use those options, however.

Using the CLASSPATH environment variable

In general, you will want to use the -classpath command-line option, as explained in the previous section. This section shows you how to set the CLASSPATH environment variable if you want to do that, or clear settings left over from a previous installation.

Setting CLASSPATH

The CLASSPATH environment variable is modified with the set command. The format is:

set CLASSPATH=path1;path2 ...

The paths should begin with the letter specifying the drive, for example, C:\. That way, the classes will still be found if you happen to switch to a different drive. (If the path entries start with backslash (\) and you are on drive D:, for example, then the classes will be expected on D:, rather thanC:.)

Clearing CLASSPATH

If your CLASSPATH environment variable has been set to a value that is not correct, or if your startup file or script is setting an incorrect path, you can unset CLASSPATH by using:

C:> set CLASSPATH=

This command unsets CLASSPATH for the current command prompt window only. You should also delete or modify your startup settings to ensure that you have the right CLASSPATH settings in future sessions.

Changing Startup Settings

If the CLASSPATH variable is set at system startup, the place to look for it depends on your operating system:

Operating System | Method
Windows 95 and 98 | Examine autoexec.bat for the set command.
Windows NT | Start the Control Panel, select System, click the Environment tab and, in the User Variables section, examine the CLASSPATH variable.

Understanding the class path and package names

Java classes are organized into packages which are mapped to directories in the file system. But, unlike the file system, whenever you specify a package name, you specify the whole package name -- never part of it. For example, the package name for java.awt.Button is always specified as java.awt.

For example, suppose you want the Java runtime to find a class named Cool.class in the package utility.myapp. If the path to that directory isC:\java\MyClasses\utility\myapp, you would set the class path so that it contains C:\java\MyClasses.

To run that app, you could use the following JVM command:

C:> java -classpath C:\java\MyClasses utility.myapp.Cool

When the app runs, the JVM uses the class path settings to find any other classes defined in the utility.myapp package that are used by the Cool class.

Note that the entire package name is specified in the command. It is not possible, for example, to set the class path so it contains C:\java\MyClasses\utility and use the command java myapp.Cool. The class would not be found.

(You may be wondering what defines the package name for a class. The answer is that the package name is part of the class and cannot be modified, except by recompiling the class.)

Note: An interesting consequence of the package specification mechanism is that files which are part of the same package may actually exist in different directories. The package name will be the same for each class, but the path to each file may start from a different directory in the class path.

Folders and archive files

When classes are stored in a directory (folder), like c:\java\MyClasses\utility\myapp, then the class path entry points to the directory that contains the first element of the package name. (in this case, C:\java\MyClasses, since the package name is utility.myapp.)

But when classes are stored in an archive file (a .zip or .jar file) the class path entry is the path to and including the .zip or .jar file. For example, to use a class library that is in a .jar file, the command would look something like this:

C:> java -classpath C:\java\MyClasses\myclasses.jar utility.myapp.Cool

Multiple specifications

To find class files in the directory C:\java\MyClasses as well as classes in C:\java\OtherClasses, you would set the class path to:

C:> java -classpath C:\java\MyClasses;C:\java\OtherClasses ...

Note that the two paths are separated by a semicolon.

Specification order

The order in which you specify multiple class path entries is important. The Java interpreter will look for classes in the directories in the order they appear in the class path variable. In the example above, the Java interpreter will first look for a needed class in the directory C:\java\MyClasses. Only if it doesn't find a class with the proper name in that directory will the interpreter look in the C:\java\OtherClasses directory.


Not found

This page is not available.

Click Here to go Back


Java(TM) 2 SDK Documentation

Java JavaTM 2 SDK, Standard Edition
Documentation

Version 1.3.1

 Contents

General Info API & Language Guide to Features Tool Docs J2RE & Plug-in Demos/Tutorials

Your feedback is important to us. Please send us comments: Contacting JavaTM Software.

General Information
 Location

Overview
Summary of New Features | docs
Documentation Changes | website
Compatibility
Version Compatibility with Previous Releases | website
Bugs
Known and Fixed Bugs | website
Submitting a Bug Report | website
Contacts
Contacting Java Software | docs
Releases and Downloads
Java 2 SDK Download Page | website
Java Software Home Page | website
Legal Notices
Documentation Redistribution Policy | website
Copyright and License Terms for Documentation | docs

API & Language Documentation

Java 2 Platform API Specification (NO FRAMES)
 docs
Other API Bundled with the Java 2 SDK | docs
Note About sun.* Packages | website
The Java Language Specification (DOWNLOAD)
 website
The Java Virtual Machine Specification (DOWNLOAD)
 website

Guide to Features - Java Platform
Design specs, functional specs, user guides, tutorials and demos.
You can Download PDF and PS versions of some docs.

Summary of New Features
Features added since version 1.2 of the Java 2 Platform. 		docs

Basic Features
Security and Signed Applets | docs
Collections Framework | docs
JavaBeans TM | docs
Internationalization | docs
I/O | docs
Networking | docs
Language and Utility Packages | docs
Remote Method Invocation (RMI) | docs
Arbitrary-Precision Math | docs
Reflection | docs
Package Version Identification | docs
Sound | docs
Reference Objects | docs
Resources | docs
Object Serialization | docs
Extension Mechanism | docs
Java Archive (JAR) Files | docs
Java Native Interface (JNI) | docs
Performance Enhancements
 docs
Miscellaneous Features
(Applet tag, Deprecation) 		docs
Java Foundation Classes (JFC)
Abstract Window Toolkit (AWT) | docs
Project Swing Components | docs
2D Graphics and Imaging | docs
Input Method Framework | docs
Accessibility | docs
Drag-and-Drop data transfer | docs
CORBA Features
RMI-IIOP | docs
JavaTM IDL | docs
Enterprise Features
JDBCTM (Java Database Connectivity) | docs
Java Naming and Directory InterfaceTM (JNDI) | docs
Tool Support
Java Platform Debugger Architecture (JPDA) | docs
Java Virtual Machine Profiler Interface (JVMPI) | docs

SDK Tool Documentation
Reference documentation for the SDK tools.

Tool Documentation docs

Java Runtime Environment and Java Plug-in
Documentation for the JRE and Plug-in.

JRE Download Page | website
Notes for Developers | website
Java Plug-in Home Page and Documentation
 website
New Java Plug-in Features as of J2SE 1.3.0_01
 docs

Demos, Tutorials, Training, and Reference
Sample code for applets and applications, training, courses, and tutorials for the SDK.

Demonstration Applets and Applications software/docs
The Java Tutorial
An example-filled guide to the Java programming language and core APIs. 		website
Training for the Java programming language
Directory of various training resources. 		website
On-Line Courses for the Java Programming Language
Courses from the Java Developer ConnectionSM. 		website
The Java Class Libraries
Code examples for the Java 2 Platform API:
1.2 Supplement
1.1 Packages: java.lang, java.net, java.text, java.util, java.math
1.1 Packages: java.applet, java.awt, java.beans 		website
The Java and Java 2 SDK FAQ
Frequently asked questions about Java and the SDK. 		website
Code Conventions for the Java Programming Language
Standards and styles for coding Java programs.
Java Documentation in WinHelp Format
For Windows users. 		website

Copyright © 1995-2001 Sun Microsystems, Inc. All Rights Reserved.

Please send us comments and suggestions
Download this SDK documentation

Location:
docs = In documentation download bundle and on website
software = In software download bundle and on website
website = Only on Java Software website

Sun

Java Software


 All Classes
AbstractAction
AbstractBorder
AbstractButton
AbstractCellEditor
AbstractCollection
AbstractColorChooserPanel
AbstractDocument
AbstractDocument.AttributeContext
AbstractDocument.Content
AbstractDocument.ElementEdit
AbstractLayoutCache
AbstractLayoutCache.NodeDimensions
AbstractList
AbstractListModel
AbstractMap
AbstractMethodError
AbstractSequentialList
AbstractSet
AbstractTableModel
AbstractUndoableEdit
AbstractWriter
AccessControlContext
AccessControlException
AccessController
AccessException
Accessible
AccessibleAction
AccessibleBundle
AccessibleComponent
AccessibleContext
AccessibleHyperlink
AccessibleHypertext
AccessibleIcon
AccessibleObject
AccessibleRelation
AccessibleRelationSet
AccessibleResourceBundle
AccessibleRole
AccessibleSelection
AccessibleState
AccessibleStateSet
AccessibleTable
AccessibleTableModelChange
AccessibleText
AccessibleValue
Acl
AclEntry
AclNotFoundException
Action
ActionEvent
ActionListener
ActionMap
ActionMapUIResource
Activatable
ActivateFailedException
ActivationDesc
ActivationException
ActivationGroup
ActivationGroupDesc
ActivationGroupDesc.CommandEnvironment
ActivationGroupID
ActivationID
ActivationInstantiator
ActivationMonitor
ActivationSystem
Activator
ActiveEvent
Adjustable
AdjustmentEvent
AdjustmentListener
Adler32
AffineTransform
AffineTransformOp
AlgorithmParameterGenerator
AlgorithmParameterGeneratorSpi
AlgorithmParameters
AlgorithmParameterSpec
AlgorithmParametersSpi
AllPermission
AlphaComposite
AlreadyBound
AlreadyBoundException
AlreadyBoundHelper
AlreadyBoundHolder
AncestorEvent
AncestorListener
Annotation
Any
AnyHolder
AnySeqHelper
AnySeqHolder
Applet
AppletContext
AppletInitializer
AppletStub
ApplicationException
Arc2D
Arc2D.Double
Arc2D.Float
Area
AreaAveragingScaleFilter
ARG_IN
ARG_INOUT
ARG_OUT
ArithmeticException
Array
Array
ArrayIndexOutOfBoundsException
ArrayList
Arrays
ArrayStoreException
AsyncBoxView
Attribute
AttributedCharacterIterator
AttributedCharacterIterator.Attribute
AttributedString
AttributeInUseException
AttributeList
AttributeModificationException
Attributes
Attributes
Attributes.Name
AttributeSet
AttributeSet.CharacterAttribute
AttributeSet.ColorAttribute
AttributeSet.FontAttribute
AttributeSet.ParagraphAttribute
AudioClip
AudioFileFormat
AudioFileFormat.Type
AudioFileReader
AudioFileWriter
AudioFormat
AudioFormat.Encoding
AudioInputStream
AudioPermission
AudioSystem
AuthenticationException
AuthenticationNotSupportedException
Authenticator
Autoscroll
AWTError
AWTEvent
AWTEventListener
AWTEventMulticaster
AWTException
AWTPermission
BAD_CONTEXT
BAD_INV_ORDER
BAD_OPERATION
BAD_PARAM
BAD_POLICY
BAD_POLICY_TYPE
BAD_POLICY_VALUE
BAD_TYPECODE
BadKind
BadLocationException
BandCombineOp
BandedSampleModel
BasicArrowButton
BasicAttribute
BasicAttributes
BasicBorders
BasicBorders.ButtonBorder
BasicBorders.FieldBorder
BasicBorders.MarginBorder
BasicBorders.MenuBarBorder
BasicBorders.RadioButtonBorder
BasicBorders.SplitPaneBorder
BasicBorders.ToggleButtonBorder
BasicButtonListener
BasicButtonUI
BasicCheckBoxMenuItemUI
BasicCheckBoxUI
BasicColorChooserUI
BasicComboBoxEditor
BasicComboBoxEditor.UIResource
BasicComboBoxRenderer
BasicComboBoxRenderer.UIResource
BasicComboBoxUI
BasicComboPopup
BasicDesktopIconUI
BasicDesktopPaneUI
BasicDirectoryModel
BasicEditorPaneUI
BasicFileChooserUI
BasicGraphicsUtils
BasicHTML
BasicIconFactory
BasicInternalFrameTitlePane
BasicInternalFrameUI
BasicLabelUI
BasicListUI
BasicLookAndFeel
BasicMenuBarUI
BasicMenuItemUI
BasicMenuUI
BasicOptionPaneUI
BasicOptionPaneUI.ButtonAreaLayout
BasicPanelUI
BasicPasswordFieldUI
BasicPermission
BasicPopupMenuSeparatorUI
BasicPopupMenuUI
BasicProgressBarUI
BasicRadioButtonMenuItemUI
BasicRadioButtonUI
BasicRootPaneUI
BasicScrollBarUI
BasicScrollPaneUI
BasicSeparatorUI
BasicSliderUI
BasicSplitPaneDivider
BasicSplitPaneUI
BasicStroke
BasicTabbedPaneUI
BasicTableHeaderUI
BasicTableUI
BasicTextAreaUI
BasicTextFieldUI
BasicTextPaneUI
BasicTextUI
BasicTextUI.BasicCaret
BasicTextUI.BasicHighlighter
BasicToggleButtonUI
BasicToolBarSeparatorUI
BasicToolBarUI
BasicToolTipUI
BasicTreeUI
BasicViewportUI
BatchUpdateException
BeanContext
BeanContextChild
BeanContextChildComponentProxy
BeanContextChildSupport
BeanContextContainerProxy
BeanContextEvent
BeanContextMembershipEvent
BeanContextMembershipListener
BeanContextProxy
BeanContextServiceAvailableEvent
BeanContextServiceProvider
BeanContextServiceProviderBeanInfo
BeanContextServiceRevokedEvent
BeanContextServiceRevokedListener
BeanContextServices
BeanContextServicesListener
BeanContextServicesSupport
BeanContextServicesSupport.BCSSServiceProvider
BeanContextSupport
BeanContextSupport.BCSIterator
BeanDescriptor
BeanInfo
Beans
BevelBorder
BigDecimal
BigInteger
BinaryRefAddr
BindException
Binding
Binding
BindingHelper
BindingHolder
BindingIterator
BindingIteratorHelper
BindingIteratorHolder
BindingIteratorOperations
BindingListHelper
BindingListHolder
BindingType
BindingTypeHelper
BindingTypeHolder
BitSet
Blob
BlockView
Book
Boolean
BooleanControl
BooleanControl.Type
BooleanHolder
BooleanSeqHelper
BooleanSeqHolder
Border
BorderFactory
BorderLayout
BorderUIResource
BorderUIResource.BevelBorderUIResource
BorderUIResource.CompoundBorderUIResource
BorderUIResource.EmptyBorderUIResource
BorderUIResource.EtchedBorderUIResource
BorderUIResource.LineBorderUIResource
BorderUIResource.MatteBorderUIResource
BorderUIResource.TitledBorderUIResource
BoundedRangeModel
Bounds
Bounds
Box
Box.Filler
BoxedValueHelper
BoxLayout
BoxView
BreakIterator
BufferedImage
BufferedImageFilter
BufferedImageOp
BufferedInputStream
BufferedOutputStream
BufferedReader
BufferedWriter
Button
ButtonGroup
ButtonModel
ButtonUI
Byte
ByteArrayInputStream
ByteArrayOutputStream
ByteHolder
ByteLookupTable
Calendar
CallableStatement
CannotProceed
CannotProceedException
CannotProceedHelper
CannotProceedHolder
CannotRedoException
CannotUndoException
Canvas
CardLayout
Caret
CaretEvent
CaretListener
CellEditor
CellEditorListener
CellRendererPane
Certificate
Certificate
Certificate.CertificateRep
CertificateEncodingException
CertificateException
CertificateExpiredException
CertificateFactory
CertificateFactorySpi
CertificateNotYetValidException
CertificateParsingException
ChangedCharSetException
ChangeEvent
ChangeListener
Character
Character.Subset
Character.UnicodeBlock
CharacterIterator
CharArrayReader
CharArrayWriter
CharConversionException
CharHolder
CharSeqHelper
CharSeqHolder
Checkbox
CheckboxGroup
CheckboxMenuItem
CheckedInputStream
CheckedOutputStream
Checksum
Choice
ChoiceFormat
Class
ClassCastException
ClassCircularityError
ClassDesc
ClassFormatError
ClassLoader
ClassNotFoundException
Clip
Clipboard
ClipboardOwner
Clob
Cloneable
CloneNotSupportedException
CMMException
CodeSource
CollationElementIterator
CollationKey
Collator
Collection
Collections
Color
ColorChooserComponentFactory
ColorChooserUI
ColorConvertOp
ColorModel
ColorSelectionModel
ColorSpace
ColorUIResource
ComboBoxEditor
ComboBoxModel
ComboBoxUI
ComboPopup
COMM_FAILURE
CommunicationException
Comparable
Comparator
Compiler
CompletionStatus
CompletionStatusHelper
Component
ComponentAdapter
ComponentColorModel
ComponentEvent
ComponentInputMap
ComponentInputMapUIResource
ComponentListener
ComponentOrientation
ComponentSampleModel
ComponentUI
ComponentView
Composite
CompositeContext
CompositeName
CompositeView
CompoundBorder
CompoundControl
CompoundControl.Type
CompoundEdit
CompoundName
ConcurrentModificationException
ConfigurationException
ConnectException
ConnectException
ConnectIOException
Connection
Constructor
Container
ContainerAdapter
ContainerEvent
ContainerListener
ContentHandler
ContentHandlerFactory
ContentModel
Context
Context
ContextList
ContextNotEmptyException
ContextualRenderedImageFactory
Control
Control
Control.Type
ControlFactory
ControllerEventListener
ConvolveOp
CRC32
CRL
CRLException
CropImageFilter
CSS
CSS.Attribute
CTX_RESTRICT_SCOPE
CubicCurve2D
CubicCurve2D.Double
CubicCurve2D.Float
Current
CurrentHelper
CurrentHolder
CurrentOperations
Cursor
Customizer
CustomMarshal
CustomValue
DATA_CONVERSION
DatabaseMetaData
DataBuffer
DataBufferByte
DataBufferInt
DataBufferShort
DataBufferUShort
DataFlavor
DataFormatException
DatagramPacket
DatagramSocket
DatagramSocketImpl
DatagramSocketImplFactory
DataInput
DataInputStream
DataInputStream
DataLine
DataLine.Info
DataOutput
DataOutputStream
DataOutputStream
DataTruncation
Date
Date
DateFormat
DateFormatSymbols
DebugGraphics
DecimalFormat
DecimalFormatSymbols
DefaultBoundedRangeModel
DefaultButtonModel
DefaultCaret
DefaultCellEditor
DefaultColorSelectionModel
DefaultComboBoxModel
DefaultDesktopManager
DefaultEditorKit
DefaultEditorKit.BeepAction
DefaultEditorKit.CopyAction
DefaultEditorKit.CutAction
DefaultEditorKit.DefaultKeyTypedAction
DefaultEditorKit.InsertBreakAction
DefaultEditorKit.InsertContentAction
DefaultEditorKit.InsertTabAction
DefaultEditorKit.PasteAction
DefaultFocusManager
DefaultHighlighter
DefaultHighlighter.DefaultHighlightPainter
DefaultListCellRenderer
DefaultListCellRenderer.UIResource
DefaultListModel
DefaultListSelectionModel
DefaultMenuLayout
DefaultMetalTheme
DefaultMutableTreeNode
DefaultSingleSelectionModel
DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit
DefaultStyledDocument.ElementSpec
DefaultTableCellRenderer
DefaultTableCellRenderer.UIResource
DefaultTableColumnModel
DefaultTableModel
DefaultTextUI
DefaultTreeCellEditor
DefaultTreeCellRenderer
DefaultTreeModel
DefaultTreeSelectionModel
DefinitionKind
DefinitionKindHelper
Deflater
DeflaterOutputStream
Delegate
Delegate
DesignMode
DesktopIconUI
DesktopManager
DesktopPaneUI
DGC
Dialog
Dictionary
DigestException
DigestInputStream
DigestOutputStream
Dimension
Dimension2D
DimensionUIResource
DirContext
DirectColorModel
DirectoryManager
DirObjectFactory
DirStateFactory
DirStateFactory.Result
DnDConstants
Document
DocumentEvent
DocumentEvent.ElementChange
DocumentEvent.EventType
DocumentListener
DocumentParser
DomainCombiner
DomainManager
DomainManagerOperations
Double
DoubleHolder
DoubleSeqHelper
DoubleSeqHolder
DragGestureEvent
DragGestureListener
DragGestureRecognizer
DragSource
DragSourceContext
DragSourceDragEvent
DragSourceDropEvent
DragSourceEvent
DragSourceListener
Driver
DriverManager
DriverPropertyInfo
DropTarget
DropTarget.DropTargetAutoScroller
DropTargetContext
DropTargetDragEvent
DropTargetDropEvent
DropTargetEvent
DropTargetListener
DSAKey
DSAKeyPairGenerator
DSAParameterSpec
DSAParams
DSAPrivateKey
DSAPrivateKeySpec
DSAPublicKey
DSAPublicKeySpec
DTD
DTDConstants
DynamicImplementation
DynAny
DynArray
DynEnum
DynFixed
DynSequence
DynStruct
DynUnion
DynValue
EditorKit
Element
Element
ElementIterator
Ellipse2D
Ellipse2D.Double
Ellipse2D.Float
EmptyBorder
EmptyStackException
EncodedKeySpec
Entity
EnumControl
EnumControl.Type
Enumeration
Environment
EOFException
Error
EtchedBorder
Event
EventContext
EventDirContext
EventListener
EventListenerList
EventObject
EventQueue
EventSetDescriptor
Exception
ExceptionInInitializerError
ExceptionList
ExpandVetoException
ExportException
ExtendedRequest
ExtendedResponse
Externalizable
FeatureDescriptor
Field
FieldNameHelper
FieldPosition
FieldView
File
FileChooserUI
FileDescriptor
FileDialog
FileFilter
FileFilter
FileInputStream
FilenameFilter
FileNameMap
FileNotFoundException
FileOutputStream
FilePermission
FileReader
FileSystemView
FileView
FileWriter
FilteredImageSource
FilterInputStream
FilterOutputStream
FilterReader
FilterWriter
FixedHeightLayoutCache
FixedHolder
FlatteningPathIterator
FlavorMap
Float
FloatControl
FloatControl.Type
FloatHolder
FloatSeqHelper
FloatSeqHolder
FlowLayout
FlowView
FlowView.FlowStrategy
FocusAdapter
FocusEvent
FocusListener
FocusManager
Font
FontFormatException
FontMetrics
FontRenderContext
FontUIResource
Format
FormatConversionProvider
FormView
Frame
FREE_MEM
GapContent
GeneralPath
GeneralSecurityException
GlyphJustificationInfo
GlyphMetrics
GlyphVector
GlyphView
GlyphView.GlyphPainter
GradientPaint
GraphicAttribute
Graphics
Graphics2D
GraphicsConfigTemplate
GraphicsConfiguration
GraphicsDevice
GraphicsEnvironment
GrayFilter
GregorianCalendar
GridBagConstraints
GridBagLayout
GridLayout
Group
Guard
GuardedObject
GZIPInputStream
GZIPOutputStream
HasControls
HashMap
HashSet
Hashtable
HierarchyBoundsAdapter
HierarchyBoundsListener
HierarchyEvent
HierarchyListener
Highlighter
Highlighter.Highlight
Highlighter.HighlightPainter
HTML
HTML.Attribute
HTML.Tag
HTML.UnknownTag
HTMLDocument
HTMLDocument.Iterator
HTMLEditorKit
HTMLEditorKit.HTMLFactory
HTMLEditorKit.HTMLTextAction
HTMLEditorKit.InsertHTMLTextAction
HTMLEditorKit.LinkController
HTMLEditorKit.Parser
HTMLEditorKit.ParserCallback
HTMLFrameHyperlinkEvent
HTMLWriter
HttpURLConnection
HyperlinkEvent
HyperlinkEvent.EventType
HyperlinkListener
ICC_ColorSpace
ICC_Profile
ICC_ProfileGray
ICC_ProfileRGB
Icon
IconUIResource
IconView
IdentifierHelper
Identity
IdentityScope
IDLEntity
IDLType
IDLTypeHelper
IDLTypeOperations
IllegalAccessError
IllegalAccessException
IllegalArgumentException
IllegalComponentStateException
IllegalMonitorStateException
IllegalPathStateException
IllegalStateException
IllegalThreadStateException
Image
ImageConsumer
ImageFilter
ImageGraphicAttribute
ImageIcon
ImageObserver
ImageProducer
ImagingOpException
IMP_LIMIT
IncompatibleClassChangeError
InconsistentTypeCode
IndexColorModel
IndexedPropertyDescriptor
IndexOutOfBoundsException
IndirectionException
InetAddress
Inflater
InflaterInputStream
InheritableThreadLocal
InitialContext
InitialContextFactory
InitialContextFactoryBuilder
InitialDirContext
INITIALIZE
Initializer
InitialLdapContext
InlineView
InputContext
InputEvent
InputMap
InputMapUIResource
InputMethod
InputMethodContext
InputMethodDescriptor
InputMethodEvent
InputMethodHighlight
InputMethodListener
InputMethodRequests
InputStream
InputStream
InputStream
InputStreamReader
InputSubset
InputVerifier
Insets
InsetsUIResource
InstantiationError
InstantiationException
Instrument
InsufficientResourcesException
Integer
INTERNAL
InternalError
InternalFrameAdapter
InternalFrameEvent
InternalFrameListener
InternalFrameUI
InterruptedException
InterruptedIOException
InterruptedNamingException
INTF_REPOS
IntHolder
IntrospectionException
Introspector
INV_FLAG
INV_IDENT
INV_OBJREF
INV_POLICY
Invalid
INVALID_TRANSACTION
InvalidAlgorithmParameterException
InvalidAttributeIdentifierException
InvalidAttributesException
InvalidAttributeValueException
InvalidClassException
InvalidDnDOperationException
InvalidKeyException
InvalidKeySpecException
InvalidMidiDataException
InvalidName
InvalidName
InvalidNameException
InvalidNameHelper
InvalidNameHolder
InvalidObjectException
InvalidParameterException
InvalidParameterSpecException
InvalidSearchControlsException
InvalidSearchFilterException
InvalidSeq
InvalidTransactionException
InvalidValue
InvocationEvent
InvocationHandler
InvocationTargetException
InvokeHandler
IOException
IRObject
IRObjectOperations
IstringHelper
ItemEvent
ItemListener
ItemSelectable
Iterator
JApplet
JarEntry
JarException
JarFile
JarInputStream
JarOutputStream
JarURLConnection
JButton
JCheckBox
JCheckBoxMenuItem
JColorChooser
JComboBox
JComboBox.KeySelectionManager
JComponent
JDesktopPane
JDialog
JEditorPane
JFileChooser
JFrame
JInternalFrame
JInternalFrame.JDesktopIcon
JLabel
JLayeredPane
JList
JMenu
JMenuBar
JMenuItem
JobAttributes
JobAttributes.DefaultSelectionType
JobAttributes.DestinationType
JobAttributes.DialogType
JobAttributes.MultipleDocumentHandlingType
JobAttributes.SidesType
JOptionPane
JPanel
JPasswordField
JPopupMenu
JPopupMenu.Separator
JProgressBar
JRadioButton
JRadioButtonMenuItem
JRootPane
JScrollBar
JScrollPane
JSeparator
JSlider
JSplitPane
JTabbedPane
JTable
JTableHeader
JTextArea
JTextComponent
JTextComponent.KeyBinding
JTextField
JTextPane
JToggleButton
JToggleButton.ToggleButtonModel
JToolBar
JToolBar.Separator
JToolTip
JTree
JTree.DynamicUtilTreeNode
JTree.EmptySelectionModel
JViewport
JWindow
Kernel
Key
KeyAdapter
KeyEvent
KeyException
KeyFactory
KeyFactorySpi
KeyListener
KeyManagementException
Keymap
KeyPair
KeyPairGenerator
KeyPairGeneratorSpi
KeySpec
KeyStore
KeyStoreException
KeyStoreSpi
KeyStroke
Label
LabelUI
LabelView
LastOwnerException
LayeredHighlighter
LayeredHighlighter.LayerPainter
LayoutManager
LayoutManager2
LayoutQueue
LdapContext
LdapReferralException
Lease
LimitExceededException
Line
Line.Info
Line2D
Line2D.Double
Line2D.Float
LineBorder
LineBreakMeasurer
LineEvent
LineEvent.Type
LineListener
LineMetrics
LineNumberInputStream
LineNumberReader
LineUnavailableException
LinkageError
LinkedList
LinkException
LinkLoopException
LinkRef
List
List
ListCellRenderer
ListDataEvent
ListDataListener
ListIterator
ListModel
ListResourceBundle
ListSelectionEvent
ListSelectionListener
ListSelectionModel
ListUI
ListView
LoaderHandler
Locale
LocateRegistry
LogStream
Long
LongHolder
LongLongSeqHelper
LongLongSeqHolder
LongSeqHelper
LongSeqHolder
LookAndFeel
LookupOp
LookupTable
MalformedLinkException
MalformedURLException
Manifest
Map
Map.Entry
MARSHAL
MarshalException
MarshalledObject
Math
MatteBorder
MediaTracker
Member
MemoryImageSource
Menu
MenuBar
MenuBarUI
MenuComponent
MenuContainer
MenuDragMouseEvent
MenuDragMouseListener
MenuElement
MenuEvent
MenuItem
MenuItemUI
MenuKeyEvent
MenuKeyListener
MenuListener
MenuSelectionManager
MenuShortcut
MessageDigest
MessageDigestSpi
MessageFormat
MetaEventListener
MetalBorders
MetalBorders.ButtonBorder
MetalBorders.Flush3DBorder
MetalBorders.InternalFrameBorder
MetalBorders.MenuBarBorder
MetalBorders.MenuItemBorder
MetalBorders.OptionDialogBorder
MetalBorders.PaletteBorder
MetalBorders.PopupMenuBorder
MetalBorders.RolloverButtonBorder
MetalBorders.ScrollPaneBorder
MetalBorders.TableHeaderBorder
MetalBorders.TextFieldBorder
MetalBorders.ToggleButtonBorder
MetalBorders.ToolBarBorder
MetalButtonUI
MetalCheckBoxIcon
MetalCheckBoxUI
MetalComboBoxButton
MetalComboBoxEditor
MetalComboBoxEditor.UIResource
MetalComboBoxIcon
MetalComboBoxUI
MetalDesktopIconUI
MetalFileChooserUI
MetalIconFactory
MetalIconFactory.FileIcon16
MetalIconFactory.FolderIcon16
MetalIconFactory.PaletteCloseIcon
MetalIconFactory.TreeControlIcon
MetalIconFactory.TreeFolderIcon
MetalIconFactory.TreeLeafIcon
MetalInternalFrameTitlePane
MetalInternalFrameUI
MetalLabelUI
MetalLookAndFeel
MetalPopupMenuSeparatorUI
MetalProgressBarUI
MetalRadioButtonUI
MetalScrollBarUI
MetalScrollButton
MetalScrollPaneUI
MetalSeparatorUI
MetalSliderUI
MetalSplitPaneUI
MetalTabbedPaneUI
MetalTextFieldUI
MetalTheme
MetalToggleButtonUI
MetalToolBarUI
MetalToolTipUI
MetalTreeUI
MetaMessage
Method
MethodDescriptor
MidiChannel
MidiDevice
MidiDevice.Info
MidiDeviceProvider
MidiEvent
MidiFileFormat
MidiFileReader
MidiFileWriter
MidiMessage
MidiSystem
MidiUnavailableException
MimeTypeParseException
MinimalHTMLWriter
MissingResourceException
Mixer
Mixer.Info
MixerProvider
ModificationItem
Modifier
MouseAdapter
MouseDragGestureRecognizer
MouseEvent
MouseInputAdapter
MouseInputListener
MouseListener
MouseMotionAdapter
MouseMotionListener
MultiButtonUI
MulticastSocket
MultiColorChooserUI
MultiComboBoxUI
MultiDesktopIconUI
MultiDesktopPaneUI
MultiFileChooserUI
MultiInternalFrameUI
MultiLabelUI
MultiListUI
MultiLookAndFeel
MultiMenuBarUI
MultiMenuItemUI
MultiOptionPaneUI
MultiPanelUI
MultiPixelPackedSampleModel
MultipleMaster
MultiPopupMenuUI
MultiProgressBarUI
MultiScrollBarUI
MultiScrollPaneUI
MultiSeparatorUI
MultiSliderUI
MultiSplitPaneUI
MultiTabbedPaneUI
MultiTableHeaderUI
MultiTableUI
MultiTextUI
MultiToolBarUI
MultiToolTipUI
MultiTreeUI
MultiViewportUI
MutableAttributeSet
MutableComboBoxModel
MutableTreeNode
Name
NameAlreadyBoundException
NameClassPair
NameComponent
NameComponentHelper
NameComponentHolder
NamedValue
NameHelper
NameHolder
NameNotFoundException
NameParser
NamespaceChangeListener
NameValuePair
NameValuePairHelper
Naming
NamingContext
NamingContextHelper
NamingContextHolder
NamingContextOperations
NamingEnumeration
NamingEvent
NamingException
NamingExceptionEvent
NamingListener
NamingManager
NamingSecurityException
NegativeArraySizeException
NetPermission
NO_IMPLEMENT
NO_MEMORY
NO_PERMISSION
NO_RESOURCES
NO_RESPONSE
NoClassDefFoundError
NoInitialContextException
NoninvertibleTransformException
NoPermissionException
NoRouteToHostException
NoSuchAlgorithmException
NoSuchAttributeException
NoSuchElementException
NoSuchFieldError
NoSuchFieldException
NoSuchMethodError
NoSuchMethodException
NoSuchObjectException
NoSuchProviderException
NotActiveException
NotBoundException
NotContextException
NotEmpty
NotEmptyHelper
NotEmptyHolder
NotFound
NotFoundHelper
NotFoundHolder
NotFoundReason
NotFoundReasonHelper
NotFoundReasonHolder
NotOwnerException
NotSerializableException
NullPointerException
Number
NumberFormat
NumberFormatException
NVList
OBJ_ADAPTER
Object
Object
OBJECT_NOT_EXIST
ObjectChangeListener
ObjectFactory
ObjectFactoryBuilder
ObjectHelper
ObjectHolder
ObjectImpl
ObjectImpl
ObjectInput
ObjectInputStream
ObjectInputStream.GetField
ObjectInputValidation
ObjectOutput
ObjectOutputStream
ObjectOutputStream.PutField
ObjectStreamClass
ObjectStreamConstants
ObjectStreamException
ObjectStreamField
ObjectView
ObjID
Observable
Observer
OctetSeqHelper
OctetSeqHolder
OMGVMCID
OpenType
Operation
OperationNotSupportedException
Option
OptionalDataException
OptionPaneUI
ORB
ORB
OutOfMemoryError
OutputStream
OutputStream
OutputStream
OutputStreamWriter
OverlayLayout
Owner
Package
PackedColorModel
Pageable
PageAttributes
PageAttributes.ColorType
PageAttributes.MediaType
PageAttributes.OrientationRequestedType
PageAttributes.OriginType
PageAttributes.PrintQualityType
PageFormat
Paint
PaintContext
PaintEvent
Panel
PanelUI
Paper
ParagraphView
ParagraphView
ParameterBlock
ParameterDescriptor
ParseException
ParsePosition
Parser
ParserDelegator
PartialResultException
PasswordAuthentication
PasswordView
Patch
PathIterator
Permission
Permission
PermissionCollection
Permissions
PERSIST_STORE
PhantomReference
PipedInputStream
PipedOutputStream
PipedReader
PipedWriter
PixelGrabber
PixelInterleavedSampleModel
PKCS8EncodedKeySpec
PlainDocument
PlainView
Point
Point2D
Point2D.Double
Point2D.Float
Policy
Policy
PolicyError
PolicyHelper
PolicyHolder
PolicyListHelper
PolicyListHolder
PolicyOperations
PolicyTypeHelper
Polygon
PopupMenu
PopupMenuEvent
PopupMenuListener
PopupMenuUI
Port
Port.Info
PortableRemoteObject
PortableRemoteObjectDelegate
Position
Position.Bias
PreparedStatement
Principal
Principal
PrincipalHolder
Printable
PrinterAbortException
PrinterException
PrinterGraphics
PrinterIOException
PrinterJob
PrintGraphics
PrintJob
PrintStream
PrintWriter
PRIVATE_MEMBER
PrivateKey
PrivilegedAction
PrivilegedActionException
PrivilegedExceptionAction
Process
ProfileDataException
ProgressBarUI
ProgressMonitor
ProgressMonitorInputStream
Properties
PropertyChangeEvent
PropertyChangeListener
PropertyChangeSupport
PropertyDescriptor
PropertyEditor
PropertyEditorManager
PropertyEditorSupport
PropertyPermission
PropertyResourceBundle
PropertyVetoException
ProtectionDomain
ProtocolException
Provider
ProviderException
Proxy
PUBLIC_MEMBER
PublicKey
PushbackInputStream
PushbackReader
QuadCurve2D
QuadCurve2D.Double
QuadCurve2D.Float
Random
RandomAccessFile
Raster
RasterFormatException
RasterOp
Reader
Receiver
Rectangle
Rectangle2D
Rectangle2D.Double
Rectangle2D.Float
RectangularShape
Ref
RefAddr
Reference
Reference
Referenceable
ReferenceQueue
ReferralException
ReflectPermission
Registry
RegistryHandler
RemarshalException
Remote
RemoteCall
RemoteException
RemoteObject
RemoteRef
RemoteServer
RemoteStub
RenderableImage
RenderableImageOp
RenderableImageProducer
RenderContext
RenderedImage
RenderedImageFactory
Renderer
RenderingHints
RenderingHints.Key
RepaintManager
ReplicateScaleFilter
Repository
RepositoryIdHelper
Request
RescaleOp
Resolver
ResolveResult
ResourceBundle
ResponseHandler
ResultSet
ResultSetMetaData
ReverbType
RGBImageFilter
RMIClassLoader
RMIClientSocketFactory
RMIFailureHandler
RMISecurityException
RMISecurityManager
RMIServerSocketFactory
RMISocketFactory
Robot
RootPaneContainer
RootPaneUI
RoundRectangle2D
RoundRectangle2D.Double
RoundRectangle2D.Float
RowMapper
RSAKey
RSAKeyGenParameterSpec
RSAPrivateCrtKey
RSAPrivateCrtKeySpec
RSAPrivateKey
RSAPrivateKeySpec
RSAPublicKey
RSAPublicKeySpec
RTFEditorKit
RuleBasedCollator
Runnable
Runtime
RunTime
RuntimeException
RunTimeOperations
RuntimePermission
SampleModel
SchemaViolationException
Scrollable
Scrollbar
ScrollBarUI
ScrollPane
ScrollPaneConstants
ScrollPaneLayout
ScrollPaneLayout.UIResource
ScrollPaneUI
SearchControls
SearchResult
SecureClassLoader
SecureRandom
SecureRandomSpi
Security
SecurityException
SecurityManager
SecurityPermission
Segment
SeparatorUI
Sequence
SequenceInputStream
Sequencer
Sequencer.SyncMode
Serializable
SerializablePermission
ServantObject
ServerCloneException
ServerError
ServerException
ServerNotActiveException
ServerRef
ServerRequest
ServerRuntimeException
ServerSocket
ServiceDetail
ServiceDetailHelper
ServiceInformation
ServiceInformationHelper
ServiceInformationHolder
ServiceUnavailableException
Set
SetOverrideType
SetOverrideTypeHelper
Shape
ShapeGraphicAttribute
Short
ShortHolder
ShortLookupTable
ShortMessage
ShortSeqHelper
ShortSeqHolder
Signature
SignatureException
SignatureSpi
SignedObject
Signer
SimpleAttributeSet
SimpleBeanInfo
SimpleDateFormat
SimpleTimeZone
SinglePixelPackedSampleModel
SingleSelectionModel
SizeLimitExceededException
SizeRequirements
SizeSequence
Skeleton
SkeletonMismatchException
SkeletonNotFoundException
SliderUI
Socket
SocketException
SocketImpl
SocketImplFactory
SocketOptions
SocketPermission
SocketSecurityException
SoftBevelBorder
SoftReference
SortedMap
SortedSet
Soundbank
SoundbankReader
SoundbankResource
SourceDataLine
SplitPaneUI
SQLData
SQLException
SQLInput
SQLOutput
SQLPermission
SQLWarning
Stack
StackOverflowError
StateEdit
StateEditable
StateFactory
Statement
Streamable
StreamableValue
StreamCorruptedException
StreamTokenizer
StrictMath
String
StringBuffer
StringBufferInputStream
StringCharacterIterator
StringContent
StringHolder
StringIndexOutOfBoundsException
StringReader
StringRefAddr
StringSelection
StringTokenizer
StringValueHelper
StringWriter
Stroke
Struct
StructMember
StructMemberHelper
Stub
StubDelegate
StubNotFoundException
Style
StyleConstants
StyleConstants.CharacterConstants
StyleConstants.ColorConstants
StyleConstants.FontConstants
StyleConstants.ParagraphConstants
StyleContext
StyledDocument
StyledEditorKit
StyledEditorKit.AlignmentAction
StyledEditorKit.BoldAction
StyledEditorKit.FontFamilyAction
StyledEditorKit.FontSizeAction
StyledEditorKit.ForegroundAction
StyledEditorKit.ItalicAction
StyledEditorKit.StyledTextAction
StyledEditorKit.UnderlineAction
StyleSheet
StyleSheet.BoxPainter
StyleSheet.ListPainter
SwingConstants
SwingPropertyChangeSupport
SwingUtilities
SyncFailedException
Synthesizer
SysexMessage
System
SystemColor
SystemException
SystemFlavorMap
TabableView
TabbedPaneUI
TabExpander
TableCellEditor
TableCellRenderer
TableColumn
TableColumnModel
TableColumnModelEvent
TableColumnModelListener
TableHeaderUI
TableModel
TableModelEvent
TableModelListener
TableUI
TableView
TabSet
TabStop
TagElement
TargetDataLine
TCKind
TextAction
TextArea
TextAttribute
TextComponent
TextEvent
TextField
TextHitInfo
TextLayout
TextLayout.CaretPolicy
TextListener
TextMeasurer
TextUI
TexturePaint
Thread
ThreadDeath
ThreadGroup
ThreadLocal
Throwable
Tie
TileObserver
Time
TimeLimitExceededException
Timer
Timer
TimerTask
Timestamp
TimeZone
TitledBorder
ToolBarUI
Toolkit
ToolTipManager
ToolTipUI
TooManyListenersException
Track
TRANSACTION_REQUIRED
TRANSACTION_ROLLEDBACK
TransactionRequiredException
TransactionRolledbackException
Transferable
TransformAttribute
TRANSIENT
Transmitter
Transparency
TreeCellEditor
TreeCellRenderer
TreeExpansionEvent
TreeExpansionListener
TreeMap
TreeModel
TreeModelEvent
TreeModelListener
TreeNode
TreePath
TreeSelectionEvent
TreeSelectionListener
TreeSelectionModel
TreeSet
TreeUI
TreeWillExpandListener
TypeCode
TypeCodeHolder
TypeMismatch
Types
UID
UIDefaults
UIDefaults.ActiveValue
UIDefaults.LazyInputMap
UIDefaults.LazyValue
UIDefaults.ProxyLazyValue
UIManager
UIManager.LookAndFeelInfo
UIResource
ULongLongSeqHelper
ULongLongSeqHolder
ULongSeqHelper
ULongSeqHolder
UndeclaredThrowableException
UndoableEdit
UndoableEditEvent
UndoableEditListener
UndoableEditSupport
UndoManager
UnexpectedException
UnicastRemoteObject
UnionMember
UnionMemberHelper
UNKNOWN
UnknownError
UnknownException
UnknownGroupException
UnknownHostException
UnknownHostException
UnknownObjectException
UnknownServiceException
UnknownUserException
UnmarshalException
UnrecoverableKeyException
Unreferenced
UnresolvedPermission
UnsatisfiedLinkError
UnsolicitedNotification
UnsolicitedNotificationEvent
UnsolicitedNotificationListener
UNSUPPORTED_POLICY
UNSUPPORTED_POLICY_VALUE
UnsupportedAudioFileException
UnsupportedClassVersionError
UnsupportedEncodingException
UnsupportedFlavorException
UnsupportedLookAndFeelException
UnsupportedOperationException
URL
URLClassLoader
URLConnection
URLDecoder
URLEncoder
URLStreamHandler
URLStreamHandlerFactory
UserException
UShortSeqHelper
UShortSeqHolder
UTFDataFormatException
Util
UtilDelegate
Utilities
ValueBase
ValueBaseHelper
ValueBaseHolder
ValueFactory
ValueHandler
ValueMember
ValueMemberHelper
VariableHeightLayoutCache
Vector
VerifyError
VersionSpecHelper
VetoableChangeListener
VetoableChangeSupport
View
ViewFactory
ViewportLayout
ViewportUI
VirtualMachineError
Visibility
VisibilityHelper
VM_ABSTRACT
VM_CUSTOM
VM_NONE
VM_TRUNCATABLE
VMID
VoiceStatus
Void
WCharSeqHelper
WCharSeqHolder
WeakHashMap
WeakReference
Window
WindowAdapter
WindowConstants
WindowEvent
WindowListener
WrappedPlainView
WritableRaster
WritableRenderedImage
WriteAbortedException
Writer
WrongTransaction
WStringValueHelper
X509Certificate
X509CRL
X509CRLEntry
X509EncodedKeySpec
X509Extension
ZipEntry
ZipException
ZipFile
ZipInputStream
ZipOutputStream
ZoneView
_BindingIteratorImplBase
_BindingIteratorStub
_IDLTypeStub
_NamingContextImplBase
_NamingContextStub
_PolicyStub
_Remote_Stub


Java 2 Platform SE v1.3.1

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link to Non-frame version.


Overview

All Classes

Packages
java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.ref
java.lang.reflect
java.math
java.net
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.util
java.util.jar
java.util.zip
javax.accessibility
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.rmi
javax.rmi.CORBA
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.transaction
org.omg.CORBA
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.portable
org.omg.CORBA.TypeCodePackage
org.omg.CosNaming
org.omg.CosNaming.NamingContextPackage
org.omg.SendingContext
org.omg.stub.java.rmi


Java 2 Platform SE v1.3.1

The front page has been relocated.Please see:
Frame version
Non-frame version.


_-Index

PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _

_

_ADD_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The int constant for the enum value ADD_OVERRIDE.
_BindingIteratorImplBase - class org.omg.CosNaming._BindingIteratorImplBase.
_BindingIteratorImplBase() - Constructor for class org.omg.CosNaming._BindingIteratorImplBase
_BindingIteratorStub - class org.omg.CosNaming._BindingIteratorStub.
_BindingIteratorStub(Delegate) - Constructor for class org.omg.CosNaming._BindingIteratorStub
_COMPLETED_MAYBE - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_COMPLETED_NO - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_COMPLETED_YES - Static variable in class org.omg.CORBA.CompletionStatus
The constant indicating that a method completed running before a SystemException was thrown.
_create_request(Context, String, NVList, NamedValue) - Method in interface org.omg.CORBA.Object
Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.
_create_request(Context, String, NVList, NamedValue) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object that contains the given context, method, argument list, and container for the result.
_create_request(Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in interface org.omg.CORBA.Object
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.
_create_request(Context, String, NVList, NamedValue, ExceptionList, ContextList) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
_dk_Alias - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_all - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Array - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Attribute - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Constant - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Enum - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Exception - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Fixed - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Interface - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Module - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Native - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_none - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Operation - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Primitive - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Repository - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Sequence - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_String - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Struct - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Typedef - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Union - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Value - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_ValueBox - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_ValueMember - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_dk_Wstring - Static variable in class org.omg.CORBA.DefinitionKind
The constant that indicates that an Interface Repository object does not have a definition kind.
_duplicate() - Method in interface org.omg.CORBA.Object
Returns a duplicate of this CORBA object reference.
_duplicate() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a duplicate of this ObjectImpl object.
_get_codebase() - Method in class org.omg.CORBA_2_3.portable.ObjectImpl
Returns the codebase for this object reference.
_get_delegate() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
_get_domain_managers() - Method in interface org.omg.CORBA.Object
Retrieves the DomainManagers of this object.
_get_domain_managers() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves a list of the domain managers for this ObjectImpl object.
_get_interface_def() - Method in interface org.omg.CORBA.Object
Obtains an InterfaceDef for the object implementation referenced by this object reference.
_get_interface_def() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the interface definition for this ObjectImpl object.
_get_policy(int) - Method in interface org.omg.CORBA.Object
Returns the Policy object of the specified type which applies to this object.
_get_policy(int) - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the Policy object for this ObjectImpl object that has the given policy type.
_hash(int) - Method in interface org.omg.CORBA.Object
Returns an ORB-internal identifier for this object reference.
_hash(int) - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
_IDLTypeStub - class org.omg.CORBA._IDLTypeStub.
org/omg/CORBA/_IDLTypeStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ir.idl.
_IDLTypeStub() - Constructor for class org.omg.CORBA._IDLTypeStub
Constructs a default _IDLTypeStub object.
_IDLTypeStub(Delegate) - Constructor for class org.omg.CORBA._IDLTypeStub
Constructs an _IDLTypeStub object initialized with the given Delegate object.
_ids() - Method in class org.omg.CORBA._PolicyStub
_ids() - Method in class org.omg.CORBA._IDLTypeStub
_ids() - Method in class org.omg.stub.java.rmi._Remote_Stub
Returns an array of repository ids that an object implements.
_ids() - Method in class org.omg.CORBA.portable.ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
_ids() - Method in class org.omg.CosNaming._NamingContextStub
_ids() - Method in class org.omg.CosNaming._BindingIteratorImplBase
_ids() - Method in class org.omg.CosNaming._BindingIteratorStub
_ids() - Method in class org.omg.CosNaming._NamingContextImplBase
_invoke(OutputStream) - Method in class org.omg.CORBA.portable.ObjectImpl
Invokes an operation and returns an InputStream object for reading the response.
_invoke(String, InputStream, ResponseHandler) - Method in interface org.omg.CORBA.portable.InvokeHandler
Invoked by the ORB to dispatch a request to the servant.
_is_a(String) - Method in interface org.omg.CORBA.Object
Checks whether this object is an instance of a class that implements the given interface.
_is_a(String) - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the object identified by the given repository identifier is an ObjectImpl object.
_is_equivalent(Object) - Method in interface org.omg.CORBA.Object
Determines whether the two object references are equivalent, so far as the ORB can easily determine.
_is_equivalent(Object) - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
_is_local() - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether this ObjectImpl object is implemented by a local servant.
_missing_node - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_NamingContextImplBase - class org.omg.CosNaming._NamingContextImplBase.
_NamingContextImplBase() - Constructor for class org.omg.CosNaming._NamingContextImplBase
_NamingContextStub - class org.omg.CosNaming._NamingContextStub.
_NamingContextStub(Delegate) - Constructor for class org.omg.CosNaming._NamingContextStub
_ncontext - Static variable in class org.omg.CosNaming.BindingType
_nobject - Static variable in class org.omg.CosNaming.BindingType
_non_existent() - Method in interface org.omg.CORBA.Object
Determines whether the server object for this object reference has been destroyed.
_non_existent() - Method in class org.omg.CORBA.portable.ObjectImpl
Checks whether the server object for this ObjectImpl object has been destroyed.
_not_context - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_not_object - Static variable in class org.omg.CosNaming.NamingContextPackage.NotFoundReason
_orb() - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a reference to the ORB associated with this object and its delegate.
_PolicyStub - class org.omg.CORBA._PolicyStub.
org/omg/CORBA/_PolicyStub.java Generated by the IDL-to-Java compiler (portable), version "3.0" from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
_PolicyStub() - Constructor for class org.omg.CORBA._PolicyStub
Constructors NOTE: If the default constructor is used, the object is useless until _set_delegate (...) is called.
_PolicyStub(Delegate) - Constructor for class org.omg.CORBA._PolicyStub
Constructs a _PolicyStub object initialized with the given Delegate object.
_postEdit(UndoableEdit) - Method in class javax.swing.undo.UndoableEditSupport
Called only from postEdit and endUpdate.
_read(InputStream) - Method in class org.omg.CORBA.UShortSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.DoubleHolder
Read a double value from the input stream and store it in the value member.
_read(InputStream) - Method in class org.omg.CORBA.AnyHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.DoubleSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ShortSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ObjectHolder
Reads from input and initalizes the value in this ObjectHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.LongLongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ShortHolder
Reads from input and initalizes the value in this ShortHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.ULongLongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.CurrentHolder
_read(InputStream) - Method in class org.omg.CORBA.CharHolder
Reads from input and initalizes the value in this CharHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_read(InputStream) - Method in class org.omg.CORBA.ValueBaseHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.PolicyHolder
_read(InputStream) - Method in class org.omg.CORBA.AnySeqHolder
_read(InputStream) - Method in class org.omg.CORBA.PolicyListHolder
_read(InputStream) - Method in class org.omg.CORBA.ServiceInformationHolder
Reads unmarshalled data from the input stream in and assigns it to the value field in this ServiceInformationHolder object.
_read(InputStream) - Method in class org.omg.CORBA.IntHolder
Reads unmarshalled data from input and assigns it to the value field in this IntHolder object.
_read(InputStream) - Method in class org.omg.CORBA.LongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.StringHolder
Reads the unmarshalled data from input and assigns it to the value field of this StringHolder object.
_read(InputStream) - Method in class org.omg.CORBA.FixedHolder
Read a fixed point value from the input stream and store it in the value member.
_read(InputStream) - Method in class org.omg.CORBA.TypeCodeHolder
Reads from input and initalizes the value in this TypeCodeHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.OctetSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.BooleanSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.FloatSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.ULongSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.FloatHolder
Read a float from an input stream and initialize the value member with the float value.
_read(InputStream) - Method in class org.omg.CORBA.ByteHolder
Reads from input and initalizes the value in this ByteHolder object with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.BooleanHolder
Reads unmarshalled data from input and assigns it to this BooleanHolder object's value field.
_read(InputStream) - Method in class org.omg.CORBA.CharSeqHolder
_read(InputStream) - Method in class org.omg.CORBA.LongHolder
Reads from input and initalizes the value in the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CORBA.WCharSeqHolder
_read(InputStream) - Method in interface org.omg.CORBA.portable.Streamable
Reads data from istream and initalizes the value field of the Holder with the unmarshalled data.
_read(InputStream) - Method in class org.omg.CosNaming.BindingIteratorHolder
_read(InputStream) - Method in class org.omg.CosNaming.NameComponentHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingTypeHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingListHolder
_read(InputStream) - Method in class org.omg.CosNaming.BindingHolder
_read(InputStream) - Method in class org.omg.CosNaming.NameHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_read(InputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
_release() - Method in interface org.omg.CORBA.Object
Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released.
_release() - Method in class org.omg.CORBA.portable.ObjectImpl
Releases the resources associated with this ObjectImpl object.
_releaseReply(InputStream) - Method in class org.omg.CORBA.portable.ObjectImpl
Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
_Remote_Stub - class org.omg.stub.java.rmi._Remote_Stub.
This class provides the Stub for the Remote Type.
_Remote_Stub() - Constructor for class org.omg.stub.java.rmi._Remote_Stub
_request(String) - Method in interface org.omg.CORBA.Object
Creates a Request instance for use in the Dynamic Invocation Interface.
_request(String) - Method in class org.omg.CORBA.portable.ObjectImpl
Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
_request(String, boolean) - Method in class org.omg.CORBA.portable.ObjectImpl
Returns an OutputStream object to use for marshalling the arguments of the given method.
_servant_postinvoke(ServantObject) - Method in class org.omg.CORBA.portable.ObjectImpl
Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
_servant_preinvoke(String, Class) - Method in class org.omg.CORBA.portable.ObjectImpl
Returns a Java reference to the local servant that should be used for sending a request for the method specified.
_set_delegate(Delegate) - Method in class org.omg.CORBA.portable.ObjectImpl
Sets the Delegate for this ObjectImpl instance to the given Delegate object.
_SET_OVERRIDE - Static variable in class org.omg.CORBA.SetOverrideType
The int constant for the enum value SET_OVERRIDE.
_set_policy_override(Policy[], SetOverrideType) - Method in interface org.omg.CORBA.Object
Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.
_set_policy_override(Policy[], SetOverrideType) - Method in class org.omg.CORBA.portable.ObjectImpl
Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
_tk_abstract_interface - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type abstract interface.
_tk_alias - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type alias.
_tk_any - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type any.
_tk_array - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type array.
_tk_boolean - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type boolean.
_tk_char - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type char.
_tk_double - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type double.
_tk_enum - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type enum.
_tk_except - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type except.
_tk_fixed - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type fixed.
_tk_float - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type float.
_tk_long - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type long.
_tk_longdouble - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type longdouble.
_tk_longlong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type longlong.
_tk_native - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type native.
_tk_null - Static variable in class org.omg.CORBA.TCKind
The int constant for a null IDL data type.
_tk_objref - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type objref.
_tk_octet - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type octet.
_tk_Principal - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type Principal.
_tk_sequence - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type sequence.
_tk_short - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type short.
_tk_string - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type string.
_tk_struct - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type struct.
_tk_TypeCode - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type TypeCode.
_tk_ulong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ulong.
_tk_ulonglong - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ulonglong.
_tk_union - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type union.
_tk_ushort - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type ushort.
_tk_value - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type value.
_tk_value_box - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type value_box.
_tk_void - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type void.
_tk_wchar - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type wchar.
_tk_wstring - Static variable in class org.omg.CORBA.TCKind
The int constant for the IDL data type wstring.
_truncatable_ids() - Method in interface org.omg.CORBA.portable.ValueBase
Provides truncatable repository ids.
_type() - Method in class org.omg.CORBA.UShortSeqHolder
_type() - Method in class org.omg.CORBA.DoubleHolder
Return the TypeCode of this holder object.
_type() - Method in class org.omg.CORBA.AnyHolder
Returns the TypeCode object corresponding to the value held in this AnyHolder object.
_type() - Method in class org.omg.CORBA.DoubleSeqHolder
_type() - Method in class org.omg.CORBA.ShortSeqHolder
_type() - Method in class org.omg.CORBA.ObjectHolder
Returns the TypeCode corresponding to the value held in this ObjectHolder object
_type() - Method in class org.omg.CORBA.LongLongSeqHolder
_type() - Method in class org.omg.CORBA.ShortHolder
Returns the TypeCode corresponding to the value held in this ShortHolder object.
_type() - Method in class org.omg.CORBA.ULongLongSeqHolder
_type() - Method in class org.omg.CORBA.CurrentHolder
_type() - Method in class org.omg.CORBA.CharHolder
Returns the TypeCode object corresponding to the value held in this CharHolder object.
_type() - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_type() - Method in class org.omg.CORBA.ValueBaseHolder
Returns the TypeCode object corresponding to the value held in the Holder.
_type() - Method in class org.omg.CORBA.PolicyHolder
_type() - Method in class org.omg.CORBA.AnySeqHolder
_type() - Method in class org.omg.CORBA.PolicyListHolder
_type() - Method in class org.omg.CORBA.ServiceInformationHolder
Retrieves the TypeCode object that corresponds to the value held in this ServiceInformationHolder object's value field.
_type() - Method in class org.omg.CORBA.IntHolder
Retrieves the TypeCode object that corresponds to the value held in this IntHolder object's value field.
_type() - Method in class org.omg.CORBA.LongSeqHolder
_type() - Method in class org.omg.CORBA.StringHolder
Retreives the TypeCode object that corresponds to the value held in this StringHolder object.
_type() - Method in class org.omg.CORBA.FixedHolder
Return the TypeCode of this holder object.
_type() - Method in class org.omg.CORBA.TypeCodeHolder
Returns the TypeCode corresponding to the value held in this TypeCodeHolder object.
_type() - Method in class org.omg.CORBA.OctetSeqHolder
_type() - Method in class org.omg.CORBA.BooleanSeqHolder
_type() - Method in class org.omg.CORBA.FloatSeqHolder
_type() - Method in class org.omg.CORBA.ULongSeqHolder
_type() - Method in class org.omg.CORBA.FloatHolder
Return the TypeCode of this Streamable.
_type() - Method in class org.omg.CORBA.ByteHolder
Returns the TypeCode corresponding to the value held in this ByteHolder object.
_type() - Method in class org.omg.CORBA.BooleanHolder
Retrieves the TypeCode object that corresponds to the value held in this BooleanHolder object.
_type() - Method in class org.omg.CORBA.CharSeqHolder
_type() - Method in class org.omg.CORBA.LongHolder
Returns the TypeCode object corresponding to the value held in the Holder.
_type() - Method in class org.omg.CORBA.WCharSeqHolder
_type() - Method in interface org.omg.CORBA.portable.Streamable
Retrieves the TypeCode object corresponding to the value in the value field of the Holder.
_type() - Method in class org.omg.CosNaming.BindingIteratorHolder
_type() - Method in class org.omg.CosNaming.NameComponentHolder
_type() - Method in class org.omg.CosNaming.BindingTypeHolder
_type() - Method in class org.omg.CosNaming.BindingListHolder
_type() - Method in class org.omg.CosNaming.BindingHolder
_type() - Method in class org.omg.CosNaming.NameHolder
_type() - Method in class org.omg.CosNaming.NamingContextHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_type() - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
_write(OutputStream) - Method in class org.omg.CORBA.UShortSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.DoubleHolder
Write the double value stored in this holder to an OutputStream.
_write(OutputStream) - Method in class org.omg.CORBA.AnyHolder
Marshals to output the value in this AnyHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.DoubleSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ShortSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ObjectHolder
Marshals to output the value in this ObjectHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.LongLongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ShortHolder
Marshals to output the value in this ShortHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.ULongLongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.CurrentHolder
_write(OutputStream) - Method in class org.omg.CORBA.CharHolder
Marshals to output the value in this CharHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.PrincipalHolder
Deprecated.
_write(OutputStream) - Method in class org.omg.CORBA.ValueBaseHolder
Marshals to output the value in the Holder.
_write(OutputStream) - Method in class org.omg.CORBA.PolicyHolder
_write(OutputStream) - Method in class org.omg.CORBA.AnySeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.PolicyListHolder
_write(OutputStream) - Method in class org.omg.CORBA.ServiceInformationHolder
Marshals the value in this ServiceInformationHolder object's value field to the output stream out.
_write(OutputStream) - Method in class org.omg.CORBA.IntHolder
Marshals the value in this IntHolder object's value field to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.LongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.StringHolder
Marshals the value held by this StringHolder object to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.FixedHolder
Write the fixed point value stored in this holder to an OutputStream.
_write(OutputStream) - Method in class org.omg.CORBA.TypeCodeHolder
Marshals to output the value in this TypeCodeHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.OctetSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.BooleanSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.FloatSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.ULongSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.FloatHolder
Write the float value into an output stream.
_write(OutputStream) - Method in class org.omg.CORBA.ByteHolder
Marshals to output the value in this ByteHolder object.
_write(OutputStream) - Method in class org.omg.CORBA.BooleanHolder
Marshals the value in this BooleanHolder object's value field to the output stream output.
_write(OutputStream) - Method in class org.omg.CORBA.CharSeqHolder
_write(OutputStream) - Method in class org.omg.CORBA.LongHolder
Marshals to output the value in the Holder.
_write(OutputStream) - Method in class org.omg.CORBA.WCharSeqHolder
_write(OutputStream) - Method in interface org.omg.CORBA.portable.Streamable
Marshals to ostream the value in the value field of the Holder.
_write(OutputStream) - Method in class org.omg.CosNaming.BindingIteratorHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NameComponentHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingTypeHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingListHolder
_write(OutputStream) - Method in class org.omg.CosNaming.BindingHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NameHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.AlreadyBoundHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundReasonHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.InvalidNameHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.CannotProceedHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotFoundHolder
_write(OutputStream) - Method in class org.omg.CosNaming.NamingContextPackage.NotEmptyHolder
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV LETTER NEXT LETTER FRAMES NO FRAMES
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 _


Package java.applet

 java.applet
Interfaces
AppletContext
AppletStub
AudioClip
Classes
Applet


Package java.awt

 java.awt
Interfaces
ActiveEvent
Adjustable
Composite
CompositeContext
ItemSelectable
LayoutManager
LayoutManager2
MenuContainer
Paint
PaintContext
PrintGraphics
Shape
Stroke
Transparency
Classes
AlphaComposite
AWTEvent
AWTEventMulticaster
AWTPermission
BasicStroke
BorderLayout
Button
Canvas
CardLayout
Checkbox
CheckboxGroup
CheckboxMenuItem
Choice
Color
Component
ComponentOrientation
Container
Cursor
Dialog
Dimension
Event
EventQueue
FileDialog
FlowLayout
Font
FontMetrics
Frame
GradientPaint
Graphics
Graphics2D
GraphicsConfigTemplate
GraphicsConfiguration
GraphicsDevice
GraphicsEnvironment
GridBagConstraints
GridBagLayout
GridLayout
Image
Insets
JobAttributes
JobAttributes.DefaultSelectionType
JobAttributes.DestinationType
JobAttributes.DialogType
JobAttributes.MultipleDocumentHandlingType
JobAttributes.SidesType
Label
List
MediaTracker
Menu
MenuBar
MenuComponent
MenuItem
MenuShortcut
PageAttributes
PageAttributes.ColorType
PageAttributes.MediaType
PageAttributes.OrientationRequestedType
PageAttributes.OriginType
PageAttributes.PrintQualityType
Panel
Point
Polygon
PopupMenu
PrintJob
Rectangle
RenderingHints
RenderingHints.Key
Robot
Scrollbar
ScrollPane
SystemColor
TextArea
TextComponent
TextField
TexturePaint
Toolkit
Window
Exceptions
AWTException
FontFormatException
IllegalComponentStateException
Errors
AWTError


Package java.awt.color

 java.awt.color
Classes
ColorSpace
ICC_ColorSpace
ICC_Profile
ICC_ProfileGray
ICC_ProfileRGB
Exceptions
CMMException
ProfileDataException


Package java.awt.datatransfer

 java.awt.datatransfer
Interfaces
ClipboardOwner
FlavorMap
Transferable
Classes
Clipboard
DataFlavor
StringSelection
SystemFlavorMap
Exceptions
MimeTypeParseException
UnsupportedFlavorException


Package java.awt.dnd

 java.awt.dnd
Interfaces
Autoscroll
DragGestureListener
DragSourceListener
DropTargetListener
Classes
DnDConstants
DragGestureEvent
DragGestureRecognizer
DragSource
DragSourceContext
DragSourceDragEvent
DragSourceDropEvent
DragSourceEvent
DropTarget
DropTarget.DropTargetAutoScroller
DropTargetContext
DropTargetDragEvent
DropTargetDropEvent
DropTargetEvent
MouseDragGestureRecognizer
Exceptions
InvalidDnDOperationException


Package java.awt.event

 java.awt.event
Interfaces
ActionListener
AdjustmentListener
AWTEventListener
ComponentListener
ContainerListener
FocusListener
HierarchyBoundsListener
HierarchyListener
InputMethodListener
ItemListener
KeyListener
MouseListener
MouseMotionListener
TextListener
WindowListener
Classes
ActionEvent
AdjustmentEvent
ComponentAdapter
ComponentEvent
ContainerAdapter
ContainerEvent
FocusAdapter
FocusEvent
HierarchyBoundsAdapter
HierarchyEvent
InputEvent
InputMethodEvent
InvocationEvent
ItemEvent
KeyAdapter
KeyEvent
MouseAdapter
MouseEvent
MouseMotionAdapter
PaintEvent
TextEvent
WindowAdapter
WindowEvent


Package java.awt.font

 java.awt.font
Interfaces
MultipleMaster
OpenType
Classes
FontRenderContext
GlyphJustificationInfo
GlyphMetrics
GlyphVector
GraphicAttribute
ImageGraphicAttribute
LineBreakMeasurer
LineMetrics
ShapeGraphicAttribute
TextAttribute
TextHitInfo
TextLayout
TextLayout.CaretPolicy
TextMeasurer
TransformAttribute


Package java.awt.geom

 java.awt.geom
Interfaces
PathIterator
Classes
AffineTransform
Arc2D
Arc2D.Double
Arc2D.Float
Area
CubicCurve2D
CubicCurve2D.Double
CubicCurve2D.Float
Dimension2D
Ellipse2D
Ellipse2D.Double
Ellipse2D.Float
FlatteningPathIterator
GeneralPath
Line2D
Line2D.Double
Line2D.Float
Point2D
Point2D.Double
Point2D.Float
QuadCurve2D
QuadCurve2D.Double
QuadCurve2D.Float
Rectangle2D
Rectangle2D.Double
Rectangle2D.Float
RectangularShape
RoundRectangle2D
RoundRectangle2D.Double
RoundRectangle2D.Float
Exceptions
IllegalPathStateException
NoninvertibleTransformException


Package java.awt.im

 java.awt.im
Interfaces
InputMethodRequests
Classes
InputContext
InputMethodHighlight
InputSubset


Package java.awt.im.spi

 java.awt.im.spi
Interfaces
InputMethod
InputMethodContext
InputMethodDescriptor


Package java.awt.image

 java.awt.image
Interfaces
BufferedImageOp
ImageConsumer
ImageObserver
ImageProducer
RasterOp
RenderedImage
TileObserver
WritableRenderedImage
Classes
AffineTransformOp
AreaAveragingScaleFilter
BandCombineOp
BandedSampleModel
BufferedImage
BufferedImageFilter
ByteLookupTable
ColorConvertOp
ColorModel
ComponentColorModel
ComponentSampleModel
ConvolveOp
CropImageFilter
DataBuffer
DataBufferByte
DataBufferInt
DataBufferShort
DataBufferUShort
DirectColorModel
FilteredImageSource
ImageFilter
IndexColorModel
Kernel
LookupOp
LookupTable
MemoryImageSource
MultiPixelPackedSampleModel
PackedColorModel
PixelGrabber
PixelInterleavedSampleModel
Raster
ReplicateScaleFilter
RescaleOp
RGBImageFilter
SampleModel
ShortLookupTable
SinglePixelPackedSampleModel
WritableRaster
Exceptions
ImagingOpException
RasterFormatException


Package java.awt.image.renderable

 java.awt.image.renderable
Interfaces
ContextualRenderedImageFactory
RenderableImage
RenderedImageFactory
Classes
ParameterBlock
RenderableImageOp
RenderableImageProducer
RenderContext


Package java.awt.print

 java.awt.print
Interfaces
Pageable
Printable
PrinterGraphics
Classes
Book
PageFormat
Paper
PrinterJob
Exceptions
PrinterAbortException
PrinterException
PrinterIOException


Package java.beans

 java.beans
Interfaces
AppletInitializer
BeanInfo
Customizer
DesignMode
PropertyChangeListener
PropertyEditor
VetoableChangeListener
Visibility
Classes
BeanDescriptor
Beans
EventSetDescriptor
FeatureDescriptor
IndexedPropertyDescriptor
Introspector
MethodDescriptor
ParameterDescriptor
PropertyChangeEvent
PropertyChangeSupport
PropertyDescriptor
PropertyEditorManager
PropertyEditorSupport
SimpleBeanInfo
VetoableChangeSupport
Exceptions
IntrospectionException
PropertyVetoException


Package java.beans.beancontext

 java.beans.beancontext
Interfaces
BeanContext
BeanContextChild
BeanContextChildComponentProxy
BeanContextContainerProxy
BeanContextMembershipListener
BeanContextProxy
BeanContextServiceProvider
BeanContextServiceProviderBeanInfo
BeanContextServiceRevokedListener
BeanContextServices
BeanContextServicesListener
Classes
BeanContextChildSupport
BeanContextEvent
BeanContextMembershipEvent
BeanContextServiceAvailableEvent
BeanContextServiceRevokedEvent
BeanContextServicesSupport
BeanContextServicesSupport.BCSSServiceProvider
BeanContextSupport
BeanContextSupport.BCSIterator


Package java.io

 java.io
Interfaces
DataInput
DataOutput
Externalizable
FileFilter
FilenameFilter
ObjectInput
ObjectInputValidation
ObjectOutput
ObjectStreamConstants
Serializable
Classes
BufferedInputStream
BufferedOutputStream
BufferedReader
BufferedWriter
ByteArrayInputStream
ByteArrayOutputStream
CharArrayReader
CharArrayWriter
DataInputStream
DataOutputStream
File
FileDescriptor
FileInputStream
FileOutputStream
FilePermission
FileReader
FileWriter
FilterInputStream
FilterOutputStream
FilterReader
FilterWriter
InputStream
InputStreamReader
LineNumberInputStream
LineNumberReader
ObjectInputStream
ObjectInputStream.GetField
ObjectOutputStream
ObjectOutputStream.PutField
ObjectStreamClass
ObjectStreamField
OutputStream
OutputStreamWriter
PipedInputStream
PipedOutputStream
PipedReader
PipedWriter
PrintStream
PrintWriter
PushbackInputStream
PushbackReader
RandomAccessFile
Reader
SequenceInputStream
SerializablePermission
StreamTokenizer
StringBufferInputStream
StringReader
StringWriter
Writer
Exceptions
CharConversionException
EOFException
FileNotFoundException
InterruptedIOException
InvalidClassException
InvalidObjectException
IOException
NotActiveException
NotSerializableException
ObjectStreamException
OptionalDataException
StreamCorruptedException
SyncFailedException
UnsupportedEncodingException
UTFDataFormatException
WriteAbortedException


Package java.lang

 java.lang
Interfaces
Cloneable
Comparable
Runnable
Classes
Boolean
Byte
Character
Character.Subset
Character.UnicodeBlock
Class
ClassLoader
Compiler
Double
Float
InheritableThreadLocal
Integer
Long
Math
Number
Object
Package
Process
Runtime
RuntimePermission
SecurityManager
Short
StrictMath
String
StringBuffer
System
Thread
ThreadGroup
ThreadLocal
Throwable
Void
Exceptions
ArithmeticException
ArrayIndexOutOfBoundsException
ArrayStoreException
ClassCastException
ClassNotFoundException
CloneNotSupportedException
Exception
IllegalAccessException
IllegalArgumentException
IllegalMonitorStateException
IllegalStateException
IllegalThreadStateException
IndexOutOfBoundsException
InstantiationException
InterruptedException
NegativeArraySizeException
NoSuchFieldException
NoSuchMethodException
NullPointerException
NumberFormatException
RuntimeException
SecurityException
StringIndexOutOfBoundsException
UnsupportedOperationException
Errors
AbstractMethodError
ClassCircularityError
ClassFormatError
Error
ExceptionInInitializerError
IllegalAccessError
IncompatibleClassChangeError
InstantiationError
InternalError
LinkageError
NoClassDefFoundError
NoSuchFieldError
NoSuchMethodError
OutOfMemoryError
StackOverflowError
ThreadDeath
UnknownError
UnsatisfiedLinkError
UnsupportedClassVersionError
VerifyError
VirtualMachineError


Package java.lang.ref

 java.lang.ref
Classes
PhantomReference
Reference
ReferenceQueue
SoftReference
WeakReference


Package java.lang.reflect

 java.lang.reflect
Interfaces
InvocationHandler
Member
Classes
AccessibleObject
Array
Constructor
Field
Method
Modifier
Proxy
ReflectPermission
Exceptions
InvocationTargetException
UndeclaredThrowableException


Package java.math

 java.math
Classes
BigDecimal
BigInteger


Package java.net

 java.net
Interfaces
ContentHandlerFactory
DatagramSocketImplFactory
FileNameMap
SocketImplFactory
SocketOptions
URLStreamHandlerFactory
Classes
Authenticator
ContentHandler
DatagramPacket
DatagramSocket
DatagramSocketImpl
HttpURLConnection
InetAddress
JarURLConnection
MulticastSocket
NetPermission
PasswordAuthentication
ServerSocket
Socket
SocketImpl
SocketPermission
URL
URLClassLoader
URLConnection
URLDecoder
URLEncoder
URLStreamHandler
Exceptions
BindException
ConnectException
MalformedURLException
NoRouteToHostException
ProtocolException
SocketException
UnknownHostException
UnknownServiceException


Package java.rmi

 java.rmi
Interfaces
Remote
Classes
MarshalledObject
Naming
RMISecurityManager
Exceptions
AccessException
AlreadyBoundException
ConnectException
ConnectIOException
MarshalException
NoSuchObjectException
NotBoundException
RemoteException
RMISecurityException
ServerError
ServerException
ServerRuntimeException
StubNotFoundException
UnexpectedException
UnknownHostException
UnmarshalException


Package java.rmi.activation

 java.rmi.activation
Interfaces
ActivationInstantiator
ActivationMonitor
ActivationSystem
Activator
Classes
Activatable
ActivationDesc
ActivationGroup
ActivationGroupDesc
ActivationGroupDesc.CommandEnvironment
ActivationGroupID
ActivationID
Exceptions
ActivateFailedException
ActivationException
UnknownGroupException
UnknownObjectException


Package java.rmi.dgc

 java.rmi.dgc
Interfaces
DGC
Classes
Lease
VMID


Package java.rmi.registry

 java.rmi.registry
Interfaces
Registry
RegistryHandler
Classes
LocateRegistry


Package java.rmi.server

 java.rmi.server
Interfaces
LoaderHandler
RemoteCall
RemoteRef
RMIClientSocketFactory
RMIFailureHandler
RMIServerSocketFactory
ServerRef
Skeleton
Unreferenced
Classes
LogStream
ObjID
Operation
RemoteObject
RemoteServer
RemoteStub
RMIClassLoader
RMISocketFactory
UID
UnicastRemoteObject
Exceptions
ExportException
ServerCloneException
ServerNotActiveException
SkeletonMismatchException
SkeletonNotFoundException
SocketSecurityException


Package java.security

 java.security
Interfaces
Certificate
DomainCombiner
Guard
Key
Principal
PrivateKey
PrivilegedAction
PrivilegedExceptionAction
PublicKey
Classes
AccessControlContext
AccessController
AlgorithmParameterGenerator
AlgorithmParameterGeneratorSpi
AlgorithmParameters
AlgorithmParametersSpi
AllPermission
BasicPermission
CodeSource
DigestInputStream
DigestOutputStream
GuardedObject
Identity
IdentityScope
KeyFactory
KeyFactorySpi
KeyPair
KeyPairGenerator
KeyPairGeneratorSpi
KeyStore
KeyStoreSpi
MessageDigest
MessageDigestSpi
Permission
PermissionCollection
Permissions
Policy
ProtectionDomain
Provider
SecureClassLoader
SecureRandom
SecureRandomSpi
Security
SecurityPermission
Signature
SignatureSpi
SignedObject
Signer
UnresolvedPermission
Exceptions
AccessControlException
DigestException
GeneralSecurityException
InvalidAlgorithmParameterException
InvalidKeyException
InvalidParameterException
KeyException
KeyManagementException
KeyStoreException
NoSuchAlgorithmException
NoSuchProviderException
PrivilegedActionException
ProviderException
SignatureException
UnrecoverableKeyException


Package java.security.acl

 java.security.acl
Interfaces
Acl
AclEntry
Group
Owner
Permission
Exceptions
AclNotFoundException
LastOwnerException
NotOwnerException


Package java.security.cert

 java.security.cert
Interfaces
X509Extension
Classes
Certificate
Certificate.CertificateRep
CertificateFactory
CertificateFactorySpi
CRL
X509Certificate
X509CRL
X509CRLEntry
Exceptions
CertificateEncodingException
CertificateException
CertificateExpiredException
CertificateNotYetValidException
CertificateParsingException
CRLException


Package java.security.interfaces

 java.security.interfaces
Interfaces
DSAKey
DSAKeyPairGenerator
DSAParams
DSAPrivateKey
DSAPublicKey
RSAKey
RSAPrivateCrtKey
RSAPrivateKey
RSAPublicKey


Package java.security.spec

 java.security.spec
Interfaces
AlgorithmParameterSpec
KeySpec
Classes
DSAParameterSpec
DSAPrivateKeySpec
DSAPublicKeySpec
EncodedKeySpec
PKCS8EncodedKeySpec
RSAKeyGenParameterSpec
RSAPrivateCrtKeySpec
RSAPrivateKeySpec
RSAPublicKeySpec
X509EncodedKeySpec
Exceptions
InvalidKeySpecException
InvalidParameterSpecException


Package java.sql

 java.sql
Interfaces
Array
Blob
CallableStatement
Clob
Connection
DatabaseMetaData
Driver
PreparedStatement
Ref
ResultSet
ResultSetMetaData
SQLData
SQLInput
SQLOutput
Statement
Struct
Classes
Date
DriverManager
DriverPropertyInfo
SQLPermission
Time
Timestamp
Types
Exceptions
BatchUpdateException
DataTruncation
SQLException
SQLWarning


Package java.text

 java.text
Interfaces
AttributedCharacterIterator
CharacterIterator
Classes
Annotation
AttributedCharacterIterator.Attribute
AttributedString
BreakIterator
ChoiceFormat
CollationElementIterator
CollationKey
Collator
DateFormat
DateFormatSymbols
DecimalFormat
DecimalFormatSymbols
FieldPosition
Format
MessageFormat
NumberFormat
ParsePosition
RuleBasedCollator
SimpleDateFormat
StringCharacterIterator
Exceptions
ParseException


Package java.util

 java.util
Interfaces
Collection
Comparator
Enumeration
EventListener
Iterator
List
ListIterator
Map
Map.Entry
Observer
Set
SortedMap
SortedSet
Classes
AbstractCollection
AbstractList
AbstractMap
AbstractSequentialList
AbstractSet
ArrayList
Arrays
BitSet
Calendar
Collections
Date
Dictionary
EventObject
GregorianCalendar
HashMap
HashSet
Hashtable
LinkedList
ListResourceBundle
Locale
Observable
Properties
PropertyPermission
PropertyResourceBundle
Random
ResourceBundle
SimpleTimeZone
Stack
StringTokenizer
Timer
TimerTask
TimeZone
TreeMap
TreeSet
Vector
WeakHashMap
Exceptions
ConcurrentModificationException
EmptyStackException
MissingResourceException
NoSuchElementException
TooManyListenersException


Package java.util.jar

 java.util.jar
Classes
Attributes
Attributes.Name
JarEntry
JarFile
JarInputStream
JarOutputStream
Manifest
Exceptions
JarException


Package java.util.zip

 java.util.zip
Interfaces
Checksum
Classes
Adler32
CheckedInputStream
CheckedOutputStream
CRC32
Deflater
DeflaterOutputStream
GZIPInputStream
GZIPOutputStream
Inflater
InflaterInputStream
ZipEntry
ZipFile
ZipInputStream
ZipOutputStream
Exceptions
DataFormatException
ZipException


Package javax.accessibility

 javax.accessibility
Interfaces
Accessible
AccessibleAction
AccessibleComponent
AccessibleHypertext
AccessibleIcon
AccessibleSelection
AccessibleTable
AccessibleTableModelChange
AccessibleText
AccessibleValue
Classes
AccessibleBundle
AccessibleContext
AccessibleHyperlink
AccessibleRelation
AccessibleRelationSet
AccessibleResourceBundle
AccessibleRole
AccessibleState
AccessibleStateSet


Package javax.naming

 javax.naming
Interfaces
Context
Name
NameParser
NamingEnumeration
Referenceable
Classes
BinaryRefAddr
Binding
CompositeName
CompoundName
InitialContext
LinkRef
NameClassPair
RefAddr
Reference
StringRefAddr
Exceptions
AuthenticationException
AuthenticationNotSupportedException
CannotProceedException
CommunicationException
ConfigurationException
ContextNotEmptyException
InsufficientResourcesException
InterruptedNamingException
InvalidNameException
LimitExceededException
LinkException
LinkLoopException
MalformedLinkException
NameAlreadyBoundException
NameNotFoundException
NamingException
NamingSecurityException
NoInitialContextException
NoPermissionException
NotContextException
OperationNotSupportedException
PartialResultException
ReferralException
ServiceUnavailableException
SizeLimitExceededException
TimeLimitExceededException


Package javax.naming.directory

 javax.naming.directory
Interfaces
Attribute
Attributes
DirContext
Classes
BasicAttribute
BasicAttributes
InitialDirContext
ModificationItem
SearchControls
SearchResult
Exceptions
AttributeInUseException
AttributeModificationException
InvalidAttributeIdentifierException
InvalidAttributesException
InvalidAttributeValueException
InvalidSearchControlsException
InvalidSearchFilterException
NoSuchAttributeException
SchemaViolationException


Package javax.naming.event

 javax.naming.event
Interfaces
EventContext
EventDirContext
NamespaceChangeListener
NamingListener
ObjectChangeListener
Classes
NamingEvent
NamingExceptionEvent


Package javax.naming.ldap

 javax.naming.ldap
Interfaces
Control
ExtendedRequest
ExtendedResponse
HasControls
LdapContext
UnsolicitedNotification
UnsolicitedNotificationListener
Classes
ControlFactory
InitialLdapContext
UnsolicitedNotificationEvent
Exceptions
LdapReferralException


Package javax.naming.spi

 javax.naming.spi
Interfaces
DirObjectFactory
DirStateFactory
InitialContextFactory
InitialContextFactoryBuilder
ObjectFactory
ObjectFactoryBuilder
Resolver
StateFactory
Classes
DirectoryManager
DirStateFactory.Result
NamingManager
ResolveResult


Package javax.rmi

 javax.rmi
Classes
PortableRemoteObject


Package javax.rmi.CORBA

 javax.rmi.CORBA
Interfaces
PortableRemoteObjectDelegate
StubDelegate
Tie
UtilDelegate
ValueHandler
Classes
ClassDesc
Stub
Util


Package javax.sound.midi

 javax.sound.midi
Interfaces
ControllerEventListener
MetaEventListener
MidiChannel
MidiDevice
Receiver
Sequencer
Soundbank
Synthesizer
Transmitter
Classes
Instrument
MetaMessage
MidiDevice.Info
MidiEvent
MidiFileFormat
MidiMessage
MidiSystem
Patch
Sequence
Sequencer.SyncMode
ShortMessage
SoundbankResource
SysexMessage
Track
VoiceStatus
Exceptions
InvalidMidiDataException
MidiUnavailableException


Package javax.sound.midi.spi

 javax.sound.midi.spi
Classes
MidiDeviceProvider
MidiFileReader
MidiFileWriter
SoundbankReader


Package javax.sound.sampled

 javax.sound.sampled
Interfaces
Clip
DataLine
Line
LineListener
Mixer
Port
SourceDataLine
TargetDataLine
Classes
AudioFileFormat
AudioFileFormat.Type
AudioFormat
AudioFormat.Encoding
AudioInputStream
AudioPermission
AudioSystem
BooleanControl
BooleanControl.Type
CompoundControl
CompoundControl.Type
Control
Control.Type
DataLine.Info
EnumControl
EnumControl.Type
FloatControl
FloatControl.Type
Line.Info
LineEvent
LineEvent.Type
Mixer.Info
Port.Info
ReverbType
Exceptions
LineUnavailableException
UnsupportedAudioFileException


Package javax.sound.sampled.spi

 javax.sound.sampled.spi
Classes
AudioFileReader
AudioFileWriter
FormatConversionProvider
MixerProvider


Package javax.swing

 javax.swing
Interfaces
Action
BoundedRangeModel
ButtonModel
CellEditor
ComboBoxEditor
ComboBoxModel
DesktopManager
Icon
JComboBox.KeySelectionManager
ListCellRenderer
ListModel
ListSelectionModel
MenuElement
MutableComboBoxModel
Renderer
RootPaneContainer
Scrollable
ScrollPaneConstants
SingleSelectionModel
SwingConstants
UIDefaults.ActiveValue
UIDefaults.LazyValue
WindowConstants
Classes
AbstractAction
AbstractButton
AbstractCellEditor
AbstractListModel
ActionMap
BorderFactory
Box
Box.Filler
BoxLayout
ButtonGroup
CellRendererPane
ComponentInputMap
DebugGraphics
DefaultBoundedRangeModel
DefaultButtonModel
DefaultCellEditor
DefaultComboBoxModel
DefaultDesktopManager
DefaultFocusManager
DefaultListCellRenderer
DefaultListCellRenderer.UIResource
DefaultListModel
DefaultListSelectionModel
DefaultSingleSelectionModel
FocusManager
GrayFilter
ImageIcon
InputMap
InputVerifier
JApplet
JButton
JCheckBox
JCheckBoxMenuItem
JColorChooser
JComboBox
JComponent
JDesktopPane
JDialog
JEditorPane
JFileChooser
JFrame
JInternalFrame
JInternalFrame.JDesktopIcon
JLabel
JLayeredPane
JList
JMenu
JMenuBar
JMenuItem
JOptionPane
JPanel
JPasswordField
JPopupMenu
JPopupMenu.Separator
JProgressBar
JRadioButton
JRadioButtonMenuItem
JRootPane
JScrollBar
JScrollPane
JSeparator
JSlider
JSplitPane
JTabbedPane
JTable
JTextArea
JTextField
JTextPane
JToggleButton
JToggleButton.ToggleButtonModel
JToolBar
JToolBar.Separator
JToolTip
JTree
JTree.DynamicUtilTreeNode
JTree.EmptySelectionModel
JViewport
JWindow
KeyStroke
LookAndFeel
MenuSelectionManager
OverlayLayout
ProgressMonitor
ProgressMonitorInputStream
RepaintManager
ScrollPaneLayout
ScrollPaneLayout.UIResource
SizeRequirements
SizeSequence
SwingUtilities
Timer
ToolTipManager
UIDefaults
UIDefaults.LazyInputMap
UIDefaults.ProxyLazyValue
UIManager
UIManager.LookAndFeelInfo
ViewportLayout
Exceptions
UnsupportedLookAndFeelException


Package javax.swing.border

 javax.swing.border
Interfaces
Border
Classes
AbstractBorder
BevelBorder
CompoundBorder
EmptyBorder
EtchedBorder
LineBorder
MatteBorder
SoftBevelBorder
TitledBorder


Package javax.swing.colorchooser

 javax.swing.colorchooser
Interfaces
ColorSelectionModel
Classes
AbstractColorChooserPanel
ColorChooserComponentFactory
DefaultColorSelectionModel


Package javax.swing.event

 javax.swing.event
Interfaces
AncestorListener
CaretListener
CellEditorListener
ChangeListener
DocumentEvent
DocumentEvent.ElementChange
DocumentListener
HyperlinkListener
InternalFrameListener
ListDataListener
ListSelectionListener
MenuDragMouseListener
MenuKeyListener
MenuListener
MouseInputListener
PopupMenuListener
TableColumnModelListener
TableModelListener
TreeExpansionListener
TreeModelListener
TreeSelectionListener
TreeWillExpandListener
UndoableEditListener
Classes
AncestorEvent
CaretEvent
ChangeEvent
DocumentEvent.EventType
EventListenerList
HyperlinkEvent
HyperlinkEvent.EventType
InternalFrameAdapter
InternalFrameEvent
ListDataEvent
ListSelectionEvent
MenuDragMouseEvent
MenuEvent
MenuKeyEvent
MouseInputAdapter
PopupMenuEvent
SwingPropertyChangeSupport
TableColumnModelEvent
TableModelEvent
TreeExpansionEvent
TreeModelEvent
TreeSelectionEvent
UndoableEditEvent


Package javax.swing.filechooser

 javax.swing.filechooser
Classes
FileFilter
FileSystemView
FileView


Package javax.swing.plaf

 javax.swing.plaf
Interfaces
UIResource
Classes
ActionMapUIResource
BorderUIResource
BorderUIResource.BevelBorderUIResource
BorderUIResource.CompoundBorderUIResource
BorderUIResource.EmptyBorderUIResource
BorderUIResource.EtchedBorderUIResource
BorderUIResource.LineBorderUIResource
BorderUIResource.MatteBorderUIResource
BorderUIResource.TitledBorderUIResource
ButtonUI
ColorChooserUI
ColorUIResource
ComboBoxUI
ComponentInputMapUIResource
ComponentUI
DesktopIconUI
DesktopPaneUI
DimensionUIResource
FileChooserUI
FontUIResource
IconUIResource
InputMapUIResource
InsetsUIResource
InternalFrameUI
LabelUI
ListUI
MenuBarUI
MenuItemUI
OptionPaneUI
PanelUI
PopupMenuUI
ProgressBarUI
RootPaneUI
ScrollBarUI
ScrollPaneUI
SeparatorUI
SliderUI
SplitPaneUI
TabbedPaneUI
TableHeaderUI
TableUI
TextUI
ToolBarUI
ToolTipUI
TreeUI
ViewportUI


Package javax.swing.plaf.basic

 javax.swing.plaf.basic
Interfaces
ComboPopup
Classes
BasicArrowButton
BasicBorders
BasicBorders.ButtonBorder
BasicBorders.FieldBorder
BasicBorders.MarginBorder
BasicBorders.MenuBarBorder
BasicBorders.RadioButtonBorder
BasicBorders.SplitPaneBorder
BasicBorders.ToggleButtonBorder
BasicButtonListener
BasicButtonUI
BasicCheckBoxMenuItemUI
BasicCheckBoxUI
BasicColorChooserUI
BasicComboBoxEditor
BasicComboBoxEditor.UIResource
BasicComboBoxRenderer
BasicComboBoxRenderer.UIResource
BasicComboBoxUI
BasicComboPopup
BasicDesktopIconUI
BasicDesktopPaneUI
BasicDirectoryModel
BasicEditorPaneUI
BasicFileChooserUI
BasicGraphicsUtils
BasicHTML
BasicIconFactory
BasicInternalFrameTitlePane
BasicInternalFrameUI
BasicLabelUI
BasicListUI
BasicLookAndFeel
BasicMenuBarUI
BasicMenuItemUI
BasicMenuUI
BasicOptionPaneUI
BasicOptionPaneUI.ButtonAreaLayout
BasicPanelUI
BasicPasswordFieldUI
BasicPopupMenuSeparatorUI
BasicPopupMenuUI
BasicProgressBarUI
BasicRadioButtonMenuItemUI
BasicRadioButtonUI
BasicRootPaneUI
BasicScrollBarUI
BasicScrollPaneUI
BasicSeparatorUI
BasicSliderUI
BasicSplitPaneDivider
BasicSplitPaneUI
BasicTabbedPaneUI
BasicTableHeaderUI
BasicTableUI
BasicTextAreaUI
BasicTextFieldUI
BasicTextPaneUI
BasicTextUI
BasicTextUI.BasicCaret
BasicTextUI.BasicHighlighter
BasicToggleButtonUI
BasicToolBarSeparatorUI
BasicToolBarUI
BasicToolTipUI
BasicTreeUI
BasicViewportUI
DefaultMenuLayout


Package javax.swing.plaf.metal

 javax.swing.plaf.metal
Classes
DefaultMetalTheme
MetalBorders
MetalBorders.ButtonBorder
MetalBorders.Flush3DBorder
MetalBorders.InternalFrameBorder
MetalBorders.MenuBarBorder
MetalBorders.MenuItemBorder
MetalBorders.OptionDialogBorder
MetalBorders.PaletteBorder
MetalBorders.PopupMenuBorder
MetalBorders.RolloverButtonBorder
MetalBorders.ScrollPaneBorder
MetalBorders.TableHeaderBorder
MetalBorders.TextFieldBorder
MetalBorders.ToggleButtonBorder
MetalBorders.ToolBarBorder
MetalButtonUI
MetalCheckBoxIcon
MetalCheckBoxUI
MetalComboBoxButton
MetalComboBoxEditor
MetalComboBoxEditor.UIResource
MetalComboBoxIcon
MetalComboBoxUI
MetalDesktopIconUI
MetalFileChooserUI
MetalIconFactory
MetalIconFactory.FileIcon16
MetalIconFactory.FolderIcon16
MetalIconFactory.PaletteCloseIcon
MetalIconFactory.TreeControlIcon
MetalIconFactory.TreeFolderIcon
MetalIconFactory.TreeLeafIcon
MetalInternalFrameTitlePane
MetalInternalFrameUI
MetalLabelUI
MetalLookAndFeel
MetalPopupMenuSeparatorUI
MetalProgressBarUI
MetalRadioButtonUI
MetalScrollBarUI
MetalScrollButton
MetalScrollPaneUI
MetalSeparatorUI
MetalSliderUI
MetalSplitPaneUI
MetalTabbedPaneUI
MetalTextFieldUI
MetalTheme
MetalToggleButtonUI
MetalToolBarUI
MetalToolTipUI
MetalTreeUI


Package javax.swing.plaf.multi

 javax.swing.plaf.multi
Classes
MultiButtonUI
MultiColorChooserUI
MultiComboBoxUI
MultiDesktopIconUI
MultiDesktopPaneUI
MultiFileChooserUI
MultiInternalFrameUI
MultiLabelUI
MultiListUI
MultiLookAndFeel
MultiMenuBarUI
MultiMenuItemUI
MultiOptionPaneUI
MultiPanelUI
MultiPopupMenuUI
MultiProgressBarUI
MultiScrollBarUI
MultiScrollPaneUI
MultiSeparatorUI
MultiSliderUI
MultiSplitPaneUI
MultiTabbedPaneUI
MultiTableHeaderUI
MultiTableUI
MultiTextUI
MultiToolBarUI
MultiToolTipUI
MultiTreeUI
MultiViewportUI


Package javax.swing.table

 javax.swing.table
Interfaces
TableCellEditor
TableCellRenderer
TableColumnModel
TableModel
Classes
AbstractTableModel
DefaultTableCellRenderer
DefaultTableCellRenderer.UIResource
DefaultTableColumnModel
DefaultTableModel
JTableHeader
TableColumn


Package javax.swing.text

 javax.swing.text
Interfaces
AbstractDocument.AttributeContext
AbstractDocument.Content
AttributeSet
AttributeSet.CharacterAttribute
AttributeSet.ColorAttribute
AttributeSet.FontAttribute
AttributeSet.ParagraphAttribute
Caret
Document
Element
Highlighter
Highlighter.Highlight
Highlighter.HighlightPainter
Keymap
MutableAttributeSet
Position
Style
StyledDocument
TabableView
TabExpander
ViewFactory
Classes
AbstractDocument
AbstractDocument.ElementEdit
AbstractWriter
AsyncBoxView
BoxView
ComponentView
CompositeView
DefaultCaret
DefaultEditorKit
DefaultEditorKit.BeepAction
DefaultEditorKit.CopyAction
DefaultEditorKit.CutAction
DefaultEditorKit.DefaultKeyTypedAction
DefaultEditorKit.InsertBreakAction
DefaultEditorKit.InsertContentAction
DefaultEditorKit.InsertTabAction
DefaultEditorKit.PasteAction
DefaultHighlighter
DefaultHighlighter.DefaultHighlightPainter
DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit
DefaultStyledDocument.ElementSpec
DefaultTextUI
EditorKit
ElementIterator
FieldView
FlowView
FlowView.FlowStrategy
GapContent
GlyphView
GlyphView.GlyphPainter
IconView
JTextComponent
JTextComponent.KeyBinding
LabelView
LayeredHighlighter
LayeredHighlighter.LayerPainter
LayoutQueue
ParagraphView
PasswordView
PlainDocument
PlainView
Position.Bias
Segment
SimpleAttributeSet
StringContent
StyleConstants
StyleConstants.CharacterConstants
StyleConstants.ColorConstants
StyleConstants.FontConstants
StyleConstants.ParagraphConstants
StyleContext
StyledEditorKit
StyledEditorKit.AlignmentAction
StyledEditorKit.BoldAction
StyledEditorKit.FontFamilyAction
StyledEditorKit.FontSizeAction
StyledEditorKit.ForegroundAction
StyledEditorKit.ItalicAction
StyledEditorKit.StyledTextAction
StyledEditorKit.UnderlineAction
TableView
TabSet
TabStop
TextAction
Utilities
View
WrappedPlainView
ZoneView
Exceptions
BadLocationException
ChangedCharSetException


Package javax.swing.text.html

 javax.swing.text.html
Classes
BlockView
CSS
CSS.Attribute
FormView
HTML
HTML.Attribute
HTML.Tag
HTML.UnknownTag
HTMLDocument
HTMLDocument.Iterator
HTMLEditorKit
HTMLEditorKit.HTMLFactory
HTMLEditorKit.HTMLTextAction
HTMLEditorKit.InsertHTMLTextAction
HTMLEditorKit.LinkController
HTMLEditorKit.Parser
HTMLEditorKit.ParserCallback
HTMLFrameHyperlinkEvent
HTMLWriter
InlineView
ListView
MinimalHTMLWriter
ObjectView
Option
ParagraphView
StyleSheet
StyleSheet.BoxPainter
StyleSheet.ListPainter


Package javax.swing.text.html.parser

 javax.swing.text.html.parser
Interfaces
DTDConstants
Classes
AttributeList
ContentModel
DocumentParser
DTD
Element
Entity
Parser
ParserDelegator
TagElement


Package javax.swing.text.rtf

 javax.swing.text.rtf
Classes
RTFEditorKit


Package javax.swing.tree

 javax.swing.tree
Interfaces
MutableTreeNode
RowMapper
TreeCellEditor
TreeCellRenderer
TreeModel
TreeNode
TreeSelectionModel
Classes
AbstractLayoutCache
AbstractLayoutCache.NodeDimensions
DefaultMutableTreeNode
DefaultTreeCellEditor
DefaultTreeCellRenderer
DefaultTreeModel
DefaultTreeSelectionModel
FixedHeightLayoutCache
TreePath
VariableHeightLayoutCache
Exceptions
ExpandVetoException


Package javax.swing.undo

 javax.swing.undo
Interfaces
StateEditable
UndoableEdit
Classes
AbstractUndoableEdit
CompoundEdit
StateEdit
UndoableEditSupport
UndoManager
Exceptions
CannotRedoException
CannotUndoException


Package javax.transaction

 javax.transaction
Exceptions
InvalidTransactionException
TransactionRequiredException
TransactionRolledbackException


Package org.omg.CORBA

 org.omg.CORBA
Interfaces
ARG_IN
ARG_INOUT
ARG_OUT
BAD_POLICY
BAD_POLICY_TYPE
BAD_POLICY_VALUE
CTX_RESTRICT_SCOPE
Current
CurrentOperations
CustomMarshal
DataInputStream
DataOutputStream
DomainManager
DomainManagerOperations
DynAny
DynArray
DynEnum
DynFixed
DynSequence
DynStruct
DynUnion
DynValue
IDLType
IDLTypeOperations
IRObject
IRObjectOperations
Object
OMGVMCID
Policy
PolicyOperations
PRIVATE_MEMBER
PUBLIC_MEMBER
Repository
UNSUPPORTED_POLICY
UNSUPPORTED_POLICY_VALUE
VM_ABSTRACT
VM_CUSTOM
VM_NONE
VM_TRUNCATABLE
Classes
_IDLTypeStub
_PolicyStub
Any
AnyHolder
AnySeqHelper
AnySeqHolder
BooleanHolder
BooleanSeqHelper
BooleanSeqHolder
ByteHolder
CharHolder
CharSeqHelper
CharSeqHolder
CompletionStatus
CompletionStatusHelper
Context
ContextList
CurrentHelper
CurrentHolder
DefinitionKind
DefinitionKindHelper
DoubleHolder
DoubleSeqHelper
DoubleSeqHolder
DynamicImplementation
Environment
ExceptionList
FieldNameHelper
FixedHolder
FloatHolder
FloatSeqHelper
FloatSeqHolder
IdentifierHelper
IDLTypeHelper
Initializer
IntHolder
LongHolder
LongLongSeqHelper
LongLongSeqHolder
LongSeqHelper
LongSeqHolder
NamedValue
NameValuePair
NameValuePairHelper
NVList
ObjectHelper
ObjectHolder
OctetSeqHelper
OctetSeqHolder
ORB
PolicyHelper
PolicyHolder
PolicyListHelper
PolicyListHolder
PolicyTypeHelper
Principal
PrincipalHolder
RepositoryIdHelper
Request
ServerRequest
ServiceDetail
ServiceDetailHelper
ServiceInformation
ServiceInformationHelper
ServiceInformationHolder
SetOverrideType
SetOverrideTypeHelper
ShortHolder
ShortSeqHelper
ShortSeqHolder
StringHolder
StringValueHelper
StructMember
StructMemberHelper
TCKind
TypeCode
TypeCodeHolder
ULongLongSeqHelper
ULongLongSeqHolder
ULongSeqHelper
ULongSeqHolder
UnionMember
UnionMemberHelper
UShortSeqHelper
UShortSeqHolder
ValueBaseHelper
ValueBaseHolder
ValueMember
ValueMemberHelper
VersionSpecHelper
VisibilityHelper
WCharSeqHelper
WCharSeqHolder
WStringValueHelper
Exceptions
BAD_CONTEXT
BAD_INV_ORDER
BAD_OPERATION
BAD_PARAM
BAD_TYPECODE
Bounds
COMM_FAILURE
DATA_CONVERSION
FREE_MEM
IMP_LIMIT
INITIALIZE
INTERNAL
INTF_REPOS
INV_FLAG
INV_IDENT
INV_OBJREF
INV_POLICY
INVALID_TRANSACTION
MARSHAL
NO_IMPLEMENT
NO_MEMORY
NO_PERMISSION
NO_RESOURCES
NO_RESPONSE
OBJ_ADAPTER
OBJECT_NOT_EXIST
PERSIST_STORE
PolicyError
SystemException
TRANSACTION_REQUIRED
TRANSACTION_ROLLEDBACK
TRANSIENT
UNKNOWN
UnknownUserException
UserException
WrongTransaction


Package org.omg.CORBA.DynAnyPackage

 org.omg.CORBA.DynAnyPackage
Exceptions
Invalid
InvalidSeq
InvalidValue
TypeMismatch


Package org.omg.CORBA.ORBPackage

 org.omg.CORBA.ORBPackage
Exceptions
InconsistentTypeCode
InvalidName


Package org.omg.CORBA.portable

 org.omg.CORBA.portable
Interfaces
BoxedValueHelper
CustomValue
IDLEntity
InvokeHandler
ResponseHandler
Streamable
StreamableValue
ValueBase
ValueFactory
Classes
Delegate
InputStream
ObjectImpl
OutputStream
ServantObject
Exceptions
ApplicationException
IndirectionException
RemarshalException
UnknownException


Package org.omg.CORBA.TypeCodePackage

 org.omg.CORBA.TypeCodePackage
Exceptions
BadKind
Bounds


Package org.omg.CORBA_2_3

 org.omg.CORBA_2_3
Classes
ORB


Package org.omg.CORBA_2_3.portable

 org.omg.CORBA_2_3.portable
Classes
Delegate
InputStream
ObjectImpl
OutputStream


Package org.omg.CosNaming

 org.omg.CosNaming
Interfaces
BindingIterator
BindingIteratorOperations
NamingContext
NamingContextOperations
Classes
_BindingIteratorImplBase
_BindingIteratorStub
_NamingContextImplBase
_NamingContextStub
Binding
BindingHelper
BindingHolder
BindingIteratorHelper
BindingIteratorHolder
BindingListHelper
BindingListHolder
BindingType
BindingTypeHelper
BindingTypeHolder
IstringHelper
NameComponent
NameComponentHelper
NameComponentHolder
NameHelper
NameHolder
NamingContextHelper
NamingContextHolder


Package org.omg.CosNaming.NamingContextPackage

 org.omg.CosNaming.NamingContextPackage
Classes
AlreadyBoundHelper
AlreadyBoundHolder
CannotProceedHelper
CannotProceedHolder
InvalidNameHelper
InvalidNameHolder
NotEmptyHelper
NotEmptyHolder
NotFoundHelper
NotFoundHolder
NotFoundReason
NotFoundReasonHelper
NotFoundReasonHolder
Exceptions
AlreadyBound
CannotProceed
InvalidName
NotEmpty
NotFound


Package org.omg.SendingContext

 org.omg.SendingContext
Interfaces
RunTime
RunTimeOperations


_Remote_Stub

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.omg.stub.java.rmi
Class _Remote_Stub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CORBA_2_3.portable.ObjectImpl
              |
              +--javax.rmi.CORBA.Stub
                    |
                    +--org.omg.stub.java.rmi._Remote_Stub
All Implemented Interfaces:
Object, Remote, Serializable
public final class _Remote_Stub
extends Stub
implements Remote

This class provides the Stub for the Remote Type. The class is generated by the rmic compiler, and is still under works at OMG. It's contents are subject to change without notice as the specification evolves.

See Also:
Serialized Form

Constructor Summary
_Remote_Stub()
Method Summary
 String[] _ids()
Returns an array of repository ids that an object implements.
Methods inherited from class javax.rmi.CORBA.Stub
connect, equals, hashCode, toString
Methods inherited from class org.omg.CORBA_2_3.portable.ObjectImpl
_get_codebase
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

_Remote_Stub

public _Remote_Stub()
Method Detail

_ids

public String[] _ids()
Returns an array of repository ids that an object implements. The string at index zero represents the most derived interface. The last id, for the generic CORBA object is (i.e., IDL:omg.org/CORBA/Object:1.0") is implied and not present.
Overrides:
_ids in class ObjectImpl
Returns:
an array of repository ids that an object implements.
Overview Package Class Use Tree Deprecated Index Help
JavaTM 2 Platform
Std. Ed. v1.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Package org.omg.stub.java.rmi

 org.omg.stub.java.rmi
Classes
_Remote_Stub


Java(TM) 2 SDK Documentation

Java JavaTM 2 SDK, Standard Edition
Documentation

Version 1.3

 Contents

Your feedback is important to us. Please send us comments: Contacting JavaTM Software.

Guide to Features - Java Platform
Design specs, functional specs, user guides, tutorials and demos.
You can Download PDF and PS versions of some docs.

Summary of New Features
Features added since version 1.2 of the Java 2 Platform. 		docs

Basic Features
Security and Signed Applets | docs
Collections Framework | docs
JavaBeans TM | docs
Internationalization | docs
I/O | docs
Networking | docs
Language and Utility Packages | docs
Remote Method Invocation (RMI) | docs
Arbitrary-Precision Math | docs
Reflection | docs
Package Version Identification | docs
Sound | docs
Reference Objects | docs
Resources | docs
Object Serialization | docs
Extension Mechanism | docs
Java Archive (JAR) Files | docs
Java Native Interface (JNI) | docs
Performance Enhancements
 docs
Miscellaneous Features
(Applet tag, Deprecation) 		docs
Java Foundation Classes (JFC)
Abstract Window Toolkit (AWT) | docs
Project Swing Components | docs
2D Graphics and Imaging | docs
Input Method Framework | docs
Accessibility | docs
Drag-and-Drop data transfer | docs
CORBA Features
RMI-IIOP | docs
JavaTM IDL | docs
Enterprise Features
JDBCTM (Java Database Connectivity) | docs
Java Naming and Directory InterfaceTM (JNDI) | docs
Tool Support
Java Platform Debugger Architecture (JPDA) | docs
Java Virtual Machine Profiler Interface (JVMPI) | docs

Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved.

Please send us comments and suggestions
Download this SDK documentation

Location:
docs = In documentation download bundle and on website
software = In software download bundle and on website
website = Only on Java Software website

Sun

Java Software


Java 2D

Java

Java 2DTM

Documentation Contents
The Java 2DTM API is a set of classes for advanced 2D graphics and imaging. It encompasses line art, text, and images in a single comprehensive model. The API provides extensive support for image compositing and alpha channel images, a set of classes to provide accurate color space definition and conversion, and a rich set of display-oriented imaging operators. These classes are provided as additions to the java.awt and java.awt.image packages.

New Java 2D Features
New Java 2D features - A list of new features added to the Java 2D API for JavaTM 2 SDK, v1.3

Java 2D API Guide

Java 2D API Guide: Enhanced Graphics and Imaging for Java. Also available in PDF and PostScript format.

Read the README for instructions on how to run the code samples used in the Imaging chapter of the Java2D API Guide.

2D Graphics Tutorial

The 2D Graphics trail in The JavaTM Tutorial demonstrates how to display and print 2D graphics.

Java 2D API Specification

Java 2D API Specification - a list of the packages and classes included in the Java 2D API.

For More Information

See the Java Software website:
  • The Java 2D Home Page
  • The JFC Home Page

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java2d-comments@sun.com 		Sun Microsystems, Inc
Java Software


 All Classes
ImageFormatException
JPEGCodec
JPEGDecodeParam
JPEGEncodeParam
JPEGHuffmanTable
JPEGImageDecoder
JPEGImageEncoder
JPEGQTable
TruncatedFileException


Other API Bundled with the Java 2 SDK

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link to Non-frame version.


Other API Bundled with the Java 2 SDK

The front page has been relocated.Please see:
Frame version
Non-frame version.


Package com.sun.image.codec.jpeg

 com.sun.image.codec.jpeg
Interfaces
JPEGDecodeParam
JPEGEncodeParam
JPEGImageDecoder
JPEGImageEncoder
Classes
JPEGCodec
JPEGHuffmanTable
JPEGQTable
Exceptions
ImageFormatException
TruncatedFileException


Programmer's Guide to the Java 2D API

CONTENTS | PREV | NEXT

Programmer's Guide to the Java 2DTM API

Enhanced Graphics and Imaging for the JavaTM Programming Language

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 2

Rendering with Graphics2D

Graphics2D extends java.awt.Graphics to provide more sophisticated control over the presentation of shapes, text, and images. The Java 2DTM rendering process is controlled through the Graphics2D object and its state attributes.

The Graphics2D state attributes, such as line styles and transformations, are applied to graphic objects when they are rendered. The collection of state attributes associated with a Graphics2D is referred to as the Graphics2D context. To render text, shapes, or images, you set up the Graphics2D context and then call one of the Graphics2D rendering methods, such as draw or fill.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.1 Interfaces and Classes

The following tables list the interfaces and classes used in conjunction with the Graphics2D context, including the classes that represent state attributes. Most of these classes are part of the java.awt package.

Interface
Description

Composite

Defines methods to compose a draw primitive with the underlying graphics area. Implemented by AlphaComposite.

CompositeContext

Defines the encapsulated and optimized environment for a composite operation. Used by programmers implementing custom compositing rules.

Paint

Extends: Transparency

Defines colors for a draw or fill operation. Implemented by Color, GradientPaint and TexturePaint.

PaintContext

Defines the encapsulated and optimized environment for a paint operation. Used by programmers implementing custom paint operations.

Stroke

Generates a Shape that encloses the outline of the Shape to be rendered. Implemented by BasicStroke.

Class
Description

AffineTransform

(java.awt.geom)

Represents a 2D affine transform, which performs a linear mapping from 2D coordinates to other 2D coordinates.

AlphaComposite

Implements: Composite

Implements basic alpha composite rules for shapes, text, and images.

BasicStroke

Implements: Stroke

Defines the "pen style" to be applied to the outline of a Shape.

Color

Implements: Paint

Defines a solid color fill for a Shape.

GradientPaint

Implements: Paint

Defines a linear color gradient fill pattern for a Shape. This fill pattern changes from color C1 at point P1 to color C2 at point P2.

Graphics2D

Extends: Graphics

Fundamental class for 2D rendering. Extends the original java.awt.Graphics class.

TexturePaint

Implements: Paint

Defines a texture or pattern fill for a Shape. The texture or pattern is generated from a BufferedImage.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.2 Rendering Concepts

To render a graphic object using the Java 2DTM API, you set up the Graphics2D context and pass the graphic object to one of the Graphics2D rendering methods.

You can modify the state attributes that form the Graphics2D context to:

  • Vary the stroke width.
  • Change how strokes are joined together.
  • Set a clipping path to limit the area that is rendered.
  • Translate, rotate, scale, or shear objects when they are rendered.
  • Define colors and patterns to fill shapes with.
  • Specify how multiple graphics objects should be composed.
Graphics2D defines several methods for adding and changing attributes in the graphics context. Most of these methods take an object that represents a particular attribute, such as a Paint or Stroke object.

The Graphics2D context holds references to these attribute objects: they are not cloned. If you alter an attribute object that is part of the Graphics2D context, you need to call the appropriate set method to noti fy the context. Modifying an attribute object during a rendering operation will cause unpredictable and possibly unstable behavior.

2.2.1 Rendering Process

When a graphic object is rendered, the geometry, image, and attribute information are combined to calculate which pixel values must be changed on the display.

The rendering process for a Shape can be broken down into four steps:

  1. If the Shape is to be stroked, the Stroke attribute in the Graphics2D context is used to generate a new Shape that encompasses the stroked path.
  2. The coordinates of the Shape's path are transformed from user space into device space according to the transform attribute in the Graphics2D context.
  3. The Shape's path is clipped using the clip attribute in the Graphics2D context.
  4. The remaining Shape, if any, is filled using the Paint and Composite attributes in the Graphics2D context.
Rendering text is similar to rendering a Shape, since the text is rendered as individual glyphs and each glyph is a Shape. The only difference is that the Java 2D API must determine what Font to apply to the text and get t he appropriate glyphs from the Font before rendering.

Images are handled differently, transformations and clipping operations are performed on the image's bounding box. The color information is taken from the image itself and its alpha channel is used in conjunction with the current Composite attribute when the image pixels are composited onto the rendering surface.

2.2.2 Controlling Rendering Quality

The Java 2D API lets you indicate whether you want objects to be rendered as quickly as possible, or whether you prefer that the rendering quality be as high as possible. Your preferences are specified as hints through the RenderingHints attrib ute in the Graphics2D context. Not all platforms support modification of the rendering mode so specifying rendering hints does not guarantee that they will be used.

The RenderingHints class supports the following types of hints:

  • Alpha interpolation--can be set to default, quality, or speed.
  • Antialiasing--can be set to default, on, or off.
  • Color Rendering-can be set to default, quality, or speed.
  • Dithering--can be set to default, disable, or enable.
  • Fractional Metrics--can be set to default, on, or off.
  • Interpolation--can be set to nearest-neighbor, bilinear, or bicubic.
  • Rendering--can be set to default, quality, or speed.
  • Text antialiasing--can be set to default, on, or off.
To set or change the RenderingHints attribute in the Graphics2D context, you call setRenderingHints. When a hint is set to default, the platform rendering default is used.

Antialiasing
When graphics primitives are rendered on raster-graphics display devices, their edges can appear jagged because of aliasing. Arcs and diagonal lines take on a jagged appearance because they are approximated by turning on the pixels that are close st to the path of the line or curve. This is particularly noticeable on low-resolution devices, where the jagged edges appear in stark contrast to the smooth edges of horizontal or vertical lines.

Antialiasing is a technique used to render objects with smoother-appearing edges. Instead of simply turning on the pixel that is closest to the line or curve, the intensity of surrounding pixels is set in proportion to the amount of area covered by the geometry being rendered. This softens the edges and spreads the on-off transition over multiple pixels. However, antialiasing requires additional computing resources and can reduce rendering speed.

2.2.3 Stroke Attributes

Stroking a Shape such as a GeneralPath object is equivalent to running a logical pen along the segments of the GeneralPath. The Graphics2D Stroke attribute defines the characteristics of the mark draw n by the pen.

A BasicStroke object is used to define the stroke attributes for a Graphics2D context. BasicStroke defines characteristics such as the line width, endcap style, segment join-style, and the dashing pattern. To set or change the Stroke attribute in the Graphics2D context, you call setStroke.

Figure 2-1 endcap styles supported by BasicStroke

Figure 2-2 Join styles supported by BasicStroke

For example, the first image in Figure 2-3 uses the miter join-style; the second image uses a round join-style, a round endcap style, and a dashing pattern.

Figure 2-3 Stroke Styles

The Graphics2D rendering methods that use the Stroke attribute are draw, drawArc, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, and drawRoun dRect.When one of these methods is called, the outline of the specified Shape is rendered. The Stroke attribute defines the line characteristics and the Paint attribute defines the color or pattern of the mark drawn by the pen.

For example, when draw(myRectangle) is called:

  1. The Stroke is applied to the rectangle's outline.
  2. The stroked outline is converted to a Shape object.
  3. The Paint is applied to the pixels that lie within the contour of the outline Shape.
This process is illustrated in Figure 2-4:

Figure 2-4 Stroking a Shape

2.2.4 Fill Attributes

The fill attribute in the Graphics2D context is represented by a Paint object. You add a Paint to the Graphics2D context by calling setPaint.

When a Shape or glyph is drawn (Graphics2D.draw, Graphics2D.drawString), the Paint is applied to all of the pixels that lie inside of the Shape that represents the object's stroked outline. When a Shape is filled (Graphics2D.fill), the Paint is applied to all of the pixels that lie within the Shape's contour.

Simple solid color fills can be set with the setColor method. Color is the simplest implementation of the Paint interface.

To fill Shapes with more complex paint styles such as gradients and textures, you use the Java 2D Paint classes GradientPaint and TexturePaint. These classes eliminate the time-consuming task of creating complex fills using simple solid-color paints. Figure 2-5 illustrates two fills that could easily be defined by GradientPaint and TexturePaint.

Figure 2-5 Complex Fill Styles

When fill is called to render a Shape, the system:

  1. Determines what pixels comprise the Shape.
  2. Gets the color of each pixel from the Paint object.
  3. Converts the color to an appropriate pixel value for the output device.
  4. Writes the pixel to that device.

Batch Processing
To streamline the processing of pixels, the Java 2D API processes them in batches. A batch can be either a contiguous set of pixels on a given scanline or a block of pixels. This batch processing is done in two steps:

  1. The Paint object's createContext method is called to create a PaintContext. The PaintContext stores the contextual information about the current rendering operation and the information necessary to generate the colors. The createContext method is passed the bounding boxes of the graphics object being filled in user space and in device space, the ColorModel in which the colors should be generated, and the transform used to map user space into device space. The ColorModel is treated as a hint because not all Paint objects can support an arbitrary ColorModel. (For more information about ColorModels, see "Color".")
  2. The getColorModel method is called to get the ColorModel of the generated paint color from the PaintContext.
The getRaster method is then called repeatedly to get the Raster that contains the actual color data for each batch. This information is passed to the next stage in the rendering pipeline, which draws the generated color using the cu rrent Composite object.

2.2.5 Clipping Paths

A clipping path identifies the portion of a Shape or Image that needs to be rendered. When a clipping path is part of the Graphics2D context, only those parts of a Shape or Image that lie wit hin the path are rendered.

To add a clipping path to the Graphics2D context, you call setClip. Any Shape can be used to define the clipping path.

s current transform, which is needed for other purposes, such as: To change the clipping path, you can either use setClip to specify a new path or call clip to change the clipping path to the intersection of the old clipping path and a new Shape.

2.2.6 Transformations

The Graphics2D context contains a transform that is used to transform objects from user space to device space during rendering. To perform additional transformations, such as rotation or scaling, you can add other transforms to the Graph ics2D context. These additional transforms become part of the pipeline of transformations applied during rendering.

Graphics2D provides several different ways to modify the transform in the Graphics2D context. The simplest is to call one of the Graphics2D transformation methods: rotate, scale, shear, or translate. You specify the characteristics of the transform that you want to be applied during rendering, and Graphics2D automatically makes the appropriate changes.

You can also explicitly concatenate an AffineTransform with the current Graphics2D transform. An AffineTransform performs a linear transformation such as translation, scaling, rotation, or shearing on a set of gra phics primitives. When a transform is concatenated with an existing transform, the last transform specified is the first to be applied. To concatenate a transform with the current transform, you pass an AffineTransform to Graphics2D.transform.

The Graphics2D class also contains a setTransform method, but this method should never be used to concatenate another coordinate transform on top of an existing transform. The setTransform method overwrites the Graphics2D object's current transform, which is needed for other purposes, such as:

  • Applying a scaling transform to adjust for the resolution of the printer.
  • Painting a JComponent at non-zero translation from its parent's origin.
  • Scaling up a component for easier viewing.
  • Any other situation in which the supplier of a Graphics2D object might want to transform the rendering for effect.
The setTransform method is intended for setting the Graphics2D object back to the original transform after rendering the transformed graphics text or images.

AffineTransform aT = g2D.getTransform();
g2d.transform(...);
g2d.draw(...);
g2d.setTransform(aT);
Graphics2D also provides a version of drawImage that takes an AffineTransform as a parameter. This enables you to apply a transformation to an image object when it is drawn without permanently modifying the transformation pipeline. The image is drawn as if you had concatenated the transform with the current transform in the Graphics2D context.

Affine Transforms
The Java 2D API provides one transform class, AffineTransform. AffineTransforms are used to transform text, shapes, and images when they are rendered. You can also apply transforms to Font objects to create new font derivations, as discussed in "Creating Font Derivations".

An affine transformation performs a linear transformation on a set of graphics primitives. It always transforms straight lines into straight lines and parallel lines into parallel lines; however, the distance between points and the angles between nonparal lel lines might be altered.

Affine transformations are based on two-dimensional matrices of the following form:

where

and

Transforms can be combined, effectively creating a series or pipeline of transformations that can be applied to an object. This combination is referred to as concatenation. When a transform is concatenated with an existing transform, suc h as with AffineTransform.concatenate, the last transform specified is the first to be applied. A transform can also be pre-concatenated with an existing transform. In this case, the last transform specified is the last to be applied.

Pre-concatenation is used to perform transformations relative to device space instead of user space. For example, you could use AffineTransform.preConcatenate to perform a translation relative to absolute pixel space.

2.2.6.1 Constructing an AffineTransform

AffineTransform provides a set of convenience methods for constructing AffineTransform objects:

  • getTranslateInstance
  • getRotateInstance
  • getScaleInstance
  • getShearInstance
To use these methods, you specify the characteristics of the transform you want to create and AffineTransform generates the appropriate transform matrix. You can also construct an AffineTransform by directly specifying the elements o f the transformation matrix.

2.2.7 Composite Attributes

When two graphic objects overlap, it is necessary to determine what colors to render the overlapping pixels. For example, if a red rectangle and a blue rectangle overlap, the pixels that they share could be rendered red, blue, or some combination of the t wo. The color of the pixels in the overlapping area will determine which rectangle appears to be on top and how transparent it looks. The process of determining what color to render pixels shared by overlapping objects is called compositing.

Two interfaces form the basis of the Java 2D compositing model: Composite and CompositeContext.

To specify the compositing style that should be used, you add an AlphaComposite object to the Graphics2D context by calling setComposite. AlphaComposite, an implementation of the Composite interface, supports a number of different compositing styles. Instances of this class embody a compositing rule that describes how to blend a new color with an existing one.

One of the most commonly used compositing rules in the AlphaComposite class is SRC_OVER, which indicates that the new color (the source color) should be blended over the existing color (the destination color).

AlphaComposite Composition Rule
Description
Example

CLEAR

Clear

DEST_IN

Destination In

DEST_OUT

Destination Out

DEST_OVER

Destination Over

SRC

Source

SRC_IN

Source In

SRC_OUT

Source Out

SRC_OVER

Source Over

2.2.7.1 Managing Transparency

A color's alpha value is a measure of its transparency: it indicates, as a percentage, how much of a previously rendered color should show through when colors overlap. Opaque colors (alpha=1.0) don't allow any of the underlying color to show through, while transparent colors (alpha=0.0) let all of it show through.

When text and Shapes are rendered, the alpha value is derived from the Paint attribute in the Graphics2D context. When Shapes and text are antialiased, the alpha value from the Paint in the Graphics2D context is combined with pixel coverage information from the rasterized path. Images maintain their own alpha information--see "Transparency and Images" for more information.

When you construct an AlphaComposite object, you can specify an additional alpha value. When you add this AlphaComposite object to the Graphics2D context, this extra alpha value increases the transparency of any graphic ob jects that are rendered--the alpha value of each graphic object is multiplied by the AlphaComposite's alpha value.

2.2.7.2 Transparency and Images

Images can carry transparency information for each pixel in the image. This information, called an alpha channel, is used in conjunction with the Composite object in the Graphics2D context to blend the image with existing dr awings.

For example, Figure 2-6 contains three images with different transparency information. In each case, the image is displayed over a blue rectangle. This example assumes that the Graphics2D context contai ns an AlphaComposite object that uses SRC_OVER as the compositing operation.

Figure 2-6 Transparency and Images

In the first image, all of the pixels are either fully opaque (the dog's body) or fully transparent (the background). This effect is often used on Web pages. In the second image, all of the pixels in the dog's body are rendered using a uniform, no n-opaque alpha value, allowing the blue background to show through. In the third image, the pixels around the dogs face are fully opaque (alpha=1.0), but as the distance from its face increases, the alpha values for the pixels decrease.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.3 Setting Up the Graphics2D Context

To configure the Graphics2D context for rendering, you use the Graphics2D set methods to specify attributes such as the RenderingHints, Stroke, Paint, clipping path, Composite, and Tra nsform.

2.3.1 Setting Rendering Hints

A RenderingHints object encapsulates all of your preferences concerning how an object is rendered. To set the rendering hints in the Graphics2D context, you create a RenderingHints object and pass it into Graphics2D.s etRenderingHints.

Setting a rendering hint does not guarantee that a particular rendering algorithm will be used: not all platforms support modification of the rendering mode.

In the following example, antialiasing is enabled and the rendering preference is set to quality:

    qualityHints = new
               RenderingHints(RenderingHints.KEY_ANTIALIASING,
               RenderingHints.VALUE_ANTIALIAS_ON);

    qualityHints.put(RenderingHints.KEY_RENDERING,
               RenderingHints.VALUE_RENDER_QUALITY);

    g2.setRenderingHints(qualityHints);

2.3.2 Specifying Stroke Attributes

A BasicStroke defines the characteristics applied to a Shape's outline, including its width and dashing pattern, how line segments are joined together, and the decoration (if any) applied to the end of a line. To set the stroke a ttributes in the Graphics2D context, you create a BasicStroke object and pass it into setStroke.

2.3.2.1 Setting the Stroke Width

To set the stroke width, you create a BasicStroke object with the desired width and call setStroke.

In the following example, the stroke width is set to twelve points and the defaults are used for the join and endcap decorations:

    wideStroke = new BasicStroke(12.0f);
    g2.setStroke(wideStroke);

2.3.2.2 Specifying Join and Endcap Styles

To set the join and endcap styles, you create a BasicStroke object with the desired attributes.

In the following example, the stroke width is set to twelve points and the round join and endcap styles are used instead of the defaults:

    roundStroke = new BasicStroke(4.0f, BasicStroke.CAP_ROUND,
              BasicStroke.JOIN_ROUND);
    g2.setStroke(roundStroke);

2.3.2.3 Setting the Dashing Pattern

Complex dashing patterns can easily be defined with a BasicStroke object. When you create a BasicStroke object, you can specify two parameters that control the dashing pattern:

  • dash--an array that represents the dashing pattern. Alternating elements in the array represent the dash size and the size of the space between dashes. Element 0 represents the first dash, element 1 represents the first space.
  • dash_phase--an offset that defines where the dashing pattern starts.
In the following example, two different dashing patterns are applied to a line. In the first, the size of the dashes and the space between them is constant. The second dashing pattern is more complex, using a six-element array to define the dashing patter n.

    float dash1[] = {10.0f};
    BasicStroke bs = new BasicStroke(5.0f, BasicStroke.CAP_BUTT,
                 BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f);
    g2.setStroke(bs);
    Line2D line = new Line2D.Float(20.0f, 10.0f, 100.0f, 10.0f);
    g2.draw(line);

    float[] dash2 = {6.0f, 4.0f, 2.0f, 4.0f, 2.0f, 4.0f};
    bs = new BasicStroke(5.0f, BasicStroke.CAP_BUTT,
         BasicStroke.JOIN_MITER, 10.0f, dash2, 0.0f);
    g2.setStroke(bs);
    g2.draw(line);
Both dashing patterns use a dash phase of zero, causing the dashes to be drawn starting at the beginning of the dashing pattern. The two dashing patterns are shown in Figure 2-7.

Figure 2-7 Dashing Patterns

2.3.3 Specifying Fill Attributes

The Paint attribute in the Graphics2D context determines the fill color or pattern that is used when text and Shapes are rendered.

2.3.3.1 Filling a Shape with a Gradient

The GradientPaint class provides an easy way to fill a shape with a gradient of one color to another. When you create a GradientPaint, you specify a beginning position and color, and an ending position and color. The fill color chang es proportionally from one color to the other along the line connecting the two positions, as shown in Figure 2-8.

Figure 2-8 Creating Gradient Fills

In the third star in Figure 2-8, both points lie within the shape. All of the points along the gradient line extending beyond P1 take the beginning color, and the points along the gradient line extending beyond P2 take the ending color.

To fill a shape with a gradient of one color to another:

  1. Create a GradientPaint object.
  2. Call Graphics2D.setPaint.
  3. Create the Shape.
  4. Call Graphics2D.fill(shape).
In the following example, a rectangle is filled with a blue-green gradient.

    GradientPaint gp = new GradientPaint(50.0f, 50.0f, Color.blue
                   50.0f, 250.0f, Color.green);
    g2.setPaint(gp);
    g2.fillRect(50, 50, 200, 200);

2.3.3.2 Filling a Shape with a Texture

The TexturePaint class provides an easy way to fill a shape with a repeating pattern. When you create a TexturePaint, you specify a BufferedImage to use as the pattern. You also pass the constructor a rectangle to define t he repetition frequency of the pattern, as shown in Figure 2-9.

Figure 2-9 Creating Texture Paints

To fill a shape with a texture:

  1. Create a TexturePaint object.
  2. Call Graphics2D.setPaint.
  3. Create the Shape.
  4. Call Graphics2D.fill(shape).
In the following example, a rectangle is filled with a simple texture created from a buffered image.

    // Create a buffered image texture patch of size 5x5
    BufferedImage bi = new BufferedImage(5, 5,
                       BufferedImage.TYPE_INT_RGB);
    Graphics2D big = bi.createGraphics();
    // Render into the BufferedImage graphics to create the texture
    big.setColor(Color.green);
    big.fillRect(0,0,5,5);
    big.setColor(Color.lightGray);
    big.fillOval(0,0,5,5);

    // Create a texture paint from the buffered image
    Rectangle r = new Rectangle(0,0,5,5);
    TexturePaint tp = new
       TexturePaint(bi,r,TexturePaint.NEAREST_NEIGHBOR);

    // Add the texture paint to the graphics context.
    g2.setPaint(tp);

    // Create and render a rectangle filled with the texture.
    g2.fillRect(0,0,200,200);

2.3.4 Setting the Clipping Path

To define a clipping path:

  1. Create a Shape that represents the area you want to render.
  2. Call Graphics2D.setClip to use the shape as the clipping path for the Graphics2D context.
To shrink the clipping path:

  1. Create a Shape that intersects the current clipping path.
  2. Call clip to change the clipping path to the intersection of the current clipping path and the new Shape.
In the following example, a clipping path is created from an ellipse and then modified by calling clip.

    public void paint(Graphics g) {
         Graphics2D g2 = (Graphics2D) g;

       // The width and height of the canvas
         int w = getSize().width;
         int h = getSize().height;
         // Create an ellipse and use it as the clipping path
         Ellipse2D e = new Ellipse2D.Float(w/4.0f,h/4.0f,
                                    w/2.0f,h/2.0f);
         g2.setClip(e);

         // Fill the canvas. Only the area within the clip is rendered
         g2.setColor(Color.cyan);
         g2.fillRect(0,0,w,h);

         // Change the clipping path, setting it to the intersection of
         // the current clip and a new rectangle.
         Rectangle r = new Rectangle(w/4+10,h/4+10,w/2-20,h/2-20);
         g2.clip(r);

         // Fill the canvas. Only the area within the new clip
         // is rendered
         g2.setColor(Color.magenta);
        g2.fillRect(0,0,w,h);
    }

2.3.5 Setting the Graphics2D Transform

To transform a Shape, text string, or Image you add a new AffineTransform to the transformation pipeline in the Graphics2D context before rendering. The transformation is applied when the graphic object is rende red.

For example, to draw a rectangle that is rotated 45 degrees:

  1. Get the current Graphics2D transform before performing any transformations. Always call getTransform on the Graphics2D before adding a transform to the graphics context because the graphics context might already have a transform that is needed for other reasons, such as rendering Swing components.
  2. Get a rotation transform by calling AffineTransform.getRotateInstance.
  3. Call Graphics2D.transform to add the new transform to the transformation pipeline. Never use the setTransform method to add a new coordinate transform because setTransform will overwrite the current transform in the graphics context.
  4. Create a Rectangle2D.Float object.
  5. Call Graphics2D.draw to render the rectangle.
  6. After you have rendered your transformed rectangle, reset the transform of the Graphics2D back to the original transform that you saved in Step 1 by calling setTransform with the original transform.
In the following example, an instance of AffineTransform is used to rotate a rectangle 45 degrees when it is rendered.

    AffineTransform aT = g2.getTransform();
    Rectangle2D rect = new Rectangle2D.Float(1.0,1.0,2.0,3.0);
    AffineTransform rotate45 =
         AffineTransform.getRotateInstance(Math.PI/4.0,0.0,0.0)
    g2.transform(rotate45);
    g2.draw(rect);
    g2.setTransform(aT);
In this example, an AffineTransform is used to rotate a text string around a center point:

    // Define the rendering transform
    AffineTransform at = new AffineTransform();
    // Apply a translation transform to make room for the
    // rotated text.
    at.setToTranslation(400.0, 400.0);
    g2.transform(at);
    // Create a rotation transform to rotate the text
    at.setToRotation(Math.PI / 2.0);
    // Render four copies of the string "Java" at 90 degree angles
    for (int i = 0; i < 4; i++) {
           g2.drawString("Java", 0.0f, 0.0f);
           g2.transform(at);
    }
You can transform an image in the same way--the transform in the Graphics2D context is applied during rendering regardless of the type of graphic object being rendered.

To apply a transform to an image without changing the transform in the Graphics2D context, you can pass an AffineTransform to drawImage:

    AffineTransform rotate45 =
         AffineTransform.getRotateInstance(Math.PI/4.0,0.0,0.0)
    g2.drawImage(myImage, rotate45);
Transforms can also be applied to a Font to create a modified version of the Font, for more information see "Creating Font Derivations".

2.3.6 Specifying a Composition Style

An AlphaComposite encapsulates composition rules that determine how colors should be rendered when one object overlaps another. To specify the composition style for the Graphics2D context, you create an AlphaComposite and pass it into setComposite. The most commonly used is composition style is SRC_OVER.

2.3.6.1 Using the Source Over Compositing Rule

The SRC_OVER compositing rule composites the source pixel over the destination pixel such that the shared pixel takes the color of the source pixel. For example, if you render a blue rectangle and then render a red rectangle that partially overlaps it, the overlapping area will be red. In other words, the object that is rendered last will appear to be on top.

To use the SRC_OVER composition rule:

  1. Create an AlphaComposite object by calling getInstance and specifying the SRC_OVER rule.
        AlphaComposite ac =
       AlphaComposite.getInstance(AlphaComposite.SRC_OVER);
  2. Call setComposite to add the AlphaComposite object to the Graphics2D context.
        g2.setComposite(ac);
Once the composite object is set, overlapping objects will be rendered using the specified composition rule.

2.3.6.2 Increasing the Transparency of Composited Objects

AlphaComposite allows you to specify an additional constant alpha value that is multiplied with the alpha of the source pixels to increase transparency.

For example, to create an AlphaComposite object that renders the source object 50% transparent, specify an alpha of .5:

    AlphaComposite ac =
       AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f);
In the following example, a source over alpha composite object is created with an alpha of .5 and added to the graphics context, causing subsequent shapes to be rendered 50% transparent.

    public void paint(Graphics g) {
         Graphics2D g2 = (Graphics2D) g;

         g2.setColor(Color.red);
         g2.translate(100,50);
         // radians=degree * pie / 180
         g2.rotate((45*java.lang.Math.PI)/180);
         g2.fillRect(0,0,100,100);
         g2.setTransform(new AffineTransform());  // set to identity
         // Create a new alpha composite
         AlphaComposite ac =
             AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.5f);
         g2.setComposite(ac);
         g2.setColor(Color.green);
         g2.fillRect(50,0,100,100);
         g2.setColor(Color.blue);
         g2.fillRect(125,75,100,100);
         g2.setColor(Color.yellow);
          g2.fillRect(50,125,100,100);
         g2.setColor(Color.pink);
         g2.fillRect(-25,75,100,100);
    }

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.4 Rendering Graphics Primitives

Graphics2D provides rendering methods for Shapes, Text, and Images:

  • draw--strokes a Shape's path using the Stroke and Paint objects in the Graphics2D context.
  • fill--fills a Shape using the Paint in the Graphics2D context.
  • drawString--renders the specified text string using the Paint in the Graphics2D context.
  • drawImage--renders the specified image.
To stroke and fill a shape, you must call both the draw and fill methods.

Graphics2D also supports the draw and fill methods from previous versions of the JDK software, such as drawOval and fillRect.

2.4.1 Drawing a Shape

The outline of any Shape can be rendered with the Graphics2D.draw method. The draw methods from previous versions of the JDK software are also supported: drawLine, drawRect, drawRoundRect, drawOv al, drawArc, drawPolyline, drawPolygon, draw3DRect.

When a Shape is drawn, its path is stroked with the Stroke object in the Graphics2D context. (See "Stroke Attributes" for more information.) By setting an approp riate BasicStroke object in the Graphics2D context, you can draw lines of any width or pattern. The BasicStroke object also defines the line's endcap and join attributes.

To render shape's outline:

  1. Create a BasicStroke object
  2. Call Graphics2D.setStroke
  3. Create the Shape.
  4. Call Graphics2D.draw(shape).
In the following example, a GeneralPath object is used to define a star and a BasicStroke object is added to the Graphics2D context to define the star's line with and join attributes.

    public void paint(Graphics g) {
          Graphics2D g2 = (Graphics2D) g;

          // create and set the stroke
          g2.setStroke(new BasicStroke(4.0f));

          // Create a star using a general path object
          GeneralPath p = new GeneralPath(GeneralPath.NON_ZERO);
          p.moveTo(- 100.0f, - 25.0f);
          p.lineTo(+ 100.0f, - 25.0f);
          p.lineTo(- 50.0f, + 100.0f);
          p.lineTo(+ 0.0f, - 100.0f);
          p.lineTo(+ 50.0f, + 100.0f);
          p.closePath();

          // translate origin towards center of canvas
          g2.translate(100.0f, 100.0f);

          // render the star's path
          g2.draw(p);
    }

2.4.2 Filling a Shape

The Graphics2D.fill method can be used to fill any Shape. When a Shape is filled, the area within its path is rendered with the Graphics2D context's current Paint attribute--a Color, TexturePaint, or GradientPaint.

The fill methods from previous versions of the JDK software are also supported: fillRect, fill3DRect, fillRoundRect, fillOval, fillArc, fillPolygon, clearRect.

To fill a Shape:

  1. Set the fill color or pattern on the graphics context using Graphics2D.setColor or Graphics2D.setPaint.
  2. Create the Shape.
  3. Call Graphics2D.fill to render the Shape.
In the following example, setColor is called to define a green fill for a Rectangle2D.

    public void paint(Graphics g) {
          Graphics2D g2 = (Graphics2D) g;

          g2.setPaint(Color.green);
          Rectangle2D r2 = new Rectangle2D.Float(25,25,150,150);

           g2.fill(r2);
    }

2.4.3 Rendering Text

To render a text string, you call Graphics2D.drawString, passing in the string that you want to render. For more information about rendering text and selecting fonts, see "Fonts and Text Layout" .

2.4.4 Rendering Images

To render an Image, you create the Image and call Graphics2D.drawImage. For more information about processing and rendering images, see "Imaging".

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.5 Defining Custom Composition Rules

You can create an entirely new type of compositing operation by implementing the Composite and CompositeContext interfaces. A Composite object provides a CompositeContext object that actually holds the state and performs the compositing work. Multiple CompositeContext objects can be created from one Composite object to maintain the separate states in a multithreaded environment.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 -

CONTENTS | PREV | NEXT Java 2D API

2.6 Rendering in a Multi-Screen Environment

With the release of the JavaTM 2 SDK, version 1.3, the Java 2DTM API supports three different multi-screen configurations that can possibly be configured by a native platform:

  • Two or more independent screens
  • Two or more screens where one screen is the primary screen and the other screens display copies of what appears on the primary screen.
  • Two or more screens that form a virtual desktop, which is also called a virtual device.
The Java 2D API enables you to create Frame, JFrame, Window, or JWindow objects with a GraphicsConfiguration to target a screen device for rendering.

In all three configurations, each screen device is represented by a GraphicsDevice. A GraphicsDevice can have multiple GraphicsConfiguration objects associated with it.

When two or more screens are used to form a virtual device, a virtual coordinate system that exists outside of the physical screens is used to represent the virtual device. The bounds of each GraphicsConfiguration in this multi-screen configu ration are relative to the virtual coordinate system. One screen in this environment is identified as the primary screen, which is located at (0, 0) in the virtual coordinate system. Depending on the location of the primary screen, the virtual device mi ght have negative coordinates, as shown in Figure 2-10:

Figure 2-10 Example of a virtual device environment

To determine if your environment is a virtual device environment in which a Window or a Frame can span two or more physical screens, call getBounds on each GraphicsConfiguration in your system and check to see i f the origin is something other than (0, 0). The getBounds method of a GraphicsConfiguration returns a Rectangle in the virtual coordinate system. So, if any of the origins are not (0, 0), your environment is a virtual d evice environment.

In a virtual device environment, the coordinates of the GraphicsConfiguration objects are relative to the virtual coordinate system. So, you must use virtual coordinates when calling the setLocation method of a Frame or Window. For example, this code sample gets the bounds of a GraphicsConfiguration and uses the bounds to set the location of a Frame at (10, 10) relative to the origin of the physical screen of the corresponding Graphic sConfiguration.

    Frame f = new Frame(GraphicsConfiguration gc);
    Rectangle bounds = gc.getBounds();
    f.setLocation(10 + bounds.x, 10 + bounds.y);
If the bounds of the GraphicsConfiguration are not taken into account, the Frame is displayed at (10, 10) on the primary physical screen, which might be different from the physical screen of the specified GraphicsConfiguration.

The getBounds method can also be used to determine the bounds of the virtual device. Call getBounds on each GraphicsConfiguration in your system. To determine the bounds of the virtual device, calculate the union of all the bounds. This technique is used in the following sample.

    Rectangle virtualBounds = new Rectangle();
    GraphicsEnvironment ge =
           GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gs = ge.getScreenDevices();
    for (int j = 0; j < gs.length; j++) {
           GraphicsDevice gd = gs[j];
           GraphicsConfiguration[] gc = gd.getConfigurations();
           for (int i = 0; i < gc.length; i++) {
                 virtualBounds = virtualBounds.union(gc[i].getBounds());
           }
    }
The following applet creates a JFrame with every GraphicsConfiguration of every GraphicsDevice in the GraphicsEnvironment. Each JFrame displays a set of red, green and blue stripes, the screen number , the GraphicsConfiguration number and the bounds of the GraphicsConfiguration. This code sample must be run with the JavaTM 2 SDK, version 1.3 or later.

    import java.applet.Applet;
    import java.awt.*;
    import javax.swing.*;

    public class MultiFrameApplet extends Applet {

            public MultiFrameApplet() {
               main(null);
            }

            public static void main(String[] argv) {
               GraphicsEnvironment ge =
                   GraphicsEnvironment.getLocalGraphicsEnvironment();
               GraphicsDevice[] gs = ge.getScreenDevices();
               for (int j = 0; j < gs.length; j++) {
                  GraphicsDevice gd = gs[j];
                  GraphicsConfiguration[] gc =
                        gd.getConfigurations();
                     for (int i=0; i < gc.length; i++) {
                          JFrame f =
                          new JFrame(gs[j].getDefaultConfiguration());
                          GCCanvas c = new GCCanvas(gc[i]);
                          Rectangle gcBounds = gc[i].getBounds();
                          int xoffs = gcBounds.x;
                          int yoffs = gcBounds.y;
                          f.getContentPane().add(c);
                          f.setTitle("Screen# "+Integer.toString(j)+",
                          GC# "+Integer.toString(i));
                          f.setSize(300, 150);
                          f.setLocation((i*50)+xoffs, (i*60)+yoffs);
                          f.show();
                     }
               }
            }
    }

    class GCCanvas extends Canvas {

            GraphicsConfiguration gc;
            Rectangle bounds;

            public GCCanvas(GraphicsConfiguration gc) {
                super(gc);
                this.gc = gc;
                bounds = gc.getBounds();
            }

            public Dimension getPreferredSize() {
                return new Dimension(300, 150);
            }

            public void paint(Graphics g) {
                g.setColor(Color.red);
                g.fillRect(0, 0, 100, 150);
                g.setColor(Color.green);
                g.fillRect(100, 0, 100, 150);
                g.setColor(Color.blue);
                g.fillRect(200, 0, 100, 150);
                g.setColor(Color.black);
                g.drawString("ScreenSize="+
                       Integer.toString(bounds.width)+
                       "X"+ Integer.toString(bounds.height), 10, 15);
                g.drawString(gc.toString(), 10, 30);
            }
    }

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


6 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 6

Color

Color imaging is one of the fundamental components of any graphics system, and it is often a source of great complexity in the imaging model. The Java 2DTM API provides support for high-quality color output that is easy to use and allows advanced clients to make sophisticated use of color.

The key color management classes in the Java 2D API are ColorSpace, Color, ColorModel:

  • A ColorSpace represents a system for measuring colors, typically using three separate numerical values or components. The ColorSpace class contains methods for converting between the color space and two standard color spaces, CIEXYZ and RGB.
  • A Color is a fixed color, defined in terms of its components in a particular ColorSpace. To draw a Shape in a color, such as red, you pass a Color object representing that color to the Graphics2D context. Color is defined in the java.awt package.
  • A ColorModel describes a particular way that pixel values are mapped to colors. A ColorModel is typically associated with an Image or BufferedImage and provides the information necessary to correctly interpret the pixel values. ColorModel is defined in the java.awt.image package.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


6 -

CONTENTS | PREV | NEXT Java 2D API

6.1 Classes

Class
Description

ColorSpace

Identifies the color space of a Color object, Image, BufferedImage, or GraphicsDevice. Has methods to transform between RGB and CIEXYZ color spaces.

ICC_ColorSpace

Extends: ColorSpace

Represents device-independent and device-dependent color spaces based on the ICC Profile Format Specification.

ICC_Profile

A representation of color profile data for device independent and device dependent color spaces based on the ICC Profile Format Specification.

ICC_ProfileGray

Extends: ICC_Profile

A representation of color space type gray.

ICC_ProfileRGB

Extends: ICC_Profile

A representation of color space type RGB.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


6 -

CONTENTS | PREV | NEXT Java 2D API

6.2 Color Concepts

A ColorModel is used to interpret pixel data in an image. This includes mapping components in the bands of an image to components of a particular color space. It might also involve extracting pixel components from packed pixel data, retrieving multiple components from a single band using masks, and converting pixel data through a lookup table.

To determine the color value of a particular pixel in an image, you need to know how color information is encoded in each pixel. The ColorModel associated with an image encapsulates the data and methods necessary for translating a pixel value t o and from its constituent color components.

The Java 2DTM API provides two color models in addition to the DirectColorModel and IndexColorModel defined in the JDK 1.1 software release:

  • ComponentColorModel can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace. This model can be used to represent most color models on most types of GraphicsDevices.
  • PackedColorModel is a base class for models that represent pixel values that have their color components embedded directly in the bits of an integer pixel. A PackedColorModel stores the packing information that describes how color an d alpha components are extracted from the channel.The DirectColorModel in the JDK 1.1 software release is a PackedColorModel.

6.2.0.1 ColorSpace

A ColorSpace object represents a system for measuring colors, typically using three separate numeric values. For example, RGB and CMYK are color spaces. A ColorSpace object serves as a colorspace tag that identifies the specific colo r space of a Color object or, through a ColorModel object, of an Image, BufferedImage, or GraphicsConfiguration. ColorSpace provides methods that transform Colors in a specific c olor space to and from sRGB and to and from a well-defined CIEXYZ color space.

All ColorSpace objects must be able to map a color from the represented color space into sRGB and transform an sRGB color into the represented color space. Since every Color contains a ColorSpace obje ct, set explicitly or by default, every Color can also be converted to sRGB. Every GraphicsConfiguration is associated with a ColorSpace object that in turn has an associated ColorSpace. A color speci fied in any color space can be displayed by any device by mapping it through sRGB as an intermediate color space.

The methods used for this process are toRGB and fromRGB:

  • toRGB transforms a Color in the represented color space to a Color in sRGB.
  • fromRGB takes a Color in sRGB and transforms it into the represented color space.
Though mapping through sRGB always works, it's not always the best solution. For one thing, sRGB cannot represent every color in the full gamut of CIEXYZ colors. If a color is specified in some space that has a different g amut (spectrum of representable colors) than sRGB, then using sRGB as an intermediate space results in a loss of information. To address this problem, the ColorSpace class can map colors to and from another color space, th e "conversion space" CIEXYZ.

The methods toCIEXYZ and fromCIEXYZ map color values from the represented color space to the conversion space. These methods support conversions between any two color spaces at a reasonably high degree of accuracy, one Color at a time. However, it is expected that Java 2D API implementations will support high-performance conversion based on underlying platform color-management systems, operating on entire images. (See ColorConvertOp in "Imaging".)

Figure 6-1 and Figure 6-2 illustrate the process of translating a color specified in a CMYK color space for display on an RGB color monitor. Figure 6-1 shows a mapping through sRGB. As this figure illustrates, the translation of the CMYK color to an RGB color is not exact because of a gamut mismatch. 1

Figure 6-1 Mapping Through sRGB

Figure 6-2 shows the same process using CIEXYZ as the conversion space. When CIEXYZ is used, the color is passed through accurately.

Figure 6-2 Mapping Through CIEXYZ

6.2.0.2 ICC_Profile and ICC_ColorSpace

ColorSpace is actually an abstract class. The Java 2D API provides one implementation, ICC_ColorSpace, which is based on ICC Profile data as represented by the ICC_Profile class. You can define your own subclasses to repre sent arbitrary color spaces, as long as the methods discussed above are implemented. However, most developers can simply use the default sRGB ColorSpace or color spaces that are represented by commonly available ICC Profiles, such as profiles for monitors and printers, or profiles embedded in image data.

"ColorSpace" describes how ColorSpace objects represent a color space and how colors in the represented space can be mapped to and from a conversion space. Color management systems are often used to handle the mapping between color spaces. A typical color management system (CMS) manages ICC profiles, which are similar to ColorSpace objects; ICC profiles describe an input space and a connection space, and define how to map between them. Color management systems are very good at figuring out how to map a color tagged with one profile into the color space of another profile.

The Java 2D API defines a class called ICC_Profile that holds data for an arbitrary ICC Profile. ICC_ColorSpace is an implementation of the abstract ColorSpace class. ICC_ColorSpace objects can be constructed from ICC_Profiles. (There are some limitations--not all ICC Profiles are appropriate for defining an ICC_ColorSpace).

ICC_Profile has several subclasses that correspond to specific color space types, such as ICC_ProfileRGB and ICC_ProfileGray. Each subclass of ICC_Profile has a well-defined input space (such as an RGB space) an d a well-defined connection space (like CIEXYZ). The Java 2D API can use a platform's CMS to access color profiles for various devices such as scanners, printers, and monitors. It can also use the CMS to find the best mapping between profiles.

6.2.1 Describing Colors

The Color class provides a description of a color in a particular color space. An instance of Color contains the value of the color components and a ColorSpace object. Because a ColorSpace object can be specifie d in addition to the color components when a new instance of Color is created, the Color class can handle colors in any color space.

The Color class has a number of methods that support a proposed standard RGB color space called sRGB (see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html). sRGB is the default color space for the Java 2D API. Several constructors defined by the Color class omit the ColorSpace parameter. These constructors assume that the color's RGB values are defined in sRGB, and use a default instance of ColorSpace to represent that space.

The Java 2D API uses sRGB as a convenience to application programmers, not as a reference color space for color conversion. Many applications are primarily concerned with RGB images and monitors, and defining a standard RGB color space makes wr iting such applications easier. The ColorSpace class defines the methods toRGB and fromRGB so that developers can easily retrieve colors in this standard space. These methods are not intended to be used for highly accurate color correction or conversions. See "ColorSpace" for more information.

To create a color in a color space other than sRGB, you use the Color constructor that takes a ColorSpace object and an array of floats that represent the color components appropriate to that space. The ColorSpace object identifies the color space.

To display a rectangle of a certain color, such as the process color cyan, you need a way to describe this color to the system. There are a number of different ways to describe a color; for example, a color could be described as a set of red, green, and b lue (RGB) components, or a set of cyan, magenta, yellow, and black (CMYK) components. These different techniques for specifying colors are called color spaces.

As you probably know, colors on a computer screen are generated by blending different amounts of red, green, and blue light. Therefore, using an RGB color space is standard for imaging on computer monitors. Similarly, four-color process printing uses cyan , magenta, yellow, and black ink to produce color on a printed page; the printed colors are specified as percentages in a CMYK color space.

Due to the prevalence of computer monitors and color printing, RGB and CMYK color spaces are both commonly used to describe colors. However, both types of color spaces have a fundamental drawback--they are device-dependent. The cyan ink used by on e printer might not exactly match the cyan ink used by another. Similarly, a color described as an RGB color might look blue on one monitor and purplish on another.

6.2.2 Mapping Colors through sRGB and CIEXYZ

The Java 2D API refers to RGB and CMYK as color space types. A particular model of monitor with its particular phosphors defines its own RGB color space. Similarly, a particular model of printer has its own CMYK color space. Different RGB or CMYK color sp aces can be related to each other through a device-independent color space.

Standards for the device-independent specification of color have been defined by the International Commission on Illumination (CIE). The most commonly used device-independent color space is the three-component XYZ color space developed by CIE. When you sp ecify a color using CIEXYZ, you are insulated from device dependencies.

Unfortunately, it's not always practical to describe colors in the CIEXYZ color space--there are valid reasons for representing colors in other color spaces. To obtain consistent results when a color is represented using a device-de pendent color space such as a particular RGB space, it is necessary to show how that RGB space relates to a device-independent space like CIEXYZ.

One way to map between color spaces is to attach information to the spaces that describes how the device-dependent space relates to the device-independent space. This additional information is called a profile. A commonly used type of color profi le is the ICC Color Profile, as defined by the International Color Consortium. For details, see the ICC Profile Format Specification, version 3.4 available at http://www.color.org.

Figure 6-3 illustrates how a solid color and a scanned image are passed to the Java 2D API, and how they are displayed by various output devices. As you can see in Figure 6-3, both the input color and the image have profiles attached.

Figure 6-3 Using Profiles to Map Between Color Spaces

6.2.2.1 Color Matching

Once the API has an accurately specified color, it must reproduce that color on an output device, such as a monitor or printer. These devices have imaging characteristics of their own that must be taken into account to make sure that they produce the corr ect results. Another profile is associated with each output device to describe how the colors need to be transformed to produce accurate results.

Achieving consistent and accurate color requires that both input colors and output devices be profiled against a standard color space. For example, an input color could be mapped from its original color space into a standard device-independent space, and then mapped from that space to the output device's color space. In many respects, the transformation of colors mimics the transformation of graphical objects in an (x, y) coordinate space. In both cases, a transformation is used to specify coordinates in a "standard" space and then map those coordinates to a device-specific space for output.

1. Of course, the colors used in these diagrams are illustrative, not accurate. The point is that colors might not be mapped accurately between color spaces unless an appropriate conversion space is used.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 4

Fonts and Text Layout

You can use the Java 2DTM API transformation and drawing mechanisms with text strings. In addition, the Java 2D API provides text-related classes that support fine-grain font control and sophisticated text layout. These include an enhanced Font class and the new TextLayout class.

This chapter focuses on the new font and text layout capabilities supported through interfaces and classes in java.awt, and java.awt.font. For more information about using these features, see the 2D Text Tutorial that's availabl e through the Java Developer Connection at http://developer.java.sun.com/developer/onlineTraining/Media/2DText/.

For information about text analysis and internationalization, refer to the java.text documentation and the "Writing Global Programs" track in the Java Tutorial. For information about using the text layout mechanisms implemented in Swing , see the java.awt.swing.text documentation and "Using the JFC/Swing Packages" in the Java Tutorial.

Note: The information on international text layout contained in this chapter is based on the paper International Text in JDK 1.2 by Mark Davis, Doug Felt, and John Raley, copyright 1997, Taligent, Inc.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.1 Interfaces and Classes

The following tables list the key font and text layout interfaces and classes. Most of these interfaces and classes are part of the java.awt.font package. Some, like Font, are part of the java.awt package to maintain backward compatibility with earlier versions of the JDK.

Interface
Description

MultipleMaster

Represents Type 1 Multiple Master fonts. Implemented by Font objects that are multiple master fonts to enable access to multiple master design controls.

OpenType

Represents Open Type and True Type fonts. Implemented by Font objects that are Open Type or True Type fonts to enable access to the font's sfnt tables.

Class
Description

Font

(java.awt)

Represents an instance of a font face from the collection of font faces available on the host system. Supports the specification of detailed font information and provides access to information about the font and its glyphs.

FontRenderContext

Encapsulates the information necessary to correctly measure text.

GlyphJustificationInfo

Represents information about the justification properties of a glyph, such as weight, priority, absorb, and limit.

GlyphMetrics

Provides metrics for a single glyph.

GlyphVector

A collection of glyphs and their positions.

GraphicAttribute

Base class for a TextLayout attribute that specifies a graphic to be embedded within text. Implemented by ShapeGraphicAttribute and ImageGraphicAttribute, which enable Shapes and Images to be embedded in a TextLayout. Can be subclassed to implement custom character replacement graphics.

ImageGraphicAttribute

Extends: GraphicAttribute

A GraphicsAttribute used to draw Images within a TextLayout.

LineBreakMeasurer

Breaks a block of text that spans multiple lines into TextLayout objects that fit within a specified line length.

LineMetrics

Provides access to the font metrics needed to lay out characters along a line and to lay out a set of lines. These metrics include ascent, descent, leading, height, and baseline information.

ShapeGraphicAttribute

Extends: GraphicAttribute

A GraphicsAttribute used to draw Shapes within a TextLayout.

TextAttribute

Defines attribute keys and values used for text rendering.

TextHitInfo

Represents hit test information for characters in a TextLayout.

TextLayout

Implements: Cloneable

Provides an immutable graphical representation of styled character data, including bidirectional text.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.2 Font Concepts

The Font class has been enhanced to support the specification of detailed font information and enable the use of sophisticated typographic features.

A Font object represents an instance of a font face from the collection of font faces available on the system. Examples of common font faces include Helvetica Bold and Courier Bold Italic.

Three names are associated with a Font--its logical name, family name, and font face name:

  • A Font object's logical name is a name mapped onto one of the specific fonts available on the platform. The logical font name is the name used to specify a Font in JDK 1.1 and earlier releases. When specifying a Font in JavaTM 2 SDK, you should use the font face name instead of the logical name.You can get the logical name from the Font by calling getName. To get a list of the logical names that are mapped onto the specific fonts available on a platform, call java.awt.Toolkit.getFontList.
  • A Font object's family name is the name of the font family that determines the typographic design across several faces, such as Helvetica. You retrieve the family name through the getFamily method.
  • A Font objects' font face name refers to an actual font installed on the system. This is the name you should use when specifying a font in Java 2 SDK. It's often referred to as just the font name. You can retrieve the font name by calling getFontName. To determine which font faces are available on the system, you can call GraphicsEnvironment.getAllFonts.
You can access information about a Font through the getAttributes method. A Font's attributes include its name, size, transform, and font features such as weight and posture.

A LineMetrics object encapsulates the measurement information associated with a Font, such as its ascent, descent, and leading:

  • Ascent is the distance from the baseline to the ascender line. This distance represents the typical height of capital letters, but some characters might extend above the ascender line.
  • Descent is the distance from the baseline to the descender line. The lowest point of most characters will fall within the descent, but some characters might extend below the descender line.
  • Leading is the recommended distance from the bottom of the descender line to the top of the next line.

Figure 4-1 Line Metrics

This information is used to properly position characters along a line, and to position lines relative to one another. You can access these line metrics through the getAscent, getDescent, and getLeading methods. You can also access information about a Font's height, baseline, and underline and strikethrough characteristics through LineMetrics.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.3 Text Layout Concepts

Before a piece of text can be displayed, it must be properly shaped and positioned using the appropriate glyphs and ligatures. This process is referred to as text layout. The text layout process involves:

  • Shaping text using the appropriate glyphs and ligatures.
  • Properly ordering the text.
  • Measuring and positioning the text.
The information used to lay out text is also necessary for performing text operations such as caret positioning, hit detection, and highlighting.

To develop software that can be deployed in international markets, text must be laid out in different languages in a way that conforms to the rules of the appropriate writing system.

4.3.1 Shaping Text

A glyph is the visual representation of one or more characters. The shape, size, and position of a glyph is dependent on its context. Many different glyphs can be used to represent a single character or combination of characters, depending on the font and style.

For example, in handwritten cursive text, a particular character can take on different shapes depending on how it is connected to adjacent characters.

In some writing systems, particularly Arabic, the context of a glyph must always be taken into account. Unlike in English, cursive forms are mandatory in Arabic; it is unacceptable to present text without using cursive forms.

Depending on the context, these cursive forms can differ radically in shape. For example, the Arabic letter heh has the four cursive forms shown in Figure 4-2.

Figure 4-2 Cursive Forms in Arabic

Although these four forms are quite different from one another, such cursive shape-changing is not fundamentally different from cursive writing in English.

In some contexts, two glyphs can change shape even more radically and merge to form a single glyph. This type of merged glyph is called a ligature. For example, most English fonts contain the ligature fi shown in Figure 4-3. The merged glyph takes into account the overhang on the letter f and combines the characters in a natural-looking way, instead of simply letting the letters collide.

Figure 4-3 English Ligatures

Ligatures are also used in Arabic and the use of some ligatures is mandatory--it is unacceptable to present certain character combinations without using the appropriate ligature. When ligatures are formed from Arabic characters, the shapes change even more radically than they do in English. For example, Figure 4-4 illustrates how two Arabic characters are combined into a single ligature when they appear together.

Figure 4-4 Arabic Ligatures

4.3.2 Ordering Text

In the JavaTM programming language, text is encoded using Unicode character encoding. Text that uses Unicode character encoding is stored in memory in logical order. Logical order is the order in which characters and words are read and written. The logical order is not necessarily the same as the visual order, the order in which the corresponding glyphs are displayed.

The visual order for glyphs in a particular writing system (script) is called the script order. For example, the script order for Roman text is left-to-right and the script order for Arabic and Hebrew is right-to-left.

Some writing systems have rules in addition to script order for arranging glyphs and words on lines of text. For example, Arabic and Hebrew numbers run left to right, even though the letters run right to left. (This means that Arabic and Hebrew, even with no embedded English text, are truly bidirectional.)

A writing system's visual order must be maintained even when languages are mixed together. This is illustrated in Figure 4-5, which displays an Arabic phrase embedded in an English sentence.

Note: In this and subsequent examples, Arabic and Hebrew text is represented by uppercase letters and spaces are represented by underscores. Each illustration contains two parts: a representation of the characters stored in memory (the characters in logic al order) followed by a representation of how those characters are displayed (the characters in visual order). The numbers below the character boxes indicate the insertion offsets.

Figure 4-5 Bidirectional Text

Even though they are part of an English sentence, the Arabic words are displayed in the Arabic script order, right-to-left. Because the italicized Arabic word is logically after the Arabic in plain text, it is visually to the left of the plain text.

When a line with a mixture of left-to-right and right-to-left text is displayed, the base direction is significant. The base direction is the script order of the predominant writing system. For example, if the text is primarily English with some embedded Arabic, then the base direction is left-to-right. If the text is primarily Arabic with some embedded English or numbers, then the base direction is right-to-left.

The base direction determines the order in which segments of text with a common direction are displayed. In the example shown in Figure 4-5, the base direction is left-to-right. There are three directional runs in this example: the English text at the beginning of the sentence runs left to right, the Arabic text runs right to left, and the period runs left to right.

Graphics are often embedded in the flow of text. These inline graphics behave like glyphs in terms of how they affect the text flow and line wrapping. Such inline graphics need to be positioned using the same bidirectional layout algorithm so that they ap pear in the proper location in the flow of characters.

For more information about the precise algorithm used to order glyphs within a line, see the description of the Bidirectional Algorithm in The Unicode Standard, Version 2.0, Section 3.11.

4.3.3 Measuring and Positioning Text

Unless you are working with a monospace font, different characters in a font have different widths. This means that all positioning and measuring of text has to take into account exactly which characters are used, not just how many. For example, to right- align a column of numbers displayed in a proportional font, you can't simply use extra spaces to position the text. To properly align the column, you need to know the exact width of each number so that you can adjust accordingly.

Text is often displayed using multiple fonts and styles, such as bold or italic. In this case, even the same character can have different shapes and widths, depending on how it is styled. To properly position, measure, and render text, you need to keep tr ack of each individual character and the style applied to that character. Fortunately, TextLayout does this for you.

To properly display text in languages such as Hebrew and Arabic, each individual character needs to be measured and positioned within the context of neighboring characters. Because the shapes and positions of the characters can change depending on the con text, measuring and positioning such text without taking the context into account produces unacceptable results.

4.3.4 Supporting Text Manipulation

To allow the user to edit the text that is displayed, you must be able to:

  • Display a caret that indicates where new characters will be inserted when the user enters text.
  • Move the caret and insertion point in response to user input.
  • Detect user selections (hit detection).
  • Highlight selected text.

4.3.4.1 Displaying Carets

In editable text, a caret is used to graphically represent the current insertion point, the position in the text where new characters will be inserted. Typically, a caret is shown as a blinking vertical bar between two glyphs. New characters are inserted and displayed at the caret's location.

Calculating the caret position can be complicated, particularly for bidirectional text. Insertion offsets on directional boundaries have two possible caret positions because the two glyphs that correspond to the character offset are not displayed adjacent to one another. This is illustrated in Figure 4-6. In this figure, the carets are shown as square brackets to indicate the glyph to which the caret corresponds.

Figure 4-6 Dual Carets

Character offset 8 corresponds to the location after the _ and before the A. If the user enters an Arabic character, its glyph is displayed to the right of (before) the A; if the user enters an English character, its glyph is displayed t o the right of (after) the _.

To handle this situation, some systems display dual carets, a strong (primary) caret and a weak (secondary) caret. The strong caret indicates where an inserted character will be displayed when that character's direction is the same as the base direction o f the text. The weak caret shows where an inserted character will be displayed when the character's direction is the opposite of the base direction. TextLayout automatically supports dual carets; JTextComponent does not.

When you're working with bidirectional text, you can't simply add the widths of the glyphs before a character offset to calculate the caret position. If you did, the caret would be drawn in the wrong place, as shown in Figure 4-7.

Figure 4-7 Caret Drawn Incorrectly

For the caret to be properly positioned, the widths of the glyphs to the left of the offset need to be added and the current context taken into account. Unless the context is taken into account, the glyph metrics won't necessarily match the display. ( The context can affect which glyphs are used.)

4.3.4.2 Moving Carets

All text editors allow the user to move the caret with the arrow keys. Users expect the caret to move in the direction of the pressed arrow key. In left-to-right text, moving the insertion offset is simple: the right arrow key increases the insertion offs et by one and the left arrow key decreases it by one. In bidirectional text or in text with ligatures, this behavior would cause the caret to jump across glyphs at direction boundaries and move in the reverse direction within different directional runs.

To move the caret smoothly through bidirectional text, you need to take into account the direction of the text runs. You can't simply increment the insertion offset when the right arrow key is pressed and decrement it when the left arrow key is presse d. If the current insertion offset is within a run of right-to-left characters, the right arrow key should decrease the insertion offset, and the left arrow key should increase it.

Moving the caret across a directional boundary is even more complicated. Figure 4-8 illustrates what happens when a directional boundary is crossed when the user is navigating with the arrow key. Stepping three positions to the right in the displayed text corresponds to moving to the character offsets 7, 19, then 18.

Figure 4-8 Caret Movement

Certain glyphs should never have a caret between them; instead, the caret should move as though the glyphs represented a single character. For example, there should never be a caret between an o and an umlaut if they are represented by two separa te characters. (See The Unicode Standard, Version 2.0, Chapter 5, for more information.)

TextLayout provides methods (getNextRightHit and getNextLeftHit) that enable you to easily move the caret smoothly through bidirectional text.

4.3.4.3 Hit Testing

Often, a location in device space must be converted to a text offset. For example, when a user clicks the mouse on selectable text, the location of the mouse is converted to a text offset and used as one end of the selection range. Logically, this is the inverse of positioning a caret.

When you're working with bidirectional text, a single visual location in the display can correspond to two different offsets in the source text, as shown in Figure 4-9.

Figure 4-9 Hit Testing Bidirectional Text

Because a single visual location can correspond to two different offsets, hit testing bidirectional text isn't just a matter of measuring glyph widths until the glyph at the correct location is found and then mapping that position back to a character offset. Detecting the side that the hit was on helps distinguish between the two alternatives.

You can perform hit testing using TextLayout.hitTestChar. Hit information is encapsulated in a TextHitInfo object and includes information about the side that the hit was on.

4.3.4.4 Highlighting Selections

A selected range of characters is represented graphically by a highlight region, an area in which glyphs are displayed with inverse video or against a different background color.

Highlight regions, like carets, are more complicated for bidirectional text than for monodirectional text. In bidirectional text, a contiguous range of characters might not have a contiguous highlight region when displayed. Conversely, a highlight region showing a visually contiguous range of glyphs might not correspond to a single, contiguous range of characters.

This results in two strategies for highlighting selections in bidirectional text:

  • Logical highlighting --with logical highlighting, the selected characters are always contiguous in the text model, and the highlight region is allowed to be discontiguous. For an example of logical highlighting, see Figure 4-10.
  • Visual highlighting--with visual highlighting, there might be more than one range of selected characters, but the highlight region is always contiguous. For an example of visual highlighting, see Figure& #160;4-11.

Figure 4-10 Logical Highlighting (contiguous characters)

Figure 4-11 Visual Highlighting (contiguous highlight region)

Logical highlighting is simpler to implement, since the selected characters are always contiguous in the text.

4.3.5 Performing Text Layout in a JavaTM Application

Depending on which JavaTM APIs you use, you can have as little or as much control over text layout as you need:

  • If you just want to display a block of text or need an editable text control, you can use JTextComponent, which will perform the text layout for you. JTextComponent is designed to handle the needs of most international applications a nd supports bidirectional text. For more information about JTextComponent, see "Using the JFC/Swing Packages" in the Java Tutorial.
  • If you want to display a simple text string, you can call Graphics2D.drawString and let Java 2DTM lay out the string for you. You can also use drawString to render styled strings and strings that contain bidirectional text . For more information about rendering text through Graphics2D, see "Rendering Graphics Primitives".
  • If you want to implement your own text editing routines, you can use TextLayout to manage text layout, highlighting, and hit detection. The facilities provided by TextLayout handle most common cases, including text strings with mixed fonts, mixed languages, and bidirectional text. For more information about using TextLayout, see "Managing Text Layout".
  • If you want total control over how text is shaped and positioned, you can construct your own GlyphVectors using Font and then render them through Graphics2D. For more information about implementing your own text layout mechanism, see "Implementing a Custom Text Layout Mechanism".
Generally, you do not need to perform text layout operations yourself. For most applications, JTextComponent is the best solution for displaying static and editable text. However, JTextComponent does not support the display of dual c arets or discontiguous selections in bidirectional text. If your application requires these features, or you prefer to implement your own text editing routines, you can use the Java 2D text layout APIs.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.4 Managing Text Layout

The TextLayout class supports text that contains multiple styles and characters from different writing systems, including Arabic and Hebrew. (Arabic and Hebrew are particularly difficult to display because you must reshape and reorder the text to achieve an acceptable representation.)

TextLayout simplifies the process of displaying and measuring text even if you are working with English-only text. By using TextLayout, you can achieve high-quality typography with no extra effort.

Text Layout Performance

TextLayout is designed so that there is no significant performance impact when it's used to display simple, monodirectional text. There is some additional processing overhead when TextLayout is used to display Arabic or Hebrew text. However, it's typically on the order of microseconds per character and is dominated by the execution of normal drawing code.

The TextLayout class manages the positioning and ordering of glyphs for you. You can use TextLayout to:

  • Lay out monodirectional and bidirectional text
  • Display and move carets
  • Perform hit testing on text
  • Highlight text selections
In some situations, you might want to compute the text layout yourself, so that you can control exactly which glyphs are used and where they are placed. Using information such as glyph sizes, kerning tables, and ligature information, you can construct you r own algorithms for computing the text layout, bypassing the system's layout mechanism. For more information, see "Implementing a Custom Text Layout Mechanism".

4.4.1 Laying Out Text

TextLayout automatically lays out text, including bidirectional (BIDI) text, with the correct shaping and ordering. To correctly shape and order the glyphs representing a line of text, TextLayout must know the full context of the tex t:

  • If the text fits on a single line, such as a single-word label for a button or a line in a dialog box, you can construct a TextLayout directly from the text.
  • If you have more text than can fit on a single line or want to break text on a single line into tabbed segments, you cannot construct a TextLayout directly. You must use a LineBreakMeasurer to provide sufficient context.
The base direction of the text is normally set by an attribute (style) on the text. If that attribute is missing, TextLayout follows the Unicode bidirectional algorithm and derives the base direction from the initial characters in the paragraph .

4.4.2 Displaying Dual Carets

TextLayout maintains caret information such as the caret Shape, position, and angle. You can use this information to easily display carets in both monodirectional and bidirectional text. When you're drawing carets for bidirection al text, using TextLayout ensures that the carets will be positioned correctly.

TextLayout provides default caret Shapes and automatically supports dual carets. For italic and oblique glyphs, TextLayout produces angled carets, as shown in Figure 4-12. These caret positions are also used as the boundaries between glyphs for highlighting and hit testing, which helps produce a consistent user experience.

Figure 4-12 Angled Carets

Given an insertion offset, the getCaretShapes method returns a two-element array of Shapes: element 0 contains the strong caret and element 1 contains the weak caret, if one exists. To display dual carets, you simply draw both caret Shapes; the carets will be automatically be rendered in the correct positions.

If you want to use custom caret Shapes, you can retrieve the position and angle of the carets from the TextLayout and draw them yourself.

In the following example, the default strong and weak caret Shapes are drawn in different colors. This is a common way to differentiate dual carets.

    Shape[] caretShapes = layout.getCaretShapes(hit);
    g2.setColor(PRIMARY_CARET_COLOR);
    g2.draw(caretShapes[0]);
    if (caretShapes[1] != null){
         g2.setColor(SECONDARY_CARET_COLOR);
         g2.draw(caretShapes[1]);
    }

4.4.3 Moving the Caret

You can also use TextLayout to determine the resulting insertion offset when a user presses the left or right arrow key. Given a TextHitInfo object that represents the current insertion offset, the getNextRightHit method r eturns a TextHitInfo object that represents the correct insertion offset if the right arrow key is pressed. The getNextLeftHit method provides the same information for the left arrow key.

In the following example, the current insertion offset is moved in response to a right arrow key.

    TextHitInfo newInsertionOffset =
            layout.getNextRightHit(insertionOffset);
    if (newInsertionOffset != null) {
         Shape[] caretShapes =
              layout.getCaretShapes(newInsertionOffset);
         // draw carets
         ...
         insertionOffset = newInsertionOffset;
    }

4.4.4 Hit Testing

TextLayout provides a simple mechanism for hit testing text. The hitTestChar method takes x and y coordinates from the mouse as arguments and returns a TextHitInfo object. The TextHitInfo conta ins the insertion offset for the specified position and the side that the hit was on. The insertion offset is the offset closest to the hit: if the hit is past the end of the line, the offset at the end of the line is returned.

In the following example, hitTestChar is called on a TextLayout and then getInsertIndex is used to retrieve the offset.

    TextHitInfo hit = layout.hitTestChar(x, y);
    int insertIndex = hit.getInsertIndex();

4.4.5 Highlighting Selections

You can get a Shape that represents the highlight region from the TextLayout. TextLayout automatically takes the context into account when calculating the dimensions of the highlight region. TextLayout supports both logical and visual highlighting.

In the following example, the highlight region is filled with the highlight color and then the TextLayout is drawn over the filled region. This is one simple way to display highlighted text.

    Shape highlightRegion = layout.getLogicalHighlightShape(hit1, hit2);
    graphics.setColor(HIGHLIGHT_COLOR);
    graphics.fill(highlightRegion);
    graphics.drawString(layout, 0, 0);

4.4.6 Querying Layout Metrics

TextLayout provides access to graphical metrics for the entire range of text it represents. Metrics available from TextLayout include the ascent, descent, leading, advance, visible advance, and the bounding rectangle.

More than one Font can be associated with a TextLayout: different style runs can use different fonts. The ascent and descent values for a TextLayout are the maximum values of all of the fonts used in the TextLayout. The computation of the TextLayout's leading is more complicated; it's not just the maximum leading value.

The advance of a TextLayout is its length: the distance from the left edge of the leftmost glyph to the right edge of the rightmost glyph. The advance is sometimes referred to as the total advance. The visible advance is the l ength of the TextLayout without its trailing whitespace.

The bounding box of a TextLayout encloses all of the text in the layout. It includes all the visible glyphs and the caret boundaries. (Some of these might hang over the origin or origin + advance). The bounding box is relative to the origin of the TextLayout, not to any particular screen position.

In the following example, the text in a TextLayout is drawn within the layout's bounding box.

    graphics.drawString(layout, 0, 0);
    Rectangle2D bounds = layout.getBounds();
    graphics.drawRect(bounds.getX()-1, bounds.getY()-1,
           bounds.getWidth()+2, bounds.getHeight()+2);

4.4.7 Drawing Text Across Multiple Lines

TextLayout can also be used to display a piece of text that spans multiple lines. For example, you might take a paragraph of text, line-wrap the text to a certain width, and display the paragraph as multiple lines of text.

To do this, you do not directly create the TextLayouts that represent each line of text--LineBreakMeasurer generates them for you. Bidirectional ordering cannot always be performed correctly unless all of the text in a paragr aph is available. LineBreakMeasurer encapsulates enough information about the context to produce correct TextLayouts.

When text is displayed across multiple lines, the length of the lines is usually determined by the width of the display area. Line breaking (line wrapping) is the process of determining where lines begin and end, given a graphical width in which the lines must fit.

The most common strategy is to place as many words on each line as will fit. This strategy is implemented in LineBreakMeasurer. Other more complex line break strategies use hyphenation, or attempt to minimize the differences in line length with in paragraphs. The Java 2DTM API does not provide implementations of these strategies.

To break a paragraph of text into lines, you construct a LineBreakMeasurer with the entire paragraph and then call nextLayout to step through the text and generate TextLayouts for each line.

To do this, LineBreakMeasurer maintains an offset within the text. Initially, the offset is at the beginning of the text. Each call to nextLayout moves the offset by the character count of the TextLayout that was created. When this offset reaches the end of the text, nextLayout returns null.

The visible advance of each TextLayout that the LineBreakMeasurer creates doesn't exceed the specified line width. By varying the width you specify when you call nextLayout, you can break text to fit complicated areas, such as an HTML page with images in fixed positions or tab-stop fields. You can also pass in a BreakIterator to tell LineBreakMeasurer where valid breakpoints are; if you don't supply one the BreakIterator for the default locale is used.

In the following example, a bilingual text segment is drawn line by line. The lines are aligned to either to the left margin or right margin, depending on whether the base text direction is left-to-right or right-to-left.

    Point2D pen = initialPosition;
    LineBreakMeasurer measurer = new LineBreakMeasurer(styledText,
        myBreakIterator);
    while (true) {
         TextLayout layout = measurer.nextLayout(wrappingWidth);
         if (layout == null) break;
           pen.y += layout.getAscent();
           float dx = 0;
           if (layout.isLeftToRight())
             dx = wrappingWidth - layout.getAdvance();
           layout.draw(graphics, pen.x + dx, pen.y);
           pen.y += layout.getDescent() + layout.getLeading();
    }

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.5 Implementing a Custom Text Layout Mechanism

The GlyphVector class provides a way to display the results of custom layout mechanisms. A GlyphVector object can be thought of as the output of an algorithm that takes a string and computes exactly how the string should be displayed. The system has a built-in algorithm and the Java 2DTM API lets advanced clients define their own algorithms.

A GlyphVector object is basically an array of glyphs and glyph locations. Glyphs are used instead of characters to provide total control over layout characteristics such as kerning and ligatures. For example, when displaying the string "final", you might want to replace the leading fi substring with the ligature fi. In this case, the GlyphVector object will have fewer glyphs than the number of characters in the original string.

Figure 4-13 and Figure 4-14 illustrate how GlyphVector objects are used by layout mechanisms. Figure 4-13 shows the default layout mechanism. When drawString is called on a String, the built-in layout algorithm:

  • Uses the current Font in the Graphics2D context to determine which glyphs to use.
  • Calculates where each glyph should be placed.
  • Stores the resulting glyph and position information in a GlyphVector.
  • Passes the GlyphVector to a glyph rendering routine that does the actual drawing.

Figure 4-13 Using the Built-in Layout Algorithm

Figure 4-14 shows the process for using a custom layout algorithm. To use a custom layout algorithm, you must assemble all of the information necessary to lay out the text. The basic process is the same:

  • Using the Font, determine which glyphs to use
  • Determine where to place the glyphs
  • Store this layout information in a GlyphVector
To render the text, you pass the GlyphVector to drawString, which in turn passes it to the glyph renderer. In Figure 4-14, the custom layout algorithm replaces the fi substring with the ligature fi.

Figure 4-14 Using a Custom Layout Algorithm

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 -

CONTENTS | PREV | NEXT Java 2D API

4.6 Creating Font Derivations

Using the Font.deriveFont methods, you can create a new Font object with different attributes from an existing Font object. Often, a transform is applied to the existing Font to create a new derived Font. To do this, you:

  1. Create a Font object.,
  2. Create the AffineTransform you want to apply to the Font.
  3. Call Font.deriveFont, passing in the AffineTransform.
In this way, you could easily create a Font in a custom size or a skewed version of an existing Font.

In the following code excerpt, an AffineTransform is applied to create a skewed version of the font Helvetica. The new derived font is then used to render a string.

    // Create a transformation for the font.
    AffineTransform fontAT = new AffineTransform();
    fontAT.setToShear(-1.2, 0.0);
    // Create a Font Object.
    Font theFont = new Font("Helvetica", Font.PLAIN, 1);
    // Derive a new font using the shear transform
    theDerivedFont = theFont.deriveFont(fontAT);
    // Add the derived font to the Graphics2D context
    g2.setFont(theDerivedFont);
    // Render a string using the derived font
    g2.drawString("Java", 0.0f, 0.0f);

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 3

Geometries

The Java 2DTM API provides several classes that define common geometric objects, such as points, lines, curves, and rectangles. These new geometry classes are part of the java.awt.geom package. For backward compatibility, the geometry classes that existed in previous versions of the JDK software, such as Rectangle, Point, and Polygon, remain in the java.awt package.

The Java 2D API geometries such as GeneralPath, Arc2D, and Rectangle2D implement the Shape interface defined in java.awt. Shape provides a common protocol for describing and inspecting geometric path objects. A new interface, PathIterator, defines methods for retrieving elements from a geometry.

Using the geometry classes, you can easily define and manipulate virtually any two-dimensional object.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 -

CONTENTS | PREV | NEXT Java 2D API

3.1 Interfaces and Classes

The following tables list the key geometry interfaces and classes. Most of these interfaces and classes are part of the java.awt.geom package. Some, like Shape, are part of the java.awt package, primarily to maintain backw ard compatibility with earlier versions of the JDK software.

Interface
Description

PathIterator

Defines methods for retrieving elements from a path.

Shape

(java.awt)

Provides a common set of methods for describing and inspecting geometric path objects. Implemented by GeneralPath and other geometry classes.

Class
Description

Arc2D

Arc2D.Double

Arc2D.Float

Extends: RectangularShape

Represents an arc defined by a bounding rectangle, start angle, angular extent, and a closure type. Implemented to specify arcs in float and double precision: Arc2D.Float and Arc2D.Double.

Area

Implements: Shape, Cloneable

Represents an area geometry that supports boolean operations.

CubicCurve2D

CubicCurve2D.Double

CubicCurve2D.Float

Implements: Shape

Represents a cubic parametric curve segment in (w) coordinate space. Implemented to specify cubic curves in float and double precision: CubicCurve2D.Float and CubicCurve2D.Double.

Dimension2D

Encapsulates a width and height dimension. Abstract superclass for all objects that store a 2D dimension.

Ellipse2D

Ellipse2D.Double

Ellipse2D.Float

Extends: RectangularShape

Represents an ellipse defined by a bounding rectangle. Implemented to specify ellipses in float and double precision: Ellipse2D.Float and Ellipse2D.Double.

FlatteningPathIterator

Returns a flattened view of a PathIterator object.

Can be used to provide flattening behavior for Shapes that don't perform the interpolation calculations themselves.

GeneralPath

Implements: Shape

Represents a geometric path constructed from lines and quadratic and cubic curves.

Line2D

Line2D.Double

Line2D.Float

Implements: Shape

Represents a line segment in (x, y) coordinate space. Implemented to specify lines in float and double precision: Line2D.Float and Line2D.Double.

Point2D

Point2D.Double

Point2D.Float

A point representing a location in (x,y) coordinate space. Implemented to specify points in float and double precision: Point2D.Float and Point2D.Double.

QuadCurve2D

QuadCurve2D.Double

QuadCurve2D.Float

Implements: Shape

Represents a quadratic parametric curve segment in (x, y) coordinate space. Implemented to specify quadratic curves in float and double precision: QuadCurve2D.Float and QuadCurve2D.Double.

Rectangle2D

Rectangle2D.Double

Rectangle2D.Float

Extends: RectangularShape

Represents a rectangle defined by a location (x, y) and dimension (w x h). Implemented to specify rectangles in float and double precision: Rectangle2D.Float and Rectangle2D.Double.

RectangularShape

Implements: Shape

Provides common manipulation routines for operating on shapes that have rectangular bounds.

RoundRectangle2D

RoundRectangle2D.Double

RoundRectangle2D.Float

Extends: RectangularShape

Represents a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of the corner arc. Implemented to specify round rectangles in float and double precision: RoundRectangle2D.Float and RoundRectangle2D.Double.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 -

CONTENTS | PREV | NEXT Java 2D API

3.2 Geometry Concepts

A Shape is an instance of any class that implements the Shape interface, such as GeneralPath or Rectangle2D.Float. A Shape's contour (outline) is referred to as its path.

When a Shape is drawn, the pen style defined by the Stroke object in the Graphics2D context is applied to the Shape's path. When a Shape is filled, the Paint in the Graphics2D context is applied to the area within its path. For more information, see "Rendering with Graphics2D".

A Shape's path can be also used to define a clipping path. A clipping path determines what pixels are rendered--only those pixels that lie within the area defined by the clipping path are rendered. The clipping path is part of the Graphics2D context. For more information, see "Setting the Clipping Path".

A GeneralPath is a shape that can be used to represent any two-dimensional object that can be constructed from lines and quadratic or cubic curves. For convenience, java.awt.geom provides additional implementations of the Shape interface that represent common geometric objects such as rectangles, ellipses, arcs, and curves. The Java 2DTM API also provides a special type of shape that supports constructive area geometry.

3.2.1 Constructive Area Geometry

Constructive Area Geometry (CAG) is the process of creating new geometric objects by performing boolean operations on existing objects. In the Java 2D API, a special type of Shape called an Area supports boolean operations. You can c onstruct an Area from any Shape.

Areas support the following Boolean operations:

  • Union
  • Intersection
  • Subtraction
  • Exclusive OR (XOR)
These operations are illustrated in Figure 3-1.

Figure 3-1 Boolean Operations

3.2.2 Bounds and Hit Testing

A bounding box is a rectangle that fully encloses a shape's geometry. Bounding boxes are used to determine whether or not an object has been selected or "hit" by the user.

The Shape interface defines two methods for retrieving a shape's bounding box, getBounds and getBounds2D. The getBounds2D method returns a Rectangle2D instead of a Rectangle, providing a higher-precision description of the shape's bounding box.

Shape also provides methods for determining whether or not:

  • A specified point lies within the bounds of the shape (contains)
  • A specified rectangle lies totally within the bounds of the shape (contains)
  • A specified rectangle intersects the shape (intersects)

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 -

CONTENTS | PREV | NEXT Java 2D API

3.3 Combining Areas to Create New Shapes

Areas can be used to quickly construct complex Shapes from simple shapes such as circles and squares. To create a new complex Shape by combining Areas:

  1. Using Shapes, construct the Areas to be combined.
  2. Call the appropriate Boolean operators: add, subtract, intersect, exclusiveOr.

For example, CAG could be used to create a pear like that shown in Figure 3-2.

Figure 3-2 Pear constructed from circles

The body of the pear is constructed by performing a union operation on two overlapping Areas: a circle and an oval. The leaves are each created by performing an intersection on two overlapping circles and then joined into a single Shape through a union operation. Overlapping circles are also used to construct the stem through two subtraction operations.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 -

CONTENTS | PREV | NEXT Java 2D API

3.4 Creating a Custom Shape

You can implement the Shape interface to create a class that defines a new type of shape. It doesn't matter how you represent the shape internally, as long as you can implement the Shape interface methods. The Shape must be able to generate a path that specifies its contour.

For example, you could create a simple implementation of Shape that represents polygons as arrays of points. Once the polygon is built, it could be passed to draw, setClip, or any other method that expects a Shape object as an argument.

The PolygonPath class must implement the Shape interface methods:

  • contains
  • getBounds
  • getBounds2D
  • getPathIterator
  • intersects

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 5

Imaging

The Java 2DTM API supports three imaging models

  • The producer/consumer (push) model provided in previous versions of the JDK software.
  • The immediate mode model introduced in the JavaTM 2 SDK software release.
  • The pipeline (pull) model compatible with the immediate mode model and that will be fully implemented in the forthcoming Java Advanced Imaging API.
The following table contrasts the features of each of these imaging models.

This chapter focuses on the objects and techniques of the immediate mode imaging model. The immediate mode imaging classes and interfaces of the Java 2D API provide techniques for dealing with pixel mapped images whose data is stored in memory. This API supports accessing image data in a variety of storage formats and manipulating image data through several types of filtering operations.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.1 Interfaces and Classes

The immediate mode imaging APIs in the Java 2DTM API can be grouped into six categories: interfaces, image data classes, image operation classes, sample model classes, color model classes, and exceptions.

5.1.1 Imaging Interfaces

Interface
Description

BufferedImageOp

Describes single-input/single-output operations performed on BufferedImage objects. Implemented by AffineTransformOp, ColorConvertOp, ConvolveOp, LookupOp, and RescaleOp.

RasterOp

Defines single-input/single-output operations performed on Raster objects. Implemented by AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, and RescaleOp.

RenderedImage

Defines a common protocol for objects that contain or can produce image data in the form of Rasters.

WritableRenderedImage

Extends: RenderedImage

Defines a common protocol for objects that contain or can produce image data in the form of Rasters which can be modified.

TileObserver

Defines a protocol for objects that want to be notified when the modification state of a WritableRenderedImage changes.

5.1.2 Image Data Classes

Class
Description

BufferedImage

Extends: Image

Implements: WriteableRenderedImage

An image with an accessible data buffer. A BufferedImage has a ColorModel and a Raster of image data.

ByteLookupTable

Extends: LookupTable

A LookupTable that contains byte data.

DataBuffer

Wraps one or more data arrays holding pixel data. Each data array is called a bank.

DataBufferByte

Extends: DataBuffer (Final)

A data buffer that stores bytes of data. (Used in Java Advanced Imaging API)

DataBufferInt

Extends: DataBuffer (Final))

A data buffer that stores integer data.(Used in Java Advanced Imaging API)

DataBufferShort

Extends: DataBuffer (Final)

A data buffer that stores short data.(Used in Java Advanced Imaging API)

DataBufferUShort

Extends: DataBuffer (Final)

A data buffer that stores unsigned short data.

Kernel

A matrix that describes how an input pixel and its surrounding pixels affect the value of an output pixel in a ConvolveOp filtering operation.

LookupTable

Extends: Object

A table that maps values from single-banded pixel data to color values.

Raster

A rectangular array of pixels from which you can retrieve image data. A Raster contains a DataBuffer and a SampleModel.

ShortLookupTable

Extends: LookupTable

A lookup table that contains short data.

WritableRaster

Extends: Raster

A Raster that you can modify.

5.1.3 Image Operation Classes

Class
Description

AffineTransformOp

Implements: BufferedImageOp, RasterOp

A class that defines an affine transform to perform a linear mapping from 2D coordinates in a source Image or Raster to 2D coordinates in the destination image or Raster. This class can perform either bilinear or nearest neighbor affine transform operations.

BandCombineOp

Implements: RasterOp

Using a specified matrix, this operation performs an arbitrary linear combination of bands in a Raster.

BufferedImageFilter

Extends: ImageFilter

An ImageFilter that provides a simple means of using a BufferedImageOp (a single-source/single-destination image operator) to filter a BufferedImage or Raster.

ColorConvertOp

Implements: BufferedImageOp, RasterOp

Performs a pixel-by-pixel color conversion of the data in the source image.

ConvolveOp

Implements: BufferedImageOp, RasterOp

Uses a Kernel to perform a convolution on the source image. A convolution is a spatial operation where the pixels surrounding the input pixel are multiplied by a kernel value to generate the value of the output pixel. The Kernel mathematically defines the relationship between the pixels in the immediate neighborhood of the input pixel and the output pixel.

LookupOp

Implements: BufferedImageOp, RasterOp

Performs a lookup operation from the source to the destination. For Rasters, the lookup operates on sample values. For BufferedImages, the lookup operates on color and alpha components.

RescaleOp

Implements: BufferedImageOp, RasterOp

Performs a pixel-by-pixel rescaling of the data in the source image by multiplying each pixel value by a scale factor and then adding an offset.

5.1.4 Sample Model Classes

Class
Description

BandedSampleModel

Extends: ComponentSampleModel (Final)

Provides access to image data stored with like samples stored as bands in separate banks of a DataBuffer. A pixel consists of one sample from each band.

ComponentSampleModel

Extends: SampleModel

Provides access to image data stored with each sample of a pixel residing in a separate element of a DataBuffer. Different types of pixel interleaving are supported.

MultiPixelPackedSampleModel

Extends: SampleModel

Provides access to image data stored with multiple one-sample pixels packed into one element of a DataBuffer.

PixelInterleavedSampleModel

Extends: ComponentSampleModel

Provides access to image data stored with the sample data for each pixel in adjacent elements of the data array, and all elements in a single bank of a DataBuffer.

SampleModel

An abstract class that defines a mechanism for extracting sample data from an image without knowing how the underlying data is stored in a DataBuffer.

SinglePixelPackedSampleModel

Extends: SampleModel

Provides access to image data stored with all the samples belonging to an individual pixel packed into one element of a DataBuffer.

5.1.5 Color Model Classes

Class
Description

ColorModel

Implements: Transparency

JDK1.1 class. An abstract class that defines methods for translating from image pixel values to color components such as red, green, and blue.

ComponentColorModel

Extends: ColorModel

A ColorModel that can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace. This class can be used to represent most color models on most types of GraphicsDevices.

DirectColorModel

Extends: PackedColorModel

JDK1.1 class. A ColorModel that represents pixel values that have RGB color components embedded directly in the bits of the pixel. This color model is similar to an X11 TrueColor visual. The default RGB ColorModel returned by ColorModel.getRGBdefault is a DirectColorModel.

IndexColorModel

Extends: ColorModel

JDK1.1 class. A ColorModel that represents pixel values that are indices into a fixed color map in the sRGB ColorSpace.

PackedColorModel

Extends: ColorModel

An abstract ColorModel that represents pixel values that have color components embedded directly in the bits of a pixel. DirectColorModel extends PackedColorModel to support pixels that contain RGB color components.

5.1.6 Exception Classes

Class
Description

ImagingOpException

Extends: RuntimeException

Thrown if one of the BufferedImageOp or RasterOp filter methods can't process the image.

RasterFormatException

Extends: RuntimeException

Thrown if there is invalid layout information in the Raster.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.2 Immediate Mode Imaging Concepts

The immediate mode imaging model supports fixed-resolution images stored in memory. The model also supports filtering operations on image data. A number of classes and interfaces are used in this model.

Figure 5-1 BufferedImage and supporting classes

As shown in Figure 5-1, BufferedImage provides general image management. A BufferedImage can be created directly in memory and used to hold and manipulate image data retrieved from a file or URL. A BufferedImage can be displayed using any Graphics2D object for a screen device, or rendered to any other destination using appropriate Graphics2D context. A BufferedImage object contains two other objects: a Raster and a ColorModel.

The Raster class provides image data management. It represents the rectangular coordinates of the image, maintains image data in memory, and provides a mechanism for creating multiple subimages from a single image data buffer. It also provides methods for accessing specific pixels within an image. A Raster object contains two other objects, a DataBuffer and a SampleModel.

The DataBuffer class holds pixel data in memory.

The SampleModel class interprets data in the buffer and provides it as individual pixels or rectangular ranges of pixels.

The ColorModel class provides a color interpretation of pixel data provided by the image's sample model.

The image package provides additional classes that define filtering operations on BufferedImage and Raster objects. Each image processing operation is embodied in a class that implements the BufferedImageOp interface, the RasterOp interface, or both interfaces. The operation class defines filter methods that performs the actual image manipulation.

Figure 5-2 illustrates the basic model for Java 2DTM API image processing:

Figure 5-2 Image Processing Model

The operations supported include:

  • Affine transformation
  • Amplitude scaling
  • Lookup-table modification
  • Linear combination of bands
  • Color conversion
  • Convolution
Note that if you're interested just in displaying and manipulating images, you only need to understand the BufferedImage class and the filtering operation classes. On the other hand, if you're planning to write filters or otherwise directly access image data, you'll need to understand the classes associated with BufferedImage.

5.2.1 Terminology

Here are some terms used throughout the following discussions:

Data Elements: primitive types used as units of storage of image data. Data elements are individual members of a DataBuffer array. The layout of elements in the data buffer is independent of the interpretation of the data as pixels by an image's SampleModel.

Samples: distinct members of the pixels of an image. A SampleModel provides a mechanism for converting elements in the DataBuffer to pixels and their samples. The samples of a pixel may represent primary values in a particular color model. For example, a pixel in an RGB color model consists of three samples: red, green, and blue.

Components: values of pixels independent of color interpretation. The distinction between component and sample is useful with IndexColorModel, where pixel components are indexes into the LookupTable.

Band: the set of all samples of one type in an image, such as all red samples or all green samples. Pixel data can be stored in a number of ways, the two supported in the Java 2D API being banded and pixel interleaved. Banded storage organizes image data by bands, and a pixel is made up of sample data from the same position in each band. Pixel interleaved storage organizes image data by pixels, with a single array containing all pixels, and bands consisting of the set of samples at the same index position in each pixel.

Primaries: distinct members of a color value in a specific color model; for example the RGB model forms color values from the primaries red, green, and blue.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.3 Using BufferedImages

The BufferedImage class is the main class supporting the immediate imaging mode. It manages an image in memory, providing ways to store pixel data, interpret pixel data, and to render the pixel data to a Graphics or Graphics2D context.

5.3.1 Creating a BufferedImage

To create a BufferedImage, call the Component.createImage method; this returns a BufferedImage whose drawing characteristics match those of the component used to create it--the created image is opaque, has the foreground and background colors of the Component, and you can't adjust the transparency of the image. You could use this technique when you want to do double buffered drawing for animation in a component; the discussion "Drawing in an Offscreen Buffer" gives more details.

    public Graphics2D createDemoGraphics2D(Graphics g) {
        Graphics2D g2 = null;
        int width = getSize().width;
        int height = getSize().height;

        if (offImg == null || offImg.getWidth() != width ||
                        offImg.getHeight() != height) {
            offImg = (BufferedImage) createImage(width, height);
        }

        if (offImg != null) {
            g2 = offImg.createGraphics();
            g2.setBackground(getBackground());
        }

        // .. clear canvas ..
        g2.clearRect(0, 0, width, height);

        return g2;
    }
You can also create a blank BufferedImage in memory using one of several constructor methods provided.

5.3.2 Drawing in an Offscreen Buffer

The BufferedImage class can be used to prepare graphic elements offscreen then copy them to the screen. This technique is especially useful when a graphic is complex or used repeatedly. For example, if you want to display a complicated shape se veral times, you could draw it once into an offscreen buffer and then copy it to different locations in the window. By drawing the shape once and copying it, you can display the graphics more quickly.

The java.awt package facilitates the use of offscreen buffers by letting you draw to an Image object the same way that you draw to a window. All of the Java 2DTM API rendering features can be used when drawing to offscreen images.

Offscreen buffers are often used for animation. For example, you could use an offscreen buffer to draw an object once and then move it around in a window. Similarly, you could use an offscreen buffer to provide feedback as a user moves a graphic using the mouse. Instead of redrawing the graphic at every mouse location, you could draw the graphic once to an offscreen buffer, and then copy it to the mouse location as the user drags the mouse.1

Figure 5-3 Using an Offscreen Buffer

Figure 5-3 demonstrates how a program can draw to an offscreen image and then copy that image into a window multiple times. The last time the image is copied, it is transformed. Note that transforming the image instead of redrawing it with the transformation might produce unsatisfactory results.

5.3.2.1 Creating an Offscreen Buffer

The simplest way to create an image that you can use as an offscreen buffer is to use the Component.createImage method.

By creating an image whose color space, depth, and pixel layout exactly match the window into which you are drawing, the image can be efficiently blitted to a graphics device. This allows drawImage to do its job quickly.

You can also construct a BufferedImage object directly to use as an offscreen buffer. This is useful when you need control over the offscreen image's type or transparency.

BufferedImage supports several predefined image types:

  • TYPE_3BYTE_BGR
  • TYPE_4BYTE_ABGR
  • TYPE_4BYTE_ABGR_PRE
  • TYPE_BYTE_BINARY
  • TYPE_BYTE_GRAY
  • TYPE_BYTE_INDEXED
  • TYPE_CUSTOM
  • TYPE_INT_ARGB_PRE
  • TYPE_INT_ARGB
  • TYPE_INT_BGR
  • TYPE_INT_RGB
  • TYPE_USHORT_555_RGB
  • TYPE_USHORT_565_RGB
  • TYPE_INT_GRAY
A BufferedImage object can contain an alpha channel. In Figure 5-3, an alpha channel is used to distinguish painted and unpainted areas, allowing an irregular shape to appear over graphics that have a lready been painted (in this case, a shaded rectangle). In other cases, you might use alpha channel to blend the colors of the new image into those in the existing image.

Note: unless you need alpha image data for transparency, as with the irregularly shaped images shown in Figure 5-2, you should avoid creating an off-screen buffer with alpha. Using alpha where it's unnecessary slows rendering performance.

GraphicsConfiguration provides convenience methods that automatically create buffered images in a format compatible with your configuration. You can also query the graphics configuration associated with the graphics device on which the window r esides to get the information you need to construct a compatible BufferedImage object.

5.3.2.2 Drawing in an Offscreen Buffer

To draw in a buffered image, you call its BufferedImage.createGraphics method, which returns a Graphics2D object. With this object, you can call all of the Graphics2D methods to draw graphics primitives, place text, and re nder other images in the image. This drawing technique supports dithering and other enhancements provided by the 2D imaging package. The following code illustrates the use of offscreen buffering:

    public void update(Graphics g){
        Graphics2D g2 = (Graphics2D)g;
        if(firstTime){
            Dimension dim = getSize();
            int w = dim.width;
            int h = dim.height;
            area = new Rectangle(dim);
            bi = (BufferedImage)createImage(w, h);
            big = bi.createGraphics();
            rect.setLocation(w/2-50, h/2-25);
            big.setStroke(new BasicStroke(8.0f));
            firstTime = false;
        }

        // Clears the rectangle that was previously drawn.
        big.setColor(Color.white);
        big.clearRect(0, 0, area.width, area.height);

        // Draws and fills the newly positioned rectangle to the buffer.
        big.setPaint(strokePolka);
        big.draw(rect);
        big.setPaint(fillPolka);
        big.fill(rect);

        // Draws the buffered image to the screen.
        g2.drawImage(bi, 0, 0, this);

    }

5.3.3 Manipulating BufferedImage Data Directly

In addition to drawing directly in a BufferedImage, you can directly access and manipulate the image's pixel data in a couple of ways. These are useful if you're implementing the BufferedImageOp filtering interface, as described in "Image Processing and Enhancement".

You can use the BufferedImage.setRGB methods to directly set the value of a pixel or a pixel array to a specific RGB value. Note that no dithering is performed when you modify pixels directly. You can also manipulate pixel data by manipulating a WritableRaster object associated with a BufferedImage (see"Managing and Manipulating Rasters").

5.3.4 Filtering a BufferedImage

You can apply a filtering operation to a BufferedImage using an object that implements BufferedImageOp interface. Filtering and the classes that provide this filtering interface are discussed in "Image Processing and Enhancement".

5.3.5 Rendering a BufferedImage

To render a buffered image into a specific context, call one of the drawImage method of the context's Graphics object. For example, when rendering within a Component.paint method, you call drawImage on the graphics object passed to the method.

    public void paint(Graphics g) {

        if (getSize().width <= 0 || getSize().height <= 0)
            return;

        Graphics2D g2 = (Graphics2D) g;

        if (offImg != null && isShowing())  {
            g2.drawImage(offImg, 0, 0, this);
        }
    }
1. It is up to the programmer to erase the previous version of the image before making a new copy at a new location. This can be done by redrawing the background or copying the background from another offscreen buffer.
CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.4 Managing and Manipulating Rasters

A BufferedImage object uses a Raster to manage its rectangular array of pixel data. The Raster class defines fields for the image's coordinate system--width, height, and origin. A Raster object itself uses two objects to manage the pixel data, a DataBuffer and a SampleModel. The DataBuffer is the object that stores pixel data for the raster (as described on page 81), and the SampleModel provides the interpretation of pixel data from the DataBuffer (as described on page 81).

5.4.1 Creating a Raster

In most cases, you don't need to create a Raster directly, since one is supplied with any BufferedImage that you create in memory. However, one of the BufferedImage constructor methods allows you to create a Raster by passing in a WritableRaster.

The Raster class provides a number of static factory methods for creating Rasters with the DataBuffers and SampleModels you specify. You can use these factories when implementing RasterOp filtering classes.

5.4.2 Parent and Child Rasters

The Raster class incorporates the concept of parent and child rasters. This can improve storage efficiency by allowing you to construct any number of buffered images from the same parent. The parent and its children all refer to the same data buffer, and each child has a specific offset and bounds to identify its image location in the buffer. A child identifies its ownership through its getParent method.

To create a subraster, you use the Raster.createSubRaster method.When you create a subraster, you identify the area of its parent that it covers and its offset from the parent's origin.

5.4.3 Operations on a Raster

The Raster class defines a number of ways to access pixels and pixel data. These are useful when you're implementing the RasterOp interface, which provides raster-level filtering and manipulation of image data, or when implementing any method that needs to perform low-level pixel manipulation.

The Raster.getPixel methods let you get an individual pixel, which is returned as individual samples in an array. The Raster.getDataElements methods return a specified run of uninterpreted image data from the DataBuffer. The Raster.getSample method returns samples of an individual pixel. The getSamples method returns a band for a particular region of an image.

In addition to these methods, you can also access the data buffer and the sample model through instance variables of the Raster class. These objects provide additional ways to access and interpret the Raster's pixel data.

5.4.4 The WritableRaster Subclass

The WritableRaster subclass provides methods for setting pixel data and samples. The Raster associated with a BufferedImage is actually a WritableRaster, thus providing full access to manipulate its pixel data.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.5 Image Data and DataBuffers

The DataBuffer belonging to a Raster represents an array of image data. When you create a Raster directly or through the BufferedImage constructors, you specify a width and height in pixels, along with a SampleModel for the image data. This information is used to create a DataBuffer of the appropriate data type and size.

There are three subclasses of DataBuffer, each representing a different type of data element:

  • DataBufferByte (represents 8-bit values)
  • DataBufferInt (represents 32-bit values)
  • DataBufferShort (represents 16-bit values)
  • DataBufferUShort (represents unsigned short values)
As defined earlier, elements are the discrete members of the array of the data buffer, and components or samples are the discrete values that together make up a pixel. There can be various mappings between a particular type of element in a DataBuffer and a particular type of pixel represented by a SampleModel. It is the responsibility of the various SampleModel subclasses to implement that mapping and provide a way to get specific pixels from a specific DataBuffer.

DataBuffer constructors provide ways to create buffers of a specific size and a specific number of banks.

While you can access image data in a DataBuffer directly, it's generally easier and more convenient to do so through the methods of the Raster and WritableRaster classes.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.6 Extracting Pixel Data from a SampleModel

The abstract SampleModel class defines methods for extracting samples of an image without knowing how the underlying data is stored. The class provides fields for tracking the height and width of the image data in the associated DataBuffer, and for describing the number of bands and the data type of that buffer. SampleModel methods provide image data as a collection of pixels, with each pixel consisting of a number of samples or components.

The java.awt.image package provides five types of sample models:

  • ComponentSampleModel--used to extract pixels from images that store sample data in separate data array elements in one bank of a DataBuffer.
  • BandedSampleModel--used to extract pixels from images that store each sample in a separate data element with bands stored in a sequence of data elements
  • PixelInterleavedSampleModel--used to extract pixels from images that store each sample in a separate data element with pixels stored in a sequence of data elements.
  • MultiPixelPackedSampleModel--used to extract pixels from single banded images that store multiple one-sample pixels in one data element.
  • SinglePixelPackedSampleModel--used to extract samples from images that store sample data for a single pixel in one data array element in the first bank of a DataBuffer.
Pixel data presented by the SampleModel may or may not correlate directly to a color data representation of a particular color model, depending on the data source. For example, in photographic image data, the samples may represent RGB data. In image data from a medical imaging device, samples can represent different types of data such as temperature or bone density.

There are three categories of methods for accessing image data. The getPixel methods return a whole pixel as an array, with one entry for each sample. The getDataElement methods provide access to the raw, uninterpreted data stored in the DataBuffer. The getSample methods provide access to pixel components for a specific band.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.7 ColorModels and Color Data

In addition to the Raster object for managing image data, the BufferedImage class includes a ColorModel for interpreting that data as color pixel values. The abstract ColorModel class defines methods for turning an image's pixel data into a color value in its associated ColorSpace.

The java.awt.image package provides four types of color models:

  • PackedColorModel--An abstract ColorModel that represents pixel values that have color components embedded directly in the bits of an integer pixel. A DirectColorModel is a subclass of PackedColorModel.
  • DirectColorModel--a ColorModel that represents pixel values that have RGB color components embedded directly in the bits of the pixel itself. DirectColorModel model is similar to an X11 TrueColor visual.
  • ComponentColorModel--a ColorModel that can handle an arbitrary ColorSpace and an array of color components to match the ColorSpace.
  • IndexColorModel--a ColorModel that represents pixel values that are indices into a fixed color map in the sRGB color space.
ComponentColorModel and PackedColorModel are new in the JavaTM 2 SDK software release.

Based on data in the DataBuffer, the SampleModel provides the ColorModel with a pixel, which the ColorModel then interprets as a color.

5.7.1 Lookup Table

A lookup table contains data for one or more channels or image components; for example, separate arrays for R, G, and B. The java.awt.image package defines two types of lookup tables that extend the abstract LookupTable class, one that contains byte data and one that contains short data (ByteLookupTable and ShortLookupData).

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 -

CONTENTS | PREV | NEXT Java 2D API

5.8 Image Processing and Enhancement

The image package provides a pair of interfaces that define operations on BufferedImage and Raster objects: BufferedImageOp and RasterOp.

The classes that implement these interfaces include AffineTransformOp, BandCombineOp, ColorConvertOp, ConvolveOp, LookupOp, RescaleOp. These classes can be used to geometrically transform, blur, sharpen, enhance contrast, threshold, and color correct images.

Figure 5-4 illustrates edge detection and enhancement, an operation that emphasizes sharp changes in intensity within an image. Edge detection is commonly used in medical imaging and mapping applications. Edge d etection is used to increase the contrast between adjacent structures in an image, allowing the viewer to discriminate greater detail.

Figure 5-4 Edge detection and enhancement

The following code illustrates edge detection:

    float[] elements = { 0.0f, -1.0f, 0.0f,
                    -1.0f, 4.f, -1.0f,
                    0.0f, -1.0f, 0.0f};
    ...

    BufferedImage bimg = new
    BufferedImage(bw,bh,BufferedImage.TYPE_INT_RGB);
    Kernel kernel = new Kernel(3, 3, elements);
    ConvolveOp cop = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP,
                                null);
    cop.filter(bi,bimg);
Figure 5-5 demonstrates lookup table manipulation. A lookup operation can be used to alter individual components of a pixel.

Figure 5-5 Lookup-table Manipulation

The following code demonstrates Lookup-table manipulation:

    byte reverse[] = new byte[256];
       for (int j=0; j<200; j++){
               reverse[j]=(byte)(256-j);
    }
       ByteLookupTable blut=new ByteLookupTable(0, reverse);
       LookupOp lop = new LookupOp(blut, null);
       lop.filter(bi,bimg);
Figure 5-6 illustrates rescaling. Rescaling can increase or decrease the intensity of all points. Rescaling can be used to increase the dynamic range of an otherwise neutral image, bringing out detail in a regio n that appears neutral or flat.

Figure 5-6 Rescaling

The following code snippet illustrates rescaling:

    RescaleOp rop = new RescaleOp(1.5f, 1.0f, null);
    rop.filter(bi,bimg);

5.8.1 Using an Image Processing Operation

Convolution is the process that underlies most spatial filtering algorithms. Convolution is the process of weighting or averaging the value of each pixel in an image with the values of neighboring pixels.This allows each output pixel to be affected by the immediate neighborhood in a way that can be mathematically specified with a kernel. Figure 5-7 illustrates Convolution.

Figure 5-7 Blurring with Convolution

The following code fragment illustrates how to use one of the image processing classes, ConvolveOp. In this example, each pixel in the source image is averaged equally with the eight pixels that surround it.

    float weight = 1.0f/9.0f;
    float[] elements = new float[9]; // create 2D array

    // fill the array with nine equal elements
    for (i = 0; i < 9; i++) {
          elements[i] = weight;
    }
    // use the array of elements as argument to create a Kernel
    private Kernel myKernel = new Kernel(3, 3, elements);
    public ConvolveOp simpleBlur = new ConvolveOp(myKernel);

    // sourceImage and destImage are instances of BufferedImage
    simpleBlur.filter(sourceImage, destImage) // blur the image
The variable simpleBlur contains a new instance of ConvolveOp that implements a blur operation on a BufferedImage or a Raster. Suppose that sourceImage and destImage are two instances of BufferedImage. When you call filter, the core method of the ConvolveOp class, it sets the value of each pixel in the destination image by averaging the corresponding pixel in the source image with the eight pixels that surround it.

The convolution kernel in this example could be represented by the following matrix, with elements specified to four significant figures:

When an image is convolved, the value of each pixel in the destination image is calculated by using the kernel as a set of weights to average the pixel's value with the values of surrounding pixels. This operation is performed on each channel of the i mage.

The following formula shows how the weights in the kernel are associated with the pixels in the source image when the convolution is performed. Each value in the kernel is tied to a spatial position in the image.

The value of a destination pixel is the sum of the products of the weights in the kernel multiplied by the value of the corresponding source pixel. For many simple operations, the kernel is a matrix that is square and symmetric, and the sum of its weights adds up to one.1

The convolution kernel in this example is relatively simple. It weights each pixel from the source image equally. By choosing a kernel that weights the source image at a higher or lower level, a program can increase or decrease the intensity of the destin ation image. The Kernel object, which is set in the ConvolveOp constructor, determines the type of filtering that is performed. By setting other values, you can perform other types of convolutions, including blurring (such as Gaussia n blur, radial blur, and motion blur), sharpening, and smoothing operations. Figure 5-8 illustrates sharpening using Convolution.

Figure 5-8 Sharpening with Convolution

The following code snippet illustrates sharpening with Convolution:

    float[] elements = { 0.0f, -1.0f, 0.0f,
                    -1.0f,  5.f, -1.0f,
                     0.0f, -1.0f,  0.0f};
    ...

    Kernel kernel = new Kernel(3,3,elements);
    ConvolveOp cop = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP, null);
    cop.filter(bi,bimg);

1. If the sum of the weights in the matrix is one, the intensity of the destination image is unchanged from the source.
CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 1

Java 2DTM API Overview

The Java 2DTM API enhances the graphics, text, and imaging capabilities of the Abstract Windowing Toolkit (AWT), enabling the development of richer user interfaces and new types of JavaTM applications.

Along with these richer graphics, font, and image APIs, the Java 2D API supports enhanced color definition and composition, hit detection on arbitrary geometric shapes and text, and a uniform rendering model for printers and display devices.

The Java 2D API also enables the creation of advanced graphics libraries, such as CAD-CAM libraries and graphics or imaging special effects libraries, as well as the creation of image and graphic file read/write filters.

When used in conjunction with the Java Media Framework and other Java Media APIs, the Java 2D APIs can be used to create and display animations and other multimedia presentations. The Java Animation and Java Media Framework APIs rely on the Java 2D API fo r rendering support.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 -

CONTENTS | PREV | NEXT Java 2D API

1.1 Enhanced Graphics, Text, and Imaging

Early versions of the AWT provided a simple rendering package suitable for rendering common HTML pages, but not full-featured enough for complex graphics, text, or imaging. As a simplified rendering package, the early AWT embodied specific cases of more general rendering concepts. The Java 2DTM API provides a more flexible, full-featured rendering package by expanding the AWT to support more general graphics and rendering operations.

For example, through the Graphics class you can draw rectangles, ovals, and polygons. Graphics2D enhances the concept of geometric rendering by providing a mechanism for rendering virtually any geometric shape. Similarly, with the Java 2D API you can draw styled lines of any width and fill geometric shapes with virtually any texture.

Geometric shapes are provided through implementations of the Shape interface, for example Rectangle2D and Ellipse2D. Curves and arcs are also specific implementations of Shape.

Fill and pen styles are provided through implementations of the Paint and Stroke interfaces, for example BasicStroke, GradientPaint, TexturePaint, and Color.

AffineTransform defines linear transformations of 2D coordinates, including scale, translate, rotate, and shear.

Clip regions are defined by the same implementations of the Shape interface that are used to define general clipping regions, for example Rectangle2D and GeneralPath.

Color composition is provided by implementations of the Composite interface, for example AlphaComposite.

A Font is defined by collections of Glyphs, which are in turn defined by individual Shapes.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 -

CONTENTS | PREV | NEXT Java 2D API

1.2 Rendering Model

The basic graphics rendering model has not changed with the addition of the Java 2DTM APIs. To render a graphic, you set up the graphics context and invoke a rendering method on the Graphics object.

The Java 2D API class Graphics2D extends Graphics to support more graphics attributes and provide new rendering methods. Setting up a Graphics2D context is described in "Rendering with Graphics2D".

The Java 2D API automatically compensates for differences in rendering devices and provides a uniform rendering model across different types of devices. At the application level, the rendering process is the same whether the target rendering device is a d isplay or a printer.

With the JavaTM 2 SDK, version 1.3 relsease, the Java 2D API provides support for multi-screen environments. See Section 1.2.1, "Coordinate Systems" and "Rendering in a Multi-Screen Environment" for more information.

1.2.1 Coordinate Systems

The Java 2D API maintains two coordinate systems:

  • User space is a device-independent, logical coordinate system. Applications use this coordinate system exclusively; all geometries passed into Java 2D rendering routines are specified in user space.
  • Device space is a device-dependent coordinate system that varies according to the target rendering device. In a multi-screen environment with a virtual desktop where a window can span more than one physical screen device, the device coordinate sy stem that's used is the coordinate system of the virtual desktop that encompasses all of the screens. For more information on how the Java 2DTM API supports multi-screen environments, see "Rendering in a Multi-Screen Environment".
The Java 2D system automatically performs the necessary conversions between user space and the device space of the target rendering device. Although the coordinate system for a monitor is very different from the coordinate system for a printer, these diff erences are invisible to applications.

1.2.1.1 User Space

As shown in Figure 1-1, the user space origin is located in the upper-left corner of the space, with x values increasing to the right and y values increasing downward.

Figure 1-1 User Space Coordinate System

User space represents a uniform abstraction of all possible device coordinate systems. The device space for a particular device might have the same origin and direction as user space, or it might be different. Regardless, user space coordinates are automa tically transformed into the appropriate device space when a graphic object is rendered. Often, the underlying platform device drivers are used to perform this conversion.

1.2.1.2 Device Space

The Java 2D API defines three levels of configuration information that are maintained to support the conversion from user space to device space. This information is encapsulated by three classes:

  • GraphicsEnvironment
  • GraphicsDevice
  • GraphicsConfiguration
Between them, the GraphicsEnvironment, GraphicsDevice, and GraphicsConfiguration represent all of the information necessary for locating a rendering device or font on the Java platform and for converting coordinates from u ser space to device space. An application can access this information, but does not need to perform any transformations between user space and device space.

The GraphicsEnvironment describes the collection of rendering devices visible to a Java application on a particular platform. Rendering devices include screens, printers, and image buffers. The GraphicsEnvironment also includes a lis t of all of the available fonts on the platform.

A GraphicsDevice describes an application-visible rendering device, such as a screen or printer. Each possible configuration of the device is represented by a GraphicsConfiguration. For example, an SVGA display device can operate in several modes: 640x480x16 colors, 640x480x256 colors, and 800x600x256 colors. The SVGA screen is represented by a GraphicsDevice object and each of the modes is represented by a GraphicsConfiguration object.

A GraphicsEnvironment can contain one or more GraphicsDevices; in turn, each GraphicsDevice can have one or more GraphicsConfigurations.

1.2.2 Transforms

The Java 2D API has a unified coordinate transformation model. All coordinate transformations, including transformations from user to device space, are represented by AffineTransform objects. AffineTransform defines the rules for man ipulating coordinates using matrices.

You can add an AffineTransform to the graphics context to rotate, scale, translate, or shear a geometric shape, text, or image when it is rendered. The added transform is applied to any graphic object rendered in that context. The transform is performed when user space coordinates are converted to device space coordinates.

1.2.3 Fonts

A string is commonly thought of in terms of the characters that comprise the string. When a string is drawn, its appearance is determined by the font that is selected. However, the shapes that the font uses to display the string don't always correspon d to individual characters. For example, in professional publishing, certain combinations of two or more characters are often replaced by a single shape called a ligature.

The shapes that a font uses to represent the characters in the string are called glyphs. A font might represent a character such as a lowercase a acute using multiple glyphs, or represent certain character combinations such as the fi in final with a single glyph. In the Java 2D API, a glyph is simply a Shape that can be manipulated and rendered in the same way as any other Shape.

A font can be thought of as a collection of glyphs. A single font might have many versions, such as heavy, medium, oblique, gothic, and regular. These different versions are called faces. All of the faces in a font have a similar typogra phic design and can be recognized as members of the same family. In other words, a collection of glyphs with a particular style forms a font face, a collection of font faces forms a font family, and a collection of font families forms the set of fonts available within a particular GraphicsEnvironment.

In the Java 2D API, fonts are specified by a name that describes a particular font face--for example, Helvetica Bold. This is different from the JDK 1.1 software, in which fonts are described by logical names that map onto different font faces dep ending on which font faces are available on a particular platform. For backward compatibility, the Java 2D API supports the specification of fonts by logical name as well as by font face name.

Using the Java 2D API, you can compose and render strings that contain multiple fonts of different families, faces, sizes, and even languages. The appearance of the text is kept logically separate from the layout of the text. Font objects are u sed to describe the appearance, and the layout information is stored in TextLayout and TextAttributeSet objects. Keeping the font and layout information separate makes it easier to use the same fonts in different layout configuration s.

1.2.4 Images

Images are collections of pixels organized spatially. A pixel defines the appearance of an image at a single display location. A two-dimensional array of pixels is called a raster.

The pixel's appearance can be defined directly or as an index into a color table for the image.

In images that contain many colors (more than 256), the pixels usually directly represent the color, alpha, and other display characteristics for each screen location. Such images tend to be much larger than indexed-color images, but they look more realis tic.

In an indexed-color image, the colors in the image are limited to the colors specified in the color table, often resulting in fewer colors that can be used in the image. However, an index typically requires less storage space than a color value, so images stored as a set of indexed colors are usually smaller. This pixel format is popular for images that contain only 16 or 256 colors.

Images in the Java 2D API have two primary components:

  • The raw image data (the pixels)
  • The information necessary for interpreting the pixels
The rules for interpreting the pixel are encapsulated by a ColorModel object--for example, whether the values should be interpreted as direct or indexed colors. For a pixel to be displayed, it must be paired with a color model.

A band is one component of the color space for an image. For example, the Red, Green, and Blue components are the bands in an RGB image. A pixel in a direct color model image can be thought of as a collection of band values for a single screen location.

The java.awt.image package contains several ColorModel implementations, including those for packed and component pixel representations.

A ColorSpace object encapsulates the rules that govern how a set of numeric measurements corresponds to a particular color. The ColorSpace implementations in the java.awt.color represent the most popular color spaces, incl uding RGB and gray scale. Note that a color space is not a collection of colors--it defines the rules for how to interpret individual color values.

Separating the color space from the color model provides greater flexibility in how colors are represented and converted from one color representation to another.

1.2.5 Fills and Strokes

With the Java 2D API, you can render Shapes using different pen styles and fill patterns. Because text is ultimately represented by a set of glyphs, text strings can also be stroked and filled.

Pen styles are defined by objects that implement the Stroke interface. Strokes enable you to specify different widths and dashing patterns for lines and curves.

Fill patterns are defined by objects that implement the Paint interface. The Color class, which was available in earlier versions of the AWT, is a simple type of Paint object used to define solid-color fills. The Java 2D A PI provides two additional Paint implementations, TexturePaint and GradientPaint. TexturePaint defines a fill pattern using a simple image fragment that is repeated uniformly. GradientPaint defines a fill pattern as a gradient between two colors.

In Java 2D, rendering a shape's outline and filling the shape with a pattern are two separate operations:

  • Using one of the draw methods renders the shape's contour or outline using the pen style specified by the Stroke attribute and the fill pattern specified by the Paint attribute.
  • Using the fill method fills the interior of the shape with the pattern specified by the Paint attribute.
When a text string is rendered, the current Paint attribute is applied to the glyphs that form the string. Note, however, that drawString actually fills the glyphs that are rendered. To stroke the outlines of the glyphs in a text str ing, you need to get the outlines and render them as shapes using the draw method.

1.2.6 Composites

When you render an object that overlaps an existing object, you need to determine how to combine the colors of the new object with the colors that already occupy the area where you are going to draw. The Java 2D API encapsulates rules for how to combine c olors in a Composite object.

Primitive rendering systems provide only basic Boolean operators for combining colors. For example, a Boolean compositing rule might allow the source and destination color values to be ANDed, ORed, or XORed. There are several problems with this approach

  • It's not "human friendly"--it's difficult to think in terms of what the resulting color will be if red and blue are ANDed, not added.
  • Boolean composition does not support the accurate composition of colors in different color spaces.
  • Straight Boolean composition doesn't take into account the color models of the colors. For example, in an indexed color model, the result of a Boolean operation on two pixel values in an image is the composite of two indices, not two colors.
The Java 2D API avoids these pitfalls by implementing alpha-blending1 rules that take color model information into account when compositing colors. An AlphaComposite object includes the color model of both the source and destination colors.

1. For detailed information about alpha blending, see Section 17.6 of Computer Graphics: Principles and Practice. 2nd ed. J.D. Foley, A. van Dam, S.K. Feiner, J.F. Hughes. Addison-Wesley, 1990.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 -

CONTENTS | PREV | NEXT Java 2D API

1.3 Backward Compatibility and Platform Independence

The Java 2DTM API maintains backward compatibility with JDK 1.1 software. It is also architected so that applications can maintain platform-independence.

1.3.1 Backward Compatibility

To ensure backward compatibility, the functionality of existing JDK graphics and imaging classes and interfaces was maintained. Existing features were not removed and no package designations were changed for existing classes. The Java 2D API enhances the functionality of the AWT by implementing new methods in existing classes, extending existing classes, and adding new classes and interfaces that don't affect the legacy APIs.

For example, much of the Java 2D API functionality is delivered through an expanded graphics context, Graphics2D. To provide this extended graphics context while maintaining backward compatibility, Graphics2D extends the Graphic s class from the JDK 1.1 release.

The usage model of the graphics context remains unchanged. The AWT passes a graphics context to an AWT Component through the following methods:

  • paint
  • paintAll
  • update
  • print
  • printAll
  • getGraphics
A JDK 1.1 applet interprets the graphics context that's passed in as an instance of Graphics. To gain access to the new features implemented in Graphics2D, a Java 2D API-compatible applet casts the graphics context to a Graphics2D object:

    public void paint (Graphics g) {

       Graphics2D g2 = (Graphics2D) g;
       ...
       ...
      g2.setTransform (t);
    }
In some cases, rather than extending a legacy class, the Java 2D API generalizes it. Two techniques were used to generalize legacy classes:

  • One or more parent classes were inserted in the hierarchy, and the legacy class was updated to extend the new parent classes. This technique is used to add general implemented methods and instance data to the legacy class.
  • One or more interface implementations were added to the legacy class. This technique is used to add general abstract methods to the legacy class.
For example, the Java 2D API generalizes the AWT Rectangle class using both of these techniques. The hierarchy for rectangle now looks like:

    java.lang.Object
    |
    +-------java.awt.geom.RectangularShape
                 |
                 +---------java.awt.geom.Rectangle2D
                          |
                          +-------java.awt.Rectangle
In the JDK 1.1 software, Rectangle simply extended Object. It now extends the new Rectangle2D class and implements both Shape and Serializable. Two parent classes were added to the Rectangle hierarchy: RectangularShape and Rectangle2D. Applets written for JDK 1.1 software are unaware of the new parent classes and interface implementations, but are unaffected because Rectangle still contains the methods and m embers that were present in earlier versions.

The Java 2D API adds several new classes and interfaces that are "orthogonal" to the legacy API. These additions do not extend or generalize existing classes--they are entirely new and distinct. These new classes and interfaces embody conc epts that had no explicit representation in the legacy API.

For example, the Java 2D API implements several new Shape classes, including Arc2D, CubicCurve2D, and QuadCurve2D. Although early versions of the AWT could render arcs using the drawArc and fillA rc methods, there was no general curve abstraction and no discrete classes that embodied arcs. These discrete classes could be added to the Java 2D API without disrupting legacy applets because drawArc and fillArc are still sup ported through the Graphics class.

1.3.2 Platform Independence

To enable the development of platform-independent applications, the Java 2D API makes no assumptions about the resolution, color space, or color model of the target rendering device. Nor does the Java 2D API assume any particular image file format.

Truly platform-independent fonts are possible only when the fonts are built-in (provided as part of the JDK software), or when they are mathematically or programmatically generated. The Java 2D API does not currently support built-in or mathematically gen erated fonts, but it does enable the programmatic definition of entire fonts through their glyph set. Each glyph can in turn be defined by a Shape that consists of line segments and curves. Many fonts of particular styles and sizes can be deriv ed from a single glyph set.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 -

CONTENTS | PREV | NEXT Java 2D API

1.4 The Java 2DTM API Packages

The Java 2D API classes are organized into the following packages:

  • java.awt
  • java.awt.geom
  • java.awt.font
  • java.awt.color
  • java.awt.image
  • java.awt.image.renderable
  • java.awt.print
Package java.awt contains those Java 2D API classes and interfaces that are general in nature or that enhance legacy classes. (Obviously, not all of the classes in java.awt are Java 2D classes.)

AlphaComposite

BasicStroke

Color

Composite

CompositeContext

Font

GradientPaint

Graphics2D

GraphicsConfiguration

GraphicsDevice

GraphicsEnvironment

Paint

PaintContext

Rectangle

Shape

Stroke

TexturePaint

Transparency

Package java.awt.geom contains classes and interfaces related to the definition of geometric primitives:

AffineTransform

Arc2D

Arc2D.Double

Arc2D.Float

Area

CubicCurve2D

CubicCurve2D.Double

CubicCurve2D.Float

Dimension2D

Ellipse2D

Ellipse2D.Double

Ellipse2D.Float

FlatteningPathIterator

GeneralPath

Line2D

Line2D.Double

Line2D.Float

PathIterator

Point2D

Point2D.Double

Point2D.Float

QuadCurve2D

QuadCurve2D.Double

QuadCurve2D.Float

Rectangle2D

Rectangle2D.Double

Rectangle2D.Float

RectangularShape

RoundRectangle2D

RoundRectangle2D.Double

RoundRectangle2D.Float

Many of the geometric primitives have corresponding .Float and .Double implementations. This was done to enable both floating single- and double-precision implementations. Double-precision implementations provide greater rendering precision at the expense of performance on some platforms.

Package java.awt.font contains classes and interfaces used for text layout and the definition of fonts:

FontRenderContext

GlyphJustificationInfo

GlyphMetrics

GlyphVector

GraphicAttribute

ImageGraphicAttribute

LineBreakMeasurer

LineMetrics

MultipleMaster

OpenType

ShapeGrapicAttribute

TextAttribute

TextHitInfo

TextLayout

TransformAttribute

Packagejava.awt.color contains classes and interfaces for the definition of color spaces and color profiles:

ColorSpace

ICC_ColorSpace

ICC_Profile

ICC_ProfileGray

ICC_ProfileRGB

The java.awt.image and java.awt.image.renderable packages contain classes and interfaces for the definition and rendering of images:

AffineTransformOp

BandCombineOp

BandedSampleModel

BufferedImage

BufferedImageFilter

BufferedImageOp

ByteLookupTable

ColorConvertOp

ColorModel

ComponentColorModel

ComponentSampleModel

ConvolveOp

ContextualRenderedImageFactory

DataBuffer

DataBufferByte

DataBufferInt

DataBufferShort

DataBufferUShort

DirectColorModel

IndexColorModel

Kernel

LookupOp

LookupTable

MultiPixelPackedSampleModel

PackedColorModel

ParameterBlock

PixelInterleavedSampleModel

Raster

RasterOp

RenderableImage

RenderableImageOp

RenderableImageProducer

RenderContext

RenderedImageFactory

RenderedImage

RescaleOp

SampleModel

ShortLookupTable

SinglePixelPackedSampleModel

TileObserver

WritableRaster

WritableRenderedImage

Package java.awt.image was present in earlier versions of the AWT. The Java 2D API enhances the following legacy AWT image classes:

  • ColorModel
  • DirectColorModel
  • IndexColorModel
These color model classes remain in the java.awt.image package for backward compatibility. To maintain consistency, the new color model classes are also located in the java.awt.image package.

Package java.awt.print contains classes and interfaces that enable printing of all Java 2D-based text, graphics, and images.

Book

Pageable

PageFormat

Paper

Printable

PrinterGraphics

PrinterJob

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Java 2D API

This guide describes the features provided by the Java 2DTM API and illustrates how you can use the Java 2D API classes to enhance your applications. For additional information about the Java 2D APIs, see:

  • The Java Tutorial, 2nd Volume. Available online at: http://java.sun.com/docs/books/tutorial/2d/index.html
  • The 2D Text Tutorial. Available online from the Java Developer Connection:http://developer.java.sun.com/developer/onlineTraining/Graphics/2DText/
  • The Java 2D Sample Programs. Available online at: http://java.sun.com/products/java-media/2D/samples/index.html
  • The Java 2D Demo. Available from the Java 2D website:http://java.sun.com/products/java-media/2D/index.html
This information in this guide is organized into seven chapters:

Overview --introduces the packages and key classes in the Java 2D API.
Rendering with Graphics2D--describes the Java 2D API classes in the java.awt package and how to set up the Graphics2D rendering context.
Geometries--describes the Java 2D API classes in the java.awt.geom package and how to define and manipulate 2D shapes and areas.
Fonts and Text Layout--describes the Java 2D API classes in the java.awt.font package, how to specify and retrieve font information, and how to display and manipulate international text using the Java 2D text layout APIs directly.
Imaging--describes the Java 2D API classes in the java.awt.image, java.awt.image.codec, and java.awt.image.renderable packages and how to display and manipulate images and offscreen buffers.
Color--describes the Java 2D API classes in the java.awt.color package and color management.
Printing--describes the Java 2D API classes in the java.awt.print package and the Java 2D API printing model.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 -

CONTENTS | PREV | NEXT Java 2D API

CHAPTER 7

Printing

The Java Printing API enables applications to:

  • Print all AWT and Java 2DTM graphics, including composited graphics and images.
  • Control document-composition functions such as soft collating, reverse order printing, and booklet printing.
  • Invoke printer-specific functions such as duplex (two-sided) printing and stapling.
  • Print on all platforms, including Windows and Solaris. This includes printers directly attached to the computer as well as those that the platform software is able to access using network printing protocols.
Not all of these features are supported in the JavaTM 2 SDK Printing API and implementation. The API will be extended to support all of these features in future releases. For example, additional printer controls will be added by augmenting the set of named properties of a print job that the application can control.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 -

CONTENTS | PREV | NEXT Java 2D API

7.1 Interfaces and Classes

Interface
Description

Printable

The Printable interface is implemented by each page painter, the application class(es) called by the printing system to render a page. The system calls the page painter's print method to request that a page be rendered.

Pageable

The Pageable interface is implemented by a document that is to be printed by the printing system. Through the Pageable methods, the system can determine the number of pages in the document, the format to use for each page, and the page painter to use to render each page.

PrinterGraphics

The Graphics2D objects that a page painter uses to render a page implement the PrinterGraphics interface. This enables an application to get the PrinterJob object that is controlling the printing.

Class
Description

Book

Implements: Pageable

Represents a document in which pages can have different page formats and page painters. This class uses the Pageable interface to interact with a PrinterJob.

PageFormat

Describes the size and orientation of a page to be printed, as well as the Paper used to print it. For example, portrait and landscape paper orientations are represented by PageFormat.

Paper

Describes the physical characteristics of a piece of paper.

PrinterJob

The principal class that controls printing. The application calls PrinterJob methods to set up a job, display a print dialog to the user (optional), and to print the pages in the job.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 -

CONTENTS | PREV | NEXT Java 2D API

7.2 Printing Concepts

The Java Printing API is based on a callback printing model in which the printing system, not the application, controls when pages are printed. The application provides information about the document to be printed and the printing system asks the application to render each page as it needs them.

The printing system might request that a particular page be rendered more than once or request that pages be rendered out of order. The application must be able to generate the proper page image, no matter which page the printing system requests. In this respect, the printing system is similar to the window toolkit, which can request components to repaint at any time, in any order.

The callback printing model is more flexible than traditional application-driven printing models and supports printing on a wider range of systems and printers. For example, if a printer stacks output pages in reverse order, the printing system can ask th e application to generate pages in reverse order so that the final stack is in proper reading order.

This model also enables applications to print to a bitmap printer from computers that don't have enough memory or disk space to buffer a full-page bitmap. In this situation, a page is printed as a series of small bitmaps or bands. For example , if only enough memory to buffer one tenth of a page is available, the page is divided into ten bands. The printing system asks the application to render each page ten times, once to fill each band. The application does not need to be aware of the number or size of the bands; it simply must be able to render each page when requested.

7.2.1 Supporting Printing

An application has to perform two tasks to support printing:

  • Job control--initiating and managing the print job.
  • Imaging--rendering each page when the printing system requests it.

7.2.1.1 Job Control

The user often initiates printing by clicking a button or selecting a menu item in an application. When a print operation is triggered by the user, the application creates a PrinterJob object and uses it to manage the printing process.

The application is responsible for setting up the print job, displaying print dialogs to the user, and starting the printing process.

7.2.1.2 Imaging

When a document is printed, the application has to render each page when the printing system requests it. To support this mechanism, the application provides a page painter that implements the Printable interface. When the printing sys tem needs a page rendered, it calls the page painter's print method.

When a page painter's print method is called, it is passed a Graphics context to use to render the page image. It is also passed a PageFormat object that specifies the geometric layout of the page, and an integer p age index that identifies the ordinal position of the page in the print job.

The printing system supports both Graphics and Graphics2D rendering. To print Java 2DTM Shapes, Text, and Images, you cast the Graphics object passed into the print me thod to a Graphics2D.

To print documents in which the pages use different page painters and have different formats, you use a pageable job. To create a pageable job, you can use the Book class or your own implementation of the Pageable interface. To implement simple printing operations, you do not need to use a pageable print job; Printable can be used as long as all of the pages share the same page format and painter.

7.2.2 Page Painters

The principal job of a page painter is to render a page using the graphics context that is provided by the printing system. A page painter implements the Printable.print method:

public int print(Graphics g, PageFormat pf, int pageIndex)

The graphics context passed to the print method is either an instance of Graphics or Graphics2D, depending on the packages loaded in your Java Virtual Machine. To use Graphics2D features, you can cast the G raphics object to a Graphics2D. The Graphics instance passed to print also implements the PrinterGraphics interface.

The PageFormat passed to a Printable describes the geometry of the page being printed. The coordinate system of the graphics context passed to print is fixed to the page: the origin of the coordinate system is at the upper left corner of the paper, X increases to the right, Y increases downward, and the units are 1/72 inch. If the page is in portrait orientation, the x-axis aligns with the paper's "width," while the y-axis aligns with the pape r's "height." (Normally, but not always, a paper's height exceeds its width.) If the page is in landscape orientation, the roles are reversed: the x-axis aligns with the paper's "height" and the y-axis with its "width."

Because many printers cannot print on the entire paper surface, the PageFormat specifies the imageable area of the page: this is the portion of the page in which it's safe to render. The specification of the imageable area does not alter the coordinate system; it is provided so that the contents of the page can be rendered so that they don't extend into the area where the printer can't print.

The graphics context passed to print has a clip region that describes the portion of the imageable area that should be drawn. It is always safe to draw the entire page into the context; the printing system will handle the necessary clipping. Ho wever, to eliminate the overhead of drawing portions of the page that won't be printed, you can use the clipping region to limit the areas that you render. To get the clipping region from the graphics context, call Graphics.getClip. You are strongly encouraged to use the clip region to reduce the rendering overhead.

It is sometimes desirable to launch the entire printing operation "in the background" so that a user can continue to interact with the application while pages are being rendered. To do this, call PrinterJob.print in a separate thread.

If possible, you should avoid graphics operations that require knowledge of the previous image contents, such as copyArea, setXOR, and compositing. These operations can slow rendering and the results might be inconsistent.

7.2.3 Printable Jobs and Pageable Jobs

A Printable job provides the simplest way to print. Only one page painter is used; the application provides a single class that implements the Printable interface. When it's time to print, the printing system calls the page paint er's print method to render each page. The pages are requested in order, starting with page index 0. However, the page painter might be asked to render each page several times before it advances to the next page. When the last page has been printed, the page painter's print method returns NO_SUCH_PAGE.

In a Printable job:

  • All pages use the same page painter and PageFormat. If a print dialog is presented, it will not display the number of pages in the document because that information is not available to the printing system.
  • The printing system always asks the page painter to print each page in indexed order, starting with the page at index 0. No pages are skipped. For example, if a user asks to print pages 2 and 3 of a document, the page painter will be called with indices 0 , 1, and 2. The printing system might request that a page be rendered multiple times before moving to the next page.
  • The page painter informs the printing system when the end of the document has been reached.
  • All page painters are called in the same thread.
  • Some printing systems might not be able to achieve the ideal output. For example, the stack of pages emerging from the printer might be in the wrong order, or the pages might not be collated if multiple copies are requested.
A Pageable job is more flexible than a Printable job. Unlike the pages in a Printable job, pages in a Pageable job can differ in layout and implementation. To manage a Pageable job, you can use the Book class or implement your own Pageable class. Through the Pageable, the printing system can determine the number of pages to print, the page painter to use for each page, and the PageFormat to use for each page . Applications that need to print documents that have a planned structure and format should use Pageable jobs.

In a Pageable job:

  • Different pages can use different page painters and PageFormats.
  • The printing system can ask page painters to print pages in an arbitrary order and some pages might be skipped. For example, if a user asks to print pages 2 and 3 of a document, the page painter will be called with indices 1 and 2 and page index 0 will be skipped.
  • Pageable jobs do not need to know in advance how many pages are in the document. However, unlike Printable jobs, they must be able to render pages in any order. There might be gaps in the sequencing and the printing system might requ est that a page be rendered multiple times before moving to the next page. For example, a request to print pages 2 and 3 of a document might result in a sequence of calls that request pages with indices 2,2,1,1, and 1.

7.2.4 Typical Life-Cycle of a PrinterJob

An application steers the PrinterJob object through a sequence of steps to complete a printing job. The simplest sequence used by an application is:

  1. Get a new PrinterJob object by calling PrinterJob.getPrinterJob.
  1. Determine what PageFormat to use for printing. A default PageFormat can be obtained by calling defaultPage or you can invoke pageDialog to present a dialog box that allows the user to specify a format.
  2. Specify the characteristics of the job to be printed to the PrinterJob. For a Printable job, call setPrintable; for a Pageable job, call setPageable. Note that a Book object is ideal for pa ssing to setPageable.
  3. Specify additional print job properties, such as the number of copies to print or the name of the job to print on the banner page.
  4. Call printDialog to present a dialog box to the user. This is optional. The contents and appearance of this dialog can vary across different platforms and printers. On most platforms, the user can use this dialog to change the printer selection . If the user cancels the print job, the printDialog method returns FALSE.
  5. Call Printerjob.print to print the job. This method in turn calls print on the appropriate page painters.
A job can be interrupted during printing if:

  • A PrinterException is thrown--the exception is caught by the print method and the job is halted. A page painter throws a PrinterException if it detects a fatal error.
  • PrinterJob.cancel is called--the printing loop is terminated and the job is canceled. The cancel method can be called from a separate thread that displays a dialog box and allows the user to cancel printing by clicking a but ton in the box.
Pages generated before a print job is stopped might or might not be printed.

The print job is usually not finished when the print method returns. Work is typically still being done by a printer driver, print server, or the printer itself. The state of the PrinterJob object might not reflect the state of the a ctual job being printed.

Because the state of a PrinterJob changes during its life cycle, it is illegal to invoke certain methods at certain times. For example, calling setPageable after you've called print makes no sense. When illegal calls a re detected, the PrinterJob throws a java.lang.IllegalStateException.

7.2.5 Dialogs

The Java Printing API requires that applications invoke user-interface dialogs explicitly. These dialogs might be provided by the platform software (such as Windows) or by a JavaTM 2 SDK software implementation. For interactive applications, it is customary to use such dialogs. For production printing applications, however, dialogs are not necessary. For example, you wouldn't want to display a dialog when automatically generating and printing a nightly database report. A print job that requ ires no user interaction is sometimes called a silent print job.

7.2.5.1 Page setup dialog

You can allow the user to alter the page setup information contained in a PageFormat by displaying a page setup dialog. To display the page setup dialog, you call PrinterJob.pageDialog. The page setup dialog is initialized using the parameter passed to pageDialog. If the user clicks the OK button in the dialog, the PageFormat instance is cloned, altered to reflect the user's selections, and then returned. If the user cancels the dialog, pageDialog returns the original unaltered PageFormat.

7.2.5.2 Print dialog

Typically, an application presents a print dialog to the user when a print menu item or button is activated. To display this print dialog, you call the PrinterJob's printDialog method. The user's choices in the dialog are constrained ba sed on the number and format of the pages in the Printable or Pageable that have been furnished to the PrinterJob. If the user clicks OK in the print dialog, printDialog returns TRUE. If the user canc els the print dialog, FALSE is returned and the print job should be considered abandoned.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 -

CONTENTS | PREV | NEXT Java 2D API

7.3 Printing with Printables

To provide basic printing support:

  1. Implement the Printable interface to provide a page painter that can render each page to be printed.
  2. Create a PrinterJob.
  3. Call setPrintable to tell the PrinterJob how to print your document.
  4. Call print on the PrinterJob object to start the job.
In the following example, a Printable job is used to print five pages, each of which displays a green page number. Job control is managed in the main method, which obtains and controls the PrinterJob. Rendering is performe d in the page painter's print method.

    import java.awt.*;
    import java.awt.print.*;
    public class SimplePrint implements Printable {
         private static Font fnt = new Font("Helvetica",Font.PLAIN,24);

         public static void main(String[] args) {
            // Get a PrinterJob
            PrinterJob job = PrinterJob.getPrinterJob();
            // Specify the Printable is an instance of SimplePrint
            job.setPrintable(new SimplePrint());
            // Put up the dialog box
            if (job.printDialog()) {
                 // Print the job if the user didn't cancel printing
                 try { job.print(); }
                 catch (Exception e)
               { /* handle exception */ }
            }
            System.exit(0);
         }

         public int print(Graphics g, PageFormat pf, int pageIndex)
          throws PrinterException {
            // pageIndex 0 to 4 corresponds to page numbers 1 to 5.
            if (pageIndex >= 5) return Printable.NO_SUCH_PAGE;
            g.setFont(fnt);
            g.setColor(Color.green);
            g.drawString("Page " + (pageIndex+1), 100, 100);
            return Printable.PAGE_EXISTS;
         }
    }

7.3.1 Using Graphics2D for Rendering

You can invoke Graphics2D functions in you page painter's print method by first casting the Graphics context to a Graphics2D.

In the following example, the page numbers are rendered using a red-green gradient. To do this, a GradientPaint is set in the Graphics2D context.

    import java.awt.*;
    import java.awt.print.*;

    public class SimplePrint2D implements Printable {
         private static Font fnt = new Font("Helvetica",Font.PLAIN,24);

         private Paint pnt = new GradientPaint(100f, 100f, Color.red,
                      136f, 100f, Color.green, true);

         public static void main(String[] args) {
             // Get a PrinterJob
            PrinterJob job = PrinterJob.getPrinterJob();
            // Specify the Printable is an instance of SimplePrint2D
            job.setPrintable(new SimplePrint2D());
            // Put up the dialog box
            if (job.printDialog()) {
                 // Print the job if the user didn't cancel printing
                 try { job.print(); }
                 catch (Exception e) { /* handle exception */ }
            }
          System.exit(0);
         }

         public int print(Graphics g, PageFormat pf, int pageIndex)
          throws PrinterException {
            // pageIndex 0 to 4 corresponds to page numbers 1 to 5.
            if (pageIndex >= 5) return Printable.NO_SUCH_PAGE;
            Graphics2D g2 = (Graphics2D) g;
            // Use the font defined above
            g2.setFont(fnt);
            // Use the gradient color defined above
            g2.setPaint(pnt);
            g2.drawString("Page " + (pageIndex+1), 100f, 100f);
            return Printable.PAGE_EXISTS;
         }
    }

7.3.2 Printing a File

When a page painter's print method is invoked several times for the same page, it must generate the same output each time.

There are many ways to ensure that repeated requests to render a page yield the same output. For example, to ensure that the same output is generated each time the printing system requests a particular page of a text file, page painter could either store and reuse file pointers for each page or store the actual page data.

In the following example, a "listing" of a text file is printed. The name of the file is passed as an argument to the main method. The PrintListingPainter class stores the file pointer in effect at the beginning of each new p age it is asked to render. When the same page is rendered again, the file pointer is reset to the remembered position.

    import java.awt.*;
    import java.awt.print.*;
    import java.io.*;

    public class PrintListing {
         public static void main(String[] args) {
            // Get a PrinterJob
            PrinterJob job = PrinterJob.getPrinterJob();
            // Ask user for page format (e.g., portrait/landscape)
            PageFormat pf = job.pageDialog(job.defaultPage());
            // Specify the Printable is an instance of
            // PrintListingPainter; also provide given PageFormat
            job.setPrintable(new PrintListingPainter(args[0]), pf);
            // Print 1 copy
            job.setCopies(1);
            // Put up the dialog box
            if (job.printDialog()) {
                 // Print the job if the user didn't cancel printing
                 try { job.print(); }
                 catch (Exception e) { /* handle exception */ }
               }
               System.exit(0);
         }
    }

    class PrintListingPainter implements Printable {
         private RandomAccessFile raf;
         private String fileName;
         private Font fnt = new Font("Helvetica", Font.PLAIN, 10);
         private int rememberedPageIndex = -1;
         private long rememberedFilePointer = -1;
         private boolean rememberedEOF = false;

         public PrintListingPainter(String file) {
            fileName = file;
            try {
                 // Open file
                 raf = new RandomAccessFile(file, "r");
            }
            catch (Exception e) { rememberedEOF = true; }
         }

         public int print(Graphics g, PageFormat pf, int pageIndex)
          throws PrinterException {
          try {
               // For catching IOException
               if (pageIndex != rememberedPageIndex) {
                  // First time we've visited this page
                  rememberedPageIndex = pageIndex;
                  // If encountered EOF on previous page, done
                  if (rememberedEOF) return Printable.NO_SUCH_PAGE;
                  // Save current position in input file
                  rememberedFilePointer = raf.getFilePointer();
               }
               else raf.seek(rememberedFilePointer);
               g.setColor(Color.black);
               g.setFont(fnt);
           int x = (int) pf.getImageableX() + 10;
           int y = (int) pf.getImageableY() + 12;
               // Title line
              g.drawString("File: " + fileName + ", page: " +
            (pageIndex+1),  x, y);
              // Generate as many lines as will fit in imageable area
              y += 36;
              while (y + 12 < pf.getImageableY()+pf.getImageableHeight()){
                  String line = raf.readLine();
                  if (line == null){
                   rememberedEOF = true;
                   break;
            }
                g.drawString(line, x, y);
                y += 12;
                }
                return Printable.PAGE_EXISTS;
            }
            catch (Exception e) { return Printable.NO_SUCH_PAGE;}
         }
    }

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 -

CONTENTS | PREV | NEXT Java 2D API

7.4 Printing with Pageables and Books

Pageable jobs are suited for applications that build an explicit representation of a document, page by page. The Book class is a convenient way to use Pageables, but you can also build your own Pageable structur es if Book does not suit your needs. This section shows you how to use Book.

Although slightly more involved, Pageable jobs are preferred over Printable jobs because the printing system has more flexibility. A major advantage of Pageables is that the number of pages in the document is usually known and can be displayed to the user in the print dialog box. This helps the user to confirm that the job is specified correctly or to select a range of pages for printing.

A Book represents a collection of pages. The pages in a book do not have to share the same size, orientation, or page painter. For example, a Book might contain two letter size pages in portrait orientation and a letter size page in landscape orientation.

When a Book is first constructed, it is empty. To add pages to a Book, you use the append method. This method takes a PageFormat object that defines the page's size, printable area, and orientation and a pag e painter that implements the Printable interface.

Multiple pages in a Book can share the same page format and painter. The append method is overloaded to enable you to add a series of pages that have the same attributes by specifying a third parameter, the number of pages.

If you don't know the total number of pages in a Book, you can pass UNKNOWN_NUMBER_OF_PAGES to the append method. The printing system will then call your page painters in order of increasing page index until one of the m returns NO_SUCH_PAGE.

The setPage method can be used to change a page's page format or painter. The page to be changed is identified by a page index that indicates the page's location in the Book.

You call setPageable and pass in the Book to prepare the print job. The setPageable and setPrintable methods are mutually exclusive; that is, you should call one or the other but not both when preparing the PrinterJob.

7.4.1 Using a Pageable Job

In the following example, a Book is used to reproduce the first simple printing example. (Because this case is so simple, there is little benefit in using a Pageable job instead of a Printable job, but it illustrates the b asics of using a Book.) Note that you still have to implement the Printable interface and perform page rendering in the page painter's print method.

    import java.awt.*;
    import java.awt.print.*;

    public class SimplePrintBook implements Printable {
         private static Font fnt = new Font("Helvetica",Font.PLAIN,24);
         public static void main(String[] args) {
            // Get a PrinterJob
            PrinterJob job = PrinterJob.getPrinterJob();
            // Set up a book
            Book bk = new Book();
            bk.append(new SimplePrintBook(), job.defaultPage(), 5);
            // Pass the book to the PrinterJob
            job.setPageable(bk);
            // Put up the dialog box
            if (job.printDialog()) {
                 // Print the job if the user didn't cancel printing
                 try { job.print(); }
                 catch (Exception e) { /* handle exception */ }
            }
            System.exit(0);
         }

         public int print(Graphics g, PageFormat pf, int pageIndex)
            throws PrinterException {
            g.setFont(fnt);
            g.setColor(Color.green);
            g.drawString("Page " + (pageIndex+1), 100, 100);
            return Printable.PAGE_EXISTS;
         }
    }

7.4.2 Using Multiple Page Painters

In the following example, two different page painters are used: one for a cover page and one for content pages. The cover page is printed in landscape mode and the contents pages are printed in portrait mode.

    import java.awt.*;
    import java.awt.print.*;

    public class PrintBook {
        public static void main(String[] args) {
            // Get a PrinterJob
            PrinterJob job = PrinterJob.getPrinterJob();
            // Create a landscape page format
            PageFormat pfl = job.defaultPage();
            pfl.setOrientation(PageFormat.LANDSCAPE);
            // Set up a book
            Book bk = new Book();
            bk.append(new PaintCover(), pfl);
            bk.append(new PaintContent(), job.defaultPage(), 2);
            // Pass the book to the PrinterJob
            job.setPageable(bk);
            // Put up the dialog box
            if (job.printDialog()) {
                 // Print the job if the user didn't cancel printing
                 try { job.print(); }
                 catch (Exception e) { /* handle exception */ }
            }
          System.exit(0);
         }
    }

    class PaintCover implements Printable {
         Font fnt = new Font("Helvetica-Bold", Font.PLAIN, 72);

         public int print(Graphics g, PageFormat pf, int pageIndex)
          throws PrinterException {
            g.setFont(fnt);
            g.setColor(Color.black);
         int yc = (int) (pf.getImageableY() +
                     pf.getImageableHeight()/2);
            g.drawString("Widgets, Inc.", 72, yc+36);
            return Printable.PAGE_EXISTS;
         }
    }
    class PaintContent implements Printable {
         public int print(Graphics g, PageFormat pf, int pageIndex)
          throws PrinterException {
            Graphics2D g2 = (Graphics2D) g;
            int useRed = 0;
           int xo = (int) pf.getImageableX();
        int yo = (int) pf.getImageableY();
            // Fill page with circles or squares, alternating red & green
        for (int x = 0; x+28 < pf.getImageableWidth(); x += 36)
            for (int y = 0; y+28 < pf.getImageableHeight(); y += 36){
                 if (useRed == 0) g.setColor(Color.red);
                 else g.setColor(Color.green);
                 useRed = 1 - useRed;
                 if (pageIndex % 2 == 0) g.drawRect(xo+x+4, yo+y+4, 28, 28);
                 else g.drawOval(xo+x+4, yo+y+4, 28, 28);
            }
            return   Printable.PAGE_EXISTS;
         }
    }

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


Accessibility

 Java 2 SDK Contents
Through the JavaTM Accessibility API, developers are now able to create Java applications that can interact with assistive technologies such as screen readers, speech recognition systems and refreshable braille displays.

The Java Accessibility API is one of the core parts of the Java Foundation Classes. The JFC are a comprehensive set of graphical user interface components and foundation services designed to simplify deployment of Internet, intranet and desktop applications.

Accessibility Overview

  • Accessibility Overview
  • Accessibility Enhancements in the Java 2 Platform, v1.3
  • Accessibility Properties

Accessibility API Specification
(javadoc)
  • javax.accessibility

For More Information

  • Java Accessibility Utilities
    The Utilities help assistive technologies take advantage of the Java Accessibility API.
  • Java Access Bridge for Microsoft Windows
    The Java Access Bridge for Microsoft Windows makes Java applications visible to assistive technologies on Windows.
  • Assistive Technology Defined
  • The JFC Home Page
  • Sun Microsystems' Accessibility Program

Copyright © 1995-2001 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: access@sun.com 		Sun


Abstract Window Toolkit (AWT)

 Documentation Contents

The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include:
  • a rich set of user interface components;
  • a robust event-handling model;
  • graphics and imaging tools, including shape, color, and font classes;
  • layout managers, for flexible window layouts that don't depend on a particular window size or screen resolution;
  • data transfer classes, for cut-and-paste through the native platform clipboard.
The AWT is part of the Java Foundation Classes (JFC). For other JFC features, see below.

Enhancements in the Java 2 SDK, v1.3

  • AWT Enhancements in the Java 2 SDK, v1.3

Using the AWT

The Overview and Demos were originally written for programmers making the transition from 1.0 to 1.1, and most of the documents have not been updated recently. The programming techniques they describe are still applicable in the Java 2 platform.
  • Overview of Previous Enhancements
  • Programming Examples

On the Java Software web site:
  • Creating a User Interface (from the Java Tutorial).
  • The AWT Home Page

API References

  • java.awt Package
  • java.awt.event Package
  • java.awt.datatransfer Package

Other JFC APIs

  • Swing Components
  • Drag-and-Drop Data Transfer
  • 2D -- Advanced graphics and imaging
  • Accessibility API

On the Java Software web site:
  • The JFC Home Page
Copyright © 1996-99 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: java-awt@java.sun.com Sun Microsystems, Inc
Java Software


Previous AWT Enhancements

The documents in the section describe enhancements made in version 1.1 of the JavaTM platform. For AWT changes made in the current version of the platform, see

AWT Enhancements

The AWT was modified in version 1.1 of the JavaTMDevelopment Kit to provide major quality improvements while introducing the beginnings of a richer infrastructure for larger-scale GUI development. Although changes and enhancements to the overall API were made, compatibility was maintained with the 1.0 API so that existing applets could continue to run.

A number of the 1.1 AWT changes and enhancements are aimed at the needs of tool developers. Good software tools are fundamental to the usability and success of Java technology. Additionally, the AWT since 1.1 supports the JavaBeans architecture. In fact, all AWT components in 1.1 are "simple" Java Beans.

The following documents summarize the API changes in the AWT API made in version 1.1:

  • Data Transfer/Clipboard
  • Desktop Colors
  • Delegation Event Model
  • Graphics and Images
  • Lightweight UI Framework
  • Mouseless Operation
  • Popup Menu
  • Printing
  • ScrollPane Container


AWT 1.1 Graphics & Image enhancements

last updated: October 30, 1996

A number of graphics and imaging enhancements are being provided as of version 1.1 of the JavaTM platform. The following links take you to documentation detailing the issues and the new APIs developed to solve the problems.

  1. New methods to set and reset the Graphics Clip.
  2. New image rendering methods capable of simultaneously cropping, scaling, and flipping an image on the fly.
  3. New image scaling behavior and mechanisms were created to address some issues which were causing confusion with the existing implementations.
  4. New animation capabilities were added to the MemoryImageSource.
  5. New PixelGrabber methods were added to answer some needs we heard from the developer community.

Send feedback to:java-awt@java.sun.com
Copyright © 1996, Sun Microsystems, Inc. All rights reserved.


JavaBeans

Java

JavaBeansTM Component API

 Documentation Contents
JavaBeans extends Java platform's "write once - run everywhere" capability to reusable component development. In fact, JavaBeans takes interoperability a major step forward -- your code runs on every OS and also within any application environment. A Beans developer secures a future in the emerging network software market without losing customers that use proprietary platforms, because JavaBeans interoperate with ActiveX, OpenDoc, and LiveConnect.
JavaBeans Tutorial
Located on the Java Software website:
  • JavaBeans Tutorial

Beans Specifications
Located on the Java Software website:
  • JavaBeansTM Specification (PDF and PS)

  • BeanContext Specification (PDF | PS)
    Extensible Runtime Containment and Services Protocol for JavaBeans

JavaBeans API Specification
(javadoc)
  • java.beans
  • java.beans.beancontext

For More Information

Located on the Java Software website:
  • The JavaBeans Home Page
  • Beans Development Kit and More Information
    Contains BeanBox test container, example beans, demo source code, and introductory documentation

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-beans@java.sun.com 		Sun
Java Software


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

1.0 Introduction.

Currently the JavaBeans specification (Version 1.0) contains neither conventions describing a hierarchy or logical structure of JavaBeans, nor conventions for those JavaBeans to rendezvous with, or obtain arbitrary services or facilities from, the execution environment within which the JavaBean was instantiated.

It is desirable to both provide a logical, traversable, hierarchy of JavaBeans, and further to provide a general mechanism whereby an object instantiating an arbitrary JavaBean can offer that JavaBean a variety of services, or interpose itself between the underlying system service and the JavaBean, in a conventional fashion.

In other component models there exists the concept of a relationship between a Component and its environment, or Container, wherein a newly instantiated Component is provided with a reference to its Container or Embedding Context.

The Container, or Embedding Context not only establishes the hierarchy or logical structure, but its also acts as a service provider that Components may interrogate in order to determine, and subsequently employ, the services provided by their Context.

This proposal defines such a protocol that supports extensible mechanisms that:

  • Introduce an abstraction for the environment, or context, in which a JavaBean logically functions during its lifecycle, that is a hierarchy or structure of JavaBeans.
  • Enable the dynamic addition of arbitrary services to a JavaBean's environment.
  • Provide a single service discovery mechanism through which JavaBeans may interrogate their environment in order both to ascertain the availability of particular services and to subsequently employ those services.
  • Provide a simple mechanism to propagate an Environment to a JavaBean.
  • Provide better support for JavaBeans that are also Applets.

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

5.0 Standard/Suggested Conventions for BeanContext Services

5.0.1 BeanContexts that support InfoBus.

The InfoBus technology is a standard extension package that is intended to facilitate the rendezvous and exchange of dynamic self describing data, based upon a publish and subscribe abstraction, between JavaBean Components within a single Java Virtual Machine*.

A BeanContext that exposes an InfoBus to its nested BeanContextChild shall do so by exposing a service via the hasService() and getService() methods of type javax.infobus.InfoBus.

Thus BeanContextChild implementations may locate a common InfoBus implementation for their current BeanContext by using this mechanism to rendezvous with that InfoBus instance.

The Infobus 1.2 specification shall define a convenience mechanism provided by the InfoBus class to simplify the discovery mechanism for BeanContextChild instances nested within a particular instance of BeanContextServices.

5.0.2 BeanContexts that support printing

A BeanContext that wishes to expose printing facilities to its descendants may delegate a reference of (sub)type java.awt.PrintJob.

As the Java Network Printing Interface evolves additional specifications will be provided to expose it's facilities via the services mechanism.

5.0.3 BeanContext Design/Runtime mode support.

JavaBeans support the concepts of "design"-mode, when JavaBeans are being manipulated and composed by a developer in an Application Builder or IDE, and "Run"-mode, when the resulting JavaBeans are instantiated at runtime as part of an Applet, Application or some other executable abstraction.

In the first version of the specification, the "mode" or state, that is "design"-time or "run"-time was a JVM* global attribute. This is insufficient since, for example, in an Application Builder environment, there may be JavaBeans that function, in "run"-mode, as part of the Application Builder environment itself, as well as the JavaBeans that function, in "design"-mode, under construction by the developer using the Application Builder to compose an application.

Therefore we require the ability to scope this "mode" at a granularity below that of JVM global.

The BeanContext abstraction, as a "Container" or "Context" for one or more JavaBeans provides appropriate mechanism to better scope this "mode".

Thus BeanContext's that wish to expose and propagate this "mode" to its descendants may delegate a reference of type java.beans.DesignMode:

public interface java.beans.DesignMode {
    void    setDesignTime(boolean isDesignTime);
    boolean isDesignTime();
}
Additionally, BeanContexts delegating such a reference shall be required to fire the appropriate java.beans.propertyChangeEvent, with propertyName = "designTime", with the appropriate values for oldValue and newValue, when the "mode" changes value.

Note that it is illegal for instances of BeanContextChild to call setDesignTime() on instances of BeanContext that they are nested within.

5.0.4 BeanContext Visibility support.

JavaBeans with associated presentation, or GUI, may be instantiated in environments where the ability to present that GUI is either not physically possible (when the hardware is not present), or is not appropriate under the current conditions (running in a server context instead of a client).

The first version of the JavaBeans Specification introduced the java.beans.Visibility interface in order to provide a mechanism for JavaBeans to have their "visible" state, or ability to render a GUI, controlled from their environment.

BeanContexts that wish to enforce a particular policy regarding the ability of their children to present GUI, shall use the java.beans.Visibility interface to control their children.

5.0.5 Determining Locale from a BeanContext

BeanContexts may have a locale associated with them, in order to associate and propagate this important attribute across the JavaBeans nested therein.

Therefore, BeanContexts, shall be required to fire the appropriate java.beans.PropertyChangeEvent, with propertyName = "locale", oldValue = the reference to the previous value of the Locale delegate, and newValue = the reference to the new value of the Locale delegate, in order to notify its Listeners of any change in Locale.

Setting and getting the value of the Locale on the BeanContext is implementation dependent.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


-

CONTENTS | PREV | NEXT Extensible Runtime Containment and Services Protocol for JavaBeans

6.0 Support classes

In order to ease the implementation of this relatively complex protocol a "helper" classes are provided; java.beans.beancontext.BeanContextChildSupport, java.beans.beancontext.BeanContextSupport, and java.beans.beancontext.BeanContextServicesSupport. These classes are designed to either be subclassed, or delegated implicitly by another object, and provides fully compliant (extensible) implementations of the protocols embodied herein.

CONTENTS | PREV | NEXT
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.


The Collections Framework

 Documentation Contents
The collections framework is a unified architecture for representing and manipulating collections, allowing them to be manipulated independently of the details of their representation. It reduces programming effort while increasing performance. It allows for interoperability among unrelated APIs, reduces effort in designing and learning new APIs, and fosters software reuse. The framework is based on six collection interfaces. It includes implementations of these interfaces, and algorithms to manipulate them.
Overview
  • Overview - An overview of the Collections framework.
API Specification
  • API Reference - An annotated outline of the classes and interfaces comprising the collections framework, with links into the JavaDoc.
Tutorial
  • Tutorial - A tutorial introduction to the collections framework with plenty of programming examples.
API Enhancements
  • API Enhancements - An annotated list of API changes between the 1.2 and 1.3 releases, with links into the JavaDoc.
Design FAQ
  • Design FAQ- Answers to frequently asked questions concerning the design of the collections framework.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: collections-comments@java.sun.com 		Sun
Java Software


CORBA Technology and the JavaTM Platform

The Java 2 Platform, Standard Edition, v1.3, provides a CORBA Object Request Broker (ORB) and two CORBA programming models that utilize the Java CORBA ORB and Internet InterORB Protocol (IIOP). This topic discusses these options for creating and distributing CORBA technology.

CORBA technology is an integral part of the Java 2 platform. It consists of an Object Request Broker (ORB) written in Java (with a small bit of native code), APIs for the RMI programming model, and APIs for the IDL programming model.

How does J2SE leverage CORBA

Common Object Request Broker Architecture (CORBA) technology is the open standard for heterogeneous computing. CORBA complements the JavaTM platform by providing a distributed objects framework, services to support that framework, and interoperability with other languages. The Java platform complements CORBA by providing "Write Once, Run AnywhereTM" portability, a highly productive implementation environment, and a very robust platform. By combining the Java platform with CORBA and other key enterprise technologies, the Java 2 Platform is the ultimate platform for distributed technology solutions.

CORBA standards provide the proven, interoperable infrastructure to the Java platform. IIOP (Internet Inter-ORB Protocol) manages the communication between the object components that power the system. The Java platform provides a portable object infrastructure that works on every major operating system. CORBA provides the network transparency, Java provides the implementation transparency.

The Object Request Broker?

A CORBA Object Request Broker (ORB) is part of the Java 2 Platform, Standard Edition, v1.3. The ORB is a runtime component that can be used for distributed computing using IIOP communication. This eliminates the requirement for licensing and distributing third-party Java ORBs.

NOTE: Although it is true in theory that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

The Object Management Group (OMG) is an industry consortium that invented CORBA and publishes specifications for CORBA. Vendors implement the specifications to produce products known as Object Request Brokers (ORB). The good news for developers is that the JavaTM Standard Edition, v1.2 and higher includes an ORB that is available in every deployment of the Java 2 Platform, Standard and Enterprise Editions. Now you can write Java CORBA code without having to license any other software! To read more about the ORB class, follow the link.

The Java CORBA ORB supports both the RMI and IDL programming models, both of which use the underlying IIOP wire-level protocol for communication.

Introducing the CORBA Programming Models

History of the CORBA Programming Models

In 1997, Remote Method Invocation, or RMI, was introduced in JDK 1.1. Initially, RMI was positioned as a natural outgrowth of Remote Procedure Calls (RPC), strictly for enabling calls to be made between Java objects in different virtual machines, and even on different physical machines.

In 1998, came JDK 1.2, which introduced JavaTM IDL, a Java API for interoperability and integration with CORBA. Java IDL included both a Java-based ORB, which supported IIOP, and the IDL-to-Java compiler, idltojava, for generating client-side stubs and server-side code skeletons. This release also included a CORBA ORB.

The OMG finalized modifications of its IIOP specification so that it would support most of the JDK 1.1 functionality of RMI. JDK 1.2 introduced RMI over IIOP, which enabled remote objects written in the Java programming language to communicate with objects written in any language via IIOP.

Comparing the CORBA Programming Models

The "magic" that gives us the cross-language, cross-vendor interoperability is the Internet InterORB Protocol, or IIOP. IIOP can be a transport protocol for distributed applications written in either IDL or Java RMI. IIOP allows distributed objects to conform to OMG's CORBA specification.

When using the IDL programming model, the interface is everything! It defines the points of entry that can be called from a remote process, such as the types of arguments the called procedure will accept, or the value/output parameter of information returned. Using IDL, the programmer can make the entry points and datatypes that pass between communicating processes act like a standard language.

CORBA is a language-neutral system in which the argument values or return values are limited to what can be represented in the involved implementaton languages. In CORBA, object orienation is limited only to objects that can be passed by reference (the object code itself cannot be passed from machine-to-machine) or are predefined in the overall framework. Passed and returned types must be those declared in the interface.

With RMI, the IDL and the implementation language are the same thing, so you don't have to worry about mapping from one to the other. Language-level objects (the code itself) can be passed from one process to the next. Values can be returned by their actual type, not the declared type. Or, you can compile the interfaces to generate IIOP stubs and skeletons to talk to objects written on other machines in other CORBA-compliant languages.

The RMI Programming Model

What is the RMI Programming Model

The RMI Programming model enables the programming of CORBA servers and applications via the rmi API. You can choose to work completely within the Java programming language, using the Java Remote Method Protocol (JRMP) or work with other CORBA-compliant programming languages using the Internet InterORB Protocol (IIOP). This topic discusses using IIOP as the transport. For more information on using the JRMP transport, link to the RMI page at http://java.sun.com/j2se/1.3/docs/guide/rmi/ .

The RMI API utilizes the Java CORBA ORB and IIOP, so you can write all of your code in Java, and use the rmic compiler to generate the code necessary for connecting your applications via the Internet InterORB Protocol (IIOP) to others written in any CORBA-compliant language.

The RMI programming model is part of the JavaTM 2 Platform, Standard Edition, v1.3. This enables the ability to write CORBA applications for the Java platform without learning CORBA Interface Definition Language (IDL). To work with CORBA applications in other languages, IDL can be generated from Java programming language interfaces using the rmic compiler with the -idl option. To generate IIOP stubs and tie classes, use the rmic compiler with the -iiop option. J2SE includes the full functionality of a CORBA Object Request Broker (ORB). For older versions of the JDK, the RMI over IIOP compiler is available as a separate download. For more information on using rmic, link to rmic - The Java RMI Stub Compiler.

When should I use the RMI programming model?

The RMI programming model combines the best features of Java Remote Method Invocation (RMI) with the best features of CORBA. The RMI programming model speeds distributed application development by allowing developers to work completely in the Java programming language. When using the RMI programming model to produce Java technology-based distributed applications, there is no separate Interface Definition Language (IDL) or mapping to learn. The RMI programming model provides flexibility by allowing developers to pass any serializable Java object (Objects By Value) between application components. Like CORBA, the RMI programming model is based on open standards defined with the participation of hundreds of vendors and users in the Object Management Group. Like CORBA, the RMI programming model uses Internet Inter-ORB Protocol (IIOP) as its communication protocol. IIOP eases legacy application and platform integration by allowing application components written in C++, Smalltalk, and other CORBA supported languages to communicate with components running on the Java platform.

With the RMI programming model, developers can write remote interfaces in the Java programming language and implement them simply using Java technology and the Java RMI APIs. These interfaces can be implemented in any other language that is supported by an OMG mapping and a vendor supplied ORB for that language. Similarly, clients can be written in other languages using IDL derived from the remote Java technology-based interfaces. Using the RMI programming model, objects can be passed both by reference and by value over IIOP.

Where can I found out more about the RMI programming model

For more information on the RMI programming model, see RMI-IIOP Documentation.

For an introductory tutorial using the RMI programming model, see Tutorial: Getting Started with the RMI Programming Model.

The IDL Programming Model

What is the IDL Programming Model

The IDL programming model, known as JavaTM IDL, consists of both the Java CORBA ORB and the idlj compiler that maps the OMG IDL to Java bindings that use the Java CORBA ORB.

JavaTM IDL is part of the Java 2 Platform, Standard Edition, v1.3. To develop applications with Java IDL, use JavaTM IDL Compiler, idlj, which is included with the J2SE v1.3 download.

When should I use the IDL programming model?

The OMG IDL (Interface Definition Language) is a purely declarative language designed for specifying programming-language-independent operational interfaces for distributed applications. OMG specifies a mapping from IDL to several different programming languages, including C, C++, Lisp, Python, Smalltalk, COBOL, Ada, and Java. When mapped, each statement in OMG IDL is translated to a corresponding statement in the programming language of choice. Java IDL is an implementation of the CORBA specification. For example, you could use the Java IDL Compiler, idlj, to map an IDL interface to Java and implement the client class in Java. If you map the same IDL to C++, using another vendor's IDL-to-C++ compiler and C++ ORB, and implement the server in that language, the Java client and C++ server interoperate through the ORB as though they were written in the same language.

NOTE: Although it is true in theory that ORBs written in different languages should be able to talk to each other, we haven't tested the interoperability of the Java ORB with other vendor's ORBs.

Where can I find out more about the IDL programming model

For more information on the IDL programming model, see Java IDL Documentation.

For an introductory tutorial to the IDL programming model, see Tutorial: Getting Started with Java IDL.

Comparison of IDL and RMI programming models

There are several scenarios that will define how you will want to create distributed CORBA applications. Here are some of them:

  • If you have been developing CORBA applications using IDL for some time, you will probably want to stay in this environment. Create the interfaces using IDL, and define the client and server applications using the Java programming language to take advantage of its "Write Once, Run AnywhereTM" portability, its highly productive implementation environment, and its very robust platform.

  • If all of your applications are written in the Java programming language, you will probably want to use Java RMI to enable communication between Java objects on different virtual machines and different physical machines. Using Java RMI without its IIOP option leverages its strengths of code portability, security, and garbage collection.

  • If you writing most of your new applications using the Java programming language, but need to maintain legacy applications written in other programming languages as well, you will probably want to use Java RMI with its IIOP compiler option.


Drag and Drop

 Documentation Contents
Drag and Drop enables data transfer both across Java and native applications, between Java applications, and within a single Java application.
Drag and Drop Enhancements for JavaTM 2 SDK, Standard Edition, v 1.3
Enhancements to Drag and Drop in this release consist of 2 new methods in class java.awt.datatransfer.DataFlavor.
  • getReaderForText(Transferable transferable)
  • selectBestTextFlavor(DataFlavor[] availableFlavors)
Drag and Drop Specification
  • Drag and Drop Specification. Also available in postscript and pdf

Drag and Drop API Specification
  • java.awt.dnd

Related Information

Located on the Java Software website:
  • The JFC Home Page

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send Drag and Drop comments to our Java Drag and Drop team: java-dnd@java.sun.com 		Sun Microsystems, Inc
Java Software


The Java Extension Mechanism

for Support of Optional Packages

 Documentation Contents
Note: Optional packages are the new name for what used to be known as standard extensions. The "extension mechanism" is that functionality of the Java 2 SDK and Java 2 Runtime Environment that supports the use of optional packages.

Optional packages are packages of Java classes (and any associated native code) that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java virtual machine (VM) to use the classes of the optional extension in much the same way as the VM uses classes in the Java 2 Platform. The extension mechanism also provides a way for needed optional packages to be retrieved from specified URLs when they are not already installed in the Java 2 SDK or Runtime Environment.

Enhancements
  • Enhancements to the extension mechanism in version 1.3 of the Java 2 SDK include an extended set of manifest attributes that can be used for checking vendor and versioning information of installed optional packages. If an applet requires an optional package that isn't installed, or that is installed but has the wrong version number or is not from the appropriate vendor, the Java Plug-in can download the needed extension from a specified URL. For more information, see Optional-Package Versioning.
Overview
  • Overview - What optional packages are and how to use them.
Extension Mechanism Architecture
  • Extension Mechanism Architecture - Notes on the extension mechanism API and how optional packages use the Jar file format.
API Specification

The following classes play a role in the extension mechanism:

  • java.lang.ClassLoader
  • java.lang.Package
  • java.lang.Thread
  • java.net.JarURLConnection
  • java.net.URLClassLoader
  • java.security.SecureClassLoader
See also the API Details section of the mechanism specification for notes on these APIs.

Tutorial

Located on the Java Software website:
  • The Java Extension Mechanism trail of the Java Tutorial.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Java IDL Documentation

Java

JavaTM IDL

Java IDL adds CORBA (Common Object Request Broker Architecture) capability to the Java platform, providing standards-based interoperability and connectivity. Java IDL enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IDL (Object Management Group Interface Definition Language) and IIOP (Internet Inter-ORB Protocol) defined by the Object Management Group. Runtime components include Java ORB for distributed computing using IIOP communication.

Note: This release of the JavaTM 2 Platform, Standard Edition, includes RMI-IIOP, a technology that integrates Java RMI (Remote Method Invocation) and Java IDL. RMI-IIOP supersedes Java IDL for most purposes, by enabling you to write CORBA interfaces directly in Java rather than in the OMG-specified IDL (Interface Definition Language) used with Java IDL. For details, see the RMI-IIOP documentation.

Where do I get the IDL-to-Java compiler?

The J2SDK, v.1.3, version of Java IDL includes a new version of the IDL-to-Java compiler, named idlj. The idlj compiler supports new CORBA-standard features required for RMI-IIOP. The idlj compiler is placed in the SDK's .bin directory by the installer.

To download the Java[tm] 2 Platform, Standard Edition (J2SE[tm]) version 1.3, which includes the idlj compiler, follow the link. Please note that the IDL-to-Java compiler is no longer a separate download, as it was in previous releases of the Java[tm] platform.

For better interoperability, see the note about not using an interface name for a module name in OMG IDL code.

Should I use Java IDL or RMI-IIOP?

This is a fundamental question and it's important to understand the distinction between these two ways of integrating the Java programming language with CORBA.

Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

RMI-IIOP (Remote Method Invocation over Internet Inter-ORB Protocol) is for Java programmers who want to program to the RMI interfaces, but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise JavaBeans (EJB), since the remote object model for EJBs is RMI-based.

Java IDL FAQ

  • Java IDL FAQ

Essential Java IDL API

  • package org.omg.CORBA
  • package org.omg.CosNaming
  • org.omg.CORBA.ORB
  • idlj, the IDL-to-Java compiler documentation

Tutorials

  • Getting Started with Java IDL: The "Hello World" Tutorial (beginner)
  • Example: Hello World (higher-level overview)

Extending "Hello World"

  • Example: Persistent State and User Exceptions
  • Example: Callback Objects
  • Example: Implementation Inheritance
  • Running the Hello World Example on 2 machines

Concepts

  • Distributed Application Concepts
  • Using CORBA and Java IDL
  • Glossary

Programming Guide

  • Exceptions
  • Initialization
  • Naming Service
  • Dynamic Skeleton Interface
  • Mapping IDL to the Java Programming Language

For more information

The OMG is the official source of information for all CORBA and IIOP related information. The CORBA 2.0 Specification is available electronically in postscript and pdf format.

Copyright © 1996-2000 Sun Microsystems, Inc. All Rights Reserved.

Send questions or comments to: JavaIDL@eng.sun.com.

Sun

Java Software


8 - Java ORB Portability Interfaces

Java ORB Portability Interfaces

8

8.1 Introduction

The APIs specified here provide the minimal set of functionality to allow portable stubs and skeletons to be used with a Java ORB. The interoperability requirements for Java go beyond that of other languages. Because Java classes are often downloaded and come from sources that are independent of the ORB in which they will be used, it is essential to define the interfaces that the stubs and skeletons use. Otherwise, use of a stub (or skeleton) will require: either that it have been generated by a tool that was provided by the ORB vendor (or is compatible with the ORB being used), or that the entire ORB runtime be downloaded with the stub or skeleton. Both of these scenarios are unacceptable.

8.1.1 Design Goals

The design balances several goals:

  • Size
Stubs and skeletons must have a small bytecode footprint in order to make downloading fast in a browser environment and to minimize memory requirements when bundled with a Java VM, particularly in specialized environments such as set-top boxes.

  • Performance
Obviously, the runtime performance of the generated stub code must be excellent. In particular, care must be taken to minimize temporary Java object creation during invocations in order to avoid Java VM garbage collection overhead.

  • Reverse Mapability
The design does not require adding methods to user-defined types such as structures and exceptions to ensure that stubs and skeletons generated by IDL to Java compilers and reverse Java to IDL mapping tools are interoperable and binary compatible.

A very simple delegation scheme is specified here. Basically, it allows ORB vendors maximum flexibility for their ORB interfaces, as long as they implement the interface APIs. Of course vendors are free to add proprietary extensions to their ORB runtimes. Stubs and skeletons which require proprietary extensions will not necessarily be portable or interoperable and may require download of the corresponding runtime.

8.1.2 Portability Package

The APIs needed to implement portability are found in the org.omg.CORBA.portable package

The portability package contains interfaces and classes that are designed for and intended to be used by ORB implementors. It exposes the publicly defined APIs that are used to connect stubs and skeletons to the ORB.

8.2 Architecture

The stub and skeleton portability architecture allows the use of the DII and DSI as its portability layer. The mapping of the DII and DSI PIDL have operations that support the efficient implementation of portable stubs and skeletons

All stubs shall inherit from a common base class org.omg.CORBA.portable.ObjectImpl. The class is responsible for delegating shared functionality such as is_a() to the vendor specific implementation. This model provides for a variety of vendor dependent implementation choices, while reducing the client-side and server "code bloat".

All DSI-based skeletons inherit from org.omg.CORBA.DynamicImplementation.

8.3 Streamable APIs

The Streamable Interface API provides the support for the reading and writing of complex data types. It is implemented by static methods on the Helper classes. They are also used in the Holder classes for reading and writing complex data types passed as out and inout parameters.

package org.omg.CORBA.portable;

public interface Streamable {

    void _read(org.omg.CORBA.portable.InputStream
istream);

    void _write(org.omg.CORBA.portable.OutputStream
ostream);

    org.omg.CORBA.TypeCode _type();

}

8.4 Streaming APIs

The streaming APIs are Java interfaces that provide for the reading and writing of all of the mapped IDL types to and from streams. Their implementations are used inside the ORB to marshal parameters and to insert and extract complex datatypes into and from Anys.

The streaming APIs are found in the org.omg.CORBA.portable package.

The ORB object is used as a factory to create an output stream. An input stream may be created from an output stream.

package org.omg.CORBA;

interface ORB {

        OutputStream        create_output_stream();

};

package org.omg.CORBA.portable;

public abstract class InputStream {

    public abstract boolean read_boolean();

    public abstract char    read_char();

    public abstract char    read_wchar();

    public abstract byte    read_octet();

    public abstract short   read_short();

    public abstract short   read_ushort();

    public abstract int     read_long();

    public abstract int     read_ulong();

    public abstract long    read_longlong();

    public abstract long    read_ulonglong();

    public abstract float   read_float();

    public abstract double  read_double();

    public abstract String  read_string();

    public abstract String  read_wstring();

    public abstract void    read_boolean_array(boolean[] value,

                            int offset, int length);

    public abstract void    read_char_array(char[] value,

                            int offset, int length);

    public abstract void    read_wchar_array(char[] value,

                            int offset, int length);

    public abstract void    read_octet_array(byte[] value,

                            int offset, int length);

    public abstract void    read_short_array(short[] value,

                            int offset, int length);

    public abstract void    read_ushort_array(short[] value,

                            int offset, int length);

    public abstract void    read_long_array(int[] value,

                            int offset, int length);

    public abstract void    read_ulong_array(int[] value,

                            int offset, int length);

    public abstract void    read_longlong_array(long[] value,

                            int offset, int length);

    public abstract void    read_ulonglong_array(long[] value,

                            int offset, int length);

    public abstract void    read_float_array(float[] value,

                            int offset, int length);

    public abstract void    read_double_array(double[] value,

                            int offset, int length);

    public abstract org.omg.CORBA.Object read_Object();

    public abstract org.omg.CORBA.TypeCode read_TypeCode();

    public abstract org.omg.CORBA.Any read_any();

    public abstract org.omg.CORBA.Principal read_Principal();

}

public abstract class OutputStream {

    public abstract InputStream create_input_stream();

    public abstract void         write_boolean(boolean value);

    public abstract void         write_char(char value);

    public abstract void         write_wchar(char value);

    public abstract void         write_octet(byte value);

    public abstract void         write_short(short value);

    public abstract void         write_ushort(short value);

    public abstract void         write_long(int value);

    public abstract void         write_ulong(int value);

    public abstract void         write_longlong(long value);

    public abstract void         write_ulonglong(long value);

    public abstract void         write_float(float value);

    public abstract void         write_double(double value);

    public abstract void         write_string(String value);

    public abstract void         write_wstring(String value);

    public abstract void         write_boolean_array(boolean[] value,

                                 int offset, int length);

    public abstract void         write_char_array(char[] value,

                                 int offset, int length);

    public abstract void         write_wchar_array(char[] value,

                                 int offset, int length);

    public abstract void         write_octet_array(byte[] value,

                                 int offset, int length);

    public abstract void         write_short_array(short[] value,

                                 int offset, int length);

    public abstract void         write_ushort_array(short[] value,

                                 int offset, int length);

    public abstract void         write_long_array(int[] value,

                                 int offset, int length);

    public abstract void         write_ulong_array(int[]value,

                                 int offset, int length);

    public abstract void         write_longlong_array(long[]value,

                                 int offset, int length);

    public abstract void         write_ulonglong_array(long[] value,

                                 int offset, int length);

    public abstract void         write_float_array(float[] value,

                                 int offset, int length);

    public abstract void         write_double_array(double[]value,

                                 int offset, int length);

    public abstract void         write_Object(org.omg.CORBA.Object value);

    public abstract void         write_TypeCode(org.omg.CORBA.TypeCode value);

    public abstract void         write_any(org.omg.CORBA.Any value);

    public abstract void         write_Principal(org.omg.CORBA.Principal value);

}

   8.5   Portability Stub Interfaces

   8.5.1   Stub Design

The stub class is implemented on top of the DII..

   8.5.2   Portable ObjectImpl

The ObjectImpl class is the base class for stubs and skeletons. It
provides the basic delegation mechanism.

The method _ids() returns an array of repository ids that an object
implements. The string at the zero index shall represent the most
derived interface. The last id, for the generic CORBA object (i.e.
"IDL:omg.org/CORBA/Object:1.0"), is implied and not present.

package org.omg.CORBA.portable;

abstract public class ObjectImpl implements

org.omg.CORBA.Object {

    private Delegate __delegate;

    public Delegate _get_delegate() {

        if (__delegate == null) {

            throw new org.omg.CORBA.BAD_OPERATION();

        }

        return _delegate;

    }

    public void _set_delegate(Delegate delegate) {

        __delegate = delegate;

    }

    public abstract String[] _ids() {...}

// methods for standard CORBA stuff

    public org.omg.CORBA.ImplementationDef

      _get_implementation() {

        return _get_delegate().get_implementation(this);

    }

    public org.omg.CORBA.InterfaceDef

      _get_interface() {

        return _get_delegate().get_interface(this);

    }

    public org.omg.CORBA.Object _duplicate() {

        return _get_delegate().duplicate(this);

    }

    public void _release() {

        _get_delegate().release(this);

    }

    public boolean _is_a(String repository_id) {

        return _get_delegate().is_a(this, repository_id);

    }

    public boolean _is_equivalent(org.omg.CORBA.Object rhs) {

        return _get_delegate().is_equivalent(this, rhs);

    }

    public boolean _non_existent() {

        return _get_delegate().non_existent(this);

    }

    public int _hash(int maximum) {

        return _get_delegate().hash(this, maximum);

    }

    public org.omg.CORBA.Request _request(String operation) {

        return _get_delegate().request(this, operation);

    }

    public org.omg.CORBA.Request _create_request(

                 org.omg.CORBA.Context ctx,

                 String operation,

                 org.omg.CORBA.NVList arg_list,

                 org.omg.CORBA.NamedValue result) {

                   return _get_delegate().create_request(this, ctx,

                      operation, arg_list, result);

    }

    public Request _create_request(

                 org.omg.CORBA.Context ctx,

                 String operation,

                 org.omg.CORBA.NVList arg_list,

                 org.omg.CORBA.NamedValue result,

                 org.omg.CORBA.ExceptionList exceptions,

                 org.omg.CORBA.ContextList contexts) {

                   return _get_delegate().create_request(this, ctx, operation,

                     arg_list, result,exceptions, contexts);

    }

}

   8.6  Delegate

The delegate class provides the ORB vendor specific implementation of
CORBA object.

// Java

package org.omg.CORBA.portable;

public abstract class Delegate {

    public abstract org.omg.CORBA ImplementationDef get_implementation(

                                org.omg.CORBA.Object self);

    public abstract org.omg.CORBA.InterfaceDef get_interface(

                                org.omg.CORBA.Object self);

    public abstract org.omg.CORBA.Object duplicate(

                                org.omg.CORBA.Object self);

    public abstract void release(org.omg.CORBA.Object self);

    public abstract boolean is_a(org.omg.CORBA.Object self,

                                String repository_id);

    public abstract boolean non_existent(org.omg.CORBA.Object self);

    public abstract boolean is_equivalent(org.omg.CORBA.Object self,

                                org.omg.CORBA.Object rhs);

    public abstract int hash(org.omg.CORBA.Object self,

                                int max);

    public abstract org.omg.CORBA.Request request(org.omg.CORBA.Object self,

                                String operation);

    public abstract org.omg.CORBA.Request create_request(

                                org.omg.CORBA.Object self,

                                org.omg.CORBA.Context ctx,

                                String operation,

                                org.omg.CORBA.NVList arg_list,

                                org.omg.CORBA.NamedValue result);

    public abstract org.omg.CORBA.Request create_request(

                                org.omg.CORBA.Object self,

                                org.omg.CORBA.Context ctx,

                                String operation,

                                org.omg.CORBA.NVList arg_list,

                                org.omg.CORBA.NamedValue result,

                                org.omg.CORBA.ExceptionList excepts,

                                org.omg.CORBA.ContextList contexts);

}

   8.7  Skeleton

The skeleton uses the DynamicImplementation (see Section 6.10, "ServerRequest and
Dynamic Implementation").

See Section 7.2.2, "Servant
Class" for more information.

   8.8  ORB Initialization

The ORB class represents an implementation of a CORBA ORB. Vendors
specific ORB implementations can extend this class to add new
features.

There are several cases to consider when creating the ORB instance. An
important factor is whether an applet in a browser or an stand-alone
Java application is being used.

In any event, when creating an ORB instance, the class names of the ORB
implementation are located using the following search order:

    • check in Applet parameter or application string array, if any

    • check in properties parameter, if any

    • check in the System properties

    • fall back on a hardcoded default behavior

   8.8.1   Standard Properties

The OMG standard properties are defined in the following table.

Table 8-1
Property Name | Property Value
org.omg.CORBA.ORBClass | class name of an ORB implementation
org.omg.CORBA.ORBSingletonClass | class name of the singleton ORB implementation

   8.8.2   ORB Initialization Methods

There are three forms of initialization as shown below. In addition the
actual ORB implementation (subclassed from
ORB) must implement the
set_parameters() methods so that the
initialization parameters will be passed into the ORB from the
initialization methods.

// Java

package org.omg.CORBA;

abstract public class ORB {

    // Application init

    public static ORB init(String[] args,

      java.util.Properties props) {

        // call to: set_parameters(args, props);

        ...

        }

    // Applet init

    public static ORB init(java.applet.Applet app,

      java.util.Properties props) {

        // call to: set_parameters(app, props);

        ...

        }

    // Default (singleton) init

    public static ORB init()

        {...}

    // Implemented by subclassed ORB implementations

    //  and called by init methods to pass in their params

    abstract protected void set_parameters(String[] args,

        java.util.Properties props);

    abstract protected void set_parameters(Applet app,

        java.util.Properties props);

}

   8.8.2.1  Default initialization

The default initialization method returns the singleton ORB. If called
multiple times it will always return the same the Java object.

The primary use of the no-argument version of
ORB.init() is to provide a factory for
TypeCodes for use by Helper classes implementing the
type() method, and to create Any
instances that are used to describe union labels as part of creating a
union TypeCode. These Helper classes may be baked-in
to the browser (e.g. for the interface repository stubs or other wildly
popular IDL) and so may be shared across untrusted applets downloaded
into the browser. The returned ORB instance is shared across all
applets and therefore must have sharply restricted capabilities so that
unrelated applets can be isolated from each other. It is not intended
to be used directly by applets. Therefore, the ORB returned by
ORB.init(), if called from a Java applet,
may only be used to create Typecodes. An attempt to
invoke other "regular" ORB operations shall raise a system
exception.

If called from an application a fully functional ORB object is
returned.

   8.8.2.2  Application initialization

The application initialization method should be used from a stand-alone
Java application. It is passed a array of strings which are the command
arguments and a list of Java properties. Either the argument array or
the properties may be null.

It returns a new fully functional ORB Java object each time it is
called.

   8.8.2.3  Applet initialization

The applet initialization method should be used from an applet. It is
passed "the applet" and a list of Java properties. Either the
applet or the properties may be null.

It returns a new fully functional ORB Java object each time it is
called.


6 - Mapping Pseudo-Objects to Java

Mapping Pseudo-Objects to Java

6

6.1 Introduction

Pseudo objects are constructs whose definition is usually specified in "IDL", but whose mapping is language specified. A pseudo object is not (usually) a regular CORBA object. Often it exposed to either clients and/or servers as a process, or a thread local, programming language construct.

For each of the standard IDL pseudo-objects we either specify a specific Java language construct or we specify it as a pseudo interface.

This mapping is based on the revised version 1.1 C++ mapping.

We have chosen the option allowed in the IDL specification section 4.1.3 to define Status as void and have eliminated it for the convenience of Java programmers.

6.1.1 Pseudo Interface

The use of pseudo interface is a convenient device which means that most of the standard language mapping rules defined in this specification may be mechanically used to generate the Java. However, in general the resulting construct is not a CORBA object. Specifically it is:

  • not represented in the Interface Repository

  • no helper classes are generated

  • no holder classes are generated

  • mapped to a Java public abstract class that does not extend or inherit from any other classes or interfaces
Note: The specific definition given for each piece of PIDL may override the general guidelines above. In such a case, the specific definition takes precedence.

All of the pseudo interfaces are mapped as if they were declared in:

module org {

    module omg {

        module CORBA {

                                ...
That is, they are mapped to the org.omg.CORBA Java package.

6.2 Certain Exceptions

The standard CORBA PIDL uses several exceptions, Bounds, BadKind, and InvalidName.

No holder and helper classes are defined for these exceptions, nor are they in the interface repository., However so that users can treat them as "normal exceptions" for programming purposes, they are mapped as normal user exceptions.

They are defined within the scopes that they are used. A Bounds and BadKind exception are defined in the TypeCodePackage for use by TypeCode. A Bounds exception is defined in the standard CORBA module for use by NVList, ExceptionList, and ContextList. An InvalidName exception is defined in the ORBPackage for use by ORB.

// Java

package org.omg.CORBA;

final public class Bounds

    extends org.omg.CORBA.UserException {

    public Bounds() {...}

}

package org.omg.CORBA.TypeCodePackage;

final public class Bounds

    extends org.omg.CORBA.UserException {

    public Bounds() {...}

}

final public class BadKind

    extends org.omg.CORBA.UserException {

    public BadKind() {...}

}

package org.omg.CORBA.ORBPackage;

final public class InvalidName

    extends org.omg.CORBA.UserException {

    public InvalidName() {...}

}

    6.3	 Environment

The Environment is used in request operations to make exception information available.

// Java code

package org.omg.CORBA;

public abstract class Environment {

    void exception(java.lang.Exception except);

    java.lang.Exception exception();

    void clear();

}

    6.4	 NamedValue

A NamedValue describes a name, value pair. It is used in the DII to describe arguments and return values, and in the context routines to pass property, value pairs.

In Java it includes a name, a value (as an any), and an integer representing a set of flags.

typedef unsigned long Flags;

typedef string Identifier;

const Flags ARG_IN = 1;

const Flags ARG_OUT = 2;

const Flags ARG_INOUT = 3;

const Flags CTX_RESTRICT_SCOPE = 15;

pseudo interface NamedValue {

    readonly attribute Identifier name;

    readonly attribute any value;

    readonly attribute Flags flags;

};

// Java

package org.omg.CORBA;

public interface ARG_IN {

    public static final int value = 1;

}

public interface ARG_OUT {

    public static final int value = 2;

}

public interface ARG_INOUT {

    public static final int value = 3;

}

public interface CTX_RESTRICT_SCOPE {

    public static final int value = 15;

}

public abstract class NamedValue {

    public abstract String name();

    public abstract Any value();

    public abstract int flags();

}

    6.5	 NVList

A NVList is used in the DII to describe arguments, and in the context routines to describe context values.

In Java it maintains a modifiable list of NamedValues.

pseudo interface NVList {

    readonly attribute unsigned long count;

    NamedValue add(in Flags flags);

    NamedValue add_item(in Identifier item_name, in Flags flags);

    NamedValue add_value(in Identifier item_name,

                             in any val,

                             in Flags flags);

    NamedValue item(in unsigned long index) raises (CORBA::Bounds);

    void remove(in unsigned long index) raises (CORBA::Bounds);

};

// Java

package org.omg.CORBA;

public abstract class NVList {

    public abstract int count();

    public abstract NamedValue add(int flags);

    public abstract NamedValue add_item(String item_name, int flags);

    public abstract NamedValue add_value(String item_name, Any val,

                                int flags);

    public abstract NamedValue item(int index)

                    throws org.omg.CORBA.Bounds;

    public abstract void remove(int index) throws org.omg.CORBA.Bounds;

}

    6.6	 ExceptionList

An ExceptionList is used in the DII to describe the exceptions that can be raised by IDL operations.

It maintains a list of modifiable list of TypeCodes.

pseudo interface ExceptionList {

    readonly attribute unsigned long count;

    void add(in TypeCode exc);

    TypeCode item (in unsigned long index) raises (CORBA::Bounds);

    void remove (in unsigned long index) raises (CORBA::Bounds);

};

// Java

package org.omg.CORBA;

public abstract class ExceptionList {

    public abstract int count();

    public abstract void add(TypeCode exc);

    public abstract TypeCode item(int index)

                throws org.omg.CORBA.Bounds;

    public abstract void remove(int index)

                throws org.omg.CORBA.Bounds;

}

    6.7	 Context

A Context is used in the DII to specify a context in which context strings must be resolved before being sent along with the request invocation.

pseudo interface Context {

    readonly attribute Identifier context_name;

    readonly attribute Context parent;

    Context create_child(in Identifier child_ctx_name);

    void set_one_value(in Identifier propname, in any propvalue);

    void set_values(in NVList values);

    void delete_values(in Identifier propname);

    NVList get_values(in Identifier start_scope,

                         in Flags op_flags,

                         in Identifier pattern);

};

// Java

package org.omg.CORBA;

public abstract class Context {

    public abstract String context_name();

    public abstract Context parent();

    public abstract Context create_child(String child_ctx_name);

    public abstract void set_one_value(String propname,

                        Any propvalue);

    public abstract void set_values(NVList values);

    public abstract void delete_values(String propname);

    public abstract NVList get_values(String start_scpe, int op_flags,

                        String pattern);

}

    6.8	 ContextList

pseudo interface ContextList {

    readonly attribute unsigned long count;

    void add(in string ctx);

    string item(in unsigned long index) raises (CORBA::Bounds);

    void remove(in unsigned long index) raises (CORBA::Bounds);

};

// Java

package org.omg.CORBA;

public abstract class ContextList {

    public abstract int count();

    public abstract void add(String ctx);

    public abstract String item(int index)

        throws org.omg.CORBA.Bounds;

    public abstract void remove(int index)

        throws org.omg.CORBA.Bounds;

}

    6.9	 Request

pseudo interface Request {

    readonly attribute Object target;

    readonly attribute Identifier operation;

    readonly attribute NVList arguments;

    readonly attribute NamedValue result;

    readonly attribute Environment env;

    readonly attribute ExceptionList exceptions;

    readonly attribute ContextList contexts;

    attribute Context ctx;

    any add_in_arg();

    any add_named_in_arg(in string name);

    any add_inout_arg();

    any add_named_inout_arg(in string name);

    any add_out_arg();

    any add_named_out_arg(in string name);

    void set_return_type(in TypeCode tc);

    any return_value();

    void invoke();

    void send_oneway();

    void send_deferred();

    void get_response();

    boolean poll_response();

};

// Java

package org.omg.CORBA;

public abstract class Request {

    public abstract Object target();

    public abstract String operation();

    public abstract NVList arguments();

    public abstract NamedValue result();

    public abstract Environment env();

    public abstract ExceptionList exceptions();

    public abstract ContextList contexts();

    public abstract Context ctx();

    public abstract void ctx(Context c);

    public abstract Any add_in_arg();

    public abstract Any add_named_in_arg(String name);

    public abstract Any add_inout_arg();

    public abstract Any add_named_inout_arg(String name);

    public abstract Any add_out_arg();

    public abstract Any add_named_out_arg(String name);

    public abstract void set_return_type(TypeCode tc);

    public abstract Any return_value();

    public abstract void invoke();

    public abstract void send_oneway();

    public abstract void send_deferred();

    public abstract void get_response();

    public abstract boolean poll_response();

}

    6.10	 ServerRequest and Dynamic Implementation

pseudo interface ServerRequest {

    Identifier op_name();

    Context ctx();

    void params(in NVList parms);

    void result(in Any res);

    void   except(in Any ex);

} ;

// Java

package org.omg.CORBA;

public abstract class ServerRequest {

    public abstract String op_name();

    public abstract Context ctx();

    public abstract void params(NVList parms);

    public abstract void result(Any a);

    public abstract void except(Any a);

The DynamicImplementation interface defines the interface such a dynamic server is expect to implement. Note that it inherits from the base class for stubs and skeletons (see Section 8.5.2, "Portable ObjectImpl").

// Java

package org.omg.CORBA;

public abstract class DynamicImplementation

        extends org.omg.CORBA.portable.ObjectImpl {

    public abstract void invoke(org.omg.CORBA.ServerRequest request);

}

    6.11	 TypeCode

The deprecated parameter and param_count methods are not mapped.

enum TCKind {

    tk_null, tk_void,

    tk_short, tk_long, tk_ushort, tk_ulong,

    tk_float, tk_double, tk_boolean, tk_char,

    tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,

    tk_struct, tk_union, tk_enum, tk_string,

    tk_sequence, tk_array, tk_alias, tk_except,

    tk_longlong, tk_ulonglong, tk_longdouble,

    tk_wchar, tk_wstring, tk_fixed

};

// Java

package org.omg.CORBA;

public final class TCKind {

    public static final int _tk_null = 0;

    public static final

        TCKind tk_null = new TCKind(_tk_null);

    public static final int _tk_void = 1;

        TCKind tk_void = new TCKind(_tk_void);

    public static final int _tk_short = 2;

        TCKind tk_short = new TCKind(_tk_short);

    public static final int _tk_long = 3;

        TCKind tk_long = new TCKind(_tk_long);

    public static final int _tk_ushort = 4;

        TCKind tk_ushort = new TCKind(_tk_ushort);

    public static final int _tk_ulong = 5;

        TCKind tk_ulong = new TCKind(_tk_ulong);

    public static final int _tk_float = 6;

        TCKind tk_float = new TCKind(_tk_float);

    public static final int _tk_double = 7;

        TCKind tk_double = new TCKind(_tk_double);

    public static final int _tk_boolean = 8;

        TCKind tk_boolean = new TCKind(_tk_boolean);

    public static final int _tk_char = 9;

        TCKind tk_char = new TCKind(_tk_char);

    public static final int _tk_octet = 10;

        TCKind tk_octet = new TCKind(_tk_octet);

    public static final int _tk_any = 11;

        TCKind tk_any = new TCKind(_tk_any);

    public static final int _tk_TypeCode = 12;

        TCKind tk_TypeCode = new TCKind(_tk_TypeCode);

    public static final int _tk_Principal = 13;

        TCKind tk_Principal = new TCKind(_tk_Principal);

    public static final int _tk_objref = 14;

        TCKind tk_objref = new TCKind(_tk_objref);

    public static final int _tk_stuct = 15;

        TCKind tk_stuct = new TCKind(_tk_stuct);

    public static final int _tk_union = 16;

        TCKind tk_union = new TCKind(_tk_union);

    public static final int _tk_enum = 17;

        TCKind tk_enum = new TCKind(_tk_enum);

    public static final int _tk_string = 18;

        TCKind tk_string = new TCKind(_tk_string);

    public static final int _tk_sequence = 19;

        TCKind tk_sequence = new TCKind(_tk_sequence);

    public static final int _tk_array = 20;

        TCKind tk_array = new TCKind(_tk_array);

    public static final int _tk_alias = 21;

        TCKind tk_alias = new TCKind(_tk_alias);

    public static final int _tk_except = 22;

        TCKind tk_except = new TCKind(_tk_except);

    public static final int _tk_longlong = 23;

        TCKind tk_longlong = new TCKind(_tk_longlong);

    public static final int _tk_ulonglong = 24;

        TCKind tk_ulonglong = new TCKind(_tk_ulonglong);

    public static final int _tk_longdouble = 25;

        TCKind tk_longdouble = new TCKind(_tk_longdouble);

    public static final int _tk_wchar = 26;

        TCKind tk_wchar = new TCKind(_tk_wchar);

    public static final int _tk_wstring = 27;

        TCKind tk_wstring = new TCKind(_tk_wstring);

    public static final int _tk_fixed = 28;

        TCKind tk_fixed = new TCKind(_tk_fixed);

    public int value() {...}

    public static TCKind from_int(int value) {...}

    private TCKind(int value) {...}

}

pseudo interface TypeCode {

    exception Bounds {};

    exception BadKind {};

    // for all TypeCode kinds

    boolean equal(in TypeCode tc);

    TCKind kind();

    // for objref, struct, union, enum, alias, and except

    RepositoryID id() raises (BadKind);

    RepositoryId name() raises (BadKind);

    // for struct, union, enum, and except

    unsigned long member_count() raises (BadKind);

    Identifier member_name(in unsigned long index)

         raises (BadKind, Bounds);

    // for struct, union, and except

    TypeCode member_type(in unsigned long index)

        raises (BadKind, Bounds);

    // for union

    any member_label(in unsigned long index) raises (BadKind, Bounds);

    TypeCode discriminator_type() raises (BadKind);

    long default_index() raises (BadKind);

    // for string, sequence, and array

    unsigned long length() raises (BadKind);

    TypeCode content_type() raises (BadKind);

    }

// Java

package org.omg.CORBA;

public abstract class TypeCode {

    // for all TypeCode kinds

    public abstract boolean equal(TypeCode tc);

    public abstract TCKind kind();

    // for objref, struct, unio, enum, alias, and except

    public abstract String id() throws TypeCodePackage.BadKind;

    public abstract String name() throws TypeCodePackage.BadKind;

    // for struct, union, enum, and except

    public abstract int member_count() throws TypeCodePackage.BadKind;

    public abstract String member_name(int index)

            throws TypeCodePackage.BadKind;

    // for struct, union, and except

    public abstract TypeCode member_type(int index)

            throws TypeCodePackage.BadKind,

                TypeCodePackage.Bounds;

    // for union

    public abstract Any member_label(int index)

            throws TypeCodePackage.BadKind,

                        TypeCodePackage.Bounds;

    public abstract TypeCode discriminator_type()

            throws TypeCodePackage.BadKind;

    public abstract int default_index() throws TypeCodePackage.BadKind;

    // for string, sequence, and array

    public abstract int length() throws TypeCodePackage.BadKind;

    public abstract TypeCode content_type() throws TypeCodePackage.BadKind;

}

    6.12	 ORB

Issue -  create_named_value() is incorrect in the CORBA spec. We have used the correct definition here. It is indicated as a change to CORBA 2.0

The UnionMemeberSeq, EnumMemberSeq, and StructMemberSeq typedefs are real IDL and bring in the Interface Repository. Rather than tediously list its interfaces, and other assorted types, suffice it to say that it is all mapped following the rules for IDL set forth in this specification in Chapter 5, "Mapping IDL to Java".

StructMember[], UnionMember[], EnumMember[]

pseudo interface ORB {

    exception InvalidName {};

    typedef string ObjectId;

    typedef sequence<ObjectId> ObjectIdList;

    ObjectIdList list_initial_services();

    Object resolve_initial_references(in ObjectId object_name)

        raises(InvalidName);

    string object_to_string(in Object obj);

    Object string_to_object(in string str);

    NVList create_list(in long count);

    NVList create_operation_list(in OperationDef oper);

    NamedValue create_named_value(in String name, in Any value,

                    in Flags flags);

    ExceptionList create_exception_list();

    ContextList create_context_list();

    Context get_default_context();

    Environment create_environment();

    void send_multiple_requests_oneway(in RequestSeq req);

    void send_multiple_requests_deferred(in RequestSeq req);

    boolean poll_next_response();

    Request get_next_response();

// typecode creation

    TypeCode create_struct_tc (	in RepositoryId id,

            in Identifier name,

            in StructMemberSeq members);

    TypeCode create_union_tc (	in RepositoryId id,

             in Identifier name,

            in TypeCode discriminator_type,

            in UnionMemberSeq members);

    TypeCode create_enum_tc (	in RepositoryId id,

            in Identifier name,

            in EnumMemberSeq members);

    TypeCode create_alias_tc (	in RepositoryId id,

            in Identifier name,

            in TypeCode original_type);

    TypeCode create_exception_tc (	in RepositoryId id,

            in Identifier name,

            in StructMemberSeq members);

    TypeCode create_interface_tc (	in RepositoryId id,

            in Identifier name);

    TypeCode create_string_tc (in unsigned long bound);

    TypeCode create_wstring_tc (in unsigned long bound);

    TypeCode create_sequence_tc (in unsigned long bound,

            in TypeCode element_type);

    TypeCode create_recursive_sequence_tc(in unsigned long bound,

            in unsigned long offset);

    TypeCode create_array_tc (in unsigned long length,

            in TypeCode element_type);

    Current get_current();

// Additional operations for Java mapping

    TypeCode get_primitive_tc(in TCKind tcKind);

    Any create_any();

    OutputStream create_output_stream();

    void connect(Object obj);

    void disconnect(Object obj);

// additional methods for ORB initialization go here, but only

// appear in the mapped Java (see Section 8.8, "ORB Initialization" )

// Java signatures

//	public static ORB init(Strings[] args, Properties props);

//	public static ORB init(Applet app, Properties props);

//	public static ORB init();

// abstract protected void set_parameters(String[] args,

//			java.util.Properties props);

// abstract protected void set_parameters(java.applet.Applet app,

//			java.util.Properties props);

}

// Java

package org.omg.CORBA;

public abstract class ORB {

    public abstract String[] list_initial_services();

    public abstract org.omg.CORBA.Object resolve_initial_references(

        String object_name)

        throws org.omg.CORBA.ORBPackage.InvalidName;

    public abstract String object_to_string(org.omg.CORBA.Object obj);

    public abstract org.omg.CORBA.Object string_to_object(String str);

    public abstract NVList create_list(int count);

    public abstract NVList create_operation_list(OperationDef oper);

    public abstract NamedValue create_named_value(String name,

                      Any value,

                      int flags);

    public abstract ExceptionList create_exception_list();

    public abstract ContextList create_context_list();

    public abstract Context get_default_context();

    public abstract Environment create_environment();

    public abstract void send_multiple_requests_oneway(Request[] req);

    public abstract void sent_multiple_requests_deferred(Request[] req);

    public abstract boolean poll_next_response();

    public abstract Request get_next_response();

    // typecode creation

    public abstract TypeCode create_struct_tc(String id,

                        String name,

                        StructMember[] members);

    public abstract TypeCode create_union_tc(String id,

                        String name,

                        TypeCode discriminator_type,

                        UnionMember[] members);

    public abstract TypeCode create_enum_tc(String id,

                        String name,

                        EnumMember[] members);

    public abstract TypeCode create_alias_tc(String id,

                        String name,

                        TypeCode original_type);

    public abstract TypeCode create_exception_tc(String id,

                        String name,

                        StructMember[] members);

    public abstract TypeCode create_interface_tc(String id,

                        String name);

    public abstract TypeCode create_string_tc(int bound);

    public abstract TypeCode create_wstring_tc(int bound);

    public abstract TypeCode create_sequence_tc(int bound,

                        TypeCode element_type);

    public abstract TypeCode create_recursive_sequence_tc(int bound,

                        int offset);

    public abstract TypeCode create_array_tc(int length,

                        TypeCode element_type);

    public abstract Current get_current();

    // additional methods for IDL/Java mapping

    public abstract TypeCode get_primitive_tc(TCKind tcKind);

    public abstract Any create_any();

    public abstract org.omg.CORBA.portable.OutputStream

        create_output_stream();

    public abstract void connect(org.omg.CORBA.Object obj);

    public abstract void disconnect(org.omg.CORBA.Object obj);

    // additional static methods for ORB initialization

    public static ORB init(Strings[] args, Properties props);

    public static ORB init(Applet app, Properties props);

    public static ORB init();

    abstract protected void set_parameters(String[] args,

                    java.util.Properties props);

    abstract protected void set_parameters(java.applet.Applet app,

                    java.util.Properties props);

}

    6.13	 CORBA::Object

The IDL Object type is mapped to the org.omg.CORBA.Object and org.omg.CORBA.ObjectHelper classes as shown below.

The Java interface for each user defined IDL interface extends org.omg.CORBA.Object, so that any object reference can be passed anywhere a org.omg.CORBA.Object is expected.

// Java

package org.omg.CORBA;

public interface Object {

    boolean _is_a(String Identifier);

    boolean _is_equivalent(Object that);

    boolean _non_existent();

    int _hash(int maximum);

    org.omg.CORBA.Object _duplicate();

    void _release();

    ImplementationDef _get_implementation();

    InterfaceDef _get_interface();

    Request _request(String s);

    Request _create_request(Context ctx,

                String operation,

                NVList arg_list,

                NamedValue result);

    Request _create_request(Context ctx,

                String operation,

                NVList arg_list,

                NamedValue result,

                ExceptionList exclist,

                ContextList ctxlist);

}

    6.14	 Current

pseudo interface Current {

}

// Java

public abstract class Current

        extends org.omg.CORBA.portable.ObjectImpl {

}

    6.15	 Principal

pseudo interface Principal {

attribute sequence<octet> name;

}

// Java

public abstract class Principal {

    public abstract byte[] name();

    public abstract void name(byte[] name);

}


7 - Server-Side Mapping

Server-Side Mapping

7

7.1 Introduction

This chapter discusses how implementations create and register objects with the ORB runtime.

It will be patterned after the server framework architecture to be described by the final submission to the Server Side Portability RFP.

Issue - This chapter is subject to revision pending the outcome of the Portability RFP submission

7.2 Transient Objects

For this initial submission only a minimal API to allow application developers to implement transient ORB objects is described. We do not expect there to be major changes as a result of the Portability work.

7.2.1 Servant Base Class

For each IDL interface <interface_name> the mapping defines a Java class as follows:

// Java

public class _<interface_name>ImplBase implements <interface_name> {

}

7.2.2 Servant Class

For each interface, the developer must write a servant class. Instances of the servant class implement ORB objects. Each instance implements a single ORB object, and each ORB object is implemented by a single servant.

Each object implementation implements ORB objects that supports a most derived IDL interface. If this interface is <interface_name>, then the servant class must extend _<interface_name>ImplBase.

The servant class must define public methods corresponding to the operations and attributes of the IDL interface supported by the object implementation, as defined by the mapping specification for IDL interfaces. Providing these methods is sufficient to satisfy all abstract methods defined by _<interface_name>ImplBase.

7.2.3 Creating A Transient ORB Object

To create an instance of an object implementation, the developer instantiates the servant class.

7.2.4 Connecting a Transient ORB Object

Object implementations (object references) may be explicitly connected to the ORB by calling the ORB's connect() method (see Section 6.12, "ORB").

An object implementation may also be automatically and implicitly connected to the ORB if it is passed as a (mapped IDL) parameter to a (mapped) IDL operation that is itself not implemented as a local (Java) object. I.e., it has to be marshaled and sent outside of the process address space. Note, a vendor is free to connect such an object implementation "earlier" (e.g. upon instantiation), but it must connect the implementation to the ORB when it is passed as described above.

Note that calling connect() when an object is already connected has no effect.

7.2.5 Disconnecting a Transient ORB Object

The servant may disconnect itself from the ORB by invoking the ORB's disconnect() method (see Section 6.12, "ORB"). After this method returns, incoming requests will be rejected by the ORB by raising the CORBA::OBJECT_NOT_EXIST exception. The effect of this method is to cause the ORB object to appear to be destroyed from the point of view of remote clients.

Note that calling disconnect() when the object is not connected has no effect.

Note however, that requests issued using the servant directly (e.g. using the implementatioon's this pointer) do not pass through the ORB; these requests will continue to be processed by the servant.

7.3 Persistent Objects

Issue - dependent upon the Portability specification


 <HTML>
<HEAD>
<TITLE>Getting Started with Java IDL: Running HelloApplet</TITLE>
<X-SAS-WINDOW TOP=42 BOTTOM=477 LEFT=4 RIGHT=534>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1 ALIGN=CENTER>Running the Hello World Applet</H1>
<HR>

<P>If all goes well, the applet appears below:

<P>
<APPLET CODE=HelloApplet.class
CODEBASE='enter_the_path_to_your_project_directory_here'
WIDTH=500
HEIGHT=300>
<PARAM name="org.omg.CORBA.ORBInitialHost" value=enter_server_machine_name>
<PARAM name="org.omg.CORBA.ORBInitialPort" value=1050>
</APPLET>

</BODY>
</HTML>

Copyright © 1996-2000 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA. 94043-1100 USA., All rights reserved.


Input Method Framework

Documentation Contents

The input method framework enables the collaboration between text editing components and input methods in entering text. 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.

The input method framework provides two layers of public interfaces:

  • The input method client API provides interfaces and classes that enable text editing components to communicate with input methods and implement a well-integrated text input user interface.
  • The input method engine SPI provides interfaces that enable the development of input methods in the Java programming language that can be used with any Java runtime environment.

Overview and Specification

  • Overview
  • Specification

API and SPI Reference

  • Input method client API reference
  • Input method engine SPI reference

Tutorials

  • Input method client API tutorial
  • Input method engine SPI tutorial

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software


 All Classes
ActiveClient
LWTextComponent


Generated Documentation (Untitled)

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link to Non-frame version.


The front page has been renamed.Please see:
Frame version
Non-frame version.


Copyright Information

© 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.
2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.

This document is protected by copyright. No part of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.

The information described in this document may be protected by one or more U.S. patents, foreign patents, or pending applications.

TRADEMARKS

Sun, Sun Microsystems, Sun Microelectronics, the Sun Logo, SunXTL, JavaSoft, JavaOS, the JavaSoft Logo, Java, HotJava, JavaChips, picoJava, microJava, UltraJava, JDBC, the Java Cup and Steam Logo, "Write Once, Run Anywhere" and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
UNIX ® is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd.
Adobe ® is a registered trademark of Adobe Systems, Inc.
Netscape NavigatorTM is a trademark of Netscape Communications Corporation.
All other product names mentioned herein are the trademarks of their respective owners.

THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE DOCUMENT. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.


Internationalization

 Documentation Contents
Internationalization is the process of designing an application so that it can be adapted to various languages and regions without engineering changes. Sometimes the term internationalization is abbreviated as i18n, because there are 18 letters between the first "i" and the last "n."

An internationalized program has the following characteristics:

  • With the addition of localization data, the same executable can run worldwide.
  • Textual elements, such as status messages and the GUI component labels, are not hardcoded in the program. Instead they are stored outside the source code and retrieved dynamically.
  • Support for new languages does not require recompilation.
  • Culturally-dependent data, such as dates and currencies, appear in formats that conform to the end user's region and language.
  • It can be localized quickly.

Acknowledgment: Much of the design and implementation of the internationalization API is by IBM's Center for Java Technology-- Silicon Valley. Java Software of Sun Microsystems is grateful for their work.

General Information
  • Internationalization Overview
  • Internationalization Trail of the Java Tutorial
  • Frequently Asked Questions
  • Supported Locales
  • Supported Encodings

Fonts
  • Font Overview, including notes about adding fonts
  • Font Properties
  • Physical Fonts

Input Methods
  • An overview of Input Methods
  • Input Method Framework

Complex Output
  • International Text in the Java 2 SDK

Demos
The demos will run in the appletviewer tool or in a browser that supports the feature set of version 1.1 of the Java platform or the Java 2 Platform.
  • Collation
  • Date and time formatting
  • Message formatting
  • Number formatting
  • Text boundaries

Tools
  • native2ascii - converts native-encoded characters to and from Unicode
    • Solaris version
    • Windows version

Copyright © 1996-99. Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com 		Sun
Java Software


Contents | Prev | Next

Introduction
Locales
Locale Class
Supported Locales

Localized Resources
ResourceBundle Class
ListResourceBundle Class
PropertyResourceBundle Class

Calendar and Time Zone Support
Calendar Class
TimeZone Class

Formatting
Format Class
DateFormat Class
SimpleDateFormat Class
DateFormatSymbols Class
NumberFormat Class
DecimalFormat Class
DecimalFormatSymbols Class
ChoiceFormat Class
MessageFormat Class
ParsePosition Class
FieldPosition Class

Locale-Sensitive String Operations
Collator Class
RuleBasedCollator Class
CollationElementIterator Class
CollationKey Class
BreakIterator Class
StringCharacterIterator Class
CharacterIterator Interface

Character Set Conversion
Supported Encodings

AWT Attributes
Name Attribute
Locale Attribute

Stream I/O
Reader and Writer Classes
PrintStream Class

Character Classification
Input Methods
Input Method Support in Swing
Input Method Framework

Contents | Prev | Next
java-intl@java.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


I/O in the Java(TM) 2 Platform

Java

I/O in the JavaTM 2 Platform

 Documentation Contents
I/O functionality of the JavaTM 2 Platform provides for system input and output through data streams, serialization and the file system.

Class java.io.File in the Java 2 platform is a true abstract representation of file and directory pathnames. Class File supports temporary files, conversion of abstract pathnames to URL's, comparability, and access to additional file attributes.

Java 2 Platform I/O Features

  • Features of java.io.File added in the Java 2 Platform v1.2
  • Other changes made to the java.io package in the Java 2 Platform v1.2

For completeness, a discussion of the JDK 1.1 I/O changes can be found here as well:

I/O Guide to features introduced in JDKTM 1.1

  • Character Streams

Additional I/O reference material

  • java.io Package- (API Documentation)
  • Troubleshooting tips

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


JAR Features

Java

JavaTM Archive (JAR) Features

 Documentation Contents
JAR (Java Archive) is a platform-independent file format that aggregates many files into one. Multiple Java applets and their requisite components (.class files, images and sounds) can be bundled in a JAR file and subsequently downloaded to a browser in a single HTTP transaction, greatly improving the download speed. The JAR format also supports compression, which reduces the file size, further improving the download time. In addition, the applet author can digitally sign individual entries in a JAR file to authenticate their origin. It is fully backward-compatible with existing applet code and is fully extensible.

This version of the Java platform extends the utility of the JAR format. Enhancements include added functionality for the command-line JAR tool for creating Jar-file indexes for faster access to Jar-file contents. There are also new standard APIs for a "delete-on-close" mode for opening Jar files.

JAR File Specification and Overview
  • JAR File Specification
  • JAR File Overview
JAR Files and the Extensions Framework
  • The new extensions mechanism in the Java platform uses the JAR file format to package extension classes. Manifest attributes are available to support the extension mechanism and related features such as package sealing and package versioning. See the extensions specification for details.
Enhanced Jar Tool
  • The Jar tool has the new -i option for creating JAR file indexes. See the Jar tool reference pages:
    Jar tool reference page for Solaris
    Jar tool reference page for Windows
Reading and Writing JAR Files: API Specification
  • Package java.util.jar: classes for creating and reading JAR files
  • Class java.net.JarURLConnection: Abstract class for URL connections to JAR files using the jar protocol.

The API of classes java.util.zip and java.util.jar have been enhanced with the addition of the following:
  • java.util.zip.OPEN_READ
  • java.util.zip.OPEN_DELETE
  • java.util.zip.ZipFile(File file, int mode)
  • java.util.jar.JarFile(File file, boolean verify, int mode)
The previous implementation of caching downloaded Jar files created problems for long-running server application and for RMI. Each open JarURLConnection creates a temporary local file that holds Jar-file date, and a JarFile object is created on top of the temporary file. Because the open file handle/descriptor on each temporary file was never closed, the files could quickly take up disk space for long-running server applications. The new API provides a solution for this problem by supporting a new "delete-on-close" mode for opening Zip and Jar files.
Tutorial

On the Java Software website:
  • The Java Archive (JAR) File Format trail in the Java Tutorial.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


JDBC Documentation

JDBCTM API Documentation

 Documentation Contents

The JDBCTM API provides universal data access from the JavaTM programming language. Using the JDBC 2.0 API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built.

The JDBC 2.0 API is comprised of two packages:

  1. the java.sql package -- included in the Java 2 SDK, Standard Edition
  2. the javax.sql package -- included in the Java 2 SDK, Enterprise Edition or available as a separate download

JDBC Technology Drivers

To use the JDBC API with a particular database management system, you need a JDBC technology-based driver to mediate between JDBC technology and the database. Depending on various factors, a driver might be written purely in the Java programming language or in a mixture of the Java programming language and JavaTM Native Interface (JNI) native methods. The JDBC web site maintains a list of vendors with drivers currently available or under development.

The latest SDK includes a JDBC-ODBC Bridge driver that makes most Open Database Connectivity (ODBC) drivers available to programmers using the JDBC API. JDBC-ODBC Bridge Driver describes the current status of this software. Note that the bridge driver included in the SDK is appropriate only for experimental use or when no other driver is available.

Getting Started
  • JDBCTM Technology Guide: Getting Started.
The JDBCTM API Specification
  • Specifications
    • The JDBCTM 1.2 Specification. Also available for download in postscript and pdf formats.
    • The JDBCTM 2.1 Core API Specification Update. Also available in postscript format and pdf format.
    • The JDBCTM Optional Package Specification. Available in postscript format and pdf format.

  • JDBC API javadoc
    • java.sql -- JDBC 2.1 core API
    • javax.sql -- JDBC 2.0 Optional Package (formerly known as the JDBC 2.0 Standard Extension)
Online Tutorials
  • Basic Tutorial
  • Advanced Tutorial
  • Rowset Tutorial
Related Documents
  • Answers to Frequently-Asked Questions
  • Using Blob objects (Binary Large Objects) Chapter 8 of the JDBC Java Series book
  • Using Clob objects (Character Large Objects) Chapter 10 of the JDBC Java Series book
  • Java Series book JDBCTM API Tutorial and Reference, Second Edition
  • Java 2 SDK, Enterprise Edition, documentation web page

JDBC Site on java.sun.com

Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com

Java Software


[Top] [Prev] [Next]

9 - JDBC-ODBC Bridge Driver

9.1 Obtaining a JDBC Driver

It is recommended that you obtain a commercial JDBC driver from a vendor such as your database vendor or your database middleware vendor. Check the list of drivers currently available.

The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.

9.2 JDBC-ODBC Bridge

If possible, use a Pure Java JDBC driver instead of the Bridge and an ODBC driver. This completely eliminates the client configuration required by ODBC. It also eliminates the potential that the Java VM could be corrupted by an error in the native code brought in by the Bridge (that is, the Bridge native library, the ODBC driver manager library, the ODBC driver library, and the database client library).

The JDBC-ODBC Bridge driver is recommended for use in prototyping efforts and for cases where no other JDBC technology-based driver exists. If a commercial, all-Java JDBC driver is available, we recommend that it be used instead of the Bridge.

9.2.1 What Is the JDBC-ODBC Bridge?

The JDBC-ODBC Bridge is a JDBC driver that implements JDBC operations by translating them into ODBC operations. To ODBC it appears as a normal application program. The Bridge implements JDBC for any database for which an ODBC driver is available. The Bridge is implemented as the sun.jdbc.odbc Java package and contains a native library used to access ODBC. The Bridge is a joint development of Merant and Java Software.

9.2.2 ODBC Compatibility and ODBC Versions Supported

On Solaris, the JDBC 2.0 bridge must be used with an ODBC 3.x driver manager. The bridge supports both ODBC 2.x and ODBC 3.x drivers, but has been tested with only ODBC 3.x drivers.

On NT, the JDBC 2.0 bridge supports the ODBC 2.x and ODBC 3.x driver manager and drivers. The JDBC 2.0 bridge has been tested only with an ODBC 3.x driver manager and with both ODBC 2.x and 3.x drivers.

Merant recommends that the JDBC 2.0 bridge be used with version 3.5 or higher of Merant's DataDirect ODBC drivers.

9.2.3 The Bridge Implementation

The Bridge is implemented in Java and uses Java native methods to call ODBC.

9.2.4 Installation

The Bridge is installed automatically with the Java 2 SDK, Standard Edition, as package sun.jdbc.odbc. See your ODBC driver vendor for information on installing and configuring ODBC. No special configuration is required for the Bridge. See your database vendor for client installation and configuration information. On Solaris, some ODBC driver managers name their libs libodbcinst.so and libodbc.so. The Bridge expects these libraries to be named libodbcinst.so.1 and libodbc.so.1, so symbolic links for these names must be created.

9.3 Using the Bridge

The Bridge is used by opening a JDBC connection using a URL with the odbc subprotocol. See below for URL examples. Before a connection can be established, the bridge driver class, sun.jdbc.odbc.JdbcOdbcDriver, must either be added to the java.lang.System property named jdbc.drivers, or it must be explicitly loaded using the Java class loader. Explicit loading is done with the following line of code:

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
When loaded, the ODBC driver (like all good JDBC drivers) creates an instance of itself and registers this with the JDBC driver manager.

9.3.1 Using the Bridge from an Applet

JDBC used with a Pure Java JDBC driver works well with applets. The Bridge driver does not work well with applets.

9.3.2 Most Browsers Do Not Support the Bridge

Since the Bridge is an optional component of the Java 2 SDK, Standard Edition, it may not be provided by a browser. Even if it is provided, only trusted applets (those allowed to write to files) will be able to use the Bridge. This is required in order to preserve the security of the applet sandbox. Finally, even if the applet is trusted, ODBC and the DBMS client library must be configured on each client.

9.3.3 Tested Configurations

From Solaris, we have used the Bridge to access Oracle 8.1.5 using version 3.5 of Merant's ODBC drivers. From NT, we have used the Bridge to access SQL Server 6.x using the latest ODBC driver from Microsoft.

9.3.4 ODBC Drivers Known to Work with the Bridge

ODBC drivers are available for Oracle, Sybase, Informix, Microsoft SQL Server, and Ingres. The MERANT ODBC driver suite should be completely compatible with the JDBC-ODBC Bridge. To evaluate or purchase MERANT ODBC drivers, please contact MERANT DataDirect Sales at 1-800-547-4000 Option 2 or via the World Wide Web at http:\\www.merant.com. The MS SQL Server driver has also been used successfully on NT. Many other ODBC drivers will likely work.

9.3.5 What Is the JDBC URL Supported by the Bridge?

The Bridge driver uses the odbc subprotocol. URLs for this subprotocol are of the form:

    jdbc:odbc:<data-source-name>[;<attribute-name>=<attribute-value>]*
For example:

    jdbc:odbc:sybase
    jdbc:odbc:mydb;UID=me;PWD=secret
    jdbc:odbc:ora123;Cachesize=300

9.3.6 Debugging

The Bridge provides extensive tracing when DriverManager tracing is enabled. The following line of code enables tracing and sends it to standard out:

     java.sql.DriverManager.setLogStream(java.lang.System.out);

9.4 New JDBC 2.0 API Features Supported by the Bridge

The JDBC-ODBC Bridge driver in this release supports the following new features in the JDBC 2.0 API:

  • batch updates
  • updatable result sets
  • scrollable result sets
  • the new BigDecimal methods
  • the new Date, Time, and Timestamp methods

The current release of the Bridge supports multi-threaded ODBC drivers and contains numerous bug fixes.

[Top] [Prev] [Next]

jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996 - 1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

1 Introduction

Many vendors and customers are now looking for easy database access for Java applications. Since Java is robust, secure, easy to use, easy to understand, and automatically downloadable on a network, it is an excellent language basis for the development of database applications. It offers many advantages over C, C++, Smalltalk, BASIC, COBOL, and 4GLs for a wide variety of uses.

Many Java application developers would like to write code that is independent of the particular DBMS or database connectivity mechanism being used, and we believe that a DBMS-independent interface is also the fastest way to implement access to the wide variety of DBMSs. So, we decided it would be useful to the Java community to define a generic SQL database access framework which provides a uniform interface on top of a variety of different database connectivity modules. This allows programmers to write to a single database interface, enables DBMS-independent Java application development tools and products, and allows database connectivity vendors to provide a variety of different connectivity solutions.

Our immediate priority has been to define a common low-level API that supports basic SQL functionality. We call this API JDBC. This API in turn allows the development of higher-level database access tools and APIs.

Fortunately we didn't need to design a SQL API from scratch. We based our work on the X/Open SQL CLI (Call Level Interface) which is also the basis for Microsoft's ODBC interface. Our main task has been defining a natural Java interface to the basic abstractions and concepts defined in the X/Open CLI.

It is important that the JDBC API be accepted by database vendors, connectivity vendors, ISVs, and application writers. We believe that basing our work on the ODBC abstractions is likely to make this acceptance easier, and technically ODBC seems a good basis for our design.

ODBC is not appropriate for direct use from Java, since it is a C interface; calls from Java to native C code have a number of drawbacks in the security, implementation, robustness, and automatic portability of applications. Thus, we have constructed an API that can easily be implemented on top of ODBC short-term, and that can be implemented in other ways longer term.

1.1 Acknowledgments

We would like to thank the many reviewers in the database, database connectivity, and database tools communities who gave generously of their time and expertise.

We are grateful to all the reviewers who took the time to read and comment on the various drafts, but we would particularly like to thank Azad Bolour, Paul Cotton, Ed Garon, John Goodson, Mark Hapner, Tommy Hawkins, Karl Moss, and Barbara Walters for providing sustained review and helpful feedback over many drafts and revisions of the API.

The errors and omissions that remain, are however, all our own work.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

2 Goals and philosophy

This section outlines the main goals and philosophy driving the API design.

2.1 A SQL level API

JDBC is intended as a "call-level" SQL interface for Java. This means the focus is on executing raw SQL statements and retrieving their results. We expect that higher-level APIs will be defined as well, and these will probably be implemented on top of this base level. Examples of higher-level APIs are direct transparent mapping of tables to Java classes, semantic tree representations of more general queries, and an embedded SQL syntax for Java.

We expect that various application builder tools will emit code that uses our API. However we also intend that the API be usable by human programmers, especially because there is no other solution available for Java right now.

2.2 SQL Conformance

Database systems support a wide range of SQL syntax and semantics, and they are not consistent with each other on more advanced functionality such as outer joins and stored procedures. Hopefully with time the portion of SQL that is truly standard will expand to include more and more functionality. In the meantime, we take the following position:

  • JDBC allows any query string to be passed through to an underlying DBMS driver, so an application may use as much SQL functionality as desired at the risk of receiving an error on some DBMSs. In fact, an application query need not even be SQL, or it may be a specialized derivative of SQL, e.g. for document or image queries, designed for specific DBMSs.

  • In order to pass JDBC compliance tests and to be called "JDBC COMPLIANT(TM)" we require that a driver support at least ANSI SQL92 Entry Level. This gives applications that want wide portability a guaranteed least common denominator. We believe ANSI SQL-2 Entry Level is reasonably powerful and is reasonably widely supported today.

2.3 JDBC must be implementable on top of common database interfaces

We need to ensure that the JDBC SQL API can be implemented on top of common SQL level APIs, in particular ODBC. This requirement has colored some parts of the specification, notably the handling of OUT parameters and large blobs.

2.4 Provide a Java interface that is consistent with the rest of the Java system

There has been a very strong positive response to Java. To a large extent this seems to be because the language and the standard runtimes are perceived as being consistent, simple, and powerful.

As far as we can, we would like to provide a Java database interface that builds on and reinforces the style and virtues of the existing core Java classes.

2.5 Keep it simple

We would prefer to keep this base API as simple as possible, at least initially. In general we would prefer to provide a single mechanism for performing a particular task, and avoid providing duplicate mechanisms. We will extend the API later if any important functionality is missing.

2.6 Use strong, static typing wherever possible

We would prefer that the JDBC API be strongly typed, with as much type information as possible expressed statically. This allows for more error checking at compile time.

Because SQL is intrinsically dynamically typed, we may encounter type mismatch errors at run-time where for example a programmer expected a SELECT to return an integer result but the database returned a string "foo". However we would still prefer to allow programmers to express their type expectations at compile time, so that we can statically check as much as possible. We will also support dynamically typed interfaces where necessary (see particularly Chapter 14).

2.7 Keep the common cases simple

We would like to make sure that the common cases are simple, and that the uncommon cases are doable.

A common case is a programmer executing a simple SQL statement (such as a SELECT, INSERT, UPDATE or DELETE) without parameters, and then (in the case of SELECT statement) processing rows of simple result types. A SQL statement with IN parameters is also common.

Somewhat less common, but still important, is the case where a programmer invokes a SQL statement using INOUT or OUT parameters. We also need to support SQL statements that read or write multi-megabyte objects, and less common cases such as multiple result sets returned by a SQL statement.

We expect that metadata access (e.g. to discover result-set types, or to enumerate the procedures in a database) is comparatively rare and is mostly used by sophisticated programmers or by builder tools. Metadata functions are therefore documented at the end of the specification, along with dynamically-typed data access; the average programmer can skip these sections.

2.8 Use multiple methods to express multiple functionality

One style of interface design is to use a very small number of procedures and offer a large number of control flags as arguments to these procedures, so that they can be used to effect a wide range of different behavior.

In general the philosophy of the Java core classes has been to use different methods to express different functionality. This tends to lead to a larger number of methods, but makes each method easier to understand. This approach has the major advantage that programmers who are learning how to use the basic interface aren't confused by having to specify arguments related to more complex behaviors.

We've tried to adopt the same approach for the JDBC interface, and in general have preferred to use multiple methods rather than using multi-purpose methods with flag arguments.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

3 Overview of the major interfaces

There are two major sets of interfaces. First there is a JDBC API for application writers. Second there is a lower level JDBC Driver API.

3.1 The JDBC API

The JDBC API is expressed as a series of abstract Java interfaces that allow an application programmer to open connections to particular databases, execute SQL statements, and process the results.

The most important interfaces are:

  • java.sql.DriverManager which handles loading of drivers and provides support for creating new database connections

  • java.sql.Connection which represents a connection to a particular database

  • java.sql.Statement which acts as a container for executing a SQL statement on a given connection

  • java.sql.ResultSet which controls access to the row results of a given Statement

The java.sql.Statement interface has two important sub-types: java.sql.PreparedStatement for executing a pre-compiled SQL statement, and java.sql.CallableStatement for executing a call to a database stored procedure.

The following chapters provide more information on how these interfaces work. See the separate JDBC API documents for complete documentation of JDBC interfaces and classes.

3.2 The JDBC Driver Interface

The java.sql.Driver interface is fully defined in Chapter 9. For the most part the database drivers simply need to provide implementations of the abstract classes provided by the JDBC API. Specifically, each driver must provide implementations of java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.CallableStatement, and java.sql.ResultSet.

In addition, each database driver needs to provide a class which implements the java.sql.Driver interface used by the generic java.sql.DriverManager class when it needs to locate a driver for a particular database URL.

JavaSoft is providing an implementation of JDBC on top of ODBC, shown as the JDBC-ODBC bridge in the picture. Since JDBC is patterned after ODBC, this implementation is small and efficient.

Another useful driver is one that goes directly to a DBMS-independent network protocol. It would be desirable to publish the protocol to allow multiple server implementations, e.g. on top of ODBC or on specific DBMSs (although there are already products that use a fixed protocol such as this, we are not yet trying to standardize it). Only a few optimizations are needed on the client side, e.g. for schema caching and tuple look-ahead, and the JDBC Manager itself is very small and efficient as well. The net result is a very small and fast all-Java client side implementation that speaks to any server speaking the published protocol.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

4 Scenarios for use

Before looking at specifics of the JDBC API, an understanding of typical use scenarios is helpful. There are two common scenarios that must be treated differently for our purposes: applets and applications.

4.1 Applets

The most publicized use of Java to date is for implementing applets that are downloaded over the net as parts of web documents. Among these will be database access applets, and these applets could use JDBC to get to databases.

For example, a user might download a Java applet that displays historical price graphs for a custom portfolio of stocks. This applet might access a relational database over the Internet to obtain the historical stock prices.

The most common use of applets may be across untrusted boundaries, e.g. fetching applets from another company on the Internet. Thus, this scenario might be called the "Internet" scenario. However, applets might also be downloaded on a local network where client machine security is still an issue.

Typical applets differ from traditional database applications in a number of ways:

  • Untrusted applets are severely constrained in the operations they are allowed to perform. In particular, they are not allowed any access to local files and they are not allowed to open network connections to arbitrary hosts.

  • Applets on the Internet present new problems with respect to identifying and connecting to databases.1

  • Performance considerations for a database connectivity implementation differ when the database may be halfway around the world. Database applets on the Internet will experience quite different network response times than database applications on a local area network.

4.2 Applications

Java can also be used to build normal applications that run like any shrink-wrapped or custom application on a client machine. We believe this use of Java will become increasingly common as better tools become available for Java and as people recognize the improved programming productivity and other advantages of Java for application development. In this case the Java code is trusted and is allowed to read and write files, open network connections, etc., just like any other application code.

Perhaps the most common use of these Java applications will be within a company or on an "Intranet," so this might be called the Intranet scenario. For example, a company might implement all of its corporate applications in Java using GUI building tools that generate Java code for forms based on corporate data schemas. These applications would access corporate database servers on a local or wide area network. However, Java applications could also access databases through the Internet.

The Java application and "Intranet" cases differ from applets in a number of ways. For example, the most natural way to identify a database is typically for the user or application to specify a database name, e.g. "Customers" or "Personnel". The users will expect the system to locate the specific machine, DBMS, JDBC driver, and database.

4.3 Other scenarios

There are some other special cases of interest:

  • Trusted applets are applets that have convinced the Java virtual machine* that they can be trusted. They might be trusted because they have been signed with a particular cryptographic key, or because the user has decided to trust applets from a particular source. We will treat these applets the same as applications for security purposes, but they may behave more like applets for other purposes, e.g. locating a database on the Internet.

  • Three-tier access to databases may be used, in contrast to direct client/server access from Java GUIs to DBMS servers. In this scenario, Java applications make calls to a "middle tier" of services on the net whose implementations in turn access databases. These calls might be made through RPC (remote procedure call) or through an ORB (object request broker), and in either case the middle tier might best be defined using an object paradigm, e.g. "customer objects" with operations for customer invoicing, address changes, and other transactions.

We expect that three-tier access will become more common because it is attractive to the MIS director to explicitly define the legal operations on their corporate data rather than allowing direct unrestricted updates to the DBMS servers. Also, the three-tier architecture can provide performance advantages in many cases.

Today, the middle tier is typically implemented in a language such as C or C++. With the introduction of optimizing compilers translating Java byte codes into efficient machine-specific code, the middle tier may practically be implemented in Java; Java has many valuable qualities (robustness, security, multi-threading) for these purposes. JDBC will be of use for this middle tier.

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Contents | Prev | Next
1 For example, you could not depend on your database location or driver being in a .INI file or local registry on the client's machine, as in ODBC.

jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

5 Security considerations

Based on the previous discussion, there are two main JDBC scenarios to consider for security purposes:

  • In the case of Java applications, the Java code is "trusted". We also consider trusted applets in this category for security purposes.

  • In contrast, untrusted Java applets are not permitted access to local files and or network connections to arbitrary hosts.

5.1 JDBC and untrusted applets

JDBC should follow the standard applet security model. Specifically:

  • JDBC should assume that normal unsigned applets are untrustworthy

  • JDBC should not allow untrusted applets access to local database data

  • If a downloaded JDBC Driver registers itself with the JDBC DriverManager, then JDBC should only use that driver to satisfy connection requests from code which has been loaded from the same source as the driver.

  • An untrusted applet will normally only be allowed to open a database connection back to the server from which it was downloaded

  • JDBC should avoid making any automatic or implicit use of local credentials when making connections to remote database servers.

If the JDBC Driver level is completely confident that opening a network connection to a database server will imply no authentication or power beyond that which would be obtainable by any random program running on any random internet host, then it may allow an applet to open such a connection. This will be fairly rare, and would require for example, that the database server doesn't use IP addresses as a way of restricting access.

These restrictions for untrusted applets are fairly onerous. But they are consistent with the general applet security model and we can see no good way of relaxing them.

5.2 JDBC and Java applications

For a normal Java application (i.e. all Java code other than untrusted applets) JDBC should happily load drivers from the local classpath and allow the application free access to files, remote servers, etc.

However as with applets, if for some reason an untrusted sun.sql.Driver class is loaded from a remote source, then that Driver should only be used with code loaded from that same source.

5.3 Network security

The security of database requests and data transmission on the network, especially in the Internet case, is also an important consideration for the JDBC user. However, keep in mind that we are defining programming interfaces in this specification, not a network protocol. The network protocols used for database access have generally already been fixed by the DBMS vendor or connectivity vendor. JDBC users should verify that the network protocol provides adequate security for their needs before using a JDBC driver and DBMS server.

If JavaSoft proposes a standard for a published protocol for a DBMS-independent JDBC-Net driver, as described in Section 3, then security considerations will be an important factor in the selection of a protocol.

5.4 Security Responsibilities of Drivers

Because JDBC drivers may be used in a variety of different situations, it is important that driver writers follow certain simple security rules to prevent applets from making illegal database connections.

These rules are unnecessary if a driver is downloaded as an applet, because the standard security manager will prevent an applet driver from making illegal connections. However JDBC driver writers should bear in mind that if their driver is "successful" then users may start installing it on their local disks, in which case it becomes a trusted part of the Java environment, and must make sure it is not abused by visiting applets. We therefore urge all JDB driver writers to follow the basic security rules.

These rules all apply at connection open time. This is the point when the driver and the virtual machine should check that the current caller is really allowed to connect to a given database. After connection open, no additional checks are necessary.

5.4.1 Be very careful about sharing TCP connections

If a JDBC driver attempts to open a TCP connection then the open will be automatically checked by the Java security manager. The security manager will check if there is an applet on the current call stack and if so, will restrict the open to whatever set of machines that applet is allowed to call. So normally a JDBC driver can leave TCP open checks up to the Java virtual machine.

However if a JDBC driver wants to share a single TCP connection among several different database connections then it becomes the driver's responsibility to make sure that each of its callers is really allowed to talk to the target database. For example, if we open a TCP connection to the machine foobah for applet A, this does not mean that we should automatically allow applet B to share that connection. Applet B may have no right whatsoever to access machine foobah.

So before allowing someone to re-use an existing TCP connection the JDBC driver should check with the security manager that the current caller is allowed to connect to that machine. This can be done with the following code fragment:

    SecurityManager security = System.getSecurityManager();

    if (security != null) {

        security.checkConnect(hostName, portNumber);

    }
The Security.checkConnect method will throw a java.lang.SecurityException if the connection is not permitted.

5.4.2 Check all local file access

If a JDBC driver needs to access any local data on the current machine, then it must ensure that its caller is allowed to open the target files. For example

    SecurityManager security = System.getSecurityManager();

    if (security != null) {

        security.checkRead(fileName);

    }
The Security.checkRead method will throw a java.lang.SecurityException if the current caller is an applet which is not allowed to access the given file.

As with TCP connections, the driver need only be concerned with these security issues if file resources are shared among multiple calling threads and the driver is running as trusted code.

5.4.3 Assume the worst

Some drivers may use native methods to bridge to lower level database libraries. In these cases it may be difficult to determine what files or network connections will be opened by the lower level libraries.

In these circumstances the driver must make "worst case" security assumptions and deny all database access to downloaded applets unless the driver is completely confident that the intended access is innocuous.

For example a JDBC-ODBC bridge might check the meaning of ODBC data source names and only allow an applet to use those ODBC data source names that reference databases on machines to which the applet is allowed to open connections (see 5.4.1 above). But for some ODBC data source names the driver may be unable to determine the hostname of the target database and must therefore deny downloaded applets access to these data sources.

In order to determine if the current caller is a trusted application or applet (and can therefore be allowed arbitrary database access) the JDBC driver can check to see if the caller is allowed to write an arbitrary file:

    SecurityManager security = System.getSecurityManager();

    if (security != null) {

        security.checkWrite("foobaz");

    }

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

6 Database connections

For the full interface descriptions see the Java interfaces in Chapter 13.

6.1 Opening a connection

When you want to access a database, you may obtain a java.sql.Connection object from the JDBC management layer's java.sql.DriverManager.getConnection method.

The DriverManager.getConnection method takes a URL string as an argument. The JDBC management layer will attempt to locate a driver that can connect to the database represented by the URL. The JDBC management layer does this by asking each driver in turn (see Section 6.2 below) if it can connect to the given URL.1 Drivers should examine the URL to see if it specifies a subprotocol that they support (see Section 6.3 below), and if so, they should attempt to connect to the specified database. If they succeed in establishing a connection, then they should return an appropriate java.sql.Connection object.

From the java.sql.Connection object it is possible to obtain java.sql.Statement, java.sql.PreparedStatement , and java.sql.CallableStatement objects that can be used to execute SQL statement s.

We also permit applications to bypass the JDBC management layer during connection open and explicitly select and use a particular driver.

6.2 Choosing between drivers

It may sometimes be the case that several JDBC drivers are capable of connecting to a given URL. For example, when connecting to a given remote database it might be possible to use either a JDBC-ODBC bridge driver, or a JDBC to generic network protocol driver, or to use a driver supplied by the database vendor.

JDBC allows users to specify a driver list by setting a Java property "jdbc.drivers". If this property is defined,then it should be a colon separated list of driver class names, such as "acme.wonder.Driver :foobaz.openNet.Driver:vendor.OurDriver".

When searching for a driver, JDBC will use the first driver it finds that can successfully connect to the given URL. It will first try to use each of the drivers specified in the sql.drivers list, in the order given. It will then proceed to try to use each loaded driver in the order in which the drivers were loaded. It will skip any drivers which are untrusted code, unless they have been loaded from the same source as the code that is trying to open the connection (see the security discussion in Section 5).

6.3 URLs

6.3.1 Goals for JDBC database naming

We need to provide a way of naming databases so that application writers can specify which database they wish to connect to.

We would like this JDBC naming mechanism to have the following properties:

  • Different drivers can use different schemes for naming databases. For example, a JDBC-ODBC bridge driver may support simple ODBC style data source names, whereas a network protocol driver may need to know additional information so it can discover which hostname and port to connect to.
  • If a user downloads an applet that wants to talk to a given database then we would like to be able to open a database connection without requiring the user to do any system administration chores. Thus for example, we want to avoid requiring an analogue of the human-administered ODBC data source tables on the client machines. This implies that it should be possible to encode any necessary connection information in the JDBC name.
  • We would like to allow a level of indirection in the JDBC name, so that the initial name may be resolved via some network naming system in order to locate the database. This will allow system administrators to avoid specifying particular hosts as part of the JDBC name. However, since there are a number of different network name services (such as NIS, DCE, etc.) we do not wish to mandate that any particular network nameserver is used.

    6.3.2 URL syntax

    Fortunately the World Wide Web has already standardized on a naming system that supports all of these properties. This is the Uniform Resource Locator (URL) mechanism. So we propose to use URLs for JDBC naming, and merely recommend some conventions for structuring JDBC URLs.

    We recommend that JDBC URL's be structured as:

    jdbc:<subprotocol>:<subname>

    where a subprotocol names a particular kind of database connectivity mechanism that may be supported by one or more drivers. The contents and syntax of the subname will depend on the subprotocol.

    If you are specifying a network address as part of your subname, we recommend following the standard URL naming convention of "//hostname:port/subsubname" for the subname. The subsubname can have arbitrary internal syntax.

    6.3.3 Example URLs

    For example, in order to access a database through a JDBC-ODBC bridge, one might use a URL like:

    jdbc:odbc:fred

    In this example the subprotocol is "odbc" and the subname is a local ODBC data source name "fred". A JDBC-ODBC driver can check for URLs that have subprotocol "odbc" and then use the subname in an ODBC SQLConnect.

    If you are using some generic database connectivity protocol "dbnet" to talk to a database listener , you might have a URL like:

    jdbc:dbnet://wombat:356/fred

    In this example the URL specifies that we should use the "dbnet" protocol to connect to port 356 on host wombat and then present the subsubname "fred" to that port to locate the final database.

    If you wish to use some network name service to provide a level of indirection in database names, then we recommend using the name of the naming service as the subprotocol. So for example one might have a URL like:

    jdbc:dcenaming:accounts-payable

    In this example, the URL specifies that we should use the local DCE naming service to resolve the database name "accounts-payable" into a more specific name that can be used to connect to the real database. In some situations, it might be appropriate to provide a pseudo driver that performed a name lookup via a network name server and then used the resulting information to locate the real driver and do the real connection open.

    6.3.4 Drivers can choose a syntax and ignore other URLs.

    In summary, the JDBC URL mechanism is intended to provide a framework so that different drivers can use different naming systems that are appropriate to their needs. Each driver need only understand a single URL naming syntax, and can happily reject any other URLs that it encounters.

    6.3.5 Registering subprotocol names

    JavaSoft will act as an informal registry for JDBC sub-protocol names. Send mail to jdbc@wombat.eng.sun.com to reserve a sub-protocol name.

    6.3.6 The "odbc" subprotocol

    The "odbc" subprotocol has been reserved for URLs that specify ODBC style Data Source Names. For this subprotocol we specify a URL syntax that allows arbitrary attribute values to be specified after the data source name.

    The full odbc subprotocol URL syntax is:

    jdbc:odbc:<data-source-name>[;<attribute-name>=<attribute-value>]*
    Thus valid jdbc:odbc names include:

    jdbc:odbc:qeor7

    jdbc:odbc:wombat

    jdbc:odbc:wombat;CacheSize=20;ExtensionCase=LOWER

    jdbc:odbc:qeora;UID=kgh;PWD=fooey

    6.4 Connection arguments

    When opening a connection, you can pass in a java.util.Properties object. This object is a property set that maps between tag strings and value strings. Two conventional properties are "user" and "password". Particular drivers may specify and use other properties.

    In order to allow applets to access databases in a generic way, we recommend that as much connection information as possible be encoded as part of the URL and that driver writers minimize their use of property sets.

    6.5 Multiple connections

    A single application can maintain multiple database connections to one or more databases, using one or more drivers.

    6.6 Registering drivers

    The JDBC management layer needs to know which database drivers are available. We provide two ways of doing this.

    First, when the JDBC java.sql.DriverManager class initializes it will look for a "sql.drivers" property in the system properties. If the property exists it should consist of a colon-separated list of driver class names. Each of the named classes should implement the java.sql.Driver interface. The DriverManager class will attempt to load each named Driver class.

    Second, a programmer can explicitly load a driver class using the standard Class.forName method. For example, to load the acme.db.Driver class you might do:

    Class.forName("acme.db.Driver");
    In both cases it is the responsibility of each newly loaded Driver class to register itself with the DriverManager, using the DriverManager.registerDriver method. This will allow the DriverManager to use the driver when it is attempting to make database connections.

    For security reasons the JDBC management layer will keep track of which class loader provided which driver and when opening connections it will only use drivers that come from the local filesystem or from the same classloader as the code issuing the getConnection request.

    Contents | Prev | Next
    1 At first glance this may seem inefficient, but keep in mind that this requires only a few procedure calls and string comparisons per connection since it is unlikely that dozens of drivers will concurrently be loaded.

    jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
    Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

7 Passing parameters and receiving results

For the full interface descriptions see the separate JDBC API documents.

See also the rejected "Holder" mechanism described in Appendix A.

7.1 Query results

The result of executing a query Statement is a set of rows that are accessible via a java.sql.ResultSet object. The ResultSet object provides a set of "get" methods that allow access to the various columns of the current row. The ResultSet.next method can be used to move between the rows of the ResultSet.

// We're going to execute a SQL statement that will return a

// collection of rows, with column 1 as an int, column 2 as

// a String, and column 3 as an array of bytes.

java.sql.Statement stmt = conn.createStatement();

ResultSet r = stmt.executeQuery("SELECT a, b, c FROM Table1");

while (r.next()) {

    // print the values for the current row.

    int i = r.getInt("a");

    String s = r.getString("b");

    byte b[] = r.getBytes("c");

    System.out.println("ROW = " + i + " " + s + " " + b[0]);

}
There are two alternative ways of specifying columns. You can either use column indexes (for greater efficiency) or column names (for greater convenience). Thus for example there is both a getString method that takes a column index and a getString method that takes a column name.

Reviewer input convinced us that we had to support both column indexes and column names. Some reviewers were extremely emphatic that they require highly efficient database access and therefore preferred column indexes, other reviewers insisted that they wanted the convenience of using column names. (Note that certain SQL queries can return tables without column names or with multiple identical column names. In these cases, programmers should use column numbers.)

For maximum portability, columns within a row should be read in left-to-right order, and each column should only be read once. This reflects implementation limitations in some underlying database protocols.

7.1.1 Data conversions on query results

The ResultSet.getXXX methods will attempt to convert whatever SQL type was returned by the database to whatever Java type is returned by the getXXX method.

Table 1 on page 21 lists the supported conversions from SQL types to Java types via getXXX methods. For example, it is possible to attempt to read a SQL VARCHAR value as an integer using getInt, but it is not possible to read a SQL FLOAT as a java.sql.Date.

If you attempt an illegal conversion, or if a data conversion fails (for example if you did a getInt on a SQL VARCHAR value of "foo"), then a SQLException will be raised.

7.1.2 Null result values

To determine if a given result value is SQL "NULL" you must first read the column and then use the ResultSet.wasNull method to discover if the read returned a SQL "NULL". (See also Appendix A.9).

When you read a SQL "NULL" using one of the ResultSet.getXXX methods, you will receive:

  • A Java "null" value for those getXXX methods that return Java objects.

  • A zero value for getByte, getShort, getInt, getLong, getFloat, and getDouble

  • A false value for getBoolean.

7.1.3 Retrieving very large row values.

JDBC allows arbitrarily large LONGVARBINARY or LONGVARCHAR data to be retrieved using getBytes and getString, up to the limits imposed by the Statement.getMaxFieldSize value. However, application programmers may often find it convenient to retrieve very large data in smaller fixed size chunks.

To accommodate this, the ResultSet class can return java.io.Input streams from which data can be read in chunks. However each of these streams must be accessed immediately as they will be automatically closed on the next "get" call on the ResultSet. This behavior reflects underlying implementation constraints on large blob access.

Java streams return untyped bytes and can (for example) be used for both ASCII and Unicode. We define three separate methods for getting streams. GetBinaryStream returns a stream which simply provides the raw bytes from the database without any conversion. GetAsciiStream returns a stream which provides one byte ASCII characters. GetUnicodeStream returns a stream which provides 2 byte Unicode characters.

For example:

java.sql.Statement stmt = conn.createStatement();

ResultSet r = stmt.executeQuery("SELECT x FROM Table2");

// Now retrieve the column 1 results in 4 K chunks:

byte[] buff = new byte[4096];

while (r.next()) {

    java.io.InputStream fin = r.getAsciiStream("x");

    for (;;) {

        int size = fin.read(buff);

        if (size == -1) {

            break;

        }

        // Send the newly filled buffer to some ASCII output stream:

        output.write(buff, 0, size);

    }

}

7.1.4 Optional or multiple ResultSets

Normally we expect that SQL statements will be executed using either executeQuery (which returns a single ResultSet) or executeUpdate (which can be used for any kind of database modification statement and which returns a count of the rows updated).

However under some circumstances an application may not know whether a given statement will return a ResultSet until the statement has executed. In addition, some stored procedures may return several different ResultSets and/or update counts.

To accommodate these needs we provide a mechanism so that an application can execute a statement and then process an arbitrary collection of ResultSets and update counts. This mechanism is based on a fully general "execute" method, supported by three other methods, getResultSet, getUpdateCount, and getMoreResults. These methods allow an application to explore the statement results one at a time and to determine if a given result was a ResultSet or an update count.

7.2 Passing IN parameters

To allow you to pass parameters to a SQL statement, the java.sql.PreparedStatement class provides a series of setXXX methods. These can be used before each statement execution to fill in parameter fields. Once a parameter value has been defined for a given statement, it can be used for multiple executions of that statement, until it is cleared by a call on PreparedStatement.clearParameters.

java.sql.PreparedStatement stmt = conn.prepareStatement(

                    "UPDATE table3 SET m = ? WHERE x = ?");

// We pass two parameters. One varies each time around the for loop,

// the other remains constant.

stmt.setString(1, "Hi");

for (int i = 0; i < 10; i++) {

    stmt.setInt(2, i);

    int rows = stmt.executeUpdate();

}

7.2.1 Data type conformance on IN parameters

The PreparedStatement.setXXX methods do not perform any general data type conversions. Instead the Java value is simply mapped to the corresponding SQL type (following the mapping specified in Table 3 on page 28) and that value is sent to the database.

It is the programmer's responsibility to make sure that the java type of each argument maps to a SQL type that is compatible with the SQL data type expected by the database. For maximum portability programmers, should use Java types that correspond to the exact SQL types expected by the database.

If programmers require data type conversions for IN parameters, they may use the PreparedStatement.setObject method which converts a Java Object to a specified SQL type before sending the value to the database.

7.2.2 Sending SQL NULLs as IN parameters

The PreparedStatement.setNull method allows you to send a SQL NULL value to the database as an IN parameter. Note, however, that you must specify the SQL type of the parameter.

In addition, for those setXXX methods that take Java objects as arguments, if a Java null value is passed to a setXXX method, then a SQL NULL will be sent to the database.

7.2.3 Sending very large parameters

JDBC itself defines no limits on the amount of data that may be sent with a setBytes or setString call. However, when dealing with large blobs, it may be convenient for application programmers to pass in very large data in smaller chunks.

To accommodate this, we allow programmers to supply Java IO streams as parameters. When the statement is executed the JDBC driver will make repeated calls on these IO streams to read their contents and transmit these as the actual parameter data.

Separate setXXX methods are provided for streams containing uninterpreted bytes, for streams containing ASCII characters, and for streams containing Unicode characters.

When setting a stream as an input parameter, the application programmer must specify the number of bytes to be read from the stream and sent to the database.

We dislike requiring that the data transfer size be specified in advance; however, this is necessary because some databases need to know the total transfer size in advance of any data being sent.

An example of using a stream to send the contents of a file as an IN parameter:

java.io.File file = new java.io.File("/tmp/foo");

int fileLength = file.length();

java.io.InputStream fin = new java.io.FileInputStream(file);

java.sql.PreparedStatement stmt = conn.prepareStatement(

            "UPDATE Table5 SET stuff = ? WHERE index = 4");

stmt.setBinaryStream(1, fin, fileLength);

// When the statement executes, the "fin" object will get called

// repeatedly to deliver up its data.

stmt.executeUpdate();

7.3 Receiving OUT parameters

If you are executing a stored procedure call, then you should use the CallableStatement class. CallableStatement is a subtype of PreparedStatement.

To pass in any IN parameters you can use the setXXX methods defined in PreparedStatement as described in Section 7.2 above.

However, if your stored procedure returns OUT parameters, then for each OUT parameter you must use the CallableStatememt.registerOutParameter method to register the SQL type of the OUT parameter before you execute the statement. (See Appendix A.6.) Then after the statement has executed, you must use the corresponding CallableStatement.getXXX method to retrieve the parameter value.

java.sql.CallableStatement stmt = conn.prepareCall(

                    "{call getTestData(?, ?)}");

stmt.registerOutParameter(1,java.sql.Types.TINYINT);

stmt.registerOutParameter(2,java.sql.types.DECIMAL, 2);

stmt.executeUpdate();

byte x = stmt.getByte(1);

BigDecimal n = stmt.getBigDecimal(2,2);

7.3.1 Data type conformance on OUT parameters

The CallableStatement.getXXX methods do not perform any general data type conversions. Instead the registerOutParameter call must specify the SQL type that will be returned by the database and the programmer must then subsequently call the getXXX method whose Java type corresponds to that SQL type, as specified in Table 2 on page 27.

7.3.2 Retrieving NULL values as OUT parameters

As with ResultSets, in order to determine if a given OUT parameter value is SQL "NULL" you must first read the parameter and then use the CallableStatement.wasNull method to discover if the read returned a SQL "NULL".

When you read a SQL "NULL" value using one of the CallableStatement.getXXX methods, you will receive a value of null, zero, or false, following the same rules specified in section 7.1.2 for the ResultSet.getXXX methods.

7.3.3 Retrieving very large out parameters

We do not provide any mechanism for retrieving OUT parameters as streams.

Instead we recommend that programmers retrieve very large values through ResultSets.

7.3.4 Retrieve out parameters after results

If a stored procedure returns both results and out parameters, for maximum portability, the results should be retrieved prior to retrieving the out parameters.

7.4 Data truncation

Under some circumstances data may be truncated when it is being read from or written to the database. How this is handled will depend on the circumstances, but in general data truncation on a database read will result in a warning, whereas data truncation on a database write will result in a SQLException.

7.4.1 Exceeding the Connection maxFieldSize limit

If an application uses Connection.setMaxFieldSize to impose a limit on the maximum size of a field, then attempts to read or write a field larger than this will result in the data being silently truncated to the maxFieldSize size, without any SQLException or SQLWarning.

7.4.2 Data truncation on reads

In general data truncation errors during data reads will be uncommon with JDBC as the API does not require the programmer to pass in fixed size buffers, but rather allocates appropriate data space as needed. However in some circumstances drivers may encounter internal implementation limits, so there is still a possibility for data truncation during reads.

If data truncation occurs during a read from a ResultSet then a DataTruncation object (a subtype of SQLWarning) will get added to the ResultSet's warning list and the method will return as much data as it was able to read. Similarly, if a data truncation occurs while an OUT parameter is being received from the database, then a DataTruncation object will get added to the CallableStatement's warning list and the method will return as much data as it was able to read.

7.4.3 Data truncation on writes

During writes to the database there is a possibility that the application may attempt to send more data than the driver or the database is prepared to accept. In this case the failing method should raise a DataTruncation exception as a SQLException.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

8 Mapping SQL data types into Java

8.1 Constraints

We need to provide reasonable Java mappings for the common SQL data types. We also need to make sure that we have enough type information so that we can correctly store and retrieve parameters and recover results from SQL statements.

However, there is no particular reason that the Java data type needs to be exactly isomorphic to the SQL data type. For example, since Java has no fixed length arrays, we can represent both fixed length and variable length SQL arrays as variable length Java arrays. We also felt free to use Java Strings even though they don't precisely match any of the SQL CHAR types.

Table 2 shows the default Java mapping for various common SQL data types. Not all of these types will necessarily be supported by all databases. The various mappings are described more fully in the following sections.

Table 2: Standard mapping from SQL types to Java types.
SQL type | Java Type
CHAR | String
VARCHAR | String
LONGVARCHAR | String
NUMERIC | java.math.BigDecimal
DECIMAL | java.math.BigDecimal
BIT | boolean
TINYINT | byte
SMALLINT | short
INTEGER | int
BIGINT | long
REAL | float
FLOAT | double
DOUBLE | double
BINARY | byte[]
VARBINARY | byte[]
LONGVARBINARY | byte[]
DATE | java.sql.Date
TIME | java.sql.Time
TIMESTAMP | java.sql.Timestamp

Similarly table 3 shows the reverse mapping from Java types to SQL types.
Table 3: Standard mapping from Java types to SQL types. The mapping for String will normally be VARCHAR but will turn into LONGVARCHAR if the given value exceeds the drivers limit on VARCHAR values. Similarly for byte[] and VARBINARY and LONGVARBINARY.
Java Type | SQL type
String | VARCHAR or LONGVARCHAR
java.math.BigDecimal | NUMERIC
boolean | BIT
byte | TINYINT
short | SMALLINT
int | INTEGER
long | BIGINT
float | REAL
double | DOUBLE
byte[] | VARBINARY or LONGVARBINARY
java.sql.Date | DATE
java.sql.Time | TIME
java.sql.Timestamp | TIMESTAMP

8.2 Dynamic data access

This chapter focuses on access to results or parameters whose types are known at compile time. However, some applications, for example generic browsers or query tools, are not compiled with knowledge of the database schema they will access, so JDBC also provides support for fully dynamically typed data access. See Section 14.2.

8.3 CHAR, VARCHAR, and LONGVARCHAR

There is no need for Java programmers to distinguish among the three different flavours of SQL strings CHAR, VARCHAR, and LONGVARCHAR. These can all be expressed identically in Java. It is possible to read and write the SQL correctly without needing to know the exact data type that was expected.

These types could be mapped to either String or char[]. After considerable discussion we decided to use String, as this seemed the more appropriate type for normal use. Note that the Java String class provides a method for converting a String to a char[] and a constructor for turning a char[] into a String.

For fixed length SQL strings of type CHAR(n), the JDBC drivers will perform appropriate padding with spaces. Thus when a CHAR(n) field is retrieved from the database the resulting String will always be of length "n" and may include some padding spaces at the end. When a String is sent to a CHAR(n) field, the driver and/or the database will add any necessary padding spaces to the end of the String to bring it up to length "n".

The ResultSet.getString method allocates and returns a new String. This is suitable for retrieving normal data, but the LONGVARCHAR SQL type can be used to store multi-megabyte strings. We therefore needed to provide a way for Java programmers to retrieve a LONGVARCHAR value in chunks. We handle this by allowing programmers to retrieve a LONGVARCHAR as a Java input stream from which they can subsequently read data in whatever chunks they prefer. Java streams can be used for either Unicode or Ascii data, so the programmer may chose to use either getAsciiStream or getUnicodeStream.

8.4 DECIMAL and NUMERIC

The SQL DECIMAL and NUMERIC data types are used to express fixed point numbers where absolute precision is required. They are often used for currency values.

These two types can be expressed identically in Java. The most convenient mapping uses the java.math.BigDecimal extended precision number type provided in JDK1.1

We also allow access to DECIMAL and NUMERIC as simple Strings and arrays of chars. Thus Java programmers can use getString to receive a NUMERIC or DECIMAL result.

8.5 BINARY, VARBINARY, and LONGVARBINARY

There is no need for Java programmers to distinguish among the three different flavours of SQL byte arrays BINARY, VARBINARY, and LONGVARBINARY. These can all be expressed identically as byte arrays in Java. (It is possible to read and write the SQL correctly without needing to know the exact BINARY data type that was expected.)

As with the LONGVARCHAR SQL type, the LONGVARBINARY SQL type can sometimes be used to return multi-megabyte data values. We therefore allow a LONGVARBINARY value to be retrieved as a Java input stream, from which programmers can subsequently read data in whatever chunks they prefer.

8.6 BIT

The SQL BIT type can be mapped directly to the Java boolean type.

8.7 TINYINT, SMALLINT, INTEGER, and BIGINT

The SQL TINYINT, SMALLINT, INTEGER, and BIGINT types represent 8 bit, 16 bit, 32 bit, and 64 bit values. These therefore can be mapped to Java's byte, short, int, and long data types.

8.8 REAL, FLOAT, and DOUBLE

SQL defines three floating point data types, REAL, FLOAT, and DOUBLE.

We map REAL to Java float, and FLOAT and DOUBLE to Java double.

REAL is required to support 7 digits of mantissa precision. FLOAT and DOUBLE are required to support 15 digits of mantissa precision.

8.9 DATE, TIME, and TIMESTAMP

SQL defines three time related data types. DATE consists of day, month, and year. TIME consists of hours, minutes and seconds. TIMESTAMP combines DATE and TIME and also adds in a nanosecond field.

There is a standard Java class java.util.Date that provides date and time information. However, this class doesn't perfectly match any of the three SQL types, as it includes both DATE and TIME information, but lacks the nanosecond granularity required for TIMESTAMP.

We therefore define three subclasses of java.util.Date. These are:

  • java.sql.Date for SQL DATE information

  • java.sql.Time for SQL TIME information

  • java.sql.Timestamp for SQL TIMESTAMP information

In the case of java.sql.Date the hour, minute, second, and milli-second fields of the java.util.Date base class are set to zero.

In the case of java.sql.Time the year, month, and day fields of the java.util.Date base class are set to 1970, January, and 1, respectively. This is the "zero" date in the Java epoch.

The java.sql.Timestamp class extends java.util.Date by adding a nanosecond field.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

9 Asynchrony, Threading, and Transactions

9.1 Asynchronous requests

Some database APIs, such as ODBC, provide mechanisms for allowing SQL statements to execute asynchronously. This allows an application to start up a database operation in the background, and then handle other work (such as managing a user interface) while waiting for the operation to complete.

Since Java is a multi-threaded environment, there seems no real need to provide support for asynchronous statement execution. Java programmers can easily create a separate thread if they wish to execute statements asynchronously with respect to their main thread.

9.2 Multi-threading

We require that all operations on all the java.sql objects be multi-thread safe and able to cope correctly with having several threads simultaneously calling the same object.

Some drivers may allow more concurrent execution than others. Developers can assume fully concurrent execution; if the driver requires some form of synchronization, it will provide it. The only difference visible to the developer will be that applications will run with reduced concurrency.

For example, two Statements on the same Connection can be executed concurrently and their ResultSets can be processed concurrently (from the perspective of the developer). Some drivers will provide this full concurrency. Others may execute one statement and wait until it completes before sending the next.

One specific use of multi-threading is to cancel a long running statement. This is done by using one thread to execute the statement and another to cancel it with its Statement.cancel() method.

In practice we expect that most of the JDBC objects will only be accessed in a single threaded way. However some multi-thread support is necessary, and our attempts in previous drafts to specify some classes as MT safe and some as MT unsafe appeared to be adding more confusion than light.

9.3 Transactions.

New JDBC connections are initially in "auto-commit" mode. This means that each statement is executed as a separate transaction at the database.

In order to execute several statements within a single transaction, you must first disable auto- commit by calling Connection.setAutoCommit(false).

When auto-commit is disabled, the connection always has an implicit transaction associated with it. You can execute a Connection.commit to complete the transaction or a Connection.rollback to abort it. The commit or rollback will also start a new implicit transaction.

The exact semantics of transactions and their isolation levels depend on the underlying database. There are methods on java.sql.DatabaseMetaData to learn the current defaults, and on java.sql.Connection to move a newly opened connection to a different isolation level.

In the first version of the interface we will provide no support for committing transactions across different connections.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

10 Cursors

JDBC provides simple cursor support. An application can use ResultSet.getCursorName() to obtain a cursor associated with the current ResultSet. It can then use this cursor name in positioned update or positioned delete statements.

The cursor will remain valid until the ResultSet or its parent Statement is closed.

Note that not all DBMSs support positioned update and delete. The DatabaseMetaData.supportsPositionedDelete and supportsPositionedUpdate methods can be used to discover whether a particular connection supports these operations. When they are supported, the DBMS/driver must insure that rows selected are properly locked so that positioned updates do not result in update anomalies or other concurrency problems.

Currently we do not propose to provide support for either scrollable cursors or ODBC style bookmarks as part of JDBC.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

11 SQL Extensions

Certain SQL features beyond SQL-2 Entry Level are widely supported and are desirable to include as part of our JDBC compliance definition so that applications can depend on the portability of these features. However, SQL-2 Transitional Level, the next higher level of SQL compliance defined by ANSI, is not widely supported. Where Transitional Level semantics are supported, the syntax is often different across DBMSs.

We therefore define two kinds of extensions to SQL-2 Entry Level that must be supported by a JDBC-Compliant(TM) driver:

  • Selective Transitional Level syntax and semantics must be supported. We currently demand just one such feature: the DROP TABLE command is required for JDBC compliance.

  • Selective Transitional Level semantics must be supported through an escape syntax that a driver can easily scan for and translate into DBMS-specific syntax. We discuss these escapes in the remainder of Section 11. Note that these escapes need only be supported where the underyling database supports the corresponding Transitional Level semantics.

An ODBC driver that supports ODBC Core SQL as defined by Microsoft complies with JDBC SQL as defined in this section.

11.1 SQL Escape Syntax

JDBC supports the same DBMS-independent escape syntax as ODBC for stored procedures, scalar functions, dates, times, and outer joins. A driver maps this escape syntax into DBMS- specific syntax, allowing portability of application programs that require these features. The DBMS-independent syntax is based on an escape clause demarcated by curly braces and a keyword:

{keyword ... parameters ...}

This ODBC-compatible escape syntax is in general not the same as has been adopted by ANSI in SQL-2 Transitional Level for the same functionality. In cases where all of the desired DBMSs support the standard SQL-2 syntax, the user is encouraged to use that syntax instead of these escapes. When enough DBMSs support the more advanced SQL-2 syntax and semantics these escapes should no longer be necessary.

11.2 Stored Procedures

The syntax for invoking a stored procedure in JDBC is:

{call procedure_name[(argument1, argument2, ...)]}

or, where a procedure returns a result parameter:

{?= call procedure_name[(argument1, argument2, ...)]}

Input arguments may be either literals or parameters. To determine if stored procedures are supported, call DatabaseMetaData.supportsStoredProcedure.

11.3 Time and Date Literals

DBMSs differ in the syntax they use for date, time, and timestamp literals. JDBC supports ISO standard format for the syntax of these literals, using an escape clause that the driver must translate to the DBMS representation.

For example, a date is specified in a JDBC SQL statement with the syntax

{d 'yyyy-mm-dd'}

where yyyy-mm-dd provides the year, month, and date, e.g. 1996-02-28. The driver will replace this escape clause with the equivalent DBMS-specific representation, e.g. 'Feb 28, 1996' for Oracle.

There are analogous escape clauses for TIME and TIMESTAMP:

{t 'hh:mm:ss'}

{ts 'yyyy-mm-dd hh:mm:ss.f...'}

The fractional seconds (.f...) portion of the TIMESTAMP can be omitted.

11.4 Scalar Functions

JDBC supports numeric, string, time, date, system, and conversion functions on scalar values. These functions are indicated by the keyword "fn" followed by the name of the desired function and its arguments. For example, two strings can be concatenated using the concat function

{fn concat("Hot", "Java")}

The name of the current user can be obtained through the syntax

{fn user()}

See the X/Open CLI or ODBC specifications for specifications of the semantics of the scalar functions. The functions supported are listed here for reference. Some drivers may not support all of these functions; to find out which functions are supported, use the folowing DatabaseMe tadata methods: getNumericFunctions() returns a comma separated list of the names of the numeric functions supported, getStringFunctions() does the same for the string functions, and so on.

The numeric functions are ABS(number), ACOS(float), ASIN(float), ATAN(float), ATAN2(float1, float2), CEILING(number), COS(float), COT(float), DEGREES(number), EXP(float), FLOOR(number), LOG(float), LOG10(float), MOD(integer1, integer2), PI(), POWER(number, power), RADIANS(number), RAND(integer), ROUND(number, places), SIGN(number), SIN(float), SQRT(float), TAN(float), and TRUNCATE(number, places).

The string functions are ASCII(string), CHAR(code), CONCAT(string1, string2), DIFFERENCE(string1, string2), INSERT(string1, start, length, string2), LCASE(string), LEFT(string, count), LENGTH(string), LOCATE(string1, string2, start), LTRIM(string), REPEAT(string, count), REPLACE(string1, string2, string3), RIGHT(string, count), RTRIM(string), SOUNDEX(string), SPACE(count), SUBSTRING(string, start, length), and UCASE(string).

The time and date functions are CURDATE(), CURTIME(), DAYNAME(date), DAYOFMONTH(date), DAYHOFWEEK(date), DAYOFYEAR(date), HOUR(time), MINUTE(time), MONTH(time), MONTHNAME(date), NOW(), QUARTER(date), SECOND(time), TIMESTAMPADD(interval, count, timestamp), TIMESTAMPDIFF(interval, timestamp1, timpestamp2), WEEK(date), and YEAR(date).

The system functions are DATABASE(), IFNULL(expression, value), and USER().

There is also a CONVERT(value, SQLtype) expression, where type may be BIGINT, BINARY, BIT, CHAR, DATE, DECIMAL, DOUBLE, FLOAT, INTEGER, LONGVARBINARY, LONGVARCHAR, REAL, SMALLINT, TIME, TIMESTAMP, TINYINT, VARBINARY, and VARCHAR.

Again, these functions are supported by DBMSs with slightly different syntax, and the driver's job is either to map these into the appropriate syntax or to implement the function directly in the driver.

11.5 LIKE Escape Characters

The characters "%" and "_" have special meaning in SQL LIKE clauses (to match zero or more characters, or exactly one character, respectively). In order to interpret them literally, they can be preceded with a special escape character in strings, e.g. "\". In order to specify the escape character used to quote these characters, include the following syntax on the end of the query:

{escape 'escape-character'}

For example, the query

SELECT NAME FROM IDENTIFIERS WHERE ID LIKE '\_%' {escape '\'}

finds identifier names that begin with an underbar.

11.6 Outer Joins

The syntax for an outer join is

{oj outer-join}

where outer-join is of the form

table LEFT OUTER JOIN {table | outer-join} ON search-condition

See the SQL grammar for an explanation of outer joins. Three boolean DatabaseMetaData methods are provided to determine the kinds of outer joins supported by a driver.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

12 Variants and Extensions

As far as possible we would like a standard JDBC API that works in a uniform way with different databases. However it is unavoidable that different databases support different SQL features and provide different semantics for some operations.

12.1 Permitted variants

The methods in java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.CallableStatement, and java.sql.Resultset should all be supported for all JDBC drivers. For databases which don't support OUT parameters with stored procedures, the various registerOutParameter and getXXX methods of CallableStatement may raise SQLException.

The actual SQL that may be used varies somewhat between databases. For example, different databases provide different support for outer joins. The java.sql.DatabaseMetaData interface provides a number of methods that can be used to determine exactly which SQL features are supported by a particular database. Similarly, the syntax for a number of SQL features may vary between databases and can also be discovered from java.sql.DatabaseMetaData. However, in order to pass JDBC conformance tests a driver must support at least ANSI SQL-2 Entry Level syntax and semantics plus support for the SQL extensions listed in Section 11.

Finally, some fundamental properties, such as transaction isolation levels, vary between databases. The default properties of the current database and the range of properties it supports can also be obtained from DatabaseMetaData.

12.2 Vendor-specific extensions

JDBC provides a uniform API that is intended to work across all databases. However, database vendors may wish to expose additional functionality that is supported by their databases.

Database vendors may add additional functionality by adding new subtypes of existing JDBC types that provide additional methods. Thus the Foobah corporation might define a new Java type foobah.sql.FooBahStatement that inherits from the standard java.sql.Statement type but adds some new functionality.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

13 JDBC Interface Definitions

See the separate JDBC API documentation which contains the Java definitions of the core java.sql interfaces and classes listed below.

java.sql.CallableStatement

java.sql.Connection

java.sql.DataTruncation

java.sql.Date

java.sql.Driver

java.sql.DriverManager

java.sql.DriverPropertyInfo

java.sql.PreparedStatement

java.sql.ResultSet

java.sql.SQLException

java.sql.SQLWarning

java.sql.Statement

java.sql.Time

java.sql.Timestamp

java.sql.Types

The JDBC API documentation also includes definitions of the JDBC metadata interfaces - java.sql.DatabaseMetaData and java.sql.ResultSetMetaData. See also the short example programs in Appendix B.

The more important relationships between the interfaces are as follows (with arrows showing functions and lines showing other methods)

:

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

14 Dynamic Database Access

We expect most JDBC programmers will be programming with knowledge of their target database's schema. They can therefore use the strongly typed JDBC interfaces described in Section 7 for data access. However there is also another extremely important class of database access where an application (or an application builder) dynamically discovers the database schema information and uses that information to perform appropriate dynamic data access. This section describes the JDBC support for dynamic access.

14.1 Metadata information

JDBC provides access to a number of different kinds of metadata, describing row results, statement parameters, database properties, etc., etc. We originally attempted to provide this information via extra methods on the core JDBC classes such as java.sql.Connection and java.sql.ResultSet. However, because of the complexity of the metadata methods and because they are likely to be used by only a small subset of JDBC programmers, we decided to split the metadata methods off into two separate Java interfaces.

In general, for each piece of metadata information we have attempted to provide a separate JDBC method that takes appropriate arguments and provides an appropriate Java result type. However, when a method such as Connection.getProcedures() returns a collection of values, we have chosen to use a java.sql.ResultSet to contain the results. The application programmer can then use normal ResultSet methods to iterate over the results.

We considered defining a set of enumeration types for retrieving collections of metadata results, but this seemed to add additional weight to the interface with little real value. JDBC programmers will already be familiar with using ResultSets, so using them for metadata results should not be too onerous.

A number of metadata methods take String search patterns as arguments. These search patterns are the same as for ODBC, where a `_' iimplies a match of any single character and a `%' implies a match of zero or more characters. For catalog and schema values, a Java empty string matches an `unnamed' value; and a Java null String causes that search criteria to be ignored.

The java.sql.ResultSetMetaData type provides a number of methods for discovering the types and properties of the columns of a particular java.sql.ResultSet object.

The java.sql.DatabaseMetaData interface provides methods for retrieving various metadata associated with a database. This includes enumerating the stored procedures in the database, the tables in the database, the schemas in the database, the valid table types, the valid catalogs, finding information on the columns in tables, access rights on columns, access rights on tables, minimal row identification, and so on.

14.2 Dynamically typed data access

In Section 8 we described the normal mapping between SQL types and Java types. For example, a SQL INTEGER is normally mapped to a Java int. This supports a simple interface for reading and writing SQL values as simple Java types.

However, in order to support generic data access, we also provide methods that allow data to be retrieved as generic Java objects. Thus there is a ResultSet.getObject method, a PreparedStatement.setObject method, and a CallableStatement.getObject method. Note that for each of the two getObject methods you will need to narrow the resulting java.lang.Object object to a specific data type before you can retrieve a value.

Since the Java built-in types such as boolean and int are not subtypes of Object, we need to use a slightly different mapping from SQL types to Java object types for the getObject/setObject methods. This mapping is shown in Table 4.

Table 4: Mapping from SQL types to Java Object types.
SQL type | Java Object Type
CHAR | String
VARCHAR | String
LONGVARCHAR | String
NUMERIC | java.math.BigDecimal
DECIMAL | java.math.BigDecimal
BIT | Boolean
TINYINT | Integer
SMALLINT | Integer
INTEGER | Integer
BIGINT | Long
REAL | Float
FLOAT | Double
DOUBLE | Double
BINARY | byte[]
VARBINARY | byte[]
LONGVARBINARY | byte[]
DATE | java.sql.Date
TIME | java.sql.Time
TIMESTAMP | java.sql.Timestamp

The corresponding default mapping from Java Object types to SQL types is show in Table 5.
Table 5: Mapping from Java Object types to SQL types. Note that the mapping for String will normally be VARCHAR but will turn into LONGVARCHAR if the given value exceeds the drivers limit on VARCHAR values. The situation is similar for byte[] and VARBINARY and LONGVARBINARY.
Java Object Type | SQL type
String | VARCHAR or LONGVARCHAR
java.math.BigDecimal | NUMERIC
Boolean | BIT
Integer | INTEGER
Long | BIGINT
Float | REAL
Double | DOUBLE
byte[] | VARBINARY or LONGVARBINARY
java.sql.Date | DATE
java.sql.Time | TIME
java.sql.Timestamp | TIMESTAMP

Note that it is not possible to send or receive Java input streams using the getObject or setObject methods. You must explicitly use PreparedStatement.setXXXStream or ResultSet.getXXX Stream to transfer a value as a stream.

14.2.1 ResultSet.getObject

ResultSet.getObject returns a Java object whose type correspond to the SQL type of the ResultSet column, using the mapping specified in Table 4.

So for example, if you have a ResultSet where the "a" column has SQL type CHAR, and the "b" column has SQL type SMALLINT, here are the types returned by some getObject calls:

ResultSet rs = stmt.executeQuery("SELECT a, b FROM foo");

while (rs.next()) {

    Object x = rs.getObject("a");							 // gets a String

    Object y = rs.getObject("b");							 // gets an Integer

}

14.2.2 PreparedStatement.setObject

For PreparedStatement.setObject you can optionally specify a target SQL type. In this case the argument Java Object will first be mapped to its default SQL type (as specified in Table 5), then converted to the specified SQL type (see Table 6), and then sent to the database.

Alternatively you can omit the target SQL type, in which case the given Java Object will simply get mapped to its default SQL type (using Table 5) and then be sent to the database .

14.2.3 CallableStatement.getObject

Before calling CallableStatement.getObject you must first have specified the parameter's SQL type using CallableStatement.registerOutParameter. When you call CallableStatement.getObject the Driver will return a Java Object type corresponding to that SQL type, using the mapping specified Table 4.

Contents | Prev | Next
jdbc@wombat.eng.sun.com or jdbc-odbc@wombat.eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

1 Introduction

1.1 Preface

This document contains the final specification of the JDBCTM 2.1 Core API.

1.2 Target audience

The target audience for this document includes vendors of JDBC technology-based drivers (JDBC drivers) whose products implement the JDBC API, other vendors who want to provide support for the JDBC API in their products, and end-users developing applications using the JDBC API.

1.3 Background

The initial release of the JDBC API has been well received by both end-users developing database applications using JavaTM technology, and vendors of database products. Due to its wide acceptance, the JDBC API has become an API that is core to the Java platform. We would like to thank everyone who has worked on or used JDBC technology for helping to make it successful.

Since the first release of the JDBC API, we have received valuable feedback from the members of the community of JDBC technology users regarding new features that would make useful additions to the API. We are continuing to solicit additional input and ideas from everyone who has an interest in JDBC technology, and we encourage everyone to send us their requests and ideas for new features and directions.

1.4 Organization

The JDBC API has been separated into two parts: the core JDBC 2.1 API and the JDBC 2.0 Optional Package API. Chapters 2 and 3 of this document discuss goals and give an overview of the JDBC API as a whole. The remainder of the document contains a detailed specification of the core JDBC 2.1 API. A detailed specification for the JDBC 2.0 Optional Package API is presented in a separate document.

1.5 Terminology

In this document we refer to the previous release of the JDBC API as the JDBC 1.0 API.

1.6 Acknowledgments

The JDBC API design effort has been a broad industry effort that has involved over twenty partner companies. We would like to thank the many reviewers who have contributed to previous versions of the specification. We especially thank Gray Clossman and Stefan Dessloch for making the initial proposal for adding SQL99 types to the JDBC API.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

2 Goals

This section outlines the main goals for the JDBC API.

2.1 Leverage the strengths of the JDBC 1.0 and Java platform APIs

One of the important strengths of the JDBC 1.0 API is that it is relatively easy to use. This ease-of-use is in some respects due to the Java programming language, which gives JDBC technology a "hi-level" flavor, despite the fact that it is a call-level interface. For example, users of the JDBC 1.0 API aren't required to understand low-level memory-management details, or byte-alignment, or data alignment details when transferring data to and from the database.

Despite being easy to use, the JDBC API gives developers using the Java programming language access to a powerful set of database capabilities. JDBC technology can be used to build sophisticated, real-world applications. The JDBC API must continue to strike the proper balance between ease-of-use and providing a rich set of functionality.

2.2 Maintain compatibility with existing applications and drivers

Existing JDBC drivers and the Java programming language applications that use them shall continue to work-unchanged-in an implementation of the Java virtual machine that supports the JDBC 2.1 API. Applications that don't use any of the new features of the JDBC 2.1 API do not require any changes to continue running. It should be straightforward for existing applications to migrate to the new JDBC API.

2.3 Keep pace with the Java platform

The Java platform has matured since the first release of the JDBC API. Some of the new Java platform APIs that are important for the JDBC API are: the Java Transaction Service (JTS), the Java Naming and Directory InterfaceTM (JNDI), JavaBeansTM, Enterprise JavaBeansTM(EJB), and internationalization. The JDBC API must leverage these other Java platform APIs and support them well.

2.4 JavaBeans

The most important new Java platform API for the JDBC API is the JavaBeans API. When the JDBC API was first released there was no component model for the Java platform . The JDBC API should provide a foundation for developers creating data-aware components written to the JavaBeans architecture (JavaBeans components). The JDBC API is a good place to provide this standard component foundation since data access is a ubiquitous aspect of most applications. A new RowSet type has been added to the JDBC Optional Package API to meet this goal. Chapter 4 discusses the differences between the core JDBC 2.1 and JDBC 2.0 Optional Package APIs.

2.5 Advanced Database Features

There are some important features provided by databases that are not supported by the JDBC 1.0 API, like scrollable cursors and advanced data types, such as Binary Large OBjects (BLOBS). The JDBC 2.1 core API must support these advanced features.

The JDBC API should provide a framework that allows developers to access instances of user-defined data types that are stored in a database. The JDBC 2.1 core API supports both databases that provide storage for Java programming language objects (Java objects) , and databases that store SQL99 structured types.

The JDBC API should provide some basic support for access to non-SQL tabular data, such as data stored in files. The JDBC Optional Package API provides some limited support for tabular data. See Chapter 4 for a discussion of the differences between the core JDBC 2.1 and JDBC 2.0 Optional Package APIs.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

3 Overview of New Features

This chapter contains an overview of the new features that are being added to the JDBC API.

3.1 Result set enhancements

The JDBC 1.0 API provided result sets that had the ability to scroll in a forward direction only. Scrollable result sets allow for more flexibility in the processing of results by providing both forward and backward movement through their contents. In addition, scrollable result sets allow for relative and absolute positioning. For example, it's possible to move to the fourth row in a scrollable result set directly, or to move directly to the third row following the current row, provided the row exists.

The JDBC API allows result sets to be directly updatable, as well.

3.2 Batch updates

The batch update feature allows an application to submit multiple update statements (insert/update/delete) in a single request to the database. This can provide a dramatic increase in performance when a large number of update statements need to be executed.

3.3 Advanced data types

Increased support for storing persistent Java programming language objects (Java objects ) and a mapping for SQL99 data types such as binary large objects, and structured types, has been added to the JDBC API. An application may also customize the mapping of SQL99 structured types into Java programming language classes.

3.4 Rowsets

As its name implies, a rowset encapsulates a set of rows. A rowset may or may not maintain an open database connection. When a rowset is `disconnected' from its data source, updates performed on the rowset are propagated to the underlying database using an optimistic concurrency control algorithm.

Rowsets add support to the JDBC API for the JavaBeans component model. A rowset object is a bean. A rowset implementation may be serializable. Rowsets can be created at design time and used in conjunction with other JavaBeans components in a visual builder tool to construct an application.

3.5 JNDI for naming databases

The Java Naming and Directory Interface (JNDI) API can be used in addition to a JDBC technology-based driver manager (JDBC driver manager) to obtain a connection to a database. When an application uses the JNDI API, it specifies a logical name that identifies a particular database instance and JDBC driver for accessing that database. This has the advantage of making the application code independent of a particular JDBC driver and JDBC technology URL.

3.6 Connection Pooling

The JDBC API contains `hooks' that allow connection pooling to be implemented on top of the JDBC driver layer. This allows for a single connection cache that spans the different JDBC drivers that may be in use. Since creating and destroying database connections is expensive, connection pooling is important for achieving good performance, especially for server applications.

3.7 Distributed transaction support

Support for distributed transactions has been added as an extension to the JDBC API. This feature allows a JDBC driver to support the standard 2-phase commit protocol used by the Java Transaction Service (JTS) API.

3.8 Other new features

Support for character streams has been added. This means that character data can be retrieved and sent to the database as a stream of internationalized Unicode characters. Methods to allow java.math.BigDecimal values to be returned with full precision have also been added. Support for time zones has been added.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

4 What's Actually Changed

This chapter describes the practical differences between the JDBC 1.0 and JDBC 2.0 APIs.

4.1 A New Package

The JDBC API has been factored into two complementary components. The first component is API that is core to the Java platform (the core JDBC 2.1 API ) and comprises the updated contents of the java.sql package. This document contains the specification for the core JDBC 2.1 API. The second component, termed the JDBC 2.0 Optional Package API, comprises the contents of a new package, javax.sql, which as its name implies will be delivered as an optional package to the Java platform (formerly Java Standard Extension). The JDBC 2.0 Optional Package API is described in a separate document.

The java.sql package contains all of the additions that have been made to the existing interfaces and classes, in addition to a few new classes and interfaces. The new javax.sql package has been introduced to contain the parts of the JDBC API which are closely related to other pieces of the Java platform that are themselves Optional Packages , such as the Java Naming and Directory Interface (JNDI), and the Java Transaction Service (JTS). In addition, some advanced features that are easily separable from the core JDBC API, such as connection pooling and rowsets, have also been added to javax.sql . Putting these advanced facilities into an optional package instead of into core will help keep the core JDBC API small and focused.

Since optional packages are downloadable, it will always be possible to deploy an application which uses the features in the JDBC Optional Package that will "run anywhere ," since if an optional package isn't installed on a client machine, it can be downloaded along with the application that uses it.

4.2 Changes to Classes and Interfaces

The list below contains all of the JDBC 2.1 API core classes and interfaces. Interfaces and classes that are new are listed in bold type. All of the interfaces and classes present in the JDBC 1.0 API are also present in the core JDBC 2.1 API, however, some of the JDBC 1.0 technology interfaces have gained additional methods. The interfaces that contain new methods are listed in italics and those that have not changed are in normal type.

java.sql.Array

java.sql.BatchUpdateException

java.sql.Blob

java.sql.CallableStatement

java.sql.Clob

java.sql.Connection

java.sql.DatabaseMetaData

java.sql.DataTruncation

java.sql.Date

java.sql.Driver

java.sql.DriverManager

java.sql.DriverPropertyInfo

java.sql.PreparedStatement

java.sql.Ref

java.sql.ResultSet

java.sql.ResultSetMetaData

java.sql.SQLData

java.sql.SQLException

java.sql.SQLInput

java.sql.SQLOutput

java.sql.SQLWarning

java.sql.Statement

java.sql.Struct

java.sql.Time

java.sql.Timestamp

java.sql.Types

The separate core JDBC 2.1 API documentation contains the Java programming language definitions of the java.sql interfaces and classes listed above. The figure below shows the more important core interfaces and their relationships. The important relationships between interfaces have not changed with the introduction of the new JDBC API.

The list below contains the classes and interfaces that comprise the javax.sql package. A detailed specification of these new types is contained in a separate document.

javax.sql.ConnectionEvent

javax.sql.ConnectionEventListener

javax.sql.ConnectionPoolDataSurce

javax.sql.DataSource

javax.sql.PooledConnection

javax.sql.RowSet

javax.sql.RowSetEvent

javax.sql.RowSetInternal

javax.sql.RowSetListenerl

javax.sql.RowSetMetaData

javax.sql.RowSetReader

javax.sql.RowSetWriter

javax.sql.XAConnection

javax.sql.XADataSource

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

5 Result Set Enhancements

This chapter discusses the new functionality that has been added to result sets. The goal of the enhancements is to add two new basic capabilities to result sets: scrolling and updat ability. Several methods have also been added to enable a JDBC driver to deliver improved performance when processing results. A variety of examples are included to illustrate the new features.

5.1 Scrolling

A result set created by executing a statement may support the ability to move backward (last-to-first) through its contents, as well as forward (first-to-last). Result sets that support this capability are called scrollable result sets. Result sets that are scrollable also support relative and absolute positioning. Absolute positioning is the ability to move directly to a row by specifying its absolute position in the result set, while relative positioning gives the ability to move to a row by specifying a position that is relative to the current row. The definition of absolute and relative positioning in the JDBC API is modeled on the X/Open SQL CLI specification.

5.2 Result Set types

The JDBC 1.0 API provided one result set type-forward-only. The JDBC 2.1 core API provides three result set types: forward-only, scroll-insensitive, and scroll-sensitive. As their names suggest, the new result set types support scrolling, but they differ in their ability to make changes visible while they are open.

A scroll-insensitive result set is generally not sensitive to changes that are made while it is open. A scroll-insensitive result set provides a static view of the underlying data it contains. The membership, order, and column values of rows in a scroll-insensitive result set are typically fixed when the result set is created.

On the other hand, a scroll-sensitive result set is sensitive to changes that are made while it is open, and provides a `dynamic' view of the underlying data. For example, when using a scroll-sensitive result set, changes in the underlying column values of rows are visible. The membership and ordering of rows in the result set may be fixed- this is implementation defined.

5.3 Concurrency types

An application may choose from two different concurrency types for a result set: read- only and updatable.

A result set that uses read-only concurrency does not allow updates of its contents. This can increase the overall level of concurrency between transactions, since any number of read-only locks may be held on a data item simultaneously.

A result set that is updatable allows updates and may use database write locks to mediate access to the same data item by different transactions. Since only a single write lock may be held at a time on a data item, this can reduce concurrency. Alternatively, an optimistic concurrency control scheme may be used if it is thought that conflicting accesses to data will be rare. Optimistic concurrency control implementations typically compare rows either by value or by a version number to determine if an update conflict has occurred.

5.4 Performance

Two performance hints may be given to a JDBC 2.1 technology-enabled driver to make access to result set data more efficient. Specifically, the number of rows to be fetched from the database each time more rows are needed can be specified, and a direction for processing the rows-forward, reverse, or unknown-can be given as well. These values can be changed for an individual result set at any time. A JDBC driver may ignore a performance hint if it chooses.

5.5 Creating a result set

The example below illustrates creation of a result set that is forward-only and uses read- only concurrency. No performance hints are given by the example, so the driver is free to do whatever it thinks will result in the best performance. The transaction isolation level for the connection is not specified, so the default transaction isolation level of the underlying database is used for the result set that is created. Note that this code is just written using the JDBC 1.0 API, and that it produces the same type of result set that would have been produced by the JDBC 1.0 API.

Connection con = DriverManager.getConnection(
    "jdbc:my_subprotocol:my_subname");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(
    "SELECT emp_no, salary FROM employees");

The next example creates a scrollable result set that is updatable and sensitive to updates. Rows of data are requested to be fetched twenty-five at-a-time from the database.

Connection con = DriverManager.getConnection(
    "jdbc:my_subprotocol:my_subname");

Statement stmt = con.createStatement(
    ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
stmt.setFetchSize(25);

ResultSet rs = stmt.executeQuery(
    "SELECT emp_no, salary FROM employees");
The example below creates a result set with the same attributes as the previous example, however, a prepared statement is used to produce the result set.

PreparedStatement pstmt = con.prepareStatement(
    "SELECT emp_no, salary FROM employees where emp_no = ?",
    ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_UPDATABLE);

pstmt.setFetchSize(25);
pstmt.setString(1, "100010");
ResultSet rs = pstmt.executeQuery();
The method DatabaseMetaData.supportsResultSetType() can be called to see which result set types are supported by a JDBC driver. However, an application may still ask a JDBC driver to create a Statement, PreparedStatement, or CallableStatement object using a result set type that the driver does not support. In this case, the driver should issue an SQLWarning on the Connection that produces the statement and choose an alternative value for the result set type of the statement according to the following rules:

  1. If an application asks for a scrollable result set type the driver should use a scrollable type that it supports, even if this differs from the exact type requested by the application.
  2. If the application asks for a scrollable result set type and the driver does not support scrolling, then the driver should use a forward-only result set type.
Similarly, the method DatabaseMetaData.supportsResultSetConcurrency() can be called to determine which concurrency types are supported by a driver. If an application asks a JDBC driver for a concurrency type that it does not support then the driver should issue an SQLWarning on the Connection that produces the statement and choose the alternative concurrency type. The choice of result set type should be made first if an application specifies both an unsupported result set type and an unsupported concurrency type.

In some instances, a JDBC driver may need to choose an alternate result set type or concurrency type for a ResultSet at statement execution time. For example, a SELECT statement that contains a join over multiple tables may not produce a ResultSet that is updatable. The JDBC driver should issue an SQLWarning in this case on the Statement, PreparedStatement, or CallableStatement that produces the ResultSet and choose an appropriate result set type or concurrency type as described above. An application may determine the actual result set type and concurrency type of a ResultSet by calling the ResultSet.getType() and getConcurrency() methods, respectively.

5.6 Updates

A result set is updatable if its concurrency type is CONCUR_UPDATABLE. Rows in an updatable result set may be updated, inserted, and deleted. The example below updates the first row of a result set. The ResultSet.updateXXX() methods are used to modify the value of an individual column in the current row, but do not update the underlying database. When the ResultSet.updateRow() method is called the database is updated. Columns may be specified by name or number.

rs.first();
rs.updateString(1, "100020");
rs.updateFloat("salary", 10000.0f);
rs.updateRow();

The updates that an application makes must be discarded by a JDBC driver if the application moves the cursor from the current row before calling updateRow(). In addition, an application can call the ResultSet.cancelRowUpdates() method to explicitly cancel the updates that have been made to a row. The cancelRowUpdates() method must be called after calling updateXXX() and before calling updateRow(), otherwise it has no effect.

The following example illustrates deleting a row. The fifth row in the result set is deleted from the database.

rs.absolute(5);
rs.deleteRow();

The example below shows how a new row may be inserted into a result set. The JDBC API defines the concept of an insert row that is associated with each result set and is used as a staging area for creating the contents of a new row before it is inserted into the result set itself. The ResultSet.moveToInsertRow() method is used to position the result set's cursor on the insert row. The ResultSet.updateXXX() and ResultSet.getXXX() methods are used to update and retrieve individual column values from the insert row. The contents of the insert row is undefined immediately after calling ResultSet.moveToInsertRow() . In other words, the value returned by calling a ResultSet.getXXX() method is undefined after moveToInsertRow() is called until the value is set by calling ResultSet.updateXXX().

Calling ResultSet.updateXXX() while on the insert row does not update the underlying database or the result set. Once all of the column values are set in the insert row, ResultSet.insertRow() is called to update the result set and the database simultaneously. If a column is not given a value by calling updateXXX() while on the insert row, or a column is missing from the result set, then that column must allow a null value. Otherwise, calling insertRow() throws an SQLException.

rs.moveToInsertRow();
rs.updateString(1, "100050");
rs.updateFloat(2, 1000000.0f);
rs.insertRow();
rs.first();
A result set remembers the current cursor position "in the result set" while its cursor is temporarily positioned on the insert row. To leave the insert row, any of the usual cursor positioning methods may be called, including the special method ResultSet.moveToCurrentRow() which returns the cursor to the row which was the current row before ResultSet.moveToInsertRow() was called. In the example above, ResultSet.first() is called to leave the insert row and move to the first row of the result set.

Due to differences in database implementations, the JDBC API does not specify an exact set of SQL queries which must yield an updatable result set for JDBC drivers that support updatability. Developers can, however, generally expect queries which meet the following criteria to produce an updatable result set:

  1. The query references only a single table in the database.
  2. The query does not contain any join operations.
  3. The query selects the primary key of the table it references.
In addition, an SQL query should also satisfy the conditions listed below if inserts are to be performed.

  4. The query selects all of the non-nullable columns in the underlying table.
  5. The query selects all columns that don't have a default value.

5.7 Cursor movement examples

A result set maintains an internal pointer called a cursor that indicates the row in the result set that is currently being accessed. A result set cursor is analogous to the cursor on a computer screen which indicates the current screen position. The cursor maintained by a forward-only result set can only move forward through the contents of the result set. Thus, rows are accessed sequentially beginning with the first row.

Iterating forward through a result set is done by calling the ResultSet.next() method, as with the JDBC 1.0 API. In addition, scrollable result sets-any result set whose type is not forward only-implement the method, beforeFirst(), which may be called to position the cursor before the first row in the result set.

The example below positions the cursor before the first row and then iterates forward through the contents of the result set. The getXXX() methods, which are JDBC 1.0 API methods, are used to retrieve column values.

rs.beforeFirst();
while ( rs.next()) {
    System.out.println(rs.getString("emp_no") +
               " " + rs.getFloat("salary"));
}

Of course, one may iterate backward through a scrollable result set as well, as is shown below.

rs.afterLast();
while (rs.previous()) {
    System.out.println(rs.getString("emp_no") +
        " " + rs.getFloat("salary"));
}
In this example, the ResultSet.afterLast() method positions the scrollable result set's cursor after the last row in the result set. The ResultSet.previous() method is called to move the cursor to the last row, then the next to last, and so on. ResultSet.previous() returns false when there are no more rows, so the loop ends after all of the rows have been visited.

After examining the ResultSet interface, the reader will no doubt recognize that there is more than one way to iterate through the rows of a scrollable result set. It pays to be careful, however, as is illustrated by the following example, which shows one alternative that is incorrect.

// incorrect!!!
while (!rs.isAfterLast()) {
    rs.relative(1);
    System.out.println(rs.getString("emp_no") +
         " " + rs.getFloat("salary"));
}
This example attempts to iterate forward through a scrollable result set and is incorrect for several reasons. One error is that if ResultSet.isAfterLast() is called when the result set is empty, it will return a value of false since there is no last row, and the loop body will be executed, which is not what is wanted. An additional problem occurs when the cursor is positioned before the first row of a result set that contains data. In this case calling rs.relative(1) is erroneous since there is no current row.

The code sample below fixes the problems in the previous example. Here a call to ResultSet.first() is used to distinguish the case of an empty result set from one which contains data. Since ResultSet.isAfterLast() is only called when the result set is non-empty the loop control works correctly, and ResultSet.relative(1) steps through the rows of the result set since ResultSet.first() initially positions the cursor on the first row.

if (rs.first()) {
    while (!rs.isAfterLast()) {
        System.out.println(rs.getString("emp_no") +
            " " + rs.getFloat("salary"));
            rs.relative(1);
    }
}

5.8 Detecting and viewing changes

So far, we have introduced the different result set types and shown a few examples of how a result set of a particular type can be created, updated, and traversed. This section goes into more detail on the differences between result set types, and what these differences mean for an application that uses result sets.

The different result set types-forward-only, scroll-insensitive, and scroll-sensitive- provided by the JDBC API vary greatly in their ability to make changes in the underlying data visible to an application. This aspect of result sets is particularly interesting for the result set types which support scrolling, since they allow a particular row to be visited multiple times while a result set is open.

5.8.1 Visibility of changes

We begin the discussion of this topic by describing the visibility of changes at the transaction level. First, note the seemingly obvious fact that all of the updates that a transaction makes are visible to itself. However, the changes (updates, inserts, and deletes) made by other transactions that are visible to a particular transaction are determined by the transaction isolation level. The isolation level for a transaction can be set by calling

con.setTransactionIsolation(TRANSACTION_READ_COMMITTED);
where the variable con has type Connection. If all transactions in a system execute at the TRANSACTION_READ_COMMITTED isolation level or higher, then a transaction will only see the committed changes of other transactions. The changes that are visible to a result set's enclosing transaction when a result set is opened are always visible through the result set. In fact, this is what it means for an update made by one transaction to be visible to another transaction.

But what about changes made while a result set is open? Are they visible through the result set by, for example, calling ResultSet.getXXX()? Whether a particular result set exposes changes to its underlying data made by other transactions, other result sets that are part of the same transaction (We refer to these two types of changes collectively as `other's changes'.), or itself while the result set is open depends on the result set type.

5.8.2 Other's changes

A scroll-insensitive result set does not make any changes visible that are made by others -other transactions and other result sets in the same transaction-once the result set is opened. The content of a scroll-insensitive result set with respect to changes made by others is static-the membership, ordering, and row values are fixed. For example, if another transaction deletes a row that is contained in a static result set while it is open, the row remains visible. One way to implement a scroll-insensitive result set is to create a private copy of the result set's data.

Scroll-sensitive result sets lie at the opposite end of the spectrum. A scroll-sensitive result set makes all of the updates made by others that are visible to its enclosing transaction visible. Inserts and deletes may not be visible, however.

Let us define carefully what it means for updates to be visible. If an update made by another transaction affects where a row should appear in the result set-this is in effect a delete followed by an insert-the row may not move until the result set is reopened. If an update causes a row to fail to qualify for membership in a result set-this is in effect a delete-the row may remain visible until the result set is reopened. If a row is explicitly deleted by another transaction, a scroll-sensitive result set may maintain a placeholder for the row to permit logical fetching of rows by absolute position. Updated column values are always visible, however.

The DatabaseMetaData interface provides a way to determine the exact capabilities that are supported by a result set. For example, the new methods: othersUpdatesAreVisible , othersDeletesAreVisible, and othersInsertsAreVisible may be used for this purpose.

A forward-only result set is really a degenerate case of either a scroll-insensitive or scroll-sensitive result set- depending on how the DBMS evaluates the query that produces the result set. Most DBMSs have the ability to materialize query results incrementally for some queries. If a query result is materialized incrementally, then data values aren't actually retrieved until they are needed from the DBMS and the result set will behave like a sensitive result set. For some queries, however, incremental materialization isn't possible. For example, if the result set is sorted, the entire result set may need to be produced a priori before the first row in the result set is returned to the application by the DBMS. In this case a forward-only result set will behave like an insensitive result set.

For a TYPE_FORWARD_ONLY result set the othersUpdatesAreVisible, othersDeletesAreVisible , and othersInsertsAreVisible methods determine whether inserts, updates, and deletes are visible when the result set is materialized incrementally by the DBMS. If the result of a query is sorted then incremental materialization may not be possible and changes will not be visible, even if the methods above return true.

5.8.3 A result set's own changes

We have pointed out that the visibility of changes made by others generally depends on a result set's type. A final point that concerns the visibility of changes via an open result set is whether a result set can see its own changes (inserts, updates, and deletes). A JDBC technology application can determine if the changes made by a result set are visible to the result set itself by calling the DatabaseMetaData methods: ownUpdatesAreVisible , ownDeletesAreVisible, and ownInsertsAreVisible. These methods are needed since this capability can vary between DBMSs and JDBC drivers.

One's own updates are visible if an updated column value can be retrieved by calling getXXX() following a call to updateXXX(). Updates are not visible if getXXX() still returns the initial column value after updateXXX() is called. Similarly, an inserted row is visible if it appears in the result set following a call to insertRow(). An inserted row is not visible if it does not appear in the result set immediately after insertRow() is called-without closing and reopening the result set. Deletions are visible if deleted rows are either removed from the result set or if deleted rows leave a hole in the result set.

The following example, shows how an application may determine whether a TYPE_SCROLL_SENSITIVE result set can see its own updates.

DatabaseMetaData dmd;
...
if (dmd.ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE))
{
    // changes are visible
}

5.8.4 Detecting changes

The ResultSet.wasUpdated(), wasDeleted(), and wasInserted() methods can be called to determine whether a row has been effected by a visible update, delete, or insert respectively since the result set was opened. The ability of a result set to detect changes is orthogonal to its ability to make changes visible. In other words, visible changes are not automatically detected.

The DatabaseMetaData interface provides methods that allow an application to determine whether a JDBC driver can detect changes for a particular result set type. For example,

boolean bool = dmd.deletesAreDetected(
    ResultSet.TYPE_SCROLL_SENSITIVE);

If deletesAreDetected returns true, then ResultSet.wasDeleted() can be used to detect `holes' in a TYPE_SCROLL_SENSITIVE result set.

5.9 Refetching a row

Some applications may need to see up-to-the-second changes that have been made to a row. Since a JDBC driver can do prefetching and caching of data that is read from the underlying database (see ResultSet.setFetchSize()), an application may not see the very latest changes that have been made to a row, even when a sensitive result set is used and updates are visible. The ResultSet.refreshRow() method is provided to allow an application to request that a driver refresh a row with the latest values stored in the database. A JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one. Applications should exercise restraint in calling refreshRow(), since calling this method frequently will likely slow performance.

5.10 JDBC API compliance

Although we expect most JDBC drivers to support scrollable result sets, we have made them optional to minimize the complexity of implementing JDBC drivers for data sources that do not support scrollability. The goal is that it be possible for a JDBC driver to implement scrollable result sets using the support provided by the underlying database system for systems that have such support. If the DBMS associated with a driver does not support scrollability then this feature may be omitted, or a JDBC driver may implement scrollability as a layer on top of the DBMS. Its important to note that JDBC technology rowsets, which are part of the JDBC Optional Package API, always support scrollability, so a rowset can be used when the underlying DBMS doesn't support scrollable results.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

6 Batch Updates

The batch update facility allows multiple update operations to be submitted to a data source for processing at once. Submitting multiple updates together, instead of individually, can greatly improve performance. Statement, PreparedStatement, and CallableStatement objects can be used to submit batch updates.

6.1 Description of batch updates

6.1.1 Statements

The batch update facility allows a Statement object to submit a set of heterogeneous update commands together as a single unit, or batch, to the underlying DBMS. In the example below all of the update operations required to insert a new employee into a fictitious company database are submitted as a single batch.

// turn off autocommit
con.setAutoCommit(false);

Statement stmt = con.createStatement();

stmt.addBatch("INSERT INTO employees VALUES (1000, 'Joe Jones')");
stmt.addBatch("INSERT INTO departments VALUES (260, 'Shoe')");
stmt.addBatch("INSERT INTO emp_dept VALUES (1000, 260)");

// submit a batch of update commands for execution
int[] updateCounts = stmt.executeBatch();
In the example, autocommit mode is disabled to prevent the driver from committing the transaction when Statement.executeBatch() is called. Disabling autocommit allows an application to decide whether or not to commit the transaction in the event that an error occurs and some of the commands in a batch cannot be processed successfully. For this reason, autocommit should always be turned off when batch updates are done. The commit behavior of executeBatch is always implementation defined when an error occurs and autocommit is true.

To keep our discussion of batch updates general, we define the term element to refer to an individual member of a batch. As we have seen, an element in a batch is just a simple command when a Statement object is being used. Although we are focusing on using Statement objects to do batch updates in this section, the discussion that follows applies to PreparedStatment and CallableStatement objects, as well.

In the new JDBC API, a Statement object has the ability to keep track of a list of commands -or batch-that can be submitted together for execution. When a Statement object is created, its associated batch is empty-the batch contains no elements. The Statement.addBatch() method adds an element to the calling statement's batch. The method Statement.clearBatch() (not shown above) can be called to reset a batch if the application decides not to submit a batch of commands that has been constructed for a statement.

Successful execution

The Statement.executeBatch() method submits a statement's batch to the underlying data source for execution. Batch elements are executed serially (at least logically) in the order in which they were added to the batch. When all of the elements in a batch execute successfully, executeBatch() returns an integer array containing one entry for each element in the batch. The entries in the array are ordered according to the order in which the elements were processed (which, again, is the same as the order in which the elements were originally added to the batch). An entry in the array may have the following values:

  1. If the value of an array entry is greater than or equal to zero, then the batch element was processed successfully and the value is an update count indicating the number of rows in the database that were effected by the element's execution.
  2. A value of -2 indicates that a element was processed successfully, but that the number of effected rows is unknown.
Calling executeBatch() closes the calling Statement object's current result set if one is open. The statement's internal list of batch elements is reset to empty once executeBatch() returns. The behavior of the executeQuery, executeUpdate, or execute methods is implementation defined when a statement's batch is non-empty.

ExecuteBatch() throws a BatchUpdateException if any of the elements in the batch fail to execute properly, or if an element attempts to return a result set. Only DDL and DML commands that return a simple update count may be executed as part of a batch. When a BatchUpdateException is thrown, the BatchUpdateException.getUpdateCounts() method can be called to obtain an integer array of update counts that describes the outcome of the batch execution.

Handling failures during execution

A JDBC driver may or may not continue processing the remaining elements in a batch once execution of an element in a batch fails. However, a JDBC driver must always provide the same behavior when used with a particular DBMS. For example, a driver cannot continue processing after a failure for one batch, and not continue processing for another batch.

If a driver stops processing after the first failure, the array returned by BatchUpdateException.getUpdateCounts() will always contain fewer entries than there were elements in the batch. Since elements are executed in the order that they are added to the batch, if the array contains N elements, this means that the first N elements in the batch were processed successfully when executeBatch() was called.

When a driver continues processing in the presence of failures, the number of elements, N, in the array returned by BatchUpdateException.getUpdateCounts()is always equal to the number of elements in the batch. The following additional array value is returned when a BatchUpdateException is thrown and the driver continues processing after a failure:

  3. A value of -3 indicates that the command or element failed to execute successfully. This value is also returned for elements that could not be processed for some reason-such elements fail implicitly.
JDBC drivers that do not continue processing after a failure never return -3 in an update count array. Drivers of this type simply return a status array containing an entry for each command that was processed successfully.

A JDBC technology based application can distinguish a JDBC driver that continues processing after a failure from one that does not by examining the size of the array returned by BatchUpdateException.getUpdateCounts(). A JDBC driver that continues processing always returns an array containing one entry for each element in the batch. A JDBC driver that does not continue processing after a failure will always return an array whose number of entries is less than the number of elements in the batch.

6.1.2 PreparedStatements

An element in a batch consists of a parameterized command and an associated set of parameters when a PreparedStatement is used. The batch update facility is used with a PreparedStatement to associate multiple sets of input parameter values with a single PreparedStatement object. The sets of parameter values together with their associated parameterized update command can then be sent to the underlying DBMS engine for execution as a single unit.

The example below inserts two new employee records into a database as a single batch. The PreparedStatement.setXXX() methods are used to create each parameter set (one for each employee), while the PreparedStatement.addBatch() method adds a set of parameters to the current batch.

// turn off autocommit
con.setAutoCommit(false);

PreparedStatement stmt = con.prepareStatement(
    "INSERT INTO employees VALUES (?, ?)");

stmt.setInt(1, 2000);
stmt.setString(2, "Kelly Kaufmann");
stmt.addBatch();

stmt.setInt(1, 3000);
stmt.setString(2, "Bill Barnes");
stmt.addBatch();

// submit the batch for execution
int[] updateCounts = stmt.executeBatch();
Finally, PreparedStatement.executeBatch() is called to submit the updates to the DBMS. Calling PreparedStatement.executeBatch() clears the statement's associated list of batch elements. The array returned by PreparedStatement.executeBatch() contains an element for each set of parameters in the batch, similar to the case for Statement. Each element either contains an update count or the generic `success' indicator (-2).

Error handling in the case of PreparedStatement objects is the same as error handling in the case of Statement objects. Some drivers may stop processing as soon as an error occurs, while others may continue processing the rest of the batch. As for Statement, the number of elements in the array returned by BatchUpdateException.getUpdateCounts() indicates whether or not the driver continues processing after a failure. The same three array element values are possible, as for Statement. The order of the entries in the array is the same order as the order in which elements were added to the batch.

6.1.3 Callable Statements

The batch update facility works the same with CallableStatement objects as it does with PreparedStatement objects. Multiple sets of input parameter values may be associated with a callable statement and sent to the DBMS together. Stored procedures invoked using the batch update facility with a callable statement must return an update count, and may not have out or inout parameters. The CallableStatement.executeBatch() method should throw an exception if this restriction is violated. Error handling is analogous to PreparedStatement.

6.2 What's required

Support for batch updates is optional. If a JDBC driver supports batch updates, then the DatabaseMetaData.supportsBatchUpdates() method must return true, else it must return false. In addition, to preserve backward compatibility, JDBC drivers that do not continue processing after a failure are not required to return a value of -2 as described in Section 6.1, however, this is encouraged. JDBC drivers that continue processing are required to support both of the negative return values.

Note: In the future, the JDBC API shall define symbolic constants for the negative array entry values described in Section 6.1. These values have been added as an addendum to the original JDBC 2.0 API specification.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

7 Persistence for Java Objects

The JDBC 1.0 API provided some support for storing objects and retrieving Java objects from a database via the getObject() and setObject() mechanism. The new JDBC API enhances the ability of a JDBC driver to implement persistence for Java objects in general, by providing new metadata capabilities that can be used to retrieve a description of the Java objects that a data source contains. Instances of a Java programming language class (Java class) can be stored in a database as serialized Java objects, or in some other vendor specific format. If object serialization is used then references between objects can be treated according to the rules specified by Java object serialization.

The new JDBC API features described in this chapter are intended to support a new generation of Java-aware database management systems, termed Java-relational DBMSs. A Java-relational DBMS extends the type system of a database with Java object types and allows users to write queries that reference these types. Several database vendors are creating products with Java-relational capabilities. The mechanisms described in this chapter are optional. JDBC drivers that do not support the capabilities described in this chapter are not required to implement them.

Lets take a look at how a typical application written in the Java programming language (Java application) can make use of the JDBC API to store and retrieve Java objects.

7.1 Retrieving Java objects

The example below shows how objects can be retrieved using the JDBC API. The example query references a table, PERSONNEL, that contains a column called Employee containing instances of the Java class Employee. Here, the column name, Employee, and the Java class name are the same, but this is not required by the JDBC API. In fact, since there is currently not a standard, agreed upon syntax for SQL queries that reference Java programming language types (Java types), the JDBC API does not mandate the use of any particular query syntax.

ResultSet rs = stmt.executeQuery(
    "SELECT Employee FROM PERSONNEL");
rs.next();
Employee emp = (Employee)rs.getObject(1);

The example selects all of the Employee instances from the PERSONNEL table. The ResultSet.next() method is called to position the result set to the first row containing an Employee. The example application then obtains an Employee instance by calling ResultSet.getObject(). This causes the JDBC driver to construct an instance of the Employee class, possibly by deserializing a serialized object instance, and return the instance as a java.lang.Object which the application then narrows to an Employee.

Note that the example above does not contain any additions to the JDBC 1.0 API aside from possibly requiring some form of extended SQL query syntax which is not specified by the JDBC API. As an aside, we note that the JDBC technology based code shown above can also be used to retrieve data of an SQL user-defined type that is being mapped to a Java class. The details on how this is done are specified in a later chapter.

7.2 Storing Java objects

The following example code illustrates the process of updating a Java object and making the updated copy of the object persistent using JDBC technology.

emp.setSalary(emp.getSalary() * 1.5);
PreparedStatement pstmt = con.preparedStatement(
"UPDATE PERSONNEL SET Employee = ? WHERE Employee.no = 1001");
pstmt.setObject(1, emp);
pstmt.executeUpdate();
The example gives an employee a 50% raise. First, the Employee.setSalary() method is called to update the value of the employee's salary. Note that the semantics of methods on the Employee class are not specified by the JDBC API. Here, we assume that the Employee class is an ordinary Java class, so calling Employee.setSalary() just changes the value of some private data field contained in the Employee instance. Calling Employee.setSalary() does not update the database, for example, although an alternative implementation could do this, in effect making database updates `transparent' to applications that use the Employee class.

Next, a PreparedStatement object is created using an extended SQL UPDATE command -the query syntax used in the example is again not mandated by the JDBC API. The UPDATE command specifies that the Employee column in the PERSONNEL table is to be changed for a specified row. PreparedStatement.setObject() is used to pass the Employee object to the prepared statement, and the executeUpdate() method updates the Employee value stored in the database.

Note once again that the example above does not involve any syntactic additions to the JDBC 1.0 API. In addition, the same code could be used if the Employee class was being mapped to an SQL user-defined type.

7.3 Additional metadata

The new JDBC API contains new metadata support that allows an application to obtain a complete description of the Java objects that are stored in a data source.

7.3.1 Identifying Java objects

A new type code, JAVA_OBJECT, has been added to java.sql.Types to denote a Java object type. The JAVA_OBJECT type code is returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns(). For example, if a DBMS supports types that can be a Java class, DatabaseMetaData.getTypeInfo() would return a result set containing the following entry:

  1. TYPE_NAME String => data source specific name (may be null)
  2. DATA_TYPE short => java.sql.Types.JAVA_OBJECT
  3. etc.

The TYPE_NAME column contains the data source specific term for a Java object, such as "JavaObject", "Serialized" etc. TYPE_NAME may be null.

7.3.2 Retrieving schema-specific Java type descriptions

A Java class is typically registered with a particular database schema before it is used in defining the schema's tables. Information on schema-specific user-defined types- of which JAVA_OBJECT types are one particular kind-can be retrieved by calling the DatabaseMetaData.getUDTs() method. For example,

int[] types = {Types.JAVA_OBJECT};
ResultSet rs = dmd.getUDTs("catalog-name", "schema-name",
    "%", types);

returns descriptions of all the Java object types defined in the catalog-name.schema- name schema. If the driver does not support UDTs or no matching UDTs are found then an empty result set is returned.

Each type description has the following columns:

TYPE_CAT | String => the type's catalog (may be null)
TYPE_SCHEM | String => the type's schema (may be null)
TYPE_NAME | String => the database type name
JAVA_CLASS | String => a Java classname
DATA_TYPE | short => value defined in java.sql.Types, e.g. JAVA_OBJECT
REMARKS | String => explanatory comment on the type

The TYPE_CAT, TYPE_SCHEM, DATA_TYPE, and REMARKS columns should be self-explanatory. The TYPE_NAME is, in effect, the SQL type name. This is the name used in a CREATE TABLE statement to specify a column of this type.

When DATA_TYPE is JAVA_OBJECT, the JAVA_CLASS is the fully qualified Java class name of the Java class associated with TYPE_NAME. All values actually stored in a TYPE_NAME column must be instances of this class or one of its subclasses. Instances of this class or a subclass are materialized by the JDBC driver when values are fetched from a TYPE_NAME column by an application that uses JDBC technology.

The DatabaseMetaData.getUDTs() method also accepts a fully qualified SQL name as its third parameter. In this case the catalog and schema pattern parameters are ignored. The fully qualified SQL name may contain wildcards. For example, the code sample below is equivalent to the previous example,

int[] types = {Types.JAVA_OBJECT};
ResultSet rs = dmd.getUDTs(null, null,
    "catalog-name.schema-name.%", types);
Here we have assumed that the `.' character is used to separate the elements of a fully qualified name. Note that since the format of fully qualified names may vary between database systems, one should generally not hardcode fully qualifed names as in the example above. The DatabaseMetaData interface provides information about the format of fully qualified names that is supported by a particular JDBC driver.

7.3.3 Retrieving the Java class object

The JDBC API doesn't provide any special support for loading the Java class files that correspond to Java objects being stored in a database. An application should be able to obtain the class object that corresponds to an object in the database by calling Class.forName() and passing the class name as a parameter. In other words, the JDBC API assumes that the bytecodes for objects stored in the database are loaded via the usual Java programming language mechanism.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

8 New SQL Types

The next two chapters discuss additions to the JDBC API that allow a Java application to access new SQL data types, such as binary large objects and structured types. JDBC drivers that do not support the new SQL types need not implement the methods and interfaces described in these chapters.

8.1 Taxonomy of SQL Types

The latest version of the ANSI/ISO SQL standard is commonly referred to as SQL99. The JDBC API incorporates a model of the new SQL99 types that includes only those properties that are essential to exchanging data between Java applications and databases. The JDBC API should not be affected if some details of the syntax and server-side semantics of the new SQL99 types are altered before the draft becomes an official standard.

The SQL99 draft specifies these data types:

  • SQL2 built-in types-the familiar SQL `column types'

    • CHAR

    • FLOAT

    • DATE

    • etc.

  • New built-in types-new types added by SQL99

    • BLOB-a Binary Large OBject

    • CLOB-a Character Large OBject

  • Structured types, for example:

    • CREATE TYPE PLANE_POINT (X FLOAT, Y FLOAT)

  • Distinct types-based on the representation of a built-in type, for example:

    • CREATE TYPE MONEY AS NUMERIC(10,2)

  • Constructed types-based on a given base type:

    • REF(structured-type)-designates row containing a structured type instance

    • base-type ARRAY[n]-an array of n base-type elements

  • Locator types-designate a datum that resides on the server

    • LOCATOR(structured-type)-locator to structured instance in server

    • LOCATOR(array)-locator to array in server

    • LOCATOR(blob)-locator to Binary Large Object in server

    • LOCATOR(clob)-locator to Character Large Object in server

A REF value persistently denotes an instance of a structured type that resides in the database. A LOCATOR exists only in the client environment and is a transient, logical pointer to data that resides on the database server. A locator typically refers to data that is too large to materialize on the client, for example, images or audio. There are operators defined at the SQL level to retrieve random-access pieces of the data denoted by the locator.

The remainder of this chapter discusses the default mechanism provided by the JDBC API for accessing each of the new SQL types mentioned above. The JDBC API also provides a means for customizing the mapping of SQL distinct and structured types into Java classes. This mechanism is discussed in the Chapter 9.

8.2 Blobs and clobs

8.2.1 Retrieving blobs and clobs

The binary large object (blob) and character large object (clob) data types are treated similarly to the existing, built-in types defined in the JDBC API. Values of these types can be retrieved by calling the getBlob() and getClob() methods that appear on the ResultSet and CallableStatement interfaces. For example,

Blob blob = rs.getBlob(1);
Clob clob = rs.getClob(2);
retrieves a blob value from the first column of the result set and a clob value from the second column. The Blob interface contains operations for returning the length of the blob, a specific range of bytes contained in the blob, etc. The Clob interface contains corresponding operations that are character based. See the accompanying API documentation for more details.

An application does not deal directly with the LOCATOR(blob) and LOCATOR(clob) types that are defined in SQL. By default, a JDBC driver should implement the Blob and Clob interfaces using the appropriate locator type. Also, by default Blob and Clob objects only remain valid during the transaction in which they are created. A JDBC driver may allow these defaults to be changed. For example, the lifetime of Blob and Clob objects could be changed to session-scoped. However, the JDBC API does not specify how this is done.

8.2.2 Storing blobs and clobs

A Blob or Clob value can be passed as an input parameter to a PreparedStatement object just like other data types by calling the setBlob() and setClob() methods respectively. The setBinaryStream(), and setObject() methods may be used to input a stream value as a blob. The setAsciiStream(), setUnicodeStream(), and setObject() methods may be used to input a stream as a clob value.

8.2.3 Metadata additions

Two new type codes, BLOB and CLOB, have been added to java.sql.Types. These values are returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns() when a JDBC driver supports these data types.

8.3 Arrays

8.3.1 Retrieving arrays

Data of type SQL array can be retrieved by calling the getArray() method of the ResultSet and CallableStatement interfaces. For example,

Array a = rs.getArray(1);
retrieves an Array value from the first column of the result set. By default, a JDBC driver should implement the Array interface using an SQL LOCATOR(array) internally. Also, by default Array objects only remain valid during the transaction in which they are created. These defaults may be changed as for the Blob and Clob types, but the JDBC API does not specify how this is done.

The Array interface provides several methods which return the contents of the array to the client as a materialized Java programming language array (Java array) or ResultSet object. These methods are getArray()and getResultSet(), respectively. See the separate API documentation for details.

8.3.2 Storing arrays

The PreparedStatement.setArray() method may be called to pass an Array value as an input parameter to a prepared statement. A Java array may be passed as an input parameter by calling PreparedSatement.setObject().

8.3.3 Metadata additions

A new type code, ARRAY, has been added to java.sql.Types. This value is returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns() when a JDBC driver supports the Array data type.

8.4 Refs

8.4.1 Retrieving refs

An SQL reference can be retrieved by calling the getRef() method of the ResultSet and CallableStatement interfaces. For example,

Ref ref = rs.getRef(1);
retrieves a Ref value from the first column of the result set. By default, retrieving a Ref value does not materialize the data to which the Ref refers. Also, by default a Ref value remains valid while the session or connection on which it is created is open. These defaults may be overridden, but again the JDBC API does not specify how this is done.

The Ref interface does not provide methods for dereferencing. Instead, a Ref can be passed as an input parameter to an appropriate SQL statement that fetches the object that it references. See the separate JDBC API documentation for details.

8.4.2 Storing refs

The PreparedStatement.setRef() method may be called to pass a Ref as an input parameter to a prepared statement.

8.4.3 Metadata additions

A new type code, REF, has been added to java.sql.Types. This value is returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns() when a JDBC driver supports the Ref data type.

8.5 Distinct types

8.5.1 Retrieving distinct types

By default, a datum of SQL type DISTINCT is retrieved by calling any getXXX() method that is appropriate to the underlying type that the distinct type is based on. For example, given the following type declaration:

CREATE TYPE MONEY AS NUMERIC(10,2)

a value of type MONEY could be retrieved as follows:

java.math.BigDecimal bd = rs.getBigDecimal(1);
since the underlying SQL NUMERIC type is mapped to the java.math.BigDecimal type.

8.5.2 Storing distinct types

Any PreparedStatement.setXXX() method that is appropriate to the underlying type of an SQL DISTINCT type may be used to pass an input parameter of that distinct type to a prepared statement. For example, given the definition of type MONEY above PreparedStatement.setBigDecimal() would be used.

8.5.3 Metadata additions

A new type code, DISTINCT, has been added to java.sql.Types. This value is returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns() when a JDBC driver supports this data type.

An SQL DISTINCT type must be defined as part of a particular database schema before it is used in a schema table definition. Information on schema-specific user-defined types-of which DISTINCT types are one particular kind-can be retrieved by calling the DatabaseMetaData.getUDTs() method. For example,

int[] types = {Types.DISTINCT};
ResultSet rs = dmd.getUDTs("catalog-name", "schema-name",
    "%", types);

returns descriptions of all the SQL DISTINCT types defined in the catalog- name.schema-name schema. If the driver does not support UDTs or no matching UDTs are found then an empty result set is returned.

Each type description has the following columns:

TYPE_CAT | String => the type's catalog (may be null)
TYPE_SCHEM | String => the type's schema (may be null)
TYPE_NAME | String => the database type name
JAVA_CLASS | String => a Java class or interface name
DATA_TYPE | short => value defined in java.sql.Types, e.g. DISTINCT
REMARKS | String => explanatory comment on the type

Most of the columns above should be self-explanatory. The TYPE_NAME is the SQL type name given to the DISTINCT type-MONEY in the example above. This is the name used in a CREATE TABLE statement to specify a column of this type.

When DATA_TYPE is Types.DISTINCT, the JAVA_CLASS column contains a fully qualified Java class name. Instances of this class will be created if getObject() is called on a column of this DISTINCT type. For example, JAVA_CLASS would default to java.math.BigDecimal in the case of MONEY above. The JDBC API does not prohibit a driver from returning a subtype of the class named by JAVA_CLASS. The JAVA_CLASS value reflects a custom type mapping when one is used. See Chapter 9 for details.

8.6 Structured types

8.6.1 Retrieving structured types

A value of an SQL structured type is always retrieved by calling method getObject(). By default, getObject() returns a value of type Struct for a structured type. For example,

Struct struct = (Struct)rs.getObject(1);

retrieves a Struct value from the first column of the current row of result set rs. The Struct interface contains methods for retrieving the attributes of a structured type as an array of java.lang.Object values. By default, a JDBC driver should materialize the contents of a Struct prior to returning a reference to it to the application. Also, by default a Struct object is considered valid as long as the Java application maintains a reference to it. A JDBC driver may allow these defaults to be changed-to allow an SQL LOCATOR to be used, for example-but the JDBC API does not specify how this is done.

8.6.2 Storing structured types

The PreparedStatement.setObject() method may be called to pass a Struct as an input parameter to a prepared statement.

8.6.3 Metadata additions

A new type code, STRUCT, has been added to java.sql.Types. This value is returned by methods such as DatabaseMetaData.getTypeInfo() and DatabaseMetaData.getColumns() when a JDBC driver supports structured data types.

A structured SQL type must be defined as part of a particular database schema before it can be used in a schema table definition. Information on schema-specific user-defined types-of which STRUCT types are one particular kind-can be retrieved by calling the DatabaseMetaData.getUDTs() method. For example,

int[] types = {Types.STRUCT};
ResultSet rs = dmd.getUDTs("catalog-name", "schema-name",
    "%", types);

returns descriptions of all the structured SQL types defined in the catalog- name.schema-name schema. If the driver does not support UDTs or no matching UDTs are found then an empty result set is returned. See section 8.5.3 for a description of the result set returned by getUDTs().

When the DATA_TYPE returned by getUDTs() is Types.STRUCT, the JAVA_CLASS column contains the fully qualified Java class name of a Java class. Instances of this class are manufactured by the JDBC driver when getObject() is called on a column of this STRUCT type. Thus, JAVA_CLASS defaults to java.sql.Struct for structured types. Chapter 9 discusses how this default can be modified by a Java application. We note here only that the JDBC API does not prohibit a driver from returning a subtype of the class named by JAVA_CLASS.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

9 Customizing SQL Types

This chapter describes the support that the JDBC API provides for customizing the mapping of SQL structured and distinct types into Java classes. The customization mechanism involves minimal extensions to the JDBC API. The new functionality is an extension of the existing getObject() and setObject() mechanism.

9.1 The type mapping

An instance of java.util.Map is used to hold a custom mapping between SQL user- defined types-structured and distinct types-and Java classes. The java.util.Map interface is new in the JDK 1.2 and replaces java.util.Dictionary. Such an object is termed a type-map object. A type-map object implements a function from SQL names of user-defined types to objects of type java.lang.Class. A type-map object determines the class from which to construct an object to contain data of a given SQL user-defined type.

Each Connection has an associated type-map object. The type-map object contains type-mappings for translating data of SQL user-defined types in operations on that connection. Methods are provided for getting and setting a connection's type map. For example,

java.util.Map map = con.getTypeMap();
con.setTypeMap(map);
The Connection.getTypeMap() method returns the type-map object associated with a connection, while Connection.setTypeMap() can be used to set a new type mapping.

The mapping mechanism is quite flexible. If a connection's type mapping is not explicitly initialized by the JDBC application, then the default mappings described in Chapter 8 are used by operations on the connection. If a custom mapping is inserted into the type-map for SQL type type-name, then all operations on the connection will use this custom mapping for values of type type-name. Finally, we note that type-map objects may even be provided explicitly when calling certain getXXX() and setXXX() methods to override the custom or default mapping associated with a Connection.

9.2 Java class conventions

A Java class which appears in a custom type-map must implement a new interface- java.sql.SQLData. The SQLData interface contains methods that convert instances of SQL user-defined types to Java class instances, and vice versa. For example, the method SQLData.readSQL() reads a stream of data values and builds a Java object, while method SQLData.writeSQL() writes a sequence of values from a Java object to a stream. We anticipate that these methods will typically be generated by a tool which understands the database schema.

This stream-based approach for exchanging data between SQL and the Java programming language is conceptually similar to Java object Serialization. The data are read from and written to an SQL data stream provided by the JDBC driver. The SQL data stream may be implemented on various network protocols and data-formats. It may be implemented on any logical data-representation in which the leaf SQL data items (of which SQL structured types are composed) can be read from (written to) the data stream in a "depth-first" traversal of the structured types. That is, the attributes of an SQL structured type appear in the stream in the order in which they are declared in that type, and each (perhaps structured) attribute value appears fully (its structure recursively elaborated) in the stream before the next attribute. For data of SQL structured types that use inheritance, the attributes must appear in the stream in the order that they are inherited. That is, the attributes of a super-type must appear before attributes of a sub- type. If multiple inheritance is used, then the attributes of super-types should appear in the stream in the order in which the super-types are listed in the type declaration. This protocol does not require the database server to have any knowledge of the Java programming language.

9.3 Streams of SQL data

This section describes the stream interfaces, SQLInput and SQLOutput, which support customization of the SQL to Java type mapping.

9.3.1 Retrieving data

When data of SQL structured and distinct types are retrieved from the database, they "arrive" in a stream implementing the SQLInput interface. The SQLInput interface contains methods for reading individual data values sequentially from the stream. The example below illustrates how a SQLInput stream can be used to provide values for the fields of an SQLData object. The SQLData object-the this object in the example- contains three persistent fields: a String s, a Blob blob, and an Employee emp.

this.str = sqlin.readString();
this.blob = sqlin.readBlob();
this.emp = (Employee)sqlin.readObject();
The SQLInput.readString() method reads a String value from the stream. The SQLInput.readBlob() method can be used to retrieve a Blob value from the stream. By default, the Blob interface is implemented using an SQL locator, so calling readBlob() doesn't materialize the blob contents on the client. The SQLInput.readObject() method can be used to return an object reference from the stream. In the example, the Object returned is narrowed to an Employee.

There are a number of additional readXXX() methods defined on the SQLInput interface for reading each of the types. The SQLInput.wasNull() method can be called to check if the value returned by a readXXX() method was null.

9.3.2 Storing data

When an SQLData object is passed to a driver as an input parameter via a setXXX() method, the JDBC driver calls the object's SQLData.writeSql() method to obtain a stream representation of the contents of the object. Method writeSQL() writes data from the object to an SQLOutput stream as the representation of an SQL user-defined type. Method writeSQL() will typically have been generated by some tool from an SQL type definition. The example below illustrates use of the SQLOutput stream object.

sqlout.writeString(this.str);
sqlout.writeBlob(this.blob);
sqlout.writeObject(this.emp);
The example shows how the contents of an SQLData object can be written to an SQLOutput stream. The SQLData object-the this object in the example-contains three persistent fields: a String s, a Blob blob, and an Employee emp. Each field is written in turn to the SQLOutput stream, sqlout. The SQLOutput interface contains additional methods for writing each of the types defined in the JDBC API.

9.4 Examples

9.4.1 Example of SQL structured type

The following SQL example defines structured types PERSON, FULLNAME, and RESIDENCE. It defines tables with rows of types PERSON and RESIDENCE, and inserts a row into each, so that one row references another. Finally, it queries the table.

CREATE TYPE RESIDENCE
(
    DOOR NUMERIC(6),
    STREET VARCHAR(100),
    CITY VARCHAR(50),
    OCCUPANT REF(PERSON)
);

CREATE TYPE FULLNAME
(
    FIRST VARCHAR(50),
    LAST VARCHAR(50)
);

CREATE TYPE PERSON
(
    NAME FULLNAME,
    HEIGHT NUMERIC,
    WEIGHT NUMERIC,
    HOME REF(RESIDENCE)
);

CREATE TABLE HOMES OF RESIDENCE (OID REF(RESIDENCE)
    VALUES ARE SYSTEM GENERATED);

CREATE TABLE PEOPLE OF PERSON (OID REF(PERSON)
    VALUES ARE SYSTEM GENERATED);

INSERT INTO PEOPLE (SURNAME, HEIGHT, WEIGHT) VALUES
(
    FULLNAME('DAFFY', 'DUCK'),
    4,
    58
);

INSERT INTO HOMES (DOOR, STREET, CITY, OCCUPANT) VALUES
(
    1234,
    'CARTOON LANE',
    'LOS ANGELES',
    (SELECT OID FROM PEOPLE P WHERE P.NAME.FIRST = 'DAFFY')
);

UPDATE PEOPLE SET HOME = (SELECT OID FROM HOMES H WHERE
        H.OCCUPANT->NAME.FIRST = 'DAFFY') WHERE
        FULLNAME.FIRST = 'DAFFY'

The example above constructs three structured type instances, one each of types PERSON, FULLNAME, and RESIDENCE. A FULLNAME attribute is embedded in a PERSON. The PERSON and RESIDENCE instances are stored as rows of tables, and reference each other via Ref attributes.

The Java classes below represent the SQL structured types given above. We expect that such classes will typically be generated by a tool that reads the definitions of those structured types from the catalog tables, and, subject to customizations that a user of the tool may provide for name-mappings and type-mappings of primitive fields, will generate Java classes like those shown below.

Note: The JDBC API does not provide a standard API for accessing the metadata needed by a mapping tool. Providing this type of metadata introduces many subtle dependencies on the SQL99 type model, so it has been left out for now.

In each class below, method SQLData.readSQL() reads the attributes in the order that they appear in the definition of the corresponding structured types in the database (i.e., in "row order, depth-first" order, where the complete structure of each attribute is read, recursively, before the next attribute is read). Similarly, SQLData.writeSQL() writes the data to the stream in that order.

public class Residence implements SQLData {
    public int door;
    public String street;
    public String city;
    public Ref occupant;

    private String sql_type;
    public String getSQLTypeName() { return sql_type; }

    public void readSQL (SQLInput stream, String type)
    throws SQLException {
      sql_type = type;
      door = stream.readInt();
      street = stream.readString();
      city = stream.readString();
      occupant = stream.readRef();
    }

    public void writeSQL (SQLOutput stream) throws SQLException {
      stream.writeInt(door);
      stream.writeString(street);
      stream.writeString(city);
      stream.writeRef(occupant);
    }
}

public class Fullname implements SQLData {
    public String first;
    public String last;

    private String sql_type;
    public String getSQLTypeName() { return sql_type; }

    public void readSQL (SQLInput stream, String type)
    throws SQLException {
      sql_type = type;
      first = stream.readString();
      last = stream.readString();
    }

    public void writeSQL (SQLOutput stream) throws SQLException {
      stream.writeString(first);
      stream.writeString(last);
    }
}

public class Person implements SQLData {
    Fullname name;
    float height;
    float weight;
    Ref home;

    private String sql_type;
    public String getSQLTypeName() { return sql_type; }

    public void readSQL (SQLInput stream, String type)
    throws SQLException {
      sql_type = type;
      name = (Fullname)stream.readObject();
      height = stream.readFloat();
      weight = stream.readFloat();
      home = stream.readRef();
    }

    public void writeSQL (SQLOutput stream)
        throws SQLException {
      stream.writeObject(name);
      stream.writeFloat(height);
      stream.writeFloat(weight);
      stream.writeRef(home);
    }
}

The following method uses those classes to materialize data from the tables HOMES and PEOPLE that were defined earlier:

import java.sql.*;
.
.
.

public void demo (Connection con) throws SQLException {

  // setup mappings for the connection
  try {
    java.util.Map map = con.getTypeMap();
    map.put("S.RESIDENCE", Class.forName("Residence"));
    map.put("S.FULLNAME", Class.forName("Fullname"));
    map.put("S.PERSON", Class.forName("Person"));
  }
  catch (ClassNotFoundException ex) {}

  PreparedStatement pstmt;
  ResultSet rs;

  pstmt = con.prepareStatement("SELECT OCCUPANT FROM HOMES");
  rs = pstmt.executeQuery();
  rs.next();
  Ref ref = rs.getRef(1);

  pstmt = con.prepareStatement(
            "SELECT FULLNAME FROM PEOPLE WHERE OID = ?");
  pstmt.setRef(1, ref);
  rs = pstmt.executeQuery();
  rs.next();
  Fullname who = (Fullname)rs.getObject(1);

  // prints "Daffy Duck"
  System.out.println(who.first + " " + who.last);
}

9.4.2 Mirroring SQL inheritance in the Java programming language

SQL structured types may be defined to form an inheritance hierarchy. For example, consider SQL type STUDENT that inherits from PERSON:

CREATE TYPE PERSON AS OBJECT (NAME VARCHAR(20), BIRTH DATE);

CREATE TYPE STUDENT AS OBJECT EXTENDS PERSON (GPA NUMERIC(4,2));

The following Java classes can represent data of those SQL types. Class Student extends Person, mirroring the SQL type hierarchy. Methods SQLData.readSQL() and SQLData.writeSQL() of the subclass cascades each call to the corresponding method in its super-class, in order to read or write the super-class attributes before reading or writing the subclass attributes.

   import java.sql.*;
   ...
   public class Person implements SQLData {
     public String name;
     public Date birth;

     private String sql_type;
     public String getSQLTypeName() { return sql_type; }

     public void readSQL (SQLInput data, String type)
    throws SQLException {
       sql_type = type;
       name = data.readString();
       birth = data.readDate();
     }

     public void writeSQL (SQLOutput data)
         throws SQLException {
       data.writeString(name);
       data.writeDate(birth);
     }
   }

   public class Student extends Person {
     public float GPA;

     private String sql_type;
     public String getSQLTypeName() { return sql_type; }

     public void readSQL (SQLInput data, String type)
    throws SQLException {
       sql_type = type;
       super.readSQL(data, type);
       GPA = data.readFloat();
     }

     public void writeSQL (SQLOutput data)
     throws SQLException {
       super.writeSQL(data);
       data.writeFloat(GPA);
     }
   }

The Java class hierarchy need not mirror the SQL inheritance hierarchy. For example, class Student above could have been declared without a super-class. In this case, Student could contain fields to hold the inherited attributes of the SQL type STUDENT as well as the attributes declared by STUDENT itself..

9.4.3 Example mapping of SQL distinct type

An SQL distinct type, MONEY, and a Java class Money that represents it:

-- SQL definition
CREATE TYPE MONEY AS NUMERIC(10,2);

// definition
public class Money implements SQLData {

  public java.math.BigDecimal value;

  private String sql_type;
  public String getSQLTypeName() { return sql_type; }

  public void readSQL (SQLInput stream, String type)
    throws SQLException {
    sql_type = type;
    value = stream.readBigDecimal();
  }

  public void writeSQL (SQLOutput stream) throws SQLException {
    stream.writeBigDecimal(value);
  }
}

9.5 Generality of the approach

Users have great flexibility to customize the Java classes that represent SQL structured and distinct types. They control the mappings of built-in SQL attribute types to Java field types. They control the mappings of SQL names (of types and attributes) to Java names (of classes and fields). Users may add (to Java classes that represent SQL types) fields and methods that implement domain-specific functionality. Users can generate beans as the classes that represent SQL types.

A user can even map a single SQL type to different Java classes, depending on arbitrary conditions. To do that, the user must customize the implementation of SQLData.readSQL() to construct and return objects of different classes under different conditions.

Similarly, the user can map a single SQL value to a graph of Java objects. Again, that is accomplished by customizing the implementation of SQLData.readSQL() to construct multiple objects and distribute the SQL attributes into fields of those objects.

A customization of the SQLData.readSQL() method could populate the type-map object incrementally. And so on. We believe that these kinds of flexibility will allow users to map SQL types appropriately for different kinds of applications.

9.6 NULL data

An application uses the existing getObject() and setObject() mechanism to retrieve and store SQLData values. We note that when the second parameter, x, of method PreparedStatement.setObject() has the value null, then the driver executes the SQL statement as if the SQL literal NULL had appeared in place of that parameter of the statement:

  void setObject (int i, Object x) throws SQLException;

When parameter x is null, there is no enforcement that the corresponding argument expression is of a Java type that could successfully be passed to that SQL statement if its value were non-null. The Java programming language null carries no type information. For example, a null Java programming language variable of class AntiMatter could be passed as an argument to an SQL statement that requires a value of SQL type MATTER, and no error would result, even though the relevant type-map object did not permit the translation of MATTER to AntiMatter.

9.7 Summary

Chapters 8 and 9 presented extensions to support new categories of SQL types. The extensions have these properties:

  • All of the new SQL types are handled with uniform and extensible interfaces, which may be staged into the JDBC API piecemeal.

  • Minimal mechanism is added to the API. An implementation does little more than transfer control to methods SQLData.readSQL() and SQLData.writeSQL() of classes that have been generated to represent the SQL types.

  • The extensions are based on existing interfaces java.io.Serializable, java.io.DataInput, java.io.DataOutput, java.sql.ResultSet, and java.sql.PreparedStatement

  • Great flexibility is given to writers of database tools to add value by customizing the Java classes that represent SQL data.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

10 Other New Features and Changes

This chapter describes additional changes that have been made in the JDBC API.

10.1 Changes to java.sql.ResultSet

A version of the ResultSet.getBigDecimal() method that returns full precision has been added.

10.2 Changes to java.sql.ResultSetMetaData

The ResultSetMetaData.getColumnType() method may now return the new SQL type codes: STRUCT, DISTINCT, BLOB, etc. The STRUCT and DISTINCT type codes are always returned for structured and distinct values, independent of whether the default or a custom type mapping is being used.

The ResultSetMetaData.getColumnTypeName() method should return the following for the new SQL types.

Column Type | Column Type Name
JAVA_OBJECT | the SQL name of the Java type
DISTINCT | the SQL name of the distinct type
STRUCT | the SQL name of the structured type
ARRAY | data source dependent type name
BLOB | data source dependent type name
CLOB | data source dependent type name
REF | data source dependent type name

A ResultSetMetaData.getColumnClassName() method has been added to return the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column. See the separate API documentation for details.

The ResultSetMetaData.getColumnTypeName() method returns a fully qualified SQL type name when the type code is STRUCT, DISTINCT, or JAVA_OBJECT.

10.3 Changes to DatabaseMetaData

The DatabaseMetaData.getColumns() method may now return DATA_TYPE values of the new SQL99 types: BLOB, CLOB, etc. The DatabaseMetaData.getColumns() method returns the same type names as those listed in Section 10.2 for the SQL99 data types.

Added method DatabasemetaData.getConnection() to return the Connection object that produced the metadata object.

Added method DatabasemetaData.getUDTs(). See the separate API documentation for details.

Added methods to support the new ResultSet and batch update functionality: supportsResultSetConcurrency() , supportsBatchUpdates(), etc. See the separate API documentation for details.

10.4 Changes to java.sql.DriverManager

A DriverManager.setLogWriter() method that takes a java.io.PrintWriter object as input has been added. A new DriverManager.getLogWriter() method returns a PrintWriter object. The set/getLogStream() methods have been deprecated.

10.5 Date, Time, and Timestamp

The JDBC API follows the Java platform's approach of representing dates and times as a millisecond value relative to January 1, 1970 00:00:00 GMT. Since most databases don't support the notion of a time zone, the JDBC 2.1 core API adds new methods to allow a JDBC driver to get/set Date, Time, and Timestamp values for a particular time zone using a Calendar. For example,

ResultSet rs;
...
Date date1 = rs.getDate(1);
returns a Date object that wraps a millisecond value which denotes a particular date, like January 3, 1999, and a normalized time 00:00:00 in the default time zone. The time component of the Date is set to zero in the default time zone since SQL DATE values don't have a time component. Since a Calendar was not supplied explicitly to getDate() , the default time zone (really the default Calendar) is used by the JDBC driver internally to create the appropriate millisecond value assuming that the underlying database doesn't store time zone information.

The following example retrieves a date value in GMT-Greenwich Mean Time.

ResultSet rs;
...

TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
Calendar cal = Calendar.getInstance();
Date date2 = rs.getDate(1, cal);

In the example above, a Calendar is passed explicitly to getDate() to inform the JDBC driver how to calculate the appropriate millisecond value. Note that the same result could have been achieved by simply changing the default time zone, and not passing the Calendar explicitly since the JDBC driver will use the default time zone by default.

Note that the two Date objects created above will not compare as equal assuming that the default time zone is not GMT, even if they represent the `same' date.

if (date1.equals(date2))
    //never get here

This is because each Java language Date object really just wraps a normalized millisecond time value and these millisecond values will differ across time zones. If an application wishes to compare dates in different time zones it should first convert them to a Calendar.

An application should create a Date object using a Calendar. The application is responsible for specifying the time as 00:00:00 on the desired date when using the Calendar since the JDBC API uses this convention. In addition when creating a Time value the application must specify a date of January 1, 1970 to the Calendar used to create the millisecond value for the Time as this is the convention specified for time.

10.6 Refinement to the Drop Table requirement

The JDBC 1.0 API specification required that JDBC 1.0 compliant drivers provide full support for the SQL92, Transitional Level, DROP TABLE command, including full support for the CASCADE and RESTRICT options of DROP TABLE. Because some popular databases currently do not fully support DROP TABLE as it is defined in the SQL92 specification, this requirement has been relaxed in the JDBC API specification.

A JDBC compliant driver is required to support the DROP TABLE command as specified by SQL92, Transitional Level. However, support for the CASCADE and RESTRICT options of DROP TABLE is optional for a JDBC compliant driver. In addition, the behavior of DROP TABLE is implementation defined when there are views or integrity constraints defined that reference a table that is being dropped.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Contents | Prev | Next JDBCTM Guide: Getting Started

11 Clarifications

We have gotten several requests to clarify some aspects of the JDBC API. This chapter contains additional explanation of some features.

11.1 Connection.isClosed()

The Connection.isClosed() method is only guaranteed to return true after Connection.closed() has been called. Connection.isClosed() cannot be called, in general, to determine if a database connection is valid or invalid. A typical client can determine that a connection is invalid by catching the exception that is thrown when an operation is attempted.

11.2 Statement.setCursorName()

The Statement.setCursorName() method provides a way for an application to specify a cursor name for the cursor associated with the next result set produced by a statement. A result set's cursor name can be retrieved by calling ResultSet.getCursorName(). If Statement.setCursorName() is called prior to creating a result set, then ResultSet.getCursorName() should always return the value specified in Statement.setCursorName().

We note that calling Statement.setCursorName() prior to creating a result set does not mean that the result set is updatable, in other words, positioned update or delete may not be allowed on a result set even if Statement.setCursorName() was called. By default , a result set is read-only.

The only use for a cursor name is to embed it in a SQL statement of the form

UPDATE ... WHERE CURRENT OF <cursor>

The cursor name provides a way to do a positioned update or delete. To enable positioned update and delete on a result set, a select query of the form

SELECT FOR UPDATE ... FROM ... WHERE ...

should be used to create the result set. If Statement.setCursorName() is not called to specify a cursor name, then the JDBC driver or underlying DBMS must generate a cursor name when a SELECT FOR UPDATE statement is executed, if positioned update/delete is supported. ResultSet.getCursorName()should return null if the result set is read-only and Statement.setCursorName() was not called to specify a cursor name.

11.3 Character conversion

JDBC driver implementations are expected to automatically convert the Java programming language unicode encoding of strings and characters to and from the character encoding of the database being accessed. The JDBC API does not define how to override the character encoding of a database. For example, the API does not define how to store unicode characters in an ASCII database.

11.4 Streams as input parameters

When an application passes a stream as an input value via a setXXX() or updateXXX() method, the application is responsible for maintaining the stream in a readable state until one of the following methods is called: PreparedStatement.execute(), executeQuery(), executeUpdate(), or executeBatch(), and ResultSet.insertRow() or updateRow(). A JDBC driver is not required to wait until one of these methods is called to read the stream value.

11.5 Result sets not created by a Statement

A ResultSet object that is created by a metadata operation is only required to be forward-only. Scrollability is not required for result sets produced by DatabaseMetaData operations.

Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.


Java Naming and Directory Interface

Java

Java Naming and Directory InterfaceTM

Documentation Contents
The Java Naming and Directory InterfaceTM (JNDI) provides naming and directory functionality to applications written in the JavaTM programming language. It is designed to be independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way.

The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the API of the JNDI technology to access their services.

JavaTM 2 SDK, v 1.3 includes JNDI and three service providers (listed below). These packages are also available separately for use with the JDK 1.1.x and the Java 2 SDK, v 1.2.

JNDI Tutorial
  • JNDI Tutorial - A tutorial introduction to the JNDI technology with programming examples.
JNDI Architecture Documents
  • Executive Summary - also available in Postscript and PDF
  • JNDI API - also available in Postscript and PDF
  • JNDI SPI - also available in Postscript and PDF
JNDI API and SPI Specification
(javadoc)
  • JNDI API and SPI Specification - A list of the packages included in the JNDI technology.
JNDI Service Providers
To use JNDI with a particular naming or directory service, you need a JNDI service provider, which is a module that plugs in beneath the JNDI API to access the naming or directory service. The Java Software Web site maintains a list of service providers available for JNDI.

Java 2 SDK, v 1.3 includes the following service providers:

  • The LDAP Service Provider
  • The COS Naming Service Provider
  • The RMI Registry Service Provider
For More Information
  • Subscribe to the JNDI-INTEREST list
  • Source to a demonstration namespace browser written using JNDI and Swing
  • Related documents
  • The JNDI Home Page

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jndi@java.sun.com 		Sun Microsystems, Inc
Java Software


CONTENTS | PREV | NEXT JNDI API

Java Naming and Directory Interface TM
Application Programming Interface

(JNDI API)

Please send comments to:

jndi@java.sun.com.

JNDI 1.2/JavaTM 2 Platform, Standard Edition, v 1.3
July 14, 1999
CONTENTS | PREV | NEXT

Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


1 Introduction

2 Goals and Design Principles

3 Overview of the Architecture

4 Fundamentals

5 Overview of the Interface

6 Configuration

7 Scenarios

8 Security Considerations

9 Design Choices


1 Introduction

CONTENTS | PREV | NEXT JNDI API

1. Introduction

Directory services play a vital role in Intranets and Internets by providing access to a variety of information about users, machines, networks, services, and applications. By its very nature, a directory service incorporates a naming facility for providing human understandable namespaces that characterize the arrangement and identification of the various entities.

The computing environment of an enterprise typically consists of several naming facilities often representing different parts of a composite namespace. For example, the Internet Domain Name System (DNS) might be used as the top-level naming facility for different organizations within an enterprise. The organizations themselves might use a directory service such as LDAP or NDS or NIS. From a user's perspective, there is one namespace consisting of composite names. URLs are examples of composite names because they span namespaces of multiple naming facilities. Applications which use directory services must support this user perspective.

Many JavaTM application developers can benefit from a directory service API that is not only independent of the particular directory or naming service implementation, but also enables seamless access to directory objects through multiple naming facilities. In fact, any application can attach its own objects to the namespace. Such a facility enables any Java application to discover and retrieve objects of any type.

End users can benefit from logical namespaces that allow easier discovery and identification of the objects in the network.

Directory service developers can benefit from a service-provider capability that enables them to incorporate their respective implementations without requiring changes to the client.

Java Naming and Directory InterfaceTM (JNDI) is an API that provides directory and naming functionality to Java applications. It is defined to be independent of any specific directory service implementation. Thus, a variety of directories can be accessed in a common way.

Here are two examples to briefly illustrate some of the more commonly used features of JNDI.

An application that wants to access a printer needs the corresponding printer object. This is simply done as follows:

prt = (Printer) building7.lookup("puffin");
prt.print(document);

JNDI does all the work of locating the information needed to construct the printer object.

An application that wants to find a person's phone numbers, which are stored in the organization's directory, can simply do:

String[] attrs = {"workPhone", "cellPhone", "faxNumber"};
bobsPhones = directory.getAttributes("cn=Bob, o=Widget, c=US", attrs);

If there may be several Bobs in the Widget organization, the application can search the organization's directory to find the right Bob as follows:

bob = directory.search("o=Widget, c=US", "(cn=Bob)", searchctls);

This document describes the architecture and interfaces of JNDI.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


2 Goals and Design Principles

CONTENTS | PREV | NEXT JNDI API

2. Goals and Design Principles

We followed several principles and maxims in designing the API.

2.1 Keep it consistent and intuitive

Wherever possible, we have used existing components from the rest of the Java development environment. Adhering to this principle not only makes JNDI consistent with existing core classes in the Java platform but also reduces needless proliferation of classes.

The object-oriented nature of the Java programming language allows for an intuitive and simple API design, in which the directory service functionality is expressed as a natural extension to the more fundamental naming service functionality.

2.2 Pay for what you use

The API is structured in a tiered manner so that the application programmer interested in a certain directory service capability need not necessarily know about a more advanced capability. We have strived to keep the lower tiers simple and also make them represent the common case capability, relegating the more complex ones to the upper tiers.

2.3 Implementable over common directory and naming services and protocols

This goal is important for two reasons. First, it enables Java applications to take advantage of information in a variety of existing naming and directory services such as DNS, NDS, NIS (YP), X.500, and LDAP. Second, it helps limit the appearance of any implementation specific artifacts in the API.

Providing a unified interface to multiple naming and directory services does not imply that access of unique features of a particular service is precluded. The unified API which is designed to cover the common case is still beneficial to applications that have explicit knowledge of the underlying naming or directory service. Such applications still benefit from sharing the common portions that use the API. This is analogous to applications sharing commonly used classes and yet adding needed specificity via subclassing.

2.4 Seamless integration

This is important not only because of the diversity of directory service and naming services in the installed base that need to be supported, but also because new Java application and service programmers can export their own namespaces and directory objects in a uniform way.

We also wanted to make a variety of implementation choices possible without having the application pay for this freedom. For example, a "thin-client" might be better served by a proxy-style protocol in which the access to specific naming and directory services is relegated to a server. Whereas, a performance sensitive, resource rich client, might choose to use an implementation which directly allows it to access the various servers. However, the application should be insulated from these implementation choices. It should be possible to defer such choices even until runtime.

2.5 Support for leading industry standards

The Lightweight Directory Access Protocol (Internet RFC 2251) has emerged as the standard for directory access at the protocol level. All major directory vendors have products that support this protocol. An application that uses JNDI should be able to access all of the features offered by this standard. Where possible, JNDI should support conventions (such as those for specifying search queries/filters) already defined by the standard.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


3 Overview of the Architecture

CONTENTS | PREV | NEXT JNDI API

3. Overview of the Architecture

The JNDI architecture consists of the JNDI API and the JNDI SPI. The JNDI API allows Java applications to access a variety of naming and directory services. The JNDI SPI is designed to be used by arbitrary service providers including directory service providers. This enables a variety of directory and naming services to be plugged in transparently to the Java application (which uses only the JNDI API). The JNDI Architecture figure shows the JNDI architecture and includes a few service providers of directory and naming contexts as examples.

JNDI Architecture

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


4 Fundamentals

CONTENTS | PREV | NEXT JNDI API

4. Fundamentals

A directory service provides access to diverse kinds of information about users and resources in a network environment. It uses a naming system for the purpose of identifying and organizing directory objects to represent this information. A directory object provides an association between attributes and values. Thus, a directory service enables information to be organized in a hierarchical manner to provide a mapping between human understandable names and directory objects.

4.1 Naming -- The Foundation

A fundamental facility in any computing system is the naming service - the means by which names are associated with objects, and by which objects are found given their names. In traditional systems, the naming service is seldom a separate service. It is usually integrated with another service, such as a file system, directory service, database, desktop, mail system, spreadsheet, or calendar. For example, a file system includes a naming service for files and directories; a spreadsheet has a naming service for cells and macros.

The computing environment of an enterprise typically consists of several naming services. There are naming services that provide contexts for naming common entities in an enterprise such as organizations, physical sites, human users and computers. Naming services are also incorporated in applications offering services such as file service, mail service, printer service, and so on. From a user's perspective, there exist several natural and logical relationships between these naming services. For example, it is natural to think of naming a variety of services such as files, mail, appointment calendar, and so on, in the context of a user. It is also natural to think of a user in the context of a department, within a division of an enterprise. Meaningful names can be composed using useful arrangements of naming services reflecting these relationships.

Every name is generated by a set of syntactic rules called a naming convention. An atomic name is an indivisible component of a name, as defined by the naming convention.

A compound name represents a sequence of zero or more atomic names composed according to the naming convention.

For example, in UNIX pathnames, atomic names are ordered from left to right, and are delimited by slash (`/') characters. The UNIX pathname usr/local/bin is a compound name representing the sequence of atomic names, usr , local , and bin . In names from the Internet Domain Name System (DNS), atomic names are ordered from right to left, and are delimited by dot (`.') characters. Thus, the DNS name sales.Wiz.COM is a compound name representing the sequence of atomic names, COM , Wiz , sales .

The association of an atomic name with an object is called a binding.

A context is an object whose state is a set of bindings with distinct atomic names. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns an object, and may provide operations such as for binding names, unbinding names, listing bound names. An atomic name in one context object can be bound to another context object of the same type, called a subcontext, giving rise to compound names.

Resolution of compound names proceeds by looking up each successive atomic component in each successive context. The reader will find a familiar model in UNIX file naming, where directories serve as contexts, and pathnames may be compound names.

A naming system is a connected set of contexts of the same type (having the same naming convention) and providing the same set of operations with identical semantics.

A namespace is the set of all names in a naming system.

A composite name is a name that spans multiple naming systems. It consists of an ordered list of zero or more components. Each component is a name from the namespace of a single naming system.

For example, the name jurassic.eng:/export/home/jdoe/.signature is a composite name representation made up of a host name jurassic.eng from a host namespace, and the file name /export/home/jdoe/.signature from a UNIX file namespace. Another example is the Internet URL http://www.moon.org/public/index.html , which is a composite name representation made up of the scheme-id http from the "URL scheme-id" namespace, www.moon.org which is the DNS name of the machine on which the web server is running, and public/index.html which is a file name from a file namespace.

Every name is interpreted relative to some context, and every naming operation is performed on a context object. A client can obtain an initial context object that provides a starting point for resolution of names.

4.2 Directory Objects

The primary function of a naming system is to map names to objects. The objects can be of any type. A directory object is a particular type of object that is used to represent the variety of information in a computing environment. A directory object can have associated with it attributes. An attribute has an identifier and a set of values.

A directory object provides operations for creating attributes, adding, removing, and modifying attributes associated with the directory object. If we make a directory object also be a naming context, we can represent trees of directory information where the interior nodes not only behave like naming contexts but also contain attributes.

The Example of a Composite Namespace figure is an example used for illustrating several things.

Example of a Composite Namespace

    • There can be multiple naming systems that can be represented by a composite namespace. In this case, DNS is used as the global naming system; one division uses NDS, while a second division uses LDAP.
    • Each namespace has interior nodes that represent naming contexts, which may be directory objects as well. Leaf nodes can be objects of any type.
    • The InitialContext is configured to have bindings to useful starting contexts in different naming and directory systems.
    • Applications just see a composite namespace. They can access any type of object bound in any naming system in this arrangement.
    • Services can incorporate their own namespaces which appear as first-class citizens in JNDI.
    • Arbitrary directory services can be added and accessed without requiring client applications to be changed.

4.3 URLs and Composite Names

Uniform Resource Locators (URLs) are special composite names whose syntax are determined by the URL's definition. Clients of JNDI can use URLs to refer to arbitrary types of objects. For example, a client can use nfs://nfs.sun.com/export/jndi/src/README to refer to a file object that is being accessed using the Network File System (NFS) protocol. Similarly, a client can perform directory operations on a directory object in an LDAP server using the URL ldap://ldap.widget.com/cn=Jonathan,ou=marketing .

To support composite names in general, JNDI defines a composite name syntax and utilities for processing composite names. This allows clients of JNDI to refer to objects using names that span multiple namespaces.

4.4 Events

As the naming/directory service plays an increasingly important role in the computing environment, the need to provide administration and monitoring tools to help manage changes in the service also increases. For such tools and other applications, the traditional request/response style of interaction needs to be augmented with an asynchronous notification model that allows applications to register interest in changes in the service.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


5 Overview of the Interface

CONTENTS | PREV | NEXT JNDI API

5. Overview of the Interface

The JNDI API is contained in four packages:

    • javax.naming contains classes and interfaces for accessing naming services
    • javax.naming.directory extends the core javax.naming package to provide access to directories
    • javax.naming.event contains classes and interfaces for supporting event notification in naming and directory services
    • javax.naming.ldap contains classes and interfaces for supporting LDAP v3 extensions and controls

The JNDI service provider interface is contained one package:

    • javax.naming.spi contains classes and interfaces that allow various naming and directory service providers to be dynamically plugged in beneath the JNDI API (see the JNDI SPI document for details)

The following sections provide an overview of the JNDI API. For more details on the API, see the corresponding javadoc.

5.1 The Naming Package -- javax.naming 1

(exception classes are not shown)

5.1.1 Contexts

Context is the core interface that specifies a naming context. It defines basic operations such as adding a name-to-object binding, looking up the object bound to a specified name, listing the bindings, removing a name-to-object binding, creating and destroying subcontexts of the same type, etc.

public interface Context {
    public Object lookup(Name name) throws NamingException;
    public void bind(Name name, Object obj) throws NamingException;
    public void rebind(Name name, Object obj) throws NamingException;
    public void unbind(Name name) throws NamingException;
    public void rename(Name old, Name new) throws NamingException;
    public NamingEnumeration listBindings(Name name) throws NamingException;
    ...
    public Context createSubcontext(Name name) throws NamingException;
    public void destroySubcontext(Name name) throws NamingException;
    ...
};

Every naming method in Context takes a name as an argument. The operation defined by the method is performed on the Context object that is obtained by implicitly resolving the name. If the name is empty ("") the operation is performed directly on the context itself. The name of an object can be a composite name reflecting the arrangement of the namespaces used to refer to the object. Of course, the client is not exposed to any naming service implementation. In fact, a new type of naming service can be introduced without requiring the application to be modified or even disrupted if it is running.

5.1.2 The Initial Context

In JNDI, every name is relative to a context. There is no notion of "absolute names." An application can bootstrap by obtaining its first context of class InitialContext :

public class InitialContext implements Context {
    public InitialContext()...;
    ...
}

The initial context contains a variety of bindings that hook up the client to useful and shared contexts from one or more naming systems, such as the namespace of URLs or the root of DNS.

5.1.3 Names

The Name interface represents a generic name--an ordered sequence of components. Each Context method that takes a Name argument has a counterpart that takes the name as a String instead. The versions using Name are useful for applications that need to manipulate names: composing them, comparing components, and so on. The versions using String are likely to be more useful for simple applications, such as those that simply read in a name and look up the corresponding object. The String name parameter represents a composite name. The Name parameter can represent a composite name or a compound name .

The CompositeName class represents a sequence of names (atomic or compound) from multiple namespaces. If the Name parameter supplied to a method of the Context class is an instance of CompositeName , the name represents a composite name.

If the Name parameter supplied to a method of the Context class is not an instance of CompositeName , the name represents a compound name, which can be represented by the CompoundName class or some other implementation class. The CompoundName class represents hierarchical names from a single namespace. A context's name parser can be used to manipulate compound names in the syntax associated with that particular context:

public interface Context {
    ...
    public NameParser getNameParser(Name name) throws NamingException;
    ...
}

A namespace browser is an example of the kind of application that might need to manipulate names syntactically at this level. Most other applications will work with strings or composite names.

5.1.4 Bindings

Context.lookup() is the most commonly used operation. The context implementation can return an object of whatever class is required by the Java application. For example, a client might use the name of a printer to look up the corresponding Printer object, and then print to it directly:

Printer printer = (Printer) ctx.lookup("treekiller");
printer.print(report);

Context.listBindings() returns an enumeration of name-to-object bindings, each binding represented by an object of class Binding . A binding is a tuple containing the name of the bound object, the name of the object's class, and the object itself.

The Context.list() method is similar to listBindings() , except that it returns an enumeration of NameClassPair objects. Each NameClassPair contains an object's name and the name of the object's class. The list() method is useful for applications such as browsers that wish to discover information about the objects bound within a context, but don't need all of the actual objects. Although listBindings() provides all of the same information, it is potentially a much more expensive operation.

public class NameClassPair ... {
    public String getName() ...;
    public String getClassName() ...;
    ...
}
public class Binding extends NameClassPair {
    public Object getObject() ...;
    ...
}

5.1.5 References

Different Context implementations are able to bind different kinds of objects natively. A particularly useful object that should be supported by any general-purpose context implementation is the Reference class. A reference represents an object that exists outside of the directory. References are used to give JNDI clients the illusion that objects of arbitrary classes are able to be bound in naming or directory services--such as X.500--that do not have native support for objects in the Java programming language.

When the result of an operation such as Context.lookup() or Binding.getObject() is a Reference object, JNDI attempts to convert the reference into the object that it represents before returning it to the client. A particularly significant instance of this occurs when a reference representing a Context of one naming system is bound to a name in a different naming system. This is how multiple independent naming systems are joined together into the JNDI composite namespace. Details of how this mechanism operates are provided in the JNDI SPI document.

Objects that are able to be represented by a reference should implement the Referenceable interface. Its single method -- getReference() -- returns the object's reference. When such an object is bound to a name in any context, the context implementation might store the reference in the underlying system if the object itself cannot be stored natively.

Each reference may contain the name of the class of the object that it represents, and may also contain the location (typically a URL) where the class file for that object can be found. In addition, a reference contains a sequence of objects of class RefAddr . Each RefAddr in turn contains a "type" string and some addressing data, generally a string or a byte array.

A specialization of Reference called a LinkRef is used to add "symbolic" links into the JNDI namespace. It contains the name of a JNDI object. By default, these links are followed whenever JNDI names are resolved.

5.1.6 Referrals

Some naming/directory services support the notion of referrals for redirecting a client's request to another server. The JNDI client can request that referrals be automatically followed, be ignored, or be processed manually.

The abstract class ReferralException is used to represent a referral:

public abstract class ReferralException extends NamingException {
    public abstract Context getReferralContext() throws NamingException;
    ...
    public abstract Object getReferralInfo();
    public abstract void retryReferral();
    public abstract boolean skipReferral();
}

When a referral is encountered and the client has requested that referrals not be ignored or automatically followed, a ReferralException is thrown. The getReferralInfo() method provides information--in a format appropriate to the service provider--about where the referral leads. The application is not required to examine this information; however, it might choose to present it to a human user to help him determine whether to follow the referral or not. skipReferral() allows the application to discard a referral and continue to the next referral (if any).

To continue the operation, the application re-invokes the method on the referral context using the same arguments it supplied to the original method.

5.2 The Directory Package -- javax.naming.directory 2

(exception classes are not shown)

5.2.1 Directory Objects

The DirContext interface enables the directory capability by defining methods for examining and updating attributes associated with a directory object.

public interface DirContext extends Context {
    public Attributes getAttributes(Name name)
         throws NamingException;
    public Attributes getAttributes(Name name, String[] attrIds)
         throws NamingException;
    ...
    public void modifyAttributes(Name name, int modOp, Attributes attrs)
         throws NamingException;
    public void modifyAttributes(Name name, ModificationItem[] mods)
         throws NamingException;
    ...
}

The getAttributes() operations on a directory return some or all of its attributes. Attributes are modified using two forms of modifyAttributes() . Both forms make use of a "modification operation," one of:

ADD_ATTRIBUTE
REPLACE_ATTRIBUTE
REMOVE_ATTRIBUTE

The ADD_ATTRIBUTE operation adds values to an attribute if that attribute already exists, while the REPLACE_ATTRIBUTE operation discards any pre-existing values. The first form of modifyAttributes() performs the specified operation on each element of a set of attributes. The second form takes an array of objects of class ModificationItem :

public class ModificationItem {
    public ModificationItem(int modOp, Attribute attr) ...;
    ...
}

Each operation is performed on its corresponding attribute in the order specified. When possible, a context implementation should perform each call to modifyAttributes() as an atomic operation.

5.2.2 Attributes

A directory object contains a set of zero or more Attribute objects. Each attribute is denoted by a string identifier and can have zero or more values of any type.

public interface Attribute ... {
    ...
    public String getID();
    public Object get(int n) throws NamingException;
    public boolean isOrdered();
    public NamingEnumeration getAll()
           throws NamingException;
    ...
}

An attribute's values can be ordered or unordered. If the values are unordered, no duplicates are allowed. If the values are ordered, duplicates are allowed.

Attributes are grouped into a collection by using the Attributes interface.

public interface Attributes ... {
    ...
    public Attribute get(String attrID);
    public NamingEnumeration getIDs();
    public NamingEnumeration getAll();
    public Attribute put(Attribute attr);
    public Attribute remove(String attrID);
    ...
}

JNDI provides implementations for these two interfaces, BasicAttribute and BasicAttributes , for convenience. Service providers and applications are free to use their own implementations.

Note that updates to Attributes and Attribute , such as adding or removing an attribute or its value, do not affect the corresponding representation in the directory. Updates to the directory can only be effected by using DirContext.modifyAttributes() .

5.2.3 Directory Objects as Naming Contexts

The DirContext interface also behaves as a naming context by extending the Context interface. This means that any directory object can also provide a naming context. In addition to a directory object keeping a variety of information about a person, for example, it is also a natural naming context for resources associated with that person: a person's printers, file system, calendar, etc.

Hybrid operations perform certain naming and directory operations in a single atomic operation:

public interface DirContext extends Context {
    ...
    public void bind(Name name, Object obj, Attributes attrs)
           throws NamingException;
    ...
}

Other hybrid operations that are provided are rebind() and createSubcontext() that accept an additional Attributes argument.

5.2.4 The Initial Context

An application that is performing directory operations can use InitialDirContext instead of javax.naming.InitialContext to create its initial context:

public class InitialDirContext
       extends InitialContext implements DirContext {
    public InitialDirContext() ...;
    ...
}

It can then invoke any method in the Context or DirContext interface on the initial context.

5.2.5 Searches

The DirContext interface supports content-based searching of directories. In the simplest and most common form of usage, the application specifies a set of attributes -- possibly with specific values -- to match. It then invokes the DirContext.search() method on the directory object, which returns the matching directory objects along with the requested attributes.

public interface DirContext extends Context {
    ...
    public NamingEnumeration search(Name name, Attributes matchingAttributes)
         throws NamingException;
    public NamingEnumeration search(Name name,
                                    Attributes matchingAttributes,
                                    String[] attributesToReturn)
         throws NamingException;
    ...
}

The results of the search are returned as a NamingEnumeration containing an enumeration of objects of class SearchResult :

public class SearchResult extends Binding {
    ...
    public Attributes getAttributes() ...;
}

In the more sophisticated case, it is possible to specify a search filter and to provide controlling information such as the scope of the search and the maximum size of the results. The search filter specifies a syntax that follows Internet RFC 2254 for LDAP. The SearchControls argument specifies such things as the scope of the search: this can include a single directory object, all of its children, or all of its descendants in the directory hierarchy.

public interface DirContext extends Context {
    ...
    public NamingEnumeration search(Name name,
                                    String filter,
                                    SearchControls ctls)
           throws NamingException;

    public NamingEnumeration search(Name name,
                                    String filter,
                                    Object[] filterArgs,
                                    SearchControls ctls)
         throws NamingException;
       ...
}

5.2.6 Schema

A schema describes the rules that define the structure of a namespace and the attributes stored within it. The granularity of the schema can range from a single schema that is associated with the entire namespace, to a per-attribute, fine-grained schema description.

Because schemas can be expressed as an information tree, it is natural to use for this purpose the naming and directory interfaces already defined in JNDI. This is powerful because the schema part of a namespace is accessible to applications in a uniform way. A browser, for example, can access information in the schema tree just as though it were accessing any other directory objects.

Applications can retrieve the schema associated with a directory object when the underlying context implementation provides the appropriate support.

DirContext.getSchema() is used to retrieve the root of the schema tree associated with a directory object. The root has children such as "ClassDefinition", "AttributeDefinition", and "SyntaxDefinition", each denoting the kind of definition being described. The schema root and its descendents are objects of type DirContext . The DirContext.getSchemaClassDefinition() method returns a DirContext that contains class descriptions about a particular directory object.

public interface DirContext extends Context {
    ...
    public DirContext getSchema(Name name)
        throws NamingException;

    public DirContext getSchemaClassDefinition(Name name)
        throws NamingException;
    ...
}

In addition, the schema associated with any attribute can be accessed using the Attribute.getAttributeDefinition() and getAttributeSyntaxDefinition() methods.

public interface Attribute ... {
    ...
    public DirContext getAttributeDefinition() throws NamingException;
    public DirContext getAttributeSyntaxDefinition()
    throws NamingException;
    ...
}

Example mapping Directory to Schema is an example showing the different associations for accessing schema information.

Example mapping Directory to Schema

5.3 The Event Package -- javax.naming.event 3

The javax.naming.event package contains classes and interfaces for supporting event notification in naming and directory services.

5.3.1 Naming Events

A NamingEvent represents an event that is generated by a naming/directory service.

public class NamingEvent extends java.util.EventObject {
    ...
    public int getType();
    public Binding getOldBinding();
    public Binding getNewBinding();
    ...
}

The event's type identifies the type of event. The NamingEvent class defines four types of events:

  1. OBJECT_ADDED
  2. OBJECT_REMOVED
  3. OBJECT_RENAMED
  4. OBJECT_CHANGED

These types can be placed into two categories:

    • Those that affect the namespace (add/remove/rename an object)
    • Those that affect an object's contents

In addition to the event's type, a NamingEvent contains other information about the change, such as information about the object before and after the change.

5.3.2 Naming Listeners

A naming listener is an object that registers for NamingEvent s. It is represented by the interface NamingListener . Each category of NamingEvent is handled by a corresponding subtype of NamingListener . The NamespaceChangeListener interface represents a listener interested in namespace changes, while the ObjectChangeListener represents a listener interested in changes to an object's contents. A listener implementation might implement one or both of these interfaces, depending on the types of events it is interested in.

5.3.3 Event Registration and Deregistration

The EventContext and EventDirContext interfaces extend the Context and DirContext interfaces, respectively, to support event registration and deregistration.

public interface EventContext extends Context {
    ...
    public void addNamingListener(Name target,
                                  int scope,
                                  NamingListener l)
           throws NamingException;
    public void removeNamingListener(NamingListener l)
           throws NamingException;
    public boolean targetMustExist()
           throws NamingException;
}

Like methods in the corresponding Context interface, addNamingListener() has an overload that accepts a String name argument. The name parameter is referred to as the target . The scope parameter specifies whether the registration is for the object named by the target, the immediate children of the context named by the target, or the entire subtree rooted at the object named by the target.

It is possible to register interest in a target that does not exist, but there might be limitations in the extent to which this can be supported by the service provider and underlying protocol/service. An application can use the method targetMustExist() to check whether an EventContext supports registration of nonexistent targets.

public interface EventDirContext extends EventContext, DirContext {
    public void addNamingListener(Name target,
                                  String filter,
                                  SearchControls ctls,
                                  NamingListener l)
                throws NamingException;
    public void addNamingListener(Name target,
                                  String filter,
                                  Object[] filterArgs,
                                  SearchControls ctls,
                                  NamingListener l)
                throws NamingException;
    ...
}

The EventDirContext interface extends the EventContext and DirContext interfaces to allow a listener to register interest in objects identified using search filters (Internet RFC 2254).

Like methods in the corresponding DirContext interface, addNamingListener() methods have overloads that accept a String name argument.

The EventContext/EventDirContext instance on which the addNamingListener() method is invoked is the event source of the events that are (potentially) generated. When the registered listener invokes getSource() or getEventContext() on a NamingEvent , the result will be this EventContext / EventDirContext instance.

For example, suppose a listener makes the following registration:

NamespaceChangeListener listener = ...;
src.addNamingListener("x", SUBTREE_SCOPE, listener);

When an object named "x/y" is subsequently deleted, the corresponding NamingEvent ( evt ) delivered to listener must contain src as its event source. The following will both be true:

evt.getEventContext() == src
evt.getOldBinding().getName().equals("x/y")

5.3.4 Exception Handling

When a listener registers for events with a context, the context might need to do some internal processing in order to collect information required to generate the events. The context, for example, might need to make a request to the server to register interest in changes on the server that will eventually be translated into events. If an error occurs that prevents information about the events from being collected, the listener will never be notified of the events. When such an error occurs, a NamingExceptionEvent is fired to notify the listener, and the listener is automatically deregistered.

The base NamingListener interface defines a namingExceptionThrown() method so that a listener can be notified of such an error.

public interface NamingListener extends java.util.EventListener {
    public void namingExceptionThrown(NamingExceptionEvent evt);
}

5.4 The LDAP Package -- javax.naming.ldap 4

The javax.naming.ldap package contains classes and interfaces for using LDAP v3-specific features that are not already covered by the more generic javax.naming.directory package. In fact, the majority of JNDI applications that use LDAP will find the javax.naming.directory package sufficient, and will not need to use this package at all. This package is primarily for those applications that need to use extended operations, controls, or unsolicited notifications.

5.4.1 Extended Operations

In addition to specifying well-defined operations such as search and modify, the LDAP v3 protocol (Internet RFC 2251) specifies a way of transmitting yet-to-be defined operations between the LDAP client and server. These operations are referred to as extended operations . An extended operation may be defined by a standards organization such as the IETF or by a vendor.

The LdapContext interface defines a method for executing an extended operation:

public interface LdapContext extends DirContext {
    public ExtendedResponse extendedOperation(ExtendedRequest request)
           throws NamingException;
    ...
}

The ExtendedRequest interface represents the argument to an extended operation, while the ExtendedResponse interface represents the result of the extended operation. An ExtendedRequest or ExtendedResponse consists of an identifier that identifies the extended operation and a byte array containing the ASN.1 BER encoded contents of the request/response.

An application typically does not deal directly with the ExtendedRequest / ExtendedResponse interfaces. Instead, it deals with classes that implement these interfaces. The application gets these classes either as part of a repertoire of extended operations standardized through the IETF, or from directory vendors for vendor-specific extended operations. The request classes should have constructors that accept arguments in a type-safe and user-friendly manner, while the response classes should have access methods for getting the data of the response in a type-safe and user-friendly manner. Internally, the request/response classes deal with encoding and decoding BER values.

For example, suppose an LDAP server supports a "get time" extended operation. It would supply classes such as GetTimeRequest and GetTimeResponse , so that applications can use this feature. An application would use these classes as follows:

GetTimeResponse resp =
   (GetTimeResponse)lctx.extendedOperation(new GetTimeRequest());
long time = resp.getTime();

5.4.2 Controls

The LDAP v3 protocol (Internet RFC 2251) allows any request or response to be augmented by yet-to-be defined modifiers. These modifiers are referred to as controls . Controls that are sent with requests are called request controls and those that are sent with responses are called response controls . A control may be defined by a standards organization such as the IETF or by a vendor. There is not necessarily a pairing between request controls and response controls.

JNDI classifies request controls into two categories:

    • connection request controls: those that affect how a connection is created
    • context request controls: those that affect context methods

Connection request controls are used whenever a connection needs to be established or re-established with an LDAP server. Context request controls are used when all other LDAP operations are sent to the LDAP server. The reason for this distinction is because JNDI is a high-level API that does not deal directly with connections. It is the job of service providers to do any necessary connection management. Hence, a single connection might be shared by multiple context instances, and a service provider is free to use its own algorithms to conserve connection and network usage. Thus, when a method is invoked on the context instance, the service provider might need to do some connection management in addition to performing the corresponding LDAP operations. For connection management, it uses the connection request controls, while for the normal LDAP operations, it uses the context request controls.

The LdapContext interface defines methods for dealing with controls:

public interface LdapContext extends DirContext {
    public void reconnect(Control[] connCtls) throws NamingException;
    public Control[] getConnectControls() throws NamingException;
    ...
    public LdapContext newInstance(Control[] reqCtls)
           throws NamingException;
    public void setRequestControls(Control[] reqCtls)
           throws NamingException;
    public Control[] getRequestControls() throws NamingException;
    ...
    public Control[] getResponseControls() throws NamingException;
}

The Control interface represents a control. It consists of an identifier that identifies the control and a byte array containing the ASN.1 BER encoded contents of the control.

Connection request controls are initialized using the initial context constructor and are inherited by contexts that are derived from a context. reconnect() is used to change the connection request controls of a context. A context's connection request controls are retrieved using getConnectControls() .

Context request controls are initialized using newInstance() and changed using setRequestControls() . newInstance() is a convenience method for creating a new instance of a context for the purposes of multithreaded access. For example, if multiple threads want to use different context request controls, each thread may use this method to get its own copy of this context and set/get context request controls without having to synchronize with other threads.

Unlike connection request controls, context request controls are not inherited by context instances that are derived from a context. Derived context instances are initialized with no context request controls. You must set the request controls of a derived context instance explicitly using setRequestControls() . A context's context request controls are retrieved using getRequestControls() .

5.4.3 The Initial Context

An application that is performing LDAP extended operations or controls can use InitialLdapContext instead of javax.naming.InitialContext or javax.naming.directory.InitialDirContext to create its initial context:

public class InitialLdapContext extends InitialDirContext implements LdapContext {
    public InitialDirContext() ...;
    public InitialDirContext(Hashtable env, Control[] connCtls) ...;
}

It can then invoke any method in the Context , DirContext , or LdapContext interfaces on the initial context. By using the constructor that accepts a connCtls argument, the application can specify controls to be used when establishing a connection with the LDAP server.

5.4.4 Unsolicited Notifications

In addition to the normal request/response style of interaction between the client and server, the LDAP v3 protocol also specifies unsolicited notifications --messages that are sent from the server to the client asynchronously, not in response to any client request.

JNDI supports unsolicited notifications using the event model embodied in the javax.naming.event package. It defines an UnsolicitedNotificationEvent class and a corresponding UnsolicitedNotificationListener interface. An application registers to receive UnsolicitedNotificationEvent s by supplying an UnsolicitedNotificationListener to EventContext.addNamingListener() .

1. See Appendix C for legend of class diagram.

2. See Appendix C for legend of class diagram.

3. See Appendix C for legend of class diagram.

4. See Appendix C for legend of class diagram.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


6 Configuration

CONTENTS | PREV | NEXT JNDI API

6. Configuration

6.1 Environment Properties

Some JNDI applications need a way to communicate various preferences and information that define the environment in which naming and directory services are accessed. For example, an application might need to specify the level of security for accessing a directory service. Or, when directory and naming services are distributed, the source of information is in more than one place--replicas, master, caches, etc. An application might want to access information from the authoritative source and needs to indicate this information to the JNDI system.

To address these requirements, JNDI defines a number of properties that developers and users can use to provide configuration information to the JNDI system. These are called environment properties .

There are different types of environment properties:

    • Standard JNDI environment properties. These properties are defined by JNDI and are common across all service providers. They are defined in relatively generic terms. For example, the property "java.naming.security.principal" is used to specify the security principal for authentication to the naming service. Individual service providers map these environment properties to an interpretation appropriate for their service. These properties have the prefix "java.naming.". contains a list of standard JNDI environment properties. The Context interface defines constants for most of these environment property names.
    • Service-specific environment properties. These properties are common across all service providers that implement a particular service or protocol. They have the prefix "java.naming. service. ", where service is the name of the service. For example, the prefix "java.naming.ldap." is used for LDAP-specific environment properties.
    • Feature-specific environment properties. These properties are common across all service providers that support a particular feature. They have the prefix "java.naming. feature .", where feature is the name of the feature. For example, the prefix "java.naming.security.sasl." is used for SASL-specific environment properties.
    • Provider-specific environment properties. These properties only apply to a particular service provider. They should have a prefix that reflects this uniqueness. A common practice is to use the package name of the service provider as the prefix. For example, since Sun's LDAP provider is primarily contained in the package com.sun.jndi.ldap , properties specific to Sun's LDAP provider have the prefix "com.sun.jndi.ldap.".

See Context Environment for security-related considerations when using environment properties.

Although the support for environment properties is rather extensive, it is important to note that an application typically does not need to deal with them, or only needs to set one or two properties. Most properties have reasonable defaults and only need to be adjusted when the application has special requirements.

6.2 Context Environment

A context's environment is represented as a java.util.Hashtable or any of its subclasses (e.g., java.util.Properties 1 ). It is typically specified using an argument to the InitialContext , InitialDirContext , or InitialLdapContext constructors, and augmented with data from other sources (as discussed in the rest of this section). They are inherited from the parent context as context methods proceed from one context to the next. For example, the following code creates an environment consisting of two security-related properties and creates an initial context using that environment.

Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, "jsmith");
env.put(Context.SECURITY_CREDENTIALS, "xxxxxxx");
Context ctx = new InitialContext(env);

Contexts that are looked up or otherwise derived from this initial context will have these two properties in their environment.

A context's environment can be examined using Context.getEnvironment() .

Not all environment properties are meaningful to all contexts. Those that are not meaningful are ignored by the context but inherited by derived contexts (because they might be meaningful, for instance, to federated contexts).

6.3 Resource Files

A JNDI resource file is a file in the properties file format (see java.util.Properties ). The file contains a list of key/value pairs. The key is the name of the property (e.g., "java.naming.factory.object") and the value is a string in the format defined for that property. Here is an example of a JNDI resource file:

java.naming.factory.object=com.wiz.jndi.AttrsToCorba:com.wiz.jndi.ToPerson
java.naming.factory.state=com.wiz.jndi.CorbaToAttrs:com.wiz.jndi.FromPerson
java.naming.factory.control=com.wiz.jndi.MyResponseControlFactory

There are two kinds of JNDI resource files: application and provider.

Application Resource Files

When an application is deployed, it will generally have several codebase directories and JARs in its classpath. Similarly, when an applet is deployed, it will have a codebase and archives specifying where to find the applet's classes. JNDI locates all application resource files named jndi.properties in the classpath. In addition, if the file $JAVA_HOME/lib/jndi.properties exists and is readable, JNDI treats it as an additional application resource file. ( $JAVA_HOME is the directory named by the java.home system property.) All of the properties contained in these files are placed into the environment of the initial context. This environment is then inherited by other contexts.

For each property found in more than one application resource file, JNDI uses the first value found or, in a few cases where it makes sense to do so, it concatenates all of the values. For example, if the java.naming.factory.object property is found in three jndi.properties resource files, the list of object factories is a concatenation of the property values from all three files. Using this scheme, each deployable component is responsible for listing the factories that it exports. JNDI automatically collects and uses all of these export lists when searching for factory classes.

Application resource files are available beginning with the Java 2 Platform, except that the file in $JAVA_HOME/lib can be used on all Java platforms.

Provider Resource Files

Each service provider has an optional resource file that contains properties specific to that provider. The name of this resource is:

[prefix/]jndiprovider.properties

where prefix is the package name of the provider's context implementation(s), with each period (".") converted to a slash ("/").

The JNDI library will consult the provider resource file when determining the values of certain properties. Properties other than these can be set in the provider resource file at the discretion of the service provider. The service provider's documentation should clearly state which properties are allowed.

6.4 Application/Applet-scope Standard JNDI Properties

Certain standard JNDI properties can alternately be set in the Java runtime's system properties, or in an applet's parameter list. These properties are:

java.naming.factory.initial
java.naming.factory.object
java.naming.factory.state
java.naming.factory.control
java.naming.factory.url.pkgs
java.naming.provider.url
java.naming.dns.url

For JNDI to access an applet's parameters, the applet code must set the java.naming.applet environment property to an instance of the applet ( java.applet.Applet ).

When these properties are set as system properties or applet parameters, they affect all of the application's/applet's contexts.

6.5 How the Environment Properties are Set

When JNDI constructs an initial context, the context's environment is initialized with properties defined in the environment parameter passed to the constructor and all application resource files. For the application/applet-scope properties, their values from the system properties and the applet parameters are also used.

JNDI passes the resulting environment to the initial context implementation. The environment is then inherited by contexts that are derived from the initial context. Since JNDI performs any necessary merging of the properties and their values, there is no need for the application or context implementation to directly consult the system properties or applet parameters.

6.6 Modifications to the Environment

A context's environment can be changed using the addToEnvironment() and removeFromEnvironment() methods:

public interface Context {
    public Object addToEnvironment(String propName, Object val)
        throws NamingException;
    public Object removeFromEnvironment(String propName)
        throws NamingException;
    ...
}

Not all environment properties are meaningful to all contexts. Changes to those that are not meaningful are still recorded and passed onto derived contexts.

Scope

Changing a property using the addToEnvironment() or removeFromEnvironment() methods affects the context instance on which the method is invoked. For example, if you specify new credentials for a context to use, subsequent methods invoked on that context that require communication with the server will use those new credentials (perhaps internally by first creating a new connection to the server). These updated environment properties are inherited by context instances that are subsequently derived from the affected context instance, but do not otherwise affect other context instances that were in existence prior to the update.

Timeliness

When a change is made to the environment properties, there is no requirement that the change be verified and acted upon at the time addToEnvironment() or removeFromEnvironment() is invoked. The only requirement is that the change (or changes) be effective the next time an operation that uses that property is invoked.

Defaults

For some environment properties, JNDI defines defaults (see Appendix A). For others, the default might be determined by the service provider or a group of service providers. If a context's environment does not have a particular property, the context behaves as if its environment has that property with its default value.

When a property is removed from a context's environment, the context assumes the default behavior specified for that property. This does not necessarily mean that the default value must be recorded as the property's value. The removal may also be indicated by the absence of the property from the context's environment.

Acceptable Values

Some environment properties have a fixed set of acceptable values while others have values that must follow a particular syntax. If an unacceptable value is presented, a property-specific exception will be thrown (for example, ConfigurationException , IllegalArgumentException , or AuthenticationNotSupportedException ). In some cases, it might be reasonable for the service provider to accept additional values than those specified, in which case, those values should be documented.

1. Note that if you use Properties, only the top-level properties are consulted--its defaults are not consulted--because Hashtable.get() is used when retrieving entries from the environment. See java.util.Properties for details.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 Scenarios

CONTENTS | PREV | NEXT JNDI API

7. Scenarios

This section outlines a few application scenarios to help illustrate the capabilities enabled by JNDI.

    • The examples below are not meant to be prescriptive. There are often several ways to solve a problem, and JNDI is designed with flexibility in mind.

7.1 User authentication

In secure systems, a user must authenticate himself to the computer, network, or service that he wishes to access. For example, logging into Unix requires the user to supply a password. Similarly, use of SSL requires that the user supply his X.509 certificate. Such authentication information can be stored as attributes associated with each user in the directory. The system performing the authentication would look up the attribute (for example, "password") of the user and verify the authenticity using the information supplied by the user.

DirContext ctx = new InitialDirContext();
Attribute attr = ctx.getAttributes(userName).get("password");
String password = (String)attr.get();

7.2 Electronic Mail

A useful feature of an electronic mail system is a directory service that provides a mapping between users and email addresses. This allows mail users to search for the email address of a particular user. This is analogous to searching for an individual's telephone number in the phone book in order to dial his phone number. For example, when I want to send mail to John Smith in my department, I search for "John Smith" in the directory using a "search" widget in the mail application. The widget returns to me five entries of John Smith, from which I select the one that is in a building on my site and use the email address attribute associated with that entry.

NamingEnumeration matches = deptCtx.search("user", new BasicAttributes("name", "John Smith"));
// use matches to construct a selectable list for end-user
while (matches.hasMore()) {
    SearchResult item = (SearchResult) matches.next();
    Attributes info = item.getAttributes();
    /* display attributes */
    ...
}

The directory could also be used by users to set up personalized address books. For example, once I have located John Smith's email address, I might not want to search the directory again each time I send him mail. Instead, I can create a personal subtree in the directory in which I maintain entries that I frequently use, possibly by creating links to the existing entries.

7.3 Databases

Database applications can use the directory to locate database servers. For example, a financial application needs to get the stock quotes from a stock quote server using JDBC. This application can enable the user to select the stock quote server based on specification of some attributes (such as coverage of which markets and frequency of quote updates). The application searches the directory for quote servers that meet these attributes, and then retrieves the "location" attribute (a JDBC URL) of the selected quote server and connects to it.

NamingEnumeration matches = 	ctx.search("service/stockQuotes",
                                "(&(market=NASDAQ)(updateFreqency<=300))", searchctls);
while (matches.hasMore()) {
       SearchResult item = (SearchResult)matches.next();
       Attribute location = item.getAttributes().get("location");
   ...
}

7.4 Browsing

When using almost any kind of interactive application that asks a user to input names, the user's job is made easier if a namespace browser is available to him. The browser can either be built into the application and tailored to suit that application in particular, or it can be more general-purpose such as a typical web browser.

A very simple example of a JNDI browser allows a user to "walk" through a namespace, viewing the atomic names at each step along the way. The browser prints a "*" to highlight the name of each Context , thus telling the user where he can go next. 1

// Start at the top -- the initial context.
Context ctx = new InitialContext();
while (ctx != null) { 		// display one level
    NamingEnumeration 	items = ctx.list();
    while (items.hasMoreElements()) {
        NameClassPair item = (NameClassPair)items.next();
        if (isContext(item.getClassName())) {
            System.out.print("*");
        } else {
            System.out.print(" ");
        }
        System.out.println(" " + item.getName());
    }
    // Take the next step down into the namespace.
    String target = input.readLine();
    try {
        ctx = (Context)ctx.lookup(target);
    } catch (NamingException e) {
        // handle error
    } catch (ClassCastException e) {
        // not a context; cannot traverse
    }
}

7.5 Network Printing

An important function of a printing service is to provide a means for its human users to easily discover and select printers in the network. An application that needs to print, or the machine on which it runs, should not have to be configured each time a new printer is added to the network. The scope of network access to printers may range from a workgroup to global. The printing service can use the directory to provide this capability.

Assume that printers are represented by a Printer interface. One of the methods in it could be print() which, when given an InputStream , will read data from InputStream and print it on the printer represented by this instance of Printer.

interface Printer {
    void print(InputStream data) throws PrinterException;
    ...
}

A user selects a printer using a logical printer name, either explicitly or through default settings. For example, the user might have specified a default printer to use for all his applications, which is overridden only when he explicitly specifies another printer to use. The application that is accepting the print request takes the printer name and looks it up in the directory service. The application expects to receive as the result an object that implements the Printer interface.

void myAppPrint(String printerName, String fileName) throws IOException {
    try {
        DirContext ctx = new InitialDirContext();
        Printer prt = (Printer) ctx.lookup(printerName);
        prt.print(new FileInputStream(fileName));
    } catch (NamingException e){
        System.err.println("Could not locate printer: " + e);
    } catch (ClassCastException e) {
        System.err.println(printerName + "does not name a printer");
    }
}

7.5.1 Browsing and searching for printers

Selecting a printer by explicitly giving its name is but one way of identifying a printer. The user can also use the directory to see the different printers available (browsing), or to search for printers with particular attributes. For example the user can ask the directory to list all the printers on the second floor of building 5 in the Mountain View campus, or search for all color laser printers with 600dpi resolution. From the application's perspective, just as lookup() returned a Printer object, the list and search operations also provide the same capability of returning Printer objects that the application could use to submit print requests.

1. The isContext() method used in the example is not part of JNDI. It is a method that must be provided by the application.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


8 Security Considerations

CONTENTS | PREV | NEXT JNDI API

8. Security Considerations

There are two main settings in which JNDI is used: with and without a security manager installed.

In the case of Java applications running with no security manager installed, the code is trusted and the application can access service providers from the local classpath. Furthermore, there is no restriction if the service providers access local files, or make network connections to naming or directory servers anywhere on the network.

In the case of an applet or application running with a security manager installed, there can be trusted code and untrusted code within the same applet or application. The Sharing Context Handles and Context Environment sections below are especially applicable in such a scenario. The ability of an applet or an application running with a security manager installed to access service providers, especially service providers that require the use of restricted resources (like the file system or network connections) may be severely limited.

8.1 JNDI Classes

The classes in the JNDI packages contain no native methods. They do not require any special installation in order to run inside an applet or an application.

JNDI uses several system properties (see Application/Applet-scope Standard JNDI Properties ). This allows applets and applications to be configured easily without much programming. However, an applet or application might have restricted access to some or all system properties as a result of the security manager installed on the platform on which it is running. Consequently, JNDI also allows these same properties to be specified as applet parameters, in resource files, or as environment properties passed to a context.

In the Java 2 Platform, the JNDI classes use doPrivileged blocks when accessing the system properties listed in Application/Applet-scope Standard JNDI Properties .

8.2 Security Model

JNDI does not define a security model or a common security interface for accessing naming and directory servers. Security-related operations, such as those required for authentication or access control to the directory service, are dealt with by individual service providers. JNDI provides the means by which an application or applet can pass such security-related information to service providers in order to establish a connection with the service, but does not itself take part in such security-related activities.

JNDI also provides the means by which security-related problems can be indicated to the client in the form of security-related exceptions.

JNDI service providers are controlled by the security manager in place when they try to gain access to protected resources such as the file system or network. Some service providers may control directory access by making use of the Java 2 Platform security architecture (for example, allowing access to special ports for administration-related applets).

8.3 Access To Servers

Naming and directory services typically have their own security system in place to protect information stored therein. For example, one directory might require that its users first "login" to the directory before reading or updating information in the directory. Some services might allow anonymous access to part of its namespace/directory.

Once a user has logged into a service, it is imperative for security reasons not to share that privilege with untrusted code.

8.4 Sharing Context Handles

In the following discussion, we refer to a context handle as a reference to a Context instance. This is analogous to how a reference to a Reader / Writer / InputStream / OutputStream instance is often referred to as a file handle .

A context handle should be treated like any other protected resource. If a piece of trusted code obtains a context handle (possibly by authenticating its access with the directory server), it should protect the use of that context against unauthorized or untrusted code. This is analogous to how application and/or applet code should protect file handles. For example, if a piece of trusted code opens a file for writing (and it was granted such privilege because of its trusted nature), it should be careful about passing that file handle to any other pieces of code, trusted or otherwise.

Similarly, giving access of a context handle to untrusted code may lead to its misuse in accessing or updating information in the directory, or accessing security-sensitive environment properties associated with the context.

8.5 Context Environment

JNDI allows the application/applet to pass preferences and information to a context in the form of an environment. The application/applet can also get the current environment from a context. See See Configuration and Appendix A for more information on a context's environment.

The nature of the information contained in a context's environment might be sensitive and need protection from untrusted access. Specifically, the environment properties java.naming.security.principal and java.naming.security.credentials contain information that should not be given out to untrusted code. Service providers might take precaution to protect against accessing these properties (see Responsibilities of Service Providers below). Client applications and applets should take care not to pass context handles with such sensitive environment properties to untrusted code.

8.6 Class Loading

JNDI allows the class files to be loaded dynamically.

When JNDI is run on the JDK 1.1.x platform, it uses the RMI class loader. The classes can only be loaded if there is a security manager installed, and if that security manager permits the class to be loaded. When such classes are loaded, they run in the security context dictated by the security manager.

When JNDI is run on the Java 2 platform, it will attempt to load such classes from the locations specified in the codebase using the java.net.URLClassLoader . In order for the class loading to succeed, you must grant the application and the JNDI and service provider classes the permissions appropriate for the URLs named in the codebase. For example, if the URL scheme is "http" or "ftp", you must grant the application the appropriate java.net.SocketPermission ; if the URL scheme is "file", you must grant the application the appropriate java.io.FilePermission .

8.7 Serializable Objects

Several of the JNDI classes are serializable. This allows the objects to be accessed in the form of a byte stream, possibly outside of the environment in which they were created. See the document at the following URL regarding security issues related to serialized objects.

http://java.sun.com/products/jdk/1.2/docs/guide/serialization/spec/security.doc.html

8.8 Responsibilities of Service Providers

8.8.1 Context Environment

When a context handle is created (either by getting the initial context or by looking it up or by creating it from the directory), some environment properties may be specified for it. Sometimes security-related properties are required for the creation of the context handle (such as user information that "logs" the user in with the directory). The service provider should take care to protect this security-sensitive information from untrusted code.

The service provider needs to protect the context's environment from being tampered or otherwise modified by untrusted code. The service provider needs to protect the security-sensitive environment properties from being read by untrusted code. It might do this by disallowing any thread whose execution context and/or trust level is different than that originally held by the thread that created the context handle to use the context handle. Or it might disallow certain operations (such as accessing security-sensitive environment properties). Or it might simply not return security-sensitive environment properties, or only return them to trusted code.

8.8.2 Network Security

Untrusted code (such as those found in untrusted applets) have limited access to the network. Untrusted applets, for example, can only create a network connection to the host from which they were downloaded. With finer-grain security models, it will be possible for the service provider itself to be trusted code, and hence be allowed to connect to hosts not allowed for untrusted applets. In such a scenario, the service provider should be careful not to compromise the security intended by the security manager. If the service provider is sure that access by an untrusted applet to the directory will cause no security problems, then it may proceed to offer such a service to untrusted code. For example, allowing untrusted code to access a directory "anonymously" would post no security problems because the directory already allows any anonymous client (written in the Java programming language or otherwise) to access the same data.

Most naming and directory services are accessed over the network. Although the data requested is protected by the server's authentication and access control mechanisms, some protocols do not protect (encrypt) the data being sent as replies. Again, this is not a problem particular to a client using JNDI but a problem for any client accessing the directory. The service provider should document the security implications associated with using the associated directory over a network.

8.8.3 Accessing Local Files

Similar to network access, untrusted code has limited access to the local file system. If the service provider has special privileges for accessing local files, it should do so with utmost precaution so as not to compromise the security policies intended by the runtime/platform.

8.8.4 Privileged Code, Native Methods

A service provider that is written completely in the Java programming language with no privileged sections is controlled by the same security policies afforded other code written in the Java programming language. All protected resources that it attempts to access go through the same security manager and access controller.

If a service provider contains privileged code sections, or if it contains native methods, then it needs to be especially careful to preserve the security policies intended by the runtime/platform.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


9 Design Choices

CONTENTS | PREV | NEXT JNDI API

9. Design Choices

9.1 Separation of Interfaces into Context and DirContext

There are two core interfaces in JNDI: Context , and DirContext , with DirContext extending the base naming operations in Context with directory service operations. They have been separated into separate interfaces both for modularity and also in keeping with the "pay for what you use" goal of JNDI.

Naming is a basic component found in many computing services such as file systems, spreadsheets, calendar services, and directory services. By having a base Context interface for the naming operations, we enable its use by all these other services, not just for directory services.

DirContext extends Context to provide basic directory service operations, which include manipulation of attributes associated with named objects, attribute-based searches, and schema-related operations of those attributes and named objects.

9.2 Separation of JNDI into Different Functional Packages

JNDI is separated into four client packages ( javax.naming , javax.naming.directory , javax.naming.event , javax.naming.ldap ) and a service provider package ( javax.naming.spi ). The idea is that each package contains the interfaces and classes required for a particular category of applications, again in keeping with the "pay for what you use" goal. For example, an application that just wants to perform name-lookups only needs to use the javax.naming package. An application that wants to examine/modify attributes associated with an object uses the javax.naming and javax.naming.directory packages. An application that needs to use LDAP-specific controls or extended operations uses the javax.naming.ldap package. There is a step-by-step progression of what classes and interfaces each category of application writer needs to learn and use.

9.3 Separation of Client APIs and Service Provider Interfaces

JNDI separates interfaces and classes that a client application needs to use from those that are only of interest to service providers into different packages. For example, a client would use interfaces and classes from javax.naming , while a service provider that is hooking up a naming service would use both javax.naming and javax.naming.spi . The package delineation minimizes confusion for the application developer and makes clear which packages he needs to examine when writing his program.

9.4 Multiple methods for listing Context

There are two common types of applications that list contexts: browser-style applications, and applications that need to perform operations on the objects in a context en-masse. Browser-style applications typically want to display the names of the contents of a context. In addition to the names, many browsers often require type information of the objects bound to the names, so that it can display appropriate pictorial representations of the objects. The browser is usually interactive. Once a user has used a browser to display the contents of a context, he would then select one or a few of the entries displayed and request more information on it.

Some applications need to perform operations on objects within a context en-masse. For example, a backup program might want to perform "file stats" operations on all the objects in a file directory. A printer administration program might want to restart all the printers in a building. To perform such operations, these programs need to obtain all the objects bound in a context.

With these two common styles of usage in mind, the Context interface has two types of list methods: list() and listBindings() . list() returns a list of name/class-name pairs while listBindings() returns a list of name/class-name/object tuples. list() is designed for browser-style applications that want mostly just the names and types of objects bound in a context. listBindings() is for applications that want to potentially get all the objects in the context, as well as their names and types. listBindings() returns an enumeration of Binding . Both the listBindings() operation itself and invocation of methods in the Binding class (e.g. getObject() ) could be implemented lazily or eagerly. Using listBindings() simply indicates the potential that the caller might want all or many of the objects in the context so that implementations that are able can optimize for it. Using list() indicates that the caller is unlikely to want all, if any, objects in the context so implementations can optimize for that if possible.

An alternative is to have a single list operation and have the lazy or eager behavior as part of the implementation of Binding . The advantage of this is that there is a single list operation to learn. The disadvantage is that the caller has no way of indicating which piece of information he wants back from list, and subsequently, implementations cannot optimize for the eventual behavior of the program.

9.5 Support for Federation

Federation is a first-class concept in JNDI. In the client interfaces, it is supported by the use of the Name interface for specifying names that can span one or more namespaces. The caller of the methods in the client interface need not know anything else regarding federation. Resolution of names across multiple systems is handled by the SPI and does not involve any intervention on the part of the caller.

Although federation is a first-class concept, that does not mean that all callers and service providers must make use of it. If an application or service does not want to take advantage of federation, there is no requirement that Name always span multiple namespaces. Name can just name objects within a single namespace, and the SPI can handle name resolution within a single namespace as well (as a degenerate case of multiple namespace support).

9.6 DirContext versus DirObject

Instead of having DirContext extend Context , an alternative would be to not extend Context at all but to have a separate interface called DirObject that encapsulates all the directory-related methods. In that case, an object can implement both Context and DirObject if it supports both the naming and directory operations; another object might implement just DirObject .

The problem with eliminating DirContext is that DirContext contains some hybrid operations that involve both naming and directories ( bind() , createSubcontext() methods that accept attributes as arguments). To keep these operations and have DirObject at the same time would produce the need for a third interface (perhaps called DirContext ) to contain just these hybrids.

Furthermore, having DirContext instead of DirObject is somewhat more convenient in that you can perform some operations in one step instead of two. For example DirContext.getAttributes() could be used to get the attributes associated with a named object, whereas with DirObject , you would need first to resolve to the object ( Context.lookup() ) and then use DirObject.getAttributes() to get the attributes from it.

9.7 Support for Schemas

The DirContext interface contains support for schemas. For example, from a DirContext object you can obtain its schema object, which points to the directory space where the schema for this particular DirContext instance is defined. From a DirContext object, you can also obtain its schema class definition (i.e. information about what type of object this represents in the directory). There is further support for schemas in the Attribute class, which contains methods for obtaining an attribute's syntax information (i.e. what is the type of the attribute's value) and the attribute's definition (e.g. is it multivalued, syntax, constraints on its syntax). There is no requirement that any of this schema information be dynamically accessible (i.e. points to live directory spaces). Support for such schema information could be generated statically by the service provider. For example, a particular directory service might only support string attribute values, so it can hard-wire the syntax of the attributes that it returns. Another directory might support only static schemas (where information in the schema are not modifiable). Yet another directory might support fully dynamic schemas. The interfaces and classes in DirContext are flexible enough that these different levels of support for schemas can be accommodated.

9.8 Overloaded Methods in Context and DirContext

For each method in the Context and DirContext interfaces that accepts a Name argument, there is a corresponding overloaded form that accepts a String argument for specifying a name.

The motivation for having the String -based methods is that there are many applications that simply accept a string name from the end-user and perform context methods on the object named by that string name. For those applications, it is useful to have the context methods accept a string for the name directly, instead of requiring the applications to first construct a Name object using the string name.

The motivation for having the Name -based methods is that there are also many applications that manipulate names and do not want to worry about syntactic details of the names' string forms when composing and modifying names. These applications deal with the parsed form of names and hence would prefer to deal with Name objects rather than string names. For these applications, we provide the Name -based methods in the context interfaces. Not providing these methods would probably cause proliferation of Name -like interfaces/classes to support manipulation of names in their structural form in applications developed on top of JNDI.

9.9 Reference and Referenceable

There are different ways in which applications and services can use the directory to locate objects. JNDI is general enough that it accommodates several different models. For some applications, the object bound in the directory is the object itself. An application may build up a dynamic directory while the application is active, and delete the directory when the application exits. Another application might store URLs as attributes for locating objects in its namespace. Other systems might bind some reference information in the directory, which can subsequently be used to locate or access the actual object. This last case is quite common, especially for making Java applications take advantage of services in the installed base. The reference in the directory acts as a "pointer" to the real object.

JNDI defines a Reference class to provide a uniform way of representing reference information. A Reference contains information on how to access an object. It consists of a list of addresses and class information about the object to which this reference refers. When binding a name to an object that is to be represented in the directory as a reference, the desired effect is that the object's reference be extracted and bound. To allow for this behavior, the object's class must implement the Referenceable interface, which contains the method getReference() .

There is some similarity between the interfaces Serializable and Referenceable and a natural question is "why not just use Serializable instead?" The answer is that a serialized object is really a frozen version of the object, whereas the reference contains just the information needed to construct it. The serialized version may have a lot more state which may not be appropriate for storage in the directory.

9.10 Automatically Turning References into Objects

For an object that is bound as a Reference in the directory, JNDI SPI framework automatically creates and instantiates the object identified by the reference. In this way, the program can simply narrow the result of lookup() to the expected class, instead of calling a separate operation to transform the result of lookup() into an object of the expected class.

For example, if you are looking up a printer object, a successful lookup would return to you a printer object that you can directly use.

Printer prt = (Printer) ctx.lookup(somePrinterName);
prt.print(someFileName);

JNDI does this automatically, instead of requiring an explicit conversion step, because this is expected to be the common usage pattern. By having the Reference class, and a common mechanism for converting a Reference into the object identified by the Reference , JNDI encourages different applications and system providers to utilize this mechanism, rather than inventing separate mechanisms on their own.

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


CONTENTS | PREV | NEXT JNDI API

Contents

1. Introduction

2. Goals and Design Principles

3. Overview of the Architecture

4. Fundamentals
4.1 Naming -- The Foundation
4.2 Directory Objects
4.3 URLs and Composite Names
4.4 Events
5. Overview of the Interface
5.1 The Naming Package -- javax.naming
5.1.1 Contexts
5.1.2 The Initial Context
5.1.3 Names
5.1.4 Bindings
5.1.5 References
5.1.6 Referrals
5.2 The Directory Package -- javax.naming.directory
5.2.1 Directory Objects
5.2.2 Attributes
5.2.3 Directory Objects as Naming Contexts
5.2.4 The Initial Context
5.2.5 Searches
5.2.6 Schema
5.3 The Event Package -- javax.naming.event
5.3.1 Naming Events
5.3.2 Naming Listeners
5.3.3 Event Registration and Deregistration
5.3.4 Exception Handling
5.4 The LDAP Package -- javax.naming.ldap
5.4.1 Extended Operations
5.4.2 Controls
5.4.3 The Initial Context
5.4.4 Unsolicited Notifications
6. Configuration
6.1 Environment Properties
6.2 Context Environment
6.3 Resource Files
6.4 Application/Applet-scope Standard JNDI Properties
6.5 How the Environment Properties are Set
6.6 Modifications to the Environment
7. Scenarios
7.1 User authentication
7.2 Electronic Mail
7.3 Databases
7.4 Browsing
7.5 Network Printing
8. Security Considerations
8.1 JNDI Classes
8.2 Security Model
8.3 Access To Servers
8.4 Sharing Context Handles
8.5 Context Environment
8.6 Class Loading
8.7 Serializable Objects
8.8 Responsibilities of Service Providers
9. Design Choices
9.1 Separation of Interfaces into Context and DirContext
9.2 Separation of JNDI into Different Functional Packages
9.3 Separation of Client APIs and Service Provider Interfaces
9.4 Multiple methods for listing Context
9.5 Support for Federation
9.6 DirContext versus DirObject
9.7 Support for Schemas
9.8 Overloaded Methods in Context and DirContext
9.9 Reference and Referenceable
9.10 Automatically Turning References into Objects

Appendix A: JNDI Standard Environment Properties

Appendix B: Examples for LDAP Programmers

Appendix C: Legend for Class Diagram

Appendix D: JNDI Change History

CONTENTS | PREV | NEXT
Copyright ©1997-1999 Sun Microsystems, Inc. All Rights Reserved.


Copyright © 1999 by Sun Microsystems Inc.

901 San Antonio Road, Palo Alto, CA 94303.

All rights reserved.

RESTRICTED RIGHTS: Use, duplication or disclosure by the government is subject to the restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software Clause as DFARS 252.227-7013 and FAR 52.227-19.

Sun, Sun Microsystems, the Sun logo, Java, and JavaSoft, are trademarks or registered trademarks of Sun Microsystems, Inc.

THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MECHANTABILITY, FITNESS FOR A PARTICULAR USE, OR NON-INFRINGEMENT.

THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC., MAY MAKE NEW IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

1 Introduction

The JNDI SPI provides the means by which developers can write different naming and directory service providers and make them available so that the corresponding services are accessible from applications that use the JNDI API. A service provider is a set of modules that together satisfy JNDI API requests. In addition, because JNDI allows the use of names that span multiple namespaces, one service provider implementation may need to interact with another in order to complete an operation. The SPI provides methods that allow different provider implementations to cooperate to complete client JNDI operations.

This document describes the components of the SPI and explains how developers can build service providers for JNDI. It is assumed that the reader is familiar with the contents of the JNDI API document.

All service provider developers should read the "Security Considerations" section of the JNDI API document. It contains important issues that all developers using JNDI, especially those writing service providers, should consider.

1.1 Document Overview

There are several types of implementations that sit beneath the JNDI API. A service provider contains at a minimum a context implementation. A context implementation implements the Context interface or any of its subinterfaces, such as DirContext, EventContext, or LdapContext. The complexity of the implementation depends primarily on the complexity of the underlying service, and secondarily on the number of JNDI features that the implementation supports. Chapter 2 describes the details of building a context implementation.

A context implementation can be accessed in different ways. The most common way is to access it from the initial context. Chapter 3 describes two ways that a context implementation can be accessed from the initial context: via an initial context factory and a URL context factory.

The JNDI architecture defines components/implementations that can be used to augment the behavior of context implementations. This allows users and applications to customize the implementation. These components are supported through factories. JNDI defines three types of factories and provides SPI methods that make use of them. These factories are described in Chapter 4.

  • Object factories-For transforming data stored in naming/directory services into Java types more natural to the Java application.
  • State factories-For transforming objects of Java types natural to the program into formats suitable for storage into naming/directory services.
  • Response control factories-For narrowing LDAP v3 response controls received from LDAP servers into more user-friendly types.

1.2 Interface1 Overview

The JNDI SPI is contained in the package javax.naming.spi. The following sections provide an overview of the SPI. For more details on the SPI, see the corresponding javadoc.

1.2.1 NamingManager and DirectoryManager

The NamingManager class contains static methods that perform provider-related operations. For example, it contains methods to create instances of objects using Reference, to obtain an instance of the initial context using the java.naming.factory.initial property, and to install ObjectFactoryBuilder and InitialContextFactoryBuilder. The DirectoryManager class provides similar static methods for DirContext related operations.

1.2.2 Initial Contexts

InitialContextFactory is the interface for creating an initial context instance. See Section 3.1 for more details.

InitialContextFactoryBuilder is the interface for creating InitialContextFactory instances. See Section 3.3 for more details.

1.2.3 Object Factories

ObjectFactory is the interface for supporting creation of objects using information stored in the namespace. DirObjectFactory is a subinterface of ObjectFactory for use by context implementations that implement the DirContext interface. See Section 4.1 for more details.

ObjectFactoryBuilder is the interface for creating object factories. See Section 4.1.4 for more details.

1.2.4 State Factories

StateFactory is the interface for supporting converting objects into storable formats supported by the naming/directory service. DirStateFactory is a subinterface of StateFactory for use by context implementations that implement the DirContext interface. DirStateFactory.Result is a class for holding a pair of java.lang.Object and Attributes that is returned by DirStateFactory.getStateToBind(). See Section 4.2 for more details.

1.2.5 Federation Support

The Resolver interface defines a method for providers to implement that allows them to participate in a federation for supporting extended interfaces to Context. See "Resolving Through to Subinterfaces of Context" on page 10 for more details.

ResolveResult is the return value of calling Resolver.resolveToClass(). It contains the object to which resolution succeeded, and the remaining name yet to be resolved.

2 Building a Context Implementation

One of the basic tasks in building a service provider is to define a class that implements the Context interface or any of its subinterfaces. This class is called a context implementation. The following guidelines should be used for developing a context implementation.

2.1 Ownership of Parameters

In general, any object passed as a parameter to methods in the Context interface (or subinterfaces) and NamingManager/DirectoryManager utility methods is owned by the caller. In many cases, the parameter eventually reaches a context implementation. Because the caller owns the object, the context implementation is prohibited from modifying the object. Furthermore, the context implementation is allowed to maintain a pointer to the object only for the duration of the operation and not beyond. If a context implementation needs to save the information contained in a parameter beyond the duration of the operation, it should maintain its own copy.

For purposes of parameter ownership, an operation on a context instance is not considered to have completed while any referrals generated by that operation are still being followed, or if the operation returns a NamingEnumeration, while the enumeration is still in use.

2.2 Reentrancy

A context instance need not be reentrant. Two threads that need to access the same context instance concurrently should synchronize amongst themselves and provide the necessary locking.

However, different context instances must be safe for concurrent multithreaded access. That is, two threads each operating concurrently on their respective context instance should not need to synchronize their access. For example, even though two contexts might share the same resources (such as the same connection), it must be possible (and safe) for two separate threads to operate on each of those contexts without the threads having to do any explicit synchronization.

For purposes of concurrency control, an operation on a context instance is not considered to have completed while any referrals generated by that operation are still being followed, or if the operation returns a NamingEnumeration, while the enumeration is still in use.

2.3 Basic Support-Implementing the Context Interface(s)

The context implementation defines implementations for each of the methods in the Context interface or subinterfaces that the implementation supports.

If a method is not supported, it should throw OperationNotSupportedException.

For methods in the Context interface or subinterfaces that accept a name argument (either as a String or a Name), an empty name denotes the current context. For example, if an empty name is supplied to lookup(), that means to return a new instance of the current context. If an empty name is supplied to list(), that means to enumerate the names in the current context. If an empty name is supplied to getAttributes(), that means to retrieve the attributes associated with this context.

Appendix A contains an example context implementation that implements a flat, in-memory namespace.

2.4 Object Support

JNDI encourages providers to supply implementations of the Context and its subinterfaces that are natural and intuitive for the Java application programmer. For example, when looking up a printer name in the namespace, it is natural for the programmer to expect to get back a printer object on which to operate.

Context ctx = new InitialContext();
Printer prt = (Printer)ctx.lookup(somePrinterName);
prt.print(someStreamOfData);

Similarly, when storing an application's object into the underlying service, it is most portable and convenient if the application does not have to know about the underlying data representation.

However, what is bound in the underlying directory or naming services typically are not objects in the Java programming language but merely reference information which can be used to locate or access the actual object. This case is quite common, especially for Java applications accessing and sharing services in an existing installed base. The reference in effect acts as a "pointer" to the real object. In the printer example, what is actually bound might be information on how to access the printer (e.g., its protocol type, its server address). To enable this easy-to-use model for the application developer, the context implementation must do the transformation of the data to/from the underlying service into the appropriate objects in the Java programming language.

There are different ways to achieve this goal. One context implementation might have access to all the implementation classes of objects that a directory can return; another context implementation might have a special class loader for locating implementation classes for its objects. JNDI provides the Reference class as a standard way of representing references. Applications and context implementations are encouraged to use this class, rather than invent separate mechanisms on their own. However, this does not preclude context implementations from using their own mechanisms for achieving the same goal.

JNDI provides utilities for context implementations to use when reading/storing objects in the Java programming language in a format-independent way to the underlying service. This section describes these utilities. These utilities interact with components called object and state factories that do the actual transformations. These factories are described in Chapter 4.

2.4.1 Reading an Object

JNDI provides the following methods that context implementations should use to transform data read from the underlying service into objects in the Java programming language:

Object NamingManager.getObjectInstance(Object refInfo,
                                       Name name,
                                       Context nameCtx,
                                       Hashtable env)
    throws Exception;
Object DirectoryManager.getObjectInstance(Object refInfo,
                                          Name name,
                                          Context nameCtx,
                                          Hashtable env,
                                          Attributes attrs)
    throws Exception;
refInfo is the data (representing the object) read from the underlying service. name is the name of the object while nameCtx is the context in which to resolve name. The name/nameCtx pair can be used to obtain more information about the object than is available from refInfo. env is the environment of the context from which getObjectInstance() is being invoked. attrs is the collection of attributes read from the directory about the object, usually in the same request that was used to get refInfo. It might not be the complete collection of attributes if such was not requested.

The method in the NamingManager class should be used by context implementations that implement the Context interface, while the method in the DirectoryManager class should be used by context implementations that implement the DirContext interface.

When constructing objects to be returned for the following methods, the context implementation should call getObjectInstance(), or its own mechanism for generating objects from the bound information, if it wants this feature to be enabled in their contexts. (String overloads not shown.)

    javax.naming.Context.lookup(Name name)
    javax.naming.Context.lookupLink(Name name)
    javax.naming.Binding.getObject()
    javax.naming.directory.SearchResult.getObject()

For Binding and SearchResult, the context implementation should either pass an object that is the result of calling getObjectInstance() or its equivalent to the constructor, or override the default implementation of Binding and SearchResult so that their getObject() implementations call getObjectInstance() or its equivalent before returning.

Here is an example. Suppose printers are represented in the namespace using References. To turn a printer Reference into a live Printer object, the context implementation would use the NamingManager.getObjectInstance() method. In this way, the underlying service need not know anything specific about printers.

Object lookup(Name name) {
    ...
    Reference ref = <some printer reference looked up from naming service>;
    return NamingManager.getObjectInstance(ref, name, this, env);
}

In another example, suppose printers are represented in the directory as a collection of attributes. To turn a printer's directory entry into a live Printer object, the context implementation would use DirectoryManager.getObjectInstance().

Object lookup(Name name) {
    ...
    Attributes attrs = <read attributes from directory>;
    Reference ref = <construct reference from attributes>;
    return DirectoryManager.getObjectInstance(ref, name, this,
        env, attrs);
}

2.4.2 Storing an Object

JNDI provides the following methods that context implementations should use to transform an object before storing it in the underlying service:

Object NamingManager.getStateToBind(
                                    Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable env)
    throws NamingException;
DirStateFactory.Result DirectoryManager.getStateToBind(
                                    Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable env,
                                    Attributes attrs)
    throws NamingException;

obj is the object to be stored in the underlying service. name is the name of the object while nameCtx is the context in which to resolve name. The name/nameCtx pair can be used to obtain more information about the object than is available from obj. env is the environment of the context from which getStateToBind() is being invoked. attrs is the collection of attributes that is to be bound with the object. DirStateFactory.Result is a class that contains an object and a collection of attributes.

The method in the NamingManager class should be used by context implementations that implement the Context interface, while the method in the DirectoryManager class should be used by context implementations that implement the DirContext interface.

Before storing an object supplied by the application, the context implementation should call getStateToBind(), or its own mechanism for generating information to be bound, if it wants this feature to be enabled in their contexts. (String overloads not shown.)

javax.naming.Context.bind(Name name, Object o)
javax.naming.Context.rebind(Name name, Object o)
javax.naming.DirContext.bind(Name name, Object o, Attributes attrs)
javax.naming.DirContext.rebind(Name name, Object o, Attributes attrs)

Here's an example of how a Context implementation supports Context.bind:

// First do transformation
obj = NamingManager.getStateToBind(obj, name, ctx, env);

// Check for Referenceable
if (obj instanceof Referenceable) {
    obj = ((Referenceable)obj).getReference();
}

if (obj instanceof Reference) {
    // store as ref
} else if (obj instanceof Serializable) {
    // serialize
} else {
    ...
}

Here's an example of how a DirContext implementation supports DirContext.bind:

// First do transformation
DirStateFactory.Result res = DirectoryManager.getStateToBind(
    obj, name, ctx, env, inAttrs);

obj = res.getObject();
Attributes outAttrs = res.getAttributes();

// Check for Referenceable
if (obj instanceof Referenceable) {
    obj = ((Referenceable)obj).getReference();
}
if (obj instanceof Reference) {
    // store as ref and add outAttrs
} else if (obj instanceof Serializable) {
    // serialize and add outAttrs
} else if (obj instanceof DirContext) {
    // grab attributes and merge with outAttrs
} else {
    ...
}

As shown in these examples, a context implementation might be able to store different types of objects (Reference, Serializable, and DirContext). If the context implementation cannot store Referenceable objects directly and getStateToBind() returns such an object, the context implementation should subsequently call Referenceable.getReference() and store the resulting Reference instead.

If a context implementation can store different types of objects, it should follow this order for the following common types:

  • Reference
  • Serializable
  • DirContext

This order is recommended because it is most likely to capture the intent of the caller of the bind()/rebind() method. For example, a Reference is Serializable, so if you performed the Serializable check first, no Reference objects would ever be stored in the reference format (that is, they would all be serialized).

2.5 Federation Support

2.5.1 Names

When a context is given a string name argument, the name represents a composite name that may span multiple namespaces, or it may have only a single compound name component (which in turn may be made up of one or several atomic names) that belongs to a single namespace. The context implementation must determine which part of the name is to be resolved/processed in its context and pass the rest onto the next context. This may be done syntactically by examining the name, or dynamically by resolving the name.

When a context is given a Name argument, if it is an instance of CompositeName, then it will be treated as a composite name. Otherwise, it will be treated as a compound name that is implemented by the CompoundName class or some other compound name implementation.

2.5.2 Resolving Through a Context

A context participates in a federation by performing the resolution phase of all of the context operations. The lookup() method must always be supported. Support for other methods is optional, but if the context is to participate in a federation, then the resolution implicit in all operations must be supported.

Figure 1: Example of Resolving through Intermediate Contexts to Perform a bind().

For example, suppose a context does not support the bind() operation. When that context is being used as an intermediate context for bind(), it must perform the resolution part of that operation to enable the operation to continue to the next context. It should only throw OperationNotSupportedException if it is being asked to create a binding in its own context. Figure 1 shows an example of how the bind() operation is passed through intermediate contexts to be performed in the target context.

2.5.3 Resolving Through to Subinterfaces of Context

To invoke a DirContext method (such as getAttributes()), the application first obtains an initial DirContext, and then perform the operation on the DirContext.

DirContext ctx = new InitialDirContext();
Attributes attrs = ctx.getAttributes(someName);
From the context implementation's perspective, in order to retrieve the attributes, getAttributes() might need to traverse multiple naming systems. Some of these naming systems only support the Context interface, not the DirContext interface. These naming systems are being used as intermediaries for resolving towards the target context. The target context must support the DirContext interface. Figure 2 shows an example of this.

Figure 2: Example of Resolving Through Intermediate non-DirContexts

In order for intermediate naming systems to participate in the federation for extensions of Context, they must implement the Resolver interface. The Resolver interface is used by the JNDI framework to resolve through intermediate contexts that do not support a particular subinterface of Context. It consists of two overloaded forms of the method resolveToClass(). This method is used to partially resolve a name, stopping at the first context that is an instance of the required subinterface. By providing support for this method and the resolution phase of all methods in the Context interface, a context implementation can act as an intermediate context for extensions (subinterfaces) of Context.

public interface Resolver {
    public ResolveResult resolveToClass(Name name, Class contextType)

        throws NamingException;
    public ResolveResult resolveToClass(String name,
                                       Class contextType)

        throws NamingException;
}

2.5.4 Naming System Boundaries

The resolution of a (multicomponent) composite name proceeds from one naming system to the next, with the resolution of the components that span each naming system typically handled by a corresponding context implementation. From a context implementation's point of view, it passes the components for which it is not responsible to the (context implementation of the) next naming system.

There are several ways in which the context implementation for the next naming system may be located. It may be done explicitly through the use of a junction, where a name in one naming system is bound to a context (or a Reference to a context) in the next naming system. For example, with the composite name "cn=fs,ou=eng/lib/xyz.zip", the LDAP name "cn=fs,ou=eng" might resolve to a file system context in which the name "lib/xyz.zip" could then be resolved.

Alternately, the next naming system may be located implicitly. For example, a context implementation may choose the next naming system based upon service-specific knowledge of the object that it has resolved. For example, with the composite name "ldap.wiz.com/cn=fs,ou=eng", the DNS name ldap.wiz.com might name a DNS entry. To get the next naming system beyond DNS, the DNS context implementation might construct a context using SRV resource records found in that entry, which in this case, happens to name an LDAP context. When the next naming system is located in this fashion, JNDI composite name separator is used to denote the boundary from one naming system to the next, and is referred to as the implicit next naming system pointer.

However the next naming system is located, the context implementation must hand the next naming system the remaining portion of the composite name to resolve.

2.5.5 Continuing an Operation in a Federation

In performing an operation on a name that spans multiple namespaces, a context in an intermediate naming system needs to pass the operation onto the next naming system. The context does this by first constructing a CannotProceedException containing information pinpointing how far it has proceeded. In so doing it sets the resolved object, resolved name, remaining name, and environment parts of the exception.2 (In the case of the Context.rename() method, it also sets the "resolved newname" part.)

It then obtains a continuation context from JNDI by passing the CannotProceedException to static method NamingManager.getContinuationContext()

public class NamingManager {
    public static Context getContinuationContext(
        CannotProceedException e) throws NamingException;
    ...
}

The information in the exception is used by getContinuationContext() to create the context instance in which to continue the operation.

To obtain a continuation context for the DirContext operations, use Directory-Manager.getContinuationDirContext().

public class DirectoryManager {
    public static getContinuationDirContext(
        CannotProceedException e) throws NamingException;
    ...
}

Upon receiving the continuation context, the operation should be continued using the remainder of the name that has not been resolved.

For example, when attempting to continue a bind() operation, the code in the context implementation might look as follows:

public void bind(Name name, Object obj) throws NamingException {
    ...
    try {
        internal_bind(name, obj);
        ...
    } catch (CannotProceedException e) {
        Context cctx = 			NamingManager.getContinuationContext(e);
        cctx.bind(e.getRemainingName(), obj);
    }
}

In this example, bind() depends on an internal method, internal_bind(), to carry out the actual work of the bind and to throw a CannotProceedException when it discovers that it is going beyond this naming system. The exception is then passed to getContinuationContext() in order to continue the operation. If the operation cannot be continued, the continuation context will throw the CannotProceedException to the caller of the original bind() operation.

2.5.6 "Dynamic" Location of Next Naming System

In some federation configurations, the result of resolution in one naming system does not indicate which is the next naming system. The only conclusion that the context implementation can draw is that resolution has terminated in the current naming system and should proceed to the next naming system.

For example, suppose the composite name "lib/xyz.zip/part1/abc" consists of two parts: "lib/xyz.zip", which names a file in ZIP format, and "part1/abc", which names an entry within the ZIP file. Although the resolution of "lib/xyz.zip" results in a file object, the desired result is a context in which to resolve names of ZIP entries. Similarly, another composite name could name an entry within a file in "tar" format, and the desired result of the resolution of the file component of the composite name would be a context in which to resolve tar entries.

In effect, any type of context might be federated beneath the file system namespace depending on the format of the files. Such relationships should be symmetric: it should be possible for the ZIP file context and other similar contexts to federate beneath other, non-file system namespaces. Furthermore, developers writing the file system context implementation and those writing the context implementations for the ZIP file context, the tar file context, or a context for some yet-to-be defined format, should be able to work independently.

To support this type of federation, JNDI defines a special form of Reference called an nns reference ("nns" stands for "next naming system"). This Reference has an address with type nns. The address contents is the resolved object (in the above example, the ZIP file). Continuing with the file system example, the file system context implementation might create the nns reference as follows:

 RefAddr addr = new RefAddr("nns") {
    public Object getContent() {
         return theFile;
    }
};
Reference ref = new Reference("java.io.File", addr);

Next, the context implementation constructs a CannotProceedException (as with the junction case) by using the nns reference as the resolved object, and a resolved name consisting of the resolved file name and an empty component. The empty component is being used as an implicit next naming system pointer and indicates that the resolution has succeeded to the point of resolving the next naming system. (Notice how the values of the resolved object and resolved name are matched.) The context impementation then passes the CannotProceedException to getContinuationContext().

As with any resolved object in a CannotProceedException, getContinuationContext() searches for a context implementation that accepts this nns reference. The ZIP file context implementation, for instance, might accept an nns reference and other information provided, such as the name of the file (relative to a given context). If the context implementation determines that the file is a ZIP file, it would then construct a context for resolving names within that file.

2.5.7 More about CannotProceedException

Central to the JNDI SPI's framework for federation is the CannotProceedException. A Cannot-ProceedException contains information such as the resolved name/object and remaining name, inherited from the NamingException superclass. In addition, a CannotProceedException also contains fields for the "alt" name and "alt" name context. While the resolved name from NamingException is the full composite name (relative to the starting context of the operation), alt name is the resolved name relative to the alt name context. That is, alt name might not necessarily be the same as the resolved name. Alt name and alt name context are used as arguments to NamingManager/DirectoryManager.getObjectInstance(). They allow the factories that are called by this method to obtain more information about the resolved object (for example, it could be used to get a special attribute about the object). These factories are described in Chapter 4.

2.5.8 Contextual Information

While the emphasis of the JNDI SPI framework is on "looking forward" and trying to find the next naming system, some context implementations, once located, need to "look back" the resolution chain to obtain contextual information. For example, a particular context implementation that is federated off of a host naming system might be designed such that the only means by which it can find out host information is to ask its (possibly not immediate) superior naming system. To do that, it needs contextual information-information about how the resolution proceeded to its current point.

Summarizing earlier discussions on federation, when performing an operation on a name that spans multiple namespaces, the context implementation first constructs a CannotProceed-Exception containing information pinpointing how far it has proceeded. It then obtains a continuation context from JNDI by calling getContinuationContext(). To support the retrieval of contextual information, getContinuationContext() automatically adds the environment property java.naming.spi.CannotProceedException, with the value of the Cannot-ProceedException argument, to the continuation context's environment. This property is inherited by the continuation context and may be used by that context's implementation to inspect the fields of the exception.

2.6 Referral Support

LDAP-style directory services support the notion of referrals for redirecting a client's request to another server. A referral differs from the federation continuation mechanism described earlier in that a referral may be presented to the JNDI client, who then decides whether to follow it, whereas a CannotProceedException should be returned to the client only when no further progress is possible. Another difference is that an individual context implementation offers the capability of continuing the operation using the referral (and itself determines the mechanism for doing so). In a federation, the mechanism of continuation is beyond the scope of individual context implementations: individual context implementations benefit from the common federation mechanism provided by the JNDI SPI framework.

A context implementation that supports referrals defines a subclass of ReferralException and provides implementations for its abstract methods. getReferralContext() returns a context at which to carry on the operation, and getReferralInfo() returns information on where the referral leads to, in a format appropriate to the context implementation.

The environment property java.naming.referral specifies how the context implementation should treat referrals. If the context implementation is asked to throw an exception when a referral is encountered, or if the context implementation encounters problems following a referral, it throws a ReferralException to the application. To continue the operation, the application re-invokes the method on the referral context using the same arguments it supplied to the original method. The following code sample shows how ReferralException may be used by an application:3

while (true) {
    try {
        bindings = ctx.listBindings(name);
        while (bindings.hasMore()) {
            b = (Binding) bindings.next();
            ...
        }
        break;
    } catch (ReferralException e) {
        ctx = e.getReferralContext();
    }
}

This convention of re-invoking the method using the original arguments is a simple one for applications to follow. This places the burden on the implementation of the ReferralException to supply enough information to the implementation of the referral context for the operation to be continued. Note that this will likely render some of the arguments passed to the re-invoked operation superfluous. The referral context implementation is free to ignore any redundant or unneeded information.

It is possible for an operation to return results in addition to a referral. For example, when searching a context, the server might return several results in addition to a few referrals as to where to obtain further results. These results and referrals might be interleaved at the protocol level. If referrals require user interaction (i.e., not followed automatically), the context implementation should return the results through the search enumeration first. When the results have been returned, the referral exception can then be thrown. This allows a simple programming model to be used when presenting the user with a clear relationship between a referral and its set of results.

2.7 Schema Support

JNDI defines the Attribute interface for representing an attribute in a directory. An attribute consists of an attribute identifier (a string) and a set of attribute values, which can be any object in the Java programming language. There are also methods defined in Attribute for obtaining the attribute's definition and syntax definition from the directory's schema.

public class Attribute {
    public DirContext getAttributeDefinition() throws NamingException;
    public DirContext getAttributeSyntaxDefinition()

        throws NamingException;
    ...
}

The utility class, BasicAttribute, does not provide useful implementations for these methods. A directory context implementation that has support for such schema information should provide implementations of Attribute that implement these two methods based on its schema mechanisms, perhaps by subclassing BasicAttribute and overriding these two methods. The context implementation should then return instances of these subclasses when asked to return instances of Attribute. The context implementation, when it receives an Attribute instance that do not have meaningful implementations of these two methods, should use reasonable defaults to determine the attribute's definition and syntax, using information such as the attribute values' class names or conventions used for the attribute identifier.

The DirContext interface contains schema-related methods:

public class DirContext {
    ...
    public DirContext getSchema(Name name) throws NamingException;
    public DirContext getSchema(String name) throws NamingException;

    public DirContext getSchemaClassDefinition(Name name)
        throws NamingException;
    public DirContext getSchemaClassDefinition(String name)
        throws NamingException;

}

getSchema() returns the schema tree for the named object, while getSchemaClassDefinition() returns a context containing schema class definitions for the named object. Some systems have just one global schema and, regardless of the value of the name argument, will return the same schema tree. Others support finer grained schema definitions, and may return different schema trees depending on which context is being examined.

2.8 Event Support

A context implementation supports event notification by providing implementation for the methods in the EventContext/EventDirContext interfaces. The event model advocated by these interfaces can be readily supported using a multithreaded model. When an application uses addNamingListener() to register a listener with a context, the context records the requests and takes action to collect information required to generate the events. When the context eventually receives information to generate the events, it fires the events to the listener. The thread that does the registration is typically different from the thread that runs the listener. The context implementation typically uses a thread that it has created and manages to run the listener method. When one event is dispatched to multiple listeners, the context implementation may choose to (and is generally encouraged) to execute the listener methods concurrently in separate threads.

The addNamingListener() methods accept an instance of NamingListener. The instance might implement one or more subinterfaces of NamingListener. If the listener implements more than one subinterface, the context implementation should try to conserve resources required to satisfy the registration. For example, an implementation might be able to submit a single request to the server that captures all of the requests of the subinterfaces.

Where possible, the context implementation should fire a NamingExceptionEvent to a listener if the context will be unable to fire further events and then automatically deregister the listener. For example, if the connection to the server is broken subsequent to the registration of the listener and no information will be available to fire events, the context should fire a NamingExceptionEvent to the listener.

2.9 Context Environment Support

Each instance of Context (or its subinterfaces) can have associated with it an environment which contains preferences expressed by the application of how it would like to access the services offered by the context. Examples of information found in an environment are security-related information that specify the user's credentials and desired level of security (none, simple, strong), and configuration information, such as the server to use. See Chapter 6 and Appendix A of the JNDI API document for more details about environment properties.

Environment properties are defined generically in order to ensure maximum portability. Individual service providers should map these generic properties to characteristics appropriate for their service. Properties that are not relevant to a provider should be recorded and silently ignored. The environment may also be used for storing service provider-specific properties or preferences, in which case their applicability across different providers is limited.

2.9.1 Property Naming Convention

See Section 6.1 in the JNDI API document for a description of how environment properties are named. Service provider-specific properties should have a prefix that reflects their uniqueness to the provider. A common practice is to use the package name of the service provider as the prefix. For example, since Sun's LDAP provider is primarily contained in the package com.sun.jndi.ldap, properties specific to Sun's LDAP provider have the prefix "com.sun.jndi.ldap.".

2.9.2 Initializing a Context's Environment

When creating an initial context (either using the constructors from InitialContext or its subclasses), the application can supply an environment as a parameter. The parameter is represented as a Hashtable or any of its subclasses (e.g., Properties). The JNDI class library augments the data from this parameter with data from other sources (see Chapter 6 in the JNDI API document) and passes this to the context implementation.

Like all other parameters, the environment parameter received by a context implementation is owned by the caller. The context implementation should make a copy of the environment parameter it gets or otherwise take steps to ensure that changes by the caller to the parameter would not affect what the context implementation sees and vice versa. Note also that if the environment parameter is a Properties instance, enumeration and Hashtable.get() on the parameter only examine the top-level properties (not any nested defaults). This is the expected behavior. The context implementation is not expected to retrieve or enumerate values in the Properties instance's nested defaults.

The JNDI library is responsible for merging properties from different sources, such as the environment parameter to the initial context, resource files, and, where appropriate, system properties and applet parameters (see the JNDI API document, Chapter 6). The context implementation typically just reads the property it needs from the environment which it was supplied. There is seldom a need for a context implementation to consult other sources.

2.9.3 Inheritance

The environment is inherited from parent to child as the context methods proceed from one context to the next. The entire environment of a context instance is inherited by the child context instances, regardless of whether certain properties within the environment are ignored by a particular context.

A context implementation must pass on the environment from one context instance to the next in order to implement this "inheritance" trait of environments. Within one context implementation it can do so by passing the environment as an argument to the Context constructor, or to the NamingManager/DirectoryManager.getObjectInstance() method for creating Context instances.

Across context implementations in a federation, this is supported by passing the environment as part of the CannotProceedException parameter of NamingManager.getContinuationContext()/DirectoryManager.getContinuationDirContext(), which in turn will use this environment when creating an instance of the context in which to continue the operation.

Inheritance can be implemented in any way as long as it preserves the semantics that each context has its own view of its environment. For example, a copy-on-write implementation could be used to defer copying of the environment until it is absolutely necessary.

2.9.4 Updates to the Environment

The environment of a context can be updated via the use of the addToEnvironment() and removeFromEnvironment() methods in the Context interface.

public interface Context {
    ...
    public Object addToEnvironment(String propName, Object propVal)
        throws NamingException;

    public Object removeFromEnvironment(String propName)
        throws NamingException;
}

These methods update the environment of this instance of Context. An environment property that is not relevant to the context implementation is silently ignored but maintained as part of the environment. The updated environment affects this instance of Context, and will be inherited by any new child Context instances, but does not affect any Context instances already in existence. A lookup of the empty name on a Context will return a new Context instance with an environment inherited as with any other child.

See Section 6.6 in the JNDI API document for details.

2.9.5 Provider Resource Files

Each service provider has an optional resource file that contains properties specific to that provider. The name of this resource is:

[prefix/]jndiprovider.properties
where prefix is the package name of the provider's context implementation(s), with each period (".") converted to a slash ("/"). For example, suppose a service provider defines a context implementation with class name com.sun.jndi.ldap.LdapCtx. The provider resource for this provider is named com/sun/jndi/ldap/jndiprovider.properties.

The JNDI class library will consult this file when it needs to determine the value of a property, as described in Section 6.5.2 in the JNDI API document.

When the service provider needs to determine the value of a property, it will generally take that value directly from the environment. The service provider may define provider-specific properties to be placed in its own provider resource file. In that case it needs to read them from its property resource file and merge them in a way consistent with the algorithm described in Section 6.5.2 in the JNDI API document.

2.10 Connection Management

For a context implementation that uses a client/server protocol, there is not necessarily a one-to-one mapping between a context and a connection between the client and the server. JNDI is a high-level API that does not deal directly with connections. It is the job of the context implementation to do any necessary connection management. Hence, a single connection may be shared by multiple context instances, and a context implementation is free to use its own algorithms to conserve connection and network usage. Thus, when a method is invoked on the context instance, the context implementation might need to do some connection management in addition to performing the requested operation.

The Context.close() and NamingEnumeration.close() methods can be used by applications to provide hints to the context implementation as to when to free connection-related resources. A context implementation may choose to (and is generally encouraged to) take other measures to garbage-collect and conserve its connection-related resources.

Some environment properties affect a context's connection. For example, if the application changes the security-related properties, the context implementation might need to modify or create a new connection using those updated properties. If the connection was being shared by other contexts prior to the change, the connection change should not affect contexts whose properties have not been updated.

3 The Initial Context

Since all naming methods are performed relative to a context, an application needs a starting context in order to invoke them. This starting context is referred to as the initial context. The bindings in the initial context are determined by policies set forth by the initial context implementation, perhaps using standard policies for naming global and enterprise-wide namespaces. For example, the initial context might contain a binding to the Internet DNS namespace, a binding to the enterprise-wide namespace, and a binding to a personal directory belonging to the user who is running the application.

An application obtains an initial context by making the following call:

Context ctx = new InitialContext();
An alternate constructor allows an environment to be passed as an argument. This allows the application to pass in preferences or security information to be used in the construction of the initial context.

Hashtable env = new Hashtable();4
env.put(Context.SECURITY_PRINCIPAL, "jsmith");
env.put(Context.SECURITY_CREDENTIALS, "xxxxxxx");
Context ctx = new InitialContext(env);

Subsequent to getting an initial context, the application can invoke Context methods.

Object obj = ctx.lookup("this/is/a/test");

The InitialContext class (and subclasses) selects an implementation using a default algorithm that can be overridden by installing an initial context factory builder (described below).

The InitialDirContext is an extension of InitialContext. It is used for performing directory operations using the initial context. The InitialLdapContext class is an extension of InitialDirContext. It is used for performing special LDAP v3 operations using the initial context. The algorithms and policies described in this section also apply to InitialDirContext and InitialLdapContext. Places where DirContext/LdapContext is required instead of Context have been noted.

3.1 The Initial Context Factory

An initial context factory is a class that creates an instance of a context that has been implemented following the guidelines outlined in Chapter 2. The factory is used by the InitialContext class (or subclass) constructor.

Given an environment, the factory returns an instance of Context (or its subinterfaces).

public interface InitialContextFactory {
    public Context getInitialContext(Hashtable env)

        throws NamingException;
}

Appendix A contains an example of an InitialContextFactory.

Once the context instance has been created, when a method is invoked on InitialContext by using a non-URL name (see below), the method is forwarded and invoked on that context instance.

JNDI selects the initial context implementation to use by using the property java.naming.factory.initial. This property contains the fully-qualified class name of an initial context factory. The class must implement the InitialContextFactory interface and have a public constructor that does not take any arguments. JNDI will load the initial context factory class and then invoke getInitialContext() on it to obtain a Context instance to be used as the initial context.

An application that wants to use a particular initial context must supply the java.naming.factory.initial property in the environment passed to the InitialContext (or subclass) constructors, or via resource files, system properties, or applet parameters.

3.1.1 Exceptions

When the property java.naming.factory.initial is set to a non-null value, the InitialContext (and subclass) constructors will try to load and instantiate an initial context factory, which will then create a context instance. If the factory or context cannot be created, for example as a result of an authentication problem, the initial context factory can throw an exception to indicate this problem. Note however that it is up to the context implementation when it verifies and indicates to users of the initial context any environment property- or connection- related problems. It can do so lazily-delaying until an operation is performed on the context, or eagerly, at the time the context is created.

If the property java.naming.factory.initial is not set, no attempt will be made to create an underlying context for the initial context. The initial context is still useful, for instance, for processing URL names, as described next.

3.2 URL Support

If a URL5 string is passed to the initial context, it will be resolved using the corresponding URL context implementation. This feature is supported by the InitialContext class (and subclasses) and is independent of the setting of the java.naming.factory.initial environment property.

This feature allows applications to use the initial context to reach any namespace for which a URL context implementation has been made available. For example, the following code lists an LDAP namespace from the initial context:

new InitialContext().list("ldap://lserver/ou=eng,o=wiz,c=us");

3.2.1 URL Context

A URL string has the following format:

scheme_id:opaque_string

For example, an LDAP URL string has the scheme id "ldap"; a file URL has the scheme id "file".

A URL context implementation is a class that implements the Context interface (and possibly some subinterfaces) and accepts name arguments that are URL strings of the scheme that it supports. For example, an LDAP URL context accepts "ldap" URL strings.

When a URL string name is passed to a URL context, the context methods that accept String treat the name as a URL with the syntax defined by the URL scheme. When a Name object in which the first component is a URL string name is passed to a URL context, the first component is treated as a URL string, and the rest is used for federation (that is, resolution of the first component will indicate which naming system to use to resolve the rest). The Name instance should be a CompositeName; otherwise, an InvalidNameException should be thrown.

Name arguments that are not URL strings, and URL strings with an inappropriate scheme id should be rejected with an InvalidNameException.

3.2.2 URL Context Factory

A URL context factory is a class (actually a special type object factory (see Section 4.1)) that creates an instance of a URL context for URLs of one or more schemes.

When the InitialContext class receives a URL string as a name argument, it will look for a URL context factory by using the following algorithm. The environment property java.naming.factory.url.pkgs contains a colon-separated list of package prefixes. The factory's class name is constructed by using the following rule:

package_prefix + "." + scheme_id + "." + scheme_id URLContextFactory

for each package prefix listed in the property. The default package prefix com.sun.jndi.url is appended to the end of the list.

For example, if the URL is "ldap://somehost:389" and java.naming.factory.url.pkgs contains "com.widget:com.wiz.jndi", the InitialContext class will attempt to locate the corresponding factory class by loading the following classes until one is successfully instantiated:

com.widget.ldap.ldapURLContextFactory
com.wiz.jndi.ldap.ldapURLContextFactory
com.sun.jndi.url.ldap.ldapURLContextFactory
The factory class implements the ObjectFactory interface (see "URL Context Factory" on page 31) and has a public constructor that takes no arguments. The InitialContext class passes the scheme id as the resolved object to the factory's getObjectInstance() method, which in turn creates a URL context for the URL scheme. The URL context will then be used to carry out the originally intended Context or DirContext operation on the URL supplied to InitialContext.

3.2.3 Service Provider's Responsibility

There is no requirement that a service provider supply a URL context factory and URL context implementation. It only does so if it wants to allow URL string names with its URL scheme to be accepted by the InitialContext class. A service provider, for instance, might just provide an initial context factory and a context implementation that is accessed through that factory.

3.3 Overriding the Default Behavior

The policy of creating an initial context factory using the java.naming.factory.initial environment property and URL support is built into the InitialContext class. There are two ways an application can override some or all of this policy.

3.3.1 Removing URL Support

If an application does not want URL strings to be treated specially, it can use the method NamingManager.getInitialContext(), which creates a context instance using the factory named in the java.naming.factory.initial environment property.

This method is also useful if the application needs to access interfaces implemented by the context created by the initial context factory, but which are not one of Context, DirContext, or LdapContext. Here is a code fragment that gets a context using NamingManager.getInitialContext() and then casts it to a subclass:

FooContext ctx = (FooContext) NamingManager.getInitialContext(env);
...
Object obj = ctx.lookup(name);
ctx.fooMethod1(...);
Note that installing an initial context factory builder (discussed next) affects the result of NamingManager.getInitialContext().

3.3.2 Removing All Policy

An initial context factory builder is a class that creates instances of initial context factories.

An application can install an initial context factory builder to define its own policy of how to locate and construct initial context implementations. When a builder has been installed, it is solely responsible for creating the initial context factories. None of the default policies (java.naming.factory.initial property or URL support) normally used by JNDI are employed.

An implementation of an initial context factory builder must implement the InitialContext-FactoryBuilder interface. Its createInitialContextFactory() method creates instances of InitialContextFactory.

After a builder has been installed. the application can get the initial context by either using the InitialContext/InitialDirContext/InitialLdapContext constructors, or by using NamingManager.getInitialContext(). When one of the constructors is used, its class is basically a wrapper around the underlying context implementation returned by NamingManager.getInitialContext().

3.4 Implementing a Subclass of InitialContext

When there is a need to provide an initial context that supports an interface that extends from Context, DirContext, or LdapContext, the service provider should supply a subclass of InitialContext (or InitialDirContext/InitialLdapContext).

3.4.1 URL Support

To add support for URLs in the same way InitialContext and InitialDirContext do, the subclass should use the protected methods available in InitialContext as follows. This only makes sense for interfaces that have methods that accept name argument.

For example, suppose FooContext is a subinterface of DirContext. Its initial context implementation would define getURLOrDefaultInitFooCtx() methods (for both Name and String parameters) that retrieve the real initial context to use.

public class InitialFooContext extends InitialDirContext {
    ...
    protected FooContext getURLOrDefaultInitFooCtx(Name name)
        throws NamingException {
        Context answer = getURLOrDefaultInitCtx(name);
        if (!(answer instanceof FooContext)) {
            throw new NoInitialContextException("Not a FooContext");
        }
        return (FooContext)answer;
    }
    // similar code for getURLOrDefaultInitFooCtx(String name)
}
When providing implementations for the new methods in the FooContext interface that accept a name argument, getURLOrDefaultInitFooCtx() is used in the following way.

    public Object FooMethod1(Name name, ...) throws NamingException {
        return getURLOrDefaultInitFooCtx(name).FooMethod1(name, ...);
    }

3.4.2 New Method Support

When providing implementations for the new methods in the FooContext interface that do not have a name argument, or for which URL support is not required, use InitialContext.getDefaultInitCtx().

protected FooContext getDefaultInitFooCtx() throws NamingException {
    Context answer = getDefaultInitCtx();
    if (!(answer instanceof FooContext)) {
        throw new NoInitialContextException("Not an FooContext");
    }
    return (FooContext)answer;
}
public Object FooMethod2(Args args) throws NamingException {
    return getDefaultInitFooCtx().FooMethod2(args);
}

3.4.3 Constructors

The implementation should provide appropriate constructors for the class. The constructor should call the appropriate constructor of the superclass. If the environment needs to be modified or examined prior to the superclass's constructor being called, it should use the protected constructor that accepts a boolean flag to control the initialization of the initial context, and then use the init() method to initialize the context. Here is an example:

public InitialFooContext(Hashtable environment, Object otherArg)
        throws NamingException {
    super(true); // don't initialize yet

    // Clone environment and adjust
    Hashtable env = (environment == null) ? new Hashtable(11) :
        (Hashtable)environment.clone();
    ...
    init(env);
}
Client programs that use this new initial context would look as follows.
import com.widget.jndi.InitialFooContext;
...
FooContext ctx = new InitialFooContext(env);
Object obj = ctx.lookup(name);
ctx.FooMethod1(name, ...);

4 Customizing A Context Implementation

JNDI allows a context implementation to be customized-by the application, the application's deployer or user, or the service provider-in how it reads and stores objects in the naming/directory service. A similar facility is also available for narrowing LDAP v3 control classes.

You can think of these facilities as modules that plug into a context implementation.

4.1 Reading Objects: Object Factories

JNDI provides a generic way of creating objects (including instances of Context) using information stored in the namespace. That information may be of arbitrary type (java.lang.Object). For example, it may be a Reference, or a URL, or any other data required to create the object. Turning such information stored in the namespace into an object is supported through the use of object factories. An object factory is a class that implements the ObjectFactory interface (or the DirObjectFactory subinterface):

    public interface ObjectFactory {
        public Object getObjectInstance(Object refObj,
                        Name name,
                        Context nameCtx,
                        Hashtable env)
            throws Exception;
    }
    public interface DirObjectFactory extends ObjectFactory {
        public Object getObjectInstance(Object refObj,
                        Name name,
                        Context nameCtx,
                        Hashtable env,
                        Attributes attrs)
            throws Exception;
    }

Given some reference information (refObj) about an object, optional information about the name of the object and where it is bound, and optionally some additional environment information (for example, some identity or authentication information about the user creating the object), the factory attempts to create an object represented by the reference information. For example, given reference information about a printer, a printer object factory might return an instance of Printer. In the case of an object factory that is to be used with a DirContext implementation, the factory is also given some attributes about the object. If the factory requires more attributes or information, it can obtain them directly from the naming/directory service by using the name/nameCtx arguments.

If the factory cannot created an object using the arguments supplied, it should return null. For example, when a printer object factory is given data about a disk drive, it should return null. The factory should only thrown an exception if no other object factories should be tried. Therefore, the factory should be careful about runtime exceptions that might be thrown from its implementation. For example, if a printer object factory is given data about a printer but the data is malformed in some way, it should throw an exception.

Object factories are used in several places in JNDI, basically to turn any reference information into an object. They are used in federation, URL processing in the initial context, and, as illustrated by the printer example, turning data into a form expected by the application.

4.1.1 Handling Structured References

A Reference contains methods for returning the class name and location of the object factory. The following methods are found in Reference.

public class Reference {
    ...
    public String 	getClassName();
    public String getFactoryClassName();
    public String getFactoryClassLocation();
}
If the object read from the directory/naming service is an instance of Reference or Referenceable, its corresponding object factory can be located using information in Reference. The getFactoryClassName() method retrieves the name of the factory class that implements the ObjectFactory interface. This factory must implement the ObjectFactory interface and have a public constructor that takes no arguments. getFactoryClassLocation() retrieves the codebase of the class implementation for the factory, which is a list of space-separated URLs.

JNDI creates the object by invoking getObjectInstance() on the ObjectFactory instance, by using the Reference and environment as arguments. The result is an instance of a class identified by getClassName().

Note that all the classes necessary to instantiate the object returned to the application are made available using mechanisms provided by JNDI. The application doesn't have to install the classes locally.

Figure 3: Example Using Reference to Get Back an Object From the Namespace

Returning to the printer example, suppose Printer is an interface for representing a printer and the BSDPrinter class is an implementation of that interface. BSDPrinter implements the Referenceable interface and uses the Reference class to store information on how to construct instances of BSDPrinter and address information for communicating with the print server. The Reference contains the class name of the object ("Printer"), the class name of the printer object factory ("PrinterFactory") and a URL for loading the factory's class implementation. Using the factory class name and implementation location, JNDI first loads the implementation of PrinterFactory and creates an instance of PrinterFactory. It then invokes getObjectInstance() on the factory to create an instance of Printer using the reference. For example, one address in the reference may have an address of type "bsd", and contains the print server's host name ("lobby-printserver"). The PrinterFactory instance uses the address type ("bsd") to decide to create a BSDPrinter instance and passes the address contents ("lobby-printserver") to its constructor. The resulting BSDPrinter object is returned as the result of lookup().

From the context implementation's point of view, all of this is done automatically by its invocation of NamingManager/DirectoryManager.getObjectInstance().

When the application invokes print() on the BSDPrinter instance returned by lookup(), the data is sent to the print server on the machine "lobby-printserver" for printing. The application need not know the details of the Reference stored in the namespace, the protocol used to perform the job, or whether the BSDPrinter class was defined locally or loaded over the network. The transformation of the information stored in the underlying service into an object that implements the Printer interface is done transparently through the cooperation of the service provider (which stores bindings of printer names to printer address information), the printer service provider (which provides the PrinterFactory and BSDPrinter classes), and the JNDI SPI framework (which ties the two together to return an object that the application can use directly).

A service provider for such an object must do the following:

  1. Define the class for the object (e.g., BSDPrinter) that implements Referenceable or is a subclass of Reference.
  2. Define the Reference and its reference addresses for the object.
  3. Define a factory class that implements ObjectFactory (e.g., PrinterFactory). This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given the Reference from step 2.

4.1.2 Handling URL References

If a Reference contains an address of type "URL" but not the factory class name and location, or if the reference is an array of strings containing URLs, JNDI will use the URL context factory support described in Section 3.2 to locate the factory, and then pass the URL string in the address to the factory's getObjectInstance() method. See Section 4.1.6 for a description of how JNDI expects a URL context factory implementation to behave.

A service provider for such an object must do the following:

  1. Define the class for the object (e.g., BSDPrinter).
  2. Define the URL scheme for the object.
  3. Define a URL context factory class that implements ObjectFactory. This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given the URL from step 2.

4.1.3 Handling Arbitrary References: The java.naming.factory.object Property

In addition to extracting factory information from References, or using URLs, JNDI also looks for object factories specified in the java.naming.factory.object property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of object factories. Each class must implement the ObjectFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the ObjectFactory/DirObjectFactory.getObjectInstance() method on it using the object and environment arguments supplied. If the creation is successful, the resulting object is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

Figure 4: Example using java.naming.factory.object to Get Back an Object from the Namespace

For the printer example, instead of using a Reference to represent a printer in the namespace, some other information is stored. When that information is later retrieved, the object factories specified java.naming.factory.object are tried in turn to attempt to turn that information into a Printer instance.

A service provider for such an object must do the following:

  1. Define the class for the object (e.g., BSDPrinter).
  2. Define the class for reference information for the object. This is the object that will be bound in the namespace. This need not be Reference. It can be anything that will be understood by its corresponding object factory (e.g., some string containing the server name "printer type=bsd; host=lobby-printserver").
  3. Define a factory class that implements ObjectFactory (e.g., PrinterFactory). This class's getObjectInstance() method will create an instance of the class from step 1 (e.g., BSDPrinter) when given an instance of the class from step 2 (e.g., "printer type=bsd; host=lobby-printserver").

The service provider should automatically convert between the actual object (e.g., BSDPrinter) and the reference information (step 2, e.g., "printer type=bsd; host=lobby-printserver") when binding or looking up the object.

An application that wants to use a particular factory for generating objects must include the factory's class name in its java.naming.factory.object environment property and make the factory's classes and object classes available.

4.1.4 Overriding the Default Behavior

An object factory builder is a class that creates instances of object factories.

An application can install an object factory builder to defining its own policy of how to locate and construct object factory implementations. When a builder has been installed, it is solely responsible for creating the object factories. None of the default policies (Reference, URL string, or java.naming.factory.object property) normally used by JNDI are employed.

Figure 5: Example using an Object Factory Builder to Get Back an Object from the Namespece

A service provider for an object factory builder must do the following:

  1. Define object factories that implement ObjectFactory.
  2. Define a class that implements ObjectFactoryBuilder. This class's createObjectFactory() method will use the constructors for the ObjectFactory classes in step 1.

An application that wants to use this factory builder must first install it.

    NamingManager.setObjectFactoryBuilder(builder);

4.1.5 Context Factory

A context factory is an object factory that creates instances of Context. The implementation of these contexts for a particular naming or directory service is referred to as a context implementation. Context implementations are described in Chapter 2. Like any other object factory, a context factory can be obtained by using any of the three mechanisms described above: from a Reference, a URL scheme id, or listed in the java.naming.factory.object property.

4.1.6 URL Context Factory

A URL context factory is a special kind of context factory. It follows these rules when implementing ObjectFactory.getObjectInstance().

  • If refObj is null, create a context for resolving URLs of the scheme associated with this factory. The resulting context is not tied to a specific URL. For example, invoking
getObjectInstance(null, null, null, env)
    on an "ldap" URL context factory returns a context that can resolve LDAP URLs (e.g., "ldap://ldap.wiz.com/o=wiz,c=us" or "ldap://ldap.umich.edu/", ...).
  • If refObj is a URL string, create the object identified by the URL. For example, invoking
getObjectInstance("ldap://ldap.wiz.com/o=wiz,c=us", null, null, env);
    on an "ldap" URL context factory would return the object named by "o=wiz,c=us" on the LDAP server ldap.wiz.com. If this happens to name a context, it can then be used for resolving (relative) LDAP names (e.g., "cn=Jane Smith").
  • If refObj is an array of URL strings, the assumption is that the URLs are equivalent in terms of the context to which they refer. Verification of whether the URLs are, or need to be, equivalent is up to the context factory. The order of the URLs in the array is not significant. The object returned by getObjectInstance() is the same as that for the single URL case-it is an object (perhaps a context) named by the URLs.
  • If refObj is any other type, the behavior of getObjectInstance() is determined by the implementation.

    URL context factories are used by the InitialContext class when it is passed a URL to resolve. URL context factories are also used for creating objects in the Java programming language from URLs stored in the namespace (see Section 4.1.2).

4.2 Storing Objects: State Factories

JNDI provides a mechanism to transform an object into a form storable by the underlying context implementation. That form may be any arbitrary type acceptable to the underlying context implementation. For example, it may be a Reference, a URL, a Serializable object, or a set of attributes, or any other data acceptable by the underlying context implementation. Turning an arbitrary object into data that can be stored in the namespace is supported through the use of state factories. A state factory is a class that implements the StateFactory interface (or the DirStateFactory subinterface):

    public interface StateFactory {
        public Object getStateToBind(Object obj,
                         Name name,
                         Context nameCtx,
                         Hashtable env)
            throws NamingException;
    }

    public interface DirStateFactory {
        public DirStateFactory.Result getStateToBind(Object obj,
                                 Name name,
                                 Context nameCtx,
                                 Hashtable env,
                                 Attributes attrs)
            throws NamingException;
    }

Given an object (obj), optional information about the name of the object and where it is bound, and optionally some additional environment information (for example, some identity or authentication information about the user accessing the namespace), the factory attempts to create an object suitable for binding. Typically, the state factory is knowledgeable about the target naming/directory service and/or context implementation, and knows which data formats are acceptable. In the case of a state factory that is to be used with a DirContext implementation, the factory is also given some attributes that are to be stored with the object. If the factory require more information about the object, it can obtain them directly from the naming/directory service by using the name/nameCtx arguments. For example, a printer state factory for an LDAP directory might return a set of attributes that represent the printer.

If the factory cannot return any data using the arguments supplied, it should return null. For example, when a printer state factory is given a disk object, it should return null. The factory should only thrown an exception if no other state factories should be tried. Therefore, the factory should be careful about exceptions that might be thrown from its implementation. For example, if a printer state factory is given a printer object but perhaps contradictory attributes, it might throw an exception.

4.2.1 Input/Output Options

Ultimately, a factory's output formats are determined by the underlying naming/directory service. A context implementation for the CORBA Object Services (COS) naming service, for example, can only store CORBA object references into the service; a context implementation for LDAP can only store attributes, although there is a lot of flexibility in how to encode information within those attributes.

A service provider typically supplies a factory for each (common) type of input that it expects, and the application can augment that set with state factories of its own. For example, a service provider for COS naming might have a state factory for converting a Java Remote Method Invocation (RMI) object into a CORBA object reference. A user of that provider might add a state factory for converting a Microsoft COM object reference into a CORBA object reference.

4.2.2 Locating State Factories: The java.naming.factory.state Property

JNDI looks for state factories specified in the java.naming.factory.state property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of state factories. Each class must implement the StateFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the StateFactory/DirStateFactory.getStateToBind() method on it using the object, name, context, environment, and attributes arguments supplied. If the factory produces a non-null result, the result is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

4.3 Narrowing LDAP v3 Controls: Response Control Factories

The LDAP v3 protocol allows response controls to accompany any response sent by the server. The control consists of an OID string identifier and a sequence of ASN.1 BER encoded bytes. In the absence of any external information or assistance, the context implementation can only return a plain implementation of the Control interface that returns the OID and bytes.

JNDI provides the following abstract class for dealing with response controls:

    public abstract javax.naming.ldap.ControlFactory {
    ...
    public static Control getControlInstance(Control ctl,
                        Context ctx,
                        Hashtable env)
        throws NamingException;
    public abstract Control getControlInstance(Control ctl)
        throws NamingException;
}
When a context implementation receives a response control, it invokes the static getControl-Instance() method to find a control factory that can narrow the control to one that has more user-friendly access methods. Such a control, for instance, can decode the ASN.1 BER bytes and provide access methods that return the information as Java types. If no such control factory can be found, the original response control is returned. Here is an example of a hypothetical Time-ResponseControl which decodes the time of day.

public class TimeResponseControl implements Control {
    long time;
    // Constructor used by ControlFactory
    public TimeResponseControl(String OID, byte[] berVal)
        throws NamingException {
        // check validity of OID
        time = // extract time from berVal
    };

    // Type-safe and User-friendly method
    public long getTime() {
        return time;
    }
    // Low-level methods
    public String getID() {
        return TIME_OID;
    }
    public byte[] getEncodedValue() {
        return // original berVal
    }
     ...
}
A control factory may be responsible for one or more controls. If the factory cannot return a control using the arguments supplied, it should return null. Typically, this involves just matching the control's OID against the list of OIDs supported by the factory. The factory should only thrown an exception if no other control factories should be tried. Therefore, the factory should be careful about exceptions that might be thrown from its implementation. For example, if a control factory is given a control with an OID that it supports, but the byte array has an encoding error, it should throw an exception.

Here is an example of a control factory:

public class VendorXControlFactory extends ControlFactory {
    public VendorXControlFactory () {
    }
    public Control getControlInstance(Control orig)
        throws NamingException {
        if (isOneOfMyControls(orig.getID())) {
             ...
            // determine which of ours it is and call its constructor
            return new TimeResponseControl(orig.getID(),
                                orig.getEncodedValue());
        }
        return null;  // not one of ours
    }
}

4.3.1 Locating Response Control Factories: The java.naming.factory.control Property

JNDI looks for response control factories specified in the java.naming.factory.control property, which can be in the environment or the provider resource file (see Section 2.9.5). The property contains a colon-separated list of fully-qualified class names of control factories. Each class must implement the ControlFactory interface and have a public constructor that takes no arguments. For each class in the list, JNDI attempts to load and instantiate the factory class, and to invoke the ControlFactory.getControlInstance() instance method on it using the control, context, and environment arguments supplied. If the factory produces a non-null result, the result is returned; otherwise, JNDI uses the same procedure on the next class in the list until the list is exhausted or a factory returns a non-null result.

4.4 Ownership of Parameters

Any object passed as a parameter to a method in a factory is owned by the caller. Therefore, the factory is prohibited from maintaining a pointer to the object beyond the duration of the operation or modifying the object. If the factory needs to save the information contained in a parameter beyond the duration of the operation, it should maintain its own copy.

4.5 Reentrancy

A factory instance should be reentrant. That is, it should be possible for multiple threads to invoke methods on a single instance of a factory concurrently.

[Top] [Prev] [Next] [Bottom]

1 See Appendix B for legend of class diagram.

2 The CannotProceedException may well have been thrown by one of the context's internal methods when it discovered that the name being processed is beyond the scope of its naming system. The process by which the exception is produced is dependent on the implementation of the context.

3 Note that this is code in the application. In "Continuing an Operation in a Federation", the code sample presented is code in the context implementation.

4 You can also use a subclass of Hashtable (e.g. Properties) for this.

5 The mention of "URL" in this document refers to a URL string as defined by RFC 1738 and its related RFCs. It is any string that conforms to the syntax described therein, and may not always have corresponding support in the java.net.URL class or Web browsers. The URL string is either passed as the String name parameter, or as the first component of the Name parameter.

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


 [Top] [Prev] [Next] [Bottom]

1 Introduction
1.1 Document Overview
1.2 Interface Overview
1.2.1 NamingManager and DirectoryManager
1.2.2 Initial Contexts
1.2.3 Object Factories
1.2.4 State Factories
1.2.5 Federation Support
2 Building a Context Implementation
2.1 Ownership of Parameters
2.2 Reentrancy
2.3 Basic Support-Implementing the Context Interface(s)
2.4 Object Support
2.4.1 Reading an Object
2.4.2 Storing an Object
2.5 Federation Support
2.5.1 Names
2.5.2 Resolving Through a Context
2.5.3 Resolving Through to Subinterfaces of Context
2.5.4 Naming System Boundaries
2.5.5 Continuing an Operation in a Federation
2.5.6 "Dynamic" Location of Next Naming System
2.5.7 More about CannotProceedException
2.5.8 Contextual Information
2.6 Referral Support
2.7 Schema Support
2.8 Event Support
2.9 Context Environment Support
2.9.1 Property Naming Convention
2.9.2 Initializing a Context's Environment
2.9.3 Inheritance
2.9.4 Updates to the Environment
2.9.5 Provider Resource Files
2.10 Connection Management
3 The Initial Context
3.1 The Initial Context Factory
3.1.1 Exceptions
3.2 URL Support
3.2.1 URL Context
3.2.2 URL Context Factory
3.2.3 Service Provider's Responsibility
3.3 Overriding the Default Behavior
3.3.1 Removing URL Support
3.3.2 Removing All Policy
3.4 Implementing a Subclass of InitialContext
3.4.1 URL Support
3.4.2 New Method Support
3.4.3 Constructors
4 Customizing A Context Implementation
4.1 Reading Objects: Object Factories
4.1.1 Handling Structured References
4.1.2 Handling URL References
4.1.3 Handling Arbitrary References: The java.naming.factory.object Property
4.1.4 Overriding the Default Behavior
4.1.5 Context Factory
4.1.6 URL Context Factory
4.2 Storing Objects: State Factories
4.2.1 Input/Output Options
4.2.2 Locating State Factories: The java.naming.factory.state Property
4.3 Narrowing LDAP v3 Controls: Response Control Factories
4.3.1 Locating Response Control Factories: The java.naming.factory.control Property
4.4 Ownership of Parameters
4.5 Reentrancy
Appendix A: Service Provider Example
Appendix B: Legend for Class Diagram
Appendix C: JNDI Change History

[Top] [Prev] [Next] [Bottom]

jndi@java.sun.com
Copyright © 1999, Sun Microsystems, Inc. All rights reserved.


JNI - Java Native Interface

Java

Java Native Interface

 Documentation Contents
JavaTM Native Interface (JNI) is a standard programming interface for writing Java native methods and embedding the JavaTM virtual machine* into native applications. The primary goal is binary compatibility of native method libraries across all Java virtual machine implementations on a given platform.

The Java 2 SDK supports the old native method interface (NMI) only when using the classic virtual machine. NMI was originally implemented in Java Development Kit (JDKTM) 1.0. The old NMI is not part of the Java platform standard, and programmers are strongly encouraged to migrate their existing NMI code to the JNI.

JNI Enhancements
  • AWT Native Interface
  • JNI Enhancements in the Java 2 SDK

JNI 1.1 Specification
  • JNI 1.1 Specification
Other Information

  • The Java Tutorial has a trail on the Java Native Interface:
    Java Native Interface Tutorial

  • For JNI FAQs and information about the book The Java Native Interface: Programmer's Guide and Specification, see this document on the Java Software website:
    Java Native Interface Tips

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jni@java.sun.com 		Sun


Contents | Prev | Next Java Native Interface Specification

Copyright Information

© 1996, 1997 Sun Microsystems, Inc. All rights reserved.
2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.

This document is protected by copyright. No part of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.

The information described in this document may be protected by one or more U.S. patents, foreign patents, or pending applications.

TRADEMARKS

Sun, Sun Microsystems, Sun Microelectronics, the Sun Logo, SunXTL, JavaSoft, JavaOS, the JavaSoft Logo, Java, HotJava, JavaChips, picoJava, microJava, UltraJava, JDBC, the Java Cup and Steam Logo, "Write Once, Run Anywhere" and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
UNIX ® is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd.
Adobe ® is a registered trademark of Adobe Systems, Inc.
Netscape Navigator is a trademark of Netscape Communications Corporation.
All other product names mentioned herein are the trademarks of their respective owners.

THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE DOCUMENT. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

Contents | Prev | Next

Java Native Interface Specification (HTML generated by dkramer on March 15, 1997)
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to jni@java.sun.com


Java(tm) Platform Debugger Architecture

Java

JavaTM Platform Debugger Architecture
The Java Platform Debugger Architecture (JPDA) consists of three interfaces designed for use by debuggers in development environments for desktop systems. The Java Virtual Machine Debugger Interface defines the services a VM must provide for debugging. The Java Debug Wire Protocol defines the format of information and requests transferred between the process being debugged and the debugger front end, which implements the Java Debug Interface. The Java Debug Interface defines information and requests at the user code level.
Design
  • JPDA Overview
    • Modularity
    • Walk-through
    • Porting
  • Architecture
    • Architecture Overview
    • Debugger Interfaces
      • JavaTM Virtual Machine Debug Interface
      • JavaTM Debugger Wire Protocol
      • JavaTM Debug Interface
Interface Reference
  • Java Virtual Machine Debug Interface (JVMDI)
    • Specification

  • Java Debug Wire Protocol (JDWP)
    • Specification

  • Java Debug Interface (JDI)
    • Specification

Implementation

  • Connection and Invocation Details
  • Known Bugs and Limitations

Examples

The demo/jpda/examples.jar file in the SDK software contains JPDA examples, including source code for the jdb Java Debugger and the prototype javadt GUI debugger.
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-debugger@java.sun.com

Sun


 All Classes
AbsentInformationException
Accessible
AccessWatchpointEvent
AccessWatchpointRequest
ArrayReference
ArrayType
AttachingConnector
BooleanType
BooleanValue
Bootstrap
BreakpointEvent
BreakpointRequest
ByteType
ByteValue
CharType
CharValue
ClassLoaderReference
ClassNotLoadedException
ClassNotPreparedException
ClassObjectReference
ClassPrepareEvent
ClassPrepareRequest
ClassType
ClassUnloadEvent
ClassUnloadRequest
Connector
Connector.Argument
Connector.BooleanArgument
Connector.IntegerArgument
Connector.SelectedArgument
Connector.StringArgument
DoubleType
DoubleValue
DuplicateRequestException
Event
EventIterator
EventQueue
EventRequest
EventRequestManager
EventSet
ExceptionEvent
ExceptionRequest
Field
FloatType
FloatValue
IllegalConnectorArgumentsException
IncompatibleThreadStateException
InconsistentDebugInfoException
IntegerType
IntegerValue
InterfaceType
InternalException
InvalidCodeIndexException
InvalidLineNumberException
InvalidRequestStateException
InvalidStackFrameException
InvalidTypeException
InvocationException
LaunchingConnector
ListeningConnector
LocalVariable
Locatable
LocatableEvent
Location
LongType
LongValue
Method
MethodEntryEvent
MethodEntryRequest
MethodExitEvent
MethodExitRequest
Mirror
ModificationWatchpointEvent
ModificationWatchpointRequest
NativeMethodException
ObjectCollectedException
ObjectReference
PathSearchingVirtualMachine
PrimitiveType
PrimitiveValue
ReferenceType
ShortType
ShortValue
StackFrame
StepEvent
StepRequest
StringReference
ThreadDeathEvent
ThreadDeathRequest
ThreadGroupReference
ThreadReference
ThreadStartEvent
ThreadStartRequest
Transport
Type
TypeComponent
Value
VirtualMachine
VirtualMachineManager
VMDeathEvent
VMDisconnectedException
VMDisconnectEvent
VMMismatchException
VMOutOfMemoryException
VMStartEvent
VMStartException
VoidType
VoidValue
WatchpointEvent
WatchpointRequest


Java Debug Interface

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link to Non-frame version.


Overview

Java Debug Interface
All Classes

Packages
com.sun.jdi
com.sun.jdi.connect
com.sun.jdi.event
com.sun.jdi.request


Java Debug Interface

The front page has been relocated.Please see:
Frame version
Non-frame version.


Package com.sun.jdi

 com.sun.jdi
Interfaces
Accessible
ArrayReference
ArrayType
BooleanType
BooleanValue
ByteType
ByteValue
CharType
CharValue
ClassLoaderReference
ClassObjectReference
ClassType
DoubleType
DoubleValue
Field
FloatType
FloatValue
IntegerType
IntegerValue
InterfaceType
LocalVariable
Locatable
Location
LongType
LongValue
Method
Mirror
ObjectReference
PathSearchingVirtualMachine
PrimitiveType
PrimitiveValue
ReferenceType
ShortType
ShortValue
StackFrame
StringReference
ThreadGroupReference
ThreadReference
Type
TypeComponent
Value
VirtualMachine
VirtualMachineManager
VoidType
VoidValue
Classes
Bootstrap
Exceptions
AbsentInformationException
ClassNotLoadedException
ClassNotPreparedException
IncompatibleThreadStateException
InconsistentDebugInfoException
InternalException
InvalidCodeIndexException
InvalidLineNumberException
InvalidStackFrameException
InvalidTypeException
InvocationException
NativeMethodException
ObjectCollectedException
VMDisconnectedException
VMMismatchException
VMOutOfMemoryException


Package com.sun.jdi.connect

 com.sun.jdi.connect
Interfaces
AttachingConnector
Connector
Connector.Argument
Connector.BooleanArgument
Connector.IntegerArgument
Connector.SelectedArgument
Connector.StringArgument
LaunchingConnector
ListeningConnector
Transport
Exceptions
IllegalConnectorArgumentsException
VMStartException


Package com.sun.jdi.event

 com.sun.jdi.event
Interfaces
AccessWatchpointEvent
BreakpointEvent
ClassPrepareEvent
ClassUnloadEvent
Event
EventIterator
EventQueue
EventSet
ExceptionEvent
LocatableEvent
MethodEntryEvent
MethodExitEvent
ModificationWatchpointEvent
StepEvent
ThreadDeathEvent
ThreadStartEvent
VMDeathEvent
VMDisconnectEvent
VMStartEvent
WatchpointEvent


Package com.sun.jdi.request

 com.sun.jdi.request
Interfaces
AccessWatchpointRequest
BreakpointRequest
ClassPrepareRequest
ClassUnloadRequest
EventRequest
EventRequestManager
ExceptionRequest
MethodEntryRequest
MethodExitRequest
ModificationWatchpointRequest
StepRequest
ThreadDeathRequest
ThreadStartRequest
WatchpointRequest
Exceptions
DuplicateRequestException
InvalidRequestStateException


Java Virtual Machine Profiler Interface

Java (tm)

JavaTM Virtual Machine Profiler Interface (JVMPI)

 Documentation Contents
The JavaTM Virtual Machine* Profiling Interface (JVMPI) is an experimental interface for profiling. The JVMPI is not yet a standard profiling interface. This feature is provided for the benefit of tools vendors who have an immediate need for profiling hooks in the Java virtual machine. The JVMPI will continue to evolve, based on feedback from customers and tools vendors.

JVMPI is a two-way function call interface between the Java virtual machine and an in-process profiler agent. On the one hand, the virtual machine notifies the profiler agent of various events, corresponding to, for example, heap allocation, method calls, etc. On the other hand, the profiler agent issues control requests through the JVMPI. For example, the profiler agent can turn on/off a specific event notification, based on the needs of the profiler front-end.

JVMPI Reference

  • JVMPI Reference

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jvmpi@eng.sun.com 		Sun

Java Software


The java.lang and java.util.* Packages

 Documentation Contents
The java.lang package provides classes that are fundamental to the design of the JavaTM programming language.

The java.util.* packages provide support for the event model, collections framework, date and time facilities, and contains various utility classes. The java.util.zip and java.util.jar packages provide support for ZIP file format and Java Archive (JAR) file formats respectively.

Enhancements

Version 1.3 of the Java 2 SDK offers several enhancements in the java.lang and java.util.* packages. See Enhancements for details.

API Specifications

  • Package java.lang API Specification
  • Package java.util API Specification
  • Package java.util.jar API Specification
  • Package java.util.zip API Specification

Related Documentation

  • The Collections Framework
  • Package Java Archive (JAR) Features

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

 Sun
Java Software


Arbitrary Precision Math

Java

Arbitrary-Precision Math

 Documentation Contents
The java.math package supports arbitrary-precision math. The package consists of two classes:
  • BigInteger numbers are immutable, arbitrary-precision integers. The BigInteger class provides analogs for all Java language primitive integer operators. The class also supports modular arithmetic, GCD calculation, prime number generation and testing, single-bit manipulation, and various other operations.
  • BigDecimal numbers are immutable, arbitrary-precision signed decimal numbers, suitable for monetary calculations. The BigDecimal class provides operations for basic arithmetic, scale manipulation, comparison, format conversion, and hashing.
Enhancements
  • Enhancements to java.math in version 1.3 of the JavaTM 2 SDK.
API Specification
  • java.math Package
Copyright © 1998-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: joshua.bloch@sun.com

Sun Microsystems, Inc
Java Software


Miscellaneous Features

 Documentation Contents
  • The @deprecated Tag
    Used within documentation comments to mark classes and members as "no-longer-preferred", and directs the developer to replacement classes and members.
  • APPLET Tag
    Enhancements to the <APPLET> tag defined in HTML. Loads applets in the applet viewer or a web browser.

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@java.sun.com 		Sun

Java Software


Deprecation of APIs

 Documentation Contents
A deprecated API is an API that we recommend you no longer use, due to improvements in Java. While deprecated APIs are currently still implemented, they may be removed in future implementations, and we recommend using other APIs. The @deprecated tag denotes a deprecated API.
Deprecated Guide
  • How and When to Deprecate APIs

Deprecated Design Notes
  • The @deprecated Tag
Copyright © 1995-97 Sun Microsystems, Inc. All Rights Reserved.

Please send comments on deprecation to: jdk-comments@java.sun.com 		Sun

Java Software


Networking Features

 Documentation Contents
Networking Enhancements for JavaTM 2 SDK, Standard Edition, v 1.3
  • Lists the changes and enhancements to Java networking in this release.

Networking Guides

For completeness, this section includes documentation related to changes to the java.net package in the Java 1.1 platform:

  • Extendable Socket and ServerSocket
    The design, rationale, and how to do it.
  • Socket Options
    Support for popular BSD-style options in the java base classes, (and subclasses can define their own)
  • Socket Exceptions
    Subclasses of SocketException for finer granularity of handling network errors
  • Miscellaneous
    Important bug fixes, new constructors, new methods, and others

Networking API Reference
(javadoc)

  • java.net Package

Copyright © 1996-99 Sun Microsystems, Inc. All Rights Reserved.

 Sun Microsystems, Inc
Java Software


Performance Enhancements

 Documentation Contents
Version 1.3 of the JavaTM 2 SDK and Java 2 Runtime Environment contain many performance enhancements including improvements in startup time, memory footprint, and program execution speed. The most significant performance enhancements are detailed below.
Performance Enhancements
  • Java HotSpotTM Client and Server Virtual Machines*
  • Improvements to Startup Time and Memory Footprint
  • Improvements to Program Execution Speed

See Also

  • Performance FAQ (on the java.sun.com web site)
  • Java HotSpot VM Options (on the java.sun.com web site).

*As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jdk-comments@eng.sun.com 		Sun


Java Plug-in

Java

JavaTM Plug-in

 Documentation Contents
Beginning with version 1.3.0_01, the Java Plug-in supports the Open JVM Integration (OJI) feature of the Netscape 6 web browser. This and other enhancements of the Java Plug-in are described in this Java Plug-in documentation.
New Java Plug-in Features

Overview
Java Plug-in Enhancements
OJI Features
Security

For More Information

Java Plug-in web site

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-plugin-feedback@java.sun.com 		Sun Microsystems, Inc
Java Software


Reflection

 Documentation Contents
Reflection enables Java code to discover information about the fields, methods and constructors of loaded classes, and to use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions. The API accommodates applications that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class.

The JavaTM 2 Platform allows programs to suppress default reflective access control.

Dynamic Proxy Classes
  • Dyanmic Proxy Classes are supported by three new classes and interfaces in version 1.3 of the Java 2 Platform.

Reflection Overview
  • Reflection Overview 1.1 (Not Updated for the Java 2 Platform)

Suppressing Reflective Access Control
  • Suppressing Reflective Access Control

Reflection API Specification
(javadoc)
  • java.lang.reflect Package

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: reflection-comments@eng.sun.com 		Sun

Java Software


Contents | Prev | Next Java Core Reflection

Copyright Information

© 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.
2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.

This document is protected by copyright. No part of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.

The information described in this document may be protected by one or more U.S. patents, foreign patents, or pending applications.

TRADEMARKS

Sun, Sun Microsystems, Sun Microelectronics, the Sun Logo, SunXTL, JavaSoft, JavaOS, the JavaSoft Logo, Java, HotJava, JavaChips, picoJava, microJava, UltraJava, JDBC, the Java Cup and Steam Logo, "Write Once, Run Anywhere" and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
UNIX ® is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd.
Adobe ® is a registered trademark of Adobe Systems, Inc.
Netscape NavigatorTM is a trademark of Netscape Communications Corporation.
All other product names mentioned herein are the trademarks of their respective owners.

THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE DOCUMENT. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

Contents | Prev | Next
Copyright © 1996, 1997, 1998 Sun Microsystems, Inc. All rights reserved.


Reference Objects

 Documentation Contents
Reference objects support a limited degree of interaction with the garbage collector. A program may use a reference object to maintain a reference to some other object in such a way that the latter object may still be reclaimed by the collector. A program may also arrange to be notified some time after the collector has determined that the reachability of a given object has changed. Reference objects are therefore useful for building simple caches as well as caches that are flushed when memory runs low, for implementing mappings that do not prevent their keys (or values) from being reclaimed, and for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.
API Specification
(javadoc)
  • java.lang.ref
  • java.lang.ref.Reference
  • java.lang.ref.ReferenceQueue
  • java.lang.ref.SoftReference
  • java.lang.ref.WeakReference
  • java.lang.ref.PhantomReference

Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-gc-comments@eng.sun.com. This is not a subscription list. 		Sun
Java Software


Resources

 Documentation Contents
The Java platform supports supports resource access in a location-independent manner.
Programming Guides
  • Accessing Resources in a Location-Independent Manner.

API References
(javadoc)
  • java.lang.Class class
  • java.lang.ClassLoader class
  • java.net.URLClassLoader class
  • java.util.ResourceBundle class
  • java.lang.SecurityManager class
  • java.security Package
Copyright © 1998-99 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: pelegri@eng.sun.com

Sun Microsystems, Inc
Java Software


Java(TM) Remote Method Invocation (RMI)

Java

JavaTM Remote Method Invocation (RMI)

 Contents of the
JavaTM 2 SDK,
Standard Edition,
v 1.3

Enhancements since version 1.2 of the JavaTM 2 SDK

  • RMI Release Notes
    The RMI Release notes contain changes to the RMI and serialization APIs, as well as changes to the RMI tools, rmic and rmid.
RMI Tutorials
  • Getting Started
    The Getting Started Tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using JavaTM Remote Method Invocation (RMI). The Hello World applet makes a remote method call to the server from which it was downloaded to retrieve the message "Hello World!"
  • The Custom Socket Factory Tutorial
    The Custom Socket Factory Tutorial shows you how to create a version of the distributed Hello World program in which the RMI runtime uses sockets of a type chosen by the programmer. This tutorial also includes a discussion of how RMI can be used over SSL sockets.
  • The Activation Tutorials

    • The Activation Tutorials take you through the steps of creating a new class that defines an activatable object, migrating a UnicastRemoteObject to be an activatable object, activating classes that do not extend from java.rmi.activation.Activatable, and using a MarshalledObject to create persistent data.

RMI Architecture and Functional Specification
  • RMI Specification (also in Postscript, PDF)

RMI API Specification
(javadoc)
  • java.rmi Package
  • java.rmi.dgc Package
  • java.rmi.registry Package
  • java.rmi.server Package
  • java.rmi.activation Package

RMI Tools
  • rmic - Java RMI stub compiler - (for Microsoft Windows) (for the SolarisTM operating environment)
  • rmiregistry - Java remote object registry - (for Microsoft Windows) (for the Solaris operating environment)
  • rmid - Java RMI activation system daemon - (for Microsoft Windows) (for the Solaris operating environment)

For More Information

  • The RMI and Object Serialization FAQ

  • Search the archives of the RMI-USERS list

  • Subscribe to the RMI-USERS list

  • Dynamic code downloading using RMI
    (Using the java.rmi.server.codebase Property)

  • Applying the Factory Pattern to RMI

  • The RMI trail of The JavaTM Tutorial Continued

  • The Scoop on RMI and SSL

  • The Java Remote Method Invocation (RMI) Home Page

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.
Please send comments to: rmi-comments@java.sun.com 		Sun


Stock Watcher

Here is the example StockApplet:


/****************************************************************
 *  Copyright (c) 1996, 1997, 1998, 1999 Phaos Technology Corp. All
 *  rights reserved.
 ****************************************************************/

This example illustrates how to use RMI over an SSL transport layer,
using the SSLava Toolkit.

The HelloWorld example was changed to work with SSL, but the changes
are relatively minor. They involve initializing and using SSLSockets
where appropriate, and creating a client and server socket factory. The
changes include:

  SSLHelloApplet.java - Client applet program.
  SSLHelloClient.java - Client application program.

  SSLHelloImpl.java -  Changed to use SSL client and server socket
      factories and initialize SSL connection parameters.

  SSLClientSocketFactory.java - Needed to implement SSL client socket factory.

  SSLServerSocketFactory.java - Needed to implement SSL server socket factory.

The file SETUP.txt briefly describes how to setup a secure RMI client,
server and registry.

Please submit any questions to tech@phaos.com


====================================================================
How to set-up a secure RMI client/server scenario using secure sockets
from Phaos Technology:

====================================================================

1. Ensure that you are running JDK1.2beta4, or a later version of
   the Java Development Kit.

2. Download and install the evaluation version of the SSLava Toolkit
   API from Phaos' website:

    http://www.phaos.com/

3. Make sure that the following classes are installed in a single
   directory (eg: the example's code/server directory) on the machine
   you plan to use to run the example RMI server and are reachable by
   an "http://" URL:

    * All classes required by the crysec and crysec.SSL packages
      of the SSLava Toolkit (this includes the "crysec" and "hal"
      class subdirectories of SSLava)
      * The applet class itself
    * The RMI interface and stub classes

   The server's java.rmi.server.codebase property will be set to be
   the URL which points to this code location.

   In addition, when you run the example application client from a
   machine other than the server host, you need to make sure that the
   application client has access to a local copy of the SSLava
   libraries.

   The example applet client is written so that the secure socket
   factory classes are downloaded to it.  This behavior would likely
   be necessary in a commercial deployment of RMI over SSL.  For this
   reason, all the example classes, except the server implementation,
   need to be installed in a location from where they can be
   downloaded by the applet client program.

4. Run the example by performing the following steps:

   * Ensure that the SSLava toolkit classes are located in a directory
     that can be reached by the server's CLASSPATH environment
     variable.

   * Compile all source (*.java) files that came with this example.
     In order to perform this step, you will need to ensure that when
     you run javac your CLASSPATH contains the directory indicated by
     the URL from step 3 (this requirement will hold for running the
     server as well).

   * Ensure that the server certificate files for SSLava are located
     in the example code/server directory; you need to copy
     server-cert.der and ca-cert.der from the test directory of the
     unzipped SSLava toolkit, to the server's directory.

     Start the server by running the following command in the example
     code/server directory on the http server from which clients will
     download example classes:

java  -Djava.rmi.server.codebase=
 http://<rmiWebServerHost>/<installLocation>/code/server/
 -Djava.security.policy=../all.policy SSLHelloImpl

     "rmiWebServerHost", refers to the machine from which
     clients will download example classes.  If you are running your
     RMI client in an applet, "rmiWebServerHost" must also refer to
     the machine on which you run the example RMI server.

     "installLocation" indicates the URL alias that corresponds to the
     phaosrmi directory of this example.

     You will need to set the java.rmi.server.codebase property on the
     RMI server to the URL described in step 3.  You must also ensure
     that the directory indicated by this URL can be found in the
     server's CLASSPATH.

   * Run the client as either an applet or an application:

     If your client is an applet, make sure you modify index.html so
     that the applet codebase URL is the same as the value of the
     java.rmi.server.codebase property on the server.

     Run the applet from the example code/applet directory using the
     command:

appletviewer -J-Djava.class.path= index.html

     If your client is an application, run it from the example
     code/client directory using the command:

java -Djava.security.policy=../all.policy SSLHelloClient <rmiServerHost>

     Where "rmiServerHost" is the name of the machine on which the
     SSLHelloImpl program is running.

     Allow a few seconds for the applet to load completely.

5. This example merely shows how to use Phaos' SSL sockets in RMI.
   For deployment of applets, it is recommended that you sign your
   class files so that users may trust downloaded client socket
   factories and applet code.

6. Although this example exclusively makes use of HTTP URLs, RMI is
   capable of using file URLs to perform all of the functionality
   used in this example.

7. If you have further questions:

   * Regarding how to set up and use RMI applications, please see:

     http://java.sun.com:80/products/jdk/1.2/docs/guide/rmi/index.html

     The "Getting Started" tutorial on this page provides a complete
     set of instructions on how to set up and configure RMI
     applications.

   * About using the Phaos SSLava toolkit API, send email to:

     tech@phaos.com

     or visit:

     http://www.phaos.com/support/support2.htm


Hello World

The message from the HelloServer is:

//code/server/" code="SSLHelloApplet" width=500 height=120>


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

Remote Object Activation

CHAPTER 7

Topics:

  • Overview
  • Activation Protocol
  • Implementation Model for an "Activatable" Remote Object
  • Activation Interfaces

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.1 Overview

Distributed object systems are designed to support long-lived persistent objects. Given that these systems will be made up of many thousands (perhaps millions) of such objects, it would be unreasonable for object implementations to become active and remain active, taking up valuable system resources, for indefinite periods of time. In addition, clients need the ability to store persistent references to objects so that communication among objects can be re-established after a system crash, since typically a reference to a distributed object is valid only while the object is active.

Object activation is a mechanism for providing persistent references to objects and managing the execution of object implementations. In RMI, activation allows objects to begin execution on an as-needed basis. When an activatable remote object is accessed (via a method invocation) if that remote object is not currently executing, the system initiates the object's execution inside an appropriate JVM.

7.1.1 Terminology

An active object is a remote object that is instantiated and exported in a JVM on some system. A passive object is one that is not yet instantiated (or exported) in a JVM, but which can be brought into an active state. Transforming a passive object into an active object is a process known as activation. Activation requires that an object be associated with a JVM, which may entail loading the class for that object into a JVM and the object restoring its persistent state (if any).

In the RMI system, we use lazy activation. Lazy activation defers activating an object until a client's first use (i.e., the first method invocation).

7.1.2 Lazy Activation

Lazy activation of remote objects is implemented using a faulting remote reference (sometimes referred to as a fault block). A faulting remote reference to a remote object "faults in" the active object's reference upon the first method invocation to the object. Each faulting reference maintains both a persistent handle (an activation identifier) and a transient remote reference to the target remote object. The remote object's activation identifier contains enough information to engage a third party in activating the object. The transient reference is the actual "live" reference to the active remote object that can be used to contact the executing object.

In a faulting reference, if the live reference to a remote object is null, the target object is not known to be active. Upon method invocation, the faulting reference (for that object) engages in the activation protocol to obtain a "live" reference, which is a remote reference (such as a unicast remote reference) for the newly-activated object. Once the faulting reference obtains the live reference, the faulting reference forwards method invocations to the underlying remote reference which, in turn, forwards the method invocation to the remote object.

In more concrete terms, a remote object's stub contains a "faulting" remote reference type that contains both:

  • an activation identifier for a remote object, and
  • a "live" reference (possibly null) containing the "active" remote reference type of the remote object (for example, a remote reference type with unicast semantics).
Note - The RMI system preserves "at most once" semantics for remote calls. In other words, a call to an activatable or unicast remote object is sent at most once. Thus, if a call to a remote object fails (indicated by a RemoteException being thrown), the client can be guaranteed that the remote method executed no more than once (and perhaps not at all).

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.2 Activation Protocol

During a remote method invocation, if the "live" reference for a target object is unknown, the faulting reference engages in the activation protocol. The activation protocol involves several entities: the faulting reference, the activator, an activation group, and the remote object being activated.

The activator (usually one per host) is the entity which supervises activation by being both:

  • a database of information that maps activation identifiers to the information necessary to activate an object (the object's class, the location--a URL path--from which the class can be loaded, specific data the object may need to bootstrap, etc.), and
  • a manager of Java virtual machines, that starts up JVMs (when necessary) and forwards requests for object activation (along with the necessary information) to the correct activation group inside a remote JVM.
Note that the activator keeps the current mapping of activation identifiers to active objects as a cache, so that the group does not need to be consulted on each activation request.

An activation group (one per JVM) is the entity which receives a request to activate an object in the JVM and returns the activated object back to the activator.

The activation protocol is as follows. A faulting reference uses an activation identifier and calls the activator (an internal RMI interface) to activate the object associated with the identifier. The activator looks up the object's activation descriptor (registered previously). The object's descriptor contains:

  • the object's group identifier, specifying the JVM in which it is activated,
  • the object's class name,
  • a URL path from which to load the object's class code, and
  • object-specific initialization data in marshalled form (initialization data might be the name of a file containing the object's persistent state, for example).
If the activation group in which this object should reside exists, the activator forwards the activation request to that group. If the activation group does not exist, the activator initiates a JVM executing an activation group and then forwards the activation request to that group.

The activation group loads the class for the object and instantiates the object using a special constructor that takes several arguments, including the activation descriptor registered previously.

When the object is finished activating, the activation group passes back a marshalled object reference to the activator that then records the activation identifier and active reference pairing and returns the active (live) reference to the faulting reference. The faulting reference (inside the stub) then forwards method invocations via the live reference directly to the remote object.

Note - In Java 2 SDK, Standard Edition, v 1.2, RMI provides an implementation of the activation system interfaces. In order to use activation, you must first run the activation system daemon rmid.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.


7 - Remote Object Activation

CONTENTS | PREV | NEXT Java Remote Method Invocation

7.3 Implementation Model for an "Activatable" Remote Object

In order to make a remote object that can be accessed via an activation identifier over time, a developer needs to:

  • register an activation descriptor for the remote object, and
  • include a special constructor in the object's class that the RMI system calls when it activates the activatable object.
An activation descriptor (ActivationDesc) can be registered in one of several ways:

  • via a call to the static register method of the class Activatable, or
  • by creating an "activatable" object via the first or second constructor of the Activatable class, or
  • by exporting an "activatable" object explicitly via Activatable's first or second exportObject method.
For a specific object, only one of the above methods should be used to register the object for activation. See the section below on "Constructing an Activatable Remote Object" for examples on how to implement activatable objects.

7.3.1 The ActivationDesc Class

An ActivationDesc contains the information necessary to activate an object. It contains the object's activation group identifier, the class name for the object, a codebase path (or URLs) from which the object's code can be loaded, and a MarshalledObject that may contain object-specific initialization data used during each activation.

A descriptor registered with the activation system is consulted (during the activation process) to obtain information in order to re-create or activate an object. The MarshalledObject in the object's descriptor is passed as the second argument to the remote object's constructor for the object to use during activation.

package java.rmi.activation;

public final class ActivationDesc implements java.io.Serializable
{

    public ActivationDesc(String className,
                  String codebase,
                  java.rmi.MarshalledObject data)
        throws ActivationException;

    public ActivationDesc(String className,
                  String codebase,
                  java.rmi.MarshalledObject data,
                  boolean restart)
        throws ActivationException;

    public ActivationDesc(ActivationGroupID groupID,
                  String className,
                  String codebase,
                          java.rmi.MarshalledObject data,
                  boolean restart);

    public ActivationDesc(ActivationGroupID groupID,
                  String className,
                  String codebase,
                  java.rmi.MarshalledObject data);

    public ActivationGroupID getGroupID();

    public String getClassName();

    public String getLocation();

    public java.rmi.MarshalledObject getData()

    public boolean getRestartMode();
}
The first constructor for ActivationDesc constructs an object descriptor for an object whose class is className, that can be loaded from codebase path, and whose initialization information, in marshalled form, is data. If this form of the constructor is used, the object's group identifier defaults to the current identifier for ActivationGroup for this JVM. All objects with the same ActivationGroupID are activated in the same JVM. If the current group is inactive or a default group cannot be created, an ActivationException is thrown. If the groupID is null, an IllegalArgumentException is thrown.

Note - As a side-effect of creating an ActivationDesc, if an ActivationGroup for this JVM is not currently active, a default one is created. The default activation group uses the java.lang.SecurityManager as a security manager and upon reactivation will set the properties in the activated group's JVM to be the current set of properties in the JVM. If your application needs to use a different security manager, it must set the group for the JVM before creating a default ActivationDesc. See the method ActivationGroup.createGroup for details on how to create an ActivationGroup for the JVM.
The second constructor for ActivationDesc constructs an object descriptor in the same manner as the first constructor except an additional parameter, restart, must be supplied. If the object requires restart service, meaning that the object will be restarted automatically when the activator is restarted (as opposed to being activated lazily upon demand), restart should be true. If restart is false, the object is simply activated upon demand (via a remote method call).

The third constructor for ActivationDesc constructs an object descriptor for an object whose group identifier is groupID, whose class name is className that can be loaded from the codebase path, and whose initialization information is data. All objects with the same groupID are activated in the same JVM.

The fourth constructor for ActivationDesc constructs an object descriptor in the same manner as the third constructor, but allows a restart mode to be specified. If an object requires restart service (as defined above), restart should be true.

The getGroupID method returns the group identifier for the object specified by the descriptor. A group provides a way to aggregate objects into a single Java virtual machine.

The getClassName method returns the class name for the object specified by the activation descriptor.

The getLocation method returns the codebase path from where the object's class can be downloaded.

The getData method returns a "marshalled object" containing initialization (activation) data for the object specified by the descriptor.

The getRestartMode method returns true if the restart mode is enabled for this object, otherwise it returns false.

7.3.2 The ActivationID Class

The activation protocol makes use of activation identifiers to denote remote objects that can be activated over time. An activation identifier (an instance of the class ActivationID) contains several pieces of information needed for activating an object:

  • a remote reference to the object's activator, and
  • a unique identifier for the object.
An activation identifier for an object can be obtained by registering an object with the activation system. Registration is accomplished in a few ways (also noted above):

  • via the Activatable.register method, or
  • via the first or second Activatable constructor, which both registers and exports the object, or
  • via the first or second Activatable.exportObject method, this method both registers and exports the object.

package java.rmi.activation;

public class ActivationID implements java.io.Serializable
{
    public ActivationID(Activator activator);

    public Remote activate(boolean force)
        throws ActivationException, UnknownObjectException,
               java.rmi.RemoteException;

    public boolean equals(Object obj);

    public int hashCode();
}
The constructor for ActivationID takes a single argument, activator, that specifies a remote reference to the activator responsible for activating the object associated with this activation identifier. An instance of ActivationID is globally unique.

The activate method activates the object associated with the activation identifier. If the force parameter is true, the activator considers any cached reference for the remote object as stale, thus forcing the activator to contact the group when activating the object. If force is false, then returning the cached value is acceptable. If activation fails, ActivationException is thrown. If the object identifier is not known to the activator, then the method throws UnknownObjectException. If the remote call to the activator fails, then RemoteException is thrown.

The equals method implements content equality. It returns true if all fields are equivalent (either identical or equivalent according to each field's Object.equals semantics). If p1 and p2 are instances of the class ActivationID, the hashCode method will return the same value if p1.equals(p2) returns true.

7.3.3 The Activatable Class

The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system. The class Activatable is the main API that developers need to use to implement and manage activatable objects. Note that you must first run the activation system daemon, rmid, before objects can be registered and/or activated.

package java.rmi.activation;

public abstract class Activatable
    extends java.rmi.server.RemoteServer
{
    protected Activatable(String codebase,
                  java.rmi.MarshalledObject data,
                  boolean restart,
                  int port)
        throws ActivationException, java.rmi.RemoteException;

    protected Activatable(String codebase,
                  java.rmi.MarshalledObject data,
                  boolean restart, int port,
                  RMIClientSocketFactory csf,
                  RMIServerSocketFactory ssf)
        throws ActivationException, java.rmi.RemoteException;

    protected Activatable(ActivationID id, int port)
        throws java.rmi.RemoteException;

    protected Activatable(ActivationID id, int port,
                  RMIClientSocketFactory csf,
                  RMIServerSocketFactory ssf)
        throws java.rmi.RemoteException;

    protected ActivationID getID();

    public static Remote register(ActivationDesc desc)
        throws UnknownGroupException, ActivationException,
               java.rmi.RemoteException;

    public static boolean inactive(ActivationID id)
        throws UnknownObjectException, ActivationException,
               java.rmi.RemoteException;

    public static void unregister(ActivationID id)
        throws UnknownObjectException, ActivationException,
               java.rmi.RemoteException;

    public static ActivationID exportObject(Remote obj,
                        String codebase,
                        MarshalledObject data,
                        boolean restart,
                        int port)
        throws ActivationException, java.rmi.RemoteException;

    public static ActivationID exportObject(Remote obj,
                        String codebase,
                        MarshalledObject data,
                        boolean restart,
                        int port,
                        RMIClientSocketFactory csf,
                        RMIServerSocketFactory ssf)
        throws ActivationException, java.rmi.RemoteException;

    public static Remote exportObject(Remote obj,
                      ActivationID id,
                      int port)
        throws java.rmi.RemoteException;

    public static Remote exportObject(Remote obj,
                      ActivationID id,
                      int port,
                      RMIClientSocketFactory csf,
                      RMIServerSocketFactory ssf)
        throws java.rmi.RemoteException;

     public static boolean unexportObject(Remote obj, boolean force)
        throws java.rmi.NoSuchObjectException;
}
An implementation for an activatable remote object may or may not extend the class Activatable. A remote object implementation that does extend the Activatable class inherits the appropriate definitions of the hashCode and equals methods from the superclass java.rmi.server.RemoteObject. So, two remote object references that refer to the same Activatable remote object will be equivalent (the equals method will return true). Also, an instance of the class Activatable will be "equals" to the appropriate stub object for the instance (i.e., the Object.equals method will return true if called with the matching stub object for the implementation as an argument, and vice versa).

Activatable Class Methods

The first constructor for the Activatable class is used to register and export the object on a specified port (an anonymous port is chosen if port is zero). The object's URL path for downloading its class code is codebase, and its initialization data is data. If restart is true, the object will be restarted automatically when the activator is restarted and if the group crashes. If restart is false, the object will be activated on demand (via a remote method call to the object).

A concrete subclass of the Activatable class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port, if port is zero) to the RMI runtime so that it is available to accept incoming calls from clients.

The constructor throws ActivationException if registering the object with the activation system fails. RemoteException is thrown if exporting the object to the RMI runtime fails.

The second constructor is the same as the first Activatable constructor but allows the specification of the client and server socket factories used to communicate with this activatable object. See the section in about "RMI Socket Factories" for details.

The third constructor is used to activate and export the object (with the ActivationID, id) on a specified port. A concrete subclass of the Activatable class must call this constructor when the object itself is activated via its special "activation" constructor whose parameters must be:

  • the object's activation identifier (ActivationID), and
  • the object's initialization/bootstrap data (a MarshalledObject).
As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients. The constructor throws RemoteException if exporting the object to the RMI runtime fails.

The fourth constructor is the same as the third constructor, but allows the specification of the client and server socket factories used to communicate with this activatable object.

The getID method returns the object's activation identifier. The method is protected so that only subclasses can obtain an object's identifier. The object's identifier is used to report the object as inactive or to unregister the object's activation descriptor.

The register method registers, with the activation system, an object descriptor, desc, for an activatable remote object so that it can be activated on demand. This method is used to register an activatable object without having to first create the object. This method returns the Remote stub for the activatable object so that it can be saved and called at a later time thus forcing the object to be created/activated for the first time. The method throws UnknownGroupException if the group identifier in desc is not registered with the activation system. ActivationException is thrown if the activation system is not running. Finally, RemoteException is thrown if the remote call to the activation system fails.

The inactive method is used to inform the system that the object with the corresponding activation id is currently inactive. If the object is currently known to be active, the object is unexported from the RMI runtime (only if there are no pending or executing calls) so the that it can no longer receive incoming calls. This call also informs this JVM's ActivationGroup that the object is inactive; the group, in turn, informs its ActivationMonitor. If the call completes successfully, subsequent activate requests to the activator will cause the object to reactivate. The inactive method returns true if the object was successfully unexported (meaning that it had no pending or executing calls at the time) and returns false if the object could not be unexported due to pending or in-progress calls. The method throws UnknownObjectException if the object is not known (it may already be inactive); an ActivationException is thrown if the group is not active; a RemoteException is thrown if the call informing the monitor fails. The operation may still succeed if the object is considered active but has already unexported itself.

The unregister method revokes previous registration for the activation descriptor associated with id. An object can no longer be activated via that id. If the object id is unknown to the activation system, an UnknownObjectException is thrown. If the activation system is not running, an ActivationException is thrown. If the remote call to the activation system fails, then a RemoteException is thrown.

The first exportObject method may be invoked explicitly by an "activatable" object that does not extend the Activatable class, in order to both

  • register the object's activation descriptor, desc, constructed from the supplied codebase and data, with the activation system so the object can be activated, and
  • export the remote object, obj, on a specific port. If the port is zero, then an anonymous port is chosen.
Once the object is exported, it can receive incoming RMI calls.

This exportObject method returns the activation identifier obtained from registering the descriptor, desc, with the activation system. If the activation group is not active in the JVM, then ActivationException is thrown. If the object registration or export fails, then RemoteException is thrown.

This method does not need to be called if obj extends Activatable, since the first Activatable constructor calls this method.

The second exportObject method is the same as the first except it allows the specification of client and server socket factories used to communicate with the activatable object.

The third exportObject method exports an "activatable" remote object (not necessarily of type Activatable) with the identifier, id, to the RMI runtime to make the object, obj, available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the third constructor above (which a subclass should invoke from its special activation constructor).

This exportObject method returns the Remote stub for the activatable object. If the object export fails, then the method throws RemoteException.

The fourth exportObject method is the same as the third but allows the specification of the client and server socket factories used to communicate with this activatable object.

The unexportObject method makes the remote object, obj, unavailable for incoming calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object. If the object is successfully unexported, the RMI runtime removes the object from its internal tables. Removing the object from RMI use in this forcible manner may leave clients holding stale remote references to the remote object. This method throws java.rmi.NoSuchObjectException if the object was not previously exported to the RMI runtime.

Constructing an Activatable Remote Object

In order for an object to be activated, the "activatable" object implementation class (whether or not it extends the Activatable class) must define a special public constructor that takes two arguments, its activation identifier of type ActivationID, and its activation data, a java.rmi.MarshalledObject, supplied in the activation descriptor used during registration. When an activation group activates a remote object inside its JVM, it constructs the object via this special constructor (described in more detail below). The remote object implementation may use the activation data to initialize itself in a suitable manner. The remote object may also wish to retain its activation identifier, so that it can inform the activation group when it becomes inactive (via a call to the Activatable.inactive method).

The first and second constructor forms for Activatable are used to both register and export an activatable object on a specified port. This constructor should be used when initially constructing the object; the third form of the constructor is used when re-activating the object.

A concrete subclass of Activatable must call the first or second constructor form to register and export the object during initial construction. This constructor first creates an activation descriptor (ActivationDesc) with the object's class name, the object's supplied codebase and data, and whose activation group is the default group for the JVM. Next, the constructor registers this descriptor with the default ActivationSystem. Finally, the constructor exports the activatable object to the RMI runtime on the specific port (if port is zero, then an anonymous port is chosen) and reports the object as an activeObject to the local ActivationGroup. If an error occurs during registration or export, the constructor throws RemoteException. Note that the constructor also initializes its ActivationID (obtained via registration), so that subsequent calls to the protected method getID will return the object's activation identifier.

The third constructor form for Activatable is used to export the object on a specified port. A concrete subclass of Activatable must call the third constructor form when it is activated via the object's own "activation" constructor, which takes two arguments:

  • the object's ActivationID
  • the object's initialization data, a MarshalledObject
This constructor only exports the activatable object to the RMI runtime on the specific port (if port is 0, then an anonymous port is chosen). It does not inform the ActivationGroup that the object is active, since it is the ActivationGroup that is activating the object and knows it to be active already.

The following is an example of a remote object interface, Server, and an implementation, ServerImpl, that extends the Activatable class:

package examples;

public interface Server extends java.rmi.Remote {
    public void doImportantStuff()
        throws java.rmi.RemoteException;
}

public class ServerImpl extends Activatable implements Server
{
    // Constructor for initial construction, registration and export
    public ServerImpl(String codebase, MarshalledObject data)
        throws ActivationException, java.rmi.RemoteException
    {
        // register object with activation system, then
        // export on anonymous port
        super(codebase, data, false, 0);
    }

    // Constructor for activation and export; this constructor
    // is called by the ActivationInstantiator.newInstance
    // method during activation in order to construct the object.
    public ServerImpl(ActivationID id, MarshalledObject data)
        throws java.rmi.RemoteException
    {
        // call the superclass's constructor in order to
        // export the object to the RMI runtime.
        super(id, 0);
        // initialize object (using data, for example)
    }

    public void doImportantStuff() { ... }
}
An object is responsible for exporting itself. The constructors for Activatable take care of exporting the object to the RMI runtime with the live reference type of a UnicastRemoteObject, so the object implementation extending Activatable does not need to worry about the detail of exporting the object explicitly (other than invoking the appropriate superclasses constructor). If an object implementation does not extend the class Activatable, the object must export the object explicitly via a call to one of the Activatable.exportObject static methods.

In the following example, ServerImpl does not extend Activatable, but rather another class, so ServerImpl is responsible for exporting itself during initial construction and activation. The following class definition shows ServerImpl's initialization constructor and its special "activation" constructor and the appropriate call to export the object within each constructor:

package examples;

public class ServerImpl extends SomeClass implements Server
{
    // constructor for initial creation
    public ServerImpl(String codebase, MarshalledObject data)
        throws ActivationException, java.rmi.RemoteException
    {
        // register and export the object
        Activatable.exportObject(this, codebase, data, false, 0);
    }

    // constructor for activation
    public ServerImpl(ActivationID id, MarshalledObject data)
        throws java.rmi.RemoteException
    {
        // export the object
        Activatable.exportObject(this, id, 0);
    }

    public void doImportantStuff() { ... }
}

Registering an Activation Descriptor Without Creating the Object

To register an activatable remote object with the activation system without first creating the object, the programmer can simply register an activation descriptor (an instance of the class ActivationDesc) for the object. An activation descriptor contains all the necessary information so that the activation system can activate the object when needed. An activation descriptor for an instance of the class examples.ServerImpl can be registered in the following manner (exception handling elided):

Server server;
ActivationDesc desc;
String codebase = "http://zaphod/codebase/";

MarshalledObject data = new MarshalledObject("some data");
desc = new ActivationDesc( "examples.ServerImpl", codebase, data);
server = (Server)Activatable.register(desc);

The register call returns a Remote stub that is the stub for the examples.ServerImpl object and implements the same set of remote interfaces that examples.ServerImpl implements (i.e, the stub implements the remote interface Server). This stub object (above, cast and assigned to server) can be passed as a parameter in any method call expecting an object that implements the examples.Server remote interface.

CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.